diff --git a/CMakeLists.txt b/CMakeLists.txt index d1f8eb3276f..aa18faa1c23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif() project(REACTOS) -#versioning +# Versioning include(include/reactos/version.cmake) # Don't escape preprocessor definition values added via add_definitions @@ -30,38 +30,40 @@ string(TOLOWER ${ARCH} ARCH) # Compile options if(ARCH MATCHES i386) - include(config.cmake) + include(cmake/config.cmake) elseif(ARCH MATCHES amd64) - include(config-amd64.cmake) + include(cmake/config-amd64.cmake) elseif(ARCH MATCHES arm) - include(config-arm.cmake) + include(cmake/config-arm.cmake) endif() -add_definitions(-D__REACTOS__) +# Compiler flags handling +include(cmake/compilerflags.cmake) + +add_definitions(-D__REACTOS__ -D__ROS_CMAKE__) if(NOT CMAKE_CROSSCOMPILING) add_definitions(-DTARGET_${ARCH}) if(MSVC) - add_definitions(-Dinline=__inline) + if(ARCH MATCHES i386) + add_definitions(/DWIN32 /D_WINDOWS) + endif() + add_definitions(/Dinline=__inline) else() - add_definitions(-fshort-wchar) + add_compiler_flags(-fshort-wchar) endif() - include_directories( - ${REACTOS_SOURCE_DIR}/tools/unicode - include - include/host - ${REACTOS_BINARY_DIR}/include) + include_directories(include/host) add_subdirectory(tools) add_subdirectory(lib) if(NOT MSVC) - export(TARGETS widl wrc gendib cabman cdmake mkhive spec2def geninc FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) + export(TARGETS widl wrc gendib cabman cdmake mkhive obj2bin spec2def geninc FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) else() - export(TARGETS gendib cabman cdmake mkhive spec2def geninc FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) + export(TARGETS gendib cabman cdmake mkhive obj2bin spec2def geninc FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) endif() else() @@ -72,7 +74,7 @@ else() set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) - + #useful stuff! include(CMakeParseArguments) @@ -93,25 +95,6 @@ else() set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Host executables") include(${IMPORT_EXECUTABLES}) - # Compiler specific definitions and macros - if(MSVC) - include(msc.cmake) - else() - include(gcc.cmake) - endif() - - # Generic macros - include(CMakeMacros.cmake) - - # IDL macros for widl/midl - include(cmake/idl-support.cmake) - - # Activate support for assembly source files - enable_language(ASM) - - # Activate language support for resource files - enable_language(RC) - if(DBG) add_definitions(-DDBG=1 -D_SEH_ENABLE_TRACE) endif() @@ -150,19 +133,55 @@ else() add_definitions(-DUSE_COMPILER_EXCEPTIONS) endif() - include_directories( - include - include/psdk - include/dxsdk - ${REACTOS_BINARY_DIR}/include - ${REACTOS_BINARY_DIR}/include/dxsdk - ${REACTOS_BINARY_DIR}/include/psdk - ${REACTOS_BINARY_DIR}/include/reactos - include/crt - include/ddk - include/ndk - include/reactos - include/reactos/libs) + # Compiler specific definitions and macros + if(MSVC) + include(cmake/msvc.cmake) + else() + include(cmake/gcc.cmake) + endif() + + # Generic macros + include(cmake/CMakeMacros.cmake) + + # IDL macros for widl/midl + include(cmake/idl-support.cmake) + + # Activate support for assembly source files + enable_language(ASM) + + # Activate language support for resource files + enable_language(RC) + + if(MSVC AND USE_WDK_HEADERS) + include_directories( + include + $ENV{SDK_INC_PATH} + include/dxsdk + ${REACTOS_BINARY_DIR}/include + ${REACTOS_BINARY_DIR}/include/dxsdk + ${REACTOS_BINARY_DIR}/include/psdk + ${REACTOS_BINARY_DIR}/include/reactos + $ENV{CRT_INC_PATH} + $ENV{DDK_INC_PATH} + include/ndk + include/reactos + include/reactos/libs) + else() + include_directories( + include + include/psdk + include/dxsdk + ${REACTOS_BINARY_DIR}/include + ${REACTOS_BINARY_DIR}/include/dxsdk + ${REACTOS_BINARY_DIR}/include/psdk + ${REACTOS_BINARY_DIR}/include/reactos + include/crt + include/ddk + include/ndk + include/reactos + include/reactos/libs) + endif() + if(ARCH MATCHES arm) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/arm) @@ -183,7 +202,7 @@ else() add_subdirectory(include/reactos/mc) add_subdirectory(include/asm) - include(baseaddress.cmake) + include(cmake/baseaddress.cmake) #begin with boot so reactos_cab target is defined before all other modules add_subdirectory(boot) @@ -202,5 +221,4 @@ else() file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs) add_dependency_footer() - endif() diff --git a/CREDITS b/CREDITS index e967d823ad6..51567871763 100644 --- a/CREDITS +++ b/CREDITS @@ -58,6 +58,7 @@ Paolo Pantaleo Peter Ward Pierre Schweitzer Phillip Susi +Rafal Harabien Rex Jolliff Richard Campbell Robert Bergkvist diff --git a/base/applications/CMakeLists.txt b/base/applications/CMakeLists.txt index 0540d69e2e3..2a45dbc97d7 100644 --- a/base/applications/CMakeLists.txt +++ b/base/applications/CMakeLists.txt @@ -4,7 +4,9 @@ add_subdirectory(calc) add_subdirectory(charmap) add_subdirectory(cmdutils) add_subdirectory(control) -add_subdirectory(dxdiag) +if(NOT MSVC) + add_subdirectory(dxdiag) # FIXME: msvc build. +endif() add_subdirectory(extrac32) add_subdirectory(findstr) add_subdirectory(fontview) diff --git a/base/applications/cacls/CMakeLists.txt b/base/applications/cacls/CMakeLists.txt index cfb03ed2377..b1fac988e48 100644 --- a/base/applications/cacls/CMakeLists.txt +++ b/base/applications/cacls/CMakeLists.txt @@ -4,11 +4,7 @@ set_rc_compiler() list(APPEND SOURCE cacls.c cacls.rc) -add_executable(cacls - ${CMAKE_CURRENT_BINARY_DIR}/cacls_precomp.h.gch - ${SOURCE}) - -add_pch(cacls ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(cacls ${SOURCE}) set_module_type(cacls win32cui) add_importlibs(cacls advapi32 user32 shell32 msvcrt kernel32) diff --git a/base/applications/cacls/lang/bg-BG.rc b/base/applications/cacls/lang/bg-BG.rc index 6e950e5e354..6bf72e5aa48 100644 --- a/base/applications/cacls/lang/bg-BG.rc +++ b/base/applications/cacls/lang/bg-BG.rc @@ -1,37 +1,39 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, " (ACL ) \n\n\ -CACLS _ [/T] [/E] [/C] [/G : [...]] [/R [...]]\n\ - [/P : [...]] [/D [...]]\n\ - _ .\n\ - /T \n\ - . \n\ - /E , .\n\ - /C .\n\ - /G : .\n\ - : R \n\ - W \n\ - C ()\n\ - F \n\ - /R Revoke specified user's access rights (only valid with /E).\n\ - /P : .\n\ - : N \n\ - R \n\ - W \n\ - C ()\n\ - F \n\ - /D .\n\ - (* ?) ..\n\n\ -:\n\ - CI .\n\ - ACE .\n\ - OI ().\n\ - ACE .\n\ +IDS_HELP, "Показва или изменя списъците за достъп (ACL или СзД) до файловете\n\n\ +CACLS файлово_име [/T] [/E] [/C] [/G потребител:права [...]] [/R потребител [...]]\n\ + [/P потребител:права [...]] [/D име [...]]\n\ + файлово_име Показване на СзД.\n\ + /T Променя СзД на указаните файлове в\n\ + текущата папка и всички подпапки. \n\ + /E Промяна на СзД, вместо замяна.\n\ + /C Продължаване поради грешки поради отказ на достъп.\n\ + /G потребител:права Предоставяне на права на достъп на указания потребител.\n\ + Правата мога да са: R Четене\n\ + W Писане\n\ + C Промяна (писане)\n\ + F Всички права\n\ + /R потребител Revoke specified user's access rights (only valid with /E).\n\ + /P потребител:права Замяна на правата за достъп на потребителя.\n\ + Правата могат да са: N Без право на достъп\n\ + R Четене\n\ + W Писане\n\ + C Промяна (писане)\n\ + F Всички права \n\ + /D потребител Лишаване на потребител от достъп.\n\ +Могат да се използват заместващи знаци (* и ?) за указване на повече от един файл..\n\n\ +Съкращения:\n\ + CI – Онаследяване на съдържатели.\n\ + ACE ще бъде онаследен от папките.\n\ + OI – Онаследяване на предмети (обекти).\n\ + ACE ще бъде наследен от файловете.\n\ IO - Inherit Only.\n\ - ACE / .\n" + Няма да се прилага ACE върху текущия файл/ папка.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -43,7 +45,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(DENY)" -IDS_SPECIAL_ACCESS, "( :)" +IDS_SPECIAL_ACCESS, "(извънредни права:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/ca-ES.rc b/base/applications/cacls/lang/ca-ES.rc index 7b492ff5032..39158abc0e3 100644 --- a/base/applications/cacls/lang/ca-ES.rc +++ b/base/applications/cacls/lang/ca-ES.rc @@ -1,38 +1,40 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton June, 2011 */ + LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "Mostra o modifica la llista de control d'accs (ACLs) dels fitxers\n\n\ +IDS_HELP, "Mostra o modifica la llista de control d'accés (ACLs) dels fitxers\n\n\ CACLS fitxer [/T] [/E] [/C] [/G user:perm [...]] [/R usuari [...]]\n\ [/P user:perm [...]] [/D usuari [...]]\n\ fitxer Mostra ACLs.\n\ /T Canvia el ACLs dels fitxers especificats al\n\ directori actual i tots els seus subdirectoris.\n\ /E Edita ACL en comptes de substituir-lo.\n\ - /C Continua en cas d'error d'accs.\n\ - /G user:perm Assegura els drets d'accs especificats per al usuari.\n\ + /C Continua en cas d'error d'accés.\n\ + /G user:perm Assegura els drets d'accés especificats per al usuari.\n\ perm pot ser: R Lectura\n\ W Escriptura\n\ - C Modificaci (Escriptura)\n\ + C Modificació (Escriptura)\n\ F Control total\n\ - /R usuari Revoca els drets d'accs especificats per al usuari(noms vlid amb /E).\n\ - /P user:perm Canvia els drets d'accs especificats per al usuari.\n\ + /R usuari Revoca els drets d'accés especificats per al usuari(només vàlid amb /E).\n\ + /P user:perm Canvia els drets d'accés especificats per al usuari.\n\ perm pot ser: N Cap\n\ R Lectura\n\ W Escriptura\n\ - C Modificaci (Escriptura)\n\ + C Modificació (Escriptura)\n\ F Control total\n\ - /D usuari Denega els drets d'accs especificats per al usuari.\n\ -Es possible utilitzar comodins per especificar ms d'un fitxer per comanda.\n\ -Podeu especificar ms d'un usuari per comanda.\n\n\ + /D usuari Denega els drets d'accés especificats per al usuari.\n\ +Es possible utilitzar comodins per especificar més d'un fitxer per comanda.\n\ +Podeu especificar més d'un usuari per comanda.\n\n\ Abreviacions:\n\ CI - Container heredat.\n\ - ACE s'heredar per directoris.\n\ + ACE s'heredarà per directoris.\n\ OI - Objecte heredat.\n\ - ACE s'heredar per fitxers.\n\ - IO - Noms heredat.\n\ - ACE no s'aplicar al directori/fitxer actual.\n" + ACE s'heredarà per fitxers.\n\ + IO - Només heredat.\n\ + ACE no s'aplicarà al directori/fitxer actual.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -44,7 +46,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(DENEGAT)" -IDS_SPECIAL_ACCESS, "(accs especial:)" +IDS_SPECIAL_ACCESS, "(accés especial:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/cs-CZ.rc b/base/applications/cacls/lang/cs-CZ.rc index 6d92a72470a..974524ab6c2 100644 --- a/base/applications/cacls/lang/cs-CZ.rc +++ b/base/applications/cacls/lang/cs-CZ.rc @@ -1,6 +1,8 @@ -/* FILE: applications/cacls/lang/cs-CZ.rc - * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) - * UPDATED: 2008-02-29 +/* + * FILE: base/applications/cacls/lang/cs-CZ.rc + * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) + * UPDATED: 2008-02-29 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT @@ -8,37 +10,37 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "Zobraz nebo zmn seznamy zen pstupu (ACL) k souborm\n\n\ -CACLS nzvu [/T] [/E] [/C] [/G uivatel:oprvnn [...]] [/R uivatel [...]]\n\ - [/P uivatel:oprvnn [...]] [/D uivatel [...]]\n\ - nzvu_soubori Zobraz ACL.\n\ - /T Zmn ACL urench soubor\n\ - v aktulnm adresi a vech podadresch.\n\ - /E Msto nahrazen ACL jej uprav.\n\ - /C Pi chybch odmtnut pstupu pokrauje.\n\ - /G uivatel:oprvnn Udl urenmu uivateli pstupov oprvnn.\n\ - Oprvnn me bt: R st\n\ +IDS_HELP, "Zobrazí nebo zmìní seznamy øízení pøístupu (ACL) k souborùm\n\n\ +CACLS názvu [/T] [/E] [/C] [/G uživatel:oprávnìní [...]] [/R uživatel [...]]\n\ + [/P uživatel:oprávnìní [...]] [/D uživatel [...]]\n\ + názvu_soubori Zobrazí ACL.\n\ + /T Zmìní ACL urèených souborù\n\ + v aktuálním adresáøi a všech podadresáøích.\n\ + /E Místo nahrazení ACL jej upraví.\n\ + /C Pøi chybách odmítnutí pøístupu pokraèuje.\n\ + /G uživatel:oprávnìní Udìlí urèenému uživateli pøístupová oprávnìní.\n\ + Oprávnìní mùže být: R Èíst\n\ W Zapisovat\n\ - C Mnit (zapisovat)\n\ - F pln zen\n\ - /R uivatel Odvol pstupov oprvnn urenho uivatele\n\ - (platn pouze s parametrem /E).\n\ - /P uivatel:oprvnn Nahrad pstupov oprvnn urenho uivatele.\n\ - Oprvnn me bt: N dn\n\ - R st\n\ + C Mìnit (zapisovat)\n\ + F Úplné øízení\n\ + /R uživatel Odvolá pøístupová oprávnìní urèeného uživatele\n\ + (platné pouze s parametrem /E).\n\ + /P uživatel:oprávnìní Nahradí pøístupová oprávnìní urèeného uživatele.\n\ + Oprávnìní mùže být: N Žádné\n\ + R Èíst\n\ W Zapisovat\n\ - C Mnit (zapisovat)\n\ - F pln zen\n\ - /D uivatel Odepe pstup urenmu uivateli.\n\ -Pro uren vce ne jednoho souboru mohou bt v pkazu pouity zstupn znaky.\n\ -V pkazu mete urit vce ne jednoho uivatele.\n\n\ + C Mìnit (zapisovat)\n\ + F Úplné øízení\n\ + /D uživatel Odepøe pøístup urèenému uživateli.\n\ +Pro urèení více než jednoho souboru mohou být v pøíkazu použity zástupné znaky.\n\ +V pøíkazu mùžete urèit více než jednoho uživatele.\n\n\ Zkratky:\n\ - CI - Ddit kontejner.\n\ - ACE bude ddno adresi.\n\ - OI - Ddit objekt.\n\ - ACE bude ddno soubory.\n\ - IO - Pouze ddit.\n\ - ACE se nepouije na aktuln adres i soubor.\n" + CI - Dìdit kontejner.\n\ + ACE bude dìdìno adresáøi.\n\ + OI - Dìdit objekt.\n\ + ACE bude dìdìno soubory.\n\ + IO - Pouze dìdit.\n\ + ACE se nepoužije na aktuální adresáø èi soubor.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -50,7 +52,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(DENY)" -IDS_SPECIAL_ACCESS, "(zvltn pstup:)" +IDS_SPECIAL_ACCESS, "(zvláštní pøístup:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/da-DA.rc b/base/applications/cacls/lang/da-DA.rc index 7663dae602d..4e53f85c574 100644 --- a/base/applications/cacls/lang/da-DA.rc +++ b/base/applications/cacls/lang/da-DA.rc @@ -1,5 +1,6 @@ /* - * German language file by Daniel Reimer 2006-06-15 + * Danish language file by Daniel Reimer 2006-06-15 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_DANISH, SUBLANG_DEFAULT @@ -7,28 +8,28 @@ LANGUAGE LANG_DANISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "ndringer fil-ACL'er (Access Control List) eller viser dem.\n\n\ +IDS_HELP, "Ændringer fil-ACL'er (Access Control List) eller viser dem.\n\n\ CACLS Filenavn [/T] [/E] [/C] [/G Bruger:Adgang] [/R Bruger [...]]\n\ [/P Bruger:Adgang [...]] [/D Bruger [...]]\n\ Filnavn Viser ACL'er for angivet filer.\n\ - /T ndre ACL'er for angivene filer i mapper\n\ + /T Ændre ACL'er for angivene filer i mapper\n\ og alle undermapper.\n\ /E Bearbejde ACL i stedet for at erstatte.\n\ /C Forandre ACL'er ved adgangfejl videre.\n\ /G Bruger:Adgang Tillade angivene adgangsformer.\n\ - Adgang kan vre: R lse\n\ + Adgang kan være: R læse\n\ W skrive\n\ - C ndre (At skrive)\n\ + C ændre (At skrive)\n\ F Fuld adgang\n\ /R Bruger Fjerne adgangsrette af brugeren (kun gyldig med /E).\n\ /P Bruger:Adgang Erstatte adgangsretterne af brugeren.\n\ - Adgang kan vre: N Ingen\n\ - R Lse\n\ + Adgang kan være: N Ingen\n\ + R Læse\n\ W Skrive\n\ - C ndre (Skrive)\n\ + C ændre (Skrive)\n\ F fuld adgang\n\ /D Bruger Forbyde adgang for brugeren.\n\ -Mellemrum(Wildcards) bliver understttet i filenavn.\n\ +Mellemrum(Wildcards) bliver understøttet i filenavn.\n\ Man kan angive flere bruger i en kommando.\n\n\ Forkortninger:\n\ CI - Container overtagelse.\n\ diff --git a/base/applications/cacls/lang/de-DE.rc b/base/applications/cacls/lang/de-DE.rc index 8efe17418db..66a60e58eb5 100644 --- a/base/applications/cacls/lang/de-DE.rc +++ b/base/applications/cacls/lang/de-DE.rc @@ -1,5 +1,6 @@ /* * German language file by Daniel Reimer 2006-06-15 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL @@ -7,30 +8,30 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "ndert Datei-ACLs (Access Control List) oder zeigt sie an.\n\n\ +IDS_HELP, "Ändert Datei-ACLs (Access Control List) oder zeigt sie an.\n\n\ CACLS Dateiname [/T] [/E] [/C] [/G Benutzer:Zugriff] [/R Benutzer [...]]\n\ [/P Benutzer:Zugriff [...]] [/D Benutzer [...]]\n\ - Dateiname ACLs fr angegebene Datei anzeigen.\n\ + Dateiname ACLs für angegebene Datei anzeigen.\n\ /T ACLs der angegebenen Datei im aktuellen Verzeichnis\n\ - und allen Unterverzeichnissen ndern.\n\ + und allen Unterverzeichnissen ändern.\n\ /E ACL bearbeiten anstatt sie zu ersetzen.\n\ - /C ndern der ACLs bei Zugriffsverletzung fortsetzen.\n\ + /C Ändern der ACLs bei Zugriffsverletzung fortsetzen.\n\ /G Benutzer:Zugriff Angegebene Zugriffsarten zulassen.\n\ Zugriff kann sein: R Lesen\n\ W Schreiben\n\ - C ndern (Schreiben)\n\ + C Ändern (Schreiben)\n\ F Vollzugriff\n\ - /R Benutzer Zugriffsrechte des Benutzers aufheben (gltig mit /E).\n\ + /R Benutzer Zugriffsrechte des Benutzers aufheben (gültig mit /E).\n\ /P Benutzer:Zugriff Zugriffsrechte des Benutzers ersetzen.\n\ Zugriff kann sein: N Kein\n\ R Lesen\n\ W Schreiben\n\ - C ndern (Schreiben)\n\ + C Ändern (Schreiben)\n\ F Vollzugriff\n\ - /D Benutzer Zugriff fr Benutzer verweigern.\n\ -Platzhalterzeichen (Wildcards) werden fr Dateiname untersttzt.\n\ -Mehrere Benutzer knnen in einem Befehl angegeben werden.\n\n\ -Abkrzungen:\n\ + /D Benutzer Zugriff für Benutzer verweigern.\n\ +Platzhalterzeichen (Wildcards) werden für Dateiname unterstützt.\n\ +Mehrere Benutzer können in einem Befehl angegeben werden.\n\n\ +Abkürzungen:\n\ CI - Containervererbung.\n\ Der ACE-Eintrag wird von Verzeichnissen geerbt.\n\ OI - Objektvererbung.\n\ diff --git a/base/applications/cacls/lang/el-GR.rc b/base/applications/cacls/lang/el-GR.rc index 69a2196e502..11122ef032f 100644 --- a/base/applications/cacls/lang/el-GR.rc +++ b/base/applications/cacls/lang/el-GR.rc @@ -1,38 +1,40 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_GREEK, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, " access control lists (ACLs) \n\n\ -CACLS _ [/T] [/E] [/C] [/G : [...]] [/R [...]]\n\ - [/P : [...]] [/D [...]]\n\ - filename ACLs.\n\ - /T ACLs \n\ - .\n\ - /E ACL .n\ - /C .\n\ - /G : .\n\ - : R \n\ - W \n\ - C ()\n\ - F \n\ +IDS_HELP, "Εμφανίζει ή τροποποιεί τις access control lists (ACLs) των αρχείων\n\n\ +CACLS όνομα_αρχείου [/T] [/E] [/C] [/G χρήστης:άδειες [...]] [/R χρήστης [...]]\n\ + [/P χρήστης:άδειες [...]] [/D χρήστης [...]]\n\ + filename Εμφανίζει τις ACLs.\n\ + /T Αλλάζει τις ACLs των συγκκριμένων αρχείων στο\n\ + συγκεκριμένο φάκελο και σε όλους τους υποφακέλους.\n\ + /E Επεξεργάζεται την ACL αντίνα την αντικαταστήσει.n\ + /C Συνεχίζει και σε περίπτωση σφάλματος μη πρόσβασης.\n\ + /G χρήστης:άδειες Δίνει δικαιώματα στο χρήστη.\n\ + Οι άδειες μπορεί αν είναι: R Ανάγνωση\n\ + W Εγγραφή\n\ + C Αλαλγή (εγγραφή)\n\ + F Πλήρης έλεγχος\n\ /R user Revoke specified user's access rights (only valid with /E).\n\ - /P : .\n\ - : N \n\ - R \n\ - W \n\ - C ()\n\ - F \n\ - /D user .\n\ - Wildcards .\n\ - .\n\n\ + /P χρήστης:άδειες Αντικατάσταση των δικαιωμάτων του χρήστη.\n\ + Οι άδειες μπορεί να είναι: N Καμία\n\ + R Ανάγνωση\n\ + W Εγγραφή\n\ + C Αλλαγή (εγγραφή)\n\ + F Πλήρης έλεγχος\n\ + /D user Αποτροπή χρήστη από προσπέλαση.\n\ +Τα Wildcards μπορούν να χρησιμοποιηθούν για να προσδιορίσουν παραπαπάνω από ένα αρχεία στην εντολή.\n\ +Μπορείτε να προσδιορίσετε παρπαάνω από έναν χρήστη στην εντολή.\n\n\ Abbreviations:\n\ CI - Container Inherit.\n\ The ACE will be inherited by directories.\n\ OI - Object Inherit.\n\ The ACE will be inherited by files.\n\ IO - Inherit Only.\n\ - ACE /.\n" + Το ACE δεν υφίσταται για αυτό το αρχείο/κατάλογο.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -44,7 +46,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(DENY)" -IDS_SPECIAL_ACCESS, "( :)" +IDS_SPECIAL_ACCESS, "(ειδική άδεια:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/es-ES.rc b/base/applications/cacls/lang/es-ES.rc index 37ff0bb2763..f48fa9e410e 100644 --- a/base/applications/cacls/lang/es-ES.rc +++ b/base/applications/cacls/lang/es-ES.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE @@ -10,29 +12,29 @@ CACLS archivo [/T] [/E] [/C] [/G user:perm [...]] [/R usuario [...]]\n\ /T Cambia ACLs de los archivos especificados en\n\ el directorio actual y todos sus subdirectorios.\n\ /E Edita la ACL en lugar de reemplazarla.\n\ - /C Contina en caso de errores de acceso.\n\ + /C Continúa en caso de errores de acceso.\n\ /G user:perm Da los derechos de acceso al usuario especificado.\n\ Perm puede ser: R Lectura\n\ W Escritura\n\ - C Modificacin (Escritura)\n\ + C Modificación (Escritura)\n\ F Control total\n\ - /R usuario Revoca los derechos de acceso al usuario especificado (unicamente vlido con /E).\n\ + /R usuario Revoca los derechos de acceso al usuario especificado (unicamente válido con /E).\n\ /P user:perm Reemplaza los derechos de acceso del usuario especificado.\n\ Perm puede ser: N Nada\n\ R Lectura\n\ W Escritura\n\ - C Modificacin (Escritura)\n\ + C Modificación (Escritura)\n\ F Control total\n\ /D usuario Revoca el acceso al usuario especificado.\n\ -Es posible usar comodines para especificar ms de un archivo por comando.\n\ -Se puede especificar ms de un usuario por comando.\n\n\ +Es posible usar comodines para especificar más de un archivo por comando.\n\ +Se puede especificar más de un usuario por comando.\n\n\ Abreviaciones:\n\ CI - Herencia del contenedor.\n\ - ACE ser heredado a los directorios.\n\ + ACE será heredado a los directorios.\n\ OI - Herencia del objeto.\n\ ACE sera heredado a los archivos.\n\ IO - Herencia sola.\n\ - ACE no se aplicar al archivo/directorio actual.\n" + ACE no se aplicará al archivo/directorio actual.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/lang/fr-FR.rc b/base/applications/cacls/lang/fr-FR.rc index 114acca4adb..0668af211f4 100644 --- a/base/applications/cacls/lang/fr-FR.rc +++ b/base/applications/cacls/lang/fr-FR.rc @@ -1,38 +1,40 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "Affiche ou change la liste des contrles d'accs (ACLs) de fichiers\n\n\ +IDS_HELP, "Affiche ou change la liste des contrôles d'accès (ACLs) de fichiers\n\n\ CACLS nomfichier [/T] [/E] [/C] [/G user:perm [...]] [/R user [...]]\n\ [/P user:perm [...]] [/D user [...]]\n\ nomfichier Affiche les ACLs du fichier.\n\ - /T Change les ACLs des fichiers spcifis dans\n\ - le rpertoire en cours et tous les sous-rpertoires.\n\ - /E dite les ACL au lieu de les remplacer.\n\ - /C Continuer en cas de refus d'accs.\n\ - /G user:perm Accorder des droits d'accs l'utilisateur spcifi.\n\ + /T Change les ACLs des fichiers spécifiés dans\n\ + le répertoire en cours et tous les sous-répertoires.\n\ + /E Édite les ACL au lieu de les remplacer.\n\ + /C Continuer en cas de refus d'accès.\n\ + /G user:perm Accorder des droits d'accès à l'utilisateur spécifié.\n\ Perm peut valoir : R Lecture\n\ - W criture\n\ - C Modification (criture)\n\ - F Contrle total\n\ - /R user Supprime les droits d'accs de l'utilisateur spcifi (valide uniquement avec /E).\n\ - /P user:perm Remplace les droits d'accs de l'utilisateur spcifi.\n\ + W Écriture\n\ + C Modification (Écriture)\n\ + F Contrôle total\n\ + /R user Supprime les droits d'accès de l'utilisateur spécifié (valide uniquement avec /E).\n\ + /P user:perm Remplace les droits d'accès de l'utilisateur spécifié.\n\ Perm peut valoir : N Aucun \n\ R Lecture\n\ - W criture\n\ - C Modification (criture)\n\ - F Contrle total\n\ - /D user Interdit l'accs l'utilisateur spcifi.\n\ -Il est possible d'utiliser des caractres joker pour slectionner plus d'un fichier avec une commande.\n\ -Il est possible de spcifier plus d'un utilisateur dans une commande.\n\n\ -Abrviations:\n\ - CI - Hritage du conteneur.\n\ - Le ACE sera appliqu aux rpertoires.\n\ - OI - Hritage de l'objet.\n\ - Le ACE sera appliqu aux fichiers.\n\ - IO - Hritage seul.\n\ - Le ACE ne sera pas appliqu au fichier/rpertoire actuel.\n" + W Écriture\n\ + C Modification (Écriture)\n\ + F Contrôle total\n\ + /D user Interdit l'accès à l'utilisateur spécifié.\n\ +Il est possible d'utiliser des caractères joker pour sélectionner plus d'un fichier avec une commande.\n\ +Il est possible de spécifier plus d'un utilisateur dans une commande.\n\n\ +Abréviations:\n\ + CI - Héritage du conteneur.\n\ + Le ACE sera appliqué aux répertoires.\n\ + OI - Héritage de l'objet.\n\ + Le ACE sera appliqué aux fichiers.\n\ + IO - Héritage seul.\n\ + Le ACE ne sera pas appliqué au fichier/répertoire actuel.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -44,7 +46,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(REFUS)" -IDS_SPECIAL_ACCESS, "(Accs Spcial:)" +IDS_SPECIAL_ACCESS, "(Accès Spécial:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/it-IT.rc b/base/applications/cacls/lang/it-IT.rc index c47e99f9688..0f8c4590098 100644 --- a/base/applications/cacls/lang/it-IT.rc +++ b/base/applications/cacls/lang/it-IT.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE @@ -26,14 +28,14 @@ CACLS nomefile [/T] [/E] [/C] [/G utente:perm [...]] [/R utente [...]]\n\ F Controllo completo\n\ /D utente Nega l'accesso all'utente indicato.\n\ I caratteri jolly possono essere usati per indicare piu' di un file in un comando.\n\ -Si pu indicare piu' di un utente in un comando.\n\n\ +Si può indicare piu' di un utente in un comando.\n\n\ Abbreviazioni:\n\ CI - Contenitore eredita.\n\ - ACE verr ereditato dalle cartelle.\n\ + ACE verrà ereditato dalle cartelle.\n\ OI - Oggetto eredita.\n\ - ACE verr ereditato dai file.\n\ + ACE verrà ereditato dai file.\n\ IO - Solo eredi.\n\ - ACE non applicato ai file/cartelle correnti.\n" + ACE non è applicato ai file/cartelle correnti.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/lang/ja-JP.rc b/base/applications/cacls/lang/ja-JP.rc index 3816fe4d94f..4fc03e13e35 100644 --- a/base/applications/cacls/lang/ja-JP.rc +++ b/base/applications/cacls/lang/ja-JP.rc @@ -1,42 +1,44 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "t@C̃ANZX䃊Xg(ACL) \\܂͕ύX܂B\n\n\ -CACLS t@C [/T] [/E] [/C] [/G [U[:ANZX]\n\ - [/R [U[ [...]] [/P [U[:ANZX [...]]\n\ - [/D [U[ [...]]\n\ - t@C ACL \\܂B\n\ - /T ݂̃fBNgƂׂẴTufBNgɂ\n\ - w肳ꂽt@C ACL ύX܂B\n\ - /E ACL uɁAACL ҏW܂B\n\ - /C ANZXۃG[𖳎āAACL ̕ύX𑱍s܂B\n\ - /G [U[:ANZX\n\ - w肳ꂽ[U[ɃANZX^܂B\n\ - ANZX: R ǂݎ\n\ - W \n\ - C ύX ()\n\ - F t Rg[\n\ - /R [U[ w肳ꂽ[U[̃ANZX܂B\n\ - (/E IvVƋɎgp)B\n\ - /P [U[:ANZX\n\ - w肳ꂽ[U[̃ANZXu܂B\n\ - ANZX: N Ȃ\n\ - W \n\ - R ǂݎ\n\ - C ύX ()\n\ - F t Rg[\n\ - /D [U[ w肳ꂽ[U[̃ANZXۂ܂B\n\ -̃t@Cw肷ɂ́AChJ[hgpł܂B\n\ -̃[U[wł܂B\n\n\ -ȗ`:\n\ - CI - ReipB\n\ - ACE ̓fBNgɌp܂B\n\ - OI - IuWFNgpB\n\ - ACE ̓t@CɌp܂B\n\ - IO - p̂݁B\n\ - ACE ݂͌̃t@C/fBNgɓKp܂B\n" +IDS_HELP, "ファイルのアクセス制御リスト(ACL) を表\示または変更します。\n\n\ +CACLS ファイル名 [/T] [/E] [/C] [/G ユーザー名:アクセス権]\n\ + [/R ユーザー名 [...]] [/P ユーザー名:アクセス権 [...]]\n\ + [/D ユーザー名 [...]]\n\ + ファイル名 ACL を表\示します。\n\ + /T 現在のディレクトリとすべてのサブディレクトリにある\n\ + 指定されたファイルの ACL を変更します。\n\ + /E ACL を置き換えずに、ACL を編集します。\n\ + /C アクセス拒否エラーを無視して、ACL の変更を続行します。\n\ + /G ユーザー名:アクセス権\n\ + 指定されたユーザーにアクセス権を与えます。\n\ + アクセス権: R 読み取り\n\ + W 書き込み\n\ + C 変更 (書き込み)\n\ + F フル コントロール\n\ + /R ユーザー名 指定されたユーザーのアクセス権を失効させます。\n\ + (/E オプションと共に使用)。\n\ + /P ユーザー名:アクセス権\n\ + 指定されたユーザーのアクセス権を置き換えます。\n\ + アクセス権: N なし\n\ + W 書き込み\n\ + R 読み取り\n\ + C 変更 (書き込み)\n\ + F フル コントロール\n\ + /D ユーザー名 指定されたユーザーのアクセスを拒否します。\n\ +複数のファイルを指定するには、ワイルドカードを使用できます。\n\ +複数のユーザーを指定できます。\n\n\ +省略形:\n\ + CI - コンテナ継承。\n\ + ACE はディレクトリに継承されます。\n\ + OI - オブジェクト継承。\n\ + ACE はファイルに継承されます。\n\ + IO - 継承のみ。\n\ + ACE は現在のファイル/ディレクトリに適用されません。\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/lang/ko-KR.rc b/base/applications/cacls/lang/ko-KR.rc index f8abfcecd54..abb1aff4134 100644 --- a/base/applications/cacls/lang/ko-KR.rc +++ b/base/applications/cacls/lang/ko-KR.rc @@ -1,41 +1,43 @@ /* - *Korean translation by manatails007(www.manatails007.org) + * Korean translation by manatails007 (www.manatails007.org) + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "׼ Ʈ Ʈ(ACLs), \n\n\ -CACLS ϸ [/T] [/E] [/C] [/G user:perm [...]] [/R user [...]]\n\ +IDS_HELP, "액세스 컨트롤 리스트(ACLs)보기, 수정\n\n\ +CACLS 파일명 [/T] [/E] [/C] [/G user:perm [...]] [/R user [...]]\n\ [/P user:perm [...]] [/D user [...]]\n\ - ϸ ACL ǥ\n\ - /T ACL ü\n\ - 丮 丮 \n\ - /E üϴ ACL \n\ - /C ߻ \n\ - /G user:perm ׼ ֱ\n\ - Perm : R б\n\ - W \n\ - C \n\ - F \n\ - /R user (/E ).\n\ - /P user:perm ü\n\ - Perm : N \n\ - R б\n\ - W \n\ - C ()\n\ - F \n\ - /D user ׼ \n\ -ϳ ̻ ϵī \n\ - 밡\n\n\ -Ű:\n\ + 파일명 ACL 표시\n\ + /T 파일의 ACL 대체\n\ + 현 디렉토리와 하위 디렉토리까지 포함\n\ + /E 대체하는 대신 ACL 수정\n\ + /C 권한 없음 에러 발생시 무시\n\ + /G user:perm 유저에게 액세스 권한 주기\n\ + Perm 은: R 읽기전용\n\ + W 쓰기\n\ + C 수정\n\ + F 모든 권한\n\ + /R user 유저의 권한 뺏기 (/E와 같이 사용).\n\ + /P user:perm 권한 대체\n\ + Perm 은: N 없음\n\ + R 읽기\n\ + W 쓰기\n\ + C 수정(쓰기)\n\ + F 모든권한\n\ + /D user 액세스 제한\n\ +하나 이상의 파일을 열기 위해 와일드카드 사용 가능\n\ +복수유저 동시 사용가능\n\n\ +단축키:\n\ CI - Container Inherit.\n\ - ACE 丮 \n\ + ACE를 디렉토리에 적용\n\ OI - Object Inherit.\n\ - ACE Ͽ \n\ + ACE를 파일에 적용\n\ IO - Inherit Only.\n\ - ACE \n" + ACE적용 안함\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/lang/no-NO.rc b/base/applications/cacls/lang/no-NO.rc index 9c5263d3ac1..b8a96aad0ee 100644 --- a/base/applications/cacls/lang/no-NO.rc +++ b/base/applications/cacls/lang/no-NO.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE @@ -8,10 +10,10 @@ CACLS filnavn [/T] [/E] [/C] [/G bruker:perm [...]] [/R user [...]]\n\ [/P bruker:perm [...]] [/D bruker [...]]\n\ filnavn Viser ACL.\n\ /T Endrer ACL av spesifiserte filer i\n\ - nvrende katalog og alle under-mapper.\n\ + nåværende katalog og alle under-mapper.\n\ /E Rediger ACL isteden for erstatte det.\n\ - /C Fortsett p tilgang nektet feiler.\n\ - /G user:perm Innrmme spesifiert bruker tilgang rettigheter.\n\ + /C Fortsett på tilgang nektet feiler.\n\ + /G user:perm Innrømme spesifiert bruker tilgang rettigheter.\n\ Perm kan bli: L Les\n\ S Skriv\n\ E Endre (skriv)\n\ @@ -23,8 +25,8 @@ CACLS filnavn [/T] [/E] [/C] [/G bruker:perm [...]] [/R user [...]]\n\ S Skrive\n\ E Endre (skriv)\n\ F Full kontroll\n\ - /D bruker Avsl spesifisert bruker tilgang.\n\ -Wildcards kan bli brukt for spesifisere mere enn en fil i en kommando.\n\ + /D bruker Avslå spesifisert bruker tilgang.\n\ +Wildcards kan bli brukt for å spesifisere mere enn en fil i en kommando.\n\ Du kan spesifisere mere enn en bruker i en kommando.\n\n\ Forkortelse:\n\ CI - Container Inherit.\n\ @@ -32,7 +34,7 @@ Forkortelse:\n\ OI - Object Inherit.\n\ ACE will be inherited by files.\n\ IO - Inherit Only.\n\ - ACE gjelder ikke til nvrende fil/katalog.\n" + ACE gjelder ikke til nåværende fil/katalog.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -47,24 +49,24 @@ IDS_DENY, "(NEKTE)" IDS_SPECIAL_ACCESS, "(spesiell tilgang:)" IDS_GENERIC_READ, "GENERISK_LESE" IDS_GENERIC_WRITE, "GENERISK_SKRIVE" -IDS_GENERIC_EXECUTE, "GENERISK_KJRE" +IDS_GENERIC_EXECUTE, "GENERISK_KJØRE" IDS_GENERIC_ALL, "GENERISK_ALT" -IDS_FILE_GENERIC_EXECUTE, "FIL_GENERISK_KJRE" +IDS_FILE_GENERIC_EXECUTE, "FIL_GENERISK_KJØRE" IDS_FILE_GENERIC_READ, "FIL_GENERISK_LESE" IDS_FILE_GENERIC_WRITE, "FIL_GENERISK_SKRIVE" IDS_FILE_READ_DATA, "FIL_LES_DATA" IDS_FILE_WRITE_DATA, "FIL_SKRIV_DATA" -IDS_FILE_APPEND_DATA, "FIL_TILFYE_DATA" +IDS_FILE_APPEND_DATA, "FIL_TILFØYE_DATA" IDS_FILE_READ_EA, "FIL_LESE_EA" IDS_FILE_WRITE_EA, "FIL_SKRIVE_EA" -IDS_FILE_EXECUTE, "FIL_KJRE" +IDS_FILE_EXECUTE, "FIL_KJØRE" IDS_FILE_DELETE_CHILD, "FIL_SLETT_BARN" IDS_FILE_READ_ATTRIBUTES, "FIL_LESE_ATTRIBUTTER" IDS_FILE_WRITE_ATTRIBUTES, "FIL_SKRIVE_ATTRIBUTTER" IDS_MAXIMUM_ALLOWED, "MAKSIMUM_TILATT" IDS_ACCESS_SYSTEM_SECURITY, "TILGANG_SYSTEM_SIKKERHET" IDS_SPECIFIC_RIGHTS_ALL, "SPESIFIKT_RETTIGHETER_ALT" -IDS_STANDARD_RIGHTS_REQUIRED, "STANDARD_RETTIGHETER_PBUDT" +IDS_STANDARD_RIGHTS_REQUIRED, "STANDARD_RETTIGHETER_PÅBUDT" IDS_SYNCHRONIZE, "SYNKRONISERE" IDS_WRITE_OWNER, "SKRIVE_EIER" IDS_WRITE_DAC, "SKRIVE_DAC" diff --git a/base/applications/cacls/lang/pl-PL.rc b/base/applications/cacls/lang/pl-PL.rc index 57adf1f71a6..7fce3d586f8 100644 --- a/base/applications/cacls/lang/pl-PL.rc +++ b/base/applications/cacls/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,38 +11,38 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "Poka lub modyfikuj list kontroli dostpu (Access Control List) plikw\n\n\ -CACLS nazwa pliku [/T] [/E] [/C] [/G uytkownik:dostp [...]] [/R uytkownik [...]]\n\ - [/P uytkownik:dostp [...]] [/D uytkownik [...]]\n\ - nazwa pliku Poka ACL.\n\ - /T Zmiana ACL okrelonych plikw w\n\ +IDS_HELP, "Pokaż lub modyfikuj listę kontroli dostępu (Access Control List) plików\n\n\ +CACLS nazwa pliku [/T] [/E] [/C] [/G użytkownik:dostęp [...]] [/R użytkownik [...]]\n\ + [/P użytkownik:dostęp [...]] [/D użytkownik [...]]\n\ + nazwa pliku Pokaż ACL.\n\ + /T Zmiana ACL określonych plików w\n\ aktualnym katalogu i wszystkich podkatalogach.\n\ - /E Umoliwia edycj listy ACL zamiast jej zamiany.\n\ - /C Kontynuuje mimo bdw braku dostpu.\n\ - /G uytkownik:dostp Przyznanie okrelonemu uytkownikowi prawa dostpu.\n\ - Dostp ma by tylko do:\n\ - R Odczytu\n\ - W Zapisu\n\ - C Zmiany (zapis)\n\ - F Peen dostp\n\ - /R uytkownik Odwoaj okrelonemu uytkownikowi prawa dostpu (wany tylko z /E).\n\ - /P uytkownik:dostp Zastp okrelonemu uytkownikowi prawa dostpu.\n\ - Dostp ma by tylko do:\n\ - N adnego\n\ - R Odczytu\n\ - W Zapisu\n\ - C Zmiany (zapis)\n\ - F Peen dostp\n\ - /D uytkownik Odbiera prawa dostpu okrelonemu uytkownikowi.\n\ -W jednym poleceniu mona okreli wiele plikw, uywajc symboli wieloznacznych.\n\ -W jednym poleceniu mona okreli wielu uytkownikw.\n\n\ -Skrty:\n\ + /E Umożliwia edycję listy ACL zamiast jej zamiany.\n\ + /C Kontynuuje mimo błędów braku dostępu.\n\ + /G użytkownik:dostęp Przyznaje określonemu użytkownikowi prawa dostępu.\n\ + Poziom dostęu:\n\ + R Odczyt\n\ + W Zapis\n\ + C Zmiana (zapis)\n\ + F Pełny dostęp\n\ + /R użytkownik Odwołuje prawa dostępu określonemu użytkownikowi (działa tylko z opcją /E).\n\ + /P użytkownik:dostęp Edytuje prawa dostępu określonego użytkownika.\n\ + Poziom dostępu:\n\ + N Brak\n\ + R Odczyt\n\ + W Zapis\n\ + C Zmiana (zapis)\n\ + F Pełny dostęp\n\ + /D użytkownik Odbiera prawa dostępu określonemu użytkownikowi.\n\ +W jednym poleceniu można edytować prawa dostępu do wielu plików, używając symboli wieloznacznych.\n\ +W jednym poleceniu można edytować prawa dostępu wielu użytkowników.\n\n\ +Skróty:\n\ CI - Dziedziczenie kontenera.\n\ - CI - ACE bdzie dziedziczony przez katalogi.\n\ + CI - ACE będzie dziedziczony przez katalogi.\n\ OI - Dziedziczenie obiektu.\n\ - ACE bdzie dziedziczony przez pliki.\n\ + ACE będzie dziedziczony przez pliki.\n\ IO - Tylko dziedziczenie.\n\ - ACE nie odnosi si do biecego pliku / katalogu.\n" + ACE nie odnosi się do bieżącego pliku / katalogu.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/lang/pt-BR.rc b/base/applications/cacls/lang/pt-BR.rc index 4e21b93c2e3..c518a1578d6 100644 --- a/base/applications/cacls/lang/pt-BR.rc +++ b/base/applications/cacls/lang/pt-BR.rc @@ -1,40 +1,42 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE BEGIN IDS_HELP, "Exibe ou modifica as listas de controle de acesso (ACLs) de arquivos\n\n\ -CACLS nome-arquivo [/T] [/E] [/C] [/G usurio:perm] [/R usurio [...]]\n\ - [/P usurio:perm [...]] [/D usurio [...]]\n\ +CACLS nome-arquivo [/T] [/E] [/C] [/G usuário:perm] [/R usuário [...]]\n\ + [/P usuário:perm [...]] [/D usuário [...]]\n\ nome-arquivo Exibe ACLs.\n\ /T Altera ACLs de arquivos especificados\n\ na pasta atual e em todas as subpastas.\n\ - /E Edita ACL em vez de substitu-la.\n\ + /E Edita ACL em vez de substituí-la.\n\ /C Continua ao encontrar erros de acesso negado.\n\ - /G usurio:perm Concede os direitos de acesso ao usurio especificado.\n\ + /G usuário:perm Concede os direitos de acesso ao usuário especificado.\n\ Perm pode ser: R Ler\n\ W Gravar\n\ C Alterar (gravar)\n\ F Controle total\n\ - /R usurio Revoga os direitos de acesso do usurio especificado\n\ - (vlido somente com /E).\n\ - /P usurio:perm Substitui os direitos de acesso do usurio especificado.\n\ + /R usuário Revoga os direitos de acesso do usuário especificado\n\ + (válido somente com /E).\n\ + /P usuário:perm Substitui os direitos de acesso do usuário especificado.\n\ Perm pode ser: N Nenhum\n\ R Ler\n\ W Gravar\n\ C Alterar (gravar)\n\ F Controle total\n\ - /D usurio Nega o acesso ao usurio especificado.\n\ + /D usuário Nega o acesso ao usuário especificado.\n\ Caracteres curinga podem ser usados para especificar mais de um arquivo\n\ em um comando.\n\ -Voc pode especificar mais de um usurio em um comando.\n\n\ -Abreviaes:\n\ - CI - Herana de recipiente.\n\ - O ACE ser herdado pelas pastas.\n\ - OI - Herana de objeto.\n\ - O ACE ser herdado pelos arquivos.\n\ - IO - Somente herana.\n\ - O ACE no se aplica ao arquivo/pasta atual.\n" +Você pode especificar mais de um usuário em um comando.\n\n\ +Abreviaçäes:\n\ + CI - Herança de recipiente.\n\ + O ACE será herdado pelas pastas.\n\ + OI - Herança de objeto.\n\ + O ACE será herdado pelos arquivos.\n\ + IO - Somente herança.\n\ + O ACE não se aplica ao arquivo/pasta atual.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/lang/ru-RU.rc b/base/applications/cacls/lang/ru-RU.rc index ac875ccd8ad..c15aa532d9d 100644 --- a/base/applications/cacls/lang/ru-RU.rc +++ b/base/applications/cacls/lang/ru-RU.rc @@ -3,37 +3,37 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, " (ACLs) \n\n\ -CACLS _ [/T] [/E] [/C] [/G : [...]] [/R [...]]\n\ - [/P :[...]] [/D [...]]\n\ - _ ACL.\n\ - /T ACL \n\ - .\n\ - /E ACL .\n\ - /C .\n\ - /G : .\n\ - : R \n\ - W \n\ - C ()\n\ - F \n\ - /R \n\ - ( /E).\n\ - /P : .\n\ - : N \n\ - R \n\ - W \n\ - C ()\n\ - F \n\ - /D .\n\ - .\n\ - .\n\n\ -:\n\ - CI - .\n\ - ACE .\n\ - OI - .\n\ - ACE .\n\ - IO - .\n\ - ACE /.\n" +IDS_HELP, "Отображает или изменяет списки доступа (ACLs) к файлам\n\n\ +CACLS имя_Файла [/T] [/E] [/C] [/G имя:право [...]] [/R имя [...]]\n\ + [/P имя:право[...]] [/D имя [...]]\n\ + имя_файла Вывод списков ACL.\n\ + /T Замена списков ACL для указанных файлов в текущем каталоге\n\ + и всех подкаталогах.\n\ + /E Редактирование списка ACL вместо его замены.\n\ + /C Продолжать при ошибках отказа доступа.\n\ + /G имя:право Предоставление указанному пользователю прав доступа.\n\ + Право может быть: R Чтение\n\ + W Запись\n\ + C Изменение (запись)\n\ + F Полный контроль\n\ + /R имя Отозвать права доступа для указанного пользователя\n\ + (верно только с /E).\n\ + /P имя:право Заменить права указанного пользователя.\n\ + Право может быть: N Нет доступа\n\ + R Чтение\n\ + W Запись\n\ + C Изменение (запись)\n\ + F Полный доступ\n\ + /D имя Запретить доступ для указанного пользователя.\n\ +В команде можно использовать шаблоны для обработки более одного файла.\n\ +В команде можно указывать более одного пользователя.\n\n\ +Сокращения:\n\ + CI - Наследование контейнерами.\n\ + ACE будет унаследован папками.\n\ + OI - Наследование объектами.\n\ + ACE будет унаследован файлами.\n\ + IO - Только наследованное.\n\ + ACE не будет применён к данному файлу/папке.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -45,7 +45,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(DENY)" -IDS_SPECIAL_ACCESS, "( :)" +IDS_SPECIAL_ACCESS, "(специальный доступ:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/sk-SK.rc b/base/applications/cacls/lang/sk-SK.rc index 0edb2175eac..a8d38467d23 100644 --- a/base/applications/cacls/lang/sk-SK.rc +++ b/base/applications/cacls/lang/sk-SK.rc @@ -1,44 +1,47 @@ -//Slovak language file by Mrio Kamr aka Kario (kario@szm.sk) 16-01-2008 +/* + * Slovak language file by Mário Kačmár aka Kario (kario@szm.sk) 16-01-2008 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) + */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "Zobraz alebo zmen zoznamy prstupovch prv (Access Control List) sborov.\n\n\ -CACLS nzov_sboru [/T] [/E] [/C] [/G pouvate:povolenia [...]]\n\ - [/R pouvate [...]] [/P pouvate:povolenia [...]]\n\ - [/D pouvate [...]]\n\ - nzov_sboru Zobraz zoznamy ACL.\n\ - /T Zmen zoznamy ACL pecifikovanch sborov\n\ - v aktulnom adresri a vo vetkch podadresroch.\n\ - /E Uprav zoznam ACL namiesto jeho nahradenia.\n\ - /C Pokraovanie pri chybch odmietnutia prstupu.\n\ - /G pouvate:povolenia\n\ - Udel pecifikovanmu pouvateovi prstupov prva.\n\ - Povolenia mu by: R tanie\n\ - W zpis\n\ - C zmena (zpis)\n\ - F pln prstup\n\ - /R pouvate Odoberie pecifikovanm pouvateom prstupov prva\n\ - (platn iba s prepnaom /E).\n\ - /P pouvate:povolenia\n\ - Nahrad pecifikovanm pouvateom prstupov prva.\n\ - Povolenia mu by: N iadne\n\ - R tanie\n\ - W zpis\n\ - C zmena (zpis)\n\ - F pln prstup\n\ - /D pouvate Odoprie pecifikovanmu pouvateovi prstup.\n\ -Nhradn znaky sa daj poui na pecifikovanie viacerch sborov v jednom\n\ -prkaze. Rovnako mete pecifikova aj viacerch pouvateov v prkaze.\n\n\ +IDS_HELP, "Zobrazí alebo zmení zoznamy prístupových práv (Access Control List) súborov.\n\n\ +CACLS názov_súboru [/T] [/E] [/C] [/G používateľ:povolenia [...]]\n\ + [/R používateľ [...]] [/P používateľ:povolenia [...]]\n\ + [/D používateľ [...]]\n\ + názov_súboru Zobrazí zoznamy ACL.\n\ + /T Zmení zoznamy ACL špecifikovaných súborov\n\ + v aktuálnom adresári a vo všetkých podadresároch.\n\ + /E Upraví zoznam ACL namiesto jeho nahradenia.\n\ + /C Pokračovanie pri chybách odmietnutia prístupu.\n\ + /G používateľ:povolenia\n\ + Udelí špecifikovanému používateľovi prístupové práva.\n\ + Povolenia môžu byť: R čítanie\n\ + W zápis\n\ + C zmena (zápis)\n\ + F úplný prístup\n\ + /R používateľ Odoberie špecifikovaným používateľom prístupové práva\n\ + (platné iba s prepínačom /E).\n\ + /P používateľ:povolenia\n\ + Nahradí špecifikovaným používateľom prístupové práva.\n\ + Povolenia môžu byť: N žiadne\n\ + R čítanie\n\ + W zápis\n\ + C zmena (zápis)\n\ + F úplný prístup\n\ + /D používateľ Odoprie špecifikovanému používateľovi prístup.\n\ +Náhradné znaky sa dajú použiť na špecifikovanie viacerých súborov v jednom\n\ +príkaze. Rovnako môžete špecifikovať aj viacerých používateľov v príkaze.\n\n\ Skratky:\n\ - CI - Kontajnerov dedenie.\n\ - ACE bude zdeden po adresroch.\n\ - OI - Objektov dedenie.\n\ - ACE bude zdeden po sboroch.\n\ - IO - Iba zdedi.\n\ - ACE sa neaplikuje na aktulny sbor alebo adresr.\n" + CI - Kontajnerové dedenie.\n\ + ACE bude zdedené po adresároch.\n\ + OI - Objektové dedenie.\n\ + ACE bude zdedené po súboroch.\n\ + IO - Iba zdediť.\n\ + ACE sa neaplikuje na aktuálny súbor alebo adresár.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -50,7 +53,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(DENY)" -IDS_SPECIAL_ACCESS, "(pecilny prstup:)" +IDS_SPECIAL_ACCESS, "(špeciálny prístup:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/sv-SE.rc b/base/applications/cacls/lang/sv-SE.rc index 1984661ff60..e84cd92e6ad 100644 --- a/base/applications/cacls/lang/sv-SE.rc +++ b/base/applications/cacls/lang/sv-SE.rc @@ -1,44 +1,45 @@ /* - * PROJECT: ReactOS RAPPS - * FILE: \base\applications\cacls\lang\sv-SE.rc - * PURPOSE: Swedish resource file - * Translation: Jaix Bly + * PROJECT: ReactOS CACLS + * FILE: base/applications/cacls/lang/sv-SE.rc + * PURPOSE: Swedish resource file + * TRANSLATOR: Jaix Bly */ + LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "Visar eller ndrar rttighets-kontroll-listor (ACL) av filer\n\n\ -CACLS filnamn [/T] [/E] [/C] [/G anvndare:rttighet [...]] [/R anvndare [...]]\n\ - [/P anvndare:rttighet [...]] [/D anvndare [...]]\n\ +IDS_HELP, "Visar eller ändrar rättighets-kontroll-listor (ACL) av filer\n\n\ +CACLS filnamn [/T] [/E] [/C] [/G användare:rättighet [...]] [/R användare [...]]\n\ + [/P användare:rättighet [...]] [/D användare [...]]\n\ filnamn Visar ACL.\n\ - /T ndrer ACL av specificerade filer i\n\ + /T Ändrer ACL av specificerade filer i\n\ nuvarende katalog och alla undermapper.\n\ - /E Redigera ACL istllet fr ersttta den.\n\ - /C Fortstt vid nekad tkomst fel.\n\ - /G anvndare:rttighet Medge specificerad anvndar rttigheter.\n\ - rttighet kan vara: L Ls\n\ + /E Redigera ACL istället för erstätta den.\n\ + /C Fortsätt vid nekad åtkomst fel.\n\ + /G användare:rättighet Medge specificerad användar rättigheter.\n\ + rättighet kan vara: L Läs\n\ S Skriv\n\ - E ndra (skriv)\n\ + E Ändra (skriv)\n\ F Full kontroll\n\ - /R anvndare terkkalla specificerad anvndarrttighet (endast giltig med /E).\n\ - /P anvndare:rttighet Ersttt specificerad anvndar rttighet.\n\ - rttighet kan vara: I Ingen\n\ - L Ls\n\ + /R användare Återkkalla specificerad användarrättighet (endast giltig med /E).\n\ + /P användare:rättighet Erstätt specificerad användar rättighet.\n\ + rättighet kan vara: I Ingen\n\ + L Läs\n\ S Skrive\n\ - E ndra (skriv)\n\ + E Ändra (skriv)\n\ F Full kontroll\n\ - /D anvndare Avsl specificerad anvndare tillgng.\n\ -Wildcards kan anvndas fr att specificere mer n en fil i ett kommando.\n\ -Du kan spesifisere mere enn en anvndare i en kommando.\n\n\ -Frkortningar:\n\ + /D användare Avslå specificerad användare tillgång.\n\ +Wildcards kan användas för att specificere mer än en fil i ett kommando.\n\ +Du kan spesifisere mere enn en användare i en kommando.\n\n\ +Förkortningar:\n\ CI - Container Inherit.\n\ - ACE kommer att bli rvd av mappar.\n\ + ACE kommer att bli ärvd av mappar.\n\ OI - Object Inherit.\n\ - ACE kommer att bli rvd av filer.\n\ + ACE kommer att bli ärvd av filer.\n\ IO - Inherit Only.\n\ - ACE gller inte nuvarende fil/katalog.\n" + ACE gäller inte nuvarende fil/katalog.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -50,31 +51,31 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(NEKA)" -IDS_SPECIAL_ACCESS, "(speciell rttighet:)" -IDS_GENERIC_READ, "GENERISK_LSNING" +IDS_SPECIAL_ACCESS, "(speciell rättighet:)" +IDS_GENERIC_READ, "GENERISK_LÄSNING" IDS_GENERIC_WRITE, "GENERISK_SKRIVNING" -IDS_GENERIC_EXECUTE, "GENERISK_KRNING" +IDS_GENERIC_EXECUTE, "GENERISK_KÖRNING" IDS_GENERIC_ALL, "GENERISK_ALLT" -IDS_FILE_GENERIC_EXECUTE, "FIL_GENERISK_KJRE" -IDS_FILE_GENERIC_READ, "FIL_GENERISK_LSNING" +IDS_FILE_GENERIC_EXECUTE, "FIL_GENERISK_KJØRE" +IDS_FILE_GENERIC_READ, "FIL_GENERISK_LÄSNING" IDS_FILE_GENERIC_WRITE, "FIL_GENERISK_SKRIVNING" -IDS_FILE_READ_DATA, "FIL_LS_DATA" +IDS_FILE_READ_DATA, "FIL_LÄS_DATA" IDS_FILE_WRITE_DATA, "FIL_SKRIV_DATA" -IDS_FILE_APPEND_DATA, "FIL_TILLFRA_DATA" -IDS_FILE_READ_EA, "FIL_LS_EA" +IDS_FILE_APPEND_DATA, "FIL_TILLFÖRA_DATA" +IDS_FILE_READ_EA, "FIL_LÄS_EA" IDS_FILE_WRITE_EA, "FIL_SKRIVA_EA" -IDS_FILE_EXECUTE, "FIL_KRA" +IDS_FILE_EXECUTE, "FIL_KÖRA" IDS_FILE_DELETE_CHILD, "FIL_RADERA_BARN" -IDS_FILE_READ_ATTRIBUTES, "FIL_LSA_ATTRIBUT" +IDS_FILE_READ_ATTRIBUTES, "FIL_LÄSA_ATTRIBUT" IDS_FILE_WRITE_ATTRIBUTES, "FIL_SKRIVA_ATTRIBUT" -IDS_MAXIMUM_ALLOWED, "MAXIMALT_TILLTNA" -IDS_ACCESS_SYSTEM_SECURITY, "TILLGNG_SYSTEM_SKERHET" -IDS_SPECIFIC_RIGHTS_ALL, "SPECIFIKA_RTTIGHETER_ALLT" -IDS_STANDARD_RIGHTS_REQUIRED, "STANDARD_RTTIGHETER_KRVS" +IDS_MAXIMUM_ALLOWED, "MAXIMALT_TILLÅTNA" +IDS_ACCESS_SYSTEM_SECURITY, "TILLGÅNG_SYSTEM_SÄKERHET" +IDS_SPECIFIC_RIGHTS_ALL, "SPECIFIKA_RÄTTIGHETER_ALLT" +IDS_STANDARD_RIGHTS_REQUIRED, "STANDARD_RÄTTIGHETER_KRÄVS" IDS_SYNCHRONIZE, "SYNKRONISERA" -IDS_WRITE_OWNER, "SKRIVA_GARE" +IDS_WRITE_OWNER, "SKRIVA_ÄGARE" IDS_WRITE_DAC, "SKRIVA_DAC" -IDS_READ_CONTROL, "LSE_KONTROLL" +IDS_READ_CONTROL, "LÄSE_KONTROLL" IDS_DELETE, "RADERA" -IDS_STANDARD_RIGHTS_ALL, "STANDARD_RTTIGHETER_ALLT" +IDS_STANDARD_RIGHTS_ALL, "STANDARD_RÄTTIGHETER_ALLT" END diff --git a/base/applications/cacls/lang/uk-UA.rc b/base/applications/cacls/lang/uk-UA.rc index 16d21c05240..7c447c378a2 100644 --- a/base/applications/cacls/lang/uk-UA.rc +++ b/base/applications/cacls/lang/uk-UA.rc @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS CACLS * LICENSE: GPL - See COPYING in the top level directory - * FILE: applications/cacls/lang/uk-UA.rc + * FILE: base/applications/cacls/lang/uk-UA.rc * PURPOSE: Ukraianian Language File for PROJECT * TRANSLATOR: Rostislav Zabolotny */ @@ -11,35 +11,35 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "³ (ACLs) \n\n\ -CACLS '_ [/T] [/E] [/C] [/G : [...]] [/R [...]]\n\ - [/P : [...]] [/D [...]]\n\ - '_ ACL.\n\ - /T ACL \n\ - .\n\ - /E ACL .\n\ - /C .\n\ - /G : .\n\ - : R \n\ - W \n\ - C ()\n\ - F \n\ - /R ( /E).\n\ - /P : .\n\ - : R \n\ - W \n\ - C ()\n\ - F \n\ - /D .\n\ - .\n\ - .\n\n\ -:\n\ - CI - .(Container Inherit)\n\ - ACE .\n\ - OI - ' .(Object Inherit)\n\ - ACE .\n\ - IO - ҳ .(Inherit Only)\n\ - ACE /.\n" +IDS_HELP, "Відображає чи модифікує списки доступу (ACLs) до файлів\n\n\ +CACLS ім'я_файлу [/T] [/E] [/C] [/G користувач:права [...]] [/R користувач [...]]\n\ + [/P користувач:права [...]] [/D користувач [...]]\n\ + ім'я_файлу Виведення існуючих ACL.\n\ + /T Зміна ACL вказаних файлів в\n\ + поточній папці і всіх підпапках.\n\ + /E Редагування ACL замість заміни.\n\ + /C Продовження після помилок відмови в доступі.\n\ + /G користувач:права Надання вказаному користувачу певних прав.\n\ + Види прав: R Читати\n\ + W Записувати\n\ + C Змінювати (записувати)\n\ + F Повний доступ\n\ + /R користувач Скасувати права доступу вказаного користувача(корректно тільки з /E).\n\ + /P користувач:права Замінити вказані права користувача.\n\ + Види прав: R Читати\n\ + W Записувати\n\ + C Змінювати (записувати)\n\ + F Повний доступ\n\ + /D користувач Заборонити доступ вказаному користувачеві.\n\ +Можна використовувати шаблони для обробки більше ніж одного файлу за команду.\n\ +Можна вказувати більше ніж одного користувача за команду.\n\n\ +Скорочення:\n\ + CI - Контейнерне Успадкування.(Container Inherit)\n\ + ACE буде успадковуватися папками.\n\ + OI - Об'єктне Успадкування.(Object Inherit)\n\ + ACE буде успадковуватися файлами.\n\ + IO - Тільки Успадкування.(Inherit Only)\n\ + ACE не буде застосований для поточного файла/папки.\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" @@ -51,7 +51,7 @@ IDS_ABBR_CHANGE, "C" IDS_ABBR_NONE, "N" IDS_ALLOW, "" IDS_DENY, "(DENY)" -IDS_SPECIAL_ACCESS, "( :)" +IDS_SPECIAL_ACCESS, "(спеціальний доступ:)" IDS_GENERIC_READ, "GENERIC_READ" IDS_GENERIC_WRITE, "GENERIC_WRITE" IDS_GENERIC_EXECUTE, "GENERIC_EXECUTE" diff --git a/base/applications/cacls/lang/zh-CN.rc b/base/applications/cacls/lang/zh-CN.rc index 78577f43bb2..b9629af5601 100644 --- a/base/applications/cacls/lang/zh-CN.rc +++ b/base/applications/cacls/lang/zh-CN.rc @@ -1,7 +1,8 @@ /* * cacls (Simplified Chinese resources) - * (Դ) + * (简体中文资源) * Copyright 2007 zhangbing + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,36 +25,36 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "ʾ޸ļķʿƱ \n\n\ +IDS_HELP, "显示或者修改文件的访问控制表\n\n\ CACLS filename [/T] [/E] [/C] [/G user:perm [...]] [/R user [...]]\n\ [/P user:perm [...]] [/D user [...]]\n\ - filename ʾ ACLs\n\ - /T ĵǰĿ¼Ŀ¼\n\ - ָļ ACL\n\ - /E ༭ ACL 滻\n\ - /C ڳ־ܾʴʱ\n\ - /G user:perm ָûȨޡ\n\ - Perm : R ȡ \n\ - W д \n\ - C (д) \n\ - F ȫ \n\ - /R user ָûķȨ( /E һʹʱϷ)\n\ - /P user:perm 滻ָûķȨޡ\n\ - Perm : N \n\ - R ȡ \n\ - W д \n\ - C (д) \n\ - F ȫ \n\ - /D user ָܾûķʡ\n\ -пʹָͨļ\n\ -Ҳָû\n\n\ -д: \n\ - CI - ̳С\n\ - ACEĿ¼̳С\n\ - OI - ̳С\n\ - ACE ļ̳С\n\ - IO - ֻ̳С\n\ - ACE ڵǰļ/Ŀ¼\n" + filename 显示 ACLs。\n\ + /T 更改当前目录及其所有子目录中\n\ + 指定文件的 ACL。\n\ + /E 编辑 ACL 而不替换。\n\ + /C 在出现拒绝访问错误时继续。\n\ + /G user:perm 赋予指定用户访问权限。\n\ + Perm 可以是: R 读取\n\ + W 写入\n\ + C 更改(写入)\n\ + F 完全控制\n\ + /R user 撤销指定用户的访问权限(仅在与 /E 一起使用时合法)。\n\ + /P user:perm 替换指定用户的访问权限。\n\ + Perm 可以是: N 无\n\ + R 读取\n\ + W 写入\n\ + C 更改(写入)\n\ + F 完全控制\n\ + /D user 拒绝指定用户的访问。\n\ +在命令中可以使用通配符指定多个文件。\n\ +您也可以在命令中指定多个用户。\n\n\ +缩写: \n\ + CI - 容器继承。\n\ + ACE会由目录继承。\n\ + OI - 对象继承。\n\ + ACE 会由文件继承。\n\ + IO - 只继承。\n\ + ACE 不适用于当前文件/目录。\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/lang/zh-TW.rc b/base/applications/cacls/lang/zh-TW.rc index 3529520aefe..552cd296f18 100644 --- a/base/applications/cacls/lang/zh-TW.rc +++ b/base/applications/cacls/lang/zh-TW.rc @@ -1,7 +1,8 @@ /* * cacls (TRADITIONAL Chinese resources) - * (c餤귽) + * (繁體中文資源) * Copyright 2007 jauming + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,36 +25,36 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "ܩΪ̭ק󪺳Xݱ \n\n\ +IDS_HELP, "顯示或者修改文件的訪問控制表\n\n\ CACLS filename [/T] [/E] [/C] [/G user:perm [...]] [/R user [...]]\n\ [/P user:perm [...]] [/D user [...]]\n\ - filename ACLsC\n\ - /T eؿΨҦlؿ\n\ - w ACLC\n\ - /E s ACL ӤC\n\ - /C bX{ڵXݿ~~C\n\ - /G user:perm ᤩwΤXvC\n\ - Perm iHO: R Ū \n\ - W gJ \n\ - C (gJ) \n\ - F \n\ - /R user MPwΤ᪺Xv(ȦbO /E @_ϥήɦXk)C\n\ - /P user:perm wΤ᪺XvC\n\ - Perm iHO: N L \n\ - R Ū \n\ - W gJ \n\ - C (gJ) \n\ - F \n\ - /D user ڵwΤ᪺XݡC\n\ -bROiHϥγqtūwhӤC\n\ -z]iHbROwhӥΤC\n\n\ -Yg: \n\ - CI - e~ӡC\n\ - ACE|ѥؿ~ӡC\n\ - OI - H~ӡC\n\ - ACE |Ѥ~ӡC\n\ - IO - u~ӡC\n\ - ACE AΩe/ؿC\n" + filename 顯示 ACLs。\n\ + /T 更改當前目錄及其所有子目錄中\n\ + 指定文件的 ACL。\n\ + /E 編輯 ACL 而不替換。\n\ + /C 在出現拒絕訪問錯誤時繼續。\n\ + /G user:perm 賦予指定用戶訪問權限。\n\ + Perm 可以是: R 讀取\n\ + W 寫入\n\ + C 更改(寫入)\n\ + F 完全控制\n\ + /R user 撤銷指定用戶的訪問權限(僅在与 /E 一起使用時合法)。\n\ + /P user:perm 替換指定用戶的訪問權限。\n\ + Perm 可以是: N 無\n\ + R 讀取\n\ + W 寫入\n\ + C 更改(寫入) \n\ + F 完全控制 \n\ + /D user 拒絕指定用戶的訪問。\n\ +在命令中可以使用通配符指定多個文件。\n\ +您也可以在命令中指定多個用戶。\n\n\ +縮寫: \n\ + CI - 容器繼承。\n\ + ACE會由目錄繼承。\n\ + OI - 對象繼承。\n\ + ACE 會由文件繼承。\n\ + IO - 只繼承。\n\ + ACE 不適用於當前文件/目錄。\n" IDS_ABBR_CI, "(CI)" IDS_ABBR_OI, "(OI)" diff --git a/base/applications/cacls/rsrc.rc b/base/applications/cacls/rsrc.rc index d06caca82a8..133603fd189 100644 --- a/base/applications/cacls/rsrc.rc +++ b/base/applications/cacls/rsrc.rc @@ -1,21 +1,21 @@ -#include -#include "resource.h" +#include "lang/en-US.rc" +#include "lang/id-ID.rc" +#include "lang/nl-NL.rc" +// UTF-8 +#pragma code_page(65001) #include "lang/bg-BG.rc" -#include "lang/es-ES.rc" #include "lang/ca-ES.rc" #include "lang/cs-CZ.rc" #include "lang/da-DA.rc" #include "lang/de-DE.rc" #include "lang/el-GR.rc" -#include "lang/en-US.rc" +#include "lang/es-ES.rc" #include "lang/fr-FR.rc" -#include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/ko-KR.rc" #include "lang/no-NO.rc" -#include "lang/nl-NL.rc" #include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/ru-RU.rc" diff --git a/base/applications/calc/CMakeLists.txt b/base/applications/calc/CMakeLists.txt index 3e1372e0752..9e28304922d 100644 --- a/base/applications/calc/CMakeLists.txt +++ b/base/applications/calc/CMakeLists.txt @@ -18,5 +18,5 @@ add_importlibs(calc advapi32 user32 gdi32 msvcrt kernel32) if(MSVC) add_importlibs(calc ntdll) endif() - +add_pch(calc calc.h) add_cd_file(TARGET calc DESTINATION reactos/system32 FOR all) diff --git a/base/applications/calc/lang/bg-BG.rc b/base/applications/calc/lang/bg-BG.rc index 9fe90352987..d2fc871f294 100644 --- a/base/applications/calc/lang/bg-BG.rc +++ b/base/applications/calc/lang/bg-BG.rc @@ -1,33 +1,35 @@ -// +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + +//Недовършен LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT // Dialog IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Изчислителят на РеактОС" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN GROUPBOX "",IDC_STATIC,4,16,132,21 - CONTROL "",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 - CONTROL "",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 - CONTROL "",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 - CONTROL "",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 + CONTROL "Шстн",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 + CONTROL "Дстн",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 + CONTROL "Осм",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 + CONTROL "Двоич",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 GROUPBOX "",IDC_STATIC,4,36,76,21 - CONTROL "",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | + CONTROL "Обр",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,26,10 - CONTROL "",IDC_CHECK_HYP,"Button",BS_AUTOCHECKBOX | + CONTROL "Хип",IDC_CHECK_HYP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,44,29,10 CTEXT "",IDC_TEXT_PARENT,84,40,24,17,SS_CENTERIMAGE, WS_EX_CLIENTEDGE CTEXT "",IDC_TEXT_MEMORY,112,40,24,17,SS_CENTERIMAGE, WS_EX_CLIENTEDGE - PUSHBUTTON "",IDC_BUTTON_STA,4,64,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "Стат",IDC_BUTTON_STA,4,64,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_AVE,4,83,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "Сред",IDC_BUTTON_AVE,4,83,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_SUM,4,102,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "Сбор",IDC_BUTTON_SUM,4,102,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "s",IDC_BUTTON_S,4,121,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP @@ -35,17 +37,17 @@ BEGIN BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "F-E",IDC_BUTTON_FE,38,64,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_DMS,38,83,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "Гмс",IDC_BUTTON_DMS,38,83,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_SIN,38,102,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "син",IDC_BUTTON_SIN,38,102,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_COS,38,121,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "кос",IDC_BUTTON_COS,38,121,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_TAN,38,140,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "тан",IDC_BUTTON_TAN,38,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "(",IDC_BUTTON_LEFTPAR,64,64,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_EXP,64,83,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "експ",IDC_BUTTON_EXP,64,83,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "x^y",IDC_BUTTON_XeY,64,102,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -71,7 +73,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "M+",IDC_BUTTON_MP,124,121,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_PI,124,140,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "пи",IDC_BUTTON_PI,124,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "7",IDC_BUTTON_7,158,64,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -113,25 +115,25 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "D",IDC_BUTTON_D,236,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_MOD,262,64,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "Ост",IDC_BUTTON_MOD,262,64,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_OR,262,83,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "Или",IDC_BUTTON_OR,262,83,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_LSH,262,102,24,17,BS_CENTER | + PUSHBUTTON "ЛИзм",IDC_BUTTON_LSH,262,102,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "=",IDC_BUTTON_EQU,262,121,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "E",IDC_BUTTON_E,262,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_AND,288,64,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "И",IDC_BUTTON_AND,288,64,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_XOR,288,83,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "ИИли",IDC_BUTTON_XOR,288,83,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_NOT,288,102,24,17,BS_CENTER | + PUSHBUTTON "Не",IDC_BUTTON_NOT,288,102,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_INT,288,121,24,17,BS_CENTER | + PUSHBUTTON "Цлч",IDC_BUTTON_INT,288,121,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "Дроб",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP GROUPBOX "",IDC_STATIC,140,16,172,21 CONTROL "Qword",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | @@ -140,19 +142,19 @@ BEGIN NOT WS_VISIBLE,188,24,37,10 CONTROL "Word",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,232,24,33,10 - CONTROL "",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "Байт",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,272,24,30,10 - CONTROL "",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + CONTROL "Градуси",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "Радиани",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 - CONTROL "",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + CONTROL "Градове",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + PUSHBUTTON "Назад",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -161,7 +163,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Изчислителян на РеактОС" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -169,7 +171,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + PUSHBUTTON "Назад",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -228,7 +230,7 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Изчислителят на РеактОС" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN @@ -306,16 +308,16 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS Calc" +CAPTION "За ReactOS Calc" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "",IDOK,105,148,52,16 + DEFPUSHBUTTON "Добре",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT " ",IDC_STATIC,120,12,132,8, + LTEXT "Изчислителят на РеактОС",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE - LTEXT ":",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE - LTEXT " Carlo Bramini",IDC_STATIC,120,32,132,8, + LTEXT "Версия:",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Написано от Carlo Bramini",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 GROUPBOX "",IDC_STATIC,4,56,256,88 @@ -325,7 +327,7 @@ END IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Статистическа кутия" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | @@ -342,89 +344,89 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Обработка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Запомняне\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Поставяне\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Изглед" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Обикновен", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Научен", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Преобразуване", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "a\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Шестнaдесетичен\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Десетичен\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Осмичен\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Двоичен\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "\tF3", IDM_VIEW_RAD, CHECKED - MENUITEM "\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM "Градуси\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "Радиани\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Градове\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Разделяне на хилядите", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Помощ" BEGIN - MENUITEM "", IDM_HELP_HELP + MENUITEM "Помощ", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ReactOS Calc", IDM_HELP_ABOUT + MENUITEM "За ReactOS Calc", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Обработка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Запомняне\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Поставяне\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Изглед" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Стандартно", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Научен", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Преобразуване", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "a\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Шестнaдесетичен\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Десетичен\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Осмичен\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Двоичен\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "\tF12", IDM_VIEW_QWORD, CHECKED - MENUITEM "\tF2", IDM_VIEW_DWORD, CHECKED - MENUITEM "\tF3", IDM_VIEW_WORD, CHECKED - MENUITEM "\tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM "Чдума\tF12", IDM_VIEW_QWORD, CHECKED + MENUITEM "Ддума\tF2", IDM_VIEW_DWORD, CHECKED + MENUITEM "Дума\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "Байт\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Разделяне на хилядите", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Помощ" BEGIN - MENUITEM "", IDM_HELP_HELP + MENUITEM "Помощ", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ReactOS Calc", IDM_HELP_ABOUT + MENUITEM "За ReactOS Calc", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Обработка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Запомняне\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Поставяне\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Изглед" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Стандартно", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Научен", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Преобразуване", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Разделяне на хилядите", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Помощ" BEGIN - MENUITEM "", IDM_HELP_HELP + MENUITEM "Помощ", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ReactOS Calc", IDM_HELP_ABOUT + MENUITEM "За ReactOS Calc", IDM_HELP_ABOUT END END @@ -433,48 +435,48 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "" - IDS_QUICKHELP " " + IDS_MATH_ERROR "Грешка" + IDS_QUICKHELP "Бърза помощ" END // types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "" - IDS_CONV_AREA "" - IDS_CONV_CONSUMPTION " ()" - IDS_CONV_CURRENCY " " - IDS_CONV_ENERGY "" - IDS_CONV_LENGTH "" - IDS_CONV_POWER "" - IDS_CONV_PRESSURE "" - IDS_CONV_TEMPERATURE "" - IDS_CONV_TIME "" - IDS_CONV_VELOCITY "" - IDS_CONV_VOLUME "" - IDS_CONV_WEIGHT "" + IDS_CONV_ANGLE "Ъгъл" + IDS_CONV_AREA "Площ" + IDS_CONV_CONSUMPTION "Потребление (двигатели)" + IDS_CONV_CURRENCY "Парични единици" + IDS_CONV_ENERGY "Енергия" + IDS_CONV_LENGTH "Дължини" + IDS_CONV_POWER "Мощност" + IDS_CONV_PRESSURE "Налягане" + IDS_CONV_TEMPERATURE "Температура" + IDS_CONV_TIME "Време" + IDS_CONV_VELOCITY "Скорост" + IDS_CONV_VOLUME "Обем" + IDS_CONV_WEIGHT "Тегло" END // TYPES OF ANGLES STRINGTABLE DISCARDABLE BEGIN - IDS_ANGLE_DEGREES "" - IDS_ANGLE_GRADIANS "" - IDS_ANGLE_RADIANS "" + IDS_ANGLE_DEGREES "Градуси" + IDS_ANGLE_GRADIANS "Гради" + IDS_ANGLE_RADIANS "Радиани" END // TYPES OF AREAS STRINGTABLE DISCARDABLE BEGIN - IDS_AREA_ACRES "" - IDS_AREA_ACRES_BRAZIL " ()" - IDS_AREA_ACRES_FRANCE " ()" - IDS_AREA_ACRES_SCOTS " ()" - IDS_AREA_ACRES_US " ()" - IDS_AREA_ARES "" + IDS_AREA_ACRES "Акри" + IDS_AREA_ACRES_BRAZIL "Акри (Бразилски)" + IDS_AREA_ACRES_FRANCE "Акри (Френски)" + IDS_AREA_ACRES_SCOTS "Акри (Шотландски)" + IDS_AREA_ACRES_US "Акри (САЩ)" + IDS_AREA_ARES "Арове" IDS_AREA_CHOU "Chou" IDS_AREA_DANBO "Danbo" - IDS_AREA_HECTARES "" + IDS_AREA_HECTARES "Хектари" IDS_AREA_JEONGBO "Jeongbo" IDS_AREA_MORGEN_HUNGARY "Morgen (Hungary)" IDS_AREA_MU "Mu" @@ -483,21 +485,21 @@ BEGIN IDS_AREA_PYEONGBANGJA "Pyeongbangja" IDS_AREA_RAI "Rai" IDS_AREA_SE "Se" - IDS_AREA_SQUARE_CENTIMETERS " " - IDS_AREA_SQUARE_CHR " chr" - IDS_AREA_SQUARE_FATHOMS " " - IDS_AREA_SQUARE_FATHOMS_HUNGARY " ()" - IDS_AREA_SQUARE_FEET " " - IDS_AREA_SQUARE_INCHES " " - IDS_AREA_SQUARE_KILOMETERS " " - IDS_AREA_SQUARE_LAR " lar" - IDS_AREA_SQUARE_METER " " - IDS_AREA_SQUARE_MILES " " - IDS_AREA_SQUARE_MILLIMETERS " " - IDS_AREA_SQUARE_SHAKU " shaku" - IDS_AREA_SQUARE_TSUEN " tsuen" - IDS_AREA_SQUARE_VA " va" - IDS_AREA_SQUARE_YARD " " + IDS_AREA_SQUARE_CENTIMETERS "Квадратни сантиметри" + IDS_AREA_SQUARE_CHR "Квадратни chr" + IDS_AREA_SQUARE_FATHOMS "Квадратни фадоми" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Квадратни фадоми (унгарски)" + IDS_AREA_SQUARE_FEET "Квадратни стъпки" + IDS_AREA_SQUARE_INCHES "Квадратни цолове" + IDS_AREA_SQUARE_KILOMETERS "Квадратни километри" + IDS_AREA_SQUARE_LAR "Квадратни lar" + IDS_AREA_SQUARE_METER "Квадратни метри" + IDS_AREA_SQUARE_MILES "Квадратни мили" + IDS_AREA_SQUARE_MILLIMETERS "Квадратни милиметри" + IDS_AREA_SQUARE_SHAKU "Квадратни shaku" + IDS_AREA_SQUARE_TSUEN "Квадратни tsuen" + IDS_AREA_SQUARE_VA "Квадратни va" + IDS_AREA_SQUARE_YARD "Квадратни ярдове" IDS_AREA_TAN "Tan" IDS_AREA_TSUBO "Tsubo" END @@ -505,10 +507,10 @@ END // TYPES OF COMSUMPTIONS STRINGTABLE DISCARDABLE BEGIN - IDS_CONSUMPTION_KM_PER_L "/" - IDS_CONSUMPTION_L_PER_100_KM "/100 " - IDS_CONSUMPTION_MILES_GALLON_UK "/ ()" - IDS_CONSUMPTION_MILES_GALLON_US "/ ()" + IDS_CONSUMPTION_KM_PER_L "Километри/литър" + IDS_CONSUMPTION_L_PER_100_KM "Литри/100 километра" + IDS_CONSUMPTION_MILES_GALLON_UK "Мили/галон (ОК)" + IDS_CONSUMPTION_MILES_GALLON_US "Мили/галон (САЩ)" END // TYPES OF CURRENCIES @@ -517,10 +519,10 @@ BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgian franc" IDS_CURRENCY_CYPRIOT_POUND "Cypriot pound" - IDS_CURRENCY_CZECH_KORUNA " " + IDS_CURRENCY_CZECH_KORUNA "Чешка крона" IDS_CURRENCY_DEUTSCHE_MARK "Deutsche Mark" IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder" - IDS_CURRENCY_EURO "" + IDS_CURRENCY_EURO "Евро" IDS_CURRENCY_FINNISH_MARKKA "Finnish markka" IDS_CURRENCY_FRENCH_FRANC "French franc" IDS_CURRENCY_GREEK_DRACHMA "Greek Drachma" @@ -537,59 +539,59 @@ END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15- " - IDS_ENERGY_BTUS " " - IDS_ENERGY_ERGS "" - IDS_ENERGY_EVS "" + IDS_ENERGY_15_C_CALORIES "15-градусни калории" + IDS_ENERGY_BTUS "Британски термални единици" + IDS_ENERGY_ERGS "Ергове" + IDS_ENERGY_EVS "Електронволти" IDS_ENERGY_FOOT_POUNDS "Foot-Pounds" - IDS_ENERGY_IT_CALORIES " " - IDS_ENERGY_IT_KILOCALORIES " " - IDS_ENERGY_JOULES "" - IDS_ENERGY_KILOJOULES "" - IDS_ENERGY_KILOWATT_HOURS "" - IDS_ENERGY_NUTRITION_CALORIES " " - IDS_ENERGY_TH_CALORIES " " + IDS_ENERGY_IT_CALORIES "Международни таблични калории" + IDS_ENERGY_IT_KILOCALORIES "Международни таблични килокалории" + IDS_ENERGY_JOULES "Джаули" + IDS_ENERGY_KILOJOULES "Килоджаули" + IDS_ENERGY_KILOWATT_HOURS "Киловатчасове" + IDS_ENERGY_NUTRITION_CALORIES "Хранителни калории" + IDS_ENERGY_TH_CALORIES "Топлинни калории" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "" - IDS_LENGTH_ASTRONOMICAL_UNITS " " - IDS_LENGTH_BARLEYCORNS " " - IDS_LENGTH_CENTIMETERS "" - IDS_LENGTH_CHAINS_UK " ()" + IDS_LENGTH_ANGSTROMS "Ангстрьоми" + IDS_LENGTH_ASTRONOMICAL_UNITS "Астрономическа единица" + IDS_LENGTH_BARLEYCORNS "Ечемичени зърна" + IDS_LENGTH_CENTIMETERS "Сантиметри" + IDS_LENGTH_CHAINS_UK "Вериги (ОК)" IDS_LENGTH_CHI "Chi" IDS_LENGTH_CHOU "Chou" IDS_LENGTH_CHR "Chr" IDS_LENGTH_CUN "Cun" - IDS_LENGTH_FATHOMS "" - IDS_LENGTH_FATHOMS_HUNGARY " ()" - IDS_LENGTH_FEET "" - IDS_LENGTH_FURLONGS "" + IDS_LENGTH_FATHOMS "Сажени" + IDS_LENGTH_FATHOMS_HUNGARY "Сажени (унгарски)" + IDS_LENGTH_FEET "Стъпки" + IDS_LENGTH_FURLONGS "Бразди" IDS_LENGTH_GAN "Gan" - IDS_LENGTH_HANDS "" + IDS_LENGTH_HANDS "Длани" IDS_LENGTH_HUNH "Hunh" - IDS_LENGTH_INCHES "" + IDS_LENGTH_INCHES "Цолове" IDS_LENGTH_JA "Ja" IDS_LENGTH_JEONG "Jeong" IDS_LENGTH_KABIET "Kabiet" IDS_LENGTH_KEN "Ken" IDS_LENGTH_KEUB "Keub" - IDS_LENGTH_KILOMETERS "" + IDS_LENGTH_KILOMETERS "Километри" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS " " + IDS_LENGTH_LIGHT_YEARS "Светлинни години" IDS_LENGTH_LINKS_UK "Links (UK)" - IDS_LENGTH_METERS "" - IDS_LENGTH_MICRONS "" - IDS_LENGTH_MILES "" - IDS_LENGTH_MILLIMETERS "" - IDS_LENGTH_NAUTICAL_MILES " " + IDS_LENGTH_METERS "Метри" + IDS_LENGTH_MICRONS "Микрометри" + IDS_LENGTH_MILES "Мили" + IDS_LENGTH_MILLIMETERS "Милиметри" + IDS_LENGTH_NAUTICAL_MILES "Морски мили" IDS_LENGTH_NIEU "Nieu" - IDS_LENGTH_PARSECS "" - IDS_LENGTH_PICAS " ()" - IDS_LENGTH_RI_JAPAN "Ri ()" - IDS_LENGTH_RI_KOREA "Ri ()" + IDS_LENGTH_PARSECS "Парсеци" + IDS_LENGTH_PICAS "Дванадесетки (пики)" + IDS_LENGTH_RI_JAPAN "Ri (японски)" + IDS_LENGTH_RI_KOREA "Ri (корейски)" IDS_LENGTH_RODS "Rods" IDS_LENGTH_SAWK "Sawk" IDS_LENGTH_SEN "Sen" @@ -598,7 +600,7 @@ BEGIN IDS_LENGTH_SUN "Sun" IDS_LENGTH_TSUEN "Tsuen" IDS_LENGTH_VA "Va" - IDS_LENGTH_YARDS "" + IDS_LENGTH_YARDS "Ярдове" IDS_LENGTH_YOTE "Yote" IDS_LENGTH_ZHANG "Zhang" END @@ -608,92 +610,92 @@ STRINGTABLE DISCARDABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute" - IDS_POWER_HORSEPOWER " " - IDS_POWER_KILOWATTS "" - IDS_POWER_MEGAWATTS "" - IDS_POWER_WATTS "" + IDS_POWER_HORSEPOWER "Конски сили" + IDS_POWER_KILOWATTS "Киловатове" + IDS_POWER_MEGAWATTS "Мегаватове" + IDS_POWER_WATTS "Ватове" END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "" - IDS_PRESSURE_BARS "" - IDS_PRESSURE_HECTOPASCALS "" - IDS_PRESSURE_KILOPASCALS "" - IDS_PRESSURE_MM_OF_MERCURY " " - IDS_PRESSURE_PASCALS "" - IDS_PRESSURE_PSI " " + IDS_PRESSURE_ATMOSPHERES "Атмосфери" + IDS_PRESSURE_BARS "Барове" + IDS_PRESSURE_HECTOPASCALS "Хектопаскали" + IDS_PRESSURE_KILOPASCALS "Килопаскали" + IDS_PRESSURE_MM_OF_MERCURY "Милиметри живачен стълб" + IDS_PRESSURE_PASCALS "Паскали" + IDS_PRESSURE_PSI "Паундове на квадратен цол" END // TYPES OF TEMPERATURES STRINGTABLE DISCARDABLE BEGIN - IDS_TEMPERATURE_CELSIUS "" - IDS_TEMPERATURE_FAHRENHEIT "" - IDS_TEMPERATURE_KELVIN "" - IDS_TEMPERATURE_RANKINE "" + IDS_TEMPERATURE_CELSIUS "Целзий" + IDS_TEMPERATURE_FAHRENHEIT "Фаренхайт" + IDS_TEMPERATURE_KELVIN "Келвин" + IDS_TEMPERATURE_RANKINE "Ранкин" END // TYPES OF TIME STRINGTABLE DISCARDABLE BEGIN - IDS_TIME_DAYS "" - IDS_TIME_HOURS "" + IDS_TIME_DAYS "Дни" + IDS_TIME_HOURS "Часи" IDS_TIME_NANOSECONDS "Nanoseconds" - IDS_TIME_MICROSECONDS "" - IDS_TIME_MILLISECONDS "" - IDS_TIME_MINUTES "" - IDS_TIME_SECONDS "" - IDS_TIME_WEEKS "" - IDS_TIME_YEARS "" + IDS_TIME_MICROSECONDS "Микросекунди" + IDS_TIME_MILLISECONDS "Милисекунди" + IDS_TIME_MINUTES "Минути" + IDS_TIME_SECONDS "Секунди" + IDS_TIME_WEEKS "Седмици" + IDS_TIME_YEARS "Години" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND "/" - IDS_VELOCITY_FEET_HOUR "/" - IDS_VELOCITY_FEET_SECOND "/" - IDS_VELOCITY_KILOMETERS_HOUR "/" - IDS_VELOCITY_KNOTS "" - IDS_VELOCITY_MACH "" - IDS_VELOCITY_METERS_SECOND "/" - IDS_VELOCITY_MILES_HOUR "/" + IDS_VELOCITY_CMS_SECOND "Сантиметри/час" + IDS_VELOCITY_FEET_HOUR "Стъпки/час" + IDS_VELOCITY_FEET_SECOND "Стъпки/секунда" + IDS_VELOCITY_KILOMETERS_HOUR "Километри/час" + IDS_VELOCITY_KNOTS "Възли" + IDS_VELOCITY_MACH "Махове" + IDS_VELOCITY_METERS_SECOND "Метри/секунда" + IDS_VELOCITY_MILES_HOUR "Мили/час" END // TYPES OF VOLUMES STRINGTABLE DISCARDABLE BEGIN - IDS_VOLUME_BARRELS_UK " () ()" - IDS_VOLUME_BARRELS_OIL " " + IDS_VOLUME_BARRELS_UK "Бъчви (барели) (ОК)" + IDS_VOLUME_BARRELS_OIL "Петролни бъчви" IDS_VOLUME_BUN "Bun" - IDS_VOLUME_BUSHELS_UK " ()" - IDS_VOLUME_BUSHELS_US " ()" - IDS_VOLUME_CUBIC_CENTIMETERS " " - IDS_VOLUME_CUBIC_FEET " " - IDS_VOLUME_CUBIC_INCHES " " - IDS_VOLUME_CUBIC_METERS " " - IDS_VOLUME_CUBIC_YARDS " " + IDS_VOLUME_BUSHELS_UK "Бушели (ОК)" + IDS_VOLUME_BUSHELS_US "Бушели (САЩ)" + IDS_VOLUME_CUBIC_CENTIMETERS "Кубични сантиметри" + IDS_VOLUME_CUBIC_FEET "Кубични стъпки" + IDS_VOLUME_CUBIC_INCHES "Кубични цолове" + IDS_VOLUME_CUBIC_METERS "Кубични метри" + IDS_VOLUME_CUBIC_YARDS "Кубични ярдове" IDS_VOLUME_DOE "Doe" - IDS_VOLUME_FLUID_OUNCES_UK " ()" - IDS_VOLUME_FLUID_OUNCES_US " ()" - IDS_VOLUME_GALLONS_UK " (UK)" - IDS_VOLUME_GALLONS_DRY_US ", ()" - IDS_VOLUME_GALLONS_LIQUID_US ", ()" + IDS_VOLUME_FLUID_OUNCES_UK "Течни унции (ОК)" + IDS_VOLUME_FLUID_OUNCES_US "Течни унции (САЩ)" + IDS_VOLUME_GALLONS_UK "Галони (UK)" + IDS_VOLUME_GALLONS_DRY_US "Галони, сухи (САЩ)" + IDS_VOLUME_GALLONS_LIQUID_US "Галони, течни (САЩ)" IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" IDS_VOLUME_ICCE "Icce" IDS_VOLUME_KWIAN "Kwian" - IDS_VOLUME_LITERS "" + IDS_VOLUME_LITERS "Литри" IDS_VOLUME_MAL "Mal" - IDS_VOLUME_MILLILITERS "" - IDS_VOLUME_PINTS_UK " ()" - IDS_VOLUME_PINTS_DRY_US ", ()" - IDS_VOLUME_PINTS_LIQUID_US ", ()" - IDS_VOLUME_QUARTS_UK " ()" - IDS_VOLUME_QUARTS_DRY_US ", ()" - IDS_VOLUME_QUARTS_LIQUID_US ", ()" + IDS_VOLUME_MILLILITERS "Милиметри" + IDS_VOLUME_PINTS_UK "Пинти (ОК)" + IDS_VOLUME_PINTS_DRY_US "Пинти, сухи (САЩ)" + IDS_VOLUME_PINTS_LIQUID_US "Пинти, течни (САЩ)" + IDS_VOLUME_QUARTS_UK "Кварти (ОК)" + IDS_VOLUME_QUARTS_DRY_US "Кварти, сухи (САЩ)" + IDS_VOLUME_QUARTS_LIQUID_US "Кварти, течни (САЩ)" IDS_VOLUME_SEKI "Seki" IDS_VOLUME_SYOU "Syou" IDS_VOLUME_TANANLOUNG "Tananloung" @@ -705,29 +707,29 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_WEIGHT_BAHT "Baht" - IDS_WEIGHT_CARATS "" + IDS_WEIGHT_CARATS "Карати" IDS_WEIGHT_CHUNG "Chung" IDS_WEIGHT_DON "Don" IDS_WEIGHT_GEUN "Geun" IDS_WEIGHT_GRAMS "Grams" IDS_WEIGHT_GWAN "Gwan" IDS_WEIGHT_HARB "Harb" - IDS_WEIGHT_JIN_CHINA " ()" - IDS_WEIGHT_JIN_TAIWAN " ()" + IDS_WEIGHT_JIN_CHINA "Джинове (Китай)" + IDS_WEIGHT_JIN_TAIWAN "Джинове (Тайван)" IDS_WEIGHT_KAN "Kan" - IDS_WEIGHT_KILOGRAMS "" + IDS_WEIGHT_KILOGRAMS "Килограми" IDS_WEIGHT_KIN "Kin" IDS_WEIGHT_LIANG_CHINA "Liang (China)" IDS_WEIGHT_LIANG_TAIWAN "Liang (Taiwan)" IDS_WEIGHT_MONME "Monme" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS ", avoirdupois" - IDS_WEIGHT_OUNCES_TROY ", " - IDS_WEIGHT_POUNDS "" - IDS_WEIGHT_QUINTAL_METRIC " ()" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Унции, avoirdupois" + IDS_WEIGHT_OUNCES_TROY "Унции, трой" + IDS_WEIGHT_POUNDS "Фунтове" + IDS_WEIGHT_QUINTAL_METRIC "Центнери (метрични)" IDS_WEIGHT_SALOUNG "Saloung" - IDS_WEIGHT_STONES "" + IDS_WEIGHT_STONES "Камъни" IDS_WEIGHT_TAMLUNG "Tamlung" - IDS_WEIGHT_TONNES "" - IDS_WEIGHT_TONS_UK " ()" - IDS_WEIGHT_TONS_US " ()" + IDS_WEIGHT_TONNES "Тонове" + IDS_WEIGHT_TONS_UK "Тонове (ОК)" + IDS_WEIGHT_TONS_US "Тонове (САЩ)" END diff --git a/base/applications/calc/lang/cs-CZ.rc b/base/applications/calc/lang/cs-CZ.rc index a062074f93b..4835532424e 100644 --- a/base/applications/calc/lang/cs-CZ.rc +++ b/base/applications/calc/lang/cs-CZ.rc @@ -1,6 +1,7 @@ /* FILE: base/applications/calc/lang/cs-CZ.rc * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) * UPDATED: 2010-05-30 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT @@ -9,7 +10,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS kalkulaka" +CAPTION "ReactOS kalkulaèka" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -75,7 +76,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "M+",IDC_BUTTON_MP,124,121,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "p",IDC_BUTTON_PI,124,140,24,17,BS_CENTER | BS_VCENTER | + PUSHBUTTON "pí",IDC_BUTTON_PI,124,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "7",IDC_BUTTON_7,158,64,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -146,9 +147,9 @@ BEGIN WS_VISIBLE,232,24,33,10 CONTROL "Byte",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,272,24,30,10 - CONTROL "Stupn",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + CONTROL "Stupnì",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "Radiny",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "Radiány",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 CONTROL "Grady",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 @@ -156,7 +157,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Zpt",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + PUSHBUTTON "Zpìt",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -165,7 +166,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Kalkulaka" +CAPTION "ReactOS Kalkulaèka" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -173,7 +174,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Zpt",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + PUSHBUTTON "Zpìt",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -232,17 +233,17 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Kalkulaka" +CAPTION "ReactOS Kalkulaèka" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "Pevst",IDC_BUTTON_CONVERT,35,105,76,17 + PUSHBUTTON "Pøevést",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT LTEXT "Kategorie:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Pevst z:",IDC_STATIC,4,49,56,8 + LTEXT "Pøevést z:",IDC_STATIC,4,49,56,8 COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT LTEXT "Na:",IDC_STATIC,4,76,56,8 @@ -250,7 +251,7 @@ BEGIN BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,232,24,40,17 - CONTROL "Zpt",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | + CONTROL "Zpìt",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,24, 40,17 RTEXT "",IDC_TEXT_OUTPUT,4,4,312,12,SS_CENTERIMAGE, @@ -310,13 +311,13 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "O ReactOS Kalkulace" +CAPTION "O ReactOS Kalkulaèce" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT "ReactOS Kalkulaka",IDC_STATIC,120,12,132,8, + LTEXT "ReactOS Kalkulaèka",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE LTEXT "Verze ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE LTEXT "Autor: Carlo Bramini",IDC_STATIC,120,32,132,8, @@ -329,7 +330,7 @@ END IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Statistick vpoty" +CAPTION "Statistické výpoèty" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | @@ -346,89 +347,89 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "pravy" + POPUP "Úpravy" BEGIN - MENUITEM "Koprovat\tCTRL-C", IDM_EDIT_COPY - MENUITEM "Vloit\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Kopírovat\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Vložit\tCTRL-V", IDM_EDIT_PASTE END POPUP "Zobrazit" BEGIN - MENUITEM "Standardn", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Vdeck", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "Pevody", IDM_VIEW_CONVERSION + MENUITEM "Standardní", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Vìdecká", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Pøevody", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "estnctkov\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Destkov\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "Osmikov\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binrn\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Šestnáctkovì\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Desítkovì\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Osmièkovì\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Binárnì\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "Stupn\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "Radiny\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Stupnì\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "Radiány\tF3", IDM_VIEW_RAD, CHECKED MENUITEM "Grady\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM "Seskupovn slic", IDM_VIEW_GROUP, CHECKED + MENUITEM "Seskupování èíslic", IDM_VIEW_GROUP, CHECKED END - POPUP "Npovda" + POPUP "Nápovìda" BEGIN - MENUITEM "Tmata npovdy", IDM_HELP_HELP + MENUITEM "Témata nápovìdy", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "O ReactOS kalkulace", IDM_HELP_ABOUT + MENUITEM "O ReactOS kalkulaèce", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "pravy" + POPUP "Úpravy" BEGIN - MENUITEM "Koprovat\tCTRL-C", IDM_EDIT_COPY - MENUITEM "Vloit\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Kopírovat\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Vložit\tCTRL-V", IDM_EDIT_PASTE END POPUP "Zobrazit" BEGIN - MENUITEM "Standardn", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Vdeck", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "Pevody", IDM_VIEW_CONVERSION + MENUITEM "Standardní", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Vìdecká", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Pøevody", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "estnctkov\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Destkov\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "Osmikov\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binrn\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Šestnáctkovì\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Desítkovì\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Osmièkovì\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Binárnì\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "Seskupovn slic", IDM_VIEW_GROUP, CHECKED + MENUITEM "Seskupování èíslic", IDM_VIEW_GROUP, CHECKED END - POPUP "Npovda" + POPUP "Nápovìda" BEGIN - MENUITEM "Tmata npovdy", IDM_HELP_HELP + MENUITEM "Témata nápovìdy", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "O ReactOS kalkulace", IDM_HELP_ABOUT + MENUITEM "O ReactOS kalkulaèce", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "pravy" + POPUP "Úpravy" BEGIN - MENUITEM "Koprovat\tCTRL-C", IDM_EDIT_COPY - MENUITEM "Vloit\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Kopírovat\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Vložit\tCTRL-V", IDM_EDIT_PASTE END POPUP "Zobrazit" BEGIN - MENUITEM "Standardn", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Vdeck", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "Pevody", IDM_VIEW_CONVERSION + MENUITEM "Standardní", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Vìdecká", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Pøevody", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "Seskupovn slic", IDM_VIEW_GROUP, CHECKED + MENUITEM "Seskupování èíslic", IDM_VIEW_GROUP, CHECKED END - POPUP "Npovda" + POPUP "Nápovìda" BEGIN - MENUITEM "Tmata npovdy", IDM_HELP_HELP + MENUITEM "Témata nápovìdy", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "O ReactOS kalkulace", IDM_HELP_ABOUT + MENUITEM "O ReactOS kalkulaèce", IDM_HELP_ABOUT END END @@ -436,66 +437,66 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "ReactOS kalkulaka je svobodn software vydan pod licenc GNU GPL.\r\n\r\nZde najdete znn GNU GPL licence:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nZde tak najdete peklad GNU GPL licence:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "ReactOS kalkulaèka je svobodný software vydaný pod licencí GNU GPL.\r\n\r\nZde najdete znìní GNU GPL licence:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nZde také najdete pøeklad GNU GPL licence:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Chyba" - IDS_QUICKHELP "Rychl npovda" + IDS_QUICKHELP "Rychlá nápovìda" END // types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_TIME "as" - IDS_CONV_LENGTH "Dlka" + IDS_CONV_TIME "Èas" + IDS_CONV_LENGTH "Délka" IDS_CONV_ENERGY "Energie" IDS_CONV_WEIGHT "Hmotnost" - IDS_CONV_CURRENCY "Mna" + IDS_CONV_CURRENCY "Mìna" IDS_CONV_VOLUME "Objem" IDS_CONV_AREA "Plocha" IDS_CONV_VELOCITY "Rychlost" - IDS_CONV_CONSUMPTION "Spoteba" + IDS_CONV_CONSUMPTION "Spotøeba" IDS_CONV_TEMPERATURE "Teplota" IDS_CONV_PRESSURE "Tlak" - IDS_CONV_ANGLE "hel" - IDS_CONV_POWER "Vkon" + IDS_CONV_ANGLE "Úhel" + IDS_CONV_POWER "Výkon" END // TYPES OF ANGLES STRINGTABLE DISCARDABLE BEGIN IDS_ANGLE_GRADIANS "Grady" - IDS_ANGLE_RADIANS "Radiny" - IDS_ANGLE_DEGREES "Stupn" + IDS_ANGLE_RADIANS "Radiány" + IDS_ANGLE_DEGREES "Stupnì" END // TYPES OF AREAS STRINGTABLE DISCARDABLE BEGIN IDS_AREA_ACRES "Akry" - IDS_AREA_ACRES_BRAZIL "Akry (Brazlie)" + IDS_AREA_ACRES_BRAZIL "Akry (Brazílie)" IDS_AREA_ACRES_FRANCE "Akry (Francie)" IDS_AREA_ACRES_SCOTS "Akry (Skotsko)" IDS_AREA_ACRES_US "Akry (USA)" IDS_AREA_ARES "Ary" IDS_AREA_CHOU "Chou" - IDS_AREA_SQUARE_CENTIMETERS "tveren centimetry" - IDS_AREA_SQUARE_CHR "tveren chr" - IDS_AREA_SQUARE_FATHOMS "tveren fathomy" - IDS_AREA_SQUARE_FATHOMS_HUNGARY "tveren fathomy (Maarsko)" - IDS_AREA_SQUARE_FEET "tveren stopy" - IDS_AREA_SQUARE_INCHES "tveren palce" - IDS_AREA_SQUARE_KILOMETERS "tveren kilometry" - IDS_AREA_SQUARE_LAR "tveren lar" - IDS_AREA_SQUARE_METER "tveren metry" - IDS_AREA_SQUARE_MILES "tveren mle" - IDS_AREA_SQUARE_MILLIMETERS "tveren milimetry" - IDS_AREA_SQUARE_SHAKU "tveren shaku" - IDS_AREA_SQUARE_TSUEN "tveren tsuen" - IDS_AREA_SQUARE_VA "tveren va" - IDS_AREA_SQUARE_YARD "tveren yardy" + IDS_AREA_SQUARE_CENTIMETERS "Ètvereèní centimetry" + IDS_AREA_SQUARE_CHR "Ètvereèní chr" + IDS_AREA_SQUARE_FATHOMS "Ètvereèní fathomy" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Ètvereèní fathomy (Maïarsko)" + IDS_AREA_SQUARE_FEET "Ètvereèní stopy" + IDS_AREA_SQUARE_INCHES "Ètvereèní palce" + IDS_AREA_SQUARE_KILOMETERS "Ètvereèní kilometry" + IDS_AREA_SQUARE_LAR "Ètvereèní lar" + IDS_AREA_SQUARE_METER "Ètvereèní metry" + IDS_AREA_SQUARE_MILES "Ètvereèní míle" + IDS_AREA_SQUARE_MILLIMETERS "Ètvereèní milimetry" + IDS_AREA_SQUARE_SHAKU "Ètvereèní shaku" + IDS_AREA_SQUARE_TSUEN "Ètvereèní tsuen" + IDS_AREA_SQUARE_VA "Ètvereèní va" + IDS_AREA_SQUARE_YARD "Ètvereèní yardy" IDS_AREA_DANBO "Danbo" IDS_AREA_HECTARES "Hektary" IDS_AREA_JEONGBO "Jeongbo" - IDS_AREA_MORGEN_HUNGARY "Morgen (Maarsko)" + IDS_AREA_MORGEN_HUNGARY "Morgen (Maïarsko)" IDS_AREA_MU "Mu" IDS_AREA_PING "Ping" IDS_AREA_PYEONG "Pyeong" @@ -510,56 +511,56 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometry/litr" - IDS_CONSUMPTION_L_PER_100_KM "Litry/100 kilometr" - IDS_CONSUMPTION_MILES_GALLON_UK "Mle/galon (UK)" - IDS_CONSUMPTION_MILES_GALLON_US "Mle/galon (USA)" + IDS_CONSUMPTION_L_PER_100_KM "Litry/100 kilometrù" + IDS_CONSUMPTION_MILES_GALLON_UK "Míle/galon (UK)" + IDS_CONSUMPTION_MILES_GALLON_US "Míle/galon (USA)" END // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN - IDS_CURRENCY_BELGIAN_FRANC "Belgick frank" - IDS_CURRENCY_CZECH_KORUNA "esk koruna" + IDS_CURRENCY_BELGIAN_FRANC "Belgický frank" + IDS_CURRENCY_CZECH_KORUNA "Èeská koruna" IDS_CURRENCY_EURO "Euro" - IDS_CURRENCY_FINNISH_MARKKA "Finsk marka" - IDS_CURRENCY_FRENCH_FRANC "Francouzsk frank" - IDS_CURRENCY_IRISH_POUND "Irsk libra" - IDS_CURRENCY_ITALIAN_LIRA "Italsk lira" - IDS_CURRENCY_CYPRIOT_POUND "Kypersk libra" - IDS_CURRENCY_LUXEMBOURG_FRANC "Lucembursk frank" - IDS_CURRENCY_MALTESE_LIRA "Maltsk lira" - IDS_CURRENCY_DEUTSCHE_MARK "Nmeck marka" - IDS_CURRENCY_DUTCH_GUILDER "Nizozemsk gulden" - IDS_CURRENCY_PORTOGUESE_ESCUDO "Portugalsk escudo" - IDS_CURRENCY_AUSTRIAN_SCHILLING "Rakousk ilink" - IDS_CURRENCY_GREEK_DRACHMA "eck drachma" - IDS_CURRENCY_SLOVAK_KORUNA "Slovensk koruna" - IDS_CURRENCY_SLOVENIAN_TOLAR "Slovinsk tolar" - IDS_CURRENCY_SPANISH_PESETA "panlsk peseta" + IDS_CURRENCY_FINNISH_MARKKA "Finská marka" + IDS_CURRENCY_FRENCH_FRANC "Francouzský frank" + IDS_CURRENCY_IRISH_POUND "Irská libra" + IDS_CURRENCY_ITALIAN_LIRA "Italská lira" + IDS_CURRENCY_CYPRIOT_POUND "Kyperská libra" + IDS_CURRENCY_LUXEMBOURG_FRANC "Lucemburský frank" + IDS_CURRENCY_MALTESE_LIRA "Maltská lira" + IDS_CURRENCY_DEUTSCHE_MARK "Nìmecká marka" + IDS_CURRENCY_DUTCH_GUILDER "Nizozemský gulden" + IDS_CURRENCY_PORTOGUESE_ESCUDO "Portugalské escudo" + IDS_CURRENCY_AUSTRIAN_SCHILLING "Rakouský šilink" + IDS_CURRENCY_GREEK_DRACHMA "Øecká drachma" + IDS_CURRENCY_SLOVAK_KORUNA "Slovenská koruna" + IDS_CURRENCY_SLOVENIAN_TOLAR "Slovinský tolar" + IDS_CURRENCY_SPANISH_PESETA "Španìlská peseta" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C kalorie" - IDS_ENERGY_BTUS "Britsk termln jednotky" + IDS_ENERGY_15_C_CALORIES "15 °C kalorie" + IDS_ENERGY_BTUS "Britské termální jednotky" IDS_ENERGY_EVS "Elektronvolty" IDS_ENERGY_FOOT_POUNDS "Foot-Pounds" IDS_ENERGY_ERGS "Ergy" IDS_ENERGY_JOULES "Jouly" IDS_ENERGY_KILOJOULES "Kilojouly" IDS_ENERGY_KILOWATT_HOURS "Kilowatt hodiny" - IDS_ENERGY_IT_CALORIES "Mezinrodn kalorie" - IDS_ENERGY_IT_KILOCALORIES "Mezinrodn kilokalorie" - IDS_ENERGY_NUTRITION_CALORIES "Nutrin kalorie" - IDS_ENERGY_TH_CALORIES "Termochemick kalorie" + IDS_ENERGY_IT_CALORIES "Mezinárodní kalorie" + IDS_ENERGY_IT_KILOCALORIES "Mezinárodní kilokalorie" + IDS_ENERGY_NUTRITION_CALORIES "Nutrièní kalorie" + IDS_ENERGY_TH_CALORIES "Termochemické kalorie" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "Angstrmy" - IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomick jednotky" + IDS_LENGTH_ANGSTROMS "Angströmy" + IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomické jednotky" IDS_LENGTH_BARLEYCORNS "Barleycorny" IDS_LENGTH_CENTIMETERS "Centimetry" IDS_LENGTH_CHAINS_UK "Chains (Gunter's chains) (UK)" @@ -568,10 +569,10 @@ BEGIN IDS_LENGTH_CHR "Chr" IDS_LENGTH_CUN "Cun" IDS_LENGTH_FATHOMS "Fathomy" - IDS_LENGTH_FATHOMS_HUNGARY "Fathomy (Maarsko)" + IDS_LENGTH_FATHOMS_HUNGARY "Fathomy (Maïarsko)" IDS_LENGTH_FURLONGS "Furlongy" IDS_LENGTH_GAN "Gan" - IDS_LENGTH_HANDS "Hands (dlan)" + IDS_LENGTH_HANDS "Hands (dlanì)" IDS_LENGTH_HUNH "Hunh" IDS_LENGTH_JA "Ja" IDS_LENGTH_JEONG "Jeong" @@ -583,9 +584,9 @@ BEGIN IDS_LENGTH_LINKS_UK "Links (UK)" IDS_LENGTH_METERS "Metry" IDS_LENGTH_MICRONS "Mikrony" - IDS_LENGTH_MILES "Mle" + IDS_LENGTH_MILES "Míle" IDS_LENGTH_MILLIMETERS "Milimetry" - IDS_LENGTH_NAUTICAL_MILES "Nmon mle" + IDS_LENGTH_NAUTICAL_MILES "Námoøní míle" IDS_LENGTH_NIEU "Nieu" IDS_LENGTH_INCHES "Palce" IDS_LENGTH_PARSECS "Parseky" @@ -599,7 +600,7 @@ BEGIN IDS_LENGTH_SPAN "Span" IDS_LENGTH_FEET "Stopy" IDS_LENGTH_SUN "Sun" - IDS_LENGTH_LIGHT_YEARS "Svteln roky" + IDS_LENGTH_LIGHT_YEARS "Svìtelné roky" IDS_LENGTH_TSUEN "Tsuen" IDS_LENGTH_VA "Va" IDS_LENGTH_YARDS "Yardy" @@ -610,9 +611,9 @@ END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_BTUS_PER_MINUTE "Britsk termln jednotky za minutu" + IDS_POWER_BTUS_PER_MINUTE "Britské termální jednotky za minutu" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds za minutu" - IDS_POWER_HORSEPOWER "Kosk sly" + IDS_POWER_HORSEPOWER "Koòské síly" IDS_POWER_KILOWATTS "Kilowatty" IDS_POWER_MEGAWATTS "Megawatty" IDS_POWER_WATTS "Watty" @@ -621,12 +622,12 @@ END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmosfry" + IDS_PRESSURE_ATMOSPHERES "Atmosféry" IDS_PRESSURE_BARS "Bary" IDS_PRESSURE_HECTOPASCALS "Hektopascaly" IDS_PRESSURE_KILOPASCALS "Kilopascaly" - IDS_PRESSURE_PSI "Libry na tvercov palec" - IDS_PRESSURE_MM_OF_MERCURY "Milimetry rtuovho sloupce" + IDS_PRESSURE_PSI "Libry na ètvercový palec" + IDS_PRESSURE_MM_OF_MERCURY "Milimetry rtuového sloupce" IDS_PRESSURE_PASCALS "Pascaly" END @@ -650,7 +651,7 @@ BEGIN IDS_TIME_MINUTES "Minuty" IDS_TIME_SECONDS "Sekundy" IDS_TIME_YEARS "Roky" - IDS_TIME_WEEKS "Tdny" + IDS_TIME_WEEKS "Týdny" END // TYPES OF VELOCITIES @@ -660,7 +661,7 @@ BEGIN IDS_VELOCITY_KILOMETERS_HOUR "Kilometry za hodinu" IDS_VELOCITY_MACH "Machy" IDS_VELOCITY_METERS_SECOND "Metry za sekundu" - IDS_VELOCITY_MILES_HOUR "Mle za hodinu" + IDS_VELOCITY_MILES_HOUR "Míle za hodinu" IDS_VELOCITY_FEET_HOUR "Stopy za hodinu" IDS_VELOCITY_FEET_SECOND "Stopy za sekundu" IDS_VELOCITY_KNOTS "Uzly" @@ -672,30 +673,30 @@ BEGIN IDS_VOLUME_BARRELS_UK "Barely (UK)" IDS_VOLUME_BARRELS_OIL "Barely ropy" IDS_VOLUME_BUN "Bun" - IDS_VOLUME_BUSHELS_UK "Buly (UK)" - IDS_VOLUME_BUSHELS_US "Buly (USA)" - IDS_VOLUME_QUARTS_UK "tvrtky (UK)" - IDS_VOLUME_QUARTS_DRY_US "tvrtky, such (USA)" - IDS_VOLUME_QUARTS_LIQUID_US "tvrtky, tekut (USA)" + IDS_VOLUME_BUSHELS_UK "Bušly (UK)" + IDS_VOLUME_BUSHELS_US "Bušly (USA)" + IDS_VOLUME_QUARTS_UK "Ètvrtky (UK)" + IDS_VOLUME_QUARTS_DRY_US "Ètvrtky, suché (USA)" + IDS_VOLUME_QUARTS_LIQUID_US "Ètvrtky, tekuté (USA)" IDS_VOLUME_DOE "Doe" IDS_VOLUME_GALLONS_UK "Galony (UK)" - IDS_VOLUME_GALLONS_DRY_US "Galony, such (USA)" - IDS_VOLUME_GALLONS_LIQUID_US "Galony, tekut (USA)" + IDS_VOLUME_GALLONS_DRY_US "Galony, suché (USA)" + IDS_VOLUME_GALLONS_LIQUID_US "Galony, tekuté (USA)" IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" IDS_VOLUME_ICCE "Icce" - IDS_VOLUME_CUBIC_CENTIMETERS "Krychlov centimetry" - IDS_VOLUME_CUBIC_FEET "Krychlov stopy" - IDS_VOLUME_CUBIC_INCHES "Krychlov palce" - IDS_VOLUME_CUBIC_METERS "Krychlov metry" - IDS_VOLUME_CUBIC_YARDS "Krychlov yardy" + IDS_VOLUME_CUBIC_CENTIMETERS "Krychlové centimetry" + IDS_VOLUME_CUBIC_FEET "Krychlové stopy" + IDS_VOLUME_CUBIC_INCHES "Krychlové palce" + IDS_VOLUME_CUBIC_METERS "Krychlové metry" + IDS_VOLUME_CUBIC_YARDS "Krychlové yardy" IDS_VOLUME_KWIAN "Kwian" IDS_VOLUME_LITERS "Litry" IDS_VOLUME_MAL "Mal" IDS_VOLUME_MILLILITERS "Mililitry" IDS_VOLUME_PINTS_UK "Pinty (UK)" - IDS_VOLUME_PINTS_DRY_US "Pinty, such (USA)" - IDS_VOLUME_PINTS_LIQUID_US "Pinty, tekut (USA)" + IDS_VOLUME_PINTS_DRY_US "Pinty, suché (USA)" + IDS_VOLUME_PINTS_LIQUID_US "Pinty, tekuté (USA)" IDS_VOLUME_SEKI "Seki" IDS_VOLUME_SYOU "Syou" IDS_VOLUME_TANANLOUNG "Tananloung" @@ -709,17 +710,17 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_WEIGHT_BAHT "Baht" - IDS_WEIGHT_QUINTAL_METRIC "Centy (metrick)" + IDS_WEIGHT_QUINTAL_METRIC "Centy (metrické)" IDS_WEIGHT_CHUNG "Chung" IDS_WEIGHT_DON "Don" IDS_WEIGHT_GEUN "Geun" IDS_WEIGHT_GRAMS "Gramy" IDS_WEIGHT_GWAN "Gwan" IDS_WEIGHT_HARB "Harb" - IDS_WEIGHT_JIN_CHINA "Jin (na)" + IDS_WEIGHT_JIN_CHINA "Jin (Èína)" IDS_WEIGHT_JIN_TAIWAN "Jin (Taiwan)" IDS_WEIGHT_KAN "Kan" - IDS_WEIGHT_CARATS "Karty" + IDS_WEIGHT_CARATS "Karáty" IDS_WEIGHT_KILOGRAMS "Kilogramy" IDS_WEIGHT_KIN "Kin" IDS_WEIGHT_LIANG_CHINA "Liang (China)" @@ -729,9 +730,9 @@ BEGIN IDS_WEIGHT_SALOUNG "Saloung" IDS_WEIGHT_STONES "Stones" IDS_WEIGHT_TAMLUNG "Tamlung" - IDS_WEIGHT_TONNES "Tuny (metrick)" + IDS_WEIGHT_TONNES "Tuny (metrické)" IDS_WEIGHT_TONS_UK "Tuny (UK)" IDS_WEIGHT_TONS_US "Tuny (USA)" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Unce (angloamerick)" - IDS_WEIGHT_OUNCES_TROY "Unce (trojsk/lkrensk)" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Unce (angloamerické)" + IDS_WEIGHT_OUNCES_TROY "Unce (trojské/lékárenské)" END diff --git a/base/applications/calc/lang/de-DE.rc b/base/applications/calc/lang/de-DE.rc index d3aa5436a8f..182c2456af6 100644 --- a/base/applications/calc/lang/de-DE.rc +++ b/base/applications/calc/lang/de-DE.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL // Dialog @@ -151,7 +153,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Zurck",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + PUSHBUTTON "Zurück",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -168,7 +170,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Zurck",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + PUSHBUTTON "Zurück",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -245,7 +247,7 @@ BEGIN BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,232,24,40,17 - CONTROL "Zurck",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | + CONTROL "Zurück",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,24, 40,17 RTEXT "",IDC_TEXT_OUTPUT,4,4,312,12,SS_CENTERIMAGE, @@ -305,7 +307,7 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ber ReactOS Rechner" +CAPTION "Über ReactOS Rechner" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 @@ -344,7 +346,7 @@ BEGIN POPUP "Bearbeiten" BEGIN MENUITEM "Kopieren\tSTRG-C", IDM_EDIT_COPY - MENUITEM "Einfgen\tSTRG-V", IDM_EDIT_PASTE + MENUITEM "Einfügen\tSTRG-V", IDM_EDIT_PASTE END POPUP "Ansicht" BEGIN @@ -355,7 +357,7 @@ BEGIN MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Dezimal\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Oktal\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binr\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Binär\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Degree\tF2", IDM_VIEW_DEG, CHECKED MENUITEM "Radian\tF3", IDM_VIEW_RAD, CHECKED @@ -376,7 +378,7 @@ BEGIN POPUP "Bearbeiten" BEGIN MENUITEM "Kopieren\tSTRG-C", IDM_EDIT_COPY - MENUITEM "Einfgen\tSTRG-V", IDM_EDIT_PASTE + MENUITEM "Einfügen\tSTRG-V", IDM_EDIT_PASTE END POPUP "Ansicht" BEGIN @@ -387,7 +389,7 @@ BEGIN MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Dezimal\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Oktal\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binr\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Binär\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED @@ -400,7 +402,7 @@ BEGIN BEGIN MENUITEM "Hilfethemen", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ber ReactOS Rechner", IDM_HELP_ABOUT + MENUITEM "Über ReactOS Rechner", IDM_HELP_ABOUT END END @@ -409,7 +411,7 @@ BEGIN POPUP "Bearbeiten" BEGIN MENUITEM "Kopieren\tSTRG-C", IDM_EDIT_COPY - MENUITEM "Einfgen\tSTRG-V", IDM_EDIT_PASTE + MENUITEM "Einfügen\tSTRG-V", IDM_EDIT_PASTE END POPUP "Ansicht" BEGIN @@ -423,7 +425,7 @@ BEGIN BEGIN MENUITEM "Hilfethemen", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ber ReactOS Rechner", IDM_HELP_ABOUT + MENUITEM "Über ReactOS Rechner", IDM_HELP_ABOUT END END @@ -431,7 +433,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "ReactOS Rechner ist freie Software, herausgegeben unter der GNU GPL Lizenz.\r\n\r\nSie knnen hier eine Kopie der GNU GPL Lizenz erhalten:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nSie knnen hier auch eine bersetzung der GNU GPL Lizenz erhalten:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "ReactOS Rechner ist freie Software, herausgegeben unter der GNU GPL Lizenz.\r\n\r\nSie können hier eine Kopie der GNU GPL Lizenz erhalten:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nSie können hier auch eine Übersetzung der GNU GPL Lizenz erhalten:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Fehler" IDS_QUICKHELP "Schnellhilfe" END @@ -442,14 +444,14 @@ BEGIN IDS_CONV_POWER "Arbeit" IDS_CONV_PRESSURE "Druck" IDS_CONV_ENERGY "Energie" - IDS_CONV_AREA "Flche" + IDS_CONV_AREA "Fläche" IDS_CONV_VELOCITY "Geschwindigkeit" IDS_CONV_WEIGHT "Gewicht" - IDS_CONV_LENGTH "Lngenma" + IDS_CONV_LENGTH "Längenmaß" IDS_CONV_TEMPERATURE "Temperatur" IDS_CONV_CONSUMPTION "Verbrauch (Motoren)" IDS_CONV_VOLUME "Volumeneinheit" - IDS_CONV_CURRENCY "Whrung" + IDS_CONV_CURRENCY "Währung" IDS_CONV_ANGLE "Winkel" IDS_CONV_TIME "Zeit" END @@ -462,7 +464,7 @@ BEGIN IDS_ANGLE_RADIANS "Radiant" END -// FLCHENTYPEN +// FLÄCHENTYPEN STRINGTABLE DISCARDABLE BEGIN IDS_AREA_ACRES "Acre" @@ -485,7 +487,7 @@ BEGIN IDS_AREA_SQUARE_CHR "Quadratchr" IDS_AREA_SQUARE_FATHOMS "Quadratfathom" IDS_AREA_SQUARE_FATHOMS_HUNGARY "Quadratfathom (Ungarn)" - IDS_AREA_SQUARE_FEET "Quadratfu" + IDS_AREA_SQUARE_FEET "Quadratfuß" IDS_AREA_SQUARE_KILOMETERS "Quadratkilometer" IDS_AREA_SQUARE_LAR "Quadratlar" IDS_AREA_SQUARE_METER "Quadratmeter" @@ -510,21 +512,21 @@ BEGIN IDS_CONSUMPTION_MILES_GALLON_US "Meilen/Gallone (USA)" END -// WHRUNGSTYPEN +// WÄHRUNGSTYPEN STRINGTABLE DISCARDABLE BEGIN IDS_CURRENCY_BELGIAN_FRANC "Belgische Franc" IDS_CURRENCY_DEUTSCHE_MARK "Deutsche Mark" IDS_CURRENCY_EURO "Euro" IDS_CURRENCY_FINNISH_MARKKA "Finnische Mark" - IDS_CURRENCY_FRENCH_FRANC "Franzschische Franc" + IDS_CURRENCY_FRENCH_FRANC "Französchische Franc" IDS_CURRENCY_GREEK_DRACHMA "Griechische Drachme" IDS_CURRENCY_IRISH_POUND "Irische Pfund" IDS_CURRENCY_ITALIAN_LIRA "Italienische Lire" IDS_CURRENCY_LUXEMBOURG_FRANC "Luxemburgische Franc" IDS_CURRENCY_MALTESE_LIRA "Maltesische Lire" - IDS_CURRENCY_DUTCH_GUILDER "Niederlndische Guilder" - IDS_CURRENCY_AUSTRIAN_SCHILLING "sterreichische Schilling" + IDS_CURRENCY_DUTCH_GUILDER "Niederländische Guilder" + IDS_CURRENCY_AUSTRIAN_SCHILLING "Österreichische Schilling" IDS_CURRENCY_PORTOGUESE_ESCUDO "Portugiesische Escudo" IDS_CURRENCY_SLOVAK_KORUNA "Slowakische Krone" IDS_CURRENCY_SLOVENIAN_TOLAR "Slovenische Tolar" @@ -536,11 +538,11 @@ END // ENERGIETYPEN STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C Kalorien" + IDS_ENERGY_15_C_CALORIES "15 °C Kalorien" IDS_ENERGY_BTUS "British thermal unit" IDS_ENERGY_EVS "Elektronenvolt" IDS_ENERGY_ERGS "Ergs" - IDS_ENERGY_NUTRITION_CALORIES "Ernhrung Kalorien" + IDS_ENERGY_NUTRITION_CALORIES "Ernährung Kalorien" IDS_ENERGY_FOOT_POUNDS "Foot-Pound" IDS_ENERGY_IT_CALORIES "International Kalorien" IDS_ENERGY_IT_KILOCALORIES "International Kilokalorien" @@ -550,10 +552,10 @@ BEGIN IDS_ENERGY_TH_CALORIES "Thermochemische Kalorie" END -// LNGENTYPEN +// LÄNGENTYPEN STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "Angstrms" + IDS_LENGTH_ANGSTROMS "Angströms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomische Einheiten" IDS_LENGTH_CHAINS_UK "Chains (UK)" IDS_LENGTH_CHI "Chi" @@ -563,10 +565,10 @@ BEGIN IDS_LENGTH_FATHOMS "Fathome" IDS_LENGTH_FATHOMS_HUNGARY "Fathome (Ungarn)" IDS_LENGTH_FURLONGS "Furlongs" - IDS_LENGTH_FEET "Fu" + IDS_LENGTH_FEET "Fuß" IDS_LENGTH_GAN "Gan" IDS_LENGTH_BARLEYCORNS "Gerstenkorn" - IDS_LENGTH_HANDS "Hnde" + IDS_LENGTH_HANDS "Hände" IDS_LENGTH_HUNH "Hunh" IDS_LENGTH_JA "Ja" IDS_LENGTH_JEONG "Jeong" @@ -609,14 +611,14 @@ BEGIN IDS_POWER_FPS_PER_MINUTE "Foot-Pound pro Minute" IDS_POWER_KILOWATTS "Kilowatt" IDS_POWER_MEGAWATTS "Megawatt" - IDS_POWER_HORSEPOWER "Pferdestrken" + IDS_POWER_HORSEPOWER "Pferdestärken" IDS_POWER_WATTS "Watt" END // DRUCKTYPEN STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmosphren" + IDS_PRESSURE_ATMOSPHERES "Atmosphären" IDS_PRESSURE_BARS "Bar" IDS_PRESSURE_HECTOPASCALS "Hektopascal" IDS_PRESSURE_KILOPASCALS "Kilopascal" @@ -652,8 +654,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_VELOCITY_CMS_SECOND "Zentimeter/Sekunde" - IDS_VELOCITY_FEET_SECOND "Fu/Sekunde" - IDS_VELOCITY_FEET_HOUR "Fu/Stunde" + IDS_VELOCITY_FEET_SECOND "Fuß/Sekunde" + IDS_VELOCITY_FEET_HOUR "Fuß/Stunde" IDS_VELOCITY_KILOMETERS_HOUR "Kilometer/Stunde" IDS_VELOCITY_KNOTS "Knoten" IDS_VELOCITY_MACH "Mach" @@ -665,9 +667,9 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrel (UK)" - IDS_VOLUME_BARRELS_OIL "Barrel l" + IDS_VOLUME_BARRELS_OIL "Barrel Öl" IDS_VOLUME_BUN "Bun" - IDS_VOLUME_CUBIC_FEET "Kubikfu" + IDS_VOLUME_CUBIC_FEET "Kubikfuß" IDS_VOLUME_CUBIC_METERS "Kubikmeter" IDS_VOLUME_CUBIC_YARDS "Kubikyard" IDS_VOLUME_CUBIC_CENTIMETERS "Kubikzentimeter" @@ -676,7 +678,7 @@ BEGIN IDS_VOLUME_FLUID_OUNCES_UK "Fluid Unzen (UK)" IDS_VOLUME_FLUID_OUNCES_US "Fluid Unzen (USA)" IDS_VOLUME_GALLONS_UK "Gallonen (UK)" - IDS_VOLUME_GALLONS_LIQUID_US "Gallonen, flssig (USA)" + IDS_VOLUME_GALLONS_LIQUID_US "Gallonen, flüssig (USA)" IDS_VOLUME_GALLONS_DRY_US "Gallonen, trocken (USA)" IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" @@ -687,9 +689,9 @@ BEGIN IDS_VOLUME_MILLILITERS "Milliliter" IDS_VOLUME_PINTS_UK "Pints (UK)" IDS_VOLUME_PINTS_DRY_US "Pints, trocken (USA)" - IDS_VOLUME_PINTS_LIQUID_US "Pints, flssig (USA)" + IDS_VOLUME_PINTS_LIQUID_US "Pints, flüssig (USA)" IDS_VOLUME_QUARTS_UK "Quarts (UK)" - IDS_VOLUME_QUARTS_LIQUID_US "Quarts, flssig (USA)" + IDS_VOLUME_QUARTS_LIQUID_US "Quarts, flüssig (USA)" IDS_VOLUME_QUARTS_DRY_US "Quarts, trocken (USA)" IDS_VOLUME_BUSHELS_UK "Scheffel (UK)" IDS_VOLUME_BUSHELS_US "Scheffel (USA)" diff --git a/base/applications/calc/lang/el-GR.rc b/base/applications/calc/lang/el-GR.rc index 5f88a9465e1..cc291402c80 100644 --- a/base/applications/calc/lang/el-GR.rc +++ b/base/applications/calc/lang/el-GR.rc @@ -1,10 +1,12 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_GREEK, SUBLANG_DEFAULT // Dialog IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Αριθμομηχανή" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -141,11 +143,11 @@ BEGIN WS_VISIBLE,232,24,33,10 CONTROL "Byte",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,272,24,30,10 - CONTROL "",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + CONTROL "Βαθμοί",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "Μοίρες",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 - CONTROL "",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + CONTROL "Ακτίνια",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -160,7 +162,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Αριθμομηχανή" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -227,14 +229,14 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Αριθμομηχανή" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN PUSHBUTTON "Convert",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT ":",IDC_STATIC,4,20,56,8 + LTEXT "Κατηγορία:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT LTEXT "Convert from:",IDC_STATIC,4,49,56,8 @@ -305,16 +307,16 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "..." +CAPTION "Σχετικά..." FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT "",IDC_STATIC,120,12,132,8, + LTEXT "Αριθμομηχανή",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE - LTEXT " ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE - LTEXT " Carlo Bramini",IDC_STATIC,120,32,132,8, + LTEXT "Έκδοση ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Από τον Carlo Bramini",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 GROUPBOX "",IDC_STATIC,4,56,256,88 @@ -341,16 +343,16 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Επεξεργασία" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Αντιγραφή\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Επικόλληση\tCTRL-V", IDM_EDIT_PASTE END POPUP "View" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Τυπική", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Επιστημονική", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Μετατροπή", IDM_VIEW_CONVERSION MENUITEM SEPARATOR MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED @@ -365,65 +367,65 @@ BEGIN END POPUP "Help" BEGIN - MENUITEM " ", IDM_HELP_HELP + MENUITEM "Θέματα Βοήθειας", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "...", IDM_HELP_ABOUT + MENUITEM "Σχετικά...", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Επεξεργασία" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Αντιγραφή\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Επικόλληση\tCTRL-V", IDM_EDIT_PASTE END POPUP "View" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Τυπική", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Επιστημονική", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Μετατροπή", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Δεκαεξαδικό\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Δεκαδικό\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Οκταδικό\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Δυαδικό\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Ομαδοποίηση ψηφίων", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Βοήθεια" BEGIN - MENUITEM " ", IDM_HELP_HELP + MENUITEM "Θέματα Βοήθειας", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "...", IDM_HELP_ABOUT + MENUITEM "Σχετικά...", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Επεξεργασία" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Αντιγραφή\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Επικόλληση\tCTRL-V", IDM_EDIT_PASTE END POPUP "View" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Τυπική", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Επιστημονική", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Μετατροπή", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Ομαδοποίηση ψηφίων", IDM_VIEW_GROUP, CHECKED END POPUP "Help" BEGIN - MENUITEM " ", IDM_HELP_HELP + MENUITEM "Θέματα Βοήθειας", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "...", IDM_HELP_ABOUT + MENUITEM "Σχετικά...", IDM_HELP_ABOUT END END @@ -432,34 +434,34 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "" + IDS_MATH_ERROR "Σφάλμα" IDS_QUICKHELP "Quick help" END // Types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "" - IDS_CONV_AREA "" + IDS_CONV_ANGLE "Γωνία" + IDS_CONV_AREA "Εμβαδό" IDS_CONV_CONSUMPTION "Consumption (engines)" - IDS_CONV_CURRENCY "" - IDS_CONV_ENERGY "" + IDS_CONV_CURRENCY "Συνάλλαγμα" + IDS_CONV_ENERGY "Ενέργεια" IDS_CONV_LENGTH "Lenghts" - IDS_CONV_POWER "" - IDS_CONV_PRESSURE "" - IDS_CONV_TEMPERATURE "" - IDS_CONV_TIME "" - IDS_CONV_VELOCITY "" - IDS_CONV_VOLUME "" + IDS_CONV_POWER "Δύναμη" + IDS_CONV_PRESSURE "Πίεση" + IDS_CONV_TEMPERATURE "Θερμοκρασία" + IDS_CONV_TIME "Ώρα" + IDS_CONV_VELOCITY "Ταχύτητα" + IDS_CONV_VOLUME "Ένταση" IDS_CONV_WEIGHT "Weights" END // TYPES OF ANGLES STRINGTABLE DISCARDABLE BEGIN - IDS_ANGLE_DEGREES "" - IDS_ANGLE_GRADIANS "" - IDS_ANGLE_RADIANS "" + IDS_ANGLE_DEGREES "Βαθμοί" + IDS_ANGLE_GRADIANS "Ακτίνια" + IDS_ANGLE_RADIANS "Μοίρες" END // TYPES OF AREAS @@ -514,29 +516,29 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling" - IDS_CURRENCY_BELGIAN_FRANC " " - IDS_CURRENCY_CYPRIOT_POUND " " + IDS_CURRENCY_BELGIAN_FRANC "Βέλγικο φράγκο" + IDS_CURRENCY_CYPRIOT_POUND "Κυπριακή λίρα" IDS_CURRENCY_CZECH_KORUNA "Czech koruna" - IDS_CURRENCY_DEUTSCHE_MARK " " + IDS_CURRENCY_DEUTSCHE_MARK "Γερμανικό μάρκο" IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder" - IDS_CURRENCY_EURO "" + IDS_CURRENCY_EURO "Ευρώ" IDS_CURRENCY_FINNISH_MARKKA "Finnish markka" - IDS_CURRENCY_FRENCH_FRANC " " - IDS_CURRENCY_GREEK_DRACHMA "" + IDS_CURRENCY_FRENCH_FRANC "Γαλλικό φράγκο" + IDS_CURRENCY_GREEK_DRACHMA "Δραχμή" IDS_CURRENCY_IRISH_POUND "Irish pound" - IDS_CURRENCY_ITALIAN_LIRA " " + IDS_CURRENCY_ITALIAN_LIRA "Ιταλική λίρα" IDS_CURRENCY_LUXEMBOURG_FRANC "Luxembourg franc" - IDS_CURRENCY_MALTESE_LIRA " " - IDS_CURRENCY_PORTOGUESE_ESCUDO " " + IDS_CURRENCY_MALTESE_LIRA "Μαλτέζικη λίρα" + IDS_CURRENCY_PORTOGUESE_ESCUDO "Πορτογαλικό εσκούδο" IDS_CURRENCY_SLOVAK_KORUNA "Slovak koruna" IDS_CURRENCY_SLOVENIAN_TOLAR "Slovenian tolar" - IDS_CURRENCY_SPANISH_PESETA " " + IDS_CURRENCY_SPANISH_PESETA "Ισπανική πεσέτα" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C calories" + IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "British Thermal Units" IDS_ENERGY_ERGS "Ergs" IDS_ENERGY_EVS "Electron-Volts" @@ -556,7 +558,7 @@ BEGIN IDS_LENGTH_ANGSTROMS "Angstroms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" IDS_LENGTH_BARLEYCORNS "Barleycorns" - IDS_LENGTH_CENTIMETERS "" + IDS_LENGTH_CENTIMETERS "Εκατοστά" IDS_LENGTH_CHAINS_UK "Chains (UK)" IDS_LENGTH_CHI "Chi" IDS_LENGTH_CHOU "Chou" @@ -564,24 +566,24 @@ BEGIN IDS_LENGTH_CUN "Cun" IDS_LENGTH_FATHOMS "Fathoms" IDS_LENGTH_FATHOMS_HUNGARY "Fathoms (Hungary)" - IDS_LENGTH_FEET "" + IDS_LENGTH_FEET "Πόδια" IDS_LENGTH_FURLONGS "Furlongs" IDS_LENGTH_GAN "Gan" IDS_LENGTH_HANDS "Hands" IDS_LENGTH_HUNH "Hunh" - IDS_LENGTH_INCHES "" + IDS_LENGTH_INCHES "Ίντσες" IDS_LENGTH_JA "Ja" IDS_LENGTH_JEONG "Jeong" IDS_LENGTH_KABIET "Kabiet" IDS_LENGTH_KEN "Ken" IDS_LENGTH_KEUB "Keub" - IDS_LENGTH_KILOMETERS "" + IDS_LENGTH_KILOMETERS "Χιλιόμετρα" IDS_LENGTH_LAR "Lar" IDS_LENGTH_LIGHT_YEARS "Light years" IDS_LENGTH_LINKS_UK "Links (UK)" - IDS_LENGTH_METERS "" + IDS_LENGTH_METERS "Μέτρα" IDS_LENGTH_MICRONS "Microns" - IDS_LENGTH_MILES "" + IDS_LENGTH_MILES "Μίλια" IDS_LENGTH_MILLIMETERS "Millimeters" IDS_LENGTH_NAUTICAL_MILES "Nautical miles" IDS_LENGTH_NIEU "Nieu" @@ -597,7 +599,7 @@ BEGIN IDS_LENGTH_SUN "Sun" IDS_LENGTH_TSUEN "Tsuen" IDS_LENGTH_VA "Va" - IDS_LENGTH_YARDS "" + IDS_LENGTH_YARDS "Γιάρδες" IDS_LENGTH_YOTE "Yote" IDS_LENGTH_ZHANG "Zhang" END @@ -616,7 +618,7 @@ END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "" + IDS_PRESSURE_ATMOSPHERES "Ατμόσφαιρες" IDS_PRESSURE_BARS "Bars" IDS_PRESSURE_HECTOPASCALS "Hectopascals" IDS_PRESSURE_KILOPASCALS "Kilopascals" @@ -628,37 +630,37 @@ END // TYPES OF TEMPERATURES STRINGTABLE DISCARDABLE BEGIN - IDS_TEMPERATURE_CELSIUS "" - IDS_TEMPERATURE_FAHRENHEIT "" - IDS_TEMPERATURE_KELVIN "" + IDS_TEMPERATURE_CELSIUS "Κελσίου" + IDS_TEMPERATURE_FAHRENHEIT "Φαρενάιτ" + IDS_TEMPERATURE_KELVIN "Κέλβιν" IDS_TEMPERATURE_RANKINE "Rankine" END // TYPES OF TIME STRINGTABLE DISCARDABLE BEGIN - IDS_TIME_DAYS "" - IDS_TIME_HOURS "" + IDS_TIME_DAYS "Μέρες" + IDS_TIME_HOURS "Ώρες" IDS_TIME_NANOSECONDS "Nanoseconds" - IDS_TIME_MICROSECONDS "" - IDS_TIME_MILLISECONDS "" - IDS_TIME_MINUTES "" - IDS_TIME_SECONDS "" - IDS_TIME_WEEKS "" - IDS_TIME_YEARS "" + IDS_TIME_MICROSECONDS "Μικροδευτερόλεπτα" + IDS_TIME_MILLISECONDS "Μιλιδευτερόλεπτα" + IDS_TIME_MINUTES "Λεπτά" + IDS_TIME_SECONDS "Δευτερόλεπτα" + IDS_TIME_WEEKS "Εβδομάδες" + IDS_TIME_YEARS "Χρόνια" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND "/" - IDS_VELOCITY_FEET_HOUR "/" - IDS_VELOCITY_FEET_SECOND "/" - IDS_VELOCITY_KILOMETERS_HOUR "/" + IDS_VELOCITY_CMS_SECOND "Εκατοστά/ώρα" + IDS_VELOCITY_FEET_HOUR "Πόδια/ώρα" + IDS_VELOCITY_FEET_SECOND "Πόδια/δευτερόλεπτο" + IDS_VELOCITY_KILOMETERS_HOUR "Χιλιόμετρα/ώρα" IDS_VELOCITY_KNOTS "Knots" IDS_VELOCITY_MACH "Mach" - IDS_VELOCITY_METERS_SECOND "/" - IDS_VELOCITY_MILES_HOUR "/" + IDS_VELOCITY_METERS_SECOND "Μέτρα/δευτερόλεπτο" + IDS_VELOCITY_MILES_HOUR "Μίλια/ώρα" END // TYPES OF VOLUMES diff --git a/base/applications/calc/lang/es-ES.rc b/base/applications/calc/lang/es-ES.rc index 88e89a384fe..203630a0b4c 100644 --- a/base/applications/calc/lang/es-ES.rc +++ b/base/applications/calc/lang/es-ES.rc @@ -1,6 +1,7 @@ /* * Spanish Language resource file * Traducido por: Javier Remacha 2008 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL @@ -148,7 +149,7 @@ BEGIN WS_VISIBLE,272,24,30,10 CONTROL "Sexagesimal",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 54,10 - CONTROL "Radin",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,212, + CONTROL "Radián",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,212, 24,42,10 CONTROL "Centesimal",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 256,24,50,10 @@ -239,7 +240,7 @@ BEGIN PUSHBUTTON "Convertir",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Categora:",IDC_STATIC,4,20,56,8 + LTEXT "Categoría:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT LTEXT "Convertir de:",IDC_STATIC,4,49,56,8 @@ -318,7 +319,7 @@ BEGIN SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 LTEXT "Calculadora ReactOS",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE - LTEXT "Versin ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Versión ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE LTEXT "Escrita por Carlo Bramini",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 @@ -329,7 +330,7 @@ END IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Cuadro de estadsticas" +CAPTION "Cuadro de estadísticas" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | @@ -346,16 +347,16 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "Edicin" + POPUP "Edición" BEGIN MENUITEM "Copiar\tCTRL-C", IDM_EDIT_COPY MENUITEM "Pegar\tCTRL-V", IDM_EDIT_PASTE END POPUP "Ver" BEGIN - MENUITEM "Estndar", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Cientfica", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "Conversin", IDM_VIEW_CONVERSION + MENUITEM "Estándar", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Científica", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversión", IDM_VIEW_CONVERSION MENUITEM SEPARATOR MENUITEM "Hexadecimal\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED @@ -363,10 +364,10 @@ BEGIN MENUITEM "Binario\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Sexagesimal\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "Radin\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Radián\tF3", IDM_VIEW_RAD, CHECKED MENUITEM "Centesimal\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM "Nmero de dgitos en grupo", IDM_VIEW_GROUP, CHECKED + MENUITEM "Número de dígitos en grupo", IDM_VIEW_GROUP, CHECKED END POPUP "Ayuda" BEGIN @@ -378,16 +379,16 @@ END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "Edicin" + POPUP "Edición" BEGIN MENUITEM "Copiar\tCTRL-C", IDM_EDIT_COPY MENUITEM "Pegar\tCTRL-V", IDM_EDIT_PASTE END POPUP "Ver" BEGIN - MENUITEM "Estndar", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Cientfica", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "Conversin", IDM_VIEW_CONVERSION + MENUITEM "Estándar", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Científica", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversión", IDM_VIEW_CONVERSION MENUITEM SEPARATOR MENUITEM "Hexadecimal\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED @@ -399,7 +400,7 @@ BEGIN MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "Nmero de dgitos en grupo", IDM_VIEW_GROUP, CHECKED + MENUITEM "Número de dígitos en grupo", IDM_VIEW_GROUP, CHECKED END POPUP "Ayuda" BEGIN @@ -411,18 +412,18 @@ END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "Edicin" + POPUP "Edición" BEGIN MENUITEM "Copiar\tCTRL-C", IDM_EDIT_COPY MENUITEM "Pegar\tCTRL-V", IDM_EDIT_PASTE END POPUP "Ver" BEGIN - MENUITEM "Estndar", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Cientfica", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "Conversin", IDM_VIEW_CONVERSION + MENUITEM "Estándar", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Científica", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Conversión", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "Nmero de dgitos en grupo", IDM_VIEW_GROUP, CHECKED + MENUITEM "Número de dígitos en grupo", IDM_VIEW_GROUP, CHECKED END POPUP "Ayuda" BEGIN @@ -436,22 +437,22 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "Calculadora ReactOS es software gratuito realizado bajo licencia GNU GPL.\r\n\r\nPuedes coger una copia de la licencia GNU GPL aqu:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nPuedes tambin coger una traduccin de la licencia GNU GPL aqu:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "Calculadora ReactOS es software gratuito realizado bajo licencia GNU GPL.\r\n\r\nPuedes coger una copia de la licencia GNU GPL aquí:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nPuedes también coger una traducción de la licencia GNU GPL aquí:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Error" - IDS_QUICKHELP "Ayuda rpida" + IDS_QUICKHELP "Ayuda rápida" END // Types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "ngulo" - IDS_CONV_AREA "rea" + IDS_CONV_ANGLE "Ángulo" + IDS_CONV_AREA "Área" IDS_CONV_CONSUMPTION "Consumo (motores)" IDS_CONV_CURRENCY "Monedas" - IDS_CONV_ENERGY "Energa" + IDS_CONV_ENERGY "Energía" IDS_CONV_LENGTH "Longitud" IDS_CONV_POWER "Potencia" - IDS_CONV_PRESSURE "Presin" + IDS_CONV_PRESSURE "Presión" IDS_CONV_TEMPERATURE "Temperatura" IDS_CONV_TIME "Tiempo" IDS_CONV_VELOCITY "Velocidad" @@ -475,29 +476,29 @@ BEGIN IDS_AREA_ACRES_FRANCE "Acres (Francia)" IDS_AREA_ACRES_SCOTS "Acres (Escocia)" IDS_AREA_ACRES_US "Acres (US)" - IDS_AREA_ARES "rea" + IDS_AREA_ARES "Área" IDS_AREA_CHOU "Chou" IDS_AREA_DANBO "Danbo" - IDS_AREA_HECTARES "Hectrias" + IDS_AREA_HECTARES "Hectárias" IDS_AREA_JEONGBO "Jeongbo" - IDS_AREA_MORGEN_HUNGARY "Morgen (Hungra)" + IDS_AREA_MORGEN_HUNGARY "Morgen (Hungría)" IDS_AREA_MU "Mu" IDS_AREA_PING "Ping" IDS_AREA_PYEONG "Pyeong" IDS_AREA_PYEONGBANGJA "Pyeongbangja" IDS_AREA_RAI "Rai" IDS_AREA_SE "Se" - IDS_AREA_SQUARE_CENTIMETERS "Centmetros cuadrados" + IDS_AREA_SQUARE_CENTIMETERS "Centímetros cuadrados" IDS_AREA_SQUARE_CHR "Square chr" IDS_AREA_SQUARE_FATHOMS "Braza cuadrada" - IDS_AREA_SQUARE_FATHOMS_HUNGARY "Braza cuadrada (Hungra)" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Braza cuadrada (Hungría)" IDS_AREA_SQUARE_FEET "Pies cuadrados" IDS_AREA_SQUARE_INCHES "Pulgadas cuadradas" - IDS_AREA_SQUARE_KILOMETERS "Kilmetros cuadrados" + IDS_AREA_SQUARE_KILOMETERS "Kilómetros cuadrados" IDS_AREA_SQUARE_LAR "Square lar" IDS_AREA_SQUARE_METER "Metros cuadrado" IDS_AREA_SQUARE_MILES "Millas cuadradas" - IDS_AREA_SQUARE_MILLIMETERS "Milmetros cuadrados" + IDS_AREA_SQUARE_MILLIMETERS "Milímetros cuadrados" IDS_AREA_SQUARE_SHAKU "Square shaku" IDS_AREA_SQUARE_TSUEN "Square tsuen" IDS_AREA_SQUARE_VA "Square va" @@ -511,8 +512,8 @@ STRINGTABLE DISCARDABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometros/litro" IDS_CONSUMPTION_L_PER_100_KM "Litros/100 kilometros" - IDS_CONSUMPTION_MILES_GALLON_UK "Millas/galn (UK)" - IDS_CONSUMPTION_MILES_GALLON_US "Millas/galn (US)" + IDS_CONSUMPTION_MILES_GALLON_UK "Millas/galón (UK)" + IDS_CONSUMPTION_MILES_GALLON_US "Millas/galón (US)" END // TYPES OF CURRENCIES @@ -522,46 +523,46 @@ BEGIN IDS_CURRENCY_BELGIAN_FRANC "Franco Belga" IDS_CURRENCY_CYPRIOT_POUND "Libra Chipriota" IDS_CURRENCY_CZECH_KORUNA "Corona Checa" - IDS_CURRENCY_DEUTSCHE_MARK "Marco Alemn" - IDS_CURRENCY_DUTCH_GUILDER "Florn Neerlands" + IDS_CURRENCY_DEUTSCHE_MARK "Marco Alemán" + IDS_CURRENCY_DUTCH_GUILDER "Florín Neerlandés" IDS_CURRENCY_EURO "Euro" - IDS_CURRENCY_FINNISH_MARKKA "Marco Finlands" + IDS_CURRENCY_FINNISH_MARKKA "Marco Finlandés" IDS_CURRENCY_FRENCH_FRANC "Franco Frances" IDS_CURRENCY_GREEK_DRACHMA "Drachma Griego" IDS_CURRENCY_IRISH_POUND "Libra Irlandesa" IDS_CURRENCY_ITALIAN_LIRA "Lira Italiana" - IDS_CURRENCY_LUXEMBOURG_FRANC "Franco Luxemburgus" + IDS_CURRENCY_LUXEMBOURG_FRANC "Franco Luxemburgués" IDS_CURRENCY_MALTESE_LIRA "Lira Maltesa" - IDS_CURRENCY_PORTOGUESE_ESCUDO "Escudo Portugus" + IDS_CURRENCY_PORTOGUESE_ESCUDO "Escudo Portugués" IDS_CURRENCY_SLOVAK_KORUNA "Corona Eslovaca" IDS_CURRENCY_SLOVENIAN_TOLAR "Tolar Esloveno" - IDS_CURRENCY_SPANISH_PESETA "Peseta Espaola" + IDS_CURRENCY_SPANISH_PESETA "Peseta Española" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C caloras" + IDS_ENERGY_15_C_CALORIES "15 °C calorías" IDS_ENERGY_BTUS "BTU" IDS_ENERGY_ERGS "Ergios" IDS_ENERGY_EVS "Electronovoltios" - IDS_ENERGY_FOOT_POUNDS "FtLbs" - IDS_ENERGY_IT_CALORIES "Tabla internacional de caloras" - IDS_ENERGY_IT_KILOCALORIES "Tabla internacional de kilocaloras" + IDS_ENERGY_FOOT_POUNDS "Ft·Lbs" + IDS_ENERGY_IT_CALORIES "Tabla internacional de calorías" + IDS_ENERGY_IT_KILOCALORIES "Tabla internacional de kilocalorías" IDS_ENERGY_JOULES "Julios" IDS_ENERGY_KILOJOULES "Kilojulios" IDS_ENERGY_KILOWATT_HOURS "Kilowatios hora" - IDS_ENERGY_NUTRITION_CALORIES "Caloras nutricionales" - IDS_ENERGY_TH_CALORIES "Caloras termoqumicas" + IDS_ENERGY_NUTRITION_CALORIES "Calorías nutricionales" + IDS_ENERGY_TH_CALORIES "Calorías termoquímicas" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "ngstrms" + IDS_LENGTH_ANGSTROMS "Ångströms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" IDS_LENGTH_BARLEYCORNS "Barleycorns" - IDS_LENGTH_CENTIMETERS "Centmetros" + IDS_LENGTH_CENTIMETERS "Centímetros" IDS_LENGTH_CHAINS_UK "Cadenas (UK)" IDS_LENGTH_CHI "Chi" IDS_LENGTH_CHOU "Chou" @@ -582,12 +583,12 @@ BEGIN IDS_LENGTH_KEUB "Keub" IDS_LENGTH_KILOMETERS "Kilometros" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "Aos luz" + IDS_LENGTH_LIGHT_YEARS "Años luz" IDS_LENGTH_LINKS_UK "Links (UK)" IDS_LENGTH_METERS "Metros" - IDS_LENGTH_MICRONS "Micrmetros" + IDS_LENGTH_MICRONS "Micrómetros" IDS_LENGTH_MILES "Millas" - IDS_LENGTH_MILLIMETERS "Milmetros" + IDS_LENGTH_MILLIMETERS "Milímetros" IDS_LENGTH_NAUTICAL_MILES "Millas nauticas" IDS_LENGTH_NIEU "Nieu" IDS_LENGTH_PARSECS "Parsecs" @@ -611,7 +612,7 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "BTU/Minuto" - IDS_POWER_FPS_PER_MINUTE "FtLbs/Minuto" + IDS_POWER_FPS_PER_MINUTE "Ft·Lbs/Minuto" IDS_POWER_HORSEPOWER "Caballos de vapor" IDS_POWER_KILOWATTS "Kilowatios" IDS_POWER_MEGAWATTS "Megawatios" @@ -621,11 +622,11 @@ END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmsferas" + IDS_PRESSURE_ATMOSPHERES "Atmósferas" IDS_PRESSURE_BARS "Bares" IDS_PRESSURE_HECTOPASCALS "Kilopascales" IDS_PRESSURE_KILOPASCALS "Hectopascales" - IDS_PRESSURE_MM_OF_MERCURY "Milmetros de mercurio" + IDS_PRESSURE_MM_OF_MERCURY "Milímetros de mercurio" IDS_PRESSURE_PASCALS "Pascales" IDS_PRESSURE_PSI "Libras fuerza por pulgada cuadrada" END @@ -642,7 +643,7 @@ END // TYPES OF TIME STRINGTABLE DISCARDABLE BEGIN - IDS_TIME_DAYS "Das" + IDS_TIME_DAYS "Días" IDS_TIME_HOURS "Horas" IDS_TIME_NANOSECONDS "Nanoseconds" IDS_TIME_MICROSECONDS "Microsegundos" @@ -650,13 +651,13 @@ BEGIN IDS_TIME_MINUTES "Minutos" IDS_TIME_SECONDS "Segundos" IDS_TIME_WEEKS "Semanas" - IDS_TIME_YEARS "Aos" + IDS_TIME_YEARS "Años" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND "Centmetros/segundo" + IDS_VELOCITY_CMS_SECOND "Centímetros/segundo" IDS_VELOCITY_FEET_HOUR "Pies/hora" IDS_VELOCITY_FEET_SECOND "Pies/segundo" IDS_VELOCITY_KILOMETERS_HOUR "Kilometros/hora" @@ -672,16 +673,16 @@ BEGIN IDS_VOLUME_BARRELS_UK "Barriles (UK)" IDS_VOLUME_BARRELS_OIL "Barriles de petroleo" IDS_VOLUME_BUN "Bun" - IDS_VOLUME_BUSHELS_UK "Celemn (UK)" - IDS_VOLUME_BUSHELS_US "Celemn (US)" - IDS_VOLUME_CUBIC_CENTIMETERS "Centmetros cbicos" - IDS_VOLUME_CUBIC_FEET "Pes cbicos" - IDS_VOLUME_CUBIC_INCHES "Pulgadas cbicas" - IDS_VOLUME_CUBIC_METERS "Metros cbicos" - IDS_VOLUME_CUBIC_YARDS "Yardas cbicas" + IDS_VOLUME_BUSHELS_UK "Celemín (UK)" + IDS_VOLUME_BUSHELS_US "Celemín (US)" + IDS_VOLUME_CUBIC_CENTIMETERS "Centímetros cúbicos" + IDS_VOLUME_CUBIC_FEET "Píes cúbicos" + IDS_VOLUME_CUBIC_INCHES "Pulgadas cúbicas" + IDS_VOLUME_CUBIC_METERS "Metros cúbicos" + IDS_VOLUME_CUBIC_YARDS "Yardas cúbicas" IDS_VOLUME_DOE "Doe" - IDS_VOLUME_FLUID_OUNCES_UK "Onza lquida (UK)" - IDS_VOLUME_FLUID_OUNCES_US "Onza lquida (US)" + IDS_VOLUME_FLUID_OUNCES_UK "Onza líquida (UK)" + IDS_VOLUME_FLUID_OUNCES_US "Onza líquida (US)" IDS_VOLUME_GALLONS_UK "Galones (UK)" IDS_VOLUME_GALLONS_DRY_US "Galones, dry (US)" IDS_VOLUME_GALLONS_LIQUID_US "Galones, liquid (US)" diff --git a/base/applications/calc/lang/fr-FR.rc b/base/applications/calc/lang/fr-FR.rc index 8536cdb8d9d..f455536eddb 100644 --- a/base/applications/calc/lang/fr-FR.rc +++ b/base/applications/calc/lang/fr-FR.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL // Dialog @@ -141,7 +143,7 @@ BEGIN WS_VISIBLE,232,24,33,10 CONTROL "Octet",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,272,24,30,10 - CONTROL "Degrs",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + CONTROL "Degrés",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 CONTROL "Radians",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 @@ -151,7 +153,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Retour arrire",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + PUSHBUTTON "Retour arrière",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -168,7 +170,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Retour arrire",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + PUSHBUTTON "Retour arrière",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -234,7 +236,7 @@ BEGIN PUSHBUTTON "Convertir",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Catgorie :",IDC_STATIC,4,20,56,8 + LTEXT "Catégorie :",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT LTEXT "Convertir depuis :",IDC_STATIC,4,49,56,8 @@ -245,7 +247,7 @@ BEGIN BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,232,24,40,17 - CONTROL "Retour arrire",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | + CONTROL "Retour arrière",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,24, 40,17 RTEXT "",IDC_TEXT_OUTPUT,4,4,312,12,SS_CENTERIMAGE, @@ -305,7 +307,7 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " propos de la Calculatrice ReactOS" +CAPTION "À propos de la Calculatrice ReactOS" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 @@ -341,7 +343,7 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "dition" + POPUP "Édition" BEGIN MENUITEM "Copier\tCTRL-C", IDM_EDIT_COPY MENUITEM "Coller\tCTRL-V", IDM_EDIT_PASTE @@ -352,12 +354,12 @@ BEGIN MENUITEM "Scientifique", IDM_VIEW_SCIENTIFIC, CHECKED MENUITEM "Conversion", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "Hexadcimal\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Dcimal\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Hexadécimal\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Décimal\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Octal\tF7", IDM_VIEW_OCT, CHECKED MENUITEM "Binaire\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "Degrs\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "Degrés\tF2", IDM_VIEW_DEG, CHECKED MENUITEM "Radians\tF3", IDM_VIEW_RAD, CHECKED MENUITEM "Grades\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR @@ -367,13 +369,13 @@ BEGIN BEGIN MENUITEM "Rubriques d'aide", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " propos de la Calculatrice ReactOS", IDM_HELP_ABOUT + MENUITEM "À propos de la Calculatrice ReactOS", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "dition" + POPUP "Édition" BEGIN MENUITEM "Copier\tCTRL-C", IDM_EDIT_COPY MENUITEM "Coller\tCTRL-V", IDM_EDIT_PASTE @@ -384,8 +386,8 @@ BEGIN MENUITEM "Scientifique", IDM_VIEW_SCIENTIFIC, CHECKED MENUITEM "Conversion", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "Hexadcimal\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Dcimal\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Hexadécimal\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Décimal\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Octal\tF7", IDM_VIEW_OCT, CHECKED MENUITEM "Binaire\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR @@ -400,13 +402,13 @@ BEGIN BEGIN MENUITEM "Rubriques d'aide", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " propos de la Calculatrice ReactOS", IDM_HELP_ABOUT + MENUITEM "À propos de la Calculatrice ReactOS", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "dition" + POPUP "Édition" BEGIN MENUITEM "Copier\tCTRL-C", IDM_EDIT_COPY MENUITEM "Coller\tCTRL-V", IDM_EDIT_PASTE @@ -423,7 +425,7 @@ BEGIN BEGIN MENUITEM "Rubriques d'aide", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " propos de la Calculatrice ReactOS", IDM_HELP_ABOUT + MENUITEM "À propos de la Calculatrice ReactOS", IDM_HELP_ABOUT END END @@ -431,7 +433,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "Calculatrice ReactOS est un logiciel libre distribu sous licence GNU GPL.\r\n\r\nVous pouvez obtenir une copie de la licence GNU GPL ici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nVous pouvez aussi obtenir une traduction de la licence GNU GPL ici:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "Calculatrice ReactOS est un logiciel libre distribué sous licence GNU GPL.\r\n\r\nVous pouvez obtenir une copie de la licence GNU GPL ici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nVous pouvez aussi obtenir une traduction de la licence GNU GPL ici:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Erreur" IDS_QUICKHELP "Aide rapide" END @@ -443,13 +445,13 @@ BEGIN IDS_CONV_AREA "Superficie" IDS_CONV_CONSUMPTION "Consommation (moteurs)" IDS_CONV_CURRENCY "Devises" - IDS_CONV_ENERGY "nergie" + IDS_CONV_ENERGY "Énergie" IDS_CONV_LENGTH "Longueurs" IDS_CONV_POWER "Puissance" IDS_CONV_PRESSURE "Pression" - IDS_CONV_TEMPERATURE "Temprature" + IDS_CONV_TEMPERATURE "Température" IDS_CONV_TIME "Temps" - IDS_CONV_VELOCITY "Vlocit" + IDS_CONV_VELOCITY "Vélocité" IDS_CONV_VOLUME "Volume" IDS_CONV_WEIGHT "Poids" END @@ -457,7 +459,7 @@ END // TYPES OF ANGLES STRINGTABLE DISCARDABLE BEGIN - IDS_ANGLE_DEGREES "Degrs" + IDS_ANGLE_DEGREES "Degrés" IDS_ANGLE_GRADIANS "Grades" IDS_ANGLE_RADIANS "Radians" END @@ -482,21 +484,21 @@ BEGIN IDS_AREA_PYEONGBANGJA "Pyeongbangja" IDS_AREA_RAI "Rai" IDS_AREA_SE "Se" - IDS_AREA_SQUARE_CENTIMETERS "Centimtres carrs" - IDS_AREA_SQUARE_CHR "Chr carr" - IDS_AREA_SQUARE_FATHOMS "Fathoms carrs" - IDS_AREA_SQUARE_FATHOMS_HUNGARY "Fathoms carrs (Hongrie)" - IDS_AREA_SQUARE_FEET "Pieds carrs" - IDS_AREA_SQUARE_INCHES "Pouces carrs" - IDS_AREA_SQUARE_KILOMETERS "Kilomtres carrs" + IDS_AREA_SQUARE_CENTIMETERS "Centimètres carrés" + IDS_AREA_SQUARE_CHR "Chr carré" + IDS_AREA_SQUARE_FATHOMS "Fathoms carrés" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Fathoms carrés (Hongrie)" + IDS_AREA_SQUARE_FEET "Pieds carrés" + IDS_AREA_SQUARE_INCHES "Pouces carrés" + IDS_AREA_SQUARE_KILOMETERS "Kilomètres carrés" IDS_AREA_SQUARE_LAR "Square lar" - IDS_AREA_SQUARE_METER "Mtre carr" - IDS_AREA_SQUARE_MILES "Miles carrs" - IDS_AREA_SQUARE_MILLIMETERS "Millimtres carrs" - IDS_AREA_SQUARE_SHAKU "Shaku carr" - IDS_AREA_SQUARE_TSUEN "Tsuen carr" - IDS_AREA_SQUARE_VA "Va carr" - IDS_AREA_SQUARE_YARD "Yard carr" + IDS_AREA_SQUARE_METER "Mètre carré" + IDS_AREA_SQUARE_MILES "Miles carrés" + IDS_AREA_SQUARE_MILLIMETERS "Millimètres carrés" + IDS_AREA_SQUARE_SHAKU "Shaku carré" + IDS_AREA_SQUARE_TSUEN "Tsuen carré" + IDS_AREA_SQUARE_VA "Va carré" + IDS_AREA_SQUARE_YARD "Yard carré" IDS_AREA_TAN "Tan" IDS_AREA_TSUBO "Tsubo" END @@ -504,8 +506,8 @@ END // TYPES OF COMSUMPTIONS STRINGTABLE DISCARDABLE BEGIN - IDS_CONSUMPTION_KM_PER_L "Kilomtre/litre" - IDS_CONSUMPTION_L_PER_100_KM "Litres/100 kilomtres" + IDS_CONSUMPTION_KM_PER_L "Kilomètre/litre" + IDS_CONSUMPTION_L_PER_100_KM "Litres/100 kilomètres" IDS_CONSUMPTION_MILES_GALLON_UK "Miles/gallon (UK)" IDS_CONSUMPTION_MILES_GALLON_US "Miles/gallon (US)" END @@ -516,12 +518,12 @@ BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Schilling autrichien" IDS_CURRENCY_BELGIAN_FRANC "Franc belge" IDS_CURRENCY_CYPRIOT_POUND "Livre chypriote" - IDS_CURRENCY_CZECH_KORUNA "Couronne tchque" + IDS_CURRENCY_CZECH_KORUNA "Couronne tchèque" IDS_CURRENCY_DEUTSCHE_MARK "Mark allemand" IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder" IDS_CURRENCY_EURO "Euro" IDS_CURRENCY_FINNISH_MARKKA "Marks finlandais" - IDS_CURRENCY_FRENCH_FRANC "Franc franais" + IDS_CURRENCY_FRENCH_FRANC "Franc français" IDS_CURRENCY_GREEK_DRACHMA "Drachmes grecques" IDS_CURRENCY_IRISH_POUND "Livre irlandaise" IDS_CURRENCY_ITALIAN_LIRA "Lire italienne" @@ -529,17 +531,17 @@ BEGIN IDS_CURRENCY_MALTESE_LIRA "Lire maltaise" IDS_CURRENCY_PORTOGUESE_ESCUDO "Escudo portugaise" IDS_CURRENCY_SLOVAK_KORUNA "Couronne slovaque" - IDS_CURRENCY_SLOVENIAN_TOLAR "Tolar slovne" + IDS_CURRENCY_SLOVENIAN_TOLAR "Tolar slovène" IDS_CURRENCY_SPANISH_PESETA "Peseta espagnole" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C calories" + IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "British Thermal Units" IDS_ENERGY_ERGS "Ergs" - IDS_ENERGY_EVS "lectron-volts" + IDS_ENERGY_EVS "Électron-volts" IDS_ENERGY_FOOT_POUNDS "Pied-livres" IDS_ENERGY_IT_CALORIES "International Table calories" IDS_ENERGY_IT_KILOCALORIES "International Table kilocalories" @@ -553,10 +555,10 @@ END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "Angstrm" - IDS_LENGTH_ASTRONOMICAL_UNITS "Units astronomiques" + IDS_LENGTH_ANGSTROMS "Angström" + IDS_LENGTH_ASTRONOMICAL_UNITS "Unités astronomiques" IDS_LENGTH_BARLEYCORNS "Barleycorns" - IDS_LENGTH_CENTIMETERS "Centimtres" + IDS_LENGTH_CENTIMETERS "Centimètres" IDS_LENGTH_CHAINS_UK "Chains (UK)" IDS_LENGTH_CHI "Chi" IDS_LENGTH_CHOU "Chou" @@ -575,14 +577,14 @@ BEGIN IDS_LENGTH_KABIET "Kabiet" IDS_LENGTH_KEN "Ken" IDS_LENGTH_KEUB "Keub" - IDS_LENGTH_KILOMETERS "Kilomtres" + IDS_LENGTH_KILOMETERS "Kilomètres" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "Annes lumires" + IDS_LENGTH_LIGHT_YEARS "Années lumières" IDS_LENGTH_LINKS_UK "Links (UK)" - IDS_LENGTH_METERS "Mtres" - IDS_LENGTH_MICRONS "Micromtres" + IDS_LENGTH_METERS "Mètres" + IDS_LENGTH_MICRONS "Micromètres" IDS_LENGTH_MILES "Miles" - IDS_LENGTH_MILLIMETERS "Millimtres" + IDS_LENGTH_MILLIMETERS "Millimètres" IDS_LENGTH_NAUTICAL_MILES "Miles nautiques" IDS_LENGTH_NIEU "Nieu" IDS_LENGTH_PARSECS "Parsecs" @@ -616,11 +618,11 @@ END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmosphres" + IDS_PRESSURE_ATMOSPHERES "Atmosphères" IDS_PRESSURE_BARS "Bars" IDS_PRESSURE_HECTOPASCALS "Hectopascals" IDS_PRESSURE_KILOPASCALS "Kilopascals" - IDS_PRESSURE_MM_OF_MERCURY "Millimtres de mercure" + IDS_PRESSURE_MM_OF_MERCURY "Millimètres de mercure" IDS_PRESSURE_PASCALS "Pascals" IDS_PRESSURE_PSI "Pounds-force per square inch" END @@ -645,19 +647,19 @@ BEGIN IDS_TIME_MINUTES "Minutes" IDS_TIME_SECONDS "Secondes" IDS_TIME_WEEKS "Semaines" - IDS_TIME_YEARS "Annes" + IDS_TIME_YEARS "Années" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND "Centimtres/seconde" + IDS_VELOCITY_CMS_SECOND "Centimètres/seconde" IDS_VELOCITY_FEET_HOUR "Pieds/heure" IDS_VELOCITY_FEET_SECOND "Pieds/seconde" - IDS_VELOCITY_KILOMETERS_HOUR "Kilomtres/heure" + IDS_VELOCITY_KILOMETERS_HOUR "Kilomètres/heure" IDS_VELOCITY_KNOTS "Knots" IDS_VELOCITY_MACH "Mach" - IDS_VELOCITY_METERS_SECOND "Mtres/second" + IDS_VELOCITY_METERS_SECOND "Mètres/second" IDS_VELOCITY_MILES_HOUR "Miles/heure" END @@ -665,14 +667,14 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_VOLUME_BARRELS_UK "Baril (UK)" - IDS_VOLUME_BARRELS_OIL "Baril de ptrole" + IDS_VOLUME_BARRELS_OIL "Baril de pétrole" IDS_VOLUME_BUN "Bun" IDS_VOLUME_BUSHELS_UK "Bushels (UK)" IDS_VOLUME_BUSHELS_US "Bushels (US)" - IDS_VOLUME_CUBIC_CENTIMETERS "Centimtres cubes" + IDS_VOLUME_CUBIC_CENTIMETERS "Centimètres cubes" IDS_VOLUME_CUBIC_FEET "Pieds cubes" IDS_VOLUME_CUBIC_INCHES "Pouces cubes" - IDS_VOLUME_CUBIC_METERS "Mtres cubes" + IDS_VOLUME_CUBIC_METERS "Mètres cubes" IDS_VOLUME_CUBIC_YARDS "Yards cubes" IDS_VOLUME_DOE "Doe" IDS_VOLUME_FLUID_OUNCES_UK "Fluid ounces (UK)" diff --git a/base/applications/calc/lang/it-IT.rc b/base/applications/calc/lang/it-IT.rc index 2e96c209fb5..a4c6deee99d 100644 --- a/base/applications/calc/lang/it-IT.rc +++ b/base/applications/calc/lang/it-IT.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL // Dialog @@ -449,7 +451,7 @@ BEGIN IDS_CONV_PRESSURE "Pressione" IDS_CONV_TEMPERATURE "Temperatura" IDS_CONV_TIME "Tempo" - IDS_CONV_VELOCITY "Velocit" + IDS_CONV_VELOCITY "Velocità" IDS_CONV_VOLUME "Volume" IDS_CONV_WEIGHT "Peso" END @@ -554,7 +556,7 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_LENGTH_ANGSTROMS "Angstrom" - IDS_LENGTH_ASTRONOMICAL_UNITS "Unit astronomiche" + IDS_LENGTH_ASTRONOMICAL_UNITS "Unità astronomiche" IDS_LENGTH_BARLEYCORNS "Barleycorn" IDS_LENGTH_CENTIMETERS "Centimetri" IDS_LENGTH_CHAINS_UK "Catene (GB)" @@ -648,7 +650,7 @@ BEGIN IDS_TIME_YEARS "Anni" END -// Tipi di velocit +// Tipi di velocità STRINGTABLE DISCARDABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimetri/ora" diff --git a/base/applications/calc/lang/ja-JP.rc b/base/applications/calc/lang/ja-JP.rc index 5a7a52e05f9..b97fc0b74e6 100644 --- a/base/applications/calc/lang/ja-JP.rc +++ b/base/applications/calc/lang/ja-JP.rc @@ -1,18 +1,20 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT // Dialog IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS d" +CAPTION "ReactOS 電卓" MENU IDR_MENU_SCIENTIFIC_1 FONT 9, "MS UI Gothic", 0, 0, 0x1 BEGIN GROUPBOX "",IDC_STATIC,4,16,132,21 - CONTROL "16i",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 - CONTROL "10i",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 - CONTROL "8i",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 - CONTROL "2i",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 + CONTROL "16進",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 + CONTROL "10進",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 + CONTROL "8進",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 + CONTROL "2進",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 GROUPBOX "",IDC_STATIC,4,36,76,21 CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,26,10 @@ -160,7 +162,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS d" +CAPTION "ReactOS 電卓" MENU IDR_MENU_STANDARD FONT 9, "MS UI Gothic", 0, 0, 0x1 BEGIN @@ -227,20 +229,20 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS d" +CAPTION "ReactOS 電卓" MENU IDR_MENU_STANDARD FONT 9, "MS UI Gothic" BEGIN - PUSHBUTTON "ϊ",IDC_BUTTON_CONVERT,35,105,76,17 + PUSHBUTTON "変換",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT ":",IDC_STATIC,4,20,56,8 + LTEXT "分類:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "ϊ:",IDC_STATIC,4,49,56,8 + LTEXT "変換元:",IDC_STATIC,4,49,56,8 COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "ϊ:",IDC_STATIC,4,76,56,8 + LTEXT "変換先:",IDC_STATIC,4,76,56,8 CONTROL "C",IDC_BUTTON_CANC,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | @@ -305,13 +307,13 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS dɂ‚" +CAPTION "ReactOS 電卓について" FONT 9, "MS UI Gothic" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT "ReactOS d",IDC_STATIC,120,12,132,8, + LTEXT "ReactOS 電卓",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE LTEXT "Version ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE LTEXT "Written by Carlo Bramini",IDC_STATIC,120,32,132,8, @@ -341,89 +343,89 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "ҏW" + POPUP "編集" BEGIN - MENUITEM "Rs[\tCtrl+C", IDM_EDIT_COPY - MENUITEM "\\t\tCtrl+V", IDM_EDIT_PASTE + MENUITEM "コピー\tCtrl+C", IDM_EDIT_COPY + MENUITEM "貼\り付け\tCtrl+V", IDM_EDIT_PASTE END - POPUP "\\" + POPUP "表\示" BEGIN - MENUITEM "W", IDM_VIEW_STANDARD, CHECKED - MENUITEM "֐d", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "ϊ", IDM_VIEW_CONVERSION + MENUITEM "標準", IDM_VIEW_STANDARD, CHECKED + MENUITEM "関数電卓", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "変換", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "16i\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "10i\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "8i\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "2i\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "16進\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "10進\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "8進\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "2進\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Degrees\tF2", IDM_VIEW_DEG, CHECKED MENUITEM "Radians\tF3", IDM_VIEW_RAD, CHECKED MENUITEM "Gradians\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM "؂", IDM_VIEW_GROUP, CHECKED + MENUITEM "桁を区切る", IDM_VIEW_GROUP, CHECKED END - POPUP "wv" + POPUP "ヘルプ" BEGIN - MENUITEM "wv gsbN", IDM_HELP_HELP + MENUITEM "ヘルプ トピック", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ReactOS dɂ‚", IDM_HELP_ABOUT + MENUITEM "ReactOS 電卓について", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "ҏW" + POPUP "編集" BEGIN - MENUITEM "Rs[\tCtrl+C", IDM_EDIT_COPY - MENUITEM "\\t\tCtrl+V", IDM_EDIT_PASTE + MENUITEM "コピー\tCtrl+C", IDM_EDIT_COPY + MENUITEM "貼\り付け\tCtrl+V", IDM_EDIT_PASTE END - POPUP "\\" + POPUP "表\示" BEGIN - MENUITEM "W", IDM_VIEW_STANDARD, CHECKED - MENUITEM "֐d", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "ϊ", IDM_VIEW_CONVERSION + MENUITEM "標準", IDM_VIEW_STANDARD, CHECKED + MENUITEM "関数電卓", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "変換", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "16i\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "10i\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "8i\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "2i\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "16進\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "10進\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "8進\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "2進\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "؂", IDM_VIEW_GROUP, CHECKED + MENUITEM "桁を区切る", IDM_VIEW_GROUP, CHECKED END - POPUP "wv" + POPUP "ヘルプ" BEGIN - MENUITEM "wv gsbN", IDM_HELP_HELP + MENUITEM "ヘルプ トピック", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ReactOS dɂ‚", IDM_HELP_ABOUT + MENUITEM "ReactOS 電卓について", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "ҏW" + POPUP "編集" BEGIN - MENUITEM "Rs[\tCtrl+C", IDM_EDIT_COPY - MENUITEM "\\t\tCtrl+V", IDM_EDIT_PASTE + MENUITEM "コピー\tCtrl+C", IDM_EDIT_COPY + MENUITEM "貼\り付け\tCtrl+V", IDM_EDIT_PASTE END - POPUP "\\" + POPUP "表\示" BEGIN - MENUITEM "W", IDM_VIEW_STANDARD, CHECKED - MENUITEM "֐d", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "ϊ", IDM_VIEW_CONVERSION + MENUITEM "標準", IDM_VIEW_STANDARD, CHECKED + MENUITEM "関数電卓", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "変換", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "؂", IDM_VIEW_GROUP, CHECKED + MENUITEM "桁を区切る", IDM_VIEW_GROUP, CHECKED END - POPUP "wv" + POPUP "ヘルプ" BEGIN - MENUITEM "wv gsbN", IDM_HELP_HELP + MENUITEM "ヘルプ トピック", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ReactOS dɂ‚", IDM_HELP_ABOUT + MENUITEM "ReactOS 電卓について", IDM_HELP_ABOUT END END @@ -431,27 +433,27 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "ReactOS dGNU GPLCZX̌Œ񋟂t[\\tgEFAłB\r\n\r\nGNU GPLCZX̃Rs[𓾂邱Ƃł܂:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nGNU GPLCZX̖|𓾂邱Ƃł܂:\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "G[" - IDS_QUICKHELP "NCbNwv" + IDS_STRING_LICENSE "ReactOS 電卓はGNU GPLライセンスの元で提供されるフリーソ\フトウェアです。\r\n\r\nこちらでGNU GPLライセンスのコピーを得ることができます:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nこちらでGNU GPLライセンスの翻訳を得ることができます:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_MATH_ERROR "エラー" + IDS_QUICKHELP "クイックヘルプ" END // Types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "px" - IDS_CONV_AREA "ʐ" - IDS_CONV_CONSUMPTION " (GW)" - IDS_CONV_CURRENCY "ʉ" - IDS_CONV_ENERGY "GlM[" - IDS_CONV_LENGTH "" - IDS_CONV_POWER "" - IDS_CONV_PRESSURE "" - IDS_CONV_TEMPERATURE "x" - IDS_CONV_TIME "" - IDS_CONV_VELOCITY "x" - IDS_CONV_VOLUME "̐" - IDS_CONV_WEIGHT "d" + IDS_CONV_ANGLE "角度" + IDS_CONV_AREA "面積" + IDS_CONV_CONSUMPTION "消費 (エンジン)" + IDS_CONV_CURRENCY "通貨" + IDS_CONV_ENERGY "エネルギー" + IDS_CONV_LENGTH "長さ" + IDS_CONV_POWER "力" + IDS_CONV_PRESSURE "圧力" + IDS_CONV_TEMPERATURE "温度" + IDS_CONV_TIME "時間" + IDS_CONV_VELOCITY "速度" + IDS_CONV_VOLUME "体積" + IDS_CONV_WEIGHT "重さ" END // TYPES OF ANGLES @@ -465,15 +467,15 @@ END // TYPES OF AREAS STRINGTABLE DISCARDABLE BEGIN - IDS_AREA_ACRES "G[J[" - IDS_AREA_ACRES_BRAZIL "G[J[ (uW)" - IDS_AREA_ACRES_FRANCE "G[J[ (tX)" - IDS_AREA_ACRES_SCOTS "G[J[ (XRbgh)" - IDS_AREA_ACRES_US "G[J[ (č)" - IDS_AREA_ARES "A[" + IDS_AREA_ACRES "エーカー" + IDS_AREA_ACRES_BRAZIL "エーカー (ブラジル)" + IDS_AREA_ACRES_FRANCE "エーカー (フランス)" + IDS_AREA_ACRES_SCOTS "エーカー (スコットランド)" + IDS_AREA_ACRES_US "エーカー (米国)" + IDS_AREA_ARES "アール" IDS_AREA_CHOU "Chou" IDS_AREA_DANBO "Danbo" - IDS_AREA_HECTARES "wN^[" + IDS_AREA_HECTARES "ヘクタール" IDS_AREA_JEONGBO "Jeongbo" IDS_AREA_MORGEN_HUNGARY "Morgen (Hungary)" IDS_AREA_MU "Mu" @@ -482,122 +484,122 @@ BEGIN IDS_AREA_PYEONGBANGJA "Pyeongbangja" IDS_AREA_RAI "Rai" IDS_AREA_SE "Se" - IDS_AREA_SQUARE_CENTIMETERS "Z`[g" + IDS_AREA_SQUARE_CENTIMETERS "平方センチメートル" IDS_AREA_SQUARE_CHR "Square chr" - IDS_AREA_SQUARE_FATHOMS "q" - IDS_AREA_SQUARE_FATHOMS_HUNGARY "q (nK[)" - IDS_AREA_SQUARE_FEET "tB[g" - IDS_AREA_SQUARE_INCHES "C`" - IDS_AREA_SQUARE_KILOMETERS "L[^[" + IDS_AREA_SQUARE_FATHOMS "平方尋" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "平方尋 (ハンガリー)" + IDS_AREA_SQUARE_FEET "平方フィート" + IDS_AREA_SQUARE_INCHES "平方インチ" + IDS_AREA_SQUARE_KILOMETERS "平方キロメーター" IDS_AREA_SQUARE_LAR "Square lar" - IDS_AREA_SQUARE_METER "[g" - IDS_AREA_SQUARE_MILES "}C" - IDS_AREA_SQUARE_MILLIMETERS "~[g" - IDS_AREA_SQUARE_SHAKU "" + IDS_AREA_SQUARE_METER "平方メートル" + IDS_AREA_SQUARE_MILES "平方マイル" + IDS_AREA_SQUARE_MILLIMETERS "平方ミリメートル" + IDS_AREA_SQUARE_SHAKU "平方尺" IDS_AREA_SQUARE_TSUEN "Square tsuen" IDS_AREA_SQUARE_VA "Square va" - IDS_AREA_SQUARE_YARD "[h" + IDS_AREA_SQUARE_YARD "平方ヤード" IDS_AREA_TAN "Tan" - IDS_AREA_TSUBO "" + IDS_AREA_TSUBO "坪" END // TYPES OF COMSUMPTIONS STRINGTABLE DISCARDABLE BEGIN - IDS_CONSUMPTION_KM_PER_L "L[g/bg" - IDS_CONSUMPTION_L_PER_100_KM "bg/100L[g" - IDS_CONSUMPTION_MILES_GALLON_UK "}C/K (p)" - IDS_CONSUMPTION_MILES_GALLON_US "}C/K (č)" + IDS_CONSUMPTION_KM_PER_L "キロメートル/リットル" + IDS_CONSUMPTION_L_PER_100_KM "リットル/100キロメートル" + IDS_CONSUMPTION_MILES_GALLON_UK "マイル/ガロン (英国)" + IDS_CONSUMPTION_MILES_GALLON_US "マイル/ガロン (米国)" END // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN - IDS_CURRENCY_AUSTRIAN_SCHILLING "I[XgA VO" - IDS_CURRENCY_BELGIAN_FRANC "xM[ t" - IDS_CURRENCY_CYPRIOT_POUND "LvX |h" - IDS_CURRENCY_CZECH_KORUNA "`FR Ri" - IDS_CURRENCY_DEUTSCHE_MARK "hCc }N" - IDS_CURRENCY_DUTCH_GUILDER "I_ M_[" - IDS_CURRENCY_EURO "[" - IDS_CURRENCY_FINNISH_MARKKA "tBh }bJ" - IDS_CURRENCY_FRENCH_FRANC "tX t" - IDS_CURRENCY_GREEK_DRACHMA "MV hN}" - IDS_CURRENCY_IRISH_POUND "ACh |h" - IDS_CURRENCY_ITALIAN_LIRA "C^A " - IDS_CURRENCY_LUXEMBOURG_FRANC "NZuN t" - IDS_CURRENCY_MALTESE_LIRA "}^ " - IDS_CURRENCY_PORTOGUESE_ESCUDO "|gK GXN[h" - IDS_CURRENCY_SLOVAK_KORUNA "XoLA Ri" - IDS_CURRENCY_SLOVENIAN_TOLAR "XxjA tolar" - IDS_CURRENCY_SPANISH_PESETA "XyC yZ^" + IDS_CURRENCY_AUSTRIAN_SCHILLING "オーストリア シリング" + IDS_CURRENCY_BELGIAN_FRANC "ベルギー フラン" + IDS_CURRENCY_CYPRIOT_POUND "キプロス ポンド" + IDS_CURRENCY_CZECH_KORUNA "チェコ コルナ" + IDS_CURRENCY_DEUTSCHE_MARK "ドイツ マルク" + IDS_CURRENCY_DUTCH_GUILDER "オランダ ギルダー" + IDS_CURRENCY_EURO "ユーロ" + IDS_CURRENCY_FINNISH_MARKKA "フィンランド マルッカ" + IDS_CURRENCY_FRENCH_FRANC "フランス フラン" + IDS_CURRENCY_GREEK_DRACHMA "ギリシャ ドラクマ" + IDS_CURRENCY_IRISH_POUND "アイルランド ポンド" + IDS_CURRENCY_ITALIAN_LIRA "イタリア リラ" + IDS_CURRENCY_LUXEMBOURG_FRANC "ルクセンブルク フラン" + IDS_CURRENCY_MALTESE_LIRA "マルタ リラ" + IDS_CURRENCY_PORTOGUESE_ESCUDO "ポルトガル エスクード" + IDS_CURRENCY_SLOVAK_KORUNA "スロバキア コルナ" + IDS_CURRENCY_SLOVENIAN_TOLAR "スロベニア tolar" + IDS_CURRENCY_SPANISH_PESETA "スペイン ペセタ" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15J[" - IDS_ENERGY_BTUS "pMP" - IDS_ENERGY_ERGS "GO" - IDS_ENERGY_EVS "dq{g" - IDS_ENERGY_FOOT_POUNDS "t[g|h" + IDS_ENERGY_15_C_CALORIES "15℃カロリー" + IDS_ENERGY_BTUS "英国熱単位" + IDS_ENERGY_ERGS "エルグ" + IDS_ENERGY_EVS "電子ボルト" + IDS_ENERGY_FOOT_POUNDS "フートポンド" IDS_ENERGY_IT_CALORIES "International Table calories" IDS_ENERGY_IT_KILOCALORIES "International Table kilocalories" - IDS_ENERGY_JOULES "W[" - IDS_ENERGY_KILOJOULES "LW[" - IDS_ENERGY_KILOWATT_HOURS "Lbg" - IDS_ENERGY_NUTRITION_CALORIES "h{J[" - IDS_ENERGY_TH_CALORIES "MwJ[" + IDS_ENERGY_JOULES "ジュール" + IDS_ENERGY_KILOJOULES "キロジュール" + IDS_ENERGY_KILOWATT_HOURS "キロワット時" + IDS_ENERGY_NUTRITION_CALORIES "栄養カロリー" + IDS_ENERGY_TH_CALORIES "熱化学カロリー" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "IOXg[" - IDS_LENGTH_ASTRONOMICAL_UNITS "VP" - IDS_LENGTH_BARLEYCORNS "o[[R[" - IDS_LENGTH_CENTIMETERS "Z`[g" - IDS_LENGTH_CHAINS_UK "`F[ (p)" + IDS_LENGTH_ANGSTROMS "オングストローム" + IDS_LENGTH_ASTRONOMICAL_UNITS "天文単位" + IDS_LENGTH_BARLEYCORNS "バーレーコーン" + IDS_LENGTH_CENTIMETERS "センチメートル" + IDS_LENGTH_CHAINS_UK "チェーン (英国)" IDS_LENGTH_CHI "Chi" IDS_LENGTH_CHOU "Chou" IDS_LENGTH_CHR "Chr" IDS_LENGTH_CUN "Cun" - IDS_LENGTH_FATHOMS "t@]" - IDS_LENGTH_FATHOMS_HUNGARY "t@] (nK[)" - IDS_LENGTH_FEET "tB[g" - IDS_LENGTH_FURLONGS "n" + IDS_LENGTH_FATHOMS "ファゾム" + IDS_LENGTH_FATHOMS_HUNGARY "ファゾム (ハンガリー)" + IDS_LENGTH_FEET "フィート" + IDS_LENGTH_FURLONGS "ハロン" IDS_LENGTH_GAN "Gan" - IDS_LENGTH_HANDS "nh" + IDS_LENGTH_HANDS "ハンド" IDS_LENGTH_HUNH "Hunh" - IDS_LENGTH_INCHES "C`" + IDS_LENGTH_INCHES "インチ" IDS_LENGTH_JA "Ja" IDS_LENGTH_JEONG "Jeong" IDS_LENGTH_KABIET "Kabiet" IDS_LENGTH_KEN "Ken" IDS_LENGTH_KEUB "Keub" - IDS_LENGTH_KILOMETERS "L[g" + IDS_LENGTH_KILOMETERS "キロメートル" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "N" - IDS_LENGTH_LINKS_UK "N (p)" - IDS_LENGTH_METERS "[g" - IDS_LENGTH_MICRONS "~N" - IDS_LENGTH_MILES "}C" - IDS_LENGTH_MILLIMETERS "~[g" - IDS_LENGTH_NAUTICAL_MILES "C" + IDS_LENGTH_LIGHT_YEARS "光年" + IDS_LENGTH_LINKS_UK "リンク (英国)" + IDS_LENGTH_METERS "メートル" + IDS_LENGTH_MICRONS "ミクロン" + IDS_LENGTH_MILES "マイル" + IDS_LENGTH_MILLIMETERS "ミリメートル" + IDS_LENGTH_NAUTICAL_MILES "海里" IDS_LENGTH_NIEU "Nieu" - IDS_LENGTH_PARSECS "p[ZN" - IDS_LENGTH_PICAS "pCJ" - IDS_LENGTH_RI_JAPAN " ({)" - IDS_LENGTH_RI_KOREA "Ri (؍)" - IDS_LENGTH_RODS "bh" + IDS_LENGTH_PARSECS "パーセク" + IDS_LENGTH_PICAS "パイカ" + IDS_LENGTH_RI_JAPAN "里 (日本)" + IDS_LENGTH_RI_KOREA "Ri (韓国)" + IDS_LENGTH_RODS "ロッド" IDS_LENGTH_SAWK "Sawk" IDS_LENGTH_SEN "Sen" - IDS_LENGTH_SHAKU "" - IDS_LENGTH_SPAN "Xp" - IDS_LENGTH_SUN "" + IDS_LENGTH_SHAKU "尺" + IDS_LENGTH_SPAN "スパン" + IDS_LENGTH_SUN "寸" IDS_LENGTH_TSUEN "Tsuen" IDS_LENGTH_VA "Va" - IDS_LENGTH_YARDS "[h" + IDS_LENGTH_YARDS "ヤード" IDS_LENGTH_YOTE "Yote" IDS_LENGTH_ZHANG "Zhang" END @@ -605,94 +607,94 @@ END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_BTUS_PER_MINUTE "pMP/" - IDS_POWER_FPS_PER_MINUTE "t[g|h/" - IDS_POWER_HORSEPOWER "n" - IDS_POWER_KILOWATTS "Lbg" - IDS_POWER_MEGAWATTS "Kbg" - IDS_POWER_WATTS "bg" + IDS_POWER_BTUS_PER_MINUTE "英国熱単位/分" + IDS_POWER_FPS_PER_MINUTE "フートポンド/分" + IDS_POWER_HORSEPOWER "馬力" + IDS_POWER_KILOWATTS "キロワット" + IDS_POWER_MEGAWATTS "メガワット" + IDS_POWER_WATTS "ワット" END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "C" + IDS_PRESSURE_ATMOSPHERES "気圧" IDS_PRESSURE_BARS "Bars" - IDS_PRESSURE_HECTOPASCALS "wNgpXJ" - IDS_PRESSURE_KILOPASCALS "LpXJ" - IDS_PRESSURE_MM_OF_MERCURY "~[g" - IDS_PRESSURE_PASCALS "pXJ" - IDS_PRESSURE_PSI "|hd/C`" + IDS_PRESSURE_HECTOPASCALS "ヘクトパスカル" + IDS_PRESSURE_KILOPASCALS "キロパスカル" + IDS_PRESSURE_MM_OF_MERCURY "水銀ミリメートル" + IDS_PRESSURE_PASCALS "パスカル" + IDS_PRESSURE_PSI "ポンド重/平方インチ" END // TYPES OF TEMPERATURES STRINGTABLE DISCARDABLE BEGIN - IDS_TEMPERATURE_CELSIUS "ێ" - IDS_TEMPERATURE_FAHRENHEIT "؎" - IDS_TEMPERATURE_KELVIN "Pr" + IDS_TEMPERATURE_CELSIUS "摂氏" + IDS_TEMPERATURE_FAHRENHEIT "華氏" + IDS_TEMPERATURE_KELVIN "ケルビン" IDS_TEMPERATURE_RANKINE "Rankine" END // TYPES OF TIME STRINGTABLE DISCARDABLE BEGIN - IDS_TIME_DAYS "" - IDS_TIME_HOURS "" - IDS_TIME_NANOSECONDS "imb" - IDS_TIME_MICROSECONDS "}CNb" - IDS_TIME_MILLISECONDS "~b" - IDS_TIME_MINUTES "" - IDS_TIME_SECONDS "b" - IDS_TIME_WEEKS "T" - IDS_TIME_YEARS "N" + IDS_TIME_DAYS "日数" + IDS_TIME_HOURS "時間" + IDS_TIME_NANOSECONDS "ナノ秒" + IDS_TIME_MICROSECONDS "マイクロ秒" + IDS_TIME_MILLISECONDS "ミリ秒" + IDS_TIME_MINUTES "分" + IDS_TIME_SECONDS "秒" + IDS_TIME_WEEKS "週" + IDS_TIME_YEARS "年" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND "Z`[g/" - IDS_VELOCITY_FEET_HOUR "tB[g/" - IDS_VELOCITY_FEET_SECOND "tB[g/b" - IDS_VELOCITY_KILOMETERS_HOUR "L[g/" - IDS_VELOCITY_KNOTS "mbg" - IDS_VELOCITY_MACH "}bn" - IDS_VELOCITY_METERS_SECOND "[g/b" - IDS_VELOCITY_MILES_HOUR "}C/" + IDS_VELOCITY_CMS_SECOND "センチメートル/時" + IDS_VELOCITY_FEET_HOUR "フィート/時" + IDS_VELOCITY_FEET_SECOND "フィート/秒" + IDS_VELOCITY_KILOMETERS_HOUR "キロメートル/時" + IDS_VELOCITY_KNOTS "ノット" + IDS_VELOCITY_MACH "マッハ" + IDS_VELOCITY_METERS_SECOND "メートル/秒" + IDS_VELOCITY_MILES_HOUR "マイル/時" END // TYPES OF VOLUMES STRINGTABLE DISCARDABLE BEGIN - IDS_VOLUME_BARRELS_UK "o (p)" - IDS_VOLUME_BARRELS_OIL "Ζo" + IDS_VOLUME_BARRELS_UK "バレル (英国)" + IDS_VOLUME_BARRELS_OIL "石油バレル" IDS_VOLUME_BUN "Bun" - IDS_VOLUME_BUSHELS_UK "ubVF (p)" - IDS_VOLUME_BUSHELS_US "ubVF (č)" - IDS_VOLUME_CUBIC_CENTIMETERS "@Z`[g" - IDS_VOLUME_CUBIC_FEET "@tB[g" - IDS_VOLUME_CUBIC_INCHES "@C`" - IDS_VOLUME_CUBIC_METERS "@[g" - IDS_VOLUME_CUBIC_YARDS "@[h" + IDS_VOLUME_BUSHELS_UK "ブッシェル (英国)" + IDS_VOLUME_BUSHELS_US "ブッシェル (米国)" + IDS_VOLUME_CUBIC_CENTIMETERS "立法センチメートル" + IDS_VOLUME_CUBIC_FEET "立法フィート" + IDS_VOLUME_CUBIC_INCHES "立法インチ" + IDS_VOLUME_CUBIC_METERS "立法メートル" + IDS_VOLUME_CUBIC_YARDS "立法ヤード" IDS_VOLUME_DOE "Doe" - IDS_VOLUME_FLUID_OUNCES_UK "̃IX (p)" - IDS_VOLUME_FLUID_OUNCES_US "̃IX (č)" - IDS_VOLUME_GALLONS_UK "K (p)" - IDS_VOLUME_GALLONS_DRY_US "KA (č)" - IDS_VOLUME_GALLONS_LIQUID_US "KAt (č)" + IDS_VOLUME_FLUID_OUNCES_UK "流体オンス (英国)" + IDS_VOLUME_FLUID_OUNCES_US "流体オンス (米国)" + IDS_VOLUME_GALLONS_UK "ガロン (英国)" + IDS_VOLUME_GALLONS_DRY_US "ガロン、乾燥 (米国)" + IDS_VOLUME_GALLONS_LIQUID_US "ガロン、液体 (米国)" IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" IDS_VOLUME_ICCE "Icce" IDS_VOLUME_KWIAN "Kwian" - IDS_VOLUME_LITERS "bg" + IDS_VOLUME_LITERS "リットル" IDS_VOLUME_MAL "Mal" - IDS_VOLUME_MILLILITERS "~bg" - IDS_VOLUME_PINTS_UK "pCg (p)" - IDS_VOLUME_PINTS_DRY_US "pCgA (č)" - IDS_VOLUME_PINTS_LIQUID_US "pCgAt (č)" - IDS_VOLUME_QUARTS_UK "NH[g (p)" - IDS_VOLUME_QUARTS_DRY_US "NH[gA (č)" - IDS_VOLUME_QUARTS_LIQUID_US "NH[gAt (č)" + IDS_VOLUME_MILLILITERS "ミリリットル" + IDS_VOLUME_PINTS_UK "パイント (英国)" + IDS_VOLUME_PINTS_DRY_US "パイント、乾燥 (米国)" + IDS_VOLUME_PINTS_LIQUID_US "パイント、液体 (米国)" + IDS_VOLUME_QUARTS_UK "クォート (英国)" + IDS_VOLUME_QUARTS_DRY_US "クォート、乾燥 (米国)" + IDS_VOLUME_QUARTS_LIQUID_US "クォート、液体 (米国)" IDS_VOLUME_SEKI "Seki" IDS_VOLUME_SYOU "Syou" IDS_VOLUME_TANANLOUNG "Tananloung" @@ -704,29 +706,29 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_WEIGHT_BAHT "Baht" - IDS_WEIGHT_CARATS "Jbg" + IDS_WEIGHT_CARATS "カラット" IDS_WEIGHT_CHUNG "Chung" IDS_WEIGHT_DON "Don" IDS_WEIGHT_GEUN "Geun" - IDS_WEIGHT_GRAMS "O" + IDS_WEIGHT_GRAMS "グラム" IDS_WEIGHT_GWAN "Gwan" IDS_WEIGHT_HARB "Harb" - IDS_WEIGHT_JIN_CHINA "Jin ()" - IDS_WEIGHT_JIN_TAIWAN "Jin (p)" + IDS_WEIGHT_JIN_CHINA "Jin (中国)" + IDS_WEIGHT_JIN_TAIWAN "Jin (台湾)" IDS_WEIGHT_KAN "Kan" - IDS_WEIGHT_KILOGRAMS "LO" + IDS_WEIGHT_KILOGRAMS "キログラム" IDS_WEIGHT_KIN "Kin" - IDS_WEIGHT_LIANG_CHINA "Liang ()" - IDS_WEIGHT_LIANG_TAIWAN "Liang (p)" - IDS_WEIGHT_MONME " ()" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS "tIX" - IDS_WEIGHT_OUNCES_TROY "gC IX" - IDS_WEIGHT_POUNDS "|h" - IDS_WEIGHT_QUINTAL_METRIC "L^ (metric)" + IDS_WEIGHT_LIANG_CHINA "Liang (中国)" + IDS_WEIGHT_LIANG_TAIWAN "Liang (台湾)" + IDS_WEIGHT_MONME "匁 (もんめ)" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "常衡オンス" + IDS_WEIGHT_OUNCES_TROY "トロイ オンス" + IDS_WEIGHT_POUNDS "ポンド" + IDS_WEIGHT_QUINTAL_METRIC "キンタル (metric)" IDS_WEIGHT_SALOUNG "Saloung" - IDS_WEIGHT_STONES "Xg[" + IDS_WEIGHT_STONES "ストーン" IDS_WEIGHT_TAMLUNG "Tamlung" - IDS_WEIGHT_TONNES "g" - IDS_WEIGHT_TONS_UK "g (p)" - IDS_WEIGHT_TONS_US "g (č)" + IDS_WEIGHT_TONNES "トン" + IDS_WEIGHT_TONS_UK "トン (英国)" + IDS_WEIGHT_TONS_US "トン (米国)" END diff --git a/base/applications/calc/lang/ko-KR.rc b/base/applications/calc/lang/ko-KR.rc index 8ab51ed6496..26eec1a8b74 100644 --- a/base/applications/calc/lang/ko-KR.rc +++ b/base/applications/calc/lang/ko-KR.rc @@ -1,5 +1,6 @@ /* * Korean translation by manatails007 (www.manatails007.org) Seungju Kim + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT @@ -8,7 +9,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS " +CAPTION "ReactOS 계산기" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -164,7 +165,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS " +CAPTION "ReactOS 계산기" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -231,7 +232,7 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS " +CAPTION "ReactOS 계산기 정보" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN @@ -309,16 +310,16 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS " +CAPTION "ReactOS 계산기 정보" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT "ReactOS ",IDC_STATIC,120,12,132,8, + LTEXT "ReactOS 계산기",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE - LTEXT " ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE - LTEXT "Carlo Bramini ",IDC_STATIC,120,32,132,8, + LTEXT "버젼 ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Carlo Bramini에 의해 쓰여짐",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 GROUPBOX "",IDC_STATIC,4,56,256,88 @@ -345,16 +346,16 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "편집" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "ٿֱ\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "복사\tCTRL-C", IDM_EDIT_COPY + MENUITEM "붙여넣기\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "보기" BEGIN - MENUITEM "Ϲ", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "ȯ", IDM_VIEW_CONVERSION + MENUITEM "일반", IDM_VIEW_STANDARD, CHECKED + MENUITEM "공학", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "전환", IDM_VIEW_CONVERSION MENUITEM SEPARATOR MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED @@ -365,28 +366,28 @@ BEGIN MENUITEM "Radians\tF3", IDM_VIEW_RAD, CHECKED MENUITEM "Grads\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM "ڸ ", IDM_VIEW_GROUP, CHECKED + MENUITEM "자릿수 구분 단위", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "도움말" BEGIN - MENUITEM " ׸", IDM_HELP_HELP + MENUITEM "도움말 항목", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ReactOS ", IDM_HELP_ABOUT + MENUITEM "ReactOS 계산기 정보", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "편집" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "ٿֱ\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "복사\tCTRL-C", IDM_EDIT_COPY + MENUITEM "붙여넣기\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "보기" BEGIN - MENUITEM "Ϲ", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "ȯ", IDM_VIEW_CONVERSION + MENUITEM "일반", IDM_VIEW_STANDARD, CHECKED + MENUITEM "공학", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "전환", IDM_VIEW_CONVERSION MENUITEM SEPARATOR MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED @@ -398,36 +399,36 @@ BEGIN MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "ڸ ", IDM_VIEW_GROUP, CHECKED + MENUITEM "자릿수 구분 단위", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "도움말" BEGIN - MENUITEM " ׸", IDM_HELP_HELP + MENUITEM "도움말 항목", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ReactOS ", IDM_HELP_ABOUT + MENUITEM "ReactOS 계산기 정보", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "" + POPUP "편집" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "ٿֱ\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "복사\tCTRL-C", IDM_EDIT_COPY + MENUITEM "붙여넣기\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "보기" BEGIN - MENUITEM "Ϲ", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "ȯ", IDM_VIEW_CONVERSION + MENUITEM "일반", IDM_VIEW_STANDARD, CHECKED + MENUITEM "공학", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "전환", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "ڸ ", IDM_VIEW_GROUP, CHECKED + MENUITEM "자릿수 구분 단위", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "도움말" BEGIN - MENUITEM " ׸", IDM_HELP_HELP + MENUITEM "도움말 항목", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ReactOS ", IDM_HELP_ABOUT + MENUITEM "ReactOS 계산기 정보", IDM_HELP_ABOUT END END @@ -436,14 +437,14 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "" - IDS_QUICKHELP " " + IDS_MATH_ERROR "에러" + IDS_QUICKHELP "빠른 도움말" END // Types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "" + IDS_CONV_ANGLE "각도" IDS_CONV_AREA "Area" IDS_CONV_CONSUMPTION "Consumption (engines)" IDS_CONV_CURRENCY "Currencies" @@ -452,7 +453,7 @@ BEGIN IDS_CONV_POWER "Power" IDS_CONV_PRESSURE "Pressure" IDS_CONV_TEMPERATURE "Temperature" - IDS_CONV_TIME "" + IDS_CONV_TIME "각도" IDS_CONV_VELOCITY "Velocity" IDS_CONV_VOLUME "Volume" IDS_CONV_WEIGHT "Weights" @@ -540,10 +541,10 @@ END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C calories" + IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "British Thermal Units" IDS_ENERGY_ERGS "Ergs" - IDS_ENERGY_EVS "ںƮ" + IDS_ENERGY_EVS "전자볼트" IDS_ENERGY_FOOT_POUNDS "Foot-Pounds" IDS_ENERGY_IT_CALORIES "International Table calories" IDS_ENERGY_IT_KILOCALORIES "International Table kilocalories" @@ -557,7 +558,7 @@ END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "˽Ʈ" + IDS_LENGTH_ANGSTROMS "옹스트롬" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" IDS_LENGTH_BARLEYCORNS "Barleycorns" IDS_LENGTH_CENTIMETERS "Centimeters" diff --git a/base/applications/calc/lang/no-NO.rc b/base/applications/calc/lang/no-NO.rc index 8e590be8ac3..65fae54a70d 100644 --- a/base/applications/calc/lang/no-NO.rc +++ b/base/applications/calc/lang/no-NO.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL // Dialog @@ -355,7 +357,7 @@ BEGIN MENUITEM "Heksadesimalt\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Desimalt\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Oktalt\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binrt\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Binært\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Grader\tF2", IDM_VIEW_DEG, CHECKED MENUITEM "Radianer\tF3", IDM_VIEW_RAD, CHECKED @@ -387,7 +389,7 @@ BEGIN MENUITEM "Heksadesimalt\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Desimal\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Oktalt\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binrt\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Binært\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED @@ -431,7 +433,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "ReactOS Kalkulator er gratis programvare utgitt under GNU GPL lisensen.\r\n\r\nDu kan f en kopi av GNU GPL lisensen her:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDu kan ogs f en oversettelse av GNU GPL lisensen her:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "ReactOS Kalkulator er gratis programvare utgitt under GNU GPL lisensen.\r\n\r\nDu kan få en kopi av GNU GPL lisensen her:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDu kan også få en oversettelse av GNU GPL lisensen her:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Feil" IDS_QUICKHELP "Rask hjelp" END @@ -440,12 +442,12 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_CONV_ANGLE "Vinkel" - IDS_CONV_AREA "Omrde" + IDS_CONV_AREA "Område" IDS_CONV_CONSUMPTION "Forbruk (maskin)" IDS_CONV_CURRENCY "Valuta" IDS_CONV_ENERGY "Energi" IDS_CONV_LENGTH "Lengde" - IDS_CONV_POWER "Strm" + IDS_CONV_POWER "Strøm" IDS_CONV_PRESSURE "Trykk" IDS_CONV_TEMPERATURE "Temperatur" IDS_CONV_TIME "Tid" @@ -513,7 +515,7 @@ END // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN - IDS_CURRENCY_AUSTRIAN_SCHILLING "sterriksk schilling" + IDS_CURRENCY_AUSTRIAN_SCHILLING "Østerriksk schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgisk franc" IDS_CURRENCY_CYPRIOT_POUND "Kypriotisk pound" IDS_CURRENCY_CZECH_KORUNA "Tsjekkisk koruna" @@ -536,7 +538,7 @@ END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C calories" + IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "Britisk varme-enhet" IDS_ENERGY_ERGS "Ergs" IDS_ENERGY_EVS "Elektrisk-Volt" @@ -546,7 +548,7 @@ BEGIN IDS_ENERGY_JOULES "Joules" IDS_ENERGY_KILOJOULES "Kilojoules" IDS_ENERGY_KILOWATT_HOURS "Kilowatt timer" - IDS_ENERGY_NUTRITION_CALORIES "Ernring kalori" + IDS_ENERGY_NUTRITION_CALORIES "Ernæring kalori" IDS_ENERGY_TH_CALORIES "Termokjemisk kalori" END @@ -577,7 +579,7 @@ BEGIN IDS_LENGTH_KEUB "Keub" IDS_LENGTH_KILOMETERS "Kilometer" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "Lysende r" + IDS_LENGTH_LIGHT_YEARS "Lysende år" IDS_LENGTH_LINKS_UK "Linker (UK)" IDS_LENGTH_METERS "Meters" IDS_LENGTH_MICRONS "Microns" @@ -616,7 +618,7 @@ END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmosfretrykk" + IDS_PRESSURE_ATMOSPHERES "Atmosfæretrykk" IDS_PRESSURE_BARS "Bars" IDS_PRESSURE_HECTOPASCALS "Hectopascals" IDS_PRESSURE_KILOPASCALS "Kilopascals" diff --git a/base/applications/calc/lang/pl-PL.rc b/base/applications/calc/lang/pl-PL.rc index 182419c005a..98b8052a28a 100644 --- a/base/applications/calc/lang/pl-PL.rc +++ b/base/applications/calc/lang/pl-PL.rc @@ -4,6 +4,7 @@ * http://www.reactos.org * IRC: irc.freenode.net #reactos-pl; * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -151,9 +152,9 @@ BEGIN WS_VISIBLE,272,24,30,10 CONTROL "Stopni",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "Radianw",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "Radianów",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 - CONTROL "Gradianw",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + CONTROL "Gradianów",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -176,7 +177,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Back",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + PUSHBUTTON "Wstecz",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -354,20 +355,20 @@ BEGIN MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY MENUITEM "Wklej\tCTRL-V", IDM_EDIT_PASTE END - POPUP "Wygld" + POPUP "Wygląd" BEGIN MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION MENUITEM SEPARATOR MENUITEM "Szesnastkowo\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Dziesitnie\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "semkowo\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Dziesiętnie\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Ósemkowo\tF7", IDM_VIEW_OCT, CHECKED MENUITEM "Binarnie\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Stopni\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "Radianw\tF3", IDM_VIEW_RAD, CHECKED - MENUITEM "Gradianw\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM "Radianów\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Gradianów\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR MENUITEM "Grupowanie cyfr", IDM_VIEW_GROUP, CHECKED END @@ -386,15 +387,15 @@ BEGIN MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY MENUITEM "Wklej\tCTRL-V", IDM_EDIT_PASTE END - POPUP "Wygld" + POPUP "Wygląd" BEGIN MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION MENUITEM SEPARATOR MENUITEM "Szesnastkowo\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Dziesitnie\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "semkowo\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Dziesiętnie\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Ósemkowo\tF7", IDM_VIEW_OCT, CHECKED MENUITEM "Binarnie\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED @@ -419,7 +420,7 @@ BEGIN MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY MENUITEM "Wklej\tCTRL-V", IDM_EDIT_PASTE END - POPUP "Wygld" + POPUP "Wygląd" BEGIN MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED @@ -439,26 +440,26 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "Kalkulator ReactOS jest darmowym programem, publikowanym zgodnie z licencj GNU GPL.\r\n\r\nMoesz otrzyma kopi licencji GNU GPL tutaj:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nTumaczenie licencji GNU GPL znajdziesz tutaj:\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "Bd" + IDS_STRING_LICENSE "Kalkulator ReactOS jest darmowym programem, publikowanym zgodnie z licencją GNU GPL.\r\n\r\nMożesz otrzymać kopię licencji GNU GPL tutaj:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nTłumaczenie licencji GNU GPL znajdziesz tutaj:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_MATH_ERROR "Błąd" IDS_QUICKHELP "Szybka pomoc" END // Types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "Kt" + IDS_CONV_ANGLE "Kąt" IDS_CONV_AREA "Powierzchnia" - IDS_CONV_CONSUMPTION "Zuycie (silniki)" + IDS_CONV_CONSUMPTION "Zużycie (silniki)" IDS_CONV_CURRENCY "Waluty" IDS_CONV_ENERGY "Energia" - IDS_CONV_LENGTH "Dugo" + IDS_CONV_LENGTH "Długość" IDS_CONV_POWER "Moc" - IDS_CONV_PRESSURE "Cinienie" + IDS_CONV_PRESSURE "Ciśnienie" IDS_CONV_TEMPERATURE "Temperatura" IDS_CONV_TIME "Czas" - IDS_CONV_VELOCITY "Prdko" - IDS_CONV_VOLUME "Objto" + IDS_CONV_VELOCITY "Prędkość" + IDS_CONV_VOLUME "Objętość" IDS_CONV_WEIGHT "Waga" END @@ -483,7 +484,7 @@ BEGIN IDS_AREA_DANBO "Danbo" IDS_AREA_HECTARES "Hektary" IDS_AREA_JEONGBO "Jeongbo" - IDS_AREA_MORGEN_HUNGARY "Morgi (Wgry)" + IDS_AREA_MORGEN_HUNGARY "Morgi (Węgry)" IDS_AREA_MU "Mu" IDS_AREA_PING "Ping" IDS_AREA_PYEONG "Pyeong" @@ -492,8 +493,8 @@ BEGIN IDS_AREA_SE "Se" IDS_AREA_SQUARE_CENTIMETERS "Centymetry kwadratowe" IDS_AREA_SQUARE_CHR "Chr kwadratowe" - IDS_AREA_SQUARE_FATHOMS "Snie kwadratowe" - IDS_AREA_SQUARE_FATHOMS_HUNGARY "Snie kwadratowe (Wgry)" + IDS_AREA_SQUARE_FATHOMS "Sążnie kwadratowe" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Sążnie kwadratowe (Węgry)" IDS_AREA_SQUARE_FEET "Stopy kwadratowe" IDS_AREA_SQUARE_INCHES "Cale kwadratowe" IDS_AREA_SQUARE_KILOMETERS "Kilometry kwadratowe" @@ -513,7 +514,7 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometry/litr" - IDS_CONSUMPTION_L_PER_100_KM "Litry/100 kilometrw" + IDS_CONSUMPTION_L_PER_100_KM "Litry/100 kilometrów" IDS_CONSUMPTION_MILES_GALLON_UK "Mile/galon (UK)" IDS_CONSUMPTION_MILES_GALLON_US "Mile/galon (USA)" END @@ -528,33 +529,33 @@ BEGIN IDS_CURRENCY_DEUTSCHE_MARK "Niemiecka marka" IDS_CURRENCY_DUTCH_GUILDER "Holenderki gulden" IDS_CURRENCY_EURO "Euro" - IDS_CURRENCY_FINNISH_MARKKA "Fiska marka" + IDS_CURRENCY_FINNISH_MARKKA "Fińska marka" IDS_CURRENCY_FRENCH_FRANC "Francuski frank" IDS_CURRENCY_GREEK_DRACHMA "Grecka drachma" IDS_CURRENCY_IRISH_POUND "Irlandzki funt" - IDS_CURRENCY_ITALIAN_LIRA "Woskie liry" + IDS_CURRENCY_ITALIAN_LIRA "Włoskie liry" IDS_CURRENCY_LUXEMBOURG_FRANC "Luksemburski frank" - IDS_CURRENCY_MALTESE_LIRA "Maltaskie liry" + IDS_CURRENCY_MALTESE_LIRA "Maltańskie liry" IDS_CURRENCY_PORTOGUESE_ESCUDO "Portugalskie escudo" - IDS_CURRENCY_SLOVAK_KORUNA "Sowacka korona" - IDS_CURRENCY_SLOVENIAN_TOLAR "Soveski tolar" - IDS_CURRENCY_SPANISH_PESETA "Hiszpaska peseta" + IDS_CURRENCY_SLOVAK_KORUNA "Słowacka korona" + IDS_CURRENCY_SLOVENIAN_TOLAR "Słoveński tolar" + IDS_CURRENCY_SPANISH_PESETA "Hiszpańska peseta" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C kalorie" + IDS_ENERGY_15_C_CALORIES "15 °C kalorie" IDS_ENERGY_BTUS "British Thermal Unit" IDS_ENERGY_ERGS "Ergi" IDS_ENERGY_EVS "Elektronowolty" IDS_ENERGY_FOOT_POUNDS "Stopo-funty" - IDS_ENERGY_IT_CALORIES "Midzynarodowa Tablica kalorii" - IDS_ENERGY_IT_KILOCALORIES "Midzynarodowa Tablica kilokalorii" - IDS_ENERGY_JOULES "Dule" - IDS_ENERGY_KILOJOULES "Kilodule" + IDS_ENERGY_IT_CALORIES "Międzynarodowa Tablica kalorii" + IDS_ENERGY_IT_KILOCALORIES "Międzynarodowa Tablica kilokalorii" + IDS_ENERGY_JOULES "Dżule" + IDS_ENERGY_KILOJOULES "Kilodżule" IDS_ENERGY_KILOWATT_HOURS "Kilowatogodziny" - IDS_ENERGY_NUTRITION_CALORIES "Kalorie spoywcze" + IDS_ENERGY_NUTRITION_CALORIES "Kalorie spożywcze" IDS_ENERGY_TH_CALORIES "Kalorie termochemiczne" END @@ -570,12 +571,12 @@ BEGIN IDS_LENGTH_CHOU "Chou" IDS_LENGTH_CHR "Chr" IDS_LENGTH_CUN "Cun" - IDS_LENGTH_FATHOMS "Snie" - IDS_LENGTH_FATHOMS_HUNGARY "Snie (Wgry)" + IDS_LENGTH_FATHOMS "Sążnie" + IDS_LENGTH_FATHOMS_HUNGARY "Sążnie (Węgry)" IDS_LENGTH_FEET "Stopy" IDS_LENGTH_FURLONGS "Furlongs" IDS_LENGTH_GAN "Gan" - IDS_LENGTH_HANDS "Donie" + IDS_LENGTH_HANDS "Dłonie" IDS_LENGTH_HUNH "Hunh" IDS_LENGTH_INCHES "Cale" IDS_LENGTH_JA "Ja" @@ -585,7 +586,7 @@ BEGIN IDS_LENGTH_KEUB "Keub" IDS_LENGTH_KILOMETERS "Kilometry" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "Lata wietlne" + IDS_LENGTH_LIGHT_YEARS "Lata świetlne" IDS_LENGTH_LINKS_UK "Links (UK)" IDS_LENGTH_METERS "Metry" IDS_LENGTH_MICRONS "Mikrometry" @@ -613,8 +614,8 @@ END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_BTUS_PER_MINUTE "BTU na minut" - IDS_POWER_FPS_PER_MINUTE "Stopo-funty na minut" + IDS_POWER_BTUS_PER_MINUTE "BTU na minutę" + IDS_POWER_FPS_PER_MINUTE "Stopo-funty na minutę" IDS_POWER_HORSEPOWER "Konie mechaniczne" IDS_POWER_KILOWATTS "Kilowaty" IDS_POWER_MEGAWATTS "Megawaty" @@ -628,7 +629,7 @@ BEGIN IDS_PRESSURE_BARS "Bary" IDS_PRESSURE_HECTOPASCALS "Hektopaskale" IDS_PRESSURE_KILOPASCALS "Kilopaskale" - IDS_PRESSURE_MM_OF_MERCURY "Milimetry supka rtci" + IDS_PRESSURE_MM_OF_MERCURY "Milimetry słupka rtęci" IDS_PRESSURE_PASCALS "Paskale" IDS_PRESSURE_PSI "Funty na cal kwadratowy" END @@ -659,35 +660,35 @@ END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND "Centymetry/sekund" - IDS_VELOCITY_FEET_HOUR "Stopy/godzin" - IDS_VELOCITY_FEET_SECOND "Stopy/sekund" - IDS_VELOCITY_KILOMETERS_HOUR "Kilometry/godzin" - IDS_VELOCITY_KNOTS "Wzy" + IDS_VELOCITY_CMS_SECOND "Centymetry/sekundę" + IDS_VELOCITY_FEET_HOUR "Stopy/godzinę" + IDS_VELOCITY_FEET_SECOND "Stopy/sekundę" + IDS_VELOCITY_KILOMETERS_HOUR "Kilometry/godzinę" + IDS_VELOCITY_KNOTS "Węzły" IDS_VELOCITY_MACH "Machy" - IDS_VELOCITY_METERS_SECOND "Metry/sekund" - IDS_VELOCITY_MILES_HOUR "Mile/godzin" + IDS_VELOCITY_METERS_SECOND "Metry/sekundę" + IDS_VELOCITY_MILES_HOUR "Mile/godzinę" END // TYPES OF VOLUMES STRINGTABLE DISCARDABLE BEGIN - IDS_VOLUME_BARRELS_UK "Baryki (UK)" - IDS_VOLUME_BARRELS_OIL "Baryki" + IDS_VOLUME_BARRELS_UK "Baryłki (UK)" + IDS_VOLUME_BARRELS_OIL "Baryłki" IDS_VOLUME_BUN "Bun" IDS_VOLUME_BUSHELS_UK "Buszle (UK)" IDS_VOLUME_BUSHELS_US "Buszle (US)" - IDS_VOLUME_CUBIC_CENTIMETERS "Centymetry szecienne" - IDS_VOLUME_CUBIC_FEET "Stopy szecienne" - IDS_VOLUME_CUBIC_INCHES "Cale szecienne" - IDS_VOLUME_CUBIC_METERS "Metry szecienne" - IDS_VOLUME_CUBIC_YARDS "Jardy szecienne" + IDS_VOLUME_CUBIC_CENTIMETERS "Centymetry sześcienne" + IDS_VOLUME_CUBIC_FEET "Stopy sześcienne" + IDS_VOLUME_CUBIC_INCHES "Cale sześcienne" + IDS_VOLUME_CUBIC_METERS "Metry sześcienne" + IDS_VOLUME_CUBIC_YARDS "Jardy sześcienne" IDS_VOLUME_DOE "Doe" - IDS_VOLUME_FLUID_OUNCES_UK "Uncje, pyn (UK)" - IDS_VOLUME_FLUID_OUNCES_US "Uncje, pyn (US)" + IDS_VOLUME_FLUID_OUNCES_UK "Uncje, płyn (UK)" + IDS_VOLUME_FLUID_OUNCES_US "Uncje, płyn (US)" IDS_VOLUME_GALLONS_UK "Galony (UK)" IDS_VOLUME_GALLONS_DRY_US "Galony, sypkie (US)" - IDS_VOLUME_GALLONS_LIQUID_US "Galony, pyn (US)" + IDS_VOLUME_GALLONS_LIQUID_US "Galony, płyn (US)" IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" IDS_VOLUME_ICCE "Icce" @@ -697,10 +698,10 @@ BEGIN IDS_VOLUME_MILLILITERS "Mililitry" IDS_VOLUME_PINTS_UK "Pinty (UK)" IDS_VOLUME_PINTS_DRY_US "Pinty, sypkie (US)" - IDS_VOLUME_PINTS_LIQUID_US "Pinty, pyn (US)" + IDS_VOLUME_PINTS_LIQUID_US "Pinty, płyn (US)" IDS_VOLUME_QUARTS_UK "Kwarty (UK)" IDS_VOLUME_QUARTS_DRY_US "Kwarty, sypkie (US)" - IDS_VOLUME_QUARTS_LIQUID_US "Kwarty, pyn (US)" + IDS_VOLUME_QUARTS_LIQUID_US "Kwarty, płyn (US)" IDS_VOLUME_SEKI "Seki" IDS_VOLUME_SYOU "Syou" IDS_VOLUME_TANANLOUNG "Tananloung" diff --git a/base/applications/calc/lang/ro-RO.rc b/base/applications/calc/lang/ro-RO.rc index 4c353ea9c0f..e4e25e112bf 100644 --- a/base/applications/calc/lang/ro-RO.rc +++ b/base/applications/calc/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - // Dialog IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 @@ -732,5 +730,3 @@ BEGIN IDS_WEIGHT_TONS_UK "Tone (Marea Britanie)" IDS_WEIGHT_TONS_US "Tone (SUA)" END - -#pragma code_page(default) diff --git a/base/applications/calc/lang/ru-RU.rc b/base/applications/calc/lang/ru-RU.rc index 6d2d41c3612..e2f26594db4 100644 --- a/base/applications/calc/lang/ru-RU.rc +++ b/base/applications/calc/lang/ru-RU.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Калькулятор ReactOS" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -133,19 +133,19 @@ BEGIN PUSHBUTTON "F",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP GROUPBOX "",IDC_STATIC,140,16,172,21 - CONTROL "8 ",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | + CONTROL "8 байт",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,148,24,37,10 - CONTROL "4 ",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | + CONTROL "4 байт",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,188,24,37,10 - CONTROL "2 ",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "2 байт",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,232,24,33,10 - CONTROL "1 ",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "1 байт",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,272,24,30,10 - CONTROL "",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + CONTROL "Градусы",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "Радианы",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 - CONTROL "",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + CONTROL "Грады",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -160,7 +160,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Калькулятор ReactOS" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -227,20 +227,20 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Калькулятор ReactOS" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "",IDC_BUTTON_CONVERT,35,105,76,17 + PUSHBUTTON "Конвертировать",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT ":",IDC_STATIC,4,20,56,8 + LTEXT "Категория:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT " :",IDC_STATIC,4,49,75,8 + LTEXT "Конвертировать из:",IDC_STATIC,4,49,75,8 COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT " :",IDC_STATIC,4,76,75,8 + LTEXT "Конвертировать в:",IDC_STATIC,4,76,75,8 CONTROL "C",IDC_BUTTON_CANC,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | @@ -305,16 +305,16 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "О программе" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT " ReactOS",IDC_STATIC,120,12,132,8, + LTEXT "Калькулятор ReactOS",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE - LTEXT " ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE - LTEXT ": ",IDC_STATIC,120,32,132,8, + LTEXT "Версия ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Автор: Карло Брамини",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 GROUPBOX "",IDC_STATIC,4,56,256,88 @@ -324,7 +324,7 @@ END IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Статистика" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | @@ -341,89 +341,89 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Правка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Копировать\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Вставить\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Вид" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Обычный", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Научный", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Преобразование", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Шестнадцатеричный\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Десятичный\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Восьмеричный\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Двоичный\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "\tF3", IDM_VIEW_RAD, CHECKED - MENUITEM "\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM "Градусы\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "Радианы\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Грады\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Количество цифр в группе", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Справка" BEGIN - MENUITEM " ", IDM_HELP_HELP + MENUITEM "Вызов справки", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ", IDM_HELP_ABOUT + MENUITEM "О программе", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Правка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Копировать\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Вставить\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Вид" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Обычный", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Научный", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Преобразование", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Шестнадцатеричный\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Десятичный\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Восьмеричный\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Двоичный\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "8 \tF12", IDM_VIEW_QWORD, CHECKED - MENUITEM "4 \tF2", IDM_VIEW_DWORD, CHECKED - MENUITEM "2 \tF3", IDM_VIEW_WORD, CHECKED - MENUITEM "1 \tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM "8 байт\tF12", IDM_VIEW_QWORD, CHECKED + MENUITEM "4 байт\tF2", IDM_VIEW_DWORD, CHECKED + MENUITEM "2 байт\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "1 байт\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Количество цифр в группе", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Справка" BEGIN - MENUITEM " ", IDM_HELP_HELP + MENUITEM "Вызов справки", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ", IDM_HELP_ABOUT + MENUITEM "О программе", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Правка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Копировать\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Вставить\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Вид" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Обычный", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Научный", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Преобразование", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Количество цифр в группе", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Справка" BEGIN - MENUITEM " ", IDM_HELP_HELP + MENUITEM "Вызов справки", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ", IDM_HELP_ABOUT + MENUITEM "О программе", IDM_HELP_ABOUT END END @@ -431,302 +431,302 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE " ReactOS - , GNU GPL.\r\n\r\n GNU GPL :\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\n c GNU GPL :\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "" - IDS_QUICKHELP " " + IDS_STRING_LICENSE "Калькулятор ReactOS - свободное программное обеспечение, распространяющееся по лицензии GNU GPL.\r\n\r\nВы можете получить копию лицензии GNU GPL здесь:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nОзнакомиться c переводом лицензии GNU GPL можно здесь:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_MATH_ERROR "Ошибка" + IDS_QUICKHELP "Быстрая справка" END // types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "" - IDS_CONV_AREA "" - IDS_CONV_CONSUMPTION " ()" - IDS_CONV_CURRENCY "" - IDS_CONV_ENERGY "" - IDS_CONV_LENGTH "" - IDS_CONV_POWER "" - IDS_CONV_PRESSURE "" - IDS_CONV_TEMPERATURE "" - IDS_CONV_TIME "" - IDS_CONV_VELOCITY "" - IDS_CONV_VOLUME "" - IDS_CONV_WEIGHT "" + IDS_CONV_ANGLE "Угол" + IDS_CONV_AREA "Площадь" + IDS_CONV_CONSUMPTION "Расход топлива (двигатели)" + IDS_CONV_CURRENCY "Валюта" + IDS_CONV_ENERGY "Энергия" + IDS_CONV_LENGTH "Длина" + IDS_CONV_POWER "Мощность" + IDS_CONV_PRESSURE "Давление" + IDS_CONV_TEMPERATURE "Температура" + IDS_CONV_TIME "Время" + IDS_CONV_VELOCITY "Скорость" + IDS_CONV_VOLUME "Объем" + IDS_CONV_WEIGHT "Вес" END // TYPES OF ANGLES STRINGTABLE DISCARDABLE BEGIN - IDS_ANGLE_DEGREES "" - IDS_ANGLE_GRADIANS "" - IDS_ANGLE_RADIANS "" + IDS_ANGLE_DEGREES "градус" + IDS_ANGLE_GRADIANS "град" + IDS_ANGLE_RADIANS "радиан" END // TYPES OF AREAS STRINGTABLE DISCARDABLE BEGIN - IDS_AREA_ACRES "" - IDS_AREA_ACRES_BRAZIL " ()" - IDS_AREA_ACRES_FRANCE " ()" - IDS_AREA_ACRES_SCOTS " ()" - IDS_AREA_ACRES_US " ()" - IDS_AREA_ARES "" - IDS_AREA_CHOU "" - IDS_AREA_DANBO "" - IDS_AREA_HECTARES "" - IDS_AREA_JEONGBO "" - IDS_AREA_MORGEN_HUNGARY " ()" - IDS_AREA_MU "" - IDS_AREA_PING "" - IDS_AREA_PYEONG "" - IDS_AREA_PYEONGBANGJA "" - IDS_AREA_RAI "" - IDS_AREA_SE " " - IDS_AREA_SQUARE_CENTIMETERS " " - IDS_AREA_SQUARE_CHR " " - IDS_AREA_SQUARE_FATHOMS " " - IDS_AREA_SQUARE_FATHOMS_HUNGARY " ()" - IDS_AREA_SQUARE_FEET " " - IDS_AREA_SQUARE_INCHES " " - IDS_AREA_SQUARE_KILOMETERS " " - IDS_AREA_SQUARE_LAR " " - IDS_AREA_SQUARE_METER " " - IDS_AREA_SQUARE_MILES " " - IDS_AREA_SQUARE_MILLIMETERS " " - IDS_AREA_SQUARE_SHAKU " " - IDS_AREA_SQUARE_TSUEN " " - IDS_AREA_SQUARE_VA " " - IDS_AREA_SQUARE_YARD " " - IDS_AREA_TAN "" - IDS_AREA_TSUBO "" + IDS_AREA_ACRES "акр" + IDS_AREA_ACRES_BRAZIL "акр (бразильский)" + IDS_AREA_ACRES_FRANCE "акр (французский)" + IDS_AREA_ACRES_SCOTS "акр (шотландский)" + IDS_AREA_ACRES_US "акр (США)" + IDS_AREA_ARES "ар" + IDS_AREA_CHOU "чоу" + IDS_AREA_DANBO "дамбо" + IDS_AREA_HECTARES "гектар" + IDS_AREA_JEONGBO "дженгбо" + IDS_AREA_MORGEN_HUNGARY "морген (венгерский)" + IDS_AREA_MU "му" + IDS_AREA_PING "пин" + IDS_AREA_PYEONG "пён" + IDS_AREA_PYEONGBANGJA "пёнбанджа" + IDS_AREA_RAI "рай" + IDS_AREA_SE "хэйхо сяку" + IDS_AREA_SQUARE_CENTIMETERS "квадратный сантиметр" + IDS_AREA_SQUARE_CHR "квадратный ча" + IDS_AREA_SQUARE_FATHOMS "квадратный фатом" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "квадратный фатом (венгерский)" + IDS_AREA_SQUARE_FEET "квадратный фут" + IDS_AREA_SQUARE_INCHES "квадратный дюйм" + IDS_AREA_SQUARE_KILOMETERS "квадратный километр" + IDS_AREA_SQUARE_LAR "квадратный лар" + IDS_AREA_SQUARE_METER "квадратный метр" + IDS_AREA_SQUARE_MILES "квадратная миля" + IDS_AREA_SQUARE_MILLIMETERS "квадратный миллиметр" + IDS_AREA_SQUARE_SHAKU "квадратный шаку" + IDS_AREA_SQUARE_TSUEN "квадратный тсуэн" + IDS_AREA_SQUARE_VA "квадратная ва" + IDS_AREA_SQUARE_YARD "квадратный ярд" + IDS_AREA_TAN "тан" + IDS_AREA_TSUBO "цубо" END // TYPES OF COMSUMPTIONS STRINGTABLE DISCARDABLE BEGIN - IDS_CONSUMPTION_KM_PER_L "/" - IDS_CONSUMPTION_L_PER_100_KM "/100 " - IDS_CONSUMPTION_MILES_GALLON_UK "/ ()" - IDS_CONSUMPTION_MILES_GALLON_US "/ ()" + IDS_CONSUMPTION_KM_PER_L "километр/литр" + IDS_CONSUMPTION_L_PER_100_KM "литров/100 километров" + IDS_CONSUMPTION_MILES_GALLON_UK "миль/галлон (британский)" + IDS_CONSUMPTION_MILES_GALLON_US "миль/галлон (США)" END // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN - IDS_CURRENCY_AUSTRIAN_SCHILLING " " - IDS_CURRENCY_BELGIAN_FRANC " " - IDS_CURRENCY_CYPRIOT_POUND " " - IDS_CURRENCY_CZECH_KORUNA " " - IDS_CURRENCY_DEUTSCHE_MARK " " - IDS_CURRENCY_DUTCH_GUILDER " " - IDS_CURRENCY_EURO "" - IDS_CURRENCY_FINNISH_MARKKA " " - IDS_CURRENCY_FRENCH_FRANC " " - IDS_CURRENCY_GREEK_DRACHMA " " - IDS_CURRENCY_IRISH_POUND " " - IDS_CURRENCY_ITALIAN_LIRA " " - IDS_CURRENCY_LUXEMBOURG_FRANC " " - IDS_CURRENCY_MALTESE_LIRA " " - IDS_CURRENCY_PORTOGUESE_ESCUDO " " - IDS_CURRENCY_SLOVAK_KORUNA " " - IDS_CURRENCY_SLOVENIAN_TOLAR " " - IDS_CURRENCY_SPANISH_PESETA " " + IDS_CURRENCY_AUSTRIAN_SCHILLING "Австралийский шиллинг" + IDS_CURRENCY_BELGIAN_FRANC "Бельгийский франк" + IDS_CURRENCY_CYPRIOT_POUND "Киприотский фунт" + IDS_CURRENCY_CZECH_KORUNA "Чешская крона" + IDS_CURRENCY_DEUTSCHE_MARK "Немецкая марка" + IDS_CURRENCY_DUTCH_GUILDER "Голландский гульден" + IDS_CURRENCY_EURO "Евро" + IDS_CURRENCY_FINNISH_MARKKA "Финская марка" + IDS_CURRENCY_FRENCH_FRANC "Французский франк" + IDS_CURRENCY_GREEK_DRACHMA "Греческая драхма" + IDS_CURRENCY_IRISH_POUND "Ирландский фунт" + IDS_CURRENCY_ITALIAN_LIRA "Итальянская лира" + IDS_CURRENCY_LUXEMBOURG_FRANC "Люксембургский франк" + IDS_CURRENCY_MALTESE_LIRA "Мальтийская лира" + IDS_CURRENCY_PORTOGUESE_ESCUDO "Португальское эскудо" + IDS_CURRENCY_SLOVAK_KORUNA "Словацкая крона" + IDS_CURRENCY_SLOVENIAN_TOLAR "Словенский толар" + IDS_CURRENCY_SPANISH_PESETA "Испанская песета" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES " " - IDS_ENERGY_BTUS " " - IDS_ENERGY_ERGS "" - IDS_ENERGY_EVS "" - IDS_ENERGY_FOOT_POUNDS "" - IDS_ENERGY_IT_CALORIES " " - IDS_ENERGY_IT_KILOCALORIES " " - IDS_ENERGY_JOULES "" - IDS_ENERGY_KILOJOULES "" - IDS_ENERGY_KILOWATT_HOURS "-" - IDS_ENERGY_NUTRITION_CALORIES " " - IDS_ENERGY_TH_CALORIES " " + IDS_ENERGY_15_C_CALORIES "калория пятнадцатиградусная" + IDS_ENERGY_BTUS "британская тепловая единица" + IDS_ENERGY_ERGS "эрг" + IDS_ENERGY_EVS "электронвольт" + IDS_ENERGY_FOOT_POUNDS "футофунт" + IDS_ENERGY_IT_CALORIES "калория международная" + IDS_ENERGY_IT_KILOCALORIES "килокалория международная" + IDS_ENERGY_JOULES "джоуль" + IDS_ENERGY_KILOJOULES "килоджоуль" + IDS_ENERGY_KILOWATT_HOURS "киловатт-час" + IDS_ENERGY_NUTRITION_CALORIES "калория пищевая" + IDS_ENERGY_TH_CALORIES "калория термохимическая" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "" - IDS_LENGTH_ASTRONOMICAL_UNITS " " - IDS_LENGTH_BARLEYCORNS "" - IDS_LENGTH_CENTIMETERS "" - IDS_LENGTH_CHAINS_UK " ()" - IDS_LENGTH_CHI "" - IDS_LENGTH_CHOU "" - IDS_LENGTH_CHR "" - IDS_LENGTH_CUN "" - IDS_LENGTH_FATHOMS "" - IDS_LENGTH_FATHOMS_HUNGARY " ()" - IDS_LENGTH_FEET "" - IDS_LENGTH_FURLONGS "" - IDS_LENGTH_GAN "" - IDS_LENGTH_HANDS "" - IDS_LENGTH_HUNH "" - IDS_LENGTH_INCHES "" - IDS_LENGTH_JA "" - IDS_LENGTH_JEONG "" - IDS_LENGTH_KABIET "" - IDS_LENGTH_KEN "" - IDS_LENGTH_KEUB "" - IDS_LENGTH_KILOMETERS "" - IDS_LENGTH_LAR "" - IDS_LENGTH_LIGHT_YEARS " " - IDS_LENGTH_LINKS_UK " ()" - IDS_LENGTH_METERS "" - IDS_LENGTH_MICRONS "" - IDS_LENGTH_MILES "" - IDS_LENGTH_MILLIMETERS "" - IDS_LENGTH_NAUTICAL_MILES " " - IDS_LENGTH_NIEU "" - IDS_LENGTH_PARSECS "" - IDS_LENGTH_PICAS "" - IDS_LENGTH_RI_JAPAN " ()" - IDS_LENGTH_RI_KOREA " ()" - IDS_LENGTH_RODS "" - IDS_LENGTH_SAWK "" - IDS_LENGTH_SEN "" - IDS_LENGTH_SHAKU "" - IDS_LENGTH_SPAN "" - IDS_LENGTH_SUN "" - IDS_LENGTH_TSUEN "" - IDS_LENGTH_VA "" - IDS_LENGTH_YARDS "" - IDS_LENGTH_YOTE "" - IDS_LENGTH_ZHANG "" + IDS_LENGTH_ANGSTROMS "ангстрем" + IDS_LENGTH_ASTRONOMICAL_UNITS "астрономическая еденица" + IDS_LENGTH_BARLEYCORNS "барлейкорн" + IDS_LENGTH_CENTIMETERS "сантиметр" + IDS_LENGTH_CHAINS_UK "чейн (британский)" + IDS_LENGTH_CHI "чи" + IDS_LENGTH_CHOU "чоу" + IDS_LENGTH_CHR "ча" + IDS_LENGTH_CUN "цунь" + IDS_LENGTH_FATHOMS "фатом" + IDS_LENGTH_FATHOMS_HUNGARY "фатом (венгерский)" + IDS_LENGTH_FEET "фут" + IDS_LENGTH_FURLONGS "фарлонг" + IDS_LENGTH_GAN "гань" + IDS_LENGTH_HANDS "ладонь" + IDS_LENGTH_HUNH "ханх" + IDS_LENGTH_INCHES "дюйм" + IDS_LENGTH_JA "я" + IDS_LENGTH_JEONG "джеонг" + IDS_LENGTH_KABIET "кабьет" + IDS_LENGTH_KEN "кен" + IDS_LENGTH_KEUB "кеуб" + IDS_LENGTH_KILOMETERS "километр" + IDS_LENGTH_LAR "лар" + IDS_LENGTH_LIGHT_YEARS "световой год" + IDS_LENGTH_LINKS_UK "линк (британский)" + IDS_LENGTH_METERS "метр" + IDS_LENGTH_MICRONS "микрометр" + IDS_LENGTH_MILES "миля" + IDS_LENGTH_MILLIMETERS "миллиметр" + IDS_LENGTH_NAUTICAL_MILES "морская миля" + IDS_LENGTH_NIEU "ньё" + IDS_LENGTH_PARSECS "парсек" + IDS_LENGTH_PICAS "пика" + IDS_LENGTH_RI_JAPAN "ри (японская)" + IDS_LENGTH_RI_KOREA "ри (корейская)" + IDS_LENGTH_RODS "род" + IDS_LENGTH_SAWK "соук" + IDS_LENGTH_SEN "сен" + IDS_LENGTH_SHAKU "шаку" + IDS_LENGTH_SPAN "спан" + IDS_LENGTH_SUN "сан" + IDS_LENGTH_TSUEN "тсуэн" + IDS_LENGTH_VA "ва" + IDS_LENGTH_YARDS "ярд" + IDS_LENGTH_YOTE "йоут" + IDS_LENGTH_ZHANG "чжан" END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_BTUS_PER_MINUTE " " - IDS_POWER_FPS_PER_MINUTE " " - IDS_POWER_HORSEPOWER " " - IDS_POWER_KILOWATTS "" - IDS_POWER_MEGAWATTS "" - IDS_POWER_WATTS "" + IDS_POWER_BTUS_PER_MINUTE "британская тепловая единица в минуту" + IDS_POWER_FPS_PER_MINUTE "футофунт в минуту" + IDS_POWER_HORSEPOWER "лошадиная сила" + IDS_POWER_KILOWATTS "киловатт" + IDS_POWER_MEGAWATTS "мегаватт" + IDS_POWER_WATTS "ватт" END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES " ()" - IDS_PRESSURE_BARS "" - IDS_PRESSURE_HECTOPASCALS "" - IDS_PRESSURE_KILOPASCALS "" - IDS_PRESSURE_MM_OF_MERCURY " " - IDS_PRESSURE_PASCALS "" - IDS_PRESSURE_PSI " " + IDS_PRESSURE_ATMOSPHERES "атмосфера (физическая)" + IDS_PRESSURE_BARS "бар" + IDS_PRESSURE_HECTOPASCALS "гектопаскаль" + IDS_PRESSURE_KILOPASCALS "килопаскаль" + IDS_PRESSURE_MM_OF_MERCURY "миллиметр ртутного столба" + IDS_PRESSURE_PASCALS "паскаль" + IDS_PRESSURE_PSI "фунт на квадратный дюйм" END // TYPES OF TEMPERATURES STRINGTABLE DISCARDABLE BEGIN - IDS_TEMPERATURE_CELSIUS " ( )" - IDS_TEMPERATURE_FAHRENHEIT " ( )" - IDS_TEMPERATURE_KELVIN " ( )" - IDS_TEMPERATURE_RANKINE " ( Rankine)" + IDS_TEMPERATURE_CELSIUS "градус (по шкале Цельсия)" + IDS_TEMPERATURE_FAHRENHEIT "градус (по шкале Фаренгейта)" + IDS_TEMPERATURE_KELVIN "градус (по шкале Кельвина)" + IDS_TEMPERATURE_RANKINE "градус (по шкале Rankine)" END // TYPES OF TIME STRINGTABLE DISCARDABLE BEGIN - IDS_TIME_DAYS "" - IDS_TIME_HOURS "" + IDS_TIME_DAYS "день" + IDS_TIME_HOURS "час" IDS_TIME_NANOSECONDS "Nanoseconds" - IDS_TIME_MICROSECONDS "" - IDS_TIME_MILLISECONDS "" - IDS_TIME_MINUTES "" - IDS_TIME_SECONDS "" - IDS_TIME_WEEKS "" - IDS_TIME_YEARS "" + IDS_TIME_MICROSECONDS "микросекунда" + IDS_TIME_MILLISECONDS "миллисекунда" + IDS_TIME_MINUTES "минута" + IDS_TIME_SECONDS "секунда" + IDS_TIME_WEEKS "неделя" + IDS_TIME_YEARS "год" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND " " - IDS_VELOCITY_FEET_HOUR " " - IDS_VELOCITY_FEET_SECOND " " - IDS_VELOCITY_KILOMETERS_HOUR " " - IDS_VELOCITY_KNOTS "" - IDS_VELOCITY_MACH "" - IDS_VELOCITY_METERS_SECOND " " - IDS_VELOCITY_MILES_HOUR " " + IDS_VELOCITY_CMS_SECOND "сантиметр в час" + IDS_VELOCITY_FEET_HOUR "фут в час" + IDS_VELOCITY_FEET_SECOND "фут в секунду" + IDS_VELOCITY_KILOMETERS_HOUR "километр в час" + IDS_VELOCITY_KNOTS "узел" + IDS_VELOCITY_MACH "мах" + IDS_VELOCITY_METERS_SECOND "метр в секунду" + IDS_VELOCITY_MILES_HOUR "миля в час" END // TYPES OF VOLUMES STRINGTABLE DISCARDABLE BEGIN - IDS_VOLUME_BARRELS_UK " ()" - IDS_VOLUME_BARRELS_OIL " " - IDS_VOLUME_BUN "" - IDS_VOLUME_BUSHELS_UK " ()" - IDS_VOLUME_BUSHELS_US " ()" - IDS_VOLUME_CUBIC_CENTIMETERS " " - IDS_VOLUME_CUBIC_FEET " " - IDS_VOLUME_CUBIC_INCHES " " - IDS_VOLUME_CUBIC_METERS " " - IDS_VOLUME_CUBIC_YARDS " " - IDS_VOLUME_DOE "" - IDS_VOLUME_FLUID_OUNCES_UK " ()" - IDS_VOLUME_FLUID_OUNCES_US " ()" - IDS_VOLUME_GALLONS_UK " ()" - IDS_VOLUME_GALLONS_DRY_US " ( , )" - IDS_VOLUME_GALLONS_LIQUID_US " ( , )" - IDS_VOLUME_GOU "" - IDS_VOLUME_HOP "" - IDS_VOLUME_ICCE "" - IDS_VOLUME_KWIAN "" - IDS_VOLUME_LITERS "" - IDS_VOLUME_MAL "" - IDS_VOLUME_MILLILITERS "" - IDS_VOLUME_PINTS_UK " ()" - IDS_VOLUME_PINTS_DRY_US " ( , )" - IDS_VOLUME_PINTS_LIQUID_US " ( , )" - IDS_VOLUME_QUARTS_UK " ()" - IDS_VOLUME_QUARTS_DRY_US " ( , )" - IDS_VOLUME_QUARTS_LIQUID_US " ( , )" - IDS_VOLUME_SEKI "" - IDS_VOLUME_SYOU "" - IDS_VOLUME_TANANLOUNG "" - IDS_VOLUME_TANG "" - IDS_VOLUME_TO "" + IDS_VOLUME_BARRELS_UK "баррель (британский)" + IDS_VOLUME_BARRELS_OIL "баррель нефтяной" + IDS_VOLUME_BUN "бун" + IDS_VOLUME_BUSHELS_UK "бушель (британский)" + IDS_VOLUME_BUSHELS_US "бушель (США)" + IDS_VOLUME_CUBIC_CENTIMETERS "кубический сантиметр" + IDS_VOLUME_CUBIC_FEET "кубический фут" + IDS_VOLUME_CUBIC_INCHES "кубический дюйм" + IDS_VOLUME_CUBIC_METERS "кубический метр" + IDS_VOLUME_CUBIC_YARDS "кубический ярд" + IDS_VOLUME_DOE "то" + IDS_VOLUME_FLUID_OUNCES_UK "жидкая унция (британская)" + IDS_VOLUME_FLUID_OUNCES_US "жидкая унция (США)" + IDS_VOLUME_GALLONS_UK "галлон (британский)" + IDS_VOLUME_GALLONS_DRY_US "галлон (для сухих веществ, США)" + IDS_VOLUME_GALLONS_LIQUID_US "галлон (для жидкостей, США)" + IDS_VOLUME_GOU "гоу" + IDS_VOLUME_HOP "хоп" + IDS_VOLUME_ICCE "иккэ" + IDS_VOLUME_KWIAN "квиан" + IDS_VOLUME_LITERS "литр" + IDS_VOLUME_MAL "маль" + IDS_VOLUME_MILLILITERS "миллилитр" + IDS_VOLUME_PINTS_UK "пинта (британская)" + IDS_VOLUME_PINTS_DRY_US "пинта (для сухих веществ, США)" + IDS_VOLUME_PINTS_LIQUID_US "пинта (для жидкостей, США)" + IDS_VOLUME_QUARTS_UK "кварта (британская)" + IDS_VOLUME_QUARTS_DRY_US "кварта (для сухих веществ, США)" + IDS_VOLUME_QUARTS_LIQUID_US "кварта (для жидкостей, США)" + IDS_VOLUME_SEKI "сэки" + IDS_VOLUME_SYOU "сё" + IDS_VOLUME_TANANLOUNG "тананлунг" + IDS_VOLUME_TANG "тан" + IDS_VOLUME_TO "ту" END // TYPES OF WEIGHTS STRINGTABLE DISCARDABLE BEGIN - IDS_WEIGHT_BAHT "" - IDS_WEIGHT_CARATS "" - IDS_WEIGHT_CHUNG "" - IDS_WEIGHT_DON "" - IDS_WEIGHT_GEUN "" - IDS_WEIGHT_GRAMS "" - IDS_WEIGHT_GWAN "" - IDS_WEIGHT_HARB "" - IDS_WEIGHT_JIN_CHINA " ()" - IDS_WEIGHT_JIN_TAIWAN " ()" - IDS_WEIGHT_KAN "" - IDS_WEIGHT_KILOGRAMS "" - IDS_WEIGHT_KIN "" - IDS_WEIGHT_LIANG_CHINA " ()" - IDS_WEIGHT_LIANG_TAIWAN " ()" - IDS_WEIGHT_MONME "" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS " ()" - IDS_WEIGHT_OUNCES_TROY " ()" - IDS_WEIGHT_POUNDS "" - IDS_WEIGHT_QUINTAL_METRIC " ()" - IDS_WEIGHT_SALOUNG "" - IDS_WEIGHT_STONES "" - IDS_WEIGHT_TAMLUNG "" - IDS_WEIGHT_TONNES "" - IDS_WEIGHT_TONS_UK " ()" - IDS_WEIGHT_TONS_US " ()" + IDS_WEIGHT_BAHT "бат" + IDS_WEIGHT_CARATS "карат" + IDS_WEIGHT_CHUNG "чанг" + IDS_WEIGHT_DON "дон" + IDS_WEIGHT_GEUN "джин" + IDS_WEIGHT_GRAMS "грамм" + IDS_WEIGHT_GWAN "кван" + IDS_WEIGHT_HARB "хап" + IDS_WEIGHT_JIN_CHINA "джин (китайский)" + IDS_WEIGHT_JIN_TAIWAN "джин (тайвань)" + IDS_WEIGHT_KAN "канн" + IDS_WEIGHT_KILOGRAMS "килограмм" + IDS_WEIGHT_KIN "кын" + IDS_WEIGHT_LIANG_CHINA "лианг (китайский)" + IDS_WEIGHT_LIANG_TAIWAN "лианг (тайвань)" + IDS_WEIGHT_MONME "монм" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "унция (торговая)" + IDS_WEIGHT_OUNCES_TROY "унция (тройская)" + IDS_WEIGHT_POUNDS "фунт" + IDS_WEIGHT_QUINTAL_METRIC "квинтал (метрический)" + IDS_WEIGHT_SALOUNG "салунг" + IDS_WEIGHT_STONES "стоун" + IDS_WEIGHT_TAMLUNG "тамлунг" + IDS_WEIGHT_TONNES "тонна" + IDS_WEIGHT_TONS_UK "тонна (британская)" + IDS_WEIGHT_TONS_US "тонна (США)" END diff --git a/base/applications/calc/lang/sk-SK.rc b/base/applications/calc/lang/sk-SK.rc index 41f9ca78fe2..263f5d4f47c 100644 --- a/base/applications/calc/lang/sk-SK.rc +++ b/base/applications/calc/lang/sk-SK.rc @@ -1,9 +1,10 @@ -/* TRANSLATOR : Mrio Kamr /Mario Kacmar/ aka Kario (kario@szm.sk) +/* TRANSLATOR : Mário Kačmár /Mario Kacmar/ aka Kario (kario@szm.sk) * DATE OF TR.: 30-01-2008 * LAST CHANGE: 17-09-2010 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) * --------------------------------------- * TODO: - * pridanie naviganch znaiek "&" ? + * pridanie navigačných značiek "&" ? */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT @@ -12,7 +13,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kalkulaka systmu ReactOS" +CAPTION "Kalkulačka systému ReactOS" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -151,7 +152,7 @@ BEGIN WS_VISIBLE,272,24,30,10 CONTROL "Stupne",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "Radiny",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "Radiány",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 CONTROL "Grady",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 @@ -159,7 +160,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Sp",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + PUSHBUTTON "Späť",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -168,7 +169,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kalkulaka systmu ReactOS" +CAPTION "Kalkulačka systému ReactOS" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -176,7 +177,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Sp",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + PUSHBUTTON "Späť",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -235,25 +236,25 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kalkulaka systmu ReactOS" +CAPTION "Kalkulačka systému ReactOS" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "Previes",IDC_BUTTON_CONVERT,35,105,76,17 + PUSHBUTTON "Previesť",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Kategria:",IDC_STATIC,4,20,56,8 + LTEXT "Kategória:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Previes z:",IDC_STATIC,4,49,56,8 + LTEXT "Previesť z:",IDC_STATIC,4,49,56,8 COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Previes na:",IDC_STATIC,4,76,56,8 + LTEXT "Previesť na:",IDC_STATIC,4,76,56,8 CONTROL "C",IDC_BUTTON_CANC,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,232,24,40,17 - CONTROL "Sp",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | + CONTROL "Späť",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,24, 40,17 RTEXT "",IDC_TEXT_OUTPUT,4,4,312,12,SS_CENTERIMAGE, @@ -313,16 +314,16 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "o je kalkulaka systmu ReactOS" +CAPTION "Čo je kalkulačka systému ReactOS" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT "Kalkulaka systmu ReactOS",IDC_STATIC,120,12,132,8, + LTEXT "Kalkulačka systému ReactOS",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE LTEXT "Verzia ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE - LTEXT "Napsal Carlo Bramini",IDC_STATIC,120,32,132,8, + LTEXT "Napísal Carlo Bramini",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 GROUPBOX "",IDC_STATIC,4,56,256,88 @@ -332,7 +333,7 @@ END IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "tatistika" +CAPTION "Štatistika" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | @@ -349,89 +350,89 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "pravy" + POPUP "Úpravy" BEGIN - MENUITEM "Koprova\tCTRL-C", IDM_EDIT_COPY - MENUITEM "Prilepi\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Kopírovať\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Prilepiť\tCTRL-V", IDM_EDIT_PASTE END - POPUP "Zobrazi" + POPUP "Zobraziť" BEGIN - MENUITEM "tandardn", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Vedeck", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Štandardná", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Vedecká", IDM_VIEW_SCIENTIFIC, CHECKED MENUITEM "Prevody", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "estnstkov\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Desiatkov\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "Osmikov\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Dvojkov\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Šestnástková\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Desiatková\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Osmičková\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Dvojková\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Stupne\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "Radiny\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Radiány\tF3", IDM_VIEW_RAD, CHECKED MENUITEM "Grady\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM "Zoskupova slice", IDM_VIEW_GROUP, CHECKED + MENUITEM "Zoskupovať číslice", IDM_VIEW_GROUP, CHECKED END - POPUP "Pomocnk" + POPUP "Pomocník" BEGIN - MENUITEM "Tmy pomocnka", IDM_HELP_HELP + MENUITEM "Témy pomocníka", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "o je kalkulaka systmu ReactOS", IDM_HELP_ABOUT + MENUITEM "Čo je kalkulačka systému ReactOS", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "pravy" + POPUP "Úpravy" BEGIN - MENUITEM "Koprova\tCTRL-C", IDM_EDIT_COPY - MENUITEM "Prilepi\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Kopírovať\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Prilepiť\tCTRL-V", IDM_EDIT_PASTE END - POPUP "Zobrazi" + POPUP "Zobraziť" BEGIN - MENUITEM "tandardn", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Vedeck", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Štandardná", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Vedecká", IDM_VIEW_SCIENTIFIC, CHECKED MENUITEM "Prevody", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "estnstkov\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "Desiatkov\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "Osmikov\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Dvojkov\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Šestnástková\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Desiatková\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Osmičková\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Dvojková\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED MENUITEM "Bajt\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "Zoskupova slice", IDM_VIEW_GROUP, CHECKED + MENUITEM "Zoskupovať číslice", IDM_VIEW_GROUP, CHECKED END - POPUP "Pomocnk" + POPUP "Pomocník" BEGIN - MENUITEM "Tmy pomocnka", IDM_HELP_HELP + MENUITEM "Témy pomocníka", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "o je kalkulaka systmu ReactOS", IDM_HELP_ABOUT + MENUITEM "Čo je kalkulačka systému ReactOS", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "pravy" + POPUP "Úpravy" BEGIN - MENUITEM "Koprova\tCTRL-C", IDM_EDIT_COPY - MENUITEM "Prilepi\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Kopírovať\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Prilepiť\tCTRL-V", IDM_EDIT_PASTE END - POPUP "Zobrazi" + POPUP "Zobraziť" BEGIN - MENUITEM "tandardn", IDM_VIEW_STANDARD, CHECKED - MENUITEM "Vedeck", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Štandardná", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Vedecká", IDM_VIEW_SCIENTIFIC, CHECKED MENUITEM "Prevody", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "Zoskupova slice", IDM_VIEW_GROUP, CHECKED + MENUITEM "Zoskupovať číslice", IDM_VIEW_GROUP, CHECKED END - POPUP "Pomocnk" + POPUP "Pomocník" BEGIN - MENUITEM "Tmy pomocnka", IDM_HELP_HELP + MENUITEM "Témy pomocníka", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "o je kalkulaka systmu ReactOS", IDM_HELP_ABOUT + MENUITEM "Čo je kalkulačka systému ReactOS", IDM_HELP_ABOUT END END @@ -439,9 +440,9 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "Kalkulaka systmu ReactOS je von softvr vydan pod licenciou GNU GPL.\r\n\r\nKpiu licencie GNU GPL mete zska tu:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nRovnako mete zska preklad licencie GNU GPL tu:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "Kalkulačka systému ReactOS je voľný softvér vydaný pod licenciou GNU GPL.\r\n\r\nKópiu licencie GNU GPL môžete získať tu:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nRovnako môžete získať preklad licencie GNU GPL tu:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Chyba" - IDS_QUICKHELP "Rchla pomoc" + IDS_QUICKHELP "Rýchla pomoc" END // Types of conversion @@ -452,14 +453,14 @@ BEGIN IDS_CONV_CONSUMPTION "Spotreba motorov" //Spotreba (motory) IDS_CONV_CURRENCY "Mena" IDS_CONV_ENERGY "Energia" - IDS_CONV_LENGTH "Dka" - IDS_CONV_POWER "Vkon" + IDS_CONV_LENGTH "Dĺžka" + IDS_CONV_POWER "Výkon" IDS_CONV_PRESSURE "Tlak" IDS_CONV_TEMPERATURE "Teplota" - IDS_CONV_TIME "as" - IDS_CONV_VELOCITY "Rchlos" + IDS_CONV_TIME "Čas" + IDS_CONV_VELOCITY "Rýchlosť" IDS_CONV_VOLUME "Objem" - IDS_CONV_WEIGHT "Hmotnos" + IDS_CONV_WEIGHT "Hmotnosť" END // TYPES OF ANGLES @@ -467,44 +468,44 @@ STRINGTABLE DISCARDABLE BEGIN IDS_ANGLE_DEGREES "Stupne" IDS_ANGLE_GRADIANS "Grady" - IDS_ANGLE_RADIANS "Radiny" + IDS_ANGLE_RADIANS "Radiány" END // TYPES OF AREAS STRINGTABLE DISCARDABLE BEGIN IDS_AREA_ACRES "Akre" - IDS_AREA_ACRES_BRAZIL "Akre (Brazlia)" - IDS_AREA_ACRES_FRANCE "Akre (Franczsko)" - IDS_AREA_ACRES_SCOTS "Akre (ktsko)" + IDS_AREA_ACRES_BRAZIL "Akre (Brazília)" + IDS_AREA_ACRES_FRANCE "Akre (Francúzsko)" + IDS_AREA_ACRES_SCOTS "Akre (Škótsko)" IDS_AREA_ACRES_US "Akre (USA)" - IDS_AREA_ARES "re" + IDS_AREA_ARES "Áre" IDS_AREA_CHOU "Chou" IDS_AREA_DANBO "Danbo" - IDS_AREA_HECTARES "Hektre" + IDS_AREA_HECTARES "Hektáre" IDS_AREA_JEONGBO "Jeongbo" - IDS_AREA_MORGEN_HUNGARY "Morgen (Maarsko)" + IDS_AREA_MORGEN_HUNGARY "Morgen (Maďarsko)" IDS_AREA_MU "Mu" IDS_AREA_PING "Ping" IDS_AREA_PYEONG "Pyeong" IDS_AREA_PYEONGBANGJA "Pyeongbangja" IDS_AREA_RAI "Rai" IDS_AREA_SE "Se" - IDS_AREA_SQUARE_CENTIMETERS "tvorcov centimetre" - IDS_AREA_SQUARE_CHR "tvorcov chr" - IDS_AREA_SQUARE_FATHOMS "tvorcov siahy" - IDS_AREA_SQUARE_FATHOMS_HUNGARY "tvorcov siahy (Maarsko)" - IDS_AREA_SQUARE_FEET "tvorcov stopy" - IDS_AREA_SQUARE_INCHES "tvorcov palce" - IDS_AREA_SQUARE_KILOMETERS "tvorcov kilometre" - IDS_AREA_SQUARE_LAR "tvorcov lar" - IDS_AREA_SQUARE_METER "tvorcov meter" - IDS_AREA_SQUARE_MILES "tvorcov mle" - IDS_AREA_SQUARE_MILLIMETERS "tvorcov milimetre" - IDS_AREA_SQUARE_SHAKU "tvorcov shaku" - IDS_AREA_SQUARE_TSUEN "tvorcov tsuen" - IDS_AREA_SQUARE_VA "tvorcov va" - IDS_AREA_SQUARE_YARD "tvorcov yard" + IDS_AREA_SQUARE_CENTIMETERS "Štvorcové centimetre" + IDS_AREA_SQUARE_CHR "Štvorcový chr" + IDS_AREA_SQUARE_FATHOMS "Štvorcové siahy" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Štvorcové siahy (Maďarsko)" + IDS_AREA_SQUARE_FEET "Štvorcové stopy" + IDS_AREA_SQUARE_INCHES "Štvorcové palce" + IDS_AREA_SQUARE_KILOMETERS "Štvorcové kilometre" + IDS_AREA_SQUARE_LAR "Štvorcový lar" + IDS_AREA_SQUARE_METER "Štvorcové meter" + IDS_AREA_SQUARE_MILES "Štvorcové míle" + IDS_AREA_SQUARE_MILLIMETERS "Štvorcové milimetre" + IDS_AREA_SQUARE_SHAKU "Štvorcový shaku" + IDS_AREA_SQUARE_TSUEN "Štvorcový tsuen" + IDS_AREA_SQUARE_VA "Štvorcový va" + IDS_AREA_SQUARE_YARD "Štvorcový yard" IDS_AREA_TAN "Tan" IDS_AREA_TSUBO "Tsubo" END @@ -514,38 +515,38 @@ STRINGTABLE DISCARDABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Litre/100 kilometerov" - IDS_CONSUMPTION_MILES_GALLON_UK "Mle/galn (UK)" - IDS_CONSUMPTION_MILES_GALLON_US "Mle/galn (USA)" + IDS_CONSUMPTION_MILES_GALLON_UK "Míle/galón (UK)" + IDS_CONSUMPTION_MILES_GALLON_US "Míle/galón (USA)" END // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN - IDS_CURRENCY_AUSTRIAN_SCHILLING "Raksky iling" - IDS_CURRENCY_BELGIAN_FRANC "Belgick frank" - IDS_CURRENCY_CYPRIOT_POUND "Cypersk libra" - IDS_CURRENCY_CZECH_KORUNA "esk koruna" - IDS_CURRENCY_DEUTSCHE_MARK "Nemeck marka" - IDS_CURRENCY_DUTCH_GUILDER "Holandsk gulden" + IDS_CURRENCY_AUSTRIAN_SCHILLING "Rakúsky šiling" + IDS_CURRENCY_BELGIAN_FRANC "Belgický frank" + IDS_CURRENCY_CYPRIOT_POUND "Cyperská libra" + IDS_CURRENCY_CZECH_KORUNA "Česká koruna" + IDS_CURRENCY_DEUTSCHE_MARK "Nemecká marka" + IDS_CURRENCY_DUTCH_GUILDER "Holandský gulden" IDS_CURRENCY_EURO "Euro" - IDS_CURRENCY_FINNISH_MARKKA "Fnska marka" - IDS_CURRENCY_FRENCH_FRANC "Franczsky frank" - IDS_CURRENCY_GREEK_DRACHMA "Grcka drachma" - IDS_CURRENCY_IRISH_POUND "rska libra" - IDS_CURRENCY_ITALIAN_LIRA "Taliansk lra" - IDS_CURRENCY_LUXEMBOURG_FRANC "Luxembursk frank" - IDS_CURRENCY_MALTESE_LIRA "Maltsk lra" - IDS_CURRENCY_PORTOGUESE_ESCUDO "Portugalsk escudo" - IDS_CURRENCY_SLOVAK_KORUNA "Slovensk koruna" - IDS_CURRENCY_SLOVENIAN_TOLAR "Slovinsk toliar" - IDS_CURRENCY_SPANISH_PESETA "panielska peseta" + IDS_CURRENCY_FINNISH_MARKKA "Fínska marka" + IDS_CURRENCY_FRENCH_FRANC "Francúzsky frank" + IDS_CURRENCY_GREEK_DRACHMA "Grécka drachma" + IDS_CURRENCY_IRISH_POUND "Írska libra" + IDS_CURRENCY_ITALIAN_LIRA "Talianská líra" + IDS_CURRENCY_LUXEMBOURG_FRANC "Luxemburský frank" + IDS_CURRENCY_MALTESE_LIRA "Maltská líra" + IDS_CURRENCY_PORTOGUESE_ESCUDO "Portugalské escudo" + IDS_CURRENCY_SLOVAK_KORUNA "Slovenská koruna" + IDS_CURRENCY_SLOVENIAN_TOLAR "Slovinský toliar" + IDS_CURRENCY_SPANISH_PESETA "Španielska peseta" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C calories" - IDS_ENERGY_BTUS "Britsk termlne jednotky" + IDS_ENERGY_15_C_CALORIES "15 °C calories" + IDS_ENERGY_BTUS "Britské termálne jednotky" IDS_ENERGY_ERGS "Ergs" IDS_ENERGY_EVS "Elektron-Volty" IDS_ENERGY_FOOT_POUNDS "Foot-Pounds" @@ -571,7 +572,7 @@ BEGIN IDS_LENGTH_CHR "Chr" IDS_LENGTH_CUN "Cun" IDS_LENGTH_FATHOMS "Siahy" - IDS_LENGTH_FATHOMS_HUNGARY "Siahy (Maarsko)" + IDS_LENGTH_FATHOMS_HUNGARY "Siahy (Maďarsko)" IDS_LENGTH_FEET "Stopy" IDS_LENGTH_FURLONGS "Furlongs" IDS_LENGTH_GAN "Gan" @@ -585,18 +586,18 @@ BEGIN IDS_LENGTH_KEUB "Keub" IDS_LENGTH_KILOMETERS "Kilometre" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "Sveteln roky" + IDS_LENGTH_LIGHT_YEARS "Svetelné roky" IDS_LENGTH_LINKS_UK "Links (UK)" IDS_LENGTH_METERS "Metre" - IDS_LENGTH_MICRONS "Mikrny" - IDS_LENGTH_MILES "Mle" + IDS_LENGTH_MICRONS "Mikróny" + IDS_LENGTH_MILES "Míle" IDS_LENGTH_MILLIMETERS "Milimetre" - IDS_LENGTH_NAUTICAL_MILES "Nmorn mle" + IDS_LENGTH_NAUTICAL_MILES "Námorné míle" IDS_LENGTH_NIEU "Nieu" IDS_LENGTH_PARSECS "Parseky" IDS_LENGTH_PICAS "Picas" IDS_LENGTH_RI_JAPAN "Ri (Japonsko)" - IDS_LENGTH_RI_KOREA "Ri (Krea)" + IDS_LENGTH_RI_KOREA "Ri (Kórea)" IDS_LENGTH_RODS "Rods" IDS_LENGTH_SAWK "Sawk" IDS_LENGTH_SEN "Sen" @@ -613,9 +614,9 @@ END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_BTUS_PER_MINUTE "Britsk termlne jednotky za mintu" - IDS_POWER_FPS_PER_MINUTE "Foot-Pounds za mintu" - IDS_POWER_HORSEPOWER "Kosk sily" + IDS_POWER_BTUS_PER_MINUTE "Britské termálne jednotky za minútu" + IDS_POWER_FPS_PER_MINUTE "Foot-Pounds za minútu" + IDS_POWER_HORSEPOWER "Koňské sily" IDS_POWER_KILOWATTS "Kilowatty" IDS_POWER_MEGAWATTS "Megawatty" IDS_POWER_WATTS "Watty" @@ -624,13 +625,13 @@ END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmosfry" + IDS_PRESSURE_ATMOSPHERES "Atmosféry" IDS_PRESSURE_BARS "Bary" IDS_PRESSURE_HECTOPASCALS "Hektopascaly" IDS_PRESSURE_KILOPASCALS "Kilopascaly" IDS_PRESSURE_MM_OF_MERCURY "Milimetre ortuti" IDS_PRESSURE_PASCALS "Pascaly" - IDS_PRESSURE_PSI "Libry na tvorcov palec" + IDS_PRESSURE_PSI "Libry na štvorcový palec" END // TYPES OF TEMPERATURES @@ -650,9 +651,9 @@ BEGIN IDS_TIME_NANOSECONDS "Nanosekundy" IDS_TIME_MICROSECONDS "Mikrosekundy" IDS_TIME_MILLISECONDS "Milisekundy" - IDS_TIME_MINUTES "Minty" + IDS_TIME_MINUTES "Minúty" IDS_TIME_SECONDS "Sekundy" - IDS_TIME_WEEKS "Tdne" + IDS_TIME_WEEKS "Týždne" IDS_TIME_YEARS "Roky" END @@ -666,7 +667,7 @@ BEGIN IDS_VELOCITY_KNOTS "Knots" IDS_VELOCITY_MACH "Mach" IDS_VELOCITY_METERS_SECOND "Metre/sekundu" - IDS_VELOCITY_MILES_HOUR "Mle/hodinu" + IDS_VELOCITY_MILES_HOUR "Míle/hodinu" END // TYPES OF VOLUMES @@ -675,19 +676,19 @@ BEGIN IDS_VOLUME_BARRELS_UK "Barely (UK)" IDS_VOLUME_BARRELS_OIL "Barely ropy" //oleja? IDS_VOLUME_BUN "Bun" - IDS_VOLUME_BUSHELS_UK "Buely (UK)" //Buel, Bule? Buly? - IDS_VOLUME_BUSHELS_US "Buely (USA)" - IDS_VOLUME_CUBIC_CENTIMETERS "Kubick centimetre" - IDS_VOLUME_CUBIC_FEET "Kubick stopy" - IDS_VOLUME_CUBIC_INCHES "Kubick palce" - IDS_VOLUME_CUBIC_METERS "Kubick metre" - IDS_VOLUME_CUBIC_YARDS "Kubick yardy" + IDS_VOLUME_BUSHELS_UK "Bušely (UK)" //Bušel, Bušle? Bušly? + IDS_VOLUME_BUSHELS_US "Bušely (USA)" + IDS_VOLUME_CUBIC_CENTIMETERS "Kubické centimetre" + IDS_VOLUME_CUBIC_FEET "Kubické stopy" + IDS_VOLUME_CUBIC_INCHES "Kubické palce" + IDS_VOLUME_CUBIC_METERS "Kubické metre" + IDS_VOLUME_CUBIC_YARDS "Kubické yardy" IDS_VOLUME_DOE "Doe" IDS_VOLUME_FLUID_OUNCES_UK "Fluid ounces (UK)" IDS_VOLUME_FLUID_OUNCES_US "Fluid ounces (USA)" - IDS_VOLUME_GALLONS_UK "Galny (UK)" - IDS_VOLUME_GALLONS_DRY_US "Galny, such (USA)" - IDS_VOLUME_GALLONS_LIQUID_US "Galny, tekut (USA)" + IDS_VOLUME_GALLONS_UK "Galóny (UK)" + IDS_VOLUME_GALLONS_DRY_US "Galóny, suché (USA)" + IDS_VOLUME_GALLONS_LIQUID_US "Galóny, tekuté (USA)" IDS_VOLUME_GOU "Gou" IDS_VOLUME_HOP "Hop" IDS_VOLUME_ICCE "Icce" @@ -696,11 +697,11 @@ BEGIN IDS_VOLUME_MAL "Mal" IDS_VOLUME_MILLILITERS "Mililitre" IDS_VOLUME_PINTS_UK "Pinty (UK)" //pinta alebo polliter - IDS_VOLUME_PINTS_DRY_US "Pinty, such (USA)" - IDS_VOLUME_PINTS_LIQUID_US "Pinty, tekut (USA)" - IDS_VOLUME_QUARTS_UK "Quarts (UK)" //tvrgalny, tvrtiny, tvrky - IDS_VOLUME_QUARTS_DRY_US "Quarts, such (USA)" - IDS_VOLUME_QUARTS_LIQUID_US "Quarts, tekut (USA)" + IDS_VOLUME_PINTS_DRY_US "Pinty, suché (USA)" + IDS_VOLUME_PINTS_LIQUID_US "Pinty, tekuté (USA)" + IDS_VOLUME_QUARTS_UK "Quarts (UK)" //štvrťgalóny, štvrtiny, štvrťky + IDS_VOLUME_QUARTS_DRY_US "Quarts, suché (USA)" + IDS_VOLUME_QUARTS_LIQUID_US "Quarts, tekuté (USA)" IDS_VOLUME_SEKI "Seki" IDS_VOLUME_SYOU "Syou" IDS_VOLUME_TANANLOUNG "Tananloung" @@ -712,25 +713,25 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_WEIGHT_BAHT "Baht" - IDS_WEIGHT_CARATS "Karty" + IDS_WEIGHT_CARATS "Karáty" IDS_WEIGHT_CHUNG "Chung" IDS_WEIGHT_DON "Don" IDS_WEIGHT_GEUN "Geun" IDS_WEIGHT_GRAMS "Gramy" IDS_WEIGHT_GWAN "Gwan" IDS_WEIGHT_HARB "Harb" - IDS_WEIGHT_JIN_CHINA "Jin (na)" + IDS_WEIGHT_JIN_CHINA "Jin (Čína)" IDS_WEIGHT_JIN_TAIWAN "Jin (Tchajvan)" IDS_WEIGHT_KAN "Kan" IDS_WEIGHT_KILOGRAMS "Kilogramy" IDS_WEIGHT_KIN "Kin" - IDS_WEIGHT_LIANG_CHINA "Liang (na)" + IDS_WEIGHT_LIANG_CHINA "Liang (Čína)" IDS_WEIGHT_LIANG_TAIWAN "Liang (Tchajvan)" IDS_WEIGHT_MONME "Monme" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Unce, anglosask" - IDS_WEIGHT_OUNCES_TROY "Unce, trjska" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Unce, anglosaská" + IDS_WEIGHT_OUNCES_TROY "Unce, trójska" IDS_WEIGHT_POUNDS "Libry" - IDS_WEIGHT_QUINTAL_METRIC "Cent (metrick)" + IDS_WEIGHT_QUINTAL_METRIC "Cent (metrický)" IDS_WEIGHT_SALOUNG "Saloung" IDS_WEIGHT_STONES "Stones" IDS_WEIGHT_TAMLUNG "Tamlung" diff --git a/base/applications/calc/lang/sv-SE.rc b/base/applications/calc/lang/sv-SE.rc index 2072e9cf64d..fbf1ab2a212 100644 --- a/base/applications/calc/lang/sv-SE.rc +++ b/base/applications/calc/lang/sv-SE.rc @@ -1,9 +1,11 @@ /* - * PROJECT: ReactOS RAPPS - * FILE: \base\applications\calc\lang\sv-SE.rc + * PROJECT: ReactOS CALC + * FILE: base\applications\calc\lang\sv-SE.rc * PURPOSE: Swedish resource file * Translation: Jaix Bly + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL // Dialog @@ -243,7 +245,7 @@ BEGIN LTEXT "Kategori:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Konvertera frn:",IDC_STATIC,4,49,56,8 + LTEXT "Konvertera från:",IDC_STATIC,4,49,56,8 COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT LTEXT "Konvertera till:",IDC_STATIC,4,76,56,8 @@ -320,7 +322,7 @@ BEGIN LTEXT "ReactOS Kalkylator",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE LTEXT "Version ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE - LTEXT "Skriven av Carlo Bramini, vers.: Jaix Bly",IDC_STATIC,120,32,132,8, + LTEXT "Skriven av Carlo Bramini, Övers.: Jaix Bly",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 GROUPBOX "",IDC_STATIC,4,56,256,88 @@ -361,7 +363,7 @@ BEGIN MENUITEM "Hexadecimal\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Oktal\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binr\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Binär\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Grader\tF2", IDM_VIEW_DEG, CHECKED MENUITEM "Radianer\tF3", IDM_VIEW_RAD, CHECKED @@ -369,9 +371,9 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Siffergruppering", IDM_VIEW_GROUP, CHECKED END - POPUP "Hjlp" + POPUP "Hjälp" BEGIN - MENUITEM "Visa hjlp", IDM_HELP_HELP + MENUITEM "Visa hjälp", IDM_HELP_HELP MENUITEM SEPARATOR MENUITEM "Om ReactOS Kalkylator", IDM_HELP_ABOUT END @@ -393,7 +395,7 @@ BEGIN MENUITEM "Hexadecimal\tF5", IDM_VIEW_HEX, CHECKED MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED MENUITEM "Oktal\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "Binr\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Binär\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED @@ -402,9 +404,9 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Siffergruppering", IDM_VIEW_GROUP, CHECKED END - POPUP "Hjlp" + POPUP "Hjälp" BEGIN - MENUITEM "Visa hjlp", IDM_HELP_HELP + MENUITEM "Visa hjälp", IDM_HELP_HELP MENUITEM SEPARATOR MENUITEM "Om ReactOS Kalkylator", IDM_HELP_ABOUT END @@ -425,9 +427,9 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Siffergruppering", IDM_VIEW_GROUP, CHECKED END - POPUP "Hjlp" + POPUP "Hjälp" BEGIN - MENUITEM "Visa hjlp", IDM_HELP_HELP + MENUITEM "Visa hjälp", IDM_HELP_HELP MENUITEM SEPARATOR MENUITEM "Om Reactos Kalkylator", IDM_HELP_ABOUT END @@ -437,21 +439,21 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE "ReactOS Kalkylator r gratis programvara utgivet under GNU GPL licensen.\r\n\r\nDu kan f en kopia av GNU GPL licensen hr:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDu kan ocks f en versttning av GNU GPL lisensen hr:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_STRING_LICENSE "ReactOS Kalkylator är gratis programvara utgivet under GNU GPL licensen.\r\n\r\nDu kan få en kopia av GNU GPL licensen här:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDu kan också få en översättning av GNU GPL lisensen här:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Fel" - IDS_QUICKHELP "Snabb hjlp" + IDS_QUICKHELP "Snabb hjälp" END // Types of conversion STRINGTABLE DISCARDABLE BEGIN IDS_CONV_ANGLE "Vinkel" - IDS_CONV_AREA "Omrde" - IDS_CONV_CONSUMPTION "Frbrukning (motor)" + IDS_CONV_AREA "Område" + IDS_CONV_CONSUMPTION "Förbrukning (motor)" IDS_CONV_CURRENCY "Valuta" IDS_CONV_ENERGY "Energi" - IDS_CONV_LENGTH "Lngd" - IDS_CONV_POWER "Strm" + IDS_CONV_LENGTH "Längd" + IDS_CONV_POWER "Ström" IDS_CONV_PRESSURE "Tryck" IDS_CONV_TEMPERATURE "Temperatur" IDS_CONV_TIME "Tid" @@ -519,12 +521,12 @@ END // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN - IDS_CURRENCY_AUSTRIAN_SCHILLING "sterriksk schilling" + IDS_CURRENCY_AUSTRIAN_SCHILLING "Österriksk schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgisk franc" IDS_CURRENCY_CYPRIOT_POUND "Cypriotisk pound" IDS_CURRENCY_CZECH_KORUNA "Tjeckisk koruna" IDS_CURRENCY_DEUTSCHE_MARK "Tysk Mark" - IDS_CURRENCY_DUTCH_GUILDER "Nederlnsk guilder" + IDS_CURRENCY_DUTCH_GUILDER "Nederlänsk guilder" IDS_CURRENCY_EURO "Euro" IDS_CURRENCY_FINNISH_MARKKA "Finisk mark" IDS_CURRENCY_FRENCH_FRANC "Fransk franc" @@ -542,8 +544,8 @@ END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 C calories" - IDS_ENERGY_BTUS "Britisk vrme-enhet" + IDS_ENERGY_15_C_CALORIES "15 °C calories" + IDS_ENERGY_BTUS "Britisk värme-enhet" IDS_ENERGY_ERGS "Ergs" IDS_ENERGY_EVS "Electron-Volt" IDS_ENERGY_FOOT_POUNDS "Fot-Pound" @@ -552,14 +554,14 @@ BEGIN IDS_ENERGY_JOULES "Joule" IDS_ENERGY_KILOJOULES "Kilojoule" IDS_ENERGY_KILOWATT_HOURS "Kilowattimmar" - IDS_ENERGY_NUTRITION_CALORIES "Nringskalorier" + IDS_ENERGY_NUTRITION_CALORIES "Näringskalorier" IDS_ENERGY_TH_CALORIES "Termokemiska kalorier" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "ngstrm" + IDS_LENGTH_ANGSTROMS "Ångström" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" IDS_LENGTH_BARLEYCORNS "Barleycorns" IDS_LENGTH_CENTIMETERS "Centimeter" @@ -583,7 +585,7 @@ BEGIN IDS_LENGTH_KEUB "Keub" IDS_LENGTH_KILOMETERS "Kilometer" IDS_LENGTH_LAR "Lar" - IDS_LENGTH_LIGHT_YEARS "Ljus r" + IDS_LENGTH_LIGHT_YEARS "Ljus år" IDS_LENGTH_LINKS_UK "Linker (UK)" IDS_LENGTH_METERS "Meter" IDS_LENGTH_MICRONS "Micron" @@ -611,9 +613,9 @@ END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_BTUS_PER_MINUTE "Britisk vrme-enhet per minut" + IDS_POWER_BTUS_PER_MINUTE "Britisk värme-enhet per minut" IDS_POWER_FPS_PER_MINUTE "Fot-pund per minut" - IDS_POWER_HORSEPOWER "Hstekrafter" + IDS_POWER_HORSEPOWER "Hästekrafter" IDS_POWER_KILOWATTS "Kilowatt" IDS_POWER_MEGAWATTS "Megawatt" IDS_POWER_WATTS "Watt" @@ -622,7 +624,7 @@ END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES "Atmosfr" + IDS_PRESSURE_ATMOSPHERES "Atmosfär" IDS_PRESSURE_BARS "Bar" IDS_PRESSURE_HECTOPASCALS "Hectopascal" IDS_PRESSURE_KILOPASCALS "Kilopascal" diff --git a/base/applications/calc/lang/th-TH.rc b/base/applications/calc/lang/th-TH.rc index ade4a12b17e..61c3768db5b 100644 --- a/base/applications/calc/lang/th-TH.rc +++ b/base/applications/calc/lang/th-TH.rc @@ -1,6 +1,7 @@ /* * ReactOS Calc (Thai resource file) * Last modified: 2009-02-02 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_THAI, SUBLANG_DEFAULT @@ -9,15 +10,15 @@ LANGUAGE LANG_THAI, SUBLANG_DEFAULT IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ͧԴŢ ReactOS" +CAPTION "เครื่องคิดเลข ReactOS" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN GROUPBOX "",IDC_STATIC,4,16,132,21 - CONTROL "Ժˡ",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 - CONTROL "Ժ",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 - CONTROL "Ỵ",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 - CONTROL "ͧ",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 + CONTROL "สิบหก",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 + CONTROL "สิบ",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 + CONTROL "แปด",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 + CONTROL "สอง",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 GROUPBOX "",IDC_STATIC,4,36,76,21 CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,44,26,10 @@ -138,25 +139,25 @@ BEGIN PUSHBUTTON "F",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP GROUPBOX "",IDC_STATIC,140,16,172,21 - CONTROL "",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | + CONTROL "สี่เวิร์ด",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,148,24,37,10 - CONTROL "ͧ",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | + CONTROL "สองเวิร์ด",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,188,24,37,10 - CONTROL "",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "เวิร์ด",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,232,24,33,10 - CONTROL "亵",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "ไบต์",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,272,24,30,10 - CONTROL "ͧ",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + CONTROL "องศา",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "¹",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "เรเดียน",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 - CONTROL "¹",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + CONTROL "เกรเดียน",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "໫",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + PUSHBUTTON "แบ็กสเปซ",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -165,7 +166,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ʶҹҾ" +CAPTION "สถานภาพทั่วไป" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -173,7 +174,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "໫",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + PUSHBUTTON "แบ็กสเปซ",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -209,7 +210,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "+",IDC_BUTTON_ADD,118,105,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "ҡ",IDC_BUTTON_SQRT,144,48,24,17,BS_CENTER | + PUSHBUTTON "ราก",IDC_BUTTON_SQRT,144,48,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "%",IDC_BUTTON_PERCENT,144,67,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -232,7 +233,7 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ͧԴŢ ReactOS" +CAPTION "เครื่องคิดเลข ReactOS" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN @@ -250,7 +251,7 @@ BEGIN BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,232,24,40,17 - CONTROL "໫",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | + CONTROL "แบ็กสเปซ",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,24, 40,17 RTEXT "",IDC_TEXT_OUTPUT,4,4,312,12,SS_CENTERIMAGE, @@ -287,7 +288,7 @@ BEGIN BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,86,24,17 CONTROL "+",IDC_BUTTON_ADD,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,105,24,17 - CONTROL "ҡ",IDC_BUTTON_SQRT,"Button",BS_OWNERDRAW | BS_CENTER | + CONTROL "ราก",IDC_BUTTON_SQRT,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,48,24,17 CONTROL "%",IDC_BUTTON_PERCENT,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,67,24,17 @@ -310,15 +311,15 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ǡѺ ReactOS Calc" +CAPTION "เกี่ยวกับ ReactOS Calc" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "ŧ",IDOK,105,148,52,16 + DEFPUSHBUTTON "ตกลง",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT "ͧԴŢ ReactOS",IDC_STATIC,120,12,132,8, + LTEXT "เครื่องคิดเลข ReactOS",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE - LTEXT " ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "รุ่น ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE LTEXT "Written by Carlo Bramini",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 @@ -329,7 +330,7 @@ END IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ͧʶҹ" +CAPTION "กล่องสถานะ" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | @@ -346,89 +347,89 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "แ&ก้ไข" BEGIN - MENUITEM "Ѵ͡\tCTRL-C", IDM_EDIT_COPY - MENUITEM "ҧ\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "คัดลอก\tCTRL-C", IDM_EDIT_COPY + MENUITEM "วาง\tCTRL-V", IDM_EDIT_PASTE END - POPUP "&ͧ" + POPUP "&มุมมอง" BEGIN - MENUITEM "Ẻҵðҹ", IDM_VIEW_STANDARD, CHECKED - MENUITEM "ẺԷʵ", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "¹ŧ", IDM_VIEW_CONVERSION + MENUITEM "แบบมาตรฐาน", IDM_VIEW_STANDARD, CHECKED + MENUITEM "แบบวิทยาศาสตร์", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "ความเปลี่ยนแปลง", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "ҹԺˡ\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "ҹԺ\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "ҹỴ\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "ҹͧ\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "ฐานสิบหก\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "ฐานสิบ\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "ฐานแปด\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "ฐานสอง\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "ͧ\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "¹\tF3", IDM_VIEW_RAD, CHECKED - MENUITEM "¹\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM "องศา\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "เรเดียน\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "เกรเดียน\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM "ʴѡŢ", IDM_VIEW_GROUP, CHECKED + MENUITEM "แสดงหลักตัวเลข", IDM_VIEW_GROUP, CHECKED END - POPUP "&" + POPUP "&ช่วยเหลือ" BEGIN - MENUITEM "Ū", IDM_HELP_HELP + MENUITEM "ข้อมูลช่วยเหลือ", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ǡѺ ReactOS Calc", IDM_HELP_ABOUT + MENUITEM "เกี่ยวกับ ReactOS Calc", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "แ&ก้ไข" BEGIN - MENUITEM "Ѵ͡\tCTRL-C", IDM_EDIT_COPY - MENUITEM "ҧ\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "คัดลอก\tCTRL-C", IDM_EDIT_COPY + MENUITEM "วาง\tCTRL-V", IDM_EDIT_PASTE END - POPUP "&ͧ" + POPUP "&มุมมอง" BEGIN - MENUITEM "Ẻҵðҹ", IDM_VIEW_STANDARD, CHECKED - MENUITEM "ẺԷʵ", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "¹ŧ", IDM_VIEW_CONVERSION + MENUITEM "แบบมาตรฐาน", IDM_VIEW_STANDARD, CHECKED + MENUITEM "แบบวิทยาศาสตร์", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "ความเปลี่ยนแปลง", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "ҹԺˡ\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "ҹԺ\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "ҹỴ\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "ҹͧ\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "ฐานสิบหก\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "ฐานสิบ\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "ฐานแปด\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "ฐานสอง\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "ͷ\tF12", IDM_VIEW_QWORD, CHECKED - MENUITEM "Ѻ\tF2", IDM_VIEW_DWORD, CHECKED - MENUITEM "\tF3", IDM_VIEW_WORD, CHECKED - MENUITEM "亵\tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM "ควอทเวิร์ด\tF12", IDM_VIEW_QWORD, CHECKED + MENUITEM "ดับเบิลเวิร์ด\tF2", IDM_VIEW_DWORD, CHECKED + MENUITEM "เวิร์ด\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "ไบต์\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "ʴѡŢ", IDM_VIEW_GROUP, CHECKED + MENUITEM "แสดงหลักตัวเลข", IDM_VIEW_GROUP, CHECKED END - POPUP "&" + POPUP "&ช่วยเหลือ" BEGIN - MENUITEM "Ū", IDM_HELP_HELP + MENUITEM "ข้อมูลช่วยเหลือ", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ǡѺ ReactOS Calc", IDM_HELP_ABOUT + MENUITEM "เกี่ยวกับ ReactOS Calc", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "แ&ก้ไข" BEGIN - MENUITEM "Ѵ͡\tCTRL-C", IDM_EDIT_COPY - MENUITEM "ҧ\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "คัดลอก\tCTRL-C", IDM_EDIT_COPY + MENUITEM "วาง\tCTRL-V", IDM_EDIT_PASTE END - POPUP "&ͧ" + POPUP "&มุมมอง" BEGIN - MENUITEM "Ẻҵðҹ", IDM_VIEW_STANDARD, CHECKED - MENUITEM "ẺԷʵ", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "¹ŧ", IDM_VIEW_CONVERSION + MENUITEM "แบบมาตรฐาน", IDM_VIEW_STANDARD, CHECKED + MENUITEM "แบบวิทยาศาสตร์", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "ความเปลี่ยนแปลง", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "ʴѡŢ", IDM_VIEW_GROUP, CHECKED + MENUITEM "แสดงหลักตัวเลข", IDM_VIEW_GROUP, CHECKED END - POPUP "&" + POPUP "&ช่วยเหลือ" BEGIN - MENUITEM "Ū", IDM_HELP_HELP + MENUITEM "ข้อมูลช่วยเหลือ", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "ǡѺ ReactOS Calc", IDM_HELP_ABOUT + MENUITEM "เกี่ยวกับ ReactOS Calc", IDM_HELP_ABOUT END END @@ -437,15 +438,15 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "ԴҴ" - IDS_QUICKHELP "觹 ?" + IDS_MATH_ERROR "ผิดพลาด" + IDS_QUICKHELP "สิ่งนี้คืออะไร ?" END // types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "" - IDS_CONV_AREA "鹷" + IDS_CONV_ANGLE "มุม" + IDS_CONV_AREA "พื้นที่" IDS_CONV_CONSUMPTION "Consumption (engines)" IDS_CONV_CURRENCY "Currencies" IDS_CONV_ENERGY "Energy" @@ -453,7 +454,7 @@ BEGIN IDS_CONV_POWER "Power" IDS_CONV_PRESSURE "Pressure" IDS_CONV_TEMPERATURE "Temperature" - IDS_CONV_TIME "" + IDS_CONV_TIME "เวลา" IDS_CONV_VELOCITY "Velocity" IDS_CONV_VOLUME "Volume" IDS_CONV_WEIGHT "Weights" @@ -462,9 +463,9 @@ END // TYPES OF ANGLES STRINGTABLE DISCARDABLE BEGIN - IDS_ANGLE_DEGREES "ͧ" - IDS_ANGLE_GRADIANS "¹" - IDS_ANGLE_RADIANS "¹" + IDS_ANGLE_DEGREES "องศา" + IDS_ANGLE_GRADIANS "เกรเดียน" + IDS_ANGLE_RADIANS "เรเดียน" END // TYPES OF AREAS @@ -524,7 +525,7 @@ BEGIN IDS_CURRENCY_CZECH_KORUNA "Czech koruna" IDS_CURRENCY_DEUTSCHE_MARK "Deutsche Mark" IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder" - IDS_CURRENCY_EURO "" + IDS_CURRENCY_EURO "ยูโร" IDS_CURRENCY_FINNISH_MARKKA "Finnish markka" IDS_CURRENCY_FRENCH_FRANC "French franc" IDS_CURRENCY_GREEK_DRACHMA "Greek Drachma" @@ -541,7 +542,7 @@ END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES "15 ^0C " + IDS_ENERGY_15_C_CALORIES "15 ^0C แคลอรี" IDS_ENERGY_BTUS "British Thermal Units" IDS_ENERGY_ERGS "Ergs" IDS_ENERGY_EVS "Electron-Volts" diff --git a/base/applications/calc/lang/uk-UA.rc b/base/applications/calc/lang/uk-UA.rc index 1a1b615aa89..359ebfe7371 100644 --- a/base/applications/calc/lang/uk-UA.rc +++ b/base/applications/calc/lang/uk-UA.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Калькулятор ReactOS" MENU IDR_MENU_SCIENTIFIC_1 FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -141,19 +141,19 @@ BEGIN PUSHBUTTON "F",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP GROUPBOX "",IDC_STATIC,140,16,172,21 - CONTROL "8 ",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | + CONTROL "8 байт",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,148,24,37,10 - CONTROL "4 ",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | + CONTROL "4 байт",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,188,24,37,10 - CONTROL "2 ",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "2 байт",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,232,24,33,10 - CONTROL "1 ",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "1 байт",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,272,24,30,10 - CONTROL "",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + CONTROL "Градуси",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, 42,10 - CONTROL "",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + CONTROL "Радіани",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, 24,42,10 - CONTROL "",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + CONTROL "Гради",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, 236,24,44,10 PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -168,7 +168,7 @@ END IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Калькулятор ReactOS" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -235,20 +235,20 @@ END IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Калькулятор ReactOS" MENU IDR_MENU_STANDARD FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "",IDC_BUTTON_CONVERT,35,105,76,17 + PUSHBUTTON "Перевести",IDC_BUTTON_CONVERT,35,105,76,17 COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT ":",IDC_STATIC,4,20,56,8 + LTEXT "Категорія:",IDC_STATIC,4,20,56,8 COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT " :",IDC_STATIC,4,49,56,8 + LTEXT "Вихідна величина:",IDC_STATIC,4,49,56,8 COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "ʳ :",IDC_STATIC,4,76,56,8 + LTEXT "Кінцева величина:",IDC_STATIC,4,76,56,8 CONTROL "C",IDC_BUTTON_CANC,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | @@ -313,16 +313,16 @@ END IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Про Калькулятор ReactOS" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,105,148,52,16 CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 - LTEXT " ReactOS",IDC_STATIC,120,12,132,8, + LTEXT "Калькулятор ReactOS",IDC_STATIC,120,12,132,8, SS_CENTERIMAGE - LTEXT " ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE - LTEXT " ",IDC_STATIC,120,32,132,8, + LTEXT "Версія ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "Написав Карло Браміні",IDC_STATIC,120,32,132,8, SS_CENTERIMAGE GROUPBOX "",IDC_STATIC,112,0,148,52 GROUPBOX "",IDC_STATIC,4,56,256,88 @@ -332,7 +332,7 @@ END IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Статистика" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | @@ -349,89 +349,89 @@ END IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Правка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Копіювати\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Вставити\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Вигляд" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Звичайний", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Науковий", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Перетворення", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "س\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "³\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Шістнадцятковий\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Десятковий\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Вісімковий\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Двійковий\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "\tF2", IDM_VIEW_DEG, CHECKED - MENUITEM "\tF3", IDM_VIEW_RAD, CHECKED - MENUITEM "\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM "Градуси\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "Радіани\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "Гради\tF4", IDM_VIEW_GRAD, CHECKED MENUITEM SEPARATOR - MENUITEM "ʳ ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Кількість цифр у групі", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Довідка" BEGIN - MENUITEM "", IDM_HELP_HELP + MENUITEM "Зміст", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ReactOS", IDM_HELP_ABOUT + MENUITEM "Про Калькулятор ReactOS", IDM_HELP_ABOUT END END IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Правка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Копіювати\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Вставити\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Вигляд" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Звичайний", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Науковий", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Перетворення", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "س\tF5", IDM_VIEW_HEX, CHECKED - MENUITEM "\tF6", IDM_VIEW_DEC, CHECKED - MENUITEM "³\tF7", IDM_VIEW_OCT, CHECKED - MENUITEM "\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM "Шістнадцятковий\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "Десятковий\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "Вісімковий\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "Двійковий\tF8", IDM_VIEW_BIN, CHECKED MENUITEM SEPARATOR - MENUITEM "8 \tF12", IDM_VIEW_QWORD, CHECKED - MENUITEM "4 \tF2", IDM_VIEW_DWORD, CHECKED - MENUITEM "2 \tF3", IDM_VIEW_WORD, CHECKED - MENUITEM "1 \tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM "8 байт\tF12", IDM_VIEW_QWORD, CHECKED + MENUITEM "4 байт\tF2", IDM_VIEW_DWORD, CHECKED + MENUITEM "2 байт\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "1 байт\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR - MENUITEM "ʳ ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Кількість цифр у групі", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Довідка" BEGIN - MENUITEM "", IDM_HELP_HELP + MENUITEM "Зміст", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ReactOS", IDM_HELP_ABOUT + MENUITEM "Про Калькулятор ReactOS", IDM_HELP_ABOUT END END IDR_MENU_STANDARD MENU DISCARDABLE BEGIN - POPUP "" + POPUP "Правка" BEGIN - MENUITEM "\tCTRL-C", IDM_EDIT_COPY - MENUITEM "\tCTRL-V", IDM_EDIT_PASTE + MENUITEM "Копіювати\tCTRL-C", IDM_EDIT_COPY + MENUITEM "Вставити\tCTRL-V", IDM_EDIT_PASTE END - POPUP "" + POPUP "Вигляд" BEGIN - MENUITEM "", IDM_VIEW_STANDARD, CHECKED - MENUITEM "", IDM_VIEW_SCIENTIFIC, CHECKED - MENUITEM "", IDM_VIEW_CONVERSION + MENUITEM "Звичайний", IDM_VIEW_STANDARD, CHECKED + MENUITEM "Науковий", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "Перетворення", IDM_VIEW_CONVERSION MENUITEM SEPARATOR - MENUITEM "ʳ ", IDM_VIEW_GROUP, CHECKED + MENUITEM "Кількість цифр у групі", IDM_VIEW_GROUP, CHECKED END - POPUP "" + POPUP "Довідка" BEGIN - MENUITEM "", IDM_HELP_HELP + MENUITEM "Зміст", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM " ReactOS", IDM_HELP_ABOUT + MENUITEM "Про Калькулятор ReactOS", IDM_HELP_ABOUT END END @@ -439,302 +439,302 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_STRING_LICENSE " ReactOS - , 糺 GNU GPL.\r\n\r\n 糿 GNU GPL :\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\n 糿 GNU GPL :\r\nhttp://www.gnu.org/licenses/translations.html" - IDS_MATH_ERROR "" - IDS_QUICKHELP " " + IDS_STRING_LICENSE "Калькулятор ReactOS - вільне програмне забезпечення, випущене за ліцензією GNU GPL.\r\n\r\nВи можете отримати копію ліцензії GNU GPL тут:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nВи можете також отримати переклад ліцензії GNU GPL тут:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_MATH_ERROR "Помилка" + IDS_QUICKHELP "Швидка довідка" END // types of conversion STRINGTABLE DISCARDABLE BEGIN - IDS_CONV_ANGLE "" - IDS_CONV_AREA "" - IDS_CONV_CONSUMPTION " ()" - IDS_CONV_CURRENCY "" - IDS_CONV_ENERGY "" - IDS_CONV_LENGTH "" - IDS_CONV_POWER "" - IDS_CONV_PRESSURE "" - IDS_CONV_TEMPERATURE "" - IDS_CONV_TIME "" - IDS_CONV_VELOCITY "" - IDS_CONV_VOLUME "'" - IDS_CONV_WEIGHT "" + IDS_CONV_ANGLE "Кут" + IDS_CONV_AREA "Площа" + IDS_CONV_CONSUMPTION "Витрата палива (двигуни)" + IDS_CONV_CURRENCY "Валюта" + IDS_CONV_ENERGY "Енергія" + IDS_CONV_LENGTH "Довжина" + IDS_CONV_POWER "Потужність" + IDS_CONV_PRESSURE "Тиск" + IDS_CONV_TEMPERATURE "Температура" + IDS_CONV_TIME "Час" + IDS_CONV_VELOCITY "Швидкість" + IDS_CONV_VOLUME "Об'єм" + IDS_CONV_WEIGHT "Вага" END // TYPES OF ANGLES STRINGTABLE DISCARDABLE BEGIN - IDS_ANGLE_DEGREES "" - IDS_ANGLE_GRADIANS "" - IDS_ANGLE_RADIANS "" + IDS_ANGLE_DEGREES "Градус" + IDS_ANGLE_GRADIANS "Град" + IDS_ANGLE_RADIANS "Радіан" END // TYPES OF AREAS STRINGTABLE DISCARDABLE BEGIN - IDS_AREA_ACRES "" - IDS_AREA_ACRES_BRAZIL " ()" - IDS_AREA_ACRES_FRANCE " ()" - IDS_AREA_ACRES_SCOTS " ()" - IDS_AREA_ACRES_US " ()" - IDS_AREA_ARES "" - IDS_AREA_CHOU "" - IDS_AREA_DANBO "" - IDS_AREA_HECTARES "" - IDS_AREA_JEONGBO "" - IDS_AREA_MORGEN_HUNGARY " ()" - IDS_AREA_MU "" - IDS_AREA_PING "ϳ" - IDS_AREA_PYEONG "" - IDS_AREA_PYEONGBANGJA "" - IDS_AREA_RAI "" + IDS_AREA_ACRES "Акр" + IDS_AREA_ACRES_BRAZIL "Акр (бразильський)" + IDS_AREA_ACRES_FRANCE "Акр (французький)" + IDS_AREA_ACRES_SCOTS "Акр (шотландський)" + IDS_AREA_ACRES_US "Акр (США)" + IDS_AREA_ARES "Ар" + IDS_AREA_CHOU "Чоу" + IDS_AREA_DANBO "Дамбо" + IDS_AREA_HECTARES "Гектар" + IDS_AREA_JEONGBO "Дженгбо" + IDS_AREA_MORGEN_HUNGARY "Морген (угорський)" + IDS_AREA_MU "Му" + IDS_AREA_PING "Пінг" + IDS_AREA_PYEONG "Пйон" + IDS_AREA_PYEONGBANGJA "Пйонбанджа" + IDS_AREA_RAI "Рай" IDS_AREA_SE "Se" - IDS_AREA_SQUARE_CENTIMETERS " " - IDS_AREA_SQUARE_CHR " " - IDS_AREA_SQUARE_FATHOMS " " - IDS_AREA_SQUARE_FATHOMS_HUNGARY " ()" - IDS_AREA_SQUARE_FEET " " - IDS_AREA_SQUARE_INCHES " " - IDS_AREA_SQUARE_KILOMETERS " " - IDS_AREA_SQUARE_LAR " " - IDS_AREA_SQUARE_METER " " - IDS_AREA_SQUARE_MILES " " - IDS_AREA_SQUARE_MILLIMETERS " " - IDS_AREA_SQUARE_SHAKU " " - IDS_AREA_SQUARE_TSUEN " " - IDS_AREA_SQUARE_VA " " - IDS_AREA_SQUARE_YARD " " - IDS_AREA_TAN "" - IDS_AREA_TSUBO "" + IDS_AREA_SQUARE_CENTIMETERS "Квадратний сантиметр" + IDS_AREA_SQUARE_CHR "Квадратний ча" + IDS_AREA_SQUARE_FATHOMS "Квадратний фатом" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "Квадратний фатом (угорський)" + IDS_AREA_SQUARE_FEET "Квадратний фут" + IDS_AREA_SQUARE_INCHES "Квадратний дюйм" + IDS_AREA_SQUARE_KILOMETERS "Квадратний кілометр" + IDS_AREA_SQUARE_LAR "Квадратний лар" + IDS_AREA_SQUARE_METER "Квадратний метр" + IDS_AREA_SQUARE_MILES "Квадратна миля" + IDS_AREA_SQUARE_MILLIMETERS "Квадратний міліметр" + IDS_AREA_SQUARE_SHAKU "Квадратний шаку" + IDS_AREA_SQUARE_TSUEN "Квадратний тсуен" + IDS_AREA_SQUARE_VA "Квадратна ва" + IDS_AREA_SQUARE_YARD "Квадратний ярд" + IDS_AREA_TAN "Тан" + IDS_AREA_TSUBO "Цубо" END // TYPES OF COMSUMPTIONS STRINGTABLE DISCARDABLE BEGIN - IDS_CONSUMPTION_KM_PER_L "ʳ/" - IDS_CONSUMPTION_L_PER_100_KM "˳/100 " - IDS_CONSUMPTION_MILES_GALLON_UK "/ ()" - IDS_CONSUMPTION_MILES_GALLON_US "/ ()" + IDS_CONSUMPTION_KM_PER_L "Кілометр/літр" + IDS_CONSUMPTION_L_PER_100_KM "Літрів/100 кілометрів" + IDS_CONSUMPTION_MILES_GALLON_UK "Миль/галонів (британський)" + IDS_CONSUMPTION_MILES_GALLON_US "Миль/галонів (США)" END // TYPES OF CURRENCIES STRINGTABLE DISCARDABLE BEGIN - IDS_CURRENCY_AUSTRIAN_SCHILLING " " - IDS_CURRENCY_BELGIAN_FRANC " " - IDS_CURRENCY_CYPRIOT_POUND "ʳ " - IDS_CURRENCY_CZECH_KORUNA " " - IDS_CURRENCY_DEUTSCHE_MARK " " - IDS_CURRENCY_DUTCH_GUILDER " " - IDS_CURRENCY_EURO "" - IDS_CURRENCY_FINNISH_MARKKA "Գ " - IDS_CURRENCY_FRENCH_FRANC " " - IDS_CURRENCY_GREEK_DRACHMA " " - IDS_CURRENCY_IRISH_POUND " " - IDS_CURRENCY_ITALIAN_LIRA " " - IDS_CURRENCY_LUXEMBOURG_FRANC " " - IDS_CURRENCY_MALTESE_LIRA " " - IDS_CURRENCY_PORTOGUESE_ESCUDO " " - IDS_CURRENCY_SLOVAK_KORUNA " " - IDS_CURRENCY_SLOVENIAN_TOLAR " " - IDS_CURRENCY_SPANISH_PESETA " " + IDS_CURRENCY_AUSTRIAN_SCHILLING "Австралійський шилінг" + IDS_CURRENCY_BELGIAN_FRANC "Бельгійський франк" + IDS_CURRENCY_CYPRIOT_POUND "Кіпріотський фунт" + IDS_CURRENCY_CZECH_KORUNA "Чешська крона" + IDS_CURRENCY_DEUTSCHE_MARK "Немецька марка" + IDS_CURRENCY_DUTCH_GUILDER "Голандський гульден" + IDS_CURRENCY_EURO "Євро" + IDS_CURRENCY_FINNISH_MARKKA "Фінська марка" + IDS_CURRENCY_FRENCH_FRANC "Французський франк" + IDS_CURRENCY_GREEK_DRACHMA "Грецька драхма" + IDS_CURRENCY_IRISH_POUND "Ірландський фунт" + IDS_CURRENCY_ITALIAN_LIRA "Італьянськая ліра" + IDS_CURRENCY_LUXEMBOURG_FRANC "Люксембургський франк" + IDS_CURRENCY_MALTESE_LIRA "Мальтийськая ліра" + IDS_CURRENCY_PORTOGUESE_ESCUDO "Португальське ескудо" + IDS_CURRENCY_SLOVAK_KORUNA "Словацька крона" + IDS_CURRENCY_SLOVENIAN_TOLAR "Словенський толар" + IDS_CURRENCY_SPANISH_PESETA "Іспанська песета" END // TYPES OF ENERGIES STRINGTABLE DISCARDABLE BEGIN - IDS_ENERGY_15_C_CALORIES " 15-" - IDS_ENERGY_BTUS " " - IDS_ENERGY_ERGS "" - IDS_ENERGY_EVS "" - IDS_ENERGY_FOOT_POUNDS "-" - IDS_ENERGY_IT_CALORIES " " - IDS_ENERGY_IT_KILOCALORIES "ʳ " - IDS_ENERGY_JOULES "" - IDS_ENERGY_KILOJOULES "ʳ" - IDS_ENERGY_KILOWATT_HOURS "ʳ " - IDS_ENERGY_NUTRITION_CALORIES " " - IDS_ENERGY_TH_CALORIES " " + IDS_ENERGY_15_C_CALORIES "Калорія 15-градусна" + IDS_ENERGY_BTUS "Британська теплова одиниця" + IDS_ENERGY_ERGS "Ерг" + IDS_ENERGY_EVS "Електронвольт" + IDS_ENERGY_FOOT_POUNDS "Футо-фунт" + IDS_ENERGY_IT_CALORIES "Калорія міжнародна" + IDS_ENERGY_IT_KILOCALORIES "Кілокалорія міжнародна" + IDS_ENERGY_JOULES "Джоуль" + IDS_ENERGY_KILOJOULES "Кілоджоуль" + IDS_ENERGY_KILOWATT_HOURS "Кіловат за годину" + IDS_ENERGY_NUTRITION_CALORIES "Калорія харчова" + IDS_ENERGY_TH_CALORIES "Калорія термохімічна" END // TYPES OF LENGTHS STRINGTABLE DISCARDABLE BEGIN - IDS_LENGTH_ANGSTROMS "" - IDS_LENGTH_ASTRONOMICAL_UNITS " " - IDS_LENGTH_BARLEYCORNS "" - IDS_LENGTH_CENTIMETERS "" - IDS_LENGTH_CHAINS_UK " ()" - IDS_LENGTH_CHI "׳" - IDS_LENGTH_CHOU "" - IDS_LENGTH_CHR "" - IDS_LENGTH_CUN "" - IDS_LENGTH_FATHOMS "" - IDS_LENGTH_FATHOMS_HUNGARY " ()" - IDS_LENGTH_FEET "" - IDS_LENGTH_FURLONGS "" - IDS_LENGTH_GAN "" - IDS_LENGTH_HANDS "" - IDS_LENGTH_HUNH "" - IDS_LENGTH_INCHES "" - IDS_LENGTH_JA "" - IDS_LENGTH_JEONG "" - IDS_LENGTH_KABIET "ᒺ" - IDS_LENGTH_KEN "" - IDS_LENGTH_KEUB "" - IDS_LENGTH_KILOMETERS "ʳ" - IDS_LENGTH_LAR "" - IDS_LENGTH_LIGHT_YEARS " " - IDS_LENGTH_LINKS_UK "˳ ()" - IDS_LENGTH_METERS "" - IDS_LENGTH_MICRONS "̳" - IDS_LENGTH_MILES "" - IDS_LENGTH_MILLIMETERS "̳" - IDS_LENGTH_NAUTICAL_MILES " " - IDS_LENGTH_NIEU "" - IDS_LENGTH_PARSECS "" - IDS_LENGTH_PICAS "ϳ" - IDS_LENGTH_RI_JAPAN "г ()" - IDS_LENGTH_RI_KOREA "г ()" - IDS_LENGTH_RODS "" - IDS_LENGTH_SAWK "" - IDS_LENGTH_SEN "" - IDS_LENGTH_SHAKU "" - IDS_LENGTH_SPAN "" - IDS_LENGTH_SUN "" - IDS_LENGTH_TSUEN "" - IDS_LENGTH_VA "" - IDS_LENGTH_YARDS "" - IDS_LENGTH_YOTE "" - IDS_LENGTH_ZHANG "" + IDS_LENGTH_ANGSTROMS "Ангстрем" + IDS_LENGTH_ASTRONOMICAL_UNITS "Астрономічна одиниця" + IDS_LENGTH_BARLEYCORNS "Барлейкорн" + IDS_LENGTH_CENTIMETERS "Сантиметр" + IDS_LENGTH_CHAINS_UK "Чейн (британський)" + IDS_LENGTH_CHI "Чі" + IDS_LENGTH_CHOU "Чоу" + IDS_LENGTH_CHR "Ча" + IDS_LENGTH_CUN "Цунь" + IDS_LENGTH_FATHOMS "Фатом" + IDS_LENGTH_FATHOMS_HUNGARY "Фатом (угорський)" + IDS_LENGTH_FEET "Фут" + IDS_LENGTH_FURLONGS "Фарлонг" + IDS_LENGTH_GAN "Гань" + IDS_LENGTH_HANDS "Долоня" + IDS_LENGTH_HUNH "Ханх" + IDS_LENGTH_INCHES "Дюйм" + IDS_LENGTH_JA "Я" + IDS_LENGTH_JEONG "Джеонг" + IDS_LENGTH_KABIET "Каб’єт" + IDS_LENGTH_KEN "Кен" + IDS_LENGTH_KEUB "Кеуб" + IDS_LENGTH_KILOMETERS "Кілометр" + IDS_LENGTH_LAR "Лар" + IDS_LENGTH_LIGHT_YEARS "Світловий рік" + IDS_LENGTH_LINKS_UK "Лінк (британский)" + IDS_LENGTH_METERS "Метр" + IDS_LENGTH_MICRONS "Мікрометр" + IDS_LENGTH_MILES "Миля" + IDS_LENGTH_MILLIMETERS "Міліметр" + IDS_LENGTH_NAUTICAL_MILES "Морська миля" + IDS_LENGTH_NIEU "Ньйо" + IDS_LENGTH_PARSECS "Парсек" + IDS_LENGTH_PICAS "Піка" + IDS_LENGTH_RI_JAPAN "Рі (японська)" + IDS_LENGTH_RI_KOREA "Рі (корейськая)" + IDS_LENGTH_RODS "Род" + IDS_LENGTH_SAWK "Соук" + IDS_LENGTH_SEN "Сен" + IDS_LENGTH_SHAKU "Шаку" + IDS_LENGTH_SPAN "Спан" + IDS_LENGTH_SUN "Сан" + IDS_LENGTH_TSUEN "Тсуен" + IDS_LENGTH_VA "Ва" + IDS_LENGTH_YARDS "Ярд" + IDS_LENGTH_YOTE "Йоут" + IDS_LENGTH_ZHANG "Чжан" END // TYPES OF POWERS STRINGTABLE DISCARDABLE BEGIN - IDS_POWER_BTUS_PER_MINUTE " " - IDS_POWER_FPS_PER_MINUTE "- " - IDS_POWER_HORSEPOWER "ʳ " - IDS_POWER_KILOWATTS "ʳ" - IDS_POWER_MEGAWATTS "" - IDS_POWER_WATTS "" + IDS_POWER_BTUS_PER_MINUTE "Британська теплова одиниця за хвилину" + IDS_POWER_FPS_PER_MINUTE "Футо-фунт за хвилину" + IDS_POWER_HORSEPOWER "Кінська сила" + IDS_POWER_KILOWATTS "Кіловат" + IDS_POWER_MEGAWATTS "Мегават" + IDS_POWER_WATTS "Ват" END // TYPE OF PRESSURES STRINGTABLE DISCARDABLE BEGIN - IDS_PRESSURE_ATMOSPHERES " (Գ)" - IDS_PRESSURE_BARS "" - IDS_PRESSURE_HECTOPASCALS "" - IDS_PRESSURE_KILOPASCALS "ʳ" - IDS_PRESSURE_MM_OF_MERCURY "̳ " - IDS_PRESSURE_PASCALS "" - IDS_PRESSURE_PSI " " + IDS_PRESSURE_ATMOSPHERES "Атмосфера (Фізична)" + IDS_PRESSURE_BARS "Бар" + IDS_PRESSURE_HECTOPASCALS "Гектопаскаль" + IDS_PRESSURE_KILOPASCALS "Кілопаскаль" + IDS_PRESSURE_MM_OF_MERCURY "Міліметр ртутного стовпчика" + IDS_PRESSURE_PASCALS "Паскаль" + IDS_PRESSURE_PSI "Фунт на квадратний дюйм" END // TYPES OF TEMPERATURES STRINGTABLE DISCARDABLE BEGIN - IDS_TEMPERATURE_CELSIUS " ( )" - IDS_TEMPERATURE_FAHRENHEIT " ( )" - IDS_TEMPERATURE_KELVIN " ( )" - IDS_TEMPERATURE_RANKINE " ( )" + IDS_TEMPERATURE_CELSIUS "Градус (за шкалою Цельсія)" + IDS_TEMPERATURE_FAHRENHEIT "Градус (за шкалою Фаренгейта)" + IDS_TEMPERATURE_KELVIN "Градус (за шкалою Кельвіна)" + IDS_TEMPERATURE_RANKINE "Градус (за шкалою Ранкіна)" END // TYPES OF TIME STRINGTABLE DISCARDABLE BEGIN - IDS_TIME_DAYS "" - IDS_TIME_HOURS "" + IDS_TIME_DAYS "Доба" + IDS_TIME_HOURS "Година" IDS_TIME_NANOSECONDS "Nanoseconds" - IDS_TIME_MICROSECONDS "̳" - IDS_TIME_MILLISECONDS "̳" - IDS_TIME_MINUTES "" - IDS_TIME_SECONDS "" - IDS_TIME_WEEKS "" - IDS_TIME_YEARS "г" + IDS_TIME_MICROSECONDS "Мікросекунда" + IDS_TIME_MILLISECONDS "Мілісекунда" + IDS_TIME_MINUTES "Хвилина" + IDS_TIME_SECONDS "Секунда" + IDS_TIME_WEEKS "Тиждень" + IDS_TIME_YEARS "Рік" END // TYPES OF VELOCITIES STRINGTABLE DISCARDABLE BEGIN - IDS_VELOCITY_CMS_SECOND " " - IDS_VELOCITY_FEET_HOUR " " - IDS_VELOCITY_FEET_SECOND " " - IDS_VELOCITY_KILOMETERS_HOUR "ʳ " - IDS_VELOCITY_KNOTS "" - IDS_VELOCITY_MACH "" - IDS_VELOCITY_METERS_SECOND " " - IDS_VELOCITY_MILES_HOUR " " + IDS_VELOCITY_CMS_SECOND "Сантиметр за годину" + IDS_VELOCITY_FEET_HOUR "Фут за годину" + IDS_VELOCITY_FEET_SECOND "Фут за секунду" + IDS_VELOCITY_KILOMETERS_HOUR "Кілометр за годину" + IDS_VELOCITY_KNOTS "Вузол" + IDS_VELOCITY_MACH "Мах" + IDS_VELOCITY_METERS_SECOND "Метр за секунду" + IDS_VELOCITY_MILES_HOUR "Миля за годину" END // TYPES OF VOLUMES STRINGTABLE DISCARDABLE BEGIN - IDS_VOLUME_BARRELS_UK " ()" - IDS_VOLUME_BARRELS_OIL " " - IDS_VOLUME_BUN "" - IDS_VOLUME_BUSHELS_UK " ()" - IDS_VOLUME_BUSHELS_US " ()" - IDS_VOLUME_CUBIC_CENTIMETERS " " - IDS_VOLUME_CUBIC_FEET " " - IDS_VOLUME_CUBIC_INCHES " " - IDS_VOLUME_CUBIC_METERS " " - IDS_VOLUME_CUBIC_YARDS " " - IDS_VOLUME_DOE "" - IDS_VOLUME_FLUID_OUNCES_UK "г ()" - IDS_VOLUME_FLUID_OUNCES_US "г ()" - IDS_VOLUME_GALLONS_UK " ()" - IDS_VOLUME_GALLONS_DRY_US " ( , )" - IDS_VOLUME_GALLONS_LIQUID_US " ( , )" - IDS_VOLUME_GOU "" - IDS_VOLUME_HOP "" - IDS_VOLUME_ICCE "" - IDS_VOLUME_KWIAN "" - IDS_VOLUME_LITERS "˳" - IDS_VOLUME_MAL "" - IDS_VOLUME_MILLILITERS "̳" - IDS_VOLUME_PINTS_UK "ϳ ()" - IDS_VOLUME_PINTS_DRY_US "ϳ ( , )" - IDS_VOLUME_PINTS_LIQUID_US "ϳ ( , )" - IDS_VOLUME_QUARTS_UK " ()" - IDS_VOLUME_QUARTS_DRY_US " ( , )" - IDS_VOLUME_QUARTS_LIQUID_US " ( , )" - IDS_VOLUME_SEKI "" - IDS_VOLUME_SYOU "" - IDS_VOLUME_TANANLOUNG "" - IDS_VOLUME_TANG "" - IDS_VOLUME_TO "" + IDS_VOLUME_BARRELS_UK "Барель (британський)" + IDS_VOLUME_BARRELS_OIL "Барель нафти" + IDS_VOLUME_BUN "Бун" + IDS_VOLUME_BUSHELS_UK "Бушель (британський)" + IDS_VOLUME_BUSHELS_US "Бушель (США)" + IDS_VOLUME_CUBIC_CENTIMETERS "Кубічний сантиметр" + IDS_VOLUME_CUBIC_FEET "Кубічний фут" + IDS_VOLUME_CUBIC_INCHES "Кубічний дюйм" + IDS_VOLUME_CUBIC_METERS "Кубічний метр" + IDS_VOLUME_CUBIC_YARDS "Кубічний ярд" + IDS_VOLUME_DOE "То" + IDS_VOLUME_FLUID_OUNCES_UK "Рідка унція (британська)" + IDS_VOLUME_FLUID_OUNCES_US "Рідка унція (США)" + IDS_VOLUME_GALLONS_UK "Галон (британський)" + IDS_VOLUME_GALLONS_DRY_US "Галон (для сухих речовин, США)" + IDS_VOLUME_GALLONS_LIQUID_US "Галон (для рідин, США)" + IDS_VOLUME_GOU "Гоу" + IDS_VOLUME_HOP "Хоп" + IDS_VOLUME_ICCE "Ікке" + IDS_VOLUME_KWIAN "Квіан" + IDS_VOLUME_LITERS "Літр" + IDS_VOLUME_MAL "Маль" + IDS_VOLUME_MILLILITERS "Мілілітр" + IDS_VOLUME_PINTS_UK "Пінта (британська)" + IDS_VOLUME_PINTS_DRY_US "Пінта (для сухих речовин, США)" + IDS_VOLUME_PINTS_LIQUID_US "Пінта (для рідин, США)" + IDS_VOLUME_QUARTS_UK "Кварта (британська)" + IDS_VOLUME_QUARTS_DRY_US "Кварта (для сухих речовин, США)" + IDS_VOLUME_QUARTS_LIQUID_US "Кварта (для рідин, США)" + IDS_VOLUME_SEKI "Секі" + IDS_VOLUME_SYOU "Сьо" + IDS_VOLUME_TANANLOUNG "Тананлунг" + IDS_VOLUME_TANG "Танг" + IDS_VOLUME_TO "Ту" END // TYPES OF WEIGHTS STRINGTABLE DISCARDABLE BEGIN - IDS_WEIGHT_BAHT "" - IDS_WEIGHT_CARATS "" - IDS_WEIGHT_CHUNG "" - IDS_WEIGHT_DON "" - IDS_WEIGHT_GEUN "" - IDS_WEIGHT_GRAMS "" - IDS_WEIGHT_GWAN "" - IDS_WEIGHT_HARB "" - IDS_WEIGHT_JIN_CHINA " ()" - IDS_WEIGHT_JIN_TAIWAN " ()" - IDS_WEIGHT_KAN "" - IDS_WEIGHT_KILOGRAMS "ʳ" - IDS_WEIGHT_KIN "ʳ" - IDS_WEIGHT_LIANG_CHINA "˳ ()" - IDS_WEIGHT_LIANG_TAIWAN "˳ ()" - IDS_WEIGHT_MONME "" - IDS_WEIGHT_OUNCES_AVOIRDUPOIS " ()" - IDS_WEIGHT_OUNCES_TROY " ()" - IDS_WEIGHT_POUNDS "" - IDS_WEIGHT_QUINTAL_METRIC " ()" - IDS_WEIGHT_SALOUNG "" - IDS_WEIGHT_STONES "" - IDS_WEIGHT_TAMLUNG "" - IDS_WEIGHT_TONNES "" - IDS_WEIGHT_TONS_UK " ()" - IDS_WEIGHT_TONS_US " ()" + IDS_WEIGHT_BAHT "Бат" + IDS_WEIGHT_CARATS "Карат" + IDS_WEIGHT_CHUNG "Чанг" + IDS_WEIGHT_DON "Дон" + IDS_WEIGHT_GEUN "Джин" + IDS_WEIGHT_GRAMS "Грам" + IDS_WEIGHT_GWAN "Кван" + IDS_WEIGHT_HARB "Хап" + IDS_WEIGHT_JIN_CHINA "Джин (китайський)" + IDS_WEIGHT_JIN_TAIWAN "Джин (тайванський)" + IDS_WEIGHT_KAN "Кан" + IDS_WEIGHT_KILOGRAMS "Кілограм" + IDS_WEIGHT_KIN "Кін" + IDS_WEIGHT_LIANG_CHINA "Ліанг (китайський)" + IDS_WEIGHT_LIANG_TAIWAN "Ліанг (тайванський)" + IDS_WEIGHT_MONME "Монм" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Унція (торгівельна)" + IDS_WEIGHT_OUNCES_TROY "Унція (тройська)" + IDS_WEIGHT_POUNDS "Фунт" + IDS_WEIGHT_QUINTAL_METRIC "Квінтал (метричний)" + IDS_WEIGHT_SALOUNG "Салунг" + IDS_WEIGHT_STONES "Стоун" + IDS_WEIGHT_TAMLUNG "тамлунг" + IDS_WEIGHT_TONNES "Тонна" + IDS_WEIGHT_TONS_UK "Тонна (британська)" + IDS_WEIGHT_TONS_US "Тонна (США)" END diff --git a/base/applications/calc/lang/zh-CN.rc b/base/applications/calc/lang/zh-CN.rc new file mode 100644 index 00000000000..117d7b8f3ec --- /dev/null +++ b/base/applications/calc/lang/zh-CN.rc @@ -0,0 +1,738 @@ +/* + * Simplified Chinese translation for calc + * + * By: Song Fuchang (0xfc) + */ + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED + +// Dialog + +IDD_DIALOG_SCIENTIFIC DIALOGEX 0, 0, 316, 161 +STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS 计算器" +MENU IDR_MENU_SCIENTIFIC_1 +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "",IDC_STATIC,4,16,132,21 + CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10 + CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10 + CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10 + CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10 + GROUPBOX "",IDC_STATIC,4,36,76,21 + CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,8,44,26,10 + CONTROL "Hyp",IDC_CHECK_HYP,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,40,44,29,10 + CTEXT "",IDC_TEXT_PARENT,84,40,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + CTEXT "",IDC_TEXT_MEMORY,112,40,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "Sta",IDC_BUTTON_STA,4,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Ave",IDC_BUTTON_AVE,4,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Sum",IDC_BUTTON_SUM,4,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "s",IDC_BUTTON_S,4,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Dat",IDC_BUTTON_DAT,4,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "F-E",IDC_BUTTON_FE,38,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "dms",IDC_BUTTON_DMS,38,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "sin",IDC_BUTTON_SIN,38,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "cos",IDC_BUTTON_COS,38,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "tan",IDC_BUTTON_TAN,38,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "(",IDC_BUTTON_LEFTPAR,64,64,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Exp",IDC_BUTTON_EXP,64,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^y",IDC_BUTTON_XeY,64,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^2",IDC_BUTTON_Xe2,64,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "x^3",IDC_BUTTON_Xe3,64,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ")",IDC_BUTTON_RIGHTPAR,90,64,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "ln",IDC_BUTTON_LN,90,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "log",IDC_BUTTON_LOG,90,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "n!",IDC_BUTTON_NF,90,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1/x",IDC_BUTTON_RX,90,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MC",IDC_BUTTON_MC,124,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MR",IDC_BUTTON_MR,124,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MS",IDC_BUTTON_MS,124,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "M+",IDC_BUTTON_MP,124,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "pi",IDC_BUTTON_PI,124,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "7",IDC_BUTTON_7,158,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "4",IDC_BUTTON_4,158,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1",IDC_BUTTON_1,158,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "0",IDC_BUTTON_0,158,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "A",IDC_BUTTON_A,158,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "8",IDC_BUTTON_8,184,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "5",IDC_BUTTON_5,184,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "2",IDC_BUTTON_2,184,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+/-",IDC_BUTTON_SIGN,184,121,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "B",IDC_BUTTON_B,184,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "9",IDC_BUTTON_9,210,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "6",IDC_BUTTON_6,210,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "3",IDC_BUTTON_3,210,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ",",IDC_BUTTON_DOT,210,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "C",IDC_BUTTON_C,210,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "/",IDC_BUTTON_DIV,236,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "*",IDC_BUTTON_MULT,236,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "-",IDC_BUTTON_SUB,236,102,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+",IDC_BUTTON_ADD,236,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "D",IDC_BUTTON_D,236,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Mod",IDC_BUTTON_MOD,262,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Or",IDC_BUTTON_OR,262,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Lsh",IDC_BUTTON_LSH,262,102,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "=",IDC_BUTTON_EQU,262,121,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "E",IDC_BUTTON_E,262,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "And",IDC_BUTTON_AND,288,64,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Xor",IDC_BUTTON_XOR,288,83,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Not",IDC_BUTTON_NOT,288,102,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Int",IDC_BUTTON_INT,288,121,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "F",IDC_BUTTON_F,288,140,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + GROUPBOX "",IDC_STATIC,140,16,172,21 + CONTROL "四字",IDC_RADIO_QWORD,"Button",BS_AUTORADIOBUTTON | + NOT WS_VISIBLE,148,24,37,10 + CONTROL "双字",IDC_RADIO_DWORD,"Button",BS_AUTORADIOBUTTON | + NOT WS_VISIBLE,188,24,37,10 + CONTROL "字",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT + WS_VISIBLE,232,24,33,10 + CONTROL "字节",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + WS_VISIBLE,272,24,30,10 + CONTROL "角度",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON,148,24, + 42,10 + CONTROL "弧度",IDC_RADIO_RAD,"Button",BS_AUTORADIOBUTTON,192, + 24,42,10 + CONTROL "梯度",IDC_RADIO_GRAD,"Button",BS_AUTORADIOBUTTON, + 236,24,44,10 + PUSHBUTTON "C",IDC_BUTTON_CANC,272,40,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "CE",IDC_BUTTON_CE,228,40,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Back",IDC_BUTTON_BACK,184,40,40,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + RTEXT "",IDC_TEXT_OUTPUT,4,4,308,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5, NOT WS_VISIBLE +END + +IDD_DIALOG_STANDARD DIALOGEX 0, 0, 172, 127 +STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS 计算器" +MENU IDR_MENU_STANDARD +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + PUSHBUTTON "C",IDC_BUTTON_CANC,128,24,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "CE",IDC_BUTTON_CE,84,24,40,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Back",IDC_BUTTON_BACK,40,24,40,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + RTEXT "",IDC_TEXT_OUTPUT,4,4,164,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "7",IDC_BUTTON_7,40,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "4",IDC_BUTTON_4,40,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1",IDC_BUTTON_1,40,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "0",IDC_BUTTON_0,40,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "8",IDC_BUTTON_8,66,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "5",IDC_BUTTON_5,66,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "2",IDC_BUTTON_2,66,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+/-",IDC_BUTTON_SIGN,66,105,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "9",IDC_BUTTON_9,92,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "6",IDC_BUTTON_6,92,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "3",IDC_BUTTON_3,92,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON ",",IDC_BUTTON_DOT,92,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "/",IDC_BUTTON_DIV,118,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "*",IDC_BUTTON_MULT,118,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "-",IDC_BUTTON_SUB,118,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "+",IDC_BUTTON_ADD,118,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "Sqrt",IDC_BUTTON_SQRT,144,48,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "%",IDC_BUTTON_PERCENT,144,67,24,17,BS_CENTER | + BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "1/x",IDC_BUTTON_RX,144,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "=",IDC_BUTTON_EQU,144,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + CTEXT "",IDC_TEXT_MEMORY,4,24,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + PUSHBUTTON "MC",IDC_BUTTON_MC,4,48,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MR",IDC_BUTTON_MR,4,67,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "MS",IDC_BUTTON_MS,4,86,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + PUSHBUTTON "M+",IDC_BUTTON_MP,4,105,24,17,BS_CENTER | BS_VCENTER | + BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5, NOT WS_VISIBLE +END + +IDD_DIALOG_CONVERSION DIALOGEX 0, 0, 320, 130 +STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS 计算器" +MENU IDR_MENU_STANDARD +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "转换",IDC_BUTTON_CONVERT,35,105,76,17 + COMBOBOX IDC_COMBO_CATEGORY,4,31,140,168,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "类别:",IDC_STATIC,4,20,56,8 + COMBOBOX IDC_COMBO_FROM,4,60,140,168,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "从...转换:",IDC_STATIC,4,49,56,8 + COMBOBOX IDC_COMBO_TO,4,87,140,168,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP | CBS_SORT + LTEXT "转换为:",IDC_STATIC,4,76,56,8 + CONTROL "C",IDC_BUTTON_CANC,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,276,24,40,17 + CONTROL "CE",IDC_BUTTON_CE,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,232,24,40,17 + CONTROL "Back",IDC_BUTTON_BACK,"Button",BS_OWNERDRAW | + BS_CENTER | BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,24, + 40,17 + RTEXT "",IDC_TEXT_OUTPUT,4,4,312,12,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + CONTROL "7",IDC_BUTTON_7,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,48,24,17 + CONTROL "4",IDC_BUTTON_4,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,67,24,17 + CONTROL "1",IDC_BUTTON_1,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,86,24,17 + CONTROL "0",IDC_BUTTON_0,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,188,105,24,17 + CONTROL "8",IDC_BUTTON_8,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,48,24,17 + CONTROL "5",IDC_BUTTON_5,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,67,24,17 + CONTROL "2",IDC_BUTTON_2,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,86,24,17 + CONTROL "+/-",IDC_BUTTON_SIGN,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,214,105,24,17 + CONTROL "9",IDC_BUTTON_9,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,48,24,17 + CONTROL "6",IDC_BUTTON_6,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,67,24,17 + CONTROL "3",IDC_BUTTON_3,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,86,24,17 + CONTROL ",",IDC_BUTTON_DOT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,240,105,24,17 + CONTROL "/",IDC_BUTTON_DIV,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,48,24,17 + CONTROL "*",IDC_BUTTON_MULT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,67,24,17 + CONTROL "-",IDC_BUTTON_SUB,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,86,24,17 + CONTROL "+",IDC_BUTTON_ADD,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,266,105,24,17 + CONTROL "Sqrt",IDC_BUTTON_SQRT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,48,24,17 + CONTROL "%",IDC_BUTTON_PERCENT,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,67,24,17 + CONTROL "1/x",IDC_BUTTON_RX,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,86,24,17 + CONTROL "=",IDC_BUTTON_EQU,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,292,105,24,17 + CTEXT "",IDC_TEXT_MEMORY,152,24,24,17,SS_CENTERIMAGE, + WS_EX_CLIENTEDGE + CONTROL "MC",IDC_BUTTON_MC,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,48,24,17 + CONTROL "MR",IDC_BUTTON_MR,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,67,24,17 + CONTROL "MS",IDC_BUTTON_MS,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,86,24,17 + CONTROL "M+",IDC_BUTTON_MP,"Button",BS_OWNERDRAW | BS_CENTER | + BS_VCENTER | BS_NOTIFY | WS_TABSTOP,152,105,24,17 + DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE +END + +IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "关于 ReactOS 计算器" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "确定",IDOK,105,148,52,16 + CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | + SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48 + LTEXT "ReactOS 计算器",IDC_STATIC,120,12,132,8, + SS_CENTERIMAGE + LTEXT "版本 ",IDC_TEXT_VERSION,120,20,132,8,SS_CENTERIMAGE + LTEXT "作者 Carlo Bramini",IDC_STATIC,120,32,132,8, + SS_CENTERIMAGE + GROUPBOX "",IDC_STATIC,112,0,148,52 + GROUPBOX "",IDC_STATIC,4,56,256,88 + EDITTEXT IDC_EDIT_LICENSE,12,68,240,68,ES_MULTILINE | ES_READONLY | + WS_VSCROLL +END + +IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "统计框" +FONT 8, "MS Shell Dlg" +BEGIN + LISTBOX IDC_LIST_STAT,4,4,156,40,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "返回",IDC_BUTTON_RET,4,48,36,16 + PUSHBUTTON "加载",IDC_BUTTON_LOAD,44,48,36,16 + PUSHBUTTON "清除",IDC_BUTTON_CD,84,48,36,16 + PUSHBUTTON "全清",IDC_BUTTON_CAD,124,48,36,16 + CTEXT "n=0",IDC_TEXT_NITEMS,4,68,156,12,SS_CENTERIMAGE | + SS_SUNKEN +END + +// Menus + +IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +BEGIN + POPUP "编辑" + BEGIN + MENUITEM "复制\tCtrl+C", IDM_EDIT_COPY + MENUITEM "粘贴\tCtrl+V", IDM_EDIT_PASTE + END + POPUP "查看" + BEGIN + MENUITEM "标准型", IDM_VIEW_STANDARD, CHECKED + MENUITEM "科学型", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "转换", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "十六进制\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "十进制\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "八进制\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "二进制\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM SEPARATOR + MENUITEM "角度\tF2", IDM_VIEW_DEG, CHECKED + MENUITEM "弧度\tF3", IDM_VIEW_RAD, CHECKED + MENUITEM "梯度\tF4", IDM_VIEW_GRAD, CHECKED + MENUITEM SEPARATOR + MENUITEM "数字分组", IDM_VIEW_GROUP, CHECKED + END + POPUP "帮助" + BEGIN + MENUITEM "帮助主题", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "关于 ReactOS 计算器", IDM_HELP_ABOUT + END +END + +IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +BEGIN + POPUP "编辑" + BEGIN + MENUITEM "复制\tCtrl+C", IDM_EDIT_COPY + MENUITEM "粘贴\tCtrl+V", IDM_EDIT_PASTE + END + POPUP "查看" + BEGIN + MENUITEM "标准型", IDM_VIEW_STANDARD, CHECKED + MENUITEM "科学型", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "转换", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "十六进制\tF5", IDM_VIEW_HEX, CHECKED + MENUITEM "十进制\tF6", IDM_VIEW_DEC, CHECKED + MENUITEM "八进制\tF7", IDM_VIEW_OCT, CHECKED + MENUITEM "二进制\tF8", IDM_VIEW_BIN, CHECKED + MENUITEM SEPARATOR + MENUITEM "四字\tF12", IDM_VIEW_QWORD, CHECKED + MENUITEM "双字\tF2", IDM_VIEW_DWORD, CHECKED + MENUITEM "字\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "字节\tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM SEPARATOR + MENUITEM "数字分组", IDM_VIEW_GROUP, CHECKED + END + POPUP "帮助" + BEGIN + MENUITEM "帮助主题", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "关于 ReactOS 计算器", IDM_HELP_ABOUT + END +END + +IDR_MENU_STANDARD MENU DISCARDABLE +BEGIN + POPUP "编辑" + BEGIN + MENUITEM "复制\tCtrl+C", IDM_EDIT_COPY + MENUITEM "粘贴\tCtrl+V", IDM_EDIT_PASTE + END + POPUP "查看" + BEGIN + MENUITEM "标准型", IDM_VIEW_STANDARD, CHECKED + MENUITEM "科学型", IDM_VIEW_SCIENTIFIC, CHECKED + MENUITEM "转换", IDM_VIEW_CONVERSION + MENUITEM SEPARATOR + MENUITEM "数字分组", IDM_VIEW_GROUP, CHECKED + END + POPUP "帮助" + BEGIN + MENUITEM "帮助主题", IDM_HELP_HELP + MENUITEM SEPARATOR + MENUITEM "关于 ReactOS 计算器", IDM_HELP_ABOUT + END +END + +// String Tables + +STRINGTABLE DISCARDABLE +BEGIN + IDS_STRING_LICENSE "ReactOS 计算器是在 GNU GPL 协议下发行的自由软件。\r\n\r\n你可以从这儿取得一份 GNU GPL 协议的副本:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\n你也可以从这儿取得其翻译:\r\nhttp://www.gnu.org/licenses/translations.html" + IDS_MATH_ERROR "错误" + IDS_QUICKHELP "快速帮助" +END + +// Types of conversion +STRINGTABLE DISCARDABLE +BEGIN + IDS_CONV_ANGLE "角" + IDS_CONV_AREA "面积" + IDS_CONV_CONSUMPTION "油耗 (引擎)" + IDS_CONV_CURRENCY "货币" + IDS_CONV_ENERGY "能量" + IDS_CONV_LENGTH "长度" + IDS_CONV_POWER "功率" + IDS_CONV_PRESSURE "压力" + IDS_CONV_TEMPERATURE "温度" + IDS_CONV_TIME "时间" + IDS_CONV_VELOCITY "速度" + IDS_CONV_VOLUME "体积" + IDS_CONV_WEIGHT "质量" +END + +// TYPES OF ANGLES +STRINGTABLE DISCARDABLE +BEGIN + IDS_ANGLE_DEGREES "角度" + IDS_ANGLE_GRADIANS "梯度" + IDS_ANGLE_RADIANS "弧度" +END + +// TYPES OF AREAS +STRINGTABLE DISCARDABLE +BEGIN + IDS_AREA_ACRES "英亩" + IDS_AREA_ACRES_BRAZIL "英亩 (巴西)" + IDS_AREA_ACRES_FRANCE "英亩 (法国)" + IDS_AREA_ACRES_SCOTS "英亩 (苏格兰)" + IDS_AREA_ACRES_US "英亩 (美国)" + IDS_AREA_ARES "公亩" + IDS_AREA_CHOU "畴" + IDS_AREA_DANBO "大亩" + IDS_AREA_HECTARES "公顷" + IDS_AREA_JEONGBO "Jeongbo" + IDS_AREA_MORGEN_HUNGARY "摩根 (匈牙利)" + IDS_AREA_MU "亩" + IDS_AREA_PING "坪" + IDS_AREA_PYEONG "坪 (韩国)" + IDS_AREA_PYEONGBANGJA "Pyeongbangja" + IDS_AREA_RAI "莱" + IDS_AREA_SE "亩 (日本)" + IDS_AREA_SQUARE_CENTIMETERS "平方厘米" + IDS_AREA_SQUARE_CHR "Square chr" + IDS_AREA_SQUARE_FATHOMS "平方英寻" + IDS_AREA_SQUARE_FATHOMS_HUNGARY "平方英寻 (匈牙利)" + IDS_AREA_SQUARE_FEET "平方英尺" + IDS_AREA_SQUARE_INCHES "平方英寸" + IDS_AREA_SQUARE_KILOMETERS "平方千米" + IDS_AREA_SQUARE_LAR "平方拉尔" + IDS_AREA_SQUARE_METER "平方米" + IDS_AREA_SQUARE_MILES "平方英里" + IDS_AREA_SQUARE_MILLIMETERS "平方毫米" + IDS_AREA_SQUARE_SHAKU "平方尺" + IDS_AREA_SQUARE_TSUEN "平方寸" + IDS_AREA_SQUARE_VA "Square va" + IDS_AREA_SQUARE_YARD "平方码" + IDS_AREA_TAN "段" + IDS_AREA_TSUBO "坪 (日本)" +END + +// TYPES OF COMSUMPTIONS +STRINGTABLE DISCARDABLE +BEGIN + IDS_CONSUMPTION_KM_PER_L "千米/升" + IDS_CONSUMPTION_L_PER_100_KM "升/100 千米" + IDS_CONSUMPTION_MILES_GALLON_UK "英里/加仑 (英国)" + IDS_CONSUMPTION_MILES_GALLON_US "英里/加仑 (美国)" +END + +// TYPES OF CURRENCIES +STRINGTABLE DISCARDABLE +BEGIN + IDS_CURRENCY_AUSTRIAN_SCHILLING "奥地利先令" + IDS_CURRENCY_BELGIAN_FRANC "比利时法郎" + IDS_CURRENCY_CYPRIOT_POUND "塞浦路斯镑" + IDS_CURRENCY_CZECH_KORUNA "捷克克朗" + IDS_CURRENCY_DEUTSCHE_MARK "德国马克" + IDS_CURRENCY_DUTCH_GUILDER "荷兰盾" + IDS_CURRENCY_EURO "欧元" + IDS_CURRENCY_FINNISH_MARKKA "芬兰马克" + IDS_CURRENCY_FRENCH_FRANC "法郎" + IDS_CURRENCY_GREEK_DRACHMA "希腊德拉克马" + IDS_CURRENCY_IRISH_POUND "爱尔兰镑" + IDS_CURRENCY_ITALIAN_LIRA "意大利里拉" + IDS_CURRENCY_LUXEMBOURG_FRANC "卢森堡法郎" + IDS_CURRENCY_MALTESE_LIRA "马耳他里拉" + IDS_CURRENCY_PORTOGUESE_ESCUDO "葡萄牙埃斯库多" + IDS_CURRENCY_SLOVAK_KORUNA "斯洛伐克克朗" + IDS_CURRENCY_SLOVENIAN_TOLAR "斯洛文尼亚拖拉" + IDS_CURRENCY_SPANISH_PESETA "西班牙比塞塔" +END + +// TYPES OF ENERGIES +STRINGTABLE DISCARDABLE +BEGIN + IDS_ENERGY_15_C_CALORIES "15 °C 卡路里" + IDS_ENERGY_BTUS "英制热量单位" + IDS_ENERGY_ERGS "尔格" + IDS_ENERGY_EVS "电子伏特" + IDS_ENERGY_FOOT_POUNDS "英尺-磅" + IDS_ENERGY_IT_CALORIES "国际蒸汽表卡路里" + IDS_ENERGY_IT_KILOCALORIES "国际蒸汽表千卡路里" + IDS_ENERGY_JOULES "焦耳" + IDS_ENERGY_KILOJOULES "千焦" + IDS_ENERGY_KILOWATT_HOURS "千瓦时" + IDS_ENERGY_NUTRITION_CALORIES "营养卡路里" + IDS_ENERGY_TH_CALORIES "热化学卡路里" +END + +// TYPES OF LENGTHS +STRINGTABLE DISCARDABLE +BEGIN + IDS_LENGTH_ANGSTROMS "埃" + IDS_LENGTH_ASTRONOMICAL_UNITS "天文单位" + IDS_LENGTH_BARLEYCORNS "巴利肯" + IDS_LENGTH_CENTIMETERS "厘米" + IDS_LENGTH_CHAINS_UK "链 (英国)" + IDS_LENGTH_CHI "尺" + IDS_LENGTH_CHOU "畴" + IDS_LENGTH_CHR "Chr" + IDS_LENGTH_CUN "寸" + IDS_LENGTH_FATHOMS "英寻" + IDS_LENGTH_FATHOMS_HUNGARY "英寻 (匈牙利)" + IDS_LENGTH_FEET "英尺" + IDS_LENGTH_FURLONGS "浪" + IDS_LENGTH_GAN "杆" + IDS_LENGTH_HANDS "掌宽" + IDS_LENGTH_HUNH "Hunh" + IDS_LENGTH_INCHES "英尺" + IDS_LENGTH_JA "尺 (韩国)" + IDS_LENGTH_JEONG "Jeong" + IDS_LENGTH_KABIET "Kabiet" + IDS_LENGTH_KEN "Ken" + IDS_LENGTH_KEUB "Keub" + IDS_LENGTH_KILOMETERS "千米" + IDS_LENGTH_LAR "拉尔" + IDS_LENGTH_LIGHT_YEARS "光年" + IDS_LENGTH_LINKS_UK "Links (UK)" + IDS_LENGTH_METERS "米" + IDS_LENGTH_MICRONS "微米" + IDS_LENGTH_MILES "英里" + IDS_LENGTH_MILLIMETERS "毫米" + IDS_LENGTH_NAUTICAL_MILES "海里" + IDS_LENGTH_NIEU "Nieu" + IDS_LENGTH_PARSECS "Parsecs" + IDS_LENGTH_PICAS "Picas" + IDS_LENGTH_RI_JAPAN "里 (日本)" + IDS_LENGTH_RI_KOREA "里 (韩国)" + IDS_LENGTH_RODS "杆" + IDS_LENGTH_SAWK "Sawk" + IDS_LENGTH_SEN "Sen" + IDS_LENGTH_SHAKU "尺 (日本)" + IDS_LENGTH_SPAN "Span" + IDS_LENGTH_SUN "寸 (日本)" + IDS_LENGTH_TSUEN "寸" + IDS_LENGTH_VA "Va" + IDS_LENGTH_YARDS "码" + IDS_LENGTH_YOTE "约特" + IDS_LENGTH_ZHANG "丈" +END + +// TYPES OF POWERS +STRINGTABLE DISCARDABLE +BEGIN + IDS_POWER_BTUS_PER_MINUTE "英制热量单位每分钟" + IDS_POWER_FPS_PER_MINUTE "英尺-磅每分钟" + IDS_POWER_HORSEPOWER "马力" + IDS_POWER_KILOWATTS "千瓦" + IDS_POWER_MEGAWATTS "兆瓦" + IDS_POWER_WATTS "瓦" +END + +// TYPE OF PRESSURES +STRINGTABLE DISCARDABLE +BEGIN + IDS_PRESSURE_ATMOSPHERES "大气压" + IDS_PRESSURE_BARS "巴" + IDS_PRESSURE_HECTOPASCALS "百帕" + IDS_PRESSURE_KILOPASCALS "千帕" + IDS_PRESSURE_MM_OF_MERCURY "毫米汞柱" + IDS_PRESSURE_PASCALS "帕" + IDS_PRESSURE_PSI "英磅-力每平方英尺" +END + +// TYPES OF TEMPERATURES +STRINGTABLE DISCARDABLE +BEGIN + IDS_TEMPERATURE_CELSIUS "摄氏度" + IDS_TEMPERATURE_FAHRENHEIT "华氏度" + IDS_TEMPERATURE_KELVIN "开尔文" + IDS_TEMPERATURE_RANKINE "兰金度" +END + +// TYPES OF TIME +STRINGTABLE DISCARDABLE +BEGIN + IDS_TIME_DAYS "日" + IDS_TIME_HOURS "小时" + IDS_TIME_NANOSECONDS "纳秒" + IDS_TIME_MICROSECONDS "微秒" + IDS_TIME_MILLISECONDS "毫秒" + IDS_TIME_MINUTES "分" + IDS_TIME_SECONDS "秒" + IDS_TIME_WEEKS "周" + IDS_TIME_YEARS "年" +END + +// TYPES OF VELOCITIES +STRINGTABLE DISCARDABLE +BEGIN + IDS_VELOCITY_CMS_SECOND "厘米/小时" + IDS_VELOCITY_FEET_HOUR "英尺/小时" + IDS_VELOCITY_FEET_SECOND "英尺/秒" + IDS_VELOCITY_KILOMETERS_HOUR "千米/小时" + IDS_VELOCITY_KNOTS "节" + IDS_VELOCITY_MACH "马赫" + IDS_VELOCITY_METERS_SECOND "米/秒" + IDS_VELOCITY_MILES_HOUR "英里/小时" +END + +// TYPES OF VOLUMES +STRINGTABLE DISCARDABLE +BEGIN + IDS_VOLUME_BARRELS_UK "桶 (英国)" + IDS_VOLUME_BARRELS_OIL "桶油" + IDS_VOLUME_BUN "Bun" + IDS_VOLUME_BUSHELS_UK "蒲式耳 (英国)" + IDS_VOLUME_BUSHELS_US "蒲式耳 (美国)" + IDS_VOLUME_CUBIC_CENTIMETERS "立方厘米" + IDS_VOLUME_CUBIC_FEET "立方英尺" + IDS_VOLUME_CUBIC_INCHES "立方英寸" + IDS_VOLUME_CUBIC_METERS "立方米" + IDS_VOLUME_CUBIC_YARDS "立方码" + IDS_VOLUME_DOE "Doe" + IDS_VOLUME_FLUID_OUNCES_UK "液盎司 (英国)" + IDS_VOLUME_FLUID_OUNCES_US "液盎司 (美国)" + IDS_VOLUME_GALLONS_UK "加仑 (英国)" + IDS_VOLUME_GALLONS_DRY_US "干量加仑 (美国)" + IDS_VOLUME_GALLONS_LIQUID_US "液加仑 (美国)" + IDS_VOLUME_GOU "合" + IDS_VOLUME_HOP "Hop" + IDS_VOLUME_ICCE "Icce" + IDS_VOLUME_KWIAN "Kwian" + IDS_VOLUME_LITERS "升" + IDS_VOLUME_MAL "Mal" + IDS_VOLUME_MILLILITERS "毫升" + IDS_VOLUME_PINTS_UK "品脱 (英国)" + IDS_VOLUME_PINTS_DRY_US "干量品脱 (美国)" + IDS_VOLUME_PINTS_LIQUID_US "液品脱 (美国)" + IDS_VOLUME_QUARTS_UK "夸脱 (英国)" + IDS_VOLUME_QUARTS_DRY_US "干量夸脱 (美国)" + IDS_VOLUME_QUARTS_LIQUID_US "液夸脱 (美国)" + IDS_VOLUME_SEKI "Seki" + IDS_VOLUME_SYOU "Syou" + IDS_VOLUME_TANANLOUNG "Tananloung" + IDS_VOLUME_TANG "Tang" + IDS_VOLUME_TO "斗 (日本)" +END + +// TYPES OF WEIGHTS +STRINGTABLE DISCARDABLE +BEGIN + IDS_WEIGHT_BAHT "铢" + IDS_WEIGHT_CARATS "克拉" + IDS_WEIGHT_CHUNG "Chung" + IDS_WEIGHT_DON "Don" + IDS_WEIGHT_GEUN "Geun" + IDS_WEIGHT_GRAMS "克" + IDS_WEIGHT_GWAN "Gwan" + IDS_WEIGHT_HARB "Harb" + IDS_WEIGHT_JIN_CHINA "斤 (中国)" + IDS_WEIGHT_JIN_TAIWAN "斤 (中国台湾)" + IDS_WEIGHT_KAN "贯 (日本)" + IDS_WEIGHT_KILOGRAMS "千克" + IDS_WEIGHT_KIN "斤 (日本)" + IDS_WEIGHT_LIANG_CHINA "两 (中国)" + IDS_WEIGHT_LIANG_TAIWAN "两 (中国台湾)" + IDS_WEIGHT_MONME "两 (日本)" + IDS_WEIGHT_OUNCES_AVOIRDUPOIS "常衡盎司" + IDS_WEIGHT_OUNCES_TROY "金衡盎司" + IDS_WEIGHT_POUNDS "英磅" + IDS_WEIGHT_QUINTAL_METRIC "公担" + IDS_WEIGHT_SALOUNG "Saloung" + IDS_WEIGHT_STONES "石" + IDS_WEIGHT_TAMLUNG "Tamlung" + IDS_WEIGHT_TONNES "吨" + IDS_WEIGHT_TONS_UK "吨 (英国)" + IDS_WEIGHT_TONS_US "吨 (美国)" +END diff --git a/base/applications/calc/resource.rc b/base/applications/calc/resource.rc index fa35d39ce5b..c42d398fa4d 100644 --- a/base/applications/calc/resource.rc +++ b/base/applications/calc/resource.rc @@ -44,17 +44,20 @@ IDI_CALC_SMALL ICON DISCARDABLE "res/calc_sm.ico" IDB_BITMAP_ROS BITMAP DISCARDABLE "res/ROS_logo.bmp" +#include "lang/en-US.rc" +#include "lang/nl-NL.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/bg-BG.rc" #include "lang/cs-CZ.rc" #include "lang/de-DE.rc" #include "lang/el-GR.rc" -#include "lang/en-US.rc" #include "lang/es-ES.rc" #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/ko-KR.rc" -#include "lang/nl-NL.rc" #include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" @@ -63,3 +66,4 @@ IDB_BITMAP_ROS BITMAP DISCARDABLE "res/ROS_logo.bmp" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" #include "lang/uk-UA.rc" +#include "lang/zh-CN.rc" diff --git a/base/applications/charmap/CMakeLists.txt b/base/applications/charmap/CMakeLists.txt index a63a7da7343..3e5d1bc4ebf 100644 --- a/base/applications/charmap/CMakeLists.txt +++ b/base/applications/charmap/CMakeLists.txt @@ -9,14 +9,12 @@ list(APPEND SOURCE map.c charmap.rc) -add_executable(charmap - ${CMAKE_CURRENT_BINARY_DIR}/charmap_precomp.h.gch - ${SOURCE}) - -add_pch(charmap ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(charmap ${SOURCE}) set_module_type(charmap win32gui) -add_importlibs(charmap user32 gdi32 comctl32 kernel32 msvcrt) +add_importlibs(charmap msvcrt user32 gdi32 comctl32 kernel32) + +add_pch(charmap precomp.h) add_cd_file(TARGET charmap DESTINATION reactos/system32 FOR all) diff --git a/base/applications/charmap/charmap.rc b/base/applications/charmap/charmap.rc index ce6b398b5d7..d6155095b4f 100644 --- a/base/applications/charmap/charmap.rc +++ b/base/applications/charmap/charmap.rc @@ -3,6 +3,9 @@ #include #include "resource.h" +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +IDI_ICON ICON "res/charmap.ico" #define REACTOS_STR_FILE_DESCRIPTION "ReactOS Character Map\0" #define REACTOS_STR_INTERNAL_NAME "charmap\0" diff --git a/base/applications/charmap/lang/bg-BG.rc b/base/applications/charmap/lang/bg-BG.rc index 860ca4bd464..b1fda22afc2 100644 --- a/base/applications/charmap/lang/bg-BG.rc +++ b/base/applications/charmap/lang/bg-BG.rc @@ -1,17 +1,19 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT " :", IDC_STATIC, 6, 7, 24, 9 + LTEXT "Шрифт :", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "Помощ", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT " :", IDC_STATIC, 3, 188, 75, 9 + LTEXT "Знаци за запомняне:", IDC_STATIC, 3, 188, 75, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + DEFPUSHBUTTON "Избор", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "Запомняне", IDC_COPY, 242, 186, 44, 13, WS_DISABLED CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -31,12 +33,12 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION " " +CAPTION "За знаковия изборник" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT " , 0,1\n (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "Знаков изборник, в0,1\nВъзпроизводствено право (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "Затваряне", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END @@ -44,6 +46,6 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "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.\r\n\r\nThis 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.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "&..." + IDS_ABOUT "&За..." IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/ca-ES.rc b/base/applications/charmap/lang/ca-ES.rc index 19a4157dc0c..f0b02adad9c 100644 --- a/base/applications/charmap/lang/ca-ES.rc +++ b/base/applications/charmap/lang/ca-ES.rc @@ -8,7 +8,7 @@ BEGIN COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Ajuda", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "Carcters a copiar :", IDC_STATIC, 6, 188, 66, 9 + LTEXT "Caràcters a copiar :", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 DEFPUSHBUTTON "Selecciona", IDC_SELECT, 194, 186, 44, 13 PUSHBUTTON "Copia", IDC_COPY, 242, 186, 44, 13, WS_DISABLED @@ -31,7 +31,7 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "En quanta al Mapa de carcters" +CAPTION "En quanta al Mapa de caràcters" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN diff --git a/base/applications/charmap/lang/cs-CZ.rc b/base/applications/charmap/lang/cs-CZ.rc index ff50115013d..a2dc5eb8e8c 100644 --- a/base/applications/charmap/lang/cs-CZ.rc +++ b/base/applications/charmap/lang/cs-CZ.rc @@ -1,6 +1,7 @@ /* FILE: applications/charmap/lang/cs-CZ.rc * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) * UPDATED: 2011-03-31 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT @@ -9,14 +10,14 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT "Psmo:", IDC_STATIC, 6, 7, 24, 9 + LTEXT "Písmo:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "Npovda", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "Nápovìda", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "Znaky ke zkoprovn:", IDC_STATIC, 6, 188, 66, 9 + LTEXT "Znaky ke zkopírování:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "Oznait", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "Koprovat", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + DEFPUSHBUTTON "Oznaèit", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "Kopírovat", IDC_COPY, 242, 186, 44, 13, WS_DISABLED CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -36,12 +37,12 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "O programu Mapa znak" +CAPTION "O programu Mapa znakù" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Mapa znak v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "Zavt", IDOK, 75, 162, 44, 15 + LTEXT "Mapa znakù v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "Zavøít", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END diff --git a/base/applications/charmap/lang/de-DE.rc b/base/applications/charmap/lang/de-DE.rc index d1feda73713..d1b083bf1f7 100644 --- a/base/applications/charmap/lang/de-DE.rc +++ b/base/applications/charmap/lang/de-DE.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL IDD_CHARMAP DIALOGEX 6, 6, 292, 224 @@ -10,7 +12,7 @@ BEGIN CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 LTEXT "Zeichenaus&wahl:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "&Auswhlen", IDC_SELECT, 194, 186, 44, 13 + DEFPUSHBUTTON "&Auswählen", IDC_SELECT, 194, 186, 44, 13 PUSHBUTTON "&Kopieren", IDC_COPY, 242, 186, 44, 13, WS_DISABLED CONTROL "&Erweiterte Ansicht",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -31,19 +33,19 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "ber Zeichentabelle" +CAPTION "Über Zeichentabelle" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN LTEXT "Zeichentabelle v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "Schlieen", IDOK, 75, 162, 44, 15 + PUSHBUTTON "Schließen", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Dieses Programm ist kostenlos; Sie knnen es frei verteilen mit od. ohne nderungen unter der GNU Lesser General Public License wie es von der Free Software Foundation verffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine sptere Version (ihrer Wahl).\r\n\r\nThis 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.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "&ber..." + IDS_LICENSE "Dieses Programm ist kostenlos; Sie können es frei verteilen mit od. ohne Änderungen unter der GNU Lesser General Public License wie es von der Free Software Foundation veröffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine spätere Version (ihrer Wahl).\r\n\r\nThis 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.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_ABOUT "Ü&ber..." IDS_TITLE "Zeichentabelle" END diff --git a/base/applications/charmap/lang/el-GR.rc b/base/applications/charmap/lang/el-GR.rc index 46fa157868a..bc944db50a1 100644 --- a/base/applications/charmap/lang/el-GR.rc +++ b/base/applications/charmap/lang/el-GR.rc @@ -1,19 +1,21 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_GREEK, SUBLANG_DEFAULT IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT " :",IDC_STATIC,6,7,60,9 + LTEXT "Γραμματοσειρά :",IDC_STATIC,6,7,60,9 COMBOBOX IDC_FONTCOMBO,65,5,181,210,CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL - PUSHBUTTON "",IDC_CMHELP,249,5,35,13 + PUSHBUTTON "Βοήθεια",IDC_CMHELP,249,5,35,13 CONTROL "",IDC_FONTMAP,"FontMapWnd",WS_VSCROLL | WS_TABSTOP,20, 22,266,156 - LTEXT " :",IDC_STATIC,6,184,66,17 + LTEXT "Χαρακτήρες προς αντιγραφή :",IDC_STATIC,6,184,66,17 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "",IDC_SELECT,194,186,44,13 - PUSHBUTTON "",IDC_COPY,242,186,44,13,WS_DISABLED + DEFPUSHBUTTON "Επιλογή",IDC_SELECT,194,186,44,13 + PUSHBUTTON "Αντιγραφή",IDC_COPY,242,186,44,13,WS_DISABLED CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -34,12 +36,12 @@ END IDD_ABOUTBOX DIALOGEX 22, 16, 210, 182 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Πληροφορίες" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT " v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", + LTEXT "Πίνακας χαρακτήρων v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC,48,7,150,36 - PUSHBUTTON "",IDOK,75,162,44,15 + PUSHBUTTON "Κλείσημο",IDOK,75,162,44,15 ICON 100,IDC_STATIC,10,10,7,30 EDITTEXT IDC_LICENSE_EDIT,8,44,194,107,ES_MULTILINE | ES_READONLY | WS_VSCROLL @@ -48,6 +50,6 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "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.\r\n\r\nThis 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.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "&..." + IDS_ABOUT "&Πληροφορίες..." IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/es-ES.rc b/base/applications/charmap/lang/es-ES.rc index a15d8b3fe70..b45467223e9 100644 --- a/base/applications/charmap/lang/es-ES.rc +++ b/base/applications/charmap/lang/es-ES.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL IDD_CHARMAP DIALOGEX 6, 6, 292, 224 diff --git a/base/applications/charmap/lang/fr-FR.rc b/base/applications/charmap/lang/fr-FR.rc index 910b6df3746..fe9d61076ed 100644 --- a/base/applications/charmap/lang/fr-FR.rc +++ b/base/applications/charmap/lang/fr-FR.rc @@ -8,9 +8,9 @@ BEGIN COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Aide", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "Caractres copier :", IDC_STATIC, 6, 188, 66, 9 + LTEXT "Caractères à copier :", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "Slectionner", IDC_SELECT, 194, 186, 44, 13 + DEFPUSHBUTTON "Sélectionner", IDC_SELECT, 194, 186, 44, 13 PUSHBUTTON "Copier", IDC_COPY, 242, 186, 44, 13, WS_DISABLED CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -31,11 +31,11 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION " propos de la Table des Caractres" +CAPTION "À propos de la Table des Caractères" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Table des Caractres v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + LTEXT "Table des Caractères v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 PUSHBUTTON "Fermer", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -43,7 +43,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publie par la Free Software Foundation; dans sa version 2 (ou selon votre prfrence) toute version ultrieure.\r\n\r\nCe programme est distribu dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans mme une garantie implicite de COMMERCIABILIT ou DE CONFORMIT UNE UTILISATION PARTICULIRE. \r\n\r\nVoir la Licence Publique Gnrale GNU pour plus de dtails. Vous devriez avoir reu un exemplaire de la Licence Publique Gnrale GNU avec ce programme ; si ce n'est pas le cas, crivez la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT " propos..." + IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiée par la Free Software Foundation; dans sa version 2 (ou selon votre préférence) toute version ultérieure.\r\n\r\nCe programme est distribué dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ À UNE UTILISATION PARTICULIÈRE. \r\n\r\nVoir la Licence Publique Générale GNU pour plus de détails. Vous devriez avoir reçu un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_ABOUT "À propos..." IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/it-IT.rc b/base/applications/charmap/lang/it-IT.rc index e4a66dea8f1..2366b8dc5ed 100644 --- a/base/applications/charmap/lang/it-IT.rc +++ b/base/applications/charmap/lang/it-IT.rc @@ -43,7 +43,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE, "Questo programma software libero; pu redistribuirlo e/o modificarlo sotto\ni termini della licenza pubblica GNU come pubblicata dalla Free Software Foundation; sia la versione 2 sia una versione successiva (a sua scelta).\r\n\r\nQuesto programma distribuito\nnella speranza che sia utile, ma SENZA ALCUNA GARANZIA; senza neanche la garanzia implicita\ndi NEGOZIABILITA' o APPLICABILITA' per un particolare scopo. Si veda la licenza generale pubblica GNU per maggiori dettagli.\r\n\r\nDovrebbe aver ricevuto una copia assieme a questo programma; se cos non fosse, scriva alla Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE, "Questo programma è software libero; può redistribuirlo e/o modificarlo sotto\ni termini della licenza pubblica GNU come pubblicata dalla Free Software Foundation; sia la versione 2 sia una versione successiva (a sua scelta).\r\n\r\nQuesto programma è distribuito\nnella speranza che sia utile, ma SENZA ALCUNA GARANZIA; senza neanche la garanzia implicita\ndi NEGOZIABILITA' o APPLICABILITA' per un particolare scopo. Si veda la licenza generale pubblica GNU per maggiori dettagli.\r\n\r\nDovrebbe aver ricevuto una copia assieme a questo programma; se così non fosse, scriva alla Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&Informazioni su..." IDS_TITLE "Mappa caratteri" END diff --git a/base/applications/charmap/lang/ja-JP.rc b/base/applications/charmap/lang/ja-JP.rc index b97f0a48f5c..de781319872 100644 --- a/base/applications/charmap/lang/ja-JP.rc +++ b/base/applications/charmap/lang/ja-JP.rc @@ -1,17 +1,19 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 9,"MS UI Gothic",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT "tHg:", IDC_STATIC, 6, 7, 24, 9 + LTEXT "フォント:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "wv", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "ヘルプ", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "Rs[镶:", IDC_STATIC, 6, 188, 66, 9 + LTEXT "コピーする文字:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "I", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "Rs[", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + DEFPUSHBUTTON "選択", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "コピー", IDC_COPY, 242, 186, 44, 13, WS_DISABLED CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -31,12 +33,12 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "R[h\\ɂ‚" +CAPTION "文字コード表について" FONT 9,"MS UI Gothic",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "R[h\\ v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "‚", IDOK, 75, 162, 44, 15 + LTEXT "文字コード表 v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "閉じる", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END @@ -44,6 +46,6 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "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.\r\n\r\nThis 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.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "o[W(&B)..." + IDS_ABOUT "バージョン情報(&B)..." IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/ko-KR.rc b/base/applications/charmap/lang/ko-KR.rc index a99a7f7ebc3..3dbfb184c49 100644 --- a/base/applications/charmap/lang/ko-KR.rc +++ b/base/applications/charmap/lang/ko-KR.rc @@ -1,20 +1,22 @@ /* - *Korean translation by manatails007(www.manatails007.org) + * Korean translation by manatails007(www.manatails007.org) + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT "۲:", IDC_STATIC, 6, 7, 24, 9 + LTEXT "글꼴:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "도움말", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT " :", IDC_STATIC, 6, 188, 66, 9 + LTEXT "복사할 문자:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + DEFPUSHBUTTON "선택", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "복사", IDC_COPY, 242, 186, 44, 13, WS_DISABLED CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -34,7 +36,7 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "ǥ Ͽ" +CAPTION "문자표에 대하여" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN @@ -47,6 +49,6 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "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.\r\n\r\nThis 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.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "(&A)" + IDS_ABOUT "정보(&A)" IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/lt-LT.rc b/base/applications/charmap/lang/lt-LT.rc index 67ba5fb1132..37c9e3b2d03 100644 --- a/base/applications/charmap/lang/lt-LT.rc +++ b/base/applications/charmap/lang/lt-LT.rc @@ -3,8 +3,9 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: base/applications/charmap/lang/lt-LT.rc * PURPOSE: Lithuanian Language File - * TRANSLATOR: Vytis "CMan" Girdijauskas (cman@cman.us) + * TRANSLATOR: Vytis "CMan" Girdþijauskas (cman@cman.us) * DATE: 2007-09-23 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT @@ -13,7 +14,7 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT "riftas:", IDC_STATIC, 6, 7, 24, 9 + LTEXT "Ðriftas:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Pagalba", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 @@ -40,12 +41,12 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "Apie simboli lentel" +CAPTION "Apie simboliø lentelæ" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Simboli lentel v0.1\n(C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "Uverti", IDOK, 83, 161, 44, 15 + LTEXT "Simboliø lentelë v0.1\n(C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "Uþverti", IDOK, 83, 161, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END diff --git a/base/applications/charmap/lang/no-NO.rc b/base/applications/charmap/lang/no-NO.rc index 67ff7c9c102..7a003b16c92 100644 --- a/base/applications/charmap/lang/no-NO.rc +++ b/base/applications/charmap/lang/no-NO.rc @@ -8,7 +8,7 @@ BEGIN COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Hjelp", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "Kopier flgende tegn:", IDC_STATIC, 6, 188, 66, 9 + LTEXT "Kopier følgende tegn:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 DEFPUSHBUTTON "Velg", IDC_SELECT, 194, 186, 44, 13 PUSHBUTTON "Kopier", IDC_COPY, 242, 186, 44, 13, WS_DISABLED @@ -43,7 +43,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i hp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORML. Se p GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i håp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORMÅL. Se på GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "O&m..." IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/pl-PL.rc b/base/applications/charmap/lang/pl-PL.rc index ab354758d78..35c7b74ea65 100644 --- a/base/applications/charmap/lang/pl-PL.rc +++ b/base/applications/charmap/lang/pl-PL.rc @@ -1,9 +1,10 @@ /* -* translated by xrogers -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -* updated by Olaf Siejka (May, 2011) -*/ + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * updated by Olaf Siejka (May, 2011) + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -26,9 +27,9 @@ IDD_ADVANCED DIALOGEX 0, 0, 292, 64 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Zestaw znakw:",IDC_STATIC,8,8,48,8 + LTEXT "Zestaw znaków:",IDC_STATIC,8,8,48,8 COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Grupowanie wedug:",IDC_STATIC,8,28,50,8 + LTEXT "Grupowanie według:",IDC_STATIC,8,28,50,8 COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Szukaj",IDC_BUTTON_SEARCH,200,44,50,14 EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL @@ -38,11 +39,11 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "Informacje o tablicy znakw" +CAPTION "Informacje o tablicy znaków" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Tablica znakw v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + LTEXT "Tablica znaków v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 PUSHBUTTON "Zamknij", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -50,7 +51,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; moesz go rozprowadza dalej i/lub modyfikowa na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundacj Wolnego Oprogramowania - wedug wersji 2 tej Licencji lub (wedug twojego wyboru) ktrej z pniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadziej, i bdzie on uyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domylnej gwarancji PRZYDATNOCI HANDLOWEJ albo PRZYDATNOCI DO OKRELONYCH ZASTOSOWA. W celu uzyskania bliszych informacji signij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnoci wraz z niniejszym programem otrzymae te egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKRESLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&O programie..." - IDS_TITLE "Tablica znakw" + IDS_TITLE "Tablica znaków" END diff --git a/base/applications/charmap/lang/pt-BR.rc b/base/applications/charmap/lang/pt-BR.rc index c3046153c3f..bdc2f1dc29a 100644 --- a/base/applications/charmap/lang/pt-BR.rc +++ b/base/applications/charmap/lang/pt-BR.rc @@ -1,3 +1,5 @@ +/* UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ + LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL IDD_CHARMAP DIALOGEX 6, 6, 292, 224 @@ -43,7 +45,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Este programa software livre; voc pode redistribu-lo e/ou modific-lo sob os termos da GNU General Public License conforme publicada pela Free Software Foundation; quer a verso 2 da licena, ou (conforme voc escolha) qualquer verso posterior.\r\n\r\nEste programa distribudo com a esperana de que seja til, mas SEM QUALQUER GARANTIA; mesmo sem a garantia implcita de MERCANTIBILIDADE OU ADEQUAO A UM DETERMINADO PROPSITO. Para mais detalhes, veja a GNU General Public License.\r\n\r\nVoc deve ter recebido uma cpia da GNU General Public License juntamente com este programa; caso contrrio, escreva para a Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da GNU General Public License conforme publicada pela Free Software Foundation; quer a versão 2 da licença, ou (conforme você escolha) qualquer versão posterior.\r\n\r\nEste programa é distribuído com a esperança de que seja útil, mas SEM QUALQUER GARANTIA; mesmo sem a garantia implícita de MERCANTIBILIDADE OU ADEQUAÇÃO A UM DETERMINADO PROPÓSITO. Para mais detalhes, veja a GNU General Public License.\r\n\r\nVocê deve ter recebido uma cópia da GNU General Public License juntamente com este programa; caso contrário, escreva para a Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." IDS_ABOUT "So&bre..." IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/ru-RU.rc b/base/applications/charmap/lang/ru-RU.rc index c52593abcb1..f5e24751a64 100644 --- a/base/applications/charmap/lang/ru-RU.rc +++ b/base/applications/charmap/lang/ru-RU.rc @@ -6,46 +6,46 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT ":", IDC_STATIC, 6, 7, 27, 9 + LTEXT "Шрифт:", IDC_STATIC, 6, 7, 27, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "Справка", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT " :", IDC_STATIC, 6, 188, 95, 9 + LTEXT "Копировать символ:", IDC_STATIC, 6, 188, 95, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "", IDC_COPY, 242, 186, 44, 13, WS_DISABLED - CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 + DEFPUSHBUTTON "Выбрать", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "Копировать", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + CONTROL "Расширенный вид",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END IDD_ADVANCED DIALOGEX 0, 0, 292, 64 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Charset:",IDC_STATIC,8,8,48,8 + LTEXT "Набор символов:",IDC_STATIC,8,8,55,8 COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Group by:",IDC_STATIC,8,28,50,8 + LTEXT "Группировать за:",IDC_STATIC,8,28,50,8 COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14 + PUSHBUTTON "Найти",IDC_BUTTON_SEARCH,200,44,50,14 EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL - LTEXT "Search for:",IDC_STATIC,8,48,42,8 - LTEXT "Unicode:",IDC_STATIC,200,8,30,8 + LTEXT "Искать:",IDC_STATIC,8,48,42,8 + LTEXT "Юникод:",IDC_STATIC,200,8,30,8 EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION " " +CAPTION "О Таблице символов" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT " v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "Таблица символов v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "Закрыть", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE " ; () , GNU, ; 2 , ( ) , .\r\n\r\n , , - , . GNU.\r\n\r\n GNU, , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "& ..." - IDS_TITLE "Character Map" + IDS_LICENSE "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_ABOUT "&О программе..." + IDS_TITLE "Таблица символов" END diff --git a/base/applications/charmap/lang/sk-SK.rc b/base/applications/charmap/lang/sk-SK.rc index 868f97e72ba..9e4b31f804d 100644 --- a/base/applications/charmap/lang/sk-SK.rc +++ b/base/applications/charmap/lang/sk-SK.rc @@ -2,9 +2,10 @@ * PROJECT: Character Map * FILE: base/applications/charmap/lang/sk-SK.rc * PURPOSE: Slovak Language File for charmap - * TRANSLATOR: Kario (kario@szm.sk) /Mrio Kamr/ + * TRANSLATOR: Kario (kario@szm.sk) /Mário Kačmár/ * DATE OF TR.: 24-07-2007 * LAST CHANGE: 29-08-2008 + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT @@ -13,14 +14,14 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT "Ps&mo:", IDC_STATIC, 6, 7, 24, 9 + LTEXT "Pís&mo:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "&Pomocnk", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "&Pomocník", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "Koprova &znaky:", IDC_STATIC, 6, 188, 66, 9 + LTEXT "Kopírovať &znaky:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "&Vybra", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "&Koprova", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + DEFPUSHBUTTON "&Vybrať", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "&Kopírovať", IDC_COPY, 242, 186, 44, 13, WS_DISABLED CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END @@ -40,19 +41,19 @@ BEGIN END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "o je Mapa znakov" +CAPTION "Čo je Mapa znakov" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN LTEXT "Mapa znakov v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "&Zavrie", IDOK, 75, 162, 44, 15 + PUSHBUTTON "&Zavrieť", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE, "Tento program je von softvr; mete ho ri a/alebo modifikova poda podmienok GNU Veobecnej verejnej licencie (GNU General Public License) ako bola zverejnen nadciou Free Software Foundation; bu verzie 2 tejto licencie, alebo (poda Vho uvenia) niektorej neskorej verzie.\r\n\r\nTento program je distribuovan v ndeji, e bude uiton, avak BEZ AKEJKOVEK ZRUKY; rovnako bez zruky PREDAJNOSTI alebo VHODNOSTI PRE URIT EL. Pre viac detailov si pozrite GNU Veobecn verejn licenciu (GNU General Public License).\r\n\r\nKpiu Veobecnej verejnej licencie GNU ste mali dosta spolu s tmto programom; ak nie, napte si o u na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "&o je Mapa znakov" + IDS_LICENSE, "Tento program je voľný softvér; môžete ho šíriť a/alebo modifikovať podľa podmienok GNU Všeobecnej verejnej licencie (GNU General Public License) ako bola zverejnená nadáciou Free Software Foundation; buď verzie 2 tejto licencie, alebo (podľa Vášho uváženia) niektorej neskoršej verzie.\r\n\r\nTento program je distribuovaný v nádeji, že bude užitočný, avšak BEZ AKEJKOĽVEK ZÁRUKY; rovnako bez záruky PREDAJNOSTI alebo VHODNOSTI PRE URČITÝ ÚČEL. Pre viac detailov si pozrite GNU Všeobecnú verejnú licenciu (GNU General Public License).\r\n\r\nKópiu Všeobecnej verejnej licencie GNU ste mali dostať spolu s týmto programom; ak nie, napíšte si o ňu na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_ABOUT "Č&o je Mapa znakov" IDS_TITLE "Character Map" END diff --git a/base/applications/charmap/lang/sv-SE.rc b/base/applications/charmap/lang/sv-SE.rc index bd5da0a1a24..5ac57e01c78 100644 --- a/base/applications/charmap/lang/sv-SE.rc +++ b/base/applications/charmap/lang/sv-SE.rc @@ -1,41 +1,43 @@ /* - * PROJECT: ReactOS RAPPS - * FILE: \base\applications\charmap\lang\sv-SE.rc - * PURPOSE: Swedish resource file - * Translation: Jaix Bly + * PROJECT: ReactOS RAPPS + * FILE: base\applications\charmap\lang\sv-SE.rc + * PURPOSE: Swedish resource file + * TRANSLATOR: Jaix Bly + * UTF-8 Conversion: Elton Chung aka MfldElton (June, 2011) */ - LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL + +LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233 -CAPTION "Teckenuppsttning" +CAPTION "Teckenuppsättning" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX BEGIN LTEXT "Typsnitt:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "Hjlp", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "Hjälp", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 LTEXT "Kopiera tecken:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "Vlj", IDC_SELECT, 194, 186, 44, 13 + DEFPUSHBUTTON "Välj", IDC_SELECT, 194, 186, 44, 13 PUSHBUTTON "Kopiera", IDC_COPY, 242, 186, 44, 13, WS_DISABLED //AUTOCHECKBOX "Avansert visning", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD | WS_VISIBLE | WS_TABSTOP //EDITTEXT IDC_DISPLAY, 8, 217, 278, 13, WS_VISIBLE | WS_TABSTOP | ES_READONLY END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "Om Teckenuppsttning" +CAPTION "Om Teckenuppsättning" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Teckenuppsttning v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "Stng", IDOK, 75, 162, 44, 15 + LTEXT "Teckenuppsättning v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "Stäng", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Detta programmet r fri programvara; du kan distribuera det och/eller ndra det under villkoren enligt GNU General Public License som r utgivet av Free Software Foundation; version 2, eller (om du s nskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne anvndas, men DET FINNS INGA GARANTIER; ven utan underfrstdd garanti om SLJBARHET eller LMPLIGHET FR ETT VISST NDAML. Se p GNU General Public Licensen fr mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har ftt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Detta programmet är fri programvara; du kan distribuera det och/eller ändra det under villkoren enligt GNU General Public License som är utgivet av Free Software Foundation; version 2, eller (om du så önskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne användas, men DET FINNS INGA GARANTIER; även utan underförstådd garanti om SÄLJBARHET eller LÄMPLIGHET FÖR ETT VISST ÄNDAMÅL. Se på GNU General Public Licensen för mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har fått det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "O&m..." END diff --git a/base/applications/charmap/lang/uk-UA.rc b/base/applications/charmap/lang/uk-UA.rc index a76da186bec..fc75d02978c 100644 --- a/base/applications/charmap/lang/uk-UA.rc +++ b/base/applications/charmap/lang/uk-UA.rc @@ -12,46 +12,46 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT " :", IDC_STATIC, 6, 7, 24, 9 + LTEXT "Шрифт :", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "Довідка", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT " :", IDC_STATIC, 6, 188, 66, 9 + LTEXT "Для копіювання :", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "", IDC_COPY, 242, 186, 44, 13, WS_DISABLED - CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 + DEFPUSHBUTTON "Вибрати", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "Копіювати", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + CONTROL "Розширений вигляд",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END IDD_ADVANCED DIALOGEX 0, 0, 292, 64 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Charset:",IDC_STATIC,8,8,48,8 + LTEXT "Набір символів:",IDC_STATIC,8,8,55,8 COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Group by:",IDC_STATIC,8,28,50,8 + LTEXT "Групувати за:",IDC_STATIC,8,28,50,8 COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14 + PUSHBUTTON "Знайти",IDC_BUTTON_SEARCH,200,44,50,14 EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL - LTEXT "Search for:",IDC_STATIC,8,48,42,8 - LTEXT "Unicode:",IDC_STATIC,200,8,30,8 + LTEXT "Шукати:",IDC_STATIC,8,48,42,8 + LTEXT "Юнікод:",IDC_STATIC,200,8,30,8 EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION " ..." +CAPTION "Про програму..." FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT " v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "Таблиця символів v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "Закрити", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE " - ; , ³ GNU, ; 2 , - , .\r\n\r\n 䳿 , , - Ҳ, Ҳ Ҳ Ҳ . ³ GNU.\r\n\r\n ³ GNU. , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." - IDS_ABOUT "& ..." - IDS_TITLE "Character Map" + IDS_LICENSE "Таблиця символів - вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_ABOUT "&Про програму..." + IDS_TITLE "Таблиця Cимволів" END diff --git a/base/applications/charmap/lang/zh-CN.rc b/base/applications/charmap/lang/zh-CN.rc index 7385d597667..350b601d5b1 100644 --- a/base/applications/charmap/lang/zh-CN.rc +++ b/base/applications/charmap/lang/zh-CN.rc @@ -1,4 +1,10 @@ -// Chinese (Simplified) language resource file (Elton Chung, elton328@gmail.com) +/* + * PROJECT: ReactOS Character Map + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/applications/charmap/lang/zh-CN.rc + * PURPOSE: Chinese (Simplified) Language File for charmap + * TRANSLATOR: Elton Chung + */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -6,39 +12,39 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT ":", IDC_STATIC, 6, 7, 24, 9 + LTEXT "字体:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "˵", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "说明", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "Ƶַ:", IDC_STATIC, 6, 188, 66, 9 + LTEXT "待复制的字符:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "ѡ", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "", IDC_COPY, 242, 186, 44, 13, WS_DISABLED - CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 + DEFPUSHBUTTON "选择", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "复制", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + CONTROL "高级查看",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END IDD_ADVANCED DIALOGEX 0, 0, 292, 64 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Charset:",IDC_STATIC,8,8,48,8 + LTEXT "字符集:",IDC_STATIC,8,8,48,8 COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Group by:",IDC_STATIC,8,28,50,8 + LTEXT "分组:",IDC_STATIC,8,28,50,8 COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14 + PUSHBUTTON "搜索",IDC_BUTTON_SEARCH,200,44,50,14 EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL - LTEXT "Search for:",IDC_STATIC,8,48,42,8 - LTEXT "Unicode:",IDC_STATIC,200,8,30,8 + LTEXT "搜索目标:",IDC_STATIC,8,48,42,8 + LTEXT "到 Unicode:",IDC_STATIC,200,8,30,8 EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "ַ" +CAPTION "关于字符映射表" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "ַ v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "ر", IDOK, 75, 162, 44, 15 + LTEXT "字符映射表 v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "关闭", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END @@ -46,6 +52,6 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "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.\r\n\r\nThis 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.\r\n\r\nYou 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." - IDS_ABOUT "(&A)..." - IDS_TITLE "Character Map" + IDS_ABOUT "关于(&A)..." + IDS_TITLE "字符映射表" END diff --git a/base/applications/charmap/lang/zh-TW.rc b/base/applications/charmap/lang/zh-TW.rc index 5bb325887ba..528ba5b245e 100644 --- a/base/applications/charmap/lang/zh-TW.rc +++ b/base/applications/charmap/lang/zh-TW.rc @@ -1,4 +1,10 @@ -// Chinese (Traditional) language resource file (Elton Chung, elton328@gmail.com) +/* + * PROJECT: ReactOS Character Map + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/applications/charmap/lang/zh-TW.rc + * PURPOSE: Chinese (Traditional) Language File for charmap + * TRANSLATOR: Elton Chung + */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL @@ -6,39 +12,39 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE BEGIN - LTEXT "rG", IDC_STATIC, 6, 7, 24, 9 + LTEXT "字體:", IDC_STATIC, 6, 7, 24, 9 COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS - PUSHBUTTON "", IDC_CMHELP, 249, 5, 35, 13 + PUSHBUTTON "說明", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156 - LTEXT "ݽƻsršG", IDC_STATIC, 6, 188, 66, 9 + LTEXT "待複製的字元:", IDC_STATIC, 6, 188, 66, 9 CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13 - DEFPUSHBUTTON "", IDC_SELECT, 194, 186, 44, 13 - PUSHBUTTON "ƻs", IDC_COPY, 242, 186, 44, 13, WS_DISABLED - CONTROL "Advanced view",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 + DEFPUSHBUTTON "選擇", IDC_SELECT, 194, 186, 44, 13 + PUSHBUTTON "複製", IDC_COPY, 242, 186, 44, 13, WS_DISABLED + CONTROL "進階檢視",IDC_CHECK_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 8, 208, 95, 10 END IDD_ADVANCED DIALOGEX 0, 0, 292, 64 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Charset:",IDC_STATIC,8,8,48,8 + LTEXT "字元集:",IDC_STATIC,8,8,48,8 COMBOBOX IDC_COMBO_CHARSET,72,4,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Group by:",IDC_STATIC,8,28,50,8 + LTEXT "分組:",IDC_STATIC,8,28,50,8 COMBOBOX IDC_COMBO_GROUPBY,72,24,116,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Search",IDC_BUTTON_SEARCH,200,44,50,14 + PUSHBUTTON "搜尋",IDC_BUTTON_SEARCH,200,44,50,14 EDITTEXT IDC_EDIT_SEARCH,72,44,116,14,ES_AUTOHSCROLL - LTEXT "Search for:",IDC_STATIC,8,48,42,8 - LTEXT "Unicode:",IDC_STATIC,200,8,30,8 + LTEXT "搜尋目標:",IDC_STATIC,8,48,42,8 + LTEXT "到 Unicode:",IDC_STATIC,200,8,30,8 EDITTEXT IDC_EDIT_UNICODE,236,4,28,12,ES_AUTOHSCROLL END IDD_ABOUTBOX DIALOGEX 22,16,210,182 -CAPTION "rŪ" +CAPTION "關於字元對應表" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "rŪ v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "字元對應表 v0.1\nCopyright (C) 2007 Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "關閉", IDOK, 75, 162, 44, 15 ICON IDI_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END @@ -46,6 +52,6 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_LICENSE "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.\r\n\r\nThis 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.\r\n\r\nYou 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." - IDS_ABOUT "(&A)..." - IDS_TITLE "Character Map" + IDS_ABOUT "關於(&A)..." + IDS_TITLE "字元對應表" END diff --git a/base/applications/charmap/map.c b/base/applications/charmap/map.c index 8cbda5af59f..8104ce2679c 100644 --- a/base/applications/charmap/map.c +++ b/base/applications/charmap/map.c @@ -61,53 +61,76 @@ DrawActiveCell(PMAP infoPtr, static VOID DrawGrid(PMAP infoPtr, - HDC hdc) + PAINTSTRUCT *ps) { INT x, y; + RECT rc; + PCELL Cell; for (y = 0; y < YCELLS; y++) for (x = 0; x < XCELLS; x++) { - Rectangle(hdc, - infoPtr->Cells[y][x].CellExt.left, - infoPtr->Cells[y][x].CellExt.top, - infoPtr->Cells[y][x].CellExt.right, - infoPtr->Cells[y][x].CellExt.bottom); - } + Cell = &infoPtr->Cells[y][x]; - if (infoPtr->pActiveCell) - DrawActiveCell(infoPtr, - hdc); + if (!IntersectRect(&rc, + &ps->rcPaint, + &Cell->CellExt)) + { + continue; + } + + Rectangle(ps->hdc, + Cell->CellExt.left, + Cell->CellExt.top, + Cell->CellExt.right, + Cell->CellExt.bottom); + + if (infoPtr->pActiveCell == Cell) + { + DrawActiveCell(infoPtr, ps->hdc); + } + } } static VOID FillGrid(PMAP infoPtr, - HDC hdc) + PAINTSTRUCT *ps) { HFONT hOldFont; WCHAR ch; INT x, y; + RECT rc; + PCELL Cell; - hOldFont = SelectObject(hdc, + hOldFont = SelectObject(ps->hdc, infoPtr->hFont); for (y = 0; y < YCELLS; y++) for (x = 0; x < XCELLS; x++) { + Cell = &infoPtr->Cells[y][x]; + + if (!IntersectRect(&rc, + &ps->rcPaint, + &Cell->CellExt)) + { + continue; + } + ch = (WCHAR)((XCELLS * (y + infoPtr->iYStart)) + x); - TagFontToCell(&infoPtr->Cells[y][x], ch); + TagFontToCell(Cell, ch); - DrawTextW(hdc, + DrawTextW(ps->hdc, &ch, 1, - &infoPtr->Cells[y][x].CellInt, + &Cell->CellInt, DT_CENTER | DT_VCENTER | DT_SINGLELINE); } - SelectObject(hdc, + SelectObject(ps->hdc, hOldFont); } @@ -187,6 +210,10 @@ SetFont(PMAP infoPtr, { HDC hdc; + /* Destroy Zoom window, since it was created with older font */ + DestroyWindow(infoPtr->hLrgWnd); + infoPtr->hLrgWnd = NULL; + if (infoPtr->hFont) DeleteObject(infoPtr->hFont); @@ -207,6 +234,13 @@ SetFont(PMAP infoPtr, InvalidateRect(infoPtr->hMapWnd, NULL, TRUE); + + /* Test if zoom window must be reopened */ + if (infoPtr->pActiveCell != NULL && + infoPtr->pActiveCell->bLarge) + { + CreateLargeCell(infoPtr); + } } @@ -391,6 +425,11 @@ OnVScroll(PMAP infoPtr, iYDiff = iOldYStart - infoPtr->iYStart; if (iYDiff) { + if (infoPtr->hLrgWnd != NULL) + { + ShowWindow(infoPtr->hLrgWnd, SW_HIDE); + } + SetScrollPos(infoPtr->hMapWnd, SB_VERT, infoPtr->iYStart, @@ -417,6 +456,11 @@ OnVScroll(PMAP infoPtr, NULL, TRUE); } + + if (infoPtr->hLrgWnd != NULL) + { + ShowWindow(infoPtr->hLrgWnd, SW_SHOW); + } } } @@ -450,11 +494,9 @@ OnPaint(PMAP infoPtr, } } - DrawGrid(infoPtr, - hdc); + DrawGrid(infoPtr, &ps); - FillGrid(infoPtr, - hdc); + FillGrid(infoPtr, &ps); if (wParam == 0) { diff --git a/base/applications/charmap/rsrc.rc b/base/applications/charmap/rsrc.rc index 9d902e47f02..99007f8dc9f 100644 --- a/base/applications/charmap/rsrc.rc +++ b/base/applications/charmap/rsrc.rc @@ -1,24 +1,20 @@ -#include -#include "resource.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -IDI_ICON ICON "res/charmap.ico" +#include "lang/en-US.rc" +#include "lang/id-ID.rc" +#include "lang/nl-NL.rc" +// UTF-8 +#pragma code_page(65001) #include "lang/bg-BG.rc" #include "lang/ca-ES.rc" #include "lang/cs-CZ.rc" #include "lang/de-DE.rc" #include "lang/el-GR.rc" -#include "lang/en-US.rc" #include "lang/es-ES.rc" #include "lang/fr-FR.rc" -#include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/ko-KR.rc" #include "lang/lt-LT.rc" -#include "lang/nl-NL.rc" #include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/pt-BR.rc" diff --git a/base/applications/cmdutils/doskey/doskey.c b/base/applications/cmdutils/doskey/doskey.c index 986a3aa652c..5a73dc07f94 100644 --- a/base/applications/cmdutils/doskey/doskey.c +++ b/base/applications/cmdutils/doskey/doskey.c @@ -209,7 +209,7 @@ wmain(VOID) pExpungeConsoleCommandHistoryW = (ExpungeConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "ExpungeConsoleCommandHistoryW"); assert(pGetConsoleCommandHistoryW && pGetConsoleCommandHistoryLengthW && - pSetConsoleNumberOfCommandsW && pSetConsoleNumberOfCommandsW); + pSetConsoleNumberOfCommandsW && pExpungeConsoleCommandHistoryW); /* Skip the application name */ GetArg(&pArgStart, &pArgEnd); diff --git a/base/applications/cmdutils/doskey/doskey.rc b/base/applications/cmdutils/doskey/doskey.rc index 80cb5baea6b..bc50e30b439 100644 --- a/base/applications/cmdutils/doskey/doskey.rc +++ b/base/applications/cmdutils/doskey/doskey.rc @@ -1,14 +1,17 @@ +#include +#include "doskey.h" + #define REACTOS_STR_FILE_DESCRIPTION "W32 doskey command\0" #define REACTOS_STR_INTERNAL_NAME "doskey\0" #define REACTOS_STR_ORIGINAL_FILENAME "doskey.exe\0" #include -#include -#include "doskey.h" - #include "lang/bg-BG.rc" #include "lang/de-DE.rc" #include "lang/en-US.rc" -#include "lang/pl-PL.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/cmdutils/doskey/lang/pl-PL.rc b/base/applications/cmdutils/doskey/lang/pl-PL.rc index f1f3715a164..ca54cc2febe 100644 --- a/base/applications/cmdutils/doskey/lang/pl-PL.rc +++ b/base/applications/cmdutils/doskey/lang/pl-PL.rc @@ -1,34 +1,35 @@ /* - * translated by Saibamen - Adam Stachowicz (Apr,2011) - * Use ReactOS forum PM, IRC or saibamenppl at gmail.com to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl + * translated by Saibamen - Adam Stachowicz (Apr,2011) + * Use ReactOS forum PM, IRC or saibamenppl at gmail.com to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) */ - + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, "Zarzdza ustawieniami linii komend, historii i makr.\n\ +IDS_HELP, "Zarządza ustawieniami linii komend, historii i makr.\n\ \n\ DOSKEY [/INSERT | /OVERSTRIKE] [/EXENAME=exe] [/HISTORY] [/LISTSIZE=rozmiar]\n\ [/REINSTALL] [/MACROS[:exe | :ALL]] [/MACROFILE=plik] [macroname=[tekst]]\n\ \n\ - /INSERT Wcza tryb wstawiania tekstu.\n\ - /OVERSTRIKE Wycza tryb nadpisywania tekstu.\n\ - /EXENAME=exename Ustawia nazw programu do przegldania/zmiany historii\n\ - i makra. Domylnie jest to cmd.exe.\n\ - /HISTORY Wywietla histori komend.\n\ - /LISTSIZE=rozmiar Ustawia ilo wywietlanych komend dla buforu historii.\n\ - /REINSTALL Czyci histori komend.\n\ - /MACROS Wywietla definicje makro.\n\ - /MACROS:exename Wywietla definicje makro dla okrelonego programu.\n\ - /MACROS:ALL Wywietla definicje makro dla wszystkich programw.\n\ - /MACROFILE=plik aduje definicje makro z pliku.\n\ + /INSERT Włącza tryb wstawiania tekstu.\n\ + /OVERSTRIKE Wyłącza tryb nadpisywania tekstu.\n\ + /EXENAME=exename Ustawia nazwę programu do przeglądania/zmiany historii\n\ + i makra. Domyślnie jest to cmd.exe.\n\ + /HISTORY Wyświetla historię komend.\n\ + /LISTSIZE=rozmiar Ustawia ilość wyświetlanych komend dla buforu historii.\n\ + /REINSTALL Czyści historię komend.\n\ + /MACROS Wyświetla definicje makro.\n\ + /MACROS:exename Wyświetla definicję makro dla określonego programu.\n\ + /MACROS:ALL Wyświetla definicje makro dla wszystkich programów.\n\ + /MACROFILE=plik Ładuje definicję makro z pliku.\n\ macroname Nazwa dla tworzonego makro.\n\ - tekst Okrela zastpczy tekst dla makro.\n" + tekst Określa zastępczy tekst dla makro.\n" -IDS_INVALID_MACRO_DEF, "Nieprawidowa definicja makro: %s\n" +IDS_INVALID_MACRO_DEF, "Nieprawidłowa definicja makro: %s\n" END diff --git a/base/applications/cmdutils/doskey/lang/uk-UA.rc b/base/applications/cmdutils/doskey/lang/uk-UA.rc index 3655d47f57d..1f320a97e21 100644 --- a/base/applications/cmdutils/doskey/lang/uk-UA.rc +++ b/base/applications/cmdutils/doskey/lang/uk-UA.rc @@ -11,25 +11,25 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_HELP, " , ii i.\n\ +IDS_HELP, "Менеджер командного рядка для редагування налаштувань, iсторiї та макросiв.\n\ \n\ DOSKEY [/INSERT | /OVERSTRIKE] [/EXENAME=exe] [/HISTORY] [/LISTSIZE=size]\n\ [/REINSTALL] [/MACROS[:exe | :ALL]] [/MACROFILE=file] [macroname=[text]]\n\ \n\ - /INSERT .\n\ - /OVERSTRIKE i .\n\ - /EXENAME=exename /i ii\n\ - i i. cmd.exe.\n\ - /HISTORY i ii .\n\ - /LISTSIZE=size ii ii.\n\ - /REINSTALL ii .\n\ - /MACROS i i.\n\ - /MACROS:exename i i .\n\ - /MACROS:ALL i i i .\n\ - /MACROFILE=filename i .\n\ - macroname ii .\n\ - text i i.\n" + /INSERT Включає режим вставки.\n\ + /OVERSTRIKE Вiдключає режим вставки.\n\ + /EXENAME=exename Встановлення назви програми для перегляду/змiни iсторiї\n\ + i макросiв. Значення за замовчуванням cmd.exe.\n\ + /HISTORY Вiдображення iсторiї команд.\n\ + /LISTSIZE=size Встановлення кiлькостi команд в буфері iсторiї.\n\ + /REINSTALL Очищення iсторiї команд.\n\ + /MACROS Вiдображення визначень макросiв.\n\ + /MACROS:exename Вiдображення визначень макросiв для конкретної програми.\n\ + /MACROS:ALL Вiдображення визначень макросiв для всiх програм.\n\ + /MACROFILE=filename Завантаження визначень макросiв з файлу.\n\ + macroname Визначення iменi макросу для створення.\n\ + text Визначення замiни тексту в макросi.\n" -IDS_INVALID_MACRO_DEF, "i : %s\n" +IDS_INVALID_MACRO_DEF, "Недiйсний макрос визначення: %s\n" END diff --git a/base/applications/cmdutils/find/CMakeLists.txt b/base/applications/cmdutils/find/CMakeLists.txt index f94e42eee18..11b838b6f9f 100644 --- a/base/applications/cmdutils/find/CMakeLists.txt +++ b/base/applications/cmdutils/find/CMakeLists.txt @@ -1,4 +1,3 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) add_executable(find find.c find.rc) diff --git a/base/applications/cmdutils/find/find.rc b/base/applications/cmdutils/find/find.rc index 623fccf399a..abbc2ab8333 100644 --- a/base/applications/cmdutils/find/find.rc +++ b/base/applications/cmdutils/find/find.rc @@ -1,5 +1,4 @@ /* $Id$ */ - #define REACTOS_STR_FILE_DESCRIPTION "W32 find command\0" #define REACTOS_STR_INTERNAL_NAME "find\0" #define REACTOS_STR_ORIGINAL_FILENAME "find.exe\0" diff --git a/base/applications/cmdutils/find/lang/pl-PL.rc b/base/applications/cmdutils/find/lang/pl-PL.rc index fca0184c805..a6411ae0f6c 100644 --- a/base/applications/cmdutils/find/lang/pl-PL.rc +++ b/base/applications/cmdutils/find/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Dec,2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,15 +11,15 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "FIND: Wywietla wszystkie linie danego pliku, zawierajce szukany cig znakw.\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] ""cig znakw"" [ plik... ]\n\ - /C Oblicza w ilu liniach pojawi si szukany cig znakw\n\ - /I Ignoruje wielko liter\n\ - /N Numeruje wywietlane linie, zaczynajc od 1\n\ - /V Wywietla te linie, ktre nie zawieraj szukanego cigu znakw" +IDS_USAGE, "FIND: Wyświetla wszystkie linie danego pliku, zawierające szukany ciąg znaków.\n\n\ + FIND [ /C ] [ /I ] [ /N ] [ /V ] ""ciąg znaków"" [ plik... ]\n\ + /C Oblicza w ilu liniach pojawił się szukany ciąg znaków\n\ + /I Ignoruje wielkość liter\n\ + /N Numeruje wyświetlane linie, zaczynając od 1\n\ + /V Wyświetla te linie, które nie zawierają szukanego ciągu znaków" -IDS_NO_SUCH_FILE, "FIND: %s: Plik nie zosta znaleziony\n" +IDS_NO_SUCH_FILE, "FIND: %s: Plik nie został znaleziony\n" -IDS_CANNOT_OPEN, "FIND: %s: Nie mona otworzy pliku\n" +IDS_CANNOT_OPEN, "FIND: %s: Nie można otworzyć pliku\n" END diff --git a/base/applications/cmdutils/find/lang/ru-RU.rc b/base/applications/cmdutils/find/lang/ru-RU.rc index 726ebec18e4..945555940b8 100644 --- a/base/applications/cmdutils/find/lang/ru-RU.rc +++ b/base/applications/cmdutils/find/lang/ru-RU.rc @@ -3,15 +3,15 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "FIND: .\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] """" [ ... ]\n\ - /C , .\n\ - /I .\n\ - /N ( 1).\n\ - /V , ." +IDS_USAGE, "FIND: Поиск текстовой строки в одном или нескольких файлах.\n\n\ + FIND [ /C ] [ /I ] [ /N ] [ /V ] ""строка"" [ файл... ]\n\ + /C Вывод только общего числа строк, содержащих заданную строку.\n\ + /I Поиск без учета регистра символов.\n\ + /N Вывод номеров отображаемых строк (начиная с 1).\n\ + /V Вывод всех строк, НЕ содержащих заданную строку." -IDS_NO_SUCH_FILE, "FIND: %s: .\n" +IDS_NO_SUCH_FILE, "FIND: %s: Файл не существует.\n" -IDS_CANNOT_OPEN, "FIND: %s: .\n" +IDS_CANNOT_OPEN, "FIND: %s: Невозможно открыть файл.\n" END diff --git a/base/applications/cmdutils/find/lang/uk-UA.rc b/base/applications/cmdutils/find/lang/uk-UA.rc index 43b241f33fd..7cef30daf65 100644 --- a/base/applications/cmdutils/find/lang/uk-UA.rc +++ b/base/applications/cmdutils/find/lang/uk-UA.rc @@ -11,15 +11,15 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "FIND: , .\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] """" [ ... ]\n\ - /C , \n\ - /I \n\ - /N , ( 1)\n\ - /V , " +IDS_USAGE, "FIND: Виведення всіх рядків файлу, які містять рядок.\n\n\ + FIND [ /C ] [ /I ] [ /N ] [ /V ] ""рядок"" [ файл... ]\n\ + /C Порахувати кількість рядків, які містять рядок\n\ + /I Не враховувати регістр символів\n\ + /N Нумерувати рядки, які відображаються (починаючи з 1)\n\ + /V Виведення рядків, які не містять заданий рядок" -IDS_NO_SUCH_FILE, "FIND: %s: \n" +IDS_NO_SUCH_FILE, "FIND: %s: Файл не існує\n" -IDS_CANNOT_OPEN, "FIND: %s: \n" +IDS_CANNOT_OPEN, "FIND: %s: Неможливо відкрити файл\n" END diff --git a/base/applications/cmdutils/find/rsrc.rc b/base/applications/cmdutils/find/rsrc.rc index 99baec73cbe..93f89c16048 100644 --- a/base/applications/cmdutils/find/rsrc.rc +++ b/base/applications/cmdutils/find/rsrc.rc @@ -12,9 +12,12 @@ #include "lang/it-IT.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/cmdutils/hostname/CMakeLists.txt b/base/applications/cmdutils/hostname/CMakeLists.txt index 528d64f04ec..d9e9edac79f 100644 --- a/base/applications/cmdutils/hostname/CMakeLists.txt +++ b/base/applications/cmdutils/hostname/CMakeLists.txt @@ -1,4 +1,3 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) add_executable(hostname hostname.c hostname.rc) diff --git a/base/applications/cmdutils/more/lang/pl-PL.rc b/base/applications/cmdutils/more/lang/pl-PL.rc index 2a8d0a858b1..3f2dcd2df16 100644 --- a/base/applications/cmdutils/more/lang/pl-PL.rc +++ b/base/applications/cmdutils/more/lang/pl-PL.rc @@ -1,22 +1,23 @@ /* - * translated by Caemyr - Olaf Siejka (Dec,2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_USAGE, "Wywietla dane, podzielone na odcinki o dugoci ekranu.\n\n\ - MORE < [Napd:][cieka]Nazwa pliku\n\ + IDS_USAGE, "Wyświetla dane, podzielone na odcinki o długości ekranu.\n\n\ + MORE < [Napęd:][Ścieżka]Nazwa pliku\n\ Polecenie | MORE \n\ - MORE [Napd:][cieka]Nazwa pliku\n\n\ - [Napd:][cieka]Nazwa pliku Plik, ktrego zawarto ma by wywietlona.\n\ - Polecenie\t\t Polecenie, ktrego wynik ma by wywietlony.\n\n\ - Po wywietleniu ""-- Kontynuuj --"" moesz nacisn dowolny klawisz, aby przej na nastpn stron.\n" + MORE [Napęd:][Ścieżka]Nazwa pliku\n\n\ + [Napęd:][Ścieżka]Nazwa pliku Plik, którego zawartość ma być wyświetlona.\n\ + Polecenie\t\t Polecenie, którego wynik ma być wyświetlony.\n\n\ + Po wyświetleniu ""-- Kontynuuj --"" możesz nacisnąć dowolny klawisz, aby przejść do następnej strony.\n" IDS_CONTINUE, " -- Kontynuuj (100%) -- " - IDS_FILE_ACCESS, "Brak dostpu do pliku: %s." + IDS_FILE_ACCESS, "Brak dostępu do pliku: %s." END diff --git a/base/applications/cmdutils/more/lang/ru-RU.rc b/base/applications/cmdutils/more/lang/ru-RU.rc index b53980b0db1..20c39c1fbe5 100644 --- a/base/applications/cmdutils/more/lang/ru-RU.rc +++ b/base/applications/cmdutils/more/lang/ru-RU.rc @@ -10,14 +10,14 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_USAGE, " .\n\n\ - MORE < [:][] \n\ + IDS_USAGE, "Показывать данные постранично заполняя экран.\n\n\ + MORE < [Том:][Путь]Имя файла\n\ Command | MORE \n\ - MORE [:][] \n\n\ - [:][] .\n\ - Command\t\t , .\n\n\ - ""-- --"" .\n" + MORE [Том:][Путь]Имя файла\n\n\ + [Том:][Путь]Имя Файла Имя файла содержимое которого будет отображено.\n\ + Command\t\t Команда, результат работы которой требуется выводить на экран.\n\n\ + При запросе ""-- Продолжить --"" вы можете нажать любую клавишу для отображения следующего экрана.\n" - IDS_CONTINUE, " -- (100%) -- " - IDS_FILE_ACCESS, " %s." + IDS_CONTINUE, " -- Продолжить (100%) -- " + IDS_FILE_ACCESS, "Нет доступа к файлу %s." END diff --git a/base/applications/cmdutils/more/lang/uk-UA.rc b/base/applications/cmdutils/more/lang/uk-UA.rc index 5a930bb8449..805c5892225 100644 --- a/base/applications/cmdutils/more/lang/uk-UA.rc +++ b/base/applications/cmdutils/more/lang/uk-UA.rc @@ -9,15 +9,15 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_USAGE, " i . :\n\n\ - MORE < [:][]I'_\n\ + IDS_USAGE, "Виводить iнфрмацію поекранно. Використання:\n\n\ + MORE < [Диск:][Шлях]Iм'я_файлу\n\ Command | MORE \n\ - MORE [:][]I'_\n\n\ - : \n\ - [:][]'_ , i .\n\ - Command\t\t , .\n\n\ - ""-- i --"" - i i.\n" + MORE [Диск:][Шлях]Iм'я_файлу\n\n\ + Де: \n\ + [Диск:][Шлях]Ім'я_файлу Файл, вмiст якого треба вивести на екран.\n\ + Command\t\t Команда, результат роботи якої треба вивести на екран.\n\n\ + На запрошення ""-- Далi --"" Ви можете натиснути будь-яку клавiшу щоб побачити наступну сторiнку.\n" - IDS_CONTINUE, " -- i (100%) -- " - IDS_FILE_ACCESS, " %s." + IDS_CONTINUE, " -- Далi (100%) -- " + IDS_FILE_ACCESS, "Не можу отримати доступ до файла %s." END diff --git a/base/applications/cmdutils/more/more.rc b/base/applications/cmdutils/more/more.rc index c46e4f8c77f..b8491dc8c2a 100644 --- a/base/applications/cmdutils/more/more.rc +++ b/base/applications/cmdutils/more/more.rc @@ -1,4 +1,5 @@ -/* $Id$ */ +#include +#include "resource.h" #define REACTOS_STR_FILE_DESCRIPTION "W32 more command\0" #define REACTOS_STR_INTERNAL_NAME "more\0" diff --git a/base/applications/cmdutils/more/rsrc.rc b/base/applications/cmdutils/more/rsrc.rc index 5677c450130..26ee145fee0 100644 --- a/base/applications/cmdutils/more/rsrc.rc +++ b/base/applications/cmdutils/more/rsrc.rc @@ -1,6 +1,3 @@ -#include -#include "resource.h" - #include "lang/bg-BG.rc" #include "lang/ca-ES.rc" #include "lang/cs-CZ.rc" @@ -12,8 +9,11 @@ #include "lang/it-IT.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/dxdiag/CMakeLists.txt b/base/applications/dxdiag/CMakeLists.txt index d234cc13f6a..457a3bafac6 100644 --- a/base/applications/dxdiag/CMakeLists.txt +++ b/base/applications/dxdiag/CMakeLists.txt @@ -18,11 +18,7 @@ list(APPEND SOURCE d3dtest8.c d3dtest9.c) -add_executable(dxdiag - ${CMAKE_CURRENT_BINARY_DIR}/dxdiag_precomp.h.gch - ${SOURCE}) - -add_pch(dxdiag ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(dxdiag ${SOURCE}) set_module_type(dxdiag win32gui) @@ -30,4 +26,6 @@ target_link_libraries(dxdiag dxguid) add_importlibs(dxdiag user32 advapi32 comctl32 dinput8 setupapi dsound ddraw version gdi32 winmm d3d9 msvcrt kernel32 ntdll) +add_pch(dxdiag precomp.h) + add_cd_file(TARGET dxdiag DESTINATION reactos/system32 FOR all) diff --git a/base/applications/dxdiag/lang/pl-PL.rc b/base/applications/dxdiag/lang/pl-PL.rc index cf747597acc..de9971d1b86 100644 --- a/base/applications/dxdiag/lang/pl-PL.rc +++ b/base/applications/dxdiag/lang/pl-PL.rc @@ -1,9 +1,10 @@ /* - * translated by Caemyr - Olaf Siejka (Apr,2008) - * updated by Saibamen - Adam Stachowicz (Apr, 2011) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl + * translated by Caemyr - Olaf Siejka (Apr,2008) + * updated by Saibamen - Adam Stachowicz (Apr, 2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -12,32 +13,32 @@ IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "Narzdzie diagnostyki ReactX" +CAPTION "Narzędzie diagnostyki ReactX" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,474,250 PUSHBUTTON "&Pomoc", IDC_BUTTON_HELP, 2, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - DEFPUSHBUTTON "&Nastpna", IDC_BUTTON_NEXT, 257, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + DEFPUSHBUTTON "&Następna", IDC_BUTTON_NEXT, 257, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "&Zapisz wszystkie informacje...", IDC_BUTTON_SAVE_INFO, 311, 261, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Wyjcie", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Wyjście", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Ten program dostarcza szczegowe dane o komponentach ReactX i sterownikach, zainstalowanych na twoim systemie..", -1, 10, 10, 443, 17 - LTEXT "Jeli wiesz ju, gdzie tkwi bd, kliknij na odpowiedni zakadk. W innym wypadku moesz przej przez wszystkie zakadki przyciskiem Nastpna", -1, 10, 30, 443, 25 + LTEXT "Ten program dostarcza szczegółowe dane o komponentach ReactX i sterownikach, zainstalowanych na twoim systemie..", -1, 10, 10, 443, 17 + LTEXT "Jeśli wiesz już, gdzie tkwi błąd, kliknij na odpowiednią zakładkę. W innym wypadku możesz przejść przez wszystkie zakładki przyciskiem Następna", -1, 10, 30, 443, 25 GROUPBOX "Informacje o systemie", -1, 10, 55, 443, 130, SS_RIGHT LTEXT "Data i czas:", -1, 70, 70, 80, 10, SS_RIGHT LTEXT "Nazwa komputera:", -1, 70, 80, 80, 10, SS_RIGHT LTEXT "System operacyjny:", -1, 70, 90, 80, 10, SS_RIGHT - LTEXT "Jzyk:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "Język:", -1, 70, 100, 80, 10, SS_RIGHT LTEXT "Producent:", -1, 70, 110, 80, 10, SS_RIGHT LTEXT "Model:", -1, 70, 120, 80, 10, SS_RIGHT LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT LTEXT "Procesor:", -1, 70, 140, 80, 10, SS_RIGHT - LTEXT "Pami:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Pamięć:", -1, 70, 150, 80, 10, SS_RIGHT LTEXT "Plik wymiany:", -1, 70, 160, 80, 10, SS_RIGHT LTEXT "Wersja ReactX:", -1, 70, 170, 80, 10, SS_RIGHT LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT @@ -57,13 +58,13 @@ IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Urzdzenie", -1, 10, 10, 220, 100 + GROUPBOX "Urządzenie", -1, 10, 10, 220, 100 RTEXT "Nazwa:", -1, 20, 25, 70, 10 RTEXT "Producent:", -1, 20, 35, 70, 10 RTEXT "GPU:", -1, 20, 45, 70, 10 RTEXT "Typ DAC:", -1, 20, 55, 70, 10 - RTEXT "Pami:", -1, 20, 65, 70, 10 - RTEXT "Bieca rozdzielczo:", -1, 20, 75, 70, 10 + RTEXT "Pamięć:", -1, 20, 65, 70, 10 + RTEXT "Bieżąca rozdzielczość:", -1, 20, 75, 70, 10 RTEXT "Monitor:", -1, 20, 85, 70, 10 LTEXT "", IDC_STATIC_ADAPTER_ID, 95, 25, 130, 10 LTEXT "", IDC_STATIC_ADAPTER_VENDOR, 95, 35, 130, 10 @@ -74,7 +75,7 @@ BEGIN LTEXT "", IDC_STATIC_ADAPTER_MONITOR, 95, 85, 130, 10 GROUPBOX "Sterownik", -1, 240, 10, 190, 100 - RTEXT "Gwny sterownik:", -1, 245, 30, 55, 10 + RTEXT "Główny sterownik:", -1, 245, 30, 55, 10 RTEXT "Wersja:", -1, 245, 40, 55, 10 RTEXT "Data:", -1, 245, 50, 55, 10 RTEXT "WHQL:", -1, 245, 60, 55, 10 @@ -96,9 +97,9 @@ BEGIN LTEXT "", IDC_STATIC_DDSTATE, 130, 130, 40, 10 LTEXT "", IDC_STATIC_D3DSTATE, 130, 145, 40, 10 LTEXT "", IDC_STATIC_AGPSTATE, 130, 160, 40, 10 - PUSHBUTTON "Wcz", IDC_BUTTON_DDRAW, 170, 124, 60, 14, WS_DISABLED - PUSHBUTTON "Wcz", IDC_BUTTON_D3D, 170, 140, 60, 14, WS_DISABLED - PUSHBUTTON "Wcz", IDC_BUTTON_AGP, 170, 156, 60, 14, WS_DISABLED + PUSHBUTTON "Włącz", IDC_BUTTON_DDRAW, 170, 124, 60, 14, WS_DISABLED + PUSHBUTTON "Włącz", IDC_BUTTON_D3D, 170, 140, 60, 14, WS_DISABLED + PUSHBUTTON "Włącz", IDC_BUTTON_AGP, 170, 156, 60, 14, WS_DISABLED PUSHBUTTON "Testuj DirectDraw", IDC_BUTTON_TESTDD, 250, 124, 80, 14 PUSHBUTTON "Testuj Direct3D", IDC_BUTTON_TEST3D, 250, 140, 80, 14, WS_DISABLED @@ -111,13 +112,13 @@ IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Urzdzenie", -1, 10, 10, 250, 100 + GROUPBOX "Urządzenie", -1, 10, 10, 250, 100 RTEXT "Nazwa:", -1, 20, 25, 70, 10 - RTEXT "ID Urzdzenia:", -1, 20, 35, 70, 10 + RTEXT "ID Urządzenia:", -1, 20, 35, 70, 10 RTEXT "ID Producenta:", -1, 20, 45, 70, 10 RTEXT "ID Produktu:", -1, 20, 55, 70, 10 RTEXT "Typ:", -1, 20, 65, 70, 10 - RTEXT "Urzdenie domylne:", -1, 20, 75, 70, 10 + RTEXT "Urządzenie domyślne:", -1, 20, 75, 70, 10 LTEXT "", IDC_STATIC_DSOUND_NAME, 95, 25, 150, 10 LTEXT "", IDC_STATIC_DSOUND_DEVICEID, 95, 35, 150, 10 LTEXT "", IDC_STATIC_DSOUND_VENDORID, 95, 45, 150, 10 @@ -139,7 +140,7 @@ BEGIN LTEXT "", IDC_STATIC_ADAPTER_PROVIDER, 335, 75, 100, 10 GROUPBOX "ReactX-", -1, 10, 115, 450, 60 CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 120, 135, 80, 17 - RTEXT "Przyspieszenie sprztowe\nPoziom:", -1, 20, 135, 90, 20 + RTEXT "Przyspieszenie sprzętowe\nPoziom:", -1, 20, 135, 90, 20 PUSHBUTTON "Testuj DirectSound", IDC_BUTTON_TESTDSOUND, 270, 134, 80, 14 GROUPBOX "Uwagi", -1, 10, 180, 450, 40 EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP @@ -156,9 +157,9 @@ IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Urzdzenia DirectInput", -1, 10, 10, 452, 80 + GROUPBOX "Urządzenia DirectInput", -1, 10, 10, 452, 80 CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 - GROUPBOX "Urzdenia wejcia", -1, 10, 100, 452, 60 + GROUPBOX "Urządenia wejścia", -1, 10, 100, 452, 60 CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 112, 432, 40, 0x00000200 GROUPBOX "Informacje", -1, 10, 170, 452, 50 EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP @@ -168,7 +169,7 @@ IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Zarejestrowani dostawcy usug DirectPlay", -1, 10, 10, 452, 80 + GROUPBOX "Zarejestrowani dostawcy usług DirectPlay", -1, 10, 10, 452, 80 CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END @@ -180,23 +181,23 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_MAIN_DIALOG "Narzdzie diagnostyki ReactX" + IDS_MAIN_DIALOG "Narzędzie diagnostyki ReactX" IDS_SYSTEM_DIALOG "System" IDS_DISPLAY_DIALOG "Grafika" - IDS_SOUND_DIALOG "Dwik" + IDS_SOUND_DIALOG "Dźwięk" IDS_MUSIC_DIALOG "Muzyka" IDS_INPUT_DIALOG "Peryferia" - IDS_NETWORK_DIALOG "Sie" + IDS_NETWORK_DIALOG "Sieć" IDS_HELP_DIALOG "Pomoc" IDS_FORMAT_MB "%I64uMB RAM" - IDS_FORMAT_SWAP "%I64u MB uytych, %I64u MB dostpnych" + IDS_FORMAT_SWAP "%I64u MB użytych, %I64u MB dostępnych" IDS_FORMAT_UNIPROC "%s (%u CPU)" IDS_FORMAT_MPPROC "%s (%u CPUs)" IDS_VERSION_UNKNOWN "Wersja nieznana" - IDS_DEVICE_STATUS_ATTACHED "Poczony" - IDS_DEVICE_STATUS_MISSING "Rozczony" + IDS_DEVICE_STATUS_ATTACHED "Połączony" + IDS_DEVICE_STATUS_MISSING "Rozłączony" IDS_DEVICE_STATUS_UNKNOWN "Nieznany" - IDS_DEVICE_NAME "Nazwa urzdzenia" + IDS_DEVICE_NAME "Nazwa urządzenia" IDS_DEVICE_STATUS "Stan" IDS_DEVICE_CONTROLLER "ID Kontrolera" IDS_DEVICE_MANUFACTURER "ID Producenta" @@ -208,24 +209,24 @@ BEGIN IDS_DIRECTPLAY_COL_NAME2 "Rejestr" IDS_DIRECTPLAY_COL_NAME3 "Plik" IDS_DIRECTPLAY_COL_NAME4 "Wersja" - IDS_DIRECTPLAY8_MODEMSP "Dostawca usug modemowych DirectPlay8" - IDS_DIRECTPLAY8_SERIALSP "Dostawca usug portu szeregowego DirectPlay8" - IDS_DIRECTPLAY8_IPXSP "Dostawca usug IPX DirectPlay8" - IDS_DIRECTPLAY8_TCPSP "Dostawca usug TCP/IP DirectPlay8" - IDS_DIRECTPLAY_TCPCONN "Poczenie internetowe TCP/IP dla DirectPlay" - IDS_DIRECTPLAY_IPXCONN "Poczenie IPX dla DirectPlay" - IDS_DIRECTPLAY_MODEMCONN "Poczenie modemowe dla DirectPlay" - IDS_DIRECTPLAY_SERIALCONN "Poczenie szeregowe dla DirectPlay" + IDS_DIRECTPLAY8_MODEMSP "Dostawca usług modemowych DirectPlay8" + IDS_DIRECTPLAY8_SERIALSP "Dostawca usług portu szeregowego DirectPlay8" + IDS_DIRECTPLAY8_IPXSP "Dostawca usług IPX DirectPlay8" + IDS_DIRECTPLAY8_TCPSP "Dostawca usług TCP/IP DirectPlay8" + IDS_DIRECTPLAY_TCPCONN "Połączenie internetowe TCP/IP dla DirectPlay" + IDS_DIRECTPLAY_IPXCONN "Połączenie IPX dla DirectPlay" + IDS_DIRECTPLAY_MODEMCONN "Połączenie modemowe dla DirectPlay" + IDS_DIRECTPLAY_SERIALCONN "Połączenie szeregowe dla DirectPlay" IDS_REG_SUCCESS "OK" - IDS_REG_FAIL "Bd" + IDS_REG_FAIL "Błąd" IDS_DDTEST_ERROR "Test nieudany!" - IDS_DDTEST_DESCRIPTION "Czy chcesz rozpocz test interface DirectDraw?" - IDS_DDPRIMARY_DESCRIPTION "Ten test wykorzysta DirectDraw do rysowania na powierzchni podstawowej. Narysowane zostan czarne i biae prostokty. Kontynuowa?" - IDS_DDPRIMARY_RESULT "Czy byo wida czarne i biae prostokty?" - IDS_DDOFFSCREEN_DESCRIPTION "Ten test wykorzysta DirectDraw do rysowania przy uyciu bufora pozaekranowego. Narysowany zostanie poruszajcy si biay kwadrat. Kontynuowa?" - IDS_DDOFFSCREEN_RESULT "Czy byo wida poruszajcy si biay kwadrat?" - IDS_DDFULLSCREEN_DESCRIPTION "Ten test wykorzysta DirectDraw do rysowania w trybie penoekranowym. Narysowany zostanie poruszajcy si biay kwadrat. Kontynuowa?" - IDS_DDFULLSCREEN_RESULT "Czy byo wida poruszajcy si biay kwadrat, w trybie penoekranowym?" + IDS_DDTEST_DESCRIPTION "Czy chcesz rozpocząć test interface DirectDraw?" + IDS_DDPRIMARY_DESCRIPTION "Ten test wykorzysta DirectDraw do rysowania na powierzchni podstawowej. Narysowane zostaną czarne i białe prostokąty. Kontynuować?" + IDS_DDPRIMARY_RESULT "Czy było widać czarne i białe prostokąty?" + IDS_DDOFFSCREEN_DESCRIPTION "Ten test wykorzysta DirectDraw do rysowania przy użyciu bufora pozaekranowego. Narysowany zostanie poruszający się biały kwadrat. Kontynuować?" + IDS_DDOFFSCREEN_RESULT "Czy było widać poruszający się biały kwadrat?" + IDS_DDFULLSCREEN_DESCRIPTION "Ten test wykorzysta DirectDraw do rysowania w trybie pełnoekranowym. Narysowany zostanie poruszający się biały kwadrat. Kontynuować?" + IDS_DDFULLSCREEN_RESULT "Czy było widać poruszający się biały kwadrat, w trybie pełnoekranowym?" IDS_FORMAT_ADAPTER_MEM "%u MB" IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u bit)(%uHz)" IDS_OPTION_NO "Nie" diff --git a/base/applications/dxdiag/lang/ru-RU.rc b/base/applications/dxdiag/lang/ru-RU.rc index 29fe6321d27..327ed9c0e6a 100644 --- a/base/applications/dxdiag/lang/ru-RU.rc +++ b/base/applications/dxdiag/lang/ru-RU.rc @@ -4,34 +4,34 @@ IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION " ReactX" +CAPTION "Средство диагностики ReactX" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,474,250 - PUSHBUTTON "&", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - DEFPUSHBUTTON "& ", IDC_BUTTON_NEXT, 203, 260, 94, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "& ...", IDC_BUTTON_SAVE_INFO, 301, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Справка", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + DEFPUSHBUTTON "&Следующая страница", IDC_BUTTON_NEXT, 203, 260, 94, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "С&охранить всю информацию...", IDC_BUTTON_SAVE_INFO, 301, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Выход", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactX.", -1, 10, 10, 443, 17 - LTEXT " , . "" "" .", -1, 10, 30, 443, 25 - GROUPBOX " ", -1, 10, 58, 443, 130, SS_RIGHT - LTEXT " :", -1, 70, 70, 80, 10, SS_RIGHT - LTEXT " :", -1, 70, 80, 80, 10, SS_RIGHT - LTEXT " :", -1, 50, 90, 100, 10, SS_RIGHT - LTEXT ":", -1, 70, 100, 80, 10, SS_RIGHT - LTEXT " :", -1, 50, 110, 100, 10, SS_RIGHT - LTEXT " :", -1, 70, 120, 80, 10, SS_RIGHT + LTEXT "Данная программа позволяет получить подробные сведения об установленных компонентах и драйверах ReactX.", -1, 10, 10, 443, 17 + LTEXT "Если известна возможная причина неполадки, можно сразу выбрать соответствующую вкладку. В противном случае используйте кнопку ""Следующая страница"" для последовательного просмотра страниц.", -1, 10, 30, 443, 25 + GROUPBOX "Сведения о системе", -1, 10, 58, 443, 130, SS_RIGHT + LTEXT "Текущие время и дата:", -1, 70, 70, 80, 10, SS_RIGHT + LTEXT "Имя компьютера:", -1, 70, 80, 80, 10, SS_RIGHT + LTEXT "Операционная система:", -1, 50, 90, 100, 10, SS_RIGHT + LTEXT "Язык:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "Изготовитель компьютера:", -1, 50, 110, 100, 10, SS_RIGHT + LTEXT "Модель компьютера:", -1, 70, 120, 80, 10, SS_RIGHT LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT - LTEXT ":", -1, 70, 140, 80, 10, SS_RIGHT - LTEXT ":", -1, 70, 150, 80, 10, SS_RIGHT - LTEXT " :", -1, 70, 160, 80, 10, SS_RIGHT - LTEXT " ReactX:", -1, 70, 170, 80, 10, SS_RIGHT + LTEXT "Процессор:", -1, 70, 140, 80, 10, SS_RIGHT + LTEXT "Память:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Файл подкачки:", -1, 70, 160, 80, 10, SS_RIGHT + LTEXT "Версия ReactX:", -1, 70, 170, 80, 10, SS_RIGHT LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT @@ -49,14 +49,14 @@ IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 10, 10, 220, 100 - RTEXT ":", -1, 20, 25, 70, 10 - RTEXT ":", -1, 20, 35, 70, 10 - RTEXT " :", -1, 20, 45, 70, 10 - RTEXT " DAC:", -1, 15, 55, 75, 10 - RTEXT " :", -1, 20, 65, 70, 10 - RTEXT " :", -1, 20, 75, 70, 10 - RTEXT ":", -1, 20, 85, 70, 10 + GROUPBOX "Устройство", -1, 10, 10, 220, 100 + RTEXT "Имя:", -1, 20, 25, 70, 10 + RTEXT "Изготовитель:", -1, 20, 35, 70, 10 + RTEXT "Тип микросхем:", -1, 20, 45, 70, 10 + RTEXT "Тип конвертера DAC:", -1, 15, 55, 75, 10 + RTEXT "Всего памяти:", -1, 20, 65, 70, 10 + RTEXT "Режим экрана:", -1, 20, 75, 70, 10 + RTEXT "Монитор:", -1, 20, 85, 70, 10 LTEXT "", IDC_STATIC_ADAPTER_ID, 95, 25, 130, 10 LTEXT "", IDC_STATIC_ADAPTER_VENDOR, 95, 35, 130, 10 LTEXT "", IDC_STATIC_ADAPTER_CHIP, 95, 45, 130, 10 @@ -65,14 +65,14 @@ BEGIN LTEXT "", IDC_STATIC_ADAPTER_MODE, 95, 75, 130, 10 LTEXT "", IDC_STATIC_ADAPTER_MONITOR, 95, 85, 130, 10 - GROUPBOX "", -1, 240, 10, 220, 100 - RTEXT ":", -1, 245, 30, 55, 10 - RTEXT ":", -1, 245, 40, 55, 10 - RTEXT ":", -1, 245, 50, 55, 10 - RTEXT ":", -1, 245, 60, 55, 10 - RTEXT "-VDD:", -1, 245, 70, 55, 10 + GROUPBOX "Драйверы", -1, 240, 10, 220, 100 + RTEXT "Главный:", -1, 245, 30, 55, 10 + RTEXT "Версия:", -1, 245, 40, 55, 10 + RTEXT "Дата:", -1, 245, 50, 55, 10 + RTEXT "Подпись:", -1, 245, 60, 55, 10 + RTEXT "Мини-VDD:", -1, 245, 70, 55, 10 RTEXT "VDD:", -1, 245, 80, 55, 10 - RTEXT " DDI:", -1, 245, 90, 55, 10 + RTEXT "Версия DDI:", -1, 245, 90, 55, 10 LTEXT "", IDC_STATIC_ADAPTER_DRIVER, 305, 30, 130, 10 LTEXT "", IDC_STATIC_ADAPTER_VERSION, 305, 40, 130, 10 LTEXT "", IDC_STATIC_ADAPTER_DATE, 305, 50, 130, 10 @@ -81,20 +81,20 @@ BEGIN LTEXT "", IDC_STATIC_ADAPTER_VDD, 305, 80, 130, 10 LTEXT "", IDC_STATIC_ADAPTER_DDI, 305, 90, 130, 10 - GROUPBOX " ReactX", -1, 10, 115, 450, 65 - RTEXT " DirectDraw:", -1, 15, 130, 110, 12 - RTEXT " Direct3D:", -1, 15, 145, 110, 12 - RTEXT " AGP:", -1, 15, 160, 110, 12 + GROUPBOX "Возможности ReactX", -1, 10, 115, 450, 65 + RTEXT "Ускорение DirectDraw:", -1, 15, 130, 110, 12 + RTEXT "Ускорение Direct3D:", -1, 15, 145, 110, 12 + RTEXT "Ускорение текстур AGP:", -1, 15, 160, 110, 12 LTEXT "", IDC_STATIC_DDSTATE, 130, 130, 40, 10 LTEXT "", IDC_STATIC_D3DSTATE, 130, 145, 40, 10 LTEXT "", IDC_STATIC_AGPSTATE, 130, 160, 40, 10 - PUSHBUTTON "", IDC_BUTTON_DDRAW, 170, 126, 60, 14, WS_DISABLED - PUSHBUTTON "", IDC_BUTTON_D3D, 170, 142, 60, 14, WS_DISABLED - PUSHBUTTON "", IDC_BUTTON_AGP, 170, 158, 60, 14, WS_DISABLED - PUSHBUTTON " DirectDraw", IDC_BUTTON_TESTDD, 250, 126, 80, 14 - PUSHBUTTON " Direct3D", IDC_BUTTON_TEST3D, 250, 142, 80, 14, WS_DISABLED + PUSHBUTTON "Включить", IDC_BUTTON_DDRAW, 170, 126, 60, 14, WS_DISABLED + PUSHBUTTON "Включить", IDC_BUTTON_D3D, 170, 142, 60, 14, WS_DISABLED + PUSHBUTTON "Включить", IDC_BUTTON_AGP, 170, 158, 60, 14, WS_DISABLED + PUSHBUTTON "Проверка DirectDraw", IDC_BUTTON_TESTDD, 250, 126, 80, 14 + PUSHBUTTON "Проверка Direct3D", IDC_BUTTON_TEST3D, 250, 142, 80, 14, WS_DISABLED - GROUPBOX "", -1, 10, 185, 450, 34 + GROUPBOX "Примечания", -1, 10, 185, 450, 34 EDITTEXT IDC_TEXT_INFO, 20, 195, 432, 18, WS_DISABLED | WS_TABSTOP END @@ -103,37 +103,37 @@ IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 10, 10, 250, 100 - RTEXT ":", -1, 20, 25, 70, 10 - RTEXT " :", -1, 20, 35, 70, 10 - RTEXT " :", -1, 20, 45, 70, 10 - RTEXT " :", -1, 20, 55, 70, 10 - RTEXT ":", -1, 20, 65, 70, 10 - RTEXT " :", -1, 20, 75, 70, 10 + GROUPBOX "Устройство", -1, 10, 10, 250, 100 + RTEXT "Имя:", -1, 20, 25, 70, 10 + RTEXT "Код устройства:", -1, 20, 35, 70, 10 + RTEXT "Код изготовителя:", -1, 20, 45, 70, 10 + RTEXT "Код продукта:", -1, 20, 55, 70, 10 + RTEXT "Тип:", -1, 20, 65, 70, 10 + RTEXT "По умолчанию:", -1, 20, 75, 70, 10 LTEXT "", IDC_STATIC_DSOUND_NAME, 95, 25, 150, 10 LTEXT "", IDC_STATIC_DSOUND_DEVICEID, 95, 35, 150, 10 LTEXT "", IDC_STATIC_DSOUND_VENDORID, 95, 45, 150, 10 LTEXT "", IDC_STATIC_DSOUND_PRODUCTID, 95, 55, 150, 10 LTEXT "", IDC_STATIC_DSOUND_TYPE, 95, 65, 150, 10 LTEXT "", IDC_STATIC_DSOUND_STANDARD, 95, 75, 150, 10 - GROUPBOX "", -1, 270, 10, 190, 100 - RTEXT ":", -1, 275, 25, 55, 10 - RTEXT ":", -1, 275, 35, 55, 10 - RTEXT ":", -1, 275, 45, 55, 10 - RTEXT ":", -1, 275, 55, 55, 10 - RTEXT " :", -1, 275, 65, 55, 10 - RTEXT ":", -1, 275, 75, 55, 10 + GROUPBOX "Драйверы", -1, 270, 10, 190, 100 + RTEXT "Имя:", -1, 275, 25, 55, 10 + RTEXT "Версия:", -1, 275, 35, 55, 10 + RTEXT "Дата:", -1, 275, 45, 55, 10 + RTEXT "Подпись:", -1, 275, 55, 55, 10 + RTEXT "Другие файлы:", -1, 275, 65, 55, 10 + RTEXT "Поставщик:", -1, 275, 75, 55, 10 LTEXT "", IDC_STATIC_DSOUND_DRIVER, 335, 25, 100, 10 LTEXT "", IDC_STATIC_DSOUND_VERSION, 335, 35, 100, 10 LTEXT "", IDC_STATIC_DSOUND_DATE, 335, 45, 100, 10 LTEXT "", IDC_STATIC_DSOUND_LOGO, 335, 55, 100, 10 LTEXT "", IDC_STATIC_DSOUND_FILES, 335, 65, 100, 10 LTEXT "", IDC_STATIC_ADAPTER_PROVIDER, 335, 75, 100, 10 - GROUPBOX " ReactX", -1, 10, 115, 450, 60 + GROUPBOX "Возможности ReactX", -1, 10, 115, 450, 60 CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 120, 135, 80, 17 - RTEXT " \n:", -1, 20, 135, 90, 20 - PUSHBUTTON " DirectSound", IDC_BUTTON_TESTDSOUND, 270, 130, 80, 14 - GROUPBOX "", -1, 10, 180, 450, 40 + RTEXT "Уровень аппаратного\nускорения:", -1, 20, 135, 90, 20 + PUSHBUTTON "Проверка DirectSound", IDC_BUTTON_TESTDSOUND, 270, 130, 80, 14 + GROUPBOX "Примечания", -1, 10, 180, 450, 40 EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 190, 432, 20, WS_DISABLED | WS_TABSTOP END @@ -148,11 +148,11 @@ IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " DirectInput", -1, 10, 10, 452, 80 + GROUPBOX "Устройства DirectInput", -1, 10, 10, 452, 80 CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 432, 60 - GROUPBOX " ", -1, 10, 100, 452, 60 + GROUPBOX "Устройства ввода", -1, 10, 100, 452, 60 CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 110, 432, 40, 0x00000200 - GROUPBOX "", -1, 10, 170, 452, 50 + GROUPBOX "Информация", -1, 10, 170, 452, 50 EDITTEXT IDC_RICH_INFO, 20, 180, 432, 30, WS_DISABLED | WS_TABSTOP END @@ -160,7 +160,7 @@ IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " DirectPlay", -1, 10, 10, 452, 80 + GROUPBOX "Зарегистрированные поставщики DirectPlay", -1, 10, 10, 452, 80 CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END @@ -172,53 +172,53 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_MAIN_DIALOG " ReactX" - IDS_SYSTEM_DIALOG "" - IDS_DISPLAY_DIALOG "" - IDS_SOUND_DIALOG "" - IDS_MUSIC_DIALOG "" - IDS_INPUT_DIALOG "" - IDS_NETWORK_DIALOG "" - IDS_HELP_DIALOG "" - IDS_FORMAT_MB "%I64u " - IDS_FORMAT_SWAP "%I64u , %I64u " - IDS_FORMAT_UNIPROC "%s (%u )" - IDS_FORMAT_MPPROC "%s (%u )" - IDS_VERSION_UNKNOWN " " - IDS_DEVICE_STATUS_ATTACHED "" - IDS_DEVICE_STATUS_MISSING "" - IDS_DEVICE_STATUS_UNKNOWN "" - IDS_DEVICE_NAME " " - IDS_DEVICE_STATUS "" - IDS_DEVICE_CONTROLLER "ID " - IDS_DEVICE_MANUFACTURER "ID " - IDS_DEVICE_PRODUCT "ID " - IDS_DEVICE_FORCEFEEDBACK " Force Feedback" - IDS_NOT_APPLICABLE "/" - IDS_OPTION_YES "" - IDS_DIRECTPLAY_COL_NAME1 "" - IDS_DIRECTPLAY_COL_NAME2 "" - IDS_DIRECTPLAY_COL_NAME3 "" - IDS_DIRECTPLAY_COL_NAME4 "" - IDS_DIRECTPLAY8_MODEMSP " DirectPlay8" - IDS_DIRECTPLAY8_SERIALSP " . DirectPlay8" - IDS_DIRECTPLAY8_IPXSP " IPX DirectPlay8" - IDS_DIRECTPLAY8_TCPSP " TCP/IP DirectPlay8" - IDS_DIRECTPLAY_TCPCONN "- TCP/IP DirectPlay" - IDS_DIRECTPLAY_IPXCONN "IPX DirectPlay" - IDS_DIRECTPLAY_MODEMCONN " DirectPlay" - IDS_DIRECTPLAY_SERIALCONN " DirectPlay" + IDS_MAIN_DIALOG "Средство диагностики ReactX" + IDS_SYSTEM_DIALOG "Система" + IDS_DISPLAY_DIALOG "Экран" + IDS_SOUND_DIALOG "Звук" + IDS_MUSIC_DIALOG "Музыка" + IDS_INPUT_DIALOG "Ввод" + IDS_NETWORK_DIALOG "Сеть" + IDS_HELP_DIALOG "Справка" + IDS_FORMAT_MB "%I64uМБ ОЗУ" + IDS_FORMAT_SWAP "%I64u МБ использовано, %I64u МБ доступно" + IDS_FORMAT_UNIPROC "%s (%u ЦП)" + IDS_FORMAT_MPPROC "%s (%u ЦП)" + IDS_VERSION_UNKNOWN "Неизвестная версия" + IDS_DEVICE_STATUS_ATTACHED "Подключено" + IDS_DEVICE_STATUS_MISSING "Отключено" + IDS_DEVICE_STATUS_UNKNOWN "Неизвестно" + IDS_DEVICE_NAME "Имя устройства" + IDS_DEVICE_STATUS "Состояние" + IDS_DEVICE_CONTROLLER "ID контроллера" + IDS_DEVICE_MANUFACTURER "ID производителя" + IDS_DEVICE_PRODUCT "ID продукта" + IDS_DEVICE_FORCEFEEDBACK "Драйвер Force Feedback" + IDS_NOT_APPLICABLE "Н/Д" + IDS_OPTION_YES "Да" + IDS_DIRECTPLAY_COL_NAME1 "Имя" + IDS_DIRECTPLAY_COL_NAME2 "Реестр" + IDS_DIRECTPLAY_COL_NAME3 "Файл" + IDS_DIRECTPLAY_COL_NAME4 "Версия" + IDS_DIRECTPLAY8_MODEMSP "Поставщик службы модема DirectPlay8" + IDS_DIRECTPLAY8_SERIALSP "Поставщик службы посл. порта DirectPlay8" + IDS_DIRECTPLAY8_IPXSP "Поставщик службы IPX DirectPlay8" + IDS_DIRECTPLAY8_TCPSP "Поставщик службы TCP/IP DirectPlay8" + IDS_DIRECTPLAY_TCPCONN "Интернет-подключение TCP/IP для DirectPlay" + IDS_DIRECTPLAY_IPXCONN "IPX подключение для DirectPlay" + IDS_DIRECTPLAY_MODEMCONN "Подключение через модем для DirectPlay" + IDS_DIRECTPLAY_SERIALCONN "Последовательное подключение для DirectPlay" IDS_REG_SUCCESS "OK" - IDS_REG_FAIL "" - IDS_DDTEST_ERROR " !" - IDS_DDTEST_DESCRIPTION " DirecDraw . ?" - IDS_DDPRIMARY_DESCRIPTION "This test will use DirectDraw to draw on primary surface. Black and white rectangles should be drawn. ?" - IDS_DDPRIMARY_RESULT " ?" - IDS_DDOFFSCREEN_DESCRIPTION "This test will use DirectDraw to draw in an offscreen buffer. Moving white rectangle should be drawn. ?" - IDS_DDOFFSCREEN_RESULT " ?" - IDS_DDFULLSCREEN_DESCRIPTION "This test will use DirectDraw to draw in a fullscreen mode. Moving white rectangle should be drawn. ?" - IDS_DDFULLSCREEN_RESULT " ?" - IDS_FORMAT_ADAPTER_MEM "%u " - IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u )(%u)" - IDS_OPTION_NO "" + IDS_REG_FAIL "Ошибка" + IDS_DDTEST_ERROR "Сбой в проверке!" + IDS_DDTEST_DESCRIPTION "Будет произведена проверка DirecDraw на этом устройстве. Продолжить?" + IDS_DDPRIMARY_DESCRIPTION "This test will use DirectDraw to draw on primary surface. Black and white rectangles should be drawn. Продолжить?" + IDS_DDPRIMARY_RESULT "Вы видели черные и белые прямоугольники?" + IDS_DDOFFSCREEN_DESCRIPTION "This test will use DirectDraw to draw in an offscreen buffer. Moving white rectangle should be drawn. Продолжить?" + IDS_DDOFFSCREEN_RESULT "Вы видели перемещающийся белый прямоугольник?" + IDS_DDFULLSCREEN_DESCRIPTION "This test will use DirectDraw to draw in a fullscreen mode. Moving white rectangle should be drawn. Продолжить?" + IDS_DDFULLSCREEN_RESULT "Вы видели белый перемешающийся прямоугольник в полноэкранном режиме?" + IDS_FORMAT_ADAPTER_MEM "%u Мб" + IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u бит)(%uГц)" + IDS_OPTION_NO "Нет" END diff --git a/base/applications/dxdiag/lang/ua-UA.rc b/base/applications/dxdiag/lang/ua-UA.rc deleted file mode 100644 index 0cd5c0aa74c..00000000000 --- a/base/applications/dxdiag/lang/ua-UA.rc +++ /dev/null @@ -1,234 +0,0 @@ -/* - * PROJECT: ReactOS dxdiag - * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/dxdiag/lang/uk-UA.rc - * PURPOSE: Ukraianian Language File for ReactOS dxdiag - * TRANSLATOR: Sakara Yevhen - */ - -LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT - -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 -STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME -CAPTION " ReactX" -FONT 8, "MS Shell Dlg" -BEGIN - CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,474,250 - PUSHBUTTON "&", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - DEFPUSHBUTTON "& ", IDC_BUTTON_NEXT, 203, 260, 94, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "& ...", IDC_BUTTON_SAVE_INFO, 301, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP -END - -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 190 -STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT " ReactX.", -1, 10, 10, 443, 17 - LTEXT " , . "" "" .", -1, 10, 30, 443, 25 - GROUPBOX "³ ", -1, 10, 58, 443, 130, SS_RIGHT - LTEXT " :", -1, 70, 70, 80, 10, SS_RIGHT - LTEXT "' ':", -1, 70, 80, 80, 10, SS_RIGHT - LTEXT " :", -1, 50, 90, 100, 10, SS_RIGHT - LTEXT ":", -1, 70, 100, 80, 10, SS_RIGHT - LTEXT " ':", -1, 50, 110, 100, 10, SS_RIGHT - LTEXT " ':", -1, 70, 120, 80, 10, SS_RIGHT - LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT - LTEXT ":", -1, 70, 140, 80, 10, SS_RIGHT - LTEXT "':", -1, 70, 150, 80, 10, SS_RIGHT - LTEXT " :", -1, 70, 160, 80, 10, SS_RIGHT - LTEXT " ReactX:", -1, 70, 170, 80, 10, SS_RIGHT - LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_LANG, 155, 100, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_MANU, 155, 110, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_MODEL, 155, 120, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_BIOS, 155, 130, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_PROC, 155, 140, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_MEM, 155, 150, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_SWAP, 155, 160, 195, 10, SS_LEFT - LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT -END - -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 -STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN - GROUPBOX "", -1, 10, 10, 220, 100 - RTEXT ":", -1, 20, 25, 70, 10 - RTEXT ":", -1, 20, 35, 70, 10 - RTEXT " :", -1, 20, 45, 70, 10 - RTEXT " DAC:", -1, 15, 55, 75, 10 - RTEXT " ':", -1, 20, 65, 70, 10 - RTEXT " :", -1, 20, 75, 70, 10 - RTEXT ":", -1, 20, 85, 70, 10 - LTEXT "", IDC_STATIC_ADAPTER_ID, 95, 25, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_VENDOR, 95, 35, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_CHIP, 95, 45, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_DAC, 95, 55, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_MEM, 95, 65, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_MODE, 95, 75, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_MONITOR, 95, 85, 130, 10 - - GROUPBOX "", -1, 240, 10, 220, 100 - RTEXT ":", -1, 245, 30, 55, 10 - RTEXT ":", -1, 245, 40, 55, 10 - RTEXT ":", -1, 245, 50, 55, 10 - RTEXT "ϳ:", -1, 245, 60, 55, 10 - RTEXT "̳-VDD:", -1, 245, 70, 55, 10 - RTEXT "VDD:", -1, 245, 80, 55, 10 - RTEXT " DDI:", -1, 245, 90, 55, 10 - LTEXT "", IDC_STATIC_ADAPTER_DRIVER, 305, 30, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_VERSION, 305, 40, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_DATE, 305, 50, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_LOGO, 305, 60, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_MINIVDD, 305, 70, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_VDD, 305, 80, 130, 10 - LTEXT "", IDC_STATIC_ADAPTER_DDI, 305, 90, 130, 10 - - GROUPBOX " ReactX", -1, 10, 115, 450, 65 - RTEXT " DirectDraw:", -1, 15, 130, 110, 12 - RTEXT " Direct3D:", -1, 15, 145, 110, 12 - RTEXT " AGP:", -1, 15, 160, 110, 12 - LTEXT "", IDC_STATIC_DDSTATE, 130, 130, 40, 10 - LTEXT "", IDC_STATIC_D3DSTATE, 130, 145, 40, 10 - LTEXT "", IDC_STATIC_AGPSTATE, 130, 160, 40, 10 - PUSHBUTTON "", IDC_BUTTON_DDRAW, 170, 126, 60, 14, WS_DISABLED - PUSHBUTTON "", IDC_BUTTON_D3D, 170, 142, 60, 14, WS_DISABLED - PUSHBUTTON "", IDC_BUTTON_AGP, 170, 158, 60, 14, WS_DISABLED - PUSHBUTTON " DirectDraw", IDC_BUTTON_TESTDD, 250, 126, 80, 14 - PUSHBUTTON " Direct3D", IDC_BUTTON_TEST3D, 250, 142, 80, 14, WS_DISABLED - - GROUPBOX "", -1, 10, 185, 450, 34 - EDITTEXT IDC_TEXT_INFO, 20, 195, 432, 18, WS_DISABLED | WS_TABSTOP -END - - -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 -STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN - GROUPBOX "", -1, 10, 10, 250, 100 - RTEXT ":", -1, 20, 25, 70, 10 - RTEXT " :", -1, 20, 35, 70, 10 - RTEXT " :", -1, 20, 45, 70, 10 - RTEXT " :", -1, 20, 55, 70, 10 - RTEXT ":", -1, 20, 65, 70, 10 - RTEXT " :", -1, 20, 75, 70, 10 - LTEXT "", IDC_STATIC_DSOUND_NAME, 95, 25, 150, 10 - LTEXT "", IDC_STATIC_DSOUND_DEVICEID, 95, 35, 150, 10 - LTEXT "", IDC_STATIC_DSOUND_VENDORID, 95, 45, 150, 10 - LTEXT "", IDC_STATIC_DSOUND_PRODUCTID, 95, 55, 150, 10 - LTEXT "", IDC_STATIC_DSOUND_TYPE, 95, 65, 150, 10 - LTEXT "", IDC_STATIC_DSOUND_STANDARD, 95, 75, 150, 10 - GROUPBOX "", -1, 270, 10, 190, 100 - RTEXT ":", -1, 275, 25, 55, 10 - RTEXT ":", -1, 275, 35, 55, 10 - RTEXT ":", -1, 275, 45, 55, 10 - RTEXT "ϳ:", -1, 275, 55, 55, 10 - RTEXT " :", -1, 275, 65, 55, 10 - RTEXT ":", -1, 275, 75, 55, 10 - LTEXT "", IDC_STATIC_DSOUND_DRIVER, 335, 25, 100, 10 - LTEXT "", IDC_STATIC_DSOUND_VERSION, 335, 35, 100, 10 - LTEXT "", IDC_STATIC_DSOUND_DATE, 335, 45, 100, 10 - LTEXT "", IDC_STATIC_DSOUND_LOGO, 335, 55, 100, 10 - LTEXT "", IDC_STATIC_DSOUND_FILES, 335, 65, 100, 10 - LTEXT "", IDC_STATIC_ADAPTER_PROVIDER, 335, 75, 100, 10 - GROUPBOX " ReactX", -1, 10, 115, 450, 60 - CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 120, 135, 80, 17 - RTEXT "г \n:", -1, 20, 135, 90, 20 - PUSHBUTTON " DirectSound", IDC_BUTTON_TESTDSOUND, 270, 130, 80, 14 - GROUPBOX "", -1, 10, 180, 450, 40 - EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 190, 432, 20, WS_DISABLED | WS_TABSTOP -END - -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 -STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN -END - - -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 -STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN - GROUPBOX " DirectInput", -1, 10, 10, 452, 80 - CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 432, 60 - GROUPBOX " ", -1, 10, 100, 452, 60 - CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 110, 432, 40, 0x00000200 - GROUPBOX "", -1, 10, 170, 452, 50 - EDITTEXT IDC_RICH_INFO, 20, 180, 432, 30, WS_DISABLED | WS_TABSTOP -END - -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 -STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN - GROUPBOX " DirectPlay", -1, 10, 10, 452, 80 - CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 -END - -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 -STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN -FONT 8, "MS Shell Dlg" -BEGIN -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_MAIN_DIALOG " ReactX" - IDS_SYSTEM_DIALOG "" - IDS_DISPLAY_DIALOG "" - IDS_SOUND_DIALOG "" - IDS_MUSIC_DIALOG "" - IDS_INPUT_DIALOG "" - IDS_NETWORK_DIALOG "" - IDS_HELP_DIALOG "" - IDS_FORMAT_MB "%I64u " - IDS_FORMAT_SWAP "%I64u , %I64u " - IDS_FORMAT_UNIPROC "%s (%u )" - IDS_FORMAT_MPPROC "%s (%u )" - IDS_VERSION_UNKNOWN " " - IDS_DEVICE_STATUS_ATTACHED "ϳ'" - IDS_DEVICE_STATUS_MISSING "³'" - IDS_DEVICE_STATUS_UNKNOWN "" - IDS_DEVICE_NAME " " - IDS_DEVICE_STATUS "" - IDS_DEVICE_CONTROLLER "ID " - IDS_DEVICE_MANUFACTURER "ID " - IDS_DEVICE_PRODUCT "ID " - IDS_DEVICE_FORCEFEEDBACK " Force Feedback" - IDS_NOT_APPLICABLE "/" - IDS_OPTION_YES "" - IDS_DIRECTPLAY_COL_NAME1 "" - IDS_DIRECTPLAY_COL_NAME2 "" - IDS_DIRECTPLAY_COL_NAME3 "" - IDS_DIRECTPLAY_COL_NAME4 "" - IDS_DIRECTPLAY8_MODEMSP " DirectPlay8" - IDS_DIRECTPLAY8_SERIALSP " . DirectPlay8" - IDS_DIRECTPLAY8_IPXSP " IPX DirectPlay8" - IDS_DIRECTPLAY8_TCPSP " TCP/IP DirectPlay8" - IDS_DIRECTPLAY_TCPCONN "- TCP/IP DirectPlay" - IDS_DIRECTPLAY_IPXCONN "IPX DirectPlay" - IDS_DIRECTPLAY_MODEMCONN "ϳ DirectPlay" - IDS_DIRECTPLAY_SERIALCONN " DirectPlay" - IDS_REG_SUCCESS "" - IDS_REG_FAIL "" - IDS_DDTEST_ERROR " !" - IDS_DDTEST_DESCRIPTION " DirecDraw. ?" - IDS_DDPRIMARY_DESCRIPTION " DirectDraw . . ?" - IDS_DDPRIMARY_RESULT " ?" - IDS_DDOFFSCREEN_DESCRIPTION " DirectDraw . . ?" - IDS_DDOFFSCREEN_RESULT " , ?" - IDS_DDFULLSCREEN_DESCRIPTION " DirectDraw . . ?" - IDS_DDFULLSCREEN_RESULT " , ?" - IDS_FORMAT_ADAPTER_MEM "%u " - IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u )(%u)" - IDS_OPTION_NO "ͳ" - IDS_D3DTEST_DESCRIPTION " Direct3D. ?" - IDS_D3DTEST_D3Dx " - Direct3D %u." -END diff --git a/base/applications/dxdiag/lang/uk-UA.rc b/base/applications/dxdiag/lang/uk-UA.rc new file mode 100644 index 00000000000..e5d7a0bc950 --- /dev/null +++ b/base/applications/dxdiag/lang/uk-UA.rc @@ -0,0 +1,234 @@ +/* + * PROJECT: ReactOS dxdiag + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/applications/dxdiag/lang/uk-UA.rc + * PURPOSE: Ukraianian Language File for ReactOS dxdiag + * TRANSLATOR: Sakara Yevhen + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | + WS_THICKFRAME +CAPTION "Засіб діагностики ReactX" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,474,250 + PUSHBUTTON "&Довідка", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + DEFPUSHBUTTON "&Наступна сторінка", IDC_BUTTON_NEXT, 203, 260, 94, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Зберегти всю інформацію...", IDC_BUTTON_SAVE_INFO, 301, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Вихід", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 190 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Ця програма дозволяє отримати докладні відомості про встановлені компоненти і драйвери ReactX.", -1, 10, 10, 443, 17 + LTEXT "Якщо ви знаєте можливу причину неполадки, можна відразу вибрати відповідну вкладку. В іншому випадку використовуйте кнопку ""Наступна сторінка"" для послідовного перегляду сторінок.", -1, 10, 30, 443, 25 + GROUPBOX "Відомості про систему", -1, 10, 58, 443, 130, SS_RIGHT + LTEXT "Поточні час і дата:", -1, 70, 70, 80, 10, SS_RIGHT + LTEXT "Ім'я комп'ютера:", -1, 70, 80, 80, 10, SS_RIGHT + LTEXT "Операційна система:", -1, 50, 90, 100, 10, SS_RIGHT + LTEXT "Мова:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "Виробник комп'ютера:", -1, 50, 110, 100, 10, SS_RIGHT + LTEXT "Модель комп'ютера:", -1, 70, 120, 80, 10, SS_RIGHT + LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT + LTEXT "Процесор:", -1, 70, 140, 80, 10, SS_RIGHT + LTEXT "Пам'ять:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Файл підкачки:", -1, 70, 160, 80, 10, SS_RIGHT + LTEXT "Версія ReactX:", -1, 70, 170, 80, 10, SS_RIGHT + LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_LANG, 155, 100, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MANU, 155, 110, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MODEL, 155, 120, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_BIOS, 155, 130, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_PROC, 155, 140, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MEM, 155, 150, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_SWAP, 155, 160, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT +END + +IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Пристрій", -1, 10, 10, 220, 100 + RTEXT "Назва:", -1, 20, 25, 70, 10 + RTEXT "Виробник:", -1, 20, 35, 70, 10 + RTEXT "Тип мікросхем:", -1, 20, 45, 70, 10 + RTEXT "Тип конвертера DAC:", -1, 15, 55, 75, 10 + RTEXT "Всього пам'яті:", -1, 20, 65, 70, 10 + RTEXT "Режим екрану:", -1, 20, 75, 70, 10 + RTEXT "Монітор:", -1, 20, 85, 70, 10 + LTEXT "", IDC_STATIC_ADAPTER_ID, 95, 25, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_VENDOR, 95, 35, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_CHIP, 95, 45, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_DAC, 95, 55, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_MEM, 95, 65, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_MODE, 95, 75, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_MONITOR, 95, 85, 130, 10 + + GROUPBOX "Драйвери", -1, 240, 10, 220, 100 + RTEXT "Головний:", -1, 245, 30, 55, 10 + RTEXT "Версія:", -1, 245, 40, 55, 10 + RTEXT "Дата:", -1, 245, 50, 55, 10 + RTEXT "Підпис:", -1, 245, 60, 55, 10 + RTEXT "Міні-VDD:", -1, 245, 70, 55, 10 + RTEXT "VDD:", -1, 245, 80, 55, 10 + RTEXT "Версія DDI:", -1, 245, 90, 55, 10 + LTEXT "", IDC_STATIC_ADAPTER_DRIVER, 305, 30, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_VERSION, 305, 40, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_DATE, 305, 50, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_LOGO, 305, 60, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_MINIVDD, 305, 70, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_VDD, 305, 80, 130, 10 + LTEXT "", IDC_STATIC_ADAPTER_DDI, 305, 90, 130, 10 + + GROUPBOX "Можливості ReactX", -1, 10, 115, 450, 65 + RTEXT "Прискорення DirectDraw:", -1, 15, 130, 110, 12 + RTEXT "Прискорення Direct3D:", -1, 15, 145, 110, 12 + RTEXT "Прискорення текстур AGP:", -1, 15, 160, 110, 12 + LTEXT "", IDC_STATIC_DDSTATE, 130, 130, 40, 10 + LTEXT "", IDC_STATIC_D3DSTATE, 130, 145, 40, 10 + LTEXT "", IDC_STATIC_AGPSTATE, 130, 160, 40, 10 + PUSHBUTTON "Увімкнути", IDC_BUTTON_DDRAW, 170, 126, 60, 14, WS_DISABLED + PUSHBUTTON "Увімкнути", IDC_BUTTON_D3D, 170, 142, 60, 14, WS_DISABLED + PUSHBUTTON "Увімкнути", IDC_BUTTON_AGP, 170, 158, 60, 14, WS_DISABLED + PUSHBUTTON "Перевірка DirectDraw", IDC_BUTTON_TESTDD, 250, 126, 80, 14 + PUSHBUTTON "Перевірка Direct3D", IDC_BUTTON_TEST3D, 250, 142, 80, 14, WS_DISABLED + + GROUPBOX "Примітки", -1, 10, 185, 450, 34 + EDITTEXT IDC_TEXT_INFO, 20, 195, 432, 18, WS_DISABLED | WS_TABSTOP +END + + +IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Пристрій", -1, 10, 10, 250, 100 + RTEXT "Назва:", -1, 20, 25, 70, 10 + RTEXT "Код пристрою:", -1, 20, 35, 70, 10 + RTEXT "Код виробника:", -1, 20, 45, 70, 10 + RTEXT "Код продукту:", -1, 20, 55, 70, 10 + RTEXT "Тип:", -1, 20, 65, 70, 10 + RTEXT "За замовчуванням:", -1, 20, 75, 70, 10 + LTEXT "", IDC_STATIC_DSOUND_NAME, 95, 25, 150, 10 + LTEXT "", IDC_STATIC_DSOUND_DEVICEID, 95, 35, 150, 10 + LTEXT "", IDC_STATIC_DSOUND_VENDORID, 95, 45, 150, 10 + LTEXT "", IDC_STATIC_DSOUND_PRODUCTID, 95, 55, 150, 10 + LTEXT "", IDC_STATIC_DSOUND_TYPE, 95, 65, 150, 10 + LTEXT "", IDC_STATIC_DSOUND_STANDARD, 95, 75, 150, 10 + GROUPBOX "Драйвери", -1, 270, 10, 190, 100 + RTEXT "Назва:", -1, 275, 25, 55, 10 + RTEXT "Версія:", -1, 275, 35, 55, 10 + RTEXT "Дата:", -1, 275, 45, 55, 10 + RTEXT "Підпис:", -1, 275, 55, 55, 10 + RTEXT "Інші файли:", -1, 275, 65, 55, 10 + RTEXT "Постачальник:", -1, 275, 75, 55, 10 + LTEXT "", IDC_STATIC_DSOUND_DRIVER, 335, 25, 100, 10 + LTEXT "", IDC_STATIC_DSOUND_VERSION, 335, 35, 100, 10 + LTEXT "", IDC_STATIC_DSOUND_DATE, 335, 45, 100, 10 + LTEXT "", IDC_STATIC_DSOUND_LOGO, 335, 55, 100, 10 + LTEXT "", IDC_STATIC_DSOUND_FILES, 335, 65, 100, 10 + LTEXT "", IDC_STATIC_ADAPTER_PROVIDER, 335, 75, 100, 10 + GROUPBOX "Можливості ReactX", -1, 10, 115, 450, 60 + CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 120, 135, 80, 17 + RTEXT "Рівень апаратного\nприскорення:", -1, 20, 135, 90, 20 + PUSHBUTTON "Перевірка DirectSound", IDC_BUTTON_TESTDSOUND, 270, 130, 80, 14 + GROUPBOX "Примітки", -1, 10, 180, 450, 40 + EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 190, 432, 20, WS_DISABLED | WS_TABSTOP +END + +IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN +END + + +IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Пристрої DirectInput", -1, 10, 10, 452, 80 + CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 432, 60 + GROUPBOX "Пристрої введення", -1, 10, 100, 452, 60 + CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 110, 432, 40, 0x00000200 + GROUPBOX "Інформація", -1, 10, 170, 452, 50 + EDITTEXT IDC_RICH_INFO, 20, 180, 432, 30, WS_DISABLED | WS_TABSTOP +END + +IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Зареєстровані постачальники DirectPlay", -1, 10, 10, 452, 80 + CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 +END + +IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN +FONT 8, "MS Shell Dlg" +BEGIN +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_MAIN_DIALOG "Засіб діагностики ReactX" + IDS_SYSTEM_DIALOG "Система" + IDS_DISPLAY_DIALOG "Екран" + IDS_SOUND_DIALOG "Звук" + IDS_MUSIC_DIALOG "Музика" + IDS_INPUT_DIALOG "Введення" + IDS_NETWORK_DIALOG "Мережа" + IDS_HELP_DIALOG "Довідка" + IDS_FORMAT_MB "%I64uМБ ОЗУ" + IDS_FORMAT_SWAP "%I64u МБ використано, %I64u МБ в наявності" + IDS_FORMAT_UNIPROC "%s (%u ЦП)" + IDS_FORMAT_MPPROC "%s (%u ЦП)" + IDS_VERSION_UNKNOWN "Невідома версія" + IDS_DEVICE_STATUS_ATTACHED "Під'єднано" + IDS_DEVICE_STATUS_MISSING "Від'єднано" + IDS_DEVICE_STATUS_UNKNOWN "Невідомо" + IDS_DEVICE_NAME "Назва пристрою" + IDS_DEVICE_STATUS "Стан" + IDS_DEVICE_CONTROLLER "ID контролера" + IDS_DEVICE_MANUFACTURER "ID виробника" + IDS_DEVICE_PRODUCT "ID продукту" + IDS_DEVICE_FORCEFEEDBACK "Драйвер Force Feedback" + IDS_NOT_APPLICABLE "Н/Д" + IDS_OPTION_YES "Так" + IDS_DIRECTPLAY_COL_NAME1 "Назва" + IDS_DIRECTPLAY_COL_NAME2 "Реєстр" + IDS_DIRECTPLAY_COL_NAME3 "Файл" + IDS_DIRECTPLAY_COL_NAME4 "Версія" + IDS_DIRECTPLAY8_MODEMSP "Постачальник служби модему DirectPlay8" + IDS_DIRECTPLAY8_SERIALSP "Постачальник служби остан. порту DirectPlay8" + IDS_DIRECTPLAY8_IPXSP "Постачальник служби IPX DirectPlay8" + IDS_DIRECTPLAY8_TCPSP "Постачальник служби TCP/IP DirectPlay8" + IDS_DIRECTPLAY_TCPCONN "Інтернет-підключення TCP/IP для DirectPlay" + IDS_DIRECTPLAY_IPXCONN "IPX підключення для DirectPlay" + IDS_DIRECTPLAY_MODEMCONN "Підключення через модем для DirectPlay" + IDS_DIRECTPLAY_SERIALCONN "Послідовне підключення для DirectPlay" + IDS_REG_SUCCESS "Так" + IDS_REG_FAIL "Помилка" + IDS_DDTEST_ERROR "Збій у перевірці!" + IDS_DDTEST_DESCRIPTION "Буде виконана перевірка інтерфейсу DirecDraw. Продовжити?" + IDS_DDPRIMARY_DESCRIPTION "Цей тест буде використовувати DirectDraw для малювання на первинній поверхні. Будуть виводитись чорні та білі прямокутники. Продовжити?" + IDS_DDPRIMARY_RESULT "Ви бачили чорні та білі прямокутники?" + IDS_DDOFFSCREEN_DESCRIPTION "Цей тест буде використовувати DirectDraw для малювання в закадровий буфер. Повинен рухатись білий прямокутник. Продовжити?" + IDS_DDOFFSCREEN_RESULT "Ви бачили, як рухався білий прямокутник?" + IDS_DDFULLSCREEN_DESCRIPTION "Цей тест буде використовувати DirectDraw для малювання в повноекранному режимі. Повинен рухатись білий прямокутник. Продовжити?" + IDS_DDFULLSCREEN_RESULT "Ви бачили, як рухався білий прямокутник в повноекранному режимі?" + IDS_FORMAT_ADAPTER_MEM "%u Мб" + IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u біт)(%uГц)" + IDS_OPTION_NO "Ні" + IDS_D3DTEST_DESCRIPTION "Буде виконана перевірка інтерфейсу Direct3D. Продовжити?" + IDS_D3DTEST_D3Dx "Цей тест використає апаратно-прискорений Direct3D інтерфейс %u." +END diff --git a/base/applications/dxdiag/rsrc.rc b/base/applications/dxdiag/rsrc.rc index b0539e32d04..6c23fcb1a29 100644 --- a/base/applications/dxdiag/rsrc.rc +++ b/base/applications/dxdiag/rsrc.rc @@ -1,9 +1,3 @@ - -#include -#include "resource.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - #include "lang/bg-BG.rc" #include "lang/cs-CZ.rc" #include "lang/de-DE.rc" @@ -14,10 +8,13 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/ko-KR.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/ua-UA.rc" #include "lang/zh-CN.rc" //#include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/findstr/CMakeLists.txt b/base/applications/findstr/CMakeLists.txt index 68b0e741727..df2257a41c4 100644 --- a/base/applications/findstr/CMakeLists.txt +++ b/base/applications/findstr/CMakeLists.txt @@ -1,9 +1,5 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - -add_executable(findstr - findstr.c - findstr.rc) +add_executable(findstr findstr.c findstr.rc) set_module_type(findstr win32cui) add_importlibs(findstr user32 msvcrt kernel32) diff --git a/base/applications/findstr/lang/pl-PL.rc b/base/applications/findstr/lang/pl-PL.rc index fca0184c805..7e8ecddf445 100644 --- a/base/applications/findstr/lang/pl-PL.rc +++ b/base/applications/findstr/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Dec,2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,15 +11,15 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "FIND: Wywietla wszystkie linie danego pliku, zawierajce szukany cig znakw.\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] ""cig znakw"" [ plik... ]\n\ - /C Oblicza w ilu liniach pojawi si szukany cig znakw\n\ - /I Ignoruje wielko liter\n\ - /N Numeruje wywietlane linie, zaczynajc od 1\n\ - /V Wywietla te linie, ktre nie zawieraj szukanego cigu znakw" +IDS_USAGE, "FIND: Wyświetla wszystkie linie danego pliku, zawierające szukany ciąg znaków.\n\n\ + FIND [ /C ] [ /I ] [ /N ] [ /V ] ""ciąg znaków"" [ plik... ]\n\ + /C Oblicza w ilu liniach pojawił się szukany ciąg znaków\n\ + /I Ignoruje wielkość liter\n\ + /N Numeruje wyświetlane linie, zaczynając od 1\n\ + /V Wyświetla te linie, które nie zawierają szukanego ciągu znaków" -IDS_NO_SUCH_FILE, "FIND: %s: Plik nie zosta znaleziony\n" +IDS_NO_SUCH_FILE, "FIND: %s: Plik nie został znaleziony\n" -IDS_CANNOT_OPEN, "FIND: %s: Nie mona otworzy pliku\n" +IDS_CANNOT_OPEN, "FIND: %s: Nie można otworzyć pliku\n" END diff --git a/base/applications/findstr/lang/ru-RU.rc b/base/applications/findstr/lang/ru-RU.rc index 726ebec18e4..945555940b8 100644 --- a/base/applications/findstr/lang/ru-RU.rc +++ b/base/applications/findstr/lang/ru-RU.rc @@ -3,15 +3,15 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "FIND: .\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] """" [ ... ]\n\ - /C , .\n\ - /I .\n\ - /N ( 1).\n\ - /V , ." +IDS_USAGE, "FIND: Поиск текстовой строки в одном или нескольких файлах.\n\n\ + FIND [ /C ] [ /I ] [ /N ] [ /V ] ""строка"" [ файл... ]\n\ + /C Вывод только общего числа строк, содержащих заданную строку.\n\ + /I Поиск без учета регистра символов.\n\ + /N Вывод номеров отображаемых строк (начиная с 1).\n\ + /V Вывод всех строк, НЕ содержащих заданную строку." -IDS_NO_SUCH_FILE, "FIND: %s: .\n" +IDS_NO_SUCH_FILE, "FIND: %s: Файл не существует.\n" -IDS_CANNOT_OPEN, "FIND: %s: .\n" +IDS_CANNOT_OPEN, "FIND: %s: Невозможно открыть файл.\n" END diff --git a/base/applications/findstr/lang/uk-UA.rc b/base/applications/findstr/lang/uk-UA.rc index 43b241f33fd..7cef30daf65 100644 --- a/base/applications/findstr/lang/uk-UA.rc +++ b/base/applications/findstr/lang/uk-UA.rc @@ -11,15 +11,15 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "FIND: , .\n\n\ - FIND [ /C ] [ /I ] [ /N ] [ /V ] """" [ ... ]\n\ - /C , \n\ - /I \n\ - /N , ( 1)\n\ - /V , " +IDS_USAGE, "FIND: Виведення всіх рядків файлу, які містять рядок.\n\n\ + FIND [ /C ] [ /I ] [ /N ] [ /V ] ""рядок"" [ файл... ]\n\ + /C Порахувати кількість рядків, які містять рядок\n\ + /I Не враховувати регістр символів\n\ + /N Нумерувати рядки, які відображаються (починаючи з 1)\n\ + /V Виведення рядків, які не містять заданий рядок" -IDS_NO_SUCH_FILE, "FIND: %s: \n" +IDS_NO_SUCH_FILE, "FIND: %s: Файл не існує\n" -IDS_CANNOT_OPEN, "FIND: %s: \n" +IDS_CANNOT_OPEN, "FIND: %s: Неможливо відкрити файл\n" END diff --git a/base/applications/findstr/rsrc.rc b/base/applications/findstr/rsrc.rc index 99baec73cbe..de7ca5a5faa 100644 --- a/base/applications/findstr/rsrc.rc +++ b/base/applications/findstr/rsrc.rc @@ -12,9 +12,13 @@ #include "lang/it-IT.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/fontview/fontview.rc b/base/applications/fontview/fontview.rc index ff75e1dc45a..49ab20e58f2 100644 --- a/base/applications/fontview/fontview.rc +++ b/base/applications/fontview/fontview.rc @@ -12,19 +12,21 @@ BEGIN IDS_SPECIALCHARS, "0123456789.:,;(*!?')" END - #include "lang/bg-BG.rc" #include "lang/de-DE.rc" #include "lang/en-US.rc" #include "lang/es-ES.rc" #include "lang/fr-FR.rc" #include "lang/lt-LT.rc" -#include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/no-NO.rc" #include "lang/zh-CN.rc" #include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/fontview/lang/pl-PL.rc b/base/applications/fontview/lang/pl-PL.rc index 1a1525bad57..85d0eb936b0 100644 --- a/base/applications/fontview/lang/pl-PL.rc +++ b/base/applications/fontview/lang/pl-PL.rc @@ -1,20 +1,21 @@ /* - * translated by Caemyr - Olaf Siejka (Feb, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Feb, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_QUIT, "Wyjcie" + IDS_QUIT, "Wyjście" IDS_PRINT, "Drukuj" - IDS_STRING, "W Szczebrzeszynie chrzszcz brzmi w trzcinie. 1234567890" - IDS_ERROR, "Bd" - IDS_ERROR_NOMEM, "Brakuje pamici do ukoczenia tej operacji." + IDS_STRING, "Zażółć gęślą Jaźń żółwiątkiem. 1234567890. !@#$%^&*()_+=-/?" + IDS_ERROR, "Błąd" + IDS_ERROR_NOMEM, "Brakuje pamięci do ukończenia tej operacji." IDS_ERROR_NOFONT, "Plik %1 nie jest poprawnym plikiem czcionki." - IDS_ERROR_NOCLASS, "Nie udao si zainicjowa klasy window." - IDS_ERROR_BADCMD, "Brak pliku czcionki.\nSkadnia:\n fontview.exe " + IDS_ERROR_NOCLASS, "Nie udało się zainicjować klasy window." + IDS_ERROR_BADCMD, "Brak pliku czcionki.\nSkładnia:\n fontview.exe " END diff --git a/base/applications/fontview/lang/ro-RO.rc b/base/applications/fontview/lang/ro-RO.rc index 07ce527cd66..07f56dd0986 100644 --- a/base/applications/fontview/lang/ro-RO.rc +++ b/base/applications/fontview/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - STRINGTABLE DISCARDABLE BEGIN IDS_QUIT, "Ieșire" @@ -13,5 +11,3 @@ BEGIN IDS_ERROR_NOCLASS, "Nu s-a putut iniţializa clasa de ferestre." IDS_ERROR_BADCMD, "Niciun font specificat.\nSintaxă:\n fontview.exe " END - -#pragma code_page(default) diff --git a/base/applications/fontview/lang/ru-RU.rc b/base/applications/fontview/lang/ru-RU.rc index 1ba0655aace..81f123f665e 100644 --- a/base/applications/fontview/lang/ru-RU.rc +++ b/base/applications/fontview/lang/ru-RU.rc @@ -4,14 +4,12 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_QUIT, "" - IDS_PRINT, "" - IDS_STRING, "Jackdaws love my big sphinx of quartz. 1234567890" - IDS_ERROR, "" - IDS_ERROR_NOMEM, " , ." - IDS_ERROR_NOFONT, "%1 ." - IDS_ERROR_NOCLASS, " ." - IDS_ERROR_BADCMD, " .\n:\n fontview.exe <_>" + IDS_QUIT, "Выход" + IDS_PRINT, "Печать" + IDS_STRING, "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр! 1234567890" + IDS_ERROR, "Ошибка" + IDS_ERROR_NOMEM, "Недостаточно памяти, чтобы завершить операцию." + IDS_ERROR_NOFONT, "%1 не является корректным файлом шрифта." + IDS_ERROR_NOCLASS, "Невозможно инициализировать класс окна." + IDS_ERROR_BADCMD, "Не указан файл шрифта.\nСинтаксис:\n fontview.exe <файл_шрифта>" END - - diff --git a/base/applications/fontview/lang/uk-UA.rc b/base/applications/fontview/lang/uk-UA.rc index 5ba42fa40eb..d57d47b050a 100644 --- a/base/applications/fontview/lang/uk-UA.rc +++ b/base/applications/fontview/lang/uk-UA.rc @@ -10,12 +10,12 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_QUIT, "" - IDS_PRINT, "" - IDS_STRING, "Jackdaws love my big sphinx of quartz. 1234567890" - IDS_ERROR, "" - IDS_ERROR_NOMEM, " ' ." - IDS_ERROR_NOFONT, " %1 ." - IDS_ERROR_NOCLASS, " ." - IDS_ERROR_BADCMD, " .\n:\n fontview.exe < >" + IDS_QUIT, "Вихід" + IDS_PRINT, "Друк" + IDS_STRING, "Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! 1234567890" + IDS_ERROR, "Помилка" + IDS_ERROR_NOMEM, "Недостатньо пам'яті для завершення операції." + IDS_ERROR_NOFONT, "Файл %1 не є коректним файлом шрифту." + IDS_ERROR_NOCLASS, "Неможливо ініціалізувати віконний клас." + IDS_ERROR_BADCMD, "Не вказаний файл шрифту.\nСинтаксис:\n fontview.exe <файл_шрифту>" END diff --git a/base/applications/games/solitaire/CMakeLists.txt b/base/applications/games/solitaire/CMakeLists.txt index c0daaa0ebeb..2a4c737f685 100644 --- a/base/applications/games/solitaire/CMakeLists.txt +++ b/base/applications/games/solitaire/CMakeLists.txt @@ -15,6 +15,6 @@ target_link_libraries(sol cardlib) set_module_type(sol win32gui) -add_importlibs(sol advapi32 comctl32 user32 gdi32 kernel32 msvcrt) +add_importlibs(sol advapi32 comctl32 user32 gdi32 msvcrt kernel32) add_cd_file(TARGET sol DESTINATION reactos/system32 FOR all) diff --git a/base/applications/games/solitaire/lang/pl-PL.rc b/base/applications/games/solitaire/lang/pl-PL.rc index 74c57fba51c..6af7abd1c9d 100644 --- a/base/applications/games/solitaire/lang/pl-PL.rc +++ b/base/applications/games/solitaire/lang/pl-PL.rc @@ -1,14 +1,14 @@ /* * translated by TestamenT & xrogers - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * updated by Caemyr (olaf_siejka@o2.pl), Nov, 2008 - * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * updated by Caemyr (olaf_siejka@o2.pl), Nov, 2008 + * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT - /* Dialogs */ IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 @@ -17,7 +17,7 @@ CAPTION "Opcje" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Karty", -1, 7, 7, 65, 40 - AUTORADIOBUTTON "Rozdaj &jedn", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "Rozdaj &jedną", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP AUTORADIOBUTTON "Rozdaj &dwie", IDC_OPT_DRAWTHREE, 14, 32, 52, 10 AUTOCHECKBOX "&Pokazuj czas gry", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP | WS_DISABLED @@ -55,8 +55,8 @@ STRINGTABLE BEGIN IDS_SOL_NAME "Pasjans" IDS_SOL_ABOUT "Pasjans by J. Brown\n\nCardLib version 1.0." - IDS_SOL_QUIT "Zakoczy aktualn gr?" - IDS_SOL_WIN "Gratulacje, wygrae!" + IDS_SOL_QUIT "Zakończyć aktualną grę?" + IDS_SOL_WIN "Gratulacje, wygrałeś!" IDS_SOL_DEAL "Nowe rozdanie?" END @@ -72,11 +72,11 @@ BEGIN MENUITEM "&Talia...", IDM_GAME_DECK MENUITEM "&Opcje...", IDM_GAME_OPTIONS MENUITEM SEPARATOR - MENUITEM "&Zakocz", IDM_GAME_EXIT + MENUITEM "&Zakończ", IDM_GAME_EXIT END POPUP "Pomo&c" BEGIN - MENUITEM "&Spis treci\tF1", IDM_HELP_CONTENTS + MENUITEM "&Spis treści\tF1", IDM_HELP_CONTENTS MENUITEM "Pasj&ans - informacje", IDM_HELP_ABOUT END END diff --git a/base/applications/games/solitaire/lang/ro-RO.rc b/base/applications/games/solitaire/lang/ro-RO.rc index 279d96ecafc..53d41f14644 100644 --- a/base/applications/games/solitaire/lang/ro-RO.rc +++ b/base/applications/games/solitaire/lang/ro-RO.rc @@ -7,8 +7,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - /* Dialogs */ IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 @@ -91,5 +89,3 @@ BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT END - -#pragma code_page(default) diff --git a/base/applications/games/solitaire/lang/ru-RU.rc b/base/applications/games/solitaire/lang/ru-RU.rc index 32fb55a6b7e..f3b5768d665 100644 --- a/base/applications/games/solitaire/lang/ru-RU.rc +++ b/base/applications/games/solitaire/lang/ru-RU.rc @@ -3,25 +3,25 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -/* */ +/* Диалоги */ IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "" +CAPTION "Настройки" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 65, 40 - AUTORADIOBUTTON " &", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP - AUTORADIOBUTTON " &", IDC_OPT_DRAWTHREE, 14, 32, 52, 10 - AUTOCHECKBOX "& ", IDC_OPT_SHOWTIME, 7 ,51 ,75 ,10, WS_TABSTOP | WS_DISABLED - AUTOCHECKBOX "& ", IDC_OPT_STATUSBAR, 7, 66, 75, 10, WS_TABSTOP + GROUPBOX "Карты", -1, 7, 7, 65, 40 + AUTORADIOBUTTON "По &одной", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "По &три", IDC_OPT_DRAWTHREE, 14, 32, 52, 10 + AUTOCHECKBOX "&Показывать время", IDC_OPT_SHOWTIME, 7 ,51 ,75 ,10, WS_TABSTOP | WS_DISABLED + AUTOCHECKBOX "&Строка состояния", IDC_OPT_STATUSBAR, 7, 66, 75, 10, WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 35, 97, 50, 14 - PUSHBUTTON "", IDCANCEL, 101, 97, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 101, 97, 50, 14 END IDD_CARDBACK DIALOGEX 6, 6, 186, 104 -CAPTION " " +CAPTION "Выбор обложки карт" FONT 8, "MS Shell Dlg" STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT BEGIN @@ -38,39 +38,39 @@ BEGIN CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 124, 46, 26, 32 CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 154, 46, 26, 32 DEFPUSHBUTTON "OK", IDOK, 66, 84, 54, 13 - PUSHBUTTON "", IDCANCEL, 126, 84, 54, 13 + PUSHBUTTON "Отмена", IDCANCEL, 126, 84, 54, 13 END -/* */ +/* Строки */ STRINGTABLE BEGIN - IDS_SOL_NAME "" - IDS_SOL_ABOUT " J Brown\n\nCardLib 1.0." - IDS_SOL_QUIT " ?" + IDS_SOL_NAME "Пасьянс" + IDS_SOL_ABOUT "Пасьянс от J Brown\n\nCardLib версии 1.0." + IDS_SOL_QUIT "Закончить текущую игру?" IDS_SOL_WIN "Congratulations, you win!!" IDS_SOL_DEAL "Deal again?" END -/* */ +/* Меню */ IDR_MENU1 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Игра" BEGIN - MENUITEM "& \tF2", IDM_GAME_NEW + MENUITEM "Н&овая игра\tF2", IDM_GAME_NEW MENUITEM SEPARATOR - MENUITEM "&...", IDM_GAME_DECK - MENUITEM "&...", IDM_GAME_OPTIONS + MENUITEM "&Обложки...", IDM_GAME_DECK + MENUITEM "&Настройки...", IDM_GAME_OPTIONS MENUITEM SEPARATOR - MENUITEM "&", IDM_GAME_EXIT + MENUITEM "&Выход", IDM_GAME_EXIT END - POPUP "&" + POPUP "&Помощь" BEGIN - MENUITEM "&\tF1", IDM_HELP_CONTENTS - MENUITEM "& ", IDM_HELP_ABOUT + MENUITEM "&Справка\tF1", IDM_HELP_CONTENTS + MENUITEM "&О программе", IDM_HELP_ABOUT END END diff --git a/base/applications/games/solitaire/lang/uk-UA.rc b/base/applications/games/solitaire/lang/uk-UA.rc index e4ab3aa55c0..0983910c462 100644 --- a/base/applications/games/solitaire/lang/uk-UA.rc +++ b/base/applications/games/solitaire/lang/uk-UA.rc @@ -13,22 +13,22 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 65, 40 - AUTORADIOBUTTON " &", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP - AUTORADIOBUTTON " &", IDC_OPT_DRAWTHREE, 14, 32, 52, 10 + GROUPBOX "Карти", -1, 7, 7, 65, 40 + AUTORADIOBUTTON "По &одній", IDC_OPT_DRAWONE, 14, 19, 52, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "По &три", IDC_OPT_DRAWTHREE, 14, 32, 52, 10 - AUTOCHECKBOX "& ", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP | WS_DISABLED - AUTOCHECKBOX "& ", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP + AUTOCHECKBOX "&Гра за часом", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP | WS_DISABLED + AUTOCHECKBOX "&Рядок стану", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 35, 97, 50, 14 - PUSHBUTTON "", IDCANCEL, 101, 97, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 101, 97, 50, 14 END IDD_CARDBACK DIALOGEX 6, 6, 186, 104 -CAPTION " " +CAPTION "Вибрати сорочку" FONT 8, "MS Shell Dlg" STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT BEGIN @@ -45,7 +45,7 @@ BEGIN CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 124, 46, 26, 32 CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 154, 46, 26, 32 DEFPUSHBUTTON "OK", IDOK, 66, 84, 54, 13 - PUSHBUTTON "", IDCANCEL, 126, 84, 54, 13 + PUSHBUTTON "Скасувати", IDCANCEL, 126, 84, 54, 13 END @@ -53,11 +53,11 @@ END STRINGTABLE BEGIN - IDS_SOL_NAME "" - IDS_SOL_ABOUT " J Brown\n\nCardLib 1.0." - IDS_SOL_QUIT " ?" - IDS_SOL_WIN "³, !!" - IDS_SOL_DEAL " ?" + IDS_SOL_NAME "Косинка" + IDS_SOL_ABOUT "Косинка від J Brown\n\nCardLib версії 1.0." + IDS_SOL_QUIT "Вийти з поточної гри?" + IDS_SOL_WIN "Вітання, Ви виграли!!" + IDS_SOL_DEAL "Роздати знову?" END @@ -65,19 +65,19 @@ END IDR_MENU1 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Гра" BEGIN - MENUITEM "& \tF2", IDM_GAME_NEW + MENUITEM "&Роздати карти\tF2", IDM_GAME_NEW MENUITEM SEPARATOR - MENUITEM "&...", IDM_GAME_DECK - MENUITEM "&...", IDM_GAME_OPTIONS + MENUITEM "&Колода...", IDM_GAME_DECK + MENUITEM "Па&раметри...", IDM_GAME_OPTIONS MENUITEM SEPARATOR - MENUITEM "&", IDM_GAME_EXIT + MENUITEM "В&ихід", IDM_GAME_EXIT END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "&\tF1", IDM_HELP_CONTENTS - MENUITEM "& ...", IDM_HELP_ABOUT + MENUITEM "&Зміст\tF1", IDM_HELP_CONTENTS + MENUITEM "&Про програму...", IDM_HELP_ABOUT END END diff --git a/base/applications/games/solitaire/rsrc.rc b/base/applications/games/solitaire/rsrc.rc index 09b4d5424a9..0614ccd5d8c 100644 --- a/base/applications/games/solitaire/rsrc.rc +++ b/base/applications/games/solitaire/rsrc.rc @@ -22,10 +22,13 @@ IDI_SOLITAIRE ICON DISCARDABLE "solitaire.ico" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/th-TH.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" -#include "lang/th-TH.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/base/applications/games/spider/CMakeLists.txt b/base/applications/games/spider/CMakeLists.txt index 560c6d5b18e..cf44a846995 100644 --- a/base/applications/games/spider/CMakeLists.txt +++ b/base/applications/games/spider/CMakeLists.txt @@ -15,6 +15,6 @@ target_link_libraries(spider cardlib) set_module_type(spider win32gui) -add_importlibs(spider advapi32 comctl32 user32 gdi32 kernel32 msvcrt) +add_importlibs(spider advapi32 comctl32 user32 gdi32 msvcrt kernel32) add_cd_file(TARGET spider DESTINATION reactos/system32 FOR all) diff --git a/base/applications/games/spider/lang/pl-PL.rc b/base/applications/games/spider/lang/pl-PL.rc index cdae2d82140..31444d93146 100644 --- a/base/applications/games/spider/lang/pl-PL.rc +++ b/base/applications/games/spider/lang/pl-PL.rc @@ -1,20 +1,18 @@ /* - * PROJECT: Spider Solitaire - * LICENSE: See COPYING in top level directory - * FILE: base/applications/games/spider/lang/pl-PL.rc - * PURPOSE: Polish Language File for Spider Solitaire - * TRANSLATOR: Maciej Bialas + * PROJECT: Spider Solitaire + * LICENSE: See COPYING in top level directory + * FILE: base/applications/games/spider/lang/pl-PL.rc + * PURPOSE: Polish Language File for Spider Solitaire + * TRANSLATOR: Maciej Bialas + * UTF-8 conversion by Caemyr (May, 2011) */ -#include "resource.h" - LANGUAGE LANG_POLISH, SUBLANG_DEFAULT - /* Dialogs */ IDD_CARDBACK DIALOGEX 6, 6, 186, 104 -CAPTION "Wybierz koszulk talii" +CAPTION "Wybierz koszulkę talii" FONT 8, "MS Shell Dlg" STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT BEGIN @@ -36,11 +34,11 @@ END IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "Poziom trudnoci" +CAPTION "Poziom trudności" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "atwy: &Jeden kolor", IDC_DIF_ONECOLOR, 8, 10, 80, 10, WS_GROUP | WS_TABSTOP - AUTORADIOBUTTON "redni: &Dwa kolory", IDC_DIF_TWOCOLORS, 8, 23, 80, 10 + AUTORADIOBUTTON "Łatwy: &Jeden kolor", IDC_DIF_ONECOLOR, 8, 10, 80, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "Średni: &Dwa kolory", IDC_DIF_TWOCOLORS, 8, 23, 80, 10 AUTORADIOBUTTON "Trudny: &Cztery kolory", IDC_DIF_FOURCOLORS, 8, 36, 80, 10 DEFPUSHBUTTON "OK", IDOK, 8, 58, 40, 14 @@ -51,11 +49,11 @@ END STRINGTABLE BEGIN - IDS_SPI_NAME "Pajk" - IDS_SPI_ABOUT "Pasjans - Pajk, autor: Gregor Schneider\n\nCardLib wersja 1.0" - IDS_SPI_QUIT "Czy na pewno chcesz zakoczy?" - IDS_SPI_WIN "Gratulacje, wygrae(a)!" - IDS_SPI_DEAL "Rozda ponownie?" + IDS_SPI_NAME "Pająk" + IDS_SPI_ABOUT "Pasjans - Pająk, autor: Gregor Schneider\n\nCardLib wersja 1.0" + IDS_SPI_QUIT "Czy na pewno chcesz zakończyć?" + IDS_SPI_WIN "Gratulacje, wygrałeś(aś)!" + IDS_SPI_DEAL "Rozdać ponownie?" END @@ -69,11 +67,11 @@ BEGIN MENUITEM SEPARATOR MENUITEM "&Talia...", IDM_GAME_DECK MENUITEM SEPARATOR - MENUITEM "&Wyjcie", IDM_GAME_EXIT + MENUITEM "&Wyjście", IDM_GAME_EXIT END POPUP "&Pomoc" BEGIN - MENUITEM "&Zawarto\tF1", IDM_HELP_CONTENTS + MENUITEM "&Zawartość\tF1", IDM_HELP_CONTENTS MENUITEM "&O programie", IDM_HELP_ABOUT END END diff --git a/base/applications/games/spider/lang/ru-RU.rc b/base/applications/games/spider/lang/ru-RU.rc index 8701fef3c11..4c81651a3ba 100644 --- a/base/applications/games/spider/lang/ru-RU.rc +++ b/base/applications/games/spider/lang/ru-RU.rc @@ -14,7 +14,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT /* Dialogs */ IDD_CARDBACK DIALOGEX 6, 6, 186, 104 -CAPTION " " +CAPTION "Выбор оформления" FONT 8, "MS Shell Dlg" STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT BEGIN @@ -31,31 +31,31 @@ BEGIN CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 124, 46, 26, 32 CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 154, 46, 26, 32 DEFPUSHBUTTON "OK", IDOK, 66, 84, 54, 13 - PUSHBUTTON "", IDCANCEL, 126, 84, 54, 13 + PUSHBUTTON "Отмена", IDCANCEL, 126, 84, 54, 13 END IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 112, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "" +CAPTION "Уровень" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON ": & ", IDC_DIF_ONECOLOR, 8, 10, 102, 10, WS_GROUP | WS_TABSTOP - AUTORADIOBUTTON ": & ", IDC_DIF_TWOCOLORS, 8, 23, 102, 10 - AUTORADIOBUTTON ": & ", IDC_DIF_FOURCOLORS, 8, 36, 102, 10 + AUTORADIOBUTTON "Простой: &один цвет", IDC_DIF_ONECOLOR, 8, 10, 102, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "Средний: &два цвета", IDC_DIF_TWOCOLORS, 8, 23, 102, 10 + AUTORADIOBUTTON "Сложный: &четыре цвета", IDC_DIF_FOURCOLORS, 8, 36, 102, 10 DEFPUSHBUTTON "OK", IDOK, 8, 58, 40, 14 - PUSHBUTTON "", IDCANCEL, 63, 58, 40, 14 + PUSHBUTTON "Отмена", IDCANCEL, 63, 58, 40, 14 END /* Strings */ STRINGTABLE BEGIN - IDS_SPI_NAME " """"" - IDS_SPI_ABOUT " """", Gregor Schneider\n\nCardLib 1.0" - IDS_SPI_QUIT " ?" - IDS_SPI_WIN ", !" - IDS_SPI_DEAL " ?" + IDS_SPI_NAME "Пасьянс ""Паук""" + IDS_SPI_ABOUT "Пасьянс ""Паук"", Gregor Schneider\n\nCardLib версии 1.0" + IDS_SPI_QUIT "Выйти из текущей игры?" + IDS_SPI_WIN "Поздравляем, вы выйграли!" + IDS_SPI_DEAL "Попробовать снова?" END @@ -63,18 +63,18 @@ END IDR_MENU1 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Игра" BEGIN - MENUITEM "& \tF2", IDM_GAME_NEW + MENUITEM "&Новая игра\tF2", IDM_GAME_NEW MENUITEM SEPARATOR - MENUITEM "&...", IDM_GAME_DECK + MENUITEM "&Оформление...", IDM_GAME_DECK MENUITEM SEPARATOR - MENUITEM "&", IDM_GAME_EXIT + MENUITEM "&Выход", IDM_GAME_EXIT END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "& \tF1", IDM_HELP_CONTENTS - MENUITEM "& ", IDM_HELP_ABOUT + MENUITEM "&Просмотр справки\tF1", IDM_HELP_CONTENTS + MENUITEM "&О программе", IDM_HELP_ABOUT END END diff --git a/base/applications/games/spider/lang/uk-UA.rc b/base/applications/games/spider/lang/uk-UA.rc index 2b4163c3ac4..7a75d11e7fc 100644 --- a/base/applications/games/spider/lang/uk-UA.rc +++ b/base/applications/games/spider/lang/uk-UA.rc @@ -16,7 +16,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT /* Dialogs */ IDD_CARDBACK DIALOGEX 6, 6, 186, 104 -CAPTION " " +CAPTION "Вибір оформлення" FONT 8, "MS Shell Dlg" STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT BEGIN @@ -33,31 +33,31 @@ BEGIN CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 124, 46, 26, 32 CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 154, 46, 26, 32 DEFPUSHBUTTON "OK", IDOK, 66, 84, 54, 13 - PUSHBUTTON "", IDCANCEL, 126, 84, 54, 13 + PUSHBUTTON "Скасувати", IDCANCEL, 126, 84, 54, 13 END IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "г" +CAPTION "Рівень" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON ": & ", IDC_DIF_ONECOLOR, 3, 10, 82, 10, WS_GROUP | WS_TABSTOP - AUTORADIOBUTTON ": & ", IDC_DIF_TWOCOLORS, 3, 23, 92, 10 - AUTORADIOBUTTON ": & ", IDC_DIF_FOURCOLORS, 3, 36, 120, 10 + AUTORADIOBUTTON "Простий: &Один колір", IDC_DIF_ONECOLOR, 3, 10, 82, 10, WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "Середній: &Два кольори", IDC_DIF_TWOCOLORS, 3, 23, 92, 10 + AUTORADIOBUTTON "Складний: &Чотири кольори", IDC_DIF_FOURCOLORS, 3, 36, 120, 10 DEFPUSHBUTTON "OK", IDOK, 8, 58, 40, 14 - PUSHBUTTON "", IDCANCEL, 58, 58, 40, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 58, 58, 40, 14 END /* Strings */ STRINGTABLE BEGIN - IDS_SPI_NAME " " - IDS_SPI_ABOUT " , Gregor Schneider\n\nCardLib 1.0" - IDS_SPI_QUIT " ?" - IDS_SPI_WIN "³, !" - IDS_SPI_DEAL " ?" + IDS_SPI_NAME "Пас’янс Паук" + IDS_SPI_ABOUT "Пас’янс Паук, Gregor Schneider\n\nCardLib версії 1.0" + IDS_SPI_QUIT "Вийти з поточної гри?" + IDS_SPI_WIN "Вітаємо, ви виграли!" + IDS_SPI_DEAL "Спробувати знову?" END @@ -65,18 +65,18 @@ END IDR_MENU1 MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Гра" BEGIN - MENUITEM "& \tF2", IDM_GAME_NEW + MENUITEM "&Нова гра\tF2", IDM_GAME_NEW MENUITEM SEPARATOR - MENUITEM "&...", IDM_GAME_DECK + MENUITEM "&Оформлення...", IDM_GAME_DECK MENUITEM SEPARATOR - MENUITEM "&", IDM_GAME_EXIT + MENUITEM "&Вихід", IDM_GAME_EXIT END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "& \tF1", IDM_HELP_CONTENTS - MENUITEM "& ...", IDM_HELP_ABOUT + MENUITEM "Пе&регляд довідки\tF1", IDM_HELP_CONTENTS + MENUITEM "&Про програму...", IDM_HELP_ABOUT END END diff --git a/base/applications/games/spider/rsrc.rc b/base/applications/games/spider/rsrc.rc index 97b255c0f99..adfb83be8cd 100644 --- a/base/applications/games/spider/rsrc.rc +++ b/base/applications/games/spider/rsrc.rc @@ -14,8 +14,10 @@ IDI_SPIDER ICON DISCARDABLE "spider.ico" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" +#include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" - diff --git a/base/applications/games/winmine/lang/bg-BG.rc b/base/applications/games/winmine/lang/bg-BG.rc index bceaa5517bb..6bae6eb46b7 100644 --- a/base/applications/games/winmine/lang/bg-BG.rc +++ b/base/applications/games/winmine/lang/bg-BG.rc @@ -20,8 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/cs-CZ.rc b/base/applications/games/winmine/lang/cs-CZ.rc index 5e17ea274cb..e9539a8598f 100644 --- a/base/applications/games/winmine/lang/cs-CZ.rc +++ b/base/applications/games/winmine/lang/cs-CZ.rc @@ -22,8 +22,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_CZECH, SUBLANG_DEFAULT /* Czech strings in CP1250 */ diff --git a/base/applications/games/winmine/lang/da-DK.rc b/base/applications/games/winmine/lang/da-DK.rc index d3430f9b345..33a387d96bf 100644 --- a/base/applications/games/winmine/lang/da-DK.rc +++ b/base/applications/games/winmine/lang/da-DK.rc @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_DANISH, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/de-DE.rc b/base/applications/games/winmine/lang/de-DE.rc index d1e25b1a65d..46fe8b3a7e8 100644 --- a/base/applications/games/winmine/lang/de-DE.rc +++ b/base/applications/games/winmine/lang/de-DE.rc @@ -19,10 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -#pragma code_page(65001) - LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/en-US.rc b/base/applications/games/winmine/lang/en-US.rc index 6536d32f38c..498c840886a 100644 --- a/base/applications/games/winmine/lang/en-US.rc +++ b/base/applications/games/winmine/lang/en-US.rc @@ -20,8 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/es-ES.rc b/base/applications/games/winmine/lang/es-ES.rc index 82bde4e757c..23288143a1c 100644 --- a/base/applications/games/winmine/lang/es-ES.rc +++ b/base/applications/games/winmine/lang/es-ES.rc @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/fi-FI.rc b/base/applications/games/winmine/lang/fi-FI.rc index c24cd172f75..415b6da1ce6 100644 --- a/base/applications/games/winmine/lang/fi-FI.rc +++ b/base/applications/games/winmine/lang/fi-FI.rc @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/fr-FR.rc b/base/applications/games/winmine/lang/fr-FR.rc index 4730642c92d..c442d93fd93 100644 --- a/base/applications/games/winmine/lang/fr-FR.rc +++ b/base/applications/games/winmine/lang/fr-FR.rc @@ -22,11 +22,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/it-IT.rc b/base/applications/games/winmine/lang/it-IT.rc index 9c3643d2e77..5fbbb241534 100644 --- a/base/applications/games/winmine/lang/it-IT.rc +++ b/base/applications/games/winmine/lang/it-IT.rc @@ -21,11 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/ja-JP.rc b/base/applications/games/winmine/lang/ja-JP.rc index 677d08fca96..c1288e232b5 100644 --- a/base/applications/games/winmine/lang/ja-JP.rc +++ b/base/applications/games/winmine/lang/ja-JP.rc @@ -20,11 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/ko-KR.rc b/base/applications/games/winmine/lang/ko-KR.rc index ade7c7a0a8c..0a5f03a1040 100644 --- a/base/applications/games/winmine/lang/ko-KR.rc +++ b/base/applications/games/winmine/lang/ko-KR.rc @@ -21,8 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/lt-LT.rc b/base/applications/games/winmine/lang/lt-LT.rc index b566d324250..e96af19847d 100644 --- a/base/applications/games/winmine/lang/lt-LT.rc +++ b/base/applications/games/winmine/lang/lt-LT.rc @@ -19,11 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/nl-NL.rc b/base/applications/games/winmine/lang/nl-NL.rc index eaee1ba2187..c697c3c3c0e 100644 --- a/base/applications/games/winmine/lang/nl-NL.rc +++ b/base/applications/games/winmine/lang/nl-NL.rc @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/no-NO.rc b/base/applications/games/winmine/lang/no-NO.rc index c03bf179a38..88c946bd572 100644 --- a/base/applications/games/winmine/lang/no-NO.rc +++ b/base/applications/games/winmine/lang/no-NO.rc @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/pl-PL.rc b/base/applications/games/winmine/lang/pl-PL.rc index ff60f15de67..780ab470414 100644 --- a/base/applications/games/winmine/lang/pl-PL.rc +++ b/base/applications/games/winmine/lang/pl-PL.rc @@ -19,10 +19,10 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * UTF-8 conversion by Caemyr (May, 2011) */ -#include "resource.h" - LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE BEGIN @@ -38,12 +38,12 @@ BEGIN MENUITEM SEPARATOR MENUITEM "&Znaczniki", IDM_MARKQ MENUITEM SEPARATOR - MENUITEM "&Pocztkujcy", IDM_BEGINNER + MENUITEM "&Początkujący", IDM_BEGINNER MENUITEM "Z&aawansowany", IDM_ADVANCED MENUITEM "&Ekspert", IDM_EXPERT - MENUITEM "&Uytkownika", IDM_CUSTOM + MENUITEM "&Użytkownika", IDM_CUSTOM MENUITEM SEPARATOR - MENUITEM "W&yjcie\tAlt+X", IDM_EXIT + MENUITEM "W&yjście\tAlt+X", IDM_EXIT END POPUP "&Info" BEGIN MENUITEM "&Najlepsze Wyniki", IDM_TIMES @@ -57,7 +57,7 @@ CAPTION "Najlepsze Wyniki" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Najlepsze Wyniki", -1, 10, 10, 150, 45 - LTEXT "Pocztkujcy", -1, 20, 20, 50, 8 + LTEXT "Początkujący", -1, 20, 20, 50, 8 LTEXT "Zaawansowany", -1, 20, 30, 50, 8 LTEXT "Ekspert", -1, 20, 40, 50, 8 LTEXT "999", IDC_TIME1, 80, 20, 15, 8 @@ -74,14 +74,14 @@ STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_SHEL CAPTION "Gratulacje!" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Podaj swoje imi", -1, 10, 10, 150, 10 + LTEXT "Podaj swoje imię", -1, 10, 10, 150, 10 EDITTEXT IDC_EDITNAME, 25, 20, 110, 12 DEFPUSHBUTTON "OK", IDOK, 60, 40, 40, 15 END DLG_CUSTOM DIALOGEX 0, 0, 100, 100 STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_SHELLFONT -CAPTION "Ustawienia Uytkownika" +CAPTION "Ustawienia Użytkownika" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Wiersze", -1, 5, 5, 30, 10 diff --git a/base/applications/games/winmine/lang/pt-PT.rc b/base/applications/games/winmine/lang/pt-PT.rc index e86e6ff2c0d..c212536b473 100644 --- a/base/applications/games/winmine/lang/pt-PT.rc +++ b/base/applications/games/winmine/lang/pt-PT.rc @@ -21,10 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -#pragma code_page(65001) - LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/ro-RO.rc b/base/applications/games/winmine/lang/ro-RO.rc index d0e05cd19eb..ec7841ae737 100644 --- a/base/applications/games/winmine/lang/ro-RO.rc +++ b/base/applications/games/winmine/lang/ro-RO.rc @@ -19,12 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - STRINGTABLE BEGIN IDS_APPNAME, "WineMine" IDS_NOBODY, "Nimeni" diff --git a/base/applications/games/winmine/lang/ru-RU.rc b/base/applications/games/winmine/lang/ru-RU.rc index 3c7905ac095..04ef952b56e 100644 --- a/base/applications/games/winmine/lang/ru-RU.rc +++ b/base/applications/games/winmine/lang/ru-RU.rc @@ -19,11 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/sl-SI.rc b/base/applications/games/winmine/lang/sl-SI.rc index 855d606f77d..3a27ac7384b 100644 --- a/base/applications/games/winmine/lang/sl-SI.rc +++ b/base/applications/games/winmine/lang/sl-SI.rc @@ -19,10 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -#pragma code_page(65001) - LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/sv-SE.rc b/base/applications/games/winmine/lang/sv-SE.rc index 75785a48e90..8200ccbc132 100644 --- a/base/applications/games/winmine/lang/sv-SE.rc +++ b/base/applications/games/winmine/lang/sv-SE.rc @@ -21,11 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/tr-TR.rc b/base/applications/games/winmine/lang/tr-TR.rc index dc9849350ec..9377aa2b87f 100644 --- a/base/applications/games/winmine/lang/tr-TR.rc +++ b/base/applications/games/winmine/lang/tr-TR.rc @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/uk-UA.rc b/base/applications/games/winmine/lang/uk-UA.rc index a43d6b83703..f9e0f5bbd8e 100644 --- a/base/applications/games/winmine/lang/uk-UA.rc +++ b/base/applications/games/winmine/lang/uk-UA.rc @@ -22,11 +22,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/lang/zh-CN.rc b/base/applications/games/winmine/lang/zh-CN.rc index 2b3a1ae7450..e0764cb3e48 100644 --- a/base/applications/games/winmine/lang/zh-CN.rc +++ b/base/applications/games/winmine/lang/zh-CN.rc @@ -19,11 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "resource.h" - -/* Chinese text is encoded in UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED STRINGTABLE BEGIN diff --git a/base/applications/games/winmine/main.c b/base/applications/games/winmine/main.c index b000b04e9be..b25cb13a17f 100644 --- a/base/applications/games/winmine/main.c +++ b/base/applications/games/winmine/main.c @@ -885,7 +885,7 @@ static LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara case WM_LBUTTONDOWN: WINE_TRACE("WM_LBUTTONDOWN\n"); - if( wParam & MK_RBUTTON ) + if( wParam & (MK_RBUTTON | MK_SHIFT) ) msg = WM_MBUTTONDOWN; TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); SetCapture( hWnd ); @@ -893,7 +893,7 @@ static LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara case WM_LBUTTONUP: WINE_TRACE("WM_LBUTTONUP\n"); - if( wParam & MK_RBUTTON ) + if( wParam & (MK_RBUTTON | MK_SHIFT) ) msg = WM_MBUTTONUP; TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg ); ReleaseCapture(); diff --git a/base/applications/games/winmine/rsrc.rc b/base/applications/games/winmine/rsrc.rc index e4e38e53e51..dbe62842f63 100644 --- a/base/applications/games/winmine/rsrc.rc +++ b/base/applications/games/winmine/rsrc.rc @@ -51,15 +51,16 @@ MINES BITMAP rc/mines.bmp #include "lang/ko-KR.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/tr-TR.rc" -/* UTF-8 */ +// UTF-8 +#pragma code_page(65001) #include "lang/de-DE.rc" #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" +#include "lang/pl-PL.rc" #include "lang/pt-PT.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" diff --git a/base/applications/kbswitch/kbsdll/CMakeLists.txt b/base/applications/kbswitch/kbsdll/CMakeLists.txt index 1f51b602899..45046aac777 100644 --- a/base/applications/kbswitch/kbsdll/CMakeLists.txt +++ b/base/applications/kbswitch/kbsdll/CMakeLists.txt @@ -11,5 +11,5 @@ list(APPEND SOURCE add_library(kbsdll SHARED ${SOURCE}) set_module_type(kbsdll win32dll) -add_importlibs(kbsdll user32 comctl32 kernel32 msvcrt) +add_importlibs(kbsdll user32 comctl32 msvcrt kernel32) add_cd_file(TARGET kbsdll DESTINATION reactos/system32 FOR all) diff --git a/base/applications/kbswitch/lang/pl-PL.rc b/base/applications/kbswitch/lang/pl-PL.rc index 7863ad2c132..6bea6162af8 100644 --- a/base/applications/kbswitch/lang/pl-PL.rc +++ b/base/applications/kbswitch/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Apr,2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl + * translated by Caemyr - Olaf Siejka (Apr,2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -13,6 +14,6 @@ BEGIN BEGIN MENUITEM "&Ustawienia...", ID_PREFERENCES MENUITEM SEPARATOR - MENUITEM "&Wyjcie", ID_EXIT + MENUITEM "&Wyjście", ID_EXIT END END diff --git a/base/applications/kbswitch/lang/ru-RU.rc b/base/applications/kbswitch/lang/ru-RU.rc index d65b1577254..76595ee548d 100644 --- a/base/applications/kbswitch/lang/ru-RU.rc +++ b/base/applications/kbswitch/lang/ru-RU.rc @@ -4,8 +4,8 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "&...", ID_PREFERENCES + MENUITEM "&Параметры...", ID_PREFERENCES MENUITEM SEPARATOR - MENUITEM "&", ID_EXIT + MENUITEM "&Выход", ID_EXIT END END diff --git a/base/applications/kbswitch/lang/uk-UA.rc b/base/applications/kbswitch/lang/uk-UA.rc index 3107c48a1ae..b736354f856 100644 --- a/base/applications/kbswitch/lang/uk-UA.rc +++ b/base/applications/kbswitch/lang/uk-UA.rc @@ -12,8 +12,8 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "&...", ID_PREFERENCES + MENUITEM "&Параметри...", ID_PREFERENCES MENUITEM SEPARATOR - MENUITEM "&", ID_EXIT + MENUITEM "В&ихід", ID_EXIT END END diff --git a/base/applications/kbswitch/rsrc.rc b/base/applications/kbswitch/rsrc.rc index 08c162e64e6..e61940e4a7b 100644 --- a/base/applications/kbswitch/rsrc.rc +++ b/base/applications/kbswitch/rsrc.rc @@ -8,10 +8,13 @@ #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" #include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/logoff/CMakeLists.txt b/base/applications/logoff/CMakeLists.txt index c560717531a..399db9f7a0a 100644 --- a/base/applications/logoff/CMakeLists.txt +++ b/base/applications/logoff/CMakeLists.txt @@ -1,15 +1,12 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - list(APPEND SOURCE misc.c logoff.c logoff.rc) -add_executable(logoff ${CMAKE_CURRENT_BINARY_DIR}/logoff_precomp.h.gch ${SOURCE}) - -add_pch(logoff ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(logoff ${SOURCE}) set_module_type(logoff win32cui) add_importlibs(logoff advapi32 user32 msvcrt kernel32) +add_pch(logoff precomp.h) add_cd_file(TARGET logoff DESTINATION reactos/system32 FOR all) diff --git a/base/applications/logoff/lang/pl-PL.rc b/base/applications/logoff/lang/pl-PL.rc index 319854c8b8a..2ec09847a77 100644 --- a/base/applications/logoff/lang/pl-PL.rc +++ b/base/applications/logoff/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Dec,2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,13 +11,13 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "Przerywa sesj.\n\n\ - /v\t\tWywietla informacj o wykonanej czynnoci.\n\ - /?\t\tWywietla niniejsz pomoc.\n\n" +IDS_USAGE, "Przerywa sesję.\n\n\ + /v\t\tWyświetla informację o wykonanej czynności.\n\ + /?\t\tWyświetla niniejszą pomoc.\n\n" IDS_LOGOFF_REMOTE, "Przerywanie sesji na maszynie zdalnej." IDS_LOGOFF_LOCAL, "Przerywanie niniejszej sesji na maszynie lokalnej." -IDS_ILLEGAL_PARAM, "Nieprawidowy parametr\n" +IDS_ILLEGAL_PARAM, "Nieprawidłowy parametr\n" END /* EOF */ diff --git a/base/applications/logoff/lang/ru-RU.rc b/base/applications/logoff/lang/ru-RU.rc index 8a41aed9c7b..1f18415a373 100644 --- a/base/applications/logoff/lang/ru-RU.rc +++ b/base/applications/logoff/lang/ru-RU.rc @@ -11,13 +11,13 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, " .\n\n\ - /v\t\t .\n\ - /?\t\t .\n\n" +IDS_USAGE, "Завершение сеанса.\n\n\ + /v\t\tОтображение информации о выполненных действиях.\n\ + /?\t\tОтображение этой информации.\n\n" -IDS_LOGOFF_REMOTE, " ." -IDS_LOGOFF_LOCAL, " ." +IDS_LOGOFF_REMOTE, "Завершение сеанса на удаленной машине." +IDS_LOGOFF_LOCAL, "Завершение текущего сеанса на этой машине." -IDS_ILLEGAL_PARAM, " \n" +IDS_ILLEGAL_PARAM, "Ошибка в параметрах\n" END /* EOF */ diff --git a/base/applications/logoff/lang/uk-UA.rc b/base/applications/logoff/lang/uk-UA.rc index b6b1a4e3966..dd916d2d1c2 100644 --- a/base/applications/logoff/lang/uk-UA.rc +++ b/base/applications/logoff/lang/uk-UA.rc @@ -11,13 +11,13 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, " .\n\n\ - /v\t\t³ 䳿.\n\ - /?\t\t³ .\n\n" +IDS_USAGE, "Завершення сеансу.\n\n\ + /v\t\tВідображення інформації про виконані дії.\n\ + /?\t\tВідображення цієї інформації.\n\n" -IDS_LOGOFF_REMOTE, " ." -IDS_LOGOFF_LOCAL, " ." +IDS_LOGOFF_REMOTE, "Завершення сеансу на віддаленій машині." +IDS_LOGOFF_LOCAL, "Завершення поточного сеансу на цій машині." -IDS_ILLEGAL_PARAM, " \n" +IDS_ILLEGAL_PARAM, "Невірні параметри\n" END /* EOF */ diff --git a/base/applications/logoff/rsrc.rc b/base/applications/logoff/rsrc.rc index ac8804a4442..c454dfe8d4f 100644 --- a/base/applications/logoff/rsrc.rc +++ b/base/applications/logoff/rsrc.rc @@ -1,6 +1,3 @@ -#include -#include "resource.h" - #include "lang/bg-BG.rc" #include "lang/ca-ES.rc" #include "lang/cs-CZ.rc" @@ -14,10 +11,13 @@ #include "lang/ko-KR.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" #include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/magnify/lang/pl-PL.rc b/base/applications/magnify/lang/pl-PL.rc index 7f53a881961..84d787938d6 100644 --- a/base/applications/magnify/lang/pl-PL.rc +++ b/base/applications/magnify/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Feb, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Feb, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -11,7 +12,7 @@ IDC_MAGNIFIER MENU BEGIN POPUP "&Plik" BEGIN - MENUITEM "&Wyjcie", IDM_EXIT + MENUITEM "&Wyjście", IDM_EXIT MENUITEM "&Opcje", IDM_OPTIONS MENUITEM SEPARATOR MENUITEM "O p&rogramie ...", IDM_ABOUT @@ -40,18 +41,18 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_ CAPTION "Ustawienia" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "Wyjcie",IDOK,96,161,50,14 + DEFPUSHBUTTON "Wyjście",IDOK,96,161,50,14 PUSHBUTTON "Pomoc",IDC_BUTTON_HELP,38,161,50,14 - LTEXT "Stopie powikszenia:",IDC_STATIC,6,8,68,8 + LTEXT "Stopień powiększenia:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "ledzenia",IDC_STATIC,7,25,139,59 + GROUPBOX "Śledzenie",IDC_STATIC,7,25,139,59 GROUPBOX "Prezentacja",IDC_STATIC,7,87,139,57 - CONTROL "Podaj za kursorem myszki",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,42,114,10 - CONTROL "Podaj za aktywnym oknem",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,114,10 - CONTROL "Podaj za tekstem",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,114,10 - CONTROL "Odwr kolory",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,114,10 - CONTROL "Uruchom zminimalizowan",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,114,10 - CONTROL "Poka Lup",IDC_SHOWMAGNIFIERCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,126,114,10 + CONTROL "Podążaj za kursorem myszki",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,42,114,10 + CONTROL "Podążaj za aktywnym oknem",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,114,10 + CONTROL "Podążaj za tekstem",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,114,10 + CONTROL "Odwróć kolory",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,114,10 + CONTROL "Uruchom zminimalizowaną",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,114,10 + CONTROL "Pokaż Lupę",IDC_SHOWMAGNIFIERCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,126,114,10 END IDD_WARNINGDIALOG DIALOGEX 0, 0, 250, 97 @@ -61,8 +62,8 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,193,76,50,14 ICON IDI_ICON,IDC_STATIC,7,17,20,20 - LTEXT "Lupa ma za zadanie dostarczy podstawowy poziom funkcjonalnoci dla osb z niewielkimi problemami ze wzrokiem. Uytkownicy ze znaczniejszymi problemami ze wzrokiem mog by zmuszeni uy bardziej zaawansowanego narzdzia.",IDC_STATIC,36,7,207,33 - CONTROL "Nie pokazuj wicej tej wiadomoci",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10 + LTEXT "Lupa ma za zadanie dostarczyć podstawowy poziom funkcjonalności dla osób z niewielkimi problemami ze wzrokiem. Użytkownicy ze znaczniejszymi problemami ze wzrokiem mogą być zmuszeni użyć bardziej zaawansowanego narzędzia.",IDC_STATIC,36,7,207,33 + CONTROL "Nie pokazuj więcej tej wiadomości",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10 END STRINGTABLE diff --git a/base/applications/magnify/lang/ro-RO.rc b/base/applications/magnify/lang/ro-RO.rc index ad8ad7bbd4a..4bd21a55147 100644 --- a/base/applications/magnify/lang/ro-RO.rc +++ b/base/applications/magnify/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDC_MAGNIFIER MENU BEGIN POPUP "&Fișier" @@ -64,5 +62,3 @@ STRINGTABLE BEGIN IDS_APP_TITLE "Lupă" END - -#pragma code_page(default) diff --git a/base/applications/magnify/lang/ru-RU.rc b/base/applications/magnify/lang/ru-RU.rc index 12097918c3e..488fbd4c834 100644 --- a/base/applications/magnify/lang/ru-RU.rc +++ b/base/applications/magnify/lang/ru-RU.rc @@ -2,12 +2,12 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDC_MAGNIFIER MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&", IDM_EXIT - MENUITEM "&", IDM_OPTIONS + MENUITEM "&Выход", IDM_EXIT + MENUITEM "&Параметры", IDM_OPTIONS MENUITEM SEPARATOR - MENUITEM "& ...", IDM_ABOUT + MENUITEM "&О программе...", IDM_ABOUT END END @@ -19,46 +19,46 @@ END IDD_ABOUTBOX DIALOGEX 22, 17, 220, 75 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "О программе" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_ICON,IDC_MYICON,14,9,20,20 - LTEXT " . 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX - LTEXT " (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,48,24,150,22 + LTEXT "Экранная лупа. Версия 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Авторские права (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,48,24,150,22 PUSHBUTTON "OK",IDOK,162,48,50,14 END IDD_DIALOGOPTIONS DIALOGEX 0, 0, 185, 182 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "&",IDOK,94,158,50,14 - PUSHBUTTON "&",IDC_BUTTON_HELP,34,158,50,14 - LTEXT ":",IDC_STATIC,6,8,68,8 + DEFPUSHBUTTON "В&ыход",IDOK,94,158,50,14 + PUSHBUTTON "&Справка",IDC_BUTTON_HELP,34,158,50,14 + LTEXT "Увеличение:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,92,6,85,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "",IDC_STATIC,7,25,170,59 - GROUPBOX "",IDC_STATIC,7,87,170,57 - CONTROL " & ",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,42,155,10 - CONTROL " & ",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,155,10 - CONTROL " & ",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,155,10 - CONTROL "& ",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,150,10 - CONTROL "& ",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,150,10 - CONTROL "& ",IDC_SHOWMAGNIFIERCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,126,150,10 + GROUPBOX "Слежение",IDC_STATIC,7,25,170,59 + GROUPBOX "Представление",IDC_STATIC,7,87,170,57 + CONTROL "Следовать за ук&азателем мыши",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,42,155,10 + CONTROL "Следовать за ф&окусом ввода",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,155,10 + CONTROL "Следовать за р&едактированием текста",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,155,10 + CONTROL "О&братить цвета",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,150,10 + CONTROL "&Запускать в свернутом виде",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,150,10 + CONTROL "О&тображать окно экранной лупы",IDC_SHOWMAGNIFIERCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,126,150,10 END IDD_WARNINGDIALOG DIALOGEX 0, 0, 250, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Экранная лупа" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,193,76,50,14 ICON IDI_ICON,IDC_STATIC,7,17,20,20 - LTEXT """ "" . .",IDC_STATIC,36,7,207,33 - CONTROL " ",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,58,230,10 + LTEXT """Экранная лупа"" обеспечивает лишь начальный уровень возможностей для людей с плохим зрением. Пользователям с сильными нарушениями зрения лучше применять специальные программы с более широкими возможностями.",IDC_STATIC,36,7,207,33 + CONTROL "Не выводить это сообщение в дальнейшем",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,58,230,10 END STRINGTABLE BEGIN - IDS_APP_TITLE " " + IDS_APP_TITLE "Экранная лупа" END diff --git a/base/applications/magnify/lang/uk-UA.rc b/base/applications/magnify/lang/uk-UA.rc index 296d7c24dfb..d21865e67b3 100644 --- a/base/applications/magnify/lang/uk-UA.rc +++ b/base/applications/magnify/lang/uk-UA.rc @@ -10,12 +10,12 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDC_MAGNIFIER MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&", IDM_EXIT - MENUITEM "&", IDM_OPTIONS + MENUITEM "В&ихід", IDM_EXIT + MENUITEM "П&араметри", IDM_OPTIONS MENUITEM SEPARATOR - MENUITEM "& ...", IDM_ABOUT + MENUITEM "&Про програму ...", IDM_ABOUT END END @@ -27,46 +27,46 @@ END IDD_ABOUTBOX DIALOGEX 22, 17, 220, 75 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Про програму" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_ICON,IDC_MYICON,14,9,20,20 - LTEXT " 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Екранна лупа Версія 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,48,24,125,22 PUSHBUTTON "OK",IDOK,162,48,50,14 END IDD_DIALOGOPTIONS DIALOGEX 0, 0, 153, 182 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Параметри екранної лупи" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "",IDOK,96,161,50,14 - PUSHBUTTON "",IDC_BUTTON_HELP,38,161,50,14 - LTEXT ":",IDC_STATIC,6,8,68,8 + DEFPUSHBUTTON "Вихід",IDOK,96,161,50,14 + PUSHBUTTON "Довідка",IDC_BUTTON_HELP,38,161,50,14 + LTEXT "Збільшення:",IDC_STATIC,6,8,68,8 COMBOBOX IDC_ZOOM,72,6,63,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "³",IDC_STATIC,7,25,139,59 - GROUPBOX "",IDC_STATIC,7,87,139,57 - CONTROL "³ ",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,42,114,10 - CONTROL "³ ",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,114,10 - CONTROL "³ ",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,114,10 - CONTROL " ",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,114,10 - CONTROL " ",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,114,10 - CONTROL " ",IDC_SHOWMAGNIFIERCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,126,114,10 + GROUPBOX "Відстеження",IDC_STATIC,7,25,139,59 + GROUPBOX "Подання",IDC_STATIC,7,87,139,57 + CONTROL "Відстежувати вказівник миші",IDC_FOLLOWMOUSECHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,42,114,10 + CONTROL "Відстежувати фокус вводу",IDC_FOLLOWKEYBOARDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,114,10 + CONTROL "Відстежувати редагування тексту",IDC_FOLLOWTEXTEDITINGCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,114,10 + CONTROL "Обернути кольори",IDC_INVERTCOLORSCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,114,10 + CONTROL "Запустити у згорнутому вигляді",IDC_STARTMINIMIZEDCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,114,10 + CONTROL "Показувати вікно екранної лупи",IDC_SHOWMAGNIFIERCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,126,114,10 END IDD_WARNINGDIALOG DIALOGEX 0, 0, 250, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Екранна лупа ReactOS" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,193,76,50,14 ICON IDI_ICON,IDC_STATIC,7,17,20,20 - LTEXT " . .",IDC_STATIC,36,7,207,33 - CONTROL " ",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10 + LTEXT "Екранна лупа надає лише мінімальний обсяг можливостей для людей із порушенням зору. Більшості таких користувачів доцільно застосовувати спеціальні програми з більш широкими можливостями.",IDC_STATIC,36,7,207,33 + CONTROL "Більше не показувати це повідомлення",IDC_SHOWWARNINGCHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,43,80,137,10 END STRINGTABLE BEGIN - IDS_APP_TITLE " " + IDS_APP_TITLE "Екранна лупа" END diff --git a/base/applications/magnify/rsrc.rc b/base/applications/magnify/rsrc.rc index 97722000f63..f407b9273e9 100644 --- a/base/applications/magnify/rsrc.rc +++ b/base/applications/magnify/rsrc.rc @@ -9,11 +9,14 @@ #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/sv-SE.rc" +#include "lang/zh-CN.rc" +#include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" -#include "lang/sv-SE.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" -#include "lang/zh-TW.rc" diff --git a/base/applications/mmc/CMakeLists.txt b/base/applications/mmc/CMakeLists.txt index 765cf2e2b3b..39bdd4f405b 100644 --- a/base/applications/mmc/CMakeLists.txt +++ b/base/applications/mmc/CMakeLists.txt @@ -8,9 +8,8 @@ list(APPEND SOURCE mmc.c mmc.rc) -add_executable(mmcclient ${CMAKE_CURRENT_BINARY_DIR}/mmcclient_precomp.h.gch ${SOURCE}) - -add_pch(mmcclient ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(mmcclient ${SOURCE}) set_module_type(mmcclient win32gui) add_importlibs(mmcclient user32 gdi32 comdlg32 advapi32 shell32 comctl32 msvcrt kernel32) +add_pch(mmcclient precomp.h) diff --git a/base/applications/mmc/lang/pl-PL.rc b/base/applications/mmc/lang/pl-PL.rc index 856c2b00940..dba2f6a5060 100644 --- a/base/applications/mmc/lang/pl-PL.rc +++ b/base/applications/mmc/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* -* translated by xrogers -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -11,17 +12,17 @@ BEGIN POPUP "Pl&ik" BEGIN MENUITEM SEPARATOR - MENUITEM "Za&kocz\tAlt+F4", ID_FILE_EXIT + MENUITEM "Za&kończ\tAlt+F4", ID_FILE_EXIT END POPUP "&Pomoc" BEGIN - MENUITEM "Konsola Zarzdzania ReactOS - i&nformacje...", ID_HELP_ABOUT + MENUITEM "Konsola Zarządzania ReactOS - i&nformacje...", ID_HELP_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_APPTITLE "Konsola Zarzdzania ReactOS" + IDS_APPTITLE "Konsola Zarządzania ReactOS" IDS_CONSOLETITLE "Konsola%1!u!" END diff --git a/base/applications/mmc/lang/ru-RU.rc b/base/applications/mmc/lang/ru-RU.rc index a4ea202e8a2..1602e37974c 100644 --- a/base/applications/mmc/lang/ru-RU.rc +++ b/base/applications/mmc/lang/ru-RU.rc @@ -4,20 +4,20 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDM_CONSOLEROOT MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN MENUITEM SEPARATOR - MENUITEM "&\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Выход\tAlt+F4", ID_FILE_EXIT END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "& ...", ID_HELP_ABOUT + MENUITEM "&О программе...", ID_HELP_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_APPTITLE " ReactOS" + IDS_APPTITLE "Консоль управления ReactOS" IDS_CONSOLETITLE "Console%1!u!" END diff --git a/base/applications/mmc/lang/uk-UA.rc b/base/applications/mmc/lang/uk-UA.rc index 1e8190b78d4..a09ce90e417 100644 --- a/base/applications/mmc/lang/uk-UA.rc +++ b/base/applications/mmc/lang/uk-UA.rc @@ -10,20 +10,20 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDM_CONSOLEROOT MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN MENUITEM SEPARATOR - MENUITEM "&\tAlt+F4", ID_FILE_EXIT + MENUITEM "В&ихід\tAlt+F4", ID_FILE_EXIT END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "& ReactOS...", ID_HELP_ABOUT + MENUITEM "&Про консоль керування ReactOS...", ID_HELP_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_APPTITLE " ReactOS" - IDS_CONSOLETITLE "%1!u!" + IDS_APPTITLE "Консоль керування ReactOS" + IDS_CONSOLETITLE "Консоль%1!u!" END diff --git a/base/applications/mmc/rsrc.rc b/base/applications/mmc/rsrc.rc index 0a5becd750d..0a4886f5183 100644 --- a/base/applications/mmc/rsrc.rc +++ b/base/applications/mmc/rsrc.rc @@ -13,20 +13,14 @@ #include "lang/ko-KR.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" #include "lang/zh-TW.rc" - - - - - - - - +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/mplay32/lang/pl-PL.rc b/base/applications/mplay32/lang/pl-PL.rc index 5d13afa4678..7705abff066 100644 --- a/base/applications/mplay32/lang/pl-PL.rc +++ b/base/applications/mplay32/lang/pl-PL.rc @@ -1,15 +1,20 @@ -LANGUAGE LANG_POLISH, SUBLANG_DEFAULT +/* + * translated by Maciej Białas + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) + */ -//By Maciej Bialas +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN POPUP "&Plik" BEGIN - MENUITEM "&Otwrz...", IDM_OPEN_FILE + MENUITEM "&Otwórz...", IDM_OPEN_FILE MENUITEM "&Zamknij", IDM_CLOSE_FILE MENUITEM SEPARATOR - MENUITEM "&Wyjd", IDM_EXIT + MENUITEM "&Wyjdź", IDM_EXIT END POPUP "&Pomoc" BEGIN @@ -22,11 +27,11 @@ BEGIN IDS_ALL_TYPES_FILTER "Wszystkie formaty (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Odtwarzaj" IDS_TOOLTIP_STOP "Zatrzymaj" - IDS_TOOLTIP_EJECT "Wysu" - IDS_TOOLTIP_BACKWARD "Przeskocz do tyu" - IDS_TOOLTIP_SEEKBACK "Przewi do tyu" - IDS_TOOLTIP_SEEKFORW "Przewi do przodu" + IDS_TOOLTIP_EJECT "Wysuń" + IDS_TOOLTIP_BACKWARD "Przeskocz do tyłu" + IDS_TOOLTIP_SEEKBACK "Przewiń do tyłu" + IDS_TOOLTIP_SEEKFORW "Przewiń do przodu" IDS_TOOLTIP_FORWARD "Przeskocz do przodu" IDS_APPTITLE "ReactOS Multimedia Player" - IDS_PLAY "Odtwrz" + IDS_PLAY "Odtwórz" END diff --git a/base/applications/mplay32/lang/ru-RU.rc b/base/applications/mplay32/lang/ru-RU.rc index 639506f9daf..d83dc462d4e 100644 --- a/base/applications/mplay32/lang/ru-RU.rc +++ b/base/applications/mplay32/lang/ru-RU.rc @@ -2,29 +2,29 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&...", IDM_OPEN_FILE - MENUITEM "&", IDM_CLOSE_FILE + MENUITEM "&Открыть...", IDM_OPEN_FILE + MENUITEM "&Закрыть", IDM_CLOSE_FILE MENUITEM SEPARATOR - MENUITEM "&", IDM_EXIT + MENUITEM "&Выход", IDM_EXIT END - POPUP "&" + POPUP "&Помощь" BEGIN - MENUITEM "& ...", IDM_ABOUT + MENUITEM "&О программе...", IDM_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_ALL_TYPES_FILTER " (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" - IDS_TOOLTIP_PLAY "" - IDS_TOOLTIP_STOP "" - IDS_TOOLTIP_EJECT "" - IDS_TOOLTIP_BACKWARD "" - IDS_TOOLTIP_SEEKBACK " " - IDS_TOOLTIP_SEEKFORW " " - IDS_TOOLTIP_FORWARD "" - IDS_APPTITLE " ReactOS" - IDS_PLAY "" + IDS_ALL_TYPES_FILTER "Все поддерживаемые (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" + IDS_TOOLTIP_PLAY "Воспроизведение" + IDS_TOOLTIP_STOP "Остановить" + IDS_TOOLTIP_EJECT "Извлечь" + IDS_TOOLTIP_BACKWARD "Назад" + IDS_TOOLTIP_SEEKBACK "Перемотка назад" + IDS_TOOLTIP_SEEKFORW "Перемотка вперед" + IDS_TOOLTIP_FORWARD "Вперед" + IDS_APPTITLE "Проигрыватель ReactOS" + IDS_PLAY "Воспроизвести" END diff --git a/base/applications/mplay32/lang/uk-UA.rc b/base/applications/mplay32/lang/uk-UA.rc index 4ba0f32f1af..629b3e0d55f 100644 --- a/base/applications/mplay32/lang/uk-UA.rc +++ b/base/applications/mplay32/lang/uk-UA.rc @@ -10,29 +10,29 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&³...", IDM_OPEN_FILE - MENUITEM "&", IDM_CLOSE_FILE + MENUITEM "&Відкрити...", IDM_OPEN_FILE + MENUITEM "&Закрити", IDM_CLOSE_FILE MENUITEM SEPARATOR - MENUITEM "&", IDM_EXIT + MENUITEM "&Вихід", IDM_EXIT END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "& ...", IDM_ABOUT + MENUITEM "&Про програму...", IDM_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_ALL_TYPES_FILTER " (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" - IDS_TOOLTIP_PLAY "³" - IDS_TOOLTIP_STOP "" - IDS_TOOLTIP_EJECT "" - IDS_TOOLTIP_BACKWARD "" - IDS_TOOLTIP_SEEKBACK " " - IDS_TOOLTIP_SEEKFORW " " - IDS_TOOLTIP_FORWARD "" - IDS_APPTITLE " ReactOS" - IDS_PLAY "³" + IDS_ALL_TYPES_FILTER "Всі підтримувані (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" + IDS_TOOLTIP_PLAY "Відтворення" + IDS_TOOLTIP_STOP "Зупинити" + IDS_TOOLTIP_EJECT "Витягти" + IDS_TOOLTIP_BACKWARD "Назад" + IDS_TOOLTIP_SEEKBACK "Перемотування назад" + IDS_TOOLTIP_SEEKFORW "Перемотування вперед" + IDS_TOOLTIP_FORWARD "Вперед" + IDS_APPTITLE "Програвач ReactOS" + IDS_PLAY "Відтворити" END diff --git a/base/applications/mplay32/rsrc.rc b/base/applications/mplay32/rsrc.rc index 0b15dfb63e4..aa7bf813a84 100644 --- a/base/applications/mplay32/rsrc.rc +++ b/base/applications/mplay32/rsrc.rc @@ -11,8 +11,11 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/msconfig/CMakeLists.txt b/base/applications/msconfig/CMakeLists.txt index cf9c7e0d1ed..94ff16b5618 100644 --- a/base/applications/msconfig/CMakeLists.txt +++ b/base/applications/msconfig/CMakeLists.txt @@ -12,10 +12,9 @@ list(APPEND SOURCE msconfig.c msconfig.rc) -add_executable(msconfig ${CMAKE_CURRENT_BINARY_DIR}/msconfig_precomp.h.gch ${SOURCE}) - -add_pch(msconfig ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(msconfig ${SOURCE}) set_module_type(msconfig win32gui) add_importlibs(msconfig user32 advapi32 version comctl32 shell32 shlwapi msvcrt kernel32) +add_pch(msconfig precomp.h) add_cd_file(TARGET msconfig DESTINATION reactos/system32 FOR all) diff --git a/base/applications/msconfig/freeldrpage.c b/base/applications/msconfig/freeldrpage.c index a82f1c560be..e8208007788 100644 --- a/base/applications/msconfig/freeldrpage.c +++ b/base/applications/msconfig/freeldrpage.c @@ -1,10 +1,10 @@ /* * PROJECT: ReactOS Applications * LICENSE: LGPL - See COPYING in the top level directory - * FILE: base/applications/freeldrpage.c + * FILE: base/applications/msconfig/freeldrpage.c * PURPOSE: Freeloader configuration page message handler * COPYRIGHT: Copyright 2005-2006 Christoph von Wittich - * + * 2011 Gregor Schneider */ #include @@ -23,100 +23,111 @@ typedef struct static FREELDR_SETTINGS Settings = { 0, { 0, }, 0, 0, FALSE }; +#define BUFFER_SIZE 512 -BOOL -LoadBootIni(WCHAR * szDrive, HWND hDlg) +static BOOL +LoadBootIni(WCHAR *szDrive, HWND hDlg) { - WCHAR szBuffer[512]; - HWND hDlgCtrl; - FILE * file; - UINT length; - LRESULT pos; + WCHAR szBuffer[BUFFER_SIZE]; + HWND hDlgCtrl; + FILE * file; + UINT length; + LRESULT pos; - wcscpy(szBuffer, szDrive); - wcscat(szBuffer, L"boot.ini"); - - file = _wfopen(szBuffer, L"rt"); - if (!file) - return FALSE; - - hDlgCtrl = GetDlgItem(hDlg, IDC_LIST_BOX); + wcscpy(szBuffer, szDrive); + wcscat(szBuffer, L"freeldr.ini"); - while(!feof(file)) - { - if (fgetws(szBuffer, sizeof(szBuffer) / sizeof(WCHAR), file)) + file = _wfopen(szBuffer, L"rt"); + if (!file) + { + wcscpy(szBuffer, szDrive); + wcscat(szBuffer, L"boot.ini"); + file = _wfopen(szBuffer, L"rt"); + if (!file) + return FALSE; + } + + hDlgCtrl = GetDlgItem(hDlg, IDC_LIST_BOX); + + while(!feof(file)) + { + if (fgetws(szBuffer, BUFFER_SIZE, file)) { length = wcslen(szBuffer); - while(szBuffer[length] < 14) //FIXME remove line feeds - szBuffer[length--] = 0; - - pos = SendMessageW(hDlgCtrl, LB_ADDSTRING, 0, (LPARAM)szBuffer); - - - if (szBuffer[0] == L'[') - continue; - - if (!wcsncmp(szBuffer, L"timeout=", 8)) + if (length > 1) { - Settings.TimeOut = _wtoi(&szBuffer[8]); - continue; - } + szBuffer[length] = L'\0'; + szBuffer[length - 1] = L'\0'; - if (!wcsncmp(szBuffer, L"default=", 8)) - { - wcscpy(Settings.szDefaultOS, &szBuffer[8]); - continue; + pos = SendMessageW(hDlgCtrl, LB_ADDSTRING, 0, (LPARAM)szBuffer); + + if (szBuffer[0] == L'[') + continue; + + if (!wcsncmp(szBuffer, L"timeout=", 8)) + { + Settings.TimeOut = _wtoi(&szBuffer[8]); + continue; + } + + if (!wcsncmp(szBuffer, L"default=", 8)) + { + wcscpy(Settings.szDefaultOS, &szBuffer[8]); + continue; + } + if (pos != LB_ERR) + SendMessage(hDlgCtrl, LB_SETITEMDATA, pos, 1); // indicate that this item is an boot entry + Settings.OSConfigurationCount++; } - if (pos != LB_ERR) - SendMessage(hDlgCtrl, LB_SETITEMDATA, pos, 1); // indicate that this item is an boot entry - Settings.OSConfigurationCount++; } - } + } - fclose(file); - Settings.UseBootIni = TRUE; + fclose(file); + Settings.UseBootIni = TRUE; - pos = SendMessageW(hDlgCtrl, LB_FINDSTRING, 3, (LPARAM)Settings.szDefaultOS); - if (pos != LB_ERR) - { + pos = SendMessageW(hDlgCtrl, LB_FINDSTRING, 3, (LPARAM)Settings.szDefaultOS); + if (pos != LB_ERR) + { Settings.szDefaultPos = pos; SendMessage(hDlgCtrl, LB_SETCURSEL, pos, 0); - } + } - SetDlgItemInt(hDlg, IDC_TXT_BOOT_TIMEOUT, Settings.TimeOut, FALSE); - if (Settings.OSConfigurationCount < 2) - { + SetDlgItemInt(hDlg, IDC_TXT_BOOT_TIMEOUT, Settings.TimeOut, FALSE); + if (Settings.OSConfigurationCount < 2) + { EnableWindow(GetDlgItem(hDlg, IDC_BTN_SET_DEFAULT_BOOT), FALSE); EnableWindow(GetDlgItem(hDlg, IDC_BTN_MOVE_UP_BOOT_OPTION), FALSE); EnableWindow(GetDlgItem(hDlg, IDC_BTN_MOVE_DOWN_BOOT_OPTION), FALSE); - } - return TRUE; + } + return TRUE; } - -BOOL -InitializeDialog(HWND hDlg) +static BOOL +InitializeFreeLDRDialog(HWND hDlg) { - // FIXME - // find real boot drive and handle freeldr configuration ini - return LoadBootIni(L"C:\\", hDlg); + WCHAR winDir[PATH_MAX]; + WCHAR* ptr = NULL; + + GetWindowsDirectoryW(winDir, PATH_MAX); + ptr = wcschr(winDir, L'\\'); + if (ptr == NULL) + { + return FALSE; + } + ptr[1] = L'\0'; + return LoadBootIni(winDir, hDlg); } - - INT_PTR CALLBACK FreeLdrPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { LRESULT pos; - UNREFERENCED_PARAMETER(lParam); - UNREFERENCED_PARAMETER(wParam); - switch (message) { case WM_INITDIALOG: hFreeLdrDialog = hDlg; SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); - InitializeDialog(hDlg); + InitializeFreeLDRDialog(hDlg); return TRUE; case WM_COMMAND: switch(HIWORD(wParam)) diff --git a/base/applications/msconfig/lang/bg-BG.rc b/base/applications/msconfig/lang/bg-BG.rc index 309a414ea46..6c3f36cd12b 100644 --- a/base/applications/msconfig/lang/bg-BG.rc +++ b/base/applications/msconfig/lang/bg-BG.rc @@ -78,7 +78,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "& ", IDC_BTN_CHECK_BOOT_PATH, 5, 65, 129, 12 PUSHBUTTON "& ", IDC_BTN_SET_DEFAULT_BOOT, 135, 65, 78, 12 PUSHBUTTON " &", IDC_BTN_MOVE_UP_BOOT_OPTION, 213, 65, 66, 12 diff --git a/base/applications/msconfig/lang/ca-ES.rc b/base/applications/msconfig/lang/ca-ES.rc index 05e16f2c22e..f5dd5878593 100644 --- a/base/applications/msconfig/lang/ca-ES.rc +++ b/base/applications/msconfig/lang/ca-ES.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Prova camins d'arrencada", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Fes-ho per defecte", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "P&uja", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/cs-CZ.rc b/base/applications/msconfig/lang/cs-CZ.rc index d4b77ca2aa0..c2f8a9edbed 100644 --- a/base/applications/msconfig/lang/cs-CZ.rc +++ b/base/applications/msconfig/lang/cs-CZ.rc @@ -83,7 +83,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Kontrola cest sputn", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 77, 12 PUSHBUTTON "&Nastavit jako vchoz", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 75, 12 PUSHBUTTON "Posunout N&ahoru", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/de-DE.rc b/base/applications/msconfig/lang/de-DE.rc index 96cb09fd864..8fabcc4a384 100644 --- a/base/applications/msconfig/lang/de-DE.rc +++ b/base/applications/msconfig/lang/de-DE.rc @@ -78,7 +78,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Alle Bootpfade berprfen", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 90, 12 PUSHBUTTON "A&ls Standard", IDC_BTN_SET_DEFAULT_BOOT, 120, 65, 63, 12 PUSHBUTTON "Nach &oben", IDC_BTN_MOVE_UP_BOOT_OPTION, 203, 65, 63, 12 diff --git a/base/applications/msconfig/lang/el-GR.rc b/base/applications/msconfig/lang/el-GR.rc index 6a5fdb5c821..f9efa5814aa 100644 --- a/base/applications/msconfig/lang/el-GR.rc +++ b/base/applications/msconfig/lang/el-GR.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Check All Boot Paths", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Set as Default", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "Move &Up", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/en-US.rc b/base/applications/msconfig/lang/en-US.rc index 064a3effe83..2e737451635 100644 --- a/base/applications/msconfig/lang/en-US.rc +++ b/base/applications/msconfig/lang/en-US.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Check All Boot Paths", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Set as Default", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "Move &Up", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/es-ES.rc b/base/applications/msconfig/lang/es-ES.rc index 10398393baa..ad8074e3c36 100644 --- a/base/applications/msconfig/lang/es-ES.rc +++ b/base/applications/msconfig/lang/es-ES.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Verificar las rutas de Arranque", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 110, 12 PUSHBUTTON "&Configurar por Defecto", IDC_BTN_SET_DEFAULT_BOOT, 130, 65, 80, 12 PUSHBUTTON "Mover &Arriba", IDC_BTN_MOVE_UP_BOOT_OPTION, 220, 65, 60, 12 diff --git a/base/applications/msconfig/lang/fr-FR.rc b/base/applications/msconfig/lang/fr-FR.rc index 6ff3e099fc2..54e721d1ad3 100644 --- a/base/applications/msconfig/lang/fr-FR.rc +++ b/base/applications/msconfig/lang/fr-FR.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Vrifier les chemins de dmarrage", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Par Dfaut", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "&Monter", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/hu-HU.rc b/base/applications/msconfig/lang/hu-HU.rc index abf31c8d836..a41c9ac4cce 100644 --- a/base/applications/msconfig/lang/hu-HU.rc +++ b/base/applications/msconfig/lang/hu-HU.rc @@ -79,7 +79,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Check All Boot Paths", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Set as Default", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "Move &Up", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/id-ID.rc b/base/applications/msconfig/lang/id-ID.rc index 8d2dd3dd2db..bdaf2ab6673 100644 --- a/base/applications/msconfig/lang/id-ID.rc +++ b/base/applications/msconfig/lang/id-ID.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "Periksa Se&mua Path Boot", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Set sebagai Standar", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "&Naik", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/it-IT.rc b/base/applications/msconfig/lang/it-IT.rc index ad0c7c574f0..85a895d2e69 100644 --- a/base/applications/msconfig/lang/it-IT.rc +++ b/base/applications/msconfig/lang/it-IT.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 3, 2, 354, 58, 0x00000200 + LISTBOX IDC_LIST_BOX, 3, 2, 354, 58, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "Ve&rifica percorsi di avvio", IDC_BTN_CHECK_BOOT_PATH, 3, 64, 85, 14 PUSHBUTTON "&Imposta come predefinito", IDC_BTN_SET_DEFAULT_BOOT, 93, 64, 85, 14 PUSHBUTTON "&Sposta su", IDC_BTN_MOVE_UP_BOOT_OPTION, 183, 64, 85, 14 diff --git a/base/applications/msconfig/lang/ko-KR.rc b/base/applications/msconfig/lang/ko-KR.rc index cd13b7d6548..6039d5bdf93 100644 --- a/base/applications/msconfig/lang/ko-KR.rc +++ b/base/applications/msconfig/lang/ko-KR.rc @@ -80,7 +80,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON " ð (&C)", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "⺻ (&S)", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON " ̱(&U)", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/nl-NL.rc b/base/applications/msconfig/lang/nl-NL.rc index 638cb5841b3..b8d2003ee38 100644 --- a/base/applications/msconfig/lang/nl-NL.rc +++ b/base/applications/msconfig/lang/nl-NL.rc @@ -97,7 +97,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Alle opstartpaden controleren", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "Als stan&daard instellen", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "&Omhoog", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/no-NO.rc b/base/applications/msconfig/lang/no-NO.rc index b1f1f4f88a9..2185b199018 100644 --- a/base/applications/msconfig/lang/no-NO.rc +++ b/base/applications/msconfig/lang/no-NO.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Sjekk oppstartsbaner", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 75, 12 PUSHBUTTON "&Sett som standard", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "Flytt &opp", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/pl-PL.rc b/base/applications/msconfig/lang/pl-PL.rc index f0605ea43c7..bbc95f958c8 100644 --- a/base/applications/msconfig/lang/pl-PL.rc +++ b/base/applications/msconfig/lang/pl-PL.rc @@ -1,9 +1,10 @@ /* * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) */ - + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 @@ -25,8 +26,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148 - PUSHBUTTON "&Wcz wszystkie",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14 - PUSHBUTTON "Wycz wszy&stkie",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 + PUSHBUTTON "&Włącz wszystkie",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14 + PUSHBUTTON "Wyłącz wszy&stkie",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -34,18 +35,18 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "", 237, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 2, 1, 280, 148 - PUSHBUTTON "Przenie w &gr", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14 - PUSHBUTTON "Przenie w &d", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14 + PUSHBUTTON "Przenieś w &górę", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14 + PUSHBUTTON "Przenieś w &dół", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14 - PUSHBUTTON "W&cz", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14 - PUSHBUTTON "W&ycz", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14 + PUSHBUTTON "Włą&cz", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14 + PUSHBUTTON "W&yłącz", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14 - PUSHBUTTON "&Znajd", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 + PUSHBUTTON "&Znajdź", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 PUSHBUTTON "&Nowa", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 PUSHBUTTON "Edy&tuj", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 - PUSHBUTTON "&Wcz wszystkie", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 - PUSHBUTTON "Wycz wszy&stkie",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 + PUSHBUTTON "&Włącz wszystkie", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 + PUSHBUTTON "Wyłącz wszy&stkie",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -62,32 +63,32 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,2,1,360,148 - PUSHBUTTON "&Wcz wszystkie",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14 - PUSHBUTTON "Wycz wszy&stkie",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 + PUSHBUTTON "&Włącz wszystkie",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14 + PUSHBUTTON "Wyłącz wszy&stkie",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Wybr uruchamiania", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT - CONTROL "Uruchamianie &normalne - zaaduj wszystkie sterowniki urzdze i usugi", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 180, 10 - CONTROL "Uruchamianie &diagnostyczne - zaaduj tylko podstawowe urzdzenia i usugi", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 195, 10 + GROUPBOX "Wybór uruchamiania", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT + CONTROL "Uruchamianie &normalne - załaduj wszystkie sterowniki urządzeń i usługi", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 180, 10 + CONTROL "Uruchamianie &diagnostyczne - załaduj tylko podstawowe urządzenia i usługi", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 195, 10 CONTROL "Uruchamianie &selektywne", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 70, 10 AUTOCHECKBOX "&Przetwarzaj plik SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 95, 10 - AUTOCHECKBOX "Zaaduj &usugi systemowe", IDC_CBX_SYSTEM_SERVICE, 30, 95, 90, 10 - AUTOCHECKBOX "Zaaduj &elementy startowe", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 + AUTOCHECKBOX "Załaduj &usługi systemowe", IDC_CBX_SYSTEM_SERVICE, 30, 95, 90, 10 + AUTOCHECKBOX "Załaduj &elementy startowe", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 - PUSHBUTTON "&Sprawd wszystkie cieki rozruchu", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 - PUSHBUTTON "&Ustaw jako domylne", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 - PUSHBUTTON "Przenie w &gr", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 - PUSHBUTTON "Przenie w &d", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL + PUSHBUTTON "&Sprawdź wszystkie ścieżki rozruchu", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 + PUSHBUTTON "&Ustaw jako domyślne", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 + PUSHBUTTON "Przenieś w &górę", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 + PUSHBUTTON "Przenieś w &dół", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 GROUPBOX "Opcje rozruchu", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT CHECKBOX "/SA&FEBOOT", IDC_CBX_SAFE_BOOT, 15, 90, 55, 10 CHECKBOX "/&NOGUIBOOT", IDC_CBX_NO_GUI_BOOT, 15, 105, 60, 10 @@ -128,18 +129,18 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_MSCONFIG "Program konfiguracji systemu" - IDS_TAB_GENERAL "Oglne" + IDS_TAB_GENERAL "Ogólne" IDS_TAB_SYSTEM "SYSTEM.INI" IDS_TAB_FREELDR "FREELDR.INI" - IDS_TAB_SERVICES "Usugi" + IDS_TAB_SERVICES "Usługi" IDS_TAB_STARTUP "Uruchamianie" - IDS_TAB_TOOLS "Narzdzia" + IDS_TAB_TOOLS "Narzędzia" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_COLUMN_SERVICE "Usuga" - IDS_SERVICES_COLUMN_REQ "Wany" + IDS_SERVICES_COLUMN_SERVICE "Usługa" + IDS_SERVICES_COLUMN_REQ "Wymagany" IDS_SERVICES_COLUMN_VENDOR "Producent" IDS_SERVICES_COLUMN_STATUS "Stan" END @@ -154,14 +155,14 @@ BEGIN IDS_TOOLS_CMD_CMD "cmd.exe" IDS_TOOLS_INFO_NAME "Wersja" - IDS_TOOLS_INFO_DESCR "Wywietla informacje o wersji." + IDS_TOOLS_INFO_DESCR "Wyświetla informacje o wersji." IDS_TOOLS_INFO_CMD "winver.exe" IDS_TOOLS_REGEDIT_NAME "Edytor rejestru" IDS_TOOLS_REGEDIT_DESCR "Otwiera edytor rejestru." IDS_TOOLS_REGEDIT_CMD "regedit.exe" - IDS_TOOLS_SYSDM_NAME "Waciwoci systemu" + IDS_TOOLS_SYSDM_NAME "Właściwości systemu" IDS_TOOLS_SYSDM_DESCR "Pokazuje informacje o tym komputerze." IDS_TOOLS_SYSDM_CMD "control.exe" IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" @@ -173,8 +174,8 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_STATUS_RUNNING "Dziaa" - IDS_SERVICES_STATUS_STOPPED "Zatrzymano" + IDS_SERVICES_STATUS_RUNNING "Uruchomiona" + IDS_SERVICES_STATUS_STOPPED "Zatrzymana" IDS_SERVICES_YES "Tak" IDS_SERVICES_UNKNOWN "Nieznany" END diff --git a/base/applications/msconfig/lang/pt-BR.rc b/base/applications/msconfig/lang/pt-BR.rc index 443d6d1e4bd..df34c957cf6 100644 --- a/base/applications/msconfig/lang/pt-BR.rc +++ b/base/applications/msconfig/lang/pt-BR.rc @@ -83,7 +83,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "Verificar camin&hos de inicializao", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Definir como padro", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "Mo&ver para cima", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/ro-RO.rc b/base/applications/msconfig/lang/ro-RO.rc index f350b849f8f..119f4ab70d4 100644 --- a/base/applications/msconfig/lang/ro-RO.rc +++ b/base/applications/msconfig/lang/ro-RO.rc @@ -77,7 +77,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Verificare toate cile de pornire", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&Setare implicit", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "n &sus", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/ru-RU.rc b/base/applications/msconfig/lang/ru-RU.rc index 901e11b3552..cec48591d0c 100644 --- a/base/applications/msconfig/lang/ru-RU.rc +++ b/base/applications/msconfig/lang/ru-RU.rc @@ -6,14 +6,14 @@ IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION " " +CAPTION "Настройки системы" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195 DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Справка", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Применить", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -21,8 +21,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148 - PUSHBUTTON "& ",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14 - PUSHBUTTON "& ",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 + PUSHBUTTON "&Включить все",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14 + PUSHBUTTON "В&ыключить все",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -30,18 +30,18 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "", 237, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 2, 1, 280, 148 - PUSHBUTTON "&", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14 + PUSHBUTTON "Вв&ерх", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14 + PUSHBUTTON "В&низ", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14 + PUSHBUTTON "В&ключить", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14 + PUSHBUTTON "&Отключить", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 + PUSHBUTTON "&Поиск", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 + PUSHBUTTON "&Создать", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 + PUSHBUTTON "&Изменить", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 - PUSHBUTTON "& ", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 - PUSHBUTTON "& ",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 + PUSHBUTTON "Вк&лючить все", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 + PUSHBUTTON "О&тключить все",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -50,7 +50,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134 EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY - PUSHBUTTON "&", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Запуск", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -58,42 +58,42 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,2,1,360,148 - PUSHBUTTON "& ",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14 - PUSHBUTTON "& ",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 + PUSHBUTTON "&Включить все",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14 + PUSHBUTTON "В&ыключить все",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT - CONTROL "& - ", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 280, 10 - CONTROL "& - ", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 325, 10 - CONTROL "& ", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 100, 10 - AUTOCHECKBOX "& SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 130, 10 - AUTOCHECKBOX "& ", IDC_CBX_SYSTEM_SERVICE, 30, 95, 130, 10 - AUTOCHECKBOX "& ", IDC_CBX_STARTUP_ITEM, 30, 110, 140, 10 + GROUPBOX "Варианты запуска", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT + CONTROL "&Обычный запуск - загрузка всех драйверов устройств и запуск всех служб", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 280, 10 + CONTROL "&Диагностический запуск - загрузка только основных драйверов и запуск основных служб", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 325, 10 + CONTROL "&Выборочный запуск", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 100, 10 + AUTOCHECKBOX "О&брабатывать файл SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 130, 10 + AUTOCHECKBOX "&Загружать системные службы", IDC_CBX_SYSTEM_SERVICE, 30, 95, 130, 10 + AUTOCHECKBOX "З&агружать элементы автозагрузки", IDC_CBX_STARTUP_ITEM, 30, 110, 140, 10 END IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 - PUSHBUTTON "& ", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 110, 12 - PUSHBUTTON "& ", IDC_BTN_SET_DEFAULT_BOOT, 125, 65, 70, 12 - PUSHBUTTON "&", IDC_BTN_MOVE_UP_BOOT_OPTION, 200, 65, 70, 12 - PUSHBUTTON "&", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 275, 65, 70, 12 - GROUPBOX " ", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL + PUSHBUTTON "&Проверить все пути загрузки", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 110, 12 + PUSHBUTTON "П&о умолчанию", IDC_BTN_SET_DEFAULT_BOOT, 125, 65, 70, 12 + PUSHBUTTON "&Вверх", IDC_BTN_MOVE_UP_BOOT_OPTION, 200, 65, 70, 12 + PUSHBUTTON "В&низ", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 275, 65, 70, 12 + GROUPBOX "Параметры загрузки", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT CHECKBOX "/SA&FEBOOT", IDC_CBX_SAFE_BOOT, 15, 90, 55, 10 CHECKBOX "/&NOGUIBOOT", IDC_CBX_NO_GUI_BOOT, 15, 105, 60, 10 CHECKBOX "/&BOOTLOG", IDC_CBX_BOOT_LOG, 15, 120, 50, 10 CHECKBOX "/BAS&EVIDEO", IDC_CBX_BASE_VIDEO, 15, 135, 55, 10 CHECKBOX "/S&OS", IDC_CBX_SOS, 15, 150, 50, 10 - PUSHBUTTON "&...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12 - LTEXT "&:", -1, 280, 82, 30, 10 + PUSHBUTTON "&Дополнительно...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12 + LTEXT "&Таймаут:", -1, 280, 82, 30, 10 EDITTEXT IDC_TXT_BOOT_TIMEOUT, 280, 93, 25, 12, ES_LEFT - LTEXT ".", -1, 310, 91, 15, 10 + LTEXT "сек.", -1, 310, 91, 15, 10 END IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 @@ -118,59 +118,59 @@ BEGIN EDITTEXT IDC_TXT_CHANNEL, 80, 130, 60, 12, ES_LEFT CONTROL "",IDC_SCR_CHANNEL, "msctls_updown32", 0x50000000, 140, 130, 11, 11 PUSHBUTTON "OK", IDC_OK, 20, 160, 50, 12 - PUSHBUTTON "", IDC_CANCEL, 100, 160, 50, 12 + PUSHBUTTON "Отмена", IDC_CANCEL, 100, 160, 50, 12 END STRINGTABLE DISCARDABLE BEGIN - IDS_MSCONFIG " " - IDS_TAB_GENERAL "" + IDS_MSCONFIG "Настройка системы" + IDS_TAB_GENERAL "Общие" IDS_TAB_SYSTEM "SYSTEM.INI" IDS_TAB_FREELDR "FREELDR.INI" - IDS_TAB_SERVICES "" - IDS_TAB_STARTUP "" - IDS_TAB_TOOLS "" + IDS_TAB_SERVICES "Службы" + IDS_TAB_STARTUP "Автозагрузка" + IDS_TAB_TOOLS "Утилиты" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_COLUMN_SERVICE "" - IDS_SERVICES_COLUMN_REQ "" - IDS_SERVICES_COLUMN_VENDOR "" - IDS_SERVICES_COLUMN_STATUS "" + IDS_SERVICES_COLUMN_SERVICE "Служба" + IDS_SERVICES_COLUMN_REQ "Базовая" + IDS_SERVICES_COLUMN_VENDOR "Изготовитель" + IDS_SERVICES_COLUMN_STATUS "Состояние" END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLS_COLUMN_NAME "" - IDS_TOOLS_COLUMN_DESCR "" + IDS_TOOLS_COLUMN_NAME "Название" + IDS_TOOLS_COLUMN_DESCR "Описание" - IDS_TOOLS_CMD_NAME " " + IDS_TOOLS_CMD_NAME "Командная строка" IDS_TOOLS_CMD_DESCR "" IDS_TOOLS_CMD_CMD "cmd.exe" - IDS_TOOLS_INFO_NAME " " - IDS_TOOLS_INFO_DESCR " ." + IDS_TOOLS_INFO_NAME "О программе" + IDS_TOOLS_INFO_DESCR "Показать информацию о версии." IDS_TOOLS_INFO_CMD "winver.exe" - IDS_TOOLS_REGEDIT_NAME " " - IDS_TOOLS_REGEDIT_DESCR " ." + IDS_TOOLS_REGEDIT_NAME "Редактор реестра" + IDS_TOOLS_REGEDIT_DESCR "Открытый редактор реестра." IDS_TOOLS_REGEDIT_CMD "regedit.exe" - IDS_TOOLS_SYSDM_NAME " " - IDS_TOOLS_SYSDM_DESCR " ." + IDS_TOOLS_SYSDM_NAME "Настройки системы" + IDS_TOOLS_SYSDM_DESCR "Показать информацию об этом компьютере." IDS_TOOLS_SYSDM_CMD "control.exe" IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" - IDS_STARTUP_COLUMN_ELEMENT "" - IDS_STARTUP_COLUMN_CMD "" - IDS_STARTUP_COLUMN_PATH "" + IDS_STARTUP_COLUMN_ELEMENT "Элемент" + IDS_STARTUP_COLUMN_CMD "Команда" + IDS_STARTUP_COLUMN_PATH "Расположение" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_STATUS_RUNNING "" - IDS_SERVICES_STATUS_STOPPED "" - IDS_SERVICES_YES "" - IDS_SERVICES_UNKNOWN "" + IDS_SERVICES_STATUS_RUNNING "Запущено" + IDS_SERVICES_STATUS_STOPPED "Остановлено" + IDS_SERVICES_YES "Да" + IDS_SERVICES_UNKNOWN "Неизвестный" END diff --git a/base/applications/msconfig/lang/sk-SK.rc b/base/applications/msconfig/lang/sk-SK.rc index d3ddada8639..51c585197cd 100644 --- a/base/applications/msconfig/lang/sk-SK.rc +++ b/base/applications/msconfig/lang/sk-SK.rc @@ -81,7 +81,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "S&kontrolova vetky cesty zavedenia", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 130, 12 PUSHBUTTON "&Predvoli", IDC_BTN_SET_DEFAULT_BOOT, 145, 65, 60, 12 PUSHBUTTON "Posun na&hor", IDC_BTN_MOVE_UP_BOOT_OPTION, 210, 65, 70, 12 diff --git a/base/applications/msconfig/lang/sv-SE.rc b/base/applications/msconfig/lang/sv-SE.rc index 927417287c1..968687f10bb 100644 --- a/base/applications/msconfig/lang/sv-SE.rc +++ b/base/applications/msconfig/lang/sv-SE.rc @@ -83,7 +83,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Undersk alla bootvgar", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 75, 12 PUSHBUTTON "&Stt som standard", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "Flytta &upp", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/th-TH.rc b/base/applications/msconfig/lang/th-TH.rc index e88a40803ef..0f10d67bab6 100644 --- a/base/applications/msconfig/lang/th-TH.rc +++ b/base/applications/msconfig/lang/th-TH.rc @@ -97,7 +97,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Ǩûءͧء鹷ҧ", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 PUSHBUTTON "&駤»", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "͹ &", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/lang/uk-UA.rc b/base/applications/msconfig/lang/uk-UA.rc index 3892f2a6478..6d8292f0884 100644 --- a/base/applications/msconfig/lang/uk-UA.rc +++ b/base/applications/msconfig/lang/uk-UA.rc @@ -12,14 +12,14 @@ IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION " " +CAPTION "Програма налаштування системи" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,2,2,374,195 DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Довідка", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Заст&осувати", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -27,8 +27,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148 - PUSHBUTTON "& ",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14 - PUSHBUTTON "& ",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 + PUSHBUTTON "&Активувати все",IDC_BTN_STARTUP_ACTIVATE,223,155,66,14 + PUSHBUTTON "&Деактивувати все",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -36,18 +36,18 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "", 237, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 2, 1, 280, 148 - PUSHBUTTON "&", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14 + PUSHBUTTON "В&гору", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14 + PUSHBUTTON "В&низ", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14 + PUSHBUTTON "&Ввімкнути", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14 + PUSHBUTTON "В&имкнути", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 - PUSHBUTTON "&", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 + PUSHBUTTON "&Знайти", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14 + PUSHBUTTON "&Створити", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14 + PUSHBUTTON "&Правка", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14 - PUSHBUTTON "& ", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 - PUSHBUTTON "& ",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 + PUSHBUTTON "Вв&імкнути Все", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14 + PUSHBUTTON "Ви&мкнути Все",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -56,7 +56,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134 EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY - PUSHBUTTON "&", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Запустити", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 @@ -64,42 +64,42 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN CONTROL "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,2,1,360,148 - PUSHBUTTON "& ",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14 - PUSHBUTTON "& ",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 + PUSHBUTTON "&Активувати все",IDC_BTN_SERVICES_ACTIVATE,223,155,66,14 + PUSHBUTTON "&Деактивувати все",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT - CONTROL "& - ", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 232, 10 - CONTROL "& - ", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 275, 10 - CONTROL "& ", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 95, 10 - AUTOCHECKBOX "& SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 110, 10 - AUTOCHECKBOX "& ", IDC_CBX_SYSTEM_SERVICE, 30, 95, 122, 10 - AUTOCHECKBOX " &", IDC_CBX_STARTUP_ITEM, 30, 110, 175, 10 + GROUPBOX "Варіанти завантаження", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT + CONTROL "&Звичайне завантаження - завантажувати всі драйвери і служби", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 232, 10 + CONTROL "&Скорочене завантаження - зувантажувати тільки основні драйвери і служби", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 275, 10 + CONTROL "Ви&біркове завантаження", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 95, 10 + AUTOCHECKBOX "Об&робляти файл SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 110, 10 + AUTOCHECKBOX "За&вантажувати системні служби", IDC_CBX_SYSTEM_SERVICE, 30, 95, 122, 10 + AUTOCHECKBOX "Завантажувати елементи &автозавантаження", IDC_CBX_STARTUP_ITEM, 30, 110, 175, 10 END IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 - PUSHBUTTON "& ", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 - PUSHBUTTON "& ", IDC_BTN_SET_DEFAULT_BOOT, 92, 65, 88, 12 - PUSHBUTTON " &", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 - PUSHBUTTON " &", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 - GROUPBOX " ", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL + PUSHBUTTON "&Вибрати всі шляхи", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 + PUSHBUTTON "&Встановити стандартно", IDC_BTN_SET_DEFAULT_BOOT, 92, 65, 88, 12 + PUSHBUTTON "Перемістити Вв&ерх", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 + PUSHBUTTON "Перемістити В&низ", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 + GROUPBOX "Варіанти завантаження", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT CHECKBOX "/SA&FEBOOT", IDC_CBX_SAFE_BOOT, 15, 90, 55, 10 CHECKBOX "/&NOGUIBOOT", IDC_CBX_NO_GUI_BOOT, 15, 105, 60, 10 CHECKBOX "/&BOOTLOG", IDC_CBX_BOOT_LOG, 15, 120, 50, 10 CHECKBOX "/BAS&EVIDEO", IDC_CBX_BASE_VIDEO, 15, 135, 55, 10 CHECKBOX "/S&OS", IDC_CBX_SOS, 15, 150, 50, 10 - PUSHBUTTON "&...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12 - LTEXT "&:", -1, 275, 91, 33, 10 + PUSHBUTTON "Д&одатково...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12 + LTEXT "&Затримка:", -1, 275, 91, 33, 10 EDITTEXT IDC_TXT_BOOT_TIMEOUT, 310, 90, 25, 12, ES_LEFT - LTEXT ".", -1, 340, 91, 15, 10 + LTEXT "сек.", -1, 340, 91, 15, 10 END IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 @@ -124,59 +124,59 @@ BEGIN EDITTEXT IDC_TXT_CHANNEL, 80, 130, 60, 12, ES_LEFT CONTROL "",IDC_SCR_CHANNEL, "msctls_updown32", 0x50000000, 140, 130, 11, 11 PUSHBUTTON "OK", IDC_OK, 20, 160, 50, 12 - PUSHBUTTON "", IDC_CANCEL, 100, 160, 50, 12 + PUSHBUTTON "Скасувати", IDC_CANCEL, 100, 160, 50, 12 END STRINGTABLE DISCARDABLE BEGIN - IDS_MSCONFIG " " - IDS_TAB_GENERAL "" + IDS_MSCONFIG "Програма налаштування системи" + IDS_TAB_GENERAL "Загальні" IDS_TAB_SYSTEM "SYSTEM.INI" IDS_TAB_FREELDR "FREELDR.INI" - IDS_TAB_SERVICES "" - IDS_TAB_STARTUP "" - IDS_TAB_TOOLS "" + IDS_TAB_SERVICES "Служби" + IDS_TAB_STARTUP "Автозавантаження" + IDS_TAB_TOOLS "Утиліти" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_COLUMN_SERVICE "" - IDS_SERVICES_COLUMN_REQ "" - IDS_SERVICES_COLUMN_VENDOR "" - IDS_SERVICES_COLUMN_STATUS "" + IDS_SERVICES_COLUMN_SERVICE "Служба" + IDS_SERVICES_COLUMN_REQ "Вимагає" + IDS_SERVICES_COLUMN_VENDOR "Постачальник" + IDS_SERVICES_COLUMN_STATUS "Стан" END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLS_COLUMN_NAME "" - IDS_TOOLS_COLUMN_DESCR "" + IDS_TOOLS_COLUMN_NAME "Назва" + IDS_TOOLS_COLUMN_DESCR "Опис" - IDS_TOOLS_CMD_NAME "" + IDS_TOOLS_CMD_NAME "Консоль" IDS_TOOLS_CMD_DESCR "" IDS_TOOLS_CMD_CMD "cmd.exe" - IDS_TOOLS_INFO_NAME "" - IDS_TOOLS_INFO_DESCR " ." + IDS_TOOLS_INFO_NAME "Версія" + IDS_TOOLS_INFO_DESCR "Виводить інформацію про версію ОС." IDS_TOOLS_INFO_CMD "winver.exe" - IDS_TOOLS_REGEDIT_NAME " " - IDS_TOOLS_REGEDIT_DESCR " ." + IDS_TOOLS_REGEDIT_NAME "Редактор Реєстру" + IDS_TOOLS_REGEDIT_DESCR "Запускає Редактор Реєстру." IDS_TOOLS_REGEDIT_CMD "regedit.exe" - IDS_TOOLS_SYSDM_NAME " " - IDS_TOOLS_SYSDM_DESCR " '." + IDS_TOOLS_SYSDM_NAME "Властивості системи" + IDS_TOOLS_SYSDM_DESCR "Показує інформацію про комп'ютер." IDS_TOOLS_SYSDM_CMD "control.exe" IDS_TOOLS_SYSDM_PARAM "sysdm.cpl" - IDS_STARTUP_COLUMN_ELEMENT "" - IDS_STARTUP_COLUMN_CMD "" - IDS_STARTUP_COLUMN_PATH "" + IDS_STARTUP_COLUMN_ELEMENT "Елемент" + IDS_STARTUP_COLUMN_CMD "Команда" + IDS_STARTUP_COLUMN_PATH "Шлях" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_STATUS_RUNNING "" - IDS_SERVICES_STATUS_STOPPED "" - IDS_SERVICES_YES "" - IDS_SERVICES_UNKNOWN "" + IDS_SERVICES_STATUS_RUNNING "Працює" + IDS_SERVICES_STATUS_STOPPED "Зупинена" + IDS_SERVICES_YES "Так" + IDS_SERVICES_UNKNOWN "Невідомо" END diff --git a/base/applications/msconfig/lang/zh-CN.rc b/base/applications/msconfig/lang/zh-CN.rc index 259177bc37e..04b42337cab 100644 --- a/base/applications/msconfig/lang/zh-CN.rc +++ b/base/applications/msconfig/lang/zh-CN.rc @@ -97,7 +97,7 @@ IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", IDC_LIST_BOX, "ListBox", 0x50010141, 10, 10, 340, 50, 0x00000200 + LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "·(&C)", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 80, 12 PUSHBUTTON "ΪĬ(&S)", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "(&U)", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 diff --git a/base/applications/msconfig/rsrc.rc b/base/applications/msconfig/rsrc.rc index 7acc79c64e3..306f1388eea 100644 --- a/base/applications/msconfig/rsrc.rc +++ b/base/applications/msconfig/rsrc.rc @@ -1,5 +1,3 @@ - - #include #include "resource.h" @@ -23,12 +21,15 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/ko-KR.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/msconfig/startuppage.h b/base/applications/msconfig/startuppage.h index a016fb320fb..54f85d1a82f 100644 --- a/base/applications/msconfig/startuppage.h +++ b/base/applications/msconfig/startuppage.h @@ -2,7 +2,7 @@ #define _STARTUPPAGE_H_ extern HWND hStartupPage; -extern HWND hStartupPageListCtrl; +extern HWND hStartupListCtrl; INT_PTR CALLBACK StartupPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); diff --git a/base/applications/msconfig/systempage.c b/base/applications/msconfig/systempage.c index dac7996b4bf..1cf17ab14c2 100644 --- a/base/applications/msconfig/systempage.c +++ b/base/applications/msconfig/systempage.c @@ -1,16 +1,81 @@ /* * PROJECT: ReactOS Applications * LICENSE: LGPL - See COPYING in the top level directory - * FILE: base/applications/systempage.c + * FILE: base/applications/msconfig/systempage.c * PURPOSE: System page message handler * COPYRIGHT: Copyright 2005-2006 Christoph von Wittich - * + * 2011 Gregor Schneider */ #include HWND hSystemPage; HWND hSystemDialog; +#define BUFFER_SIZE 512 + +static BOOL +LoadSystemIni(WCHAR * szPath, HWND hDlg) +{ + WCHAR szBuffer[BUFFER_SIZE]; + HWND hDlgCtrl; + HTREEITEM parent = NULL; + FILE* file; + UINT length; + TVINSERTSTRUCT insert; + + wcscpy(szBuffer, szPath); + wcscat(szBuffer, L"\\system.ini"); + + file = _wfopen(szBuffer, L"rt"); + if (!file) + return FALSE; + + hDlgCtrl = GetDlgItem(hDlg, IDC_SYSTEM_TREE); + + while(!feof(file)) + { + if (fgetws(szBuffer, BUFFER_SIZE, file)) + { + length = wcslen(szBuffer); + if (length > 1) + { + szBuffer[length] = L'\0'; + szBuffer[length - 1] = L'\0'; + insert.hInsertAfter = TVI_LAST; + insert.item.mask = TVIF_TEXT; + insert.item.pszText = szBuffer; + + if (szBuffer[0] == L';' || szBuffer[0] == L'[') + { + /* Parent */ + insert.hParent = NULL; + parent = TreeView_InsertItem(hDlgCtrl, &insert); + } + else + { + /* Child */ + insert.hParent = parent; + TreeView_InsertItem(hDlgCtrl, &insert); + } + } + } + } + + fclose(file); + + return TRUE; +} + +static BOOL +InitializeSystemDialog(HWND hDlg) +{ + WCHAR winDir[PATH_MAX]; + + GetWindowsDirectoryW(winDir, PATH_MAX); + return LoadSystemIni(winDir, hDlg); +} + + INT_PTR CALLBACK SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { @@ -21,6 +86,7 @@ SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { hSystemDialog = hDlg; SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); + InitializeSystemDialog(hDlg); return TRUE; } } diff --git a/base/applications/mscutils/devmgmt/CMakeLists.txt b/base/applications/mscutils/devmgmt/CMakeLists.txt index 703c0e1dceb..8071a788692 100644 --- a/base/applications/mscutils/devmgmt/CMakeLists.txt +++ b/base/applications/mscutils/devmgmt/CMakeLists.txt @@ -9,10 +9,9 @@ list(APPEND SOURCE misc.c devmgmt.rc) -add_executable(devmgmt ${CMAKE_CURRENT_BINARY_DIR}/devmgmt_precomp.h.gch ${SOURCE}) - -add_pch(devmgmt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(devmgmt ${SOURCE}) set_module_type(devmgmt win32gui) add_importlibs(devmgmt setupapi gdi32 user32 comctl32 advapi32 devmgr msvcrt kernel32) +add_pch(devmgmt precomp.h) add_cd_file(TARGET devmgmt DESTINATION reactos/system32 FOR all) diff --git a/base/applications/mscutils/devmgmt/enumdevices.c b/base/applications/mscutils/devmgmt/enumdevices.c index 7da58452be9..b7b24d18151 100644 --- a/base/applications/mscutils/devmgmt/enumdevices.c +++ b/base/applications/mscutils/devmgmt/enumdevices.c @@ -415,6 +415,9 @@ ListDevicesByType(HWND hTreeView, (void)TreeView_SortChildren(hTreeView, hRoot, 0); + + (void)TreeView_SelectItem(hTreeView, + hRoot); } diff --git a/base/applications/mscutils/devmgmt/lang/pl-PL.rc b/base/applications/mscutils/devmgmt/lang/pl-PL.rc index b85dacec3a0..b7b2f8b640a 100644 --- a/base/applications/mscutils/devmgmt/lang/pl-PL.rc +++ b/base/applications/mscutils/devmgmt/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* -* translated by xrogers -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,27 +11,27 @@ IDR_MAINMENU MENU BEGIN POPUP "&Plik" BEGIN - MENUITEM "Za&kocz", IDC_EXIT + MENUITEM "Za&kończ", IDC_EXIT END POPUP "&Akcja" BEGIN MENUITEM "&Drukuj", IDC_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "&Waciwoci", IDC_PROP, GRAYED + MENUITEM "&Właściwości", IDC_PROP, GRAYED MENUITEM SEPARATOR MENUITEM "Pomo&c", IDC_PROGHELP, GRAYED END POPUP "&Widok" BEGIN - MENUITEM "Urzdzenia w&edug typu", IDC_DEVBYTYPE, CHECKED - MENUITEM "Ur&zdzenia wedug poczenia", IDC_STATIC, GRAYED - MENUITEM "Zaso&by wedug typu", IDC_STATIC, GRAYED - MENUITEM "Za&soby wedug poczenia", IDC_STATIC, GRAYED + MENUITEM "Urządzenia w&edług typu", IDC_DEVBYTYPE, CHECKED + MENUITEM "Ur&ządzenia według połączenia", IDC_STATIC, GRAYED + MENUITEM "Zaso&by według typu", IDC_STATIC, GRAYED + MENUITEM "Za&soby według połączenia", IDC_STATIC, GRAYED END POPUP "Pomo&c" BEGIN MENUITEM "&Tematy pomocy", IDC_PROGHELP - MENUITEM "Meneder urzdze - i&nformacje", IDC_ABOUT + MENUITEM "Menedżer urządzeń - i&nformacje", IDC_ABOUT END END @@ -38,18 +39,18 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "Waciwoci", IDC_PROP, GRAYED + MENUITEM "Właściwości", IDC_PROP, GRAYED MENUITEM SEPARATOR MENUITEM "Pomoc", IDC_PROGHELP END END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION "Meneder urzdze - informacje" +CAPTION "Menedżer urządzeń - informacje" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Meneder urzdze v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 26 + LTEXT "Menedżer urządzeń v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 26 PUSHBUTTON "Zamknij", IDOK, 75, 162, 44, 15 ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE @@ -57,32 +58,32 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; moesz go rozprowadza dalej i/lub modyfikowa na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundacj Wolnego Oprogramowania - wedug wersji 2 tej Licencji lub (wedug twojego wyboru) ktrej z pniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadziej, i bdzie on uyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domylnej gwarancji PRZYDATNOCI HANDLOWEJ albo PRZYDATNOCI DO OKRELONYCH ZASTOSOWA. W celu uzyskania bliszych informacji signij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnoci wraz z niniejszym programem otrzymae te egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLTIP_PROP "Waciwoci" - IDS_TOOLTIP_REFRESH "Odwie" + IDS_TOOLTIP_PROP "Właściwości" + IDS_TOOLTIP_REFRESH "Odśwież" IDS_TOOLTIP_HELP "Pomoc" - IDS_TOOLTIP_EXIT "Wyjcie" + IDS_TOOLTIP_EXIT "Wyjście" END /* Hints */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME "Meneder urzdze ReactOS" + IDS_APPNAME "Menedżer urządzeń ReactOS" IDS_HINT_BLANK " " IDS_HINT_EXIT " Zamyka program." - IDS_HINT_REFRESH " Odwie list serwisw." - IDS_HINT_PROP " Otwiera arkusz waciwoci dla biecego zaznaczenia." + IDS_HINT_REFRESH " Odśwież listę serwisów." + IDS_HINT_PROP " Otwiera arkusz właściwości dla bieżącego zaznaczenia." IDS_HINT_HELP " Otwiera pomoc." - IDS_HINT_ABOUT " Informacje o Menederze urzdze ReactOS." + IDS_HINT_ABOUT " Informacje o Menedżerze urządzeń ReactOS." - IDS_HINT_SYS_RESTORE " Przywraca okno do normalnych rozmiarw." + IDS_HINT_SYS_RESTORE " Przywraca okno do normalnych rozmiarów." IDS_HINT_SYS_MOVE " Przesuwa to okno." IDS_HINT_SYS_SIZE " Zmienia rozmiar tego okna." IDS_HINT_SYS_MINIMIZE " Minimalizuje to okno do ikony." - IDS_HINT_SYS_MAXIMIZE " Rozszerza to okno do rozmiarw ekranu." + IDS_HINT_SYS_MAXIMIZE " Rozszerza to okno do rozmiarów ekranu." IDS_HINT_SYS_CLOSE " Zamyka okno." END diff --git a/base/applications/mscutils/devmgmt/lang/ru-RU.rc b/base/applications/mscutils/devmgmt/lang/ru-RU.rc index de349e0bdcb..d3c0d0bbdb8 100644 --- a/base/applications/mscutils/devmgmt/lang/ru-RU.rc +++ b/base/applications/mscutils/devmgmt/lang/ru-RU.rc @@ -4,29 +4,29 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&", IDC_EXIT + MENUITEM "&Выход", IDC_EXIT END - POPUP "" + POPUP "Действие" BEGIN - MENUITEM "", IDC_PRINT, GRAYED + MENUITEM "Печать", IDC_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDC_PROP, GRAYED + MENUITEM "Свойства", IDC_PROP, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDC_PROGHELP, GRAYED + MENUITEM "Справка", IDC_PROGHELP, GRAYED END - POPUP "" + POPUP "Вид" BEGIN - MENUITEM " ", IDC_DEVBYTYPE, CHECKED - MENUITEM " ", IDC_STATIC, GRAYED - MENUITEM " ", IDC_STATIC, GRAYED - MENUITEM " ", IDC_STATIC, GRAYED + MENUITEM "Устройства по типу", IDC_DEVBYTYPE, CHECKED + MENUITEM "Устройства по подключению", IDC_STATIC, GRAYED + MENUITEM "Ресурсы по типу", IDC_STATIC, GRAYED + MENUITEM "Ресурсы по подключению", IDC_STATIC, GRAYED END - POPUP "" + POPUP "Справка" BEGIN - MENUITEM "", IDC_PROGHELP - MENUITEM " ", IDC_ABOUT + MENUITEM "Помощь", IDC_PROGHELP + MENUITEM "О программе", IDC_ABOUT END END @@ -34,51 +34,51 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "", IDC_PROP, GRAYED + MENUITEM "Свойства", IDC_PROP, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDC_PROGHELP + MENUITEM "Помощь", IDC_PROGHELP END END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION " " +CAPTION "О Диспетчере устройств" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT " v0.1\nCopyright (C) 2006\n Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 30 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "Диспетчер устройств v0.1\nCopyright (C) 2006\nот Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 30 + PUSHBUTTON "Закрыть", IDOK, 75, 162, 44, 15 ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE " ; () , GNU, ; 2 , ( ) , .\r\n\r\n , , - , . GNU.\r\n\r\n GNU, , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLTIP_PROP "" - IDS_TOOLTIP_REFRESH "" - IDS_TOOLTIP_HELP "" - IDS_TOOLTIP_EXIT "" + IDS_TOOLTIP_PROP "Свойства" + IDS_TOOLTIP_REFRESH "Обновить" + IDS_TOOLTIP_HELP "Помощь" + IDS_TOOLTIP_EXIT "Выход" END /* Hints */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME " ReactOS" + IDS_APPNAME "Диспетчер устройств ReactOS" IDS_HINT_BLANK " " - IDS_HINT_EXIT " ." - IDS_HINT_REFRESH " ." - IDS_HINT_PROP " ." - IDS_HINT_HELP " ." - IDS_HINT_ABOUT " ReactOS Device Manager." + IDS_HINT_EXIT " Выход из программы." + IDS_HINT_REFRESH " Обновить список." + IDS_HINT_PROP " Открыть свойства для выбранного элемента." + IDS_HINT_HELP " Показать окно справки." + IDS_HINT_ABOUT " О ReactOS Device Manager." - IDS_HINT_SYS_RESTORE " ." - IDS_HINT_SYS_MOVE " ." - IDS_HINT_SYS_SIZE " ." - IDS_HINT_SYS_MINIMIZE " ." - IDS_HINT_SYS_MAXIMIZE " ." - IDS_HINT_SYS_CLOSE " ." + IDS_HINT_SYS_RESTORE " Востановить нормальный размер этого окна." + IDS_HINT_SYS_MOVE " Переместить это окно." + IDS_HINT_SYS_SIZE " Изменить размер этого окна." + IDS_HINT_SYS_MINIMIZE " Свернуть это окно в значок." + IDS_HINT_SYS_MAXIMIZE " Развернуть это окно на полный экран." + IDS_HINT_SYS_CLOSE " Закрыть это окно." END diff --git a/base/applications/mscutils/devmgmt/lang/uk-UA.rc b/base/applications/mscutils/devmgmt/lang/uk-UA.rc index c45a6f1e58a..aa0c1e15d1c 100644 --- a/base/applications/mscutils/devmgmt/lang/uk-UA.rc +++ b/base/applications/mscutils/devmgmt/lang/uk-UA.rc @@ -10,29 +10,29 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&", IDC_EXIT + MENUITEM "В&ихід", IDC_EXIT END - POPUP "ij" + POPUP "Дія" BEGIN - MENUITEM "", IDC_PRINT, GRAYED + MENUITEM "Друк", IDC_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDC_PROP, GRAYED + MENUITEM "Властивості", IDC_PROP, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDC_PROGHELP, GRAYED + MENUITEM "Довідка", IDC_PROGHELP, GRAYED END - POPUP "" + POPUP "Вигляд" BEGIN - MENUITEM " ", IDC_DEVBYTYPE, CHECKED - MENUITEM " ", IDC_STATIC, GRAYED - MENUITEM " ", IDC_STATIC, GRAYED - MENUITEM " ", IDC_STATIC, GRAYED + MENUITEM "Пристрої за типом", IDC_DEVBYTYPE, CHECKED + MENUITEM "Пристрої за підключенням", IDC_STATIC, GRAYED + MENUITEM "Ресурси за типом", IDC_STATIC, GRAYED + MENUITEM "Ресурси за підключенням", IDC_STATIC, GRAYED END - POPUP "" + POPUP "Довідка" BEGIN - MENUITEM "", IDC_PROGHELP - MENUITEM " ", IDC_ABOUT + MENUITEM "Довідка", IDC_PROGHELP + MENUITEM "Про програму", IDC_ABOUT END END @@ -40,51 +40,51 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "", IDC_PROP, GRAYED + MENUITEM "Властивості", IDC_PROP, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDC_PROGHELP + MENUITEM "Довідка", IDC_PROGHELP END END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION " " +CAPTION "Про програму Диспетчер пристроїв" FONT 8,"MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT " v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 26 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "Диспетчер пристроїв v0.1\nCopyright (C) 2006\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 130, 26 + PUSHBUTTON "Закрити", IDOK, 75, 162, 44, 15 ICON IDI_MAIN_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE " ; , ³ GNU, ; 2 , - , .\r\n\r\n 䳿 , , - Ҳ, Ҳ Ҳ Ҳ . ³ GNU.\r\n\r\n ³ GNU. , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLTIP_PROP "" - IDS_TOOLTIP_REFRESH "" - IDS_TOOLTIP_HELP "" - IDS_TOOLTIP_EXIT "" + IDS_TOOLTIP_PROP "Властивості" + IDS_TOOLTIP_REFRESH "Оновити" + IDS_TOOLTIP_HELP "Довідка" + IDS_TOOLTIP_EXIT "Вихід" END /* Hints */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME " ReactOS" + IDS_APPNAME "Диспетчер пристроїв ReactOS" IDS_HINT_BLANK " " - IDS_HINT_EXIT " ." - IDS_HINT_REFRESH " ." - IDS_HINT_PROP " ³ ." - IDS_HINT_HELP " ." - IDS_HINT_ABOUT " ReactOS." + IDS_HINT_EXIT " Вийти з програми." + IDS_HINT_REFRESH " Оновити список." + IDS_HINT_PROP " Відкрити властивості для вибраного елементу." + IDS_HINT_HELP " Показати вікно довідки." + IDS_HINT_ABOUT " Про Диспетчер пристроїв ReactOS." - IDS_HINT_SYS_RESTORE " ³ ." - IDS_HINT_SYS_MOVE " ." - IDS_HINT_SYS_SIZE " ." - IDS_HINT_SYS_MINIMIZE " ." - IDS_HINT_SYS_MAXIMIZE " ." - IDS_HINT_SYS_CLOSE " ." + IDS_HINT_SYS_RESTORE " Відновити вихідний розмір вікна." + IDS_HINT_SYS_MOVE " Змінити розташування вікна." + IDS_HINT_SYS_SIZE " Змінити розмір вікна." + IDS_HINT_SYS_MINIMIZE " Згорнути вікно у значок." + IDS_HINT_SYS_MAXIMIZE " Розгорнути вікно на весь екран." + IDS_HINT_SYS_CLOSE " Закрити вікно." END diff --git a/base/applications/mscutils/devmgmt/mainwnd.c b/base/applications/mscutils/devmgmt/mainwnd.c index c9785097d17..79af9f53b80 100644 --- a/base/applications/mscutils/devmgmt/mainwnd.c +++ b/base/applications/mscutils/devmgmt/mainwnd.c @@ -550,7 +550,13 @@ MainWndProc(HWND hwnd, /* Show the window */ ShowWindow(hwnd, Info->nCmdShow); + } + break; + case WM_SETFOCUS: + { + if (Info->hTreeView != NULL) + SetFocus(Info->hTreeView); } break; diff --git a/base/applications/mscutils/devmgmt/rsrc.rc b/base/applications/mscutils/devmgmt/rsrc.rc index 8a264bdc40e..e8a04bfc17b 100644 --- a/base/applications/mscutils/devmgmt/rsrc.rc +++ b/base/applications/mscutils/devmgmt/rsrc.rc @@ -23,10 +23,13 @@ IDB_EXIT BITMAP DISCARDABLE "res/exit.bmp" #include "lang/ja-JP.rc" #include "lang/ko-KR.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/mscutils/eventvwr/eventvwr.c b/base/applications/mscutils/eventvwr/eventvwr.c index 7f0a5e51e2e..7bac6f0afce 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.c +++ b/base/applications/mscutils/eventvwr/eventvwr.c @@ -503,7 +503,7 @@ QueryEventMessages(LPWSTR lpMachineName, HWND hwndDlg; HANDLE hEventLog; EVENTLOGRECORD *pevlr; - DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 1, dwRecordsToRead = 0, dwFlags, dwMaxLength; + DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 0, dwRecordsToRead = 0, dwFlags, dwMaxLength; LPWSTR lpSourceName; LPWSTR lpComputerName; LPSTR lpData; @@ -741,7 +741,7 @@ MyRegisterClass(HINSTANCE hInstance) wcex.cbSize = sizeof(WNDCLASSEX); - wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.style = 0; wcex.lpfnWndProc = WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; @@ -779,7 +779,7 @@ InitInstance(HINSTANCE hInstance, hwndMainWindow = CreateWindowW(szWindowClass, szTitle, - WS_OVERLAPPEDWINDOW, + WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, diff --git a/base/applications/mscutils/eventvwr/lang/pl-PL.rc b/base/applications/mscutils/eventvwr/lang/pl-PL.rc index 8ddf4c83248..a39fcc667b3 100644 --- a/base/applications/mscutils/eventvwr/lang/pl-PL.rc +++ b/base/applications/mscutils/eventvwr/lang/pl-PL.rc @@ -1,15 +1,16 @@ /* - * PROJECT: ReactOS Event Viewer - * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/mscutils/eventvwr/lang/en-US.rc - * PURPOSE: English Language File for ReactOS Event Viewer + * PROJECT: ReactOS Event Viewer + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/applications/mscutils/eventvwr/lang/en-US.rc + * PURPOSE: English Language File for ReactOS Event Viewer * - * translated by Caemyr - Olaf Siejka (Dec,2007;May,2011) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Dec,2007;May,2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ - + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDC_EVENTVWR MENU @@ -20,11 +21,11 @@ BEGIN MENUITEM "&Zabezpieczenia", ID_LOG_SECURITY MENUITEM "&System", ID_LOG_SYSTEM MENUITEM SEPARATOR - MENUITEM "&Wyjcie", IDM_EXIT + MENUITEM "&Wyjście", IDM_EXIT END - POPUP "&Podgld" + POPUP "&Podgląd" BEGIN - MENUITEM "&Odwie", IDM_REFRESH + MENUITEM "&Odśwież", IDM_REFRESH END MENUITEM "Op&cje", ID_OPTIONS POPUP "Po&moc" @@ -47,7 +48,7 @@ CAPTION "O programie" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_EVENTVWR,IDC_MYICON,14,9,21,20 - LTEXT "Podgld zdarze ReactOS wersja 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Podgląd zdarzeń ReactOS wersja 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,49,20,119,22 DEFPUSHBUTTON "OK",IDOK,90,48,42,16,WS_GROUP END @@ -57,18 +58,18 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER CAPTION "Czekaj.." FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CTEXT "adowanie logw zdarze. Prosz czeka ...",IDC_STATIC,0,15,230,8,SS_NOPREFIX + CTEXT "Ładowanie logów zdarzeń. Proszę czekać ...",IDC_STATIC,0,15,230,8,SS_NOPREFIX END IDD_EVENTDETAILDIALOG DIALOGEX 0, 0, 276, 282 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTEXTHELP -CAPTION "Szczegy zdarzenia" +CAPTION "Szczegóły zdarzenia" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "&Zamknij",IDOK,12,258,50,14 PUSHBUTTON "&Poprzedni",IDPREVIOUS,78,258,50,14 - PUSHBUTTON "&Nastpny",IDNEXT,144,258,50,14 + PUSHBUTTON "&Następny",IDNEXT,144,258,50,14 PUSHBUTTON "Po&moc",IDHELP,210,258,50,14 EDITTEXT IDC_EVENTTEXTEDIT,14,81,247,108,ES_MULTILINE | ES_READONLY LTEXT "&Opis:",IDC_STATIC,15,70,39,8 @@ -76,13 +77,13 @@ BEGIN LTEXT "Statycznie",IDC_EVENTDATESTATIC,56,14,72,8 LTEXT "Czas:",IDC_STATIC,14,27,36,8 LTEXT "Statycznie",IDC_EVENTTIMESTATIC,56,27,72,8 - LTEXT "&Uytkownik:",IDC_STATIC,14,41,36,8 + LTEXT "&Użytkownik:",IDC_STATIC,14,41,36,8 LTEXT "Statycznie",IDC_EVENTUSERSTATIC,56,41,72,8 LTEXT "&Komputer:",IDC_STATIC,14,54,36,8 LTEXT "Statycznie",IDC_EVENTCOMPUTERSTATIC,56,54,72,8 LTEXT "Numer ID:",IDC_STATIC,133,15,36,8 LTEXT "Statycznie",IDC_EVENTIDSTATIC,175,15,87,8 - LTEXT "rdo:",IDC_STATIC,133,28,36,8 + LTEXT "Źródło:",IDC_STATIC,133,28,36,8 LTEXT "Statycznie",IDC_EVENTSOURCESTATIC,175,28,87,8 LTEXT "Typ:",IDC_STATIC,133,42,36,8 LTEXT "Statycznie",IDC_EVENTTYPESTATIC,175,42,87,8 @@ -91,15 +92,15 @@ BEGIN EDITTEXT IDC_EVENTDATAEDIT,14,204,247,44,ES_MULTILINE | ES_READONLY LTEXT "D&ane",IDC_STATIC,14,194,20,8 CONTROL "&Bajty",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10 - CONTROL "&Sowa",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10 + CONTROL "&Słowa",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10 END STRINGTABLE BEGIN - IDS_APP_TITLE "Podgld zdarze" - IDS_EVENTSTRINGIDNOTFOUND "Opis zdarzenia dla danego numeru ID: ( %lu ) nie zosta odnaleziony w rdle: ( %s ). Ten komputer moe nie miec wystarczajcych informacji w rejestrze albo bibliotek DLL, aby wywietli wiadomoci z komputera zdalnego." - IDS_EVENTLOG_ERROR_TYPE "Bd" - IDS_EVENTLOG_WARNING_TYPE "Ostrzeenie" + IDS_APP_TITLE "Podgląd zdarzeń" + IDS_EVENTSTRINGIDNOTFOUND "Opis zdarzenia dla danego numeru ID: ( %lu ) nie został odnaleziony w źródle: ( %s ). Ten komputer może nie miec wystarczających informacji w rejestrze, albo bibliotek DLL, aby wyświetlić wiadomości z komputera zdalnego." + IDS_EVENTLOG_ERROR_TYPE "Błąd" + IDS_EVENTLOG_WARNING_TYPE "Ostrzeżenie" IDS_EVENTLOG_INFORMATION_TYPE "Informacja" IDS_EVENTLOG_AUDIT_SUCCESS "Udany Audyt" IDS_EVENTLOG_AUDIT_FAILURE "Nieudany Audyt" @@ -112,10 +113,10 @@ BEGIN IDS_COLUMNTYPE "Typ" IDS_COLUMNDATE "Data" IDS_COLUMNTIME "Czas" - IDS_COLUMNSOURCE "rdo" + IDS_COLUMNSOURCE "Źródło" IDS_COLUMNCATEGORY "Kategoria" IDS_COLUMNEVENT "Zdarzenie" - IDS_COLUMNUSER "Uytkownik" + IDS_COLUMNUSER "Użytkownik" IDS_COLUMNCOMPUTER "Komputer" IDS_COLUMNEVENTDATA "Dane zdarzenia" END diff --git a/base/applications/mscutils/eventvwr/lang/ru-RU.rc b/base/applications/mscutils/eventvwr/lang/ru-RU.rc index e2c6cb2f714..908468c1e37 100644 --- a/base/applications/mscutils/eventvwr/lang/ru-RU.rc +++ b/base/applications/mscutils/eventvwr/lang/ru-RU.rc @@ -10,24 +10,24 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDC_EVENTVWR MENU BEGIN - POPUP "&" + POPUP "&Логи" BEGIN - MENUITEM "&", ID_LOG_APPLICATION - MENUITEM "&", ID_LOG_SECURITY - MENUITEM "&", ID_LOG_SYSTEM + MENUITEM "&Приложений", ID_LOG_APPLICATION + MENUITEM "&Безопасности", ID_LOG_SECURITY + MENUITEM "&Системы", ID_LOG_SYSTEM MENUITEM SEPARATOR - MENUITEM "&", IDM_EXIT + MENUITEM "В&ыход", IDM_EXIT END - POPUP "&" + POPUP "&Вид" BEGIN - MENUITEM "&", IDM_REFRESH + MENUITEM "&Обновить", IDM_REFRESH END - MENUITEM "&", ID_OPTIONS - POPUP "&" + MENUITEM "&Настройки", ID_OPTIONS + POPUP "&Справка" BEGIN - MENUITEM "&", IDM_HELP + MENUITEM "&Помощь", IDM_HELP MENUITEM SEPARATOR - MENUITEM "& ", IDM_ABOUT + MENUITEM "&О программе", IDM_ABOUT END END @@ -39,85 +39,85 @@ END IDD_ABOUTBOX DIALOGEX 0, 0, 230, 75 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "О программе" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_EVENTVWR,IDC_MYICON,14,9,21,20 - LTEXT " ReactOS. 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX - LTEXT " () 2007 (marc.piulachs@codexchange.net)",IDC_STATIC,49,20,140,22 + LTEXT "Просмотр событий ReactOS. Версия 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Авторские права (С) 2007 Марк Пиулачс (marc.piulachs@codexchange.net)",IDC_STATIC,49,20,140,22 DEFPUSHBUTTON "OK",IDOK,90,48,42,16,WS_GROUP END IDD_PROGRESSBOX DIALOGEX 0, 0, 230, 40 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER -CAPTION ".." +CAPTION "Подождите.." FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CTEXT " . ...",IDC_STATIC,0,15,230,8,SS_NOPREFIX + CTEXT "Идет загрузка. Подождите ...",IDC_STATIC,0,15,230,8,SS_NOPREFIX END IDD_EVENTDETAILDIALOG DIALOGEX 0, 0, 276, 282 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Свойства события" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "&",IDOK,14,258,55,14 - PUSHBUTTON "&",IDPREVIOUS,78,258,55,14 - PUSHBUTTON "&",IDNEXT,142,258,55,14 - PUSHBUTTON "&",IDHELP,206,258,55,14 + DEFPUSHBUTTON "&Закрыть",IDOK,14,258,55,14 + PUSHBUTTON "&Предыдущее",IDPREVIOUS,78,258,55,14 + PUSHBUTTON "С&ледующее",IDNEXT,142,258,55,14 + PUSHBUTTON "П&омощь",IDHELP,206,258,55,14 EDITTEXT IDC_EVENTTEXTEDIT,14,81,247,108,ES_MULTILINE | ES_READONLY - LTEXT ":",IDC_STATIC,15,70,39,8 - LTEXT ":",IDC_STATIC,14,14,36,8 + LTEXT "Описание:",IDC_STATIC,15,70,39,8 + LTEXT "Дата:",IDC_STATIC,14,14,36,8 LTEXT "",IDC_EVENTDATESTATIC,68,14,72,8 - LTEXT ":",IDC_STATIC,14,27,36,8 + LTEXT "Время:",IDC_STATIC,14,27,36,8 LTEXT "",IDC_EVENTTIMESTATIC,68,27,72,8 - LTEXT ":",IDC_STATIC,14,41,50,8 + LTEXT "Пользователь:",IDC_STATIC,14,41,50,8 LTEXT "",IDC_EVENTUSERSTATIC,68,41,72,8 - LTEXT ":",IDC_STATIC,14,54,45,8 + LTEXT "Компьютер:",IDC_STATIC,14,54,45,8 LTEXT "",IDC_EVENTCOMPUTERSTATIC,68,54,72,8 - LTEXT " (ID):",IDC_STATIC,143,15,45,8 + LTEXT "Код (ID):",IDC_STATIC,143,15,45,8 LTEXT "",IDC_EVENTIDSTATIC,190,15,87,8 - LTEXT ":",IDC_STATIC,143,28,36,8 + LTEXT "Источник:",IDC_STATIC,143,28,36,8 LTEXT "",IDC_EVENTSOURCESTATIC,190,28,127,8 - LTEXT ":",IDC_STATIC,143,42,36,8 + LTEXT "Тип:",IDC_STATIC,143,42,36,8 LTEXT "",IDC_EVENTTYPESTATIC,190,42,87,8 - LTEXT ":",IDC_STATIC,143,55,38,8 + LTEXT "Категория:",IDC_STATIC,143,55,38,8 LTEXT "",IDC_EVENTCATEGORYSTATIC,190,55,87,8 EDITTEXT IDC_EVENTDATAEDIT,14,204,247,44,ES_MULTILINE | ES_READONLY - LTEXT ":",IDC_STATIC,14,192,30,8 - CONTROL "&",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,49,192,34,10 - CONTROL "&",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,87,192,33,10 + LTEXT "Данные:",IDC_STATIC,14,192,30,8 + CONTROL "&Байты",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,49,192,34,10 + CONTROL "&Слова",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,87,192,33,10 END STRINGTABLE BEGIN - IDS_APP_TITLE " " - IDS_EVENTSTRINGIDNOTFOUND " ( %lu ) ( %s ). , DLL ." - IDS_EVENTLOG_ERROR_TYPE "" - IDS_EVENTLOG_WARNING_TYPE "" - IDS_EVENTLOG_INFORMATION_TYPE "" - IDS_EVENTLOG_AUDIT_SUCCESS " " - IDS_EVENTLOG_AUDIT_FAILURE " " - IDS_EVENTLOG_SUCCESS "" - IDS_EVENTLOG_UNKNOWN_TYPE " " + IDS_APP_TITLE "Просмотр событий" + IDS_EVENTSTRINGIDNOTFOUND "Не найдено описание для события с кодом ( %lu ) в источнике ( %s ). Возможно, на локальном компьютере нет нужных данных в реестре или файлов DLL сообщений для отображения сообщений удаленного компьютера." + IDS_EVENTLOG_ERROR_TYPE "Ошибка" + IDS_EVENTLOG_WARNING_TYPE "Предупреждение" + IDS_EVENTLOG_INFORMATION_TYPE "Уведомление" + IDS_EVENTLOG_AUDIT_SUCCESS "Аудит успехов" + IDS_EVENTLOG_AUDIT_FAILURE "Аудит отказов" + IDS_EVENTLOG_SUCCESS "Успех" + IDS_EVENTLOG_UNKNOWN_TYPE "Неизвестное событие" END STRINGTABLE BEGIN - IDS_COLUMNTYPE "Type" - IDS_COLUMNDATE "Date" - IDS_COLUMNTIME "Time" - IDS_COLUMNSOURCE "Source" - IDS_COLUMNCATEGORY "Category" - IDS_COLUMNEVENT "Event" - IDS_COLUMNUSER "User" - IDS_COLUMNCOMPUTER "Computer" - IDS_COLUMNEVENTDATA "Event Data" + IDS_COLUMNTYPE "Тип" + IDS_COLUMNDATE "Дата" + IDS_COLUMNTIME "Время" + IDS_COLUMNSOURCE "Источник" + IDS_COLUMNCATEGORY "Категория" + IDS_COLUMNEVENT "Событие" + IDS_COLUMNUSER "Пользователь" + IDS_COLUMNCOMPUTER "Компьютер" + IDS_COLUMNEVENTDATA "Данные события" END STRINGTABLE BEGIN - IDS_NONE "None" + IDS_NONE "Нету" IDS_NOT_AVAILABLE "N/A" END diff --git a/base/applications/mscutils/eventvwr/lang/uk-UA.rc b/base/applications/mscutils/eventvwr/lang/uk-UA.rc index 8a703aecf5c..a6b283b19c0 100644 --- a/base/applications/mscutils/eventvwr/lang/uk-UA.rc +++ b/base/applications/mscutils/eventvwr/lang/uk-UA.rc @@ -10,24 +10,24 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDC_EVENTVWR MENU BEGIN - POPUP "&" + POPUP "&Звіт" BEGIN - MENUITEM "&", ID_LOG_APPLICATION - MENUITEM "&", ID_LOG_SECURITY - MENUITEM "&", ID_LOG_SYSTEM + MENUITEM "&Програма", ID_LOG_APPLICATION + MENUITEM "&Захист", ID_LOG_SECURITY + MENUITEM "&Система", ID_LOG_SYSTEM MENUITEM SEPARATOR - MENUITEM "&", IDM_EXIT + MENUITEM "В&ихід", IDM_EXIT END - POPUP "&" + POPUP "&Вигляд" BEGIN - MENUITEM "&", IDM_REFRESH + MENUITEM "&Оновити", IDM_REFRESH END - MENUITEM "&", ID_OPTIONS - POPUP "&" + MENUITEM "&Властивості", ID_OPTIONS + POPUP "&Допомога" BEGIN - MENUITEM "&", IDM_HELP + MENUITEM "Д&опомога", IDM_HELP MENUITEM SEPARATOR - MENUITEM "&...", IDM_ABOUT + MENUITEM "&Про...", IDM_ABOUT END END @@ -39,85 +39,85 @@ END IDD_ABOUTBOX DIALOGEX 0, 0, 230, 75 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU -CAPTION "..." +CAPTION "Про..." FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_EVENTVWR,IDC_MYICON,14,9,21,20 - LTEXT "ReactOS 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Оглядач подій ReactOS версії 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2007 Marc Piulachs (marc.piulachs@codexchange.net)",IDC_STATIC,49,20,119,22 DEFPUSHBUTTON "OK",IDOK,90,48,42,16,WS_GROUP END IDD_PROGRESSBOX DIALOGEX 0, 0, 230, 40 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER -CAPTION ".." +CAPTION "Зачекайте.." FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CTEXT " . , ...",IDC_STATIC,0,15,230,8,SS_NOPREFIX + CTEXT "Завантаження Звіту подій. Будь ласка, зачекайте ...",IDC_STATIC,0,15,230,8,SS_NOPREFIX END IDD_EVENTDETAILDIALOG DIALOGEX 0, 0, 276, 282 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTEXTHELP -CAPTION " 䳿" +CAPTION "Деталі події" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "&",IDOK,12,258,50,14 - PUSHBUTTON "&",IDPREVIOUS,78,258,50,14 - PUSHBUTTON "&",IDNEXT,144,258,50,14 - PUSHBUTTON "&",IDHELP,210,258,50,14 + DEFPUSHBUTTON "&Закрити",IDOK,12,258,50,14 + PUSHBUTTON "&Попередня",IDPREVIOUS,78,258,50,14 + PUSHBUTTON "&Наступна",IDNEXT,144,258,50,14 + PUSHBUTTON "&Допомога",IDHELP,210,258,50,14 EDITTEXT IDC_EVENTTEXTEDIT,14,81,247,108,ES_MULTILINE | ES_READONLY - LTEXT "&:",IDC_STATIC,15,70,39,8 - LTEXT ":",IDC_STATIC,14,14,36,8 - LTEXT "",IDC_EVENTDATESTATIC,56,14,72,8 - LTEXT ":",IDC_STATIC,14,27,36,8 - LTEXT "",IDC_EVENTTIMESTATIC,56,27,72,8 - LTEXT "&:",IDC_STATIC,14,41,36,8 - LTEXT "",IDC_EVENTUSERSTATIC,56,41,72,8 - LTEXT "&':",IDC_STATIC,14,54,36,8 - LTEXT "",IDC_EVENTCOMPUTERSTATIC,56,54,72,8 - LTEXT ". 䳿:",IDC_STATIC,133,15,36,8 - LTEXT "",IDC_EVENTIDSTATIC,175,15,87,8 - LTEXT ":",IDC_STATIC,133,28,36,8 - LTEXT "",IDC_EVENTSOURCESTATIC,175,28,87,8 - LTEXT ":",IDC_STATIC,133,42,36,8 - LTEXT "",IDC_EVENTTYPESTATIC,175,42,87,8 - LTEXT ":",IDC_STATIC,133,55,36,8 - LTEXT "",IDC_EVENTCATEGORYSTATIC,175,55,87,8 + LTEXT "&Опис:",IDC_STATIC,15,70,39,8 + LTEXT "Дата:",IDC_STATIC,14,14,36,8 + LTEXT "Постійна",IDC_EVENTDATESTATIC,59,14,72,8 + LTEXT "Час:",IDC_STATIC,14,27,36,8 + LTEXT "Постійний",IDC_EVENTTIMESTATIC,59,27,72,8 + LTEXT "&Користувач:",IDC_STATIC,14,41,41,8 + LTEXT "Постійний",IDC_EVENTUSERSTATIC,59,41,72,8 + LTEXT "Ко&мп'ютер:",IDC_STATIC,14,54,37,8 + LTEXT "Постійний",IDC_EVENTCOMPUTERSTATIC,59,54,72,8 + LTEXT "ID Події:",IDC_STATIC,133,15,36,8 + LTEXT "Постійний",IDC_EVENTIDSTATIC,175,15,87,8 + LTEXT "Джерело:",IDC_STATIC,133,28,36,8 + LTEXT "Постійне",IDC_EVENTSOURCESTATIC,175,28,87,8 + LTEXT "Тип:",IDC_STATIC,133,42,36,8 + LTEXT "Постійний",IDC_EVENTTYPESTATIC,175,42,87,8 + LTEXT "Категорія:",IDC_STATIC,133,55,36,8 + LTEXT "Постійна",IDC_EVENTCATEGORYSTATIC,175,55,87,8 EDITTEXT IDC_EVENTDATAEDIT,14,204,247,44,ES_MULTILINE | ES_READONLY - LTEXT "&a",IDC_STATIC,14,194,20,8 - CONTROL "&",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10 - CONTROL "&",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10 + LTEXT "Д&aта",IDC_STATIC,14,194,20,8 + CONTROL "&Байт",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10 + CONTROL "&Слово",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10 END STRINGTABLE BEGIN - IDS_APP_TITLE " " - IDS_EVENTSTRINGIDNOTFOUND " 䳿( %lu ) ( %s ) . ' DLL , '." - IDS_EVENTLOG_ERROR_TYPE "" - IDS_EVENTLOG_WARNING_TYPE "" - IDS_EVENTLOG_INFORMATION_TYPE "" - IDS_EVENTLOG_AUDIT_SUCCESS " " - IDS_EVENTLOG_AUDIT_FAILURE " " - IDS_EVENTLOG_SUCCESS "" - IDS_EVENTLOG_UNKNOWN_TYPE " " + IDS_APP_TITLE "Оглядач подій" + IDS_EVENTSTRINGIDNOTFOUND "Опис для Ідентифікатора події( %lu ) за джерелом( %s ) не знайдено. Локальний комп'ютер може не мати необхідної інформації в реєстрі чи DLL файлів повідомлень для відображення повідомлень, що надходять від віддаленого комп'ютера." + IDS_EVENTLOG_ERROR_TYPE "Помилка" + IDS_EVENTLOG_WARNING_TYPE "Попередження" + IDS_EVENTLOG_INFORMATION_TYPE "Повідомлення" + IDS_EVENTLOG_AUDIT_SUCCESS "Аудит успіхів" + IDS_EVENTLOG_AUDIT_FAILURE "Аудит відмов" + IDS_EVENTLOG_SUCCESS "Успіх" + IDS_EVENTLOG_UNKNOWN_TYPE "Невідома подія" END STRINGTABLE BEGIN - IDS_COLUMNTYPE "" - IDS_COLUMNDATE "" - IDS_COLUMNTIME "" - IDS_COLUMNSOURCE "" - IDS_COLUMNCATEGORY "" - IDS_COLUMNEVENT "" - IDS_COLUMNUSER "" - IDS_COLUMNCOMPUTER "'" - IDS_COLUMNEVENTDATA " 䳿" + IDS_COLUMNTYPE "Тип" + IDS_COLUMNDATE "Дата" + IDS_COLUMNTIME "Час" + IDS_COLUMNSOURCE "Джерело" + IDS_COLUMNCATEGORY "Категорія" + IDS_COLUMNEVENT "Подія" + IDS_COLUMNUSER "Користувач" + IDS_COLUMNCOMPUTER "Комп'ютер" + IDS_COLUMNEVENTDATA "Дані події" END STRINGTABLE BEGIN - IDS_NONE "None" + IDS_NONE "Немає" IDS_NOT_AVAILABLE "N/A" END diff --git a/base/applications/mscutils/eventvwr/rsrc.rc b/base/applications/mscutils/eventvwr/rsrc.rc index a3b864ed86a..1d5eeed9d28 100644 --- a/base/applications/mscutils/eventvwr/rsrc.rc +++ b/base/applications/mscutils/eventvwr/rsrc.rc @@ -19,10 +19,12 @@ IDI_ERRORICON ICON "res/error.ico" #include "lang/ja-JP.rc" #include "lang/ko-KR.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/mscutils/servman/CMakeLists.txt b/base/applications/mscutils/servman/CMakeLists.txt index 87bd84b08d1..2a7bd6b0467 100644 --- a/base/applications/mscutils/servman/CMakeLists.txt +++ b/base/applications/mscutils/servman/CMakeLists.txt @@ -24,12 +24,12 @@ list(APPEND SOURCE stop_dependencies.c servman.rc) -add_executable(servman ${CMAKE_CURRENT_BINARY_DIR}/servman_precomp.h.gch ${SOURCE}) - -add_pch(servman ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(servman ${SOURCE}) set_module_type(servman win32gui) add_importlibs(servman user32 gdi32 advapi32 version comctl32 shell32 comdlg32 msvcrt kernel32) +add_pch(servman precomp.h) + add_cd_file(TARGET servman DESTINATION reactos/system32 FOR all) diff --git a/base/applications/mscutils/servman/lang/pl-PL.rc b/base/applications/mscutils/servman/lang/pl-PL.rc index bd5e473dc6e..769fa099e51 100644 --- a/base/applications/mscutils/servman/lang/pl-PL.rc +++ b/base/applications/mscutils/servman/lang/pl-PL.rc @@ -1,10 +1,11 @@ /* * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl * - * updated by Caemyr - Olaf Siejka (Jan, 2008) - * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * updated by Caemyr - Olaf Siejka (Jan, 2008) + * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -15,32 +16,32 @@ BEGIN BEGIN MENUITEM "Eksportuj...", ID_EXPORT MENUITEM SEPARATOR - MENUITEM "&Zakocz", ID_EXIT + MENUITEM "&Zakończ", ID_EXIT END POPUP "Akcja" BEGIN - MENUITEM "Poczenie do...", ID_CONNECT, GRAYED + MENUITEM "Połączenie do...", ID_CONNECT, GRAYED MENUITEM SEPARATOR MENUITEM "Uruchom", ID_START, GRAYED MENUITEM "Zatrzymaj", ID_STOP, GRAYED MENUITEM "Wstrzymaj", ID_PAUSE, GRAYED - MENUITEM "Wznw", ID_RESUME, GRAYED + MENUITEM "Wznów", ID_RESUME, GRAYED MENUITEM "Uruchom ponownie", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Odwie", ID_REFRESH + MENUITEM "Odśwież", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Edycja...", ID_EDIT, GRAYED - MENUITEM "Utwrz...", ID_CREATE - MENUITEM "Usu...", ID_DELETE, GRAYED + MENUITEM "Utwórz...", ID_CREATE + MENUITEM "Usuń...", ID_DELETE, GRAYED MENUITEM SEPARATOR - MENUITEM "Waciwoci...", ID_PROP, GRAYED + MENUITEM "Właściwości...", ID_PROP, GRAYED END POPUP "Widok" BEGIN - MENUITEM "Due ikony", ID_VIEW_LARGE - MENUITEM "Mae ikony", ID_VIEW_SMALL + MENUITEM "Duże ikony", ID_VIEW_LARGE + MENUITEM "Małe ikony", ID_VIEW_SMALL MENUITEM "Lista", ID_VIEW_LIST - MENUITEM "Szczegy", ID_VIEW_DETAILS + MENUITEM "Szczegóły", ID_VIEW_DETAILS MENUITEM SEPARATOR MENUITEM "Dostosuj...",ID_VIEW_CUST, GRAYED END @@ -58,33 +59,33 @@ BEGIN MENUITEM "Uruchom", ID_START, GRAYED MENUITEM "Zatrzymaj", ID_STOP, GRAYED MENUITEM "Wstrzymaj", ID_PAUSE, GRAYED - MENUITEM "Wznw", ID_RESUME, GRAYED + MENUITEM "Wznów", ID_RESUME, GRAYED MENUITEM "Uruchom ponownie", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Odwie", ID_REFRESH + MENUITEM "Odśwież", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Edycja...", ID_EDIT, GRAYED - MENUITEM "Usu...", ID_DELETE, GRAYED + MENUITEM "Usuń...", ID_DELETE, GRAYED MENUITEM SEPARATOR - MENUITEM "Waciwoci...", ID_PROP, GRAYED + MENUITEM "Właściwości...", ID_PROP, GRAYED MENUITEM SEPARATOR MENUITEM "Pomoc...", ID_HELP END END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION "Meneder Usug - informacje" +CAPTION "Menedżer Usług - informacje" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT "Meneder Usug v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 135, 26 + LTEXT "Menedżer Usług v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy@gmail.com)", IDC_STATIC, 48, 7, 135, 26 PUSHBUTTON "Zamknij", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END IDD_DLG_GENERAL DIALOGEX 6,6,253,225 -CAPTION "Oglny" +CAPTION "Ogólny" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN @@ -95,34 +96,34 @@ BEGIN COMBOBOX IDC_START_TYPE, 70, 107, 176, 40, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST PUSHBUTTON "Uruchom", IDC_START, 6, 155, 54, 15, WS_DISABLED PUSHBUTTON "Zatrzymaj", IDC_STOP, 68, 155, 54, 15, WS_DISABLED - PUSHBUTTON "Wznw", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Wznów", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED PUSHBUTTON "Uruchom ponownie", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED - LTEXT "Nazwa usugi:", IDC_STATIC, 4, 11, 53, 11 - LTEXT "Nazwa wywietlana:", IDC_STATIC, 4, 29, 53, 11 + LTEXT "Nazwa usługi:", IDC_STATIC, 4, 11, 53, 11 + LTEXT "Nazwa wyświetlana:", IDC_STATIC, 4, 29, 53, 11 LTEXT "Opis:", IDC_STATIC, 4, 51, 53, 11 - LTEXT "cieka do aplikacji", IDC_STATIC, 6, 73, 82, 9 + LTEXT "Ścieżka do aplikacji", IDC_STATIC, 6, 73, 82, 9 LTEXT "Typ uruchomienia:", IDC_STATIC, 6, 108, 53, 11 - LTEXT "Stan usugi:", IDC_STATIC, 4, 138, 53, 11 + LTEXT "Stan usługi:", IDC_STATIC, 4, 138, 53, 11 LTEXT "", IDC_SERV_STATUS, 70, 138, 176, 11, WS_CHILD | WS_VISIBLE - LTEXT "Moesz okreli parametry pocztkowe, ktre bd uyte przy uruchomieniu usugi z tego miejsca.",IDC_STATIC, 6,177,240,15 + LTEXT "Możesz określić parametry początkowe, które będą użyte przy uruchomieniu usługi z tego miejsca.",IDC_STATIC, 6,177,240,15 LTEXT "Parametry uruchomienia:", IDC_STATIC, 6, 200, 58, 11 EDITTEXT IDC_START_PARAM, 68, 199, 178, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 -CAPTION "Zalenoci" +CAPTION "Zależności" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 - LTEXT "Niektre usugi s zalene od innych usug, sterownikw systemowych i grup kolejnoci adowania. Jeeli skadnik systemu jest zatrzymany lub nie dziaa prawidowo, moe to mie.", IDC_STATIC,8, 7, 238, 26 - LTEXT "Ta usuga jest zalena od nastpujcych skadnikw systemu", IDC_STATIC, 8, 57, 236, 9 + LTEXT "Niektóre usługi są zależne od innych usług, sterowników systemowych i grup kolejności ładowania. Jeżeli składnik systemu jest zatrzymany lub nie działa prawidłowo, zależne od niego usługi nie uruchomią się.", IDC_STATIC,8, 7, 238, 26 + LTEXT "Ta usługa jest zależna od następujących składników systemu", IDC_STATIC, 8, 57, 236, 9 LTEXT "", IDC_DEPEND_SERVICE, 8, 38, 236, 13 END IDD_DLG_CREATE DIALOGEX 6,6,225,209 -CAPTION "Utwrz usug" +CAPTION "Utwórz usługę" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN @@ -131,24 +132,24 @@ BEGIN EDITTEXT IDC_CREATE_PATH, 10, 62, 210, 13, WS_CHILD | WS_VISIBLE EDITTEXT IDC_CREATE_DESC, 10, 97, 210, 48, WS_CHILD | WS_VISIBLE EDITTEXT IDC_CREATE_OPTIONS, 10, 162, 210, 13, WS_CHILD | WS_VISIBLE - LTEXT "*Nazwa usugi", IDC_STATIC, 12, 12, 54, 9 - LTEXT "*Nazwa wywietlana", IDC_STATIC, 12, 33, 54, 9 - LTEXT "*cieka do aplikacji", IDC_STATIC, 10, 51, 68, 9 + LTEXT "*Nazwa usługi", IDC_STATIC, 12, 12, 54, 9 + LTEXT "*Nazwa wyświetlana", IDC_STATIC, 12, 33, 54, 9 + LTEXT "*Ścieżka do aplikacji", IDC_STATIC, 10, 51, 68, 9 LTEXT "Opis", IDC_STATIC, 12, 86, 44, 9 PUSHBUTTON "OK", IDOK, 126, 192, 44, 13 PUSHBUTTON "Anuluj", IDCANCEL, 176, 192, 46, 13 - LTEXT "Dodatkowe opcje (kliknij Pomoc, aby zobaczy szczegy)", IDC_STATIC, 10, 151, 134, 9 + LTEXT "Dodatkowe opcje (kliknij Pomoc, aby zobaczyć szczegóły)", IDC_STATIC, 10, 151, 134, 9 PUSHBUTTON "Pomoc", ID_CREATE_HELP, 10, 192, 44, 13 END IDD_DLG_DELETE DIALOGEX 6,6,185,148 -CAPTION "Usu usug" +CAPTION "Usuń usługę" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | DS_MODALFRAME BEGIN ICON IDI_WARNING, IDC_STATIC, 10, 8, 24, 22 - LTEXT "Czy na pewno chcesz usun nastpujc usug?", IDC_STATIC, 50, 6, 125, 25 - LTEXT "Nazwa usugi:",IDC_STATIC, 6, 40, 80, 9 + LTEXT "Czy na pewno chcesz usunąć następującą usługę?", IDC_STATIC, 50, 6, 125, 25 + LTEXT "Nazwa usługi:",IDC_STATIC, 6, 40, 80, 9 LTEXT "", IDC_DEL_NAME, 15, 53, 160, 15 EDITTEXT IDC_DEL_DESC, 6, 73, 174, 48, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_EX_STATICEDGE | ES_MULTILINE | ES_READONLY PUSHBUTTON "Tak", IDOK, 26, 129, 54, 13 @@ -165,7 +166,7 @@ BEGIN END IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 -CAPTION "Usuga kontrolna" +CAPTION "Usługa kontrolna" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW @@ -192,44 +193,44 @@ BEGIN IDS_SERVICES_STARTED "Uruchomiono" IDS_SERVICES_STOPPED "Zatrzymano" IDS_SERVICES_AUTO "Automatyczny" - IDS_SERVICES_MAN "Rczny" - IDS_SERVICES_DIS "Wyczony" + IDS_SERVICES_MAN "Ręczny" + IDS_SERVICES_DIS "Wyłączony" END STRINGTABLE DISCARDABLE BEGIN - IDS_NUM_SERVICES "Numer usugi: %d" - IDS_STOP_DEPENDS "Kiedy %s si zatrzyma, inne usugi rwnie si zatrzymaj" - IDS_NO_DEPENDS "" - IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; moesz go rozprowadza dalej i/lub modyfikowa na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundacj Wolnego Oprogramowania - wedug wersji 2 tej Licencji lub (wedug Twojego wyboru) ktrej z pniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadziej, i bdzie on uyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domylnej gwarancji PRZYDATNOCI HANDLOWEJ albo PRZYDATNOCI DO OKRELONYCH ZASTOSOWA. W celu uzyskania bliszych informacji signij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnoci wraz z niniejszym programem otrzymae te egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_NUM_SERVICES "Numer usługi: %d" + IDS_STOP_DEPENDS "Kiedy %s się zatrzyma, inne usługi od niej zależne również się zatrzymają" + IDS_NO_DEPENDS "" + IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLTIP_PROP "Waciwoci" - IDS_TOOLTIP_REFRESH "Odwie" - IDS_TOOLTIP_EXPORT "Eksportuj list" - IDS_TOOLTIP_CREATE "Utwrz now usug" - IDS_TOOLTIP_DELETE "Usu istniejc usug" - IDS_TOOLTIP_START "Uruchom usug" - IDS_TOOLTIP_STOP "Zatrzymaj usug" - IDS_TOOLTIP_PAUSE "Wstrzymaj usug" - IDS_TOOLTIP_RESTART "Wznw usug" + IDS_TOOLTIP_PROP "Właściwości" + IDS_TOOLTIP_REFRESH "Odśwież" + IDS_TOOLTIP_EXPORT "Eksportuj listę" + IDS_TOOLTIP_CREATE "Utwórz nową usługę" + IDS_TOOLTIP_DELETE "Usuń istniejącą usługę" + IDS_TOOLTIP_START "Uruchom usługę" + IDS_TOOLTIP_STOP "Zatrzymaj usługę" + IDS_TOOLTIP_PAUSE "Wstrzymaj usługę" + IDS_TOOLTIP_RESTART "Wznów usługę" END STRINGTABLE DISCARDABLE BEGIN - IDS_PROGRESS_INFO_START "ReactOS usiuje uruchomi nastpujc usug" - IDS_PROGRESS_INFO_STOP "ReactOS usiuje zatrzyma nastpujc usug" - IDS_CREATE_SUCCESS "Usuga utworzona pomylnie" - IDS_DELETE_SUCCESS "Usuga skasowana pomylnie" - IDS_CREATE_REQ "Pola oznaczone gwiazdkami\ns obowizkowe" - IDS_DELETE_STOP "Musisz rcznie zatrzyma usug przed usuniciem!" + IDS_PROGRESS_INFO_START "ReactOS usiłuje uruchomić następującą usługę" + IDS_PROGRESS_INFO_STOP "ReactOS usiłuje zatrzymać następującą usługę" + IDS_CREATE_SUCCESS "Usługa utworzona pomyślnie" + IDS_DELETE_SUCCESS "Usługa skasowana pomyślnie" + IDS_CREATE_REQ "Pola oznaczone gwiazdkami\nsą obowiązkowe" + IDS_DELETE_STOP "Musisz ręcznie zatrzymać usługę przed jej usunięciem!" END STRINGTABLE DISCARDABLE BEGIN - IDS_HELP_OPTIONS "OPCJE TWORZENIA:\r\nUWAGA: Nazwa opcji zawiera znak rwnoci.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" + IDS_HELP_OPTIONS "OPCJE TWORZENIA:\r\nUWAGA: Nazwa opcji zawiera znak równości.\r\n type= \r\n (domyślnie = own)\r\n start= \r\n (domyślnie = demand) \r\n error= \r\n (domyślnie = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (domyślnie = LocalSystem)\r\n password= \r\n" END #define IDS_HINT_BLANK 20000 #define IDS_HINT_EXPORT 20001 @@ -259,40 +260,40 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_HINT_BLANK " " - IDS_HINT_EXPORT " Eksportuj aktualn list do pliku." - IDS_HINT_EXIT " Wyjd z programu." + IDS_HINT_EXPORT " Eksportuj aktualną listę do pliku." + IDS_HINT_EXIT " Wyjdź z programu." - IDS_HINT_CONNECT " Zarzdzaj rnymi komputerami." - IDS_HINT_START " Uruchom wybran usug." - IDS_HINT_STOP " Zatrzymaj wybran usug." - IDS_HINT_PAUSE " Wstrzymaj wybran usug." - IDS_HINT_RESUME " Wznw wybran usug." - IDS_HINT_RESTART " Zatrzymaj i uruchom wybran usug." - IDS_HINT_REFRESH " Odwie list usug." - IDS_HINT_EDIT " Edytuj waciwoci wybranej usugi." - IDS_HINT_CREATE " Utwrz now usug." - IDS_HINT_DELETE " Usu wybran usug." - IDS_HINT_PROP " Otwarty wykaz waciwoci dla aktualnej selekcji." + IDS_HINT_CONNECT " Zarządzaj różnymi komputerami." + IDS_HINT_START " Uruchom wybraną usługę." + IDS_HINT_STOP " Zatrzymaj wybraną usługę." + IDS_HINT_PAUSE " Wstrzymaj wybraną usługę." + IDS_HINT_RESUME " Wznów wybraną usługę." + IDS_HINT_RESTART " Zrestartuj wybraną usługę." + IDS_HINT_REFRESH " Odśwież listę usług." + IDS_HINT_EDIT " Edytuj właściwości wybranej usługi." + IDS_HINT_CREATE " Utwórz nową usługę." + IDS_HINT_DELETE " Usuń wybraną usługę." + IDS_HINT_PROP " Otwarte okno właściwości dla wybranej usługi." - IDS_HINT_LARGE " Poka elementy przy uyciu duych ikon." - IDS_HINT_SMALL " Poka elementy przy uyciu maych ikon." - IDS_HINT_LIST " Poka elementy w postaci listy." - IDS_HINT_DETAILS " Pokazuj informacje o kadym elemencie w oknie." + IDS_HINT_LARGE " Pokaż elementy przy użyciu dużych ikon." + IDS_HINT_SMALL " Pokaż elementy przy użyciu małych ikon." + IDS_HINT_LIST " Pokaż elementy w postaci listy." + IDS_HINT_DETAILS " Pokazuj informacje o każdym elemencie w oknie." IDS_HINT_CUST " Dostosuj widok." - IDS_HINT_HELP " Poka okno pomocy." - IDS_HINT_ABOUT " Usugi - informacje." + IDS_HINT_HELP " Pokaż okno pomocy." + IDS_HINT_ABOUT " Usługi - informacje." - IDS_HINT_SYS_RESTORE " Przywr to okno do normalnej wielkoci." - IDS_HINT_SYS_MOVE " Przesu to okno." - IDS_HINT_SYS_SIZE " Zmienia wielko tego okna." + IDS_HINT_SYS_RESTORE " Przywróć to okno do normalnej wielkości." + IDS_HINT_SYS_MOVE " Przesuń to okno." + IDS_HINT_SYS_SIZE " Zmienia wielkość tego okna." IDS_HINT_SYS_MINIMIZE " Ukryj to okno do ikony." - IDS_HINT_SYS_MAXIMIZE " Rozwi to okno na peny ekran." + IDS_HINT_SYS_MAXIMIZE " Rozwiń to okno na pełny ekran." IDS_HINT_SYS_CLOSE " Zamknij to okno." END /* Application title */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME "Meneder Usug ReactOS" + IDS_APPNAME "Menedżer Usług ReactOS" END diff --git a/base/applications/mscutils/servman/lang/ro-RO.rc b/base/applications/mscutils/servman/lang/ro-RO.rc index 82948f30a9b..7eedbe3e2ad 100644 --- a/base/applications/mscutils/servman/lang/ro-RO.rc +++ b/base/applications/mscutils/servman/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDR_MAINMENU MENU BEGIN POPUP "&Fișier" @@ -282,5 +280,3 @@ STRINGTABLE DISCARDABLE BEGIN IDS_APPNAME "Gestionarul de servicii ReactOS" END - -#pragma code_page(default) diff --git a/base/applications/mscutils/servman/lang/ru-RU.rc b/base/applications/mscutils/servman/lang/ru-RU.rc index 026f8215a27..c76f6ce4bd5 100644 --- a/base/applications/mscutils/servman/lang/ru-RU.rc +++ b/base/applications/mscutils/servman/lang/ru-RU.rc @@ -2,79 +2,79 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&...", ID_EXPORT + MENUITEM "&Экспорт...", ID_EXPORT MENUITEM SEPARATOR - MENUITEM "&", ID_EXIT + MENUITEM "&Выход", ID_EXIT END - POPUP "" + POPUP "Действие" BEGIN - MENUITEM " ...", ID_CONNECT, GRAYED + MENUITEM "Соединение с...", ID_CONNECT, GRAYED MENUITEM SEPARATOR - MENUITEM "", ID_START, GRAYED - MENUITEM "", ID_STOP, GRAYED - MENUITEM "", ID_PAUSE, GRAYED - MENUITEM "", ID_RESUME, GRAYED - MENUITEM "", ID_RESTART, GRAYED + MENUITEM "Пуск", ID_START, GRAYED + MENUITEM "Стоп", ID_STOP, GRAYED + MENUITEM "Пауза", ID_PAUSE, GRAYED + MENUITEM "Продолжить", ID_RESUME, GRAYED + MENUITEM "Перезапуск", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "", ID_REFRESH + MENUITEM "Обновить", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "...", ID_EDIT, GRAYED - MENUITEM "...", ID_CREATE, GRAYED - MENUITEM "...", ID_DELETE, GRAYED + MENUITEM "Изменить...", ID_EDIT, GRAYED + MENUITEM "Создать...", ID_CREATE, GRAYED + MENUITEM "Удалить...", ID_DELETE, GRAYED MENUITEM SEPARATOR - MENUITEM "...", ID_PROP, GRAYED + MENUITEM "Свойства...", ID_PROP, GRAYED END - POPUP "" + POPUP "Вид" BEGIN - MENUITEM "", ID_VIEW_LARGE - MENUITEM "", ID_VIEW_SMALL - MENUITEM "", ID_VIEW_LIST - MENUITEM "", ID_VIEW_DETAILS + MENUITEM "Крупные", ID_VIEW_LARGE + MENUITEM "Мелкие", ID_VIEW_SMALL + MENUITEM "Список", ID_VIEW_LIST + MENUITEM "Таблица", ID_VIEW_DETAILS MENUITEM SEPARATOR - MENUITEM "...",ID_VIEW_CUST, GRAYED + MENUITEM "Настроить...",ID_VIEW_CUST, GRAYED END - POPUP "" + POPUP "Справка" BEGIN - MENUITEM "", ID_HELP - MENUITEM " ", ID_ABOUT + MENUITEM "Содержание", ID_HELP + MENUITEM "О программе", ID_ABOUT END END IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "", ID_START, GRAYED - MENUITEM "", ID_STOP, GRAYED - MENUITEM "", ID_PAUSE, GRAYED - MENUITEM "", ID_RESUME, GRAYED - MENUITEM "", ID_RESTART, GRAYED + MENUITEM "Пуск", ID_START, GRAYED + MENUITEM "Стоп", ID_STOP, GRAYED + MENUITEM "Пауза", ID_PAUSE, GRAYED + MENUITEM "Продолжить", ID_RESUME, GRAYED + MENUITEM "Перезапуск", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "", ID_REFRESH + MENUITEM "Обновить", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "...", ID_EDIT, GRAYED - MENUITEM "...", ID_DELETE, GRAYED + MENUITEM "Изменить...", ID_EDIT, GRAYED + MENUITEM "Удалить...", ID_DELETE, GRAYED MENUITEM SEPARATOR - MENUITEM "...", ID_PROP, GRAYED + MENUITEM "Свойства...", ID_PROP, GRAYED MENUITEM SEPARATOR - MENUITEM "...", ID_HELP + MENUITEM "Справка...", ID_HELP END END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION " " +CAPTION "О Диспетчере служб" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT " v0.8\n (C) 2005-2007\n (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 135, 32 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "Диспетчер служб v0.8\nАвторское право (C) 2005-2007\nГед Мерфи (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 135, 32 + PUSHBUTTON "Закрыть", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END IDD_DLG_GENERAL DIALOGEX 6,6,253,232 -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN @@ -83,37 +83,37 @@ BEGIN EDITTEXT IDC_DESCRIPTION, 78, 46, 167, 24, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_MULTILINE | ES_READONLY EDITTEXT IDC_EXEPATH, 6, 86, 240, 11, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY COMBOBOX IDC_START_TYPE, 78, 107, 168, 40, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST - PUSHBUTTON "", IDC_START, 6, 155, 54, 15, WS_DISABLED - PUSHBUTTON "", IDC_STOP, 68, 155, 54, 15, WS_DISABLED - PUSHBUTTON "", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED - PUSHBUTTON "", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED - LTEXT " :", IDC_STATIC, 6, 11, 53, 11 - LTEXT " :", IDC_STATIC, 6, 29, 63, 11 - LTEXT ":", IDC_STATIC, 6, 47, 53, 11 - LTEXT " :", IDC_STATIC, 6, 75, 82, 9 - LTEXT " :", IDC_STATIC, 6, 108, 53, 11 - LTEXT ":", IDC_STATIC, 6, 138, 53, 11 + PUSHBUTTON "Пуск", IDC_START, 6, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Стоп", IDC_STOP, 68, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Пауза", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Продолжить", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED + LTEXT "Имя службы:", IDC_STATIC, 6, 11, 53, 11 + LTEXT "Выводимое имя:", IDC_STATIC, 6, 29, 63, 11 + LTEXT "Описание:", IDC_STATIC, 6, 47, 53, 11 + LTEXT "Исполняемый файл:", IDC_STATIC, 6, 75, 82, 9 + LTEXT "Тип запуска:", IDC_STATIC, 6, 108, 53, 11 + LTEXT "Состояние:", IDC_STATIC, 6, 138, 53, 11 LTEXT "", IDC_SERV_STATUS, 78, 138, 176, 11, WS_CHILD | WS_VISIBLE - LTEXT " , .",IDC_STATIC, 6,177,240,15 - LTEXT " :", IDC_STATIC, 6, 200, 73, 11 + LTEXT "Можно указать параметры запуска, применяемые при запуске службы из этого каталога.",IDC_STATIC, 6,177,240,15 + LTEXT "Параметры запуска:", IDC_STATIC, 6, 200, 73, 11 EDITTEXT IDC_START_PARAM, 78, 199, 168, 11, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "", IDC_EDIT, 192, 215, 54, 15, WS_DISABLED + PUSHBUTTON "Изменить", IDC_EDIT, 192, 215, 54, 15, WS_DISABLED END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 -CAPTION "" +CAPTION "Зависимости" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 - LTEXT " . , .", IDC_STATIC,8, 7, 238, 26 - LTEXT " :", IDC_STATIC, 8, 59, 236, 9 + LTEXT "Некоторые службы зависят от других. Если служба остановлена или неправильно работает, это отражается на зависимых от нее службах.", IDC_STATIC,8, 7, 238, 26 + LTEXT "Эта служба зависит от следующих компонентов:", IDC_STATIC, 8, 59, 236, 9 LTEXT "", IDC_DEPEND_SERVICE, 8, 38, 236, 13 END IDD_DLG_CREATE DIALOGEX 6,6,225,209 -CAPTION " " +CAPTION "Создать службу" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN @@ -122,32 +122,32 @@ BEGIN EDITTEXT IDC_CREATE_PATH, 8, 62, 214, 14, WS_CHILD | WS_VISIBLE EDITTEXT IDC_CREATE_DESC, 8, 97, 210, 48, WS_CHILD | WS_VISIBLE EDITTEXT IDC_CREATE_OPTIONS, 8, 162, 210, 14, WS_CHILD | WS_VISIBLE - LTEXT "* :", IDC_STATIC, 8, 12, 59, 9 - LTEXT "* :", IDC_STATIC, 8, 33, 78, 9 - LTEXT "* :", IDC_STATIC, 8, 51, 96, 9 - LTEXT ":", IDC_STATIC, 8, 86, 58, 9 + LTEXT "*Имя службы:", IDC_STATIC, 8, 12, 59, 9 + LTEXT "*Отображаемое имя:", IDC_STATIC, 8, 33, 78, 9 + LTEXT "*Исполняемый файл:", IDC_STATIC, 8, 51, 96, 9 + LTEXT "Описание:", IDC_STATIC, 8, 86, 58, 9 PUSHBUTTON "OK", IDOK, 126, 192, 44, 14 - PUSHBUTTON "", IDCANCEL, 176, 192, 46, 14 - LTEXT " ( """" )", IDC_STATIC, 8, 151, 206, 9 - PUSHBUTTON "", ID_CREATE_HELP, 8, 192, 44, 14 + PUSHBUTTON "Отмена", IDCANCEL, 176, 192, 46, 14 + LTEXT "Дополнително (нажмите ""Справка"" для уточнения)", IDC_STATIC, 8, 151, 206, 9 + PUSHBUTTON "Справка", ID_CREATE_HELP, 8, 192, 44, 14 END IDD_DLG_DELETE DIALOGEX 6,6,185,148 -CAPTION " " +CAPTION "Удалить службу" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | DS_MODALFRAME BEGIN ICON IDI_WARNING, IDC_STATIC, 10, 8, 24, 22 - LTEXT " , ? !", IDC_STATIC, 50, 6, 125, 25 - LTEXT " :",IDC_STATIC, 6, 40, 80, 9 + LTEXT "Вы уверены, что хотите удалить выбранную службу? Вы не сможете востановить ее после удаления!", IDC_STATIC, 50, 6, 125, 25 + LTEXT "Имя службы:",IDC_STATIC, 6, 40, 80, 9 LTEXT "", IDC_DEL_NAME, 15, 53, 160, 15 EDITTEXT IDC_DEL_DESC, 6, 73, 174, 48, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_EX_STATICEDGE | ES_MULTILINE | ES_READONLY - PUSHBUTTON "", IDOK, 26, 129, 54, 13 - DEFPUSHBUTTON "", IDCANCEL, 102, 129, 54, 13 + PUSHBUTTON "Да", IDOK, 26, 129, 54, 13 + DEFPUSHBUTTON "Нет", IDCANCEL, 102, 129, 54, 13 END IDD_DLG_HELP_OPTIONS DIALOGEX 6,6,200,150 -CAPTION "" +CAPTION "Настройки" FONT 8, "MS Shell Dlg",0,0 STYLE 0x10CF0000 BEGIN @@ -156,7 +156,7 @@ BEGIN END IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 -CAPTION " " +CAPTION "Управление службами" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW @@ -164,105 +164,105 @@ BEGIN CONTROL "",IDC_SERVCON_PROGRESS,"msctls_progress32",0x50000000,8,46,238,13 LTEXT "", IDC_SERVCON_INFO, 8, 5, 236, 11 LTEXT "", IDC_SERVCON_NAME, 8, 25, 66, 11 - PUSHBUTTON "&", IDOK, 100, 70, 54, 13 + PUSHBUTTON "&Закрыть", IDOK, 100, 70, 54, 13 END STRINGTABLE DISCARDABLE BEGIN - IDS_FIRSTCOLUMN "" - IDS_SECONDCOLUMN "" - IDS_THIRDCOLUMN "" - IDS_FOURTHCOLUMN " " - IDS_FITHCOLUMN " " + IDS_FIRSTCOLUMN "Имя" + IDS_SECONDCOLUMN "Описание" + IDS_THIRDCOLUMN "Состояние" + IDS_FOURTHCOLUMN "Тип запуска" + IDS_FITHCOLUMN "Вход от имени" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_STARTED "" - IDS_SERVICES_STOPPED "" - IDS_SERVICES_AUTO "" - IDS_SERVICES_MAN "" - IDS_SERVICES_DIS "" + IDS_SERVICES_STARTED "Работает" + IDS_SERVICES_STOPPED "Остановлено" + IDS_SERVICES_AUTO "Авто" + IDS_SERVICES_MAN "Вручную" + IDS_SERVICES_DIS "Отключено" END STRINGTABLE DISCARDABLE BEGIN - IDS_NUM_SERVICES " : %d" + IDS_NUM_SERVICES "Номер службы: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" IDS_NO_DEPENDS "" - IDS_LICENSE " ; / GNU General Public License 2 , Free Software Foundation.\r\n\r\n , , ; . . GNU General Public License .\r\n\r\n GNU , Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Эта программа является свободным программным обеспечением; Вы можете распространять и/или изменять ее в соответствии с лицензией GNU General Public License версии 2 или более поздней, опубликованной Free Software Foundation.\r\n\r\nЭта программа распространяется с надеждой, что она может быть полезна, но БЕЗ ВСЯКОЙ ГАРАНТИИ; не подразумевается даже РАБОТОСПОСОБНОСТЬ или ПРИГОДНОСТЬ ДЛЯ ВЫПОЛНЕНИЯ НЕОБХОДИМЫХ ЗАДАЧ. См. GNU General Public License для получения дополнительных сведений.\r\n\r\nВы должны получить копию лицензии GNU вместе с этой программой, в противном случае обращайтесь в Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLTIP_PROP "" - IDS_TOOLTIP_REFRESH "" - IDS_TOOLTIP_EXPORT " " - IDS_TOOLTIP_CREATE " " - IDS_TOOLTIP_DELETE " " - IDS_TOOLTIP_START " " - IDS_TOOLTIP_STOP " " - IDS_TOOLTIP_PAUSE " " - IDS_TOOLTIP_RESTART " " + IDS_TOOLTIP_PROP "Свойства" + IDS_TOOLTIP_REFRESH "Обновить" + IDS_TOOLTIP_EXPORT "Экспортировать список" + IDS_TOOLTIP_CREATE "Создание новой службы" + IDS_TOOLTIP_DELETE "Удаление существующей службы" + IDS_TOOLTIP_START "Запустить службу" + IDS_TOOLTIP_STOP "Остановить службу" + IDS_TOOLTIP_PAUSE "Приостановить службу" + IDS_TOOLTIP_RESTART "Перезапуск службы" END STRINGTABLE DISCARDABLE BEGIN - IDS_PROGRESS_INFO_START "ReactOS " - IDS_PROGRESS_INFO_STOP "ReactOS " - IDS_PROGRESS_INFO_PAUSE "ReactOS " - IDS_PROGRESS_INFO_RESUME "ReactOS " - IDS_CREATE_SUCCESS " " - IDS_DELETE_SUCCESS " " - IDS_CREATE_REQ "* = " - IDS_DELETE_STOP " !" + IDS_PROGRESS_INFO_START "ReactOS запускает службу" + IDS_PROGRESS_INFO_STOP "ReactOS остановливает службу" + IDS_PROGRESS_INFO_PAUSE "ReactOS останавливает следующие службы" + IDS_PROGRESS_INFO_RESUME "ReactOS возобновляет работу следующих служб" + IDS_CREATE_SUCCESS "Создание службы успешно завершено" + IDS_DELETE_SUCCESS "Удаление службы успешно завершено" + IDS_CREATE_REQ "* = обязательные поля" + IDS_DELETE_STOP "Вы должны вручную остановить службу перед удалением!" END STRINGTABLE DISCARDABLE BEGIN - IDS_HELP_OPTIONS " :\r\n: """".\r\n type= \r\n ( = own)\r\n start= \r\n ( = demand) \r\n error= \r\n ( = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n ( = LocalSystem)\r\n password= \r\n" + IDS_HELP_OPTIONS "ОПЦИИ СОЗДАНИЯ:\r\nПримечание: Имя опции включает знак ""равно"".\r\n type= \r\n (по умолчанию = own)\r\n start= \r\n (по умолчанию = demand) \r\n error= \r\n (по умолчанию = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (по умолчанию = LocalSystem)\r\n password= \r\n" END /* Hints */ STRINGTABLE DISCARDABLE BEGIN IDS_HINT_BLANK " " - IDS_HINT_EXPORT " ." - IDS_HINT_EXIT " ." + IDS_HINT_EXPORT " Экспорт текущего списка в файл." + IDS_HINT_EXIT " Выход из программы." - IDS_HINT_CONNECT " ." - IDS_HINT_START " ." - IDS_HINT_STOP " ." - IDS_HINT_PAUSE " ." - IDS_HINT_RESUME " ." - IDS_HINT_RESTART " ." - IDS_HINT_REFRESH " ." - IDS_HINT_EDIT " ." - IDS_HINT_CREATE " ." - IDS_HINT_DELETE " ." - IDS_HINT_PROP " ." + IDS_HINT_CONNECT " Управление другими компьютерами." + IDS_HINT_START " Запустить выбранную службу." + IDS_HINT_STOP " Остановить выбранную службу." + IDS_HINT_PAUSE " Приостановить выбранную службу." + IDS_HINT_RESUME " Продолжить выбранную службу." + IDS_HINT_RESTART " Перезапуск выбранной службы." + IDS_HINT_REFRESH " Обновить список служб." + IDS_HINT_EDIT " Изменить свойства выбранной службы." + IDS_HINT_CREATE " Создать новую службу." + IDS_HINT_DELETE " Удалить выбранную службу." + IDS_HINT_PROP " Открыть список свойств для выделенного элемента." - IDS_HINT_LARGE " ." - IDS_HINT_SMALL " ." - IDS_HINT_LIST " ." - IDS_HINT_DETAILS " ." - IDS_HINT_CUST " ." + IDS_HINT_LARGE " Отображать элементы в виде больших значков." + IDS_HINT_SMALL " Отображать элементы в виде маленьких значков." + IDS_HINT_LIST " Отображать элементы в виде списка." + IDS_HINT_DETAILS " Отображение информации о каждом элементе в окне." + IDS_HINT_CUST " Настройка вида." - IDS_HINT_HELP " ." - IDS_HINT_ABOUT " ReactOS." + IDS_HINT_HELP " Показать окно справки." + IDS_HINT_ABOUT " О Диспетчере служб ReactOS." - IDS_HINT_SYS_RESTORE " ." - IDS_HINT_SYS_MOVE " ." - IDS_HINT_SYS_SIZE " ." - IDS_HINT_SYS_MINIMIZE " ." - IDS_HINT_SYS_MAXIMIZE " ." - IDS_HINT_SYS_CLOSE " ." + IDS_HINT_SYS_RESTORE " Востановить нормальный размер окна." + IDS_HINT_SYS_MOVE " Переместить это окно." + IDS_HINT_SYS_SIZE " Изменить размер этого окна." + IDS_HINT_SYS_MINIMIZE " Сворачивание окна в значок." + IDS_HINT_SYS_MAXIMIZE " Развернуть это окно на полный экран." + IDS_HINT_SYS_CLOSE " Закрыть это окно." END /* Application title */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME " ReactOS" + IDS_APPNAME "Диспетчер служб ReactOS" END diff --git a/base/applications/mscutils/servman/lang/uk-UA.rc b/base/applications/mscutils/servman/lang/uk-UA.rc index a2b847d62b8..c991a731c2c 100644 --- a/base/applications/mscutils/servman/lang/uk-UA.rc +++ b/base/applications/mscutils/servman/lang/uk-UA.rc @@ -10,43 +10,43 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDR_MAINMENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&...", ID_EXPORT + MENUITEM "&Експорт...", ID_EXPORT MENUITEM SEPARATOR - MENUITEM "&", ID_EXIT + MENUITEM "&Вихід", ID_EXIT END - POPUP "ij" + POPUP "Дія" BEGIN - MENUITEM "' ...", ID_CONNECT, GRAYED + MENUITEM "З'єднання з...", ID_CONNECT, GRAYED MENUITEM SEPARATOR - MENUITEM "", ID_START, GRAYED - MENUITEM "", ID_STOP, GRAYED - MENUITEM "", ID_PAUSE, GRAYED - MENUITEM "", ID_RESUME, GRAYED - MENUITEM "", ID_RESTART, GRAYED + MENUITEM "Запуск", ID_START, GRAYED + MENUITEM "Зупинити", ID_STOP, GRAYED + MENUITEM "Пауза", ID_PAUSE, GRAYED + MENUITEM "Продовжити", ID_RESUME, GRAYED + MENUITEM "Перезапуск", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "", ID_REFRESH + MENUITEM "Оновити", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "...", ID_EDIT, GRAYED - MENUITEM "...", ID_CREATE, GRAYED - MENUITEM "...", ID_DELETE, GRAYED + MENUITEM "Правка...", ID_EDIT, GRAYED + MENUITEM "Створити...", ID_CREATE, GRAYED + MENUITEM "Видалити...", ID_DELETE, GRAYED MENUITEM SEPARATOR - MENUITEM "...", ID_PROP, GRAYED + MENUITEM "Властивості...", ID_PROP, GRAYED END - POPUP "" + POPUP "Вигляд" BEGIN - MENUITEM " ", ID_VIEW_LARGE - MENUITEM " ", ID_VIEW_SMALL - MENUITEM "", ID_VIEW_LIST - MENUITEM "", ID_VIEW_DETAILS + MENUITEM "Великі значки", ID_VIEW_LARGE + MENUITEM "Дрібні значки", ID_VIEW_SMALL + MENUITEM "Список", ID_VIEW_LIST + MENUITEM "Подробиці", ID_VIEW_DETAILS MENUITEM SEPARATOR - MENUITEM "...",ID_VIEW_CUST, GRAYED + MENUITEM "Настройка...",ID_VIEW_CUST, GRAYED END - POPUP "" + POPUP "Довідка" BEGIN - MENUITEM "", ID_HELP - MENUITEM " ", ID_ABOUT + MENUITEM "Довідка", ID_HELP + MENUITEM "Про програму", ID_ABOUT END END @@ -54,36 +54,36 @@ IDR_POPUP MENU BEGIN POPUP "popup" BEGIN - MENUITEM "", ID_START, GRAYED - MENUITEM "", ID_STOP, GRAYED - MENUITEM "", ID_PAUSE, GRAYED - MENUITEM "", ID_RESUME, GRAYED - MENUITEM "", ID_RESTART, GRAYED + MENUITEM "Запуск", ID_START, GRAYED + MENUITEM "Зупинити", ID_STOP, GRAYED + MENUITEM "Пауза", ID_PAUSE, GRAYED + MENUITEM "Продовжити", ID_RESUME, GRAYED + MENUITEM "Перезапуск", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "", ID_REFRESH + MENUITEM "Оновити", ID_REFRESH MENUITEM SEPARATOR - MENUITEM "...", ID_EDIT, GRAYED - MENUITEM "...", ID_DELETE, GRAYED + MENUITEM "Правка...", ID_EDIT, GRAYED + MENUITEM "Видалити...", ID_DELETE, GRAYED MENUITEM SEPARATOR - MENUITEM "...", ID_PROP, GRAYED + MENUITEM "Властивості...", ID_PROP, GRAYED MENUITEM SEPARATOR - MENUITEM "...", ID_HELP + MENUITEM "Довідка...", ID_HELP END END IDD_ABOUTBOX DIALOGEX 22,16,190,182 -CAPTION " "" """ +CAPTION "Про програму ""Диспетчер керування службами""" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME BEGIN - LTEXT " v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 135, 26 - PUSHBUTTON "", IDOK, 75, 162, 44, 15 + LTEXT "Диспетчер керування службами v0.8\nCopyright (C) 2005-2007\nby Ged Murphy (gedmurphy@reactos.org)", IDC_STATIC, 48, 7, 135, 26 + PUSHBUTTON "Закрити", IDOK, 75, 162, 44, 15 ICON IDI_SM_ICON, IDC_STATIC, 10, 10, 7, 30 EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN @@ -92,37 +92,37 @@ BEGIN EDITTEXT IDC_DESCRIPTION, 70, 46, 176, 24, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_MULTILINE | ES_READONLY EDITTEXT IDC_EXEPATH, 6, 86, 240, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY COMBOBOX IDC_START_TYPE, 70, 107, 176, 40, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST - PUSHBUTTON "", IDC_START, 6, 155, 54, 15, WS_DISABLED - PUSHBUTTON "", IDC_STOP, 68, 155, 54, 15, WS_DISABLED - PUSHBUTTON "", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED - PUSHBUTTON "", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED - LTEXT "' :", IDC_STATIC, 4, 11, 53, 11 - LTEXT "' :", IDC_STATIC, 4, 29, 53, 11 - LTEXT ":", IDC_STATIC, 4, 51, 53, 11 - LTEXT " :", IDC_STATIC, 6, 73, 82, 9 - LTEXT " :", IDC_STATIC, 6, 108, 53, 11 - LTEXT " :", IDC_STATIC, 4, 138, 53, 11 + PUSHBUTTON "Запуск", IDC_START, 6, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Зупинити", IDC_STOP, 68, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Пауза", IDC_PAUSE , 130, 155, 54, 15, WS_DISABLED + PUSHBUTTON "Продовжити", IDC_RESUME, 192, 155, 54, 15, WS_DISABLED + LTEXT "Ім'я служби:", IDC_STATIC, 4, 11, 53, 11 + LTEXT "Ім'я виводиться:", IDC_STATIC, 4, 29, 53, 11 + LTEXT "Опис:", IDC_STATIC, 4, 51, 53, 11 + LTEXT "Виконуваний файл:", IDC_STATIC, 6, 73, 82, 9 + LTEXT "Тип запуску:", IDC_STATIC, 6, 108, 53, 11 + LTEXT "Стан служби:", IDC_STATIC, 4, 138, 53, 11 LTEXT "", IDC_SERV_STATUS, 70, 138, 176, 11, WS_CHILD | WS_VISIBLE - LTEXT " , .",IDC_STATIC, 6,177,240,15 - LTEXT " :", IDC_STATIC, 6, 200, 58, 11 + LTEXT "Ви можете вказати параметри запуску, вживані при запуску служби звідси.",IDC_STATIC, 6,177,240,15 + LTEXT "Параметри запуску:", IDC_STATIC, 6, 200, 58, 11 EDITTEXT IDC_START_PARAM, 68, 199, 178, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "", IDC_EDIT, 192, 215, 54, 15, WS_DISABLED + PUSHBUTTON "Правка", IDC_EDIT, 192, 215, 54, 15, WS_DISABLED END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 -CAPTION "" +CAPTION "Залежності" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 - LTEXT " , . , .", IDC_STATIC,8, 7, 238, 26 - LTEXT " ", IDC_STATIC, 8, 57, 236, 9 + LTEXT "Деякі служби залежать від інших служб, системних драйверів або списку завантаження груп служб. Якщо служба зупинена або неправильно працює, це впливає на залежні від неї служби.", IDC_STATIC,8, 7, 238, 26 + LTEXT "Ця служба залежить від наступних компонентів", IDC_STATIC, 8, 57, 236, 9 LTEXT "", IDC_DEPEND_SERVICE, 8, 38, 236, 13 END IDD_DLG_CREATE DIALOGEX 6,6,225,209 -CAPTION " " +CAPTION "Створити службу" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP BEGIN @@ -131,45 +131,45 @@ BEGIN EDITTEXT IDC_CREATE_PATH, 10, 62, 210, 13, WS_CHILD | WS_VISIBLE EDITTEXT IDC_CREATE_DESC, 10, 97, 210, 48, WS_CHILD | WS_VISIBLE EDITTEXT IDC_CREATE_OPTIONS, 10, 162, 210, 13, WS_CHILD | WS_VISIBLE - LTEXT "*' :", IDC_STATIC, 12, 12, 54, 9 - LTEXT "*' :", IDC_STATIC, 12, 33, 54, 9 - LTEXT "* :", IDC_STATIC, 10, 51, 68, 9 - LTEXT " :", IDC_STATIC, 12, 86, 44, 9 + LTEXT "*Ім'я служби :", IDC_STATIC, 12, 12, 54, 9 + LTEXT "*Ім'я виводиться :", IDC_STATIC, 12, 33, 54, 9 + LTEXT "*Виконуваний файл :", IDC_STATIC, 10, 51, 68, 9 + LTEXT "Опис :", IDC_STATIC, 12, 86, 44, 9 PUSHBUTTON "OK", IDOK, 126, 192, 44, 13 - PUSHBUTTON "", IDCANCEL, 176, 192, 46, 13 - LTEXT " ( """" )", IDC_STATIC, 10, 151, 134, 9 - PUSHBUTTON "", ID_CREATE_HELP, 10, 192, 44, 13 + PUSHBUTTON "Скасувати", IDCANCEL, 176, 192, 46, 13 + LTEXT "Додаткові опції (натисніть кнопку ""Довідка"" для подробиць)", IDC_STATIC, 10, 151, 134, 9 + PUSHBUTTON "Довідка", ID_CREATE_HELP, 10, 192, 44, 13 END IDD_DLG_DELETE DIALOGEX 6,6,185,148 -CAPTION " " +CAPTION "Видалити службу" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | DS_MODALFRAME BEGIN ICON IDI_WARNING, IDC_STATIC, 10, 8, 24, 22 - LTEXT " , ? !", IDC_STATIC, 50, 6, 125, 25 - LTEXT "' :",IDC_STATIC, 6, 40, 80, 9 + LTEXT "Ви впевнені, що хочете видалити вибрану службу? Ви не зможете відновити її після видалення!", IDC_STATIC, 50, 6, 125, 25 + LTEXT "Ім'я служби:",IDC_STATIC, 6, 40, 80, 9 LTEXT "", IDC_DEL_NAME, 15, 53, 160, 15 EDITTEXT IDC_DEL_DESC, 6, 73, 174, 48, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_EX_STATICEDGE | ES_MULTILINE | ES_READONLY PUSHBUTTON "OK", IDOK, 26, 129, 54, 13 - DEFPUSHBUTTON "", IDCANCEL, 102, 129, 54, 13 + DEFPUSHBUTTON "Скасувати", IDCANCEL, 102, 129, 54, 13 END IDD_DLG_DEPEND_STOP DIALOGEX 6,6,240,148 -CAPTION " " +CAPTION "Зупинка інших служб" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | DS_MODALFRAME BEGIN ICON IDI_WARNING, IDC_STATIC, 10, 8, 24, 22 LTEXT "", IDC_STOP_DEPENDS, 40, 8, 170, 25 LISTBOX IDC_STOP_DEPENDS_LB, 15, 40, 210, 70, WS_CHILD | WS_VISIBLE | WS_EX_STATICEDGE | LBS_NOSEL - LTEXT " ?",IDC_STATIC, 15, 110, 150, 10 - DEFPUSHBUTTON "", IDOK, 60, 129, 54, 14 - PUSHBUTTON "ͳ", IDCANCEL, 120, 129, 54, 14 + LTEXT "Ви хочете зупинити ці служби?",IDC_STATIC, 15, 110, 150, 10 + DEFPUSHBUTTON "Так", IDOK, 60, 129, 54, 14 + PUSHBUTTON "Ні", IDCANCEL, 120, 129, 54, 14 END IDD_DLG_HELP_OPTIONS DIALOGEX 6,6,200,150 -CAPTION "" +CAPTION "Настройки" FONT 8, "MS Shell Dlg",0,0 STYLE 0x10CF0000 BEGIN @@ -178,7 +178,7 @@ BEGIN END IDD_DLG_PROGRESS DIALOGEX 6,6,255,89 -CAPTION " " +CAPTION "Управління службами" FONT 8, "MS Shell Dlg",0,0 STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_VISIBLE | DS_MODALFRAME EXSTYLE WS_EX_TOOLWINDOW @@ -186,105 +186,105 @@ BEGIN CONTROL "", IDC_SERVCON_PROGRESS, "msctls_progress32", 0x50000000, 8, 46, 238, 13 LTEXT "", IDC_SERVCON_INFO, 8, 5, 236, 11 LTEXT "", IDC_SERVCON_NAME, 8, 25, 66, 11 - PUSHBUTTON "&", IDOK, 100, 70, 54, 13 + PUSHBUTTON "&Закрити", IDOK, 100, 70, 54, 13 END STRINGTABLE DISCARDABLE BEGIN - IDS_FIRSTCOLUMN "'" - IDS_SECONDCOLUMN "" - IDS_THIRDCOLUMN "" - IDS_FOURTHCOLUMN " " - IDS_FITHCOLUMN " " + IDS_FIRSTCOLUMN "Ім'я" + IDS_SECONDCOLUMN "Опис" + IDS_THIRDCOLUMN "Стан" + IDS_FOURTHCOLUMN "Тип запуску" + IDS_FITHCOLUMN "Вхід від імені" END STRINGTABLE DISCARDABLE BEGIN - IDS_SERVICES_STARTED "" - IDS_SERVICES_STOPPED "" - IDS_SERVICES_AUTO "" - IDS_SERVICES_MAN "" - IDS_SERVICES_DIS "³" + IDS_SERVICES_STARTED "Запущено" + IDS_SERVICES_STOPPED "Зупинено" + IDS_SERVICES_AUTO "Автоматично" + IDS_SERVICES_MAN "Вручну" + IDS_SERVICES_DIS "Відключено" END STRINGTABLE DISCARDABLE BEGIN - IDS_NUM_SERVICES "H : %d" - IDS_STOP_DEPENDS " %s , " + IDS_NUM_SERVICES "Hомер служби: %d" + IDS_STOP_DEPENDS "Коли %s зупинеться, наступні служби також буде зупинено" IDS_NO_DEPENDS "" - IDS_LICENSE " ; , ³ GNU, ; 2 , - , .\r\n\r\n 䳿 , , - Ҳ, Ҳ Ҳ Ҳ . ³ GNU.\r\n\r\n ³ GNU. , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLTIP_PROP "" - IDS_TOOLTIP_REFRESH "" - IDS_TOOLTIP_EXPORT " " - IDS_TOOLTIP_CREATE " " - IDS_TOOLTIP_DELETE " " - IDS_TOOLTIP_START " " - IDS_TOOLTIP_STOP " " - IDS_TOOLTIP_PAUSE " " - IDS_TOOLTIP_RESTART " " + IDS_TOOLTIP_PROP "Властивості" + IDS_TOOLTIP_REFRESH "Оновити" + IDS_TOOLTIP_EXPORT "Експортувати список" + IDS_TOOLTIP_CREATE "Створення нової служби" + IDS_TOOLTIP_DELETE "Видалення існуючої служби" + IDS_TOOLTIP_START "Запуск служби" + IDS_TOOLTIP_STOP "Зупинення служби" + IDS_TOOLTIP_PAUSE "Призупинення служби" + IDS_TOOLTIP_RESTART "Перезапуск служби" END STRINGTABLE DISCARDABLE BEGIN - IDS_PROGRESS_INFO_START "ReactOS " - IDS_PROGRESS_INFO_STOP "ReactOS " - IDS_PROGRESS_INFO_PAUSE "ReactOS " - IDS_PROGRESS_INFO_RESUME "ReactOS " - IDS_CREATE_SUCCESS " " - IDS_DELETE_SUCCESS " " - IDS_CREATE_REQ ", \n '" - IDS_DELETE_STOP " !" + IDS_PROGRESS_INFO_START "ReactOS намагається запустити наступну службу" + IDS_PROGRESS_INFO_STOP "ReactOS намагається зупинити наступну службу" + IDS_PROGRESS_INFO_PAUSE "ReactOS намагається призупинити наступну службу" + IDS_PROGRESS_INFO_RESUME "ReactOS намагається продовжити наступну службу" + IDS_CREATE_SUCCESS "Служба успішно створена" + IDS_DELETE_SUCCESS "Служба успішно видалена" + IDS_CREATE_REQ "Поля, відмічені зірочкою\nє обов'язковими" + IDS_DELETE_STOP "Ви маєте вручну зупинити службу перед видаленням!" END STRINGTABLE DISCARDABLE BEGIN - IDS_HELP_OPTIONS "ֲ :\r\n̲: ' .\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" + IDS_HELP_OPTIONS "ОПЦІЇ СТВОРЕННЯ:\r\nПРИМІТКА: ім'я опції містить знак рівності.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ STRINGTABLE DISCARDABLE BEGIN IDS_HINT_BLANK " " - IDS_HINT_EXPORT " ." - IDS_HINT_EXIT " ." + IDS_HINT_EXPORT " Експорт поточного списку у файл." + IDS_HINT_EXIT " Вихід з цієї програми." - IDS_HINT_CONNECT " '." - IDS_HINT_START " ." - IDS_HINT_STOP " ." - IDS_HINT_PAUSE " ." - IDS_HINT_RESUME " ." - IDS_HINT_RESTART " ." - IDS_HINT_REFRESH " ." - IDS_HINT_EDIT " ." - IDS_HINT_CREATE " ." - IDS_HINT_DELETE " ." - IDS_HINT_PROP " ³ ." + IDS_HINT_CONNECT " Управління іншим комп'ютером." + IDS_HINT_START " Запуск вибраної служби." + IDS_HINT_STOP " Зупинення вибраної служби." + IDS_HINT_PAUSE " Призупинення вибраної служби." + IDS_HINT_RESUME " Продовження вибраної служби." + IDS_HINT_RESTART " Перезапуск вибраної служби." + IDS_HINT_REFRESH " Оновлення списку служб." + IDS_HINT_EDIT " Зміна властивостей вибраної служби." + IDS_HINT_CREATE " Створення нової служби." + IDS_HINT_DELETE " Видалення вибраної служби." + IDS_HINT_PROP " Відкриття вікна властивостей вибраних елементів." - IDS_HINT_LARGE " ." - IDS_HINT_SMALL " ." - IDS_HINT_LIST " ." - IDS_HINT_DETAILS " ." - IDS_HINT_CUST " ." + IDS_HINT_LARGE " Показ елементів великими значками." + IDS_HINT_SMALL " Показ елементів малими значками." + IDS_HINT_LIST " Показ елементів у формі списку." + IDS_HINT_DETAILS " Показ інформації про кожен елемент у вікні." + IDS_HINT_CUST " Настройка вигляду." - IDS_HINT_HELP " ³ ." - IDS_HINT_ABOUT " ReactOS." + IDS_HINT_HELP " Відображення вікна довідки." + IDS_HINT_ABOUT " Про програму Диспетчер керування службами ReactOS." - IDS_HINT_SYS_RESTORE " ³ ." - IDS_HINT_SYS_MOVE " ." - IDS_HINT_SYS_SIZE " ." - IDS_HINT_SYS_MINIMIZE " ." - IDS_HINT_SYS_MAXIMIZE " ." - IDS_HINT_SYS_CLOSE " ." + IDS_HINT_SYS_RESTORE " Відновлення вихідних розмірів вікна." + IDS_HINT_SYS_MOVE " Зміна розташування вікна." + IDS_HINT_SYS_SIZE " Зміна розмірів вікна." + IDS_HINT_SYS_MINIMIZE " Згортання вікна до значка." + IDS_HINT_SYS_MAXIMIZE " Розгортання вікна до розмірів екрана." + IDS_HINT_SYS_CLOSE " Закриття цього вікна." END /* Application title */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPNAME " ReactOS" + IDS_APPNAME "Диспетчер керування службами ReactOS" END diff --git a/base/applications/mscutils/servman/rsrc.rc b/base/applications/mscutils/servman/rsrc.rc index 2b1aed54411..d414e7b356f 100644 --- a/base/applications/mscutils/servman/rsrc.rc +++ b/base/applications/mscutils/servman/rsrc.rc @@ -31,10 +31,13 @@ IDI_DRIVER ICON "res/driver.ico" #include "lang/ja-JP.rc" #include "lang/ko-KR.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/mspaint/drawing.c b/base/applications/mspaint/drawing.c index bafbe1cfe03..e87b9bfe6ba 100644 --- a/base/applications/mspaint/drawing.c +++ b/base/applications/mspaint/drawing.c @@ -13,7 +13,7 @@ /* FUNCTIONS ********************************************************/ void -Line(HDC hdc, short x1, short y1, short x2, short y2, int color, int thickness) +Line(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, int thickness) { HPEN oldPen = SelectObject(hdc, CreatePen(PS_SOLID, thickness, color)); MoveToEx(hdc, x1, y1, NULL); @@ -22,7 +22,7 @@ Line(HDC hdc, short x1, short y1, short x2, short y2, int color, int thickness) } void -Rect(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickness, int style) +Rect(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style) { HBRUSH oldBrush; LOGBRUSH logbrush; @@ -37,7 +37,7 @@ Rect(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickn } void -Ellp(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickness, int style) +Ellp(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style) { HBRUSH oldBrush; LOGBRUSH logbrush; @@ -52,7 +52,7 @@ Ellp(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickn } void -RRect(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickness, int style) +RRect(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style) { LOGBRUSH logbrush; HBRUSH oldBrush; @@ -67,7 +67,7 @@ RRect(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thick } void -Poly(HDC hdc, POINT * lpPoints, int nCount, int fg, int bg, int thickness, int style, BOOL closed) +Poly(HDC hdc, POINT * lpPoints, int nCount, COLORREF fg, COLORREF bg, int thickness, int style, BOOL closed) { LOGBRUSH logbrush; HBRUSH oldBrush; @@ -85,7 +85,7 @@ Poly(HDC hdc, POINT * lpPoints, int nCount, int fg, int bg, int thickness, int s } void -Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, int color, int thickness) +Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, COLORREF color, int thickness) { HPEN oldPen; POINT fourPoints[4]; @@ -99,7 +99,7 @@ Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, int color, int thickness } void -Fill(HDC hdc, int x, int y, int color) +Fill(HDC hdc, LONG x, LONG y, COLORREF color) { HBRUSH oldBrush = SelectObject(hdc, CreateSolidBrush(color)); ExtFloodFill(hdc, x, y, GetPixel(hdc, x, y), FLOODFILLSURFACE); @@ -107,7 +107,7 @@ Fill(HDC hdc, int x, int y, int color) } void -Erase(HDC hdc, short x1, short y1, short x2, short y2, int color, int radius) +Erase(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG radius) { short a; HPEN oldPen; @@ -122,9 +122,10 @@ Erase(HDC hdc, short x1, short y1, short x2, short y2, int color, int radius) } void -Replace(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int radius) +Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius) { - short a, x, y; + LONG a, x, y; + for(a = 0; a <= 100; a++) for(y = (y1 * (100 - a) + y2 * a) / 100 - radius + 1; y < (y1 * (100 - a) + y2 * a) / 100 + radius + 1; y++) @@ -135,10 +136,10 @@ Replace(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int rad } void -Airbrush(HDC hdc, short x, short y, int color, int r) +Airbrush(HDC hdc, LONG x, LONG y, COLORREF color, LONG r) { - short a; - short b; + LONG a, b; + for(b = -r; b <= r; b++) for(a = -r; a <= r; a++) if ((a * a + b * b <= r * r) && (rand() % 4 == 0)) @@ -146,7 +147,7 @@ Airbrush(HDC hdc, short x, short y, int color, int r) } void -Brush(HDC hdc, short x1, short y1, short x2, short y2, int color, int style) +Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, COLORREF style) { HPEN oldPen = SelectObject(hdc, CreatePen(PS_SOLID, 1, color)); HBRUSH oldBrush = SelectObject(hdc, CreateSolidBrush(color)); @@ -231,7 +232,7 @@ Brush(HDC hdc, short x1, short y1, short x2, short y2, int color, int style) } void -RectSel(HDC hdc, short x1, short y1, short x2, short y2) +RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2) { HBRUSH oldBrush; LOGBRUSH logbrush; @@ -246,7 +247,7 @@ RectSel(HDC hdc, short x1, short y1, short x2, short y2) } void -SelectionFrame(HDC hdc, int x1, int y1, int x2, int y2) +SelectionFrame(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2) { HBRUSH oldBrush; LOGBRUSH logbrush; diff --git a/base/applications/mspaint/drawing.h b/base/applications/mspaint/drawing.h index db0d050d8d1..b9f23ad4196 100644 --- a/base/applications/mspaint/drawing.h +++ b/base/applications/mspaint/drawing.h @@ -6,28 +6,28 @@ * PROGRAMMERS: Benedikt Freisen */ -void Line(HDC hdc, short x1, short y1, short x2, short y2, int color, int thickness); +void Line(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, int thickness); -void Rect(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickness, int style); +void Rect(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style); -void Ellp(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickness, int style); +void Ellp(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style); -void RRect(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int thickness, int style); +void RRect(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style); -void Poly(HDC hdc, POINT *lpPoints, int nCount, int fg, int bg, int thickness, int style, BOOL closed); +void Poly(HDC hdc, POINT *lpPoints, int nCount, COLORREF fg, COLORREF bg, int thickness, int style, BOOL closed); -void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, int color, int thickness); +void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, COLORREF color, int thickness); -void Fill(HDC hdc, int x, int y, int color); +void Fill(HDC hdc, LONG x, LONG y, COLORREF color); -void Erase(HDC hdc, short x1, short y1, short x2, short y2, int color, int radius); +void Erase(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG radius); -void Replace(HDC hdc, short x1, short y1, short x2, short y2, int fg, int bg, int radius); +void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius); -void Airbrush(HDC hdc, short x, short y, int color, int r); +void Airbrush(HDC hdc, LONG x, LONG y, COLORREF color, LONG r); -void Brush(HDC hdc, short x1, short y1, short x2, short y2, int color, int style); +void Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, int style); -void RectSel(HDC hdc, short x1, short y1, short x2, short y2); +void RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2); -void SelectionFrame(HDC hdc, int x1, int y1, int x2, int y2); +void SelectionFrame(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2); diff --git a/base/applications/mspaint/globalvar.h b/base/applications/mspaint/globalvar.h index 9c884e4fa9a..d716dd994f3 100644 --- a/base/applications/mspaint/globalvar.h +++ b/base/applications/mspaint/globalvar.h @@ -26,10 +26,10 @@ extern int undoSteps; extern int redoSteps; extern BOOL imageSaved; -extern short startX; -extern short startY; -extern short lastX; -extern short lastY; +extern LONG startX; +extern LONG startY; +extern LONG lastX; +extern LONG lastY; extern int lineWidth; extern int shapeStyle; extern int brushStyle; diff --git a/base/applications/mspaint/lang/pl-PL.rc b/base/applications/mspaint/lang/pl-PL.rc index b37039a4def..4a17d79b784 100644 --- a/base/applications/mspaint/lang/pl-PL.rc +++ b/base/applications/mspaint/lang/pl-PL.rc @@ -1,9 +1,10 @@ /* - * PROJECT: PAINT for ReactOS - * LICENSE: unknown (LGPL assumed) - * FILE: base/applications/paint/lang/pl-PL.rc - * PURPOSE: Polish Language resource file - * TRANSLATORS: Caemyr - Olaf Siejka (May,2009), Use ReactOS forum PM or IRC to contact me + * PROJECT: PAINT for ReactOS + * LICENSE: unknown (LGPL assumed) + * FILE: base/applications/paint/lang/pl-PL.rc + * PURPOSE: Polish Language resource file + * TRANSLATORS: Caemyr - Olaf Siejka (May,2009), Use ReactOS forum PM or IRC to contact me + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -13,27 +14,27 @@ BEGIN POPUP "&Plik" BEGIN MENUITEM "&Nowy\tCtrl+N", IDM_FILENEW - MENUITEM "&Otwrz...\tCtrl+O", IDM_FILEOPEN + MENUITEM "&Otwórz...\tCtrl+O", IDM_FILEOPEN MENUITEM "&Zapisz\tCtrl+S", IDM_FILESAVE MENUITEM "Zapisz &jako...", IDM_FILESAVEAS MENUITEM SEPARATOR - MENUITEM "Ustaw jako tapet (ssiadujce)", IDM_FILEASWALLPAPERPLANE - MENUITEM "Ustaw jako tapet (wyrodkowana)", IDM_FILEASWALLPAPERCENTERED - MENUITEM "Ustaw jako tapet (rozcignita)", IDM_FILEASWALLPAPERSTRETCHED + MENUITEM "Ustaw jako tapetę (sąsiadujące)", IDM_FILEASWALLPAPERPLANE + MENUITEM "Ustaw jako tapetę (wyśrodkowana)", IDM_FILEASWALLPAPERCENTERED + MENUITEM "Ustaw jako tapetę (rozciągnięta)", IDM_FILEASWALLPAPERSTRETCHED MENUITEM SEPARATOR - MENUITEM "&Wyjd\tAlt+F4", IDM_FILEEXIT + MENUITEM "&Wyjdź\tAlt+F4", IDM_FILEEXIT END POPUP "&Edytuj" BEGIN MENUITEM "Cofnij\tCtrl+Z", IDM_EDITUNDO - MENUITEM "Ponw\tCtrl+Y", IDM_EDITREDO + MENUITEM "Ponów\tCtrl+Y", IDM_EDITREDO MENUITEM SEPARATOR MENUITEM "Wytnij\tCtrl+X", IDM_EDITCUT MENUITEM "Kopiuj\tCtrl+C", IDM_EDITCOPY MENUITEM "Wklej\tCtrl+V", IDM_EDITPASTE - MENUITEM "Usu zaznaczenie\tDel", IDM_EDITDELETESELECTION - MENUITEM "Odwr zaznaczenie", IDM_EDITINVERTSELECTION + MENUITEM "Usuń zaznaczenie\tDel", IDM_EDITDELETESELECTION + MENUITEM "Odwróć zaznaczenie", IDM_EDITINVERTSELECTION MENUITEM "Zaznacz wszystko\tCtrl+A", IDM_EDITSELECTALL MENUITEM SEPARATOR MENUITEM "Kopiuj do...", IDM_EDITCOPYTO @@ -42,14 +43,14 @@ BEGIN POPUP "&Widok" BEGIN - MENUITEM "Pasek narzdzi\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED - MENUITEM "Paleta kolorw\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED + MENUITEM "Pasek narzędzi\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED + MENUITEM "Paleta kolorów\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED MENUITEM "Pasek stanu", IDM_VIEWSTATUSBAR, CHECKED MENUITEM "Pasek tekstu", IDM_FORMATICONBAR, CHECKED, GRAYED MENUITEM SEPARATOR - POPUP "Powikszenie" + POPUP "Powiększenie" BEGIN - POPUP "Zdefiniowane przez uytkownika" + POPUP "Zdefiniowane przez użytkownika" BEGIN MENUITEM "12,5%", IDM_VIEWZOOM125 MENUITEM "25%", IDM_VIEWZOOM25 @@ -60,20 +61,20 @@ BEGIN MENUITEM "800%", IDM_VIEWZOOM800 END MENUITEM SEPARATOR - MENUITEM "Poka siatk", IDM_VIEWSHOWGRID - MENUITEM "Poka miniatur", IDM_VIEWSHOWMINIATURE + MENUITEM "Pokaż siatkę", IDM_VIEWSHOWGRID + MENUITEM "Pokaż miniaturkę", IDM_VIEWSHOWMINIATURE END - MENUITEM "Peny ekran\tCtrl+F", IDM_VIEWFULLSCREEN + MENUITEM "Pełny ekran\tCtrl+F", IDM_VIEWFULLSCREEN END POPUP "&Obraz" BEGIN - MENUITEM "Obrt/Odbicie...\tCtrl+R", IDM_IMAGEROTATEMIRROR + MENUITEM "Obrót/Odbicie...\tCtrl+R", IDM_IMAGEROTATEMIRROR MENUITEM "Zmiana rozmiaru...\tCtrl+W", IDM_IMAGECHANGESIZE MENUITEM "Kadrowanie", IDM_IMAGECROP - MENUITEM "Odwrcenie kolorw\tCtrl+I", IDM_IMAGEINVERTCOLORS + MENUITEM "Odwrócenie kolorów\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Atrybuty...\tCtrl+E", IDM_IMAGEATTRIBUTES - MENUITEM "Wyczy obraz\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE + MENUITEM "Wyczyść obraz\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE MENUITEM "Rysuj nieprzezroczyste", IDM_IMAGEDRAWOPAQUE END @@ -115,15 +116,15 @@ END IDD_MIRRORROTATE DIALOGEX 100, 100, 180, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Obrt i odbicie lustrzane" +CAPTION "Obrót i odbicie lustrzane" BEGIN - GROUPBOX "Obrt lub odbicie", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 + GROUPBOX "Obrót lub odbicie", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 AUTORADIOBUTTON "Odbicie poziome", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP AUTORADIOBUTTON "Odbicie pionowe", IDD_MIRRORROTATERB2, 12, 30, 100, 10 - AUTORADIOBUTTON "Obrt o kt:", IDD_MIRRORROTATERB3, 12, 42, 100, 10 - AUTORADIOBUTTON "90", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED - AUTORADIOBUTTON "180", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED - AUTORADIOBUTTON "270", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED + AUTORADIOBUTTON "Obrót o kąt:", IDD_MIRRORROTATERB3, 12, 42, 100, 10 + AUTORADIOBUTTON "90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED + AUTORADIOBUTTON "180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED + AUTORADIOBUTTON "270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED DEFPUSHBUTTON "OK", IDOK, 125, 8, 48, 14 PUSHBUTTON "Anuluj", IDCANCEL, 125, 24, 48, 14 END @@ -135,24 +136,24 @@ CAPTION "Atrybuty" BEGIN EDITTEXT IDD_ATTRIBUTESEDIT1, 40, 40, 35, 12 EDITTEXT IDD_ATTRIBUTESEDIT2, 110, 40, 35, 12 - LTEXT "Szeroko:", IDD_ATTRIBUTESTEXT1, 10, 40, 30, 10 - LTEXT "Wysoko:", IDD_ATTRIBUTESTEXT2, 80, 40, 30, 10 + LTEXT "Szerokość:", IDD_ATTRIBUTESTEXT1, 10, 40, 30, 10 + LTEXT "Wysokość:", IDD_ATTRIBUTESTEXT2, 80, 40, 30, 10 LTEXT "Data:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 LTEXT "Rozmiar:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 - LTEXT "Rozdzielczo:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 - LTEXT "Niedostpny", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 - LTEXT "Niedostpny", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 - LTEXT "Niedostpny", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 + LTEXT "Rozdzielczość:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 + LTEXT "Niedostępny", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 + LTEXT "Niedostępny", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 + LTEXT "Niedostępny", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 GROUPBOX "Jednostki", IDD_ATTRIBUTESGROUP1, 6, 57, 139, 27 AUTORADIOBUTTON "Cale", IDD_ATTRIBUTESRB1, 12, 69, 35, 10, WS_GROUP AUTORADIOBUTTON "cm", IDD_ATTRIBUTESRB2, 52, 69, 35, 10 AUTORADIOBUTTON "Piksele", IDD_ATTRIBUTESRB3, 92, 69, 35, 10 GROUPBOX "Kolory", IDD_ATTRIBUTESGROUP2, 6, 88, 139, 27 - AUTORADIOBUTTON "Czer i biel", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "Czerń i biel", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP AUTORADIOBUTTON "Kolory", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 DEFPUSHBUTTON "OK", IDOK, 155, 8, 48, 14 PUSHBUTTON "Anuluj", IDCANCEL, 155, 24, 48, 14 - PUSHBUTTON "Domylne", IDD_ATTRIBUTESSTANDARD, 155, 40, 48, 14 + PUSHBUTTON "Domyślne", IDD_ATTRIBUTESSTANDARD, 155, 40, 48, 14 END IDD_CHANGESIZE DIALOGEX 100, 100, 210, 80 @@ -160,7 +161,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" CAPTION "Zmiana rozmiaru" BEGIN - GROUPBOX "Zmie rozmiar", IDD_CHANGESIZEGROUP, 6, 6, 142, 66 + GROUPBOX "Zmień rozmiar", IDD_CHANGESIZEGROUP, 6, 6, 142, 66 ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 LTEXT "Poziomo:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 @@ -178,28 +179,28 @@ BEGIN IDS_PROGRAMNAME, "Paint" IDS_WINDOWTITLE, "%s - Paint" IDS_INFOTITLE, "Paint dla ReactOS" - IDS_INFOTEXT, "Paint dla ReactOS jest dostpny na licencji GNU Lesser General Public License (LGPL) wersja 3 (www.gnu.org)" - IDS_SAVEPROMPTTEXT, "Czy chcesz zapisa zmiany do %s?" + IDS_INFOTEXT, "Paint dla ReactOS jest dostępny na licencji GNU Lesser General Public License (LGPL) wersja 3 (www.gnu.org)" + IDS_SAVEPROMPTTEXT, "Czy chcesz zapisać zmiany do %s?" IDS_DEFAULTFILENAME, "Nienazwany.bmp" IDS_MINIATURETITLE, "Miniatura" IDS_TOOLTIP1, "Zaznaczenie dowolne" IDS_TOOLTIP2, "Zaznaczenie" IDS_TOOLTIP3, "Gumka" - IDS_TOOLTIP4, "Wypenij kolorem" + IDS_TOOLTIP4, "Wypełnij kolorem" IDS_TOOLTIP5, "Wybierz kolor" - IDS_TOOLTIP6, "Przyblienie" - IDS_TOOLTIP7, "Owek" - IDS_TOOLTIP8, "Pdzel" + IDS_TOOLTIP6, "Przybliżenie" + IDS_TOOLTIP7, "Ołówek" + IDS_TOOLTIP8, "Pędzel" IDS_TOOLTIP9, "Aerograf" IDS_TOOLTIP10, "Tekst" IDS_TOOLTIP11, "Linia" IDS_TOOLTIP12, "Krzywa Beziera" - IDS_TOOLTIP13, "Prostokt" - IDS_TOOLTIP14, "Wielokt" + IDS_TOOLTIP13, "Prostokąt" + IDS_TOOLTIP14, "Wielokąt" IDS_TOOLTIP15, "Elipsa" - IDS_TOOLTIP16, "Zaokrglony Prostokt" + IDS_TOOLTIP16, "Zaokrąglony Prostokąt" IDS_OPENFILTER, "Pliki Bitmapy (*.bmp;*.dib)\1*.bmp;*.dib\1Wszystkie pliki (*.*)\1*.*\1" IDS_SAVEFILTER, "Bitmapa 24 bit (*.bmp;*.dib)\1*.bmp;*.dib\1" - IDS_FILESIZE, "%d bajtw" + IDS_FILESIZE, "%d bajtów" IDS_PRINTRES, "%d x %d pikseli na metr" END diff --git a/base/applications/mspaint/lang/ro-RO.rc b/base/applications/mspaint/lang/ro-RO.rc index 38ca5d4ee46..a75ebd873d3 100644 --- a/base/applications/mspaint/lang/ro-RO.rc +++ b/base/applications/mspaint/lang/ro-RO.rc @@ -8,8 +8,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - ID_MENU MENU BEGIN POPUP "&Fișier" @@ -206,5 +204,3 @@ BEGIN IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" END - -#pragma code_page(default) diff --git a/base/applications/mspaint/lang/ru-RU.rc b/base/applications/mspaint/lang/ru-RU.rc index cdbb5f5fcd7..7b151a2690c 100644 --- a/base/applications/mspaint/lang/ru-RU.rc +++ b/base/applications/mspaint/lang/ru-RU.rc @@ -10,46 +10,46 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT ID_MENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&\tCtrl+N", IDM_FILENEW - MENUITEM "&...\tCtrl+O", IDM_FILEOPEN - MENUITEM "&\tCtrl+S", IDM_FILESAVE - MENUITEM " &...", IDM_FILESAVEAS + MENUITEM "Созд&ать\tCtrl+N", IDM_FILENEW + MENUITEM "&Открыть...\tCtrl+O", IDM_FILEOPEN + MENUITEM "&Сохранить\tCtrl+S", IDM_FILESAVE + MENUITEM "Сохранить &как...", IDM_FILESAVEAS MENUITEM SEPARATOR - MENUITEM " (&)", IDM_FILEASWALLPAPERPLANE - MENUITEM " ( &)", IDM_FILEASWALLPAPERCENTERED - MENUITEM " (&)", IDM_FILEASWALLPAPERSTRETCHED + MENUITEM "Сделать фоновым рисунком (&замостить)", IDM_FILEASWALLPAPERPLANE + MENUITEM "Сделать фоновым рисунком (по ц&ентру)", IDM_FILEASWALLPAPERCENTERED + MENUITEM "Сделать фоновым рисунком (раст&януть)", IDM_FILEASWALLPAPERSTRETCHED MENUITEM SEPARATOR - MENUITEM "&\tAlt+F4", IDM_FILEEXIT + MENUITEM "В&ыход\tAlt+F4", IDM_FILEEXIT END - POPUP "&" + POPUP "&Правка" BEGIN - MENUITEM "&\tCtrl+Z", IDM_EDITUNDO - MENUITEM "&\tCtrl+Y", IDM_EDITREDO + MENUITEM "&Отменить\tCtrl+Z", IDM_EDITUNDO + MENUITEM "Пов&торить\tCtrl+Y", IDM_EDITREDO MENUITEM SEPARATOR - MENUITEM "&\tCtrl+X", IDM_EDITCUT - MENUITEM "&\tCtrl+C", IDM_EDITCOPY - MENUITEM "&\tCtrl+V", IDM_EDITPASTE - MENUITEM "& \tDel", IDM_EDITDELETESELECTION - MENUITEM " &", IDM_EDITINVERTSELECTION - MENUITEM " &\tCtrl+A", IDM_EDITSELECTALL + MENUITEM "&Вырезать\tCtrl+X", IDM_EDITCUT + MENUITEM "&Копировать\tCtrl+C", IDM_EDITCOPY + MENUITEM "Вст&авить\tCtrl+V", IDM_EDITPASTE + MENUITEM "О&чистить выделение\tDel", IDM_EDITDELETESELECTION + MENUITEM "Обратить в&ыделение", IDM_EDITINVERTSELECTION + MENUITEM "Выделить в&се\tCtrl+A", IDM_EDITSELECTALL MENUITEM SEPARATOR - MENUITEM "& ...", IDM_EDITCOPYTO - MENUITEM " &...", IDM_EDITPASTEFROM + MENUITEM "Копироват&ь в файл...", IDM_EDITCOPYTO + MENUITEM "Вставить из &файла...", IDM_EDITPASTEFROM END - POPUP "&" + POPUP "&Вид" BEGIN - MENUITEM " &\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED - MENUITEM "&\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED - MENUITEM "& ", IDM_VIEWSTATUSBAR, CHECKED - MENUITEM " & ", IDM_FORMATICONBAR, CHECKED, GRAYED + MENUITEM "Набор &инструментов\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED + MENUITEM "Па&литра\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED + MENUITEM "&Строка состояния", IDM_VIEWSTATUSBAR, CHECKED + MENUITEM "Панель &атрибутов текста", IDM_FORMATICONBAR, CHECKED, GRAYED MENUITEM SEPARATOR - POPUP "&" + POPUP "Мас&штаб" BEGIN - POPUP "" + POPUP "Выбрать" BEGIN MENUITEM "12,5%", IDM_VIEWZOOM125 MENUITEM "25%", IDM_VIEWZOOM25 @@ -60,33 +60,33 @@ BEGIN MENUITEM "800%", IDM_VIEWZOOM800 END MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEWSHOWGRID - MENUITEM " ", IDM_VIEWSHOWMINIATURE + MENUITEM "Показать сетку", IDM_VIEWSHOWGRID + MENUITEM "Показать эскиз", IDM_VIEWSHOWMINIATURE END - MENUITEM " \tCtrl+F", IDM_VIEWFULLSCREEN + MENUITEM "Полный экран\tCtrl+F", IDM_VIEWFULLSCREEN END - POPUP "&" + POPUP "&Рисунок" BEGIN - MENUITEM "&/...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "& ...\tCtrl+W", IDM_IMAGECHANGESIZE - MENUITEM "&", IDM_IMAGECROP - MENUITEM "& \tCtrl+I", IDM_IMAGEINVERTCOLORS - MENUITEM "&...\tCtrl+E", IDM_IMAGEATTRIBUTES - MENUITEM "&\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE - MENUITEM "& ", IDM_IMAGEDRAWOPAQUE + MENUITEM "&Отразить/повернуть...\tCtrl+R", IDM_IMAGEROTATEMIRROR + MENUITEM "&Изменить размер...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Обре&зать", IDM_IMAGECROP + MENUITEM "О&братить цвета\tCtrl+I", IDM_IMAGEINVERTCOLORS + MENUITEM "&Атрибуты...\tCtrl+E", IDM_IMAGEATTRIBUTES + MENUITEM "О&чистить\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE + MENUITEM "&Непрозрачный фон", IDM_IMAGEDRAWOPAQUE END - POPUP "&" + POPUP "П&алитра" BEGIN - MENUITEM "& ...", IDM_COLORSEDITPALETTE + MENUITEM "&Изменить палитру...", IDM_COLORSEDITPALETTE END POPUP "&?" BEGIN - MENUITEM "& ", IDM_HELPHELPTOPICS + MENUITEM "&Вызов справки", IDM_HELPHELPTOPICS MENUITEM SEPARATOR - MENUITEM "& ...", IDM_HELPINFO + MENUITEM "&О программе...", IDM_HELPINFO END END @@ -115,91 +115,91 @@ END IDD_MIRRORROTATE DIALOGEX 100, 100, 180, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Отражение и поворот" BEGIN - GROUPBOX "", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 - AUTORADIOBUTTON " ", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP - AUTORADIOBUTTON " ", IDD_MIRRORROTATERB2, 12, 30, 100, 10 - AUTORADIOBUTTON " ", IDD_MIRRORROTATERB3, 12, 42, 100, 10 - AUTORADIOBUTTON "90", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED - AUTORADIOBUTTON "180", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED - AUTORADIOBUTTON "270", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED + GROUPBOX "Действие", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 + AUTORADIOBUTTON "Отразить слева направо", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP + AUTORADIOBUTTON "Отразить сверху вниз", IDD_MIRRORROTATERB2, 12, 30, 100, 10 + AUTORADIOBUTTON "Повернуть на угол", IDD_MIRRORROTATERB3, 12, 42, 100, 10 + AUTORADIOBUTTON "90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED + AUTORADIOBUTTON "180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED + AUTORADIOBUTTON "270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED DEFPUSHBUTTON "OK", IDOK, 125, 8, 48, 14 - PUSHBUTTON "", IDCANCEL, 125, 24, 48, 14 + PUSHBUTTON "Отмена", IDCANCEL, 125, 24, 48, 14 END IDD_ATTRIBUTES DIALOGEX 100, 100, 210, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "" +CAPTION "Атрибуты" BEGIN EDITTEXT IDD_ATTRIBUTESEDIT1, 40, 40, 35, 12 EDITTEXT IDD_ATTRIBUTESEDIT2, 110, 40, 35, 12 - LTEXT ":", IDD_ATTRIBUTESTEXT1, 10, 42, 30, 10 - LTEXT ":", IDD_ATTRIBUTESTEXT2, 80, 42, 30, 10 - LTEXT " :", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 - LTEXT " :", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 - LTEXT ":", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 - LTEXT " ", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 - LTEXT " ", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 - LTEXT " ", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 - GROUPBOX " ", IDD_ATTRIBUTESGROUP1, 6, 57, 139, 27 - AUTORADIOBUTTON "&", IDD_ATTRIBUTESRB1, 12, 69, 35, 10, WS_GROUP - AUTORADIOBUTTON "&", IDD_ATTRIBUTESRB2, 52, 69, 35, 10 - AUTORADIOBUTTON "&", IDD_ATTRIBUTESRB3, 92, 69, 35, 10 - GROUPBOX "", IDD_ATTRIBUTESGROUP2, 6, 88, 139, 27 - AUTORADIOBUTTON "-", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP - AUTORADIOBUTTON "", IDD_ATTRIBUTESRB5, 92, 100, 45, 10 + LTEXT "Ширина:", IDD_ATTRIBUTESTEXT1, 10, 42, 30, 10 + LTEXT "Высота:", IDD_ATTRIBUTESTEXT2, 80, 42, 30, 10 + LTEXT "Дата сохранения:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 + LTEXT "Размер на диске:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 + LTEXT "Разрешение:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 + LTEXT "не доступно", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 + LTEXT "не доступно", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 + LTEXT "не доступно", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 + GROUPBOX "Единицы измерения", IDD_ATTRIBUTESGROUP1, 6, 57, 139, 27 + AUTORADIOBUTTON "д&юймы", IDD_ATTRIBUTESRB1, 12, 69, 35, 10, WS_GROUP + AUTORADIOBUTTON "с&м", IDD_ATTRIBUTESRB2, 52, 69, 35, 10 + AUTORADIOBUTTON "т&очки", IDD_ATTRIBUTESRB3, 92, 69, 35, 10 + GROUPBOX "Палитра", IDD_ATTRIBUTESGROUP2, 6, 88, 139, 27 + AUTORADIOBUTTON "черно-белая", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "цветная", IDD_ATTRIBUTESRB5, 92, 100, 45, 10 DEFPUSHBUTTON "OK", IDOK, 150, 8, 57, 14 - PUSHBUTTON "", IDCANCEL, 150, 24, 57, 14 - PUSHBUTTON " &", IDD_ATTRIBUTESSTANDARD, 150, 40, 57, 14 + PUSHBUTTON "Отмена", IDCANCEL, 150, 24, 57, 14 + PUSHBUTTON "По умо&лчанию", IDD_ATTRIBUTESSTANDARD, 150, 40, 57, 14 END IDD_CHANGESIZE DIALOGEX 100, 100, 210, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Изменение размеров" BEGIN - GROUPBOX "", IDD_CHANGESIZEGROUP, 6, 6, 145, 66 + GROUPBOX "Размер", IDD_CHANGESIZEGROUP, 6, 6, 145, 66 ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT " :", IDD_CHANGESIZETEXT1, 39, 24, 62, 10 + LTEXT "По горизонтали:", IDD_CHANGESIZETEXT1, 39, 24, 62, 10 EDITTEXT IDD_CHANGESIZEEDIT1, 102, 23, 32, 12 LTEXT "%", IDD_CHANGESIZETEXT2, 137, 24, 12, 10 ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT " :", IDD_CHANGESIZETEXT3, 39, 49, 62, 10 + LTEXT "По вертикали:", IDD_CHANGESIZETEXT3, 39, 49, 62, 10 EDITTEXT IDD_CHANGESIZEEDIT2, 102, 48, 32, 12 LTEXT "%", IDD_CHANGESIZETEXT4, 137, 49, 12, 10 DEFPUSHBUTTON "OK", IDOK, 155, 8, 48, 14 - PUSHBUTTON "", IDCANCEL, 155, 24, 48, 14 + PUSHBUTTON "Отмена", IDCANCEL, 155, 24, 48, 14 END STRINGTABLE BEGIN IDS_PROGRAMNAME, "Paint" IDS_WINDOWTITLE, "%s - Paint" - IDS_INFOTITLE, "Paint ReactOS" - IDS_INFOTEXT, "Paint ReactOS GNU Lesser General Public License (LGPL) 3 (see www.gnu.org)" - IDS_SAVEPROMPTTEXT, " %s?" - IDS_DEFAULTFILENAME, "_.bmp" - IDS_MINIATURETITLE, "" - IDS_TOOLTIP1, " " - IDS_TOOLTIP2, "" - IDS_TOOLTIP3, "" - IDS_TOOLTIP4, "" - IDS_TOOLTIP5, " " - IDS_TOOLTIP6, "" - IDS_TOOLTIP7, "" - IDS_TOOLTIP8, "" - IDS_TOOLTIP9, "" - IDS_TOOLTIP10, "" - IDS_TOOLTIP11, "" - IDS_TOOLTIP12, "" - IDS_TOOLTIP13, "" - IDS_TOOLTIP14, "" - IDS_TOOLTIP15, "" - IDS_TOOLTIP16, " " - IDS_OPENFILTER, " (*.bmp;*.dib)\1*.bmp;*.dib\1 (*.*)\1*.*\1" - IDS_SAVEFILTER, "24- (*.bmp;*.dib)\1*.bmp;*.dib\1" + IDS_INFOTITLE, "Paint для ReactOS" + IDS_INFOTEXT, "Paint для ReactOS распространяется под лицензией GNU Lesser General Public License (LGPL) версии 3 (see www.gnu.org)" + IDS_SAVEPROMPTTEXT, "Сохранить изменения в %s?" + IDS_DEFAULTFILENAME, "Без_имени.bmp" + IDS_MINIATURETITLE, "Эскиз" + IDS_TOOLTIP1, "Выделение произвольной области" + IDS_TOOLTIP2, "Выделение" + IDS_TOOLTIP3, "Ластик" + IDS_TOOLTIP4, "Заливка" + IDS_TOOLTIP5, "Выбрать цвет" + IDS_TOOLTIP6, "Масштаб" + IDS_TOOLTIP7, "Карандаш" + IDS_TOOLTIP8, "Кисть" + IDS_TOOLTIP9, "Распылитель" + IDS_TOOLTIP10, "Текст" + IDS_TOOLTIP11, "Линия" + IDS_TOOLTIP12, "Кривая" + IDS_TOOLTIP13, "Прямоугольник" + IDS_TOOLTIP14, "Многоугольник" + IDS_TOOLTIP15, "Эллипс" + IDS_TOOLTIP16, "Скругленный прямоугольник" + IDS_OPENFILTER, "Точечные рисунки (*.bmp;*.dib)\1*.bmp;*.dib\1Все файлы (*.*)\1*.*\1" + IDS_SAVEFILTER, "24-разрядный рисунок (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" END diff --git a/base/applications/mspaint/lang/uk-UA.rc b/base/applications/mspaint/lang/uk-UA.rc index bcfe75e215c..d52fa540e08 100644 --- a/base/applications/mspaint/lang/uk-UA.rc +++ b/base/applications/mspaint/lang/uk-UA.rc @@ -10,46 +10,46 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT ID_MENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&\tCtrl+N", IDM_FILENEW - MENUITEM "&...\tCtrl+O", IDM_FILEOPEN - MENUITEM "&\tCtrl+S", IDM_FILESAVE - MENUITEM " &...", IDM_FILESAVEAS + MENUITEM "&Створити\tCtrl+N", IDM_FILENEW + MENUITEM "В&ідкрити...\tCtrl+O", IDM_FILEOPEN + MENUITEM "З&берегти\tCtrl+S", IDM_FILESAVE + MENUITEM "Зберегти &як...", IDM_FILESAVEAS MENUITEM SEPARATOR - MENUITEM "& Windows", IDM_FILEASWALLPAPERPLANE - MENUITEM " & Windows", IDM_FILEASWALLPAPERCENTERED - MENUITEM "& ()", IDM_FILEASWALLPAPERSTRETCHED + MENUITEM "&Замостити робочий стіл Windows", IDM_FILEASWALLPAPERPLANE + MENUITEM "До ц&ентру робочого стола Windows", IDM_FILEASWALLPAPERCENTERED + MENUITEM "&Встановити як тло (розтягнути)", IDM_FILEASWALLPAPERSTRETCHED MENUITEM SEPARATOR - MENUITEM "&\tAlt+F4", IDM_FILEEXIT + MENUITEM "В&ихід\tAlt+F4", IDM_FILEEXIT END - POPUP "&" + POPUP "&Редагування" BEGIN - MENUITEM "\tCtrl+Z", IDM_EDITUNDO - MENUITEM "\tCtrl+Y", IDM_EDITREDO + MENUITEM "Скасувати\tCtrl+Z", IDM_EDITUNDO + MENUITEM "Повторити\tCtrl+Y", IDM_EDITREDO MENUITEM SEPARATOR - MENUITEM "\tCtrl+X", IDM_EDITCUT - MENUITEM "\tCtrl+C", IDM_EDITCOPY - MENUITEM "\tCtrl+V", IDM_EDITPASTE - MENUITEM " \tDel", IDM_EDITDELETESELECTION - MENUITEM " ", IDM_EDITINVERTSELECTION - MENUITEM " \tCtrl+A", IDM_EDITSELECTALL + MENUITEM "Вирізати\tCtrl+X", IDM_EDITCUT + MENUITEM "Копіювати\tCtrl+C", IDM_EDITCOPY + MENUITEM "Вставити\tCtrl+V", IDM_EDITPASTE + MENUITEM "Видалити виділення\tDel", IDM_EDITDELETESELECTION + MENUITEM "Обернути виділення", IDM_EDITINVERTSELECTION + MENUITEM "Виділити все\tCtrl+A", IDM_EDITSELECTALL MENUITEM SEPARATOR - MENUITEM " ...", IDM_EDITCOPYTO - MENUITEM " ...", IDM_EDITPASTEFROM + MENUITEM "Копіювати до файлу...", IDM_EDITCOPYTO + MENUITEM "Вставити з файлу...", IDM_EDITPASTEFROM END - POPUP "&" + POPUP "В&игляд" BEGIN - MENUITEM " \tCtrl+T", IDM_VIEWTOOLBOX, CHECKED - MENUITEM "\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED - MENUITEM " ", IDM_VIEWSTATUSBAR, CHECKED - MENUITEM " ", IDM_FORMATICONBAR, CHECKED, GRAYED + MENUITEM "Панель елементів\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED + MENUITEM "Палітра\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED + MENUITEM "Рядок стану", IDM_VIEWSTATUSBAR, CHECKED + MENUITEM "Панель атрибутів тексту", IDM_FORMATICONBAR, CHECKED, GRAYED MENUITEM SEPARATOR - POPUP "" + POPUP "Масштаб" BEGIN - POPUP "" + POPUP "Користувацький" BEGIN MENUITEM "12,5%", IDM_VIEWZOOM125 MENUITEM "25%", IDM_VIEWZOOM25 @@ -60,33 +60,33 @@ BEGIN MENUITEM "800%", IDM_VIEWZOOM800 END MENUITEM SEPARATOR - MENUITEM " ", IDM_VIEWSHOWGRID - MENUITEM " ", IDM_VIEWSHOWMINIATURE + MENUITEM "Показати сітку", IDM_VIEWSHOWGRID + MENUITEM "Показати в мініатюрі", IDM_VIEWSHOWMINIATURE END - MENUITEM " \tCtrl+F", IDM_VIEWFULLSCREEN + MENUITEM "На весь екран\tCtrl+F", IDM_VIEWFULLSCREEN END - POPUP "&" + POPUP "&Зображення" BEGIN - MENUITEM "³/...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM " ...\tCtrl+W", IDM_IMAGECHANGESIZE - MENUITEM "", IDM_IMAGECROP - MENUITEM " \tCtrl+I", IDM_IMAGEINVERTCOLORS - MENUITEM "...\tCtrl+E", IDM_IMAGEATTRIBUTES - MENUITEM " \tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE - MENUITEM " ", IDM_IMAGEDRAWOPAQUE + MENUITEM "Відобразити/повернути...\tCtrl+R", IDM_IMAGEROTATEMIRROR + MENUITEM "Змінити розмір...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Обітнути", IDM_IMAGECROP + MENUITEM "Обернути кольори\tCtrl+I", IDM_IMAGEINVERTCOLORS + MENUITEM "Атрибути...\tCtrl+E", IDM_IMAGEATTRIBUTES + MENUITEM "Видалити малюнок\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE + MENUITEM "Непрозоре тло", IDM_IMAGEDRAWOPAQUE END - POPUP "&" + POPUP "&Кольори" BEGIN - MENUITEM " ...", IDM_COLORSEDITPALETTE + MENUITEM "Змінити палітру...", IDM_COLORSEDITPALETTE END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM " ", IDM_HELPHELPTOPICS + MENUITEM "Виклик довідки", IDM_HELPHELPTOPICS MENUITEM SEPARATOR - MENUITEM "", IDM_HELPINFO + MENUITEM "Інформація", IDM_HELPINFO END END @@ -115,91 +115,91 @@ END IDD_MIRRORROTATE DIALOGEX 100, 100, 180, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "³ " +CAPTION "Відображення й поворот" BEGIN - GROUPBOX " ", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 - AUTORADIOBUTTON "³ ", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP - AUTORADIOBUTTON "³ ", IDD_MIRRORROTATERB2, 12, 30, 100, 10 - AUTORADIOBUTTON " ", IDD_MIRRORROTATERB3, 12, 42, 100, 10 - AUTORADIOBUTTON "90", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED - AUTORADIOBUTTON "180", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED - AUTORADIOBUTTON "270", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED + GROUPBOX "Перегорнути або повернути", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 + AUTORADIOBUTTON "Відобразити зліва направо", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP + AUTORADIOBUTTON "Відобразити зверху вниз", IDD_MIRRORROTATERB2, 12, 30, 100, 10 + AUTORADIOBUTTON "Повернути на кут", IDD_MIRRORROTATERB3, 12, 42, 100, 10 + AUTORADIOBUTTON "90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED + AUTORADIOBUTTON "180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED + AUTORADIOBUTTON "270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED DEFPUSHBUTTON "OK", IDOK, 125, 8, 48, 14 - PUSHBUTTON "", IDCANCEL, 125, 24, 48, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 125, 24, 48, 14 END IDD_ATTRIBUTES DIALOGEX 100, 100, 210, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "" +CAPTION "Атрибути" BEGIN EDITTEXT IDD_ATTRIBUTESEDIT1, 40, 40, 35, 12 EDITTEXT IDD_ATTRIBUTESEDIT2, 110, 40, 35, 12 - LTEXT ":", IDD_ATTRIBUTESTEXT1, 10, 40, 30, 10 - LTEXT ":", IDD_ATTRIBUTESTEXT2, 80, 40, 30, 10 - LTEXT " :", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 - LTEXT " :", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 - LTEXT ":", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 - LTEXT "", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 - LTEXT "", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 - LTEXT "", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 - GROUPBOX " ", IDD_ATTRIBUTESGROUP1, 6, 57, 139, 27 - AUTORADIOBUTTON "", IDD_ATTRIBUTESRB1, 12, 69, 35, 10, WS_GROUP - AUTORADIOBUTTON "", IDD_ATTRIBUTESRB2, 52, 69, 35, 10 - AUTORADIOBUTTON "", IDD_ATTRIBUTESRB3, 92, 69, 35, 10 - GROUPBOX "", IDD_ATTRIBUTESGROUP2, 6, 88, 139, 27 - AUTORADIOBUTTON "-", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP - AUTORADIOBUTTON "", IDD_ATTRIBUTESRB5, 92, 100, 39, 10 + LTEXT "Ширина:", IDD_ATTRIBUTESTEXT1, 10, 40, 30, 10 + LTEXT "Висота:", IDD_ATTRIBUTESTEXT2, 80, 40, 30, 10 + LTEXT "Дата файлу:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 + LTEXT "Розмір файлу:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 + LTEXT "Розширення:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 + LTEXT "Недоступно", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 + LTEXT "Недоступно", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 + LTEXT "Недоступно", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 + GROUPBOX "Одиниці вимірювання", IDD_ATTRIBUTESGROUP1, 6, 57, 139, 27 + AUTORADIOBUTTON "дюйми", IDD_ATTRIBUTESRB1, 12, 69, 35, 10, WS_GROUP + AUTORADIOBUTTON "см", IDD_ATTRIBUTESRB2, 52, 69, 35, 10 + AUTORADIOBUTTON "пікселі", IDD_ATTRIBUTESRB3, 92, 69, 35, 10 + GROUPBOX "Кольори", IDD_ATTRIBUTESGROUP2, 6, 88, 139, 27 + AUTORADIOBUTTON "чорно-білий", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "кольори", IDD_ATTRIBUTESRB5, 92, 100, 39, 10 DEFPUSHBUTTON "OK", IDOK, 155, 8, 48, 14 - PUSHBUTTON "", IDCANCEL, 155, 24, 48, 14 - PUSHBUTTON "", IDD_ATTRIBUTESSTANDARD, 155, 40, 48, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 155, 24, 48, 14 + PUSHBUTTON "Стандартно", IDD_ATTRIBUTESSTANDARD, 155, 40, 48, 14 END IDD_CHANGESIZE DIALOGEX 100, 100, 210, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Зміна розміру" BEGIN - GROUPBOX " ", IDD_CHANGESIZEGROUP, 6, 6, 142, 66 + GROUPBOX "Зміна розміру", IDD_CHANGESIZEGROUP, 6, 6, 142, 66 ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT ":", IDD_CHANGESIZETEXT1, 45, 24, 45, 10 + LTEXT "Горизонталь:", IDD_CHANGESIZETEXT1, 45, 24, 45, 10 EDITTEXT IDD_CHANGESIZEEDIT1, 92, 23, 32, 12 LTEXT "%", IDD_CHANGESIZETEXT2, 127, 24, 15, 10 ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT ":", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 + LTEXT "Вертикаль:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 EDITTEXT IDD_CHANGESIZEEDIT2, 92, 48, 32, 12 LTEXT "%", IDD_CHANGESIZETEXT4, 127, 49, 15, 10 DEFPUSHBUTTON "OK", IDOK, 155, 8, 48, 14 - PUSHBUTTON "", IDCANCEL, 155, 24, 48, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 155, 24, 48, 14 END STRINGTABLE BEGIN IDS_PROGRAMNAME, "Paint" IDS_WINDOWTITLE, "%s - Paint" - IDS_INFOTITLE, "Paint ReactOS" - IDS_INFOTEXT, "Paint ReactOS GNU Lesser General Public License (LGPL) 3 ( www.gnu.org)" - IDS_SAVEPROMPTTEXT, " %s?" - IDS_DEFAULTFILENAME, "_.bmp" - IDS_MINIATURETITLE, "̳" - IDS_TOOLTIP1, " " - IDS_TOOLTIP2, "" - IDS_TOOLTIP3, "" - IDS_TOOLTIP4, "" - IDS_TOOLTIP5, " " - IDS_TOOLTIP6, "" - IDS_TOOLTIP7, "" - IDS_TOOLTIP8, "" - IDS_TOOLTIP9, "" - IDS_TOOLTIP10, "" - IDS_TOOLTIP11, "˳" - IDS_TOOLTIP12, " '" - IDS_TOOLTIP13, "" - IDS_TOOLTIP14, "" - IDS_TOOLTIP15, "" - IDS_TOOLTIP16, " " - IDS_OPENFILTER, " (*.bmp;*.dib)\1*.bmp;*.dib\1 (*.*)\1*.*\1" - IDS_SAVEFILTER, "24- (*.bmp;*.dib)\1*.bmp;*.dib\1" - IDS_FILESIZE, "%d " - IDS_PRINTRES, "%d x %d . " + IDS_INFOTITLE, "Paint для ReactOS" + IDS_INFOTEXT, "Paint для ReactOS доступний згідно з GNU Lesser General Public License (LGPL) версії 3 (дивіться www.gnu.org)" + IDS_SAVEPROMPTTEXT, "Зберегти зміни до %s?" + IDS_DEFAULTFILENAME, "Без_імені.bmp" + IDS_MINIATURETITLE, "Мініатюра" + IDS_TOOLTIP1, "Виділення довільної області" + IDS_TOOLTIP2, "Виділення" + IDS_TOOLTIP3, "Гумка" + IDS_TOOLTIP4, "Заливка" + IDS_TOOLTIP5, "Вибір кольорів" + IDS_TOOLTIP6, "Масштаб" + IDS_TOOLTIP7, "Олівець" + IDS_TOOLTIP8, "Пензель" + IDS_TOOLTIP9, "Розпилювач" + IDS_TOOLTIP10, "Текст" + IDS_TOOLTIP11, "Лінія" + IDS_TOOLTIP12, "Крива Без'є" + IDS_TOOLTIP13, "Прямокутник" + IDS_TOOLTIP14, "Багатокутник" + IDS_TOOLTIP15, "Еліпс" + IDS_TOOLTIP16, "Прямокутник з округленими кутами" + IDS_OPENFILTER, "Точкові рисунки (*.bmp;*.dib)\1*.bmp;*.dib\1Усі файли (*.*)\1*.*\1" + IDS_SAVEFILTER, "24-розрядний рисунок (*.bmp;*.dib)\1*.bmp;*.dib\1" + IDS_FILESIZE, "%d байт" + IDS_PRINTRES, "%d x %d пікс. на метр" END diff --git a/base/applications/mspaint/main.c b/base/applications/mspaint/main.c index 3c77cb23999..a103af9932c 100644 --- a/base/applications/mspaint/main.c +++ b/base/applications/mspaint/main.c @@ -43,10 +43,10 @@ int undoSteps = 0; int redoSteps = 0; BOOL imageSaved = TRUE; -short startX; -short startY; -short lastX; -short lastY; +LONG startX; +LONG startY; +LONG lastX; +LONG lastY; int lineWidth = 1; int shapeStyle = 0; int brushStyle = 0; @@ -168,8 +168,8 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument wincl.lpfnWndProc = WindowProcedure; wincl.style = CS_DBLCLKS; wincl.cbSize = sizeof(WNDCLASSEX); - wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wincl.hIconSm = LoadIcon(hThisInstance, MAKEINTRESOURCE(500)); + wincl.hIcon = LoadIcon(hThisInstance, MAKEINTRESOURCE(IDI_APPICON)); + wincl.hIconSm = LoadIcon(hThisInstance, MAKEINTRESOURCE(IDI_APPICON)); wincl.hCursor = LoadCursor(NULL, IDC_ARROW); wincl.lpszMenuName = NULL; wincl.cbClsExtra = 0; diff --git a/base/applications/mspaint/mouse.c b/base/applications/mspaint/mouse.c index 0cda1879313..26d3ffb5a96 100644 --- a/base/applications/mspaint/mouse.c +++ b/base/applications/mspaint/mouse.c @@ -26,7 +26,7 @@ placeSelWin() } void -regularize(short x0, short y0, short *x1, short *y1) +regularize(LONG x0, LONG y0, LONG *x1, LONG *y1) { if (abs(*x1 - x0) >= abs(*y1 - y0)) *y1 = y0 + (*y1 > y0 ? abs(*x1 - x0) : -abs(*x1 - x0)); @@ -35,7 +35,7 @@ regularize(short x0, short y0, short *x1, short *y1) } void -roundTo8Directions(short x0, short y0, short *x1, short *y1) +roundTo8Directions(LONG x0, LONG y0, LONG *x1, LONG *y1) { if (abs(*x1 - x0) >= abs(*y1 - y0)) { @@ -59,7 +59,7 @@ POINT *ptStack = NULL; int ptSP = 0; void -startPaintingL(HDC hdc, short x, short y, int fg, int bg) +startPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { startX = x; startY = y; @@ -132,7 +132,7 @@ startPaintingL(HDC hdc, short x, short y, int fg, int bg) } void -whilePaintingL(HDC hdc, short x, short y, int fg, int bg) +whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { switch (activeTool) { @@ -149,8 +149,8 @@ whilePaintingL(HDC hdc, short x, short y, int fg, int bg) break; case TOOL_RECTSEL: { - short tempX; - short tempY; + int tempX; + int tempY; resetToU1(); tempX = max(0, min(x, imgXRes)); tempY = max(0, min(y, imgYRes)); @@ -209,7 +209,7 @@ whilePaintingL(HDC hdc, short x, short y, int fg, int bg) pointStack[pointSP].y = y; if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0)) roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y, - (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y); + &pointStack[pointSP].x, &pointStack[pointSP].y); if (pointSP + 1 >= 2) Poly(hdc, pointStack, pointSP + 1, fg, bg, lineWidth, shapeStyle, FALSE); break; @@ -232,7 +232,7 @@ whilePaintingL(HDC hdc, short x, short y, int fg, int bg) } void -endPaintingL(HDC hdc, short x, short y, int fg, int bg) +endPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { switch (activeTool) { @@ -350,7 +350,7 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg) pointStack[pointSP].y = y; if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0)) roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y, - (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y); + &pointStack[pointSP].x, &pointStack[pointSP].y); pointSP++; if (pointSP >= 2) { @@ -384,7 +384,7 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg) } void -startPaintingR(HDC hdc, short x, short y, int fg, int bg) +startPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { startX = x; startY = y; @@ -444,7 +444,7 @@ startPaintingR(HDC hdc, short x, short y, int fg, int bg) } void -whilePaintingR(HDC hdc, short x, short y, int fg, int bg) +whilePaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { switch (activeTool) { @@ -496,7 +496,7 @@ whilePaintingR(HDC hdc, short x, short y, int fg, int bg) pointStack[pointSP].y = y; if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0)) roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y, - (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y); + &pointStack[pointSP].x, &pointStack[pointSP].y); if (pointSP + 1 >= 2) Poly(hdc, pointStack, pointSP + 1, bg, fg, lineWidth, shapeStyle, FALSE); break; @@ -519,7 +519,7 @@ whilePaintingR(HDC hdc, short x, short y, int fg, int bg) } void -endPaintingR(HDC hdc, short x, short y, int fg, int bg) +endPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { switch (activeTool) { @@ -553,7 +553,7 @@ endPaintingR(HDC hdc, short x, short y, int fg, int bg) pointStack[pointSP].y = y; if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0)) roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y, - (short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y); + &pointStack[pointSP].x, &pointStack[pointSP].y); pointSP++; if (pointSP >= 2) { diff --git a/base/applications/mspaint/mouse.h b/base/applications/mspaint/mouse.h index acb083c0a8b..ea56ba8b6ba 100644 --- a/base/applications/mspaint/mouse.h +++ b/base/applications/mspaint/mouse.h @@ -8,14 +8,14 @@ void placeSelWin(void); -void startPaintingL(HDC hdc, short x, short y, int fg, int bg); +void startPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg); -void whilePaintingL(HDC hdc, short x, short y, int fg, int bg); +void whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg); -void endPaintingL(HDC hdc, short x, short y, int fg, int bg); +void endPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg); -void startPaintingR(HDC hdc, short x, short y, int fg, int bg); +void startPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg); -void whilePaintingR(HDC hdc, short x, short y, int fg, int bg); +void whilePaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg); -void endPaintingR(HDC hdc, short x, short y, int fg, int bg); +void endPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg); diff --git a/base/applications/mspaint/rsrc.rc b/base/applications/mspaint/rsrc.rc index 75db8c8e108..882a7eadcf8 100644 --- a/base/applications/mspaint/rsrc.rc +++ b/base/applications/mspaint/rsrc.rc @@ -24,16 +24,18 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/pt-PT.rc" // cp 1250 languages #include "lang/cs-CZ.rc" #include "lang/hu-HU.rc" -#include "lang/ro-RO.rc" #include "lang/sk-SK.rc" // cp 1251 languages #include "lang/bg-BG.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" - diff --git a/base/applications/mspaint/winproc.c b/base/applications/mspaint/winproc.c index 213efaffd58..8184302013f 100644 --- a/base/applications/mspaint/winproc.c +++ b/base/applications/mspaint/winproc.c @@ -447,11 +447,11 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } else if (hwnd == hwndMiniature) { - long mclient[4]; + RECT mclient; HDC hdc; - GetClientRect(hwndMiniature, (LPRECT) &mclient); + GetClientRect(hwndMiniature, &mclient); hdc = GetDC(hwndMiniature); - BitBlt(hdc, 0, 0, imgXRes, imgYRes, hDrawingDC, 0, 0, SRCCOPY); + StretchBlt(hdc, 0, 0, mclient.right, mclient.bottom, hDrawingDC, 0, 0, imgXRes, imgYRes, SRCCOPY); ReleaseDC(hwndMiniature, hdc); } break; @@ -503,7 +503,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } SendMessage(hImageArea, WM_PAINT, 0, 0); if ((activeTool == TOOL_ZOOM) && (zoom < 8000)) - zoomTo(zoom * 2, (short)LOWORD(lParam), (short)HIWORD(lParam)); + zoomTo(zoom * 2, LOWORD(lParam), HIWORD(lParam)); } break; @@ -524,7 +524,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } SendMessage(hImageArea, WM_PAINT, 0, 0); if ((activeTool == TOOL_ZOOM) && (zoom > 125)) - zoomTo(zoom / 2, (short)LOWORD(lParam), (short)HIWORD(lParam)); + zoomTo(zoom / 2, LOWORD(lParam), HIWORD(lParam)); } break; @@ -589,8 +589,8 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOUSEMOVE: if (hwnd == hImageArea) { - short xNow = (short)LOWORD(lParam) * 1000 / zoom; - short yNow = (short)HIWORD(lParam) * 1000 / zoom; + LONG xNow = LOWORD(lParam) * 1000 / zoom; + LONG yNow = HIWORD(lParam) * 1000 / zoom; if ((!drawing) || (activeTool <= TOOL_AIRBRUSH)) { TRACKMOUSEEVENT tme; @@ -598,7 +598,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (activeTool == TOOL_ZOOM) { SendMessage(hImageArea, WM_PAINT, 0, 0); - drawZoomFrame((short)LOWORD(lParam), (short)HIWORD(lParam)); + drawZoomFrame(LOWORD(lParam), HIWORD(lParam)); } tme.cbSize = sizeof(TRACKMOUSEEVENT); @@ -617,8 +617,8 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (drawing) { /* values displayed in statusbar */ - short xRel = xNow - startX; - short yRel = yNow - startY; + LONG xRel = xNow - startX; + LONG yRel = yNow - startY; /* freesel, rectsel and text tools always show numbers limited to fit into image area */ if ((activeTool == TOOL_FREESEL) || (activeTool == TOOL_RECTSEL) || (activeTool == TOOL_TEXT)) { @@ -721,6 +721,9 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SendMessage(hwnd, WM_CLOSE, wParam, lParam); break; case IDM_FILENEW: + ShowWindow(hSelection, SW_HIDE); + clearHistory(); + Rectangle(hDrawingDC, 0 - 1, 0 - 1, imgXRes + 1, imgYRes + 1); SendMessage(hImageArea, WM_PAINT, 0, 0); break; @@ -794,10 +797,20 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SetClipboardData(CF_BITMAP, CopyImage(hSelBm, IMAGE_BITMAP, 0, 0, LR_COPYRETURNORG)); CloseClipboard(); break; + case IDM_EDITCUT: + /* Copy */ + SendMessage(hwnd, WM_COMMAND, IDM_EDITCOPY, 0); + /* Delete selection */ + SendMessage(hwnd, WM_COMMAND, IDM_EDITDELETESELECTION, 0); + break; case IDM_EDITPASTE: OpenClipboard(hMainWnd); if (GetClipboardData(CF_BITMAP) != NULL) { + HWND hToolbar = FindWindowEx(hToolBoxContainer, NULL, TOOLBARCLASSNAME, NULL); + SendMessage(hToolbar, TB_CHECKBUTTON, ID_RECTSEL, MAKELONG(TRUE, 0)); + SendMessage(hwnd, WM_COMMAND, ID_RECTSEL, 0); + DeleteObject(SelectObject(hSelDC, hSelBm = CopyImage(GetClipboardData(CF_BITMAP), IMAGE_BITMAP, 0, 0, LR_COPYRETURNORG))); diff --git a/base/applications/mstsc/CMakeLists.txt b/base/applications/mstsc/CMakeLists.txt index ef37c8fd823..ef0eb892b81 100644 --- a/base/applications/mstsc/CMakeLists.txt +++ b/base/applications/mstsc/CMakeLists.txt @@ -23,12 +23,12 @@ list(APPEND SOURCE win32.c rdc.rc) -add_executable(mstsc ${CMAKE_CURRENT_BINARY_DIR}/mstsc_precomp.h.gch ${SOURCE}) - -add_pch(mstsc ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(mstsc ${SOURCE}) set_module_type(mstsc win32gui) add_importlibs(mstsc user32 gdi32 comctl32 ws2_32 advapi32 shell32 ole32 comdlg32 msvcrt kernel32) +add_pch(mstsc precomp.h) + add_cd_file(TARGET mstsc DESTINATION reactos/system32 FOR all) diff --git a/base/applications/mstsc/connectdialog.c b/base/applications/mstsc/connectdialog.c index c99e11c9b0e..92f0b4055d3 100644 --- a/base/applications/mstsc/connectdialog.c +++ b/base/applications/mstsc/connectdialog.c @@ -1136,10 +1136,10 @@ DlgProc(HWND hDlg, SRCCOPY); SelectObject(hdcMem, hBmpOld); - txtRc.left = bmpRc.right * 0.25; + txtRc.left = bmpRc.right / 4; txtRc.top = 10; - txtRc.right = bmpRc.right * 0.75; - txtRc.bottom = pInfo->headerbitmap.bmHeight * 0.5; + txtRc.right = bmpRc.right * 3 / 4; + txtRc.bottom = pInfo->headerbitmap.bmHeight / 2; ZeroMemory(&lf, sizeof(LOGFONTW)); @@ -1172,10 +1172,10 @@ DlgProc(HWND hDlg, } } - txtRc.left = bmpRc.right * 0.25; + txtRc.left = bmpRc.right / 4; txtRc.top = txtRc.bottom - 5; - txtRc.right = bmpRc.right * 0.75; - txtRc.bottom = pInfo->headerbitmap.bmHeight * 0.9; + txtRc.right = bmpRc.right * 3 / 4; + txtRc.bottom = pInfo->headerbitmap.bmHeight * 9 / 10; if (LoadStringW(hInst, IDS_HEADERTEXT2, diff --git a/base/applications/mstsc/lang/pl-PL.rc b/base/applications/mstsc/lang/pl-PL.rc index f81062037be..6b0002dc633 100644 --- a/base/applications/mstsc/lang/pl-PL.rc +++ b/base/applications/mstsc/lang/pl-PL.rc @@ -1,9 +1,10 @@ /* - * translated by Caemyr - Olaf Siejka (Dec,2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; - * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -13,17 +14,17 @@ STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Ustawienia logowania",IDC_STATIC,7,7,228,89 - GROUPBOX "Ustawienia poczenia",IDC_STATIC,7,103,228,65 + GROUPBOX "Ustawienia połączenia",IDC_STATIC,7,103,228,65 ICON "", IDC_LOGONICON, 15,19,20,20 LTEXT "Wpisz adres serwera",IDC_STATIC,47,24,81,8 LTEXT "Serwer:",IDC_STATIC,47,41,25,8 - LTEXT "Nazwa uytkownika:",IDC_STATIC,47,58,38,8 + LTEXT "Nazwa użytkownika:",IDC_STATIC,47,58,38,8 COMBOBOX IDC_SERVERCOMBO,79,39,141,150,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Zapisz",IDC_SAVE,67,139,50,14 PUSHBUTTON "Zapisz jako...",IDC_SAVEAS,123,139,50,14 - PUSHBUTTON "Otwrz...",IDC_OPEN,177,139,50,14 + PUSHBUTTON "Otwórz...",IDC_OPEN,177,139,50,14 ICON "", IDC_CONNICON, 16,114,20,20 - LTEXT "Zapisz obecne poczenie albo otwrz ju istniejcy plik z ustawieniami",IDC_STATIC,50,115,172,20 + LTEXT "Zapisz obecne połączenie albo otwórz już istniejący plik z ustawieniami",IDC_STATIC,50,115,172,20 END IDD_DISPLAY DIALOGEX 0, 0, 242, 175 @@ -31,25 +32,25 @@ STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Rozmiar pulpitu zdalnego",IDC_STATIC,7,7,228,68 - GROUPBOX "Liczba kolorw",IDC_STATIC,7,83,228,85 + GROUPBOX "Liczba kolorów",IDC_STATIC,7,83,228,85 ICON "", IDC_REMICON, 15,19,20,20 ICON "", IDC_COLORSICON, 15,98,20,20 - LTEXT "Ustaw rozmiar twojego pulpitu zdalnego. Przesu suwak do koca w prawo, aby uruchomi pulpit na penym ekranie",IDC_STATIC,53,22,175,21 + LTEXT "Ustaw rozmiar twojego pulpitu zdalnego. Przesuń suwak do końca w prawo, aby uruchomić pulpit na pełnym ekranie",IDC_STATIC,53,22,175,21 CONTROL "", IDC_GEOSLIDER, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 56, 42, 124, 17 COMBOBOX IDC_BPPCOMBO,56,102,128,80, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_COLORIMAGE,"Static",SS_OWNERDRAW | SS_SUNKEN, 56,121,127,10 - LTEXT "Uwaga: Ustawienia na komputerze zdalnym maj pierwszestwo nad bierzcymi.",IDC_STATIC,56,143,165,18 + LTEXT "Uwaga: Ustawienia na komputerze zdalnym mają pierwszeństwo nad bieżącymi.",IDC_STATIC,56,143,165,18 LTEXT "Mniej",IDC_STATIC,35,42,15,8 - LTEXT "Wicej",IDC_STATIC,189,42,17,8 + LTEXT "Więcej",IDC_STATIC,189,42,17,8 LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 62, 120, 10, SS_CENTER END IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 262 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Poczenie pulpitu zdalnego" +CAPTION "Połączenie pulpitu zdalnego" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "Pocz",IDOK,147,245,50,14 + DEFPUSHBUTTON "Połącz",IDOK,147,245,50,14 PUSHBUTTON "Anuluj",IDCANCEL,203,245,50,14 CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,50,246,190 END @@ -57,15 +58,15 @@ END STRINGTABLE BEGIN - IDS_TAB_GENERAL "Oglne" + IDS_TAB_GENERAL "Ogólne" IDS_TAB_DISPLAY "Ekran" - IDS_256COLORS "256 kolorw" - IDS_HIGHCOLOR15 "32,768 kolorw (15 bit)" - IDS_HIGHCOLOR16 "65,536 kolorw (16 bit)" - IDS_HIGHCOLOR24 "16,777,216 kolorw (24 bit)" + IDS_256COLORS "256 kolorów" + IDS_HIGHCOLOR15 "32,768 kolorów (15 bit)" + IDS_HIGHCOLOR16 "65,536 kolorów (16 bit)" + IDS_HIGHCOLOR24 "16,777,216 kolorów (24 bit)" IDS_PIXEL "%lux%lu pikseli" - IDS_FULLSCREEN "Peny ekran" + IDS_FULLSCREEN "Pełny ekran" IDS_BROWSESERVER "" IDS_HEADERTEXT1 "Pulpit zdalny" - IDS_HEADERTEXT2 "Poczenie" + IDS_HEADERTEXT2 "Połączenie" END diff --git a/base/applications/mstsc/lang/ru-RU.rc b/base/applications/mstsc/lang/ru-RU.rc index 6c46131b026..f905d34667e 100644 --- a/base/applications/mstsc/lang/ru-RU.rc +++ b/base/applications/mstsc/lang/ru-RU.rc @@ -4,60 +4,60 @@ IDD_GENERAL DIALOGEX 0, 0, 242, 175 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",IDC_STATIC,7,7,228,89 - GROUPBOX " ",IDC_STATIC,7,103,228,65 + GROUPBOX "Настройки входа",IDC_STATIC,7,7,228,89 + GROUPBOX "Настройки подключения",IDC_STATIC,7,103,228,65 ICON "", IDC_LOGONICON, 15,19,20,20 - LTEXT " ",IDC_STATIC,47,24,100,8 - LTEXT ":",IDC_STATIC,52,41,31,8 - LTEXT " :",IDC_STATIC,15,58,67,8 + LTEXT "Введите адрес сервера",IDC_STATIC,47,24,100,8 + LTEXT "Сервер:",IDC_STATIC,52,41,31,8 + LTEXT "Имя пользователя:",IDC_STATIC,15,58,67,8 COMBOBOX IDC_SERVERCOMBO,86,39,141,150,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "",IDC_SAVE,49,139,50,14 - PUSHBUTTON " ...",IDC_SAVEAS,103,139,70,14 - PUSHBUTTON "...",IDC_OPEN,177,139,50,14 + PUSHBUTTON "Сохранить",IDC_SAVE,49,139,50,14 + PUSHBUTTON "Сохранить как...",IDC_SAVEAS,103,139,70,14 + PUSHBUTTON "Открыть...",IDC_OPEN,177,139,50,14 ICON "", IDC_CONNICON, 16,114,20,20 - LTEXT " .",IDC_STATIC,50,115,172,20 + LTEXT "Сохранить текущие настройки подключения или открыть существующую конфигурацию.",IDC_STATIC,50,115,172,20 END IDD_DISPLAY DIALOGEX 0, 0, 242, 175 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",IDC_STATIC,7,7,228,68 - GROUPBOX "",IDC_STATIC,7,83,228,85 + GROUPBOX "Размер удаленного рабочего стола",IDC_STATIC,7,7,228,68 + GROUPBOX "Цвета",IDC_STATIC,7,83,228,85 ICON "", IDC_REMICON, 15,19,20,20 ICON "", IDC_COLORSICON, 15,98,20,20 - LTEXT " -\n. .",IDC_STATIC,53,17,175,24 + LTEXT "Установить размер экрана на удаленном компью-\nтере. Перетащите ползунок в крайнее правое положение для перехода в полноэкранный режим.",IDC_STATIC,53,17,175,24 CONTROL "", IDC_GEOSLIDER, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 56, 42, 124, 17 COMBOBOX IDC_BPPCOMBO,56,102,128,80, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_COLORIMAGE,"Static",SS_OWNERDRAW | SS_SUNKEN, 56,121,127,10 - LTEXT ": .",IDC_STATIC,56,143,165,18 - LTEXT "",IDC_STATIC,20,52,30,8 - LTEXT "",IDC_STATIC,189,51,32,8 + LTEXT "Примечание: Эти параметры определяются настройками удаленного компьютера.",IDC_STATIC,56,143,165,18 + LTEXT "меньше",IDC_STATIC,20,52,30,8 + LTEXT "больше",IDC_STATIC,189,51,32,8 LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 62, 120, 10, SS_CENTER END IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 275 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Подключение к удаленному рабочему столу" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "",IDOK,147,256,50,14 - PUSHBUTTON "",IDCANCEL,203,256,50,14 + DEFPUSHBUTTON "Соединение",IDOK,147,256,50,14 + PUSHBUTTON "Отмена",IDCANCEL,203,256,50,14 CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,54,246,198 END STRINGTABLE BEGIN - IDS_TAB_GENERAL "" - IDS_TAB_DISPLAY "" - IDS_256COLORS "256 " - IDS_HIGHCOLOR15 "32,768 (15 )" - IDS_HIGHCOLOR16 "65,536 (16 )" - IDS_HIGHCOLOR24 "16,777,216 (24 )" - IDS_PIXEL "%lux%lu " - IDS_FULLSCREEN " " - IDS_BROWSESERVER "< ...>" - IDS_HEADERTEXT1 " " - IDS_HEADERTEXT2 "" + IDS_TAB_GENERAL "Общие" + IDS_TAB_DISPLAY "Экран" + IDS_256COLORS "256 цветов" + IDS_HIGHCOLOR15 "32,768 цветов (15 бит)" + IDS_HIGHCOLOR16 "65,536 цветов (16 бит)" + IDS_HIGHCOLOR24 "16,777,216 цветов (24 бит)" + IDS_PIXEL "%lux%lu пикселей" + IDS_FULLSCREEN "Полный экран" + IDS_BROWSESERVER "<Указать путь...>" + IDS_HEADERTEXT1 "Удаленный рабочий стол" + IDS_HEADERTEXT2 "Соединение" END diff --git a/base/applications/mstsc/lang/uk-UA.rc b/base/applications/mstsc/lang/uk-UA.rc index e425e31c15d..8e4892cc0ad 100644 --- a/base/applications/mstsc/lang/uk-UA.rc +++ b/base/applications/mstsc/lang/uk-UA.rc @@ -12,60 +12,60 @@ IDD_GENERAL DIALOGEX 0, 0, 242, 175 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",IDC_STATIC,7,7,228,89 - GROUPBOX " ",IDC_STATIC,7,103,228,65 + GROUPBOX "Параметри входу",IDC_STATIC,7,7,228,89 + GROUPBOX "Параметри підключення",IDC_STATIC,7,103,228,65 ICON "", IDC_LOGONICON, 15,19,20,20 - LTEXT " ",IDC_STATIC,47,24,81,8 - LTEXT ":",IDC_STATIC,47,41,27,8 - LTEXT ":",IDC_STATIC,47,58,41,8 + LTEXT "Введіть адресу сервера",IDC_STATIC,47,24,81,8 + LTEXT "Сервер:",IDC_STATIC,47,41,27,8 + LTEXT "Користувач:",IDC_STATIC,47,58,41,8 COMBOBOX IDC_SERVERCOMBO,79,39,141,150,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "",IDC_SAVE,67,139,50,14 - PUSHBUTTON " ...",IDC_SAVEAS,123,139,50,14 - PUSHBUTTON "³...",IDC_OPEN,177,139,50,14 + PUSHBUTTON "Зберегти",IDC_SAVE,67,139,50,14 + PUSHBUTTON "Зберегти як...",IDC_SAVEAS,123,139,50,14 + PUSHBUTTON "Відкрити...",IDC_OPEN,177,139,50,14 ICON "", IDC_CONNICON, 16,114,20,20 - LTEXT " ",IDC_STATIC,50,115,172,20 + LTEXT "Збереження поточних параметрів або відкриття існуючого підключення",IDC_STATIC,50,115,172,20 END IDD_DISPLAY DIALOGEX 0, 0, 242, 175 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",IDC_STATIC,7,7,228,71 - GROUPBOX " ",IDC_STATIC,7,83,228,85 + GROUPBOX "Розмір віддаленого робочого столу",IDC_STATIC,7,7,228,71 + GROUPBOX "Колірна палітра",IDC_STATIC,7,83,228,85 ICON "", IDC_REMICON, 15,19,20,20 ICON "", IDC_COLORSICON, 15,98,20,20 - LTEXT " . , ",IDC_STATIC,53,15,175,24 + LTEXT "Вкажіть розмір віддаленого робочого столу. Перетягніть повзунок праворуч до кінця, щоб перейти у повноекранний режим",IDC_STATIC,53,15,175,24 CONTROL "", IDC_GEOSLIDER, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 56, 45, 124, 17 COMBOBOX IDC_BPPCOMBO,56,102,128,80, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_COLORIMAGE,"Static",SS_OWNERDRAW | SS_SUNKEN, 56,121,127,10 - LTEXT ": ' .",IDC_STATIC,56,143,175,18 - LTEXT "",IDC_STATIC,29,45,21,8 - LTEXT "",IDC_STATIC,189,45,23,8 + LTEXT "Примітка: параметри на віддаленому комп'ютері можуть перекривати значення цього параметра.",IDC_STATIC,56,143,175,18 + LTEXT "менше",IDC_STATIC,29,45,21,8 + LTEXT "більше",IDC_STATIC,189,45,23,8 LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 65, 120, 10, SS_CENTER END IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 267 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ϳ " +CAPTION "Підключення до віддаленого робочого столу" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "ϳ",IDOK,147,249,50,14 - PUSHBUTTON "",IDCANCEL,203,249,50,14 + DEFPUSHBUTTON "Підключити",IDOK,147,249,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,203,249,50,14 CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,54,246,190 END STRINGTABLE BEGIN - IDS_TAB_GENERAL "" - IDS_TAB_DISPLAY "" - IDS_256COLORS "256 " - IDS_HIGHCOLOR15 "32,768 (15 )" - IDS_HIGHCOLOR16 "65,536 (16 )" - IDS_HIGHCOLOR24 "16,777,216 (24 )" - IDS_PIXEL "%lu %lu " - IDS_FULLSCREEN " " - IDS_BROWSESERVER "< ...>" - IDS_HEADERTEXT1 " " - IDS_HEADERTEXT2 "" + IDS_TAB_GENERAL "Загальні" + IDS_TAB_DISPLAY "Екран" + IDS_256COLORS "256 кольорів" + IDS_HIGHCOLOR15 "32,768 кольорів (15 біт)" + IDS_HIGHCOLOR16 "65,536 кольорів (16 біт)" + IDS_HIGHCOLOR24 "16,777,216 кольорів (24 біти)" + IDS_PIXEL "%lu на %lu крапок" + IDS_FULLSCREEN "На весь екран" + IDS_BROWSESERVER "<Пошук інших...>" + IDS_HEADERTEXT1 "Керування робочим" + IDS_HEADERTEXT2 "Столом" END diff --git a/base/applications/mstsc/rsrc.rc b/base/applications/mstsc/rsrc.rc index d933a50afac..0de087fb8f3 100644 --- a/base/applications/mstsc/rsrc.rc +++ b/base/applications/mstsc/rsrc.rc @@ -24,8 +24,11 @@ IDB_SPECT BITMAP "res/spectrum.bmp" #include "lang/ko-KR.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/network/CMakeLists.txt b/base/applications/network/CMakeLists.txt index d961ff60aa5..02eb61db45a 100644 --- a/base/applications/network/CMakeLists.txt +++ b/base/applications/network/CMakeLists.txt @@ -10,7 +10,7 @@ add_subdirectory(nslookup) add_subdirectory(ping) add_subdirectory(route) if(NOT MSVC) -add_subdirectory(telnet) + add_subdirectory(telnet) # FIXME: fix msvc build endif() add_subdirectory(tracert) add_subdirectory(whois) diff --git a/base/applications/network/dwnl/CMakeLists.txt b/base/applications/network/dwnl/CMakeLists.txt index b1aff5f18b6..cf9e64a6164 100644 --- a/base/applications/network/dwnl/CMakeLists.txt +++ b/base/applications/network/dwnl/CMakeLists.txt @@ -1,4 +1,3 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) set_unicode() @@ -10,7 +9,7 @@ target_link_libraries(dwnl uuid) add_importlibs(dwnl urlmon wininet msvcrt kernel32) if(MSVC) -add_importlibs(dwnl ntdll) + add_importlibs(dwnl ntdll) endif() add_cd_file(TARGET dwnl DESTINATION reactos/system32 FOR all) diff --git a/base/applications/network/finger/CMakeLists.txt b/base/applications/network/finger/CMakeLists.txt index 88e1076475f..e6156a14af7 100644 --- a/base/applications/network/finger/CMakeLists.txt +++ b/base/applications/network/finger/CMakeLists.txt @@ -1,7 +1,5 @@ -add_definitions( - -D__USE_W32_SOCKETS - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__USE_W32_SOCKETS) add_executable(finger finger.c diff --git a/base/applications/network/ftp/CMakeLists.txt b/base/applications/network/ftp/CMakeLists.txt index 522da951bec..902f9de6ea7 100644 --- a/base/applications/network/ftp/CMakeLists.txt +++ b/base/applications/network/ftp/CMakeLists.txt @@ -1,7 +1,5 @@ -add_definitions( - -D_DLL -D__USE_CRTIMP - -Dlint) +add_definitions(-Dlint) add_executable(ftp cmds.c diff --git a/base/applications/network/ipconfig/ipconfig.rc b/base/applications/network/ipconfig/ipconfig.rc index 04af25042a1..58af6e0ff91 100644 --- a/base/applications/network/ipconfig/ipconfig.rc +++ b/base/applications/network/ipconfig/ipconfig.rc @@ -16,11 +16,11 @@ #include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" - - - diff --git a/base/applications/network/ipconfig/lang/pl-PL.rc b/base/applications/network/ipconfig/lang/pl-PL.rc index 6f813597f13..a806cc70e35 100644 --- a/base/applications/network/ipconfig/lang/pl-PL.rc +++ b/base/applications/network/ipconfig/lang/pl-PL.rc @@ -1,10 +1,10 @@ /* * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) */ - + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE @@ -18,7 +18,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_OTHER "inny rodzaj karty" + IDS_OTHER "inny rodzaj karty" IDS_ETH "karta Ethernet" IDS_TOKEN "karta Token Ring" IDS_FDDI "karta FDDI" @@ -31,44 +31,44 @@ STRINGTABLE DISCARDABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE - "\nSPOSB UYCIA:\n \ + "\nSPOSÓB UŻYCIA:\n \ ipconfig [/? | /all | /renew [karta] | /release [karta] |\n \ /flushdns | /displaydns | /registerdns \n \ /showclassid karta |\n \ /setclassid karta [identyfikator_klasy] ]\n \ \n \ gdzie\n \ - karta Nazwa poczenia\n \ - (dozwolone symbole zastpcze * i ?, zobacz przykady)\n \ + karta Nazwa połączenia\n \ + (dozwolone symbole zastępcze * i ?, zobacz przykłady)\n \ \n \ Opcje:\n \ - /? Wywietla ten komunikat pomocy.\n \ - /all Wywietla pene informacje o konfiguracji.\n \ - /release Zwalnia adres IP dla okrelonej karty.\n \ - /renew Odnawia adres IP dla okrelonej karty.\n \ - /flushdns Czyci bufor programu rozpoznajcego nazwy DNS.\n \ - /registerdns Odwiea wszystkie dzierawy DHCP i ponownie rejestruje nazwy DNS.\n \ - /displaydns Wywietla zawarto buforu programu rozpoznajcego nazwy DNS.\n \ - /showclassid Wywietla wszystkie identyfikatory klas DHCP dozwolone dla karty.\n \ + /? Wyświetla ten komunikat pomocy.\n \ + /all Wyświetla pełne informacje o konfiguracji.\n \ + /release Zwalnia adres IP dla określonej karty.\n \ + /renew Odnawia adres IP dla określonej karty.\n \ + /flushdns Czyści bufor programu rozpoznającego nazwy DNS.\n \ + /registerdns Odświeża wszystkie dzierżawy DHCP i ponownie rejestruje nazwy DNS.\n \ + /displaydns Wyświetla zawartość buforu programu rozpoznającego nazwy DNS.\n \ + /showclassid Wyświetla wszystkie identyfikatory klas DHCP dozwolone dla karty.\n \ /setclassid Modyfikuje identyfikator klasy DHCP.\n \ \n \ - Zachowanie domylne to wywietlanie tylko adresu IP, maski podsieci i bramy\n \ - domylnej dla kadej karty zwizanej z protokoem TCP/IP.\n \ + Zachowanie domyślne to wyświetlanie tylko adresu IP, maski podsieci i bramy\n \ + domyślnej dla każdej karty związanej z protokołem TCP/IP.\n \ \n \ - Jeli dla przecznikw Release i Renew nie zostanie okrelona nazwa karty,\n \ - zwolnieniu lub odnowieniu ulegaj dzierawy adresw IP dla wszystkich kart\n \ - zwizanych z protokoem TCP/IP.\n \ + Jeśli dla parametrów Release i Renew nie zostanie określona nazwa karty,\n \ + zwolnieniu lub odnowieniu ulegają dzierżawy adresów IP dla wszystkich kart\n \ + związanych z protokołem TCP/IP.\n \ \n \ - Jeli dla przecznika Setclassid nie zostanie okrelony parametr\n \ + Jeśli dla parametru Setclassid nie zostanie określony\n \ identyfikator_klasy, to identyfikator_klasy jest usuwany.\n \ \n \ - Przykady:\n \ + Przykłady:\n \ > ipconfig ... Pokazuje informacje.\n \ - > ipconfig /all ... Pokazuje szczegowe informacje.\n \ + > ipconfig /all ... Pokazuje szczegółowe informacje.\n \ > ipconfig /renew ... Odnawia wszystkie karty.\n \ - > ipconfig /renew EL* ... Odnawia kade poczenie o nazwie\n \ - zaczynajcej si od EL\n \ - > ipconfig /release *Con* ... Zwalnia wszystkie pasujce poczenia,\n \ - np. ""Poczenie lokalne 1"" lub\n \ - ""Poczenie lokalne 2""\n" + > ipconfig /renew EL* ... Odnawia każde połączenie o nazwie\n \ + zaczynającej się od EL\n \ + > ipconfig /release *Poł* ... Zwalnia wszystkie pasujące połączenia,\n \ + np. ""Połączenie lokalne 1"" lub\n \ + ""Połączenie lokalne 2""\n" END diff --git a/base/applications/network/ipconfig/lang/ru-RU.rc b/base/applications/network/ipconfig/lang/ru-RU.rc index bd54562a5aa..e2d221a2ee9 100644 --- a/base/applications/network/ipconfig/lang/ru-RU.rc +++ b/base/applications/network/ipconfig/lang/ru-RU.rc @@ -13,57 +13,57 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_OTHER " " - IDS_ETH "Ethernet " - IDS_TOKEN "Token Ring " - IDS_FDDI "FDDI " - IDS_PPP "PPP " - IDS_LOOP "Loopback " - IDS_SLIP "SLIP " + IDS_OTHER "Другой тип адаптера" + IDS_ETH "Ethernet адаптер" + IDS_TOKEN "Token Ring адаптер" + IDS_FDDI "FDDI адаптер" + IDS_PPP "PPP адаптер" + IDS_LOOP "Loopback адаптер" + IDS_SLIP "SLIP адаптер" END STRINGTABLE DISCARDABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE - "\n:\n \ - ipconfig [/? | /all | /renew [] | /release [] |\n \ + "\nИСПОЛЬЗОВАНИЕ:\n \ + ipconfig [/? | /all | /renew [адаптер] | /release [адаптер] |\n \ /flushdns | /displaydns | /registerdns |\n \ - /showclassid |\n \ - /setclassid [___dhcp] ]\n \ + /showclassid адаптер |\n \ + /setclassid адаптер [устанавливаемый_код_класса_dhcp] ]\n \ \n \ - \n \ - \n \ - (* - , ? - , . )\n \ + Где\n \ + адаптер Название подключения\n \ + (* - любое количество знаков, ? - один любой знак, см. примеры)\n \ \n \ - :\n \ - /? .\n \ - /all .\n \ - /release IP- .\n \ - /renew IP- .\n \ - /flushdns DNS.\n \ - /registerdns DHCP- DNS-.\n \ - /displaydns DNS.\n \ - /showclassid (IDs) DHCP-.\n \ - /setclassid (ID) DHCP-.\n \ + Ключи:\n \ + /? Обобразить это справочное сообщение.\n \ + /all Отобразить полную информацию о настройке параметров.\n \ + /release Освободить IP-адрес для указанного адаптера.\n \ + /renew Обновить IP-адрес для указанного адаптера.\n \ + /flushdns Очистить кеш разрешений DNS.\n \ + /registerdns Обновить все DHCP-аренды и перерегистрировать DNS-имена.\n \ + /displaydns Отобразить содержимое кеша разрешений DNS.\n \ + /showclassid Отобразить все допустимые для этого адаптера коды (IDs) DHCP-классов.\n \ + /setclassid Изменить код (ID) DHCP-класса.\n \ \n \ - IP-, \n \ - , TCP/IP.\n \ + По умолчанию отображается только IP-адрес, маска подсети и стандартный шлюз\n \ + для каждого подключенного адаптера, для которого выполнена привязка с TCP/IP.\n \ \n \ - Release Renew, , \n \ - IP-, , \n \ - TCP/IP.\n \ + Для ключей Release и Renew, если не указано имя адаптера, будет освобожден или\n \ + обновлен IP-адрес, выданный для всех адаптеров, для которых существуют\n \ + привязки с TCP/IP.\n \ \n \ - Setclassid, (ID), .\n \ + Для ключа Setclassid, если не указан код класса (ID), существующий код класса будет удален.\n \ \n \ - :\n \ - > ipconfig ... .\n \ - > ipconfig /all ... \n \ - > ipconfig /renew ... \n \ - > ipconfig /renew EL* ... ,\n \ - EL\n \ - > ipconfig /release *Con* ... IP- ,\n \ - :\n \ - "" 1"" \n \ - "" 2""\n" + Примеры:\n \ + > ipconfig ... Отображает краткую информацию.\n \ + > ipconfig /all ... Отображает полную информацию\n \ + > ipconfig /renew ... Обновляет сведения для всех адаптеров\n \ + > ipconfig /renew EL* ... Обновляет сведения для адаптеров,\n \ + начинающихся с EL\n \ + > ipconfig /release *Con* ... Освобождает IP-адрес для всех адаптеров,\n \ + имена которых удовлетворяют запросу:\n \ + ""Подключение по локальной сети 1"" или\n \ + ""Подключение по локальной сети 2""\n" END diff --git a/base/applications/network/ipconfig/lang/uk-UA.rc b/base/applications/network/ipconfig/lang/uk-UA.rc index 2ecaed3c0ef..3d2af1ea4bd 100644 --- a/base/applications/network/ipconfig/lang/uk-UA.rc +++ b/base/applications/network/ipconfig/lang/uk-UA.rc @@ -13,61 +13,61 @@ BEGIN IDS_P2P "Peer To Peer" IDS_MIXED "Mixed" IDS_HYBRID "Hybrid" - IDS_UNKNOWN "" + IDS_UNKNOWN "Невідомий" END STRINGTABLE DISCARDABLE BEGIN - IDS_OTHER " " - IDS_ETH "Ethernet " - IDS_TOKEN "Token Ring " - IDS_FDDI "FDDI " - IDS_PPP "PPP " - IDS_LOOP "Loopback " - IDS_SLIP "SLIP " + IDS_OTHER "Інший тип адаптера" + IDS_ETH "Ethernet адаптер" + IDS_TOKEN "Token Ring адаптер" + IDS_FDDI "FDDI адаптер" + IDS_PPP "PPP адаптер" + IDS_LOOP "Loopback адаптер" + IDS_SLIP "SLIP адаптер" END STRINGTABLE DISCARDABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE - "\n:\n \ - ipconfig [/? | /all | /renew [] | /release [] |\n \ + "\nВИКОРИСТАННЯ:\n \ + ipconfig [/? | /all | /renew [адаптер] | /release [адаптер] |\n \ /flushdns | /displaydns | /registerdns |\n \ - /showclassid |\n \ - /setclassid [_classid] ]\n \ + /showclassid адптер |\n \ + /setclassid адаптер [встановлюваний_classid] ]\n \ \n \ - \n \ - '\n \ - ( -- *(- ) ?( )\n \ + де\n \ + адаптер Назва з'єднання\n \ + (дозволені символи маскування -- *(будь-яка кількість знаків) і ?(один символ)\n \ \n \ - :\n \ - /? \n \ - /all .\n \ - /release IP- .\n \ - /renew IP- .\n \ - /flushdns DNS .\n \ - /registerdns DHCP DNS.\n \ - /displaydns DNS.\n \ - /showclassid (Class ID) DHCP.\n \ - /setclassid DHCP (Class ID).\n \ + Ключі:\n \ + /? Вивести це повідомлення\n \ + /all Показати повну інформацію про мережні налаштування.\n \ + /release Звільнити IP-адресу вказаного адаптера.\n \ + /renew Обновити IP-адресу вказаного адаптера.\n \ + /flushdns Очистити кеш DNS записів.\n \ + /registerdns Оновити всі реєстрації DHCP і перереєстувати імена DNS.\n \ + /displaydns Показати вміст кешу DNS.\n \ + /showclassid Показати всі довзолені для вказаного адаптера коди(Class ID) DHCP.\n \ + /setclassid Змінтити код DHCP (Class ID).\n \ \n \ - IP-, \n \ - ' TCP/IP.\n \ + По замовчуванню відображається тільки IP-адреса, маска підмережі і шлюз\n \ + для кожного адаптера зв'язаного з TCP/IP.\n \ \n \ - Release Renew, ' ,\n \ - IP- ' TCP/IP.\n \ + При використанні ключів Release і Renew, якщо не було вказано ім'я адаптера,то\n \ + IP-адреса звільняється чи оновлюється для всіх адапетрів зв'язаних з TCP/IP.\n \ \n \ - Setclassid, ID (ClassId), .\n \ + При використанні ключа Setclassid, якщо не було вказано ID класу (ClassId), то існуючий код класу буде видалено.\n \ \n \ - :\n \ - > ipconfig ... .\n \ - > ipconfig /all ... .\n \ - > ipconfig /renew ... \n \ - > ipconfig /renew EL* ... ', \n \ - ' EL\n \ - > ipconfig /release *Con* ... ( )\n \ - ', ""on""\n \ - .""Local Area Connection 1"" \n \ + Приклади:\n \ + > ipconfig ... Вивести загальну інформацію.\n \ + > ipconfig /all ... Вивести повну інформацію.\n \ + > ipconfig /renew ... Оновити стан всіх адапетрів\n \ + > ipconfig /renew EL* ... Оновити стан всіх з'єднань, \n \ + ім'я яких починається на EL\n \ + > ipconfig /release *Con* ... Звільнити (скинути динамічну конфігурацію)\n \ + всі з'єднання, які містять у назві ""Сon""\n \ + напр.""Local Area Connection 1"" чи\n \ ""Local Area Connection 2""\n" END diff --git a/base/applications/network/ping/lang/pl-PL.rc b/base/applications/network/ping/lang/pl-PL.rc index 4879773db83..5c17cb4431b 100644 --- a/base/applications/network/ping/lang/pl-PL.rc +++ b/base/applications/network/ping/lang/pl-PL.rc @@ -1,41 +1,42 @@ /* - * translated by Caemyr (Olaf Siejka) - * caemyr@gmail.com - * Jan, 2011 + * translated by Caemyr - Olaf Siejka (Jan, 2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) */ - LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_USAGE "\nSposb uycia: ping [-t] [-n ilo] [-l bajtw] [-w czas] host-docelowy\n\n\ + IDS_USAGE "\nSposób użycia: ping [-t] [-n ilość] [-l bajtów] [-w czas] host-docelowy\n\n\ Opcje:\n\ - -t Pinguj wskazanego hosta w sposb cigy.\n\ - Aby przerwa - wcinij Control C.\n\ - -n ilo Ilo prb pingowania.\n\ - -l bajtw Rozmiar pakietu echo w bajtach .\n\ - -w czas Opnienie oczekiwanej odpowiedzi, w milisekundach.\n\n\0" + -t Pinguj wskazanego hosta w sposób ciągły.\n\ + Aby przerwać - wciśnij Control C.\n\ + -n ilość Ilość prób pingowania.\n\ + -l bajtów Rozmiar pakietu echo w bajtach .\n\ + -w czas Opóźnienie oczekiwanej odpowiedzi, w milisekundach.\n\n\0" - IDS_PING_WITH_BYTES "\nPingowanie %1 [%2] przy uyciu %3!d! bajtw danych:\n\n\0" - IDS_PING_STATISTICS "\nStatystyka wynikw badania hosta %1:\n\0" - IDS_PACKETS_SENT_RECEIVED_LOST " Pakiety: Wysane = %1!d!, Odebrane = %2!d!, Utracone = %3!d! (%4!d!%% strat),\n\0" - IDS_APPROXIMATE_ROUND_TRIP "Cakowity, przybliony czas podry pakietu w millisekundach:\n\0" - IDS_MIN_MAX_AVERAGE " Minimum = %1, Maksimum = %2, Uredniony = %3\n\0" - IDS_NOT_ENOUGH_RESOURCES "Brak dostpnych zasobw.\n\0" + IDS_PING_WITH_BYTES "\nPingowanie %1 [%2] przy użyciu %3!d! bajtów danych:\n\n\0" + IDS_PING_STATISTICS "\nStatystyka rezultatu badania hosta %1:\n\0" + IDS_PACKETS_SENT_RECEIVED_LOST " Pakiety: Wysłane = %1!d!, Odebrane = %2!d!, Utracone = %3!d! (%4!d!%% strat),\n\0" + IDS_APPROXIMATE_ROUND_TRIP "Całkowity, przybliżony czas podróży pakietu w millisekundach:\n\0" + IDS_MIN_MAX_AVERAGE " Minimum = %1, Maksimum = %2, Uśredniony = %3\n\0" + IDS_NOT_ENOUGH_RESOURCES "Brak dostępnych zasobów.\n\0" IDS_UNKNOWN_HOST "Nieznany host %1.\n\0" - IDS_SETSOCKOPT_FAILED "Bd w setsockopt (%1!d!).\n\0" - IDS_COULD_NOT_CREATE_SOCKET "Bd podczas tworzenia gniazda (#%1!d!).\n\0" - IDS_COULD_NOT_INIT_WINSOCK "Bd podczas inicjalizacji winsock dll.\n\0" - IDS_DEST_MUST_BE_SPECIFIED "Brak nazwy hosta bd adresu IP.\n\0" - IDS_BAD_PARAMETER "Nieprawidowy parametr %1.\n\0" - IDS_BAD_OPTION_FORMAT "Nieprawidowy format opcji %1.\n\0" - IDS_BAD_OPTION "Nieprawidowa opcja %1.\n\0" - IDS_BAD_VALUE_OPTION_L "Nieprawidowa warto dla opcji -l, wymagana liczba naturalna od 0 do %1!d!.\n\0" - IDS_REPLY_FROM "Odpowied z %1: bajtw=%2!d! czas%3%4 TTL=%5!d!\n\0" - IDS_DEST_UNREACHABLE "Host docelowy nieosigalny.\n\0" - IDS_COULD_NOT_TRANSMIT "Bd podczas transmisji danych (%1!d!).\n\0" - IDS_COULD_NOT_RECV "Bd podczas odbioru danych (%1!d!).\n\0" + IDS_SETSOCKOPT_FAILED "Błąd w setsockopt (%1!d!).\n\0" + IDS_COULD_NOT_CREATE_SOCKET "Błąd podczas tworzenia gniazda (#%1!d!).\n\0" + IDS_COULD_NOT_INIT_WINSOCK "Błąd podczas inicjalizacji winsock dll.\n\0" + IDS_DEST_MUST_BE_SPECIFIED "Brak nazwy hosta bądź adresu IP.\n\0" + IDS_BAD_PARAMETER "Nieprawidłowy parametr %1.\n\0" + IDS_BAD_OPTION_FORMAT "Nieprawidłowy format opcji %1.\n\0" + IDS_BAD_OPTION "Nieprawidłowa opcja %1.\n\0" + IDS_BAD_VALUE_OPTION_L "Nieprawidłowa wartość dla opcji -l, wymagana liczba naturalna od 0 do %1!d!.\n\0" + IDS_REPLY_FROM "Odpowiedź z %1: bajtów=%2!d! czas%3%4 TTL=%5!d!\n\0" + IDS_DEST_UNREACHABLE "Host docelowy nieosiągalny.\n\0" + IDS_COULD_NOT_TRANSMIT "Błąd podczas transmisji danych (%1!d!).\n\0" + IDS_COULD_NOT_RECV "Błąd podczas odbioru danych (%1!d!).\n\0" IDS_REQUEST_TIMEOUT "Brak odpowiedzi.\n\0" IDS_MS "ms\0" IDS_1MS "1ms\0" diff --git a/base/applications/network/ping/lang/uk-UA.rc b/base/applications/network/ping/lang/uk-UA.rc index 95ef509d7a5..e4a8ab3c026 100644 --- a/base/applications/network/ping/lang/uk-UA.rc +++ b/base/applications/network/ping/lang/uk-UA.rc @@ -10,34 +10,34 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_USAGE "\n: ping [-t] [-n count] [-l size] [-w timeout] \n\n\ -:\n\ - -t ϳ .\n\ - Control-C.\n\ - -n count ʳ , .\n\ - -l size .\n\ - -w timeout .\n\n\0" + IDS_USAGE "\nВикористання: ping [-t] [-n count] [-l size] [-w timeout] хост\n\n\ +Опції:\n\ + -t Пінг вказаного вузла поки не буде здійснена ручна зупинка.\n\ + Для зупинки натисніть Control-C.\n\ + -n count Кількість запитів, які будуть підправлені.\n\ + -l size Розмір буфера відправки.\n\ + -w timeout Час очікування кожної відповіді в мілісекундах.\n\n\0" - IDS_PING_WITH_BYTES "\n %1 [%2] %3!d! :\n\n\0" - IDS_PING_STATISTICS "\n Ping %1:\n\0" - IDS_PACKETS_SENT_RECEIVED_LOST " : = %1!d!, = %2!d!, = %3!d! (%4!d!%% ),\n\0" - IDS_APPROXIMATE_ROUND_TRIP " -:\n\0" - IDS_MIN_MAX_AVERAGE " ̳ = %1, = %2, = %3\n\0" - IDS_NOT_ENOUGH_RESOURCES " .\n\0" - IDS_UNKNOWN_HOST " %1.\n\0" - IDS_SETSOCKOPT_FAILED "setsockopt (%1!d!).\n\0" - IDS_COULD_NOT_CREATE_SOCKET " (#%1!d!).\n\0" - IDS_COULD_NOT_INIT_WINSOCK " winsock dll.\n\0" - IDS_DEST_MUST_BE_SPECIFIED "' IP- .\n\0" - IDS_BAD_PARAMETER " %1.\n\0" - IDS_BAD_OPTION_FORMAT " %1.\n\0" - IDS_BAD_OPTION " %1.\n\0" - IDS_BAD_VALUE_OPTION_L " -l, 0 %1!d!.\n\0" - IDS_REPLY_FROM "³ %1: =%2!d! %3%4 TTL=%5!d!\n\0" - IDS_DEST_UNREACHABLE " .\n\0" - IDS_COULD_NOT_TRANSMIT " (%1!d!).\n\0" - IDS_COULD_NOT_RECV " (%1!d!).\n\0" - IDS_REQUEST_TIMEOUT " .\n\0" - IDS_MS "\0" - IDS_1MS "1\0" + IDS_PING_WITH_BYTES "\nОбмін пакетами з %1 [%2] по %3!d! байта:\n\n\0" + IDS_PING_STATISTICS "\nСтатистика Ping для %1:\n\0" + IDS_PACKETS_SENT_RECEIVED_LOST " Пакетів: відправлено = %1!d!, отримано = %2!d!, втрачено = %3!d! (%4!d!%% втрат),\n\0" + IDS_APPROXIMATE_ROUND_TRIP "Приблизний час прийому-передачі:\n\0" + IDS_MIN_MAX_AVERAGE " Мінімальний = %1, Максимальний = %2, Середній = %3\n\0" + IDS_NOT_ENOUGH_RESOURCES "Недостатньо вільних ресурсів.\n\0" + IDS_UNKNOWN_HOST "Невідомий хост %1.\n\0" + IDS_SETSOCKOPT_FAILED "setsockopt невдалий (%1!d!).\n\0" + IDS_COULD_NOT_CREATE_SOCKET "Не вдалося створити сокет (#%1!d!).\n\0" + IDS_COULD_NOT_INIT_WINSOCK "Не вдалося ініціалізувати winsock dll.\n\0" + IDS_DEST_MUST_BE_SPECIFIED "Ім'я або IP-адреса хосту повинні бути вказані.\n\0" + IDS_BAD_PARAMETER "Поганий параметр %1.\n\0" + IDS_BAD_OPTION_FORMAT "Невірний формат опції %1.\n\0" + IDS_BAD_OPTION "Погана опція %1.\n\0" + IDS_BAD_VALUE_OPTION_L "Неправильне значення для опції -l, допустимий діапазон від 0 до %1!d!.\n\0" + IDS_REPLY_FROM "Відповідь від %1: байтів=%2!d! час%3%4 TTL=%5!d!\n\0" + IDS_DEST_UNREACHABLE "Хост недоступний.\n\0" + IDS_COULD_NOT_TRANSMIT "Не вдалося передати дані (%1!d!).\n\0" + IDS_COULD_NOT_RECV "Не вдалося отримати дані (%1!d!).\n\0" + IDS_REQUEST_TIMEOUT "Очікування запиту.\n\0" + IDS_MS "мс\0" + IDS_1MS "1мс\0" END diff --git a/base/applications/network/ping/ping.c b/base/applications/network/ping/ping.c index c0bd93201a1..7d04e83ed18 100644 --- a/base/applications/network/ping/ping.c +++ b/base/applications/network/ping/ping.c @@ -727,6 +727,10 @@ int wmain(int argc, LPWSTR argv[]) FormatOutput(IDS_MIN_MAX_AVERAGE, MinTime, MaxTime, AvgTime); } } + else + { + return 1; + } return 0; } diff --git a/base/applications/network/ping/ping.rc b/base/applications/network/ping/ping.rc index e406d71dee4..6972ec44b37 100644 --- a/base/applications/network/ping/ping.rc +++ b/base/applications/network/ping/ping.rc @@ -13,6 +13,9 @@ #include "lang/en-US.rc" #include "lang/fr-FR.rc" #include "lang/it-IT.rc" -#include "lang/pl-PL.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/network/route/CMakeLists.txt b/base/applications/network/route/CMakeLists.txt index 7dde646d9ff..77dde09896b 100644 --- a/base/applications/network/route/CMakeLists.txt +++ b/base/applications/network/route/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - set_unicode() add_executable(route route.c route.rc) diff --git a/base/applications/network/telnet/CMakeLists.txt b/base/applications/network/telnet/CMakeLists.txt index eb4962e2f6c..51c76fa0ebc 100644 --- a/base/applications/network/telnet/CMakeLists.txt +++ b/base/applications/network/telnet/CMakeLists.txt @@ -1,7 +1,5 @@ -add_definitions( - -D_CRT_NONSTDC_NO_DEPRECATE - -D_DLL -D__USE_CRTIMP) +add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) set_cpp() @@ -28,5 +26,5 @@ add_executable(telnet telnet.rc) set_module_type(telnet win32cui) -add_importlibs(telnet ws2_32 user32 kernel32 msvcrt) +add_importlibs(telnet ws2_32 user32 msvcrt kernel32) add_cd_file(TARGET telnet DESTINATION reactos/system32 FOR all) diff --git a/base/applications/network/whois/CMakeLists.txt b/base/applications/network/whois/CMakeLists.txt index fb67240d921..755fc7a9818 100644 --- a/base/applications/network/whois/CMakeLists.txt +++ b/base/applications/network/whois/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - add_executable(whois whois.c whois.rc) set_module_type(whois win32cui) diff --git a/base/applications/notepad/CMakeLists.txt b/base/applications/notepad/CMakeLists.txt index c59cd26f2bb..60d2f774132 100644 --- a/base/applications/notepad/CMakeLists.txt +++ b/base/applications/notepad/CMakeLists.txt @@ -8,10 +8,9 @@ list(APPEND SOURCE set_rc_compiler() -add_pch(notepad ${CMAKE_CURRENT_SOURCE_DIR}/notepad.h ${SOURCE}) - -add_executable(notepad ${CMAKE_CURRENT_BINARY_DIR}/notepad_notepad.h.gch ${SOURCE}) +add_executable(notepad ${SOURCE}) set_module_type(notepad win32gui) add_importlibs(notepad user32 gdi32 comctl32 comdlg32 advapi32 shell32 msvcrt kernel32) +add_pch(notepad notepad.h) add_cd_file(TARGET notepad DESTINATION reactos/system32 FOR all) diff --git a/base/applications/notepad/lang/hy-AM.rc b/base/applications/notepad/lang/hy-AM.rc index baea41a27e6..ec55ae954b4 100644 --- a/base/applications/notepad/lang/hy-AM.rc +++ b/base/applications/notepad/lang/hy-AM.rc @@ -1,9 +1,7 @@ /* * Notepad (Armenian resources) */ - -#pragma code_page(65001) /* Unicode only */ - + LANGUAGE LANG_ARMENIAN, SUBLANG_DEFAULT ID_ACCEL ACCELERATORS @@ -188,5 +186,3 @@ STRING_LF, "Յունիքս" STRING_CR, "Մակինտոշ" STRING_LINE_COLUMN, "Line %d, column %d" END - -#pragma code_page(default) diff --git a/base/applications/notepad/lang/pl-PL.rc b/base/applications/notepad/lang/pl-PL.rc index a99bf7515d2..1c033403d54 100644 --- a/base/applications/notepad/lang/pl-PL.rc +++ b/base/applications/notepad/lang/pl-PL.rc @@ -20,12 +20,13 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * small changes by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * - * updated by Caemyr - Olaf Siejka (Jan, 2008) - */ + * small changes by TestamenT + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * + * updated by Caemyr - Olaf Siejka (Jan, 2008) + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -52,7 +53,7 @@ BEGIN POPUP "&Plik" BEGIN MENUITEM "&Nowy\tCtrl+N", CMD_NEW - MENUITEM "&Otwrz\tCtrl+O", CMD_OPEN + MENUITEM "&Otwórz\tCtrl+O", CMD_OPEN MENUITEM "&Zapisz\tCtrl+S", CMD_SAVE MENUITEM "Z&apisz jako...", CMD_SAVE_AS MENUITEM SEPARATOR @@ -60,7 +61,7 @@ BEGIN MENUITEM "&Ustawienia strony...", CMD_PAGE_SETUP MENUITEM "Ustawienia &drukarki...", CMD_PRINTER_SETUP MENUITEM SEPARATOR - MENUITEM "Zako&cz", CMD_EXIT + MENUITEM "Zakoń&cz", CMD_EXIT END POPUP "&Edycja" BEGIN @@ -69,12 +70,12 @@ BEGIN MENUITEM "&Wytnij\tCtrl+X", CMD_CUT MENUITEM "&Kopiuj\tCtrl+C", CMD_COPY MENUITEM "Wkl&ej\tCtrl+V", CMD_PASTE - MENUITEM "&Usu\tDel", CMD_DELETE + MENUITEM "&Usuń\tDel", CMD_DELETE MENUITEM SEPARATOR - MENUITEM "&Znajd\tCtrl+F", CMD_SEARCH - MENUITEM "Z&najd nastpny\tF3", CMD_SEARCH_NEXT - MENUITEM "Zamie\tCtrl+H", CMD_REPLACE - MENUITEM "Id do...\tCtrl+G", CMD_GOTO + MENUITEM "&Znajdź\tCtrl+F", CMD_SEARCH + MENUITEM "Z&najdź następny\tF3", CMD_SEARCH_NEXT + MENUITEM "Zamień\tCtrl+H", CMD_REPLACE + MENUITEM "Idź do...\tCtrl+G", CMD_GOTO MENUITEM SEPARATOR MENUITEM "Zaznacz w&szystko\tCtrl+A", CMD_SELECT_ALL MENUITEM "Godzina/&Data\tF5", CMD_TIME_DATE @@ -84,7 +85,7 @@ BEGIN MENUITEM "&Zawijanie wierszy", CMD_WRAP MENUITEM "Czci&onka...", CMD_FONT END - POPUP "P&odgld" + POPUP "P&odgląd" BEGIN MENUITEM "Pasek &stanu", CMD_STATUSBAR END @@ -106,7 +107,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" CAPTION "Ustawienia strony" BEGIN -LTEXT "&Nagwek:", 0x140, 10, 07, 40, 15 +LTEXT "&Nagłówek:", 0x140, 10, 07, 40, 15 EDITTEXT 0x141, 60, 05,110, 12, WS_BORDER | WS_TABSTOP LTEXT "&Stopka:", 0x142, 10, 24, 40, 15 EDITTEXT 0x143, 60, 22,110, 12, WS_BORDER | WS_TABSTOP @@ -114,7 +115,7 @@ EDITTEXT 0x143, 60, 22,110, 12, WS_BORDER | WS_TAB GROUPBOX "&Marginesy:", 0x144, 10, 43,160, 45 LTEXT "&Lewy:", 0x145, 20, 55, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_LEFTVALUE,*/ 0x147, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT "&Grny:", 0x148, 20, 73, 30, 10, WS_CHILD +LTEXT "&Górny:", 0x148, 20, 73, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_TOPVALUE,*/ 0x14A, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP LTEXT "P&rawy:", 0x14B, 100, 55, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_RIGHTVALUE,*/ 0x14D, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP @@ -136,14 +137,14 @@ BEGIN COMBOBOX ID_ENCODING,54,0,156,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Kodowanie:",0x155,5,2,41,12 COMBOBOX ID_EOLN,54,18,156,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP -LTEXT "Linie koca:",0x156,5,20,41,12 +LTEXT "Linie końca:",0x156,5,20,41,12 END /* Dialog 'Go To' */ DIALOG_GOTO DIALOGEX 0,0,165,50 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Id do linii" +CAPTION "Idź do linii" BEGIN EDITTEXT ID_LINENUMBER,54,10,106,12,WS_CHILD | WS_BORDER | WS_TABSTOP LTEXT "Numer linii:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER @@ -168,7 +169,7 @@ END STRINGTABLE DISCARDABLE BEGIN - STRING_LICENSE, "Niniejszy program jest wolnym oprogramowaniem; moesz go rozprowadza dalej i/lub modyfikowa na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundacj Wolnego Oprogramowania - wedug wersji 2 tej Licencji lub (wedug Twojego wyboru) ktrej z pniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadziej, i bdzie on uyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domylnej gwarancji PRZYDATNOCI HANDLOWEJ albo PRZYDATNOCI DO OKRELONYCH ZASTOSOWA. W celu uzyskania bliszych informacji signij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnoci wraz z niniejszym programem otrzymae te egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + STRING_LICENSE, "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE @@ -181,27 +182,22 @@ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_NOTEPAD, "Notatnik" -STRING_ERROR, "BD" -STRING_WARNING, "OSTRZEENIE" +STRING_ERROR, "Błąd" +STRING_WARNING, "OSTRZEŻENIE" STRING_INFO, "Informacja" -STRING_UNTITLED, "(bez tytuu)" +STRING_UNTITLED, "(bez tytułu)" STRING_ALL_FILES, "Wszystkie pliki (*.*)" STRING_TEXT_FILES_TXT, "Pliki tekstowe (*.txt)" -STRING_TOOLARGE, "Plik '%s' jest za duy dla Notatnika.\n \ -Prosz uy innego edytora." -STRING_NOTEXT, "Nie wprowadzie adnego tekstu. \ -\nProsz co wpisa i sprbowa ponownie." -STRING_DOESNOTEXIST, "Plik '%s' nie istnieje\n\n \ -Czy chcesz utworzy nowy plik?" -STRING_NOTSAVED, "Plik '%s'\nzosta zmodyfikowany\n\n \ -Czy chcesz zachowa zmiany?" -STRING_NOTFOUND, "Nie mona odnale '%s'." -STRING_OUT_OF_MEMORY, "Za mao pamici do wykonania tego zadania.\n \ -Zamknij jedn lub wicej aplikacji, by zwikszy ilo wolnej pamici." -STRING_CANNOTFIND "Nie mona odnale '%s'" +STRING_TOOLARGE, "Plik '%s' jest za duży dla Notatnika.\n \Proszę użyć innego edytora." +STRING_NOTEXT, "Nie wprowadziłeś żadnego tekstu.\n \Proszę coś wpisać i spróbować ponownie." +STRING_DOESNOTEXIST, "Plik '%s' nie istnieje\n\n \Czy chcesz utworzyć nowy plik?" +STRING_NOTSAVED, "Plik '%s'\nzostał zmodyfikowany\n\n \Czy chcesz zachować zmiany?" +STRING_NOTFOUND, "Nie można odnaleźć '%s'." +STRING_OUT_OF_MEMORY, "Za mało pamięci do wykonania tego zadania.\n \Zamknij jedną lub więcej aplikacji, by zwiększyć ilość wolnej pamięci." +STRING_CANNOTFIND "Nie można odnaleźć '%s'" STRING_ANSI, "ANSI" STRING_UNICODE, "Unicode" STRING_UNICODE_BE, "Unicode (big endian)" diff --git a/base/applications/notepad/lang/ro-RO.rc b/base/applications/notepad/lang/ro-RO.rc index d48e9c43cd8..24eebbcd2a0 100644 --- a/base/applications/notepad/lang/ro-RO.rc +++ b/base/applications/notepad/lang/ro-RO.rc @@ -20,8 +20,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - ID_ACCEL ACCELERATORS BEGIN "^A", CMD_SELECT_ALL @@ -204,5 +202,3 @@ STRING_LF, "Unix" STRING_CR, "Mac" STRING_LINE_COLUMN, "Linie %d, coloană %d" END - -#pragma code_page(default) diff --git a/base/applications/notepad/lang/ru-RU.rc b/base/applications/notepad/lang/ru-RU.rc index c5b3b0becfe..16d3ae19393 100644 --- a/base/applications/notepad/lang/ru-RU.rc +++ b/base/applications/notepad/lang/ru-RU.rc @@ -40,53 +40,53 @@ END MAIN_MENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&\tCtrl+N", CMD_NEW - MENUITEM "&\tCtrl+O", CMD_OPEN - MENUITEM "&\tCtrl+S", CMD_SAVE - MENUITEM " &...", CMD_SAVE_AS + MENUITEM "Созд&ать\tCtrl+N", CMD_NEW + MENUITEM "&Открыть\tCtrl+O", CMD_OPEN + MENUITEM "&Сохранить\tCtrl+S", CMD_SAVE + MENUITEM "Сохранить &как...", CMD_SAVE_AS MENUITEM SEPARATOR - MENUITEM "& ...", CMD_PAGE_SETUP - MENUITEM "&\tCtrl+P", CMD_PRINT - MENUITEM "& ...", CMD_PRINTER_SETUP + MENUITEM "Пара&метры страницы...", CMD_PAGE_SETUP + MENUITEM "&Печатать\tCtrl+P", CMD_PRINT + MENUITEM "&Настройка принтера...", CMD_PRINTER_SETUP MENUITEM SEPARATOR - MENUITEM "&", CMD_EXIT + MENUITEM "В&ыход", CMD_EXIT END - POPUP "&" + POPUP "&Правка" BEGIN - MENUITEM "&\tCtrl+Z", CMD_UNDO + MENUITEM "&Отменить\tCtrl+Z", CMD_UNDO MENUITEM SEPARATOR - MENUITEM "&\tCtrl+X", CMD_CUT - MENUITEM "&\tCtrl+C", CMD_COPY - MENUITEM "&\tCtrl+V", CMD_PASTE - MENUITEM "&\tDel", CMD_DELETE + MENUITEM "&Вырезать\tCtrl+X", CMD_CUT + MENUITEM "&Копировать\tCtrl+C", CMD_COPY + MENUITEM "Вст&авить\tCtrl+V", CMD_PASTE + MENUITEM "&Удалить\tDel", CMD_DELETE MENUITEM SEPARATOR - MENUITEM "&", CMD_SEARCH - MENUITEM " &\tF3", CMD_SEARCH_NEXT - MENUITEM "\tCtrl+H", CMD_REPLACE - MENUITEM " ...\tCtrl+G", CMD_GOTO + MENUITEM "&Найти", CMD_SEARCH + MENUITEM "Найти &далее\tF3", CMD_SEARCH_NEXT + MENUITEM "Заменить\tCtrl+H", CMD_REPLACE + MENUITEM "Перейти к...\tCtrl+G", CMD_GOTO MENUITEM SEPARATOR - MENUITEM " &", CMD_SELECT_ALL - MENUITEM "& \tF5", CMD_TIME_DATE + MENUITEM "Выделить в&се", CMD_SELECT_ALL + MENUITEM "Врем&я и дата\tF5", CMD_TIME_DATE END - POPUP "&" + POPUP "Фо&рмат" BEGIN - MENUITEM "& ", CMD_WRAP - MENUITEM "&...", CMD_FONT + MENUITEM "&Перенос по словам", CMD_WRAP + MENUITEM "&Шрифт...", CMD_FONT END - POPUP "&" + POPUP "&Вид" BEGIN - MENUITEM " &", CMD_STATUSBAR + MENUITEM "Строка &состояния", CMD_STATUSBAR END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "&", CMD_HELP_CONTENTS - MENUITEM "&...", CMD_HELP_SEARCH - MENUITEM "& ", CMD_HELP_ON_HELP + MENUITEM "&Содержание", CMD_HELP_CONTENTS + MENUITEM "&Поиск...", CMD_HELP_SEARCH + MENUITEM "&Использование справки", CMD_HELP_ON_HELP MENUITEM SEPARATOR - MENUITEM "& ", CMD_ABOUT - MENUITEM "&...", CMD_ABOUT_WINE + MENUITEM "&О программе", CMD_ABOUT + MENUITEM "&Сведения...", CMD_ABOUT_WINE END END @@ -95,26 +95,26 @@ END DIALOG_PAGESETUP DIALOGEX 0, 0, 225, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Параметры страницы" BEGIN -LTEXT "& :", 0x140, 10, 07, 40, 15 +LTEXT "В&ерхний колонтитул:", 0x140, 10, 07, 40, 15 EDITTEXT 0x141, 60, 05,110, 12, WS_BORDER | WS_TABSTOP -LTEXT "& :", 0x142, 10, 24, 40, 15 +LTEXT "Н&ижний колонтитул:", 0x142, 10, 24, 40, 15 EDITTEXT 0x143, 60, 22,110, 12, WS_BORDER | WS_TABSTOP -GROUPBOX " ():", 0x144, 10, 43,160, 45 -LTEXT "&:", 0x145, 20, 55, 30, 10, WS_CHILD +GROUPBOX "Поля (мм):", 0x144, 10, 43,160, 45 +LTEXT "&Левое:", 0x145, 20, 55, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_LEFTVALUE,*/ 0x147, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT "&:", 0x148, 20, 73, 30, 10, WS_CHILD +LTEXT "&Верхнее:", 0x148, 20, 73, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_TOPVALUE,*/ 0x14A, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT "&:", 0x14B, 100, 55, 30, 10, WS_CHILD +LTEXT "&Правое:", 0x14B, 100, 55, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_RIGHTVALUE,*/ 0x14D, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT "&:", 0x14E,100, 73, 30, 10, WS_CHILD +LTEXT "&Нижнее:", 0x14E,100, 73, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ 0x150, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 180, 3, 40, 15, WS_TABSTOP -PUSHBUTTON "", IDCANCEL, 180, 21, 40, 15, WS_TABSTOP -PUSHBUTTON "&", IDHELP, 180, 39, 40, 15, WS_TABSTOP +PUSHBUTTON "Отмена", IDCANCEL, 180, 21, 40, 15, WS_TABSTOP +PUSHBUTTON "&Справка", IDHELP, 180, 39, 40, 15, WS_TABSTOP END /* Dialog `Encoding' */ @@ -123,12 +123,12 @@ DIALOG_ENCODING DIALOGEX 0, 0, 256, 44 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Кодировка символов" BEGIN COMBOBOX ID_ENCODING,54,0,156,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP -LTEXT ":",0x155,5,2,41,12 +LTEXT "Кодировка:",0x155,5,2,41,12 COMBOBOX ID_EOLN,54,18,156,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP -LTEXT ":",0x156,5,20,41,12 +LTEXT "Вариант:",0x156,5,20,41,12 END /* Dialog 'Go To' */ @@ -136,24 +136,24 @@ END DIALOG_GOTO DIALOGEX 0,0,165,50 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Перейти к строке" BEGIN EDITTEXT ID_LINENUMBER,54,10,106,12,WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT " :",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER +LTEXT "Номер строки:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP -PUSHBUTTON "", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP +PUSHBUTTON "Отмена", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "О программе Блокнот ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ReactOS v1.0\r\nCopyright 1997,98 Marcel Baur \r\nCopyright 2000 Mike McCormack \r\nCopyright 2002 Sylvain Petreolle \r\nCopyright 2002 Andriy Palamarchuk\r\n ", + CONTROL "Блокнот ReactOS v1.0\r\nCopyright 1997,98 Marcel Baur \r\nCopyright 2000 Mike McCormack \r\nCopyright 2002 Sylvain Petreolle \r\nCopyright 2002 Andriy Palamarchuk\r\n ", -1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,46,7,232,39 CONTROL " ", -1,"Static",0x50000000,8,48,272,11 - DEFPUSHBUTTON "",IDOK,114,149,44,15,WS_GROUP + DEFPUSHBUTTON "Закрыть",IDOK,114,149,44,15,WS_GROUP ICON IDI_NPICON,-1,12,9,20,30 EDITTEXT IDC_LICENSE,8,64,272,81,ES_MULTILINE | ES_READONLY | WS_VSCROLL @@ -161,46 +161,46 @@ END STRINGTABLE DISCARDABLE BEGIN - STRING_LICENSE, " ; () , GNU, ; 2 , ( ) , .\r\n\r\n , , - , . GNU.\r\n\r\n GNU, , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + STRING_LICENSE, "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ -STRING_PAGESETUP_FOOTERVALUE, " &s" /* FIXME */ -STRING_PAGESETUP_LEFTVALUE, "20 " /* FIXME */ -STRING_PAGESETUP_RIGHTVALUE, "20 " /* FIXME */ -STRING_PAGESETUP_TOPVALUE, "25 " /* FIXME */ -STRING_PAGESETUP_BOTTOMVALUE, "25 " /* FIXME */ +STRING_PAGESETUP_FOOTERVALUE, "Страница &s" /* FIXME */ +STRING_PAGESETUP_LEFTVALUE, "20 мм" /* FIXME */ +STRING_PAGESETUP_RIGHTVALUE, "20 мм" /* FIXME */ +STRING_PAGESETUP_TOPVALUE, "25 мм" /* FIXME */ +STRING_PAGESETUP_BOTTOMVALUE, "25 мм" /* FIXME */ -STRING_NOTEPAD, "" -STRING_ERROR, "" -STRING_WARNING, "" -STRING_INFO, "" +STRING_NOTEPAD, "Блокнот" +STRING_ERROR, "ОШИБКА" +STRING_WARNING, "ВНИМАНИЕ" +STRING_INFO, "Информация" -STRING_UNTITLED, "( )" +STRING_UNTITLED, "(без заголовка)" -STRING_ALL_FILES, " (*.*)" -STRING_TEXT_FILES_TXT, " (*.txt)" +STRING_ALL_FILES, "Все файлы (*.*)" +STRING_TEXT_FILES_TXT, "Текстовые файлы (*.txt)" -STRING_TOOLARGE, " '%s' .\n \ - ." -STRING_NOTEXT, " . \ -\n - ." -STRING_DOESNOTEXIST, " '%s'\n \n\n \ - ?" -STRING_NOTSAVED, " '%s'\n \n\n \ - ?" -STRING_NOTFOUND, "'%s' ." -STRING_OUT_OF_MEMORY, " . \ -\n ." -STRING_CANNOTFIND " '%s'" +STRING_TOOLARGE, "Файл '%s' слишком большой для блокнота.\n \ +Используйте другой редактор." +STRING_NOTEXT, "Вы не ввели никакого текста. \ +\nВведите что-нибудь и попробуйте еще." +STRING_DOESNOTEXIST, "Файл '%s'\nне существует\n\n \ +Хотите создать новый файл?" +STRING_NOTSAVED, "Файл '%s'\nбыл изменен\n\n \ +Хотите сохранить изменения?" +STRING_NOTFOUND, "'%s' не найден." +STRING_OUT_OF_MEMORY, "Недостаточно памяти для завершения этой операции. \ +\nЗакройте одно или несколько приложений и повторите попытку." +STRING_CANNOTFIND "Невозможно найти '%s'" STRING_ANSI, "ANSI" -STRING_UNICODE, "" -STRING_UNICODE_BE, " (big endian)" +STRING_UNICODE, "Юникод" +STRING_UNICODE_BE, "Юникод (big endian)" STRING_UTF8, "UTF-8" STRING_CRLF, "Windows" STRING_LF, "Unix" -STRING_CR, "" -STRING_LINE_COLUMN, " %d, %d" +STRING_CR, "Макинтош" +STRING_LINE_COLUMN, "Строка %d, столбец %d" END diff --git a/base/applications/notepad/lang/uk-UA.rc b/base/applications/notepad/lang/uk-UA.rc index 923063731c2..8a7879bb934 100644 --- a/base/applications/notepad/lang/uk-UA.rc +++ b/base/applications/notepad/lang/uk-UA.rc @@ -41,53 +41,53 @@ END MAIN_MENU MENU BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&\tCtrl+N", CMD_NEW - MENUITEM "&³...\tCtrl+O", CMD_OPEN - MENUITEM "&\tCtrl+S", CMD_SAVE - MENUITEM " &...", CMD_SAVE_AS + MENUITEM "&Створити\tCtrl+N", CMD_NEW + MENUITEM "&Відкрити...\tCtrl+O", CMD_OPEN + MENUITEM "&Зберегти\tCtrl+S", CMD_SAVE + MENUITEM "Зберегти &як...", CMD_SAVE_AS MENUITEM SEPARATOR - MENUITEM "& ...", CMD_PAGE_SETUP - MENUITEM "&\tCtrl+P", CMD_PRINT - MENUITEM " &...", CMD_PRINTER_SETUP + MENUITEM "Пара&метри сторінки...", CMD_PAGE_SETUP + MENUITEM "Д&рук\tCtrl+P", CMD_PRINT + MENUITEM "Налаштування &принтера...", CMD_PRINTER_SETUP MENUITEM SEPARATOR - MENUITEM "&", CMD_EXIT + MENUITEM "В&ихід", CMD_EXIT END - POPUP "&" + POPUP "Пр&авка" BEGIN - MENUITEM "&\tCtrl+Z", CMD_UNDO + MENUITEM "С&касувати\tCtrl+Z", CMD_UNDO MENUITEM SEPARATOR - MENUITEM "&\tCtrl+X", CMD_CUT - MENUITEM "&\tCtrl+C", CMD_COPY - MENUITEM "&\tCtrl+V", CMD_PASTE - MENUITEM "&\tDel", CMD_DELETE + MENUITEM "Вир&ізати\tCtrl+X", CMD_CUT + MENUITEM "Копі&ювати\tCtrl+C", CMD_COPY + MENUITEM "Вс&тавити\tCtrl+V", CMD_PASTE + MENUITEM "Ви&далити\tDel", CMD_DELETE MENUITEM SEPARATOR - MENUITEM "&...\tCtrl+F", CMD_SEARCH - MENUITEM "& \tF3", CMD_SEARCH_NEXT - MENUITEM "&\tCtrl+H", CMD_REPLACE - MENUITEM "&...\tCtrl+G", CMD_GOTO + MENUITEM "З&найти...\tCtrl+F", CMD_SEARCH + MENUITEM "Зна&йти далі\tF3", CMD_SEARCH_NEXT + MENUITEM "Зам&інити\tCtrl+H", CMD_REPLACE + MENUITEM "П&ерейти...\tCtrl+G", CMD_GOTO MENUITEM SEPARATOR - MENUITEM "& \tCtrl+A", CMD_SELECT_ALL - MENUITEM " &\tF5", CMD_TIME_DATE + MENUITEM "Виді&лити все\tCtrl+A", CMD_SELECT_ALL + MENUITEM "Дата й &час\tF5", CMD_TIME_DATE END - POPUP "&" + POPUP "Ф&ормат" BEGIN - MENUITEM " &", CMD_WRAP - MENUITEM "&...", CMD_FONT + MENUITEM "Перенос по слова&х", CMD_WRAP + MENUITEM "&Шрифт...", CMD_FONT END - POPUP "&" + POPUP "Ви&гляд" BEGIN - MENUITEM "& &", CMD_STATUSBAR + MENUITEM "Ряд&ок стан&у", CMD_STATUSBAR END - POPUP "&" + POPUP "Дов&ідка" BEGIN - MENUITEM "&", CMD_HELP_CONTENTS - MENUITEM "&...", CMD_HELP_SEARCH - MENUITEM "& ", CMD_HELP_ON_HELP + MENUITEM "Змі&ст", CMD_HELP_CONTENTS + MENUITEM "Пош&ук...", CMD_HELP_SEARCH + MENUITEM "Використ&ання довідки", CMD_HELP_ON_HELP MENUITEM SEPARATOR - MENUITEM "&", CMD_ABOUT - MENUITEM " &", CMD_ABOUT_WINE + MENUITEM "&Про", CMD_ABOUT + MENUITEM "Про програм&у", CMD_ABOUT_WINE END END @@ -96,26 +96,26 @@ END DIALOG_PAGESETUP DIALOGEX 0, 0, 225, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Параметри сторінки" BEGIN -LTEXT "& :", 0x140, 10, 07, 40, 15 +LTEXT "В&ерхній колонтитул:", 0x140, 10, 07, 40, 15 EDITTEXT 0x141, 60, 05,110, 12, WS_BORDER | WS_TABSTOP -LTEXT "& :", 0x142, 10, 24, 40, 15 +LTEXT "Н&ижній колонтитул:", 0x142, 10, 24, 40, 15 EDITTEXT 0x143, 60, 22,110, 12, WS_BORDER | WS_TABSTOP -GROUPBOX "", 0x144, 10, 43,160, 45 -LTEXT "&˳:", 0x145, 20, 55, 30, 10, WS_CHILD +GROUPBOX "Поля", 0x144, 10, 43,160, 45 +LTEXT "&Ліве:", 0x145, 20, 55, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_LEFTVALUE,*/ 0x147, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT "&:", 0x148, 20, 73, 30, 10, WS_CHILD +LTEXT "&Верхнє:", 0x148, 20, 73, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_TOPVALUE,*/ 0x14A, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT "&:", 0x14B, 100, 55, 30, 10, WS_CHILD +LTEXT "&Праве:", 0x14B, 100, 55, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_RIGHTVALUE,*/ 0x14D, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT "&:", 0x14E,100, 73, 30, 10, WS_CHILD +LTEXT "&Нижнє:", 0x14E,100, 73, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ 0x150, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP -DEFPUSHBUTTON "", IDOK, 180, 3, 40, 15, WS_TABSTOP -PUSHBUTTON "ͳ", IDCANCEL, 180, 21, 40, 15, WS_TABSTOP -PUSHBUTTON "&", IDHELP, 180, 39, 40, 15, WS_TABSTOP +DEFPUSHBUTTON "Так", IDOK, 180, 3, 40, 15, WS_TABSTOP +PUSHBUTTON "Ні", IDCANCEL, 180, 21, 40, 15, WS_TABSTOP +PUSHBUTTON "&Довідка", IDHELP, 180, 39, 40, 15, WS_TABSTOP END /* Dialog `Encoding' */ @@ -123,36 +123,36 @@ DIALOG_ENCODING DIALOGEX 0, 0, 256, 44 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "" +CAPTION "Кодування" BEGIN COMBOBOX ID_ENCODING,54,0,156,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP -LTEXT ":",0x155,5,2,41,12 +LTEXT "Кодування:",0x155,5,2,41,12 COMBOBOX ID_EOLN,54,18,156,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP -LTEXT "ʳ :",0x156,5,20,47,12 +LTEXT "Кінець рядка:",0x156,5,20,47,12 END /* Dialog 'Go To' */ DIALOG_GOTO DIALOGEX 0,0,165,50 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Перехід до рядка" BEGIN EDITTEXT ID_LINENUMBER,54,10,106,12,WS_CHILD | WS_BORDER | WS_TABSTOP -LTEXT " :",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER +LTEXT "Номер рядка:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP -PUSHBUTTON "", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP +PUSHBUTTON "Скасувати", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Про Блокнот ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ReactOS v1.0\r\nCopyright 1997,98 Marcel Baur \r\nCopyright 2000 Mike McCormack \r\nCopyright 2002 Sylvain Petreolle \r\nCopyright 2002 Andriy Palamarchuk\r\n ", + CONTROL "Блокнот ReactOS v1.0\r\nCopyright 1997,98 Marcel Baur \r\nCopyright 2000 Mike McCormack \r\nCopyright 2002 Sylvain Petreolle \r\nCopyright 2002 Andriy Palamarchuk\r\n ", -1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,46,7,232,39 CONTROL " ", -1,"Static",0x50000000,8,48,272,11 - DEFPUSHBUTTON "",IDOK,114,149,44,15,WS_GROUP + DEFPUSHBUTTON "Закрити",IDOK,114,149,44,15,WS_GROUP ICON IDI_NPICON,-1,12,9,20,30 EDITTEXT IDC_LICENSE,8,64,272,81,ES_MULTILINE | ES_READONLY | WS_VSCROLL @@ -160,46 +160,46 @@ END STRINGTABLE DISCARDABLE BEGIN - STRING_LICENSE, " ; , ³ GNU, ; 2 , - , .\r\n\r\n 䳿 , , - Ҳ, Ҳ Ҳ Ҳ . ³ GNU.\r\n\r\n ³ GNU. , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + STRING_LICENSE, "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END STRINGTABLE DISCARDABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ -STRING_PAGESETUP_FOOTERVALUE, " &s" /* FIXME */ -STRING_PAGESETUP_LEFTVALUE, "20 " /* FIXME */ -STRING_PAGESETUP_RIGHTVALUE, "20 " /* FIXME */ -STRING_PAGESETUP_TOPVALUE, "25 " /* FIXME */ -STRING_PAGESETUP_BOTTOMVALUE, "25 " /* FIXME */ +STRING_PAGESETUP_FOOTERVALUE, "Сторінка &s" /* FIXME */ +STRING_PAGESETUP_LEFTVALUE, "20 мм" /* FIXME */ +STRING_PAGESETUP_RIGHTVALUE, "20 мм" /* FIXME */ +STRING_PAGESETUP_TOPVALUE, "25 мм" /* FIXME */ +STRING_PAGESETUP_BOTTOMVALUE, "25 мм" /* FIXME */ -STRING_NOTEPAD, "" -STRING_ERROR, "" -STRING_WARNING, "" -STRING_INFO, "" +STRING_NOTEPAD, "Блокнот" +STRING_ERROR, "ПОМИЛКА" +STRING_WARNING, "УВАГА" +STRING_INFO, "Інформація" -STRING_UNTITLED, "( )" +STRING_UNTITLED, "(без заголовка)" -STRING_ALL_FILES, " (*.*)" -STRING_TEXT_FILES_TXT, " (*.txt)" +STRING_ALL_FILES, "Усі файли (*.*)" +STRING_TEXT_FILES_TXT, "Текстові файли (*.txt)" -STRING_TOOLARGE, " '%s' .\n \ - ." -STRING_NOTEXT, " . \ -\n - " -STRING_DOESNOTEXIST, " '%s'\n \n\n \ - ?" -STRING_NOTSAVED, " '%s'\n \n\n \ - ?" +STRING_TOOLARGE, "Файл '%s' завеликий для блокнота.\n \ +Будь ласка використайте інший редактор." +STRING_NOTEXT, "Ви не ввели ніякого тексту. \ +\nБудь ласка введіть що-небудь і спробуйте ще раз" +STRING_DOESNOTEXIST, "Файл '%s'\nне існує\n\n \ +Хочете створити новий файл ?" +STRING_NOTSAVED, "Файл '%s'\nбув змінений\n\n \ +Хочете зберегти зміни ?" STRING_NOTFOUND, "'%s' can not be found." -STRING_OUT_OF_MEMORY, " ' .\ -\n ." -STRING_CANNOTFIND " '%s'" +STRING_OUT_OF_MEMORY, "Недостатньо пам'яті для виконання операції.\ +\nЗакрийте один або декілька додатків і повторіть спробу." +STRING_CANNOTFIND "Не можу знайти '%s'" STRING_ANSI, "ANSI" -STRING_UNICODE, "" -STRING_UNICODE_BE, " (big endian)" +STRING_UNICODE, "Юнікод" +STRING_UNICODE_BE, "Юнікод (big endian)" STRING_UTF8, "UTF-8" STRING_CRLF, "Windows" STRING_LF, "Unix" STRING_CR, "Mac" -STRING_LINE_COLUMN, " %d, %d" +STRING_LINE_COLUMN, "Рядок %d, стовпчик %d" END diff --git a/base/applications/notepad/rsrc.rc b/base/applications/notepad/rsrc.rc index d33e548317b..0e8bcdbb8bd 100644 --- a/base/applications/notepad/rsrc.rc +++ b/base/applications/notepad/rsrc.rc @@ -45,20 +45,23 @@ IDI_NPICON ICON "res/notepad.ico" #include "lang/fi-FI.rc" #include "lang/fr-FR.rc" #include "lang/hu-HU.rc" -#include "lang/hy-AM.rc" #include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-PT.rc" -#include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sl-SI.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/hy-AM.rc" +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/rapps/CMakeLists.txt b/base/applications/rapps/CMakeLists.txt index e3a053e5519..aeeb6815201 100644 --- a/base/applications/rapps/CMakeLists.txt +++ b/base/applications/rapps/CMakeLists.txt @@ -29,7 +29,7 @@ add_executable(rapps ${SOURCE}) set_module_type(rapps win32gui) target_link_libraries(rapps uuid) -add_importlibs(rapps advapi32 comctl32 gdi32 urlmon user32 shell32 shlwapi kernel32 msvcrt ntdll) +add_importlibs(rapps advapi32 comctl32 gdi32 urlmon user32 shell32 shlwapi msvcrt kernel32 ntdll) add_dependencies(rapps rappsmsg) add_message_headers(rappsmsg.mc) add_cd_file(TARGET rapps DESTINATION reactos/system32 FOR all) diff --git a/base/applications/rapps/lang/pl-PL.rc b/base/applications/rapps/lang/pl-PL.rc index 7e88fce4959..67d908d67e5 100644 --- a/base/applications/rapps/lang/pl-PL.rc +++ b/base/applications/rapps/lang/pl-PL.rc @@ -1,5 +1,10 @@ -// * translated by Caemyr - Olaf Siejka (Aug, 2009) -// * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) +/* + * translated by Caemyr - Olaf Siejka (Aug, 2009) + * Use ReactOS forum PM or IRC to contact me + * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + */ #pragma code_page(65001) // UTF-8 diff --git a/base/applications/rapps/lang/sv-SE.rc b/base/applications/rapps/lang/sv-SE.rc index 9f1fed1529d..3681f7ac088 100644 --- a/base/applications/rapps/lang/sv-SE.rc +++ b/base/applications/rapps/lang/sv-SE.rc @@ -5,8 +5,6 @@ * Translation: Jaix Bly */ -#pragma code_page(65001) // UTF-8 - LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL IDR_MAINMENU MENU @@ -23,7 +21,7 @@ BEGIN MENUITEM "&Avinstallera",ID_UNINSTALL MENUITEM "&Ändra", ID_MODIFY MENUITEM SEPARATOR - MENUITEM "&Ta bort frĺn Registret", ID_REGREMOVE + MENUITEM "&Ta bort från Registret", ID_REGREMOVE MENUITEM SEPARATOR MENUITEM "&Uppdatera", ID_REFRESH END @@ -51,7 +49,7 @@ BEGIN MENUITEM "&Avinstallera", ID_UNINSTALL MENUITEM "&Ändra", ID_MODIFY MENUITEM SEPARATOR - MENUITEM "&Ta bort frĺn Registret", ID_REGREMOVE + MENUITEM "&Ta bort från Registret", ID_REGREMOVE MENUITEM SEPARATOR MENUITEM "&Uppdatera", ID_REFRESH END @@ -85,7 +83,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35 - AUTORADIOBUTTON "&Installera frĺn disk (CD or DVD)", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP + AUTORADIOBUTTON "&Installera från disk (CD or DVD)", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP AUTORADIOBUTTON "&Ladda ner och installera", IDC_DOWNLOAD_INSTALL, 10, 59, 197, 11, NOT WS_TABSTOP PUSHBUTTON "OK", IDOK, 86, 78, 60, 14 @@ -195,8 +193,8 @@ BEGIN IDS_APPLICATIONS "Program" IDS_CHOOSE_FOLDER_TEXT "Välj en mapp som kommer att användas för nerladdning av program:" IDS_CHOOSE_FOLDER_ERROR "Du har specificrat en ej existerande mapp! Vill du skapa den?" - IDS_USER_NOT_ADMIN "Du mĺste vara administratör för att starta ""ReactOS programhanterare""!" - IDS_APP_REG_REMOVE "Är du säker pĺ att du vill ta bort data det installerade programmets data frĺn registret?" + IDS_USER_NOT_ADMIN "Du måste vara administratör för att starta ""ReactOS programhanterare""!" + IDS_APP_REG_REMOVE "Är du säker på att du vill ta bort data det installerade programmets data från registret?" IDS_INFORMATION "Information" - IDS_UNABLE_TO_REMOVE "Det gick ej att ta bort programmets data frĺn registret!" + IDS_UNABLE_TO_REMOVE "Det gick ej att ta bort programmets data från registret!" END diff --git a/base/applications/rapps/rapps/firefox4.txt b/base/applications/rapps/rapps/firefox4.txt new file mode 100644 index 00000000000..650153b0176 --- /dev/null +++ b/base/applications/rapps/rapps/firefox4.txt @@ -0,0 +1,60 @@ +; UTF-8 + +[Section] +Name = Mozilla Firefox 4 +Version = 4.0.1 +Licence = MPL/GPL/LGPL +Description = The most popular and one of the best free Web Browsers out there. +Size = 11.9M +Category = 5 +URLSite = http://www.mozilla.com/en-US/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/en-US/Firefox%20Setup%204.0.1.exe +CDPath = none + +[Section.0407] +Description = Der populärste und einer der besten freien Webbrowser. +Size = 11.7M +URLSite = http://www.mozilla-europe.org/de/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/de/Firefox%20Setup%204.0.1.exe + +[Section.040a] +Description = El más popular y uno de los mejores navegadores web gratuitos que hay. +Size = 11.9M +URLSite = http://www.mozilla-europe.org/es/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/es-ES/Firefox%20Setup%204.0.1.exe + +[Section.040c] +Description = Le navigateur web gratuit le plus populaire et l'un des meilleurs. +Size = 12.0M +URLSite = http://www.mozilla-europe.org/fr/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/fr/Firefox%20Setup%204.0.1.exe + +[Section.0414] +Description = Mest populære og best også gratis nettleserene der ute. +Size = 11.7M +URLSite = http://www.mozilla-europe.org/no/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/nb-NO/Firefox%20Setup%204.0.1.exe + +[Section.0415] +Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych. +Size = 12.6M +URLSite = http://www.mozilla-europe.org/pl/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/pl/Firefox%20Setup%204.0.1.exe + +[Section.0419] +Description = Один из самых популярных и лучших бесплатных браузеров. +Size = 12.2M +URLSite = http://www.mozilla-europe.org/ru/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/ru/Firefox%20Setup%204.0.1.exe + +[Section.041b] +Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov. +Size = 12.4 MB +URLSite = http://www.mozilla-europe.org/sk/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/sk/Firefox%20Setup%204.0.1.exe + +[Section.0422] +Description = Найпопулярніший та один з кращих безплатних веб-браузерів. +Size = 12.1M +URLSite = http://www.mozilla-europe.org/uk/ +URLDownload = http://mozilla.cdn.leaseweb.com/firefox/releases/4.0.1/win32/uk/Firefox%20Setup%204.0.1.exe diff --git a/base/applications/rapps/rsrc.rc b/base/applications/rapps/rsrc.rc index bd235c70f2f..cd56fb7ae25 100644 --- a/base/applications/rapps/rsrc.rc +++ b/base/applications/rapps/rsrc.rc @@ -1,3 +1,4 @@ +#pragma code_page(65001) #include "lang/bg-BG.rc" #include "lang/cs-CZ.rc" #include "lang/de-DE.rc" diff --git a/base/applications/rapps/winmain.c b/base/applications/rapps/winmain.c index 599665f8b75..7a1f228f9c1 100644 --- a/base/applications/rapps/winmain.c +++ b/base/applications/rapps/winmain.c @@ -794,7 +794,6 @@ wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nSh WndClass.lpszClassName = szWindowClass; WndClass.lpfnWndProc = MainWindowProc; WndClass.hInstance = hInstance; - WndClass.style = CS_HREDRAW | CS_VREDRAW; WndClass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAIN)); WndClass.hCursor = LoadCursor(NULL, IDC_ARROW); WndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); diff --git a/base/applications/regedit/CMakeLists.txt b/base/applications/regedit/CMakeLists.txt index 4fb1946f698..9b6ae4d6cd8 100644 --- a/base/applications/regedit/CMakeLists.txt +++ b/base/applications/regedit/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - set_unicode() set_rc_compiler() @@ -22,9 +20,7 @@ list(APPEND SOURCE treeview.c regedit.rc) -add_pch(regedit ${CMAKE_CURRENT_SOURCE_DIR}/regedit.h ${SOURCE}) - -add_executable(regedit ${CMAKE_CURRENT_BINARY_DIR}/regedit_regedit.h.gch ${SOURCE}) +add_executable(regedit ${SOURCE}) set_module_type(regedit win32gui) @@ -32,6 +28,8 @@ target_link_libraries(regedit uuid) add_importlibs(regedit user32 gdi32 advapi32 ole32 shell32 comctl32 comdlg32 shlwapi msvcrt kernel32) +add_pch(regedit regedit.h) + #add_subdirectory(clb) add_cd_file(TARGET regedit DESTINATION reactos FOR all) diff --git a/base/applications/regedit/edit.c b/base/applications/regedit/edit.c index ba5e7be4643..cd773455c4d 100644 --- a/base/applications/regedit/edit.c +++ b/base/applications/regedit/edit.c @@ -31,6 +31,8 @@ static const TCHAR* editValueName; static TCHAR* stringValueData; static PVOID binValueData; static DWORD dwordValueData; +static PCM_RESOURCE_LIST resourceValueData; +static INT fullResourceIndex = -1; static DWORD valueDataLen; static EDIT_MODE dwordEditMode = EDIT_MODE_HEX; @@ -429,6 +431,633 @@ INT_PTR CALLBACK modify_binary_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L } +static BOOL CreateResourceColumns(HWND hwnd) +{ + TCHAR szText[80]; + RECT rc; + LV_COLUMN lvC; + HWND hwndLV; + INT width; + + /* Create columns. */ + lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + lvC.pszText = szText; + lvC.fmt = LVCFMT_LEFT; + + hwndLV = GetDlgItem(hwnd, IDC_DMA_LIST); + ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); + GetClientRect(hwndLV, &rc); + + /* Load the column labels from the resource file. */ + lvC.iSubItem = 0; + lvC.cx = (rc.right - rc.left) / 2; + LoadString(hInst, IDS_DMA_CHANNEL, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 1; + lvC.cx = (rc.right - rc.left) - lvC.cx; + LoadString(hInst, IDS_DMA_PORT, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1) + return FALSE; + + + /* Interrupt list */ + hwndLV = GetDlgItem(hwnd, IDC_IRQ_LIST); + ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); + GetClientRect(hwndLV, &rc); + width = (rc.right - rc.left) / 4; + + /* Load the column labels from the resource file. */ + lvC.iSubItem = 0; + lvC.cx = width; + LoadString(hInst, IDS_INTERRUPT_VECTOR, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 1; + LoadString(hInst, IDS_INTERRUPT_LEVEL, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 2; + LoadString(hInst, IDS_INTERRUPT_AFFINITY, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 3; + lvC.cx = (rc.right - rc.left) - 3 * width; + LoadString(hInst, IDS_INTERRUPT_TYPE, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 3, &lvC) == -1) + return FALSE; + + + /* Memory list */ + hwndLV = GetDlgItem(hwnd, IDC_MEMORY_LIST); + ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); + GetClientRect(hwndLV, &rc); + width = (rc.right - rc.left) / 3; + + /* Load the column labels from the resource file. */ + lvC.iSubItem = 0; + lvC.cx = width; + LoadString(hInst, IDS_MEMORY_ADDRESS, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 1; + LoadString(hInst, IDS_MEMORY_LENGTH, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 2; + lvC.cx = (rc.right - rc.left) - 2 * width; + LoadString(hInst, IDS_MEMORY_ACCESS, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1) + return FALSE; + + + /* Port list */ + hwndLV = GetDlgItem(hwnd, IDC_PORT_LIST); + ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); + GetClientRect(hwndLV, &rc); + width = (rc.right - rc.left) / 3; + + /* Load the column labels from the resource file. */ + lvC.iSubItem = 0; + lvC.cx = width; + LoadString(hInst, IDS_PORT_ADDRESS, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 1; + LoadString(hInst, IDS_PORT_LENGTH, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 2; + lvC.cx = (rc.right - rc.left) - 2 * width; + LoadString(hInst, IDS_PORT_ACCESS, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1) + return FALSE; + + /* Device specific list */ + hwndLV = GetDlgItem(hwnd, IDC_DEVICE_LIST); + ListView_SetExtendedListViewStyle(hwndLV, LVS_EX_FULLROWSELECT); + GetClientRect(hwndLV, &rc); + width = (rc.right - rc.left) / 3; + + /* Load the column labels from the resource file. */ + lvC.iSubItem = 0; + lvC.cx = width; + LoadString(hInst, IDS_SPECIFIC_RESERVED1, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 0, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 1; + LoadString(hInst, IDS_SPECIFIC_RESERVED2, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 1, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 2; + lvC.cx = (rc.right - rc.left) - 2 * width; + LoadString(hInst, IDS_SPECIFIC_DATASIZE, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hwndLV, 2, &lvC) == -1) + return FALSE; + + return TRUE; +} + +static VOID +GetInterfaceType(INTERFACE_TYPE InterfaceType, + LPTSTR pBuffer, + DWORD dwLength) +{ +// LPTSTR lpInterfaceType; + + switch (InterfaceType) + { + case InterfaceTypeUndefined: + LoadString(hInst, IDS_BUS_UNDEFINED, pBuffer, dwLength); +// lpInterfaceType = _T("Undefined"); + break; + case Internal: + LoadString(hInst, IDS_BUS_INTERNAL, pBuffer, dwLength); +// lpInterfaceType = _T("Internal"); + break; + case Isa: + LoadString(hInst, IDS_BUS_ISA, pBuffer, dwLength); +// lpInterfaceType = _T("Isa"); + break; + case Eisa: + LoadString(hInst, IDS_BUS_EISA, pBuffer, dwLength); +// lpInterfaceType = _T("Eisa"); + break; + case MicroChannel: + LoadString(hInst, IDS_BUS_MICROCHANNEL, pBuffer, dwLength); +// lpInterfaceType = _T("MicroChannel"); + break; + case TurboChannel: + LoadString(hInst, IDS_BUS_TURBOCHANNEL, pBuffer, dwLength); +// lpInterfaceType = _T("TurboChannel"); + break; + case PCIBus: + LoadString(hInst, IDS_BUS_PCIBUS, pBuffer, dwLength); +// lpInterfaceType = _T("PCIBus"); + break; + case VMEBus: + LoadString(hInst, IDS_BUS_VMEBUS, pBuffer, dwLength); +// lpInterfaceType = _T("VMEBus"); + break; + case NuBus: + LoadString(hInst, IDS_BUS_NUBUS, pBuffer, dwLength); +// lpInterfaceType = _T("NuBus"); + break; + case PCMCIABus: + LoadString(hInst, IDS_BUS_PCMCIABUS, pBuffer, dwLength); +// lpInterfaceType = _T("PCMCIABus"); + break; + case CBus: + LoadString(hInst, IDS_BUS_CBUS, pBuffer, dwLength); +// lpInterfaceType = _T("CBus"); + break; + case MPIBus: + LoadString(hInst, IDS_BUS_MPIBUS, pBuffer, dwLength); +// lpInterfaceType = _T("MPIBus"); + break; + case MPSABus: + LoadString(hInst, IDS_BUS_MPSABUS, pBuffer, dwLength); +// lpInterfaceType = _T("MPSABus"); + break; + case ProcessorInternal: + LoadString(hInst, IDS_BUS_PROCESSORINTERNAL, pBuffer, dwLength); +// lpInterfaceType = _T("ProcessorInternal"); + break; + case InternalPowerBus: + LoadString(hInst, IDS_BUS_INTERNALPOWERBUS, pBuffer, dwLength); +// lpInterfaceType = _T("InternalPowerBus"); + break; + case PNPISABus: + LoadString(hInst, IDS_BUS_PNPISABUS, pBuffer, dwLength); +// lpInterfaceType = _T("PNPISABus"); + break; + case PNPBus: + LoadString(hInst, IDS_BUS_PNPBUS, pBuffer, dwLength); +// lpInterfaceType = _T("PNPBus"); + break; + default: + LoadString(hInst, IDS_BUS_UNKNOWNTYPE, pBuffer, dwLength); +// lpInterfaceType = _T("Unknown interface type"); + break; + } + +// _tcscpy(pBuffer, lpInterfaceType); +} + + +static VOID +ParseResources(HWND hwnd) +{ + PCM_FULL_RESOURCE_DESCRIPTOR pFullDescriptor; + PCM_PARTIAL_RESOURCE_LIST pPartialResourceList; + PCM_PARTIAL_RESOURCE_DESCRIPTOR pDescriptor; + ULONG i; + HWND hwndLV; + + TCHAR buffer[80]; + LVITEM item; + INT iItem; + + pFullDescriptor = &resourceValueData->List[fullResourceIndex]; + pPartialResourceList = &pFullDescriptor->PartialResourceList; + + /* Interface type */ + GetInterfaceType(pFullDescriptor->InterfaceType, buffer, 80); + SetDlgItemText(hwnd, IDC_INTERFACETYPE, buffer); + + /* Busnumber */ + SetDlgItemInt(hwnd, IDC_BUSNUMBER, (UINT)pFullDescriptor->BusNumber, FALSE); + + /* Version */ + SetDlgItemInt(hwnd, IDC_VERSION, (UINT)pPartialResourceList->Version, FALSE); + + /* Revision */ + SetDlgItemInt(hwnd, IDC_REVISION, (UINT)pPartialResourceList->Revision, FALSE); + + for (i = 0; i < pPartialResourceList->Count; i++) + { + pDescriptor = &pPartialResourceList->PartialDescriptors[i]; + + switch (pDescriptor->Type) + { + case CmResourceTypePort: + hwndLV = GetDlgItem(hwnd, IDC_PORT_LIST); + +#ifdef _M_AMD64 + wsprintf(buffer, _T("0x%16I64x"), pDescriptor->u.Port.Start.QuadPart); +#else + wsprintf(buffer, _T("0x%08lx"), pDescriptor->u.Port.Start.u.LowPart); +#endif + + item.mask = LVIF_TEXT | LVIF_PARAM; + item.iItem = 1000; + item.iSubItem = 0; + item.state = 0; + item.stateMask = 0; + item.pszText = buffer; + item.cchTextMax = (int)_tcslen(item.pszText); + item.lParam = (LPARAM)pDescriptor; + + iItem = ListView_InsertItem(hwndLV, &item); + if (iItem != -1) + { + wsprintf(buffer, _T("0x%lx"), pDescriptor->u.Port.Length); + ListView_SetItemText(hwndLV, iItem, 1, buffer); + + if (pDescriptor->Flags & CM_RESOURCE_PORT_IO) + LoadString(hInst, IDS_PORT_PORT_IO, buffer, sizeof(buffer)/sizeof(TCHAR)); + else + LoadString(hInst, IDS_PORT_MEMORY_IO, buffer, sizeof(buffer)/sizeof(TCHAR)); + ListView_SetItemText(hwndLV, iItem, 2, buffer); + } + break; + + case CmResourceTypeInterrupt: + hwndLV = GetDlgItem(hwnd, IDC_IRQ_LIST); + + wsprintf(buffer, _T("%lu"), pDescriptor->u.Interrupt.Vector); + + item.mask = LVIF_TEXT | LVIF_PARAM; + item.iItem = 1000; + item.iSubItem = 0; + item.state = 0; + item.stateMask = 0; + item.pszText = buffer; + item.cchTextMax = (int)_tcslen(item.pszText); + item.lParam = (LPARAM)pDescriptor; + + iItem = ListView_InsertItem(hwndLV, &item); + if (iItem != -1) + { + wsprintf(buffer, _T("%lu"), pDescriptor->u.Interrupt.Level); + ListView_SetItemText(hwndLV, iItem, 1, buffer); + + wsprintf(buffer, _T("0x%08lx"), pDescriptor->u.Interrupt.Affinity); + ListView_SetItemText(hwndLV, iItem, 2, buffer); + + if (pDescriptor->Flags & CM_RESOURCE_INTERRUPT_LATCHED) + LoadString(hInst, IDS_INTERRUPT_EDGE_SENSITIVE, buffer, sizeof(buffer)/sizeof(TCHAR)); + else + LoadString(hInst, IDS_INTERRUPT_LEVEL_SENSITIVE, buffer, sizeof(buffer)/sizeof(TCHAR)); + + ListView_SetItemText(hwndLV, iItem, 3, buffer); + } + break; + + case CmResourceTypeMemory: + hwndLV = GetDlgItem(hwnd, IDC_MEMORY_LIST); + +#ifdef _M_AMD64 + wsprintf(buffer, _T("0x%16I64x"), pDescriptor->u.Memory.Start.QuadPart); +#else + wsprintf(buffer, _T("0x%08lx"), pDescriptor->u.Memory.Start.u.LowPart); +#endif + + item.mask = LVIF_TEXT | LVIF_PARAM; + item.iItem = 1000; + item.iSubItem = 0; + item.state = 0; + item.stateMask = 0; + item.pszText = buffer; + item.cchTextMax = (int)_tcslen(item.pszText); + item.lParam = (LPARAM)pDescriptor; + + iItem = ListView_InsertItem(hwndLV, &item); + if (iItem != -1) + { + wsprintf(buffer, _T("0x%lx"), pDescriptor->u.Memory.Length); + ListView_SetItemText(hwndLV, iItem, 1, buffer); + + switch (pDescriptor->Flags & (CM_RESOURCE_MEMORY_READ_ONLY | CM_RESOURCE_MEMORY_WRITE_ONLY)) + { + case CM_RESOURCE_MEMORY_READ_ONLY: + LoadString(hInst, IDS_MEMORY_READ_ONLY, buffer, sizeof(buffer)/sizeof(TCHAR)); + break; + + case CM_RESOURCE_MEMORY_WRITE_ONLY: + LoadString(hInst, IDS_MEMORY_WRITE_ONLY, buffer, sizeof(buffer)/sizeof(TCHAR)); + break; + + default: + LoadString(hInst, IDS_MEMORY_READ_WRITE, buffer, sizeof(buffer)/sizeof(TCHAR)); + break; + } + + ListView_SetItemText(hwndLV, iItem, 2, buffer); + } + break; + + case CmResourceTypeDma: + hwndLV = GetDlgItem(hwnd, IDC_DMA_LIST); + + wsprintf(buffer, _T("%lu"), pDescriptor->u.Dma.Channel); + + item.mask = LVIF_TEXT | LVIF_PARAM; + item.iItem = 1000; + item.iSubItem = 0; + item.state = 0; + item.stateMask = 0; + item.pszText = buffer; + item.cchTextMax = (int)_tcslen(item.pszText); + item.lParam = (LPARAM)pDescriptor; + + iItem = ListView_InsertItem(hwndLV, &item); + if (iItem != -1) + { + wsprintf(buffer, _T("%lu"), pDescriptor->u.Dma.Port); + ListView_SetItemText(hwndLV, iItem, 1, buffer); + } + break; + + case CmResourceTypeDeviceSpecific: + hwndLV = GetDlgItem(hwnd, IDC_DEVICE_LIST); + + wsprintf(buffer, _T("0x%08lx"), pDescriptor->u.DeviceSpecificData.Reserved1); + + item.mask = LVIF_TEXT | LVIF_PARAM; + item.iItem = 1000; + item.iSubItem = 0; + item.state = 0; + item.stateMask = 0; + item.pszText = buffer; + item.cchTextMax = (int)_tcslen(item.pszText); + item.lParam = (LPARAM)pDescriptor; + + iItem = ListView_InsertItem(hwndLV, &item); + if (iItem != -1) + { + wsprintf(buffer, _T("0x%08lx"), pDescriptor->u.DeviceSpecificData.Reserved2); + ListView_SetItemText(hwndLV, iItem, 1, buffer); + + wsprintf(buffer, _T("0x%lx"), pDescriptor->u.DeviceSpecificData.DataSize); + ListView_SetItemText(hwndLV, iItem, 2, buffer); + } + break; + } + } +} + + +static BOOL +OnResourceNotify(HWND hwndDlg, NMHDR *phdr) +{ + LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)phdr; + + switch (phdr->idFrom) + { + case IDC_PORT_LIST: + case IDC_MEMORY_LIST: + case IDC_DMA_LIST: + case IDC_IRQ_LIST: + case IDC_DEVICE_LIST: + switch(phdr->code) + { + case NM_CLICK: + if (lpnmlv->iItem != -1) + { + PCM_PARTIAL_RESOURCE_DESCRIPTOR pDescriptor; + LVITEM item; + + item.mask = LVIF_PARAM; + item.iItem = lpnmlv->iItem; + item.iSubItem = 0; + + if (ListView_GetItem(phdr->hwndFrom, &item)) + { + pDescriptor = (PCM_PARTIAL_RESOURCE_DESCRIPTOR)item.lParam; + + EnableWindow(GetDlgItem(hwndDlg, IDC_UNDETERMINED), + (pDescriptor->ShareDisposition == CmResourceShareUndetermined)); + + EnableWindow(GetDlgItem(hwndDlg, IDC_SHARED), + (pDescriptor->ShareDisposition == CmResourceShareShared)); + + EnableWindow(GetDlgItem(hwndDlg, IDC_DEVICE_EXCLUSIVE), + (pDescriptor->ShareDisposition == CmResourceShareDeviceExclusive)); + + EnableWindow(GetDlgItem(hwndDlg, IDC_DRIVER_EXCLUSIVE), + (pDescriptor->ShareDisposition == CmResourceShareDriverExclusive)); + } + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_UNDETERMINED), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_SHARED), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_DEVICE_EXCLUSIVE), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_DRIVER_EXCLUSIVE), FALSE); + } + break; + } + break; + } + + return FALSE; +} + + +static INT_PTR CALLBACK modify_resource_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(lParam); + + switch(uMsg) + { + case WM_INITDIALOG: + CreateResourceColumns(hwndDlg); + ParseResources(hwndDlg); + return FALSE; + + case WM_NOTIFY: + return OnResourceNotify(hwndDlg, (NMHDR *)lParam); + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDOK: + EndDialog(hwndDlg, IDOK); + break; + case IDCANCEL: + EndDialog(hwndDlg, IDCANCEL); + return TRUE; + } + } + return FALSE; +} + +static BOOL CreateResourceListColumns(HWND hWndListView) +{ + TCHAR szText[80]; + RECT rc; + LV_COLUMN lvC; + + ListView_SetExtendedListViewStyle(hWndListView, LVS_EX_FULLROWSELECT); + + GetClientRect(hWndListView, &rc); + + /* Create columns. */ + lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + lvC.pszText = szText; + lvC.fmt = LVCFMT_LEFT; + + /* Load the column labels from the resource file. */ + lvC.iSubItem = 0; + lvC.cx = (rc.right - rc.left) / 2; + LoadString(hInst, IDS_BUSNUMBER, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hWndListView, 0, &lvC) == -1) + return FALSE; + + lvC.iSubItem = 1; + lvC.cx = (rc.right - rc.left) - lvC.cx; + LoadString(hInst, IDS_INTERFACE, szText, sizeof(szText)/sizeof(TCHAR)); + if (ListView_InsertColumn(hWndListView, 1, &lvC) == -1) + return FALSE; + + return TRUE; +} + +static VOID AddFullResourcesToList(HWND hwnd) +{ + PCM_FULL_RESOURCE_DESCRIPTOR pFullDescriptor; + TCHAR buffer[80]; + LVITEM item; + ULONG i; + INT iItem; + + for (i = 0; i < resourceValueData->Count; i++) + { + pFullDescriptor = &resourceValueData->List[i]; + + wsprintf(buffer, _T("%lu"), pFullDescriptor->BusNumber); + + item.mask = LVIF_TEXT; + item.iItem = i; + item.iSubItem = 0; + item.state = 0; + item.stateMask = 0; + item.pszText = buffer; + item.cchTextMax = (int)_tcslen(item.pszText); + + iItem = ListView_InsertItem(hwnd, &item); + if (iItem != -1) + { + GetInterfaceType(pFullDescriptor->InterfaceType, buffer, 80); + ListView_SetItemText(hwnd, iItem, 1, buffer); + } + } +} + +static BOOL +OnResourceListNotify(HWND hwndDlg, NMHDR *phdr) +{ + LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)phdr; + + switch (phdr->idFrom) + { + case IDC_RESOURCE_LIST: + switch(phdr->code) + { + case NM_CLICK: + fullResourceIndex = lpnmlv->iItem; + EnableWindow(GetDlgItem(hwndDlg, IDC_SHOW_RESOURCE), (lpnmlv->iItem != -1)); + break; + + case NM_DBLCLK: + if (lpnmlv->iItem != -1) + { + fullResourceIndex = lpnmlv->iItem; + DialogBox(0, MAKEINTRESOURCE(IDD_EDIT_RESOURCE), hwndDlg, modify_resource_dlgproc); + } + break; + } + break; + } + + return FALSE; +} + + +static INT_PTR CALLBACK modify_resource_list_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(lParam); + + switch(uMsg) + { + case WM_INITDIALOG: + CreateResourceListColumns(GetDlgItem(hwndDlg, IDC_RESOURCE_LIST)); + AddFullResourcesToList(GetDlgItem(hwndDlg, IDC_RESOURCE_LIST)); + return FALSE; + + case WM_NOTIFY: + return OnResourceListNotify(hwndDlg, (NMHDR *)lParam); + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_SHOW_RESOURCE: + if (fullResourceIndex != -1) + DialogBox(0, MAKEINTRESOURCE(IDD_EDIT_RESOURCE), hwndDlg, modify_resource_dlgproc); + break; + case IDOK: + EndDialog(hwndDlg, IDOK); + break; + case IDCANCEL: + EndDialog(hwndDlg, IDCANCEL); + return TRUE; + } + } + return FALSE; +} + + BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin) { DWORD type; @@ -612,6 +1241,33 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin) result = TRUE; } } + else if (EditBin == FALSE && type == REG_RESOURCE_LIST) + { + if (valueDataLen > 0) + { + resourceValueData = HeapAlloc(GetProcessHeap(), 0, valueDataLen); + if (resourceValueData == NULL) + { + error(hwnd, IDS_TOO_BIG_VALUE, valueDataLen); + goto done; + } + + lRet = RegQueryValueEx(hKey, valueName, 0, 0, (LPBYTE)resourceValueData, &valueDataLen); + if (lRet != ERROR_SUCCESS) + { + error(hwnd, IDS_BAD_VALUE, valueName); + goto done; + } + } + else + { + resourceValueData = NULL; + } + + if (DialogBox(0, MAKEINTRESOURCE(IDD_EDIT_RESOURCE_LIST), hwnd, modify_resource_list_dlgproc) == IDOK) + { + } + } else if (EditBin == TRUE || type == REG_NONE || type == REG_BINARY) { #ifndef UNICODE @@ -690,6 +1346,10 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin) } done: + if (resourceValueData) + HeapFree(GetProcessHeap(), 0, resourceValueData); + resourceValueData = NULL; + if (stringValueData) HeapFree(GetProcessHeap(), 0, stringValueData); stringValueData = NULL; diff --git a/base/applications/regedit/framewnd.c b/base/applications/regedit/framewnd.c index e37adbef08b..79cc3b36b7f 100644 --- a/base/applications/regedit/framewnd.c +++ b/base/applications/regedit/framewnd.c @@ -393,7 +393,7 @@ static BOOL UnloadHive(HWND hWnd) static BOOL ImportRegistryFile(HWND hWnd) { OPENFILENAME ofn; - TCHAR Caption[128]; + TCHAR Caption[128], szTitle[256], szText[256]; LPCTSTR pszKeyPath; HKEY hRootKey; @@ -414,6 +414,10 @@ static BOOL ImportRegistryFile(HWND hWnd) fclose(fp); return FALSE; } + LoadString(hInst, IDS_APP_TITLE, szTitle, sizeof(szTitle)); + LoadString(hInst, IDS_IMPORTED_OK, szText, sizeof(szTitle)); + /* show successful import */ + MessageBox(NULL, szText, szTitle, MB_OK); fclose(fp); } else diff --git a/base/applications/regedit/lang/bg-BG.rc b/base/applications/regedit/lang/bg-BG.rc index 8603663ce1e..3c33c57eacc 100644 --- a/base/applications/regedit/lang/bg-BG.rc +++ b/base/applications/regedit/lang/bg-BG.rc @@ -249,6 +249,53 @@ BEGIN PUSHBUTTON "",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -394,6 +441,66 @@ BEGIN IDS_FINISHEDFIND " ." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/cs-CZ.rc b/base/applications/regedit/lang/cs-CZ.rc index 9226c8eb36a..7557b2f1597 100644 --- a/base/applications/regedit/lang/cs-CZ.rc +++ b/base/applications/regedit/lang/cs-CZ.rc @@ -246,6 +246,53 @@ BEGIN PUSHBUTTON "Storno",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -391,6 +438,66 @@ BEGIN IDS_FINISHEDFIND "Prohledvn registru bylo dokoneno." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/de-DE.rc b/base/applications/regedit/lang/de-DE.rc index 8d6f251f962..82d3c40b80f 100644 --- a/base/applications/regedit/lang/de-DE.rc +++ b/base/applications/regedit/lang/de-DE.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "Abbrechen",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Liste der Ressourcen" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Anzeige...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Ressourcen" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Speicher:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Anschluss:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Gertspezifische Daten:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Benutzung", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Unbestimmt", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Gemeinsam", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Gert-exklusiv", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Treiber-exklusiv", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Schnittstellentyp:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Busnummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Daten...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND "Durchsuchen der Registry beendet." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Busnummer" + IDS_INTERFACE "Schnittstelle" + IDS_DMA_CHANNEL "Kanal" + IDS_DMA_PORT "Anschluss" + IDS_INTERRUPT_VECTOR "Vektor" + IDS_INTERRUPT_LEVEL "Ebene" + IDS_INTERRUPT_AFFINITY "Affinitt" + IDS_INTERRUPT_TYPE "Typ" + IDS_MEMORY_ADDRESS "Physikalische Adresse" + IDS_MEMORY_LENGTH "Lnge" + IDS_MEMORY_ACCESS "Zugriff" + IDS_PORT_ADDRESS "Physikalische Adresse" + IDS_PORT_LENGTH "Lnge" + IDS_PORT_ACCESS "Zugriff" + IDS_SPECIFIC_RESERVED1 "Reserviert 1" + IDS_SPECIFIC_RESERVED2 "Reserviert 2" + IDS_SPECIFIC_DATASIZE "Datengre" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Anschluss" + IDS_PORT_MEMORY_IO "Speicher" + IDS_INTERRUPT_EDGE_SENSITIVE "Flankengesteuert" + IDS_INTERRUPT_LEVEL_SENSITIVE "Pegelgesteuert" + IDS_MEMORY_READ_ONLY "Nur Lesen" + IDS_MEMORY_WRITE_ONLY "Nur Schreiben" + IDS_MEMORY_READ_WRITE "Lesen / Schreiben" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefiniert" + IDS_BUS_INTERNAL "Intern" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unbekannter Schnittstellentyp" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/el-GR.rc b/base/applications/regedit/lang/el-GR.rc index 44ca2d9f33c..ca27ccdcdd8 100644 --- a/base/applications/regedit/lang/el-GR.rc +++ b/base/applications/regedit/lang/el-GR.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND " registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/en-US.rc b/base/applications/regedit/lang/en-US.rc index fb81f164e87..80dc88d399d 100644 --- a/base/applications/regedit/lang/en-US.rc +++ b/base/applications/regedit/lang/en-US.rc @@ -236,6 +236,53 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -381,6 +428,66 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/es-ES.rc b/base/applications/regedit/lang/es-ES.rc index 0e1dc4c5d86..82860337d51 100644 --- a/base/applications/regedit/lang/es-ES.rc +++ b/base/applications/regedit/lang/es-ES.rc @@ -251,6 +251,53 @@ BEGIN PUSHBUTTON "Cancelar",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -396,6 +443,66 @@ BEGIN IDS_FINISHEDFIND "Finalizado la busqueda del registro." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Agregar los datos al registro?" + IDS_IMPORTED_OK "La informacin ha sido agregada al registro" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/fr-FR.rc b/base/applications/regedit/lang/fr-FR.rc index 56e31bcd755..e3d5326bec1 100644 --- a/base/applications/regedit/lang/fr-FR.rc +++ b/base/applications/regedit/lang/fr-FR.rc @@ -251,6 +251,53 @@ BEGIN PUSHBUTTON "Annuler",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -396,6 +443,66 @@ BEGIN IDS_FINISHEDFIND "Recherche dans le registre termine." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/hu-HU.rc b/base/applications/regedit/lang/hu-HU.rc index 7efa45d5221..4d23b44d1fe 100644 --- a/base/applications/regedit/lang/hu-HU.rc +++ b/base/applications/regedit/lang/hu-HU.rc @@ -249,6 +249,53 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -394,6 +441,66 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/id-ID.rc b/base/applications/regedit/lang/id-ID.rc index 4d8571470fe..41718944c97 100644 --- a/base/applications/regedit/lang/id-ID.rc +++ b/base/applications/regedit/lang/id-ID.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "Batal",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND "Selesai mencari seluruh registri." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/it-IT.rc b/base/applications/regedit/lang/it-IT.rc index 8f81f05ea36..f6716a4f198 100644 --- a/base/applications/regedit/lang/it-IT.rc +++ b/base/applications/regedit/lang/it-IT.rc @@ -253,6 +253,53 @@ BEGIN PUSHBUTTON "Annulla",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -398,6 +445,66 @@ BEGIN IDS_FINISHEDFIND "Fine ricerca nel registro." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Aggiungere l'informazione al registro?" + IDS_IMPORTED_OK "L'informazione stata aggiunta al registro" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/ja-JP.rc b/base/applications/regedit/lang/ja-JP.rc index 66a0967fb17..bf5da338bbf 100644 --- a/base/applications/regedit/lang/ja-JP.rc +++ b/base/applications/regedit/lang/ja-JP.rc @@ -246,6 +246,53 @@ BEGIN PUSHBUTTON "LZ",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -391,6 +438,66 @@ BEGIN IDS_FINISHEDFIND "WXgׂČ܂B" END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/ko-KR.rc b/base/applications/regedit/lang/ko-KR.rc index b2057978fca..8d269fe215b 100644 --- a/base/applications/regedit/lang/ko-KR.rc +++ b/base/applications/regedit/lang/ko-KR.rc @@ -233,6 +233,53 @@ BEGIN PUSHBUTTON "",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -378,6 +425,66 @@ BEGIN IDS_FINISHEDFIND "Ʈ ˻ Ϸ߽ϴ." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/nl-NL.rc b/base/applications/regedit/lang/nl-NL.rc index 2bc09796371..3312cb9b953 100644 --- a/base/applications/regedit/lang/nl-NL.rc +++ b/base/applications/regedit/lang/nl-NL.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/no-NO.rc b/base/applications/regedit/lang/no-NO.rc index 60d0d1af091..b93544c204f 100644 --- a/base/applications/regedit/lang/no-NO.rc +++ b/base/applications/regedit/lang/no-NO.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "Avbryt",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND "Sket i registret er fullfrt." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/pl-PL.rc b/base/applications/regedit/lang/pl-PL.rc index 50087cfe068..569495af4eb 100644 --- a/base/applications/regedit/lang/pl-PL.rc +++ b/base/applications/regedit/lang/pl-PL.rc @@ -1,16 +1,6 @@ -/* +/* * Regedit resources - * - * Copyright 2005 Sebastian Gasiorek - * - * Update by Caemyr - Olaf Siejka (Dec-Jan, 2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; - * - * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) - * - * This library is free software; you can redistribute it and/or + * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. @@ -23,6 +13,15 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Copyright 2005 Sebastian Gasiorek + * + * Update by Caemyr - Olaf Siejka (Jan, 2007; May, 2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -44,7 +43,7 @@ IDC_REGEDIT MENU DISCARDABLE BEGIN POPUP "&Plik" BEGIN - MENUITEM "Za&kocz", ID_REGISTRY_EXIT + MENUITEM "Za&kończ", ID_REGISTRY_EXIT END POPUP "Pomo&c" BEGIN @@ -61,19 +60,19 @@ BEGIN MENUITEM "&Eksportuj plik rejestru...", ID_REGISTRY_EXPORTREGISTRYFILE MENUITEM SEPARATOR - MENUITEM "aduj Drzewo....", ID_REGISTRY_LOADHIVE, GRAYED - MENUITEM "Wyaduj Drzewo..", ID_REGISTRY_UNLOADHIVE, GRAYED + MENUITEM "Ładuj Drzewo....", ID_REGISTRY_LOADHIVE, GRAYED + MENUITEM "Wyładuj Drzewo..", ID_REGISTRY_UNLOADHIVE, GRAYED MENUITEM SEPARATOR - MENUITEM "&Podcz rejestr sieciowy...", + MENUITEM "&Podłącz rejestr sieciowy...", ID_REGISTRY_CONNECTNETWORKREGISTRY - MENUITEM "&Odcz rejestr sieciowy...", + MENUITEM "&Odłącz rejestr sieciowy...", ID_REGISTRY_DISCONNECTNETWORKREGISTRY , GRAYED MENUITEM SEPARATOR MENUITEM "&Drukuj\tCtrl+P", ID_REGISTRY_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "Za&kocz", ID_REGISTRY_EXIT + MENUITEM "Za&kończ", ID_REGISTRY_EXIT END POPUP "&Edycja" BEGIN @@ -83,22 +82,22 @@ BEGIN BEGIN MENUITEM "&Klucz", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "Warto &cigu", ID_EDIT_NEW_STRINGVALUE - MENUITEM "Warto &binarna", ID_EDIT_NEW_BINARYVALUE - MENUITEM "Warto &DWORD", ID_EDIT_NEW_DWORDVALUE - MENUITEM "Warto &wielocigu", ID_EDIT_NEW_MULTISTRINGVALUE - MENUITEM "Warto cigu &rozwijalnego", ID_EDIT_NEW_EXPANDABLESTRINGVALUE + MENUITEM "Wartość &ciągu", ID_EDIT_NEW_STRINGVALUE + MENUITEM "Wartość &binarna", ID_EDIT_NEW_BINARYVALUE + MENUITEM "Wartość &DWORD", ID_EDIT_NEW_DWORDVALUE + MENUITEM "Wartość &wielociągu", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "Wartość ciągu &rozwijalnego", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END MENUITEM SEPARATOR MENUITEM "&Uprawnienia...", ID_EDIT_PERMISSIONS MENUITEM SEPARATOR - MENUITEM "U&su\tDel", ID_EDIT_DELETE - MENUITEM "Z&mie nazw", ID_EDIT_RENAME + MENUITEM "U&suń\tDel", ID_EDIT_DELETE + MENUITEM "Z&mień nazwę", ID_EDIT_RENAME MENUITEM SEPARATOR - MENUITEM "&Kopiuj nazw klucza", ID_EDIT_COPYKEYNAME + MENUITEM "&Kopiuj nazwę klucza", ID_EDIT_COPYKEYNAME MENUITEM SEPARATOR - MENUITEM "&Znajd\tCtrl+F", ID_EDIT_FIND - MENUITEM "Zn&ajd nastpny\tF3", ID_EDIT_FINDNEXT + MENUITEM "&Znajdź\tCtrl+F", ID_EDIT_FIND + MENUITEM "Zn&ajdź następny\tF3", ID_EDIT_FINDNEXT END POPUP "&Widok" BEGIN @@ -106,13 +105,13 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Po&dziel", ID_VIEW_SPLIT MENUITEM SEPARATOR - MENUITEM "&Odwie\tF5", ID_VIEW_REFRESH + MENUITEM "&Odśwież\tF5", ID_VIEW_REFRESH END POPUP "Ulu&bione" BEGIN MENUITEM "&Dodaj do ulubionych", ID_FAVOURITES_ADDTOFAVOURITES , GRAYED - MENUITEM "&Usu ulubiony", ID_FAVOURITES_REMOVEFAVOURITE + MENUITEM "&Usuń ulubiony", ID_FAVOURITES_REMOVEFAVOURITE , GRAYED END POPUP "Pomo&c" @@ -130,8 +129,8 @@ BEGIN MENUITEM "&Modyfikuj", ID_EDIT_MODIFY MENUITEM "Modyfikuj dane &binarne", ID_EDIT_MODIFY_BIN MENUITEM SEPARATOR - MENUITEM "&Usu\tDel", ID_EDIT_DELETE - MENUITEM "&Zmie nazw", ID_EDIT_RENAME + MENUITEM "&Usuń\tDel", ID_EDIT_DELETE + MENUITEM "&Zmień nazwę", ID_EDIT_RENAME END POPUP "" BEGIN @@ -139,44 +138,44 @@ BEGIN BEGIN MENUITEM "&Klucz", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "Warto &cigu", ID_EDIT_NEW_STRINGVALUE - MENUITEM "Warto &binarna", ID_EDIT_NEW_BINARYVALUE - MENUITEM "Warto &DWORD", ID_EDIT_NEW_DWORDVALUE - MENUITEM "Warto &wielocigu", ID_EDIT_NEW_MULTISTRINGVALUE - MENUITEM "Warto cigu &rozwijalnego", ID_EDIT_NEW_EXPANDABLESTRINGVALUE + MENUITEM "Wartość &ciągu", ID_EDIT_NEW_STRINGVALUE + MENUITEM "Wartość &binarna", ID_EDIT_NEW_BINARYVALUE + MENUITEM "Wartość &DWORD", ID_EDIT_NEW_DWORDVALUE + MENUITEM "Wartość &wielociągu", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "Wartość ciągu &rozwijalnego", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END END POPUP "" BEGIN - MENUITEM "Rozwi/Zwi", ID_TREE_EXPANDBRANCH + MENUITEM "Rozwiń/Zwiń", ID_TREE_EXPANDBRANCH POPUP "&Nowy" BEGIN MENUITEM "&Klucz", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "Warto &cigu", ID_EDIT_NEW_STRINGVALUE - MENUITEM "Warto &binarna", ID_EDIT_NEW_BINARYVALUE - MENUITEM "Warto &DWORD", ID_EDIT_NEW_DWORDVALUE - MENUITEM "Warto &wielocigu", ID_EDIT_NEW_MULTISTRINGVALUE - MENUITEM "Warto cigu &rozwijalnego", ID_EDIT_NEW_EXPANDABLESTRINGVALUE + MENUITEM "Wartość &ciągu", ID_EDIT_NEW_STRINGVALUE + MENUITEM "Wartość &binarna", ID_EDIT_NEW_BINARYVALUE + MENUITEM "Wartość &DWORD", ID_EDIT_NEW_DWORDVALUE + MENUITEM "Wartość &wielociągu", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "Wartość ciągu &rozwijalnego", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END - MENUITEM "&Znajd", ID_EDIT_FIND + MENUITEM "&Znajdź", ID_EDIT_FIND MENUITEM SEPARATOR - MENUITEM "U&su", ID_TREE_DELETE - MENUITEM "Z&mie nazw", ID_TREE_RENAME + MENUITEM "U&suń", ID_TREE_DELETE + MENUITEM "Z&mień nazwę", ID_TREE_RENAME MENUITEM SEPARATOR MENUITEM "&Eksportuj", ID_TREE_EXPORT MENUITEM "&Uprawnienia..", ID_TREE_PERMISSIONS, GRAYED MENUITEM SEPARATOR - MENUITEM "&Kopiuj nazw klucza", ID_EDIT_COPYKEYNAME + MENUITEM "&Kopiuj nazwę klucza", ID_EDIT_COPYKEYNAME END POPUP "" BEGIN MENUITEM "W&ytnij", ID_HEXEDIT_CUT MENUITEM "&Kopiuj", ID_HEXEDIT_COPY MENUITEM "&Wklej", ID_HEXEDIT_PASTE - MENUITEM "&Usu", ID_HEXEDIT_DELETE + MENUITEM "&Usuń", ID_HEXEDIT_DELETE MENUITEM SEPARATOR - MENUITEM "Zaznacz &cao", ID_HEXEDIT_SELECT_ALL + MENUITEM "Zaznacz &całość", ID_HEXEDIT_SELECT_ALL END END @@ -186,7 +185,7 @@ END */ IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "aduj drzewo" +CAPTION "Ładuj drzewo" FONT 8, "Ms Shell Dlg" { LTEXT "&Klucz:", IDC_STATIC, 4, 4, 15, 8, SS_LEFT @@ -198,12 +197,12 @@ FONT 8, "Ms Shell Dlg" IDD_EDIT_STRING DIALOGEX 32, 24, 252, 84 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Edytowanie cigu" +CAPTION "Edytowanie ciągu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Nazwa wartoci:",IDC_STATIC,6,6,134,8 + LTEXT "&Nazwa wartości:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "&Dane wartoci:",IDC_STATIC,6,35,161,8 + LTEXT "&Dane wartości:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,240,12,ES_AUTOHSCROLL DEFPUSHBUTTON "OK",IDOK,142,64,50,14 PUSHBUTTON "Anuluj",IDCANCEL,196,64,50,14 @@ -212,12 +211,12 @@ END IDD_EDIT_MULTI_STRING DIALOGEX 32, 24, 252, 174 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Edytowanie wielocigu" +CAPTION "Edytowanie wielociągu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Nazwa wartoci:",IDC_STATIC,6,6,134,8 + LTEXT "&Nazwa wartości:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "Dane &wartoci:",IDC_STATIC,6,35,161,8 + LTEXT "Dane &wartości:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,240,102,ES_AUTOHSCROLL | ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL | WS_VSCROLL DEFPUSHBUTTON "OK",IDOK,142,154,50,14 PUSHBUTTON "Anuluj",IDCANCEL,196,154,50,14 @@ -226,12 +225,12 @@ END IDD_EDIT_BIN_DATA DIALOGEX 32, 24, 252, 174 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Edytowanie wartoci binarnej" +CAPTION "Edytowanie wartości binarnej" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Nazwa wartoci:",IDC_STATIC,6,6,134,8 + LTEXT "&Nazwa wartości:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "&Dane wartoci:",IDC_STATIC,6,35,161,8 + LTEXT "&Dane wartości:",IDC_STATIC,6,35,161,8 CONTROL "",IDC_VALUE_DATA,"HexEdit32",WS_VSCROLL | WS_BORDER | WS_TABSTOP,6,46,240,102 DEFPUSHBUTTON "OK",IDOK,142,154,50,14 PUSHBUTTON "Anuluj",IDCANCEL,196,154,50,14 @@ -241,20 +240,67 @@ END IDD_EDIT_DWORD DIALOGEX 32, 24, 252, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Edytowanie wartoci DWORD" +CAPTION "Edytowanie wartości DWORD" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Nazwa wartoci:",IDC_STATIC,6,6,134,8 + LTEXT "&Nazwa wartości:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "Dane &wartoci:",IDC_STATIC,6,35,161,8 + LTEXT "Dane &wartości:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,116,12,ES_AUTOHSCROLL GROUPBOX "System",IDC_STATIC,130,35,116,39 AUTORADIOBUTTON "&Szesnastkowy",IDC_FORMAT_HEX,141,46,60,10,WS_GROUP - AUTORADIOBUTTON "&Dziesitny",IDC_FORMAT_DEC,141,59,60,10 + AUTORADIOBUTTON "&Dziesiętny",IDC_FORMAT_DEC,141,59,60,10 DEFPUSHBUTTON "OK",IDOK,142,82,50,14 PUSHBUTTON "Anuluj",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -275,87 +321,87 @@ END STRINGTABLE DISCARDABLE BEGIN - ID_REGISTRY_MENU "Zawiera polecenia do pracy z caym rejestrem" - ID_EDIT_MENU "Zawiera polecenia do edycji wartoci lub kluczy" + ID_REGISTRY_MENU "Zawiera polecenia do pracy z całym rejestrem" + ID_EDIT_MENU "Zawiera polecenia do edycji wartości lub kluczy" ID_VIEW_MENU "Zawiera polecenia do dostosowywania okien rejestru" - ID_FAVOURITES_MENU "Zawiera polecenia dla dostpu do czsto uywanych klawiszy" - ID_HELP_MENU "Zawiera polecenia do wywietlania Pomocy oraz informacji o Edytorze rejestru" - ID_EDIT_NEW_MENU "Zawiera polecenia do tworzenia nowych kluczy lub wartoci" + ID_FAVOURITES_MENU "Zawiera polecenia dla dostępu do często używanych klawiszy" + ID_HELP_MENU "Zawiera polecenia do wyświetlania Pomocy oraz informacji o Edytorze rejestru" + ID_EDIT_NEW_MENU "Zawiera polecenia do tworzenia nowych kluczy lub wartości" END STRINGTABLE DISCARDABLE BEGIN - ID_EDIT_MODIFY "Zmienia dane wartoci" + ID_EDIT_MODIFY "Zmienia dane wartości" ID_EDIT_NEW_KEY "Dodaje nowy klucz" - ID_EDIT_NEW_STRINGVALUE "Dodaje now warto cigu" - ID_EDIT_NEW_BINARYVALUE "Dodaje now warto binarn" - ID_EDIT_NEW_DWORDVALUE "Dodaje now warto DWORD" + ID_EDIT_NEW_STRINGVALUE "Dodaje nową wartość ciągu" + ID_EDIT_NEW_BINARYVALUE "Dodaje nową wartość binarną" + ID_EDIT_NEW_DWORDVALUE "Dodaje nową wartość DWORD" ID_REGISTRY_IMPORTREGISTRYFILE "Importuje plik do rejestru" ID_REGISTRY_EXPORTREGISTRYFILE - "Eksportuje cao lub cz rejestru do pliku" + "Eksportuje całość lub część rejestru do pliku" ID_REGISTRY_LOADHIVE - "aduje plik Drzewa do rejestru" + "Ładuje plik Drzewa do rejestru" ID_REGISTRY_UNLOADHIVE - "Wyadowuje Drzewo z rejestru" + "Wyładowuje Drzewo z rejestru" ID_REGISTRY_CONNECTNETWORKREGISTRY - "Poczenie z rejestrem zdalnego komputera" + "Połączenie z rejestrem zdalnego komputera" ID_REGISTRY_DISCONNECTNETWORKREGISTRY - "Odcza od rejestru zdalnego komputera" - ID_REGISTRY_PRINT "Drukuje cao lub cz rejestru" + "Odłącza od rejestru zdalnego komputera" + ID_REGISTRY_PRINT "Drukuje całość lub część rejestru" /* ID_HELP_HELPTOPICS "Otwiera Pomoc Edytora rejestru" */ - ID_HELP_ABOUT "Wywietla informacje o programie, numerze wersji i prawach autorskich" + ID_HELP_ABOUT "Wyświetla informacje o programie, numerze wersji i prawach autorskich" END STRINGTABLE DISCARDABLE BEGIN - ID_REGISTRY_EXIT "Koczy dziaanie Edytora rejestru" - ID_FAVOURITES_ADDTOFAVOURITES "Dodaje klawisze do listy elementw ulubionych" - ID_FAVOURITES_REMOVEFAVOURITE "Usuwa klawisze z listy elementw ulubionych" + ID_REGISTRY_EXIT "Kończy działanie Edytora rejestru" + ID_FAVOURITES_ADDTOFAVOURITES "Dodaje klawisze do listy elementów ulubionych" + ID_FAVOURITES_REMOVEFAVOURITE "Usuwa klawisze z listy elementów ulubionych" ID_VIEW_STATUSBAR "Pokazuje lub ukrywa pasek stanu" - ID_VIEW_SPLIT "Zmienia pozycj podziau pomidzy dwoma okienkami" - ID_VIEW_REFRESH "Odwiea okno" + ID_VIEW_SPLIT "Zmienia pozycję podziału pomiędzy dwoma okienkami" + ID_VIEW_REFRESH "Odświeża okno" ID_EDIT_DELETE "Usuwa zaznaczenie" - ID_EDIT_RENAME "Zmienia nazw zaznaczenia" - ID_EDIT_COPYKEYNAME "Kopiuje nazw wybranego klucza do schowka" - ID_EDIT_FIND "Znajduje cig tekstowy w kluczu, wartoci lub danych" - ID_EDIT_FINDNEXT "Znajduje nastpne wystpienie tekstu okrelonego przy poprzednim szukaniu" + ID_EDIT_RENAME "Zmienia nazwę zaznaczenia" + ID_EDIT_COPYKEYNAME "Kopiuje nazwę wybranego klucza do schowka" + ID_EDIT_FIND "Znajduje ciąg tekstowy w kluczu, wartości lub danych" + ID_EDIT_FINDNEXT "Znajduje następne wystąpienie tekstu określonego przy poprzednim szukaniu" END STRINGTABLE DISCARDABLE BEGIN - IDS_ERROR "Bd" - IDS_WARNING "Ostrzeenie" - IDS_BAD_KEY "Nie mona odczyta klucza '%s'" - IDS_BAD_VALUE "Nie mona odczyta wartoci '%s'" - IDS_UNSUPPORTED_TYPE "Nie mona edytowa kluczy tego typu (%ld)" - IDS_TOO_BIG_VALUE "Warto jest za dua (%ld)" - IDS_MULTI_SZ_EMPTY_STRING "Dane typu REG_MULTI_SZ nie mog zawiera pustych cigw.\nPusty cig zosta usunity z listy." - IDS_QUERY_DELETE_KEY_ONE "Czy na pewno chcesz usun ten klucz?" - IDS_QUERY_DELETE_KEY_MORE "Czy na pewno chcesz usun te klucze?" - IDS_QUERY_DELETE_KEY_CONFIRM "Potwierdzanie usunicia klucza" - IDS_QUERY_DELETE_ONE "Czy na pewno chcesz usun t warto?" - IDS_QUERY_DELETE_MORE "Czy na pewno chcesz usun te wartoci?" - IDS_QUERY_DELETE_CONFIRM "Potwierdzanie usunicia wartoci" - IDS_ERR_DELVAL_CAPTION "Bd przy usuwaniu wartoci" - IDS_ERR_DELETEVALUE "Nie mona usun wszystkich podanych wartoci!" - IDS_ERR_RENVAL_CAPTION "Bd przy zmianie wartoci" - IDS_ERR_RENVAL_TOEMPTY "Nie mona zmieni nazwy %s. Okrelona nazwa klucza jest pusta. Wpisz inn nazw i sprbuj ponownie." + IDS_ERROR "Błąd" + IDS_WARNING "Ostrzeżenie" + IDS_BAD_KEY "Nie można odczytać klucza '%s'" + IDS_BAD_VALUE "Nie można odczytać wartości '%s'" + IDS_UNSUPPORTED_TYPE "Nie można edytować kluczy tego typu (%ld)" + IDS_TOO_BIG_VALUE "Wartość jest za duża (%ld)" + IDS_MULTI_SZ_EMPTY_STRING "Dane typu REG_MULTI_SZ nie mogą zawierać pustych ciągów.\nPusty ciąg został usunięty z listy." + IDS_QUERY_DELETE_KEY_ONE "Czy na pewno chcesz usunąć ten klucz?" + IDS_QUERY_DELETE_KEY_MORE "Czy na pewno chcesz usunąć te klucze?" + IDS_QUERY_DELETE_KEY_CONFIRM "Potwierdzanie usunięcia klucza" + IDS_QUERY_DELETE_ONE "Czy na pewno chcesz usunąć tę wartość?" + IDS_QUERY_DELETE_MORE "Czy na pewno chcesz usunąć te wartości?" + IDS_QUERY_DELETE_CONFIRM "Potwierdzanie usunięcia wartości" + IDS_ERR_DELVAL_CAPTION "Błąd przy usuwaniu wartości" + IDS_ERR_DELETEVALUE "Nie można usunąć wszystkich podanych wartości!" + IDS_ERR_RENVAL_CAPTION "Błąd przy zmianie wartości" + IDS_ERR_RENVAL_TOEMPTY "Nie można zmienić nazwy %s. Określona nazwa klucza jest pusta. Wpisz inną nazwę i spróbuj ponownie." IDS_NEW_KEY "Nowy klucz #%d" - IDS_NEW_VALUE "Nowa warto #%d" + IDS_NEW_VALUE "Nowa wartość #%d" END STRINGTABLE DISCARDABLE BEGIN - IDS_BINARY_EMPTY "(warto binarna o dugoci zero)" - IDS_DEFAULT_VALUE_NAME "(domylna)" - IDS_VALUE_NOT_SET "(warto nie ustalona)" + IDS_BINARY_EMPTY "(wartość binarna o długości zero)" + IDS_DEFAULT_VALUE_NAME "(domyślna)" + IDS_VALUE_NOT_SET "(wartość nie ustalona)" IDS_UNKNOWN_TYPE "Nieznany typ: (0x%lx)" - IDS_MY_COMPUTER "Mj komputer" + IDS_MY_COMPUTER "Mój komputer" IDS_IMPORT_REG_FILE "Importuj plik rejestru" IDS_EXPORT_REG_FILE "Eksportuj plik rejestru" - IDS_LOAD_HIVE "aduj Drzewo" - IDS_UNLOAD_HIVE "Wyaduj Drzewo" - IDS_INVALID_DWORD "(niewaciwa warto DWORD)" + IDS_LOAD_HIVE "Ładuj Drzewo" + IDS_UNLOAD_HIVE "Wyładuj Drzewo" + IDS_INVALID_DWORD "(niewłaściwa wartość DWORD)" END STRINGTABLE DISCARDABLE @@ -371,17 +417,17 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_ACCESS_FULLCONTROL "Pena kontrola" + IDS_ACCESS_FULLCONTROL "Pełna kontrola" IDS_ACCESS_READ "Odczyt" - IDS_ACCESS_QUERYVALUE "Badanie wartoci" - IDS_ACCESS_SETVALUE "Ustawianie wartoci" + IDS_ACCESS_QUERYVALUE "Badanie wartości" + IDS_ACCESS_SETVALUE "Ustawianie wartości" IDS_ACCESS_CREATESUBKEY "Tworzenie podklucza" IDS_ACCESS_ENUMERATESUBKEYS "Wyliczanie podkluczy" IDS_ACCESS_NOTIFY "Powiadamianie" - IDS_ACCESS_CREATELINK "Tworzenie cza" - IDS_ACCESS_DELETE "Usu" + IDS_ACCESS_CREATELINK "Tworzenie łącza" + IDS_ACCESS_DELETE "Usuń" IDS_ACCESS_WRITEDAC "Zapisywanie DAC" - IDS_ACCESS_WRITEOWNER "Zapisywanie waciciela" + IDS_ACCESS_WRITEOWNER "Zapisywanie właściciela" IDS_ACCESS_READCONTROL "Kontrola odczytu" END @@ -394,10 +440,70 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_EXPAND "&Rozwi" - IDS_COLLAPSE "&Zwi" - IDS_GOTO_SUGGESTED_KEY "&Id do '%s'" - IDS_FINISHEDFIND "Przeszukiwanie rejestru zakoczone." + IDS_EXPAND "&Rozwiń" + IDS_COLLAPSE "&Zwiń" + IDS_GOTO_SUGGESTED_KEY "&Idź do '%s'" + IDS_FINISHEDFIND "Przeszukiwanie rejestru zakończone." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Czy dodać dane do rejestru?" + IDS_IMPORTED_OK "Dane dopisane do rejestru" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" END /*****************************************************************/ @@ -414,7 +520,7 @@ FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Zakres eksportu",IDC_STATIC,2,0,366,48 CONTROL "&Wszystko",IDC_EXPORT_ALL,"Button",BS_AUTORADIOBUTTON,10,10, 29,11 - CONTROL "Wy&brana ga",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11 + CONTROL "Wy&brana gałąź",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11 EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END @@ -431,7 +537,7 @@ END IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Usu z ulubionych" +CAPTION "Usuń z ulubionych" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,107,114,50,14 @@ -443,30 +549,30 @@ END IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Znajd" +CAPTION "Znajdź" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "Znajd &Nastpny",IDOK,197,7,50,14 + DEFPUSHBUTTON "Znajdź &Następny",IDOK,197,7,50,14 PUSHBUTTON "Anuluj",IDCANCEL,197,24,50,14 GROUPBOX "Przeszukaj",IDC_STATIC,7,25,63,51 LTEXT "&Szukaj:",IDC_STATIC,7,8,37,10 EDITTEXT IDC_FINDWHAT,47,7,142,13,ES_AUTOHSCROLL CONTROL "&Klucze",IDC_LOOKAT_KEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,36,35,8 - CONTROL "&Wartoci",IDC_LOOKAT_VALUES,"Button",BS_AUTOCHECKBOX | + CONTROL "&Wartości",IDC_LOOKAT_VALUES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,48,36,8 CONTROL "&Dane",IDC_LOOKAT_DATA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,60,42,8 - CONTROL " &tylko cae cigi",IDC_MATCHSTRING,"Button", + CONTROL " &tylko całe ciągi",IDC_MATCHSTRING,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,83,32,94,13 - CONTROL "Uwzgldnij wie&lko liter",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX | + CONTROL "Uwzględnij wie&lkość liter",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,83,48,90,12 END IDD_FINDING DIALOGEX 0, 0, 145, 50 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Znajd" +CAPTION "Znajdź" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ICON IDI_REGEDIT,IDC_STATIC,7,7,20,20 @@ -493,7 +599,7 @@ END *STRINGTABLE DISCARDABLE *BEGIN * ID_HELP_HELPTOPICS "Otwiera pomoc Edytora Rejestru." - * ID_HELP_ABOUT "Wywietla informacje o programie, numerze wersji, licencji." + * ID_HELP_ABOUT "Wyświetla informacje o programie, numerze wersji, licencji." *END */ diff --git a/base/applications/regedit/lang/pt-BR.rc b/base/applications/regedit/lang/pt-BR.rc index 7abc3c211ba..29e8b290cd6 100644 --- a/base/applications/regedit/lang/pt-BR.rc +++ b/base/applications/regedit/lang/pt-BR.rc @@ -249,6 +249,53 @@ BEGIN PUSHBUTTON "Cancelar",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -394,6 +441,66 @@ BEGIN IDS_FINISHEDFIND "Pesquisa do Registro concluda." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/pt-PT.rc b/base/applications/regedit/lang/pt-PT.rc index 52b15fd526c..67251b034f8 100644 --- a/base/applications/regedit/lang/pt-PT.rc +++ b/base/applications/regedit/lang/pt-PT.rc @@ -239,6 +239,53 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -384,6 +431,66 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/ru-RU.rc b/base/applications/regedit/lang/ru-RU.rc index f8e74660ab9..2ef6c595258 100644 --- a/base/applications/regedit/lang/ru-RU.rc +++ b/base/applications/regedit/lang/ru-RU.rc @@ -1,4 +1,4 @@ -/* +/* * Regedit (Russian resources) * * Copyright 2003 Igor Stepin @@ -35,84 +35,84 @@ END IDC_REGEDIT MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&", ID_REGISTRY_EXIT + MENUITEM "В&ыход", ID_REGISTRY_EXIT END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "& ", ID_HELP_ABOUT + MENUITEM "&О программе", ID_HELP_ABOUT END END IDR_REGEDIT_MENU MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Реестр" BEGIN - MENUITEM "& ...", ID_REGISTRY_IMPORTREGISTRYFILE + MENUITEM "&Импортировать файл реестра...", ID_REGISTRY_IMPORTREGISTRYFILE - MENUITEM "& ...", ID_REGISTRY_EXPORTREGISTRYFILE + MENUITEM "&Экспортировать файл реестра...", ID_REGISTRY_EXPORTREGISTRYFILE MENUITEM SEPARATOR - MENUITEM " ...", ID_REGISTRY_LOADHIVE, GRAYED - MENUITEM " ...", ID_REGISTRY_UNLOADHIVE, GRAYED + MENUITEM "Загрузить куст...", ID_REGISTRY_LOADHIVE, GRAYED + MENUITEM "Выгрузить куст...", ID_REGISTRY_UNLOADHIVE, GRAYED MENUITEM SEPARATOR - MENUITEM "& ...", ID_REGISTRY_CONNECTNETWORKREGISTRY + MENUITEM "&Подключить сетевой реестр...", ID_REGISTRY_CONNECTNETWORKREGISTRY - MENUITEM "& ...", + MENUITEM "&Отключить сетевой реестр...", ID_REGISTRY_DISCONNECTNETWORKREGISTRY, GRAYED MENUITEM SEPARATOR - MENUITEM "&\tCtrl+P", ID_REGISTRY_PRINT, GRAYED + MENUITEM "&Печатаь\tCtrl+P", ID_REGISTRY_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "&", ID_REGISTRY_EXIT + MENUITEM "В&ыход", ID_REGISTRY_EXIT END - POPUP "&" + POPUP "&Правка" BEGIN - MENUITEM "&", ID_EDIT_MODIFY + MENUITEM "&Изменить", ID_EDIT_MODIFY MENUITEM SEPARATOR - POPUP "&" + POPUP "Созд&ать" BEGIN - MENUITEM "&", ID_EDIT_NEW_KEY + MENUITEM "Кл&юч", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_NEW_STRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_BINARYVALUE - MENUITEM "& DWORD", ID_EDIT_NEW_DWORDVALUE - MENUITEM "& ", ID_EDIT_NEW_MULTISTRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_EXPANDABLESTRINGVALUE + MENUITEM "&Строковый параметр", ID_EDIT_NEW_STRINGVALUE + MENUITEM "&Двоичный параметр", ID_EDIT_NEW_BINARYVALUE + MENUITEM "&Параметр DWORD", ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Мультистроковый параметр", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "Рас&ширяемый строковый параметр", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END MENUITEM SEPARATOR - MENUITEM "& ...", ID_EDIT_PERMISSIONS + MENUITEM "&Права доступа...", ID_EDIT_PERMISSIONS MENUITEM SEPARATOR - MENUITEM "&\tDel", ID_EDIT_DELETE - MENUITEM "&", ID_EDIT_RENAME + MENUITEM "&Удалить\tDel", ID_EDIT_DELETE + MENUITEM "&Переименовать", ID_EDIT_RENAME MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_COPYKEYNAME + MENUITEM "С&копировать имя ключа", ID_EDIT_COPYKEYNAME MENUITEM SEPARATOR - MENUITEM "&\tCtrl+F", ID_EDIT_FIND - MENUITEM " &\tF3", ID_EDIT_FINDNEXT + MENUITEM "&Найти\tCtrl+F", ID_EDIT_FIND + MENUITEM "Найти &далее\tF3", ID_EDIT_FINDNEXT END - POPUP "&" + POPUP "&Вид" BEGIN - MENUITEM " &", ID_VIEW_STATUSBAR + MENUITEM "Строка &состояния", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&", ID_VIEW_SPLIT + MENUITEM "&Разделить", ID_VIEW_SPLIT MENUITEM SEPARATOR - MENUITEM "&\tF5", ID_VIEW_REFRESH + MENUITEM "&Обновить\tF5", ID_VIEW_REFRESH END - POPUP "&" + POPUP "&Избранное" BEGIN - MENUITEM "& ", ID_FAVOURITES_ADDTOFAVOURITES, GRAYED + MENUITEM "&Добавить в избранное", ID_FAVOURITES_ADDTOFAVOURITES, GRAYED - MENUITEM "& ", ID_FAVOURITES_REMOVEFAVOURITE, GRAYED + MENUITEM "&Удалить из избранного", ID_FAVOURITES_REMOVEFAVOURITE, GRAYED END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "&", ID_HELP_HELPTOPICS + MENUITEM "&Содержание", ID_HELP_HELPTOPICS MENUITEM SEPARATOR - MENUITEM "& ", ID_HELP_ABOUT + MENUITEM "&О редакторе реестра", ID_HELP_ABOUT END END @@ -120,47 +120,47 @@ IDR_POPUP_MENUS MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&", ID_EDIT_MODIFY - MENUITEM "& ", ID_EDIT_MODIFY_BIN + MENUITEM "&Изменить", ID_EDIT_MODIFY + MENUITEM "И&зменить двоичные данные", ID_EDIT_MODIFY_BIN MENUITEM SEPARATOR - MENUITEM "&\tDel", ID_EDIT_DELETE - MENUITEM "&", ID_EDIT_RENAME + MENUITEM "&Удалить\tDel", ID_EDIT_DELETE + MENUITEM "&Переименовать", ID_EDIT_RENAME END POPUP "" BEGIN - POPUP "&" + POPUP "Созд&ать" BEGIN - MENUITEM "&", ID_EDIT_NEW_KEY + MENUITEM "&Ключ", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_NEW_STRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_BINARYVALUE - MENUITEM "& DWORD", ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Строковый параметр", ID_EDIT_NEW_STRINGVALUE + MENUITEM "&Двоичный параметр", ID_EDIT_NEW_BINARYVALUE + MENUITEM "&Параметр DWORD", ID_EDIT_NEW_DWORDVALUE MENUITEM "&Multi-String Value", ID_EDIT_NEW_MULTISTRINGVALUE MENUITEM "&Expandable String Value", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END END POPUP "" BEGIN - MENUITEM "/", ID_TREE_EXPANDBRANCH - POPUP "&" + MENUITEM "Развернуть/Свернуть", ID_TREE_EXPANDBRANCH + POPUP "Созд&ать" BEGIN - MENUITEM "&", ID_EDIT_NEW_KEY + MENUITEM "&Ключ", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_NEW_STRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_BINARYVALUE - MENUITEM "& DWORD", ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Строковый параметр", ID_EDIT_NEW_STRINGVALUE + MENUITEM "&Двоичный параметр", ID_EDIT_NEW_BINARYVALUE + MENUITEM "&Параметр DWORD", ID_EDIT_NEW_DWORDVALUE MENUITEM "&Multi-String Value", ID_EDIT_NEW_MULTISTRINGVALUE MENUITEM "&Expandable String Value", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END - MENUITEM "&", ID_EDIT_FIND + MENUITEM "&Найти", ID_EDIT_FIND MENUITEM SEPARATOR - MENUITEM "&", ID_TREE_DELETE - MENUITEM "&", ID_TREE_RENAME + MENUITEM "&Удалить", ID_TREE_DELETE + MENUITEM "&Переименовать", ID_TREE_RENAME MENUITEM SEPARATOR - MENUITEM "&", ID_TREE_EXPORT - MENUITEM "&...", ID_TREE_PERMISSIONS, GRAYED + MENUITEM "&Экспорт", ID_TREE_EXPORT + MENUITEM "Разре&шения...", ID_TREE_PERMISSIONS, GRAYED MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_COPYKEYNAME + MENUITEM "&Копировать имя ключа", ID_EDIT_COPYKEYNAME END POPUP "" BEGIN @@ -191,204 +191,311 @@ FONT 8, "Ms Shell Dlg" IDD_EDIT_STRING DIALOGEX 32, 24, 252, 84 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Изменение строкового параметра" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:", IDC_STATIC, 6, 6, 134, 8 + LTEXT "&Параметр:", IDC_STATIC, 6, 6, 134, 8 EDITTEXT IDC_VALUE_NAME, 6, 17, 240, 12, ES_AUTOHSCROLL | ES_READONLY - LTEXT "&:", IDC_STATIC, 6, 35, 161, 8 + LTEXT "&Значение:", IDC_STATIC, 6, 35, 161, 8 EDITTEXT IDC_VALUE_DATA, 6, 46, 240, 12, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 142, 64, 50, 14 - PUSHBUTTON "", IDCANCEL, 196, 64, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 196, 64, 50, 14 END IDD_EDIT_MULTI_STRING DIALOGEX 32, 24, 252, 174 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Изменение мультистрочного параметра" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:", IDC_STATIC, 6, 6, 134, 8 + LTEXT "&Параметр:", IDC_STATIC, 6, 6, 134, 8 EDITTEXT IDC_VALUE_NAME, 6, 17, 240, 12, ES_AUTOHSCROLL | ES_READONLY - LTEXT "&:", IDC_STATIC, 6, 35, 161, 8 + LTEXT "&Значение:", IDC_STATIC, 6, 35, 161, 8 EDITTEXT IDC_VALUE_DATA, 6, 46, 240, 102, ES_AUTOHSCROLL | ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 142, 154, 50, 14 - PUSHBUTTON "", IDCANCEL, 196, 154, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 196, 154, 50, 14 END IDD_EDIT_BIN_DATA DIALOGEX 32, 24, 252, 174 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Изменение двоичного параметра" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:", IDC_STATIC, 6, 6, 134, 8 + LTEXT "&Параметр:", IDC_STATIC, 6, 6, 134, 8 EDITTEXT IDC_VALUE_NAME, 6, 17, 240, 12, ES_AUTOHSCROLL | ES_READONLY - LTEXT "&:", IDC_STATIC, 6, 35, 161, 8 + LTEXT "&Значение:", IDC_STATIC, 6, 35, 161, 8 CONTROL "", IDC_VALUE_DATA, "HexEdit32", WS_VSCROLL | WS_BORDER | WS_TABSTOP, 6, 46, 240, 102 DEFPUSHBUTTON "OK", IDOK, 142, 154, 50, 14 - PUSHBUTTON "", IDCANCEL, 196, 154, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 196, 154, 50, 14 END IDD_EDIT_DWORD DIALOGEX 32, 24, 252, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " DWORD" +CAPTION "Изменение параметра DWORD" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:", IDC_STATIC, 6, 6, 134, 8 + LTEXT "&Параметр:", IDC_STATIC, 6, 6, 134, 8 EDITTEXT IDC_VALUE_NAME, 6, 17, 240, 12, ES_AUTOHSCROLL | ES_READONLY - LTEXT "&:", IDC_STATIC, 6, 35, 161, 8 + LTEXT "&Значение:", IDC_STATIC, 6, 35, 161, 8 EDITTEXT IDC_VALUE_DATA, 6, 46, 116, 12, ES_AUTOHSCROLL - GROUPBOX " ", IDC_STATIC, 130, 35, 116, 39 - AUTORADIOBUTTON "&", IDC_FORMAT_HEX, 141, 46, 90, 10, WS_GROUP - AUTORADIOBUTTON "&", IDC_FORMAT_DEC, 141, 59, 60, 10 + GROUPBOX "Система исчисления", IDC_STATIC, 130, 35, 116, 39 + AUTORADIOBUTTON "&Шестнадцатеричная", IDC_FORMAT_HEX, 141, 46, 90, 10, WS_GROUP + AUTORADIOBUTTON "&Десятичная", IDC_FORMAT_DEC, 141, 59, 60, 10 DEFPUSHBUTTON "OK", IDOK, 142, 82, 50, 14 - PUSHBUTTON "", IDCANCEL, 196, 82, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 196, 82, 50, 14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ STRINGTABLE DISCARDABLE BEGIN - IDS_LIST_COLUMN_NAME "" - IDS_LIST_COLUMN_TYPE "" - IDS_LIST_COLUMN_DATA "" + IDS_LIST_COLUMN_NAME "Имя" + IDS_LIST_COLUMN_TYPE "Тип" + IDS_LIST_COLUMN_DATA "Данные" END STRINGTABLE DISCARDABLE BEGIN - IDS_APP_TITLE " " + IDS_APP_TITLE "Редактор реестра" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END STRINGTABLE DISCARDABLE BEGIN - ID_REGISTRY_MENU " " - ID_EDIT_MENU " " - ID_VIEW_MENU " " - ID_FAVOURITES_MENU " " - ID_HELP_MENU " " - ID_EDIT_NEW_MENU " " + ID_REGISTRY_MENU "Содержит команды для работы с регистром в целом" + ID_EDIT_MENU "Содержит команды для редактирования значений или ключей" + ID_VIEW_MENU "Содержит команды для настройки окна реестра" + ID_FAVOURITES_MENU "Содержит команды для доступа к часто используемым ключам" + ID_HELP_MENU "Содержит команды для отображения справки и информации о редакторе реестра" + ID_EDIT_NEW_MENU "Содержит команды для создания новых ключей или значений" END STRINGTABLE DISCARDABLE BEGIN - ID_EDIT_MODIFY " " - ID_EDIT_NEW_KEY " " - ID_EDIT_NEW_STRINGVALUE " " - ID_EDIT_NEW_BINARYVALUE " " - ID_EDIT_NEW_DWORDVALUE " DWORD-" - ID_REGISTRY_IMPORTREGISTRYFILE " " - ID_REGISTRY_EXPORTREGISTRYFILE " " + ID_EDIT_MODIFY "Изменяет значение" + ID_EDIT_NEW_KEY "Добавляет новый ключ" + ID_EDIT_NEW_STRINGVALUE "Добавляет новое строковое значение" + ID_EDIT_NEW_BINARYVALUE "Добавляет новое бинарное значение" + ID_EDIT_NEW_DWORDVALUE "Добавляет новое DWORD-значение" + ID_REGISTRY_IMPORTREGISTRYFILE "Импортирует текстовой файл в реестр" + ID_REGISTRY_EXPORTREGISTRYFILE "Экспортирует весь реестр или его часть в текстовой файл" ID_REGISTRY_LOADHIVE "Loads a hive file into the registry" ID_REGISTRY_UNLOADHIVE "Unloads a hive from the registry" - ID_REGISTRY_CONNECTNETWORKREGISTRY " " + ID_REGISTRY_CONNECTNETWORKREGISTRY "Подключается к реестру удалённого компьютера" - ID_REGISTRY_DISCONNECTNETWORKREGISTRY " " + ID_REGISTRY_DISCONNECTNETWORKREGISTRY "Отключается от реестра удалённого компьютера" - ID_REGISTRY_PRINT " " -/* ID_HELP_HELPTOPICS " " */ - ID_HELP_ABOUT " , " + ID_REGISTRY_PRINT "Печатает весь реестр или ого часть" +/* ID_HELP_HELPTOPICS "Открывает справку редактора реестра" */ + ID_HELP_ABOUT "Отображает информацию о программе, номер версии и авторские права" END STRINGTABLE DISCARDABLE BEGIN - ID_REGISTRY_EXIT " " - ID_FAVOURITES_ADDTOFAVOURITES " " - ID_FAVOURITES_REMOVEFAVOURITE " " - ID_VIEW_STATUSBAR " " - ID_VIEW_SPLIT " " - ID_VIEW_REFRESH " " - ID_EDIT_DELETE " " - ID_EDIT_RENAME " " - ID_EDIT_COPYKEYNAME " " - ID_EDIT_FIND " , " - ID_EDIT_FINDNEXT " , " + ID_REGISTRY_EXIT "Выход из редактора реестра" + ID_FAVOURITES_ADDTOFAVOURITES "Добавить ключ в избранное" + ID_FAVOURITES_REMOVEFAVOURITE "Удалить ключ из избранного" + ID_VIEW_STATUSBAR "Показать или скрыть строку состояния" + ID_VIEW_SPLIT "Изменить позицию разделителя между двумя панелями" + ID_VIEW_REFRESH "Обновляет окно" + ID_EDIT_DELETE "Удаляет выделение" + ID_EDIT_RENAME "Переименовывает выделение" + ID_EDIT_COPYKEYNAME "Копирует имя выделенного ключа в буфер обмена" + ID_EDIT_FIND "Ищет текстовую строку в ключе, значении или данных" + ID_EDIT_FINDNEXT "Ищет следующее совпадение текста, заданного в предыдущем поиске" END STRINGTABLE DISCARDABLE BEGIN - IDS_ERROR "" - IDS_WARNING "" - IDS_BAD_KEY " '%s'" - IDS_BAD_VALUE " '%s'" - IDS_UNSUPPORTED_TYPE " (%ld)" - IDS_TOO_BIG_VALUE " (%ld)" - IDS_MULTI_SZ_EMPTY_STRING " REG_MULTI_SZ .\n ." - IDS_QUERY_DELETE_KEY_ONE " ?" - IDS_QUERY_DELETE_KEY_MORE " ?" - IDS_QUERY_DELETE_KEY_CONFIRM " " - IDS_QUERY_DELETE_ONE " ?" - IDS_QUERY_DELETE_MORE " ?" - IDS_QUERY_DELETE_CONFIRM " " - IDS_ERR_DELVAL_CAPTION " " - IDS_ERR_DELETEVALUE " !" - IDS_ERR_RENVAL_CAPTION " " - IDS_ERR_RENVAL_TOEMPTY " %s. . ." - IDS_NEW_KEY " #%d" - IDS_NEW_VALUE " #%d" + IDS_ERROR "Ошибка" + IDS_WARNING "Предупреждение" + IDS_BAD_KEY "Не удалось получить ключ '%s'" + IDS_BAD_VALUE "Не удалось получить значение '%s'" + IDS_UNSUPPORTED_TYPE "Невозможно изменить ключи этого типа (%ld)" + IDS_TOO_BIG_VALUE "Значение слишком большое (%ld)" + IDS_MULTI_SZ_EMPTY_STRING "Данные типа REG_MULTI_SZ не могут содержать пустые строки.\nВсе пустые строки будут удалены." + IDS_QUERY_DELETE_KEY_ONE "Вы действительно хотите удалить этот ключ?" + IDS_QUERY_DELETE_KEY_MORE "Вы действительно хотите удалить эти ключи?" + IDS_QUERY_DELETE_KEY_CONFIRM "Подтверждение удаления ключа" + IDS_QUERY_DELETE_ONE "Вы действительно хотите удалить это значение?" + IDS_QUERY_DELETE_MORE "Вы действительно хотите удалить эти значения?" + IDS_QUERY_DELETE_CONFIRM "Подтверждение удаления значения" + IDS_ERR_DELVAL_CAPTION "Ошибка удаления значения" + IDS_ERR_DELETEVALUE "Невозможно удалить все указанные значения!" + IDS_ERR_RENVAL_CAPTION "Ошибка переименования значения" + IDS_ERR_RENVAL_TOEMPTY "Невозможно переименовать %s. Указанное значение не пустое. Введите другое значение и повторите попытку." + IDS_NEW_KEY "Новый ключ #%d" + IDS_NEW_VALUE "Новое значение #%d" END STRINGTABLE DISCARDABLE BEGIN - IDS_BINARY_EMPTY "( )" - IDS_DEFAULT_VALUE_NAME "( )" - IDS_VALUE_NOT_SET "( )" - IDS_UNKNOWN_TYPE " : (0x%lx)" - IDS_MY_COMPUTER " " - IDS_IMPORT_REG_FILE " " - IDS_EXPORT_REG_FILE " " + IDS_BINARY_EMPTY "(двоичное значение нулевой длины)" + IDS_DEFAULT_VALUE_NAME "(По умолчанию)" + IDS_VALUE_NOT_SET "(значение не установлено)" + IDS_UNKNOWN_TYPE "Неизвестный тип: (0x%lx)" + IDS_MY_COMPUTER "Мой компьютер" + IDS_IMPORT_REG_FILE "Импортирование файла реестра" + IDS_EXPORT_REG_FILE "Экспортирование файла реестра" IDS_LOAD_HIVE "Load Hive" IDS_UNLOAD_HIVE "Unload Hive" - IDS_INVALID_DWORD "( DWORD)" + IDS_INVALID_DWORD "(неправильное значение DWORD)" END STRINGTABLE DISCARDABLE BEGIN - IDS_FLT_REGFILE " " - IDS_FLT_REGFILES " " + IDS_FLT_REGFILE "Файл реестра" + IDS_FLT_REGFILES "Файлы реестра" IDS_FLT_REGFILES_FLT "*.reg" - IDS_FLT_REGEDIT4 " Win9x/NT4 (REGEDIT4)" + IDS_FLT_REGEDIT4 "Файлы реестра Win9x/NT4 (REGEDIT4)" IDS_FLT_REGEDIT4_FLT "*.reg" - IDS_FLT_ALLFILES " (*.*)" + IDS_FLT_ALLFILES "Все файлы (*.*)" IDS_FLT_ALLFILES_FLT "*.*" END STRINGTABLE DISCARDABLE BEGIN - IDS_ACCESS_FULLCONTROL " " - IDS_ACCESS_READ "" - IDS_ACCESS_QUERYVALUE " " - IDS_ACCESS_SETVALUE " " - IDS_ACCESS_CREATESUBKEY " " - IDS_ACCESS_ENUMERATESUBKEYS " " - IDS_ACCESS_NOTIFY "" - IDS_ACCESS_CREATELINK " " - IDS_ACCESS_DELETE "" - IDS_ACCESS_WRITEDAC " DAC" - IDS_ACCESS_WRITEOWNER " " - IDS_ACCESS_READCONTROL " " + IDS_ACCESS_FULLCONTROL "Полный контроль" + IDS_ACCESS_READ "Чтение" + IDS_ACCESS_QUERYVALUE "Запрос значений" + IDS_ACCESS_SETVALUE "Установка значений" + IDS_ACCESS_CREATESUBKEY "Создание подключей" + IDS_ACCESS_ENUMERATESUBKEYS "Перечисление подключей" + IDS_ACCESS_NOTIFY "Уведомление" + IDS_ACCESS_CREATELINK "Создание связи" + IDS_ACCESS_DELETE "Удаление" + IDS_ACCESS_WRITEDAC "Запись DAC" + IDS_ACCESS_WRITEOWNER "Смена владельца" + IDS_ACCESS_READCONTROL "Чтение разрешений" END STRINGTABLE DISCARDABLE BEGIN - IDS_INHERIT_THISKEYONLY " " - IDS_INHERIT_THISKEYANDSUBKEYS " " - IDS_INHERIT_SUBKEYSONLY " " + IDS_INHERIT_THISKEYONLY "Только этот ключ" + IDS_INHERIT_THISKEYANDSUBKEYS "Только этот ключ и подключи" + IDS_INHERIT_SUBKEYSONLY "Только подключи" END STRINGTABLE DISCARDABLE BEGIN - IDS_EXPAND "&" - IDS_COLLAPSE "&" - IDS_GOTO_SUGGESTED_KEY "& '%s'" - IDS_FINISHEDFIND " ." + IDS_EXPAND "&Развернуть" + IDS_COLLAPSE "&Свернуть" + IDS_GOTO_SUGGESTED_KEY "&Перейти к '%s'" + IDS_FINISHEDFIND "Поиск в реестре завершен." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Добавить данные в реестр?" + IDS_IMPORTED_OK "Информация добавлена в реестр" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" END /*****************************************************************/ @@ -403,66 +510,66 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_B FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", IDC_STATIC, 2, 0, 366, 48 - CONTROL "& ", IDC_EXPORT_ALL, "Button", BS_AUTORADIOBUTTON, 10, 10, 70, 11 - CONTROL "& ", IDC_EXPORT_BRANCH, "Button", BS_AUTORADIOBUTTON, 10, 22, 100, 11 + GROUPBOX "Диапазон экспорта", IDC_STATIC, 2, 0, 366, 48 + CONTROL "&Весь реестр", IDC_EXPORT_ALL, "Button", BS_AUTORADIOBUTTON, 10, 10, 70, 11 + CONTROL "В&ыбранная ветвь", IDC_EXPORT_BRANCH, "Button", BS_AUTORADIOBUTTON, 10, 22, 100, 11 EDITTEXT IDC_EXPORT_BRANCH_TEXT, 30, 34, 335, 12 END IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 187, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Добавить в избранное" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", IDOK, 130, 7, 50, 14 - PUSHBUTTON "", IDCANCEL, 130, 24, 50, 14 - LTEXT "&:", IDC_STATIC, 7, 7, 70, 10 + PUSHBUTTON "Отмена", IDCANCEL, 130, 24, 50, 14 + LTEXT "&Имя:", IDC_STATIC, 7, 7, 70, 10 EDITTEXT IDC_FAVORITENAME, 7, 26, 110, 13, ES_AUTOHSCROLL END IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Удалить из избранного" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", IDOK, 107, 114, 50, 14 - PUSHBUTTON "", IDCANCEL, 7, 114, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 7, 114, 50, 14 CONTROL "List1", IDC_FAVORITESLIST, "SysListView32", LVS_LIST | WS_BORDER | WS_TABSTOP, 7, 20, 150, 90 - LTEXT " :", IDC_STATIC, 7, 7, 99, 12 + LTEXT "Выберите удаляемое:", IDC_STATIC, 7, 7, 99, 12 END IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Поиск" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "& ", IDOK, 193, 7, 58, 14 - PUSHBUTTON "", IDCANCEL, 193, 24, 58, 14 - GROUPBOX "", IDC_STATIC, 7, 24, 87, 51 - LTEXT "&:", IDC_STATIC, 7, 8, 37, 10 + DEFPUSHBUTTON "&Искать далее", IDOK, 193, 7, 58, 14 + PUSHBUTTON "Отмена", IDCANCEL, 193, 24, 58, 14 + GROUPBOX "Просматривать", IDC_STATIC, 7, 24, 87, 51 + LTEXT "На&йти:", IDC_STATIC, 7, 8, 37, 10 EDITTEXT IDC_FINDWHAT, 47, 7, 142, 13, ES_AUTOHSCROLL - CONTROL "&", IDC_LOOKAT_KEYS, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 36, 51, 8 + CONTROL "&Ключи", IDC_LOOKAT_KEYS, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 36, 51, 8 - CONTROL "&", IDC_LOOKAT_VALUES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 48, 51, 8 + CONTROL "&Значения", IDC_LOOKAT_VALUES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 48, 51, 8 - CONTROL "&", IDC_LOOKAT_DATA, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 60, 51, 8 + CONTROL "&Данные", IDC_LOOKAT_DATA, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 60, 51, 8 - CONTROL "& ", IDC_MATCHSTRING, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 109, 44, 136, 13 + CONTROL "&Искать только строку целиком", IDC_MATCHSTRING, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 109, 44, 136, 13 - CONTROL "& ", IDC_MATCHCASE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 109, 60, 90, 12 + CONTROL "&С учетом регистра", IDC_MATCHCASE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 109, 60, 90, 12 END IDD_FINDING DIALOGEX 0, 0, 145, 50 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Поиск" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ICON IDI_REGEDIT, IDC_STATIC, 7, 7, 20, 20 - DEFPUSHBUTTON "&", IDCANCEL, 93, 29, 45, 14 - LTEXT " ...", IDC_STATIC, 33, 12, 83, 8 + DEFPUSHBUTTON "&Отмена", IDCANCEL, 93, 29, 45, 14 + LTEXT "Поиск в реестре...", IDC_STATIC, 33, 12, 83, 8 END /* @@ -483,8 +590,8 @@ END /* *STRINGTABLE DISCARDABLE *BEGIN - * ID_HELP_HELPTOPICS " ." - * ID_HELP_ABOUT " , ." + * ID_HELP_HELPTOPICS "Открывает справку редактора реестра." + * ID_HELP_ABOUT "Отображает информацию о программе, номер версии и авторские права." *END */ diff --git a/base/applications/regedit/lang/sk-SK.rc b/base/applications/regedit/lang/sk-SK.rc index b6cb4754993..026856c15d0 100644 --- a/base/applications/regedit/lang/sk-SK.rc +++ b/base/applications/regedit/lang/sk-SK.rc @@ -233,6 +233,53 @@ BEGIN PUSHBUTTON "Zrui",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -378,6 +425,66 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/sl-SI.rc b/base/applications/regedit/lang/sl-SI.rc index 0be7a429a8a..45cea15cc10 100644 --- a/base/applications/regedit/lang/sl-SI.rc +++ b/base/applications/regedit/lang/sl-SI.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/sv-SE.rc b/base/applications/regedit/lang/sv-SE.rc index 8a890d7a48d..51ba6ba11ab 100644 --- a/base/applications/regedit/lang/sv-SE.rc +++ b/base/applications/regedit/lang/sv-SE.rc @@ -246,6 +246,53 @@ BEGIN PUSHBUTTON "Avbryt",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -391,6 +438,66 @@ BEGIN IDS_FINISHEDFIND "Slutfrt skningen av registret." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/th-TH.rc b/base/applications/regedit/lang/th-TH.rc index 51aa5da0a8f..3dffba358e5 100644 --- a/base/applications/regedit/lang/th-TH.rc +++ b/base/applications/regedit/lang/th-TH.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/lang/uk-UA.rc b/base/applications/regedit/lang/uk-UA.rc index 6f98e38c0eb..ee1671fb647 100644 --- a/base/applications/regedit/lang/uk-UA.rc +++ b/base/applications/regedit/lang/uk-UA.rc @@ -1,4 +1,4 @@ -/* +/* * Regedit (Ukrainian resources) * * Copyright 2006,2007 Artem Reznikov @@ -36,84 +36,84 @@ END IDC_REGEDIT MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&", ID_REGISTRY_EXIT + MENUITEM "В&ихід", ID_REGISTRY_EXIT END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "& ", ID_HELP_ABOUT + MENUITEM "Пр&о програму", ID_HELP_ABOUT END END IDR_REGEDIT_MENU MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "Фа&йл" BEGIN - MENUITEM "&...", ID_REGISTRY_IMPORTREGISTRYFILE + MENUITEM "&Імпорт...", ID_REGISTRY_IMPORTREGISTRYFILE - MENUITEM "&...", ID_REGISTRY_EXPORTREGISTRYFILE + MENUITEM "&Експорт...", ID_REGISTRY_EXPORTREGISTRYFILE MENUITEM SEPARATOR - MENUITEM " ...", ID_REGISTRY_LOADHIVE, GRAYED - MENUITEM " ...", ID_REGISTRY_UNLOADHIVE, GRAYED + MENUITEM "Завантажити файл реєстру...", ID_REGISTRY_LOADHIVE, GRAYED + MENUITEM "Вивантажити файл реєстру...", ID_REGISTRY_UNLOADHIVE, GRAYED MENUITEM SEPARATOR - MENUITEM "&ϳ ...", + MENUITEM "&Підключити мережевий реєстр...", ID_REGISTRY_CONNECTNETWORKREGISTRY - MENUITEM "&³ ...", + MENUITEM "&Відключити мережевий реєстр...", ID_REGISTRY_DISCONNECTNETWORKREGISTRY , GRAYED MENUITEM SEPARATOR - MENUITEM "&\tCtrl+P", ID_REGISTRY_PRINT, GRAYED + MENUITEM "Д&рук\tCtrl+P", ID_REGISTRY_PRINT, GRAYED MENUITEM SEPARATOR - MENUITEM "&", ID_REGISTRY_EXIT + MENUITEM "В&ихід", ID_REGISTRY_EXIT END - POPUP "&" + POPUP "Пра&вка" BEGIN - MENUITEM "&", ID_EDIT_MODIFY + MENUITEM "&Змінити", ID_EDIT_MODIFY MENUITEM SEPARATOR - POPUP "&" + POPUP "&Створити" BEGIN - MENUITEM "&", ID_EDIT_NEW_KEY + MENUITEM "Роз&діл", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_NEW_STRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_BINARYVALUE - MENUITEM "&DWORD ", ID_EDIT_NEW_DWORDVALUE - MENUITEM "& ", ID_EDIT_NEW_MULTISTRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_EXPANDABLESTRINGVALUE + MENUITEM "&Рядкове значення", ID_EDIT_NEW_STRINGVALUE + MENUITEM "&Двійкове значення", ID_EDIT_NEW_BINARYVALUE + MENUITEM "&DWORD значення", ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Багаторядкове значення", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "Роз&ширюване рядкове значення", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END MENUITEM SEPARATOR - MENUITEM "&...", ID_EDIT_PERMISSIONS + MENUITEM "Дозв&оли...", ID_EDIT_PERMISSIONS MENUITEM SEPARATOR - MENUITEM "&\tDel", ID_EDIT_DELETE - MENUITEM "&", ID_EDIT_RENAME + MENUITEM "В&идалити\tDel", ID_EDIT_DELETE + MENUITEM "Перей&менувати", ID_EDIT_RENAME MENUITEM SEPARATOR - MENUITEM "& ' ", ID_EDIT_COPYKEYNAME + MENUITEM "&Копіювати ім'я розділу", ID_EDIT_COPYKEYNAME MENUITEM SEPARATOR - MENUITEM "&\tCtrl+F", ID_EDIT_FIND - MENUITEM "& \tF3", ID_EDIT_FINDNEXT + MENUITEM "З&найти\tCtrl+F", ID_EDIT_FIND + MENUITEM "Зна&йти далі\tF3", ID_EDIT_FINDNEXT END - POPUP "&" + POPUP "&Вигляд" BEGIN - MENUITEM "& ", ID_VIEW_STATUSBAR + MENUITEM "&Рядок стану", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&", ID_VIEW_SPLIT + MENUITEM "Роз&ділити", ID_VIEW_SPLIT MENUITEM SEPARATOR - MENUITEM "&\tF5", ID_VIEW_REFRESH + MENUITEM "&Оновити\tF5", ID_VIEW_REFRESH END - POPUP "&" + POPUP "Обр&ане" BEGIN - MENUITEM "& ", ID_FAVOURITES_ADDTOFAVOURITES + MENUITEM "&Додати в обране", ID_FAVOURITES_ADDTOFAVOURITES , GRAYED - MENUITEM "& ", ID_FAVOURITES_REMOVEFAVOURITE + MENUITEM "В&идалити з обраного", ID_FAVOURITES_REMOVEFAVOURITE , GRAYED END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "&\tF1", ID_HELP_HELPTOPICS + MENUITEM "&Зміст\tF1", ID_HELP_HELPTOPICS MENUITEM SEPARATOR - MENUITEM "& ", ID_HELP_ABOUT + MENUITEM "&Про редактор реєстру", ID_HELP_ABOUT END END @@ -121,47 +121,47 @@ IDR_POPUP_MENUS MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&", ID_EDIT_MODIFY - MENUITEM " ", ID_EDIT_MODIFY_BIN + MENUITEM "&Змінити", ID_EDIT_MODIFY + MENUITEM "Змінити двійкові дані", ID_EDIT_MODIFY_BIN MENUITEM SEPARATOR - MENUITEM "&\tDel", ID_EDIT_DELETE - MENUITEM "&", ID_EDIT_RENAME + MENUITEM "В&идалити\tDel", ID_EDIT_DELETE + MENUITEM "Перей&менувати", ID_EDIT_RENAME END POPUP "" BEGIN - POPUP "&" + POPUP "&Створити" BEGIN - MENUITEM "&", ID_EDIT_NEW_KEY + MENUITEM "Роз&діл", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_NEW_STRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_BINARYVALUE - MENUITEM "&DWORD ", ID_EDIT_NEW_DWORDVALUE - MENUITEM "& ", ID_EDIT_NEW_MULTISTRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_EXPANDABLESTRINGVALUE + MENUITEM "&Рядкове значення", ID_EDIT_NEW_STRINGVALUE + MENUITEM "&Двійкове значення", ID_EDIT_NEW_BINARYVALUE + MENUITEM "&DWORD значення", ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Багаторядкове значення", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "&Розширюване рядкове значення", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END END POPUP "" BEGIN - MENUITEM "/", ID_TREE_EXPANDBRANCH - POPUP "&" + MENUITEM "Розгорнути/Згорнути", ID_TREE_EXPANDBRANCH + POPUP "&Створити" BEGIN - MENUITEM "&", ID_EDIT_NEW_KEY + MENUITEM "Роз&діл", ID_EDIT_NEW_KEY MENUITEM SEPARATOR - MENUITEM "& ", ID_EDIT_NEW_STRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_BINARYVALUE - MENUITEM "&DWORD ", ID_EDIT_NEW_DWORDVALUE - MENUITEM "& ", ID_EDIT_NEW_MULTISTRINGVALUE - MENUITEM "& ", ID_EDIT_NEW_EXPANDABLESTRINGVALUE + MENUITEM "&Рядкове значення", ID_EDIT_NEW_STRINGVALUE + MENUITEM "&Двійкове значення", ID_EDIT_NEW_BINARYVALUE + MENUITEM "&DWORD значення", ID_EDIT_NEW_DWORDVALUE + MENUITEM "&Багаторядкове значення", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "&Розширюване рядкове значення", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END - MENUITEM "&", ID_EDIT_FIND + MENUITEM "З&найти", ID_EDIT_FIND MENUITEM SEPARATOR - MENUITEM "&", ID_TREE_DELETE - MENUITEM "&", ID_TREE_RENAME + MENUITEM "В&идалити", ID_TREE_DELETE + MENUITEM "Перей&менувати", ID_TREE_RENAME MENUITEM SEPARATOR - MENUITEM "&", ID_TREE_EXPORT - MENUITEM "&...", ID_TREE_PERMISSIONS, GRAYED + MENUITEM "&Експорт", ID_TREE_EXPORT + MENUITEM "&Дозволи...", ID_TREE_PERMISSIONS, GRAYED MENUITEM SEPARATOR - MENUITEM "& ' ", ID_EDIT_COPYKEYNAME + MENUITEM "&Копіювати ім'я розділу", ID_EDIT_COPYKEYNAME END POPUP "" BEGIN @@ -192,206 +192,313 @@ FONT 8, "Ms Shell Dlg" IDD_EDIT_STRING DIALOGEX 32, 24, 252, 84 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Редагування рядка" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :",IDC_STATIC,6,6,134,8 + LTEXT "&Назва значення:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "& :",IDC_STATIC,6,35,161,8 + LTEXT "&Дані значення:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,240,12,ES_AUTOHSCROLL DEFPUSHBUTTON "OK",IDOK,142,64,50,14 - PUSHBUTTON "",IDCANCEL,196,64,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,196,64,50,14 END IDD_EDIT_MULTI_STRING DIALOGEX 32, 24, 252, 174 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Редагування багаторядкового значення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :",IDC_STATIC,6,6,134,8 + LTEXT "&Назва значення:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "& :",IDC_STATIC,6,35,161,8 + LTEXT "&Дані значення:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,240,102,ES_AUTOHSCROLL | ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL | WS_VSCROLL DEFPUSHBUTTON "OK",IDOK,142,154,50,14 - PUSHBUTTON "",IDCANCEL,196,154,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,196,154,50,14 END IDD_EDIT_BIN_DATA DIALOGEX 32, 24, 252, 174 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Редагування двійкового значення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :",IDC_STATIC,6,6,134,8 + LTEXT "&Назва значення:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "& :",IDC_STATIC,6,35,161,8 + LTEXT "&Дані значення:",IDC_STATIC,6,35,161,8 CONTROL "",IDC_VALUE_DATA,"HexEdit32",WS_VSCROLL | WS_BORDER | WS_TABSTOP,6,46,240,102 DEFPUSHBUTTON "OK",IDOK,142,154,50,14 - PUSHBUTTON "",IDCANCEL,196,154,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,196,154,50,14 END IDD_EDIT_DWORD DIALOGEX 32, 24, 252, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " DWORD " +CAPTION "Редагування DWORD значення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :",IDC_STATIC,6,6,134,8 + LTEXT "&Назва значення:",IDC_STATIC,6,6,134,8 EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "& :",IDC_STATIC,6,35,161,8 + LTEXT "&Дані значення:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,116,12,ES_AUTOHSCROLL - GROUPBOX "",IDC_STATIC,130,35,116,39 - AUTORADIOBUTTON "&س",IDC_FORMAT_HEX,141,46,60,10,WS_GROUP - AUTORADIOBUTTON "&",IDC_FORMAT_DEC,141,59,60,10 + GROUPBOX "Основа",IDC_STATIC,130,35,116,39 + AUTORADIOBUTTON "&Шістнадцяткова",IDC_FORMAT_HEX,141,46,60,10,WS_GROUP + AUTORADIOBUTTON "&Десяткова",IDC_FORMAT_DEC,141,59,60,10 DEFPUSHBUTTON "OK",IDOK,142,82,50,14 - PUSHBUTTON "",IDCANCEL,196,82,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ STRINGTABLE DISCARDABLE BEGIN - IDS_LIST_COLUMN_NAME "'" - IDS_LIST_COLUMN_TYPE "" - IDS_LIST_COLUMN_DATA "" + IDS_LIST_COLUMN_NAME "Ім'я" + IDS_LIST_COLUMN_TYPE "Тип" + IDS_LIST_COLUMN_DATA "Дані" END STRINGTABLE DISCARDABLE BEGIN - IDS_APP_TITLE " " + IDS_APP_TITLE "Редактор реєстру" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END STRINGTABLE DISCARDABLE BEGIN - ID_REGISTRY_MENU "̳ " - ID_EDIT_MENU "̳ " - ID_VIEW_MENU "̳ " - ID_FAVOURITES_MENU "̳ , " - ID_HELP_MENU "̳ " - ID_EDIT_NEW_MENU "̳ " + ID_REGISTRY_MENU "Містить команди для роботи з реєстром у цілому" + ID_EDIT_MENU "Містить команди для редагування значень або розділів" + ID_VIEW_MENU "Містить команди для настроювання вікна реєстра" + ID_FAVOURITES_MENU "Містить команди для доступу до розділів, що часто вживаються" + ID_HELP_MENU "Містить команди для відображення довідки та інформації про редактор реєстра" + ID_EDIT_NEW_MENU "Містить команди для створення нових розділів або значень" END STRINGTABLE DISCARDABLE BEGIN - ID_EDIT_MODIFY " " - ID_EDIT_NEW_KEY " " - ID_EDIT_NEW_STRINGVALUE " " - ID_EDIT_NEW_BINARYVALUE " " - ID_EDIT_NEW_DWORDVALUE " DWORD-" - ID_REGISTRY_IMPORTREGISTRYFILE " " + ID_EDIT_MODIFY "Змінює дані значення" + ID_EDIT_NEW_KEY "Додає новий розділ" + ID_EDIT_NEW_STRINGVALUE "Додає нове рядкове значення" + ID_EDIT_NEW_BINARYVALUE "Додає нове двійкове значення" + ID_EDIT_NEW_DWORDVALUE "Додає нове DWORD-значення" + ID_REGISTRY_IMPORTREGISTRYFILE "Імпортує текстовий файл до реєстру" ID_REGISTRY_EXPORTREGISTRYFILE - " " + "Експортує весь реєстр або його частину в текстовий файл" ID_REGISTRY_LOADHIVE "Loads a hive file into the registry" ID_REGISTRY_UNLOADHIVE "Unloads a hive from the registry" ID_REGISTRY_CONNECTNETWORKREGISTRY - "ϳ '" + "Підключається до реєстру віддаленого комп'ютера" ID_REGISTRY_DISCONNECTNETWORKREGISTRY - "³ '" - ID_REGISTRY_PRINT " " -/* ID_HELP_HELPTOPICS "³ " */ - ID_HELP_ABOUT "³ , " + "Відключається від реєстру віддаленого комп'ютера" + ID_REGISTRY_PRINT "Друкує весь реєстр або його частину" +/* ID_HELP_HELPTOPICS "Відкриває довідку редактора реєстра" */ + ID_HELP_ABOUT "Відображає інформацію про програму, номер версії та авторство" END STRINGTABLE DISCARDABLE BEGIN - ID_REGISTRY_EXIT " " - ID_FAVOURITES_ADDTOFAVOURITES " " - ID_FAVOURITES_REMOVEFAVOURITE " " - ID_VIEW_STATUSBAR "³ " - ID_VIEW_SPLIT " " - ID_VIEW_REFRESH " " - ID_EDIT_DELETE " " - ID_EDIT_RENAME " " - ID_EDIT_COPYKEYNAME " ' " - ID_EDIT_FIND " , " - ID_EDIT_FINDNEXT " , " + ID_REGISTRY_EXIT "Виходить з редактора реєстру" + ID_FAVOURITES_ADDTOFAVOURITES "Додає розділ до обраного" + ID_FAVOURITES_REMOVEFAVOURITE "Видаляє розділ з обраного" + ID_VIEW_STATUSBAR "Відображує або ховає рядок стану" + ID_VIEW_SPLIT "Змінити позицію роздільника між двома панелями" + ID_VIEW_REFRESH "Оновлює вікно" + ID_EDIT_DELETE "Видаляє вибір" + ID_EDIT_RENAME "Перейменовує вибір" + ID_EDIT_COPYKEYNAME "Копіює ім'я вибраного розділу до буфера" + ID_EDIT_FIND "Шукає текстовий рядок у розділі, значенні або даних" + ID_EDIT_FINDNEXT "Шукає наступний збіг тексту, заданого в попередньому пошуку" END STRINGTABLE DISCARDABLE BEGIN - IDS_ERROR "" - IDS_WARNING "" - IDS_BAD_KEY " '%s'" - IDS_BAD_VALUE " '%s'" - IDS_UNSUPPORTED_TYPE " (%ld)" - IDS_TOO_BIG_VALUE " (%ld)" - IDS_MULTI_SZ_EMPTY_STRING " REG_MULTI_SZ \n ." - IDS_QUERY_DELETE_KEY_ONE " , ?" - IDS_QUERY_DELETE_KEY_MORE " , ?" - IDS_QUERY_DELETE_KEY_CONFIRM "ϳ " - IDS_QUERY_DELETE_ONE " , ?" - IDS_QUERY_DELETE_MORE " , ?" - IDS_QUERY_DELETE_CONFIRM "ϳ " - IDS_ERR_DELVAL_CAPTION " " - IDS_ERR_DELETEVALUE " !" - IDS_ERR_RENVAL_CAPTION " " - IDS_ERR_RENVAL_TOEMPTY " %s. ' . ' ." - IDS_NEW_KEY " #%d" - IDS_NEW_VALUE " #%d" + IDS_ERROR "Помилка" + IDS_WARNING "Увага" + IDS_BAD_KEY "Не можу запросити розділ '%s'" + IDS_BAD_VALUE "Не можу запросити значення '%s'" + IDS_UNSUPPORTED_TYPE "Не можу редагувати розділи цього типу (%ld)" + IDS_TOO_BIG_VALUE "Значення завелике (%ld)" + IDS_MULTI_SZ_EMPTY_STRING "Дані типу REG_MULTI_SZ не можуть містити порожні рядки\nПорожні рядки були видалені зі списку." + IDS_QUERY_DELETE_KEY_ONE "Ви впевнені, що хочете видалити цей розділ?" + IDS_QUERY_DELETE_KEY_MORE "Ви впевнені, що хочете видалити ці розділи?" + IDS_QUERY_DELETE_KEY_CONFIRM "Підтвердження видалення розділу" + IDS_QUERY_DELETE_ONE "Ви впевнені, що хочете видалити це значення?" + IDS_QUERY_DELETE_MORE "Ви впевнені, що хочете видалити ці значення?" + IDS_QUERY_DELETE_CONFIRM "Підтвердження видалення значення" + IDS_ERR_DELVAL_CAPTION "Помилка при видаленні значень" + IDS_ERR_DELETEVALUE "Неможливо видалити усі задані значення!" + IDS_ERR_RENVAL_CAPTION "Помилка при перейменуванні значення" + IDS_ERR_RENVAL_TOEMPTY "Не можу перейменувати %s. Ім'я заданого значення порожнє. Спробуйте інше ім'я та повторіть спробу." + IDS_NEW_KEY "Новий розділ #%d" + IDS_NEW_VALUE "Нове значення #%d" END STRINGTABLE DISCARDABLE BEGIN - IDS_BINARY_EMPTY "( )" - IDS_DEFAULT_VALUE_NAME "( )" - IDS_VALUE_NOT_SET "( )" - IDS_UNKNOWN_TYPE " : (0x%lx)" - IDS_MY_COMPUTER "̳ '" - IDS_IMPORT_REG_FILE " " - IDS_EXPORT_REG_FILE " " + IDS_BINARY_EMPTY "(двійкове значення нульової довжини)" + IDS_DEFAULT_VALUE_NAME "(За замовчуванням)" + IDS_VALUE_NOT_SET "(значення не встановлене)" + IDS_UNKNOWN_TYPE "Невідомий тип: (0x%lx)" + IDS_MY_COMPUTER "Мій комп'ютер" + IDS_IMPORT_REG_FILE "Імпортувати файл реєстру" + IDS_EXPORT_REG_FILE "Експортувати файл реєстру" IDS_LOAD_HIVE "Load Hive" IDS_UNLOAD_HIVE "Unload Hive" - IDS_INVALID_DWORD "( DWORD)" + IDS_INVALID_DWORD "(Неправильне значення DWORD)" END STRINGTABLE DISCARDABLE BEGIN - IDS_FLT_REGFILE " " - IDS_FLT_REGFILES " " + IDS_FLT_REGFILE "Файл реєстру" + IDS_FLT_REGFILES "Файли реєстру" IDS_FLT_REGFILES_FLT "*.reg" - IDS_FLT_REGEDIT4 " Win9x/NT4 (REGEDIT4)" + IDS_FLT_REGEDIT4 "Файли реєстру Win9x/NT4 (REGEDIT4)" IDS_FLT_REGEDIT4_FLT "*.reg" - IDS_FLT_ALLFILES " (*.*)" + IDS_FLT_ALLFILES "Усі файли (*.*)" IDS_FLT_ALLFILES_FLT "*.*" END STRINGTABLE DISCARDABLE BEGIN - IDS_ACCESS_FULLCONTROL " " - IDS_ACCESS_READ "" - IDS_ACCESS_QUERYVALUE " " - IDS_ACCESS_SETVALUE " " - IDS_ACCESS_CREATESUBKEY " " - IDS_ACCESS_ENUMERATESUBKEYS " " - IDS_ACCESS_NOTIFY "" - IDS_ACCESS_CREATELINK " '" - IDS_ACCESS_DELETE "" - IDS_ACCESS_WRITEDAC " DAC" - IDS_ACCESS_WRITEOWNER " " - IDS_ACCESS_READCONTROL " " + IDS_ACCESS_FULLCONTROL "Повний контроль" + IDS_ACCESS_READ "Читання" + IDS_ACCESS_QUERYVALUE "Запит значення" + IDS_ACCESS_SETVALUE "Установлення значення" + IDS_ACCESS_CREATESUBKEY "Створення підрозділу" + IDS_ACCESS_ENUMERATESUBKEYS "Перерахування підрозділів" + IDS_ACCESS_NOTIFY "Сповіщення" + IDS_ACCESS_CREATELINK "Створення зв'язку" + IDS_ACCESS_DELETE "Видалення" + IDS_ACCESS_WRITEDAC "Запис DAC" + IDS_ACCESS_WRITEOWNER "Запис власника" + IDS_ACCESS_READCONTROL "Читання дозволу" END STRINGTABLE DISCARDABLE BEGIN - IDS_INHERIT_THISKEYONLY "ҳ " - IDS_INHERIT_THISKEYANDSUBKEYS " " - IDS_INHERIT_SUBKEYSONLY "ҳ " + IDS_INHERIT_THISKEYONLY "Тільки цей розділ" + IDS_INHERIT_THISKEYANDSUBKEYS "Цей розділ та підрозділи" + IDS_INHERIT_SUBKEYSONLY "Тільки підрозділи" END STRINGTABLE DISCARDABLE BEGIN - IDS_EXPAND "&" - IDS_COLLAPSE "&" - IDS_GOTO_SUGGESTED_KEY "& '%s'" - IDS_FINISHEDFIND " ." + IDS_EXPAND "&Розгорнути" + IDS_COLLAPSE "&Згорнути" + IDS_GOTO_SUGGESTED_KEY "&Перейти до '%s'" + IDS_FINISHEDFIND "Пошук у реєстрі завершений." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Додати дані до реєстру?" + IDS_IMPORTED_OK "Інформація була додана до реєстру" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" END /*****************************************************************/ @@ -406,66 +513,66 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "ij ",IDC_STATIC,2,0,366,48 - CONTROL "& ",IDC_EXPORT_ALL,"Button",BS_AUTORADIOBUTTON,10,10, 29,11 - CONTROL "& ",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11 + GROUPBOX "Діапазон експорту",IDC_STATIC,2,0,366,48 + CONTROL "&Весь реєстр",IDC_EXPORT_ALL,"Button",BS_AUTORADIOBUTTON,10,10, 29,11 + CONTROL "Виді&лена гілка",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11 EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Додання до обраного" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,129,7,50,14 - PUSHBUTTON "",IDCANCEL,129,24,50,14 - LTEXT "'& :",IDC_STATIC,7,7,70,10 + PUSHBUTTON "Скасувати",IDCANCEL,129,24,50,14 + LTEXT "Ім'&я обраного розділу:",IDC_STATIC,7,7,70,10 EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Видалення до обраного" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,107,114,50,14 - PUSHBUTTON "",IDCANCEL,7,114,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,7,114,50,14 CONTROL "List1",IDC_FAVORITESLIST,"SysListView32",LVS_LIST | WS_BORDER | WS_TABSTOP,7,20,150,90 - LTEXT " :",IDC_STATIC,7,7,99,12 + LTEXT "Оберіть імена для видалення:",IDC_STATIC,7,7,99,12 END IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Пошук" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "& ",IDOK,197,7,50,14 - PUSHBUTTON "",IDCANCEL,197,24,50,14 - GROUPBOX " ",IDC_STATIC,7,25,63,51 - LTEXT "& :",IDC_STATIC,7,8,37,10 + DEFPUSHBUTTON "Зна&йти далі",IDOK,197,7,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,197,24,50,14 + GROUPBOX "Шукати у",IDC_STATIC,7,25,63,51 + LTEXT "&Що шукати:",IDC_STATIC,7,8,37,10 EDITTEXT IDC_FINDWHAT,47,7,142,13,ES_AUTOHSCROLL - CONTROL "&",IDC_LOOKAT_KEYS,"Button",BS_AUTOCHECKBOX | + CONTROL "&Розділи",IDC_LOOKAT_KEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,36,35,8 - CONTROL "&",IDC_LOOKAT_VALUES,"Button",BS_AUTOCHECKBOX | + CONTROL "&Значення",IDC_LOOKAT_VALUES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,48,36,8 - CONTROL "&",IDC_LOOKAT_DATA,"Button",BS_AUTOCHECKBOX | + CONTROL "&Дані",IDC_LOOKAT_DATA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,60,42,8 - CONTROL "&ҳ ",IDC_MATCHSTRING,"Button", + CONTROL "&Тільки рядки цілком",IDC_MATCHSTRING,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,83,32,94,13 - CONTROL " &",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX | + CONTROL "З урахуванням &регістру",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,83,48,90,12 END IDD_FINDING DIALOGEX 0, 0, 145, 50 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Знайти" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ICON IDI_REGEDIT,IDC_STATIC,7,7,20,20 - DEFPUSHBUTTON "&",IDCANCEL,93,29,45,14 - LTEXT " ...",IDC_STATIC,33,12,83,8 + DEFPUSHBUTTON "&Скасувати",IDCANCEL,93,29,45,14 + LTEXT "Пошук у реєстрі...",IDC_STATIC,33,12,83,8 END /* @@ -486,8 +593,8 @@ END /* *STRINGTABLE DISCARDABLE *BEGIN - * ID_HELP_HELPTOPICS "³ ." - * ID_HELP_ABOUT "³ , , ." + * ID_HELP_HELPTOPICS "Відкриває довідку редактора реєстра." + * ID_HELP_ABOUT "Відображає інформацію про програму, номер версії, та авторські права." *END */ diff --git a/base/applications/regedit/lang/zh-CN.rc b/base/applications/regedit/lang/zh-CN.rc index 8e098469ad3..c1ad4edc2b2 100644 --- a/base/applications/regedit/lang/zh-CN.rc +++ b/base/applications/regedit/lang/zh-CN.rc @@ -248,6 +248,53 @@ BEGIN PUSHBUTTON "ȡ",IDCANCEL,196,82,50,14 END + +IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resource List" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75 + DEFPUSHBUTTON "OK", IDOK, 27, 100, 50, 14 + PUSHBUTTON "Show...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED +} + + +IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | + WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Resources" +FONT 8, "MS Shell Dlg" +{ + LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8 + CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31 + LTEXT "Interrupt:", IDC_STATIC, 10, 48, 35, 8 + CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31 + LTEXT "Memory:", IDC_STATIC, 10, 91, 32, 8 + CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31 + LTEXT "Port:", IDC_STATIC, 10, 134, 38, 8 + CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31 + LTEXT "Device specific data:", IDC_STATIC, 10, 177, 80, 8 + CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31 + GROUPBOX "Usage", IDC_STATIC, 10, 219, 125, 39 + LTEXT "Undetermined", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED + LTEXT "Shared", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED + LTEXT "Device exclusive", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED + LTEXT "Driver exclusive", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED + RTEXT "Interface Type:", IDC_STATIC, 144, 220, 58, 8 + LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8 + RTEXT "Bus Nummer:", IDC_STATIC, 151, 230, 51, 8 + LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8 + RTEXT "Version:", IDC_STATIC, 151, 240, 51, 8 + LTEXT "", IDC_VERSION, 205, 240, 66, 8 + RTEXT "Revision:", IDC_STATIC, 151, 250, 51, 8 + LTEXT "", IDC_REVISION, 205, 250, 66, 8 + DEFPUSHBUTTON "OK",IDOK, 92, 263, 40, 14 + PUSHBUTTON "&Data...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED +} + + /* * String Table */ @@ -393,6 +440,66 @@ BEGIN IDS_FINISHEDFIND "עϡ" END +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUSNUMBER "Bus Number" + IDS_INTERFACE "Interface" + IDS_DMA_CHANNEL "Channel" + IDS_DMA_PORT "Port" + IDS_INTERRUPT_VECTOR "Vector" + IDS_INTERRUPT_LEVEL "Level" + IDS_INTERRUPT_AFFINITY "Affinity" + IDS_INTERRUPT_TYPE "Type" + IDS_MEMORY_ADDRESS "Physical Address" + IDS_MEMORY_LENGTH "Length" + IDS_MEMORY_ACCESS "Access" + IDS_PORT_ADDRESS "Physical Address" + IDS_PORT_LENGTH "Length" + IDS_PORT_ACCESS "Access" + IDS_SPECIFIC_RESERVED1 "Reserved 1" + IDS_SPECIFIC_RESERVED2 "Reserved 2" + IDS_SPECIFIC_DATASIZE "Data Size" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PORT_PORT_IO "Port" + IDS_PORT_MEMORY_IO "Memory" + IDS_INTERRUPT_EDGE_SENSITIVE "Edge Sensitive" + IDS_INTERRUPT_LEVEL_SENSITIVE "Level Sensitive" + IDS_MEMORY_READ_ONLY "Read Only" + IDS_MEMORY_WRITE_ONLY "Write Only" + IDS_MEMORY_READ_WRITE "Read / Write" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BUS_UNDEFINED "Undefined" + IDS_BUS_INTERNAL "Internal" + IDS_BUS_ISA "ISA" + IDS_BUS_EISA "EISA" + IDS_BUS_MICROCHANNEL "MicroChannel" + IDS_BUS_TURBOCHANNEL "TurboChannel" + IDS_BUS_PCIBUS "PCI" + IDS_BUS_VMEBUS "VME" + IDS_BUS_NUBUS "NuBus" + IDS_BUS_PCMCIABUS "PCMCIA" + IDS_BUS_CBUS "C-Bus" + IDS_BUS_MPIBUS "MPI-Bus" + IDS_BUS_MPSABUS "MPSA-Bus" + IDS_BUS_PROCESSORINTERNAL "Processor Internal" + IDS_BUS_INTERNALPOWERBUS "Internal Power Bus" + IDS_BUS_PNPISABUS "PnP-ISA Bus" + IDS_BUS_PNPBUS "PnP Bus" + IDS_BUS_UNKNOWNTYPE "Unknown Interface Type" +END + /*****************************************************************/ diff --git a/base/applications/regedit/main.c b/base/applications/regedit/main.c index d88968022ee..98eff19a5f2 100644 --- a/base/applications/regedit/main.c +++ b/base/applications/regedit/main.c @@ -68,7 +68,6 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) ZeroMemory(&wcFrame, sizeof(WNDCLASSEX)); wcFrame.cbSize = sizeof(WNDCLASSEX); - wcFrame.style = CS_HREDRAW | CS_VREDRAW; wcFrame.lpfnWndProc = FrameWndProc; wcFrame.hInstance = hInstance; wcFrame.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_REGEDIT)); @@ -82,7 +81,6 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) ZeroMemory(&wcChild, sizeof(WNDCLASSEX)); wcChild.cbSize = sizeof(WNDCLASSEX); - wcChild.style = CS_HREDRAW | CS_VREDRAW; wcChild.lpfnWndProc = ChildWndProc; wcChild.cbWndExtra = sizeof(HANDLE); wcChild.hInstance = hInstance; @@ -135,7 +133,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) } /* Create the status bar */ - hStatusBar = CreateStatusWindow(WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS|SBT_NOBORDERS, + hStatusBar = CreateStatusWindow(WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SBT_NOBORDERS, _T(""), hFrameWnd, STATUS_WINDOW); if (hStatusBar) { diff --git a/base/applications/regedit/regedit.c b/base/applications/regedit/regedit.c index 1a91ffa0397..e49f0e0b11b 100644 --- a/base/applications/regedit/regedit.c +++ b/base/applications/regedit/regedit.c @@ -134,6 +134,7 @@ void get_file_name(LPWSTR *command_line, LPWSTR file_name) BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s) { + TCHAR szTitle[256], szText[256]; switch (action) { case ACTION_ADD: @@ -162,6 +163,10 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s) } import_registry_file(fp); get_file_name(&s, filename); + LoadString(hInst, IDS_APP_TITLE, szTitle, sizeof(szTitle)); + LoadString(hInst, IDS_IMPORTED_OK, szText, sizeof(szTitle)); + /* show successful import */ + MessageBox(NULL, szText, szTitle, MB_OK); } break; } @@ -311,9 +316,18 @@ BOOL ProcessCmdLine(LPWSTR lpCmdLine) } if (*s && action == ACTION_UNDEF) - action = ACTION_ADD; - - if (action == ACTION_UNDEF) + { + TCHAR szTitle[256], szText[256]; + LoadString(hInst, IDS_APP_TITLE, szTitle, sizeof(szTitle)); + LoadString(hInst, IDS_IMPORT_PROMPT, szText, sizeof(szTitle)); + /* request import confirmation */ + if (MessageBox(NULL, szText, szTitle, MB_YESNO) == IDYES) + { + action = ACTION_ADD; + } + else return TRUE; + } + if (action == ACTION_UNDEF) return FALSE; return PerformRegAction(action, s); diff --git a/base/applications/regedit/regedit.h b/base/applications/regedit/regedit.h index 58cc4aa5062..44b3a3a29f6 100644 --- a/base/applications/regedit/regedit.h +++ b/base/applications/regedit/regedit.h @@ -2,7 +2,12 @@ #define _REGEDIT_H #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ +#define WIN32_NO_STATUS #include + +#define NTOS_MODE_USER +#include + #include #include #include diff --git a/base/applications/regedit/resource.h b/base/applications/regedit/resource.h index 771d743ab9f..e2757a1d83b 100644 --- a/base/applications/regedit/resource.h +++ b/base/applications/regedit/resource.h @@ -115,36 +115,36 @@ #define ID_HEXEDIT_SELECT_ALL 32839 #define IDS_LICENSE 32835 #define IDS_ERROR 32836 -#define IDS_BAD_VALUE 32837 -#define IDS_UNSUPPORTED_TYPE 32838 -#define IDS_TOO_BIG_VALUE 32839 -#define ID_EDIT_MODIFY_BIN 32840 -#define IDS_WARNING 32841 -#define IDS_MULTI_SZ_EMPTY_STRING 32842 -#define IDS_BINARY_EMPTY 32843 -#define IDS_DEFAULT_VALUE_NAME 32844 -#define IDS_VALUE_NOT_SET 32845 -#define IDS_UNKNOWN_TYPE 32846 -#define IDS_MY_COMPUTER 32847 -#define IDS_IMPORT_REG_FILE 32848 -#define IDS_EXPORT_REG_FILE 32849 -#define IDS_INVALID_DWORD 32850 -#define IDS_QUERY_DELETE_ONE 32851 -#define IDS_QUERY_DELETE_MORE 32852 -#define IDS_QUERY_DELETE_CONFIRM 32853 -#define IDS_ERR_DELVAL_CAPTION 32854 -#define IDS_ERR_DELETEVALUE 32855 -#define IDS_ERR_RENVAL_CAPTION 32856 -#define IDS_ERR_RENVAL_TOEMPTY 32857 +#define IDS_BAD_VALUE 32837 +#define IDS_UNSUPPORTED_TYPE 32838 +#define IDS_TOO_BIG_VALUE 32839 +#define ID_EDIT_MODIFY_BIN 32840 +#define IDS_WARNING 32841 +#define IDS_MULTI_SZ_EMPTY_STRING 32842 +#define IDS_BINARY_EMPTY 32843 +#define IDS_DEFAULT_VALUE_NAME 32844 +#define IDS_VALUE_NOT_SET 32845 +#define IDS_UNKNOWN_TYPE 32846 +#define IDS_MY_COMPUTER 32847 +#define IDS_IMPORT_REG_FILE 32848 +#define IDS_EXPORT_REG_FILE 32849 +#define IDS_INVALID_DWORD 32850 +#define IDS_QUERY_DELETE_ONE 32851 +#define IDS_QUERY_DELETE_MORE 32852 +#define IDS_QUERY_DELETE_CONFIRM 32853 +#define IDS_ERR_DELVAL_CAPTION 32854 +#define IDS_ERR_DELETEVALUE 32855 +#define IDS_ERR_RENVAL_CAPTION 32856 +#define IDS_ERR_RENVAL_TOEMPTY 32857 #define IDS_BAD_KEY 32858 -#define IDS_LOAD_HIVE 32859 -#define IDS_UNLOAD_HIVE 32860 +#define IDS_LOAD_HIVE 32859 +#define IDS_UNLOAD_HIVE 32860 #define ID_EDIT_NEW_MULTISTRINGVALUE 32861 #define ID_EDIT_NEW_EXPANDABLESTRINGVALUE 32862 #define ID_SWITCH_PANELS 32871 -#define ID_EDIT_PERMISSIONS 32872 +#define ID_EDIT_PERMISSIONS 32872 #define ID_TREE_DELETE 32873 #define ID_TREE_RENAME 32874 #define IDS_QUERY_DELETE_KEY_ONE 32875 @@ -155,70 +155,138 @@ #define ID_TREE_EXPORT 32888 #define ID_TREE_PERMISSIONS 32889 -#define IDS_FLT_REGFILE 31000 -#define IDS_FLT_REGFILES 31001 -#define IDS_FLT_REGFILES_FLT 31002 -#define IDS_FLT_REGEDIT4 31003 -#define IDS_FLT_REGEDIT4_FLT 31004 -#define IDS_FLT_ALLFILES 31005 -#define IDS_FLT_ALLFILES_FLT 31006 +#define IDS_FLT_REGFILE 31000 +#define IDS_FLT_REGFILES 31001 +#define IDS_FLT_REGFILES_FLT 31002 +#define IDS_FLT_REGEDIT4 31003 +#define IDS_FLT_REGEDIT4_FLT 31004 +#define IDS_FLT_ALLFILES 31005 +#define IDS_FLT_ALLFILES_FLT 31006 -#define IDS_ACCESS_FULLCONTROL 31101 -#define IDS_ACCESS_READ 31102 -#define IDS_ACCESS_QUERYVALUE 31103 -#define IDS_ACCESS_SETVALUE 31104 -#define IDS_ACCESS_CREATESUBKEY 31105 -#define IDS_ACCESS_ENUMERATESUBKEYS 31106 -#define IDS_ACCESS_NOTIFY 31107 -#define IDS_ACCESS_CREATELINK 31108 -#define IDS_ACCESS_DELETE 31109 -#define IDS_ACCESS_WRITEDAC 31110 -#define IDS_ACCESS_WRITEOWNER 31111 -#define IDS_ACCESS_READCONTROL 31112 +#define IDS_ACCESS_FULLCONTROL 31101 +#define IDS_ACCESS_READ 31102 +#define IDS_ACCESS_QUERYVALUE 31103 +#define IDS_ACCESS_SETVALUE 31104 +#define IDS_ACCESS_CREATESUBKEY 31105 +#define IDS_ACCESS_ENUMERATESUBKEYS 31106 +#define IDS_ACCESS_NOTIFY 31107 +#define IDS_ACCESS_CREATELINK 31108 +#define IDS_ACCESS_DELETE 31109 +#define IDS_ACCESS_WRITEDAC 31110 +#define IDS_ACCESS_WRITEOWNER 31111 +#define IDS_ACCESS_READCONTROL 31112 -#define IDS_INHERIT_THISKEYONLY 31121 +#define IDS_INHERIT_THISKEYONLY 31121 #define IDS_INHERIT_THISKEYANDSUBKEYS 31122 -#define IDS_INHERIT_SUBKEYSONLY 31123 +#define IDS_INHERIT_SUBKEYSONLY 31123 #define IDS_EXPAND 31124 #define IDS_COLLAPSE 31125 #define IDS_NEW_KEY 31126 #define IDS_NEW_VALUE 31127 #define IDS_GOTO_SUGGESTED_KEY 31128 +#define IDS_IMPORT_PROMPT 31129 +#define IDS_IMPORTED_OK 31130 -#define IDD_EDIT_STRING 2000 -#define IDC_VALUE_NAME 2001 -#define IDC_VALUE_DATA 2002 +#define IDS_FINISHEDFIND 31131 -#define IDD_EDIT_DWORD 2003 -#define IDC_FORMAT_HEX 2004 -#define IDC_FORMAT_DEC 2005 +#define IDS_BUSNUMBER 31132 +#define IDS_INTERFACE 31133 -#define IDD_EDIT_MULTI_STRING 2006 -#define IDD_EDIT_BIN_DATA 2007 +#define IDS_DMA_CHANNEL 31134 +#define IDS_DMA_PORT 31135 +#define IDS_INTERRUPT_VECTOR 31136 +#define IDS_INTERRUPT_LEVEL 31137 +#define IDS_INTERRUPT_AFFINITY 31138 +#define IDS_INTERRUPT_TYPE 31139 +#define IDS_MEMORY_ADDRESS 31140 +#define IDS_MEMORY_LENGTH 31141 +#define IDS_MEMORY_ACCESS 31142 +#define IDS_PORT_ADDRESS 31143 +#define IDS_PORT_LENGTH 31144 +#define IDS_PORT_ACCESS 31145 +#define IDS_SPECIFIC_RESERVED1 31146 +#define IDS_SPECIFIC_RESERVED2 31147 +#define IDS_SPECIFIC_DATASIZE 31148 -#define IDC_EXPORT_ALL 2008 -#define IDC_EXPORT_BRANCH 2009 -#define IDC_EXPORT_BRANCH_TEXT 2010 +#define IDS_PORT_PORT_IO 31149 +#define IDS_PORT_MEMORY_IO 31150 +#define IDS_INTERRUPT_EDGE_SENSITIVE 31151 +#define IDS_INTERRUPT_LEVEL_SENSITIVE 31152 +#define IDS_MEMORY_READ_ONLY 31153 +#define IDS_MEMORY_WRITE_ONLY 31154 +#define IDS_MEMORY_READ_WRITE 31155 -#define IDD_LOADHIVE 2500 -#define IDC_EDIT_KEY 2501 +#define IDS_BUS_UNDEFINED 31156 +#define IDS_BUS_INTERNAL 31157 +#define IDS_BUS_ISA 31158 +#define IDS_BUS_EISA 31159 +#define IDS_BUS_MICROCHANNEL 31160 +#define IDS_BUS_TURBOCHANNEL 31161 +#define IDS_BUS_PCIBUS 31162 +#define IDS_BUS_VMEBUS 31163 +#define IDS_BUS_NUBUS 31164 +#define IDS_BUS_PCMCIABUS 31165 +#define IDS_BUS_CBUS 31166 +#define IDS_BUS_MPIBUS 31167 +#define IDS_BUS_MPSABUS 31168 +#define IDS_BUS_PROCESSORINTERNAL 31169 +#define IDS_BUS_INTERNALPOWERBUS 31170 +#define IDS_BUS_PNPISABUS 31171 +#define IDS_BUS_PNPBUS 31172 +#define IDS_BUS_UNKNOWNTYPE 31173 -#define IDC_FAVORITENAME 2011 -#define IDC_FAVORITESLIST 2012 -#define IDC_FINDWHAT 2013 -#define IDC_LOOKAT_KEYS 2014 -#define IDC_LOOKAT_VALUES 2015 -#define IDC_LOOKAT_DATA 2016 -#define IDC_MATCHSTRING 2017 -#define IDC_MATCHCASE 2018 +#define IDD_EDIT_STRING 2000 +#define IDC_VALUE_NAME 2001 +#define IDC_VALUE_DATA 2002 -#define IDS_FINISHEDFIND 2019 +#define IDD_EDIT_DWORD 2003 +#define IDC_FORMAT_HEX 2004 +#define IDC_FORMAT_DEC 2005 -#define ID_FAVORITES_MIN 2100 -#define ID_FAVORITES_MAX 2999 +#define IDD_EDIT_MULTI_STRING 2006 +#define IDD_EDIT_BIN_DATA 2007 -#define ID_ACCEL 3000 +#define IDC_EXPORT_ALL 2008 +#define IDC_EXPORT_BRANCH 2009 +#define IDC_EXPORT_BRANCH_TEXT 2010 + +#define IDD_LOADHIVE 2500 +#define IDC_EDIT_KEY 2501 + +#define IDC_FAVORITENAME 2011 +#define IDC_FAVORITESLIST 2012 +#define IDC_FINDWHAT 2013 +#define IDC_LOOKAT_KEYS 2014 +#define IDC_LOOKAT_VALUES 2015 +#define IDC_LOOKAT_DATA 2016 +#define IDC_MATCHSTRING 2017 +#define IDC_MATCHCASE 2018 + +#define IDD_EDIT_RESOURCE_LIST 2019 +#define IDC_RESOURCE_LIST 2020 +#define IDC_SHOW_RESOURCE 2021 + +#define IDD_EDIT_RESOURCE 2022 +#define IDC_DMA_LIST 2023 +#define IDC_IRQ_LIST 2024 +#define IDC_MEMORY_LIST 2025 +#define IDC_PORT_LIST 2026 +#define IDC_DEVICE_LIST 2027 +#define IDC_UNDETERMINED 2028 +#define IDC_SHARED 2029 +#define IDC_DEVICE_EXCLUSIVE 2030 +#define IDC_DRIVER_EXCLUSIVE 2031 +#define IDC_INTERFACETYPE 2032 +#define IDC_BUSNUMBER 2033 +#define IDC_VERSION 2034 +#define IDC_REVISION 2035 +#define IDC_SHOW_RESOURCE_DATA 2036 + +#define ID_FAVORITES_MIN 2100 +#define ID_FAVORITES_MAX 2999 + +#define ID_ACCEL 3000 -#define IDC_STATIC -1 +#define IDC_STATIC -1 diff --git a/base/applications/regedit/rsrc.rc b/base/applications/regedit/rsrc.rc index ae770b56b95..96393535077 100644 --- a/base/applications/regedit/rsrc.rc +++ b/base/applications/regedit/rsrc.rc @@ -42,13 +42,16 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/ko-KR.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/pt-PT.rc" -#include "lang/ru-RU.rc" #include "lang/sl-SI.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/sc/CMakeLists.txt b/base/applications/sc/CMakeLists.txt index 0854d5b229c..43576854e9d 100644 --- a/base/applications/sc/CMakeLists.txt +++ b/base/applications/sc/CMakeLists.txt @@ -13,10 +13,9 @@ list(APPEND SOURCE usage.c sc.rc) -add_executable(sc ${CMAKE_CURRENT_BINARY_DIR}/sc_sc.h.gch ${SOURCE}) - -add_pch(sc ${CMAKE_CURRENT_SOURCE_DIR}/sc.h ${SOURCE}) +add_executable(sc ${SOURCE}) set_module_type(sc win32cui) add_importlibs(sc advapi32 msvcrt kernel32) +add_pch(sc sc.h) add_cd_file(TARGET sc DESTINATION reactos/system32 FOR all) diff --git a/base/applications/screensavers/3dtext/lang/pl-PL.rc b/base/applications/screensavers/3dtext/lang/pl-PL.rc index bd844fc5dea..b0e143431d0 100644 --- a/base/applications/screensavers/3dtext/lang/pl-PL.rc +++ b/base/applications/screensavers/3dtext/lang/pl-PL.rc @@ -1,21 +1,22 @@ /* - * translated by Caemyr - Olaf Siejka (Dec,2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "3D Text Screensaver Settings" +CAPTION "Ustawienia wygaszacza ekranu Tekst 3d" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,216,7,50,14 PUSHBUTTON "Anuluj",IDCANCEL,216,24,50,14 EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL - LTEXT "Wasny tekst",IDC_STATIC,18,17,65,8 + LTEXT "Własny tekst",IDC_STATIC,18,17,65,8 END STRINGTABLE DISCARDABLE diff --git a/base/applications/screensavers/3dtext/lang/ru-RU.rc b/base/applications/screensavers/3dtext/lang/ru-RU.rc index 5e4d60b51cd..1b62865f667 100644 --- a/base/applications/screensavers/3dtext/lang/ru-RU.rc +++ b/base/applications/screensavers/3dtext/lang/ru-RU.rc @@ -2,16 +2,16 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Параметры заставки" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,216,7,50,14 - PUSHBUTTON "",IDCANCEL,216,24,50,14 + PUSHBUTTON "Отмена",IDCANCEL,216,24,50,14 EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL - LTEXT " ",IDC_STATIC,18,17,65,8 + LTEXT "Другой текст",IDC_STATIC,18,17,65,8 END STRINGTABLE DISCARDABLE BEGIN - IDS_DESCRIPTION " 3D-" + IDS_DESCRIPTION "Заставка 3D-текст" END diff --git a/base/applications/screensavers/3dtext/lang/uk-UA.rc b/base/applications/screensavers/3dtext/lang/uk-UA.rc index 612e5a232cb..aab854ff041 100644 --- a/base/applications/screensavers/3dtext/lang/uk-UA.rc +++ b/base/applications/screensavers/3dtext/lang/uk-UA.rc @@ -10,16 +10,16 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT DLG_SCRNSAVECONFIGURE DIALOGEX 0, 0, 273, 178 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " ""' """ +CAPTION "Параметры заставки ""Об'ємний текст""" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,216,7,50,14 - PUSHBUTTON "",IDCANCEL,216,24,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,216,24,50,14 EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL - LTEXT "",IDC_STATIC,18,17,65,8 + LTEXT "Текст",IDC_STATIC,18,17,65,8 END STRINGTABLE DISCARDABLE BEGIN - IDS_DESCRIPTION " ""' """ + IDS_DESCRIPTION "Заставка ""Об'ємний текст""" END diff --git a/base/applications/screensavers/3dtext/rsrc.rc b/base/applications/screensavers/3dtext/rsrc.rc index 7c30d422e8f..ba63942beb1 100644 --- a/base/applications/screensavers/3dtext/rsrc.rc +++ b/base/applications/screensavers/3dtext/rsrc.rc @@ -22,8 +22,11 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/ko-KR.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/screensavers/logon/lang/pl-PL.rc b/base/applications/screensavers/logon/lang/pl-PL.rc index 022aa899692..0a89bab5875 100644 --- a/base/applications/screensavers/logon/lang/pl-PL.rc +++ b/base/applications/screensavers/logon/lang/pl-PL.rc @@ -1,3 +1,11 @@ +/* + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (ł) (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE diff --git a/base/applications/screensavers/logon/lang/ro-RO.rc b/base/applications/screensavers/logon/lang/ro-RO.rc index cda49c3bfe6..3082d082751 100644 --- a/base/applications/screensavers/logon/lang/ro-RO.rc +++ b/base/applications/screensavers/logon/lang/ro-RO.rc @@ -1,11 +1,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - STRINGTABLE DISCARDABLE BEGIN IDS_DESCRIPTION "Ecran de veghe Siglă" IDS_TEXT "Acest ecran de veghe nu are opțiuni." END - -#pragma code_page(default) diff --git a/base/applications/screensavers/logon/lang/ru-RU.rc b/base/applications/screensavers/logon/lang/ru-RU.rc index e21c7926343..82a8c14473f 100644 --- a/base/applications/screensavers/logon/lang/ru-RU.rc +++ b/base/applications/screensavers/logon/lang/ru-RU.rc @@ -2,6 +2,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_DESCRIPTION " "" """ - IDS_TEXT " ." + IDS_DESCRIPTION "Заставка ""Вход в систему""" + IDS_TEXT "Эта заставка не имеет настраиваемых параметров." END diff --git a/base/applications/screensavers/logon/lang/uk-UA.rc b/base/applications/screensavers/logon/lang/uk-UA.rc index 2a8a19a34e5..19035b0856d 100644 --- a/base/applications/screensavers/logon/lang/uk-UA.rc +++ b/base/applications/screensavers/logon/lang/uk-UA.rc @@ -10,6 +10,6 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_DESCRIPTION " "" """ - IDS_TEXT " ." + IDS_DESCRIPTION "Заставка ""Вхід до системи""" + IDS_TEXT "Ця заставка не має налаштовуваних параметрів." END diff --git a/base/applications/screensavers/logon/logon.rc b/base/applications/screensavers/logon/logon.rc index 088e5da99ef..da126bd96cf 100644 --- a/base/applications/screensavers/logon/logon.rc +++ b/base/applications/screensavers/logon/logon.rc @@ -25,8 +25,12 @@ IDB_SERVER BITMAP DISCARDABLE "res/1.bmp" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/ro-RO.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" #include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/shutdown/CMakeLists.txt b/base/applications/shutdown/CMakeLists.txt index 196d558ce82..08765772e6f 100644 --- a/base/applications/shutdown/CMakeLists.txt +++ b/base/applications/shutdown/CMakeLists.txt @@ -1,15 +1,12 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - list(APPEND SOURCE misc.c shutdown.c shutdown.rc) -add_executable(shutdown ${CMAKE_CURRENT_BINARY_DIR}/shutdown_precomp.h.gch ${SOURCE}) - -add_pch(shutdown ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(shutdown ${SOURCE}) set_module_type(shutdown win32cui) add_importlibs(shutdown advapi32 user32 msvcrt kernel32) +add_pch(shutdown precomp.h) add_cd_file(TARGET shutdown DESTINATION reactos/system32 FOR all) diff --git a/base/applications/shutdown/lang/pl-PL.rc b/base/applications/shutdown/lang/pl-PL.rc index eef341848ba..61e1bb41342 100644 --- a/base/applications/shutdown/lang/pl-PL.rc +++ b/base/applications/shutdown/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Dec,2007) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Dec,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,12 +11,12 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, "Skadnia: shutdown [-?] [-l | -s | -r] [-f]\n\n\ - Bez parametrw albo z -?\tWywietla niniejsz pomoc\n\ +IDS_USAGE, "Składnia: shutdown [-?] [-l | -s | -r] [-f]\n\n\ + Bez parametrów albo z -?\tWyświetla niniejszą pomoc\n\ -l\t\t\tWylogowanie\n\ - -s\t\t\tWyczenie komputera\n\ + -s\t\t\tWyłączenie komputera\n\ -r\t\t\tRestart komputera\n\ - -f\t\t\tZamknicie wszystkich dziaajcych aplikacji, bez ostrzeenia\n\ - \t\t\tBez podania innego parametru, ta opcja domylnie wyloguje \n\ - \t\t\tobecnego uytkownika" + -f\t\t\tZamknięcie wszystkich działających aplikacji, bez ostrzeżenia\n\ + \t\t\tBez podania innego parametru, ta opcja domyślnie wyloguje \n\ + \t\t\tobecnego użytkownika" END diff --git a/base/applications/shutdown/lang/ru-RU.rc b/base/applications/shutdown/lang/ru-RU.rc index 1e76b7fe8d0..cf60961b3af 100644 --- a/base/applications/shutdown/lang/ru-RU.rc +++ b/base/applications/shutdown/lang/ru-RU.rc @@ -5,13 +5,13 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, ": shutdown [-?] [-l | -s | -r] [-f]\n\n\ - -?\t \n\ - -l\t\t\t \n\ - -s\t\t\t \n\ - -r\t\t\t \n\ - -f\t\t\t \n\ - \t\t\t\n\ - \t\t\t , \n\ - \t\t\t ." +IDS_USAGE, "Использование: shutdown [-?] [-l | -s | -r] [-f]\n\n\ + Без аргументов или -?\tОтображение этого сообщения\n\ + -l\t\t\tЗавершение сеанса\n\ + -s\t\t\tВыключение этого компьютера\n\ + -r\t\t\tПерезагрузка этого компьютера\n\ + -f\t\t\tИгнорирование запущенных программ и завершение их без\n\ + \t\t\tпредупреждения\n\ + \t\t\tЕсли вы не указали другие параметры, то эта опция\n\ + \t\t\tприведет к завершению сеанса." END diff --git a/base/applications/shutdown/lang/uk-UA.rc b/base/applications/shutdown/lang/uk-UA.rc index 4a4ce260e77..d6a0e5a221c 100644 --- a/base/applications/shutdown/lang/uk-UA.rc +++ b/base/applications/shutdown/lang/uk-UA.rc @@ -11,12 +11,12 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_USAGE, ": shutdown [-?] [-l | -s | -r] [-f]\n\n\ - -?\t³ \n\ - -l\t\t\t \n\ - -s\t\t\t '\n\ - -r\t\t\t '\n\ - -f\t\t\t \n\ - \t\t\t , \n\ - \t\t\t " +IDS_USAGE, "Використання: shutdown [-?] [-l | -s | -r] [-f]\n\n\ + Без аргументів або -?\tВідображення цього повідомлення\n\ + -l\t\t\tЗавершення сеансу\n\ + -s\t\t\tВимкнення цього комп'ютера\n\ + -r\t\t\tПерезавантаження цього комп'ютера\n\ + -f\t\t\tПримусове закриття запущених додатків без попереджень\n\ + \t\t\tЯкщо ви не вказали інший параметр, то ця опція також\n\ + \t\t\tзавершить сеанс" END diff --git a/base/applications/shutdown/rsrc.rc b/base/applications/shutdown/rsrc.rc index a7dc8242bc0..0146711e08d 100644 --- a/base/applications/shutdown/rsrc.rc +++ b/base/applications/shutdown/rsrc.rc @@ -13,9 +13,11 @@ #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/sndrec32/lang/pl-PL.rc b/base/applications/sndrec32/lang/pl-PL.rc index ea1e4f227b4..8bf5b0f029c 100644 --- a/base/applications/sndrec32/lang/pl-PL.rc +++ b/base/applications/sndrec32/lang/pl-PL.rc @@ -1,10 +1,11 @@ /* - * translated by Saibamen - Adam Stachowicz (Apr,2011) - * Use ReactOS forum PM, IRC or saibamenppl at gmail.com to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Saibamen - Adam Stachowicz (Apr,2011) + * Use ReactOS forum PM, IRC or saibamenppl at gmail.com to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ - + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDC_REACTOS_SNDREC32 ACCELERATORS @@ -29,11 +30,11 @@ BEGIN POPUP "Plik" BEGIN MENUITEM "Nowy", ID_NEW - MENUITEM "Otwrz...", ID_FILE_OPEN + MENUITEM "Otwórz...", ID_FILE_OPEN MENUITEM "Zapisz", ID_FILE_SAVE, GRAYED MENUITEM "Zapisz jako...", ID_FILE_SAVEAS, GRAYED MENUITEM SEPARATOR - MENUITEM "Wyjcie", ID_EXIT + MENUITEM "Wyjście", ID_EXIT END MENUITEM "todo1", 0 MENUITEM "todo2", 0 @@ -45,14 +46,14 @@ END STRINGTABLE BEGIN - IDS_APP_TITLE "Rejestrator dwiku" + IDS_APP_TITLE "Rejestrator dźwięku" IDC_REACTOS_SNDREC32 "REACTOS_SNDREC32" END STRINGTABLE BEGIN IDS_STRPOS "Pozycja: %.2f s" - IDS_STRDUR "Dugo: %.2f s" + IDS_STRDUR "Długość: %.2f s" IDS_STRBUF "Bufor: %.2f kb" IDS_STRFMT "%.1f kHz %u bits" IDS_STRMONO "mono" diff --git a/base/applications/sndrec32/lang/uk-UA.rc b/base/applications/sndrec32/lang/uk-UA.rc index ee659ee0d9c..dc48bfd7d03 100644 --- a/base/applications/sndrec32/lang/uk-UA.rc +++ b/base/applications/sndrec32/lang/uk-UA.rc @@ -16,47 +16,47 @@ END IDD_ABOUTBOX DIALOGEX 0, 0, 196, 75 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " reactOS_sndrec32" +CAPTION "Інформація про reactOS_sndrec32" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN ICON 128,IDC_REACTOS_SNDREC32,19,14,21,20 - LTEXT "reactOS_sndrec32, 1.0",IDC_STATIC,56,16,114,8,SS_NOPREFIX + LTEXT "reactOS_sndrec32, версії 1.0",IDC_STATIC,56,16,114,8,SS_NOPREFIX LTEXT "Copyright (C) 2009",IDC_STATIC,55,25,114,8 DEFPUSHBUTTON "OK",IDOK,139,54,50,14,WS_GROUP END IDR_MENU1 MENU BEGIN - POPUP "" + POPUP "Файл" BEGIN - MENUITEM "", ID_NEW - MENUITEM "³...", ID_FILE_OPEN - MENUITEM "", ID_FILE_SAVE, GRAYED - MENUITEM " ...", ID_FILE_SAVEAS, GRAYED + MENUITEM "Новий", ID_NEW + MENUITEM "Відкрити...", ID_FILE_OPEN + MENUITEM "Зберегти", ID_FILE_SAVE, GRAYED + MENUITEM "Зберегти як...", ID_FILE_SAVEAS, GRAYED MENUITEM SEPARATOR - MENUITEM "", ID_EXIT + MENUITEM "Вихід", ID_EXIT END MENUITEM "todo1", 0 MENUITEM "todo2", 0 POPUP "?" BEGIN - MENUITEM " ...", ID__ABOUT + MENUITEM "Про програму...", ID__ABOUT END END STRINGTABLE BEGIN - IDS_APP_TITLE "" + IDS_APP_TITLE "Звукозапис" IDC_REACTOS_SNDREC32 "REACTOS_SNDREC32" END STRINGTABLE BEGIN - IDS_STRPOS ": %.2f s" - IDS_STRDUR ": %.2f s" - IDS_STRBUF ": %.2f kb" + IDS_STRPOS "Позиція: %.2f s" + IDS_STRDUR "Довжина: %.2f s" + IDS_STRBUF "Буфер: %.2f kb" IDS_STRFMT "%.1f kHz %u bits" - IDS_STRMONO "" - IDS_STRSTEREO "" + IDS_STRMONO "моно" + IDS_STRSTEREO "стерео" IDS_STRCHAN "%s" END diff --git a/base/applications/sndrec32/rsrc.rc b/base/applications/sndrec32/rsrc.rc index 7964e8e0be0..8f0707e484c 100644 --- a/base/applications/sndrec32/rsrc.rc +++ b/base/applications/sndrec32/rsrc.rc @@ -23,8 +23,10 @@ IDB_BITMAP2_STOP_DIS BITMAP "resources/but_stop_dis.bmp" #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" -#include "lang/pl-PL.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/sndvol32/CMakeLists.txt b/base/applications/sndvol32/CMakeLists.txt index 9208072f08e..eecfc287762 100644 --- a/base/applications/sndvol32/CMakeLists.txt +++ b/base/applications/sndvol32/CMakeLists.txt @@ -1,19 +1,16 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - set_unicode() list(APPEND SOURCE dialog.c - misc.c + misc.c mixer.c sndvol32.c sndvol32.rc) -add_executable(sndvol32 ${CMAKE_CURRENT_BINARY_DIR}/sndvol32_sndvol32.h.gch ${SOURCE}) - -add_pch(sndvol32 ${CMAKE_CURRENT_SOURCE_DIR}/sndvol32.h ${SOURCE}) +add_executable(sndvol32 ${SOURCE}) set_module_type(sndvol32 win32gui) add_importlibs(sndvol32 user32 advapi32 gdi32 comctl32 shell32 winmm msvcrt kernel32 ntdll) +add_pch(sndvol32 sndvol32.h) add_cd_file(TARGET sndvol32 DESTINATION reactos/system32 FOR all) diff --git a/base/applications/sndvol32/lang/pl-PL.rc b/base/applications/sndvol32/lang/pl-PL.rc index 293096030af..b9ee1251ea6 100644 --- a/base/applications/sndvol32/lang/pl-PL.rc +++ b/base/applications/sndvol32/lang/pl-PL.rc @@ -1,9 +1,9 @@ /* * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * Update by Caemyr - Olaf Siejka (Apr, 2011) - * + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * Update by Caemyr - Olaf Siejka (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -12,38 +12,38 @@ IDM_MAINMENU MENU DISCARDABLE BEGIN POPUP "&Opcje" BEGIN - MENUITEM "&Waciwoci", IDC_PROPERTIES + MENUITEM "&Właściwości", IDC_PROPERTIES MENUITEM "&Tryb zaawansowany", IDC_ADVANCED_CONTROLS MENUITEM SEPARATOR - MENUITEM "Zako&cz", IDC_EXIT + MENUITEM "Zakoń&cz", IDC_EXIT END POPUP "Pomo&c" BEGIN MENUITEM "&Tematy pomocy", IDC_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "&Regulacja gonoci - informacje", IDC_ABOUT + MENUITEM "&Regulacja głośności - informacje", IDC_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_SNDVOL32 "Regulacja gonoci" - IDS_NOMIXERDEVICES "Nie jest dostpne adne aktywne urzdzenie miksujce! Program zostanie zamknity." + IDS_SNDVOL32 "Regulacja głośności" + IDS_NOMIXERDEVICES "Nie jest dostępne żadne aktywne urządzenie miksujące! Program zostanie zamknięty." END IDD_PREFERENCES DIALOGEX 0, 0, 224, 250 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Waciwoci" +CAPTION "Właściwości" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Urzdzenie &miksujce", -1, 7,8,48,9 + LTEXT "Urządzenie &miksujące", -1, 7,8,48,9 COMBOBOX IDC_MIXERDEVICE, 55,8,162,80, CBS_DROPDOWNLIST | WS_TABSTOP - GROUPBOX "Ustawianie gonoci", -1, 7,25,211,77 + GROUPBOX "Ustawianie głośności", -1, 7,25,211,77 PUSHBUTTON "&Odtwarzanie", IDC_PLAYBACK, 13,43,47,8, BS_AUTORADIOBUTTON PUSHBUTTON "&Nagrywanie", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON PUSHBUTTON "&Inne:", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED COMBOBOX IDC_LINE, 55,80,155,50, CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED - LTEXT "Poka nastpujce sterowniki gonoci:", IDC_LABELCONTROLS, 7, 109, 162, 8 + LTEXT "Pokaż następujące kontrolki głośności:", IDC_LABELCONTROLS, 7, 109, 162, 8 CONTROL "", IDC_CONTROLS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP | WS_BORDER, 7, 122, 211, 96 PUSHBUTTON "OK", IDOK, 114,226,50,14 @@ -54,10 +54,10 @@ IDD_VOLUME_CTRL DIALOG 0, 0, 90, 150 STYLE WS_POPUP | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Kana gwny", IDC_LINE_NAME, 4, 7, 100, 15 + LTEXT "Kanał główny", IDC_LINE_NAME, 4, 7, 100, 15 CONTROL "", -1, "static", SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE, 4, 30, 82, 1 LTEXT "Balans", -1, 4, 35, 80, 42 - LTEXT "Gono", -1, 4, 100, 77, 108 + LTEXT "Głośność", -1, 4, 100, 77, 108 CONTROL "", IDC_LINE_SLIDER_HORZ, "msctls_trackbar32", TBS_HORZ | TBS_AUTOTICKS | TBS_BOTH | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 55, 85, 30 CONTROL "", IDC_LINE_SLIDER_VERT, "msctls_trackbar32", TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_DOWNISLEFT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 32, 115, 30, 70 CHECKBOX "&Wycisz", IDC_LINE_SWITCH, 4, 190, 90, 12 diff --git a/base/applications/sndvol32/lang/ru-RU.rc b/base/applications/sndvol32/lang/ru-RU.rc index 1fc2c86b91b..872cdb8b9d8 100644 --- a/base/applications/sndvol32/lang/ru-RU.rc +++ b/base/applications/sndvol32/lang/ru-RU.rc @@ -4,44 +4,44 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDM_MAINMENU MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Параметры" BEGIN - MENUITEM "&", IDC_PROPERTIES - MENUITEM "& ", IDC_ADVANCED_CONTROLS + MENUITEM "&Свойства", IDC_PROPERTIES + MENUITEM "&Дополнительные параметры", IDC_ADVANCED_CONTROLS MENUITEM SEPARATOR - MENUITEM "&", IDC_EXIT + MENUITEM "&Выход", IDC_EXIT END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "& ", IDC_HELP_TOPICS + MENUITEM "&Вызов справки", IDC_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "& ", IDC_ABOUT + MENUITEM "&О программе", IDC_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_SNDVOL32 " " - IDS_NOMIXERDEVICES " ! ." + IDS_SNDVOL32 "Управление громкостью" + IDS_NOMIXERDEVICES "Нет доступных микшерных устройств! Приложение будет завершено." END IDD_PREFERENCES DIALOGEX 0, 0, 224, 250 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Свойства" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:", -1, 7,8,48,9 + LTEXT "&Микшер:", -1, 7,8,48,9 COMBOBOX IDC_MIXERDEVICE, 55,8,162,80, CBS_DROPDOWNLIST | WS_TABSTOP - GROUPBOX " :", -1, 7,25,211,77 - PUSHBUTTON "&", IDC_PLAYBACK, 13,43,80,8, BS_AUTORADIOBUTTON - PUSHBUTTON "&", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON - PUSHBUTTON "&:", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED + GROUPBOX "Настройки громкости:", -1, 7,25,211,77 + PUSHBUTTON "&Воспроизведение", IDC_PLAYBACK, 13,43,80,8, BS_AUTORADIOBUTTON + PUSHBUTTON "&Запись", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON + PUSHBUTTON "&Другое:", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED COMBOBOX IDC_LINE, 55,80,155,50, CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED - LTEXT " :", IDC_LABELCONTROLS, 7, 109, 162, 8 + LTEXT "Отображать регуляторы громкости:", IDC_LABELCONTROLS, 7, 109, 162, 8 CONTROL "", IDC_CONTROLS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP | WS_BORDER, 7, 122, 211, 96 PUSHBUTTON "OK", IDOK, 114,226,50,14 - PUSHBUTTON "", IDCANCEL, 168,226,50,14 + PUSHBUTTON "Отмена", IDCANCEL, 168,226,50,14 END IDD_VOLUME_CTRL DIALOG 0, 0, 90, 150 diff --git a/base/applications/sndvol32/lang/uk-UA.rc b/base/applications/sndvol32/lang/uk-UA.rc index c993a77a357..9f996386f52 100644 --- a/base/applications/sndvol32/lang/uk-UA.rc +++ b/base/applications/sndvol32/lang/uk-UA.rc @@ -10,56 +10,56 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDM_MAINMENU MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Параметри" BEGIN - MENUITEM "&", IDC_PROPERTIES - MENUITEM "& ", IDC_ADVANCED_CONTROLS + MENUITEM "&Властивості", IDC_PROPERTIES + MENUITEM "&Додаткові параметри", IDC_ADVANCED_CONTROLS MENUITEM SEPARATOR - MENUITEM "&", IDC_EXIT + MENUITEM "В&ихід", IDC_EXIT END - POPUP "&" + POPUP "До&відка" BEGIN - MENUITEM "&", IDC_HELP_TOPICS + MENUITEM "&Зміст", IDC_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "& ", IDC_ABOUT + MENUITEM "&Про регулятор гучності", IDC_ABOUT END END STRINGTABLE DISCARDABLE BEGIN - IDS_SNDVOL32 " " - IDS_NOMIXERDEVICES " - ! ." + IDS_SNDVOL32 "Регулятор гучності" + IDS_NOMIXERDEVICES "Активні пристрої-мікшери недоступні! Додаток закінчує роботу." END IDD_PREFERENCES DIALOGEX 0, 0, 224, 250 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Властивості" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&̳:", -1, 7,8,48,9 + LTEXT "&Мікшер:", -1, 7,8,48,9 COMBOBOX IDC_MIXERDEVICE, 55,8,162,80, CBS_DROPDOWNLIST | WS_TABSTOP - GROUPBOX " :", -1, 7,25,211,77 - PUSHBUTTON "&³", IDC_PLAYBACK, 13,43,47,8, BS_AUTORADIOBUTTON - PUSHBUTTON "&", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON - PUSHBUTTON "&:", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED + GROUPBOX "Регуляція гучності для:", -1, 7,25,211,77 + PUSHBUTTON "&Відтворення", IDC_PLAYBACK, 13,43,47,8, BS_AUTORADIOBUTTON + PUSHBUTTON "&Запис", IDC_RECORDING, 13,61,47,8, BS_AUTORADIOBUTTON + PUSHBUTTON "&Інше:", IDC_OTHER, 13,80,42,8, BS_AUTORADIOBUTTON | WS_DISABLED COMBOBOX IDC_LINE, 55,80,155,50, CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED - LTEXT "³ :", IDC_LABELCONTROLS, 7, 109, 162, 8 + LTEXT "Відображати наступні регулятори гучності:", IDC_LABELCONTROLS, 7, 109, 162, 8 CONTROL "", IDC_CONTROLS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP | WS_BORDER, 7, 122, 211, 96 PUSHBUTTON "OK", IDOK, 114,226,50,14 - PUSHBUTTON "", IDCANCEL, 168,226,50,14 + PUSHBUTTON "Скасувати", IDCANCEL, 168,226,50,14 END IDD_VOLUME_CTRL DIALOG 0, 0, 90, 150 STYLE WS_POPUP | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", IDC_LINE_NAME, 4, 7, 100, 15 + LTEXT "Головна", IDC_LINE_NAME, 4, 7, 100, 15 CONTROL "", -1, "static", SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE, 4, 30, 82, 1 - LTEXT "", -1, 4, 35, 80, 42 - LTEXT "", -1, 4, 100, 77, 108 + LTEXT "Баланс", -1, 4, 35, 80, 42 + LTEXT "Гучність", -1, 4, 100, 77, 108 CONTROL "", IDC_LINE_SLIDER_HORZ, "msctls_trackbar32", TBS_HORZ | TBS_AUTOTICKS | TBS_BOTH | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 55, 85, 30 CONTROL "", IDC_LINE_SLIDER_VERT, "msctls_trackbar32", TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_DOWNISLEFT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 32, 115, 30, 70 - CHECKBOX "&", IDC_LINE_SWITCH, 4, 190, 90, 12, BS_AUTOCHECKBOX + CHECKBOX "&Тиша", IDC_LINE_SWITCH, 4, 190, 90, 12, BS_AUTOCHECKBOX CONTROL "", IDC_LINE_SEP, "static", SS_ETCHEDVERT | WS_CHILD | WS_VISIBLE, 130, 7, 1, 200 END diff --git a/base/applications/sndvol32/rsrc.rc b/base/applications/sndvol32/rsrc.rc index 875fc670bd3..8daa68c06a3 100644 --- a/base/applications/sndvol32/rsrc.rc +++ b/base/applications/sndvol32/rsrc.rc @@ -20,10 +20,13 @@ IDI_MAINAPP ICON DISCARDABLE resources/sndvol32.ico #include "lang/ko-KR.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/applications/taskmgr/CMakeLists.txt b/base/applications/taskmgr/CMakeLists.txt index b36860362e5..99c8a25868c 100644 --- a/base/applications/taskmgr/CMakeLists.txt +++ b/base/applications/taskmgr/CMakeLists.txt @@ -23,10 +23,9 @@ list(APPEND SOURCE graphctl.c taskmgr.rc) -add_executable(taskmgr ${CMAKE_CURRENT_BINARY_DIR}/taskmgr_precomp.h.gch ${SOURCE}) - -add_pch(taskmgr ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_executable(taskmgr ${SOURCE}) set_module_type(taskmgr win32gui) add_importlibs(taskmgr advapi32 user32 gdi32 shell32 comctl32 msvcrt kernel32 ntdll) +add_pch(taskmgr precomp.h) add_cd_file(TARGET taskmgr DESTINATION reactos/system32 FOR all) diff --git a/base/applications/taskmgr/lang/ja-JP.rc b/base/applications/taskmgr/lang/ja-JP.rc index 815c8a088a0..ce26ca5fd0a 100644 --- a/base/applications/taskmgr/lang/ja-JP.rc +++ b/base/applications/taskmgr/lang/ja-JP.rc @@ -4,9 +4,8 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN) #ifdef _WIN32 LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -#pragma code_page(932) #endif //_WIN32 - +#define IDS_PHYSICAL_MEMORY_AVAILABLE 1067 ///////////////////////////////////////////////////////////////////////////// // // Menu @@ -14,85 +13,85 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT IDR_TASKMANAGER MENU DISCARDABLE BEGIN - POPUP "ƒtƒ@ƒCƒ‹(&F)" + POPUP "ファイル(&F)" BEGIN - MENUITEM "V‚µ‚¢ƒ^ƒXƒN‚ÌŽÀs(&N)", ID_FILE_NEW + MENUITEM "新しいタスクの実行(&N)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "ƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚̏I—¹(&X)", ID_FILE_EXIT + MENUITEM "タスク マネージャの終了(&X)", ID_FILE_EXIT END - POPUP "ƒIƒvƒVƒ‡ƒ“(&O)" + POPUP "オプション(&O)" BEGIN - MENUITEM "í‚ÉŽè‘O‚É•\\ަ(&A)", ID_OPTIONS_ALWAYSONTOP + MENUITEM "常に手前に表\示(&A)", ID_OPTIONS_ALWAYSONTOP , CHECKED - MENUITEM "–¢Žg—pŽž‚ɍŏ¬‰»(&M)", ID_OPTIONS_MINIMIZEONUSE + MENUITEM "未使用時に最小化(&M)", ID_OPTIONS_MINIMIZEONUSE , CHECKED - MENUITEM "Å¬‰»Žž‚ɉB‚·(&H)", ID_OPTIONS_HIDEWHENMINIMIZED + MENUITEM "最小化時に隠す(&H)", ID_OPTIONS_HIDEWHENMINIMIZED , CHECKED - MENUITEM "16 ƒrƒbƒg ƒ^ƒXƒN‚Ì•\\ަ(&S)", ID_OPTIONS_SHOW16BITTASKS + MENUITEM "16 ビット タスクの表\示(&S)", ID_OPTIONS_SHOW16BITTASKS , CHECKED END - POPUP "•\\ަ(&V)" + POPUP "表\示(&V)" BEGIN - MENUITEM "ÅV‚̏ó‘ԂɍXV(&R)", ID_VIEW_REFRESH - POPUP "XV‚Ì•p“x(&U)" + MENUITEM "最新の状態に更新(&R)", ID_VIEW_REFRESH + POPUP "更新の頻度(&U)" BEGIN - MENUITEM "‚(&H)", ID_VIEW_UPDATESPEED_HIGH - MENUITEM "’ʏí(&N)", ID_VIEW_UPDATESPEED_NORMAL + MENUITEM "高(&H)", ID_VIEW_UPDATESPEED_HIGH + MENUITEM "通常(&N)", ID_VIEW_UPDATESPEED_NORMAL , CHECKED - MENUITEM "’á(&L)", ID_VIEW_UPDATESPEED_LOW - MENUITEM "ˆêŽž’âŽ~(&P)", ID_VIEW_UPDATESPEED_PAUSED + MENUITEM "低(&L)", ID_VIEW_UPDATESPEED_LOW + MENUITEM "一時停止(&P)", ID_VIEW_UPDATESPEED_PAUSED END MENUITEM SEPARATOR - MENUITEM "‘å‚«‚¢ƒAƒCƒRƒ“(&G)", ID_VIEW_LARGE - MENUITEM "¬‚³‚¢ƒAƒCƒRƒ“(&M)", ID_VIEW_SMALL - MENUITEM "Ú×(&D)", ID_VIEW_DETAILS, CHECKED - MENUITEM "—ñ‚Ì‘I‘ð(&S)...", ID_VIEW_SELECTCOLUMNS - POPUP "CPU ‚Ì—š—ð(&C)" + MENUITEM "大きいアイコン(&G)", ID_VIEW_LARGE + MENUITEM "小さいアイコン(&M)", ID_VIEW_SMALL + MENUITEM "詳細(&D)", ID_VIEW_DETAILS, CHECKED + MENUITEM "列の選択(&S)...", ID_VIEW_SELECTCOLUMNS + POPUP "CPU の履歴(&C)" BEGIN - MENUITEM "‚·‚×‚Ä‚Ì CPU ‚Å 1 ƒOƒ‰ƒt(&O)",ID_VIEW_CPUHISTORY_ONEGRAPHALL + MENUITEM "すべての CPU で 1 グラフ(&O)",ID_VIEW_CPUHISTORY_ONEGRAPHALL - MENUITEM "CPU ‚²‚Æ‚É 1 ƒOƒ‰ƒt(&P)", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU + MENUITEM "CPU ごとに 1 グラフ(&P)", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU , CHECKED END - MENUITEM "ƒJ[ƒlƒ‹ŽžŠÔ‚ð•\\ަ‚·‚é(&S)", ID_VIEW_SHOWKERNELTIMES + MENUITEM "カーネル時間を表\示する(&S)", ID_VIEW_SHOWKERNELTIMES END - POPUP "ƒEƒBƒ“ƒhƒE(&W)" + POPUP "ウィンドウ(&W)" BEGIN - MENUITEM "ã‰º‚É•À‚ׂĕ\\ަ(&H)", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "¶‰E‚É•À‚ׂĕ\\ަ(&V)", ID_WINDOWS_TILEVERTICALLY - MENUITEM "Å¬‰»(&M)", ID_WINDOWS_MINIMIZE - MENUITEM "Å‘剻(&X)", ID_WINDOWS_MAXIMIZE - MENUITEM "d‚˂ĕ\\ަ(&C)", ID_WINDOWS_CASCADE - MENUITEM "Žè‘O‚É•\\ަ(&B)", ID_WINDOWS_BRINGTOFRONT + MENUITEM "上下に並べて表\示(&H)", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "左右に並べて表\示(&V)", ID_WINDOWS_TILEVERTICALLY + MENUITEM "最小化(&M)", ID_WINDOWS_MINIMIZE + MENUITEM "最大化(&X)", ID_WINDOWS_MAXIMIZE + MENUITEM "重ねて表\示(&C)", ID_WINDOWS_CASCADE + MENUITEM "手前に表\示(&B)", ID_WINDOWS_BRINGTOFRONT END - POPUP "ƒwƒ‹ƒv(&H)" + POPUP "ヘルプ(&H)" BEGIN - MENUITEM "ƒgƒsƒbƒN‚ÌŒŸõ(&H)", ID_HELP_TOPICS + MENUITEM "トピックの検索(&H)", ID_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "ƒo[ƒWƒ‡ƒ“î•ñ(&A)", ID_HELP_ABOUT + MENUITEM "バージョン情報(&A)", ID_HELP_ABOUT END END IDR_WINDOWSMENU MENU DISCARDABLE BEGIN - MENUITEM "ã‰º‚É•À‚ׂĕ\\ަ(&H)", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "¶‰E‚É•À‚ׂĕ\\ަ(&V)", ID_WINDOWS_TILEVERTICALLY - MENUITEM "Å¬‰»(&M)", ID_WINDOWS_MINIMIZE - MENUITEM "Å‘剻(&X)", ID_WINDOWS_MAXIMIZE - MENUITEM "d‚˂ĕ\\ަ(&C)", ID_WINDOWS_CASCADE - MENUITEM "Žè‘O‚É•\\ަ(&B)", ID_WINDOWS_BRINGTOFRONT + MENUITEM "上下に並べて表\示(&H)", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "左右に並べて表\示(&V)", ID_WINDOWS_TILEVERTICALLY + MENUITEM "最小化(&M)", ID_WINDOWS_MINIMIZE + MENUITEM "最大化(&X)", ID_WINDOWS_MAXIMIZE + MENUITEM "重ねて表\示(&C)", ID_WINDOWS_CASCADE + MENUITEM "手前に表\示(&B)", ID_WINDOWS_BRINGTOFRONT END IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "V‚µ‚¢ƒ^ƒXƒN‚ÌŽÀs(&N)", ID_FILE_NEW + MENUITEM "新しいタスクの実行(&N)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "‘å‚«‚¢ƒAƒCƒRƒ“(&G)", ID_VIEW_LARGE - MENUITEM "¬‚³‚¢ƒAƒCƒRƒ“(&M)", ID_VIEW_SMALL - MENUITEM "Ú×(&D)", ID_VIEW_DETAILS, CHECKED + MENUITEM "大きいアイコン(&G)", ID_VIEW_LARGE + MENUITEM "小さいアイコン(&M)", ID_VIEW_SMALL + MENUITEM "詳細(&D)", ID_VIEW_DETAILS, CHECKED END END @@ -100,17 +99,17 @@ IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "Ø‚è‘Ö‚¦(&S)", ID_APPLICATION_PAGE_SWITCHTO - MENUITEM "Žè‘O‚É•\\ަ(&B)", ID_WINDOWS_BRINGTOFRONT + MENUITEM "切り替え(&S)", ID_APPLICATION_PAGE_SWITCHTO + MENUITEM "手前に表\示(&B)", ID_WINDOWS_BRINGTOFRONT MENUITEM SEPARATOR - MENUITEM "ã‰º‚É•À‚ׂĕ\\ަ(&H)", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "¶‰E‚É•À‚ׂĕ\\ަ(&V)", ID_WINDOWS_TILEVERTICALLY - MENUITEM "Å¬‰»(&M)", ID_WINDOWS_MINIMIZE - MENUITEM "Å‘剻(&X)", ID_WINDOWS_MAXIMIZE - MENUITEM "d‚˂ĕ\\ަ(&C)", ID_WINDOWS_CASCADE + MENUITEM "上下に並べて表\示(&H)", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "左右に並べて表\示(&V)", ID_WINDOWS_TILEVERTICALLY + MENUITEM "最小化(&M)", ID_WINDOWS_MINIMIZE + MENUITEM "最大化(&X)", ID_WINDOWS_MAXIMIZE + MENUITEM "重ねて表\示(&C)", ID_WINDOWS_CASCADE MENUITEM SEPARATOR - MENUITEM "ƒ^ƒXƒN‚̏I—¹(&E)", ID_APPLICATION_PAGE_ENDTASK - MENUITEM "ƒvƒƒZƒX‚Ì•\\ަ(&G)", ID_APPLICATION_PAGE_GOTOPROCESS + MENUITEM "タスクの終了(&E)", ID_APPLICATION_PAGE_ENDTASK + MENUITEM "プロセスの表\示(&G)", ID_APPLICATION_PAGE_GOTOPROCESS END END @@ -119,10 +118,10 @@ IDR_TRAY_POPUP MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "Œ³‚̃TƒCƒY‚É–ß‚·(&R)", ID_RESTORE - MENUITEM "•‚¶‚é(&C)", ID_FILE_EXIT + MENUITEM "元のサイズに戻す(&R)", ID_RESTORE + MENUITEM "閉じる(&C)", ID_FILE_EXIT MENUITEM SEPARATOR - MENUITEM "í‚ÉŽè‘O‚É•\\ަ(&A)", ID_OPTIONS_ALWAYSONTOP + MENUITEM "常に手前に表\示(&A)", ID_OPTIONS_ALWAYSONTOP END END @@ -130,28 +129,28 @@ IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "ƒvƒƒZƒX‚̏I—¹(&E)", ID_PROCESS_PAGE_ENDPROCESS - MENUITEM "ƒvƒƒZƒX ƒcƒŠ[‚̏I—¹(&T)", ID_PROCESS_PAGE_ENDPROCESSTREE + MENUITEM "プロセスの終了(&E)", ID_PROCESS_PAGE_ENDPROCESS + MENUITEM "プロセス ツリーの終了(&T)", ID_PROCESS_PAGE_ENDPROCESSTREE - MENUITEM "ƒfƒoƒbƒO(&D)", ID_PROCESS_PAGE_DEBUG + MENUITEM "デバッグ(&D)", ID_PROCESS_PAGE_DEBUG MENUITEM SEPARATOR - POPUP "—Dæ“x‚̐ݒè(&P)" + POPUP "優先度の設定(&P)" BEGIN - MENUITEM "ƒŠƒAƒ‹ƒ^ƒCƒ€(&R)", ID_PROCESS_PAGE_SETPRIORITY_REALTIME + MENUITEM "リアルタイム(&R)", ID_PROCESS_PAGE_SETPRIORITY_REALTIME - MENUITEM "‚(&H)", ID_PROCESS_PAGE_SETPRIORITY_HIGH + MENUITEM "高(&H)", ID_PROCESS_PAGE_SETPRIORITY_HIGH - MENUITEM "’ʏíˆÈã(&A)", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL + MENUITEM "通常以上(&A)", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL - MENUITEM "’ʏí(&N)", ID_PROCESS_PAGE_SETPRIORITY_NORMAL + MENUITEM "通常(&N)", ID_PROCESS_PAGE_SETPRIORITY_NORMAL - MENUITEM "’ʏíˆÈ‰º(&B)", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL + MENUITEM "通常以下(&B)", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - MENUITEM "’á(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW + MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW END - MENUITEM "ŠÖŒW‚̐ݒè(&A)...", ID_PROCESS_PAGE_SETAFFINITY - MENUITEM "ƒfƒoƒbƒO ƒ`ƒƒƒ“ƒlƒ‹‚̕ύX(&C)...", ID_PROCESS_PAGE_DEBUGCHANNELS + MENUITEM "関係の設定(&A)...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM "デバッグ チャンネルの変更(&C)...", ID_PROCESS_PAGE_DEBUGCHANNELS END END @@ -166,7 +165,7 @@ IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "Task Manager" +CAPTION "タスク マネージャ" MENU IDR_TASKMANAGER FONT 9, "MS UI Gothic" BEGIN @@ -179,9 +178,9 @@ FONT 9, "MS UI Gothic" BEGIN CONTROL "List2",IDC_APPLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 - PUSHBUTTON "V‚µ‚¢ƒ^ƒXƒN(&N)...",IDC_NEWTASK,187,189,53,14 - PUSHBUTTON "Ø‚è‘Ö‚¦(&S)",IDC_SWITCHTO,131,189,53,14,WS_DISABLED - PUSHBUTTON "ƒ^ƒXƒN‚̏I—¹(&E)",IDC_ENDTASK,75,189,53,14,WS_DISABLED + PUSHBUTTON "新しいタスク(&N)...",IDC_NEWTASK,187,189,53,14 + PUSHBUTTON "切り替え(&S)",IDC_SWITCHTO,131,189,53,14,WS_DISABLED + PUSHBUTTON "タスクの終了(&E)",IDC_ENDTASK,75,189,53,14,WS_DISABLED END IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 @@ -191,8 +190,8 @@ BEGIN CONTROL "List2",IDC_PROCESSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 - PUSHBUTTON "ƒvƒƒZƒX‚̏I—¹(&E)",IDC_ENDPROCESS,171,189,69,14 - CONTROL "‘Sƒ†[ƒU[‚̃vƒƒZƒX‚ð•\\ަ‚·‚é(&S)",IDC_SHOWALLPROCESSES, + PUSHBUTTON "プロセスの終了(&E)",IDC_ENDPROCESS,171,189,69,14 + CONTROL "全ユーザーのプロセスを表\示する(&S)",IDC_SHOWALLPROCESSES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,191,111,10 END @@ -201,77 +200,77 @@ IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN - GROUPBOX "CPU Žg—p—¦",IDC_CPU_USAGE_FRAME,5,5,60,54,0,WS_EX_TRANSPARENT - GROUPBOX "MEM Usage",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT,WS_EX_TRANSPARENT - GROUPBOX "‡Œv",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "ƒRƒ~ƒbƒg ƒ`ƒƒ[ƒW (KB)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "•¨—ƒƒ‚ƒŠ (KB)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "ƒJ[ƒlƒ‹ ƒƒ‚ƒŠ (KB)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT - LTEXT "ƒnƒ“ƒhƒ‹",IDS_TOTALS_HANDLE_COUNT,12,131,27,8 - LTEXT "ƒXƒŒƒbƒh",IDS_TOTALS_THREAD_COUNT,12,140,27,8 - LTEXT "ƒvƒƒZƒX",IDS_TOTALS_PROCESS_COUNT,12,149,34,8 + GROUPBOX "CPU 使用率",IDC_CPU_USAGE_FRAME,5,5,60,54,0,WS_EX_TRANSPARENT + GROUPBOX "メモリ使用量",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT,WS_EX_TRANSPARENT + GROUPBOX "合計",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "コミット チャージ (KB)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "物理メモリ (KB)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "カーネル メモリ (KB)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT + LTEXT "ハンドル",IDS_TOTALS_HANDLE_COUNT,12,131,27,8 + LTEXT "スレッド",IDS_TOTALS_THREAD_COUNT,12,140,27,8 + LTEXT "プロセス",IDS_TOTALS_PROCESS_COUNT,12,149,34,8 EDITTEXT IDC_TOTALS_HANDLE_COUNT,65,131,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_TOTALS_THREAD_COUNT,65,140,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_TOTALS_PROCESS_COUNT,65,149,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "‡Œv",IDS_COMMIT_CHARGE_TOTAL,12,175,27,8 - LTEXT "§ŒÀ’l",IDS_COMMIT_CHARGE_LIMIT,12,184,15,8,NOT WS_BORDER - LTEXT "Å‘å’l",IDS_COMMIT_CHARGE_PEAK,12,193,34,8 + LTEXT "合計",IDS_COMMIT_CHARGE_TOTAL,12,175,27,8 + LTEXT "制限値",IDS_COMMIT_CHARGE_LIMIT,12,184,15,8,NOT WS_BORDER + LTEXT "最大値",IDS_COMMIT_CHARGE_PEAK,12,193,34,8 EDITTEXT IDC_COMMIT_CHARGE_TOTAL,65,174,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_COMMIT_CHARGE_LIMIT,65,184,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_COMMIT_CHARGE_PEAK,65,193,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "‡Œv",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 - LTEXT "Available",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,30,8 - LTEXT "ƒVƒXƒeƒ€ ƒLƒƒƒbƒVƒ…",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,46,8 + LTEXT "合計",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 + LTEXT "利用可能",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,30,8 + LTEXT "システム キャッシュ",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,46,8 EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL,185,131,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE,185,140,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE,185,149,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "‡Œv",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8 - LTEXT "ƒy[ƒW",IDS_KERNEL_MEMORY_PAGED,137,184,21,8 - LTEXT "”ñƒy[ƒW",IDS_KERNEL_MEMORY_NONPAGED,137,193,34,8 + LTEXT "合計",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8 + LTEXT "ページ",IDS_KERNEL_MEMORY_PAGED,137,184,21,8 + LTEXT "非ページ",IDS_KERNEL_MEMORY_NONPAGED,137,193,34,8 EDITTEXT IDC_KERNEL_MEMORY_TOTAL,185,174,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_PAGED,185,184,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_NONPAGED,185,193,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - GROUPBOX "CPU Žg—p—¦‚Ì—š—ð",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT - GROUPBOX "ƒƒ‚ƒŠŽg—p—ʂ̗š—ð",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT - PUSHBUTTON "CPU Žg—p—¦‚Ì•\\ަ",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON "ƒƒ‚ƒŠŽg—p—ʂ̕\\ަ",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON "CPU Žg—p—¦‚Ì—š—ð",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, + GROUPBOX "CPU 使用率の履歴",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT + GROUPBOX "メモリ使用量の履歴",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT + PUSHBUTTON "CPU 使用率の表\示",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE + PUSHBUTTON "メモリ使用量の表\示",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE + PUSHBUTTON "CPU 使用率の履歴",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON "ƒƒ‚ƒŠŽg—p—ʂ̗š—ð",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, + PUSHBUTTON "メモリ使用量の履歴",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ƒfƒoƒbƒO ƒ`ƒƒƒ“ƒlƒ‹" +CAPTION "デバッグ チャンネル" FONT 9, "MS UI Gothic" BEGIN CONTROL "List2",IDC_DEBUG_CHANNELS_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP | LVS_SORTASCENDING,7,7,233,177 - PUSHBUTTON "•‚¶‚é",IDOK,171,189,69,14 + PUSHBUTTON "閉じる",IDOK,171,189,69,14 END IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ƒvƒƒZƒbƒT‚ÌŠÖŒW" +CAPTION "プロセッサの関係" FONT 9, "MS UI Gothic" BEGIN DEFPUSHBUTTON "OK",IDOK,120,133,50,14 - PUSHBUTTON "ƒLƒƒƒ“ƒZƒ‹",IDCANCEL,174,133,50,14 - LTEXT "ƒvƒƒZƒbƒT‚ÌŠÖŒW‚̐ݒè‚́A‚Ç‚Ì CPU ‚ŃvƒƒZƒX‚ðŽÀs‚·‚é‚©‚𐧌䂵‚Ü‚·B", + PUSHBUTTON "キャンセル",IDCANCEL,174,133,50,14 + LTEXT "プロセッサの関係の設定は、どの CPU でプロセスを実行するかを制御します。", IDC_STATIC,5,5,220,16 CONTROL "CPU 0",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 11,28,37,10 @@ -341,62 +340,62 @@ END IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "—ñ‚Ì‘I‘ð" +CAPTION "列の選択" FONT 9, "MS UI Gothic" BEGIN DEFPUSHBUTTON "OK",IDOK,84,178,50,14 - PUSHBUTTON "ƒLƒƒƒ“ƒZƒ‹",IDCANCEL,138,178,50,14 - LTEXT "ƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚Ì [ƒvƒƒZƒX] ƒy[ƒW‚É•\\ަ‚·‚é—ñ‚ð‘I‘ð‚µ‚Ü‚·B", + PUSHBUTTON "キャンセル",IDCANCEL,138,178,50,14 + LTEXT "タスク マネージャの [プロセス] ページに表\示する列を選択します。", IDC_STATIC,7,7,181,17 - CONTROL "ƒCƒ[ƒW–¼(&I)",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | + CONTROL "イメージ名(&I)",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,28,56,10 - CONTROL "PID (ƒvƒƒZƒX ID)(&P)",IDC_PID,"Button", + CONTROL "PID (プロセス ID)(&P)",IDC_PID,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,39,88,10 - CONTROL "CPU Žg—p—¦(&C)",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "CPU 使用率(&C)",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,50,53,10 - CONTROL "CPU ŽžŠÔ(&E)",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | + CONTROL "CPU 時間(&E)",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,61,48,10 - CONTROL "ƒƒ‚ƒŠŽg—p—Ê(&M)",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "メモリ使用量(&M)",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,63,10 - CONTROL "ƒƒ‚ƒŠŽg—p—ʃfƒ‹ƒ^(&D)",IDC_MEMORYUSAGEDELTA,"Button", + CONTROL "メモリ使用量デルタ(&D)",IDC_MEMORYUSAGEDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,83,82,10 - CONTROL "Å‘僁ƒ‚ƒŠŽg—p—Ê(&K)",IDC_PEAKMEMORYUSAGE,"Button", + CONTROL "最大メモリ使用量(&K)",IDC_PEAKMEMORYUSAGE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,94,82,10 - CONTROL "ƒy[ƒW ƒtƒHƒ‹ƒg(&F)",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | + CONTROL "ページ フォルト(&F)",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,105,53,10 - CONTROL "USER ƒIƒuƒWƒFƒNƒg(&U)",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | + CONTROL "USER オブジェクト(&U)",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,116,62,10 - CONTROL "I/O “ǂݎæ‚è",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | + CONTROL "I/O 読み取り",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,127,49,10 - CONTROL "I/O Read Bytes",IDC_IOREADBYTES,"Button", + CONTROL "I/O 読み取りバイト数",IDC_IOREADBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,138,65,10 - CONTROL "ƒZƒbƒVƒ‡ƒ“ ID(&S)",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | + CONTROL "セッション ID(&S)",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,149,50,10 - CONTROL "ƒ†[ƒU[–¼(&N)",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | + CONTROL "ユーザー名(&N)",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,160,51,10 - CONTROL "ƒy[ƒW ƒtƒHƒ‹ƒg ƒfƒ‹ƒ^(&A)",IDC_PAGEFAULTSDELTA,"Button", + CONTROL "ページ フォルト デルタ(&A)",IDC_PAGEFAULTSDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,28,72,10 - CONTROL "‰¼‘zƒƒ‚ƒŠ ƒTƒCƒY(&V)",IDC_VIRTUALMEMORYSIZE,"Button", + CONTROL "仮想メモリ サイズ(&V)",IDC_VIRTUALMEMORYSIZE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,39,77,10 - CONTROL "ƒy[ƒW ƒv[ƒ‹(&G)",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | + CONTROL "ページ プール(&G)",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,50,53,10 - CONTROL "”ñƒy[ƒW ƒv[ƒ‹(&O)",IDC_NONPAGEDPOOL,"Button", + CONTROL "非ページ プール(&O)",IDC_NONPAGEDPOOL,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,61,67,10 - CONTROL "Šî–{—Dæ“x(&R)",IDC_BASEPRIORITY,"Button", + CONTROL "基本優先度(&R)",IDC_BASEPRIORITY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,72,55,10 - CONTROL "ƒnƒ“ƒhƒ‹‚̐”(&H)",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "ハンドルの数(&H)",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,83,59,10 - CONTROL "ƒXƒŒƒbƒh‚̐”(&T)",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "スレッドの数(&T)",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,94,59,10 - CONTROL "GDI ƒIƒuƒWƒFƒNƒg",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | + CONTROL "GDI オブジェクト",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,105,55,10 - CONTROL "I/O Writes",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | + CONTROL "I/O 書き込み",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,116,49,10 - CONTROL "I/O Write Bytes",IDC_IOWRITEBYTES,"Button", + CONTROL "I/O 書き込みバイト数",IDC_IOWRITEBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,127,65,10 - CONTROL "I/O ‚»‚Ì‘¼",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | + CONTROL "I/O その他",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,138,46,10 - CONTROL "I/O Other Bytes",IDC_IOOTHERBYTES,"Button", + CONTROL "I/O その他のバイト数",IDC_IOOTHERBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,149,65,10 END @@ -521,135 +520,135 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_APP_TITLE "Task Manager" - IDC_TASKMGR "Task Manager" + IDS_APP_TITLE "タスク マネージャ" + IDC_TASKMGR "タスク マネージャ" IDS_IDLE_PROCESS "System Idle Process" END STRINGTABLE DISCARDABLE BEGIN - ID_FILE_NEW "V‚µ‚¢ƒvƒƒOƒ‰ƒ€‚ðŽÀs‚µ‚Ü‚·" - ID_OPTIONS_ALWAYSONTOP "Å¬‰»‚³‚ê‚È‚¢ŒÀ‚èAí‚Ƀ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚ª‚Ù‚©‚Ì‚·‚ׂẴEƒBƒ“ƒhƒE‚æ‚è‚àŽè‘O‚É•\\ަ‚³‚ê‚Ü‚·" + ID_FILE_NEW "新しいプログラムを実行します" + ID_OPTIONS_ALWAYSONTOP "最小化されない限り、常にタスク マネージャがほかのすべてのウィンドウよりも手前に表\示されます" ID_OPTIONS_MINIMIZEONUSE - "[Ø‚è‘Ö‚¦] ‘€ì‚ðŽÀs‚·‚邯Aƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚ªÅ¬‰»‚³‚ê‚Ü‚·" - ID_OPTIONS_HIDEWHENMINIMIZED "Å¬‰»‚³‚ꂽ‚Æ‚«‚ɁAƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚ð‰B‚µ‚Ü‚·" - ID_VIEW_REFRESH "[XV‚Ì•p“x] ‚̐ݒè‚É‚©‚©‚í‚炸A¡‚·‚®ƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚ðXV‚µ‚Ü‚·" - ID_VIEW_LARGE "‘å‚«‚¢ƒAƒCƒRƒ“‚ðŽg‚Á‚ă^ƒXƒN‚ð•\\ަ‚µ‚Ü‚·" - ID_VIEW_SMALL "¬‚³‚¢ƒAƒCƒRƒ“‚ðŽg‚Á‚ă^ƒXƒN‚ð•\\ަ‚µ‚Ü‚·" - ID_VIEW_DETAILS "Šeƒ^ƒXƒN‚̏î•ñ‚ð•\\ަ‚µ‚Ü‚·" - ID_VIEW_UPDATESPEED_HIGH "–ˆ•b 2 ‰ñ•\\ަ‚ðXV‚µ‚Ü‚·" - ID_VIEW_UPDATESPEED_NORMAL "2 •b‚É 1 ‰ñ•\\ަ‚ðXV‚µ‚Ü‚·" - ID_VIEW_UPDATESPEED_LOW "4 •b‚É 1 ‰ñ•\\ަ‚ðXV‚µ‚Ü‚·" + "[切り替え] 操作を実行すると、タスク マネージャが最小化されます" + ID_OPTIONS_HIDEWHENMINIMIZED "最小化されたときに、タスク マネージャを隠します" + ID_VIEW_REFRESH "[更新の頻度] の設定にかかわらず、今すぐタスク マネージャを更新します" + ID_VIEW_LARGE "大きいアイコンを使ってタスクを表\示します" + ID_VIEW_SMALL "小さいアイコンを使ってタスクを表\示します" + ID_VIEW_DETAILS "各タスクの情報を表\示します" + ID_VIEW_UPDATESPEED_HIGH "毎秒 2 回表\示を更新します" + ID_VIEW_UPDATESPEED_NORMAL "2 秒に 1 回表\示を更新します" + ID_VIEW_UPDATESPEED_LOW "4 秒に 1 回表\示を更新します" END STRINGTABLE DISCARDABLE BEGIN - ID_VIEW_UPDATESPEED_PAUSED "•\\ަ‚ðŽ©“®“I‚ɍXV‚µ‚Ü‚¹‚ñ" + ID_VIEW_UPDATESPEED_PAUSED "表\示を自動的に更新しません" ID_WINDOWS_TILEHORIZONTALLY - "ƒfƒXƒNƒgƒbƒvã‚ŃEƒBƒ“ƒhƒE‚ðd‚È‚ç‚È‚¢‚悤‚ɏ㉺‚É•À‚ׂĕ\\ަ‚µ‚Ü‚·" - ID_WINDOWS_TILEVERTICALLY "ƒfƒXƒNƒgƒbƒvã‚ŃEƒBƒ“ƒhƒE‚ðd‚È‚ç‚È‚¢‚悤‚ɍ¶‰E‚É•À‚ׂĕ\\ަ‚µ‚Ü‚·" - ID_WINDOWS_MINIMIZE "ƒEƒBƒ“ƒhƒE‚ðÅ¬‰»‚µ‚Ü‚·" - ID_WINDOWS_MAXIMIZE "ƒEƒBƒ“ƒhƒE‚ðÅ‘剻‚µ‚Ü‚·" - ID_WINDOWS_CASCADE "ƒfƒXƒNƒgƒbƒvã‚ŃEƒBƒ“ƒhƒE‚ðd‚˂ĕ\\ަ‚µ‚Ü‚·" - ID_WINDOWS_BRINGTOFRONT "ƒEƒBƒ“ƒhƒE‚ðŽè‘O‚É•\\ަ‚µ‚Ü‚·‚ªAØ‚è‘Ö‚¦‚Ü‚¹‚ñB" - ID_HELP_TOPICS "ƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚̃wƒ‹ƒv ƒgƒsƒbƒN‚ð•\\ަ‚µ‚Ü‚·" - ID_HELP_ABOUT "ƒvƒƒOƒ‰ƒ€î•ñAƒo[ƒWƒ‡ƒ“”ԍ†A’˜ìŒ ‚ð•\\ަ‚µ‚Ü‚·" - ID_FILE_EXIT "ƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðI—¹‚µ‚Ü‚·" + "デスクトップ上でウィンドウを重ならないように上下に並べて表\示します" + ID_WINDOWS_TILEVERTICALLY "デスクトップ上でウィンドウを重ならないように左右に並べて表\示します" + ID_WINDOWS_MINIMIZE "ウィンドウを最小化します" + ID_WINDOWS_MAXIMIZE "ウィンドウを最大化します" + ID_WINDOWS_CASCADE "デスクトップ上でウィンドウを重ねて表\示します" + ID_WINDOWS_BRINGTOFRONT "ウィンドウを手前に表\示しますが、切り替えません。" + ID_HELP_TOPICS "タスク マネージャのヘルプ トピックを表\示します" + ID_HELP_ABOUT "プログラム情報、バージョン番号、著作権を表\示します" + ID_FILE_EXIT "タスク マネージャ アプリケーションを終了します" ID_OPTIONS_SHOW16BITTASKS - "16 ƒrƒbƒg ƒ^ƒXƒN‚ðAŠÖ˜A•t‚¯‚ç‚ꂽ ntvdm.exe ‚̉º‚É•\\ަ‚µ‚Ü‚·" - ID_VIEW_SELECTCOLUMNS "[ƒvƒƒZƒX] ƒy[ƒW‚É•\\ަ‚·‚é—ñ‚ð‘I‘ð‚µ‚Ü‚·" - ID_VIEW_SHOWKERNELTIMES "ƒJ[ƒlƒ‹ŽžŠÔ‚ðƒpƒtƒH[ƒ}ƒ“ƒX ƒOƒ‰ƒtã‚É•\\ަ‚µ‚Ü‚·" + "16 ビット タスクを、関連付けられた ntvdm.exe の下に表\示します" + ID_VIEW_SELECTCOLUMNS "[プロセス] ページに表\示する列を選択します" + ID_VIEW_SHOWKERNELTIMES "カーネル時間をパフォーマンス グラフ上に表\示します" ID_VIEW_CPUHISTORY_ONEGRAPHALL - "1 ‚‚̗š—ðƒOƒ‰ƒt‚Å CPU Žg—p—¦‚̍‡Œv‚ð•\\ަ‚µ‚Ü‚·" - ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "CPU Žg—p—¦‚Ì—š—ð‚ð CPU ‚²‚ƂɃOƒ‰ƒt‚Å•\\ަ‚µ‚Ü‚·" + "1 つの履歴グラフで CPU 使用率の合計を表\示します" + ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "CPU 使用率の履歴を CPU ごとにグラフで表\示します" ID_APPLICATION_PAGE_SWITCHTO - "ƒ^ƒXƒN‚ðŽè‘O‚É•\\ަ‚µAƒtƒH[ƒJƒX‚ðØ‚è‘Ö‚¦‚Ü‚·" + "タスクを手前に表\示し、フォーカスを切り替えます" END STRINGTABLE DISCARDABLE BEGIN - ID_ENDTASK "‘I‘ð‚³‚ê‚Ä‚¢‚éƒ^ƒXƒN‚ɏI—¹‚·‚邿‚¤Žwަ‚µ‚Ü‚·" - ID_GOTOPROCESS "‘I‘ð‚³‚ê‚Ä‚¢‚éƒ^ƒXƒN‚̃vƒƒZƒX‚ɃtƒH[ƒJƒX‚ðØ‚è‘Ö‚¦‚Ü‚·" - ID_RESTORE "‰B‚ê‚Ä‚¢‚½ƒ^ƒXƒN ƒ}ƒl[ƒWƒƒ‚ðŒ³‚É–ß‚µ‚Ü‚·" - ID_PROCESS_PAGE_ENDPROCESS "ƒVƒXƒeƒ€‚©‚çƒvƒƒZƒX‚ðíœ‚µ‚Ü‚·" + ID_ENDTASK "選択されているタスクに終了するよう指示します" + ID_GOTOPROCESS "選択されているタスクのプロセスにフォーカスを切り替えます" + ID_RESTORE "隠れていたタスク マネージャを元に戻します" + ID_PROCESS_PAGE_ENDPROCESS "システムからプロセスを削除します" ID_PROCESS_PAGE_ENDPROCESSTREE - "‚±‚̃vƒƒZƒX‚ÆŽqƒvƒƒZƒX‚ð‚·‚×‚Äíœ‚µ‚Ü‚·" - ID_PROCESS_PAGE_DEBUG "‚±‚̃vƒƒZƒX‚ɃfƒoƒbƒK‚ð“Y•t‚µ‚Ü‚·" + "このプロセスと子プロセスをすべて削除します" + ID_PROCESS_PAGE_DEBUG "このプロセスにデバッガを添付します" ID_PROCESS_PAGE_SETAFFINITY - "‚ǂ̃vƒƒZƒbƒT‚ŃvƒƒZƒX‚ðŽÀs‚·‚é‚©‚𐧌䂵‚Ü‚·" + "どのプロセッサでプロセスを実行するかを制御します" ID_PROCESS_PAGE_SETPRIORITY_REALTIME - "ƒvƒƒZƒX‚ðƒŠƒAƒ‹ƒ^ƒCƒ€—Dæ“xƒNƒ‰ƒX‚ɐݒ肵‚Ü‚·" - ID_PROCESS_PAGE_SETPRIORITY_HIGH "ƒvƒƒZƒX‚ð‚—Dæ“xƒNƒ‰ƒX‚ɐݒ肵‚Ü‚·" + "プロセスをリアルタイム優先度クラスに設定します" + ID_PROCESS_PAGE_SETPRIORITY_HIGH "プロセスを高優先度クラスに設定します" ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL - "ƒvƒƒZƒX‚ð’ʏíˆÈã‚Ì—Dæ“xƒNƒ‰ƒX‚ɐݒ肵‚Ü‚·" + "プロセスを通常以上の優先度クラスに設定します" ID_PROCESS_PAGE_SETPRIORITY_NORMAL - "ƒvƒƒZƒX‚ð’ʏí—Dæ“xƒNƒ‰ƒX‚ɐݒ肵‚Ü‚·" + "プロセスを通常優先度クラスに設定します" ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - "ƒvƒƒZƒX‚ð’ʏíˆÈ‰º‚Ì—Dæ“xƒNƒ‰ƒX‚ɐݒ肵‚Ü‚·" - ID_PROCESS_PAGE_SETPRIORITY_LOW "ƒvƒƒZƒX‚ð’á—Dæ“xƒNƒ‰ƒX‚ɐݒ肵‚Ü‚·" + "プロセスを通常以下の優先度クラスに設定します" + ID_PROCESS_PAGE_SETPRIORITY_LOW "プロセスを低優先度クラスに設定します" END STRINGTABLE DISCARDABLE BEGIN - IDS_TAB_APPS "Applications" - IDS_TAB_PROCESSES "ƒvƒƒZƒX" - IDS_TAB_PERFORMANCE "ƒpƒtƒH[ƒ}ƒ“ƒX" - IDS_TAB_TASK "ƒ^ƒXƒN" - IDS_TAB_STATUS "Status" - IDS_TAB_IMAGENAME "ƒCƒ[ƒW–¼" + IDS_TAB_APPS "アプリケーション" + IDS_TAB_PROCESSES "プロセス" + IDS_TAB_PERFORMANCE "パフォーマンス" + IDS_TAB_TASK "タスク" + IDS_TAB_STATUS "状態" + IDS_TAB_IMAGENAME "イメージ名" IDS_TAB_PID "PID" - IDS_TAB_USERNAME "ƒ†[ƒU[–¼" - IDS_TAB_SESSIONID "ƒZƒbƒVƒ‡ƒ“ ID" + IDS_TAB_USERNAME "ユーザー名" + IDS_TAB_SESSIONID "セッション ID" IDS_TAB_CPU "CPU" - IDS_TAB_CPUTIME "CPU Time" - IDS_TAB_MEMUSAGE "Mem Usage" - IDS_TAB_PEAKMEMUSAGE "Peak Mem Usage" - IDS_TAB_MEMDELTA "ƒƒ‚ƒŠ ƒfƒ‹ƒ^" - IDS_TAB_PAGEFAULT "ƒy[ƒW ƒtƒHƒ‹ƒg" - IDS_TAB_PFDELTA "ƒy[ƒW ƒtƒHƒ‹ƒg ƒfƒ‹ƒ^" - IDS_TAB_VMSIZE "‰¼‘zƒƒ‚ƒŠ ƒTƒCƒY" - IDS_TAB_PAGEDPOOL "ƒy[ƒW ƒv[ƒ‹" - IDS_TAB_NPPOOL "”ñƒy[ƒW ƒv[ƒ‹" - IDS_TAB_BASEPRI "Šî–{—Dæ“x" - IDS_TAB_HANDLES "ƒnƒ“ƒhƒ‹" - IDS_TAB_THREADS "ƒXƒŒƒbƒh" - IDS_TAB_USERPBJECTS "USER ƒIƒuƒWƒFƒNƒg" - IDS_TAB_GDIOBJECTS "GDI ƒIƒuƒWƒFƒNƒg" - IDS_TAB_IOREADS "I/O “ǂݎæ‚è" - IDS_TAB_IOWRITES "I/O Writes" - IDS_TAB_IOOTHER "I/O ‚»‚Ì‘¼" - IDS_TAB_IOREADBYTES "I/O Read Bytes" - IDS_TAB_IOWRITESBYTES "I/O Write Bytes" - IDS_TAB_IOOTHERBYTES "I/O Other Bytes" - IDS_MENU_SELECTCOLUMNS "—ñ‚Ì‘I‘ð(&S)..." - IDS_MENU_16BITTASK "16 ƒrƒbƒg ƒ^ƒXƒN‚Ì•\\ަ(&S)" - IDS_MENU_WINDOWS "ƒEƒBƒ“ƒhƒE(&W)" - IDS_MENU_LARGEICONS "‘å‚«‚¢ƒAƒCƒRƒ“(&G)" - IDS_MENU_SMALLICONS "¬‚³‚¢ƒAƒCƒRƒ“(&M)" - IDS_MENU_DETAILS "Ú×(&D)" - IDS_MENU_ONEGRAPHALLCPUS "‚·‚×‚Ä‚Ì CPU ‚Å 1 ƒOƒ‰ƒt(&O)" - IDS_MENU_ONEGRAPHPERCPU "CPU ‚²‚Æ‚É 1 ƒOƒ‰ƒt(&P)" - IDS_MENU_CPUHISTORY "CPU —š—ð(&C)" - IDS_MENU_SHOWKERNELTIMES "ƒJ[ƒlƒ‹ŽžŠÔ‚ð•\\ަ‚·‚é(&S)" - IDS_CREATENEWTASK "V‚µ‚¢ƒ^ƒXƒN‚̍쐬" - IDS_CREATENEWTASK_DESC "ŽÀs‚·‚éƒvƒƒOƒ‰ƒ€–¼A‚Ü‚½‚ÍŠJ‚­ƒtƒHƒ‹ƒ_‚âƒhƒLƒ…ƒƒ“ƒg–¼AƒCƒ“ƒ^[ƒlƒbƒg ƒŠƒ\\[ƒX–¼‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B" - IDS_MSG_ACCESSPROCESSAFF "ƒvƒƒZƒX‚ÌŠÖŒW‚ւ̃AƒNƒZƒX‚Ü‚½‚͐ݒ肪‚Å‚«‚Ü‚¹‚ñ" - IDS_MSG_PROCESSONEPRO "ƒvƒƒZƒX‚́A­‚È‚­‚Æ‚à 1 ‚‚̃vƒƒZƒbƒT‚ÆŠÖŒW‚ðŽ‚½‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB" - IDS_MSG_INVALIDOPTION "Invalid Option" - IDS_MSG_UNABLEDEBUGPROCESS "ƒfƒoƒbƒK‚ð“Y•t‚Å‚«‚Ü‚¹‚ñ" - IDS_MSG_WARNINGDEBUG "Œx: ‚±‚̃vƒƒZƒX‚ðƒfƒoƒbƒO‚·‚邯Aƒf[ƒ^‚ªŽ¸‚í‚ê‚é‰Â”\\«‚ª‚ ‚è‚Ü‚·B\nƒfƒoƒbƒK‚ð“Y•t‚µ‚Ü‚·‚©?" - IDS_MSG_TASKMGRWARNING "Task Manager Warning" - IDS_MSG_WARNINGTERMINATING "Œx: ƒvƒƒZƒX‚ðI—¹‚·‚邯Aƒf[ƒ^‚ªŽ¸‚í‚ꂽ‚èAƒVƒXƒeƒ€‚ª\n•sˆÀ’è‚ɂȂÁ‚½‚è‚·‚é‚Ȃǂ́A—\\Šú‚µ‚È‚¢Œ‹‰Ê‚ɂȂ邱‚Æ‚ª‚ ‚è‚Ü‚·B\nƒvƒƒZƒX‚ðI—¹‚·‚é‘O‚ɁAó‘Ô‚Ü‚½‚̓f[ƒ^‚ð•Û‘¶‚·‚é‚©‚Ç‚¤‚©‚Ì\nŠm”FƒƒbƒZ[ƒW‚Í•\\ަ‚³‚ê‚Ü‚¹‚ñBƒvƒƒZƒX‚ðI—¹‚µ‚Ü‚·‚©?" - IDS_MSG_UNABLETERMINATEPRO "ƒvƒƒZƒX‚ðI—¹‚Å‚«‚Ü‚¹‚ñ" - IDS_MSG_UNABLECHANGEPRIORITY "—Dæ“x‚ð•ύX‚Å‚«‚Ü‚¹‚ñ" - IDS_MSG_WARNINGCHANGEPRIORITY "Œx: ‚±‚̃vƒƒZƒX‚Ì—Dæ“xƒNƒ‰ƒX‚ð•ύX‚·‚邯AƒVƒXƒeƒ€‚ª•sˆÀ’è‚É\n‚È‚é‚ȂǁA—\\Šú‚µ‚È‚¢Œ‹‰Ê‚ɂȂ邱‚Æ‚ª‚ ‚è‚Ü‚·B\n—Dæ“xƒNƒ‰ƒX‚ð•ύX‚µ‚Ü‚·‚©?" - IDS_MSG_TRAYICONCPUUSAGE "CPU Žg—p—¦: %d%%" - IDS_STATUS_MEMUSAGE "ƒƒ‚ƒŠŽg—p—Ê: %dKB / %dKB" - IDS_STATUS_CPUUSAGE "CPU Žg—p—¦: %3d%%" - IDS_STATUS_PROCESSES "ƒvƒƒZƒX: %d" - IDS_Not_Responding "‰ž“š‚È‚µ" - IDS_Running "ŽÀs’†" + IDS_TAB_CPUTIME "CPU 時間" + IDS_TAB_MEMUSAGE "メモリ使用量" + IDS_TAB_PEAKMEMUSAGE "最大メモリ使用量" + IDS_TAB_MEMDELTA "メモリ デルタ" + IDS_TAB_PAGEFAULT "ページ フォルト" + IDS_TAB_PFDELTA "ページ フォルト デルタ" + IDS_TAB_VMSIZE "仮想メモリ サイズ" + IDS_TAB_PAGEDPOOL "ページ プール" + IDS_TAB_NPPOOL "非ページ プール" + IDS_TAB_BASEPRI "基本優先度" + IDS_TAB_HANDLES "ハンドル" + IDS_TAB_THREADS "スレッド" + IDS_TAB_USERPBJECTS "USER オブジェクト" + IDS_TAB_GDIOBJECTS "GDI オブジェクト" + IDS_TAB_IOREADS "I/O 読み取り" + IDS_TAB_IOWRITES "I/O 書き込み" + IDS_TAB_IOOTHER "I/O その他" + IDS_TAB_IOREADBYTES "I/O 読み取りバイト数" + IDS_TAB_IOWRITESBYTES "I/O 書き込みバイト数" + IDS_TAB_IOOTHERBYTES "I/O その他のバイト数" + IDS_MENU_SELECTCOLUMNS "列の選択(&S)..." + IDS_MENU_16BITTASK "16 ビット タスクの表\示(&S)" + IDS_MENU_WINDOWS "ウィンドウ(&W)" + IDS_MENU_LARGEICONS "大きいアイコン(&G)" + IDS_MENU_SMALLICONS "小さいアイコン(&M)" + IDS_MENU_DETAILS "詳細(&D)" + IDS_MENU_ONEGRAPHALLCPUS "すべての CPU で 1 グラフ(&O)" + IDS_MENU_ONEGRAPHPERCPU "CPU ごとに 1 グラフ(&P)" + IDS_MENU_CPUHISTORY "CPU 履歴(&C)" + IDS_MENU_SHOWKERNELTIMES "カーネル時間を表\示する(&S)" + IDS_CREATENEWTASK "新しいタスクの作成" + IDS_CREATENEWTASK_DESC "実行するプログラム名、または開くフォルダやドキュメント名、インターネット リソ\ース名を入力してください。" + IDS_MSG_ACCESSPROCESSAFF "プロセスの関係へのアクセスまたは設定ができません" + IDS_MSG_PROCESSONEPRO "プロセスは、少なくとも 1 つのプロセッサと関係を持たなければなりません。" + IDS_MSG_INVALIDOPTION "無効なオプション" + IDS_MSG_UNABLEDEBUGPROCESS "デバッガを添付できません" + IDS_MSG_WARNINGDEBUG "警告: このプロセスをデバッグすると、データが失われる可能\性があります。\nデバッガを添付しますか?" + IDS_MSG_TASKMGRWARNING "タスク マネージャの警告" + IDS_MSG_WARNINGTERMINATING "警告: プロセスを終了すると、データが失われたり、システムが\n不安定になったりするなどの、予\期しない結果になることがあります。\nプロセスを終了する前に、状態またはデータを保存するかどうかの\n確認メッセージは表\示されません。プロセスを終了しますか?" + IDS_MSG_UNABLETERMINATEPRO "プロセスを終了できません" + IDS_MSG_UNABLECHANGEPRIORITY "優先度を変更できません" + IDS_MSG_WARNINGCHANGEPRIORITY "警告: このプロセスの優先度クラスを変更すると、システムが不安定に\nなるなど、予\期しない結果になることがあります。\n優先度クラスを変更しますか?" + IDS_MSG_TRAYICONCPUUSAGE "CPU 使用率: %d%%" + IDS_STATUS_MEMUSAGE "メモリ使用量: %dKB / %dKB" + IDS_STATUS_CPUUSAGE "CPU 使用率: %3d%%" + IDS_STATUS_PROCESSES "プロセス: %d" + IDS_Not_Responding "応答なし" + IDS_Running "実行中" END diff --git a/base/applications/taskmgr/lang/pl-PL.rc b/base/applications/taskmgr/lang/pl-PL.rc index 3f594c2f650..cfb9345f1ec 100644 --- a/base/applications/taskmgr/lang/pl-PL.rc +++ b/base/applications/taskmgr/lang/pl-PL.rc @@ -1,21 +1,11 @@ /* -* translated by xrogers -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ -///////////////////////////////////////////////////////////////////////////// -// Polish resources + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -#pragma code_page(1250) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// IDR_TASKMANAGER MENU DISCARDABLE BEGIN @@ -23,13 +13,13 @@ BEGIN BEGIN MENUITEM "&Nowe zadanie (Uruchom...)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Zakocz prac Menedera zada", ID_FILE_EXIT + MENUITEM "&Zakończ pracę Menedżera zadań", ID_FILE_EXIT END POPUP "&Opcje" BEGIN MENUITEM "Za&wsze na wierzchu", ID_OPTIONS_ALWAYSONTOP , CHECKED - MENUITEM "&Minimalizuj podczas uytkowania", ID_OPTIONS_MINIMIZEONUSE + MENUITEM "&Minimalizuj podczas użytkowania", ID_OPTIONS_MINIMIZEONUSE , CHECKED MENUITEM "&Ukryj, gdy zminimalizowane", ID_OPTIONS_HIDEWHENMINIMIZED , CHECKED @@ -38,8 +28,8 @@ BEGIN END POPUP "&Widok" BEGIN - MENUITEM "&Odwie teraz", ID_VIEW_REFRESH - POPUP "&Szybko aktualizacji" + MENUITEM "&Odśwież teraz", ID_VIEW_REFRESH + POPUP "&Częstotliwość aktualizacji" BEGIN MENUITEM "&Wysoka", ID_VIEW_UPDATESPEED_HIGH MENUITEM "&Normalna", ID_VIEW_UPDATESPEED_NORMAL @@ -49,44 +39,44 @@ BEGIN END MENUITEM SEPARATOR - MENUITEM "D&ue ikony", ID_VIEW_LARGE - MENUITEM "&Mae ikony", ID_VIEW_SMALL - MENUITEM "&Szczegy", ID_VIEW_DETAILS, CHECKED + MENUITEM "D&uże ikony", ID_VIEW_LARGE + MENUITEM "&Małe ikony", ID_VIEW_SMALL + MENUITEM "&Szczegóły", ID_VIEW_DETAILS, CHECKED MENUITEM "Wybierz &kolumny...", ID_VIEW_SELECTCOLUMNS - POPUP "H&istoria uycia procesora CPU" + POPUP "H&istoria użycia procesora CPU" BEGIN - MENUITEM "Jeden &wykres dla wszystkich procesorw CPU", ID_VIEW_CPUHISTORY_ONEGRAPHALL + MENUITEM "Jeden &wykres dla wszystkich procesorów CPU", ID_VIEW_CPUHISTORY_ONEGRAPHALL - MENUITEM "Jeden w&ykres dla kadego procesora CPU", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU + MENUITEM "Jeden w&ykres dla każdego procesora CPU", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU , CHECKED END - MENUITEM "Poka &czas jdra", ID_VIEW_SHOWKERNELTIMES + MENUITEM "Pokaż &czas jądra", ID_VIEW_SHOWKERNELTIMES END POPUP "O&kna" BEGIN - MENUITEM "&Ssiadujco w poziomie", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "Ssi&adujco w pionie", ID_WINDOWS_TILEVERTICALLY + MENUITEM "&Sąsiadująco w poziomie", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "Sąsi&adująco w pionie", ID_WINDOWS_TILEVERTICALLY MENUITEM "Mi&nimalizuj", ID_WINDOWS_MINIMIZE MENUITEM "&Maksymalizuj", ID_WINDOWS_MAXIMIZE MENUITEM "&Kaskadowo", ID_WINDOWS_CASCADE - MENUITEM "&Przesu na wierzch", ID_WINDOWS_BRINGTOFRONT + MENUITEM "&Przesuń na wierzch", ID_WINDOWS_BRINGTOFRONT END POPUP "Pomo&c" BEGIN - MENUITEM "Meneder zada - tematy &pomocy", ID_HELP_TOPICS + MENUITEM "Menedżer zadań - tematy &pomocy", ID_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "Meneder zada - &informacje", ID_HELP_ABOUT + MENUITEM "Menedżer zadań - &informacje", ID_HELP_ABOUT END END IDR_WINDOWSMENU MENU DISCARDABLE BEGIN - MENUITEM "&Ssiadujco w poziomie", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "Ssi&adujco w pionie", ID_WINDOWS_TILEVERTICALLY + MENUITEM "&Sąsiadująco w poziomie", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "Sąsi&adująco w pionie", ID_WINDOWS_TILEVERTICALLY MENUITEM "Mi&nimalizuj", ID_WINDOWS_MINIMIZE MENUITEM "&Maksymalizuj", ID_WINDOWS_MAXIMIZE MENUITEM "&Kaskadowo", ID_WINDOWS_CASCADE - MENUITEM "&Przesu na wierzch", ID_WINDOWS_BRINGTOFRONT + MENUITEM "&Przesuń na wierzch", ID_WINDOWS_BRINGTOFRONT END IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE @@ -95,9 +85,9 @@ BEGIN BEGIN MENUITEM "&Nowe zadanie (Uruchom...)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "D&ue ikony", ID_VIEW_LARGE - MENUITEM "&Mae ikony", ID_VIEW_SMALL - MENUITEM "&Szczegy", ID_VIEW_DETAILS, CHECKED + MENUITEM "D&uże ikony", ID_VIEW_LARGE + MENUITEM "&Małe ikony", ID_VIEW_SMALL + MENUITEM "&Szczegóły", ID_VIEW_DETAILS, CHECKED END END @@ -105,17 +95,17 @@ IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "P&rzecz na", ID_APPLICATION_PAGE_SWITCHTO - MENUITEM "&Przesu na wierzch", ID_WINDOWS_BRINGTOFRONT + MENUITEM "P&rzełącz na", ID_APPLICATION_PAGE_SWITCHTO + MENUITEM "&Przesuń na wierzch", ID_WINDOWS_BRINGTOFRONT MENUITEM SEPARATOR - MENUITEM "&Ssiadujco w poziomie", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "Ssi&adujco w pionie", ID_WINDOWS_TILEVERTICALLY + MENUITEM "&Sąsiadująco w poziomie", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "Sąsi&adująco w pionie", ID_WINDOWS_TILEVERTICALLY MENUITEM "Mi&nimalizuj", ID_WINDOWS_MINIMIZE MENUITEM "&Maksymalizuj", ID_WINDOWS_MAXIMIZE MENUITEM "&Kaskadowo", ID_WINDOWS_CASCADE MENUITEM SEPARATOR - MENUITEM "&Zakocz zadanie", ID_APPLICATION_PAGE_ENDTASK - MENUITEM "Prz&ejd do procesu", ID_APPLICATION_PAGE_GOTOPROCESS + MENUITEM "&Zakończ zadanie", ID_APPLICATION_PAGE_ENDTASK + MENUITEM "Prz&ejdź do procesu", ID_APPLICATION_PAGE_GOTOPROCESS END END @@ -124,7 +114,7 @@ IDR_TRAY_POPUP MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&Przywr", ID_RESTORE + MENUITEM "&Przywróć", ID_RESTORE MENUITEM "&Zamknij", ID_FILE_EXIT MENUITEM SEPARATOR MENUITEM "Za&wsze na wierzchu", ID_OPTIONS_ALWAYSONTOP @@ -135,8 +125,8 @@ IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&Zakocz proces", ID_PROCESS_PAGE_ENDPROCESS - MENUITEM "Zamknij &drzewo procesw", ID_PROCESS_PAGE_ENDPROCESSTREE + MENUITEM "&Zakończ proces", ID_PROCESS_PAGE_ENDPROCESS + MENUITEM "Zamknij &drzewo procesów", ID_PROCESS_PAGE_ENDPROCESSTREE MENUITEM "D&ebuguj", ID_PROCESS_PAGE_DEBUG MENUITEM SEPARATOR @@ -146,17 +136,17 @@ BEGIN MENUITEM "&Wysoki", ID_PROCESS_PAGE_SETPRIORITY_HIGH - MENUITEM "&Powyej normalnego", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL + MENUITEM "&Powyżej normalnego", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL MENUITEM "&Normalny", ID_PROCESS_PAGE_SETPRIORITY_NORMAL - MENUITEM "P&oniej normalnego", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL + MENUITEM "P&oniżej normalnego", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL MENUITEM "N&iski", ID_PROCESS_PAGE_SETPRIORITY_LOW END - MENUITEM "Ustaw &koligacj...", ID_PROCESS_PAGE_SETAFFINITY - MENUITEM "Edytuj &kanay debugowania...", ID_PROCESS_PAGE_DEBUGCHANNELS + MENUITEM "Ustaw &koligację...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM "Edytuj &kanały debugowania...", ID_PROCESS_PAGE_DEBUGCHANNELS END END @@ -171,7 +161,7 @@ IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "Meneder zada" +CAPTION "Menedżer zadań" MENU IDR_TASKMANAGER FONT 8, "MS Shell Dlg" BEGIN @@ -185,8 +175,8 @@ BEGIN CONTROL "List2",IDC_APPLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 PUSHBUTTON "&Nowe zadanie...",IDC_NEWTASK,175,189,65,14 - PUSHBUTTON "P&rzecz na",IDC_SWITCHTO,107,189,65,14,WS_DISABLED - PUSHBUTTON "&Zakocz zadanie",IDC_ENDTASK,39,189,65,14,WS_DISABLED + PUSHBUTTON "P&rzełącz na",IDC_SWITCHTO,107,189,65,14,WS_DISABLED + PUSHBUTTON "&Zakończ zadanie",IDC_ENDTASK,39,189,65,14,WS_DISABLED END IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 @@ -196,8 +186,8 @@ BEGIN CONTROL "List2",IDC_PROCESSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 - PUSHBUTTON "&Zakocz proces",IDC_ENDPROCESS,171,189,69,14 - CONTROL "Po&ka procesy wszystkich uytkownikw",IDC_SHOWALLPROCESSES, + PUSHBUTTON "&Zakończ proces",IDC_ENDPROCESS,171,189,69,14 + CONTROL "Po&każ procesy wszystkich użytkowników",IDC_SHOWALLPROCESSES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,191,111,10 END @@ -206,14 +196,14 @@ IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Uycie procesora",IDC_CPU_USAGE_FRAME,5,5,60,54,0,WS_EX_TRANSPARENT - GROUPBOX "Uycie pliku stronicowania",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT, WS_EX_TRANSPARENT + GROUPBOX "Użycie procesora",IDC_CPU_USAGE_FRAME,5,5,60,54,0,WS_EX_TRANSPARENT + GROUPBOX "Użycie pliku stronicowania",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT, WS_EX_TRANSPARENT GROUPBOX "Sumy",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "Pami zadeklarowana (KB)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "Pami fizyczna (KB)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "Pami jdra (KB)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Pamięć zadeklarowana (KB)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Pamięć fizyczna (KB)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Pamięć jądra (KB)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT LTEXT "Uchwyty",IDS_TOTALS_HANDLE_COUNT,12,131,27,8 - LTEXT "Wtki",IDS_TOTALS_THREAD_COUNT,12,140,27,8 + LTEXT "Wątki",IDS_TOTALS_THREAD_COUNT,12,140,27,8 LTEXT "Procesy",IDS_TOTALS_PROCESS_COUNT,12,149,34,8 EDITTEXT IDC_TOTALS_HANDLE_COUNT,65,131,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP @@ -231,7 +221,7 @@ BEGIN EDITTEXT IDC_COMMIT_CHARGE_PEAK,65,193,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Razem",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 - LTEXT "Dostpne",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,30,8 + LTEXT "Dostępne",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,30,8 LTEXT "Bufor systemu",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,46,8 EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL,185,131,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP @@ -248,21 +238,21 @@ BEGIN ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_NONPAGED,185,193,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - GROUPBOX "Historia uycia procesora CPU",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT + GROUPBOX "Historia użycia procesora CPU",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT GROUPBOX "Historia uzycia pliku stronicowania",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT - PUSHBUTTON "Wywietl uycie procesora",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP, + PUSHBUTTON "Wyświetl użycie procesora",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP, WS_EX_CLIENTEDGE - PUSHBUTTON "Wywietl uycie pamici",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP, + PUSHBUTTON "Wyświetl zużycie pamięci",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP, WS_EX_CLIENTEDGE - PUSHBUTTON "Historia uycia procesora",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, + PUSHBUTTON "Historia użycia procesora",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON "Historia uycia pamici",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, + PUSHBUTTON "Historia zużycia pamięci",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Kanay debugowania" +CAPTION "Kanały debugowania" FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2",IDC_DEBUG_CHANNELS_LIST,"SysListView32",LVS_REPORT | @@ -278,7 +268,7 @@ FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,120,133,50,14 PUSHBUTTON "Anuluj",IDCANCEL,174,133,50,14 - LTEXT "Ustawienie koligacji procesora kontroluje, na ktrym CPU proces bdzie mg dziaa", + LTEXT "Ustawienie koligacji procesora kontroluje, na którym CPU proces będzie mógł działać", IDC_STATIC,5,5,220,16 CONTROL "CPU 0",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 11,28,37,10 @@ -353,23 +343,23 @@ FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,84,178,50,14 PUSHBUTTON "Anuluj",IDCANCEL,138,178,50,14 - LTEXT "Wybierz kolumny do wywietlania na stronie Proces menedera zada", + LTEXT "Wybierz kolumny do wyświetlania na stronie Proces Menedżera zadań", IDC_STATIC,7,7,181,17 CONTROL "&Nazwa obrazu",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,28,56,10 CONTROL "PI&D (idewntyfikator procesu)",IDC_PID,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,39,88,10 - CONTROL "&Uycie procesora CPU",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "&Użycie procesora CPU",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,50,53,10 CONTROL "&Czas procesora CPU",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,61,48,10 - CONTROL "Uycie pa&mici",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "Zużycie pa&mięci",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,63,10 - CONTROL "&Zmiana uycia pamici",IDC_MEMORYUSAGEDELTA,"Button", + CONTROL "&Zmiana zużycia pamięci",IDC_MEMORYUSAGEDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,83,82,10 - CONTROL "&Szczytowe uycie pamici",IDC_PEAKMEMORYUSAGE,"Button", + CONTROL "&Szczytowe zużycie pamięci",IDC_PEAKMEMORYUSAGE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,94,82,10 - CONTROL "&Bdy stron",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | + CONTROL "&Błędy stronic",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,105,53,10 CONTROL "Obie&kty USER",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,116,62,10 @@ -379,11 +369,11 @@ BEGIN BS_AUTOCHECKBOX | WS_TABSTOP,7,138,65,10 CONTROL "&Identyfikator sesji",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,149,50,10 - CONTROL "Naz&wa uytkownika",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | + CONTROL "Naz&wa użytkownika",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,160,51,10 - CONTROL "Zmi&ana bdw stron",IDC_PAGEFAULTSDELTA,"Button", + CONTROL "Zmi&ana błędów stronic",IDC_PAGEFAULTSDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,28,72,10 - CONTROL "&Rozmiar pamici wirtualnej",IDC_VIRTUALMEMORYSIZE,"Button", + CONTROL "&Rozmiar pamięci wirtualnej",IDC_VIRTUALMEMORYSIZE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,39,77,10 CONTROL "&Pula stronicowania",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,50,53,10 @@ -391,9 +381,9 @@ BEGIN BS_AUTOCHECKBOX | WS_TABSTOP,107,61,67,10 CONTROL "Prior&ytet podstawowy",IDC_BASEPRIORITY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,72,55,10 - CONTROL "&Liczba uchwytw",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "&Liczba uchwytów",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,83,59,10 - CONTROL "Liczba w&tkw",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "Liczba w&ątków",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,94,59,10 CONTROL "Obiekty &GDI",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,105,55,10 @@ -528,23 +518,23 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_APP_TITLE "Meneder zada" - IDC_TASKMGR "Meneder zada" - IDS_IDLE_PROCESS "Proces bezczynnoci systemu" + IDS_APP_TITLE "Menedżer zadań" + IDC_TASKMGR "Menedżer zadań" + IDS_IDLE_PROCESS "Proces bezczynności systemu" END STRINGTABLE DISCARDABLE BEGIN ID_FILE_NEW "Uruchamia nowy program" - ID_OPTIONS_ALWAYSONTOP "Meneder zada wywietlany jest na wierzchu wszystkich okien" + ID_OPTIONS_ALWAYSONTOP "Menedżer zadań wyświetlany jest na wierzchu wszystkich okien" ID_OPTIONS_MINIMIZEONUSE - "Meneder zda jest minimalizowany podczas operacji przeczania zda" - ID_OPTIONS_HIDEWHENMINIMIZED "Ukrywaj Menedera zada, kiedy jest on zminimalizowany" - ID_VIEW_REFRESH "Zmusza Menedera zada do odwieenia w tym momencie, niezalenie od ustawie szybkoci odwieania" - ID_VIEW_LARGE "Wywietla zadania uywajc duych ikon" - ID_VIEW_SMALL "Wywietla zadania uywajc maych ikon" - ID_VIEW_DETAILS "Wywietla informacje o kadym zadaniu" - ID_VIEW_UPDATESPEED_HIGH "Aktualizuje okno dwa razy na sekund" + "Menedżer zadań jest minimalizowany podczas operacji przełączania zadań" + ID_OPTIONS_HIDEWHENMINIMIZED "Ukrywaj Menedżera zadań, kiedy jest on zminimalizowany" + ID_VIEW_REFRESH "Zmusza Menedżera zadań do odświeżenia w tym momencie, niezależnie od ustawień częstotliwości odświeżania" + ID_VIEW_LARGE "Wyświetla zadania używając dużych ikon" + ID_VIEW_SMALL "Wyświetla zadania używając małych ikon" + ID_VIEW_DETAILS "Wyświetla informacje o każdym zadaniu" + ID_VIEW_UPDATESPEED_HIGH "Aktualizuje okno dwa razy na sekundę" ID_VIEW_UPDATESPEED_NORMAL "Aktualizuje okno co dwie sekundy" ID_VIEW_UPDATESPEED_LOW "Aktualizuje okno co cztery sekundy" END @@ -553,46 +543,46 @@ STRINGTABLE DISCARDABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Nie aktualizuje automatycznie" ID_WINDOWS_TILEHORIZONTALLY - "Rozmieszcza okna ssiadujco w poziomie" - ID_WINDOWS_TILEVERTICALLY "Rozmieszcza okna ssiadujco w pionie" + "Rozmieszcza okna sąsiadująco w poziomie" + ID_WINDOWS_TILEVERTICALLY "Rozmieszcza okna sąsiadująco w pionie" ID_WINDOWS_MINIMIZE "Minimalizuje okno" ID_WINDOWS_MAXIMIZE "Maksymalizuje okno" - ID_WINDOWS_CASCADE "Ustawia okna w kaskad" - ID_WINDOWS_BRINGTOFRONT "Przecza okna na wierzch, lecz nie przecza na nie" - ID_HELP_TOPICS "Wywietla tematy pomocy Menedera zada" - ID_HELP_ABOUT "Wywietla informacje o programie, numerze wersji oraz prawach autorskich" - ID_FILE_EXIT "Zamyka Meneder zada" + ID_WINDOWS_CASCADE "Ustawia okna w kaskadę" + ID_WINDOWS_BRINGTOFRONT "Wyświetla okna na wierzchu, lecz nie przełącza na nie" + ID_HELP_TOPICS "Wyświetla tematy pomocy Menedżera zadań" + ID_HELP_ABOUT "Wyświetla informacje o programie, numerze wersji oraz prawach autorskich" + ID_FILE_EXIT "Zamyka Menedżera zadań" ID_OPTIONS_SHOW16BITTASKS "Pokazuje 16-bitowe aplikacje skojarzone z plikiem ntvdm.exe" - ID_VIEW_SELECTCOLUMNS "Zaznacza, ktre kolumny bd widoczne na stronie Procesy" - ID_VIEW_SHOWKERNELTIMES "Wywietla czas jdra na wykresie uycia procesora" + ID_VIEW_SELECTCOLUMNS "Zaznacza, które kolumny będą widoczne na stronie Procesy" + ID_VIEW_SHOWKERNELTIMES "Wyświetla czas jądra na wykresie użycia procesora" ID_VIEW_CPUHISTORY_ONEGRAPHALL - "Jeden wykres pokazuje cakowite zuycie procesorw CPU" - ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Kady procesor ma osobny wykres" + "Jeden wykres pokazuje całkowite użycie procesorów" + ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Każdy procesor ma osobny wykres" ID_APPLICATION_PAGE_SWITCHTO - "Przenosi zadanie na pierwszy plan, uaktywnia je" + "Przenosi zadanie na pierwszy plan i uaktywnia je" END STRINGTABLE DISCARDABLE BEGIN ID_ENDTASK "Zamyka zadanie" ID_GOTOPROCESS "Ustawia aktywnym proces zaznaczonego zadania" - ID_RESTORE "Przywraca Meneder zada ze stanu ukrycia" + ID_RESTORE "Przywraca Menedżer zadań ze stanu ukrycia" ID_PROCESS_PAGE_ENDPROCESS "Usuwa proces z systemu" ID_PROCESS_PAGE_ENDPROCESSTREE "Usuwa dany proces oraz wszystkie procesy potomne z systemu" ID_PROCESS_PAGE_DEBUG "Podpina pod ten proces debugger" ID_PROCESS_PAGE_SETAFFINITY - "Kontroluje, pod ktrymi procesorami bdzie mg dziaa proces" + "Kontroluje, pod którymi procesorami będzie mógł działać proces" ID_PROCESS_PAGE_SETPRIORITY_REALTIME "Ustawia procesowi priorytet czasu rzeczywistego" ID_PROCESS_PAGE_SETPRIORITY_HIGH "Ustawia procesowi priorytet wysoki" ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL - "Ustawia procesowi priorytet powyej normalnego" + "Ustawia procesowi priorytet powyżej normalnego" ID_PROCESS_PAGE_SETPRIORITY_NORMAL "Ustawia procesowi priorytet normalny" ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - "Ustawia procesowi priorytet poniej normalnego" + "Ustawia procesowi priorytet poniżej normalnego" ID_PROCESS_PAGE_SETPRIORITY_LOW "Ustawia procesowi priorytet niski" END @@ -601,26 +591,26 @@ STRINGTABLE DISCARDABLE BEGIN IDS_TAB_APPS "Aplikacje" IDS_TAB_PROCESSES "Procesy" - IDS_TAB_PERFORMANCE "Wydajno" + IDS_TAB_PERFORMANCE "Wydajność" IDS_TAB_TASK "Zadanie" IDS_TAB_STATUS "Stan" IDS_TAB_IMAGENAME "Nazwa obrazu" IDS_TAB_PID "PID" - IDS_TAB_USERNAME "Nazwa uytkownika" + IDS_TAB_USERNAME "Nazwa użytkownika" IDS_TAB_SESSIONID "ID sesji" IDS_TAB_CPU "CPU" IDS_TAB_CPUTIME "Czas procesora CPU" - IDS_TAB_MEMUSAGE "Uycie pamici" - IDS_TAB_PEAKMEMUSAGE "Szczytowe uycie pamici" - IDS_TAB_MEMDELTA "Zmiana uycia pamici" - IDS_TAB_PAGEFAULT "Bdy stron" - IDS_TAB_PFDELTA "Zmiana bdw stron" - IDS_TAB_VMSIZE "Rozmiar pamici wirtualnej" + IDS_TAB_MEMUSAGE "Zużycie pamięci" + IDS_TAB_PEAKMEMUSAGE "Szczytowe zużycie pamięci" + IDS_TAB_MEMDELTA "Zmiana zużycia pamięci" + IDS_TAB_PAGEFAULT "Błędy stronic" + IDS_TAB_PFDELTA "Zmiana błędów stronic" + IDS_TAB_VMSIZE "Rozmiar pamięci wirtualnej" IDS_TAB_PAGEDPOOL "Pula stronicowana" IDS_TAB_NPPOOL "Pula niestronicowana" IDS_TAB_BASEPRI "Priorytet podstawowy" IDS_TAB_HANDLES "Uchwyty" - IDS_TAB_THREADS "Wtki" + IDS_TAB_THREADS "Wątki" IDS_TAB_USERPBJECTS "Obiekty USER" IDS_TAB_GDIOBJECTS "Obiekty GDI" IDS_TAB_IOREADS "Odczyty We/Wy" @@ -630,48 +620,31 @@ BEGIN IDS_TAB_IOWRITESBYTES "Zapisy We/Wy w bajtach" IDS_TAB_IOOTHERBYTES "Inne We/Wy w bajtach" IDS_MENU_SELECTCOLUMNS "Wybierz &kolumny..." - IDS_MENU_16BITTASK "Poka 16-&bitowe zadania" + IDS_MENU_16BITTASK "Pokaż 16-&bitowe zadania" IDS_MENU_WINDOWS "&Okna" - IDS_MENU_LARGEICONS "Due ikony" - IDS_MENU_SMALLICONS "Mae ikony" - IDS_MENU_DETAILS "Szczegy" + IDS_MENU_LARGEICONS "Duże ikony" + IDS_MENU_SMALLICONS "Małe ikony" + IDS_MENU_DETAILS "Szczegóły" IDS_MENU_ONEGRAPHALLCPUS "Jeden wykres, wszystkie procesory CPU" - IDS_MENU_ONEGRAPHPERCPU "Dla kadego procesora CPU oddzielny wykres" + IDS_MENU_ONEGRAPHPERCPU "Dla każdego procesora CPU oddzielny wykres" IDS_MENU_CPUHISTORY "&Historia CPU" - IDS_MENU_SHOWKERNELTIMES "&Pokazuj czas jdra" - IDS_CREATENEWTASK "Stwrz nowy proces" - IDS_CREATENEWTASK_DESC "Wpisz nazw programu, folderu, dokumentu lub zasobu internetowego, a zostanie on otwarty przez Meneder zada." - IDS_MSG_ACCESSPROCESSAFF "Nie mona uzyska dostpu lub ustawi koligacji procesu" - IDS_MSG_PROCESSONEPRO "Proces musi posiada koligacj z przynajmniej jednym procesorem." - IDS_MSG_INVALIDOPTION "Nieprawidowa opcja" - IDS_MSG_UNABLEDEBUGPROCESS "Nie mona debugowa procesu" - IDS_MSG_WARNINGDEBUG "UWAGA: Debugowanie procesu moe spowodowa utrat danych.\nCzy jeste pewien, e chcesz podpi debugger pod ten proces?" - IDS_MSG_TASKMGRWARNING "Ostrzeenie Menedera zada" - IDS_MSG_WARNINGTERMINATING "UWAGA: Zakoczenie procesu moe przynie niepodane skutki, w tym rwnie utrat danych i niestabilno systemu.\nProces nie bdzie mia szansy na zapisane danych.\nCzy na pewno chcesz zakoczy?" - IDS_MSG_UNABLETERMINATEPRO "Nie mona zakoczy procesu" - IDS_MSG_UNABLECHANGEPRIORITY "Nie mona zmieni priorytetu" - IDS_MSG_WARNINGCHANGEPRIORITY "UWAGA: Zmiana priorytetu tego procesu moe przynie\nniepodane skutki, w tym rwnie niestabilno systemu.\nCzy na pewno chcesz zmieni priorytet?" - IDS_MSG_TRAYICONCPUUSAGE "Uycie procesora: %d%%" + IDS_MENU_SHOWKERNELTIMES "&Pokazuj czas jądra" + IDS_CREATENEWTASK "Stwórz nowy proces" + IDS_CREATENEWTASK_DESC "Wpisz nazwę programu, folderu, dokumentu lub zasobu internetowego, a zostanie on otwarty przez Menedżer zadań." + IDS_MSG_ACCESSPROCESSAFF "Nie można uzyskać dostępu lub ustawić koligacji procesu" + IDS_MSG_PROCESSONEPRO "Proces musi posiadać koligację z przynajmniej jednym procesorem." + IDS_MSG_INVALIDOPTION "Nieprawidłowa opcja" + IDS_MSG_UNABLEDEBUGPROCESS "Nie można debugować procesu" + IDS_MSG_WARNINGDEBUG "UWAGA: Debugowanie procesu może spowodować utratę danych.\nCzy jesteś pewien, że chcesz podpiąć debugger pod ten proces?" + IDS_MSG_TASKMGRWARNING "Ostrzeżenie Menedżera zadań" + IDS_MSG_WARNINGTERMINATING "UWAGA: Zakończenie procesu może przynieść niepożądane skutki, w tym również doprowadzić do utraty danych i niestabilności systemu.\nProces nie będzie miał szansy na zapisane danych.\nCzy na pewno chcesz zakończyć?" + IDS_MSG_UNABLETERMINATEPRO "Nie można zakończyć tego procesu" + IDS_MSG_UNABLECHANGEPRIORITY "Nie można zmienić priorytetu" + IDS_MSG_WARNINGCHANGEPRIORITY "UWAGA: Zmiana priorytetu tego procesu może przynieść\nniepożądane skutki, w tym również niestabilność systemu.\nCzy na pewno chcesz zmieni priorytet?" + IDS_MSG_TRAYICONCPUUSAGE "Użycie procesora: %d%%" IDS_STATUS_MEMUSAGE "Pam. zadeklar.: %dK / %dK" - IDS_STATUS_CPUUSAGE "Uycie procesora: %3d%%" + IDS_STATUS_CPUUSAGE "Użycie procesora: %3d%%" IDS_STATUS_PROCESSES "Procesy: %d" IDS_Not_Responding "Nie odpowiada" IDS_Running "Uruchomiony" END - - -#endif // Polish resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/base/applications/taskmgr/lang/ro-RO.rc b/base/applications/taskmgr/lang/ro-RO.rc index 3983c3b5cba..76f4acb9c99 100644 --- a/base/applications/taskmgr/lang/ro-RO.rc +++ b/base/applications/taskmgr/lang/ro-RO.rc @@ -4,7 +4,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -652,8 +651,6 @@ BEGIN IDS_Running "Rulează" END - -#pragma code_page(1252) #endif // Romanian resources ///////////////////////////////////////////////////////////////////////////// diff --git a/base/applications/taskmgr/lang/ru-RU.rc b/base/applications/taskmgr/lang/ru-RU.rc index 97d9215ac84..9ab90e029b0 100644 --- a/base/applications/taskmgr/lang/ru-RU.rc +++ b/base/applications/taskmgr/lang/ru-RU.rc @@ -3,95 +3,94 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // -// +// Меню // IDR_TASKMANAGER MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "& (...)", ID_FILE_NEW + MENUITEM "&Новая задача (Выполнить...)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "& ", ID_FILE_EXIT + MENUITEM "&Завершение диспетчера задач", ID_FILE_EXIT END - POPUP "&" + POPUP "&Параметры" BEGIN - MENUITEM "& ", ID_OPTIONS_ALWAYSONTOP + MENUITEM "Пове&рх остальных окон", ID_OPTIONS_ALWAYSONTOP , CHECKED - MENUITEM "& ", ID_OPTIONS_MINIMIZEONUSE + MENUITEM "&Сворачивать после обращения", ID_OPTIONS_MINIMIZEONUSE , CHECKED - MENUITEM "& ", ID_OPTIONS_HIDEWHENMINIMIZED + MENUITEM "С&крывать свернутое", ID_OPTIONS_HIDEWHENMINIMIZED , CHECKED - MENUITEM "& 16- ", ID_OPTIONS_SHOW16BITTASKS + MENUITEM "&Отображать 16-разрядные задачи", ID_OPTIONS_SHOW16BITTASKS , CHECKED END - POPUP "&" + POPUP "&Вид" BEGIN - MENUITEM "&", ID_VIEW_REFRESH - POPUP "& " + MENUITEM "&Обновить", ID_VIEW_REFRESH + POPUP "&Скорость обновления" BEGIN - MENUITEM "&", ID_VIEW_UPDATESPEED_HIGH - MENUITEM "&", ID_VIEW_UPDATESPEED_NORMAL + MENUITEM "&Высокая", ID_VIEW_UPDATESPEED_HIGH + MENUITEM "О&бычная", ID_VIEW_UPDATESPEED_NORMAL , CHECKED - MENUITEM "&", ID_VIEW_UPDATESPEED_LOW - MENUITEM "&", ID_VIEW_UPDATESPEED_PAUSED + MENUITEM "&Низкая", ID_VIEW_UPDATESPEED_LOW + MENUITEM "&Приостановить", ID_VIEW_UPDATESPEED_PAUSED END MENUITEM SEPARATOR - MENUITEM "& ", ID_VIEW_LARGE - MENUITEM "& ", ID_VIEW_SMALL - MENUITEM "&", ID_VIEW_DETAILS, CHECKED - MENUITEM "& ...", ID_VIEW_SELECTCOLUMNS - POPUP "& " + MENUITEM "&Крупные значки", ID_VIEW_LARGE + MENUITEM "&Мелкие значки", ID_VIEW_SMALL + MENUITEM "&Таблица", ID_VIEW_DETAILS, CHECKED + MENUITEM "&Выбрать столбцы...", ID_VIEW_SELECTCOLUMNS + POPUP "&Загрузка ЦП" BEGIN - MENUITEM "& ", ID_VIEW_CPUHISTORY_ONEGRAPHALL + MENUITEM "&Один график на все ЦП", ID_VIEW_CPUHISTORY_ONEGRAPHALL - MENUITEM "& ", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU + MENUITEM "&По графику на каждый ЦП", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU , CHECKED END - MENUITEM "& ", ID_VIEW_SHOWKERNELTIMES + MENUITEM "&Вывод времени ядра", ID_VIEW_SHOWKERNELTIMES END - POPUP "&" + POPUP "&Окна" BEGIN - MENUITEM "& ", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "& ", ID_WINDOWS_TILEVERTICALLY - MENUITEM "&", ID_WINDOWS_MINIMIZE - MENUITEM "&", ID_WINDOWS_MAXIMIZE - MENUITEM "&", ID_WINDOWS_CASCADE - MENUITEM "& ", ID_WINDOWS_BRINGTOFRONT + MENUITEM "&Слева направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY + MENUITEM "Св&ернуть", ID_WINDOWS_MINIMIZE + MENUITEM "&Развернуть", ID_WINDOWS_MAXIMIZE + MENUITEM "&Каскадом", ID_WINDOWS_CASCADE + MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "& ", ID_HELP_TOPICS + MENUITEM "&Вызов справки", ID_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "& ", ID_HELP_ABOUT + MENUITEM "&О программе", ID_HELP_ABOUT END END IDR_WINDOWSMENU MENU DISCARDABLE BEGIN - MENUITEM "& ", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "& ", ID_WINDOWS_TILEVERTICALLY - MENUITEM "&", ID_WINDOWS_MINIMIZE - MENUITEM "&", ID_WINDOWS_MAXIMIZE - MENUITEM "&", ID_WINDOWS_CASCADE - MENUITEM "& ", ID_WINDOWS_BRINGTOFRONT + MENUITEM "&Слева направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY + MENUITEM "Св&ернуть", ID_WINDOWS_MINIMIZE + MENUITEM "&Развернуть", ID_WINDOWS_MAXIMIZE + MENUITEM "&Каскадом", ID_WINDOWS_CASCADE + MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT END IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "& (...)", ID_FILE_NEW + MENUITEM "&Новая задача (Выполнить...)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "& ", ID_VIEW_LARGE - MENUITEM "& ", ID_VIEW_SMALL - MENUITEM "&", ID_VIEW_DETAILS, CHECKED + MENUITEM "&Крупные значки", ID_VIEW_LARGE + MENUITEM "&Мелкие значки", ID_VIEW_SMALL + MENUITEM "&Таблица", ID_VIEW_DETAILS, CHECKED END END @@ -99,17 +98,17 @@ IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&", ID_APPLICATION_PAGE_SWITCHTO - MENUITEM "& ", ID_WINDOWS_BRINGTOFRONT + MENUITEM "&Переключиться", ID_APPLICATION_PAGE_SWITCHTO + MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT MENUITEM SEPARATOR - MENUITEM "& ", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM "& ", ID_WINDOWS_TILEVERTICALLY - MENUITEM "&", ID_WINDOWS_MINIMIZE - MENUITEM "&", ID_WINDOWS_MAXIMIZE - MENUITEM "&", ID_WINDOWS_CASCADE + MENUITEM "&Слева направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY + MENUITEM "Св&ернуть", ID_WINDOWS_MINIMIZE + MENUITEM "&Развернуть", ID_WINDOWS_MAXIMIZE + MENUITEM "&Каскадом", ID_WINDOWS_CASCADE MENUITEM SEPARATOR - MENUITEM "& ", ID_APPLICATION_PAGE_ENDTASK - MENUITEM " &", ID_APPLICATION_PAGE_GOTOPROCESS + MENUITEM "Сня&ть задачу", ID_APPLICATION_PAGE_ENDTASK + MENUITEM "Перейти к процесса&м", ID_APPLICATION_PAGE_GOTOPROCESS END END @@ -118,10 +117,10 @@ IDR_TRAY_POPUP MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&", ID_RESTORE - MENUITEM "&", ID_FILE_EXIT + MENUITEM "&Востановить", ID_RESTORE + MENUITEM "&Закрыть", ID_FILE_EXIT MENUITEM SEPARATOR - MENUITEM "& ", ID_OPTIONS_ALWAYSONTOP + MENUITEM "&Поверх остальных окон", ID_OPTIONS_ALWAYSONTOP END END @@ -129,35 +128,35 @@ IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "& ", ID_PROCESS_PAGE_ENDPROCESS - MENUITEM "& ", ID_PROCESS_PAGE_ENDPROCESSTREE + MENUITEM "&Заверщить процесс", ID_PROCESS_PAGE_ENDPROCESS + MENUITEM "З&авершить дерево процессов", ID_PROCESS_PAGE_ENDPROCESSTREE - MENUITEM "&", ID_PROCESS_PAGE_DEBUG + MENUITEM "&Отладка", ID_PROCESS_PAGE_DEBUG MENUITEM SEPARATOR - POPUP "&" + POPUP "&Приоритет" BEGIN - MENUITEM "& ", ID_PROCESS_PAGE_SETPRIORITY_REALTIME + MENUITEM "&Реального времени", ID_PROCESS_PAGE_SETPRIORITY_REALTIME - MENUITEM "&", ID_PROCESS_PAGE_SETPRIORITY_HIGH + MENUITEM "&Высокий", ID_PROCESS_PAGE_SETPRIORITY_HIGH - MENUITEM "& ", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL + MENUITEM "В&ыше среднего", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL - MENUITEM "&", ID_PROCESS_PAGE_SETPRIORITY_NORMAL + MENUITEM "&Средний", ID_PROCESS_PAGE_SETPRIORITY_NORMAL - MENUITEM "& ", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL + MENUITEM "&Ниже среднего", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - MENUITEM "&", ID_PROCESS_PAGE_SETPRIORITY_LOW + MENUITEM "Н&изкий", ID_PROCESS_PAGE_SETPRIORITY_LOW END - MENUITEM "& ...", ID_PROCESS_PAGE_SETAFFINITY - MENUITEM " &...", ID_PROCESS_PAGE_DEBUGCHANNELS + MENUITEM "&Задать соответствие...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM "Редактировать отладку &потоков...", ID_PROCESS_PAGE_DEBUGCHANNELS END END ///////////////////////////////////////////////////////////////////////////// // -// +// Диалоги // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened @@ -165,7 +164,7 @@ IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION " " +CAPTION "Диспетчер задач" MENU IDR_TASKMANAGER FONT 8, "MS Shell Dlg" BEGIN @@ -178,9 +177,9 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2",IDC_APPLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 - PUSHBUTTON "& ...",IDC_NEWTASK,167,189,73,14 - PUSHBUTTON "&",IDC_SWITCHTO,89,189,73,14,WS_DISABLED - PUSHBUTTON "& ",IDC_ENDTASK,12,189,73,14,WS_DISABLED + PUSHBUTTON "&Новая задача...",IDC_NEWTASK,167,189,73,14 + PUSHBUTTON "&Переключиться",IDC_SWITCHTO,89,189,73,14,WS_DISABLED + PUSHBUTTON "&Завершить задачу",IDC_ENDTASK,12,189,73,14,WS_DISABLED END IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 @@ -190,8 +189,8 @@ BEGIN CONTROL "List2",IDC_PROCESSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 - PUSHBUTTON "& ",IDC_ENDPROCESS,162,189,79,14 - CONTROL "& ",IDC_SHOWALLPROCESSES, + PUSHBUTTON "&Завершить процесс",IDC_ENDPROCESS,162,189,79,14 + CONTROL "&Процессы всех пользователей",IDC_SHOWALLPROCESSES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,191,153,10 END @@ -200,204 +199,204 @@ IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",IDC_CPU_USAGE_FRAME,5,5,60,54,0,WS_EX_TRANSPARENT - GROUPBOX " ",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT, WS_EX_TRANSPARENT - GROUPBOX "",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX " (K)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT - GROUPBOX " (K)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX " (K)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT - LTEXT "",IDS_TOTALS_HANDLE_COUNT,12,131,57,8 - LTEXT "",IDS_TOTALS_THREAD_COUNT,12,140,30,8 - LTEXT "",IDS_TOTALS_PROCESS_COUNT,12,149,34,8 + GROUPBOX "Загрузка ЦП",IDC_CPU_USAGE_FRAME,5,5,60,54,0,WS_EX_TRANSPARENT + GROUPBOX "Файл подкачки",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT, WS_EX_TRANSPARENT + GROUPBOX "Всего",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Выделение памяти (K)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Физическая память (K)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Память ядра (K)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT + LTEXT "Дескрипторов",IDS_TOTALS_HANDLE_COUNT,12,131,57,8 + LTEXT "Потоков",IDS_TOTALS_THREAD_COUNT,12,140,30,8 + LTEXT "Процессов",IDS_TOTALS_PROCESS_COUNT,12,149,34,8 EDITTEXT IDC_TOTALS_HANDLE_COUNT,65,131,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_TOTALS_THREAD_COUNT,65,140,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_TOTALS_PROCESS_COUNT,65,149,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "",IDS_COMMIT_CHARGE_TOTAL,12,175,27,8 - LTEXT "",IDS_COMMIT_CHARGE_LIMIT,12,184,27,8,NOT WS_BORDER - LTEXT "",IDS_COMMIT_CHARGE_PEAK,12,193,34,8 + LTEXT "Всего",IDS_COMMIT_CHARGE_TOTAL,12,175,27,8 + LTEXT "Предел",IDS_COMMIT_CHARGE_LIMIT,12,184,27,8,NOT WS_BORDER + LTEXT "Пик",IDS_COMMIT_CHARGE_PEAK,12,193,34,8 EDITTEXT IDC_COMMIT_CHARGE_TOTAL,65,174,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_COMMIT_CHARGE_LIMIT,65,184,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_COMMIT_CHARGE_PEAK,65,193,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 - LTEXT "",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,33,8 - LTEXT " ",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,62,8 + LTEXT "Всего",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 + LTEXT "Доступно",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,33,8 + LTEXT "Системный кеш",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,62,8 EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL,192,131,41,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE,185,140,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE,185,149,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8 - LTEXT "",IDS_KERNEL_MEMORY_PAGED,137,184,50,8 - LTEXT "",IDS_KERNEL_MEMORY_NONPAGED,137,193,62,8 + LTEXT "Всего",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8 + LTEXT "Выгружаемая",IDS_KERNEL_MEMORY_PAGED,137,184,50,8 + LTEXT "Невыгружаемая",IDS_KERNEL_MEMORY_NONPAGED,137,193,62,8 EDITTEXT IDC_KERNEL_MEMORY_TOTAL,192,174,41,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_PAGED,185,184,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_NONPAGED,185,193,48,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - GROUPBOX " ",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT - GROUPBOX " ",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT - PUSHBUTTON " ",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP, + GROUPBOX "Хронология загрузки ЦП",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT + GROUPBOX "Хронология использования файла подкачки",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT + PUSHBUTTON "Отображение загрузки ЦП",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP, WS_EX_CLIENTEDGE - PUSHBUTTON " ",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP, + PUSHBUTTON "Отображение использования памяти",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP, WS_EX_CLIENTEDGE - PUSHBUTTON " ",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, + PUSHBUTTON "Хронология загрузки ЦП",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON " ",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, + PUSHBUTTON "Хронология использования памяти",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Отладка потоков" FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2",IDC_DEBUG_CHANNELS_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP | LVS_SORTASCENDING,7,7,233,177 - PUSHBUTTON "",IDOK,171,189,69,14 + PUSHBUTTON "Закрыть",IDOK,171,189,69,14 END IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Семейство процессоров" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,124,133,50,14 - PUSHBUTTON "",IDCANCEL,178,133,50,14 - LTEXT " , .", + PUSHBUTTON "Отмена",IDCANCEL,178,133,50,14 + LTEXT "Установка процессоров, на которых будет выполняться задача.", IDC_STATIC,5,5,220,16 - CONTROL " 0",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + CONTROL "ЦП 0",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 11,28,37,10 - CONTROL " 1",IDC_CPU1,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 1",IDC_CPU1,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,41,37,10 - CONTROL " 2",IDC_CPU2,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 2",IDC_CPU2,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,54,37,10 - CONTROL " 3",IDC_CPU3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 3",IDC_CPU3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,67,37,10 - CONTROL " 4",IDC_CPU4,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 4",IDC_CPU4,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,80,37,10 - CONTROL " 5",IDC_CPU5,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 5",IDC_CPU5,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,93,37,10 - CONTROL " 6",IDC_CPU6,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 6",IDC_CPU6,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,106,37,10 - CONTROL " 7",IDC_CPU7,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 7",IDC_CPU7,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,119,37,10 - CONTROL " 8",IDC_CPU8,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 8",IDC_CPU8,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,28,37,10 - CONTROL " 9",IDC_CPU9,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 9",IDC_CPU9,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,41,37,10 - CONTROL " 10",IDC_CPU10,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 10",IDC_CPU10,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,54,41,10 - CONTROL " 11",IDC_CPU11,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 11",IDC_CPU11,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,67,41,10 - CONTROL " 12",IDC_CPU12,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 12",IDC_CPU12,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,80,41,10 - CONTROL " 13",IDC_CPU13,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 13",IDC_CPU13,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,93,41,10 - CONTROL " 14",IDC_CPU14,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 14",IDC_CPU14,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,106,41,10 - CONTROL " 15",IDC_CPU15,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 15",IDC_CPU15,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,119,41,10 - CONTROL " 16",IDC_CPU16,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 16",IDC_CPU16,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,28,41,10 - CONTROL " 17",IDC_CPU17,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 17",IDC_CPU17,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,41,41,10 - CONTROL " 18",IDC_CPU18,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 18",IDC_CPU18,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,54,41,10 - CONTROL " 19",IDC_CPU19,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 19",IDC_CPU19,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,67,41,10 - CONTROL " 20",IDC_CPU20,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 20",IDC_CPU20,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,80,41,10 - CONTROL " 21",IDC_CPU21,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 21",IDC_CPU21,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,93,41,10 - CONTROL " 22",IDC_CPU22,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 22",IDC_CPU22,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,106,41,10 - CONTROL " 23",IDC_CPU23,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 23",IDC_CPU23,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,119,41,10 - CONTROL " 24",IDC_CPU24,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 24",IDC_CPU24,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,28,41,10 - CONTROL " 25",IDC_CPU25,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 25",IDC_CPU25,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,41,41,10 - CONTROL " 26",IDC_CPU26,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 26",IDC_CPU26,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,54,41,10 - CONTROL " 27",IDC_CPU27,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 27",IDC_CPU27,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,67,41,10 - CONTROL " 28",IDC_CPU28,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 28",IDC_CPU28,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,80,41,10 - CONTROL " 29",IDC_CPU29,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 29",IDC_CPU29,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,93,41,10 - CONTROL " 30",IDC_CPU30,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 30",IDC_CPU30,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,106,41,10 - CONTROL " 31",IDC_CPU31,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 31",IDC_CPU31,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,119,41,10 END IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 230, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Выбор столбцов" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,113,178,50,14 - PUSHBUTTON "",IDCANCEL,167,178,50,14 - LTEXT " , .", + PUSHBUTTON "Отмена",IDCANCEL,167,178,50,14 + LTEXT "Выбор столбцов, отображаемых в списке диспетчера задач.", IDC_STATIC,7,7,220,17 - CONTROL "& ",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | + CONTROL "&Имя образа",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,28,56,10 - CONTROL "PID (&. )",IDC_PID,"Button", + CONTROL "PID (иденти&ф. процесса)",IDC_PID,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,39,95,10 - CONTROL "& ",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "&Загрузка ЦП",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,50,55,10 - CONTROL "& ",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | + CONTROL "&Время ЦП",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,61,48,10 - CONTROL "& - ",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "&Память - использование",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,95,10 - CONTROL " - &",IDC_MEMORYUSAGEDELTA,"Button", + CONTROL "Память - изме&нение",IDC_MEMORYUSAGEDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,83,82,10 - CONTROL " - &",IDC_PEAKMEMORYUSAGE,"Button", + CONTROL "Память - &максимум",IDC_PEAKMEMORYUSAGE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,94,82,10 - CONTROL "& ",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | + CONTROL "&Ошибок страницы",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,105,90,10 - CONTROL "& USER",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | + CONTROL "Об&ъекты USER",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,116,65,10 - CONTROL " ",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | + CONTROL "Число чтений",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,127,60,10 - CONTROL " ",IDC_IOREADBYTES,"Button", + CONTROL "Прочитано байт",IDC_IOREADBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,138,65,10 - CONTROL " &",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | + CONTROL "Код се&анса",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,149,50,10 - CONTROL "& ",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | + CONTROL "Им&я пользователя",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,160,80,10 - CONTROL " & - ",IDC_PAGEFAULTSDELTA,"Button", + CONTROL "Ошибок &страницы - изменение",IDC_PAGEFAULTSDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,28,120,10 - CONTROL " & ",IDC_VIRTUALMEMORYSIZE,"Button", + CONTROL "Объем вирт&уальной памяти",IDC_VIRTUALMEMORYSIZE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,39,110,10 - CONTROL "& ",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | + CONTROL "Вы&гружаемый пул",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,50,90,10 - CONTROL "& ",IDC_NONPAGEDPOOL,"Button", + CONTROL "Невыгр&ужаемый пул",IDC_NONPAGEDPOOL,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,61,90,10 - CONTROL "& ",IDC_BASEPRIORITY,"Button", + CONTROL "&Базовый приоритет",IDC_BASEPRIORITY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,72,90,10 - CONTROL " &",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "Счетчик &дескрипторов",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,83,90,10 - CONTROL "& ",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "С&четчик потоков",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,94,69,10 - CONTROL "& GDI",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | + CONTROL "Объ&екты GDI",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,105,58,10 - CONTROL " ",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | + CONTROL "Число записей",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,116,65,10 - CONTROL " ",IDC_IOWRITEBYTES,"Button", + CONTROL "Записано байт",IDC_IOWRITEBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,127,65,10 - CONTROL " -",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | + CONTROL "Прочий ввод-вывод",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,138,90,10 - CONTROL " -",IDC_IOOTHERBYTES,"Button", + CONTROL "Прочих байт при вводе-выводе",IDC_IOOTHERBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,149,122,10 END @@ -522,135 +521,135 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_APP_TITLE " " - IDC_TASKMGR " " - IDS_IDLE_PROCESS " " + IDS_APP_TITLE "Диспетчер задач" + IDC_TASKMGR "Диспетчер задач" + IDS_IDLE_PROCESS "Бездействие системы" END STRINGTABLE DISCARDABLE BEGIN - ID_FILE_NEW " " - ID_OPTIONS_ALWAYSONTOP " , " + ID_FILE_NEW "Создать новую задачу" + ID_OPTIONS_ALWAYSONTOP "Менеджер задач остается поверх всех окон, если не свернут" ID_OPTIONS_MINIMIZEONUSE - " " - ID_OPTIONS_HIDEWHENMINIMIZED " " - ID_VIEW_REFRESH " " - ID_VIEW_LARGE " " - ID_VIEW_SMALL " " - ID_VIEW_DETAILS " " - ID_VIEW_UPDATESPEED_HIGH " " - ID_VIEW_UPDATESPEED_NORMAL " " - ID_VIEW_UPDATESPEED_LOW " " + "Менеджер задач сворачивается после выполения команды Переключиться" + ID_OPTIONS_HIDEWHENMINIMIZED "Скрытие Менеждера задач при свертывании" + ID_VIEW_REFRESH "Обновление Менеджера задач вне зависимости от установленной скорости обновления" + ID_VIEW_LARGE "Отображать задачи использую большие значки" + ID_VIEW_SMALL "Отображать задачи использую маленькие значки" + ID_VIEW_DETAILS "Показывать информацию о каждой задаче" + ID_VIEW_UPDATESPEED_HIGH "Обновлять каждую секунду" + ID_VIEW_UPDATESPEED_NORMAL "Обновлять каждые две секунды" + ID_VIEW_UPDATESPEED_LOW "Обновлять каждые четыре секунды" END STRINGTABLE DISCARDABLE BEGIN - ID_VIEW_UPDATESPEED_PAUSED " " + ID_VIEW_UPDATESPEED_PAUSED "Не обновлять автоматически" ID_WINDOWS_TILEHORIZONTALLY - " " - ID_WINDOWS_TILEVERTICALLY " " - ID_WINDOWS_MINIMIZE " " - ID_WINDOWS_MAXIMIZE " " - ID_WINDOWS_CASCADE " " - ID_WINDOWS_BRINGTOFRONT " , " - ID_HELP_TOPICS " " - ID_HELP_ABOUT " , " - ID_FILE_EXIT " " + "Окна располагаются горизонтально на рабочем столе" + ID_WINDOWS_TILEVERTICALLY "Окна располагаются вертикально на рабочем столе" + ID_WINDOWS_MINIMIZE "Свернуть окна" + ID_WINDOWS_MAXIMIZE "Развернуть окна" + ID_WINDOWS_CASCADE "Окна каскадом по диагонали на рабочем столе" + ID_WINDOWS_BRINGTOFRONT "Переносит осно на передний план, но не переключается на него" + ID_HELP_TOPICS "Показать помощь для диспетчера задач" + ID_HELP_ABOUT "Показать информацию о программе, версии и авторе" + ID_FILE_EXIT "Выход из Диспетчера задач" ID_OPTIONS_SHOW16BITTASKS - " 16- ntvdm.exe" - ID_VIEW_SELECTCOLUMNS " " - ID_VIEW_SHOWKERNELTIMES " " + "Показывать 16-разрядные процессы связанные с ntvdm.exe" + ID_VIEW_SELECTCOLUMNS "Выбирите какие из столбцов будут видны на вкладке процессов" + ID_VIEW_SHOWKERNELTIMES "Показывать график времени ядра" ID_VIEW_CPUHISTORY_ONEGRAPHALL - " " - ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU " " + "Один график показывает хронологию загрузки ЦП" + ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Каждый процессор имеет свой график загрузки" ID_APPLICATION_PAGE_SWITCHTO - " " + "Перенести задачу на передний план и переключиться к ней" END STRINGTABLE DISCARDABLE BEGIN - ID_ENDTASK " " - ID_GOTOPROCESS " " - ID_RESTORE " " - ID_PROCESS_PAGE_ENDPROCESS " " + ID_ENDTASK "Сообщает выбранным задачам о необходимости завершиться" + ID_GOTOPROCESS "Переносит выбранный процесс на передний план" + ID_RESTORE "Востанавливает Менеджер задач из скрытого состояния" + ID_PROCESS_PAGE_ENDPROCESS "Завершает процесс в системе" ID_PROCESS_PAGE_ENDPROCESSTREE - " " - ID_PROCESS_PAGE_DEBUG " " + "Завершает процесс и все его дочерние процессы в системе" + ID_PROCESS_PAGE_DEBUG "Прикрепляет отладчик к выбранному процессу" ID_PROCESS_PAGE_SETAFFINITY - " " + "Переключение между процессорами разрешенными для выполнения задачи" ID_PROCESS_PAGE_SETPRIORITY_REALTIME - " " - ID_PROCESS_PAGE_SETPRIORITY_HIGH " " + "Установить для процесса приоритет Реального времени" + ID_PROCESS_PAGE_SETPRIORITY_HIGH "Установить для процесса Высокий приоритет" ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL - " " + "Установить для процесса приоритет Выше среднего" ID_PROCESS_PAGE_SETPRIORITY_NORMAL - " " + "Установить для процесса Средний приоритет" ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - " " - ID_PROCESS_PAGE_SETPRIORITY_LOW " " + "Установить для процесса приоритет Ниже среднего" + ID_PROCESS_PAGE_SETPRIORITY_LOW "Установить для процесса Низкий приоритет" END STRINGTABLE DISCARDABLE BEGIN - IDS_TAB_APPS "" - IDS_TAB_PROCESSES "" - IDS_TAB_PERFORMANCE "" - IDS_TAB_TASK "" - IDS_TAB_STATUS "" - IDS_TAB_IMAGENAME " " + IDS_TAB_APPS "Приложения" + IDS_TAB_PROCESSES "Процессы" + IDS_TAB_PERFORMANCE "Быстродействие" + IDS_TAB_TASK "Задача" + IDS_TAB_STATUS "Состояние" + IDS_TAB_IMAGENAME "Имя образа" IDS_TAB_PID "PID" - IDS_TAB_USERNAME " " - IDS_TAB_SESSIONID " " - IDS_TAB_CPU "" - IDS_TAB_CPUTIME " " - IDS_TAB_MEMUSAGE "" - IDS_TAB_PEAKMEMUSAGE " - " - IDS_TAB_MEMDELTA " - " - IDS_TAB_PAGEFAULT " " - IDS_TAB_PFDELTA " PF" - IDS_TAB_VMSIZE " VM" - IDS_TAB_PAGEDPOOL " " - IDS_TAB_NPPOOL "NP " - IDS_TAB_BASEPRI " " - IDS_TAB_HANDLES "" - IDS_TAB_THREADS "" - IDS_TAB_USERPBJECTS " USER" - IDS_TAB_GDIOBJECTS "GDI " - IDS_TAB_IOREADS " " - IDS_TAB_IOWRITES " " - IDS_TAB_IOOTHER " -" - IDS_TAB_IOREADBYTES " " - IDS_TAB_IOWRITESBYTES " " - IDS_TAB_IOOTHERBYTES " -" - IDS_MENU_SELECTCOLUMNS "& ..." - IDS_MENU_16BITTASK "& 16- " - IDS_MENU_WINDOWS "&" - IDS_MENU_LARGEICONS "& " - IDS_MENU_SMALLICONS "& " - IDS_MENU_DETAILS "&" - IDS_MENU_ONEGRAPHALLCPUS "& " - IDS_MENU_ONEGRAPHPERCPU "& " - IDS_MENU_CPUHISTORY "& " - IDS_MENU_SHOWKERNELTIMES "& " - IDS_CREATENEWTASK " " - IDS_CREATENEWTASK_DESC " , ." - IDS_MSG_ACCESSPROCESSAFF " " - IDS_MSG_PROCESSONEPRO " ." - IDS_MSG_INVALIDOPTION " " - IDS_MSG_UNABLEDEBUGPROCESS " " - IDS_MSG_WARNINGDEBUG ": .\n , ?" - IDS_MSG_TASKMGRWARNING " " - IDS_MSG_WARNINGTERMINATING ": \n .\n ?" - IDS_MSG_UNABLETERMINATEPRO " " - IDS_MSG_UNABLECHANGEPRIORITY " " - IDS_MSG_WARNINGCHANGEPRIORITY ": .\n , ?" - IDS_MSG_TRAYICONCPUUSAGE " : %d%%" - IDS_STATUS_MEMUSAGE " : %dK / %dK" - IDS_STATUS_CPUUSAGE " : %3d%%" - IDS_STATUS_PROCESSES ": %d" - IDS_Not_Responding " " - IDS_Running "" + IDS_TAB_USERNAME "Имя пользователя" + IDS_TAB_SESSIONID "Код сеанса" + IDS_TAB_CPU "ЦП" + IDS_TAB_CPUTIME "Время ЦП" + IDS_TAB_MEMUSAGE "Память" + IDS_TAB_PEAKMEMUSAGE "Память - максимум" + IDS_TAB_MEMDELTA "Память - изменение" + IDS_TAB_PAGEFAULT "Ошибок страницы" + IDS_TAB_PFDELTA "Изменение PF" + IDS_TAB_VMSIZE "Размер VM" + IDS_TAB_PAGEDPOOL "Пул страниц" + IDS_TAB_NPPOOL "NP пул" + IDS_TAB_BASEPRI "Базовый приоритет" + IDS_TAB_HANDLES "Дескрипторы" + IDS_TAB_THREADS "Потоки" + IDS_TAB_USERPBJECTS "Объекты USER" + IDS_TAB_GDIOBJECTS "GDI объекты" + IDS_TAB_IOREADS "Число чтений" + IDS_TAB_IOWRITES "Число записей" + IDS_TAB_IOOTHER "Прочий ввод-вывод" + IDS_TAB_IOREADBYTES "Прочитано байт" + IDS_TAB_IOWRITESBYTES "Записано байт" + IDS_TAB_IOOTHERBYTES "Прочих байт при вводе-выводе" + IDS_MENU_SELECTCOLUMNS "&Выбрать столбцы..." + IDS_MENU_16BITTASK "&Показывать 16-разрядные задачи" + IDS_MENU_WINDOWS "&Окна" + IDS_MENU_LARGEICONS "&Крупные значки" + IDS_MENU_SMALLICONS "&Мелкие значки" + IDS_MENU_DETAILS "&Таблица" + IDS_MENU_ONEGRAPHALLCPUS "&Один график для всех процессоров" + IDS_MENU_ONEGRAPHPERCPU "О&тдельный график для каждого процессора" + IDS_MENU_CPUHISTORY "&История ЦП" + IDS_MENU_SHOWKERNELTIMES "&Показать время ядра" + IDS_CREATENEWTASK "Создать новую задачу" + IDS_CREATENEWTASK_DESC "Вывести название программы, папки или документа для открытия в Менеджере задач." + IDS_MSG_ACCESSPROCESSAFF "Не удается получить доступ или установить приоритет процесса" + IDS_MSG_PROCESSONEPRO "Процесс должен иметь доступ по крайней мере к одному процессору." + IDS_MSG_INVALIDOPTION "Неправильные настройки" + IDS_MSG_UNABLEDEBUGPROCESS "Отладка процесса невозможна" + IDS_MSG_WARNINGDEBUG "ВНИМАНИЕ: Отладка этого процесса может закончиться потерей данных.\nВы уверены, что можно продолжать?" + IDS_MSG_TASKMGRWARNING "Ошибка Менеджера задач" + IDS_MSG_WARNINGTERMINATING "ВНИМАНИЕ: Завершение процесса может повлечь неустойчивую работу системы и потерю данных\nСохраните важные данные перед продолжением.\nПродолжить завершение процесса?" + IDS_MSG_UNABLETERMINATEPRO "Не удалось завершить процесс" + IDS_MSG_UNABLECHANGEPRIORITY "Не удалось изменить приоритет" + IDS_MSG_WARNINGCHANGEPRIORITY "ВНИМАНИЕ: Изменение приоритета может повлечь неустойчивую работу и потерю данных.\nВы уверены, что можно продолжать?" + IDS_MSG_TRAYICONCPUUSAGE "Загрузка ЦП: %d%%" + IDS_STATUS_MEMUSAGE "Выделение памяти: %dK / %dK" + IDS_STATUS_CPUUSAGE "Загрузка ЦП: %3d%%" + IDS_STATUS_PROCESSES "Процессов: %d" + IDS_Not_Responding "Не отвечает" + IDS_Running "Работает" END diff --git a/base/applications/taskmgr/lang/uk-UA.rc b/base/applications/taskmgr/lang/uk-UA.rc index cb518e1967a..036518f5d71 100644 --- a/base/applications/taskmgr/lang/uk-UA.rc +++ b/base/applications/taskmgr/lang/uk-UA.rc @@ -4,7 +4,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -#pragma code_page(1251) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -14,85 +13,85 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDR_TASKMANAGER MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "& (...)", ID_FILE_NEW + MENUITEM "&Нове завдання (Виконати...)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "& ", ID_FILE_EXIT + MENUITEM "&Завершення диспетчера завдань", ID_FILE_EXIT END - POPUP "&" + POPUP "&Параметри" BEGIN - MENUITEM "& ", ID_OPTIONS_ALWAYSONTOP + MENUITEM "&Поверх інших вікон", ID_OPTIONS_ALWAYSONTOP , CHECKED - MENUITEM "& ", ID_OPTIONS_MINIMIZEONUSE + MENUITEM "&Згортати після звернення", ID_OPTIONS_MINIMIZEONUSE , CHECKED - MENUITEM "& ", ID_OPTIONS_HIDEWHENMINIMIZED + MENUITEM "При&ховувати згорнуте", ID_OPTIONS_HIDEWHENMINIMIZED , CHECKED - MENUITEM "&³ 16- ", ID_OPTIONS_SHOW16BITTASKS + MENUITEM "&Відображати 16-розрядні завдання", ID_OPTIONS_SHOW16BITTASKS , CHECKED END - POPUP "&" + POPUP "&Вигляд" BEGIN - MENUITEM "&", ID_VIEW_REFRESH - POPUP "& " + MENUITEM "&Оновити", ID_VIEW_REFRESH + POPUP "&Швидкість оновлення" BEGIN - MENUITEM "&", ID_VIEW_UPDATESPEED_HIGH - MENUITEM "&", ID_VIEW_UPDATESPEED_NORMAL + MENUITEM "&Висока", ID_VIEW_UPDATESPEED_HIGH + MENUITEM "&Звичайна", ID_VIEW_UPDATESPEED_NORMAL , CHECKED - MENUITEM "&", ID_VIEW_UPDATESPEED_LOW - MENUITEM "&", ID_VIEW_UPDATESPEED_PAUSED + MENUITEM "&Низька", ID_VIEW_UPDATESPEED_LOW + MENUITEM "&Призупинити", ID_VIEW_UPDATESPEED_PAUSED END MENUITEM SEPARATOR - MENUITEM "& ", ID_VIEW_LARGE - MENUITEM "& ", ID_VIEW_SMALL - MENUITEM "&", ID_VIEW_DETAILS, CHECKED - MENUITEM "& ...", ID_VIEW_SELECTCOLUMNS - POPUP "& " + MENUITEM "&Великі значки", ID_VIEW_LARGE + MENUITEM "&Дрібні значки", ID_VIEW_SMALL + MENUITEM "Д&етально", ID_VIEW_DETAILS, CHECKED + MENUITEM "В&ибрати стовпці...", ID_VIEW_SELECTCOLUMNS + POPUP "&Хронологія ЦП" BEGIN - MENUITEM "& ", ID_VIEW_CPUHISTORY_ONEGRAPHALL + MENUITEM "&Один графік для всіх ЦП", ID_VIEW_CPUHISTORY_ONEGRAPHALL - MENUITEM " & ", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU + MENUITEM "Окремий &графік для кожного ЦП", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU , CHECKED END - MENUITEM "& ", ID_VIEW_SHOWKERNELTIMES + MENUITEM "&Вивід часу ядра", ID_VIEW_SHOWKERNELTIMES END - POPUP "&" + POPUP "В&ікна" BEGIN - MENUITEM "& ", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM " &", ID_WINDOWS_TILEVERTICALLY - MENUITEM "&", ID_WINDOWS_MINIMIZE - MENUITEM "&", ID_WINDOWS_MAXIMIZE - MENUITEM "&", ID_WINDOWS_CASCADE - MENUITEM " & ", ID_WINDOWS_BRINGTOFRONT + MENUITEM "З&ліва направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "Згори до&низу", ID_WINDOWS_TILEVERTICALLY + MENUITEM "&Згорнути", ID_WINDOWS_MINIMIZE + MENUITEM "&Розгорнути", ID_WINDOWS_MAXIMIZE + MENUITEM "&Каскадом", ID_WINDOWS_CASCADE + MENUITEM "На передні&й план", ID_WINDOWS_BRINGTOFRONT END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "&", ID_HELP_TOPICS + MENUITEM "&Зміст", ID_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "& ", ID_HELP_ABOUT + MENUITEM "&Про Диспетчер завдань", ID_HELP_ABOUT END END IDR_WINDOWSMENU MENU DISCARDABLE BEGIN - MENUITEM "& ", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM " &", ID_WINDOWS_TILEVERTICALLY - MENUITEM "&", ID_WINDOWS_MINIMIZE - MENUITEM "&", ID_WINDOWS_MAXIMIZE - MENUITEM "&", ID_WINDOWS_CASCADE - MENUITEM " & ", ID_WINDOWS_BRINGTOFRONT + MENUITEM "З&ліва направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "Згори до&низу", ID_WINDOWS_TILEVERTICALLY + MENUITEM "&Згорнути", ID_WINDOWS_MINIMIZE + MENUITEM "&Розгорнути", ID_WINDOWS_MAXIMIZE + MENUITEM "&Каскадом", ID_WINDOWS_CASCADE + MENUITEM "На передні&й план", ID_WINDOWS_BRINGTOFRONT END IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "& (...)", ID_FILE_NEW + MENUITEM "&Нове завдання (Виконати...)", ID_FILE_NEW MENUITEM SEPARATOR - MENUITEM "& ", ID_VIEW_LARGE - MENUITEM "& ", ID_VIEW_SMALL - MENUITEM "&", ID_VIEW_DETAILS, CHECKED + MENUITEM "&Великі значки", ID_VIEW_LARGE + MENUITEM "&Дрібні значки", ID_VIEW_SMALL + MENUITEM "Д&етально", ID_VIEW_DETAILS, CHECKED END END @@ -100,17 +99,17 @@ IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&", ID_APPLICATION_PAGE_SWITCHTO - MENUITEM " & ", ID_WINDOWS_BRINGTOFRONT + MENUITEM "П&ереключитися", ID_APPLICATION_PAGE_SWITCHTO + MENUITEM "На передні&й план", ID_WINDOWS_BRINGTOFRONT MENUITEM SEPARATOR - MENUITEM "& ", ID_WINDOWS_TILEHORIZONTALLY - MENUITEM " &", ID_WINDOWS_TILEVERTICALLY - MENUITEM "&", ID_WINDOWS_MINIMIZE - MENUITEM "&", ID_WINDOWS_MAXIMIZE - MENUITEM "&", ID_WINDOWS_CASCADE + MENUITEM "З&ліва направо", ID_WINDOWS_TILEHORIZONTALLY + MENUITEM "Згори до&низу", ID_WINDOWS_TILEVERTICALLY + MENUITEM "&Згорнути", ID_WINDOWS_MINIMIZE + MENUITEM "&Розгорнути", ID_WINDOWS_MAXIMIZE + MENUITEM "&Каскадом", ID_WINDOWS_CASCADE MENUITEM SEPARATOR - MENUITEM "& ", ID_APPLICATION_PAGE_ENDTASK - MENUITEM "& ", ID_APPLICATION_PAGE_GOTOPROCESS + MENUITEM "Зн&яти завдання", ID_APPLICATION_PAGE_ENDTASK + MENUITEM "&Перейти до процесів", ID_APPLICATION_PAGE_GOTOPROCESS END END @@ -119,10 +118,10 @@ IDR_TRAY_POPUP MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&³", ID_RESTORE - MENUITEM "&", ID_FILE_EXIT + MENUITEM "&Відновити", ID_RESTORE + MENUITEM "&Закрити", ID_FILE_EXIT MENUITEM SEPARATOR - MENUITEM "& ", ID_OPTIONS_ALWAYSONTOP + MENUITEM "&Поверх інших вікон", ID_OPTIONS_ALWAYSONTOP END END @@ -130,28 +129,28 @@ IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "& ", ID_PROCESS_PAGE_ENDPROCESS - MENUITEM " & ", ID_PROCESS_PAGE_ENDPROCESSTREE + MENUITEM "&Завершити процес", ID_PROCESS_PAGE_ENDPROCESS + MENUITEM "Завершити &дерево процесів", ID_PROCESS_PAGE_ENDPROCESSTREE - MENUITEM "&", ID_PROCESS_PAGE_DEBUG + MENUITEM "&Налагодження", ID_PROCESS_PAGE_DEBUG MENUITEM SEPARATOR - POPUP "&" + POPUP "&Пріоритет" BEGIN - MENUITEM "& ", ID_PROCESS_PAGE_SETPRIORITY_REALTIME + MENUITEM "&Реального часу", ID_PROCESS_PAGE_SETPRIORITY_REALTIME - MENUITEM "&", ID_PROCESS_PAGE_SETPRIORITY_HIGH + MENUITEM "&Високий", ID_PROCESS_PAGE_SETPRIORITY_HIGH - MENUITEM "& ", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL + MENUITEM "Ви&ще середнього", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL - MENUITEM "&", ID_PROCESS_PAGE_SETPRIORITY_NORMAL + MENUITEM "&Середній", ID_PROCESS_PAGE_SETPRIORITY_NORMAL - MENUITEM "& ", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL + MENUITEM "Ни&жче середнього", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - MENUITEM "&", ID_PROCESS_PAGE_SETPRIORITY_LOW + MENUITEM "&Низький", ID_PROCESS_PAGE_SETPRIORITY_LOW END - MENUITEM "& ...", ID_PROCESS_PAGE_SETAFFINITY - MENUITEM " &...", ID_PROCESS_PAGE_DEBUGCHANNELS + MENUITEM "У&становити відповідність...", ID_PROCESS_PAGE_SETAFFINITY + MENUITEM "Редагувати налагодження &потоків...", ID_PROCESS_PAGE_DEBUGCHANNELS END END @@ -166,7 +165,7 @@ IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION " " +CAPTION "Диспетчер завдань" MENU IDR_TASKMANAGER FONT 8, "MS Shell Dlg" BEGIN @@ -179,9 +178,9 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2",IDC_APPLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 - PUSHBUTTON "& ...",IDC_NEWTASK,181,189,60,14 - PUSHBUTTON "&",IDC_SWITCHTO,120,189,55,14,WS_DISABLED - PUSHBUTTON "& ",IDC_ENDTASK,58,189,56,14,WS_DISABLED + PUSHBUTTON "&Нове завдання...",IDC_NEWTASK,181,189,60,14 + PUSHBUTTON "П&ереключитися",IDC_SWITCHTO,120,189,55,14,WS_DISABLED + PUSHBUTTON "Зн&яти завдання",IDC_ENDTASK,58,189,56,14,WS_DISABLED END IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 @@ -191,8 +190,8 @@ BEGIN CONTROL "List2",IDC_PROCESSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177 - PUSHBUTTON "& ",IDC_ENDPROCESS,171,189,69,14 - CONTROL "&³ ",IDC_SHOWALLPROCESSES, + PUSHBUTTON "Зн&яти процес",IDC_ENDPROCESS,171,189,69,14 + CONTROL "&Відображати процеси всіх користувачів",IDC_SHOWALLPROCESSES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,191,147,10 END @@ -201,202 +200,202 @@ IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX ". ",IDC_CPU_USAGE_FRAME,5,5,62,54,0,WS_EX_TRANSPARENT - GROUPBOX ". '",IDC_MEM_USAGE_FRAME,5,63,62,54,BS_LEFTTEXT, WS_EX_TRANSPARENT - GROUPBOX "",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX " ' ()",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "Գ ' ()",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT - GROUPBOX "' ()",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT - LTEXT "",IDS_TOTALS_HANDLE_COUNT,12,131,47,8 - LTEXT "",IDS_TOTALS_THREAD_COUNT,12,140,27,8 - LTEXT "",IDS_TOTALS_PROCESS_COUNT,12,149,34,8 + GROUPBOX "Викорис. ЦП",IDC_CPU_USAGE_FRAME,5,5,62,54,0,WS_EX_TRANSPARENT + GROUPBOX "Викорис. пам'яті",IDC_MEM_USAGE_FRAME,5,63,62,54,BS_LEFTTEXT, WS_EX_TRANSPARENT + GROUPBOX "Усього",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Виділення пам'яті (КБ)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Фізична пам'ять (КБ)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT + GROUPBOX "Пам'ять ядра (КБ)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT + LTEXT "Дескрипторів",IDS_TOTALS_HANDLE_COUNT,12,131,47,8 + LTEXT "Потоків",IDS_TOTALS_THREAD_COUNT,12,140,27,8 + LTEXT "Процесів",IDS_TOTALS_PROCESS_COUNT,12,149,34,8 EDITTEXT IDC_TOTALS_HANDLE_COUNT,65,131,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_TOTALS_THREAD_COUNT,65,140,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_TOTALS_PROCESS_COUNT,65,149,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "",IDS_COMMIT_CHARGE_TOTAL,12,175,27,8 - LTEXT "",IDS_COMMIT_CHARGE_LIMIT,12,184,18,8,NOT WS_BORDER - LTEXT "ϳ",IDS_COMMIT_CHARGE_PEAK,12,193,18,8 + LTEXT "Усього",IDS_COMMIT_CHARGE_TOTAL,12,175,27,8 + LTEXT "Межа",IDS_COMMIT_CHARGE_LIMIT,12,184,18,8,NOT WS_BORDER + LTEXT "Пік",IDS_COMMIT_CHARGE_PEAK,12,193,18,8 EDITTEXT IDC_COMMIT_CHARGE_TOTAL,65,174,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_COMMIT_CHARGE_LIMIT,65,184,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_COMMIT_CHARGE_PEAK,65,193,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 - LTEXT "",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,32,8 - LTEXT " ",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,53,8 + LTEXT "Усього",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8 + LTEXT "Доступно",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,32,8 + LTEXT "Системний кеш",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,53,8 EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL,188,131,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE,188,140,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE,188,149,45,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8 - LTEXT "",IDS_KERNEL_MEMORY_PAGED,137,184,53,8 - LTEXT "",IDS_KERNEL_MEMORY_NONPAGED,137,193,61,8 + LTEXT "Усього",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8 + LTEXT "Вивантажувана",IDS_KERNEL_MEMORY_PAGED,137,184,53,8 + LTEXT "Невивантажувана",IDS_KERNEL_MEMORY_NONPAGED,137,193,61,8 EDITTEXT IDC_KERNEL_MEMORY_TOTAL,198,174,35,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_PAGED,198,184,35,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP EDITTEXT IDC_KERNEL_MEMORY_NONPAGED,198,193,35,8,ES_RIGHT | ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP - GROUPBOX " ",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT - GROUPBOX " '",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT - PUSHBUTTON "³ ",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON "³ '",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON " ",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, + GROUPBOX "Хронологія використання ЦП",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT + GROUPBOX "Хронологія використання пам'яті",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT + PUSHBUTTON "Відображення використання ЦП",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE + PUSHBUTTON "Відображення використання пам'яті",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE + PUSHBUTTON "Хронологія використання ЦП",IDC_CPU_USAGE_HISTORY_GRAPH,81,17, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE - PUSHBUTTON " '",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, + PUSHBUTTON "Хронологія використання пам'яті",IDC_MEM_USAGE_HISTORY_GRAPH,81,75, 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Налагодження каналів" FONT 8, "MS Shell Dlg" BEGIN CONTROL "List2",IDC_DEBUG_CHANNELS_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP | LVS_SORTASCENDING,7,7,233,177 - PUSHBUTTON "",IDOK,171,189,69,14 + PUSHBUTTON "Закрити",IDOK,171,189,69,14 END IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "³ " +CAPTION "Відповідність процесорів" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "",IDOK,120,133,50,14 - PUSHBUTTON "ͳ",IDCANCEL,174,133,50,14 - LTEXT " , .", + DEFPUSHBUTTON "Так",IDOK,120,133,50,14 + PUSHBUTTON "Ні",IDCANCEL,174,133,50,14 + LTEXT "Параметр відповідності процесорів визначає, на якому ЦП буде дозволено виконувати процес.", IDC_STATIC,5,5,220,16 - CONTROL " 0",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, + CONTROL "ЦП 0",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 11,28,37,10 - CONTROL " 1",IDC_CPU1,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 1",IDC_CPU1,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,41,37,10 - CONTROL " 2",IDC_CPU2,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 2",IDC_CPU2,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,54,37,10 - CONTROL " 3",IDC_CPU3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 3",IDC_CPU3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,67,37,10 - CONTROL " 4",IDC_CPU4,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 4",IDC_CPU4,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,80,37,10 - CONTROL " 5",IDC_CPU5,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 5",IDC_CPU5,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,93,37,10 - CONTROL " 6",IDC_CPU6,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 6",IDC_CPU6,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,106,37,10 - CONTROL " 7",IDC_CPU7,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 7",IDC_CPU7,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,119,37,10 - CONTROL " 8",IDC_CPU8,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 8",IDC_CPU8,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,28,37,10 - CONTROL " 9",IDC_CPU9,"Button",BS_AUTOCHECKBOX | WS_DISABLED | + CONTROL "ЦП 9",IDC_CPU9,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,41,37,10 - CONTROL " 10",IDC_CPU10,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 10",IDC_CPU10,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,54,41,10 - CONTROL " 11",IDC_CPU11,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 11",IDC_CPU11,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,67,41,10 - CONTROL " 12",IDC_CPU12,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 12",IDC_CPU12,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,80,41,10 - CONTROL " 13",IDC_CPU13,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 13",IDC_CPU13,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,93,41,10 - CONTROL " 14",IDC_CPU14,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 14",IDC_CPU14,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,106,41,10 - CONTROL " 15",IDC_CPU15,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 15",IDC_CPU15,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,61,119,41,10 - CONTROL " 16",IDC_CPU16,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 16",IDC_CPU16,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,28,41,10 - CONTROL " 17",IDC_CPU17,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 17",IDC_CPU17,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,41,41,10 - CONTROL " 18",IDC_CPU18,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 18",IDC_CPU18,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,54,41,10 - CONTROL " 19",IDC_CPU19,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 19",IDC_CPU19,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,67,41,10 - CONTROL " 20",IDC_CPU20,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 20",IDC_CPU20,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,80,41,10 - CONTROL " 21",IDC_CPU21,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 21",IDC_CPU21,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,93,41,10 - CONTROL " 22",IDC_CPU22,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 22",IDC_CPU22,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,106,41,10 - CONTROL " 23",IDC_CPU23,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 23",IDC_CPU23,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,116,119,41,10 - CONTROL " 24",IDC_CPU24,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 24",IDC_CPU24,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,28,41,10 - CONTROL " 25",IDC_CPU25,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 25",IDC_CPU25,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,41,41,10 - CONTROL " 26",IDC_CPU26,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 26",IDC_CPU26,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,54,41,10 - CONTROL " 27",IDC_CPU27,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 27",IDC_CPU27,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,67,41,10 - CONTROL " 28",IDC_CPU28,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 28",IDC_CPU28,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,80,41,10 - CONTROL " 29",IDC_CPU29,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 29",IDC_CPU29,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,93,41,10 - CONTROL " 30",IDC_CPU30,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 30",IDC_CPU30,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,106,41,10 - CONTROL " 31",IDC_CPU31,"Button",BS_AUTOCHECKBOX | + CONTROL "ЦП 31",IDC_CPU31,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,175,119,41,10 END IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 227, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Вибір стовпців" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "",IDOK,116,178,50,14 - PUSHBUTTON "",IDCANCEL,170,178,50,14 - LTEXT " , .", + DEFPUSHBUTTON "ОК",IDOK,116,178,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,170,178,50,14 + LTEXT "Виберіть стовпці, які слід відображати на вкладці Процеси диспетчера завдань.", IDC_STATIC,7,7,181,17 - CONTROL "&' ",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | + CONTROL "&Ім'я образу",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,7,28,56,10 - CONTROL "&. (PID)",IDC_PID,"Button", + CONTROL "Іденти&ф. процесу (PID)",IDC_PID,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,39,91,10 - CONTROL "& ",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "&Використання ЦП",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,50,71,10 - CONTROL "& ",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | + CONTROL "&Час ЦП",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,61,48,10 - CONTROL "&' - ",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | + CONTROL "&Пам'ять - використання",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,92,10 - CONTROL "' - &",IDC_MEMORYUSAGEDELTA,"Button", + CONTROL "Пам'ять - змі&на",IDC_MEMORYUSAGEDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,83,82,10 - CONTROL "' - &",IDC_PEAKMEMORYUSAGE,"Button", + CONTROL "Пам'ять - &максимум",IDC_PEAKMEMORYUSAGE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,94,82,10 - CONTROL "& ",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | + CONTROL "П&омилок сторінки",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,105,73,10 - CONTROL "&' USER",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | + CONTROL "О&б'єкти USER",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,116,62,10 - CONTROL "ʳ ",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | + CONTROL "Кількість читань",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,127,68,10 - CONTROL " ",IDC_IOREADBYTES,"Button", + CONTROL "Прочитано байтів",IDC_IOREADBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,138,72,10 - CONTROL " &",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | + CONTROL "Код се&ансу",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,149,50,10 - CONTROL "'& ",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | + CONTROL "Ім'&я користувача",IDC_USERNAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,160,70,10 - CONTROL " & - ",IDC_PAGEFAULTSDELTA,"Button", + CONTROL "Помилок &сторінки - зміна",IDC_PAGEFAULTSDELTA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,28,72,10 - CONTROL "' & '",IDC_VIRTUALMEMORYSIZE,"Button", + CONTROL "Об'єм віртуал&ьної пам'яті",IDC_VIRTUALMEMORYSIZE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,39,100,10 - CONTROL "& ",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | + CONTROL "Виванта&жуваний пул",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,50,88,10 - CONTROL "& ",IDC_NONPAGEDPOOL,"Button", + CONTROL "Невивантаж&уваний пул",IDC_NONPAGEDPOOL,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,61,96,10 - CONTROL "& ",IDC_BASEPRIORITY,"Button", + CONTROL "Базови&й пріоритет",IDC_BASEPRIORITY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,72,75,10 - CONTROL "˳ &",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "Лічильник &дескрипторів",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,83,98,10 - CONTROL "&˳ ",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | + CONTROL "&Лічильник потоків",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,94,79,10 - CONTROL "'& GDI",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | + CONTROL "Об'&єкти GDI",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,105,55,10 - CONTROL "ʳ ",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | + CONTROL "Кількість записів",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,116,73,10 - CONTROL " ",IDC_IOWRITEBYTES,"Button", + CONTROL "Записано байтів",IDC_IOWRITEBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,127,67,10 - CONTROL " -",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | + CONTROL "Інший ввід-вивід",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,138,71,10 - CONTROL " -",IDC_IOOTHERBYTES,"Button", + CONTROL "Інших байтів при вводі-виводі",IDC_IOOTHERBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,149,114,10 END @@ -521,135 +520,135 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_APP_TITLE " " - IDC_TASKMGR " " - IDS_IDLE_PROCESS " " + IDS_APP_TITLE "Диспетчер завдань" + IDC_TASKMGR "Диспетчер завдань" + IDS_IDLE_PROCESS "Бездіяльність системи" END STRINGTABLE DISCARDABLE BEGIN - ID_FILE_NEW " " - ID_OPTIONS_ALWAYSONTOP "³ , " + ID_FILE_NEW "Запускає нову програму" + ID_OPTIONS_ALWAYSONTOP "Вікно диспетчера завдань залишається поверх інших вікон, якщо його не згорнуто" ID_OPTIONS_MINIMIZEONUSE - "³ " - ID_OPTIONS_HIDEWHENMINIMIZED " " - ID_VIEW_REFRESH " " - ID_VIEW_LARGE " " - ID_VIEW_SMALL " " - ID_VIEW_DETAILS " " - ID_VIEW_UPDATESPEED_HIGH " " - ID_VIEW_UPDATESPEED_NORMAL " " - ID_VIEW_UPDATESPEED_LOW " " + "Вікно диспетчера завдань згортається при переключенні" + ID_OPTIONS_HIDEWHENMINIMIZED "Приховування згорнутого вікна диспетчера завдань" + ID_VIEW_REFRESH "Спричинює негайне оновлення вікна диспетчера завдань" + ID_VIEW_LARGE "Показує завдання великими значками" + ID_VIEW_SMALL "Показує завдання малими значками" + ID_VIEW_DETAILS "Показує додаткові відомості про кожне завдання" + ID_VIEW_UPDATESPEED_HIGH "Оновлює зображення двічі на секунду" + ID_VIEW_UPDATESPEED_NORMAL "Оновлює зображення раз на дві секунди" + ID_VIEW_UPDATESPEED_LOW "Оновлює зображення раз на чотири секунди" END STRINGTABLE DISCARDABLE BEGIN - ID_VIEW_UPDATESPEED_PAUSED " " + ID_VIEW_UPDATESPEED_PAUSED "Не оновлювати автоматично" ID_WINDOWS_TILEHORIZONTALLY - " " - ID_WINDOWS_TILEVERTICALLY " " - ID_WINDOWS_MINIMIZE " " - ID_WINDOWS_MAXIMIZE " " - ID_WINDOWS_CASCADE " " - ID_WINDOWS_BRINGTOFRONT " " - ID_HELP_TOPICS " " - ID_HELP_ABOUT " , " - ID_FILE_EXIT " " + "Розташовує вікна горизонтально на робочому столі" + ID_WINDOWS_TILEVERTICALLY "Розташовує вікна вертикально на робочому столі" + ID_WINDOWS_MINIMIZE "Згортає вікна" + ID_WINDOWS_MAXIMIZE "Розгортає вікна" + ID_WINDOWS_CASCADE "Розташовує вікна каскадом на робочому столі" + ID_WINDOWS_BRINGTOFRONT "Переміщення вікна на передній план без переходу до нього" + ID_HELP_TOPICS "Показує довідку диспетчера завдань" + ID_HELP_ABOUT "Показує відомості про програму, її версію та авторські права" + ID_FILE_EXIT "Закриває диспетчер завдань" ID_OPTIONS_SHOW16BITTASKS - " 16- , ntvdm.exe" - ID_VIEW_SELECTCOLUMNS " , " - ID_VIEW_SHOWKERNELTIMES " " + "Показ 16-розрядних завдань, які обробляє ntvdm.exe" + ID_VIEW_SELECTCOLUMNS "Виберіть стовпці, які слід відображати на вкладці Процеси" + ID_VIEW_SHOWKERNELTIMES "Показує час ядра на графіках продуктивності" ID_VIEW_CPUHISTORY_ONEGRAPHALL - " " - ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU " " + "Єдиний хронологічний графік загального використання ЦП" + ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Кожний ЦП має власний хронологічний графік" ID_APPLICATION_PAGE_SWITCHTO - " " + "Переміщення завдання на передній план і передача керування цьому завданню" END STRINGTABLE DISCARDABLE BEGIN - ID_ENDTASK " " - ID_GOTOPROCESS " " - ID_RESTORE "³ " - ID_PROCESS_PAGE_ENDPROCESS " " + ID_ENDTASK "Наказує вибраним завданням закритися" + ID_GOTOPROCESS "Передача фокуса до процесу вибраного завдання" + ID_RESTORE "Відновлення прихованого вікна диспетчера завдань" + ID_PROCESS_PAGE_ENDPROCESS "Видаляє процес із системи" ID_PROCESS_PAGE_ENDPROCESSTREE - " " - ID_PROCESS_PAGE_DEBUG " " + "Видаляє із системи цей процес і всіх його нащадків" + ID_PROCESS_PAGE_DEBUG "Застосовує налагоджувач до цього процесу" ID_PROCESS_PAGE_SETAFFINITY - ", " + "Визначає, які процесори може використовувати процес" ID_PROCESS_PAGE_SETPRIORITY_REALTIME - " "" "" " - ID_PROCESS_PAGE_SETPRIORITY_HIGH " """" " + "Установлює клас пріоритету ""Реального часу"" для процесу" + ID_PROCESS_PAGE_SETPRIORITY_HIGH "Установлює клас пріоритету ""Високий"" для процесу" ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL - " "" "" " + "Установлює клас пріоритету ""Вище середнього"" для процесу" ID_PROCESS_PAGE_SETPRIORITY_NORMAL - " """" " + "Установлює клас пріоритету ""Середній"" для процесу" ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL - " "" "" " - ID_PROCESS_PAGE_SETPRIORITY_LOW " """" " + "Установлює клас пріоритету ""Нижче середнього"" для процесу" + ID_PROCESS_PAGE_SETPRIORITY_LOW "Установлює клас пріоритету ""Низький"" для процесу" END STRINGTABLE DISCARDABLE BEGIN - IDS_TAB_APPS "" - IDS_TAB_PROCESSES "" - IDS_TAB_PERFORMANCE "" - IDS_TAB_TASK "" - IDS_TAB_STATUS "" - IDS_TAB_IMAGENAME "' " + IDS_TAB_APPS "Додатки" + IDS_TAB_PROCESSES "Процеси" + IDS_TAB_PERFORMANCE "Швидкодія" + IDS_TAB_TASK "Завдання" + IDS_TAB_STATUS "Стан" + IDS_TAB_IMAGENAME "Ім'я образу" IDS_TAB_PID "PID" - IDS_TAB_USERNAME "' " - IDS_TAB_SESSIONID " " - IDS_TAB_CPU "" - IDS_TAB_CPUTIME " " - IDS_TAB_MEMUSAGE "'" - IDS_TAB_PEAKMEMUSAGE "ϳ '" - IDS_TAB_MEMDELTA "' ()" - IDS_TAB_PAGEFAULT ".." - IDS_TAB_PFDELTA "..()" - IDS_TAB_VMSIZE "³.." - IDS_TAB_PAGEDPOOL "." - IDS_TAB_NPPOOL "." - IDS_TAB_BASEPRI ".." - IDS_TAB_HANDLES "." - IDS_TAB_THREADS "" - IDS_TAB_USERPBJECTS "' USER" - IDS_TAB_GDIOBJECTS "' GDI" - IDS_TAB_IOREADS "ʳ " - IDS_TAB_IOWRITES "ʳ " - IDS_TAB_IOOTHER " -" - IDS_TAB_IOREADBYTES " " - IDS_TAB_IOWRITESBYTES " " - IDS_TAB_IOOTHERBYTES " -" - IDS_MENU_SELECTCOLUMNS "& ..." - IDS_MENU_16BITTASK "&³ 16- " - IDS_MENU_WINDOWS "&" - IDS_MENU_LARGEICONS "& " - IDS_MENU_SMALLICONS "& " - IDS_MENU_DETAILS "&" - IDS_MENU_ONEGRAPHALLCPUS "& " - IDS_MENU_ONEGRAPHPERCPU " & " - IDS_MENU_CPUHISTORY "& " - IDS_MENU_SHOWKERNELTIMES "& " - IDS_CREATENEWTASK " " - IDS_CREATENEWTASK_DESC " ' , , , ." - IDS_MSG_ACCESSPROCESSAFF " " - IDS_MSG_PROCESSONEPRO " ." - IDS_MSG_INVALIDOPTION " " - IDS_MSG_UNABLEDEBUGPROCESS " " - IDS_MSG_WARNINGDEBUG "! .\n ?" - IDS_MSG_TASKMGRWARNING " " - IDS_MSG_WARNINGTERMINATING "! \n , \n . \n . \n ?" - IDS_MSG_UNABLETERMINATEPRO " " - IDS_MSG_UNABLECHANGEPRIORITY " " - IDS_MSG_WARNINGCHANGEPRIORITY "! \n , \n. ?" - IDS_MSG_TRAYICONCPUUSAGE " : %d%%" - IDS_STATUS_MEMUSAGE "': %dK / %dK" - IDS_STATUS_CPUUSAGE " : %3d%%" - IDS_STATUS_PROCESSES ": %d" - IDS_Not_Responding " " - IDS_Running "" + IDS_TAB_USERNAME "Ім'я користувача" + IDS_TAB_SESSIONID "Код сеансу" + IDS_TAB_CPU "ЦП" + IDS_TAB_CPUTIME "Час ЦП" + IDS_TAB_MEMUSAGE "Пам'ять" + IDS_TAB_PEAKMEMUSAGE "Пікове використання пам'яті" + IDS_TAB_MEMDELTA "Пам'ять (змін)" + IDS_TAB_PAGEFAULT "Пом.ст." + IDS_TAB_PFDELTA "Пом.ст.(змін)" + IDS_TAB_VMSIZE "Вірт.п." + IDS_TAB_PAGEDPOOL "Вив.пул" + IDS_TAB_NPPOOL "Невив.пул" + IDS_TAB_BASEPRI "Баз.пр." + IDS_TAB_HANDLES "Дескр." + IDS_TAB_THREADS "Потоків" + IDS_TAB_USERPBJECTS "Об'єкти USER" + IDS_TAB_GDIOBJECTS "Об'єкти GDI" + IDS_TAB_IOREADS "Кількість читань" + IDS_TAB_IOWRITES "Кількість записів" + IDS_TAB_IOOTHER "Інший ввід-вивід" + IDS_TAB_IOREADBYTES "Прочитано байтів" + IDS_TAB_IOWRITESBYTES "Записано байтів" + IDS_TAB_IOOTHERBYTES "Інших байтів під час вводу-виводу" + IDS_MENU_SELECTCOLUMNS "В&ибрати стовпці..." + IDS_MENU_16BITTASK "&Відображати 16-розрядні завдання" + IDS_MENU_WINDOWS "В&ікна" + IDS_MENU_LARGEICONS "&Великі значки" + IDS_MENU_SMALLICONS "&Дрібні значки" + IDS_MENU_DETAILS "&Детально" + IDS_MENU_ONEGRAPHALLCPUS "&Один графік для всіх ЦП" + IDS_MENU_ONEGRAPHPERCPU "Окремий &графік для кожного ЦП" + IDS_MENU_CPUHISTORY "&Хронологія ЦП" + IDS_MENU_SHOWKERNELTIMES "&Вивід часу ядра" + IDS_CREATENEWTASK "Створити нове завдання" + IDS_CREATENEWTASK_DESC "Введіть ім'я програми, папки, документа або ресурсу Інтернету, і Диспетчер завдань відкриє їх." + IDS_MSG_ACCESSPROCESSAFF "Не вдалося отримати доступ або установити належність процесу" + IDS_MSG_PROCESSONEPRO "Процесу має відповідати принаймні один процесор." + IDS_MSG_INVALIDOPTION "Неправильний параметр" + IDS_MSG_UNABLEDEBUGPROCESS "Не вдається налагодити процес" + IDS_MSG_WARNINGDEBUG "УВАГА! Налагодження цього процесу може спричинити втрату даних.\nВи дійсно бажаєте застосувати налагоджувач?" + IDS_MSG_TASKMGRWARNING "Попередження диспетчера завдань" + IDS_MSG_WARNINGTERMINATING "УВАГА! Припинення процесу може призвести до \nнебажаних наслідків, включаючи втрату даних і \nнестабільну роботу системи. Процес не зможе \nзберегти свій стан або дані перед припиненням. \nВи дійсно бажаєте припинити процес?" + IDS_MSG_UNABLETERMINATEPRO "Неможливо завершити процес" + IDS_MSG_UNABLECHANGEPRIORITY "Неможливо змінити пріоритет" + IDS_MSG_WARNINGCHANGEPRIORITY "УВАГА! Зміна класу пріоритету цього процесу може призвести до \nнебажаних наслідків, включаючи нестабільну роботу \nсистеми. Ви дійсно бажаєте змінити пріоритет класу?" + IDS_MSG_TRAYICONCPUUSAGE "Використання ЦП: %d%%" + IDS_STATUS_MEMUSAGE "Пам'ять: %dK / %dK" + IDS_STATUS_CPUUSAGE "Використання ЦП: %3d%%" + IDS_STATUS_PROCESSES "Процесів: %d" + IDS_Not_Responding "Не відповідає" + IDS_Running "Виконується" END diff --git a/base/applications/taskmgr/perfdata.c b/base/applications/taskmgr/perfdata.c index a82eb78ef1e..8e98a6ee714 100644 --- a/base/applications/taskmgr/perfdata.c +++ b/base/applications/taskmgr/perfdata.c @@ -60,7 +60,7 @@ BOOL PerfDataInitialize(void) * Get number of processors in the system */ status = NtQuerySystemInformation(SystemBasicInformation, &SystemBasicInfo, sizeof(SystemBasicInfo), NULL); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) return FALSE; /* @@ -179,25 +179,25 @@ void PerfDataRefresh(void) ULONG cwcUserName; /* Get new system time */ - status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), 0); - if (status != NO_ERROR) + status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), NULL); + if (!NT_SUCCESS(status)) return; /* Get new CPU's idle time */ status = NtQuerySystemInformation(SystemPerformanceInformation, &SysPerfInfo, sizeof(SysPerfInfo), NULL); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) return; /* Get system cache information */ status = NtQuerySystemInformation(SystemFileCacheInformation, &SysCacheInfo, sizeof(SysCacheInfo), NULL); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) return; /* Get processor time information */ SysProcessorTimeInfo = (PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION)HeapAlloc(GetProcessHeap(), 0, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * SystemBasicInfo.NumberOfProcessors); status = NtQuerySystemInformation(SystemProcessorPerformanceInformation, SysProcessorTimeInfo, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * SystemBasicInfo.NumberOfProcessors, &ulSize); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) { if (SysProcessorTimeInfo != NULL) HeapFree(GetProcessHeap(), 0, SysProcessorTimeInfo); diff --git a/base/applications/taskmgr/rsrc.rc b/base/applications/taskmgr/rsrc.rc index 13162dad92b..beacfb4e66d 100644 --- a/base/applications/taskmgr/rsrc.rc +++ b/base/applications/taskmgr/rsrc.rc @@ -10,15 +10,18 @@ #include "lang/hu-HU.rc" #include "lang/id-ID.rc" #include "lang/it-IT.rc" -// #include "lang/ja-JP.rc" Error: Invalid character in string 'IvVǝ(&O)' for codepage 932 #include "lang/ko-KR.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/ja-JP.rc" +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/applications/taskmgr/taskmgr.c b/base/applications/taskmgr/taskmgr.c index 6778db38931..ad9175826b1 100644 --- a/base/applications/taskmgr/taskmgr.c +++ b/base/applications/taskmgr/taskmgr.c @@ -759,19 +759,10 @@ void LoadSettings(void) void SaveSettings(void) { HKEY hKey; - WCHAR szSubKey1[] = L"Software"; - WCHAR szSubKey2[] = L"Software\\ReactOS"; - WCHAR szSubKey3[] = L"Software\\ReactOS\\TaskManager"; + WCHAR szSubKey[] = L"Software\\ReactOS\\TaskManager"; /* Open (or create) the key */ - hKey = NULL; - RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey1, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL); - RegCloseKey(hKey); - hKey = NULL; - RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey2, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL); - RegCloseKey(hKey); - hKey = NULL; - if (RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey3, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) + if (RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) return; /* Save the settings */ RegSetValueExW(hKey, L"Preferences", 0, REG_BINARY, (LPBYTE)&TaskManagerSettings, sizeof(TASKMANAGER_SETTINGS)); diff --git a/base/applications/winhlp32/CMakeLists.txt b/base/applications/winhlp32/CMakeLists.txt index 8b1e1fe154f..6f3b9e1b7d4 100644 --- a/base/applications/winhlp32/CMakeLists.txt +++ b/base/applications/winhlp32/CMakeLists.txt @@ -7,8 +7,7 @@ add_definitions( -D__ROS_LONG64__ -D_CRT_NONSTDC_NO_DEPRECATE -Dfileno=_fileno - -Disatty=_isatty - -D_DLL -D__USE_CRTIMP) + -Disatty=_isatty) add_executable(winhlp32 callback.c @@ -20,7 +19,6 @@ add_executable(winhlp32 rsrc.rc) set_module_type(winhlp32 win32gui) - target_link_libraries(winhlp32 wine) add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll) add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all) diff --git a/base/applications/wordpad/CMakeLists.txt b/base/applications/wordpad/CMakeLists.txt index e8f3906dda9..d04e11ccbe5 100644 --- a/base/applications/wordpad/CMakeLists.txt +++ b/base/applications/wordpad/CMakeLists.txt @@ -1,9 +1,7 @@ include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) set_rc_compiler() @@ -17,7 +15,6 @@ list(APPEND SOURCE add_executable(wordpad ${SOURCE}) set_module_type(wordpad win32gui) - target_link_libraries(wordpad wine uuid) add_importlibs(wordpad comdlg32 ole32 shell32 user32 gdi32 advapi32 comctl32 msvcrt kernel32 ntdll) add_cd_file(TARGET wordpad DESTINATION reactos/system32 FOR all) diff --git a/base/services/eventlog/CMakeLists.txt b/base/services/eventlog/CMakeLists.txt index 424606205c4..17f1e0adc39 100644 --- a/base/services/eventlog/CMakeLists.txt +++ b/base/services/eventlog/CMakeLists.txt @@ -11,12 +11,11 @@ list(APPEND SOURCE rpc.c file.c) -add_executable(eventlog ${CMAKE_CURRENT_BINARY_DIR}/eventlog_eventlog.h.gch ${SOURCE}) +add_executable(eventlog ${SOURCE}) target_link_libraries(eventlog eventlogrpc ${PSEH_LIB}) -add_pch(eventlog ${CMAKE_CURRENT_SOURCE_DIR}/eventlog.h ${SOURCE}) - set_module_type(eventlog win32cui) add_importlibs(eventlog advapi32 rpcrt4 msvcrt kernel32 ntdll) +add_pch(eventlog eventlog.h) add_cd_file(TARGET eventlog DESTINATION reactos/system32 FOR all) diff --git a/base/services/eventlog/eventlog.c b/base/services/eventlog/eventlog.c index ee34a1d2e45..d0ee12f36ea 100644 --- a/base/services/eventlog/eventlog.c +++ b/base/services/eventlog/eventlog.c @@ -135,6 +135,71 @@ ServiceInit(VOID) } +static VOID +ReportProductInfoEvent(VOID) +{ + OSVERSIONINFOW versionInfo; + WCHAR szBuffer[512]; + DWORD dwLength; + HKEY hKey; + DWORD dwValueLength; + DWORD dwType; + LONG lResult = ERROR_SUCCESS; + + ZeroMemory(&versionInfo, sizeof(OSVERSIONINFO)); + versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + + /* Get version information */ + if (!GetVersionExW(&versionInfo)) + return; + + ZeroMemory(szBuffer, 512 * sizeof(WCHAR)); + + /* Write version into the buffer */ + dwLength = swprintf(szBuffer, + L"%lu.%lu", + versionInfo.dwMajorVersion, + versionInfo.dwMinorVersion) + 1; + + /* Write build number into the buffer */ + dwLength += swprintf(&szBuffer[dwLength], + L"%lu", + versionInfo.dwBuildNumber) + 1; + + /* Write service pack info into the buffer */ + wcscpy(&szBuffer[dwLength], versionInfo.szCSDVersion); + dwLength += wcslen(versionInfo.szCSDVersion) + 1; + + /* Read 'CurrentType' from the registry and write it into the buffer */ + lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", + 0, + KEY_QUERY_VALUE, + &hKey); + if (lResult == ERROR_SUCCESS) + { + dwValueLength = 512 - dwLength; + lResult = RegQueryValueEx(hKey, + L"CurrentType", + NULL, + &dwType, + (LPBYTE)&szBuffer[dwLength], + &dwValueLength); + + RegCloseKey(hKey); + } + + /* Log the product information */ + LogfReportEvent(EVENTLOG_INFORMATION_TYPE, + 0, + EVENT_EventLogProductInfo, + 4, + szBuffer, + 0, + NULL); +} + + static VOID CALLBACK ServiceMain(DWORD argc, LPWSTR *argv) @@ -169,9 +234,15 @@ ServiceMain(DWORD argc, DPRINT("Service started\n"); UpdateServiceStatus(SERVICE_RUNNING); + ReportProductInfoEvent(); + LogfReportEvent(EVENTLOG_INFORMATION_TYPE, 0, - EVENT_EventlogStarted); + EVENT_EventlogStarted, + 0, + NULL, + 0, + NULL); } DPRINT("ServiceMain() done\n"); diff --git a/base/services/eventlog/eventlog.h b/base/services/eventlog/eventlog.h index 2ed6a4f50f2..f4db6a38690 100644 --- a/base/services/eventlog/eventlog.h +++ b/base/services/eventlog/eventlog.h @@ -12,6 +12,7 @@ #define NDEBUG #define WIN32_NO_STATUS +#include #include #include #include @@ -181,7 +182,11 @@ PBYTE LogfAllocAndBuildNewRecord(LPDWORD lpRecSize, VOID LogfReportEvent(WORD wType, WORD wCategory, - DWORD dwEventId); + DWORD dwEventId, + WORD wNumStrings, + WCHAR *lpStrings, + DWORD dwDataSize, + LPVOID lpRawData); /* eventlog.c */ extern HANDLE MyHeap; diff --git a/base/services/eventlog/file.c b/base/services/eventlog/file.c index 3dd38af0fb6..116d0d09102 100644 --- a/base/services/eventlog/file.c +++ b/base/services/eventlog/file.c @@ -1054,7 +1054,11 @@ PBYTE LogfAllocAndBuildNewRecord(LPDWORD lpRecSize, VOID LogfReportEvent(WORD wType, WORD wCategory, - DWORD dwEventId) + DWORD dwEventId, + WORD wNumStrings, + WCHAR *lpStrings, + DWORD dwDataSize, + LPVOID lpRawData) { WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH + 1]; DWORD dwComputerNameLength = MAX_COMPUTERNAME_LENGTH + 1; @@ -1086,10 +1090,10 @@ LogfReportEvent(WORD wType, (LPCWSTR)szComputerName, 0, NULL, - 0, //wNumStrings, - NULL, //lpStrings, - 0, //dwDataSize, - NULL); //lpRawData); + wNumStrings, + lpStrings, + dwDataSize, + lpRawData); dwError = LogfWriteData(pEventSource->LogFile, recSize, logBuffer); if (!dwError) diff --git a/base/services/eventlog/rpc.c b/base/services/eventlog/rpc.c index cf855757292..0f1a8acad0f 100644 --- a/base/services/eventlog/rpc.c +++ b/base/services/eventlog/rpc.c @@ -199,6 +199,7 @@ NTSTATUS ElfrNumberOfRecords( DWORD *NumberOfRecords) { PLOGHANDLE lpLogHandle; + PLOGFILE lpLogFile; lpLogHandle = ElfGetLogHandleEntryByHandle(LogHandle); if (!lpLogHandle) @@ -206,7 +207,13 @@ NTSTATUS ElfrNumberOfRecords( return STATUS_INVALID_HANDLE; } - *NumberOfRecords = lpLogHandle->LogFile->Header.CurrentRecordNumber; + lpLogFile = lpLogHandle->LogFile; + + if (lpLogFile->Header.OldestRecordNumber == 0) + *NumberOfRecords = 0; + else + *NumberOfRecords = lpLogFile->Header.CurrentRecordNumber - + lpLogFile->Header.OldestRecordNumber; return STATUS_SUCCESS; } diff --git a/base/services/rpcss/irotp.c b/base/services/rpcss/irotp.c index f766beb5766..41ccc7092a6 100644 --- a/base/services/rpcss/irotp.c +++ b/base/services/rpcss/irotp.c @@ -1,5 +1,5 @@ /* - * Running Object Table + * Running Object Table * * Copyright 2007 Robert Shearman * @@ -25,7 +25,7 @@ #include "windef.h" #include "winbase.h" -#include "irot_s.h" +#include "irot.h" #include "wine/list.h" #include "wine/debug.h" diff --git a/base/services/tcpsvcs/CMakeLists.txt b/base/services/tcpsvcs/CMakeLists.txt index 02439ab483a..08a1be6587b 100644 --- a/base/services/tcpsvcs/CMakeLists.txt +++ b/base/services/tcpsvcs/CMakeLists.txt @@ -12,11 +12,11 @@ list(APPEND SOURCE tcpsvcs.rc log.c) -add_executable(tcpsvcs ${CMAKE_CURRENT_BINARY_DIR}/tcpsvcs_tcpsvcs.h.gch ${SOURCE}) +add_executable(tcpsvcs ${SOURCE}) -add_pch(tcpsvcs ${CMAKE_CURRENT_SOURCE_DIR}/tcpsvcs.h ${SOURCE}) set_module_type(tcpsvcs win32cui) add_importlibs(tcpsvcs ws2_32 advapi32 msvcrt kernel32 ntdll) +add_pch(tcpsvcs tcpsvcs.h) add_cd_file(TARGET tcpsvcs DESTINATION reactos/system32 FOR all) diff --git a/base/services/telnetd/CMakeLists.txt b/base/services/telnetd/CMakeLists.txt index 225696094d5..f22c3e88ea9 100644 --- a/base/services/telnetd/CMakeLists.txt +++ b/base/services/telnetd/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - add_executable(telnetd telnetd.c serviceentry.c diff --git a/base/services/umpnpmgr/umpnpmgr.c b/base/services/umpnpmgr/umpnpmgr.c index 64d8b45cd2f..3e6dbf70b26 100644 --- a/base/services/umpnpmgr/umpnpmgr.c +++ b/base/services/umpnpmgr/umpnpmgr.c @@ -187,8 +187,7 @@ DWORD PNP_Disconnect( handle_t hBinding) { UNREFERENCED_PARAMETER(hBinding); - UNIMPLEMENTED; - return CR_CALL_NOT_IMPLEMENTED; + return CR_SUCCESS; } @@ -197,8 +196,7 @@ DWORD PNP_Connect( handle_t hBinding) { UNREFERENCED_PARAMETER(hBinding); - UNIMPLEMENTED; - return CR_CALL_NOT_IMPLEMENTED; + return CR_SUCCESS; } @@ -538,14 +536,33 @@ DWORD PNP_GetDeviceRegProp( PLUGPLAY_CONTROL_PROPERTY_DATA PlugPlayData; CONFIGRET ret = CR_SUCCESS; LPWSTR lpValueName = NULL; - HKEY hKey = 0; + HKEY hKey = NULL; + LONG lError; NTSTATUS Status; UNREFERENCED_PARAMETER(hBinding); - UNREFERENCED_PARAMETER(ulFlags); DPRINT("PNP_GetDeviceRegProp() called\n"); + if (pulTransferLen == NULL || pulLength == NULL) + { + ret = CR_INVALID_POINTER; + goto done; + } + + if (ulFlags != 0) + { + ret = CR_INVALID_FLAG; + goto done; + } + + /* FIXME: Check pDeviceID */ + + if (*pulLength < *pulTransferLen) + *pulLength = *pulTransferLen; + + *pulTransferLen = 0; + switch (ulProperty) { case CM_DRP_DEVICEDESC: @@ -628,8 +645,65 @@ DWORD PNP_GetDeviceRegProp( lpValueName = NULL; break; + case CM_DRP_SECURITY: + lpValueName = L"Security"; + break; + + case CM_DRP_DEVTYPE: + lpValueName = L"DeviceType"; + break; + + case CM_DRP_EXCLUSIVE: + lpValueName = L"Exclusive"; + break; + + case CM_DRP_CHARACTERISTICS: + lpValueName = L"DeviceCharacteristics"; + break; + + case CM_DRP_ADDRESS: + lpValueName = NULL; + break; + + case CM_DRP_UI_NUMBER_DESC_FORMAT: + lpValueName = L"UINumberDescFormat"; + break; + + case CM_DRP_DEVICE_POWER_DATA: + lpValueName = NULL; + break; + + case CM_DRP_REMOVAL_POLICY: + lpValueName = NULL; + break; + + case CM_DRP_REMOVAL_POLICY_HW_DEFAULT: + lpValueName = NULL; + break; + + case CM_DRP_REMOVAL_POLICY_OVERRIDE: + lpValueName = L"RemovalPolicy"; + break; + + case CM_DRP_INSTALL_STATE: + lpValueName = NULL; + break; + +#if (WINVER >= _WIN32_WINNT_WS03) + case CM_DRP_LOCATION_PATHS: + lpValueName = NULL; + break; +#endif + +#if (WINVER >= _WIN32_WINNT_WIN7) + case CM_DRP_BASE_CONTAINERID: + lpValueName = NULL; + break; +#endif + default: - return CR_INVALID_PROPERTY; + ret = CR_INVALID_PROPERTY; + goto done; } DPRINT("Value name: %S\n", lpValueName); @@ -637,24 +711,37 @@ DWORD PNP_GetDeviceRegProp( if (lpValueName) { /* Retrieve information from the Registry */ - if (RegOpenKeyExW(hEnumKey, - pDeviceID, - 0, - KEY_ALL_ACCESS, - &hKey)) - return CR_INVALID_DEVNODE; + lError = RegOpenKeyExW(hEnumKey, + pDeviceID, + 0, + KEY_QUERY_VALUE, + &hKey); + if (lError != ERROR_SUCCESS) + { + hKey = NULL; + *pulLength = 0; + ret = CR_INVALID_DEVNODE; + goto done; + } - if (RegQueryValueExW(hKey, - lpValueName, - NULL, - pulRegDataType, - Buffer, - pulLength)) - ret = CR_REGISTRY_ERROR; - - /* FIXME: Check buffer size */ - - RegCloseKey(hKey); + lError = RegQueryValueExW(hKey, + lpValueName, + NULL, + pulRegDataType, + Buffer, + pulLength); + if (lError != ERROR_SUCCESS) + { + if (lError == ERROR_MORE_DATA) + { + ret = CR_BUFFER_SMALL; + } + else + { + *pulLength = 0; + ret = CR_NO_SUCH_VALUE; + } + } } else { @@ -666,32 +753,65 @@ DWORD PNP_GetDeviceRegProp( switch (ulProperty) { -#if 0 case CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME: - PlugPlayData.Property = DevicePropertyPhysicalDeviceObjectName; + PlugPlayData.Property = 0xb; // DevicePropertyPhysicalDeviceObjectName; break; case CM_DRP_UI_NUMBER: - PlugPlayData.Property = DevicePropertyUINumber; + PlugPlayData.Property = 0x11; // DevicePropertyUINumber; break; case CM_DRP_BUSTYPEGUID: - PlugPlayData.Property = DevicePropertyBusTypeGuid; + PlugPlayData.Property = 0xc; // DevicePropertyBusTypeGuid; break; case CM_DRP_LEGACYBUSTYPE: - PlugPlayData.Property = DevicePropertyLegacyBusType; + PlugPlayData.Property = 0xd; // DevicePropertyLegacyBusType; break; case CM_DRP_BUSNUMBER: - PlugPlayData.Property = DevicePropertyBusNumber; + PlugPlayData.Property = 0xe; // DevicePropertyBusNumber; break; -#endif case CM_DRP_ENUMERATOR_NAME: - PlugPlayData.Property = 15; //DevicePropertyEnumeratorName; + PlugPlayData.Property = 0xf; // DevicePropertyEnumeratorName; break; + case CM_DRP_ADDRESS: + PlugPlayData.Property = 0x10; // DevicePropertyAddress; + break; + +#if 0 + /* FIXME: This property is not supported by IoGetDeviceProperty */ + case CM_DRP_DEVICE_POWER_DATA: +#endif + + case CM_DRP_REMOVAL_POLICY: + PlugPlayData.Property = 0x12; // DevicePropertyRemovalPolicy + break; + +#if 0 + /* FIXME: This property is not supported by IoGetDeviceProperty */ + case CM_DRP_REMOVAL_POLICY_HW_DEFAULT: +#endif + + case CM_DRP_INSTALL_STATE: + PlugPlayData.Property = 0x12; // DevicePropertyInstallState; + break; + +#if 0 + /* FIXME: This property is not supported by IoGetDeviceProperty */ +#if (WINVER >= _WIN32_WINNT_WS03) + case CM_DRP_LOCATION_PATHS: +#endif +#endif + +#if (WINVER >= _WIN32_WINNT_WIN7) + case CM_DRP_BASE_CONTAINERID: + PlugPlayData.Property = 0x16; // DevicePropertyContainerID; + break; +#endif + default: return CR_INVALID_PROPERTY; } @@ -709,6 +829,12 @@ DWORD PNP_GetDeviceRegProp( } } +done:; + *pulTransferLen = (ret == CR_SUCCESS) ? *pulLength : 0; + + if (hKey != NULL) + RegCloseKey(hKey); + DPRINT("PNP_GetDeviceRegProp() done (returns %lx)\n", ret); return ret; @@ -793,6 +919,30 @@ DWORD PNP_SetDeviceRegProp( lpValueName = L"LowerFilters"; break; + case CM_DRP_SECURITY: + lpValueName = L"Security"; + break; + + case CM_DRP_DEVTYPE: + lpValueName = L"DeviceType"; + break; + + case CM_DRP_EXCLUSIVE: + lpValueName = L"Exclusive"; + break; + + case CM_DRP_CHARACTERISTICS: + lpValueName = L"DeviceCharacteristics"; + break; + + case CM_DRP_UI_NUMBER_DESC_FORMAT: + lpValueName = L"UINumberDescFormat"; + break; + + case CM_DRP_REMOVAL_POLICY_OVERRIDE: + lpValueName = L"RemovalPolicy"; + break; + default: return CR_INVALID_PROPERTY; } @@ -802,7 +952,7 @@ DWORD PNP_SetDeviceRegProp( if (RegOpenKeyExW(hEnumKey, pDeviceId, 0, - KEY_ALL_ACCESS, /* FIXME: so much? */ + KEY_SET_VALUE, &hKey)) return CR_INVALID_DEVNODE; @@ -1087,23 +1237,364 @@ DWORD PNP_GetClassRegProp( PNP_RPC_STRING_LEN *pulLength, DWORD ulFlags) { - UNIMPLEMENTED; - return CR_CALL_NOT_IMPLEMENTED; + CONFIGRET ret = CR_SUCCESS; + LPWSTR lpValueName = NULL; + HKEY hInstKey = NULL; + HKEY hPropKey = NULL; + LONG lError; + + UNREFERENCED_PARAMETER(hBinding); + + DPRINT("PNP_GetClassRegProp() called\n"); + + if (pulTransferLen == NULL || pulLength == NULL) + { + ret = CR_INVALID_POINTER; + goto done; + } + + if (ulFlags != 0) + { + ret = CR_INVALID_FLAG; + goto done; + } + + if (*pulLength < *pulTransferLen) + *pulLength = *pulTransferLen; + + *pulTransferLen = 0; + + switch (ulProperty) + { + case CM_CRP_SECURITY: + lpValueName = L"Security"; + break; + + case CM_CRP_DEVTYPE: + lpValueName = L"DeviceType"; + break; + + case CM_CRP_EXCLUSIVE: + lpValueName = L"Exclusive"; + break; + + case CM_CRP_CHARACTERISTICS: + lpValueName = L"DeviceCharacteristics"; + break; + + default: + ret = CR_INVALID_PROPERTY; + goto done; + } + + DPRINT("Value name: %S\n", lpValueName); + + lError = RegOpenKeyExW(hClassKey, + pszClassGuid, + 0, + KEY_READ, + &hInstKey); + if (lError != ERROR_SUCCESS) + { + *pulLength = 0; + ret = CR_NO_SUCH_REGISTRY_KEY; + goto done; + } + + lError = RegOpenKeyExW(hInstKey, + L"Properties", + 0, + KEY_READ, + &hPropKey); + if (lError != ERROR_SUCCESS) + { + *pulLength = 0; + ret = CR_NO_SUCH_REGISTRY_KEY; + goto done; + } + + lError = RegQueryValueExW(hPropKey, + lpValueName, + NULL, + pulRegDataType, + Buffer, + pulLength); + if (lError != ERROR_SUCCESS) + { + if (lError == ERROR_MORE_DATA) + { + ret = CR_BUFFER_SMALL; + } + else + { + *pulLength = 0; + ret = CR_NO_SUCH_VALUE; + } + } + +done:; + *pulTransferLen = (ret == CR_SUCCESS) ? *pulLength : 0; + + if (hPropKey != NULL) + RegCloseKey(hPropKey); + + if (hInstKey != NULL) + RegCloseKey(hInstKey); + + DPRINT("PNP_GetClassRegProp() done (returns %lx)\n", ret); + + return ret; } /* Function 27 */ DWORD PNP_SetClassRegProp( handle_t hBinding, - LPWSTR *pszClassGuid, + LPWSTR pszClassGuid, DWORD ulProperty, DWORD ulDataType, BYTE *Buffer, PNP_PROP_SIZE ulLength, DWORD ulFlags) { - UNIMPLEMENTED; - return CR_CALL_NOT_IMPLEMENTED; + CONFIGRET ret = CR_SUCCESS; + LPWSTR lpValueName = NULL; + HKEY hInstKey = 0; + HKEY hPropKey = 0; + LONG lError; + + UNREFERENCED_PARAMETER(hBinding); + + DPRINT("PNP_SetClassRegProp() called\n"); + + if (ulFlags != 0) + return CR_INVALID_FLAG; + + switch (ulProperty) + { + case CM_CRP_SECURITY: + lpValueName = L"Security"; + break; + + case CM_CRP_DEVTYPE: + lpValueName = L"DeviceType"; + break; + + case CM_CRP_EXCLUSIVE: + lpValueName = L"Exclusive"; + break; + + case CM_CRP_CHARACTERISTICS: + lpValueName = L"DeviceCharacteristics"; + break; + + default: + return CR_INVALID_PROPERTY; + } + + lError = RegOpenKeyExW(hClassKey, + pszClassGuid, + 0, + KEY_WRITE, + &hInstKey); + if (lError != ERROR_SUCCESS) + { + ret = CR_NO_SUCH_REGISTRY_KEY; + goto done; + } + + /* FIXME: Set security descriptor */ + lError = RegCreateKeyExW(hInstKey, + L"Properties", + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, + NULL, + &hPropKey, + NULL); + if (lError != ERROR_SUCCESS) + { + ret = CR_REGISTRY_ERROR; + goto done; + } + + if (ulLength == 0) + { + if (RegDeleteValueW(hPropKey, + lpValueName)) + ret = CR_REGISTRY_ERROR; + } + else + { + if (RegSetValueExW(hPropKey, + lpValueName, + 0, + ulDataType, + Buffer, + ulLength)) + ret = CR_REGISTRY_ERROR; + } + +done:; + if (hPropKey != NULL) + RegCloseKey(hPropKey); + + if (hInstKey != NULL) + RegCloseKey(hInstKey); + + return ret; +} + + +static VOID +SplitDeviceInstanceID(IN LPWSTR pszDeviceInstanceID, + OUT LPWSTR pszEnumerator, + OUT LPWSTR pszDevice, + OUT LPWSTR pszInstance) +{ + WCHAR szLocalDeviceInstanceID[MAX_DEVICE_ID_LEN]; + LPWSTR lpEnumerator = NULL; + LPWSTR lpDevice = NULL; + LPWSTR lpInstance = NULL; + LPWSTR ptr; + + wcscpy(szLocalDeviceInstanceID, pszDeviceInstanceID); + + *pszEnumerator = 0; + *pszDevice = 0; + *pszInstance = 0; + + lpEnumerator = szLocalDeviceInstanceID; + + ptr = wcschr(lpEnumerator, L'\\'); + if (ptr != NULL) + { + *ptr = 0; + lpDevice = ++ptr; + + ptr = wcschr(lpDevice, L'\\'); + if (ptr != NULL) + { + *ptr = 0; + lpInstance = ++ptr; + } + } + + if (lpEnumerator != NULL) + wcscpy(pszEnumerator, lpEnumerator); + + if (lpDevice != NULL) + wcscpy(pszDevice, lpDevice); + + if (lpInstance != NULL) + wcscpy(pszInstance, lpInstance); +} + + +static CONFIGRET +CreateDeviceInstance(LPWSTR pszDeviceID) +{ + WCHAR szEnumerator[MAX_DEVICE_ID_LEN]; + WCHAR szDevice[MAX_DEVICE_ID_LEN]; + WCHAR szInstance[MAX_DEVICE_ID_LEN]; + HKEY hKeyEnumerator; + HKEY hKeyDevice; + HKEY hKeyInstance; + HKEY hKeyControl; + LONG lError; + + /* Split the instance ID */ + SplitDeviceInstanceID(pszDeviceID, + szEnumerator, + szDevice, + szInstance); + + /* Open or create the enumerator key */ + lError = RegCreateKeyExW(hEnumKey, + szEnumerator, + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, + NULL, + &hKeyEnumerator, + NULL); + if (lError != ERROR_SUCCESS) + { + return CR_REGISTRY_ERROR; + } + + /* Open or create the device key */ + lError = RegCreateKeyExW(hKeyEnumerator, + szDevice, + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, + NULL, + &hKeyDevice, + NULL); + + /* Close the enumerator key */ + RegCloseKey(hKeyEnumerator); + + if (lError != ERROR_SUCCESS) + { + return CR_REGISTRY_ERROR; + } + + /* Try to open the instance key and fail if it exists */ + lError = RegOpenKeyExW(hKeyDevice, + szInstance, + 0, + KEY_SET_VALUE, + &hKeyInstance); + if (lError == ERROR_SUCCESS) + { + DPRINT1("Instance %S already exists!\n", szInstance); + RegCloseKey(hKeyInstance); + RegCloseKey(hKeyDevice); + return CR_ALREADY_SUCH_DEVINST; + } + + /* Create a new instance key */ + lError = RegCreateKeyExW(hKeyDevice, + szInstance, + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, + NULL, + &hKeyInstance, + NULL); + + /* Close the device key */ + RegCloseKey(hKeyDevice); + + if (lError != ERROR_SUCCESS) + { + return CR_REGISTRY_ERROR; + } + + /* Create the 'Control' sub key */ + lError = RegCreateKeyExW(hKeyInstance, + L"Control", + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, + NULL, + &hKeyControl, + NULL); + if (lError == ERROR_SUCCESS) + { + RegCloseKey(hKeyControl); + } + + RegCloseKey(hKeyInstance); + + return (lError == ERROR_SUCCESS) ? CR_SUCCESS : CR_REGISTRY_ERROR; } @@ -1115,8 +1606,25 @@ DWORD PNP_CreateDevInst( PNP_RPC_STRING_LEN ulLength, DWORD ulFlags) { - UNIMPLEMENTED; - return CR_CALL_NOT_IMPLEMENTED; + CONFIGRET ret = CR_SUCCESS; + + DPRINT("PNP_CreateDevInst: %S\n", pszDeviceID); + + if (ulFlags & CM_CREATE_DEVNODE_GENERATE_ID) + { + /* FIXME */ + DPRINT1("CM_CREATE_DEVNODE_GENERATE_ID support not implemented yet!\n", ret); + ret = CR_CALL_NOT_IMPLEMENTED; + goto done; + } + + /* Create the device instance */ + ret = CreateDeviceInstance(pszDeviceID); + +done:; + DPRINT("PNP_CreateDevInst() done (returns %lx)\n", ret); + + return ret; } @@ -1886,7 +2394,6 @@ PNP_RunDetection( handle_t hBinding, DWORD ulFlags) { - UNIMPLEMENTED; return CR_CALL_NOT_IMPLEMENTED; } @@ -2076,8 +2583,6 @@ DWORD PNP_DeleteServiceDevices( static BOOL InstallDevice(PCWSTR DeviceInstance, BOOL ShowWizard) { - PLUGPLAY_CONTROL_STATUS_DATA PlugPlayData; - NTSTATUS Status; BOOL DeviceInstalled = FALSE; DWORD BytesWritten; DWORD Value; @@ -2086,6 +2591,7 @@ InstallDevice(PCWSTR DeviceInstance, BOOL ShowWizard) PROCESS_INFORMATION ProcessInfo; STARTUPINFOW StartupInfo; UUID RandomUuid; + HKEY DeviceKey; /* The following lengths are constant (see below), they cannot overflow */ WCHAR CommandLine[116]; @@ -2097,26 +2603,28 @@ InstallDevice(PCWSTR DeviceInstance, BOOL ShowWizard) ZeroMemory(&ProcessInfo, sizeof(ProcessInfo)); - RtlInitUnicodeString(&PlugPlayData.DeviceInstance, - DeviceInstance); - PlugPlayData.Operation = 0; /* Get status */ - - /* Get device status */ - Status = NtPlugPlayControl(PlugPlayControlDeviceStatus, - (PVOID)&PlugPlayData, - sizeof(PLUGPLAY_CONTROL_STATUS_DATA)); - if (!NT_SUCCESS(Status)) + if (RegOpenKeyExW(hEnumKey, + DeviceInstance, + 0, + KEY_QUERY_VALUE, + &DeviceKey) == ERROR_SUCCESS) { - DPRINT1("NtPlugPlayControl('%S') failed with status 0x%08lx\n", DeviceInstance, Status); - return FALSE; + if (RegQueryValueExW(DeviceKey, + L"ClassGUID", + NULL, + NULL, + NULL, + NULL) == ERROR_SUCCESS) + { + DPRINT("No need to install: %S\n", DeviceInstance); + RegCloseKey(DeviceKey); + return TRUE; + } + + RegCloseKey(DeviceKey); } - if ((PlugPlayData.DeviceStatus & (DNF_STARTED | DNF_START_FAILED)) != 0) - { - /* Device is already started, or disabled due to some problem. Don't install it */ - DPRINT("No need to install '%S'\n", DeviceInstance); - return TRUE; - } + DPRINT1("Installing: %S\n", DeviceInstance); /* Create a random UUID for the named pipe */ UuidCreate(&RandomUuid); @@ -2222,6 +2730,8 @@ cleanup: if(ProcessInfo.hThread) CloseHandle(ProcessInfo.hThread); + DPRINT1("Success? %d\n", DeviceInstalled); + return DeviceInstalled; } @@ -2430,7 +2940,7 @@ PnpEventThread(LPVOID lpParameter) DWORD len; DWORD DeviceIdLength; - DPRINT("Device enumerated: %S\n", PnpEvent->TargetDevice.DeviceIds); + DPRINT1("Device enumerated: %S\n", PnpEvent->TargetDevice.DeviceIds); DeviceIdLength = lstrlenW(PnpEvent->TargetDevice.DeviceIds); if (DeviceIdLength) @@ -2452,9 +2962,33 @@ PnpEventThread(LPVOID lpParameter) } else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) { - DPRINT("Device arrival: %S\n", PnpEvent->TargetDevice.DeviceIds); + DPRINT1("Device arrival: %S\n", PnpEvent->TargetDevice.DeviceIds); /* FIXME: ? */ } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_EJECT_VETOED, &RpcStatus)) + { + DPRINT1("Eject vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_KERNEL_INITIATED_EJECT, &RpcStatus)) + { + DPRINT1("Kernel initiated eject: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SAFE_REMOVAL, &RpcStatus)) + { + DPRINT1("Safe removal: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SURPRISE_REMOVAL, &RpcStatus)) + { + DPRINT1("Surprise removal: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVAL_VETOED, &RpcStatus)) + { + DPRINT1("Removal vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVE_PENDING, &RpcStatus)) + { + DPRINT1("Removal pending: %S\n", PnpEvent->TargetDevice.DeviceIds); + } else { DPRINT1("Unknown event, GUID {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n", diff --git a/base/setup/reactos/lang/pl-PL.rc b/base/setup/reactos/lang/pl-PL.rc index 7b1fdb25cfd..b2efea3021e 100644 --- a/base/setup/reactos/lang/pl-PL.rc +++ b/base/setup/reactos/lang/pl-PL.rc @@ -1,11 +1,12 @@ /* - * translation by xrogers - * xxrogers@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * http://rogers.cyberdusk.pl/ - * update - niski (bjauy@o2.pl) - * updated by Caemyr (Olaf Siejka), Mar 2011 - */ + * translation by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * http://rogers.cyberdusk.pl/ + * update - niski (bjauy@o2.pl) + * updated by Caemyr (Olaf Siejka), Mar 2011 + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -15,8 +16,8 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Witaj w Kreatorze instalacji ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24 - LTEXT "Nie moesz zainstalowa ReactOS bezporednio! Uruchom ponownie komputer z tej pyty, aby zainstalowa ReactOS.", IDC_STATIC, 115, 40, 195, 100 - LTEXT "Nacinij przycisk aby zakoczy prac Instalatora.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Obecnie nie możesz zainstalować ReactOS bezpośrednio! Uruchom ponownie komputer z tej płyty, aby zainstalować ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Naciśnij przycisk aby zakończyć pracę Instalatora.", IDC_STATIC, 115, 169, 195, 17 END IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 @@ -25,11 +26,11 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99 - CONTROL "Jzyk instalacji:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 + CONTROL "Język instalacji:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142 - CONTROL "Ukad klawiatury:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 + CONTROL "Układ klawiatury:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81 - LTEXT "Nacinij Dalej, aby wybra rodzaj instalacji.", IDC_STATIC, 10, 180 ,297, 10 + LTEXT "Naciśnij Dalej, aby wybrać rodzaj instalacji.", IDC_STATIC, 10, 180 ,297, 10 END IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 @@ -39,8 +40,8 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "Rodzaj instalacji", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 CONTROL "Zainstaluj ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 - CONTROL "Napraw lub zaktualizuj zainstalowany wczeniej ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 - LTEXT "Nacinij Dalej, aby zmieni ustawienia sprztu.", IDC_STATIC, 10, 180 ,297, 10 + CONTROL "Napraw lub zaktualizuj zainstalowany wcześniej ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 + LTEXT "Naciśnij Dalej, aby zmienić ustawienia sprzętu.", IDC_STATIC, 10, 180 ,297, 10 END IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 @@ -48,14 +49,14 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Ustawienia sprztu", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "Ustawienia sprzętu", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 LTEXT "Komputer:", IDC_STATIC, 20,15, 80, 10 CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 150, 80 LTEXT "Ekran:", IDC_STATIC, 20,35, 80, 10 CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 150, 80 LTEXT "Klawiatura:", IDC_STATIC, 20,55, 80, 10 CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 150, 80 - LTEXT "Nacinij Dalej, aby ustali miejsce instalacji.", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Naciśnij Dalej, aby ustalić miejsce instalacji.", IDC_STATIC, 10, 180 ,277, 20 END IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 @@ -65,24 +66,24 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "Partycja dla instalacji ReactOS", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL - PUSHBUTTON "&Stwrz", IDC_PARTCREATE, 20,155,50,15 - PUSHBUTTON "&Usu", IDC_PARTDELETE, 76,155,50,15 + PUSHBUTTON "&Stwórz", IDC_PARTCREATE, 20,155,50,15 + PUSHBUTTON "&Usuń", IDC_PARTDELETE, 76,155,50,15 PUSHBUTTON "s&terownik", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED PUSHBUTTON "&Opcje zaawansowane...", IDC_PARTMOREOPTS, 218,155,80,15 - LTEXT "Nacinij Dalej, aby rozpocz proces instalacji.", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Naciśnij Dalej, aby rozpocząć proces instalacji.", IDC_STATIC, 10, 180 ,277, 20 END IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME -CAPTION "Stwrz partycj" +CAPTION "Stwórz partycję" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_UPDOWN1,"msctls_updown32", WS_VISIBLE,104,22,9,13 - CONTROL "Stwrz i sformatuj partycj",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 + CONTROL "Stwórz i sformatuj partycję",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 LTEXT "Rozmiar:",IDC_STATIC, 13,24,27,9 EDITTEXT IDC_PARTSIZE,52,23,53,13, WS_VISIBLE|WS_TABSTOP LTEXT "GB",IDC_UNIT, 117,24,14,9 - LTEXT "System plikw:",IDC_STATIC,13,46,35,9 + LTEXT "System plików:",IDC_STATIC,13,46,35,9 CONTROL "",IDC_FSTYPE,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,52,42,79,50 PUSHBUTTON "&OK",IDOK,35,68,47,15, WS_VISIBLE|WS_TABSTOP PUSHBUTTON "&Anuluj",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP @@ -100,7 +101,7 @@ BEGIN CONTROL "Wgraj bootloader na dysk twardy (MBR i VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 CONTROL "Wgraj bootloader na dysk twardy (tylko VBR)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,57,278,11 - CONTROL "Pomi wgrywanie bootloadera", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,68,278,11 + CONTROL "Pomiń wgrywanie bootloadera", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,68,278,11 PUSHBUTTON "&OK", IDOK, 180,94,50,15, WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Anuluj", IDCANCEL, 240,94,50,15, WS_TABSTOP | WS_VISIBLE END @@ -111,7 +112,7 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Podsumowanie instalacji", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT "Kliknij Dalej, aby rozpocz proces instalacji.", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Kliknij Dalej, aby rozpocząć proces instalacji.", IDC_STATIC, 10, 180 ,277, 20 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 @@ -120,7 +121,7 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Instalacja", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT "Instalacja plikw...", IDC_ACTIVITY, 20, 50, 277, 10 + LTEXT "Instalacja plików...", IDC_ACTIVITY, 20, 50, 277, 10 LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 @@ -128,34 +129,34 @@ END IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Koczenie instalacji ReactOS" +CAPTION "Kończenie instalacji ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Koczenie pierwszego etapu instalacji ReactOS", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT "Pierwszy etap instalacji ReactOS zosta pomylnie zakoczony.", IDC_STATIC, 20, 50, 277, 10 + CONTROL "Kończenie pierwszego etapu instalacji ReactOS", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Pierwszy etap instalacji ReactOS został pomyślnie zakończony.", IDC_STATIC, 20, 50, 277, 10 - LTEXT "Po klikniciu Zakocz ten komputer zostanie uruchomiony ponownie.", IDC_STATIC, 20, 80, 277, 10 + LTEXT "Po kliknięciu na Zakończ ten komputer zostanie uruchomiony ponownie.", IDC_STATIC, 20, 80, 277, 10 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 - LTEXT "Jeli w napdzie jest pyta CD, wycignij j. Nastpnie nacinij Zakocz, aby uruchomi ponownie Twj komputer.", IDC_STATIC, 10, 180, 297, 20 + LTEXT "Jeśli w napędzie jest płyta CD, wyciągnij ją. Następnie naciśnij Zakończ, aby uruchomić ponownie komputer.", IDC_STATIC, 10, 180, 297, 20 END STRINGTABLE BEGIN - IDS_LANGTITLE "Wybr jzyka" - IDS_LANGSUBTITLE "Wybierz jzyk instalacji i docelowego systemu." + IDS_LANGTITLE "Wybór języka" + IDS_LANGSUBTITLE "Wybierz język instalacji i docelowego systemu." IDS_TYPETITLE "Witamy w Instalatorze ReactOS" IDS_TYPESUBTITLE "Wybierz typ instalacji." - IDS_DEVICETITLE "Ustawienia podstawowych urzdze" - IDS_DEVICESUBTITLE "Zmie ustawienia ekranu i klawiatury." - IDS_DRIVETITLE "Ustaw partycj instalacji i folder systemowy" + IDS_DEVICETITLE "Ustawienia podstawowych urządzeń" + IDS_DEVICESUBTITLE "Zmień ustawienia ekranu i klawiatury." + IDS_DRIVETITLE "Ustaw partycję instalacji i folder systemowy" IDS_DRIVESUBTITLE "Przygotuj partycje instalacji, folder systemowy i bootloader." - IDS_PROCESSTITLE "Przygotuj partycj, skopiuj pliki i zapisz ustawienia systemu" - IDS_PROCESSSUBTITLE "Przygotuj i sformatuj partycj, skopiuj pliki, skopiuj i zainstaluj bootloader" - IDS_RESTARTTITLE "Pierwszy etap instalacji zakoczony sukcesem" - IDS_RESTARTSUBTITLE "Pierwszy etap instalacji zosta zakoczony, uruchom ponownie komputer, aby przej do drugiego etapu" + IDS_PROCESSTITLE "Przygotuj partycję, skopiuj pliki i zapisz ustawienia systemu" + IDS_PROCESSSUBTITLE "Przygotuj i sformatuj partycję, skopiuj pliki, skopiuj i zainstaluj bootloader" + IDS_RESTARTTITLE "Pierwszy etap instalacji zakończony sukcesem" + IDS_RESTARTSUBTITLE "Pierwszy etap instalacji został zakończony, uruchom ponownie komputer, aby przejść do drugiego etapu" IDS_SUMMARYTITLE "Podsumowanie instalacji" - IDS_SUMMARYSUBTITLE "Sprawd ustawienia instalacji przed dokonaniem zmian na dysku" - IDS_ABORTSETUP "Instalacja ReactOS nie zostaa ukoczona na tym komputerze. Jeli teraz zakoczysz instalacj, bdziesz musia uruchomi Instalator ponownie, aby zainstalowa Reactos. Na pewno zakoczy?" - IDS_ABORTSETUP2 "Przerwa instalacj?" + IDS_SUMMARYSUBTITLE "Sprawdź ustawienia instalacji przed dokonaniem zmian na dysku" + IDS_ABORTSETUP "Instalacja ReactOS nie została ukończona na tym komputerze. Jeśli teraz zakończysz instalację, będziesz musiał uruchomić Instalator ponownie, aby zainstalować Reactos. Na pewno zakończyć?" + IDS_ABORTSETUP2 "Przerwać instalację?" END /* EOF */ diff --git a/base/setup/reactos/lang/ru-RU.rc b/base/setup/reactos/lang/ru-RU.rc index c50cc7392f8..ff10bb026a6 100644 --- a/base/setup/reactos/lang/ru-RU.rc +++ b/base/setup/reactos/lang/ru-RU.rc @@ -4,65 +4,65 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24 - LTEXT " ReactOS ! CD ReactOS.", IDC_STATIC, 115, 40, 195, 100 - LTEXT " ""W"" .", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Вас приветствует программа установки ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24 + LTEXT "Установку ReactOS можно производить только загрузившись с этого диска! После перезапуска компьютера выберите загрузку с CD и начните установку ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Нажмите кнопку ""ЗавершитьW"" для выхода.", IDC_STATIC, 115, 169, 195, 17 END IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99 - CONTROL " :", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 + CONTROL "Язык системы:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142 - CONTROL " :", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 + CONTROL "Раскладка клавиатуры:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81 - LTEXT " """".", IDC_STATIC, 10, 180 ,297, 10 + LTEXT "Для выбора типа установки нажмите ""Далее"".", IDC_STATIC, 10, 180 ,297, 10 END IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 - CONTROL " ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 - CONTROL " ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 - LTEXT " """".", IDC_STATIC, 10, 180 ,297, 10 + CONTROL "Тип установки", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "Установка ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 + CONTROL "Восстановить или изменить установленный ранее ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 + LTEXT "Для установки устройств нажмите ""Далее"".", IDC_STATIC, 10, 180 ,297, 10 END IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT ":", IDC_STATIC, 20,15, 80, 10 + CONTROL "Основные устройства", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Компьтер:", IDC_STATIC, 20,15, 80, 10 CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 150, 80 - LTEXT ":", IDC_STATIC, 20,35, 80, 10 + LTEXT "Экран:", IDC_STATIC, 20,35, 80, 10 CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 150, 80 - LTEXT ":", IDC_STATIC, 20,55, 80, 10 + LTEXT "Клавиатура:", IDC_STATIC, 20,55, 80, 10 CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 150, 80 - LTEXT " """".", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Для установки устройств нажмите ""Далее"".", IDC_STATIC, 10, 180 ,277, 20 END IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ReactOS", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 + CONTROL "Разделы для установки ReactOS", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL - PUSHBUTTON "&", IDC_PARTCREATE, 20,155,50,15 - PUSHBUTTON "&", IDC_PARTDELETE, 76,155,50,15 - PUSHBUTTON "&", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED - PUSHBUTTON "& ...", IDC_PARTMOREOPTS, 176,155,122,15 - LTEXT " """".", IDC_STATIC, 10, 180 ,277, 20 + PUSHBUTTON "&Создать", IDC_PARTCREATE, 20,155,50,15 + PUSHBUTTON "&Удалить", IDC_PARTDELETE, 76,155,50,15 + PUSHBUTTON "Д&райвер", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED + PUSHBUTTON "&Дополнительные параметры...", IDC_PARTMOREOPTS, 176,155,122,15 + LTEXT "Для начала установки нажмите ""Далее"".", IDC_STATIC, 10, 180 ,277, 20 END IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 @@ -71,49 +71,49 @@ CAPTION "Create Partition" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_UPDOWN1,"msctls_updown32", WS_VISIBLE,104,22,9,13 - CONTROL " ",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 - LTEXT ":",IDC_STATIC, 13,24,27,9 + CONTROL "Создать и отформатировать раздел диска",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 + LTEXT "Размер:",IDC_STATIC, 13,24,27,9 EDITTEXT IDC_PARTSIZE,52,23,53,13, WS_VISIBLE|WS_TABSTOP - LTEXT "",IDC_UNIT, 117,24,14,9 - LTEXT " :",IDC_STATIC,13,46,35,9 + LTEXT "Гб",IDC_UNIT, 117,24,14,9 + LTEXT "Файловая система:",IDC_STATIC,13,46,35,9 CONTROL "",IDC_FSTYPE,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,52,42,79,50 - PUSHBUTTON "&",IDOK,35,68,47,15, WS_VISIBLE|WS_TABSTOP - PUSHBUTTON "&",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP + PUSHBUTTON "&Есть",IDOK,35,68,47,15, WS_VISIBLE|WS_TABSTOP + PUSHBUTTON "&Отставить",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME -CAPTION " " +CAPTION "Дополнительные параметры установки" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 + CONTROL "Базовый каталог", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 EDITTEXT IDC_PATH, 10,12,283,14, WS_VISIBLE - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,52 + CONTROL "Установка загрузчика", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,52 - CONTROL " (MBR VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,49,278,11 - CONTROL " ( VBR)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,57,278,11 - CONTROL " ", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,68,278,11 + CONTROL "Установить загрузчик на диск (MBR и VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,49,278,11 + CONTROL "Установить загрузчик на диск (только VBR)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,57,278,11 + CONTROL "Не устанавливать загрузчик", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,68,278,11 PUSHBUTTON "&OK", IDOK, 180,94,50,15, WS_TABSTOP | WS_VISIBLE - PUSHBUTTON "&", IDCANCEL, 240,94,50,15, WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "&Отмена", IDCANCEL, 240,94,50,15, WS_TABSTOP | WS_VISIBLE END IDD_SUMMARYPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Installation summary", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT " """".", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Для начала установки нажмите ""Далее"".", IDC_STATIC, 10, 180 ,277, 20 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT " ...", IDC_ACTIVITY, 20, 50, 277, 10 + CONTROL "Производится установка", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Копирование файлов...", IDC_ACTIVITY, 20, 50, 277, 10 LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 @@ -121,34 +121,34 @@ END IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Завершение установки ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ReactOS", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT " ReactOS .", IDC_STATIC, 20, 50, 277, 10 + CONTROL "Завершение первого этапа установки ReactOS", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Первый этап установки ReactOS закончен.", IDC_STATIC, 20, 50, 277, 10 - LTEXT " """" .", IDC_STATIC, 20, 80, 277, 10 + LTEXT "После нажатия клавиши ""Завершить"" ваш компьютер будет перезагружен.", IDC_STATIC, 20, 80, 277, 10 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 - LTEXT " . """".", IDC_STATIC, 10, 176, 297, 20 + LTEXT "Вы можете извлечь установочный диск. Для перезагрузки компьютера нажмите клавишу ""Завершить"".", IDC_STATIC, 10, 176, 297, 20 END STRINGTABLE BEGIN - IDS_LANGTITLE " " - IDS_LANGSUBTITLE " ." - IDS_TYPETITLE " ReactOS" - IDS_TYPESUBTITLE " ." - IDS_DEVICETITLE " " - IDS_DEVICESUBTITLE " ." - IDS_DRIVETITLE " " - IDS_DRIVESUBTITLE " , ." - IDS_PROCESSTITLE " , " - IDS_PROCESSSUBTITLE " , , " - IDS_RESTARTTITLE " " - IDS_RESTARTSUBTITLE " , " + IDS_LANGTITLE "Выбор языка" + IDS_LANGSUBTITLE "Выберите язык по умолчанию в системе." + IDS_TYPETITLE "Вас приветствует программа установки ReactOS" + IDS_TYPESUBTITLE "Выберите тип установки." + IDS_DEVICETITLE "Установка базовых устройств" + IDS_DEVICESUBTITLE "Настройка параметров экрана и клавиатуры." + IDS_DRIVETITLE "Выбор расположения на диске и системного каталога" + IDS_DRIVESUBTITLE "Подготовка раздела диска, системного каталога и загрузчика." + IDS_PROCESSTITLE "Подготовка раздела диска, копирование системных файлов" + IDS_PROCESSSUBTITLE "Создание раздела на диске, копирование файлов, установка загрузчика" + IDS_RESTARTTITLE "Первый этап установки закончен" + IDS_RESTARTSUBTITLE "Первый этап закончен, для продолжения требуется перезагрузка" IDS_SUMMARYTITLE "Installation Summary" IDS_SUMMARYSUBTITLE "List installation properties to check before apply to the installation device" - IDS_ABORTSETUP "ReactOS . , ReactOS. , ?" - IDS_ABORTSETUP2 " ?" + IDS_ABORTSETUP "ReactOS установлен на компьютер не полностью. Если вы закроете программу установки сейчас, в дальнейшем вам придется повторить установку ReactOS. Вы уверены, что необходимо прервать установку?" + IDS_ABORTSETUP2 "Прервать установку?" END /* EOF */ diff --git a/base/setup/reactos/lang/uk-UA.rc b/base/setup/reactos/lang/uk-UA.rc index 7e52e71b499..a2c9e1c1b7b 100644 --- a/base/setup/reactos/lang/uk-UA.rc +++ b/base/setup/reactos/lang/uk-UA.rc @@ -10,116 +10,116 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24 - LTEXT " ReactOS CD! CD , ReactOS.", IDC_STATIC, 115, 40, 195, 100 - LTEXT " .", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Вас вітає програма встановлення ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24 + LTEXT "Ви не можете встановити ReactOS прямо з цього CD! Будь ласка перезапустіть Ваш комп’ютер з цього CD для того, щоб встановити ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Натисніть кнопку Завершити для виходу.", IDC_STATIC, 115, 169, 195, 17 END IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99 - CONTROL " :", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 + CONTROL "Мова системи:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142 - CONTROL " :", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 + CONTROL "Розкладка клавіатури:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81 - LTEXT " .", IDC_STATIC, 10, 180 ,297, 10 + LTEXT "Для вибору типу встановлення натисніть Далі.", IDC_STATIC, 10, 180 ,297, 10 END IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 - CONTROL " ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 - CONTROL "³ ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 - LTEXT " .", IDC_STATIC, 10, 180 ,297, 10 + CONTROL "Тип встановлення", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "Встановлення ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 + CONTROL "Відновити або змінити встановлений раніше ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 + LTEXT "Для встановлення пристроїв натисніть Далі.", IDC_STATIC, 10, 180 ,297, 10 END IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT ":", IDC_STATIC, 20,15, 80, 10 + CONTROL "Основні пристрої", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Комп’ютер:", IDC_STATIC, 20,15, 80, 10 CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 180, 80 - LTEXT ":", IDC_STATIC, 20,35, 80, 10 + LTEXT "Екран:", IDC_STATIC, 20,35, 80, 10 CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 180, 80 - LTEXT ":", IDC_STATIC, 20,55, 80, 10 + LTEXT "Клавіатура:", IDC_STATIC, 20,55, 80, 10 CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 180, 80 - LTEXT " .", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Для встановлення пристроїв натисніть Далі.", IDC_STATIC, 10, 180 ,277, 20 END IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ReactOS", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 + CONTROL "Розділи для встановлення ReactOS", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL - PUSHBUTTON "&", IDC_PARTCREATE, 20,155,50,15 - PUSHBUTTON "&", IDC_PARTDELETE, 76,155,50,15 - PUSHBUTTON "&", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED - PUSHBUTTON "& ...", IDC_PARTMOREOPTS, 218,155,80,15 - LTEXT " ", IDC_STATIC, 10, 180 ,277, 20 + PUSHBUTTON "&Створити", IDC_PARTCREATE, 20,155,50,15 + PUSHBUTTON "&Видалити", IDC_PARTDELETE, 76,155,50,15 + PUSHBUTTON "Д&райвер", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED + PUSHBUTTON "&Додаткові Опції...", IDC_PARTMOREOPTS, 218,155,80,15 + LTEXT "Для початку встановлення натисніть Далі", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 +IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 172, 90 STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME -CAPTION " " +CAPTION "Створення розділу" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "",IDC_UPDOWN1,"msctls_updown32", WS_VISIBLE,104,22,9,13 - CONTROL " ",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 - LTEXT ":",IDC_STATIC, 13,24,27,9 - EDITTEXT IDC_PARTSIZE,52,23,53,13, WS_VISIBLE|WS_TABSTOP - LTEXT "",IDC_UNIT, 117,24,14,9 - LTEXT " :",IDC_STATIC,13,46,35,9 - CONTROL "",IDC_FSTYPE,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,52,42,79,50 + CONTROL "",IDC_UPDOWN1,"msctls_updown32", WS_VISIBLE,131,22,9,13 + CONTROL "Створити та відформатувати розділ",IDC_STATIC,"Button",BS_GROUPBOX,7,5,156,57 + LTEXT "Розмір:",IDC_STATIC, 13,24,27,9 + EDITTEXT IDC_PARTSIZE,79,23,53,13, WS_VISIBLE|WS_TABSTOP + LTEXT "Гб",IDC_UNIT, 144,24,14,9 + LTEXT "Файлова система:",IDC_STATIC,13,46,65,9 + CONTROL "",IDC_FSTYPE,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,79,42,79,50 PUSHBUTTON "&OK",IDOK,35,68,47,15, WS_VISIBLE|WS_TABSTOP - PUSHBUTTON "&",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP + PUSHBUTTON "&Скасувати",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME -CAPTION " " +CAPTION "Розширені параметри розділу" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 + CONTROL "Тека встановлення", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 EDITTEXT IDC_PATH, 10,11,278,13, WS_VISIBLE - CONTROL " ", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,52 + CONTROL "Встановлення завантажувача", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,52 - CONTROL " (MBR VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 - CONTROL " ( VBR)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,57,278,11 - CONTROL " ", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,68,278,11 + CONTROL "Встановити завантажувач на жосткий диск (MBR та VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 + CONTROL "Встановити завантажувач на жосткий диск (лише VBR)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,57,278,11 + CONTROL "Не встановлювати завантажувач", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,68,278,11 PUSHBUTTON "&OK", IDOK, 180,94,50,15, WS_TABSTOP | WS_VISIBLE - PUSHBUTTON "&", IDCANCEL, 240,94,50,15, WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "&Скасувати", IDCANCEL, 240,94,50,15, WS_TABSTOP | WS_VISIBLE END IDD_SUMMARYPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT " .", IDC_STATIC, 10, 180 ,277, 20 + CONTROL "Інформація про Встановлення", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Для початку встановлення натисніть Далі.", IDC_STATIC, 10, 180 ,277, 20 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT " ...", IDC_ACTIVITY, 20, 50, 277, 10 + CONTROL "Виконується встановлення", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Копіювання файлів...", IDC_ACTIVITY, 20, 50, 277, 10 LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 @@ -127,34 +127,34 @@ END IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Завершення встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ReactOS", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT " ReactOS .", IDC_STATIC, 20, 50, 277, 10 + CONTROL "Завершення першого етапу встановлення ReactOS", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Перший етап встановлення ReactOS завершено.", IDC_STATIC, 20, 50, 277, 10 - LTEXT "ϳ ' .", IDC_STATIC, 20, 80, 277, 10 + LTEXT "Після натискання клавіші Завершити ваш комп'ютер буде перезавантажений.", IDC_STATIC, 20, 80, 277, 10 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 - LTEXT " . ' ", IDC_STATIC, 10, 180, 297, 20 + LTEXT "Ви можете витягнути інсталяційний диск. Для перезавантаження комп'ютера натисніть Завершити", IDC_STATIC, 10, 180, 297, 20 END STRINGTABLE BEGIN - IDS_LANGTITLE " " - IDS_LANGSUBTITLE " ." - IDS_TYPETITLE " ReactOS" - IDS_TYPESUBTITLE " ." - IDS_DEVICETITLE " " - IDS_DEVICESUBTITLE " ." - IDS_DRIVETITLE " " - IDS_DRIVESUBTITLE "ϳ , ." - IDS_PROCESSTITLE "ϳ , " - IDS_PROCESSSUBTITLE " , , " - IDS_RESTARTTITLE " " - IDS_RESTARTSUBTITLE " , " - IDS_SUMMARYTITLE " " - IDS_SUMMARYSUBTITLE " , " - IDS_ABORTSETUP "ReactOS ' . , ReactOS. , ?" - IDS_ABORTSETUP2 " ?" + IDS_LANGTITLE "Вибір мови" + IDS_LANGSUBTITLE "Виберіть мову за замовчуванням в системі." + IDS_TYPETITLE "Вас вітає програма встановлення ReactOS" + IDS_TYPESUBTITLE "Виберіть тип встановлення." + IDS_DEVICETITLE "Встановлення базових пристроїв" + IDS_DEVICESUBTITLE "Налаштування параметрів екрану та клавіатури." + IDS_DRIVETITLE "Вибір розташування на диску і системного каталогу" + IDS_DRIVESUBTITLE "Підготовка розділу диска, системного каталогу та завантажувача." + IDS_PROCESSTITLE "Підготовка розділу диска, копіювання системних файлів" + IDS_PROCESSSUBTITLE "Створення розділу на диску, копіювання файлів, встановлення завантажувача" + IDS_RESTARTTITLE "Перший етап встановлення завершено" + IDS_RESTARTSUBTITLE "Перший етап завершено, для продовження потрібне перезавантаження" + IDS_SUMMARYTITLE "Інформація про Встановлення" + IDS_SUMMARYSUBTITLE "Перевірте список властивостей встановлення, перш ніж почати встановлення системи" + IDS_ABORTSETUP "ReactOS встановлений на комп'ютер не повністю. Якщо ви закриєте програму встановлення зараз, в подальшому вам доведеться повторити встановлення ReactOS. Ви впевнені, що необхідно перервати встановлення?" + IDS_ABORTSETUP2 "Перервати встановлення?" END /* EOF */ diff --git a/base/setup/reactos/rsrc.rc b/base/setup/reactos/rsrc.rc index 26c598ebebc..5b28b84f20b 100644 --- a/base/setup/reactos/rsrc.rc +++ b/base/setup/reactos/rsrc.rc @@ -18,12 +18,15 @@ #include "lang/lt-LT.rc" #include "lang/nl-NL.rc"*/ #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" /*#include "lang/sv-SE.rc" #include "lang/th-TH.rc"*/ -#include "lang/uk-UA.rc" //#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/setup/usetup/CMakeLists.txt b/base/setup/usetup/CMakeLists.txt index a0f6410702c..bdc96518df0 100644 --- a/base/setup/usetup/CMakeLists.txt +++ b/base/setup/usetup/CMakeLists.txt @@ -31,17 +31,11 @@ add_executable(usetup usetup.rc) target_link_libraries(usetup - mingw_main zlib inflib ext2lib - vfatlib - mingw_common) - -if(MSVC) - target_link_libraries(usetup msvcsup) -endif() + vfatlib) set_module_type(usetup nativecui) -add_importlibs(usetup kernel32 ntdll) -add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd) +add_importlibs(usetup ntdll) +add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd regtest) diff --git a/base/setup/usetup/bootsup.c b/base/setup/usetup/bootsup.c index 3f880c97feb..3f6c8a77b9b 100644 --- a/base/setup/usetup/bootsup.c +++ b/base/setup/usetup/bootsup.c @@ -513,18 +513,6 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath, L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /RDIMAGEPATH=reactos.img /RDIMAGEOFFSET=32256"); #endif - /* ReactOS_old */ - CreateFreeLoaderEntry(IniCache, IniSection, - L"ReactOS_old", L"\"ReactOS (old boot method)\"", - L"ReactOS", ArcPath, - L""); - - /* ReactOS_Debug_old */ - CreateFreeLoaderEntry(IniCache, IniSection, - L"ReactOS_Debug_old", L"\"ReactOS (Debug, old boot method)\"", - L"ReactOS", ArcPath, - L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS"); - /* Save the ini file */ IniCacheSave(IniCache, IniPath); IniCacheDestroy(IniCache); @@ -2251,7 +2239,7 @@ InstallVBRToPartition(PUNICODE_STRING SystemRootPath, DestinationArcPath, PartitionType); } - + return STATUS_UNSUCCESSFUL; } diff --git a/base/setup/usetup/fslist.c b/base/setup/usetup/fslist.c index 88fa241a458..93db77c6da1 100644 --- a/base/setup/usetup/fslist.c +++ b/base/setup/usetup/fslist.c @@ -172,11 +172,11 @@ DrawFileSystemList( if (ListEntry == &List->Selected->ListEntry) CONSOLE_SetInvertedTextXY(List->Left, - List->Top + Index, + List->Top + (SHORT)Index, Buffer); else CONSOLE_SetTextXY(List->Left, - List->Top + Index, + List->Top + (SHORT)Index, Buffer); Index++; ListEntry = ListEntry->Flink; diff --git a/base/setup/usetup/inffile.c b/base/setup/usetup/inffile.c index 71c01088152..77acebc470b 100644 --- a/base/setup/usetup/inffile.c +++ b/base/setup/usetup/inffile.c @@ -75,7 +75,7 @@ InfpOpenInfFileW( Status = InfOpenFile( &hInf, &FileNameU, - LocaleId, + LANGIDFROMLCID(LocaleId), &ErrorLineUL); *ErrorLine = (UINT)ErrorLineUL; if (!NT_SUCCESS(Status)) @@ -197,7 +197,7 @@ INF_OpenBufferedFileA( &hInf, FileBuffer, FileSize, - LocaleId, + LANGIDFROMLCID(LocaleId), &ErrorLineUL); *ErrorLine = (UINT)ErrorLineUL; if (!NT_SUCCESS(Status)) diff --git a/base/setup/usetup/interface/devinst.c b/base/setup/usetup/interface/devinst.c index 8ea6444d2f0..703a4cbb7b8 100644 --- a/base/setup/usetup/interface/devinst.c +++ b/base/setup/usetup/interface/devinst.c @@ -65,6 +65,8 @@ InstallDriver( /* Find associated driver name */ /* FIXME: check in other sections too! */ if (!SetupFindFirstLineW(hInf, L"BootBusExtenders.Load", Driver, &Context) + && !SetupFindFirstLineW(hInf, L"BusExtenders.Load", Driver, &Context) + && !SetupFindFirstLineW(hInf, L"SCSI.Load", Driver, &Context) && !SetupFindFirstLineW(hInf, L"Keyboard.Load", Driver, &Context)) return FALSE; if (!INF_GetDataField(&Context, 1, &ImagePath)) @@ -81,7 +83,7 @@ InstallDriver( RtlCopyMemory(FullImagePath, PathPrefix.Buffer, PathPrefix.MaximumLength); wcscat(FullImagePath, ImagePath); - DPRINT("Using driver '%S' for device '%S'\n", ImagePath, DeviceId); + DPRINT1("Using driver '%S' for device '%S'\n", ImagePath, DeviceId); /* Create service key */ RtlInitUnicodeString(&StringU, Driver); diff --git a/base/setup/usetup/interface/usetup.c b/base/setup/usetup/interface/usetup.c index e839735065a..4e551430f1a 100644 --- a/base/setup/usetup/interface/usetup.c +++ b/base/setup/usetup/interface/usetup.c @@ -1404,7 +1404,7 @@ IsDiskSizeValid(PPARTENTRY PartEntry) ULONGLONG m1, m2; /* check for unpartitioned space */ - m1 = PartEntry->UnpartitionedLength; + m1 = PartEntry->UnpartitionedLength; m1 = (m1 + (1 << 19)) >> 20; /* in MBytes (rounded) */ if( m1 > RequiredPartitionDiskSpace) @@ -2450,75 +2450,6 @@ FormatPartitionPage(PINPUT_RECORD Ir) CheckActiveBootPartition(PartitionList); } - if (wcscmp(FileSystemList->Selected->FileSystem, L"FAT") == 0) - { - /* FIXME: Install boot code. This is a hack! */ - if ((PartEntry->PartInfo[PartNum].PartitionType == PARTITION_FAT32_XINT13) || - (PartEntry->PartInfo[PartNum].PartitionType == PARTITION_FAT32)) - { - wcscpy(PathBuffer, SourceRootPath.Buffer); - wcscat(PathBuffer, L"\\loader\\fat32.bin"); - - DPRINT("Install FAT32 bootcode: %S ==> %S\n", PathBuffer, - DestinationRootPath.Buffer); - - Status = InstallFat32BootCodeToDisk(PathBuffer, - DestinationRootPath.Buffer); - if (!NT_SUCCESS(Status)) - { - DPRINT1("InstallFat32BootCodeToDisk() failed with status 0x%08lx\n", Status); - /* FIXME: show an error dialog */ - DestroyFileSystemList(FileSystemList); - FileSystemList = NULL; - return QUIT_PAGE; - } - } - else - { - wcscpy(PathBuffer, SourceRootPath.Buffer); - wcscat(PathBuffer, L"\\loader\\fat.bin"); - - DPRINT("Install FAT bootcode: %S ==> %S\n", PathBuffer, - DestinationRootPath.Buffer); - - Status = InstallFat16BootCodeToDisk(PathBuffer, - DestinationRootPath.Buffer); - if (!NT_SUCCESS(Status)) - { - DPRINT1("InstallFat16BootCodeToDisk() failed with status 0x%.08x\n", Status); - /* FIXME: show an error dialog */ - DestroyFileSystemList(FileSystemList); - FileSystemList = NULL; - return QUIT_PAGE; - } - } - } - else if (wcscmp(FileSystemList->Selected->FileSystem, L"EXT2") == 0) - { - wcscpy(PathBuffer, SourceRootPath.Buffer); - wcscat(PathBuffer, L"\\loader\\ext2.bin"); - - DPRINT("Install EXT2 bootcode: %S ==> %S\n", PathBuffer, - DestinationRootPath.Buffer); - - Status = InstallFat32BootCodeToDisk(PathBuffer, - DestinationRootPath.Buffer); - if (!NT_SUCCESS(Status)) - { - DPRINT1("InstallFat32BootCodeToDisk() failed with status 0x%08lx\n", Status); - /* FIXME: show an error dialog */ - DestroyFileSystemList(FileSystemList); - FileSystemList = NULL; - return QUIT_PAGE; - } - } - else if (FileSystemList->Selected->FormatFunc) - { - DestroyFileSystemList(FileSystemList); - FileSystemList = NULL; - return QUIT_PAGE; - } - #ifndef NDEBUG CONSOLE_SetStatusText(" Done. Press any key ..."); CONSOLE_ConInKey(Ir); @@ -3606,10 +3537,10 @@ BootLoaderHarddiskVbrPage(PINPUT_RECORD Ir) { UCHAR PartitionType; NTSTATUS Status; - + PartitionType = PartitionList->ActiveBootPartition-> PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionType; - + Status = InstallVBRToPartition(&SystemRootPath, &SourceRootPath, &DestinationArcPath, @@ -3619,7 +3550,7 @@ BootLoaderHarddiskVbrPage(PINPUT_RECORD Ir) MUIDisplayError(ERROR_WRITE_BOOT, Ir, POPUP_WAIT_ENTER); return QUIT_PAGE; } - + return SUCCESS_PAGE; } @@ -3649,10 +3580,10 @@ BootLoaderHarddiskMbrPage(PINPUT_RECORD Ir) swprintf(DestinationDevicePathBuffer, L"\\Device\\Harddisk%d\\Partition0", PartitionList->ActiveBootDisk->DiskNumber); - + wcscpy(SourceMbrPathBuffer, SourceRootPath.Buffer); wcscat(SourceMbrPathBuffer, L"\\loader\\dosmbr.bin"); - + DPRINT("Install MBR bootcode: %S ==> %S\n", SourceMbrPathBuffer, DestinationDevicePathBuffer); @@ -3936,7 +3867,7 @@ RunUSetup(VOID) case BOOT_LOADER_HARDDISK_MBR_PAGE: Page = BootLoaderHarddiskMbrPage(&Ir); break; - + case BOOT_LOADER_HARDDISK_VBR_PAGE: Page = BootLoaderHarddiskVbrPage(&Ir); break; diff --git a/base/setup/usetup/lang/it-IT.h b/base/setup/usetup/lang/it-IT.h index 2f6329f404e..f68d66bc240 100644 --- a/base/setup/usetup/lang/it-IT.h +++ b/base/setup/usetup/lang/it-IT.h @@ -382,7 +382,7 @@ static MUI_ENTRY itITDevicePageEntries[] = { 3, 14, - "Layout di tastiera:", + " Layout di tastiera:", TEXT_STYLE_NORMAL }, { diff --git a/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h index 7e3ad8aaf5a..97cf395ec73 100644 --- a/base/setup/usetup/lang/pl-PL.h +++ b/base/setup/usetup/lang/pl-PL.h @@ -266,7 +266,7 @@ static MUI_ENTRY plPLLicensePageEntries[] = { 8, 11, - "oprogramowanie, bdce czsci system ReactOS podlega wic", + "oprogramowanie, bdce czci systemu ReactOS podlega wic", TEXT_STYLE_NORMAL }, { @@ -332,7 +332,7 @@ static MUI_ENTRY plPLLicensePageEntries[] = { 8, 25, - "dotyczce kopiowania w rdach. Nie ma ADNEJ gwarancji", + "dotyczce kopiowania w rdach. Nie ma ADNEJ gwarancji", TEXT_STYLE_NORMAL }, { @@ -717,7 +717,7 @@ static MUI_ENTRY plPLSuccessPageEntries[] = { 10, 8, - "Upewnij si ze w Napdzie A: nie ma dyskietki i", + "Upewnij si e w Napdzie A: nie ma dyskietki i", TEXT_STYLE_NORMAL }, { @@ -902,7 +902,7 @@ static MUI_ENTRY plPLInstallDirectoryEntries[] = { 6, 9, - "katalog do ktrego chcesz zainstalowa system ReactOS:", + "katalog, do ktrego chcesz zainstalowa system ReactOS:", TEXT_STYLE_NORMAL }, { @@ -1334,7 +1334,7 @@ MUI_ERROR plPLErrorEntries[] = }, { //ERROR_LOAD_COMPUTER, - "Instalator nie mg zaadowa listy typw komputea\ra.\n", + "Instalator nie mg zaadowa listy typw komputera.\n", "ENTER = Restart komputera" }, { @@ -1415,7 +1415,7 @@ MUI_ERROR plPLErrorEntries[] = }, { //ERROR_INITIALIZE_REGISTRY, - "Instalator nie by w stanie ustawic inicjalizacji rejestru.", + "Instalator nie by w stanie ustawi inicjalizacji rejestru.", "ENTER = Restart komputera" }, { @@ -1617,7 +1617,7 @@ MUI_STRING plPLStrings[] = {STRING_CHOOSENEWPARTITION, "Wybrane: utworzenie nowej partycji na"}, {STRING_HDDSIZE, - "Prosz wprowadzi rozmiar nowej partycji, w megabajtach."}, + "Prosz wprowadzi rozmiar nowej partycji w megabajtach."}, {STRING_CREATEPARTITION, " ENTER = Utworzenie Partycji ESC = Anulowanie F3 = Wyjcie"}, {STRING_PARTFORMAT, @@ -1633,7 +1633,7 @@ MUI_STRING plPLStrings[] = {STRING_REBOOTCOMPUTER, "ENTER = Restart komputera"}, {STRING_TXTSETUPFAILED, - "Instalator nie by w stanie odnale sekji '%S'\nw pliku TXTSETUP.SIF.\n"}, + "Instalator nie by w stanie odnale sekcji '%S'\nw pliku TXTSETUP.SIF.\n"}, {STRING_COPYING, " Kopiowanie plikw: %S"}, {STRING_SETUPCOPYINGFILES, @@ -1651,15 +1651,15 @@ MUI_STRING plPLStrings[] = {STRING_CODEPAGEINFOUPDATE, " Dodawanie informacji o stronie kodowej do rejestru..."}, {STRING_DONE, - " Ukoczone..."}, + " Ukoczone..."}, {STRING_REBOOTCOMPUTER2, " ENTER = Restart komputera"}, {STRING_CONSOLEFAIL1, "Otwarcie konsoli nieudane\n\n"}, {STRING_CONSOLEFAIL2, - "Najczstsz tego przyczyn jest uycie klawiatury USB,\n"}, + "Najczstsz tego przyczyn jest uycie klawiatury USB.\n"}, {STRING_CONSOLEFAIL3, - "ktre nie s w peni obsugiwane.\n"}, + "Nie s obecnie w peni obsugiwane.\n"}, {STRING_FORMATTINGDISK, "Instalator formatuje twj dysk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/partlist.c b/base/setup/usetup/partlist.c index 52a0259d99e..5109cafef43 100644 --- a/base/setup/usetup/partlist.c +++ b/base/setup/usetup/partlist.c @@ -1612,7 +1612,7 @@ SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber) PPARTENTRY PartEntry; PLIST_ENTRY Entry1; PLIST_ENTRY Entry2; - ULONG i; + UCHAR i; /* Check for empty disks */ if (IsListEmpty (&List->DiskListHead)) @@ -1965,7 +1965,7 @@ CreateNewPartition (PPARTLIST List, PartEntry->PartInfo[0].StartingOffset.QuadPart = PartEntry->UnpartitionedOffset + DiskEntry->TrackSize; PartEntry->PartInfo[0].HiddenSectors = - PartEntry->PartInfo[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector; + (ULONG)(PartEntry->PartInfo[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector); PartEntry->PartInfo[0].PartitionLength.QuadPart = PartEntry->UnpartitionedLength - DiskEntry->TrackSize; PartEntry->PartInfo[0].PartitionType = PARTITION_ENTRY_UNUSED; @@ -1996,7 +1996,7 @@ CreateNewPartition (PPARTLIST List, PrevPartEntry->PartInfo[1].StartingOffset.QuadPart = PartEntry->PartInfo[0].StartingOffset.QuadPart - DiskEntry->TrackSize; PrevPartEntry->PartInfo[1].HiddenSectors = - PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector; + (ULONG)(PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector); if (DiskEntry->PartListHead.Flink == &PrevPartEntry->ListEntry) { @@ -2024,7 +2024,7 @@ CreateNewPartition (PPARTLIST List, PrevPartEntry->PartInfo[1].StartingOffset.QuadPart = PartEntry->PartInfo[0].StartingOffset.QuadPart - DiskEntry->TrackSize; PrevPartEntry->PartInfo[1].HiddenSectors = - PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector; + (ULONG)(PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector); if (DiskEntry->PartListHead.Flink == &PrevPartEntry->ListEntry) { @@ -2081,7 +2081,7 @@ CreateNewPartition (PPARTLIST List, NewPartEntry->PartInfo[0].StartingOffset.QuadPart = PartEntry->UnpartitionedOffset + DiskEntry->TrackSize; NewPartEntry->PartInfo[0].HiddenSectors = - NewPartEntry->PartInfo[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector; + (ULONG)(NewPartEntry->PartInfo[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector); NewPartEntry->PartInfo[0].PartitionLength.QuadPart = PartitionSize - DiskEntry->TrackSize; NewPartEntry->PartInfo[0].PartitionType = PARTITION_ENTRY_UNUSED; @@ -2112,7 +2112,7 @@ CreateNewPartition (PPARTLIST List, PrevPartEntry->PartInfo[1].StartingOffset.QuadPart = NewPartEntry->PartInfo[0].StartingOffset.QuadPart - DiskEntry->TrackSize; PrevPartEntry->PartInfo[1].HiddenSectors = - PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector; + (ULONG)(PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector); if (DiskEntry->PartListHead.Flink == &PrevPartEntry->ListEntry) { @@ -2140,7 +2140,7 @@ CreateNewPartition (PPARTLIST List, PrevPartEntry->PartInfo[1].StartingOffset.QuadPart = NewPartEntry->PartInfo[0].StartingOffset.QuadPart - DiskEntry->TrackSize; PrevPartEntry->PartInfo[1].HiddenSectors = - PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector; + (ULONG)(PrevPartEntry->PartInfo[1].StartingOffset.QuadPart / DiskEntry->BytesPerSector); if (DiskEntry->PartListHead.Flink == &PrevPartEntry->ListEntry) { @@ -2495,7 +2495,6 @@ WritePartitionsToDisk (PPARTLIST List) PDRIVE_LAYOUT_INFORMATION DriveLayout; OBJECT_ATTRIBUTES ObjectAttributes; IO_STATUS_BLOCK Iosb; - WCHAR SrcPath[MAX_PATH]; WCHAR DstPath[MAX_PATH]; UNICODE_STRING Name; HANDLE FileHandle; @@ -2689,30 +2688,6 @@ WritePartitionsToDisk (PPARTLIST List) DriveLayout); NtClose (FileHandle); - - /* Install MBR code if the disk is new */ - if (DiskEntry1->NewDisk == TRUE && - DiskEntry1->BiosDiskNumber == 0) - { - wcscpy (SrcPath, SourceRootPath.Buffer); - wcscat (SrcPath, L"\\loader\\dosmbr.bin"); - - DPRINT ("Install MBR bootcode: %S ==> %S\n", - SrcPath, DstPath); - - /* Install MBR bootcode */ - Status = InstallMbrBootCodeToDisk (SrcPath, - DstPath); - if (!NT_SUCCESS (Status)) - { - DPRINT1 ("InstallMbrBootCodeToDisk() failed (Status %lx)\n", - Status); - return FALSE; - } - - DiskEntry1->NewDisk = FALSE; - DiskEntry1->NoMbr = FALSE; - } } Entry1 = Entry1->Flink; diff --git a/base/setup/usetup/progress.c b/base/setup/usetup/progress.c index acd6f8559a1..55433819877 100644 --- a/base/setup/usetup/progress.c +++ b/base/setup/usetup/progress.c @@ -290,75 +290,7 @@ ProgressSetStepCount(PPROGRESSBAR Bar, VOID ProgressNextStep(PPROGRESSBAR Bar) { - CHAR TextBuffer[8]; - COORD coPos; - DWORD Written; - ULONG NewPercent; - ULONG NewPos; - - if ((Bar->StepCount == 0) || - (Bar->CurrentStep == Bar->StepCount)) - return; - - Bar->CurrentStep++; - - /* Calculate new percentage */ - NewPercent = (ULONG)(((100.0 * (float)Bar->CurrentStep) / (float)Bar->StepCount) + 0.5); - - /* Redraw precentage if changed */ - if (Bar->Percent != NewPercent) - { - Bar->Percent = NewPercent; - - sprintf(TextBuffer, "%-3lu%%", Bar->Percent); - - coPos.X = Bar->Left + (Bar->Width - 2) / 2; - coPos.Y = Bar->Top; - WriteConsoleOutputCharacterA(StdOutput, - TextBuffer, - 4, - coPos, - &Written); - } - - /* Calculate bar position */ - NewPos = (ULONG)((((float)(Bar->Width - 2) * 2.0 * (float)Bar->CurrentStep) / (float)Bar->StepCount) + 0.5); - - /* Redraw bar if changed */ - if (Bar->Pos != NewPos) - { - Bar->Pos = NewPos; - - for (coPos.Y = Bar->Top + 2; coPos.Y <= Bar->Bottom - 1; coPos.Y++) - { - coPos.X = Bar->Left + 1; - FillConsoleOutputCharacterA(StdOutput, - 0xDB, - Bar->Pos / 2, - coPos, - &Written); - coPos.X += Bar->Pos/2; - - if (NewPos & 1) - { - FillConsoleOutputCharacterA(StdOutput, - 0xDD, - 1, - coPos, - &Written); - coPos.X++; - } - - if (coPos.X <= Bar->Right - 1) - { - FillConsoleOutputCharacterA(StdOutput, - ' ', - Bar->Right - coPos.X, - coPos, - &Written); - } - } - } + ProgressSetStep(Bar, Bar->CurrentStep + 1); } diff --git a/base/setup/usetup/progress.h b/base/setup/usetup/progress.h index 53af83db6d9..630967d24d1 100644 --- a/base/setup/usetup/progress.h +++ b/base/setup/usetup/progress.h @@ -38,7 +38,7 @@ typedef struct _PROGRESS SHORT Width; ULONG Percent; - ULONG Pos; + SHORT Pos; ULONG StepCount; ULONG CurrentStep; diff --git a/base/setup/usetup/registry.c b/base/setup/usetup/registry.c index c5951762d28..7cd06724e5f 100644 --- a/base/setup/usetup/registry.c +++ b/base/setup/usetup/registry.c @@ -398,8 +398,7 @@ CreateNestedKey (PHANDLE KeyHandle, UNICODE_STRING LocalKeyName; ULONG Disposition; NTSTATUS Status; - ULONG FullNameLength; - ULONG Length; + USHORT FullNameLength; PWCHAR Ptr; HANDLE LocalKeyHandle; @@ -421,7 +420,7 @@ CreateNestedKey (PHANDLE KeyHandle, RtlCreateUnicodeString (&LocalKeyName, ObjectAttributes->ObjectName->Buffer); LocalObjectAttributes.ObjectName = &LocalKeyName; - FullNameLength = LocalKeyName.Length / sizeof(WCHAR); + FullNameLength = LocalKeyName.Length; /* Remove the last part of the key name and try to create the key again. */ while (Status == STATUS_OBJECT_NAME_NOT_FOUND) @@ -452,10 +451,9 @@ CreateNestedKey (PHANDLE KeyHandle, } /* Add removed parts of the key name and create them too. */ - Length = wcslen (LocalKeyName.Buffer); while (TRUE) { - if (Length == FullNameLength) + if (LocalKeyName.Length == FullNameLength) { Status = STATUS_SUCCESS; *KeyHandle = LocalKeyHandle; @@ -463,9 +461,8 @@ CreateNestedKey (PHANDLE KeyHandle, } NtClose (LocalKeyHandle); - LocalKeyName.Buffer[Length] = L'\\'; - Length = wcslen (LocalKeyName.Buffer); - LocalKeyName.Length = Length * sizeof(WCHAR); + LocalKeyName.Buffer[LocalKeyName.Length / sizeof(WCHAR)] = L'\\'; + LocalKeyName.Length = wcslen (LocalKeyName.Buffer) * sizeof(WCHAR); Status = NtCreateKey (&LocalKeyHandle, KEY_ALL_ACCESS, diff --git a/base/setup/vmwinst/lang/pl-PL.rc b/base/setup/vmwinst/lang/pl-PL.rc index 728a893eb06..79fd576bd07 100644 --- a/base/setup/vmwinst/lang/pl-PL.rc +++ b/base/setup/vmwinst/lang/pl-PL.rc @@ -1,7 +1,8 @@ /* - * translated by Caemyr - * caemyr@gmail.com - * https://sourceforge.net/projects/reactospl + * translated by Caemyr + * caemyr@gmail.com + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -11,8 +12,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instalacja sterownika grafiki" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Program konfiguracyjny ReactOS wykry emulator VMware(r).", -1, 117, 8, 140, 24 - LTEXT "Jeli chcesz zainstalowa sterownik SVGA dla VMware(r), nacinij 'Dalej', w przeciwnym razie - 'Anuluj'.", -1, 117, 140, 140, 17 + LTEXT "Program konfiguracyjny ReactOS wykrył emulator VMware(r).", -1, 117, 8, 140, 24 + LTEXT "Jeśli chcesz zainstalować sterownik SVGA dla VMware(r), naciśnij 'Dalej', w przeciwnym razie - 'Anuluj'.", -1, 117, 140, 140, 17 END IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -20,7 +21,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instalacja sterownika grafiki" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Program konfiguracyjny ReactOS nie zawiera sterownika SVGA VMware(r).\n\nMusisz wic otworzy 'VM' w menu Twojej stacji VMware(r) i klikn na 'Install VMware tools...'\n\n\nNacinij 'Dalej', aby kontynuowa albo 'Anuluj', by pomin instalacj sterownika SVGA.",-1,25,25,225,85 + LTEXT "Program konfiguracyjny ReactOS nie zawiera sterownika SVGA VMware(r).\n\nMusisz więc otworzyć 'VM' w menu Twojej stacji VMware(r) i kliknąć na 'Install VMware tools...'\n\n\nNaciśnij 'Dalej', aby kontynuować albo 'Anuluj', by pominąć instalację sterownika SVGA.",-1,25,25,225,85 END IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -37,7 +38,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instalacja sterownika grafiki" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Sterownik SVGA VMware(r) zosta zainstalowany pomylnie. Prosz wybra rozdzielczo ekranu:",-1,25,5,225,20 + LTEXT "Sterownik SVGA VMware(r) został zainstalowany pomyślnie. Proszę wybrać rozdzielczość ekranu:",-1,25,5,225,20 PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON @@ -49,7 +50,7 @@ BEGIN PUSHBUTTON "1792x1344", 3136, 195, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1856x1392", 3248, 195, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1920x1440", 3360, 195, 60, 50, 15, BS_AUTORADIOBUTTON - LTEXT "Prosz wybra ilo kolorw:", -1, 25, 93, 225, 12 + LTEXT "Proszę wybrać ilość kolorów:", -1, 25, 93, 225, 12 COMBOBOX IDC_COLORQUALITY, 25, 105, 75, 80, CBS_DROPDOWNLIST | WS_TABSTOP END @@ -58,7 +59,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instalacja sterownika grafiki" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Program konfiguracyjny ReactOS Setup nie zdoa zainstalowa sterownika SVGA VMware(r).\n\n\nProsz nacisn 'Zakocz', aby kontynuowa proces instalacji.",-1,25,25,225,85 + LTEXT "Program konfiguracyjny ReactOS Setup nie zdołał zainstalować sterownika SVGA VMware(r).\n\n\nProszę nacisnąć 'Zakończ', aby kontynuować proces instalacji.",-1,25,25,225,85 END IDD_CHOOSEACTION DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -66,11 +67,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instalacja sterownika grafiki" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Sterownik SVGA VMware(r) zosta ju zainstalowany.\n\nProsz wybra jedn z poniszych czynnoci:",-1,25,5,225,30 - PUSHBUTTON "Konfiguracja ustawie ekranu", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON + LTEXT "Sterownik SVGA VMware(r) został już zainstalowany.\n\nProszę wybrać jedną z poniższych czynności:",-1,25,5,225,30 + PUSHBUTTON "Konfiguracja ustawień ekranu", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON PUSHBUTTON "Zmiana sterownika grafiki", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON PUSHBUTTON "Deinstalacja sterownika SVGA VMware(r)", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON - LTEXT "Prosz nacisn 'Dalej', aby kontynuowa albo 'Anuluj', aby opuci program konfiguracyjny.", -1, 25, 93, 225, 12 + LTEXT "Proszę nacisnąć 'Dalej', aby kontynuować albo 'Anuluj', aby opuścić program konfiguracyjny.", -1, 25, 93, 225, 12 END IDD_SELECTDRIVER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -78,10 +79,10 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instalacja sterownika grafiki" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Prosz wybra sterownik grafiki:",-1,25,25,225,15 + LTEXT "Proszę wybrać sterownik grafiki:",-1,25,25,225,15 PUSHBUTTON "Sterownik ReactOS VGA", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON PUSHBUTTON "Sterownik ReactOS VBE (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON - LTEXT "Prosz nacisn 'Zakocz', by potwierdzi wybr albo 'Anuluj', by wyj z programu bez zmian.", -1, 25, 93, 225, 20 + LTEXT "Proszę nacisnąć 'Zakończ', by potwierdzić wybór albo 'Anuluj', by wyjść z programu bez zmian.", -1, 25, 93, 225, 20 END IDD_DOUNINSTALL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -89,49 +90,49 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instalacja sterownika grafiki" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Program konfiguracyjny ReactOS ma zamiar odinstalowa sterownik SVGA VMware(r)!\n\n\nNacinij 'Zakocz', by odinstalowa sterownik lub 'Anuluj', by go pozostawi.",-1,25,25,225,85 + LTEXT "Program konfiguracyjny ReactOS ma zamiar odinstalować sterownik SVGA VMware(r)!\n\n\nNaciśnij 'Zakończ', by odinstalować sterownik lub 'Anuluj', by go pozostawić.",-1,25,25,225,85 END STRINGTABLE BEGIN IDS_WIZARD_NAME "Wykryto VMware(r)" - IDS_FAILEDTOLOCATEDRIVERS "Program konfiguracyjny ReactOS nie moe znale potrzebnych plikw.\nProsz upewni si, e w napdzie znajduje si CD z VMware(r) tools." - IDS_FAILEDTOCOPYFILES "Program konfiguracyjny ReactOS nie by w stanie przekopiowa niezbdnych plikw.\nProsz upewni si, e w napdzie znajduje si CD z VMware(r) tools.\n" + IDS_FAILEDTOLOCATEDRIVERS "Program konfiguracyjny ReactOS nie może znaleźć potrzebnych plików.\nProszę upewnić się, że w napędzie znajduje się CD z VMware(r) tools." + IDS_FAILEDTOCOPYFILES "Program konfiguracyjny ReactOS nie był w stanie przekopiować niezbędnych plików.\nProszę upewnić się, że w napędzie znajduje się CD z VMware(r) tools.\n" IDS_FAILEDTOACTIVATEDRIVER "Inicjalizacja sterownika SVGA VMware(r) nieudana!" IDS_FAILEDTOSELVGADRIVER "Inicjalizacja sterownika VGA ReactOS nieudana!" IDS_FAILEDTOSELVBEDRIVER "Inicjalizacja sterownika VBE ReactOS nieudana!" - IDS_UNINSTNOTICE "Nie wszystkie pliki sterownika SVGA VMware(r) zostay skasowane.\nProsz usun je rcznie, po restarcie systemu." - IDS_FAILEDTOADDREGENTRIES "Nie udao si stworzy wpisw w rejestrze dla sterownika SVGA VMware(r)!" + IDS_UNINSTNOTICE "Nie wszystkie pliki sterownika SVGA VMware(r) zostały skasowane.\nProszę usunąć je ręcznie, po restarcie systemu." + IDS_FAILEDTOADDREGENTRIES "Nie udało się stworzyć wpisów w rejestrze dla sterownika SVGA VMware(r)!" END STRINGTABLE BEGIN - 10001 "256 kolorw (8BPP)" - 10002 "65k kolorw (16BPP)" - 10003 "16m kolorw (32BPP)" + 10001 "256 kolorów (8BPP)" + 10002 "65k kolorów (16BPP)" + 10003 "16m kolorów (32BPP)" END STRINGTABLE BEGIN IDS_SEARCHINGFORCDROM "Poszukiwanie CD z VMware(r) Tools..." - IDS_COPYINGFILES "Kopiowanie plikw..." + IDS_COPYINGFILES "Kopiowanie plików..." IDS_ENABLINGDRIVER "Inicjalizacja sterownika SVGA VMware(r)..." END STRINGTABLE BEGIN IDD_INSERT_VMWARE_TOOLSTITLE "Kreator konfiguracji sterownika SVGA VMware(r)" - IDD_INSERT_VMWARE_TOOLSSUBTITLE "Prosz woy CD z VMware tools." + IDD_INSERT_VMWARE_TOOLSSUBTITLE "Proszę włożyć CD z VMware tools." IDD_INSTALLING_VMWARE_TOOLSTITLE "Kreator konfiguracji sterownika SVGA VMware(r)" - IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Wyszukiwanie i kopiowanie plikw sterownika SVGA VMware(r)." + IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Wyszukiwanie i kopiowanie plików sterownika SVGA VMware(r)." IDD_CONFIGTITLE "Kreator konfiguracji sterownika SVGA VMware(r)" - IDD_CONFIGSUBTITLE "Prosz wybra rozdzielczo ekranu." + IDD_CONFIGSUBTITLE "Proszę wybrać rozdzielczość ekranu." IDD_INSTALLATION_FAILEDTITLE "Kreator konfiguracji sterownika SVGA VMware(r)" IDD_INSTALLATION_FAILEDSUBTITLE "Instalacja sterownika SVGA VMware(r) nieudana." IDD_CHOOSEACTIONTITLE "Kreator konfiguracji sterownika SVGA VMware(r)" - IDD_CHOOSEACTIONSUBTITLE "Prosz dokona wyboru." + IDD_CHOOSEACTIONSUBTITLE "Proszę dokonać wyboru." IDD_SELECTDRIVERTITLE "Kreator konfiguracji sterownika SVGA VMware(r)" - IDD_SELECTDRIVERSUBTITLE "Prosz wybra sterownik." + IDD_SELECTDRIVERSUBTITLE "Proszę wybrać sterownik." IDD_DOUNINSTALLTITLE "Kreator konfiguracji sterownika SVGA VMware(r)" IDD_DOUNINSTALLSUBTITLE "Deinstalacja sterownika." END diff --git a/base/setup/vmwinst/lang/ru-RU.rc b/base/setup/vmwinst/lang/ru-RU.rc index 303dbeb17fd..e72ff7cc890 100644 --- a/base/setup/vmwinst/lang/ru-RU.rc +++ b/base/setup/vmwinst/lang/ru-RU.rc @@ -2,24 +2,24 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " , ReactOS VMware(r).", -1, 117, 8, 140, 24 - LTEXT " SVGA- VMware(r) """", """".", -1, 117, 125, 140, 22 + LTEXT "Программа установки обнаружила, что ReactOS работает под управлением виртуальной машины VMware(r).", -1, 117, 8, 140, 24 + LTEXT "Для установки SVGA-драйвера VMware(r) нажмите кнопку ""Далее"", иначе нажмите ""Отмена"".", -1, 117, 125, 140, 22 END IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS SVGA- VMware(r).\n\n 'VM' VMware(r) Workstation 'Install VMware tools...'\n\n\n """", """", SVGA-.",-1,25,25,225,85 + LTEXT "Программа установки ReactOS не включает в себя SVGA-драйвер VMware(r).\n\nСледуйте в меню 'VM' программы VMware(r) Workstation и выберите 'Install VMware tools...'\n\n\nДля продолжения нажмите кнопку ""Далее"", или ""Отмена"", чтобы пропустить установку SVGA-драйвера.",-1,25,25,225,85 END IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "{STATUS}",IDC_INSTALLINGSTATUS,25,68,225,8 @@ -28,10 +28,10 @@ END IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " SVGA- VMware(r) . :",-1,25,5,225,20 + LTEXT "Установка SVGA-драйвера VMware(r) завершена успешно. Выберите предпочтительное разрешение экрана:",-1,25,5,225,20 PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON @@ -43,89 +43,89 @@ BEGIN PUSHBUTTON "1792x1344", 3136, 195, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1856x1392", 3248, 195, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1920x1440", 3360, 195, 60, 50, 15, BS_AUTORADIOBUTTON - LTEXT " :", -1, 25, 93, 225, 12 + LTEXT "Выберите качество передачи цвета:", -1, 25, 93, 225, 12 COMBOBOX IDC_COLORQUALITY, 25, 105, 75, 80, CBS_DROPDOWNLIST | WS_TABSTOP END IDD_INSTALLATION_FAILED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS SVGA- VMware(r).\n\n\n """" .",-1,25,25,225,85 + LTEXT "Программа установки ReactOS не смогла установить SVGA-драйвер VMware(r).\n\n\nНажмите кнопку ""Завершить"" для продолжения процесса установки.",-1,25,25,225,85 END IDD_CHOOSEACTION DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "SVGA- VMware(r) .\n\n :",-1,25,5,225,30 - PUSHBUTTON " ", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON - PUSHBUTTON " ", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON - PUSHBUTTON " SVGA- VMware(r)", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON - LTEXT " """" """" .", -1, 25, 93, 225, 20 + LTEXT "SVGA-драйвер VMware(r) уже установлен.\n\nВыберите дальнейшее действие:",-1,25,5,225,30 + PUSHBUTTON "Настроить параметры экрана", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "Установить другой графический драйвер", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "Удалить SVGA-драйвер VMware(r)", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON + LTEXT "Нажмите кнопку ""Далее"" для продолжения или ""Отмена"" для выхода из мастера установки.", -1, 25, 93, 225, 20 END IDD_SELECTDRIVER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " , :",-1,25,25,225,15 - PUSHBUTTON "ReactOS VGA ", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON - PUSHBUTTON "ReactOS VBE (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON - LTEXT " """" """" .", -1, 25, 93, 225, 30 + LTEXT "Выберите графический драйвер, который Вы хотели бы использовать:",-1,25,25,225,15 + PUSHBUTTON "ReactOS VGA драйвер", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "ReactOS VBE драйвер (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON + LTEXT "Нажмите кнопку ""Завершить"" для выполнения операции или ""Отмена"" для выхода из программы установки без сохранения изменений.", -1, 25, 93, 225, 30 END IDD_DOUNINSTALL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Установка видеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS SVGA- VMWare(r)!\n\n\n """" """" .",-1,25,25,225,85 + LTEXT "Программа установки ОС ReactOS готова произвести удаление SVGA-драйвера VMWare(r)!\n\n\nНажмите кнопку ""Завершить"" для удаления драйвера или ""Отмена"" чтобы оставить драйвер.",-1,25,25,225,85 END STRINGTABLE BEGIN - IDS_WIZARD_NAME " VMware(r)" - IDS_FAILEDTOLOCATEDRIVERS " ReactOS .\n, VMware(r) tools CD-ROM ." - IDS_FAILEDTOCOPYFILES " ReactOS .\n, VMware(r) tools CD-ROM .\n" - IDS_FAILEDTOACTIVATEDRIVER " SVGA- VMware(r)!" - IDS_FAILEDTOSELVGADRIVER " ReactOS VGA !" - IDS_FAILEDTOSELVBEDRIVER " ReactOS VBE !" - IDS_UNINSTNOTICE " SVGA- VMware(r) .\n ." - IDS_FAILEDTOADDREGENTRIES " SVGA- VMware(r)!" + IDS_WIZARD_NAME "Обнаружен VMware(r)" + IDS_FAILEDTOLOCATEDRIVERS "Программа установки ReactOS не смогла найти необходимые файлы.\nУбедитесь, что VMware(r) tools CD-ROM вставлен в привод." + IDS_FAILEDTOCOPYFILES "Программа установки ReactOS не смогла скопировать необходимые файлы.\nУбедитесь, что VMware(r) tools CD-ROM вставлен в привод.\n" + IDS_FAILEDTOACTIVATEDRIVER "Не удалось запустить SVGA-драйвер VMware(r)!" + IDS_FAILEDTOSELVGADRIVER "Не удалось запустить ReactOS VGA драйвер!" + IDS_FAILEDTOSELVBEDRIVER "Не удалось запустить ReactOS VBE драйвер!" + IDS_UNINSTNOTICE "Файлы SVGA-драйвера VMware(r) не были удалены.\nУдалите их самостоятельно после перезагрузки системы." + IDS_FAILEDTOADDREGENTRIES "Не удалось создать записи в реестре для SVGA-драйвера VMware(r)!" END STRINGTABLE BEGIN - 10001 " (8BPP)" - 10002 " (16BPP)" - 10003 " (32BPP)" + 10001 "Низкое (8BPP)" + 10002 "Среднее (16BPP)" + 10003 "Самое высокое (32BPP)" END STRINGTABLE BEGIN - IDS_SEARCHINGFORCDROM " - VMware(r) Tools..." - IDS_COPYINGFILES " ..." - IDS_ENABLINGDRIVER " SVGA- VMware(r)..." + IDS_SEARCHINGFORCDROM "Поиск компакт-диска VMware(r) Tools..." + IDS_COPYINGFILES "Копирование файлов..." + IDS_ENABLINGDRIVER "Запуск SVGA-драйвера VMware(r)..." END STRINGTABLE BEGIN - IDD_INSERT_VMWARE_TOOLSTITLE " SVGA- VMware (r)" - IDD_INSERT_VMWARE_TOOLSSUBTITLE " VMware tools." - IDD_INSTALLING_VMWARE_TOOLSTITLE " SVGA- VMware (r)" - IDD_INSTALLING_VMWARE_TOOLSSUBTITLE " SVGA- VMware (r)." - IDD_CONFIGTITLE " SVGA- VMware (r)" - IDD_CONFIGSUBTITLE " ." - IDD_INSTALLATION_FAILEDTITLE " SVGA- VMware (r)" - IDD_INSTALLATION_FAILEDSUBTITLE " SVGA- VMware (r) ." - IDD_CHOOSEACTIONTITLE " SVGA- VMware (r)" - IDD_CHOOSEACTIONSUBTITLE " ." - IDD_SELECTDRIVERTITLE " SVGA- VMware (r)" - IDD_SELECTDRIVERSUBTITLE " ." - IDD_DOUNINSTALLTITLE " SVGA- VMware (r)" - IDD_DOUNINSTALLSUBTITLE " ." + IDD_INSERT_VMWARE_TOOLSTITLE "Мастер установки SVGA-драйвера VMware (r)" + IDD_INSERT_VMWARE_TOOLSSUBTITLE "Вставьте диск VMware tools." + IDD_INSTALLING_VMWARE_TOOLSTITLE "Мастер установки SVGA-драйвера VMware (r)" + IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Поиск и копирование SVGA-драйвера VMware (r)." + IDD_CONFIGTITLE "Мастер установки SVGA-драйвера VMware (r)" + IDD_CONFIGSUBTITLE "Выберите предпочитаемое разрешение экрана." + IDD_INSTALLATION_FAILEDTITLE "Мастер установки SVGA-драйвера VMware (r)" + IDD_INSTALLATION_FAILEDSUBTITLE "Установка SVGA-драйвера VMware (r) не удалась." + IDD_CHOOSEACTIONTITLE "Мастер установки SVGA-драйвера VMware (r)" + IDD_CHOOSEACTIONSUBTITLE "Выберите действие." + IDD_SELECTDRIVERTITLE "Мастер установки SVGA-драйвера VMware (r)" + IDD_SELECTDRIVERSUBTITLE "Выберите драйвер." + IDD_DOUNINSTALLTITLE "Мастер установки SVGA-драйвера VMware (r)" + IDD_DOUNINSTALLSUBTITLE "Удаление драйвера." END diff --git a/base/setup/vmwinst/lang/uk-UA.rc b/base/setup/vmwinst/lang/uk-UA.rc index f7178e79aa7..801af7ce0d3 100644 --- a/base/setup/vmwinst/lang/uk-UA.rc +++ b/base/setup/vmwinst/lang/uk-UA.rc @@ -10,24 +10,24 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS , ReactOS VMware(r).", -1, 117, 8, 140, 24 - LTEXT " SVGA VMware(r), """", """".", -1, 117, 140, 140, 24 + LTEXT "Програма встановлення ReactOS виявила, що Ви запустили ReactOS всередені VMware(r).", -1, 117, 8, 140, 24 + LTEXT "Якщо Ви бажаєте встановити SVGA драйвер VMware(r), натисніть ""Далі"", інакше натисніть ""Скасувати"".", -1, 117, 140, 140, 24 END IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS SVGA VMware(r).\n\n ""VM"" VMware(r) workstation ""Install VMware tools...""\n\n\n """" """", SVGA .",-1,25,25,225,85 + LTEXT "Програма встановлення ReactOS не включає SVGA драйвер VMware(r).\n\nТому йдіть до меню ""VM"" у VMware(r) workstation і виберіть ""Install VMware tools...""\n\n\nНатисніть ""Далі"" для продовження або ""Скасувати"", щоб пропустити встановлення SVGA драйвера.",-1,25,25,225,85 END IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "{STATUS}",IDC_INSTALLINGSTATUS,25,68,225,8 @@ -36,10 +36,10 @@ END IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " SVGA VMware(r) . :",-1,25,5,225,20 + LTEXT "Встановлення SVGA драйвера VMware(r) завершено успішно. Оберіть потрібну роздільну здатність екрану:",-1,25,5,225,20 PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON @@ -51,89 +51,89 @@ BEGIN PUSHBUTTON "1792x1344", 3136, 195, 30, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1856x1392", 3248, 195, 45, 65, 15, BS_AUTORADIOBUTTON PUSHBUTTON "1920x1440", 3360, 195, 60, 50, 15, BS_AUTORADIOBUTTON - LTEXT " :", -1, 25, 93, 225, 12 + LTEXT "Будь ласка оберіть якість передачі кольору:", -1, 25, 93, 225, 12 COMBOBOX IDC_COLORQUALITY, 25, 105, 75, 80, CBS_DROPDOWNLIST | WS_TABSTOP END IDD_INSTALLATION_FAILED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS SVGA VMware(r).\n\n\n """" .",-1,25,25,225,85 + LTEXT "Програма встановлення ReactOS не змогла встановити SVGA драйвер VMware(r).\n\n\nНатисніть ""Завершити"" для продовження процесу встановлення.",-1,25,25,225,85 END IDD_CHOOSEACTION DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "SVGA VMware(r) SVGA .\n\n, :",-1,25,5,225,30 - PUSHBUTTON " ", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON - PUSHBUTTON " ", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON - PUSHBUTTON " SVGA VMware(r)", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON - LTEXT " """" """" .", -1, 25, 93, 225, 17 + LTEXT "SVGA драйвер VMware(r) SVGA вже встановлений.\n\nОберіть, що Ви хочете зробити:",-1,25,5,225,30 + PUSHBUTTON "Налаштувати параметри екрану", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "Скористатися іншим графічним драйвером", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "Видалити SVGA драйвер VMware(r)", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON + LTEXT "Натисніть ""Далі"" для продовження або ""Скасувати"" для виходу з майстра.", -1, 25, 93, 225, 17 END IDD_SELECTDRIVER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " , :",-1,25,25,225,15 - PUSHBUTTON "ReactOS VGA ", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON - PUSHBUTTON "ReactOS VBE (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON - LTEXT " """" """" .", -1, 25, 93, 225, 20 + LTEXT "Будь ласка оберіть графічний драйвер, який Ви хотіли б використовувати:",-1,25,25,225,15 + PUSHBUTTON "ReactOS VGA драйвер", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "ReactOS VBE драйвер (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON + LTEXT "Натисніть ""Завершити"" для завершення операції або ""Скасувати"" для виходу з програми встановлення без збереження змін.", -1, 25, 93, 225, 20 END IDD_DOUNINSTALL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Встановлення відеодрайвера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS SVGA VMWare(r)!!!\n\n\n """" """" .",-1,25,25,225,85 + LTEXT "Програма встановлення ReactOS готова видалити SVGA драйвер VMWare(r)!!!\n\n\nНатисніть ""Завершити"" для видалення драйвера або ""Скасувати"" щоб залишити його як є.",-1,25,25,225,85 END STRINGTABLE BEGIN - IDS_WIZARD_NAME " VMware(r)" - IDS_FAILEDTOLOCATEDRIVERS " ReactOS .\n, CD-ROM VMware(r) tools ." - IDS_FAILEDTOCOPYFILES " ReactOS .\n, CD-ROM VMware(r) tools .\n" - IDS_FAILEDTOACTIVATEDRIVER " SVGA VMware(r)!" - IDS_FAILEDTOSELVGADRIVER " ReactOS VGA !" - IDS_FAILEDTOSELVBEDRIVER " ReactOS VBE !" - IDS_UNINSTNOTICE " SVGA VMware(r) .\n ." - IDS_FAILEDTOADDREGENTRIES " SVGA VMware(r)!" + IDS_WIZARD_NAME "Виявлений VMware(r)" + IDS_FAILEDTOLOCATEDRIVERS "Програма встановлення ReactOS не змогла знайти необхідні файли.\nПереконайтеся, що CD-ROM VMware(r) tools вставлений." + IDS_FAILEDTOCOPYFILES "Програма встановлення ReactOS не змогла скопіювати необхідні файли.\nПереконайтеся, що CD-ROM VMware(r) tools вставлений.\n" + IDS_FAILEDTOACTIVATEDRIVER "Не вдалося запустити SVGA драйвер VMware(r)!" + IDS_FAILEDTOSELVGADRIVER "Не вдалося запустити ReactOS VGA драйвер!" + IDS_FAILEDTOSELVBEDRIVER "Не вдалося запустити ReactOS VBE драйвер!" + IDS_UNINSTNOTICE "Файли SVGA драйвера VMware(r) ще не були видалені.\nБудь ласка видаліть їх вручну після перезавантаження системи." + IDS_FAILEDTOADDREGENTRIES "Не вдалося створити записи в реєстрі для SVGA драйвера VMware(r)!" END STRINGTABLE BEGIN - 10001 " (8BPP)" - 10002 " (16BPP)" - 10003 " (32BPP)" + 10001 "Низька (8BPP)" + 10002 "Середня (16BPP)" + 10003 "Найвища (32BPP)" END STRINGTABLE BEGIN - IDS_SEARCHINGFORCDROM " - VMware(r) Tools..." - IDS_COPYINGFILES " ..." - IDS_ENABLINGDRIVER " SVGA VMware(r)..." + IDS_SEARCHINGFORCDROM "Пошук компакт-диска VMware(r) Tools..." + IDS_COPYINGFILES "Копіювання файлів..." + IDS_ENABLINGDRIVER "Запуск SVGA драйвера VMware(r)..." END STRINGTABLE BEGIN - IDD_INSERT_VMWARE_TOOLSTITLE " SVGA VMware (r)" - IDD_INSERT_VMWARE_TOOLSSUBTITLE " VMware tools." - IDD_INSTALLING_VMWARE_TOOLSTITLE " SVGA VMware (r)" - IDD_INSTALLING_VMWARE_TOOLSSUBTITLE " SVGA VMware (r)." - IDD_CONFIGTITLE " SVGA VMware (r)" - IDD_CONFIGSUBTITLE " ." - IDD_INSTALLATION_FAILEDTITLE " SVGA VMware (r)" - IDD_INSTALLATION_FAILEDSUBTITLE " SVGA VMware (r) ." - IDD_CHOOSEACTIONTITLE " SVGA VMware (r)" - IDD_CHOOSEACTIONSUBTITLE ", ." - IDD_SELECTDRIVERTITLE " SVGA VMware (r)" - IDD_SELECTDRIVERSUBTITLE " ." - IDD_DOUNINSTALLTITLE " SVGA VMware (r)" - IDD_DOUNINSTALLSUBTITLE " ." + IDD_INSERT_VMWARE_TOOLSTITLE "Майстер встановлення SVGA драйвера VMware (r)" + IDD_INSERT_VMWARE_TOOLSSUBTITLE "Будь ласка вставте диск VMware tools." + IDD_INSTALLING_VMWARE_TOOLSTITLE "Майстер встановлення SVGA драйвера VMware (r)" + IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Пошук і копіювання SVGA драйвера VMware (r)." + IDD_CONFIGTITLE "Майстер встановлення SVGA драйвера VMware (r)" + IDD_CONFIGSUBTITLE "Оберіть потрібну Вам роздільну здатність екрану." + IDD_INSTALLATION_FAILEDTITLE "Майстер встановлення SVGA драйвера VMware (r)" + IDD_INSTALLATION_FAILEDSUBTITLE "Встановлення SVGA драйвера VMware (r) не вдалася." + IDD_CHOOSEACTIONTITLE "Майстер встановлення SVGA драйвера VMware (r)" + IDD_CHOOSEACTIONSUBTITLE "Виберіть, що Ви хочете зробити." + IDD_SELECTDRIVERTITLE "Майстер встановлення SVGA драйвера VMware (r)" + IDD_SELECTDRIVERSUBTITLE "Обрати драйвер." + IDD_DOUNINSTALLTITLE "Майстер встановлення SVGA драйвера VMware (r)" + IDD_DOUNINSTALLSUBTITLE "Видалити драйвер." END diff --git a/base/setup/vmwinst/rsrc.rc b/base/setup/vmwinst/rsrc.rc index 65ee2b880d3..3cb6ca3fa53 100644 --- a/base/setup/vmwinst/rsrc.rc +++ b/base/setup/vmwinst/rsrc.rc @@ -26,8 +26,11 @@ IDB_HEADER BITMAP "resources/header.bmp" #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" +#include "lang/sv-SE.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sv-SE.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/base/setup/welcome/lang/pl-PL.rc b/base/setup/welcome/lang/pl-PL.rc index 5bc8e174a10..5c0144f59b3 100644 --- a/base/setup/welcome/lang/pl-PL.rc +++ b/base/setup/welcome/lang/pl-PL.rc @@ -1,4 +1,8 @@ -/* $Id: en-US.rc 24952 2006-11-28 21:44:53Z janderwald $ */ +/* + * translated by Polish Translation Team (Apr, 2007) + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,16 +14,16 @@ BEGIN IDS_APPTITLE "ReactOS - Zapraszamy" IDS_DEFAULTTOPICTITLE "ReactOS" IDS_DEFAULTTOPICDESC "Witaj w systemie operacyjnym ReactOS.\n\nWybierz temat po lewej." -// IDS_CHECKTEXT "Poka ten dialog ponownie" -// IDS_CLOSETEXT "Wyjcie" +// IDS_CHECKTEXT "Pokaż ten dialog ponownie" +// IDS_CLOSETEXT "Wyjście" END /* Topic buttons */ STRINGTABLE DISCARDABLE BEGIN IDS_TOPICBUTTON0 "Zainstaluj ReactOS" - IDS_TOPICBUTTON1 "Przegldaj CD" - IDS_TOPICBUTTON2 "Wyjcie" + IDS_TOPICBUTTON1 "Przeglądaj CD" + IDS_TOPICBUTTON2 "Wyjście" // IDS_TOPICBUTTON3 "Empty Topic 3" // IDS_TOPICBUTTON4 "Empty Topic 4" // IDS_TOPICBUTTON5 "Empty Topic 5" @@ -33,8 +37,8 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_TOPICTITLE0 "Zainstaluj ReactOS" - IDS_TOPICTITLE1 "Przegldaj CD" - IDS_TOPICTITLE2 "Wyjcie" + IDS_TOPICTITLE1 "Przeglądaj CD" + IDS_TOPICTITLE2 "Wyjście" // IDS_TOPICTITLE3 "Empty Topic Title 3" // IDS_TOPICTITLE4 "Empty Topic Title 4" // IDS_TOPICTITLE5 "Empty Topic Title 5" @@ -47,9 +51,9 @@ END /* Topic descriptions */ STRINGTABLE DISCARDABLE BEGIN - IDS_TOPICDESC0 "Utwrz now instalacj ReactOS na komputerze lub aktualizuj istniejc." - IDS_TOPICDESC1 "Przegldaj CD." - IDS_TOPICDESC2 "Kliknij, aby zakoczy aplikacj." + IDS_TOPICDESC0 "Utwórz nową instalację ReactOS na komputerze lub aktualizuj już istniejącą." + IDS_TOPICDESC1 "Przeglądaj CD." + IDS_TOPICDESC2 "Kliknij, aby zakończyć aplikację." // IDS_TOPICDESC3 "Topic description 3.\n\nDescribe topic 3 here." // IDS_TOPICDESC4 "Topic description 4.\n\nDescribe topic 4 here." // IDS_TOPICDESC5 "Topic description 5.\n\nDescribe topic 5 here." diff --git a/base/setup/welcome/lang/ru-RU.rc b/base/setup/welcome/lang/ru-RU.rc index 42e114301d4..39ec334eaa1 100644 --- a/base/setup/welcome/lang/ru-RU.rc +++ b/base/setup/welcome/lang/ru-RU.rc @@ -7,19 +7,19 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT /* Default settings */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPTITLE "ReactOS - !" + IDS_APPTITLE "ReactOS - Добро пожаловать!" IDS_DEFAULTTOPICTITLE "ReactOS" - IDS_DEFAULTTOPICDESC " ReactOS.\n\n ." -// IDS_CHECKTEXT " " -// IDS_CLOSETEXT "" + IDS_DEFAULTTOPICDESC "Добро пожаловать в ReactOS.\n\nВыберите пункт слева." +// IDS_CHECKTEXT "Показывать это окно снова" +// IDS_CLOSETEXT "Выход" END /* Topic buttons */ STRINGTABLE DISCARDABLE BEGIN - IDS_TOPICBUTTON0 " ReactOS" - IDS_TOPICBUTTON1 " " - IDS_TOPICBUTTON2 "" + IDS_TOPICBUTTON0 "Установить ReactOS" + IDS_TOPICBUTTON1 "Обзор диска" + IDS_TOPICBUTTON2 "Выход" // IDS_TOPICBUTTON3 "Empty Topic 3" // IDS_TOPICBUTTON4 "Empty Topic 4" // IDS_TOPICBUTTON5 "Empty Topic 5" @@ -32,9 +32,9 @@ END /* Topic titles */ STRINGTABLE DISCARDABLE BEGIN - IDS_TOPICTITLE0 " ReactOS" - IDS_TOPICTITLE1 " " - IDS_TOPICTITLE2 "" + IDS_TOPICTITLE0 "Установить ReactOS" + IDS_TOPICTITLE1 "Обзор диска" + IDS_TOPICTITLE2 "Выход" // IDS_TOPICTITLE3 "Empty Topic Title 3" // IDS_TOPICTITLE4 "Empty Topic Title 4" // IDS_TOPICTITLE5 "Empty Topic Title 5" @@ -47,9 +47,9 @@ END /* Topic descriptions */ STRINGTABLE DISCARDABLE BEGIN - IDS_TOPICDESC0 " ReactOS ." - IDS_TOPICDESC1 " ." - IDS_TOPICDESC2 " ." + IDS_TOPICDESC0 "Установит ReactOS на Ваш компьютер с нуля или обновит уже установленную версию." + IDS_TOPICDESC1 "Обзор диска." + IDS_TOPICDESC2 "Выберите для выхода из этого приложения." // IDS_TOPICDESC3 "Topic description 3.\n\nDescribe topic 3 here." // IDS_TOPICDESC4 "Topic description 4.\n\nDescribe topic 4 here." // IDS_TOPICDESC5 "Topic description 5.\n\nDescribe topic 5 here." diff --git a/base/setup/welcome/lang/uk-UA.rc b/base/setup/welcome/lang/uk-UA.rc index 01e6d031d52..2066bfe1ea1 100644 --- a/base/setup/welcome/lang/uk-UA.rc +++ b/base/setup/welcome/lang/uk-UA.rc @@ -25,19 +25,19 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT /* Default settings */ STRINGTABLE DISCARDABLE BEGIN - IDS_APPTITLE "ReactOS - " + IDS_APPTITLE "ReactOS - Ласкаво просимо" IDS_DEFAULTTOPICTITLE "ReactOS" - IDS_DEFAULTTOPICDESC " ReactOS.\n\n " -// IDS_CHECKTEXT " " -// IDS_CLOSETEXT "" + IDS_DEFAULTTOPICDESC "Ласкаво просимо до операційної системи ReactOS.\n\nКлацніть по темі ліворуч" +// IDS_CHECKTEXT "Показувати цей діалог знов" +// IDS_CLOSETEXT "Вихід" END /* Topic buttons */ STRINGTABLE DISCARDABLE BEGIN - IDS_TOPICBUTTON0 " ReactOS" - IDS_TOPICBUTTON1 " CD" - IDS_TOPICBUTTON2 "" + IDS_TOPICBUTTON0 "Встановлення ReactOS" + IDS_TOPICBUTTON1 "Огляд цього CD" + IDS_TOPICBUTTON2 "Вихід" // IDS_TOPICBUTTON3 "Empty Topic 3" // IDS_TOPICBUTTON4 "Empty Topic 4" // IDS_TOPICBUTTON5 "Empty Topic 5" @@ -50,9 +50,9 @@ END /* Topic titles */ STRINGTABLE DISCARDABLE BEGIN - IDS_TOPICTITLE0 " ReactOS" - IDS_TOPICTITLE1 " CD" - IDS_TOPICTITLE2 "" + IDS_TOPICTITLE0 "Встановлення ReactOS" + IDS_TOPICTITLE1 "Огляд цього CD" + IDS_TOPICTITLE2 "Вихід" // IDS_TOPICTITLE3 "Empty Topic Title 3" // IDS_TOPICTITLE4 "Empty Topic Title 4" // IDS_TOPICTITLE5 "Empty Topic Title 5" @@ -65,9 +65,9 @@ END /* Topic descriptions */ STRINGTABLE DISCARDABLE BEGIN - IDS_TOPICDESC0 " ReactOS ' ." - IDS_TOPICDESC1 " CD." - IDS_TOPICDESC2 " ." + IDS_TOPICDESC0 "Створення нової інсталяції ReactOS на Вашому комп'ютері чи оновлення існуючої інсталяції." + IDS_TOPICDESC1 "Проглянути CD." + IDS_TOPICDESC2 "Натисніть для виходу з цієї програми." // IDS_TOPICDESC3 "Topic description 3.\n\nDescribe topic 3 here." // IDS_TOPICDESC4 "Topic description 4.\n\nDescribe topic 4 here." // IDS_TOPICDESC5 "Topic description 5.\n\nDescribe topic 5 here." diff --git a/base/setup/welcome/rsrc.rc b/base/setup/welcome/rsrc.rc index a05f295f6d4..052d7019663 100644 --- a/base/setup/welcome/rsrc.rc +++ b/base/setup/welcome/rsrc.rc @@ -55,11 +55,14 @@ END #include "lang/lt-LT.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/base/shell/cmd/CMakeLists.txt b/base/shell/cmd/CMakeLists.txt index 855d5fa458a..37cacf55ecb 100644 --- a/base/shell/cmd/CMakeLists.txt +++ b/base/shell/cmd/CMakeLists.txt @@ -72,11 +72,11 @@ list(APPEND SOURCE where.c window.c) -add_executable(cmd ${CMAKE_CURRENT_BINARY_DIR}/cmd_precomp.h.gch ${SOURCE}) +add_executable(cmd ${SOURCE}) target_link_libraries(cmd wine) -add_pch(cmd ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h SOURCE) set_module_type(cmd win32cui) add_importlibs(cmd advapi32 user32 msvcrt kernel32 ntdll) +add_pch(cmd precomp.h) add_cd_file(TARGET cmd DESTINATION reactos/system32 FOR all) diff --git a/base/shell/cmd/batch.c b/base/shell/cmd/batch.c index bb0c8b6859b..4d9d1719847 100644 --- a/base/shell/cmd/batch.c +++ b/base/shell/cmd/batch.c @@ -156,6 +156,22 @@ LPTSTR BatchParams (LPTSTR s1, LPTSTR s2) return dp; } +/* + * free the allocated memory of a batch file + */ +VOID ClearBatch() +{ + TRACE ("ClearBatch mem = %08x free = %d\n", bc->mem, bc->memfree); + + if (bc->mem && bc->memfree) + cmd_free(bc->mem); + + if (bc->raw_params) + cmd_free(bc->raw_params); + + if (bc->params) + cmd_free(bc->params); +} /* * If a batch file is current, exits it, freeing the context block and @@ -169,20 +185,10 @@ LPTSTR BatchParams (LPTSTR s1, LPTSTR s2) VOID ExitBatch() { + ClearBatch(); + TRACE ("ExitBatch\n"); - if (bc->hBatchFile) - { - CloseHandle (bc->hBatchFile); - bc->hBatchFile = INVALID_HANDLE_VALUE; - } - - if (bc->raw_params) - cmd_free(bc->raw_params); - - if (bc->params) - cmd_free(bc->params); - UndoRedirection(bc->RedirList, NULL); FreeRedirection(bc->RedirList); @@ -195,6 +201,33 @@ VOID ExitBatch() bc = bc->prev; } +/* + * Load batch file into memory + * + */ +void BatchFile2Mem(HANDLE hBatchFile) +{ + TRACE ("BatchFile2Mem ()\n"); + + bc->memsize = GetFileSize(hBatchFile, NULL); + bc->mem = (char *)cmd_alloc(bc->memsize+1); /* 1 extra for '\0' */ + + /* if memory is available, read it in and close the file */ + if (bc->mem != NULL) + { + TRACE ("BatchFile2Mem memory %08x - %08x\n",bc->mem,bc->memsize); + SetFilePointer (hBatchFile, 0, NULL, FILE_BEGIN); + ReadFile(hBatchFile, (LPVOID)bc->mem, bc->memsize, &bc->memsize, NULL); + bc->mem[bc->memsize]='\0'; /* end this, so you can dump it as a string */ + bc->memfree=TRUE; /* this one needs to be freed */ + } + else + { + bc->memsize=0; /* this will prevent mem being accessed */ + bc->memfree=FALSE; + } + bc->mempos = 0; /* set position to the start */ +} /* * Start batch file execution @@ -209,31 +242,37 @@ INT Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd) LPFOR_CONTEXT saved_fc; INT i; INT ret = 0; + BOOL same_fn = FALSE; - HANDLE hFile; + HANDLE hFile = 0; SetLastError(0); - hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | - FILE_FLAG_SEQUENTIAL_SCAN, NULL); - - TRACE ("Batch: (\'%s\', \'%s\', \'%s\') hFile = %x\n", - debugstr_aw(fullname), debugstr_aw(firstword), debugstr_aw(param), hFile); - - if (hFile == INVALID_HANDLE_VALUE) + if (bc && bc->mem) { - ConErrResPuts(STRING_BATCH_ERROR); - return 1; + TCHAR fpname[MAX_PATH]; + GetFullPathName(fullname, sizeof(fpname) / sizeof(TCHAR), fpname, NULL); + if (_tcsicmp(bc->BatchFilePath,fpname)==0) + same_fn=TRUE; } + TRACE ("Batch: (\'%s\', \'%s\', \'%s\') same_fn = %d\n", + debugstr_aw(fullname), debugstr_aw(firstword), debugstr_aw(param), same_fn); + if (!same_fn) + { + hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | + FILE_FLAG_SEQUENTIAL_SCAN, NULL); + + if (hFile == INVALID_HANDLE_VALUE) + { + ConErrResPuts(STRING_BATCH_ERROR); + return 1; + } + } + if (bc != NULL && Cmd == bc->current) { /* Then we are transferring to another batch */ - CloseHandle (bc->hBatchFile); - bc->hBatchFile = INVALID_HANDLE_VALUE; - if (bc->params) - cmd_free (bc->params); - if (bc->raw_params) - cmd_free (bc->raw_params); + ClearBatch(); AddBatchRedirection(&Cmd->Redirections); } else @@ -261,15 +300,27 @@ INT Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd) /* Create a new context. This function will not * return until this context has been exited */ new.prev = bc; + /* copy some fields in the new structure if it is the same file */ + if (same_fn) { + new.mem = bc->mem; + new.memsize = bc->memsize; + new.mempos = 0; + new.memfree = FALSE; /* don't free this, being used before this */ + } bc = &new; bc->RedirList = NULL; bc->setlocal = setlocal; } GetFullPathName(fullname, sizeof(bc->BatchFilePath) / sizeof(TCHAR), bc->BatchFilePath, NULL); - - bc->hBatchFile = hFile; - SetFilePointer (bc->hBatchFile, 0, NULL, FILE_BEGIN); + /* if a new batch file, load it into memory and close the file */ + if (!same_fn) + { + BatchFile2Mem(hFile); + CloseHandle(hFile); + } + + bc->mempos = 0; /* goto begin of batch file */ bc->bEcho = bEcho; /* Preserve echo across batch calls */ for (i = 0; i < 10; i++) bc->shiftlevel[i] = i; @@ -339,6 +390,49 @@ VOID AddBatchRedirection(REDIRECTION **RedirList) *RedirList = NULL; } +/* + * Read a single line from the batch file from the current batch/memory position. + * Almost a copy of FileGetString with same UNICODE handling + */ +BOOL BatchGetString (LPTSTR lpBuffer, INT nBufferLength) +{ + LPSTR lpString; + INT len = 0; +#ifdef _UNICODE + lpString = cmd_alloc(nBufferLength); +#else + lpString = lpBuffer; +#endif + /* read all chars from memory until a '\n' is encountered */ + if (bc->mem) + { + for (; (bc->mempos < bc->memsize && len < (nBufferLength-1)); len++) + { + lpString[len] = bc->mem[bc->mempos++]; + if (lpString[len] == '\n' ) + { + len++; + break; + } + } + } + + if (!len) + { +#ifdef _UNICODE + cmd_free(lpString); +#endif + return FALSE; + } + + lpString[len++] = '\0'; +#ifdef _UNICODE + MultiByteToWideChar(OutputCodePage, 0, lpString, -1, lpBuffer, len); + cmd_free(lpString); +#endif + return TRUE; +} + /* * Read and return the next executable line form the current batch file * @@ -347,7 +441,6 @@ VOID AddBatchRedirection(REDIRECTION **RedirList) * * Set eflag to 0 if line is not to be echoed else 1 */ - LPTSTR ReadBatchLine () { TRACE ("ReadBatchLine ()\n"); @@ -360,7 +453,7 @@ LPTSTR ReadBatchLine () return NULL; } - if (!FileGetString (bc->hBatchFile, textline, sizeof (textline) / sizeof (textline[0]) - 1)) + if (!BatchGetString (textline, sizeof (textline) / sizeof (textline[0]) - 1)) { TRACE ("ReadBatchLine(): Reached EOF!\n"); /* End of file.... */ diff --git a/base/shell/cmd/batch.h b/base/shell/cmd/batch.h index 644fc35f6fb..ae44e67e6a2 100644 --- a/base/shell/cmd/batch.h +++ b/base/shell/cmd/batch.h @@ -9,7 +9,10 @@ typedef struct tagBATCHCONTEXT { struct tagBATCHCONTEXT *prev; - HANDLE hBatchFile; + char *mem; /* batchfile content in memory */ + DWORD memsize; /* size of batchfile */ + DWORD mempos; /* current position to read from */ + BOOL memfree; /* true if it need to be freed when exitbatch is called */ TCHAR BatchFilePath[MAX_PATH]; LPTSTR params; LPTSTR raw_params; /* Holds the raw params given by the input */ @@ -47,5 +50,6 @@ LPTSTR FindArg (TCHAR, BOOL *); LPTSTR BatchParams (LPTSTR, LPTSTR); VOID ExitBatch (VOID); INT Batch (LPTSTR, LPTSTR, LPTSTR, PARSED_COMMAND *); +BOOL BatchGetString (LPTSTR lpBuffer, INT nBufferLength); LPTSTR ReadBatchLine(VOID); -VOID AddBatchRedirection(REDIRECTION **); +VOID AddBatchRedirection(REDIRECTION **); diff --git a/base/shell/cmd/goto.c b/base/shell/cmd/goto.c index 192022713e7..3e285a5074f 100644 --- a/base/shell/cmd/goto.c +++ b/base/shell/cmd/goto.c @@ -74,14 +74,14 @@ INT cmd_goto (LPTSTR param) /* jump to end of the file */ if ( _tcsicmp( param, _T(":eof"))==0) { - SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_END); + bc->mempos=bc->memsize; /* position at the end of the batchfile */ return 0; } /* jump to begin of the file */ - SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_BEGIN); + bc->mempos=0; - while (FileGetString (bc->hBatchFile, textline, sizeof(textline) / sizeof(textline[0]))) + while (BatchGetString (textline, sizeof(textline) / sizeof(textline[0]))) { int pos; int size; diff --git a/base/shell/cmd/lang/de-DE.rc b/base/shell/cmd/lang/de-DE.rc index 081f108ec0c..3959cdbf0a6 100644 --- a/base/shell/cmd/lang/de-DE.rc +++ b/base/shell/cmd/lang/de-DE.rc @@ -2,7 +2,6 @@ * German language file by Klemens Friedl 2005-06-03 * Update: frik85 2005-06-06 */ -#pragma code_page(65001) LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE diff --git a/base/shell/cmd/lang/ja-JP.rc b/base/shell/cmd/lang/ja-JP.rc index 3195f0fbb1d..e6f45241884 100644 --- a/base/shell/cmd/lang/ja-JP.rc +++ b/base/shell/cmd/lang/ja-JP.rc @@ -1,7 +1,6 @@ /* * Japanese translation of CMD */ -#pragma code_page(65001) LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE diff --git a/base/shell/cmd/lang/pl-PL.rc b/base/shell/cmd/lang/pl-PL.rc index f8d2cb79a02..4eff17b0697 100644 --- a/base/shell/cmd/lang/pl-PL.rc +++ b/base/shell/cmd/lang/pl-PL.rc @@ -1,670 +1,673 @@ /* - * translated by Caemyr - * caemyr@gmail.com - * https://sourceforge.net/projects/reactospl + * translated by Caemyr - Olaf Siejka (Jan,2008) + * updated by niski - Maciej Bialas (Mar,2010) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_ASSOC_HELP, "Modyfikuje skojarzenia rozszerze plikw.\n\n\ +STRING_ASSOC_HELP, "Modyfikuje skojarzenia rozszerzeń plików.\n\n\ assoc [.ext[=[typPliku]]]\n\ \n\ -assoc (wywietla wszystkie skojarzenia)\n\ -assoc .ext (wywietla okrelone skojarzenie)\n\ -assoc .ext= (usuwa okrelone skojarzenie)\n\ +assoc (wyświetla wszystkie skojarzenia)\n\ +assoc .ext (wyświetla określone skojarzenie)\n\ +assoc .ext= (usuwa określone skojarzenie)\n\ assoc .ext=typPliku (dodaje nowe skojarzenie)\n" -STRING_ATTRIB_HELP, "Wywietla lub zmienia atrybuty plikw.\n\n\ +STRING_ATTRIB_HELP, "Wyświetla lub zmienia atrybuty plików.\n\n\ ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] nazwa_pliku ...\n\ [/S [/D]]\n\n\ + Ustawia atrybut\n\ - - Czyci atrybut\n\ + - Czyści atrybut\n\ R Atrybut pliku tylko do odczytu\n\ A Atrybut pliku archiwalnego\n\ S Atrybut pliku systemowego\n\ H Atrybut pliku ukrytego\n\ - /S Przetwarza wszystkie, pasujce pliki w biecym katalogu\n\ + /S Przetwarza wszystkie, pasujące pliki w bieżącym katalogu\n\ i we wszystkich podkatalogach\n\ - /D Przetwarza rwnie katalogi\n\n\ -Wpisz ATTRIB bez adnego parametru, by wywietli atrybuty wszystkich plikw.\n" + /D Przetwarza również katalogi\n\n\ +Wpisz ATTRIB bez żadnego parametru, by wyświetlić atrybuty wszystkich plików.\n" -STRING_ALIAS_HELP, "Ustawia, usuwa, a take wywietla aliasy.\n\n\ +STRING_ALIAS_HELP, "Ustawia, usuwa, a także wyświetla aliasy.\n\n\ ALIAS [nazwa=[tekst]]\n\n\ nazwa Nazwa aliasu.\n\ - tekst Cig tekstu, jaki ma zosta zastpiony aliasem.\n\n\ -Aby wywietli wszystkie aliasy:\n\ + tekst Ciąg tekstu, jaki ma zostać zastąpiony aliasem.\n\n\ +Aby wyświetlić wszystkie aliasy:\n\ ALIAS\n\n\ -Aby ustawi nowy albo zmieni ju istniejcy alias:\n\ +Aby ustawić nowy albo zmienić już istniejący alias:\n\ ALIAS da=dir a:\n\n\ -Aby usun istniejcy alias:\n\ +Aby usunąć istniejący alias:\n\ ALIAS da=" -STRING_BEEP_HELP, "Sygna dwikowy z gonika PC.\n\nBIIIIIP\n" +STRING_BEEP_HELP, "Sygnał dźwiękowy z głośnika PC.\n\nBIIIIIP\n" -STRING_CALL_HELP, "Umoliwia wywoanie programu wsadowego z poziomu innego.\n\n\ -CALL [napd:][cieka]nazwa_pliku [parametry]\n\n\ +STRING_CALL_HELP, "Umożliwia wywołanie programu wsadowego z poziomu innego.\n\n\ +CALL [napęd:][ścieżka]nazwa_pliku [parametry]\n\n\ parametry Wszelkie dane, wymagane przez program wsadowy,\n\ - ktry ma zosta wywoany." + który ma zostać wywołany." -STRING_CD_HELP, "Zmienia obecny katalog albo wywietla jego pen nazw. \n\n\ -CHDIR [/D][napd:][cieka]\n\ +STRING_CD_HELP, "Zmienia obecny katalog albo wyświetla jego pełną nazwę. \n\n\ +CHDIR [/D][napęd:][ścieżka]\n\ CHDIR[..|.]\n\ -CD [/D][napd:][cieka]\n\ +CD [/D][napęd:][ścieżka]\n\ CD[..|.]\n\n\ - .. katalog poziom wyej\n\ - . biecy katalog\n\ - /D Umoliwia zmian napdu.\n\n\ -Wpisz CD [napd:], by wywietli biecy katalog na danym napdzie.\n\ -Wpisz CD bez adnych parametrw, by wywietli biecy napd i katalog.\n" + .. katalog poziom wyżej\n\ + . bieżący katalog\n\ + /D Umożliwia zmianę napędu.\n\n\ +Wpisz CD [napęd:], by wyświetlić bieżący katalog na danym napędzie.\n\ +Wpisz CD bez żadnych parametrów, by wyświetlić bieżący napęd i katalog.\n" -STRING_CHCP_HELP, "Wywietla lub ustawia numer aktywnej strony kodowej.\n\n\ +STRING_CHCP_HELP, "Wyświetla lub ustawia numer aktywnej strony kodowej.\n\n\ CHCP [nnn]\n\n\ nnn Numer strony kodowej.\n\n\ -Wpisz CHCP bez parametru, by wywietli numer aktywnej strony kodowej.\n" +Wpisz CHCP bez parametru, by wyświetlić numer aktywnej strony kodowej.\n" -STRING_CHOICE_HELP, "Wywietla opcje jakimi dysponuje uytkownik i oczekuje na wybr jednej z nich.\n\n\ +STRING_CHOICE_HELP, "Wyświetla opcje jakimi dysponuje użytkownik i oczekuje na wybór jednej z nich.\n\n\ CHOICE [/C[:]opcje][/N][/S][/T[:]c,nn][tekst]\n\n\ - /C[:]opcje Wyznacza klawisze wywietlane jako wybr. Domylne: TN.\n\ - /N Nie wywietla klawiszy opcji ani znaku ? na kocu tekstu.\n\ - /S Komenda wyrni wielko liter przy wpisywaniu (n != N).\n\ - /T[:]c,nn Komenda zwrci domylny klawisz (c) po upywie (nn) sekund .\n\ - tekst Tekst wywietlany przy oczekiwaniu na wybr.\n\n\ -ERRORLEVEL ustawiony jest na kompensowanie wyboru uytkownika domylnym.\n" + /C[:]opcje Wyznacza klawisze wyświetlane jako wybór. Domyślne: TN.\n\ + /N Nie wyświetla klawiszy opcji ani znaku ? na końcu tekstu.\n\ + /S Komenda wyróżni wielkość liter przy wpisywaniu (n != N).\n\ + /T[:]c,nn Komenda zwróci domyślny klawisz (c) po upływie (nn) sekund .\n\ + tekst Tekst wyświetlany przy oczekiwaniu na wybór.\n\n\ +ERRORLEVEL ustawiony jest na kompensowanie wyboru użytkownika domyślnym.\n" -STRING_CLS_HELP, "Czyci ekran konsoli.\n\nCLS\n" +STRING_CLS_HELP, "Czyści ekran konsoli.\n\nCLS\n" -STRING_CMD_HELP1, "\nDostpne wewntrzne polecenia:\n" +STRING_CMD_HELP1, "\nDostępne wewnętrzne polecenia:\n" -STRING_CMD_HELP2, "\nDostpne opcje:" +STRING_CMD_HELP2, "\nDostępne opcje:" STRING_CMD_HELP3," [aliasy]" STRING_CMD_HELP4," [historia]" -STRING_CMD_HELP5," [dopenianie nazw unixa]" +STRING_CMD_HELP5," [dopełnianie nazw unixa]" STRING_CMD_HELP6," [stos katalogu]" STRING_CMD_HELP7," [przekierowania i potoki]" -STRING_CMD_HELP8, "Uruchamia nowe okno konsoli ReactOS (interpreter linii polece).\n\n\ +STRING_CMD_HELP8, "Uruchamia nowe okno konsoli ReactOS (interpreter linii poleceń).\n\n\ CMD [/[C|K] komenda][/P][/Q][/T:bf]\n\n\ - /C komenda Wykonuje podan komend i zamyka okno.\n\ - /K komenda Wykonuje podan komend i pozostawia okno.\n\ + /C komenda Wykonuje podaną komendę i zamyka okno.\n\ + /K komenda Wykonuje podaną komendę i pozostawia okno.\n\ /P CMD przetwarza autoexec.bat i pozostaje permanentny\n\ - (okno nie moe zosta zamknite).\n\ - /T:bf Ustawia kolor ta/tekstu (patrz komenda COLOR).\n" + (okno nie może zostać zamknięte).\n\ + /T:bf Ustawia kolor tła/tekstu (patrz komenda COLOR).\n" -STRING_COLOR_HELP1, "Ustawia domylny kolor ta i tekstu.\n\n\ +STRING_COLOR_HELP1, "Ustawia domyślny kolor tła i tekstu.\n\n\ COLOR [atr [/-F]] \n\n\ atr Ustawienia koloru \n\ - /-F Nie uzupenia kolorem pustych przestrzeni w konsoli\n\n\ -Ustawienia koloru mona wyznaczy na trzy sposoby:\n\ -1) [jasny] nazwa on [jasny] nazwa (wystarcz pierwsze trzy litery nazwy)\n\ + /-F Nie uzupełnia kolorem pustych przestrzeni w konsoli\n\n\ +Ustawienia koloru można wyznaczyć na trzy sposoby:\n\ +1) [jasny] nazwa on [jasny] nazwa (wystarczą pierwsze trzy litery nazwy)\n\ 2) numer_dec on numer_dec\n\ 3) dwa numery szesnastkowe\n\n\ -Dostpne kolory:\n\ +Dostępne kolory:\n\ dec hex nazwa dec hex nazwa\n\ 0 0 Czarny 8 8 Szary\n\ 1 1 Niebieski 9 9 Jasnoniebieski\n\ 2 2 Zielony 10 A Jasnozielony\n\ -3 3 Bkitny 11 B Jasnobkitny\n\ +3 3 Błękitny 11 B Jasnobłękitny\n\ 4 4 Czerwony 12 C Jasnoczerwony\n\ 5 5 Purpurowy 13 D Jasnopurpurowy\n\ -6 6 ty 14 E Jasnoty\n\ -7 7 Biay 15 F Jaskrawobiay\n" +6 6 Żółty 14 E Jasnożółty\n\ +7 7 Biały 15 F Jaskrawobiały\n" -STRING_COPY_HELP1, "Nadpisa %s (Tak/Nie/Zawsze)? " +STRING_COPY_HELP1, "Nadpisać %s (Tak/Nie/Zawsze)? " -STRING_COPY_HELP2, "Kopiuje jeden lub wicej plikw do wskazanej lokacji.\n\n\ -COPY [/V][/Y|/-Y][/A|/B] rdo [/A|/B]\n\ - [+ rdo [/A|/B] [+ ...]] [cel [/A|/B]]\n\n\ - rdo Miejsce, gdzie znajduj si plik(i) do skopiowania.\n\ - /A Wymusza traktowanie plikw jako tekstowych (ASCII).\n\ - /B Wymusza traktowanie plikw jako binarnych.\n\ +STRING_COPY_HELP2, "Kopiuje jeden lub więcej plików do wskazanej lokacji.\n\n\ +COPY [/V][/Y|/-Y][/A|/B] źródło [/A|/B]\n\ + [+ źródło [/A|/B] [+ ...]] [cel [/A|/B]]\n\n\ + źródło Miejsce, gdzie znajdują się plik(i) do skopiowania.\n\ + /A Wymusza traktowanie plików jako tekstowych (ASCII).\n\ + /B Wymusza traktowanie plików jako binarnych.\n\ cel Docelowy katalog/plik.\n\ - /V Weryfikuje prawidowo zapisu po skopiowaniu.\n\ - /Y Automatycznie potwierdza kad prb nadpisania ju\n\ - istniejcego pliku.\n\ - /-Y Wymusza kadorazowo potwierdzenie nadpisania ju\n\ - istniejcego pliku.\n\n\ -Opcja /Y moe znale si wrd zmiennych rodowiskowych COPYCMD.\n\ + /V Weryfikuje prawidłowość zapisu po skopiowaniu.\n\ + /Y Automatycznie potwierdza każdą próbę nadpisania już\n\ + istniejącego pliku.\n\ + /-Y Wymusza każdorazowo potwierdzenie nadpisania już\n\ + istniejącego pliku.\n\n\ +Opcja /Y może znaleźć się wśród zmiennych środowiskowych COPYCMD.\n\ ...\n" -STRING_DATE_HELP1, "\nPodaj now dat (mm%cdd%crrrr): " +STRING_DATE_HELP1, "\nPodaj nową datę (mm%cdd%crrrr): " -STRING_DATE_HELP2, "\nPodaj now dat (dd%cmm%crrrr): " +STRING_DATE_HELP2, "\nPodaj nową datę (dd%cmm%crrrr): " -STRING_DATE_HELP3, "\nPodaj now dat (rrrr%cmm%cdd): " +STRING_DATE_HELP3, "\nPodaj nową datę (rrrr%cmm%cdd): " -STRING_DATE_HELP4, "Wywietla lub zmienia dat systemow.\n\n\ +STRING_DATE_HELP4, "Wyświetla lub zmienia datę systemową.\n\n\ DATE [/T][data]\n\n\ - /T tylko wywietlenie\n\n\ -Wpisz DATE bez adnych parametrw, by wywietli obecn dat i\n\ -zapyta o now. Nacinicie ENTER od razu, pozostawia obecn.\n" + /T tylko wyświetlenie\n\n\ +Wpisz DATE bez żadnych parametrów, by wyświetlić obecną datę i\n\ +zapytać o nową. Naciśnięcie ENTER od razu, pozostawia obecną.\n" -STRING_DEL_HELP1, "Kasuje jeden lub wicej plikw.\n\n\ +STRING_DEL_HELP1, "Kasuje jeden lub więcej plików.\n\n\ DEL [/N /P /T /Q /S /W /Y /Z /A[[:]attributy]] plik ...\n\ DELETE [/N /P /T /Q /S /W /Y /Z /A[[:]attributy]] plik ...\n\ ERASE [/N /P /T /Q /S /W /Y /Z /A[[:]attributy]] plik ...\n\n\ plik Wyznacza pliki do skasowania.\n\n\ /N Nic.\n\ - /P Zapytanie przed skasowaniem kadego pliku.\n\ - /T Wywietla liczb skasowanych plikw i zwolnione przez nie miejsce.\n\ + /P Zapytanie przed skasowaniem każdego pliku.\n\ + /T Wyświetla liczbę skasowanych plików i zwolnione przez nie miejsce.\n\ /Q Tryb cichy.\n\ - /W Wymazywanie. Plik bdzie nadpisany losowym cigiem przed skasowaniem.\n\ - /Y Tak. Nawet przy *.* nie bdzie proby o potwierdzenie.\n\ - /F Wymusza kasowanie plikw Ukrytych, Systemowych i Tylko do odczytu.\n\ - /S Kasuje pliki take z podkatalogw\n\ - /A Wybr plikw do skasowania ze wzgldu na ich atrybuty:\n\ + /W Wymazywanie. Plik będzie nadpisany losowym ciągiem przed skasowaniem.\n\ + /Y Tak. Nawet przy *.* nie będzie prośby o potwierdzenie.\n\ + /F Wymusza kasowanie plików Ukrytych, Systemowych i Tylko do odczytu.\n\ + /S Kasuje pliki także z podkatalogów\n\ + /A Wybór plików do skasowania ze względu na ich atrybuty:\n\ R Tylko do odczytu\n\ S Systemowe\n\ A Archiwa\n\ H Ukryte\n\ - przedrostek NIE\n" -STRING_DEL_HELP2, "Wszystkie pliki w tym katalogu zostan skasowane!\nCzy jeste pewien (T/N)?" +STRING_DEL_HELP2, "Wszystkie pliki w tym katalogu zostaną skasowane!\nCzy jesteś pewien (T/N)?" STRING_DEL_HELP3, " %lu plik skasowany\n" -STRING_DEL_HELP4, " %lu pliki(-w) skasowane(-ych)\n" +STRING_DEL_HELP4, " %lu pliki(-ów) skasowane(-ych)\n" STRING_DELAY_HELP, "Pauzuje na n sekund lub milisekund\n\ DELAY [/m]n\n\n\ /m wymusza traktowanie n jako milisekund,\n\ - w innym wypadku bdzie traktowane jako sekundy\n" + w innym wypadku będzie traktowane jako sekundy\n" -STRING_DIR_HELP1, "DIR [napd:][cieka][pliki] [/A[[:]atrybuty]] [/B] [/C] [/D] [/L] [/N]\n\ - [/O[[:]porzdek]] [/P] [/Q] [/S] [/T[[:]czas]] [/W] [/X] [/4]\n\n\ - [napd:][cieka][nazwa_pliku]\n\ - Wyznacza liter napdu, katalog, i/lub pliki do wywietlenia.\n\n\ - /A Wywietla pliki o okrelonych atrybutach.\n\ +STRING_DIR_HELP1, "DIR [napęd:][ścieżka][pliki] [/A[[:]atrybuty]] [/B] [/C] [/D] [/L] [/N]\n\ + [/O[[:]porządek]] [/P] [/Q] [/S] [/T[[:]czas]] [/W] [/X] [/4]\n\n\ + [napęd:][ścieżka][nazwa_pliku]\n\ + Wyznacza literę napędu, katalog, i/lub pliki do wyświetlenia.\n\n\ + /A Wyświetla pliki o określonych atrybutach.\n\ atrybuty D Katalogi R Pliki tylko do odczytu\n\ H Pliki ukryte A Pliki do archiwizacji\n\ S Pliki systemowe - Przedrostek NIE\n\ - /B Format minimalny (bez nagwka i podsumowania).\n\ - /C Wywietla separator co trzy zera w rozmiarach plikw.\n\ - Opcja domylnie wczona. Aby wyczy, uyj: /-C .\n\ - /D To samo co format szeroki, ale pliki s posortowane kolumnami.\n\ - /L Uywa maych liter.\n\ - /N Nowy, dugi format plikw, gdzie nazwy znajduj si od prawej.\n\ - /O Sortowanie plikw wedug okrelonego porzdku.\n\ - sortorder N Wedug nazwy (alfabetycznie) S Wedug rozmiaru (rosnco)\n\ - E Wedug rozszerzenia (alfabet.) D Wedug daty (od najst.)\n\ - G Wywietla najpierw katalogi - Odwraca kolejno\n\ - /P Pauza po kadym penym ekranie.\n\ - /Q Wywietla waciciela plikw\n\ - /S Wywietla pliki w danym katalogu i wszystkich podkatalogach.\n\ - /T Pole czasu, odpowiedzialne za wywietlanie/sortowanie \n\ + /B Format minimalny (bez nagłówka i podsumowania).\n\ + /C Wyświetla separator co trzy zera w rozmiarach plików.\n\ + Opcja domyślnie włączona. Aby wyłączyć, użyj: /-C .\n\ + /D To samo co format szeroki, ale pliki są posortowane kolumnami.\n\ + /L Używa małych liter.\n\ + /N Nowy, długi format plików, gdzie nazwy znajdują się od prawej.\n\ + /O Sortowanie plików według określonego porządku.\n\ + sortorder N Według nazwy (alfabetycznie) S Według rozmiaru (rosnąco)\n\ + E Według rozszerzenia (alfabet.) D Według daty (od najst.)\n\ + G Wyświetla najpierw katalogi - Odwraca kolejność\n\ + /P Pauza po każdym pełnym ekranie.\n\ + /Q Wyświetla właściciela plików\n\ + /S Wyświetla pliki w danym katalogu i wszystkich podkatalogach.\n\ + /T Pole czasu, odpowiedzialne za wyświetlanie/sortowanie \n\ czas C Utworzenia\n\ A Ostatniego otwarcia\n\ W Ostatniej modyfikacji\n\ - /W Uywa szerokiego formatu wywietlania.\n\ - /X Wywietla krtkie nazwy, dla plikw nie w standardzie 8.3.\n\ - Format jest zbliony do tego przy /N z krtkimi nazwami,\n\ - umieszczonymi przed dugimi. Jeli plik nie ma krtkiej nazwy,\n\ - wywietlane jest puste pole.\n\ - /4 Wywietla lata w formacie czterocyfrowym.\n\n\ -Parametry mog znale si wrd zmiennych rodowiskowych DIRCMD. Mona\n\ -odwrci dziaanie parametrw przedrostkiem - (mylnik)-- na przykad, /-W.\n" + /W Używa szerokiego formatu wyświetlania.\n\ + /X Wyświetla krótkie nazwy, dla plików nie w standardzie 8.3.\n\ + Format jest zbliżony do tego przy /N z krótkimi nazwami,\n\ + umieszczonymi przed długimi. Jeśli plik nie ma krótkiej nazwy,\n\ + wyświetlane jest puste pole.\n\ + /4 Wyświetla lata w formacie czterocyfrowym.\n\n\ +Parametry mogą znaleźć się wśród zmiennych środowiskowych DIRCMD. Można\n\ +odwrócić działanie parametrów przedrostkiem - (myślnik)-- na przykład, /-W.\n" -STRING_DIR_HELP2, " Wolumin w napdzie %c ma etykiet: %s\n" -STRING_DIR_HELP3, " Wolumin w napdzie %c nie posiada etykiety.\n" +STRING_DIR_HELP2, " Wolumin w napędzie %c ma etykietę: %s\n" +STRING_DIR_HELP3, " Wolumin w napędzie %c nie posiada etykiety.\n" STRING_DIR_HELP4, " Numer seryjny woluminu to: %04X-%04X\n" -STRING_DIR_HELP5, "\n Ogem wywietonych:\n%16i plik(w)% 14s bajtw\n" -STRING_DIR_HELP6, "%16i katalog(w)% 15s bajtw\n" +STRING_DIR_HELP5, "\n Ogółem wyświetonych:\n%16i plik(ów)% 14s bajtów\n" +STRING_DIR_HELP6, "%16i katalog(ów)% 15s bajtów\n" STRING_DIR_HELP7, "\n katalog %s\n\n" -STRING_DIR_HELP8, "%16i plik(w)% 14s bajtw\n" +STRING_DIR_HELP8, "%16i plik(ów)% 14s bajtów\n" -STRING_DIRSTACK_HELP1, "Przechowuje obecny katalog dla potrzeb komendy POPD, nastpnie\n\ +STRING_DIRSTACK_HELP1, "Przechowuje obecny katalog dla potrzeb komendy POPD, następnie\n\ zmienia na podany.\n\n\ -PUSHD [cieka | ..]\n\n\ - cieka Okrela ciek dostpu do katalogu, podawanego do komendy\n" +PUSHD [ścieżka | ..]\n\n\ + ścieżka Określa ścieżkę dostępu do katalogu, podawanego do komendy\n" STRING_DIRSTACK_HELP2, "Zmienia katalog przechowywany w stosie przez PUSHD.\n\nPOPD" -STRING_DIRSTACK_HELP3, "Wywietla zawarto stosu katalogw.\n\nDIRS" +STRING_DIRSTACK_HELP3, "Wyświetla zawartość stosu katalogów.\n\nDIRS" -STRING_DIRSTACK_HELP4, "Stos katalogw jest pusty." +STRING_DIRSTACK_HELP4, "Stos katalogów jest pusty." -STRING_ECHO_HELP1, "Wywietla wiadomo bez nastpujcych po kadej linii znakw CR/LF.\n\n\ - ECHOS wiadomo" +STRING_ECHO_HELP1, "Wyświetla wiadomość bez następujących po każdej linii znaków CR/LF.\n\n\ + ECHOS wiadomość" -STRING_ECHO_HELP2, "Wywietla wiadomo dla domylnego odbiorcy bdw.\n\n\ - ECHOERR wiadomo)\n\ - ECHOERR. wywietla pust lini" +STRING_ECHO_HELP2, "Wyświetla wiadomość dla domyślnego odbiorcy błędów.\n\n\ + ECHOERR wiadomość)\n\ + ECHOERR. wyświetla pustą linię" -STRING_ECHO_HELP3, "Wywietla wiadomo dla domylnego odbiorcy bdw bez znakw CR/LF.\n\n\ - ECHOSERR wiadomo" +STRING_ECHO_HELP3, "Wyświetla wiadomość dla domyślnego odbiorcy błędów bez znaków CR/LF.\n\n\ + ECHOSERR wiadomość" -STRING_ECHO_HELP4, "Wywietla wiadomo albo wcza/wycza wywietlanie.\n\n\ +STRING_ECHO_HELP4, "Wyświetla wiadomość albo włącza/wyłącza wyświetlanie.\n\n\ ECHO [ON | OFF]\n\ - ECHO [wiadomo]\n\ - ECHO. wywietla pust lini\n\n\ -Wpisz ECHO bez adnych parametrw, by wywietli obecne ustawienie." + ECHO [wiadomość]\n\ + ECHO. wyświetla pustą linię\n\n\ +Wpisz ECHO bez żadnych parametrów, by wyświetlić obecne ustawienie." STRING_ECHO_HELP5, "ECHO jest %s\n" STRING_EXIT_HELP, "Zamyka okno konsoli.\n\nEXIT [/b] [kod]\n\n\ /B Zamyka jedynie plik wsadowy. \n\ - Jeli uyty bdzie poza plikiem wsadowym, zamknie cmd.exe\n\ - kod Ta warto zostanie przypisana do ERRORLEVEL przy wyjciu.\n" + Jeśli użyty będzie poza plikiem wsadowym, zamknie cmd.exe\n\ + kod Ta wartość zostanie przypisana do ERRORLEVEL przy wyjściu.\n" -STRING_FOR_HELP1, "Uruchamia wyznaczon komend dla kadego pliku w zestawie\n\n\ +STRING_FOR_HELP1, "Uruchamia wyznaczoną komendę dla każdego pliku w zestawie\n\n\ FOR %zmienna IN (zestaw) DO komenda [parametery]\n\n\ %zmienna Wyznacza zamienny parametr.\n\ - (zestaw) Definiuje zestaw plikw. Mona stosowa wieloznaczniki (np. *.*)\n\ - komenda Wyznacza komend do wykonania na zestawie plikw.\n\ + (zestaw) Definiuje zestaw plików. Można stosować wieloznaczniki (np. *.*)\n\ + komenda Wyznacza komendę do wykonania na zestawie plików.\n\ parametry Wyznacza parametry dla podanej komendy.\n\n\ -By uy FOR w pliku wsadowym, oznacz zmienn jako %%zmienna zamiast\n\ +By użyć FOR w pliku wsadowym, oznacz zmienną jako %%zmienna zamiast\n\ %zmienna.\n" -STRING_FREE_HELP1, "\nWolumin w napdzie %s ma etykiet: %-11s\n\ +STRING_FREE_HELP1, "\nWolumin w napędzie %s ma etykietę: %-11s\n\ Numer seryjny woluminu to: %s\n\ - %16s bajtw na dysku ogem\n\ - %16s bajtw zajte\n\ - %16s bajtw wolne\n" + %16s bajtów na dysku ogółem\n\ + %16s bajtów zajęte\n\ + %16s bajtów wolne\n" -STRING_FREE_HELP2, "Wywietla informacje o wolnym miejscu w napdzie.\n\nFREE [napd: ...]\n" +STRING_FREE_HELP2, "Wyświetla informacje o wolnym miejscu w napędzie.\n\nFREE [napęd: ...]\n" STRING_IF_HELP1, "Wykonuje przetwarzanie warunkowe w programach wsadowych.\n\n\ IF [NOT] ERRORLEVEL numer komenda\n\ - IF [NOT] cig_znakw1==cig_znakw2 komenda\n\ + IF [NOT] ciąg_znaków1==ciąg_znaków2 komenda\n\ IF [NOT] EXIST plik komenda\n\ IF [NOT] DEFINED zmienna komenda\n\n\ -NOT Oznacza, e CMD powinien wykona dane dziaanie tylko,\n\ - jeeli warunek nie jest speniony\n\ -ERRORLEVEL numer Zwraca PRAWDA, jeli ostatni dziaajcy program zwrci\n\ - kod bdu rwny lub wikszy od podanego.\n\ -komenda Komenda do wykonania, gdy warunek bdzie speniony.\n\ -cig1==cig2 Zwraca PRAWDA, gdy oba cigi znakw s identyczne\n\ -EXIST plik Zwraca PRAWDA, jeli podany plik istnieje.\n\ -DEFINED zmienna Zwraca PRAWDA, jeli podana zmienna zostaa zdefiniowana\n" +NOT Oznacza, że CMD powinien wykonać dane działanie tylko,\n\ + jeżeli warunek nie jest spełniony\n\ +ERRORLEVEL numer Zwraca PRAWDA, jeśli ostatni działający program zwrócił\n\ + kod błędu równy lub większy od podanego.\n\ +komenda Komenda do wykonania, gdy warunek będzie spełniony.\n\ +ciąg1==ciąg2 Zwraca PRAWDA, gdy oba ciągi znaków są identyczne\n\ +EXIST plik Zwraca PRAWDA, jeśli podany plik istnieje.\n\ +DEFINED zmienna Zwraca PRAWDA, jeśli podana zmienna została zdefiniowana\n" STRING_GOTO_HELP1, "Przekierowuje CMD do oznaczonej linii w programie wsadowym.\n\n\ GOTO etykieta\n\n\ - etykieta Cig znakw, uyty w programie wsadowym do oznaczenia linii.\n\n\ -Moesz oznaczy linie dowoln etykiet, zaczynajc od dwukropka." + etykieta Ciąg znaków, użyty w programie wsadowym do oznaczenia linii.\n\n\ +Możesz oznaczyć linie dowolną etykietą, zaczynając od dwukropka." -STRING_LABEL_HELP1, "Wywietla lub zmienia etykiet napdu.\n\nLABEL [napd:][etykieta]\n" +STRING_LABEL_HELP1, "Wyświetla lub zmienia etykietę napędu.\n\nLABEL [napęd:][etykieta]\n" -STRING_LABEL_HELP2, "Wolumin w napdzie %c: ma etykiet: %s\n" -STRING_LABEL_HELP3, "Wolumin w napdzie %c: nie posiada etykiety\n" +STRING_LABEL_HELP2, "Wolumin w napędzie %c: ma etykietę: %s\n" +STRING_LABEL_HELP3, "Wolumin w napędzie %c: nie posiada etykiety\n" STRING_LABEL_HELP4, "Numer seryjny woluminu to: %04X-%04X\n" -STRING_LABEL_HELP5, "Podaj etykiet (0-11 znakw, ENTER = brak etykiety) " +STRING_LABEL_HELP5, "Podaj etykietę (0-11 znaków, ENTER = brak etykiety) " -STRING_LOCALE_HELP1, "Czas biecy" +STRING_LOCALE_HELP1, "Czas bieżący" STRING_MKDIR_HELP, "Tworzy katalog.\n\n\ -MKDIR [napd:]cieka\nMD [napd:]cieka" +MKDIR [napęd:]ścieżka\nMD [napęd:]ścieżka" -STRING_MKLINK_HELP, "Tworzy dowizanie obiektu w systemie plikw.\n\n\ +STRING_MKLINK_HELP, "Tworzy dowiązanie obiektu w systemie plików.\n\n\ MKLINK [/D | /H | /J] nazwa_linku element_docelowy\n\n\ - /D Oznacza, e dowizanie symboliczne elementu docelowego jest katalogiem.\n\ - /H Tworzy dowizanie twarde.\n\ - /J Tworzy punkt poczenia katalogw.\n\n\ -Jeli nie zostay uyte zarwno /H jak i /J, zostanie utworzone dowizanie symboliczne." + /D Oznacza, że dowiązanie symboliczne elementu docelowego jest katalogiem.\n\ + /H Tworzy dowiązanie twarde.\n\ + /J Tworzy punkt połączenia katalogów.\n\n\ +Jeśli nie zostały użyte zarówno /H jak i /J, zostanie utworzone dowiązanie symboliczne." -STRING_MEMMORY_HELP1, "Wywietla ilo pamici systemowej.\n\nMEMORY" +STRING_MEMMORY_HELP1, "Wyświetla ilość pamięci systemowej.\n\nMEMORY" -STRING_MEMMORY_HELP2, "\n %12s%% pamici zajtej.\n\n\ - %13s bajtw pamici RAM ogem.\n\ - %13s bajtw pamici RAM dostpne.\n\n\ - %13s bajtw w pliku stronicowania ogem.\n\ - %13s bajtw dostpnych w pliku stronicowania.\n\n\ - %13s bajtw pamici wirtualnej ogem.\n\ - %13s bajtw pamici wirtualnej dostpne.\n" +STRING_MEMMORY_HELP2, "\n %12s%% pamięci zajętej.\n\n\ + %13s bajtów pamięci RAM ogółem.\n\ + %13s bajtów pamięci RAM dostępne.\n\n\ + %13s bajtów w pliku stronicowania ogółem.\n\ + %13s bajtów dostępnych w pliku stronicowania.\n\n\ + %13s bajtów pamięci wirtualnej ogółem.\n\ + %13s bajtów pamięci wirtualnej dostępne.\n" -STRING_MISC_HELP1, "Nacinij dowolny klawisz, aby kontynuowa...\n" +STRING_MISC_HELP1, "Naciśnij dowolny klawisz, aby kontynuować...\n" -STRING_MOVE_HELP1, "Nadpisa %s (Tak/Nie/Zawsze)? " +STRING_MOVE_HELP1, "Nadpisać %s (Tak/Nie/Zawsze)? " -STRING_MOVE_HELP2, "Przenosi, a take zmienia nazwy plikw i katalogw.\n\n\ -Aby przenie jeden lub wicej plikw:\n\ -MOVE [/N][napd:][cieka]nazwa_pliku1[,...] cel\n\n\ -Aby zmieni nazw katalogu:\n\ -MOVE [/N][napd:][cieka]nazwa1 nazwa2\n\n\ - [napd:][cieka]nazwa Wyznacza sciek dostpu do pliku lub \n\ - plikw, ktre chcesz przenie.\n\ - /N Nic. Zrb wszystko, oprcz przenoszenia plikw/katalogw.\n\n\ +STRING_MOVE_HELP2, "Przenosi, a także zmienia nazwy plików i katalogów.\n\n\ +Aby przenieść jeden lub więcej plików:\n\ +MOVE [/N][napęd:][ścieżka]nazwa_pliku1[,...] cel\n\n\ +Aby zmienić nazwę katalogu:\n\ +MOVE [/N][napęd:][ścieżka]nazwa1 nazwa2\n\n\ + [napęd:][ścieżka]nazwa Wyznacza scieżkę dostępu do pliku lub \n\ + plików, które chcesz przenieść.\n\ + /N Nic. Zrób wszystko, oprócz przenoszenia plików/katalogów.\n\n\ Obecne ograniczenia:\n\ - - Nie moesz przenie pliku ani katalogu z jednego napdu na inny.\n" + - Nie możesz przenieść pliku ani katalogu z jednego napędu na inny.\n" -STRING_MSGBOX_HELP, "Wywietla okno dialogowe i zwraca odpowied uytkownika\n\n\ -MSGBOX typ ['tytu'] tekst\n\n\ +STRING_MSGBOX_HELP, "Wyświetla okno dialogowe i zwraca odpowiedź użytkownika\n\n\ +MSGBOX typ ['tytuł'] tekst\n\n\ typ Rodzaj okna dialogowego\n\ - moliwe okna: OK, OKCANCEL,\n\ + możliwe okna: OK, OKCANCEL,\n\ YESNO, YESNOCANCEL\n\ -tytu Tytu okna dialogowego\n\ -tekst Tekst wywietlony w oknie dialogowym\n\n\n\ -Warto ERRORLEVEL wynosi zalenie od nacinitego przycisku:\n\n\ +tytuł Tytuł okna dialogowego\n\ +tekst Tekst wyświetlony w oknie dialogowym\n\n\n\ +Wartość ERRORLEVEL wynosi zależnie od naciśniętego przycisku:\n\n\ TAK : 10 | NIE : 11\n\ OK : 10 | ANULUJ : 12\n" -STRING_PATH_HELP1, "Wywietla lub ustawia ciek dostpu dla programw.\n\n\ -PATH [[napd:]cieka[;...]]\nPATH ;\n\n\ -Wpisz PATH ; jeli chcesz wyczyci wszystkie zapisane cieki dostpu i zmusi konsol\n\ -do przeszukiwania wycznie katalogu biecego.\n\ -Wpisz PATH bez adnych parametrw, by wywietli zapisane cieki dostpu.\n" +STRING_PATH_HELP1, "Wyświetla lub ustawia ścieżkę dostępu dla programów.\n\n\ +PATH [[napęd:]ścieżka[;...]]\nPATH ;\n\n\ +Wpisz PATH ; jeśli chcesz wyczyścić wszystkie zapisane ścieżki dostępu i zmusić konsolę\n\ +do przeszukiwania wyłącznie katalogu bieżącego.\n\ +Wpisz PATH bez żadnych parametrów, by wyświetlić zapisane ścieżki dostępu.\n" -STRING_PROMPT_HELP1, "Zmienia znak zachty.\n\n\ +STRING_PROMPT_HELP1, "Zmienia znak zachęty.\n\n\ PROMPT [tekst]\n\n\ - tekst Definiuje nowy znak zachty.\n\n\ -Znak zachty moe skada si z normalnych znakw, a take poniszych symboli:\n\n\ + tekst Definiuje nowy znak zachęty.\n\n\ +Znak zachęty może składać się z normalnych znaków, a także poniższych symboli:\n\n\ $A & (Et)\n\ $B | \n\ $C ( (lewy nawias)\n\ - $D Bieca data\n\ + $D Bieżąca data\n\ $E Znak ucieczki (kod ASCII 27)\n\ $F ) (prawy nawias)\n\ - $G > (znak wikszoci)\n\ + $G > (znak większości)\n\ $H (usuwa ostatni znak)\n\ - $L < (znak mniejszoci)\n\ - $N Biecy napd\n\ - $P Biecy napd i cieka\n\ - $Q = (znak rwnoci)\n\ - $T Biecy czas\n\ + $L < (znak mniejszości)\n\ + $N Bieżący napęd\n\ + $P Bieżący napęd i ścieżka\n\ + $Q = (znak równości)\n\ + $T Bieżący czas\n\ $V Wersja systemu\n\ $_ Znak CR/LF\n\ $$ $ (dolar)\n" -STRING_PAUSE_HELP1, "Zatrzymuje wykonywanie programu wsadowego i pokazuje wiadomo:\n\ -'Nacinij dowolny klawisz, aby kontynuowa...' albo inn dowoln.\n\n\ -PAUSE [wiadomo]" +STRING_PAUSE_HELP1, "Zatrzymuje wykonywanie programu wsadowego i pokazuje wiadomość:\n\ +'Naciśnij dowolny klawisz, aby kontynuować...' albo inną dowolną.\n\n\ +PAUSE [wiadomość]" -STRING_PROMPT_HELP2, " $+ Wywietla obecny poziom stosu katalogw" +STRING_PROMPT_HELP2, " $+ Wyświetla obecny poziom stosu katalogów" -STRING_PROMPT_HELP3, "\nWpisz PROMPT bez adnych parametrw, by powrci do ustawie domylnych." +STRING_PROMPT_HELP3, "\nWpisz PROMPT bez żadnych parametrów, by powrócić do ustawień domyślnych." -STRING_REM_HELP, "Definiuje lini komentarza w pliku wsadowym.\n\nREM [komentarz]" +STRING_REM_HELP, "Definiuje linię komentarza w pliku wsadowym.\n\nREM [komentarz]" STRING_RMDIR_HELP, "Usuwa katalog.\n\n\ -RMDIR [napd:]cieka\nRD [napd:]cieka\n\ -/S Kasuje take wszystkie pliki i podkatalogi w danym katalogu\n\ -/Q Nie wywietla proby o potwierdzenie\n" +RMDIR [napęd:]ścieżka\nRD [napęd:]ścieżka\n\ +/S Kasuje także wszystkie pliki i podkatalogi w danym katalogu\n\ +/Q Nie wyświetla prośby o potwierdzenie\n" STRING_RMDIR_HELP2, "Katalog nie jest pusty!\n" -STRING_REN_HELP1, "Zmienia nazw pliku/katalogu (take wielu).\n\n\ +STRING_REN_HELP1, "Zmienia nazwę pliku/katalogu (także wielu).\n\n\ RENAME [/E /N /P /Q /S /T] stara_nazwa ... nowa_nazwa\n\ REN [/E /N /P /Q /S /T] stara_nazwa ... nowa_nazwa\n\n\ - /E Bez komunikatw o bdach.\n\ + /E Bez komunikatów o błędach.\n\ /N Nic.\n\ - /P Wywietla prob o potwierdzenie przed kadym plikiem/katalogiem.\n\ + /P Wyświetla prośbę o potwierdzenie przed każdym plikiem/katalogiem.\n\ (nie jest jeszcze zaimplementowane)\n\ /Q Tryb cichy.\n\ - /S Zmienia take nazwy podkatalogw.\n\ - /T Wywietla podsumowanie iloci zmienionych nazw.\n\n\ -Uwaga: moesz rwnie poda now ciek dostpu dla zmienionych plikw. Uyj\n\ + /S Zmienia także nazwy podkatalogów.\n\ + /T Wyświetla podsumowanie ilości zmienionych nazw.\n\n\ +Uwaga: możesz również podać nową ścieżkę dostępu dla zmienionych plików. Użyj\n\ do tego komendy MOVE.\n" -STRING_REN_HELP2, " zmieniono nazw %lu pliku\n" +STRING_REN_HELP2, " zmieniono nazwę %lu pliku\n" -STRING_REN_HELP3, " zmieniono nazwy %lu plikw\n" +STRING_REN_HELP3, " zmieniono nazwy %lu plików\n" -STRING_SHIFT_HELP, "Zmienia pozycj parametru w pliku wsadowym.\n\n\ +STRING_SHIFT_HELP, "Zmienia pozycję parametru w pliku wsadowym.\n\n\ SHIFT [DOWN]" -STRING_SCREEN_HELP, "Przesuwa kursor i opcjonalnie wywietla tekst\n\n\ -SCREEN rzd kolumna [tekst]\n\n\ - rzd numer rzdu, do ktrego zostanie przesunity kursor\n\ - kolumna numer kolumny, do ktrej zostanie przesunity kursor" +STRING_SCREEN_HELP, "Przesuwa kursor i opcjonalnie wyświetla tekst\n\n\ +SCREEN rząd kolumna [tekst]\n\n\ + rząd numer rzędu, do którego zostanie przesunięty kursor\n\ + kolumna numer kolumny, do której zostanie przesunięty kursor" -STRING_SET_HELP, "Wywietla, ustawia lub usuwa zmienne rodowiskowe.\n\n\ +STRING_SET_HELP, "Wyświetla, ustawia lub usuwa zmienne środowiskowe.\n\n\ SET [zmienna[=][parametry]]\n\n\ - zmienna Okrela nazw zmiennej rodowiskowej.\n\ - parametry Okrela parametry przypisane do tej zmiennej.\n\n\ -Wpisz SET bez adnych parametrw, by wywietli obecne ustawienia zmiennych.\n" + zmienna Określa nazwę zmiennej środowiskowej.\n\ + parametry Określa parametry przypisane do tej zmiennej.\n\n\ +Wpisz SET bez żadnych parametrów, by wyświetlić obecne ustawienia zmiennych.\n" -STRING_START_HELP1, "Wywouje komend.\n\n\ +STRING_START_HELP1, "Wywołuje komendę.\n\n\ START komenda\n\n\ - komenda Okrela komend, jaka ma by wywoana.\n\n\ -Obecnie wszystkie komendy s uruchamiane asynchronicznie.\n" + komenda Określa komendę, jaka ma być wywołana.\n\n\ +Obecnie wszystkie komendy są uruchamiane asynchronicznie.\n" -STRING_TITLE_HELP, "Ustawia tytu dla okna ze znakiem zachty.\n\n\ -TITLE [tytu]\n\n\ -tytu Okrela tytu dla okna.\n" +STRING_TITLE_HELP, "Ustawia tytuł dla okna ze znakiem zachęty.\n\n\ +TITLE [tytuł]\n\n\ +tytuł Określa tytuł dla okna.\n" -STRING_TIME_HELP1, "Wywietla lub ustawia czas systemowy.\n\n\ +STRING_TIME_HELP1, "Wyświetla lub ustawia czas systemowy.\n\n\ TIME [/T][czas]\n\n\ - /T tylko wywietla\n\n\ -Wpisz TIME bez adnych parametrw, by wywietli obecny czas i\n\ -zapyta o nowy. Nacinicie ENTER bez podawania czasu zachowuje obecny.\n" + /T tylko wyświetla\n\n\ +Wpisz TIME bez żadnych parametrów, by wyświetlić obecny czas i\n\ +zapytać o nowy. Naciśnięcie ENTER bez podawania czasu zachowuje obecny.\n" -STRING_TIME_HELP2, "Wprowad nowy czas: " +STRING_TIME_HELP2, "Wprowadź nowy czas: " -STRING_TIMER_HELP1, "Upyno %d milisek.\n" +STRING_TIMER_HELP1, "Upłynęło %d milisek.\n" -STRING_TIMER_HELP2, "Upyno %02d%c%02d%c%02d%c%02d\n" +STRING_TIMER_HELP2, "Upłynęło %02d%c%02d%c%02d%c%02d\n" -STRING_TIMER_HELP3, "Umoliwia uycie stoperw (maksymalnie 10 na raz).\n\n\ +STRING_TIMER_HELP3, "Umożliwia użycie stoperów (maksymalnie 10 na raz).\n\n\ TIMER [ON|OFF] [/S] [/n] [/Fn]\n\n\ ON uruchamia stoper\n\ - OFF wycza stoper\n\ - /S Dzieli czas. Zwraca poow czasu\n\ + OFF wyłącza stoper\n\ + /S Dzieli czas. Zwraca połowę czasu\n\ na stoperze, bez zmieniania go.\n\ /n Definiuje numer stopera.\n\ - Dostpne s numery od 0 do 9\n\ - Domylnie stoper dostaje numer 1\n\ - /Fn Format wywietlania czasu,\n\ - n moliwoci:\n\ + Dostępne są numery od 0 do 9\n\ + Domyślnie stoper dostaje numer 1\n\ + /Fn Format wyświetlania czasu,\n\ + n możliwości:\n\ 0 millisekundy\n\ 1 hh%cmm%css%cdd\n\n\ -jeli nie podano w skadni parametrw: ON, OFF or /S, \n\ +jeśli nie podano w składni parametrów: ON, OFF or /S, \n\ komenda zmieni obecny stan stopera\n\n" -STRING_TYPE_HELP1, "Wywietla zawarto plikw tekstowych.\n\nTYPE [napd:][cieka]nazwa_pliku \n\ - /P Pauzuje po kadym penym ekranie.\n" +STRING_TYPE_HELP1, "Wyświetla zawartość plików tekstowych.\n\nTYPE [napęd:][ścieżka]nazwa_pliku \n\ + /P Pauzuje po każdym pełnym ekranie.\n" -STRING_VERIFY_HELP1, "Ta komenda jest tylko na podpuch\ -Odpowiada za to, czy po zapisaniu plikw ma nastpi sprawdzenie\n\ -poprawnoci tego zapisu.\n\n\ +STRING_VERIFY_HELP1, "Ta komenda jest tylko na podpuchę\ +Odpowiada za to, czy po zapisaniu plików ma nastąpić sprawdzenie\n\ +poprawności tego zapisu.\n\n\ VERIFY [ON | OFF]\n\n\ -Wpisz VERIFY bez adnych parametrw by sprawdzi aktualne ustawienie komendy.\n" +Wpisz VERIFY bez żadnych parametrów by sprawdzić aktualne ustawienie komendy.\n" STRING_VERIFY_HELP2, "Stan VERIFY: %s.\n" -STRING_VERIFY_HELP3, "Musisz okreli: ON czy OFF." +STRING_VERIFY_HELP3, "Musisz określić: ON czy OFF." -STRING_VERSION_HELP1, "Wywietla informacje o wersji powoki\n\n\ +STRING_VERSION_HELP1, "Wyświetla informacje o wersji powłoki\n\n\ VER [/C][/R][/W]\n\n\ - /C Wywietla podzikowania.\n\ - /R Wywietla informacje o redystrybucji.\n\ - /W Wywietla informacje o gwarancji." + /C Wyświetla podziękowania.\n\ + /R Wyświetla informacje o redystrybucji.\n\ + /W Wyświetla informacje o gwarancji." -STRING_VERSION_HELP2, " jest rozpowszechniany BEZ ADNEJ GWARANCJI; szczegy\n\ -dostpne - wpisz: `ver /w'. To jest darmowe oprogramowanie, i mona je\n\ -rozpowszechnia pod pewnymi warunkami: wpisz `ver /r'. Lista podzikowa pod\n\ +STRING_VERSION_HELP2, " jest rozpowszechniany BEZ ŻADNEJ GWARANCJI; szczegóły\n\ +dostępne - wpisz: `ver /w'. To jest darmowe oprogramowanie, i można je\n\ +rozpowszechniać pod pewnymi warunkami: wpisz `ver /r'. Lista podziękowań pod\n\ parametrem: `ver /c'." -STRING_VERSION_HELP3, "\n Program ten jest rozpowszechniany w dobrej wierze, ze wzgldu\n\ - na jego uyteczno, ale BEZ ADNEJ GWARANCJI; nie jest on przeznaczony\n\ - NA SPRZEDA, ani do uytku profesjonalnego. Szczegy dostpne w\n\ +STRING_VERSION_HELP3, "\n Program ten jest rozpowszechniany w dobrej wierze, ze względu\n\ + na jego użyteczność, ale BEZ ŻADNEJ GWARANCJI; nie jest on przeznaczony\n\ + NA SPRZEDAŻ, ani do użytku profesjonalnego. Szczegóły dostępne w\n\ GNU General Public License." -STRING_VERSION_HELP4, "\n To jest darmowe oprogramowanie; moesz je rozpowszechnia i modyfikowa,\n\ -o ile nie naruszasz warunkw GNU General Public License, w formie opublikowanej\n\ -przez Free Software Foundation; wersja 2 albo dowolna pniejsza.\n" +STRING_VERSION_HELP4, "\n To jest darmowe oprogramowanie; możesz je rozpowszechniać i modyfikować,\n\ +o ile nie naruszasz warunków GNU General Public License, w formie opublikowanej\n\ +przez Free Software Foundation; wersja 2 albo dowolna późniejsza.\n" -STRING_VERSION_HELP5, "\nRaporty o bdach prosimy przesya pod adres: .\n\ -Uaktualnienia dostpne na stronie: http://www.reactos.org" +STRING_VERSION_HELP5, "\nRaporty o błędach prosimy przesyłać pod adres: .\n\ +Uaktualnienia dostępne na stronie: http://www.reactos.org" STRING_VERSION_HELP6, "\nwersja FreeDOS, napisana przez:\n" STRING_VERSION_HELP7, "\nwersja ReactOS, napisana przez:\n" -STRING_VOL_HELP1, " Wolumin w napdzie %c ma etykiet: %s" -STRING_VOL_HELP2, " Wolumin w napdzie %c nie posiada etykiety.\n" +STRING_VOL_HELP1, " Wolumin w napędzie %c ma etykietę: %s" +STRING_VOL_HELP2, " Wolumin w napędzie %c nie posiada etykiety.\n" STRING_VOL_HELP3, " Numer seryjny woluminu to: %04X-%04X\n" -STRING_VOL_HELP4, "Wywietla etykiet woluminu w danym napdzie (o ile istnieje) i jego numer seryjny.\n\nVOL [napd:]" +STRING_VOL_HELP4, "Wyświetla etykietę woluminu w danym napędzie (o ile istnieje) i jego numer seryjny.\n\nVOL [napęd:]" -STRING_WINDOW_HELP1, "Zmienia wymiar i pozycj danego okna konsoli\n\n\ +STRING_WINDOW_HELP1, "Zmienia wymiar i pozycję danego okna konsoli\n\n\ WINDOW [/POS[=]left,top,width,heigth]\n\ - [MIN|MAX|RESTORE] ['tytu']\n\n\ -/POS okrela pooenie i rozmiary okna\n\ + [MIN|MAX|RESTORE] ['tytuł']\n\n\ +/POS określa położenie i rozmiary okna\n\ MIN minimalizuje okno\n\ MAX maksymalizuje okno\n\ RESTORE odtwarza standardowe ustawienia okna" -STRING_WINDOW_HELP2, "Zmienia wymiar i pozycj okrelonego okna konsoli\n\n\ -ACTIVATE 'tytu' [/POS[=]left,top,width,heigth]\n\ - [MIN|MAX|RESTORE] ['nowy_tytu']\n\n\ -window tytu okna, na ktrym zostan przeprowadzone zmiany\n\ -/POS okrela pooenie i rozmiary okna\n\ +STRING_WINDOW_HELP2, "Zmienia wymiar i pozycję określonego okna konsoli\n\n\ +ACTIVATE 'tytuł' [/POS[=]left,top,width,heigth]\n\ + [MIN|MAX|RESTORE] ['nowy_tytuł']\n\n\ +window tytuł okna, na którym zostaną przeprowadzone zmiany\n\ +/POS określa położenie i rozmiary okna\n\ MIN minimalizuje okno\n\ MAX maksymalizuje okno\n\ RESTORE odtwarza standardowe ustawienia okna\n\ -title nowy tytu okna\n" +title nowy tytuł okna\n" -STRING_HELP1, "Lista wszystkich dostpnych komend (+opisy)\n\n\ - komenda /? Wywietla dokadny opis danej komendy\n\n\ -? Lista wszystkich dostpnych komend (bez opisw).\n\ +STRING_HELP1, "Lista wszystkich dostępnych komend (+opisy)\n\n\ + komenda /? Wyświetla dokładny opis danej komendy\n\n\ +? Lista wszystkich dostępnych komend (bez opisów).\n\ ALIAS Ustawia, pokazuje lub usuwa aliasy.\n\ -ATTRIB Wywietla lub zmienia atrybuty plikw.\n\ -BEEP Sygna przez gonik PC.\n\ -CALL Wywouje program wsadowy z poziomu innego.\n\ -CD Wywietla ciek lub przechodzi do innego katalogu.\n\ -CHCP Wywietla lub ustawia biec stron kodow.\n\ -CHOICE Przedstawia uytkownikowi kilka moliwoci i czeka na wybr.\n\ -CLS Czyci ekran.\n\ +ATTRIB Wyświetla lub zmienia atrybuty plików.\n\ +BEEP Sygnał przez głośnik PC.\n\ +CALL Wywołuje program wsadowy z poziomu innego.\n\ +CD Wyświetla ścieżkę lub przechodzi do innego katalogu.\n\ +CHCP Wyświetla lub ustawia bieżącą stronę kodową.\n\ +CHOICE Przedstawia użytkownikowi kilka możliwości i czeka na wybór.\n\ +CLS Czyści ekran.\n\ CMD Uruchamia kolejne okno konsoli ReactOS.\n\ -COLOR Ustawia kolory ta i tekstu w oknie konsoli.\n\ -COPY Kopiuje jeden lub wicej plikw w inne miejsce.\n\ -DATE Wywietla lub ustawia dat.\n\ -DELETE Kasuje jeden lub wicej plikw.\n\ -DIR Wywietla list plikw i podkatalogw w danym katalogu.\n\ -ECHO Wywietla wiadomoci albo wcza/wycza komend ECHO.\n\ -ERASE Kasuje jeden lub wicej plikw.\n\ -EXIT Zamyka biece okno konsoli.\n\ -FOR Wykonuje okrelon komend dla kadego pliku z okrelonej listy.\n\ +COLOR Ustawia kolory tła i tekstu w oknie konsoli.\n\ +COPY Kopiuje jeden lub więcej plików w inne miejsce.\n\ +DATE Wyświetla lub ustawia datę.\n\ +DELETE Kasuje jeden lub więcej plików.\n\ +DIR Wyświetla listę plików i podkatalogów w danym katalogu.\n\ +ECHO Wyświetla wiadomości albo włącza/wyłącza komendę ECHO.\n\ +ERASE Kasuje jeden lub więcej plików.\n\ +EXIT Zamyka bieżące okno konsoli.\n\ +FOR Wykonuje określoną komendę dla każdego pliku z określonej listy.\n\ FREE Wolne miejsce na dysku.\n\ -GOTO Kieruje interpreter polece do okrelonej linii,\n\ +GOTO Kieruje interpreter poleceń do określonej linii,\n\ oznaczonej, w danym programie wsadowym.\n\ HELP Lista komend konsoli ReactOS wraz z opisem.\n\ -HISTORY Lista uytych komend.\n\ +HISTORY Lista użytych komend.\n\ IF Przetwarzanie warunkowe w programach wsadowych.\n\ -LABEL Tworzy, zmienia lub kasuje etykiet woluminu w danym napdzie.\n\ +LABEL Tworzy, zmienia lub kasuje etykietę woluminu w danym napędzie.\n\ MD Tworzy katalog.\n\ MKDIR Tworzy katalog.\n\ -MKLINK Tworzy dowizanie obiektu w systemie plikw.\n\ -MOVE Przenosi jeden lub wicej plikw z jednego katalogu do drugiego.\n\ -PATH Wywietla lub ustawia cieki dostpu dla programw.\n\ -PAUSE Zawiesza przetwarzanie programu wsadowego i wywietla komunikat.\n\ -POPD Odtwarza poprzedni nazw danego katalogu, zapisan przez\n\ +MKLINK Tworzy dowiązanie obiektu w systemie plików.\n\ +MOVE Przenosi jeden lub więcej plików z jednego katalogu do drugiego.\n\ +PATH Wyświetla lub ustawia ścieżki dostępu dla programów.\n\ +PAUSE Zawiesza przetwarzanie programu wsadowego i wyświetla komunikat.\n\ +POPD Odtwarza poprzednią nazwę danego katalogu, zapisaną przez\n\ PUSHD.\n\ -PROMPT Zmienia znak zachty w linii polece.\n\ -PUSHD Zapisuje obecn nazw katalogu, po czym zmienia j.\n\ +PROMPT Zmienia znak zachęty w linii poleceń.\n\ +PUSHD Zapisuje obecną nazwę katalogu, po czym zmienia ją.\n\ RD Usuwa katalog.\n\ REM Oznaczenie linii komentarza w programie wsadowym.\n\ -REN Zmienia nazw pliku lub plikw.\n\ -RENAME Zmienia nazw pliku lub plikw.\n\ +REN Zmienia nazwę pliku lub plików.\n\ +RENAME Zmienia nazwę pliku lub plików.\n\ RMDIR Usuwa katalog.\n\ -SCREEN Przenosi kursor i opcjonalnie wywietla tekst.\n\ -SET Wywietla, ustawia lub usuwa zmienne rodowiskowe.\n\ +SCREEN Przenosi kursor i opcjonalnie wyświetla tekst.\n\ +SET Wyświetla, ustawia lub usuwa zmienne środowiskowe.\n\ SHIFT Przenosi zamienne parametry w programach wsadowych.\n" -STRING_HELP2, "START Uruchamia oddzielne okno do wykonania okrelonego polecenia lub komendy.\n\ +STRING_HELP2, "START Uruchamia oddzielne okno do wykonania określonego polecenia lub komendy.\n\ Wykonuje polecenie.\n\ -TIME Wywietla lub zmienia czas systemowy.\n\ -TIMER Pozwala na uycie do 10 stoperw.\n\ -TITLE Ustanawia tytu dla danej sesji CMD.EXE.\n\ -TYPE Wywietla zawarto pliku tekstowego.\n\ -VER Wywietla wersj systemu ReactOS.\n\ -VERIFY Decyduje czy ReactOS ma sprawdza poprawno zapisu plikw\n\ +TIME Wyświetla lub zmienia czas systemowy.\n\ +TIMER Pozwala na użycie do 10 stoperów.\n\ +TITLE Ustanawia tytuł dla danej sesji CMD.EXE.\n\ +TYPE Wyświetla zawartość pliku tekstowego.\n\ +VER Wyświetla wersję systemu ReactOS.\n\ +VERIFY Decyduje czy ReactOS ma sprawdzać poprawność zapisu plików\n\ na dysku.\n\ -VOL Wywietla etykiet woluminu na danym napdzie i numer seryjny.\n" +VOL Wyświetla etykietę woluminu na danym napędzie i numer seryjny.\n" STRING_CHOICE_OPTION, "TN" STRING_COPY_OPTION, "TNZ" -STRING_ALIAS_ERROR, "Linia polece zbyt duga po rozszerzeniu aliasa!\n" +STRING_ALIAS_ERROR, "Linia poleceń zbyt długa po rozszerzeniu aliasa!\n" STRING_ASSOC_ERROR, "File association not found for extension %s\n" -STRING_BATCH_ERROR, "Bd podczas otwierania pliku wsadowego\n" +STRING_BATCH_ERROR, "Błąd podczas otwierania pliku wsadowego\n" STRING_CHCP_ERROR1, "Aktywna strona kodowa nr: %u\n" -STRING_CHCP_ERROR4, "Niewaciwy numer strony kodowej\n" +STRING_CHCP_ERROR4, "Niewłaściwy numer strony kodowej\n" STRING_CHOICE_ERROR, "Parametr niepoprawny. Poprawna forma: /C[:]opcja" STRING_CHOICE_ERROR_TXT, "Parametr niepoprawny. Poprawna forma: /T[:]c,nn" -STRING_CHOICE_ERROR_OPTION, "Zy parametr: %s" -STRING_MD_ERROR, "Istnieje ju plik lub podkatalog o tej nazwie.\n" -STRING_MD_ERROR2, "cieka do nowego katalogu nie jest prawidowa.\n" -STRING_CMD_ERROR1, "Nie mona przekierowa danych z pliku %s\n" -STRING_CMD_ERROR2, "Bd podczas tworzenia potokowego pliku tymczasowego\n" -STRING_CMD_ERROR3, "Nie mona przekierowa do pliku %s\n" +STRING_CHOICE_ERROR_OPTION, "Zły parametr: %s" +STRING_MD_ERROR, "Istnieje już plik lub podkatalog o tej nazwie.\n" +STRING_MD_ERROR2, "Ścieżka do nowego katalogu nie jest prawidłowa.\n" +STRING_CMD_ERROR1, "Nie można przekierować danych z pliku %s\n" +STRING_CMD_ERROR2, "Błąd podczas tworzenia potokowego pliku tymczasowego\n" +STRING_CMD_ERROR3, "Nie można przekierować do pliku %s\n" STRING_CMD_ERROR4, "Wykonywanie %s...\n" STRING_CMD_ERROR5, "Wykonywanie cmdexit.bat...\n" -STRING_COLOR_ERROR1, "Bd! Kolor ta i tekstu nie moe by taki sam" -STRING_COLOR_ERROR2, "Bd w oznaczeniu kolorw." +STRING_COLOR_ERROR1, "Błąd! Kolor tła i tekstu nie może być taki sam" +STRING_COLOR_ERROR2, "Błąd w oznaczeniu kolorów." STRING_COLOR_ERROR3, "Kolor %x\n" -STRING_COLOR_ERROR4, "Bd - kolory takie same!" -STRING_CONSOLE_ERROR, "Nieznany bd: %d\n" -STRING_COPY_ERROR1, "Bd: Nie mona otworzy rda - %s!\n" -STRING_COPY_ERROR2, "Bd: Nie mona przekopiowa pliku na niego samego!\n" -STRING_COPY_ERROR3, "Bd zapisu na miejscu docelowym!\n" -STRING_COPY_ERROR4, "Bd: Nie zaimplementowano!\n" -STRING_DATE_ERROR, "Data nieprawidowa." +STRING_COLOR_ERROR4, "Błąd - kolory takie same!" +STRING_CONSOLE_ERROR, "Nieznany błąd: %d\n" +STRING_COPY_ERROR1, "Błąd: Nie można otworzyć źródła - %s!\n" +STRING_COPY_ERROR2, "Błąd: Nie można przekopiować pliku na niego samego!\n" +STRING_COPY_ERROR3, "Błąd zapisu na miejscu docelowym!\n" +STRING_COPY_ERROR4, "Błąd: Nie zaimplementowano!\n" +STRING_DATE_ERROR, "Data nieprawidłowa." STRING_DEL_ERROR5, "Plik %s zostanie skasowany! " -STRING_DEL_ERROR6, "Czy jeste pewien (T/N)?" +STRING_DEL_ERROR6, "Czy jesteś pewien (T/N)?" STRING_DEL_ERROR7, "Kasowanie: %s\n" -STRING_ERROR_ERROR1, "Nieznany bd! Kod bdu: 0x%lx\n" -STRING_ERROR_ERROR2, "Bd skadni" +STRING_ERROR_ERROR1, "Nieznany błąd! Kod błędu: 0x%lx\n" +STRING_ERROR_ERROR2, "Błąd składni" STRING_FOR_ERROR1, "Brak 'in' dla twierdzenia." -STRING_FOR_ERROR2, "Nawias nie zosta znaleziony." +STRING_FOR_ERROR2, "Nawias nie został znaleziony." STRING_FOR_ERROR3, "Brakuje 'do'." STRING_FOR_ERROR4, "Brak komendy po 'do'." -STRING_FREE_ERROR1, "Nieprawidowa litera napdu" +STRING_FREE_ERROR1, "Nieprawidłowa litera napędu" STRING_FREE_ERROR2, "brak" STRING_GOTO_ERROR1, "Brak etykiety dla GOTO" -STRING_GOTO_ERROR2, "Etykieta '%s' nie zostaa znaleziona\n" +STRING_GOTO_ERROR2, "Etykieta '%s' nie została znaleziona\n" STRING_MOVE_ERROR1, "[OK]\n" -STRING_MOVE_ERROR2, "[Bd]\n" +STRING_MOVE_ERROR2, "[Błąd]\n" -STRING_REN_ERROR1, "MoveFile() nieudane. Bd: %lu\n" +STRING_REN_ERROR1, "MoveFile() nieudane. Błąd: %lu\n" -STRING_START_ERROR1, "Programy wsadowe nie zostay jeszcze zaimplementowane!" +STRING_START_ERROR1, "Programy wsadowe nie zostały jeszcze zaimplementowane!" -STRING_TIME_ERROR1, "Nieprawidowy czas." +STRING_TIME_ERROR1, "Nieprawidłowy czas." -STRING_TYPE_ERROR1, "Nieprawidowa opcja '/%s'\n" +STRING_TYPE_ERROR1, "Nieprawidłowa opcja '/%s'\n" -STRING_WINDOW_ERROR1, "Okno nie zostao odnalezione" +STRING_WINDOW_ERROR1, "Okno nie zostało odnalezione" -STRING_ERROR_PARAMETERF_ERROR, "Format parametrw nieprawidowy - %c\n" -STRING_ERROR_INVALID_SWITCH, "Niewaciwy argument - /%c\n" -STRING_ERROR_TOO_MANY_PARAMETERS, "Zbyt wiele parametrw - %s\n" -STRING_ERROR_PATH_NOT_FOUND, "cieka nie zostaa znaleziona\n" -STRING_ERROR_FILE_NOT_FOUND, "Plik nie zosta znaleziony\n" +STRING_ERROR_PARAMETERF_ERROR, "Format parametrów nieprawidłowy - %c\n" +STRING_ERROR_INVALID_SWITCH, "Niewłaściwy argument - /%c\n" +STRING_ERROR_TOO_MANY_PARAMETERS, "Zbyt wiele parametrów - %s\n" +STRING_ERROR_PATH_NOT_FOUND, "Ścieżka nie została znaleziona\n" +STRING_ERROR_FILE_NOT_FOUND, "Plik nie został znaleziony\n" STRING_ERROR_REQ_PARAM_MISSING, "Brak wymaganego parametru\n" -STRING_ERROR_INVALID_DRIVE, "Nieprawidowe okrelenie napdu\n" -STRING_ERROR_INVALID_PARAM_FORMAT, "Niewaciwy format parametru - %s\n" -STRING_ERROR_BADCOMMAND, "Nieprawidowa komenda lub nazwa pliku - %s\n" -STRING_ERROR_OUT_OF_MEMORY, "Bd - brak pamici.\n" -STRING_ERROR_CANNOTPIPE, "Bd potokw! Nie mona otworzy pliku tymczasowego.\n" -STRING_ERROR_D_PAUSEMSG, "Nacinij dowolny klawisz, aby kontynuowa . . ." -STRING_ERROR_DRIVER_NOT_READY, "Napd nie jest gotowy" +STRING_ERROR_INVALID_DRIVE, "Nieprawidłowe określenie napędu\n" +STRING_ERROR_INVALID_PARAM_FORMAT, "Niewłaściwy format parametru - %s\n" +STRING_ERROR_BADCOMMAND, "Nieprawidłowa komenda lub nazwa pliku - %s\n" +STRING_ERROR_OUT_OF_MEMORY, "Błąd - brak pamięci.\n" +STRING_ERROR_CANNOTPIPE, "Błąd potoków! Nie można otworzyć pliku tymczasowego.\n" +STRING_ERROR_D_PAUSEMSG, "Naciśnij dowolny klawisz, aby kontynuować . . ." +STRING_ERROR_DRIVER_NOT_READY, "Napęd nie jest gotowy" -STRING_PATH_ERROR, "CMD: Poza rodowiskiem '%s'\n" +STRING_PATH_ERROR, "CMD: Poza środowiskiem '%s'\n" STRING_REACTOS_VERSION, "ReactOS Operating System [Version %s-%s]\n" -STRING_CMD_SHELLINFO, "\nInterpreter linii polece ReactOS\nVersion %s %s" -STRING_VERSION_RUNVER, " dziaajcy na %s" -STRING_COPY_FILE , " %d plik(w) skopiowano\n" +STRING_CMD_SHELLINFO, "\nInterpreter linii poleceń ReactOS\nVersion %s %s" +STRING_VERSION_RUNVER, " działający na %s" +STRING_COPY_FILE , " %d plik(ów) skopiowano\n" STRING_DELETE_WIPE, "skasowano" -STRING_FOR_ERROR, "ze okrelenie zmiennej." -STRING_SCREEN_COL, "nieprawidowy numer kolumny" -STRING_SCREEN_ROW, "nieprawidowy numer rzdu" +STRING_FOR_ERROR, "złe określenie zmiennej." +STRING_SCREEN_COL, "nieprawidłowy numer kolumny" +STRING_SCREEN_ROW, "nieprawidłowy numer rzędu" STRING_TIMER_TIME "Stoper %d czas - %s: " -STRING_MKLINK_CREATED_SYMBOLIC, "Dowizanie symboliczne utworzone dla %s <<===>> %s\n" -STRING_MKLINK_CREATED_HARD, "Dowizanie twarde utworzone dla %s <<===>> %s\n" -STRING_MKLINK_CREATED_JUNCTION, "Punkt dowizania katalogw utworzony dla %s <<===>> %s\n" -STRING_MORE, "Wicej? " -STRING_CANCEL_BATCH_FILE, "\r\nWcinito Ctrl-Break. Anulowa wykonanie pliku wsadowego? (Tak/Nie/Zawsze) " +STRING_MKLINK_CREATED_SYMBOLIC, "Dowiązanie symboliczne utworzone dla %s <<===>> %s\n" +STRING_MKLINK_CREATED_HARD, "Dowiązanie twarde utworzone dla %s <<===>> %s\n" +STRING_MKLINK_CREATED_JUNCTION, "Punkt dowiązania katalogów utworzony dla %s <<===>> %s\n" +STRING_MORE, "Więcej? " +STRING_CANCEL_BATCH_FILE, "\r\nWciśnięto Ctrl-Break. Anulować wykonanie pliku wsadowego? (Tak/Nie/Zawsze) " -STRING_INVALID_OPERAND, "Nieprawidowy argument operatora." +STRING_INVALID_OPERAND, "Nieprawidłowy argument operatora." STRING_EXPECTED_CLOSE_PAREN, "Oczekiwano ')'." STRING_EXPECTED_NUMBER_OR_VARIABLE,"Oczekiwano liczby lub nazwy zmiennej." -STRING_SYNTAX_COMMAND_INCORRECT, "Skadnia komendy jest nieprawidowa." +STRING_SYNTAX_COMMAND_INCORRECT, "Składnia komendy jest nieprawidłowa." END diff --git a/base/shell/cmd/lang/ru-RU.rc b/base/shell/cmd/lang/ru-RU.rc index c09389263fb..293721298d1 100644 --- a/base/shell/cmd/lang/ru-RU.rc +++ b/base/shell/cmd/lang/ru-RU.rc @@ -5,7 +5,6 @@ * Aleksey Bragin (aleksey@reactos.com) * Copyright 2005 */ -#pragma code_page(65001) LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE diff --git a/base/shell/cmd/lang/uk-UA.rc b/base/shell/cmd/lang/uk-UA.rc index 680a2ae8bc4..c52af859327 100644 --- a/base/shell/cmd/lang/uk-UA.rc +++ b/base/shell/cmd/lang/uk-UA.rc @@ -10,718 +10,718 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_ASSOC_HELP, "i ii .\n\n\ -assoc [.[=[]]]\n\ +STRING_ASSOC_HELP, "Змiна асоцiацiй файлових розширень.\n\n\ +assoc [.рош[=[ФайлТип]]]\n\ \n\ -assoc ( i ii)\n\ -assoc . ( ii ii)\n\ -assoc .= ( ii ii)\n\ -assoc .= ( ii)\n" +assoc (друк всiх асоцiацiй)\n\ +assoc .рош (друк вiдповiдної асоцiацiї)\n\ +assoc .рош= (видалення вiдповiдної асоцiацiї)\n\ +assoc .рош=ФайлТип (додати нову асоцiацiю)\n" -STRING_ATTRIB_HELP, "³ .\n\n\ -ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] ...\n\ +STRING_ATTRIB_HELP, "Відображення або зміна атрибутів файлу.\n\n\ +ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] файл ...\n\ [/S [/D]]\n\n\ - + \n\ - - \n\ - R "" ""\n\ - A ""i""\n\ - S """"\n\ - H """"\n\ - /S i i i i i\n\ - i i\n\ - /D i \n\n\ -i ATTRIB , i i.\n" + + Встановлення атрибуту\n\ + - Зняття атрибуту\n\ + R Атрибут файлу ""Лише читання""\n\ + A Атрибут файлу ""Архiвний""\n\ + S Атрибут файлу ""Системний""\n\ + H Атрибут файлу ""Прихований""\n\ + /S Обробка файлiв зi вказаними iменами в поточнiй тецi\n\ + i у всіх її пiдтеках\n\ + /D Обробка також i тек\n\n\ +Введiть ATTRIB без параметра, щоб вивести атрибути всiх файлiв.\n" -STRING_ALIAS_HELP, ", ii.\n\n\ -ALIAS [i=[]]\n\n\ - i I' i.\n\ - , i i i.\n\n\ - i ii:\n\ +STRING_ALIAS_HELP, "Встановлення, видалення або показ псевдонiмiв.\n\n\ +ALIAS [псевдонiм=[команда]]\n\n\ + псевдонiм Iм'я псевдонiма.\n\ + команда Текст, що пiдставляється замiсть псевдонiма.\n\n\ +Виведення списку всiх псевдонiмiв:\n\ ALIAS\n\n\ - i i i:\n\ +Встановлення або змiна iснуючого псевдонiма:\n\ ALIAS da=dir a:\n\n\ - i i :\n\ +Видалення псевдонiма зi списку:\n\ ALIAS da=" -STRING_BEEP_HELP, " i.\n\nBEEP\n" +STRING_BEEP_HELP, "Звуковий сигнал динамiка.\n\nBEEP\n" -STRING_CALL_HELP, " i i.\n\n\ -CALL [:][]i'_ []\n\n\ - i i , i \n\ - ." +STRING_CALL_HELP, "Виклик однiєї пакетної програми з iншої.\n\n\ +CALL [диск:][шлях]iм'я_файла [параметри]\n\n\ + параметри Набiр параметрiв командного рядка, необхiдних для пакетного\n\ + файлу." -STRING_CD_HELP, " ii i \n\n\ -CHDIR [/D][:][]\n\ +STRING_CD_HELP, "Виведення iменi або змiна поточного каталогу\n\n\ +CHDIR [/D][диск:][шлях]\n\ CHDIR[..|.]\n\ -CD [/D][:][]\n\ +CD [/D][диск:][шлях]\n\ CD[..|.]\n\n\ - .. i \n\ - . \n\ - /D i .\n\n\ - CD : i i' .\n\ - CD i i i .\n" + .. батькiвський каталог\n\ + . поточний каталог\n\ + /D Одночасна змiна поточного диску та каталогу.\n\n\ +Команда CD диск: вiдображає iм'я поточного каталогу вказаного диску.\n\ +Команда CD без параметрiв вiдображає iмена поточних диску та каталогу.\n" -STRING_CHCP_HELP, "i i i.\n\n\ +STRING_CHCP_HELP, "Вивiд або змiна поточного номера кодової сторiнки.\n\n\ CHCP [nnn]\n\n\ - nnn i.\n\n\ - CHCP i.\n" + nnn Задає номер кодової сторiнки.\n\n\ +Команда CHCP без параметра виводить поточний номер кодової сторiнки.\n" -STRING_CHOICE_HELP, "i, i.\n\n\ -CHOICE [/C[:]_i][/N][/S][/T[:]c,nn][]\n\n\ - /C[:]_i i . YN.\n\ - /N i i ? i i.\n\ - /S i i.\n\ - /T[:]c,nn c i nn .\n\ - i.\n\n\ -ERRORLEVEL i .\n" +STRING_CHOICE_HELP, "Очiкує, поки користувач не обере один з вказаних в списку символiв.\n\n\ +CHOICE [/C[:]список_символiв][/N][/S][/T[:]c,nn][текст]\n\n\ + /C[:]список_символiв Задає допустимi символи. По замовчуванню це YN.\n\ + /N Не виводити список символiв i ? пiсля пiдказки.\n\ + /S Трактувати символи як чутливi до регiстру.\n\ + /T[:]c,nn По замовчуванню вибір c пiсля проминання nn секунд.\n\ + текст пiдказка.\n\n\ +ERRORLEVEL встановлюється рiвним номеру вибраного символу.\n" -STRING_CLS_HELP, " .\n\nCLS\n" +STRING_CLS_HELP, "Очищення екрану.\n\nCLS\n" -STRING_CMD_HELP1, "\ni ii :\n" +STRING_CMD_HELP1, "\nДоступнi внутрiшнi команди:\n" -STRING_CMD_HELP2, "\ni i:" +STRING_CMD_HELP2, "\nДоступнi можливостi:" -STRING_CMD_HELP3," [i]" +STRING_CMD_HELP3," [псевдонiми]" -STRING_CMD_HELP4," [ii]" +STRING_CMD_HELP4," [iсторiя]" -STRING_CMD_HELP5," [ i i unix]" +STRING_CMD_HELP5," [заваршення iмен файлiв unix]" -STRING_CMD_HELP6," [ i]" +STRING_CMD_HELP6," [стек директорiй]" -STRING_CMD_HELP7," [ piping]" +STRING_CMD_HELP7," [перенаправлення та piping]" -STRING_CMD_HELP8, " i i ReactOS.\n\n\ -CMD [/[C|K] ][/P][/Q][/T:]\n\n\ - /C .\n\ - /K .\n\ - /P CMD i autoexec.bat\n\ - ( ).\n\ - /T: i / (i . COLOR /?).\n" +STRING_CMD_HELP8, "Запуск нової копiї iнтерпретатора команд ReactOS.\n\n\ +CMD [/[C|K] команда][/P][/Q][/T:кл]\n\n\ + /C команда Виконання вказаної команди з подальшим завершенням.\n\ + /K команда Виконання вказаної команди без подальшого завершення.\n\ + /P CMD стає перманентним i запускає autoexec.bat\n\ + (процес не може бути завершений).\n\ + /T:кл Вибiр кольору тексту/тла (детальнiше див. COLOR /?).\n" -STRING_COLOR_HELP1, " i .\n\n\ +STRING_COLOR_HELP1, "Встановлення кольорiв по замовчуванню для тексту та тла.\n\n\ COLOR [attr [/-F]] \n\n\ - attr i i\n\ - /-F i i \n\n\ -I i:\n\ -1) ii i (i i )\n\ -2) i (decimal on decimal)\n\ -3) i ii \n\n\ - i:\n\ - \n\ -0 0 8 8 i\n\ -1 1 i 9 9 i-i\n\ -2 2 10 A i-\n\ -3 3 11 B i-\n\ -4 4 12 C i-\n\ -5 5 13 D i-\n\ -6 6 14 E i-\n\ -7 7 i 15 F -i\n" + attr Атрибути кольорiв для текстових вiкон\n\ + /-F Не заливати незаповненi мiсця кольором\n\n\ +Iснує три способи задання кольорiв:\n\ +1) за назвою на англiйськiй мовi (потрiбно лише першi три букви назви)\n\ +2) в виглядi десяткових чисел (decimal on decimal)\n\ +3) двi шiснадцятковi цифри\n\n\ +Таблиця кольорiв:\n\ +дес шіс назва дес шіс назва\n\ +0 0 Чорний 8 8 Сiрий\n\ +1 1 Синiй 9 9 Свiтло-синiй\n\ +2 2 Зелений 10 A Свiтло-зелений\n\ +3 3 Блакитний 11 B Свiтло-блакитний\n\ +4 4 Червоний 12 C Свiтло-червоний\n\ +5 5 Малиновий 13 D Свiтло-малиновий\n\ +6 6 Жовтий 14 E Свiтло-жовтий\n\ +7 7 Бiлий 15 F Яскраво-бiлий\n" -STRING_COPY_HELP1, " %s (Yes/No/All)? " +STRING_COPY_HELP1, "Перезаписати %s (Yes/No/All)? " -STRING_COPY_HELP2, "i i i i.\n\n\ -COPY [/V][/Y|/-Y][/A|/B] [/A|/B]\n\ - [+ [/A|/B] [+ ...]] [ [/A|/B]]\n\n\ - I i i, i.\n\ - /A ASCII.\n\ - /B i .\n\ - / i' i i.\n\ - /V i i i i.\n\ - /Y i i\n\ - .\n\ - /-Y ' i i\n\ - .\n\n\ - /Y i COPYCMD.\n\ +STRING_COPY_HELP2, "Копiювання одного або декількох файлiв в iнше мiсце.\n\n\ +COPY [/V][/Y|/-Y][/A|/B] джерело [/A|/B]\n\ + [+ джерело [/A|/B] [+ ...]] [результат [/A|/B]]\n\n\ + джерело Iмена одного або декiлькох файлiв, що будуть скопійованi.\n\ + /A Файл є текстовим файлом ASCII.\n\ + /B Файл є двiйковим файлом.\n\ + результат Каталог та/або iм'я для кiнцевих файлiв.\n\ + /V Перевiрка правильностi копiювання файлiв.\n\ + /Y Придавлення запиту пiдтвердження на перезапис iснуючого\n\ + результуючого файлу.\n\ + /-Y Обов'язковий запит пiдтвердження на перезапис iснуючого\n\ + результуючого файлу.\n\n\ +Ключ /Y можна встановити через змiнну середовища COPYCMD.\n\ ...\n" -STRING_DATE_HELP1, "\ni (mm%cdd%cyyyy): " +STRING_DATE_HELP1, "\nВведiть нову дату (mm%cdd%cyyyy): " -STRING_DATE_HELP2, "\ni (dd%cmm%cyyyy): " +STRING_DATE_HELP2, "\nВведiть нову дату (dd%cmm%cyyyy): " -STRING_DATE_HELP3, "\ni (yyyy%cmm%cdd): " +STRING_DATE_HELP3, "\nВведiть нову дату (yyyy%cmm%cdd): " -STRING_DATE_HELP4, "i i .\n\n\ -DATE [/T][]\n\n\ - /T i\n\n\ - DATE i i i \n\ - . ENTER.\n" +STRING_DATE_HELP4, "Вiдображення чи змiна дати.\n\n\ +DATE [/T][дата]\n\n\ + /T лише вiдображення\n\n\ +Команда DATE без параматрiв вiдображає поточну дату i запитує ввід\n\ +нової дати. Для збереження поточної дати натис ENTER.\n" -STRING_DEL_HELP1, " i i.\n\n\ -DEL [/N /P /T /Q /S /W /Y /Z /A[[:]]] i_i ...\n\ -DELETE [/N /P /T /Q /S /W /Y /Z /A[[:]]] i_i ...\n\ -ERASE [/N /P /T /Q /S /W /Y /Z /A[[:]]] i_i ...\n\n\ - i_ I i i.\n\n\ - /N i .\n\ - /P i .\n\ - /T i ii i i i\n\ - .\n\ - /Q i i i.\n\ - /W .\n\ - /Y i i i\n\ - i *.*.\n\ - /F , i\n\ - .\n\ - /S i ii\n\ - /A ii i .\n\ - i\n\ - R i \n\ - S i \n\ - A i\n\ - H i \n\ - i ""-"" \n" +STRING_DEL_HELP1, "Видалення одного або декiлькох файлiв.\n\n\ +DEL [/N /P /T /Q /S /W /Y /Z /A[[:]атрибути]] iмена_файлiв ...\n\ +DELETE [/N /P /T /Q /S /W /Y /Z /A[[:]атрибути]] iмена_файлiв ...\n\ +ERASE [/N /P /T /Q /S /W /Y /Z /A[[:]атрибути]] iмена_файлiв ...\n\n\ + iмена_файлів Iмена одного або декiлькох файлiв.\n\n\ + /N Не виконувати операцiю видалення безпосередньо.\n\ + /P Запит на пiдтвердження перед видаленням кожного файлу.\n\ + /T Вiдображає кiлькiсть видалених файлiв i звiльненого\n\ + дискового простору.\n\ + /Q Вимкнення запиту на пiдтвердження при видаленнi файлiв.\n\ + /W Перезаписати файл випадковими даними перед видаленням.\n\ + /Y Вимкнення запиту на пiдтвердження при видаленнi файлiв\n\ + навiть для маски *.*.\n\ + /F Примусове видалення прихованих, системних та файлiв\n\ + доступних лише для читання.\n\ + /S Видаляти файл з всiх пiддиректорiй\n\ + /A Вiдбiр файлiв для видалення за властивостями.\n\ + властивостi\n\ + R Доступнi лише для читання\n\ + S Системнi файли\n\ + A Файли для архiвування\n\ + H Прихованi файли\n\ + Префiкс ""-"" означає НЕ\n" -STRING_DEL_HELP2, "i i i!\n i (Y/N)?" -STRING_DEL_HELP3, " %lu \n" -STRING_DEL_HELP4, " %lu i \n" +STRING_DEL_HELP2, "Всi файли в каталозi будуть видалннi!\nВи впевненi (Y/N)?" +STRING_DEL_HELP3, " %lu файл видалено\n" +STRING_DEL_HELP4, " %lu файлiв видалено\n" -STRING_DELAY_HELP, " n ii\n\ +STRING_DELAY_HELP, "пауза на n секунд чи мiлiсекунд\n\ DELAY [/m]n\n\n\ - /m , n ii\n\ - i n ii \n" + /m вказує, що n це мiлiсекунди\n\ + iнакше n це кiлькiсть секунд\n" -STRING_DIR_HELP1, "DIR [:][][i'_] [/A[[:]]] [/B] [/C] [/D] [/L] [/N]\n\ - [/O[[:]]] [/P] [/Q] [/S] [/T[[:]]] [/W] [/X] [/4]\n\n\ - [:][][i'_]\n\ - , , / .\n\n\ - /A i i .\n\ - D i R , i \n\ - H i A , i i\n\ - S i i ""-"" \n\ - /B i i.\n\ - /C \n\ - ( i). /-C.\n\ - /D i i .\n\ - /L i.\n\ - /N i i i .\n\ - /O i i.\n\ - N i' ( i) S i ( i)\n\ - E ( i) D / ( ii)\n\ - G i i ""-"" \n\ - /P i .\n\ - /Q i .\n\ - /S i i i ii.\n\ - /T i i \n\ - C \n\ - A i \n\ - W i\n\ - /W i i.\n\ - /X i i i, i ii \n\ - 8.3. i /N i\n\ - i i . \n\ - i', i .\n\ - /4 i i\n\n\ -i i ii DIRCMD. i\n\ - i i i - (i)--, /-W.\n" +STRING_DIR_HELP1, "DIR [диск:][шлях][iм'я_файлу] [/A[[:]атрибути]] [/B] [/C] [/D] [/L] [/N]\n\ + [/O[[:]порядок]] [/P] [/Q] [/S] [/T[[:]час]] [/W] [/X] [/4]\n\n\ + [диск:][шлях][iм'я_файлу]\n\ + Визначає диск, директорію, та/чи файли для їх виведення в списку.\n\n\ + /A Вiдображення файлiв з вказаними атрибутами.\n\ + атрибути D Директорiї R Файли, доступнi лише для чтання\n\ + H Прихованi файли A Файли, готовi для архiвування\n\ + S Системнi файли Префiкс ""-"" означає НЕ\n\ + /B Виведення лише iмен файлiв.\n\ + /C Застосування роздільника груп розрядів для виводу розмірів файлів\n\ + (по замовчуваннi). Для вимкнення цього режиму використайте ключ /-C.\n\ + /D Виведення списку в декiлька стовпчикiв з сортуванням по стовпчиках.\n\ + /L Використання нижнього регiстру.\n\ + /N Вiдображення iмен файлiв у крайньому правому стовпчику.\n\ + /O Сортування списку вiдображених файлiв.\n\ + порядок N За iм'ям (по алфавiту) S За розмiром (спершу меншi)\n\ + E За розширенням (по алфавiту) D За датою/часом (спершу старiшi)\n\ + G Почати список з каталогiв Префiкс ""-"" для зворотнього порядку\n\ + /P Пауза пiсля кожного заповнення екрану.\n\ + /Q Вiдображення даних про власника файлу.\n\ + /S Вiдображення файлiв з вказаного каталогу та всiх пiдкаталогiв.\n\ + /T Вибiр поля часу для вiдображення чи сортування\n\ + час C Створення\n\ + A Останнiй доступ\n\ + W Остання змiна\n\ + /W Список на декiлька стовпцiв.\n\ + /X Вiдображення коротких iмен файлiв, iмена яких не вiдповiдають \n\ + стандарту 8.3. Формат аналогiчний виводу з ключем /N але короткi\n\ + iмена виводяться спава вiд довгих. Якщо у файла немає короткого\n\ + iм'я, замiсть нього виводяться пробли.\n\ + /4 Вiдображення року в чотиризначному форматi\n\n\ +Ключi можуть бути попередньо заданi в змiннiй середовища DIRCMD. Вiдхилити\n\ +попередньо заданi ключi можна префiксом - (дефiс)--наприклад, /-W.\n" -STRING_DIR_HELP2, " %c i %s\n" -STRING_DIR_HELP3, " %c i.\n" -STRING_DIR_HELP4, " i : %04X-%04X\n" -STRING_DIR_HELP5, "\n :\n%16i (i)% 14s \n" +STRING_DIR_HELP2, " Том в пристрої %c має мiтку %s\n" +STRING_DIR_HELP3, " Том в пристрої %c не має мiтки.\n" +STRING_DIR_HELP4, " Серiйний номер тому: %04X-%04X\n" +STRING_DIR_HELP5, "\n Всього:\n%16i Файл(iв)% 14s байт\n" STRING_DIR_HELP6, "%16i Dir(s)% 15s bytes free\n" STRING_DIR_HELP7, "\n Directory of %s\n\n" -STRING_DIR_HELP8, "%16i (i)% 14s \n" +STRING_DIR_HELP8, "%16i Файл(iв)% 14s байт\n" -STRING_DIRSTACK_HELP1, "i i POPD, i\n\ -i .\n\n\ +STRING_DIRSTACK_HELP1, "Зберiгає поточну директорiю для використання командою POPD, потiм\n\ +замiнює її на вказану.\n\n\ PUSHD [path | ..]\n\n\ - path i, \n" + path Вказує директорiю, яку треба зробити поточною\n" -STRING_DIRSTACK_HELP2, "i i , PUSHD.\n\nPOPD" +STRING_DIRSTACK_HELP2, "Змiнює поточну директорiю на ту, яка збережена командою PUSHD.\n\nPOPD" -STRING_DIRSTACK_HELP3, " i i.\n\nDIRS" +STRING_DIRSTACK_HELP3, "Друкує вмiст стеку директорiй.\n\nDIRS" -STRING_DIRSTACK_HELP4, " i i" +STRING_DIRSTACK_HELP4, "Стек директорiй порожнiй" -STRING_ECHO_HELP1, " i .\n\n\ - ECHOS i" +STRING_ECHO_HELP1, "Виводить повiдомлення без повернення каретки та переведення рядка.\n\n\ + ECHOS повiдомлення" -STRING_ECHO_HELP2, " i .\n\n\ - ECHOERR i\n\ - ECHOERR. i " +STRING_ECHO_HELP2, "Виводить повiдомлення в стандартний канал виводу помилок.\n\n\ + ECHOERR повiдомлення\n\ + ECHOERR. друкує порожнiй рядок" -STRING_ECHO_HELP3, " i .\n\n\ - ECHOSERR i" +STRING_ECHO_HELP3, "Друкує повiдомлення в стандартний канал виводу помилок без повернення каретки та переведення рядка.\n\n\ + ECHOSERR повiдомлення" -STRING_ECHO_HELP4, " i i i.\n\n\ +STRING_ECHO_HELP4, "Виведення повiдомлення та перемикання режиму вiдображення команд на екранi.\n\n\ ECHO [ON | OFF]\n\ - ECHO [i]\n\ - ECHO. i \n\n\ -ECHO i ." + ECHO [повiдомлення]\n\ + ECHO. друкує порожнiй рядок\n\n\ +ECHO без параметра виводить поточний режим вiдображення команд." STRING_ECHO_HELP5, "ECHO is %s\n" -STRING_EXIT_HELP, " i .\n\nEXIT [/b] [ExitCode]\n\n\ - /B . \n\ - - i cmd.exe\n\ - ExitCode ERRORLEVEL i\n" +STRING_EXIT_HELP, "Завершує iнтерпретатор команд.\n\nEXIT [/b] [ExitCode]\n\n\ + /B Виходить лише з пакетного файлу. \n\ + Якщо робота йде поза пакетним файлом - вихiд з cmd.exe\n\ + ExitCode Це значення буде присвоєно ERRORLEVEL при виходi\n" -STRING_FOR_HELP1, " i\n\n\ -FOR %variable IN (i) DO []\n\n\ - %variable , i.\n\ - (i) i i i. .\n\ - , i .\n\ - i i .\n\n\ - FOR %%variable i\n\ +STRING_FOR_HELP1, "Запускає вказану команду для кожного файлу з набору файлiв\n\n\ +FOR %variable IN (набiр) DO команда [параметри]\n\n\ + %variable Параметр, що пiдставляється.\n\ + (набiр) Набiр з одного або декiлькох файлiв. Можна використовувати маски.\n\ + команда Команда, яку слiд виконати для кожного файлу.\n\ + параметри Параметри i ключi для вказаної команди.\n\n\ +В пакетних програмах для команди FOR використовується %%variable замiсть\n\ %variable.\n" -STRING_FREE_HELP1, "\n %s : %-11s\n\ - i : %s\n\ - %16s \n\ - %16s \n\ - %16s i\n" +STRING_FREE_HELP1, "\nТом диску %s : %-11s\n\ + Серiйний номер: %s\n\ + %16s байт загального дискового простору\n\ + %16s байт зайнято\n\ + %16s байт вiльно\n" -STRING_FREE_HELP2, " ii .\n\nFREE [drive: ...]\n" +STRING_FREE_HELP2, "Виводить iнформацiю про том.\n\nFREE [drive: ...]\n" -STRING_IF_HELP1, " i.\n\n\ - IF [NOT] ERRORLEVEL \n\ - IF [NOT] 1==2 \n\ - IF [NOT] EXIST i'_ \n\ - IF [NOT] DEFINED i \n\n\ -NOT , CMD , \n\ - \n\ -ERRORLEVEL i, , \n\ - .\n\ - , ii .\n\ -1==2 i, i \n\ - i.\n\ -EXIST i'_ i, i i.\n\ -DEFINED i i, i\n\ - .\n" +STRING_IF_HELP1, "Оператор умовного виконання команд у пакетному файлi.\n\n\ + IF [NOT] ERRORLEVEL число команда\n\ + IF [NOT] рядок1==рядок2 команда\n\ + IF [NOT] EXIST iм'я_файлу команда\n\ + IF [NOT] DEFINED змiнна команда\n\n\ +NOT Вказує, що CMD повинен виконати команду, лише якщо\n\ + умова є хибною\n\ +ERRORLEVEL число Ця умова є iстинною, якщо код, що повернула\n\ + остання виконана програма не меньше вказаного числа.\n\ +команда Зазначає команду, виконувану при iстинностi умови.\n\ +рядок1==рядок2 Ця умова є iстинною, якщо вказанi рядки\n\ + спiвпадають.\n\ +EXIST iм'я_файлу Умова є iстинною, якщо файл з вказаним iменем iснує.\n\ +DEFINED змiнна Ця умова є iстинною, якщо вказана змiнна\n\ + задана.\n" -STRING_GOTO_HELP1, " , i i.\n\n\ -GOTO i\n\n\ - label , i.\n\n\ -̳ i ." +STRING_GOTO_HELP1, "Передача управління рядку пакетного файлу, що мiстить мiтку.\n\n\ +GOTO мiтка\n\n\ + label рядок пакетного файлу, визначений як мiтка.\n\n\ +Мітка повинна знаходитися в окремому рядку i починатися з двокрапки." -STRING_LABEL_HELP1, "i i i .\n\nLABEL [:][i]\n" +STRING_LABEL_HELP1, "Вiдображення або змiна мiтки тому.\n\nLABEL [диск:][мiтка]\n" -STRING_LABEL_HELP2, " %c: i %s\n" -STRING_LABEL_HELP3, " %c: i\n" -STRING_LABEL_HELP4, "i : %04X-%04X\n" -STRING_LABEL_HELP5, "i (11 , ENTER i)? " +STRING_LABEL_HELP2, "Том в пристрої %c: має мiтку %s\n" +STRING_LABEL_HELP3, "Том в пристрої %c: не має мiтки\n" +STRING_LABEL_HELP4, "Серiйний номер тому: %04X-%04X\n" +STRING_LABEL_HELP5, "Мiтка тому (11 букв, ENTER без мiтки)? " -STRING_LOCALE_HELP1, " : " +STRING_LOCALE_HELP1, "Поточний час: " -STRING_MKDIR_HELP, " .\n\n\ -MKDIR [:]\nMD [:]" +STRING_MKDIR_HELP, "Створення каталогу.\n\n\ +MKDIR [диск:]шлях\nMD [диск:]шлях" -STRING_MKLINK_HELP, " '- .\n\n\ -MKLINK [/D | /H | /J] _ i\n\n\ - /D , i - i.\n\ - /H .\n\ - /J ' i.\n\n\ - i /H i /J , i ." +STRING_MKLINK_HELP, "Створення об'єкту-посилання файлової системи.\n\n\ +MKLINK [/D | /H | /J] назва_посилання цiль\n\n\ + /D Вказує, що цiль символчного посилання - це директорiя.\n\ + /H Створення жорсткого посилання.\n\ + /J Створення з'єднання директорiй.\n\n\ +Якщо не вказано нi /H нi /J , створюється символiчне посилання." -STRING_MEMMORY_HELP1, "i ' 'i.\n\nMEMORY" +STRING_MEMMORY_HELP1, "Вiдображення об'єму системної пам'ятi.\n\nMEMORY" -STRING_MEMMORY_HELP2, "\n %12s%% 'i .\n\n\ - %13s i RAM.\n\ - %13s i RAM.\n\n\ - %13s i .\n\ - %13s i .\n\n\ - %13s i 'i.\n\ - %13s i 'i.\n" +STRING_MEMMORY_HELP2, "\n %12s%% пам'ятi використовується.\n\n\ + %13s байт всього фiзичної RAM.\n\ + %13s байт доступно фiзичної RAM.\n\n\ + %13s байт всього в файлi довантаження.\n\ + %13s байт доступно в файлi довантаження.\n\n\ + %13s байт всього вiртуальної пам'ятi.\n\ + %13s байт доступно вiртуальної пам'ятi.\n" -STRING_MISC_HELP1, "i i ...\n" +STRING_MISC_HELP1, "Натиснiть клавiшу для продовження...\n" -STRING_MOVE_HELP1, " %s (Yes/No/All)? " +STRING_MOVE_HELP1, "Переписати %s (Yes/No/All)? " -STRING_MOVE_HELP2, "i i i i i i.\n\n\ -i i i:\n\ -MOVE [/N][:][]i'_1[,...] \n\n\ - :\n\ -MOVE [/N][:][]i'_1 i'_2\n\n\ - [:][]i'_1 i i' \n\ - i i i i.\n\ - /N i. Do everything but move files or directories.\n\n\ -i :\n\ - - i i i.\n" +STRING_MOVE_HELP2, "Перемiщення файлiв i перейменування файлiв i каталогiв.\n\n\ +Перемiщення одного та бiльше файлiв:\n\ +MOVE [/N][диск:][шлях]iм'я_файлу1[,...] призначення\n\n\ +Перейменування каталогу:\n\ +MOVE [/N][диск:][шлях]iм'я_каталогу1 iм'я_каталогу2\n\n\ + [диск:][шлях]iм'я_файлу1 Вказує мiсце розташування й iм'я файлу або\n\ + файлiв якi необхiдно перемiстити.\n\ + /N Нiчого. Do everything but move files or directories.\n\n\ +Поточнi обмеження:\n\ + - Неможливо переносити файли чи теки мiж рiзними роздiлами.\n" -STRING_MSGBOX_HELP, " i i ii \n\n\ -MSGBOX [''] i\n\n\ - i \n\ - i : OK, OKCANCEL,\n\ +STRING_MSGBOX_HELP, "показ вiкна з повiдомленням та повернення вiдповдi користувача\n\n\ +MSGBOX тип ['заголовок'] пiдказка\n\n\ +тип вiдображені кнопки\n\ + можливi значення: OK, OKCANCEL,\n\ YESNO, YESNOCANCEL\n\ - i i\n\ -i i\n\n\n\ -ERRORLEVEL i :\n\n\ +заголовок заголовок вiкна з повiдомленням\n\ +пiдказка текст повiдомлення\n\n\n\ +ERRORLEVEL встановлюється вiдповдно до натиснутої кнопки:\n\n\ YES : 10 | NO : 11\n\ OK : 10 | CANCEL : 12\n" -STRING_PATH_HELP1, " i.\n\n\ -PATH [[:][;...]]\nPATH ;\n\n\ - PATH ; i \n\ - .\n\ - PATH i i .\n" +STRING_PATH_HELP1, "Показ або задання шляху пошуку виконуваних файлiв.\n\n\ +PATH [[диск:]шлях[;...]]\nPATH ;\n\n\ +Команда PATH ; очищає шлях пошуку файлiв та обмежує його\n\ +поточним каталогом.\n\ +Команда PATH без параметрiв вiдображає поточний шлях пошуку.\n" -STRING_PROMPT_HELP1, "i .\n\n\ -PROMPT []\n\n\ - .\n\n\ - i i:\n\n\ - $A & ()\n\ - $B | ( )\n\ - $C ( (i )\n\ - $D \n\ - $E ESC ( ASCII 27)\n\ - $F ) ( )\n\ - $G > ( )\n\ - $H Backspace ( )\n\ - $L < ( )\n\ - $N \n\ - $P \n\ - $Q = ( ii)\n\ - $T \n\ - $V i i \n\ - $_ \n\ - $$ $ ( )\n" +STRING_PROMPT_HELP1, "Змiна запрошення командного рядка.\n\n\ +PROMPT [текст]\n\n\ + текст Нове запрошення командного рядка.\n\n\ +Запрошення може складатись з звичайних символiв та наступних кодiв:\n\n\ + $A & (Амперсанд)\n\ + $B | (вертикальна риска)\n\ + $C ( (Лiва кругла дужка)\n\ + $D Поточна дата\n\ + $E ESC (символ ASCII з кодом 27)\n\ + $F ) (Права кругла дужка)\n\ + $G > (знак більше)\n\ + $H Backspace (видалення попередьного символу)\n\ + $L < (знак меньше)\n\ + $N Поточний диск\n\ + $P Поточний диск та каталог\n\ + $Q = (знак рiвностi)\n\ + $T Поточний час\n\ + $V Номер версiї операцiйної системи\n\ + $_ Повернення каретки та переведення рядка\n\ + $$ $ (знак долара)\n" -STRING_PAUSE_HELP1, " i i:\n\ -' i - i...' i.\n\n\ -PAUSE [i]" +STRING_PAUSE_HELP1, "Призупинка обробки пакетного файлу i показ повiдомлення:\n\ +'Для продовження натиснiть будь-яку клавiшу...' чи задане повiдомлення.\n\n\ +PAUSE [повiдомлення]" -STRING_PROMPT_HELP2, " $+ i" +STRING_PROMPT_HELP2, " $+ Показує поточну глибину стека каталогiв" -STRING_PROMPT_HELP3, "\nPROMPT i ." +STRING_PROMPT_HELP3, "\nPROMPT без параметрiв встановлює запрошення командного рядка за замовчуванням." -STRING_REM_HELP, " i.\n\nREM [Comment]" +STRING_REM_HELP, "Стартує рядок коментаря впакетному файлi.\n\nREM [Comment]" -STRING_RMDIR_HELP, " .\n\n\ -RMDIR [:]\nRD [:]\n\ -/S i ii\n\ -/Q i\n" -STRING_RMDIR_HELP2, " i!\n" +STRING_RMDIR_HELP, "Видалення каталогу.\n\n\ +RMDIR [диск:]шлях\nRD [диск:]шлях\n\ +/S Видалення всього дерева всерединi цiлi\n\ +/Q Вимкнення запиту пiдтвердження\n" +STRING_RMDIR_HELP2, "Каталог не порожнiй!\n" -STRING_REN_HELP1, " i i/i.\n\n\ -RENAME [/E /N /P /Q /S /T] _i' ... _i'\n\ -REN [/E /N /P /Q /S /T] _i' ... _i'\n\n\ - /E i .\n\ - /N i.\n\ - /P i .\n\ - ( i!)\n\ - /Q .\n\ - /S i.\n\ - /T i ii i i.\n\n\ - i i .\n\ - MOVE.\n" +STRING_REN_HELP1, "Перейменування одного чи кiлькох файлiв/каталогiв.\n\n\ +RENAME [/E /N /P /Q /S /T] старе_iм'я ... нове_iм'я\n\ +REN [/E /N /P /Q /S /T] старе_iм'я ... нове_iм'я\n\n\ + /E Не показувати повiдомлення про помилки.\n\ + /N Нiчого.\n\ + /P Запит пiдтвердження для кожного файлу.\n\ + (Ще не реалiзовано!)\n\ + /Q Тихо.\n\ + /S Перейменувати пiдкаталоги.\n\ + /T Вiдображення кiлькостi переiменованих файлiв.\n\n\ +Для кiнцевого фалу не можна вказати iнший диск чи каталог.\n\ +Для цього використайте команду MOVE.\n" -STRING_REN_HELP2, " %lu i\n" +STRING_REN_HELP2, " %lu файл переiменовано\n" -STRING_REN_HELP3, " %lu i i\n" +STRING_REN_HELP3, " %lu файлiв переiменовано\n" -STRING_REPLACE_HELP1, "i i.\n\n\ -REPLACE [1:][1]i'_ [2:][2] [/A] [/P] [/R] [/W]\n\ -REPLACE [1:][1]i'_ [2:][2] [/P] [/R] [/S] [/W] [/U]\n\n\ - [1:][1]i'_ () i.\n\ - [2:][2] , ii \n\ - .\n\ - /A i i . \n\ - i i /S /U.\n\ - /P i i \n\ - .\n\ - /R i .\n\ - /S i i i \n\ - . i\n\ - /A.\n\ - /W .\n\ - /U i () , ii i\n\ - ii. i /A.\n" +STRING_REPLACE_HELP1, "Замiна файлiв.\n\n\ +REPLACE [диск1:][шлях1]iм'я_файлу [диск2:][шлях2] [/A] [/P] [/R] [/W]\n\ +REPLACE [диск1:][шлях1]iм'я_файлу [диск2:][шлях2] [/P] [/R] [/S] [/W] [/U]\n\n\ + [диск1:][шлях1]iм'я_файлу Задає файл(и) для замiни.\n\ + [диск2:][шлях2] Задає каталог, в якому будуть замiненi файли\n\ + файли.\n\ + /A Додати новi файли в кiнцеву теку. Неможливе\n\ + при використаннi ключiв /S чи /U.\n\ + /P Запит на пiдтвердження замiни файлу чи\n\ + додавання початкового файлу.\n\ + /R Замiнює також файли лише для читання.\n\ + /S Замiнює файли у всiх пiдкаталогах каталогу\n\ + призначення. Неможливе при використаннi\n\ + ключа /A.\n\ + /W Чекає поки ви вставите диск перед початком.\n\ + /U Замiнює (оновлює) лише файли, що старiшi нiж\n\ + копiйованi. Неможливе при використаннi ключа /A.\n" -STRING_REPLACE_HELP2, "i \n" +STRING_REPLACE_HELP2, "Необхiдний шлях джерела\n" -STRING_REPLACE_HELP3, " i i\n" +STRING_REPLACE_HELP3, "Не замiнено жодних файлiв\n" -STRING_REPLACE_HELP4, "%lu (i) i\n" +STRING_REPLACE_HELP4, "%lu файл(iв) замiнено\n" -STRING_REPLACE_HELP5, "i %s\n" +STRING_REPLACE_HELP5, "Замiна %s\n" -STRING_REPLACE_HELP6, "i %s\n" +STRING_REPLACE_HELP6, "Замiнити %s\n" -STRING_REPLACE_HELP7, " i\n" +STRING_REPLACE_HELP7, "Не додано жодних файлiв\n" -STRING_REPLACE_HELP8, "%lu (i) \n" +STRING_REPLACE_HELP8, "%lu файл(iв) додано\n" -STRING_REPLACE_HELP9, " %s (Y/N) " +STRING_REPLACE_HELP9, "Додати %s (Y/N) " -STRING_REPLACE_HELP10, "i %s (Y/N) " +STRING_REPLACE_HELP10, "Замiнити %s (Y/N) " -STRING_REPLACE_HELP11, " %s\n" +STRING_REPLACE_HELP11, "Додавання %s\n" -STRING_SHIFT_HELP, "i i i i .\n\n\ +STRING_SHIFT_HELP, "Змiна позицiї пiдставлюваних параметрiв для пакетного файлу.\n\n\ SHIFT [DOWN]" -STRING_SCREEN_HELP, "i i \n\n\ -SCREEN []\n\n\ - , i \n\ - , i " +STRING_SCREEN_HELP, "перемiщення курсора та опцiонально показ тексту\n\n\ +SCREEN ряд стп [текст]\n\n\ + ряд рядок, куди требе перемiстити курсор\n\ + стп стовпчик, куди требе перемiстити курсор" -STRING_SET_HELP, ", i .\n\n\ -SET [i[=][]]\n\n\ - i I' i .\n\ - i, i ii.\n\n\ -SET i i i .\n" +STRING_SET_HELP, "Показ, задання чи видалення змiнних середовища.\n\n\ +SET [змiнна[=][значення]]\n\n\ + змiнна Iм'я змiнної середовища.\n\ + значення Рядок символiв, що призначається вказанiй змiннiй.\n\n\ +SET без параметрiв виводить поточнi значення змiнних середовища.\n" -STRING_START_HELP1, " .\n\n\ -START \n\n\ - .\n\n\ - i .\n" +STRING_START_HELP1, "Запуск команди.\n\n\ +START команда\n\n\ + команда Команда для запуску.\n\n\ +На даний момент всi команди стартують асинхронно.\n" -STRING_TITLE_HELP, "i i .\n\n\ -TITLE []\n\n\ - i i .\n" +STRING_TITLE_HELP, "Змiна заголовка вiкна командного рядка.\n\n\ +TITLE [рядок]\n\n\ +рядок Майбутнiй заголовок вiкна командного рядка.\n" -STRING_TIME_HELP1, "i i .\n\n\ -TIME [/T][]\n\n\ - /T i\n\n\ -TIME i \n\ - . i ENTER .\n" +STRING_TIME_HELP1, "Вiдображення чи змiна системного часу.\n\n\ +TIME [/T][час]\n\n\ + /T лише вiдображення\n\n\ +TIME без параметрiв виводить поточний час та запитує\n\ +введення нового. Натиснiть ENTER для збереження поточного.\n" -STRING_TIME_HELP2, "i : " +STRING_TIME_HELP2, "Введiть новий час: " -STRING_TIMER_HELP1, " %d \n" +STRING_TIMER_HELP1, "Минуло %d мсек\n" -STRING_TIMER_HELP2, " %02d%c%02d%c%02d%c%02d\n" +STRING_TIMER_HELP2, "Минуло %02d%c%02d%c%02d%c%02d\n" -STRING_TIMER_HELP3, " ii.\n\n\ +STRING_TIMER_HELP3, "дозволяє використати десять секундомiрiв.\n\n\ TIMER [ON|OFF] [/S] [/n] [/Fn]\n\n\ - ON i i (ON)\n\ - OFF i (OFF)\n\ - /S i i. i i\n\ - i i \n\ - /n i.\n\ - i i 0 9\n\ - - 1\n\ - /Fn \n\ - n :\n\ - 0 ii\n\ + ON ввiмкнути секундомiр (ON)\n\ + OFF вимкнути секундомiр (OFF)\n\ + /S Рiзниця в часi. Повертає рiзницю в часi\n\ + секундомiра без змiни його значення\n\ + /n Задати номер секундомiра.\n\ + Доступнi номери вiд 0 до 9\n\ + За замовчуванням - 1\n\ + /Fn Формат виводу\n\ + n може бути:\n\ + 0 мiлiсекунди\n\ 1 hh%cmm%css%cdd\n\n\ - i ON, OFF /S , \n\ - i\n\n" +Якщо не вказанi ON, OFF та /S , команда перемикає\n\ +стан секундомiра\n\n" -STRING_TYPE_HELP1, " i i.\n\nTYPE [:][]i'_ \n\ - /P i.\n" +STRING_TYPE_HELP1, "Виведення вмiсту текстових файлiв.\n\nTYPE [диск:][шлях]iм'я_файлу \n\ + /P Поекранний вивiд.\n" STRING_VERIFY_HELP1, "This command is just a dummy!!\n\ -i i i i\n\ - .\n\n\ +Ввiмкнення чи вимкнення перевiрки правильностi запису файлiв\n\ +на диск.\n\n\ VERIFY [ON | OFF]\n\n\ -VERIFY i .\n" +VERIFY без параметрiв виводить поточне значення команди.\n" STRING_VERIFY_HELP2, "VERIFY %s.\n" -STRING_VERIFY_HELP3, " ON OFF." +STRING_VERIFY_HELP3, "Треба задати ON або OFF." -STRING_VERSION_HELP1, "i i \n\n\ +STRING_VERSION_HELP1, "Данi про версiю оболонки\n\n\ VER [/C][/R][/W]\n\n\ - /C i i.\n\ - /R i ii .\n\ - /W i i ii." + /C Вiдображення списку авторiв.\n\ + /R Вiдображення iнформацiї про перепоширення.\n\ + /W Вiдображення гарантiйної iнформацiї." -STRING_VERSION_HELP2, " - I; \n\ -: `ver /w'. i , i \n\ - i ; `ver /r' . `ver /c' \n\ - i." +STRING_VERSION_HELP2, " надається без БУДЬ-ЯКИХ ГАРАНТIЙ; для детальних даних\n\ +надрукуйте: `ver /w'. Ця програма є вiльним ПЗ, i ви можете розповсюджувати\n\ +її згiдно певних умов; надрукуйте `ver /r' для детальних даних. Надрукуйте `ver /c' \n\ +для виведення списку авторiв." -STRING_VERSION_HELP3, "\n i i, ,\n\ - - I; i i\n\ - I I. i\n\ - GNU General Public License ii." +STRING_VERSION_HELP3, "\n Ця програма розповсюджується iз сподiванням, що вона буде корисною,\n\ + але БЕЗ БУДЬ-ЯКИХ ГАРАНТIЙ; навiть без непрямих гарантiй\n\ + щодо ПРОДАЖУ чи ПРИДАТНОСТI ДЛЯ ПЕВНИХ ЦIЛЕЙ. Дивiться\n\ + GNU General Public License для детальної iнформацiї." -STRING_VERSION_HELP4, "\n i ; /\n\ - i i GNU General Public License, i\n\ - Free Software Foundation; i 2 ii, \n\ - ( i) - i i.\n" +STRING_VERSION_HELP4, "\n Ця програма є вiльним ПЗ; ви можете перепоширювати її та/чи\n\ + модифiкувати згiдно умов GNU General Public License, що опублiкована\n\ + Free Software Foundation; версiї 2 Лiцензiї, чи\n\ + (на ваш вибiр) будь-якої новiшої версiї.\n" -STRING_VERSION_HELP5, "\ni i .\n\ - i : http://www.reactos.org" +STRING_VERSION_HELP5, "\nВiдсилайте звiти про помилки на .\n\ +Оновлення доступнi на: http://www.reactos.org" -STRING_VERSION_HELP6, "\nFreeDOS-i :\n" +STRING_VERSION_HELP6, "\nFreeDOS-версiя написана:\n" -STRING_VERSION_HELP7, "\nReactOS-i :\n" +STRING_VERSION_HELP7, "\nReactOS-версiя написана:\n" -STRING_VOL_HELP1, " %c i %s\n" -STRING_VOL_HELP2, " %c i.\n" -STRING_VOL_HELP3, " i : %04X-%04X\n" -STRING_VOL_HELP4, " i i , i.\n\nVOL [:]" +STRING_VOL_HELP1, " Том в пристрої %c має мiтку %s\n" +STRING_VOL_HELP2, " Том в пристрої %c не має мiтки.\n" +STRING_VOL_HELP3, " Серiйний номер тому: %04X-%04X\n" +STRING_VOL_HELP4, "Виводить мiтку тому та серiйний номер, якщо вони iснують.\n\nVOL [диск:]" -STRING_WINDOW_HELP1, "i i i\n\n\ +STRING_WINDOW_HELP1, "змiнює вигляд вiкна консолi\n\n\ WINDOW [/POS[=]left,top,width,heigth]\n\ - [MIN|MAX|RESTORE] ['']\n\n\ -/POS i i\n\ -MIN i\n\ -MAX i\n\ -RESTORE i i" + [MIN|MAX|RESTORE] ['заголовок']\n\n\ +/POS визначає розміри та розмiщення вiкна\n\ +MIN згортає вiкно\n\ +MAX розгортає вiкно\n\ +RESTORE вiдновлює вiкно" -STRING_WINDOW_HELP2, "i i i\n\n\ +STRING_WINDOW_HELP2, "змiнює вигляд вiкна консолi\n\n\ ACTIVATE 'window' [/POS[=]left,top,width,heigth]\n\ [MIN|MAX|RESTORE] ['title']\n\n\ -window i, i\n\ -/POS i i\n\ -MIN i\n\ -MAX i\n\ -RESTORE i i\n\ -title \n" +window заголовок вiкна, вигляд якого треба змiнити\n\ +/POS визначає розміри та розмiщення вiкна\n\ +MIN згортає вiкно\n\ +MAX розгортає вiкно\n\ +RESTORE вiдновлює вiкно\n\ +title новий заголовок\n" -STRING_HELP1, " i (+ )\n\n\ - /? ii \n\n\ -? i .\n\ -ALIAS , ii.\n\ -ATTRIB i i i .\n\ -BEEP i.\n\ -CALL i i.\n\ -CD i ii i .\n\ -CHCP i i.\n\ -CHOICE i i.\n\ -CLS .\n\ -CMD i i ReactOS.\n\ -COLOR i i i.\n\ -COPY i i i i i.\n\ -DATE i .\n\ -DELETE i i.\n\ -DIR i i i i i.\n\ -ECHO i i, i .\n\ -ERASE i i.\n\ -EXIT i CMD.EXE (i ).\n\ -FOR i.\n\ -FREE (i) i.\n\ -GOTO i , i i.\n\ -HELP i ii ReactOS.\n\ -HISTORY i .\n\ -IF .\n\ -LABEL , i, i .\n\ -MD .\n\ -MKDIR .\n\ -MKLINK '- .\n\ -MOVE i i i i i\n\ - .\n\ -PATH i i.\n\ -PAUSE i i.\n\ -POPD i , \n\ +STRING_HELP1, "Список всiх доступних команд (+ опис)\n\n\ + команда /? Для докладної iнформацiї про конкретну команду\n\n\ +? Список всiх доступних команд без опису.\n\ +ALIAS Встановлення, видалення або показ псевдонiмiв.\n\ +ATTRIB Вiдображення або змiна атрибутiв файлу.\n\ +BEEP Звуковий сигнал динамiка.\n\ +CALL Виклик однiєї пакетної програми з iншої.\n\ +CD Вiдображення iменi або змiна поточної теки.\n\ +CHCP Вiдображення або встановлення поточного номера кодової сторiнки.\n\ +CHOICE Очiкування вибору користувачем одного з вказаних символiв.\n\ +CLS Очищення екрану.\n\ +CMD Запуск нової копiї iнтерпретатора команд ReactOS.\n\ +COLOR Встановлення типових кольорiв тексту i тла консолi.\n\ +COPY Копiювання одного або бiльше файлiв в iнше мiсце.\n\ +DATE Вiдображення або встановлення дати.\n\ +DELETE Видалення одного або бiльше файлiв.\n\ +DIR Вiдображення списку файлiв i пiдтек в тецi.\n\ +ECHO Вiдображення повiдомлень, або перемикання режиму вiдображення команд.\n\ +ERASE Видалення одного або бiльше файлiв.\n\ +EXIT Вихiд з програми CMD.EXE (iнтерпретатора команд).\n\ +FOR Запуск вказаної команди для кожного файлу з набору файлiв.\n\ +FREE (Вiльний) дисковий простiр.\n\ +GOTO Передача управлiння рядку пакетної програми, який мiстить мiтку.\n\ +HELP Довiдкова iнформацiя про команди ReactOS.\n\ +HISTORY Список усiх використаних команд.\n\ +IF Оператор обробки умов у пакетних програмах.\n\ +LABEL Створення, змiна, або видалення мiток тому диска.\n\ +MD Створення теки.\n\ +MKDIR Створення теки.\n\ +MKLINK Створення об'єкту-посилання файлової системи.\n\ +MOVE Перемiщення одного або бiльше файлiв з однiєї теки до iншої\n\ + теки.\n\ +PATH Вiдображення або встановлення шляху пошуку виконуваних файлiв.\n\ +PAUSE Тимчасове припинення обробки командного файлу i показ повiдомлення.\n\ +POPD Вiдновлює попереднє значення поточної теки, збережене командою\n\ PUSHD.\n\ -PROMPT i .\n\ -PUSHD i , i i .\n\ -RD .\n\ -REM i () .\n\ -REN i.\n\ -RENAME i.\n\ -REPLACE i i.\n\ -RMDIR i .\n\ -SCREEN i i .\n\ -SET i, , i ReactOS.\n\ -SHIFT i i i .\n" -STRING_HELP2, "START i i .\n\ - .\n\ -TIME i .\n\ -TIMER ii.\n\ -TITLE i i CMD.EXE.\n\ -TYPE i i .\n\ -VER i i ReactOS.\n\ -VERIFY i i i \n\ - i .\n\ -VOL i i i i .\n" +PROMPT Змiна запрошення командного рядка.\n\ +PUSHD Зберiгає поточну теку, а потiм змiнює її.\n\ +RD Видалення теки.\n\ +REM Записує коментарi (зауваження) в командних файлах.\n\ +REN Перейменування файла або файлiв.\n\ +RENAME Перейменування файла або файлiв.\n\ +REPLACE Замiна файлiв.\n\ +RMDIR Перемiщення теки.\n\ +SCREEN Перемiщення курсора i виведення тексту.\n\ +SET Вiдображення, встановлення, або видалення змiнних оточення ReactOS.\n\ +SHIFT Зрушення позицiї замiнних параметрiв у командних файлах.\n" +STRING_HELP2, "START Вiдкриває окреме вiкно для запуску вказаних команд або програм.\n\ + Виконує команду.\n\ +TIME Вiдображення або встановлення системного часу.\n\ +TIMER Дозволяє використання десяти секундомiрiв.\n\ +TITLE Встановлення заголовка вiкна для сесiї CMD.EXE.\n\ +TYPE Вiдображення вмiсту текстового файлу.\n\ +VER Вiдображення версiї ReactOS.\n\ +VERIFY Включення або вiдключення режиму перевiрки правильностi запису\n\ + файлiв на диск.\n\ +VOL Вiдображення мiтки тому диска i серiйного номера.\n" STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" -STRING_ALIAS_ERROR, " i ii!\n" -STRING_ASSOC_ERROR, " ii %s\n" -STRING_BATCH_ERROR, " i \n" -STRING_CHCP_ERROR1, " i: %u\n" -STRING_CHCP_ERROR4, " i\n" -STRING_CHOICE_ERROR, "i . i : /C[:]" -STRING_CHOICE_ERROR_TXT, "i . i : /T[:]c,nn" -STRING_CHOICE_ERROR_OPTION, "i : %s" -STRING_CMD_ERROR1, " i %s\n" -STRING_CMD_ERROR2, " pipe-\n" -STRING_CMD_ERROR3, " %s\n" -STRING_CMD_ERROR4, " %s...\n" -STRING_CMD_ERROR5, " cmdexit.bat...\n" -STRING_COLOR_ERROR1, " - i ! ( )" -STRING_COLOR_ERROR2, " i " -STRING_COLOR_ERROR3, "i %x\n" -STRING_COLOR_ERROR4, " - i !" -STRING_CONSOLE_ERROR, "i : %d\n" -STRING_COPY_ERROR1, ": i - %s!\n" -STRING_COPY_ERROR2, ": i !\n" -STRING_COPY_ERROR3, " !\n" -STRING_COPY_ERROR4, ": i!\n" -STRING_DATE_ERROR, "i ." -STRING_DEL_ERROR5, " %s ! " -STRING_DEL_ERROR6, " i (Y/N)?" -STRING_DEL_ERROR7, ": %s\n" -STRING_ERROR_ERROR1, "i ! : 0x%lx\n" -STRING_ERROR_ERROR2, " " -STRING_FOR_ERROR1, "'in' i for." -STRING_FOR_ERROR2, " ." -STRING_FOR_ERROR3, "'do' i." -STRING_FOR_ERROR4, " i 'do'." -STRING_FREE_ERROR1, "i " -STRING_FREE_ERROR2, " ii" -STRING_GOTO_ERROR1, " i GOTO" -STRING_GOTO_ERROR2, "i '%s' \n" +STRING_ALIAS_ERROR, "Командний рядок занадто довгий пiсля розгортання псевдонiмiв!\n" +STRING_ASSOC_ERROR, "Не знайдено файлової асоцiацiї для розширення %s\n" +STRING_BATCH_ERROR, "Помилка вiдкриття пакетного файлу\n" +STRING_CHCP_ERROR1, "Поточна кодова сторiнка: %u\n" +STRING_CHCP_ERROR4, "Помилкова кодова сторiнка\n" +STRING_CHOICE_ERROR, "Невiрний параметр. Очiкується формат: /C[:]параметри" +STRING_CHOICE_ERROR_TXT, "Невiрний параметр. Очiкується формат: /T[:]c,nn" +STRING_CHOICE_ERROR_OPTION, "Невiрний параметр: %s" +STRING_CMD_ERROR1, "Не можу перенаправити ввiд з файлу %s\n" +STRING_CMD_ERROR2, "Помилка створення тимчасового файлу для pipe-даних\n" +STRING_CMD_ERROR3, "Не можу перенаправити в файл %s\n" +STRING_CMD_ERROR4, "Запуск %s...\n" +STRING_CMD_ERROR5, "Запуск cmdexit.bat...\n" +STRING_COLOR_ERROR1, "помилка - однаковi кольори! (тло та текст не можуть бути однакового кольору)" +STRING_COLOR_ERROR2, "помилка при вказаннi кольору" +STRING_COLOR_ERROR3, "Колiр %x\n" +STRING_COLOR_ERROR4, "помилка - однаковi кольори!" +STRING_CONSOLE_ERROR, "Невiдома помилка: %d\n" +STRING_COPY_ERROR1, "Помилка: Неможливо вiдкрити джерело - %s!\n" +STRING_COPY_ERROR2, "Помилка: Неможливо копiювати в себе!\n" +STRING_COPY_ERROR3, "Помилка запису призначення!\n" +STRING_COPY_ERROR4, "Помилка: Ще не реалiзовано!\n" +STRING_DATE_ERROR, "Невiрна дата." +STRING_DEL_ERROR5, "Файл %s буде видалений! " +STRING_DEL_ERROR6, "Ви впевненi (Y/N)?" +STRING_DEL_ERROR7, "Видалення: %s\n" +STRING_ERROR_ERROR1, "Невiдома помилка! Код помилки: 0x%lx\n" +STRING_ERROR_ERROR2, "Синтаксична помилка" +STRING_FOR_ERROR1, "'in' вiдсутнє в команді for." +STRING_FOR_ERROR2, "дужок не знайдено." +STRING_FOR_ERROR3, "'do' вiдсутнє." +STRING_FOR_ERROR4, "немає команди пiсля 'do'." +STRING_FREE_ERROR1, "Невiрний диск" +STRING_FREE_ERROR2, "не вiдмiчено" +STRING_GOTO_ERROR1, "Не визначена мiтка для GOTO" +STRING_GOTO_ERROR2, "Мiтка '%s' не знайдена\n" -STRING_MD_ERROR, "i i.\n" -STRING_MD_ERROR2, " i.\n" +STRING_MD_ERROR, "Пiдкаталог чи файл вже iснує.\n" +STRING_MD_ERROR2, "Шлях до нового каталогу не iснує.\n" STRING_MOVE_ERROR1, "[OK]\n" -STRING_MOVE_ERROR2, "[]\n" +STRING_MOVE_ERROR2, "[Помилка]\n" -STRING_REN_ERROR1, " MoveFile(). : %lu\n" +STRING_REN_ERROR1, "Невдачне виконання MoveFile(). Помилка: %lu\n" -STRING_START_ERROR1, " i i!" +STRING_START_ERROR1, "На даний момент пакетнi файли не пiдтримуються!" -STRING_TIME_ERROR1, "i ." +STRING_TIME_ERROR1, "Невiрний час." -STRING_TYPE_ERROR1, "i '/%s'\n" +STRING_TYPE_ERROR1, "Невiрний параметр '/%s'\n" -STRING_WINDOW_ERROR1, "i " +STRING_WINDOW_ERROR1, "вiкно не знайдено" -STRING_ERROR_PARAMETERF_ERROR, " - %c\n" -STRING_ERROR_INVALID_SWITCH, " i - /%c\n" -STRING_ERROR_TOO_MANY_PARAMETERS, " i - %s\n" -STRING_ERROR_PATH_NOT_FOUND, " \n" -STRING_ERROR_FILE_NOT_FOUND, " \n" -STRING_ERROR_REQ_PARAM_MISSING, "ii ' \n" -STRING_ERROR_INVALID_DRIVE, "i \n" -STRING_ERROR_INVALID_PARAM_FORMAT, "i - %s\n" -STRING_ERROR_BADCOMMAND, "i i' - %s\n" -STRING_ERROR_OUT_OF_MEMORY, " 'i.\n" -STRING_ERROR_CANNOTPIPE, "! pipe! i !\n" -STRING_ERROR_D_PAUSEMSG, "i - i . . ." -STRING_ERROR_DRIVER_NOT_READY, " " +STRING_ERROR_PARAMETERF_ERROR, "Неправильний формат параметра - %c\n" +STRING_ERROR_INVALID_SWITCH, "Невірна опцiя - /%c\n" +STRING_ERROR_TOO_MANY_PARAMETERS, "Забагато параметрiв - %s\n" +STRING_ERROR_PATH_NOT_FOUND, "Шлях не знайдений\n" +STRING_ERROR_FILE_NOT_FOUND, "Файл не знайдений\n" +STRING_ERROR_REQ_PARAM_MISSING, "Вiдсутнiй обов'язковий параметр\n" +STRING_ERROR_INVALID_DRIVE, "Невiрне визначення диску\n" +STRING_ERROR_INVALID_PARAM_FORMAT, "Невiрний формат параметра - %s\n" +STRING_ERROR_BADCOMMAND, "Невiрна команда або iм'я файлу - %s\n" +STRING_ERROR_OUT_OF_MEMORY, "Недостатньо пам'ятi.\n" +STRING_ERROR_CANNOTPIPE, "Помилка! Неможливо використати pipe! Неможливо вiдкрити тимчасовий файл!\n" +STRING_ERROR_D_PAUSEMSG, "Натиснiть будь-яку клавiшу для продовження . . ." +STRING_ERROR_DRIVER_NOT_READY, "Пристрій не готовий" -STRING_PATH_ERROR, "CMD: i '%s'\n" +STRING_PATH_ERROR, "CMD: Не в середовищi '%s'\n" -STRING_REPLACE_ERROR1, "i - %s\n" -STRING_REPLACE_ERROR2, " - %s\n" -STRING_REPLACE_ERROR3, " ii , i i.\n" -STRING_REPLACE_ERROR4, "i ii i\n" -STRING_REPLACE_ERROR5, " - %s\n" -STRING_REPLACE_ERROR6, " - %s\n" -STRING_REPLACE_ERROR7, " 32\n" +STRING_REPLACE_ERROR1, "Невiрний ключ - %s\n" +STRING_REPLACE_ERROR2, "Шлях не знайдено - %s\n" +STRING_REPLACE_ERROR3, "Синтаксис iменi файлу, теки чи мiтки диску некоректнi.\n" +STRING_REPLACE_ERROR4, "Невiрна комбiнацiя параметрiв\n" +STRING_REPLACE_ERROR5, "Немає доступу - %s\n" +STRING_REPLACE_ERROR6, "Файли не знайдено - %s\n" +STRING_REPLACE_ERROR7, "Розширена помилка 32\n" -STRING_REACTOS_VERSION, "i ReactOS [i %s-%s]\n" -STRING_CMD_SHELLINFO, "\nI ReactOS\nVersion %s %s" -STRING_VERSION_RUNVER, " %s" -STRING_COPY_FILE , " %d (i) i\n" -STRING_DELETE_WIPE, "" -STRING_FOR_ERROR, "i ii i." -STRING_SCREEN_COL, " col" -STRING_SCREEN_ROW, " row" -STRING_TIMER_TIME " %d - %s: " -STRING_MKLINK_CREATED_SYMBOLIC, " i %s <<===>> %s\n" -STRING_MKLINK_CREATED_HARD, " %s <<===>> %s\n" -STRING_MKLINK_CREATED_JUNCTION, " ' %s <<===>> %s\n" -STRING_MORE, "i? " -STRING_CANCEL_BATCH_FILE, "\r\n Ctrl-Break. ? (Yes/No/All) " +STRING_REACTOS_VERSION, "Операцiйна Система ReactOS [Версiя %s-%s]\n" +STRING_CMD_SHELLINFO, "\nIнтерпретатор командного рядка ReactOS\nVersion %s %s" +STRING_VERSION_RUNVER, " запущений на %s" +STRING_COPY_FILE , " %d файл(iв) скопiйовано\n" +STRING_DELETE_WIPE, "витерто" +STRING_FOR_ERROR, "невiрна специфiкацiя змiнної." +STRING_SCREEN_COL, "неправильне значення col" +STRING_SCREEN_ROW, "неправильне значення row" +STRING_TIMER_TIME "Таймер %d - %s: " +STRING_MKLINK_CREATED_SYMBOLIC, "Створено символiчне посилання для %s <<===>> %s\n" +STRING_MKLINK_CREATED_HARD, "Створено жорстке посилання для %s <<===>> %s\n" +STRING_MKLINK_CREATED_JUNCTION, "Створено з'єднання для %s <<===>> %s\n" +STRING_MORE, "Бiльше? " +STRING_CANCEL_BATCH_FILE, "\r\nнатиснено Ctrl-Break. Припинити виконання пакетного файлу? (Yes/No/All) " -STRING_INVALID_OPERAND, "i ." -STRING_EXPECTED_CLOSE_PAREN, "i ')'." -STRING_EXPECTED_NUMBER_OR_VARIABLE,"i i' i." -STRING_SYNTAX_COMMAND_INCORRECT, " ." +STRING_INVALID_OPERAND, "Невiрний операнд." +STRING_EXPECTED_CLOSE_PAREN, "Очiкується ')'." +STRING_EXPECTED_NUMBER_OR_VARIABLE,"Очiкується число або iм'я змiнної." +STRING_SYNTAX_COMMAND_INCORRECT, "Некоректний синтаксис команди." END diff --git a/base/shell/cmd/rsrc.rc b/base/shell/cmd/rsrc.rc index 01b56ee5ea7..3ac7a4f39e4 100644 --- a/base/shell/cmd/rsrc.rc +++ b/base/shell/cmd/rsrc.rc @@ -5,11 +5,13 @@ #include "lang/hu-HU.rc" #include "lang/id-ID.rc" #include "lang/it-IT.rc" -#include "lang/pl-PL.rc" #include "lang/no-NO.rc" #include "lang/sk-SK.rc" -#include "lang/uk-UA.rc" +// UTF-8 +#pragma code_page(65001) #include "lang/de-DE.rc" #include "lang/ja-JP.rc" +#include "lang/pl-PL.rc" #include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/shell/explorer-new/CMakeLists.txt b/base/shell/explorer-new/CMakeLists.txt index 6066f89dc5a..034e592a031 100644 --- a/base/shell/explorer-new/CMakeLists.txt +++ b/base/shell/explorer-new/CMakeLists.txt @@ -18,11 +18,10 @@ list(APPEND SOURCE traywnd.c explorer.rc) -add_executable(explorer_new ${CMAKE_CURRENT_BINARY_DIR}/explorer_new_precomp.h.gch ${SOURCE}) +add_executable(explorer_new ${SOURCE}) target_link_libraries(explorer_new uuid) -add_pch(explorer_new ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) set_module_type(explorer_new win32gui) add_importlibs(explorer_new advapi32 @@ -37,5 +36,6 @@ add_importlibs(explorer_new msvcrt kernel32 ntdll) +add_pch(explorer_new precomp.h) add_cd_file(TARGET explorer_new DESTINATION reactos FOR all) diff --git a/base/shell/explorer-new/explorer.rc b/base/shell/explorer-new/explorer.rc index ed22ecab9cf..850afb64e6e 100644 --- a/base/shell/explorer-new/explorer.rc +++ b/base/shell/explorer-new/explorer.rc @@ -33,8 +33,11 @@ IDB_TASKBARPROP_NOLOCK_GROUP_QL BITMAP DISCARDABLE res/nolock_group_ql.bmp #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/shell/explorer-new/lang/pl-PL.rc b/base/shell/explorer-new/lang/pl-PL.rc index 224b7ab4eef..b0916597441 100644 --- a/base/shell/explorer-new/lang/pl-PL.rc +++ b/base/shell/explorer-new/lang/pl-PL.rc @@ -1,5 +1,11 @@ -// Polish translation by Caemyr - Olaf Siejka (caemyr@gmail.com) June, 2007 -// updated by niski - Maciej Bialas (bjauy@o2.pl), July 2009 +/* + * translated by Caemyr - Olaf Siejka (Jun,2007) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * updated by niski - Maciej Bialas (bjauy@o2.pl), July 2009 + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -8,10 +14,10 @@ BEGIN POPUP "" BEGIN MENUITEM SEPARATOR - MENUITEM "Meneder zada", ID_SHELL_CMD_OPEN_TASKMGR + MENUITEM "Menedżer zadań", ID_SHELL_CMD_OPEN_TASKMGR MENUITEM SEPARATOR - MENUITEM "&Zablokuj Pasek zada", ID_LOCKTASKBAR - MENUITEM "&Waciwoci", ID_SHELL_CMD_PROPERTIES + MENUITEM "&Zablokuj Pasek zadań", ID_LOCKTASKBAR + MENUITEM "&Właściwości", ID_SHELL_CMD_PROPERTIES END END @@ -37,9 +43,9 @@ BEGIN MENUITEM "P&anel sterowania", IDM_CONTROLPANEL, MFT_STRING, MFS_GRAYED MENUITEM "", -1, MFT_SEPARATOR MENUITEM "Za&bezpieczenia...", IDM_SECURITY, MFT_STRING, MFS_ENABLED - MENUITEM "P&oczenia sieciowe", IDM_NETWORKCONNECTIONS, MFT_STRING, MFS_ENABLED + MENUITEM "P&ołączenia sieciowe", IDM_NETWORKCONNECTIONS, MFT_STRING, MFS_ENABLED MENUITEM "&Drukarki i faksy", IDM_PRINTERSANDFAXES, MFT_STRING, MFS_ENABLED - MENUITEM "P&asek zada i Menu Start", IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED + MENUITEM "P&asek zadań i Menu Start", IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED END POPUP "&Szukaj", IDM_SEARCH BEGIN @@ -50,7 +56,7 @@ BEGIN MENUITEM "", 450, MFT_SEPARATOR, MFS_ENABLED MENUITEM "S&ynchronizuj", IDM_SYNCHRONIZE, MFT_STRING, MFS_ENABLED MENUITEM "&Wyloguj %s...", IDM_LOGOFF, MFT_STRING, MFS_ENABLED - MENUITEM "&Rozcz...", IDM_DISCONNECT, MFT_STRING, MFS_ENABLED + MENUITEM "&Rozłącz...", IDM_DISCONNECT, MFT_STRING, MFS_ENABLED MENUITEM "Oddokuj &komputer", IDM_UNDOCKCOMPUTER, MFT_STRING, MFS_ENABLED MENUITEM "&Zamknij system...", IDM_SHUTDOWN, MFT_STRING, MFS_ENABLED END @@ -59,17 +65,17 @@ END IDD_TASKBARPROP_TASKBAR DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Pasek zada" +CAPTION "Pasek zadań" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Wygld paska zada", IDC_STATIC, 6,6,240,121 + GROUPBOX "Wygląd paska zadań", IDC_STATIC, 6,6,240,121 CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21 - AUTOCHECKBOX "&Zablokuj pasek zada", IDC_TASKBARPROP_LOCK, 13,45,200,10 - AUTOCHECKBOX "A&utomatyczne ukrywanie paska zada", IDC_TASKBARPROP_HIDE, 13,58,200,10 + AUTOCHECKBOX "&Zablokuj pasek zadań", IDC_TASKBARPROP_LOCK, 13,45,200,10 + AUTOCHECKBOX "A&utomatyczne ukrywanie paska zadań", IDC_TASKBARPROP_HIDE, 13,58,200,10 AUTOCHECKBOX "Zawsze &na wierzchu", IDC_TASKBARPROP_ONTOP, 13,71,200,10 - AUTOCHECKBOX "&Grupuj programy w pasku zada", IDC_TASKBARPROP_GROUP, 13,84,200,10 - AUTOCHECKBOX "Poka pasek &Szybkiego uruchamiania", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 - AUTOCHECKBOX "&Poka podgld okien (miniaturki)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10 + AUTOCHECKBOX "&Grupuj programy w pasku zadań", IDC_TASKBARPROP_GROUP, 13,84,200,10 + AUTOCHECKBOX "Pokaż pasek &Szybkiego uruchamiania", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 + AUTOCHECKBOX "&Pokaż podgląd okien (miniaturki)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10 END IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 @@ -78,41 +84,41 @@ CAPTION "Menu Start" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN AUTORADIOBUTTON "&Menu Start", IDC_TASKBARPROP_STARTMENU, 7,7,105,10 - LTEXT "Ten styl menu daje Tobie atwy dostp do Twoich folderw, ulubionych programw i wyszukiwania.", IDC_STATIC, 20,17,150,24, WS_DISABLED + LTEXT "Ten styl menu pozwala na łatwy dostąp do Twoich folderów, ulubionych programów i wyszukiwania.", IDC_STATIC, 20,17,150,24, WS_DISABLED PUSHBUTTON "&Dostosuj...", IDC_TASKBARPROP_STARTMENUCUST, 192,4,53,14, WS_DISABLED AUTORADIOBUTTON "&Klasyczne Menu Start", IDC_TASKBARPROP_STARTMENUCLASSIC, 7,47,105,10, WS_DISABLED - LTEXT "Ten styl menu zawiera klasyczny wygld i funkcjonalno",-1,20,57,150,24, WS_DISABLED + LTEXT "Ten styl menu zawiera klasyczny wygląd i funkcjonalność",-1,20,57,150,24, WS_DISABLED PUSHBUTTON "&Dostosuj...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192,44,53,14, WS_DISABLED - GROUPBOX "Prywatno",IDC_STATIC, 7,100,238,42 - AUTOCHECKBOX "Zachowaj i wywietl list niedawno &otwartych plikw", IDC_TASKBARPROP_RECENTFILES, 14,114,224,10, WS_DISABLED - AUTOCHECKBOX "Zachowaj i wywietl list niedawno otwartych &programw",IDC_TASKBARPROP_RECENTFOLDERS, 14,128,224,10, WS_DISABLED + GROUPBOX "Prywatność",IDC_STATIC, 7,100,238,42 + AUTOCHECKBOX "Zachowaj i wyświetl listę niedawno &otwartych plików", IDC_TASKBARPROP_RECENTFILES, 14,114,224,10, WS_DISABLED + AUTOCHECKBOX "Zachowaj i wyświetl listę niedawno otwartych &programów",IDC_TASKBARPROP_RECENTFOLDERS, 14,128,224,10, WS_DISABLED END IDD_TASKBARPROP_NOTIFICATION DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Obszar powiadomie" +CAPTION "Obszar powiadomień" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "", IDC_TASKBARPROP_NOTIFICATIONBITMAP, "Static", SS_BITMAP | SS_SUNKEN,7,6,238,21, WS_DISABLED GROUPBOX "Ikony", IDC_STATIC, 6,33,240,58, WS_DISABLED - LTEXT "Moesz uporzdkowa obszar powiadomie poprzez ukrycie rzadko uywanych ikon.", IDC_STATIC, 13,48,223,16, WS_DISABLED + LTEXT "Możesz uporządkować obszar powiadomień poprzez ukrycie rzadko używanych ikon.", IDC_STATIC, 13,48,223,16, WS_DISABLED AUTOCHECKBOX "&Ukryj nieaktywne ikony", IDC_TASKBARPROP_HIDEICONS, 13,70,125,10, WS_DISABLED PUSHBUTTON "&Dostosuj...", IDC_TASKBARPROP_ICONCUST, 188,70,50,14, WS_DISABLED GROUPBOX "Ikony systemowe", IDC_STATIC, 6,97,240,84, WS_DISABLED LTEXT "Wybierz zawsze widoczne ikony systemowe.", IDC_STATIC, 13,112,223,16, WS_DISABLED AUTOCHECKBOX "&Zegar", IDC_TASKBARPROP_CLOCK, 13,126,200,10, WS_DISABLED - AUTOCHECKBOX "&Gono", IDC_TASKBARPROP_VOLUME, 13,139,200,10, WS_DISABLED - AUTOCHECKBOX "&Sie", IDC_TASKBARPROP_NETWORK, 13,152,200,10, WS_DISABLED - AUTOCHECKBOX "Z&arzdzanie energi", IDC_TASKBARPROP_POWER, 13,164,200,10, WS_DISABLED + AUTOCHECKBOX "&Głośność", IDC_TASKBARPROP_VOLUME, 13,139,200,10, WS_DISABLED + AUTOCHECKBOX "&Sieć", IDC_TASKBARPROP_NETWORK, 13,152,200,10, WS_DISABLED + AUTOCHECKBOX "Z&arządzanie energią", IDC_TASKBARPROP_POWER, 13,164,200,10, WS_DISABLED END IDD_TASKBARPROP_TOOLBARS DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Paski narzdzi" +CAPTION "Paski narzędzi" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT "Wybierz paski narzdzi, ktre chcesz doda do paska zada.", IDC_STATIC, 7,7,223,12, WS_DISABLED + LTEXT "Wybierz paski narzędzi, które chcesz dodać do paska zadań.", IDC_STATIC, 7,7,223,12, WS_DISABLED CONTROL "", IDC_TASKBARPROP_DESKBANDLIST, "SysTreeView32",WS_BORDER | WS_TABSTOP | WS_DISABLED, 7,20,236,160, WS_EX_CLIENTEDGE END @@ -120,13 +126,13 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_START "Start" - IDS_PROPERTIES "Wa&ciwoci" - IDS_OPEN_ALL_USERS "&Otwrz - wszyscy uytkownicy" - IDS_EXPLORE_ALL_USERS "&Eksploruj - wszyscy uytkownicy" - IDS_STARTUP_ERROR "System nie moe uruchomi eksploratora, poniewa rejestr jest niedostpny lub uszkodzony." + IDS_PROPERTIES "Właś&ciwości" + IDS_OPEN_ALL_USERS "&Otwórz - wszyscy użytkownicy" + IDS_EXPLORE_ALL_USERS "&Eksploruj - wszyscy użytkownicy" + IDS_STARTUP_ERROR "System nie może uruchomić eksploratora, ponieważ rejestr jest niedostępny lub uszkodzony." END STRINGTABLE DISCARDABLE BEGIN - IDS_TASKBAR_STARTMENU_PROP_CAPTION "Waciwoci paska zada i Menu Start" + IDS_TASKBAR_STARTMENU_PROP_CAPTION "Właściwości paska zadań i Menu Start" END diff --git a/base/shell/explorer-new/lang/ru-RU.rc b/base/shell/explorer-new/lang/ru-RU.rc index 29fb95ebbd2..ed38a91c3d0 100644 --- a/base/shell/explorer-new/lang/ru-RU.rc +++ b/base/shell/explorer-new/lang/ru-RU.rc @@ -7,10 +7,10 @@ BEGIN POPUP "" BEGIN MENUITEM SEPARATOR - MENUITEM " ", ID_SHELL_CMD_OPEN_TASKMGR + MENUITEM "Диспетчер задач", ID_SHELL_CMD_OPEN_TASKMGR MENUITEM SEPARATOR - MENUITEM "& ", ID_LOCKTASKBAR - MENUITEM "&", ID_SHELL_CMD_PROPERTIES + MENUITEM "&Закрепить панель задач", ID_LOCKTASKBAR + MENUITEM "&Свойства", ID_SHELL_CMD_PROPERTIES END END @@ -19,113 +19,113 @@ BEGIN POPUP "" BEGIN MENUITEM "", -1, MFT_SEPARATOR - POPUP "&", IDM_PROGRAMS + POPUP "&Программы", IDM_PROGRAMS BEGIN - MENUITEM "()", -1, MFT_STRING, MFS_GRAYED + MENUITEM "(пусто)", -1, MFT_STRING, MFS_GRAYED END - POPUP "&", IDM_FAVORITES + POPUP "&Избранное", IDM_FAVORITES BEGIN - MENUITEM "()", -1, MFT_STRING, MFS_GRAYED + MENUITEM "(пусто)", -1, MFT_STRING, MFS_GRAYED END - POPUP "&", IDM_DOCUMENTS + POPUP "&Документы", IDM_DOCUMENTS BEGIN - MENUITEM "()", -1, MFT_STRING, MFS_GRAYED + MENUITEM "(пусто)", -1, MFT_STRING, MFS_GRAYED END - POPUP "&", IDM_SETTINGS + POPUP "&Настройки", IDM_SETTINGS BEGIN - MENUITEM "& ", IDM_CONTROLPANEL, MFT_STRING, MFS_GRAYED + MENUITEM "&Панель управления", IDM_CONTROLPANEL, MFT_STRING, MFS_GRAYED MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "&...", IDM_SECURITY, MFT_STRING, MFS_ENABLED - MENUITEM "& ", IDM_NETWORKCONNECTIONS, MFT_STRING, MFS_ENABLED - MENUITEM "& ", IDM_PRINTERSANDFAXES, MFT_STRING, MFS_ENABLED - MENUITEM "& ", IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED + MENUITEM "&Безопасность...", IDM_SECURITY, MFT_STRING, MFS_ENABLED + MENUITEM "&Сетевые подключения", IDM_NETWORKCONNECTIONS, MFT_STRING, MFS_ENABLED + MENUITEM "&Принтеры и факсы", IDM_PRINTERSANDFAXES, MFT_STRING, MFS_ENABLED + MENUITEM "&Панель задач и меню пуск", IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED END - POPUP "&", IDM_SEARCH + POPUP "П&оиск", IDM_SEARCH BEGIN MENUITEM "", -1, MFT_SEPARATOR END - MENUITEM "& ", IDM_HELPANDSUPPORT, MFT_STRING, MFS_ENABLED - MENUITEM "&...", IDM_RUN, MFT_STRING, MFS_ENABLED + MENUITEM "Сп&равка и поддержка", IDM_HELPANDSUPPORT, MFT_STRING, MFS_ENABLED + MENUITEM "Запус&к...", IDM_RUN, MFT_STRING, MFS_ENABLED MENUITEM "", 450, MFT_SEPARATOR, MFS_ENABLED - MENUITEM "&", IDM_SYNCHRONIZE, MFT_STRING, MFS_ENABLED - MENUITEM "& %s...", IDM_LOGOFF, MFT_STRING, MFS_ENABLED - MENUITEM "&...", IDM_DISCONNECT, MFT_STRING, MFS_ENABLED - MENUITEM " &", IDM_UNDOCKCOMPUTER, MFT_STRING, MFS_ENABLED - MENUITEM "&...", IDM_SHUTDOWN, MFT_STRING, MFS_ENABLED + MENUITEM "Синхрониза&ция", IDM_SYNCHRONIZE, MFT_STRING, MFS_ENABLED + MENUITEM "Завершени&е сеанса %s...", IDM_LOGOFF, MFT_STRING, MFS_ENABLED + MENUITEM "Отклю&чение...", IDM_DISCONNECT, MFT_STRING, MFS_ENABLED + MENUITEM "Блокировать комп&ьютер", IDM_UNDOCKCOMPUTER, MFT_STRING, MFS_ENABLED + MENUITEM "В&ыключение...", IDM_SHUTDOWN, MFT_STRING, MFS_ENABLED END END IDD_TASKBARPROP_TASKBAR DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Панель задач" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX " ", IDC_STATIC, 6,6,240,121 + GROUPBOX "Свойства панели задач", IDC_STATIC, 6,6,240,121 CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_LOCK, 13,45,200,10 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_HIDE, 13,58,200,10 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_ONTOP, 13,71,200,10 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_GROUP, 13,84,200,10 - AUTOCHECKBOX " & ", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 - AUTOCHECKBOX "& ()", IDC_TASKBARPROP_WNDPREV, 13,110,200,10 + AUTOCHECKBOX "&Закрепить панель задач", IDC_TASKBARPROP_LOCK, 13,45,200,10 + AUTOCHECKBOX "&Автоматически скрывать панель задач", IDC_TASKBARPROP_HIDE, 13,58,200,10 + AUTOCHECKBOX "&Поверх других окон", IDC_TASKBARPROP_ONTOP, 13,71,200,10 + AUTOCHECKBOX "&Группировать схожие кнопки", IDC_TASKBARPROP_GROUP, 13,84,200,10 + AUTOCHECKBOX "Отображать панель &быстрого запуска", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 + AUTOCHECKBOX "Отобра&жать образцы окон (эскизы)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10 END IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " """"" +CAPTION "Меню ""Пуск""" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - AUTORADIOBUTTON "& """"", IDC_TASKBARPROP_STARTMENU, 7,7,105,10 - LTEXT " , .", IDC_STATIC, 20,17,150,24, WS_DISABLED - PUSHBUTTON "&...", IDC_TASKBARPROP_STARTMENUCUST, 192,4,53,14, WS_DISABLED - AUTORADIOBUTTON "& """"", IDC_TASKBARPROP_STARTMENUCLASSIC, 7,47,105,10, WS_DISABLED - LTEXT " """".",-1,20,57,150,24, WS_DISABLED - PUSHBUTTON "&...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192,44,53,14, WS_DISABLED - GROUPBOX "",IDC_STATIC, 7,100,238,50 - AUTOCHECKBOX " &", IDC_TASKBARPROP_RECENTFILES, 14,114,227,10, WS_DISABLED - AUTOCHECKBOX " &",IDC_TASKBARPROP_RECENTFOLDERS, 14,128,224,17, WS_DISABLED + AUTORADIOBUTTON "М&еню ""Пуск""", IDC_TASKBARPROP_STARTMENU, 7,7,105,10 + LTEXT "Этот стиль меню обеспечивает удобный доступ к папкам, часто используемым программам и поиску.", IDC_STATIC, 20,17,150,24, WS_DISABLED + PUSHBUTTON "&Настроить...", IDC_TASKBARPROP_STARTMENUCUST, 192,4,53,14, WS_DISABLED + AUTORADIOBUTTON "&Классичесское меню ""Пуск""", IDC_TASKBARPROP_STARTMENUCLASSIC, 7,47,105,10, WS_DISABLED + LTEXT "Классичесский стиль отображения меню ""Пуск"".",-1,20,57,150,24, WS_DISABLED + PUSHBUTTON "Н&астроить...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192,44,53,14, WS_DISABLED + GROUPBOX "Конфиденциальность",IDC_STATIC, 7,100,238,50 + AUTOCHECKBOX "Хранить и отображать список недавно открывавшихся фа&йлов", IDC_TASKBARPROP_RECENTFILES, 14,114,227,10, WS_DISABLED + AUTOCHECKBOX "Хранить и отображать список недавно открывавшихся &программ",IDC_TASKBARPROP_RECENTFOLDERS, 14,128,224,17, WS_DISABLED END IDD_TASKBARPROP_NOTIFICATION DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Область уведомлений" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "", IDC_TASKBARPROP_NOTIFICATIONBITMAP, "Static", SS_BITMAP | SS_SUNKEN,7,6,238,21, WS_DISABLED - GROUPBOX "", IDC_STATIC, 6,33,240,58, WS_DISABLED - LTEXT " , , .", IDC_STATIC, 13,48,223,16, WS_DISABLED - AUTOCHECKBOX "& ", IDC_TASKBARPROP_HIDEICONS, 13,70,140,10, WS_DISABLED - PUSHBUTTON "&...", IDC_TASKBARPROP_ICONCUST, 188,70,50,14, WS_DISABLED - GROUPBOX " ", IDC_STATIC, 6,97,240,84, WS_DISABLED - LTEXT " .", IDC_STATIC, 13,112,223,16, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_CLOCK, 13,126,200,10, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_VOLUME, 13,139,200,10, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_NETWORK, 13,152,200,10, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_POWER, 13,164,200,10, WS_DISABLED + GROUPBOX "Значки", IDC_STATIC, 6,33,240,58, WS_DISABLED + LTEXT "Можно избежать загромождения области уведомлений, скрывая значки, которые давно не использовались.", IDC_STATIC, 13,48,223,16, WS_DISABLED + AUTOCHECKBOX "&Скрывать неиспользуемые значки", IDC_TASKBARPROP_HIDEICONS, 13,70,140,10, WS_DISABLED + PUSHBUTTON "&Настроить...", IDC_TASKBARPROP_ICONCUST, 188,70,50,14, WS_DISABLED + GROUPBOX "Системные значки", IDC_STATIC, 6,97,240,84, WS_DISABLED + LTEXT "Выберите постоянно отображаемые системные значки.", IDC_STATIC, 13,112,223,16, WS_DISABLED + AUTOCHECKBOX "&Часы", IDC_TASKBARPROP_CLOCK, 13,126,200,10, WS_DISABLED + AUTOCHECKBOX "&Громкость", IDC_TASKBARPROP_VOLUME, 13,139,200,10, WS_DISABLED + AUTOCHECKBOX "&Сеть", IDC_TASKBARPROP_NETWORK, 13,152,200,10, WS_DISABLED + AUTOCHECKBOX "&Питание", IDC_TASKBARPROP_POWER, 13,164,200,10, WS_DISABLED END IDD_TASKBARPROP_TOOLBARS DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Панели инструментов" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT " , .", IDC_STATIC, 7,7,238,12, WS_DISABLED + LTEXT "Выберите панели инструментов, отображаемые на панели задач.", IDC_STATIC, 7,7,238,12, WS_DISABLED CONTROL "", IDC_TASKBARPROP_DESKBANDLIST, "SysTreeView32",WS_BORDER | WS_TABSTOP | WS_DISABLED, 7,20,236,160, WS_EX_CLIENTEDGE END STRINGTABLE DISCARDABLE BEGIN - IDS_START "" - IDS_PROPERTIES "&" - IDS_OPEN_ALL_USERS "& " - IDS_EXPLORE_ALL_USERS "& " + IDS_START "Пуск" + IDS_PROPERTIES "&Свойства" + IDS_OPEN_ALL_USERS "&Все пользователи" + IDS_EXPLORE_ALL_USERS "&Обзор Всех пользователей" IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END STRINGTABLE DISCARDABLE BEGIN - IDS_TASKBAR_STARTMENU_PROP_CAPTION " " + IDS_TASKBAR_STARTMENU_PROP_CAPTION "Свойства меню Пуск и Панели задач" END diff --git a/base/shell/explorer-new/lang/uk-UA.rc b/base/shell/explorer-new/lang/uk-UA.rc index 0811238087d..d2a6ffe4804 100644 --- a/base/shell/explorer-new/lang/uk-UA.rc +++ b/base/shell/explorer-new/lang/uk-UA.rc @@ -13,10 +13,10 @@ BEGIN POPUP "" BEGIN MENUITEM SEPARATOR - MENUITEM " ", ID_SHELL_CMD_OPEN_TASKMGR + MENUITEM "Диспетчер завдань", ID_SHELL_CMD_OPEN_TASKMGR MENUITEM SEPARATOR - MENUITEM "& ", ID_LOCKTASKBAR - MENUITEM "&", ID_SHELL_CMD_PROPERTIES + MENUITEM "&Закріпити панель завдань", ID_LOCKTASKBAR + MENUITEM "В&ластивості", ID_SHELL_CMD_PROPERTIES END END @@ -25,113 +25,113 @@ BEGIN POPUP "" BEGIN MENUITEM "", -1, MFT_SEPARATOR - POPUP "&", IDM_PROGRAMS + POPUP "&Програми", IDM_PROGRAMS BEGIN - MENUITEM "()", -1, MFT_STRING, MFS_GRAYED + MENUITEM "(пусто)", -1, MFT_STRING, MFS_GRAYED END - POPUP "&", IDM_FAVORITES + POPUP "&Обране", IDM_FAVORITES BEGIN - MENUITEM "()", -1, MFT_STRING, MFS_GRAYED + MENUITEM "(пусто)", -1, MFT_STRING, MFS_GRAYED END - POPUP "&", IDM_DOCUMENTS + POPUP "До&кументи", IDM_DOCUMENTS BEGIN - MENUITEM "()", -1, MFT_STRING, MFS_GRAYED + MENUITEM "(пусто)", -1, MFT_STRING, MFS_GRAYED END - POPUP "&", IDM_SETTINGS + POPUP "Н&алаштування", IDM_SETTINGS BEGIN - MENUITEM "& ", IDM_CONTROLPANEL, MFT_STRING, MFS_GRAYED + MENUITEM "П&анель керування", IDM_CONTROLPANEL, MFT_STRING, MFS_GRAYED MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "&...", IDM_SECURITY, MFT_STRING, MFS_ENABLED - MENUITEM "& ", IDM_NETWORKCONNECTIONS, MFT_STRING, MFS_ENABLED - MENUITEM "& ", IDM_PRINTERSANDFAXES, MFT_STRING, MFS_ENABLED - MENUITEM " & """"", IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED + MENUITEM "&Безпека...", IDM_SECURITY, MFT_STRING, MFS_ENABLED + MENUITEM "&Мережні підключення", IDM_NETWORKCONNECTIONS, MFT_STRING, MFS_ENABLED + MENUITEM "Пр&интери й факси", IDM_PRINTERSANDFAXES, MFT_STRING, MFS_ENABLED + MENUITEM "Панель &завдань і меню ""Пуск""", IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED END - POPUP "&", IDM_SEARCH + POPUP "З&найти", IDM_SEARCH BEGIN MENUITEM "", -1, MFT_SEPARATOR END - MENUITEM "& ", IDM_HELPANDSUPPORT, MFT_STRING, MFS_ENABLED - MENUITEM " &...", IDM_RUN, MFT_STRING, MFS_ENABLED + MENUITEM "&Довідка та підтримка", IDM_HELPANDSUPPORT, MFT_STRING, MFS_ENABLED + MENUITEM "Запуск про&грами...", IDM_RUN, MFT_STRING, MFS_ENABLED MENUITEM "", 450, MFT_SEPARATOR, MFS_ENABLED - MENUITEM "&", IDM_SYNCHRONIZE, MFT_STRING, MFS_ENABLED - MENUITEM "& %s...", IDM_LOGOFF, MFT_STRING, MFS_ENABLED - MENUITEM "&...", IDM_DISCONNECT, MFT_STRING, MFS_ENABLED - MENUITEM " '&", IDM_UNDOCKCOMPUTER, MFT_STRING, MFS_ENABLED - MENUITEM "& ...", IDM_SHUTDOWN, MFT_STRING, MFS_ENABLED + MENUITEM "Син&хронізація", IDM_SYNCHRONIZE, MFT_STRING, MFS_ENABLED + MENUITEM "Завер&шення сеансу %s...", IDM_LOGOFF, MFT_STRING, MFS_ENABLED + MENUITEM "В&имкнення...", IDM_DISCONNECT, MFT_STRING, MFS_ENABLED + MENUITEM "Заблокування комп'&ютера", IDM_UNDOCKCOMPUTER, MFT_STRING, MFS_ENABLED + MENUITEM "&Завершення роботи...", IDM_SHUTDOWN, MFT_STRING, MFS_ENABLED END END IDD_TASKBARPROP_TASKBAR DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Панель задач" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX " ", IDC_STATIC, 6,6,240,121 + GROUPBOX "Властивості панелі задач", IDC_STATIC, 6,6,240,121 CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_LOCK, 13,45,200,10 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_HIDE, 13,58,200,10 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_ONTOP, 13,71,200,10 - AUTOCHECKBOX "& ", IDC_TASKBARPROP_GROUP, 13,84,200,10 - AUTOCHECKBOX "³ & ", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 - AUTOCHECKBOX "&³ ()", IDC_TASKBARPROP_WNDPREV, 13,110,200,10 + AUTOCHECKBOX "&Заборонити панель задач", IDC_TASKBARPROP_LOCK, 13,45,200,10 + AUTOCHECKBOX "&Автоматично приховувати панель задач", IDC_TASKBARPROP_HIDE, 13,58,200,10 + AUTOCHECKBOX "&Поверх інших вікон", IDC_TASKBARPROP_ONTOP, 13,71,200,10 + AUTOCHECKBOX "&Групувати схожі кнопки", IDC_TASKBARPROP_GROUP, 13,84,200,10 + AUTOCHECKBOX "Відображати панель &швидкого запуску", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 + AUTOCHECKBOX "&Відображати зразки вікон (ескізи)", IDC_TASKBARPROP_WNDPREV, 13,110,200,10 END IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " """"" +CAPTION "Меню ""Пуск""" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - AUTORADIOBUTTON "& """"", IDC_TASKBARPROP_STARTMENU, 7,7,105,10 - LTEXT " , .", IDC_STATIC, 20,17,150,24, WS_DISABLED - PUSHBUTTON "&...", IDC_TASKBARPROP_STARTMENUCUST, 192,4,53,14, WS_DISABLED - AUTORADIOBUTTON " """"", IDC_TASKBARPROP_STARTMENUCLASSIC, 7,47,105,10, WS_DISABLED - LTEXT " ",-1,20,57,150,24, WS_DISABLED - PUSHBUTTON "&...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192,44,53,14, WS_DISABLED - GROUPBOX "",IDC_STATIC, 7,100,238,42 - AUTOCHECKBOX " &", IDC_TASKBARPROP_RECENTFILES, 14,114,224,10, WS_DISABLED - AUTOCHECKBOX " &",IDC_TASKBARPROP_RECENTFOLDERS, 14,128,224,10, WS_DISABLED + AUTORADIOBUTTON "&Меню ""Пуск""", IDC_TASKBARPROP_STARTMENU, 7,7,105,10 + LTEXT "Цей стиль меню забезпечує зручний доступ до папок, часто використовуваних програм та пошуку.", IDC_STATIC, 20,17,150,24, WS_DISABLED + PUSHBUTTON "&Налаштувати...", IDC_TASKBARPROP_STARTMENUCUST, 192,4,53,14, WS_DISABLED + AUTORADIOBUTTON "Класичне меню ""Пуск""", IDC_TASKBARPROP_STARTMENUCLASSIC, 7,47,105,10, WS_DISABLED + LTEXT "Цей стиль меню має класичний вигляд і функціональність",-1,20,57,150,24, WS_DISABLED + PUSHBUTTON "&Налаштувати...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192,44,53,14, WS_DISABLED + GROUPBOX "Конфіденційність",IDC_STATIC, 7,100,238,42 + AUTOCHECKBOX "Зберігати та відображати список недавно відкритих &файлів", IDC_TASKBARPROP_RECENTFILES, 14,114,224,10, WS_DISABLED + AUTOCHECKBOX "Зберігати та відображати список недавно відкритих &програм",IDC_TASKBARPROP_RECENTFOLDERS, 14,128,224,10, WS_DISABLED END IDD_TASKBARPROP_NOTIFICATION DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Область сповіщень" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "", IDC_TASKBARPROP_NOTIFICATIONBITMAP, "Static", SS_BITMAP | SS_SUNKEN,7,6,238,21, WS_DISABLED - GROUPBOX "", IDC_STATIC, 6,33,240,58, WS_DISABLED - LTEXT " , , .", IDC_STATIC, 13,48,223,16, WS_DISABLED - AUTOCHECKBOX "& ", IDC_TASKBARPROP_HIDEICONS, 13,70,125,10, WS_DISABLED - PUSHBUTTON "&...", IDC_TASKBARPROP_ICONCUST, 188,70,50,14, WS_DISABLED - GROUPBOX " ", IDC_STATIC, 6,97,240,84, WS_DISABLED - LTEXT " .", IDC_STATIC, 13,112,223,16, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_CLOCK, 13,126,200,10, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_VOLUME, 13,139,200,10, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_NETWORK, 13,152,200,10, WS_DISABLED - AUTOCHECKBOX "&", IDC_TASKBARPROP_POWER, 13,164,200,10, WS_DISABLED + GROUPBOX "Значки", IDC_STATIC, 6,33,240,58, WS_DISABLED + LTEXT "Можна уникнути захаращення області повідомлень, приховуючи значки, які давно не використовувалися.", IDC_STATIC, 13,48,223,16, WS_DISABLED + AUTOCHECKBOX "&Приховувати невживані значки", IDC_TASKBARPROP_HIDEICONS, 13,70,125,10, WS_DISABLED + PUSHBUTTON "&Налаштувати...", IDC_TASKBARPROP_ICONCUST, 188,70,50,14, WS_DISABLED + GROUPBOX "Системні значки", IDC_STATIC, 6,97,240,84, WS_DISABLED + LTEXT "Оберіть системні значки для постійного відображення.", IDC_STATIC, 13,112,223,16, WS_DISABLED + AUTOCHECKBOX "&Годинник", IDC_TASKBARPROP_CLOCK, 13,126,200,10, WS_DISABLED + AUTOCHECKBOX "&Гучність", IDC_TASKBARPROP_VOLUME, 13,139,200,10, WS_DISABLED + AUTOCHECKBOX "&Мережа", IDC_TASKBARPROP_NETWORK, 13,152,200,10, WS_DISABLED + AUTOCHECKBOX "&Живлення", IDC_TASKBARPROP_POWER, 13,164,200,10, WS_DISABLED END IDD_TASKBARPROP_TOOLBARS DIALOGEX 0, 0, 252, 218 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Панелі інструментів" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT " , .", IDC_STATIC, 7,7,223,12, WS_DISABLED + LTEXT "Оберіть панелі інструментів, які будуть відображатись на панелі завдань.", IDC_STATIC, 7,7,223,12, WS_DISABLED CONTROL "", IDC_TASKBARPROP_DESKBANDLIST, "SysTreeView32",WS_BORDER | WS_TABSTOP | WS_DISABLED, 7,20,236,160, WS_EX_CLIENTEDGE END STRINGTABLE DISCARDABLE BEGIN - IDS_START "" - IDS_PROPERTIES "&" - IDS_OPEN_ALL_USERS "& " - IDS_EXPLORE_ALL_USERS "& " - IDS_STARTUP_ERROR " explorer, ." + IDS_START "Пуск" + IDS_PROPERTIES "В&ластивості" + IDS_OPEN_ALL_USERS "&Всі користувачі" + IDS_EXPLORE_ALL_USERS "&Огляд всіх користувачів" + IDS_STARTUP_ERROR "Система не може стартувати explorer, оскільки реєстр пошкоджений або відсутній." END STRINGTABLE DISCARDABLE BEGIN - IDS_TASKBAR_STARTMENU_PROP_CAPTION " " + IDS_TASKBAR_STARTMENU_PROP_CAPTION "Властивості меню Пуск та Панелі завдань" END diff --git a/base/shell/explorer/CMakeLists.txt b/base/shell/explorer/CMakeLists.txt index 6f01f7ee00f..14f73046157 100644 --- a/base/shell/explorer/CMakeLists.txt +++ b/base/shell/explorer/CMakeLists.txt @@ -10,10 +10,9 @@ set_unicode() add_definitions( -DWIN32 - -D__WINDRES__ - -D_DLL -D__USE_CRTIMP) + -D__WINDRES__) -#add_pch(explorer ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h SOURCE) +#add_pch(explorer precomp.h) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) list(APPEND SOURCE @@ -53,7 +52,7 @@ list(APPEND SOURCE utility/window.cpp utility/shellbrowserimpl.cpp) # utility/shelltests.cpp -add_executable(explorer ${SOURCE}) #${CMAKE_CURRENT_BINARY_DIR}/explorer_precomp.h.gch ${SOURCE}) +add_executable(explorer ${SOURCE}) set_subsystem(explorer windows) set_entrypoint(explorer WinMainCRTStartup) @@ -64,14 +63,10 @@ target_link_libraries(explorer -lgcc -lmingwex wine - mingw_wmain - mingw_common uuid) add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 notifyhook msvcrt kernel32 ntdll) - set_image_base(explorer 0x00400000) - add_dependencies(explorer psdk) add_cd_file(TARGET explorer DESTINATION reactos FOR all) add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml DESTINATION reactos FOR all) diff --git a/base/shell/explorer/desktop/desktop.cpp b/base/shell/explorer/desktop/desktop.cpp index 4c35f37243b..52c5dce1898 100644 --- a/base/shell/explorer/desktop/desktop.cpp +++ b/base/shell/explorer/desktop/desktop.cpp @@ -469,7 +469,7 @@ LRESULT DesktopWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) // forward message to common controls SendMessage(g_Globals._hwndShellView, WM_SYSCOLORCHANGE, 0, 0); - SendMessage(_desktopBar, WM_SYSCOLORCHANGE, 0, 0);OutputDebugStringA("WM_SYSCOLORCHANGE desktop\n"); + SendMessage(_desktopBar, WM_SYSCOLORCHANGE, 0, 0); break; default: def: diff --git a/base/shell/explorer/explorer-pl.rc b/base/shell/explorer/explorer-pl.rc index 8624c4b6755..2001458d76d 100644 --- a/base/shell/explorer/explorer-pl.rc +++ b/base/shell/explorer/explorer-pl.rc @@ -14,11 +14,11 @@ ///////////////////////////////////////////////////////////////////////////// // Polish (PL) resources +// UTF-8 conversion by Caemyr (May, 2011) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -#pragma code_page(1250) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -32,30 +32,30 @@ BEGIN BEGIN MENUITEM "Urucho&m...", ID_EXECUTE MENUITEM SEPARATOR - MENUITEM "Za&kocz", ID_FILE_EXIT + MENUITEM "Za&kończ", ID_FILE_EXIT END POPUP "&Widok" BEGIN MENUITEM "Przyciski &standardowe", ID_VIEW_TOOL_BAR MENUITEM "P&rzyciski dodatkowe", ID_VIEW_EXTRA_BAR - MENUITEM "Pasek &dyskw", ID_VIEW_DRIVE_BAR, CHECKED + MENUITEM "Pasek &dysków", ID_VIEW_DRIVE_BAR, CHECKED MENUITEM "Pasek &boczny", ID_VIEW_SIDE_BAR MENUITEM "Pasek sta&nu", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&Odwie\tF5", ID_REFRESH - MENUITEM "P&eny ekran\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + MENUITEM "&Odśwież\tF5", ID_REFRESH + MENUITEM "P&ełny ekran\tCtrl+Shift+S", ID_VIEW_FULLSCREEN MENUITEM "SDI", ID_VIEW_SDI END POPUP "&Okna" BEGIN MENUITEM "Nowe &okno", ID_WINDOW_NEW MENUITEM "&Kaskadowo\tShift+F5", ID_WINDOW_CASCADE - MENUITEM "&Ssiadujco poziomo", ID_WINDOW_TILE_HORZ - MENUITEM "Ssiadujco &pionowo\tShift+F4", ID_WINDOW_TILE_VERT + MENUITEM "&Sąsiadująco poziomo", ID_WINDOW_TILE_HORZ + MENUITEM "Sąsiadująco &pionowo\tShift+F4", ID_WINDOW_TILE_VERT MENUITEM "&Autorozmieszczanie", ID_WINDOW_AUTOSORT - MENUITEM "Rozmie wedug &nazwy", ID_WINDOW_ARRANGE + MENUITEM "Rozmieść według &nazwy", ID_WINDOW_ARRANGE END - POPUP "&Narzdzia" + POPUP "&Narzędzia" BEGIN MENUITEM "&Opcje", ID_TOOLS_OPTIONS END @@ -71,8 +71,8 @@ IDM_DESKTOPBAR MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&Waciwoci", ID_DESKTOPBAR_SETTINGS - MENUITEM "Meneder &zada", ID_TASKMGR + MENUITEM "&Właściwości", ID_DESKTOPBAR_SETTINGS + MENUITEM "Menedżer &zadań", ID_TASKMGR MENUITEM SEPARATOR MENUITEM "ReactOS Explorer - &informacje", ID_ABOUT_EXPLORER END @@ -82,8 +82,8 @@ IDM_VOLUME MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&Otwrz regulacj gonoci", ID_TRAY_VOLUME - MENUITEM "&Ustaw waciwoci audio", ID_VOLUME_PROPERTIES + MENUITEM "&Otwórz regulację głośności", ID_TRAY_VOLUME + MENUITEM "&Ustaw właściwości audio", ID_VOLUME_PROPERTIES END END @@ -91,10 +91,10 @@ IDM_NOTIFYAREA MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&Poka ukryte ikony", ID_SHOW_HIDDEN_ICONS - MENUITEM "&Ukrywaj nieuywane ikony", ID_SHOW_ICON_BUTTON + MENUITEM "&Pokaż ukryte ikony", ID_SHOW_HIDDEN_ICONS + MENUITEM "&Ukrywaj nieużywane ikony", ID_SHOW_ICON_BUTTON MENUITEM "&Konfiguruj powiadomienia", ID_CONFIG_NOTIFYAREA - MENUITEM "Ustaw &dat/godzin", ID_CONFIG_TIME + MENUITEM "Ustaw &datę/godzinę", ID_CONFIG_TIME MENUITEM SEPARATOR MENUITEM "ReactOS Explorer - &informacje", ID_ABOUT_EXPLORER END @@ -106,7 +106,7 @@ BEGIN BEGIN MENUITEM "Urucho&m...", ID_EXECUTE MENUITEM SEPARATOR - MENUITEM "Za&kocz", ID_FILE_EXIT + MENUITEM "Za&kończ", ID_FILE_EXIT END POPUP "&Widok" BEGIN @@ -114,11 +114,11 @@ BEGIN MENUITEM "Pasek &boczny", ID_VIEW_SIDE_BAR, GRAYED MENUITEM "Pasek sta&nu", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&Odwie\tF5", ID_REFRESH - MENUITEM "P&eny ekran\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + MENUITEM "&Odśwież\tF5", ID_REFRESH + MENUITEM "P&ełny ekran\tCtrl+Shift+S", ID_VIEW_FULLSCREEN MENUITEM "&MDI", ID_VIEW_MDI END - POPUP "&Narzdzia" + POPUP "&Narzędzia" BEGIN MENUITEM "&Opcje", ID_TOOLS_OPTIONS END @@ -169,45 +169,45 @@ END IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Waciwoci pulpitu" +CAPTION "Właściwości pulpitu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz sposb ukadania ikon:", + LTEXT "Wybierz sposób układania ikon:", IDC_STATIC,7,7,166,8 - CONTROL "lewy/gr w d",IDC_ICON_ALIGN_0,"Button",BS_OWNERDRAW | + CONTROL "lewy/gór w dół",IDC_ICON_ALIGN_0,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,7,25,46,44 - CONTROL "lewy/gr w prw",IDC_ICON_ALIGN_1,"Button",BS_OWNERDRAW | + CONTROL "lewy/gór w prw",IDC_ICON_ALIGN_1,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,57,25,46,44 - CONTROL "prwy/gr w lewo",IDC_ICON_ALIGN_2,"Button",BS_OWNERDRAW | + CONTROL "prwy/gór w lewo",IDC_ICON_ALIGN_2,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,110,25,46,44 - CONTROL "prwy/gr w d",IDC_ICON_ALIGN_3,"Button",BS_OWNERDRAW | + CONTROL "prwy/gór w dół",IDC_ICON_ALIGN_3,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,159,25,46,44 - CONTROL "lewy/dol.w gr",IDC_ICON_ALIGN_4,"Button",BS_OWNERDRAW | + CONTROL "lewy/dol.w gór",IDC_ICON_ALIGN_4,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,7,73,46,44 CONTROL "lewy/dol.w praw",IDC_ICON_ALIGN_5,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,57,73,46,44 CONTROL "prwy/dol.w lewo",IDC_ICON_ALIGN_6,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,110,73,46,44 - CONTROL "prwy/dol.w gr",IDC_ICON_ALIGN_7,"Button",BS_OWNERDRAW | + CONTROL "prwy/dol.w gór",IDC_ICON_ALIGN_7,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,159,73,46,44 - CONTROL "obustr. w d",IDC_ICON_ALIGN_8,"Button",BS_OWNERDRAW | + CONTROL "obustr. w dół",IDC_ICON_ALIGN_8,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,7,121,46,44 CONTROL "na brzegach",IDC_ICON_ALIGN_9,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,57,121,46,44 - CONTROL "dookoa",IDC_ICON_ALIGN_10,"Button",BS_OWNERDRAW | + CONTROL "dookoła",IDC_ICON_ALIGN_10,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,110,121,46,44 CONTROL "",IDC_ICON_ALIGN_11,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,159,121,46,44 -// CONTROL "Wywietlaj &numer wersji",ID_DESKTOP_VERSION,"Button", +// CONTROL "Wyświetlaj &numer wersji",ID_DESKTOP_VERSION,"Button", // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Waciwoci paska zada" +CAPTION "Właściwości paska zadań" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Poka &zegar",ID_SHOW_CLOCK,"Button",BS_AUTOCHECKBOX | + CONTROL "Pokaż &zegar",ID_SHOW_CLOCK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,152,52,10 CONTROL "&Ukrywaj nieaktywne ikony", ID_HIDE_INACTIVE_ICONS,"Button",BS_AUTOCHECKBOX | @@ -217,7 +217,7 @@ END IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Waciwoci Menu Start" +CAPTION "Właściwości Menu Start" FONT 8, "MS Shell Dlg" BEGIN END @@ -226,18 +226,18 @@ IDD_NOTIFYAREA DIALOGEX 0, 0, 208, 174 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW -CAPTION "Konfiguracja ikon powiadomie" +CAPTION "Konfiguracja ikon powiadomień" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "Tree1",IDC_NOTIFY_ICONS,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,194,31 - LTEXT "&Podpowied:",IDC_LABEL1,7,44,40,8 + LTEXT "&Podpowiedź:",IDC_LABEL1,7,44,40,8 EDITTEXT IDC_NOTIFY_TOOLTIP,58,42,143,14,ES_AUTOHSCROLL - LTEXT "&Tytu okna:",IDC_LABEL2,7,63,44,8 + LTEXT "&Tytuł okna:",IDC_LABEL2,7,63,44,8 EDITTEXT IDC_NOTIFY_TITLE,58,60,143,14,ES_AUTOHSCROLL - LTEXT "cieka:",IDC_LABEL3,7,81,43,8 + LTEXT "Ścieżka:",IDC_LABEL3,7,81,43,8 EDITTEXT IDC_NOTIFY_MODULE,58,78,143,14,ES_AUTOHSCROLL - GROUPBOX "&Sposb wywietlania",IDC_LABEL4,7,96,157,28 + GROUPBOX "&Sposób wyświetlania",IDC_LABEL4,7,96,157,28 CONTROL "&widoczny",IDC_NOTIFY_SHOW,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,15,108,33,10 CONTROL "&ukryty",IDC_NOTIFY_HIDE,"Button",BS_AUTORADIOBUTTON,66, @@ -248,7 +248,7 @@ BEGIN LTEXT "&Zmodyfikowany:",IDC_LABEL6,7,132,43,8 EDITTEXT IDC_LAST_CHANGE,59,129,105,14,ES_AUTOHSCROLL | ES_READONLY - CONTROL "Po&ka wszystkie",ID_SHOW_HIDDEN_ICONS,"Button", + CONTROL "Po&każ wszystkie",ID_SHOW_HIDDEN_ICONS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,154,56,10 DEFPUSHBUTTON "&OK",IDOK,91,153,50,14,WS_GROUP PUSHBUTTON "&Anuluj",IDCANCEL,151,153,50,14 @@ -257,21 +257,21 @@ END IDD_MDI_SDI DIALOGEX 0, 0, 194, 157 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW -CAPTION "Tryb wywietlania okien" +CAPTION "Tryb wyświetlania okien" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT "Wybierz tryb wywietlania okien:", + LTEXT "Wybierz tryb wyświetlania okien:", IDC_STATIC,7,7,160,8 CONTROL "&MDI (Otwieraj w jednym oknie)",IDC_MDI,"Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,7,31,124,10 - CONTROL "&SDI (Otwieraj we wasnym oknie)",IDC_SDI,"Button", + CONTROL "&SDI (Otwieraj we własnym oknie)",IDC_SDI,"Button", BS_AUTORADIOBUTTON,7,62,118,10 CONTROL 170,IDC_STATIC,"Static",SS_BITMAP,145,23,15,13 CONTROL 171,IDC_STATIC,"Static",SS_BITMAP,145,57,15,13 CONTROL "&Otwieraj podkatalogi w nowych oknach", IDC_SEPARATE_SUBFOLDERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,90,135,10 - LTEXT "Te opcje bd stosowane w przyszoci do wszystkich okien.", + LTEXT "Te opcje będą stosowane w przyszłości do wszystkich okien.", IDC_STATIC,7,111,174,22 DEFPUSHBUTTON "&OK",IDOK,29,136,50,14,WS_GROUP PUSHBUTTON "&Anuluj",IDCANCEL,106,136,50,14 @@ -349,41 +349,41 @@ BEGIN IDS_STARTMENU "Menu Start" IDS_MINIMIZE_ALL "Minimalizuj wszystko" IDS_DESKTOP_NUM "Pulpit %d" - IDS_VOLUME "Gono" + IDS_VOLUME "Głośność" IDS_ITEMS_CUR "Aktualne pozycje" IDS_ITEMS_CONFIGURED "ustawienia" IDS_ITEMS_VISIBLE "widoczne" IDS_ITEMS_HIDDEN "ukryte" - IDS_NOTIFY_SHOW "poka" + IDS_NOTIFY_SHOW "pokaż" IDS_NOTIFY_HIDE "ukryj" IDS_NOTIFY_AUTOHIDE "autoukrywanie" - IDS_SHOW_HIDDEN_ICONS "Poka ukryte ikony" + IDS_SHOW_HIDDEN_ICONS "Pokaż ukryte ikony" IDS_HIDE_ICONS "Ukryj ikony" - IDS_TERMINATE "Zakocz dziaanie ReactOS Explorer" + IDS_TERMINATE "Zakończ działanie ReactOS Explorer" END STRINGTABLE DISCARDABLE BEGIN - IDS_NETWORK "Sie" - IDS_CONNECTIONS "Poczenia sieciowe" + IDS_NETWORK "Sieć" + IDS_CONNECTIONS "Połączenia sieciowe" IDS_DRIVES "Dysk" - IDS_SEARCH_COMPUTER "Znajd komputer..." - IDS_SETTINGS_MENU "Menu ustawie" + IDS_SEARCH_COMPUTER "Znajdź komputer..." + IDS_SETTINGS_MENU "Menu ustawień" IDS_CONTROL_PANEL "Panel sterowania" IDS_PRINTERS "Drukarki" - IDS_BROWSE "Przegldaj" - IDS_SEARCH_PRG "Znajd program..." + IDS_BROWSE "Przeglądaj" + IDS_SEARCH_PRG "Znajdź program..." IDS_ALL_USERS "Wszyscy\\" IDS_SEARCH "Szukaj" IDS_ABOUT_EXPLORER "ReactOS Explorer - &informacje" IDS_LAUNCH_MANY_PROGRAMS - "Zaznaczye wicej ni jeden program.\nCzy chcesz uruchomi je jednoczenie?" - IDS_DESKTOPBAR_SETTINGS "Waciwoci pulpitu" + "Zaznaczyłeś więcej niż jeden program.\nCzy chcesz uruchomić je jednocześnie?" + IDS_DESKTOPBAR_SETTINGS "Właściwości pulpitu" IDS_DESKTOP "Pulpit" - IDS_TASKBAR "Pasek zada" + IDS_TASKBAR "Pasek zadań" IDS_NAMECOLUMN "Nazwa" - IDS_PATHCOLUMN "cieka" - IDS_MENUCOLUMN "cieka menu" + IDS_PATHCOLUMN "Ścieżka" + IDS_MENUCOLUMN "Ścieżka menu" END #endif // Polish (PL) resources diff --git a/base/shell/explorer/explorer-ro.rc b/base/shell/explorer/explorer-ro.rc index c16bba4c475..a07d64ea171 100644 --- a/base/shell/explorer/explorer-ro.rc +++ b/base/shell/explorer/explorer-ro.rc @@ -18,7 +18,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ROM) #ifdef _WIN32 LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// diff --git a/base/shell/explorer/explorer-ru.rc b/base/shell/explorer/explorer-ru.rc index 2063bb7e237..0bad959ed5e 100644 --- a/base/shell/explorer/explorer-ru.rc +++ b/base/shell/explorer/explorer-ru.rc @@ -18,7 +18,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) #ifdef _WIN32 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -28,42 +27,42 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDM_MDIFRAME MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&...", ID_EXECUTE + MENUITEM "&Выполнить...", ID_EXECUTE MENUITEM SEPARATOR - MENUITEM "&", ID_FILE_EXIT + MENUITEM "В&ыход", ID_FILE_EXIT END - POPUP "&" + POPUP "&Вид" BEGIN - MENUITEM "& ", ID_VIEW_TOOL_BAR - MENUITEM "& ", ID_VIEW_EXTRA_BAR - MENUITEM "&", ID_VIEW_DRIVE_BAR - MENUITEM "&", ID_VIEW_SIDE_BAR - MENUITEM "& ", ID_VIEW_STATUSBAR + MENUITEM "&Панель инструментов", ID_VIEW_TOOL_BAR + MENUITEM "&Дополнительная панель", ID_VIEW_EXTRA_BAR + MENUITEM "&Диски", ID_VIEW_DRIVE_BAR + MENUITEM "И&збранное", ID_VIEW_SIDE_BAR + MENUITEM "&Строка состояния", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&\tF5", ID_REFRESH - MENUITEM "& \tCtrl+Shift+S", ID_VIEW_FULLSCREEN + MENUITEM "&Обновить\tF5", ID_REFRESH + MENUITEM "По&лный экран\tCtrl+Shift+S", ID_VIEW_FULLSCREEN MENUITEM "SDI", ID_VIEW_SDI END - POPUP "&" + POPUP "О&кна" BEGIN - MENUITEM " &", ID_WINDOW_NEW - MENUITEM " \tShift+F5", ID_WINDOW_CASCADE - MENUITEM "&", ID_WINDOW_TILE_HORZ - MENUITEM "&\tShift+F4", ID_WINDOW_TILE_VERT - MENUITEM " ", ID_WINDOW_AUTOSORT - MENUITEM " &", ID_WINDOW_ARRANGE + MENUITEM "Новое о&кно", ID_WINDOW_NEW + MENUITEM "Расположить каскадом\tShift+F5", ID_WINDOW_CASCADE + MENUITEM "&Горизонтально", ID_WINDOW_TILE_HORZ + MENUITEM "&Вертикально\tShift+F4", ID_WINDOW_TILE_VERT + MENUITEM "Упорядочить автоматически", ID_WINDOW_AUTOSORT + MENUITEM "Упорядочить &значки", ID_WINDOW_ARRANGE END - POPUP "&" + POPUP "&Инструменты" BEGIN - MENUITEM "&", ID_TOOLS_OPTIONS + MENUITEM "&Параметры", ID_TOOLS_OPTIONS END - POPUP "&" + POPUP "По&мощь" BEGIN - MENUITEM "& ...", ID_EXPLORER_FAQ - MENUITEM " &...", ID_ABOUT_EXPLORER - MENUITEM " &ReactOS...", ID_ABOUT_WINDOWS + MENUITEM "&Частые вопросы по Проводнику...", ID_EXPLORER_FAQ + MENUITEM "О &программе...", ID_ABOUT_EXPLORER + MENUITEM "О &ReactOS...", ID_ABOUT_WINDOWS END END @@ -71,10 +70,10 @@ IDM_DESKTOPBAR MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&...", ID_DESKTOPBAR_SETTINGS - MENUITEM "& ", ID_TASKMGR + MENUITEM "&Параметры...", ID_DESKTOPBAR_SETTINGS + MENUITEM "&Диспетчер задач", ID_TASKMGR MENUITEM SEPARATOR - MENUITEM "& ...", ID_ABOUT_EXPLORER + MENUITEM "&О программе...", ID_ABOUT_EXPLORER END END @@ -82,8 +81,8 @@ IDM_VOLUME MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "", ID_TRAY_VOLUME - MENUITEM " ", ID_VOLUME_PROPERTIES + MENUITEM "Громкость", ID_TRAY_VOLUME + MENUITEM "Свойства звука", ID_VOLUME_PROPERTIES END END @@ -91,42 +90,42 @@ IDM_NOTIFYAREA MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "& ", ID_SHOW_HIDDEN_ICONS - MENUITEM " &", ID_SHOW_ICON_BUTTON - MENUITEM "& ...", ID_CONFIG_NOTIFYAREA - MENUITEM " /&", ID_CONFIG_TIME + MENUITEM "&Показывать скрытые значки", ID_SHOW_HIDDEN_ICONS + MENUITEM "Показывать значки на &кнопках", ID_SHOW_ICON_BUTTON + MENUITEM "&Настройка уведомлений...", ID_CONFIG_NOTIFYAREA + MENUITEM "Настройка даты/&времени", ID_CONFIG_TIME MENUITEM SEPARATOR - MENUITEM "& ...", ID_ABOUT_EXPLORER + MENUITEM "&О программе...", ID_ABOUT_EXPLORER END END IDM_SDIFRAME MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&...", ID_EXECUTE + MENUITEM "&Запустить...", ID_EXECUTE MENUITEM SEPARATOR - MENUITEM "&", ID_FILE_EXIT + MENUITEM "В&ыход", ID_FILE_EXIT END - POPUP "&" + POPUP "&Вид" BEGIN - MENUITEM "& ", ID_VIEW_TOOL_BAR - MENUITEM "&", ID_VIEW_SIDE_BAR, GRAYED - MENUITEM "& ", ID_VIEW_STATUSBAR + MENUITEM "&Панель инструментов", ID_VIEW_TOOL_BAR + MENUITEM "И&збранное", ID_VIEW_SIDE_BAR, GRAYED + MENUITEM "&Строка состояния", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&\tF5", ID_REFRESH - MENUITEM "& \tCtrl+Shift+S", ID_VIEW_FULLSCREEN + MENUITEM "&Обновить\tF5", ID_REFRESH + MENUITEM "По&лный экран\tCtrl+Shift+S", ID_VIEW_FULLSCREEN MENUITEM "&MDI", ID_VIEW_MDI END - POPUP "&" + POPUP "&Инструменты" BEGIN - MENUITEM "&", ID_TOOLS_OPTIONS + MENUITEM "&Параметры", ID_TOOLS_OPTIONS END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "& ...", ID_EXPLORER_FAQ - MENUITEM " &...", ID_ABOUT_EXPLORER - MENUITEM " &ReactOS...", ID_ABOUT_WINDOWS + MENUITEM "&Частые вопросы по Проводнику...", ID_EXPLORER_FAQ + MENUITEM "О &Проводнике...", ID_ABOUT_EXPLORER + MENUITEM "О &ReactOS...", ID_ABOUT_WINDOWS END END @@ -138,41 +137,41 @@ END IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Выполнить" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",101,"Static",SS_SIMPLE | SS_NOPREFIX,3,6,150,10 - CONTROL "&:",-1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,3, + CONTROL "&Команда:",-1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,3, 18,60,10 EDITTEXT 201,3,29,134,12,ES_AUTOHSCROLL - CONTROL " &",214,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3, + CONTROL "Как &ссылку",214,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3, 45,71,12 DEFPUSHBUTTON "&OK",1,158,6,47,14 - PUSHBUTTON "&",2,158,24,47,14 - PUSHBUTTON "&",254,158,42,47,14 + PUSHBUTTON "&Отмена",2,158,24,47,14 + PUSHBUTTON "&Справка",254,158,42,47,14 END IDD_SEARCH_PROGRAM DIALOGEX 0, 0, 200, 65 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW -CAPTION " c" +CAPTION "Поиск программ в меню Пуcк" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT "&:",IDC_STATIC,7,9,30,8 + LTEXT "&Фильтр:",IDC_STATIC,7,9,30,8 EDITTEXT IDC_FILTER,40,7,94,14,ES_AUTOHSCROLL CONTROL "List1",IDC_PROGRAMS_FOUND,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,7,25,186,33 - PUSHBUTTON "&",IDC_CHECK_ENTRIES,143,7,50,14 + PUSHBUTTON "&Проверить",IDC_CHECK_ENTRIES,143,7,50,14 END IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION ": " +CAPTION "Свойства: Рабочий стол" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ", , \n ", + LTEXT "Выберите, наиболее предпочтительный для вас, \nспособ выравнивания значков", IDC_STATIC,7,7,195,18 CONTROL "left/top dwn",IDC_ICON_ALIGN_0,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,7,25,46,44 @@ -198,26 +197,26 @@ BEGIN BS_BOTTOM | WS_TABSTOP,110,121,46,44 CONTROL "",IDC_ICON_ALIGN_11,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,159,121,46,44 -// CONTROL " &",ID_DESKTOP_VERSION,"Button", +// CONTROL "Показывать номер &версии",ID_DESKTOP_VERSION,"Button", // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,109,10 END IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Свойства панели задач" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " &",ID_SHOW_CLOCK,"Button",BS_AUTOCHECKBOX | + CONTROL "Отображать &часы",ID_SHOW_CLOCK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,142,100,10 - CONTROL "& ", + CONTROL "&Скрывать неиспользуемые значки", ID_HIDE_INACTIVE_ICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,157,133,10 - PUSHBUTTON "&...",ID_CONFIG_NOTIFYAREA,133,173,70,14 + PUSHBUTTON "&Уведомления...",ID_CONFIG_NOTIFYAREA,133,173,70,14 END IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Свойства меню Пуск" FONT 8, "MS Shell Dlg" BEGIN END @@ -226,63 +225,63 @@ IDD_NOTIFYAREA DIALOGEX 0, 0, 208, 174 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW -CAPTION " " +CAPTION "Конфигурация значков" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "Tree1",IDC_NOTIFY_ICONS,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,194,31 - LTEXT "& :",IDC_LABEL1,7,44,62,8 + LTEXT "&Текст подсказки:",IDC_LABEL1,7,44,62,8 EDITTEXT IDC_NOTIFY_TOOLTIP,76,42,125,14,ES_AUTOHSCROLL - LTEXT " &:",IDC_LABEL2,7,63,58,8 + LTEXT "Заголовок о&кна:",IDC_LABEL2,7,63,58,8 EDITTEXT IDC_NOTIFY_TITLE,76,60,125,14,ES_AUTOHSCROLL - LTEXT "& :",IDC_LABEL3,7,81,54,8 + LTEXT "&Путь к модулю:",IDC_LABEL3,7,81,54,8 EDITTEXT IDC_NOTIFY_MODULE,76,78,125,14,ES_AUTOHSCROLL - GROUPBOX "& ",IDC_LABEL4,7,96,169,28 - CONTROL "&",IDC_NOTIFY_SHOW,"Button",BS_AUTORADIOBUTTON | + GROUPBOX "&Режим отображения",IDC_LABEL4,7,96,169,28 + CONTROL "&показать",IDC_NOTIFY_SHOW,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,15,108,47,10 - CONTROL "&",IDC_NOTIFY_HIDE,"Button",BS_AUTORADIOBUTTON,66, + CONTROL "&Скрыть",IDC_NOTIFY_HIDE,"Button",BS_AUTORADIOBUTTON,66, 108,41,10 - CONTROL "&",IDC_NOTIFY_AUTOHIDE,"Button", + CONTROL "А&втоскрытие",IDC_NOTIFY_AUTOHIDE,"Button", BS_AUTORADIOBUTTON,112,108,60,10 ICON "",IDC_PICTURE,181,101,20,20 - LTEXT "&\n",IDC_LABEL6,7,129,40,19 + LTEXT "&Последние\nизменения",IDC_LABEL6,7,129,40,19 EDITTEXT IDC_LAST_CHANGE,59,129,105,14,ES_AUTOHSCROLL | ES_READONLY - CONTROL "& ",ID_SHOW_HIDDEN_ICONS,"Button", + CONTROL "Пока&зать скрытое",ID_SHOW_HIDDEN_ICONS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,154,78,10 DEFPUSHBUTTON "&OK",IDOK,91,153,50,14,WS_GROUP - PUSHBUTTON "&",IDCANCEL,151,153,50,14 + PUSHBUTTON "&Отмена",IDCANCEL,151,153,50,14 END IDD_MDI_SDI DIALOGEX 0, 0, 194, 157 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW -CAPTION " MDI / SDI" +CAPTION "Выберите режим MDI / SDI" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT " \n :", + LTEXT "Выберите наиболее предпочтительный для вас\nвид проводника:", IDC_STATIC,7,7,171,17 - CONTROL "&MDI ( )",IDC_MDI,"Button", + CONTROL "&MDI (многодокументный интерфейс)",IDC_MDI,"Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,7,31,137,10 - CONTROL "&SDI ( )",IDC_SDI,"Button", + CONTROL "&SDI (однодокументный интерфейс)",IDC_SDI,"Button", BS_AUTORADIOBUTTON,7,62,134,10 CONTROL 170,IDC_STATIC,"Static",SS_BITMAP,145,23,15,13 CONTROL 171,IDC_STATIC,"Static",SS_BITMAP,145,57,15,13 - CONTROL " & ", + CONTROL "Открывать подпапки в о&тдельных окнах", IDC_SEPARATE_SUBFOLDERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,90,155,10 - LTEXT " , .", + LTEXT "Эти настройки будут использованны, как значение по умолчанию для всех окон проводника в дальнейшем.", IDC_STATIC,7,107,185,26 DEFPUSHBUTTON "&OK",IDOK,29,136,50,14,WS_GROUP - PUSHBUTTON "&",IDCANCEL,106,136,50,14 + PUSHBUTTON "&Отмена",IDCANCEL,106,136,50,14 END IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "О Проводнике ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS",IDC_ROS_EXPLORER,91,13,104,11 + LTEXT "Проводник ReactOS",IDC_ROS_EXPLORER,91,13,104,11 LTEXT "V 0.9",IDC_VERSION_TXT,91,27,104,8 LTEXT "(c) 2003-2005 Martin Fuchs",IDC_STATIC,91,42,104,8 LTEXT "",IDC_WIN_VERSION,91,58,98,22 @@ -326,64 +325,64 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_TITLE " ReactOS" - IDS_START "" - IDS_LOGOFF " ..." - IDS_SHUTDOWN "..." - IDS_RESTART "..." - IDS_LAUNCH "..." - IDS_START_HELP "" - IDS_SEARCH_FILES "..." - IDS_DOCUMENTS "" - IDS_FAVORITES "" - IDS_PROGRAMS "" - IDS_SETTINGS "" - IDS_EXPLORE "" - IDS_EMPTY "()" - IDS_RECENT " " - IDS_ADMIN "" + IDS_TITLE "Проводник ReactOS" + IDS_START "Пуск" + IDS_LOGOFF "Выход из системы..." + IDS_SHUTDOWN "Выключение..." + IDS_RESTART "Перезагрузка..." + IDS_LAUNCH "Выполнить..." + IDS_START_HELP "Справка" + IDS_SEARCH_FILES "Поиск..." + IDS_DOCUMENTS "Документы" + IDS_FAVORITES "Избранное" + IDS_PROGRAMS "Программы" + IDS_SETTINGS "Настройка" + IDS_EXPLORE "Обзор" + IDS_EMPTY "(пусто)" + IDS_RECENT "Недавние документы" + IDS_ADMIN "Администрирование" END STRINGTABLE DISCARDABLE BEGIN - IDS_STARTMENU " " - IDS_MINIMIZE_ALL "C " - IDS_DESKTOP_NUM " c %d" - IDS_VOLUME "" - IDS_ITEMS_CUR " " - IDS_ITEMS_CONFIGURED "" - IDS_ITEMS_VISIBLE "" - IDS_ITEMS_HIDDEN "" - IDS_NOTIFY_SHOW "" - IDS_NOTIFY_HIDE "" - IDS_NOTIFY_AUTOHIDE "" - IDS_SHOW_HIDDEN_ICONS " " - IDS_HIDE_ICONS " " - IDS_TERMINATE " " + IDS_STARTMENU "Меню Пуск" + IDS_MINIMIZE_ALL "Cвернуть все окна" + IDS_DESKTOP_NUM "Рабочий cтол %d" + IDS_VOLUME "Объём" + IDS_ITEMS_CUR "Текущей элемент" + IDS_ITEMS_CONFIGURED "Конфигурация" + IDS_ITEMS_VISIBLE "Видимый" + IDS_ITEMS_HIDDEN "Скрытый" + IDS_NOTIFY_SHOW "Показать" + IDS_NOTIFY_HIDE "Скрыть" + IDS_NOTIFY_AUTOHIDE "Автоскрытие" + IDS_SHOW_HIDDEN_ICONS "Показать скрытые значки" + IDS_HIDE_ICONS "Скрыть значки" + IDS_TERMINATE "Завершить работу Проводника" END STRINGTABLE DISCARDABLE BEGIN - IDS_NETWORK "" - IDS_CONNECTIONS " " - IDS_DRIVES "" - IDS_SEARCH_COMPUTER " ..." - IDS_SETTINGS_MENU " " - IDS_CONTROL_PANEL " " - IDS_PRINTERS "" - IDS_BROWSE " " - IDS_SEARCH_PRG " ..." - IDS_ALL_USERS " \\" - IDS_SEARCH "" - IDS_ABOUT_EXPLORER "& " + IDS_NETWORK "Сеть" + IDS_CONNECTIONS "Сетевые подключения" + IDS_DRIVES "Диски" + IDS_SEARCH_COMPUTER "Найти компьютер..." + IDS_SETTINGS_MENU "Меню настройки" + IDS_CONTROL_PANEL "Панель управления" + IDS_PRINTERS "Принтеры" + IDS_BROWSE "Обзор файлов" + IDS_SEARCH_PRG "Найти программу..." + IDS_ALL_USERS "Все пользователи\\" + IDS_SEARCH "Поиск" + IDS_ABOUT_EXPLORER "&О Проводнике" IDS_LAUNCH_MANY_PROGRAMS - " .\n , ?" - IDS_DESKTOPBAR_SETTINGS " " - IDS_DESKTOP " " - IDS_TASKBAR " " - IDS_NAMECOLUMN "" - IDS_PATHCOLUMN "" - IDS_MENUCOLUMN " " + "Вы выбрали более одной программы.\nВы уверены, что хотите выполнить их все?" + IDS_DESKTOPBAR_SETTINGS "Настройки рабочего стола" + IDS_DESKTOP "Рабочий стол" + IDS_TASKBAR "Панель задач" + IDS_NAMECOLUMN "Имя" + IDS_PATHCOLUMN "Путь" + IDS_MENUCOLUMN "Путь в меню" END #endif // Russian resources diff --git a/base/shell/explorer/explorer-uk.rc b/base/shell/explorer/explorer-uk.rc index 1d3f8ae757e..ea6c7d4f22c 100644 --- a/base/shell/explorer/explorer-uk.rc +++ b/base/shell/explorer/explorer-uk.rc @@ -18,7 +18,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_UKR) #ifdef _WIN32 LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -#pragma code_page(1251) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -28,42 +27,42 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDM_MDIFRAME MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&...", ID_EXECUTE + MENUITEM "&Виконати...", ID_EXECUTE MENUITEM SEPARATOR - MENUITEM "&", ID_FILE_EXIT + MENUITEM "В&ихід", ID_FILE_EXIT END - POPUP "&" + POPUP "&Вигляд" BEGIN - MENUITEM "& ", ID_VIEW_TOOL_BAR - MENUITEM "& ", ID_VIEW_EXTRA_BAR - MENUITEM "&", ID_VIEW_DRIVE_BAR, CHECKED - MENUITEM "&", ID_VIEW_SIDE_BAR - MENUITEM "& ", ID_VIEW_STATUSBAR + MENUITEM "&Панель інструментів", ID_VIEW_TOOL_BAR + MENUITEM "&Додаткова панель", ID_VIEW_EXTRA_BAR + MENUITEM "Д&иски", ID_VIEW_DRIVE_BAR, CHECKED + MENUITEM "&Обране", ID_VIEW_SIDE_BAR + MENUITEM "&Рядок стану", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&\tF5", ID_REFRESH - MENUITEM " &\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + MENUITEM "&Оновити\tF5", ID_REFRESH + MENUITEM "Повний &екран\tCtrl+Shift+S", ID_VIEW_FULLSCREEN MENUITEM "SDI", ID_VIEW_SDI END - POPUP "&" + POPUP "В&ікна" BEGIN - MENUITEM "& ", ID_WINDOW_NEW - MENUITEM "&\tShift+F5", ID_WINDOW_CASCADE - MENUITEM "&", ID_WINDOW_TILE_HORZ - MENUITEM "&\tShift+F4", ID_WINDOW_TILE_VERT - MENUITEM " ", ID_WINDOW_AUTOSORT - MENUITEM " &", ID_WINDOW_ARRANGE + MENUITEM "&Нове вікно", ID_WINDOW_NEW + MENUITEM "&Каскадом\tShift+F5", ID_WINDOW_CASCADE + MENUITEM "&Горизонтально", ID_WINDOW_TILE_HORZ + MENUITEM "&Вертикально\tShift+F4", ID_WINDOW_TILE_VERT + MENUITEM "Упорядкувати автоматично", ID_WINDOW_AUTOSORT + MENUITEM "Упорядкувати &значки", ID_WINDOW_ARRANGE END - POPUP "&" + POPUP "&Інструменти" BEGIN - MENUITEM "&", ID_TOOLS_OPTIONS + MENUITEM "&Опції", ID_TOOLS_OPTIONS END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "&FAQ() ...", ID_EXPLORER_FAQ - MENUITEM " &...", ID_ABOUT_EXPLORER - MENUITEM " &...", ID_ABOUT_WINDOWS + MENUITEM "&FAQ(ЧаПи) по Провіднику...", ID_EXPLORER_FAQ + MENUITEM "Про &Провідник...", ID_ABOUT_EXPLORER + MENUITEM "Про &ОС...", ID_ABOUT_WINDOWS END END @@ -71,10 +70,10 @@ IDM_DESKTOPBAR MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&...", ID_DESKTOPBAR_SETTINGS - MENUITEM "& ...", ID_TASKMGR + MENUITEM "&Налаштування...", ID_DESKTOPBAR_SETTINGS + MENUITEM "Д&испетчер завдань...", ID_TASKMGR MENUITEM SEPARATOR - MENUITEM "& ...", ID_ABOUT_EXPLORER + MENUITEM "&Про Провідник...", ID_ABOUT_EXPLORER END END @@ -82,8 +81,8 @@ IDM_VOLUME MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "", ID_TRAY_VOLUME - MENUITEM "& ", ID_VOLUME_PROPERTIES + MENUITEM "Гучність", ID_TRAY_VOLUME + MENUITEM "&Властивості звуку", ID_VOLUME_PROPERTIES END END @@ -91,42 +90,42 @@ IDM_NOTIFYAREA MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&³ ", ID_SHOW_HIDDEN_ICONS - MENUITEM "³ &", ID_SHOW_ICON_BUTTON - MENUITEM "&& ...", ID_CONFIG_NOTIFYAREA - MENUITEM "& ...", ID_CONFIG_TIME + MENUITEM "&Відображати приховані значки", ID_SHOW_HIDDEN_ICONS + MENUITEM "Відображати значки на &кнопках", ID_SHOW_ICON_BUTTON + MENUITEM "&Н&астройка сповіщень...", ID_CONFIG_NOTIFYAREA + MENUITEM "&Настройка дати й часу...", ID_CONFIG_TIME MENUITEM SEPARATOR - MENUITEM "& ...", ID_ABOUT_EXPLORER + MENUITEM "&Про Провідник...", ID_ABOUT_EXPLORER END END IDM_SDIFRAME MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&...", ID_EXECUTE + MENUITEM "&Виконати...", ID_EXECUTE MENUITEM SEPARATOR - MENUITEM "&", ID_FILE_EXIT + MENUITEM "В&ихід", ID_FILE_EXIT END - POPUP "&" + POPUP "&Вигляд" BEGIN - MENUITEM "& ", ID_VIEW_TOOL_BAR - MENUITEM "&", ID_VIEW_SIDE_BAR, GRAYED - MENUITEM "& ", ID_VIEW_STATUSBAR + MENUITEM "&Панель інструментів", ID_VIEW_TOOL_BAR + MENUITEM "&Обране", ID_VIEW_SIDE_BAR, GRAYED + MENUITEM "&Рядок стану", ID_VIEW_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&\tF5", ID_REFRESH - MENUITEM " &\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + MENUITEM "&Оновити\tF5", ID_REFRESH + MENUITEM "Повний &екран\tCtrl+Shift+S", ID_VIEW_FULLSCREEN MENUITEM "&MDI", ID_VIEW_MDI END - POPUP "&" + POPUP "&Інструменти" BEGIN - MENUITEM "&", ID_TOOLS_OPTIONS + MENUITEM "&Опції", ID_TOOLS_OPTIONS END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "&FAQ() ...", ID_EXPLORER_FAQ - MENUITEM " &...", ID_ABOUT_EXPLORER - MENUITEM " &...", ID_ABOUT_WINDOWS + MENUITEM "&FAQ(ЧаПи) по Провіднику...", ID_EXPLORER_FAQ + MENUITEM "Про &Провідник...", ID_ABOUT_EXPLORER + MENUITEM "Про &ОС...", ID_ABOUT_WINDOWS END END @@ -138,86 +137,86 @@ END IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Виконати" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",101,"Static",SS_SIMPLE | SS_NOPREFIX,3,6,150,10 - CONTROL "&:",-1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,3, + CONTROL "&Команда:",-1,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,3, 18,60,10 EDITTEXT 201,3,29,134,12,ES_AUTOHSCROLL - CONTROL "& ",214,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3, + CONTROL "&Як Символ",214,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3, 45,71,12 DEFPUSHBUTTON "&OK",1,158,6,47,14 - PUSHBUTTON "&",2,158,23,47,14 - PUSHBUTTON "&",254,158,43,47,14 + PUSHBUTTON "&Скасувати",2,158,23,47,14 + PUSHBUTTON "&Довідка",254,158,43,47,14 END IDD_SEARCH_PROGRAM DIALOGEX 0, 0, 200, 65 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW -CAPTION " " +CAPTION "Пошук програми в меню Пуск" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT "&Գ:",IDC_STATIC,7,9,18,8 + LTEXT "&Фільтр:",IDC_STATIC,7,9,18,8 EDITTEXT IDC_FILTER,34,7,100,14,ES_AUTOHSCROLL CONTROL "List1",IDC_PROGRAMS_FOUND,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,7,25,186,33 - PUSHBUTTON "&",IDC_CHECK_ENTRIES,143,7,50,14 + PUSHBUTTON "&Перевірити",IDC_CHECK_ENTRIES,143,7,50,14 END IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Властивості робочого столу" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", + LTEXT "Оберіть найбільш зручний для вас алгоритм вирівнювання значків:", IDC_STATIC,7,7,166,16 - CONTROL "/ ",IDC_ICON_ALIGN_0,"Button",BS_OWNERDRAW | + CONTROL "лів/верх низ",IDC_ICON_ALIGN_0,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,7,25,46,44 - CONTROL "/ ",IDC_ICON_ALIGN_1,"Button",BS_OWNERDRAW | + CONTROL "лів/верх прв",IDC_ICON_ALIGN_1,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,57,25,46,44 - CONTROL "/ ",IDC_ICON_ALIGN_2,"Button",BS_OWNERDRAW | + CONTROL "прв/верх лів",IDC_ICON_ALIGN_2,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,110,25,46,44 - CONTROL "/ ",IDC_ICON_ALIGN_3,"Button",BS_OWNERDRAW | + CONTROL "прв/верх низ",IDC_ICON_ALIGN_3,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,159,25,46,44 - CONTROL "/ ",IDC_ICON_ALIGN_4,"Button",BS_OWNERDRAW | + CONTROL "лів/низ верх",IDC_ICON_ALIGN_4,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,7,73,46,44 - CONTROL "/ ",IDC_ICON_ALIGN_5,"Button",BS_OWNERDRAW | + CONTROL "лів/низ прав",IDC_ICON_ALIGN_5,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,57,73,46,44 - CONTROL "/ ",IDC_ICON_ALIGN_6,"Button",BS_OWNERDRAW | + CONTROL "прав/низ лів",IDC_ICON_ALIGN_6,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,110,73,46,44 - CONTROL "/ ",IDC_ICON_ALIGN_7,"Button",BS_OWNERDRAW | + CONTROL "прв/низ верх",IDC_ICON_ALIGN_7,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,159,73,46,44 - CONTROL " ",IDC_ICON_ALIGN_8,"Button",BS_OWNERDRAW | + CONTROL "по краях",IDC_ICON_ALIGN_8,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,7,121,46,44 - CONTROL " ",IDC_ICON_ALIGN_9,"Button",BS_OWNERDRAW | + CONTROL "верхні кути",IDC_ICON_ALIGN_9,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,57,121,46,44 - CONTROL "",IDC_ICON_ALIGN_10,"Button",BS_OWNERDRAW | + CONTROL "навколо",IDC_ICON_ALIGN_10,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,110,121,46,44 CONTROL "",IDC_ICON_ALIGN_11,"Button",BS_OWNERDRAW | BS_BOTTOM | WS_TABSTOP,159,121,46,44 -// CONTROL "³ &",ID_DESKTOP_VERSION,"Button", +// CONTROL "Відображати Номер &Версії",ID_DESKTOP_VERSION,"Button", // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Властивості панелі завдань" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "³& ",ID_SHOW_CLOCK,"Button",BS_AUTOCHECKBOX | + CONTROL "Відобра&жати годинник",ID_SHOW_CLOCK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,152,102,10 - CONTROL "& ", + CONTROL "При&ховувати невикористовувані значки", ID_HIDE_INACTIVE_ICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,174,151,10 - PUSHBUTTON "&...",ID_CONFIG_NOTIFYAREA,153,173,52,14 + PUSHBUTTON "&Сповіщення...",ID_CONFIG_NOTIFYAREA,153,173,52,14 END IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Властивості меню Пуск" FONT 8, "MS Shell Dlg" BEGIN END @@ -226,63 +225,63 @@ IDD_NOTIFYAREA DIALOGEX 0, 0, 208, 174 STYLE DS_SHELLFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW -CAPTION " " +CAPTION "Конфігурація значків сповіщень" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "Tree1",IDC_NOTIFY_ICONS,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,194,31 - LTEXT "& ϳ:",IDC_LABEL1,7,44,60,8 + LTEXT "&Текст Підказки:",IDC_LABEL1,7,44,60,8 EDITTEXT IDC_NOTIFY_TOOLTIP,66,42,135,14,ES_AUTOHSCROLL - LTEXT " &:",IDC_LABEL2,7,63,64,8 + LTEXT "Заголовок В&ікна:",IDC_LABEL2,7,63,64,8 EDITTEXT IDC_NOTIFY_TITLE,66,60,135,14,ES_AUTOHSCROLL - LTEXT "& :",IDC_LABEL3,7,81,63,8 + LTEXT "&Шлях до Модуля:",IDC_LABEL3,7,81,63,8 EDITTEXT IDC_NOTIFY_MODULE,66,78,135,14,ES_AUTOHSCROLL - GROUPBOX "& ³",IDC_LABEL4,7,96,177,28 - CONTROL "&",IDC_NOTIFY_SHOW,"Button",BS_AUTORADIOBUTTON | + GROUPBOX "&Режим Відображення",IDC_LABEL4,7,96,177,28 + CONTROL "&показати",IDC_NOTIFY_SHOW,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,15,108,44,10 - CONTROL "&",IDC_NOTIFY_HIDE,"Button",BS_AUTORADIOBUTTON,66, + CONTROL "&сховати",IDC_NOTIFY_HIDE,"Button",BS_AUTORADIOBUTTON,66, 108,40,10 - CONTROL "&",IDC_NOTIFY_AUTOHIDE,"Button", + CONTROL "а&втоприховання",IDC_NOTIFY_AUTOHIDE,"Button", BS_AUTORADIOBUTTON,112,108,69,10 ICON "",IDC_PICTURE,173,101,21,20 - LTEXT "& :",IDC_LABEL6,7,132,65,8 + LTEXT "&Остання зміна:",IDC_LABEL6,7,132,65,8 EDITTEXT IDC_LAST_CHANGE,59,129,105,14,ES_AUTOHSCROLL | ES_READONLY - CONTROL "& ",ID_SHOW_HIDDEN_ICONS,"Button", + CONTROL "пока&зати приховане",ID_SHOW_HIDDEN_ICONS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,154,86,10 DEFPUSHBUTTON "&OK",IDOK,91,153,50,14,WS_GROUP - PUSHBUTTON "&",IDCANCEL,151,153,50,14 + PUSHBUTTON "&Скасувати",IDCANCEL,151,153,50,14 END IDD_MDI_SDI DIALOGEX 0, 0, 194, 157 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW -CAPTION " " +CAPTION "Оберіть режим вікон Провідника" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT " :", + LTEXT "Оберіть найбільш зручний для вас інтерфейс провідника:", IDC_STATIC,7,7,160,8 - CONTROL "&MDI ()",IDC_MDI,"Button", + CONTROL "&MDI (багатодокументний)",IDC_MDI,"Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,7,31,124,10 - CONTROL "&SDI ()",IDC_SDI,"Button", + CONTROL "&SDI (однодокументний)",IDC_SDI,"Button", BS_AUTORADIOBUTTON,7,62,118,10 CONTROL 170,IDC_STATIC,"Static",SS_BITMAP,145,23,15,13 CONTROL 171,IDC_STATIC,"Static",SS_BITMAP,145,57,15,13 - CONTROL "³ & ", + CONTROL "Відкривати підтеки в о&кремих вікнах", IDC_SEPARATE_SUBFOLDERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,90,135,10 - LTEXT "ֳ .", + LTEXT "Ці параметри будуть використані як значення за замовчуванням для всіх вікон провідника в майбутньому.", IDC_STATIC,7,109,174,24 DEFPUSHBUTTON "&OK",IDOK,29,136,50,14,WS_GROUP - PUSHBUTTON "&",IDCANCEL,106,136,50,14 + PUSHBUTTON "&Скасувати",IDCANCEL,106,136,50,14 END IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Про Провідник ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS",IDC_ROS_EXPLORER,91,13,104,11 + LTEXT "Провідник ReactOS",IDC_ROS_EXPLORER,91,13,104,11 LTEXT "V 0.9",IDC_VERSION_TXT,91,27,104,8 LTEXT "(c) 2003-2005 Martin Fuchs",IDC_STATIC,91,42,104,8 LTEXT "",IDC_WIN_VERSION,91,58,98,22 @@ -326,64 +325,64 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_TITLE " ReactOS" - IDS_START "" - IDS_LOGOFF " ..." - IDS_SHUTDOWN "..." - IDS_RESTART "..." - IDS_LAUNCH "..." - IDS_START_HELP "" - IDS_SEARCH_FILES "..." - IDS_DOCUMENTS "" - IDS_FAVORITES "" - IDS_PROGRAMS "" - IDS_SETTINGS "" - IDS_EXPLORE "" - IDS_EMPTY "()" - IDS_RECENT " " - IDS_ADMIN "" + IDS_TITLE "Провідник ReactOS" + IDS_START "Пуск" + IDS_LOGOFF "Завершення сеансу..." + IDS_SHUTDOWN "Вимкнення..." + IDS_RESTART "Перезавантаження..." + IDS_LAUNCH "Виконати..." + IDS_START_HELP "Довідка" + IDS_SEARCH_FILES "Пошук..." + IDS_DOCUMENTS "Документи" + IDS_FAVORITES "Обране" + IDS_PROGRAMS "Програми" + IDS_SETTINGS "Налаштування" + IDS_EXPLORE "Огляд" + IDS_EMPTY "(Порожньо)" + IDS_RECENT "Недавні документи" + IDS_ADMIN "Адміністрування" END STRINGTABLE DISCARDABLE BEGIN - IDS_STARTMENU " " - IDS_MINIMIZE_ALL " " - IDS_DESKTOP_NUM " %d" - IDS_VOLUME "" - IDS_ITEMS_CUR " " - IDS_ITEMS_CONFIGURED "" - IDS_ITEMS_VISIBLE "" - IDS_ITEMS_HIDDEN "" - IDS_NOTIFY_SHOW "" - IDS_NOTIFY_HIDE "" - IDS_NOTIFY_AUTOHIDE "" - IDS_SHOW_HIDDEN_ICONS " " - IDS_HIDE_ICONS " " - IDS_TERMINATE " " + IDS_STARTMENU "Меню Пуск" + IDS_MINIMIZE_ALL "згорнути всі вікна" + IDS_DESKTOP_NUM "Робочий Стіл %d" + IDS_VOLUME "Гучність" + IDS_ITEMS_CUR "поточні елементи" + IDS_ITEMS_CONFIGURED "конфігурація" + IDS_ITEMS_VISIBLE "видимий" + IDS_ITEMS_HIDDEN "прихований" + IDS_NOTIFY_SHOW "показати" + IDS_NOTIFY_HIDE "сховати" + IDS_NOTIFY_AUTOHIDE "автоприховання" + IDS_SHOW_HIDDEN_ICONS "Показати приховані значки" + IDS_HIDE_ICONS "Сховати значки" + IDS_TERMINATE "Завершити роботу Провідника" END STRINGTABLE DISCARDABLE BEGIN - IDS_NETWORK "" - IDS_CONNECTIONS " " - IDS_DRIVES "" - IDS_SEARCH_COMPUTER " ..." - IDS_SETTINGS_MENU " " - IDS_CONTROL_PANEL " " - IDS_PRINTERS "" - IDS_BROWSE " " - IDS_SEARCH_PRG " ..." - IDS_ALL_USERS " \\" - IDS_SEARCH "" - IDS_ABOUT_EXPLORER "& ..." + IDS_NETWORK "Мережа" + IDS_CONNECTIONS "Мережні підключення" + IDS_DRIVES "Диски" + IDS_SEARCH_COMPUTER "Пошук комп’ютера..." + IDS_SETTINGS_MENU "Меню Налаштувань" + IDS_CONTROL_PANEL "Панель керування" + IDS_PRINTERS "Принтери" + IDS_BROWSE "Огляд файлів" + IDS_SEARCH_PRG "Пошук програми..." + IDS_ALL_USERS "Всі користувачі\\" + IDS_SEARCH "Пошук" + IDS_ABOUT_EXPLORER "&Про Провідник..." IDS_LAUNCH_MANY_PROGRAMS - " .\n , ?" - IDS_DESKTOPBAR_SETTINGS " " - IDS_DESKTOP " " - IDS_TASKBAR " " - IDS_NAMECOLUMN "'" - IDS_PATHCOLUMN "" - IDS_MENUCOLUMN " " + "Ви обрали більше однієї програми.\nВи впевнені, що хочете запустити їх всі?" + IDS_DESKTOPBAR_SETTINGS "Налаштування робочого стола" + IDS_DESKTOP "Робочий Стіл" + IDS_TASKBAR "Панель завдань" + IDS_NAMECOLUMN "Ім'я" + IDS_PATHCOLUMN "Шлях" + IDS_MENUCOLUMN "Шлях в меню" END #endif // Ukrainian resources diff --git a/base/shell/explorer/explorer.cpp b/base/shell/explorer/explorer.cpp index 4e6aee7fd60..c9b2bb561df 100644 --- a/base/shell/explorer/explorer.cpp +++ b/base/shell/explorer/explorer.cpp @@ -932,10 +932,10 @@ static void InitInstance(HINSTANCE hInstance) g_Globals._hframeClass = IconWindowClass(CLASSNAME_FRAME,IDI_EXPLORER); // register child window class - WindowClass(CLASSNAME_CHILDWND, CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW).Register(); + WindowClass(CLASSNAME_CHILDWND, CS_CLASSDC|CS_DBLCLKS).Register(); // register tree window class - WindowClass(CLASSNAME_WINEFILETREE, CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW).Register(); + WindowClass(CLASSNAME_WINEFILETREE, CS_CLASSDC|CS_DBLCLKS).Register(); #endif g_Globals._cfStrFName = RegisterClipboardFormat(CFSTR_FILENAME); diff --git a/base/shell/explorer/explorer_intres.rc b/base/shell/explorer/explorer_intres.rc index a8d5f41439c..727dae81b7b 100644 --- a/base/shell/explorer/explorer_intres.rc +++ b/base/shell/explorer/explorer_intres.rc @@ -122,13 +122,9 @@ BEGIN "#include ""explorer-ko.rc""\r\n" "#include ""explorer-nl.rc""\r\n" "#include ""explorer-no.rc""\r\n" - "#include ""explorer-pl.rc""\r\n" "#include ""explorer-pt.rc""\r\n" - "#include ""explorer-ro.rc""\r\n" - "#include ""explorer-ru.rc""\r\n" "#include ""explorer-sk.rc""\r\n" "#include ""explorer-sv.rc""\r\n" - "#include ""explorer-uk.rc""\r\n" "\r\n" "#ifdef __WINDRES__\r\n" "#include ""explorer-cn.rc""\r\n" @@ -136,6 +132,12 @@ BEGIN "//#include ""explorer-cn-msvc.rc""\r\n" "#include ""explorer-bn.rc""\r\n" "#endif\r\n" + "\r\n" + "#pragma code_page(65001)" + "#include ""explorer-pl.rc""\r\n" + "#include ""explorer-ro.rc""\r\n" + "#include ""explorer-ru.rc""\r\n" + "#include ""explorer-uk.rc""\r\n" "\0" END @@ -230,13 +232,9 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE "explorer.exe.ma #include "explorer-ko.rc" #include "explorer-nl.rc" #include "explorer-no.rc" -#include "explorer-pl.rc" #include "explorer-pt.rc" -#include "explorer-ro.rc" -#include "explorer-ru.rc" #include "explorer-sk.rc" #include "explorer-sv.rc" -#include "explorer-uk.rc" #ifdef __WINDRES__ #include "explorer-cn.rc" @@ -245,6 +243,13 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE "explorer.exe.ma #include "explorer-bn.rc" #endif +// UTF-8 +#pragma code_page(65001) +#include "explorer-pl.rc" +#include "explorer-ro.rc" +#include "explorer-ru.rc" +#include "explorer-uk.rc" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/base/shell/explorer/services/startup.c b/base/shell/explorer/services/startup.c index 1208a32f0d6..ba435632fd9 100644 --- a/base/shell/explorer/services/startup.c +++ b/base/shell/explorer/services/startup.c @@ -369,6 +369,9 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, continue; } + /* safe mode - force to run if prefixed with asterisk */ + if (GetSystemMetrics(SM_CLEANBOOT) && (szValue[0] != L'*')) continue; + if (bDelete && (res=RegDeleteValueW(hkRun, szValue))!=ERROR_SUCCESS) { printf("Couldn't delete value - %ld, %ld. Running command anyways.\n", i, res); @@ -467,6 +470,9 @@ int startup(int argc, const char *argv[]) } else ops=DEFAULT; + /* do not run certain items in Safe Mode */ + if(GetSystemMetrics(SM_CLEANBOOT)) ops.startup = FALSE; + /* Perform the ops by order, stopping if one fails, skipping if necessary */ /* Shachar: Sorry for the perl syntax */ res=(ops.ntonly || !ops.preboot || wininit()) && diff --git a/base/shell/explorer/taskbar/desktopbar.cpp b/base/shell/explorer/taskbar/desktopbar.cpp index c52a1671a06..51c846cfa83 100644 --- a/base/shell/explorer/taskbar/desktopbar.cpp +++ b/base/shell/explorer/taskbar/desktopbar.cpp @@ -345,7 +345,7 @@ LRESULT DesktopBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) case PM_GET_NOTIFYAREA: return (LRESULT)(HWND)_hwndNotify; - case WM_SYSCOLORCHANGE:OutputDebugStringA("WM_SYSCOLORCHANGE desktopbar\n"); + case WM_SYSCOLORCHANGE: /* Forward WM_SYSCOLORCHANGE to common controls */ #ifndef _NO_REBAR SendMessage(_hwndrebar, WM_SYSCOLORCHANGE, 0, 0); diff --git a/base/shell/explorer/taskbar/startmenu.cpp b/base/shell/explorer/taskbar/startmenu.cpp index 5dc3cf36eda..371f2cfb099 100644 --- a/base/shell/explorer/taskbar/startmenu.cpp +++ b/base/shell/explorer/taskbar/startmenu.cpp @@ -2111,14 +2111,37 @@ void StartMenuHandler::ShowSearchComputer() MessageBox(0, TEXT("SHFindComputer() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); } -void StartMenuHandler::ShowLaunchDialog(HWND hwndOwner) +struct RunDialogThread : public Thread +{ + int Run(); +}; + +int RunDialogThread::Run() { static DynamicFct RunFileDlg(TEXT("SHELL32"), 61); + // RunFileDlg needs owner window to properly position dialog + // that window will be disabled so we can't use DesktopBar + RECT rect = {0}; +#ifndef TASKBAR_AT_TOP + rect.top = GetSystemMetrics(SM_CYSCREEN) - DESKTOPBARBAR_HEIGHT; +#endif + rect.right = GetSystemMetrics(SM_CXSCREEN); + rect.bottom = rect.top + DESKTOPBARBAR_HEIGHT; + Static dlgOwner(0, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, 0, 0); + // Show "Run..." dialog if (RunFileDlg) { - (*RunFileDlg)(hwndOwner, 0, NULL, NULL, NULL, RFF_CALCDIRECTORY); + (*RunFileDlg)(dlgOwner, 0, NULL, NULL, NULL, RFF_CALCDIRECTORY); } + DestroyWindow(dlgOwner); + return 0; +} + +void StartMenuHandler::ShowLaunchDialog(HWND hwndOwner) +{ + RunDialogThread * rdt = new RunDialogThread(); + rdt->Start(); } void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner) diff --git a/base/system/CMakeLists.txt b/base/system/CMakeLists.txt index 80232bcae26..bc30ddfd406 100644 --- a/base/system/CMakeLists.txt +++ b/base/system/CMakeLists.txt @@ -4,7 +4,9 @@ add_subdirectory(bootok) add_subdirectory(expand) add_subdirectory(format) add_subdirectory(lsass) -add_subdirectory(msiexec) +if(NOT MSVC) + add_subdirectory(msiexec) # FIXME: msvc build. +endif() add_subdirectory(regsvr32) add_subdirectory(rundll32) add_subdirectory(runonce) diff --git a/base/system/autochk/CMakeLists.txt b/base/system/autochk/CMakeLists.txt index fe3a4cdc718..b132b6c3935 100644 --- a/base/system/autochk/CMakeLists.txt +++ b/base/system/autochk/CMakeLists.txt @@ -3,6 +3,6 @@ add_executable(autochk WIN32 autochk.c autochk.rc) set_module_type(autochk nativecui) -target_link_libraries(autochk mingw_common nt) -add_importlibs(autochk kernel32 ntdll) +target_link_libraries(autochk nt) +add_importlibs(autochk ntdll) add_cd_file(TARGET autochk DESTINATION reactos/system32 FOR all) diff --git a/base/system/autochk/autochk.c b/base/system/autochk/autochk.c index c4b62e6294a..0717556405e 100644 --- a/base/system/autochk/autochk.c +++ b/base/system/autochk/autochk.c @@ -324,7 +324,7 @@ CheckVolume( Status = ChkdskFunc(&DrivePathU, TRUE, // FixErrors TRUE, // Verbose - FALSE, // CheckOnlyIfDirty + TRUE, // CheckOnlyIfDirty FALSE,// ScanDrive ChkdskCallback); diff --git a/base/system/bootok/CMakeLists.txt b/base/system/bootok/CMakeLists.txt index e59cd62ce20..bcd13f747ac 100644 --- a/base/system/bootok/CMakeLists.txt +++ b/base/system/bootok/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - set_unicode() add_executable(bootok bootok.c bootok.rc) diff --git a/base/system/expand/CMakeLists.txt b/base/system/expand/CMakeLists.txt index d82276adcfc..5a680bfa97c 100644 --- a/base/system/expand/CMakeLists.txt +++ b/base/system/expand/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) add_executable(expand expand.c expand.rc) diff --git a/base/system/format/CMakeLists.txt b/base/system/format/CMakeLists.txt index ba1aa8da7c5..5973db5f814 100644 --- a/base/system/format/CMakeLists.txt +++ b/base/system/format/CMakeLists.txt @@ -1,7 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - -include_directories(.) set_rc_compiler() add_executable(format format.c format.rc) diff --git a/base/system/format/lang/pl-PL.rc b/base/system/format/lang/pl-PL.rc index de78700711e..2cc52fbb356 100644 --- a/base/system/format/lang/pl-PL.rc +++ b/base/system/format/lang/pl-PL.rc @@ -1,57 +1,57 @@ -#include "resource.h" /* -* translated by xrogers (http://rogers.cyberdusk.pl/) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, "Sposb uycia: %s wolumin: [-FS:syst-plik] [-V:etykieta] [-Q] [-A:rozmiar] [-C]\n\n\ - [wolumin:] Okrela liter dysku przeznaczonego do formatowania.\n\ - -FS:syst-plik Okrela rodzaj systemu plikw (%s).\n\ - -V:etykieta Okrela etykiet woluminu.\n\ +STRING_HELP, "Sposób użycia: %s wolumin: [-FS:syst-plik] [-V:etykieta] [-Q] [-A:rozmiar] [-C]\n\n\ + [wolumin:] Określa literę dysku przeznaczonego do formatowania.\n\ + -FS:syst-plik Określa rodzaj systemu plików (%s).\n\ + -V:etykieta Określa etykietę woluminu.\n\ -Q Przeprowadza szybkie formatowanie.\n\ - -A:rozmiar Zastpuje domylny rozmiar jednostki alokacji. Dla zastosowa\n\ - oglnych zaleca si uywanie ustawie domylnych.\n\ - System NTFS obsuguje rozmiary: 512, 1024, 2048, 4096, 8192,\n\ + -A:rozmiar Zastępuje domyślny rozmiar jednostki alokacji. Dla zastosowań\n\ + ogólnych zaleca się używanie ustawień domyślnych.\n\ + System NTFS obsługuje rozmiary: 512, 1024, 2048, 4096, 8192,\n\ 16 KB, 32 KB, 64 KB.\n\ - System FAT obsuguje rozmiary: 512, 1024, 2048, 4096, 8192,\n\ + System FAT obsługuje rozmiary: 512, 1024, 2048, 4096, 8192,\n\ 16 KB, 32 KB, 64 KB, 128 KB, 256 KB.\n\ - Kompresja NTFS nie jest obsugiwana dla jednostek alokacji\n\ - wikszych ni 4096 bajtw.\n\ - -C Pliki utworzone na nowym woluminie bd domylnie poddane\n\ + Kompresja NTFS nie jest obsługiwana dla jednostek alokacji\n\ + większych niż 4096 bajtów.\n\ + -C Pliki utworzone na nowym woluminie będą domyślnie poddane\n\ kompresji.\n\n" -STRING_COMPLETE "%lu procent ukoczone.\r" +STRING_COMPLETE "%lu procent ukończone.\r" -STRING_FORMAT_FAIL "FormatEx nie mg zakoczy dziaania pomylnie.\n\n" +STRING_FORMAT_FAIL "FormatEx nie mógł zakończyć działania pomyślnie.\n\n" STRING_NO_SUPPORT "Operacja niewspierana" -STRING_FMIFS_FAIL "Nie mona zlokalizowa punktw wejciowych FMIFS.\n\n" +STRING_FMIFS_FAIL "Nie można zlokalizować punktów wejściowych FMIFS.\n\n" -STRING_UNKNOW_ARG "Nieprawidowy parametr: %s\n" +STRING_UNKNOW_ARG "Nieprawidłowy parametr: %s\n" -STRING_DRIVE_PARM "Brakujcy wymagany parametr dysku.\n\n" +STRING_DRIVE_PARM "Brakujący wymagany parametr dysku.\n\n" -STRING_ERROR_DRIVE_TYPE "Nie mona okreli rodzaju dysku" +STRING_ERROR_DRIVE_TYPE "Nie można określić rodzaju dysku" -STRING_INSERT_DISK "W nowy dysk do napdu %C:\ni nacinij Enter, gdy bdzie gotowe..." +STRING_INSERT_DISK "Włóż nowy dysk do napędu %C:\ni naciśnij Enter..." -STRING_NO_VOLUME "Nie mona odczyta woluminu" +STRING_NO_VOLUME "Nie można odczytać woluminu" -STRING_NO_VOLUME_SIZE "Nie mona odczyta rozmiaru woluminu" +STRING_NO_VOLUME_SIZE "Nie można odczytać rozmiaru woluminu" -STRING_FILESYSTEM "Rodzaj systemu plikw to %s.\n" +STRING_FILESYSTEM "Rodzaj systemu plików to %s.\n" -STRING_LABEL_NAME_EDIT "Podaj aktualn etykiet woluminu dla dysku %C: " +STRING_LABEL_NAME_EDIT "Podaj aktualną etykietę woluminu dla dysku %C: " -STRING_ERROR_LABEL "Nieprawidowa etykieta woluminu zostaa wpisana dla tego dysku.\n" +STRING_ERROR_LABEL "Nieprawidłowa etykieta woluminu została wpisana dla tego dysku.\n" -STRING_YN_FORMAT "\\OSTRZEENIE: WSZYSTKIE DANE NA NIEWYJMOWALNYM DYSKU\n\ -W STACJI %C: ZOSTAN UTRACONE!\nCzy kontynuowa formatowanie (T/N)? " +STRING_YN_FORMAT "\\OSTRZEŻENIE: WSZYSTKIE DANE NA NIEWYJMOWALNYM DYSKU\n\ +W STACJI %C: ZOSTANĄ UTRACONE!\nCzy kontynuować formatowanie (T/N)? " STRING_YES_NO_FAQ "TN" @@ -59,17 +59,17 @@ STRING_VERIFYING "Sprawdzanie" STRING_FAST_FMT "Szybkie formatowanie" -STRING_CREATE_FSYS "Tworzenie struktury systemu plikw.\n" +STRING_CREATE_FSYS "Tworzenie struktury systemu plików.\n" -STRING_FMT_COMPLETE "Formatowanie ukoczone.\n" +STRING_FMT_COMPLETE "Formatowanie ukończone.\n" -STRING_VOL_COMPRESS "Wolumin nie obsuguje kompresji.\n" +STRING_VOL_COMPRESS "Wolumin nie obsługuje kompresji.\n" -STRING_ENTER_LABEL "Podaj etykiet woluminu (11 znakw, ENTER = bez etykiety) " +STRING_ENTER_LABEL "Podaj etykietę woluminu (11 znaków, ENTER = bez etykiety) " -STRING_NO_LABEL "Nie mona zmieni etykiety woluminu" +STRING_NO_LABEL "Nie można zmienić etykiety woluminu" -STRING_FREE_SPACE "\n%I64d bajtw cakowitego miejsca na dysku.\n%I64d bajtw dostpnych na dysku.\n" +STRING_FREE_SPACE "\n%I64d bajtów całkowitego miejsca na dysku.\n%I64d bajtów dostępnych na dysku.\n" STRING_SERIAL_NUMBER "\nNumer seryjny woluminu to %04X-%04X\n" END diff --git a/base/system/format/lang/ru-RU.rc b/base/system/format/lang/ru-RU.rc index 2407018a9f8..d1ad0c77518 100644 --- a/base/system/format/lang/ru-RU.rc +++ b/base/system/format/lang/ru-RU.rc @@ -5,66 +5,66 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, ": %s : [-FS:] [-V:] [-Q] [-A:] [-C]\n\n\ - [:] ( ),\n\ - .\n\ - -FS: (%s).\n\ - -V: .\n\ - -Q .\n\ - -A: . \n\ - \n\ - NTFS 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.\n\ - FAT 8192, 16K, 32K, 64K, 128K, 256K.\n\ - NTFS- 4096.\n\ - -C ,\n\ - .\n\n" +STRING_HELP, "Использование: %s том: [-FS:система] [-V:метка] [-Q] [-A:размер] [-C]\n\n\ + [том:] Указывает букву диска (с последующим двоеточием),\n\ + точку подключения или имя тома.\n\ + -FS:система Указывает на тип файловой системы (%s).\n\ + -V:метка Метка тома.\n\ + -Q Быстрое форматирование.\n\ + -A:размер Заменяет размер кластера по умолчанию. В общих\n\ + случаях рекомендуется использовать размеры кластера по умолчанию\n\ + NTFS поддерживает 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.\n\ + FAT поддерживает 8192, 16K, 32K, 64K, 128K, 256K.\n\ + Для сжатых NTFS-томов не поддерживается размер более 4096.\n\ + -C Устанавливает режим сжатия по умолчанию для всех файлов,\n\ + создаваемых на новом томе.\n\n" -STRING_COMPLETE "%lu .\r" +STRING_COMPLETE "%lu процентов выполнено.\r" -STRING_FORMAT_FAIL "FormatEx .\n\n" +STRING_FORMAT_FAIL "FormatEx завершился неудачей.\n\n" -STRING_NO_SUPPORT " " +STRING_NO_SUPPORT "Операция не поддерживается" -STRING_FMIFS_FAIL " FMIFS.\n\n" +STRING_FMIFS_FAIL "Невозможно определить расположение точек входа FMIFS.\n\n" -STRING_UNKNOW_ARG " : %s\n" +STRING_UNKNOW_ARG "Неправильные аргументы: %s\n" -STRING_DRIVE_PARM " .\n\n" +STRING_DRIVE_PARM "Требуемый параметр операции отсутствует.\n\n" -STRING_ERROR_DRIVE_TYPE " " +STRING_ERROR_DRIVE_TYPE "Не удалось получить тип тома" -STRING_INSERT_DISK " %C:\n Enter ..." +STRING_INSERT_DISK "Вставьте чистый диск в устройство чтения %C:\nи нажмите Enter для продолжения..." -STRING_NO_VOLUME " " +STRING_NO_VOLUME "Не удалось выполнить запрос к тому" -STRING_NO_VOLUME_SIZE " " +STRING_NO_VOLUME_SIZE "Не удалось определить размер тома" -STRING_FILESYSTEM " %s.\n" +STRING_FILESYSTEM "Тип файловой системы %s.\n" -STRING_LABEL_NAME_EDIT " %C: " +STRING_LABEL_NAME_EDIT "Введите текущую метку тома %C: " -STRING_ERROR_LABEL " .\n" +STRING_ERROR_LABEL "Неправильная метка тома для этого устройства.\n" -STRING_YN_FORMAT "\n, NON_REMOVABLE\n\ - %C: !\n (Y/N)? " +STRING_YN_FORMAT "\nВНИМАНИЕ, ВСЕ ДАННЫЕ НА ДИСКЕ NON_REMOVABLE\n\ + %C: БУДУТ УНИЧТОЖЕНЫ!\nНачать форматирование (Y/N)? " STRING_YES_NO_FAQ "YN" -STRING_VERIFYING "" +STRING_VERIFYING "Проверка" -STRING_FAST_FMT " " +STRING_FAST_FMT "Быстрое форматирование" -STRING_CREATE_FSYS " .\n" +STRING_CREATE_FSYS "Создание структуры файловой системы.\n" -STRING_FMT_COMPLETE " .\n" +STRING_FMT_COMPLETE "Форматирование завершено.\n" -STRING_VOL_COMPRESS " .\n" +STRING_VOL_COMPRESS "Том не поддерживает сжатие.\n" -STRING_ENTER_LABEL " ( 11 )? " +STRING_ENTER_LABEL "Метка тома (не более 11 символов)? " -STRING_NO_LABEL " " +STRING_NO_LABEL "Без метки тома" -STRING_FREE_SPACE "\n%I64d .\n%I64d .\n" +STRING_FREE_SPACE "\n%I64d байт свободно на диске.\n%I64d байт доступно на диске.\n" -STRING_SERIAL_NUMBER "\n %04X-%04X\n" +STRING_SERIAL_NUMBER "\nСерийный номер тома %04X-%04X\n" END diff --git a/base/system/format/lang/uk-UA.rc b/base/system/format/lang/uk-UA.rc index d54b4a00f10..8822af5271b 100644 --- a/base/system/format/lang/uk-UA.rc +++ b/base/system/format/lang/uk-UA.rc @@ -11,65 +11,65 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_HELP, ": %s : [-FS:-] [-V:] [-Q] [-A:] [-C]\n\n\ - [:] , ( ').\n\ - -FS:- (%s).\n\ - -V: .\n\ - -Q .\n\ - -A: . \n\ - .\n\ - NTFS 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.\n\ - FAT 8192, 16K, 32K, 64K, 128K, 256K.\n\ - NTFS 4096.\n\ - -C ,\n\ - .\n\n" +STRING_HELP, "Використання: %s пристрій: [-FS:файл-система] [-V:мітка] [-Q] [-A:розмір] [-C]\n\n\ + [пристрій:] Вказує диск, який слід відформатувати (двокрапка обов'язкова).\n\ + -FS:файл-система Визначає тип файлової системи (%s).\n\ + -V:мітка Визначає коротку назву диску.\n\ + -Q Швидке форматування.\n\ + -A:розмір Перевизначає розмір кластера за замовчуванням. Рекомендується \n\ + використовувати значення за замовчуванням.\n\ + NTFS підтримує 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.\n\ + FAT підтримує 8192, 16K, 32K, 64K, 128K, 256K.\n\ + NTFS стискання не підтримується для кластерів більших за 4096.\n\ + -C Встановлює режим стискання для всіх нових файлів,\n\ + які створюються на диску.\n\n" -STRING_COMPLETE "%lu .\r" +STRING_COMPLETE "%lu відсотків виконано.\r" -STRING_FORMAT_FAIL "FormatEx .\n\n" +STRING_FORMAT_FAIL "FormatEx не зміг успішно виконати завдання.\n\n" -STRING_NO_SUPPORT " " +STRING_NO_SUPPORT "Функція не підтримується" -STRING_FMIFS_FAIL " FMIFS .\n\n" +STRING_FMIFS_FAIL "Не зміг знацти FMIFS точки входу.\n\n" -STRING_UNKNOW_ARG " : %s\n" +STRING_UNKNOW_ARG "Невідомий аргумент: %s\n" -STRING_DRIVE_PARM " .\n\n" +STRING_DRIVE_PARM "Необхідний параметр операції відсутній.\n\n" -STRING_ERROR_DRIVE_TYPE " " +STRING_ERROR_DRIVE_TYPE "Не вдалося втсанвити тип пристрою" -STRING_INSERT_DISK " %C:\n Enter ..." +STRING_INSERT_DISK "Вставте чистий диск в пристрій %C:\nі натисніть Enter щоб продовжити..." -STRING_NO_VOLUME " " +STRING_NO_VOLUME "Не вдалося виконати запит до пристрою" -STRING_NO_VOLUME_SIZE " " +STRING_NO_VOLUME_SIZE "Не вдалося визначити розмір диску" -STRING_FILESYSTEM " %s.\n" +STRING_FILESYSTEM "Визначена файлова система %s.\n" -STRING_LABEL_NAME_EDIT " %C: " +STRING_LABEL_NAME_EDIT "Визначте мітку диску %C: " -STRING_ERROR_LABEL " .\n" +STRING_ERROR_LABEL "Було вказано некорректну мітку.\n" -STRING_YN_FORMAT "\n! Ѳ Ͳ Բ %C:\n\ - ! \n (Y/N)? " +STRING_YN_FORMAT "\nУВАГА! ВСІ ДАНІ НА ФІКСОВАНОМУ ДИСКУ %C:\n\ + БУДЕ ВТРАЧЕНО! \nРозпочати форматування(Y/N)? " STRING_YES_NO_FAQ "YN" -STRING_VERIFYING "" +STRING_VERIFYING "Перевірка" -STRING_FAST_FMT " " +STRING_FAST_FMT "Швидке форматування" -STRING_CREATE_FSYS " .\n" +STRING_CREATE_FSYS "Створення файлової системи.\n" -STRING_FMT_COMPLETE " .\n" +STRING_FMT_COMPLETE "Форматування завершено.\n" -STRING_VOL_COMPRESS " .\n" +STRING_VOL_COMPRESS "Диск не підтримує стискання.\n" -STRING_ENTER_LABEL "̳ (11 , Enter )? " +STRING_ENTER_LABEL "Мітка диску (11 символів,натисніть Enter якщо не треба)? " -STRING_NO_LABEL " " +STRING_NO_LABEL "Не можу встановити мітку диску" -STRING_FREE_SPACE "\n%I64d .\n%I64d .\n" +STRING_FREE_SPACE "\n%I64d байтів на диску.\n%I64d байтів доступно на диску.\n" -STRING_SERIAL_NUMBER "\n - %04X-%04X\n" +STRING_SERIAL_NUMBER "\nСерійний номер диску - %04X-%04X\n" END diff --git a/base/system/format/rsrc.rc b/base/system/format/rsrc.rc index 61d06ce3d8d..51a2c5ca41b 100644 --- a/base/system/format/rsrc.rc +++ b/base/system/format/rsrc.rc @@ -14,8 +14,11 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/it-IT.rc" #include "lang/lt-LT.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/es-ES.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/es-ES.rc" diff --git a/base/system/logonui/NT5design.c b/base/system/logonui/NT5design.c new file mode 100644 index 00000000000..6c4ff372672 --- /dev/null +++ b/base/system/logonui/NT5design.c @@ -0,0 +1,354 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Logon User Interface Host + * FILE: subsys/system/logonui/NT5design.c + * PROGRAMMERS: Ged Murphy (gedmurphy@reactos.org) + */ + +#include "logonui.h" + + +/* GLOBALS ******************************************************************/ + +#define NT5_TOP_BORDER_HEIGHT 80 +#define NT5_BOTTOM_BORDER_HEIGHT 96 + + +/* FUNCTIONS ****************************************************************/ + +static VOID +NT5_DrawLogoffCaptionText(LPWSTR lpText, + HDC hdcMem) +{ + HFONT hFont; + LOGFONTW LogFont; + RECT TextRect; + INT PrevBkMode; + + /* Setup the font we'll use */ + ZeroMemory(&LogFont, sizeof(LOGFONTW)); + LogFont.lfCharSet = DEFAULT_CHARSET; + LogFont.lfHeight = 22; + LogFont.lfWeight = 109; // From WinXP disassembly + wcscpy_s(LogFont.lfFaceName, LF_FACESIZE, L"Arial"); + + /* Create it */ + hFont = CreateFontIndirectW(&LogFont); + if (hFont) + { + /* Set the font and font colour */ + SelectObject(hdcMem, hFont); + SetTextColor(hdcMem, RGB(255, 255, 255)); + + /* Create the text rect */ + TextRect.top = (g_pInfo->cy / 2) + 34; + TextRect.bottom = (g_pInfo->cy / 2) + 34 + (GetDeviceCaps(hdcMem, LOGPIXELSY)); + TextRect.left = g_pInfo->cx / 3; + TextRect.right = (g_pInfo->cx / 2) + 35 + 137; + + /* Set the background mode to transparent */ + PrevBkMode = SetBkMode(hdcMem, TRANSPARENT); + + /* Draw the text to the mem DC */ + DrawTextW(hdcMem, + lpText, + -1, + &TextRect, + DT_NOPREFIX | DT_WORDBREAK | DT_RIGHT); // WinXP disassembly uses 0x812 + + /* Set the previous background mode */ + SetBkMode(hdcMem, PrevBkMode); + + /* Delete the font */ + DeleteObject(hFont); + } +} + +static VOID +NT5_DrawLogoffIcon(HDC hdcMem) +{ + HBITMAP hBitmap; + BITMAP bitmap; + HDC hTempDC; + + /* Load the XP logo */ + hBitmap = (HBITMAP)LoadImageW(g_pInfo->hInstance, + MAKEINTRESOURCEW(IDB_MAIN_ROS_LOGO), + IMAGE_BITMAP, + 0, + 0, + LR_DEFAULTCOLOR); + if (hBitmap) + { + /* Get the bitmap dimensions */ + GetObjectW(hBitmap, sizeof(BITMAP), &bitmap); + + /* Create a temp DC for the bitmap */ + hTempDC = CreateCompatibleDC(hdcMem); + if (hTempDC) + { + /* Select the bitmap onto the temp DC */ + SelectObject(hTempDC, hBitmap); + + /* Paint it onto the centre block */ + BitBlt(hdcMem, + (g_pInfo->cx / 2) + 35, + (g_pInfo->cy / 2) - 72, + bitmap.bmWidth, + bitmap.bmHeight, + hTempDC, + 0, + 0, + SRCCOPY); + + /* Delete the DC */ + DeleteDC(hTempDC); + } + + /* Delete the bitmap */ + DeleteObject(hBitmap); + } +} + +VOID +NT5_RefreshLogoffScreenText(LPWSTR lpText, + HDC hdcMem) +{ + /* FIXME: clear previous text */ + + /* Draw the new text */ + NT5_DrawLogoffCaptionText(lpText, hdcMem); +} + +VOID +NT5_CreateLogoffScreen(LPWSTR lpText, + HDC hdcMem) +{ + /* Draw the reactos logo */ + NT5_DrawLogoffIcon(hdcMem); + + /* Draw the first text string */ + NT5_DrawLogoffCaptionText(lpText, hdcMem); +} + +HDC +NT5_DrawBaseBackground(HDC hdcDesktop) +{ + HBITMAP hBitmap = NULL; + HDC hdcMem = NULL; + BOOL bRet = FALSE; + + + /* Create an an off screen DC to match the desktop DC */ + hdcMem = CreateCompatibleDC(hdcDesktop); + if (hdcMem) + { + /* Create a bitmap to draw the logoff screen onto */ + hBitmap = CreateCompatibleBitmap(hdcDesktop, g_pInfo->cx, g_pInfo->cy); + if (hBitmap) + { + /* Select it onto our off screen DC*/ + SelectObject(hdcMem, hBitmap); + + /* Draw the centre block */ + { + HBITMAP hTempBitmap; + HBRUSH hBrush; + BITMAP bitmap; + HDC hTempDC; + + /* Paint the blue centre block */ + hBrush = CreateSolidBrush(RGB(90, 126, 220)); + SelectObject(hdcMem, hBrush); + PatBlt(hdcMem, + 0, + NT5_TOP_BORDER_HEIGHT, + g_pInfo->cx, + g_pInfo->cy - NT5_TOP_BORDER_HEIGHT - NT5_BOTTOM_BORDER_HEIGHT, + PATCOPY); + DeleteObject(hBrush); + + /* Load the shine effect */ + hTempBitmap = (HBITMAP)LoadImageW(g_pInfo->hInstance, + MAKEINTRESOURCEW(IDB_MAIN_PANEL_SHINE), + IMAGE_BITMAP, + 0, + 0, + LR_DEFAULTCOLOR); + if (hTempBitmap) + { + /* Get the bitmap dimensions */ + GetObjectW(hTempBitmap, sizeof(BITMAP), &bitmap); + + /* Create a temp DC for the bitmap */ + hTempDC = CreateCompatibleDC(hdcDesktop); + if (hTempDC) + { + /* Select the bitmap onto the temp DC */ + SelectObject(hTempDC, hTempBitmap); + + /* Paint it onto the top left of the centre block */ + BitBlt(hdcMem, + 0, + NT5_TOP_BORDER_HEIGHT, + bitmap.bmWidth, + bitmap.bmHeight, + hTempDC, + 0, + 0, + SRCCOPY); + + /* Delete the DC */ + DeleteDC(hTempDC); + } + + /* Delete the bitmap */ + DeleteObject(hTempBitmap); + } + } + + /* Draw the top border */ + { + HBITMAP hTempBitmap; + HBRUSH hBrush; + BITMAP bitmap; + HDC hTempDC; + + /* Create the blue brush and paint the top bar */ + hBrush = CreateSolidBrush(RGB(0, 48, 156)); + SelectObject(hdcMem, hBrush); + PatBlt(hdcMem, 0, 0, g_pInfo->cx, NT5_TOP_BORDER_HEIGHT, PATCOPY); + DeleteObject(hBrush); + + /* Load the top divider strip */ + hTempBitmap = (HBITMAP)LoadImageW(g_pInfo->hInstance, + MAKEINTRESOURCEW(IDB_TOP_DIVIDER_STRIP), + IMAGE_BITMAP, + 0, + 0, + LR_DEFAULTCOLOR); + if (hTempBitmap) + { + /* Get the bitmap dimensions */ + GetObjectW(hTempBitmap, sizeof(BITMAP), &bitmap); + + /* Create a temp DC for the bitmap */ + hTempDC = CreateCompatibleDC(hdcDesktop); + if (hTempDC) + { + /* Select the bitmap onto the temp DC */ + SelectObject(hTempDC, hTempBitmap); + + /* Paint the bitmap */ + StretchBlt(hdcMem, + 0, + NT5_TOP_BORDER_HEIGHT - bitmap.bmHeight, + g_pInfo->cx, + NT5_TOP_BORDER_HEIGHT, + hTempDC, + 0, + 0, + bitmap.bmWidth, + NT5_TOP_BORDER_HEIGHT, + SRCCOPY); + + /* Delete the DC */ + DeleteDC(hTempDC); + } + + /* Delete the bitmap */ + DeleteObject(hTempBitmap); + } + } + + /* Draw the bottom border */ + { + HBITMAP hTempBitmap; + TRIVERTEX vertex[2]; + GRADIENT_RECT gRect; + BITMAP bitmap; + HDC hTempDC; + + /* + * We paint the divider strip first as it's 3 + * pixels high but MS only show 2 of them. + */ + + /* Load the bottom divider strip */ + hTempBitmap = (HBITMAP)LoadImage(g_pInfo->hInstance, + MAKEINTRESOURCE(IDB_BOTTOM_DIVIDER_STRIP), + IMAGE_BITMAP, + 0, + 0, + LR_DEFAULTCOLOR); + if (hTempBitmap) + { + /* Get the bitmap dimensions */ + GetObjectW(hTempBitmap, sizeof(BITMAP), &bitmap); + + /* Create a temp DC for the bitmap */ + hTempDC = CreateCompatibleDC(hdcDesktop); + if (hTempDC) + { + /* Select the bitmap onto the temp DC */ + SelectObject(hTempDC, hTempBitmap); + + /* Paint the bitmap */ + StretchBlt(hdcMem, + 0, + g_pInfo->cy - NT5_BOTTOM_BORDER_HEIGHT, + g_pInfo->cx, + g_pInfo->cy - NT5_BOTTOM_BORDER_HEIGHT + bitmap.bmHeight, + hTempDC, + 0, + 0, + bitmap.bmWidth, + g_pInfo->cy - NT5_BOTTOM_BORDER_HEIGHT + bitmap.bmHeight, + SRCCOPY); + + /* Delete the DC */ + DeleteDC(hTempDC); + } + + /* Delete the bitmap */ + DeleteObject(hTempBitmap); + } + + /* Setup the left hand vertex */ + vertex[0].x = 0; + vertex[0].y = g_pInfo->cy - NT5_BOTTOM_BORDER_HEIGHT + 2; // paint over 1 pixel of the bitmap + vertex[0].Red = 0x3900; + vertex[0].Green = 0x3400; + vertex[0].Blue = 0xAE00; + vertex[0].Alpha = 0x0000; + + /* Setup the right hand vertex */ + vertex[1].x = g_pInfo->cx; + vertex[1].y = g_pInfo->cy; + vertex[1].Red = 0x0000; + vertex[1].Green = 0x3000; + vertex[1].Blue = 0x9600; + vertex[1].Alpha = 0x0000; + + /* Set the vertex structs */ + gRect.UpperLeft = 0; + gRect.LowerRight = 1; + + /* Paint the gradient across the bottom */ + GradientFill(hdcMem, + vertex, + 2, + &gRect, + 1, + GRADIENT_FILL_RECT_H); + } + + /* Delete the bitmap */ + DeleteObject(hBitmap); + } + } + + return hdcMem; +} + +/* EOF */ diff --git a/base/system/logonui/NT6design.c b/base/system/logonui/NT6design.c new file mode 100644 index 00000000000..32782788cd6 --- /dev/null +++ b/base/system/logonui/NT6design.c @@ -0,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Logon User Interface Host + * FILE: subsys/system/logonui/NT6design.c + * PROGRAMMERS: Ged Murphy (gedmurphy@reactos.org) + */ + +#include "logonui.h" + +/* DATA *********************************************************************/ + +#define LOGONUI_KEY L"SOFTWARE\\Microsoft\\Windows\CurrentVersion\\Authentication\\LogonUI" + + +/* GLOBALS ******************************************************************/ + +/* FUNCTIONS ****************************************************************/ + + + +/* EOF */ diff --git a/base/system/logonui/lang/en-US.rc b/base/system/logonui/lang/en-US.rc new file mode 100644 index 00000000000..77cc40892c6 --- /dev/null +++ b/base/system/logonui/lang/en-US.rc @@ -0,0 +1,3 @@ +#include "resource.h" +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + diff --git a/base/system/logonui/logonui.c b/base/system/logonui/logonui.c new file mode 100644 index 00000000000..1f5cb1e9f91 --- /dev/null +++ b/base/system/logonui/logonui.c @@ -0,0 +1,171 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Logon User Interface Host + * FILE: subsys/system/logonui/logonui.c + * PROGRAMMERS: Ged Murphy (gedmurphy@reactos.org) + */ + +#include "logonui.h" + +/* DATA **********************************************************************/ + + + + +/* GLOBALS ******************************************************************/ + +PINFO g_pInfo = NULL; + + +/* FUNCTIONS ****************************************************************/ + + +static HDC +DrawBaseBackground(HDC hdcDesktop) +{ + HDC hdcMem; + + hdcMem = NT5_DrawBaseBackground(hdcDesktop); + + return hdcMem; +} + +static VOID +DrawLogoffScreen(HDC hdcMem) +{ + /* Draw the logoff icon */ + NT5_CreateLogoffScreen(L"Saving your settings...", hdcMem); +} + +static ULONG +GetULONG(LPWSTR String) +{ + UINT i, Length; + ULONG Value; + LPWSTR StopString; + + i = 0; + /* Get the string length */ + Length = (UINT)wcslen(String); + + /* Check the string only consists of numbers */ + while ((i < Length) && ((String[i] < L'0') || (String[i] > L'9'))) i++; + if ((i >= Length) || ((String[i] < L'0') || (String[i] > L'9'))) + { + return (ULONG)-1; + } + + /* Convert it */ + Value = wcstoul(&String[i], &StopString, 10); + + return Value; +} + +static ULONG +GetULONG2(LPWSTR String1, LPWSTR String2, PINT i) +{ + ULONG Value; + + /* Check the first string value */ + Value = GetULONG(String1); + if (Value == (ULONG)-1) + { + /* Check the second string value isn't a switch */ + if (String2[0] != L'-') + { + /* Check the value */ + Value = GetULONG(String2); + *i += 1; + } + } + + return Value; +} + +static BOOL +ParseCmdline(int argc, WCHAR* argv[]) +{ + return TRUE; +} + +static VOID +Run() +{ + HWND hDesktopWnd; + HDC hdcDesktop, hdcMem; + + /* Get the screen size */ + g_pInfo->cx = GetSystemMetrics(SM_CXSCREEN); + g_pInfo->cy = GetSystemMetrics(SM_CYSCREEN); + + hDesktopWnd = GetDesktopWindow(); + + /* Get the DC for the desktop */ + hdcDesktop = GetDCEx(hDesktopWnd, NULL, DCX_CACHE); + if (hdcDesktop) + { + /* Initialize the base background onto a DC */ + hdcMem = DrawBaseBackground(hdcDesktop); + if (hdcMem) + { + /* TEST : Draw logoff screen */ + DrawLogoffScreen(hdcMem); + + /* Blit the off-screen DC to the desktop */ + BitBlt(hdcDesktop, + 0, + 0, + g_pInfo->cx, + g_pInfo->cy, + hdcMem, + 0, + 0, + SRCCOPY); + + /* Delete the memory DC */ + DeleteDC(hdcMem); + } + + /* Release the desktop DC */ + ReleaseDC(hDesktopWnd, hdcDesktop); + } +} + +int WINAPI +wWinMain(IN HINSTANCE hInst, + IN HINSTANCE hPrevInstance, + IN LPWSTR lpszCmdLine, + IN int nCmdShow) +{ + LPWSTR *lpArgs; + INT NumArgs; + + /* Allocate memory for the data */ + g_pInfo = (PINFO)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(INFO)); + if (!g_pInfo) return -1; + + g_pInfo->hInstance = hInst; + + /* Get the command line args */ + lpArgs = CommandLineToArgvW(lpszCmdLine, &NumArgs); + if (lpArgs) + { + /* Parse the command line */ + if (ParseCmdline(NumArgs, lpArgs)) + { + /* Start the main routine */ + Run(); + } + } + + /* Free the data */ + HeapFree(GetProcessHeap(), + 0, + g_pInfo); + + return 0; +} + +/* EOF */ diff --git a/base/system/logonui/logonui.h b/base/system/logonui/logonui.h new file mode 100644 index 00000000000..b0e36bfabd7 --- /dev/null +++ b/base/system/logonui/logonui.h @@ -0,0 +1,20 @@ +#pragma once + +#include +#include "resource.h" + +typedef struct _INFO +{ + HINSTANCE hInstance; + INT cx; + INT cy; + +} INFO, *PINFO; + +extern PINFO g_pInfo; + + + +HDC NT5_DrawBaseBackground(HDC hdcDesktop); +VOID NT5_CreateLogoffScreen(LPWSTR lpText, HDC hdcMem); +VOID NT5_RefreshLogoffScreenText(LPWSTR lpText, HDC hdcMem); diff --git a/base/system/logonui/logonui.rbuild b/base/system/logonui/logonui.rbuild new file mode 100644 index 00000000000..d314ddbe883 --- /dev/null +++ b/base/system/logonui/logonui.rbuild @@ -0,0 +1,12 @@ + + + + . + user32 + gdi32 + msimg32.lib + logonui.c + NT5design.c + NT6design.c + logonui.rc + diff --git a/base/system/logonui/logonui.rc b/base/system/logonui/logonui.rc new file mode 100644 index 00000000000..4b2ca7497cb --- /dev/null +++ b/base/system/logonui/logonui.rc @@ -0,0 +1,8 @@ +#include + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Logon User Interface Host\0" +#define REACTOS_STR_INTERNAL_NAME "LogonUI\0" +#define REACTOS_STR_ORIGINAL_FILENAME "LogonUI.exe\0" +//#include + +#include "rsrc.rc" diff --git a/base/system/logonui/res/100.bmp b/base/system/logonui/res/100.bmp new file mode 100644 index 00000000000..a690d4c3206 Binary files /dev/null and b/base/system/logonui/res/100.bmp differ diff --git a/base/system/logonui/res/123.bmp b/base/system/logonui/res/123.bmp new file mode 100644 index 00000000000..eb967d022df Binary files /dev/null and b/base/system/logonui/res/123.bmp differ diff --git a/base/system/logonui/res/125.bmp b/base/system/logonui/res/125.bmp new file mode 100644 index 00000000000..ae6ea10cb6a Binary files /dev/null and b/base/system/logonui/res/125.bmp differ diff --git a/base/system/logonui/res/126.bmp b/base/system/logonui/res/126.bmp new file mode 100644 index 00000000000..05e6ce7a8fc Binary files /dev/null and b/base/system/logonui/res/126.bmp differ diff --git a/base/system/logonui/res/unknown.bmp b/base/system/logonui/res/unknown.bmp new file mode 100644 index 00000000000..67410c64078 Binary files /dev/null and b/base/system/logonui/res/unknown.bmp differ diff --git a/base/system/logonui/res/unknown2.bmp b/base/system/logonui/res/unknown2.bmp new file mode 100644 index 00000000000..d73e722124b Binary files /dev/null and b/base/system/logonui/res/unknown2.bmp differ diff --git a/base/system/logonui/resource.h b/base/system/logonui/resource.h new file mode 100644 index 00000000000..da8c4e76104 --- /dev/null +++ b/base/system/logonui/resource.h @@ -0,0 +1,5 @@ + +#define IDB_MAIN_PANEL_SHINE 100 +#define IDB_MAIN_ROS_LOGO 123 +#define IDB_TOP_DIVIDER_STRIP 125 +#define IDB_BOTTOM_DIVIDER_STRIP 126 diff --git a/base/system/logonui/rsrc.rc b/base/system/logonui/rsrc.rc new file mode 100644 index 00000000000..f2521e79f63 --- /dev/null +++ b/base/system/logonui/rsrc.rc @@ -0,0 +1,14 @@ + +#include +#include "resource.h" + +LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL + +IDB_MAIN_PANEL_SHINE BITMAP DISCARDABLE "res/100.bmp" +IDB_MAIN_ROS_LOGO BITMAP DISCARDABLE "res/123.bmp" +IDB_TOP_DIVIDER_STRIP BITMAP DISCARDABLE "res/125.bmp" +IDB_BOTTOM_DIVIDER_STRIP BITMAP DISCARDABLE "res/126.bmp" + + +//#include "lang/en-US.rc" + diff --git a/base/system/msiexec/CMakeLists.txt b/base/system/msiexec/CMakeLists.txt index 9e4c2562343..2d19d4f98da 100644 --- a/base/system/msiexec/CMakeLists.txt +++ b/base/system/msiexec/CMakeLists.txt @@ -1,7 +1,5 @@ -add_definitions( - -D_DLL -D__USE_CRTIMP - -D__WINESRC__) +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/wine) @@ -13,7 +11,6 @@ add_executable(msiexec rsrc.rc) set_module_type(msiexec win32gui) - target_link_libraries(msiexec uuid wine) add_importlibs(msiexec user32 advapi32 ole32 msi msvcrt kernel32 ntdll) add_cd_file(TARGET msiexec DESTINATION reactos/system32 FOR all) diff --git a/base/system/regsvr32/CMakeLists.txt b/base/system/regsvr32/CMakeLists.txt index c784511eb63..1711f737f4e 100644 --- a/base/system/regsvr32/CMakeLists.txt +++ b/base/system/regsvr32/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - set_unicode() -include_directories(.) set_rc_compiler() add_executable(regsvr32 regsvr32.c regsvr32.rc) diff --git a/base/system/regsvr32/lang/pl-PL.rc b/base/system/regsvr32/lang/pl-PL.rc index c5aa1a99c29..f5147e13dbb 100644 --- a/base/system/regsvr32/lang/pl-PL.rc +++ b/base/system/regsvr32/lang/pl-PL.rc @@ -1,34 +1,36 @@ -#include "resource.h" /* -* translated by xrogers (http://rogers.cyberdusk.pl/) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ + * translated by xrogers (http://rogers.cyberdusk.pl/) + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + +#include "resource.h" LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN IDS_UsageMessage, "%s\n\ -Sposb uycia: regsvr32 [/u] [/s] [/c] [/n] [/i[:wiersz_polecenia]] nazwa_pliku_dll\n\ +Sposób użycia: regsvr32 [/u] [/s] [/c] [/n] [/i[:wiersz_polecenia]] nazwa_pliku_dll\n\ /u - Wyrejestruj serwer\n\ -/s - Tryb cichy; nie wywietlaj okien komunikatw\n\ -/c - Wyjcie w konsoli\n\ -/i - Wywoaj funkcj DllInstall, przekazujc jej opcjonalny [wiersz_polecenia]; uycie tej opcji razem z opcj /u wywouje funkcj dll uninstall\n\ -/n - Nie wywouj serwera DllRegisterServer; tej opcji trzeba uy z opcj /i" +/s - Tryb cichy; nie wyświetlaj okien komunikatów\n\ +/c - Wyjście w konsoli\n\ +/i - Wywołaj funkcję DllInstall, przekazując jej opcjonalny [wiersz_polecenia]; użycie tej opcji razem z opcją /u wywołuje funkcję dll uninstall\n\ +/n - Nie wywołuj serwera DllRegisterServer; tej opcji trzeba użyć z opcją /i" -IDS_NoDllSpecified, "Nie okrelono nazwy biblioteki DLL." +IDS_NoDllSpecified, "Nie określono nazwy biblioteki DLL." IDS_InvalidFlag, "Nierozpoznana flaga: %s" -IDS_SwitchN_NoI, "Nierozpoznana flaga: /n musi by uyta z przecznikiem /i" +IDS_SwitchN_NoI, "Nierozpoznana flaga: /n musi być użyta z przełącznikiem /i" -IDS_DllNotLoaded, "LoadLibrary('%s') nie powiodo si.\nGetLastError zwraca 0x%08x." +IDS_DllNotLoaded, "LoadLibrary('%s') nie powiodło się.\nGetLastError zwraca 0x%08x." -IDS_MissingEntry, "%s zosta zaadowany, jednak punkt wejcia %s nie zosta odnaleziony.\n\n\ -%s moe nie by eksportowany, lub uszkodzona wersja %s moe by zaadowana w pamici. Prosz rozway uycie PView, aby wykry i usun to." +IDS_MissingEntry, "%s został załadowany, jednak punkt wejścia %s nie został odnaleziony.\n\n\ +%s może nie być eksportowalny, lub uszkodzona wersja %s może być załadowana w pamięci. Proszę rozważyć użycie PView, aby wykryć i usunąć błędy." -IDS_FailureMessage, "%s w %s nie powioda si.\nKod wynikowy: 0x%08x" +IDS_FailureMessage, "%s w %s nie powiodła się.\nKod rezultatu: 0x%08x" -IDS_SuccessMessage "%s w %s zakoczona sukcesem." +IDS_SuccessMessage "%s w %s zakończona sukcesem." END diff --git a/base/system/regsvr32/lang/ru-RU.rc b/base/system/regsvr32/lang/ru-RU.rc index 7b758fd2015..9f7972f6721 100644 --- a/base/system/regsvr32/lang/ru-RU.rc +++ b/base/system/regsvr32/lang/ru-RU.rc @@ -4,25 +4,25 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_UsageMessage, "%s\n\n: regsvr32 [/u] [/s] [/c] [/n] [/i[:]] _dll\n\ -/u - \n\ -/s - ; \n\ -/c - \n\ -/i - DllInstall []; /u DllUninstall\n\ -/n - DllRegisterServer; /i" +IDS_UsageMessage, "%s\n\nИспользование: regsvr32 [/u] [/s] [/c] [/n] [/i[:параметр]] имя_dll\n\ +/u - Отмена регистрации сервера\n\ +/s - Тихий; не отображать окон сообщений\n\ +/c - Вывод в консоль\n\ +/i - Вызывает DllInstall с дополнительным параметром [параметр]; При использовании ключа /u вызывает DllUninstall\n\ +/n - Не вызывает DllRegisterServer; эта опция должна использоваться с /i" -IDS_NoDllSpecified, " DLL." +IDS_NoDllSpecified, "Не указано имя DLL." -IDS_InvalidFlag, " : %s" +IDS_InvalidFlag, "Неизвестный параметр: %s" -IDS_SwitchN_NoI, " : /n /i" +IDS_SwitchN_NoI, "Неизвестный параметр: /n должен использоваться совместно с параметром /i" -IDS_DllNotLoaded, " LoadLibrary('%s') .\n GetLastError : 0x%08x." +IDS_DllNotLoaded, "Вызов LoadLibrary('%s') завершился неудачей.\nФункция GetLastError возвратила код ошибки: 0x%08x." -IDS_MissingEntry, "%s , %s .\n\n\ -%s %s . PView, ." +IDS_MissingEntry, "%s был загружен, но точка входа %s не найдена.\n\n\ +%s может быть неэкспортируемой или поврежденная версия %s находится в памяти. Используйте PView, чтобы обнаружить и удалить его." -IDS_FailureMessage, "%s %s .\n : 0x%08x" +IDS_FailureMessage, "%s в %s завершился неудачей.\nВозвращенный код: 0x%08x" -IDS_SuccessMessage "%s %s ." +IDS_SuccessMessage "%s в %s успешно завершено." END diff --git a/base/system/regsvr32/lang/uk-UA.rc b/base/system/regsvr32/lang/uk-UA.rc index 3e7be2b1614..bcda54f6a98 100644 --- a/base/system/regsvr32/lang/uk-UA.rc +++ b/base/system/regsvr32/lang/uk-UA.rc @@ -5,25 +5,25 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -IDS_UsageMessage, "%s\n\n: regsvr32 [/u] [/s] [/c] [/n] [/i[:]] _dll\n\ -/u - ³ \n\ -/s - : \n\ -/c - \n\ -/i - DllInstall []; /u DllUninstall\n\ -/n - DllRegisterServer; /i" +IDS_UsageMessage, "%s\n\nВикористання: regsvr32 [/u] [/s] [/c] [/n] [/i[:параметри]] назва_dll\n\ +/u - Відмінити реєстрацію сервера\n\ +/s - Тихий режим: Не виводити повідомлень\n\ +/c - Вивід в консоль\n\ +/i - Викликати DllInstall з додатковими параметрами [параметри]; Коли використовується ключ /u викликається DllUninstall\n\ +/n - Не викликати DllRegisterServer; цей ключ має використовуватися з /i" -IDS_NoDllSpecified, " ' DLL." +IDS_NoDllSpecified, "Не вказано ім'я DLL." -IDS_InvalidFlag, " : %s" +IDS_InvalidFlag, "Невідомий ключ: %s" -IDS_SwitchN_NoI, " : /n /i" +IDS_SwitchN_NoI, "Невідомий ключ: /n використовується лише з ключем /i" -IDS_DllNotLoaded, "LoadLibrary('%s') .\nGetLastError 0x%08x." +IDS_DllNotLoaded, "LoadLibrary('%s') завершився аварійно.\nGetLastError повернуло 0x%08x." -IDS_MissingEntry, "%s , %s .\n\n\ -%s , ' %s. %s, PView." +IDS_MissingEntry, "%s було запущено, але точка входу для %s не знайдено.\n\n\ +%s може не експортуватись, чи в пам'яті лежить пошкоджена версія %s. Для того щоб знайти і видалти %s, використовуйте PView." -IDS_FailureMessage, "%s %s .\n : 0x%08x" +IDS_FailureMessage, "%s в %s завершилося аварійно.\nКод завершення: 0x%08x" -IDS_SuccessMessage "%s %s ." +IDS_SuccessMessage "%s в %s успішно виконано." END diff --git a/base/system/regsvr32/rsrc.rc b/base/system/regsvr32/rsrc.rc index 425523101c8..4867e000c8a 100644 --- a/base/system/regsvr32/rsrc.rc +++ b/base/system/regsvr32/rsrc.rc @@ -16,7 +16,10 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/lt-LT.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/system/rundll32/lang/pl-PL.rc b/base/system/rundll32/lang/pl-PL.rc index e7007ba93ec..990b2d2e28a 100644 --- a/base/system/rundll32/lang/pl-PL.rc +++ b/base/system/rundll32/lang/pl-PL.rc @@ -1,13 +1,14 @@ #include "resource.h" /* -* translated by xrogers (http://rogers.cyberdusk.pl/) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ + * translated by xrogers (http://rogers.cyberdusk.pl/) + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_DllNotLoaded, "LoadLibrary nie mg zaadowa '%s'" - IDS_MissingEntry, "Brakujcy punkt wejcia:%s\nW %s" + IDS_DllNotLoaded, "Funkcja LoadLibrary nie mogła załadować '%s'" + IDS_MissingEntry, "Brakujący punkt wejścia:%s\nW %s" END diff --git a/base/system/rundll32/lang/ru-RU.rc b/base/system/rundll32/lang/ru-RU.rc index 57948f3096d..022411de2fe 100644 --- a/base/system/rundll32/lang/ru-RU.rc +++ b/base/system/rundll32/lang/ru-RU.rc @@ -3,6 +3,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_DllNotLoaded, " '%s'" - IDS_MissingEntry, " : %s\n %s" + IDS_DllNotLoaded, "Невозможно загрузить библиотеку '%s'" + IDS_MissingEntry, "Невозможно найти точку входа: %s\nв библиотеке %s" END diff --git a/base/system/rundll32/lang/uk-UA.rc b/base/system/rundll32/lang/uk-UA.rc index 3685ef48525..54899a51004 100644 --- a/base/system/rundll32/lang/uk-UA.rc +++ b/base/system/rundll32/lang/uk-UA.rc @@ -12,6 +12,6 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN - IDS_DllNotLoaded, "LoadLibrary '%s'" - IDS_MissingEntry, " :%s\n %s" + IDS_DllNotLoaded, "LoadLibrary не вдалося завантажити '%s'" + IDS_MissingEntry, "Неможливо знайти точку входу:%s\nВ бібліотеці %s" END diff --git a/base/system/rundll32/rsrc.rc b/base/system/rundll32/rsrc.rc index 7486842bd34..784b916d3a7 100644 --- a/base/system/rundll32/rsrc.rc +++ b/base/system/rundll32/rsrc.rc @@ -16,10 +16,13 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/lt-LT.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/system/runonce/lang/pl-PL.rc b/base/system/runonce/lang/pl-PL.rc new file mode 100644 index 00000000000..61e31eadead --- /dev/null +++ b/base/system/runonce/lang/pl-PL.rc @@ -0,0 +1,20 @@ +/* + * translated by Caemyr - Olaf Siejka (May, 2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) + */ + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + + +IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Program konfiguracyjny ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS w tej chwili konfiguruje poniższe moduły:", -1, 38, 8, 196, 18 + LISTBOX IDC_COMP_LIST, 36, 32, 197, 131, LBS_OWNERDRAWVARIABLE | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + ICON IDI_ICON, -1, 5, 6, 21, 20 +END diff --git a/base/system/runonce/lang/ru-RU.rc b/base/system/runonce/lang/ru-RU.rc index c8700bd92ed..1ff0637bef4 100644 --- a/base/system/runonce/lang/ru-RU.rc +++ b/base/system/runonce/lang/ru-RU.rc @@ -2,10 +2,10 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS :", -1, 38, 8, 196, 18 + LTEXT "ReactOS настраивает следующие компоненты:", -1, 38, 8, 196, 18 LISTBOX IDC_COMP_LIST, 36, 32, 197, 131, LBS_OWNERDRAWVARIABLE | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ICON IDI_ICON, -1, 5, 6, 21, 20 END diff --git a/base/system/runonce/lang/uk-UA.rc b/base/system/runonce/lang/uk-UA.rc index 6c68828757a..18108958a3a 100644 --- a/base/system/runonce/lang/uk-UA.rc +++ b/base/system/runonce/lang/uk-UA.rc @@ -10,10 +10,10 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS :", -1, 38, 8, 196, 18 + LTEXT "ReactOS налаштовує наступні компоненти:", -1, 38, 8, 196, 18 LISTBOX IDC_COMP_LIST, 36, 32, 197, 131, LBS_OWNERDRAWVARIABLE | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ICON IDI_ICON, -1, 5, 6, 21, 20 END diff --git a/base/system/runonce/rsrc.rc b/base/system/runonce/rsrc.rc index 58c669a3faf..e86ca7e489e 100644 --- a/base/system/runonce/rsrc.rc +++ b/base/system/runonce/rsrc.rc @@ -3,7 +3,10 @@ #include "lang/fr-FR.rc" #include "lang/es-ES.rc" #include "lang/ja-JP.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" -#include "lang/uk-UA.rc" +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/base/system/services/CMakeLists.txt b/base/system/services/CMakeLists.txt index 5384849da3c..162f6684a6f 100644 --- a/base/system/services/CMakeLists.txt +++ b/base/system/services/CMakeLists.txt @@ -14,14 +14,13 @@ list(APPEND SOURCE services.c services.rc) -add_executable(services ${CMAKE_CURRENT_BINARY_DIR}/services_services.h.gch ${SOURCE}) +add_executable(services ${SOURCE}) target_link_libraries(services svcctlrpc ${PSEH_LIB}) -add_pch(services ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${SOURCE}) - set_module_type(services win32cui) add_importlibs(services user32 advapi32 rpcrt4 msvcrt kernel32 ntdll) +add_pch(services services.h) add_cd_file(TARGET services DESTINATION reactos/system32 FOR all) diff --git a/base/system/services/database.c b/base/system/services/database.c index b8d0a4be3d4..0d7ec77e152 100644 --- a/base/system/services/database.c +++ b/base/system/services/database.c @@ -1036,6 +1036,7 @@ ScmStartService(PSERVICE Service, DWORD argc, LPWSTR *argv) { PSERVICE_GROUP Group = Service->lpGroup; DWORD dwError = ERROR_SUCCESS; + LPCWSTR ErrorLogStrings[2]; DPRINT("ScmStartService() called\n"); @@ -1088,15 +1089,20 @@ ScmStartService(PSERVICE Service, DWORD argc, LPWSTR *argv) Group->ServicesRunning = TRUE; } } -#if 0 else { - switch (Service->ErrorControl) + if (Service->dwErrorControl != SERVICE_ERROR_IGNORE) { - case SERVICE_ERROR_NORMAL: - /* FIXME: Log error */ - break; + ErrorLogStrings[0] = Service->lpServiceName; + ErrorLogStrings[1] = L"Test"; + ScmLogError(EVENT_SERVICE_START_FAILED, + 2, + ErrorLogStrings); + } +#if 0 + switch (Service->dwErrorControl) + { case SERVICE_ERROR_SEVERE: if (IsLastKnownGood == FALSE) { @@ -1115,8 +1121,8 @@ ScmStartService(PSERVICE Service, DWORD argc, LPWSTR *argv) } break; } - } #endif + } return dwError; } @@ -1129,14 +1135,65 @@ ScmAutoStartServices(VOID) PLIST_ENTRY ServiceEntry; PSERVICE_GROUP CurrentGroup; PSERVICE CurrentService; + WCHAR szSafeBootServicePath[MAX_PATH]; + DWORD dwError; + HKEY hKey; ULONG i; - /* Clear 'ServiceVisited' flag */ + /* Clear 'ServiceVisited' flag (or set if not to start in Safe Mode) */ ServiceEntry = ServiceListHead.Flink; while (ServiceEntry != &ServiceListHead) { CurrentService = CONTAINING_RECORD(ServiceEntry, SERVICE, ServiceListEntry); - CurrentService->ServiceVisited = FALSE; + /* Build the safe boot path */ + wcscpy(szSafeBootServicePath, + L"SYSTEM\\CurrentControlSet\\Control\\SafeBoot"); + switch(GetSystemMetrics(SM_CLEANBOOT)) + { + /* NOTE: Assumes MINIMAL (1) and DSREPAIR (3) load same items */ + case 1: + case 3: wcscat(szSafeBootServicePath, L"\\Minimal\\"); break; + case 2: wcscat(szSafeBootServicePath, L"\\Network\\"); break; + } + if(GetSystemMetrics(SM_CLEANBOOT)) + { + /* If key does not exist then do not assume safe mode */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + szSafeBootServicePath, + 0, + KEY_READ, + &hKey); + if(dwError == ERROR_SUCCESS) + { + RegCloseKey(hKey); + /* Finish Safe Boot path off */ + wcsncat(szSafeBootServicePath, + CurrentService->lpServiceName, + MAX_PATH - wcslen(szSafeBootServicePath)); + /* Check that the key is in the Safe Boot path */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + szSafeBootServicePath, + 0, + KEY_READ, + &hKey); + if(dwError != ERROR_SUCCESS) + { + /* Mark service as visited so it is not auto-started */ + CurrentService->ServiceVisited = TRUE; + } + else + { + /* Must be auto-started in safe mode - mark as unvisited */ + RegCloseKey(hKey); + CurrentService->ServiceVisited = FALSE; + } + } + else + { + DPRINT1("WARNING: Could not open the associated Safe Boot key!"); + CurrentService->ServiceVisited = FALSE; + } + } ServiceEntry = ServiceEntry->Flink; } @@ -1242,6 +1299,9 @@ ScmAutoShutdownServices(VOID) DPRINT("ScmAutoShutdownServices() called\n"); + /* Lock the service database exclusively */ + ScmLockDatabaseExclusive(); + ServiceEntry = ServiceListHead.Flink; while (ServiceEntry != &ServiceListHead) { @@ -1251,13 +1311,17 @@ ScmAutoShutdownServices(VOID) CurrentService->Status.dwCurrentState == SERVICE_START_PENDING) { /* shutdown service */ - ScmControlService(CurrentService, SERVICE_CONTROL_STOP); + DPRINT("Shutdown service: %S\n", CurrentService->szServiceName); + ScmControlService(CurrentService, SERVICE_CONTROL_SHUTDOWN); } ServiceEntry = ServiceEntry->Flink; } - DPRINT("ScmGetBootAndSystemDriverState() done\n"); + /* Unlock the service database */ + ScmUnlockDatabase(); + + DPRINT("ScmAutoShutdownServices() done\n"); } diff --git a/base/system/services/rpcserver.c b/base/system/services/rpcserver.c index 8e5da237f53..58d8b5d3452 100644 --- a/base/system/services/rpcserver.c +++ b/base/system/services/rpcserver.c @@ -1181,8 +1181,11 @@ DWORD RNotifyBootConfigStatus( SVCCTL_HANDLEW lpMachineName, DWORD BootAcceptable) { - UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + DPRINT1("RNotifyBootConfigStatus(%p %lu) called\n", lpMachineName, BootAcceptable); + return ERROR_SUCCESS; + +// UNIMPLEMENTED; +// return ERROR_CALL_NOT_IMPLEMENTED; } @@ -1898,9 +1901,15 @@ DWORD RCreateServiceW( return ERROR_INVALID_PARAMETER; } + /* Lock the service database exclusively */ + ScmLockDatabaseExclusive(); + lpService = ScmGetServiceEntryByName(lpServiceName); if (lpService) { + /* Unlock the service database */ + ScmUnlockDatabase(); + /* check if it is marked for deletion */ if (lpService->bDeleted) return ERROR_SERVICE_MARKED_FOR_DELETE; @@ -1910,7 +1919,12 @@ DWORD RCreateServiceW( if (lpDisplayName != NULL && ScmGetServiceEntryByDisplayName(lpDisplayName) != NULL) + { + /* Unlock the service database */ + ScmUnlockDatabase(); + return ERROR_DUPLICATE_SERVICE_NAME; + } if (dwServiceType & SERVICE_DRIVER) { @@ -1925,6 +1939,9 @@ DWORD RCreateServiceW( if (dwStartType == SERVICE_BOOT_START || dwStartType == SERVICE_SYSTEM_START) { + /* Unlock the service database */ + ScmUnlockDatabase(); + return ERROR_INVALID_PARAMETER; } } @@ -2113,6 +2130,9 @@ DWORD RCreateServiceW( DPRINT("CreateService - lpService->dwRefCount %u\n", lpService->dwRefCount); done:; + /* Unlock the service database */ + ScmUnlockDatabase(); + if (hServiceKey != NULL) RegCloseKey(hServiceKey); @@ -5079,7 +5099,8 @@ DWORD REnumServicesStatusExW( if (lpResumeIndex) dwLastResumeCount = *lpResumeIndex; - /* FIXME: Lock the service list shared */ + /* Lock the service database shared */ + ScmLockDatabaseShared(); lpService = ScmGetServiceEntryByResumeCount(dwLastResumeCount); if (lpService == NULL) @@ -5281,7 +5302,8 @@ DWORD REnumServicesStatusExW( } Done:; - /* FIXME: Unlock the service list */ + /* Unlock the service database */ + ScmUnlockDatabase(); DPRINT("REnumServicesStatusExW() done (Error %lu)\n", dwError); diff --git a/base/system/services/services.c b/base/system/services/services.c index e5a00411259..0c213d38f63 100644 --- a/base/system/services/services.c +++ b/base/system/services/services.c @@ -47,6 +47,38 @@ PrintString(LPCSTR fmt, ...) } +VOID +ScmLogError(DWORD dwEventId, + WORD wStrings, + LPCWSTR *lpStrings) +{ + HANDLE hLog; + + hLog = RegisterEventSourceW(NULL, + L"Service Control Manager"); + if (hLog == NULL) + { + DPRINT1("ScmLogEvent: RegisterEventSourceW failed %d\n", GetLastError()); + return; + } + + if (!ReportEventW(hLog, + EVENTLOG_ERROR_TYPE, + 0, + dwEventId, + NULL, // Sid, + wStrings, + 0, + lpStrings, + NULL)) + { + DPRINT1("ScmLogEvent: ReportEventW failed %d\n", GetLastError()); + } + + DeregisterEventSource(hLog); +} + + BOOL ScmCreateStartEvent(PHANDLE StartEvent) { diff --git a/base/system/services/services.h b/base/system/services/services.h index 673edbf115d..f080af63bd9 100644 --- a/base/system/services/services.h +++ b/base/system/services/services.h @@ -5,6 +5,7 @@ #include #define WIN32_NO_STATUS #include +#include #define NTOS_MODE_USER #include #include @@ -151,6 +152,9 @@ VOID ScmStartRpcServer(VOID); /* services.c */ VOID PrintString(LPCSTR fmt, ...); +VOID ScmLogError(DWORD dwEventId, + WORD wStrings, + LPCWSTR *lpStrings); /* EOF */ diff --git a/base/system/smss/CMakeLists.txt b/base/system/smss/CMakeLists.txt index b1c77a3b491..8c3b553e17c 100644 --- a/base/system/smss/CMakeLists.txt +++ b/base/system/smss/CMakeLists.txt @@ -23,15 +23,14 @@ list(APPEND SOURCE smss.c smss.rc) -add_executable(smss WIN32 ${CMAKE_CURRENT_BINARY_DIR}/smss_smss.h.gch ${SOURCE}) +add_executable(smss WIN32 ${SOURCE}) -target_link_libraries(smss mingw_common nt smlib) +target_link_libraries(smss nt smlib) if(MSVC) - target_link_libraries(smss msvcsup) set_entrypoint(smss DllMainCRTStartup) endif() -add_pch(smss ${CMAKE_CURRENT_SOURCE_DIR}/smss.h ${SOURCE}) +add_pch(smss smss.h) set_module_type(smss nativecui) add_importlibs(smss ntdll) diff --git a/base/system/smss/initpage.c b/base/system/smss/initpage.c index 7ec19985463..31bef7c975b 100644 --- a/base/system/smss/initpage.c +++ b/base/system/smss/initpage.c @@ -189,7 +189,7 @@ SmpPagingFilesQueryRoutine(PWSTR ValueName, if (InitialSize.QuadPart > GIGABYTE) { InitialSize.QuadPart = GIGABYTE; - MaximumSize.QuadPart = GIGABYTE * 1.5; + MaximumSize.QuadPart = (ULONGLONG)GIGABYTE * 3 / 2; } } diff --git a/base/system/smss/initrun.c b/base/system/smss/initrun.c index 7136bfe7c97..ff35e576a8f 100644 --- a/base/system/smss/initrun.c +++ b/base/system/smss/initrun.c @@ -85,8 +85,8 @@ SmpRunBootAppsQueryRoutine(PWSTR ValueName, NULL, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("SM: %s: running '$S' failed (Status=0x%08lx)\n", - __FUNCTION__, Status); + DPRINT1("SM: %s: running '%S' failed (Status=0x%08lx)\n", + __FUNCTION__, ImagePath, Status); } return(STATUS_SUCCESS); } diff --git a/base/system/subst/CMakeLists.txt b/base/system/subst/CMakeLists.txt index 4319b5e9b34..6b9c5828f74 100644 --- a/base/system/subst/CMakeLists.txt +++ b/base/system/subst/CMakeLists.txt @@ -1,9 +1,6 @@ -include_directories(.) set_rc_compiler() -add_definitions(-D_DLL -D__USE_CRTIMP) - add_executable(subst subst.c subst.rc) set_module_type(subst win32cui) diff --git a/base/system/subst/lang/en-US.rc b/base/system/subst/lang/en-US.rc index 790555b2db2..9f9536165a5 100644 --- a/base/system/subst/lang/en-US.rc +++ b/base/system/subst/lang/en-US.rc @@ -8,9 +8,11 @@ BEGIN IDS_INVALID_PARAMETER2 "Invalid parameter - %s\n" IDS_DRIVE_ALREAD_SUBSTED "Drive already SUBSTed\n" IDS_FAILED_WITH_ERROCODE "Failed with error code 0x%x: %s\n" - IDS_USAGE "Associates a path with a drive letter.\n\nSUBST [drive1: [drive2:]path]\nSUBST drive1: /D\n\n drive1: \ - Specifies a virtual drive to which you want to assign a path.\n \ - [drive2:]path Specifies a physical drive and path you want to assign to\n \ - a virtual drive.\n /D \ - Deletes a substituted (virtual) drive.\n\nType SUBST with no parameters to display a list of current virtual drives.\n" + IDS_USAGE "Associates a path with a drive letter.\n\n\ +SUBST [drive1: [drive2:]path]\n\ +SUBST drive1: /D\n\n\ + drive1: Specifies a virtual drive to which you want to assign a path.\n\ + [drive2:]path Specifies a physical drive and path you want to assign to\n a virtual drive.\n\ + /D Deletes a substituted (virtual) drive.\n\n\ +Type SUBST with no parameters to display a list of current virtual drives.\n" END diff --git a/base/system/subst/lang/es-ES.rc b/base/system/subst/lang/es-ES.rc index 7bbefe47299..7e2165f9480 100644 --- a/base/system/subst/lang/es-ES.rc +++ b/base/system/subst/lang/es-ES.rc @@ -8,9 +8,11 @@ BEGIN IDS_INVALID_PARAMETER2 "Parmetro incorrecto - %s\n" IDS_DRIVE_ALREAD_SUBSTED "Unidad ya sustituida\n" IDS_FAILED_WITH_ERROCODE "Falla con cdigo de error 0x%x: %s\n" - IDS_USAGE "Asocia una ruta con una letra de unidad.\n\nSUBST [unidad1: [unidad2:]ruta]\nSUBST unidad1: /D\n\n unidad1: \ - Especifica una unidad virtual a la cual se quiere asignar una ruta.\n \ - [unidad2:]ruta Especifica una unidad fsica y una ruta a la cual asignar\n \ - una unidad virtual.\n /D \ - Elimina una unidad (virtual) substituida.\n\nEscribir SUBST sin parmetros para mostrar una lista de las unidades virtuales actuales.\n" + IDS_USAGE "Asocia una ruta con una letra de unidad.\n\n\ +SUBST [unidad1: [unidad2:]ruta]\n\ +SUBST unidad1: /D\n\n\ + unidad1: Especifica una unidad virtual a la cual se quiere asignar una ruta.\n\ + [unidad2:]ruta Especifica una unidad fsica y una ruta a la cual asignar\n una unidad virtual.\n\ + /D Elimina una unidad (virtual) substituida.\n\n\ +Escribir SUBST sin parmetros para mostrar una lista de las unidades virtuales actuales.\n" END diff --git a/base/system/subst/lang/it-IT.rc b/base/system/subst/lang/it-IT.rc index 5a2c1d3229a..cb3c6aed004 100644 --- a/base/system/subst/lang/it-IT.rc +++ b/base/system/subst/lang/it-IT.rc @@ -8,9 +8,11 @@ BEGIN IDS_INVALID_PARAMETER2 "Parametro errato - %s\n" IDS_DRIVE_ALREAD_SUBSTED "Unit gi sostituita\n" IDS_FAILED_WITH_ERROCODE "Interruzione con codice di errore 0x%x: %s\n" - IDS_USAGE "Associa un percorso ad una lettera di unit.\n\nSUBST [unit1: [unit2:]percorso]\nSUBST unit1: /D\n\n unit1: \ - Specifica un'unit virtuale alla quale assegnare un percorso.\n \ - [unit2:]percorso Specifica un'unit fisica e un percorso da assegnare ad una\n \ - unit virtuale.\n /D \ - Elimina un'unit (virtuale) sostituita.\n\nDigitare SUBST senza parametri per mostrare un elenco delle unit virtuali attuali.\n" + IDS_USAGE "Associa un percorso ad una lettera di unit.\n\n\ +SUBST [unit1: [unit2:]percorso]\n\ +SUBST unit1: /D\n\n\ + unit1: Specifica un'unit virtuale alla quale assegnare un percorso.\n\ + [unit2:]percorso Specifica un'unit fisica e un percorso da assegnare ad una\n unit virtuale.\n\ + /D Elimina un'unit (virtuale) sostituita.\n\n\ +Digitare SUBST senza parametri per mostrare un elenco delle unit virtuali attuali.\n" END diff --git a/base/system/subst/lang/pl-PL.rc b/base/system/subst/lang/pl-PL.rc new file mode 100644 index 00000000000..aebdb4bf784 --- /dev/null +++ b/base/system/subst/lang/pl-PL.rc @@ -0,0 +1,27 @@ +/* + * translated by Caemyr - Olaf Siejka (May, 2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) + */ + +#include "resource.h" + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_INCORRECT_PARAMETER_COUNT "Nieprawidłowa liczba parametrów - %s\n" + IDS_INVALID_PARAMETER "Nieprawidłowy parametr - %s\n" + IDS_INVALID_PARAMETER2 "Nieprawidłowe parametry - %s\n" + IDS_DRIVE_ALREAD_SUBSTED "Na tym dysku już użyto komendy SUBST\n" + IDS_FAILED_WITH_ERROCODE "Błąd 0x%x: %s\n" + IDS_USAGE "Powiązuje ścieżkę z literą napędu.\n\n\ +SUBST [napęd1: [napęd2:]ścieżka]\n\ +SUBST napęd1: /D\n\n\ + napęd1: Określa wirutalny napęd do litery któreego chcesz powiązać ścieżkę.\n\ + [napęd2:]ścieżka Określa istniejącą ścieżkę, którą chcesz powiązać z literą napędu \n wirtualnego.\n\ + /D Kasuje aktywny (wirtualny) napęd.\n\n\ +Użycie SUBST bez żadnych parametrów wyświetla aktualną listę napędów wirtualnych.\n" +END diff --git a/base/system/subst/lang/uk-UA.rc b/base/system/subst/lang/uk-UA.rc new file mode 100644 index 00000000000..ec4f18afa2f --- /dev/null +++ b/base/system/subst/lang/uk-UA.rc @@ -0,0 +1,27 @@ +/* + * PROJECT: ReactOS subst + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/system/subst/lang/uk-UA.rc + * PURPOSE: Ukraianian Language File for subst + * TRANSLATOR: Igor Paliychuk + */ + +#include "resource.h" + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_INCORRECT_PARAMETER_COUNT "Невірна кількість параметрів - %s\n" + IDS_INVALID_PARAMETER "Невірна кількість параметрів - %s\n" + IDS_INVALID_PARAMETER2 "Невірний параметр - %s\n" + IDS_DRIVE_ALREAD_SUBSTED "До диску вже застосовано SUBST\n" + IDS_FAILED_WITH_ERROCODE "Невдача з кодом помилки 0x%x: %s\n" + IDS_USAGE "Асоціює шлях з буквою диску.\n\n\ +SUBST [диск1: [диск2:]шлях]\n\ +SUBST диск1: /D\n\n\ + диск1: Визначає віртуальний диск, на який ви хочете призначити шлях.\n\ + [диск2:]шлях Визначає фізичний диск та шлях, який ви хочете призначити\n для віртуального диску.\n\ + /D Видаляє підставлений (віртуальний) диск.\n\n\ +Введіть SUBST без параметрів для відображення списку поточних віртуальних дисків.\n" +END diff --git a/base/system/subst/rsrc.rc b/base/system/subst/rsrc.rc index f50bcd93ef0..46064e12d0e 100644 --- a/base/system/subst/rsrc.rc +++ b/base/system/subst/rsrc.rc @@ -6,3 +6,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/en-US.rc" #include "lang/es-ES.rc" #include "lang/it-IT.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/uk-UA.rc" diff --git a/base/system/userinit/lang/pl-PL.rc b/base/system/userinit/lang/pl-PL.rc index 1b334c378d6..840ee3b2256 100644 --- a/base/system/userinit/lang/pl-PL.rc +++ b/base/system/userinit/lang/pl-PL.rc @@ -1,13 +1,16 @@ -#include "resource.h" /* -* translated by xrogers (http://rogers.cyberdusk.pl/) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ + * translated by xrogers (http://rogers.cyberdusk.pl/) + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + +#include "resource.h" + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_USERINIT_FAIL, "Nie powiodo si uruchomienie powoki przez userinit!\n" +STRING_USERINIT_FAIL, "Nie powiodło się uruchomienie powłoki przez userinit!\n" END diff --git a/base/system/userinit/lang/ru-RU.rc b/base/system/userinit/lang/ru-RU.rc index 063e6c1e638..aa3cf68ac51 100644 --- a/base/system/userinit/lang/ru-RU.rc +++ b/base/system/userinit/lang/ru-RU.rc @@ -7,6 +7,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_USERINIT_FAIL, " !\n" +STRING_USERINIT_FAIL, "Ошибка запуска оболочки при инициализации пользовательского сеанса!\n" END diff --git a/base/system/userinit/lang/uk-UA.rc b/base/system/userinit/lang/uk-UA.rc index b6d13dc368f..e6da517ae8e 100644 --- a/base/system/userinit/lang/uk-UA.rc +++ b/base/system/userinit/lang/uk-UA.rc @@ -13,6 +13,6 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_USERINIT_FAIL, "Userinit !\n" +STRING_USERINIT_FAIL, "Userinit не вдалося запустити оболонку!\n" END diff --git a/base/system/userinit/rsrc.rc b/base/system/userinit/rsrc.rc index 7ac7fd4d175..30dab068320 100644 --- a/base/system/userinit/rsrc.rc +++ b/base/system/userinit/rsrc.rc @@ -18,10 +18,13 @@ LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/base/system/userinit/userinit.c b/base/system/userinit/userinit.c index 81027d4b964..6dbf1bb6c34 100644 --- a/base/system/userinit/userinit.c +++ b/base/system/userinit/userinit.c @@ -274,9 +274,70 @@ VOID StartShell(VOID) { WCHAR Shell[MAX_PATH]; TCHAR szMsg[RC_STRING_MAX_SIZE]; + DWORD Type, Size; + DWORD Value = 0; + LONG rc; + HKEY hKey; TRACE("()\n"); + /* Safe Mode shell run */ + rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Option", + 0, KEY_QUERY_VALUE, &hKey); + if(rc == ERROR_SUCCESS) + { + Size = sizeof(Value); + rc = RegQueryValueExW(hKey, L"UseAlternateShell", NULL, + &Type, (LPBYTE)&Value, &Size); + if(rc == ERROR_SUCCESS) + { + RegCloseKey(hKey); + if(Type == REG_DWORD) + { + if(Value) + { + /* Safe Mode Alternate Shell required */ + rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SYSTEM\\CurrentControlSet\\Control\\SafeBoot", + 0, KEY_READ, &hKey); + if(rc == ERROR_SUCCESS) + { + Size = MAX_PATH * sizeof(WCHAR); + rc = RegQueryValueExW(hKey, L"AlternateShell", NULL, + &Type, (LPBYTE)Shell, &Size); + if(rc == ERROR_SUCCESS) + { + RegCloseKey(hKey); + if ((Type == REG_SZ) || (Type == REG_EXPAND_SZ)) + { + TRACE("Key located - %s\n", debugstr_w(Shell)); + /* Try to run alternate shell */ + if (TryToStartShell(Shell)) + { + TRACE("Alternate shell started (Safe Mode)\n"); + return; + } + } + else + { + WARN("Wrong type %lu (expected %u or %u)\n", + Type, REG_SZ, REG_EXPAND_SZ); + } + } + else + { + WARN("Alternate shell in Safe Mode required but not specified."); + } + } + } + } + else + { + WARN("Wrong type %lu (expected %u)\n", Type, REG_DWORD); + } + } + } /* Try to run shell in user key */ if (GetShell(Shell, HKEY_CURRENT_USER) && TryToStartShell(Shell)) { diff --git a/base/system/winlogon/CMakeLists.txt b/base/system/winlogon/CMakeLists.txt index 945de9935fa..99bee9d970e 100644 --- a/base/system/winlogon/CMakeLists.txt +++ b/base/system/winlogon/CMakeLists.txt @@ -8,12 +8,11 @@ list(APPEND SOURCE wlx.c winlogon.rc) -add_executable(winlogon ${CMAKE_CURRENT_BINARY_DIR}/winlogon_winlogon.h.gch ${SOURCE}) +add_executable(winlogon ${SOURCE}) target_link_libraries(winlogon wine) -add_pch(winlogon ${CMAKE_CURRENT_SOURCE_DIR}/winlogon.h ${SOURCE}) - set_module_type(winlogon win32gui) add_importlibs(winlogon user32 advapi32 userenv secur32 msvcrt kernel32 ntdll) +add_pch(winlogon winlogon.h) add_cd_file(TARGET winlogon DESTINATION reactos/system32 FOR all) diff --git a/base/system/winlogon/lang/pl-PL.rc b/base/system/winlogon/lang/pl-PL.rc index ebb5dca3660..63baec81b5d 100644 --- a/base/system/winlogon/lang/pl-PL.rc +++ b/base/system/winlogon/lang/pl-PL.rc @@ -1,46 +1,50 @@ -//Polish translation by Sebastian Gasiorek +/* + * translated by Sebastian Gasiorek + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_SHUTDOWNCOMPUTER DIALOGEX 45, 22, 164, 52 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Wyczanie komputera" +CAPTION "Wyłączanie komputera" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Mona bezpiecznie wyczy komputer.", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 + LTEXT "Można bezpiecznie wyłączyć komputer.", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 ICON IDI_WINLOGON, IDC_SHTDOWNICON, 6, 7, 18, 20 DEFPUSHBUTTON "&Uruchom ponownie", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 40, 14 END IDD_GINALOADFAILED DIALOGEX 58, 83, 231, 119 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Bd interfejsu uytkownika" +CAPTION "Błąd interfejsu użytkownika" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Nie mona zaadowa biblioteki DLL interfejsu logowania uytkownika %s.", IDC_GINALOADFAILED, 39, 16, 156, 24 - LTEXT "Skontaktuj si z administratorem systemu, aby zamieni bibliotek DLL lub odtworzy jej oryginaln wersj.", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 + LTEXT "Nie można załadować biblioteki DLL interfejsu logowania użytkownika %s.", IDC_GINALOADFAILED, 39, 16, 156, 24 + LTEXT "Skontaktuj się z administratorem systemu, aby zamienić bibliotekę DLL lub odtworzyć jej oryginalną wersję.", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 DEFPUSHBUTTON "&Uruchom ponownie", 1, 80, 91, 68, 14 END STRINGTABLE BEGIN - IDS_PREPARENETWORKCONNECTIONS "Trwa przygotowywanie pocze sieciowych..." - IDS_APPLYINGCOMPUTERSETTINGS "Trwa wprowadzanie ustawie komputera..." - IDS_RUNNINGSTARTUPSCRIPTS "Trwa uruchamianie skryptw uruchamiania..." - IDS_RUNNINGSHUTDOWNSCRIPTS "Trwa uruchamianie skryptw zamykania..." - IDS_APPLYINGYOURPERSONALSETTINGS "Trwa wprowadzanie ustawie osobistych..." - IDS_RUNNINGLOGOFFSCRIPTS "Trwa uruchamianie skryptw wylogowania..." - IDS_RUNNINGLOGONSCRIPTS "Trwa uruchamianie skryptw logowania..." - IDS_LOADINGYOURPERSONALSETTINGS "Trwa adowanie ustawie osobistych..." - IDS_CLOSINGNETWORKCONNECTIONS "Trwa zamykanie pocze sieciowych..." + IDS_PREPARENETWORKCONNECTIONS "Trwa przygotowywanie połączeń sieciowych..." + IDS_APPLYINGCOMPUTERSETTINGS "Trwa wprowadzanie ustawień komputera..." + IDS_RUNNINGSTARTUPSCRIPTS "Trwa uruchamianie skryptów startowych..." + IDS_RUNNINGSHUTDOWNSCRIPTS "Trwa uruchamianie skryptów zamykania..." + IDS_APPLYINGYOURPERSONALSETTINGS "Trwa wprowadzanie ustawień osobistych..." + IDS_RUNNINGLOGOFFSCRIPTS "Trwa uruchamianie skryptów wylogowania..." + IDS_RUNNINGLOGONSCRIPTS "Trwa uruchamianie skryptów logowania..." + IDS_LOADINGYOURPERSONALSETTINGS "Trwa ładowanie ustawień osobistych..." + IDS_CLOSINGNETWORKCONNECTIONS "Trwa zamykanie połączeń sieciowych..." IDS_REACTOSISSHUTTINGDOWN "Trwa zamykanie systemu ReactOS..." - IDS_PREPARETOSTANDBY "Trwa przygotowywanie do przejcia w stan wstrzymania..." + IDS_PREPARETOSTANDBY "Trwa przygotowywanie do przejścia w stan wstrzymania..." IDS_PREPARETOHIBERNATE "Trwa przygotowywanie do hibernacji..." - IDS_SAVEYOURSETTINGS "Trwa zapisywanie ustawie..." + IDS_SAVEYOURSETTINGS "Trwa zapisywanie ustawień..." IDS_REACTOSISSTARTINGUP "Trwa uruchamianie systemu ReactOS..." END STRINGTABLE BEGIN - IDS_FAILEDACTIVATEUSERSHELL "Winlogon nie mg aktywowa powoki uytkownika!" + IDS_FAILEDACTIVATEUSERSHELL "Winlogon nie mógł aktywować powłoki użytkownika!" END - diff --git a/base/system/winlogon/lang/ro-RO.rc b/base/system/winlogon/lang/ro-RO.rc index 5e754d609f7..3c8aa4cb575 100644 --- a/base/system/winlogon/lang/ro-RO.rc +++ b/base/system/winlogon/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_SHUTDOWNCOMPUTER DIALOGEX 45, 22, 164, 52 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Oprire computer" @@ -44,5 +42,3 @@ STRINGTABLE BEGIN IDS_FAILEDACTIVATEUSERSHELL "Winlogon nu a putut porni nucleul sistemului!" END - -#pragma code_page(default) diff --git a/base/system/winlogon/lang/ru-RU.rc b/base/system/winlogon/lang/ru-RU.rc index 8eeb400ea58..b79a032b255 100644 --- a/base/system/winlogon/lang/ru-RU.rc +++ b/base/system/winlogon/lang/ru-RU.rc @@ -2,44 +2,44 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_SHUTDOWNCOMPUTER DIALOGEX 45, 22, 164, 52 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Выключение компьютера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 + LTEXT "Теперь можно безопасно выключить компьютер.", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 ICON IDI_WINLOGON, IDC_SHTDOWNICON, 6, 7, 18, 20 - DEFPUSHBUTTON "&", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 40, 14 + DEFPUSHBUTTON "&Перезагрузка", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 40, 14 END IDD_GINALOADFAILED DIALOGEX 58, 83, 231, 119 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Ошибка загрузки интерфейса" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " DLL- %s.", IDC_GINALOADFAILED, 39, 16, 156, 24 - LTEXT " , DLL.", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 - DEFPUSHBUTTON "&", 1, 80, 91, 68, 14 + LTEXT "Невозможно загрузить DLL-библиотеку %s.", IDC_GINALOADFAILED, 39, 16, 156, 24 + LTEXT "Свяжитесь с системным администратором, чтобы заменить или восстановить оригинальный файл DLL.", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 + DEFPUSHBUTTON "&Перезагрузка", 1, 80, 91, 68, 14 END STRINGTABLE BEGIN - IDS_PREPARENETWORKCONNECTIONS " ..." - IDS_APPLYINGCOMPUTERSETTINGS " ..." - IDS_RUNNINGSTARTUPSCRIPTS " ..." - IDS_RUNNINGSHUTDOWNSCRIPTS " ..." - IDS_APPLYINGYOURPERSONALSETTINGS " ..." - IDS_RUNNINGLOGOFFSCRIPTS " ..." - IDS_RUNNINGLOGONSCRIPTS " ..." - IDS_LOADINGYOURPERSONALSETTINGS " ..." - IDS_CLOSINGNETWORKCONNECTIONS " ..." - IDS_REACTOSISSHUTTINGDOWN "ReactOS .." - IDS_PREPARETOSTANDBY " ..." - IDS_PREPARETOHIBERNATE " ..." - IDS_SAVEYOURSETTINGS " ..." - IDS_REACTOSISSTARTINGUP "ReactOS ..." + IDS_PREPARENETWORKCONNECTIONS "Подготавливаются сетевые подключения..." + IDS_APPLYINGCOMPUTERSETTINGS "Применяются настройки..." + IDS_RUNNINGSTARTUPSCRIPTS "Выполняются скрипты автозапуска..." + IDS_RUNNINGSHUTDOWNSCRIPTS "Выполняются скрипты выключения..." + IDS_APPLYINGYOURPERSONALSETTINGS "Применяются ваши персональные настройки..." + IDS_RUNNINGLOGOFFSCRIPTS "Выполняются скрипты выхода из системы..." + IDS_RUNNINGLOGONSCRIPTS "Выполняются скрипты входа в систему..." + IDS_LOADINGYOURPERSONALSETTINGS "Загружаются персональные настройки..." + IDS_CLOSINGNETWORKCONNECTIONS "Отключаются сетевые соединения..." + IDS_REACTOSISSHUTTINGDOWN "ReactOS завершает работу.." + IDS_PREPARETOSTANDBY "Подготовка к переходу в режим ожидания..." + IDS_PREPARETOHIBERNATE "Подготовка к переходу в спящий режим..." + IDS_SAVEYOURSETTINGS "Сохраняются настройки..." + IDS_REACTOSISSTARTINGUP "ReactOS загружается..." END STRINGTABLE BEGIN - IDS_FAILEDACTIVATEUSERSHELL "Winlogon !" + IDS_FAILEDACTIVATEUSERSHELL "Winlogon не может активировать пользовательский интерфейс!" END diff --git a/base/system/winlogon/lang/uk-UA.rc b/base/system/winlogon/lang/uk-UA.rc index 752f95d5989..cf1100d0861 100644 --- a/base/system/winlogon/lang/uk-UA.rc +++ b/base/system/winlogon/lang/uk-UA.rc @@ -2,44 +2,44 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_SHUTDOWNCOMPUTER DIALOGEX 45, 22, 164, 52 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " '" +CAPTION "Завершення роботи з комп'ютером" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " '.", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 + LTEXT "Тепер можна вимкнути комп'ютер.", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 ICON IDI_WINLOGON, IDC_SHTDOWNICON, 6, 7, 18, 20 - DEFPUSHBUTTON "&", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 40, 14 + DEFPUSHBUTTON "&Перезавантаження", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 40, 14 END IDD_GINALOADFAILED DIALOGEX 58, 83, 231, 119 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Помилка інтерфейсу користувача" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " %s.", IDC_GINALOADFAILED, 39, 16, 156, 24 - LTEXT " , .", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 - DEFPUSHBUTTON "&", 1, 80, 91, 68, 14 + LTEXT "Не вдалося завантажити бібліотеку інтерфейсу входу користувача %s.", IDC_GINALOADFAILED, 39, 16, 156, 24 + LTEXT "Зверніться до системного адміністратора щоб замінити наявну, або відновіть початкову бібліотеку.", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 + DEFPUSHBUTTON "&Перезавантаження", 1, 80, 91, 68, 14 END STRINGTABLE BEGIN - IDS_PREPARENETWORKCONNECTIONS "ϳ ..." - IDS_APPLYINGCOMPUTERSETTINGS " '..." - IDS_RUNNINGSTARTUPSCRIPTS " ..." - IDS_RUNNINGSHUTDOWNSCRIPTS " ..." - IDS_APPLYINGYOURPERSONALSETTINGS " ..." - IDS_RUNNINGLOGOFFSCRIPTS " ..." - IDS_RUNNINGLOGONSCRIPTS " ..." - IDS_LOADINGYOURPERSONALSETTINGS " ..." - IDS_CLOSINGNETWORKCONNECTIONS " ..." - IDS_REACTOSISSHUTTINGDOWN " ReactOS..." - IDS_PREPARETOSTANDBY "ϳ ..." - IDS_PREPARETOHIBERNATE "ϳ ..." - IDS_SAVEYOURSETTINGS " ..." - IDS_REACTOSISSTARTINGUP " ReactOS..." + IDS_PREPARENETWORKCONNECTIONS "Підготовка мережних підключень..." + IDS_APPLYINGCOMPUTERSETTINGS "Застосування параметрів комп'ютера..." + IDS_RUNNINGSTARTUPSCRIPTS "Виконання сценаріїв запуску..." + IDS_RUNNINGSHUTDOWNSCRIPTS "Виконання сценаріїв завершення роботи..." + IDS_APPLYINGYOURPERSONALSETTINGS "Застосування особистих параметрів..." + IDS_RUNNINGLOGOFFSCRIPTS "Виконання сценаріїв виходу із системи..." + IDS_RUNNINGLOGONSCRIPTS "Виконання сценаріїв входу до системи..." + IDS_LOADINGYOURPERSONALSETTINGS "Завантаження особистих параметрів..." + IDS_CLOSINGNETWORKCONNECTIONS "Закриття мережних підключень..." + IDS_REACTOSISSHUTTINGDOWN "Завершення роботи ReactOS..." + IDS_PREPARETOSTANDBY "Підготовка до режиму очікування..." + IDS_PREPARETOHIBERNATE "Підготовка до сплячого режиму..." + IDS_SAVEYOURSETTINGS "Збереження параметрів..." + IDS_REACTOSISSTARTINGUP "Запуск ReactOS..." END STRINGTABLE BEGIN - IDS_FAILEDACTIVATEUSERSHELL "Winlogon !" + IDS_FAILEDACTIVATEUSERSHELL "Winlogon не вдалося активувати оболонку користувача!" END diff --git a/base/system/winlogon/rsrc.rc b/base/system/winlogon/rsrc.rc index a0215dea7a9..c13a26b29e0 100644 --- a/base/system/winlogon/rsrc.rc +++ b/base/system/winlogon/rsrc.rc @@ -19,10 +19,13 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/lt-LT.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" +#include "lang/sv-SE.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sv-SE.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/base/system/winlogon/sas.c b/base/system/winlogon/sas.c index 11035c16d4e..3731a3588c6 100644 --- a/base/system/winlogon/sas.c +++ b/base/system/winlogon/sas.c @@ -25,6 +25,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(winlogon); #define HK_CTRL_ALT_DEL 0 #define HK_CTRL_SHIFT_ESC 1 +static BOOL inScrn = FALSE; + /* FUNCTIONS ****************************************************************/ static BOOL @@ -962,6 +964,28 @@ SASWindowProc( } break; } + case LN_START_SCREENSAVE: + { + BOOL bSecure = FALSE; + + if (inScrn) + break; + + inScrn = TRUE; + + // lParam 1 == Secure + if (lParam) + { + if (Session->Gina.Functions.WlxScreenSaverNotify(Session->Gina.Context, &bSecure)) + { + if (bSecure) DoGenericAction(Session, WLX_SAS_ACTION_LOCK_WKSTA); + } + } + + StartScreenSaver(Session); + inScrn = FALSE; + break; + } default: { ERR("WM_LOGONNOTIFY case %d is unimplemented\n", wParam); diff --git a/base/system/winlogon/screensaver.c b/base/system/winlogon/screensaver.c index 17423e58f37..ba3e8d04f2a 100644 --- a/base/system/winlogon/screensaver.c +++ b/base/system/winlogon/screensaver.c @@ -231,7 +231,7 @@ InitializeScreenSaver( if (ScreenSaverThread) CloseHandle(ScreenSaverThread); else - WARN("WL: Unable to start screen saver thread\n"); + ERR("WL: Unable to start screen saver thread\n"); return TRUE; } @@ -240,7 +240,7 @@ VOID StartScreenSaver( IN PWLSESSION Session) { - HKEY hKey = NULL; + HKEY hKey = NULL, hCurrentUser = NULL; WCHAR szApplicationName[MAX_PATH]; WCHAR szCommandLine[MAX_PATH + 3]; DWORD bufferSize = sizeof(szApplicationName) - sizeof(WCHAR); @@ -254,18 +254,30 @@ StartScreenSaver( if (!ImpersonateLoggedOnUser(Session->UserToken)) { - ERR("ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError()); + ERR("WL: ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError()); + goto cleanup; + } + + rc = RegOpenCurrentUser( + KEY_READ, + &hCurrentUser); + if (rc != ERROR_SUCCESS) + { + ERR("WL: RegOpenCurrentUser Error!\n"); goto cleanup; } rc = RegOpenKeyExW( - HKEY_CURRENT_USER, + hCurrentUser, L"Control Panel\\Desktop", 0, KEY_QUERY_VALUE, &hKey); if (rc != ERROR_SUCCESS) + { + ERR("WL: RegOpenKeyEx Error!\n"); goto cleanup; + } rc = RegQueryValueExW( hKey, @@ -275,15 +287,24 @@ StartScreenSaver( (LPBYTE)szApplicationName, &bufferSize); if (rc != ERROR_SUCCESS || dwType != REG_SZ) + { + ERR("WL: RegQueryValueEx Error!\n"); goto cleanup; + } if (bufferSize == 0) + { + ERR("WL: Buffer size is NULL!\n"); goto cleanup; + } szApplicationName[bufferSize / sizeof(WCHAR)] = 0; /* Terminate the string */ if (wcslen(szApplicationName) == 0) + { + ERR("WL: Application Name length is zero!\n"); goto cleanup; + } wsprintfW(szCommandLine, L"%s /s", szApplicationName); TRACE("WL: Executing %S\n", szCommandLine); @@ -291,6 +312,7 @@ StartScreenSaver( ZeroMemory(&StartupInfo, sizeof(STARTUPINFOW)); ZeroMemory(&ProcessInformation, sizeof(PROCESS_INFORMATION)); StartupInfo.cb = sizeof(STARTUPINFOW); + StartupInfo.dwFlags = STARTF_SCRNSAVER; /* FIXME: run the screen saver on the screen saver desktop */ ret = CreateProcessW( szApplicationName, @@ -305,7 +327,7 @@ StartScreenSaver( &ProcessInformation); if (!ret) { - WARN("WL: Unable to start %S, error %lu\n", szApplicationName, GetLastError()); + ERR("WL: Unable to start %S, error %lu\n", szApplicationName, GetLastError()); goto cleanup; } CloseHandle(ProcessInformation.hThread); @@ -330,6 +352,8 @@ cleanup: RevertToSelf(); if (hKey) RegCloseKey(hKey); + if (hCurrentUser) + RegCloseKey(hCurrentUser); if (!ret) { PostMessageW(Session->SASWindow, WLX_WM_SAS, WLX_SAS_TYPE_SCRNSVR_ACTIVITY, 0); diff --git a/boot/CMakeLists.txt b/boot/CMakeLists.txt index 3ab10be6768..3ae611023f8 100644 --- a/boot/CMakeLists.txt +++ b/boot/CMakeLists.txt @@ -9,6 +9,18 @@ add_custom_target(bootcd COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin ${CMAKE_CURRENT_BINARY_DIR}/bootcd REACTOS ${REACTOS_BINARY_DIR}/bootcd.iso VERBATIM) +##bootcdregtest +#clear it out +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.cmake + "file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest)\n") + +add_custom_target(bootcdregtest + ${CMAKE_COMMAND} -D CD_DIR=${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest + -P ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.cmake + COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isobtrt.bin ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest REACTOS ${REACTOS_BINARY_DIR}/bootcdregtest.iso + VERBATIM) + + ##livecd #clear it out file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake diff --git a/boot/bootdata/CMakeLists.txt b/boot/bootdata/CMakeLists.txt index edf577bdccb..85757698691 100644 --- a/boot/bootdata/CMakeLists.txt +++ b/boot/bootdata/CMakeLists.txt @@ -1,11 +1,11 @@ add_subdirectory(packages) -add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/txtsetup.sif DESTINATION reactos NO_CAB FOR bootcd) -add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivecls_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivecls.inf FOR bootcd) -add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivedef_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivedef.inf FOR bootcd) -add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesft_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesft.inf FOR bootcd) -add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesys_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesys.inf FOR bootcd) +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/txtsetup.sif DESTINATION reactos NO_CAB FOR bootcd regtest) +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivecls_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivecls.inf FOR bootcd regtest) +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivedef_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivedef.inf FOR bootcd regtest) +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesft_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesft.inf FOR bootcd regtest) +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesys_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesys.inf FOR bootcd regtest) # livecd hives list(APPEND CD_HIVES @@ -42,6 +42,10 @@ add_cd_file( add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/regtest.cmd DESTINATION reactos/bin FOR all) #freeldr.ini -add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR bootcd) +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR bootcd regtest) add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd.ini DESTINATION root NAME_ON_CD freeldr.ini FOR livecd) +#unattend +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/unattend.inf DESTINATION reactos NO_CAB FOR regtest) +#uncomment this for unattend bootcd +#add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd/unattend.inf DESTINATION reactos NO_CAB FOR bootcd) \ No newline at end of file diff --git a/boot/bootdata/bootcd.ini b/boot/bootdata/bootcd.ini index c0bbf70a9f2..46acdd31e3f 100644 --- a/boot/bootdata/bootcd.ini +++ b/boot/bootdata/bootcd.ini @@ -1,6 +1,6 @@ [FREELOADER] DefaultOS=Setup -Timeout=1 +Timeout=0 [Display] TitleText=ReactOS Setup @@ -21,10 +21,7 @@ SelectedColor=Gray [Operating Systems] Setup="Setup" -Setup_old="Setup (old boot method)" [Setup] BootType=ReactOSSetup2 -[Setup_old] -BootType=ReactOSSetup diff --git a/boot/bootdata/bootcd/unattend.inf b/boot/bootdata/bootcd/unattend.inf new file mode 100644 index 00000000000..d75a3258789 --- /dev/null +++ b/boot/bootdata/bootcd/unattend.inf @@ -0,0 +1,60 @@ +; In order to get unattended setup working: +; 1. Copy unattend.inf.sample to unattend.inf, adjust as needed +; 2. Uncomment the line in bootdata.rbuild to include it into bootcd + +[Unattend] +Signature = "$ReactOS$" + +; yes - unattend setup enabled +; no - unattend setup disabled +UnattendSetupEnabled = no + +; Install to \Device\Harddisk0\Partition1\ReactOS +DestinationDiskNumber = 0 +DestinationPartitionNumber = 1 +InstallationDirectory=ReactOS + +; MBRInstallType=0 skips MBR installation +; MBRInstallType=1 install MBR on floppy +; MBRInstallType=2 install MBR on hdd +MBRInstallType=2 + +FullName="MyName" +;OrgName="MyOrg" +ComputerName="MYCOMPUTERNAME"; +AdminPassword="MyPassword" + +; TimeZone is set GMT as default +TimeZoneIndex=85 + +; enable this setting to disable daylight saving changes +; DisableAutoDaylightTimeSet = 1 + +; enable this setting to format the selected partition +; 1 - format enabled +; 0 - format disabled +FormatPartition=1 + +; enable this setting to automatically create a partition +; during installation +; 1 - enabled +; 0 - disabled +AutoPartition = 1 + +; enable this setting to disable vmware driver install +; yes - disabled +; no - enabled +DisableVmwInst = yes + +; set this option to automatically +; specify language in 2nd mode setup +; see hivesys.inf for available languages +; LocaleID = 407 + + +; enable this section to automatically launch programs +; after 3rd boot +; +; [GuiRunOnce] +; %SystemRoot%\system32\cmd.exe + diff --git a/boot/bootdata/hivecls_i386.inf b/boot/bootdata/hivecls_i386.inf index 147f80d81de..4e53064dc58 100644 --- a/boot/bootdata/hivecls_i386.inf +++ b/boot/bootdata/hivecls_i386.inf @@ -318,6 +318,10 @@ HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}","",0x00000000,"Shell Drag an HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll" HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","ThreadingModel",0x00000000,"Apartment" +HKCR,"CLSID\{4622AD11-FF23-11D0-8D34-00A0C90F2719}","",0x00000000,"Shell Start Menu" +HKCR,"CLSID\{4622AD11-FF23-11D0-8D34-00A0C90F2719}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll" +HKCR,"CLSID\{4622AD11-FF23-11D0-8D34-00A0C90F2719}\InProcServer32","ThreadingModel",0x00000000,"Apartment" + ; Folder Options CPL HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}","",0x00000000,"Folder Options" HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-150" diff --git a/boot/bootdata/hivedef_i386.inf b/boot/bootdata/hivedef_i386.inf index b49f1ba038d..8e7b8329673 100644 Binary files a/boot/bootdata/hivedef_i386.inf and b/boot/bootdata/hivedef_i386.inf differ diff --git a/boot/bootdata/hivesft_i386.inf b/boot/bootdata/hivesft_i386.inf index b04af498659..95a72dc2d8f 100644 Binary files a/boot/bootdata/hivesft_i386.inf and b/boot/bootdata/hivesft_i386.inf differ diff --git a/boot/bootdata/hivesys_amd64.inf b/boot/bootdata/hivesys_amd64.inf index af890ec1b55..29619b41e70 100644 --- a/boot/bootdata/hivesys_amd64.inf +++ b/boot/bootdata/hivesys_amd64.inf @@ -8,6 +8,143 @@ HKLM,"SYSTEM\CurrentControlSet\Control","WaitToKillServiceTimeout",2,"20000" HKLM,"SYSTEM\CurrentControlSet\Control\Biosinfo","InfName",2,"biosinfo.inf" HKLM,"SYSTEM\CurrentControlSet\Control\PnP",,0x00000012 +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot","AlternateShell",2,"cmd.exe" + +; Safe Boot drivers +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\AppMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Base","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Boot Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Boot file system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\CryptSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\DcomLaunch","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmadmin","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmboot.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmio.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmload.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmserver","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\EventLog","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\File system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\HelpSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Netlogon","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\PCI Configuration","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\PlugPlay","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\PNP Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Primary disk","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\RpcSs","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\SCSI Class","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\sermouse.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\sr.sys","",0x00000000,"FSFilter System Recovery" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\SRService","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\System Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vga.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vgasave.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\WinMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{36FC9E60-C465-11CF-8056-444553540000}","",0x00000000,"Universal Serial Bus controllers" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E965-E325-11CE-BFC1-08002BE10318}","",0x00000000,"CD-ROM Drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E967-E325-11CE-BFC1-08002BE10318}","",0x00000000,"DiskDrive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E969-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Standard floppy disk controller" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E96A-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Hdc" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E96B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Keyboard" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E96F-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Mouse" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E977-E325-11CE-BFC1-08002BE10318}","",0x00000000,"PCMCIA Adapters" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E97B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"SCSIAdapter" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E97D-E325-11CE-BFC1-08002BE10318}","",0x00000000,"System" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E980-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Floppy disk drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{71A27CDD-812A-11D0-BEC7-08002BE2092F}","",0x00000000,"Volume" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}","",0x00000000,"Human Interface Devices" + +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\AFD","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\AppMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Base","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Boot Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Boot file system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Browser","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\CryptSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\DcomLaunch","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Dhcp","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmadmin","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmboot.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmio.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmload.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmserver","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\DnsCache","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\EventLog","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\File system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\HelpSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\ip6fw.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\ipnat.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\LanmanServer","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\LanmanWorkstation","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\LmHosts","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Messenger","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NDIS","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NDIS Wrapper","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Ndisuio","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetBIOS","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetBIOSGroup","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetBT","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetDDEGroup","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Netlogon","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetMan","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Network","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetworkProvider","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NtLmSsp","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PCI Configuration","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PlugPlay","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PNP Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PNP_TDI","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Primary disk","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdpcdd.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdpdd.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdpwd.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdsessmgr","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\RpcSs","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\SCSI Class","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\sermouse.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\SharedAccess","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\sr.sys","",0x00000000,"FSFilter System Recovery" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\SRService","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Streams Drivers","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\System Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Tcpip","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\TDI","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\tdpipe.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\tdtcp.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\termservice","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vga.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vgasave.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\WinMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\WZCSVC","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{36FC9E60-C465-11CF-8056-444553540000}","",0x00000000,"Universal Serial Bus controllers" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E965-E325-11CE-BFC1-08002BE10318}","",0x00000000,"CD-ROM Drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E967-E325-11CE-BFC1-08002BE10318}","",0x00000000,"DiskDrive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E969-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Standard floppy disk controller" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E96A-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Hdc" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E96B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Keyboard" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E96F-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Mouse" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Net" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E973-E325-11CE-BFC1-08002BE10318}","",0x00000000,"NetClient" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E974-E325-11CE-BFC1-08002BE10318}","",0x00000000,"NetService" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E975-E325-11CE-BFC1-08002BE10318}","",0x00000000,"NetTrans" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E977-E325-11CE-BFC1-08002BE10318}","",0x00000000,"PCMCIA Adapters" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E97B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"SCSIAdapter" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E97D-E325-11CE-BFC1-08002BE10318}","",0x00000000,"System" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E980-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Floppy disk drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{71A27CDD-812A-11D0-BEC7-08002BE2092F}","",0x00000000,"Volume" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}","",0x00000000,"Human Interface Devices" + +; ReactOS specific - required to load in Safe Mode and for debugging in Safe Mode (until vga.sys and vgasave.sys are implemented) +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Debug","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vgamp.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vbemp.sys","",0x00000000,"Driver" + +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Debug","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vgamp.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vbemp.sys","",0x00000000,"Driver" + +; Other HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","NtfsDisable8dot3NameCreation",0x00010003,0 HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Win31FileSystem",0x00010001,0 HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Win95TruncatedExtensions",0x00010001,1 @@ -1278,11 +1415,11 @@ HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSe HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.YResolution",0x00010001,480 ; USB uhci/ehci driver -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ErrorControl",0x00010001,0x00000000 -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Group",0x00000000,"Base" -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ImagePath",0x00020000,"system32\drivers\usbdriver.sys" -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Start",0x00010001,0x00000001 -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Type",0x00010001,0x00000001 +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ErrorControl",0x00010001,0x00000000 +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Group",0x00000000,"Base" +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ImagePath",0x00020000,"system32\drivers\usbdriver.sys" +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Start",0x00010001,0x00000001 +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Type",0x00010001,0x00000001 ; USB storage driver ;HKLM,"SYSTEM\CurrentControlSet\Services\usbstor","ErrorControl",0x00010001,0x00000000 diff --git a/boot/bootdata/hivesys_i386.inf b/boot/bootdata/hivesys_i386.inf index 3561a0d9bff..c660876dcde 100644 --- a/boot/bootdata/hivesys_i386.inf +++ b/boot/bootdata/hivesys_i386.inf @@ -7,6 +7,144 @@ HKLM,"SYSTEM\CurrentControlSet\Control","CurrentUser",2,"USERNAME" HKLM,"SYSTEM\CurrentControlSet\Control","WaitToKillServiceTimeout",2,"20000" HKLM,"SYSTEM\CurrentControlSet\Control\Biosinfo","InfName",2,"biosinfo.inf" HKLM,"SYSTEM\CurrentControlSet\Control\PnP",,0x00000012 + +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot","AlternateShell",2,"cmd.exe" + +; Safe Boot drivers +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\AppMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Base","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Boot Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Boot file system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\CryptSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\DcomLaunch","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmadmin","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmboot.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmio.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmload.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\dmserver","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\EventLog","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\File system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\HelpSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Netlogon","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\PCI Configuration","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\PlugPlay","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\PNP Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Primary disk","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\RpcSs","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\SCSI Class","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\sermouse.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\sr.sys","",0x00000000,"FSFilter System Recovery" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\SRService","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\System Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vga.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vgasave.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\WinMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{36FC9E60-C465-11CF-8056-444553540000}","",0x00000000,"Universal Serial Bus controllers" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E965-E325-11CE-BFC1-08002BE10318}","",0x00000000,"CD-ROM Drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E967-E325-11CE-BFC1-08002BE10318}","",0x00000000,"DiskDrive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E969-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Standard floppy disk controller" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E96A-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Hdc" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E96B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Keyboard" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E96F-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Mouse" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E977-E325-11CE-BFC1-08002BE10318}","",0x00000000,"PCMCIA Adapters" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E97B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"SCSIAdapter" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E97D-E325-11CE-BFC1-08002BE10318}","",0x00000000,"System" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{4D36E980-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Floppy disk drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{71A27CDD-812A-11D0-BEC7-08002BE2092F}","",0x00000000,"Volume" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}","",0x00000000,"Human Interface Devices" + +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\AFD","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\AppMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Base","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Boot Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Boot file system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Browser","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\CryptSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\DcomLaunch","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Dhcp","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmadmin","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmboot.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmio.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmload.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\dmserver","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\DnsCache","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\EventLog","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\File system","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\HelpSvc","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\ip6fw.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\ipnat.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\LanmanServer","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\LanmanWorkstation","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\LmHosts","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Messenger","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NDIS","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NDIS Wrapper","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Ndisuio","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetBIOS","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetBIOSGroup","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetBT","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetDDEGroup","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Netlogon","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetMan","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Network","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NetworkProvider","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\NtLmSsp","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PCI Configuration","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PlugPlay","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PNP Filter","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\PNP_TDI","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Primary disk","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdpcdd.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdpdd.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdpwd.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\rdsessmgr","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\RpcSs","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\SCSI Class","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\sermouse.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\SharedAccess","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\sr.sys","",0x00000000,"FSFilter System Recovery" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\SRService","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Streams Drivers","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\System Bus Extender","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Tcpip","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\TDI","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\tdpipe.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\tdtcp.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\termservice","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vga.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vgasave.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\WinMgmt","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\WZCSVC","",0x00000000,"Service" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{36FC9E60-C465-11CF-8056-444553540000}","",0x00000000,"Universal Serial Bus controllers" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E965-E325-11CE-BFC1-08002BE10318}","",0x00000000,"CD-ROM Drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E967-E325-11CE-BFC1-08002BE10318}","",0x00000000,"DiskDrive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E969-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Standard floppy disk controller" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E96A-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Hdc" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E96B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Keyboard" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E96F-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Mouse" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Net" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E973-E325-11CE-BFC1-08002BE10318}","",0x00000000,"NetClient" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E974-E325-11CE-BFC1-08002BE10318}","",0x00000000,"NetService" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E975-E325-11CE-BFC1-08002BE10318}","",0x00000000,"NetTrans" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E977-E325-11CE-BFC1-08002BE10318}","",0x00000000,"PCMCIA Adapters" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E97B-E325-11CE-BFC1-08002BE10318}","",0x00000000,"SCSIAdapter" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E97D-E325-11CE-BFC1-08002BE10318}","",0x00000000,"System" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{4D36E980-E325-11CE-BFC1-08002BE10318}","",0x00000000,"Floppy disk drive" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{71A27CDD-812A-11D0-BEC7-08002BE2092F}","",0x00000000,"Volume" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}","",0x00000000,"Human Interface Devices" + +; ReactOS specific - required to load in Safe Mode and for debugging in Safe Mode (until vga.sys and vgasave.sys are implemented) +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\Debug","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vgamp.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\vbemp.sys","",0x00000000,"Driver" + +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Debug","",0x00000000,"Driver Group" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vgamp.sys","",0x00000000,"Driver" +HKLM,"SYSTEM\CurrentControlSet\Control\SafeBoot\Network\vbemp.sys","",0x00000000,"Driver" + +; Other HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters",,0x00000012 HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters\AllocationOrder","Root",0x000a0001,\ @@ -1571,11 +1709,11 @@ HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSe HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.YResolution",0x00010001,480 ; USB uhci/ehci driver -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ErrorControl",0x00010001,0x00000000 -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Group",0x00000000,"Base" -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ImagePath",0x00020000,"system32\drivers\usbdriver.sys" -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Start",0x00010001,0x00000001 -HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Type",0x00010001,0x00000001 +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ErrorControl",0x00010001,0x00000000 +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Group",0x00000000,"Base" +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ImagePath",0x00020000,"system32\drivers\usbdriver.sys" +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Start",0x00010001,0x00000001 +;HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Type",0x00010001,0x00000001 ; USB storage driver ;HKLM,"SYSTEM\CurrentControlSet\Services\usbstor","ErrorControl",0x00010001,0x00000000 diff --git a/boot/bootdata/livecd.ini b/boot/bootdata/livecd.ini index e43dbf6ad53..03064868afe 100644 --- a/boot/bootdata/livecd.ini +++ b/boot/bootdata/livecd.ini @@ -21,14 +21,8 @@ SelectedColor=Gray [Operating Systems] ReactOS="ReactOS" -Reactos_old="ReactOS (old boot method)" [ReactOS] BootType=Windows2003 SystemPath=LiveCD\reactos Options=/DEBUGPORT=COM1 /SOS /MININT - -[Reactos_old] -BootType=ReactOS -SystemPath=LiveCD\reactos -Options=/DEBUGPORT=COM1 /SOS diff --git a/boot/bootdata/packages/CMakeLists.txt b/boot/bootdata/packages/CMakeLists.txt index 9f0ca7eac9a..8380f9b5616 100644 --- a/boot/bootdata/packages/CMakeLists.txt +++ b/boot/bootdata/packages/CMakeLists.txt @@ -26,20 +26,16 @@ add_custom_command( ) # And now we build reactos.cab + +# First we create reactos.inf add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -L ${CMAKE_CURRENT_BINARY_DIR} -I -P ${REACTOS_SOURCE_DIR} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -) -# add_custom_command( - # OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab - # COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -RC ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -L ${CMAKE_CURRENT_BINARY_DIR} -N -P ${REACTOS_SOURCE_DIR} - # DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -# ) + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff) -add_custom_target(reactos_cab - native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -RC ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -L ${CMAKE_CURRENT_BINARY_DIR} -N -P ${REACTOS_SOURCE_DIR} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf - VERBATIM) - -add_cd_file(TARGET reactos_cab FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf DESTINATION reactos NO_CAB FOR bootcd) +# Then we create the actual cab file using a custom target +add_custom_target(reactos_cab + COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -RC ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -L ${CMAKE_CURRENT_BINARY_DIR} -N -P ${REACTOS_SOURCE_DIR} + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf) + +add_cd_file(TARGET reactos_cab FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf DESTINATION reactos NO_CAB FOR bootcd regtest) diff --git a/boot/bootdata/txtsetup.sif b/boot/bootdata/txtsetup.sif index 183ee5b1089..b870d7afa93 100644 --- a/boot/bootdata/txtsetup.sif +++ b/boot/bootdata/txtsetup.sif @@ -40,8 +40,9 @@ scsiport.sys=,,,,,,x,,,,,,4 fastfat.sys=,,,,,,x,,,,,,4 ramdisk.sys=,,,,,,x,,,,,,4 ext2fs.sys=,,,,,,x,,,,,,4 -vgafonts.cab=,,,,,,,,,,,,1 classpnp.sys=,,,,,,,,,,,,4 +pciide.sys=,,,,,,,,,,,,4 +pciidex.sys=,,,,,,,,,,,,4 pcix.sys=,,,,,,,,,,,,4 pcmcia.sys=,,,,,,,,,,,,4 swenum.sys=,,,,,,,,,,,,4 @@ -53,12 +54,25 @@ ntdll.dll=,,,,,,,,,,,,2 *PNP0C08 = acpi ;PCI\CC_0601 = isapnp PCI\CC_0604 = pci +PCI\VEN_104B&CC_0100 = buslogic +PCI\CC_0101 = pciide +PCI\CC_0104 = uniata +PCI\CC_0105 = uniata +PCI\CC_0106 = uniata +*PNP0600 = uniata [BootBusExtenders.Load] acpi = acpi.sys pci = pci.sys isapnp = isapnp.sys +[BusExtenders.Load] +pciide = pciide.sys + +[SCSI.Load] +uniata = uniata.sys +buslogic = buslogic.sys + [Cabinets] Cabinet=reactos.cab diff --git a/boot/freeldr/bootsect/CMakeLists.txt b/boot/freeldr/bootsect/CMakeLists.txt index 406799a62bf..09674206eb8 100644 --- a/boot/freeldr/bootsect/CMakeLists.txt +++ b/boot/freeldr/bootsect/CMakeLists.txt @@ -1,14 +1,23 @@ -CreateBootSectorTarget(dosmbr ${CMAKE_CURRENT_SOURCE_DIR}/dosmbr.asm ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin) -CreateBootSectorTarget(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/ext2.asm ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin) -CreateBootSectorTarget(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/fat32.asm ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin) -CreateBootSectorTarget(fat ${CMAKE_CURRENT_SOURCE_DIR}/fat.asm ${CMAKE_CURRENT_BINARY_DIR}/fat.bin) -CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.asm ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin) -CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.asm ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin) +if(ARCH MATCHES i386 OR ARCH MATCHES amd64) + +CreateBootSectorTarget2(dosmbr ${CMAKE_CURRENT_SOURCE_DIR}/dosmbr.S ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin 7c00) +#CreateBootSectorTarget2(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/ext2.S ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin 0) +CreateBootSectorTarget2(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/fat32.S ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin 7c00) +CreateBootSectorTarget2(fat ${CMAKE_CURRENT_SOURCE_DIR}/fat.S ${CMAKE_CURRENT_BINARY_DIR}/fat.bin 7c00) +CreateBootSectorTarget2(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.S ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin 7000) +CreateBootSectorTarget2(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.S ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin 7000) add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR all) -add_cd_file(TARGET ext2 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin FOR all) add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR all) add_cd_file(TARGET fat DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat.bin FOR all) add_cd_file(TARGET isoboot DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin FOR all) -add_cd_file(TARGET isobtrt DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin FOR all) \ No newline at end of file +add_cd_file(TARGET isobtrt DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin FOR all) + +if(NOT MSVC) + CreateBootSectorTarget(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/ext2.asm ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin 0) + add_cd_file(TARGET ext2 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin FOR all) +endif() + +endif() + diff --git a/boot/freeldr/bootsect/dosmbr.S b/boot/freeldr/bootsect/dosmbr.S new file mode 100644 index 00000000000..49fce6338d8 --- /dev/null +++ b/boot/freeldr/bootsect/dosmbr.S @@ -0,0 +1,187 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Bootsector for ISO file system + * PURPOSE: Normal DOS boot sector + * Ported to nasm from FreeDOS fdisk 1.2.0 by: + * PROGRAMMERS: Casper Hornstrup (chorns@users.sourceforge.net) + */ + +/* INCLUDES ******************************************************************/ + +#include + +//----------------------------------------------------------------------- +// ENTRY (copied from freedos bootsector) +// +// IN: DL = boot drive +// OUT: DL = boot drive +// +//----------------------------------------------------------------------- + +.code16 +real_start: + cli + cld + xor ax, ax + mov ss, ax // initialize stack + mov ds, ax + mov bp, HEX(7c00) + lea sp, [bp-32] + sti + + /* Copy 512 bytes of MBR to 1fe0:7c00 */ + mov ax, HEX(1FE0) + mov es, ax + mov si, bp + mov di, bp + mov cx, 256 + rep movsw + + /* Jump into relocated code */ + ljmp16 HEX(1FE0), cont +cont: + + /* Setup segment registers */ + mov ds, ax + mov ss, ax + xor ax, ax + mov es, ax + + /* Search for active partition */ + lea di, [bp + HEX(1be)] // start of partition table +test_next_for_active: + test byte ptr ds:[di], HEX(80) + jne active_partition_found + add di, 16 // next table + cmp di, HEX(07c00) + HEX(1fe) // scanned beyond end of table ?? + jb test_next_for_active + +/*****************************************************************/ + call print + .asciz "no active partition found" + +WAIT_FOR_REBOOT: + jmp WAIT_FOR_REBOOT + + +/*****************************************************************/ +trouble_reading_drive: + call print + .asciz "read error while reading drive" + jmp WAIT_FOR_REBOOT + +/*****************************************************************/ + +invalid_partition_code: + call print + .asciz "partition signature != 55AA" + + jmp WAIT_FOR_REBOOT + +/*****************************************************************/ + +active_partition_found: +// call print +// .asciz "loading active partition" + + call read_boot_sector + + jc trouble_reading_drive + + cmp word ptr es:[HEX(7c00)+HEX(1fe)], HEX(0aa55) + jne invalid_partition_code + + ljmp16 0, HEX(7c00) // and jump to boot sector code + +/***************************** + * read_boot_sector + * + * IN: DI--> partition info + * OUT:CARRY + *****************************/ +read_boot_sector: + /* check for LBA support */ + mov bx, HEX(55aa) + mov ah, HEX(41) + int HEX(13) + + jc StandardBios // if (regs.b.x != 0xaa55 || (regs.flags & 0x01)) + cmp bx, HEX(0aa55) // goto StandardBios; + jne StandardBios + + /* if DAP cannot be used, don't use LBA + if ((regs.c.x & 1) == 0) + goto StandardBios; */ + test cl, 1 + jz StandardBios + + jmp short LBABios + + +_bios_LBA_address_packet: + .byte 16 + .byte 0 + .byte 4 // read four sectors - why not + .byte 0 + .word HEX(7c00) // fixed boot address for DOS sector + .word HEX(0000) + +_bios_LBA_low: + .word 0 +_bios_LBA_high: + .word 0 + .word 0,0 + + +LBABios: + // copy start address of partition to DAP + mov ax, [di + 8] + mov word ptr ds:[_bios_LBA_low], ax + mov ax,[di + 8 + 2] + mov word ptr ds:[_bios_LBA_high], ax + + mov ax, HEX(4200) // regs.a.x = LBA_READ; + mov si, offset _bios_LBA_address_packet // regs.si = FP_OFF(&dap); + + int HEX(13) + ret + +/***************************************************************** + * read disk, using standard BIOS + */ +StandardBios: + mov ax, HEX(0204) // regs.a.x = 0x0201; + mov bx, HEX(7c00) // regs.b.x = FP_OFF(buffer); + + /* regs.c.x = + ((chs.Cylinder & 0xff) << 8) + ((chs.Cylinder & 0x300) >> 2) + + ; chs.Sector; + that was easy ;-) */ + mov cx, word ptr ds:[di + 2] + mov dh, byte ptr ds:[di + 1] // regs.d.b.h = chs.Head; + // regs.es = FP_SEG(buffer); + int HEX(13) + ret + +/****** PRINT + * prints text after call to this function. + */ +print_1char: + xor bx, bx // video page 0 + mov ah, HEX(0E) // else print it + int HEX(10) // via TTY mode +print: + pop si // this is the first character +print1: + lodsb // get token + push si // stack up potential return address + cmp al, 0 // end of string? + jne print_1char // until done + ret // and jump to it + +.org 510 + .byte HEX(55), HEX(0aa) + +.endcode16 + +END diff --git a/boot/freeldr/bootsect/fat.S b/boot/freeldr/bootsect/fat.S new file mode 100644 index 00000000000..e9eb2ee8982 --- /dev/null +++ b/boot/freeldr/bootsect/fat.S @@ -0,0 +1,429 @@ +// FAT.ASM +// FAT12/16 Boot Sector +// Copyright (c) 1998, 2001, 2002 Brian Palmer + + + +// This is a FAT12/16 file system boot sector +// that searches the entire root directory +// for the file freeldr.sys and loads it into +// memory. +// +// The stack is set to 0000:7BF2 so that the first +// WORD pushed will be placed at 0000:7BF0 +// +// The DWORD at 0000:7BFC or BP-04h is the logical +// sector number of the start of the data area. +// +// The DWORD at 0000:7BF8 or BP-08h is the total +// sector count of the boot drive as reported by +// the computers bios. +// +// The WORD at 0000:7BF6 or BP-0ah is the offset +// of the ReadSectors function in the boot sector. +// +// The WORD at 0000:7BF4 or BP-0ch is the offset +// of the ReadCluster function in the boot sector. +// +// The WORD at 0000:7BF2 or BP-0eh is the offset +// of the PutChars function in the boot sector. +// +// When it locates freeldr.sys on the disk it will +// load the first sector of the file to 0000:8000 +// With the help of this sector we should be able +// to load the entire file off the disk, no matter +// how fragmented it is. +// +// We load the entire FAT table into memory at +// 7000:0000. This improves the speed of floppy disk +// boots dramatically. + +#include +#include "../freeldr/include/arch/pc/x86common.h" + +#define BP_REL(x) [bp+x-offset start] + +DataAreaStartHigh = 2 +DataAreaStartLow = 4 +BiosCHSDriveSizeHigh = 6 +BiosCHSDriveSizeLow = 8 +BiosCHSDriveSize = 8 +ReadSectorsOffset = 10 +ReadClusterOffset = 12 +PutCharsOffset = 14 +BootSectorStackTop = HEX(7c00) - 16 + + +// org 7c00h + +.code16 + +start: + jmp main + nop + +OEMName: + .ascii "FrLdr1.0" +BytesPerSector: + .word 512 +SectsPerCluster: + .byte 1 +ReservedSectors: + .word 1 +NumberOfFats: + .byte 2 +MaxRootEntries: + .word 224 +TotalSectors: + .word 2880 +MediaDescriptor: + .byte HEX(0f0) +SectorsPerFat: + .word 9 +SectorsPerTrack: + .word 18 +NumberOfHeads: + .word 2 +HiddenSectors: + .long 0 +TotalSectorsBig: + .long 0 +BootDrive: + .byte HEX(0ff) +Reserved: + .byte 0 +ExtendSig: + .byte HEX(29) +SerialNumber: + .long 00000000 +VolumeLabel: + .ascii "NO NAME " +FileSystem: + .ascii "FAT12 " + +main: + xor ax, ax + mov ss, ax + mov bp, HEX(7c00) + mov sp, BootSectorStackTop // Setup a stack + mov ds, ax // Make DS correct + mov es, ax // Make ES correct + + cmp byte ptr BP_REL(BootDrive), HEX(0ff) // If they have specified a boot drive then use it + jne GetDriveParameters + + mov byte ptr BP_REL(BootDrive), dl // Save the boot drive + + +GetDriveParameters: + mov ah, 8 + mov dl, byte ptr BP_REL(BootDrive) // Get boot drive in dl + int HEX(13) // Request drive parameters from the bios + jnc CalcDriveSize // If the call succeeded then calculate the drive size + + // If we get here then the call to the BIOS failed + // so just set CHS equal to the maximum addressable + // size + mov cx, HEX(0ffff) + mov dh, cl + +CalcDriveSize: + // Now that we have the drive geometry + // lets calculate the drive size + mov bl, ch // Put the low 8-bits of the cylinder count into BL + mov bh, cl // Put the high 2-bits in BH + shr bh, 6 // Shift them into position, now BX contains the cylinder count + and cl, HEX(3f) // Mask off cylinder bits from sector count + // CL now contains sectors per track and DH contains head count + movzx eax, dh // Move the heads into EAX + movzx ebx, bx // Move the cylinders into EBX + movzx ecx, cl // Move the sectors per track into ECX + inc eax // Make it one based because the bios returns it zero based + inc ebx // Make the cylinder count one based also + mul ecx // Multiply heads with the sectors per track, result in edx:eax + mul ebx // Multiply the cylinders with (heads * sectors) [stored in edx:eax already] + + // We now have the total number of sectors as reported + // by the bios in eax, so store it in our variable + mov dword ptr [bp - BiosCHSDriveSize], eax + + + // Now we must find our way to the first sector of the root directory + xor ax, ax + xor cx, cx + mov al, byte ptr BP_REL(NumberOfFats) // Number of fats + mul word ptr BP_REL(SectorsPerFat) // Times sectors per fat + add ax, word ptr BP_REL(HiddenSectors) + adc dx, word ptr BP_REL(HiddenSectors+2) // Add the number of hidden sectors + add ax, word ptr BP_REL(ReservedSectors) // Add the number of reserved sectors + adc dx, cx // Add carry bit + mov word ptr [bp - DataAreaStartLow], ax // Save the starting sector of the root directory + mov word ptr [bp - DataAreaStartHigh], dx // Save it in the first 4 bytes before the boot sector + mov si, word ptr BP_REL(MaxRootEntries) // Get number of root dir entries in SI + pusha // Save 32-bit logical start sector of root dir + // DX:AX now has the number of the starting sector of the root directory + + // Now calculate the size of the root directory + xor dx, dx + mov ax, 32 // Size of dir entry + mul si // Times the number of entries + mov bx, word ptr BP_REL(BytesPerSector) + add ax, bx + dec ax + div bx // Divided by the size of a sector + // AX now has the number of root directory sectors + + add word ptr [bp - DataAreaStartLow], ax // Add the number of sectors of the root directory to our other value + adc word ptr [bp - DataAreaStartHigh], cx // Now the first 4 bytes before the boot sector contain the starting sector of the data area + popa // Restore root dir logical sector start to DX:AX + +LoadRootDirSector: + mov bx, HEX(7e0) // We will load the root directory sector + mov es, bx // Right after the boot sector in memory + xor bx, bx // We will load it to [0000:7e00h] + xor cx, cx // Zero out CX + inc cx // Now increment it to 1, we are reading one sector + xor di, di // Zero out di + push es // Save ES because it will get incremented by 20h + call ReadSectors // Read the first sector of the root directory + pop es // Restore ES (ES:DI = 07E0:0000) + +SearchRootDirSector: + cmp byte ptr es:[di], ch // If the first byte of the directory entry is zero then we have + jz ErrBoot // reached the end of the directory and FREELDR.SYS is not here so reboot + pusha // Save all registers + mov cl, 11 // Put 11 in cl (length of filename in directory entry) + mov si, offset filename // Put offset of filename string in DS:SI + repe cmpsb // Compare this directory entry against 'FREELDR SYS' + popa // Restore all the registers + jz FoundFreeLoader // If we found it then jump + dec si // SI holds MaxRootEntries, subtract one + jz ErrBoot // If we are out of root dir entries then reboot + add di, 32 // Increment DI by the size of a directory entry + cmp di, HEX(0200) // Compare DI to 512 (DI has offset to next dir entry, make sure we haven't gone over one sector) + jc SearchRootDirSector // If DI is less than 512 loop again + jmp short LoadRootDirSector // Didn't find FREELDR.SYS in this directory sector, try again + +FoundFreeLoader: + // We found freeldr.sys on the disk + // so we need to load the first 512 + // bytes of it to 0000:F800 + // ES:DI has dir entry (ES:DI == 07E0:XXXX) + mov ax, word ptr es:[di + HEX(1a)] // Get start cluster + push ax // Save start cluster + push FREELDR_BASE / 16 // Put load segment on the stack and load it + pop es // Into ES so that we load the cluster at 0000:F800 + call ReadCluster // Read the cluster + pop ax // Restore start cluster of FreeLoader + + // Save the addresses of needed functions so + // the helper code will know where to call them. + mov word ptr [bp-ReadSectorsOffset], offset ReadSectors // Save the address of ReadSectors + mov word ptr [bp-ReadClusterOffset], offset ReadCluster // Save the address of ReadCluster + mov word ptr [bp-PutCharsOffset], offset PutChars // Save the address of PutChars + + // Now AX has start cluster of FreeLoader and we + // have loaded the helper code in the first 512 bytes + // of FreeLoader to 0000:F800. Now transfer control + // to the helper code. Skip the first three bytes + // because they contain a jump instruction to skip + // over the helper code in the FreeLoader image. + ljmp16 0, FREELDR_BASE + 3 + + + + +// Displays an error message +// And reboots +ErrBoot: + mov si, offset msgFreeLdr // FreeLdr not found message + call PutChars // Display it + +Reboot: +// mov si, offset msgAnyKey // Press any key message +// call PutChars // Display it + xor ax, ax + int HEX(16) // Wait for a keypress + int HEX(19) // Reboot + +PutChars: + lodsb + or al,al + jz short Done + mov ah, HEX(0e) + mov bx, 7 + int HEX(10) + jmp short PutChars +Done: + ret + +// Displays a bad boot message +// And reboots +BadBoot: + mov si, offset msgDiskError // Bad boot disk message + call PutChars // Display it + + jmp short Reboot + + +// Reads cluster number in AX into [ES:0000] +ReadCluster: + // StartSector = ((Cluster - 2) * SectorsPerCluster) + ReservedSectors + HiddenSectors; + dec ax // Adjust start cluster by 2 + dec ax // Because the data area starts on cluster 2 + xor ch, ch + mov cl, byte ptr BP_REL(SectsPerCluster) + mul cx // Times sectors per cluster + add ax, [bp-DataAreaStartLow] // Add start of data area + adc dx, [bp-DataAreaStartHigh] // Now we have DX:AX with the logical start sector of OSLOADER.SYS + xor bx, bx // We will load it to [ES:0000], ES loaded before function call + //mov cl,BYTE [BYTE bp+SectsPerCluster]// Sectors per cluster still in CX + //call ReadSectors + //ret + + + +// Reads logical sectors into [ES:BX] +// DX:AX has logical sector number to read +// CX has number of sectors to read +ReadSectors: + + // We can't just check if the start sector is + // in the BIOS CHS range. We have to check if + // the start sector + length is in that range. + pusha + dec cx + add ax, cx + adc dx, 0 + + cmp dx, word ptr [bp-BiosCHSDriveSizeHigh] // Check if they are reading a sector within CHS range + ja ReadSectorsLBA // No - go to the LBA routine + jb ReadSectorsCHS // Yes - go to the old CHS routine + cmp ax, word ptr [bp-BiosCHSDriveSizeLow] // Check if they are reading a sector within CHS range + jbe ReadSectorsCHS // Yes - go to the old CHS routine + +ReadSectorsLBA: + popa +ReadSectorsLBALoop: + pusha // Save logical sector number & sector count + + push 0 + push 0 + push dx // Put 64-bit logical + push ax // block address on stack + push es // Put transfer segment on stack + push bx // Put transfer offset on stack + push 1 // Set transfer count to 1 sector + push HEX(10) // Set size of packet to 10h + mov si,sp // Setup disk address packet on stack + +// We are so totally out of space here that I am forced to +// comment out this very beautifully written piece of code +// It would have been nice to have had this check... +//CheckInt13hExtensions: // Now make sure this computer supports extended reads +// mov ah,0x41 // AH = 41h +// mov bx,0x55aa // BX = 55AAh +// mov dl,[BYTE bp+BootDrive] // DL = drive (80h-FFh) +// int 13h // IBM/MS INT 13 Extensions - INSTALLATION CHECK +// jc PrintDiskError // CF set on error (extensions not supported) +// cmp bx,0xaa55 // BX = AA55h if installed +// jne PrintDiskError +// test cl,1 // CX = API subset support bitmap +// jz PrintDiskError // Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported + + + // Good, we're here so the computer supports LBA disk access + // So finish the extended read + mov dl, byte ptr BP_REL(BootDrive) // Drive number + mov ah, HEX(42) // Int 13h, AH = 42h - Extended Read + int HEX(13) // Call BIOS + jc BadBoot // If the read failed then abort + + add sp, 16 // Remove disk address packet from stack + + popa // Restore sector count & logical sector number + + inc ax // Increment Sector to Read + adc dx, 0 + + push bx + mov bx, es + add bx, HEX(20) // Increment read buffer for next sector + mov es, bx + pop bx + + loop ReadSectorsLBALoop // Read next sector + + ret + + +// Reads logical sectors into [ES:BX] +// DX:AX has logical sector number to read +// CX has number of sectors to read +// CarryFlag set on error +ReadSectorsCHS: + popa +ReadSectorsCHSLoop: + pusha + xchg ax, cx + xchg ax, dx + xor dx, dx + div word ptr BP_REL(SectorsPerTrack) + xchg ax, cx + div word ptr BP_REL(SectorsPerTrack) // Divide logical by SectorsPerTrack + inc dx // Sectors numbering starts at 1 not 0 + xchg cx, dx + div word ptr BP_REL(NumberOfHeads) // Number of heads + mov dh, dl // Head to DH, drive to DL + mov dl, byte ptr BP_REL(BootDrive) // Drive number + mov ch, al // Cylinder in CX + ror ah, 2 // Low 8 bits of cylinder in CH, high 2 bits + // in CL shifted to bits 6 & 7 + or cl, ah // Or with sector number + mov ax, HEX(0201) + int HEX(13) // DISK - READ SECTORS INTO MEMORY + // AL = number of sectors to read, CH = track, CL = sector + // DH = head, DL = drive, ES:BX -> buffer to fill + // Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read + + jc BadBoot + + popa + inc ax //Increment Sector to Read + jnz NoCarryCHS + inc dx + + +NoCarryCHS: + push bx + mov bx, es + add bx, HEX(20) + mov es, bx + pop bx + // Increment read buffer for next sector + loop ReadSectorsCHSLoop // Read next sector + + ret + + +msgDiskError: + .ascii "Disk error", CR, LF, NUL +msgFreeLdr: + .ascii "ldr not found", CR, LF, NUL +// Sorry, need the space... +//msgAnyKey: +// .ascii "Press any key to restart", CR, LF, NUL +filename: + .ascii "FREELDR SYS" + + .org 509 // Pad to 509 bytes + +BootPartition: + .byte 0 + +BootSignature: + .word HEX(0aa55) // BootSector signature + +.endcode16 + +END diff --git a/boot/freeldr/bootsect/fat32.S b/boot/freeldr/bootsect/fat32.S new file mode 100644 index 00000000000..96ff1880564 --- /dev/null +++ b/boot/freeldr/bootsect/fat32.S @@ -0,0 +1,540 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Bootsector + * FILE: + * PURPOSE: + * PROGRAMMERS: ? + */ + +/* INCLUDES ******************************************************************/ + +#include +#include "../freeldr/include/arch/pc/x86common.h" + +#define BP_REL(x) [bp+x-offset start] + +.code16 + +//ORG HEX(7c00) + +start: + jmp short main + nop + +OEMName: + .ASCII "FrLdr1.0" +BytesPerSector: + .word 512 +SectsPerCluster: + .byte 0 +ReservedSectors: + .word 32 +NumberOfFats: + .byte 2 +MaxRootEntries: + .word 0 // Always zero for FAT32 volumes +TotalSectors: + .word 0 // Always zero for FAT32 volumes +MediaDescriptor: + .byte HEX(0f8) +SectorsPerFat: + .word 0 // Always zero for FAT32 volumes +SectorsPerTrack: + .word 0 +NumberOfHeads: + .word 0 +HiddenSectors: + .long 0 +TotalSectorsBig: + .long 0 + +// FAT32 Inserted Info +SectorsPerFatBig: + .long 0 +ExtendedFlags: + .word 0 +FSVersion: + .word 0 +RootDirStartCluster: + .long 0 +FSInfoSector: + .word 0 +BackupBootSector: + .word 6 +Reserved1: + .byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +// End FAT32 Inserted Info +BootDrive: + .byte 0 +Reserved: + .byte 0 +ExtendSig: + .byte HEX(29) +SerialNumber: + .long 0 +VolumeLabel: + .ascii "NO NAME " +FileSystem: + .ascii "FAT32 " + +main: + xor ax,ax // Setup segment registers + mov ds,ax // Make DS correct + mov es,ax // Make ES correct + mov ss,ax // Make SS correct + mov bp, HEX(7c00) + mov sp, HEX(7c00) // Setup a stack + + cmp byte ptr BP_REL(BootDrive), HEX(0ff) // If they have specified a boot drive then use it + jne CheckSectorsPerFat + + mov byte ptr BP_REL(BootDrive), dl // Save the boot drive + +CheckSectorsPerFat: + + cmp word ptr BP_REL(SectorsPerFat), 0 // Check the old 16-bit value of SectorsPerFat + jnz CheckFailed // If it is non-zero then exit with an error +CheckTotalSectors: // Check the old 16-bit value of TotalSectors & MaxRootEntries + cmp dword ptr BP_REL(MaxRootEntries), 0// by comparing the DWORD at offset MaxRootEntries to zero + jnz CheckFailed // If it is non-zero then exit with an error +CheckFileSystemVersion: + cmp word ptr BP_REL(FSVersion), 0 // Check the file system version word + jna GetDriveParameters // It is zero, so continue +CheckFailed: + jmp PrintFileSystemError // If it is not zero then exit with an error + +GetDriveParameters: + mov ax, HEX(0800) + mov dl, byte ptr BP_REL(BootDrive) // Get boot drive in dl + int HEX(13) // Request drive parameters from the bios + jnc CalcDriveSize // If the call succeeded then calculate the drive size + + // If we get here then the call to the BIOS failed + // so just set CHS equal to the maximum addressable + // size + mov cx, HEX(0ffff) + mov dh, cl + +CalcDriveSize: + // Now that we have the drive geometry + // lets calculate the drive size + mov bl, ch // Put the low 8-bits of the cylinder count into BL + mov bh, cl // Put the high 2-bits in BH + shr bh, 6 // Shift them into position, now BX contains the cylinder count + and cl, HEX(3f) // Mask off cylinder bits from sector count + // CL now contains sectors per track and DH contains head count + movzx eax, dh // Move the heads into EAX + movzx ebx, bx // Move the cylinders into EBX + movzx ecx, cl // Move the sectors per track into ECX + inc eax // Make it one based because the bios returns it zero based + inc ebx // Make the cylinder count one based also + mul ecx // Multiply heads with the sectors per track, result in edx:eax + mul ebx // Multiply the cylinders with (heads * sectors) [stored in edx:eax already] + + // We now have the total number of sectors as reported + // by the bios in eax, so store it in our variable + mov dword ptr ds:[BiosCHSDriveSize], eax + +LoadExtraBootCode: + // First we have to load our extra boot code at + // sector 14 into memory at [0000:7e00h] + mov eax, HEX(0e) + add eax, dword ptr BP_REL(HiddenSectors) // Add the number of hidden sectors + mov cx, 1 + xor bx, bx + mov es, bx // Read sector to [0000:7e00h] + mov bx, HEX(7e00) + call ReadSectors + jmp StartSearch + + +// Reads logical sectors into [ES:BX] +// EAX has logical sector number to read +// CX has number of sectors to read +ReadSectors: + push es + cmp eax, dword ptr ds:[BiosCHSDriveSize] // Check if they are reading a sector outside CHS range + jae ReadSectorsLBA // Yes - go to the LBA routine + // If at all possible we want to use LBA routines because + // They are optimized to read more than 1 sector per read + + pushad // Save logical sector number & sector count + +CheckInt13hExtensions: // Now check if this computer supports extended reads + mov ah, HEX(41) // AH = 41h + mov bx, HEX(55aa) // BX = 55AAh + mov dl, byte ptr BP_REL(BootDrive) // DL = drive (80h-FFh) + int HEX(13) // IBM/MS INT 13 Extensions - INSTALLATION CHECK + jc ReadSectorsCHS // CF set on error (extensions not supported) + cmp bx, HEX(0aa55) // BX = AA55h if installed + jne ReadSectorsCHS + test cl,1 // CX = API subset support bitmap + jz ReadSectorsCHS // Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported + + popad // Restore sector count & logical sector number + +ReadSectorsLBA: + pushad // Save logical sector number & sector count + + cmp cx, 64 // Since the LBA calls only support 0x7F sectors at a time we will limit ourselves to 64 + jbe ReadSectorsSetupDiskAddressPacket // If we are reading less than 65 sectors then just do the read + mov cx, 64 // Otherwise read only 64 sectors on this loop iteration + +ReadSectorsSetupDiskAddressPacket: + mov word ptr ds:[LBASectorsRead],cx + push 0 + push 0 + push eax // Put 64-bit logical block address on stack + push es // Put transfer segment on stack + push bx // Put transfer offset on stack + push cx // Set transfer count + push 16 // Set size of packet to 10h + mov si, sp // Setup disk address packet on stack + + mov dl, byte ptr BP_REL(BootDrive) // Drive number + mov ah, HEX(42) // Int 13h, AH = 42h - Extended Read + int HEX(13) // Call BIOS + jc PrintDiskError // If the read failed then abort + + add sp, 16 // Remove disk address packet from stack + + popad // Restore sector count & logical sector number + + push bx + mov ebx, dword ptr ds:[LBASectorsRead] + add eax, ebx // Increment sector to read + shl ebx, 5 + mov dx, es + add dx, bx // Setup read buffer for next sector + mov es, dx + pop bx + + sub cx, word ptr ds:[LBASectorsRead] + jnz ReadSectorsLBA // Read next sector + + pop es + ret + +LBASectorsRead: + .long 0 + + +// Reads logical sectors into [ES:BX] +// EAX has logical sector number to read +// CX has number of sectors to read +ReadSectorsCHS: + popad // Get logical sector number & sector count off stack + +ReadSectorsCHSLoop: + pushad + xor edx, edx + movzx ecx, word ptr BP_REL(SectorsPerTrack) + div ecx // Divide logical by SectorsPerTrack + inc dl // Sectors numbering starts at 1 not 0 + mov cl, dl // Sector in CL + mov edx, eax + shr edx, 16 + div word ptr BP_REL(NumberOfHeads) // Divide logical by number of heads + mov dh, dl // Head in DH + mov dl, byte ptr BP_REL(BootDrive) // Drive number in DL + mov ch, al // Cylinder in CX + ror ah, 1 // Low 8 bits of cylinder in CH, high 2 bits + ror ah, 1 // in CL shifted to bits 6 & 7 + or cl, ah // Or with sector number + mov ax, HEX(0201) + int HEX(13) // DISK - READ SECTORS INTO MEMORY + // AL = number of sectors to read, CH = track, CL = sector + // DH = head, DL = drive, ES:BX -> buffer to fill + // Return: CF set on error, AH = status (see AH=01h), AL = number of sectors read + + jc PrintDiskError // If the read failed then abort + + popad + + inc eax // Increment Sector to Read + + mov dx, es + add dx, 32 // Increment read buffer for next sector + mov es, dx + + loop ReadSectorsCHSLoop // Read next sector + + ret + +// Displays a disk error message +// And reboots +PrintDiskError: + mov si, offset msgDiskError // Bad boot disk message + call PutChars // Display it + + jmp Reboot + +// Displays a file system error message +// And reboots +PrintFileSystemError: + mov si, offset msgFileSystemError // FreeLdr not found message + call PutChars // Display it + +Reboot: + mov si, offset msgAnyKey // Press any key message + call PutChars // Display it + xor ax, ax + int HEX(16) // Wait for a keypress + int HEX(19) // Reboot + +PutChars: + lodsb + or al, al + jz short Done + mov ah, HEX(0e) + mov bx, 7 + int HEX(10) + jmp short PutChars +Done: + ret + + +BiosCHSDriveSize: + .long 0 + +msgDiskError: + .ascii "Disk error", CR, LF, NUL +msgFileSystemError: + .ascii "File system error", CR, LF, NUL +msgAnyKey: + .ascii "Press any key to restart", CR, LF, NUL + +.org 509 // Pad to 509 bytes + +BootPartition: + .byte 0 + +BootSignature: + .word HEX(0aa55) // BootSector signature + +// End of bootsector +// +// Now starts the extra boot code that we will store +// at sector 14 on a FAT32 volume +// +// To remain multi-boot compatible with other operating +// systems we must not overwrite anything other than +// the bootsector which means we will have to use +// a different sector like 14 to store our extra boot code + + + +StartSearch: + + // Now we must get the first cluster of the root directory + mov eax, dword ptr BP_REL(RootDirStartCluster) + cmp eax, HEX(0ffffff8) // Check to see if this is the last cluster in the chain + jb ContinueSearch // If not continue, if so then we didn't find freeldr.sys + jmp PrintFileNotFound + +ContinueSearch: + mov bx, HEX(2000) + mov es, bx // Read cluster to [2000:0000h] + call ReadCluster // Read the cluster + + // Now we have to find our way through the root directory to + // The OSLOADER.SYS file + xor bx,bx + mov bl, byte ptr BP_REL(SectsPerCluster) + shl bx, 4 // BX = BX * 512 / 32 + mov ax, HEX(2000) // We loaded at 2000:0000 + mov es, ax + xor di, di + mov si, offset filename + mov cx, 11 + repe cmpsb // Compare filenames + jz FoundFile // If same we found it + dec bx + jnz FindFile + jmp PrintFileNotFound + +FindFile: + mov ax, es // We didn't find it in the previous dir entry + add ax, 2 // So lets move to the next one + mov es, ax // And search again + xor di, di + mov si, offset filename + mov cx, 11 + repe cmpsb // Compare filenames + jz FoundFile // If same we found it + dec bx // Keep searching till we run out of dir entries + jnz FindFile // Last entry? + + // Get the next root dir cluster and try again until we run out of clusters + mov eax, dword ptr BP_REL(RootDirStartCluster) + call GetFatEntry + mov dword ptr BP_REL(RootDirStartCluster), eax + jmp StartSearch + +FoundFile: + // Display "Loading FreeLoader..." message + mov si, offset msgLoading // Loading message + call PutChars // Display it + + xor di, di // ES:DI has dir entry + xor dx, dx + mov ax, word ptr es:[di+20] // Get start cluster high word + shl eax, 16 + mov ax, word ptr es:[di+26] // Get start cluster low word + +CheckStartCluster: + cmp eax, 2 // Check and see if the start cluster starts at cluster 2 or above + jnb CheckEndCluster // If so then continue + jmp PrintFileSystemError // If not exit with error +CheckEndCluster: + cmp eax, HEX(0ffffff8) // Check and see if the start cluster is and end of cluster chain indicator + jb InitializeLoadSegment // If not then continue + jmp PrintFileSystemError // If so exit with error + +InitializeLoadSegment: + mov bx, FREELDR_BASE / 16 + mov es, bx + +LoadFile: + cmp eax, HEX(0ffffff8) // Check to see if this is the last cluster in the chain + jae LoadFileDone // If so continue, if not then read the next one + push eax + xor bx, bx // Load ROSLDR starting at 0000:8000h + push es + call ReadCluster + pop es + + xor bx, bx + mov bl, byte ptr BP_REL(SectsPerCluster) + shl bx, 5 // BX = BX * 512 / 16 + mov ax, es // Increment the load address by + add ax, bx // The size of a cluster + mov es, ax + + pop eax + push es + call GetFatEntry // Get the next entry + pop es + + jmp LoadFile // Load the next cluster (if any) + +LoadFileDone: + mov dl, byte ptr BP_REL(BootDrive) // Load boot drive into DL + mov dh, byte ptr ds:[BootPartition] // Load boot partition into DH + + /* Transfer execution to the bootloader */ + ljmp16 0, FREELDR_BASE + +// Returns the FAT entry for a given cluster number +// On entry EAX has cluster number +// On return EAX has FAT entry for that cluster +GetFatEntry: + + shl eax, 2 // EAX = EAX * 4 (since FAT32 entries are 4 bytes) + mov ecx, eax // Save this for later in ECX + xor edx, edx + movzx ebx, word ptr BP_REL(BytesPerSector) + push ebx + div ebx // FAT Sector Number = EAX / BytesPerSector + movzx ebx, word ptr BP_REL(ReservedSectors) + add eax, ebx // FAT Sector Number += ReservedSectors + mov ebx, dword ptr BP_REL(HiddenSectors) + add eax, ebx // FAT Sector Number += HiddenSectors + pop ebx + dec ebx + and ecx,ebx // FAT Offset Within Sector = ECX % BytesPerSector + // EAX holds logical FAT sector number + // ECX holds FAT entry offset + + // Now we have to check the extended flags + // to see which FAT is the active one + // and use it, or if they are mirrored then + // no worries + movzx ebx, word ptr BP_REL(ExtendedFlags) // Get extended flags and put into ebx + and bx, HEX(0f) // Mask off upper 8 bits, now we have active fat in bl + jz LoadFatSector // If fat is mirrored then skip fat calcs + cmp bl, byte ptr BP_REL(NumberOfFats) // Compare bl to number of fats + jb GetActiveFatOffset + jmp PrintFileSystemError // If bl is bigger than numfats exit with error +GetActiveFatOffset: + push eax // Save logical FAT sector number + mov eax, dword ptr BP_REL(SectorsPerFatBig) // Get the number of sectors occupied by one fat in eax + mul ebx // Multiplied by the active FAT index we have in ebx + pop edx // Get logical FAT sector number + add eax, edx // Add the current FAT sector offset + +LoadFatSector: + push ecx + + mov bx, HEX(9000) // We will load it to [9000:0000h] + mov es, bx + + // EAX holds logical FAT sector number + // Check if we have already loaded it + cmp eax, dword ptr ds:[FatSectorInCache] + je LoadFatSectorAlreadyLoaded + + mov dword ptr ds:[FatSectorInCache], eax + xor bx, bx + mov cx, 1 + call ReadSectors + +LoadFatSectorAlreadyLoaded: + pop ecx + mov eax, dword ptr es:[ecx] // Get FAT entry + and eax, HEX(0fffffff) // Mask off reserved bits + + ret + +FatSectorInCache: // This variable tells us which sector we currently have in memory + .long HEX(0ffffffff) // There is no need to re-read the same sector if we don't have to + + +// Reads cluster number in EAX into [ES:0000] +ReadCluster: + // StartSector = ((Cluster - 2) * SectorsPerCluster) + ReservedSectors + HiddenSectors// + + dec eax + dec eax + xor edx, edx + movzx ebx, byte ptr BP_REL(SectsPerCluster) + mul ebx + push eax + xor edx, edx + movzx eax, byte ptr BP_REL(NumberOfFats) + mul dword ptr BP_REL(SectorsPerFatBig) + movzx ebx, word ptr BP_REL(ReservedSectors) + add eax, ebx + add eax, dword ptr BP_REL(HiddenSectors) + pop ebx + add eax, ebx // EAX now contains the logical sector number of the cluster + xor bx, bx // We will load it to [ES:0000], ES loaded before function call + movzx cx, byte ptr BP_REL(SectsPerCluster) + call ReadSectors + ret + +// Displays a file not found error message +// And reboots +PrintFileNotFound: + mov si, offset msgFreeLdr // FreeLdr not found message + call PutChars // Display it + mov si, offset msgAnyKey // Press any key message + call PutChars // Display it + + jmp Reboot + +msgFreeLdr: + .ascii "freeldr.sys not found", CR, LF, NUL +filename: + .ascii "FREELDR SYS" +msgLoading: + .ascii "Loading FreeLoader...", CR, LF, NUL + +.org 1022 // Pad to 1022 bytes + + .word HEX(0aa55) // BootSector signature + +.endcode16 + +END diff --git a/boot/freeldr/bootsect/isoboot.S b/boot/freeldr/bootsect/isoboot.S new file mode 100644 index 00000000000..7feb495c179 --- /dev/null +++ b/boot/freeldr/bootsect/isoboot.S @@ -0,0 +1,1072 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Bootsector for ISO file system + * FILE: + * PURPOSE: + * PROGRAMMERS: ? + */ + +/* INCLUDES ******************************************************************/ + +#include +#include "../freeldr/include/arch/pc/x86common.h" + +.code16 + +// **************************************************************************** +// +// isolinux.asm +// +// A program to boot Linux kernels off a CD-ROM using the El Torito +// boot standard in "no emulation" mode, making the entire filesystem +// available. It is based on the SYSLINUX boot loader for MS-DOS +// floppies. +// +// Copyright (C) 1994-2001 H. Peter Anvin +// +// 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, Inc., 675 Mass Ave, Cambridge MA 02139, +// USA; either version 2 of the License, or (at your option) any later +// version; incorporated herein by reference. +// +// **************************************************************************** +// +// THIS FILE IS A MODIFIED VERSION OF ISOLINUX.ASM +// MODIFICATION DONE BY MICHAEL K TER LOUW +// LAST UPDATED 3-9-2002 +// SEE "COPYING" FOR INFORMATION ABOUT THE LICENSE THAT APPLIES TO THIS RELEASE +// +// **************************************************************************** +// +// This file is a modified version of ISOLINUX.ASM. +// Modification done by Eric Kohl +// Last update 04-25-2002 +// +// **************************************************************************** + +//#define DEBUG_MESSAGES /* Uncomment to get debugging messages */ +#ifndef ROS_REGTEST +#define WAIT_FOR_KEY +#endif + +// **************************************************************************** +// BEGIN THE BIOS/CODE/DATA SEGMENT +// **************************************************************************** +serial_base = HEX(0400) // Base addresses for 4 serial ports (4 words) +BIOS_fbm = HEX(0413) // Free Base Memory (kilobytes) (1 word) +BIOS_timer = HEX(046C) // Timer ticks (1 word) +BIOS_magic = HEX(0472) // BIOS reset magic (1 word) +BIOS_vidrows = HEX(0484) // Number of screen rows (1 byte) + +// Memory below this point is reserved for the BIOS and the MBR +trackbuf = HEX(1000) // Track buffer goes here (8192 bytes) +trackbufsize = 8192 // trackbuf ends at 3000h + +// struct open_file_t +file_sector = 0 // Sector pointer (0 = structure free) +file_left = 4 // Number of sectors left + +//struct dir_t +dir_lba = 0 // Directory start (LBA) +dir_len = 4 // Length in bytes +dir_clust = 8 // Length in clusters + +#define dir_t_size 12 +#define open_file_t_size 8 + +MAX_OPEN_LG2 = 2 // log2(Max number of open files) +MAX_OPEN = 4 +SECTORSIZE_LG2 = 11 // 2048 bytes/sector (El Torito requirement) +SECTORSIZE = 2048 +retry_count = 6 // How patient are we with the BIOS? + +/******************************************************************************/ +absolute HEX(5000) // Here we keep our BSS stuff + +resb DriveNo, 1 // CD-ROM BIOS drive number (BYTE) +resb DiskError, 1 // Error code for disk I/O (BYTE) +resb RetryCount, 1 // Used for disk access retries (BYTE) +resb TimeoutCount, 1 // Timeout counter (BYTE) +resb ISOFlags, 1 // Flags for ISO directory search (BYTE) +resb RootDir, dir_t_size // Root directory (dir_t_size BYTES) +resb CurDir, dir_t_size // Current directory (dir_t_size BYTES) +resb ISOFileName, 64 // ISO filename canonicalization buffer +resb ISOFileNameEnd, 1 + +//align open_file_t_size +absolute HEX(5060) +resb Files, (MAX_OPEN * open_file_t_size) + + +/******************************************************************************/ + + +start: + cli // Disable interrupts + xor ax, ax // ax = segment zero + mov ss, ax // Initialize stack segment + mov sp, offset start // Set up stack + mov ds, ax // Initialize other segment registers + mov es, ax + mov fs, ax + mov gs, ax + sti // Enable interrupts + cld // Increment pointers + + mov cx, 2048 / 4 // Copy the bootsector + mov si, HEX(7C00) // from 0000:7C00 + mov di, HEX(7000) // to 0000:7000 + rep movsd // copy the program + + ljmp16 0, relocate // jump into relocated code + +relocate: +#ifdef DEBUG_MESSAGES + // Display the banner and copyright + mov si, offset isolinux_banner // si points to hello message + call writestr // display the message + mov si, offset copyright_str + call writestr +#endif + + // Make sure the keyboard buffer is empty + call pollchar_and_empty + + // Check for MBR on harddisk + pusha + mov ax, HEX(0201) + mov dx, HEX(0080) + mov cx, HEX(0001) + mov bx, trackbuf + int HEX(13) + popa + jc .boot_cdrom // could not read hdd + + push ax + mov ax, word ptr ds:[trackbuf] + cmp ax, 0 + je .boot_cdrom // no boot sector found (hopefully there are no weird bootsectors which begin with 0) + pop ax + +#ifdef WAIT_FOR_KEY + // Display the 'Press key' message and wait for a maximum of 5 seconds + call crlf + mov si, offset presskey_msg // si points to 'Press key' message + call writestr // display the message + + mov byte ptr ds:[TimeoutCount], 5 +.next_second: + mov eax, ds:[BIOS_timer] // load current tick counter + add eax, 19 + +.poll_again: + call pollchar_and_empty + jnz .boot_cdrom + + mov ebx, ds:[BIOS_timer] + cmp eax, ebx + jnz .poll_again + + mov si, offset dot_msg // print '.' + call writestr + dec byte ptr ds:[TimeoutCount] // decrement timeout counter + jz .boot_harddisk + jmp .next_second +#endif + +.boot_harddisk: + call crlf + + // Boot first harddisk (drive 0x80) + mov ax, HEX(0201) + mov dx, HEX(0080) + mov cx, HEX(0001) + mov bx, HEX(7C00) + int HEX(13) + jnc .go_hd + jmp kaboom +.go_hd: + mov ax, cs + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov dx, HEX(0080) + + ljmp16 0, HEX(7C00) + +.boot_cdrom: +#ifdef WAIT_FOR_KEY + call crlf + call crlf +#endif + + // Save and display the boot drive number + mov byte ptr ds:[DriveNo], dl +#ifdef DEBUG_MESSAGES + mov si, offset startup_msg + call writemsg + mov al, dl + call writehex2 + call crlf +#endif + + // Now figure out what we're actually doing + // Note: use passed-in DL value rather than 7Fh because + // at least some BIOSes will get the wrong value otherwise + mov ax, HEX(4B01) // Get disk emulation status + mov dl, byte ptr ds:[DriveNo] + mov si, offset spec_packet + int HEX(13) + jc spec_query_failed // Shouldn't happen (BIOS bug) + mov dl, byte ptr ds:[DriveNo] + cmp byte ptr ds:[sp_drive], dl // Should contain the drive number + jne spec_query_failed + +#ifdef DEBUG_MESSAGES + mov si, offset spec_ok_msg + call writemsg + mov al, byte ptr ds:[sp_drive] + call writehex2 + call crlf +#endif + +found_drive: + // Get drive information + mov ah, HEX(48) + mov dl, byte ptr ds:[DriveNo] + mov si, offset drive_params + int HEX(13) + jnc params_ok + + // mov si, nosecsize_msg No use in reporting this + // call writemsg + +params_ok: + // Check for the sector size (should be 2048, but + // some BIOSes apparently think we're 512-byte media) + // + // FIX: We need to check what the proper behaviour + // is for getlinsec when the BIOS thinks the sector + // size is 512!!! For that, we need such a BIOS, though... +#ifdef DEBUG_MESSAGES + mov si, offset secsize_msg + call writemsg + mov ax, word ptr ds:[dp_secsize] + call writehex4 + call crlf +#endif + + + // + // Clear Files structures + // + mov di, Files + mov cx, (MAX_OPEN*open_file_t_size)/4 + xor eax, eax + rep stosd + + // + // Now, we need to sniff out the actual filesystem data structures. + // mkisofs gave us a pointer to the primary volume descriptor + // (which will be at 16 only for a single-session disk!); from the PVD + // we should be able to find the rest of what we need to know. + // +get_fs_structures: + mov eax, 16 // Primary Volume Descriptor (sector 16) + mov bx, trackbuf + call getonesec + + mov eax, dword ptr ds:[trackbuf+156+2] + mov dword ptr ds:[RootDir+dir_lba],eax + mov dword ptr ds:[CurDir+dir_lba],eax +#ifdef DEBUG_MESSAGES + mov si, offset rootloc_msg + call writemsg + call writehex8 + call crlf +#endif + + mov eax, dword ptr ds:[trackbuf+156+10] + mov dword ptr ds:[RootDir+dir_len],eax + mov dword ptr ds:[CurDir+dir_len],eax +#ifdef DEBUG_MESSAGES + mov si, offset rootlen_msg + call writemsg + call writehex8 + call crlf +#endif + add eax,SECTORSIZE-1 + shr eax,SECTORSIZE_LG2 + mov dword ptr ds:[RootDir+dir_clust],eax + mov dword ptr ds:[CurDir+dir_clust],eax +#ifdef DEBUG_MESSAGES + mov si, offset rootsect_msg + call writemsg + call writehex8 + call crlf +#endif + + // Look for the "REACTOS" directory, and if found, + // make it the current directory instead of the root + // directory. + mov di, offset isolinux_dir + mov al, 2 // Search for a directory + call searchdir_iso + jnz .dir_found + mov si, offset no_dir_msg + call writemsg + jmp kaboom + +.dir_found: + mov dword ptr ds:[CurDir+dir_len],eax + mov eax, dword ptr ds:[si+file_left] + mov dword ptr ds:[CurDir+dir_clust],eax + xor eax,eax // Free this file pointer entry + xchg eax,dword ptr ds:[si+file_sector] + mov dword ptr ds:[CurDir+dir_lba],eax + + + mov di, offset isolinux_bin // di points to Isolinux filename + call searchdir // look for the file + jnz .isolinux_opened // got the file + mov si, offset no_isolinux_msg // si points to error message + call writemsg // display the message + jmp kaboom // fail boot + +.isolinux_opened: + mov di, si // save file pointer + +#ifdef DEBUG_MESSAGES + mov si, offset filelen_msg + call writemsg + call writehex8 + call crlf +#endif + + mov ecx, eax // calculate sector count + shr ecx, 11 + test eax, HEX(7FF) + jz .full_sector + inc ecx +.full_sector: + +#ifdef DEBUG_MESSAGES + mov eax, ecx + mov si, offset filesect_msg + call writemsg + call writehex8 + call crlf +#endif + + mov bx, FREELDR_BASE // bx = load address + mov si, di // restore file pointer + mov cx, HEX(0FFFF) // load the whole file + call getfssec // get the whole file + +#ifdef DEBUG_MESSAGES + mov si, offset startldr_msg + call writemsg + call crlf +#endif + + mov dl, byte ptr ds:[DriveNo] // dl = boot drive + mov dh, 0 // dh = boot partition + + /* Transfer execution to the bootloader */ + ljmp16 0, FREELDR_BASE + +// +// searchdir: +// +// Open a file +// +// On entry: +// DS:DI = filename +// If successful: +// ZF clear +// SI = file pointer +// DX:AX or EAX = file length in bytes +// If unsuccessful +// ZF set +// + +// +// searchdir_iso is a special entry point for ISOLINUX only. In addition +// to the above, searchdir_iso passes a file flag mask in AL. This is useful +// for searching for directories. +// +alloc_failure: + xor ax,ax // ZF <- 1 + ret + +searchdir: + xor al, al +searchdir_iso: + mov byte ptr ds:[ISOFlags],al + call allocate_file // Temporary file structure for directory + jnz alloc_failure + push es + push ds + pop es // ES = DS + mov si, offset CurDir + cmp byte ptr ds:[di], 92 //'\' // If filename begins with slash + jne .not_rooted + inc di // Skip leading slash + mov si, offset RootDir // Reference root directory instead +.not_rooted: + mov eax, dword ptr ds:[si+dir_clust] + mov dword ptr ds:[bx+file_left],eax + mov eax,dword ptr ds:[si+dir_lba] + mov dword ptr ds:[bx+file_sector],eax + mov edx,dword ptr ds:[si+dir_len] + +.look_for_slash: + mov ax,di +.scan: + mov cl, byte ptr ds:[di] + inc di + and cl,cl + jz .isfile + cmp cl, 92 // '\' + jne .scan + mov byte ptr ds:[di-1], 0 // Terminate at directory name + mov cl,2 // Search for directory + xchg cl, byte ptr ds:[ISOFlags] + push di + push cx + push offset .resume // Where to "return" to + push es +.isfile: + xchg ax,di + +.getsome: + // Get a chunk of the directory + mov si,trackbuf + pushad + xchg bx,si + mov cx,1 // load one sector + call getfssec + popad + +.compare: + movzx eax, byte ptr ds:[si] // Length of directory entry + cmp al, 33 + jb .next_sector + mov cl, byte ptr ds:[si+25] + xor cl, byte ptr ds:[ISOFlags] + test cl, HEX(8E) // Unwanted file attributes! + jnz .not_file + pusha + movzx cx, byte ptr ds:[si+32] // File identifier length + add si, 33 // File identifier offset + call iso_compare_names + popa + je .success +.not_file: + sub edx, eax // Decrease bytes left + jbe .failure + add si, ax // Advance pointer + +.check_overrun: + // Did we finish the buffer? + cmp si, trackbuf+trackbufsize + jb .compare // No, keep going + + jmp .getsome // Get some more directory + +.next_sector: + // Advance to the beginning of next sector + lea ax, [si+SECTORSIZE-1] + and ax, not (SECTORSIZE-1) + sub ax, si + jmp .not_file // We still need to do length checks + +.failure: +#ifdef DEBUG_MESSAGES + mov si, offset findfail_msg + call writemsg + call crlf +#endif + xor eax, eax // ZF = 1 + mov dword ptr ds:[bx+file_sector], eax + pop es + ret + +.success: + mov eax, dword ptr ds:[si+2] // Location of extent + mov dword ptr ds:[bx+file_sector], eax + mov eax, dword ptr ds:[si+10] // Data length + push eax + add eax, SECTORSIZE-1 + shr eax, SECTORSIZE_LG2 + mov dword ptr ds:[bx+file_left], eax + pop eax + mov edx, eax + shr edx, 16 + and bx, bx // ZF = 0 + mov si, bx + pop es + ret + +.resume: + // We get here if we were only doing part of a lookup + // This relies on the fact that .success returns bx == si + xchg edx, eax // Directory length in edx + pop cx // Old ISOFlags + pop di // Next filename pointer + + // restore the backslash in the filename + mov byte ptr ds:[di-1], 92 // '\' + + mov byte ptr ds:[ISOFlags], cl // Restore the flags + jz .failure // Did we fail? If so fail for real! + jmp .look_for_slash // Otherwise, next level + +// +// allocate_file: Allocate a file structure +// +// If successful: +// ZF set +// BX = file pointer +// In unsuccessful: +// ZF clear +// +allocate_file: + push cx + mov bx, Files + mov cx, MAX_OPEN +.check: + cmp dword ptr ds:[bx], 0 + je .found + add bx, open_file_t_size // ZF = 0 + loop .check + // ZF = 0 if we fell out of the loop +.found: + pop cx + ret + +// +// iso_compare_names: +// Compare the names DS:SI and DS:DI and report if they are +// equal from an ISO 9660 perspective. SI is the name from +// the filesystem; CX indicates its length, and ';' terminates. +// DI is expected to end with a null. +// +// Note: clobbers AX, CX, SI, DI; assumes DS == ES == base segment +// +iso_compare_names: + // First, terminate and canonicalize input filename + push di + mov di, offset ISOFileName +.canon_loop: + jcxz .canon_end + lodsb + dec cx + cmp al, ';' + je .canon_end + and al, al + je .canon_end + stosb + cmp di, offset ISOFileNameEnd-1 // Guard against buffer overrun + jb .canon_loop +.canon_end: + cmp di, ISOFileName + jbe .canon_done + cmp byte ptr ds:[di-1], '.' // Remove terminal dots + jne .canon_done + dec di + jmp short .canon_end +.canon_done: + mov byte ptr ds:[di], 0 // Null-terminate string + pop di + mov si, ISOFileName +.compare2: + lodsb + mov ah, byte ptr ds:[di] + inc di + and ax, ax + jz .success2 // End of string for both + and al, al // Is either one end of string? + jz .failure2 // If so, failure + and ah, ah + jz .failure2 + or ax, HEX(2020) // Convert to lower case + cmp al, ah + je .compare2 +.failure2: + and ax, ax // ZF = 0 (at least one will be nonzero) +.success2: + ret + + + + + + + +// +// getfssec: Get multiple clusters from a file, given the file pointer. +// +// On entry: +// ES:BX -> Buffer +// SI -> File pointer +// CX -> Cluster count; 0FFFFh = until end of file +// On exit: +// SI -> File pointer (or 0 on EOF) +// CF = 1 -> Hit EOF +// +getfssec: + cmp cx, word ptr ds:[si+file_left] + jna .ok_size + mov cx, word ptr ds:[si+file_left] + +.ok_size: + mov bp, cx + push cx + push si + mov eax, dword ptr ds:[si+file_sector] + call getlinsec + xor ecx, ecx + pop si + pop cx + + add dword ptr ds:[si+file_sector], ecx + sub dword ptr ds:[si+file_left], ecx + ja .not_eof // CF = 0 + + xor ecx, ecx + mov dword ptr ds:[si+file_sector], ecx // Mark as unused + xor si,si + stc + +.not_eof: + ret + + +// INT 13h, AX=4B01h, DL= failed. +// Try to scan the entire 80h-FFh from the end. +spec_query_failed: + mov si, offset spec_err_msg + call writemsg + + mov dl, HEX(0FF) +.test_loop: + pusha + mov ax, HEX(4B01) + mov si, offset spec_packet + mov byte ptr ds:[si], 13 // Size of buffer + int HEX(13) + popa + jc .still_broken + + mov si, offset maybe_msg + call writemsg + mov al, dl + call writehex2 + call crlf + + cmp byte ptr ds:[sp_drive], dl + jne .maybe_broken + + // Okay, good enough... + mov si, offset alright_msg + call writemsg + mov byte ptr ds:[DriveNo], dl +.found_drive: + jmp found_drive + + // Award BIOS 4.51 apparently passes garbage in sp_drive, + // but if this was the drive number originally passed in + // DL then consider it "good enough" +.maybe_broken: + cmp byte ptr ds:[DriveNo], dl + je .found_drive + +.still_broken: + dec dx + cmp dl, HEX(80) + jnb .test_loop + +fatal_error: + mov si, offset nothing_msg + call writemsg + +.norge: + jmp .norge + + + +// Information message (DS:SI) output +// Prefix with "isolinux: " +writemsg: + push ax + push si + mov si, offset isolinux_str + call writestr + pop si + call writestr + pop ax + ret + +// +// crlf: Print a newline +crlf: + mov si, offset crlf_msg + // Fall through + +// +// writestr: write a null-terminated string to the console, saving +// registers on entry. +// +writestr: + pushfd + pushad +writestr_top: + lodsb + and al, al + jz writestr_end + call writechr + jmp short writestr_top +writestr_end: + popad + popfd + ret + +// +// writehex[248]: Write a hex number in (AL, AX, EAX) to the console +// +writehex2: + pushfd + pushad + shl eax, 24 + mov cx, 2 + jmp short writehex_common +writehex4: + pushfd + pushad + shl eax, 16 + mov cx, 4 + jmp short writehex_common +writehex8: + pushfd + pushad + mov cx, 8 +writehex_common: +.loop: + rol eax, 4 + push eax + and al, HEX(0F) + cmp al, 10 + jae .high +.low: + add al, '0' + jmp short .ischar +.high: + add al, 'A'-10 +.ischar: + call writechr + pop eax + loop .loop + popad + popfd + ret + +// +// writechr: Write a character to the screen. There is a more "sophisticated" +// version of this in the subsequent code, so we patch the pointer +// when appropriate. +writechr: + pushfd + pushad + mov ah, HEX(0E) + xor bx, bx + int HEX(10) + popad + popfd + ret + +// +// Get one sector. Convenience entry point. +// +getonesec: + mov bp, 1 + // Fall through to getlinsec + +// +// Get linear sectors - EBIOS LBA addressing, 2048-byte sectors. +// +// Note that we can't always do this as a single request, because at least +// Phoenix BIOSes has a 127-sector limit. To be on the safe side, stick +// to 32 sectors (64K) per request. +// +// Input: +// EAX - Linear sector number +// ES:BX - Target buffer +// BP - Sector count +// +getlinsec: + mov si, offset dapa // Load up the DAPA + mov word ptr ds:[si+4], bx + mov bx, es + mov word ptr ds:[si+6], bx + mov dword ptr ds:[si+8], eax +.loop2: + push bp // Sectors left + cmp bp, word ptr ds:[MaxTransfer] + jbe .bp_ok + mov bp, word ptr ds:[MaxTransfer] +.bp_ok: + mov word ptr ds:[si+2], bp + push si + mov dl, byte ptr ds:[DriveNo] + mov ah, HEX(42) // Extended Read + call xint13 + pop si + pop bp + movzx eax,word ptr ds:[si+2] // Sectors we read + add dword ptr ds:[si+8], eax // Advance sector pointer + sub bp, ax // Sectors left + shl ax, SECTORSIZE_LG2-4 // 2048-byte sectors -> segment + add word ptr ds:[si+6], ax // Advance buffer pointer + and bp, bp + jnz .loop2 + mov eax, dword ptr ds:[si+8] // Next sector + ret + + // INT 13h with retry +xint13: + mov byte ptr ds:[RetryCount], retry_count +.try: + pushad + int HEX(13) + jc .error + add sp, 8*4 // Clean up stack + ret +.error: + mov byte ptr ds:[DiskError], ah // Save error code + popad + dec byte ptr ds:[RetryCount] + jz .real_error + push ax + mov al, byte ptr ds:[RetryCount] + mov ah, byte ptr ds:[dapa+2] // Sector transfer count + cmp al,2 // Only 2 attempts left + ja .nodanger + mov ah,1 // Drop transfer size to 1 + jmp short .setsize +.nodanger: + cmp al, retry_count-2 + ja .again // First time, just try again + shr ah,1 // Otherwise, try to reduce + adc ah,0 // the max transfer size, but not to 0 +.setsize: + mov byte ptr ds:[MaxTransfer],ah + mov byte ptr ds:[dapa+2],ah +.again: + pop ax + jmp .try + +.real_error: + mov si, offset diskerr_msg + call writemsg + mov al, byte ptr ds:[DiskError] + call writehex2 + mov si, offset ondrive_str + call writestr + mov al, dl + call writehex2 + call crlf + // Fall through to kaboom + +// +// kaboom: write a message and bail out. Wait for a user keypress, +// then do a hard reboot. +// +kaboom: + mov ax, cs + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + sti + mov si, offset err_bootfailed + call writestr + xor ax, ax // Wait for keypress + int HEX(16) + cli + mov word ptr ds:[BIOS_magic], 0 // Cold reboot + ljmp16 HEX(0F000), HEX(0FFF0) // Reset vector address + + +// +// pollchar_and_empty: check if we have an input character pending (ZF = 0) and empty the input buffer afterwards +// +pollchar_and_empty: + pushad + mov ah, 1 // Did the user press a key? + int HEX(16) + jz .end // No, then we're done + mov ah, 0 // Otherwise empty the buffer by reading it + int HEX(16) +.end: + popad + ret + + +isolinux_banner: + .ascii CR, LF, "Loading IsoBoot...", CR, LF, NUL +copyright_str: + .ascii " (C) 1994-2002 H. Peter Anvin", CR, LF, NUL +presskey_msg: + .ascii "Press any key to boot from CD", NUL +dot_msg: + .ascii ".", NUL + +#ifdef DEBUG_MESSAGES +startup_msg: + .ascii "Startup, DL = '", NUL +spec_ok_msg: + .ascii "packet OK, drive = ", NUL +secsize_msg: + .ascii "size appears to be ", NUL +rootloc_msg: + .ascii "Root dir loc: ", NUL +rootlen_msg: + .ascii "Root dir len: ", NUL +rootsect_msg: + .ascii "Root dir len(sect): ", NUL +fileloc_msg: + .ascii "SETUPLDR loc: ", NUL +filelen_msg: + .ascii "SETUPLDR len: ", NUL +filesect_msg: + .ascii "SETUPLDR len(sect): ", NUL +findfail_msg: + .ascii "Failed to find file!", NUL +startldr_msg: + .ascii "Starting SETUPLDR.SYS", NUL +#endif + +spec_err_msg: + .ascii "Load spec failed, trying wing ...", CR, LF, NUL +maybe_msg: + .ascii "Found smth at drive = ", NUL +alright_msg: + .ascii "might be ok, continuing...", CR, LF, NUL +nothing_msg: + .ascii "Failed locate CD-ROM; boot failed.", CR, LF, NUL + +isolinux_str: + .ascii "IsoBoot: ", NUL +crlf_msg: + .ascii CR, LF, NUL +diskerr_msg: + .ascii "Disk error ", NUL +ondrive_str: + .ascii ", drive ", NUL + +err_bootfailed: + .ascii CR, LF, "failed..", NUL +isolinux_dir: + .ascii "\\LOADER", NUL +no_dir_msg: + .ascii "LOADER dir not found.", CR, LF, NUL +isolinux_bin: + .ascii "SETUPLDR.SYS", NUL +no_isolinux_msg: + .ascii "SETUPLDR not found.", CR, LF, NUL + + +// +// El Torito spec packet +// +.align 8 +spec_packet: + .byte HEX(13) // Size of packet +sp_media: + .byte 0 // Media type +sp_drive: + .byte 0 // Drive number +sp_controller: + .byte 0 // Controller index +sp_lba: + .long 0 // LBA for emulated disk image +sp_devspec: + .word 0 // IDE/SCSI information +sp_buffer: + .word 0 // User-provided buffer +sp_loadseg: + .word 0 // Load segment +sp_sectors: + .word 0 // Sector count +sp_chs: + .byte 0,0,0 // Simulated CHS geometry +sp_dummy: + .byte 0 // Scratch, safe to overwrite + +// +// EBIOS drive parameter packet +// +.align 8 +drive_params: + .word 30 // Buffer size +dp_flags: + .word 0 // Information flags +dp_cyl: + .long 0 // Physical cylinders +dp_head: + .long 0 // Physical heads +dp_sec: + .long 0 // Physical sectors/track +dp_totalsec: + .long 0,0 // Total sectors +dp_secsize: + .word 0 // Bytes per sector +dp_dpte: + .long 0 // Device Parameter Table +dp_dpi_key: + .word 0 // 0BEDDh if rest valid +dp_dpi_len: + .byte 0 // DPI len + .byte 0 + .word 0 +dp_bus: + .byte 0,0,0,0 // Host bus type +dp_interface: + .byte 0,0,0,0,0,0,0,0 // Interface type +db_i_path: + .long 0,0 // Interface path +db_d_path: + .long 0,0 // Device path + .byte 0 +db_dpi_csum: + .byte 0 // Checksum for DPI info + +// +// EBIOS disk address packet +// +.align 8 +dapa: + .word 16 // Packet size +.count: + .word 0 // Block count +.off: + .word 0 // Offset of buffer +.seg: + .word 0 // Segment of buffer +.lba: + .long 0 // LBA (LSW) + .long 0 // LBA (MSW) + +.align 4 +MaxTransfer: + .word 2 //32 // Max sectors per transfer + +.org 2046 // Pad to file offset 2046 +.word HEX(0aa55) // BootSector signature + +.endcode16 + +END diff --git a/boot/freeldr/bootsect/isobtrt.S b/boot/freeldr/bootsect/isobtrt.S new file mode 100644 index 00000000000..03f761251c3 --- /dev/null +++ b/boot/freeldr/bootsect/isobtrt.S @@ -0,0 +1,3 @@ + +#define ROS_REGTEST +#include "isoboot.S" diff --git a/boot/freeldr/fdebug/fdebug.rc b/boot/freeldr/fdebug/fdebug.rc index 15f787de361..23ecb5b8b68 100644 --- a/boot/freeldr/fdebug/fdebug.rc +++ b/boot/freeldr/fdebug/fdebug.rc @@ -17,8 +17,11 @@ IDI_FDEBUG ICON "fdebug.ico" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/tr-TR.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/boot/freeldr/fdebug/lang/pl-PL.rc b/boot/freeldr/fdebug/lang/pl-PL.rc index 24dddd52186..e564758452a 100644 --- a/boot/freeldr/fdebug/lang/pl-PL.rc +++ b/boot/freeldr/fdebug/lang/pl-PL.rc @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Polish (P.L.) resources // 2005 Emil Kaczmarek +// UTF-8 conversion by Caemyr (May, 2011) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -#pragma code_page(1250) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -16,17 +16,17 @@ IDC_FDEBUG MENU DISCARDABLE BEGIN POPUP "&Plik" BEGIN - MENUITEM "P&ocz", IDM_FILE_CONNECT - MENUITEM "&Rozcz", IDM_FILE_DISCONNECT, GRAYED + MENUITEM "P&ołącz", IDM_FILE_CONNECT + MENUITEM "&Rozłącz", IDM_FILE_DISCONNECT, GRAYED MENUITEM SEPARATOR - MENUITEM "&Wyczy wywietlacz", IDM_FILE_CLEARDISPLAY + MENUITEM "&Wyczyść wyświetlacz", IDM_FILE_CLEARDISPLAY MENUITEM SEPARATOR MENUITEM "Ro&zpocznij zrzut", IDM_FILE_STARTCAPTURE MENUITEM "Za&trzymaj zrzut", IDM_FILE_STOPCAPTURE, GRAYED MENUITEM SEPARATOR MENUITEM "Lo&kalne Echo", IDM_FILE_LOCALECHO MENUITEM SEPARATOR - MENUITEM "&Wyjcie", IDM_EXIT + MENUITEM "&Wyjście", IDM_EXIT END POPUP "Po&moc" BEGIN @@ -132,12 +132,12 @@ END IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Opcje poczenia" +CAPTION "Opcje połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad port COM (np. COM1):",IDC_STATIC,7,7,108,8 + LTEXT "Wprowadź port COM (np. COM1):",IDC_STATIC,7,7,108,8 EDITTEXT IDC_COMPORT,7,17,182,14,ES_AUTOHSCROLL - LTEXT "Wprowad szybko portu w bodach (np. 115200):",IDC_STATIC,7,38,114, + LTEXT "Wprowadź szybkość portu w bodach (np. 115200):",IDC_STATIC,7,38,114, 8 EDITTEXT IDC_BAUTRATE,7,48,182,14,ES_AUTOHSCROLL DEFPUSHBUTTON "OK",IDOK,45,79,50,14 @@ -146,12 +146,12 @@ END IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Przechwy plik" +CAPTION "Przechwyć plik" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Nazwa pliku zrzutu:",IDC_STATIC,7,17,62,8 EDITTEXT IDC_CAPTUREFILENAME,7,26,181,14,ES_AUTOHSCROLL - PUSHBUTTON "Przeg&ldaj",IDC_BROWSE,194,26,50,14 + PUSHBUTTON "Przeg&lądaj",IDC_BROWSE,194,26,50,14 DEFPUSHBUTTON "OK",IDOK,139,74,50,14 PUSHBUTTON "Anuluj",IDCANCEL,194,74,50,14 END @@ -172,7 +172,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE "Ten program naley do wolnego oprogramowania; moesz go rozpowszechnia i/lub modyfikowa w zgodzie z zasadami licencji GNU GPL w formie w jakiej zostay opublikowane przez fundacj Free Software Foundation; albo w wersji 2 Licencji albo (tu masz wybr) w jakiejkolwiek pniejszej wersji.\r\n\r\nRozpowszechniajc ten program mamy nadziej, e bdzie uyteczny, ale BEZ ADNEJ GWARANCJI; nawet bez zakadanej gwarancji HANDLOWOCI, a w szczeglnym przypadku zdatnoci. Aby pozna wicej szczegw, zajrzyj do licencji GNU.\r\n\r\nKopia licencji GNU GPL powinna by dostarczona razem z tym programem; jeli tak nie jest, napisz list do fundacji na adres: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Ten program należy do wolnego oprogramowania; możesz go rozpowszechniać i/lub modyfikować w zgodzie z zasadami licencji GNU GPL w formie w jakiej zostały opublikowane przez fundację Free Software Foundation; albo w wersji 2 Licencji albo (tu masz wybór) w jakiejkolwiek późniejszej wersji.\r\n\r\nRozpowszechniając ten program mamy nadzieję, że będzie użyteczny, ale BEZ ŻADNEJ GWARANCJI; nawet bez zakładanej gwarancji HANDLOWOŚCI, a w szczególnym przypadku zdatności. Aby poznać więcej szczegółów, zajrzyj do licencji GNU.\r\n\r\nKopia licencji GNU GPL powinna być dostarczona razem z tym programem; jeśli tak nie jest, napisz list do fundacji na adres: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END @@ -190,4 +190,3 @@ BEGIN ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED - diff --git a/boot/freeldr/fdebug/lang/ru-RU.rc b/boot/freeldr/fdebug/lang/ru-RU.rc index 84b0023ba62..e7d2a6e7623 100644 --- a/boot/freeldr/fdebug/lang/ru-RU.rc +++ b/boot/freeldr/fdebug/lang/ru-RU.rc @@ -3,7 +3,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -13,23 +12,23 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDC_FDEBUG MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&", IDM_FILE_CONNECT - MENUITEM "&", IDM_FILE_DISCONNECT, GRAYED + MENUITEM "&Соединение", IDM_FILE_CONNECT + MENUITEM "&Отключение", IDM_FILE_DISCONNECT, GRAYED MENUITEM SEPARATOR - MENUITEM "& ", IDM_FILE_CLEARDISPLAY + MENUITEM "О&чистить экран", IDM_FILE_CLEARDISPLAY MENUITEM SEPARATOR - MENUITEM "& ", IDM_FILE_STARTCAPTURE - MENUITEM "& ", IDM_FILE_STOPCAPTURE, GRAYED + MENUITEM "&Начать захват", IDM_FILE_STARTCAPTURE + MENUITEM "Ос&тановить захват", IDM_FILE_STOPCAPTURE, GRAYED MENUITEM SEPARATOR - MENUITEM "& ", IDM_FILE_LOCALECHO + MENUITEM "&Локальный ответ", IDM_FILE_LOCALECHO MENUITEM SEPARATOR - MENUITEM "&", IDM_EXIT + MENUITEM "&Выход", IDM_EXIT END - POPUP "&" + POPUP "&Справка" BEGIN - MENUITEM "& ...", IDM_ABOUT + MENUITEM "&О программе...", IDM_ABOUT END END @@ -117,10 +116,10 @@ END IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION " FreeLoader" +CAPTION "О программе Отладчик FreeLoader" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " FreeLoader v1.0\n (C) 2003\n (brianp@reactos.org)", + CONTROL "Отладчик FreeLoader v1.0\nАвторские права (C) 2003\nБраин Палмер (brianp@reactos.org)", IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,53,28, 122,26 DEFPUSHBUTTON "OK",IDOK,183,189,44,14,WS_GROUP @@ -131,28 +130,28 @@ END IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройки соединения" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " COM- (e.g. COM1):",IDC_STATIC,7,7,108,8 + LTEXT "Введите COM-порт (e.g. COM1):",IDC_STATIC,7,7,108,8 EDITTEXT IDC_COMPORT,7,17,182,14,ES_AUTOHSCROLL - LTEXT " (e.g. 115200):",IDC_STATIC,7,38,114, + LTEXT "Введите скорость передачи (e.g. 115200):",IDC_STATIC,7,38,114, 8 EDITTEXT IDC_BAUTRATE,7,48,182,14,ES_AUTOHSCROLL DEFPUSHBUTTON "OK",IDOK,45,79,50,14 - PUSHBUTTON "",IDCANCEL,100,79,50,14 + PUSHBUTTON "Отмена",IDCANCEL,100,79,50,14 END IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Файл захвата" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :",IDC_STATIC,7,17,62,8 + LTEXT "Название файла захвата:",IDC_STATIC,7,17,62,8 EDITTEXT IDC_CAPTUREFILENAME,7,26,181,14,ES_AUTOHSCROLL - PUSHBUTTON "&",IDC_BROWSE,194,26,50,14 + PUSHBUTTON "&Обзор",IDC_BROWSE,194,26,50,14 DEFPUSHBUTTON "OK",IDOK,139,74,50,14 - PUSHBUTTON "",IDCANCEL,194,74,50,14 + PUSHBUTTON "Отмена",IDCANCEL,194,74,50,14 END @@ -164,13 +163,13 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "fdebug" - IDS_HELLO " !" + IDS_HELLO "Привет мир!" IDC_FDEBUG "FDEBUG" END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE " ; / GNU General Public License 2 , Free Software Foundation.\r\n\r\n , , ; . . GNU General Public License .\r\n\r\n GNU , Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Эта программа является свободным программным обеспечением; Вы можете распространять и/или изменять ее в соответствии с лицензией GNU General Public License версии 2 или более поздней, опубликованной Free Software Foundation.\r\n\r\nЭта программа распространяется с надеждой, что она может быть полезна, но БЕЗ ВСЯКОЙ ГАРАНТИИ; не подразумевается даже РАБОТОСПОСОБНОСТЬ или ПРИГОДНОСТЬ ДЛЯ ВЫПОЛНЕНИЯ НЕОБХОДИМЫХ ЗАДАЧ. См. GNU General Public License для получения дополнительных сведений.\r\n\r\nВы должны получить копию лицензии GNU вместе с этой программой, в противном случае обращайтесь в Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END #endif diff --git a/boot/freeldr/fdebug/lang/uk-UA.rc b/boot/freeldr/fdebug/lang/uk-UA.rc index 69ca13f7702..ae49c815c1d 100644 --- a/boot/freeldr/fdebug/lang/uk-UA.rc +++ b/boot/freeldr/fdebug/lang/uk-UA.rc @@ -4,7 +4,6 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -#pragma code_page(1251) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -14,23 +13,23 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDC_FDEBUG MENU DISCARDABLE BEGIN - POPUP "&" + POPUP "&Файл" BEGIN - MENUITEM "&ϳ", IDM_FILE_CONNECT - MENUITEM "&³", IDM_FILE_DISCONNECT, GRAYED + MENUITEM "&Підключити", IDM_FILE_CONNECT + MENUITEM "&Відключити", IDM_FILE_DISCONNECT, GRAYED MENUITEM SEPARATOR - MENUITEM "& ", IDM_FILE_CLEARDISPLAY + MENUITEM "&Очистити екран", IDM_FILE_CLEARDISPLAY MENUITEM SEPARATOR - MENUITEM " &", IDM_FILE_STARTCAPTURE - MENUITEM " &", IDM_FILE_STOPCAPTURE, GRAYED + MENUITEM "Почати &захоплення", IDM_FILE_STARTCAPTURE + MENUITEM "Зупинити з&ахоплення", IDM_FILE_STOPCAPTURE, GRAYED MENUITEM SEPARATOR - MENUITEM "& ", IDM_FILE_LOCALECHO + MENUITEM "&Локальна відповідь", IDM_FILE_LOCALECHO MENUITEM SEPARATOR - MENUITEM "&", IDM_EXIT + MENUITEM "В&ихід", IDM_EXIT END - POPUP "&" + POPUP "&Довідка" BEGIN - MENUITEM "& ...", IDM_ABOUT + MENUITEM "Пр&о програму ...", IDM_ABOUT END END @@ -118,13 +117,13 @@ END IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION " FreeLoader" +CAPTION "Про програму Налагоджувач FreeLoader" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " FreeLoader v1.0\nCopyright (C) 2003\nby Brian Palmer (brianp@reactos.org)", + CONTROL "Налагоджувач FreeLoader v1.0\nCopyright (C) 2003\nby Brian Palmer (brianp@reactos.org)", IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,53,28, 122,26 - DEFPUSHBUTTON "",IDOK,183,189,44,14,WS_GROUP + DEFPUSHBUTTON "Так",IDOK,183,189,44,14,WS_GROUP ICON IDI_FDEBUG,IDC_STATIC,19,30,20,20 EDITTEXT IDC_LICENSE_EDIT,53,63,174,107,ES_MULTILINE | ES_READONLY | WS_VSCROLL @@ -132,28 +131,28 @@ END IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " '" +CAPTION "Настройки з'єднання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " COM- (. COM1):",IDC_STATIC,7,7,108,8 + LTEXT "Введіть COM-порт (напр. COM1):",IDC_STATIC,7,7,108,8 EDITTEXT IDC_COMPORT,7,17,182,14,ES_AUTOHSCROLL - LTEXT " (. 115200):",IDC_STATIC,7,38,114, + LTEXT "Введіть швидкість передачі (напр. 115200):",IDC_STATIC,7,38,114, 8 EDITTEXT IDC_BAUTRATE,7,48,182,14,ES_AUTOHSCROLL DEFPUSHBUTTON "OK",IDOK,45,79,50,14 - PUSHBUTTON "",IDCANCEL,100,79,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,100,79,50,14 END IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Файл захоплення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "' :",IDC_STATIC,7,17,62,8 + LTEXT "Ім'я файлу захоплення:",IDC_STATIC,7,17,62,8 EDITTEXT IDC_CAPTUREFILENAME,7,26,181,14,ES_AUTOHSCROLL - PUSHBUTTON "&",IDC_BROWSE,194,26,50,14 + PUSHBUTTON "&Огляд",IDC_BROWSE,194,26,50,14 DEFPUSHBUTTON "OK",IDOK,139,74,50,14 - PUSHBUTTON "",IDCANCEL,194,74,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,194,74,50,14 END @@ -165,13 +164,13 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_APP_TITLE "fdebug" - IDS_HELLO " !" + IDS_HELLO "Привіт Світ!" IDC_FDEBUG "FDEBUG" END STRINGTABLE DISCARDABLE BEGIN - IDS_LICENSE " ; , ³ GNU, ; 2 , - , .\r\n\r\n 䳿 , , - Ҳ, Ҳ Ҳ Ҳ . ³ GNU.\r\n\r\n ³ GNU. , (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END #endif // Ukrainian resources diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt index a231c69e032..fc4d056d30f 100644 --- a/boot/freeldr/freeldr/CMakeLists.txt +++ b/boot/freeldr/freeldr/CMakeLists.txt @@ -1,6 +1,18 @@ +if(ARCH MATCHES i386 OR ARCH MATCHES amd64) + CreateBootSectorTarget2(frldr16 + ${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/i386.S + ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin + F800) +endif() + include_directories(BEFORE include) include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include) +include_directories(${REACTOS_SOURCE_DIR}/lib/cmlib) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/elf) + +add_definitions(-D_NTHAL_ -D_BLDR_ -D_NTSYSTEM_) if(ARCH MATCHES arm) if(SARCH MATCHES omap-zoom2) @@ -8,50 +20,14 @@ if(ARCH MATCHES arm) endif() endif() -if(ARCH MATCHES i386) - if(MSVC) - list(APPEND FREELDR_BASE64K_SOURCE - arch/i386/realmode.S) - else() - list(APPEND FREELDR_STARTUP_SOURCE - arch/i386/fathelp.S - arch/i386/arch.S) - endif() -elseif(ARCH MATCHES amd64) - list(APPEND FREELDR_STARTUP_SOURCE - arch/i386/fathelp.S - arch/amd64/arch.S) -endif() - -if(ARCH MATCHES i386) - if(NOT MSVC) - list(APPEND FREELDR_BASE64K_SOURCE - arch/i386/boot.S - arch/i386/drvmap.S - arch/i386/i386cpu.S - arch/i386/i386idt.S - arch/i386/i386pnp.S - arch/i386/i386pxe.S - arch/i386/i386trap.S - arch/i386/int386.S - arch/i386/linux.S - arch/i386/mb.S - arch/i386/i386bug.c) - endif() -elseif(ARCH MATCHES amd64) - list(APPEND FREELDR_BASE64K_SOURCE - arch/i386/drvmap.S - arch/i386/i386cpu.S - arch/i386/i386idt.S - arch/i386/i386trap.S - arch/amd64/mb.S) -endif() - -set_source_files_properties(${FREELDR_BASE64K_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_") - -include_directories(${REACTOS_SOURCE_DIR}/lib/cmlib) - -list(APPEND FREELDR_BASE_SOURCE +list(APPEND FREELDR_COMMON_SOURCE + cmdline.c + debug.c + linuxboot.c + machine.c + options.c + oslist.c + version.c arcemul/mm.c arcemul/time.c cache/blocklist.c @@ -60,7 +36,7 @@ list(APPEND FREELDR_BASE_SOURCE disk/disk.c disk/partition.c disk/ramdisk.c - disk/scsiport.c + #disk/scsiport.c fs/ext2.c fs/fat.c fs/fs.c @@ -76,10 +52,7 @@ list(APPEND FREELDR_BASE_SOURCE reactos/arcname.c reactos/archwsup.c reactos/binhive.c - reactos/reactos.c - reactos/imageldr.c - rtl/bget.c - rtl/libsupp.c + ui/directui.c ui/gui.c ui/minitui.c @@ -95,41 +68,29 @@ list(APPEND FREELDR_BASE_SOURCE windows/winldr.c windows/wlmemory.c windows/wlregistry.c - freeldr.c - debug.c - version.c - cmdline.c - machine.c - options.c - linuxboot.c - oslist.c) +) if(ARCH MATCHES i386) - list(APPEND FREELDR_BASE_SOURCE - windows/headless.c - disk/scsiport.c) -endif() - -set_source_files_properties(${FREELDR_BASE_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;_BLDR_;_NTSYSTEM_") - -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/elf) - -if(ARCH MATCHES i386) - list(APPEND FREELDR_ARCH_SOURCE + list(APPEND FREELDR_COMMON_SOURCE arch/i386/archmach.c arch/i386/custom.c arch/i386/drivemap.c + arch/i386/entry.S arch/i386/halstub.c arch/i386/hardware.c arch/i386/hwacpi.c arch/i386/hwapm.c arch/i386/hwpci.c + arch/i386/i386bug.c arch/i386/i386disk.c + arch/i386/i386idt.c + arch/i386/i386pnp.cmake.S arch/i386/i386rtl.c + arch/i386/i386trap.S arch/i386/i386vid.c - arch/i386/loader.c + arch/i386/linux.cmake.S arch/i386/machpc.c + arch/i386/mb.S arch/i386/miscboot.c arch/i386/ntoskrnl.c arch/i386/pccons.c @@ -147,98 +108,128 @@ if(ARCH MATCHES i386) arch/i386/xboxrtc.c arch/i386/xboxvideo.c windows/i386/ntsetup.c - windows/i386/wlmemory.c) + windows/i386/wlmemory.c + windows/headless.c + disk/scsiport.c) + if(NOT MSVC) + list(APPEND FREELDR_COMMON_SOURCE + arch/i386/drvmap.S + arch/i386/multiboot.S) + endif() +elseif(ARCH MATCHES amd64) + list(APPEND FREELDR_COMMON_SOURCE + arch/amd64/entry.S + arch/amd64/loader.c + arch/i386/hardware.c + arch/i386/hwacpi.c + arch/i386/hwapm.c + arch/i386/hwpci.c + arch/i386/i386rtl.c + arch/i386/i386disk.c + arch/i386/i386vid.c + arch/i386/machpc.c + arch/i386/ntoskrnl.c + arch/i386/pccons.c + arch/i386/pcdisk.c + arch/i386/pcmem.c + arch/i386/pcrtc.c + arch/i386/pcvideo.c + windows/amd64/ntsetup.c + windows/amd64/wlmemory.c) else() #TBD endif() -set_source_files_properties(${FREELDR_ARCH_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;_BLDR_;_NTSYSTEM_") -add_library(freeldr_arch ${FREELDR_ARCH_SOURCE}) -add_dependencies(freeldr_arch bugcodes) +add_library(freeldr_common ${FREELDR_COMMON_SOURCE}) +add_dependencies(freeldr_common bugcodes) -list(APPEND FREELDR_SOURCE - bootmgr.c - ${FREELDR_STARTUP_SOURCE} - ${FREELDR_BASE64K_SOURCE} - ${FREELDR_BASE_SOURCE} - ) -add_library(freeldr SHARED - ${CMAKE_CURRENT_BINARY_DIR}/freeldr_freeldr.h.gch - ${FREELDR_SOURCE}) +list(APPEND FREELDR_BASE_SOURCE + bootmgr.c # This file is compiled with custom definitions + freeldr.c + rtl/bget.c + rtl/libsupp.c +) + +add_executable(freeldr_pe ${FREELDR_BASE_SOURCE}) if(NOT MSVC) - set_target_properties(freeldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,--exclude-all-symbols -Wl,--file-alignment,0x1000 -Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lnk" SUFFIX ".sys") -set_image_base(freeldr 0x8000) + set_target_properties(freeldr_pe PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,--exclude-all-symbols -Wl,--file-alignment,0x1000 -Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lnk") else() - set_target_properties(freeldr PROPERTIES LINK_FLAGS "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text /SUBSYSTEM:BOOT_APPLICATION" SUFFIX ".sys") -set_image_base(freeldr 0x10000) + set_target_properties(freeldr_pe PROPERTIES LINK_FLAGS "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text /SUBSYSTEM:BOOT_APPLICATION") endif() -set_subsystem(freeldr native) -set_entrypoint(freeldr mainCRTStartup) +set_image_base(freeldr_pe 0x10000) +set_subsystem(freeldr_pe native) +set_entrypoint(freeldr_pe RealEntryPoint) if(ARCH MATCHES i386) - target_link_libraries(freeldr mini_hal) + target_link_libraries(freeldr_pe mini_hal) endif() -target_link_libraries(freeldr - freeldr_arch +target_link_libraries(freeldr_pe + freeldr_common cportlib rossym cmlib rtl libcntpr) -add_pch(freeldr ${CMAKE_CURRENT_SOURCE_DIR}/include/freeldr.h ${FREELDR_SOURCE}) -add_dependencies(freeldr asm) +add_pch(freeldr_pe include/freeldr.h) +add_dependencies(freeldr_pe asm) -add_cd_file(TARGET freeldr DESTINATION loader NO_CAB FOR all) +concatenate_files( + ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin + ${CMAKE_CURRENT_BINARY_DIR}/freeldr_pe.exe + ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys) -list(APPEND SETUPLDR_MAIN_SOURCE - bootmgr.c - inffile/inffile.c - reactos/setupldr.c) +add_custom_target(freeldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys) -if(ARCH MATCHES i386 OR ARCH MATCHES amd64) - list(APPEND SETUPLDR_MAIN_SOURCE windows/setupldr2.c) -endif() - -if(NOT MSVC) - set_source_files_properties(${SETUPLDR_MAIN_SOURCE} PROPERTIES COMPILE_FLAGS "-ffreestanding -fno-builtin -fno-inline -fno-zero-initialized-in-bss") -endif() +add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION loader NO_CAB FOR all) list(APPEND SETUPLDR_SOURCE - ${FREELDR_STARTUP_SOURCE} - ${FREELDR_BASE64K_SOURCE} - ${FREELDR_BASE_SOURCE} - ${SETUPLDR_MAIN_SOURCE}) + inffile/inffile.c) -add_library(setupldr SHARED ${SETUPLDR_SOURCE}) +if(ARCH MATCHES i386 OR ARCH MATCHES amd64) + list(APPEND SETUPLDR_SOURCE windows/setupldr2.c) +endif() if(NOT MSVC) - set_target_properties(setupldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,--exclude-all-symbols -Wl,--file-alignment,0x1000 -Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lnk" SUFFIX ".sys" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") -set_image_base(setupldr 0x8000) -else() - set_target_properties(setupldr PROPERTIES LINK_FLAGS "/DRIVER /SECTION:.text,ERWP,ALIGN=0x1000" SUFFIX ".sys" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") + set_source_files_properties(${SETUPLDR_SOURCE} PROPERTIES COMPILE_FLAGS "-ffreestanding -fno-builtin -fno-inline -fno-zero-initialized-in-bss") endif() -set_subsystem(setupldr native) -set_entrypoint(setupldr mainCRTStartup) +add_executable(setupldr_pe ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE}) + +if(NOT MSVC) + set_target_properties(setupldr_pe PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,--exclude-all-symbols -Wl,--file-alignment,0x1000 -Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lnk" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") +else() + set_target_properties(setupldr_pe PROPERTIES LINK_FLAGS "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text /SUBSYSTEM:BOOT_APPLICATION" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") +endif() + +set_image_base(setupldr_pe 0x10000) +set_subsystem(setupldr_pe native) +set_entrypoint(setupldr_pe RealEntryPoint) if(ARCH MATCHES i386) - target_link_libraries(setupldr mini_hal) + target_link_libraries(setupldr_pe mini_hal) endif() -target_link_libraries(setupldr - freeldr_arch +target_link_libraries(setupldr_pe + freeldr_common cportlib rossym cmlib rtl libcntpr) -add_dependencies(setupldr asm) +add_dependencies(setupldr_pe asm) -add_cd_file(TARGET setupldr DESTINATION loader NO_CAB FOR all) +concatenate_files( + ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin + ${CMAKE_CURRENT_BINARY_DIR}/setupldr_pe.exe + ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys) + +add_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys) + +add_cd_file(TARGET setupldr FILE ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys DESTINATION loader NO_CAB FOR all) diff --git a/boot/freeldr/freeldr/arcemul/mm.c b/boot/freeldr/freeldr/arcemul/mm.c index 57a654e0b20..3e6dd5599a3 100644 --- a/boot/freeldr/freeldr/arcemul/mm.c +++ b/boot/freeldr/freeldr/arcemul/mm.c @@ -30,13 +30,12 @@ static const MEMORY_DESCRIPTOR_INT MemoryDescriptors[] = { { MemoryFirmwareTemporary, 0x80, 0x10 }, 4, }, // File system read buffer. FILESYSBUFFER { { MemoryFirmwareTemporary, 0x90, 0x10 }, 5, }, // Disk read buffer for int 13h. DISKREADBUFFER { { MemoryFirmwarePermanent, 0xA0, 0x60 }, 6, }, // ROM / Video - { { MemorySpecialMemory, 0xFFF, 1 }, 7, }, // unusable memory #elif __arm__ // This needs to be done per-platform specific way #endif }; -MEMORY_DESCRIPTOR* -ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) +const MEMORY_DESCRIPTOR* +ArcGetMemoryDescriptor(const MEMORY_DESCRIPTOR* Current) { MEMORY_DESCRIPTOR_INT* CurrentDescriptor; BIOS_MEMORY_MAP BiosMemoryMap[32]; @@ -55,7 +54,8 @@ ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) // RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32); BiosMemoryMapEntryCount = MachVtbl.GetMemoryMap(BiosMemoryMap, - sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP)); + sizeof(BiosMemoryMap) / + sizeof(BIOS_MEMORY_MAP)); // // Copy the entries to our structure @@ -77,8 +77,8 @@ ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) // Copy this memory descriptor // BiosMemoryDescriptors[j].m.MemoryType = MemoryFree; - BiosMemoryDescriptors[j].m.BasePage = BiosMemoryMap[i].BaseAddress / MM_PAGE_SIZE; - BiosMemoryDescriptors[j].m.PageCount = BiosMemoryMap[i].Length / MM_PAGE_SIZE; + BiosMemoryDescriptors[j].m.BasePage = (ULONG)(BiosMemoryMap[i].BaseAddress / MM_PAGE_SIZE); + BiosMemoryDescriptors[j].m.PageCount = (ULONG)(BiosMemoryMap[i].Length / MM_PAGE_SIZE); BiosMemoryDescriptors[j].Index = j; BiosMemoryDescriptors[j].GeneratedDescriptor = TRUE; j++; @@ -114,7 +114,7 @@ ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) // // Return first fixed memory descriptor // - return (MEMORY_DESCRIPTOR*)&MemoryDescriptors[0].m; + return &MemoryDescriptors[0].m; } else { @@ -141,7 +141,7 @@ ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) // // Return first fixed memory descriptor // - return (MEMORY_DESCRIPTOR*)&MemoryDescriptors[0].m; + return &MemoryDescriptors[0].m; } else { @@ -161,7 +161,7 @@ ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) // // Return next fixed descriptor // - return (MEMORY_DESCRIPTOR*)&MemoryDescriptors[CurrentDescriptor->Index + 1].m; + return &MemoryDescriptors[CurrentDescriptor->Index + 1].m; } else { diff --git a/boot/freeldr/freeldr/arch/amd64/arch.S b/boot/freeldr/freeldr/arch/amd64/arch.S index 236a0be4b69..4be61c377b8 100644 --- a/boot/freeldr/freeldr/arch/amd64/arch.S +++ b/boot/freeldr/freeldr/arch/amd64/arch.S @@ -3,8 +3,6 @@ #include -#include - .text .code16 @@ -25,21 +23,20 @@ RealEntryPoint: /* checkPoint Charlie - where it all began... */ mov si, offset CheckPoint0 - call writestr + call writestr /* Setup a real mode stack */ mov sp, stack16 - /* Zero BootDrive and BootPartition */ + /* Zero BootPartition */ xor eax, eax - mov BootDrive, eax - mov BootPartition, eax + mov FrldrBootPartition, eax /* Store the boot drive */ - mov BootDrive, dl + mov FrldrBootDrive, dl /* Store the boot partition */ - mov BootPartition, dh + mov FrldrBootPartition, dh /* Load the GDT */ lgdt gdtptr @@ -50,16 +47,16 @@ RealEntryPoint: /* checkPoint Charlie - where it all began... */ mov si, offset CheckPoint1 - call writestr - + call writestr + call x86_16_BuildPageTables - + /* checkPoint Charlie - where it all began... */ mov si, offset CheckPoint2 - call writestr + call writestr /* Check if CPU supports CPUID */ - + pushfd pop eax mov ebx, eax @@ -70,8 +67,8 @@ RealEntryPoint: pop eax cmp eax,ebx jz NO_CPUID_SUPPORT_DETECTED - - /* CPUID support detected - getting the PAE/PGE */ + + /* CPUID support detected - getting the PAE/PGE */ mov eax,1 // Fn0000_0001 - PAE in EDX[6] cpuid @@ -79,24 +76,24 @@ RealEntryPoint: and edx,0x00a0 test edx,edx // are PAE and PGE bits set? jz NO_X64_SUPPORT_DETECTED - + /* PAE and PGE are here */ - + xor edx, edx mov eax, 0x80000001 cpuid and edx, 0x20000000 test edx,edx jz NO_X64_SUPPORT_DETECTED - + /* X64 Processor */ - + /* checkPoint Charlie - where it all began... */ mov si, offset CheckPoint3 - call writestr + call writestr jmp switch64 - + NO_X64_SUPPORT_DETECTED: mov si, offset NotAnX64Processor // Loading message call writestr @@ -129,7 +126,7 @@ switch64: // mov ds, ax // mov word ptr ds:[0xb8002], 0x0e02 + '2' - + /* Return into real mode */ call x86_64_SwitchToReal .code16 @@ -169,7 +166,7 @@ x86_16_EnableA20: ret /* - * We define 512 2MB pages at the start of memory, so we can access the first + * We define 512 2MB pages at the start of memory, so we can access the first * 1 GB as if paging was disabled */ x86_16_BuildPageTables: @@ -238,7 +235,7 @@ writestr: popad popfd ret - + writechr: pushf @@ -252,7 +249,7 @@ writechr: //.global x86_16_SwitchToLong x86_16_SwitchToLong: - + cli xor ax,ax @@ -332,7 +329,7 @@ SwitchToReal1: /* Step 2 - disable long mode in EFER MSR */ // mov ecx, 0xC0000080 // Specify EFER MSR -// rdmsr +// rdmsr // and eax, ~0x00000100 // Disable EFER.LME // wrmsr @@ -408,12 +405,12 @@ gdtptr: .long gdt /* Base Address */ -.global BootDrive -BootDrive: - .long 0 - -.global BootPartition -BootPartition: +.global FrldrBootDrive +FrldrBootDrive: + .byte 0 + +.global FrldrBootPartition +FrldrBootPartition: .long 0 .global NotAnX64Processor @@ -431,12 +428,12 @@ NoCPUIDSupport: CheckPoint0: .ascii "Starting FreeLoader..." .byte 0x0d, 0x0a, 0 - + .global CheckPoint1 CheckPoint1: .ascii "FreeLoader[16-bit]: building page tables..." .byte 0x0d, 0x0a, 0 - + .global CheckPoint2 CheckPoint2: .ascii "FreeLoader[16-bit]: checking CPU for x64 long mode..." diff --git a/boot/freeldr/freeldr/arch/amd64/boot.S b/boot/freeldr/freeldr/arch/amd64/boot.S index bc2e43e9e8b..277e773b992 100644 --- a/boot/freeldr/freeldr/arch/amd64/boot.S +++ b/boot/freeldr/freeldr/arch/amd64/boot.S @@ -23,9 +23,6 @@ .text .code16 -#define ASM -#include - PUBLIC ChainLoadBiosBootSectorCode ChainLoadBiosBootSectorCode: .code64 diff --git a/boot/freeldr/freeldr/arch/amd64/entry.S b/boot/freeldr/freeldr/arch/amd64/entry.S new file mode 100644 index 00000000000..242275bb387 --- /dev/null +++ b/boot/freeldr/freeldr/arch/amd64/entry.S @@ -0,0 +1,39 @@ + + +#include +#include + +.code64 + +PUBLIC RealEntryPoint +RealEntryPoint: + +PUBLIC FrldrBootDrive +FrldrBootDrive: + +PUBLIC FrldrBootPartition +FrldrBootPartition: + +PUBLIC PageDirectoryEnd +PageDirectoryEnd: +PUBLIC PageDirectoryStart +PageDirectoryStart: +PUBLIC PnpBiosGetDeviceNode +PnpBiosGetDeviceNode: +PUBLIC PnpBiosGetDeviceNodeCount +PnpBiosGetDeviceNodeCount: +PUBLIC PnpBiosSupported +PnpBiosSupported: +PUBLIC Int386 +Int386: +PUBLIC PxeCallApi +PxeCallApi: +PUBLIC __lgdt +__lgdt: +PUBLIC __ltr +__ltr: + +nop + + +END diff --git a/boot/freeldr/freeldr/arch/amd64/i386pnp.S b/boot/freeldr/freeldr/arch/amd64/i386pnp.S index c74fb97d64d..10228caa476 100644 --- a/boot/freeldr/freeldr/arch/amd64/i386pnp.S +++ b/boot/freeldr/freeldr/arch/amd64/i386pnp.S @@ -23,9 +23,7 @@ .text .code16 -#define ASM - -#include +#include /* @@ -199,7 +197,7 @@ EXTERN(PnpBiosGetDeviceNode) mov al, [rsi] mov _pnp_node_number, al - /* convert pointer to node buffer to segment/offset */ + /* convert pointer to node buffer to segment/offset */ mov eax, [rbp + 0x0C] shr eax, 4 and eax, 0xf000 @@ -215,7 +213,7 @@ EXTERN(PnpBiosGetDeviceNode) mov ax, _pnp_bios_data_segment push ax - /* push control flag */ + /* push control flag */ push 0x0001 /* push pointer to node buffer (segment/offset) */ diff --git a/boot/freeldr/freeldr/arch/amd64/int386.S b/boot/freeldr/freeldr/arch/amd64/int386.S index 6881173910d..820eb49e82c 100644 --- a/boot/freeldr/freeldr/arch/amd64/int386.S +++ b/boot/freeldr/freeldr/arch/amd64/int386.S @@ -24,8 +24,7 @@ .text .code16 -#define ASM -#include +#include Int386_REGS: diff --git a/boot/freeldr/freeldr/arch/amd64/loader.c b/boot/freeldr/freeldr/arch/amd64/loader.c index 9970090cd3a..f72cbe9a4c9 100644 --- a/boot/freeldr/freeldr/arch/amd64/loader.c +++ b/boot/freeldr/freeldr/arch/amd64/loader.c @@ -27,7 +27,6 @@ extern ULONG_PTR KernelBase; ULONG_PTR GdtBase, IdtBase, TssBase; extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint; -PPAGE_DIRECTORY_AMD64 pPML4; PVOID pIdt, pGdt; /* FUNCTIONS *****************************************************************/ diff --git a/boot/freeldr/freeldr/arch/amd64/mb.S b/boot/freeldr/freeldr/arch/amd64/mb.S index 51b06bc1e01..fe4ff62334d 100644 --- a/boot/freeldr/freeldr/arch/amd64/mb.S +++ b/boot/freeldr/freeldr/arch/amd64/mb.S @@ -23,8 +23,7 @@ .text .code16 -#define ASM -#include +#include #include /* @@ -33,7 +32,7 @@ */ .code64 .globl PageDirectoryStart - + .globl pml4_startup .globl pdp_startup .globl pd_startup diff --git a/boot/freeldr/freeldr/arch/amd64/stubs.S b/boot/freeldr/freeldr/arch/amd64/stubs.S new file mode 100644 index 00000000000..3f2e0e4a462 --- /dev/null +++ b/boot/freeldr/freeldr/arch/amd64/stubs.S @@ -0,0 +1,48 @@ + + +#include + +EXTERN BootMain:PROC + +.code64 + +/* 64 bit entry point */ +PUBLIC mainCRTStartup +mainCRTStartup: + jmp BootMain + +PUBLIC Int386 +Int386: + ret + +PUBLIC __lgdt +__lgdt: + +PUBLIC __ltr +__ltr: + +PUBLIC PxeCallApi +PxeCallApi: + .long 0 + +PUBLIC PageDirectoryStart +PageDirectoryStart: + .long 0 + +PUBLIC PageDirectoryEnd +PageDirectoryEnd: + .long 0 + +PUBLIC PnpBiosGetDeviceNode +PnpBiosGetDeviceNode: + .long 0 + +PUBLIC PnpBiosGetDeviceNodeCount +PnpBiosGetDeviceNodeCount: + .long 0 + +PUBLIC PnpBiosSupported +PnpBiosSupported: + .long 0 + +END diff --git a/boot/freeldr/freeldr/arch/i386/arch.S b/boot/freeldr/freeldr/arch/i386/arch.S index 225dc4be3f9..3251fdd1c52 100644 --- a/boot/freeldr/freeldr/arch/i386/arch.S +++ b/boot/freeldr/freeldr/arch/i386/arch.S @@ -20,13 +20,12 @@ .intel_syntax noprefix #define HEX(y) 0x##y -#define ASM -#include +#include #include .code16 -EXTERN(RealEntryPoint) +EXTERN(_RealEntryPoint) cli @@ -48,16 +47,17 @@ EXTERN(RealEntryPoint) .code32 - /* Zero BootDrive and BootPartition */ + /* Zero BootPartition */ xor eax, eax - mov dword ptr [_BootDrive], eax - mov dword ptr [_BootPartition], eax + mov dword ptr [_FrldrBootPartition], eax /* Store the boot drive */ - mov byte ptr [_BootDrive], dl + mov byte ptr [_FrldrBootDrive], dl /* Store the boot partition */ - mov byte ptr [_BootPartition], dh + mov byte ptr [_FrldrBootPartition], dh + + call _EnableA20 /* GO! */ push eax @@ -302,7 +302,7 @@ EXTERN(_DisableA20) /* Align 32 bits boundary */ .align 4 - + /* Multiboot header */ MultibootHeader: /* magic */ @@ -400,12 +400,12 @@ mb4: mov eax, [ebx + MB_INFO_BOOT_DEVICE_OFFSET] shr eax, 16 inc al - mov byte ptr _BootPartition, al - mov byte ptr _BootDrive, ah + mov byte ptr _FrldrBootPartition, al + mov byte ptr _FrldrBootDrive, ah jmp mb6 mb5: /* No boot device known, assume first partition of first harddisk */ - mov byte ptr _BootDrive, HEX(80) - mov byte ptr _BootPartition, 1 + mov byte ptr _FrldrBootDrive, HEX(80) + mov byte ptr _FrldrBootPartition, 1 mb6: /* Check for command line */ mov eax, offset cmdline @@ -415,7 +415,7 @@ mb6: mb7: /* GO! */ - push eax + push eax call _BootMain mbfail: @@ -496,8 +496,8 @@ mb_info: cmdline: .fill CMDLINE_SIZE, 1, 0 -EXTERN(_BootDrive) - .long 0 - -EXTERN(_BootPartition) +EXTERN(_FrldrBootDrive) + .byte 0 + +EXTERN(_FrldrBootPartition) .long 0 diff --git a/boot/freeldr/freeldr/arch/i386/boot.S b/boot/freeldr/freeldr/arch/i386/boot.S index ec07351fe58..079ae1e1976 100644 --- a/boot/freeldr/freeldr/arch/i386/boot.S +++ b/boot/freeldr/freeldr/arch/i386/boot.S @@ -20,9 +20,7 @@ .text .code16 -#define ASM -#include - +#include EXTERN(_ChainLoadBiosBootSectorCode) .code32 @@ -31,7 +29,7 @@ EXTERN(_ChainLoadBiosBootSectorCode) .code16 /* Set the boot drive */ - movb (_BootDrive),%dl + movb (_FrldrBootDrive),%dl /* Load segment registers */ cli diff --git a/boot/freeldr/freeldr/arch/i386/custom.c b/boot/freeldr/freeldr/arch/i386/custom.c index 14e651df785..a53d42301af 100644 --- a/boot/freeldr/freeldr/arch/i386/custom.c +++ b/boot/freeldr/freeldr/arch/i386/custom.c @@ -60,9 +60,6 @@ VOID OptionMenuCustomBoot(VOID) case 2: // Boot Sector File OptionMenuCustomBootBootSectorFile(); break; - case 3: // ReactOS - OptionMenuCustomBootReactOS(); - break; case 4: // Linux OptionMenuCustomBootLinux(); break; @@ -234,79 +231,6 @@ VOID OptionMenuCustomBootBootSectorFile(VOID) LoadAndBootBootSector(SectionName); } -VOID OptionMenuCustomBootReactOS(VOID) -{ - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR ReactOSSystemPath[200]; - CHAR ReactOSARCPath[200]; - CHAR ReactOSOptions[200]; - ULONG SectionId; - TIMEINFO* TimeInfo; - - RtlZeroMemory(SectionName, sizeof(SectionName)); - RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); - RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString)); - RtlZeroMemory(ReactOSSystemPath, sizeof(ReactOSSystemPath)); - RtlZeroMemory(ReactOSOptions, sizeof(ReactOSOptions)); - - if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } - - if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } - - if (!UiEditBox(ReactOSSystemPathPrompt, ReactOSSystemPath, 200)) - { - return; - } - - if (!UiEditBox(ReactOSOptionsPrompt, ReactOSOptions, 200)) - { - return; - } - - // Generate a unique section name - TimeInfo = ArcGetTime(); - sprintf(SectionName, "CustomReactOS%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType - if (!IniAddSettingValueToSection(SectionId, "BootType", "ReactOS")) - { - return; - } - - // Construct the ReactOS ARC system path - ConstructArcPath(ReactOSARCPath, ReactOSSystemPath, DriveMapGetBiosDriveNumber(BootDriveString), atoi(BootPartitionString)); - - // Add the system path - if (!IniAddSettingValueToSection(SectionId, "SystemPath", ReactOSARCPath)) - { - return; - } - - // Add the CommandLine - if (!IniAddSettingValueToSection(SectionId, "Options", ReactOSOptions)) - { - return; - } - - UiMessageBox(CustomBootPrompt); - - LoadAndBootReactOS(SectionName); -} - VOID OptionMenuCustomBootLinux(VOID) { CHAR SectionName[100]; diff --git a/boot/freeldr/freeldr/arch/i386/drivemap.c b/boot/freeldr/freeldr/arch/i386/drivemap.c index 53da896665d..174595b63b7 100644 --- a/boot/freeldr/freeldr/arch/i386/drivemap.c +++ b/boot/freeldr/freeldr/arch/i386/drivemap.c @@ -25,6 +25,7 @@ ULONG OldInt13HandlerAddress = 0; // Address of BIOS int 13h handler ULONG DriveMapHandlerAddress = 0; // Linear address of our drive map handler ULONG DriveMapHandlerSegOff = 0; // Segment:offset style address of our drive map handler +#ifndef _MSC_VER VOID DriveMapMapDrivesInSection(PCSTR SectionName) { CHAR SettingName[80]; @@ -141,10 +142,11 @@ BOOLEAN DriveMapIsValidDriveString(PCSTR DriveString) return TRUE; } +#endif -ULONG DriveMapGetBiosDriveNumber(PCSTR DeviceName) +UCHAR DriveMapGetBiosDriveNumber(PCSTR DeviceName) { - ULONG BiosDriveNumber = 0; + UCHAR BiosDriveNumber = 0; // If they passed in a number string then just // convert it to decimal and return it @@ -167,6 +169,7 @@ ULONG DriveMapGetBiosDriveNumber(PCSTR DeviceName) return BiosDriveNumber; } +#ifndef _MSC_VER VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap) { ULONG* RealModeIVT = (ULONG*)0x00000000; @@ -220,3 +223,4 @@ VOID DriveMapRemoveInt13Handler(VOID) DriveMapInstalled = FALSE; } } +#endif diff --git a/boot/freeldr/freeldr/arch/i386/drvmap.S b/boot/freeldr/freeldr/arch/i386/drvmap.S index d6b081ca60b..5f4415ecafb 100644 --- a/boot/freeldr/freeldr/arch/i386/drvmap.S +++ b/boot/freeldr/freeldr/arch/i386/drvmap.S @@ -17,85 +17,92 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - .text - .code16 -#define ASM -#include +#include +#include +.code16 -EXTERN(_DriveMapInt13HandlerStart) +PUBLIC _DriveMapInt13HandlerStart +_DriveMapInt13HandlerStart: Int13Handler: - pushw %bp - movw %sp,%bp - pushw %ax - pushw %cx - pushw %si + push bp + mov bp, sp + push ax + push cx + push si cld /* Get callers flags from stack */ - movw 0x06(%bp),%ax - movw %ax,%cs:(CallersFlags - Int13Handler) + mov ax, [bp + 6] + mov word ptr cs:[CallersFlags - Int13Handler], ax /* Save the drive number they passed in */ - movb %dl,%cs:(PassedInDriveNumber - Int13Handler) + mov cs:[PassedInDriveNumber - Int13Handler], dl /* Now we need to perform the mapping */ - xorw %cx,%cx - movw $(Int13HandlerMapCount - Int13Handler),%si + xor cx, cx + mov si, offset Int13HandlerMapCount - Int13Handler + /* Get the count of drives in the map list */ - movb %cs:(%si),%cl - incw %si + mov cl, cs:[si] + inc si /* If the map list is empty then just call the old int 13h handler */ - cmpb $0,%cl - jz CallOldInt13Handler + cmp cl, 0 + jz CallOldInt13Handler GetMappedDriveNumberLoop: /* Get the next drive number in the list */ - lodsw %cs:(%si),%ax + lods ax, cs:[si] + /* Check to see if it's the one they are calling int 13h for */ - cmpb %al,%dl + cmp dl, al + /* If not get the next one */ - jne GetMappedDriveNumberLoopNext + jne GetMappedDriveNumberLoopNext /* If we get here then we have found a mapped drive */ /* Send new drive number on to the old int 13h handler */ - movb %ah,%dl + mov dl, ah + /* Call BIOS Int 13 Handler */ - jmp CallOldInt13Handler + jmp CallOldInt13Handler GetMappedDriveNumberLoopNext: - loop GetMappedDriveNumberLoop + loop GetMappedDriveNumberLoop CallOldInt13Handler: /* Restore the registers we changed off the stack */ - popw %si - popw %cx - popw %ax + pop si + pop cx + pop ax /* Put flags onto stack */ - pushw %cs:(CallersFlags - Int13Handler) + push word ptr cs:[CallersFlags - Int13Handler] + /* Call old int 13h handler with new drive number */ - .byte 0x9a /* lcall */ -EXTERN(_DriveMapOldInt13HandlerAddress) + .byte HEX(9a) /* lcall */ +PUBLIC _DriveMapOldInt13HandlerAddress +_DriveMapOldInt13HandlerAddress: .word 0 .word 0 /* Update the callers flags with the values the BIOS returned */ - pushw %ax + push ax pushf - popw %ax - movw %ax,0x06(%bp) - popw %ax - /* Restore the callers drive number */ - movb %cs:(PassedInDriveNumber - Int13Handler),%dl + pop ax + mov [bp + 6], ax + pop ax - popw %bp + /* Restore the callers drive number */ + mov dl, cs:[PassedInDriveNumber - Int13Handler] + + pop bp iret @@ -105,7 +112,8 @@ CallersFlags: PassedInDriveNumber: .byte 0 -EXTERN(_DriveMapInt13HandlerMapList) +PUBLIC _DriveMapInt13HandlerMapList +_DriveMapInt13HandlerMapList: Int13HandlerMapCount: .byte 0 @@ -129,4 +137,5 @@ Int13HandlerDrive4: Int13HandlerDriveNew4: .byte 0 -EXTERN(_DriveMapInt13HandlerEnd) +PUBLIC _DriveMapInt13HandlerEnd +_DriveMapInt13HandlerEnd: diff --git a/boot/freeldr/freeldr/arch/i386/entry.S b/boot/freeldr/freeldr/arch/i386/entry.S new file mode 100644 index 00000000000..c117aa07c0e --- /dev/null +++ b/boot/freeldr/freeldr/arch/i386/entry.S @@ -0,0 +1,302 @@ +/* + * FreeLoader + * Copyright (C) 1998-2002 Brian Palmer + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include + +EXTERN _BootMain:PROC +EXTERN _InitIdt:PROC +EXTERN _i386Idt:DWORD +//EXTERN _i386idtptr:FWORD + +.code32 + +PUBLIC _RealEntryPoint +_RealEntryPoint: + + /* Setup segment selectors */ + mov ax, PMODE_DS + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* Setup protected mode stack */ + mov esp, dword ptr ds:[stack32] + + /* Load the IDT */ +#ifdef _USE_ML + lidt fword ptr ds:[i386idtptr] +#else + lidt i386idtptr +#endif + + /* Continue execution */ + jmp dword ptr ds:[ContinueAddress] + +ContinueAddress: + .long _FrldrStartup + + +_FrldrStartup: + + /* Store BootDrive and BootPartition */ + mov byte ptr ds:[_FrldrBootDrive], dl + xor eax, eax + mov al, dh + mov dword ptr ds:[_FrldrBootPartition], eax + + /* Patch long jump with real mode entry point */ + mov eax, dword ptr ds:[BSS_RealModeEntry] + mov dword ptr ds:[SwitchToReal16Address], eax + + /* Initialize the idt */ + call _InitIdt + + /* GO! */ + xor eax, eax + push eax + call _BootMain + + /* We should never get here */ +stop: + jmp stop + nop + nop + +Int386_regsin: + .long 0 +Int386_regsout: + .long 0 + +/* + * int Int386(int ivec, REGS* in, REGS* out); + */ +PUBLIC _Int386 +_Int386: + + /* Get the function parameters */ + mov eax, dword ptr [esp + 4] + mov dword ptr ds:[BSS_IntVector], eax + mov eax, dword ptr [esp + 8] + mov dword ptr [Int386_regsin], eax + mov eax, dword ptr [esp + 12] + mov dword ptr [Int386_regsout], eax + + /* Save all registers + segment registers */ + push ds + push es + push fs + push gs + pusha + + /* Copy input registers */ + mov esi, dword ptr [Int386_regsin] + mov edi, BSS_RegisterSet + mov ecx, 9 + rep movsd + + /* Set the function ID */ + mov bx, FNID_Int386 + + /* Set continue address and switch to real mode */ + mov dword ptr [ContinueAddress], offset Int386_return + jmp SwitchToReal + +Int386_return: + + /* Copy output registers */ + mov esi, BSS_RegisterSet + mov edi, dword ptr [Int386_regsout] + mov ecx, 9 + rep movsd + + popa + pop gs + pop fs + pop es + pop ds + ret + + +/* + * U16 PxeCallApi(U16 Segment, U16 Offset, U16 Service, VOID *Parameter); + * + * RETURNS: + */ +PUBLIC _PxeCallApi +_PxeCallApi: + push ebp + mov ebp, esp + + pusha + push es + + /* copy entry point */ + mov eax, [ebp + 8] + shl eax, 16 + mov ax, [ebp + 12] + mov dword ptr ds:[BSS_PxeEntryPoint], eax + + /* copy function */ + mov ax, [ebp + 16] + mov word ptr ds:[BSS_PxeFunction], ax + + /* convert pointer to data buffer to segment/offset */ + mov eax, [ebp + 20] + shr eax, 4 + and eax, HEX(0f000) + mov word ptr ds:[BSS_PxeBufferSegment], ax + mov eax, [ebp + 20] + and eax, HEX(0ffff) + mov word ptr ds:[BSS_PxeBufferOffset], ax + + /* Set the function ID and call realmode */ + mov bx, FNID_PxeCallApi + call i386CallRealMode + + pop es + popa + + mov esp, ebp + pop ebp + + mov ax, word ptr [BSS_PxeResult] + + ret + + +PUBLIC _SoftReboot +_SoftReboot: + /* Set the function ID */ + mov bx, FNID_SoftReboot + + /*Switch to real mode (We don't return) */ + jmp SwitchToReal + + +PUBLIC _ChainLoadBiosBootSectorCode +_ChainLoadBiosBootSectorCode: + /* Set the boot drive */ + mov dl, byte ptr [_FrldrBootDrive] + + /* Set the function ID */ + mov bx, FNID_ChainLoadBiosBootSectorCode + + /*Switch to real mode (We don't return) */ + jmp SwitchToReal + + +PUBLIC i386CallRealMode +i386CallRealMode: + /* Set continue address and switch to real mode */ + mov dword ptr [ContinueAddress], offset i386CallRealMode_return + jmp SwitchToReal +i386CallRealMode_return: + ret + + +/* Entrypoint for realmode function calls + * ContinueAddress must be set to the return point from realmode + * bx must be set to the ID of the realmode function to call. */ +SwitchToReal: + /* Set sane segments */ + mov ax, PMODE_DS + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* Save 32-bit stack pointer */ + mov dword ptr [stack32], esp + + /* jmp to 16-bit segment to set the limit correctly */ + .byte HEX(0ea) // jmp far RMODE_CS:switch_to_real16 +SwitchToReal16Address: + .long 0 // receives address of switch_to_real16 + .word RMODE_CS + nop + + + /* 16-bit stack pointer */ +stack16: + .word STACK16ADDR + + /* 32-bit stack pointer */ +stack32: + .long STACK32ADDR + + .align 4 /* force 4-byte alignment */ +gdt: + /* NULL Descriptor */ + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + + /* 32-bit flat CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9A00) + .word HEX(00CF) + + /* 32-bit flat DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(00CF) + + /* 16-bit real mode CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9E00) + .word HEX(0000) + + /* 16-bit real mode DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(0000) + +/* GDT table pointer */ +gdtptr: + .word HEX(27) /* Limit */ + .long gdt /* Base Address */ + +/* Real-mode IDT pointer */ +rmode_idtptr: + .word HEX(3ff) /* Limit */ + .long 0 /* Base Address */ + +PUBLIC i386idtptr +i386idtptr: + .word 255 /* Limit */ + .long _i386Idt /* Base Address */ + +PUBLIC _FrldrBootDrive +_FrldrBootDrive: + .byte 0 + +PUBLIC _FrldrBootPartition +_FrldrBootPartition: + .long 0 + +END diff --git a/boot/freeldr/freeldr/arch/i386/halstub.c b/boot/freeldr/freeldr/arch/i386/halstub.c index 02aca2b67de..32a4ae6bb3b 100644 --- a/boot/freeldr/freeldr/arch/i386/halstub.c +++ b/boot/freeldr/freeldr/arch/i386/halstub.c @@ -33,7 +33,7 @@ NTAPI xHalVectorToIDTEntry(IN ULONG Vector) { /* Return the vector */ - return Vector; + return (UCHAR)Vector; } VOID diff --git a/boot/freeldr/freeldr/arch/i386/hardware.c b/boot/freeldr/freeldr/arch/i386/hardware.c index 641bd8d4c94..47ec99e6639 100644 --- a/boot/freeldr/freeldr/arch/i386/hardware.c +++ b/boot/freeldr/freeldr/arch/i386/hardware.c @@ -323,7 +323,7 @@ DetectPnpBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber) static PCM_PARTIAL_RESOURCE_LIST -GetHarddiskConfigurationData(ULONG DriveNumber, ULONG* pSize) +GetHarddiskConfigurationData(UCHAR DriveNumber, ULONG* pSize) { PCM_PARTIAL_RESOURCE_LIST PartialResourceList; PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry; @@ -400,7 +400,7 @@ GetHarddiskConfigurationData(ULONG DriveNumber, ULONG* pSize) typedef struct tagDISKCONTEXT { - ULONG DriveNumber; + UCHAR DriveNumber; ULONG SectorSize; ULONGLONG SectorOffset; ULONGLONG SectorCount; @@ -421,7 +421,7 @@ static LONG DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information) RtlZeroMemory(Information, sizeof(FILEINFORMATION)); Information->EndingAddress.QuadPart = (Context->SectorOffset + Context->SectorCount) * Context->SectorSize; - Information->CurrentAddress.LowPart = (Context->SectorOffset + Context->SectorNumber) * Context->SectorSize; + Information->CurrentAddress.QuadPart = (Context->SectorOffset + Context->SectorNumber) * Context->SectorSize; return ESUCCESS; } @@ -429,7 +429,8 @@ static LONG DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information) static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) { DISKCONTEXT* Context; - ULONG DriveNumber, DrivePartition, SectorSize; + UCHAR DriveNumber; + ULONG DrivePartition, SectorSize; ULONGLONG SectorOffset = 0; ULONGLONG SectorCount = 0; PARTITION_TABLE_ENTRY PartitionTableEntry; @@ -527,7 +528,7 @@ static const DEVVTBL DiskVtbl = { static VOID GetHarddiskIdentifier(PCHAR Identifier, - ULONG DriveNumber) + UCHAR DriveNumber) { PMASTER_BOOT_RECORD Mbr; ULONG *Buffer; @@ -568,7 +569,7 @@ GetHarddiskIdentifier(PCHAR Identifier, reactos_arc_strings[reactos_disk_count]; reactos_disk_count++; - sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(0)", DriveNumber - 0x80); + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber - 0x80); FsRegisterDevice(ArcName, &DiskVtbl); /* Add partitions */ @@ -578,7 +579,7 @@ GetHarddiskIdentifier(PCHAR Identifier, { if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) { - sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(%lu)", DriveNumber - 0x80, i); + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(%lu)", DriveNumber - 0x80, i); FsRegisterDevice(ArcName, &DiskVtbl); } i++; @@ -609,7 +610,7 @@ GetHarddiskIdentifier(PCHAR Identifier, DPRINTM(DPRINT_HWDETECT, "Identifier: %s\n", Identifier); } -static ULONG +static UCHAR GetFloppyCount(VOID) { UCHAR Data; @@ -657,7 +658,7 @@ DetectBiosFloppyPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey) CHAR Identifier[20]; PCONFIGURATION_COMPONENT_DATA PeripheralKey; ULONG Size; - ULONG FloppyNumber; + UCHAR FloppyNumber; UCHAR FloppyType; ULONG MaxDensity[6] = {0, 360, 1200, 720, 1440, 2880}; PUCHAR Ptr; @@ -674,7 +675,7 @@ DetectBiosFloppyPeripheral(PCONFIGURATION_COMPONENT_DATA ControllerKey) Ptr = GetInt1eTable(); /* Set 'Identifier' value */ - sprintf(Identifier, "FLOPPY%ld", FloppyNumber + 1); + sprintf(Identifier, "FLOPPY%d", FloppyNumber + 1); Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + sizeof(CM_FLOPPY_DEVICE_DATA); @@ -736,7 +737,7 @@ DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA BusKey) DPRINTM(DPRINT_HWDETECT, "Floppy count: %u\n", FloppyCount); - + Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + 2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); PartialResourceList = MmHeapAlloc(Size); @@ -804,15 +805,14 @@ DetectSystem(VOID) PCM_PARTIAL_RESOURCE_LIST PartialResourceList; PCM_INT13_DRIVE_PARAMETER Int13Drives; GEOMETRY Geometry; - ULONG DiskCount; + UCHAR DiskCount, i; ULONG Size; - ULONG i; BOOLEAN Changed; - + /* Count the number of visible drives */ DiskReportError(FALSE); DiskCount = 0; - + /* There are some really broken BIOSes out there. There are even BIOSes * that happily report success when you ask them to read from non-existent * harddisks. So, we set the buffer to known contents first, then try to @@ -838,7 +838,7 @@ DetectSystem(VOID) DiskReportError(TRUE); DPRINTM(DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n", (int)DiskCount, (DiskCount == 1) ? "": "s"); - + /* Allocate resource descriptor */ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) + sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount; @@ -849,7 +849,7 @@ DetectSystem(VOID) "Failed to allocate resource descriptor\n"); return NULL; } - + /* Initialize resource descriptor */ memset(PartialResourceList, 0, Size); PartialResourceList->Version = 1; @@ -860,7 +860,7 @@ DetectSystem(VOID) PartialResourceList->PartialDescriptors[0].Flags = 0; PartialResourceList->PartialDescriptors[0].u.DeviceSpecificData.DataSize = sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount; - + /* Get harddisk Int13 geometry data */ Int13Drives = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST)); for (i = 0; i < DiskCount; i++) @@ -869,10 +869,10 @@ DetectSystem(VOID) { Int13Drives[i].DriveSelect = 0x80 + i; Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1; - Int13Drives[i].SectorsPerTrack = Geometry.Sectors; - Int13Drives[i].MaxHeads = Geometry.Heads - 1; + Int13Drives[i].SectorsPerTrack = (USHORT)Geometry.Sectors; + Int13Drives[i].MaxHeads = (USHORT)Geometry.Heads - 1; Int13Drives[i].NumberDrives = DiskCount; - + DPRINTM(DPRINT_HWDETECT, "Disk %x: %u Cylinders %u Heads %u Sectors %u Bytes\n", 0x80 + i, @@ -899,12 +899,12 @@ DetectSystem(VOID) return SystemKey; } -static ULONG +static UCHAR GetDiskCount(PCONFIGURATION_COMPONENT_DATA BusKey) { PCONFIGURATION_COMPONENT_DATA System; ULONG ConfigurationDataLength; - ULONG DiskCount = 0; + UCHAR DiskCount = 0; // // Get root component @@ -924,8 +924,8 @@ GetDiskCount(PCONFIGURATION_COMPONENT_DATA BusKey) // by n entries of CM_INT13_DRIVE_PARAMETER // if (ConfigurationDataLength > 0) - DiskCount = (ConfigurationDataLength - sizeof(CM_PARTIAL_RESOURCE_LIST)) - / sizeof(CM_INT13_DRIVE_PARAMETER); + DiskCount = (UCHAR)((ConfigurationDataLength - sizeof(CM_PARTIAL_RESOURCE_LIST)) + / sizeof(CM_INT13_DRIVE_PARAMETER)); // // Return number of disks @@ -940,7 +940,7 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA BusKey) PCONFIGURATION_COMPONENT_DATA DiskKey, ControllerKey; BOOLEAN BootDriveReported = FALSE; ULONG i; - ULONG DiskCount = GetDiskCount(BusKey); + UCHAR DiskCount = GetDiskCount(BusKey); CHAR BootPath[512]; FldrCreateComponentKey(BusKey, @@ -954,20 +954,21 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA BusKey) 0, &ControllerKey); DPRINTM(DPRINT_HWDETECT, "Created key: DiskController\\0\n"); - + /* Create and fill subkey for each harddisk */ for (i = 0; i < DiskCount; i++) { PCM_PARTIAL_RESOURCE_LIST PartialResourceList; ULONG Size; CHAR Identifier[20]; + UCHAR DriveNumber = 0x80 + (UCHAR)i; - if (BootDrive == 0x80 + i) + if (FrldrBootDrive == DriveNumber) BootDriveReported = TRUE; /* Get disk values */ - PartialResourceList = GetHarddiskConfigurationData(0x80 + i, &Size); - GetHarddiskIdentifier(Identifier, 0x80 + i); + PartialResourceList = GetHarddiskConfigurationData(DriveNumber, &Size); + GetHarddiskIdentifier(Identifier, DriveNumber); /* Create disk key */ FldrCreateComponentKey(ControllerKey, @@ -986,15 +987,15 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA BusKey) MachDiskGetBootPath(BootPath, sizeof(BootPath)); /* Add it, if it's a floppy or cdrom */ - if ((BootDrive >= 0x80 && !BootDriveReported) || - DiskIsDriveRemovable(BootDrive)) + if ((FrldrBootDrive >= 0x80 && !BootDriveReported) || + DiskIsDriveRemovable(FrldrBootDrive)) { /* TODO: Check if it's really a cdrom drive */ ULONG* Buffer; ULONG Checksum = 0; /* Read the MBR */ - if (!MachDiskReadLogicalSectors(BootDrive, 16ULL, 1, (PVOID)DISKREADBUFFER)) + if (!MachDiskReadLogicalSectors(FrldrBootDrive, 16ULL, 1, (PVOID)DISKREADBUFFER)) { DPRINTM(DPRINT_HWDETECT, "Reading MBR failed\n"); return; @@ -1020,7 +1021,7 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA BusKey) static VOID InitializeSerialPort(PUCHAR Port, - ULONG LineControl) + UCHAR LineControl) { WRITE_PORT_UCHAR(Port + 3, 0x80); /* set DLAB on */ WRITE_PORT_UCHAR(Port, 0x60); /* speed LO byte */ @@ -1746,9 +1747,9 @@ DetectKeyboardController(PCONFIGURATION_COMPONENT_DATA BusKey) Size, &ControllerKey); DPRINTM(DPRINT_HWDETECT, "Created key: KeyboardController\\0\n"); - + MmHeapFree(PartialResourceList); - + DetectKeyboardPeripheral(ControllerKey); } @@ -2049,14 +2050,14 @@ PcHwDetect(VOID) /* Create the 'System' key */ SystemKey = DetectSystem(); - + /* Detect buses */ DetectPciBios(SystemKey, &BusNumber); DetectApmBios(SystemKey, &BusNumber); DetectPnpBios(SystemKey, &BusNumber); DetectIsaBios(SystemKey, &BusNumber); DetectAcpiBios(SystemKey, &BusNumber); - + DPRINTM(DPRINT_HWDETECT, "DetectHardware() Done\n"); return SystemKey; diff --git a/boot/freeldr/freeldr/arch/i386/hwacpi.c b/boot/freeldr/freeldr/arch/i386/hwacpi.c index 9ca9f128387..4881f29995c 100644 --- a/boot/freeldr/freeldr/arch/i386/hwacpi.c +++ b/boot/freeldr/freeldr/arch/i386/hwacpi.c @@ -65,7 +65,6 @@ DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber) { /* Set up the flag in the loader block */ AcpiPresent = TRUE; - LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE; /* Get BIOS memory map */ RtlZeroMemory(BiosMemoryMap, sizeof(BiosMemoryMap)); diff --git a/boot/freeldr/freeldr/arch/i386/i386cpu.S b/boot/freeldr/freeldr/arch/i386/i386cpu.S index 6dfb91dbf4a..e3ef67d73be 100644 --- a/boot/freeldr/freeldr/arch/i386/i386cpu.S +++ b/boot/freeldr/freeldr/arch/i386/i386cpu.S @@ -20,9 +20,7 @@ .text .code16 -#define ASM - -#include +#include /* * U32 CpuidSupported(VOID); diff --git a/boot/freeldr/freeldr/arch/i386/i386disk.c b/boot/freeldr/freeldr/arch/i386/i386disk.c index bcee4538a07..5656ffa88d5 100644 --- a/boot/freeldr/freeldr/arch/i386/i386disk.c +++ b/boot/freeldr/freeldr/arch/i386/i386disk.c @@ -26,7 +26,7 @@ // FUNCTIONS ///////////////////////////////////////////////////////////////////////////////////////////// -BOOLEAN DiskResetController(ULONG DriveNumber) +BOOLEAN DiskResetController(UCHAR DriveNumber) { REGS RegsIn; REGS RegsOut; @@ -49,9 +49,9 @@ BOOLEAN DiskResetController(ULONG DriveNumber) return INT386_SUCCESS(RegsOut); } -BOOLEAN DiskInt13ExtensionsSupported(ULONG DriveNumber) +BOOLEAN DiskInt13ExtensionsSupported(UCHAR DriveNumber) { - static ULONG LastDriveNumber = 0xffffffff; + static UCHAR LastDriveNumber = 0xff; static BOOLEAN LastSupported; REGS RegsIn; REGS RegsOut; @@ -141,7 +141,7 @@ VOID DiskStopFloppyMotor(VOID) WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0); } -BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT BufferSize) +BOOLEAN DiskGetExtendedDriveParameters(UCHAR DriveNumber, PVOID Buffer, USHORT BufferSize) { REGS RegsIn; REGS RegsOut; diff --git a/boot/freeldr/freeldr/arch/i386/i386idt.S b/boot/freeldr/freeldr/arch/i386/i386idt.S index 8c7df9e44bb..8332cc52361 100644 --- a/boot/freeldr/freeldr/arch/i386/i386idt.S +++ b/boot/freeldr/freeldr/arch/i386/i386idt.S @@ -20,98 +20,97 @@ .text .code16 -#define ASM -#include +#include .p2align 2 /* force 4-byte alignment */ EXTERN(i386idt) /* Exception 0 - Divide By Zero */ - .word i386DivideByZero /* Offset 0 - 15 */ + .word _i386DivideByZero /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Flags, Zero Byte */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 1 - Debug Exception */ - .word i386DebugException /* Offset 0 - 15 */ + .word _i386DebugException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 2 - NMI */ - .word i386NMIException /* Offset 0 - 15 */ + .word _i386NMIException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 3 - Breakpoint (INT 3) */ - .word i386Breakpoint /* Offset 0 - 15 */ + .word _i386Breakpoint /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 4 - Overflow (INTO with EFLAGS[OF] set) */ - .word i386Overflow /* Offset 0 - 15 */ + .word _i386Overflow /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 5 - Bound Exception */ - .word i386BoundException /* Offset 0 - 15 */ + .word _i386BoundException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 6 - Invalid Opcode */ - .word i386InvalidOpcode /* Offset 0 - 15 */ + .word _i386InvalidOpcode /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 7 - FPU Not Available */ - .word i386FPUNotAvailable /* Offset 0 - 15 */ + .word _i386FPUNotAvailable /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 8 - Double Fault */ - .word i386DoubleFault /* Offset 0 - 15 */ + .word _i386DoubleFault /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 9 - Coprocessor Segment Overrun */ - .word i386CoprocessorSegment /* Offset 0 - 15 */ + .word _i386CoprocessorSegment /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 10 (0x0A) - Invalid TSS */ - .word i386InvalidTSS /* Offset 0 - 15 */ + .word _i386InvalidTSS /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 11 (0x0B) - Segment Not Present */ - .word i386SegmentNotPresent /* Offset 0 - 15 */ + .word _i386SegmentNotPresent /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 12 (0x0C) - Stack Exception */ - .word i386StackException /* Offset 0 - 15 */ + .word _i386StackException /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 13 (0x0D) - General Protection Fault */ - .word i386GeneralProtectionFault /* Offset 0 - 15 */ + .word _i386GeneralProtectionFault /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 14 (0x0E) - Page Fault */ - .word i386PageFault /* Offset 0 - 15 */ + .word _i386PageFault /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ @@ -123,19 +122,19 @@ EXTERN(i386idt) .word 0x0000 /* Offset 16 - 31 */ /* Exception 16 (0x10) - Coprocessor Error */ - .word i386CoprocessorError /* Offset 0 - 15 */ + .word _i386CoprocessorError /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 17 (0x11) - Alignment Check */ - .word i386AlignmentCheck /* Offset 0 - 15 */ + .word _i386AlignmentCheck /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ /* Exception 18 (0x12) - Machine Check */ - .word i386MachineCheck /* Offset 0 - 15 */ + .word _i386MachineCheck /* Offset 0 - 15 */ .word 0x0008 /* Selector */ .word 0x8e00 /* Zero byte, flags */ .word 0x0000 /* Offset 16 - 31 */ diff --git a/boot/freeldr/freeldr/arch/i386/i386idt.c b/boot/freeldr/freeldr/arch/i386/i386idt.c new file mode 100644 index 00000000000..a4dd2e8b221 --- /dev/null +++ b/boot/freeldr/freeldr/arch/i386/i386idt.c @@ -0,0 +1,42 @@ + +#include + + +KIDTENTRY DECLSPEC_ALIGN(4) i386Idt[32]; +KDESCRIPTOR i386IdtDescriptor = {0, 255, (ULONG)i386Idt}; + +static +void +InitIdtVector( + UCHAR Vector, + PVOID ServiceHandler, + USHORT Access) +{ + i386Idt[Vector].Offset = (ULONG)ServiceHandler & 0xffff; + i386Idt[Vector].ExtendedOffset = (ULONG)ServiceHandler >> 16; + i386Idt[Vector].Selector = PMODE_CS; + i386Idt[Vector].Access = Access; +} + +void +InitIdt(void) +{ + InitIdtVector(0, i386DivideByZero, 0x8e00); + InitIdtVector(1, i386DebugException, 0x8e00); + InitIdtVector(2, i386NMIException, 0x8e00); + InitIdtVector(3, i386Breakpoint, 0x8e00); + InitIdtVector(4, i386Overflow, 0x8e00); + InitIdtVector(5, i386BoundException, 0x8e00); + InitIdtVector(6, i386InvalidOpcode, 0x8e00); + InitIdtVector(7, i386FPUNotAvailable, 0x8e00); + InitIdtVector(8, i386DoubleFault, 0x8e00); + InitIdtVector(9, i386CoprocessorSegment, 0x8e00); + InitIdtVector(10, i386InvalidTSS, 0x8e00); + InitIdtVector(11, i386SegmentNotPresent, 0x8e00); + InitIdtVector(12, i386StackException, 0x8e00); + InitIdtVector(13, i386GeneralProtectionFault, 0x8e00); + InitIdtVector(14, i386PageFault, 0x8e00); + InitIdtVector(16, i386CoprocessorError, 0x8e00); + InitIdtVector(17, i386AlignmentCheck, 0x8e00); + InitIdtVector(18, i386MachineCheck, 0x8e00); +} diff --git a/boot/freeldr/freeldr/arch/i386/i386pnp.S b/boot/freeldr/freeldr/arch/i386/i386pnp.S index 9276c72b1c4..b66b51adbab 100644 --- a/boot/freeldr/freeldr/arch/i386/i386pnp.S +++ b/boot/freeldr/freeldr/arch/i386/i386pnp.S @@ -17,12 +17,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - .text - .code16 +#include +#include -#define ASM - -#include +.code32 /* @@ -35,68 +33,68 @@ _pnp_bios_entry_point: _pnp_bios_data_segment: .word 0 -EXTERN(_PnpBiosSupported) - .code32 +PUBLIC _PnpBiosSupported +_PnpBiosSupported: - pushl %edi - pushl %esi - pushl %ecx - pushl %edx + push edi + push esi + push ecx + push edx - xorl %edi,%edi + xor edi, edi /* init esi */ - movl $0xF0000,%esi + mov esi, HEX(0F0000) pnp_again: - movl (%esi),%eax - cmp $0x506E5024,%eax /* "$PnP" */ - je pnp_found + mov eax, [esi] + cmp eax, HEX(506E5024) /* "$PnP" */ + je pnp_found - cmp $0xFFFF0,%esi - je pnp_not_found + cmp esi, HEX(0FFFF0) + je pnp_not_found pnp_add: - addl $0x10,%esi - jmp pnp_again + add esi, 16 + jmp pnp_again pnp_found: /* first calculate the checksum */ - pushl %esi + push esi - pushl $0x21 - popl %ecx - xorl %edx, %edx + push HEX(21) + pop ecx + xor edx, edx pnp_loop: lodsb - addb %al,%dl - loopl pnp_loop + add dl, al + loop pnp_loop - testb %dl, %dl - popl %esi - jnz pnp_add + test dl, dl + pop esi + jnz pnp_add - movl %esi,%edi + mov edi, esi /* Calculate the bios entry point (far pointer) */ - xorl %eax,%eax - movw 0x0F(%esi),%ax - shll $16,%eax - movw 0x0D(%esi),%ax - movl %eax,_pnp_bios_entry_point + xor eax, eax + mov ax, [esi + 15] + shl eax, 16 + mov ax, [esi + 0x0D] + mov _pnp_bios_entry_point, eax /* Store bios data segment */ - movw 0x1B(%esi),%ax - movw %ax,_pnp_bios_data_segment + mov ax, [esi + 0x1B] + mov _pnp_bios_data_segment, ax pnp_not_found: - movl %edi,%eax + mov eax, edi - popl %edx - popl %ecx - popl %esi - popl %edi + pop edx + pop ecx + pop esi + pop edi ret @@ -113,58 +111,58 @@ _pnp_node_size: _pnp_node_count: .word 0 -EXTERN(_PnpBiosGetDeviceNodeCount) - .code32 +PUBLIC _PnpBiosGetDeviceNodeCount +_PnpBiosGetDeviceNodeCount: - pushl %ebp - movl %esp,%ebp + push ebp + mov ebp, esp - pushal - push %es + pusha + push es - call switch_to_real + call switch_to_real .code16 - movw _pnp_bios_data_segment,%ax - pushw %ax + mov ax, word ptr [_pnp_bios_data_segment] + push ax - pushw %cs - movw $(_pnp_node_size),%ax - pushw %ax + push cs + mov ax, offset _pnp_node_size + push ax - pushw %cs - movw $(_pnp_node_count),%ax - pushw %ax + push cs + mov ax, offset _pnp_node_count + push ax - pushw $0 + push 0 - lcall *_pnp_bios_entry_point - addw $12,%sp + call dword ptr [_pnp_bios_entry_point] + add sp, 12 - movzwl %ax,%ecx - movl %ecx,_pnp_result + movzx ecx, ax + mov _pnp_result, ecx - - call switch_to_prot + + call switch_to_prot .code32 - movl 0x08(%ebp),%esi - movw _pnp_node_size,%ax - movzwl %ax,%ecx - movl %ecx, (%esi) + mov esi, [ebp + 8] + mov ax, _pnp_node_size + movzx ecx, ax + mov [esi], ecx - movl 0x0C(%ebp),%esi - movw _pnp_node_count,%ax - movzwl %ax,%ecx - movl %eax, (%esi) + mov esi, [ebp + 12] + mov ax, _pnp_node_count + movzx ecx, ax + mov [esi], eax - pop %es - popal + pop es + popa - movl %ebp,%esp - popl %ebp + mov esp, ebp + pop ebp - movl _pnp_result,%eax + mov eax, _pnp_result ret @@ -185,72 +183,72 @@ _pnp_node_number: EXTERN(_PnpBiosGetDeviceNode) .code32 - pushl %ebp - movl %esp,%ebp + push ebp + mov ebp, esp - pushal - push %es + pusha + push es /* get current node number */ - movl 0x08(%ebp),%esi - movb (%esi),%al - movb %al,_pnp_node_number + mov esi, [ebp + 8] + mov al, [esi] + mov _pnp_node_number, al - /* convert pointer to node buffer to segment/offset */ - movl 0x0C(%ebp),%eax - shrl $4,%eax - andl $0xf000,%eax - movw %ax,_pnp_buffer_segment - movl 0x0C(%ebp),%eax - andl $0xffff,%eax - movw %ax,_pnp_buffer_offset + /* convert pointer to node buffer to segment/offset */ + mov eax, [ebp + 12] + shr eax, 4 + and eax, 0xf000 + mov _pnp_buffer_segment, ax + mov eax, [ebp + 12] + and eax, 0xffff + mov _pnp_buffer_offset, ax - call switch_to_real + call switch_to_real .code16 /* push bios segment */ - movw _pnp_bios_data_segment,%ax - pushw %ax + mov ax, word ptr [_pnp_bios_data_segment] + push ax - /* push control flag */ - pushw $0x0001 + /* push control flag */ + push 1 /* push pointer to node buffer (segment/offset) */ - movw _pnp_buffer_segment,%ax - pushw %ax - movw _pnp_buffer_offset,%ax - pushw %ax + mov ax, word ptr [_pnp_buffer_segment] + push ax + mov ax, word ptr [_pnp_buffer_offset] + push ax /* push pointer to node number (segment/offset) */ - pushw %cs - movw $(_pnp_node_number),%ax - pushw %ax + push cs + mov ax, offset _pnp_node_number + push ax /* push function number */ - pushw $1 + push 1 /* call entry point */ - lcall *_pnp_bios_entry_point - addw $14,%sp + call dword ptr [_pnp_bios_entry_point] + add sp, 14 - movzwl %ax,%ecx - movl %ecx,_pnp_result + movzx ecx, ax + mov _pnp_result, ecx - call switch_to_prot + call switch_to_prot .code32 /* update node number */ - movl 0x08(%ebp),%esi - movb _pnp_node_number,%al - movb %al,(%esi) + mov esi, [ebp + 8] + mov al, _pnp_node_number + mov [esi], al - pop %es - popal + pop es + popa - movl %ebp,%esp - popl %ebp + mov esp, ebp + pop ebp - movl _pnp_result,%eax + mov eax, _pnp_result ret diff --git a/boot/freeldr/freeldr/arch/i386/i386pnp.cmake.S b/boot/freeldr/freeldr/arch/i386/i386pnp.cmake.S new file mode 100644 index 00000000000..1721d3ef0a5 --- /dev/null +++ b/boot/freeldr/freeldr/arch/i386/i386pnp.cmake.S @@ -0,0 +1,184 @@ +/* + * FreeLoader + * Copyright (C) 2003 Eric Kohl + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include + +EXTERN i386CallRealMode:PROC + +.code32 + +/* + * U32 PnpBiosSupported(VOID); + * + * RETURNS: + */ +PUBLIC _PnpBiosSupported +_PnpBiosSupported: + + push edi + push esi + push ecx + push edx + + xor edi, edi + + /* init esi */ + mov esi, HEX(0F0000) + +pnp_again: + mov eax, [esi] + cmp eax, HEX(506E5024) /* "$PnP" */ + je pnp_found + + cmp esi, HEX(0FFFF0) + je pnp_not_found + +pnp_add: + add esi, 16 + jmp pnp_again + +pnp_found: + /* first calculate the checksum */ + push esi + + push HEX(21) + pop ecx + xor edx, edx + +pnp_loop: + lodsb + add dl, al + loop pnp_loop + + test dl, dl + pop esi + jnz pnp_add + + mov edi, esi + + /* Calculate the bios entry point (far pointer) */ + xor eax, eax + mov ax, [esi + HEX(0F)] + shl eax, 16 + mov ax, [esi + HEX(0D)] + mov dword ptr ds:[BSS_PnpBiosEntryPoint], eax + + /* Store bios data segment */ + mov ax, [esi + HEX(1B)] + mov word ptr ds:[BSS_PnpBiosDataSegment], ax + +pnp_not_found: + mov eax, edi + + pop edx + pop ecx + pop esi + pop edi + + ret + + +/* + * U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize, U32 *NodeCount); + * + * RETURNS: + */ +PUBLIC _PnpBiosGetDeviceNodeCount +_PnpBiosGetDeviceNodeCount: + + push ebp + mov ebp, esp + + pusha + push es + + mov bx, FNID_PnpBiosGetDeviceNodeCount + call i386CallRealMode + + mov esi, [ebp + 8] + mov ax, [BSS_PnpNodeSize] + movzx ecx, ax + mov [esi], ecx + + mov esi, [ebp + 12] + mov ax, [BSS_PnpNodeCount] + movzx ecx, ax + mov [esi], eax + + pop es + popa + + mov esp, ebp + pop ebp + + mov eax, dword ptr [BSS_PnpResult] + + ret + + +/* + * U32 PnpBiosGetDeviceNode(U8 *NodeId, U8 *NodeBuffer); + * + * RETURNS: + */ +PUBLIC _PnpBiosGetDeviceNode +_PnpBiosGetDeviceNode: + .code32 + + push ebp + mov ebp, esp + + pusha + push es + + /* get current node number */ + mov esi, [ebp + 8] + mov al, [esi] + mov byte ptr ds:[BSS_PnpNodeNumber], al + + /* convert pointer to node buffer to segment/offset */ + mov eax, [ebp + 12] + shr eax, 4 + and eax, HEX(0f000) + mov word ptr ds:[BSS_PnpBiosBufferSegment], ax + mov eax, [ebp + 12] + and eax, HEX(0ffff) + mov word ptr ds:[BSS_PnpBiosBufferOffset], ax + + mov bx, FNID_PnpBiosGetDeviceNode + call i386CallRealMode + + /* update node number */ + mov esi, [ebp + 8] + mov al, byte ptr ds:[BSS_PnpNodeNumber] + mov [esi], al + + pop es + popa + + mov esp, ebp + pop ebp + + mov eax, [BSS_PnpResult] + + ret + +END +/* EOF */ diff --git a/boot/freeldr/freeldr/arch/i386/i386pxe.S b/boot/freeldr/freeldr/arch/i386/i386pxe.S index 71442135f36..72f03a3bcca 100644 --- a/boot/freeldr/freeldr/arch/i386/i386pxe.S +++ b/boot/freeldr/freeldr/arch/i386/i386pxe.S @@ -20,9 +20,8 @@ .text .code16 -#define ASM +#include -#include /* * U16 PxeCallApi(U16 Segment, U16 Offset, U16 Service, VOID *Parameter); diff --git a/boot/freeldr/freeldr/arch/i386/i386trap.S b/boot/freeldr/freeldr/arch/i386/i386trap.S index be5c7de3ce9..c579cb96c28 100644 --- a/boot/freeldr/freeldr/arch/i386/i386trap.S +++ b/boot/freeldr/freeldr/arch/i386/i386trap.S @@ -17,17 +17,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -.intel_syntax noprefix - .text - .code16 - -#define ASM -#include +#include +#include #include #define SCREEN_ATTR 0x1f /* Bright white on blue background */ -.macro SAVE_CPU_REGS +EXTERN _i386PrintExceptionText@12:PROC + +.code32 + +MACRO(SAVE_CPU_REGS) /* push the rest of the KTRAP_FRAME */ push ebp push ebx @@ -61,8 +61,8 @@ sub esp, 44 sgdt [esp] sidt [esp + 8] - str [esp + 16] - sldt [esp + 18] + str word ptr [esp + 16] + sldt word ptr [esp + 18] mov eax, dr7; push eax mov eax, dr6; @@ -83,16 +83,14 @@ push eax mov eax, cr0; push eax -.endm +ENDM /* Set by each exception handler to the address of the description text */ i386ExceptionIndex: .long 0 - /************************************************************************/ i386CommonExceptionHandler: - .code32 SAVE_CPU_REGS @@ -109,69 +107,86 @@ i386ExceptionHandlerHang: iret -.macro TRAP_STUB function, index - EXTERN(\function) +MACRO(TRAP_STUB, function, index) + PUBLIC VAL(function) +#ifdef _USE_ML + function: +#else + \function: +#endif push 0 // Fake error code - mov dword ptr i386ExceptionIndex, \index + mov dword ptr i386ExceptionIndex, VAL(index) jmp i386CommonExceptionHandler -.endm +ENDM -.macro TRAP_STUB2 function, index - EXTERN(\function) - mov dword ptr i386ExceptionIndex, \index +MACRO(TRAP_STUB2, function, index) + PUBLIC VAL(function) +#ifdef _USE_ML + function: +#else + \function: +#endif + mov dword ptr i386ExceptionIndex, VAL(index) jmp i386CommonExceptionHandler -.endm +ENDM /************************************************************************/ -TRAP_STUB i386DivideByZero, 0 -TRAP_STUB i386DebugException, 1 -TRAP_STUB i386NMIException, 2 -TRAP_STUB i386Breakpoint, 3 -TRAP_STUB i386Overflow, 4 -TRAP_STUB i386BoundException, 5 -TRAP_STUB i386InvalidOpcode, 6 -TRAP_STUB i386FPUNotAvailable, 7 -TRAP_STUB2 i386DoubleFault, 8 -TRAP_STUB i386CoprocessorSegment, 9 -TRAP_STUB2 i386InvalidTSS, 10 -TRAP_STUB2 i386SegmentNotPresent, 11 -TRAP_STUB2 i386StackException, 12 -TRAP_STUB2 i386GeneralProtectionFault, 13 -TRAP_STUB2 i386PageFault, 14 +TRAP_STUB _i386DivideByZero, 0 + +TRAP_STUB _i386DebugException, 1 +TRAP_STUB _i386NMIException, 2 +TRAP_STUB _i386Breakpoint, 3 +TRAP_STUB _i386Overflow, 4 +TRAP_STUB _i386BoundException, 5 +TRAP_STUB _i386InvalidOpcode, 6 +TRAP_STUB _i386FPUNotAvailable, 7 +TRAP_STUB2 _i386DoubleFault, 8 +TRAP_STUB _i386CoprocessorSegment, 9 +TRAP_STUB2 _i386InvalidTSS, 10 +TRAP_STUB2 _i386SegmentNotPresent, 11 +TRAP_STUB2 _i386StackException, 12 +TRAP_STUB2 _i386GeneralProtectionFault, 13 +TRAP_STUB2 _i386PageFault, 14 // 15 is reserved -TRAP_STUB i386CoprocessorError, 16 -TRAP_STUB i386AlignmentCheck, 17 -TRAP_STUB i386MachineCheck, 18 -TRAP_STUB i386SimdFloatError, 19 +TRAP_STUB _i386CoprocessorError, 16 +TRAP_STUB _i386AlignmentCheck, 17 +TRAP_STUB _i386MachineCheck, 18 +TRAP_STUB _i386SimdFloatError, 19 /************************************************************************ * DEBUGGING SUPPORT FUNCTIONS ************************************************************************/ -.macro BREAKPOINT_TEPLATE functionname, mask1, mask2 - EXTERN(\functionname) +MACRO(BREAKPOINT_TEPLATE, functionname, mask1, mask2) + PUBLIC VAL(functionname) +#ifdef _USE_ML + functionname: +#else + \functionname: +#endif push eax mov eax, [esp + 8] mov dr3, eax mov eax, dr7 - and eax, \mask1 - or eax, \mask2 + and eax, VAL(mask1) + or eax, VAL(mask2) mov dr7, eax pop eax ret -.endm +ENDM -BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT1, 0xfff0ffff, 0x00000303 -BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT1, 0xfff0ffff, 0x00030303 -BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT1, 0xfff0ffff, 0x00010303 -BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT2, 0xff0fffff, 0x0000030c -BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT2, 0xff0fffff, 0x0030030c -BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT2, 0xff0fffff, 0x0010030c -BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT3, 0xf0ffffff, 0x00000330 -BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT3, 0xf0ffffff, 0x03000330 -BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT3, 0xf0ffffff, 0x01000330 -BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT4, 0x0fffffff, 0x000003c0 -BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT4, 0x0fffffff, 0x300003c0 -BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT4, 0x0fffffff, 0x100003c0 +BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT1, HEX(0fff0ffff), HEX(000000303) +BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT1, HEX(0fff0ffff), HEX(000030303) +BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT1, HEX(0fff0ffff), HEX(000010303) +BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT2, HEX(0ff0fffff), HEX(00000030c) +BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT2, HEX(0ff0fffff), HEX(00030030c) +BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT2, HEX(0ff0fffff), HEX(00010030c) +BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT3, HEX(0f0ffffff), HEX(000000330) +BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT3, HEX(0f0ffffff), HEX(003000330) +BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT3, HEX(0f0ffffff), HEX(001000330) +BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT4, HEX(00fffffff), HEX(0000003c0) +BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT4, HEX(00fffffff), HEX(0300003c0) +BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT4, HEX(00fffffff), HEX(0100003c0) +END diff --git a/boot/freeldr/freeldr/arch/i386/int386.S b/boot/freeldr/freeldr/arch/i386/int386.S index 14086bf391f..1d614675fc9 100644 --- a/boot/freeldr/freeldr/arch/i386/int386.S +++ b/boot/freeldr/freeldr/arch/i386/int386.S @@ -20,8 +20,7 @@ .text .code16 -#define ASM -#include +#include /* Only these flags are propagated into Int386() */ #define FLAGS_PROP (I386FLAG_CF | \ @@ -172,9 +171,9 @@ Int386_vector_opcode: movsb /* Restore segment and all other registers */ - - - popal + + + popal popw %gs popw %fs popw %es diff --git a/boot/freeldr/freeldr/arch/i386/linux.S b/boot/freeldr/freeldr/arch/i386/linux.S index 2d288268324..51e6fb7344b 100644 --- a/boot/freeldr/freeldr/arch/i386/linux.S +++ b/boot/freeldr/freeldr/arch/i386/linux.S @@ -20,9 +20,7 @@ .text .code16 -#define ASM -#include - +#include .code32 EXTERN(_BootNewLinuxKernel) @@ -30,7 +28,7 @@ EXTERN(_BootNewLinuxKernel) .code16 /* Set the boot drive */ - movb (_BootDrive),%dl + movb (_FrldrBootDrive),%dl /* Load segment registers */ cli @@ -66,7 +64,7 @@ EXTERN(_BootOldLinuxKernel) .code16 /* Set the boot drive */ - movb (_BootDrive),%dl + movb (_FrldrBootDrive),%dl /* Load segment registers */ cli diff --git a/boot/freeldr/freeldr/arch/i386/linux.cmake.S b/boot/freeldr/freeldr/arch/i386/linux.cmake.S new file mode 100644 index 00000000000..e605aea301b --- /dev/null +++ b/boot/freeldr/freeldr/arch/i386/linux.cmake.S @@ -0,0 +1,55 @@ +/* + * FreeLoader + * Copyright (C) 1998-2002 Brian Palmer + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include + +EXTERN i386CallRealMode:PROC + +.code32 + +/* + * VOID BootOldLinuxKernel(ULONG KernelSize); + */ +PUBLIC _BootOldLinuxKernel +_BootOldLinuxKernel: + + /* First we have to copy the kernel down from 0x100000 to 0x10000 */ + /* The reason we can overwrite low memory is because this code */ + /* executes between 0000:8000 and 0000:FFFF. That leaves space for */ + /* 32k of code before we start interfering with Linux kernel address space. */ + + /* Get KernelSize in ECX and move the kernel down */ + mov ecx, [esp + 4] + mov esi, HEX(100000) + mov edi, HEX(10000) + rep movsb + + /* Fall through */ + +PUBLIC _BootNewLinuxKernel +_BootNewLinuxKernel: + + mov bx, FNID_BootLinuxKernel + call i386CallRealMode + + /* We should never get here */ + int 3 + +END diff --git a/boot/freeldr/freeldr/arch/i386/loader.c b/boot/freeldr/freeldr/arch/i386/loader.c deleted file mode 100644 index c9ae5c454e1..00000000000 --- a/boot/freeldr/freeldr/arch/i386/loader.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - * FreeLoader - * Copyright (C) 1998-2003 Brian Palmer - * Copyright (C) 2005 Alex Ionescu - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#include - -#define NDEBUG -#include - -/* Page Directory and Tables for non-PAE Systems */ -extern PAGE_DIRECTORY_X86 startup_pagedirectory; -extern PAGE_DIRECTORY_X86 lowmem_pagetable; -extern PAGE_DIRECTORY_X86 kernel_pagetable; -extern PAGE_DIRECTORY_X86 apic_pagetable; -extern ULONG_PTR KernelBase; -extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint; - -/* FUNCTIONS *****************************************************************/ - -/*++ - * FrLdrStartup - * INTERNAL - * - * Prepares the system for loading the Kernel. - * - * Params: - * Magic - Multiboot Magic - * - * Returns: - * None. - * - * Remarks: - * None. - * - *--*/ -VOID -NTAPI -FrLdrStartup(ULONG Magic) -{ - /* Disable Interrupts */ - _disable(); - - /* Re-initalize EFLAGS */ - __writeeflags(0); - - /* Initialize the page directory */ - FrLdrSetupPageDirectory(); - - /* Initialize Paging, Write-Protection and Load NTOSKRNL */ - FrLdrSetupPae(Magic); -} - -/*++ - * FrLdrSetupPae - * INTERNAL - * - * Configures PAE on a MP System, and sets the PDBR if it's supported, or if - * the system is UP. - * - * Params: - * Magic - Multiboot Magic - * - * Returns: - * None. - * - * Remarks: - * None. - * - *--*/ -VOID -FASTCALL -FrLdrSetupPae(ULONG Magic) -{ - ULONG_PTR PageDirectoryBaseAddress = (ULONG_PTR)&startup_pagedirectory; - - /* Set the PDBR */ - __writecr3(PageDirectoryBaseAddress); - - /* Enable Paging and Write Protect*/ - __writecr0(__readcr0() | CR0_PG | CR0_WP); - - /* Jump to Kernel */ - (*KernelEntryPoint)(&LoaderBlock); -} - -/*++ - * FrLdrSetupPageDirectory - * INTERNAL - * - * Sets up the ReactOS Startup Page Directory. - * - * Params: - * None. - * - * Returns: - * None. - * - * Remarks: - * We are setting PDEs, but using the equvivalent (for our purpose) PTE structure. - * As such, please note that PageFrameNumber == PageEntryNumber. - * - *--*/ -VOID -FASTCALL -FrLdrSetupPageDirectory(VOID) -{ - PPAGE_DIRECTORY_X86 PageDir; - ULONG KernelPageTableIndex; - ULONG i; - - /* Get the Kernel Table Index */ - KernelPageTableIndex = KernelBase >> PDE_SHIFT; - - /* Get the Startup Page Directory */ - PageDir = (PPAGE_DIRECTORY_X86)&startup_pagedirectory; - - /* Set up the Low Memory PDE */ - PageDir->Pde[LowMemPageTableIndex].Valid = 1; - PageDir->Pde[LowMemPageTableIndex].Write = 1; - PageDir->Pde[LowMemPageTableIndex].PageFrameNumber = PaPtrToPfn(lowmem_pagetable); - - /* Set up the Kernel PDEs */ - PageDir->Pde[KernelPageTableIndex].Valid = 1; - PageDir->Pde[KernelPageTableIndex].Write = 1; - PageDir->Pde[KernelPageTableIndex].PageFrameNumber = PaPtrToPfn(kernel_pagetable); - PageDir->Pde[KernelPageTableIndex + 1].Valid = 1; - PageDir->Pde[KernelPageTableIndex + 1].Write = 1; - PageDir->Pde[KernelPageTableIndex + 1].PageFrameNumber = PaPtrToPfn(kernel_pagetable + 4096); - - /* Set up the Startup PDE */ - PageDir->Pde[StartupPageTableIndex].Valid = 1; - PageDir->Pde[StartupPageTableIndex].Write = 1; - PageDir->Pde[StartupPageTableIndex].PageFrameNumber = PaPtrToPfn(startup_pagedirectory); - - /* Set up the HAL PDE */ - PageDir->Pde[HalPageTableIndex].Valid = 1; - PageDir->Pde[HalPageTableIndex].Write = 1; - PageDir->Pde[HalPageTableIndex].PageFrameNumber = PaPtrToPfn(apic_pagetable); - - /* Set up Low Memory PTEs */ - PageDir = (PPAGE_DIRECTORY_X86)&lowmem_pagetable; - for (i=0; i<1024; i++) - { - PageDir->Pde[i].Valid = 1; - PageDir->Pde[i].Write = 1; - PageDir->Pde[i].Owner = 1; - PageDir->Pde[i].PageFrameNumber = PaToPfn(i * PAGE_SIZE); - } - - /* Set up Kernel PTEs */ - PageDir = (PPAGE_DIRECTORY_X86)&kernel_pagetable; - for (i=0; i<1536; i++) - { - PageDir->Pde[i].Valid = 1; - PageDir->Pde[i].Write = 1; - PageDir->Pde[i].PageFrameNumber = PaToPfn(KERNEL_BASE_PHYS + i * PAGE_SIZE); - } - - /* Setup APIC Base */ - PageDir = (PPAGE_DIRECTORY_X86)&apic_pagetable; - PageDir->Pde[0].Valid = 1; - PageDir->Pde[0].Write = 1; - PageDir->Pde[0].CacheDisable = 1; - PageDir->Pde[0].WriteThrough = 1; - PageDir->Pde[0].PageFrameNumber = PaToPfn(HAL_BASE); - PageDir->Pde[0x200].Valid = 1; - PageDir->Pde[0x200].Write = 1; - PageDir->Pde[0x200].CacheDisable = 1; - PageDir->Pde[0x200].WriteThrough = 1; - PageDir->Pde[0x200].PageFrameNumber = PaToPfn(HAL_BASE + KERNEL_BASE_PHYS); - - /* Setup KUSER_SHARED_DATA Base */ - PageDir->Pde[0x1F0].Valid = 1; - PageDir->Pde[0x1F0].Write = 1; - PageDir->Pde[0x1F0].PageFrameNumber = 2; - - /* Setup KPCR Base*/ - PageDir->Pde[0x1FF].Valid = 1; - PageDir->Pde[0x1FF].Write = 1; - PageDir->Pde[0x1FF].PageFrameNumber = 1; - - /* Zero shared data */ - RtlZeroMemory((PVOID)(2 << MM_PAGE_SHIFT), PAGE_SIZE); -} - diff --git a/boot/freeldr/freeldr/arch/i386/machpc.c b/boot/freeldr/freeldr/arch/i386/machpc.c index c585c97932d..42d92321473 100644 --- a/boot/freeldr/freeldr/arch/i386/machpc.c +++ b/boot/freeldr/freeldr/arch/i386/machpc.c @@ -22,8 +22,6 @@ VOID PcMachInit(const char *CmdLine) { - EnableA20(); - /* Setup vtbl */ MachVtbl.ConsPutChar = PcConsPutChar; MachVtbl.ConsKbHit = PcConsKbHit; diff --git a/boot/freeldr/freeldr/arch/i386/mb.S b/boot/freeldr/freeldr/arch/i386/mb.S index 3b36d179053..592e066b58f 100644 --- a/boot/freeldr/freeldr/arch/i386/mb.S +++ b/boot/freeldr/freeldr/arch/i386/mb.S @@ -17,40 +17,22 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - .text - .code16 - -#define ASM -#include +#include +#include #include - /* - * Here we assume the kernel is loaded at 1mb - * This boots the kernel - */ - .code32 - .globl _PageDirectoryStart - - .globl _startup_pagedirectory - .globl _lowmem_pagetable - .globl _kernel_pagetable - .globl _apic_pagetable +.code32 +PUBLIC _PageDirectoryStart - .globl _PageDirectoryEnd - - // - // Boot information structure - // - -EXTERN(_reactos_memory_map_descriptor_size) - .long 0 - -EXTERN(_reactos_memory_map) - .rept (32 * /*sizeof(memory_map_t)*/24) - .byte 0 - .endr +PUBLIC _startup_pagedirectory +PUBLIC _lowmem_pagetable +PUBLIC _kernel_pagetable +PUBLIC _apic_pagetable +PUBLIC _PageDirectoryEnd +#ifndef _USE_ML .bss +#endif _PageDirectoryStart: _startup_pagedirectory: .fill 4096, 1, 0 @@ -65,3 +47,5 @@ _apic_pagetable: .fill 4096, 1, 0 _PageDirectoryEnd: + +END diff --git a/boot/freeldr/freeldr/arch/i386/miscboot.c b/boot/freeldr/freeldr/arch/i386/miscboot.c index 1f30141ce7f..691c297f366 100644 --- a/boot/freeldr/freeldr/arch/i386/miscboot.c +++ b/boot/freeldr/freeldr/arch/i386/miscboot.c @@ -85,7 +85,7 @@ VOID LoadAndBootPartition(PCSTR OperatingSystemName) CHAR SettingValue[80]; ULONG SectionId; PARTITION_TABLE_ENTRY PartitionTableEntry; - ULONG DriveNumber; + UCHAR DriveNumber; ULONG PartitionNumber; // Find all the message box settings and run them @@ -156,7 +156,7 @@ VOID LoadAndBootDrive(PCSTR OperatingSystemName) CHAR SettingName[80]; CHAR SettingValue[80]; ULONG SectionId; - ULONG DriveNumber; + UCHAR DriveNumber; // Find all the message box settings and run them UiShowMessageBoxesInSection(OperatingSystemName); diff --git a/boot/freeldr/freeldr/arch/i386/multiboot.S b/boot/freeldr/freeldr/arch/i386/multiboot.S new file mode 100644 index 00000000000..5c1e7241dd1 --- /dev/null +++ b/boot/freeldr/freeldr/arch/i386/multiboot.S @@ -0,0 +1,215 @@ +/* + * FreeLoader + * Copyright (C) 1998-2002 Brian Palmer + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include +#include + + +/* Multiboot support + * + * Allows freeldr to be loaded as a "multiboot kernel" by + * other boot loaders like Grub + * This code is not referenced from anywhere. GRUB searches for + * the header signature and uses the header to load it. + */ + +#define MB_INFO_SIZE 90 +#define MB_INFO_FLAGS_OFFSET 0 +#define MB_INFO_BOOT_DEVICE_OFFSET 12 +#define MB_INFO_COMMAND_LINE_OFFSET 16 +#define CMDLINE_SIZE 256 + +/* + * We want to execute at 0x8000 (to be compatible with bootsector + * loading), but Grub only allows loading of multiboot kernels + * above 1MB. So we let Grub load us there and then relocate + * ourself to 0x8000 + */ +#define INITIAL_BASE HEX(200000) + + /* Align 32 bits boundary */ +.align 4 + + /* Multiboot header */ +MultibootHeader: + /* magic */ + .long MULTIBOOT_HEADER_MAGIC + /* flags */ + .long MULTIBOOT_HEADER_FLAGS + /* checksum */ + .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) + /* header_addr */ + .long INITIAL_BASE + MultibootHeader - FREELDR_BASE + /* load_addr */ + .long INITIAL_BASE + /* load_end_addr */ + .long INITIAL_BASE + __bss_start__ - FREELDR_BASE + /* bss_end_addr */ + .long INITIAL_BASE + __bss_end__ - FREELDR_BASE + /* entry_addr */ + .long INITIAL_BASE + MultibootEntry - FREELDR_BASE + +MultibootEntry: + cli /* Even after setting up the our IDT below we are + * not ready to handle hardware interrupts (no entries + * in IDT), so there's no sti here. Interrupts will be + * enabled in due time */ + + /* Although the multiboot spec says we should be called with the + * segment registers set to 4GB flat mode, let's be sure and set up + * our own */ + lgdt gdtptrhigh + INITIAL_BASE - FREELDR_BASE + /* Reload segment selectors */ + //ljmp $PMODE_CS, $(mb1 + INITIAL_BASE - FREELDR_BASE) + jmp far ptr PMODE_CS: (mb1 + INITIAL_BASE - FREELDR_BASE) +mb1: + mov dx, PMODE_DS + mov ds, dx + mov es, dx + + /* Check for valid multiboot signature */ + cmp eax, MULTIBOOT_BOOTLOADER_MAGIC + jne mbfail + + /* Store multiboot info in a safe place */ + mov esi, ebx + mov edi, offset mb_info + INITIAL_BASE - FREELDR_BASE + mov ecx, MB_INFO_SIZE + rep movsb + + /* Save commandline */ + mov edx, [ebx + MB_INFO_FLAGS_OFFSET] + test dword ptr [ebx + MB_INFO_FLAGS_OFFSET], MB_INFO_FLAG_COMMAND_LINE + jz mb3 + mov esi, [ebx + MB_INFO_COMMAND_LINE_OFFSET] + mov edi, offset cmdline + INITIAL_BASE - FREELDR_BASE + mov ecx, CMDLINE_SIZE +mb2: lodsb + stosb + test al, al + jz mb3 + dec ecx + jnz mb2 +mb3: + + /* Copy to low mem */ + mov esi, INITIAL_BASE + mov edi, FREELDR_BASE + mov ecx, (offset __bss_end__ - FREELDR_BASE) + add ecx, 3 + shr ecx, 2 + rep movsd + + /* Load the GDT and IDT */ + lgdt gdtptr + lidt i386idtptr + + /* Clear prefetch queue & correct CS, + * jump to low mem */ + //ljmp $PMODE_CS, $mb4 + jmp far ptr PMODE_CS:mb4 +mb4: + /* Reload segment selectors */ + mov dx, PMODE_DS + mov ds, dx + mov es, dx + mov fs, dx + mov gs, dx + mov ss, dx + mov esp, STACK32ADDR + + mov ebx, offset mb_info + /* See if the boot device was passed in */ + mov edx, [ebx + MB_INFO_FLAGS_OFFSET] + test edx, MB_INFO_FLAG_BOOT_DEVICE + jz mb5 + /* Retrieve boot device info */ + mov eax, [ebx + MB_INFO_BOOT_DEVICE_OFFSET] + shr eax, 16 + inc al + mov byte ptr [_FrldrBootPartition], al + mov byte ptr [_FrldrBootDrive], ah + jmp mb6 +mb5: /* No boot device known, assume first partition of first harddisk */ + mov byte ptr [_FrldrBootDrive], HEX(80) + mov byte ptr [_FrldrBootPartition], 1 +mb6: + /* Check for command line */ + mov eax, offset cmdline + test dword ptr [ebx + MB_INFO_FLAGS_OFFSET], MB_INFO_FLAG_COMMAND_LINE + jnz mb7 + xor eax, eax +mb7: + + /* GO! */ + push eax + call _BootMain + +mbfail: + int 3 +mbstop: jmp mbstop /* We should never get here */ + +mb_info: + .fill MB_INFO_SIZE, 1, 0 + +cmdline: + .fill CMDLINE_SIZE, 1, 0 + +.align 4 /* force 4-byte alignment */ +gdt: + /* NULL Descriptor */ + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + + /* 32-bit flat CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9A00) + .word HEX(00CF) + + /* 32-bit flat DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(00CF) + + /* 16-bit real mode CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9E00) + .word HEX(0000) + + /* 16-bit real mode DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(0000) + +/* GDT table pointer */ +gdtptr: + .word HEX(27) /* Limit */ + .long gdt /* Base Address */ + +/* Initial GDT table pointer for multiboot */ +gdtptrhigh: + .word HEX(27) /* Limit */ + .long gdt + INITIAL_BASE - FREELDR_BASE /* Base Address */ diff --git a/boot/freeldr/freeldr/arch/i386/ntoskrnl.c b/boot/freeldr/freeldr/arch/i386/ntoskrnl.c index dcc51ef2b59..272401d2c36 100644 --- a/boot/freeldr/freeldr/arch/i386/ntoskrnl.c +++ b/boot/freeldr/freeldr/arch/i386/ntoskrnl.c @@ -1,6 +1,9 @@ #include -#define NDEBUG -#include + +/* For KeStallExecutionProcessor */ +#if defined(_M_IX86) || defined(_M_AMD64) +#include +#endif VOID NTAPI @@ -75,6 +78,7 @@ NTAPI KeStallExecutionProcessor( IN ULONG MicroSeconds) { +#if defined(_M_IX86) || defined(_M_AMD64) REGS Regs; ULONG usec_this; @@ -111,4 +115,7 @@ KeStallExecutionProcessor( MicroSeconds -= usec_this; } +#else + #error unimplemented +#endif } diff --git a/boot/freeldr/freeldr/arch/i386/pcdisk.c b/boot/freeldr/freeldr/arch/i386/pcdisk.c index 4bde50c5839..31f59245e9e 100644 --- a/boot/freeldr/freeldr/arch/i386/pcdisk.c +++ b/boot/freeldr/freeldr/arch/i386/pcdisk.c @@ -42,7 +42,7 @@ typedef struct // FUNCTIONS ///////////////////////////////////////////////////////////////////////////////////////////// -static BOOLEAN PcDiskResetController(ULONG DriveNumber) +static BOOLEAN PcDiskResetController(UCHAR DriveNumber) { REGS RegsIn; REGS RegsOut; @@ -65,7 +65,7 @@ static BOOLEAN PcDiskResetController(ULONG DriveNumber) return INT386_SUCCESS(RegsOut); } -static BOOLEAN PcDiskReadLogicalSectorsLBA(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) +static BOOLEAN PcDiskReadLogicalSectorsLBA(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { REGS RegsIn; REGS RegsOut; @@ -73,6 +73,7 @@ static BOOLEAN PcDiskReadLogicalSectorsLBA(ULONG DriveNumber, ULONGLONG SectorNu PI386_DISK_ADDRESS_PACKET Packet = (PI386_DISK_ADDRESS_PACKET)(BIOSCALLBUFFER); DPRINTM(DPRINT_DISK, "PcDiskReadLogicalSectorsLBA() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount, Buffer); + ASSERT(((ULONG_PTR)Buffer) <= 0xFFFFF); // BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ RegsIn.b.ah = 0x42; // Subfunction 42h @@ -84,9 +85,10 @@ static BOOLEAN PcDiskReadLogicalSectorsLBA(ULONG DriveNumber, ULONGLONG SectorNu RtlZeroMemory(Packet, sizeof(I386_DISK_ADDRESS_PACKET)); Packet->PacketSize = sizeof(I386_DISK_ADDRESS_PACKET); Packet->Reserved = 0; - Packet->LBABlockCount = SectorCount; + Packet->LBABlockCount = (USHORT)SectorCount; + ASSERT(Packet->LBABlockCount == SectorCount); Packet->TransferBufferOffset = ((ULONG_PTR)Buffer) & 0x0F; - Packet->TransferBufferSegment = ((ULONG_PTR)Buffer) >> 4; + Packet->TransferBufferSegment = (USHORT)(((ULONG_PTR)Buffer) >> 4); Packet->LBAStartBlock = SectorNumber; // BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ @@ -128,10 +130,10 @@ static BOOLEAN PcDiskReadLogicalSectorsLBA(ULONG DriveNumber, ULONGLONG SectorNu return FALSE; } -static BOOLEAN PcDiskReadLogicalSectorsCHS(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) +static BOOLEAN PcDiskReadLogicalSectorsCHS(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { - ULONG PhysicalSector; - ULONG PhysicalHead; + UCHAR PhysicalSector; + UCHAR PhysicalHead; ULONG PhysicalTrack; GEOMETRY DriveGeometry; ULONG NumberOfSectorsToRead; @@ -156,10 +158,11 @@ static BOOLEAN PcDiskReadLogicalSectorsCHS(ULONG DriveNumber, ULONGLONG SectorNu // // Calculate the physical disk offsets + // Note: DriveGeometry.Sectors < 64 // - PhysicalSector = 1 + (SectorNumber % DriveGeometry.Sectors); - PhysicalHead = (SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads; - PhysicalTrack = (SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads; + PhysicalSector = 1 + (UCHAR)(SectorNumber % DriveGeometry.Sectors); + PhysicalHead = (UCHAR)((SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads); + PhysicalTrack = (ULONG)((SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads); // // Calculate how many sectors we need to read this round @@ -208,12 +211,12 @@ static BOOLEAN PcDiskReadLogicalSectorsCHS(ULONG DriveNumber, ULONGLONG SectorNu // AL = number of sectors transferred // (only valid if CF set for some BIOSes) RegsIn.b.ah = 0x02; - RegsIn.b.al = NumberOfSectorsToRead; + RegsIn.b.al = (UCHAR)NumberOfSectorsToRead; RegsIn.b.ch = (PhysicalTrack & 0xFF); - RegsIn.b.cl = (PhysicalSector + ((PhysicalTrack & 0x300) >> 2)); + RegsIn.b.cl = (UCHAR)(PhysicalSector + ((PhysicalTrack & 0x300) >> 2)); RegsIn.b.dh = PhysicalHead; RegsIn.b.dl = DriveNumber; - RegsIn.w.es = ((ULONG_PTR)Buffer) >> 4; + RegsIn.w.es = (USHORT)(((ULONG_PTR)Buffer) >> 4); RegsIn.w.bx = ((ULONG_PTR)Buffer) & 0x0F; // @@ -264,7 +267,7 @@ static BOOLEAN PcDiskReadLogicalSectorsCHS(ULONG DriveNumber, ULONGLONG SectorNu return TRUE; } -BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) +BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { DPRINTM(DPRINT_DISK, "PcDiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount, Buffer); @@ -294,7 +297,7 @@ BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULON } BOOLEAN -PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry) +PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry) { REGS RegsIn; REGS RegsOut; @@ -345,7 +348,7 @@ PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry) } ULONG -PcDiskGetCacheableBlockCount(ULONG DriveNumber) +PcDiskGetCacheableBlockCount(UCHAR DriveNumber) { GEOMETRY Geometry; diff --git a/boot/freeldr/freeldr/arch/i386/pcvideo.c b/boot/freeldr/freeldr/arch/i386/pcvideo.c index 8464b10328c..2f89d6dff64 100644 --- a/boot/freeldr/freeldr/arch/i386/pcvideo.c +++ b/boot/freeldr/freeldr/arch/i386/pcvideo.c @@ -108,7 +108,7 @@ typedef struct } SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION; #include -static ULONG BiosVideoMode; /* Current video mode as known by BIOS */ +static USHORT BiosVideoMode; /* Current video mode as known by BIOS */ static ULONG ScreenWidth = 80; /* Screen Width in characters */ static ULONG ScreenHeight = 25; /* Screen Height in characters */ static ULONG BytesPerScanLine = 160; /* Number of bytes per scanline (delta) */ @@ -191,7 +191,7 @@ PcVideoDetectVideoCard(VOID) } } -static VOID PcVideoSetBiosMode(ULONG VideoMode) +static VOID PcVideoSetBiosMode(UCHAR VideoMode) { REGS Regs; @@ -298,7 +298,7 @@ PcVideoDisableCursorEmulation(VOID) } static VOID -PcVideoDefineCursor(ULONG StartScanLine, ULONG EndScanLine) +PcVideoDefineCursor(UCHAR StartScanLine, UCHAR EndScanLine) { REGS Regs; @@ -334,7 +334,7 @@ PcVideoDefineCursor(ULONG StartScanLine, ULONG EndScanLine) } static VOID -PcVideoSetVerticalResolution(ULONG ScanLines) +PcVideoSetVerticalResolution(UCHAR VerticalResolutionMode) { REGS Regs; @@ -356,7 +356,7 @@ PcVideoSetVerticalResolution(ULONG ScanLines) */ Regs.b.ah = 0x12; Regs.b.bl = 0x30; - Regs.b.al = ScanLines; + Regs.b.al = VerticalResolutionMode; Int386(0x10, &Regs, &Regs); } @@ -698,7 +698,7 @@ PcVideoSetMode80x60(VOID) } static BOOLEAN -PcVideoSetMode(ULONG NewMode) +PcVideoSetMode(USHORT NewMode) { CurrentMemoryBank = 0; @@ -735,7 +735,7 @@ PcVideoSetMode(ULONG NewMode) if (0x12 == NewMode) { /* 640x480x16 */ - PcVideoSetBiosMode(NewMode); + PcVideoSetBiosMode((UCHAR)NewMode); WRITE_PORT_USHORT((USHORT*)0x03CE, 0x0F01); /* For some reason this is necessary? */ ScreenWidth = 640; ScreenHeight = 480; @@ -748,7 +748,7 @@ PcVideoSetMode(ULONG NewMode) else if (0x13 == NewMode) { /* 320x200x256 */ - PcVideoSetBiosMode(NewMode); + PcVideoSetBiosMode((UCHAR)NewMode); ScreenWidth = 320; ScreenHeight = 200; BytesPerScanLine = 320; @@ -871,7 +871,7 @@ PcVideoSetMemoryBank(USHORT BankNumber) VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init) { - ULONG VideoMode = VIDEOMODE_NORMAL_TEXT; + USHORT VideoMode = VIDEOMODE_NORMAL_TEXT; if (NULL == DisplayModeName || '\0' == *DisplayModeName) { @@ -923,7 +923,6 @@ PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init) PcVideoSetBlinkBit(! Init); - return DisplayMode; } @@ -958,7 +957,7 @@ PcVideoGetBufferSize(VOID) } VOID -PcVideoSetTextCursorPosition(ULONG X, ULONG Y) +PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y) { REGS Regs; @@ -998,9 +997,9 @@ PcVideoHideShowTextCursor(BOOLEAN Show) VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer) { - ULONG BanksToCopy; + USHORT BanksToCopy; ULONG BytesInLastBank; - ULONG CurrentBank; + USHORT CurrentBank; ULONG BankSize; /* PcVideoWaitForVerticalRetrace(); */ @@ -1014,7 +1013,7 @@ PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer) else if (VideoGraphicsMode == DisplayMode && VesaVideoMode) { BankSize = VesaVideoModeInformation.WindowGranularity << 10; - BanksToCopy = (VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) / BankSize; + BanksToCopy = (USHORT)((VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) / BankSize); BytesInLastBank = (VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) % BankSize; /* Copy all the banks but the last one because diff --git a/boot/freeldr/freeldr/arch/i386/xboxdisk.c b/boot/freeldr/freeldr/arch/i386/xboxdisk.c index 57b57e7873f..3b33e0306d7 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxdisk.c +++ b/boot/freeldr/freeldr/arch/i386/xboxdisk.c @@ -152,7 +152,7 @@ static struct * Data block read and write commands */ #define IDEReadBlock(Address, Buffer, Count) \ - (__inwordstring(((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2)) + (READ_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2)) #define IDEWriteBlock(Address, Buffer, Count) \ (WRITE_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2)) @@ -435,7 +435,7 @@ XboxDiskPolledRead(ULONG CommandPort, } BOOLEAN -XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) +XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { ULONG StartSector; UCHAR Count; @@ -456,7 +456,7 @@ XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG Sect StartSector = (ULONG) SectorNumber; while (0 < SectorCount) { - Count = (SectorCount <= 255 ? SectorCount : 255); + Count = (SectorCount <= 255 ? (UCHAR)SectorCount : 255); if (! XboxDiskPolledRead(XBOX_IDE_COMMAND_PORT, XBOX_IDE_CONTROL_PORT, 0, Count, @@ -478,7 +478,7 @@ XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG Sect } BOOLEAN -XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) +XboxDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) { UCHAR SectorData[IDE_SECTOR_BUF_SZ]; @@ -503,7 +503,7 @@ XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_T } BOOLEAN -XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry) +XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry) { IDE_DRIVE_IDENTIFY DrvParms; ULONG i; @@ -563,7 +563,7 @@ XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry) } ULONG -XboxDiskGetCacheableBlockCount(ULONG DriveNumber) +XboxDiskGetCacheableBlockCount(UCHAR DriveNumber) { /* 64 seems a nice number, it is used by the machpc code for LBA devices */ return 64; diff --git a/boot/freeldr/freeldr/arch/i386/xboxhw.c b/boot/freeldr/freeldr/arch/i386/xboxhw.c index ff325b3dd49..5df37c48b64 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxhw.c +++ b/boot/freeldr/freeldr/arch/i386/xboxhw.c @@ -30,11 +30,11 @@ extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; extern char reactos_arc_strings[32][256]; static PCM_PARTIAL_RESOURCE_LIST -GetHarddiskConfigurationData(ULONG DriveNumber, ULONG* pSize) +GetHarddiskConfigurationData(UCHAR DriveNumber, ULONG* pSize) { PCM_PARTIAL_RESOURCE_LIST PartialResourceList; PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry; - EXTENDED_GEOMETRY ExtGeometry; + //EXTENDED_GEOMETRY ExtGeometry; GEOMETRY Geometry; ULONG Size; @@ -69,7 +69,7 @@ GetHarddiskConfigurationData(ULONG DriveNumber, ULONG* pSize) DiskGeometry = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST)); /* Get the disk geometry */ - ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY); + //ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY); if(MachDiskGetDriveGeometry(DriveNumber, &Geometry)) { @@ -101,7 +101,7 @@ GetHarddiskConfigurationData(ULONG DriveNumber, ULONG* pSize) typedef struct tagDISKCONTEXT { - ULONG DriveNumber; + UCHAR DriveNumber; ULONG SectorSize; ULONGLONG SectorOffset; ULONGLONG SectorCount; @@ -122,7 +122,7 @@ static LONG DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information) RtlZeroMemory(Information, sizeof(FILEINFORMATION)); Information->EndingAddress.QuadPart = (Context->SectorOffset + Context->SectorCount) * Context->SectorSize; - Information->CurrentAddress.LowPart = (Context->SectorOffset + Context->SectorNumber) * Context->SectorSize; + Information->CurrentAddress.QuadPart = (Context->SectorOffset + Context->SectorNumber) * Context->SectorSize; return ESUCCESS; } @@ -130,7 +130,8 @@ static LONG DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information) static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) { DISKCONTEXT* Context; - ULONG DriveNumber, DrivePartition, SectorSize; + ULONG DrivePartition, SectorSize; + UCHAR DriveNumber; ULONGLONG SectorOffset = 0; ULONGLONG SectorCount = 0; PARTITION_TABLE_ENTRY PartitionTableEntry; @@ -233,7 +234,7 @@ static const DEVVTBL DiskVtbl = { static VOID GetHarddiskIdentifier(PCHAR Identifier, - ULONG DriveNumber) + UCHAR DriveNumber) { PMASTER_BOOT_RECORD Mbr; ULONG *Buffer; @@ -274,7 +275,7 @@ GetHarddiskIdentifier(PCHAR Identifier, reactos_arc_strings[reactos_disk_count]; reactos_disk_count++; - sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(0)", DriveNumber - 0x80); + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber - 0x80); FsRegisterDevice(ArcName, &DiskVtbl); /* Add partitions */ @@ -284,7 +285,7 @@ GetHarddiskIdentifier(PCHAR Identifier, { if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) { - sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(%lu)", DriveNumber - 0x80, i); + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(%lu)", DriveNumber - 0x80, i); FsRegisterDevice(ArcName, &DiskVtbl); } i++; @@ -323,9 +324,8 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey, PCM_INT13_DRIVE_PARAMETER Int13Drives; GEOMETRY Geometry; PCONFIGURATION_COMPONENT_DATA DiskKey, ControllerKey; - ULONG DiskCount; + UCHAR DiskCount, i; ULONG Size; - ULONG i; BOOLEAN Changed; /* Count the number of visible drives */ @@ -390,8 +390,8 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey, { Int13Drives[i].DriveSelect = 0x80 + i; Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1; - Int13Drives[i].SectorsPerTrack = Geometry.Sectors; - Int13Drives[i].MaxHeads = Geometry.Heads - 1; + Int13Drives[i].SectorsPerTrack = (USHORT)Geometry.Sectors; + Int13Drives[i].MaxHeads = (USHORT)Geometry.Heads - 1; Int13Drives[i].NumberDrives = DiskCount; DPRINTM(DPRINT_HWDETECT, diff --git a/boot/freeldr/freeldr/arch/i386/xboxvideo.c b/boot/freeldr/freeldr/arch/i386/xboxvideo.c index d164b540b01..d1d3f86ebf6 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxvideo.c +++ b/boot/freeldr/freeldr/arch/i386/xboxvideo.c @@ -182,7 +182,7 @@ XboxVideoGetBufferSize(VOID) } VOID -XboxVideoSetTextCursorPosition(ULONG X, ULONG Y) +XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y) { /* We don't have a cursor yet */ } diff --git a/boot/freeldr/freeldr/arch/realmode/amd64.S b/boot/freeldr/freeldr/arch/realmode/amd64.S new file mode 100644 index 00000000000..1958a5411b3 --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/amd64.S @@ -0,0 +1,225 @@ + +#include +#include + +#define IMAGE_DOS_HEADER_e_lfanew 36 +#define IMAGE_FILE_HEADER_SIZE 20 +#define IMAGE_OPTIONAL_HEADER_AddressOfEntryPoint 16 + + +.code16 + +/* fat helper code */ +#include "fathelp.inc" + +.org 512 +RealEntryPoint: + + cli + + /* Setup real mode segment registers */ + xor ax, ax + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* checkPoint Charlie - where it all began... */ + mov si, offset CheckPoint0 + call writestr + + /* Setup a real mode stack */ + mov sp, stack16 + + /* Zero BootDrive and BootPartition */ + xor eax, eax + mov BootDrive, eax + mov BootPartition, eax + + /* Store the boot drive */ + mov BootDrive, dl + + /* Store the boot partition */ + mov BootPartition, dh + + /* Load the GDT */ + lgdt gdtptr + /* Load the IDT */ +// lidt idtptr + + call x86_16_EnableA20 + + /* checkPoint Charlie - where it all began... */ + mov si, offset CheckPoint1 + call writestr + + call x86_16_BuildPageTables + + /* checkPoint Charlie - where it all began... */ + mov si, offset CheckPoint2 + call writestr + + /* Check if CPU supports CPUID */ + pushfd + pop eax + mov ebx, eax + xor eax, HEX(00200000) + push eax + popfd + pushfd + pop eax + cmp eax,ebx + jz no_cpuid_support_detected + + /* CPUID support detected - getting the PAE/PGE */ + + mov eax,1 // Fn0000_0001 - PAE in EDX[6] + cpuid + xor eax,eax + and edx, HEX(00a0) + test edx,edx // are PAE and PGE bits set? + jz no_x64_support_detected + + /* PAE and PGE are here */ + + xor edx, edx + mov eax, HEX(80000001) + cpuid + and edx, HEX(20000000) + test edx,edx + jz no_x64_support_detected + + /* X64 Processor */ + + /* checkPoint Charlie - where it all began... */ + mov si, offset CheckPoint3 + call writestr + + /* Get address of optional header */ + mov eax, dword ptr ds:[FREELDR_PE_BASE + IMAGE_DOS_HEADER_e_lfanew] + add eax, FREELDR_PE_BASE + 4 + IMAGE_FILE_HEADER_SIZE + + /* Get address of entry point */ + mov eax, dword ptr ds:[eax + IMAGE_OPTIONAL_HEADER_AddressOfEntryPoint] + + /* Store the address in the callback return variable */ + mov dword ptr ds:[CallbackReturnAddress], eax + +switch64: + mov + jmp x86_16_ReturnToLong + + +no_x64_support_detected: + mov si, offset NotAnX64Processor // Loading message + call writestr + jmp fail + +no_cpuid_support_detected: + mov si, offset NoCPUIDSupport // Loading message + call writestr + +fail: + jmp fail + nop + nop + +/* + * We define 512 2MB pages at the start of memory, so we can access the first + * 1 GB as if paging was disabled + */ +x86_16_BuildPageTables: + pusha + push es + + /* Get segment of pml4 */ + mov eax, offset pml4_startup + shr eax, 4 + mov es, ax + cld + xor di, di + + /* One entry in the PML4 pointing to PDP */ + mov eax, offset pdp_startup + or eax, HEX(00f) + stosd + /* clear rest */ + xor eax, eax + mov cx, HEX(03ff) + rep stosd + + /* One entry in the PDP pointing to PD */ + mov eax, offset pd_startup + or eax, HEX(00f) + stosd + /* clear rest */ + xor eax, eax + mov ecx, HEX(03ff) + rep stosd + + /* 512 entries in the PD defining a 2MB page each */ + mov ecx, 512 + mov eax, HEX(008f) + +Bpt2: + mov es: [di], eax + mov dword ptr es: [di + 4], 0 + add eax, 512 << 12 // add 512 4k pages + add di, 8 + + /* Loop it */ + dec cx + jnz Bpt2 + + /* Return */ + pop es + popa + ret + + + + + +x86_16_ReturnToLong: + + cli + + xor ax,ax + mov ds,ax + mov es,ax + mov fs,ax + mov gs,ax + mov ss,ax + + /* Get the return address off the stack */ + pop word ptr code64ret + + /* Save 16-bit stack pointer */ + mov stack16, sp + + mov eax, 0x00a0 // Set PAE and PGE: 10100000b + mov cr4, eax + + mov edx, offset pml4_startup // Point cr3 at PML4 + mov cr3, edx + + mov ecx, HEX(0C0000080) // Specify EFER MSR + + rdmsr // Enable long mode + or eax, HEX(00000100) + wrmsr + + mov ebx, cr0 // Activate long mode + or ebx, HEX(080000001) // by enabling paging and protection simultaneously + mov cr0, ebx // skipping protected mode entirely + + //jmp LMODE_CS:offset LongCat //Load CS with 64 bit segment and flush the instruction cache + // Do a long jmp to the CallbackReturn address + + +#include "helpers.inc" + +.endcode16 + +END diff --git a/boot/freeldr/freeldr/arch/realmode/fathelp.inc b/boot/freeldr/freeldr/arch/realmode/fathelp.inc new file mode 100644 index 00000000000..1825fbe96a6 --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/fathelp.inc @@ -0,0 +1,225 @@ +// fathelp.S +// FAT12/16 Boot Sector Helper Code +// Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer + +//#include + +//org 8000h + +//.text + +#define BootSectorStackTop HEX(7bf2) +#define DataAreaStartHigh 2 +#define DataAreaStartLow 4 +#define BiosCHSDriveSizeHigh 6 +#define BiosCHSDriveSizeLow 8 +#define BiosCHSDriveSize 8 +#define ReadSectorsOffset 10 +#define ReadClusterOffset 12 +#define PutCharsOffset 14 + +#define OEMName 3 +#define BytesPerSector 11 +#define SectsPerCluster 13 +#define ReservedSectors 14 +#define NumberOfFats 16 +#define MaxRootEntries 17 +#define TotalSectors 19 +#define MediaDescriptor 21 +#define SectorsPerFat 22 +#define SectorsPerTrack 24 +#define NumberOfHeads 26 +#define HiddenSectors 28 +#define TotalSectorsBig 32 +#define BootDrive 36 +#define Reserved 37 +#define ExtendSig 38 +#define SerialNumber 39 +#define VolumeLabel 43 +#define FileSystem 54 + +#define BootPartition HEX(7dfd) + + +// This code will be stored in the first 512 bytes +// of freeldr.sys. The first 3 bytes will be a jmp +// instruction to skip past the FAT helper code +// that is stored in the rest of the 512 bytes. +// + +PUBLIC start +start: + // This code is loaded at 0000:F800 so we have to + // encode a jmp instruction to jump to 0000:FA00 + .byte HEX(e9), HEX(fd), HEX(01) + +// Now starts the extra boot code that we will store +// in the first 512 bytes of freeldr.sys. This code +// allows the FAT12/16 bootsector to navigate the +// FAT table so that we can still load freeldr.sys +// even if it is fragmented. + + +FatHelperEntryPoint: + /* First save AX - the start cluster of freeldr.sys */ + push ax + + /* Display "Loading FreeLoader..." message */ + mov si, offset msgLoading + call word ptr [bp-PutCharsOffset] + + call ReadFatIntoMemory + + /* Restore AX (start cluster) */ + pop ax + + // AX has start cluster of freeldr.sys + mov bx, FREELDR_BASE / 16 + mov es,bx + +LoadFile: + push ax + call IsFat12 + pop ax + jnc LoadFile2 + cmp ax, HEX(0ff8) // Check to see if this is the last cluster in the chain + jmp LoadFile3 + +LoadFile2: + cmp ax, HEX(0fff8) +LoadFile3: + jae LoadFile_Done // If so continue, if not then read then next one + push ax + xor bx,bx // Load ROSLDR starting at 0000:8000h + push es + call word ptr [bp-ReadClusterOffset] + pop es + + xor bx,bx + mov bl, [bp+SectsPerCluster] + shl bx,5 // BX = BX * 512 / 16 + mov ax,es // Increment the load address by + add ax,bx // The size of a cluster + mov es,ax + + call IsFat12 + pop ax + push es + jnc LoadFile4 + call GetFatEntry12 // Get the next entry + jmp LoadFile5 +LoadFile4: + call GetFatEntry16 +LoadFile5: + pop es + + jmp LoadFile // Load the next cluster (if any) + +LoadFile_Done: + mov dl, byte ptr [bp+BootDrive] // Load the boot drive into DL + mov dh, byte ptr ds:[BootPartition] // Load the boot partition into DH + + /* continue where other bootsectors start */ + jmp start + + +// Reads the entire FAT into memory at 7000:0000 +ReadFatIntoMemory: + mov ax, [bp+HiddenSectors] + mov dx, [bp+HiddenSectors+2] + add ax, [bp+ReservedSectors] + adc dx, 0 + mov cx, [bp+SectorsPerFat] + mov bx, HEX(7000) + mov es,bx + xor bx,bx + call word ptr [bp-ReadSectorsOffset] + ret + + +// Returns the FAT entry for a given cluster number for 16-bit FAT +// On entry AX has cluster number +// On return AX has FAT entry for that cluster +GetFatEntry16: + mov cx,2 // AX = AX * 2 (since FAT16 entries are 2 bytes) + mul cx + shl dx,12 + + mov bx, HEX(7000) + add bx,dx + mov es,bx + mov bx,ax // Restore FAT entry offset + mov ax, es:[bx] // Get FAT entry + + ret + + +// Returns the FAT entry for a given cluster number for 12-bit FAT +// On entry AX has cluster number +// On return AX has FAT entry for that cluster +GetFatEntry12: + push ax + mov cx,ax + shr ax,1 + add ax,cx // AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits) + + mov bx, HEX(7000) + mov es,bx + mov bx,ax // Put FAT entry offset into BX + mov ax, es:[bx] // Get FAT entry + pop cx // Get cluster number from stack + and cx,1 + jz UseLow12Bits + and ax, HEX(0fff0) + shr ax,4 + jmp GetFatEntry12_Done + +UseLow12Bits: + and ax, HEX(0fff) + +GetFatEntry12_Done: + + ret + + +// Returns CF = 1 if this is a FAT12 file system +// Otherwise CF = 0 for FAT16 +IsFat12: + + mov ebx, dword ptr [bp-DataAreaStartLow] + // EBX now has the number of the starting sector of the data area + // starting from the beginning of the disk, so subtrace hidden sectors + sub ebx, dword ptr [bp+HiddenSectors] + + + xor eax,eax + mov ax, word ptr [bp+TotalSectors] + cmp ax, 0 + jnz IsFat12_2 + mov eax, dword ptr [bp+TotalSectorsBig] + + // EAX now contains the number of sectors on the volume + +IsFat12_2: + sub eax,ebx // Subtract data area start sector + xor edx,edx // from total sectors of volume + + // EDX:EAX now contains the number of data sectors on the volume + movzx ebx, byte ptr [bp+SectsPerCluster] + div ebx + // EAX now has the number of clusters on the volume + stc + cmp eax,4085 + jb IsFat12_Done + clc + +IsFat12_Done: + ret + + +msgLoading: + .ascii "Loading FreeLoader...", CR, LF, NUL + + .org 510 // Pad to 510 bytes + .word HEX(0aa55) // BootSector signature + diff --git a/boot/freeldr/freeldr/arch/realmode/helpers.inc b/boot/freeldr/freeldr/arch/realmode/helpers.inc new file mode 100644 index 00000000000..dd1fd492748 --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/helpers.inc @@ -0,0 +1,120 @@ + +Empty8042: + .word HEX(00eb), HEX(00eb) // jmp $+2, jmp $+2 + in al, HEX(64) + cmp al, HEX(0ff) // legacy-free machine without keyboard + jz Empty8042_ret // controllers on Intel Macs read back 0xFF + test al, 2 + jnz Empty8042 +Empty8042_ret: + ret + +EnableA20: + pusha + call Empty8042 + mov al, HEX(0D1) // command write + out HEX(064), al + call Empty8042 + mov al, HEX(0DF) // A20 on + out HEX(060), al + call Empty8042 + popa + ret + +/* + * writestr + * si = pointer to zero terminated string + */ +writestr: + pushfd + pushad +writestr_top: + lodsb + and al, al + jz writestr_end + call writechr + jmp short writestr_top +writestr_end: + popad + popfd + ret + +/* + * writechr + * al = character to output + */ +writechr: + pushf + pusha + mov ah, HEX(0E) + xor bx, bx + int HEX(10) + popa + popf + ret + +// +// writehex[248]: Write a hex number in (AL, AX, EAX) to the console +// +writehex2: + pushfd + pushad + shl eax, 24 + mov cx, 2 + jmp short writehex_common +writehex4: + pushfd + pushad + shl eax, 16 + mov cx, 4 + jmp short writehex_common +writehex8: + pushfd + pushad + mov cx, 8 +writehex_common: +.loop: + rol eax, 4 + push eax + and al, HEX(0F) + cmp al, 10 + jae .high +.low: + add al, '0' + jmp short .ischar +.high: + add al, 'A'-10 +.ischar: + call writechr + pop eax + loop .loop + popad + popfd + ret + +SoftReboot: + mov ax, HEX(40) + mov ds, ax + mov si, HEX(72) + + /* Set the word at location 40:72 to 1234h */ + mov word ptr [si], HEX(1234) + + /* and jump to location FFFF:0 in ROM */ + ljmp16 HEX(0FFFF), HEX(0000) + + +ChainLoadBiosBootSectorCode: + + /* Load segment registers */ + cli + xor ax, ax + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + mov esp, HEX(7C00) + + /* Jump to the bootsector code */ + ljmp16 HEX(0000), HEX(7C00) diff --git a/boot/freeldr/freeldr/arch/realmode/i386.S b/boot/freeldr/freeldr/arch/realmode/i386.S new file mode 100644 index 00000000000..12c6afc84ee --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/i386.S @@ -0,0 +1,209 @@ + +#include +#include "../../include/arch/pc/x86common.h" + +#define IMAGE_DOS_HEADER_e_lfanew 60 +#define IMAGE_FILE_HEADER_SIZE 20 +#define IMAGE_OPTIONAL_HEADER_AddressOfEntryPoint 16 + +.code16 + +/* fat helper code */ +#include "fathelp.inc" + +.org 512 +RealModeEntryPoint: + + cli + + /* Setup segment registers */ + xor ax, ax + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* Setup the stack */ + mov sp, word ptr ds:[stack16] + + /* Enable A20 address line */ + call EnableA20 + + /* Safe real mode entry point in shared memory */ + mov dword ptr ds:[BSS_RealModeEntry], offset switch_to_real16 + + /* Address the image with es segment */ + mov ax, FREELDR_PE_BASE / 16 + mov es, ax + + /* Get address of optional header */ + mov eax, dword ptr es:[IMAGE_DOS_HEADER_e_lfanew] + add eax, 4 + IMAGE_FILE_HEADER_SIZE + + /* Get address of entry point */ + mov eax, dword ptr es:[eax + IMAGE_OPTIONAL_HEADER_AddressOfEntryPoint] + add eax, FREELDR_PE_BASE + + /* Save entry point */ + mov dword ptr ds:[pm_entrypoint], eax + + /* Restore es */ + xor ax, ax + mov es, ax + + jmp exit_to_protected + + +/* This is the entry point from protected mode */ +switch_to_real16: + + /* Restore segment registers to correct limit */ + mov ax, RMODE_DS + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* Disable Protected Mode */ + mov eax, cr0 + and eax, CR0_PE_CLR + mov cr0, eax + + /* Clear prefetch queue & correct CS */ + ljmp16 0, inrmode + +inrmode: + /* Set real mode segments */ + xor ax, ax + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* Clear out the high 16-bits of ESP */ + /* This is needed because I have one */ + /* machine that hangs when booted to dos if */ + /* anything other than 0x0000 is in the high */ + /* 16-bits of ESP. Even though real-mode */ + /* code should only use SP and not ESP. */ + xor esp, esp + + /* Restore real mode stack */ + mov sp, word ptr ds:[stack16] + + /* Load IDTR with real mode value */ +#ifdef _USE_ML + lidt fword ptr rmode_idtptr +#else + lidt rmode_idtptr +#endif + + sti /* These are ok now */ + + /* Do the callback, specified by bx */ + shl bx, 1 + call word ptr ds:callback_table[bx] + + +/* + * Switches the processor to protected mode + * it destroys eax + */ +exit_to_protected: + + cli + + /* Safe current stack pointer */ + mov word ptr ds:[stack16], sp + + /* Load the GDT */ +#ifdef _USE_ML + lgdt fword ptr gdtptr +#else + lgdt gdtptr +#endif + + /* Enable Protected Mode */ + mov eax, cr0 + or eax, CR0_PE_SET + mov cr0, eax + + /* Clear prefetch queue & correct CS */ + ljmp16 PMODE_CS, inpmode +inpmode: + .byte HEX(0ff), HEX(25) // opcode of indirect jump + .word pm_entrypoint, 0 +pm_entrypoint: + .long 0 // receives address of PE entry point + nop + +callback_table: + .word Int386 + .word SoftReboot + .word ChainLoadBiosBootSectorCode + .word PxeCallApi + .word PnpBiosGetDeviceNodeCount + .word PnpBiosGetDeviceNode + .word BootLinuxKernel + + + /* 16-bit stack pointer */ +stack16: + .word STACK16ADDR + + +.align 4 /* force 4-byte alignment */ +gdt: + /* NULL Descriptor */ + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + + /* 32-bit flat CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9A00) + .word HEX(00CF) + + /* 32-bit flat DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(00CF) + + /* 16-bit real mode CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9E00) + .word HEX(0000) + + /* 16-bit real mode DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(0000) + +/* GDT table pointer */ +gdtptr: + .word HEX(27) /* Limit */ + .word gdt, 0 /* Base Address */ + +/* Real-mode IDT pointer */ +rmode_idtptr: + .word HEX(3ff) /* Limit */ + .long 0 /* Base Address */ + +#include "int386.inc" +#include "pxe.inc" +#include "pnp.inc" +#include "linux.inc" +#include "helpers.inc" + +.org (FREELDR_PE_BASE - FREELDR_BASE - 1) +.byte 0 +.endcode16 +END diff --git a/boot/freeldr/freeldr/arch/realmode/int386.inc b/boot/freeldr/freeldr/arch/realmode/int386.inc new file mode 100644 index 00000000000..1fe18fb6062 --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/int386.inc @@ -0,0 +1,70 @@ + + +Int386: + /* Save all registers + segment registers */ + push ds + push es + push fs + push gs + pushad + + /* Get the interupt vector and patch the opcode */ + mov al, byte ptr ds:[BSS_IntVector] + mov byte ptr ds:[Int386_vector_opcode], al + + /* Setup the registers */ + mov ax, word ptr cs:[BSS_RegisterSet + REGS_DS] + mov ds, ax + mov ax, word ptr cs:[BSS_RegisterSet + REGS_ES] + mov es, ax + mov ax, word ptr cs:[BSS_RegisterSet + REGS_FS] + mov fs, ax + mov ax, word ptr cs:[BSS_RegisterSet + REGS_GS] + mov gs, ax + + mov eax, dword ptr cs:[BSS_RegisterSet + REGS_EAX] + mov ebx, dword ptr cs:[BSS_RegisterSet + REGS_EBX] + mov ecx, dword ptr cs:[BSS_RegisterSet + REGS_ECX] + mov edx, dword ptr cs:[BSS_RegisterSet + REGS_EDX] + mov esi, dword ptr cs:[BSS_RegisterSet + REGS_ESI] + mov edi, dword ptr cs:[BSS_RegisterSet + REGS_EDI] + + /* Do not set the flags register */ + /* only return its value in regsout */ + + /* Call the interrupt vector */ + /*int Int386_vector*/ + .byte HEX(0cd) +Int386_vector_opcode: + .byte 00 + + /* Save the registers */ + mov dword ptr cs:[BSS_RegisterSet + REGS_EAX], eax + mov dword ptr cs:[BSS_RegisterSet + REGS_EBX], ebx + mov dword ptr cs:[BSS_RegisterSet + REGS_ECX], ecx + mov dword ptr cs:[BSS_RegisterSet + REGS_EDX], edx + mov dword ptr cs:[BSS_RegisterSet + REGS_ESI], esi + mov dword ptr cs:[BSS_RegisterSet + REGS_EDI], edi + + mov ax, ds + mov word ptr cs:[BSS_RegisterSet + REGS_DS], ax + mov ax, es + mov word ptr cs:[BSS_RegisterSet + REGS_ES], ax + mov ax, fs + mov word ptr cs:[BSS_RegisterSet + REGS_FS], ax + mov ax, gs + mov word ptr cs:[BSS_RegisterSet + REGS_GS], ax + + pushfd + pop dword ptr cs:[BSS_RegisterSet + REGS_EFLAGS] + + popad + pop gs + pop fs + pop es + pop ds + + ret + + + diff --git a/boot/freeldr/freeldr/arch/realmode/linux.inc b/boot/freeldr/freeldr/arch/realmode/linux.inc new file mode 100644 index 00000000000..c8fb0e9a4a8 --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/linux.inc @@ -0,0 +1,16 @@ + + +BootLinuxKernel: + // dl must be set to the boot drive + + /* Load segment registers */ + cli + mov bx, HEX(9000) + mov ds, bx + mov es, bx + mov fs, bx + mov gs, bx + mov ss, bx + mov sp, HEX(9000) + + ljmp16 HEX(9020), HEX(0000) diff --git a/boot/freeldr/freeldr/arch/realmode/pnp.inc b/boot/freeldr/freeldr/arch/realmode/pnp.inc new file mode 100644 index 00000000000..19d8f30d073 --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/pnp.inc @@ -0,0 +1,58 @@ + + +PnpBiosGetDeviceNodeCount: + + mov ax, word ptr ds:[BSS_PnpBiosDataSegment] + push ax + + push cs + mov ax, BSS_PnpNodeSize + push ax + + push cs + mov ax, BSS_PnpNodeCount + push ax + + push 0 + + call dword ptr ds:[BSS_PnpBiosEntryPoint] + add sp, 12 + + movzx ecx, ax + mov dword ptr ds:[BSS_PnpResult], ecx + + ret + + +PnpBiosGetDeviceNode: + + /* push bios segment */ + mov ax, word ptr ds:[BSS_PnpBiosDataSegment] + push ax + + /* push control flag */ + push 1 + + /* push pointer to node buffer (segment/offset) */ + mov ax, word ptr ds:[BSS_PnpBiosBufferSegment] + push ax + mov ax, word ptr ds:[BSS_PnpBiosBufferOffset] + push ax + + /* push pointer to node number (segment/offset) */ + push cs + mov ax, BSS_PnpNodeNumber + push ax + + /* push function number */ + push 1 + + /* call entry point */ + call dword ptr ds:[BSS_PnpBiosEntryPoint] + add sp, 14 + + movzx ecx, ax + mov dword ptr ds:[BSS_PnpResult], ecx + + ret + diff --git a/boot/freeldr/freeldr/arch/realmode/pxe.inc b/boot/freeldr/freeldr/arch/realmode/pxe.inc new file mode 100644 index 00000000000..335604857e5 --- /dev/null +++ b/boot/freeldr/freeldr/arch/realmode/pxe.inc @@ -0,0 +1,33 @@ +/* + * FreeLoader + * Copyright (C) 2011 Herv Poussineau + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + + +PxeCallApi: + + mov ax, word ptr ds:[BSS_PxeBufferSegment] + push ax + mov ax, word ptr ds:[BSS_PxeBufferOffset] + push ax + mov ax, word ptr ds:[BSS_PxeFunction] + push ax + call dword ptr ds:[BSS_PxeEntryPoint] + add esp, 6 + mov word ptr ds:[BSS_PxeResult], ax + + ret diff --git a/boot/freeldr/freeldr/bootmgr.c b/boot/freeldr/freeldr/bootmgr.c index 3242a3e7329..2acc457a702 100644 --- a/boot/freeldr/freeldr/bootmgr.c +++ b/boot/freeldr/freeldr/bootmgr.c @@ -19,6 +19,11 @@ #include +ARC_DISK_SIGNATURE reactos_arc_disk_info[32]; // ARC Disk Information +unsigned long reactos_disk_count = 0; +char reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE] = {0}; +char reactos_arc_strings[32][256]; + ULONG GetDefaultOperatingSystem(OperatingSystemItem* OperatingSystemList, ULONG OperatingSystemCount) { CHAR DefaultOSText[80]; @@ -140,7 +145,7 @@ VOID RunLoader(VOID) } TimeOut = GetTimeOut(); - if (!UiInitialize(TimeOut)) + if (!UiInitialize(TimeOut != 0)) { UiMessageBoxCritical("Unable to initialize UI."); return; @@ -228,30 +233,19 @@ VOID RunLoader(VOID) #ifndef _M_ARM // Install the drive mapper according to this sections drive mappings -#ifdef __i386__ +#if defined(__i386__) && !defined(_MSC_VER) DriveMapMapDrivesInSection(SectionName); #endif - if (_stricmp(BootType, "ReactOS") == 0) - { - LoadAndBootReactOS(SectionName); - } #ifdef FREELDR_REACTOS_SETUP - else if (_stricmp(BootType, "ReactOSSetup") == 0) - { - // In future we could pass the selected OS details through this - // to have different install methods, etc. - LoadReactOSSetup(); - } -#if defined(__i386__) || defined(__x86_64__) - else if (_stricmp(BootType, "ReactOSSetup2") == 0) + if (_stricmp(BootType, "ReactOSSetup2") == 0) { // WinLdr-style boot LoadReactOSSetup2(); } -#endif + else #endif #ifdef __i386__ - else if (_stricmp(BootType, "Windows") == 0) + if (_stricmp(BootType, "Windows") == 0) { LoadAndBootWindows(SectionName, SettingValue, 0); } diff --git a/boot/freeldr/freeldr/cache/cache.c b/boot/freeldr/freeldr/cache/cache.c index 5f987e0346a..4b21350bbf4 100644 --- a/boot/freeldr/freeldr/cache/cache.c +++ b/boot/freeldr/freeldr/cache/cache.c @@ -32,7 +32,7 @@ ULONG CacheBlockCount = 0; ULONG CacheSizeLimit = 0; ULONG CacheSizeCurrent = 0; -BOOLEAN CacheInitializeDrive(ULONG DriveNumber) +BOOLEAN CacheInitializeDrive(UCHAR DriveNumber) { PCACHE_BLOCK NextCacheBlock; GEOMETRY DriveGeometry; @@ -111,7 +111,7 @@ VOID CacheInvalidateCacheData(VOID) CacheManagerDataInvalid = TRUE; } -BOOLEAN CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer) +BOOLEAN CacheReadDiskSectors(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount, PVOID Buffer) { PCACHE_BLOCK CacheBlock; ULONG StartBlock; @@ -122,7 +122,7 @@ BOOLEAN CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCo ULONG BlockCount; ULONG Idx; - DPRINTM(DPRINT_CACHE, "CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %d SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector, SectorCount, Buffer); + DPRINTM(DPRINT_CACHE, "CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %I64d SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector, SectorCount, Buffer); // If we aren't initialized yet then they can't do this if (CacheManagerInitialized == FALSE) @@ -133,11 +133,11 @@ BOOLEAN CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCo // // Caculate which blocks we must cache // - StartBlock = StartSector / CacheManagerDrive.BlockSize; - SectorOffsetInStartBlock = StartSector % CacheManagerDrive.BlockSize; - CopyLengthInStartBlock = (SectorCount > (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock)) ? (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock) : SectorCount; - EndBlock = (StartSector + (SectorCount - 1)) / CacheManagerDrive.BlockSize; - SectorOffsetInEndBlock = 1 + (StartSector + (SectorCount - 1)) % CacheManagerDrive.BlockSize; + StartBlock = (ULONG)(StartSector / CacheManagerDrive.BlockSize); + SectorOffsetInStartBlock = (ULONG)(StartSector % CacheManagerDrive.BlockSize); + CopyLengthInStartBlock = (ULONG)((SectorCount > (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock)) ? (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock) : SectorCount); + EndBlock = (ULONG)((StartSector + (SectorCount - 1)) / CacheManagerDrive.BlockSize); + SectorOffsetInEndBlock = (ULONG)(1 + (StartSector + (SectorCount - 1)) % CacheManagerDrive.BlockSize); BlockCount = (EndBlock - StartBlock) + 1; DPRINTM(DPRINT_CACHE, "StartBlock: %d SectorOffsetInStartBlock: %d CopyLengthInStartBlock: %d EndBlock: %d SectorOffsetInEndBlock: %d BlockCount: %d\n", StartBlock, SectorOffsetInStartBlock, CopyLengthInStartBlock, EndBlock, SectorOffsetInEndBlock, BlockCount); @@ -243,7 +243,8 @@ BOOLEAN CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCo return TRUE; } -BOOLEAN CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount) +#if 0 +BOOLEAN CacheForceDiskSectorsIntoCache(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount) { PCACHE_BLOCK CacheBlock; ULONG StartBlock; @@ -288,6 +289,7 @@ BOOLEAN CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULON return TRUE; } +#endif BOOLEAN CacheReleaseMemory(ULONG MinimumAmountToRelease) { diff --git a/boot/freeldr/freeldr/debug.c b/boot/freeldr/freeldr/debug.c index daabc6715f3..d9a9c10a3c7 100644 --- a/boot/freeldr/freeldr/debug.c +++ b/boot/freeldr/freeldr/debug.c @@ -340,6 +340,7 @@ MsgBoxPrint(const char *Format, ...) return 0; } +//DECLSPEC_NORETURN NTKERNELAPI VOID NTAPI diff --git a/boot/freeldr/freeldr/disk/disk.c b/boot/freeldr/freeldr/disk/disk.c index b7ce3295497..4d1ea90dfcd 100644 --- a/boot/freeldr/freeldr/disk/disk.c +++ b/boot/freeldr/freeldr/disk/disk.c @@ -87,7 +87,7 @@ PCSTR DiskGetErrorCodeString(ULONG ErrorCode) // This function is in arch/i386/i386disk.c //BOOLEAN DiskReadLogicalSectors(ULONG DriveNumber, U64 SectorNumber, ULONG SectorCount, PVOID Buffer) -BOOLEAN DiskIsDriveRemovable(ULONG DriveNumber) +BOOLEAN DiskIsDriveRemovable(UCHAR DriveNumber) { // Hard disks use drive numbers >= 0x80 // So if the drive number indicates a hard disk @@ -111,7 +111,7 @@ DiskGetBootPath(char *BootPath, unsigned Size) PARTITION_TABLE_ENTRY PartitionEntry; MASTER_BOOT_RECORD MasterBootRecord; - if (BootDrive < 0x80) + if (FrldrBootDrive < 0x80) { /* This is a floppy */ @@ -124,41 +124,44 @@ DiskGetBootPath(char *BootPath, unsigned Size) strcat(BootPath, "fdisk"); - _itoa(BootDrive, Device, 10); + _itoa(FrldrBootDrive, Device, 10); strcat(BootPath, "("); strcat(BootPath, Device); strcat(BootPath, ")"); } /* FIXME */ - else if (DiskReadBootRecord(BootDrive, 0, &MasterBootRecord)) + else if (DiskReadBootRecord(FrldrBootDrive, 0, &MasterBootRecord)) { - /* This is a hard disk */ + ULONG BootPartition; - if (!DiskGetActivePartitionEntry(BootDrive, &PartitionEntry, &BootPartition)) + /* This is a hard disk */ + if (!DiskGetActivePartitionEntry(FrldrBootDrive, &PartitionEntry, &BootPartition)) { DbgPrint("Invalid active partition information\n"); return FALSE; } - if (Size <= sizeof(Path) + 18 + strlen(Device) + strlen(Partition)) - { - return FALSE; - } + FrldrBootPartition = BootPartition; + + if (Size <= sizeof(Path) + 18 + strlen(Device) + strlen(Partition)) + { + return FALSE; + } strcpy(BootPath, Path); strcat(BootPath, "rdisk"); - _itoa(BootDrive - 0x80, Device, 10); + _itoa(FrldrBootDrive - 0x80, Device, 10); strcat(BootPath, "("); strcat(BootPath, Device); strcat(BootPath, ")"); - _itoa(BootPartition, Partition, 10); + _itoa(FrldrBootPartition, Partition, 10); strcat(BootPath, "partition("); strcat(BootPath, Partition); strcat(BootPath, ")"); - } + } else { /* This is a CD-ROM drive */ @@ -172,7 +175,7 @@ DiskGetBootPath(char *BootPath, unsigned Size) strcat(BootPath, "cdrom"); - _itoa(BootDrive - 0x80, Device, 10); + _itoa(FrldrBootDrive - 0x80, Device, 10); strcat(BootPath, "("); strcat(BootPath, Device); strcat(BootPath, ")"); @@ -185,6 +188,6 @@ DiskGetBootPath(char *BootPath, unsigned Size) //VOID DiskStopFloppyMotor(VOID) // This function is in arch/i386/i386disk.c -//ULONG DiskGetCacheableBlockCount(ULONG DriveNumber) +//ULONG DiskGetCacheableBlockCount(UCHAR DriveNumber) #endif diff --git a/boot/freeldr/freeldr/disk/partition.c b/boot/freeldr/freeldr/disk/partition.c index b93b2e17b2a..1941da3361a 100644 --- a/boot/freeldr/freeldr/disk/partition.c +++ b/boot/freeldr/freeldr/disk/partition.c @@ -21,7 +21,7 @@ #include #include -BOOLEAN DiskGetActivePartitionEntry(ULONG DriveNumber, +BOOLEAN DiskGetActivePartitionEntry(UCHAR DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry, ULONG *ActivePartition) { @@ -77,7 +77,7 @@ BOOLEAN DiskGetActivePartitionEntry(ULONG DriveNumber, return TRUE; } -BOOLEAN DiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) +BOOLEAN DiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) { MASTER_BOOT_RECORD MasterBootRecord; PARTITION_TABLE_ENTRY ExtendedPartitionTableEntry; @@ -195,7 +195,7 @@ BOOLEAN DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, return FALSE; } -BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord) +BOOLEAN DiskReadBootRecord(UCHAR DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord) { ULONG Index; diff --git a/boot/freeldr/freeldr/disk/scsiport.c b/boot/freeldr/freeldr/disk/scsiport.c index 254760ff24a..0db46a2ad29 100644 --- a/boot/freeldr/freeldr/disk/scsiport.c +++ b/boot/freeldr/freeldr/disk/scsiport.c @@ -11,6 +11,33 @@ #include #include +#undef ScsiPortLogError +#undef ScsiPortMoveMemory +#undef ScsiPortWritePortBufferUchar +#undef ScsiPortWritePortBufferUlong +#undef ScsiPortWritePortBufferUshort +#undef ScsiPortWritePortUchar +#undef ScsiPortWritePortUlong +#undef ScsiPortWritePortUshort +#undef ScsiPortWriteRegisterBufferUchar +#undef ScsiPortWriteRegisterBufferUlong +#undef ScsiPortWriteRegisterBufferUshort +#undef ScsiPortWriteRegisterUchar +#undef ScsiPortWriteRegisterUlong +#undef ScsiPortWriteRegisterUshort +#undef ScsiPortReadPortBufferUchar +#undef ScsiPortReadPortBufferUlong +#undef ScsiPortReadPortBufferUshort +#undef ScsiPortReadPortUchar +#undef ScsiPortReadPortUlong +#undef ScsiPortReadPortUshort +#undef ScsiPortReadRegisterBufferUchar +#undef ScsiPortReadRegisterBufferUlong +#undef ScsiPortReadRegisterBufferUshort +#undef ScsiPortReadRegisterUchar +#undef ScsiPortReadRegisterUlong +#undef ScsiPortReadRegisterUshort + #define NDEBUG #include @@ -110,9 +137,9 @@ typedef struct tagDISKCONTEXT { /* Device ID */ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension; - ULONG PathId; - ULONG TargetId; - ULONG Lun; + UCHAR PathId; + UCHAR TargetId; + UCHAR Lun; /* Device characteristics */ ULONG SectorSize; @@ -135,7 +162,7 @@ static LONG DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information) RtlZeroMemory(Information, sizeof(FILEINFORMATION)); Information->EndingAddress.QuadPart = Context->SectorCount * Context->SectorSize; - Information->CurrentAddress.LowPart = Context->SectorNumber * Context->SectorSize; + Information->CurrentAddress.QuadPart = Context->SectorNumber * Context->SectorSize; return ESUCCESS; } @@ -168,9 +195,9 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) RtlZeroMemory(Srb, sizeof(SCSI_REQUEST_BLOCK)); Srb->Length = sizeof(SCSI_REQUEST_BLOCK); Srb->Function = SRB_FUNCTION_EXECUTE_SCSI; - Srb->PathId = PathId; - Srb->TargetId = TargetId; - Srb->Lun = Lun; + Srb->PathId = (UCHAR)PathId; + Srb->TargetId = (UCHAR)TargetId; + Srb->Lun = (UCHAR)Lun; Srb->CdbLength = 10; Srb->SrbFlags = SRB_FLAGS_DATA_IN; Srb->DataTransferLength = sizeof(READ_CAPACITY_DATA); @@ -198,9 +225,9 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) if (!Context) return ENOMEM; Context->DeviceExtension = DeviceExtension; - Context->PathId = PathId; - Context->TargetId = TargetId; - Context->Lun = Lun; + Context->PathId = (UCHAR)PathId; + Context->TargetId = (UCHAR)TargetId; + Context->Lun = (UCHAR)Lun; Context->SectorSize = SectorSize; Context->SectorOffset = SectorOffset; Context->SectorCount = SectorCount; @@ -231,7 +258,8 @@ static LONG DiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count) return EINVAL; /* Read full sectors */ - Lba = Context->SectorNumber; + ASSERT(Context->SectorNumber < 0xFFFFFFFF); + Lba = (ULONG)Context->SectorNumber; if (FullSectors > 0) { Srb = ExAllocatePool(PagedPool, sizeof(SCSI_REQUEST_BLOCK)); @@ -783,14 +811,14 @@ VOID SpiScanAdapter( IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN ULONG ScsiBus, - IN ULONG PathId) + IN UCHAR PathId) { CHAR ArcName[64]; PSCSI_REQUEST_BLOCK Srb; PCDB Cdb; INQUIRYDATA InquiryBuffer; - ULONG TargetId; - ULONG Lun; + UCHAR TargetId; + UCHAR Lun; if (!DeviceExtension->HwResetBus(DeviceExtension->MiniPortDeviceExtension, PathId)) { @@ -825,7 +853,7 @@ SpiScanAdapter( Cdb = (PCDB)Srb->Cdb; Cdb->CDB6INQUIRY.OperationCode = SCSIOP_INQUIRY; Cdb->CDB6INQUIRY.LogicalUnitNumber = Srb->Lun; - Cdb->CDB6INQUIRY.AllocationLength = Srb->DataTransferLength; + Cdb->CDB6INQUIRY.AllocationLength = (UCHAR)Srb->DataTransferLength; if (!SpiSendSynchronousSrb(DeviceExtension, Srb)) { /* Don't check next LUNs */ @@ -835,13 +863,13 @@ SpiScanAdapter( /* Device exists, create its ARC name */ if (InquiryBuffer.RemovableMedia) { - sprintf(ArcName, "scsi(%ld)cdrom(%ld)fdisk(%ld)", + sprintf(ArcName, "scsi(%ld)cdrom(%d)fdisk(%d)", ScsiBus, TargetId, Lun); FsRegisterDevice(ArcName, &DiskVtbl); } else { - sprintf(ArcName, "scsi(%ld)disk(%ld)rdisk(%ld)", + sprintf(ArcName, "scsi(%ld)disk(%d)rdisk(%d)", ScsiBus, TargetId, Lun); /* Now, check if it has partitions */ SpiScanDevice(DeviceExtension, ArcName, PathId, TargetId, Lun); @@ -1047,6 +1075,7 @@ ScsiPortInitialize( BOOLEAN Again; BOOLEAN FirstConfigCall = TRUE; PCI_SLOT_NUMBER SlotNumber; + UCHAR ScsiBus; NTSTATUS Status; if (HwInitializationData->HwInitializationDataSize != sizeof(HW_INITIALIZATION_DATA)) @@ -1169,13 +1198,10 @@ ScsiPortInitialize( } /* Scan bus */ + for (ScsiBus = 0; ScsiBus < PortConfig.NumberOfBuses; ScsiBus++) { - ULONG ScsiBus; - for (ScsiBus = 0; ScsiBus < PortConfig.NumberOfBuses; ScsiBus++) - { - SpiScanAdapter(DeviceExtension, PortConfig.SystemIoBusNumber, ScsiBus); - PortConfig.SystemIoBusNumber++; - } + SpiScanAdapter(DeviceExtension, PortConfig.SystemIoBusNumber, ScsiBus); + PortConfig.SystemIoBusNumber++; } FirstConfigCall = FALSE; @@ -1513,7 +1539,7 @@ VOID NTAPI ScsiPortWriteRegisterUchar( IN PUCHAR Register, - IN ULONG Value) + IN UCHAR Value) { WRITE_REGISTER_UCHAR(Register, Value); } @@ -1606,7 +1632,7 @@ LoadBootDeviceDriver(VOID) CHAR NtBootDdPath[MAX_PATH]; PVOID ImageBase; ULONG (NTAPI *EntryPoint)(IN PVOID DriverObject, IN PVOID RegistryPath); - ULONG i; + USHORT i; BOOLEAN Status; /* Some initialization of our temporary loader block */ @@ -1683,7 +1709,7 @@ LoadBootDeviceDriver(VOID) NtHeaders = RtlImageNtHeader(VaToPa(BootDdDTE->DllBase)); if (!NtHeaders) return EIO; - Status = LdrRelocateImageWithBias( + Status = (BOOLEAN)LdrRelocateImageWithBias( VaToPa(BootDdDTE->DllBase), NtHeaders->OptionalHeader.ImageBase - (ULONG_PTR)BootDdDTE->DllBase, "FreeLdr", diff --git a/boot/freeldr/freeldr/freeldr.c b/boot/freeldr/freeldr/freeldr.c index 98af295c4c7..3a9ca85dba0 100644 --- a/boot/freeldr/freeldr/freeldr.c +++ b/boot/freeldr/freeldr/freeldr.c @@ -68,12 +68,12 @@ long _ftol2_sse(double f) // We need to emulate these, because the original ones don't work in freeldr int __cdecl wctomb(char *mbchar, wchar_t wchar) { - *mbchar = wchar; + *mbchar = (char)wchar; return 1; } int __cdecl mbtowc (wchar_t *wchar, const char *mbchar, size_t count) { - *wchar = *mbchar; + *wchar = (wchar_t)*mbchar; return 1; } diff --git a/boot/freeldr/freeldr/freeldr_i386.lnk b/boot/freeldr/freeldr/freeldr_i386.lnk index 48b7b5d9ec5..41a6da04766 100644 --- a/boot/freeldr/freeldr/freeldr_i386.lnk +++ b/boot/freeldr/freeldr/freeldr_i386.lnk @@ -32,17 +32,18 @@ SECTIONS *(.data) *(.data2) *(SORT(.data$*)) + *(.rdata) + *(SORT(.rdata$*)) + *(.eh_frame) __data_end__ = . ; __bss_start__ = . ; *(.bss) *(COMMON) __bss_end__ = . ; } - .rdata BLOCK(__section_alignment__) : + /DISCARD/ : { - *(.rdata) - *(SORT(.rdata$*)) - *(.eh_frame) + *(.drectve) } .stab BLOCK(__section_alignment__) (NOLOAD) : { diff --git a/boot/freeldr/freeldr/fs/ext2.c b/boot/freeldr/freeldr/fs/ext2.c index 46f12fbe6d4..00d07641bc4 100644 --- a/boot/freeldr/freeldr/fs/ext2.c +++ b/boot/freeldr/freeldr/fs/ext2.c @@ -25,7 +25,7 @@ BOOLEAN Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector, ULONGLONG PEXT2_FILE_INFO Ext2OpenFile(PCSTR FileName); BOOLEAN Ext2LookupFile(PCSTR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer); BOOLEAN Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry); -BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONGLONG SectorCount, PVOID Buffer); +BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULONGLONG* BytesRead, PVOID Buffer); BOOLEAN Ext2ReadSuperBlock(VOID); @@ -61,7 +61,7 @@ ULONG Ext2GroupCount = 0; // Number of groups in this file system ULONG Ext2InodesPerBlock = 0; // Number of inodes in one block ULONG Ext2GroupDescPerBlock = 0; // Number of group descriptors in one block -BOOLEAN DiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType) +BOOLEAN DiskGetBootVolume(PUCHAR DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType) { *DriveNumber = 0; *StartSector = 0; @@ -425,7 +425,7 @@ BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULO DPRINTM(DPRINT_FILESYSTEM, "Reading fast symbolic link data\n"); // Copy the data from the link - RtlCopyMemory(Buffer, (PVOID)((ULONG_PTR)Ext2FileInfo->FilePointer + Ext2FileInfo->Inode.symlink), BytesToRead); + RtlCopyMemory(Buffer, (PVOID)((ULONG_PTR)Ext2FileInfo->FilePointer + Ext2FileInfo->Inode.symlink), (ULONG)BytesToRead); if (BytesRead != NULL) { @@ -472,10 +472,10 @@ BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULO // // Do the math for our first read // - BlockNumberIndex = (Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes); + BlockNumberIndex = (ULONG)(Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes); BlockNumber = Ext2FileInfo->FileBlockList[BlockNumberIndex]; OffsetInBlock = (Ext2FileInfo->FilePointer % Ext2BlockSizeInBytes); - LengthInBlock = (BytesToRead > (Ext2BlockSizeInBytes - OffsetInBlock)) ? (Ext2BlockSizeInBytes - OffsetInBlock) : BytesToRead; + LengthInBlock = (ULONG)((BytesToRead > (Ext2BlockSizeInBytes - OffsetInBlock)) ? (Ext2BlockSizeInBytes - OffsetInBlock) : BytesToRead); // // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer @@ -501,11 +501,11 @@ BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULO // // Determine how many full clusters we need to read // - NumberOfBlocks = (BytesToRead / Ext2BlockSizeInBytes); + NumberOfBlocks = (ULONG)(BytesToRead / Ext2BlockSizeInBytes); while (NumberOfBlocks > 0) { - BlockNumberIndex = (Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes); + BlockNumberIndex = (ULONG)(Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes); BlockNumber = Ext2FileInfo->FileBlockList[BlockNumberIndex]; // @@ -531,13 +531,13 @@ BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULO // if (BytesToRead > 0) { - BlockNumberIndex = (Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes); + BlockNumberIndex = (ULONG)(Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes); BlockNumber = Ext2FileInfo->FileBlockList[BlockNumberIndex]; // // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer // - if (!Ext2ReadPartialBlock(BlockNumber, 0, BytesToRead, Buffer)) + if (!Ext2ReadPartialBlock(BlockNumber, 0, (ULONG)BytesToRead, Buffer)) { return FALSE; } @@ -553,7 +553,7 @@ BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULO return TRUE; } -BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONGLONG SectorCount, PVOID Buffer) +BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { //GEOMETRY DiskGeometry; //BOOLEAN ReturnValue; @@ -796,7 +796,8 @@ BOOLEAN Ext2ReadDirectory(ULONG Inode, PVOID* DirectoryBuffer, PEXT2_INODE Inode // // Now allocate the memory to hold the group descriptors // - *DirectoryBuffer = (PEXT2_DIR_ENTRY)MmHeapAlloc(DirectoryFileInfo.FileSize); + ASSERT(DirectoryFileInfo.FileSize <= 0xFFFFFFFF); + *DirectoryBuffer = (PEXT2_DIR_ENTRY)MmHeapAlloc((ULONG)DirectoryFileInfo.FileSize); // // Make sure we got the memory @@ -1009,7 +1010,7 @@ ULONG* Ext2ReadBlockPointerList(PEXT2_INODE Inode) //BlockCount = Inode->i_blocks; FileSize = Ext2GetInodeFileSize(Inode); FileSize = ROUND_UP(FileSize, Ext2BlockSizeInBytes); - BlockCount = (FileSize / Ext2BlockSizeInBytes); + BlockCount = (ULONG)(FileSize / Ext2BlockSizeInBytes); // Allocate the memory for the block list BlockList = MmHeapAlloc(BlockCount * sizeof(ULONG)); @@ -1181,8 +1182,8 @@ LONG Ext2GetFileInformation(ULONG FileId, FILEINFORMATION* Information) PEXT2_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId); RtlZeroMemory(Information, sizeof(FILEINFORMATION)); - Information->EndingAddress.LowPart = FileHandle->FileSize; - Information->CurrentAddress.LowPart = FileHandle->FilePointer; + Information->EndingAddress.QuadPart = FileHandle->FileSize; + Information->CurrentAddress.QuadPart = FileHandle->FilePointer; DPRINTM(DPRINT_FILESYSTEM, "Ext2GetFileInformation() FileSize = %d\n", Information->EndingAddress.LowPart); @@ -1195,12 +1196,12 @@ LONG Ext2GetFileInformation(ULONG FileId, FILEINFORMATION* Information) LONG Ext2Open(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) { PEXT2_FILE_INFO FileHandle; - ULONG DeviceId; + //ULONG DeviceId; if (OpenMode != OpenReadOnly) return EACCES; - DeviceId = FsGetDeviceId(*FileId); + //DeviceId = FsGetDeviceId(*FileId); DPRINTM(DPRINT_FILESYSTEM, "Ext2Open() FileName = %s\n", Path); @@ -1297,7 +1298,7 @@ const DEVVTBL* Ext2Mount(ULONG DeviceId) // // Compatibility hack as long as FS is not using underlying device DeviceId // - ULONG DriveNumber; + UCHAR DriveNumber; ULONGLONG StartSector; ULONGLONG SectorCount; int Type; diff --git a/boot/freeldr/freeldr/fs/fat.c b/boot/freeldr/freeldr/fs/fat.c index a97cdcb7318..53e3beb8568 100644 --- a/boot/freeldr/freeldr/fs/fat.c +++ b/boot/freeldr/freeldr/fs/fat.c @@ -23,7 +23,7 @@ #define NDEBUG #include -ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount); +ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONGLONG PartitionSectorCount); PVOID FatBufferDirectory(PFAT_VOLUME_INFO Volume, ULONG DirectoryStartCluster, ULONG* EntryCountPointer, BOOLEAN RootDirectory); BOOLEAN FatSearchDirectoryBufferForFile(PFAT_VOLUME_INFO Volume, PVOID DirectoryBuffer, ULONG EntryCount, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer); LONG FatLookupFile(PFAT_VOLUME_INFO Volume, PCSTR FileName, ULONG DeviceId, PFAT_FILE_INFO FatFileInfoPointer); @@ -263,8 +263,8 @@ BOOLEAN FatOpenVolume(PFAT_VOLUME_INFO Volume, PFAT_BOOTSECTOR BootSector, ULONG Volume->FatSectorStart = (4096 / Volume->BytesPerSector); Volume->ActiveFatSectorStart = Volume->FatSectorStart; Volume->NumberOfFats = 1; - FatSize = PartitionSectorCount / Volume->SectorsPerCluster * - (Volume->FatType == FATX16 ? 2 : 4); + FatSize = (ULONG)(PartitionSectorCount / Volume->SectorsPerCluster * + (Volume->FatType == FATX16 ? 2 : 4)); Volume->SectorsPerFat = (((FatSize + 4095) / 4096) * 4096) / Volume->BytesPerSector; Volume->RootDirSectorStart = Volume->FatSectorStart + Volume->NumberOfFats * Volume->SectorsPerFat; @@ -313,7 +313,7 @@ BOOLEAN FatOpenVolume(PFAT_VOLUME_INFO Volume, PFAT_BOOTSECTOR BootSector, ULONG return TRUE; } -ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount) +ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONGLONG PartitionSectorCount) { ULONG RootDirSectors; ULONG DataSectorCount; @@ -325,7 +325,7 @@ ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCo if (0 == strncmp(FatXBootSector->FileSystemType, "FATX", 4)) { - CountOfClusters = PartitionSectorCount / FatXBootSector->SectorsPerCluster; + CountOfClusters = (ULONG)(PartitionSectorCount / FatXBootSector->SectorsPerCluster); if (CountOfClusters < 65525) { /* Volume is FATX16 */ diff --git a/boot/freeldr/freeldr/fs/ntfs.c b/boot/freeldr/freeldr/fs/ntfs.c index aff3bfaa339..7140b851ca9 100644 --- a/boot/freeldr/freeldr/fs/ntfs.c +++ b/boot/freeldr/freeldr/fs/ntfs.c @@ -134,7 +134,7 @@ static BOOLEAN NtfsDiskRead(PNTFS_VOLUME_INFO Volume, ULONGLONG Offset, ULONGLON { LARGE_INTEGER Position; ULONG Count; - USHORT ReadLength; + ULONG ReadLength; LONG ret; DPRINTM(DPRINT_FILESYSTEM, "NtfsDiskRead - Offset: %I64d Length: %I64d\n", Offset, Length); @@ -144,15 +144,14 @@ static BOOLEAN NtfsDiskRead(PNTFS_VOLUME_INFO Volume, ULONGLONG Offset, ULONGLON // if (Offset % Volume->BootSector.BytesPerSector) { - Position.HighPart = 0; - Position.LowPart = Offset & ~(Volume->BootSector.BytesPerSector - 1); + Position.QuadPart = Offset & ~(Volume->BootSector.BytesPerSector - 1); ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute); if (ret != ESUCCESS) return FALSE; ret = ArcRead(Volume->DeviceId, Volume->TemporarySector, Volume->BootSector.BytesPerSector, &Count); if (ret != ESUCCESS || Count != Volume->BootSector.BytesPerSector) return FALSE; - ReadLength = min(Length, Volume->BootSector.BytesPerSector - (Offset % Volume->BootSector.BytesPerSector)); + ReadLength = (USHORT)min(Length, Volume->BootSector.BytesPerSector - (Offset % Volume->BootSector.BytesPerSector)); // // Copy interesting data @@ -174,8 +173,7 @@ static BOOLEAN NtfsDiskRead(PNTFS_VOLUME_INFO Volume, ULONGLONG Offset, ULONGLON // if (Length >= Volume->BootSector.BytesPerSector) { - Position.HighPart = 0; - Position.LowPart = Offset; + Position.QuadPart = Offset; ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute); if (ret != ESUCCESS) return FALSE; @@ -197,12 +195,11 @@ static BOOLEAN NtfsDiskRead(PNTFS_VOLUME_INFO Volume, ULONGLONG Offset, ULONGLON // if (Length) { - Position.HighPart = 0; - Position.LowPart = Offset; + Position.QuadPart = Offset; ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute); if (ret != ESUCCESS) return FALSE; - ret = ArcRead(Volume->DeviceId, Buffer, Length, &Count); + ret = ArcRead(Volume->DeviceId, Buffer, (ULONG)Length, &Count); if (ret != ESUCCESS || Count != Length) return FALSE; } @@ -210,7 +207,7 @@ static BOOLEAN NtfsDiskRead(PNTFS_VOLUME_INFO Volume, ULONGLONG Offset, ULONGLON return TRUE; } -static ULONGLONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONGLONG Length) +static ULONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONG Length) { ULONGLONG LastLCN; PUCHAR DataRun; @@ -218,15 +215,15 @@ static ULONGLONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT ULONGLONG DataRunLength; LONGLONG DataRunStartLCN; ULONGLONG CurrentOffset; - ULONGLONG ReadLength; - ULONGLONG AlreadyRead; + ULONG ReadLength; + ULONG AlreadyRead; if (!Context->Record.IsNonResident) { if (Offset > Context->Record.Resident.ValueLength) return 0; if (Offset + Length > Context->Record.Resident.ValueLength) - Length = Context->Record.Resident.ValueLength - Offset; + Length = (ULONG)(Context->Record.Resident.ValueLength - Offset); RtlCopyMemory(Buffer, (PCHAR)&Context->Record + Context->Record.Resident.ValueOffset + Offset, Length); return Length; } @@ -291,7 +288,7 @@ static ULONGLONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT * II. Go through the run list and read the data */ - ReadLength = min(DataRunLength * Volume->ClusterSize - (Offset - CurrentOffset), Length); + ReadLength = (ULONG)min(DataRunLength * Volume->ClusterSize - (Offset - CurrentOffset), Length); if (DataRunStartLCN == -1) RtlZeroMemory(Buffer, ReadLength); if (NtfsDiskRead(Volume, DataRunStartLCN * Volume->ClusterSize + Offset - CurrentOffset, ReadLength, Buffer)) @@ -318,7 +315,7 @@ static ULONGLONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT while (Length > 0) { - ReadLength = min(DataRunLength * Volume->ClusterSize, Length); + ReadLength = (ULONG)min(DataRunLength * Volume->ClusterSize, Length); if (DataRunStartLCN == -1) RtlZeroMemory(Buffer, ReadLength); else if (!NtfsDiskRead(Volume, DataRunStartLCN * Volume->ClusterSize, ReadLength, Buffer)) @@ -384,12 +381,21 @@ static PNTFS_ATTR_CONTEXT NtfsFindAttributeHelper(PNTFS_VOLUME_INFO Volume, PNTF ListContext = NtfsPrepareAttributeContext(AttrRecord); ListSize = NtfsGetAttributeSize(&ListContext->Record); - ListBuffer = MmHeapAlloc(ListSize); + if(ListSize <= 0xFFFFFFFF) + ListBuffer = MmHeapAlloc((ULONG)ListSize); + else + ListBuffer = NULL; + + if(!ListBuffer) + { + DPRINTM(DPRINT_FILESYSTEM, "Failed to allocate memory: %x\n", (ULONG)ListSize); + continue; + } ListAttrRecord = (PNTFS_ATTR_RECORD)ListBuffer; ListAttrRecordEnd = (PNTFS_ATTR_RECORD)((PCHAR)ListBuffer + ListSize); - if (NtfsReadAttribute(Volume, ListContext, 0, ListBuffer, ListSize) == ListSize) + if (NtfsReadAttribute(Volume, ListContext, 0, ListBuffer, (ULONG)ListSize) == ListSize) { Context = NtfsFindAttributeHelper(Volume, ListAttrRecord, ListAttrRecordEnd, Type, Name, NameLength); @@ -463,7 +469,7 @@ static BOOLEAN NtfsFixupRecord(PNTFS_VOLUME_INFO Volume, PNTFS_RECORD Record) return TRUE; } -static BOOLEAN NtfsReadMftRecord(PNTFS_VOLUME_INFO Volume, ULONG MFTIndex, PNTFS_MFT_RECORD Buffer) +static BOOLEAN NtfsReadMftRecord(PNTFS_VOLUME_INFO Volume, ULONGLONG MFTIndex, PNTFS_MFT_RECORD Buffer) { ULONGLONG BytesRead; @@ -484,10 +490,10 @@ VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry) UCHAR i; FileName = IndexEntry->FileName.FileName; - FileNameLength = IndexEntry->FileName.FileNameLength; + FileNameLength = min(IndexEntry->FileName.FileNameLength, 255); for (i = 0; i < FileNameLength; i++) - AnsiFileName[i] = FileName[i]; + AnsiFileName[i] = (CHAR)FileName[i]; AnsiFileName[i] = 0; DPRINTM(DPRINT_FILESYSTEM, "- %s (%x)\n", AnsiFileName, IndexEntry->Data.Directory.IndexedFile); @@ -527,10 +533,10 @@ static BOOLEAN NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry) return TRUE; } -static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONG MFTIndex, PCHAR FileName, ULONG *OutMFTIndex) +static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONGLONG MFTIndex, PCHAR FileName, ULONGLONG *OutMFTIndex) { PNTFS_MFT_RECORD MftRecord; - ULONG Magic; + //ULONG Magic; PNTFS_ATTR_CONTEXT IndexRootCtx; PNTFS_ATTR_CONTEXT IndexBitmapCtx; PNTFS_ATTR_CONTEXT IndexAllocationCtx; @@ -551,7 +557,7 @@ static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONG MFTIndex, PCHAR if (NtfsReadMftRecord(Volume, MFTIndex, MftRecord)) { - Magic = MftRecord->Magic; + //Magic = MftRecord->Magic; IndexRootCtx = NtfsFindAttribute(Volume, MftRecord, NTFS_ATTR_TYPE_INDEX_ROOT, L"$I30"); if (IndexRootCtx == NULL) @@ -603,15 +609,19 @@ static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONG MFTIndex, PCHAR return FALSE; } BitmapDataSize = NtfsGetAttributeSize(&IndexBitmapCtx->Record); - DPRINTM(DPRINT_FILESYSTEM, "BitmapDataSize: %x\n", BitmapDataSize); - BitmapData = MmHeapAlloc(BitmapDataSize); + DPRINTM(DPRINT_FILESYSTEM, "BitmapDataSize: %x\n", (ULONG)BitmapDataSize); + if(BitmapDataSize <= 0xFFFFFFFF) + BitmapData = MmHeapAlloc((ULONG)BitmapDataSize); + else + BitmapData = NULL; + if (BitmapData == NULL) { MmHeapFree(IndexRecord); MmHeapFree(MftRecord); return FALSE; } - NtfsReadAttribute(Volume, IndexBitmapCtx, 0, BitmapData, BitmapDataSize); + NtfsReadAttribute(Volume, IndexBitmapCtx, 0, BitmapData, (ULONG)BitmapDataSize); NtfsReleaseAttributeContext(IndexBitmapCtx); IndexAllocationCtx = NtfsFindAttribute(Volume, MftRecord, NTFS_ATTR_TYPE_INDEX_ALLOCATION, L"$I30"); @@ -693,7 +703,7 @@ static BOOLEAN NtfsLookupFile(PNTFS_VOLUME_INFO Volume, PCSTR FileName, PNTFS_MF { ULONG NumberOfPathParts; CHAR PathPart[261]; - ULONG CurrentMFTIndex; + ULONGLONG CurrentMFTIndex; UCHAR i; DPRINTM(DPRINT_FILESYSTEM, "NtfsLookupFile() FileName = %s\n", FileName); @@ -748,8 +758,8 @@ LONG NtfsGetFileInformation(ULONG FileId, FILEINFORMATION* Information) PNTFS_FILE_HANDLE FileHandle = FsGetDeviceSpecific(FileId); RtlZeroMemory(Information, sizeof(FILEINFORMATION)); - Information->EndingAddress.LowPart = (ULONG)NtfsGetAttributeSize(&FileHandle->DataContext->Record); - Information->CurrentAddress.LowPart = FileHandle->Offset; + Information->EndingAddress.QuadPart = NtfsGetAttributeSize(&FileHandle->DataContext->Record); + Information->CurrentAddress.QuadPart = FileHandle->Offset; DPRINTM(DPRINT_FILESYSTEM, "NtfsGetFileInformation() FileSize = %d\n", Information->EndingAddress.LowPart); @@ -923,8 +933,7 @@ const DEVVTBL* NtfsMount(ULONG DeviceId) MmHeapFree(Volume); return NULL; } - Position.HighPart = 0; - Position.LowPart = Volume->BootSector.MftLocation * Volume->ClusterSize; + Position.QuadPart = Volume->BootSector.MftLocation * Volume->ClusterSize; ret = ArcSeek(DeviceId, &Position, SeekAbsolute); if (ret != ESUCCESS) { diff --git a/boot/freeldr/freeldr/include/arcemul.h b/boot/freeldr/freeldr/include/arcemul.h index 45c34ab04b3..2d6a450d2ca 100644 --- a/boot/freeldr/freeldr/include/arcemul.h +++ b/boot/freeldr/freeldr/include/arcemul.h @@ -35,8 +35,8 @@ ArcGetConfigurationData( CONFIGURATION_COMPONENT* Component); /* mm.c */ -MEMORY_DESCRIPTOR* -ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current); +const MEMORY_DESCRIPTOR* +ArcGetMemoryDescriptor(const MEMORY_DESCRIPTOR* Current); /* time.c */ TIMEINFO* ArcGetTime(VOID); diff --git a/boot/freeldr/freeldr/include/arch.h b/boot/freeldr/freeldr/include/arch.h deleted file mode 100644 index 9888601a434..00000000000 --- a/boot/freeldr/freeldr/include/arch.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * FreeLoader - * Copyright (C) 1998-2003 Brian Palmer - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __ASM__ -#pragma once -#endif - -#ifndef HEX -#define HEX(y) 0x##y -#endif - -#ifdef _M_AMD64 -#include -#endif - -#if defined (_M_IX86) -/* Defines needed for switching between real and protected mode */ -#define NULL_DESC HEX(00) /* NULL descriptor */ -#define PMODE_CS HEX(08) /* PMode code selector, base 0 limit 4g */ -#define PMODE_DS HEX(10) /* PMode data selector, base 0 limit 4g */ -#define RMODE_CS HEX(18) /* RMode code selector, base 0 limit 64k */ -#define RMODE_DS HEX(20) /* RMode data selector, base 0 limit 64k */ -#endif - -#define CR0_PE_SET HEX(00000001) /* OR this value with CR0 to enable pmode */ -#define CR0_PE_CLR HEX(FFFFFFFE) /* AND this value with CR0 to disable pmode */ - -#define STACK16ADDR HEX(7000) /* The 16-bit stack top will be at 0000:7000 */ -#define STACK32ADDR HEX(78000) /* The 32-bit stack top will be at 7000:8000, or 0x78000 */ - -#if defined (_M_IX86) || defined (_M_AMD64) -#define BIOSCALLBUFFER 0x78000 /* Buffer to store temporary data for any Int386() call */ -#define BIOSCALLBUFSEGMENT 0x7800 /* Buffer to store temporary data for any Int386() call */ -#define BIOSCALLBUFOFFSET 0x0000 /* Buffer to store temporary data for any Int386() call */ -#define FILESYSBUFFER 0x80000 /* Buffer to store file system data (e.g. cluster buffer for FAT) */ -#define DISKREADBUFFER 0x90000 /* Buffer to store data read in from the disk via the BIOS */ -#define DISKREADBUFFER_SIZE 512 -#elif defined(_M_PPC) || defined(_M_MIPS) -#define DISKREADBUFFER 0x80000000 -#define FILESYSBUFFER 0x80000000 -#elif defined(_M_ARM) -extern ULONG gDiskReadBuffer, gFileSysBuffer; -#define DISKREADBUFFER gDiskReadBuffer -#define FILESYSBUFFER gFileSysBuffer -#endif - -/* Makes "x" a global variable or label */ -#define EXTERN(x) .global x; x: - - -// Flag Masks -#define I386FLAG_CF HEX(0001) // Carry Flag -#define I386FLAG_RESV1 HEX(0002) // Reserved - Must be 1 -#define I386FLAG_PF HEX(0004) // Parity Flag -#define I386FLAG_RESV2 HEX(0008) // Reserved - Must be 0 -#define I386FLAG_AF HEX(0010) // Auxiliary Flag -#define I386FLAG_RESV3 HEX(0020) // Reserved - Must be 0 -#define I386FLAG_ZF HEX(0040) // Zero Flag -#define I386FLAG_SF HEX(0080) // Sign Flag -#define I386FLAG_TF HEX(0100) // Trap Flag (Single Step) -#define I386FLAG_IF HEX(0200) // Interrupt Flag -#define I386FLAG_DF HEX(0400) // Direction Flag -#define I386FLAG_OF HEX(0800) // Overflow Flag - - -#ifndef __ASM__ - -#include -typedef struct -{ - unsigned long eax; - unsigned long ebx; - unsigned long ecx; - unsigned long edx; - - unsigned long esi; - unsigned long edi; - - unsigned short ds; - unsigned short es; - unsigned short fs; - unsigned short gs; - - unsigned long eflags; - -} DWORDREGS; - -typedef struct -{ - unsigned short ax, _upper_ax; - unsigned short bx, _upper_bx; - unsigned short cx, _upper_cx; - unsigned short dx, _upper_dx; - - unsigned short si, _upper_si; - unsigned short di, _upper_di; - - unsigned short ds; - unsigned short es; - unsigned short fs; - unsigned short gs; - - unsigned short flags, _upper_flags; - -} WORDREGS; - -typedef struct -{ - unsigned char al; - unsigned char ah; - unsigned short _upper_ax; - unsigned char bl; - unsigned char bh; - unsigned short _upper_bx; - unsigned char cl; - unsigned char ch; - unsigned short _upper_cx; - unsigned char dl; - unsigned char dh; - unsigned short _upper_dx; - - unsigned short si, _upper_si; - unsigned short di, _upper_di; - - unsigned short ds; - unsigned short es; - unsigned short fs; - unsigned short gs; - - unsigned short flags, _upper_flags; - -} BYTEREGS; - - -typedef union -{ - DWORDREGS x; - DWORDREGS d; - WORDREGS w; - BYTEREGS b; -} REGS; -#include - -// Int386() -// -// Real mode interrupt vector interface -// -// (E)FLAGS can *only* be returned by this function, not set. -// Make sure all memory pointers are in SEG:OFFS format and -// not linear addresses, unless the interrupt handler -// specifically handles linear addresses. -int Int386(int ivec, REGS* in, REGS* out); - -// This macro tests the Carry Flag -// If CF is set then the call failed (usually) -#define INT386_SUCCESS(regs) ((regs.x.eflags & I386FLAG_CF) == 0) - -void EnableA20(void); - -VOID ChainLoadBiosBootSectorCode(VOID); // Implemented in boot.S -VOID SoftReboot(VOID); // Implemented in boot.S - -VOID DetectHardware(VOID); // Implemented in hardware.c - -#endif /* ! __ASM__ */ diff --git a/boot/freeldr/freeldr/include/arch/amd64/amd64.h b/boot/freeldr/freeldr/include/arch/amd64/amd64.h index e5c73d4b4e5..11aef1f90b6 100644 --- a/boot/freeldr/freeldr/include/arch/amd64/amd64.h +++ b/boot/freeldr/freeldr/include/arch/amd64/amd64.h @@ -18,7 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef __ASM__ #pragma once +#endif // This is needed because headers define wrong one for ReactOS #undef KIP0PCRADDRESS @@ -29,9 +31,6 @@ /* Long mode selectors */ #define LMODE_CS 0x10 #define LMODE_DS 0x18 -#define RMODE_CS 0x20 /* RMode code selector, base 0 limit 64k */ -#define RMODE_DS 0x28 /* RMode data selector, base 0 limit 64k */ -#define CMODE_CS 0x30 #define VA_MASK 0x0000FFFFFFFFFFFFUL @@ -49,17 +48,12 @@ #define APIC_PHYS_BASE 0xfee00000 -#define NUM_PAGES_KERNEL +#define NUM_PAGES_KERNEL #ifndef ASM -typedef struct _PAGE_DIRECTORY_AMD64 -{ - HARDWARE_PTE Pde[512]; -} PAGE_DIRECTORY_AMD64, *PPAGE_DIRECTORY_AMD64; - VOID FrLdrSetupGdtIdt(VOID); - +#define MachInit PcMachInit #endif /* EOF */ diff --git a/boot/freeldr/freeldr/include/arch/amd64/machpc.h b/boot/freeldr/freeldr/include/arch/amd64/machpc.h deleted file mode 100644 index efcf293dcab..00000000000 --- a/boot/freeldr/freeldr/include/arch/amd64/machpc.h +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id: machpc.h 32135 2008-02-05 11:13:17Z ros-arm-bringup $ - * - * FreeLoader - * - * Copyright (C) 2003 Eric Kohl - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#pragma once - -#ifndef __MEMORY_H -#include "mm.h" -#endif - -#define MachInit PcMachInit -VOID PcMachInit(const char *CmdLine); - -VOID PcConsPutChar(int Ch); -BOOLEAN PcConsKbHit(VOID); -int PcConsGetCh(VOID); - -VOID PcVideoClearScreen(UCHAR Attr); -VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init); -VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); -ULONG PcVideoGetBufferSize(VOID); -VOID PcVideoSetTextCursorPosition(ULONG X, ULONG Y); -VOID PcVideoHideShowTextCursor(BOOLEAN Show); -VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); -VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer); -BOOLEAN PcVideoIsPaletteFixed(VOID); -VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); -VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); -VOID PcVideoSync(VOID); -VOID PcVideoPrepareForReactOS(IN BOOLEAN Setup); -VOID PcPrepareForReactOS(IN BOOLEAN Setup); - -ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); - -BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); -BOOLEAN PcDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOLEAN PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); -ULONG PcDiskGetCacheableBlockCount(ULONG DriveNumber); - -TIMEINFO* PcGetTime(VOID); - -PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID); - -/* EOF */ diff --git a/boot/freeldr/freeldr/include/arch/arm/hardware.h b/boot/freeldr/freeldr/include/arch/arm/hardware.h index 1668b4f4daa..3bc931076d3 100644 --- a/boot/freeldr/freeldr/include/arch/arm/hardware.h +++ b/boot/freeldr/freeldr/include/arch/arm/hardware.h @@ -35,3 +35,7 @@ extern ULONG SecondLevelDcacheSize; extern ULONG SecondLevelDcacheFillSize; extern ULONG SecondLevelIcacheSize; extern ULONG SecondLevelIcacheFillSize; + +extern ULONG gDiskReadBuffer, gFileSysBuffer; +#define DISKREADBUFFER gDiskReadBuffer +#define FILESYSBUFFER gFileSysBuffer diff --git a/boot/freeldr/freeldr/include/arch/i386/drivemap.h b/boot/freeldr/freeldr/include/arch/i386/drivemap.h index aebd893a53b..90ee931d1a2 100644 --- a/boot/freeldr/freeldr/include/arch/i386/drivemap.h +++ b/boot/freeldr/freeldr/include/arch/i386/drivemap.h @@ -29,7 +29,7 @@ typedef struct VOID DriveMapMapDrivesInSection(PCSTR SectionName); BOOLEAN DriveMapIsValidDriveString(PCSTR DriveString); // Checks the drive string ("hd0") for validity -ULONG DriveMapGetBiosDriveNumber(PCSTR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0') +UCHAR DriveMapGetBiosDriveNumber(PCSTR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0') VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap); // Installs the int 13h handler for the drive mapper VOID DriveMapRemoveInt13Handler(VOID); // Removes a previously installed int 13h drive map handler diff --git a/boot/freeldr/freeldr/include/arch/i386/hardware.h b/boot/freeldr/freeldr/include/arch/i386/hardware.h deleted file mode 100644 index 5974067cd2b..00000000000 --- a/boot/freeldr/freeldr/include/arch/i386/hardware.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * FreeLoader - * - * Copyright (C) 2003 Eric Kohl - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#pragma once - -#ifndef __REGISTRY_H -#include "../../reactos/registry.h" -#endif - -#define CONFIG_CMD(bus, dev_fn, where) \ - (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3)) - - -// -// Static heap for ARC Hardware Component Tree -// 16KB oughta be enough for anyone. -// -#define HW_MAX_ARC_HEAP_SIZE 16 * 1024 - -// -// ARC Component Configuration Routines -// -VOID -NTAPI -FldrCreateSystemKey( - OUT PCONFIGURATION_COMPONENT_DATA *SystemKey -); - -VOID -NTAPI -FldrCreateComponentKey( - IN PCONFIGURATION_COMPONENT_DATA SystemKey, - IN CONFIGURATION_CLASS Class, - IN CONFIGURATION_TYPE Type, - IN IDENTIFIER_FLAG Flags, - IN ULONG Key, - IN ULONG Affinity, - IN PCHAR IdentifierString, - IN PCM_PARTIAL_RESOURCE_LIST ResourceList, - IN ULONG Size, - OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey -); - -/* PROTOTYPES ***************************************************************/ - -/* hardware.c */ - -VOID StallExecutionProcessor(ULONG Microseconds); - -VOID HalpCalibrateStallExecution(VOID); - -/* hwacpi.c */ -VOID DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber); - -/* hwapm.c */ -VOID DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber); - -/* hwpci.c */ -VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber); - -/* i386cpu.S */ -ULONG CpuidSupported(VOID); -VOID GetCpuid(ULONG Level, - ULONG *eax, - ULONG *ebx, - ULONG *ecx, - ULONG *edx); -ULONGLONG RDTSC(VOID); - -/* i386pnp.S */ -ULONG PnpBiosSupported(VOID); -ULONG PnpBiosGetDeviceNodeCount(ULONG *NodeSize, - ULONG *NodeCount); -ULONG PnpBiosGetDeviceNode(UCHAR *NodeId, - UCHAR *NodeBuffer); - -/* i386pxe.S */ -USHORT PxeCallApi(USHORT Segment, USHORT Offset, USHORT Service, VOID* Parameter); - -/* EOF */ diff --git a/boot/freeldr/freeldr/include/arch/i386/i386.h b/boot/freeldr/freeldr/include/arch/i386/i386.h index faf26b8b8fd..19a90a4e736 100644 --- a/boot/freeldr/freeldr/include/arch/i386/i386.h +++ b/boot/freeldr/freeldr/include/arch/i386/i386.h @@ -24,4 +24,23 @@ #undef KIP0PCRADDRESS #define KIP0PCRADDRESS 0xffdff000 +void i386DivideByZero(void); +void i386DebugException(void); +void i386NMIException(void); +void i386Breakpoint(void); +void i386Overflow(void); +void i386BoundException(void); +void i386InvalidOpcode(void); +void i386FPUNotAvailable(void); +void i386DoubleFault(void); +void i386CoprocessorSegment(void); +void i386InvalidTSS(void); +void i386SegmentNotPresent(void); +void i386StackException(void); +void i386GeneralProtectionFault(void); +void i386PageFault(void); +void i386CoprocessorError(void); +void i386AlignmentCheck(void); +void i386MachineCheck(void); + /* EOF */ diff --git a/boot/freeldr/freeldr/include/arch/i386/machxbox.h b/boot/freeldr/freeldr/include/arch/i386/machxbox.h index febba0b8636..241320ac189 100644 --- a/boot/freeldr/freeldr/include/arch/i386/machxbox.h +++ b/boot/freeldr/freeldr/include/arch/i386/machxbox.h @@ -36,7 +36,7 @@ VOID XboxVideoClearScreen(UCHAR Attr); VIDEODISPLAYMODE XboxVideoSetDisplayMode(char *DisplayModem, BOOLEAN Init); VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); ULONG XboxVideoGetBufferSize(VOID); -VOID XboxVideoSetTextCursorPosition(ULONG X, ULONG Y); +VOID XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y); VOID XboxVideoHideShowTextCursor(BOOLEAN Show); VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); VOID XboxVideoCopyOffScreenBufferToVRAM(PVOID Buffer); @@ -51,10 +51,10 @@ VOID XboxMemInit(VOID); PVOID XboxMemReserveMemory(ULONG MbToReserve); ULONG XboxMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); -BOOLEAN XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); -BOOLEAN XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOLEAN XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); -ULONG XboxDiskGetCacheableBlockCount(ULONG DriveNumber); +BOOLEAN XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); +BOOLEAN XboxDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOLEAN XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry); +ULONG XboxDiskGetCacheableBlockCount(UCHAR DriveNumber); TIMEINFO* XboxGetTime(VOID); diff --git a/boot/freeldr/freeldr/include/arch/amd64/hardware.h b/boot/freeldr/freeldr/include/arch/pc/hardware.h similarity index 90% rename from boot/freeldr/freeldr/include/arch/amd64/hardware.h rename to boot/freeldr/freeldr/include/arch/pc/hardware.h index b6da01e555e..0e4e8542c54 100644 --- a/boot/freeldr/freeldr/include/arch/amd64/hardware.h +++ b/boot/freeldr/freeldr/include/arch/pc/hardware.h @@ -20,10 +20,6 @@ #pragma once -#ifndef __REGISTRY_H -#include "../../reactos/registry.h" -#endif - #define CONFIG_CMD(bus, dev_fn, where) \ (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3)) @@ -75,15 +71,6 @@ VOID DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber); /* hwpci.c */ VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber); -/* i386cpu.S */ -ULONG CpuidSupported(VOID); -VOID GetCpuid(ULONG Level, - ULONG *eax, - ULONG *ebx, - ULONG *ecx, - ULONG *edx); -ULONGLONG RDTSC(VOID); - /* i386pnp.S */ ULONG_PTR PnpBiosSupported(VOID); ULONG PnpBiosGetDeviceNodeCount(ULONG *NodeSize, @@ -91,4 +78,7 @@ ULONG PnpBiosGetDeviceNodeCount(ULONG *NodeSize, ULONG PnpBiosGetDeviceNode(UCHAR *NodeId, UCHAR *NodeBuffer); +/* i386pxe.S */ +USHORT PxeCallApi(USHORT Segment, USHORT Offset, USHORT Service, VOID* Parameter); + /* EOF */ diff --git a/boot/freeldr/freeldr/include/arch/i386/machpc.h b/boot/freeldr/freeldr/include/arch/pc/machpc.h similarity index 87% rename from boot/freeldr/freeldr/include/arch/i386/machpc.h rename to boot/freeldr/freeldr/include/arch/pc/machpc.h index e2af2118b8b..43ca48a2b12 100644 --- a/boot/freeldr/freeldr/include/arch/i386/machpc.h +++ b/boot/freeldr/freeldr/include/arch/pc/machpc.h @@ -35,7 +35,7 @@ VOID PcVideoClearScreen(UCHAR Attr); VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init); VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); ULONG PcVideoGetBufferSize(VOID); -VOID PcVideoSetTextCursorPosition(ULONG X, ULONG Y); +VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y); VOID PcVideoHideShowTextCursor(BOOLEAN Show); VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer); @@ -49,10 +49,10 @@ VOID PcPrepareForReactOS(IN BOOLEAN Setup); ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); BOOLEAN PcDiskGetBootPath(char *BootPath, unsigned Size); -BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); -BOOLEAN PcDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOLEAN PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); -ULONG PcDiskGetCacheableBlockCount(ULONG DriveNumber); +BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); +BOOLEAN PcDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOLEAN PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry); +ULONG PcDiskGetCacheableBlockCount(UCHAR DriveNumber); TIMEINFO* PcGetTime(VOID); diff --git a/boot/freeldr/freeldr/include/arch/pc/pcbios.h b/boot/freeldr/freeldr/include/arch/pc/pcbios.h new file mode 100644 index 00000000000..61ff8df5211 --- /dev/null +++ b/boot/freeldr/freeldr/include/arch/pc/pcbios.h @@ -0,0 +1,98 @@ +#ifndef __ASM__ + +#include +typedef struct +{ + unsigned long eax; + unsigned long ebx; + unsigned long ecx; + unsigned long edx; + + unsigned long esi; + unsigned long edi; + + unsigned short ds; + unsigned short es; + unsigned short fs; + unsigned short gs; + + unsigned long eflags; + +} DWORDREGS; + +typedef struct +{ + unsigned short ax, _upper_ax; + unsigned short bx, _upper_bx; + unsigned short cx, _upper_cx; + unsigned short dx, _upper_dx; + + unsigned short si, _upper_si; + unsigned short di, _upper_di; + + unsigned short ds; + unsigned short es; + unsigned short fs; + unsigned short gs; + + unsigned short flags, _upper_flags; + +} WORDREGS; + +typedef struct +{ + unsigned char al; + unsigned char ah; + unsigned short _upper_ax; + unsigned char bl; + unsigned char bh; + unsigned short _upper_bx; + unsigned char cl; + unsigned char ch; + unsigned short _upper_cx; + unsigned char dl; + unsigned char dh; + unsigned short _upper_dx; + + unsigned short si, _upper_si; + unsigned short di, _upper_di; + + unsigned short ds; + unsigned short es; + unsigned short fs; + unsigned short gs; + + unsigned short flags, _upper_flags; + +} BYTEREGS; + + +typedef union +{ + DWORDREGS x; + DWORDREGS d; + WORDREGS w; + BYTEREGS b; +} REGS; +#include + +// Int386() +// +// Real mode interrupt vector interface +// +// (E)FLAGS can *only* be returned by this function, not set. +// Make sure all memory pointers are in SEG:OFFS format and +// not linear addresses, unless the interrupt handler +// specifically handles linear addresses. +int Int386(int ivec, REGS* in, REGS* out); + +// This macro tests the Carry Flag +// If CF is set then the call failed (usually) +#define INT386_SUCCESS(regs) ((regs.x.eflags & I386FLAG_CF) == 0) + +void EnableA20(void); +VOID ChainLoadBiosBootSectorCode(VOID); // Implemented in boot.S +VOID SoftReboot(VOID); // Implemented in boot.S +VOID DetectHardware(VOID); // Implemented in hardware.c + +#endif /* ! __ASM__ */ diff --git a/boot/freeldr/freeldr/include/arch/i386/pxe.h b/boot/freeldr/freeldr/include/arch/pc/pxe.h similarity index 100% rename from boot/freeldr/freeldr/include/arch/i386/pxe.h rename to boot/freeldr/freeldr/include/arch/pc/pxe.h diff --git a/boot/freeldr/freeldr/include/arch/pc/x86common.h b/boot/freeldr/freeldr/include/arch/pc/x86common.h new file mode 100644 index 00000000000..1e85f214630 --- /dev/null +++ b/boot/freeldr/freeldr/include/arch/pc/x86common.h @@ -0,0 +1,91 @@ + +#ifndef HEX +#define HEX(y) 0x##y +#endif + +/* Memory layout */ +#define STACK16ADDR HEX(6F00) /* The 16-bit stack top will be at 0000:6F00 */ +#define BSS_START HEX(6F00) +#define FREELDR_BASE HEX(F800) +#define FREELDR_PE_BASE HEX(10000) +#define STACK32ADDR HEX(98000) /* The 32-bit stack top will be at 9000:8000, or 0xA8000 */ +#define BIOSCALLBUFFER HEX(98000) /* Buffer to store temporary data for any Int386() call */ +#define FILESYSBUFFER HEX(80000) /* Buffer to store file system data (e.g. cluster buffer for FAT) */ +#define DISKREADBUFFER HEX(90000) /* Buffer to store data read in from the disk via the BIOS */ +#define DISKREADBUFFER_SIZE 512 + +#define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */ +#define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386() call */ + +/* These addresses specify the realmode "BSS section" layout */ +#define BSS_RealModeEntry (BSS_START + 0) +#define BSS_CallbackAddress (BSS_START + 4) +#define BSS_CallbackReturn (BSS_START + 8) +#define BSS_RegisterSet (BSS_START + 16) /* size = 36 */ +#define BSS_IntVector (BSS_START + 52) +#define BSS_PxeEntryPoint (BSS_START + 56) +#define BSS_PxeBufferSegment (BSS_START + 60) +#define BSS_PxeBufferOffset (BSS_START + 64) +#define BSS_PxeFunction (BSS_START + 68) +#define BSS_PxeResult (BSS_START + 72) +#define BSS_PnpBiosEntryPoint (BSS_START + 76) +#define BSS_PnpBiosDataSegment (BSS_START + 80) +#define BSS_PnpBiosBufferSegment (BSS_START + 84) +#define BSS_PnpBiosBufferOffset (BSS_START + 88) +#define BSS_PnpNodeSize (BSS_START + 92) +#define BSS_PnpNodeCount (BSS_START + 96) +#define BSS_PnpNodeNumber (BSS_START + 100) +#define BSS_PnpResult (BSS_START + 104) + + +/* Realmode function IDs */ +#define FNID_Int386 0 +#define FNID_SoftReboot 1 +#define FNID_ChainLoadBiosBootSectorCode 2 +#define FNID_PxeCallApi 3 +#define FNID_PnpBiosGetDeviceNodeCount 4 +#define FNID_PnpBiosGetDeviceNode 5 +#define FNID_BootLinuxKernel 6 + +/* Layout of the REGS structure */ +#define REGS_EAX 0 +#define REGS_EBX 4 +#define REGS_ECX 8 +#define REGS_EDX 12 +#define REGS_ESI 16 +#define REGS_EDI 20 +#define REGS_DS 24 +#define REGS_ES 26 +#define REGS_FS 28 +#define REGS_GS 30 +#define REGS_EFLAGS 32 + + +// Flag Masks +#define I386FLAG_CF HEX(0001) // Carry Flag +#define I386FLAG_RESV1 HEX(0002) // Reserved - Must be 1 +#define I386FLAG_PF HEX(0004) // Parity Flag +#define I386FLAG_RESV2 HEX(0008) // Reserved - Must be 0 +#define I386FLAG_AF HEX(0010) // Auxiliary Flag +#define I386FLAG_RESV3 HEX(0020) // Reserved - Must be 0 +#define I386FLAG_ZF HEX(0040) // Zero Flag +#define I386FLAG_SF HEX(0080) // Sign Flag +#define I386FLAG_TF HEX(0100) // Trap Flag (Single Step) +#define I386FLAG_IF HEX(0200) // Interrupt Flag +#define I386FLAG_DF HEX(0400) // Direction Flag +#define I386FLAG_OF HEX(0800) // Overflow Flag + +#define CR0_PE_SET HEX(00000001) /* OR this value with CR0 to enable pmode */ +#define CR0_PE_CLR HEX(FFFFFFFE) /* AND this value with CR0 to disable pmode */ + +/* Defines needed for switching between real and protected mode */ +//#ifdef _M_IX86 +#define NULL_DESC HEX(00) /* NULL descriptor */ +#define PMODE_CS HEX(08) /* PMode code selector, base 0 limit 4g */ +#define PMODE_DS HEX(10) /* PMode data selector, base 0 limit 4g */ +#define RMODE_CS HEX(18) /* RMode code selector, base 0 limit 64k */ +#define RMODE_DS HEX(20) /* RMode data selector, base 0 limit 64k */ +//#endif + +/* Makes "x" a global variable or label */ +#define EXTERN(x) .global x; x: diff --git a/boot/freeldr/freeldr/include/cache.h b/boot/freeldr/freeldr/include/cache.h index abadfd32c93..ecc02acac5f 100644 --- a/boot/freeldr/freeldr/include/cache.h +++ b/boot/freeldr/freeldr/include/cache.h @@ -50,7 +50,7 @@ typedef struct /////////////////////////////////////////////////////////////////////////////////////// typedef struct { - ULONG DriveNumber; + UCHAR DriveNumber; ULONG BytesPerSector; ULONG BlockSize; // Block size (in sectors) @@ -84,8 +84,8 @@ VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive); // Dumps the VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK CacheBlock); // Moves the specified block to the head of the list -BOOLEAN CacheInitializeDrive(ULONG DriveNumber); +BOOLEAN CacheInitializeDrive(UCHAR DriveNumber); VOID CacheInvalidateCacheData(VOID); -BOOLEAN CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer); -BOOLEAN CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount); +BOOLEAN CacheReadDiskSectors(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount, PVOID Buffer); +BOOLEAN CacheForceDiskSectorsIntoCache(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount); BOOLEAN CacheReleaseMemory(ULONG MinimumAmountToRelease); diff --git a/boot/freeldr/freeldr/include/disk.h b/boot/freeldr/freeldr/include/disk.h index 191ee1215d6..9a862d1925f 100644 --- a/boot/freeldr/freeldr/include/disk.h +++ b/boot/freeldr/freeldr/include/disk.h @@ -105,10 +105,10 @@ typedef struct _MASTER_BOOT_RECORD /////////////////////////////////////////////////////////////////////////////////////// #if defined(__i386__) || defined(_M_AMD64) -BOOLEAN DiskResetController(ULONG DriveNumber); -BOOLEAN DiskInt13ExtensionsSupported(ULONG DriveNumber); +BOOLEAN DiskResetController(UCHAR DriveNumber); +BOOLEAN DiskInt13ExtensionsSupported(UCHAR DriveNumber); //VOID DiskStopFloppyMotor(VOID); -BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT BufferSize); +BOOLEAN DiskGetExtendedDriveParameters(UCHAR DriveNumber, PVOID Buffer, USHORT BufferSize); #endif // defined __i386__ || defined(_M_AMD64) @@ -120,11 +120,11 @@ BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT B VOID DiskReportError (BOOLEAN bError); VOID DiskError(PCSTR ErrorString, ULONG ErrorCode); PCSTR DiskGetErrorCodeString(ULONG ErrorCode); -BOOLEAN DiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); // Implemented in i386disk.c -BOOLEAN DiskIsDriveRemovable(ULONG DriveNumber); +BOOLEAN DiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); // Implemented in i386disk.c +BOOLEAN DiskIsDriveRemovable(UCHAR DriveNumber); VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c -extern ULONG BootDrive; -extern ULONG BootPartition; +extern UCHAR FrldrBootDrive; +extern ULONG FrldrBootPartition; BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size); @@ -134,10 +134,10 @@ BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size); // Fixed Disk Partition Management Functions // /////////////////////////////////////////////////////////////////////////////////////// -BOOLEAN DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry, ULONG *ActivePartition); -BOOLEAN DiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOLEAN DiskGetActivePartitionEntry(UCHAR DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry, ULONG *ActivePartition); +BOOLEAN DiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); BOOLEAN DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry); BOOLEAN DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord); +BOOLEAN DiskReadBootRecord(UCHAR DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord); ULONG LoadBootDeviceDriver(VOID); diff --git a/boot/freeldr/freeldr/include/freeldr.h b/boot/freeldr/freeldr/include/freeldr.h index 694c9c764a9..5e4df748261 100644 --- a/boot/freeldr/freeldr/include/freeldr.h +++ b/boot/freeldr/freeldr/include/freeldr.h @@ -29,6 +29,7 @@ #define ROUND_UP(n, align) \ ROUND_DOWN(((ULONG)n) + (align) - 1, (align)) +/* public headers */ #define NTOSAPI #define printf TuiPrintf #include @@ -45,77 +46,77 @@ #include #include #include -#include -#include #include +#include +#include +#include +#include +#include + +/* internal headers */ +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include #include -#include -#include + /* file system headers */ #include #include #include #include #include + /* ui support */ #include #include #include #include -/* arch files */ + +/* arch specific includes */ +#if defined(_M_IX86) || defined(_M_AMD64) +#include +#include +#include +#include +#include +#endif #if defined(_M_IX86) #include #include -#include #include -#include #include #include -#include #include +#elif defined(_M_AMD64) +#include +#include #elif defined(_M_PPC) #include #elif defined(_M_ARM) #include #elif defined(_M_MIPS) #include -#elif defined(_M_AMD64) -#include -#include -#include #endif -/* misc files */ -#include -#include -#include -#include -#include -/* Needed by boot manager */ -#include -#include -#include -/* Externals */ -#include -#include -/* Needed if debuging is enabled */ -#include -/* Swap */ -#include -/* Internal shared PCI header */ -#include VOID BootMain(LPSTR CmdLine); VOID RunLoader(VOID); diff --git a/boot/freeldr/freeldr/include/fs/ext2.h b/boot/freeldr/freeldr/include/fs/ext2.h index 8a2b518a4be..3458e7dc94a 100644 --- a/boot/freeldr/freeldr/include/fs/ext2.h +++ b/boot/freeldr/freeldr/include/fs/ext2.h @@ -75,7 +75,7 @@ struct ext2_sblock ULONG free_inodes; ULONG first_data_block; ULONG log2_block_size; - ULONG log2_fragment_size; + LONG log2_fragment_size; ULONG blocks_per_group; ULONG fragments_per_group; ULONG inodes_per_group; diff --git a/boot/freeldr/freeldr/include/machine.h b/boot/freeldr/freeldr/include/machine.h index ba2be4fdf6a..1e77b786e97 100644 --- a/boot/freeldr/freeldr/include/machine.h +++ b/boot/freeldr/freeldr/include/machine.h @@ -47,7 +47,7 @@ typedef struct tagMACHVTBL VIDEODISPLAYMODE (*VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init); VOID (*VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth); ULONG (*VideoGetBufferSize)(VOID); - VOID (*VideoSetTextCursorPosition)(ULONG X, ULONG Y); + VOID (*VideoSetTextCursorPosition)(UCHAR X, UCHAR Y); VOID (*VideoHideShowTextCursor)(BOOLEAN Show); VOID (*VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y); VOID (*VideoCopyOffScreenBufferToVRAM)(PVOID Buffer); @@ -62,9 +62,9 @@ typedef struct tagMACHVTBL ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size); - BOOLEAN (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); - BOOLEAN (*DiskGetDriveGeometry)(ULONG DriveNumber, PGEOMETRY DriveGeometry); - ULONG (*DiskGetCacheableBlockCount)(ULONG DriveNumber); + BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); + BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry); + ULONG (*DiskGetCacheableBlockCount)(UCHAR DriveNumber); TIMEINFO* (*GetTime)(VOID); ULONG (*GetRelativeTime)(VOID); @@ -83,7 +83,7 @@ VOID MachVideoClearScreen(UCHAR Attr); VIDEODISPLAYMODE MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init); VOID MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); ULONG MachVideoGetBufferSize(VOID); -VOID MachVideoSetTextCursorPosition(ULONG X, ULONG Y); +VOID MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y); VOID MachVideoHideShowTextCursor(BOOLEAN Show); VOID MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); VOID MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer); @@ -92,12 +92,11 @@ VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue); VOID MachVideoSync(VOID); VOID MachBeep(VOID); -MEMORY_DESCRIPTOR* ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current); BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size); BOOLEAN MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size); -BOOLEAN MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); -BOOLEAN MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); -ULONG MachDiskGetCacheableBlockCount(ULONG DriveNumber); +BOOLEAN MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); +BOOLEAN MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry); +ULONG MachDiskGetCacheableBlockCount(UCHAR DriveNumber); VOID MachPrepareForReactOS(IN BOOLEAN Setup); #define MachConsPutChar(Ch) MachVtbl.ConsPutChar(Ch) diff --git a/boot/freeldr/freeldr/include/mm.h b/boot/freeldr/freeldr/include/mm.h index a7840e37791..8d325191bcd 100644 --- a/boot/freeldr/freeldr/include/mm.h +++ b/boot/freeldr/freeldr/include/mm.h @@ -42,6 +42,7 @@ typedef struct #define MM_PAGE_SIZE 4096 #define MM_PAGE_MASK 0xFFF #define MM_PAGE_SHIFT 12 +#define MM_MAX_PAGE 0xFFFFF #define MM_SIZE_TO_PAGES(a) \ ( ((a) >> MM_PAGE_SHIFT) + ((a) & MM_PAGE_MASK ? 1 : 0) ) @@ -53,6 +54,8 @@ typedef struct #define MM_PAGE_SIZE 4096 #define MM_PAGE_MASK 0xFFF #define MM_PAGE_SHIFT 12 +// FIXME: freeldr implementation uses ULONG for page numbers +#define MM_MAX_PAGE 0xFFFFFFFFFFFFF #define MM_SIZE_TO_PAGES(a) \ ( ((a) >> MM_PAGE_SHIFT) + ((a) & MM_PAGE_MASK ? 1 : 0) ) diff --git a/boot/freeldr/freeldr/include/reactos.h b/boot/freeldr/freeldr/include/reactos.h index 82e23abb946..c31c0ca3f70 100644 --- a/boot/freeldr/freeldr/include/reactos.h +++ b/boot/freeldr/freeldr/include/reactos.h @@ -81,9 +81,9 @@ DissectArcPath2( OUT ULONG* z, OUT ULONG* Partition, OUT ULONG *PathSyntax); -BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* BootPartition); -VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, ULONG Disk, ULONG Partition); -ULONG ConvertArcNameToBiosDriveNumber(PCHAR ArcPath); +BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, UCHAR* BootDrive, ULONG* BootPartition); +VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition); +UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath); /////////////////////////////////////////////////////////////////////////////////////// // diff --git a/boot/freeldr/freeldr/inifile/parse.c b/boot/freeldr/freeldr/inifile/parse.c index 54fb16a6864..47c58966cf5 100644 --- a/boot/freeldr/freeldr/inifile/parse.c +++ b/boot/freeldr/freeldr/inifile/parse.c @@ -180,12 +180,11 @@ BOOLEAN IniParseFile(PCHAR IniFileData, ULONG IniFileSize) ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset) { - ULONG Idx; ULONG LineCharCount = 0; // Loop through counting chars until we hit the end of the // file or we encounter a new line char - for (Idx=0; (CurrentOffset < IniFileSize); CurrentOffset++) + for (; (CurrentOffset < IniFileSize); CurrentOffset++) { // Increment the line character count LineCharCount++; @@ -193,7 +192,6 @@ ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffs // Check for new line char if (IniFileData[CurrentOffset] == '\n') { - CurrentOffset++; break; } } diff --git a/boot/freeldr/freeldr/machine.c b/boot/freeldr/freeldr/machine.c index c898bf49430..5dae495d960 100644 --- a/boot/freeldr/freeldr/machine.c +++ b/boot/freeldr/freeldr/machine.c @@ -86,7 +86,7 @@ MachVideoGetBufferSize(VOID) } VOID -MachVideoSetTextCursorPosition(ULONG X, ULONG Y) +MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y) { MachVtbl.VideoSetTextCursorPosition(X, Y); } @@ -152,19 +152,19 @@ MachDiskGetBootPath(char *BootPath, unsigned Size) } BOOLEAN -MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) +MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); } BOOLEAN -MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry) +MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry) { return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry); } ULONG -MachDiskGetCacheableBlockCount(ULONG DriveNumber) +MachDiskGetCacheableBlockCount(UCHAR DriveNumber) { return MachVtbl.DiskGetCacheableBlockCount(DriveNumber); } diff --git a/boot/freeldr/freeldr/mm/meminit.c b/boot/freeldr/freeldr/mm/meminit.c index f59a43f7b54..e8e399bcf3d 100644 --- a/boot/freeldr/freeldr/mm/meminit.c +++ b/boot/freeldr/freeldr/mm/meminit.c @@ -48,6 +48,8 @@ PVOID PageLookupTableAddress = NULL; ULONG TotalPagesInLookupTable = 0; ULONG FreePagesInLookupTable = 0; ULONG LastFreePageHint = 0; +ULONG MmLowestPhysicalPage = 0xFFFFFFFF; +ULONG MmHighestPhysicalPage = 0; extern ULONG_PTR MmHeapPointer; extern ULONG_PTR MmHeapStart; @@ -55,7 +57,7 @@ extern ULONG_PTR MmHeapStart; BOOLEAN MmInitializeMemoryManager(VOID) { #if DBG - MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; + const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; #endif DPRINTM(DPRINT_MEMORY, "Initializing Memory Manager.\n"); @@ -75,7 +77,7 @@ BOOLEAN MmInitializeMemoryManager(VOID) // Find address for the page lookup table TotalPagesInLookupTable = MmGetAddressablePageCountIncludingHoles(); PageLookupTableAddress = MmFindLocationForPageLookupTable(TotalPagesInLookupTable); - LastFreePageHint = TotalPagesInLookupTable; + LastFreePageHint = MmHighestPhysicalPage; if (PageLookupTableAddress == 0) { @@ -102,20 +104,21 @@ VOID MmInitializeHeap(PVOID PageLookupTable) { ULONG PagesNeeded; ULONG HeapStart; +#ifndef _M_ARM MEMORY_TYPE Type; PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; // HACK: Make it so it doesn't overlap kernel space Type = RealPageLookupTable[0x100].PageAllocated; MmMarkPagesInLookupTable(PageLookupTableAddress, 0x100, 0xFF, LoaderSystemCode); - +#endif // Find contigious memory block for HEAP:STACK PagesNeeded = HEAP_PAGES + STACK_PAGES; HeapStart = MmFindAvailablePages(PageLookupTable, TotalPagesInLookupTable, PagesNeeded, FALSE); - +#ifndef _M_ARM // Unapply the hack MmMarkPagesInLookupTable(PageLookupTableAddress, 0x100, 0xFF, Type); - +#endif if (HeapStart == 0) { UiMessageBox("Critical error: Can't allocate heap!"); @@ -155,8 +158,8 @@ ULONG MmGetPageNumberFromAddress(PVOID Address) ULONG MmGetAddressablePageCountIncludingHoles(VOID) { - MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; - ULONG EndPage = 0; + const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; + ULONG PageCount; // // Go through the whole memory map to get max address @@ -166,23 +169,35 @@ ULONG MmGetAddressablePageCountIncludingHoles(VOID) // // Check if we got a higher end page address // - if (MemoryDescriptor->BasePage + MemoryDescriptor->PageCount > EndPage) + if (MemoryDescriptor->BasePage + MemoryDescriptor->PageCount > MmHighestPhysicalPage) { // - // Yes, remember it + // Yes, remember it if this is real memory // - EndPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; + if (MemoryDescriptor->MemoryType == MemoryFree) MmHighestPhysicalPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; + } + + // + // Check if we got a higher (usable) start page address + // + if (MemoryDescriptor->BasePage < MmLowestPhysicalPage) + { + // + // Yes, remember it if this is real memory + // + if (MemoryDescriptor->MemoryType == MemoryFree) MmLowestPhysicalPage = MemoryDescriptor->BasePage; } } - - DPRINTM(DPRINT_MEMORY, "MmGetAddressablePageCountIncludingHoles() returning 0x%x\n", EndPage); - - return EndPage; + + DPRINTM(DPRINT_MEMORY, "lo/hi %lx %lxn", MmLowestPhysicalPage, MmHighestPhysicalPage); + PageCount = MmHighestPhysicalPage - MmLowestPhysicalPage; + DPRINTM(DPRINT_MEMORY, "MmGetAddressablePageCountIncludingHoles() returning 0x%x\n", PageCount); + return PageCount; } PVOID MmFindLocationForPageLookupTable(ULONG TotalPageCount) { - MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; + const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; ULONG PageLookupTableSize; ULONG PageLookupTablePages; ULONG PageLookupTableStartPage = 0; @@ -232,6 +247,17 @@ PVOID MmFindLocationForPageLookupTable(ULONG TotalPageCount) continue; } + // + // Can we use this address? + // + if (MemoryDescriptor->BasePage >= MM_MAX_PAGE) + { + // + // No. Process next descriptor + // + continue; + } + // // Memory block is more suitable than the previous one // @@ -248,7 +274,7 @@ PVOID MmFindLocationForPageLookupTable(ULONG TotalPageCount) VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount) { - MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; + const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; TYPE_OF_MEMORY MemoryMapPageAllocated; ULONG PageLookupTableStartPage; ULONG PageLookupTablePageCount; @@ -260,7 +286,7 @@ VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount) // We will go through and mark pages again according to the memory map // But this will mark any holes not described in the map as allocated // - MmMarkPagesInLookupTable(PageLookupTable, 0, TotalPageCount, LoaderFirmwarePermanent); + MmMarkPagesInLookupTable(PageLookupTable, MmLowestPhysicalPage, TotalPageCount, LoaderFirmwarePermanent); // // Parse the whole memory map @@ -307,9 +333,9 @@ VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount) case MemorySpecialMemory: { // - // Special reserved memory + // OS Loader Stack // - MemoryMapPageAllocated = LoaderSpecialMemory; + MemoryMapPageAllocated = LoaderOsloaderStack; break; } default: @@ -343,6 +369,7 @@ VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG Page PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; ULONG Index; + StartPage -= MmLowestPhysicalPage; for (Index=StartPage; Index<(StartPage+PageCount); Index++) { #if 0 @@ -362,6 +389,7 @@ VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; ULONG Index; + StartPage -= MmLowestPhysicalPage; for (Index=StartPage; Index<(StartPage+PageCount); Index++) { RealPageLookupTable[Index].PageAllocated = MemoryType; @@ -416,7 +444,7 @@ ULONG MmFindAvailablePages(PVOID PageLookupTable, ULONG TotalPageCount, ULONG Pa if (AvailablePagesSoFar >= PagesNeeded) { - return Index; + return Index + MmLowestPhysicalPage; } } } @@ -438,7 +466,7 @@ ULONG MmFindAvailablePages(PVOID PageLookupTable, ULONG TotalPageCount, ULONG Pa if (AvailablePagesSoFar >= PagesNeeded) { - return Index - AvailablePagesSoFar + 1; + return Index - AvailablePagesSoFar + 1 + MmLowestPhysicalPage; } } } @@ -472,7 +500,7 @@ ULONG MmFindAvailablePagesBeforePage(PVOID PageLookupTable, ULONG TotalPageCount if (AvailablePagesSoFar >= PagesNeeded) { - return Index; + return Index + MmLowestPhysicalPage; } } @@ -488,7 +516,7 @@ VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, ULONG TotalPageCount) { if (RealPageLookupTable[Index].PageAllocated == LoaderFree) { - LastFreePageHint = Index + 1; + LastFreePageHint = Index + 1 + MmLowestPhysicalPage; break; } } @@ -501,6 +529,7 @@ BOOLEAN MmAreMemoryPagesAvailable(PVOID PageLookupTable, ULONG TotalPageCount, P ULONG Index; StartPage = MmGetPageNumberFromAddress(PageAddress); + StartPage -= MmLowestPhysicalPage; // Make sure they aren't trying to go past the // end of availabe memory diff --git a/boot/freeldr/freeldr/mm/mm.c b/boot/freeldr/freeldr/mm/mm.c index 0066cb98d15..376f4d545b7 100644 --- a/boot/freeldr/freeldr/mm/mm.c +++ b/boot/freeldr/freeldr/mm/mm.c @@ -371,6 +371,17 @@ ExFreePool( MmHeapFree(P); } +#undef ExFreePoolWithTag +NTKERNELAPI +VOID +NTAPI +ExFreePoolWithTag( + IN PVOID P, + IN ULONG Tag) +{ + ExFreePool(P); +} + PVOID NTAPI RtlAllocateHeap( diff --git a/boot/freeldr/freeldr/reactos/arcname.c b/boot/freeldr/freeldr/reactos/arcname.c index 4b7f97addb6..a51218f0e63 100644 --- a/boot/freeldr/freeldr/reactos/arcname.c +++ b/boot/freeldr/freeldr/reactos/arcname.c @@ -21,7 +21,7 @@ #include -BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* BootPartition) +BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, UCHAR* BootDrive, ULONG* BootPartition) { char *p; @@ -160,7 +160,9 @@ DissectArcPath2( return FALSE; } -VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, ULONG Disk, ULONG Partition) + +#if 0 +VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition) { char tmp[50]; @@ -196,10 +198,10 @@ VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, ULONG Disk, ULONG Parti } } -ULONG ConvertArcNameToBiosDriveNumber(PCHAR ArcPath) +UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath) { char * p; - ULONG DriveNumber = 0; + UCHAR DriveNumber = 0; if (_strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0) return 0; @@ -226,3 +228,4 @@ ULONG ConvertArcNameToBiosDriveNumber(PCHAR ArcPath) return DriveNumber; } +#endif diff --git a/boot/freeldr/freeldr/reactos/imageldr.c b/boot/freeldr/freeldr/reactos/imageldr.c deleted file mode 100644 index 296e3afc10a..00000000000 --- a/boot/freeldr/freeldr/reactos/imageldr.c +++ /dev/null @@ -1,785 +0,0 @@ -#ifndef _M_ARM -#include -#include - -extern BOOLEAN FrLdrBootType; - -ULONG_PTR NextModuleBase = KERNEL_BASE_PHYS; -PLOADER_MODULE CurrentModule = NULL; - -PVOID -NTAPI -LdrPEGetExportByName( - IN PVOID BaseAddress, - IN PUCHAR SymbolName, - IN USHORT Hint -); - -extern BOOLEAN FrLdrLoadDriver(PCHAR szFileName, INT nPos); -ULONG Drivers; -PVOID AnsiData, OemData, UnicodeData, RegistryData, KernelData, HalData, DriverData[16]; -ULONG RegistrySize, AnsiSize, OemSize, UnicodeSize, KernelSize, HalSize, DriverSize[16]; -PCHAR DriverName[16]; - -/* MODULE MANAGEMENT **********************************************************/ - -PLOADER_MODULE -NTAPI -LdrGetModuleObject(IN PCHAR ModuleName) -{ - ULONG i; - - for (i = 0; i < LoaderBlock.ModsCount; i++) - { - if (strstr(_strupr((PCHAR)reactos_modules[i].String), _strupr(ModuleName))) - { - return &reactos_modules[i]; - } - } - - return NULL; -} - -NTSTATUS -NTAPI -LdrPEGetOrLoadModule(IN PCHAR ModuleName, - IN PCHAR ImportedName, - IN PLOADER_MODULE* ImportedModule) -{ - NTSTATUS Status = STATUS_SUCCESS; - - *ImportedModule = LdrGetModuleObject(ImportedName); - if (*ImportedModule == NULL) - { - if (!FrLdrLoadDriver(ImportedName, 0)) - { - return STATUS_UNSUCCESSFUL; - } - else - { - return LdrPEGetOrLoadModule(ModuleName, ImportedName, ImportedModule); - } - } - - return Status; -} - -ULONG_PTR -NTAPI -FrLdrLoadModule(PFILE ModuleImage, - LPCSTR ModuleName, - PULONG ModuleSize) -{ - ULONG LocalModuleSize; - PLOADER_MODULE ModuleData; - LPSTR NameBuffer; - LPSTR TempName; - - /* Get current module data structure and module name string array */ - ModuleData = &reactos_modules[LoaderBlock.ModsCount]; - - /* Get only the Module Name */ - do { - - TempName = strchr(ModuleName, '\\'); - - if(TempName) { - ModuleName = TempName + 1; - } - - } while(TempName); - NameBuffer = reactos_module_strings[LoaderBlock.ModsCount]; - - /* Get Module Size */ - LocalModuleSize = FsGetFileSize(ModuleImage); - - /* Fill out Module Data Structure */ - ModuleData->ModStart = NextModuleBase; - ModuleData->ModEnd = NextModuleBase + LocalModuleSize; - - /* Save name */ - strcpy(NameBuffer, ModuleName); - ModuleData->String = (ULONG_PTR)NameBuffer; - - /* NLS detection for NT Loader Block */ - if (!_stricmp(NameBuffer, "ansi.nls")) - { - AnsiData = (PVOID)NextModuleBase; - AnsiSize = LocalModuleSize; - } - else if (!_stricmp(NameBuffer, "oem.nls")) - { - OemData = (PVOID)NextModuleBase; - OemSize = LocalModuleSize; - } - else if (!_stricmp(NameBuffer, "casemap.nls")) - { - UnicodeData = (PVOID)NextModuleBase; - UnicodeSize = LocalModuleSize; - } - else if (!(_stricmp(NameBuffer, "system")) || - !(_stricmp(NameBuffer, "system.hiv"))) - { - RegistryData = (PVOID)NextModuleBase; - RegistrySize = LocalModuleSize; - } - - /* Load the file image */ - FsReadFile(ModuleImage, LocalModuleSize, NULL, (PVOID)NextModuleBase); - - /* Move to next memory block and increase Module Count */ - NextModuleBase = ROUND_UP(ModuleData->ModEnd, PAGE_SIZE); - LoaderBlock.ModsCount++; - // DbgPrint("NextBase, ImageSize, ModStart, ModEnd %p %p %p %p\n", - // NextModuleBase, LocalModuleSize, ModuleData->ModStart, ModuleData->ModEnd); - - /* Return Module Size if required */ - if (ModuleSize != NULL) { - *ModuleSize = LocalModuleSize; - } - - return(ModuleData->ModStart); -} - -ULONG_PTR -NTAPI -FrLdrCreateModule(LPCSTR ModuleName) -{ - PLOADER_MODULE ModuleData; - LPSTR NameBuffer; - - /* Get current module data structure and module name string array */ - ModuleData = &reactos_modules[LoaderBlock.ModsCount]; - NameBuffer = reactos_module_strings[LoaderBlock.ModsCount]; - - /* Set up the structure */ - ModuleData->ModStart = NextModuleBase; - ModuleData->ModEnd = -1; - - /* Copy the name */ - strcpy(NameBuffer, ModuleName); - ModuleData->String = (ULONG_PTR)NameBuffer; - - /* Set the current Module */ - CurrentModule = ModuleData; - - /* Return Module Base Address */ - return(ModuleData->ModStart); -} - -BOOLEAN -NTAPI -FrLdrCloseModule(ULONG_PTR ModuleBase, - ULONG ModuleSize) -{ - PLOADER_MODULE ModuleData = CurrentModule; - - /* Make sure a module is opened */ - if (ModuleData) { - - /* Make sure this is the right module and that it hasn't been closed */ - if ((ModuleBase == ModuleData->ModStart) && (ModuleData->ModEnd == MAXULONG_PTR)) { - - /* Close the Module */ - ModuleData->ModEnd = ModuleData->ModStart + ModuleSize; - - /* Set the next Module Base and increase the number of modules */ - NextModuleBase = ROUND_UP(ModuleData->ModEnd, PAGE_SIZE); - LoaderBlock.ModsCount++; - - /* Close the currently opened module */ - CurrentModule = NULL; - - /* Success */ - return(TRUE); - } - } - - /* Failure path */ - return(FALSE); -} - -/* PE IMAGE LOADER ***********************************************************/ - -PVOID -NTAPI -LdrPEFixupForward(IN PCHAR ForwardName) -{ - CHAR NameBuffer[128]; - PCHAR p; - PLOADER_MODULE ModuleObject; - - strcpy(NameBuffer, ForwardName); - p = strchr(NameBuffer, '.'); - if (p == NULL) return NULL; - *p = 0; - - ModuleObject = LdrGetModuleObject(NameBuffer); - if (!ModuleObject) - { - DbgPrint("LdrPEFixupForward: failed to find module %s\n", NameBuffer); - return NULL; - } - - return LdrPEGetExportByName((PVOID)ModuleObject->ModStart, (PUCHAR)(p + 1), 0xffff); -} - -PVOID -NTAPI -LdrPEGetExportByName(PVOID BaseAddress, - PUCHAR SymbolName, - USHORT Hint) -{ - PIMAGE_EXPORT_DIRECTORY ExportDir; - ULONG * ExFunctions; - ULONG * ExNames; - USHORT * ExOrdinals; - PVOID ExName; - ULONG Ordinal; - PVOID Function; - LONG minn, maxn, mid, res; - ULONG ExportDirSize; - - /* HAL and NTOS use a virtual address, switch it to physical mode */ - if ((ULONG_PTR)BaseAddress & KSEG0_BASE) - { - BaseAddress = RVA(BaseAddress, -KSEG0_BASE); - } - - ExportDir = (PIMAGE_EXPORT_DIRECTORY) - RtlImageDirectoryEntryToData(BaseAddress, - TRUE, - IMAGE_DIRECTORY_ENTRY_EXPORT, - &ExportDirSize); - if (!ExportDir) - { - DbgPrint("LdrPEGetExportByName(): no export directory!\n"); - return NULL; - } - - /* The symbol names may be missing entirely */ - if (!ExportDir->AddressOfNames) - { - DbgPrint("LdrPEGetExportByName(): symbol names missing entirely\n"); - return NULL; - } - - /* - * Get header pointers - */ - ExNames = (ULONG *)RVA(BaseAddress, ExportDir->AddressOfNames); - ExOrdinals = (USHORT *)RVA(BaseAddress, ExportDir->AddressOfNameOrdinals); - ExFunctions = (ULONG *)RVA(BaseAddress, ExportDir->AddressOfFunctions); - - /* - * Check the hint first - */ - if (Hint < ExportDir->NumberOfNames) - { - ExName = RVA(BaseAddress, ExNames[Hint]); - if (strcmp(ExName, (PCHAR)SymbolName) == 0) - { - Ordinal = ExOrdinals[Hint]; - Function = RVA(BaseAddress, ExFunctions[Ordinal]); - if ((ULONG_PTR)Function >= (ULONG_PTR)ExportDir && - (ULONG_PTR)Function < (ULONG_PTR)ExportDir + ExportDirSize) - { - Function = LdrPEFixupForward((PCHAR)Function); - if (Function == NULL) - { - DbgPrint("LdrPEGetExportByName(): failed to find %s\n", Function); - } - return Function; - } - - if (Function != NULL) return Function; - } - } - - /* - * Binary search - */ - minn = 0; - maxn = ExportDir->NumberOfNames - 1; - while (minn <= maxn) - { - mid = (minn + maxn) / 2; - - ExName = RVA(BaseAddress, ExNames[mid]); - res = strcmp(ExName, (PCHAR)SymbolName); - if (res == 0) - { - Ordinal = ExOrdinals[mid]; - Function = RVA(BaseAddress, ExFunctions[Ordinal]); - if ((ULONG_PTR)Function >= (ULONG_PTR)ExportDir && - (ULONG_PTR)Function < (ULONG_PTR)ExportDir + ExportDirSize) - { - Function = LdrPEFixupForward((PCHAR)Function); - if (Function == NULL) - { - DbgPrint("1: failed to find %s\n", Function); - } - return Function; - } - if (Function != NULL) - { - return Function; - } - } - else if (res > 0) - { - maxn = mid - 1; - } - else - { - minn = mid + 1; - } - } - - ExName = RVA(BaseAddress, ExNames[mid]); - DbgPrint("2: failed to find %s\n",SymbolName); - return (PVOID)NULL; -} - -NTSTATUS -NTAPI -LdrPEProcessImportDirectoryEntry(PVOID DriverBase, - PLOADER_MODULE LoaderModule, - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory) -{ - PVOID* ImportAddressList; - PULONG_PTR FunctionNameList; - - if (ImportModuleDirectory == NULL || ImportModuleDirectory->Name == 0) - { - return STATUS_UNSUCCESSFUL; - } - - /* Get the import address list. */ - ImportAddressList = (PVOID*)RVA(DriverBase, ImportModuleDirectory->FirstThunk); - - /* Get the list of functions to import. */ - if (ImportModuleDirectory->OriginalFirstThunk != 0) - { - FunctionNameList = (PULONG_PTR)RVA(DriverBase, ImportModuleDirectory->OriginalFirstThunk); - } - else - { - FunctionNameList = (PULONG_PTR)RVA(DriverBase, ImportModuleDirectory->FirstThunk); - } - - /* Walk through function list and fixup addresses. */ - while (*FunctionNameList != 0L) - { - if ((*FunctionNameList) & 0x80000000) - { - DbgPrint("Failed to import ordinal from %s\n", LoaderModule->String); - return STATUS_UNSUCCESSFUL; - } - else - { - IMAGE_IMPORT_BY_NAME *pe_name; - pe_name = RVA(DriverBase, *FunctionNameList); - *ImportAddressList = LdrPEGetExportByName((PVOID)LoaderModule->ModStart, pe_name->Name, pe_name->Hint); - - /* Fixup the address to be virtual */ - *ImportAddressList = RVA(*ImportAddressList, KSEG0_BASE); - - //DbgPrint("Looked for: %s and found: %p\n", pe_name->Name, *ImportAddressList); - if ((*ImportAddressList) == NULL) - { - DbgPrint("Failed to import %s from %s\n", pe_name->Name, LoaderModule->String); - return STATUS_UNSUCCESSFUL; - } - } - ImportAddressList++; - FunctionNameList++; - } - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -LdrPEFixupImports(IN PVOID DllBase, - IN PCHAR DllName) -{ - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; - PCHAR ImportedName; - NTSTATUS Status; - PLOADER_MODULE ImportedModule; - ULONG Size; - - /* Process each import module */ - ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_IMPORT, - &Size); - while (ImportModuleDirectory && ImportModuleDirectory->Name) - { - /* Check to make sure that import lib is kernel */ - ImportedName = (PCHAR) DllBase + ImportModuleDirectory->Name; - //DbgPrint("Processing imports for file: %s into file: %s\n", DllName, ImportedName); - - Status = LdrPEGetOrLoadModule(DllName, ImportedName, &ImportedModule); - if (!NT_SUCCESS(Status)) return Status; - - Status = LdrPEProcessImportDirectoryEntry(DllBase, ImportedModule, ImportModuleDirectory); - if (!NT_SUCCESS(Status)) return Status; - - //DbgPrint("Imports for file: %s into file: %s complete\n", DllName, ImportedName); - ImportModuleDirectory++; - } - - return STATUS_SUCCESS; -} - -PVOID -NTAPI -FrLdrReadAndMapImage(IN PFILE Image, - IN PCHAR Name, - IN ULONG ImageType) -{ - PVOID ImageBase, LoadBase, ReadBuffer; - ULONG ImageId = LoaderBlock.ModsCount; - ULONG i, Size, ImageSize, SizeOfHeaders; - PIMAGE_NT_HEADERS NtHeader; - PIMAGE_SECTION_HEADER Section; - NTSTATUS Status = STATUS_SUCCESS; - PLOADER_MODULE pModule; - - /* Try to see, maybe it's loaded already */ - if ((pModule = LdrGetModuleObject(Name)) != NULL) - { - /* It's loaded, return LoadBase */ - ImageBase = (PVOID)pModule->ModStart; - LoadBase = RVA(ImageBase, -KSEG0_BASE); - return LoadBase; - } - - /* Set the virtual (image) and physical (load) addresses */ - LoadBase = (PVOID)NextModuleBase; - ImageBase = RVA(LoadBase, KSEG0_BASE); - - /* Allocate a temporary buffer for the read */ - ReadBuffer = MmHeapAlloc(MM_PAGE_SIZE); - if (!ReadBuffer) - { - /* Fail */ - DbgPrint("Failed to allocate a temporary buffer for the read\n"); - return NULL; - } - - /* Set the file pointer to zero */ - FsSetFilePointer(Image, 0); - - /* Load first page of the file image */ - if (!FsReadFile(Image, MM_PAGE_SIZE, NULL, ReadBuffer)) - { - /* Fail */ - DbgPrint("Failed to read image: %s\n", Name); - return NULL; - } - - /* Get image headers */ - NtHeader = RtlImageNtHeader(ReadBuffer); - if (!NtHeader) - { - DbgPrint("Failed to read image (bad PE signature) %s\n", Name); - return NULL; - } - - /* Allocate memory for the driver */ - ImageSize = NtHeader->OptionalHeader.SizeOfImage; - LoadBase = MmAllocateMemoryAtAddress(ImageSize, LoadBase, LoaderSystemCode); - ASSERT(LoadBase); - - /* Copy headers over */ - SizeOfHeaders = NtHeader->OptionalHeader.SizeOfHeaders; - if (SizeOfHeaders < MM_PAGE_SIZE) - { - RtlMoveMemory(LoadBase, ReadBuffer, SizeOfHeaders); - } - else - { - RtlMoveMemory(LoadBase, ReadBuffer, MM_PAGE_SIZE); - if (!FsReadFile(Image, SizeOfHeaders - MM_PAGE_SIZE, NULL, - (PVOID)((ULONG_PTR)LoadBase + MM_PAGE_SIZE))) - { - DbgPrint("Failed to read image: %s\n", Name); - return NULL; - } - } - - /* Free the temporary buffer */ - MmHeapFree(ReadBuffer); - - /* Get the first section */ - NtHeader = RtlImageNtHeader(LoadBase); - Section = IMAGE_FIRST_SECTION(NtHeader); - - /* Read image sections into virtual section */ - for (i = 0; i < NtHeader->FileHeader.NumberOfSections; i++) - { - /* Get the size of this section and check if it's valid */ - Size = Section[i].VirtualAddress + Section[i].Misc.VirtualSize; - if (Size <= ImageSize) - { - if (Section[i].SizeOfRawData) - { - /* Copy the data from the disk to the image */ - FsSetFilePointer(Image, Section[i].PointerToRawData); - if (!FsReadFile(Image, - Section[i].Misc.VirtualSize > - Section[i].SizeOfRawData ? - Section[i].SizeOfRawData : - Section[i].Misc.VirtualSize, - NULL, - (PVOID)((ULONG_PTR)LoadBase + - Section[i].VirtualAddress))) - { - DbgPrint("Failed to read image: %s\n", Name); - return NULL; - } - } - else - { - /* Clear the BSS area */ - RtlZeroMemory((PVOID)((ULONG_PTR)LoadBase + - Section[i].VirtualAddress), - Section[i].Misc.VirtualSize); - } - } - else - { - DbgPrint("Section %s in %s doesn't fit: VA: %lx, Size: %lx\n", - Section[i].Name, Name, Section[i].VirtualAddress, - Section[i].Misc.VirtualSize); - } - } - - /* Calculate Difference between Real Base and Compiled Base*/ - Status = LdrRelocateImageWithBias(LoadBase, - (ULONG_PTR)ImageBase - - (ULONG_PTR)LoadBase, - "FreeLdr", - STATUS_SUCCESS, -#ifdef _M_AMD64 - STATUS_SUCCESS, // allow stripped files -#else - STATUS_UNSUCCESSFUL, -#endif - STATUS_UNSUCCESSFUL); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - DbgPrint("Failed to relocate image: %s\n", Name); - return NULL; - } - - /* Fill out Module Data Structure */ - reactos_modules[ImageId].ModStart = (ULONG_PTR)ImageBase; - reactos_modules[ImageId].ModEnd = (ULONG_PTR)ImageBase + ImageSize; - strcpy(reactos_module_strings[ImageId], Name); - reactos_modules[ImageId].String = (ULONG_PTR)reactos_module_strings[ImageId]; - LoaderBlock.ModsCount++; - - /* Detect kernel or HAL */ - if (!_stricmp(Name, "ntoskrnl.exe")) - { - KernelData = (PVOID)NextModuleBase; - KernelSize = ImageSize; - } - else if (!_stricmp(Name, "hal.dll")) - { - HalData = (PVOID)NextModuleBase; - HalSize = ImageSize; - } - else - { - DriverName[Drivers] = reactos_module_strings[ImageId]; - DriverData[Drivers] = (PVOID)NextModuleBase; - DriverSize[Drivers] = ImageSize; - Drivers++; - } - - /* Increase the next Load Base */ - NextModuleBase = ROUND_UP(NextModuleBase + ImageSize, PAGE_SIZE); - - /* Perform import fixups */ - if (!NT_SUCCESS(LdrPEFixupImports(LoadBase, Name))) - { - /* Fixup failed, just don't include it in the list */ - // NextModuleBase = OldNextModuleBase; - LoaderBlock.ModsCount = ImageId; - return NULL; - } - - /* Return the final mapped address */ - return LoadBase; -} - -ULONG -NTAPI -FrLdrReMapImage(IN PVOID Base, - IN PVOID LoadBase) -{ - PIMAGE_NT_HEADERS NtHeader; - PIMAGE_SECTION_HEADER Section; - ULONG i, Size, DriverSize = 0; - - /* Get the first section */ - NtHeader = RtlImageNtHeader(Base); - Section = IMAGE_FIRST_SECTION(NtHeader); - - /* Allocate memory for the driver */ - DriverSize = NtHeader->OptionalHeader.SizeOfImage; - LoadBase = MmAllocateMemoryAtAddress(DriverSize, LoadBase, LoaderSystemCode); - ASSERT(LoadBase); - - /* Copy headers over */ - RtlMoveMemory(LoadBase, Base, NtHeader->OptionalHeader.SizeOfHeaders); - - /* Copy image sections into virtual section */ - for (i = 0; i < NtHeader->FileHeader.NumberOfSections; i++) - { - /* Get the size of this section and check if it's valid */ - Size = Section[i].VirtualAddress + Section[i].Misc.VirtualSize; - if (Size <= DriverSize) - { - if (Section[i].SizeOfRawData) - { - /* Copy the data from the disk to the image */ - RtlCopyMemory((PVOID)((ULONG_PTR)LoadBase + - Section[i].VirtualAddress), - (PVOID)((ULONG_PTR)Base + - Section[i].PointerToRawData), - Section[i].Misc.VirtualSize > - Section[i].SizeOfRawData ? - Section[i].SizeOfRawData : - Section[i].Misc.VirtualSize); - } - else - { - /* Clear the BSS area */ - RtlZeroMemory((PVOID)((ULONG_PTR)LoadBase + - Section[i].VirtualAddress), - Section[i].Misc.VirtualSize); - } - } - } - - /* Return the size of the mapped driver */ - return DriverSize; -} - -PVOID -NTAPI -FrLdrMapImage(IN PFILE Image, - IN PCHAR Name, - IN ULONG ImageType) -{ - PVOID ImageBase, LoadBase, ReadBuffer; - ULONG ImageId = LoaderBlock.ModsCount; - ULONG ImageSize; - NTSTATUS Status = STATUS_SUCCESS; - - /* Try to see, maybe it's loaded already */ - if (LdrGetModuleObject(Name) != NULL) - { - /* It's loaded, return NULL. It would be wise to return - correct LoadBase, but it seems to be ignored almost everywhere */ - return NULL; - } - - /* Set the virtual (image) and physical (load) addresses */ - LoadBase = (PVOID)NextModuleBase; - ImageBase = RVA(LoadBase, KSEG0_BASE); - - /* Save the Image Size */ - ImageSize = FsGetFileSize(Image); - - /* Set the file pointer to zero */ - FsSetFilePointer(Image, 0); - - /* Allocate a temporary buffer for the read */ - ReadBuffer = MmHeapAlloc(ImageSize); - if (!ReadBuffer) - { - /* Fail */ - DbgPrint("Failed to allocate a temporary buffer for the read\n"); - return NULL; - } - - /* Load the file image */ - if (!FsReadFile(Image, ImageSize, NULL, ReadBuffer)) - { - /* Fail */ - DbgPrint("Failed to read image: %s\n", Name); - return NULL; - } - - /* Map it into virtual memory */ - ImageSize = FrLdrReMapImage(ReadBuffer, LoadBase); - - /* Free the temporary buffer */ - MmHeapFree(ReadBuffer); - - /* Calculate Difference between Real Base and Compiled Base*/ - Status = LdrRelocateImageWithBias(LoadBase, - (ULONG_PTR)ImageBase - - (ULONG_PTR)LoadBase, - "FreeLdr", - STATUS_SUCCESS, - STATUS_UNSUCCESSFUL, - STATUS_UNSUCCESSFUL); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - DbgPrint("Failed to relocate image: %s\n", Name); - return NULL; - } - - /* Fill out Module Data Structure */ - reactos_modules[ImageId].ModStart = (ULONG_PTR)ImageBase; - reactos_modules[ImageId].ModEnd = (ULONG_PTR)ImageBase + ImageSize; - strcpy(reactos_module_strings[ImageId], Name); - reactos_modules[ImageId].String = (ULONG_PTR)reactos_module_strings[ImageId]; - LoaderBlock.ModsCount++; - - /* Detect kernel or HAL */ - if (!_stricmp(Name, "ntoskrnl.exe")) - { - KernelData = (PVOID)NextModuleBase; - KernelSize = ImageSize; - } - else if (!_stricmp(Name, "hal.dll")) - { - HalData = (PVOID)NextModuleBase; - HalSize = ImageSize; - } - else - { - DriverName[Drivers] = reactos_module_strings[ImageId]; - DriverData[Drivers] = (PVOID)NextModuleBase; - DriverSize[Drivers] = ImageSize; - Drivers++; - } - - /* Increase the next Load Base */ - NextModuleBase = ROUND_UP(NextModuleBase + ImageSize, PAGE_SIZE); - - /* Perform import fixups */ - if (!NT_SUCCESS(LdrPEFixupImports(LoadBase, Name))) - { - /* Fixup failed, just don't include it in the list */ - // NextModuleBase = OldNextModuleBase; - LoaderBlock.ModsCount = ImageId; - return NULL; - } - - /* Return the final mapped address */ - return LoadBase; -} -#endif -/* EOF */ diff --git a/boot/freeldr/freeldr/reactos/reactos.c b/boot/freeldr/freeldr/reactos/reactos.c deleted file mode 100644 index 959dc22b05e..00000000000 --- a/boot/freeldr/freeldr/reactos/reactos.c +++ /dev/null @@ -1,908 +0,0 @@ -/* - * FreeLoader - * - * Copyright (C) 1998-2003 Brian Palmer - * Copyright (C) 2005 Alex Ionescu - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#ifndef _M_ARM - -#include -#include - -extern ULONG PageDirectoryStart; -extern ULONG PageDirectoryEnd; - -ROS_LOADER_PARAMETER_BLOCK LoaderBlock; -char reactos_kernel_cmdline[255]; // Command line passed to kernel -LOADER_MODULE reactos_modules[64]; // Array to hold boot module info loaded for the kernel -char reactos_module_strings[64][256]; // Array to hold module names -// Make this a single struct to guarantee that these elements are nearby in -// memory. -reactos_mem_data_t reactos_mem_data; -ARC_DISK_SIGNATURE reactos_arc_disk_info[32]; // ARC Disk Information -char reactos_arc_strings[32][256]; -unsigned long reactos_disk_count = 0; -char reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE] = {0}; - -CHAR szHalName[255]; -CHAR szBootPath[255]; -CHAR SystemRoot[255]; -static CHAR szLoadingMsg[] = "ReactOS is loading files..."; -BOOLEAN FrLdrBootType; -ULONG_PTR KernelBase; -ROS_KERNEL_ENTRY_POINT KernelEntryPoint; - -BOOLEAN -FrLdrLoadDriver(PCHAR szFileName, - INT nPos) -{ - PFILE FilePointer; - CHAR value[256], *FinalSlash; - LPSTR p; - - if (!_stricmp(szFileName, "hal.dll")) - { - /* Use the boot.ini name instead */ - szFileName = szHalName; - } - - FinalSlash = strrchr(szFileName, '\\'); - if(FinalSlash) - szFileName = FinalSlash + 1; - - /* Open the Driver */ - FilePointer = FsOpenFile(szFileName); - - /* Try under the system root in the main dir and drivers */ - if (!FilePointer) - { - strcpy(value, SystemRoot); - if(value[strlen(value)-1] != '\\') - strcat(value, "\\"); - strcat(value, szFileName); - FilePointer = FsOpenFile(value); - } - - if (!FilePointer) - { - strcpy(value, SystemRoot); - if(value[strlen(value)-1] != '\\') - strcat(value, "\\"); - strcat(value, "SYSTEM32\\"); - strcat(value, szFileName); - FilePointer = FsOpenFile(value); - } - - if (!FilePointer) - { - strcpy(value, SystemRoot); - if(value[strlen(value)-1] != '\\') - strcat(value, "\\"); - strcat(value, "SYSTEM32\\DRIVERS\\"); - strcat(value, szFileName); - FilePointer = FsOpenFile(value); - } - - /* Make sure we did */ - if (!FilePointer) { - - /* Fail if file wasn't opened */ - strcpy(value, szFileName); - strcat(value, " not found."); - return(FALSE); - } - - /* Update the status bar with the current file */ - strcpy(value, "Reading "); - p = strrchr(szFileName, '\\'); - if (p == NULL) { - - strcat(value, szFileName); - - } else { - - strcat(value, p + 1); - - } - UiDrawStatusText(value); - - /* Load the driver */ - FrLdrReadAndMapImage(FilePointer, szFileName, 0); - - /* Update status and return */ - UiDrawProgressBarCenter(nPos, 100, szLoadingMsg); - return(TRUE); -} - -PVOID -NTAPI -FrLdrLoadImage(IN PCHAR szFileName, - IN INT nPos, - IN ULONG ImageType) -{ - PFILE FilePointer; - PCHAR szShortName; - CHAR szBuffer[256], szFullPath[256]; - PVOID LoadBase; - - /* Extract filename without path */ - szShortName = strrchr(szFileName, '\\'); - if (!szShortName) - { - /* No path, leave it alone */ - szShortName = szFileName; - - /* Which means we need to build a path now */ - strcpy(szBuffer, szFileName); - strcpy(szFullPath, szBootPath); - if (!FrLdrBootType) - { - strcat(szFullPath, "SYSTEM32\\DRIVERS\\"); - } - else - { - strcat(szFullPath, "\\"); - } - strcat(szFullPath, szBuffer); - szFileName = szFullPath; - } - else - { - /* Skip the path */ - szShortName = szShortName + 1; - } - - /* Open the image */ - FilePointer = FsOpenFile(szFileName); - if (!FilePointer) - { - /* Return failure on the short name */ - strcpy(szBuffer, szShortName); - strcat(szBuffer, " not found."); - UiMessageBox(szBuffer); - return FALSE; - } - - /* Update the status bar with the current file */ - strcpy(szBuffer, "Reading "); - strcat(szBuffer, szShortName); - UiDrawStatusText(szBuffer); - - /* Do the actual loading */ - LoadBase = FrLdrReadAndMapImage(FilePointer, szShortName, ImageType); - - /* Update Processbar and return success */ - if (!FrLdrBootType) UiDrawProgressBarCenter(nPos, 100, szLoadingMsg); - return LoadBase; -} - -BOOLEAN -FrLdrLoadNlsFile(PCSTR szFileName, - PCSTR szModuleName) -{ - PFILE FilePointer; - CHAR value[256]; - LPSTR p; - - /* Open the Driver */ - FilePointer = FsOpenFile(szFileName); - - /* Make sure we did */ - if (!FilePointer) { - - /* Fail if file wasn't opened */ - strcpy(value, szFileName); - strcat(value, " not found."); - UiMessageBox(value); - return(FALSE); - } - - /* Update the status bar with the current file */ - strcpy(value, "Reading "); - p = strrchr(szFileName, '\\'); - if (p == NULL) { - - strcat(value, szFileName); - - } else { - - strcat(value, p + 1); - } - UiDrawStatusText(value); - - /* Load the driver */ - FrLdrLoadModule(FilePointer, szModuleName, NULL); - return(TRUE); -} - -static BOOLEAN -FrLdrLoadNlsFiles(PCHAR szSystemRoot, - PCHAR szErrorOut) -{ - LONG rc = ERROR_SUCCESS; - FRLDRHKEY hKey; - WCHAR szIdBuffer[80]; - WCHAR szNameBuffer[80]; - CHAR szFileName[256]; - ULONG BufferSize; - - /* open the codepage key */ - rc = RegOpenKey(NULL, - L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage", - &hKey); - if (rc != ERROR_SUCCESS) { - - strcpy(szErrorOut, "Couldn't open CodePage registry key"); - return(FALSE); - } - - /* get ANSI codepage */ - BufferSize = sizeof(szIdBuffer); - rc = RegQueryValue(hKey, L"ACP", NULL, (PUCHAR)szIdBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - - strcpy(szErrorOut, "Couldn't get ACP NLS setting"); - return(FALSE); - } - - BufferSize = sizeof(szNameBuffer); - rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - - //strcpy(szErrorOut, "ACP NLS Setting exists, but isn't readable"); - //return(FALSE); - - /* HACK */ - wcscpy(szNameBuffer, L"c_1252.nls"); - } - - /* load ANSI codepage table */ - sprintf(szFileName,"%ssystem32\\%S", szSystemRoot, szNameBuffer); - DPRINTM(DPRINT_REACTOS, "ANSI file: %s\n", szFileName); - if (!FrLdrLoadNlsFile(szFileName, "ansi.nls")) { - - strcpy(szErrorOut, "Couldn't load ansi.nls"); - return(FALSE); - } - - /* get OEM codepage */ - BufferSize = sizeof(szIdBuffer); - rc = RegQueryValue(hKey, L"OEMCP", NULL, (PUCHAR)szIdBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - - strcpy(szErrorOut, "Couldn't get OEMCP NLS setting"); - return(FALSE); - } - - BufferSize = sizeof(szNameBuffer); - rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - - //strcpy(szErrorOut, "OEMCP NLS setting exists, but isn't readable"); - //return(FALSE); - - /* HACK */ - wcscpy(szNameBuffer, L"c_437.nls"); - } - - /* load OEM codepage table */ - sprintf(szFileName, "%ssystem32\\%S", szSystemRoot, szNameBuffer); - DPRINTM(DPRINT_REACTOS, "Oem file: %s\n", szFileName); - if (!FrLdrLoadNlsFile(szFileName, "oem.nls")) { - - strcpy(szErrorOut, "Couldn't load oem.nls"); - return(FALSE); - } - - /* open the language key */ - rc = RegOpenKey(NULL, - L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\Language", - &hKey); - if (rc != ERROR_SUCCESS) { - - strcpy(szErrorOut, "Couldn't open Language registry key"); - return(FALSE); - } - - /* get the Unicode case table */ - BufferSize = sizeof(szIdBuffer); - rc = RegQueryValue(hKey, L"Default", NULL, (PUCHAR)szIdBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - - strcpy(szErrorOut, "Couldn't get Language Default setting"); - return(FALSE); - } - - BufferSize = sizeof(szNameBuffer); - rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - - sprintf(szErrorOut, "Language Default setting exists, but isn't readable (%S)", szIdBuffer); - return(FALSE); - } - - /* load Unicode case table */ - sprintf(szFileName, "%ssystem32\\%S", szSystemRoot, szNameBuffer); - DPRINTM(DPRINT_REACTOS, "Casemap file: %s\n", szFileName); - if (!FrLdrLoadNlsFile(szFileName, "casemap.nls")) { - - strcpy(szErrorOut, "casemap.nls"); - return(FALSE); - } - - return(TRUE); -} - -static VOID -FrLdrLoadBootDrivers(PCHAR szSystemRoot, - INT nPos) -{ - LONG rc = 0; - FRLDRHKEY hGroupKey, hOrderKey, hServiceKey, hDriverKey; - WCHAR GroupNameBuffer[512]; - WCHAR ServiceName[256]; - ULONG OrderList[128]; - ULONG BufferSize; - ULONG Index; - ULONG TagIndex; - LPWSTR GroupName; - - ULONG ValueSize; - ULONG ValueType; - ULONG StartValue; - ULONG TagValue; - WCHAR DriverGroup[256]; - ULONG DriverGroupSize; - - CHAR ImagePath[256]; - WCHAR TempImagePath[256]; - - /* get 'service group order' key */ - rc = RegOpenKey(NULL, - L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\ServiceGroupOrder", - &hGroupKey); - if (rc != ERROR_SUCCESS) { - - DPRINTM(DPRINT_REACTOS, "Failed to open the 'ServiceGroupOrder' key (rc %d)\n", (int)rc); - return; - } - - /* get 'group order list' key */ - rc = RegOpenKey(NULL, - L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\GroupOrderList", - &hOrderKey); - if (rc != ERROR_SUCCESS) { - - DPRINTM(DPRINT_REACTOS, "Failed to open the 'GroupOrderList' key (rc %d)\n", (int)rc); - return; - } - - /* enumerate drivers */ - rc = RegOpenKey(NULL, - L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services", - &hServiceKey); - if (rc != ERROR_SUCCESS) { - - DPRINTM(DPRINT_REACTOS, "Failed to open the 'Services' key (rc %d)\n", (int)rc); - return; - } - - /* Get the Name Group */ - BufferSize = sizeof(GroupNameBuffer); - rc = RegQueryValue(hGroupKey, L"List", NULL, (PUCHAR)GroupNameBuffer, &BufferSize); - DPRINTM(DPRINT_REACTOS, "RegQueryValue(): rc %d\n", (int)rc); - if (rc != ERROR_SUCCESS) return; - DPRINTM(DPRINT_REACTOS, "BufferSize: %d \n", (int)BufferSize); - DPRINTM(DPRINT_REACTOS, "GroupNameBuffer: '%S' \n", GroupNameBuffer); - - /* Loop through each group */ - GroupName = GroupNameBuffer; - while (*GroupName) { - DPRINTM(DPRINT_REACTOS, "Driver group: '%S'\n", GroupName); - - /* Query the Order */ - BufferSize = sizeof(OrderList); - rc = RegQueryValue(hOrderKey, GroupName, NULL, (PUCHAR)OrderList, &BufferSize); - if (rc != ERROR_SUCCESS) OrderList[0] = 0; - - /* enumerate all drivers */ - for (TagIndex = 1; TagIndex <= SWAPD(OrderList[0]); TagIndex++) { - - Index = 0; - - while (TRUE) { - - /* Get the Driver's Name */ - ValueSize = sizeof(ServiceName); - rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); - DPRINTM(DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc); - - /* Makre sure it's valid, and check if we're done */ - if (rc == ERROR_NO_MORE_ITEMS) break; - if (rc != ERROR_SUCCESS) return; - DPRINTM(DPRINT_REACTOS, "Service %d: '%S'\n", (int)Index, ServiceName); - - /* open driver Key */ - rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); - if (rc == ERROR_SUCCESS) - { - /* Read the Start Value */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); - if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; - DPRINTM(DPRINT_REACTOS, " Start: %x \n", (int)StartValue); - - /* Read the Tag */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); - if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; - DPRINTM(DPRINT_REACTOS, " Tag: %x \n", (int)TagValue); - - /* Read the driver's group */ - DriverGroupSize = sizeof(DriverGroup); - rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - DPRINTM(DPRINT_REACTOS, " Group: '%S' \n", DriverGroup); - - /* Make sure it should be started */ - if ((StartValue == 0) && - (TagValue == OrderList[TagIndex]) && - (_wcsicmp(DriverGroup, GroupName) == 0)) { - - /* Get the Driver's Location */ - ValueSize = sizeof(TempImagePath); - rc = RegQueryValue(hDriverKey, L"ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); - - /* Write the whole path if it suceeded, else prepare to fail */ - if (rc != ERROR_SUCCESS) { - DPRINTM(DPRINT_REACTOS, " ImagePath: not found\n"); - sprintf(ImagePath, "%s\\system32\\drivers\\%S.sys", szSystemRoot, ServiceName); - } else if (TempImagePath[0] != L'\\') { - sprintf(ImagePath, "%s%S", szSystemRoot, TempImagePath); - } else { - sprintf(ImagePath, "%S", TempImagePath); - DPRINTM(DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath); - } - - DPRINTM(DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath); - - /* Update the position if needed */ - if (nPos < 100) nPos += 5; - - FrLdrLoadImage(ImagePath, nPos, 2); - - } else { - - DPRINTM(DPRINT_REACTOS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current Tag %d, current group '%S')\n", - ServiceName, StartValue, TagValue, DriverGroup, OrderList[TagIndex], GroupName); - } - } - - Index++; - } - } - - Index = 0; - while (TRUE) { - - /* Get the Driver's Name */ - ValueSize = sizeof(ServiceName); - rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); - - DPRINTM(DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc); - if (rc == ERROR_NO_MORE_ITEMS) break; - if (rc != ERROR_SUCCESS) return; - DPRINTM(DPRINT_REACTOS, "Service %d: '%S'\n", (int)Index, ServiceName); - - /* open driver Key */ - rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); - if (rc == ERROR_SUCCESS) - { - /* Read the Start Value */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); - if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; - DPRINTM(DPRINT_REACTOS, " Start: %x \n", (int)StartValue); - - /* Read the Tag */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); - if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; - DPRINTM(DPRINT_REACTOS, " Tag: %x \n", (int)TagValue); - - /* Read the driver's group */ - DriverGroupSize = sizeof(DriverGroup); - rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - DPRINTM(DPRINT_REACTOS, " Group: '%S' \n", DriverGroup); - - for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) { - if (TagValue == OrderList[TagIndex]) break; - } - - if ((StartValue == 0) && - (TagIndex > OrderList[0]) && - (_wcsicmp(DriverGroup, GroupName) == 0)) { - - ValueSize = sizeof(TempImagePath); - rc = RegQueryValue(hDriverKey, L"ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); - if (rc != ERROR_SUCCESS) { - DPRINTM(DPRINT_REACTOS, " ImagePath: not found\n"); - sprintf(ImagePath, "%ssystem32\\drivers\\%S.sys", szSystemRoot, ServiceName); - } else if (TempImagePath[0] != L'\\') { - sprintf(ImagePath, "%s%S", szSystemRoot, TempImagePath); - } else { - sprintf(ImagePath, "%S", TempImagePath); - DPRINTM(DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath); - } - DPRINTM(DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath); - - if (nPos < 100) nPos += 5; - - FrLdrLoadImage(ImagePath, nPos, 2); - - } else { - - DPRINTM(DPRINT_REACTOS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current group '%S')\n", - ServiceName, StartValue, TagValue, DriverGroup, GroupName); - } - } - - Index++; - } - - /* Move to the next group name */ - GroupName = GroupName + wcslen(GroupName) + 1; - } -} - -VOID -LoadAndBootReactOS(PCSTR OperatingSystemName) -{ - PFILE FilePointer; - CHAR name[255]; - CHAR value[255]; - CHAR SystemPath[255]; - CHAR LivePath[255]; - CHAR szKernelName[255]; - CHAR szFileName[255]; - CHAR MsgBuffer[256]; - ULONG_PTR SectionId; - PIMAGE_NT_HEADERS NtHeader; - PVOID LoadBase; - ULONG_PTR Base; - ULONG Size; - - // - // Backdrop - // - UiDrawBackdrop(); - - // - // Open the operating system section - // specified in the .ini file - // - if (!IniOpenSection(OperatingSystemName, &SectionId)) - { - sprintf(MsgBuffer,"Operating System section '%s' not found in freeldr.ini", OperatingSystemName); - UiMessageBox(MsgBuffer); - return; - } - - // - // Read the command line - // - if (IniReadSettingByName(SectionId, "Options", value, sizeof(value))) - { - PCHAR File; - - // - // Append boot-time options - // - AppendBootTimeOptions(value); - - // - // Check if a ramdisk file was given - // - File = strstr(value, "/RDIMAGEPATH="); - if (File) - { - // - // Copy the file name and everything else after it - // - strcpy(szFileName, File + 13); - - // - // Null-terminate - // - *strstr(szFileName, " ") = ANSI_NULL; - - // - // Load the ramdisk - // - RamDiskLoadVirtualFile(szFileName); - } - } - - /* - * Setup multiboot information structure - */ - UiDrawProgressBarCenter(1, 100, szLoadingMsg); - UiDrawStatusText("Detecting Hardware..."); - LoaderBlock.CommandLine = reactos_kernel_cmdline; - LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart; - LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd; - LoaderBlock.ModsCount = 0; - LoaderBlock.ModsAddr = reactos_modules; - LoaderBlock.DrivesAddr = reactos_arc_disk_info; - LoaderBlock.RdAddr = (ULONG_PTR)gRamDiskBase; - LoaderBlock.RdLength = gRamDiskSize; - LoaderBlock.MmapLength = (SIZE_T)MachVtbl.GetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t); - if (LoaderBlock.MmapLength) - { - ULONG i; - LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO; - LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map; - reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24 - for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++) - { -#ifdef _M_PPC - ULONG tmp; - /* Also swap from long long to high/low - * We also have unusable memory that will be available to kernel - * land. Mark it here. - */ - if (BiosMemoryAcpiReclaim == reactos_memory_map[i].type) - { - reactos_memory_map[i].type = BiosMemoryUsable; - } - - tmp = reactos_memory_map[i].base_addr_low; - reactos_memory_map[i].base_addr_low = reactos_memory_map[i].base_addr_high; - reactos_memory_map[i].base_addr_high = tmp; - tmp = reactos_memory_map[i].length_low; - reactos_memory_map[i].length_low = reactos_memory_map[i].length_high; - reactos_memory_map[i].length_high = tmp; -#endif - - if (BiosMemoryUsable == reactos_memory_map[i].type && - 0 == reactos_memory_map[i].base_addr_low) - { - LoaderBlock.MemLower = (reactos_memory_map[i].base_addr_low + reactos_memory_map[i].length_low) / 1024; - if (640 < LoaderBlock.MemLower) - { - LoaderBlock.MemLower = 640; - } - } - if (BiosMemoryUsable == reactos_memory_map[i].type && - reactos_memory_map[i].base_addr_low <= 1024 * 1024 && - 1024 * 1024 <= reactos_memory_map[i].base_addr_low + reactos_memory_map[i].length_low) - { - LoaderBlock.MemHigher = (reactos_memory_map[i].base_addr_low + reactos_memory_map[i].length_low) / 1024 - 1024; - } - } - } - - /* - * Initialize the registry - */ - RegInitializeRegistry(); - - /* - * Make sure the system path is set in the .ini file - */ - if (!IniReadSettingByName(SectionId, "SystemPath", SystemPath, sizeof(SystemPath))) - { - UiMessageBox("System path not specified for selected operating system."); - return; - } - - /* - * Special case for Live CD. - */ - if (!_strnicmp(SystemPath, "LiveCD", strlen("LiveCD"))) - { - /* Use everything following the "LiveCD" string as the path */ - strcpy(LivePath, SystemPath + strlen("LiveCD")); - /* Normalize */ - MachDiskGetBootPath(SystemPath, sizeof(SystemPath)); - strcat(SystemPath, LivePath); - strcat(strcpy(reactos_kernel_cmdline, SystemPath), - " /MININT"); - } - else - { - /* copy system path into kernel command line */ - strcpy(reactos_kernel_cmdline, SystemPath); - } - - /* - * Read the optional kernel parameters (if any) - */ - if (IniReadSettingByName(SectionId, "Options", value, sizeof(value))) - { - strcat(reactos_kernel_cmdline, " "); - strcat(reactos_kernel_cmdline, value); - } - - /* - * Detect hardware - */ - LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect(); - UiDrawProgressBarCenter(5, 100, szLoadingMsg); - - LoaderBlock.DrivesCount = reactos_disk_count; - - UiDrawStatusText("Loading..."); - - /* Get boot path */ - if (strchr(SystemPath, '\\') != NULL) - strcpy(szBootPath, strchr(SystemPath, '\\')); - else - szBootPath[0] = '\0'; - - /* append a backslash */ - if ((strlen(szBootPath)==0) || - szBootPath[strlen(szBootPath)] != '\\') - strcat(szBootPath, "\\"); - - DPRINTM(DPRINT_REACTOS,"SystemRoot: '%s'\n", szBootPath); - strcpy(SystemRoot, szBootPath); - - /* - * Find the kernel image name - * and try to load the kernel off the disk - */ - if(IniReadSettingByName(SectionId, "Kernel", value, sizeof(value))) - { - /* - * Set the name and - */ - if (value[0] == '\\') - { - strcpy(szKernelName, value); - } - else - { - strcpy(szKernelName, szBootPath); - strcat(szKernelName, "SYSTEM32\\"); - strcat(szKernelName, value); - } - } - else - { - strcpy(value, "NTOSKRNL.EXE"); - strcpy(szKernelName, szBootPath); - strcat(szKernelName, "SYSTEM32\\"); - strcat(szKernelName, value); - } - - /* - * Find the HAL image name - * and try to load the kernel off the disk - */ - if(IniReadSettingByName(SectionId, "Hal", value, sizeof(value))) - { - /* - * Set the name and - */ - if (value[0] == '\\') - { - strcpy(szHalName, value); - } - else - { - strcpy(szHalName, szBootPath); - strcat(szHalName, "SYSTEM32\\"); - strcat(szHalName, value); - } - } - else - { - strcpy(value, "HAL.DLL"); - strcpy(szHalName, szBootPath); - strcat(szHalName, "SYSTEM32\\"); - strcat(szHalName, value); - } - - /* Load the kernel */ - LoadBase = FrLdrLoadImage(szKernelName, 5, 1); - if (!LoadBase) return; - - /* Get the NT header, kernel base and kernel entry */ - NtHeader = RtlImageNtHeader(LoadBase); - KernelBase = SWAPD(NtHeader->OptionalHeader.ImageBase); - KernelEntryPoint = (ROS_KERNEL_ENTRY_POINT)(KernelBase + SWAPD(NtHeader->OptionalHeader.AddressOfEntryPoint)); - LoaderBlock.KernelBase = KernelBase; - - /* - * Load the System hive from disk - */ - strcpy(szFileName, szBootPath); - strcat(szFileName, "SYSTEM32\\CONFIG\\SYSTEM"); - - DPRINTM(DPRINT_REACTOS, "SystemHive: '%s'", szFileName); - - FilePointer = FsOpenFile(szFileName); - if (!FilePointer) - { - UiMessageBox("Could not find the System hive!"); - return; - } - - /* - * Update the status bar with the current file - */ - strcpy(name, "Reading "); - strcat(name, value); - while (strlen(name) < 80) - strcat(name, " "); - UiDrawStatusText(name); - - /* - * Load the System hive - */ - Base = FrLdrLoadModule(FilePointer, szFileName, &Size); - if (Base == 0 || Size == 0) - { - UiMessageBox("Could not load the System hive!\n"); - return; - } - DPRINTM(DPRINT_REACTOS, "SystemHive loaded at 0x%x size %u\n", (unsigned)Base, (unsigned)Size); - - /* - * Import the loaded system hive - */ - RegImportBinaryHive((PCHAR)Base, Size); - - /* - * Initialize the 'CurrentControlSet' link - */ - RegInitCurrentControlSet(FALSE); - - UiDrawProgressBarCenter(15, 100, szLoadingMsg); - - UiDrawProgressBarCenter(20, 100, szLoadingMsg); - - /* - * Load NLS files - */ - if (!FrLdrLoadNlsFiles(szBootPath, MsgBuffer)) - { - UiMessageBox(MsgBuffer); - return; - } - UiDrawProgressBarCenter(30, 100, szLoadingMsg); - - /* - * Load boot drivers - */ - FrLdrLoadBootDrivers(szBootPath, 40); - UiDrawProgressBarCenter(100, 100, szLoadingMsg); - //UiUnInitialize("Booting ReactOS..."); - - // - // Perform architecture-specific pre-boot configuration - // - MachPrepareForReactOS(FALSE); - - // - // Setup paging and jump to kernel - // - FrLdrStartup(0x2badb002); -} -#endif - -/* EOF */ diff --git a/boot/freeldr/freeldr/reactos/setupldr.c b/boot/freeldr/freeldr/reactos/setupldr.c deleted file mode 100644 index 2f7467dd057..00000000000 --- a/boot/freeldr/freeldr/reactos/setupldr.c +++ /dev/null @@ -1,315 +0,0 @@ -/* - * FreeLoader - * - * Copyright (C) 1998-2003 Brian Palmer - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#define _NTSYSTEM_ -#include -#include - -extern ULONG PageDirectoryStart; -extern ULONG PageDirectoryEnd; - -extern CHAR szBootPath[255]; -extern CHAR SystemRoot[255]; -extern CHAR szHalName[255]; - -extern char reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE]; -extern ULONG_PTR KernelBase; -extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint; - -extern BOOLEAN FrLdrLoadDriver(PCHAR szFileName, INT nPos); -extern BOOLEAN FrLdrLoadNlsFile(PCSTR szFileName, PCSTR szModuleName); - -#define USE_UI - -VOID LoadReactOSSetup(VOID) -{ - ULONG i; - LPCSTR SourcePath; - LPCSTR LoadOptions, DbgLoadOptions = ""; - BOOLEAN BootFromFloppy; - LPCSTR sourcePaths[] = { - "", /* Only for floppy boot */ -#if defined(_M_IX86) - "\\I386", -#elif defined(_M_MPPC) - "\\PPC", -#elif defined(_M_MRX000) - "\\MIPS", -#endif - "\\reactos", - NULL }; - CHAR FileName[256]; - - HINF InfHandle; - ULONG ErrorLine; - INFCONTEXT InfContext; - PIMAGE_NT_HEADERS NtHeader; - PVOID LoadBase; - extern BOOLEAN FrLdrBootType; - - /* Setup multiboot information structure */ - LoaderBlock.CommandLine = reactos_kernel_cmdline; - LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart; - LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd; - LoaderBlock.ModsCount = 0; - LoaderBlock.ModsAddr = reactos_modules; - LoaderBlock.MmapLength = (unsigned long)MachVtbl.GetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t); - if (LoaderBlock.MmapLength) - { -#if defined (_M_IX86) || defined (_M_AMD64) - ULONG i; -#endif - LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO; - LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map; - reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24 -#if defined (_M_IX86) || defined (_M_AMD64) - for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++) - { - if (BiosMemoryUsable == reactos_memory_map[i].type && - 0 == reactos_memory_map[i].base_addr_low) - { - LoaderBlock.MemLower = (reactos_memory_map[i].base_addr_low + reactos_memory_map[i].length_low) / 1024; - if (640 < LoaderBlock.MemLower) - { - LoaderBlock.MemLower = 640; - } - } - if (BiosMemoryUsable == reactos_memory_map[i].type && - reactos_memory_map[i].base_addr_low <= 1024 * 1024 && - 1024 * 1024 <= reactos_memory_map[i].base_addr_low + reactos_memory_map[i].length_low) - { - LoaderBlock.MemHigher = (reactos_memory_map[i].base_addr_low + reactos_memory_map[i].length_low) / 1024 - 1024; - } - } -#endif - } - -#ifdef USE_UI - SetupUiInitialize(); -#endif - UiDrawStatusText(""); - - FrLdrBootType = TRUE; - - /* Detect hardware */ - UiDrawStatusText("Detecting hardware..."); - LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect(); - UiDrawStatusText(""); - - /* Check if we booted from floppy */ - MachDiskGetBootPath(reactos_kernel_cmdline, sizeof(reactos_kernel_cmdline)); - BootFromFloppy = strstr(reactos_kernel_cmdline, "fdisk") != NULL; - - UiDrawStatusText("Loading txtsetup.sif..."); - /* Open 'txtsetup.sif' */ - for (i = BootFromFloppy ? 0 : 1; ; i++) - { - SourcePath = sourcePaths[i]; - if (!SourcePath) - { - printf("Failed to open 'txtsetup.sif'\n"); - return; - } - sprintf(FileName,"%s\\txtsetup.sif", SourcePath); - if (InfOpenFile (&InfHandle, FileName, &ErrorLine)) - break; - } - if (!*SourcePath) - SourcePath = "\\"; - -#if DBG - /* Get load options */ - if (InfFindFirstLine (InfHandle, - "SetupData", - "DbgOsLoadOptions", - &InfContext)) - { - if (!InfGetDataField (&InfContext, 1, &DbgLoadOptions)) - DbgLoadOptions = ""; - } -#endif - if (!strlen(DbgLoadOptions) && !InfFindFirstLine (InfHandle, - "SetupData", - "OsLoadOptions", - &InfContext)) - { - printf("Failed to find 'SetupData/OsLoadOptions'\n"); - return; - } - - if (!InfGetDataField (&InfContext, - 1, - &LoadOptions)) - { - printf("Failed to get load options\n"); - return; - } - - /* Set kernel command line */ - MachDiskGetBootPath(reactos_kernel_cmdline, sizeof(reactos_kernel_cmdline)); - strcat(strcat(strcat(strcat(reactos_kernel_cmdline, SourcePath), " "), - LoadOptions), DbgLoadOptions); - - /* Setup the boot path and kernel path */ - strcpy(szBootPath, SourcePath); - - sprintf(SystemRoot,"%s\\", SourcePath); - sprintf(FileName,"%s\\ntoskrnl.exe", SourcePath); - sprintf(szHalName,"%s\\hal.dll", SourcePath); - - /* Load the kernel */ - LoadBase = FrLdrLoadImage(FileName, 5, 1); - if (!LoadBase) - { - DPRINT1("Loading the kernel failed!\n"); - return; - } - - /* Get the NT header, kernel base and kernel entry */ - NtHeader = RtlImageNtHeader(LoadBase); - KernelBase = SWAPD(NtHeader->OptionalHeader.ImageBase); - KernelEntryPoint = (ROS_KERNEL_ENTRY_POINT)(KernelBase + SWAPD(NtHeader->OptionalHeader.AddressOfEntryPoint)); - LoaderBlock.KernelBase = KernelBase; - - /* Insert boot disk 2 */ - if (BootFromFloppy) - { - UiMessageBox("Please insert \"ReactOS Boot Disk 2\" and press ENTER"); - - /* FIXME: check volume label or disk marker file */ - } - - - /* Get ANSI codepage file */ - if (!InfFindFirstLine (InfHandle, - "NLS", - "AnsiCodepage", - &InfContext)) - { - printf("Failed to find 'NLS/AnsiCodepage'\n"); - return; - } - - if (!InfGetDataField (&InfContext, - 1, - &LoadOptions)) - { - printf("Failed to get load options\n"); - return; - } - - sprintf(FileName,"%s\\%s", SourcePath,LoadOptions); - /* Load ANSI codepage file */ - if (!FrLdrLoadNlsFile(FileName, "ansi.nls")) - { - UiMessageBox("Failed to load the ANSI codepage file."); - return; - } - - /* Get OEM codepage file */ - if (!InfFindFirstLine (InfHandle, - "NLS", - "OemCodepage", - &InfContext)) - { - printf("Failed to find 'NLS/AnsiCodepage'\n"); - return; - } - - if (!InfGetDataField (&InfContext, - 1, - &LoadOptions)) - { - printf("Failed to get load options\n"); - return; - } - - sprintf(FileName,"%s\\%s", SourcePath,LoadOptions); - /* Load OEM codepage file */ - if (!FrLdrLoadNlsFile(FileName, "oem.nls")) - { - UiMessageBox("Failed to load the OEM codepage file."); - return; - } - - /* Get Unicode Casemap file */ - if (!InfFindFirstLine (InfHandle, - "NLS", - "UnicodeCasetable", - &InfContext)) - { - printf("Failed to find 'NLS/AnsiCodepage'\n"); - return; - } - - if (!InfGetDataField (&InfContext, - 1, - &LoadOptions)) - { - printf("Failed to get load options\n"); - return; - } - - sprintf(FileName,"%s\\%s", SourcePath,LoadOptions); - /* Load Unicode casemap file */ - if (!FrLdrLoadNlsFile(FileName, "casemap.nls")) - { - UiMessageBox("Failed to load the Unicode casemap file."); - return; - } - - /* Load additional files specified in txtsetup.inf */ - if (InfFindFirstLine(InfHandle, - "SourceDisksFiles", - NULL, - &InfContext)) - { - do - { - LPCSTR Media, DriverName; - if (InfGetDataField(&InfContext, 7, &Media) && - InfGetDataField(&InfContext, 0, &DriverName)) - { - if (strcmp(Media, "x") == 0) - { - if (!FrLdrLoadDriver((PCHAR)DriverName,0)) - { - DPRINTM(DPRINT_WARNING, "could not load %s, %s\n", SourcePath, DriverName); - return; - } - } - } - } while (InfFindNextLine(&InfContext, &InfContext)); - } - - UiUnInitialize("Booting ReactOS..."); - - // - // Perform architecture-specific pre-boot configuration - // - MachPrepareForReactOS(TRUE); - - // - // Setup paging and jump to kernel - // - FrLdrStartup(0x2badb002); -} - -/* EOF */ diff --git a/boot/freeldr/freeldr/ui/minitui.c b/boot/freeldr/freeldr/ui/minitui.c index adaa68c777d..d38f7a5d5dd 100644 --- a/boot/freeldr/freeldr/ui/minitui.c +++ b/boot/freeldr/freeldr/ui/minitui.c @@ -52,7 +52,7 @@ VOID MiniTuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressTex VOID MiniTuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText) { ULONG i; - ULONG ProgressBarWidth = (Right - Left) - 3; + ULONG ProgressBarWidth = (Right - Left) - 4; // First make sure the progress bar text fits UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4); diff --git a/boot/freeldr/freeldr/ui/ui.c b/boot/freeldr/freeldr/ui/ui.c index 9a6a237f27e..07acd3a2d99 100644 --- a/boot/freeldr/freeldr/ui/ui.c +++ b/boot/freeldr/freeldr/ui/ui.c @@ -225,14 +225,13 @@ BOOLEAN UiInitialize(BOOLEAN ShowGui) BOOLEAN SetupUiInitialize(VOID) { - VIDEODISPLAYMODE UiDisplayMode; CHAR DisplayModeText[260]; ULONG Depth, Length; DisplayModeText[0] = '\0'; - UiDisplayMode = MachVideoSetDisplayMode(DisplayModeText, TRUE); + MachVideoSetDisplayMode(DisplayModeText, TRUE); MachVideoGetDisplaySize(&UiScreenWidth, &UiScreenHeight, &Depth); UiVtbl = TuiVtbl; diff --git a/boot/freeldr/freeldr/video/fade.c b/boot/freeldr/freeldr/video/fade.c index 4cfd4352d46..49ad2afe2bb 100644 --- a/boot/freeldr/freeldr/video/fade.c +++ b/boot/freeldr/freeldr/video/fade.c @@ -24,7 +24,7 @@ VOID VideoSetAllColorsToBlack(ULONG ColorCount) { - ULONG Color; + UCHAR Color; MachVideoSync(); @@ -37,7 +37,7 @@ VOID VideoSetAllColorsToBlack(ULONG ColorCount) VOID VideoFadeIn(PPALETTE_ENTRY Palette, ULONG ColorCount) { ULONG Index; - ULONG Color; + UCHAR Color; PPALETTE_ENTRY PaletteColors; PaletteColors = MmHeapAlloc(sizeof(PALETTE_ENTRY) * ColorCount); @@ -97,7 +97,7 @@ VOID VideoFadeIn(PPALETTE_ENTRY Palette, ULONG ColorCount) VOID VideoFadeOut(ULONG ColorCount) { ULONG Index; - ULONG Color; + UCHAR Color; UCHAR Red; UCHAR Green; UCHAR Blue; diff --git a/boot/freeldr/freeldr/video/palette.c b/boot/freeldr/freeldr/video/palette.c index c631648381a..805b73672fc 100644 --- a/boot/freeldr/freeldr/video/palette.c +++ b/boot/freeldr/freeldr/video/palette.c @@ -24,7 +24,7 @@ VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, ULONG ColorCount) for (Color=0; Color= 0x80000) { @@ -277,7 +277,7 @@ WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss) GDTIDT GdtDesc, IdtDesc, OldIdt; PKGDTENTRY pGdt; PKIDTENTRY pIdt; - ULONG Ldt = 0; + USHORT Ldt = 0; //ULONG i; DPRINTM(DPRINT_WINDOWS, "GDtIdt %p, Pcr %p, Tss 0x%08X\n", @@ -487,13 +487,13 @@ WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss) "1:\n"); #elif defined(_MSC_VER) /* We can't express the above in MASM so we use this far return instead */ - DbgPrint("WinLdrSetProcessorContext: Performing untested far-return\n"); - __asm { + __asm + { push 8 push offset resume retf resume: - }; + }; #else #error #endif diff --git a/boot/freeldr/freeldr/windows/peloader.c b/boot/freeldr/freeldr/windows/peloader.c index 7a87e282545..a1d015046b8 100644 --- a/boot/freeldr/freeldr/windows/peloader.c +++ b/boot/freeldr/freeldr/windows/peloader.c @@ -266,13 +266,6 @@ WinLdrLoadImage(IN PCHAR FileName, LARGE_INTEGER Position; ULONG i, BytesRead; - CHAR ProgressString[256]; - - /* Inform user we are loading files */ - sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1); - UiDrawBackdrop(); - UiDrawProgressBarCenter(1, 100, ProgressString); - /* Open the image file */ Status = ArcOpen(FileName, OpenReadOnly, &FileId); if (Status != ESUCCESS) diff --git a/boot/freeldr/freeldr/windows/setupldr2.c b/boot/freeldr/freeldr/windows/setupldr2.c index 58ee4d89d31..016e4d53abb 100644 --- a/boot/freeldr/freeldr/windows/setupldr2.c +++ b/boot/freeldr/freeldr/windows/setupldr2.c @@ -123,7 +123,7 @@ SetupLdrScanBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPC do { if (InfGetDataField(&InfContext, 7, &Media) && - InfGetDataField(&InfContext, 0, &DriverName) && + InfGetDataField(&InfContext, 0, &DriverName) && InfGetDataField(&InfContext, 13, &dirIndex)) { if ((strcmp(Media, "x") == 0) && @@ -137,7 +137,7 @@ SetupLdrScanBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPC swprintf(ImagePathW, L"%S", ImagePath); wcscat(ImagePathW, L"\\"); wcscat(ImagePathW, ServiceName); - + /* Remove .sys extension */ ServiceName[wcslen(ServiceName) - 4] = 0; @@ -310,16 +310,17 @@ VOID LoadReactOSSetup2(VOID) /* Load all referenced DLLs for kernel, HAL and kdcom.dll */ strcpy(SearchPath, BootPath); - WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KernelDTE); - WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, HalDTE); + strcat(SearchPath, "system32\\"); + Status = WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KernelDTE); + Status &= WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, HalDTE); if (KdComDTE) - WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE); - /* In system32 too */ - strcpy(SearchPath + strlen(BootPath), "system32\\"); - WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KernelDTE); - WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, HalDTE); - if (KdComDTE) - WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE); + Status &= WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE); + + if (!Status) + { + UiMessageBox("Error loading imported dll."); + return; + } /* Load NLS data, they are in system32 */ SetupLdrLoadNlsData(LoaderBlock, InfHandle, SearchPath); diff --git a/boot/freeldr/freeldr/windows/winldr.c b/boot/freeldr/freeldr/windows/winldr.c index a8c91fea1e9..970b8a0b3d4 100644 --- a/boot/freeldr/freeldr/windows/winldr.c +++ b/boot/freeldr/freeldr/windows/winldr.c @@ -284,14 +284,13 @@ WinLdrLoadDeviceDriver(PLOADER_PARAMETER_BLOCK LoaderBlock, } // It's not loaded, we have to load it - strcpy(FullPath, "\\ArcName\\"); - _snprintf(FullPath+strlen("\\ArcName\\"), sizeof(FullPath), "%s%wZ", BootPath, FilePath); - Status = WinLdrLoadImage(FullPath+strlen("\\ArcName\\"), LoaderBootDriver, &DriverBase); + _snprintf(FullPath, sizeof(FullPath), "%s%wZ", BootPath, FilePath); + Status = WinLdrLoadImage(FullPath, LoaderBootDriver, &DriverBase); if (!Status) return FALSE; // Allocate a DTE for it - Status = WinLdrAllocateDataTableEntry(LoaderBlock, DllName, FullPath, DriverBase, DriverDTE); + Status = WinLdrAllocateDataTableEntry(LoaderBlock, DllName, DllName, DriverBase, DriverDTE); if (!Status) { DPRINTM(DPRINT_WINDOWS, "WinLdrAllocateDataTableEntry() failed\n"); @@ -458,6 +457,8 @@ LoadAndBootWindows(PCSTR OperatingSystemName, PVOID GdtIdt; ULONG PcrBasePage=0; ULONG TssBasePage=0; + // Progress bar + CHAR ProgressString[256]; // Open the operating system section // specified in the .ini file @@ -465,7 +466,8 @@ LoadAndBootWindows(PCSTR OperatingSystemName, UiDrawBackdrop(); UiDrawStatusText("Detecting Hardware..."); - UiDrawProgressBarCenter(1, 100, "Loading NT..."); + sprintf(ProgressString, "Loading NT..."); + UiDrawProgressBarCenter(1, 100, ProgressString); /* Read the system path is set in the .ini file */ if (!HasSection || !IniReadSettingByName(SectionId, "SystemPath", FullPath, sizeof(FullPath))) @@ -525,7 +527,7 @@ LoadAndBootWindows(PCSTR OperatingSystemName, } /* Let user know we started loading */ - UiDrawStatusText("Loading..."); + //UiDrawStatusText("Loading..."); /* append a backslash */ strcpy(BootPath, FullPath); @@ -546,6 +548,10 @@ LoadAndBootWindows(PCSTR OperatingSystemName, UseRealHeap = TRUE; LoaderBlock->ConfigurationRoot = MachHwDetect(); + sprintf(ProgressString, "Loading system hive..."); + UiDrawBackdrop(); + UiDrawProgressBarCenter(15, 100, ProgressString); + /* Load Hive */ Status = WinLdrInitSystemHive(LoaderBlock, BootPath); DPRINTM(DPRINT_WINDOWS, "SYSTEM hive loaded with status %d\n", Status); @@ -553,33 +559,45 @@ LoadAndBootWindows(PCSTR OperatingSystemName, if (OperatingSystemVersion == 0) OperatingSystemVersion = WinLdrDetectVersion(); - strcpy(FileName, "\\ArcName\\"); - /* Load kernel */ - strcpy(FileName+strlen("\\ArcName\\"), BootPath); + strcpy(FileName, BootPath); strcat(FileName, "SYSTEM32\\NTOSKRNL.EXE"); - Status = WinLdrLoadImage(FileName+strlen("\\ArcName\\"), LoaderSystemCode, &NtosBase); + sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1); + UiDrawBackdrop(); + UiDrawProgressBarCenter(30, 100, ProgressString); + Status = WinLdrLoadImage(FileName, LoaderSystemCode, &NtosBase); DPRINTM(DPRINT_WINDOWS, "Ntos loaded with status %d at %p\n", Status, NtosBase); - WinLdrAllocateDataTableEntry(LoaderBlock, "ntoskrnl.exe", - FileName, NtosBase, &KernelDTE); /* Load HAL */ - strcpy(FileName+strlen("\\ArcName\\"), BootPath); + strcpy(FileName, BootPath); strcat(FileName, "SYSTEM32\\HAL.DLL"); - Status = WinLdrLoadImage(FileName+strlen("\\ArcName\\"), LoaderHalCode, &HalBase); + sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1); + UiDrawBackdrop(); + UiDrawProgressBarCenter(45, 100, ProgressString); + Status = WinLdrLoadImage(FileName, LoaderHalCode, &HalBase); DPRINTM(DPRINT_WINDOWS, "HAL loaded with status %d at %p\n", Status, HalBase); - WinLdrAllocateDataTableEntry(LoaderBlock, "hal.dll", - FileName, HalBase, &HalDTE); /* Load kernel-debugger support dll */ if (OperatingSystemVersion > _WIN32_WINNT_WIN2K) { - strcpy(FileName+strlen("\\ArcName\\"), BootPath); + strcpy(FileName, BootPath); strcat(FileName, "SYSTEM32\\KDCOM.DLL"); - Status = WinLdrLoadImage(FileName+strlen("\\ArcName\\"), LoaderBootDriver, &KdComBase); + sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1); + UiDrawBackdrop(); + UiDrawProgressBarCenter(60, 100, ProgressString); + Status = WinLdrLoadImage(FileName, LoaderBootDriver, &KdComBase); DPRINTM(DPRINT_WINDOWS, "KdCom loaded with status %d at %p\n", Status, KdComBase); + } + + /* Allocate data table entries for above-loaded modules */ + WinLdrAllocateDataTableEntry(LoaderBlock, "ntoskrnl.exe", + "WINDOWS\\SYSTEM32\\NTOSKRNL.EXE", NtosBase, &KernelDTE); + WinLdrAllocateDataTableEntry(LoaderBlock, "hal.dll", + "WINDOWS\\SYSTEM32\\HAL.DLL", HalBase, &HalDTE); + if (OperatingSystemVersion > _WIN32_WINNT_WIN2K) + { WinLdrAllocateDataTableEntry(LoaderBlock, "kdcom.dll", - FileName, KdComBase, &KdComDTE); + "WINDOWS\\SYSTEM32\\KDCOM.DLL", KdComBase, &KdComDTE); } /* Load all referenced DLLs for kernel, HAL and kdcom.dll */ @@ -590,11 +608,17 @@ LoadAndBootWindows(PCSTR OperatingSystemName, if (KdComDTE) WinLdrScanImportDescriptorTable(LoaderBlock, FileName, KdComDTE); + sprintf(ProgressString, "Loading NLS and OEM fonts..."); + UiDrawBackdrop(); + UiDrawProgressBarCenter(80, 100, ProgressString); /* Load NLS data, OEM font, and prepare boot drivers list */ Status = WinLdrScanSystemHive(LoaderBlock, BootPath); DPRINTM(DPRINT_WINDOWS, "SYSTEM hive scanned with status %d\n", Status); /* Load boot drivers */ + sprintf(ProgressString, "Loading boot drivers..."); + UiDrawBackdrop(); + UiDrawProgressBarCenter(100, 100, ProgressString); Status = WinLdrLoadBootDrivers(LoaderBlock, BootPath); DPRINTM(DPRINT_WINDOWS, "Boot drivers loaded with status %d\n", Status); diff --git a/boot/freeldr/freeldr/windows/wlmemory.c b/boot/freeldr/freeldr/windows/wlmemory.c index bfa68ab904e..bb9c6c73435 100644 --- a/boot/freeldr/freeldr/windows/wlmemory.c +++ b/boot/freeldr/freeldr/windows/wlmemory.c @@ -139,9 +139,10 @@ MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, BOOLEAN Status; // - // Check for some weird stuff at the top + // Check for memory block after 4GB - we don't support it yet + // Note: Even last page before 4GB limit is not supported // - if (BasePage + PageCount > 0xF0000) + if (BasePage >= MM_MAX_PAGE) { // // Just skip this, without even adding to MAD list @@ -149,6 +150,17 @@ MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, return; } + // + // Check if last page is after 4GB limit and shorten this block if needed + // + if (BasePage + PageCount > MM_MAX_PAGE) + { + // + // shorten this block + // + PageCount = MM_MAX_PAGE - BasePage; + } + // // Set Base page, page count and type // @@ -212,7 +224,7 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastPageIndex, LastPageType, MemoryMapStartPage; PPAGE_LOOKUP_TABLE_ITEM MemoryMap; ULONG NoEntries; - PKTSS Tss; + //PKTSS Tss; BOOLEAN Status; // @@ -255,7 +267,7 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, // Calculate parameters of the memory map MemoryMapStartPage = (ULONG_PTR)MemoryMap >> MM_PAGE_SHIFT; - MemoryMapSizeInPages = NoEntries * sizeof(PAGE_LOOKUP_TABLE_ITEM); + MemoryMapSizeInPages = (NoEntries * sizeof(PAGE_LOOKUP_TABLE_ITEM) + MM_PAGE_SIZE - 1) / MM_PAGE_SIZE; DPRINTM(DPRINT_WINDOWS, "Got memory map with %d entries\n", NoEntries); @@ -341,7 +353,7 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, /* Map stuff like PCR, KI_USER_SHARED_DATA and Apic */ WinLdrMapSpecialPages(PcrBasePage); - Tss = (PKTSS)(KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT)); + //Tss = (PKTSS)(KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT)); // Unmap what is not needed from kernel page table MempDisablePages(); diff --git a/boot/freeldr/freeldr/windows/wlregistry.c b/boot/freeldr/freeldr/windows/wlregistry.c index b6c1fc956b4..a6b9adb28af 100644 --- a/boot/freeldr/freeldr/windows/wlregistry.c +++ b/boot/freeldr/freeldr/windows/wlregistry.c @@ -711,7 +711,7 @@ WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead, { PBOOT_DRIVER_LIST_ENTRY BootDriverEntry; NTSTATUS Status; - ULONG PathLength; + USHORT PathLength; BootDriverEntry = MmHeapAlloc(sizeof(BOOT_DRIVER_LIST_ENTRY)); @@ -726,10 +726,10 @@ WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead, if (ImagePath && (wcslen(ImagePath) > 0)) { // Just copy ImagePath to the corresponding field in the structure - PathLength = wcslen(ImagePath) * sizeof(WCHAR); + PathLength = wcslen(ImagePath) * sizeof(WCHAR) + sizeof(UNICODE_NULL); BootDriverEntry->FilePath.Length = 0; - BootDriverEntry->FilePath.MaximumLength = PathLength + sizeof(WCHAR); + BootDriverEntry->FilePath.MaximumLength = PathLength; BootDriverEntry->FilePath.Buffer = MmHeapAlloc(PathLength); if (!BootDriverEntry->FilePath.Buffer) @@ -751,7 +751,7 @@ WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead, // we have to construct ImagePath ourselves PathLength = wcslen(ServiceName)*sizeof(WCHAR) + sizeof(L"system32\\drivers\\.sys"); BootDriverEntry->FilePath.Length = 0; - BootDriverEntry->FilePath.MaximumLength = PathLength+sizeof(WCHAR); + BootDriverEntry->FilePath.MaximumLength = PathLength; BootDriverEntry->FilePath.Buffer = MmHeapAlloc(PathLength); if (!BootDriverEntry->FilePath.Buffer) @@ -786,9 +786,9 @@ WinLdrAddDriverToList(LIST_ENTRY *BootDriverListHead, } // Add registry path - PathLength = (wcslen(RegistryPath)+wcslen(ServiceName))*sizeof(WCHAR); + PathLength = (wcslen(RegistryPath) + wcslen(ServiceName))*sizeof(WCHAR) + sizeof(UNICODE_NULL); BootDriverEntry->RegistryPath.Length = 0; - BootDriverEntry->RegistryPath.MaximumLength = PathLength;//+sizeof(WCHAR); + BootDriverEntry->RegistryPath.MaximumLength = PathLength; BootDriverEntry->RegistryPath.Buffer = MmHeapAlloc(PathLength); if (!BootDriverEntry->RegistryPath.Buffer) return FALSE; diff --git a/CMakeMacros.cmake b/cmake/CMakeMacros.cmake similarity index 61% rename from CMakeMacros.cmake rename to cmake/CMakeMacros.cmake index 85849dcf95b..ef64eebd6e1 100644 --- a/CMakeMacros.cmake +++ b/cmake/CMakeMacros.cmake @@ -1,36 +1,4 @@ -if (NOT MSVC) - -macro(CreateBootSectorTarget _target_name _asm_file _object_file) - get_filename_component(OBJECT_PATH ${_object_file} PATH) - get_filename_component(OBJECT_NAME ${_object_file} NAME) - file(MAKE_DIRECTORY ${OBJECT_PATH}) - get_directory_property(defines COMPILE_DEFINITIONS) - get_directory_property(includes INCLUDE_DIRECTORIES) - - foreach(arg ${defines}) - set(result_defs ${result_defs} -D${arg}) - endforeach() - - foreach(arg ${includes}) - set(result_incs -I${arg} ${result_incs}) - endforeach() - - add_custom_command( - OUTPUT ${_object_file} - COMMAND nasm -o ${_object_file} ${result_incs} ${result_defs} -f bin ${_asm_file} - DEPENDS ${_asm_file}) - set_source_files_properties(${_object_file} PROPERTIES GENERATED TRUE) - add_custom_target(${_target_name} ALL DEPENDS ${_object_file}) -endmacro() - -else() - -macro(CreateBootSectorTarget _target_name _asm_file _object_file) -endmacro() - -endif() - macro(set_cpp) include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport) set(IS_CPP 1) @@ -42,7 +10,7 @@ endmacro() macro(add_dependency_node _node) if(GENERATE_DEPENDENCY_GRAPH) get_target_property(_type ${_node} TYPE) - if(_type MATCHES SHARED_LIBRARY) + if(_type MATCHES SHARED_LIBRARY OR ${_node} MATCHES ntoskrnl) file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml " \n") endif() endif() @@ -59,10 +27,10 @@ endmacro() macro(add_dependency_header) file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml "\n\n \n") - add_dependency_node(ntdll) endmacro() macro(add_dependency_footer) + add_dependency_node(ntdll) file(APPEND ${REACTOS_BINARY_DIR}/dependencies.graphml " \n\n") endmacro() @@ -108,27 +76,27 @@ function(add_cd_file) if(NOT (_CD_TARGET OR _CD_FILE)) message(FATAL_ERROR "You must provide a target or a file to install!") endif() - + if(NOT _CD_DESTINATION) message(FATAL_ERROR "You must provide a destination") elseif(${_CD_DESTINATION} STREQUAL root) set(_CD_DESTINATION "") endif() - + if(NOT _CD_FOR) message(FATAL_ERROR "You must provide a cd name (or "all" for all of them) to install the file on!") endif() - + #get file if we need to if(NOT _CD_FILE) get_target_property(_CD_FILE ${_CD_TARGET} LOCATION) endif() - + #do we add it to all CDs? if(_CD_FOR STREQUAL all) set(_CD_FOR "bootcd;livecd;regtest") endif() - + #do we add it to bootcd? list(FIND _CD_FOR bootcd __cd) if(NOT __cd EQUAL -1) @@ -150,18 +118,18 @@ function(add_cd_file) else() #add it in reactos.cab dir_to_num(${_CD_DESTINATION} _num) - if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "${_CD_FILE} ${_num}\n") - else() - file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "\"${_CD_FILE}\" ${_num}\n") - endif() + if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) + file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "${_CD_FILE} ${_num}\n") + else() + file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "\"${_CD_FILE}\" ${_num}\n") + endif() if(_CD_TARGET) #manage dependency add_dependencies(reactos_cab ${_CD_TARGET}) endif() endif() endif() #end bootcd - + #do we add it to livecd? list(FIND _CD_FOR livecd __cd) if(NOT __cd EQUAL -1) @@ -178,5 +146,96 @@ function(add_cd_file) file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.cmake "file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file} \${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n") endif() endif() #end livecd - + + #do we add it to regtest? + list(FIND _CD_FOR regtest __cd) + if(NOT __cd EQUAL -1) + #whether or not we should put it in reactos.cab or directly on cd + if(_CD_NO_CAB) + #directly on cd + foreach(item ${_CD_FILE}) + file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcdregtest.cmake "file(COPY \"${item}\" DESTINATION \"\${CD_DIR}/${_CD_DESTINATION}\")\n") + endforeach() + if(_CD_NAME_ON_CD) + get_filename_component(__file ${_CD_FILE} NAME) + #rename it in the cd tree + file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcdregtest.cmake "file(RENAME \${CD_DIR}/${_CD_DESTINATION}/${__file} \${CD_DIR}/${_CD_DESTINATION}/${_CD_NAME_ON_CD})\n") + endif() + if(_CD_TARGET) + #manage dependency + add_dependencies(bootcdregtest ${_CD_TARGET}) + endif() + else() + #add it in reactos.cab + #dir_to_num(${_CD_DESTINATION} _num) + #file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "${_CD_FILE} ${_num}\n") + #if(_CD_TARGET) + # #manage dependency + # add_dependencies(reactos_cab ${_CD_TARGET}) + #endif() + endif() + endif() #end bootcd endfunction() + +# Create module_clean targets +function(add_clean_target target) + if(CMAKE_GENERATOR MATCHES "Unix Makefiles" OR CMAKE_GENERATOR MATCHES "MinGW Makefiles") + set(CLEAN_COMMAND make clean) + elseif(CMAKE_GENERATOR MATCHES "NMake Makefiles") + set(CLEAN_COMMAND nmake clean) + endif() + add_custom_target(${target}_clean + COMMAND ${CLEAN_COMMAND} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Cleaning ${target}") +endfunction() + +if(NOT MSVC_IDE) + function(add_library name) + _add_library(${name} ${ARGN}) + add_clean_target(${name}) + endfunction() + + function(add_executable name) + _add_executable(${name} ${ARGN}) + add_clean_target(${name}) + endfunction() +endif() + +if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) + macro(to_win_path _cmake_path _native_path) + string(REPLACE "/" "\\" ${_native_path} "${_cmake_path}") + endmacro() + + macro(concatenate_files _file1 _file2 _output) + to_win_path("${_file1}" _real_file1) + to_win_path("${_file2}" _real_file2) + to_win_path("${_output}" _real_output) + add_custom_command( + OUTPUT ${_output} + COMMAND cmd.exe /C "copy /Y /B ${_real_file1} + ${_real_file2} ${_real_output} > nul" + DEPENDS ${_file1} + DEPENDS ${_file2}) + endmacro() +else() + macro(concatenate_files _file1 _file2 _output) + add_custom_command( + OUTPUT ${_output} + COMMAND cat ${_file1} ${_file2} > ${_output} + DEPENDS ${_file1} + DEPENDS ${_file2}) + endmacro() +endif() + +macro(add_importlibs MODULE) + add_dependency_node(${MODULE}) + foreach(LIB ${ARGN}) + if ("${LIB}" MATCHES "msvcrt") + add_definitions(-D_DLL -D__USE_CRTIMP) + target_link_libraries(${MODULE} msvcrtex) + endif() + target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}${CMAKE_STATIC_LIBRARY_SUFFIX}) + add_dependencies(${MODULE} lib${LIB}) + add_dependency_edge(${MODULE} ${LIB}) + endforeach() +endmacro() diff --git a/baseaddress.cmake b/cmake/baseaddress.cmake similarity index 99% rename from baseaddress.cmake rename to cmake/baseaddress.cmake index 9a3128c702e..4430a009881 100644 --- a/baseaddress.cmake +++ b/cmake/baseaddress.cmake @@ -49,6 +49,7 @@ set(baseaddress_dinput 0x5f580000) set(baseaddress_netid 0x5f660000) set(baseaddress_ntprint 0x5f6a0000) set(baseaddress_mssip32 0x60430000) +set(baseaddress_msports 0x60450000) set(baseaddress_msisip 0x60b10000) set(baseaddress_inseng 0x61000000) set(baseaddress_qedit 0x611c0000) diff --git a/cmake/compilerflags.cmake b/cmake/compilerflags.cmake new file mode 100644 index 00000000000..2ac31fda4ae --- /dev/null +++ b/cmake/compilerflags.cmake @@ -0,0 +1,33 @@ + +macro(add_compiler_flags) + # Adds the compiler flag to both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS + foreach(flag ${ARGN}) + set(flags_list "${flags_list} ${flag}") + endforeach() + + if(CMAKE_C_FLAGS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flags_list}") + else() + set(CMAKE_C_FLAGS ${flags_list}) + endif() + + if(CMAKE_CXX_FLAGS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flags_list}") + else() + set(CMAKE_CXX_FLAGS ${flags_list}) + endif() +endmacro() + +macro(add_linkerflag MODULE _flag) + set(NEW_LINKER_FLAGS ${_flag}) + get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS) + if(LINKER_FLAGS) + set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}") + endif() + set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS}) +endmacro() + +macro(set_unicode) + add_definitions(-DUNICODE -D_UNICODE) + set(IS_UNICODE 1) +endmacro() diff --git a/config-amd64.cmake b/cmake/config-amd64.cmake similarity index 100% rename from config-amd64.cmake rename to cmake/config-amd64.cmake diff --git a/config-arm.cmake b/cmake/config-arm.cmake similarity index 100% rename from config-arm.cmake rename to cmake/config-arm.cmake diff --git a/config.cmake b/cmake/config.cmake similarity index 83% rename from config.cmake rename to cmake/config.cmake index 4b5bd1150b0..dbcc85a6a27 100644 --- a/config.cmake +++ b/cmake/config.cmake @@ -21,18 +21,24 @@ set(OPTIMIZE "1" CACHE STRING 4 = -O2 5 = -O3") -set(DBG TRUE CACHE BOOL -"Whether to compile for debugging.") - -set(KDBG TRUE CACHE BOOL -"Whether to compile in the integrated kernel debugger.") - set(GDB FALSE CACHE BOOL "Whether to compile for debugging with GDB. If you don't use GDB, don't enable this.") -set(_WINKD_ FALSE CACHE BOOL +set(DBG TRUE CACHE BOOL +"Whether to compile for debugging.") + +if(MSVC) + set(KDBG FALSE CACHE BOOL +"Whether to compile in the integrated kernel debugger.") + set(_WINKD_ TRUE CACHE BOOL "Whether to compile with the KD protocol.") +else() + set(KDBG TRUE CACHE BOOL +"Whether to compile in the integrated kernel debugger.") + set(_WINKD_ FALSE CACHE BOOL +"Whether to compile with the KD protocol.") +endif() set(_ELF_ FALSE CACHE BOOL "Whether to compile support for ELF files. diff --git a/gcc.cmake b/cmake/gcc.cmake similarity index 63% rename from gcc.cmake rename to cmake/gcc.cmake index 58c58ec652f..867c52b13d0 100644 --- a/gcc.cmake +++ b/cmake/gcc.cmake @@ -1,80 +1,54 @@ -# Linking -if(ARCH MATCHES i386) -link_directories("${REACTOS_SOURCE_DIR}/importlibs") -endif() -link_directories(${REACTOS_BINARY_DIR}/lib/3rdparty/mingw) -set(CMAKE_C_LINK_EXECUTABLE " -o ") -set(CMAKE_CXX_LINK_EXECUTABLE " -o ") -set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--disable-auto-import") -# -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} -Wl,--disable-stdcall-fixup") - -#set(CMAKE_RC_COMPILE_OBJECT " -i -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -O coff -o ") - -# Temporary, until windres issues are fixed -get_target_property(WRC native-wrc IMPORTED_LOCATION_NOCONFIG) -set(CMAKE_RC_COMPILE_OBJECT - " -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1 -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -xc -E -o " - "${WRC} -i -o " - " -i -J res -O coff -o ") - # Compiler Core -add_definitions(-pipe -fms-extensions) - -set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") -set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -o ") -set(CMAKE_RC_CREATE_SHARED_LIBRARY " -o ") +add_compiler_flags(-pipe -fms-extensions) # Debugging (Note: DWARF-4 on 4.5.1 when we ship) -add_definitions(-gdwarf-2 -g2 -femit-struct-debug-detailed=none -feliminate-unused-debug-types) +add_compiler_flags(-gdwarf-2 -g2 -femit-struct-debug-detailed=none -feliminate-unused-debug-types) # Tuning if(ARCH MATCHES i386) - add_definitions(-march=${OARCH} -mtune=${TUNE}) + add_compiler_flags(-march=${OARCH} -mtune=${TUNE}) else() - add_definitions(-march=${OARCH}) + add_compiler_flags(-march=${OARCH}) endif() # Warnings - -add_definitions(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar -Wno-error=uninitialized -Wno-unused-value -Winvalid-pch) +add_compiler_flags(-Wall -Wno-char-subscripts -Wpointer-arith -Wno-multichar -Wno-error=uninitialized -Wno-unused-value -Winvalid-pch) if(ARCH MATCHES amd64) - add_definitions(-Wno-format) + add_compiler_flags(-Wno-format) elseif(ARCH MATCHES arm) - add_definitions(-Wno-attributes) + add_compiler_flags(-Wno-attributes) endif() # Optimizations - if(OPTIMIZE STREQUAL "1") - add_definitions(-Os) + add_compiler_flags(-Os) elseif(OPTIMIZE STREQUAL "2") - add_definitions(-Os) + add_compiler_flags(-Os) elseif(OPTIMIZE STREQUAL "3") - add_definitions(-O1) + add_compiler_flags(-O1) elseif(OPTIMIZE STREQUAL "4") - add_definitions(-O2) + add_compiler_flags(-O2) elseif(OPTIMIZE STREQUAL "5") - add_definitions(-O3) + add_compiler_flags(-O3) endif() -add_definitions(-fno-strict-aliasing) +add_compiler_flags(-fno-strict-aliasing) if(ARCH MATCHES i386) - add_definitions(-mpreferred-stack-boundary=2 -fno-set-stack-executable -fno-optimize-sibling-calls) + add_compiler_flags(-mpreferred-stack-boundary=2 -fno-set-stack-executable -fno-optimize-sibling-calls) if(OPTIMIZE STREQUAL "1") - add_definitions(-ftracer -momit-leaf-frame-pointer) + add_compiler_flags(-ftracer -momit-leaf-frame-pointer) endif() elseif(ARCH MATCHES amd64) - add_definitions(-mpreferred-stack-boundary=4) + add_compiler_flags(-mpreferred-stack-boundary=4) if(OPTIMIZE STREQUAL "1") - add_definitions(-ftracer -momit-leaf-frame-pointer) + add_compiler_flags(-ftracer -momit-leaf-frame-pointer) endif() elseif(ARCH MATCHES arm) if(OPTIMIZE STREQUAL "1") - add_definitions(-ftracer) + add_compiler_flags(-ftracer) endif() endif() @@ -93,53 +67,35 @@ else() set(ARCH2 ${ARCH}) endif() -# Macros -macro(_PCH_GET_COMPILE_FLAGS _target_name _out_compile_flags _header_filename) - # Add the precompiled header to the build - get_filename_component(FILE ${_header_filename} NAME) - set(_gch_filename "${_target_name}_${FILE}.gch") - list(APPEND ${_out_compile_flags} -c ${_header_filename} -o ${_gch_filename}) +# Linking +if(ARCH MATCHES i386) + link_directories(${REACTOS_SOURCE_DIR}/importlibs) +endif() - # This gets us our includes - get_directory_property(DIRINC INCLUDE_DIRECTORIES) - foreach(item ${DIRINC}) - list(APPEND ${_out_compile_flags} -I${item}) - endforeach() +link_directories(${REACTOS_BINARY_DIR}/lib/sdk/crt) - # This is a particular bit of undocumented/hacky magic I'm quite proud of - get_directory_property(_compiler_flags DEFINITIONS) - string(REPLACE "\ " "\t" _compiler_flags ${_compiler_flags}) - list(APPEND ${_out_compile_flags} ${_compiler_flags}) +set(CMAKE_C_LINK_EXECUTABLE " -o ") - # This gets any specific definitions that were added with set-target-property - get_target_property(_target_defs ${_target_name} COMPILE_DEFINITIONS) - if (_target_defs) - foreach(item ${_target_defs}) - list(APPEND ${_out_compile_flags} -D${item}) - endforeach() - endif() -endmacro() +set(CMAKE_CXX_LINK_EXECUTABLE " -o ") -macro(add_pch _target_name _header_filename _src_list) - get_filename_component(FILE ${_header_filename} NAME) - set(_gch_filename "${_target_name}_${FILE}.gch") - list(APPEND ${_src_list} ${_gch_filename}) - _PCH_GET_COMPILE_FLAGS(${_target_name} _args ${_header_filename}) - file(REMOVE ${_gch_filename}) - add_custom_command( - OUTPUT ${_gch_filename} - COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} ${_args} - DEPENDS ${_header_filename}) -endmacro() +set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--disable-auto-import") -macro(add_linkerflag MODULE _flag) - set(NEW_LINKER_FLAGS ${_flag}) - get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS) - if(LINKER_FLAGS) - set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}") - endif() - set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS}) -endmacro() +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} -Wl,--disable-stdcall-fixup") + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") +set(CMAKE_CXX_CREATE_SHARED_LIBRARY " -o ") +set(CMAKE_RC_CREATE_SHARED_LIBRARY " -o ") + +set(CMAKE_ASM_COMPILE_OBJECT " -x assembler-with-cpp -o -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm ${CMAKE_C_FLAGS} -D__ASM__ -c ") + +#set(CMAKE_RC_COMPILE_OBJECT " -i -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -O coff -o ") + +# Temporary, until windres issues are fixed +get_target_property(WRC native-wrc IMPORTED_LOCATION_NOCONFIG) +set(CMAKE_RC_COMPILE_OBJECT + " -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1 -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -xc -E -o " + "${WRC} -i -o " + " -i -J res -O coff -o ") # Optional 3rd parameter: stdcall stack bytes macro(set_entrypoint MODULE ENTRYPOINT) @@ -176,25 +132,20 @@ macro(set_module_type MODULE TYPE) set_entrypoint(${MODULE} NtProcessStartup 4) elseif(${TYPE} MATCHES win32gui) set_subsystem(${MODULE} windows) - set_entrypoint(${MODULE} WinMainCRTStartup) - if(NOT IS_UNICODE) - target_link_libraries(${MODULE} mingw_main) + if(IS_UNICODE) + set_entrypoint(${MODULE} wWinMainCRTStartup) else() - target_link_libraries(${MODULE} mingw_wmain) - endif(NOT IS_UNICODE) - target_link_libraries(${MODULE} mingw_common) + set_entrypoint(${MODULE} WinMainCRTStartup) + endif(IS_UNICODE) elseif(${TYPE} MATCHES win32cui) set_subsystem(${MODULE} console) - set_entrypoint(${MODULE} mainCRTStartup) - if(NOT IS_UNICODE) - target_link_libraries(${MODULE} mingw_main) + if(IS_UNICODE) + set_entrypoint(${MODULE} wmainCRTStartup) else() - target_link_libraries(${MODULE} mingw_wmain) - endif(NOT IS_UNICODE) - target_link_libraries(${MODULE} mingw_common) + set_entrypoint(${MODULE} mainCRTStartup) + endif(IS_UNICODE) elseif(${TYPE} MATCHES win32dll) - set_entrypoint(${MODULE} DllMain 12) - target_link_libraries(${MODULE} mingw_dllmain mingw_common) + set_entrypoint(${MODULE} DllMain 12) if(DEFINED baseaddress_${MODULE}) set_image_base(${MODULE} ${baseaddress_${MODULE}}) else() @@ -202,11 +153,9 @@ macro(set_module_type MODULE TYPE) endif() elseif(${TYPE} MATCHES win32ocx) set_entrypoint(${MODULE} DllMain 12) - target_link_libraries(${MODULE} mingw_dllmain mingw_common) set_target_properties(${MODULE} PROPERTIES SUFFIX ".ocx") elseif(${TYPE} MATCHES cpl) set_entrypoint(${MODULE} DllMain 12) - target_link_libraries(${MODULE} mingw_dllmain mingw_common) set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl") elseif(${TYPE} MATCHES kernelmodedriver) set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-Wl,--exclude-all-symbols -Wl,-file-alignment=0x1000 -Wl,-section-alignment=0x1000" SUFFIX ".sys") @@ -221,11 +170,6 @@ macro(set_module_type MODULE TYPE) endif() endmacro() -macro(set_unicode) - add_definitions(-DUNICODE -D_UNICODE) - set(IS_UNICODE 1) -endmacro() - # Workaround lack of mingw RC support in cmake macro(set_rc_compiler) get_directory_property(defines COMPILE_DEFINITIONS) @@ -263,14 +207,12 @@ set(IDL_PROXY_ARG -p -P) set(IDL_INTERFACE_ARG -u -o) set(IDL_DLLDATA_ARG --dlldata-only -o) - -macro(add_importlibs MODULE) - add_dependency_node(${MODULE}) +macro(add_delay_importlibs MODULE) foreach(LIB ${ARGN}) - target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.a) - add_dependencies(${MODULE} lib${LIB}) - add_dependency_edge(${MODULE} ${LIB}) + target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}_delayed.a) + add_dependencies(${MODULE} lib${LIB}_delayed) endforeach() + target_link_libraries(${MODULE} delayimp) endmacro() if(NOT ARCH MATCHES i386) @@ -293,25 +235,42 @@ macro(add_importlib_target _exports_file) if (${_extension} STREQUAL ".spec") + # Normal importlib creation add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a COMMAND native-spec2def -n=${_name}${_suffix} -a=${ARCH2} -d=${CMAKE_CURRENT_BINARY_DIR}/${_name}_implib.def ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_BINARY_DIR}/${_name}_implib.def --kill-at --output-lib=${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}) + # Delayed importlib creation + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a + COMMAND native-spec2def -n=${_name}${_suffix} -a=${ARCH2} -d=${CMAKE_CURRENT_BINARY_DIR}/${_name}_delayed_implib.def ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} + COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_BINARY_DIR}/${_name}_delayed_implib.def --kill-at --output-delaylib ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}) + elseif(${_extension} STREQUAL ".def") message("Use of def files for import libs is deprecated: ${_exports_file}") add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} --kill-at --output-lib=${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}) + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a + COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} --kill-at --output-delaylib ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}) else() message(FATAL_ERROR "Unsupported exports file extension: ${_extension}") endif() + # Normal importlib target add_custom_target( lib${_name} DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a) + # Delayed importlib target + add_custom_target( + lib${_name}_delayed + DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_delayed.a) endmacro() @@ -332,3 +291,86 @@ endmacro() #pseh lib, needed with mingw set(PSEH_LIB "pseh") + +# Macros +macro(_PCH_GET_COMPILE_FLAGS _target_name _out_compile_flags _header_filename) + # Add the precompiled header to the build + get_filename_component(_FILE ${_header_filename} NAME) + set(_gch_filename "${_FILE}.gch") + list(APPEND ${_out_compile_flags} -c ${_header_filename} -o ${_gch_filename}) + + # This gets us our includes + get_directory_property(DIRINC INCLUDE_DIRECTORIES) + foreach(item ${DIRINC}) + list(APPEND ${_out_compile_flags} -I${item}) + endforeach() + + # This our definitions + get_directory_property(_compiler_flags DEFINITIONS) + list(APPEND ${_out_compile_flags} ${_compiler_flags}) + + # This gets any specific definitions that were added with set-target-property + get_target_property(_target_defs ${_target_name} COMPILE_DEFINITIONS) + if (_target_defs) + foreach(item ${_target_defs}) + list(APPEND ${_out_compile_flags} -D${item}) + endforeach() + endif() + + separate_arguments(${_out_compile_flags}) +endmacro() + +macro(add_pch _target_name _FILE) + #set(_header_filename ${CMAKE_CURRENT_SOURCE_DIR}/${_FILE}) + #get_filename_component(_basename ${_FILE} NAME) + #set(_gch_filename ${_basename}.gch) + #_PCH_GET_COMPILE_FLAGS(${_target_name} _args ${_header_filename}) + + #add_custom_command(OUTPUT ${_gch_filename} COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} ${_args} DEPENDS ${_header_filename}) + #get_target_property(_src_files ${_target_name} SOURCES) + #set_source_files_properties(${_src_files} PROPERTIES COMPILE_FLAGS "-Winvalid-pch -fpch-preprocess" #OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_gch_filename}) + #add_linkerflag(${_target_name} "${_gch_filename}") +endmacro() + +macro(CreateBootSectorTarget _target_name _asm_file _object_file _base_address) + get_filename_component(OBJECT_PATH ${_object_file} PATH) + get_filename_component(OBJECT_NAME ${_object_file} NAME) + file(MAKE_DIRECTORY ${OBJECT_PATH}) + get_directory_property(defines COMPILE_DEFINITIONS) + get_directory_property(includes INCLUDE_DIRECTORIES) + + foreach(arg ${defines}) + set(result_defs ${result_defs} -D${arg}) + endforeach() + + foreach(arg ${includes}) + set(result_incs -I${arg} ${result_incs}) + endforeach() + + add_custom_command( + OUTPUT ${_object_file} + COMMAND nasm -o ${_object_file} ${result_incs} ${result_defs} -f bin ${_asm_file} + DEPENDS ${_asm_file}) + set_source_files_properties(${_object_file} PROPERTIES GENERATED TRUE) + add_custom_target(${_target_name} ALL DEPENDS ${_object_file}) +endmacro() + +macro(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address) + set(_object_file ${_binary_file}.o) + + add_custom_command( + OUTPUT ${_object_file} + COMMAND ${CMAKE_ASM_COMPILER} -x assembler-with-cpp -o ${_object_file} -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm -D__ASM__ -c ${_asm_file} + DEPENDS ${_asm_file}) + + add_custom_command( + OUTPUT ${_binary_file} + COMMAND native-obj2bin ${_object_file} ${_binary_file} ${_base_address} + # COMMAND objcopy --output-target binary --image-base 0x${_base_address} ${_object_file} ${_binary_file} + DEPENDS ${_object_file}) + + set_source_files_properties(${_object_file} ${_binary_file} PROPERTIES GENERATED TRUE) + + add_custom_target(${_target_name} ALL DEPENDS ${_binary_file}) + +endmacro() diff --git a/cmake/idl-support.cmake b/cmake/idl-support.cmake index a627d0c7d6a..a64df0da6e4 100644 --- a/cmake/idl-support.cmake +++ b/cmake/idl-support.cmake @@ -93,7 +93,7 @@ macro(add_rpcproxy_files) list(APPEND IDLS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) endif() add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${NAME}_p.h COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_PROXY_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${IDL_HEADER_ARG2} ${NAME}_p.h ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} ${DLLDATA_ARG} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) endforeach() @@ -116,18 +116,18 @@ macro(add_rpc_library TARGET) foreach(FILE ${ARGN}) get_filename_component(NAME ${FILE} NAME_WE) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.h ${IDL_SERVER_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) list(APPEND server_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_s.c) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h COMMAND ${IDL_COMPILER} ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${IDL_HEADER_ARG2} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.h ${IDL_CLIENT_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) list(APPEND client_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_c.c) endforeach() - add_library(${TARGET} ${server_SOURCES} ${client_SOURCES}) + add_library(${TARGET} ${client_SOURCES} ${server_SOURCES}) add_dependencies(${TARGET} psdk) endmacro() diff --git a/msc.cmake b/cmake/msvc.cmake similarity index 54% rename from msc.cmake rename to cmake/msvc.cmake index baf8f5d7129..af42d92d9b1 100644 --- a/msc.cmake +++ b/cmake/msvc.cmake @@ -13,40 +13,50 @@ elseif(OPTIMIZE STREQUAL "5") add_definitions(/GF /Gy /Ob2 /Os /Ox /GS-) endif() -add_definitions(/X /GR- /GS- /Zl) -add_definitions(-Dinline=__inline -D__STDC__=1) +if(ARCH MATCHES i386) + add_definitions(/DWIN32 /D_WINDOWS) +endif() + +add_definitions(/Dinline=__inline /D__STDC__=1) + +add_compiler_flags(/X /GR- /GS- /Zl /W3) if(${_MACHINE_ARCH_FLAG} MATCHES X86) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB") endif() if(${ARCH} MATCHES amd64) - add_definitions(-D__x86_64) + add_definitions(/D__x86_64) + set(SPEC2DEF_ARCH x86_64) +else() + set(SPEC2DEF_ARCH i386) endif() -link_directories("${REACTOS_BINARY_DIR}/importlibs" ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw) +link_directories(${REACTOS_SOURCE_DIR}/importlibs ${REACTOS_BINARY_DIR}/importlibs ${REACTOS_BINARY_DIR}/lib/sdk/crt) + +set(CMAKE_RC_COMPILE_OBJECT " /I${REACTOS_SOURCE_DIR}/include/psdk /I${REACTOS_BINARY_DIR}/include/psdk /I${REACTOS_SOURCE_DIR}/include /I${REACTOS_SOURCE_DIR}/include/reactos /I${REACTOS_BINARY_DIR}/include/reactos /I${REACTOS_SOURCE_DIR}/include/reactos/wine /I${REACTOS_SOURCE_DIR}/include/crt /I${REACTOS_SOURCE_DIR}/include/crt/mingw32 /fo ") + +if(MSVC_IDE) + # Asm source files are not supported in VS generators yet. As a result, isn't recognized. + # We may temporarily use just the global defines, but this is not a solution as some modules (minihal for example) apply additional definitions to source files, so we get an incorrect build of such targets. + get_directory_property(definitions DEFINITIONS) + set(CMAKE_ASM_COMPILE_OBJECT + " /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm /I${REACTOS_BINARY_DIR}/include/asm ${definitions} /D__ASM__ /D_USE_ML /EP /c > .tmp" + " /nologo /Cp /Fo /c /Ta .tmp") +else() + # NMake Makefiles + set(CMAKE_ASM_COMPILE_OBJECT + " /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm /I${REACTOS_BINARY_DIR}/include/asm /D__ASM__ /D_USE_ML /EP /c > .tmp" + " /nologo /Cp /Fo /c /Ta .tmp") +endif() set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY}) set(CMAKE_ASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY}) +set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY}) -macro(add_pch _target_name _header_filename _src_list) - get_filename_component(FILE ${_header_filename} NAME) - set(_gch_filename "${_target_name}_${FILE}.gch") - add_custom_command( - OUTPUT ${_gch_filename} - COMMAND echo Ignoring precompiled header - DEPENDS ${_header_filename}) -endmacro() - -macro(add_linkerflag MODULE _flag) - set(NEW_LINKER_FLAGS ${_flag}) - get_target_property(LINKER_FLAGS ${MODULE} LINK_FLAGS) - if(LINKER_FLAGS) - set(NEW_LINKER_FLAGS "${LINKER_FLAGS} ${NEW_LINKER_FLAGS}") - endif() - set_target_properties(${MODULE} PROPERTIES LINK_FLAGS ${NEW_LINKER_FLAGS}) +macro(add_pch _target_name _FILE) endmacro() macro(set_entrypoint MODULE ENTRYPOINT) @@ -70,28 +80,21 @@ macro(set_module_type MODULE TYPE) if(${TYPE} MATCHES nativecui) set_subsystem(${MODULE} native) set_entrypoint(${MODULE} NtProcessStartup@4) - endif() - if (${TYPE} MATCHES win32gui) + elseif (${TYPE} MATCHES win32gui) set_subsystem(${MODULE} windows) - set_entrypoint(${MODULE} WinMainCRTStartup) if(IS_UNICODE) - target_link_libraries(${MODULE} mingw_wmain) + set_entrypoint(${MODULE} wWinMainCRTStartup) else() - target_link_libraries(${MODULE} mingw_main) - endif() - target_link_libraries(${MODULE} mingw_common msvcsup) - endif () - if (${TYPE} MATCHES win32cui) + set_entrypoint(${MODULE} WinMainCRTStartup) + endif(IS_UNICODE) + elseif (${TYPE} MATCHES win32cui) set_subsystem(${MODULE} console) - set_entrypoint(${MODULE} mainCRTStartup) if(IS_UNICODE) - target_link_libraries(${MODULE} mingw_wmain) + set_entrypoint(${MODULE} wmainCRTStartup) else() - target_link_libraries(${MODULE} mingw_main) - endif() - target_link_libraries(${MODULE} mingw_common msvcsup) - endif () - if(${TYPE} MATCHES win32dll) + set_entrypoint(${MODULE} mainCRTStartup) + endif(IS_UNICODE) + elseif(${TYPE} MATCHES win32dll) # Need this only because mingw library is broken set_entrypoint(${MODULE} DllMainCRTStartup@12) if(DEFINED baseaddress_${MODULE}) @@ -99,37 +102,25 @@ macro(set_module_type MODULE TYPE) else() message(STATUS "${MODULE} has no base address") endif() - target_link_libraries(${MODULE} mingw_common mingw_dllmain msvcsup) add_linkerflag(${MODULE} "/DLL") - endif() - if(${TYPE} MATCHES win32ocx) + elseif(${TYPE} MATCHES win32ocx) set_entrypoint(${MODULE} DllMainCRTStartup@12) set_target_properties(${MODULE} PROPERTIES SUFFIX ".ocx") - target_link_libraries(${MODULE} mingw_common mingw_dllmain msvcsup) add_linkerflag(${MODULE} "/DLL") - endif() - if(${TYPE} MATCHES cpl) + elseif(${TYPE} MATCHES cpl) set_entrypoint(${MODULE} DllMainCRTStartup@12) set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl") - target_link_libraries(${MODULE} mingw_common mingw_dllmain msvcsup) add_linkerflag(${MODULE} "/DLL") - endif() - if(${TYPE} MATCHES kernelmodedriver) + elseif(${TYPE} MATCHES kernelmodedriver) set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys") set_entrypoint(${MODULE} DriverEntry@8) set_subsystem(${MODULE} native) set_image_base(${MODULE} 0x00010000) add_linkerflag(${MODULE} "/DRIVER") add_dependencies(${MODULE} bugcodes) - target_link_libraries(${MODULE} msvcsup) endif() endmacro() -macro(set_unicode) - add_definitions(-DUNICODE -D_UNICODE) - set(IS_UNICODE 1) -endmacro() - macro(set_rc_compiler) # dummy, this workaround is only needed in mingw due to lack of RC support in cmake endmacro() @@ -150,7 +141,7 @@ macro(add_importlib_target _exports_file) # Generate the asm stub file and the export def file add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def - COMMAND native-spec2def --ms --kill-at -r -n=${_name}${_suffix} -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} + COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} --implib -n=${_name}${_suffix} -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_exports_file}) # Assemble the stub file @@ -169,7 +160,7 @@ macro(add_importlib_target _exports_file) # Build the importlib add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib - COMMAND LINK /LIB /NOLOGO /MACHINE:X86 /DEF:${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def /OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${_libraries} + COMMAND LINK /LIB /NOLOGO /DEF:${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def /OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${_libraries} DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def) # Add the importlib target @@ -180,18 +171,16 @@ macro(add_importlib_target _exports_file) add_dependencies(lib${_name} asm ${_dependencies}) endmacro() -macro(add_importlibs MODULE) - foreach(LIB ${ARGN}) - target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.lib) - add_dependencies(${MODULE} lib${LIB}) - endforeach() +macro(add_delay_importlibs MODULE) + # TODO. For now forward to normal import libs + add_importlibs(${MODULE} ${ARGN}) endmacro() macro(spec2def _dllname _spec_file) get_filename_component(_file ${_spec_file} NAME_WE) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c - COMMAND native-spec2def --ms --kill-at -n=${_dllname} -d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} + COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} -n=${_dllname} -d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}) set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c PROPERTIES GENERATED TRUE) @@ -206,3 +195,27 @@ file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs) #pseh workaround set(PSEH_LIB "pseh") +macro(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address) + + set(_object_file ${_binary_file}.obj) + set(_temp_file ${_binary_file}.tmp) + + add_custom_command( + OUTPUT ${_temp_file} + COMMAND ${CMAKE_C_COMPILER} /nologo /X /I${REACTOS_SOURCE_DIR}/include/asm /I${REACTOS_BINARY_DIR}/include/asm /D__ASM__ /D_USE_ML /EP /c ${_asm_file} > ${_temp_file} + DEPENDS ${_asm_file}) + + add_custom_command( + OUTPUT ${_object_file} + COMMAND ml /nologo /Cp /Fo${_object_file} /c /Ta ${_temp_file} + DEPENDS ${_temp_file}) + + add_custom_command( + OUTPUT ${_binary_file} + COMMAND native-obj2bin ${_object_file} ${_binary_file} ${_base_address} + DEPENDS ${_object_file}) + + set_source_files_properties(${_object_file} ${_temp_file} ${_binary_file} PROPERTIES GENERATED TRUE) + + add_custom_target(${_target_name} ALL DEPENDS ${_binary_file}) +endmacro() diff --git a/configure.cmd b/configure.cmd index f93b74ab14e..46add19610b 100644 --- a/configure.cmd +++ b/configure.cmd @@ -2,7 +2,10 @@ :: Get the source root directory set REACTOS_SOURCE_DIR=%~dp0 -set USE_NMAKE= +set USE_NMAKE=0 + +:: Detect presence of cmake + cmd /c cmake --version 2>&1 | find "cmake version" > NUL || goto cmake_notfound :: Detect build environment (MinGW, VS, WDK, ...) if defined ROS_ARCH ( @@ -18,6 +21,7 @@ if defined ROS_ARCH ( ) set BUILD_ENVIRONMENT=WDK set USE_NMAKE=1 + set USE_WDK_HEADERS=0 echo Detected DDK/WDK for %DDK_TARGET_OS%-%ARCH% )else if defined VCINSTALLDIR ( :: VS command prompt does not put this in enviroment vars @@ -31,7 +35,7 @@ if defined ROS_ARCH ( exit /b ) echo Detected Visual Studio Environment %BUILD_ENVIRONMENT%-%ARCH% - if not "%1" == "VSSolution" ( + if /I not "%1" == "VSSolution" ( set USE_NMAKE=1 echo This script defaults to nmake. To use Visual Studio GUI specify "VSSolution" as a parameter. ) @@ -47,16 +51,21 @@ if defined ROS_ARCH ( echo Detected Windows SDK %TARGET_PLATFORM%-%ARCH% ) -if defined ARCH if defined BUILD_ENVIRONMENT ( - goto createdirs +:: Detect NMAKE JOM +if %USE_NMAKE% == 1 ( + cmd /c jom /version 2>&1 | find "jom version" > NUL && set USE_NMAKE=2 ) -echo Error: Unable to detect a build environment. Configure script failure. -exit /b +:: Checkpoint +if not defined ARCH ( + goto fail +) + +if not defined BUILD_ENVIRONMENT ( + goto fail +) :: Create directories -:createdirs - set REACTOS_OUTPUT_PATH=output-%BUILD_ENVIRONMENT%-%ARCH% if "%REACTOS_SOURCE_DIR%" == "%CD%\" ( echo Creating directories in %REACTOS_OUTPUT_PATH% @@ -74,7 +83,6 @@ if not exist reactos ( mkdir reactos ) -:hostprep echo Preparing host tools... cd host-tools if EXIST CMakeCache.txt ( @@ -83,9 +91,23 @@ if EXIST CMakeCache.txt ( set REACTOS_BUILD_TOOLS_DIR=%CD% if "%BUILD_ENVIRONMENT%" == "MinGW" ( - cmake -G "MinGW Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + if /I "%1" == "Codeblocks" ( + cmake -G "CodeBlocks - MinGW Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + ) else if /I "%1" == "Eclipse" ( + cmake -G "Eclipse CDT4 - MinGW Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + ) else ( + cmake -G "MinGW Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + ) ) else if defined USE_NMAKE ( - cmake -G "NMake Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + if /I "%1" == "CodeBlocks" ( + cmake -G "CodeBlocks - NMake Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + ) else if /I "%1" == "Eclipse" ( + cmake -G "Eclipse CDT4 - NMake Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + ) else if %USE_NMAKE% == 2 ( + cmake -G "NMake Makefiles JOM" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + ) else ( + cmake -G "NMake Makefiles" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% + ) ) else if "%BUILD_ENVIRONMENT%" == "VS8" ( if "%ARCH%" == "amd64" ( cmake -G "Visual Studio 8 2005 Win64" -DARCH=%ARCH% %REACTOS_SOURCE_DIR% @@ -107,18 +129,30 @@ if "%BUILD_ENVIRONMENT%" == "MinGW" ( ) cd.. -:reactprep echo Preparing reactos... - cd reactos if EXIST CMakeCache.txt ( del CMakeCache.txt /q ) if "%BUILD_ENVIRONMENT%" == "MinGW" ( - cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + if /I "%1" == "CodeBlocks" ( + cmake -G "CodeBlocks - MinGW Makefiles" -DENABLE_CCACHE=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + ) else if /I "%1" == "Eclipse" ( + cmake -G "Eclipse CDT4 - MinGW Makefiles" -DENABLE_CCACHE=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + ) else ( + cmake -G "MinGW Makefiles" -DENABLE_CCACHE=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + ) ) else if defined USE_NMAKE ( - cmake -G "NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + if /I "%1" == "CodeBlocks" ( + cmake -G "CodeBlocks - NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DUSE_WDK_HEADERS=%USE_WDK_HEADERS% -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + ) else if /I "%1" == "Eclipse" ( + cmake -G "Eclipse CDT4 - NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DUSE_WDK_HEADERS=%USE_WDK_HEADERS% -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + ) else if %USE_NMAKE% == 2 ( + cmake -G "NMake Makefiles JOM" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DUSE_WDK_HEADERS=%USE_WDK_HEADERS% -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + ) else ( + cmake -G "NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DUSE_WDK_HEADERS=%USE_WDK_HEADERS% -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% + ) ) else if "%BUILD_ENVIRONMENT%" == "VS8" ( if "%ARCH%" == "amd64" ( cmake -G "Visual Studio 8 2005 Win64" -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" %REACTOS_SOURCE_DIR% @@ -141,5 +175,13 @@ if "%BUILD_ENVIRONMENT%" == "MinGW" ( cd.. -echo Configure script complete! Enter directories and execute appropriate build commands(ex: make, nmake, etc...). +echo Configure script complete! Enter directories and execute appropriate build commands(ex: make, nmake, jom, etc...). +exit /b +:fail +echo Error: Unable to detect build environment. Configure script failure. +exit /b + +:cmake_notfound + echo Unable to find cmake, if it is installed, check your PATH variable. + exit /b diff --git a/configure.sh b/configure.sh index 6c0579c8339..f513358a2a9 100755 --- a/configure.sh +++ b/configure.sh @@ -30,8 +30,14 @@ fi REACTOS_BUILD_TOOLS_DIR="$PWD" cmake -G "Unix Makefiles" -DARCH=$ARCH "$REACTOS_SOURCE_DIR" +echo Preparing reactos... cd ../reactos -cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR" +if [ -f CMakeCache.txt ] +then + rm -f CMakeCache.txt +fi + +cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR" echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\). diff --git a/dll/3rdparty/CMakeLists.txt b/dll/3rdparty/CMakeLists.txt index bf606568afe..53f513c732a 100644 --- a/dll/3rdparty/CMakeLists.txt +++ b/dll/3rdparty/CMakeLists.txt @@ -5,7 +5,8 @@ endif() add_subdirectory(libjpeg) add_subdirectory(libpng) add_subdirectory(libtiff) -add_subdirectory(libxslt) + if(NOT MSVC) -add_subdirectory(mesa32) + add_subdirectory(libxslt) + add_subdirectory(mesa32) endif() diff --git a/dll/3rdparty/dxtn/CMakeLists.txt b/dll/3rdparty/dxtn/CMakeLists.txt index d581cbc516b..d4b2425c039 100644 --- a/dll/3rdparty/dxtn/CMakeLists.txt +++ b/dll/3rdparty/dxtn/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - spec2def(dxtn.dll dxtn.spec) add_library(dxtn SHARED diff --git a/dll/3rdparty/libjpeg/CMakeLists.txt b/dll/3rdparty/libjpeg/CMakeLists.txt index 124a4fb7a82..1356e31a0f0 100644 --- a/dll/3rdparty/libjpeg/CMakeLists.txt +++ b/dll/3rdparty/libjpeg/CMakeLists.txt @@ -4,8 +4,7 @@ add_definitions( -D_WINDOWS -D_MBCS -DJPEG_DLL - -Dmain=mainptr - -D_DLL -D__USE_CRTIMP) + -Dmain=mainptr) include_directories( ${REACTOS_SOURCE_DIR}/include/reactos/libs/libjpeg @@ -60,14 +59,6 @@ add_library(libjpeg SHARED jmemnobs.c) set_entrypoint(libjpeg 0) - -if(MSVC) -# for _fltused -target_link_libraries(libjpeg mingw_common) -endif() - add_importlibs(libjpeg msvcrt kernel32) - add_dependencies(libjpeg psdk) - add_cd_file(TARGET libjpeg DESTINATION reactos/system32 FOR all) diff --git a/dll/3rdparty/libjpeg/change.log b/dll/3rdparty/libjpeg/change.log index f99a867dbb8..94865b3f9ce 100644 --- a/dll/3rdparty/libjpeg/change.log +++ b/dll/3rdparty/libjpeg/change.log @@ -1,6 +1,17 @@ CHANGE LOG for Independent JPEG Group's JPEG software +Version 8c 16-Jan-2011 +----------------------- + +Add option to compression library and cjpeg (-block N) to use +different DCT block size. +All N from 1 to 16 are possible. Default is 8 (baseline format). +Larger values produce higher compression, +smaller values produce higher quality. +SmartScale capable decoder (introduced with IJG JPEG 8) required. + + Version 8b 16-May-2010 ----------------------- diff --git a/dll/3rdparty/libjpeg/cjpeg.c b/dll/3rdparty/libjpeg/cjpeg.c index b9d57eb5c86..40d25215d1c 100644 --- a/dll/3rdparty/libjpeg/cjpeg.c +++ b/dll/3rdparty/libjpeg/cjpeg.c @@ -2,7 +2,7 @@ * cjpeg.c * * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-2008 by Guido Vollbeding. + * Modified 2003-2010 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -165,6 +165,9 @@ usage (void) fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); #endif fprintf(stderr, "Switches for advanced users:\n"); +#ifdef DCT_SCALING_SUPPORTED + fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n"); +#endif #ifdef DCT_ISLOW_SUPPORTED fprintf(stderr, " -dct int Use integer DCT method%s\n", (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); @@ -254,10 +257,30 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, exit(EXIT_FAILURE); #endif - } else if (keymatch(arg, "baseline", 1)) { + } else if (keymatch(arg, "baseline", 2)) { /* Force baseline-compatible output (8-bit quantizer values). */ force_baseline = TRUE; + } else if (keymatch(arg, "block", 2)) { + /* Set DCT block size. */ +#if defined(DCT_SCALING_SUPPORTED) && defined(JPEG_LIB_VERSION_MAJOR) && \ + (JPEG_LIB_VERSION_MAJOR > 8 || (JPEG_LIB_VERSION_MAJOR == 8 && \ + defined(JPEG_LIB_VERSION_MINOR) && JPEG_LIB_VERSION_MINOR >= 3)) + int val; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d", &val) != 1) + usage(); + if (val < 1 || val > 16) + usage(); + cinfo->block_size = val; +#else + fprintf(stderr, "%s: sorry, block size setting not supported\n", + progname); + exit(EXIT_FAILURE); +#endif + } else if (keymatch(arg, "dct", 2)) { /* Select DCT algorithm. */ if (++argn >= argc) /* advance to next argument */ diff --git a/dll/3rdparty/libjpeg/jcmarker.c b/dll/3rdparty/libjpeg/jcmarker.c index 2e289834245..606c19af397 100644 --- a/dll/3rdparty/libjpeg/jcmarker.c +++ b/dll/3rdparty/libjpeg/jcmarker.c @@ -2,7 +2,7 @@ * jcmarker.c * * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2003-2009 by Guido Vollbeding. + * Modified 2003-2010 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -231,10 +231,10 @@ emit_dac (j_compress_ptr cinfo) char ac_in_use[NUM_ARITH_TBLS]; int length, i; jpeg_component_info *compptr; - + for (i = 0; i < NUM_ARITH_TBLS; i++) dc_in_use[i] = ac_in_use[i] = 0; - + for (i = 0; i < cinfo->comps_in_scan; i++) { compptr = cinfo->cur_comp_info[i]; /* DC needs no table for refinement scan */ @@ -244,23 +244,25 @@ emit_dac (j_compress_ptr cinfo) if (cinfo->Se) ac_in_use[compptr->ac_tbl_no] = 1; } - + length = 0; for (i = 0; i < NUM_ARITH_TBLS; i++) length += dc_in_use[i] + ac_in_use[i]; - - emit_marker(cinfo, M_DAC); - - emit_2bytes(cinfo, length*2 + 2); - - for (i = 0; i < NUM_ARITH_TBLS; i++) { - if (dc_in_use[i]) { - emit_byte(cinfo, i); - emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); - } - if (ac_in_use[i]) { - emit_byte(cinfo, i + 0x10); - emit_byte(cinfo, cinfo->arith_ac_K[i]); + + if (length) { + emit_marker(cinfo, M_DAC); + + emit_2bytes(cinfo, length*2 + 2); + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + if (dc_in_use[i]) { + emit_byte(cinfo, i); + emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); + } + if (ac_in_use[i]) { + emit_byte(cinfo, i + 0x10); + emit_byte(cinfo, cinfo->arith_ac_K[i]); + } } } #endif /* C_ARITH_CODING_SUPPORTED */ diff --git a/dll/3rdparty/libjpeg/jcmaster.c b/dll/3rdparty/libjpeg/jcmaster.c index 660883f459a..caf80a53b38 100644 --- a/dll/3rdparty/libjpeg/jcmaster.c +++ b/dll/3rdparty/libjpeg/jcmaster.c @@ -2,7 +2,7 @@ * jcmaster.c * * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 2003-2010 by Guido Vollbeding. + * Modified 2003-2011 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -55,125 +55,140 @@ jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo) { #ifdef DCT_SCALING_SUPPORTED + /* Sanity check on input image dimensions to prevent overflow in + * following calculation. + * We do check jpeg_width and jpeg_height in initial_setup below, + * but image_width and image_height can come from arbitrary data, + * and we need some space for multiplication by block_size. + */ + if (((long) cinfo->image_width >> 24) || ((long) cinfo->image_height >> 24)) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + /* Compute actual JPEG image dimensions and DCT scaling choices. */ - if (cinfo->scale_num >= cinfo->scale_denom * 8) { - /* Provide 8/1 scaling */ - cinfo->jpeg_width = cinfo->image_width << 3; - cinfo->jpeg_height = cinfo->image_height << 3; + if (cinfo->scale_num >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/1 scaling */ + cinfo->jpeg_width = cinfo->image_width * cinfo->block_size; + cinfo->jpeg_height = cinfo->image_height * cinfo->block_size; cinfo->min_DCT_h_scaled_size = 1; cinfo->min_DCT_v_scaled_size = 1; - } else if (cinfo->scale_num >= cinfo->scale_denom * 4) { - /* Provide 4/1 scaling */ - cinfo->jpeg_width = cinfo->image_width << 2; - cinfo->jpeg_height = cinfo->image_height << 2; + } else if (cinfo->scale_num * 2 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/2 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 2L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 2L); cinfo->min_DCT_h_scaled_size = 2; cinfo->min_DCT_v_scaled_size = 2; - } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 8) { - /* Provide 8/3 scaling */ - cinfo->jpeg_width = (cinfo->image_width << 1) + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 2, 3L); - cinfo->jpeg_height = (cinfo->image_height << 1) + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 2, 3L); + } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/3 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 3L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 3L); cinfo->min_DCT_h_scaled_size = 3; cinfo->min_DCT_v_scaled_size = 3; - } else if (cinfo->scale_num >= cinfo->scale_denom * 2) { - /* Provide 2/1 scaling */ - cinfo->jpeg_width = cinfo->image_width << 1; - cinfo->jpeg_height = cinfo->image_height << 1; + } else if (cinfo->scale_num * 4 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/4 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 4L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 4L); cinfo->min_DCT_h_scaled_size = 4; cinfo->min_DCT_v_scaled_size = 4; - } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * 8) { - /* Provide 8/5 scaling */ - cinfo->jpeg_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 3, 5L); - cinfo->jpeg_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 3, 5L); + } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/5 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 5L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 5L); cinfo->min_DCT_h_scaled_size = 5; cinfo->min_DCT_v_scaled_size = 5; - } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 4) { - /* Provide 4/3 scaling */ - cinfo->jpeg_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 3L); - cinfo->jpeg_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 3L); + } else if (cinfo->scale_num * 6 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/6 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 6L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 6L); cinfo->min_DCT_h_scaled_size = 6; cinfo->min_DCT_v_scaled_size = 6; - } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * 8) { - /* Provide 8/7 scaling */ - cinfo->jpeg_width = cinfo->image_width + (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 7L); - cinfo->jpeg_height = cinfo->image_height + (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 7L); + } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/7 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 7L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 7L); cinfo->min_DCT_h_scaled_size = 7; cinfo->min_DCT_v_scaled_size = 7; - } else if (cinfo->scale_num >= cinfo->scale_denom) { - /* Provide 1/1 scaling */ - cinfo->jpeg_width = cinfo->image_width; - cinfo->jpeg_height = cinfo->image_height; + } else if (cinfo->scale_num * 8 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/8 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 8L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 8L); cinfo->min_DCT_h_scaled_size = 8; cinfo->min_DCT_v_scaled_size = 8; - } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * 8) { - /* Provide 8/9 scaling */ + } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/9 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 8, 9L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 9L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 8, 9L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 9L); cinfo->min_DCT_h_scaled_size = 9; cinfo->min_DCT_v_scaled_size = 9; - } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * 4) { - /* Provide 4/5 scaling */ + } else if (cinfo->scale_num * 10 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/10 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 4, 5L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 10L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 4, 5L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 10L); cinfo->min_DCT_h_scaled_size = 10; cinfo->min_DCT_v_scaled_size = 10; - } else if (cinfo->scale_num * 11 >= cinfo->scale_denom * 8) { - /* Provide 8/11 scaling */ + } else if (cinfo->scale_num * 11 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/11 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 8, 11L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 11L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 8, 11L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 11L); cinfo->min_DCT_h_scaled_size = 11; cinfo->min_DCT_v_scaled_size = 11; - } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 2) { - /* Provide 2/3 scaling */ + } else if (cinfo->scale_num * 12 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/12 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 2, 3L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 12L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 2, 3L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 12L); cinfo->min_DCT_h_scaled_size = 12; cinfo->min_DCT_v_scaled_size = 12; - } else if (cinfo->scale_num * 13 >= cinfo->scale_denom * 8) { - /* Provide 8/13 scaling */ + } else if (cinfo->scale_num * 13 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/13 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 8, 13L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 13L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 8, 13L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 13L); cinfo->min_DCT_h_scaled_size = 13; cinfo->min_DCT_v_scaled_size = 13; - } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * 4) { - /* Provide 4/7 scaling */ + } else if (cinfo->scale_num * 14 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/14 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 4, 7L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 14L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 4, 7L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 14L); cinfo->min_DCT_h_scaled_size = 14; cinfo->min_DCT_v_scaled_size = 14; - } else if (cinfo->scale_num * 15 >= cinfo->scale_denom * 8) { - /* Provide 8/15 scaling */ + } else if (cinfo->scale_num * 15 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/15 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * 8, 15L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 15L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * 8, 15L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 15L); cinfo->min_DCT_h_scaled_size = 15; cinfo->min_DCT_v_scaled_size = 15; } else { - /* Provide 1/2 scaling */ + /* Provide block_size/16 scaling */ cinfo->jpeg_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 2L); + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 16L); cinfo->jpeg_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 2L); + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 16L); cinfo->min_DCT_h_scaled_size = 16; cinfo->min_DCT_v_scaled_size = 16; } @@ -193,25 +208,11 @@ jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo) LOCAL(void) jpeg_calc_trans_dimensions (j_compress_ptr cinfo) { - if (cinfo->min_DCT_h_scaled_size < 1 || cinfo->min_DCT_h_scaled_size > 16 - || cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size) + if (cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size) ERREXIT2(cinfo, JERR_BAD_DCTSIZE, cinfo->min_DCT_h_scaled_size, cinfo->min_DCT_v_scaled_size); cinfo->block_size = cinfo->min_DCT_h_scaled_size; - - switch (cinfo->block_size) { - case 2: cinfo->natural_order = jpeg_natural_order2; break; - case 3: cinfo->natural_order = jpeg_natural_order3; break; - case 4: cinfo->natural_order = jpeg_natural_order4; break; - case 5: cinfo->natural_order = jpeg_natural_order5; break; - case 6: cinfo->natural_order = jpeg_natural_order6; break; - case 7: cinfo->natural_order = jpeg_natural_order7; break; - default: cinfo->natural_order = jpeg_natural_order; break; - } - - cinfo->lim_Se = cinfo->block_size < DCTSIZE ? - cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1; } @@ -229,6 +230,25 @@ initial_setup (j_compress_ptr cinfo, boolean transcode_only) else jpeg_calc_jpeg_dimensions(cinfo); + /* Sanity check on block_size */ + if (cinfo->block_size < 1 || cinfo->block_size > 16) + ERREXIT2(cinfo, JERR_BAD_DCTSIZE, cinfo->block_size, cinfo->block_size); + + /* Derive natural_order from block_size */ + switch (cinfo->block_size) { + case 2: cinfo->natural_order = jpeg_natural_order2; break; + case 3: cinfo->natural_order = jpeg_natural_order3; break; + case 4: cinfo->natural_order = jpeg_natural_order4; break; + case 5: cinfo->natural_order = jpeg_natural_order5; break; + case 6: cinfo->natural_order = jpeg_natural_order6; break; + case 7: cinfo->natural_order = jpeg_natural_order7; break; + default: cinfo->natural_order = jpeg_natural_order; break; + } + + /* Derive lim_Se from block_size */ + cinfo->lim_Se = cinfo->block_size < DCTSIZE ? + cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1; + /* Sanity check on image dimensions */ if (cinfo->jpeg_height <= 0 || cinfo->jpeg_width <= 0 || cinfo->num_components <= 0 || cinfo->input_components <= 0) diff --git a/dll/3rdparty/libpng/CMakeLists.txt b/dll/3rdparty/libpng/CMakeLists.txt index a3704f37418..199e59a1d9e 100644 --- a/dll/3rdparty/libpng/CMakeLists.txt +++ b/dll/3rdparty/libpng/CMakeLists.txt @@ -3,8 +3,7 @@ add_definitions( -DWIN32 -DNDEBUG -D_WINDOWS - -DPNG_BUILD_DLL - -D_DLL -D__USE_CRTIMP) + -DPNG_BUILD_DLL) include_directories( ${REACTOS_SOURCE_DIR}/include/reactos/libs/libpng @@ -29,11 +28,7 @@ add_library(libpng SHARED pngwutil.c) set_entrypoint(libpng 0) - -target_link_libraries(libpng mingw_common zlib) - +target_link_libraries(libpng zlib) add_importlibs(libpng msvcrt kernel32) - add_dependencies(libpng psdk) - add_cd_file(TARGET libpng DESTINATION reactos/system32 FOR all) diff --git a/dll/3rdparty/libpng/docs/ANNOUNCE b/dll/3rdparty/libpng/docs/ANNOUNCE index 5f6c7c2c871..0659ae39d24 100644 --- a/dll/3rdparty/libpng/docs/ANNOUNCE +++ b/dll/3rdparty/libpng/docs/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.4.3 - June 26, 2010 +Libpng 1.5.2 - March 31, 2011 This is a public release of libpng, intended for use in production codes. @@ -8,32 +8,55 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - libpng-1.4.3.tar.xz (LZMA-compressed, recommended) - libpng-1.4.3.tar.gz - libpng-1.4.3.tar.bz2 + libpng-1.5.2.tar.xz (LZMA-compressed, recommended) + libpng-1.5.2.tar.gz + libpng-1.5.2.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lpng143.zip - lpng143.7z + lpng152.7z (LZMA-compressed, recommended) + lpng152.zip Other information: - libpng-1.4.3-README.txt - libpng-1.4.3-LICENSE.txt + libpng-1.5.2-README.txt + libpng-1.5.2-LICENSE.txt -Changes since the last public release (1.4.2): - Added missing quotation marks in the aix block of configure.ac - The new "vstudio" project was missing from the zip and 7z distributions. - Rewrote png_process_IDAT_data to consistently treat extra data as warnings - and handle end conditions more cleanly. - Removed the now-redundant check for out-of-bounds new_row from example.c - Changed char *msg to PNG_CONST char *msg in pngrutil.c - Stop memory leak when reading a malformed sCAL chunk. +Changes since the last public release (1.5.2): -Send comments/corrections/commendations to glennrp at users.sourceforge.net -or to png-mng-implement at lists.sf.net (subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement). + More -Wshadow fixes for older gcc compilers. Older gcc versions apparently + check formal parameters names in function declarations (as well as + definitions) to see if they match a name in the global namespace. + Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the + old VisualC++ preprocessor. + Turned on interlace handling in png_read_png(). + Fixed gcc pendantic warnings. + Handle longjmp in Cygwin. + Fixed png_get_current_row_number() in the interlaced case. + Cleaned up ALPHA flags and transformations. + Implemented expansion to 16 bits. + Fixed mistake in the descriptions of user read_transform and write_transform + function prototypes in the manual. The row_info struct is png_row_infop. + Corrected png_get_current_row_number documentation + Fixed the read/write row callback documentation. + This documents the current behavior, where the callback is called after + every row with information pertaining to the next row. + Fixed scripts/makefile.vcwin32 + Updated contrib/pngsuite/README to add the word "modify". + Define PNG_ALLOCATED and other attributes to blank when _MSC_VER<1300. + ifdef out mask arrays in pngread.c when interlacing is not supported. + Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak + and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip" + from the makefiles. + Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail + to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill) + Don't include standard header files in png.h while building the symbol table, + to avoid cpp failure on SunOS (introduced PNG_BUILDING_SYMBOL_TABLE macro). + +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) or to glennrp at users.sourceforge.net Glenn R-P diff --git a/dll/3rdparty/libpng/docs/CHANGES b/dll/3rdparty/libpng/docs/CHANGES index 0dff4892299..fb069121a45 100644 --- a/dll/3rdparty/libpng/docs/CHANGES +++ b/dll/3rdparty/libpng/docs/CHANGES @@ -2,11 +2,11 @@ libpng_changes(){ /* CHANGES - changes for libpng -version 0.2 +Version 0.2 added reader into png.h fixed small problems in stub file -version 0.3 +Version 0.3 added pull reader split up pngwrite.c to several files added pnglib.txt @@ -17,7 +17,7 @@ version 0.3 added K&R support added check for 64 KB blocks for 16 bit machines -version 0.4 +Version 0.4 cleaned up code and commented code simplified time handling into png_time created png_color_16 and png_color_8 to handle color needs @@ -28,28 +28,28 @@ version 0.4 cleaned up zTXt reader and writer (using zlib's Reset functions) split transformations into pngrtran.c and pngwtran.c -version 0.5 +Version 0.5 interfaced with zlib 0.8 fixed many reading and writing bugs saved using 3 spaces instead of tabs -version 0.6 +Version 0.6 added png_large_malloc() and png_large_free() added png_size_t cleaned up some compiler warnings added png_start_read_image() -version 0.7 +Version 0.7 cleaned up lots of bugs finished dithering and other stuff added test program changed name from pnglib to libpng -version 0.71 [June, 1995] +Version 0.71 [June, 1995] changed pngtest.png for zlib 0.93 fixed error in libpng.txt and example.c -version 0.8 +Version 0.8 cleaned up some bugs added png_set_filler() split up pngstub.c into pngmem.c, pngio.c, and pngerror.c @@ -63,191 +63,194 @@ version 0.8 changed external functions passing floats to doubles (k&r problems?) put all the configurable stuff in pngconf.h enabled png_set_shift to work with paletted images on read - added png_read_update_info() - updates info structure with - transformations + added png_read_update_info() - updates info structure with transformations -version 0.81 [August, 1995] +Version 0.81 [August, 1995] incorporated Tim Wegner's medium model code (thanks, Tim) -version 0.82 [September, 1995] +Version 0.82 [September, 1995] [unspecified changes] -version 0.85 [December, 1995] +Version 0.85 [December, 1995] added more medium model code (almost everything's a far) added i/o, error, and memory callback functions fixed some bugs (16 bit, 4 bit interlaced, etc.) added first run progressive reader (barely tested) -version 0.86 [January, 1996] +Version 0.86 [January, 1996] fixed bugs improved documentation -version 0.87 [January, 1996] +Version 0.87 [January, 1996] fixed medium model bugs fixed other bugs introduced in 0.85 and 0.86 added some minor documentation -version 0.88 [January, 1996] +Version 0.88 [January, 1996] fixed progressive bugs replaced tabs with spaces cleaned up documentation added callbacks for read/write and warning/error functions -version 0.89 [July, 1996] - added new initialization API to make libpng work better with shared libs - we now have png_create_read_struct(), png_create_write_struct(), - png_create_info_struct(), png_destroy_read_struct(), and - png_destroy_write_struct() instead of the separate calls to - malloc and png_read_init(), png_info_init(), and png_write_init() - changed warning/error callback functions to fix bug - this means you - should use the new initialization API if you were using the old - png_set_message_fn() calls, and that the old API no longer exists - so that people are aware that they need to change their code - changed filter selection API to allow selection of multiple filters - since it didn't work in previous versions of libpng anyways - optimized filter selection code - fixed png_set_background() to allow using an arbitrary RGB color for - paletted images - fixed gamma and background correction for paletted images, so - png_correct_palette is not needed unless you are correcting an - external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED - in pngconf.h) - if nobody uses this, it may disappear in the future. - fixed bug with Borland 64K memory allocation (Alexander Lehmann) - fixed bug in interlace handling (Smarasderagd, I think) - added more error checking for writing and image to reduce invalid files - separated read and write functions so that they won't both be linked - into a binary when only reading or writing functionality is used - new pngtest image also has interlacing and zTXt - updated documentation to reflect new API +Version 0.89 [July, 1996] + Added new initialization API to make libpng work better with shared libs + we now have png_create_read_struct(), png_create_write_struct(), + png_create_info_struct(), png_destroy_read_struct(), and + png_destroy_write_struct() instead of the separate calls to + malloc and png_read_init(), png_info_init(), and png_write_init() + Changed warning/error callback functions to fix bug - this means you + should use the new initialization API if you were using the old + png_set_message_fn() calls, and that the old API no longer exists + so that people are aware that they need to change their code + Changed filter selection API to allow selection of multiple filters + since it didn't work in previous versions of libpng anyways + Optimized filter selection code + Fixed png_set_background() to allow using an arbitrary RGB color for + paletted images + Fixed gamma and background correction for paletted images, so + png_correct_palette is not needed unless you are correcting an + external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED + in pngconf.h) - if nobody uses this, it may disappear in the future. + Fixed bug with Borland 64K memory allocation (Alexander Lehmann) + Fixed bug in interlace handling (Smarasderagd, I think) + Added more error checking for writing and image to reduce invalid files + Separated read and write functions so that they won't both be linked + into a binary when only reading or writing functionality is used + New pngtest image also has interlacing and zTXt + Updated documentation to reflect new API -version 0.90 [January, 1997] - made CRC errors/warnings on critical and ancillary chunks configurable +Version 0.90 [January, 1997] + Made CRC errors/warnings on critical and ancillary chunks configurable libpng will use the zlib CRC routines by (compile-time) default - changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner) - added external C++ wrapper statements to png.h (Gilles Dauphin) - allow PNG file to be read when some or all of file signature has already - been read from the beginning of the stream. ****This affects the size - of info_struct and invalidates all programs that use a shared libpng**** - fixed png_filler() declarations - fixed? background color conversions - fixed order of error function pointers to match documentation - current chunk name is now available in png_struct to reduce the number - of nearly identical error messages (will simplify multi-lingual - support when available) - try to get ready for unknown-chunk callback functions: - - previously read critical chunks are flagged, so the chunk handling - routines can determine if the chunk is in the right place - - all chunk handling routines have the same prototypes, so we will - be able to handle all chunks via a callback mechanism - try to fix Linux "setjmp" buffer size problems - removed png_large_malloc, png_large_free, and png_realloc functions. + Changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner) + Added external C++ wrapper statements to png.h (Gilles Dauphin) + Allow PNG file to be read when some or all of file signature has already + been read from the beginning of the stream. ****This affects the size + of info_struct and invalidates all programs that use a shared libpng**** + Fixed png_filler() declarations + Fixed? background color conversions + Fixed order of error function pointers to match documentation + Current chunk name is now available in png_struct to reduce the number + of nearly identical error messages (will simplify multi-lingual + support when available) + Try to get ready for unknown-chunk callback functions: + - previously read critical chunks are flagged, so the chunk handling + routines can determine if the chunk is in the right place + - all chunk handling routines have the same prototypes, so we will + be able to handle all chunks via a callback mechanism + Try to fix Linux "setjmp" buffer size problems + Removed png_large_malloc, png_large_free, and png_realloc functions. -version 0.95 [March, 1997] - fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never - fixed bug in PNG file signature compares when start != 0 - changed parameter type of png_set_filler(...filler...) from png_byte - to png_uint_32 - added test for MACOS to ensure that both math.h and fp.h are not #included - added macros for libpng to be compiled as a Windows DLL (Andreas Kupries) - added "packswap" transformation, which changes the endianness of - packed-pixel bytes (Kevin Bracey) - added "strip_alpha" transformation, which removes the alpha channel of - input images without using it (not necessarily a good idea) - added "swap_alpha" transformation, which puts the alpha channel in front - of the color bytes instead of after - removed all implicit variable tests which assume NULL == 0 (I think) - changed several variables to "png_size_t" to show 16/32-bit limitations - added new pCAL chunk read/write support - added experimental filter selection weighting (Greg Roelofs) - removed old png_set_rgbx() and png_set_xrgb() functions that have been +Version 0.95 [March, 1997] + Fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never + Fixed bug in PNG file signature compares when start != 0 + Changed parameter type of png_set_filler(...filler...) from png_byte + to png_uint_32 + Added test for MACOS to ensure that both math.h and fp.h are not #included + Added macros for libpng to be compiled as a Windows DLL (Andreas Kupries) + Added "packswap" transformation, which changes the endianness of + packed-pixel bytes (Kevin Bracey) + Added "strip_alpha" transformation, which removes the alpha channel of + input images without using it (not necessarily a good idea) + Added "swap_alpha" transformation, which puts the alpha channel in front + of the color bytes instead of after + Removed all implicit variable tests which assume NULL == 0 (I think) + Changed several variables to "png_size_t" to show 16/32-bit limitations + Added new pCAL chunk read/write support + Added experimental filter selection weighting (Greg Roelofs) + Removed old png_set_rgbx() and png_set_xrgb() functions that have been obsolete for about 2 years now (use png_set_filler() instead) - added macros to read 16- and 32-bit ints directly from buffer, to be - used only on those systems that support it (namely PowerPC and 680x0) - With some testing, this may become the default for MACOS/PPC systems. - only calculate CRC on data if we are going to use it - added macros for zTXt compression type PNG_zTXt_COMPRESSION_??? - added macros for simple libpng debugging output selectable at compile time - removed PNG_READ_END_MODE in progressive reader (Smarasderagd) - more description of info_struct in libpng.txt and png.h - more instructions in example.c - more chunk types tested in pngtest.c - renamed pngrcb.c to pngset.c, and all png_read_ functions to be - png_set_. We now have corresponding png_get_ - functions in pngget.c to get information in info_ptr. This isolates - the application from the internal organization of png_info_struct - (good for shared library implementations). + Added macros to read 16- and 32-bit ints directly from buffer, to be + used only on those systems that support it (namely PowerPC and 680x0) + With some testing, this may become the default for MACOS/PPC systems. + Only calculate CRC on data if we are going to use it + Added macros for zTXt compression type PNG_zTXt_COMPRESSION_??? + Added macros for simple libpng debugging output selectable at compile time + Removed PNG_READ_END_MODE in progressive reader (Smarasderagd) + More description of info_struct in libpng.txt and png.h + More instructions in example.c + More chunk types tested in pngtest.c + Renamed pngrcb.c to pngset.c, and all png_read_ functions to be + png_set_. We now have corresponding png_get_ + functions in pngget.c to get information in info_ptr. This isolates + the application from the internal organization of png_info_struct + (good for shared library implementations). -version 0.96 [May, 1997] - fixed serious bug with < 8bpp images introduced in 0.95 - fixed 256-color transparency bug (Greg Roelofs) - fixed up documentation (Greg Roelofs, Laszlo Nyul) - fixed "error" in pngconf.h for Linux setjmp() behaviour - fixed DOS medium model support (Tim Wegner) - fixed png_check_keyword() for case with error in static string text - added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul) - added typecasts to quiet compiler errors - added more debugging info +Version 0.96 [May, 1997] + Fixed serious bug with < 8bpp images introduced in 0.95 + Fixed 256-color transparency bug (Greg Roelofs) + Fixed up documentation (Greg Roelofs, Laszlo Nyul) + Fixed "error" in pngconf.h for Linux setjmp() behaviour + Fixed DOS medium model support (Tim Wegner) + Fixed png_check_keyword() for case with error in static string text + Added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul) + Added typecasts to quiet compiler errors + Added more debugging info -version 0.97 [January, 1998] - removed PNG_USE_OWN_CRC capability - relocated png_set_crc_action from pngrutil.c to pngrtran.c - fixed typecasts of "new_key", etc. (Andreas Dilger) - added RFC 1152 [sic] date support - fixed bug in gamma handling of 4-bit grayscale - added 2-bit grayscale gamma handling (Glenn R-P) - added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P) - minor corrections in libpng.txt - added simple sRGB support (Glenn R-P) - easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; - all configurable options can be selected from command-line instead - of having to edit pngconf.h (Glenn R-P) - fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) - added more conditions for png_do_background, to avoid changing - black pixels to background when a background is supplied and - no pixels are transparent - repaired PNG_NO_STDIO behaviour - tested NODIV support and made it default behaviour (Greg Roelofs) - added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler) - regularized version numbering scheme and bumped shared-library major +Version 0.97 [January, 1998] + Removed PNG_USE_OWN_CRC capability + Relocated png_set_crc_action from pngrutil.c to pngrtran.c + Fixed typecasts of "new_key", etc. (Andreas Dilger) + Added RFC 1152 [sic] date support + Fixed bug in gamma handling of 4-bit grayscale + Added 2-bit grayscale gamma handling (Glenn R-P) + Added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P) + Minor corrections in libpng.txt + Added simple sRGB support (Glenn R-P) + Easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; + all configurable options can be selected from command-line instead + of having to edit pngconf.h (Glenn R-P) + Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) + Added more conditions for png_do_background, to avoid changing + black pixels to background when a background is supplied and + no pixels are transparent + Repaired PNG_NO_STDIO behaviour + Tested NODIV support and made it default behaviour (Greg Roelofs) + Added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler) + Regularized version numbering scheme and bumped shared-library major version number to 2 to avoid problems with libpng 0.89 apps (Greg Roelofs) -version 0.98 [January, 1998] - cleaned up some typos in libpng.txt and in code documentation - fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler) - cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c - changed recommendation about file_gamma for PC images to .51 from .45, - in example.c and libpng.txt, added comments to distinguish between - screen_gamma, viewing_gamma, and display_gamma. - changed all references to RFC1152 to read RFC1123 and changed the - PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED - added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) - changed srgb_intent from png_byte to int to avoid compiler bugs +Version 0.98 [January, 1998] + Cleaned up some typos in libpng.txt and in code documentation + Fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler) + Cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c + Changed recommendation about file_gamma for PC images to .51 from .45, + in example.c and libpng.txt, added comments to distinguish between + screen_gamma, viewing_gamma, and display_gamma. + Changed all references to RFC1152 to read RFC1123 and changed the + PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED + Added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) + Changed srgb_intent from png_byte to int to avoid compiler bugs -version 0.99 [January 30, 1998] - free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) - fixed a longstanding "packswap" bug in pngtrans.c - fixed some inconsistencies in pngconf.h that prevented compiling with - PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined - fixed some typos and made other minor rearrangement of libpng.txt (Andreas) - changed recommendation about file_gamma for PC images to .50 from .51 in - example.c and libpng.txt, and changed file_gamma for sRGB images to .45 - added a number of functions to access information from the png structure - png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit) - added TARGET_MACOS similar to zlib-1.0.8 - define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined - added type casting to all png_malloc() function calls -version 0.99a [January 31, 1998] +Version 0.99 [January 30, 1998] + Free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) + Fixed a longstanding "packswap" bug in pngtrans.c + Fixed some inconsistencies in pngconf.h that prevented compiling with + PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined + Fixed some typos and made other minor rearrangement of libpng.txt (Andreas) + Changed recommendation about file_gamma for PC images to .50 from .51 in + example.c and libpng.txt, and changed file_gamma for sRGB images to .45 + Added a number of functions to access information from the png structure + png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit) + Added TARGET_MACOS similar to zlib-1.0.8 + Define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined + Added type casting to all png_malloc() function calls + +Version 0.99a [January 31, 1998] Added type casts and parentheses to all returns that return a value.(Tim W.) -version 0.99b [February 4, 1998] + +Version 0.99b [February 4, 1998] Added type cast png_uint_32 on malloc function calls where needed. Changed type of num_hist from png_uint_32 to int (same as num_palette). Added checks for rowbytes overflow, in case png_size_t is less than 32 bits. Renamed makefile.elf to makefile.lnx. -version 0.99c [February 7, 1998] + +Version 0.99c [February 7, 1998] More type casting. Removed erroneous overflow test in pngmem.c. Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes. Added UNIX manual pages libpng.3 (incorporating libpng.txt) and png.5. -version 0.99d [February 11, 1998] + +Version 0.99d [February 11, 1998] Renamed "far_to_near()" "png_far_to_near()" Revised libpng.3 Version 99c "buffered" operations didn't work as intended. Replaced them @@ -257,7 +260,8 @@ version 0.99d [February 11, 1998] Check for overlength tRNS chunk present when indexed-color PLTE is read. Cleaned up spelling errors in libpng.3/libpng.txt Corrected a problem with png_get_tRNS() which returned undefined trans array -version 0.99e [February 28, 1998] + +Version 0.99e [February 28, 1998] Corrected png_get_tRNS() again. Add parentheses for easier reading of pngget.c, fixed "||" should be "&&". Touched up example.c to make more of it compileable, although the entire @@ -267,53 +271,59 @@ version 0.99e [February 28, 1998] Replaced pngtest.png with one created with zlib 1.1.1 Changed pngtest to report PASS even when file size is different (Jean-loup G.) Corrected some logic errors in png_do_invert_alpha() (Chris Patterson) -version 0.99f [March 5, 1998] + +Version 0.99f [March 5, 1998] Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey) Moved makefiles into a "scripts" directory, and added INSTALL instruction file Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok) Added pointers to "note on libpng versions" in makefile.lnx and README Added row callback feature when reading and writing nonprogressive rows - and added a test of this feature in pngtest.c + and added a test of this feature in pngtest.c Added user transform callbacks, with test of the feature in pngtest.c -version 0.99g [March 6, 1998, morning] + +Version 0.99g [March 6, 1998, morning] Minor changes to pngtest.c to suppress compiler warnings. Removed "beta" language from documentation. -version 0.99h [March 6, 1998, evening] + +Version 0.99h [March 6, 1998, evening] Minor changes to previous minor changes to pngtest.c Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED - and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro + and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro Added user transform capability -version 1.00 [March 7, 1998] +Version 1.00 [March 7, 1998] Changed several typedefs in pngrutil.c Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik) - replaced "while(1)" with "for(;;)" - added PNGARG() to prototypes in pngtest.c and removed some prototypes - updated some of the makefiles (Tom Lane) - changed some typedefs (s_start, etc.) in pngrutil.c - fixed dimensions of "short_months" array in pngwrite.c + Replaced "while(1)" with "for(;;)" + Added PNGARG() to prototypes in pngtest.c and removed some prototypes + Updated some of the makefiles (Tom Lane) + Changed some typedefs (s_start, etc.) in pngrutil.c + Fixed dimensions of "short_months" array in pngwrite.c Replaced ansi2knr.c with the one from jpeg-v6 -version 1.0.0 [March 8, 1998] +Version 1.0.0 [March 8, 1998] Changed name from 1.00 to 1.0.0 (Adam Costello) Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert) -version 1.0.0a [March 9, 1998] + +Version 1.0.0a [March 9, 1998] Fixed three bugs in pngrtran.c to make gamma+background handling consistent - (Greg Roelofs) + (Greg Roelofs) Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz - for major, minor, and bugfix releases. This is 10001. (Adam Costello, - Tom Lane) + for major, minor, and bugfix releases. This is 10001. (Adam Costello, + Tom Lane) Make months range from 1-12 in png_convert_to_rfc1123 -version 1.0.0b [March 13, 1998] + +Version 1.0.0b [March 13, 1998] Quieted compiler complaints about two empty "for" loops in pngrutil.c Minor changes to makefile.s2x Removed #ifdef/#endif around a png_free() in pngread.c -version 1.0.1 [March 14, 1998] +Version 1.0.1 [March 14, 1998] Changed makefile.s2x to reduce security risk of using a relative pathname Fixed some typos in the documentation (Greg). Fixed a problem with value of "channels" returned by png_read_update_info() -version 1.0.1a [April 21, 1998] + +Version 1.0.1a [April 21, 1998] Optimized Paeth calculations by replacing abs() function calls with intrinsics plus other loop optimizations. Improves avg decoding speed by about 20%. Commented out i386istic "align" compiler flags in makefile.lnx. @@ -327,19 +337,24 @@ version 1.0.1a [April 21, 1998] Moved a misplaced pngrutil code block that truncates tRNS if it has more than num_palette entries -- test was done before num_palette was defined. Fixed a png_convert_to_rfc1123() bug that converts day 31 to 0 (Steve Eddins). - Changed compiler flags in makefile.wat for better optimization (Pawel Mrochen). -version 1.0.1b [May 2, 1998] + Changed compiler flags in makefile.wat for better optimization + (Pawel Mrochen). + +Version 1.0.1b [May 2, 1998] Relocated png_do_gray_to_rgb() within png_do_read_transformations() (Greg). Relocated the png_composite macros from pngrtran.c to png.h (Greg). Added makefile.sco (contributed by Mike Hopkirk). Fixed two bugs (missing definitions of "istop") introduced in libpng-1.0.1a. Fixed a bug in pngrtran.c that would set channels=5 under some circumstances. - More work on the Paeth-filtering, achieving imperceptible speedup (A Kleinert). - More work on loop optimization which may help when compiled with C++ compilers. + More work on the Paeth-filtering, achieving imperceptible speedup + (A Kleinert). + More work on loop optimization which may help when compiled with C++ + compilers. Added warnings when people try to use transforms they've defined out. Collapsed 4 "i" and "c" loops into single "i" loops in pngrtran and pngwtran. Revised paragraph about png_set_expand() in libpng.txt and libpng.3 (Greg) -version 1.0.1c [May 11, 1998] + +Version 1.0.1c [May 11, 1998] Fixed a bug in pngrtran.c (introduced in libpng-1.0.1a) where the masks for filler bytes should have been 0xff instead of 0xf. Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images. @@ -351,7 +366,8 @@ version 1.0.1c [May 11, 1998] to remove unwanted capabilities via the compile line Made some corrections to grammar (which, it's) in documentation (Greg). Corrected example.c, use of row_pointers in png_write_image(). -version 1.0.1d [May 24, 1998] + +Version 1.0.1d [May 24, 1998] Corrected several statements that used side effects illegally in pngrutil.c and pngtrans.c, that were introduced in version 1.0.1b Revised png_read_rows() to avoid repeated if-testing for NULL (A Kleinert) @@ -361,7 +377,8 @@ version 1.0.1d [May 24, 1998] Bob Dellaca, to make a png32bd.dll with Borland C++ 4.5 Fixed error in example.c with png_set_text: num_text is 3, not 2 (Guido V.) Changed several loops from count-down to count-up, for consistency. -version 1.0.1e [June 6, 1998] + +Version 1.0.1e [June 6, 1998] Revised libpng.txt and libpng.3 description of png_set_read|write_fn(), and added warnings when people try to set png_read_fn and png_write_fn in the same structure. @@ -378,9 +395,10 @@ version 1.0.1e [June 6, 1998] PNGTEST_DEBUG_MEM feature. Added makefile.w32, for Microsoft C++ 4.0 and later (Tim Wegner). -version 1.0.2 [June 14, 1998] +Version 1.0.2 [June 14, 1998] Fixed two bugs in makefile.bor . -version 1.0.2a [December 30, 1998] + +Version 1.0.2a [December 30, 1998] Replaced and extended code that was removed from png_set_filler() in 1.0.1a. Fixed a bug in png_do_filler() that made it fail to write filler bytes in the left-most pixel of each row (Kevin Bracey). @@ -402,21 +420,24 @@ version 1.0.2a [December 30, 1998] Added png_get_copyright() and png_get_header_version() functions. Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c Added information about debugging in libpng.txt and libpng.3 . - Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and makefile.sco. + Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and + makefile.sco. Removed lines after Dynamic Dependencies" in makefile.aco . Revised makefile.dec to make a shared library (Jeremie Petit). Removed trailing blanks from all files. -version 1.0.2a [January 6, 1999] + +Version 1.0.2a [January 6, 1999] Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h Added "if" tests to silence complaints about unused png_ptr in png.h and png.c Changed "check_if_png" function in example.c to return true (nonzero) if PNG. Changed libpng.txt to demonstrate png_sig_cmp() instead of png_check_sig() which is obsolete. -version 1.0.3 [January 14, 1999] +Version 1.0.3 [January 14, 1999] Added makefile.hux, for Hewlett Packard HPUX 10.20 and 11.00 (Jim Rice) Added a statement of Y2K compliance in png.h, libpng.3, and Y2KINFO. -version 1.0.3a [August 12, 1999] + +Version 1.0.3a [August 12, 1999] Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning if an attempt is made to read an interlaced image when it's not supported. Added check if png_ptr->trans is defined before freeing it in pngread.c @@ -443,13 +464,15 @@ version 1.0.3a [August 12, 1999] Correct gamma with srgb is 45455 instead of 45000 in pngrutil.c, to be consistent with PNG-1.2, and allow variance of 500 before complaining. Added assembler code contributed by Intel in file pngvcrd.c and modified - makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, Gilles Vollant) + makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, + Gilles Vollant) Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy. Added some aliases for png_set_expand() in pngrtran.c, namely png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS() (Greg Roelofs, in "PNG: The Definitive Guide"). Added makefile.beo for BEOS on X86, contributed by Sander Stok. -version 1.0.3b [August 26, 1999] + +Version 1.0.3b [August 26, 1999] Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h Changed leading blanks to tabs in all makefiles. Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code. @@ -461,12 +484,13 @@ version 1.0.3b [August 26, 1999] negative shift distance, whose results are undefined in the C language. Added a check in pngset.c to prevent writing multiple tIME chunks. Added a check in pngwrite.c to detect invalid small window_bits sizes. -version 1.0.3d [September 4, 1999] + +Version 1.0.3d [September 4, 1999] Fixed type casting of igamma in pngrutil.c Added new png_expand functions to scripts/pngdef.pas and pngos2.def Added a demo read_user_transform_fn that examines the row filters in pngtest.c -version 1.0.4 [September 24, 1999] +Version 1.0.4 [September 24, 1999] Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h Made several minor corrections to pngtest.c @@ -480,24 +504,30 @@ version 1.0.4 [September 24, 1999] assembler code) and makefile.vcwin32 (doesn't). Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING) Added a copy of pngnow.png to the distribution. -version 1.0.4a [September 25, 1999] + +Version 1.0.4a [September 25, 1999] Increase max_pixel_depth in pngrutil.c if a user transform needs it. Changed several division operations to right-shifts in pngvcrd.c -version 1.0.4b [September 30, 1999] + +Version 1.0.4b [September 30, 1999] Added parentheses in line 3732 of pngvcrd.c Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1 -version 1.0.4c [October 1, 1999] + +Version 1.0.4c [October 1, 1999] Added a "png_check_version" function in png.c and pngtest.c that will generate a helpful compiler error if an old png.h is found in the search path. Changed type of png_user_transform_depth|channels from int to png_byte. -version 1.0.4d [October 6, 1999] + +Version 1.0.4d [October 6, 1999] Changed 0.45 to 0.45455 in png_set_sRGB() Removed unused PLTE entries from pngnow.png Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly. -version 1.0.4e [October 10, 1999] + +Version 1.0.4e [October 10, 1999] Fixed sign error in pngvcrd.c (Greg Roelofs) Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P) -version 1.0.4f [October 15, 1999] + +Version 1.0.4f [October 15, 1999] Surrounded example.c code with #if 0 .. #endif to prevent people from inadvertently trying to compile it. Changed png_get_header_version() from a function to a macro in png.h @@ -505,9 +535,10 @@ version 1.0.4f [October 15, 1999] Removed some pointless "ptr = NULL" in pngmem.c Added a "contrib" directory containing the source code from Greg's book. -version 1.0.5 [October 15, 1999] +Version 1.0.5 [October 15, 1999] Minor editing of the INSTALL and README files. -version 1.0.5a [October 23, 1999] + +Version 1.0.5a [October 23, 1999] Added contrib/pngsuite and contrib/pngminus (Willem van Schaik) Fixed a typo in the png_set_sRGB() function call in example.c (Jan Nijtmans) Further optimization and bugfix of pngvcrd.c @@ -515,14 +546,16 @@ version 1.0.5a [October 23, 1999] text_ptr structure. Instead, it makes its own copy. Created separate write_end_info_struct in pngtest.c for a more severe test. Added code in pngwrite.c to free info_ptr->text[i].key to stop a memory leak. -version 1.0.5b [November 23, 1999] + +Version 1.0.5b [November 23, 1999] Moved PNG_FLAG_HAVE_CHUNK_HEADER, PNG_FLAG_BACKGROUND_IS_GRAY and PNG_FLAG_WROTE_tIME from flags to mode. Added png_write_info_before_PLTE() function. Fixed some typecasting in contrib/gregbook/*.c Updated scripts/makevms.com and added makevms.com to contrib/gregbook and contrib/pngminus (Martin Zinser) -version 1.0.5c [November 26, 1999] + +Version 1.0.5c [November 26, 1999] Moved png_get_header_version from png.h to png.c, to accommodate ansi2knr. Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to accommodate making DLL's: Moved usr_png_ver from global variable to function @@ -535,7 +568,8 @@ version 1.0.5c [November 26, 1999] Removed some extraneous "-I" from contrib/pngminus/makefile.std Changed the PNG_sRGB_INTENT macros in png.h to be consistent with PNG-1.2. Change PNG_SRGB_INTENT to PNG_sRGB_INTENT in libpng.txt and libpng.3 -version 1.0.5d [November 29, 1999] + +Version 1.0.5d [November 29, 1999] Add type cast (png_const_charp) two places in png.c Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays. Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available @@ -543,7 +577,8 @@ version 1.0.5d [November 29, 1999] comment out (with #ifdef) all the new declarations when PNG_USE_GLOBAL_ARRAYS is defined. Added PNG_EXPORT_VAR macro to accommodate making DLL's. -version 1.0.5e [November 30, 1999] + +Version 1.0.5e [November 30, 1999] Added iCCP, iTXt, and sPLT support; added "lang" member to the png_text structure; refactored the inflate/deflate support to make adding new chunks with trailing compressed parts easier in the future, and added new functions @@ -564,18 +599,21 @@ version 1.0.5e [November 30, 1999] PNG_cHNK_SUPPORTED and combined the three types of PNG_text_SUPPORTED macros, leaving the separate macros also available. Removed comments on #endifs at the end of many short, non-nested #if-blocks. -version 1.0.5f [December 6, 1999] + +Version 1.0.5f [December 6, 1999] Changed makefile.solaris to issue a warning about potential problems when the ucb "ld" is in the path ahead of the ccs "ld". Removed "- [date]" from the "synopsis" line in libpng.3 and libpngpf.3. Added sCAL chunk support (Eric S. Raymond). -version 1.0.5g [December 7, 1999] + +Version 1.0.5g [December 7, 1999] Fixed "png_free_spallettes" typo in png.h Added code to handle new chunks in pngpread.c Moved PNG_CHNK string macro definitions outside of PNG_NO_EXTERN block Added "translated_key" to png_text structure and png_write_iTXt(). Added code in pngwrite.c to work around a newly discovered zlib bug. -version 1.0.5h [December 10, 1999] + +Version 1.0.5h [December 10, 1999] NOTE: regarding the note for version 1.0.5e, the following must also be included in your code: png_text[i].translated_key = NULL; @@ -583,7 +621,8 @@ version 1.0.5h [December 10, 1999] Option to eliminate all floating point support was added. Some new fixed-point functions such as png_set_gAMA_fixed() were added. Expanded tabs and removed trailing blanks in source files. -version 1.0.5i [December 13, 1999] + +Version 1.0.5i [December 13, 1999] Added some type casts to silence compiler warnings. Renamed "png_free_spalette" to "png_free_spalettes" for consistency. Removed leading blanks from a #define in pngvcrd.c @@ -595,7 +634,8 @@ version 1.0.5i [December 13, 1999] Added png_free_hIST() function. Various patches to fix bugs in the sCAL and integer cHRM processing, and to add some convenience macros for use with sCAL. -version 1.0.5j [December 21, 1999] + +Version 1.0.5j [December 21, 1999] Changed "unit" parameter of png_write_sCAL from png_byte to int, to work around buggy compilers. Added new type "png_fixed_point" for integers that hold float*100000 values @@ -611,7 +651,8 @@ version 1.0.5j [December 21, 1999] and to write the iTXt chunk after IDAT if it appears in the end_ptr. Added pnggccrd.c, version of pngvcrd.c Intel assembler for gcc (Greg Roelofs) Reversed the order of trying to write floating-point and fixed-point gAMA. -version 1.0.5k [December 27, 1999] + +Version 1.0.5k [December 27, 1999] Added many parentheses, e.g., "if (a && b & c)" becomes "if (a && (b & c))" Added png_handle_as_unknown() function (Glenn) Added png_free_chunk_list() function and chunk_list and num_chunk_list members @@ -622,33 +663,41 @@ version 1.0.5k [December 27, 1999] Added png_free_tRNS(); png_set_tRNS() now malloc's its own trans array (ESR). Define png_get_int_32 when oFFs chunk is supported as well as when pCAL is. Changed type of proflen from png_int_32 to png_uint_32 in png_get_iCCP(). -version 1.0.5l [January 1, 2000] + +Version 1.0.5l [January 1, 2000] Added functions png_set_read_user_chunk_fn() and png_get_user_chunk_ptr() for setting a callback function to handle unknown chunks and for retrieving the associated user pointer (Glenn). -version 1.0.5m [January 7, 2000] + +Version 1.0.5m [January 7, 2000] Added high-level functions png_read_png(), png_write_png(), png_free_pixels(). -version 1.0.5n [January 9, 2000] + +Version 1.0.5n [January 9, 2000] Added png_free_PLTE() function, and modified png_set_PLTE() to malloc its own memory for info_ptr->palette. This makes it safe for the calling application to free its copy of the palette any time after it calls png_set_PLTE(). -version 1.0.5o [January 20, 2000] + +Version 1.0.5o [January 20, 2000] Cosmetic changes only (removed some trailing blanks and TABs) -version 1.0.5p [January 31, 2000] + +Version 1.0.5p [January 31, 2000] Renamed pngdll.mak to makefile.bd32 Cosmetic changes in pngtest.c -version 1.0.5q [February 5, 2000] + +Version 1.0.5q [February 5, 2000] Relocated the makefile.solaris warning about PATH problems. Fixed pngvcrd.c bug by pushing/popping registers in mmxsupport (Bruce Oberg) Revised makefile.gcmmx Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros -version 1.0.5r [February 7, 2000] + +Version 1.0.5r [February 7, 2000] Removed superfluous prototype for png_get_itxt from png.h Fixed a bug in pngrtran.c that improperly expanded the background color. Return *num_text=0 from png_get_text() when appropriate, and fix documentation of png_get_text() in libpng.txt/libpng.3. -version 1.0.5s [February 18, 2000] + +Version 1.0.5s [February 18, 2000] Added "png_jmp_env()" macro to pngconf.h, to help people migrate to the new error handler that's planned for the next libpng release, and changed example.c, pngtest.c, and contrib programs to use this macro. @@ -667,7 +716,8 @@ version 1.0.5s [February 18, 2000] Added png_set_rows() and png_get_rows(), for use with png_read|write_png(). Modified png_read_png() to allocate info_ptr->row_pointers only if it hasn't already been allocated. -version 1.0.5t [March 4, 2000] + +Version 1.0.5t [March 4, 2000] Changed png_jmp_env() migration aiding macro to png_jmpbuf(). Fixed "interlace" typo (should be "interlaced") in contrib/gregbook/read2-x.c Fixed bug with use of PNG_BEFORE_IHDR bit in png_ptr->mode, introduced when @@ -676,13 +726,15 @@ version 1.0.5t [March 4, 2000] a 24-bit visual if one is available, and to allow abbreviated options. Files in contrib/pngminus were revised to use the png_jmpbuf() macro. Removed spaces in makefile.linux and makefile.gcmmx, introduced in 1.0.5s -version 1.0.5u [March 5, 2000] + +Version 1.0.5u [March 5, 2000] Simplified the code that detects old png.h in png.c and pngtest.c Renamed png_spalette (_p, _pp) to png_sPLT_t (_tp, _tpp) Increased precision of rgb_to_gray calculations from 8 to 15 bits and added png_set_rgb_to_gray_fixed() function. Added makefile.bc32 (32-bit Borland C++, C mode) -version 1.0.5v [March 11, 2000] + +Version 1.0.5v [March 11, 2000] Added some parentheses to the png_jmpbuf macro definition. Updated references to the zlib home page, which has moved to freesoftware.com. Corrected bugs in documentation regarding png_read_row() and png_write_row(). @@ -690,10 +742,11 @@ version 1.0.5v [March 11, 2000] Renamed makefile.borland,turboc3 back to makefile.bor,tc3 as in version 1.0.3, revised borland makefiles; added makefile.ibmvac3 and makefile.gcc (Cosmin) -version 1.0.6 [March 20, 2000] +Version 1.0.6 [March 20, 2000] Minor revisions of makefile.bor, libpng.txt, and gregbook/rpng2-win.c Added makefile.sggcc (SGI IRIX with gcc) -version 1.0.6d [April 7, 2000] + +Version 1.0.6d [April 7, 2000] Changed sprintf() to strcpy() in png_write_sCAL_s() to work without STDIO Added data_length parameter to png_decompress_chunk() function Revised documentation to remove reference to abandoned png_free_chnk functions @@ -702,7 +755,8 @@ version 1.0.6d [April 7, 2000] Renamed makefile.ibmvac3 to makefile.ibmc, added libpng.icc IBM project file Added a check for info_ptr->free_me&PNG_FREE_TEXT when freeing text in png.c Simplify png_sig_bytes() function to remove use of non-ISO-C strdup(). -version 1.0.6e [April 9, 2000] + +Version 1.0.6e [April 9, 2000] Added png_data_freer() function. In the code that checks for over-length tRNS chunks, added check of info_ptr->num_trans as well as png_ptr->num_trans (Matthias Benckmann) @@ -713,25 +767,29 @@ version 1.0.6e [April 9, 2000] is defined. Changed several instances of PNG_NO_CONSOLE_ID to PNG_NO_STDIO in pngrutil.c and mentioned the purposes of the two macros in libpng.txt/libpng.3. -version 1.0.6f [April 14, 2000] + +Version 1.0.6f [April 14, 2000] Revised png_set_iCCP() and png_set_rows() to avoid prematurely freeing data. Add checks in png_set_text() for NULL members of the input text structure. Revised libpng.txt/libpng.3. - Removed superfluous prototype for png_set_itxt from png.h + Removed superfluous prototype for png_set_iTXt from png.h Removed "else" from pngread.c, after png_error(), and changed "0" to "length". Changed several png_errors about malformed ancillary chunks to png_warnings. -version 1.0.6g [April 24, 2000] + +Version 1.0.6g [April 24, 2000] Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined. Relocated paragraph about png_set_background() in libpng.3/libpng.txt and other revisions (Matthias Benckmann) Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and png_ptr members to restore binary compatibility with libpng-1.0.5 (breaks compatibility with libpng-1.0.6). -version 1.0.6h [April 24, 2000] + +Version 1.0.6h [April 24, 2000] Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h) This is a temporary change for test purposes. -version 1.0.6i [May 2, 2000] + +Version 1.0.6i [May 2, 2000] Rearranged some members at the end of png_info and png_struct, to put unknown_chunks_num and free_me within the original size of the png_structs and free_me, png_read_user_fn, and png_free_fn within the original png_info, @@ -756,11 +814,13 @@ version 1.0.6i [May 2, 2000] generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED was not defined. Added makefile.intel and updated makefile.watcom (Pawel Mrochen) -version 1.0.6j [May 3, 2000] + +Version 1.0.6j [May 3, 2000] Overloaded png_read_init() and png_write_init() with macros that convert calls to png_read_init_2() or png_write_init_2() that check the version and structure sizes. -version 1.0.7beta11 [May 7, 2000] + +Version 1.0.7beta11 [May 7, 2000] Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes which are no longer used. Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is @@ -771,7 +831,8 @@ version 1.0.7beta11 [May 7, 2000] Added PNGAPI macro, and added it to the definitions of all exported functions. Relocated version macro definitions ahead of the includes of zlib.h and pngconf.h in png.h. -version 1.0.7beta12 [May 12, 2000] + +Version 1.0.7beta12 [May 12, 2000] Revised pngset.c to avoid a problem with expanding the png_debug macro. Deleted some extraneous defines from pngconf.h Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined. @@ -779,7 +840,8 @@ version 1.0.7beta12 [May 12, 2000] Added png_access_version_number() function. Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data(). Expanded libpng.3/libpng.txt information about png_data_freer(). -version 1.0.7beta14 [May 17, 2000] (beta13 was not published) + +Version 1.0.7beta14 [May 17, 2000] (beta13 was not published) Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as warnings instead of errors, as pngrutil.c does. Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png() @@ -791,7 +853,8 @@ version 1.0.7beta14 [May 17, 2000] (beta13 was not published) Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5. Added png_set_invalid() function. Fixed incorrect illustrations of png_destroy_write_struct() in example.c. -version 1.0.7beta15 [May 30, 2000] + +Version 1.0.7beta15 [May 30, 2000] Revised the deliberately erroneous Linux setjmp code in pngconf.h to produce fewer error messages. Rearranged checks for Z_OK to check the most likely path first in pngpread.c @@ -803,9 +866,11 @@ version 1.0.7beta15 [May 30, 2000] Fixed some bugs in the unused PNG_INCH_CONVERSIONS functions in pngget.c Set each pointer to NULL after freeing it in png_free_data(). Worked around a problem in pngconf.h; AIX's strings.h defines an "index" - macro that conflicts with libpng's png_color_16.index. (Dimitri Papadapoulos) + macro that conflicts with libpng's png_color_16.index. (Dimitri + Papadapoulos) Added "msvc" directory with MSVC++ project files (Simon-Pierre Cadieux). -version 1.0.7beta16 [June 4, 2000] + +Version 1.0.7beta16 [June 4, 2000] Revised the workaround of AIX string.h "index" bug. Added a check for overlength PLTE chunk in pngrutil.c. Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer @@ -815,23 +880,27 @@ version 1.0.7beta16 [June 4, 2000] Added PNG_USE_DLL macro. Revised the copyright/disclaimer/license notice. Added contrib/msvctest directory -version 1.0.7rc1 [June 9, 2000] + +Version 1.0.7rc1 [June 9, 2000] Corrected the definition of PNG_TRANSFORM_INVERT_ALPHA (0x0400 not 0x0200) Added contrib/visupng directory (Willem van Schaik) -version 1.0.7beta18 [June 23, 2000] + +Version 1.0.7beta18 [June 23, 2000] Revised PNGAPI definition, and pngvcrd.c to work with __GCC__ and do not redefine PNGAPI if it is passed in via a compiler directive. Revised visupng/PngFile.c to remove returns from within the Try block. Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros. Updated contrib/visupng/cexcept.h to version 1.0.0. Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks. -version 1.0.7rc2 [June 28, 2000] + +Version 1.0.7rc2 [June 28, 2000] Updated license to include disclaimers required by UCITA. Fixed "DJBPP" typo in pnggccrd.c introduced in beta18. -version 1.0.7 [July 1, 2000] +Version 1.0.7 [July 1, 2000] Revised the definition of "trans_values" in libpng.3/libpng.txt -version 1.0.8beta1 [July 8, 2000] + +Version 1.0.8beta1 [July 8, 2000] Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks. Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and pngwutil.c. @@ -839,25 +908,30 @@ version 1.0.8beta1 [July 8, 2000] Removed unused "#include " from png.c Added WindowsCE support. Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment. -version 1.0.8beta2 [July 10, 2000] + +Version 1.0.8beta2 [July 10, 2000] Added project files to the wince directory and made further revisions of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE. -version 1.0.8beta3 [July 11, 2000] + +Version 1.0.8beta3 [July 11, 2000] Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS() for indexed-color input files to avoid potential double-freeing trans array under some unusual conditions; problem was introduced in version 1.0.6f. Further revisions to pngtest.c and files in the wince subdirectory. -version 1.0.8beta4 [July 14, 2000] + +Version 1.0.8beta4 [July 14, 2000] Added the files pngbar.png and pngbar.jpg to the distribution. Added makefile.cygwin, and cygwin support in pngconf.h Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory) -version 1.0.8rc1 [July 16, 2000] + +Version 1.0.8rc1 [July 16, 2000] Revised png_debug() macros and statements to eliminate compiler warnings. -version 1.0.8 [July 24, 2000] +Version 1.0.8 [July 24, 2000] Added png_flush() in pngwrite.c, after png_write_IEND(). Updated makefile.hpux to build a shared library. -version 1.0.9beta1 [November 10, 2000] + +Version 1.0.9beta1 [November 10, 2000] Fixed typo in scripts/makefile.hpux Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser) Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser) @@ -876,59 +950,72 @@ version 1.0.9beta1 [November 10, 2000] Revised makefile.cygwin Fixed bugs in iCCP support in pngrutil.c and pngwutil.c. Replaced png_set_empty_plte_permitted() with png_permit_mng_features(). -version 1.0.9beta2 [November 19, 2000] + +Version 1.0.9beta2 [November 19, 2000] Renamed the "dll" subdirectory "projects". Added borland project files to "projects" subdirectory. Set VS_FF_PRERELEASE and VS_FF_PATCHED flags in msvc/png.rc when appropriate. Add error message in png_set_compression_buffer_size() when malloc fails. -version 1.0.9beta3 [November 23, 2000] + +Version 1.0.9beta3 [November 23, 2000] Revised PNG_LIBPNG_BUILD_TYPE macro in png.h, used in the msvc project. Removed the png_flush() in pngwrite.c that crashes some applications that don't set png_output_flush_fn. Added makefile.macosx and makefile.aix to scripts directory. -version 1.0.9beta4 [December 1, 2000] + +Version 1.0.9beta4 [December 1, 2000] Change png_chunk_warning to png_warning in png_check_keyword(). Increased the first part of msg buffer from 16 to 18 in png_chunk_error(). -version 1.0.9beta5 [December 15, 2000] + +Version 1.0.9beta5 [December 15, 2000] Added support for filter method 64 (for PNG datastreams embedded in MNG). -version 1.0.9beta6 [December 18, 2000] + +Version 1.0.9beta6 [December 18, 2000] Revised png_set_filter() to accept filter method 64 when appropriate. Added new PNG_HAVE_PNG_SIGNATURE bit to png_ptr->mode and use it to help prevent applications from using MNG features in PNG datastreams. Added png_permit_mng_features() function. Revised libpng.3/libpng.txt. Changed "filter type" to "filter method". -version 1.0.9rc1 [December 23, 2000] + +Version 1.0.9rc1 [December 23, 2000] Revised test for PNG_HAVE_PNG_SIGNATURE in pngrutil.c Fixed error handling of unknown compression type in png_decompress_chunk(). In pngconf.h, define __cdecl when _MSC_VER is defined. -version 1.0.9beta7 [December 28, 2000] + +Version 1.0.9beta7 [December 28, 2000] Changed PNG_TEXT_COMPRESSION_zTXt to PNG_COMPRESSION_TYPE_BASE several places. Revised memory management in png_set_hIST and png_handle_hIST in a backward compatible manner. PLTE and tRNS were revised similarly. Revised the iCCP chunk reader to ignore trailing garbage. -version 1.0.9beta8 [January 12, 2001] + +Version 1.0.9beta8 [January 12, 2001] Moved pngasmrd.h into pngconf.h. Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop. -version 1.0.9beta9 [January 15, 2001] + +Version 1.0.9beta9 [January 15, 2001] Added png_set_invalid, png_permit_mng_features, and png_mmx_supported to wince and msvc project module definition files. Minor revision of makefile.cygwin. Fixed bug with progressive reading of narrow interlaced images in pngpread.c -version 1.0.9beta10 [January 16, 2001] + +Version 1.0.9beta10 [January 16, 2001] Do not typedef png_FILE_p in pngconf.h when PNG_NO_STDIO is defined. Fixed "png_mmx_supported" typo in project definition files. -version 1.0.9beta11 [January 19, 2001] + +Version 1.0.9beta11 [January 19, 2001] Updated makefile.sgi to make shared library. Removed png_mmx_support() function and disabled PNG_MNG_FEATURES_SUPPORTED by default, for the benefit of DLL forward compatibility. These will be re-enabled in version 1.2.0. -version 1.0.9rc2 [January 22, 2001] + +Version 1.0.9rc2 [January 22, 2001] Revised cygwin support. -version 1.0.9 [January 31, 2001] +Version 1.0.9 [January 31, 2001] Added check of cygwin's ALL_STATIC in pngconf.h Added "-nommx" parameter to contrib/gregbook/rpng2-win and rpng2-x demos. -version 1.0.10beta1 [March 14, 2001] + +Version 1.0.10beta1 [March 14, 2001] Revised makefile.dec, makefile.sgi, and makefile.sggcc; added makefile.hpgcc. Reformatted libpng.3 to eliminate bad line breaks. Added checks for _mmx_supported in the read_filter_row function of pnggccrd.c @@ -941,33 +1028,39 @@ version 1.0.10beta1 [March 14, 2001] Fixed bugs in png_combine_row() in pnggccrd.c and pngvcrd.c (C version) Added warnings when retrieving or setting gamma=0. Increased the first part of msg buffer from 16 to 18 in png_chunk_warning(). -version 1.0.10rc1 [March 23, 2001] + +Version 1.0.10rc1 [March 23, 2001] Changed all instances of memcpy, strcpy, and strlen to png_memcpy, png_strcpy, and png_strlen. Revised png_mmx_supported() function in pnggccrd.c to return proper value. Fixed bug in progressive reading (pngpread.c) with small images (height < 8). -version 1.0.10 [March 30, 2001] +Version 1.0.10 [March 30, 2001] Deleted extraneous space (introduced in 1.0.9) from line 42 of makefile.cygwin Added beos project files (Chris Herborth) -version 1.0.11beta1 [April 3, 2001] + +Version 1.0.11beta1 [April 3, 2001] Added type casts on several png_malloc() calls (Dimitri Papadapoulos). Removed a no-longer needed AIX work-around from pngconf.h Changed several "//" single-line comments to C-style in pnggccrd.c -version 1.0.11beta2 [April 11, 2001] + +Version 1.0.11beta2 [April 11, 2001] Removed PNGAPI from several functions whose prototypes did not have PNGAPI. Updated scripts/pngos2.def -version 1.0.11beta3 [April 14, 2001] + +Version 1.0.11beta3 [April 14, 2001] Added checking the results of many instances of png_malloc() for NULL -version 1.0.11beta4 [April 20, 2001] + +Version 1.0.11beta4 [April 20, 2001] Undid the changes from version 1.0.11beta3. Added a check for NULL return from user's malloc_fn(). Removed some useless type casts of the NULL pointer. Added makefile.netbsd -version 1.0.11 [April 27, 2001] +Version 1.0.11 [April 27, 2001] Revised makefile.netbsd -version 1.0.12beta1 [May 14, 2001] + +Version 1.0.12beta1 [May 14, 2001] Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot) Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings. @@ -975,21 +1068,25 @@ version 1.0.12beta1 [May 14, 2001] libpng will reallocate the png_struct and info_struct if they are too small. This retains future binary compatibility for old applications written for libpng-0.88 and earlier. -version 1.2.0beta1 [May 6, 2001] + +Version 1.2.0beta1 [May 6, 2001] Bumped DLLNUM to 2. Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED by default. Added runtime selection of MMX features. Added png_set_strip_error_numbers function and related macros. -version 1.2.0beta2 [May 7, 2001] + +Version 1.2.0beta2 [May 7, 2001] Finished merging 1.2.0beta1 with version 1.0.11 Added a check for attempts to read or write PLTE in grayscale PNG datastreams. -version 1.2.0beta3 [May 17, 2001] + +Version 1.2.0beta3 [May 17, 2001] Enabled user memory function by default. Modified png_create_struct so it passes user mem_ptr to user memory allocator. Increased png_mng_features flag from png_byte to png_uint_32. Bumped shared-library (so-number) and dll-number to 3. -version 1.2.0beta4 [June 23, 2001] + +Version 1.2.0beta4 [June 23, 2001] Check for missing profile length field in iCCP chunk and free chunk_data in case of truncated iCCP chunk. Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc @@ -1003,7 +1100,8 @@ version 1.2.0beta4 [June 23, 2001] of png_write_oFFS width and height from png_uint_32 to png_int_32. Updated example.c Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c -version 1.2.0beta5 [August 8, 2001] + +Version 1.2.0beta5 [August 8, 2001] Revised contrib/gregbook Revised makefile.gcmmx Revised pnggccrd.c to conditionally compile some thread-unsafe code only @@ -1014,27 +1112,32 @@ version 1.2.0beta5 [August 8, 2001] Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c Removed restriction that do_invert_mono only operate on 1-bit opaque files -version 1.2.0 [September 1, 2001] +Version 1.2.0 [September 1, 2001] Changed a png_warning() to png_debug() in pnggccrd.c Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC(). -version 1.2.1beta1 [October 19, 2001] + +Version 1.2.1beta1 [October 19, 2001] Revised makefile.std in contrib/pngminus Include background_1 in png_struct regardless of gamma support. Revised makefile.netbsd and makefile.macosx, added makefile.darwin. Revised example.c to provide more details about using row_callback(). -version 1.2.1beta2 [October 25, 2001] + +Version 1.2.1beta2 [October 25, 2001] Added type cast to each NULL appearing in a function call, except for WINCE functions. Added makefile.so9. -version 1.2.1beta3 [October 27, 2001] + +Version 1.2.1beta3 [October 27, 2001] Removed type casts from all NULLs. Simplified png_create_struct_2(). -version 1.2.1beta4 [November 7, 2001] + +Version 1.2.1beta4 [November 7, 2001] Revised png_create_info_struct() and png_creat_struct_2(). Added error message if png_write_info() was omitted. Type cast NULLs appearing in function calls when _NO_PROTO or PNG_TYPECAST_NULL is defined. -version 1.2.1rc1 [November 24, 2001] + +Version 1.2.1rc1 [November 24, 2001] Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL is defined. Changed typecast of "size" argument to png_size_t in pngmem.c calls to @@ -1043,14 +1146,16 @@ version 1.2.1rc1 [November 24, 2001] Updated makefile.sgi to recognize LIBPATH and INCPATH. Updated various makefiles so "make clean" does not remove previous major version of the shared library. -version 1.2.1rc2 [December 4, 2001] + +Version 1.2.1rc2 [December 4, 2001] Always allocate 256-entry internal palette, hist, and trans arrays, to avoid out-of-bounds memory reference caused by invalid PNG datastreams. Added a check for prefix_length > data_length in iCCP chunk handler. -version 1.2.1 [December 7, 2001] +Version 1.2.1 [December 7, 2001] None. -version 1.2.2beta1 [February 22, 2002] + +Version 1.2.2beta1 [February 22, 2002] Fixed a bug with reading the length of iCCP profiles (Larry Reeves). Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h @@ -1060,13 +1165,15 @@ version 1.2.2beta1 [February 22, 2002] Revised calls to png_create_read_struct() and png_create_write_struct() for simpler debugging. Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK) -version 1.2.2beta2 [February 23, 2002] + +Version 1.2.2beta2 [February 23, 2002] Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths. Check for invalid image dimensions in png_get_IHDR. Added missing "fi;" in the install target of the SGI makefiles. Added install-static to all makefiles that make shared libraries. Always do gamma compensation when image is partially transparent. -version 1.2.2beta3 [March 7, 2002] + +Version 1.2.2beta3 [March 7, 2002] Compute background.gray and background_1.gray even when color_type is RGB in case image gets reduced to gray later. Modified shared-library makefiles to install pkgconfig/libpngNN.pc. @@ -1076,12 +1183,14 @@ version 1.2.2beta3 [March 7, 2002] Added install-shared target to all makefiles that make shared libraries. Stopped a double free of palette, hist, and trans when not using free_me. Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64. -version 1.2.2beta4 [March 8, 2002] + +Version 1.2.2beta4 [March 8, 2002] Compute background.gray and background_1.gray even when color_type is RGB in case image gets reduced to gray later (Jason Summers). Relocated a misplaced /bin/rm in the "install-shared" makefile targets Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library. -version 1.2.2beta5 [March 26, 2002] + +Version 1.2.2beta5 [March 26, 2002] Added missing PNGAPI to several function definitions. Check for invalid bit_depth or color_type in png_get_IHDR(), and check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen). @@ -1090,33 +1199,45 @@ version 1.2.2beta5 [March 26, 2002] Changed "()" to "{}" in scripts/libpng.pc.in. Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so -version 1.2.2beta6 [March 31, 2002] -version 1.0.13beta1 [March 31, 2002] + +Version 1.2.2beta6 [March 31, 2002] + +Version 1.0.13beta1 [March 31, 2002] Prevent png_zalloc() from trying to memset memory that it failed to acquire. Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate). Ensure that the right function (user or default) is used to free the png_struct after an error in png_create_read_struct_2(). -version 1.2.2rc1 [April 7, 2002] -version 1.0.13rc1 [April 7, 2002] + +Version 1.2.2rc1 [April 7, 2002] + +Version 1.0.13rc1 [April 7, 2002] Save the ebx register in pnggccrd.c (Sami Farin) Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner). Updated makefiles to put headers in include/libpng and remove old include/*.h. -version 1.2.2 [April 15, 2002] -version 1.0.13 [April 15, 2002] +Version 1.2.2 [April 15, 2002] + +Version 1.0.13 [April 15, 2002] Revised description of png_set_filter() in libpng.3/libpng.txt. Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd -version 1.0.13patch01 [April 17, 2002] -version 1.2.2patch01 [April 17, 2002] - Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and makefile.sggcc - Fixed VER -> PNGVER typo in makefile.macosx and added install-static to install + +Version 1.0.13patch01 [April 17, 2002] + +Version 1.2.2patch01 [April 17, 2002] + Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and + makefile.sggcc + Fixed VER -> PNGVER typo in makefile.macosx and added install-static to + install Added install: target to makefile.32sunu and makefile.64sunu -version 1.0.13patch03 [April 18, 2002] -version 1.2.2patch03 [April 18, 2002] + +Version 1.0.13patch03 [April 18, 2002] + +Version 1.2.2patch03 [April 18, 2002] Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng subdirectory to libpngNN subdirectory without the full pathname. Moved generation of libpng.pc from "install" to "all" in 15 makefiles. -version 1.2.3rc1 [April 28, 2002] + +Version 1.2.3rc1 [April 28, 2002] Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos). Added $(DESTDIR) feature to 24 makefiles (Tim Mooney) Fixed bug with $prefix, should be $(prefix) in makefile.hpux. @@ -1128,70 +1249,83 @@ version 1.2.3rc1 [April 28, 2002] to put one in their application. Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and removed them from module definition files. -version 1.2.3rc2 [May 1, 2002] + +Version 1.2.3rc2 [May 1, 2002] Fixed bug in reporting number of channels in pngget.c and pngset.c, that was introduced in version 1.2.2beta5. Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(), png_default_flush(), and png_push_fill_buffer() and included them in module definition files. Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles. -version 1.2.3rc3 [May 1, 2002] + +Version 1.2.3rc3 [May 1, 2002] Revised prototype for png_default_flush() Remove old libpng.pc and libpngNN.pc before installing new ones. -version 1.2.3rc4 [May 2, 2002] + +Version 1.2.3rc4 [May 2, 2002] Typos in *.def files (png_default_read|write -> png_default_read|write_data) In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc - Added libpng-config and libpngNN-config and modified makefiles to install them. + Added libpng-config and libpngNN-config and modified makefiles to install + them. Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp -version 1.2.3rc5 [May 11, 2002] + +Version 1.2.3rc5 [May 11, 2002] Changed "error" and "message" in prototypes to "error_message" and "warning_message" to avoid namespace conflict. Revised 15 makefiles to build libpng-config from libpng-config-*.in Once more restored png_zalloc and png_zfree to regular nonexported form. Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer - to nonexported form, but with PNGAPI, and removed them from module def files. -version 1.2.3rc6 [May 14, 2002] + to nonexported form, but with PNGAPI, and removed them from module def + files. + +Version 1.2.3rc6 [May 14, 2002] Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp. Removed leftover libpng-config "sed" script from four makefiles. Revised libpng-config creating script in 16 makefiles. -version 1.2.3 [May 22, 2002] +Version 1.2.3 [May 22, 2002] Revised libpng-config target in makefile.cygwin. Removed description of png_set_mem_fn() from documentation. Revised makefile.freebsd. Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR). Revised projects/msvc/README.txt Changed -lpng to -lpngNN in LDFLAGS in several makefiles. -version 1.2.4beta1 [May 24, 2002] + +Version 1.2.4beta1 [May 24, 2002] Added libpng.pc and libpng-config to "all:" target in 16 makefiles. Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH) Added missing "\" before closing double quote in makefile.gcmmx. Plugged various memory leaks; added png_malloc_warn() and png_set_text_2() functions. -version 1.2.4beta2 [June 25, 2002] + +Version 1.2.4beta2 [June 25, 2002] Plugged memory leak of png_ptr->current_text (Matt Holgate). Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison) Added -soname to the loader flags in makefile.dec, makefile.sgi, and makefile.sggcc. Added "test-installed" target to makefile.linux, makefile.gcmmx, makefile.sgi, and makefile.sggcc. -version 1.2.4beta3 [June 28, 2002] + +Version 1.2.4beta3 [June 28, 2002] Plugged memory leak of row_buf in pngtest.c when there is a png_error(). Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data. Added "test-installed" target to makefile.32sunu, makefile.64sunu, makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9. -version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002] + +Version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002] Added "test-installed" target to makefile.cygwin and makefile.sco. Revised pnggccrd.c to be able to back out version 1.0.x via PNG_1_0_X macro. -version 1.2.4 and 1.0.14 [July 8, 2002] +Version 1.2.4 and 1.0.14 [July 8, 2002] Changed png_warning() to png_error() when width is too large to process. -version 1.2.4patch01 [July 20, 2002] + +Version 1.2.4patch01 [July 20, 2002] Revised makefile.cygwin to use DLL number 12 instead of 13. -version 1.2.5beta1 [August 6, 2002] + +Version 1.2.5beta1 [August 6, 2002] Added code to contrib/gregbook/readpng2.c to ignore unused chunks. Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11) Removed some stray *.o files from contrib/gregbook. @@ -1200,36 +1334,43 @@ version 1.2.5beta1 [August 6, 2002] Prevent png_ptr->pass from exceeding 7 in png_push_finish_row(). Updated makefile.hpgcc Updated png.c and pnggccrd.c handling of return from png_mmx_support() -version 1.2.5beta2 [August 15, 2002] + +Version 1.2.5beta2 [August 15, 2002] Only issue png_warning() about "Too much data" in pngpread.c when avail_in is nonzero. Updated makefiles to install a separate libpng.so.3 with its own rpath. -version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002] + +Version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002] Revised makefiles to not remove previous minor versions of shared libraries. -version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002] + +Version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002] Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared library loader directive. Added missing "$OBJSDLL" line to makefile.gcmmx. Added missing "; fi" to makefile.32sunu. -version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002] + +Version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002] Revised libpng-config script. -version 1.2.5 and 1.0.15 [October 3, 2002] +Version 1.2.5 and 1.0.15 [October 3, 2002] Revised makefile.macosx, makefile.darwin, makefile.hpgcc, and makefile.hpux, and makefile.aix. Relocated two misplaced PNGAPI lines in pngtest.c -version 1.2.6beta1 [October 22, 2002] + +Version 1.2.6beta1 [October 22, 2002] Commented out warning about uninitialized mmx_support in pnggccrd.c. Changed "IBMCPP__" flag to "__IBMCPP__" in pngconf.h. Relocated two more misplaced PNGAPI lines in pngtest.c Fixed memory overrun bug in png_do_read_filler() with 16-bit datastreams, introduced in version 1.0.2. Revised makefile.macosx, makefile.dec, makefile.aix, and makefile.32sunu. -version 1.2.6beta2 [November 1, 2002] + +Version 1.2.6beta2 [November 1, 2002] Added libpng-config "--ldopts" output. Added "AR=ar" and "ARFLAGS=rc" and changed "ar rc" to "$(AR) $(ARFLAGS)" in makefiles. -version 1.2.6beta3 [July 18, 2004] + +Version 1.2.6beta3 [July 18, 2004] Reverted makefile changes from version 1.2.6beta2 and some of the changes from version 1.2.6beta1; these will be postponed until version 1.2.7. Version 1.2.6 is going to be a simple bugfix release. @@ -1282,7 +1423,8 @@ version 1.2.6beta3 [July 18, 2004] Updated contrib/visupng/VisualPng.dsp (Cosmin). Updated contrib/visupng/cexcept.h to version 2.0.0 (Cosmin). Added a separate distribution with "configure" and supporting files (Junichi). -version 1.2.6beta4 [July 28, 2004] + +Version 1.2.6beta4 [July 28, 2004] Added user ability to change png_size_t via a PNG_SIZE_T macro. Added png_sizeof() and png_convert_size() functions. Added PNG_SIZE_MAX (maximum value of a png_size_t variable. @@ -1304,7 +1446,8 @@ version 1.2.6beta4 [July 28, 2004] Added some "#if PNG_WRITE_SUPPORTED" blocks. Added #ifdef to remove some redundancy in png_malloc_default(). Use png_malloc instead of png_zalloc to allocate the pallete. -version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004] + +Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004] Fixed buffer overflow vulnerability in png_handle_tRNS() Fixed integer arithmetic overflow vulnerability in png_read_png(). Fixed some harmless bugs in png_handle_sBIT, etc, that would cause @@ -1319,7 +1462,8 @@ version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004] Fixed wrong cast of returns from png_get_user_width|height_max(). Changed some "keep the compiler happy" from empty statements to returns, Revised libpng.txt to remove 1.2.x stuff from the 1.0.x distribution -version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004] + +Version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004] Revised makefile.darwin and makefile.solaris. Removed makefile.macosx. Revised pngtest's png_debug_malloc() to use png_malloc() instead of png_malloc_default() which is not supposed to be exported. @@ -1333,91 +1477,106 @@ version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004] Changed "HANDLE_CHUNK_*" to "PNG_HANDLE_CHUNK_*" (Cosmin) Added "-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)" to 15 *NIX makefiles. Added code to update the row_info->colortype in png_do_read_filler() (MSB). -version 1.0.16rc3 and 1.2.6rc3 [August 9, 2004] + +Version 1.0.16rc3 and 1.2.6rc3 [August 9, 2004] Eliminated use of "abs()" in testing cHRM and gAMA values, to avoid trouble with some 64-bit compilers. Created PNG_OUT_OF_RANGE() macro. Revised documentation of png_set_keep_unknown_chunks(). Check handle_as_unknown status in pngpread.c, as in pngread.c previously. Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_INTERNAL section of png.h Added "rim" definitions for CONST4 and CONST6 in pnggccrd.c -version 1.0.16rc4 and 1.2.6rc4 [August 10, 2004] + +Version 1.0.16rc4 and 1.2.6rc4 [August 10, 2004] Fixed mistake in pngtest.c introduced in 1.2.6rc2 (declaration of "pinfo" was out of place). -version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004] + +Version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004] Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED section of png.h where they were inadvertently placed in version rc3. -version 1.2.6 and 1.0.16 [August 15, 2004] +Version 1.2.6 and 1.0.16 [August 15, 2004] Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1. -version 1.2.7beta1 [August 26, 2004] + +Version 1.2.7beta1 [August 26, 2004] Removed unused pngasmrd.h file. Removed references to uu.net for archived files. Added references to PNG Spec (second edition) and the PNG ISO/IEC Standard. Added "test-dd" target in 15 makefiles, to run pngtest in DESTDIR. Fixed bug with "optimized window size" in the IDAT datastream, that causes libpng to write PNG files with incorrect zlib header bytes. -version 1.2.7beta2 [August 28, 2004] + +Version 1.2.7beta2 [August 28, 2004] Fixed bug with sCAL chunk and big-endian machines (David Munro). Undid new code added in 1.2.6rc2 to update the color_type in png_set_filler(). Added png_set_add_alpha() that updates color type. -version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004] + +Version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004] Revised png_set_strip_filler() to not remove alpha if color_type has alpha. -version 1.2.7 and 1.0.17 [September 12, 2004] +Version 1.2.7 and 1.0.17 [September 12, 2004] Added makefile.hp64 Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin -version 1.2.8beta1 [November 1, 2004] + +Version 1.2.8beta1 [November 1, 2004] Fixed bug in png_text_compress() that would fail to complete a large block. Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during strip alpha operation in png_do_strip_filler(). Added PNG_1_2_X definition in pngconf.h Use #ifdef to comment out png_info_init in png.c and png_read_init in pngread.c (as of 1.3.0) -version 1.2.8beta2 [November 2, 2004] + +Version 1.2.8beta2 [November 2, 2004] Reduce color_type to a nonalpha type after strip alpha operation in png_do_strip_filler(). -version 1.2.8beta3 [November 3, 2004] + +Version 1.2.8beta3 [November 3, 2004] Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM -version 1.2.8beta4 [November 12, 2004] + +Version 1.2.8beta4 [November 12, 2004] Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin). Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin). Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection of data type in deflate (Cosmin). Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. -version 1.2.8beta5 [November 20, 2004] + +Version 1.2.8beta5 [November 20, 2004] Use png_ptr->flags instead of png_ptr->transformations to pass PNG_STRIP_ALPHA info to png_do_strip_filler(), to preserve ABI compatibility. Revised handling of SPECIALBUILD, PRIVATEBUILD, PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. -version 1.2.8rc1 [November 24, 2004] + +Version 1.2.8rc1 [November 24, 2004] Moved handling of BUILD macros from pngconf.h to png.h Added definition of PNG_LIBPNG_BASE_TYPE in png.h, inadvertently omitted from beta5. Revised scripts/pngw32.rc Despammed mailing addresses by masking "@" with "at". Inadvertently installed a supposedly faster test version of pngrutil.c -version 1.2.8rc2 [November 26, 2004] + +Version 1.2.8rc2 [November 26, 2004] Added two missing "\" in png.h Change tests in pngread.c and pngpread.c to if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) png_do_read_transformations(png_ptr); -version 1.2.8rc3 [November 28, 2004] + +Version 1.2.8rc3 [November 28, 2004] Reverted pngrutil.c to version libpng-1.2.8beta5. Added scripts/makefile.elf with supporting code in pngconf.h for symbol versioning (John Bowler). -version 1.2.8rc4 [November 29, 2004] + +Version 1.2.8rc4 [November 29, 2004] Added projects/visualc7 (Simon-pierre). -version 1.2.8rc5 [November 29, 2004] + +Version 1.2.8rc5 [November 29, 2004] Fixed new typo in scripts/pngw32.rc -version 1.2.8 [December 3, 2004] +Version 1.2.8 [December 3, 2004] Removed projects/visualc7, added projects/visualc71. -version 1.2.9beta1 [February 21, 2006] - +Version 1.2.9beta1 [February 21, 2006] Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints Revised man page and libpng.txt to make it clear that one should not call png_read_end or png_write_end after png_read_png or png_write_png. @@ -1439,8 +1598,7 @@ version 1.2.9beta1 [February 21, 2006] Fixed scripts/makefile.cygwin (Christian Biesinger, Cosmin). Default iTXt support was inadvertently enabled. -version 1.2.9beta2 [February 21, 2006] - +Version 1.2.9beta2 [February 21, 2006] Check for png_rgb_to_gray and png_gray_to_rgb read transformations before checking for png_read_dither in pngrtran.c Revised checking of chromaticity limits to accommodate extended RGB @@ -1453,8 +1611,7 @@ version 1.2.9beta2 [February 21, 2006] Eliminated distributions without the "configure" script. Updated INSTALL instructions. -version 1.2.9beta3 [February 24, 2006] - +Version 1.2.9beta3 [February 24, 2006] Fixed CRCRLF line endings in contrib/visupng/VisualPng.dsp Made libpng.pc respect EXEC_PREFIX (D. P. Kreil, J. Bowler) Removed reference to pngasmrd.h from Makefile.am @@ -1463,8 +1620,7 @@ version 1.2.9beta3 [February 24, 2006] Renamed ANNOUNCE to NEWS. Created AUTHORS file. -version 1.2.9beta4 [March 3, 2006] - +Version 1.2.9beta4 [March 3, 2006] Changed definition of PKGCONFIG from $prefix/lib to $libdir in configure.ac Reverted to filenames LICENSE and ANNOUNCE; removed AUTHORS and COPYING. Removed newline from the end of some error and warning messages. @@ -1475,17 +1631,17 @@ version 1.2.9beta4 [March 3, 2006] Added "OS2" to list of systems that don't need underscores, in pnggccrd.c Removed libpng version and date from *.c files. -version 1.2.9beta5 [March 4, 2006] +Version 1.2.9beta5 [March 4, 2006] Removed trailing blanks from source files. Put version and date of latest change in each source file, and changed copyright year accordingly. - More cleanup of configure.ac, Makefile.ac, and associated scripts. + More cleanup of configure.ac, Makefile.am, and associated scripts. Restored scripts/makefile.elf which was inadvertently deleted. -version 1.2.9beta6 [March 6, 2006] +Version 1.2.9beta6 [March 6, 2006] Fixed typo (RELEASE) in configuration files. -version 1.2.9beta7 [March 7, 2006] +Version 1.2.9beta7 [March 7, 2006] Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am Fixed inconsistent #ifdef's around png_sig_bytes() and png_set_sCAL_s() in png.h. @@ -1493,7 +1649,7 @@ version 1.2.9beta7 [March 7, 2006] Made cosmetic changes to some makefiles, adding LN_SF and other macros. Made some makefiles accept "exec_prefix". -version 1.2.9beta8 [March 9, 2006] +Version 1.2.9beta8 [March 9, 2006] Fixed some "#if defined (..." which should be "#if defined(..." Bug introduced in libpng-1.2.8. Fixed inconsistency in definition of png_default_read_data() @@ -1504,82 +1660,82 @@ version 1.2.9beta8 [March 9, 2006] Added png_set_expand_gray_1_2_4_to_8() and deprecated png_set_gray_1_2_4_to_8() which also expands tRNS to alpha. -version 1.2.9beta9 [March 10, 2006] +Version 1.2.9beta9 [March 10, 2006] Include "config.h" in pngconf.h when available. Added some checks for NULL png_ptr or NULL info_ptr (timeless) -version 1.2.9beta10 [March 20, 2006] +Version 1.2.9beta10 [March 20, 2006] Removed extra CR from contrib/visualpng/VisualPng.dsw (Cosmin) Made pnggccrd.c PIC-compliant (Christian Aichinger). Added makefile.mingw (Wolfgang Glas). Revised pngconf.h MMX checking. -version 1.2.9beta11 [March 22, 2006] +Version 1.2.9beta11 [March 22, 2006] Fixed out-of-order declaration in pngwrite.c that was introduced in beta9 Simplified some makefiles by using LIBSO, LIBSOMAJ, and LIBSOVER macros. -version 1.2.9rc1 [March 31, 2006] +Version 1.2.9rc1 [March 31, 2006] Defined PNG_USER_PRIVATEBUILD when including "pngusr.h" (Cosmin). Removed nonsensical assertion check from pngtest.c (Cosmin). -version 1.2.9 [April 14, 2006] +Version 1.2.9 [April 14, 2006] Revised makefile.beos and added "none" selector in ltmain.sh -version 1.2.10beta1 [April 15, 2006] +Version 1.2.10beta1 [April 15, 2006] Renamed "config.h" to "png_conf.h" and revised Makefile.am to add -DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h to include png_conf.h only when PNG_BUILDING_LIBPNG is defined. -version 1.2.10beta2 [April 15, 2006] +Version 1.2.10beta2 [April 15, 2006] Manually updated Makefile.in and configure. Changed png_conf.h.in back to config.h. -version 1.2.10beta3 [April 15, 2006] +Version 1.2.10beta3 [April 15, 2006] Change png_conf.h back to config.h in pngconf.h. -version 1.2.10beta4 [April 16, 2006] +Version 1.2.10beta4 [April 16, 2006] Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*. -version 1.2.10beta5 [April 16, 2006] +Version 1.2.10beta5 [April 16, 2006] Added a configure check for compiling assembler code in pnggccrd.c -version 1.2.10beta6 [April 17, 2006] +Version 1.2.10beta6 [April 17, 2006] Revised the configure check for pnggccrd.c Moved -DPNG_CONFIGURE_LIBPNG into @LIBPNG_DEFINES@ Added @LIBPNG_DEFINES@ to arguments when building libpng.sym -version 1.2.10beta7 [April 18, 2006] +Version 1.2.10beta7 [April 18, 2006] Change "exec_prefix=$prefix" to "exec_prefix=$(prefix)" in makefiles. -version 1.2.10rc1 [April 19, 2006] +Version 1.2.10rc1 [April 19, 2006] Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD Fixed "LN_FS" typo in makefile.sco and makefile.solaris. -version 1.2.10rc2 [April 20, 2006] +Version 1.2.10rc2 [April 20, 2006] Added a backslash between -DPNG_CONFIGURE_LIBPNG and -DPNG_NO_ASSEMBLER_CODE in configure.ac and configure Made the configure warning about versioned symbols less arrogant. -version 1.2.10rc3 [April 21, 2006] +Version 1.2.10rc3 [April 21, 2006] Added a note in libpng.txt that png_set_sig_bytes(8) can be used when writing an embedded PNG without the 8-byte signature. Revised makefiles and configure to avoid making links to libpng.so.* -version 1.2.10 [April 23, 2006] +Version 1.2.10 [April 23, 2006] Reverted configure to "rc2" state. -version 1.2.11beta1 [May 31, 2006] +Version 1.2.11beta1 [May 31, 2006] scripts/libpng.pc.in contained "configure" style version info and would not work with makefiles. The shared-library makefiles were linking to libpng.so.0 instead of libpng.so.3 compatibility as the library. -version 1.2.11beta2 [June 2, 2006] +Version 1.2.11beta2 [June 2, 2006] Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid buffer overflow. Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb) -version 1.2.11beta3 [June 5, 2006] +Version 1.2.11beta3 [June 5, 2006] Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin). Removed the accidental leftover Makefile.in~ (Cosmin). Avoided potential buffer overflow and optimized buffer in @@ -1587,116 +1743,116 @@ version 1.2.11beta3 [June 5, 2006] Removed the include directories and libraries from CFLAGS and LDFLAGS in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin). -version 1.2.11beta4 [June 6, 2006] +Version 1.2.11beta4 [June 6, 2006] Allow zero-length IDAT chunks after the entire zlib datastream, but not after another intervening chunk type. -version 1.0.19rc1, 1.2.11rc1 [June 13, 2006] +Version 1.0.19rc1, 1.2.11rc1 [June 13, 2006] Deleted extraneous square brackets from [config.h] in configure.ac -version 1.0.19rc2, 1.2.11rc2 [June 14, 2006] +Version 1.0.19rc2, 1.2.11rc2 [June 14, 2006] Added prototypes for PNG_INCH_CONVERSIONS functions to png.h Revised INSTALL and autogen.sh Fixed typo in several makefiles (-W1 should be -Wl) Added typedef for png_int_32 and png_uint_32 on 64-bit systems. -version 1.0.19rc3, 1.2.11rc3 [June 15, 2006] +Version 1.0.19rc3, 1.2.11rc3 [June 15, 2006] Removed the new typedefs for 64-bit systems (delay until version 1.4.0) Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid reading out of bounds. -version 1.0.19rc4, 1.2.11rc4 [June 15, 2006] +Version 1.0.19rc4, 1.2.11rc4 [June 15, 2006] Really removed the new typedefs for 64-bit systems. -version 1.0.19rc5, 1.2.11rc5 [June 22, 2006] +Version 1.0.19rc5, 1.2.11rc5 [June 22, 2006] Removed png_sig_bytes entry from scripts/pngw32.def -version 1.0.19, 1.2.11 [June 26, 2006] +Version 1.0.19, 1.2.11 [June 26, 2006] None. -version 1.0.20, 1.2.12 [June 27, 2006] +Version 1.0.20, 1.2.12 [June 27, 2006] Really increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid buffer overflow. -version 1.2.13beta1 [October 2, 2006] +Version 1.2.13beta1 [October 2, 2006] Removed AC_FUNC_MALLOC from configure.ac Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h Change "logical" to "bitwise" throughout documentation. Detect and fix attempt to write wrong iCCP profile length. -version 1.0.21, 1.2.13 [November 14, 2006] +Version 1.0.21, 1.2.13 [November 14, 2006] Fix potential buffer overflow in sPLT chunk handler. Fix Makefile.am to not try to link to noexistent files. Check all exported functions for NULL png_ptr. -version 1.2.14beta1 [November 17, 2006] +Version 1.2.14beta1 [November 17, 2006] Relocated three misplaced tests for NULL png_ptr. Built Makefile.in with automake-1.9.6 instead of 1.9.2. Build configure with autoconf-2.60 instead of 2.59 -version 1.2.14beta2 [November 17, 2006] +Version 1.2.14beta2 [November 17, 2006] Added some typecasts in png_zalloc(). -version 1.2.14rc1 [November 20, 2006] +Version 1.2.14rc1 [November 20, 2006] Changed "strtod" to "png_strtod" in pngrutil.c -version 1.0.22, 1.2.14 [November 27, 2006] +Version 1.0.22, 1.2.14 [November 27, 2006] Added missing "$(srcdir)" in Makefile.am and Makefile.in -version 1.2.15beta1 [December 3, 2006] +Version 1.2.15beta1 [December 3, 2006] Generated configure with autoconf-2.61 instead of 2.60 Revised configure.ac to update libpng.pc and libpng-config. -version 1.2.15beta2 [December 3, 2006] +Version 1.2.15beta2 [December 3, 2006] Always export MMX asm functions, just stubs if not building pnggccrd.c -version 1.2.15beta3 [December 4, 2006] +Version 1.2.15beta3 [December 4, 2006] Add "png_bytep" typecast to profile while calculating length in pngwutil.c -version 1.2.15beta4 [December 7, 2006] +Version 1.2.15beta4 [December 7, 2006] Added scripts/CMakeLists.txt Changed PNG_NO_ASSEMBLER_CODE to PNG_NO_MMX_CODE in scripts, like 1.4.0beta -version 1.2.15beta5 [December 7, 2006] +Version 1.2.15beta5 [December 7, 2006] Changed some instances of PNG_ASSEMBLER_* to PNG_MMX_* in pnggccrd.c Revised scripts/CMakeLists.txt -version 1.2.15beta6 [December 13, 2006] +Version 1.2.15beta6 [December 13, 2006] Revised scripts/CMakeLists.txt and configure.ac -version 1.2.15rc1 [December 18, 2006] +Version 1.2.15rc1 [December 18, 2006] Revised scripts/CMakeLists.txt -version 1.2.15rc2 [December 21, 2006] +Version 1.2.15rc2 [December 21, 2006] Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. Added scripts/makefile.nommx -version 1.2.15rc3 [December 25, 2006] +Version 1.2.15rc3 [December 25, 2006] Fixed shared library numbering error that was introduced in 1.2.15beta6. -version 1.2.15rc4 [December 27, 2006] +Version 1.2.15rc4 [December 27, 2006] Fixed handling of rgb_to_gray when png_ptr->color.gray isn't set. -version 1.2.15rc5 [December 31, 2006] +Version 1.2.15rc5 [December 31, 2006] Revised handling of rgb_to_gray. -version 1.2.15 [January 5, 2007] +Version 1.2.15 [January 5, 2007] Added some (unsigned long) typecasts in pngtest.c to avoid printing errors. -version 1.2.16beta1 [January 6, 2007] +Version 1.2.16beta1 [January 6, 2007] Fix bugs in makefile.nommx -version 1.2.16beta2 [January 16, 2007] +Version 1.2.16beta2 [January 16, 2007] Revised scripts/CMakeLists.txt -version 1.2.16 [January 31, 2007] +Version 1.2.16 [January 31, 2007] No changes. -version 1.2.17beta1 [March 6, 2007] +Version 1.2.17beta1 [March 6, 2007] Revised scripts/CMakeLists.txt to install both shared and static libraries. Deleted a redundant line from pngset.c. -version 1.2.17beta2 [April 26, 2007] +Version 1.2.17beta2 [April 26, 2007] Relocated misplaced test for png_ptr == NULL in pngpread.c Change "==" to "&" for testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN flags. @@ -1705,10 +1861,10 @@ version 1.2.17beta2 [April 26, 2007] Added "const" to some array declarations. Mention examples of libpng usage in the libpng*.txt and libpng.3 documents. -version 1.2.17rc1 [May 4, 2007] +Version 1.2.17rc1 [May 4, 2007] No changes. -version 1.2.17rc2 [May 8, 2007] +Version 1.2.17rc2 [May 8, 2007] Moved several PNG_HAVE_* macros out of PNG_INTERNAL because applications calling set_unknown_chunk_location() need them. Changed transformation flag from PNG_EXPAND_tRNS to PNG_EXPAND in @@ -1717,64 +1873,64 @@ version 1.2.17rc2 [May 8, 2007] can be free'ed in case of error. Revised unknown chunk handling in pngrutil.c and pngpread.c to use this structure. -version 1.2.17rc3 [May 8, 2007] +Version 1.2.17rc3 [May 8, 2007] Revised symbol-handling in configure script. -version 1.2.17rc4 [May 10, 2007] +Version 1.2.17rc4 [May 10, 2007] Revised unknown chunk handling to avoid storing unknown critical chunks. -version 1.0.25 [May 15, 2007] -version 1.2.17 [May 15, 2007] +Version 1.0.25 [May 15, 2007] +Version 1.2.17 [May 15, 2007] Added "png_ptr->num_trans=0" before error return in png_handle_tRNS, to eliminate a vulnerability (CVE-2007-2445, CERT VU#684664) -version 1.0.26 [May 15, 2007] -version 1.2.18 [May 15, 2007] +Version 1.0.26 [May 15, 2007] +Version 1.2.18 [May 15, 2007] Reverted the libpng-1.2.17rc3 change to symbol-handling in configure script -version 1.2.19beta1 [May 18, 2007] +Version 1.2.19beta1 [May 18, 2007] Changed "const static" to "static PNG_CONST" everywhere, mostly undoing change of libpng-1.2.17beta2. Changed other "const" to "PNG_CONST" Changed some handling of unused parameters, to avoid compiler warnings. "if (unused == NULL) return;" becomes "unused = unused". -version 1.2.19beta2 [May 18, 2007] +Version 1.2.19beta2 [May 18, 2007] Only use the valid bits of tRNS value in png_do_expand() (Brian Cartier) -version 1.2.19beta3 [May 19, 2007] +Version 1.2.19beta3 [May 19, 2007] Add some "png_byte" typecasts in png_check_keyword() and write new_key instead of key in zTXt chunk (Kevin Ryde). -version 1.2.19beta4 [May 21, 2007] +Version 1.2.19beta4 [May 21, 2007] Add png_snprintf() function and use it in place of sprint() for improved defense against buffer overflows. -version 1.2.19beta5 [May 21, 2007] +Version 1.2.19beta5 [May 21, 2007] Fixed png_handle_tRNS() to only use the valid bits of tRNS value. Changed handling of more unused parameters, to avoid compiler warnings. Removed some PNG_CONST in pngwutil.c to avoid compiler warnings. -version 1.2.19beta6 [May 22, 2007] +Version 1.2.19beta6 [May 22, 2007] Added some #ifdef PNG_MMX_CODE_SUPPORTED where needed in pngvcrd.c Added a special "_MSC_VER" case that defines png_snprintf to _snprintf -version 1.2.19beta7 [May 22, 2007] +Version 1.2.19beta7 [May 22, 2007] Squelched png_squelch_warnings() in pnggccrd.c and added an #ifdef PNG_MMX_CODE_SUPPORTED block around the declarations that caused the warnings that png_squelch_warnings was squelching. -version 1.2.19beta8 [May 22, 2007] +Version 1.2.19beta8 [May 22, 2007] Removed __MMX__ from test in pngconf.h. -version 1.2.19beta9 [May 23, 2007] +Version 1.2.19beta9 [May 23, 2007] Made png_squelch_warnings() available via PNG_SQUELCH_WARNINGS macro. Revised png_squelch_warnings() so it might work. Updated makefile.sgcc and makefile.solaris; added makefile.solaris-x86. -version 1.2.19beta10 [May 24, 2007] +Version 1.2.19beta10 [May 24, 2007] Resquelched png_squelch_warnings(), use "__attribute__((used))" instead. -version 1.4.0beta1 [April 20, 2006] +Version 1.4.0beta1 [April 20, 2006] Enabled iTXt support (changes png_struct, thus requires so-number change). Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED Eliminated PNG_1_0_X and PNG_1_2_X macros. @@ -1786,12 +1942,12 @@ version 1.4.0beta1 [April 20, 2006] Reduced dependency on C-runtime library when on Windows (Simon-Pierre) Replaced sprintf() with png_sprintf() (Simon-Pierre) -version 1.4.0beta2 [April 20, 2006] +Version 1.4.0beta2 [April 20, 2006] Revised makefiles and configure to avoid making links to libpng.so.* Moved some leftover MMX-related defines from pngconf.h to pngintrn.h Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def -version 1.4.0beta3 [May 10, 2006] +Version 1.4.0beta3 [May 10, 2006] Updated scripts/pngw32.def to comment out MMX functions. Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros. Scripts/libpng.pc.in contained "configure" style version info and would @@ -1799,21 +1955,21 @@ version 1.4.0beta3 [May 10, 2006] Revised pngconf.h and added pngconf.h.in, so makefiles and configure can pass defines to libpng and applications. -version 1.4.0beta4 [May 11, 2006] +Version 1.4.0beta4 [May 11, 2006] Revised configure.ac, Makefile.am, and many of the makefiles to write their defines in pngconf.h. -version 1.4.0beta5 [May 15, 2006] +Version 1.4.0beta5 [May 15, 2006] Added a missing semicolon in Makefile.am and Makefile.in Deleted extraneous square brackets from configure.ac -version 1.4.0beta6 [June 2, 2006] +Version 1.4.0beta6 [June 2, 2006] Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid buffer overflow. Changed sonum from 0 to 1. Removed unused prototype for png_check_sig() from png.h -version 1.4.0beta7 [June 16, 2006] +Version 1.4.0beta7 [June 16, 2006] Exported png_write_sig (Cosmin). Optimized buffer in png_handle_cHRM() (Cosmin). Set pHYs = 2835 x 2835 pixels per meter, and added @@ -1822,11 +1978,11 @@ version 1.4.0beta7 [June 16, 2006] Added typedef for png_int_32 and png_uint_32 on 64-bit systems. Added "(unsigned long)" typecast on png_uint_32 variables in printf lists. -version 1.4.0beta8 [June 22, 2006] +Version 1.4.0beta8 [June 22, 2006] Added demonstration of user chunk support in pngtest.c, to support the public sTER chunk and a private vpAg chunk. -version 1.4.0beta9 [July 3, 2006] +Version 1.4.0beta9 [July 3, 2006] Removed ordinals from scripts/pngw32.def and removed png_info_int and png_set_gray_1_2_4_to_8 entries. Inline call of png_get_uint_32() in png_get_uint_31(). @@ -1834,14 +1990,14 @@ version 1.4.0beta9 [July 3, 2006] Removed WINCE and Netware projects. Removed standalone Y2KINFO file. -version 1.4.0beta10 [July 12, 2006] +Version 1.4.0beta10 [July 12, 2006] Eliminated automatic copy of pngconf.h to pngconf.h.in from configure and some makefiles, because it was not working reliably. Instead, distribute pngconf.h.in along with pngconf.h and cause configure and some of the makefiles to update pngconf.h from pngconf.h.in. Added pngconf.h to DEPENDENCIES in Makefile.am -version 1.4.0beta11 [August 19, 2006] +Version 1.4.0beta11 [August 19, 2006] Removed AC_FUNC_MALLOC from configure.ac. Added a warning when writing iCCP profile with mismatched profile length. Patched pnggccrd.c to assemble on x86_64 platforms. @@ -1886,41 +2042,41 @@ version 1.4.0beta11 [August 19, 2006] pngconf.h.in (Glenn). Detect and fix attempt to write wrong iCCP profile length. -version 1.4.0beta12 [October 19, 2006] +Version 1.4.0beta12 [October 19, 2006] Changed "logical" to "bitwise" in the documentation. Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h Add a typecast to stifle compiler warning in pngrutil.c -version 1.4.0beta13 [November 10, 2006] +Version 1.4.0beta13 [November 10, 2006] Fix potential buffer overflow in sPLT chunk handler. Fix Makefile.am to not try to link to noexistent files. -version 1.4.0beta14 [November 15, 2006] +Version 1.4.0beta14 [November 15, 2006] Check all exported functions for NULL png_ptr. -version 1.4.0beta15 [November 17, 2006] +Version 1.4.0beta15 [November 17, 2006] Relocated two misplaced tests for NULL png_ptr. Built Makefile.in with automake-1.9.6 instead of 1.9.2. Build configure with autoconf-2.60 instead of 2.59 Add "install: all" in Makefile.am so "configure; make install" will work. -version 1.4.0beta16 [November 17, 2006] +Version 1.4.0beta16 [November 17, 2006] Added a typecast in png_zalloc(). -version 1.4.0beta17 [December 4, 2006] +Version 1.4.0beta17 [December 4, 2006] Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c Add "png_bytep" typecast to profile while calculating length in pngwutil.c -version 1.4.0beta18 [December 7, 2006] +Version 1.4.0beta18 [December 7, 2006] Added scripts/CMakeLists.txt -version 1.4.0beta19 [May 16, 2007] +Version 1.4.0beta19 [May 16, 2007] Revised scripts/CMakeLists.txt Rebuilt configure and Makefile.in with newer tools. Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. Added scripts/makefile.nommx -version 1.4.0beta20 [July 9, 2008] +Version 1.4.0beta20 [July 9, 2008] Moved several PNG_HAVE_* macros from pngpriv.h to png.h because applications calling set_unknown_chunk_location() need them. Moved several macro definitions from pngpriv.h to pngconf.h @@ -1928,19 +2084,19 @@ version 1.4.0beta20 [July 9, 2008] Deleted all use of the MMX assembler code and Intel-licensed optimizations. Revised makefile.mingw -version 1.4.0beta21 [July 21, 2008] +Version 1.4.0beta21 [July 21, 2008] Moved local array "chunkdata" from pngrutil.c to the png_struct, so it will be freed by png_read_destroy() in case of a read error (Kurt Christensen). -version 1.4.0beta22 [July 21, 2008] +Version 1.4.0beta22 [July 21, 2008] Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking. -version 1.4.0beta23 [July 22, 2008] +Version 1.4.0beta23 [July 22, 2008] Change "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in png_decompress_chunk(). -version 1.4.0beta24 [July 25, 2008] +Version 1.4.0beta24 [July 25, 2008] Change all remaining "chunkdata" to "png_ptr->chunkdata" in png_decompress_chunk(), and remove "chunkdata" from parameter list. Put a call to png_check_chunk_name() in png_read_chunk_header(). @@ -1948,7 +2104,7 @@ version 1.4.0beta24 [July 25, 2008] Removed two calls to png_check_chunk_name() occuring later in the process. Define PNG_NO_ERROR_NUMBERS by default in pngconf.h -version 1.4.0beta25 [July 30, 2008] +Version 1.4.0beta25 [July 30, 2008] Added a call to png_check_chunk_name() in pngpread.c Reverted png_check_chunk_name() to accept a name with a lowercase 3rd byte. Added png_push_have_buffer() function to pngpread.c @@ -1959,7 +2115,7 @@ version 1.4.0beta25 [July 30, 2008] Eliminated no-longer-used pngdefs.h (but it's still built in the makefiles) Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c -version 1.4.0beta26 [August 4, 2008] +Version 1.4.0beta26 [August 4, 2008] Removed png_push_have_buffer() function in pngpread.c. It increased the compiled library size slightly. Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta) @@ -1967,105 +2123,105 @@ version 1.4.0beta26 [August 4, 2008] Updated contrib/visupng/cexcept.h to version 2.0.1 Added PNG_LITERAL_CHARACTER macros for #, [, and ]. -version 1.4.0beta27 [August 5, 2008] +Version 1.4.0beta27 [August 5, 2008] Revised usage of PNG_LITERAL_SHARP in pngerror.c. Moved newline character from individual png_debug messages into the png_debug macros. Allow user to #define their own png_debug, png_debug1, and png_debug2. -version 1.4.0beta28 [August 5, 2008] +Version 1.4.0beta28 [August 5, 2008] Revised usage of PNG_LITERAL_SHARP in pngerror.c. Added PNG_STRING_NEWLINE macro -version 1.4.0beta29 [August 9, 2008] +Version 1.4.0beta29 [August 9, 2008] Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers. Added PNG_STRING_COPYRIGHT macro. Added non-ISO versions of png_debug macros. -version 1.4.0beta30 [August 14, 2008] +Version 1.4.0beta30 [August 14, 2008] Added premultiplied alpha feature (Volker Wiendl). -version 1.4.0beta31 [August 18, 2008] +Version 1.4.0beta31 [August 18, 2008] Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c Removed extra crc check at the end of png_handle_cHRM(). Bug introduced in libpng-1.4.0beta20. -version 1.4.0beta32 [August 19, 2008] +Version 1.4.0beta32 [August 19, 2008] Added PNG_WRITE_FLUSH_SUPPORTED block around new png_flush() call. Revised PNG_NO_STDIO version of png_write_flush() -version 1.4.0beta33 [August 20, 2008] +Version 1.4.0beta33 [August 20, 2008] Added png_get|set_chunk_cache_max() to limit the total number of sPLT, text, and unknown chunks that can be stored. -version 1.4.0beta34 [September 6, 2008] +Version 1.4.0beta34 [September 6, 2008] Shortened tIME_string to 29 bytes in pngtest.c Fixed off-by-one error introduced in png_push_read_zTXt() function in libpng-1.2.30beta04/pngpread.c (Harald van Dijk) -version 1.4.0beta35 [October 6, 2008] +Version 1.4.0beta35 [October 6, 2008] Changed "trans_values" to "trans_color". Changed so-number from 0 to 14. Some OS do not like 0. Revised makefile.darwin to fix shared library numbering. Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8() in example.c (debian bug report) -version 1.4.0beta36 [October 25, 2008] +Version 1.4.0beta36 [October 25, 2008] Sync with tEXt vulnerability fix in libpng-1.2.33rc02. -version 1.4.0beta37 [November 13, 2008] +Version 1.4.0beta37 [November 13, 2008] Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c, and pngwrite.c -version 1.4.0beta38 [November 22, 2008] +Version 1.4.0beta38 [November 22, 2008] Added check for zero-area RGB cHRM triangle in png_check_cHRM() and png_check_cHRM_fixed(). -version 1.4.0beta39 [November 23, 2008] +Version 1.4.0beta39 [November 23, 2008] Revised png_warning() to write its message on standard output by default when warning_fn is NULL. -version 1.4.0beta40 [November 24, 2008] +Version 1.4.0beta40 [November 24, 2008] Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed(). In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant check for all-zero coordinates that is detected by the triangle check. -version 1.4.0beta41 [November 26, 2008] +Version 1.4.0beta41 [November 26, 2008] Fixed string vs pointer-to-string error in png_check_keyword(). Rearranged test expressions in png_check_cHRM_fixed() to avoid internal overflows. Added PNG_NO_CHECK_cHRM conditional. -version 1.4.0beta42, 43 [December 1, 2008] +Version 1.4.0beta42, 43 [December 1, 2008] Merge png_debug with version 1.2.34beta04. -version 1.4.0beta44 [December 6, 2008] +Version 1.4.0beta44 [December 6, 2008] Removed redundant check for key==NULL before calling png_check_keyword() to ensure that new_key gets initialized and removed extra warning (Merge with version 1.2.34beta05 -- Arvan Pritchard). -version 1.4.0beta45 [December 9, 2008] +Version 1.4.0beta45 [December 9, 2008] In png_write_png(), respect the placement of the filler bytes in an earlier call to png_set_filler() (Jim Barry). -version 1.4.0beta46 [December 10, 2008] +Version 1.4.0beta46 [December 10, 2008] Undid previous change and added PNG_TRANSFORM_STRIP_FILLER_BEFORE and PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated PNG_TRANSFORM_STRIP_FILLER (Jim Barry). -version 1.4.0beta47 [December 15, 2008] +Version 1.4.0beta47 [December 15, 2008] Support for dithering was disabled by default, because it has never been well tested and doesn't work very well. The code has not been removed, however, and can be enabled by building libpng with PNG_READ_DITHER_SUPPORTED defined. -version 1.4.0beta48 [February 14, 2009] +Version 1.4.0beta48 [February 14, 2009] Added new exported function png_calloc(). Combined several instances of png_malloc(); png_memset() into png_calloc(). Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 but was never defined. -version 1.4.0beta49 [February 28, 2009] +Version 1.4.0beta49 [February 28, 2009] Added png_fileno() macro to pngconf.h, used in pngwio.c Corrected order of #ifdef's in png_debug definition in png.h Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments @@ -2074,7 +2230,7 @@ version 1.4.0beta49 [February 28, 2009] (bug introduced in libpng-1.2.34/1.4.0beta29). Revised comments in png_set_read_fn() and png_set_write_fn(). -version 1.4.0beta50 [March 18, 2009] +Version 1.4.0beta50 [March 18, 2009] Use png_calloc() instead of png_malloc() to allocate big_row_buf when reading an interlaced file, to avoid a possible UMR. Undid revision of PNG_NO_STDIO version of png_write_flush(). Users @@ -2085,21 +2241,21 @@ version 1.4.0beta50 [March 18, 2009] Removed fflush() from pngtest.c. Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h -version 1.4.0beta51 [March 21, 2009] +Version 1.4.0beta51 [March 21, 2009] Removed new png_fileno() macro from pngconf.h . -version 1.4.0beta52 [March 27, 2009] +Version 1.4.0beta52 [March 27, 2009] Relocated png_do_chop() ahead of building gamma tables in pngrtran.c This avoids building 16-bit gamma tables unnecessarily. Removed fflush() from pngtest.c. Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt -version 1.4.0beta53 [April 1, 2009] +Version 1.4.0beta53 [April 1, 2009] Removed some remaining MMX macros from pngpriv.h Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles) -version 1.4.0beta54 [April 13, 2009] +Version 1.4.0beta54 [April 13, 2009] Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow application code writers to bypass the check for multiple inclusion of setjmp.h when they know that it is safe to ignore the situation. @@ -2108,54 +2264,54 @@ version 1.4.0beta54 [April 13, 2009] pngtest now produces, and made some cosmetic changes to pngtest output. Eliminated deprecated png_read_init_3() and png_write_init_3() functions. -version 1.4.0beta55 [April 15, 2009] +Version 1.4.0beta55 [April 15, 2009] Simplified error handling in pngread.c and pngwrite.c by putting the new png_read_cleanup() and png_write_cleanup() functions inline. -version 1.4.0beta56 [April 25, 2009] +Version 1.4.0beta56 [April 25, 2009] Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress "shadowed declaration" warning from gcc-4.3.3. Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration" warning about a global "gamma" variable in math.h on some platforms. -version 1.4.0beta57 [May 2, 2009] +Version 1.4.0beta57 [May 2, 2009] Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 but was never defined (again). Rebuilt configure scripts with autoconf-2.63 instead of 2.62 Removed pngprefs.h and MMX from makefiles -version 1.4.0beta58 [May 14, 2009] +Version 1.4.0beta58 [May 14, 2009] Changed pngw32.def to pngwin.def in makefile.mingw (typo was introduced in beta57). Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri) -version 1.4.0beta59 [May 15, 2009] +Version 1.4.0beta59 [May 15, 2009] Reformated sources in libpng style (3-space intentation, comment format) Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG) Added sections about the git repository and our coding style to the documentation Relocated misplaced #endif in pngwrite.c, sCAL chunk handler. -version 1.4.0beta60 [May 19, 2009] +Version 1.4.0beta60 [May 19, 2009] Conditionally compile png_read_finish_row() which is not used by progressive readers. Added contrib/pngminim/preader to demonstrate building minimal progressive decoder, based on contrib/gregbook with embedded libpng and zlib. -version 1.4.0beta61 [May 20, 2009] +Version 1.4.0beta61 [May 20, 2009] In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there is only one makefile in those directories, and revised the README files accordingly. More reformatting of comments, mostly to capitalize sentences. -version 1.4.0beta62 [June 2, 2009] +Version 1.4.0beta62 [June 2, 2009] Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h Reformatted several remaining "else statement" into two lines. Added a section to the libpng documentation about using png_get_io_ptr() in configure scripts to detect the presence of libpng. -version 1.4.0beta63 [June 15, 2009] +Version 1.4.0beta63 [June 15, 2009] Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR() multiple times and to specify the sample order in the tRNS chunk, because the ISO PNG specification has a typo in the tRNS table. @@ -2165,26 +2321,26 @@ version 1.4.0beta63 [June 15, 2009] Adopted preference for consistent use of "#ifdef" and "#ifndef" versus "#if defined()" and "if !defined()" where possible. -version 1.4.0beta64 [June 24, 2009] +Version 1.4.0beta64 [June 24, 2009] Eliminated PNG_LEGACY_SUPPORTED code. Moved the various unknown chunk macro definitions outside of the PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks. -version 1.4.0beta65 [June 26, 2009] +Version 1.4.0beta65 [June 26, 2009] Added a reference to the libpng license in each file. -version 1.4.0beta66 [June 27, 2009] +Version 1.4.0beta66 [June 27, 2009] Refer to the libpng license instead of the libpng license in each file. -version 1.4.0beta67 [July 6, 2009] +Version 1.4.0beta67 [July 6, 2009] Relocated INVERT_ALPHA within png_read_png() and png_write_png(). Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB. Added an "xcode" project to the projects directory (Alam Arias). -version 1.4.0beta68 [July 19, 2009] +Version 1.4.0beta68 [July 19, 2009] Avoid some tests in filter selection in pngwutil.c -version 1.4.0beta69 [July 25, 2009] +Version 1.4.0beta69 [July 25, 2009] Simplified the new filter-selection test. This runs faster in the common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases. Removed extraneous declaration from the new call to png_read_gray_to_rgb() @@ -2192,54 +2348,54 @@ version 1.4.0beta69 [July 25, 2009] Fixed up xcode project (Alam Arias) Added a prototype for png_64bit_product() in png.c -version 1.4.0beta70 [July 27, 2009] +Version 1.4.0beta70 [July 27, 2009] Avoid a possible NULL dereference in debug build, in png_set_text_2(). (bug introduced in libpng-0.95, discovered by Evan Rouault) -version 1.4.0beta71 [July 29, 2009] +Version 1.4.0beta71 [July 29, 2009] Rebuilt configure scripts with autoconf-2.64. -version 1.4.0beta72 [August 1, 2009] +Version 1.4.0beta72 [August 1, 2009] Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec from . -version 1.4.0beta73 [August 1, 2009] +Version 1.4.0beta73 [August 1, 2009] Reject attempt to write iCCP chunk with negative embedded profile length (JD Chen) -version 1.4.0beta74 [August 8, 2009] +Version 1.4.0beta74 [August 8, 2009] Changed png_ptr and info_ptr member "trans" to "trans_alpha". -version 1.4.0beta75 [August 21, 2009] +Version 1.4.0beta75 [August 21, 2009] Removed an extra png_debug() recently added to png_write_find_filter(). Fixed incorrect #ifdef in pngset.c regarding unknown chunk support. -version 1.4.0beta76 [August 22, 2009] +Version 1.4.0beta76 [August 22, 2009] Moved an incorrectly located test in png_read_row() in pngread.c -version 1.4.0beta77 [August 27, 2009] +Version 1.4.0beta77 [August 27, 2009] Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt, and the "noconfig" files from the distribution. Moved CMakeLists.txt from scripts into the main libpng directory. Various bugfixes and improvements to CMakeLists.txt (Philip Lowman) -version 1.4.0beta78 [August 31, 2009] +Version 1.4.0beta78 [August 31, 2009] Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros. Use png_malloc plus a loop instead of png_calloc() to initialize row_pointers in png_read_png(). -version 1.4.0beta79 [September 1, 2009] +Version 1.4.0beta79 [September 1, 2009] Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays. Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc(). -version 1.4.0beta80 [September 17, 2009] +Version 1.4.0beta80 [September 17, 2009] Removed scripts/libpng.icc Changed typecast of filler from png_byte to png_uint_16 in png_set_filler(). (Dennis Gustafsson) Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ") -version 1.4.0beta81 [September 23, 2009] +Version 1.4.0beta81 [September 23, 2009] Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h Expanded TAB characters in pngrtran.c Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid @@ -2247,60 +2403,60 @@ version 1.4.0beta81 [September 23, 2009] Changed all "#if [!]defined(X)" to "if[n]def X" where possible. Eliminated unused png_ptr->row_buf_size -version 1.4.0beta82 [September 25, 2009] +Version 1.4.0beta82 [September 25, 2009] Moved redundant IHDR checking into new png_check_IHDR() in png.c and report all errors found in the IHDR data. Eliminated useless call to png_check_cHRM() from pngset.c -version 1.4.0beta83 [September 25, 2009] +Version 1.4.0beta83 [September 25, 2009] Revised png_check_IHDR() to eliminate bogus complaint about filter_type. -version 1.4.0beta84 [September 30, 2009] +Version 1.4.0beta84 [September 30, 2009] Fixed some inconsistent indentation in pngconf.h Revised png_check_IHDR() to add a test for width variable less than 32-bit. -version 1.4.0beta85 [October 1, 2009] +Version 1.4.0beta85 [October 1, 2009] Revised png_check_IHDR() again, to check info_ptr members instead of the contents of the returned parameters. -version 1.4.0beta86 [October 9, 2009] +Version 1.4.0beta86 [October 9, 2009] Updated the "xcode" project (Alam Arias). Eliminated a shadowed declaration of "pp" in png_handle_sPLT(). -version 1.4.0rc01 [October 19, 2009] +Version 1.4.0rc01 [October 19, 2009] Trivial cosmetic changes. -version 1.4.0beta87 [October 30, 2009] +Version 1.4.0beta87 [October 30, 2009] Moved version 1.4.0 back into beta. -version 1.4.0beta88 [October 30, 2009] +Version 1.4.0beta88 [October 30, 2009] Revised libpng*.txt section about differences between 1.2.x and 1.4.0 because most of the new features have now been ported back to 1.2.41 -version 1.4.0beta89 [November 1, 2009] +Version 1.4.0beta89 [November 1, 2009] More bugfixes and improvements to CMakeLists.txt (Philip Lowman) Removed a harmless extra png_set_invert_alpha() from pngwrite.c Apply png_user_chunk_cache_max within png_decompress_chunk(). Merged libpng-1.2.41.txt with libpng-1.4.0.txt where appropriate. -version 1.4.0beta90 [November 2, 2009] +Version 1.4.0beta90 [November 2, 2009] Removed all remaining WIN32_WCE #ifdefs except those involving the time.h "tm" structure -version 1.4.0beta91 [November 3, 2009] +Version 1.4.0beta91 [November 3, 2009] Updated scripts/pngw32.def and projects/wince/png32ce.def Copied projects/wince/png32ce.def to the scripts directory. Added scripts/makefile.wce Patched ltmain.sh for wince support. Added PNG_CONVERT_tIME_SUPPORTED macro. -version 1.4.0beta92 [November 4, 2009] +Version 1.4.0beta92 [November 4, 2009] Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0 (instead of differences from 1.2.41 to 1.4.0) -version 1.4.0beta93 [November 7, 2009] +Version 1.4.0beta93 [November 7, 2009] Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and PNG_ALLOCATED macros to detect deprecated direct access to the png_struct or info_struct members and other deprecated usage in @@ -2323,13 +2479,13 @@ version 1.4.0beta93 [November 7, 2009] Moved the synopsis lines for png_read_destroy(), png_write_destroy() png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3. -version 1.4.0beta94 [November 9, 2009] +Version 1.4.0beta94 [November 9, 2009] Removed the obsolete, unused pnggccrd.c and pngvcrd.c files. Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions. Removed dependency of pngtest.o on pngpriv.h in the makefiles. Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined. -version 1.4.0beta95 [November 10, 2009] +Version 1.4.0beta95 [November 10, 2009] Changed png_check_sig() to !png_sig_cmp() in contrib programs. Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile Changed png_check_sig() to !png_sig_cmp() in contrib programs. @@ -2337,7 +2493,7 @@ version 1.4.0beta95 [November 10, 2009] Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c Added dependency on pngpriv.h in contrib/pngminim/*/makefile -version 1.4.0beta96 [November 12, 2009] +Version 1.4.0beta96 [November 12, 2009] Renamed scripts/makefile.wce to scripts/makefile.cegcc Revised Makefile.am to use libpng.sys while building libpng.so so that only PNG_EXPORT functions are exported. @@ -2347,42 +2503,42 @@ version 1.4.0beta96 [November 12, 2009] (evidently the same change made in libpng-1.0beta54 was lost). Added PNG_PRIVATE macro definition in pngconf.h for possible future use. -version 1.4.0beta97 [November 13, 2009] +Version 1.4.0beta97 [November 13, 2009] Restored pngtest.png to the libpng-1.4.0beta7 version. Removed projects/beos and netware.txt; no one seems to be supporting them. Revised Makefile.in -version 1.4.0beta98 [November 13, 2009] +Version 1.4.0beta98 [November 13, 2009] Added the "xcode" project to zip distributions, Fixed a typo in scripts/pngwin.def introduced in beta97. -version 1.4.0beta99 [November 14, 2009] +Version 1.4.0beta99 [November 14, 2009] Moved libpng-config.in and libpng.pc-configure.in out of the scripts directory, to libpng-config.in and libpng-pc.in, respectively, and modified Makefile.am and configure.ac accordingly. Now "configure" needs nothing from the "scripts" directory. Avoid redefining PNG_CONST in pngconf.h -version 1.4.0beta100 [November 14, 2009] +Version 1.4.0beta100 [November 14, 2009] Removed ASM builds from projects/visualc6 and projects/visualc71 Removed scripts/makefile.nommx and makefile.vcawin32 Revised CMakeLists.txt to account for new location of libpng-config.in and libpng-pc.in Updated INSTALL to reflect removal and relocation of files. -version 1.4.0beta101 [November 14, 2009] +Version 1.4.0beta101 [November 14, 2009] Restored the binary files (*.jpg, *.png, some project files) that were accidentally deleted from the zip and 7z distributions when the xcode project was added. -version 1.4.0beta102 [November 18, 2009] +Version 1.4.0beta102 [November 18, 2009] Added libpng-config.in and libpng-pc.in to the zip and 7z distributions. Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100. Moved descriptions of makefiles and other scripts out of INSTALL into scripts/README.txt Updated the copyright year in scripts/pngwin.rc from 2006 to 2009. -version 1.4.0beta103 [November 21, 2009] +Version 1.4.0beta103 [November 21, 2009] Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt Align row_buf on 16-byte boundary in memory. Restored the PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED guard around the call @@ -2394,74 +2550,74 @@ version 1.4.0beta103 [November 21, 2009] jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'. (John Bowler) -version 1.4.0beta104 [November 22, 2009] +Version 1.4.0beta104 [November 22, 2009] Removed png_longjmp_ptr from scripts/*.def and libpng.3 Rebuilt configure scripts with autoconf-2.65 -version 1.4.0beta105 [November 25, 2009] +Version 1.4.0beta105 [November 25, 2009] Use fast integer PNG_DIVIDE_BY_255() or PNG_DIVIDE_BY_65535() to accomplish alpha premultiplication when PNG_READ_COMPOSITE_NODIV_SUPPORTED is defined. Changed "/255" to "/255.0" in background calculations to make it clear that the 255 is used as a double. -version 1.4.0beta106 [November 27, 2009] +Version 1.4.0beta106 [November 27, 2009] Removed premultiplied alpha feature. -version 1.4.0beta107 [December 4, 2009] +Version 1.4.0beta107 [December 4, 2009] Updated README Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files. Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects. Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco to put png.h and pngconf.h in $prefix/include, like the other scripts, instead of in $prefix/include/libpng. Also revised makefile.sco - to put them in $prefix/include/libpng14 instead of in - $prefix/include/libpng/libpng14. + to put them in $prefix/include/libpng15 instead of in + $prefix/include/libpng/libpng15. -version 1.4.0beta108 [December 11, 2009] +Version 1.4.0beta108 [December 11, 2009] Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile Relocated png_do_chop() to its original position in pngrtran.c; the change in version 1.2.41beta08 caused transparency to be handled wrong in some 16-bit datastreams (Yusaku Sugai). -version 1.4.0beta109 [December 13, 2009] +Version 1.4.0beta109 [December 13, 2009] Added "bit_depth" parameter to the private png_build_gamma_table() function. Pass bit_depth=8 to png_build_gamma_table() when bit_depth is 16 but the PNG_16_TO_8 transform has been set, to avoid unnecessary build of 16-bit tables. -version 1.4.0rc02 [December 20, 2009] +Version 1.4.0rc02 [December 20, 2009] Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c -version 1.4.0rc03 [December 22, 2009] +Version 1.4.0rc03 [December 22, 2009] Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt (revising the change in 1.4.0beta99) -version 1.4.0rc04 [December 25, 2009] +Version 1.4.0rc04 [December 25, 2009] Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED in pngset.c to be consistent with other changes in version 1.2.38. -version 1.4.0rc05 [December 25, 2009] +Version 1.4.0rc05 [December 25, 2009] Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and Makefile.in to be consistent with changes in libpng-1.4.0rc03 -version 1.4.0rc06 [December 29, 2009] +Version 1.4.0rc06 [December 29, 2009] Reverted the gamma_table changes from libpng-1.4.0beta109. Fixed some indentation errors. -version 1.4.0rc07 [January 1, 2010] +Version 1.4.0rc07 [January 1, 2010] Revised libpng*.txt and libpng.3 about 1.2.x->1.4.x differences. Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c Update copyright year to 2010. -version 1.4.0rc08 [January 2, 2010] +Version 1.4.0rc08 [January 2, 2010] Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr in pngtest.c -version 1.4.0 [January 3, 2010] +Version 1.4.0 [January 3, 2010] No changes. -version 1.4.1beta01 [January 8, 2010] +Version 1.4.1beta01 [January 8, 2010] Updated CMakeLists.txt for consistent indentation and to avoid an unclosed if-statement warning (Philip Lowman). Revised Makefile.am and Makefile.in to remove references to Y2KINFO, @@ -2473,28 +2629,28 @@ version 1.4.1beta01 [January 8, 2010] Revised Makefile.am and Makefile.in to simplify their maintenance. Revised scripts/makefile.linux to install a link to libpng14.so.14.1 -version 1.4.1beta02 [January 9, 2010] +Version 1.4.1beta02 [January 9, 2010] Revised the rest of the makefiles to install a link to libpng14.so.14.1 -version 1.4.1beta03 [January 10, 2010] +Version 1.4.1beta03 [January 10, 2010] Removed png_set_premultiply_alpha() from scripts/*.def -version 1.4.1rc01 [January 16, 2010] +Version 1.4.1rc01 [January 16, 2010] No changes. -version 1.4.1beta04 [January 23, 2010] +Version 1.4.1beta04 [January 23, 2010] Revised png_decompress_chunk() to improve speed and memory usage when decoding large chunks. Added png_set|get_chunk_malloc_max() functions. -version 1.4.1beta05 [January 26, 2010] +Version 1.4.1beta05 [January 26, 2010] Relocated "int k" declaration in pngtest.c to minimize its scope. -version 1.4.1beta06 [January 28, 2010] +Version 1.4.1beta06 [January 28, 2010] Revised png_decompress_chunk() to use a two-pass method suggested by John Bowler. -version 1.4.1beta07 [February 6, 2010] +Version 1.4.1beta07 [February 6, 2010] Folded some long lines in the source files. Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX, and a PNG_USER_LIMITS_SUPPORTED flag. @@ -2502,117 +2658,639 @@ version 1.4.1beta07 [February 6, 2010] png_ptr->png_user_chunk_malloc_max. Revised png_push_save_buffer() to do fewer but larger png_malloc() calls. -version 1.4.1beta08 [February 6, 2010] +Version 1.4.1beta08 [February 6, 2010] Minor cleanup and updating of dates and copyright year. -version 1.4.1beta09 [February 7, 2010] +Version 1.5.0beta01 [February 7, 2010] + Moved declaration of png_struct into private pngstruct.h and png_info + into pnginfo.h + +Version 1.4.1beta09 and 1.5.0beta02 [February 7, 2010] Reverted to original png_push_save_buffer() code. -version 1.4.1beta10 [February 9, 2010] - Return allocated "old_buffer" in png_push_save_buffer() before calling - png_error(), to avoid a potential memory leak. +Version 1.4.1beta10 and 1.5.0beta03 [February 8, 2010] + Return allocated "old_buffer" in png_push_save_buffer() before + calling png_error(), to avoid a potential memory leak. + Updated configure script to use SO number 15. -version 1.4.1beta11 [February 12, 2010] - Relocated misplaced closing curley bracket in png_decompress_chunk(). - Removed unused "buffer_size" variable from png_decompress_chunk(). +Version 1.5.0beta04 [February 9, 2010] + Removed malformed "incomplete struct declaration" of png_info from png.h + +Version 1.5.0beta05 [February 12, 2010] + Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the + linewrapping that it entailed. + Revised comments in pngstruct.h and pnginfo.h and added pointers to + the libpng license. + Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES Removed the cbuilder5 project, which has not been updated to 1.4.0. - Complete rewrite of two-pass png_decompress_chunk() by John Bowler. -version 1.4.1beta12 [February 14, 2010] - Fixed type declaration of png_get_user_malloc_max() in pngget.c (Daisuke +Version 1.4.1beta12 and 1.5.0beta06 [February 14, 2010] + Fixed type declaration of png_get_chunk_malloc_max() in pngget.c (Daisuke Nishikawa) -version 1.4.1rc02 [January 18, 2010] - No changes. +Version 1.5.0beta07 [omitted] -version 1.4.1rc03 [February 19, 2010] +Version 1.5.0beta08 [February 19, 2010] + Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED + wherever png_snprintf() is used to construct error and warning messages. Noted in scripts/makefile.mingw that it expects to be run under MSYS. Removed obsolete unused MMX-querying support from contrib/gregbook + Added exported png_longjmp() function. Removed the AIX redefinition of jmpbuf in png.h - Define _ALL_SOURCE in configure.ac, makefile.aix, and CMakeLists.txt - when using AIX compiler. + Added -D_ALLSOURCE in configure.ac, makefile.aix, and CMakeLists.txt + when building on AIX. -version 1.4.1rc04 [February 19, 2010] +Version 1.5.0beta09 [February 19, 2010] + Removed -D_ALLSOURCE from configure.ac, makefile.aix, and CMakeLists.txt. + Changed the name of png_ptr->jmpbuf to png_ptr->png_jmpbuf in pngstruct.h + +Version 1.5.0beta10 [February 25, 2010] Removed unused gzio.c from contrib/pngminim gather and makefile scripts + Removed replacement error handlers from contrib/gregbook. Because of + the new png_longjmp() function they are no longer needed. -version 1.4.1 [February 25, 2010] +Version 1.5.0beta11 [March 6, 2010] + Removed checking for already-included setjmp.h from pngconf.h + Fixed inconsistent indentations and made numerous cosmetic changes. + Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5 -version 1.4.2beta01 [April 1, 2010] - Conditionally compile an "else" statement in png_decompress_chunk(). +Version 1.5.0beta12 [March 9, 2010] + Moved "#include png.h" inside pngpriv.h and removed "#include png.h" from + the source files, along with "#define PNG_EXPOSE_INTERNAL_STRUCTURES" + and "#define PNG_NO_PEDANTIC_WARNINGS" (John Bowler). + Created new pngdebug.h and moved debug definitions there. + +Version 1.5.0beta13 [March 10, 2010] + Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice. + Revise the "#ifdef" blocks in png_inflate() so it will compile when neither + PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED + is defined. + Removed unused png_measure_compressed_chunk() from pngpriv.h and libpngpf.3 + Moved the 'config.h' support from pngconf.h to pngpriv.h + Removed PNGAPI from the png_longjmp_ptr typedef. + Eliminated dependence of pngtest.c on the private pngdebug.h file. + Make all png_debug macros into *unterminated* statements or + expressions (i.e. a trailing ';' must always be added) and correct + the format statements in various png_debug messages. + +Version 1.5.0beta14 [March 14, 2010] + Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c + Revised Makefile.am to account for recent additions and replacements. + Corrected CE and OS/2 DEF files (scripts/png*def) for symbols removed and + added ordinal numbers to the Windows DEF file and corrected the duplicated + ordinal numbers on CE symbols that are commented out. + Added back in export symbols that can be present in the Windows build but + are disabled by default. + PNG_EXPORT changed to include an 'ordinal' field for DEF file generation. + PNG_CALLBACK added to make callback definitions uniform. PNGAPI split + into PNGCAPI (base C form), PNGAPI (exports) and PNGCBAPI (callbacks), + and appropriate changes made to all files. Cygwin builds re-hinged to + allow procedure call standard changes and to remove the need for the DEF + file (fixes build on Cygwin). + Enabled 'attribute' warnings that are relevant to library APIs and callbacks. + Changed rules for generation of the various symbol files and added a new + rule for a DEF file (which is also added to the distribution). + Updated the symbol file generation to stop it adding spurious spaces + to EOL (coming from preprocessor macro expansion). Added a facility + to join tokens in the output and rewrite *.dfn to use this. + Eliminated scripts/*.def in favor of libpng.def; updated projects/visualc71 + and removed scripts/makefile.cygwin. + Made PNG_BUILD_DLL safe: it can be set whenever a DLL is being built. + Removed the include of sys/types.h - apparently unnecessary now on the + platforms on which it happened (all but Mac OS and RISC OS). + Moved the Mac OS test into pngpriv.h (the only place it is used.) + +Version 1.5.0beta15 [March 17, 2010] + Added symbols.chk target to Makefile.am to validate the symbols in png.h + against the new DEF file scripts/symbols.def. + Changed the default DEF file back to pngwin.def. + Removed makefile.mingw. + Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN + +Version 1.5.0beta16 [April 1, 2010] + Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that + fields are initialized in all configurations. The READ/WRITE + macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as + before to disable code to actually read or write iTXt chunks + and iTXt_SUPPORTED can be used to detect presence of either + read or write support (but it is probably better to check for + the one actually required - read or write.) + Combined multiple png_warning() calls for a single error. Restored the macro definition of png_check_sig(). -version 1.4.2rc01 [April 10, 2010] - No changes. - -version 1.4.2rc02 [April 16, 2010] +Version 1.5.0beta17 [April 17, 2010] + Added some "(long)" typecasts to printf calls in png_handle_cHRM(). Documented the fact that png_set_dither() was disabled since libpng-1.4.0. Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect more accurately what it actually does. At the same time, renamed the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS. - -version 1.4.2rc03 [April 24, 2010] Added some "(long)" typecasts to printf calls in png_handle_cHRM(). + Freeze build-time only configuration in the build. + In all prior versions of libpng most configuration options + controlled by compiler #defines had to be repeated by the + application code that used libpng. This patch changes this + so that compilation options that can only be changed at build + time are frozen in the build. Options that are compiler + dependent (and those that are system dependent) are evaluated + each time - pngconf.h holds these. Options that can be changed + per-file in the application are in png.h. Frozen options are + in the new installed header file pnglibconf.h (John Bowler) + Removed the xcode project because it has not been updated to work + with libpng-1.5.0. + Removed the ability to include optional pngusr.h + +Version 1.5.0beta18 [April 17, 2010] + Restored the ability to include optional pngusr.h + Moved replacements for png_error() and png_warning() from the + contrib/pngminim project to pngerror.c, for use when warnings or + errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid + storing unneeded error/warning text. + Updated contrib/pngminim project to work with the new pnglibconf.h + Added some PNG_NO_* defines to contrib/pngminim/*/pngusr.h to save space. + +Version 1.5.0beta19 [April 24, 2010] + Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the functions + to read and write ints to be disabled independently of PNG_USE_READ_MACROS, + which allows libpng to be built with the functions even though the default + is to use the macros - this allows applications to choose at app build + time whether or not to use macros (previously impossible because the + functions weren't in the default build.) + Changed Windows calling convention back to __cdecl for API functions. + For Windows/x86 platforms only: + __stdcall is no longer needed for Visual Basic, so libpng-1.5.0 uses + __cdecl throughout (both API functions and callbacks) on Windows/x86 + platforms. + Replaced visualc6 and visualc71 projects with new vstudio project Relaxed the overly-restrictive permissions of some files. -version 1.4.2rc04 [April 28, 2010] - Added the "vstudio" project to replace "visualc6" and "visualc71" which - will be removed from libpng-1.5.0. - Demonstrate in example.c that lang_key should be initialized. +Version 1.5.0beta20 [April 24, 2010] + Relaxed more overly-restrictive permissions of some files. + +Version 1.5.0beta21 [April 27, 2010] + Removed some unwanted binary bytes and changed CRLF to NEWLINE in the new + vstudio project files, and some trivial editing of some files in the + scripts directory. Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. -version 1.4.2rc05 [April 29, 2010] - Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. - Removed dummy_inflate.c and uncompr.c from contrib/pngminim/encoder +Version 1.5.0beta22 [April 28, 2010] + Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS + because it has a macro equivalent. + Improved the options.awk script; added an "everything off" option. + Revised contrib/pngminim to use the "everything off" option in pngusr.dfa. + +Version 1.5.0beta23 [April 29, 2010] + Corrected PNG_REMOVED macro to take five arguments. + The macro was documented with two arguments (name,ordinal), however + the symbol checking .dfn files assumed five arguments. The five + argument form seems more useful so it is changed to that. Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED in gregbook/readpng2.c Corrected protection of png_get_user_transform_ptr. The API declaration in png.h is removed if both READ and WRITE USER_TRANSFORM are turned off but was left defined in pngtrans.c + Added logunsupported=1 to cause pnglibconf.h to document disabled options. + This makes the installed pnglibconf.h more readable but causes no + other change. The intention is that users of libpng will find it + easier to understand if an API they need is missing. + Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. + Removed dummy_inflate.c from contrib/pngminim/encoder + Removed contrib/pngminim/*/gather.sh; gathering is now done in the makefile. -version 1.4.2rc06 [May 3, 2010] - Moved declarations of umsg[] inside the proper #ifdef blocks in pngrutil.c +Version 1.5.0beta24 [May 7, 2010] + Use bitwise "&" instead of arithmetic mod in pngrutil.c calculation of the + offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf. + Added more blank lines for readability. -version 1.4.2 [May 6, 2010] - -version 1.4.3beta01 [June 18, 2010] - Added missing quotation marks in the aix block of configure.ac - The new "vstudio" project was missing from the zip and 7z distributions. +Version 1.5.0beta25 [June 18, 2010] In pngpread.c: png_push_have_row() add check for new_row > height - -version 1.4.3beta02 [June 18, 2010] Removed the now-redundant check for out-of-bounds new_row from example.c -version 1.4.3beta03 [June 18, 2010] - In pngpread.c: png_push_finish_row() add check for too many rows. - -version 1.4.3beta04 [June 19, 2010] +Version 1.5.0beta26 [June 18, 2010] In pngpread.c: png_push_process_row() add check for too many rows. - Removed the checks added in beta01 and beta03, as they are now redundant. -version 1.4.3beta05 [June 20, 2010] +Version 1.5.0beta27 [June 18, 2010] + Removed the check added in beta25 as it is now redundant. + +Version 1.5.0beta28 [June 20, 2010] Rewrote png_process_IDAT_data to consistently treat extra data as warnings and handle end conditions more cleanly. - Removed the new (beta04) check in png_push_process_row(). + Removed the new (beta26) check in png_push_process_row(). -version 1.4.3rc01 [June 21, 2010] - Revised some comments in png_process_IDAT_data(). +Version 1.5.0beta29 [June 21, 2010] + Revised scripts/options.awk to work on Sunos (but still doesn't work) + Added comment to options.awk and contrib/pngminim/*/makefile to try nawk. -version 1.4.3rc02 [June 22, 2010] - Changed char *msg to PNG_CONST char *msg in pngrutil.c +Version 1.5.0beta30 [June 22, 2010] Stop memory leak when reading a malformed sCAL chunk. + +Version 1.5.0beta31 [June 26, 2010] + Revised pngpread.c patch of beta28 to avoid an endless loop. Removed some trailing blanks. -version 1.4.3rc03 [June 23, 2010] - Revised pngpread.c patch of beta05 to avoid an endless loop. +Version 1.5.0beta32 [June 26, 2010] + Removed leftover scripts/options.patch and scripts/options.rej -version 1.4.3 [June 26, 2010] - Updated some of the "last changed" dates. +Version 1.5.0beta33 [July 6, 3010] + Made FIXED and FLOATING options consistent in the APIs they enable and + disable. Corrected scripts/options.awk to handle both command line + options and options specified in the .dfa files. + Changed char *msg to PNG_CONST char *msg in pngrutil.c + Make png_set_sRGB_gAMA_and_cHRM set values using either the fixed or + floating point APIs, but not both. + Reversed patch to remove error handler when the jmp_buf is stored in the + main program structure, not the png_struct. + The error handler is needed because the default handler in libpng will + always use the jmp_buf in the library control structure; this is never + set. The gregbook code is a useful example because, even though it + uses setjmp/longjmp, it shows how error handling can be implemented + using control mechanisms not directly supported by libpng. The + technique will work correctly with mechanisms such as Microsoft + Structure Exceptions or C++ exceptions (compiler willing - note that gcc + does not by default support interworking of C and C++ error handling.) + Reverted changes to call png_longjmp in contrib/gregbook where it is not + appropriate. If mainprog->jmpbuf is used by setjmp, then png_longjmp + cannot be used. + Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans) + Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {') -Send comments/corrections/commendations to glennrp at users.sourceforge.net -or to png-mng-implement at lists.sf.net (subscription required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement). +Version 1.5.0beta34 [July 12, 2010] + Put #ifndef PNG_EXTERN, #endif around the define PNG_EXTERN in pngpriv.h + +Version 1.5.0beta35 [July 24, 2010] + Removed some newly-added TAB characters. + Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2 + Moved the definition of png_snprintf() outside of the enclosing + #ifdef blocks in pngconf.h + +Version 1.5.0beta36 [July 29, 2010] + Patches by John Bowler: + Fixed point APIs are now supported throughout (no missing APIs). + Internal fixed point arithmetic support exists for all internal floating + point operations. + sCAL validates the floating point strings it is passed. + Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2 + Two new APIs exist to get the number of passes without turning on the + PNG_INTERLACE transform and to get the number of rows in the current + pass. + A new test program, pngvalid.c, validates the gamma code. + Errors in the 16 bit gamma correction (overflows) have been corrected. + cHRM chunk testing is done consistently (previously the floating point + API bypassed it, because the test really didn't work on FP, now the test + is performed on the actual values to be stored in the PNG file so it + works in the FP case too.) + Most floating point APIs now simply call the fixed point APIs after + converting the values to the fixed point form used in the PNG file. + The standard headers no longer include zlib.h, which is currently only + required for pngstruct.h and can therefore be internal. + Revised png_get_int_32 to undo the PNG two's complement representation of + negative numbers. + +Version 1.5.0beta37 [July 30, 2010] + Added a typecast in png_get_int_32() in png.h and pngrutil.h to avoid + a compiler warning. + Replaced oFFs 0,0 with oFFs -10,20 in pngtest.png + +Version 1.5.0beta38 [July 31, 2010] + Implemented remaining "_fixed" functions. + Corrected a number of recently introduced warnings mostly resulting from + safe but uncast assignments to shorter integers. Also added a zlib + VStudio release library project because the latest zlib Official Windows + build does not include such a thing. + Revised png_get_int_16() to be similar to png_get_int_32(). + Restored projects/visualc71. + +Version 1.5.0beta39 [August 2, 2010] + VisualC/GCC warning fixes, VisualC build fixes + The changes include support for function attributes in VC in addition to + those already present in GCC - necessary because without these some + warnings are unavoidable. Fixes include signed/unsigned fixes in + pngvalid and checks with gcc -Wall -Wextra -Wunused. + VC requires function attributes on function definitions as well as + declarations, PNG_FUNCTION has been added to enable this and the + relevant function definitions changed. + +Version 1.5.0beta40 [August 6, 2010] + Correct use of _WINDOWS_ in pngconf.h + Removed png_mem_ #defines; they are no longer used. + Added the sRGB chunk to pngtest.png + +Version 1.5.0beta41 [August 11, 2010] + Added the cHRM chunk to pngtest.png + Don't try to use version-script with cygwin/mingw. + Revised contrib/gregbook to work under cygwin/mingw. + +Version 1.5.0beta42 [August 18, 2010] + Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov) + Made all API functions that have const arguments and constant string + literal pointers declare them (John Bowler). + +Version 1.5.0beta43 [August 20, 2010] + Removed spurious tabs, shorten long lines (no source change) + Also added scripts/chkfmt to validate the format of all the files that can + reasonably be validated (it is suggested to run "make distclean" before + checking, because some machine generated files have long lines.) + Reformatted the CHANGES file to be more consistent throughout. + Made changes to address various issues identified by GCC, mostly + signed/unsigned and shortening problems on assignment but also a few + difficult to optimize (for GCC) loops. + Fixed non-GCC fixed point builds. In png.c a declaration was misplaced + in an earlier update. Fixed to declare the auto variables at the head. + Use cexcept.h in pngvalid.c. + +Version 1.5.0beta44 [August 24, 2010] + Updated CMakeLists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for + installing libpng in /usr/lib64 (Funda Wang). + Revised CMakeLists.txt to put the man pages in share/man/man* not man/man* + Revised CMakeLists.txt to make symlinks instead of copies when installing. + Changed PNG_LIB_NAME from pngNN to libpngNN in CMakeLists.txt (Philip Lowman) + Implemented memory checks within pngvalid + Reformatted/rearranged pngvalid.c to assist use of progressive reader. + Check interlaced images in pngvalid + Clarified pngusr.h comments in pnglibconf.dfa + Simplified the pngvalid error-handling code now that cexcept.h is in place. + Implemented progressive reader in pngvalid.c for standard tests + Implemented progressive read in pngvalid.c gamma tests + Turn on progressive reader in pngvalid.c by default and tidy code. + +Version 1.5.0beta45 [August 26, 2010] + Added an explicit make step to projects/vstudio for pnglibconf.h + Also corrected zlib.vcxproj into which Visual Studio had introduced + what it calls an "authoring error". The change to make pnglibconf.h + simply copies the file; in the future it may actually generate the + file from scripts/pnglibconf.dfa as the other build systems do. + Changed pngvalid to work when floating point APIs are disabled + Renamed the prebuilt scripts/pnglibconf.h to scripts/pnglibconf.h.prebuilt + Supply default values for PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX + in pngpriv.h in case the user neglected to define them in their pngusr.h + +Version 1.5.0beta46 [August 28, 2010] + Added new private header files to libpng_sources in CMakeLists.txt + Added PNG_READ_16BIT, PNG_WRITE_16BIT, and PNG_16BIT options. + Added reference to scripts/pnglibconf.h.prebuilt in the visualc71 project. + +Version 1.5.0beta47 [September 11, 2010] + Fixed a number of problems with 64-bit compilation reported by Visual + Studio 2010 (John Bowler). + +Version 1.5.0beta48 [October 4, 2010] + Updated CMakeLists.txt (Philip Lowman). + Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER, + $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE + Fixed problem with symbols creation in Makefile.am which was assuming that + all versions of ccp write to standard output by default (Martin Banky). The + bug was introduced in libpng-1.2.9beta5. + Removed unused mkinstalldirs. + +Version 1.5.0beta49 [October 8, 2010] + Undid Makefile.am revision of 1.5.0beta48. + +Version 1.5.0beta50 [October 14, 2010] + Revised Makefile.in to account for mkinstalldirs being removed. + Added some "(unsigned long)" typecasts in printf statements in pngvalid.c. + Suppressed a compiler warning in png_handle_sPLT(). + Check for out-of-range text compression mode in png_set_text(). + +Version 1.5.0beta51 [October 15, 2010] + Changed embedded dates to "(PENDING RELEASE) in beta releases (and future + rc releases) to minimize the difference between releases. + +Version 1.5.0beta52 [October 16, 2010] + Restored some of the embedded dates (in png.h, png.c, documentation, etc.) + +Version 1.5.0beta53 [October 18, 2010] + Updated INSTALL to mention using "make maintainer-clean" and to remove + obsolete statement about a custom ltmain.sh + Disabled "color-tests" by default in Makefile.am so it will work with + automake versions earlier than 1.11.1 + Use document name "libpng-manual.txt" instead of "libpng-.txt" + to simplify version differences. + Removed obsolete remarks about setjmp handling from INSTALL. + Revised and renamed the typedef in png.h and png.c that was designed + to catch library and header mismatch. + +Version 1.5.0beta54 [November 10, 2010] + Require 48 bytes, not 64 bytes, for big_row_buf in overflow checks. + Used a consistent structure for the pngget.c functions. + +Version 1.5.0beta55 [November 21, 2010] + Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin) + Moved reading of file signature into png_read_sig (Cosmin) + Fixed atomicity of chunk header serialization (Cosmin) + Added test for io_state in pngtest.c (Cosmin) + Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts. + Changes to remove gcc warnings (John Bowler) + Certain optional gcc warning flags resulted in warnings in libpng code. + With these changes only -Wconversion and -Wcast-qual cannot be turned on. + Changes are trivial rearrangements of code. -Wconversion is not possible + for pngrutil.c (because of the widespread use of += et al on variables + smaller than (int) or (unsigned int)) and -Wcast-qual is not possible + with pngwio.c and pngwutil.c because the 'write' callback and zlib + compression both fail to declare their input buffers with 'const'. + +Version 1.5.0beta56 [December 7, 2010] + Added the private PNG_UNUSED() macro definition in pngpriv.h. + Added some commentary about PNG_EXPORT in png.h and pngconf.h + Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the + objective of simplifying and improving the cosmetic appearance of png.h. + Fixed some incorrect "=" macro names in pnglibconf.dfa + Included documentation of changes in 1.5.0 from 1.4.x in libpng-manual.txt + +Version 1.5.0beta57 [December 9, 2010] + Documented the pngvalid gamma error summary with additional comments and + print statements. + Improved missing symbol handling in checksym.awk; symbols missing in both + the old and new files can now be optionally ignored, treated as errors + or warnings. + Removed references to pngvcrd.c and pnggccrd.c from the vstudio project. + Updated "libpng14" to "libpng15" in the visualc71 project. + Enabled the strip16 tests in pngvalid.` + Don't display test results (except PASS/FAIL) when running "make test". + Instead put them in pngtest-log.txt + Added "--with-zprefix=" to configure.ac + Updated the prebuilt configuration files to autoconf version 2.68 + +Version 1.5.0beta58 [December 19, 2010] + Fixed interlace image handling and add test cases (John Bowler) + Fixed the clean rule in Makefile.am to remove pngtest-log.txt + Made minor changes to work around warnings in gcc 3.4 + +Version 1.5.0rc01 [December 27, 2010] + No changes. + +Version 1.5.0rc02 [December 27, 2010] + Eliminated references to the scripts/*.def files in project/visualc71. + +Version 1.5.0rc03 [December 28, 2010] + Eliminated scripts/*.def and revised Makefile.am accordingly + +Version 1.5.0rc04 [December 29, 2010] + Fixed bug in background transformation handling in pngrtran.c (it was + looking for the flag in png_ptr->transformations instead of in + png_ptr->flags) (David Raymond). + +Version 1.5.0rc05 [December 31, 2010] + Fixed typo in a comment in CMakeLists.txt (libpng14 => libpng15) (Cosmin) + +Version 1.5.0rc06 [January 4, 2011] + Changed the new configure option "zprefix=string" to "zlib-prefix=string" + +Version 1.5.0rc07 [January 4, 2011] + Updated copyright year. + +Version 1.5.0 [January 6, 2011] + No changes. + +version 1.5.1beta01 [January 8, 2011] + Added description of png_set_crc_action() to the manual. + Added a note in the manual that the type of the iCCP profile was changed + from png_charpp to png_bytepp in png_get_iCCP(). This change happened + in version 1.5.0beta36 but is not noted in the CHANGES. Similarly, + it was changed from png_charpp to png_const_bytepp in png_set_iCCP(). + Ensure that png_rgb_to_gray ignores palette mapped images, if libpng + internally happens to call it with one. + Fixed a failure to handle palette mapped images correctly. + +Version 1.5.1beta02 [January 14, 2011] + Fixed a bug in handling of interlaced images (bero at arklinux.org). + Updated CMakeLists.txt (Clifford Yapp) + +Version 1.5.1beta03 [January 14, 2011] + Fixed typecasting of some png_debug() statements (Cosmin) + +Version 1.5.1beta04 [January 16, 2011] + Updated documentation of png_set|get_tRNS() (Thomas Klausner). + Mentioned in the documentation that applications must #include "zlib.h" + if they need access to anything in zlib.h, and that a number of + macros such as png_memset() are no longer accessible by applications. + Corrected pngvalid gamma test "sample" function to access all of the color + samples of each pixel, instead of sampling the red channel three times. + Prefixed variable names index, div, exp, gamma with "png_" to avoid "shadow" + warnings, and (mistakenly) changed png_exp() to exp(). + +Version 1.5.1beta05 [January 16, 2011] + Changed variable names png_index, png_div, png_exp, and png_gamma to + char_index, divisor, exp_b10, and gamma_val, respectively, and + changed exp() back to png_exp(). + +Version 1.5.1beta06 [January 20, 2011] + Prevent png_push_crc_skip() from hanging while reading an unknown chunk + or an over-large compressed zTXt chunk with the progressive reader. + Eliminated more GCC "shadow" warnings. + Revised png_fixed() in png.c to avoid compiler warning about reaching the + end without returning anything. + +Version 1.5.1beta07 [January 22, 2011] + In the manual, describe the png_get_IHDR() arguments in the correct order. + Added const_png_structp and const_png_infop types, and used them in + prototypes for most png_get_*() functions. + +Version 1.5.1beta08 [January 23, 2011] + Added png_get_io_chunk_type() and deprecated png_get_io_chunk_name() + Added synopses for the IO_STATE functions and other missing synopses + to the manual. Removed the synopses from libpngpf.3 because they + were out of date and no longer useful. Better information can be + obtained by reading the prototypes and comments in pngpriv.h + Attempted to fix cpp on Solaris with S. Studio 12 cc, fix build + Added a make macro DFNCPP that is a CPP that will accept the tokens in + a .dfn file and adds configure stuff to test for such a CPP. ./configure + should fail if one is not available. + Corrected const_png_ in png.h to png_const_ to avoid polluting the namespace. + Added png_get_current_row_number and png_get_current_pass_number for the + benefit of the user transform callback. + Added png_process_data_pause and png_process_data_skip for the benefit of + progressive readers that need to stop data processing or want to optimize + skipping of unread data (e.g., if the reader marks a chunk to be skipped.) + +Version 1.5.1beta09 [January 24, 2011] + Enhanced pngvalid, corrected an error in gray_to_rgb, corrected doc error. + pngvalid contains tests of transforms, which tests are currently disabled + because they are incompletely tested. gray_to_rgb was failing to expand + the bit depth for smaller bit depth images; this seems to be a long + standing error and resulted, apparently, in invalid output. The + documentation did not accurately describe what libpng really does when + converting RGB to gray. + +Version 1.5.1beta10 [January 27, 2010] + Fixed incorrect examples of callback prototypes in the manual, that were + introduced in libpng-1.0.0. + In addition the order of the png_get_uint macros with respect to the + relevant function definitions has been reversed. This helps the + preprocessing of the symbol files be more robust. Furthermore, the + symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS even when + the library may actually be built with PNG_USE_READ_MACROS; this stops + the read macros interfering with the symbol file format. + Made the manual, synopses, and function prototypes use the function + argument names file_gamma, int_file_gamma, and srgb_intent consistently. + +Version 1.5.1beta11 [January 28, 2011] + Changed PNG_UNUSED from "param=param;" to "{if(param){}}". + Corrected local variable type in new API png_process_data_skip() + The type was self-evidently incorrect but only causes problems on 64 bit + architectures. + Added transform tests to pngvalid and simplified the arguments. + +Version 1.5.1rc01 [January 29, 2011] + No changes. + +Version 1.5.1rc02 [January 31, 2011] + Added a request in the manual that applications do not use "png_" or + "PNG_" to begin any of their own symbols. + Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h + +Version 1.5.1 [February 3, 2011] + No changes. + +Version 1.5.2beta01 [February 13, 2011] + More -Wshadow fixes for older gcc compilers. Older gcc versions apparently + check formal parameters names in function declarations (as well as + definitions) to see if they match a name in the global namespace. + Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the + old VisualC++ preprocessor. + Turned on interlace handling in png_read_png(). + Fixed gcc pendantic warnings. + Handle longjmp in Cygwin. + Fixed png_get_current_row_number() in the interlaced case. + Cleaned up ALPHA flags and transformations. + Implemented expansion to 16 bits. + +Version 1.5.2beta02 [February 19, 2011] + Fixed mistake in the descriptions of user read_transform and write_transform + function prototypes in the manual. The row_info struct is png_row_infop. + Reverted png_get_current_row_number() to previous (1.5.2beta01) behavior. + Corrected png_get_current_row_number documentation + Fixed the read/write row callback documentation. + This documents the current behavior, where the callback is called after + every row with information pertaining to the next row. + +Version 1.5.2beta03 [March 3, 2011] + Fixed scripts/makefile.vcwin32 + Updated contrib/pngsuite/README to add the word "modify". + Define PNG_ALLOCATED to blank when _MSC_VER<1300. + +Version 1.5.2rc01 [March 19, 2011] + Define remaining attributes to blank when MSC_VER<1300. + ifdef out mask arrays in pngread.c when interlacing is not supported. + +Version 1.5.2rc02 [March 22, 2011] + Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak + and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip" + from the makefiles. + Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail + to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill) + +Version 1.5.2rc03 [March 24, 2011] + Don't include standard header files in png.h while building the symbol table, + to avoid cpp failure on SunOS (introduced PNG_BUILDING_SYMBOL_TABLE macro). + +Version 1.5.2 [March 31, 2011] + +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) +or to glennrp at users.sourceforge.net Glenn R-P */ } diff --git a/dll/3rdparty/libpng/docs/INSTALL b/dll/3rdparty/libpng/docs/INSTALL index 584ac048eac..353bfff3268 100644 --- a/dll/3rdparty/libpng/docs/INSTALL +++ b/dll/3rdparty/libpng/docs/INSTALL @@ -1,5 +1,5 @@ -Installing libpng version 1.4.3 - June 26, 2010 +Installing libpng On Unix/Linux and similar systems, you can simply type @@ -13,10 +13,16 @@ If configure does not work on your system and you have a reasonably up-to-date set of tools, running ./autogen.sh before running ./configure may fix the problem. You can also run the individual commands in autogen.sh with the --force option, if supported by your version of -the tools. If you run 'libtoolize --force', though, this will replace -the distributed, patched, version of ltmain.sh with an unpatched version -and your shared library builds may fail to produce libraries with the -correct version numbers. +the tools. To be really sure that you aren't using any of the included +pre-built scripts, you can do this: + + ./configure --enable-maintainer-mode + make maintainer-clean + ./autogen.sh + ./configure [--prefix=/path] [other options] + make + make install + make check Instead, you can use one of the custom-built makefiles in the "scripts" directory @@ -46,8 +52,8 @@ to have access to the zlib.h and zconf.h include files that correspond to the version of zlib that's installed. You can rename the directories that you downloaded (they -might be called "libpng-1.4.3" or "libpng14" and "zlib-1.2.3" -or "zlib123") so that you have directories called "zlib" and "libpng". +might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.5" +or "zlib125") so that you have directories called "zlib" and "libpng". Your directory structure should look like this: @@ -70,13 +76,12 @@ Your directory structure should look like this: pngsuite visupng projects - cbuilder5 (Borland) - visualc6 (msvc) visualc71 - xcode + vstudio scripts makefile.* *.def (module definition files) + etc. pngtest.png etc. zlib @@ -107,7 +112,7 @@ scripts directory into this directory, for example Read the makefile to see if you need to change any source or target directories to match your preferences. -Then read pngconf.h to see if you want to make any configuration +Then read pnglibconf.dfa to see if you want to make any configuration changes. Then just run "make" which will create the libpng library in @@ -125,19 +130,6 @@ do that, run "make install" in the zlib directory first if necessary). Some also allow you to run "make test-installed" after you have run "make install". -If you encounter a compiler error message complaining about the -lines - - __png.h__ already includes setjmp.h; - __dont__ include it again.; - -this means you have compiled another module that includes setjmp.h, -which is hazardous because the two modules might not include exactly -the same setjmp.h. If you are sure that you know what you are doing -and that they are exactly the same, then you can comment out or -delete the two lines. Better yet, use the cexcept interface -instead, as demonstrated in contrib/visupng of the libpng distribution. - -Further information can be found in the README and libpng.txt +Further information can be found in the README and libpng-manual.txt files, in the individual makefiles, in png.h, and the manual pages libpng.3 and png.5. diff --git a/dll/3rdparty/libpng/docs/LICENSE b/dll/3rdparty/libpng/docs/LICENSE index dd89a668478..6e4808cc0bc 100644 --- a/dll/3rdparty/libpng/docs/LICENSE +++ b/dll/3rdparty/libpng/docs/LICENSE @@ -10,8 +10,8 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.4.3, June 26, 2010, are -Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are +libpng versions 1.2.6, August 15, 2004, through 1.5.2, March 31, 2011, are +Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -108,4 +108,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -June 26, 2010 +March 31, 2011 diff --git a/dll/3rdparty/libpng/docs/README b/dll/3rdparty/libpng/docs/README index 799f3ebe022..6a7cb33b212 100644 --- a/dll/3rdparty/libpng/docs/README +++ b/dll/3rdparty/libpng/docs/README @@ -1,4 +1,4 @@ -README for libpng version 1.4.3 - June 26, 2010 (shared library 14.0) +README for libpng version 1.5.2 - March 31, 2011 (shared library 15.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. @@ -58,7 +58,7 @@ on the PNG-implement mailing list and not on material submitted privately to Guy, Andreas, or Glenn. They will forward any good suggestions to the list. -For a detailed description on using libpng, read libpng.txt. For +For a detailed description on using libpng, read libpng-manual.txt. For examples of libpng in a program, see example.c and pngtest.c. For usage information and restrictions (what little they are) on libpng, see png.h. For a description on using zlib (the compression library used by @@ -141,13 +141,17 @@ Files in this distribution: TODO => Things not implemented in the current library Y2KINFO => Statement of Y2K compliance example.c => Example code for using libpng functions - libpng.3 => manual page for libpng (includes libpng.txt) - libpng.txt => Description of libpng and its functions + libpng.3 => manual page for libpng (includes libpng-manual.txt) + libpng-manual.txt => Description of libpng and its functions libpngpf.3 => manual page for libpng's private functions png.5 => manual page for the PNG format png.c => Basic interface functions common to library - png.h => Library function and interface declarations - pngconf.h => System specific library configuration + png.h => Library function and interface declarations (public) + pngpriv.h => Library function and interface declarations (private) + pngconf.h => System specific library configuration (public) + pngstruct.h => png_struct declaration (private) + pnginfo.h => png_info struct declaration (private) + pngdebug.h => debugging macros (private) pngerror.c => Error/warning message I/O functions pngget.c => Functions for retrieving info from struct pngmem.c => Memory handling functions @@ -176,72 +180,16 @@ Files in this distribution: visupng => Contains a MSVC workspace for VisualPng projects => Contains project files and workspaces for building a DLL - c5builder => Contains a Borland workspace for building + cbuilder5 => Contains a Borland workspace for building libpng and zlib visualc6 => Contains a Microsoft Visual C++ (MSVC) workspace for building libpng and zlib + visualc71 => Contains a Microsoft Visual C++ (MSVC) + workspace for building libpng and zlib + xcode => Contains an Apple xcode + workspace for building libpng and zlib scripts => Directory containing scripts for building libpng: - descrip.mms => VMS makefile for MMS or MMK - makefile.std => Generic UNIX makefile (cc, creates static - libpng.a) - makefile.elf => Linux/ELF makefile symbol versioning, - gcc, creates libpng14.so.14.1.4.3) - makefile.linux => Linux/ELF makefile - (gcc, creates libpng14.so.14.1.4.3) - makefile.gcc => Generic makefile (gcc, creates static libpng.a) - makefile.knr => Archaic UNIX Makefile that converts files with - ansi2knr (Requires ansi2knr.c from - ftp://ftp.cs.wisc.edu/ghost) - makefile.aix => AIX makefile - makefile.cygwin => Cygwin/gcc makefile - makefile.darwin => Darwin makefile - makefile.dec => DEC Alpha UNIX makefile - makefile.freebsd => FreeBSD makefile - makefile.hpgcc => HPUX makefile using gcc - makefile.hpux => HPUX (10.20 and 11.00) makefile - makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit - makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) - makefile.intel => Intel C/C++ version 4.0 and later - makefile.mingw => Mingw/gcc makefile - makefile.netbsd => NetBSD/cc makefile, makes libpng.so. - makefile.ne14bsd => NetBSD/cc makefile, makes - libpng14.so - makefile.openbsd => OpenBSD makefile - makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) - makefile.sggcc => Silicon Graphics - (gcc, creates libpng14.so.14.1.4.3) - makefile.sunos => Sun makefile - makefile.solaris => Solaris 2.X makefile - (gcc, creates libpng14.so.14.1.4.3) - makefile.so9 => Solaris 9 makefile - (gcc, creates libpng14.so.14.1.4.3) - makefile.32sunu => Sun Ultra 32-bit makefile - makefile.64sunu => Sun Ultra 64-bit makefile - makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc - makefile.mips => MIPS makefile - makefile.acorn => Acorn makefile - makefile.amiga => Amiga makefile - smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC - compiler (Requires SCOPTIONS, copied from - scripts/SCOPTIONS.ppc) - makefile.atari => Atari makefile - makefile.beos => BEOS makefile for X86 - makefile.bor => Borland makefile (uses bcc) - makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) - makefile.tc3 => Turbo C 3.0 makefile - makefile.dj2 => DJGPP 2 makefile - makefile.msc => Microsoft C makefile - makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and - later (does not use assembler code) - makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) - png32ce.def => module definition for makefile.cegccg - pngos2.def => OS/2 module definition file used by - makefile.os2 - pngwin.def => module definition file used by - makefile.cygwin and makefile.mingw - makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model - makevms.com => VMS build script - SCOPTIONS.ppc => Used with smakefile.ppc + (see scripts/README.txt for the list of scripts) Good luck, and happy coding. diff --git a/dll/3rdparty/libpng/docs/TODO b/dll/3rdparty/libpng/docs/TODO index 0af8d827a46..6e1f028bd75 100644 --- a/dll/3rdparty/libpng/docs/TODO +++ b/dll/3rdparty/libpng/docs/TODO @@ -2,14 +2,12 @@ TODO - list of things to do for libpng: Final bug fixes. -Improve API by hiding the png_struct and png_info structs. -Finish work on the no-floating-point version (including gamma compensation) Better C++ wrapper/full C++ implementation? Fix problem with C++ and EXTERN "C". cHRM transformation. -Improve setjmp/longjmp usage or remove it in favor of returning error codes. +Remove setjmp/longjmp usage in favor of returning error codes. Add "grayscale->palette" transformation and "palette->grayscale" detection. -Improved quantizing and dithering. +Improved dithering. Multi-lingual error and warning message support. Complete sRGB transformation (presently it simply uses gamma=0.45455). Man pages for function calls. @@ -18,14 +16,12 @@ Better filter selection (counting huffman bits/precompression? filter inertia? filter costs?). Histogram creation. Text conversion between different code pages (Latin-1 -> Mac and DOS). -Build gamma tables using fixed point (and do away with floating point entirely). Avoid building gamma tables whenever possible. Use greater precision when changing to linear gamma for compositing against background and doing rgb-to-gray transformation. Investigate pre-incremented loop counters and other loop constructions. Add interpolated method of handling interlacing. -Provide for conditional compilation of 16-bit support (except for the - initial stripping down to 8-bits when reading a 16-bit PNG datastream). Switch to the simpler zlib (zlib/libpng) license if legally possible. +Extend pngvalid.c to validate more of the libpng transformations. */ diff --git a/dll/3rdparty/libpng/docs/example.c b/dll/3rdparty/libpng/docs/example.c index d7391734de1..782c555b7a6 100644 --- a/dll/3rdparty/libpng/docs/example.c +++ b/dll/3rdparty/libpng/docs/example.c @@ -2,15 +2,15 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.4.2 [May 6, 2010] + * Last changed in libpng 1.5.2 [March 31, 2011] * This file has been placed in the public domain by the authors. - * Maintained 1998-2010 Glenn Randers-Pehrson + * Maintained 1998-2011 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ /* This is an example of how to use libpng to read and write PNG files. - * The file libpng.txt is much more verbose then this. If you have not + * The file libpng-manual.txt is much more verbose then this. If you have not * read it, do so first. This was designed to be a starting point of an * implementation. This is not officially part of libpng, is hereby placed * in the public domain, and therefore does not require a copyright notice. @@ -31,7 +31,7 @@ */ #ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +# define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf) #endif /* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp() @@ -286,7 +286,6 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ /* An array of colors to which the image should be quantized */ png_color std_color_cube[MAX_SCREEN_COLORS]; - /* Prior to libpng-1.4.2, this was png_set_dither(). */ png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, NULL, 0); } @@ -656,14 +655,18 @@ void write_png(char *file_name /* , ... other image information ... */) /* Optional significant bit (sBIT) chunk */ png_color_8 sig_bit; + /* If we are dealing with a grayscale image then */ sig_bit.gray = true_bit_depth; + /* Otherwise, if we are dealing with a color image then */ sig_bit.red = true_red_bit_depth; sig_bit.green = true_green_bit_depth; sig_bit.blue = true_blue_bit_depth; + /* If the image has an alpha channel then */ sig_bit.alpha = true_alpha_bit_depth; + png_set_sBIT(png_ptr, info_ptr, &sig_bit); @@ -676,20 +679,21 @@ void write_png(char *file_name /* , ... other image information ... */) text_ptr[0].key = "Title"; text_ptr[0].text = "Mona Lisa"; text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr[0].itxt_length = 0; + text_ptr[0].lang = NULL; + text_ptr[0].lang_key = NULL; text_ptr[1].key = "Author"; text_ptr[1].text = "Leonardo DaVinci"; text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr[1].itxt_length = 0; + text_ptr[1].lang = NULL; + text_ptr[1].lang_key = NULL; text_ptr[2].key = "Description"; text_ptr[2].text = ""; text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; -#ifdef PNG_iTXt_SUPPORTED - text_ptr[0].lang = NULL; - text_ptr[0].lang_key = NULL; - text_ptr[1].lang = NULL; - text_ptr[1].lang_key = NULL; + text_ptr[2].itxt_length = 0; text_ptr[2].lang = NULL; text_ptr[2].lang_key = NULL; -#endif png_set_text(png_ptr, info_ptr, text_ptr, 3); /* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */ @@ -754,6 +758,7 @@ void write_png(char *file_name /* , ... other image information ... */) /* Turn on interlace handling if you are not using png_write_image() */ if (interlacing) number_passes = png_set_interlace_handling(png_ptr); + else number_passes = 1; diff --git a/dll/3rdparty/libpng/docs/libpng-manual.txt b/dll/3rdparty/libpng/docs/libpng-manual.txt new file mode 100644 index 00000000000..46934084601 --- /dev/null +++ b/dll/3rdparty/libpng/docs/libpng-manual.txt @@ -0,0 +1,4214 @@ +libpng-manual.txt - A description on how to use and modify libpng + + libpng version 1.5.2 - March 31, 2011 + Updated and distributed by Glenn Randers-Pehrson + + Copyright (c) 1998-2011 Glenn Randers-Pehrson + + This document is released under the libpng license. + For conditions of distribution and use, see the disclaimer + and license in png.h + + Based on: + + libpng versions 0.97, January 1998, through 1.5.2 - March 31, 2011 + Updated and distributed by Glenn Randers-Pehrson + Copyright (c) 1998-2011 Glenn Randers-Pehrson + + libpng 1.0 beta 6 version 0.96 May 28, 1997 + Updated and distributed by Andreas Dilger + Copyright (c) 1996, 1997 Andreas Dilger + + libpng 1.0 beta 2 - version 0.88 January 26, 1996 + For conditions of distribution and use, see copyright + notice in png.h. Copyright (c) 1995, 1996 Guy Eric + Schalnat, Group 42, Inc. + + Updated/rewritten per request in the libpng FAQ + Copyright (c) 1995, 1996 Frank J. T. Wojcik + December 18, 1995 & January 20, 1996 + +I. Introduction + +This file describes how to use and modify the PNG reference library +(known as libpng) for your own use. There are five sections to this +file: introduction, structures, reading, writing, and modification and +configuration notes for various special platforms. In addition to this +file, example.c is a good starting point for using the library, as +it is heavily commented and should include everything most people +will need. We assume that libpng is already installed; see the +INSTALL file for instructions on how to install libpng. + +For examples of libpng usage, see the files "example.c", "pngtest.c", +and the files in the "contrib" directory, all of which are included in +the libpng distribution. + +Libpng was written as a companion to the PNG specification, as a way +of reducing the amount of time and effort it takes to support the PNG +file format in application programs. + +The PNG specification (second edition), November 2003, is available as +a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2003 (E)) at +. It is technically equivalent +to the PNG specification (second edition) but has some additional material. + +The PNG-1.0 specification is available +as RFC 2083 and as a +W3C Recommendation . + +Some additional chunks are described in the special-purpose public chunks +documents at . + +Other information +about PNG, and the latest version of libpng, can be found at the PNG home +page, . + +Most users will not have to modify the library significantly; advanced +users may want to modify it more. All attempts were made to make it as +complete as possible, while keeping the code easy to understand. +Currently, this library only supports C. Support for other languages +is being considered. + +Libpng has been designed to handle multiple sessions at one time, +to be easily modifiable, to be portable to the vast majority of +machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy +to use. The ultimate goal of libpng is to promote the acceptance of +the PNG file format in whatever way possible. While there is still +work to be done (see the TODO file), libpng should cover the +majority of the needs of its users. + +Libpng uses zlib for its compression and decompression of PNG files. +Further information about zlib, and the latest version of zlib, can +be found at the zlib home page, . +The zlib compression utility is a general purpose utility that is +useful for more than PNG files, and can be used without libpng. +See the documentation delivered with zlib for more details. +You can usually find the source files for the zlib utility wherever you +find the libpng source files. + +Libpng is thread safe, provided the threads are using different +instances of the structures. Each thread should have its own +png_struct and png_info instances, and thus its own image. +Libpng does not protect itself against two threads using the +same instance of a structure. + +II. Structures + +There are two main structures that are important to libpng, png_struct +and png_info. Both are internal structures that are no longer exposed +in the libpng interface (as of libpng 1.5.0). + +The png_info structure is designed to provide information about the +PNG file. At one time, the fields of png_info were intended to be +directly accessible to the user. However, this tended to cause problems +with applications using dynamically loaded libraries, and as a result +a set of interface functions for png_info (the png_get_*() and png_set_*() +functions) was developed. + +The png_struct structure is the object used by the library to decode a +single image. As of 1.5.0 this structure is also not exposed. + +Almost all libpng APIs require a pointer to a png_struct as the first argument. +Many (in particular the png_set and png_get APIs) also require a pointer +to png_info as the second argument. Some application visible macros +defined in png.h designed for basic data access (reading and writing +integers in the PNG format) break this rule, but it's almost always safe +to assume that a (png_struct*) has to be passed to call an API function. + +The png.h header file is an invaluable reference for programming with libpng. +And while I'm on the topic, make sure you include the libpng header file: + +#include + +Types + +The png.h header file defines a number of integral types used by the +APIs. Most of these are fairly obvious; for example types corresponding +to integers of particular sizes and types for passing color values. + +One exception is how non-integral numbers are handled. For application +convenience most APIs that take such numbers have C (double) arguments, +however internally PNG, and libpng, use 32 bit signed integers and encode +the value by multiplying by 100,000. As of libpng 1.5.0 a convenience +macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point) +which is simply (png_int_32). + +All APIs that take (double) arguments also have an matching API that +takes the corresponding fixed point integer arguments. The fixed point +API has the same name as the floating point one with _fixed appended. +The actual range of values permitted in the APIs is frequently less than +the full range of (png_fixed_point) (-21474 to +21474). When APIs require +a non-negative argument the type is recorded as png_uint_32 above. Consult +the header file and the text below for more information. + +Special care must be take with sCAL chunk handling because the chunk itself +uses non-integral values encoded as strings containing decimal floating point +numbers. See the comments in the header file. + +Configuration + +The main header file function declarations are frequently protected by C +preprocessing directives of the form: + + #ifdef PNG_feature_SUPPORTED + declare-function + #endif + +The library can be built without support for these APIs, although a +standard build will have all implemented APIs. Application programs +should check the feature macros before using an API for maximum +portability. From libpng 1.5.0 the feature macros set during the build +of libpng are recorded in the header file "pnglibconf.h" and this file +is always included by png.h. + +If you don't need to change the library configuration from the default skip to +the next section ("Reading"). + +Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all +of the build project files in the 'projects' directory simply copy +scripts/pnglibconf.h.prebuilt to pnglibconf.h. This means that these build +systems do not permit easy auto-configuration of the library - they only +support the default configuration. + +The easiest way to make minor changes to the libpng configuration when +auto-configuration is supported is to add definitions to the command line +using (typically) CPPFLAGS. For example: + +CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC + +will change the internal libpng math implementation for gamma correction and +other arithmetic calculations to fixed point, avoiding the need for fast +floating point support. The result can be seen in the generated pnglibconf.h - +make sure it contains the changed feature macro setting. + +If you need to make more extensive configuration changes - more than one or two +feature macro settings - you can either add -DPNG_USER_CONFIG to the build +command line and put a list of feature macro settings in pngusr.h or you can set +DFA_XTRA (a makefile variable) to a file containing the same information in the +form of 'option' settings. + +A. Changing pnglibconf.h + +A variety of methods exist to build libpng. Not all of these support +reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be +rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand. + +Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt and changing +the lines defining the supported features, paying very close attention to the +'option' information in scripts/pnglibconf.dfa that describes those features and +their requirements. This is easy to get wrong. + +B. Configuration using DFA_XTRA + +Rebuilding from pnglibconf.dfa is easy if a functioning 'awk', or a later +variant such as 'nawk' or 'gawk', is available. The configure build will +automatically find an appropriate awk and build pnglibconf.h. +scripts/pnglibconf.mak contains a set of make rules for doing the same thing if +configure is not used, and many of the makefiles in the scripts directory use +this approach. + +When rebuilding simply write new file containing changed options and set +DFA_XTRA to the name of this file. This causes the build to append the new file +to the end of scripts/pnglibconf.dfa. pngusr.dfa should contain lines of the +following forms: + +everything = off + +This turns all optional features off. Include it at the start of pngusr.dfa to +make it easier to build a minimal configuration. You will need to turn at least +some features on afterward to enable either reading or writing code, or both. + +option feature on +option feature off + +Enable or disable a single feature. This will automatically enable other +features required by a feature that is turned on or disable other features that +require a feature which is turned off. Conflicting settings will cause an error +message to be emitted by awk. + +setting feature default value + +Changes the default value of setting 'feature' to 'value'. There are a small +number of settings listed at the top of pnglibconf.h, they are documented in the +source code. Most of these values have performance implications for the library +but most of them have no visible effect on the API. Some can also be overridden +from the API. + +C. Configuration using PNG_USR_CONFIG + +If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file +pngusr.h will automatically be included before the options in +scripts/pnglibconf.dfa are processed. pngusr.h should contain only macro +definitions turning features on or off or setting settings. + +Apart from the global setting "everything = off" all the options listed above +can be set using macros in pngusr.h: + +#define PNG_feature_SUPPORTED + +is equivalent to: + +option feature on + +#define PNG_NO_feature + +is equivalent to: + +option feature off + +#define PNG_feature value + +is equivalent to: + +setting feature default value + +Notice that in both cases, pngusr.dfa and pngusr.h, the contents of the +pngusr file you supply override the contents of scripts/pnglibconf.dfa + +If confusing or incomprehensible behavior results it is possible to +examine the intermediate file pnglibconf.dfn to find the full set of +dependency information for each setting and option. Simply locate the +feature in the file and read the C comments that precede it. + +III. Reading + +We'll now walk you through the possible functions to call when reading +in a PNG file sequentially, briefly explaining the syntax and purpose +of each one. See example.c and png.h for more detail. While +progressive reading is covered in the next section, you will still +need some of the functions discussed in this section to read a PNG +file. + +Setup + +You will want to do the I/O initialization(*) before you get into libpng, +so if it doesn't work, you don't have much to undo. Of course, you +will also want to insure that you are, in fact, dealing with a PNG +file. Libpng provides a simple check to see if a file is a PNG file. +To use it, pass in the first 1 to 8 bytes of the file to the function +png_sig_cmp(), and it will return 0 (false) if the bytes match the +corresponding bytes of the PNG signature, or nonzero (true) otherwise. +Of course, the more bytes you pass in, the greater the accuracy of the +prediction. + +If you are intending to keep the file pointer open for use in libpng, +you must ensure you don't read more than 8 bytes from the beginning +of the file, and you also have to make a call to png_set_sig_bytes_read() +with the number of bytes you read from the beginning. Libpng will +then only check the bytes (if any) that your program didn't read. + +(*): If you are not using the standard I/O functions, you will need +to replace them with custom functions. See the discussion under +Customizing libpng. + + + FILE *fp = fopen(file_name, "rb"); + if (!fp) + { + return (ERROR); + } + + fread(header, 1, number, fp); + is_png = !png_sig_cmp(header, 0, number); + + if (!is_png) + { + return (NOT_PNG); + } + + +Next, png_struct and png_info need to be allocated and initialized. In +order to ensure that the size of these structures is correct even with a +dynamically linked libpng, there are functions to initialize and +allocate the structures. We also pass the library version, optional +pointers to error handling functions, and a pointer to a data struct for +use by the error functions, if necessary (the pointer and functions can +be NULL if the default error handlers are to be used). See the section +on Changes to Libpng below regarding the old initialization functions. +The structure allocation functions quietly return NULL if they fail to +create the structure, so your application should check for that. + + png_structp png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + + png_infop end_info = png_create_info_struct(png_ptr); + + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use +png_create_read_struct_2() instead of png_create_read_struct(): + + png_structp png_ptr = png_create_read_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +The error handling routines passed to png_create_read_struct() +and the memory alloc/free routines passed to png_create_struct_2() +are only necessary if you are not using the libpng supplied error +handling and memory alloc/free functions. + +When libpng encounters an error, it expects to longjmp back +to your routine. Therefore, you will need to call setjmp and pass +your png_jmpbuf(png_ptr). If you read the file from different +routines, you will need to update the jmpbuf field every time you enter +a new routine that will call a png_*() function. + +See your documentation of setjmp/longjmp for your compiler for more +information on setjmp/longjmp. See the discussion on libpng error +handling in the Customizing Libpng section below for more information +on the libpng error handling. If an error occurs, and libpng longjmp's +back to your setjmp, you will want to call png_destroy_read_struct() to +free any memory. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + fclose(fp); + return (ERROR); + } + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_NO_SETJMP, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + +Now you need to set up the input code. The default for libpng is to +use the C function fread(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. If you wish to handle reading data in another +way, you need not call the png_init_io() function, but you must then +implement the libpng I/O methods discussed in the Customizing Libpng +section below. + + png_init_io(png_ptr, fp); + +If you had previously opened the file and read any of the signature from +the beginning in order to see if this was a PNG file, you need to let +libpng know that there are some bytes missing from the start of the file. + + png_set_sig_bytes(png_ptr, number); + +You can change the zlib compression buffer size to be used while +reading compressed data with + + png_set_compression_buffer_size(png_ptr, buffer_size); + +where the default size is 8192 bytes. Note that the buffer size +is changed immediately and the buffer is reallocated immediately, +instead of setting a flag to be acted upon later. + +If you want CRC errors to be handled in a different manner than +the default, use + + png_set_crc_action(png_ptr, crit_action, ancil_action); + +The values for png_set_crc_action() say how libpng is to handle CRC errors in +ancillary and critical chunks, and whether to use the data contained +therein. Note that it is impossible to "discard" data in a critical +chunk. + +Choices for (int) crit_action are + PNG_CRC_DEFAULT 0 error/quit + PNG_CRC_ERROR_QUIT 1 error/quit + PNG_CRC_WARN_USE 3 warn/use data + PNG_CRC_QUIET_USE 4 quiet/use data + PNG_CRC_NO_CHANGE 5 use the current value + +Choices for (int) ancil_action are + PNG_CRC_DEFAULT 0 error/quit + PNG_CRC_ERROR_QUIT 1 error/quit + PNG_CRC_WARN_DISCARD 2 warn/discard data + PNG_CRC_WARN_USE 3 warn/use data + PNG_CRC_QUIET_USE 4 quiet/use data + PNG_CRC_NO_CHANGE 5 use the current value + +Setting up callback code + +You can set up a callback function to handle any unknown chunks in the +input stream. You must supply the function + + read_chunk_callback(png_structp png_ptr, + png_unknown_chunkp chunk); + { + /* The unknown chunk structure contains your + chunk data, along with similar data for any other + unknown chunks: */ + + png_byte name[5]; + png_byte *data; + png_size_t size; + + /* Note that libpng has already taken care of + the CRC handling */ + + /* put your code here. Search for your chunk in the + unknown chunk structure, process it, and return one + of the following: */ + + return (-n); /* chunk had an error */ + return (0); /* did not recognize */ + return (n); /* success */ + } + +(You can give your function another name that you like instead of +"read_chunk_callback") + +To inform libpng about your function, use + + png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, + read_chunk_callback); + +This names not only the callback function, but also a user pointer that +you can retrieve with + + png_get_user_chunk_ptr(png_ptr); + +If you call the png_set_read_user_chunk_fn() function, then all unknown +chunks will be saved when read, in case your callback function will need +one or more of them. This behavior can be changed with the +png_set_keep_unknown_chunks() function, described below. + +At this point, you can set up a callback function that will be +called after each row has been read, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void read_row_callback(png_structp png_ptr, + png_uint_32 row, int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "read_row_callback") + +To inform libpng about your function, use + + png_set_read_status_fn(png_ptr, read_row_callback); + +When this function is called the row has already been completely processed and +the 'row' and 'pass' refer to the next row to be handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + +Unknown-chunk handling + +Now you get to set the way the library processes unknown chunks in the +input PNG stream. Both known and unknown chunks will be read. Normal +behavior is that known chunks will be parsed into information in +various info_ptr members while unknown chunks will be discarded. This +behavior can be wasteful if your application will never use some known +chunk types. To change this, you can call: + + png_set_keep_unknown_chunks(png_ptr, keep, + chunk_list, num_chunks); + keep - 0: default unknown chunk handling + 1: ignore; do not keep + 2: keep only if safe-to-copy + 3: keep even if unsafe-to-copy + + You can use these definitions: + PNG_HANDLE_CHUNK_AS_DEFAULT 0 + PNG_HANDLE_CHUNK_NEVER 1 + PNG_HANDLE_CHUNK_IF_SAFE 2 + PNG_HANDLE_CHUNK_ALWAYS 3 + + chunk_list - list of chunks affected (a byte string, + five bytes per chunk, NULL or '\0' if + num_chunks is 0) + + num_chunks - number of chunks affected; if 0, all + unknown chunks are affected. If nonzero, + only the chunks in the list are affected + +Unknown chunks declared in this way will be saved as raw data onto a +list of png_unknown_chunk structures. If a chunk that is normally +known to libpng is named in the list, it will be handled as unknown, +according to the "keep" directive. If a chunk is named in successive +instances of png_set_keep_unknown_chunks(), the final instance will +take precedence. The IHDR and IEND chunks should not be named in +chunk_list; if they are, libpng will process them normally anyway. + +Here is an example of the usage of png_set_keep_unknown_chunks(), +where the private "vpAg" chunk will later be processed by a user chunk +callback function: + + png_byte vpAg[5]={118, 112, 65, 103, (png_byte) '\0'}; + + #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + png_byte unused_chunks[]= + { + 104, 73, 83, 84, (png_byte) '\0', /* hIST */ + 105, 84, 88, 116, (png_byte) '\0', /* iTXt */ + 112, 67, 65, 76, (png_byte) '\0', /* pCAL */ + 115, 67, 65, 76, (png_byte) '\0', /* sCAL */ + 115, 80, 76, 84, (png_byte) '\0', /* sPLT */ + 116, 73, 77, 69, (png_byte) '\0', /* tIME */ + }; + #endif + + ... + + #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + /* ignore all unknown chunks: */ + png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0); + + /* except for vpAg: */ + png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1); + + /* also ignore unused known chunks: */ + png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks, + (int)sizeof(unused_chunks)/5); + #endif + +User limits + +The PNG specification allows the width and height of an image to be as +large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. +Since very few applications really need to process such large images, +we have imposed an arbitrary 1-million limit on rows and columns. +Larger images will be rejected immediately with a png_error() call. If +you wish to override this limit, you can use + + png_set_user_limits(png_ptr, width_max, height_max); + +to set your own limits, or use width_max = height_max = 0x7fffffffL +to allow all valid dimensions (libpng may reject some very large images +anyway because of potential buffer overflow conditions). + +You should put this statement after you create the PNG structure and +before calling png_read_info(), png_read_png(), or png_process_data(). +If you need to retrieve the limits that are being applied, use + + width_max = png_get_user_width_max(png_ptr); + height_max = png_get_user_height_max(png_ptr); + +The PNG specification sets no limit on the number of ancillary chunks +allowed in a PNG datastream. You can impose a limit on the total number +of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with + + png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); + +where 0x7fffffffL means unlimited. You can retrieve this limit with + + chunk_cache_max = png_get_chunk_cache_max(png_ptr); + +This limit also applies to the number of buffers that can be allocated +by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks. + +You can also set a limit on the amount of memory that a compressed chunk +other than IDAT can occupy, with + + png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); + +and you can retrieve the limit with + + chunk_malloc_max = png_get_chunk_malloc_max(png_ptr); + +Any chunks that would cause either of these limits to be exceeded will +be ignored. + +The high-level read interface + +At this point there are two ways to proceed; through the high-level +read interface, or through a sequence of low-level read operations. +You can use the high-level interface if (a) you are willing to read +the entire image into memory, and (b) the input transformations +you want to do are limited to the following set: + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to + 8 bits + PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel + PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit + samples to bytes + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_EXPAND Perform set_expand() + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples + to RGB (or GA to RGBA) + +(This excludes setting a background color, doing gamma transformation, +quantizing, and setting filler.) If this is the case, simply do this: + + png_read_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the bitwise OR of some +set of transformation flags. This call is equivalent to png_read_info(), +followed the set of transformations indicated by the transform mask, +then png_read_image(), and finally png_read_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future input transform.) + +You must use png_transforms and not call any png_set_transform() functions +when you use png_read_png(). + +After you have called png_read_png(), you can retrieve the image data +with + + row_pointers = png_get_rows(png_ptr, info_ptr); + +where row_pointers is an array of pointers to the pixel data for each row: + + png_bytep row_pointers[height]; + +If you know your image size and pixel size ahead of time, you can allocate +row_pointers prior to calling png_read_png() with + + if (height > PNG_UINT_32_MAX/png_sizeof(png_byte)) + png_error (png_ptr, + "Image is too tall to process in memory"); + + if (width > PNG_UINT_32_MAX/pixel_size) + png_error (png_ptr, + "Image is too wide to process in memory"); + + row_pointers = png_malloc(png_ptr, + height*png_sizeof(png_bytep)); + + for (int i=0; i) and +png_get_(png_ptr, info_ptr, ...) functions return non-zero if the +data has been read, or zero if it is missing. The parameters to the +png_get_ are set directly if they are simple data types, or a +pointer into the info_ptr is returned for any complex types. + + png_get_PLTE(png_ptr, info_ptr, &palette, + &num_palette); + + palette - the palette for the file + (array of png_color) + + num_palette - number of entries in the palette + + png_get_gAMA(png_ptr, info_ptr, &file_gamma); + png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma); + + file_gamma - the gamma at which the file is + written (PNG_INFO_gAMA) + + int_file_gamma - 100,000 times the gamma at which the + file is written + + png_get_sRGB(png_ptr, info_ptr, &srgb_intent); + + file_srgb_intent - the rendering intent (PNG_INFO_sRGB) + The presence of the sRGB chunk + means that the pixel data is in the + sRGB color space. This chunk also + implies specific values of gAMA and + cHRM. + + png_get_iCCP(png_ptr, info_ptr, &name, + &compression_type, &profile, &proflen); + + name - The profile name. + + compression_type - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + + profile - International Color Consortium color + profile data. May contain NULs. + + proflen - length of profile data in bytes. + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, + red, green, and blue channels, + whichever are appropriate for the + given color type (png_color_16) + + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, + &num_trans, &trans_color); + + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + trans_color - graylevel or color sample values of + the single transparent color for + non-paletted images (PNG_INFO_tRNS) + + png_get_hIST(png_ptr, info_ptr, &hist); + (PNG_INFO_hIST) + + hist - histogram of palette (array of + png_uint_16) + + png_get_tIME(png_ptr, info_ptr, &mod_time); + + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_get_bKGD(png_ptr, info_ptr, &background); + + background - background color (PNG_VALID_bKGD) + valid 16-bit red, green and blue + values, regardless of color_type + + num_comments = png_get_text(png_ptr, info_ptr, + &text_ptr, &num_text); + + num_comments - number of comments + + text_ptr - array of png_text holding image + comments + + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + + text_ptr[i].text - text comments for current + keyword. Can be empty. + + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + + text_ptr[i].lang - language of comment (empty + string for unknown). + + text_ptr[i].lang_key - keyword in UTF-8 + (empty string for unknown). + + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist + when the library is built with iTXt chunk support. + + num_text - number of comments (same as + num_comments; you can put NULL here + to avoid the duplication) + + Note while png_set_text() will accept text, language, + and translated keywords that can be NULL pointers, the + structure returned by png_get_text will always contain + regular zero-terminated C strings. They might be + empty strings but they will never be NULL pointers. + + num_spalettes = png_get_sPLT(png_ptr, info_ptr, + &palette_ptr); + + num_spalettes - number of sPLT chunks read. + + palette_ptr - array of palette structures holding + contents of one or more sPLT chunks + read. + + png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, + &unit_type); + + offset_x - positive offset from the left edge + of the screen + + offset_y - positive offset from the top edge + of the screen + + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, + &unit_type); + + res_x - pixels/unit physical resolution in + x direction + + res_y - pixels/unit physical resolution in + x direction + + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_get_sCAL(png_ptr, info_ptr, &unit, &width, + &height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are doubles) + + png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, + &height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + num_unknown_chunks = png_get_unknown_chunks(png_ptr, + info_ptr, &unknowns) + + unknowns - array of png_unknown_chunk + structures holding unknown chunks + + unknowns[i].name - name of unknown chunk + + unknowns[i].data - data of unknown chunk + + unknowns[i].size - size of unknown chunk's data + + unknowns[i].location - position of chunk in file + + The value of "i" corresponds to the order in which the + chunks were read from the PNG file or inserted with the + png_set_unknown_chunks() function. + +The data from the pHYs chunk can be retrieved in several convenient +forms: + + res_x = png_get_x_pixels_per_meter(png_ptr, + info_ptr) + + res_y = png_get_y_pixels_per_meter(png_ptr, + info_ptr) + + res_x_and_y = png_get_pixels_per_meter(png_ptr, + info_ptr) + + res_x = png_get_x_pixels_per_inch(png_ptr, + info_ptr) + + res_y = png_get_y_pixels_per_inch(png_ptr, + info_ptr) + + res_x_and_y = png_get_pixels_per_inch(png_ptr, + info_ptr) + + aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, + info_ptr) + + Each of these returns 0 [signifying "unknown"] if + the data is not present or if res_x is 0; + res_x_and_y is 0 if res_x != res_y + + Note that because of the way the resolutions are + stored internally, the inch conversions won't + come out to exactly even number. For example, + 72 dpi is stored as 0.28346 pixels/meter, and + when this is retrieved it is 71.9988 dpi, so + be sure to round the returned value appropriately + if you want to display a reasonable-looking result. + +The data from the oFFs chunk can be retrieved in several convenient +forms: + + x_offset = png_get_x_offset_microns(png_ptr, info_ptr); + + y_offset = png_get_y_offset_microns(png_ptr, info_ptr); + + x_offset = png_get_x_offset_inches(png_ptr, info_ptr); + + y_offset = png_get_y_offset_inches(png_ptr, info_ptr); + + Each of these returns 0 [signifying "unknown" if both + x and y are 0] if the data is not present or if the + chunk is present but the unit is the pixel. The + remark about inexact inch conversions applies here + as well, because a value in inches can't always be + converted to microns and back without some loss + of precision. + +For more information, see the png_info definition in png.h and the +PNG specification for chunk contents. Be careful with trusting +rowbytes, as some of the transformations could increase the space +needed to hold a row (expand, filler, gray_to_rgb, etc.). +See png_read_update_info(), below. + +A quick word about text_ptr and num_text. PNG stores comments in +keyword/text pairs, one pair per chunk, with no limit on the number +of text chunks, and a 2^31 byte limit on their size. While there are +suggested keywords, there is no requirement to restrict the use to these +strings. It is strongly suggested that keywords and text be sensible +to humans (that's the point), so don't use abbreviations. Non-printing +symbols are not allowed. See the PNG specification for more details. +There is also no requirement to have text after the keyword. + +Keywords should be limited to 79 Latin-1 characters without leading or +trailing spaces, but non-consecutive spaces are allowed within the +keyword. It is possible to have the same keyword any number of times. +The text_ptr is an array of png_text structures, each holding a +pointer to a language string, a pointer to a keyword and a pointer to +a text string. The text string, language code, and translated +keyword may be empty or NULL pointers. The keyword/text +pairs are put into the array in the order that they are received. +However, some or all of the text chunks may be after the image, so, to +make sure you have read all the text chunks, don't mess with these +until after you read the stuff after the image. This will be +mentioned again below in the discussion that goes with png_read_end(). + +Input transformations + +After you've read the header information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +The colors used for the background and transparency values should be +supplied in the same format/depth as the current image data. They +are stored in the same format/depth as the image data in a bKGD or tRNS +chunk, so this is what libpng expects for this data. The colors are +transformed to keep in sync with the image data when an application +calls the png_read_update_info() routine (see below). + +Data will be decoded into the supplied row buffers packed into bytes +unless the library has been told to transform it into another format. +For example, 4 bit/pixel paletted or grayscale data will be returned +2 pixels/byte with the leftmost pixel in the high-order bits of the +byte, unless png_set_packing() is called. 8-bit RGB data will be stored +in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() +is called to insert filler bytes, either before or after each RGB triplet. +16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant +byte of the color value first, unless png_set_strip_16() is called to +transform it to regular RGB RGB triplets, or png_set_filler() or +png_set_add alpha() is called to insert filler bytes, either before or +after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can +be modified with +png_set_filler(), png_set_add_alpha(), or png_set_strip_16(). + +The following code transforms grayscale images of less than 8 to 8 bits, +changes paletted images to RGB, and adds a full alpha channel if there is +transparency information in a tRNS chunk. This is most useful on +grayscale images with bit depths of 2 or 4 or if there is a multiple-image +viewing application that wishes to treat all images in the same way. + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); + + if (color_type == PNG_COLOR_TYPE_GRAY && + bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); + +The first two functions are actually aliases for png_set_expand(), added +in libpng version 1.0.4, with the function names expanded to improve code +readability. In some future version they may actually do different +things. + +As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was +added. It expands the sample depth without changing tRNS to alpha. + +As of libpng version 1.5.2, png_set_expand_16() was added. It behaves as +png_set_expand(), however, the resultant channels have 16 bits rather than 8. +Use this when the output color or gray channels are made linear to avoid fairly +severe accuracy loss. + + if (bit_depth < 16) + png_set_expand_16(png_ptr); + +PNG can have files with 16 bits per channel. If you only can handle +8 bits per channel, this will strip the pixels down to 8 bit. + + if (bit_depth == 16) + png_set_strip_16(png_ptr); + +If, for some reason, you don't need the alpha channel on an image, +and you want to remove it rather than combining it with the background +(but the image author certainly had in mind that you *would* combine +it with the background, so that's what you should probably do): + + if (color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr); + +See below for png_set_background(), which does the correct composition on a +single opaque color. This is probably what you should do in all cases rather +than use png_set_strip_alpha() - unless you know for sure that it is the wrong +thing to do. + +As of libpng version 1.5.2, almost all useful expansions are supported, the +major ommissions are convertion of grayscale to indexed images (which can be +done trivially in the application) and convertion of indexed to grayscale (which +can be done by a trivial manipulation of the palette.) + +In the following table, the 01 means grayscale with depth<8, 31 means +indexed with depth<8, other numerals represent the color type, "T" means +the tRNS chunk is present, A means an alpha channel is present, and O +means tRNS or alpha is present but all pixels in the image are opaque. + + FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O + TO + 01 - [G] - - - - - - - - - - - - - + 31 [Q] Q [Q] [Q] [Q] Q Q Q Q Q Q [Q] [Q] Q Q + 0 1 G + . . G G G G G G B B GB GB + 0T lt Gt t + . Gt G G Gt G G Bt Bt GBt GBt + 0O lt Gt t . + Gt Gt G Gt Gt G Bt Bt GBt GBt + 2 C P C C C + . . C - - CB CB B B + 2T Ct - Ct C C t + t - - - CBt CBt Bt Bt + 2O Ct - Ct C C t t + - - - CBt CBt Bt Bt + 3 [Q] p [Q] [Q] [Q] Q Q Q + . . [Q] [Q] Q Q + 3T [Qt] p [Qt][Q] [Q] Qt Qt Qt t + t [Qt][Qt] Qt Qt + 3O [Qt] p [Qt][Q] [Q] Qt Qt Qt t t + [Qt][Qt] Qt Qt + 4A lA G A T T GA GT GT GA GT GT + BA G GBA + 4O lA GBA A T T GA GT GT GA GT GT BA + GBA G + 6A CA PA CA C C A T tT PA P P C CBA + BA + 6O CA PBA CA C C A tT T PA P P CBA C BA + + +Within the matrix, + "+" identifies entries where 'from' and 'to' are the same. + "-" means the transformation is not supported. + "." means nothing is necessary (a tRNS chunk can just be ignored). + "t" means the transformation is obtained by png_set_tRNS. + "A" means the transformation is obtained by png_set_add_alpha(). + "X" means the transformation is obtained by png_set_expand(). + "1" means the transformation is obtained by + png_set_expand_gray_1_2_4_to_8() (and by png_set_expand() if there + is no transparency in the original or the final format). + "C" means the transformation is obtained by png_set_gray_to_rgb(). + "G" means the transformation is obtained by png_set_rgb_to_gray() or + png_set_rgb_to_Y(). + "P" means the transformation is obtained by + png_set_expand_palette_to_rgb(). + "p" means the transformation is obtained by png_set_packing(). + "Q" means the transformation is obtained by png_set_quantize(). + "T" means the transformation is obtained by png_set_tRNS_to_alpha(). + "B" means the transformation is obtained by png_set_background(), or + png_strip_alpha(). + +When an entry has multiple transforms listed all are required to cause the +right overall transformation. When two transforms are separated by a comma +either will do the job. When transforms are enclosed in [] the transform should +do the job but this is currently unimplemented - a different format will result +if the suggested transformations are used. + +In PNG files, the alpha channel in an image +is the level of opacity. If you need the alpha channel in an image to +be the level of transparency instead of opacity, you can invert the +alpha channel (or the tRNS chunk data) after it's read, so that 0 is +fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit +images) is fully transparent, with + + png_set_invert_alpha(png_ptr); + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit +files. This code expands to 1 pixel per byte without changing the +values of the pixels: + + if (bit_depth < 8) + png_set_packing(png_ptr); + +PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels +stored in a PNG image have been "scaled" or "shifted" up to the next +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] +to 8 bits/sample in the range [0, 255]). However, it is also possible +to convert the PNG pixel data back to the original bit depth of the +image. This call reduces the pixels back down to the original bit depth: + + png_color_8p sig_bit; + + if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) + png_set_shift(png_ptr, sig_bit); + +PNG files store 3-color pixels in red, green, blue order. This code +changes the storage of the pixels to blue, green, red: + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_bgr(png_ptr); + +PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them +into 4 or 8 bytes for windowing systems that need them in this format: + + if (color_type == PNG_COLOR_TYPE_RGB) + png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); + +where "filler" is the 8 or 16-bit number to fill with, and the location is +either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether +you want the filler before the RGB or after. This transformation +does not affect images that already have full alpha channels. To add an +opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which +will generate RGBA pixels. + +Note that png_set_filler() does not change the color type. If you want +to do that, you can add a true alpha channel with + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_GRAY) + png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); + +where "filler" contains the alpha value to assign to each pixel. +This function was added in libpng-1.2.7. + +If you are reading an image with an alpha channel, and you need the +data as ARGB instead of the normal PNG format RGBA: + + if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_swap_alpha(png_ptr); + +For some uses, you may want a grayscale image to be represented as +RGB. This code will do that conversion: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + +Conversely, you can convert an RGB or RGBA image to grayscale or grayscale +with alpha. + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_rgb_to_gray_fixed(png_ptr, error_action, + int red_weight, int green_weight); + + error_action = 1: silently do the conversion + + error_action = 2: issue a warning if the original + image has any pixel where + red != green or red != blue + + error_action = 3: issue an error and abort the + conversion if the original + image has any pixel where + red != green or red != blue + + red_weight: weight of red component times 100000 + + green_weight: weight of green component times 100000 + If either weight is negative, default + weights (21268, 71514) are used. + +If you have set error_action = 1 or 2, you can +later check whether the image really was gray, after processing +the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. +It will return a png_byte that is zero if the image was gray or +1 if there were any non-gray pixels. bKGD and sBIT data +will be silently converted to grayscale, using the green channel +data, regardless of the error_action setting. + +With red_weight+green_weight<=100000, +the normalized graylevel is computed: + + int rw = red_weight * 65536; + int gw = green_weight * 65536; + int bw = 65536 - (rw + gw); + gray = (rw*red + gw*green + bw*blue)/65536; + +The default values approximate those recommended in the Charles +Poynton's Color FAQ, +Copyright (c) 1998-01-04 Charles Poynton + + Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + +Libpng approximates this with integers scaled by 32768: + + Y = (6968 * R + 23434 * G + 2366 * B)/32768 + +The calculation is done in a linear colorspace, if the image gamma +can be determined. + +If you have a grayscale and you are using png_set_expand_gray_1_2_4_to_8(), +png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to +a higher bit-depth, you must either supply the background color as a gray +value at the original file bit-depth (need_expand = 1) or else supply the +background color as an RGB triplet at the final, expanded bit depth +(need_expand = 0). Similarly, if you are reading a paletted image, you +must either supply the background color as a palette index (need_expand = 1) +or as an RGB triplet that may or may not be in the palette (need_expand = 0). + + png_color_16 my_background; + png_color_16p image_background; + + if (png_get_bKGD(png_ptr, info_ptr, &image_background)) + png_set_background(png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + png_set_background(png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + +The png_set_background() function tells libpng to composite images +with alpha or simple transparency against the supplied background +color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), +you may use this color, or supply another color more suitable for +the current display (e.g., the background color from a web page). You +need to tell libpng whether the color is in the gamma space of the +display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file +(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one +that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't +know why anyone would use this, but it's here). + +To properly display PNG images on any kind of system, the application needs +to know what the display gamma is. Ideally, the user will know this, and +the application will allow them to set it. One method of allowing the user +to set the display gamma separately for each system is to check for a +SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be +correctly set. + +Note that display_gamma is the overall gamma correction required to produce +pleasing results, which depends on the lighting conditions in the surrounding +environment. In a dim or brightly lit room, no compensation other than +the physical gamma exponent of the monitor is needed, while in a dark room +a slightly smaller exponent is better. + + double gamma, screen_gamma; + + if (/* We have a user-defined screen + gamma value */) + { + screen_gamma = user_defined_screen_gamma; + } + + /* One way that applications can share the same + screen gamma value */ + else if ((gamma_str = getenv("SCREEN_GAMMA")) + != NULL) + { + screen_gamma = (double)atof(gamma_str); + } + + /* If we don't have another value */ + else + { + screen_gamma = 2.2; /* A good guess for a + PC monitor in a bright office or a dim room */ + + screen_gamma = 2.0; /* A good guess for a + PC monitor in a dark room */ + + screen_gamma = 1.7 or 1.0; /* A good + guess for Mac systems */ + } + +The functions png_set_gamma() and its fixed point equivalent +png_set_gamma_fixed() handle gamma transformations of the data. +Pass both the file gamma and the current screen_gamma. If the file does +not have a gamma value, you can pass one anyway if you have an idea what +it is (usually 0.45455 is a good guess for GIF images on PCs). Note +that file gammas are inverted from screen gammas. See the discussions +on gamma in the PNG specification for an excellent description of what +gamma is, and why all applications should support it. It is strongly +recommended that PNG viewers support gamma correction. + + if (png_get_gAMA(png_ptr, info_ptr, &file_gamma)) + png_set_gamma(png_ptr, screen_gamma, file_gamma); + + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + +If you need to reduce an RGB file to a paletted file, or if a paletted +file has more entries then will fit on your screen, png_set_quantize() +will do that. Note that this is a simple match quantization that merely +finds the closest color available. This should work fairly well with +optimized palettes, but fairly badly with linear color cubes. If you +pass a palette that is larger then maximum_colors, the file will +reduce the number of colors in the palette so it will fit into +maximum_colors. If there is a histogram, it will use it to make +more intelligent choices when reducing the palette. If there is no +histogram, it may not do as good a job. + + if (color_type & PNG_COLOR_MASK_COLOR) + { + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_PLTE)) + { + png_uint_16p histogram = NULL; + + png_get_hIST(png_ptr, info_ptr, + &histogram); + png_set_quantize(png_ptr, palette, num_palette, + max_screen_colors, histogram, 1); + } + + else + { + png_color std_color_cube[MAX_SCREEN_COLORS] = + { ... colors ... }; + + png_set_quantize(png_ptr, std_color_cube, + MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, + NULL,0); + } + } + +PNG files describe monochrome as black being zero and white being one. +The following code will reverse this (make black be one and white be +zero): + + if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) + png_set_invert_mono(png_ptr); + +This function can also be used to invert grayscale and gray-alpha images: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_invert_mono(png_ptr); + +PNG files store 16 bit pixels in network byte order (big-endian, +ie. most significant bits first). This code changes the storage to the +other way (little-endian, i.e. least significant bits first, the +way PCs store them): + + if (bit_depth == 16) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_read_user_transform_fn(png_ptr, + read_transform_fn); + +You must supply the function + + void read_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +after all of the other transformations have been processed. Take care with +interlaced images if you do the interlace yourself - the width of the row is the +width in 'row_info', not the overall image width. + +If supported libpng provides two information routines that you can use to find +where you are in processing the image: + + png_get_current_pass_number(png_structp png_ptr); + png_get_current_row_number(png_structp png_ptr); + +Don't try using these outside a transform callback - firstly they are only +supported if user transforms are supported, secondly they may well return +unexpected results unless the row is actually being processed at the moment they +are called. + +With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + +You can also set up a pointer to a user structure for use by your +callback function, and you can inform libpng that your transform +function will change the number of channels or bit depth with the +function + + png_set_user_transform_info(png_ptr, user_ptr, + user_depth, user_channels); + +The user's application, not libpng, is responsible for allocating and +freeing any memory required for the user structure. + +You can retrieve the pointer via the function +png_get_user_transform_ptr(). For example: + + voidp read_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +The last thing to handle is interlacing; this is covered in detail below, +but you must call the function here if you want libpng to handle expansion +of the interlaced image. + + number_of_passes = png_set_interlace_handling(png_ptr); + +After setting the transformations, libpng can update your png_info +structure to reflect any transformations you've requested with this +call. This is most useful to update the info structure's rowbytes +field so you can use it to allocate your image memory. This function +will also update your palette with the correct screen_gamma and +background if these have been given with the calls above. + + png_read_update_info(png_ptr, info_ptr); + +After you call png_read_update_info(), you can allocate any +memory you need to hold the image. The row data is simply +raw byte data for all forms of images. As the actual allocation +varies among applications, no example will be given. If you +are allocating one large chunk, you will need to build an +array of pointers to each row, as it will be needed for some +of the functions below. + +Remember: Before you call png_read_update_info(), the png_get_ +functions return the values corresponding to the original PNG image. +After you call png_read_update_info the values refer to the image +that libpng will output. Consequently you must call all the png_set_ +functions before you call png_read_update_info(). This is particularly +important for png_set_interlace_handling() - if you are going to call +png_read_update_info() you must call png_set_interlace_handling() before +it unless you want to receive interlaced output. + +Reading image data + +After you've allocated memory, you can read the image data. +The simplest way to do this is in one function call. If you are +allocating enough memory to hold the whole image, you can just +call png_read_image() and libpng will read in all the image data +and put it in the memory area supplied. You will need to pass in +an array of pointers to each row. + +This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() (unless you call +png_read_update_info()) or call this function multiple times, or any +of that other stuff necessary with png_read_rows(). + + png_read_image(png_ptr, row_pointers); + +where row_pointers is: + + png_bytep row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to read in the whole image at once, you can +use png_read_rows() instead. If there is no interlacing (check +interlace_type == PNG_INTERLACE_NONE), this is simple: + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +where row_pointers is the same as in the png_read_image() call. + +If you are doing this just one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + png_read_row(png_ptr, row_pointer, NULL); + +If the file is interlaced (interlace_type != 0 in the IHDR chunk), things +get somewhat harder. The only current (PNG Specification version 1.2) +interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7); +a somewhat complicated 2D interlace scheme, known as Adam7, that +breaks down an image into seven smaller images of varying size, based +on an 8x8 grid. This number is defined (from libpng 1.5) as +PNG_INTERLACE_ADAM7_PASSES in png.h + +libpng can fill out those images or it can give them to you "as is". +It is almost always better to have libpng handle the interlacing for you. +If you want the images filled out, there are two ways to do that. The one +mentioned in the PNG specification is to expand each pixel to cover +those pixels that have not been read yet (the "rectangle" method). +This results in a blocky image for the first pass, which gradually +smooths out as more pixels are read. The other method is the "sparkle" +method, where pixels are drawn only in their final locations, with the +rest of the image remaining whatever colors they were initialized to +before the start of the read. The first method usually looks better, +but tends to be slower, as there are more pixels to put in the rows. + +If, as is likely, you want libpng to expand the images, call this before +calling png_start_read_image() or png_read_update_info(): + + if (interlace_type == PNG_INTERLACE_ADAM7) + number_of_passes + = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. This function can be +called even if the file is not interlaced, where it will return one pass. +You then need to read the whole image 'number_of_passes' times. Each time +will distribute the pixels from the current pass to the correct place in +the output image, so you need to supply the same rows to png_read_rows in +each pass. + +If you are not going to display the image after each pass, but are +going to wait until the entire image is read in, use the sparkle +effect. This effect is faster and the end result of either method +is exactly the same. If you are planning on displaying the image +after each pass, the "rectangle" effect is generally considered the +better looking one. + +If you only want the "sparkle" effect, just call png_read_rows() as +normal, with the third parameter NULL. Make sure you make pass over +the image number_of_passes times, and you don't change the data in the +rows between calls. You can change the locations of the data, just +not the data. Each pass only writes the pixels appropriate for that +pass, and assumes the data from previous passes is still valid. + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +If you only want the first effect (the rectangles), do the same as +before except pass the row buffer in the third parameter, and leave +the second parameter NULL. + + png_read_rows(png_ptr, NULL, row_pointers, + number_of_rows); + +If you don't want libpng to handle the interlacing details, just call +png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images. +Each of the images is a valid image by itself, however you will almost +certainly need to distribute the pixels from each sub-image to the +correct place. This is where everything gets very tricky. + +If you want to retrieve the separate images you must pass the correct +number of rows to each successive call of png_read_rows(). The calculation +gets pretty complicated for small images, where some sub-images may +not even exist because either their width or height ends up zero. +libpng provides two macros to help you in 1.5 and later versions: + + png_uint_32 width = PNG_PASS_COLS(image_width, pass_number); + png_uint_32 height = PNG_PASS_ROWS(image_height, pass_number); + +Respectively these tell you the width and height of the sub-image +corresponding to the numbered pass. 'pass' is in in the range 0 to 6 - +this can be confusing because the specification refers to the same passes +as 1 to 7! Be careful, you must check both the width and height before +calling png_read_rows() and not call it for that pass if either is zero. + +You can, of course, read each sub-image row by row. If you want to +produce optimal code to make a pixel-by-pixel transformation of an +interlaced image this is the best approach; read each row of each pass, +transform it, and write it out to a new interlaced image. + +If you want to de-interlace the image yourself libpng provides further +macros to help that tell you where to place the pixels in the output image. +Because the interlacing scheme is rectangular - sub-image pixels are always +arranged on a rectangular grid - all you need to know for each pass is the +starting column and row in the output image of the first pixel plus the +spacing between each pixel. As of libpng 1.5 there are four macros to +retrieve this information: + + png_uint_32 x = PNG_PASS_START_COL(pass); + png_uint_32 y = PNG_PASS_START_ROW(pass); + png_uint_32 xStep = 1U << PNG_PASS_COL_SHIFT(pass); + png_uint_32 yStep = 1U << PNG_PASS_ROW_SHIFT(pass); + +These allow you to write the obvious loop: + + png_uint_32 input_y = 0; + png_uint_32 output_y = PNG_PASS_START_ROW(pass); + + while (output_y < output_image_height) + { + png_uint_32 input_x = 0; + png_uint_32 output_x = PNG_PASS_START_COL(pass); + + while (output_x < output_image_width) + { + image[output_y][output_x] = + subimage[pass][input_y][input_x++]; + + output_x += xStep; + } + + ++input_y; + output_y += yStep; + } + +Notice that the steps between successive output rows and columns are +returned as shifts. This is possible because the pixels in the subimages +are always a power of 2 apart - 1, 2, 4 or 8 pixels - in the original +image. In practice you may need to directly calculate the output coordinate +given an input coordinate. libpng provides two further macros for this +purpose: + + png_uint_32 output_x = PNG_COL_FROM_PASS_COL(input_x, pass); + png_uint_32 output_y = PNG_ROW_FROM_PASS_ROW(input_y, pass); + +Finally a pair of macros are provided to tell you if a particular image +row or column appears in a given pass: + + int col_in_pass = PNG_COL_IN_INTERLACE_PASS(output_x, pass); + int row_in_pass = PNG_ROW_IN_INTERLACE_PASS(output_y, pass); + +Bear in mind that you will probably also need to check the width and height +of the pass in addition to the above to be sure the pass even exists! + +With any luck you are convinced by now that you don't want to do your own +interlace handling. In reality normally the only good reason for doing this +is if you are processing PNG files on a pixel-by-pixel basis and don't want +to load the whole file into memory when it is interlaced. + +libpng includes a test program, pngvalid, that illustrates reading and +writing of interlaced images. If you can't get interlacing to work in your +code and don't want to leave it to libpng (the recommended approach) see +how pngvalid.c does it. + +Finishing a sequential read + +After you are finished reading the image through the +low-level interface, you can finish reading the file. If you are +interested in comments or time, which may be stored either before or +after the image data, you should pass the separate png_info struct if +you want to keep the comments from before and after the image +separate. If you are not interested, you can pass NULL. + + png_read_end(png_ptr, end_info); + +When you are done, you can free all memory allocated by libpng like this: + + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + + mask - identifies data to be freed, a mask + containing the bitwise OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_zalloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + + mask - which data elements are affected + same choices as in png_free_data() + +This function only affects data that has already been allocated. +You can call this function after reading the PNG data but before calling +any png_set_*() functions, to control whether the user or the png_set_*() +function is responsible for freeing any existing data that might be present, +and again after the png_set_*() functions to control whether the user +or png_destroy_*() is supposed to free the data. When the user assumes +responsibility for libpng-allocated data, the application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_zalloc() to allocate it. + +If you allocated your row_pointers in a single block, as suggested above in +the description of the high level read interface, you must not transfer +responsibility for freeing it to the png_set_rows or png_read_destroy function, +because they would also try to free the individual row_pointers[i]. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. + +The png_free_data() function will turn off the "valid" flag for anything +it frees. If you need to turn the flag off for a chunk that was freed by +your application instead of by libpng, you can use + + png_set_invalid(png_ptr, info_ptr, mask); + + mask - identifies the chunks to be made invalid, + containing the bitwise OR of one or + more of + PNG_INFO_gAMA, PNG_INFO_sBIT, + PNG_INFO_cHRM, PNG_INFO_PLTE, + PNG_INFO_tRNS, PNG_INFO_bKGD, + PNG_INFO_hIST, PNG_INFO_pHYs, + PNG_INFO_oFFs, PNG_INFO_tIME, + PNG_INFO_pCAL, PNG_INFO_sRGB, + PNG_INFO_iCCP, PNG_INFO_sPLT, + PNG_INFO_sCAL, PNG_INFO_IDAT + +For a more compact example of reading a PNG image, see the file example.c. + +Reading PNG files progressively + +The progressive reader is slightly different then the non-progressive +reader. Instead of calling png_read_info(), png_read_rows(), and +png_read_end(), you make one call to png_process_data(), which calls +callbacks when it has the info, a row, or the end of the image. You +set up these callbacks with png_set_progressive_read_fn(). You don't +have to worry about the input/output functions of libpng, as you are +giving the library the data directly in png_process_data(). I will +assume that you have read the section on reading PNG files above, +so I will only highlight the differences (although I will show +all of the code). + +png_structp png_ptr; +png_infop info_ptr; + + /* An example code fragment of how you would + initialize the progressive reader in your + application. */ + int + initialize_png_reader() + { + png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + info_ptr = png_create_info_struct(png_ptr); + + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new. You can provide functions + to be called when the header info is valid, + when each row is completed, and when the image + is finished. If you aren't using all functions, + you can specify NULL parameters. Even when all + three functions are NULL, you need to call + png_set_progressive_read_fn(). You can use + any struct as the user_ptr (cast to a void pointer + for the function call), and retrieve the pointer + from inside the callbacks using the function + + png_get_progressive_ptr(png_ptr); + + which will return a void pointer, which you have + to cast appropriately. + */ + png_set_progressive_read_fn(png_ptr, (void *)user_ptr, + info_callback, row_callback, end_callback); + + return 0; + } + + /* A code fragment that you call as you receive blocks + of data */ + int + process_data(png_bytep buffer, png_uint_32 length) + { + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new also. Simply give it a chunk + of data from the file stream (in order, of + course). On machines with segmented memory + models machines, don't give it any more than + 64K. The library seems to run fine with sizes + of 4K. Although you can give it much less if + necessary (I assume you can give it chunks of + 1 byte, I haven't tried less then 256 bytes + yet). When this function returns, you may + want to display any rows that were generated + in the row callback if you don't already do + so there. + */ + png_process_data(png_ptr, info_ptr, buffer, length); + + /* At this point you can call png_process_data_skip if + you want to handle data the library will skip yourself; + it simply returns the number of bytes to skip (and stops + libpng skipping that number of bytes on the next + png_process_data call). + return 0; + } + + /* This function is called (as set by + png_set_progressive_read_fn() above) when enough data + has been supplied so all of the header has been + read. + */ + void + info_callback(png_structp png_ptr, png_infop info) + { + /* Do any setup here, including setting any of + the transformations mentioned in the Reading + PNG files section. For now, you _must_ call + either png_start_read_image() or + png_read_update_info() after all the + transformations are set (even if you don't set + any). You may start getting rows before + png_process_data() returns, so this is your + last chance to prepare for that. + + This is where you turn on interlace handling, + assuming you don't want to do it yourself. + + If you need to you can stop the processing of + your original input data at this point by calling + png_process_data_pause. This returns the number + of unprocessed bytes from the last png_process_data + call - it is up to you to ensure that the next call + sees these bytes again. If you don't want to bother + with this you can get libpng to cache the unread + bytes by setting the 'save' parameter (see png.h) but + then libpng will have to copy the data internally. + */ + } + + /* This function is called when each row of image + data is complete */ + void + row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) + { + /* If the image is interlaced, and you turned + on the interlace handler, this function will + be called for every row in every pass. Some + of these rows will not be changed from the + previous pass. When the row is not changed, + the new_row variable will be NULL. The rows + and passes are called in order, so you don't + really need the row_num and pass, but I'm + supplying them because it may make your life + easier. + + If you did not turn on interlace handling then + the callback is called for each row of each + sub-image when the image is interlaced. In this + case 'row_num' is the row in the sub-image, not + the row in the output image as it is in all other + cases. + + For the non-NULL rows of interlaced images when + you have switched on libpng interlace handling, + you must call png_progressive_combine_row() + passing in the row and the old row. You can + call this function for NULL rows (it will just + return) and for non-interlaced images (it just + does the memcpy for you) if it will make the + code easier. Thus, you can just do this for + all cases if you switch on interlace handling; + */ + + png_progressive_combine_row(png_ptr, old_row, + new_row); + + /* where old_row is what was displayed for + previously for the row. Note that the first + pass (pass == 0, really) will completely cover + the old row, so the rows do not have to be + initialized. After the first pass (and only + for interlaced images), you will have to pass + the current row, and the function will combine + the old row and the new row. + + You can also call png_process_data_pause in this + callback - see above. + */ + } + + void + end_callback(png_structp png_ptr, png_infop info) + { + /* This function is called after the whole image + has been read, including any chunks after the + image (up to and including the IEND). You + will usually have the same info chunk as you + had in the header, although some data may have + been added to the comments and time fields. + + Most people won't do much here, perhaps setting + a flag that marks the image as finished. + */ + } + + + +IV. Writing + +Much of this is very similar to reading. However, everything of +importance is repeated here, so you won't have to constantly look +back up in the reading section to understand writing. + +Setup + +You will want to do the I/O initialization before you get into libpng, +so if it doesn't work, you don't have anything to undo. If you are not +using the standard I/O functions, you will need to replace them with +custom writing functions. See the discussion under Customizing libpng. + + FILE *fp = fopen(file_name, "wb"); + + if (!fp) + return (ERROR); + +Next, png_struct and png_info need to be allocated and initialized. +As these can be both relatively large, you may not want to store these +on the stack, unless you have stack space to spare. Of course, you +will want to check if they return NULL. If you are also reading, +you won't want to name your read structure and your write structure +both "png_ptr"; you can call them anything you like, such as +"read_ptr" and "write_ptr". Look at pngtest.c, for example. + + png_structp png_ptr = png_create_write_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_write_struct(&png_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +define PNG_USER_MEM_SUPPORTED and use +png_create_write_struct_2() instead of png_create_write_struct(): + + png_structp png_ptr = png_create_write_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +After you have these structures, you will need to set up the +error handling. When libpng encounters an error, it expects to +longjmp() back to your routine. Therefore, you will need to call +setjmp() and pass the png_jmpbuf(png_ptr). If you +write the file from different routines, you will need to update +the png_jmpbuf(png_ptr) every time you enter a new routine that will +call a png_*() function. See your documentation of setjmp/longjmp +for your compiler for more information on setjmp/longjmp. See +the discussion on libpng error handling in the Customizing Libpng +section below for more information on the libpng error handling. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(fp); + return (ERROR); + } + ... + return; + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_NO_SETJMP, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + +Now you need to set up the output code. The default for libpng is to +use the C function fwrite(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. Again, if you wish to handle writing data in +another way, see the discussion on libpng I/O handling in the Customizing +Libpng section below. + + png_init_io(png_ptr, fp); + +If you are embedding your PNG into a datastream such as MNG, and don't +want libpng to write the 8-byte signature, or if you have already +written the signature in your application, use + + png_set_sig_bytes(png_ptr, 8); + +to inform libpng that it should not write a signature. + +Write callbacks + +At this point, you can set up a callback function that will be +called after each row has been written, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void write_row_callback(png_structp png_ptr, png_uint_32 row, + int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "write_row_callback") + +To inform libpng about your function, use + + png_set_write_status_fn(png_ptr, write_row_callback); + +When this function is called the row has already been completely processed and +it has also been written out. The 'row' and 'pass' refer to the next row to be +handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + +You now have the option of modifying how the compression library will +run. The following functions are mainly for testing, but may be useful +in some cases, like if you need to write PNG files extremely fast and +are willing to give up some compression, or if you want to get the +maximum possible compression at the expense of slower writing. If you +have no special needs in this area, let the library do what it wants by +not calling this function at all, as it has been tuned to deliver a good +speed/compression ratio. The second parameter to png_set_filter() is +the filter method, for which the only valid values are 0 (as of the +July 1999 PNG specification, version 1.2) or 64 (if you are writing +a PNG datastream that is to be embedded in a MNG datastream). The third +parameter is a flag that indicates which filter type(s) are to be tested +for each scanline. See the PNG specification for details on the specific +filter types. + + + /* turn on or off filtering, and/or choose + specific filters. You can use either a single + PNG_FILTER_VALUE_NAME or the bitwise OR of one + or more PNG_FILTER_NAME masks. + */ + png_set_filter(png_ptr, 0, + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); + +If an application wants to start and stop using particular filters during +compression, it should start out with all of the filters (to ensure that +the previous row of pixels will be stored in case it's needed later), +and then add and remove them after the start of compression. + +If you are writing a PNG datastream that is to be embedded in a MNG +datastream, the second parameter can be either 0 or 64. + +The png_set_compression_*() functions interface to the zlib compression +library, and should mostly be ignored unless you really know what you are +doing. The only generally useful call is png_set_compression_level() +which changes how much time zlib spends on trying to compress the image +data. See the Compression Library (zlib.h and algorithm.txt, distributed +with zlib) for details on the compression levels. + + #include zlib.h + + /* set the zlib compression level */ + png_set_compression_level(png_ptr, + Z_BEST_COMPRESSION); + + /* set other zlib parameters */ + png_set_compression_mem_level(png_ptr, 8); + png_set_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_compression_window_bits(png_ptr, 15); + png_set_compression_method(png_ptr, 8); + png_set_compression_buffer_size(png_ptr, 8192) + +extern PNG_EXPORT(void,png_set_zbuf_size) + +Setting the contents of info for output + +You now need to fill in the png_info structure with all the data you +wish to write before the actual image. Note that the only thing you +are allowed to write after the image is the text chunks and the time +chunk (as of PNG Specification 1.2, anyway). See png_write_end() and +the latest PNG specification for more information on that. If you +wish to write them before the image, fill them in now, and flag that +data as being valid. If you want to wait until after the data, don't +fill them until png_write_end(). For all the fields in png_info and +their data types, see png.h. For explanations of what the fields +contain, see the PNG specification. + +Some of the more important parts of the png_info are: + + png_set_IHDR(png_ptr, info_ptr, width, height, + bit_depth, color_type, interlace_type, + compression_type, filter_method) + + width - holds the width of the image + in pixels (up to 2^31). + + height - holds the height of the image + in pixels (up to 2^31). + + bit_depth - holds the bit depth of one of the + image channels. + (valid values are 1, 2, 4, 8, 16 + and depend also on the + color_type. See also significant + bits (sBIT) below). + + color_type - describes which color/alpha + channels are present. + PNG_COLOR_TYPE_GRAY + (bit depths 1, 2, 4, 8, 16) + PNG_COLOR_TYPE_GRAY_ALPHA + (bit depths 8, 16) + PNG_COLOR_TYPE_PALETTE + (bit depths 1, 2, 4, 8) + PNG_COLOR_TYPE_RGB + (bit_depths 8, 16) + PNG_COLOR_TYPE_RGB_ALPHA + (bit_depths 8, 16) + + PNG_COLOR_MASK_PALETTE + PNG_COLOR_MASK_COLOR + PNG_COLOR_MASK_ALPHA + + interlace_type - PNG_INTERLACE_NONE or + PNG_INTERLACE_ADAM7 + + compression_type - (must be + PNG_COMPRESSION_TYPE_DEFAULT) + + filter_method - (must be PNG_FILTER_TYPE_DEFAULT + or, if you are writing a PNG to + be embedded in a MNG datastream, + can also be + PNG_INTRAPIXEL_DIFFERENCING) + +If you call png_set_IHDR(), the call must appear before any of the +other png_set_*() functions, because they might require access to some of +the IHDR settings. The remaining png_set_*() functions can be called +in any order. + +If you wish, you can reset the compression_type, interlace_type, or +filter_method later by calling png_set_IHDR() again; if you do this, the +width, height, bit_depth, and color_type must be the same in each call. + + png_set_PLTE(png_ptr, info_ptr, palette, + num_palette); + + palette - the palette for the file + (array of png_color) + num_palette - number of entries in the palette + + png_set_gAMA(png_ptr, info_ptr, file_gamma); + png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); + + file_gamma - the gamma at which the image was + created (PNG_INFO_gAMA) + + int_file_gamma - 100,000 times the gamma at which + the image was created + + png_set_sRGB(png_ptr, info_ptr, srgb_intent); + + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of + the sRGB chunk means that the pixel + data is in the sRGB color space. + This chunk also implies specific + values of gAMA and cHRM. Rendering + intent is the CSS-1 property that + has been defined by the International + Color Consortium + (http://www.color.org). + It can be one of + PNG_sRGB_INTENT_SATURATION, + PNG_sRGB_INTENT_PERCEPTUAL, + PNG_sRGB_INTENT_ABSOLUTE, or + PNG_sRGB_INTENT_RELATIVE. + + + png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, + srgb_intent); + + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of the + sRGB chunk means that the pixel + data is in the sRGB color space. + This function also causes gAMA and + cHRM chunks with the specific values + that are consistent with sRGB to be + written. + + png_set_iCCP(png_ptr, info_ptr, name, compression_type, + profile, proflen); + + name - The profile name. + + compression_type - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + + profile - International Color Consortium color + profile data. May contain NULs. + + proflen - length of profile data in bytes. + + png_set_sBIT(png_ptr, info_ptr, sig_bit); + + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, red, + green, and blue channels, whichever are + appropriate for the given color type + (png_color_16) + + png_set_tRNS(png_ptr, info_ptr, trans_alpha, + num_trans, trans_color); + + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + + trans_color - graylevel or color sample values + (in order red, green, blue) of the + single transparent color for + non-paletted images (PNG_INFO_tRNS) + + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + png_set_hIST(png_ptr, info_ptr, hist); + + hist - histogram of palette (array of + png_uint_16) (PNG_INFO_hIST) + + png_set_tIME(png_ptr, info_ptr, mod_time); + + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_set_bKGD(png_ptr, info_ptr, background); + + background - background color (PNG_VALID_bKGD) + + png_set_text(png_ptr, info_ptr, text_ptr, num_text); + + text_ptr - array of png_text holding image + comments + + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + text_ptr[i].text - text comments for current + keyword. Can be NULL or empty. + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + text_ptr[i].lang - language of comment (NULL or + empty for unknown). + text_ptr[i].translated_keyword - keyword in UTF-8 (NULL + or empty for unknown). + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist + when the library is built with iTXt chunk support. + + num_text - number of comments + + png_set_sPLT(png_ptr, info_ptr, &palette_ptr, + num_spalettes); + + palette_ptr - array of png_sPLT_struct structures + to be added to the list of palettes + in the info structure. + num_spalettes - number of palette structures to be + added. + + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, + unit_type); + + offset_x - positive offset from the left + edge of the screen + + offset_y - positive offset from the top + edge of the screen + + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, + unit_type); + + res_x - pixels/unit physical resolution + in x direction + + res_y - pixels/unit physical resolution + in y direction + + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_set_sCAL(png_ptr, info_ptr, unit, width, height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are doubles) + + png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, + num_unknowns) + + unknowns - array of png_unknown_chunk + structures holding unknown chunks + unknowns[i].name - name of unknown chunk + unknowns[i].data - data of unknown chunk + unknowns[i].size - size of unknown chunk's data + unknowns[i].location - position to write chunk in file + 0: do not write chunk + PNG_HAVE_IHDR: before PLTE + PNG_HAVE_PLTE: before IDAT + PNG_AFTER_IDAT: after IDAT + +The "location" member is set automatically according to +what part of the output file has already been written. +You can change its value after calling png_set_unknown_chunks() +as demonstrated in pngtest.c. Within each of the "locations", +the chunks are sequenced according to their position in the +structure (that is, the value of "i", which is the order in which +the chunk was either read from the input file or defined with +png_set_unknown_chunks). + +A quick word about text and num_text. text is an array of png_text +structures. num_text is the number of valid structures in the array. +Each png_text structure holds a language code, a keyword, a text value, +and a compression type. + +The compression types have the same valid numbers as the compression +types of the image data. Currently, the only valid number is zero. +However, you can store text either compressed or uncompressed, unlike +images, which always have to be compressed. So if you don't want the +text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. +Because tEXt and zTXt chunks don't have a language field, if you +specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt +any language code or translated keyword will not be written out. + +Until text gets around 1000 bytes, it is not worth compressing it. +After the text has been written out to the file, the compression type +is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, +so that it isn't written out again at the end (in case you are calling +png_write_end() with the same struct). + +The keywords that are given in the PNG Specification are: + + Title Short (one line) title or + caption for image + + Author Name of image's creator + + Description Description of image (possibly long) + + Copyright Copyright notice + + Creation Time Time of original image creation + (usually RFC 1123 format, see below) + + Software Software used to create the image + + Disclaimer Legal disclaimer + + Warning Warning of nature of content + + Source Device used to create the image + + Comment Miscellaneous comment; conversion + from other image format + +The keyword-text pairs work like this. Keywords should be short +simple descriptions of what the comment is about. Some typical +keywords are found in the PNG specification, as is some recommendations +on keywords. You can repeat keywords in a file. You can even write +some text before the image and some after. For example, you may want +to put a description of the image before the image, but leave the +disclaimer until after, so viewers working over modem connections +don't have to wait for the disclaimer to go over the modem before +they start seeing the image. Finally, keywords should be full +words, not abbreviations. Keywords and text are in the ISO 8859-1 +(Latin-1) character set (a superset of regular ASCII) and can not +contain NUL characters, and should not contain control or other +unprintable characters. To make the comments widely readable, stick +with basic ASCII, and avoid machine specific character set extensions +like the IBM-PC character set. The keyword must be present, but +you can leave off the text string on non-compressed pairs. +Compressed pairs must have a text string, as only the text string +is compressed anyway, so the compression would be meaningless. + +PNG supports modification time via the png_time structure. Two +conversion routines are provided, png_convert_from_time_t() for +time_t and png_convert_from_struct_tm() for struct tm. The +time_t routine uses gmtime(). You don't have to use either of +these, but if you wish to fill in the png_time structure directly, +you should provide the time in universal time (GMT) if possible +instead of your local time. Note that the year number is the full +year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and +that months start with 1. + +If you want to store the time of the original image creation, you should +use a plain tEXt chunk with the "Creation Time" keyword. This is +necessary because the "creation time" of a PNG image is somewhat vague, +depending on whether you mean the PNG file, the time the image was +created in a non-PNG format, a still photo from which the image was +scanned, or possibly the subject matter itself. In order to facilitate +machine-readable dates, it is recommended that the "Creation Time" +tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), +although this isn't a requirement. Unlike the tIME chunk, the +"Creation Time" tEXt chunk is not expected to be automatically changed +by the software. To facilitate the use of RFC 1123 dates, a function +png_convert_to_rfc1123(png_timep) is provided to convert from PNG +time to an RFC 1123 format string. + +Writing unknown chunks + +You can use the png_set_unknown_chunks function to queue up chunks +for writing. You give it a chunk name, raw data, and a size; that's +all there is to it. The chunks will be written by the next following +png_write_info_before_PLTE, png_write_info, or png_write_end function. +Any chunks previously read into the info structure's unknown-chunk +list will also be written out in a sequence that satisfies the PNG +specification's ordering rules. + +The high-level write interface + +At this point there are two ways to proceed; through the high-level +write interface, or through a sequence of low-level write operations. +You can use the high-level interface if your image data is present +in the info structure. All defined output +transformations are permitted, enabled by the following masks. + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_STRIP_FILLER Strip out filler + bytes (deprecated). + PNG_TRANSFORM_STRIP_FILLER_BEFORE Strip out leading + filler bytes + PNG_TRANSFORM_STRIP_FILLER_AFTER Strip out trailing + filler bytes + +If you have valid image data in the info structure (you can use +png_set_rows() to put image data in the info structure), simply do this: + + png_write_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the bitwise OR of some set of +transformation flags. This call is equivalent to png_write_info(), +followed the set of transformations indicated by the transform mask, +then png_write_image(), and finally png_write_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future output transform.) + +You must use png_transforms and not call any png_set_transform() functions +when you use png_write_png(). + +The low-level write interface + +If you are going the low-level route instead, you are now ready to +write all the file information up to the actual image data. You do +this with a call to png_write_info(). + + png_write_info(png_ptr, info_ptr); + +Note that there is one transformation you may need to do before +png_write_info(). In PNG files, the alpha channel in an image is the +level of opacity. If your data is supplied as a level of transparency, +you can invert the alpha channel before you write it, so that 0 is +fully transparent and 255 (in 8-bit or paletted images) or 65535 +(in 16-bit images) is fully opaque, with + + png_set_invert_alpha(png_ptr); + +This must appear before png_write_info() instead of later with the +other transformations because in the case of paletted images the tRNS +chunk data has to be inverted before the tRNS chunk is written. If +your image is not a paletted image, the tRNS data (which in such cases +represents a single color to be rendered as transparent) won't need to +be changed, and you can safely do this transformation after your +png_write_info() call. + +If you need to write a private chunk that you want to appear before +the PLTE chunk when PLTE is present, you can write the PNG info in +two steps, and insert code to write your own chunk between them: + + png_write_info_before_PLTE(png_ptr, info_ptr); + png_set_unknown_chunks(png_ptr, info_ptr, ...); + png_write_info(png_ptr, info_ptr); + +After you've written the file information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +PNG files store RGB pixels packed into 3 or 6 bytes. This code tells +the library to strip input data that has 4 or 8 bytes per pixel down +to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 +bytes per pixel). + + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); + +where the 0 is unused, and the location is either PNG_FILLER_BEFORE or +PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel +is stored XRGB or RGBX. + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit files. +If the data is supplied at 1 pixel per byte, use this code, which will +correctly pack the pixels into a single byte: + + png_set_packing(png_ptr); + +PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your +data is of another bit depth, you can write an sBIT chunk into the +file so that decoders can recover the original data if desired. + + /* Set the true bit depth of the image data */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit.red = true_bit_depth; + sig_bit.green = true_bit_depth; + sig_bit.blue = true_bit_depth; + } + + else + { + sig_bit.gray = true_bit_depth; + } + + if (color_type & PNG_COLOR_MASK_ALPHA) + { + sig_bit.alpha = true_bit_depth; + } + + png_set_sBIT(png_ptr, info_ptr, &sig_bit); + +If the data is stored in the row buffer in a bit depth other than +one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), +this will scale the values to appear to be the correct bit depth as +is required by PNG. + + png_set_shift(png_ptr, &sig_bit); + +PNG files store 16 bit pixels in network byte order (big-endian, +ie. most significant bits first). This code would be used if they are +supplied the other way (little-endian, i.e. least significant bits +first, the way PCs store them): + + if (bit_depth > 8) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +PNG files store 3 color pixels in red, green, blue order. This code +would be used if they are supplied as blue, green, red: + + png_set_bgr(png_ptr); + +PNG files describe monochrome as black being zero and white being +one. This code would be used if the pixels are supplied with this reversed +(black being one and white being zero): + + png_set_invert_mono(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_write_user_transform_fn(png_ptr, + write_transform_fn); + +You must supply the function + + void write_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +before any of the other transformations are processed. If supported +libpng also supplies an information routine that may be called from +your callback: + + png_get_current_row_number(png_ptr); + png_get_current_pass_number(png_ptr); + +This returns the current row passed to the transform. With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + +You can also set up a pointer to a user structure for use by your +callback function. + + png_set_user_transform_info(png_ptr, user_ptr, 0, 0); + +The user_channels and user_depth parameters of this function are ignored +when writing; you can set them to zero as shown. + +You can retrieve the pointer via the function png_get_user_transform_ptr(). +For example: + + voidp write_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +It is possible to have libpng flush any pending output, either manually, +or automatically after a certain number of lines have been written. To +flush the output stream a single time call: + + png_write_flush(png_ptr); + +and to have libpng flush the output stream periodically after a certain +number of scanlines have been written, call: + + png_set_flush(png_ptr, nrows); + +Note that the distance between rows is from the last time png_write_flush() +was called, or the first row of the image if it has never been called. +So if you write 50 lines, and then png_set_flush 25, it will flush the +output on the next scanline, and every 25 lines thereafter, unless +png_write_flush() is called before 25 more lines have been written. +If nrows is too small (less than about 10 lines for a 640 pixel wide +RGB image) the image compression may decrease noticeably (although this +may be acceptable for real-time applications). Infrequent flushing will +only degrade the compression performance by a few percent over images +that do not use flushing. + +Writing the image data + +That's it for the transformations. Now you can write the image data. +The simplest way to do this is in one function call. If you have the +whole image in memory, you can just call png_write_image() and libpng +will write the image. You will need to pass in an array of pointers to +each row. This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() or call this function multiple +times, or any of that other stuff necessary with png_write_rows(). + + png_write_image(png_ptr, row_pointers); + +where row_pointers is: + + png_byte *row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to write the whole image at once, you can +use png_write_rows() instead. If the file is not interlaced, +this is simple: + + png_write_rows(png_ptr, row_pointers, + number_of_rows); + +row_pointers is the same as in the png_write_image() call. + +If you are just writing one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + + png_write_row(png_ptr, row_pointer); + +When the file is interlaced, things can get a good deal more complicated. +The only currently (as of the PNG Specification version 1.2, dated July +1999) defined interlacing scheme for PNG files is the "Adam7" interlace +scheme, that breaks down an image into seven smaller images of varying +size. libpng will build these images for you, or you can do them +yourself. If you want to build them yourself, see the PNG specification +for details of which pixels to write when. + +If you don't want libpng to handle the interlacing details, just +use png_set_interlace_handling() and call png_write_rows() the +correct number of times to write all the sub-images +(png_set_interlace_handling() returns the number of sub-images.) + +If you want libpng to build the sub-images, call this before you start +writing any rows: + + number_of_passes = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. + +Then write the complete image number_of_passes times. + + png_write_rows(png_ptr, row_pointers, number_of_rows); + +Think carefully before you write an interlaced image. Typically code that +reads such images reads all the image data into memory, uncompressed, before +doing any processing. Only code that can display an image on the fly can +take advantage of the interlacing and even then the image has to be exactly +the correct size for the output device, because scaling an image requires +adjacent pixels and these are not available until all the passes have been +read. + +If you do write an interlaced image you will hardly ever need to handle +the interlacing yourself. Call png_set_interlace_handling() and use the +approach described above. + +The only time it is conceivable that you will really need to write an +interlaced image pass-by-pass is when you have read one pass by pass and +made some pixel-by-pixel transformation to it, as described in the read +code above. In this case use the PNG_PASS_ROWS and PNG_PASS_COLS macros +to determine the size of each sub-image in turn and simply write the rows +you obtained from the read code. + +Finishing a sequential write + +After you are finished writing the image, you should finish writing +the file. If you are interested in writing comments or time, you should +pass an appropriately filled png_info pointer. If you are not interested, +you can pass NULL. + + png_write_end(png_ptr, info_ptr); + +When you are done, you can free all memory used by libpng like this: + + png_destroy_write_struct(&png_ptr, &info_ptr); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + + mask - identifies data to be freed, a mask + containing the bitwise OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". + +If you allocated data such as a palette that you passed in to libpng +with png_set_*, you must not free it until just before the call to +png_destroy_write_struct(). + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_zalloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + + mask - which data elements are affected + same choices as in png_free_data() + +For example, to transfer responsibility for some data from a read structure +to a write structure, you could use + + png_data_freer(read_ptr, read_info_ptr, + PNG_USER_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + + png_data_freer(write_ptr, write_info_ptr, + PNG_DESTROY_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + +thereby briefly reassigning responsibility for freeing to the user but +immediately afterwards reassigning it once more to the write_destroy +function. Having done this, it would then be safe to destroy the read +structure and continue to use the PLTE, tRNS, and hIST data in the write +structure. + +This function only affects data that has already been allocated. +You can call this function before calling after the png_set_*() functions +to control whether the user or png_destroy_*() is supposed to free the data. +When the user assumes responsibility for libpng-allocated data, the +application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_zalloc() to allocate it. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. +For a more compact example of writing a PNG image, see the file example.c. + +V. Modifying/Customizing libpng: + +There are two issues here. The first is changing how libpng does +standard things like memory allocation, input/output, and error handling. +The second deals with more complicated things like adding new chunks, +adding new transformations, and generally changing how libpng works. +Both of those are compile-time issues; that is, they are generally +determined at the time the code is written, and there is rarely a need +to provide the user with a means of changing them. + +Memory allocation, input/output, and error handling + +All of the memory allocation, input/output, and error handling in libpng +goes through callbacks that are user-settable. The default routines are +in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change +these functions, call the appropriate png_set_*_fn() function. + +Memory allocation is done through the functions png_malloc(), png_calloc(), +and png_free(). These currently just call the standard C functions. +png_calloc() calls png_malloc() and then clears the newly +allocated memory to zero. There is limited support for certain systems +with segmented memory architectures and the types of pointers declared by +png.h match this; you will have to use appropriate pointers in your +application. Since it is +unlikely that the method of handling memory allocation on a platform +will change between applications, these functions must be modified in +the library at compile time. If you prefer to use a different method +of allocating and freeing data, you can use png_create_read_struct_2() or +png_create_write_struct_2() to register your own functions as described +above. These functions also provide a void pointer that can be retrieved +via + + mem_ptr=png_get_mem_ptr(png_ptr); + +Your replacement memory functions must have prototypes as follows: + + png_voidp malloc_fn(png_structp png_ptr, + png_alloc_size_t size); + + void free_fn(png_structp png_ptr, png_voidp ptr); + +Your malloc_fn() must return NULL in case of failure. The png_malloc() +function will normally call png_error() if it receives a NULL from the +system memory allocator or from your replacement malloc_fn(). + +Your free_fn() will never be called with a NULL ptr, since libpng's +png_free() checks for NULL before calling free_fn(). + +Input/Output in libpng is done through png_read() and png_write(), +which currently just call fread() and fwrite(). The FILE * is stored in +png_struct and is initialized via png_init_io(). If you wish to change +the method of I/O, the library supplies callbacks that you can set +through the function png_set_read_fn() and png_set_write_fn() at run +time, instead of calling the png_init_io() function. These functions +also provide a void pointer that can be retrieved via the function +png_get_io_ptr(). For example: + + png_set_read_fn(png_structp read_ptr, + voidp read_io_ptr, png_rw_ptr read_data_fn) + + png_set_write_fn(png_structp write_ptr, + voidp write_io_ptr, png_rw_ptr write_data_fn, + png_flush_ptr output_flush_fn); + + voidp read_io_ptr = png_get_io_ptr(read_ptr); + voidp write_io_ptr = png_get_io_ptr(write_ptr); + +The replacement I/O functions must have prototypes as follows: + + void user_read_data(png_structp png_ptr, + png_bytep data, png_size_t length); + + void user_write_data(png_structp png_ptr, + png_bytep data, png_size_t length); + + void user_flush_data(png_structp png_ptr); + +The user_read_data() function is responsible for detecting and +handling end-of-data errors. + +Supplying NULL for the read, write, or flush functions sets them back +to using the default C stream functions, which expect the io_ptr to +point to a standard *FILE structure. It is probably a mistake +to use NULL for one of write_data_fn and output_flush_fn but not both +of them, unless you have built libpng with PNG_NO_WRITE_FLUSH defined. +It is an error to read from a write stream, and vice versa. + +Error handling in libpng is done through png_error() and png_warning(). +Errors handled through png_error() are fatal, meaning that png_error() +should never return to its caller. Currently, this is handled via +setjmp() and longjmp() (unless you have compiled libpng with +PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), +but you could change this to do things like exit() if you should wish, +as long as your function does not return. + +On non-fatal errors, png_warning() is called +to print a warning message, and then control returns to the calling code. +By default png_error() and png_warning() print a message on stderr via +fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined +(because you don't want the messages) or PNG_NO_STDIO defined (because +fprintf() isn't available). If you wish to change the behavior of the error +functions, you will need to set up your own message callbacks. These +functions are normally supplied at the time that the png_struct is created. +It is also possible to redirect errors and warnings to your own replacement +functions after png_create_*_struct() has been called by calling: + + png_set_error_fn(png_structp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warning_fn); + + png_voidp error_ptr = png_get_error_ptr(png_ptr); + +If NULL is supplied for either error_fn or warning_fn, then the libpng +default function will be used, calling fprintf() and/or longjmp() if a +problem is encountered. The replacement error functions should have +parameters as follows: + + void user_error_fn(png_structp png_ptr, + png_const_charp error_msg); + + void user_warning_fn(png_structp png_ptr, + png_const_charp warning_msg); + +The motivation behind using setjmp() and longjmp() is the C++ throw and +catch exception handling methods. This makes the code much easier to write, +as there is no need to check every return code of every function call. +However, there are some uncertainties about the status of local variables +after a longjmp, so the user may want to be careful about doing anything +after setjmp returns non-zero besides returning itself. Consult your +compiler documentation for more details. For an alternative approach, you +may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net). + +Custom chunks + +If you need to read or write custom chunks, you may need to get deeper +into the libpng code. The library now has mechanisms for storing +and writing chunks of unknown type; you can even declare callbacks +for custom chunks. However, this may not be good enough if the +library code itself needs to know about interactions between your +chunk and existing `intrinsic' chunks. + +If you need to write a new intrinsic chunk, first read the PNG +specification. Acquire a first level of understanding of how it works. +Pay particular attention to the sections that describe chunk names, +and look at how other chunks were designed, so you can do things +similarly. Second, check out the sections of libpng that read and +write chunks. Try to find a chunk that is similar to yours and use +it as a template. More details can be found in the comments inside +the code. It is best to handle unknown chunks in a generic method, +via callback functions, instead of by modifying libpng functions. + +If you wish to write your own transformation for the data, look through +the part of the code that does the transformations, and check out some of +the simpler ones to get an idea of how they work. Try to find a similar +transformation to the one you want to add and copy off of it. More details +can be found in the comments inside the code itself. + +Configuring for 16 bit platforms + +You will want to look into zconf.h to tell zlib (and thus libpng) that +it cannot allocate more then 64K at a time. Even if you can, the memory +won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. + +Configuring for DOS + +For DOS users who only have access to the lower 640K, you will +have to limit zlib's memory usage via a png_set_compression_mem_level() +call. See zlib.h or zconf.h in the zlib library for more information. + +Configuring for Medium Model + +Libpng's support for medium model has been tested on most of the popular +compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets +defined, and FAR gets defined to far in pngconf.h, and you should be +all set. Everything in the library (except for zlib's structure) is +expecting far data. You must use the typedefs with the p or pp on +the end for pointers (or at least look at them and be careful). Make +note that the rows of data are defined as png_bytepp, which is an +unsigned char far * far *. + +Configuring for gui/windowing platforms: + +You will need to write new error and warning functions that use the GUI +interface, as described previously, and set them to be the error and +warning functions at the time that png_create_*_struct() is called, +in order to have them available during the structure initialization. +They can be changed later via png_set_error_fn(). On some compilers, +you may also have to change the memory allocators (png_malloc, etc.). + +Configuring for compiler xxx: + +All includes for libpng are in pngconf.h. If you need to add, change +or delete an include, this is the place to do it. +The includes that are not needed outside libpng are placed in pngpriv.h, +which is only used by the routines inside libpng itself. +The files in libpng proper only include pngpriv.h and png.h, which +in turn includes pngconf.h. + +Configuring zlib: + +There are special functions to configure the compression. Perhaps the +most useful one changes the compression level, which currently uses +input compression values in the range 0 - 9. The library normally +uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests +have shown that for a large majority of images, compression values in +the range 3-6 compress nearly as well as higher levels, and do so much +faster. For online applications it may be desirable to have maximum speed +(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also +specify no compression (Z_NO_COMPRESSION = 0), but this would create +files larger than just storing the raw bitmap. You can specify the +compression level by calling: + + #include zlib.h + png_set_compression_level(png_ptr, level); + +Another useful one is to reduce the memory level used by the library. +The memory level defaults to 8, but it can be lowered if you are +short on memory (running DOS, for example, where you only have 640K). +Note that the memory level does have an effect on compression; among +other things, lower levels will result in sections of incompressible +data being emitted in smaller stored blocks, with a correspondingly +larger relative overhead of up to 15% in the worst case. + + #include zlib.h + png_set_compression_mem_level(png_ptr, level); + +The other functions are for configuring zlib. They are not recommended +for normal use and may result in writing an invalid PNG file. See +zlib.h for more information on what these mean. + + #include zlib.h + png_set_compression_strategy(png_ptr, + strategy); + + png_set_compression_window_bits(png_ptr, + window_bits); + + png_set_compression_method(png_ptr, method); + png_set_compression_buffer_size(png_ptr, size); + +Controlling row filtering + +If you want to control whether libpng uses filtering or not, which +filters are used, and how it goes about picking row filters, you +can call one of these functions. The selection and configuration +of row filters can have a significant impact on the size and +encoding speed and a somewhat lesser impact on the decoding speed +of an image. Filtering is enabled by default for RGB and grayscale +images (with and without alpha), but not for paletted images nor +for any images with bit depths less than 8 bits/pixel. + +The 'method' parameter sets the main filtering method, which is +currently only '0' in the PNG 1.2 specification. The 'filters' +parameter sets which filter(s), if any, should be used for each +scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS +to turn filtering on and off, respectively. + +Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, +PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise +ORed together with '|' to specify one or more filters to use. +These filters are described in more detail in the PNG specification. +If you intend to change the filter type during the course of writing +the image, you should start with flags set for all of the filters +you intend to use so that libpng can initialize its internal +structures appropriately for all of the filter types. (Note that this +means the first row must always be adaptively filtered, because libpng +currently does not allocate the filter buffers until png_write_row() +is called for the first time.) + + filters = PNG_FILTER_NONE | PNG_FILTER_SUB + PNG_FILTER_UP | PNG_FILTER_AVG | + PNG_FILTER_PAETH | PNG_ALL_FILTERS; + + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, + filters); + The second parameter can also be + PNG_INTRAPIXEL_DIFFERENCING if you are + writing a PNG to be embedded in a MNG + datastream. This parameter must be the + same as the value of filter_method used + in png_set_IHDR(). + +It is also possible to influence how libpng chooses from among the +available filters. This is done in one or both of two ways - by +telling it how important it is to keep the same filter for successive +rows, and by telling it the relative computational costs of the filters. + + double weights[3] = {1.5, 1.3, 1.1}, + costs[PNG_FILTER_VALUE_LAST] = + {1.0, 1.3, 1.3, 1.5, 1.7}; + + png_set_filter_heuristics(png_ptr, + PNG_FILTER_HEURISTIC_WEIGHTED, 3, + weights, costs); + +The weights are multiplying factors that indicate to libpng that the +row filter should be the same for successive rows unless another row filter +is that many times better than the previous filter. In the above example, +if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a +"sum of absolute differences" 1.5 x 1.3 times higher than other filters +and still be chosen, while the NONE filter could have a sum 1.1 times +higher than other filters and still be chosen. Unspecified weights are +taken to be 1.0, and the specified weights should probably be declining +like those above in order to emphasize recent filters over older filters. + +The filter costs specify for each filter type a relative decoding cost +to be considered when selecting row filters. This means that filters +with higher costs are less likely to be chosen over filters with lower +costs, unless their "sum of absolute differences" is that much smaller. +The costs do not necessarily reflect the exact computational speeds of +the various filters, since this would unduly influence the final image +size. + +Note that the numbers above were invented purely for this example and +are given only to help explain the function usage. Little testing has +been done to find optimum values for either the costs or the weights. + +Removing unwanted object code + +There are a bunch of #define's in pngconf.h that control what parts of +libpng are compiled. All the defines end in _SUPPORTED. If you are +never going to use a capability, you can change the #define to #undef +before recompiling libpng and save yourself code and data space, or +you can turn off individual capabilities with defines that begin with +PNG_NO_. + +In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead. + +You can also turn all of the transforms and ancillary chunk capabilities +off en masse with compiler directives that define +PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, +or all four, +along with directives to turn on any of the capabilities that you do +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra +transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks. Use of the +PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library +that is incapable of reading or writing ancillary chunks. If you are +not using the progressive reading capability, you can turn that off +with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING +capability, which you'll still have). + +All the reading and writing specific code are in separate files, so the +linker should only grab the files it needs. However, if you want to +make sure, or if you are building a stand alone library, all the +reading files start with pngr and all the writing files start with +pngw. The files that don't match either (like png.c, pngtrans.c, etc.) +are used for both reading and writing, and always need to be included. +The progressive reader is in pngpread.c + +If you are creating or distributing a dynamically linked library (a .so +or DLL file), you should not remove or disable any parts of the library, +as this will cause applications linked with different versions of the +library to fail if they call functions not available in your library. +The size of the library itself should not be an issue, because only +those sections that are actually used will be loaded into memory. + +Requesting debug printout + +The macro definition PNG_DEBUG can be used to request debugging +printout. Set it to an integer value in the range 0 to 3. Higher +numbers result in increasing amounts of debugging information. The +information is printed to the "stderr" file, unless another file +name is specified in the PNG_DEBUG_FILE macro definition. + +When PNG_DEBUG > 0, the following functions (macros) become available: + + png_debug(level, message) + png_debug1(level, message, p1) + png_debug2(level, message, p1, p2) + +in which "level" is compared to PNG_DEBUG to decide whether to print +the message, "message" is the formatted string to be printed, +and p1 and p2 are parameters that are to be embedded in the string +according to printf-style formatting directives. For example, + + png_debug1(2, "foo=%d\n", foo); + +is expanded to + + if (PNG_DEBUG > 2) + fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); + +When PNG_DEBUG is defined but is zero, the macros aren't defined, but you +can still use PNG_DEBUG to control your own debugging: + + #ifdef PNG_DEBUG + fprintf(stderr, ... + #endif + +When PNG_DEBUG = 1, the macros are defined, but only png_debug statements +having level = 0 will be printed. There aren't any such statements in +this version of libpng, but if you insert some they will be printed. + +VI. MNG support + +The MNG specification (available at http://www.libpng.org/pub/mng) allows +certain extensions to PNG for PNG images that are embedded in MNG datastreams. +Libpng can support some of these extensions. To enable them, use the +png_permit_mng_features() function: + + feature_set = png_permit_mng_features(png_ptr, mask) + + mask is a png_uint_32 containing the bitwise OR of the + features you want to enable. These include + PNG_FLAG_MNG_EMPTY_PLTE + PNG_FLAG_MNG_FILTER_64 + PNG_ALL_MNG_FEATURES + + feature_set is a png_uint_32 that is the bitwise AND of + your mask with the set of MNG features that is + supported by the version of libpng that you are using. + +It is an error to use this function when reading or writing a standalone +PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped +in a MNG datastream. As a minimum, it must have the MNG 8-byte signature +and the MHDR and MEND chunks. Libpng does not provide support for these +or any other MNG chunks; your application must provide its own support for +them. You may wish to consider using libmng (available at +http://www.libmng.com) instead. + +VII. Changes to Libpng from version 0.88 + +It should be noted that versions of libpng later than 0.96 are not +distributed by the original libpng author, Guy Schalnat, nor by +Andreas Dilger, who had taken over from Guy during 1996 and 1997, and +distributed versions 0.89 through 0.96, but rather by another member +of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are +still alive and well, but they have moved on to other things. + +The old libpng functions png_read_init(), png_write_init(), +png_info_init(), png_read_destroy(), and png_write_destroy() have been +moved to PNG_INTERNAL in version 0.95 to discourage their use. These +functions will be removed from libpng version 1.4.0. + +The preferred method of creating and initializing the libpng structures is +via the png_create_read_struct(), png_create_write_struct(), and +png_create_info_struct() because they isolate the size of the structures +from the application, allow version error checking, and also allow the +use of custom error handling routines during the initialization, which +the old functions do not. The functions png_read_destroy() and +png_write_destroy() do not actually free the memory that libpng +allocated for these structs, but just reset the data structures, so they +can be used instead of png_destroy_read_struct() and +png_destroy_write_struct() if you feel there is too much system overhead +allocating and freeing the png_struct for each image read. + +Setting the error callbacks via png_set_message_fn() before +png_read_init() as was suggested in libpng-0.88 is no longer supported +because this caused applications that do not use custom error functions +to fail if the png_ptr was not initialized to zero. It is still possible +to set the error callbacks AFTER png_read_init(), or to change them with +png_set_error_fn(), which is essentially the same function, but with a new +name to force compilation errors with applications that try to use the old +method. + +Starting with version 1.0.7, you can find out which version of the library +you are using at run-time: + + png_uint_32 libpng_vn = png_access_version_number(); + +The number libpng_vn is constructed from the major version, minor +version with leading zero, and release number with leading zero, +(e.g., libpng_vn for version 1.0.7 is 10007). + +You can also check which version of png.h you used when compiling your +application: + + png_uint_32 application_vn = PNG_LIBPNG_VER; + +VIII. Changes to Libpng from version 1.0.x to 1.2.x + +Support for user memory management was enabled by default. To +accomplish this, the functions png_create_read_struct_2(), +png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), +png_malloc_default(), and png_free_default() were added. + +Support for the iTXt chunk has been enabled by default as of +version 1.2.41. + +Support for certain MNG features was enabled. + +Support for numbered error messages was added. However, we never got +around to actually numbering the error messages. The function +png_set_strip_error_numbers() was added (Note: the prototype for this +function was inadvertently removed from png.h in PNG_NO_ASSEMBLER_CODE +builds of libpng-1.2.15. It was restored in libpng-1.2.36). + +The png_malloc_warn() function was added at libpng-1.2.3. This issues +a png_warning and returns NULL instead of aborting when it fails to +acquire the requested memory allocation. + +Support for setting user limits on image width and height was enabled +by default. The functions png_set_user_limits(), png_get_user_width_max(), +and png_get_user_height_max() were added at libpng-1.2.6. + +The png_set_add_alpha() function was added at libpng-1.2.7. + +The function png_set_expand_gray_1_2_4_to_8() was added at libpng-1.2.9. +Unlike png_set_gray_1_2_4_to_8(), the new function does not expand the +tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is +deprecated. + +A number of macro definitions in support of runtime selection of +assembler code features (especially Intel MMX code support) were +added at libpng-1.2.0: + + PNG_ASM_FLAG_MMX_SUPPORT_COMPILED + PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU + PNG_ASM_FLAG_MMX_READ_COMBINE_ROW + PNG_ASM_FLAG_MMX_READ_INTERLACE + PNG_ASM_FLAG_MMX_READ_FILTER_SUB + PNG_ASM_FLAG_MMX_READ_FILTER_UP + PNG_ASM_FLAG_MMX_READ_FILTER_AVG + PNG_ASM_FLAG_MMX_READ_FILTER_PAETH + PNG_ASM_FLAGS_INITIALIZED + PNG_MMX_READ_FLAGS + PNG_MMX_FLAGS + PNG_MMX_WRITE_FLAGS + PNG_MMX_FLAGS + +We added the following functions in support of runtime +selection of assembler code features: + + png_get_mmx_flagmask() + png_set_mmx_thresholds() + png_get_asm_flags() + png_get_mmx_bitdepth_threshold() + png_get_mmx_rowbytes_threshold() + png_set_asm_flags() + +We replaced all of these functions with simple stubs in libpng-1.2.20, +when the Intel assembler code was removed due to a licensing issue. + +These macros are deprecated: + + PNG_READ_TRANSFORMS_NOT_SUPPORTED + PNG_PROGRESSIVE_READ_NOT_SUPPORTED + PNG_NO_SEQUENTIAL_READ_SUPPORTED + PNG_WRITE_TRANSFORMS_NOT_SUPPORTED + PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED + PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED + +They have been replaced, respectively, by: + + PNG_NO_READ_TRANSFORMS + PNG_NO_PROGRESSIVE_READ + PNG_NO_SEQUENTIAL_READ + PNG_NO_WRITE_TRANSFORMS + PNG_NO_READ_ANCILLARY_CHUNKS + PNG_NO_WRITE_ANCILLARY_CHUNKS + +PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been +deprecated since libpng-1.0.16 and libpng-1.2.6. + +The function + png_check_sig(sig, num) +was replaced with + !png_sig_cmp(sig, 0, num) +It has been deprecated since libpng-0.90. + +The function + png_set_gray_1_2_4_to_8() +which also expands tRNS to alpha was replaced with + png_set_expand_gray_1_2_4_to_8() +which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. + +IX. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x + +Private libpng prototypes and macro definitions were moved from +png.h and pngconf.h into a new pngpriv.h header file. + +Functions png_set_benign_errors(), png_benign_error(), and +png_chunk_benign_error() were added. + +Support for setting the maximum amount of memory that the application +will allocate for reading chunks was added, as a security measure. +The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() +were added to the library. + +We implemented support for I/O states by adding png_ptr member io_state +and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c + +We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level +input transforms. + +Checking for and reporting of errors in the IHDR chunk is more thorough. + +Support for global arrays was removed, to improve thread safety. + +Some obsolete/deprecated macros and functions have been removed. + +Typecasted NULL definitions such as + #define png_voidp_NULL (png_voidp)NULL +were eliminated. If you used these in your application, just use +NULL instead. + +The png_struct and info_struct members "trans" and "trans_values" were +changed to "trans_alpha" and "trans_color", respectively. + +The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles +were removed. + +The PNG_1_0_X and PNG_1_2_X macros were eliminated. + +The PNG_LEGACY_SUPPORTED macro was eliminated. + +Many WIN32_WCE #ifdefs were removed. + +The functions png_read_init(info_ptr), png_write_init(info_ptr), +png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() +have been removed. They have been deprecated since libpng-0.95. + +The png_permit_empty_plte() was removed. It has been deprecated +since libpng-1.0.9. Use png_permit_mng_features() instead. + +We removed the obsolete stub functions png_get_mmx_flagmask(), +png_set_mmx_thresholds(), png_get_asm_flags(), +png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), +png_set_asm_flags(), and png_mmx_supported() + +We removed the obsolete png_check_sig(), png_memcpy_check(), and +png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), +and memset(), respectively. + +The function png_set_gray_1_2_4_to_8() was removed. It has been +deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with +png_set_expand_gray_1_2_4_to_8() because the former function also +expanded any tRNS chunk to an alpha channel. + +Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32 +were added and are used by default instead of the corresponding +functions. Unfortunately, +from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. + +We changed the prototype for png_malloc() from + png_malloc(png_structp png_ptr, png_uint_32 size) +to + png_malloc(png_structp png_ptr, png_alloc_size_t size) + +This also applies to the prototype for the user replacement malloc_fn(). + +The png_calloc() function was added and is used in place of +of "png_malloc(); memset();" except in the case in png_read_png() +where the array consists of pointers; in this case a "for" loop is used +after the png_malloc() to set the pointers to NULL, to give robust. +behavior in case the application runs out of memory part-way through +the process. + +We changed the prototypes of png_get_compression_buffer_size() and +png_set_compression_buffer_size() to work with png_size_t instead of +png_uint_32. + +Support for numbered error messages was removed by default, since we +never got around to actually numbering the error messages. The function +png_set_strip_error_numbers() was removed from the library by default. + +The png_zalloc() and png_zfree() functions are no longer exported. +The png_zalloc() function no longer zeroes out the memory that it +allocates. + +Support for dithering was disabled by default in libpng-1.4.0, because +been well tested and doesn't actually "dither". The code was not +removed, however, and could be enabled by building libpng with +PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support +was reenabled, but the function was renamed png_set_quantize() to +reflect more accurately what it actually does. At the same time, +the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to +PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED +was renamed to PNG_READ_QUANTIZE_SUPPORTED. + +We removed the trailing '.' from the warning and error messages. + +X. Changes to Libpng from version 1.4.x to 1.5.x + +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. + +A. Changes that affect users of libpng + +There are no substantial API changes between the non-deprecated parts of +the 1.4.5 API and the 1.5.0 API, however the ability to directly access +the main libpng control structures, png_struct and png_info, deprecated +in earlier versions of libpng, has been completely removed from +libpng 1.5. + +We no longer include zlib.h in png.h. Applications that need access +to information in zlib.h will need to add the '#include "zlib.h"' +directive. It does not matter whether it is placed prior to or after +the '"#include png.h"' directive. + +We moved the png_strcpy(), png_strncpy(), png_strlen(), png_memcpy(), +png_memcmp(), png_sprintf, and png_memcpy() macros into a private +header file (pngpriv.h) that is not accessible to applications. + +In png_get_iCCP, the type of "profile" was changed from png_charpp +to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep. + +There are changes of form in png.h, including new and changed macros to +declare +parts of the API. Some API functions with arguments that are pointers to +data not modified within the function have been corrected to declare +these arguments with PNG_CONST. + +Much of the internal use of C macros to control the library build has also +changed and some of this is visible in the exported header files, in +particular the use of macros to control data and API elements visible +during application compilation may require significant revision to +application code. (It is extremely rare for an application to do this.) + +Any program that compiled against libpng 1.4 and did not use deprecated +features or access internal library structures should compile and work +against libpng 1.5, except for the change in the prototype for +png_get_iCCP() and png_set_iCCP() API functions mentioned above. + +libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of +interlaced images. The macros return the number of rows and columns in +each pass and information that can be used to de-interlace and (if +absolutely necessary) interlace an image. + +libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls +the application-provided png_longjmp_ptr on the internal, but application +initialized, jmpbuf. It is provided as a convenience to avoid the need +to use the png_jmpbuf macro, which had the unnecessary side effect of +resetting the internal png_longjmp_ptr value. + +libpng 1.5.0 includes a complete fixed point API. By default this is +present along with the corresponding floating point API. In general the +fixed point API is faster and smaller than the floating point one because +the PNG file format used fixed point, not floating point. This applies +even if the library uses floating point in internal calculations. A new +macro, PNG_FLOATING_ARITHMETIC_SUPPORTED, reveals whether the library +uses floating point arithmetic (the default) or fixed point arithmetic +internally for performance critical calculations such as gamma correction. +In some cases, the gamma calculations may produce slightly different +results. This has changed the results in png_rgb_to_gray and in alpha +composition (png_set_background for example). This applies even if the +original image was already linear (gamma == 1.0) and, therefore, it is +not necessary to linearize the image. This is because libpng has *not* +been changed to optimize that case correctly, yet. + +Fixed point support for the sCAL chunk comes with an important caveat; +the sCAL specification uses a decimal encoding of floating point values +and the accuracy of PNG fixed point values is insufficient for +representation of these values. Consequently a "string" API +(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading +arbitrary sCAL chunks in the absence of either the floating point API or +internal floating point calculations. + +Applications no longer need to include the optional distribution header +file pngusr.h or define the corresponding macros during application +build in order to see the correct variant of the libpng API. From 1.5.0 +application code can check for the corresponding _SUPPORTED macro: + +#ifdef PNG_INCH_CONVERSIONS_SUPPORTED + /* code that uses the inch conversion APIs. */ +#endif + +This macro will only be defined if the inch conversion functions have been +compiled into libpng. The full set of macros, and whether or not support +has been compiled in, are available in the header file pnglibconf.h. +This header file is specific to the libpng build. Notice that prior to +1.5.0 the _SUPPORTED macros would always have the default definition unless +reset by pngusr.h or by explicit settings on the compiler command line. +These settings may produce compiler warnings or errors in 1.5.0 because +of macro redefinition. + +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. libpng 1.5.0 +is consistent with the implementation in 1.4.5 and 1.2.x (where the macro +did not exist.) + +Applications can now choose whether to use these macros or to call the +corresponding function by defining PNG_USE_READ_MACROS or +PNG_NO_USE_READ_MACROS before including png.h. Notice that this is +only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0 + will lead to a link failure. + +B. Changes to the build and configuration of libpng + +Details of internal changes to the library code can be found in the CHANGES +file. These will be of no concern to the vast majority of library users or +builders, however the few who configure libpng to a non-default feature +set may need to change how this is done. + +There should be no need for library builders to alter build scripts if +these use the distributed build support - configure or the makefiles - +however users of the makefiles may care to update their build scripts +to build pnglibconf.h where the corresponding makefile does not do so. + +Building libpng with a non-default configuration has changed completely. +The old method using pngusr.h should still work correctly even though the +way pngusr.h is used in the build has been changed, however library +builders will probably want to examine the changes to take advantage of +new capabilities and to simplify their build system. + +B.1 Specific changes to library configuration capabilities + +The library now supports a complete fixed point implementation and can +thus be used on systems which have no floating point support or very +limited or slow support. Previously gamma correction, an essential part +of complete PNG support, required reasonably fast floating point. + +As part of this the choice of internal implementation has been made +independent of the choice of fixed versus floating point APIs and all the +missing fixed point APIs have been implemented. + +The exact mechanism used to control attributes of API functions has +changed. A single set of operating system independent macro definitions +is used and operating system specific directives are defined in +pnglibconf.h + +As part of this the mechanism used to choose procedure call standards on +those systems that allow a choice has been changed. At present this only +affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems +running on Intel processors. As before PNGAPI is defined where required +to control the exported API functions; however, two new macros, PNGCBAPI +and PNGCAPI, are used instead for callback functions (PNGCBAPI) and +(PNGCAPI) for functions that must match a C library prototype (currently +only png_longjmp_ptr, which must match the C longjmp function.) The new +approach is documented in pngconf.h + +Despite these changes libpng 1.5.0 only supports the native C function +calling standard on those platforms tested so far (__cdecl on Microsoft +Windows). This is because the support requirements for alternative +calling conventions seem to no longer exist. Developers who find it +necessary to set PNG_API_RULE to 1 should advise the mailing list +(png-mng-implement) of this and library builders who use Openwatcom and +therefore set PNG_API_RULE to 2 should also contact the mailing list. + +A new test program, pngvalid, is provided in addition to pngtest. +pngvalid validates the arithmetic accuracy of the gamma correction +calculations and includes a number of validations of the file format. +A subset of the full range of tests is run when "make check" is done +(in the 'configure' build.) pngvalid also allows total allocated memory +usage to be evaluated and performs additional memory overwrite validation. + +Many changes to individual feature macros have been made. The following +are the changes most likely to be noticed by library builders who +configure libpng: + +1) All feature macros now have consistent naming: + +#define PNG_NO_feature turns the feature off +#define PNG_feature_SUPPORTED turns the feature on + +pnglibconf.h contains one line for each feature macro which is either: + +#define PNG_feature_SUPPORTED + +if the feature is supported or: + +/*#undef PNG_feature_SUPPORTED*/ + +if it is not. Library code consistently checks for the 'SUPPORTED' macro. +It does not, and should not, check for the 'NO' macro which will not +normally be defined even if the feature is not supported. + +Compatibility with the old names is provided as follows: + +PNG_INCH_CONVERSIONS turns on PNG_INCH_CONVERSIONS_SUPPORTED + +And the following definitions disable the corresponding feature: + +PNG_SETJMP_NOT_SUPPORTED disables SETJMP +PNG_READ_TRANSFORMS_NOT_SUPPORTED disables READ_TRANSFORMS +PNG_NO_READ_COMPOSITED_NODIV disables READ_COMPOSITE_NODIV +PNG_WRITE_TRANSFORMS_NOT_SUPPORTED disables WRITE_TRANSFORMS +PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED disables READ_ANCILLARY_CHUNKS +PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED disables WRITE_ANCILLARY_CHUNKS + +Library builders should remove use of the above, inconsistent, names. + +2) Warning and error message formatting was previously conditional on +the STDIO feature. The library has been changed to use the +CONSOLE_IO feature instead. This means that if CONSOLE_IO is disabled +the library no longer uses the printf(3) functions, even though the +default read/write implementations use (FILE) style stdio.h functions. + +3) Three feature macros now control the fixed/floating point decisions: + +PNG_FLOATING_POINT_SUPPORTED enables the floating point APIs + +PNG_FIXED_POINT_SUPPORTED enables the fixed point APIs; however, in +practice these are normally required internally anyway (because the PNG +file format is fixed point), therefore in most cases PNG_NO_FIXED_POINT +merely stops the function from being exported. + +PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating +point implementation or the fixed point one. Typically the fixed point +implementation is larger and slower than the floating point implementation +on a system that supports floating point, however it may be faster on a +system which lacks floating point hardware and therefore uses a software +emulation. + +4) Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the +functions to read and write ints to be disabled independently of +PNG_USE_READ_MACROS, which allows libpng to be built with the functions +even though the default is to use the macros - this allows applications +to choose at app buildtime whether or not to use macros (previously +impossible because the functions weren't in the default build.) + +B.2 Changes to the configuration mechanism + +Prior to libpng-1.5.0 library builders who needed to configure libpng +had either to modify the exported pngconf.h header file to add system +specific configuration or had to write feature selection macros into +pngusr.h and cause this to be included into pngconf.h by defining +PNG_USER_CONFIG. The latter mechanism had the disadvantage that an +application built without PNG_USER_CONFIG defined would see the +unmodified, default, libpng API and thus would probably fail to link. + +These mechanisms still work in the configure build and in any makefile +build that builds pnglibconf.h although the feature selection macros +have changed somewhat as described above. In 1.5.0, however, pngusr.h is +processed only once, when the exported header file pnglibconf.h is built. +pngconf.h no longer includes pngusr.h, therefore it is ignored after the +build of pnglibconf.h and it is never included in an application build. + +The rarely used alternative of adding a list of feature macros to the +CFLAGS setting in the build also still works, however the macros will be +copied to pnglibconf.h and this may produce macro redefinition warnings +when the individual C files are compiled. + +All configuration now only works if pnglibconf.h is built from +scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan +(the original author of awk) maintains C source code of that awk and this +and all known later implementations (often called by subtly different +names - nawk and gawk for example) are adequate to build pnglibconf.h. +The Sun Microsystems (now Oracle) program 'awk' is an earlier version +and does not work, this may also apply to other systems that have a +functioning awk called 'nawk'. + +Configuration options are now documented in scripts/pnglibconf.dfa. This +file also includes dependency information that ensures a configuration is +consistent; that is, if a feature is switched off dependent features are +also removed. As a recommended alternative to using feature macros in +pngusr.h a system builder may also define equivalent options in pngusr.dfa +(or, indeed, any file) and add that to the configuration by setting +DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate +how to do this, and a case where pngusr.h is still required. + +XI. Detecting libpng + +The png_get_io_ptr() function has been present since libpng-0.88, has never +changed, and is unaffected by conditional compilation macros. It is the +best choice for use in configure scripts for detecting the presence of any +libpng version since 0.88. In an autoconf "configure.in" you could use + + AC_CHECK_LIB(png, png_get_io_ptr, ... + +XII. Source code repository + +Since about February 2009, version 1.2.34, libpng has been under "git" source +control. The git repository was built from old libpng-x.y.z.tar.gz files +going back to version 0.70. You can access the git repository (read only) +at + + git://libpng.git.sourceforge.net/gitroot/libpng + +or you can browse it via "gitweb" at + + http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng + +Patches can be sent to glennrp at users.sourceforge.net or to +png-mng-implement at lists.sourceforge.net or you can upload them to +the libpng bug tracker at + + http://libpng.sourceforge.net + +We also accept patches built from the tar or zip distributions, and +simple verbal discriptions of bug fixes, reported either to the +SourceForge bug tracker or to the png-mng-implement at lists.sf.net +mailing list. + +XIII. Coding style + +Our coding style is similar to the "Allman" style, with curly +braces on separate lines: + + if (condition) + { + action; + } + + else if (another condition) + { + another action; + } + +The braces can be omitted from simple one-line actions: + + if (condition) + return (0); + +We use 3-space indentation, except for continued statements which +are usually indented the same as the first line of the statement +plus four more spaces. + +For macro definitions we use 2-space indentation, always leaving the "#" +in the first column. + + #ifndef PNG_NO_FEATURE + # ifndef PNG_FEATURE_SUPPORTED + # define PNG_FEATURE_SUPPORTED + # endif + #endif + +Comments appear with the leading "/*" at the same indentation as +the statement that follows the comment: + + /* Single-line comment */ + statement; + + /* This is a multiple-line + * comment. + */ + statement; + +Very short comments can be placed after the end of the statement +to which they pertain: + + statement; /* comment */ + +We don't use C++ style ("//") comments. We have, however, +used them in the past in some now-abandoned MMX assembler +code. + +Functions and their curly braces are not indented, and +exported functions are marked with PNGAPI: + + /* This is a public function that is visible to + * application programmers. It does thus-and-so. + */ + void PNGAPI + png_exported_function(png_ptr, png_info, foo) + { + body; + } + +The prototypes for all exported functions appear in png.h, +above the comment that says + + /* Maintainer: Put new public prototypes here ... */ + +We mark all non-exported functions with "/* PRIVATE */"": + + void /* PRIVATE */ + png_non_exported_function(png_ptr, png_info, foo) + { + body; + } + +The prototypes for non-exported functions (except for those in +pngtest) appear in +pngpriv.h +above the comment that says + + /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ + +To avoid polluting the global namespace, the names of all exported +functions and variables begin with "png_", and all publicly visible C +preprocessor macros begin with "PNG_". We request that applications that +use libpng *not* begin any of their own symbols with either of these strings. + +We put a space after each comma and after each semicolon +in "for" statements, and we put spaces before and after each +C binary operator and after "for" or "while", and before +"?". We don't put a space between a typecast and the expression +being cast, nor do we put one between a function name and the +left parenthesis that follows it: + + for (i = 2; i > 0; --i) + y[i] = a(x) + (int)b; + +We prefer #ifdef and #ifndef to #if defined() and if !defined() +when there is only one macro being tested. + +We do not use the TAB character for indentation in the C sources. + +Lines do not exceed 80 characters. + +Other rules can be inferred by inspecting the libpng source. + +XIV. Y2K Compliance in libpng + +March 31, 2011 + +Since the PNG Development group is an ad-hoc body, we can't make +an official declaration. + +This is your unofficial assurance that libpng from version 0.71 and +upward through 1.5.2 are Y2K compliant. It is my belief that earlier +versions were also Y2K compliant. + +Libpng only has three year fields. One is a 2-byte unsigned integer that +will hold years up to 65535. The other two hold the date in text +format, and will hold years up to 9999. + +The integer is + "png_uint_16 year" in png_time_struct. + +The strings are + "png_charp time_buffer" in png_struct and + "near_time_buffer", which is a local character string in png.c. + +There are seven time-related functions: + + png_convert_to_rfc_1123() in png.c + (formerly png_convert_to_rfc_1152() in error) + png_convert_from_struct_tm() in pngwrite.c, called + in pngwrite.c + png_convert_from_time_t() in pngwrite.c + png_get_tIME() in pngget.c + png_handle_tIME() in pngrutil.c, called in pngread.c + png_set_tIME() in pngset.c + png_write_tIME() in pngwutil.c, called in pngwrite.c + +All appear to handle dates properly in a Y2K environment. The +png_convert_from_time_t() function calls gmtime() to convert from system +clock time, which returns (year - 1900), which we properly convert to +the full 4-digit year. There is a possibility that applications using +libpng are not passing 4-digit years into the png_convert_to_rfc_1123() +function, or that they are incorrectly passing only a 2-digit year +instead of "year - 1900" into the png_convert_from_struct_tm() function, +but this is not under our control. The libpng documentation has always +stated that it works with 4-digit years, and the APIs have been +documented as such. + +The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned +integer to hold the year, and can hold years as large as 65535. + +zlib, upon which libpng depends, is also Y2K compliant. It contains +no date-related code. + + + Glenn Randers-Pehrson + libpng maintainer + PNG Development Group diff --git a/dll/3rdparty/libpng/png.c b/dll/3rdparty/libpng/png.c index dab4f36459d..7d09b0dbd21 100644 --- a/dll/3rdparty/libpng/png.c +++ b/dll/3rdparty/libpng/png.c @@ -1,8 +1,8 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.4.2 [May 6, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.1 [February 3, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,17 +11,10 @@ * and license in png.h */ -#define PNG_NO_EXTERN -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_4_3 Your_png_h_is_not_version_1_4_3; - -/* Version information for C files. This had better match the version - * string defined in png.h. - */ +typedef png_libpng_version_1_5_2 Your_png_h_is_not_version_1_5_2; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -53,11 +46,13 @@ png_set_sig_bytes(png_structp png_ptr, int num_bytes) * PNG signature (this is the same behaviour as strcmp, memcmp, etc). */ int PNGAPI -png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) +png_sig_cmp(png_const_bytep sig, png_size_t start, png_size_t num_to_check) { png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + if (num_to_check > 8) num_to_check = 8; + else if (num_to_check < 1) return (-1); @@ -73,9 +68,9 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) #endif /* PNG_READ_SUPPORTED */ #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) -/* Function to allocate memory for zlib and clear it to 0. */ -voidpf /* PRIVATE */ -png_zalloc(voidpf png_ptr, uInt items, uInt size) +/* Function to allocate memory for zlib */ +PNG_FUNCTION(voidpf /* PRIVATE */, +png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED) { png_voidp ptr; png_structp p=(png_structp)png_ptr; @@ -84,6 +79,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size) if (png_ptr == NULL) return (NULL); + if (items > PNG_UINT_32_MAX/size) { png_warning (p, "Potential overflow in png_zalloc()"); @@ -120,7 +116,7 @@ png_reset_crc(png_structp png_ptr) * trouble of calculating it. */ void /* PRIVATE */ -png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length) +png_calculate_crc(png_structp png_ptr, png_const_bytep ptr, png_size_t length) { int need_crc = 1; @@ -130,6 +126,7 @@ png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length) (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) need_crc = 0; } + else /* critical */ { if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) @@ -146,8 +143,8 @@ png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length) * and png_info_init() so that applications that want to use a shared * libpng don't have to be recompiled if png_info changes size. */ -png_infop PNGAPI -png_create_info_struct(png_structp png_ptr) +PNG_FUNCTION(png_infop,PNGAPI +png_create_info_struct,(png_structp png_ptr),PNG_ALLOCATED) { png_infop info_ptr; @@ -237,8 +234,10 @@ png_data_freer(png_structp png_ptr, png_infop info_ptr, if (freer == PNG_DESTROY_WILL_FREE_DATA) info_ptr->free_me |= mask; + else if (freer == PNG_USER_WILL_FREE_DATA) info_ptr->free_me &= ~mask; + else png_warning(png_ptr, "Unknown freer parameter in png_data_freer"); @@ -265,6 +264,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, info_ptr->text[num].key = NULL; } } + else { int i; @@ -350,6 +350,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, info_ptr->splt_palettes[num].entries = NULL; } } + else { if (info_ptr->splt_palettes_num) @@ -384,13 +385,14 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, info_ptr->unknown_chunks[num].data = NULL; } } + else { int i; if (info_ptr->unknown_chunks_num) { - for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++) + for (i = 0; i < info_ptr->unknown_chunks_num; i++) png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i); png_free(png_ptr, info_ptr->unknown_chunks); @@ -439,10 +441,10 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, } #endif - if (num == -1) - info_ptr->free_me &= ~mask; - else - info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL); + if (num != -1) + mask &= ~PNG_FREE_MUL; + + info_ptr->free_me &= ~mask; } /* This is an internal routine to free any memory that the info struct is @@ -478,11 +480,12 @@ png_get_io_ptr(png_structp png_ptr) { if (png_ptr == NULL) return (NULL); + return (png_ptr->io_ptr); } #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) -#ifdef PNG_STDIO_SUPPORTED +# ifdef PNG_STDIO_SUPPORTED /* Initialize the default input/output functions for the PNG file. If you * use your own read or write routines, you can call either png_set_read_fn() * or png_set_write_fn() instead of png_init_io(). If you have defined @@ -499,14 +502,14 @@ png_init_io(png_structp png_ptr, png_FILE_p fp) png_ptr->io_ptr = (png_voidp)fp; } -#endif +# endif -#ifdef PNG_TIME_RFC1123_SUPPORTED +# ifdef PNG_TIME_RFC1123_SUPPORTED /* Convert the supplied time into an RFC 1123 string suitable for use in * a "Creation Time" or other text-based time string. */ -png_charp PNGAPI -png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) +png_const_charp PNGAPI +png_convert_to_rfc1123(png_structp png_ptr, png_const_timep ptime) { static PNG_CONST char short_months[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", @@ -514,13 +517,14 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) if (png_ptr == NULL) return (NULL); + if (png_ptr->time_buffer == NULL) { png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29* png_sizeof(char))); } -#ifdef USE_FAR_KEYWORD +# ifdef USE_FAR_KEYWORD { char near_time_buf[29]; png_snprintf6(near_time_buf, 29, "%d %s %d %02d:%02d:%02d +0000", @@ -530,38 +534,38 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) png_memcpy(png_ptr->time_buffer, near_time_buf, 29*png_sizeof(char)); } -#else +# else png_snprintf6(png_ptr->time_buffer, 29, "%d %s %d %02d:%02d:%02d +0000", ptime->day % 32, short_months[(ptime->month - 1) % 12], ptime->year, ptime->hour % 24, ptime->minute % 60, ptime->second % 61); -#endif - return ((png_charp)png_ptr->time_buffer); +# endif + return png_ptr->time_buffer; } -#endif /* PNG_TIME_RFC1123_SUPPORTED */ +# endif /* PNG_TIME_RFC1123_SUPPORTED */ #endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ -png_charp PNGAPI -png_get_copyright(png_structp png_ptr) +png_const_charp PNGAPI +png_get_copyright(png_const_structp png_ptr) { - png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ #ifdef PNG_STRING_COPYRIGHT - return PNG_STRING_COPYRIGHT + return PNG_STRING_COPYRIGHT #else -#ifdef __STDC__ - return ((png_charp) PNG_STRING_NEWLINE \ - "libpng version 1.4.3 - June 26, 2010" PNG_STRING_NEWLINE \ - "Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ +# ifdef __STDC__ + return PNG_STRING_NEWLINE \ + "libpng version 1.5.2 - March 31, 2011" PNG_STRING_NEWLINE \ + "Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ - PNG_STRING_NEWLINE); -#else - return ((png_charp) "libpng version 1.4.3 - June 26, 2010\ - Copyright (c) 1998-2010 Glenn Randers-Pehrson\ + PNG_STRING_NEWLINE; +# else + return "libpng version 1.5.2 - March 31, 2011\ + Copyright (c) 1998-2011 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ - Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); -#endif + Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; +# endif #endif } @@ -573,55 +577,55 @@ png_get_copyright(png_structp png_ptr) * png_get_header_ver(). Due to the version_nn_nn_nn typedef guard, * it is guaranteed that png.c uses the correct version of png.h. */ -png_charp PNGAPI -png_get_libpng_ver(png_structp png_ptr) +png_const_charp PNGAPI +png_get_libpng_ver(png_const_structp png_ptr) { /* Version of *.c files used when building libpng */ - png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ - return ((png_charp) PNG_LIBPNG_VER_STRING); + return png_get_header_ver(png_ptr); } -png_charp PNGAPI -png_get_header_ver(png_structp png_ptr) +png_const_charp PNGAPI +png_get_header_ver(png_const_structp png_ptr) { /* Version of *.h files used when building libpng */ - png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ - return ((png_charp) PNG_LIBPNG_VER_STRING); + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ + return PNG_LIBPNG_VER_STRING; } -png_charp PNGAPI -png_get_header_version(png_structp png_ptr) +png_const_charp PNGAPI +png_get_header_version(png_const_structp png_ptr) { /* Returns longer string containing both version and date */ - png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ #ifdef __STDC__ - return ((png_charp) PNG_HEADER_VERSION_STRING -#ifndef PNG_READ_SUPPORTED + return PNG_HEADER_VERSION_STRING +# ifndef PNG_READ_SUPPORTED " (NO READ SUPPORT)" -#endif - PNG_STRING_NEWLINE); +# endif + PNG_STRING_NEWLINE; #else - return ((png_charp) PNG_HEADER_VERSION_STRING); + return PNG_HEADER_VERSION_STRING; #endif } #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +# ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED int PNGAPI -png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name) +png_handle_as_unknown(png_structp png_ptr, png_const_bytep chunk_name) { /* Check chunk_name and return "keep" value if it's on the list, else 0 */ int i; png_bytep p; if (png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list<=0) return 0; + p = png_ptr->chunk_list + png_ptr->num_chunk_list*5 - 5; for (i = png_ptr->num_chunk_list; i; i--, p -= 5) if (!png_memcmp(chunk_name, p, 4)) return ((int)*(p + 4)); return 0; } -#endif +# endif #endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ #ifdef PNG_READ_SUPPORTED @@ -631,6 +635,7 @@ png_reset_zstream(png_structp png_ptr) { if (png_ptr == NULL) return Z_STREAM_ERROR; + return (inflateReset(&png_ptr->zstream)); } #endif /* PNG_READ_SUPPORTED */ @@ -640,13 +645,13 @@ png_uint_32 PNGAPI png_access_version_number(void) { /* Version of *.c files used when building libpng */ - return((png_uint_32) PNG_LIBPNG_VER); + return((png_uint_32)PNG_LIBPNG_VER); } #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) -#ifdef PNG_SIZE_T +# ifdef PNG_SIZE_T /* Added at libpng version 1.2.6 */ PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)); png_size_t PNGAPI @@ -654,53 +659,13 @@ png_convert_size(size_t size) { if (size > (png_size_t)-1) PNG_ABORT(); /* We haven't got access to png_ptr, so no png_error() */ + return ((png_size_t)size); } -#endif /* PNG_SIZE_T */ +# endif /* PNG_SIZE_T */ /* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */ -#ifdef PNG_cHRM_SUPPORTED -#ifdef PNG_CHECK_cHRM_SUPPORTED - -/* - * Multiply two 32-bit numbers, V1 and V2, using 32-bit - * arithmetic, to produce a 64 bit result in the HI/LO words. - * - * A B - * x C D - * ------ - * AD || BD - * AC || CB || 0 - * - * where A and B are the high and low 16-bit words of V1, - * C and D are the 16-bit words of V2, AD is the product of - * A and D, and X || Y is (X << 16) + Y. -*/ - -void /* PRIVATE */ -png_64bit_product (long v1, long v2, unsigned long *hi_product, - unsigned long *lo_product) -{ - int a, b, c, d; - long lo, hi, x, y; - - a = (v1 >> 16) & 0xffff; - b = v1 & 0xffff; - c = (v2 >> 16) & 0xffff; - d = v2 & 0xffff; - - lo = b * d; /* BD */ - x = a * d + c * b; /* AD + CB */ - y = ((lo >> 16) & 0xffff) + x; - - lo = (lo & 0xffff) | ((y & 0xffff) << 16); - hi = (y >> 16) & 0xffff; - - hi += a * c; /* AC */ - - *hi_product = (unsigned long)hi; - *lo_product = (unsigned long)lo; -} +# ifdef PNG_CHECK_cHRM_SUPPORTED int /* PRIVATE */ png_check_cHRM_fixed(png_structp png_ptr, @@ -725,14 +690,14 @@ png_check_cHRM_fixed(png_structp png_ptr, "Ignoring attempt to set negative chromaticity value"); ret = 0; } - if (white_x > (png_fixed_point) PNG_UINT_31_MAX || - white_y > (png_fixed_point) PNG_UINT_31_MAX || - red_x > (png_fixed_point) PNG_UINT_31_MAX || - red_y > (png_fixed_point) PNG_UINT_31_MAX || - green_x > (png_fixed_point) PNG_UINT_31_MAX || - green_y > (png_fixed_point) PNG_UINT_31_MAX || - blue_x > (png_fixed_point) PNG_UINT_31_MAX || - blue_y > (png_fixed_point) PNG_UINT_31_MAX ) + if (white_x > (png_fixed_point)PNG_UINT_31_MAX || + white_y > (png_fixed_point)PNG_UINT_31_MAX || + red_x > (png_fixed_point)PNG_UINT_31_MAX || + red_y > (png_fixed_point)PNG_UINT_31_MAX || + green_x > (png_fixed_point)PNG_UINT_31_MAX || + green_y > (png_fixed_point)PNG_UINT_31_MAX || + blue_x > (png_fixed_point)PNG_UINT_31_MAX || + blue_y > (png_fixed_point)PNG_UINT_31_MAX ) { png_warning(png_ptr, "Ignoring attempt to set chromaticity value exceeding 21474.83"); @@ -743,16 +708,19 @@ png_check_cHRM_fixed(png_structp png_ptr, png_warning(png_ptr, "Invalid cHRM white point"); ret = 0; } + if (red_x > 100000L - red_y) { png_warning(png_ptr, "Invalid cHRM red point"); ret = 0; } + if (green_x > 100000L - green_y) { png_warning(png_ptr, "Invalid cHRM green point"); ret = 0; } + if (blue_x > 100000L - blue_y) { png_warning(png_ptr, "Invalid cHRM blue point"); @@ -771,8 +739,7 @@ png_check_cHRM_fixed(png_structp png_ptr, return ret; } -#endif /* PNG_CHECK_cHRM_SUPPORTED */ -#endif /* PNG_cHRM_SUPPORTED */ +# endif /* PNG_CHECK_cHRM_SUPPORTED */ void /* PRIVATE */ png_check_IHDR(png_structp png_ptr, @@ -795,21 +762,22 @@ png_check_IHDR(png_structp png_ptr, error = 1; } -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +# ifdef PNG_SET_USER_LIMITS_SUPPORTED if (width > png_ptr->user_width_max || width > PNG_USER_WIDTH_MAX) -#else + +# else if (width > PNG_USER_WIDTH_MAX) -#endif +# endif { png_warning(png_ptr, "Image width exceeds user limit in IHDR"); error = 1; } -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +# ifdef PNG_SET_USER_LIMITS_SUPPORTED if (height > png_ptr->user_height_max || height > PNG_USER_HEIGHT_MAX) -#else +# else if (height > PNG_USER_HEIGHT_MAX) -#endif +# endif { png_warning(png_ptr, "Image height exceeds user limit in IHDR"); error = 1; @@ -821,15 +789,15 @@ png_check_IHDR(png_structp png_ptr, error = 1; } - if ( height > PNG_UINT_31_MAX) + if (height > PNG_UINT_31_MAX) { png_warning(png_ptr, "Invalid image height in IHDR"); error = 1; } - if ( width > (PNG_UINT_32_MAX + if (width > (PNG_UINT_32_MAX >> 3) /* 8-byte RGBA pixels */ - - 64 /* bigrowbuf hack */ + - 48 /* bigrowbuf hack */ - 1 /* filter byte */ - 7*8 /* rounding of width to multiple of 8 pixels */ - 8) /* extra max_pixel_depth pad */ @@ -871,7 +839,7 @@ png_check_IHDR(png_structp png_ptr, error = 1; } -#ifdef PNG_MNG_FEATURES_SUPPORTED +# ifdef PNG_MNG_FEATURES_SUPPORTED /* Accept filter_method 64 (intrapixel differencing) only if * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and * 2. Libpng did not read a PNG signature (this filter_method is only @@ -888,10 +856,10 @@ png_check_IHDR(png_structp png_ptr, if (filter_type != PNG_FILTER_TYPE_BASE) { if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && - ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) && - (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA))) + (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && + ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA))) { png_warning(png_ptr, "Unknown filter method in IHDR"); error = 1; @@ -904,15 +872,1491 @@ png_check_IHDR(png_structp png_ptr, } } -#else +# else if (filter_type != PNG_FILTER_TYPE_BASE) { png_warning(png_ptr, "Unknown filter method in IHDR"); error = 1; } -#endif +# endif if (error == 1) png_error(png_ptr, "Invalid IHDR data"); } + +#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) +/* ASCII to fp functions */ +/* Check an ASCII formated floating point value, see the more detailed + * comments in pngpriv.h + */ +/* The following is used internally to preserve the 'valid' flag */ +#define png_fp_add(state, flags) ((state) |= (flags)) +#define png_fp_set(state, value)\ + ((state) = (value) | ((state) & PNG_FP_WAS_VALID)) + +/* Internal type codes: bits above the base state! */ +#define PNG_FP_SIGN 0 /* [+-] */ +#define PNG_FP_DOT 4 /* . */ +#define PNG_FP_DIGIT 8 /* [0123456789] */ +#define PNG_FP_E 12 /* [Ee] */ + +int /* PRIVATE */ +png_check_fp_number(png_const_charp string, png_size_t size, int *statep, + png_size_tp whereami) +{ + int state = *statep; + png_size_t i = *whereami; + + while (i < size) + { + int type; + /* First find the type of the next character */ + { + char ch = string[i]; + + if (ch >= 48 && ch <= 57) + type = PNG_FP_DIGIT; + + else switch (ch) + { + case 43: case 45: type = PNG_FP_SIGN; break; + case 46: type = PNG_FP_DOT; break; + case 69: case 101: type = PNG_FP_E; break; + default: goto PNG_FP_End; + } + } + + /* Now deal with this type according to the current + * state, the type is arranged to not overlap the + * bits of the PNG_FP_STATE. + */ + switch ((state & PNG_FP_STATE) + type) + { + case PNG_FP_INTEGER + PNG_FP_SIGN: + if (state & PNG_FP_SAW_ANY) + goto PNG_FP_End; /* not a part of the number */ + + png_fp_add(state, PNG_FP_SAW_SIGN); + break; + + case PNG_FP_INTEGER + PNG_FP_DOT: + /* Ok as trailer, ok as lead of fraction. */ + if (state & PNG_FP_SAW_DOT) /* two dots */ + goto PNG_FP_End; + + else if (state & PNG_FP_SAW_DIGIT) /* trailing dot? */ + png_fp_add(state, PNG_FP_SAW_DOT); + + else + png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT); + + break; + + case PNG_FP_INTEGER + PNG_FP_DIGIT: + if (state & PNG_FP_SAW_DOT) /* delayed fraction */ + png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT); + + png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID); + + break; + case PNG_FP_INTEGER + PNG_FP_E: + if ((state & PNG_FP_SAW_DIGIT) == 0) + goto PNG_FP_End; + + png_fp_set(state, PNG_FP_EXPONENT); + + break; + + /* case PNG_FP_FRACTION + PNG_FP_SIGN: + goto PNG_FP_End; ** no sign in exponent */ + + /* case PNG_FP_FRACTION + PNG_FP_DOT: + goto PNG_FP_End; ** Because SAW_DOT is always set */ + + case PNG_FP_FRACTION + PNG_FP_DIGIT: + png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID); + break; + + case PNG_FP_FRACTION + PNG_FP_E: + /* This is correct because the trailing '.' on an + * integer is handled above - so we can only get here + * with the sequence ".E" (with no preceding digits). + */ + if ((state & PNG_FP_SAW_DIGIT) == 0) + goto PNG_FP_End; + + png_fp_set(state, PNG_FP_EXPONENT); + + break; + + case PNG_FP_EXPONENT + PNG_FP_SIGN: + if (state & PNG_FP_SAW_ANY) + goto PNG_FP_End; /* not a part of the number */ + + png_fp_add(state, PNG_FP_SAW_SIGN); + + break; + + /* case PNG_FP_EXPONENT + PNG_FP_DOT: + goto PNG_FP_End; */ + + case PNG_FP_EXPONENT + PNG_FP_DIGIT: + png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID); + + break; + + /* case PNG_FP_EXPONEXT + PNG_FP_E: + goto PNG_FP_End; */ + + default: goto PNG_FP_End; /* I.e. break 2 */ + } + + /* The character seems ok, continue. */ + ++i; + } + +PNG_FP_End: + /* Here at the end, update the state and return the correct + * return code. + */ + *statep = state; + *whereami = i; + + return (state & PNG_FP_SAW_DIGIT) != 0; +} + + +/* The same but for a complete string. */ +int +png_check_fp_string(png_const_charp string, png_size_t size) +{ + int state=0; + png_size_t char_index=0; + + return png_check_fp_number(string, size, &state, &char_index) && + (char_index == size || string[char_index] == 0); +} +#endif /* pCAL or sCAL */ + +#ifdef PNG_READ_sCAL_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED +/* Utility used below - a simple accurate power of ten from an integral + * exponent. + */ +static double +png_pow10(int power) +{ + int recip = 0; + double d = 1; + + /* Handle negative exponent with a reciprocal at the end because + * 10 is exact whereas .1 is inexact in base 2 + */ + if (power < 0) + { + if (power < DBL_MIN_10_EXP) return 0; + recip = 1, power = -power; + } + + if (power > 0) + { + /* Decompose power bitwise. */ + double mult = 10; + do + { + if (power & 1) d *= mult; + mult *= mult; + power >>= 1; + } + while (power > 0); + + if (recip) d = 1/d; + } + /* else power is 0 and d is 1 */ + + return d; +} + +/* Function to format a floating point value in ASCII with a given + * precision. + */ +void /* PRIVATE */ +png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size, + double fp, unsigned int precision) +{ + /* We use standard functions from math.h, but not printf because + * that would require stdio. The caller must supply a buffer of + * sufficient size or we will png_error. The tests on size and + * the space in ascii[] consumed are indicated below. + */ + if (precision < 1) + precision = DBL_DIG; + + /* Enforce the limit of the implementation precision too. */ + if (precision > DBL_DIG+1) + precision = DBL_DIG+1; + + /* Basic sanity checks */ + if (size >= precision+5) /* See the requirements below. */ + { + if (fp < 0) + { + fp = -fp; + *ascii++ = 45; /* '-' PLUS 1 TOTAL 1*/ + --size; + } + + if (fp >= DBL_MIN && fp <= DBL_MAX) + { + int exp_b10; /* A base 10 exponent */ + double base; /* 10^exp_b10 */ + + /* First extract a base 10 exponent of the number, + * the calculation below rounds down when converting + * from base 2 to base 10 (multiply by log10(2) - + * 0.3010, but 77/256 is 0.3008, so exp_b10 needs to + * be increased. Note that the arithmetic shift + * performs a floor() unlike C arithmetic - using a + * C multiply would break the following for negative + * exponents. + */ + (void)frexp(fp, &exp_b10); /* exponent to base 2 */ + + exp_b10 = (exp_b10 * 77) >> 8; /* <= exponent to base 10 */ + + /* Avoid underflow here. */ + base = png_pow10(exp_b10); /* May underflow */ + + while (base < DBL_MIN || base < fp) + { + /* And this may overflow. */ + double test = png_pow10(exp_b10+1); + + if (test <= DBL_MAX) + ++exp_b10, base = test; + + else + break; + } + + /* Normalize fp and correct exp_b10, after this fp is in the + * range [.1,1) and exp_b10 is both the exponent and the digit + * *before* which the decimal point should be inserted + * (starting with 0 for the first digit). Note that this + * works even if 10^exp_b10 is out of range because of the + * test on DBL_MAX above. + */ + fp /= base; + while (fp >= 1) fp /= 10, ++exp_b10; + + /* Because of the code above fp may, at this point, be + * less than .1, this is ok because the code below can + * handle the leading zeros this generates, so no attempt + * is made to correct that here. + */ + + { + int czero, clead, cdigits; + char exponent[10]; + + /* Allow up to two leading zeros - this will not lengthen + * the number compared to using E-n. + */ + if (exp_b10 < 0 && exp_b10 > -3) /* PLUS 3 TOTAL 4 */ + { + czero = -exp_b10; /* PLUS 2 digits: TOTAL 3 */ + exp_b10 = 0; /* Dot added below before first output. */ + } + else + czero = 0; /* No zeros to add */ + + /* Generate the digit list, stripping trailing zeros and + * inserting a '.' before a digit if the exponent is 0. + */ + clead = czero; /* Count of leading zeros */ + cdigits = 0; /* Count of digits in list. */ + + do + { + double d; + + fp *= 10; + /* Use modf here, not floor and subtract, so that + * the separation is done in one step. At the end + * of the loop don't break the number into parts so + * that the final digit is rounded. + */ + if (cdigits+czero-clead+1 < (int)precision) + fp = modf(fp, &d); + + else + { + d = floor(fp + .5); + + if (d > 9) + { + /* Rounding up to 10, handle that here. */ + if (czero > 0) + { + --czero, d = 1; + if (cdigits == 0) --clead; + } + else + { + while (cdigits > 0 && d > 9) + { + int ch = *--ascii; + + if (exp_b10 != (-1)) + ++exp_b10; + + else if (ch == 46) + { + ch = *--ascii, ++size; + /* Advance exp_b10 to '1', so that the + * decimal point happens after the + * previous digit. + */ + exp_b10 = 1; + } + + --cdigits; + d = ch - 47; /* I.e. 1+(ch-48) */ + } + + /* Did we reach the beginning? If so adjust the + * exponent but take into account the leading + * decimal point. + */ + if (d > 9) /* cdigits == 0 */ + { + if (exp_b10 == (-1)) + { + /* Leading decimal point (plus zeros?), if + * we lose the decimal point here it must + * be reentered below. + */ + int ch = *--ascii; + + if (ch == 46) + ++size, exp_b10 = 1; + + /* Else lost a leading zero, so 'exp_b10' is + * still ok at (-1) + */ + } + else + ++exp_b10; + + /* In all cases we output a '1' */ + d = 1; + } + } + } + fp = 0; /* Guarantees termination below. */ + } + + if (d == 0) + { + ++czero; + if (cdigits == 0) ++clead; + } + else + { + /* Included embedded zeros in the digit count. */ + cdigits += czero - clead; + clead = 0; + + while (czero > 0) + { + /* exp_b10 == (-1) means we just output the decimal + * place - after the DP don't adjust 'exp_b10' any + * more! + */ + if (exp_b10 != (-1)) + { + if (exp_b10 == 0) *ascii++ = 46, --size; + /* PLUS 1: TOTAL 4 */ + --exp_b10; + } + *ascii++ = 48, --czero; + } + + if (exp_b10 != (-1)) + { + if (exp_b10 == 0) *ascii++ = 46, --size; /* counted + above */ + --exp_b10; + } + *ascii++ = (char)(48 + (int)d), ++cdigits; + } + } + while (cdigits+czero-clead < (int)precision && fp > DBL_MIN); + + /* The total output count (max) is now 4+precision */ + + /* Check for an exponent, if we don't need one we are + * done and just need to terminate the string. At + * this point exp_b10==(-1) is effectively if flag - it got + * to '-1' because of the decrement after outputing + * the decimal point above (the exponent required is + * *not* -1!) + */ + if (exp_b10 >= (-1) && exp_b10 <= 2) + { + /* The following only happens if we didn't output the + * leading zeros above for negative exponent, so this + * doest add to the digit requirement. Note that the + * two zeros here can only be output if the two leading + * zeros were *not* output, so this doesn't increase + * the output count. + */ + while (--exp_b10 >= 0) *ascii++ = 48; + + *ascii = 0; + + /* Total buffer requirement (including the '\0') is + * 5+precision - see check at the start. + */ + return; + } + + /* Here if an exponent is required, adjust size for + * the digits we output but did not count. The total + * digit output here so far is at most 1+precision - no + * decimal point and no leading or trailing zeros have + * been output. + */ + size -= cdigits; + + *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision*/ + if (exp_b10 < 0) + { + *ascii++ = 45, --size; /* '-': PLUS 1 TOTAL 3+precision */ + exp_b10 = -exp_b10; + } + + cdigits = 0; + + while (exp_b10 > 0) + { + exponent[cdigits++] = (char)(48 + exp_b10 % 10); + exp_b10 /= 10; + } + + /* Need another size check here for the exponent digits, so + * this need not be considered above. + */ + if ((int)size > cdigits) + { + while (cdigits > 0) *ascii++ = exponent[--cdigits]; + + *ascii = 0; + + return; + } + } + } + else if (!(fp >= DBL_MIN)) + { + *ascii++ = 48; /* '0' */ + *ascii = 0; + return; + } + else + { + *ascii++ = 105; /* 'i' */ + *ascii++ = 110; /* 'n' */ + *ascii++ = 102; /* 'f' */ + *ascii = 0; + return; + } + } + + /* Here on buffer too small. */ + png_error(png_ptr, "ASCII conversion buffer too small"); +} + +# endif /* FLOATING_POINT */ + +# ifdef PNG_FIXED_POINT_SUPPORTED +/* Function to format a fixed point value in ASCII. + */ +void /* PRIVATE */ +png_ascii_from_fixed(png_structp png_ptr, png_charp ascii, png_size_t size, + png_fixed_point fp) +{ + /* Require space for 10 decimal digits, a decimal point, a minus sign and a + * trailing \0, 13 characters: + */ + if (size > 12) + { + png_uint_32 num; + + /* Avoid overflow here on the minimum integer. */ + if (fp < 0) + *ascii++ = 45, --size, num = -fp; + else + num = fp; + + if (num <= 0x80000000U) /* else overflowed */ + { + unsigned int ndigits = 0, first = 16/*flag value*/; + char digits[10]; + + while (num) + { + /* Split the low digit off num: */ + unsigned int tmp = num/10; + num -= tmp*10; + digits[ndigits++] = (char)(48 + num); + /* Record the first non-zero digit, note that this is a number + * starting at 1, it's not actually the array index. + */ + if (first == 16 && num > 0) + first = ndigits; + num = tmp; + } + + if (ndigits > 0) + { + while (ndigits > 5) *ascii++ = digits[--ndigits]; + /* The remaining digits are fractional digits, ndigits is '5' or + * smaller at this point. It is certainly not zero. Check for a + * non-zero fractional digit: + */ + if (first <= 5) + { + unsigned int i; + *ascii++ = 46; /* decimal point */ + /* ndigits may be <5 for small numbers, output leading zeros + * then ndigits digits to first: + */ + i = 5; + while (ndigits < i) *ascii++ = 48, --i; + while (ndigits >= first) *ascii++ = digits[--ndigits]; + /* Don't output the trailing zeros! */ + } + } + else + *ascii++ = 48; + + /* And null terminate the string: */ + *ascii = 0; + return; + } + } + + /* Here on buffer too small. */ + png_error(png_ptr, "ASCII conversion buffer too small"); +} +# endif /* FIXED_POINT */ +#endif /* READ_SCAL */ + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) +png_fixed_point +png_fixed(png_structp png_ptr, double fp, png_const_charp text) +{ + double r = floor(100000 * fp + .5); + + if (r > 2147483647. || r < -2147483648.) + png_fixed_error(png_ptr, text); + + return (png_fixed_point)r; +} +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || \ + defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG__READ_pHYs_SUPPORTED) +/* muldiv functions */ +/* This API takes signed arguments and rounds the result to the nearest + * integer (or, for a fixed point number - the standard argument - to + * the nearest .00001). Overflow and divide by zero are signalled in + * the result, a boolean - true on success, false on overflow. + */ +int +png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times, + png_int_32 divisor) +{ + /* Return a * times / divisor, rounded. */ + if (divisor != 0) + { + if (a == 0 || times == 0) + { + *res = 0; + return 1; + } + else + { +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = a; + r *= times; + r /= divisor; + r = floor(r+.5); + + /* A png_fixed_point is a 32 bit integer. */ + if (r <= 2147483647. && r >= -2147483648.) + { + *res = (png_fixed_point)r; + return 1; + } +#else + int negative = 0; + png_uint_32 A, T, D; + png_uint_32 s16, s32, s00; + + if (a < 0) + negative = 1, A = -a; + else + A = a; + + if (times < 0) + negative = !negative, T = -times; + else + T = times; + + if (divisor < 0) + negative = !negative, D = -divisor; + else + D = divisor; + + /* Following can't overflow because the arguments only + * have 31 bits each, however the result may be 32 bits. + */ + s16 = (A >> 16) * (T & 0xffff) + + (A & 0xffff) * (T >> 16); + /* Can't overflow because the a*times bit is only 30 + * bits at most. + */ + s32 = (A >> 16) * (T >> 16) + (s16 >> 16); + s00 = (A & 0xffff) * (T & 0xffff); + + s16 = (s16 & 0xffff) << 16; + s00 += s16; + + if (s00 < s16) + ++s32; /* carry */ + + if (s32 < D) /* else overflow */ + { + /* s32.s00 is now the 64 bit product, do a standard + * division, we know that s32 < D, so the maximum + * required shift is 31. + */ + int bitshift = 32; + png_fixed_point result = 0; /* NOTE: signed */ + + while (--bitshift >= 0) + { + png_uint_32 d32, d00; + + if (bitshift > 0) + d32 = D >> (32-bitshift), d00 = D << bitshift; + + else + d32 = 0, d00 = D; + + if (s32 > d32) + { + if (s00 < d00) --s32; /* carry */ + s32 -= d32, s00 -= d00, result += 1<= d00) + s32 = 0, s00 -= d00, result += 1<= (D >> 1)) + ++result; + + if (negative) + result = -result; + + /* Check for overflow. */ + if ((negative && result <= 0) || (!negative && result >= 0)) + { + *res = result; + return 1; + } + } +#endif + } + } + + return 0; +} +#endif /* READ_GAMMA || INCH_CONVERSIONS */ + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) +/* The following is for when the caller doesn't much care about the + * result. + */ +png_fixed_point +png_muldiv_warn(png_structp png_ptr, png_fixed_point a, png_int_32 times, + png_int_32 divisor) +{ + png_fixed_point result; + + if (png_muldiv(&result, a, times, divisor)) + return result; + + png_warning(png_ptr, "fixed point overflow ignored"); + return 0; +} +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED /* more fixed point functions for gammma */ +/* Calculate a reciprocal, return 0 on div-by-zero or overflow. */ +png_fixed_point +png_reciprocal(png_fixed_point a) +{ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = floor(1E10/a+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + png_fixed_point res; + + if (png_muldiv(&res, 100000, 100000, a)) + return res; +#endif + + return 0; /* error/overflow */ +} + +/* A local convenience routine. */ +static png_fixed_point +png_product2(png_fixed_point a, png_fixed_point b) +{ + /* The required result is 1/a * 1/b; the following preserves accuracy. */ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = a * 1E-5; + r *= b; + r = floor(r+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + png_fixed_point res; + + if (png_muldiv(&res, a, b, 100000)) + return res; +#endif + + return 0; /* overflow */ +} + +/* The inverse of the above. */ +png_fixed_point +png_reciprocal2(png_fixed_point a, png_fixed_point b) +{ + /* The required result is 1/a * 1/b; the following preserves accuracy. */ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = 1E15/a; + r /= b; + r = floor(r+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + /* This may overflow because the range of png_fixed_point isn't symmetric, + * but this API is only used for the product of file and screen gamma so it + * doesn't matter that the smallest number it can produce is 1/21474, not + * 1/100000 + */ + png_fixed_point res = png_product2(a, b); + + if (res != 0) + return png_reciprocal(res); +#endif + + return 0; /* overflow */ +} +#endif /* READ_GAMMA */ + +#ifdef PNG_CHECK_cHRM_SUPPORTED +/* Added at libpng version 1.2.34 (Dec 8, 2008) and 1.4.0 (Jan 2, + * 2010: moved from pngset.c) */ +/* + * Multiply two 32-bit numbers, V1 and V2, using 32-bit + * arithmetic, to produce a 64 bit result in the HI/LO words. + * + * A B + * x C D + * ------ + * AD || BD + * AC || CB || 0 + * + * where A and B are the high and low 16-bit words of V1, + * C and D are the 16-bit words of V2, AD is the product of + * A and D, and X || Y is (X << 16) + Y. +*/ + +void /* PRIVATE */ +png_64bit_product (long v1, long v2, unsigned long *hi_product, + unsigned long *lo_product) +{ + int a, b, c, d; + long lo, hi, x, y; + + a = (v1 >> 16) & 0xffff; + b = v1 & 0xffff; + c = (v2 >> 16) & 0xffff; + d = v2 & 0xffff; + + lo = b * d; /* BD */ + x = a * d + c * b; /* AD + CB */ + y = ((lo >> 16) & 0xffff) + x; + + lo = (lo & 0xffff) | ((y & 0xffff) << 16); + hi = (y >> 16) & 0xffff; + + hi += a * c; /* AC */ + + *hi_product = (unsigned long)hi; + *lo_product = (unsigned long)lo; +} +#endif /* CHECK_cHRM */ + +#ifdef PNG_READ_GAMMA_SUPPORTED /* gamma table code */ +#ifndef PNG_FLOATING_ARITHMETIC_SUPPORTED +/* Fixed point gamma. + * + * To calculate gamma this code implements fast log() and exp() calls using only + * fixed point arithmetic. This code has sufficient precision for either 8 or + * 16 bit sample values. + * + * The tables used here were calculated using simple 'bc' programs, but C double + * precision floating point arithmetic would work fine. The programs are given + * at the head of each table. + * + * 8 bit log table + * This is a table of -log(value/255)/log(2) for 'value' in the range 128 to + * 255, so it's the base 2 logarithm of a normalized 8 bit floating point + * mantissa. The numbers are 32 bit fractions. + */ +static png_uint_32 +png_8bit_l2[128] = +{ +# if PNG_DO_BC + for (i=128;i<256;++i) { .5 - l(i/255)/l(2)*65536*65536; } +# endif + 4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U, + 3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U, + 3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U, + 3455425220U, 3413129301U, 3371120137U, 3329393864U, 3287946700U, 3246774933U, + 3205874930U, 3165243125U, 3124876025U, 3084770202U, 3044922296U, 3005329011U, + 2965987113U, 2926893432U, 2888044853U, 2849438323U, 2811070844U, 2772939474U, + 2735041326U, 2697373562U, 2659933400U, 2622718104U, 2585724991U, 2548951424U, + 2512394810U, 2476052606U, 2439922311U, 2404001468U, 2368287663U, 2332778523U, + 2297471715U, 2262364947U, 2227455964U, 2192742551U, 2158222529U, 2123893754U, + 2089754119U, 2055801552U, 2022034013U, 1988449497U, 1955046031U, 1921821672U, + 1888774511U, 1855902668U, 1823204291U, 1790677560U, 1758320682U, 1726131893U, + 1694109454U, 1662251657U, 1630556815U, 1599023271U, 1567649391U, 1536433567U, + 1505374214U, 1474469770U, 1443718700U, 1413119487U, 1382670639U, 1352370686U, + 1322218179U, 1292211689U, 1262349810U, 1232631153U, 1203054352U, 1173618059U, + 1144320946U, 1115161701U, 1086139034U, 1057251672U, 1028498358U, 999877854U, + 971388940U, 943030410U, 914801076U, 886699767U, 858725327U, 830876614U, + 803152505U, 775551890U, 748073672U, 720716771U, 693480120U, 666362667U, + 639363374U, 612481215U, 585715177U, 559064263U, 532527486U, 506103872U, + 479792461U, 453592303U, 427502463U, 401522014U, 375650043U, 349885648U, + 324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U, + 172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U, + 24347096U, 0U +#if 0 + /* The following are the values for 16 bit tables - these work fine for the 8 + * bit conversions but produce very slightly larger errors in the 16 bit log + * (about 1.2 as opposed to 0.7 absolute error in the final value). To use + * these all the shifts below must be adjusted appropriately. + */ + 65166, 64430, 63700, 62976, 62257, 61543, 60835, 60132, 59434, 58741, 58054, + 57371, 56693, 56020, 55352, 54689, 54030, 53375, 52726, 52080, 51439, 50803, + 50170, 49542, 48918, 48298, 47682, 47070, 46462, 45858, 45257, 44661, 44068, + 43479, 42894, 42312, 41733, 41159, 40587, 40020, 39455, 38894, 38336, 37782, + 37230, 36682, 36137, 35595, 35057, 34521, 33988, 33459, 32932, 32408, 31887, + 31369, 30854, 30341, 29832, 29325, 28820, 28319, 27820, 27324, 26830, 26339, + 25850, 25364, 24880, 24399, 23920, 23444, 22970, 22499, 22029, 21562, 21098, + 20636, 20175, 19718, 19262, 18808, 18357, 17908, 17461, 17016, 16573, 16132, + 15694, 15257, 14822, 14390, 13959, 13530, 13103, 12678, 12255, 11834, 11415, + 10997, 10582, 10168, 9756, 9346, 8937, 8531, 8126, 7723, 7321, 6921, 6523, + 6127, 5732, 5339, 4947, 4557, 4169, 3782, 3397, 3014, 2632, 2251, 1872, 1495, + 1119, 744, 372 +#endif +}; + +static png_int_32 +png_log8bit(unsigned int x) +{ + unsigned int lg2 = 0; + /* Each time 'x' is multiplied by 2, 1 must be subtracted off the final log, + * because the log is actually negate that means adding 1. The final + * returned value thus has the range 0 (for 255 input) to 7.994 (for 1 + * input), return 7.99998 for the overflow (log 0) case - so the result is + * always at most 19 bits. + */ + if ((x &= 0xff) == 0) + return 0xffffffff; + + if ((x & 0xf0) == 0) + lg2 = 4, x <<= 4; + + if ((x & 0xc0) == 0) + lg2 += 2, x <<= 2; + + if ((x & 0x80) == 0) + lg2 += 1, x <<= 1; + + /* result is at most 19 bits, so this cast is safe: */ + return (png_int_32)((lg2 << 16) + ((png_8bit_l2[x-128]+32768)>>16)); +} + +/* The above gives exact (to 16 binary places) log2 values for 8 bit images, + * for 16 bit images we use the most significant 8 bits of the 16 bit value to + * get an approximation then multiply the approximation by a correction factor + * determined by the remaining up to 8 bits. This requires an additional step + * in the 16 bit case. + * + * We want log2(value/65535), we have log2(v'/255), where: + * + * value = v' * 256 + v'' + * = v' * f + * + * So f is value/v', which is equal to (256+v''/v') since v' is in the range 128 + * to 255 and v'' is in the range 0 to 255 f will be in the range 256 to less + * than 258. The final factor also needs to correct for the fact that our 8 bit + * value is scaled by 255, whereas the 16 bit values must be scaled by 65535. + * + * This gives a final formula using a calculated value 'x' which is value/v' and + * scaling by 65536 to match the above table: + * + * log2(x/257) * 65536 + * + * Since these numbers are so close to '1' we can use simple linear + * interpolation between the two end values 256/257 (result -368.61) and 258/257 + * (result 367.179). The values used below are scaled by a further 64 to give + * 16 bit precision in the interpolation: + * + * Start (256): -23591 + * Zero (257): 0 + * End (258): 23499 + */ +static png_int_32 +png_log16bit(png_uint_32 x) +{ + unsigned int lg2 = 0; + + /* As above, but now the input has 16 bits. */ + if ((x &= 0xffff) == 0) + return 0xffffffff; + + if ((x & 0xff00) == 0) + lg2 = 8, x <<= 8; + + if ((x & 0xf000) == 0) + lg2 += 4, x <<= 4; + + if ((x & 0xc000) == 0) + lg2 += 2, x <<= 2; + + if ((x & 0x8000) == 0) + lg2 += 1, x <<= 1; + + /* Calculate the base logarithm from the top 8 bits as a 28 bit fractional + * value. + */ + lg2 <<= 28; + lg2 += (png_8bit_l2[(x>>8)-128]+8) >> 4; + + /* Now we need to interpolate the factor, this requires a division by the top + * 8 bits. Do this with maximum precision. + */ + x = ((x << 16) + (x >> 9)) / (x >> 8); + + /* Since we divided by the top 8 bits of 'x' there will be a '1' at 1<<24, + * the value at 1<<16 (ignoring this) will be 0 or 1; this gives us exactly + * 16 bits to interpolate to get the low bits of the result. Round the + * answer. Note that the end point values are scaled by 64 to retain overall + * precision and that 'lg2' is current scaled by an extra 12 bits, so adjust + * the overall scaling by 6-12. Round at every step. + */ + x -= 1U << 24; + + if (x <= 65536U) /* <= '257' */ + lg2 += ((23591U * (65536U-x)) + (1U << (16+6-12-1))) >> (16+6-12); + + else + lg2 -= ((23499U * (x-65536U)) + (1U << (16+6-12-1))) >> (16+6-12); + + /* Safe, because the result can't have more than 20 bits: */ + return (png_int_32)((lg2 + 2048) >> 12); +} + +/* The 'exp()' case must invert the above, taking a 20 bit fixed point + * logarithmic value and returning a 16 or 8 bit number as appropriate. In + * each case only the low 16 bits are relevant - the fraction - since the + * integer bits (the top 4) simply determine a shift. + * + * The worst case is the 16 bit distinction between 65535 and 65534, this + * requires perhaps spurious accuracty in the decoding of the logarithm to + * distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance + * of getting this accuracy in practice. + * + * To deal with this the following exp() function works out the exponent of the + * frational part of the logarithm by using an accurate 32 bit value from the + * top four fractional bits then multiplying in the remaining bits. + */ +static png_uint_32 +png_32bit_exp[16] = +{ +# if PNG_DO_BC + for (i=0;i<16;++i) { .5 + e(-i/16*l(2))*2^32; } +# endif + /* NOTE: the first entry is deliberately set to the maximum 32 bit value. */ + 4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U, + 3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U, + 2553802834U, 2445529972U, 2341847524U, 2242560872U +}; + +/* Adjustment table; provided to explain the numbers in the code below. */ +#if PNG_DO_BC +for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"} + 11 44937.64284865548751208448 + 10 45180.98734845585101160448 + 9 45303.31936980687359311872 + 8 45364.65110595323018870784 + 7 45395.35850361789624614912 + 6 45410.72259715102037508096 + 5 45418.40724413220722311168 + 4 45422.25021786898173001728 + 3 45424.17186732298419044352 + 2 45425.13273269940811464704 + 1 45425.61317555035558641664 + 0 45425.85339951654943850496 +#endif + +static png_uint_32 +png_exp(png_fixed_point x) +{ + if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */ + { + /* Obtain a 4 bit approximation */ + png_uint_32 e = png_32bit_exp[(x >> 12) & 0xf]; + + /* Incorporate the low 12 bits - these decrease the returned value by + * multiplying by a number less than 1 if the bit is set. The multiplier + * is determined by the above table and the shift. Notice that the values + * converge on 45426 and this is used to allow linear interpolation of the + * low bits. + */ + if (x & 0x800) + e -= (((e >> 16) * 44938U) + 16U) >> 5; + + if (x & 0x400) + e -= (((e >> 16) * 45181U) + 32U) >> 6; + + if (x & 0x200) + e -= (((e >> 16) * 45303U) + 64U) >> 7; + + if (x & 0x100) + e -= (((e >> 16) * 45365U) + 128U) >> 8; + + if (x & 0x080) + e -= (((e >> 16) * 45395U) + 256U) >> 9; + + if (x & 0x040) + e -= (((e >> 16) * 45410U) + 512U) >> 10; + + /* And handle the low 6 bits in a single block. */ + e -= (((e >> 16) * 355U * (x & 0x3fU)) + 256U) >> 9; + + /* Handle the upper bits of x. */ + e >>= x >> 16; + return e; + } + + /* Check for overflow */ + if (x <= 0) + return png_32bit_exp[0]; + + /* Else underflow */ + return 0; +} + +static png_byte +png_exp8bit(png_fixed_point lg2) +{ + /* Get a 32 bit value: */ + png_uint_32 x = png_exp(lg2); + + /* Convert the 32 bit value to 0..255 by multiplying by 256-1, note that the + * second, rounding, step can't overflow because of the first, subtraction, + * step. + */ + x -= x >> 8; + return (png_byte)((x + 0x7fffffU) >> 24); +} + +static png_uint_16 +png_exp16bit(png_fixed_point lg2) +{ + /* Get a 32 bit value: */ + png_uint_32 x = png_exp(lg2); + + /* Convert the 32 bit value to 0..65535 by multiplying by 65536-1: */ + x -= x >> 16; + return (png_uint_16)((x + 32767U) >> 16); +} +#endif /* FLOATING_ARITHMETIC */ + +png_byte +png_gamma_8bit_correct(unsigned int value, png_fixed_point gamma_val) +{ + if (value > 0 && value < 255) + { +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = floor(255*pow(value/255.,gamma_val*.00001)+.5); + return (png_byte)r; +# else + png_int_32 lg2 = png_log8bit(value); + png_fixed_point res; + + if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1)) + return png_exp8bit(res); + + /* Overflow. */ + value = 0; +# endif + } + + return (png_byte)value; +} + +png_uint_16 +png_gamma_16bit_correct(unsigned int value, png_fixed_point gamma_val) +{ + if (value > 0 && value < 65535) + { +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = floor(65535*pow(value/65535.,gamma_val*.00001)+.5); + return (png_uint_16)r; +# else + png_int_32 lg2 = png_log16bit(value); + png_fixed_point res; + + if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1)) + return png_exp16bit(res); + + /* Overflow. */ + value = 0; +# endif + } + + return (png_uint_16)value; +} + +/* This does the right thing based on the bit_depth field of the + * png_struct, interpreting values as 8 or 16 bit. While the result + * is nominally a 16 bit value if bit depth is 8 then the result is + * 8 bit (as are the arguments.) + */ +png_uint_16 /* PRIVATE */ +png_gamma_correct(png_structp png_ptr, unsigned int value, + png_fixed_point gamma_val) +{ + if (png_ptr->bit_depth == 8) + return png_gamma_8bit_correct(value, gamma_val); + + else + return png_gamma_16bit_correct(value, gamma_val); +} + +/* This is the shared test on whether a gamma value is 'significant' - whether + * it is worth doing gamma correction. + */ +int /* PRIVATE */ +png_gamma_significant(png_fixed_point gamma_val) +{ + return gamma_val < PNG_FP_1 - PNG_GAMMA_THRESHOLD_FIXED || + gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED; +} + +/* Internal function to build a single 16 bit table - the table consists of + * 'num' 256 entry subtables, where 'num' is determined by 'shift' - the amount + * to shift the input values right (or 16-number_of_signifiant_bits). + * + * The caller is responsible for ensuring that the table gets cleaned up on + * png_error (i.e. if one of the mallocs below fails) - i.e. the *table argument + * should be somewhere that will be cleaned. + */ +static void +png_build_16bit_table(png_structp png_ptr, png_uint_16pp *ptable, + PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val) +{ + /* Various values derived from 'shift': */ + PNG_CONST unsigned int num = 1U << (8U - shift); + PNG_CONST unsigned int max = (1U << (16U - shift))-1U; + PNG_CONST unsigned int max_by_2 = 1U << (15U-shift); + unsigned int i; + + png_uint_16pp table = *ptable = + (png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p)); + + for (i = 0; i < num; i++) + { + png_uint_16p sub_table = table[i] = + (png_uint_16p)png_malloc(png_ptr, 256 * png_sizeof(png_uint_16)); + + /* The 'threshold' test is repeated here because it can arise for one of + * the 16 bit tables even if the others don't hit it. + */ + if (png_gamma_significant(gamma_val)) + { + /* The old code would overflow at the end and this would cause the + * 'pow' function to return a result >1, resulting in an + * arithmetic error. This code follows the spec exactly; ig is + * the recovered input sample, it always has 8-16 bits. + * + * We want input * 65535/max, rounded, the arithmetic fits in 32 + * bits (unsigned) so long as max <= 32767. + */ + unsigned int j; + for (j = 0; j < 256; j++) + { + png_uint_32 ig = (j << (8-shift)) + i; +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + /* Inline the 'max' scaling operation: */ + double d = floor(65535*pow(ig/(double)max, gamma_val*.00001)+.5); + sub_table[j] = (png_uint_16)d; +# else + if (shift) + ig = (ig * 65535U + max_by_2)/max; + + sub_table[j] = png_gamma_16bit_correct(ig, gamma_val); +# endif + } + } + else + { + /* We must still build a table, but do it the fast way. */ + unsigned int j; + + for (j = 0; j < 256; j++) + { + png_uint_32 ig = (j << (8-shift)) + i; + + if (shift) + ig = (ig * 65535U + max_by_2)/max; + + sub_table[j] = (png_uint_16)ig; + } + } + } +} + +/* NOTE: this function expects the *inverse* of the overall gamma transformation + * required. + */ +static void +png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable, + PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val) +{ + PNG_CONST unsigned int num = 1U << (8U - shift); + PNG_CONST unsigned int max = (1U << (16U - shift))-1U; + unsigned int i; + png_uint_32 last; + + png_uint_16pp table = *ptable = + (png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p)); + + /* 'num' is the number of tables and also the number of low bits of low + * bits of the input 16 bit value used to select a table. Each table is + * itself index by the high 8 bits of the value. + */ + for (i = 0; i < num; i++) + table[i] = (png_uint_16p)png_malloc(png_ptr, + 256 * png_sizeof(png_uint_16)); + + /* 'gamma_val' is set to the reciprocal of the value calculated above, so + * pow(out,g) is an *input* value. 'last' is the last input value set. + * + * In the loop 'i' is used to find output values. Since the output is 8 + * bit there are only 256 possible values. The tables are set up to + * select the closest possible output value for each input by finding + * the input value at the boundary between each pair of output values + * and filling the table up to that boundary with the lower output + * value. + * + * The boundary values are 0.5,1.5..253.5,254.5. Since these are 9 bit + * values the code below uses a 16 bit value in i; the values start at + * 128.5 (for 0.5) and step by 257, for a total of 254 values (the last + * entries are filled with 255). Start i at 128 and fill all 'last' + * table entries <= 'max' + */ + last = 0; + for (i = 0; i < 255; ++i) /* 8 bit output value */ + { + /* Find the corresponding maximum input value */ + png_uint_16 out = (png_uint_16)(i * 257U); /* 16 bit output value */ + + /* Find the boundary value in 16 bits: */ + png_uint_32 bound = png_gamma_16bit_correct(out+128U, gamma_val); + + /* Adjust (round) to (16-shift) bits: */ + bound = (bound * max + 32768U)/65535U + 1U; + + while (last < bound) + { + table[last & (0xffU >> shift)][last >> (8U - shift)] = out; + last++; + } + } + + /* And fill in the final entries. */ + while (last < (num << 8)) + { + table[last & (0xff >> shift)][last >> (8U - shift)] = 65535U; + last++; + } +} + +/* Build a single 8 bit table: same as the 16 bit case but much simpler (and + * typically much faster). Note that libpng currently does no sBIT processing + * (apparently contrary to the spec) so a 256 entry table is always generated. + */ +static void +png_build_8bit_table(png_structp png_ptr, png_bytepp ptable, + PNG_CONST png_fixed_point gamma_val) +{ + unsigned int i; + png_bytep table = *ptable = (png_bytep)png_malloc(png_ptr, 256); + + if (png_gamma_significant(gamma_val)) for (i=0; i<256; i++) + table[i] = png_gamma_8bit_correct(i, gamma_val); + + else for (i=0; i<256; ++i) + table[i] = (png_byte)i; +} + +/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit + * tables, we don't make a full table if we are reducing to 8-bit in + * the future. Note also how the gamma_16 tables are segmented so that + * we don't need to allocate > 64K chunks for a full 16-bit table. + */ +void /* PRIVATE */ +png_build_gamma_table(png_structp png_ptr, int bit_depth) +{ + png_debug(1, "in png_build_gamma_table"); + + if (bit_depth <= 8) + { + png_build_8bit_table(png_ptr, &png_ptr->gamma_table, + png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->gamma, + png_ptr->screen_gamma) : PNG_FP_1); + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY)) + { + png_build_8bit_table(png_ptr, &png_ptr->gamma_to_1, + png_reciprocal(png_ptr->gamma)); + + png_build_8bit_table(png_ptr, &png_ptr->gamma_from_1, + png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) : + png_ptr->gamma/* Probably doing rgb_to_gray */); + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ + } + else + { + png_byte shift, sig_bit; + + if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit = png_ptr->sig_bit.red; + + if (png_ptr->sig_bit.green > sig_bit) + sig_bit = png_ptr->sig_bit.green; + + if (png_ptr->sig_bit.blue > sig_bit) + sig_bit = png_ptr->sig_bit.blue; + } + else + sig_bit = png_ptr->sig_bit.gray; + + /* 16 bit gamma code uses this equation: + * + * ov = table[(iv & 0xff) >> gamma_shift][iv >> 8] + * + * Where 'iv' is the input color value and 'ov' is the output value - + * pow(iv, gamma). + * + * Thus the gamma table consists of up to 256 256 entry tables. The table + * is selected by the (8-gamma_shift) most significant of the low 8 bits of + * the color value then indexed by the upper 8 bits: + * + * table[low bits][high 8 bits] + * + * So the table 'n' corresponds to all those 'iv' of: + * + * ..<(n+1 << gamma_shift)-1> + * + */ + if (sig_bit > 0 && sig_bit < 16U) + shift = (png_byte)(16U - sig_bit); /* shift == insignificant bits */ + + else + shift = 0; /* keep all 16 bits */ + + if (png_ptr->transformations & PNG_16_TO_8) + { + /* PNG_MAX_GAMMA_8 is the number of bits to keep - effectively + * the significant bits in the *input* when the output will + * eventually be 8 bits. By default it is 11. + */ + if (shift < (16U - PNG_MAX_GAMMA_8)) + shift = (16U - PNG_MAX_GAMMA_8); + } + + if (shift > 8U) + shift = 8U; /* Guarantees at least one table! */ + + png_ptr->gamma_shift = shift; + +#ifdef PNG_16BIT_SUPPORTED + if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) +#endif + png_build_16to8_table(png_ptr, &png_ptr->gamma_16_table, shift, + png_ptr->screen_gamma > 0 ? png_product2(png_ptr->gamma, + png_ptr->screen_gamma) : PNG_FP_1); + +#ifdef PNG_16BIT_SUPPORTED + else + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_table, shift, + png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->gamma, + png_ptr->screen_gamma) : PNG_FP_1); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY)) + { + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_to_1, shift, + png_reciprocal(png_ptr->gamma)); + + /* Notice that the '16 from 1' table should be full precision, however + * the lookup on this table still uses gamma_shift, so it can't be. + * TODO: fix this. + */ + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_from_1, shift, + png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) : + png_ptr->gamma/* Probably doing rgb_to_gray */); + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ + } +} +#endif /* READ_GAMMA */ #endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ diff --git a/dll/3rdparty/libpng/pngerror.c b/dll/3rdparty/libpng/pngerror.c index 633eae29f9e..8290bb4106e 100644 --- a/dll/3rdparty/libpng/pngerror.c +++ b/dll/3rdparty/libpng/pngerror.c @@ -1,8 +1,8 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.4.0 [January 3, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.1 [February 3, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,18 +16,17 @@ * at each function. */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" -static void /* PRIVATE */ -png_default_error PNGARG((png_structp png_ptr, - png_const_charp error_message)) PNG_NORETURN; +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +static PNG_FUNCTION(void, png_default_error,PNGARG((png_structp png_ptr, + png_const_charp error_message)),PNG_NORETURN); + #ifdef PNG_WARNINGS_SUPPORTED static void /* PRIVATE */ png_default_warning PNGARG((png_structp png_ptr, - png_const_charp warning_message)); + png_const_charp warning_message)); #endif /* PNG_WARNINGS_SUPPORTED */ /* This function is called whenever there is a fatal error. This function @@ -36,42 +35,45 @@ png_default_warning PNGARG((png_structp png_ptr, * to replace the error function at run-time. */ #ifdef PNG_ERROR_TEXT_SUPPORTED -void PNGAPI -png_error(png_structp png_ptr, png_const_charp error_message) +PNG_FUNCTION(void,PNGAPI +png_error,(png_structp png_ptr, png_const_charp error_message),PNG_NORETURN) { #ifdef PNG_ERROR_NUMBERS_SUPPORTED char msg[16]; if (png_ptr != NULL) { - if (png_ptr->flags& - (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) - { - if (*error_message == PNG_LITERAL_SHARP) - { - /* Strip "#nnnn " from beginning of error message. */ - int offset; - for (offset = 1; offset<15; offset++) - if (error_message[offset] == ' ') + if (png_ptr->flags& + (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) + { + if (*error_message == PNG_LITERAL_SHARP) + { + /* Strip "#nnnn " from beginning of error message. */ + int offset; + for (offset = 1; offset<15; offset++) + if (error_message[offset] == ' ') break; - if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) - { - int i; - for (i = 0; i < offset - 1; i++) - msg[i] = error_message[i + 1]; - msg[i - 1] = '\0'; - error_message = msg; - } - else - error_message += offset; - } - else - { - if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) - { - msg[0] = '0'; - msg[1] = '\0'; - error_message = msg; - } + + if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) + { + int i; + for (i = 0; i < offset - 1; i++) + msg[i] = error_message[i + 1]; + msg[i - 1] = '\0'; + error_message = msg; + } + + else + error_message += offset; + } + + else + { + if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) + { + msg[0] = '0'; + msg[1] = '\0'; + error_message = msg; + } } } } @@ -84,8 +86,8 @@ png_error(png_structp png_ptr, png_const_charp error_message) png_default_error(png_ptr, error_message); } #else -void PNGAPI -png_err(png_structp png_ptr) +PNG_FUNCTION(void,PNGAPI +png_err,(png_structp png_ptr),PNG_NORETURN) { if (png_ptr != NULL && png_ptr->error_fn != NULL) (*(png_ptr->error_fn))(png_ptr, '\0'); @@ -110,16 +112,16 @@ png_warning(png_structp png_ptr, png_const_charp warning_message) { #ifdef PNG_ERROR_NUMBERS_SUPPORTED if (png_ptr->flags& - (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) + (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) #endif - { - if (*warning_message == PNG_LITERAL_SHARP) - { - for (offset = 1; offset < 15; offset++) - if (warning_message[offset] == ' ') + { + if (*warning_message == PNG_LITERAL_SHARP) + { + for (offset = 1; offset < 15; offset++) + if (warning_message[offset] == ' ') break; - } - } + } + } } if (png_ptr != NULL && png_ptr->warning_fn != NULL) (*(png_ptr->warning_fn))(png_ptr, warning_message + offset); @@ -133,9 +135,9 @@ void PNGAPI png_benign_error(png_structp png_ptr, png_const_charp error_message) { if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) - png_warning(png_ptr, error_message); + png_warning(png_ptr, error_message); else - png_error(png_ptr, error_message); + png_error(png_ptr, error_message); } #endif @@ -155,7 +157,7 @@ static PNG_CONST char png_digit[16] = { #if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED) static void /* PRIVATE */ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp - error_message) + error_message) { int iout = 0, iin = 0; @@ -169,6 +171,7 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp buffer[iout++] = png_digit[c & 0x0f]; buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET; } + else { buffer[iout++] = (png_byte)c; @@ -177,6 +180,7 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp if (error_message == NULL) buffer[iout] = '\0'; + else { buffer[iout++] = ':'; @@ -185,22 +189,24 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0'; } } +#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ -#ifdef PNG_READ_SUPPORTED -void PNGAPI -png_chunk_error(png_structp png_ptr, png_const_charp error_message) +#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) +PNG_FUNCTION(void,PNGAPI +png_chunk_error,(png_structp png_ptr, png_const_charp error_message), + PNG_NORETURN) { char msg[18+PNG_MAX_ERROR_TEXT]; if (png_ptr == NULL) - png_error(png_ptr, error_message); + png_error(png_ptr, error_message); + else { - png_format_buffer(png_ptr, msg, error_message); - png_error(png_ptr, msg); + png_format_buffer(png_ptr, msg, error_message); + png_error(png_ptr, msg); } } -#endif /* PNG_READ_SUPPORTED */ -#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */ #ifdef PNG_WARNINGS_SUPPORTED void PNGAPI @@ -208,11 +214,12 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) { char msg[18+PNG_MAX_ERROR_TEXT]; if (png_ptr == NULL) - png_warning(png_ptr, warning_message); + png_warning(png_ptr, warning_message); + else { - png_format_buffer(png_ptr, msg, warning_message); - png_warning(png_ptr, msg); + png_format_buffer(png_ptr, msg, warning_message); + png_warning(png_ptr, msg); } } #endif /* PNG_WARNINGS_SUPPORTED */ @@ -222,14 +229,37 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) void PNGAPI png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message) { - if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) - png_chunk_warning(png_ptr, error_message); - else - png_chunk_error(png_ptr, error_message); + if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) + png_chunk_warning(png_ptr, error_message); + + else + png_chunk_error(png_ptr, error_message); } #endif #endif /* PNG_READ_SUPPORTED */ +#ifdef PNG_ERROR_TEXT_SUPPORTED +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_FUNCTION(void, +png_fixed_error,(png_structp png_ptr, png_const_charp name),PNG_NORETURN) +{ +# define fixed_message "fixed point overflow in " +# define fixed_message_ln ((sizeof fixed_message)-1) + int iin; + char msg[fixed_message_ln+PNG_MAX_ERROR_TEXT]; + png_memcpy(msg, fixed_message, fixed_message_ln); + iin = 0; + if (name != NULL) while (iin < (PNG_MAX_ERROR_TEXT-1) && name[iin] != 0) + { + msg[fixed_message_ln + iin] = name[iin]; + ++iin; + } + msg[fixed_message_ln + iin] = 0; + png_error(png_ptr, msg); +} +#endif +#endif + #ifdef PNG_SETJMP_SUPPORTED /* This API only exists if ANSI-C style error handling is used, * otherwise it is necessary for png_default_error to be overridden. @@ -242,7 +272,7 @@ png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn, return NULL; png_ptr->longjmp_fn = longjmp_fn; - return &png_ptr->jmpbuf; + return &png_ptr->png_jmpbuf; } #endif @@ -251,35 +281,38 @@ png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn, * function is used by default, or if the program supplies NULL for the * error function pointer in png_set_error_fn(). */ -static void /* PRIVATE */ -png_default_error(png_structp png_ptr, png_const_charp error_message) +static PNG_FUNCTION(void /* PRIVATE */, +png_default_error,(png_structp png_ptr, png_const_charp error_message), + PNG_NORETURN) { #ifdef PNG_CONSOLE_IO_SUPPORTED #ifdef PNG_ERROR_NUMBERS_SUPPORTED if (*error_message == PNG_LITERAL_SHARP) { - /* Strip "#nnnn " from beginning of error message. */ - int offset; - char error_number[16]; - for (offset = 0; offset<15; offset++) - { + /* Strip "#nnnn " from beginning of error message. */ + int offset; + char error_number[16]; + for (offset = 0; offset<15; offset++) + { error_number[offset] = error_message[offset + 1]; if (error_message[offset] == ' ') - break; - } - if ((offset > 1) && (offset < 15)) - { - error_number[offset - 1] = '\0'; - fprintf(stderr, "libpng error no. %s: %s", - error_number, error_message + offset + 1); - fprintf(stderr, PNG_STRING_NEWLINE); - } - else - { - fprintf(stderr, "libpng error: %s, offset=%d", - error_message, offset); - fprintf(stderr, PNG_STRING_NEWLINE); - } + break; + } + + if ((offset > 1) && (offset < 15)) + { + error_number[offset - 1] = '\0'; + fprintf(stderr, "libpng error no. %s: %s", + error_number, error_message + offset + 1); + fprintf(stderr, PNG_STRING_NEWLINE); + } + + else + { + fprintf(stderr, "libpng error: %s, offset=%d", + error_message, offset); + fprintf(stderr, PNG_STRING_NEWLINE); + } } else #endif @@ -288,26 +321,32 @@ png_default_error(png_structp png_ptr, png_const_charp error_message) fprintf(stderr, PNG_STRING_NEWLINE); } #endif +#ifndef PNG_CONSOLE_IO_SUPPORTED + PNG_UNUSED(error_message) /* Make compiler happy */ +#endif + png_longjmp(png_ptr, 1); +} +PNG_FUNCTION(void,PNGAPI +png_longjmp,(png_structp png_ptr, int val),PNG_NORETURN) +{ #ifdef PNG_SETJMP_SUPPORTED if (png_ptr && png_ptr->longjmp_fn) { # ifdef USE_FAR_KEYWORD - { - jmp_buf jmpbuf; - png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf)); - png_ptr->longjmp_fn(jmpbuf, 1); - } + { + jmp_buf png_jmpbuf; + png_memcpy(png_jmpbuf, png_ptr->png_jmpbuf, png_sizeof(jmp_buf)); + png_ptr->longjmp_fn(png_jmpbuf, val); + } + # else - png_ptr->longjmp_fn(png_ptr->jmpbuf, 1); + png_ptr->longjmp_fn(png_ptr->png_jmpbuf, val); # endif } #endif /* Here if not setjmp support or if png_ptr is null. */ PNG_ABORT(); -#ifndef PNG_CONSOLE_IO_SUPPORTED - error_message = error_message; /* Make compiler happy */ -#endif } #ifdef PNG_WARNINGS_SUPPORTED @@ -323,52 +362,56 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message) # ifdef PNG_ERROR_NUMBERS_SUPPORTED if (*warning_message == PNG_LITERAL_SHARP) { - int offset; - char warning_number[16]; - for (offset = 0; offset < 15; offset++) - { - warning_number[offset] = warning_message[offset + 1]; - if (warning_message[offset] == ' ') + int offset; + char warning_number[16]; + for (offset = 0; offset < 15; offset++) + { + warning_number[offset] = warning_message[offset + 1]; + if (warning_message[offset] == ' ') break; - } - if ((offset > 1) && (offset < 15)) - { - warning_number[offset + 1] = '\0'; - fprintf(stderr, "libpng warning no. %s: %s", - warning_number, warning_message + offset); - fprintf(stderr, PNG_STRING_NEWLINE); - } - else - { - fprintf(stderr, "libpng warning: %s", - warning_message); - fprintf(stderr, PNG_STRING_NEWLINE); - } + } + + if ((offset > 1) && (offset < 15)) + { + warning_number[offset + 1] = '\0'; + fprintf(stderr, "libpng warning no. %s: %s", + warning_number, warning_message + offset); + fprintf(stderr, PNG_STRING_NEWLINE); + } + + else + { + fprintf(stderr, "libpng warning: %s", + warning_message); + fprintf(stderr, PNG_STRING_NEWLINE); + } } else # endif + { - fprintf(stderr, "libpng warning: %s", warning_message); - fprintf(stderr, PNG_STRING_NEWLINE); + fprintf(stderr, "libpng warning: %s", warning_message); + fprintf(stderr, PNG_STRING_NEWLINE); } #else - warning_message = warning_message; /* Make compiler happy */ + PNG_UNUSED(warning_message) /* Make compiler happy */ #endif - png_ptr = png_ptr; /* Make compiler happy */ + PNG_UNUSED(png_ptr) /* Make compiler happy */ } #endif /* PNG_WARNINGS_SUPPORTED */ /* This function is called when the application wants to use another method * of handling errors and warnings. Note that the error function MUST NOT * return to the calling routine or serious problems will occur. The return - * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1) + * method used in the default routine calls longjmp(png_ptr->png_jmpbuf, 1) */ void PNGAPI png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warning_fn) + png_error_ptr error_fn, png_error_ptr warning_fn) { if (png_ptr == NULL) return; + png_ptr->error_ptr = error_ptr; png_ptr->error_fn = error_fn; png_ptr->warning_fn = warning_fn; @@ -380,10 +423,11 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, * pointer before png_write_destroy and png_read_destroy are called. */ png_voidp PNGAPI -png_get_error_ptr(png_structp png_ptr) +png_get_error_ptr(png_const_structp png_ptr) { if (png_ptr == NULL) return NULL; + return ((png_voidp)png_ptr->error_ptr); } @@ -394,8 +438,9 @@ png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode) { if (png_ptr != NULL) { - png_ptr->flags &= - ((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode); + png_ptr->flags &= + ((~(PNG_FLAG_STRIP_ERROR_NUMBERS | + PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode); } } #endif diff --git a/dll/3rdparty/libpng/pngget.c b/dll/3rdparty/libpng/pngget.c index abe721bd589..b5e5798c020 100644 --- a/dll/3rdparty/libpng/pngget.c +++ b/dll/3rdparty/libpng/pngget.c @@ -1,8 +1,8 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.4.2 [May 6, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.1 [February 3, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -12,47 +12,44 @@ * */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + png_uint_32 PNGAPI -png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) +png_get_valid(png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_32 flag) { if (png_ptr != NULL && info_ptr != NULL) return(info_ptr->valid & flag); - else - return(0); + return(0); } png_size_t PNGAPI -png_get_rowbytes(png_structp png_ptr, png_infop info_ptr) +png_get_rowbytes(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return(info_ptr->rowbytes); - else - return(0); + return(0); } #ifdef PNG_INFO_IMAGE_SUPPORTED png_bytepp PNGAPI -png_get_rows(png_structp png_ptr, png_infop info_ptr) +png_get_rows(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return(info_ptr->row_pointers); - else - return(0); + return(0); } #endif #ifdef PNG_EASY_ACCESS_SUPPORTED /* Easy access to info, added in libpng-0.99 */ png_uint_32 PNGAPI -png_get_image_width(png_structp png_ptr, png_infop info_ptr) +png_get_image_width(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return info_ptr->width; @@ -61,7 +58,7 @@ png_get_image_width(png_structp png_ptr, png_infop info_ptr) } png_uint_32 PNGAPI -png_get_image_height(png_structp png_ptr, png_infop info_ptr) +png_get_image_height(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return info_ptr->height; @@ -70,7 +67,7 @@ png_get_image_height(png_structp png_ptr, png_infop info_ptr) } png_byte PNGAPI -png_get_bit_depth(png_structp png_ptr, png_infop info_ptr) +png_get_bit_depth(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return info_ptr->bit_depth; @@ -79,7 +76,7 @@ png_get_bit_depth(png_structp png_ptr, png_infop info_ptr) } png_byte PNGAPI -png_get_color_type(png_structp png_ptr, png_infop info_ptr) +png_get_color_type(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return info_ptr->color_type; @@ -88,7 +85,7 @@ png_get_color_type(png_structp png_ptr, png_infop info_ptr) } png_byte PNGAPI -png_get_filter_type(png_structp png_ptr, png_infop info_ptr) +png_get_filter_type(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return info_ptr->filter_type; @@ -97,7 +94,7 @@ png_get_filter_type(png_structp png_ptr, png_infop info_ptr) } png_byte PNGAPI -png_get_interlace_type(png_structp png_ptr, png_infop info_ptr) +png_get_interlace_type(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return info_ptr->interlace_type; @@ -106,7 +103,7 @@ png_get_interlace_type(png_structp png_ptr, png_infop info_ptr) } png_byte PNGAPI -png_get_compression_type(png_structp png_ptr, png_infop info_ptr) +png_get_compression_type(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return info_ptr->compression_type; @@ -115,222 +112,275 @@ png_get_compression_type(png_structp png_ptr, png_infop info_ptr) } png_uint_32 PNGAPI -png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) +png_get_x_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr) { - if (png_ptr != NULL && info_ptr != NULL) #ifdef PNG_pHYs_SUPPORTED - if (info_ptr->valid & PNG_INFO_pHYs) - { - png_debug1(1, "in %s retrieval function", "png_get_x_pixels_per_meter"); + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function", + "png_get_x_pixels_per_meter"); - if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER) - return (0); - - else - return (info_ptr->x_pixels_per_unit); - } -#else - return (0); + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) + return (info_ptr->x_pixels_per_unit); + } #endif + return (0); } png_uint_32 PNGAPI -png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) +png_get_y_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr) { - if (png_ptr != NULL && info_ptr != NULL) #ifdef PNG_pHYs_SUPPORTED - if (info_ptr->valid & PNG_INFO_pHYs) + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) { - png_debug1(1, "in %s retrieval function", "png_get_y_pixels_per_meter"); + png_debug1(1, "in %s retrieval function", + "png_get_y_pixels_per_meter"); - if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER) - return (0); - - else - return (info_ptr->y_pixels_per_unit); + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) + return (info_ptr->y_pixels_per_unit); } -#else - return (0); #endif + return (0); } png_uint_32 PNGAPI -png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) +png_get_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr) { - if (png_ptr != NULL && info_ptr != NULL) #ifdef PNG_pHYs_SUPPORTED - if (info_ptr->valid & PNG_INFO_pHYs) + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) { png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter"); - if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER || - info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit) - return (0); - - else - return (info_ptr->x_pixels_per_unit); + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER && + info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit) + return (info_ptr->x_pixels_per_unit); } -#else - return (0); #endif + return (0); } #ifdef PNG_FLOATING_POINT_SUPPORTED float PNGAPI -png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr) - { - if (png_ptr != NULL && info_ptr != NULL) -#ifdef PNG_pHYs_SUPPORTED - - if (info_ptr->valid & PNG_INFO_pHYs) +png_get_pixel_aspect_ratio(png_const_structp png_ptr, png_const_infop info_ptr) +{ +#ifdef PNG_READ_pHYs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) { png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio"); - if (info_ptr->x_pixels_per_unit == 0) - return ((float)0.0); - - else + if (info_ptr->x_pixels_per_unit != 0) return ((float)((float)info_ptr->y_pixels_per_unit - /(float)info_ptr->x_pixels_per_unit)); + /(float)info_ptr->x_pixels_per_unit)); } -#else - return (0.0); #endif + return ((float)0.0); } #endif -png_int_32 PNGAPI -png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr) +#ifdef PNG_FIXED_POINT_SUPPORTED +png_fixed_point PNGAPI +png_get_pixel_aspect_ratio_fixed(png_const_structp png_ptr, + png_const_infop info_ptr) { - if (png_ptr != NULL && info_ptr != NULL) -#ifdef PNG_oFFs_SUPPORTED +#ifdef PNG_READ_pHYs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs) + && info_ptr->x_pixels_per_unit > 0 && info_ptr->y_pixels_per_unit > 0 + && info_ptr->x_pixels_per_unit <= PNG_UINT_31_MAX + && info_ptr->y_pixels_per_unit <= PNG_UINT_31_MAX) + { + png_fixed_point res; - if (info_ptr->valid & PNG_INFO_oFFs) + png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio_fixed"); + + /* The following casts work because a PNG 4 byte integer only has a valid + * range of 0..2^31-1; otherwise the cast might overflow. + */ + if (png_muldiv(&res, (png_int_32)info_ptr->y_pixels_per_unit, PNG_FP_1, + (png_int_32)info_ptr->x_pixels_per_unit)) + return res; + } +#endif + + return 0; +} +#endif + +png_int_32 PNGAPI +png_get_x_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) { png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns"); - if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) - return (0); - - else - return (info_ptr->x_offset); + if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) + return (info_ptr->x_offset); } -#else - return (0); #endif + return (0); } png_int_32 PNGAPI -png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr) +png_get_y_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr) { - if (png_ptr != NULL && info_ptr != NULL) - #ifdef PNG_oFFs_SUPPORTED - if (info_ptr->valid & PNG_INFO_oFFs) + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) { png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns"); - if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) - return (0); - - else - return (info_ptr->y_offset); + if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) + return (info_ptr->y_offset); } -#else - return (0); #endif + return (0); } png_int_32 PNGAPI -png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr) +png_get_x_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr) { - if (png_ptr != NULL && info_ptr != NULL) - #ifdef PNG_oFFs_SUPPORTED - if (info_ptr->valid & PNG_INFO_oFFs) + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) { - png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns"); + png_debug1(1, "in %s retrieval function", "png_get_x_offset_pixels"); - if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) - return (0); - - else - return (info_ptr->x_offset); + if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) + return (info_ptr->x_offset); } -#else - return (0); #endif + return (0); } png_int_32 PNGAPI -png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr) +png_get_y_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr) { - if (png_ptr != NULL && info_ptr != NULL) - #ifdef PNG_oFFs_SUPPORTED - if (info_ptr->valid & PNG_INFO_oFFs) + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) { - png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns"); + png_debug1(1, "in %s retrieval function", "png_get_y_offset_pixels"); - if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) - return (0); - - else - return (info_ptr->y_offset); + if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) + return (info_ptr->y_offset); } -#else - return (0); #endif + return (0); } -#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) -png_uint_32 PNGAPI -png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) +#ifdef PNG_INCH_CONVERSIONS_SUPPORTED +static png_uint_32 +ppi_from_ppm(png_uint_32 ppm) { - return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr) - *.0254 +.5)); +#if 0 + /* The conversion is *(2.54/100), in binary (32 digits): + * .00000110100000001001110101001001 + */ + png_uint_32 t1001, t1101; + ppm >>= 1; /* .1 */ + t1001 = ppm + (ppm >> 3); /* .1001 */ + t1101 = t1001 + (ppm >> 1); /* .1101 */ + ppm >>= 20; /* .000000000000000000001 */ + t1101 += t1101 >> 15; /* .1101000000000001101 */ + t1001 >>= 11; /* .000000000001001 */ + t1001 += t1001 >> 12; /* .000000000001001000000001001 */ + ppm += t1001; /* .000000000001001000001001001 */ + ppm += t1101; /* .110100000001001110101001001 */ + return (ppm + 16) >> 5;/* .00000110100000001001110101001001 */ +#else + /* The argument is a PNG unsigned integer, so it is not permitted + * to be bigger than 2^31. + */ + png_fixed_point result; + if (ppm <= PNG_UINT_31_MAX && png_muldiv(&result, (png_int_32)ppm, 127, + 5000)) + return result; + + /* Overflow. */ + return 0; +#endif } png_uint_32 PNGAPI -png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) +png_get_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr) { - return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr) - *.0254 +.5)); + return ppi_from_ppm(png_get_pixels_per_meter(png_ptr, info_ptr)); } png_uint_32 PNGAPI -png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) +png_get_x_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr) { - return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr) - *.0254 +.5)); + return ppi_from_ppm(png_get_x_pixels_per_meter(png_ptr, info_ptr)); } +png_uint_32 PNGAPI +png_get_y_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr) +{ + return ppi_from_ppm(png_get_y_pixels_per_meter(png_ptr, info_ptr)); +} + +#ifdef PNG_FIXED_POINT_SUPPORTED +static png_fixed_point +png_fixed_inches_from_microns(png_structp png_ptr, png_int_32 microns) +{ + /* Convert from metres * 1,000,000 to inches * 100,000, meters to + * inches is simply *(100/2.54), so we want *(10/2.54) == 500/127. + * Notice that this can overflow - a warning is output and 0 is + * returned. + */ + return png_muldiv_warn(png_ptr, microns, 500, 127); +} + +png_fixed_point PNGAPI +png_get_x_offset_inches_fixed(png_structp png_ptr, + png_const_infop info_ptr) +{ + return png_fixed_inches_from_microns(png_ptr, + png_get_x_offset_microns(png_ptr, info_ptr)); +} +#endif + +#ifdef PNG_FIXED_POINT_SUPPORTED +png_fixed_point PNGAPI +png_get_y_offset_inches_fixed(png_structp png_ptr, + png_const_infop info_ptr) +{ + return png_fixed_inches_from_microns(png_ptr, + png_get_y_offset_microns(png_ptr, info_ptr)); +} +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED float PNGAPI -png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr) +png_get_x_offset_inches(png_const_structp png_ptr, png_const_infop info_ptr) { - return ((float)png_get_x_offset_microns(png_ptr, info_ptr) - *.00003937); + /* To avoid the overflow do the conversion directly in floating + * point. + */ + return (float)(png_get_x_offset_microns(png_ptr, info_ptr) * .00003937); } +#endif +#ifdef PNG_FLOATING_POINT_SUPPORTED float PNGAPI -png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr) +png_get_y_offset_inches(png_const_structp png_ptr, png_const_infop info_ptr) { - return ((float)png_get_y_offset_microns(png_ptr, info_ptr) - *.00003937); + /* To avoid the overflow do the conversion directly in floating + * point. + */ + return (float)(png_get_y_offset_microns(png_ptr, info_ptr) * .00003937); } +#endif #ifdef PNG_pHYs_SUPPORTED png_uint_32 PNGAPI -png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +png_get_pHYs_dpi(png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) { png_uint_32 retval = 0; @@ -343,15 +393,18 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, *res_x = info_ptr->x_pixels_per_unit; retval |= PNG_INFO_pHYs; } + if (res_y != NULL) { *res_y = info_ptr->y_pixels_per_unit; retval |= PNG_INFO_pHYs; } + if (unit_type != NULL) { *unit_type = (int)info_ptr->phys_unit_type; retval |= PNG_INFO_pHYs; + if (*unit_type == 1) { if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50); @@ -359,176 +412,182 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, } } } + return (retval); } #endif /* PNG_pHYs_SUPPORTED */ -#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ +#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */ /* png_get_channels really belongs in here, too, but it's been around longer */ #endif /* PNG_EASY_ACCESS_SUPPORTED */ png_byte PNGAPI -png_get_channels(png_structp png_ptr, png_infop info_ptr) +png_get_channels(png_const_structp png_ptr, png_const_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return(info_ptr->channels); - else - return (0); + + return (0); } -png_bytep PNGAPI -png_get_signature(png_structp png_ptr, png_infop info_ptr) +png_const_bytep PNGAPI +png_get_signature(png_const_structp png_ptr, png_infop info_ptr) { if (png_ptr != NULL && info_ptr != NULL) return(info_ptr->signature); - else - return (NULL); + + return (NULL); } #ifdef PNG_bKGD_SUPPORTED png_uint_32 PNGAPI -png_get_bKGD(png_structp png_ptr, png_infop info_ptr, +png_get_bKGD(png_const_structp png_ptr, png_infop info_ptr, png_color_16p *background) { if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) - && background != NULL) + && background != NULL) { png_debug1(1, "in %s retrieval function", "bKGD"); *background = &(info_ptr->background); return (PNG_INFO_bKGD); } + return (0); } #endif #ifdef PNG_cHRM_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED png_uint_32 PNGAPI -png_get_cHRM(png_structp png_ptr, png_infop info_ptr, - double *white_x, double *white_y, double *red_x, double *red_y, - double *green_x, double *green_y, double *blue_x, double *blue_y) +png_get_cHRM(png_const_structp png_ptr, png_const_infop info_ptr, + double *white_x, double *white_y, double *red_x, double *red_y, + double *green_x, double *green_y, double *blue_x, double *blue_y) { if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) { png_debug1(1, "in %s retrieval function", "cHRM"); if (white_x != NULL) - *white_x = (double)info_ptr->x_white; + *white_x = png_float(png_ptr, info_ptr->x_white, "cHRM white X"); if (white_y != NULL) - *white_y = (double)info_ptr->y_white; + *white_y = png_float(png_ptr, info_ptr->y_white, "cHRM white Y"); if (red_x != NULL) - *red_x = (double)info_ptr->x_red; + *red_x = png_float(png_ptr, info_ptr->x_red, "cHRM red X"); if (red_y != NULL) - *red_y = (double)info_ptr->y_red; + *red_y = png_float(png_ptr, info_ptr->y_red, "cHRM red Y"); if (green_x != NULL) - *green_x = (double)info_ptr->x_green; + *green_x = png_float(png_ptr, info_ptr->x_green, "cHRM green X"); if (green_y != NULL) - *green_y = (double)info_ptr->y_green; + *green_y = png_float(png_ptr, info_ptr->y_green, "cHRM green Y"); if (blue_x != NULL) - *blue_x = (double)info_ptr->x_blue; + *blue_x = png_float(png_ptr, info_ptr->x_blue, "cHRM blue X"); if (blue_y != NULL) - *blue_y = (double)info_ptr->y_blue; + *blue_y = png_float(png_ptr, info_ptr->y_blue, "cHRM blue Y"); return (PNG_INFO_cHRM); } + return (0); } -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED +# endif + +# ifdef PNG_FIXED_POINT_SUPPORTED png_uint_32 PNGAPI -png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x, - png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, - png_fixed_point *blue_x, png_fixed_point *blue_y) +png_get_cHRM_fixed(png_const_structp png_ptr, png_const_infop info_ptr, + png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x, + png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, + png_fixed_point *blue_x, png_fixed_point *blue_y) { png_debug1(1, "in %s retrieval function", "cHRM"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) { if (white_x != NULL) - *white_x = info_ptr->int_x_white; + *white_x = info_ptr->x_white; if (white_y != NULL) - *white_y = info_ptr->int_y_white; + *white_y = info_ptr->y_white; if (red_x != NULL) - *red_x = info_ptr->int_x_red; + *red_x = info_ptr->x_red; if (red_y != NULL) - *red_y = info_ptr->int_y_red; + *red_y = info_ptr->y_red; if (green_x != NULL) - *green_x = info_ptr->int_x_green; + *green_x = info_ptr->x_green; if (green_y != NULL) - *green_y = info_ptr->int_y_green; + *green_y = info_ptr->y_green; if (blue_x != NULL) - *blue_x = info_ptr->int_x_blue; + *blue_x = info_ptr->x_blue; if (blue_y != NULL) - *blue_y = info_ptr->int_y_blue; + *blue_y = info_ptr->y_blue; return (PNG_INFO_cHRM); } + return (0); } -#endif +# endif #endif #ifdef PNG_gAMA_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma) +png_uint_32 PNGFAPI +png_get_gAMA_fixed(png_const_structp png_ptr, png_const_infop info_ptr, + png_fixed_point *file_gamma) { png_debug1(1, "in %s retrieval function", "gAMA"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) - && file_gamma != NULL) + && file_gamma != NULL) { - *file_gamma = (double)info_ptr->gamma; + *file_gamma = info_ptr->gamma; return (PNG_INFO_gAMA); } - return (0); -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point *int_file_gamma) -{ - png_debug1(1, "in %s retrieval function", "gAMA"); - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) - && int_file_gamma != NULL) - { - *int_file_gamma = info_ptr->int_gamma; - return (PNG_INFO_gAMA); - } return (0); } -#endif +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_gAMA(png_const_structp png_ptr, png_const_infop info_ptr, + double *file_gamma) +{ + png_fixed_point igamma; + png_uint_32 ok = png_get_gAMA_fixed(png_ptr, info_ptr, &igamma); + + if (ok) + *file_gamma = png_float(png_ptr, igamma, "png_get_gAMA"); + + return ok; +} + +# endif #endif #ifdef PNG_sRGB_SUPPORTED png_uint_32 PNGAPI -png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent) +png_get_sRGB(png_const_structp png_ptr, png_const_infop info_ptr, + int *file_srgb_intent) { png_debug1(1, "in %s retrieval function", "sRGB"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB) - && file_srgb_intent != NULL) + && file_srgb_intent != NULL) { *file_srgb_intent = (int)info_ptr->srgb_intent; return (PNG_INFO_sRGB); } + return (0); } #endif #ifdef PNG_iCCP_SUPPORTED png_uint_32 PNGAPI -png_get_iCCP(png_structp png_ptr, png_infop info_ptr, - png_charpp name, int *compression_type, - png_charpp profile, png_uint_32 *proflen) +png_get_iCCP(png_const_structp png_ptr, png_const_infop info_ptr, + png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen) { png_debug1(1, "in %s retrieval function", "iCCP"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP) - && name != NULL && profile != NULL && proflen != NULL) + && name != NULL && profile != NULL && proflen != NULL) { *name = info_ptr->iccp_name; *profile = info_ptr->iccp_profile; @@ -539,45 +598,49 @@ png_get_iCCP(png_structp png_ptr, png_infop info_ptr, *compression_type = (int)info_ptr->iccp_compression; return (PNG_INFO_iCCP); } + return (0); } #endif #ifdef PNG_sPLT_SUPPORTED png_uint_32 PNGAPI -png_get_sPLT(png_structp png_ptr, png_infop info_ptr, - png_sPLT_tpp spalettes) +png_get_sPLT(png_const_structp png_ptr, png_const_infop info_ptr, + png_sPLT_tpp spalettes) { if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL) { - *spalettes = info_ptr->splt_palettes; - return ((png_uint_32)info_ptr->splt_palettes_num); + *spalettes = info_ptr->splt_palettes; + return ((png_uint_32)info_ptr->splt_palettes_num); } + return (0); } #endif #ifdef PNG_hIST_SUPPORTED png_uint_32 PNGAPI -png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist) +png_get_hIST(png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_16p *hist) { png_debug1(1, "in %s retrieval function", "hIST"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) - && hist != NULL) + && hist != NULL) { *hist = info_ptr->hist; return (PNG_INFO_hIST); } + return (0); } #endif png_uint_32 PNGAPI png_get_IHDR(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *width, png_uint_32 *height, int *bit_depth, - int *color_type, int *interlace_type, int *compression_type, - int *filter_type) + png_uint_32 *width, png_uint_32 *height, int *bit_depth, + int *color_type, int *interlace_type, int *compression_type, + int *filter_type) { png_debug1(1, "in %s retrieval function", "IHDR"); @@ -614,28 +677,29 @@ png_get_IHDR(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_oFFs_SUPPORTED png_uint_32 PNGAPI -png_get_oFFs(png_structp png_ptr, png_infop info_ptr, - png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type) +png_get_oFFs(png_const_structp png_ptr, png_const_infop info_ptr, + png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type) { png_debug1(1, "in %s retrieval function", "oFFs"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs) - && offset_x != NULL && offset_y != NULL && unit_type != NULL) + && offset_x != NULL && offset_y != NULL && unit_type != NULL) { *offset_x = info_ptr->x_offset; *offset_y = info_ptr->y_offset; *unit_type = (int)info_ptr->offset_unit_type; return (PNG_INFO_oFFs); } + return (0); } #endif #ifdef PNG_pCAL_SUPPORTED png_uint_32 PNGAPI -png_get_pCAL(png_structp png_ptr, png_infop info_ptr, - png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, - png_charp *units, png_charpp *params) +png_get_pCAL(png_const_structp png_ptr, png_const_infop info_ptr, + png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, + png_charp *units, png_charpp *params) { png_debug1(1, "in %s retrieval function", "pCAL"); @@ -652,57 +716,78 @@ png_get_pCAL(png_structp png_ptr, png_infop info_ptr, *params = info_ptr->pcal_params; return (PNG_INFO_pCAL); } + return (0); } #endif #ifdef PNG_sCAL_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED +# ifdef PNG_FIXED_POINT_SUPPORTED +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED png_uint_32 PNGAPI -png_get_sCAL(png_structp png_ptr, png_infop info_ptr, - int *unit, double *width, double *height) +png_get_sCAL_fixed(png_structp png_ptr, png_const_infop info_ptr, + int *unit, png_fixed_point *width, png_fixed_point *height) { - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_sCAL)) - { - *unit = info_ptr->scal_unit; - *width = info_ptr->scal_pixel_width; - *height = info_ptr->scal_pixel_height; - return (PNG_INFO_sCAL); - } - return(0); + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + /*TODO: make this work without FP support */ + *width = png_fixed(png_ptr, atof(info_ptr->scal_s_width), "sCAL width"); + *height = png_fixed(png_ptr, atof(info_ptr->scal_s_height), + "sCAL height"); + return (PNG_INFO_sCAL); + } + + return(0); } -#else -#ifdef PNG_FIXED_POINT_SUPPORTED +# endif /* FLOATING_ARITHMETIC */ +# endif /* FIXED_POINT */ +# ifdef PNG_FLOATING_POINT_SUPPORTED png_uint_32 PNGAPI -png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr, - int *unit, png_charpp width, png_charpp height) +png_get_sCAL(png_const_structp png_ptr, png_const_infop info_ptr, + int *unit, double *width, double *height) { - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_sCAL)) - { - *unit = info_ptr->scal_unit; - *width = info_ptr->scal_s_width; - *height = info_ptr->scal_s_height; - return (PNG_INFO_sCAL); - } - return(0); + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + *width = atof(info_ptr->scal_s_width); + *height = atof(info_ptr->scal_s_height); + return (PNG_INFO_sCAL); + } + + return(0); } -#endif -#endif -#endif +# endif /* FLOATING POINT */ +png_uint_32 PNGAPI +png_get_sCAL_s(png_const_structp png_ptr, png_const_infop info_ptr, + int *unit, png_charpp width, png_charpp height) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + *width = info_ptr->scal_s_width; + *height = info_ptr->scal_s_height; + return (PNG_INFO_sCAL); + } + + return(0); +} +#endif /* sCAL */ #ifdef PNG_pHYs_SUPPORTED png_uint_32 PNGAPI -png_get_pHYs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +png_get_pHYs(png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) { png_uint_32 retval = 0; png_debug1(1, "in %s retrieval function", "pHYs"); if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_pHYs)) + (info_ptr->valid & PNG_INFO_pHYs)) { if (res_x != NULL) { @@ -722,13 +807,14 @@ png_get_pHYs(png_structp png_ptr, png_infop info_ptr, retval |= PNG_INFO_pHYs; } } + return (retval); } -#endif +#endif /* pHYs */ png_uint_32 PNGAPI -png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, - int *num_palette) +png_get_PLTE(png_const_structp png_ptr, png_const_infop info_ptr, + png_colorp *palette, int *num_palette) { png_debug1(1, "in %s retrieval function", "PLTE"); @@ -740,35 +826,38 @@ png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, png_debug1(3, "num_palette = %d", *num_palette); return (PNG_INFO_PLTE); } + return (0); } #ifdef PNG_sBIT_SUPPORTED png_uint_32 PNGAPI -png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit) +png_get_sBIT(png_const_structp png_ptr, png_infop info_ptr, + png_color_8p *sig_bit) { png_debug1(1, "in %s retrieval function", "sBIT"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT) - && sig_bit != NULL) + && sig_bit != NULL) { *sig_bit = &(info_ptr->sig_bit); return (PNG_INFO_sBIT); } + return (0); } #endif #ifdef PNG_TEXT_SUPPORTED png_uint_32 PNGAPI -png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, - int *num_text) +png_get_text(png_const_structp png_ptr, png_const_infop info_ptr, + png_textp *text_ptr, int *num_text) { if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0) { png_debug1(1, "in %s retrieval function", - (png_ptr->chunk_name[0] == '\0' ? "text" - : (png_const_charp)png_ptr->chunk_name)); + (png_ptr->chunk_name[0] == '\0' ? "text" : + (png_const_charp)png_ptr->chunk_name)); if (text_ptr != NULL) *text_ptr = info_ptr->text; @@ -778,15 +867,17 @@ png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, return ((png_uint_32)info_ptr->num_text); } + if (num_text != NULL) - *num_text = 0; + *num_text = 0; + return(0); } #endif #ifdef PNG_tIME_SUPPORTED png_uint_32 PNGAPI -png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time) +png_get_tIME(png_const_structp png_ptr, png_infop info_ptr, png_timep *mod_time) { png_debug1(1, "in %s retrieval function", "tIME"); @@ -796,14 +887,15 @@ png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time) *mod_time = &(info_ptr->mod_time); return (PNG_INFO_tIME); } + return (0); } #endif #ifdef PNG_tRNS_SUPPORTED png_uint_32 PNGAPI -png_get_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color) +png_get_tRNS(png_const_structp png_ptr, png_infop info_ptr, + png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color) { png_uint_32 retval = 0; if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) @@ -812,68 +904,72 @@ png_get_tRNS(png_structp png_ptr, png_infop info_ptr, if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { - if (trans_alpha != NULL) - { - *trans_alpha = info_ptr->trans_alpha; - retval |= PNG_INFO_tRNS; - } + if (trans_alpha != NULL) + { + *trans_alpha = info_ptr->trans_alpha; + retval |= PNG_INFO_tRNS; + } - if (trans_color != NULL) - *trans_color = &(info_ptr->trans_color); + if (trans_color != NULL) + *trans_color = &(info_ptr->trans_color); } + else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */ { - if (trans_color != NULL) - { - *trans_color = &(info_ptr->trans_color); - retval |= PNG_INFO_tRNS; - } + if (trans_color != NULL) + { + *trans_color = &(info_ptr->trans_color); + retval |= PNG_INFO_tRNS; + } - if (trans_alpha != NULL) - *trans_alpha = NULL; + if (trans_alpha != NULL) + *trans_alpha = NULL; } + if (num_trans != NULL) { *num_trans = info_ptr->num_trans; retval |= PNG_INFO_tRNS; } } + return (retval); } #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -png_uint_32 PNGAPI -png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr, - png_unknown_chunkpp unknowns) +int PNGAPI +png_get_unknown_chunks(png_const_structp png_ptr, png_const_infop info_ptr, + png_unknown_chunkpp unknowns) { if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL) { - *unknowns = info_ptr->unknown_chunks; - return ((png_uint_32)info_ptr->unknown_chunks_num); + *unknowns = info_ptr->unknown_chunks; + return info_ptr->unknown_chunks_num; } + return (0); } #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED png_byte PNGAPI -png_get_rgb_to_gray_status (png_structp png_ptr) +png_get_rgb_to_gray_status (png_const_structp png_ptr) { - return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0); + return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0); } #endif #ifdef PNG_USER_CHUNKS_SUPPORTED png_voidp PNGAPI -png_get_user_chunk_ptr(png_structp png_ptr) +png_get_user_chunk_ptr(png_const_structp png_ptr) { - return (png_ptr? png_ptr->user_chunk_ptr : NULL); + return (png_ptr ? png_ptr->user_chunk_ptr : NULL); } #endif png_size_t PNGAPI -png_get_compression_buffer_size(png_structp png_ptr) +png_get_compression_buffer_size(png_const_structp png_ptr) { return (png_ptr ? png_ptr->zbuf_size : 0L); } @@ -883,27 +979,29 @@ png_get_compression_buffer_size(png_structp png_ptr) /* These functions were added to libpng 1.2.6 and were enabled * by default in libpng-1.4.0 */ png_uint_32 PNGAPI -png_get_user_width_max (png_structp png_ptr) +png_get_user_width_max (png_const_structp png_ptr) { - return (png_ptr? png_ptr->user_width_max : 0); + return (png_ptr ? png_ptr->user_width_max : 0); } + png_uint_32 PNGAPI -png_get_user_height_max (png_structp png_ptr) +png_get_user_height_max (png_const_structp png_ptr) { - return (png_ptr? png_ptr->user_height_max : 0); + return (png_ptr ? png_ptr->user_height_max : 0); } + /* This function was added to libpng 1.4.0 */ png_uint_32 PNGAPI -png_get_chunk_cache_max (png_structp png_ptr) +png_get_chunk_cache_max (png_const_structp png_ptr) { - return (png_ptr? png_ptr->user_chunk_cache_max : 0); + return (png_ptr ? png_ptr->user_chunk_cache_max : 0); } + /* This function was added to libpng 1.4.1 */ png_alloc_size_t PNGAPI -png_get_chunk_malloc_max (png_structp png_ptr) +png_get_chunk_malloc_max (png_const_structp png_ptr) { - return (png_ptr? - png_ptr->user_chunk_malloc_max : 0); + return (png_ptr ? png_ptr->user_chunk_malloc_max : 0); } #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ @@ -912,10 +1010,19 @@ png_get_chunk_malloc_max (png_structp png_ptr) png_uint_32 PNGAPI png_get_io_state (png_structp png_ptr) { - return png_ptr->io_state; + return png_ptr->io_state; } -png_bytep PNGAPI +png_uint_32 PNGAPI +png_get_io_chunk_type (png_const_structp png_ptr) +{ + return ((png_ptr->chunk_name[0] << 24) + + (png_ptr->chunk_name[1] << 16) + + (png_ptr->chunk_name[2] << 8) + + (png_ptr->chunk_name[3])); +} + +png_const_bytep PNGAPI png_get_io_chunk_name (png_structp png_ptr) { return png_ptr->chunk_name; diff --git a/dll/3rdparty/libpng/pngmem.c b/dll/3rdparty/libpng/pngmem.c index c8a3f6f59af..a15d8b08593 100644 --- a/dll/3rdparty/libpng/pngmem.c +++ b/dll/3rdparty/libpng/pngmem.c @@ -1,8 +1,8 @@ /* pngmem.c - stub functions for memory allocation * - * Last changed in libpng 1.4.2 [May 6, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.1 [February 3, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -17,40 +17,42 @@ * identify the replacement functions. */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + /* Borland DOS special memory handler */ #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) /* If you change this, be sure to change the one in png.h also */ /* Allocate memory for a png_struct. The malloc and memset can be replaced by a single call to calloc() if this is thought to improve performance. */ -png_voidp /* PRIVATE */ -png_create_struct(int type) +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_create_struct,(int type),PNG_ALLOCATED) { -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED return (png_create_struct_2(type, NULL, NULL)); } /* Alternate version of png_create_struct, for use with user-defined malloc. */ -png_voidp /* PRIVATE */ -png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr), + PNG_ALLOCATED) { -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ png_size_t size; png_voidp struct_ptr; if (type == PNG_STRUCT_INFO) size = png_sizeof(png_info); + else if (type == PNG_STRUCT_PNG) size = png_sizeof(png_struct); + else return (png_get_copyright(NULL)); -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (malloc_fn != NULL) { png_struct dummy_struct; @@ -58,11 +60,13 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) png_ptr->mem_ptr=mem_ptr; struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size); } + else -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ struct_ptr = (png_voidp)farmalloc(size); if (struct_ptr != NULL) png_memset(struct_ptr, 0, size); + return (struct_ptr); } @@ -70,7 +74,7 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) void /* PRIVATE */ png_destroy_struct(png_voidp struct_ptr) { -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED png_destroy_struct_2(struct_ptr, NULL, NULL); } @@ -79,10 +83,10 @@ void /* PRIVATE */ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, png_voidp mem_ptr) { -#endif +# endif if (struct_ptr != NULL) { -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (free_fn != NULL) { png_struct dummy_struct; @@ -91,7 +95,8 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, (*(free_fn))(png_ptr, struct_ptr); return; } -#endif /* PNG_USER_MEM_SUPPORTED */ + +# endif /* PNG_USER_MEM_SUPPORTED */ farfree (struct_ptr); } } @@ -115,55 +120,62 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, * result, we would be truncating potentially larger memory requests * (which should cause a fatal error) and introducing major problems. */ -png_voidp PNGAPI -png_calloc(png_structp png_ptr, png_alloc_size_t size) +PNG_FUNCTION(png_voidp,PNGAPI +png_calloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { png_voidp ret; ret = (png_malloc(png_ptr, size)); + if (ret != NULL) png_memset(ret,0,(png_size_t)size); + return (ret); } -png_voidp PNGAPI -png_malloc(png_structp png_ptr, png_alloc_size_t size) +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { png_voidp ret; if (png_ptr == NULL || size == 0) return (NULL); -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (png_ptr->malloc_fn != NULL) ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); + else ret = (png_malloc_default(png_ptr, size)); + if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Out of memory"); + return (ret); } -png_voidp PNGAPI -png_malloc_default(png_structp png_ptr, png_alloc_size_t size) +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { png_voidp ret; -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ if (png_ptr == NULL || size == 0) return (NULL); -#ifdef PNG_MAX_MALLOC_64K +# ifdef PNG_MAX_MALLOC_64K if (size > (png_uint_32)65536L) { png_warning(png_ptr, "Cannot Allocate > 64K"); ret = NULL; } + else -#endif +# endif if (size != (size_t)size) ret = NULL; + else if (size == (png_uint_32)65536L) { if (png_ptr->offset_table == NULL) @@ -186,10 +198,13 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size) if (png_ptr->zlib_window_bits > 14) num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14)); + else num_blocks = 1; + if (png_ptr->zlib_mem_level >= 7) num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7)); + else num_blocks++; @@ -199,25 +214,27 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size) if (table == NULL) { -#ifndef PNG_USER_MEM_SUPPORTED +# ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */ + else png_warning(png_ptr, "Out Of Memory"); -#endif +# endif return (NULL); } if ((png_size_t)table & 0xfff0) { -#ifndef PNG_USER_MEM_SUPPORTED +# ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Farmalloc didn't return normalized pointer"); + else png_warning(png_ptr, "Farmalloc didn't return normalized pointer"); -#endif +# endif return (NULL); } @@ -227,12 +244,13 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size) if (png_ptr->offset_table_ptr == NULL) { -#ifndef PNG_USER_MEM_SUPPORTED +# ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */ + else png_warning(png_ptr, "Out Of memory"); -#endif +# endif return (NULL); } @@ -242,6 +260,7 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size) hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */ } + for (i = 0; i < num_blocks; i++) { png_ptr->offset_table_ptr[i] = (png_bytep)hptr; @@ -256,29 +275,32 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size) if (png_ptr->offset_table_count >= png_ptr->offset_table_number) { -#ifndef PNG_USER_MEM_SUPPORTED +# ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Out of Memory"); /* Note "o" and "M" */ + else png_warning(png_ptr, "Out of Memory"); -#endif +# endif return (NULL); } ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++]; } + else ret = farmalloc(size); -#ifndef PNG_USER_MEM_SUPPORTED +# ifndef PNG_USER_MEM_SUPPORTED if (ret == NULL) { if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Out of memory"); /* Note "o" and "m" */ + else png_warning(png_ptr, "Out of memory"); /* Note "o" and "m" */ } -#endif +# endif return (ret); } @@ -293,12 +315,13 @@ png_free(png_structp png_ptr, png_voidp ptr) if (png_ptr == NULL || ptr == NULL) return; -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (png_ptr->free_fn != NULL) { (*(png_ptr->free_fn))(png_ptr, ptr); return; } + else png_free_default(png_ptr, ptr); } @@ -306,7 +329,7 @@ png_free(png_structp png_ptr, png_voidp ptr) void PNGAPI png_free_default(png_structp png_ptr, png_voidp ptr) { -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ if (png_ptr == NULL || ptr == NULL) return; @@ -334,9 +357,7 @@ png_free_default(png_structp png_ptr, png_voidp ptr) } if (ptr != NULL) - { farfree(ptr); - } } #else /* Not the Borland DOS special memory handler */ @@ -344,52 +365,58 @@ png_free_default(png_structp png_ptr, png_voidp ptr) /* Allocate memory for a png_struct or a png_info. The malloc and memset can be replaced by a single call to calloc() if this is thought to improve performance noticably. */ -png_voidp /* PRIVATE */ -png_create_struct(int type) +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_create_struct,(int type),PNG_ALLOCATED) { -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED return (png_create_struct_2(type, NULL, NULL)); } /* Allocate memory for a png_struct or a png_info. The malloc and memset can be replaced by a single call to calloc() if this is thought to improve performance noticably. */ -png_voidp /* PRIVATE */ -png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr), + PNG_ALLOCATED) { -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ png_size_t size; png_voidp struct_ptr; if (type == PNG_STRUCT_INFO) size = png_sizeof(png_info); + else if (type == PNG_STRUCT_PNG) size = png_sizeof(png_struct); + else return (NULL); -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (malloc_fn != NULL) { png_struct dummy_struct; png_structp png_ptr = &dummy_struct; png_ptr->mem_ptr=mem_ptr; struct_ptr = (*(malloc_fn))(png_ptr, size); + if (struct_ptr != NULL) png_memset(struct_ptr, 0, size); + return (struct_ptr); } -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ -#if defined(__TURBOC__) && !defined(__FLAT__) +# if defined(__TURBOC__) && !defined(__FLAT__) struct_ptr = (png_voidp)farmalloc(size); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) +# else +# if defined(_MSC_VER) && defined(MAXSEG_64K) struct_ptr = (png_voidp)halloc(size, 1); -# else +# else struct_ptr = (png_voidp)malloc(size); -# endif -#endif +# endif +# endif + if (struct_ptr != NULL) png_memset(struct_ptr, 0, size); @@ -401,7 +428,7 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) void /* PRIVATE */ png_destroy_struct(png_voidp struct_ptr) { -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED png_destroy_struct_2(struct_ptr, NULL, NULL); } @@ -410,10 +437,10 @@ void /* PRIVATE */ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, png_voidp mem_ptr) { -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ if (struct_ptr != NULL) { -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (free_fn != NULL) { png_struct dummy_struct; @@ -422,16 +449,19 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, (*(free_fn))(png_ptr, struct_ptr); return; } -#endif /* PNG_USER_MEM_SUPPORTED */ -#if defined(__TURBOC__) && !defined(__FLAT__) +# endif /* PNG_USER_MEM_SUPPORTED */ +# if defined(__TURBOC__) && !defined(__FLAT__) farfree(struct_ptr); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) + +# else +# if defined(_MSC_VER) && defined(MAXSEG_64K) hfree(struct_ptr); -# else + +# else free(struct_ptr); -# endif -#endif + +# endif +# endif } } @@ -442,80 +472,92 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, * have the ability to do that. */ -png_voidp PNGAPI -png_calloc(png_structp png_ptr, png_alloc_size_t size) +PNG_FUNCTION(png_voidp,PNGAPI +png_calloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { png_voidp ret; ret = (png_malloc(png_ptr, size)); + if (ret != NULL) png_memset(ret,0,(png_size_t)size); + return (ret); } -png_voidp PNGAPI -png_malloc(png_structp png_ptr, png_alloc_size_t size) +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { png_voidp ret; -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (png_ptr == NULL || size == 0) return (NULL); if (png_ptr->malloc_fn != NULL) ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); + else ret = (png_malloc_default(png_ptr, size)); + if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Out of Memory"); + return (ret); } -png_voidp PNGAPI -png_malloc_default(png_structp png_ptr, png_alloc_size_t size) +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { png_voidp ret; -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ if (png_ptr == NULL || size == 0) return (NULL); -#ifdef PNG_MAX_MALLOC_64K +# ifdef PNG_MAX_MALLOC_64K if (size > (png_uint_32)65536L) { -#ifndef PNG_USER_MEM_SUPPORTED +# ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Cannot Allocate > 64K"); + else -#endif +# endif return NULL; } -#endif +# endif /* Check for overflow */ -#if defined(__TURBOC__) && !defined(__FLAT__) +# if defined(__TURBOC__) && !defined(__FLAT__) + if (size != (unsigned long)size) ret = NULL; + else ret = farmalloc(size); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) + +# else +# if defined(_MSC_VER) && defined(MAXSEG_64K) if (size != (unsigned long)size) ret = NULL; + else ret = halloc(size, 1); -# else + +# else if (size != (size_t)size) ret = NULL; + else ret = malloc((size_t)size); -# endif -#endif +# endif +# endif -#ifndef PNG_USER_MEM_SUPPORTED +# ifndef PNG_USER_MEM_SUPPORTED if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) png_error(png_ptr, "Out of Memory"); -#endif +# endif return (ret); } @@ -529,34 +571,38 @@ png_free(png_structp png_ptr, png_voidp ptr) if (png_ptr == NULL || ptr == NULL) return; -#ifdef PNG_USER_MEM_SUPPORTED +# ifdef PNG_USER_MEM_SUPPORTED if (png_ptr->free_fn != NULL) { (*(png_ptr->free_fn))(png_ptr, ptr); return; } + else png_free_default(png_ptr, ptr); } + void PNGAPI png_free_default(png_structp png_ptr, png_voidp ptr) { if (png_ptr == NULL || ptr == NULL) return; -#endif /* PNG_USER_MEM_SUPPORTED */ +# endif /* PNG_USER_MEM_SUPPORTED */ -#if defined(__TURBOC__) && !defined(__FLAT__) +# if defined(__TURBOC__) && !defined(__FLAT__) farfree(ptr); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - hfree(ptr); -# else - free(ptr); -# endif -#endif -} +# else +# if defined(_MSC_VER) && defined(MAXSEG_64K) + hfree(ptr); + +# else + free(ptr); + +# endif +# endif +} #endif /* Not Borland DOS special memory handler */ /* This function was added at libpng version 1.2.3. The png_malloc_warn() @@ -564,8 +610,8 @@ png_free_default(png_structp png_ptr, png_voidp ptr) * instead of issuing a png_error, if it fails to allocate the requested * memory. */ -png_voidp PNGAPI -png_malloc_warn(png_structp png_ptr, png_alloc_size_t size) +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc_warn,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { png_voidp ptr; png_uint_32 save_flags; @@ -601,10 +647,11 @@ png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr * pointer before png_write_destroy and png_read_destroy are called. */ png_voidp PNGAPI -png_get_mem_ptr(png_structp png_ptr) +png_get_mem_ptr(png_const_structp png_ptr) { if (png_ptr == NULL) return (NULL); + return ((png_voidp)png_ptr->mem_ptr); } #endif /* PNG_USER_MEM_SUPPORTED */ diff --git a/dll/3rdparty/libpng/pngpread.c b/dll/3rdparty/libpng/pngpread.c index 3280d34b048..5ab9007a161 100644 --- a/dll/3rdparty/libpng/pngpread.c +++ b/dll/3rdparty/libpng/pngpread.c @@ -1,8 +1,8 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.4.3 [June 26, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.2 [March 31, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,11 +11,10 @@ * and license in png.h */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED #include "pngpriv.h" +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + /* Push model modes */ #define PNG_READ_SIG_MODE 0 #define PNG_READ_CHUNK_MODE 1 @@ -29,7 +28,7 @@ void PNGAPI png_process_data(png_structp png_ptr, png_infop info_ptr, - png_bytep buffer, png_size_t buffer_size) + png_bytep buffer, png_size_t buffer_size) { if (png_ptr == NULL || info_ptr == NULL) return; @@ -42,6 +41,64 @@ png_process_data(png_structp png_ptr, png_infop info_ptr, } } +png_size_t PNGAPI +png_process_data_pause(png_structp png_ptr, int save) +{ + if (png_ptr != NULL) + { + /* It's easiest for the caller if we do the save, then the caller doesn't + * have to supply the same data again: + */ + if (save) + png_push_save_buffer(png_ptr); + else + { + /* This includes any pending saved bytes: */ + png_size_t remaining = png_ptr->buffer_size; + png_ptr->buffer_size = 0; + + /* So subtract the saved buffer size, unless all the data + * is actually 'saved', in which case we just return 0 + */ + if (png_ptr->save_buffer_size < remaining) + return remaining - png_ptr->save_buffer_size; + } + } + + return 0; +} + +png_uint_32 PNGAPI +png_process_data_skip(png_structp png_ptr) +{ + png_uint_32 remaining = 0; + + if (png_ptr != NULL && png_ptr->process_mode == PNG_SKIP_MODE && + png_ptr->skip_length > 0) + { + /* At the end of png_process_data the buffer size must be 0 (see the loop + * above) so we can detect a broken call here: + */ + if (png_ptr->buffer_size != 0) + png_error(png_ptr, + "png_process_data_skip called inside png_process_data"); + + /* If is impossible for there to be a saved buffer at this point - + * otherwise we could not be in SKIP mode. This will also happen if + * png_process_skip is called inside png_process_data (but only very + * rarely.) + */ + if (png_ptr->save_buffer_size != 0) + png_error(png_ptr, "png_process_data_skip called with saved data"); + + remaining = png_ptr->skip_length; + png_ptr->skip_length = 0; + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + } + + return remaining; +} + /* What we do with the incoming data depends on what we were previously * doing before we ran out of data... */ @@ -127,7 +184,7 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr) } png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]), - num_to_check); + num_to_check); png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check); if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) @@ -135,6 +192,7 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr) if (num_checked < 4 && png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) png_error(png_ptr, "Not a PNG file"); + else png_error(png_ptr, "PNG file corrupted by ASCII conversion"); } @@ -231,8 +289,8 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) } if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - if (png_ptr->mode & PNG_AFTER_IDAT) - png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; + if (png_ptr->mode & PNG_AFTER_IDAT) + png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) { @@ -285,7 +343,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) png_error(png_ptr, "Missing IHDR before IDAT"); else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) + !(png_ptr->mode & PNG_HAVE_PLTE)) png_error(png_ptr, "Missing PLTE before IDAT"); } } @@ -582,32 +640,45 @@ png_push_crc_finish(png_structp png_ptr) { if (png_ptr->skip_length && png_ptr->save_buffer_size) { - png_size_t save_size; + png_size_t save_size = png_ptr->save_buffer_size; + png_uint_32 skip_length = png_ptr->skip_length; + + /* We want the smaller of 'skip_length' and 'save_buffer_size', but + * they are of different types and we don't know which variable has the + * fewest bits. Carefully select the smaller and cast it to the type of + * the larger - this cannot overflow. Do not cast in the following test + * - it will break on either 16 or 64 bit platforms. + */ + if (skip_length < save_size) + save_size = (png_size_t)skip_length; - if (png_ptr->skip_length < (png_uint_32)png_ptr->save_buffer_size) - save_size = (png_size_t)png_ptr->skip_length; else - save_size = png_ptr->save_buffer_size; + skip_length = (png_uint_32)save_size; png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); - png_ptr->skip_length -= save_size; + png_ptr->skip_length -= skip_length; png_ptr->buffer_size -= save_size; png_ptr->save_buffer_size -= save_size; png_ptr->save_buffer_ptr += save_size; } if (png_ptr->skip_length && png_ptr->current_buffer_size) { - png_size_t save_size; + png_size_t save_size = png_ptr->current_buffer_size; + png_uint_32 skip_length = png_ptr->skip_length; + + /* We want the smaller of 'skip_length' and 'current_buffer_size', here, + * the same problem exists as above and the same solution. + */ + if (skip_length < save_size) + save_size = (png_size_t)skip_length; - if (png_ptr->skip_length < (png_uint_32)png_ptr->current_buffer_size) - save_size = (png_size_t)png_ptr->skip_length; else - save_size = png_ptr->current_buffer_size; + skip_length = (png_uint_32)save_size; png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); - png_ptr->skip_length -= save_size; + png_ptr->skip_length -= skip_length; png_ptr->buffer_size -= save_size; png_ptr->current_buffer_size -= save_size; png_ptr->current_buffer_ptr += save_size; @@ -625,7 +696,7 @@ png_push_crc_finish(png_structp png_ptr) } } -void PNGAPI +void PNGCBAPI png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length) { png_bytep ptr; @@ -640,6 +711,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length) if (length < png_ptr->save_buffer_size) save_size = length; + else save_size = png_ptr->save_buffer_size; @@ -680,33 +752,35 @@ png_push_save_buffer(png_structp png_ptr) istop = png_ptr->save_buffer_size; for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer; - i < istop; i++, sp++, dp++) + i < istop; i++, sp++, dp++) { *dp = *sp; } } } if (png_ptr->save_buffer_size + png_ptr->current_buffer_size > - png_ptr->save_buffer_max) + png_ptr->save_buffer_max) { png_size_t new_max; png_bytep old_buffer; if (png_ptr->save_buffer_size > PNG_SIZE_MAX - - (png_ptr->current_buffer_size + 256)) + (png_ptr->current_buffer_size + 256)) { - png_error(png_ptr, "Potential overflow of save_buffer"); + png_error(png_ptr, "Potential overflow of save_buffer"); } new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; old_buffer = png_ptr->save_buffer; png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr, - (png_size_t)new_max); + (png_size_t)new_max); + if (png_ptr->save_buffer == NULL) { - png_free(png_ptr, old_buffer); - png_error(png_ptr, "Insufficient memory for save_buffer"); + png_free(png_ptr, old_buffer); + png_error(png_ptr, "Insufficient memory for save_buffer"); } + png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); png_free(png_ptr, old_buffer); png_ptr->save_buffer_max = new_max; @@ -755,8 +829,10 @@ png_push_read_IDAT(png_structp png_ptr) if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) { png_ptr->process_mode = PNG_READ_CHUNK_MODE; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) png_error(png_ptr, "Not enough compressed data"); + return; } @@ -764,48 +840,52 @@ png_push_read_IDAT(png_structp png_ptr) } if (png_ptr->idat_size && png_ptr->save_buffer_size) { - png_size_t save_size; + png_size_t save_size = png_ptr->save_buffer_size; + png_uint_32 idat_size = png_ptr->idat_size; - if (png_ptr->idat_size < (png_uint_32)png_ptr->save_buffer_size) - { - save_size = (png_size_t)png_ptr->idat_size; + /* We want the smaller of 'idat_size' and 'current_buffer_size', but they + * are of different types and we don't know which variable has the fewest + * bits. Carefully select the smaller and cast it to the type of the + * larger - this cannot overflow. Do not cast in the following test - it + * will break on either 16 or 64 bit platforms. + */ + if (idat_size < save_size) + save_size = (png_size_t)idat_size; - /* Check for overflow */ - if ((png_uint_32)save_size != png_ptr->idat_size) - png_error(png_ptr, "save_size overflowed in pngpread"); - } else - save_size = png_ptr->save_buffer_size; + idat_size = (png_uint_32)save_size; png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); - png_ptr->idat_size -= save_size; + png_ptr->idat_size -= idat_size; png_ptr->buffer_size -= save_size; png_ptr->save_buffer_size -= save_size; png_ptr->save_buffer_ptr += save_size; } + if (png_ptr->idat_size && png_ptr->current_buffer_size) { - png_size_t save_size; + png_size_t save_size = png_ptr->current_buffer_size; + png_uint_32 idat_size = png_ptr->idat_size; - if (png_ptr->idat_size < (png_uint_32)png_ptr->current_buffer_size) - { - save_size = (png_size_t)png_ptr->idat_size; + /* We want the smaller of 'idat_size' and 'current_buffer_size', but they + * are of different types and we don't know which variable has the fewest + * bits. Carefully select the smaller and cast it to the type of the + * larger - this cannot overflow. + */ + if (idat_size < save_size) + save_size = (png_size_t)idat_size; - /* Check for overflow */ - if ((png_uint_32)save_size != png_ptr->idat_size) - png_error(png_ptr, "save_size overflowed in pngpread"); - } else - save_size = png_ptr->current_buffer_size; + idat_size = (png_uint_32)save_size; png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); - png_ptr->idat_size -= save_size; + png_ptr->idat_size -= idat_size; png_ptr->buffer_size -= save_size; png_ptr->current_buffer_size -= save_size; png_ptr->current_buffer_ptr += save_size; @@ -843,12 +923,12 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, * or the stream marked as finished. */ while (png_ptr->zstream.avail_in > 0 && - !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) + !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) { int ret; /* We have data for zlib, but we must check that zlib - * has somewhere to put the results. It doesn't matter + * has someplace to put the results. It doesn't matter * if we don't expect any results -- it may be the input * data is just the LZ end code. */ @@ -857,64 +937,67 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, png_ptr->zstream.avail_out = (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1; + png_ptr->zstream.next_out = png_ptr->row_buf; } /* Using Z_SYNC_FLUSH here means that an unterminated - * LZ stream can still be handled (a stream with a missing - * end code), otherwise (Z_NO_FLUSH) a future zlib - * implementation might defer output and, therefore, - * change the current behavior. (See comments in inflate.c - * for why this doesn't happen at present with zlib 1.2.5.) + * LZ stream (a stream with a missing end code) can still + * be handled, otherwise (Z_NO_FLUSH) a future zlib + * implementation might defer output and therefore + * change the current behavior (see comments in inflate.c + * for why this doesn't happen at present with zlib 1.2.5). */ ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH); /* Check for any failure before proceeding. */ if (ret != Z_OK && ret != Z_STREAM_END) { - /* Terminate the decompression. */ - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + /* Terminate the decompression. */ + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; /* This may be a truncated stream (missing or - * damaged end code). Treat that as a warning. - */ + * damaged end code). Treat that as a warning. + */ if (png_ptr->row_number >= png_ptr->num_rows || - png_ptr->pass > 6) - png_warning(png_ptr, "Truncated compressed data in IDAT"); - else - png_error(png_ptr, "Decompression error in IDAT"); + png_ptr->pass > 6) + png_warning(png_ptr, "Truncated compressed data in IDAT"); - /* Skip the check on unprocessed input */ + else + png_error(png_ptr, "Decompression error in IDAT"); + + /* Skip the check on unprocessed input */ return; } /* Did inflate output any data? */ if (png_ptr->zstream.next_out != png_ptr->row_buf) { - /* Is this unexpected data after the last row? - * If it is, artificially terminate the LZ output - * here. - */ + /* Is this unexpected data after the last row? + * If it is, artificially terminate the LZ output + * here. + */ if (png_ptr->row_number >= png_ptr->num_rows || - png_ptr->pass > 6) + png_ptr->pass > 6) { - /* Extra data. */ - png_warning(png_ptr, "Extra compressed data in IDAT"); + /* Extra data. */ + png_warning(png_ptr, "Extra compressed data in IDAT"); png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - /* Do no more processing; skip the unprocessed - * input check below. - */ - return; - } - /* Do we have a complete row? */ - if (png_ptr->zstream.avail_out == 0) - png_push_process_row(png_ptr); + /* Do no more processing; skip the unprocessed + * input check below. + */ + return; + } + + /* Do we have a complete row? */ + if (png_ptr->zstream.avail_out == 0) + png_push_process_row(png_ptr); } /* And check for the end of the stream. */ if (ret == Z_STREAM_END) - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; } /* All the data should have been processed, if anything @@ -922,7 +1005,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, * after the zlib end code. */ if (png_ptr->zstream.avail_in > 0) - png_warning(png_ptr, "Extra compression data"); + png_warning(png_ptr, "Extra compression data in IDAT"); } void /* PRIVATE */ @@ -943,7 +1026,7 @@ png_push_process_row(png_structp png_ptr) png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); - if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) + if (png_ptr->transformations) png_do_read_transformations(png_ptr); #ifdef PNG_READ_INTERLACING_SUPPORTED @@ -988,7 +1071,7 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass == 6 && png_ptr->height <= 4) { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1028,7 +1111,7 @@ png_push_process_row(png_structp png_ptr) for (i = 0; i < 4 && png_ptr->pass == 2; i++) { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1078,13 +1161,13 @@ png_push_process_row(png_structp png_ptr) for (i = 0; i < 2 && png_ptr->pass == 4; i++) { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } if (png_ptr->pass == 6) /* Pass 5 might be empty */ { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } @@ -1103,12 +1186,14 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass == 6) /* Skip top generated row */ { - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } break; } + + default: case 6: { png_push_have_row(png_ptr, png_ptr->row_buf + 1); @@ -1117,7 +1202,7 @@ png_push_process_row(png_structp png_ptr) if (png_ptr->pass != 6) break; - png_push_have_row(png_ptr, NULL); + png_push_have_row(png_ptr, NULL); png_read_push_finish_row(png_ptr); } } @@ -1160,15 +1245,15 @@ png_read_push_finish_row(png_structp png_ptr) if (png_ptr->interlaced) { png_ptr->row_number = 0; - png_memset(png_ptr->prev_row, 0, - png_ptr->rowbytes + 1); + png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + do { png_ptr->pass++; if ((png_ptr->pass == 1 && png_ptr->width < 5) || (png_ptr->pass == 3 && png_ptr->width < 3) || (png_ptr->pass == 5 && png_ptr->width < 2)) - png_ptr->pass++; + png_ptr->pass++; if (png_ptr->pass > 7) png_ptr->pass--; @@ -1177,17 +1262,17 @@ png_read_push_finish_row(png_structp png_ptr) break; png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; if (png_ptr->transformations & PNG_INTERLACE) break; png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0); } @@ -1197,12 +1282,13 @@ png_read_push_finish_row(png_structp png_ptr) #ifdef PNG_READ_tEXt_SUPPORTED void /* PRIVATE */ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 - length) + length) { if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) { + PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ png_error(png_ptr, "Out of place tEXt"); - info_ptr = info_ptr; /* To quiet some compiler warnings */ + /*NOT REACHED*/ } #ifdef PNG_MAX_MALLOC_64K @@ -1217,7 +1303,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 #endif png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_size_t)(length + 1)); + (png_size_t)(length + 1)); png_ptr->current_text[length] = '\0'; png_ptr->current_text_ptr = png_ptr->current_text; png_ptr->current_text_size = (png_size_t)length; @@ -1270,14 +1356,12 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) if (text < key + png_ptr->current_text_size) text++; - text_ptr = (png_textp)png_malloc(png_ptr, - png_sizeof(png_text)); + text_ptr = (png_textp)png_malloc(png_ptr, png_sizeof(png_text)); text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; text_ptr->key = key; -#ifdef PNG_iTXt_SUPPORTED + text_ptr->itxt_length = 0; text_ptr->lang = NULL; text_ptr->lang_key = NULL; -#endif text_ptr->text = text; ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); @@ -1287,7 +1371,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) png_ptr->current_text = NULL; if (ret) - png_warning(png_ptr, "Insufficient memory to store text chunk"); + png_warning(png_ptr, "Insufficient memory to store text chunk"); } } #endif @@ -1298,10 +1382,11 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) - { - png_error(png_ptr, "Out of place zTXt"); - info_ptr = info_ptr; /* To quiet some compiler warnings */ - } + { + PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ + png_error(png_ptr, "Out of place zTXt"); + /*NOT REACHED*/ + } #ifdef PNG_MAX_MALLOC_64K /* We can't handle zTXt chunks > 64K, since we don't have enough space @@ -1317,7 +1402,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 #endif png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_size_t)(length + 1)); + (png_size_t)(length + 1)); png_ptr->current_text[length] = '\0'; png_ptr->current_text_ptr = png_ptr->current_text; png_ptr->current_text_size = (png_size_t)length; @@ -1382,9 +1467,9 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) text++; - png_ptr->zstream.next_in = (png_bytep )text; + png_ptr->zstream.next_in = (png_bytep)text; png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size - - (text - key)); + (text - key)); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; @@ -1405,42 +1490,45 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) png_free(png_ptr, text); return; } + if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END) { if (text == NULL) { text = (png_charp)png_malloc(png_ptr, - (png_ptr->zbuf_size - - png_ptr->zstream.avail_out + key_size + 1)); + (png_ptr->zbuf_size + - png_ptr->zstream.avail_out + key_size + 1)); png_memcpy(text + key_size, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); + png_ptr->zbuf_size - png_ptr->zstream.avail_out); png_memcpy(text, key, key_size); text_size = key_size + png_ptr->zbuf_size - - png_ptr->zstream.avail_out; + png_ptr->zstream.avail_out; *(text + text_size) = '\0'; } + else { png_charp tmp; tmp = text; text = (png_charp)png_malloc(png_ptr, text_size + - (png_ptr->zbuf_size - - png_ptr->zstream.avail_out + 1)); + (png_ptr->zbuf_size + - png_ptr->zstream.avail_out + 1)); png_memcpy(text, tmp, text_size); png_free(png_ptr, tmp); png_memcpy(text + text_size, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); + png_ptr->zbuf_size - png_ptr->zstream.avail_out); text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; *(text + text_size) = '\0'; } + if (ret != Z_STREAM_END) { png_ptr->zstream.next_out = png_ptr->zbuf; @@ -1476,10 +1564,9 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) png_sizeof(png_text)); text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt; text_ptr->key = key; -#ifdef PNG_iTXt_SUPPORTED + text_ptr->itxt_length = 0; text_ptr->lang = NULL; text_ptr->lang_key = NULL; -#endif text_ptr->text = text; ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); @@ -1488,7 +1575,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) png_free(png_ptr, text_ptr); if (ret) - png_warning(png_ptr, "Insufficient memory to store text chunk"); + png_warning(png_ptr, "Insufficient memory to store text chunk"); } } #endif @@ -1496,13 +1583,14 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_READ_iTXt_SUPPORTED void /* PRIVATE */ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 - length) + length) { if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) - { - png_error(png_ptr, "Out of place iTXt"); - info_ptr = info_ptr; /* To quiet some compiler warnings */ - } + { + PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ + png_error(png_ptr, "Out of place iTXt"); + /*NOT REACHED*/ + } #ifdef PNG_MAX_MALLOC_64K png_ptr->skip_length = 0; /* This may not be necessary */ @@ -1516,7 +1604,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 #endif png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_size_t)(length + 1)); + (png_size_t)(length + 1)); png_ptr->current_text[length] = '\0'; png_ptr->current_text_ptr = png_ptr->current_text; png_ptr->current_text_size = (png_size_t)length; @@ -1542,6 +1630,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) png_ptr->current_text_left -= text_size; png_ptr->current_text_ptr += text_size; } + if (!(png_ptr->current_text_left)) { png_textp text_ptr; @@ -1585,15 +1674,15 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) if (lang_key < key + png_ptr->current_text_size - 1) { - for (; *text; text++) - /* Empty loop */ ; + for (; *text; text++) + /* Empty loop */ ; } if (text < key + png_ptr->current_text_size) text++; text_ptr = (png_textp)png_malloc(png_ptr, - png_sizeof(png_text)); + png_sizeof(png_text)); text_ptr->compression = comp_flag + 2; text_ptr->key = key; @@ -1620,7 +1709,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) */ void /* PRIVATE */ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 - length) + length) { png_uint_32 skip = 0; @@ -1628,15 +1717,15 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 { #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - PNG_HANDLE_CHUNK_ALWAYS + PNG_HANDLE_CHUNK_ALWAYS #ifdef PNG_READ_USER_CHUNKS_SUPPORTED - && png_ptr->read_user_chunk_fn == NULL + && png_ptr->read_user_chunk_fn == NULL #endif - ) + ) #endif png_chunk_error(png_ptr, "unknown critical chunk"); - info_ptr = info_ptr; /* To quiet some compiler warnings */ + PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ } #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED @@ -1645,16 +1734,16 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 #ifdef PNG_MAX_MALLOC_64K if (length > (png_uint_32)65535L) { - png_warning(png_ptr, "unknown chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; + png_warning(png_ptr, "unknown chunk too large to fit in memory"); + skip = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; } #endif png_memcpy((png_charp)png_ptr->unknown_chunk.name, - (png_charp)png_ptr->chunk_name, - png_sizeof(png_ptr->unknown_chunk.name)); + (png_charp)png_ptr->chunk_name, + png_sizeof(png_ptr->unknown_chunk.name)); png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name) - 1] - = '\0'; + = '\0'; png_ptr->unknown_chunk.size = (png_size_t)length; @@ -1664,7 +1753,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 else { png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, - (png_size_t)length); + (png_size_t)length); png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length); } @@ -1674,7 +1763,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 /* Callback to user unknown chunk handler */ int ret; ret = (*(png_ptr->read_user_chunk_fn)) - (png_ptr, &png_ptr->unknown_chunk); + (png_ptr, &png_ptr->unknown_chunk); if (ret < 0) png_chunk_error(png_ptr, "error in user chunk"); @@ -1683,16 +1772,16 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 { if (!(png_ptr->chunk_name[0] & 0x20)) if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - PNG_HANDLE_CHUNK_ALWAYS) + PNG_HANDLE_CHUNK_ALWAYS) png_chunk_error(png_ptr, "unknown critical chunk"); png_set_unknown_chunks(png_ptr, info_ptr, - &png_ptr->unknown_chunk, 1); + &png_ptr->unknown_chunk, 1); } } else #endif - png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1); + png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1); png_free(png_ptr, png_ptr->unknown_chunk.data); png_ptr->unknown_chunk.data = NULL; } @@ -1726,8 +1815,8 @@ png_push_have_row(png_structp png_ptr, png_bytep row) } void PNGAPI -png_progressive_combine_row (png_structp png_ptr, - png_bytep old_row, png_bytep new_row) +png_progressive_combine_row (png_structp png_ptr, png_bytep old_row, + png_const_bytep new_row) { PNG_CONST int FARDATA png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; @@ -1741,8 +1830,8 @@ png_progressive_combine_row (png_structp png_ptr, void PNGAPI png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr, - png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, - png_progressive_end_ptr end_fn) + png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, + png_progressive_end_ptr end_fn) { if (png_ptr == NULL) return; @@ -1755,7 +1844,7 @@ png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr, } png_voidp PNGAPI -png_get_progressive_ptr(png_structp png_ptr) +png_get_progressive_ptr(png_const_structp png_ptr) { if (png_ptr == NULL) return (NULL); diff --git a/dll/3rdparty/libpng/pngread.c b/dll/3rdparty/libpng/pngread.c index 92060d2bc6c..aa84001c452 100644 --- a/dll/3rdparty/libpng/pngread.c +++ b/dll/3rdparty/libpng/pngread.c @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.4.1 [February 25, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.2 [March 31, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -14,30 +14,28 @@ * read a PNG file or stream. */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_READ_SUPPORTED #include "pngpriv.h" +#ifdef PNG_READ_SUPPORTED /* Create a PNG structure for reading, and allocate any memory needed. */ -png_structp PNGAPI -png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn) +PNG_FUNCTION(png_structp,PNGAPI +png_create_read_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED) { #ifdef PNG_USER_MEM_SUPPORTED return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn, - warn_fn, NULL, NULL, NULL)); + warn_fn, NULL, NULL, NULL)); } /* Alternate create PNG structure for reading, and allocate any memory * needed. */ -png_structp PNGAPI -png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn) +PNG_FUNCTION(png_structp,PNGAPI +png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) { #endif /* PNG_USER_MEM_SUPPORTED */ @@ -49,7 +47,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; + jmp_buf png_jmpbuf; #endif #endif @@ -59,7 +57,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_USER_MEM_SUPPORTED png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, - malloc_fn, mem_ptr); + malloc_fn, mem_ptr); #else png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); #endif @@ -70,10 +68,12 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_USER_LIMITS_SUPPORTED png_ptr->user_width_max = PNG_USER_WIDTH_MAX; png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; + # ifdef PNG_USER_CHUNK_CACHE_MAX /* Added at libpng-1.2.43 and 1.4.0 */ png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; # endif + # ifdef PNG_SET_USER_CHUNK_MALLOC_MAX /* Added at libpng-1.2.43 and 1.4.1 */ png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; @@ -85,13 +85,13 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, encounter a png_error() will longjmp here. Since the jmpbuf is then meaningless we abort instead of returning. */ #ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) + if (setjmp(png_jmpbuf)) #else if (setjmp(png_jmpbuf(png_ptr))) /* Sets longjmp to match setjmp */ #endif PNG_ABORT(); #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(png_ptr), png_jmpbuf, png_sizeof(jmp_buf)); #endif #endif /* PNG_SETJMP_SUPPORTED */ @@ -104,46 +104,47 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, if (user_png_ver) { i = 0; + do { if (user_png_ver[i] != png_libpng_ver[i]) png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; } while (png_libpng_ver[i++]); - } - else - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + } + + else + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) - { - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ + if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) + { + /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so + * we must recompile any applications that use any older library version. + * For versions after libpng 1.0, we will be compatible, so we need + * only check the first digit. + */ if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || (user_png_ver[0] == '0' && user_png_ver[2] < '9')) { -#ifdef PNG_STDIO_SUPPORTED +#ifdef PNG_CONSOLE_IO_SUPPORTED char msg[80]; if (user_png_ver) { - png_snprintf(msg, 80, - "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); + png_snprintf2(msg, 80, + "Application built with libpng-%.20s" + " but running with %.20s", + user_png_ver, + png_libpng_ver); + png_warning(png_ptr, msg); } - png_snprintf(msg, 80, - "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); +#else + png_warning(png_ptr, + "Incompatible libpng version in application and library"); #endif #ifdef PNG_ERROR_NUMBERS_SUPPORTED png_ptr->flags = 0; #endif - png_warning(png_ptr, - "Incompatible libpng version in application and library"); png_cleanup_needed = 1; } @@ -153,11 +154,12 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, { /* Initialize zbuf - compression buffer */ png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, - png_ptr->zbuf_size); + png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, png_ptr->zbuf_size); + if (png_ptr->zbuf == NULL) - png_cleanup_needed = 1; + png_cleanup_needed = 1; } + png_ptr->zstream.zalloc = png_zalloc; png_ptr->zstream.zfree = png_zfree; png_ptr->zstream.opaque = (voidpf)png_ptr; @@ -166,12 +168,24 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, { switch (inflateInit(&png_ptr->zstream)) { - case Z_OK: /* Do nothing */ break; + case Z_OK: + break; /* Do nothing */ + case Z_MEM_ERROR: - case Z_STREAM_ERROR: png_warning(png_ptr, "zlib memory error"); - png_cleanup_needed = 1; break; - case Z_VERSION_ERROR: png_warning(png_ptr, "zlib version error"); - png_cleanup_needed = 1; break; + png_warning(png_ptr, "zlib memory error"); + png_cleanup_needed = 1; + break; + + case Z_STREAM_ERROR: + png_warning(png_ptr, "zlib stream error"); + png_cleanup_needed = 1; + break; + + case Z_VERSION_ERROR: + png_warning(png_ptr, "zlib version error"); + png_cleanup_needed = 1; + break; + default: png_warning(png_ptr, "Unknown zlib error"); png_cleanup_needed = 1; } @@ -184,7 +198,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_ptr->zbuf = NULL; #ifdef PNG_USER_MEM_SUPPORTED png_destroy_struct_2((png_voidp)png_ptr, - (png_free_ptr)free_fn, (png_voidp)mem_ptr); + (png_free_ptr)free_fn, (png_voidp)mem_ptr); #else png_destroy_struct((png_voidp)png_ptr); #endif @@ -214,34 +228,12 @@ void PNGAPI png_read_info(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_read_info"); - + if (png_ptr == NULL || info_ptr == NULL) return; - - /* If we haven't checked all of the PNG signature bytes, do so now. */ - if (png_ptr->sig_bytes < 8) - { - png_size_t num_checked = png_ptr->sig_bytes, - num_to_check = 8 - num_checked; -#ifdef PNG_IO_STATE_SUPPORTED - png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE; -#endif - - png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); - png_ptr->sig_bytes = 8; - - if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) - { - if (num_checked < 4 && - png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) - png_error(png_ptr, "Not a PNG file"); - else - png_error(png_ptr, "PNG file corrupted by ASCII conversion"); - } - if (num_checked < 3) - png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; - } + /* Read and check the PNG file signature. */ + png_read_sig(png_ptr, info_ptr); for (;;) { @@ -307,114 +299,141 @@ png_read_info(png_structp png_ptr, png_infop info_ptr) * matching the chunk name rather than a linear search. */ if (!png_memcmp(chunk_name, png_IDAT, 4)) - if (png_ptr->mode & PNG_AFTER_IDAT) - png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; + if (png_ptr->mode & PNG_AFTER_IDAT) + png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; if (!png_memcmp(chunk_name, png_IHDR, 4)) png_handle_IHDR(png_ptr, info_ptr, length); + else if (!png_memcmp(chunk_name, png_IEND, 4)) png_handle_IEND(png_ptr, info_ptr, length); + #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED else if (png_handle_as_unknown(png_ptr, chunk_name)) { if (!png_memcmp(chunk_name, png_IDAT, 4)) png_ptr->mode |= PNG_HAVE_IDAT; + png_handle_unknown(png_ptr, info_ptr, length); + if (!png_memcmp(chunk_name, png_PLTE, 4)) png_ptr->mode |= PNG_HAVE_PLTE; + else if (!png_memcmp(chunk_name, png_IDAT, 4)) { if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before IDAT"); + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) + !(png_ptr->mode & PNG_HAVE_PLTE)) png_error(png_ptr, "Missing PLTE before IDAT"); + break; } } #endif else if (!png_memcmp(chunk_name, png_PLTE, 4)) png_handle_PLTE(png_ptr, info_ptr, length); + else if (!png_memcmp(chunk_name, png_IDAT, 4)) { if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before IDAT"); + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) + !(png_ptr->mode & PNG_HAVE_PLTE)) png_error(png_ptr, "Missing PLTE before IDAT"); png_ptr->idat_size = length; png_ptr->mode |= PNG_HAVE_IDAT; break; } + #ifdef PNG_READ_bKGD_SUPPORTED else if (!png_memcmp(chunk_name, png_bKGD, 4)) png_handle_bKGD(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_cHRM_SUPPORTED else if (!png_memcmp(chunk_name, png_cHRM, 4)) png_handle_cHRM(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_gAMA_SUPPORTED else if (!png_memcmp(chunk_name, png_gAMA, 4)) png_handle_gAMA(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_hIST_SUPPORTED else if (!png_memcmp(chunk_name, png_hIST, 4)) png_handle_hIST(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_oFFs_SUPPORTED else if (!png_memcmp(chunk_name, png_oFFs, 4)) png_handle_oFFs(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_pCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_pCAL, 4)) png_handle_pCAL(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_sCAL, 4)) png_handle_sCAL(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_pHYs_SUPPORTED else if (!png_memcmp(chunk_name, png_pHYs, 4)) png_handle_pHYs(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sBIT_SUPPORTED else if (!png_memcmp(chunk_name, png_sBIT, 4)) png_handle_sBIT(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sRGB_SUPPORTED else if (!png_memcmp(chunk_name, png_sRGB, 4)) png_handle_sRGB(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_iCCP_SUPPORTED else if (!png_memcmp(chunk_name, png_iCCP, 4)) png_handle_iCCP(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sPLT_SUPPORTED else if (!png_memcmp(chunk_name, png_sPLT, 4)) png_handle_sPLT(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_tEXt_SUPPORTED else if (!png_memcmp(chunk_name, png_tEXt, 4)) png_handle_tEXt(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_tIME_SUPPORTED else if (!png_memcmp(chunk_name, png_tIME, 4)) png_handle_tIME(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_tRNS_SUPPORTED else if (!png_memcmp(chunk_name, png_tRNS, 4)) png_handle_tRNS(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_zTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_zTXt, 4)) png_handle_zTXt(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_iTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_iTXt, 4)) png_handle_iTXt(png_ptr, info_ptr, length); #endif + else png_handle_unknown(png_ptr, info_ptr, length); } @@ -426,14 +445,17 @@ void PNGAPI png_read_update_info(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_read_update_info"); - + if (png_ptr == NULL) return; + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) png_read_start_row(png_ptr); + else png_warning(png_ptr, - "Ignoring extra png_read_update_info() call; row buffer not reallocated"); + "Ignoring extra png_read_update_info() call;" + " row buffer not reallocated"); png_read_transform_info(png_ptr, info_ptr); } @@ -448,11 +470,16 @@ void PNGAPI png_start_read_image(png_structp png_ptr) { png_debug(1, "in png_start_read_image"); - + if (png_ptr == NULL) return; + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) png_read_start_row(png_ptr); + else + png_warning(png_ptr, + "Ignoring extra png_start_read_image() call;" + " row buffer not reallocated"); } #endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ @@ -461,19 +488,22 @@ void PNGAPI png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) { PNG_IDAT; +#ifdef PNG_READ_INTERLACING_SUPPORTED PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, - 0xff}; + 0xff}; PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; +#endif int ret; - + if (png_ptr == NULL) return; - + png_debug2(1, "in png_read_row (row %lu, pass %d)", - (unsigned long) png_ptr->row_number, png_ptr->pass); + (unsigned long)png_ptr->row_number, png_ptr->pass); if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) png_read_start_row(png_ptr); + if (png_ptr->row_number == 0 && png_ptr->pass == 0) { /* Check for transforms that have been set but were defined out */ @@ -481,27 +511,33 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) if (png_ptr->transformations & PNG_INVERT_MONO) png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined"); #endif + #if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined"); #endif + #if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ !defined(PNG_READ_PACKSWAP_SUPPORTED) if (png_ptr->transformations & PNG_PACKSWAP) png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined"); #endif + #if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) if (png_ptr->transformations & PNG_PACK) png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined"); #endif + #if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) if (png_ptr->transformations & PNG_SHIFT) png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined"); #endif + #if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED) if (png_ptr->transformations & PNG_BGR) png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined"); #endif + #if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED) if (png_ptr->transformations & PNG_SWAP_BYTES) png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined"); @@ -524,42 +560,50 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) return; } break; + case 1: if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) { if (dsp_row != NULL) png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); return; } break; + case 2: if ((png_ptr->row_number & 0x07) != 4) { if (dsp_row != NULL && (png_ptr->row_number & 4)) png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); return; } break; + case 3: if ((png_ptr->row_number & 3) || png_ptr->width < 3) { if (dsp_row != NULL) png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); return; } break; + case 4: if ((png_ptr->row_number & 3) != 2) { if (dsp_row != NULL && (png_ptr->row_number & 2)) png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); return; } @@ -569,11 +613,14 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) { if (dsp_row != NULL) png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); return; } break; + + default: case 6: if (!(png_ptr->row_number & 1)) { @@ -592,6 +639,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) png_ptr->zstream.avail_out = (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); + do { if (!(png_ptr->zstream.avail_in)) @@ -609,10 +657,12 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) if (png_ptr->zbuf_size > png_ptr->idat_size) png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; png_crc_read(png_ptr, png_ptr->zbuf, - (png_size_t)png_ptr->zstream.avail_in); + (png_size_t)png_ptr->zstream.avail_in); png_ptr->idat_size -= png_ptr->zstream.avail_in; } + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret == Z_STREAM_END) { if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in || @@ -622,9 +672,10 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; break; } + if (ret != Z_OK) png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression error"); + "Decompression error"); } while (png_ptr->zstream.avail_out); @@ -638,14 +689,14 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) if (png_ptr->row_buf[0]) png_read_filter_row(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->prev_row + 1, - (int)(png_ptr->row_buf[0])); + png_ptr->row_buf + 1, png_ptr->prev_row + 1, + (int)(png_ptr->row_buf[0])); png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); #ifdef PNG_MNG_FEATURES_SUPPORTED if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) { /* Intrapixel differencing */ png_do_read_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1); @@ -653,7 +704,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) #endif - if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) + if (png_ptr->transformations) png_do_read_transformations(png_ptr); #ifdef PNG_READ_INTERLACING_SUPPORTED @@ -669,17 +720,18 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) png_do_read_interlace(png_ptr); if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); + png_combine_row(png_ptr, dsp_row, png_pass_dsp_mask[png_ptr->pass]); + if (row != NULL) - png_combine_row(png_ptr, row, - png_pass_mask[png_ptr->pass]); + png_combine_row(png_ptr, row, png_pass_mask[png_ptr->pass]); } + else #endif { if (row != NULL) png_combine_row(png_ptr, row, 0xff); + if (dsp_row != NULL) png_combine_row(png_ptr, dsp_row, 0xff); } @@ -717,16 +769,17 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) void PNGAPI png_read_rows(png_structp png_ptr, png_bytepp row, - png_bytepp display_row, png_uint_32 num_rows) + png_bytepp display_row, png_uint_32 num_rows) { png_uint_32 i; png_bytepp rp; png_bytepp dp; png_debug(1, "in png_read_rows"); - + if (png_ptr == NULL) return; + rp = row; dp = display_row; if (rp != NULL && dp != NULL) @@ -737,6 +790,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row, png_read_row(png_ptr, rptr, dptr); } + else if (rp != NULL) for (i = 0; i < num_rows; i++) { @@ -744,6 +798,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row, png_read_row(png_ptr, rptr, NULL); rp++; } + else if (dp != NULL) for (i = 0; i < num_rows; i++) { @@ -775,22 +830,45 @@ png_read_image(png_structp png_ptr, png_bytepp image) png_bytepp rp; png_debug(1, "in png_read_image"); - + if (png_ptr == NULL) return; #ifdef PNG_READ_INTERLACING_SUPPORTED - pass = png_set_interlace_handling(png_ptr); + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) + { + pass = png_set_interlace_handling(png_ptr); + /* And make sure transforms are initialized. */ + png_start_read_image(png_ptr); + } + else + { + if (png_ptr->interlaced && !(png_ptr->transformations & PNG_INTERLACE)) + { + /* Caller called png_start_read_image or png_read_update_info without + * first turning on the PNG_INTERLACE transform. We can fix this here, + * but the caller should do it! + */ + png_warning(png_ptr, "Interlace handling should be turned on when " + "using png_read_image"); + /* Make sure this is set correctly */ + png_ptr->num_rows = png_ptr->height; + } + + /* Obtain the pass number, which also turns on the PNG_INTERLACE flag in + * the above error case. + */ + pass = png_set_interlace_handling(png_ptr); + } #else if (png_ptr->interlaced) png_error(png_ptr, - "Cannot read interlaced image -- interlace handler disabled"); + "Cannot read interlaced image -- interlace handler disabled"); + pass = 1; #endif - image_height=png_ptr->height; - png_ptr->num_rows = image_height; /* Make sure this is set correctly */ for (j = 0; j < pass; j++) { @@ -813,9 +891,10 @@ void PNGAPI png_read_end(png_structp png_ptr, png_infop info_ptr) { png_debug(1, "in png_read_end"); - + if (png_ptr == NULL) return; + png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */ do @@ -880,8 +959,10 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) if (!png_memcmp(chunk_name, png_IHDR, 4)) png_handle_IHDR(png_ptr, info_ptr, length); + else if (!png_memcmp(chunk_name, png_IEND, 4)) png_handle_IEND(png_ptr, info_ptr, length); + #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED else if (png_handle_as_unknown(png_ptr, chunk_name)) { @@ -895,6 +976,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) png_ptr->mode |= PNG_HAVE_PLTE; } #endif + else if (!png_memcmp(chunk_name, png_IDAT, 4)) { /* Zero length IDATs are legal after the last IDAT has been @@ -902,78 +984,97 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) */ if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) png_benign_error(png_ptr, "Too many IDATs found"); + png_crc_finish(png_ptr, length); } else if (!png_memcmp(chunk_name, png_PLTE, 4)) png_handle_PLTE(png_ptr, info_ptr, length); + #ifdef PNG_READ_bKGD_SUPPORTED else if (!png_memcmp(chunk_name, png_bKGD, 4)) png_handle_bKGD(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_cHRM_SUPPORTED else if (!png_memcmp(chunk_name, png_cHRM, 4)) png_handle_cHRM(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_gAMA_SUPPORTED else if (!png_memcmp(chunk_name, png_gAMA, 4)) png_handle_gAMA(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_hIST_SUPPORTED else if (!png_memcmp(chunk_name, png_hIST, 4)) png_handle_hIST(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_oFFs_SUPPORTED else if (!png_memcmp(chunk_name, png_oFFs, 4)) png_handle_oFFs(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_pCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_pCAL, 4)) png_handle_pCAL(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sCAL_SUPPORTED else if (!png_memcmp(chunk_name, png_sCAL, 4)) png_handle_sCAL(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_pHYs_SUPPORTED else if (!png_memcmp(chunk_name, png_pHYs, 4)) png_handle_pHYs(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sBIT_SUPPORTED else if (!png_memcmp(chunk_name, png_sBIT, 4)) png_handle_sBIT(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sRGB_SUPPORTED else if (!png_memcmp(chunk_name, png_sRGB, 4)) png_handle_sRGB(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_iCCP_SUPPORTED else if (!png_memcmp(chunk_name, png_iCCP, 4)) png_handle_iCCP(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_sPLT_SUPPORTED else if (!png_memcmp(chunk_name, png_sPLT, 4)) png_handle_sPLT(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_tEXt_SUPPORTED else if (!png_memcmp(chunk_name, png_tEXt, 4)) png_handle_tEXt(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_tIME_SUPPORTED else if (!png_memcmp(chunk_name, png_tIME, 4)) png_handle_tIME(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_tRNS_SUPPORTED else if (!png_memcmp(chunk_name, png_tRNS, 4)) png_handle_tRNS(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_zTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_zTXt, 4)) png_handle_zTXt(png_ptr, info_ptr, length); #endif + #ifdef PNG_READ_iTXt_SUPPORTED else if (!png_memcmp(chunk_name, png_iTXt, 4)) png_handle_iTXt(png_ptr, info_ptr, length); #endif + else png_handle_unknown(png_ptr, info_ptr, length); } while (!(png_ptr->mode & PNG_HAVE_IEND)); @@ -983,7 +1084,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) /* Free all memory used by the read */ void PNGAPI png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, - png_infopp end_info_ptr_ptr) + png_infopp end_info_ptr_ptr) { png_structp png_ptr = NULL; png_infop info_ptr = NULL, end_info_ptr = NULL; @@ -993,7 +1094,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, #endif png_debug(1, "in png_destroy_read_struct"); - + if (png_ptr_ptr != NULL) png_ptr = *png_ptr_ptr; if (png_ptr == NULL) @@ -1034,7 +1135,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, #endif #ifdef PNG_USER_MEM_SUPPORTED png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); + (png_voidp)mem_ptr); #else png_destroy_struct((png_voidp)end_info_ptr); #endif @@ -1069,7 +1170,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, #endif png_debug(1, "in png_read_destroy"); - + if (info_ptr != NULL) png_info_destroy(png_ptr, info_ptr); @@ -1080,31 +1181,38 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_free(png_ptr, png_ptr->big_row_buf); png_free(png_ptr, png_ptr->prev_row); png_free(png_ptr, png_ptr->chunkdata); + #ifdef PNG_READ_QUANTIZE_SUPPORTED png_free(png_ptr, png_ptr->palette_lookup); png_free(png_ptr, png_ptr->quantize_index); #endif + #ifdef PNG_READ_GAMMA_SUPPORTED png_free(png_ptr, png_ptr->gamma_table); #endif + #ifdef PNG_READ_BACKGROUND_SUPPORTED png_free(png_ptr, png_ptr->gamma_from_1); png_free(png_ptr, png_ptr->gamma_to_1); #endif + if (png_ptr->free_me & PNG_FREE_PLTE) png_zfree(png_ptr, png_ptr->palette); png_ptr->free_me &= ~PNG_FREE_PLTE; + #if defined(PNG_tRNS_SUPPORTED) || \ defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) if (png_ptr->free_me & PNG_FREE_TRNS) png_free(png_ptr, png_ptr->trans_alpha); png_ptr->free_me &= ~PNG_FREE_TRNS; #endif + #ifdef PNG_READ_hIST_SUPPORTED if (png_ptr->free_me & PNG_FREE_HIST) png_free(png_ptr, png_ptr->hist); png_ptr->free_me &= ~PNG_FREE_HIST; #endif + #ifdef PNG_READ_GAMMA_SUPPORTED if (png_ptr->gamma_16_table != NULL) { @@ -1116,6 +1224,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, } png_free(png_ptr, png_ptr->gamma_16_table); } + #ifdef PNG_READ_BACKGROUND_SUPPORTED if (png_ptr->gamma_16_from_1 != NULL) { @@ -1139,11 +1248,13 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, } #endif #endif + #ifdef PNG_TIME_RFC1123_SUPPORTED png_free(png_ptr, png_ptr->time_buffer); #endif inflateEnd(&png_ptr->zstream); + #ifdef PNG_PROGRESSIVE_READ_SUPPORTED png_free(png_ptr, png_ptr->save_buffer); #endif @@ -1158,7 +1269,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, * being used again. */ #ifdef PNG_SETJMP_SUPPORTED - png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(tmp_jmp, png_ptr->png_jmpbuf, png_sizeof(jmp_buf)); #endif error_fn = png_ptr->error_fn; @@ -1178,7 +1289,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, #endif #ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); + png_memcpy(png_ptr->png_jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); #endif } @@ -1188,6 +1299,7 @@ png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn) { if (png_ptr == NULL) return; + png_ptr->read_row_fn = read_row_fn; } @@ -1201,7 +1313,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, { int row; - if (png_ptr == NULL) + if (png_ptr == NULL || info_ptr == NULL) return; /* png_read_info() gives us all of the information from the @@ -1283,44 +1395,44 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, #endif #ifdef PNG_READ_BGR_SUPPORTED - /* Flip the RGB pixels to BGR (or RGBA to BGRA) - */ + /* Flip the RGB pixels to BGR (or RGBA to BGRA) */ if (transforms & PNG_TRANSFORM_BGR) png_set_bgr(png_ptr); #endif #ifdef PNG_READ_SWAP_ALPHA_SUPPORTED - /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) - */ + /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ if (transforms & PNG_TRANSFORM_SWAP_ALPHA) - png_set_swap_alpha(png_ptr); + png_set_swap_alpha(png_ptr); #endif #ifdef PNG_READ_SWAP_SUPPORTED - /* Swap bytes of 16 bit files to least significant byte first - */ + /* Swap bytes of 16 bit files to least significant byte first */ if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) png_set_swap(png_ptr); #endif /* Added at libpng-1.2.41 */ #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED - /* Invert the alpha channel from opacity to transparency - */ + /* Invert the alpha channel from opacity to transparency */ if (transforms & PNG_TRANSFORM_INVERT_ALPHA) - png_set_invert_alpha(png_ptr); + png_set_invert_alpha(png_ptr); #endif /* Added at libpng-1.2.41 */ #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED - /* Expand grayscale image to RGB - */ + /* Expand grayscale image to RGB */ if (transforms & PNG_TRANSFORM_GRAY_TO_RGB) - png_set_gray_to_rgb(png_ptr); + png_set_gray_to_rgb(png_ptr); #endif /* We don't handle adding filler bytes */ + /* We use png_read_image and rely on that for interlace handling, but we also + * call png_read_update_info therefore must turn on interlace handling now: + */ + (void)png_set_interlace_handling(png_ptr); + /* Optional call to gamma correct and add the background to the palette * and update info structure. REQUIRED if you are expecting libpng to * update the palette for you (i.e., you selected such a transform above). @@ -1332,10 +1444,10 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); if (info_ptr->row_pointers == NULL) { - png_uint_32 iptr; + png_uint_32 iptr; info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr, - info_ptr->height * png_sizeof(png_bytep)); + info_ptr->height * png_sizeof(png_bytep)); for (iptr=0; iptrheight; iptr++) info_ptr->row_pointers[iptr] = NULL; @@ -1352,8 +1464,8 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, /* Read rest of file, and get additional chunks in info_ptr - REQUIRED */ png_read_end(png_ptr, info_ptr); - transforms = transforms; /* Quiet compiler warnings */ - params = params; + PNG_UNUSED(transforms) /* Quiet compiler warnings */ + PNG_UNUSED(params) } #endif /* PNG_INFO_IMAGE_SUPPORTED */ diff --git a/dll/3rdparty/libpng/pngrio.c b/dll/3rdparty/libpng/pngrio.c index 59059caf692..e9c381c5ba4 100644 --- a/dll/3rdparty/libpng/pngrio.c +++ b/dll/3rdparty/libpng/pngrio.c @@ -1,8 +1,8 @@ /* pngrio.c - functions for data input * - * Last changed in libpng 1.4.1 [February 25, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.0 [January 6, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -18,11 +18,10 @@ * libpng use it at run time with png_set_read_fn(...). */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_READ_SUPPORTED #include "pngpriv.h" +#ifdef PNG_READ_SUPPORTED + /* Read the data from whatever input you are using. The default routine * reads from a file pointer. Note that this routine sometimes gets called * with very small lengths, so you should implement some kind of simple @@ -33,9 +32,10 @@ void /* PRIVATE */ png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_debug1(4, "reading %d bytes", (int)length); - + if (png_ptr->read_data_fn != NULL) (*(png_ptr->read_data_fn))(png_ptr, data, length); + else png_error(png_ptr, "Call to NULL read function"); } @@ -46,14 +46,15 @@ png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) * read_data function and use it at run time with png_set_read_fn(), rather * than changing the library. */ -#ifndef USE_FAR_KEYWORD -void PNGAPI +# ifndef USE_FAR_KEYWORD +void PNGCBAPI png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check; if (png_ptr == NULL) return; + /* fread() returns 0 on error, so it is OK to store this in a png_size_t * instead of an int, which is what fread() actually returns. */ @@ -62,7 +63,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) if (check != length) png_error(png_ptr, "Read Error"); } -#else +# else /* This is the model-independent version. Since the standard I/O library can't handle far buffers in the medium and small models, we have to copy the data. @@ -71,7 +72,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) #define NEAR_BUF_SIZE 1024 #define MIN(a,b) (a <= b ? a : b) -static void PNGAPI +static void PNGCBAPI png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check; @@ -80,46 +81,57 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) if (png_ptr == NULL) return; + /* Check if data really is near. If so, use usual code. */ n_data = (png_byte *)CVT_PTR_NOCHECK(data); io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + if ((png_bytep)n_data == data) { check = fread(n_data, 1, length, io_ptr); } + else { png_byte buf[NEAR_BUF_SIZE]; png_size_t read, remaining, err; check = 0; remaining = length; + do { read = MIN(NEAR_BUF_SIZE, remaining); err = fread(buf, 1, read, io_ptr); png_memcpy(data, buf, read); /* copy far buffer to near buffer */ + if (err != read) break; + else check += err; + data += read; remaining -= read; } while (remaining != 0); } + if ((png_uint_32)check != (png_uint_32)length) png_error(png_ptr, "read Error"); } -#endif +# endif #endif /* This function allows the application to supply a new input function * for libpng if standard C streams aren't being used. * * This function takes as its arguments: + * * png_ptr - pointer to a png input data structure + * * io_ptr - pointer to user supplied structure containing info about * the input functions. May be NULL. + * * read_data_fn - pointer to a new input function that takes as its * arguments a pointer to a png_struct, a pointer to * a location where input data can be stored, and a 32-bit @@ -135,11 +147,13 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, { if (png_ptr == NULL) return; + png_ptr->io_ptr = io_ptr; #ifdef PNG_STDIO_SUPPORTED if (read_data_fn != NULL) png_ptr->read_data_fn = read_data_fn; + else png_ptr->read_data_fn = png_default_read_data; #else @@ -151,9 +165,8 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, { png_ptr->write_data_fn = NULL; png_warning(png_ptr, - "It's an error to set both read_data_fn and write_data_fn in the "); - png_warning(png_ptr, - "same structure. Resetting write_data_fn to NULL"); + "Can't set both read_data_fn and write_data_fn in the" + " same structure"); } #ifdef PNG_WRITE_FLUSH_SUPPORTED diff --git a/dll/3rdparty/libpng/pngrtran.c b/dll/3rdparty/libpng/pngrtran.c index b5e8f1a26f2..de5871add02 100644 --- a/dll/3rdparty/libpng/pngrtran.c +++ b/dll/3rdparty/libpng/pngrtran.c @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.4.2 [May 6, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.2 [March 31, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,17 +16,16 @@ * in pngtrans.c. */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_READ_SUPPORTED #include "pngpriv.h" +#ifdef PNG_READ_SUPPORTED + /* Set the action on getting a CRC error for an ancillary or critical chunk. */ void PNGAPI png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) { png_debug(1, "in png_set_crc_action"); - + if (png_ptr == NULL) return; @@ -89,18 +88,18 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) } } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ - defined(PNG_FLOATING_POINT_SUPPORTED) +#ifdef PNG_READ_BACKGROUND_SUPPORTED /* Handle alpha and tRNS via a background color */ -void PNGAPI -png_set_background(png_structp png_ptr, - png_color_16p background_color, int background_gamma_code, - int need_expand, double background_gamma) +void PNGFAPI +png_set_background_fixed(png_structp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma) { - png_debug(1, "in png_set_background"); - + png_debug(1, "in png_set_background_fixed"); + if (png_ptr == NULL) return; + if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN) { png_warning(png_ptr, "Application must supply a known background gamma"); @@ -110,11 +109,22 @@ png_set_background(png_structp png_ptr, png_ptr->transformations |= PNG_BACKGROUND; png_memcpy(&(png_ptr->background), background_color, png_sizeof(png_color_16)); - png_ptr->background_gamma = (float)background_gamma; + png_ptr->background_gamma = background_gamma; png_ptr->background_gamma_type = (png_byte)(background_gamma_code); png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0); } -#endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_background(png_structp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma) +{ + png_set_background_fixed(png_ptr, background_color, background_gamma_code, + need_expand, png_fixed(png_ptr, background_gamma, "png_set_background")); +} +# endif /* FLOATING_POINT */ +#endif /* READ_BACKGROUND */ #ifdef PNG_READ_16_TO_8_SUPPORTED /* Strip 16 bit depth files to 8 bit depth */ @@ -125,7 +135,9 @@ png_set_strip_16(png_structp png_ptr) if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_16_TO_8; + png_ptr->transformations &= ~PNG_EXPAND_16; } #endif @@ -137,17 +149,18 @@ png_set_strip_alpha(png_structp png_ptr) if (png_ptr == NULL) return; - png_ptr->flags |= PNG_FLAG_STRIP_ALPHA; + + png_ptr->transformations |= PNG_STRIP_ALPHA; } #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED -/* Quantize file to 8 bit. Supply a palette, the current number +/* Dither file to 8 bit. Supply a palette, the current number * of elements in the palette, the maximum number of elements * allowed, and a histogram if possible. If the current number * of colors is greater then the maximum number, the palette will be * modified to fit in the maximum number. "full_quantize" indicates - * whether we need a quantizeing cube set up for RGB images, or if we + * whether we need a quantizing cube set up for RGB images, or if we * simply are reducing the number of colors in a paletted image. */ @@ -162,13 +175,14 @@ typedef png_dsort FAR * FAR * png_dsortpp; void PNGAPI png_set_quantize(png_structp png_ptr, png_colorp palette, - int num_palette, int maximum_colors, png_uint_16p histogram, - int full_quantize) + int num_palette, int maximum_colors, png_const_uint_16p histogram, + int full_quantize) { png_debug(1, "in png_set_quantize"); if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_QUANTIZE; if (!full_quantize) @@ -176,7 +190,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, int i; png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * png_sizeof(png_byte))); + (png_uint_32)(num_palette * png_sizeof(png_byte))); for (i = 0; i < num_palette; i++) png_ptr->quantize_index[i] = (png_byte)i; } @@ -193,7 +207,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, /* Initialize an array to sort colors */ png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * png_sizeof(png_byte))); + (png_uint_32)(num_palette * png_sizeof(png_byte))); /* Initialize the quantize_sort array */ for (i = 0; i < num_palette; i++) @@ -225,6 +239,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, done = 0; } } + if (done) break; } @@ -244,6 +259,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, do j--; while ((int)png_ptr->quantize_sort[j] >= maximum_colors); + palette[i] = palette[j]; } } @@ -325,9 +341,9 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, /* Initialize palette index arrays */ png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * png_sizeof(png_byte))); + (png_uint_32)(num_palette * png_sizeof(png_byte))); png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * png_sizeof(png_byte))); + (png_uint_32)(num_palette * png_sizeof(png_byte))); /* Initialize the sort array */ for (i = 0; i < num_palette; i++) @@ -337,7 +353,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, } hash = (png_dsortpp)png_calloc(png_ptr, (png_uint_32)(769 * - png_sizeof(png_dsortp))); + png_sizeof(png_dsortp))); num_new_palette = num_palette; @@ -368,8 +384,10 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, t = (png_dsortp)png_malloc_warn(png_ptr, (png_uint_32)(png_sizeof(png_dsort))); + if (t == NULL) break; + t->next = hash[d]; t->left = (png_byte)i; t->right = (png_byte)j; @@ -390,9 +408,9 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, for (p = hash[i]; p; p = p->next) { if ((int)png_ptr->index_to_palette[p->left] - < num_new_palette && - (int)png_ptr->index_to_palette[p->right] - < num_new_palette) + < num_new_palette && + (int)png_ptr->index_to_palette[p->right] + < num_new_palette) { int j, next_j; @@ -409,7 +427,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, num_new_palette--; palette[png_ptr->index_to_palette[j]] - = palette[num_new_palette]; + = palette[num_new_palette]; if (!full_quantize) { int k; @@ -417,23 +435,26 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, for (k = 0; k < num_palette; k++) { if (png_ptr->quantize_index[k] == - png_ptr->index_to_palette[j]) + png_ptr->index_to_palette[j]) png_ptr->quantize_index[k] = - png_ptr->index_to_palette[next_j]; + png_ptr->index_to_palette[next_j]; + if ((int)png_ptr->quantize_index[k] == - num_new_palette) + num_new_palette) png_ptr->quantize_index[k] = - png_ptr->index_to_palette[j]; + png_ptr->index_to_palette[j]; } } png_ptr->index_to_palette[png_ptr->palette_to_index - [num_new_palette]] = png_ptr->index_to_palette[j]; + [num_new_palette]] = png_ptr->index_to_palette[j]; + png_ptr->palette_to_index[png_ptr->index_to_palette[j]] - = png_ptr->palette_to_index[num_new_palette]; + = png_ptr->palette_to_index[num_new_palette]; png_ptr->index_to_palette[j] = (png_byte)num_new_palette; + png_ptr->palette_to_index[num_new_palette] = (png_byte)j; } @@ -480,17 +501,18 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, int i; png_bytep distance; int total_bits = PNG_QUANTIZE_RED_BITS + PNG_QUANTIZE_GREEN_BITS + - PNG_QUANTIZE_BLUE_BITS; + PNG_QUANTIZE_BLUE_BITS; int num_red = (1 << PNG_QUANTIZE_RED_BITS); int num_green = (1 << PNG_QUANTIZE_GREEN_BITS); int num_blue = (1 << PNG_QUANTIZE_BLUE_BITS); png_size_t num_entries = ((png_size_t)1 << total_bits); - png_ptr->palette_lookup = (png_bytep )png_calloc(png_ptr, - (png_uint_32)(num_entries * png_sizeof(png_byte))); + png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr, + (png_uint_32)(num_entries * png_sizeof(png_byte))); distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries * - png_sizeof(png_byte))); + png_sizeof(png_byte))); + png_memset(distance, 0xff, num_entries * png_sizeof(png_byte)); for (i = 0; i < num_palette; i++) @@ -538,7 +560,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, } #endif /* PNG_READ_QUANTIZE_SUPPORTED */ -#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED /* Transform the image from the file_gamma to the screen_gamma. We * only do transformations on images where the file_gamma and screen_gamma * are not close reciprocals, otherwise it slows things down slightly, and @@ -548,22 +570,48 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, * are present in the tRNS array for palette images. We can't do it here * because we don't necessarily have the tRNS chunk yet. */ -void PNGAPI -png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) +static int /* PRIVATE */ +png_gamma_threshold(png_fixed_point scrn_gamma, png_fixed_point file_gamma) { - png_debug(1, "in png_set_gamma"); + /* PNG_GAMMA_THRESHOLD is the threshold for performing gamma + * correction as a difference of the overall transform from 1.0 + * + * We want to compare the threshold with s*f - 1, if we get + * overflow here it is because of wacky gamma values so we + * turn on processing anyway. + */ + png_fixed_point gtest; + return !png_muldiv(>est, scrn_gamma, file_gamma, PNG_FP_1) || + png_gamma_significant(gtest); +} + +void PNGFAPI +png_set_gamma_fixed(png_structp png_ptr, png_fixed_point scrn_gamma, + png_fixed_point file_gamma) +{ + png_debug(1, "in png_set_gamma_fixed"); if (png_ptr == NULL) return; - if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) || - (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) - png_ptr->transformations |= PNG_GAMMA; - png_ptr->gamma = (float)file_gamma; - png_ptr->screen_gamma = (float)scrn_gamma; + if ((png_ptr->color_type & PNG_COLOR_MASK_ALPHA) || + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) || + png_gamma_threshold(scrn_gamma, file_gamma)) + png_ptr->transformations |= PNG_GAMMA; + png_ptr->gamma = file_gamma; + png_ptr->screen_gamma = scrn_gamma; } -#endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) +{ + png_set_gamma_fixed(png_ptr, + png_fixed(png_ptr, scrn_gamma, "png_set_gamma screen gamma"), + png_fixed(png_ptr, file_gamma, "png_set_gamma file gamma")); +} +# endif /* FLOATING_POINT_SUPPORTED */ +#endif /* READ_GAMMA */ #ifdef PNG_READ_EXPAND_SUPPORTED /* Expand paletted images to RGB, expand grayscale images of @@ -639,38 +687,45 @@ png_set_tRNS_to_alpha(png_structp png_ptr) } #endif /* defined(PNG_READ_EXPAND_SUPPORTED) */ +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16 bit channels, expand the tRNS chunk too (because otherwise + * it may not work correctly.) + */ +void PNGAPI +png_set_expand_16(png_structp png_ptr) +{ + png_debug(1, "in png_set_expand_16"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= (PNG_EXPAND_16 | PNG_EXPAND | PNG_EXPAND_tRNS); + png_ptr->transformations &= ~PNG_16_TO_8; + + png_ptr->flags &= ~PNG_FLAG_ROW_INIT; +} +#endif + #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED void PNGAPI png_set_gray_to_rgb(png_structp png_ptr) { png_debug(1, "in png_set_gray_to_rgb"); - png_ptr->transformations |= PNG_GRAY_TO_RGB; - png_ptr->flags &= ~PNG_FLAG_ROW_INIT; + if (png_ptr != NULL) + { + /* Because rgb must be 8 bits or more: */ + png_set_expand_gray_1_2_4_to_8(png_ptr); + png_ptr->transformations |= PNG_GRAY_TO_RGB; + png_ptr->flags &= ~PNG_FLAG_ROW_INIT; + } } #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -/* Convert a RGB image to a grayscale of the same width. This allows us, - * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image. - */ - -void PNGAPI -png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red, - double green) -{ - int red_fixed = (int)((float)red*100000.0 + 0.5); - int green_fixed = (int)((float)green*100000.0 + 0.5); - if (png_ptr == NULL) - return; - png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed); -} -#endif - -void PNGAPI +void PNGFAPI png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, - png_fixed_point red, png_fixed_point green) + png_fixed_point red, png_fixed_point green) { png_debug(1, "in png_set_rgb_to_gray"); @@ -679,13 +734,21 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, switch(error_action) { - case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY; - break; + case 1: + png_ptr->transformations |= PNG_RGB_TO_GRAY; + break; - case 2: png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN; - break; + case 2: + png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN; + break; - case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR; + case 3: + png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR; + break; + + default: + png_error(png_ptr, "invalid error action to rgb_to_gray"); + break; } if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) #ifdef PNG_READ_EXPAND_SUPPORTED @@ -694,6 +757,7 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, { png_warning(png_ptr, "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED"); + png_ptr->transformations &= ~PNG_RGB_TO_GRAY; } #endif @@ -704,30 +768,52 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, red_int = 6968; /* .212671 * 32768 + .5 */ green_int = 23434; /* .715160 * 32768 + .5 */ } + else if (red + green < 100000L) { red_int = (png_uint_16)(((png_uint_32)red*32768L)/100000L); green_int = (png_uint_16)(((png_uint_32)green*32768L)/100000L); } + else { png_warning(png_ptr, "ignoring out of range rgb_to_gray coefficients"); red_int = 6968; green_int = 23434; } + png_ptr->rgb_to_gray_red_coeff = red_int; png_ptr->rgb_to_gray_green_coeff = green_int; png_ptr->rgb_to_gray_blue_coeff = - (png_uint_16)(32768 - red_int - green_int); + (png_uint_16)(32768 - red_int - green_int); } } + +#ifdef PNG_FLOATING_POINT_SUPPORTED +/* Convert a RGB image to a grayscale of the same width. This allows us, + * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image. + */ + +void PNGAPI +png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red, + double green) +{ + if (png_ptr == NULL) + return; + + png_set_rgb_to_gray_fixed(png_ptr, error_action, + png_fixed(png_ptr, red, "rgb to gray red coefficient"), + png_fixed(png_ptr, green, "rgb to gray green coefficient")); +} +#endif /* FLOATING POINT */ + #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) void PNGAPI png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr - read_user_transform_fn) + read_user_transform_fn) { png_debug(1, "in png_set_read_user_transform_fn"); @@ -772,15 +858,17 @@ png_init_read_transformations(png_structp png_ptr) if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) && !(color_type & PNG_COLOR_MASK_COLOR)) { - png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; - } else if ((png_ptr->transformations & PNG_BACKGROUND) && - !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && - (png_ptr->transformations & PNG_GRAY_TO_RGB) && - png_ptr->background.red == png_ptr->background.green && - png_ptr->background.red == png_ptr->background.blue) + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + } + + else if ((png_ptr->transformations & PNG_BACKGROUND) && + !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && + (png_ptr->transformations & PNG_GRAY_TO_RGB) && + png_ptr->background.red == png_ptr->background.green && + png_ptr->background.red == png_ptr->background.blue) { - png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; - png_ptr->background.gray = png_ptr->background.red; + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + png_ptr->background.gray = png_ptr->background.red; } #endif @@ -795,55 +883,57 @@ png_init_read_transformations(png_structp png_ptr) case 1: png_ptr->background.gray *= (png_uint_16)0xff; png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; + = png_ptr->background.blue = png_ptr->background.gray; if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) { png_ptr->trans_color.gray *= (png_uint_16)0xff; png_ptr->trans_color.red = png_ptr->trans_color.green - = png_ptr->trans_color.blue = png_ptr->trans_color.gray; + = png_ptr->trans_color.blue = png_ptr->trans_color.gray; } break; case 2: png_ptr->background.gray *= (png_uint_16)0x55; png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; + = png_ptr->background.blue = png_ptr->background.gray; if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) { - png_ptr->trans_color.gray *= (png_uint_16)0x55; - png_ptr->trans_color.red = png_ptr->trans_color.green - = png_ptr->trans_color.blue = png_ptr->trans_color.gray; + png_ptr->trans_color.gray *= (png_uint_16)0x55; + png_ptr->trans_color.red = png_ptr->trans_color.green + = png_ptr->trans_color.blue = png_ptr->trans_color.gray; } break; case 4: png_ptr->background.gray *= (png_uint_16)0x11; png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; + = png_ptr->background.blue = png_ptr->background.gray; if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) { - png_ptr->trans_color.gray *= (png_uint_16)0x11; - png_ptr->trans_color.red = png_ptr->trans_color.green - = png_ptr->trans_color.blue = png_ptr->trans_color.gray; + png_ptr->trans_color.gray *= (png_uint_16)0x11; + png_ptr->trans_color.red = png_ptr->trans_color.green + = png_ptr->trans_color.blue = png_ptr->trans_color.gray; } break; + default: + case 8: case 16: png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; + = png_ptr->background.blue = png_ptr->background.gray; break; } } else if (color_type == PNG_COLOR_TYPE_PALETTE) { png_ptr->background.red = - png_ptr->palette[png_ptr->background.index].red; + png_ptr->palette[png_ptr->background.index].red; png_ptr->background.green = - png_ptr->palette[png_ptr->background.index].green; + png_ptr->palette[png_ptr->background.index].green; png_ptr->background.blue = - png_ptr->palette[png_ptr->background.index].blue; + png_ptr->palette[png_ptr->background.index].blue; #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_INVERT_ALPHA) @@ -852,13 +942,14 @@ png_init_read_transformations(png_structp png_ptr) if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) #endif { - /* Invert the alpha channel (in tRNS) unless the pixels are - * going to be expanded, in which case leave it for later - */ + /* Invert the alpha channel (in tRNS) unless the pixels are + * going to be expanded, in which case leave it for later + */ int i, istop; istop=(int)png_ptr->num_trans; for (i=0; itrans_alpha[i] = (png_byte)(255 - png_ptr->trans_alpha[i]); + png_ptr->trans_alpha[i] = (png_byte)(255 - + png_ptr->trans_alpha[i]); } } #endif @@ -870,25 +961,24 @@ png_init_read_transformations(png_structp png_ptr) #if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) png_ptr->background_1 = png_ptr->background; #endif -#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) +#ifdef PNG_READ_GAMMA_SUPPORTED if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0) - && (fabs(png_ptr->screen_gamma * png_ptr->gamma - 1.0) - < PNG_GAMMA_THRESHOLD)) + && png_gamma_threshold(png_ptr->screen_gamma, png_ptr->gamma)) { - int i, k; - k=0; - for (i=0; inum_trans; i++) - { - if (png_ptr->trans_alpha[i] != 0 && png_ptr->trans_alpha[i] != 0xff) - k=1; /* Partial transparency is present */ - } - if (k == 0) - png_ptr->transformations &= ~PNG_GAMMA; + int i, k; + k=0; + for (i=0; inum_trans; i++) + { + if (png_ptr->trans_alpha[i] != 0 && png_ptr->trans_alpha[i] != 0xff) + k=1; /* Partial transparency is present */ + } + if (k == 0) + png_ptr->transformations &= ~PNG_GAMMA; } if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) && - png_ptr->gamma != 0.0) + png_ptr->gamma != 0) { png_build_gamma_table(png_ptr, png_ptr->bit_depth); @@ -897,13 +987,14 @@ png_init_read_transformations(png_structp png_ptr) { if (color_type == PNG_COLOR_TYPE_PALETTE) { - /* Could skip if no transparency */ + /* Could skip if no transparency */ png_color back, back_1; png_colorp palette = png_ptr->palette; int num_palette = png_ptr->num_palette; int i; if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) { + back.red = png_ptr->gamma_table[png_ptr->background.red]; back.green = png_ptr->gamma_table[png_ptr->background.green]; back.blue = png_ptr->gamma_table[png_ptr->background.blue]; @@ -914,57 +1005,58 @@ png_init_read_transformations(png_structp png_ptr) } else { - double g, gs; + png_fixed_point g, gs; switch (png_ptr->background_gamma_type) { case PNG_BACKGROUND_GAMMA_SCREEN: g = (png_ptr->screen_gamma); - gs = 1.0; + gs = PNG_FP_1; break; case PNG_BACKGROUND_GAMMA_FILE: - g = 1.0 / (png_ptr->gamma); - gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + g = png_reciprocal(png_ptr->gamma); + gs = png_reciprocal2(png_ptr->gamma, + png_ptr->screen_gamma); break; case PNG_BACKGROUND_GAMMA_UNIQUE: - g = 1.0 / (png_ptr->background_gamma); - gs = 1.0 / (png_ptr->background_gamma * - png_ptr->screen_gamma); + g = png_reciprocal(png_ptr->background_gamma); + gs = png_reciprocal2(png_ptr->background_gamma, + png_ptr->screen_gamma); break; default: - g = 1.0; /* back_1 */ - gs = 1.0; /* back */ + g = PNG_FP_1; /* back_1 */ + gs = PNG_FP_1; /* back */ + break; } - if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD) + if (png_gamma_significant(gs)) { back.red = (png_byte)png_ptr->background.red; back.green = (png_byte)png_ptr->background.green; back.blue = (png_byte)png_ptr->background.blue; } + else { - back.red = (png_byte)(pow( - (double)png_ptr->background.red/255.0, gs) * 255.0 + .5); - back.green = (png_byte)(pow( - (double)png_ptr->background.green/255.0, gs) * 255.0 - + .5); - back.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255.0, gs) * 255.0 + .5); + back.red = png_gamma_8bit_correct(png_ptr->background.red, + gs); + back.green = png_gamma_8bit_correct(png_ptr->background.green, + gs); + back.blue = png_gamma_8bit_correct(png_ptr->background.blue, + gs); } - - back_1.red = (png_byte)(pow( - (double)png_ptr->background.red/255.0, g) * 255.0 + .5); - back_1.green = (png_byte)(pow( - (double)png_ptr->background.green/255.0, g) * 255.0 + .5); - back_1.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255.0, g) * 255.0 + .5); + back_1.red = png_gamma_8bit_correct(png_ptr->background.red, g); + back_1.green = png_gamma_8bit_correct(png_ptr->background.green, + g); + back_1.blue = png_gamma_8bit_correct(png_ptr->background.blue, + g); } for (i = 0; i < num_palette; i++) { - if (i < (int)png_ptr->num_trans && png_ptr->trans_alpha[i] != 0xff) + if (i < (int)png_ptr->num_trans && + png_ptr->trans_alpha[i] != 0xff) { if (png_ptr->trans_alpha[i] == 0) { @@ -1003,63 +1095,74 @@ png_init_read_transformations(png_structp png_ptr) png_ptr->transformations &= ~PNG_GAMMA; png_ptr->transformations |= PNG_STRIP_ALPHA; } + /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */ else /* color_type != PNG_COLOR_TYPE_PALETTE */ { - double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1); - double g = 1.0; - double gs = 1.0; + png_fixed_point g = PNG_FP_1; + png_fixed_point gs = PNG_FP_1; switch (png_ptr->background_gamma_type) { case PNG_BACKGROUND_GAMMA_SCREEN: - g = (png_ptr->screen_gamma); - gs = 1.0; + g = png_ptr->screen_gamma; + /* gs = PNG_FP_1; */ break; case PNG_BACKGROUND_GAMMA_FILE: - g = 1.0 / (png_ptr->gamma); - gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + g = png_reciprocal(png_ptr->gamma); + gs = png_reciprocal2(png_ptr->gamma, png_ptr->screen_gamma); break; case PNG_BACKGROUND_GAMMA_UNIQUE: - g = 1.0 / (png_ptr->background_gamma); - gs = 1.0 / (png_ptr->background_gamma * - png_ptr->screen_gamma); + g = png_reciprocal(png_ptr->background_gamma); + gs = png_reciprocal2(png_ptr->background_gamma, + png_ptr->screen_gamma); break; + + default: + png_error(png_ptr, "invalid background gamma type"); } - png_ptr->background_1.gray = (png_uint_16)(pow( - (double)png_ptr->background.gray / m, g) * m + .5); - png_ptr->background.gray = (png_uint_16)(pow( - (double)png_ptr->background.gray / m, gs) * m + .5); + png_ptr->background_1.gray = png_gamma_correct(png_ptr, + png_ptr->background.gray, g); + + png_ptr->background.gray = png_gamma_correct(png_ptr, + png_ptr->background.gray, gs); if ((png_ptr->background.red != png_ptr->background.green) || (png_ptr->background.red != png_ptr->background.blue) || (png_ptr->background.red != png_ptr->background.gray)) { /* RGB or RGBA with color background */ - png_ptr->background_1.red = (png_uint_16)(pow( - (double)png_ptr->background.red / m, g) * m + .5); - png_ptr->background_1.green = (png_uint_16)(pow( - (double)png_ptr->background.green / m, g) * m + .5); - png_ptr->background_1.blue = (png_uint_16)(pow( - (double)png_ptr->background.blue / m, g) * m + .5); - png_ptr->background.red = (png_uint_16)(pow( - (double)png_ptr->background.red / m, gs) * m + .5); - png_ptr->background.green = (png_uint_16)(pow( - (double)png_ptr->background.green / m, gs) * m + .5); - png_ptr->background.blue = (png_uint_16)(pow( - (double)png_ptr->background.blue / m, gs) * m + .5); + png_ptr->background_1.red = png_gamma_correct(png_ptr, + png_ptr->background.red, g); + + png_ptr->background_1.green = png_gamma_correct(png_ptr, + png_ptr->background.green, g); + + png_ptr->background_1.blue = png_gamma_correct(png_ptr, + png_ptr->background.blue, g); + + png_ptr->background.red = png_gamma_correct(png_ptr, + png_ptr->background.red, gs); + + png_ptr->background.green = png_gamma_correct(png_ptr, + png_ptr->background.green, gs); + + png_ptr->background.blue = png_gamma_correct(png_ptr, + png_ptr->background.blue, gs); } + else { /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */ png_ptr->background_1.red = png_ptr->background_1.green - = png_ptr->background_1.blue = png_ptr->background_1.gray; + = png_ptr->background_1.blue = png_ptr->background_1.gray; + png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; + = png_ptr->background.blue = png_ptr->background.gray; } } } @@ -1086,7 +1189,7 @@ png_init_read_transformations(png_structp png_ptr) #ifdef PNG_READ_BACKGROUND_SUPPORTED else #endif -#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */ +#endif /* PNG_READ_GAMMA_SUPPORTED */ #ifdef PNG_READ_BACKGROUND_SUPPORTED /* No GAMMA transformation */ if ((png_ptr->transformations & PNG_BACKGROUND) && @@ -1107,15 +1210,18 @@ png_init_read_transformations(png_structp png_ptr) { palette[i] = back; } + else if (png_ptr->trans_alpha[i] != 0xff) { /* The png_composite() macro is defined in png.h */ png_composite(palette[i].red, palette[i].red, - png_ptr->trans_alpha[i], back.red); + png_ptr->trans_alpha[i], back.red); + png_composite(palette[i].green, palette[i].green, - png_ptr->trans_alpha[i], back.green); + png_ptr->trans_alpha[i], back.green); + png_composite(palette[i].blue, palette[i].blue, - png_ptr->trans_alpha[i], back.blue); + png_ptr->trans_alpha[i], back.blue); } } @@ -1127,7 +1233,7 @@ png_init_read_transformations(png_structp png_ptr) #ifdef PNG_READ_SHIFT_SUPPORTED if ((png_ptr->transformations & PNG_SHIFT) && - (color_type == PNG_COLOR_TYPE_PALETTE)) + (color_type == PNG_COLOR_TYPE_PALETTE)) { png_uint_16 i; png_uint_16 istop = png_ptr->num_palette; @@ -1137,10 +1243,13 @@ png_init_read_transformations(png_structp png_ptr) if (sr < 0 || sr > 8) sr = 0; + if (sg < 0 || sg > 8) sg = 0; + if (sb < 0 || sb > 8) sb = 0; + for (i = 0; i < istop; i++) { png_ptr->palette[i].red >>= sr; @@ -1172,10 +1281,12 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { if (png_ptr->num_trans && - (png_ptr->transformations & PNG_EXPAND_tRNS)) + (png_ptr->transformations & PNG_EXPAND_tRNS)) info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; + else info_ptr->color_type = PNG_COLOR_TYPE_RGB; + info_ptr->bit_depth = 8; info_ptr->num_trans = 0; } @@ -1184,19 +1295,29 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) if (png_ptr->num_trans) { if (png_ptr->transformations & PNG_EXPAND_tRNS) - info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; } if (info_ptr->bit_depth < 8) info_ptr->bit_depth = 8; + info_ptr->num_trans = 0; } } #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND_16 && info_ptr->bit_depth == 8 && + info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + { + info_ptr->bit_depth = 16; + } +#endif + #ifdef PNG_READ_BACKGROUND_SUPPORTED if (png_ptr->transformations & PNG_BACKGROUND) { - info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; + info_ptr->color_type = (png_byte)(info_ptr->color_type & + ~PNG_COLOR_MASK_ALPHA); info_ptr->num_trans = 0; info_ptr->background = png_ptr->background; } @@ -1205,18 +1326,22 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_READ_GAMMA_SUPPORTED if (png_ptr->transformations & PNG_GAMMA) { -#ifdef PNG_FLOATING_POINT_SUPPORTED info_ptr->gamma = png_ptr->gamma; -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_gamma = png_ptr->int_gamma; -#endif } #endif #ifdef PNG_READ_16_TO_8_SUPPORTED +#ifdef PNG_READ_16BIT_SUPPORTED if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16)) info_ptr->bit_depth = 8; +#else + /* Force chopping 16-bit input down to 8 */ + if (info_ptr->bit_depth == 16) + { + png_ptr->transformations |=PNG_16_TO_8; + info_ptr->bit_depth = 8; + } +#endif #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED @@ -1248,13 +1373,15 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) info_ptr->channels = 1; + else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) info_ptr->channels = 3; + else info_ptr->channels = 1; #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED - if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA) + if (png_ptr->transformations & PNG_STRIP_ALPHA) info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; #endif @@ -1270,23 +1397,24 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) info_ptr->channels++; /* If adding a true alpha channel not just filler */ if (png_ptr->transformations & PNG_ADD_ALPHA) - info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; } #endif #if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \ defined(PNG_READ_USER_TRANSFORM_SUPPORTED) if (png_ptr->transformations & PNG_USER_TRANSFORM) - { - if (info_ptr->bit_depth < png_ptr->user_transform_depth) + { + if (info_ptr->bit_depth < png_ptr->user_transform_depth) info_ptr->bit_depth = png_ptr->user_transform_depth; - if (info_ptr->channels < png_ptr->user_transform_channels) + + if (info_ptr->channels < png_ptr->user_transform_channels) info_ptr->channels = png_ptr->user_transform_channels; - } + } #endif info_ptr->pixel_depth = (png_byte)(info_ptr->channels * - info_ptr->bit_depth); + info_ptr->bit_depth); info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width); @@ -1307,12 +1435,12 @@ png_do_read_transformations(png_structp png_ptr) if (png_ptr->row_buf == NULL) { -#ifdef PNG_STDIO_SUPPORTED +#ifdef PNG_CONSOLE_IO_SUPPORTED char msg[50]; png_snprintf2(msg, 50, - "NULL row buffer for row %ld, pass %d", (long)png_ptr->row_number, - png_ptr->pass); + "NULL row buffer for row %ld, pass %d", (long)png_ptr->row_number, + png_ptr->pass); png_error(png_ptr, msg); #else png_error(png_ptr, "NULL row buffer"); @@ -1337,39 +1465,49 @@ png_do_read_transformations(png_structp png_ptr) if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE) { png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans); + png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans); } + else { if (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND_tRNS)) png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_color)); + &(png_ptr->trans_color)); + else png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, - NULL); + NULL); } } #endif + /* Delay the 'expand 16' step until later for efficiency, so that the + * intermediate steps work with 8 bit data. + */ + #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED - if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)); + if ((png_ptr->transformations & PNG_STRIP_ALPHA) && + (png_ptr->row_info.color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->row_info.color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + png_do_strip_channel(&(png_ptr->row_info), png_ptr->row_buf + 1, + 0/*!at_start, because SWAP_ALPHA happens later*/); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED if (png_ptr->transformations & PNG_RGB_TO_GRAY) { int rgb_error = - png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1); + png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), + png_ptr->row_buf + 1); + if (rgb_error) { png_ptr->rgb_to_gray_status=1; if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == PNG_RGB_TO_GRAY_WARN) png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel"); + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == PNG_RGB_TO_GRAY_ERR) png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel"); @@ -1419,18 +1557,18 @@ png_do_read_transformations(png_structp png_ptr) #ifdef PNG_READ_BACKGROUND_SUPPORTED if ((png_ptr->transformations & PNG_BACKGROUND) && - ((png_ptr->num_trans != 0 ) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) + ((png_ptr->num_trans != 0) || + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_color), &(png_ptr->background) + &(png_ptr->trans_color), &(png_ptr->background) #ifdef PNG_READ_GAMMA_SUPPORTED - , &(png_ptr->background_1), - png_ptr->gamma_table, png_ptr->gamma_from_1, - png_ptr->gamma_to_1, png_ptr->gamma_16_table, - png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1, - png_ptr->gamma_shift + , &(png_ptr->background_1), + png_ptr->gamma_table, png_ptr->gamma_from_1, + png_ptr->gamma_to_1, png_ptr->gamma_16_table, + png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1, + png_ptr->gamma_shift #endif -); + ); #endif #ifdef PNG_READ_GAMMA_SUPPORTED @@ -1454,11 +1592,22 @@ png_do_read_transformations(png_structp png_ptr) #ifdef PNG_READ_QUANTIZE_SUPPORTED if (png_ptr->transformations & PNG_QUANTIZE) { - png_do_quantize((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette_lookup, png_ptr->quantize_index); - if (png_ptr->row_info.rowbytes == (png_uint_32)0) + png_do_quantize(&(png_ptr->row_info), png_ptr->row_buf + 1, + png_ptr->palette_lookup, png_ptr->quantize_index); + + if (png_ptr->row_info.rowbytes == 0) png_error(png_ptr, "png_do_quantize returned rowbytes=0"); } +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ + +#ifdef PNG_READ_EXPAND_16_SUPPORTED + /* Do the expansion now, after all the arithmetic has been done. Notice + * that previous transformations can handle the PNG_EXPAND_16 flag if this + * is efficient (particularly true in the case of gamma correction, where + * better accuracy results faster!) + */ + if (png_ptr->transformations & PNG_EXPAND_16) + png_do_expand_16(&png_ptr->row_info, png_ptr->row_buf + 1); #endif #ifdef PNG_READ_INVERT_SUPPORTED @@ -1469,7 +1618,7 @@ png_do_read_transformations(png_structp png_ptr) #ifdef PNG_READ_SHIFT_SUPPORTED if (png_ptr->transformations & PNG_SHIFT) png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->shift)); + &(png_ptr->shift)); #endif #ifdef PNG_READ_PACK_SUPPORTED @@ -1488,6 +1637,9 @@ png_do_read_transformations(png_structp png_ptr) #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /*NOTE: this must be in the wrong place - what happens if BGR is set too? + * Need pngvalid to test this combo. + */ /* If gray -> RGB, do so now only if we did not do so above */ if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) @@ -1497,7 +1649,7 @@ png_do_read_transformations(png_structp png_ptr) #ifdef PNG_READ_FILLER_SUPPORTED if (png_ptr->transformations & PNG_FILLER) png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - (png_uint_32)png_ptr->filler, png_ptr->flags); + (png_uint_32)png_ptr->filler, png_ptr->flags); #endif #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED @@ -1510,35 +1662,39 @@ png_do_read_transformations(png_structp png_ptr) png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif +#ifdef PNG_READ_16BIT_SUPPORTED #ifdef PNG_READ_SWAP_SUPPORTED if (png_ptr->transformations & PNG_SWAP_BYTES) png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif +#endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED if (png_ptr->transformations & PNG_USER_TRANSFORM) { if (png_ptr->read_user_transform_fn != NULL) (*(png_ptr->read_user_transform_fn)) /* User read transform function */ - (png_ptr, /* png_ptr */ - &(png_ptr->row_info), /* row_info: */ - /* png_uint_32 width; width of row */ - /* png_uint_32 rowbytes; number of bytes in row */ - /* png_byte color_type; color type of pixels */ - /* png_byte bit_depth; bit depth of samples */ - /* png_byte channels; number of channels (1-4) */ - /* png_byte pixel_depth; bits per pixel (depth*channels) */ - png_ptr->row_buf + 1); /* start of pixel data for row */ + (png_ptr, /* png_ptr */ + &(png_ptr->row_info), /* row_info: */ + /* png_uint_32 width; width of row */ + /* png_size_t rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED if (png_ptr->user_transform_depth) png_ptr->row_info.bit_depth = png_ptr->user_transform_depth; + if (png_ptr->user_transform_channels) png_ptr->row_info.channels = png_ptr->user_transform_channels; #endif png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth * - png_ptr->row_info.channels); + png_ptr->row_info.channels); + png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth, - png_ptr->row_info.width); + png_ptr->row_info.width); } #endif @@ -1571,11 +1727,13 @@ png_do_unpack(png_row_infop row_info, png_bytep row) for (i = 0; i < row_width; i++) { *dp = (png_byte)((*sp >> shift) & 0x01); + if (shift == 7) { shift = 0; sp--; } + else shift++; @@ -1593,11 +1751,13 @@ png_do_unpack(png_row_infop row_info, png_bytep row) for (i = 0; i < row_width; i++) { *dp = (png_byte)((*sp >> shift) & 0x03); + if (shift == 6) { shift = 0; sp--; } + else shift += 2; @@ -1614,11 +1774,13 @@ png_do_unpack(png_row_infop row_info, png_bytep row) for (i = 0; i < row_width; i++) { *dp = (png_byte)((*sp >> shift) & 0x0f); + if (shift == 4) { shift = 0; sp--; } + else shift = 4; @@ -1626,6 +1788,9 @@ png_do_unpack(png_row_infop row_info, png_bytep row) } break; } + + default: + break; } row_info->bit_depth = 8; row_info->pixel_depth = (png_byte)(8 * row_info->channels); @@ -1641,7 +1806,8 @@ png_do_unpack(png_row_infop row_info, png_bytep row) * the values back to 0 through 31. */ void /* PRIVATE */ -png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) +png_do_unshift(png_row_infop row_info, png_bytep row, + png_const_color_8p sig_bits) { png_debug(1, "in png_do_unshift"); @@ -1660,10 +1826,12 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) shift[channels++] = row_info->bit_depth - sig_bits->green; shift[channels++] = row_info->bit_depth - sig_bits->blue; } + else { shift[channels++] = row_info->bit_depth - sig_bits->gray; } + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) { shift[channels++] = row_info->bit_depth - sig_bits->alpha; @@ -1673,6 +1841,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) { if (shift[c] <= 0) shift[c] = 0; + else value = 1; } @@ -1682,11 +1851,14 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) switch (row_info->bit_depth) { + default: + break; + case 2: { png_bytep bp; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; + png_size_t i; + png_size_t istop = row_info->rowbytes; for (bp = row, i = 0; i < istop; i++) { @@ -1699,10 +1871,10 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) case 4: { png_bytep bp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; + png_size_t i; + png_size_t istop = row_info->rowbytes; png_byte mask = (png_byte)((((int)0xf0 >> shift[0]) & (int)0xf0) | - (png_byte)((int)0xf >> shift[0])); + (png_byte)((int)0xf >> shift[0])); for (i = 0; i < istop; i++) { @@ -1725,6 +1897,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) break; } +#ifdef PNG_READ_16BIT_SUPPORTED case 16: { png_bytep bp = row; @@ -1740,6 +1913,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) } break; } +#endif } } } @@ -1827,6 +2001,8 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) *(--dp) = save; } } + +#ifdef PNG_READ_16BIT_SUPPORTED /* This converts from RRGGBBAA to AARRGGBB */ else { @@ -1849,7 +2025,9 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) *(--dp) = save[1]; } } +#endif } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { /* This converts from GA to AG */ @@ -1867,6 +2045,8 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) *(--dp) = save; } } + +#ifdef PNG_READ_16BIT_SUPPORTED /* This converts from GGAA to AAGG */ else { @@ -1885,6 +2065,7 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) *(--dp) = save[1]; } } +#endif } } } @@ -1894,94 +2075,99 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) void /* PRIVATE */ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) { + png_uint_32 row_width; png_debug(1, "in png_do_read_invert_alpha"); + row_width = row_info->width; + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { - png_uint_32 row_width = row_info->width; - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + if (row_info->bit_depth == 8) { /* This inverts the alpha channel in RGBA */ - if (row_info->bit_depth == 8) + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; + *(--dp) = (png_byte)(255 - *(--sp)); - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - -/* This does nothing: - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - We can replace it with: +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: */ - sp-=3; - dp=sp; - } - } - /* This inverts the alpha channel in RRGGBBAA */ - else - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - *(--dp) = (png_byte)(255 - *(--sp)); - -/* This does nothing: - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - We can replace it with: -*/ - sp-=6; - dp=sp; - } + sp-=3; + dp=sp; } } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + +#ifdef PNG_READ_16BIT_SUPPORTED + /* This inverts the alpha channel in RRGGBBAA */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); + +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: +*/ + sp-=6; + dp=sp; + } + } +#endif + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) { /* This inverts the alpha channel in GA */ - if (row_info->bit_depth == 8) - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - *(--dp) = *(--sp); - } - } - /* This inverts the alpha channel in GGAA */ - else + for (i = 0; i < row_width; i++) { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - *(--dp) = (png_byte)(255 - *(--sp)); -/* - *(--dp) = *(--sp); - *(--dp) = *(--sp); -*/ - sp-=2; - dp=sp; - } + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = *(--sp); } } + +#ifdef PNG_READ_16BIT_SUPPORTED + else + { + /* This inverts the alpha channel in GGAA */ + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); +/* + *(--dp) = *(--sp); + *(--dp) = *(--sp); +*/ + sp-=2; + dp=sp; + } + } +#endif } } #endif @@ -1990,12 +2176,14 @@ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) /* Add filler channel if we have RGB color */ void /* PRIVATE */ png_do_read_filler(png_row_infop row_info, png_bytep row, - png_uint_32 filler, png_uint_32 flags) + png_uint_32 filler, png_uint_32 flags) { png_uint_32 i; png_uint_32 row_width = row_info->width; +#ifdef PNG_READ_16BIT_SUPPORTED png_byte hi_filler = (png_byte)((filler>>8) & 0xff); +#endif png_byte lo_filler = (png_byte)(filler & 0xff); png_debug(1, "in png_do_read_filler"); @@ -2005,9 +2193,9 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, { if (row_info->bit_depth == 8) { - /* This changes the data from G to GX */ if (flags & PNG_FLAG_FILLER_AFTER) { + /* This changes the data from G to GX */ png_bytep sp = row + (png_size_t)row_width; png_bytep dp = sp + (png_size_t)row_width; for (i = 1; i < row_width; i++) @@ -2020,9 +2208,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->pixel_depth = 16; row_info->rowbytes = row_width * 2; } - /* This changes the data from G to XG */ + else { + /* This changes the data from G to XG */ png_bytep sp = row + (png_size_t)row_width; png_bytep dp = sp + (png_size_t)row_width; for (i = 0; i < row_width; i++) @@ -2035,11 +2224,13 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->rowbytes = row_width * 2; } } + +#ifdef PNG_READ_16BIT_SUPPORTED else if (row_info->bit_depth == 16) { - /* This changes the data from GG to GGXX */ if (flags & PNG_FLAG_FILLER_AFTER) { + /* This changes the data from GG to GGXX */ png_bytep sp = row + (png_size_t)row_width * 2; png_bytep dp = sp + (png_size_t)row_width * 2; for (i = 1; i < row_width; i++) @@ -2055,9 +2246,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->pixel_depth = 32; row_info->rowbytes = row_width * 4; } - /* This changes the data from GG to XXGG */ + else { + /* This changes the data from GG to XXGG */ png_bytep sp = row + (png_size_t)row_width * 2; png_bytep dp = sp + (png_size_t)row_width * 2; for (i = 0; i < row_width; i++) @@ -2072,14 +2264,15 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->rowbytes = row_width * 4; } } +#endif } /* COLOR_TYPE == GRAY */ else if (row_info->color_type == PNG_COLOR_TYPE_RGB) { if (row_info->bit_depth == 8) { - /* This changes the data from RGB to RGBX */ if (flags & PNG_FLAG_FILLER_AFTER) { + /* This changes the data from RGB to RGBX */ png_bytep sp = row + (png_size_t)row_width * 3; png_bytep dp = sp + (png_size_t)row_width; for (i = 1; i < row_width; i++) @@ -2094,9 +2287,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->pixel_depth = 32; row_info->rowbytes = row_width * 4; } - /* This changes the data from RGB to XRGB */ + else { + /* This changes the data from RGB to XRGB */ png_bytep sp = row + (png_size_t)row_width * 3; png_bytep dp = sp + (png_size_t)row_width; for (i = 0; i < row_width; i++) @@ -2111,11 +2305,13 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->rowbytes = row_width * 4; } } + +#ifdef PNG_READ_16BIT_SUPPORTED else if (row_info->bit_depth == 16) { - /* This changes the data from RRGGBB to RRGGBBXX */ if (flags & PNG_FLAG_FILLER_AFTER) { + /* This changes the data from RRGGBB to RRGGBBXX */ png_bytep sp = row + (png_size_t)row_width * 6; png_bytep dp = sp + (png_size_t)row_width * 2; for (i = 1; i < row_width; i++) @@ -2135,9 +2331,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, row_info->pixel_depth = 64; row_info->rowbytes = row_width * 8; } - /* This changes the data from RRGGBB to XXRRGGBB */ + else { + /* This changes the data from RRGGBB to XXRRGGBB */ png_bytep sp = row + (png_size_t)row_width * 6; png_bytep dp = sp + (png_size_t)row_width * 2; for (i = 0; i < row_width; i++) @@ -2151,11 +2348,13 @@ png_do_read_filler(png_row_infop row_info, png_bytep row, *(--dp) = hi_filler; *(--dp) = lo_filler; } + row_info->channels = 4; row_info->pixel_depth = 64; row_info->rowbytes = row_width * 8; } } +#endif } /* COLOR_TYPE == RGB */ } #endif @@ -2171,12 +2370,13 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) png_debug(1, "in png_do_gray_to_rgb"); if (row_info->bit_depth >= 8 && - !(row_info->color_type & PNG_COLOR_MASK_COLOR)) + !(row_info->color_type & PNG_COLOR_MASK_COLOR)) { if (row_info->color_type == PNG_COLOR_TYPE_GRAY) { if (row_info->bit_depth == 8) { + /* This changes G to RGB */ png_bytep sp = row + (png_size_t)row_width - 1; png_bytep dp = sp + (png_size_t)row_width * 2; for (i = 0; i < row_width; i++) @@ -2186,8 +2386,10 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) *(dp--) = *(sp--); } } + else { + /* This changes GG to RRGGBB */ png_bytep sp = row + (png_size_t)row_width * 2 - 1; png_bytep dp = sp + (png_size_t)row_width * 4; for (i = 0; i < row_width; i++) @@ -2201,10 +2403,12 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) } } } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { if (row_info->bit_depth == 8) { + /* This changes GA to RGBA */ png_bytep sp = row + (png_size_t)row_width * 2 - 1; png_bytep dp = sp + (png_size_t)row_width * 2; for (i = 0; i < row_width; i++) @@ -2215,8 +2419,10 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) *(dp--) = *(sp--); } } + else { + /* This changes GGAA to RRGGBBAA */ png_bytep sp = row + (png_size_t)row_width * 4 - 1; png_bytep dp = sp + (png_size_t)row_width * 4; for (i = 0; i < row_width; i++) @@ -2235,7 +2441,7 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) row_info->channels += (png_byte)2; row_info->color_type |= PNG_COLOR_MASK_COLOR; row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); + row_info->bit_depth); row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); } } @@ -2274,8 +2480,8 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) png_debug(1, "in png_do_rgb_to_gray"); - if ( - (row_info->color_type & PNG_COLOR_MASK_COLOR)) + if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) && + (row_info->color_type & PNG_COLOR_MASK_COLOR)) { png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; @@ -2296,12 +2502,14 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) png_byte red = png_ptr->gamma_to_1[*(sp++)]; png_byte green = png_ptr->gamma_to_1[*(sp++)]; png_byte blue = png_ptr->gamma_to_1[*(sp++)]; + if (red != green || red != blue) { rgb_error |= 1; *(dp++) = png_ptr->gamma_from_1[ - (rc*red + gc*green + bc*blue)>>15]; + (rc*red + gc*green + bc*blue)>>15]; } + else *(dp++) = *(sp - 1); } @@ -2316,11 +2524,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) png_byte red = *(sp++); png_byte green = *(sp++); png_byte blue = *(sp++); + if (red != green || red != blue) { rgb_error |= 1; *(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15); } + else *(dp++) = *(sp - 1); } @@ -2339,23 +2549,24 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) { png_uint_16 red, green, blue, w; - red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; if (red == green && red == blue) w = red; + else { - png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> - png_ptr->gamma_shift][red>>8]; + png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) + >> png_ptr->gamma_shift][red>>8]; png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> - png_ptr->gamma_shift][green>>8]; - png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> - png_ptr->gamma_shift][blue>>8]; + png_ptr->gamma_shift][green>>8]; + png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) + >> png_ptr->gamma_shift][blue>>8]; png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1 - + bc*blue_1)>>15); + + bc*blue_1)>>15); w = png_ptr->gamma_16_from_1[(gray16&0xff) >> png_ptr->gamma_shift][gray16 >> 8]; rgb_error |= 1; @@ -2374,12 +2585,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) { png_uint_16 red, green, blue, gray16; - red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; if (red != green || red != blue) rgb_error |= 1; + gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15); *(dp++) = (png_byte)((gray16>>8) & 0xff); *(dp++) = (png_byte)(gray16 & 0xff); @@ -2401,10 +2613,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) png_byte red = png_ptr->gamma_to_1[*(sp++)]; png_byte green = png_ptr->gamma_to_1[*(sp++)]; png_byte blue = png_ptr->gamma_to_1[*(sp++)]; + if (red != green || red != blue) rgb_error |= 1; + *(dp++) = png_ptr->gamma_from_1 - [(rc*red + gc*green + bc*blue)>>15]; + [(rc*red + gc*green + bc*blue)>>15]; + *(dp++) = *(sp++); /* alpha */ } } @@ -2420,6 +2635,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) png_byte blue = *(sp++); if (red != green || red != blue) rgb_error |= 1; + *(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15); *(dp++) = *(sp++); /* alpha */ } @@ -2437,25 +2653,31 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) { png_uint_16 red, green, blue, w; - red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; if (red == green && red == blue) w = red; + else { png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> png_ptr->gamma_shift][red>>8]; + png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> png_ptr->gamma_shift][green>>8]; + png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> png_ptr->gamma_shift][blue>>8]; + png_uint_16 gray16 = (png_uint_16)((rc * red_1 + gc * green_1 + bc * blue_1)>>15); + w = png_ptr->gamma_16_from_1[(gray16&0xff) >> png_ptr->gamma_shift][gray16 >> 8]; + rgb_error |= 1; } @@ -2473,11 +2695,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) for (i = 0; i < row_width; i++) { png_uint_16 red, green, blue, gray16; - red = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; + red = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2; + green = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2; + blue = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2; + if (red != green || red != blue) rgb_error |= 1; + gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15); *(dp++) = (png_byte)((gray16>>8) & 0xff); *(dp++) = (png_byte)(gray16 & 0xff); @@ -2487,10 +2711,11 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) } } } - row_info->channels -= (png_byte)2; - row_info->color_type &= ~PNG_COLOR_MASK_COLOR; + row_info->channels -= 2; + row_info->color_type = (png_byte)(row_info->color_type & + ~PNG_COLOR_MASK_COLOR); row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); + row_info->bit_depth); row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); } return rgb_error; @@ -2559,18 +2784,18 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette) */ void /* PRIVATE */ png_do_background(png_row_infop row_info, png_bytep row, - png_color_16p trans_color, png_color_16p background + png_const_color_16p trans_color, png_const_color_16p background #ifdef PNG_READ_GAMMA_SUPPORTED - , png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift + , png_const_color_16p background_1, png_const_bytep gamma_table, + png_const_bytep gamma_from_1, png_const_bytep gamma_to_1, + png_const_uint_16pp gamma_16, png_const_uint_16pp gamma_16_from_1, + png_const_uint_16pp gamma_16_to_1, int gamma_shift #endif - ) + ) { png_bytep sp, dp; png_uint_32 i; - png_uint_32 row_width=row_info->width; + png_uint_32 row_width = row_info->width; int shift; png_debug(1, "in png_do_background"); @@ -2597,11 +2822,13 @@ png_do_background(png_row_infop row_info, png_bytep row, *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); } + if (!shift) { shift = 7; sp++; } + else shift--; } @@ -2623,6 +2850,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); } + else { png_byte p = (png_byte)((*sp >> shift) & 0x03); @@ -2631,15 +2859,18 @@ png_do_background(png_row_infop row_info, png_bytep row, *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); *sp |= (png_byte)(g << shift); } + if (!shift) { shift = 6; sp++; } + else shift -= 2; } } + else #endif { @@ -2653,11 +2884,13 @@ png_do_background(png_row_infop row_info, png_bytep row, *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); } + if (!shift) { shift = 6; sp++; } + else shift -= 2; } @@ -2680,23 +2913,27 @@ png_do_background(png_row_infop row_info, png_bytep row, *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); } + else { png_byte p = (png_byte)((*sp >> shift) & 0x0f); png_byte g = (png_byte)((gamma_table[p | - (p << 4)] >> 4) & 0x0f); + (p << 4)] >> 4) & 0x0f); *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); *sp |= (png_byte)(g << shift); } + if (!shift) { shift = 4; sp++; } + else shift -= 4; } } + else #endif { @@ -2710,11 +2947,13 @@ png_do_background(png_row_infop row_info, png_bytep row, *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); *sp |= (png_byte)(background->gray << shift); } + if (!shift) { shift = 4; sp++; } + else shift -= 4; } @@ -2731,13 +2970,10 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++, sp++) { if (*sp == trans_color->gray) - { *sp = (png_byte)background->gray; - } + else - { *sp = gamma_table[*sp]; - } } } else @@ -2747,9 +2983,7 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++, sp++) { if (*sp == trans_color->gray) - { *sp = (png_byte)background->gray; - } } } break; @@ -2766,12 +3000,14 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 v; v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + if (v == trans_color->gray) { /* Background is already in screen gamma */ *sp = (png_byte)((background->gray >> 8) & 0xff); *(sp + 1) = (png_byte)(background->gray & 0xff); } + else { v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; @@ -2789,6 +3025,7 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 v; v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + if (v == trans_color->gray) { *sp = (png_byte)((background->gray >> 8) & 0xff); @@ -2798,6 +3035,9 @@ png_do_background(png_row_infop row_info, png_bytep row, } break; } + + default: + break; } break; } @@ -2813,13 +3053,14 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++, sp += 3) { if (*sp == trans_color->red && - *(sp + 1) == trans_color->green && - *(sp + 2) == trans_color->blue) + *(sp + 1) == trans_color->green && + *(sp + 2) == trans_color->blue) { *sp = (png_byte)background->red; *(sp + 1) = (png_byte)background->green; *(sp + 2) = (png_byte)background->blue; } + else { *sp = gamma_table[*sp]; @@ -2835,8 +3076,8 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++, sp += 3) { if (*sp == trans_color->red && - *(sp + 1) == trans_color->green && - *(sp + 2) == trans_color->blue) + *(sp + 1) == trans_color->green && + *(sp + 2) == trans_color->blue) { *sp = (png_byte)background->red; *(sp + 1) = (png_byte)background->green; @@ -2854,10 +3095,15 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++, sp += 6) { png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); - png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); + + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + if (r == trans_color->red && g == trans_color->green && - b == trans_color->blue) + b == trans_color->blue) { /* Background is already in screen gamma */ *sp = (png_byte)((background->red >> 8) & 0xff); @@ -2867,32 +3113,40 @@ png_do_background(png_row_infop row_info, png_bytep row, *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); *(sp + 5) = (png_byte)(background->blue & 0xff); } + else { png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; *sp = (png_byte)((v >> 8) & 0xff); *(sp + 1) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; *(sp + 2) = (png_byte)((v >> 8) & 0xff); *(sp + 3) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; *(sp + 4) = (png_byte)((v >> 8) & 0xff); *(sp + 5) = (png_byte)(v & 0xff); } } } + else #endif { sp = row; for (i = 0; i < row_width; i++, sp += 6) { - png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp+1)); - png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); - png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); if (r == trans_color->red && g == trans_color->green && - b == trans_color->blue) + b == trans_color->blue) { *sp = (png_byte)((background->red >> 8) & 0xff); *(sp + 1) = (png_byte)(background->red & 0xff); @@ -2922,14 +3176,14 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 a = *(sp + 1); if (a == 0xff) - { *dp = gamma_table[*sp]; - } + else if (a == 0) { /* Background is already in screen gamma */ *dp = (png_byte)background->gray; } + else { png_byte v, w; @@ -2950,18 +3204,15 @@ png_do_background(png_row_infop row_info, png_bytep row, png_byte a = *(sp + 1); if (a == 0xff) - { *dp = *sp; - } + #ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) - { *dp = (png_byte)background->gray; - } + else - { png_composite(*dp, *sp, a, background_1->gray); - } + #else *dp = (png_byte)background->gray; #endif @@ -2978,7 +3229,8 @@ png_do_background(png_row_infop row_info, png_bytep row, dp = row; for (i = 0; i < row_width; i++, sp += 4, dp += 2) { - png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); + png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); if (a == (png_uint_16)0xffff) { @@ -2988,6 +3240,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *dp = (png_byte)((v >> 8) & 0xff); *(dp + 1) = (png_byte)(v & 0xff); } + #ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) #else @@ -2998,6 +3251,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *dp = (png_byte)((background->gray >> 8) & 0xff); *(dp + 1) = (png_byte)(background->gray & 0xff); } + #ifdef PNG_READ_GAMMA_SUPPORTED else { @@ -3019,11 +3273,12 @@ png_do_background(png_row_infop row_info, png_bytep row, dp = row; for (i = 0; i < row_width; i++, sp += 4, dp += 2) { - png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); + png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + if (a == (png_uint_16)0xffff) - { png_memcpy(dp, sp, 2); - } + #ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) #else @@ -3033,6 +3288,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *dp = (png_byte)((background->gray >> 8) & 0xff); *(dp + 1) = (png_byte)(background->gray & 0xff); } + #ifdef PNG_READ_GAMMA_SUPPORTED else { @@ -3070,6 +3326,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *(dp + 1) = gamma_table[*(sp + 1)]; *(dp + 2) = gamma_table[*(sp + 2)]; } + else if (a == 0) { /* Background is already in screen gamma */ @@ -3077,6 +3334,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *(dp + 1) = (png_byte)background->green; *(dp + 2) = (png_byte)background->blue; } + else { png_byte v, w; @@ -3084,9 +3342,11 @@ png_do_background(png_row_infop row_info, png_bytep row, v = gamma_to_1[*sp]; png_composite(w, v, a, background_1->red); *dp = gamma_from_1[w]; + v = gamma_to_1[*(sp + 1)]; png_composite(w, v, a, background_1->green); *(dp + 1) = gamma_from_1[w]; + v = gamma_to_1[*(sp + 2)]; png_composite(w, v, a, background_1->blue); *(dp + 2) = gamma_from_1[w]; @@ -3108,19 +3368,23 @@ png_do_background(png_row_infop row_info, png_bytep row, *(dp + 1) = *(sp + 1); *(dp + 2) = *(sp + 2); } + else if (a == 0) { *dp = (png_byte)background->red; *(dp + 1) = (png_byte)background->green; *(dp + 2) = (png_byte)background->blue; } + else { png_composite(*dp, *sp, a, background->red); + png_composite(*(dp + 1), *(sp + 1), a, - background->green); + background->green); + png_composite(*(dp + 2), *(sp + 2), a, - background->blue); + background->blue); } } } @@ -3137,6 +3401,7 @@ png_do_background(png_row_infop row_info, png_bytep row, { png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) << 8) + (png_uint_16)(*(sp + 7))); + if (a == (png_uint_16)0xffff) { png_uint_16 v; @@ -3144,13 +3409,16 @@ png_do_background(png_row_infop row_info, png_bytep row, v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; *dp = (png_byte)((v >> 8) & 0xff); *(dp + 1) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; *(dp + 2) = (png_byte)((v >> 8) & 0xff); *(dp + 3) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; *(dp + 4) = (png_byte)((v >> 8) & 0xff); *(dp + 5) = (png_byte)(v & 0xff); } + else if (a == 0) { /* Background is already in screen gamma */ @@ -3161,28 +3429,35 @@ png_do_background(png_row_infop row_info, png_bytep row, *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); *(dp + 5) = (png_byte)(background->blue & 0xff); } + else { png_uint_16 v, w, x; v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; png_composite_16(w, v, a, background_1->red); + x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; *dp = (png_byte)((x >> 8) & 0xff); *(dp + 1) = (png_byte)(x & 0xff); + v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; png_composite_16(w, v, a, background_1->green); + x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; *(dp + 2) = (png_byte)((x >> 8) & 0xff); *(dp + 3) = (png_byte)(x & 0xff); + v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; png_composite_16(w, v, a, background_1->blue); + x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8]; *(dp + 4) = (png_byte)((x >> 8) & 0xff); *(dp + 5) = (png_byte)(x & 0xff); } } } + else #endif { @@ -3191,11 +3466,13 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++, sp += 8, dp += 6) { png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) - << 8) + (png_uint_16)(*(sp + 7))); + << 8) + (png_uint_16)(*(sp + 7))); + if (a == (png_uint_16)0xffff) { png_memcpy(dp, sp, 6); } + else if (a == 0) { *dp = (png_byte)((background->red >> 8) & 0xff); @@ -3205,6 +3482,7 @@ png_do_background(png_row_infop row_info, png_bytep row, *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); *(dp + 5) = (png_byte)(background->blue & 0xff); } + else { png_uint_16 v; @@ -3218,9 +3496,11 @@ png_do_background(png_row_infop row_info, png_bytep row, png_composite_16(v, r, a, background->red); *dp = (png_byte)((v >> 8) & 0xff); *(dp + 1) = (png_byte)(v & 0xff); + png_composite_16(v, g, a, background->green); *(dp + 2) = (png_byte)((v >> 8) & 0xff); *(dp + 3) = (png_byte)(v & 0xff); + png_composite_16(v, b, a, background->blue); *(dp + 4) = (png_byte)((v >> 8) & 0xff); *(dp + 5) = (png_byte)(v & 0xff); @@ -3230,14 +3510,18 @@ png_do_background(png_row_infop row_info, png_bytep row, } break; } + + default: + break; } if (row_info->color_type & PNG_COLOR_MASK_ALPHA) { - row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; + row_info->color_type = (png_byte)(row_info->color_type & + ~PNG_COLOR_MASK_ALPHA); row_info->channels--; row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); + row_info->bit_depth); row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); } } @@ -3253,8 +3537,8 @@ png_do_background(png_row_infop row_info, png_bytep row, */ void /* PRIVATE */ png_do_gamma(png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift) + png_const_bytep gamma_table, png_const_uint_16pp gamma_16_table, + int gamma_shift) { png_bytep sp; png_uint_32 i; @@ -3262,9 +3546,8 @@ png_do_gamma(png_row_infop row_info, png_bytep row, png_debug(1, "in png_do_gamma"); - if ( - ((row_info->bit_depth <= 8 && gamma_table != NULL) || - (row_info->bit_depth == 16 && gamma_16_table != NULL))) + if (((row_info->bit_depth <= 8 && gamma_table != NULL) || + (row_info->bit_depth == 16 && gamma_16_table != NULL))) { switch (row_info->color_type) { @@ -3283,6 +3566,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, sp++; } } + else /* if (row_info->bit_depth == 16) */ { sp = row; @@ -3294,10 +3578,12 @@ png_do_gamma(png_row_infop row_info, png_bytep row, *sp = (png_byte)((v >> 8) & 0xff); *(sp + 1) = (png_byte)(v & 0xff); sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; *sp = (png_byte)((v >> 8) & 0xff); *(sp + 1) = (png_byte)(v & 0xff); sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; *sp = (png_byte)((v >> 8) & 0xff); *(sp + 1) = (png_byte)(v & 0xff); @@ -3316,13 +3602,17 @@ png_do_gamma(png_row_infop row_info, png_bytep row, { *sp = gamma_table[*sp]; sp++; + *sp = gamma_table[*sp]; sp++; + *sp = gamma_table[*sp]; sp++; + sp++; } } + else /* if (row_info->bit_depth == 16) */ { sp = row; @@ -3332,10 +3622,12 @@ png_do_gamma(png_row_infop row_info, png_bytep row, *sp = (png_byte)((v >> 8) & 0xff); *(sp + 1) = (png_byte)(v & 0xff); sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; *sp = (png_byte)((v >> 8) & 0xff); *(sp + 1) = (png_byte)(v & 0xff); sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; *sp = (png_byte)((v >> 8) & 0xff); *(sp + 1) = (png_byte)(v & 0xff); @@ -3356,6 +3648,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, sp += 2; } } + else /* if (row_info->bit_depth == 16) */ { sp = row; @@ -3428,6 +3721,9 @@ png_do_gamma(png_row_infop row_info, png_bytep row, } break; } + + default: + break; } } } @@ -3439,7 +3735,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, */ void /* PRIVATE */ png_do_expand_palette(png_row_infop row_info, png_bytep row, - png_colorp palette, png_bytep trans_alpha, int num_trans) + png_const_colorp palette, png_const_bytep trans_alpha, int num_trans) { int shift, value; png_bytep sp, dp; @@ -3448,8 +3744,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, png_debug(1, "in png_do_expand_palette"); - if ( - row_info->color_type == PNG_COLOR_TYPE_PALETTE) + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) { if (row_info->bit_depth < 8) { @@ -3464,13 +3759,16 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, { if ((*sp >> shift) & 0x01) *dp = 1; + else *dp = 0; + if (shift == 7) { shift = 0; sp--; } + else shift++; @@ -3493,6 +3791,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, shift = 0; sp--; } + else shift += 2; @@ -3515,6 +3814,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, shift = 0; sp--; } + else shift += 4; @@ -3522,14 +3822,17 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, } break; } + + default: + break; } row_info->bit_depth = 8; row_info->pixel_depth = 8; row_info->rowbytes = row_width; } - switch (row_info->bit_depth) + + if (row_info->bit_depth == 8) { - case 8: { if (trans_alpha != NULL) { @@ -3540,8 +3843,10 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, { if ((int)(*sp) >= num_trans) *dp-- = 0xff; + else *dp-- = trans_alpha[*sp]; + *dp-- = palette[*sp].blue; *dp-- = palette[*sp].green; *dp-- = palette[*sp].red; @@ -3553,6 +3858,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, row_info->color_type = 6; row_info->channels = 4; } + else { sp = row + (png_size_t)row_width - 1; @@ -3572,7 +3878,6 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, row_info->color_type = 2; row_info->channels = 3; } - break; } } } @@ -3583,7 +3888,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, */ void /* PRIVATE */ png_do_expand(png_row_infop row_info, png_bytep row, - png_color_16p trans_value) + png_const_color_16p trans_value) { int shift, value; png_bytep sp, dp; @@ -3603,7 +3908,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, { case 1: { - gray = (png_uint_16)((gray&0x01)*0xff); + gray = (png_uint_16)((gray & 0x01) * 0xff); sp = row + (png_size_t)((row_width - 1) >> 3); dp = row + (png_size_t)row_width - 1; shift = 7 - (int)((row_width + 7) & 0x07); @@ -3611,13 +3916,16 @@ png_do_expand(png_row_infop row_info, png_bytep row, { if ((*sp >> shift) & 0x01) *dp = 0xff; + else *dp = 0; + if (shift == 7) { shift = 0; sp--; } + else shift++; @@ -3628,7 +3936,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, case 2: { - gray = (png_uint_16)((gray&0x03)*0x55); + gray = (png_uint_16)((gray & 0x03) * 0x55); sp = row + (png_size_t)((row_width - 1) >> 2); dp = row + (png_size_t)row_width - 1; shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); @@ -3642,6 +3950,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, shift = 0; sp--; } + else shift += 2; @@ -3652,7 +3961,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, case 4: { - gray = (png_uint_16)((gray&0x0f)*0x11); + gray = (png_uint_16)((gray & 0x0f) * 0x11); sp = row + (png_size_t)((row_width - 1) >> 1); dp = row + (png_size_t)row_width - 1; shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); @@ -3665,6 +3974,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, shift = 0; sp--; } + else shift = 4; @@ -3672,6 +3982,9 @@ png_do_expand(png_row_infop row_info, png_bytep row, } break; } + + default: + break; } row_info->bit_depth = 8; @@ -3686,20 +3999,23 @@ png_do_expand(png_row_infop row_info, png_bytep row, gray = gray & 0xff; sp = row + (png_size_t)row_width - 1; dp = row + (png_size_t)(row_width << 1) - 1; + for (i = 0; i < row_width; i++) { if (*sp == gray) *dp-- = 0; + else *dp-- = 0xff; + *dp-- = *sp--; } } else if (row_info->bit_depth == 16) { - png_byte gray_high = (gray >> 8) & 0xff; - png_byte gray_low = gray & 0xff; + png_byte gray_high = (png_byte)((gray >> 8) & 0xff); + png_byte gray_low = (png_byte)(gray & 0xff); sp = row + row_info->rowbytes - 1; dp = row + (row_info->rowbytes << 1) - 1; for (i = 0; i < row_width; i++) @@ -3709,11 +4025,13 @@ png_do_expand(png_row_infop row_info, png_bytep row, *dp-- = 0; *dp-- = 0; } + else { *dp-- = 0xff; *dp-- = 0xff; } + *dp-- = *sp--; *dp-- = *sp--; } @@ -3730,17 +4048,19 @@ png_do_expand(png_row_infop row_info, png_bytep row, { if (row_info->bit_depth == 8) { - png_byte red = trans_value->red & 0xff; - png_byte green = trans_value->green & 0xff; - png_byte blue = trans_value->blue & 0xff; + png_byte red = (png_byte)(trans_value->red & 0xff); + png_byte green = (png_byte)(trans_value->green & 0xff); + png_byte blue = (png_byte)(trans_value->blue & 0xff); sp = row + (png_size_t)row_info->rowbytes - 1; dp = row + (png_size_t)(row_width << 2) - 1; for (i = 0; i < row_width; i++) { if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue) *dp-- = 0; + else *dp-- = 0xff; + *dp-- = *sp--; *dp-- = *sp--; *dp-- = *sp--; @@ -3748,31 +4068,33 @@ png_do_expand(png_row_infop row_info, png_bytep row, } else if (row_info->bit_depth == 16) { - png_byte red_high = (trans_value->red >> 8) & 0xff; - png_byte green_high = (trans_value->green >> 8) & 0xff; - png_byte blue_high = (trans_value->blue >> 8) & 0xff; - png_byte red_low = trans_value->red & 0xff; - png_byte green_low = trans_value->green & 0xff; - png_byte blue_low = trans_value->blue & 0xff; + png_byte red_high = (png_byte)((trans_value->red >> 8) & 0xff); + png_byte green_high = (png_byte)((trans_value->green >> 8) & 0xff); + png_byte blue_high = (png_byte)((trans_value->blue >> 8) & 0xff); + png_byte red_low = (png_byte)(trans_value->red & 0xff); + png_byte green_low = (png_byte)(trans_value->green & 0xff); + png_byte blue_low = (png_byte)(trans_value->blue & 0xff); sp = row + row_info->rowbytes - 1; dp = row + (png_size_t)(row_width << 3) - 1; for (i = 0; i < row_width; i++) { if (*(sp - 5) == red_high && - *(sp - 4) == red_low && - *(sp - 3) == green_high && - *(sp - 2) == green_low && - *(sp - 1) == blue_high && - *(sp ) == blue_low) + *(sp - 4) == red_low && + *(sp - 3) == green_high && + *(sp - 2) == green_low && + *(sp - 1) == blue_high && + *(sp ) == blue_low) { *dp-- = 0; *dp-- = 0; } + else { *dp-- = 0xff; *dp-- = 0xff; } + *dp-- = *sp--; *dp-- = *sp--; *dp-- = *sp--; @@ -3790,10 +4112,41 @@ png_do_expand(png_row_infop row_info, png_bytep row, } #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* If the bit depth is 8 and the colour type is not a palette type expand the + * whole row to 16 bits. Has no effect otherwise. + */ +void /* PRIVATE */ +png_do_expand_16(png_row_infop row_info, png_bytep row) +{ + if (row_info->bit_depth == 8 && + row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + /* The row have a sequence of bytes containing [0..255] and we need + * to turn it into another row containing [0..65535], to do this we + * calculate: + * + * (input / 255) * 65535 + * + * Which happens to be exactly input * 257 and this can be achieved + * simply by byte replication in place (copying backwards). + */ + png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */ + png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */ + while (dp > sp) + dp[-2] = dp[-1] = *--sp, dp -= 2; + + row_info->rowbytes *= 2; + row_info->bit_depth = 16; + row_info->pixel_depth = (png_byte)(row_info->channels * 16); + } +} +#endif + #ifdef PNG_READ_QUANTIZE_SUPPORTED void /* PRIVATE */ png_do_quantize(png_row_infop row_info, png_bytep row, - png_bytep palette_lookup, png_bytep quantize_lookup) + png_const_bytep palette_lookup, png_const_bytep quantize_lookup) { png_bytep sp, dp; png_uint_32 i; @@ -3801,9 +4154,9 @@ png_do_quantize(png_row_infop row_info, png_bytep row, png_debug(1, "in png_do_quantize"); + if (row_info->bit_depth == 8) { - if (row_info->color_type == PNG_COLOR_TYPE_RGB && - palette_lookup && row_info->bit_depth == 8) + if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup) { int r, g, b, p; sp = row; @@ -3822,23 +4175,25 @@ png_do_quantize(png_row_infop row_info, png_bytep row, * ((b >> 3) & 0x1f); */ p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & - ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << - (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | - (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & - ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << - (PNG_QUANTIZE_BLUE_BITS)) | - ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & - ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); *dp++ = palette_lookup[p]; } + row_info->color_type = PNG_COLOR_TYPE_PALETTE; row_info->channels = 1; row_info->pixel_depth = row_info->bit_depth; row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && - palette_lookup != NULL && row_info->bit_depth == 8) + palette_lookup != NULL) { int r, g, b, p; sp = row; @@ -3851,25 +4206,28 @@ png_do_quantize(png_row_infop row_info, png_bytep row, sp++; p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & - ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << - (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | - (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & - ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << - (PNG_QUANTIZE_BLUE_BITS)) | - ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & - ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); *dp++ = palette_lookup[p]; } + row_info->color_type = PNG_COLOR_TYPE_PALETTE; row_info->channels = 1; row_info->pixel_depth = row_info->bit_depth; row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); } + else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && - quantize_lookup && row_info->bit_depth == 8) + quantize_lookup) { sp = row; + for (i = 0; i < row_width; i++, sp++) { *sp = quantize_lookup[*sp]; @@ -3877,266 +4235,7 @@ png_do_quantize(png_row_infop row_info, png_bytep row, } } } -#endif - -#ifdef PNG_FLOATING_POINT_SUPPORTED -#ifdef PNG_READ_GAMMA_SUPPORTED -static PNG_CONST int png_gamma_shift[] = - {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00}; - -/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit - * tables, we don't make a full table if we are reducing to 8-bit in - * the future. Note also how the gamma_16 tables are segmented so that - * we don't need to allocate > 64K chunks for a full 16-bit table. - * - * See the PNG extensions document for an integer algorithm for creating - * the gamma tables. Maybe we will implement that here someday. - * - * We should only reach this point if - * - * the file_gamma is known (i.e., the gAMA or sRGB chunk is present, - * or the application has provided a file_gamma) - * - * AND - * { - * the screen_gamma is known - * - * OR - * - * RGB_to_gray transformation is being performed - * } - * - * AND - * { - * the screen_gamma is different from the reciprocal of the - * file_gamma by more than the specified threshold - * - * OR - * - * a background color has been specified and the file_gamma - * and screen_gamma are not 1.0, within the specified threshold. - * } - */ - -void /* PRIVATE */ -png_build_gamma_table(png_structp png_ptr, png_byte bit_depth) -{ - png_debug(1, "in png_build_gamma_table"); - - if (bit_depth <= 8) - { - int i; - double g; - - if (png_ptr->screen_gamma > .000001) - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - - else - g = 1.0; - - png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY)) - { - - g = 1.0 / (png_ptr->gamma); - - png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } - - - png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - if (png_ptr->screen_gamma > 0.000001) - g = 1.0 / png_ptr->screen_gamma; - - else - g = png_ptr->gamma; /* Probably doing rgb_to_gray */ - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - - } - } -#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ - } - else - { - double g; - int i, j, shift, num; - int sig_bit; - png_uint_32 ig; - - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit = (int)png_ptr->sig_bit.red; - - if ((int)png_ptr->sig_bit.green > sig_bit) - sig_bit = png_ptr->sig_bit.green; - - if ((int)png_ptr->sig_bit.blue > sig_bit) - sig_bit = png_ptr->sig_bit.blue; - } - else - { - sig_bit = (int)png_ptr->sig_bit.gray; - } - - if (sig_bit > 0) - shift = 16 - sig_bit; - - else - shift = 0; - - if (png_ptr->transformations & PNG_16_TO_8) - { - if (shift < (16 - PNG_MAX_GAMMA_8)) - shift = (16 - PNG_MAX_GAMMA_8); - } - - if (shift > 8) - shift = 8; - - if (shift < 0) - shift = 0; - - png_ptr->gamma_shift = (png_byte)shift; - - num = (1 << (8 - shift)); - - if (png_ptr->screen_gamma > .000001) - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - else - g = 1.0; - - png_ptr->gamma_16_table = (png_uint_16pp)png_calloc(png_ptr, - (png_uint_32)(num * png_sizeof(png_uint_16p))); - - if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) - { - double fin, fout; - png_uint_32 last, max; - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof(png_uint_16))); - } - - g = 1.0 / g; - last = 0; - for (i = 0; i < 256; i++) - { - fout = ((double)i + 0.5) / 256.0; - fin = pow(fout, g); - max = (png_uint_32)(fin * (double)((png_uint_32)num << 8)); - while (last <= max) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)( - (png_uint_16)i | ((png_uint_16)i << 8)); - last++; - } - } - while (last < ((png_uint_32)num << 8)) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)65535L; - last++; - } - } - else - { - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof(png_uint_16))); - - ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4); - - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_table[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY)) - { - - g = 1.0 / (png_ptr->gamma); - - png_ptr->gamma_16_to_1 = (png_uint_16pp)png_calloc(png_ptr, - (png_uint_32)(num * png_sizeof(png_uint_16p ))); - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof(png_uint_16))); - - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_to_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - - if (png_ptr->screen_gamma > 0.000001) - g = 1.0 / png_ptr->screen_gamma; - - else - g = png_ptr->gamma; /* Probably doing rgb_to_gray */ - - png_ptr->gamma_16_from_1 = (png_uint_16pp)png_calloc(png_ptr, - (png_uint_32)(num * png_sizeof(png_uint_16p))); - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof(png_uint_16))); - - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_from_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } -#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ - } -} -#endif -/* To do: install integer version of png_build_gamma_table here */ -#endif +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ #ifdef PNG_MNG_FEATURES_SUPPORTED /* Undoes intrapixel differencing */ @@ -4150,6 +4249,7 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row) { int bytes_per_pixel; png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) { png_bytep rp; @@ -4166,8 +4266,8 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row) for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) { - *(rp) = (png_byte)((256 + *rp + *(rp+1))&0xff); - *(rp+2) = (png_byte)((256 + *(rp+2) + *(rp+1))&0xff); + *(rp) = (png_byte)((256 + *rp + *(rp + 1)) & 0xff); + *(rp+2) = (png_byte)((256 + *(rp + 2) + *(rp + 1)) & 0xff); } } else if (row_info->bit_depth == 16) @@ -4191,10 +4291,10 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row) png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5); png_uint_32 red = (png_uint_32)((s0 + s1 + 65536L) & 0xffffL); png_uint_32 blue = (png_uint_32)((s2 + s1 + 65536L) & 0xffffL); - *(rp ) = (png_byte)((red >> 8) & 0xff); - *(rp+1) = (png_byte)(red & 0xff); - *(rp+4) = (png_byte)((blue >> 8) & 0xff); - *(rp+5) = (png_byte)(blue & 0xff); + *(rp ) = (png_byte)((red >> 8) & 0xff); + *(rp + 1) = (png_byte)(red & 0xff); + *(rp + 4) = (png_byte)((blue >> 8) & 0xff); + *(rp + 5) = (png_byte)(blue & 0xff); } } } diff --git a/dll/3rdparty/libpng/pngrutil.c b/dll/3rdparty/libpng/pngrutil.c index 416e5d228a1..d4764317444 100644 --- a/dll/3rdparty/libpng/pngrutil.c +++ b/dll/3rdparty/libpng/pngrutil.c @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.3 [June 26, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.2 [March 31, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -14,58 +14,136 @@ * libpng itself during the course of reading an image. */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_READ_SUPPORTED #include "pngpriv.h" -# define png_strtod(p,a,b) strtod(a,b) -png_uint_32 PNGAPI -png_get_uint_31(png_structp png_ptr, png_bytep buf) -{ - png_uint_32 i = png_get_uint_32(buf); - if (i > PNG_UINT_31_MAX) - png_error(png_ptr, "PNG unsigned integer out of range"); - return (i); -} -#ifndef PNG_USE_READ_MACROS -/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ -png_uint_32 PNGAPI -png_get_uint_32(png_bytep buf) -{ - png_uint_32 i = ((png_uint_32)(*buf) << 24) + - ((png_uint_32)(*(buf + 1)) << 16) + - ((png_uint_32)(*(buf + 2)) << 8) + - (png_uint_32)(*(buf + 3)); +#ifdef PNG_READ_SUPPORTED - return (i); +#define png_strtod(p,a,b) strtod(a,b) + +png_uint_32 PNGAPI +png_get_uint_31(png_structp png_ptr, png_const_bytep buf) +{ + png_uint_32 uval = png_get_uint_32(buf); + + if (uval > PNG_UINT_31_MAX) + png_error(png_ptr, "PNG unsigned integer out of range"); + + return (uval); +} + +#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_READ_cHRM_SUPPORTED) +/* The following is a variation on the above for use with the fixed + * point values used for gAMA and cHRM. Instead of png_error it + * issues a warning and returns (-1) - an invalid value because both + * gAMA and cHRM use *unsigned* integers for fixed point values. + */ +#define PNG_FIXED_ERROR (-1) + +static png_fixed_point /* PRIVATE */ +png_get_fixed_point(png_structp png_ptr, png_const_bytep buf) +{ + png_uint_32 uval = png_get_uint_32(buf); + + if (uval <= PNG_UINT_31_MAX) + return (png_fixed_point)uval; /* known to be in range */ + + /* The caller can turn off the warning by passing NULL. */ + if (png_ptr != NULL) + png_warning(png_ptr, "PNG fixed point integer out of range"); + + return PNG_FIXED_ERROR; +} +#endif + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +/* NOTE: the read macros will obscure these definitions, so that if + * PNG_USE_READ_MACROS is set the library will not use them internally, + * but the APIs will still be available externally. + * + * The parentheses around "PNGAPI function_name" in the following three + * functions are necessary because they allow the macros to co-exist with + * these (unused but exported) functions. + */ + +/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ +png_uint_32 (PNGAPI +png_get_uint_32)(png_const_bytep buf) +{ + png_uint_32 uval = + ((png_uint_32)(*(buf )) << 24) + + ((png_uint_32)(*(buf + 1)) << 16) + + ((png_uint_32)(*(buf + 2)) << 8) + + ((png_uint_32)(*(buf + 3)) ) ; + + return uval; } /* Grab a signed 32-bit integer from a buffer in big-endian format. The - * data is stored in the PNG file in two's complement format, and it is - * assumed that the machine format for signed integers is the same. + * data is stored in the PNG file in two's complement format and there + * is no guarantee that a 'png_int_32' is exactly 32 bits, therefore + * the following code does a two's complement to native conversion. */ -png_int_32 PNGAPI -png_get_int_32(png_bytep buf) +png_int_32 (PNGAPI +png_get_int_32)(png_const_bytep buf) { - png_int_32 i = ((png_int_32)(*buf) << 24) + - ((png_int_32)(*(buf + 1)) << 16) + - ((png_int_32)(*(buf + 2)) << 8) + - (png_int_32)(*(buf + 3)); + png_uint_32 uval = png_get_uint_32(buf); + if ((uval & 0x80000000L) == 0) /* non-negative */ + return uval; - return (i); + uval = (uval ^ 0xffffffffL) + 1; /* 2's complement: -x = ~x+1 */ + return -(png_int_32)uval; } /* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ -png_uint_16 PNGAPI -png_get_uint_16(png_bytep buf) +png_uint_16 (PNGAPI +png_get_uint_16)(png_const_bytep buf) { - png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) + - (png_uint_16)(*(buf + 1))); + /* ANSI-C requires an int value to accomodate at least 16 bits so this + * works and allows the compiler not to worry about possible narrowing + * on 32 bit systems. (Pre-ANSI systems did not make integers smaller + * than 16 bits either.) + */ + unsigned int val = + ((unsigned int)(*buf) << 8) + + ((unsigned int)(*(buf + 1))); - return (i); + return (png_uint_16)val; +} + +#endif /* PNG_READ_INT_FUNCTIONS_SUPPORTED */ + +/* Read and check the PNG file signature */ +void /* PRIVATE */ +png_read_sig(png_structp png_ptr, png_infop info_ptr) +{ + png_size_t num_checked, num_to_check; + + /* Exit if the user application does not expect a signature. */ + if (png_ptr->sig_bytes >= 8) + return; + + num_checked = png_ptr->sig_bytes; + num_to_check = 8 - num_checked; + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE; +#endif + + /* The signature must be serialized in a single I/O call. */ + png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); + png_ptr->sig_bytes = 8; + + if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) + { + if (num_checked < 4 && + png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) + png_error(png_ptr, "Not a PNG file"); + else + png_error(png_ptr, "PNG file corrupted by ASCII conversion"); + } + if (num_checked < 3) + png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; } -#endif /* PNG_USE_READ_MACROS */ /* Read the chunk header (length + type name). * Put the type name into png_ptr->chunk_name, and return the length. @@ -77,33 +155,29 @@ png_read_chunk_header(png_structp png_ptr) png_uint_32 length; #ifdef PNG_IO_STATE_SUPPORTED - /* Inform the I/O callback that the chunk header is being read. - * PNG_IO_CHUNK_HDR requires a single I/O call. - */ png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_HDR; #endif - /* Read the length and the chunk name */ + /* Read the length and the chunk name. + * This must be performed in a single I/O call. + */ png_read_data(png_ptr, buf, 8); length = png_get_uint_31(png_ptr, buf); - /* Put the chunk name into png_ptr->chunk_name */ + /* Put the chunk name into png_ptr->chunk_name. */ png_memcpy(png_ptr->chunk_name, buf + 4, 4); - png_debug2(0, "Reading %s chunk, length = %lu", - png_ptr->chunk_name, length); + png_debug2(0, "Reading %s chunk, length = %u", + png_ptr->chunk_name, length); - /* Reset the crc and run it over the chunk name */ + /* Reset the crc and run it over the chunk name. */ png_reset_crc(png_ptr); png_calculate_crc(png_ptr, png_ptr->chunk_name, 4); - /* Check to see if chunk name is valid */ + /* Check to see if chunk name is valid. */ png_check_chunk_name(png_ptr, png_ptr->chunk_name); #ifdef PNG_IO_STATE_SUPPORTED - /* Inform the I/O callback that chunk data will (possibly) be read. - * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls. - */ png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_DATA; #endif @@ -116,6 +190,7 @@ png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length) { if (png_ptr == NULL) return; + png_read_data(png_ptr, buf, length); png_calculate_crc(png_ptr, buf, length); } @@ -135,6 +210,7 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip) { png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); } + if (i) { png_crc_read(png_ptr, png_ptr->zbuf, i); @@ -149,11 +225,13 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip) { png_chunk_warning(png_ptr, "CRC error"); } + else { png_chunk_benign_error(png_ptr, "CRC error"); return (0); } + return (1); } @@ -176,6 +254,7 @@ png_crc_error(png_structp png_ptr) (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) need_crc = 0; } + else /* critical */ { if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) @@ -183,11 +262,10 @@ png_crc_error(png_structp png_ptr) } #ifdef PNG_IO_STATE_SUPPORTED - /* Inform the I/O callback that the chunk CRC is being read */ - /* PNG_IO_CHUNK_CRC requires the I/O to be done at once */ png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_CRC; #endif + /* The chunk CRC must be serialized in a single I/O call. */ png_read_data(png_ptr, crc_bytes, 4); if (need_crc) @@ -195,6 +273,7 @@ png_crc_error(png_structp png_ptr) crc = png_get_uint_32(crc_bytes); return ((int)(crc != png_ptr->crc)); } + else return (0); } @@ -202,18 +281,51 @@ png_crc_error(png_structp png_ptr) #if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \ defined(PNG_READ_iCCP_SUPPORTED) static png_size_t -png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size, - png_bytep output, png_size_t output_size) +png_inflate(png_structp png_ptr, png_bytep data, png_size_t size, + png_bytep output, png_size_t output_size) { png_size_t count = 0; - png_ptr->zstream.next_in = (png_bytep)data; /* const_cast: VALID */ - png_ptr->zstream.avail_in = size; + /* zlib can't necessarily handle more than 65535 bytes at once (i.e. it can't + * even necessarily handle 65536 bytes) because the type uInt is "16 bits or + * more". Consequently it is necessary to chunk the input to zlib. This + * code uses ZLIB_IO_MAX, from pngpriv.h, as the maximum (the maximum value + * that can be stored in a uInt.) It is possible to set ZLIB_IO_MAX to a + * lower value in pngpriv.h and this may sometimes have a performance + * advantage, because it forces access of the input data to be separated from + * at least some of the use by some period of time. + */ + png_ptr->zstream.next_in = data; + /* avail_in is set below from 'size' */ + png_ptr->zstream.avail_in = 0; while (1) { int ret, avail; + /* The setting of 'avail_in' used to be outside the loop, by setting it + * inside it is possible to chunk the input to zlib and simply rely on + * zlib to advance the 'next_in' pointer. This allows arbitrary amounts o + * data to be passed through zlib at the unavoidable cost of requiring a + * window save (memcpy of up to 32768 output bytes) every ZLIB_IO_MAX + * input bytes. + */ + if (png_ptr->zstream.avail_in == 0 && size > 0) + { + if (size <= ZLIB_IO_MAX) + { + /* The value is less than ZLIB_IO_MAX so the cast is safe: */ + png_ptr->zstream.avail_in = (uInt)size; + size = 0; + } + + else + { + png_ptr->zstream.avail_in = ZLIB_IO_MAX; + size -= ZLIB_IO_MAX; + } + } + /* Reset the output buffer each time round - we empty it * after every inflate call. */ @@ -228,13 +340,18 @@ png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size, */ if ((ret == Z_OK || ret == Z_STREAM_END) && avail > 0) { + png_size_t space = avail; /* > 0, see above */ + if (output != 0 && output_size > count) { - int copy = output_size - count; - if (avail < copy) copy = avail; + png_size_t copy = output_size - count; + + if (space < copy) + copy = space; + png_memcpy(output + count, png_ptr->zbuf, copy); } - count += avail; + count += space; } if (ret == Z_OK) @@ -255,21 +372,25 @@ png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size, */ { PNG_CONST char *msg; +#ifdef PNG_CONSOLE_IO_SUPPORTED + char umsg[52]; +#endif if (png_ptr->zstream.msg != 0) msg = png_ptr->zstream.msg; + else { -#ifdef PNG_STDIO_SUPPORTED - char umsg[52]; - +#ifdef PNG_CONSOLE_IO_SUPPORTED switch (ret) { case Z_BUF_ERROR: msg = "Buffer error in compressed datastream in %s chunk"; break; + case Z_DATA_ERROR: msg = "Data error in compressed datastream in %s chunk"; break; + default: msg = "Incomplete compressed datastream in %s chunk"; break; @@ -285,7 +406,7 @@ png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size, png_warning(png_ptr, msg); } - /* 0 means an error - notice that this code simple ignores + /* 0 means an error - notice that this code simply ignores * zero length compressed chunks as a result. */ return 0; @@ -315,9 +436,10 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, else if (comp_type == PNG_COMPRESSION_TYPE_BASE) { png_size_t expanded_size = png_inflate(png_ptr, - (png_bytep)(png_ptr->chunkdata + prefix_size), - chunklength - prefix_size, - 0/*output*/, 0/*output size*/); + (png_bytep)(png_ptr->chunkdata + prefix_size), + chunklength - prefix_size, + 0, /*output*/ + 0); /*output size*/ /* Now check the limits on this chunk - if the limit fails the * compressed data will be removed, the prefix will remain. @@ -340,14 +462,15 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, */ #if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \ defined(PNG_USER_CHUNK_MALLOC_MAX) - else -#endif + else if (expanded_size > 0) +#else if (expanded_size > 0) +#endif { /* Success (maybe) - really uncompress the chunk. */ png_size_t new_size = 0; png_charp text = png_malloc_warn(png_ptr, - prefix_size + expanded_size + 1); + prefix_size + expanded_size + 1); if (text != NULL) { @@ -369,8 +492,9 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, png_warning(png_ptr, "png_inflate logic error"); png_free(png_ptr, text); } + else - png_warning(png_ptr, "Not enough memory to decompress chunk"); + png_warning(png_ptr, "Not enough memory to decompress chunk"); } } @@ -379,8 +503,8 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, #ifdef PNG_STDIO_SUPPORTED char umsg[50]; - png_snprintf(umsg, sizeof umsg, "Unknown zTXt compression type %d", - comp_type); + png_snprintf(umsg, sizeof umsg, + "Unknown zTXt compression type %d", comp_type); png_warning(png_ptr, umsg); #else png_warning(png_ptr, "Unknown zTXt compression type"); @@ -395,10 +519,12 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, */ { png_charp text = png_malloc_warn(png_ptr, prefix_size + 1); + if (text != NULL) { if (prefix_size > 0) png_memcpy(text, png_ptr->chunkdata, prefix_size); + png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = text; @@ -457,6 +583,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Find number of channels */ switch (png_ptr->color_type) { + default: /* invalid, png_set_IHDR calls png_error */ case PNG_COLOR_TYPE_GRAY: case PNG_COLOR_TYPE_PALETTE: png_ptr->channels = 1; @@ -481,9 +608,9 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width); png_debug1(3, "bit_depth = %d", png_ptr->bit_depth); png_debug1(3, "channels = %d", png_ptr->channels); - png_debug1(3, "rowbytes = %lu", png_ptr->rowbytes); + png_debug1(3, "rowbytes = %lu", (unsigned long)png_ptr->rowbytes); png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - color_type, interlace_type, compression_type, filter_type); + color_type, interlace_type, compression_type, filter_type); } /* Read and check the palette */ @@ -516,10 +643,11 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) { png_warning(png_ptr, - "Ignoring PLTE chunk in grayscale PNG"); + "Ignoring PLTE chunk in grayscale PNG"); png_crc_finish(png_ptr, length); return; } + #ifndef PNG_READ_OPT_PLTE_SUPPORTED if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) { @@ -568,7 +696,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } #endif - /* If we actually NEED the PLTE chunk (ie for a paletted image), we do + /* If we actually need the PLTE chunk (ie for a paletted image), we do * whatever the normal CRC configuration tells us. However, if we * have an RGB image, the PLTE can be considered ancillary, so * we will act as though it is. @@ -579,25 +707,29 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_crc_finish(png_ptr, 0); } + #ifndef PNG_READ_OPT_PLTE_SUPPORTED else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */ { /* If we don't want to use the data from an ancillary chunk, - we have two options: an error abort, or a warning and we - ignore the data in this chunk (which should be OK, since - it's considered ancillary for a RGB or RGBA image). */ + * we have two options: an error abort, or a warning and we + * ignore the data in this chunk (which should be OK, since + * it's considered ancillary for a RGB or RGBA image). + */ if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE)) { if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) { png_chunk_benign_error(png_ptr, "CRC error"); } + else { png_chunk_warning(png_ptr, "CRC error"); return; } } + /* Otherwise, we (optionally) emit a warning and use the chunk. */ else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) { @@ -618,6 +750,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_warning(png_ptr, "Truncating incorrect tRNS chunk length"); png_ptr->num_trans = (png_uint_16)num; } + if (info_ptr->num_trans > (png_uint_16)num) { png_warning(png_ptr, "Truncating incorrect info tRNS chunk length"); @@ -645,9 +778,10 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_warning(png_ptr, "Incorrect IEND chunk length"); } + png_crc_finish(png_ptr, length); - info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */ + PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */ } #ifdef PNG_READ_gAMA_SUPPORTED @@ -655,30 +789,29 @@ void /* PRIVATE */ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_fixed_point igamma; -#ifdef PNG_FLOATING_POINT_SUPPORTED - float file_gamma; -#endif png_byte buf[4]; png_debug(1, "in png_handle_gAMA"); if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before gAMA"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid gAMA after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (png_ptr->mode & PNG_HAVE_PLTE) /* Should be an error, but we can cope with it */ png_warning(png_ptr, "Out of place gAMA chunk"); if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) #ifdef PNG_READ_sRGB_SUPPORTED - && !(info_ptr->valid & PNG_INFO_sRGB) + && !(info_ptr->valid & PNG_INFO_sRGB) #endif - ) + ) { png_warning(png_ptr, "Duplicate gAMA chunk"); png_crc_finish(png_ptr, length); @@ -693,41 +826,43 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, 4); + if (png_crc_finish(png_ptr, 0)) return; - igamma = (png_fixed_point)png_get_uint_32(buf); - /* Check for zero gamma */ - if (igamma == 0) - { - png_warning(png_ptr, - "Ignoring gAMA chunk with gamma=0"); - return; - } + igamma = png_get_fixed_point(NULL, buf); -#ifdef PNG_READ_sRGB_SUPPORTED + /* Check for zero gamma or an error. */ + if (igamma <= 0) + { + png_warning(png_ptr, + "Ignoring gAMA chunk with out of range gamma"); + + return; + } + +# ifdef PNG_READ_sRGB_SUPPORTED if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)) + { if (PNG_OUT_OF_RANGE(igamma, 45500L, 500)) { png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); -#ifdef PNG_CONSOLE_IO_SUPPORTED + "Ignoring incorrect gAMA value when sRGB is also present"); + +# ifdef PNG_CONSOLE_IO_SUPPORTED fprintf(stderr, "gamma = (%d/100000)", (int)igamma); -#endif +# endif return; } -#endif /* PNG_READ_sRGB_SUPPORTED */ + } +# endif /* PNG_READ_sRGB_SUPPORTED */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - file_gamma = (float)igamma / (float)100000.0; # ifdef PNG_READ_GAMMA_SUPPORTED - png_ptr->gamma = file_gamma; + /* Gamma correction on read is supported. */ + png_ptr->gamma = igamma; # endif - png_set_gAMA(png_ptr, info_ptr, file_gamma); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED + /* And set the 'info' structure members. */ png_set_gAMA_fixed(png_ptr, info_ptr, igamma); -#endif } #endif @@ -744,17 +879,20 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before sBIT"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid sBIT after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (png_ptr->mode & PNG_HAVE_PLTE) { /* Should be an error, but we can cope with it */ png_warning(png_ptr, "Out of place sBIT chunk"); } + if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)) { png_warning(png_ptr, "Duplicate sBIT chunk"); @@ -764,6 +902,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) truelen = 3; + else truelen = (png_size_t)png_ptr->channels; @@ -775,6 +914,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, truelen); + if (png_crc_finish(png_ptr, 0)) return; @@ -785,6 +925,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->sig_bit.blue = buf[2]; png_ptr->sig_bit.alpha = buf[3]; } + else { png_ptr->sig_bit.gray = buf[0]; @@ -793,6 +934,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->sig_bit.blue = buf[0]; png_ptr->sig_bit.alpha = buf[1]; } + png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit)); } #endif @@ -802,32 +944,29 @@ void /* PRIVATE */ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_byte buf[32]; -#ifdef PNG_FLOATING_POINT_SUPPORTED - float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; -#endif - png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green, - int_y_green, int_x_blue, int_y_blue; - - png_uint_32 uint_x, uint_y; + png_fixed_point x_white, y_white, x_red, y_red, x_green, y_green, x_blue, + y_blue; png_debug(1, "in png_handle_cHRM"); if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before cHRM"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid cHRM after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (png_ptr->mode & PNG_HAVE_PLTE) /* Should be an error, but we can cope with it */ png_warning(png_ptr, "Missing PLTE before cHRM"); if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM) -#ifdef PNG_READ_sRGB_SUPPORTED - && !(info_ptr->valid & PNG_INFO_sRGB) -#endif +# ifdef PNG_READ_sRGB_SUPPORTED + && !(info_ptr->valid & PNG_INFO_sRGB) +# endif ) { png_warning(png_ptr, "Duplicate cHRM chunk"); @@ -843,83 +982,61 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, 32); + if (png_crc_finish(png_ptr, 0)) return; - uint_x = png_get_uint_32(buf); - uint_y = png_get_uint_32(buf + 4); - int_x_white = (png_fixed_point)uint_x; - int_y_white = (png_fixed_point)uint_y; + x_white = png_get_fixed_point(NULL, buf); + y_white = png_get_fixed_point(NULL, buf + 4); + x_red = png_get_fixed_point(NULL, buf + 8); + y_red = png_get_fixed_point(NULL, buf + 12); + x_green = png_get_fixed_point(NULL, buf + 16); + y_green = png_get_fixed_point(NULL, buf + 20); + x_blue = png_get_fixed_point(NULL, buf + 24); + y_blue = png_get_fixed_point(NULL, buf + 28); - uint_x = png_get_uint_32(buf + 8); - uint_y = png_get_uint_32(buf + 12); - int_x_red = (png_fixed_point)uint_x; - int_y_red = (png_fixed_point)uint_y; - - uint_x = png_get_uint_32(buf + 16); - uint_y = png_get_uint_32(buf + 20); - int_x_green = (png_fixed_point)uint_x; - int_y_green = (png_fixed_point)uint_y; - - uint_x = png_get_uint_32(buf + 24); - uint_y = png_get_uint_32(buf + 28); - int_x_blue = (png_fixed_point)uint_x; - int_y_blue = (png_fixed_point)uint_y; - -#ifdef PNG_FLOATING_POINT_SUPPORTED - white_x = (float)int_x_white / (float)100000.0; - white_y = (float)int_y_white / (float)100000.0; - red_x = (float)int_x_red / (float)100000.0; - red_y = (float)int_y_red / (float)100000.0; - green_x = (float)int_x_green / (float)100000.0; - green_y = (float)int_y_green / (float)100000.0; - blue_x = (float)int_x_blue / (float)100000.0; - blue_y = (float)int_y_blue / (float)100000.0; -#endif + if (x_white == PNG_FIXED_ERROR || + y_white == PNG_FIXED_ERROR || + x_red == PNG_FIXED_ERROR || + y_red == PNG_FIXED_ERROR || + x_green == PNG_FIXED_ERROR || + y_green == PNG_FIXED_ERROR || + x_blue == PNG_FIXED_ERROR || + y_blue == PNG_FIXED_ERROR) + { + png_warning(png_ptr, "Ignoring cHRM chunk with negative chromaticities"); + return; + } #ifdef PNG_READ_sRGB_SUPPORTED if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB)) + { + if (PNG_OUT_OF_RANGE(x_white, 31270, 1000) || + PNG_OUT_OF_RANGE(y_white, 32900, 1000) || + PNG_OUT_OF_RANGE(x_red, 64000L, 1000) || + PNG_OUT_OF_RANGE(y_red, 33000, 1000) || + PNG_OUT_OF_RANGE(x_green, 30000, 1000) || + PNG_OUT_OF_RANGE(y_green, 60000L, 1000) || + PNG_OUT_OF_RANGE(x_blue, 15000, 1000) || + PNG_OUT_OF_RANGE(y_blue, 6000, 1000)) { - if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) || - PNG_OUT_OF_RANGE(int_y_white, 32900, 1000) || - PNG_OUT_OF_RANGE(int_x_red, 64000L, 1000) || - PNG_OUT_OF_RANGE(int_y_red, 33000, 1000) || - PNG_OUT_OF_RANGE(int_x_green, 30000, 1000) || - PNG_OUT_OF_RANGE(int_y_green, 60000L, 1000) || - PNG_OUT_OF_RANGE(int_x_blue, 15000, 1000) || - PNG_OUT_OF_RANGE(int_y_blue, 6000, 1000)) - { - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); + png_warning(png_ptr, + "Ignoring incorrect cHRM value when sRGB is also present"); + #ifdef PNG_CONSOLE_IO_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED - fprintf(stderr, "wx=%f, wy=%f, rx=%f, ry=%f\n", - white_x, white_y, red_x, red_y); - fprintf(stderr, "gx=%f, gy=%f, bx=%f, by=%f\n", - green_x, green_y, blue_x, blue_y); -#else - fprintf(stderr, "wx=%ld, wy=%ld, rx=%ld, ry=%ld\n", - (long)int_x_white, (long)int_y_white, - (long)int_x_red, (long)int_y_red); - fprintf(stderr, "gx=%ld, gy=%ld, bx=%ld, by=%ld\n", - (long)int_x_green, (long)int_y_green, - (long)int_x_blue, (long)int_y_blue); -#endif + fprintf(stderr, "wx=%d, wy=%d, rx=%d, ry=%d\n", + x_white, y_white, x_red, y_red); + + fprintf(stderr, "gx=%d, gy=%d, bx=%d, by=%d\n", + x_green, y_green, x_blue, y_blue); #endif /* PNG_CONSOLE_IO_SUPPORTED */ - } - return; } + return; + } #endif /* PNG_READ_sRGB_SUPPORTED */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_cHRM(png_ptr, info_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_set_cHRM_fixed(png_ptr, info_ptr, - int_x_white, int_y_white, int_x_red, int_y_red, int_x_green, - int_y_green, int_x_blue, int_y_blue); -#endif + png_set_cHRM_fixed(png_ptr, info_ptr, x_white, y_white, x_red, y_red, + x_green, y_green, x_blue, y_blue); } #endif @@ -934,12 +1051,14 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before sRGB"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid sRGB after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (png_ptr->mode & PNG_HAVE_PLTE) /* Should be an error, but we can cope with it */ png_warning(png_ptr, "Out of place sRGB chunk"); @@ -959,10 +1078,12 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, 1); + if (png_crc_finish(png_ptr, 0)) return; intent = buf[0]; + /* Check for bad intent */ if (intent >= PNG_sRGB_INTENT_LAST) { @@ -973,48 +1094,31 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) #if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)) { - png_fixed_point igamma; -#ifdef PNG_FIXED_POINT_SUPPORTED - igamma=info_ptr->int_gamma; -#else -# ifdef PNG_FLOATING_POINT_SUPPORTED - igamma=(png_fixed_point)(info_ptr->gamma * 100000.); -# endif -#endif - if (PNG_OUT_OF_RANGE(igamma, 45500L, 500)) + if (PNG_OUT_OF_RANGE(info_ptr->gamma, 45500L, 500)) { png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); + "Ignoring incorrect gAMA value when sRGB is also present"); #ifdef PNG_CONSOLE_IO_SUPPORTED -# ifdef PNG_FIXED_POINT_SUPPORTED - fprintf(stderr, "incorrect gamma=(%d/100000)\n", - (int)png_ptr->int_gamma); -# else -# ifdef PNG_FLOATING_POINT_SUPPORTED - fprintf(stderr, "incorrect gamma=%f\n", png_ptr->gamma); -# endif -# endif + fprintf(stderr, "incorrect gamma=(%d/100000)\n", info_ptr->gamma); #endif } } #endif /* PNG_READ_gAMA_SUPPORTED */ #ifdef PNG_READ_cHRM_SUPPORTED -#ifdef PNG_FIXED_POINT_SUPPORTED if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) - if (PNG_OUT_OF_RANGE(info_ptr->int_x_white, 31270, 1000) || - PNG_OUT_OF_RANGE(info_ptr->int_y_white, 32900, 1000) || - PNG_OUT_OF_RANGE(info_ptr->int_x_red, 64000L, 1000) || - PNG_OUT_OF_RANGE(info_ptr->int_y_red, 33000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->int_x_green, 30000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->int_y_green, 60000L, 1000) || - PNG_OUT_OF_RANGE(info_ptr->int_x_blue, 15000, 1000) || - PNG_OUT_OF_RANGE(info_ptr->int_y_blue, 6000, 1000)) - { - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); - } -#endif /* PNG_FIXED_POINT_SUPPORTED */ + if (PNG_OUT_OF_RANGE(info_ptr->x_white, 31270, 1000) || + PNG_OUT_OF_RANGE(info_ptr->y_white, 32900, 1000) || + PNG_OUT_OF_RANGE(info_ptr->x_red, 64000L, 1000) || + PNG_OUT_OF_RANGE(info_ptr->y_red, 33000, 1000) || + PNG_OUT_OF_RANGE(info_ptr->x_green, 30000, 1000) || + PNG_OUT_OF_RANGE(info_ptr->y_green, 60000L, 1000) || + PNG_OUT_OF_RANGE(info_ptr->x_blue, 15000, 1000) || + PNG_OUT_OF_RANGE(info_ptr->y_blue, 6000, 1000)) + { + png_warning(png_ptr, + "Ignoring incorrect cHRM value when sRGB is also present"); + } #endif /* PNG_READ_cHRM_SUPPORTED */ png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent); @@ -1030,19 +1134,22 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_bytep pC; png_charp profile; png_uint_32 skip = 0; - png_uint_32 profile_size, profile_length; + png_uint_32 profile_size; + png_alloc_size_t profile_length; png_size_t slength, prefix_length, data_length; png_debug(1, "in png_handle_iCCP"); if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before iCCP"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid iCCP after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (png_ptr->mode & PNG_HAVE_PLTE) /* Should be an error, but we can cope with it */ png_warning(png_ptr, "Out of place iCCP chunk"); @@ -1085,7 +1192,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* There should be at least one zero (the compression type byte) * following the separator, and we should be on it */ - if ( profile >= png_ptr->chunkdata + slength - 1) + if (profile >= png_ptr->chunkdata + slength - 1) { png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; @@ -1095,6 +1202,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Compression_type should always be zero */ compression_type = *profile++; + if (compression_type) { png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk"); @@ -1104,11 +1212,11 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) prefix_length = profile - png_ptr->chunkdata; png_decompress_chunk(png_ptr, compression_type, - slength, prefix_length, &data_length); + slength, prefix_length, &data_length); profile_length = data_length - prefix_length; - if ( prefix_length > data_length || profile_length < 4) + if (prefix_length > data_length || profile_length < 4) { png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; @@ -1118,36 +1226,43 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Check the profile_size recorded in the first 32 bits of the ICC profile */ pC = (png_bytep)(png_ptr->chunkdata + prefix_length); - profile_size = ((*(pC ))<<24) | - ((*(pC + 1))<<16) | - ((*(pC + 2))<< 8) | - ((*(pC + 3)) ); + profile_size = ((*(pC )) << 24) | + ((*(pC + 1)) << 16) | + ((*(pC + 2)) << 8) | + ((*(pC + 3)) ); + /* NOTE: the following guarantees that 'profile_length' fits into 32 bits, + * because profile_size is a 32 bit value. + */ if (profile_size < profile_length) profile_length = profile_size; + /* And the following guarantees that profile_size == profile_length. */ if (profile_size > profile_length) { png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; - png_warning(png_ptr, "Ignoring truncated iCCP profile"); #ifdef PNG_STDIO_SUPPORTED - { - char umsg[50]; + { + char umsg[80]; - png_snprintf(umsg, 50, "declared profile size = %lu", - (unsigned long)profile_size); - png_warning(png_ptr, umsg); - png_snprintf(umsg, 50, "actual profile length = %lu", - (unsigned long)profile_length); - png_warning(png_ptr, umsg); - } + png_snprintf2(umsg, 80, + "Ignoring iCCP chunk with declared size = %u " + "and actual length = %u", + (unsigned int) profile_size, + (unsigned int) profile_length); + png_warning(png_ptr, umsg); + } +#else + png_warning(png_ptr, + "Ignoring iCCP chunk with uncompressed size mismatch"); #endif return; } png_set_iCCP(png_ptr, info_ptr, png_ptr->chunkdata, - compression_type, png_ptr->chunkdata + prefix_length, profile_length); + compression_type, (png_bytep)png_ptr->chunkdata + prefix_length, + profile_size); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; } @@ -1160,12 +1275,13 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_bytep entry_start; png_sPLT_t new_palette; -#ifdef PNG_POINTER_INDEXING_SUPPORTED png_sPLT_entryp pp; -#endif - int data_length, entry_size, i; + png_uint_32 data_length; + int entry_size, i; png_uint_32 skip = 0; png_size_t slength; + png_uint_32 dl; + png_size_t max_dl; png_debug(1, "in png_handle_sPLT"); @@ -1178,6 +1294,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } + if (--png_ptr->user_chunk_cache_max == 1) { png_warning(png_ptr, "No space in chunk cache for sPLT"); @@ -1189,6 +1306,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before sPLT"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid sPLT after IDAT"); @@ -1207,6 +1325,11 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1); + + /* WARNING: this may break if size_t is less than 32 bits; it is assumed + * that the PNG_MAX_MALLOC_64K test is enabled in this case, but this is a + * potential breakage point if the types in pngconf.h aren't exactly right. + */ slength = (png_size_t)length; png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); @@ -1222,6 +1345,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; entry_start++) /* Empty loop to find end of name */ ; + ++entry_start; /* A sample depth should follow the separator, and we should be on it */ @@ -1235,7 +1359,12 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) new_palette.depth = *entry_start++; entry_size = (new_palette.depth == 8 ? 6 : 10); - data_length = (slength - (entry_start - (png_bytep)png_ptr->chunkdata)); + /* This must fit in a png_uint_32 because it is derived from the original + * chunk data length (and use 'length', not 'slength' here for clarity - + * they are guaranteed to be the same, see the tests above.) + */ + data_length = length - (png_uint_32)(entry_start - + (png_bytep)png_ptr->chunkdata); /* Integrity-check the data length */ if (data_length % entry_size) @@ -1246,15 +1375,20 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } - new_palette.nentries = (png_int_32) ( data_length / entry_size); - if ((png_uint_32) new_palette.nentries > - (png_uint_32) (PNG_SIZE_MAX / png_sizeof(png_sPLT_entry))) + dl = (png_int_32)(data_length / entry_size); + max_dl = PNG_SIZE_MAX / png_sizeof(png_sPLT_entry); + + if (dl > max_dl) { png_warning(png_ptr, "sPLT chunk too long"); return; } + + new_palette.nentries = (png_int_32)(data_length / entry_size); + new_palette.entries = (png_sPLT_entryp)png_malloc_warn( png_ptr, new_palette.nentries * png_sizeof(png_sPLT_entry)); + if (new_palette.entries == NULL) { png_warning(png_ptr, "sPLT chunk requires too much memory"); @@ -1268,40 +1402,45 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (new_palette.depth == 8) { - pp->red = *entry_start++; - pp->green = *entry_start++; - pp->blue = *entry_start++; - pp->alpha = *entry_start++; + pp->red = *entry_start++; + pp->green = *entry_start++; + pp->blue = *entry_start++; + pp->alpha = *entry_start++; } + else { - pp->red = png_get_uint_16(entry_start); entry_start += 2; - pp->green = png_get_uint_16(entry_start); entry_start += 2; - pp->blue = png_get_uint_16(entry_start); entry_start += 2; - pp->alpha = png_get_uint_16(entry_start); entry_start += 2; + pp->red = png_get_uint_16(entry_start); entry_start += 2; + pp->green = png_get_uint_16(entry_start); entry_start += 2; + pp->blue = png_get_uint_16(entry_start); entry_start += 2; + pp->alpha = png_get_uint_16(entry_start); entry_start += 2; } + pp->frequency = png_get_uint_16(entry_start); entry_start += 2; } #else pp = new_palette.entries; + for (i = 0; i < new_palette.nentries; i++) { if (new_palette.depth == 8) { - pp[i].red = *entry_start++; - pp[i].green = *entry_start++; - pp[i].blue = *entry_start++; - pp[i].alpha = *entry_start++; + pp[i].red = *entry_start++; + pp[i].green = *entry_start++; + pp[i].blue = *entry_start++; + pp[i].alpha = *entry_start++; } + else { - pp[i].red = png_get_uint_16(entry_start); entry_start += 2; - pp[i].green = png_get_uint_16(entry_start); entry_start += 2; - pp[i].blue = png_get_uint_16(entry_start); entry_start += 2; - pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2; + pp[i].red = png_get_uint_16(entry_start); entry_start += 2; + pp[i].green = png_get_uint_16(entry_start); entry_start += 2; + pp[i].blue = png_get_uint_16(entry_start); entry_start += 2; + pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2; } - pp->frequency = png_get_uint_16(entry_start); entry_start += 2; + + pp[i].frequency = png_get_uint_16(entry_start); entry_start += 2; } #endif @@ -1326,12 +1465,14 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before tRNS"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid tRNS after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) { png_warning(png_ptr, "Duplicate tRNS chunk"); @@ -1354,6 +1495,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->num_trans = 1; png_ptr->trans_color.gray = png_get_uint_16(buf); } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) { png_byte buf[6]; @@ -1364,12 +1506,14 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } + png_crc_read(png_ptr, buf, (png_size_t)length); png_ptr->num_trans = 1; png_ptr->trans_color.red = png_get_uint_16(buf); png_ptr->trans_color.green = png_get_uint_16(buf + 2); png_ptr->trans_color.blue = png_get_uint_16(buf + 4); } + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { if (!(png_ptr->mode & PNG_HAVE_PLTE)) @@ -1377,6 +1521,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Should be an error, but we can cope with it. */ png_warning(png_ptr, "Missing PLTE before tRNS"); } + if (length > (png_uint_32)png_ptr->num_palette || length > PNG_MAX_PALETTE_LENGTH) { @@ -1384,15 +1529,18 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } + if (length == 0) { png_warning(png_ptr, "Zero length tRNS chunk"); png_crc_finish(png_ptr, length); return; } + png_crc_read(png_ptr, readbuf, (png_size_t)length); png_ptr->num_trans = (png_uint_16)length; } + else { png_warning(png_ptr, "tRNS chunk not allowed with alpha channel"); @@ -1407,7 +1555,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans, - &(png_ptr->trans_color)); + &(png_ptr->trans_color)); } #endif @@ -1422,19 +1570,22 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before bKGD"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid bKGD after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) + !(png_ptr->mode & PNG_HAVE_PLTE)) { png_warning(png_ptr, "Missing PLTE before bKGD"); png_crc_finish(png_ptr, length); return; } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)) { png_warning(png_ptr, "Duplicate bKGD chunk"); @@ -1444,8 +1595,10 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) truelen = 1; + else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) truelen = 6; + else truelen = 2; @@ -1457,31 +1610,38 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, truelen); + if (png_crc_finish(png_ptr, 0)) return; /* We convert the index value into RGB components so that we can allow * arbitrary RGB values for background when we have transparency, and * so it is easy to determine the RGB values of the background color - * from the info_ptr struct. */ + * from the info_ptr struct. + */ if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { png_ptr->background.index = buf[0]; + if (info_ptr && info_ptr->num_palette) { - if (buf[0] >= info_ptr->num_palette) - { - png_warning(png_ptr, "Incorrect bKGD chunk index value"); - return; - } - png_ptr->background.red = + if (buf[0] >= info_ptr->num_palette) + { + png_warning(png_ptr, "Incorrect bKGD chunk index value"); + return; + } + + png_ptr->background.red = (png_uint_16)png_ptr->palette[buf[0]].red; - png_ptr->background.green = + + png_ptr->background.green = (png_uint_16)png_ptr->palette[buf[0]].green; - png_ptr->background.blue = + + png_ptr->background.blue = (png_uint_16)png_ptr->palette[buf[0]].blue; } } + else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */ { png_ptr->background.red = @@ -1489,6 +1649,7 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->background.blue = png_ptr->background.gray = png_get_uint_16(buf); } + else { png_ptr->background.red = png_get_uint_16(buf); @@ -1511,18 +1672,21 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before hIST"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid hIST after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (!(png_ptr->mode & PNG_HAVE_PLTE)) { png_warning(png_ptr, "Missing PLTE before hIST"); png_crc_finish(png_ptr, length); return; } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)) { png_warning(png_ptr, "Duplicate hIST chunk"); @@ -1531,8 +1695,9 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } num = length / 2 ; - if (num != (unsigned int) png_ptr->num_palette || num > - (unsigned int) PNG_MAX_PALETTE_LENGTH) + + if (num != (unsigned int)png_ptr->num_palette || num > + (unsigned int)PNG_MAX_PALETTE_LENGTH) { png_warning(png_ptr, "Incorrect hIST chunk length"); png_crc_finish(png_ptr, length); @@ -1566,12 +1731,14 @@ png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before pHYs"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid pHYs after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) { png_warning(png_ptr, "Duplicate pHYs chunk"); @@ -1587,6 +1754,7 @@ png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, 9); + if (png_crc_finish(png_ptr, 0)) return; @@ -1609,12 +1777,14 @@ png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before oFFs"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid oFFs after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) { png_warning(png_ptr, "Duplicate oFFs chunk"); @@ -1630,6 +1800,7 @@ png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, 9); + if (png_crc_finish(png_ptr, 0)) return; @@ -1656,12 +1827,14 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before pCAL"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid pCAL after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)) { png_warning(png_ptr, "Duplicate pCAL chunk"); @@ -1669,15 +1842,17 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } - png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)", - length + 1); + png_debug1(2, "Allocating and reading pCAL chunk data (%u bytes)", + length + 1); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (png_ptr->chunkdata == NULL) - { - png_warning(png_ptr, "No memory for pCAL purpose"); - return; - } + { + png_warning(png_ptr, "No memory for pCAL purpose"); + return; + } + slength = (png_size_t)length; png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); @@ -1697,7 +1872,8 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) endptr = png_ptr->chunkdata + slength; /* We need to have at least 12 bytes after the purpose string - in order to get the parameter information. */ + * in order to get the parameter information. + */ if (endptr <= buf + 12) { png_warning(png_ptr, "Invalid pCAL data"); @@ -1715,7 +1891,8 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_debug(3, "Checking pCAL equation type and number of parameters"); /* Check that we have the right number of parameters for known - equation types. */ + * equation types. + */ if ((type == PNG_EQUATION_LINEAR && nparams != 2) || (type == PNG_EQUATION_BASE_E && nparams != 3) || (type == PNG_EQUATION_ARBITRARY && nparams != 3) || @@ -1726,6 +1903,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = NULL; return; } + else if (type >= PNG_EQUATION_LAST) { png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); @@ -1735,15 +1913,17 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Empty loop to move past the units string. */ ; png_debug(3, "Allocating pCAL parameters array"); + params = (png_charpp)png_malloc_warn(png_ptr, - (png_size_t)(nparams * png_sizeof(png_charp))); + (png_size_t)(nparams * png_sizeof(png_charp))); + if (params == NULL) - { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_warning(png_ptr, "No memory for pCAL params"); - return; - } + { + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; + png_warning(png_ptr, "No memory for pCAL params"); + return; + } /* Get pointers to the start of each parameter string. */ for (i = 0; i < (int)nparams; i++) @@ -1751,6 +1931,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) buf++; /* Skip the null string terminator from previous parameter. */ png_debug1(3, "Reading pCAL parameter %d", i); + for (params[i] = buf; buf <= endptr && *buf != 0x00; buf++) /* Empty loop to move past each parameter string */ ; @@ -1779,27 +1960,21 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) void /* PRIVATE */ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { - png_charp ep; -#ifdef PNG_FLOATING_POINT_SUPPORTED - double width, height; - png_charp vp; -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - png_charp swidth, sheight; -#endif -#endif - png_size_t slength; + png_size_t slength, i; + int state; png_debug(1, "in png_handle_sCAL"); if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Missing IHDR before sCAL"); + else if (png_ptr->mode & PNG_HAVE_IDAT) { png_warning(png_ptr, "Invalid sCAL after IDAT"); png_crc_finish(png_ptr, length); return; } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL)) { png_warning(png_ptr, "Duplicate sCAL chunk"); @@ -1807,17 +1982,21 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } - png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)", + png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)", length + 1); + png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (png_ptr->chunkdata == NULL) { png_warning(png_ptr, "Out of memory while processing sCAL chunk"); png_crc_finish(png_ptr, length); return; } + slength = (png_size_t)length; png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); + png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */ if (png_crc_finish(png_ptr, 0)) { @@ -1826,108 +2005,44 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } - png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */ - - ep = png_ptr->chunkdata + 1; /* Skip unit byte */ - -#ifdef PNG_FLOATING_POINT_SUPPORTED - width = png_strtod(png_ptr, ep, &vp); - if (*vp) + /* Validate the unit. */ + if (png_ptr->chunkdata[0] != 1 && png_ptr->chunkdata[0] != 2) { - png_warning(png_ptr, "malformed width string in sCAL chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - swidth = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1); - if (swidth == NULL) - { - png_warning(png_ptr, "Out of memory while processing sCAL chunk width"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; - } - png_memcpy(swidth, ep, png_strlen(ep)); -#endif -#endif - - for (ep = png_ptr->chunkdata; *ep; ep++) - /* Empty loop */ ; - ep++; - - if (png_ptr->chunkdata + slength < ep) - { - png_warning(png_ptr, "Truncated sCAL chunk"); -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); -#endif + png_warning(png_ptr, "Invalid sCAL ignored: invalid unit"); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; return; } -#ifdef PNG_FLOATING_POINT_SUPPORTED - height = png_strtod(png_ptr, ep, &vp); - if (*vp) - { - png_warning(png_ptr, "malformed height string in sCAL chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); -#endif - return; - } -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - sheight = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1); - if (sheight == NULL) - { - png_warning(png_ptr, "Out of memory while processing sCAL chunk height"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); -#endif - return; - } - png_memcpy(sheight, ep, png_strlen(ep)); -#endif -#endif + /* Validate the ASCII numbers, need two ASCII numbers separated by + * a '\0' and they need to fit exactly in the chunk data. + */ + i = 0; + state = 0; - if (png_ptr->chunkdata + slength < ep -#ifdef PNG_FLOATING_POINT_SUPPORTED - || width <= 0. || height <= 0. -#endif - ) + if (png_ptr->chunkdata[1] == 45 /* negative width */ || + !png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) || + i >= slength || png_ptr->chunkdata[i++] != 0) + png_warning(png_ptr, "Invalid sCAL chunk ignored: bad width format"); + + else { - png_warning(png_ptr, "Invalid sCAL data"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); - png_free(png_ptr, sheight); -#endif - return; + png_size_t heighti = i; + + if (png_ptr->chunkdata[i] == 45 /* negative height */ || + !png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) || + i != slength) + png_warning(png_ptr, "Invalid sCAL chunk ignored: bad height format"); + + else + /* This is the (only) success case. */ + png_set_sCAL_s(png_ptr, info_ptr, png_ptr->chunkdata[0], + png_ptr->chunkdata+1, png_ptr->chunkdata+heighti); } - -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_sCAL(png_ptr, info_ptr, png_ptr->chunkdata[0], width, height); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - png_set_sCAL_s(png_ptr, info_ptr, png_ptr->chunkdata[0], swidth, sheight); -#endif -#endif - + /* Clean up - just free the temporarily allocated buffer. */ png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); - png_free(png_ptr, sheight); -#endif } #endif @@ -1942,6 +2057,7 @@ png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Out of place tIME chunk"); + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)) { png_warning(png_ptr, "Duplicate tIME chunk"); @@ -1960,6 +2076,7 @@ png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) } png_crc_read(png_ptr, buf, 7); + if (png_crc_finish(png_ptr, 0)) return; @@ -1996,6 +2113,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } + if (--png_ptr->user_chunk_cache_max == 1) { png_warning(png_ptr, "No space in chunk cache for tEXt"); @@ -2023,11 +2141,13 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (png_ptr->chunkdata == NULL) { png_warning(png_ptr, "No memory to process text chunk"); return; } + slength = (png_size_t)length; png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); @@ -2049,21 +2169,21 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) text++; text_ptr = (png_textp)png_malloc_warn(png_ptr, - png_sizeof(png_text)); + png_sizeof(png_text)); + if (text_ptr == NULL) { - png_warning(png_ptr, "Not enough memory to process text chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; + png_warning(png_ptr, "Not enough memory to process text chunk"); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; + return; } + text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; text_ptr->key = key; -#ifdef PNG_iTXt_SUPPORTED text_ptr->lang = NULL; text_ptr->lang_key = NULL; text_ptr->itxt_length = 0; -#endif text_ptr->text = text; text_ptr->text_length = png_strlen(text); @@ -2072,8 +2192,9 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; png_free(png_ptr, text_ptr); + if (ret) - png_warning(png_ptr, "Insufficient memory to process text chunk"); + png_warning(png_ptr, "Insufficient memory to process text chunk"); } #endif @@ -2098,6 +2219,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } + if (--png_ptr->user_chunk_cache_max == 1) { png_warning(png_ptr, "No space in chunk cache for zTXt"); @@ -2115,24 +2237,28 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) #ifdef PNG_MAX_MALLOC_64K /* We will no doubt have problems with chunks even half this size, but - there is no hard and fast rule to tell us where to stop. */ + * there is no hard and fast rule to tell us where to stop. + */ if (length > (png_uint_32)65535L) { - png_warning(png_ptr, "zTXt chunk too large to fit in memory"); - png_crc_finish(png_ptr, length); - return; + png_warning(png_ptr, "zTXt chunk too large to fit in memory"); + png_crc_finish(png_ptr, length); + return; } #endif png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (png_ptr->chunkdata == NULL) { - png_warning(png_ptr, "Out of memory processing zTXt chunk"); - return; + png_warning(png_ptr, "Out of memory processing zTXt chunk"); + return; } + slength = (png_size_t)length; png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); + if (png_crc_finish(png_ptr, 0)) { png_free(png_ptr, png_ptr->chunkdata); @@ -2153,37 +2279,41 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = NULL; return; } + else { comp_type = *(++text); + if (comp_type != PNG_TEXT_COMPRESSION_zTXt) { png_warning(png_ptr, "Unknown compression type in zTXt chunk"); comp_type = PNG_TEXT_COMPRESSION_zTXt; } + text++; /* Skip the compression_method byte */ } + prefix_len = text - png_ptr->chunkdata; png_decompress_chunk(png_ptr, comp_type, - (png_size_t)length, prefix_len, &data_len); + (png_size_t)length, prefix_len, &data_len); text_ptr = (png_textp)png_malloc_warn(png_ptr, - png_sizeof(png_text)); + png_sizeof(png_text)); + if (text_ptr == NULL) { - png_warning(png_ptr, "Not enough memory to process zTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; + png_warning(png_ptr, "Not enough memory to process zTXt chunk"); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; + return; } + text_ptr->compression = comp_type; text_ptr->key = png_ptr->chunkdata; -#ifdef PNG_iTXt_SUPPORTED text_ptr->lang = NULL; text_ptr->lang_key = NULL; text_ptr->itxt_length = 0; -#endif text_ptr->text = png_ptr->chunkdata + prefix_len; text_ptr->text_length = data_len; @@ -2192,8 +2322,9 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, text_ptr); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; + if (ret) - png_error(png_ptr, "Insufficient memory to store zTXt chunk"); + png_error(png_ptr, "Insufficient memory to store zTXt chunk"); } #endif @@ -2219,6 +2350,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } + if (--png_ptr->user_chunk_cache_max == 1) { png_warning(png_ptr, "No space in chunk cache for iTXt"); @@ -2236,24 +2368,28 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) #ifdef PNG_MAX_MALLOC_64K /* We will no doubt have problems with chunks even half this size, but - there is no hard and fast rule to tell us where to stop. */ + * there is no hard and fast rule to tell us where to stop. + */ if (length > (png_uint_32)65535L) { - png_warning(png_ptr, "iTXt chunk too large to fit in memory"); - png_crc_finish(png_ptr, length); - return; + png_warning(png_ptr, "iTXt chunk too large to fit in memory"); + png_crc_finish(png_ptr, length); + return; } #endif png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (png_ptr->chunkdata == NULL) { - png_warning(png_ptr, "No memory to process iTXt chunk"); - return; + png_warning(png_ptr, "No memory to process iTXt chunk"); + return; } + slength = (png_size_t)length; png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); + if (png_crc_finish(png_ptr, 0)) { png_free(png_ptr, png_ptr->chunkdata); @@ -2265,6 +2401,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) for (lang = png_ptr->chunkdata; *lang; lang++) /* Empty loop */ ; + lang++; /* Skip NUL separator */ /* iTXt must have a language tag (possibly empty), two compression bytes, @@ -2279,14 +2416,16 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_ptr->chunkdata = NULL; return; } + else { - comp_flag = *lang++; - comp_type = *lang++; + comp_flag = *lang++; + comp_type = *lang++; } for (lang_key = lang; *lang_key; lang_key++) /* Empty loop */ ; + lang_key++; /* Skip NUL separator */ if (lang_key >= png_ptr->chunkdata + slength) @@ -2299,7 +2438,9 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) for (text = lang_key; *text; text++) /* Empty loop */ ; + text++; /* Skip NUL separator */ + if (text >= png_ptr->chunkdata + slength) { png_warning(png_ptr, "Malformed iTXt chunk"); @@ -2311,20 +2452,25 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) prefix_len = text - png_ptr->chunkdata; key=png_ptr->chunkdata; + if (comp_flag) - png_decompress_chunk(png_ptr, comp_type, - (size_t)length, prefix_len, &data_len); + png_decompress_chunk(png_ptr, comp_type, + (size_t)length, prefix_len, &data_len); + else - data_len = png_strlen(png_ptr->chunkdata + prefix_len); + data_len = png_strlen(png_ptr->chunkdata + prefix_len); + text_ptr = (png_textp)png_malloc_warn(png_ptr, - png_sizeof(png_text)); + png_sizeof(png_text)); + if (text_ptr == NULL) { - png_warning(png_ptr, "Not enough memory to process iTXt chunk"); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - return; + png_warning(png_ptr, "Not enough memory to process iTXt chunk"); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; + return; } + text_ptr->compression = (int)comp_flag + 1; text_ptr->lang_key = png_ptr->chunkdata + (lang_key - key); text_ptr->lang = png_ptr->chunkdata + (lang - key); @@ -2338,16 +2484,18 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, text_ptr); png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; + if (ret) - png_error(png_ptr, "Insufficient memory to store iTXt chunk"); + png_error(png_ptr, "Insufficient memory to store iTXt chunk"); } #endif /* This function is called when we haven't found a handler for a - chunk. If there isn't a problem with the chunk itself (ie bad - chunk name, CRC, or a critical chunk), the chunk is silently ignored - -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which - case it will be saved away to be written out later. */ + * chunk. If there isn't a problem with the chunk itself (ie bad + * chunk name, CRC, or a critical chunk), the chunk is silently ignored + * -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which + * case it will be saved away to be written out later. + */ void /* PRIVATE */ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { @@ -2363,6 +2511,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, length); return; } + if (--png_ptr->user_chunk_cache_max == 1) { png_warning(png_ptr, "No space in chunk cache for unknown chunk"); @@ -2375,6 +2524,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) if (png_ptr->mode & PNG_HAVE_IDAT) { PNG_IDAT; + if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) /* Not an IDAT */ png_ptr->mode |= PNG_AFTER_IDAT; } @@ -2383,13 +2533,13 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - PNG_HANDLE_CHUNK_ALWAYS + PNG_HANDLE_CHUNK_ALWAYS #ifdef PNG_READ_USER_CHUNKS_SUPPORTED - && png_ptr->read_user_chunk_fn == NULL + && png_ptr->read_user_chunk_fn == NULL #endif - ) + ) #endif - png_chunk_error(png_ptr, "unknown critical chunk"); + png_chunk_error(png_ptr, "unknown critical chunk"); } #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED @@ -2397,56 +2547,71 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) #ifdef PNG_READ_USER_CHUNKS_SUPPORTED || (png_ptr->read_user_chunk_fn != NULL) #endif - ) + ) { #ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "unknown chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr, "unknown chunk too large to fit in memory"); + skip = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } #endif - png_memcpy((png_charp)png_ptr->unknown_chunk.name, - (png_charp)png_ptr->chunk_name, - png_sizeof(png_ptr->unknown_chunk.name)); - png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] - = '\0'; - png_ptr->unknown_chunk.size = (png_size_t)length; - if (length == 0) + + png_memcpy((png_charp)png_ptr->unknown_chunk.name, + (png_charp)png_ptr->chunk_name, + png_sizeof(png_ptr->unknown_chunk.name)); + + png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] + = '\0'; + + png_ptr->unknown_chunk.size = (png_size_t)length; + + if (length == 0) png_ptr->unknown_chunk.data = NULL; - else - { + + else + { png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length); png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length); - } + } + #ifdef PNG_READ_USER_CHUNKS_SUPPORTED - if (png_ptr->read_user_chunk_fn != NULL) - { - /* Callback to user unknown chunk handler */ - int ret; - ret = (*(png_ptr->read_user_chunk_fn)) - (png_ptr, &png_ptr->unknown_chunk); - if (ret < 0) - png_chunk_error(png_ptr, "error in user chunk"); - if (ret == 0) - { - if (!(png_ptr->chunk_name[0] & 0x20)) + if (png_ptr->read_user_chunk_fn != NULL) + { + /* Callback to user unknown chunk handler */ + int ret; + + ret = (*(png_ptr->read_user_chunk_fn)) + (png_ptr, &png_ptr->unknown_chunk); + + if (ret < 0) + png_chunk_error(png_ptr, "error in user chunk"); + + if (ret == 0) + { + if (!(png_ptr->chunk_name[0] & 0x20)) + { #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - PNG_HANDLE_CHUNK_ALWAYS) + if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != + PNG_HANDLE_CHUNK_ALWAYS) #endif - png_chunk_error(png_ptr, "unknown critical chunk"); - png_set_unknown_chunks(png_ptr, info_ptr, - &png_ptr->unknown_chunk, 1); - } - } - else + png_chunk_error(png_ptr, "unknown critical chunk"); + } + + png_set_unknown_chunks(png_ptr, info_ptr, + &png_ptr->unknown_chunk, 1); + } + } + + else #endif - png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1); - png_free(png_ptr, png_ptr->unknown_chunk.data); - png_ptr->unknown_chunk.data = NULL; + png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1); + + png_free(png_ptr, png_ptr->unknown_chunk.data); + png_ptr->unknown_chunk.data = NULL; } + else #endif skip = length; @@ -2454,20 +2619,21 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_crc_finish(png_ptr, skip); #ifndef PNG_READ_USER_CHUNKS_SUPPORTED - info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */ + PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */ #endif } /* This function is called to verify that a chunk name is valid. - This function can't have the "critical chunk check" incorporated - into it, since in the future we will need to be able to call user - functions to handle unknown critical chunks after we check that - the chunk name itself is valid. */ + * This function can't have the "critical chunk check" incorporated + * into it, since in the future we will need to be able to call user + * functions to handle unknown critical chunks after we check that + * the chunk name itself is valid. + */ #define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97)) void /* PRIVATE */ -png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name) +png_check_chunk_name(png_structp png_ptr, png_const_bytep chunk_name) { png_debug(1, "in png_check_chunk_name"); if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) || @@ -2478,25 +2644,28 @@ png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name) } /* Combines the row recently read in with the existing pixels in the - row. This routine takes care of alpha and transparency if requested. - This routine also handles the two methods of progressive display - of interlaced images, depending on the mask value. - The mask value describes which pixels are to be combined with - the row. The pattern always repeats every 8 pixels, so just 8 - bits are needed. A one indicates the pixel is to be combined, - a zero indicates the pixel is to be skipped. This is in addition - to any alpha or transparency value associated with the pixel. If - you want all pixels to be combined, pass 0xff (255) in mask. */ + * row. This routine takes care of alpha and transparency if requested. + * This routine also handles the two methods of progressive display + * of interlaced images, depending on the mask value. + * The mask value describes which pixels are to be combined with + * the row. The pattern always repeats every 8 pixels, so just 8 + * bits are needed. A one indicates the pixel is to be combined, + * a zero indicates the pixel is to be skipped. This is in addition + * to any alpha or transparency value associated with the pixel. If + * you want all pixels to be combined, pass 0xff (255) in mask. + */ void /* PRIVATE */ png_combine_row(png_structp png_ptr, png_bytep row, int mask) { png_debug(1, "in png_combine_row"); + if (mask == 0xff) { png_memcpy(row, png_ptr->row_buf + 1, - PNG_ROWBYTES(png_ptr->row_info.pixel_depth, png_ptr->width)); + PNG_ROWBYTES(png_ptr->row_info.pixel_depth, png_ptr->width)); } + else { switch (png_ptr->row_info.pixel_depth) @@ -2518,6 +2687,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) s_end = 7; s_inc = 1; } + else #endif { @@ -2545,16 +2715,19 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) sp++; dp++; } + else shift += s_inc; if (m == 1) m = 0x80; + else m >>= 1; } break; } + case 2: { png_bytep sp = png_ptr->row_buf + 1; @@ -2573,6 +2746,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) s_end = 6; s_inc = 2; } + else #endif { @@ -2598,15 +2772,19 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) sp++; dp++; } + else shift += s_inc; + if (m == 1) m = 0x80; + else m >>= 1; } break; } + case 4: { png_bytep sp = png_ptr->row_buf + 1; @@ -2625,6 +2803,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) s_end = 4; s_inc = 4; } + else #endif { @@ -2649,15 +2828,19 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) sp++; dp++; } + else shift += s_inc; + if (m == 1) m = 0x80; + else m >>= 1; } break; } + default: { png_bytep sp = png_ptr->row_buf + 1; @@ -2667,7 +2850,6 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) png_uint_32 row_width = png_ptr->width; png_byte m = 0x80; - for (i = 0; i < row_width; i++) { if (m & mask) @@ -2680,6 +2862,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) if (m == 1) m = 0x80; + else m >>= 1; } @@ -2690,10 +2873,6 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) } #ifdef PNG_READ_INTERLACING_SUPPORTED -/* OLD pre-1.0.9 interface: -void png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass, - png_uint_32 transformations) - */ void /* PRIVATE */ png_do_read_interlace(png_structp png_ptr) { @@ -2734,6 +2913,7 @@ png_do_read_interlace(png_structp png_ptr) s_end = 0; s_inc = -1; } + else #endif { @@ -2751,24 +2931,29 @@ png_do_read_interlace(png_structp png_ptr) { *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); *dp |= (png_byte)(v << dshift); + if (dshift == s_end) { dshift = s_start; dp--; } + else dshift += s_inc; } + if (sshift == s_end) { sshift = s_start; sp--; } + else sshift += s_inc; } break; } + case 2: { png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2); @@ -2787,6 +2972,7 @@ png_do_read_interlace(png_structp png_ptr) s_end = 0; s_inc = -2; } + else #endif { @@ -2807,24 +2993,29 @@ png_do_read_interlace(png_structp png_ptr) { *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); *dp |= (png_byte)(v << dshift); + if (dshift == s_end) { dshift = s_start; dp--; } + else dshift += s_inc; } + if (sshift == s_end) { sshift = s_start; sp--; } + else sshift += s_inc; } break; } + case 4: { png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1); @@ -2843,6 +3034,7 @@ png_do_read_interlace(png_structp png_ptr) s_end = 0; s_inc = -4; } + else #endif { @@ -2862,19 +3054,23 @@ png_do_read_interlace(png_structp png_ptr) { *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); *dp |= (png_byte)(v << dshift); + if (dshift == s_end) { dshift = s_start; dp--; } + else dshift += s_inc; } + if (sshift == s_end) { sshift = s_start; sp--; } + else sshift += s_inc; } @@ -2883,8 +3079,10 @@ png_do_read_interlace(png_structp png_ptr) default: { png_size_t pixel_bytes = (row_info->pixel_depth >> 3); + png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes; + png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; int jstop = png_pass_inc[pass]; @@ -2896,11 +3094,13 @@ png_do_read_interlace(png_structp png_ptr) int j; png_memcpy(v, sp, pixel_bytes); + for (j = 0; j < jstop; j++) { png_memcpy(dp, v, pixel_bytes); dp -= pixel_bytes; } + sp -= pixel_bytes; } break; @@ -2910,26 +3110,27 @@ png_do_read_interlace(png_structp png_ptr) row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width); } #ifndef PNG_READ_PACKSWAP_SUPPORTED - transformations = transformations; /* Silence compiler warning */ + PNG_UNUSED(transformations) /* Silence compiler warning */ #endif } #endif /* PNG_READ_INTERLACING_SUPPORTED */ void /* PRIVATE */ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, - png_bytep prev_row, int filter) + png_const_bytep prev_row, int filter) { png_debug(1, "in png_read_filter_row"); - png_debug2(2, "row = %lu, filter = %d", png_ptr->row_number, filter); + png_debug2(2, "row = %u, filter = %d", png_ptr->row_number, filter); switch (filter) { case PNG_FILTER_VALUE_NONE: break; + case PNG_FILTER_VALUE_SUB: { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_size_t i; + png_size_t istop = row_info->rowbytes; + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; png_bytep rp = row + bpp; png_bytep lp = row; @@ -2942,10 +3143,10 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, } case PNG_FILTER_VALUE_UP: { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; + png_size_t i; + png_size_t istop = row_info->rowbytes; png_bytep rp = row; - png_bytep pp = prev_row; + png_const_bytep pp = prev_row; for (i = 0; i < istop; i++) { @@ -2956,37 +3157,39 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, } case PNG_FILTER_VALUE_AVG: { - png_uint_32 i; + png_size_t i; png_bytep rp = row; - png_bytep pp = prev_row; + png_const_bytep pp = prev_row; png_bytep lp = row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop = row_info->rowbytes - bpp; + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; + png_size_t istop = row_info->rowbytes - bpp; for (i = 0; i < bpp; i++) { *rp = (png_byte)(((int)(*rp) + - ((int)(*pp++) / 2 )) & 0xff); + ((int)(*pp++) / 2 )) & 0xff); + rp++; } for (i = 0; i < istop; i++) { *rp = (png_byte)(((int)(*rp) + - (int)(*pp++ + *lp++) / 2 ) & 0xff); + (int)(*pp++ + *lp++) / 2 ) & 0xff); + rp++; } break; } case PNG_FILTER_VALUE_PAETH: { - png_uint_32 i; + png_size_t i; png_bytep rp = row; - png_bytep pp = prev_row; + png_const_bytep pp = prev_row; png_bytep lp = row; - png_bytep cp = prev_row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop=row_info->rowbytes - bpp; + png_const_bytep cp = prev_row; + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; + png_size_t istop=row_info->rowbytes - bpp; for (i = 0; i < bpp; i++) { @@ -3018,8 +3221,10 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, /* if (pa <= pb && pa <= pc) p = a; + else if (pb <= pc) p = b; + else p = c; */ @@ -3032,8 +3237,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, break; } default: - png_warning(png_ptr, "Ignoring bad adaptive filter type"); - *row = 0; + png_error(png_ptr, "Ignoring bad adaptive filter type"); + /*NOT REACHED */ break; } } @@ -3067,13 +3272,16 @@ png_read_finish_row(png_structp png_ptr) if (png_ptr->interlaced) { png_ptr->row_number = 0; - png_memset(png_ptr->prev_row, 0, - png_ptr->rowbytes + 1); + + png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + do { png_ptr->pass++; + if (png_ptr->pass >= 7) break; + png_ptr->iwidth = (png_ptr->width + png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / @@ -3082,15 +3290,15 @@ png_read_finish_row(png_structp png_ptr) if (!(png_ptr->transformations & PNG_INTERLACE)) { png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; - if (!(png_ptr->num_rows)) - continue; + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; } + else /* if (png_ptr->transformations & PNG_INTERLACE) */ - break; - } while (png_ptr->iwidth == 0); + break; /* libpng deinterlacing sees every row */ + + } while (png_ptr->num_rows == 0 || png_ptr->iwidth == 0); if (png_ptr->pass < 7) return; @@ -3105,44 +3313,45 @@ png_read_finish_row(png_structp png_ptr) png_ptr->zstream.next_out = (Byte *)&extra; png_ptr->zstream.avail_out = (uInt)1; + for (;;) { if (!(png_ptr->zstream.avail_in)) { while (!png_ptr->idat_size) { - png_byte chunk_length[4]; - png_crc_finish(png_ptr, 0); - - png_read_data(png_ptr, chunk_length, 4); - png_ptr->idat_size = png_get_uint_31(png_ptr, chunk_length); - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); + png_ptr->idat_size = png_read_chunk_header(png_ptr); if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) png_error(png_ptr, "Not enough image data"); - } + png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; png_ptr->zstream.next_in = png_ptr->zbuf; + if (png_ptr->zbuf_size > png_ptr->idat_size) png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; + png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in); png_ptr->idat_size -= png_ptr->zstream.avail_in; } + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret == Z_STREAM_END) { if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in || - png_ptr->idat_size) + png_ptr->idat_size) png_warning(png_ptr, "Extra compressed data"); + png_ptr->mode |= PNG_AFTER_IDAT; png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; break; } + if (ret != Z_OK) png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression Error"); + "Decompression Error"); if (!(png_ptr->zstream.avail_out)) { @@ -3195,21 +3404,24 @@ png_read_start_row(png_structp png_ptr) { if (!(png_ptr->transformations & PNG_INTERLACE)) png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - - png_pass_ystart[0]) / png_pass_yinc[0]; + png_pass_ystart[0]) / png_pass_yinc[0]; + else png_ptr->num_rows = png_ptr->height; png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; } + else #endif /* PNG_READ_INTERLACING_SUPPORTED */ { png_ptr->num_rows = png_ptr->height; png_ptr->iwidth = png_ptr->width; } + max_pixel_depth = png_ptr->pixel_depth; #ifdef PNG_READ_PACK_SUPPORTED @@ -3224,16 +3436,20 @@ png_read_start_row(png_structp png_ptr) { if (png_ptr->num_trans) max_pixel_depth = 32; + else max_pixel_depth = 24; } + else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) { if (max_pixel_depth < 8) max_pixel_depth = 8; + if (png_ptr->num_trans) max_pixel_depth *= 2; } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) { if (png_ptr->num_trans) @@ -3245,22 +3461,44 @@ png_read_start_row(png_structp png_ptr) } #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND_16) + { +# ifdef PNG_READ_EXPAND_SUPPORTED + /* In fact it is an error if it isn't supported, but checking is + * the safe way. + */ + if (png_ptr->transformations & PNG_EXPAND) + { + if (png_ptr->bit_depth < 16) + max_pixel_depth *= 2; + } + else +# endif + png_ptr->transformations &= ~PNG_EXPAND_16; + } +#endif + #ifdef PNG_READ_FILLER_SUPPORTED if (png_ptr->transformations & (PNG_FILLER)) { if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) max_pixel_depth = 32; + else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) { if (max_pixel_depth <= 8) max_pixel_depth = 16; + else max_pixel_depth = 32; } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) { if (max_pixel_depth <= 32) max_pixel_depth = 32; + else max_pixel_depth = 64; } @@ -3272,29 +3510,34 @@ png_read_start_row(png_structp png_ptr) { if ( #ifdef PNG_READ_EXPAND_SUPPORTED - (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || + (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || #endif #ifdef PNG_READ_FILLER_SUPPORTED - (png_ptr->transformations & (PNG_FILLER)) || + (png_ptr->transformations & (PNG_FILLER)) || #endif - png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { if (max_pixel_depth <= 16) max_pixel_depth = 32; + else max_pixel_depth = 64; } + else { if (max_pixel_depth <= 8) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) max_pixel_depth = 32; - else + + else max_pixel_depth = 24; - } + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) max_pixel_depth = 64; + else max_pixel_depth = 48; } @@ -3304,12 +3547,13 @@ png_read_start_row(png_structp png_ptr) #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) if (png_ptr->transformations & PNG_USER_TRANSFORM) - { - int user_pixel_depth = png_ptr->user_transform_depth* + { + int user_pixel_depth = png_ptr->user_transform_depth* png_ptr->user_transform_channels; - if (user_pixel_depth > max_pixel_depth) + + if (user_pixel_depth > max_pixel_depth) max_pixel_depth=user_pixel_depth; - } + } #endif /* Align the width on the next larger 8 pixels. Mainly used @@ -3320,7 +3564,8 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) * for safety's sake */ row_bytes = PNG_ROWBYTES(max_pixel_depth, row_bytes) + - 1 + ((max_pixel_depth + 7) >> 3); + 1 + ((max_pixel_depth + 7) >> 3); + #ifdef PNG_MAX_MALLOC_64K if (row_bytes > (png_uint_32)65536L) png_error(png_ptr, "This image requires a row greater than 64KB"); @@ -3329,20 +3574,24 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) if (row_bytes + 48 > png_ptr->old_big_row_buf_size) { png_free(png_ptr, png_ptr->big_row_buf); + if (png_ptr->interlaced) png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr, row_bytes + 48); + else png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes + 48); + png_ptr->old_big_row_buf_size = row_bytes + 48; #ifdef PNG_ALIGNED_MEMORY_SUPPORTED /* Use 16-byte aligned memory for row_buf with at least 16 bytes * of padding before and after row_buf. */ - png_ptr->row_buf = png_ptr->big_row_buf + 32 - - (((png_alloc_size_t)&(png_ptr->big_row_buf[0]) + 15) % 16); + png_ptr->row_buf = png_ptr->big_row_buf + 32 - + (((png_alloc_size_t)png_ptr->big_row_buf + 15) & 0x0F); + png_ptr->old_big_row_buf_size = row_bytes + 48; #else /* Use 32 bytes of padding before and 16 bytes after row_buf. */ @@ -3352,29 +3601,31 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) } #ifdef PNG_MAX_MALLOC_64K - if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L) + if (png_ptr->rowbytes > 65535) png_error(png_ptr, "This image requires a row greater than 64KB"); + #endif - if ((png_uint_32)png_ptr->rowbytes > (png_uint_32)(PNG_SIZE_MAX - 1)) + if (png_ptr->rowbytes > (PNG_SIZE_MAX - 1)) png_error(png_ptr, "Row has too many bytes to allocate in memory"); if (png_ptr->rowbytes + 1 > png_ptr->old_prev_row_size) { png_free(png_ptr, png_ptr->prev_row); - png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)( - png_ptr->rowbytes + 1)); + + png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, png_ptr->rowbytes + 1); + png_ptr->old_prev_row_size = png_ptr->rowbytes + 1; } png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); - png_debug1(3, "width = %lu,", png_ptr->width); - png_debug1(3, "height = %lu,", png_ptr->height); - png_debug1(3, "iwidth = %lu,", png_ptr->iwidth); - png_debug1(3, "num_rows = %lu,", png_ptr->num_rows); - png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes); + png_debug1(3, "width = %u,", png_ptr->width); + png_debug1(3, "height = %u,", png_ptr->height); + png_debug1(3, "iwidth = %u,", png_ptr->iwidth); + png_debug1(3, "num_rows = %u,", png_ptr->num_rows); + png_debug1(3, "rowbytes = %lu,", (unsigned long)png_ptr->rowbytes); png_debug1(3, "irowbytes = %lu", - PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); + (unsigned long)PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); png_ptr->flags |= PNG_FLAG_ROW_INIT; } diff --git a/dll/3rdparty/libpng/pngset.c b/dll/3rdparty/libpng/pngset.c index 1f972c4edb6..2cfcf33bdf9 100644 --- a/dll/3rdparty/libpng/pngset.c +++ b/dll/3rdparty/libpng/pngset.c @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.4.1 [February 25, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.1 [February 3, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,14 +16,14 @@ * info struct and allows us to change the structure in the future. */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + #ifdef PNG_bKGD_SUPPORTED void PNGAPI -png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) +png_set_bKGD(png_structp png_ptr, png_infop info_ptr, + png_const_color_16p background) { png_debug1(1, "in %s storage function", "bKGD"); @@ -36,150 +36,94 @@ png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) #endif #ifdef PNG_cHRM_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_cHRM(png_structp png_ptr, png_infop info_ptr, - double white_x, double white_y, double red_x, double red_y, - double green_x, double green_y, double blue_x, double blue_y) -{ - png_debug1(1, "in %s storage function", "cHRM"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->x_white = (float)white_x; - info_ptr->y_white = (float)white_y; - info_ptr->x_red = (float)red_x; - info_ptr->y_red = (float)red_y; - info_ptr->x_green = (float)green_x; - info_ptr->y_green = (float)green_y; - info_ptr->x_blue = (float)blue_x; - info_ptr->y_blue = (float)blue_y; -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5); - info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5); - info_ptr->int_x_red = (png_fixed_point)( red_x*100000.+0.5); - info_ptr->int_y_red = (png_fixed_point)( red_y*100000.+0.5); - info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5); - info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5); - info_ptr->int_x_blue = (png_fixed_point)( blue_x*100000.+0.5); - info_ptr->int_y_blue = (png_fixed_point)( blue_y*100000.+0.5); -#endif - info_ptr->valid |= PNG_INFO_cHRM; -} -#endif /* PNG_FLOATING_POINT_SUPPORTED */ - -#ifdef PNG_FIXED_POINT_SUPPORTED -void PNGAPI +void PNGFAPI png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, - png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, - png_fixed_point blue_x, png_fixed_point blue_y) + png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, + png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, + png_fixed_point blue_x, png_fixed_point blue_y) { png_debug1(1, "in %s storage function", "cHRM fixed"); if (png_ptr == NULL || info_ptr == NULL) return; -#ifdef PNG_CHECK_cHRM_SUPPORTED +# ifdef PNG_CHECK_cHRM_SUPPORTED if (png_check_cHRM_fixed(png_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y)) -#endif + white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y)) +# endif { - info_ptr->int_x_white = white_x; - info_ptr->int_y_white = white_y; - info_ptr->int_x_red = red_x; - info_ptr->int_y_red = red_y; - info_ptr->int_x_green = green_x; - info_ptr->int_y_green = green_y; - info_ptr->int_x_blue = blue_x; - info_ptr->int_y_blue = blue_y; -#ifdef PNG_FLOATING_POINT_SUPPORTED - info_ptr->x_white = (float)(white_x/100000.); - info_ptr->y_white = (float)(white_y/100000.); - info_ptr->x_red = (float)( red_x/100000.); - info_ptr->y_red = (float)( red_y/100000.); - info_ptr->x_green = (float)(green_x/100000.); - info_ptr->y_green = (float)(green_y/100000.); - info_ptr->x_blue = (float)( blue_x/100000.); - info_ptr->y_blue = (float)( blue_y/100000.); -#endif + info_ptr->x_white = white_x; + info_ptr->y_white = white_y; + info_ptr->x_red = red_x; + info_ptr->y_red = red_y; + info_ptr->x_green = green_x; + info_ptr->y_green = green_y; + info_ptr->x_blue = blue_x; + info_ptr->y_blue = blue_y; info_ptr->valid |= PNG_INFO_cHRM; } } -#endif /* PNG_FIXED_POINT_SUPPORTED */ + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_cHRM(png_structp png_ptr, png_infop info_ptr, + double white_x, double white_y, double red_x, double red_y, + double green_x, double green_y, double blue_x, double blue_y) +{ + png_set_cHRM_fixed(png_ptr, info_ptr, + png_fixed(png_ptr, white_x, "cHRM White X"), + png_fixed(png_ptr, white_y, "cHRM White Y"), + png_fixed(png_ptr, red_x, "cHRM Red X"), + png_fixed(png_ptr, red_y, "cHRM Red Y"), + png_fixed(png_ptr, green_x, "cHRM Green X"), + png_fixed(png_ptr, green_y, "cHRM Green Y"), + png_fixed(png_ptr, blue_x, "cHRM Blue X"), + png_fixed(png_ptr, blue_y, "cHRM Blue Y")); +} +# endif /* PNG_FLOATING_POINT_SUPPORTED */ + #endif /* PNG_cHRM_SUPPORTED */ #ifdef PNG_gAMA_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGFAPI +png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point + file_gamma) +{ + png_debug1(1, "in %s storage function", "gAMA"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Previously these values were limited, however they must be + * wrong, therefore storing them (and setting PNG_INFO_gAMA) + * must be wrong too. + */ + if (file_gamma > (png_fixed_point)PNG_UINT_31_MAX) + png_warning(png_ptr, "Gamma too large, ignored"); + + else if (file_gamma <= 0) + png_warning(png_ptr, "Negative or zero gamma ignored"); + + else + { + info_ptr->gamma = file_gamma; + info_ptr->valid |= PNG_INFO_gAMA; + } +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED void PNGAPI png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) { - double png_gamma; - - png_debug1(1, "in %s storage function", "gAMA"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - /* Check for overflow */ - if (file_gamma > 21474.83) - { - png_warning(png_ptr, "Limiting gamma to 21474.83"); - png_gamma=21474.83; - } - else - png_gamma = file_gamma; - info_ptr->gamma = (float)png_gamma; -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_gamma = (int)(png_gamma*100000.+.5); -#endif - info_ptr->valid |= PNG_INFO_gAMA; - if (png_gamma == 0.0) - png_warning(png_ptr, "Setting gamma=0"); -} -#endif -void PNGAPI -png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point - int_gamma) -{ - png_fixed_point png_gamma; - - png_debug1(1, "in %s storage function", "gAMA"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (int_gamma > (png_fixed_point)PNG_UINT_31_MAX) - { - png_warning(png_ptr, "Limiting gamma to 21474.83"); - png_gamma=PNG_UINT_31_MAX; - } - else - { - if (int_gamma < 0) - { - png_warning(png_ptr, "Setting negative gamma to zero"); - png_gamma = 0; - } - else - png_gamma = int_gamma; - } -#ifdef PNG_FLOATING_POINT_SUPPORTED - info_ptr->gamma = (float)(png_gamma/100000.); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_gamma = png_gamma; -#endif - info_ptr->valid |= PNG_INFO_gAMA; - if (png_gamma == 0) - png_warning(png_ptr, "Setting gamma=0"); + png_set_gAMA_fixed(png_ptr, info_ptr, png_fixed(png_ptr, file_gamma, + "png_set_gAMA")); } +# endif #endif #ifdef PNG_hIST_SUPPORTED void PNGAPI -png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) +png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_const_uint_16p hist) { int i; @@ -192,16 +136,19 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) > PNG_MAX_PALETTE_LENGTH) { png_warning(png_ptr, - "Invalid palette size, hIST allocation skipped"); + "Invalid palette size, hIST allocation skipped"); + return; } png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); + /* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in * version 1.2.1 */ png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr, - PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16)); + PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16)); + if (png_ptr->hist == NULL) { png_warning(png_ptr, "Insufficient memory for hIST chunk data"); @@ -210,18 +157,18 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) for (i = 0; i < info_ptr->num_palette; i++) png_ptr->hist[i] = hist[i]; + info_ptr->hist = png_ptr->hist; info_ptr->valid |= PNG_INFO_hIST; - info_ptr->free_me |= PNG_FREE_HIST; } #endif void PNGAPI png_set_IHDR(png_structp png_ptr, png_infop info_ptr, - png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_type, int compression_type, - int filter_type) + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type) { png_debug1(1, "in %s storage function", "IHDR"); @@ -242,21 +189,25 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr, if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) info_ptr->channels = 1; + else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) info_ptr->channels = 3; + else info_ptr->channels = 1; + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) info_ptr->channels++; + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); /* Check for potential overflow */ - if (width > (PNG_UINT_32_MAX - >> 3) /* 8-byte RGBA pixels */ - - 64 /* bigrowbuf hack */ - - 1 /* filter byte */ - - 7*8 /* rounding of width to multiple of 8 pixels */ - - 8) /* extra max_pixel_depth pad */ + if (width > + (PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */ + - 48 /* bigrowbuf hack */ + - 1 /* filter byte */ + - 7*8 /* rounding of width to multiple of 8 pixels */ + - 8) /* extra max_pixel_depth pad */ info_ptr->rowbytes = 0; else info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); @@ -265,7 +216,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_oFFs_SUPPORTED void PNGAPI png_set_oFFs(png_structp png_ptr, png_infop info_ptr, - png_int_32 offset_x, png_int_32 offset_y, int unit_type) + png_int_32 offset_x, png_int_32 offset_y, int unit_type) { png_debug1(1, "in %s storage function", "oFFs"); @@ -282,8 +233,8 @@ png_set_oFFs(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_pCAL_SUPPORTED void PNGAPI png_set_pCAL(png_structp png_ptr, png_infop info_ptr, - png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params) + png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, + int nparams, png_const_charp units, png_charpp params) { png_size_t length; int i; @@ -295,13 +246,27 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, length = png_strlen(purpose) + 1; png_debug1(3, "allocating purpose for info (%lu bytes)", - (unsigned long)length); + (unsigned long)length); + + /* TODO: validate format of calibration name and unit name */ + + /* Check that the type matches the specification. */ + if (type < 0 || type > 3) + png_error(png_ptr, "Invalid pCAL equation type"); + + /* Validate params[nparams] */ + for (i=0; ipcal_purpose = (png_charp)png_malloc_warn(png_ptr, length); + if (info_ptr->pcal_purpose == NULL) { png_warning(png_ptr, "Insufficient memory for pCAL purpose"); return; } + png_memcpy(info_ptr->pcal_purpose, purpose, length); png_debug(3, "storing X0, X1, type, and nparams in info"); @@ -313,16 +278,20 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, length = png_strlen(units) + 1; png_debug1(3, "allocating units for info (%lu bytes)", (unsigned long)length); + info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length); + if (info_ptr->pcal_units == NULL) { png_warning(png_ptr, "Insufficient memory for pCAL units"); return; } + png_memcpy(info_ptr->pcal_units, units, length); info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr, - (png_size_t)((nparams + 1) * png_sizeof(png_charp))); + (png_size_t)((nparams + 1) * png_sizeof(png_charp))); + if (info_ptr->pcal_params == NULL) { png_warning(png_ptr, "Insufficient memory for pCAL params"); @@ -335,13 +304,16 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, { length = png_strlen(params[i]) + 1; png_debug2(3, "allocating parameter %d for info (%lu bytes)", i, - (unsigned long)length); + (unsigned long)length); + info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); + if (info_ptr->pcal_params[i] == NULL) { png_warning(png_ptr, "Insufficient memory for pCAL parameter"); return; } + png_memcpy(info_ptr->pcal_params[i], params[i], length); } @@ -350,74 +322,132 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, } #endif -#if defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_sCAL(png_structp png_ptr, png_infop info_ptr, - int unit, double width, double height) -{ - png_debug1(1, "in %s storage function", "sCAL"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->scal_unit = (png_byte)unit; - info_ptr->scal_pixel_width = width; - info_ptr->scal_pixel_height = height; - - info_ptr->valid |= PNG_INFO_sCAL; -} -#else -#ifdef PNG_FIXED_POINT_SUPPORTED +#ifdef PNG_sCAL_SUPPORTED void PNGAPI png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, - int unit, png_charp swidth, png_charp sheight) + int unit, png_const_charp swidth, png_const_charp sheight) { - png_size_t length; + png_size_t lengthw = 0, lengthh = 0; png_debug1(1, "in %s storage function", "sCAL"); if (png_ptr == NULL || info_ptr == NULL) return; + /* Double check the unit (should never get here with an invalid + * unit unless this is an API call.) + */ + if (unit != 1 && unit != 2) + png_error(png_ptr, "Invalid sCAL unit"); + + if (swidth == NULL || (lengthw = png_strlen(swidth)) <= 0 || + swidth[0] == 45 /*'-'*/ || !png_check_fp_string(swidth, lengthw)) + png_error(png_ptr, "Invalid sCAL width"); + + if (sheight == NULL || (lengthh = png_strlen(sheight)) <= 0 || + sheight[0] == 45 /*'-'*/ || !png_check_fp_string(sheight, lengthh)) + png_error(png_ptr, "Invalid sCAL height"); + info_ptr->scal_unit = (png_byte)unit; - length = png_strlen(swidth) + 1; - png_debug1(3, "allocating unit for info (%u bytes)", - (unsigned int)length); - info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, length); + ++lengthw; + + png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthw); + + info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, lengthw); + if (info_ptr->scal_s_width == NULL) { - png_warning(png_ptr, - "Memory allocation failed while processing sCAL"); + png_warning(png_ptr, "Memory allocation failed while processing sCAL"); return; } - png_memcpy(info_ptr->scal_s_width, swidth, length); - length = png_strlen(sheight) + 1; - png_debug1(3, "allocating unit for info (%u bytes)", - (unsigned int)length); - info_ptr->scal_s_height = (png_charp)png_malloc_warn(png_ptr, length); + png_memcpy(info_ptr->scal_s_width, swidth, lengthw); + + ++lengthh; + + png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthh); + + info_ptr->scal_s_height = (png_charp)png_malloc_warn(png_ptr, lengthh); + if (info_ptr->scal_s_height == NULL) { png_free (png_ptr, info_ptr->scal_s_width); info_ptr->scal_s_width = NULL; - png_warning(png_ptr, - "Memory allocation failed while processing sCAL"); + + png_warning(png_ptr, "Memory allocation failed while processing sCAL"); return; } - png_memcpy(info_ptr->scal_s_height, sheight, length); + + png_memcpy(info_ptr->scal_s_height, sheight, lengthh); + info_ptr->valid |= PNG_INFO_sCAL; info_ptr->free_me |= PNG_FREE_SCAL; } -#endif -#endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_sCAL(png_structp png_ptr, png_infop info_ptr, int unit, double width, + double height) +{ + png_debug1(1, "in %s storage function", "sCAL"); + + /* Check the arguments. */ + if (width <= 0) + png_warning(png_ptr, "Invalid sCAL width ignored"); + + else if (height <= 0) + png_warning(png_ptr, "Invalid sCAL height ignored"); + + else + { + /* Convert 'width' and 'height' to ASCII. */ + char swidth[PNG_sCAL_MAX_DIGITS+1]; + char sheight[PNG_sCAL_MAX_DIGITS+1]; + + png_ascii_from_fp(png_ptr, swidth, sizeof swidth, width, + PNG_sCAL_PRECISION); + png_ascii_from_fp(png_ptr, sheight, sizeof sheight, height, + PNG_sCAL_PRECISION); + + png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight); + } +} +# endif + +# ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_sCAL_fixed(png_structp png_ptr, png_infop info_ptr, int unit, + png_fixed_point width, png_fixed_point height) +{ + png_debug1(1, "in %s storage function", "sCAL"); + + /* Check the arguments. */ + if (width <= 0) + png_warning(png_ptr, "Invalid sCAL width ignored"); + + else if (height <= 0) + png_warning(png_ptr, "Invalid sCAL height ignored"); + + else + { + /* Convert 'width' and 'height' to ASCII. */ + char swidth[PNG_sCAL_MAX_DIGITS+1]; + char sheight[PNG_sCAL_MAX_DIGITS+1]; + + png_ascii_from_fixed(png_ptr, swidth, sizeof swidth, width); + png_ascii_from_fixed(png_ptr, sheight, sizeof sheight, height); + + png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight); + } +} +# endif #endif #ifdef PNG_pHYs_SUPPORTED void PNGAPI png_set_pHYs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 res_x, png_uint_32 res_y, int unit_type) + png_uint_32 res_x, png_uint_32 res_y, int unit_type) { png_debug1(1, "in %s storage function", "pHYs"); @@ -433,7 +463,7 @@ png_set_pHYs(png_structp png_ptr, png_infop info_ptr, void PNGAPI png_set_PLTE(png_structp png_ptr, png_infop info_ptr, - png_colorp palette, int num_palette) + png_const_colorp palette, int num_palette) { png_debug1(1, "in %s storage function", "PLTE"); @@ -445,6 +475,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr, { if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) png_error(png_ptr, "Invalid palette length"); + else { png_warning(png_ptr, "Invalid palette length"); @@ -463,7 +494,8 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr, * too-large sample values. */ png_ptr->palette = (png_colorp)png_calloc(png_ptr, - PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color)); + PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color)); + png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color)); info_ptr->palette = png_ptr->palette; info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; @@ -476,7 +508,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_sBIT_SUPPORTED void PNGAPI png_set_sBIT(png_structp png_ptr, png_infop info_ptr, - png_color_8p sig_bit) + png_const_color_8p sig_bit) { png_debug1(1, "in %s storage function", "sBIT"); @@ -490,85 +522,41 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_sRGB_SUPPORTED void PNGAPI -png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent) +png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int srgb_intent) { png_debug1(1, "in %s storage function", "sRGB"); if (png_ptr == NULL || info_ptr == NULL) return; - info_ptr->srgb_intent = (png_byte)intent; + info_ptr->srgb_intent = (png_byte)srgb_intent; info_ptr->valid |= PNG_INFO_sRGB; } void PNGAPI png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, - int intent) + int srgb_intent) { -#ifdef PNG_gAMA_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED - float file_gamma; -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_fixed_point int_file_gamma; -#endif -#endif -#ifdef PNG_cHRM_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED - float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; -#endif - png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, - int_green_y, int_blue_x, int_blue_y; -#endif png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM"); if (png_ptr == NULL || info_ptr == NULL) return; - png_set_sRGB(png_ptr, info_ptr, intent); + png_set_sRGB(png_ptr, info_ptr, srgb_intent); -#ifdef PNG_gAMA_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED - file_gamma = (float).45455; - png_set_gAMA(png_ptr, info_ptr, file_gamma); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - int_file_gamma = 45455L; - png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); -#endif -#endif +# ifdef PNG_gAMA_SUPPORTED + png_set_gAMA_fixed(png_ptr, info_ptr, 45455L); +# endif -#ifdef PNG_cHRM_SUPPORTED - int_white_x = 31270L; - int_white_y = 32900L; - int_red_x = 64000L; - int_red_y = 33000L; - int_green_x = 30000L; - int_green_y = 60000L; - int_blue_x = 15000L; - int_blue_y = 6000L; - -#ifdef PNG_FLOATING_POINT_SUPPORTED - white_x = (float).3127; - white_y = (float).3290; - red_x = (float).64; - red_y = (float).33; - green_x = (float).30; - green_y = (float).60; - blue_x = (float).15; - blue_y = (float).06; -#endif - -#ifdef PNG_FIXED_POINT_SUPPORTED +# ifdef PNG_cHRM_SUPPORTED png_set_cHRM_fixed(png_ptr, info_ptr, - int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, - int_green_y, int_blue_x, int_blue_y); -#endif -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_cHRM(png_ptr, info_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); -#endif -#endif /* cHRM */ + /* color x y */ + /* white */ 31270L, 32900L, + /* red */ 64000L, 33000L, + /* green */ 30000L, 60000L, + /* blue */ 15000L, 6000L + ); +# endif /* cHRM */ } #endif /* sRGB */ @@ -576,11 +564,11 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_iCCP_SUPPORTED void PNGAPI png_set_iCCP(png_structp png_ptr, png_infop info_ptr, - png_charp name, int compression_type, - png_charp profile, png_uint_32 proflen) + png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen) { png_charp new_iccp_name; - png_charp new_iccp_profile; + png_bytep new_iccp_profile; png_uint_32 length; png_debug1(1, "in %s storage function", "iCCP"); @@ -590,13 +578,16 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, length = png_strlen(name)+1; new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length); + if (new_iccp_name == NULL) { png_warning(png_ptr, "Insufficient memory to process iCCP chunk"); return; } + png_memcpy(new_iccp_name, name, length); - new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen); + new_iccp_profile = (png_bytep)png_malloc_warn(png_ptr, proflen); + if (new_iccp_profile == NULL) { png_free (png_ptr, new_iccp_name); @@ -604,6 +595,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, "Insufficient memory to process iCCP profile"); return; } + png_memcpy(new_iccp_profile, profile, (png_size_t)proflen); png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0); @@ -622,24 +614,25 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_TEXT_SUPPORTED void PNGAPI -png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, - int num_text) +png_set_text(png_structp png_ptr, png_infop info_ptr, png_const_textp text_ptr, + int num_text) { int ret; ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text); + if (ret) png_error(png_ptr, "Insufficient memory to store text"); } int /* PRIVATE */ -png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, - int num_text) +png_set_text_2(png_structp png_ptr, png_infop info_ptr, + png_const_textp text_ptr, int num_text) { int i; png_debug1(1, "in %s storage function", ((png_ptr == NULL || - png_ptr->chunk_name[0] == '\0') ? - "text" : (png_const_charp)png_ptr->chunk_name)); + png_ptr->chunk_name[0] == '\0') ? + "text" : (png_const_charp)png_ptr->chunk_name)); if (png_ptr == NULL || info_ptr == NULL || num_text == 0) return(0); @@ -659,27 +652,31 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, old_text = info_ptr->text; info_ptr->text = (png_textp)png_malloc_warn(png_ptr, (png_size_t)(info_ptr->max_text * png_sizeof(png_text))); + if (info_ptr->text == NULL) { png_free(png_ptr, old_text); return(1); } + png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max * - png_sizeof(png_text))); + png_sizeof(png_text))); png_free(png_ptr, old_text); } + else { info_ptr->max_text = num_text + 8; info_ptr->num_text = 0; info_ptr->text = (png_textp)png_malloc_warn(png_ptr, - (png_size_t)(info_ptr->max_text * png_sizeof(png_text))); + (png_size_t)(info_ptr->max_text * png_sizeof(png_text))); if (info_ptr->text == NULL) return(1); info_ptr->free_me |= PNG_FREE_TEXT; } + png_debug1(3, "allocated %d entries for info_ptr->text", - info_ptr->max_text); + info_ptr->max_text); } for (i = 0; i < num_text; i++) { @@ -690,6 +687,13 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, if (text_ptr[i].key == NULL) continue; + if (text_ptr[i].compression < PNG_TEXT_COMPRESSION_NONE || + text_ptr[i].compression >= PNG_TEXT_COMPRESSION_LAST) + { + png_warning(png_ptr, "text compression mode is out of range"); + continue; + } + key_len = png_strlen(text_ptr[i].key); if (text_ptr[i].compression <= 0) @@ -699,34 +703,38 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, } else -#ifdef PNG_iTXt_SUPPORTED +# ifdef PNG_iTXt_SUPPORTED { /* Set iTXt data */ if (text_ptr[i].lang != NULL) lang_len = png_strlen(text_ptr[i].lang); + else lang_len = 0; + if (text_ptr[i].lang_key != NULL) lang_key_len = png_strlen(text_ptr[i].lang_key); + else lang_key_len = 0; } -#else /* PNG_iTXt_SUPPORTED */ +# else /* PNG_iTXt_SUPPORTED */ { png_warning(png_ptr, "iTXt chunk not supported"); continue; } -#endif +# endif if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0') { text_length = 0; -#ifdef PNG_iTXt_SUPPORTED +# ifdef PNG_iTXt_SUPPORTED if (text_ptr[i].compression > 0) textp->compression = PNG_ITXT_COMPRESSION_NONE; + else -#endif +# endif textp->compression = PNG_TEXT_COMPRESSION_NONE; } @@ -737,18 +745,20 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, } textp->key = (png_charp)png_malloc_warn(png_ptr, - (png_size_t) - (key_len + text_length + lang_len + lang_key_len + 4)); + (png_size_t) + (key_len + text_length + lang_len + lang_key_len + 4)); + if (textp->key == NULL) return(1); - png_debug2(2, "Allocated %lu bytes at %x in png_set_text", - (unsigned long)(png_uint_32) - (key_len + lang_len + lang_key_len + text_length + 4), - (int)textp->key); + + png_debug2(2, "Allocated %lu bytes at %p in png_set_text", + (unsigned long)(png_uint_32) + (key_len + lang_len + lang_key_len + text_length + 4), + textp->key); png_memcpy(textp->key, text_ptr[i].key,(png_size_t)(key_len)); *(textp->key + key_len) = '\0'; -#ifdef PNG_iTXt_SUPPORTED + if (text_ptr[i].compression > 0) { textp->lang = textp->key + key_len + 1; @@ -759,35 +769,34 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, *(textp->lang_key + lang_key_len) = '\0'; textp->text = textp->lang_key + lang_key_len + 1; } + else -#endif { -#ifdef PNG_iTXt_SUPPORTED textp->lang=NULL; textp->lang_key=NULL; -#endif textp->text = textp->key + key_len + 1; } + if (text_length) png_memcpy(textp->text, text_ptr[i].text, - (png_size_t)(text_length)); + (png_size_t)(text_length)); + *(textp->text + text_length) = '\0'; -#ifdef PNG_iTXt_SUPPORTED +# ifdef PNG_iTXt_SUPPORTED if (textp->compression > 0) { textp->text_length = 0; textp->itxt_length = text_length; } - else -#endif + else +# endif { textp->text_length = text_length; -#ifdef PNG_iTXt_SUPPORTED textp->itxt_length = 0; -#endif } + info_ptr->num_text++; png_debug1(3, "transferred text chunk %d", info_ptr->num_text); } @@ -797,7 +806,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, #ifdef PNG_tIME_SUPPORTED void PNGAPI -png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) +png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time) { png_debug1(1, "in %s storage function", "tIME"); @@ -813,7 +822,7 @@ png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) #ifdef PNG_tRNS_SUPPORTED void PNGAPI png_set_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep trans_alpha, int num_trans, png_color_16p trans_color) + png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color) { png_debug1(1, "in %s storage function", "tRNS"); @@ -830,8 +839,9 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr, png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */ - png_ptr->trans_alpha = info_ptr->trans_alpha = (png_bytep)png_malloc(png_ptr, - (png_size_t)PNG_MAX_PALETTE_LENGTH); + png_ptr->trans_alpha = info_ptr->trans_alpha = + (png_bytep)png_malloc(png_ptr, (png_size_t)PNG_MAX_PALETTE_LENGTH); + if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH) png_memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans); } @@ -839,6 +849,7 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr, if (trans_color != NULL) { int sample_max = (1 << info_ptr->bit_depth); + if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY && (int)trans_color->gray > sample_max) || (info_ptr->color_type == PNG_COLOR_TYPE_RGB && @@ -847,13 +858,16 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr, (int)trans_color->blue > sample_max))) png_warning(png_ptr, "tRNS chunk has out-of-range samples for bit_depth"); + png_memcpy(&(info_ptr->trans_color), trans_color, png_sizeof(png_color_16)); + if (num_trans == 0) num_trans = 1; } info_ptr->num_trans = (png_uint_16)num_trans; + if (num_trans != 0) { info_ptr->valid |= PNG_INFO_tRNS; @@ -865,11 +879,12 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr, #ifdef PNG_sPLT_SUPPORTED void PNGAPI png_set_sPLT(png_structp png_ptr, - png_infop info_ptr, png_sPLT_tp entries, int nentries) + png_infop info_ptr, png_const_sPLT_tp entries, int nentries) /* * entries - array of png_sPLT_t structures * to be added to the list of palettes * in the info structure. + * * nentries - number of palette structures to be * added. */ @@ -882,7 +897,8 @@ png_set_sPLT(png_structp png_ptr, np = (png_sPLT_tp)png_malloc_warn(png_ptr, (info_ptr->splt_palettes_num + nentries) * - (png_size_t)png_sizeof(png_sPLT_t)); + (png_size_t)png_sizeof(png_sPLT_t)); + if (np == NULL) { png_warning(png_ptr, "No memory for sPLT palettes"); @@ -891,36 +907,42 @@ png_set_sPLT(png_structp png_ptr, png_memcpy(np, info_ptr->splt_palettes, info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t)); + png_free(png_ptr, info_ptr->splt_palettes); info_ptr->splt_palettes=NULL; for (i = 0; i < nentries; i++) { png_sPLT_tp to = np + info_ptr->splt_palettes_num + i; - png_sPLT_tp from = entries + i; + png_const_sPLT_tp from = entries + i; png_uint_32 length; length = png_strlen(from->name) + 1; to->name = (png_charp)png_malloc_warn(png_ptr, (png_size_t)length); + if (to->name == NULL) { png_warning(png_ptr, - "Out of memory while processing sPLT chunk"); + "Out of memory while processing sPLT chunk"); continue; } + png_memcpy(to->name, from->name, length); to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr, (png_size_t)(from->nentries * png_sizeof(png_sPLT_entry))); + if (to->entries == NULL) { png_warning(png_ptr, - "Out of memory while processing sPLT chunk"); + "Out of memory while processing sPLT chunk"); png_free(png_ptr, to->name); to->name = NULL; continue; } + png_memcpy(to->entries, from->entries, from->nentries * png_sizeof(png_sPLT_entry)); + to->nentries = from->nentries; to->depth = from->depth; } @@ -935,7 +957,7 @@ png_set_sPLT(png_structp png_ptr, #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED void PNGAPI png_set_unknown_chunks(png_structp png_ptr, - png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns) + png_infop info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns) { png_unknown_chunkp np; int i; @@ -944,8 +966,9 @@ png_set_unknown_chunks(png_structp png_ptr, return; np = (png_unknown_chunkp)png_malloc_warn(png_ptr, - (png_size_t)((info_ptr->unknown_chunks_num + num_unknowns) * - png_sizeof(png_unknown_chunk))); + (png_size_t)(info_ptr->unknown_chunks_num + num_unknowns) * + png_sizeof(png_unknown_chunk)); + if (np == NULL) { png_warning(png_ptr, @@ -954,34 +977,39 @@ png_set_unknown_chunks(png_structp png_ptr, } png_memcpy(np, info_ptr->unknown_chunks, - info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk)); + (png_size_t)info_ptr->unknown_chunks_num * + png_sizeof(png_unknown_chunk)); + png_free(png_ptr, info_ptr->unknown_chunks); info_ptr->unknown_chunks = NULL; for (i = 0; i < num_unknowns; i++) { png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i; - png_unknown_chunkp from = unknowns + i; + png_const_unknown_chunkp from = unknowns + i; - png_memcpy((png_charp)to->name, (png_charp)from->name, - png_sizeof(from->name)); + png_memcpy(to->name, from->name, png_sizeof(from->name)); to->name[png_sizeof(to->name)-1] = '\0'; to->size = from->size; + /* Note our location in the read or write sequence */ to->location = (png_byte)(png_ptr->mode & 0xff); if (from->size == 0) to->data=NULL; + else { to->data = (png_bytep)png_malloc_warn(png_ptr, - (png_size_t)from->size); + (png_size_t)from->size); + if (to->data == NULL) { png_warning(png_ptr, - "Out of memory while processing unknown chunk"); + "Out of memory while processing unknown chunk"); to->size = 0; } + else png_memcpy(to->data, from->data, from->size); } @@ -991,12 +1019,13 @@ png_set_unknown_chunks(png_structp png_ptr, info_ptr->unknown_chunks_num += num_unknowns; info_ptr->free_me |= PNG_FREE_UNKN; } + void PNGAPI png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, - int chunk, int location) + int chunk, int location) { if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk < - (int)info_ptr->unknown_chunks_num) + info_ptr->unknown_chunks_num) info_ptr->unknown_chunks[chunk].location = (png_byte)location; } #endif @@ -1010,40 +1039,48 @@ png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) if (png_ptr == NULL) return (png_uint_32)0; + png_ptr->mng_features_permitted = - (png_byte)(mng_features & PNG_ALL_MNG_FEATURES); + (png_byte)(mng_features & PNG_ALL_MNG_FEATURES); + return (png_uint_32)png_ptr->mng_features_permitted; } #endif #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED void PNGAPI -png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep - chunk_list, int num_chunks) +png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_const_bytep + chunk_list, int num_chunks) { png_bytep new_list, p; int i, old_num_chunks; if (png_ptr == NULL) return; + if (num_chunks == 0) { if (keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE) png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS; + else png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS; if (keep == PNG_HANDLE_CHUNK_ALWAYS) png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS; + else png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS; + return; } + if (chunk_list == NULL) return; + old_num_chunks = png_ptr->num_chunk_list; new_list=(png_bytep)png_malloc(png_ptr, - (png_size_t) - (5*(num_chunks + old_num_chunks))); + (png_size_t)(5*(num_chunks + old_num_chunks))); + if (png_ptr->chunk_list != NULL) { png_memcpy(new_list, png_ptr->chunk_list, @@ -1051,10 +1088,13 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep png_free(png_ptr, png_ptr->chunk_list); png_ptr->chunk_list=NULL; } + png_memcpy(new_list + 5*old_num_chunks, chunk_list, (png_size_t)(5*num_chunks)); + for (p = new_list + 5*old_num_chunks + 4, i = 0; inum_chunk_list = old_num_chunks + num_chunks; png_ptr->chunk_list = new_list; png_ptr->free_me |= PNG_FREE_LIST; @@ -1064,7 +1104,7 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep #ifdef PNG_READ_USER_CHUNKS_SUPPORTED void PNGAPI png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr, - png_user_chunk_ptr read_user_chunk_fn) + png_user_chunk_ptr read_user_chunk_fn) { png_debug(1, "in png_set_read_user_chunk_fn"); @@ -1087,23 +1127,40 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers) if (info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers)) png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); + info_ptr->row_pointers = row_pointers; + if (row_pointers) info_ptr->valid |= PNG_INFO_IDAT; } #endif void PNGAPI -png_set_compression_buffer_size(png_structp png_ptr, - png_size_t size) +png_set_compression_buffer_size(png_structp png_ptr, png_size_t size) { if (png_ptr == NULL) return; + png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf_size = size; + + if (size > ZLIB_IO_MAX) + { + png_warning(png_ptr, "Attempt to set buffer size beyond max ignored"); + png_ptr->zbuf_size = ZLIB_IO_MAX; + size = ZLIB_IO_MAX; /* must fit */ + } + + else + png_ptr->zbuf_size = (uInt)size; + png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); + + /* The following ensures a relatively safe failure if this gets called while + * the buffer is actually in use. + */ png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + png_ptr->zstream.avail_out = 0; + png_ptr->zstream.avail_in = 0; } void PNGAPI @@ -1127,6 +1184,7 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max, */ if (png_ptr == NULL) return; + png_ptr->user_width_max = user_width_max; png_ptr->user_height_max = user_height_max; } @@ -1143,11 +1201,10 @@ png_set_chunk_cache_max (png_structp png_ptr, /* This function was added to libpng 1.4.1 */ void PNGAPI png_set_chunk_malloc_max (png_structp png_ptr, - png_alloc_size_t user_chunk_malloc_max) + png_alloc_size_t user_chunk_malloc_max) { - if (png_ptr) - png_ptr->user_chunk_malloc_max = - (png_size_t)user_chunk_malloc_max; + if (png_ptr) + png_ptr->user_chunk_malloc_max = user_chunk_malloc_max; } #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ @@ -1160,6 +1217,7 @@ png_set_benign_errors(png_structp png_ptr, int allowed) if (allowed) png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; + else png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN; } diff --git a/dll/3rdparty/libpng/pngtest.c b/dll/3rdparty/libpng/pngtest.c index 836441d6dbe..a6a3ae489c1 100644 --- a/dll/3rdparty/libpng/pngtest.c +++ b/dll/3rdparty/libpng/pngtest.c @@ -1,8 +1,8 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.4.1 [February 25, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.0 [January 6, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -31,26 +31,51 @@ * of files at once by typing "pngtest -m file1.png file2.png ..." */ +#include "zlib.h" #include "png.h" -#include "pngpriv.h" - +/* Copied from pngpriv.h but only used in error messages below. */ +#ifndef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 8192 +#endif # include # include +# include # define FCLOSE(file) fclose(file) #ifndef PNG_STDIO_SUPPORTED - typedef FILE * png_FILE_p; +typedef FILE * png_FILE_p; #endif -/* Makes pngtest verbose so we can find problems (needs to be before png.h) */ +/* Makes pngtest verbose so we can find problems. */ #ifndef PNG_DEBUG # define PNG_DEBUG 0 #endif +#if PNG_DEBUG > 1 +# define pngtest_debug(m) ((void)fprintf(stderr, m "\n")) +# define pngtest_debug1(m,p1) ((void)fprintf(stderr, m "\n", p1)) +# define pngtest_debug2(m,p1,p2) ((void)fprintf(stderr, m "\n", p1, p2)) +#else +# define pngtest_debug(m) ((void)0) +# define pngtest_debug1(m,p1) ((void)0) +# define pngtest_debug2(m,p1,p2) ((void)0) +#endif + #if !PNG_DEBUG # define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */ #endif +/* The code uses memcmp and memcpy on large objects (typically row pointers) so + * it is necessary to do soemthing special on certain architectures, note that + * the actual support for this was effectively removed in 1.4, so only the + * memory remains in this program: + */ +#define CVT_PTR(ptr) (ptr) +#define CVT_PTR_NOCHECK(ptr) (ptr) +#define png_memcmp memcmp +#define png_memcpy memcpy +#define png_memset memset + /* Turn on CPU timing #define PNGTEST_TIMING */ @@ -82,11 +107,6 @@ int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname)); /* #define STDERR stderr */ #define STDERR stdout /* For DOS */ -/* In case a system header (e.g., on AIX) defined jmpbuf */ -#ifdef jmpbuf -# undef jmpbuf -#endif - /* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ #ifndef png_jmpbuf # define png_jmpbuf(png_ptr) png_ptr->jmpbuf @@ -97,35 +117,40 @@ static int status_pass = 1; static int status_dots_requested = 0; static int status_dots = 1; -void +void PNGCBAPI read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); -void +void PNGCBAPI read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) { if (png_ptr == NULL || row_number > PNG_UINT_31_MAX) return; + if (status_pass != pass) { fprintf(stdout, "\n Pass %d: ", pass); status_pass = pass; status_dots = 31; } + status_dots--; + if (status_dots == 0) { fprintf(stdout, "\n "); status_dots=30; } + fprintf(stdout, "r"); } -void +void PNGCBAPI write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); -void +void PNGCBAPI write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) { if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) return; + fprintf(stdout, "w"); } @@ -136,9 +161,9 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) * 5 in case illegal filter values are present.) */ static png_uint_32 filters_used[256]; -void +void PNGCBAPI count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data); -void +void PNGCBAPI count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) { if (png_ptr != NULL && row_info != NULL) @@ -153,13 +178,14 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) static png_uint_32 zero_samples; -void +void PNGCBAPI count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data); -void +void PNGCBAPI count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) { png_bytep dp = data; - if (png_ptr == NULL)return; + if (png_ptr == NULL) + return; /* Contents of row_info: * png_uint_32 width width of row @@ -176,41 +202,49 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) { int pos = 0; png_uint_32 n, nstop; + for (n = 0, nstop=row_info->width; nbit_depth == 1) { if (((*dp << pos++ ) & 0x80) == 0) zero_samples++; + if (pos == 8) { pos = 0; dp++; } } + if (row_info->bit_depth == 2) { if (((*dp << (pos+=2)) & 0xc0) == 0) zero_samples++; + if (pos == 8) { pos = 0; dp++; } } + if (row_info->bit_depth == 4) { if (((*dp << (pos+=4)) & 0xf0) == 0) zero_samples++; + if (pos == 8) { pos = 0; dp++; } } + if (row_info->bit_depth == 8) if (*dp++ == 0) zero_samples++; + if (row_info->bit_depth == 16) { if ((*dp | *(dp+1)) == 0) @@ -233,10 +267,12 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) if (row_info->bit_depth == 8) if (*dp++ == 0) zero_samples++; + if (row_info->bit_depth == 16) { if ((*dp | *(dp+1)) == 0) zero_samples++; + dp+=2; } } @@ -263,8 +299,50 @@ static int wrote_question = 0; * than changing the library. */ +#ifdef PNG_IO_STATE_SUPPORTED +void +pngtest_check_io_state(png_structp png_ptr, png_size_t data_length, + png_uint_32 io_op); +void +pngtest_check_io_state(png_structp png_ptr, png_size_t data_length, + png_uint_32 io_op) +{ + png_uint_32 io_state = png_get_io_state(png_ptr); + int err = 0; + + /* Check if the current operation (reading / writing) is as expected. */ + if ((io_state & PNG_IO_MASK_OP) != io_op) + png_error(png_ptr, "Incorrect operation in I/O state"); + + /* Check if the buffer size specific to the current location + * (file signature / header / data / crc) is as expected. + */ + switch (io_state & PNG_IO_MASK_LOC) + { + case PNG_IO_SIGNATURE: + if (data_length > 8) + err = 1; + break; + case PNG_IO_CHUNK_HDR: + if (data_length != 8) + err = 1; + break; + case PNG_IO_CHUNK_DATA: + break; /* no restrictions here */ + case PNG_IO_CHUNK_CRC: + if (data_length != 4) + err = 1; + break; + default: + err = 1; /* uninitialized */ + } + if (err) + png_error(png_ptr, "Bad I/O state or buffer size"); +} +#endif + #ifndef USE_FAR_KEYWORD -static void +static void PNGCBAPI pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check = 0; @@ -281,8 +359,12 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) if (check != length) { - png_error(png_ptr, "Read Error!"); + png_error(png_ptr, "Read Error"); } + +#ifdef PNG_IO_STATE_SUPPORTED + pngtest_check_io_state(png_ptr, length, PNG_IO_READING); +#endif } #else /* This is the model-independent version. Since the standard I/O library @@ -293,7 +375,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) #define NEAR_BUF_SIZE 1024 #define MIN(a,b) (a <= b ? a : b) -static void +static void PNGCBAPI pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check; @@ -302,7 +384,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) /* Check if data really is near. If so, use usual code. */ n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr)); if ((png_bytep)n_data == data) { check = fread(n_data, 1, length, io_ptr); @@ -313,6 +395,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) png_size_t read, remaining, err; check = 0; remaining = length; + do { read = MIN(NEAR_BUF_SIZE, remaining); @@ -327,17 +410,22 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) } while (remaining != 0); } + if (check != length) - png_error(png_ptr, "read Error"); + png_error(png_ptr, "Read Error"); + +#ifdef PNG_IO_STATE_SUPPORTED + pngtest_check_io_state(png_ptr, length, PNG_IO_READING); +#endif } #endif /* USE_FAR_KEYWORD */ #ifdef PNG_WRITE_FLUSH_SUPPORTED -static void +static void PNGCBAPI pngtest_flush(png_structp png_ptr) { /* Do nothing; fflush() is said to be just a waste of energy. */ - png_ptr = png_ptr; /* Stifle compiler warning */ + PNG_UNUSED(png_ptr) /* Stifle compiler warning */ } #endif @@ -347,16 +435,21 @@ pngtest_flush(png_structp png_ptr) * than changing the library. */ #ifndef USE_FAR_KEYWORD -static void +static void PNGCBAPI pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check; - check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr); + check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr)); + if (check != length) { png_error(png_ptr, "Write Error"); } + +#ifdef PNG_IO_STATE_SUPPORTED + pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING); +#endif } #else /* This is the model-independent version. Since the standard I/O library @@ -367,7 +460,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) #define NEAR_BUF_SIZE 1024 #define MIN(a,b) (a <= b ? a : b) -static void +static void PNGCBAPI pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_size_t check; @@ -376,17 +469,20 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) /* Check if data really is near. If so, use usual code. */ near_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr)); + if ((png_bytep)near_data == data) { check = fwrite(near_data, 1, length, io_ptr); } + else { png_byte buf[NEAR_BUF_SIZE]; png_size_t written, remaining, err; check = 0; remaining = length; + do { written = MIN(NEAR_BUF_SIZE, remaining); @@ -401,10 +497,15 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) } while (remaining != 0); } + if (check != length) { png_error(png_ptr, "Write Error"); } + +#ifdef PNG_IO_STATE_SUPPORTED + pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING); +#endif } #endif /* USE_FAR_KEYWORD */ @@ -413,14 +514,16 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) * here if you don't want to. In the default configuration, png_ptr is * not used, but it is passed in case it may be useful. */ -static void +static void PNGCBAPI pngtest_warning(png_structp png_ptr, png_const_charp message) { PNG_CONST char *name = "UNKNOWN (ERROR!)"; char *test; test = png_get_error_ptr(png_ptr); + if (test == NULL) fprintf(STDERR, "%s: libpng warning: %s\n", name, message); + else fprintf(STDERR, "%s: libpng warning: %s\n", test, message); } @@ -430,7 +533,7 @@ pngtest_warning(png_structp png_ptr, png_const_charp message) * function is used by default, or if the program supplies NULL for the * error function pointer in png_set_error_fn(). */ -static void +static void PNGCBAPI pngtest_error(png_structp png_ptr, png_const_charp message) { pngtest_warning(png_ptr, message); @@ -467,12 +570,12 @@ static int maximum_allocation = 0; static int total_allocation = 0; static int num_allocations = 0; -png_voidp png_debug_malloc - PNGARG((png_structp png_ptr, png_alloc_size_t size)); -void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr)); +png_voidp PNGCBAPI png_debug_malloc PNGARG((png_structp png_ptr, + png_alloc_size_t size)); +void PNGCBAPI png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr)); png_voidp -png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) +PNGCBAPI png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) { /* png_malloc has already tested for NULL; png_create_struct calls @@ -494,12 +597,16 @@ png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) current_allocation += size; total_allocation += size; num_allocations ++; + if (current_allocation > maximum_allocation) maximum_allocation = current_allocation; + pinfo->pointer = png_malloc(png_ptr, size); /* Restore malloc_fn and free_fn */ + png_set_mem_fn(png_ptr, NULL, png_debug_malloc, png_debug_free); + if (size != 0 && pinfo->pointer == NULL) { current_allocation -= size; @@ -507,23 +614,27 @@ png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) png_error(png_ptr, "out of memory in pngtest->png_debug_malloc"); } + pinfo->next = pinformation; pinformation = pinfo; /* Make sure the caller isn't assuming zeroed memory. */ png_memset(pinfo->pointer, 0xdd, pinfo->size); + if (verbose) - printf("png_malloc %lu bytes at %x\n", (unsigned long)size, + printf("png_malloc %lu bytes at %p\n", (unsigned long)size, pinfo->pointer); + return (png_voidp)(pinfo->pointer); } } /* Free a pointer. It is removed from the list at the same time. */ -void +void PNGCBAPI png_debug_free(png_structp png_ptr, png_voidp ptr) { if (png_ptr == NULL) fprintf(STDERR, "NULL pointer to png_debug_free.\n"); + if (ptr == 0) { #if 0 /* This happens all the time. */ @@ -535,9 +646,11 @@ png_debug_free(png_structp png_ptr, png_voidp ptr) /* Unlink the element from the list. */ { memory_infop FAR *ppinfo = &pinformation; + for (;;) { memory_infop pinfo = *ppinfo; + if (pinfo->pointer == ptr) { *ppinfo = pinfo->next; @@ -551,18 +664,21 @@ png_debug_free(png_structp png_ptr, png_voidp ptr) pinfo = NULL; break; } + if (pinfo->next == NULL) { fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr); break; } + ppinfo = &pinfo->next; } } /* Finally free the data. */ if (verbose) - printf("Freeing %x\n", ptr); + printf("Freeing %p\n", ptr); + png_free_default(png_ptr, ptr); ptr = NULL; } @@ -584,7 +700,7 @@ static png_uint_32 user_chunk_data[4]; * 3: vpAg units */ -static int read_user_chunk_callback(png_struct *png_ptr, +static int PNGCBAPI read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk) { png_uint_32 @@ -609,8 +725,10 @@ static int read_user_chunk_callback(png_struct *png_ptr, /* Found sTER chunk */ if (chunk->size != 1) return (-1); /* Error return */ + if (chunk->data[0] != 0 && chunk->data[0] != 1) return (-1); /* Invalid mode */ + my_user_chunk_data=(png_uint_32 *) png_get_user_chunk_ptr(png_ptr); my_user_chunk_data[0]=chunk->data[0]+1; return (1); @@ -661,7 +779,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) int bit_depth, color_type; #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; + jmp_buf png_jmpbuf; #endif #endif @@ -682,12 +800,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) return (1); } - png_debug(0, "Allocating read and write structures"); + pngtest_debug("Allocating read and write structures"); #if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG read_ptr = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL, - NULL, NULL, NULL, - (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free); + NULL, NULL, NULL, png_debug_malloc, png_debug_free); #else read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); @@ -720,7 +837,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) pngtest_warning); #endif #endif - png_debug(0, "Allocating read_info, write_info and end_info structures"); + pngtest_debug("Allocating read_info, write_info and end_info structures"); read_info_ptr = png_create_info_struct(read_ptr); end_info_ptr = png_create_info_struct(read_ptr); #ifdef PNG_WRITE_SUPPORTED @@ -729,9 +846,9 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif #ifdef PNG_SETJMP_SUPPORTED - png_debug(0, "Setting jmpbuf for read struct"); + pngtest_debug("Setting jmpbuf for read struct"); #ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) + if (setjmp(png_jmpbuf)) #else if (setjmp(png_jmpbuf(read_ptr))) #endif @@ -749,13 +866,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) return (1); } #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(read_ptr), jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(read_ptr), png_jmpbuf, png_sizeof(jmp_buf)); #endif #ifdef PNG_WRITE_SUPPORTED - png_debug(0, "Setting jmpbuf for write struct"); + pngtest_debug("Setting jmpbuf for write struct"); #ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) + + if (setjmp(png_jmpbuf)) #else if (setjmp(png_jmpbuf(write_ptr))) #endif @@ -770,13 +888,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) FCLOSE(fpout); return (1); } + #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(write_ptr), jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(write_ptr), png_jmpbuf, png_sizeof(jmp_buf)); #endif #endif #endif - png_debug(0, "Initializing input and output streams"); + pngtest_debug("Initializing input and output streams"); #ifdef PNG_STDIO_SUPPORTED png_init_io(read_ptr, fpin); # ifdef PNG_WRITE_SUPPORTED @@ -793,6 +912,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) # endif # endif #endif + if (status_dots_requested == 1) { #ifdef PNG_WRITE_SUPPORTED @@ -800,6 +920,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif png_set_read_status_fn(read_ptr, read_row_callback); } + else { #ifdef PNG_WRITE_SUPPORTED @@ -811,8 +932,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED { int i; + for (i = 0; i<256; i++) filters_used[i] = 0; + png_set_read_user_transform_fn(read_ptr, count_filters); } #endif @@ -836,10 +959,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) NULL, 0); #endif - png_debug(0, "Reading info struct"); + pngtest_debug("Reading info struct"); png_read_info(read_ptr, read_info_ptr); - png_debug(0, "Transferring info struct"); + pngtest_debug("Transferring info struct"); { int interlace_type, compression_type, filter_type; @@ -859,6 +982,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) { png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; + if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y)) { @@ -881,6 +1005,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) { double white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; + if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y)) { @@ -902,7 +1027,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #ifdef PNG_iCCP_SUPPORTED { png_charp name; - png_charp profile; + png_bytep profile; png_uint_32 proflen; int compression_type; @@ -1026,7 +1151,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0) { - png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks", num_text); + pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text); png_set_text(write_ptr, write_info_ptr, text_ptr, num_text); } } @@ -1046,6 +1171,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_memcpy(tIME_string, png_convert_to_rfc1123(read_ptr, mod_time), png_sizeof(tIME_string)); + tIME_string[png_sizeof(tIME_string) - 1] = '\0'; tIME_chunk_present++; #endif /* PNG_TIME_RFC1123_SUPPORTED */ @@ -1077,18 +1203,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED { png_unknown_chunkp unknowns; - int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr, + int num_unknowns = png_get_unknown_chunks(read_ptr, read_info_ptr, &unknowns); + if (num_unknowns) { - png_size_t i; + int i; png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns, num_unknowns); /* Copy the locations from the read_info_ptr. The automatically * generated locations in write_info_ptr are wrong because we * haven't written anything yet. */ - for (i = 0; i < (png_size_t)num_unknowns; i++) + for (i = 0; i < num_unknowns; i++) png_set_unknown_chunk_location(write_ptr, write_info_ptr, i, unknowns[i].location); } @@ -1096,7 +1223,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif #ifdef PNG_WRITE_SUPPORTED - png_debug(0, "Writing info struct"); + pngtest_debug("Writing info struct"); /* If we wanted, we could write info in two steps: * png_write_info_before_PLTE(write_ptr, write_info_ptr); @@ -1114,9 +1241,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if (verbose) fprintf(STDERR, "\n stereo mode = %lu\n", (unsigned long)(user_chunk_data[0] - 1)); + ster_chunk_data[0]=(unsigned char)(user_chunk_data[0] - 1); png_write_chunk(write_ptr, png_sTER, ster_chunk_data, 1); } + if (user_chunk_data[1] != 0 || user_chunk_data[2] != 0) { png_byte png_vpAg[5] = {118, 112, 65, 103, '\0'}; @@ -1129,6 +1258,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) (unsigned long)user_chunk_data[1], (unsigned long)user_chunk_data[2], (unsigned long)user_chunk_data[3]); + png_save_uint_32(vpag_chunk_data, user_chunk_data[1]); png_save_uint_32(vpag_chunk_data + 4, user_chunk_data[2]); vpag_chunk_data[8] = (unsigned char)(user_chunk_data[3] & 0xff); @@ -1139,12 +1269,13 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif #ifdef SINGLE_ROWBUF_ALLOC - png_debug(0, "Allocating row buffer..."); + pngtest_debug("Allocating row buffer..."); row_buf = (png_bytep)png_malloc(read_ptr, png_get_rowbytes(read_ptr, read_info_ptr)); - png_debug1(0, "0x%08lx", (unsigned long)row_buf); + + pngtest_debug1("\t0x%08lx", (unsigned long)row_buf); #endif /* SINGLE_ROWBUF_ALLOC */ - png_debug(0, "Writing row data"); + pngtest_debug("Writing row data"); #if defined(PNG_READ_INTERLACING_SUPPORTED) || \ defined(PNG_WRITE_INTERLACING_SUPPORTED) @@ -1163,15 +1294,17 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif for (pass = 0; pass < num_pass; pass++) { - png_debug1(0, "Writing row data for pass %d", pass); + pngtest_debug1("Writing row data for pass %d", pass); for (y = 0; y < height; y++) { #ifndef SINGLE_ROWBUF_ALLOC - png_debug2(0, "Allocating row buffer (pass %d, y = %ld)...", pass, y); + pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y); row_buf = (png_bytep)png_malloc(read_ptr, png_get_rowbytes(read_ptr, read_info_ptr)); - png_debug2(0, "0x%08lx (%ld bytes)", (unsigned long)row_buf, + + pngtest_debug2("\t0x%08lx (%u bytes)", (unsigned long)row_buf, png_get_rowbytes(read_ptr, read_info_ptr)); + #endif /* !SINGLE_ROWBUF_ALLOC */ png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1); @@ -1190,7 +1323,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #endif /* PNG_WRITE_SUPPORTED */ #ifndef SINGLE_ROWBUF_ALLOC - png_debug2(0, "Freeing row buffer (pass %d, y = %ld)", pass, y); + pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y); png_free(read_ptr, row_buf); row_buf = NULL; #endif /* !SINGLE_ROWBUF_ALLOC */ @@ -1204,7 +1337,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1); #endif - png_debug(0, "Reading and writing end_info data"); + pngtest_debug("Reading and writing end_info data"); png_read_end(read_ptr, end_info_ptr); #ifdef PNG_TEXT_SUPPORTED @@ -1214,7 +1347,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0) { - png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks", num_text); + pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text); png_set_text(write_ptr, write_end_info_ptr, text_ptr, num_text); } } @@ -1233,6 +1366,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_memcpy(tIME_string, png_convert_to_rfc1123(read_ptr, mod_time), png_sizeof(tIME_string)); + tIME_string[png_sizeof(tIME_string) - 1] = '\0'; tIME_chunk_present++; #endif /* PNG_TIME_RFC1123_SUPPORTED */ @@ -1242,19 +1376,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED { png_unknown_chunkp unknowns; - int num_unknowns; - num_unknowns = (int)png_get_unknown_chunks(read_ptr, end_info_ptr, + int num_unknowns = png_get_unknown_chunks(read_ptr, end_info_ptr, &unknowns); + if (num_unknowns) { - png_size_t i; + int i; png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns, num_unknowns); /* Copy the locations from the read_info_ptr. The automatically * generated locations in write_end_info_ptr are wrong because we * haven't written the end_info yet. */ - for (i = 0; i < (png_size_t)num_unknowns; i++) + for (i = 0; i < num_unknowns; i++) png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i, unknowns[i].location); } @@ -1275,26 +1409,26 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } #endif - png_debug(0, "Destroying data structs"); + pngtest_debug("Destroying data structs"); #ifdef SINGLE_ROWBUF_ALLOC - png_debug(1, "destroying row_buf for read_ptr"); + pngtest_debug("destroying row_buf for read_ptr"); png_free(read_ptr, row_buf); row_buf = NULL; #endif /* SINGLE_ROWBUF_ALLOC */ - png_debug(1, "destroying read_ptr, read_info_ptr, end_info_ptr"); + pngtest_debug("destroying read_ptr, read_info_ptr, end_info_ptr"); png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); #ifdef PNG_WRITE_SUPPORTED - png_debug(1, "destroying write_end_info_ptr"); + pngtest_debug("destroying write_end_info_ptr"); png_destroy_info_struct(write_ptr, &write_end_info_ptr); - png_debug(1, "destroying write_ptr, write_info_ptr"); + pngtest_debug("destroying write_ptr, write_info_ptr"); png_destroy_write_struct(&write_ptr, &write_info_ptr); #endif - png_debug(0, "Destruction complete."); + pngtest_debug("Destruction complete."); FCLOSE(fpin); FCLOSE(fpout); - png_debug(0, "Opening files for comparison"); + pngtest_debug("Opening files for comparison"); if ((fpin = fopen(inname, "rb")) == NULL) { fprintf(STDERR, "Could not find file %s\n", inname); @@ -1319,6 +1453,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) { fprintf(STDERR, "\nFiles %s and %s are of a different size\n", inname, outname); + if (wrote_question == 0) { fprintf(STDERR, @@ -1331,6 +1466,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) ZLIB_VERSION); wrote_question = 1; } + FCLOSE(fpin); FCLOSE(fpout); return (0); @@ -1342,6 +1478,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if (png_memcmp(inbuf, outbuf, num_in)) { fprintf(STDERR, "\nFiles %s and %s are different\n", inname, outname); + if (wrote_question == 0) { fprintf(STDERR, @@ -1354,6 +1491,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) ZLIB_VERSION); wrote_question = 1; } + FCLOSE(fpin); FCLOSE(fpout); return (0); @@ -1388,11 +1526,10 @@ main(int argc, char *argv[]) fprintf(STDERR, " library (%lu):%s", (unsigned long)png_access_version_number(), png_get_header_version(NULL)); + /* Show the version of libpng used in building the application */ fprintf(STDERR, " pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER, PNG_HEADER_VERSION_STRING); - fprintf(STDERR, " sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n", - (long)png_sizeof(png_struct), (long)png_sizeof(png_info)); /* Do some consistency checking on the memory allocation settings, I'm * not sure this matters, but it is nice to know, the first of these @@ -1423,6 +1560,7 @@ main(int argc, char *argv[]) multiple = 1; status_dots_requested = 0; } + else if (strcmp(argv[1], "-mv") == 0 || strcmp(argv[1], "-vm") == 0 ) { @@ -1430,12 +1568,14 @@ main(int argc, char *argv[]) verbose = 1; status_dots_requested = 1; } + else if (strcmp(argv[1], "-v") == 0) { verbose = 1; status_dots_requested = 1; inname = argv[2]; } + else { inname = argv[1]; @@ -1489,9 +1629,11 @@ main(int argc, char *argv[]) #ifdef PNG_TIME_RFC1123_SUPPORTED if (tIME_chunk_present != 0) fprintf(STDERR, " tIME = %s\n", tIME_string); + tIME_chunk_present = 0; #endif /* PNG_TIME_RFC1123_SUPPORTED */ } + else { fprintf(STDERR, " FAIL\n"); @@ -1501,17 +1643,19 @@ main(int argc, char *argv[]) if (allocation_now != current_allocation) fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", current_allocation - allocation_now); + if (current_allocation != 0) { memory_infop pinfo = pinformation; fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", current_allocation); + while (pinfo != NULL) { fprintf(STDERR, " %lu bytes at %x\n", (unsigned long)pinfo->size, - (unsigned int) pinfo->pointer); + (unsigned int)pinfo->pointer); pinfo = pinfo->next; } } @@ -1528,6 +1672,7 @@ main(int argc, char *argv[]) num_allocations); #endif } + else { int i; @@ -1537,11 +1682,17 @@ main(int argc, char *argv[]) #if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG int allocation_now = current_allocation; #endif - if (i == 1) status_dots_requested = 1; - else if (verbose == 0)status_dots_requested = 0; + if (i == 1) + status_dots_requested = 1; + + else if (verbose == 0) + status_dots_requested = 0; + if (i == 0 || verbose == 1 || ierror != 0) fprintf(STDERR, "\n Testing %s:", inname); + kerror = test_one_file(inname, outname); + if (kerror == 0) { if (verbose == 1 || i == 2) @@ -1567,10 +1718,12 @@ main(int argc, char *argv[]) #endif /* PNG_TIME_RFC1123_SUPPORTED */ } } + else { if (verbose == 0 && i != 2) fprintf(STDERR, "\n Testing %s:", inname); + fprintf(STDERR, " FAIL\n"); ierror += kerror; } @@ -1578,12 +1731,14 @@ main(int argc, char *argv[]) if (allocation_now != current_allocation) fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", current_allocation - allocation_now); + if (current_allocation != 0) { memory_infop pinfo = pinformation; fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", current_allocation); + while (pinfo != NULL) { fprintf(STDERR, " %lu bytes at %x\n", @@ -1621,10 +1776,12 @@ main(int argc, char *argv[]) if (ierror == 0) fprintf(STDERR, " libpng passes test\n"); + else fprintf(STDERR, " libpng FAILS test\n"); + return (int)(ierror != 0); } /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_4_3 your_png_h_is_not_version_1_4_3; +typedef png_libpng_version_1_5_2 Your_png_h_is_not_version_1_5_2; diff --git a/dll/3rdparty/libpng/pngtrans.c b/dll/3rdparty/libpng/pngtrans.c index f80679a19d1..cf7622cdc6e 100644 --- a/dll/3rdparty/libpng/pngtrans.c +++ b/dll/3rdparty/libpng/pngtrans.c @@ -1,8 +1,8 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.4.2 [April 29, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.2 [March 31, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,11 +11,10 @@ * and license in png.h */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* Turn on BGR-to-RGB mapping */ void PNGAPI @@ -25,6 +24,7 @@ png_set_bgr(png_structp png_ptr) if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_BGR; } #endif @@ -38,6 +38,7 @@ png_set_swap(png_structp png_ptr) if (png_ptr == NULL) return; + if (png_ptr->bit_depth == 16) png_ptr->transformations |= PNG_SWAP_BYTES; } @@ -52,6 +53,7 @@ png_set_packing(png_structp png_ptr) if (png_ptr == NULL) return; + if (png_ptr->bit_depth < 8) { png_ptr->transformations |= PNG_PACK; @@ -69,6 +71,7 @@ png_set_packswap(png_structp png_ptr) if (png_ptr == NULL) return; + if (png_ptr->bit_depth < 8) png_ptr->transformations |= PNG_PACKSWAP; } @@ -76,12 +79,13 @@ png_set_packswap(png_structp png_ptr) #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) void PNGAPI -png_set_shift(png_structp png_ptr, png_color_8p true_bits) +png_set_shift(png_structp png_ptr, png_const_color_8p true_bits) { png_debug(1, "in png_set_shift"); if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_SHIFT; png_ptr->shift = *true_bits; } @@ -117,10 +121,13 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_FILLER; png_ptr->filler = (png_uint_16)filler; + if (filler_loc == PNG_FILLER_AFTER) png_ptr->flags |= PNG_FLAG_FILLER_AFTER; + else png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; @@ -135,7 +142,7 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) } /* Also I added this in libpng-1.0.2a (what happens when we expand - * a less-than-8-bit grayscale to GA? */ + * a less-than-8-bit grayscale to GA?) */ if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8) { @@ -151,6 +158,7 @@ png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc) if (png_ptr == NULL) return; + png_set_filler(png_ptr, filler, filler_loc); png_ptr->transformations |= PNG_ADD_ALPHA; } @@ -166,6 +174,7 @@ png_set_swap_alpha(png_structp png_ptr) if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_SWAP_ALPHA; } #endif @@ -179,6 +188,7 @@ png_set_invert_alpha(png_structp png_ptr) if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_INVERT_ALPHA; } #endif @@ -191,6 +201,7 @@ png_set_invert_mono(png_structp png_ptr) if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_INVERT_MONO; } @@ -206,8 +217,8 @@ png_do_invert(png_row_infop row_info, png_bytep row) if (row_info->color_type == PNG_COLOR_TYPE_GRAY) { png_bytep rp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; + png_size_t i; + png_size_t istop = row_info->rowbytes; for (i = 0; i < istop; i++) { @@ -215,36 +226,41 @@ png_do_invert(png_row_infop row_info, png_bytep row) rp++; } } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && row_info->bit_depth == 8) { png_bytep rp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; + png_size_t i; + png_size_t istop = row_info->rowbytes; - for (i = 0; i < istop; i+=2) + for (i = 0; i < istop; i += 2) { *rp = (png_byte)(~(*rp)); - rp+=2; + rp += 2; } } + +#ifdef PNG_16BIT_SUPPORTED else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && row_info->bit_depth == 16) { png_bytep rp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; + png_size_t i; + png_size_t istop = row_info->rowbytes; - for (i = 0; i < istop; i+=4) + for (i = 0; i < istop; i += 4) { *rp = (png_byte)(~(*rp)); - *(rp+1) = (png_byte)(~(*(rp+1))); - rp+=4; + *(rp + 1) = (png_byte)(~(*(rp + 1))); + rp += 4; } } +#endif } #endif +#ifdef PNG_16BIT_SUPPORTED #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) /* Swaps byte order on 16 bit depth images */ void /* PRIVATE */ @@ -252,8 +268,7 @@ png_do_swap(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_swap"); - if ( - row_info->bit_depth == 16) + if (row_info->bit_depth == 16) { png_bytep rp = row; png_uint_32 i; @@ -268,6 +283,7 @@ png_do_swap(png_row_infop row_info, png_bytep row) } } #endif +#endif #if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) static PNG_CONST png_byte onebppswaptable[256] = { @@ -381,19 +397,22 @@ png_do_packswap(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_packswap"); - if ( - row_info->bit_depth < 8) + if (row_info->bit_depth < 8) { - png_bytep rp, end, table; + png_bytep rp; + png_const_bytep end, table; end = row + row_info->rowbytes; if (row_info->bit_depth == 1) - table = (png_bytep)onebppswaptable; + table = onebppswaptable; + else if (row_info->bit_depth == 2) - table = (png_bytep)twobppswaptable; + table = twobppswaptable; + else if (row_info->bit_depth == 4) - table = (png_bytep)fourbppswaptable; + table = fourbppswaptable; + else return; @@ -405,158 +424,115 @@ png_do_packswap(png_row_infop row_info, png_bytep row) #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -/* Remove filler or alpha byte(s) */ +/* Remove a channel - this used to be 'png_do_strip_filler' but it used a + * somewhat weird combination of flags to determine what to do. All the calls + * to png_do_strip_filler are changed in 1.5.2 to call this instead with the + * correct arguments. + * + * The routine isn't general - the channel must be the channel at the start or + * end (not in the middle) of each pixel. + */ void /* PRIVATE */ -png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) +png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start) { - png_debug(1, "in png_do_strip_filler"); + png_bytep sp = row; /* source pointer */ + png_bytep dp = row; /* destination pointer */ + png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */ + /* At the start sp will point to the first byte to copy and dp to where + * it is copied to. ep always points just beyond the end of the row, so + * the loop simply copies (channels-1) channels until sp reaches ep. + */ + /* GA, GX, XG cases */ + if (row_info->channels == 2) { - png_bytep sp=row; - png_bytep dp=row; - png_uint_32 row_width=row_info->width; - png_uint_32 i; - - if ((row_info->color_type == PNG_COLOR_TYPE_RGB || - (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && - (flags & PNG_FLAG_STRIP_ALPHA))) && - row_info->channels == 4) + if (row_info->bit_depth == 8) { - if (row_info->bit_depth == 8) - { - /* This converts from RGBX or RGBA to RGB */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - dp+=3; sp+=4; - for (i = 1; i < row_width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp++; - } - } - /* This converts from XRGB or ARGB to RGB */ - else - { - for (i = 0; i < row_width; i++) - { - sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 24; - row_info->rowbytes = row_width * 3; - } - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - /* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */ - sp += 8; dp += 6; - for (i = 1; i < row_width; i++) - { - /* This could be (although png_memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ + if (at_start) /* Skip initial filler */ + ++sp; + else /* Skip initial channels and, for sp, the filler */ + sp += 2, ++dp; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } - else - { - /* This converts from XXRRGGBB or AARRGGBB to RRGGBB */ - for (i = 0; i < row_width; i++) - { - /* This could be (although png_memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ + /* For a 1 pixel wide image there is nothing to do */ + while (sp < ep) + *dp++ = *sp, sp += 2; - sp+=2; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 48; - row_info->rowbytes = row_width * 6; - } - row_info->channels = 3; + row_info->pixel_depth = 8; } - else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY || - (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && - (flags & PNG_FLAG_STRIP_ALPHA))) && - row_info->channels == 2) + + else if (row_info->bit_depth == 16) { - if (row_info->bit_depth == 8) - { - /* This converts from GX or GA to G */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - for (i = 0; i < row_width; i++) - { - *dp++ = *sp++; - sp++; - } - } - /* This converts from XG or AG to G */ - else - { - for (i = 0; i < row_width; i++) - { - sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 8; - row_info->rowbytes = row_width; - } - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - /* This converts from GGXX or GGAA to GG */ - sp += 4; dp += 2; - for (i = 1; i < row_width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } - else - { - /* This converts from XXGG or AAGG to GG */ - for (i = 0; i < row_width; i++) - { - sp += 2; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 16; - row_info->rowbytes = row_width * 2; - } - row_info->channels = 1; + if (at_start) + sp += 2; + else + sp += 4, dp += 2; + + while (sp < ep) + *dp++ = *sp++, *dp++ = *sp, sp += 3; + + row_info->pixel_depth = 16; } - if (flags & PNG_FLAG_STRIP_ALPHA) - row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; + + else + return; /* bad bit depth */ + + row_info->channels = 1; + + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_GRAY; } + + /* RGBA, RGBX, XRGB cases */ + else if (row_info->channels == 4) + { + if (row_info->bit_depth == 8) + { + if (at_start) /* Skip initial filler */ + ++sp; + else /* Skip initial channels and, for sp, the filler */ + sp += 4, dp += 3; + + /* Note that the loop adds 3 to dp and 4 to sp each time. */ + while (sp < ep) + *dp++ = *sp++, *dp++ = *sp++, *dp++ = *sp, sp += 2; + + row_info->pixel_depth = 24; + } + + else if (row_info->bit_depth == 16) + { + if (at_start) + sp += 2; + else + sp += 8, dp += 6; + + while (sp < ep) + { + /* Copy 6 bytes, skip 2 */ + *dp++ = *sp++, *dp++ = *sp++; + *dp++ = *sp++, *dp++ = *sp++; + *dp++ = *sp++, *dp++ = *sp, sp += 3; + } + + row_info->pixel_depth = 48; + } + + else + return; /* bad bit depth */ + + row_info->channels = 3; + + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_RGB; + } + + else + return; /* The filler channel has gone already */ + + /* Fix the rowbytes value. */ + row_info->rowbytes = dp-row; } #endif @@ -567,8 +543,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_bgr"); - if ( - (row_info->color_type & PNG_COLOR_MASK_COLOR)) + if ((row_info->color_type & PNG_COLOR_MASK_COLOR)) { png_uint_32 row_width = row_info->width; if (row_info->bit_depth == 8) @@ -585,6 +560,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row) *(rp + 2) = save; } } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { png_bytep rp; @@ -598,6 +574,8 @@ png_do_bgr(png_row_infop row_info, png_bytep row) } } } + +#ifdef PNG_16BIT_SUPPORTED else if (row_info->bit_depth == 16) { if (row_info->color_type == PNG_COLOR_TYPE_RGB) @@ -615,6 +593,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row) *(rp + 5) = save; } } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { png_bytep rp; @@ -631,12 +610,14 @@ png_do_bgr(png_row_infop row_info, png_bytep row) } } } +#endif } } #endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED void PNGAPI png_set_user_transform_info(png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels) @@ -645,33 +626,49 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp if (png_ptr == NULL) return; -#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED png_ptr->user_transform_ptr = user_transform_ptr; png_ptr->user_transform_depth = (png_byte)user_transform_depth; png_ptr->user_transform_channels = (png_byte)user_transform_channels; -#else - if (user_transform_ptr || user_transform_depth || user_transform_channels) - png_warning(png_ptr, - "This version of libpng does not support user transform info"); -#endif } +#endif /* This function returns a pointer to the user_transform_ptr associated with * the user transform functions. The application should free any memory * associated with this pointer before png_write_destroy and png_read_destroy * are called. */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED png_voidp PNGAPI -png_get_user_transform_ptr(png_structp png_ptr) +png_get_user_transform_ptr(png_const_structp png_ptr) { if (png_ptr == NULL) return (NULL); -#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED + return ((png_voidp)png_ptr->user_transform_ptr); -#else - return (NULL); -#endif } +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +png_uint_32 PNGAPI +png_get_current_row_number(png_const_structp png_ptr) +{ + /* See the comments in png.h - this is the sub-image row when reading and + * interlaced image. + */ + if (png_ptr != NULL) + return png_ptr->row_number; + + return PNG_UINT_32_MAX; /* help the app not to fail silently */ +} + +png_byte PNGAPI +png_get_current_pass_number(png_const_structp png_ptr) +{ + if (png_ptr != NULL) + return png_ptr->pass; + return 8; /* invalid */ +} +#endif /* PNG_USER_TRANSFORM_INFO_SUPPORTED */ #endif /* PNG_READ_USER_TRANSFORM_SUPPORTED || - PNG_WRITE_USER_TRANSFORM_SUPPORTED */ + PNG_WRITE_USER_TRANSFORM_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/dll/3rdparty/libpng/pngwio.c b/dll/3rdparty/libpng/pngwio.c index 513a71a0622..95ffb3429f1 100644 --- a/dll/3rdparty/libpng/pngwio.c +++ b/dll/3rdparty/libpng/pngwio.c @@ -1,8 +1,8 @@ /* pngwio.c - functions for data output * - * Last changed in libpng 1.4.0 [January 3, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.0 [January 6, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -18,11 +18,10 @@ * them at run time with png_set_write_fn(...). */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED #include "pngpriv.h" +#ifdef PNG_WRITE_SUPPORTED + /* Write the data to whatever output you are using. The default routine * writes to a file pointer. Note that this routine sometimes gets called * with very small lengths, so you should implement some kind of simple @@ -31,10 +30,12 @@ */ void /* PRIVATE */ -png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +png_write_data(png_structp png_ptr, png_const_bytep data, png_size_t length) { + /* NOTE: write_data_fn must not change the buffer! */ if (png_ptr->write_data_fn != NULL ) - (*(png_ptr->write_data_fn))(png_ptr, data, length); + (*(png_ptr->write_data_fn))(png_ptr, (png_bytep)data, length); + else png_error(png_ptr, "Call to NULL write function"); } @@ -46,14 +47,16 @@ png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) * than changing the library. */ #ifndef USE_FAR_KEYWORD -void PNGAPI +void PNGCBAPI png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { - png_uint_32 check; + png_size_t check; if (png_ptr == NULL) return; + check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); + if (check != length) png_error(png_ptr, "Write Error"); } @@ -66,7 +69,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) #define NEAR_BUF_SIZE 1024 #define MIN(a,b) (a <= b ? a : b) -void PNGAPI +void PNGCBAPI png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { png_uint_32 check; @@ -75,24 +78,29 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) if (png_ptr == NULL) return; + /* Check if data really is near. If so, use usual code. */ near_data = (png_byte *)CVT_PTR_NOCHECK(data); io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + if ((png_bytep)near_data == data) { check = fwrite(near_data, 1, length, io_ptr); } + else { png_byte buf[NEAR_BUF_SIZE]; png_size_t written, remaining, err; check = 0; remaining = length; + do { written = MIN(NEAR_BUF_SIZE, remaining); png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ err = fwrite(buf, 1, written, io_ptr); + if (err != written) break; @@ -104,6 +112,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) } while (remaining != 0); } + if (check != length) png_error(png_ptr, "Write Error"); } @@ -123,17 +132,19 @@ png_flush(png_structp png_ptr) (*(png_ptr->output_flush_fn))(png_ptr); } -#ifdef PNG_STDIO_SUPPORTED -void PNGAPI +# ifdef PNG_STDIO_SUPPORTED +void PNGCBAPI png_default_flush(png_structp png_ptr) { png_FILE_p io_ptr; + if (png_ptr == NULL) return; + io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); fflush(io_ptr); } -#endif +# endif #endif /* This function allows the application to supply new output functions for @@ -167,7 +178,7 @@ png_default_flush(png_structp png_ptr) */ void PNGAPI png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, - png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) { if (png_ptr == NULL) return; @@ -185,30 +196,32 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, #endif #ifdef PNG_WRITE_FLUSH_SUPPORTED -#ifdef PNG_STDIO_SUPPORTED +# ifdef PNG_STDIO_SUPPORTED + if (output_flush_fn != NULL) png_ptr->output_flush_fn = output_flush_fn; else png_ptr->output_flush_fn = png_default_flush; -#else + +# else png_ptr->output_flush_fn = output_flush_fn; -#endif +# endif #endif /* PNG_WRITE_FLUSH_SUPPORTED */ /* It is an error to read while writing a png file */ if (png_ptr->read_data_fn != NULL) { png_ptr->read_data_fn = NULL; + png_warning(png_ptr, - "Attempted to set both read_data_fn and write_data_fn in"); - png_warning(png_ptr, - "the same structure. Resetting read_data_fn to NULL"); + "Can't set both read_data_fn and write_data_fn in the" + " same structure"); } } #ifdef USE_FAR_KEYWORD -#ifdef _MSC_VER +# ifdef _MSC_VER void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) { void *near_ptr; @@ -236,6 +249,6 @@ void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) return(near_ptr); } -# endif -# endif +# endif +#endif #endif /* PNG_WRITE_SUPPORTED */ diff --git a/dll/3rdparty/libpng/pngwrite.c b/dll/3rdparty/libpng/pngwrite.c index 0252051989c..9277a951628 100644 --- a/dll/3rdparty/libpng/pngwrite.c +++ b/dll/3rdparty/libpng/pngwrite.c @@ -1,8 +1,8 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.4.0 [January 3, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.1 [February 3, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,12 +11,10 @@ * and license in png.h */ -/* Get internal access to png.h */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED #include "pngpriv.h" +#ifdef PNG_WRITE_SUPPORTED + /* Writes all the PNG information. This is the suggested way to use the * library. If you have a new chunk to add, make a function to write it, * and put it in the correct location here. If you want the chunk written @@ -33,50 +31,46 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) if (png_ptr == NULL || info_ptr == NULL) return; + if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) { /* Write PNG signature */ png_write_sig(png_ptr); + #ifdef PNG_MNG_FEATURES_SUPPORTED if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \ - (png_ptr->mng_features_permitted)) + (png_ptr->mng_features_permitted)) { png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); png_ptr->mng_features_permitted = 0; } #endif + /* Write IHDR information. */ png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, - info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, - info_ptr->filter_type, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, + info_ptr->filter_type, #ifdef PNG_WRITE_INTERLACING_SUPPORTED - info_ptr->interlace_type); + info_ptr->interlace_type); #else - 0); + 0); #endif /* The rest of these check to see if the valid field has the appropriate * flag set, and if it does, writes the chunk. */ #ifdef PNG_WRITE_gAMA_SUPPORTED if (info_ptr->valid & PNG_INFO_gAMA) - { -# ifdef PNG_FLOATING_POINT_SUPPORTED - png_write_gAMA(png_ptr, info_ptr->gamma); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma); -# endif -#endif - } + png_write_gAMA_fixed(png_ptr, info_ptr->gamma); #endif #ifdef PNG_WRITE_sRGB_SUPPORTED if (info_ptr->valid & PNG_INFO_sRGB) png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent); #endif + #ifdef PNG_WRITE_iCCP_SUPPORTED if (info_ptr->valid & PNG_INFO_iCCP) png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE, - info_ptr->iccp_profile, (int)info_ptr->iccp_proflen); + (png_charp)info_ptr->iccp_profile, (int)info_ptr->iccp_proflen); #endif #ifdef PNG_WRITE_sBIT_SUPPORTED if (info_ptr->valid & PNG_INFO_sBIT) @@ -84,24 +78,13 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) #endif #ifdef PNG_WRITE_cHRM_SUPPORTED if (info_ptr->valid & PNG_INFO_cHRM) - { -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_write_cHRM(png_ptr, - info_ptr->x_white, info_ptr->y_white, - info_ptr->x_red, info_ptr->y_red, - info_ptr->x_green, info_ptr->y_green, - info_ptr->x_blue, info_ptr->y_blue); -#else -# ifdef PNG_FIXED_POINT_SUPPORTED png_write_cHRM_fixed(png_ptr, - info_ptr->int_x_white, info_ptr->int_y_white, - info_ptr->int_x_red, info_ptr->int_y_red, - info_ptr->int_x_green, info_ptr->int_y_green, - info_ptr->int_x_blue, info_ptr->int_y_blue); -# endif -#endif - } + info_ptr->x_white, info_ptr->y_white, + info_ptr->x_red, info_ptr->y_red, + info_ptr->x_green, info_ptr->y_green, + info_ptr->x_blue, info_ptr->y_blue); #endif + #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED if (info_ptr->unknown_chunks_num) { @@ -114,14 +97,16 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) up++) { int keep = png_handle_as_unknown(png_ptr, up->name); + if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && !(up->location & PNG_HAVE_PLTE) && - !(up->location & PNG_HAVE_IDAT) && - ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) + up->location && !(up->location & PNG_HAVE_PLTE) && + !(up->location & PNG_HAVE_IDAT) && + ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || + (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) { if (up->size == 0) png_warning(png_ptr, "Writing zero-length unknown chunk"); + png_write_chunk(png_ptr, up->name, up->data, up->size); } } @@ -147,7 +132,8 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) if (info_ptr->valid & PNG_INFO_PLTE) png_write_PLTE(png_ptr, info_ptr->palette, - (png_uint_32)info_ptr->num_palette); + (png_uint_32)info_ptr->num_palette); + else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) png_error(png_ptr, "Valid palette required for paletted images"); @@ -157,59 +143,51 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED /* Invert the alpha channel (in tRNS) */ if ((png_ptr->transformations & PNG_INVERT_ALPHA) && - info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { int j; for (j = 0; j<(int)info_ptr->num_trans; j++) - info_ptr->trans_alpha[j] = (png_byte)(255 - info_ptr->trans_alpha[j]); + info_ptr->trans_alpha[j] = + (png_byte)(255 - info_ptr->trans_alpha[j]); } #endif png_write_tRNS(png_ptr, info_ptr->trans_alpha, &(info_ptr->trans_color), - info_ptr->num_trans, info_ptr->color_type); + info_ptr->num_trans, info_ptr->color_type); } #endif #ifdef PNG_WRITE_bKGD_SUPPORTED if (info_ptr->valid & PNG_INFO_bKGD) png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); #endif + #ifdef PNG_WRITE_hIST_SUPPORTED if (info_ptr->valid & PNG_INFO_hIST) png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); #endif + #ifdef PNG_WRITE_oFFs_SUPPORTED if (info_ptr->valid & PNG_INFO_oFFs) png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, - info_ptr->offset_unit_type); + info_ptr->offset_unit_type); #endif + #ifdef PNG_WRITE_pCAL_SUPPORTED if (info_ptr->valid & PNG_INFO_pCAL) png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, - info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, - info_ptr->pcal_units, info_ptr->pcal_params); + info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, + info_ptr->pcal_units, info_ptr->pcal_params); #endif -#ifdef PNG_sCAL_SUPPORTED - if (info_ptr->valid & PNG_INFO_sCAL) #ifdef PNG_WRITE_sCAL_SUPPORTED -#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) - png_write_sCAL(png_ptr, (int)info_ptr->scal_unit, - info_ptr->scal_pixel_width, info_ptr->scal_pixel_height); -#else /* !FLOATING_POINT */ -#ifdef PNG_FIXED_POINT_SUPPORTED + if (info_ptr->valid & PNG_INFO_sCAL) png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, info_ptr->scal_s_width, info_ptr->scal_s_height); -#endif /* FIXED_POINT */ -#endif /* FLOATING_POINT */ -#else /* !WRITE_sCAL */ - png_warning(png_ptr, - "png_write_sCAL not supported; sCAL chunk not written"); -#endif /* WRITE_sCAL */ #endif /* sCAL */ #ifdef PNG_WRITE_pHYs_SUPPORTED if (info_ptr->valid & PNG_INFO_pHYs) png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, - info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); + info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); #endif /* pHYs */ #ifdef PNG_WRITE_tIME_SUPPORTED @@ -222,8 +200,8 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_WRITE_sPLT_SUPPORTED if (info_ptr->valid & PNG_INFO_sPLT) - for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) - png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); + for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) + png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); #endif /* sPLT */ #ifdef PNG_WRITE_TEXT_SUPPORTED @@ -231,45 +209,47 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) for (i = 0; i < info_ptr->num_text; i++) { png_debug2(2, "Writing header text chunk %d, type %d", i, - info_ptr->text[i].compression); + info_ptr->text[i].compression); /* An internationalized chunk? */ if (info_ptr->text[i].compression > 0) { #ifdef PNG_WRITE_iTXt_SUPPORTED - /* Write international chunk */ - png_write_iTXt(png_ptr, - info_ptr->text[i].compression, - info_ptr->text[i].key, - info_ptr->text[i].lang, - info_ptr->text[i].lang_key, - info_ptr->text[i].text); + /* Write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); #else png_warning(png_ptr, "Unable to write international text"); #endif /* Mark this chunk as written */ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; } + /* If we want a compressed text chunk */ else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt) { #ifdef PNG_WRITE_zTXt_SUPPORTED /* Write compressed chunk */ png_write_zTXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, 0, - info_ptr->text[i].compression); + info_ptr->text[i].text, 0, + info_ptr->text[i].compression); #else png_warning(png_ptr, "Unable to write compressed text"); #endif /* Mark this chunk as written */ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; } + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) { #ifdef PNG_WRITE_tEXt_SUPPORTED /* Write uncompressed chunk */ png_write_tEXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, - 0); + info_ptr->text[i].text, + 0); /* Mark this chunk as written */ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; #else @@ -293,10 +273,10 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) { int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && (up->location & PNG_HAVE_PLTE) && - !(up->location & PNG_HAVE_IDAT) && - ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) + up->location && (up->location & PNG_HAVE_PLTE) && + !(up->location & PNG_HAVE_IDAT) && + ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || + (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) { png_write_chunk(png_ptr, up->name, up->data, up->size); } @@ -317,6 +297,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) if (png_ptr == NULL) return; + if (!(png_ptr->mode & PNG_HAVE_IDAT)) png_error(png_ptr, "No IDATs written into file"); @@ -329,8 +310,9 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_WRITE_tIME_SUPPORTED /* Check to see if user has supplied a time chunk */ if ((info_ptr->valid & PNG_INFO_tIME) && - !(png_ptr->mode & PNG_WROTE_tIME)) + !(png_ptr->mode & PNG_WROTE_tIME)) png_write_tIME(png_ptr, &(info_ptr->mod_time)); + #endif #ifdef PNG_WRITE_TEXT_SUPPORTED /* Loop through comment chunks */ @@ -344,36 +326,38 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_WRITE_iTXt_SUPPORTED /* Write international chunk */ png_write_iTXt(png_ptr, - info_ptr->text[i].compression, - info_ptr->text[i].key, - info_ptr->text[i].lang, - info_ptr->text[i].lang_key, - info_ptr->text[i].text); + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); #else png_warning(png_ptr, "Unable to write international text"); #endif /* Mark this chunk as written */ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; } + else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) { #ifdef PNG_WRITE_zTXt_SUPPORTED /* Write compressed chunk */ png_write_zTXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, 0, - info_ptr->text[i].compression); + info_ptr->text[i].text, 0, + info_ptr->text[i].compression); #else png_warning(png_ptr, "Unable to write compressed text"); #endif /* Mark this chunk as written */ info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; } + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) { #ifdef PNG_WRITE_tEXt_SUPPORTED /* Write uncompressed chunk */ png_write_tEXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, 0); + info_ptr->text[i].text, 0); #else png_warning(png_ptr, "Unable to write uncompressed text"); #endif @@ -396,9 +380,9 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) { int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && (up->location & PNG_AFTER_IDAT) && - ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) + up->location && (up->location & PNG_AFTER_IDAT) && + ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || + (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) { png_write_chunk(png_ptr, up->name, up->data, up->size); } @@ -428,7 +412,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_CONVERT_tIME_SUPPORTED /* "tm" structure is not supported on WindowsCE */ void PNGAPI -png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime) +png_convert_from_struct_tm(png_timep ptime, PNG_CONST struct tm FAR * ttime) { png_debug(1, "in png_convert_from_struct_tm"); @@ -453,20 +437,22 @@ png_convert_from_time_t(png_timep ptime, time_t ttime) #endif /* Initialize png_ptr structure, and allocate any memory needed */ -png_structp PNGAPI -png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn) +PNG_FUNCTION(png_structp,PNGAPI +png_create_write_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED) { #ifdef PNG_USER_MEM_SUPPORTED return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn, - warn_fn, NULL, NULL, NULL)); + warn_fn, NULL, NULL, NULL)); } /* Alternate initialize png_ptr structure, and allocate any memory needed */ -png_structp PNGAPI -png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn) +static void png_reset_filter_heuristics(png_structp png_ptr); /* forward decl */ + +PNG_FUNCTION(png_structp,PNGAPI +png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) { #endif /* PNG_USER_MEM_SUPPORTED */ volatile int png_cleanup_needed = 0; @@ -476,7 +462,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_structp png_ptr; #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; + jmp_buf png_jmpbuf; #endif #endif int i; @@ -485,7 +471,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_USER_MEM_SUPPORTED png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, - (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); + (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); #else png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); #endif /* PNG_USER_MEM_SUPPORTED */ @@ -503,12 +489,12 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, encounter a png_error() will longjmp here. Since the jmpbuf is then meaningless we abort instead of returning. */ #ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) + if (setjmp(png_jmpbuf)) #else if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */ #endif #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(png_ptr), png_jmpbuf, png_sizeof(jmp_buf)); #endif PNG_ABORT(); #endif @@ -539,38 +525,40 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || (user_png_ver[0] == '0' && user_png_ver[2] < '9')) { -#ifdef PNG_STDIO_SUPPORTED +#ifdef PNG_CONSOLE_IO_SUPPORTED char msg[80]; + if (user_png_ver) { - png_snprintf(msg, 80, - "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - png_snprintf(msg, 80, - "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); + png_snprintf2(msg, 80, + "Application built with libpng-%.20s" + " but running with %.20s", + user_png_ver, + png_libpng_ver); + png_warning(png_ptr, msg); + } +#else + png_warning(png_ptr, + "Incompatible libpng version in application and library"); #endif #ifdef PNG_ERROR_NUMBERS_SUPPORTED png_ptr->flags = 0; #endif - png_warning(png_ptr, - "Incompatible libpng version in application and library"); png_cleanup_needed = 1; } } /* Initialize zbuf - compression buffer */ png_ptr->zbuf_size = PNG_ZBUF_SIZE; + if (!png_cleanup_needed) { png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, - png_ptr->zbuf_size); + png_ptr->zbuf_size); if (png_ptr->zbuf == NULL) png_cleanup_needed = 1; } + if (png_cleanup_needed) { /* Clean up PNG structure and deallocate any memory. */ @@ -578,7 +566,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_ptr->zbuf = NULL; #ifdef PNG_USER_MEM_SUPPORTED png_destroy_struct_2((png_voidp)png_ptr, - (png_free_ptr)free_fn, (png_voidp)mem_ptr); + (png_free_ptr)free_fn, (png_voidp)mem_ptr); #else png_destroy_struct((png_voidp)png_ptr); #endif @@ -588,8 +576,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_set_write_fn(png_ptr, NULL, NULL, NULL); #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, - 1, NULL, NULL); + png_reset_filter_heuristics(png_ptr); #endif return (png_ptr); @@ -603,7 +590,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, */ void PNGAPI png_write_rows(png_structp png_ptr, png_bytepp row, - png_uint_32 num_rows) + png_uint_32 num_rows) { png_uint_32 i; /* row counter */ png_bytepp rp; /* row pointer */ @@ -656,12 +643,12 @@ png_write_image(png_structp png_ptr, png_bytepp image) /* Called by user to write a row of image data */ void PNGAPI -png_write_row(png_structp png_ptr, png_bytep row) +png_write_row(png_structp png_ptr, png_const_bytep row) { if (png_ptr == NULL) return; - png_debug2(1, "in png_write_row (row %ld, pass %d)", + png_debug2(1, "in png_write_row (row %u, pass %d)", png_ptr->row_number, png_ptr->pass); /* Initialize transformations and other stuff if first time */ @@ -670,13 +657,14 @@ png_write_row(png_structp png_ptr, png_bytep row) /* Make sure we wrote the header info */ if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) png_error(png_ptr, - "png_write_info was never called before png_write_row"); + "png_write_info was never called before png_write_row"); /* Check for transforms that have been set but were defined out */ #if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED) if (png_ptr->transformations & PNG_INVERT_MONO) png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined"); #endif + #if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined"); @@ -687,18 +675,22 @@ png_write_row(png_structp png_ptr, png_bytep row) png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); #endif + #if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) if (png_ptr->transformations & PNG_PACK) png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined"); #endif + #if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED) if (png_ptr->transformations & PNG_SHIFT) png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined"); #endif + #if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED) if (png_ptr->transformations & PNG_BGR) png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined"); #endif + #if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED) if (png_ptr->transformations & PNG_SWAP_BYTES) png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined"); @@ -720,6 +712,7 @@ png_write_row(png_structp png_ptr, png_bytep row) return; } break; + case 1: if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) { @@ -727,6 +720,7 @@ png_write_row(png_structp png_ptr, png_bytep row) return; } break; + case 2: if ((png_ptr->row_number & 0x07) != 4) { @@ -734,6 +728,7 @@ png_write_row(png_structp png_ptr, png_bytep row) return; } break; + case 3: if ((png_ptr->row_number & 0x03) || png_ptr->width < 3) { @@ -741,6 +736,7 @@ png_write_row(png_structp png_ptr, png_bytep row) return; } break; + case 4: if ((png_ptr->row_number & 0x03) != 2) { @@ -748,6 +744,7 @@ png_write_row(png_structp png_ptr, png_bytep row) return; } break; + case 5: if ((png_ptr->row_number & 0x01) || png_ptr->width < 2) { @@ -755,6 +752,7 @@ png_write_row(png_structp png_ptr, png_bytep row) return; } break; + case 6: if (!(png_ptr->row_number & 0x01)) { @@ -762,6 +760,9 @@ png_write_row(png_structp png_ptr, png_bytep row) return; } break; + + default: /* error: ignore it */ + break; } } #endif @@ -778,11 +779,12 @@ png_write_row(png_structp png_ptr, png_bytep row) png_ptr->row_info.width); png_debug1(3, "row_info->color_type = %d", png_ptr->row_info.color_type); - png_debug1(3, "row_info->width = %lu", png_ptr->row_info.width); + png_debug1(3, "row_info->width = %u", png_ptr->row_info.width); png_debug1(3, "row_info->channels = %d", png_ptr->row_info.channels); png_debug1(3, "row_info->bit_depth = %d", png_ptr->row_info.bit_depth); png_debug1(3, "row_info->pixel_depth = %d", png_ptr->row_info.pixel_depth); - png_debug1(3, "row_info->rowbytes = %lu", png_ptr->row_info.rowbytes); + png_debug1(3, "row_info->rowbytes = %lu", + (unsigned long)png_ptr->row_info.rowbytes); /* Copy user's row into buffer, leaving room for filter byte. */ png_memcpy(png_ptr->row_buf + 1, row, png_ptr->row_info.rowbytes); @@ -790,10 +792,10 @@ png_write_row(png_structp png_ptr, png_bytep row) #ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Handle interlacing */ if (png_ptr->interlaced && png_ptr->pass < 6 && - (png_ptr->transformations & PNG_INTERLACE)) + (png_ptr->transformations & PNG_INTERLACE)) { png_do_write_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass); + png_ptr->row_buf + 1, png_ptr->pass); /* This should always get caught above, but still ... */ if (!(png_ptr->row_info.width)) { @@ -818,7 +820,7 @@ png_write_row(png_structp png_ptr, png_bytep row) * 5. The color_type is RGB or RGBA */ if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) { /* Intrapixel differencing */ png_do_write_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1); @@ -841,6 +843,7 @@ png_set_flush(png_structp png_ptr, int nrows) if (png_ptr == NULL) return; + png_ptr->flush_dist = (nrows < 0 ? 0 : nrows); } @@ -854,6 +857,7 @@ png_write_flush(png_structp png_ptr) if (png_ptr == NULL) return; + /* We have already written out all of the data */ if (png_ptr->row_number >= png_ptr->num_rows) return; @@ -871,6 +875,7 @@ png_write_flush(png_structp png_ptr) { if (png_ptr->zstream.msg != NULL) png_error(png_ptr, png_ptr->zstream.msg); + else png_error(png_ptr, "zlib error"); } @@ -878,20 +883,19 @@ png_write_flush(png_structp png_ptr) if (!(png_ptr->zstream.avail_out)) { /* Write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size); + png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; wrote_IDAT = 1; } - } while(wrote_IDAT == 1); + } while (wrote_IDAT == 1); /* If there is any data left to be output, write it into a new IDAT */ if (png_ptr->zbuf_size != png_ptr->zstream.avail_out) { /* Write the IDAT and reset the zlib output buffer */ png_write_IDAT(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); + png_ptr->zbuf_size - png_ptr->zstream.avail_out); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } @@ -937,20 +941,20 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) { if (png_ptr != NULL) { - png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); + png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - if (png_ptr->num_chunk_list) - { - png_free(png_ptr, png_ptr->chunk_list); - png_ptr->num_chunk_list = 0; - } + if (png_ptr->num_chunk_list) + { + png_free(png_ptr, png_ptr->chunk_list); + png_ptr->num_chunk_list = 0; + } #endif } #ifdef PNG_USER_MEM_SUPPORTED png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); + (png_voidp)mem_ptr); #else png_destroy_struct((png_voidp)info_ptr); #endif @@ -962,7 +966,7 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) png_write_destroy(png_ptr); #ifdef PNG_USER_MEM_SUPPORTED png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); + (png_voidp)mem_ptr); #else png_destroy_struct((png_voidp)png_ptr); #endif @@ -1006,16 +1010,15 @@ png_write_destroy(png_structp png_ptr) #endif #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_free(png_ptr, png_ptr->prev_filters); - png_free(png_ptr, png_ptr->filter_weights); - png_free(png_ptr, png_ptr->inv_filter_weights); + /* Use this to save a little code space, it doesn't free the filter_costs */ + png_reset_filter_heuristics(png_ptr); png_free(png_ptr, png_ptr->filter_costs); png_free(png_ptr, png_ptr->inv_filter_costs); #endif #ifdef PNG_SETJMP_SUPPORTED /* Reset structure */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(tmp_jmp, png_ptr->png_jmpbuf, png_sizeof(jmp_buf)); #endif error_fn = png_ptr->error_fn; @@ -1035,7 +1038,7 @@ png_write_destroy(png_structp png_ptr) #endif #ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); + png_memcpy(png_ptr->png_jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); #endif } @@ -1047,10 +1050,12 @@ png_set_filter(png_structp png_ptr, int method, int filters) if (png_ptr == NULL) return; + #ifdef PNG_MNG_FEATURES_SUPPORTED if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (method == PNG_INTRAPIXEL_DIFFERENCING)) - method = PNG_FILTER_TYPE_BASE; + (method == PNG_INTRAPIXEL_DIFFERENCING)) + method = PNG_FILTER_TYPE_BASE; + #endif if (method == PNG_FILTER_TYPE_BASE) { @@ -1062,19 +1067,26 @@ png_set_filter(png_structp png_ptr, int method, int filters) case 7: png_warning(png_ptr, "Unknown row filter for method 0"); #endif /* PNG_WRITE_FILTER_SUPPORTED */ case PNG_FILTER_VALUE_NONE: - png_ptr->do_filter = PNG_FILTER_NONE; break; + png_ptr->do_filter = PNG_FILTER_NONE; break; + #ifdef PNG_WRITE_FILTER_SUPPORTED case PNG_FILTER_VALUE_SUB: - png_ptr->do_filter = PNG_FILTER_SUB; break; + png_ptr->do_filter = PNG_FILTER_SUB; break; + case PNG_FILTER_VALUE_UP: - png_ptr->do_filter = PNG_FILTER_UP; break; + png_ptr->do_filter = PNG_FILTER_UP; break; + case PNG_FILTER_VALUE_AVG: - png_ptr->do_filter = PNG_FILTER_AVG; break; + png_ptr->do_filter = PNG_FILTER_AVG; break; + case PNG_FILTER_VALUE_PAETH: - png_ptr->do_filter = PNG_FILTER_PAETH; break; - default: png_ptr->do_filter = (png_byte)filters; break; + png_ptr->do_filter = PNG_FILTER_PAETH; break; + + default: + png_ptr->do_filter = (png_byte)filters; break; #else - default: png_warning(png_ptr, "Unknown row filter for method 0"); + default: + png_warning(png_ptr, "Unknown row filter for method 0"); #endif /* PNG_WRITE_FILTER_SUPPORTED */ } @@ -1093,7 +1105,7 @@ png_set_filter(png_structp png_ptr, int method, int filters) if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL) { png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); + (png_ptr->rowbytes + 1)); png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; } @@ -1102,12 +1114,14 @@ png_set_filter(png_structp png_ptr, int method, int filters) if (png_ptr->prev_row == NULL) { png_warning(png_ptr, "Can't add Up filter after starting"); - png_ptr->do_filter &= ~PNG_FILTER_UP; + png_ptr->do_filter = (png_byte)(png_ptr->do_filter & + ~PNG_FILTER_UP); } + else { png_ptr->up_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); + (png_ptr->rowbytes + 1)); png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; } } @@ -1117,12 +1131,14 @@ png_set_filter(png_structp png_ptr, int method, int filters) if (png_ptr->prev_row == NULL) { png_warning(png_ptr, "Can't add Average filter after starting"); - png_ptr->do_filter &= ~PNG_FILTER_AVG; + png_ptr->do_filter = (png_byte)(png_ptr->do_filter & + ~PNG_FILTER_AVG); } + else { png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); + (png_ptr->rowbytes + 1)); png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; } } @@ -1135,10 +1151,11 @@ png_set_filter(png_structp png_ptr, int method, int filters) png_warning(png_ptr, "Can't add Paeth filter after starting"); png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH); } + else { png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); + (png_ptr->rowbytes + 1)); png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; } } @@ -1160,123 +1177,242 @@ png_set_filter(png_structp png_ptr, int method, int filters) * better compression. */ #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */ -void PNGAPI -png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, - int num_weights, png_doublep filter_weights, - png_doublep filter_costs) +/* Convenience reset API. */ +static void +png_reset_filter_heuristics(png_structp png_ptr) { - int i; + /* Clear out any old values in the 'weights' - this must be done because if + * the app calls set_filter_heuristics multiple times with different + * 'num_weights' values we would otherwise potentially have wrong sized + * arrays. + */ + png_ptr->num_prev_filters = 0; + png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED; + if (png_ptr->prev_filters != NULL) + { + png_bytep old = png_ptr->prev_filters; + png_ptr->prev_filters = NULL; + png_free(png_ptr, old); + } + if (png_ptr->filter_weights != NULL) + { + png_uint_16p old = png_ptr->filter_weights; + png_ptr->filter_weights = NULL; + png_free(png_ptr, old); + } - png_debug(1, "in png_set_filter_heuristics"); + if (png_ptr->inv_filter_weights != NULL) + { + png_uint_16p old = png_ptr->inv_filter_weights; + png_ptr->inv_filter_weights = NULL; + png_free(png_ptr, old); + } + /* Leave the filter_costs - this array is fixed size. */ +} + +static int +png_init_filter_heuristics(png_structp png_ptr, int heuristic_method, + int num_weights) +{ if (png_ptr == NULL) - return; - if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST) - { - png_warning(png_ptr, "Unknown filter heuristic method"); - return; - } + return 0; - if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT) - { - heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED; - } + /* Clear out the arrays */ + png_reset_filter_heuristics(png_ptr); - if (num_weights < 0 || filter_weights == NULL || - heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED) + /* Check arguments; the 'reset' function makes the correct settings for the + * unweighted case, but we must handle the weight case by initializing the + * arrays for the caller. + */ + if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) { - num_weights = 0; - } + int i; - png_ptr->num_prev_filters = (png_byte)num_weights; - png_ptr->heuristic_method = (png_byte)heuristic_method; - - if (num_weights > 0) - { - if (png_ptr->prev_filters == NULL) + if (num_weights > 0) { png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_byte) * num_weights)); + (png_uint_32)(png_sizeof(png_byte) * num_weights)); /* To make sure that the weighting starts out fairly */ for (i = 0; i < num_weights; i++) { png_ptr->prev_filters[i] = 255; } - } - if (png_ptr->filter_weights == NULL) - { png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * num_weights)); + (png_uint_32)(png_sizeof(png_uint_16) * num_weights)); png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * num_weights)); + (png_uint_32)(png_sizeof(png_uint_16) * num_weights)); + for (i = 0; i < num_weights; i++) { png_ptr->inv_filter_weights[i] = png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; } + + /* Safe to set this now */ + png_ptr->num_prev_filters = (png_byte)num_weights; } - for (i = 0; i < num_weights; i++) + /* If, in the future, there are other filter methods, this would + * need to be based on png_ptr->filter. + */ + if (png_ptr->filter_costs == NULL) { - if (filter_weights[i] < 0.0) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - else - { - png_ptr->inv_filter_weights[i] = - (png_uint_16)((double)PNG_WEIGHT_FACTOR*filter_weights[i]+0.5); - png_ptr->filter_weights[i] = - (png_uint_16)((double)PNG_WEIGHT_FACTOR/filter_weights[i]+0.5); - } + png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); + + png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); } - } - - /* If, in the future, there are other filter methods, this would - * need to be based on png_ptr->filter. - */ - if (png_ptr->filter_costs == NULL) - { - png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); - - png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) { png_ptr->inv_filter_costs[i] = png_ptr->filter_costs[i] = PNG_COST_FACTOR; } - } - /* Here is where we set the relative costs of the different filters. We - * should take the desired compression level into account when setting - * the costs, so that Paeth, for instance, has a high relative cost at low - * compression levels, while it has a lower relative cost at higher - * compression settings. The filter types are in order of increasing - * relative cost, so it would be possible to do this with an algorithm. - */ - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) + /* All the arrays are inited, safe to set this: */ + png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_WEIGHTED; + + /* Return the 'ok' code. */ + return 1; + } + else if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT || + heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED) { - if (filter_costs == NULL || filter_costs[i] < 0.0) + return 1; + } + else + { + png_warning(png_ptr, "Unknown filter heuristic method"); + return 0; + } +} + +/* Provide floating and fixed point APIs */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, + int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs) +{ + png_debug(1, "in png_set_filter_heuristics"); + + /* The internal API allocates all the arrays and ensures that the elements of + * those arrays are set to the default value. + */ + if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights)) + return; + + /* If using the weighted method copy in the weights. */ + if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int i; + for (i = 0; i < num_weights; i++) { - png_ptr->inv_filter_costs[i] = - png_ptr->filter_costs[i] = PNG_COST_FACTOR; + if (filter_weights[i] <= 0.0) + { + png_ptr->inv_filter_weights[i] = + png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; + } + + else + { + png_ptr->inv_filter_weights[i] = + (png_uint_16)(PNG_WEIGHT_FACTOR*filter_weights[i]+.5); + + png_ptr->filter_weights[i] = + (png_uint_16)(PNG_WEIGHT_FACTOR/filter_weights[i]+.5); + } } - else if (filter_costs[i] >= 1.0) + + /* Here is where we set the relative costs of the different filters. We + * should take the desired compression level into account when setting + * the costs, so that Paeth, for instance, has a high relative cost at low + * compression levels, while it has a lower relative cost at higher + * compression settings. The filter types are in order of increasing + * relative cost, so it would be possible to do this with an algorithm. + */ + for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) if (filter_costs[i] >= 1.0) { png_ptr->inv_filter_costs[i] = - (png_uint_16)((double)PNG_COST_FACTOR / filter_costs[i] + 0.5); + (png_uint_16)(PNG_COST_FACTOR / filter_costs[i] + .5); + png_ptr->filter_costs[i] = - (png_uint_16)((double)PNG_COST_FACTOR * filter_costs[i] + 0.5); + (png_uint_16)(PNG_COST_FACTOR * filter_costs[i] + .5); } } } +#endif /* FLOATING_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_filter_heuristics_fixed(png_structp png_ptr, int heuristic_method, + int num_weights, png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs) +{ + png_debug(1, "in png_set_filter_heuristics_fixed"); + + /* The internal API allocates all the arrays and ensures that the elements of + * those arrays are set to the default value. + */ + if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights)) + return; + + /* If using the weighted method copy in the weights. */ + if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int i; + for (i = 0; i < num_weights; i++) + { + if (filter_weights[i] <= 0) + { + png_ptr->inv_filter_weights[i] = + png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; + } + + else + { + png_ptr->inv_filter_weights[i] = (png_uint_16) + ((PNG_WEIGHT_FACTOR*filter_weights[i]+PNG_FP_HALF)/PNG_FP_1); + + png_ptr->filter_weights[i] = (png_uint_16)((PNG_WEIGHT_FACTOR* + PNG_FP_1+(filter_weights[i]/2))/filter_weights[i]); + } + } + + /* Here is where we set the relative costs of the different filters. We + * should take the desired compression level into account when setting + * the costs, so that Paeth, for instance, has a high relative cost at low + * compression levels, while it has a lower relative cost at higher + * compression settings. The filter types are in order of increasing + * relative cost, so it would be possible to do this with an algorithm. + */ + for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) + if (filter_costs[i] >= PNG_FP_1) + { + png_uint_32 tmp; + + /* Use a 32 bit unsigned temporary here because otherwise the + * intermediate value will be a 32 bit *signed* integer (ANSI rules) + * and this will get the wrong answer on division. + */ + tmp = PNG_COST_FACTOR*PNG_FP_1 + (filter_costs[i]/2); + tmp /= filter_costs[i]; + + png_ptr->inv_filter_costs[i] = (png_uint_16)tmp; + + tmp = PNG_COST_FACTOR * filter_costs[i] + PNG_FP_HALF; + tmp /= PNG_FP_1; + + png_ptr->filter_costs[i] = (png_uint_16)tmp; + } + } +} +#endif /* FIXED_POINT */ #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ void PNGAPI @@ -1286,6 +1422,7 @@ png_set_compression_level(png_structp png_ptr, int level) if (png_ptr == NULL) return; + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL; png_ptr->zlib_level = level; } @@ -1297,6 +1434,7 @@ png_set_compression_mem_level(png_structp png_ptr, int mem_level) if (png_ptr == NULL) return; + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL; png_ptr->zlib_mem_level = mem_level; } @@ -1308,6 +1446,7 @@ png_set_compression_strategy(png_structp png_ptr, int strategy) if (png_ptr == NULL) return; + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY; png_ptr->zlib_strategy = strategy; } @@ -1317,17 +1456,21 @@ png_set_compression_window_bits(png_structp png_ptr, int window_bits) { if (png_ptr == NULL) return; + if (window_bits > 15) png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); + else if (window_bits < 8) png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); + #ifndef WBITS_8_OK /* Avoid libpng bug with 256-byte windows */ if (window_bits == 8) - { - png_warning(png_ptr, "Compression window is being reset to 512"); - window_bits = 9; - } + { + png_warning(png_ptr, "Compression window is being reset to 512"); + window_bits = 9; + } + #endif png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS; png_ptr->zlib_window_bits = window_bits; @@ -1340,8 +1483,10 @@ png_set_compression_method(png_structp png_ptr, int method) if (png_ptr == NULL) return; + if (method != 8) png_warning(png_ptr, "Only compression method 8 is supported by PNG"); + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD; png_ptr->zlib_method = method; } @@ -1351,18 +1496,20 @@ png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn) { if (png_ptr == NULL) return; + png_ptr->write_row_fn = write_row_fn; } #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED void PNGAPI png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr - write_user_transform_fn) + write_user_transform_fn) { png_debug(1, "in png_set_write_user_transform_fn"); if (png_ptr == NULL) return; + png_ptr->transformations |= PNG_USER_TRANSFORM; png_ptr->write_user_transform_fn = write_user_transform_fn; } @@ -1372,7 +1519,7 @@ png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr #ifdef PNG_INFO_IMAGE_SUPPORTED void PNGAPI png_write_png(png_structp png_ptr, png_infop info_ptr, - int transforms, voidp params) + int transforms, voidp params) { if (png_ptr == NULL || info_ptr == NULL) return; @@ -1393,7 +1540,7 @@ png_write_png(png_structp png_ptr, png_infop info_ptr, * as appropriate to correctly scale the image. */ if ((transforms & PNG_TRANSFORM_SHIFT) - && (info_ptr->valid & PNG_INFO_sBIT)) + && (info_ptr->valid & PNG_INFO_sBIT)) png_set_shift(png_ptr, &info_ptr->sig_bit); #endif @@ -1413,6 +1560,7 @@ png_write_png(png_structp png_ptr, png_infop info_ptr, /* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */ if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER) png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); + else if (transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); #endif @@ -1450,8 +1598,8 @@ png_write_png(png_structp png_ptr, png_infop info_ptr, /* It is REQUIRED to call this to finish writing the rest of the file */ png_write_end(png_ptr, info_ptr); - transforms = transforms; /* Quiet compiler warnings */ - params = params; + PNG_UNUSED(transforms) /* Quiet compiler warnings */ + PNG_UNUSED(params) } #endif #endif /* PNG_WRITE_SUPPORTED */ diff --git a/dll/3rdparty/libpng/pngwtran.c b/dll/3rdparty/libpng/pngwtran.c index 070caa544de..bbf4a25b92e 100644 --- a/dll/3rdparty/libpng/pngwtran.c +++ b/dll/3rdparty/libpng/pngwtran.c @@ -1,8 +1,8 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * Last changed in libpng 1.4.1 [February 25, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.2 [March 31, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,11 +11,10 @@ * and license in png.h */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED #include "pngpriv.h" +#ifdef PNG_WRITE_SUPPORTED + /* Transform the data according to the user's wishes. The order of * transformations is significant. */ @@ -30,53 +29,62 @@ png_do_write_transformations(png_structp png_ptr) #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED if (png_ptr->transformations & PNG_USER_TRANSFORM) if (png_ptr->write_user_transform_fn != NULL) - (*(png_ptr->write_user_transform_fn)) /* User write transform + (*(png_ptr->write_user_transform_fn)) /* User write transform function */ - (png_ptr, /* png_ptr */ - &(png_ptr->row_info), /* row_info: */ - /* png_uint_32 width; width of row */ - /* png_uint_32 rowbytes; number of bytes in row */ - /* png_byte color_type; color type of pixels */ - /* png_byte bit_depth; bit depth of samples */ - /* png_byte channels; number of channels (1-4) */ - /* png_byte pixel_depth; bits per pixel (depth*channels) */ - png_ptr->row_buf + 1); /* start of pixel data for row */ + (png_ptr, /* png_ptr */ + &(png_ptr->row_info), /* row_info: */ + /* png_uint_32 width; width of row */ + /* png_size_t rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ #endif + #ifdef PNG_WRITE_FILLER_SUPPORTED if (png_ptr->transformations & PNG_FILLER) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->flags); + png_do_strip_channel(&(png_ptr->row_info), png_ptr->row_buf + 1, + !(png_ptr->flags & PNG_FILLER_AFTER)); #endif + #ifdef PNG_WRITE_PACKSWAP_SUPPORTED if (png_ptr->transformations & PNG_PACKSWAP) png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif + #ifdef PNG_WRITE_PACK_SUPPORTED if (png_ptr->transformations & PNG_PACK) png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1, - (png_uint_32)png_ptr->bit_depth); + (png_uint_32)png_ptr->bit_depth); #endif + #ifdef PNG_WRITE_SWAP_SUPPORTED if (png_ptr->transformations & PNG_SWAP_BYTES) png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif + #ifdef PNG_WRITE_SHIFT_SUPPORTED if (png_ptr->transformations & PNG_SHIFT) png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->shift)); + &(png_ptr->shift)); #endif + #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_SWAP_ALPHA) png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif + #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED if (png_ptr->transformations & PNG_INVERT_ALPHA) png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif + #ifdef PNG_WRITE_BGR_SUPPORTED if (png_ptr->transformations & PNG_BGR) png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif + #ifdef PNG_WRITE_INVERT_SUPPORTED if (png_ptr->transformations & PNG_INVERT_MONO) png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); @@ -114,9 +122,12 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) { if (*sp != 0) v |= mask; + sp++; + if (mask > 1) mask >>= 1; + else { mask = 0x80; @@ -125,10 +136,13 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) v = 0; } } + if (mask != 0x80) *dp = (png_byte)v; + break; } + case 2: { png_bytep sp, dp; @@ -140,12 +154,14 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) dp = row; shift = 6; v = 0; + for (i = 0; i < row_width; i++) { png_byte value; value = (png_byte)(*sp & 0x03); v |= (value << shift); + if (shift == 0) { shift = 6; @@ -153,14 +169,19 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) dp++; v = 0; } + else shift -= 2; + sp++; } + if (shift != 6) *dp = (png_byte)v; + break; } + case 4: { png_bytep sp, dp; @@ -172,6 +193,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) dp = row; shift = 4; v = 0; + for (i = 0; i < row_width; i++) { png_byte value; @@ -186,20 +208,27 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) dp++; v = 0; } + else shift -= 4; sp++; } + if (shift != 4) *dp = (png_byte)v; + break; } + + default: + break; } + row_info->bit_depth = (png_byte)bit_depth; row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, - row_info->width); + row_info->width); } } #endif @@ -213,12 +242,12 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) * data to 0 to 15. */ void /* PRIVATE */ -png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) +png_do_shift(png_row_infop row_info, png_bytep row, + png_const_color_8p bit_depth) { png_debug(1, "in png_do_shift"); - if ( - row_info->color_type != PNG_COLOR_TYPE_PALETTE) + if (row_info->color_type != PNG_COLOR_TYPE_PALETTE) { int shift_start[4], shift_dec[4]; int channels = 0; @@ -228,19 +257,23 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) shift_start[channels] = row_info->bit_depth - bit_depth->red; shift_dec[channels] = bit_depth->red; channels++; + shift_start[channels] = row_info->bit_depth - bit_depth->green; shift_dec[channels] = bit_depth->green; channels++; + shift_start[channels] = row_info->bit_depth - bit_depth->blue; shift_dec[channels] = bit_depth->blue; channels++; } + else { shift_start[channels] = row_info->bit_depth - bit_depth->gray; shift_dec[channels] = bit_depth->gray; channels++; } + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) { shift_start[channels] = row_info->bit_depth - bit_depth->alpha; @@ -252,14 +285,16 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) if (row_info->bit_depth < 8) { png_bytep bp = row; - png_uint_32 i; + png_size_t i; png_byte mask; - png_uint_32 row_bytes = row_info->rowbytes; + png_size_t row_bytes = row_info->rowbytes; if (bit_depth->gray == 1 && row_info->bit_depth == 2) mask = 0x55; + else if (row_info->bit_depth == 4 && bit_depth->gray == 3) mask = 0x11; + else mask = 0xff; @@ -270,15 +305,18 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) v = *bp; *bp = 0; + for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) { if (j > 0) *bp |= (png_byte)((v << j) & 0xff); + else *bp |= (png_byte)((v >> (-j)) & mask); } } } + else if (row_info->bit_depth == 8) { png_bytep bp = row; @@ -294,15 +332,18 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) v = *bp; *bp = 0; + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) { if (j > 0) *bp |= (png_byte)((v << j) & 0xff); + else *bp |= (png_byte)((v >> (-j)) & 0xff); } } } + else { png_bytep bp; @@ -317,10 +358,12 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1)); value = 0; + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) { if (j > 0) value |= (png_uint_16)((v << j) & (png_uint_16)0xffff); + else value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff); } @@ -341,12 +384,13 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) { if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { - /* This converts from ARGB to RGBA */ if (row_info->bit_depth == 8) { + /* This converts from ARGB to RGBA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; + for (i = 0, sp = dp = row; i < row_width; i++) { png_byte save = *(sp++); @@ -356,9 +400,11 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) *(dp++) = save; } } - /* This converts from AARRGGBB to RRGGBBAA */ + +#ifdef PNG_WRITE_16BIT_SUPPORTED else { + /* This converts from AARRGGBB to RRGGBBAA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; @@ -378,12 +424,14 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) *(dp++) = save[1]; } } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { - /* This converts from AG to GA */ if (row_info->bit_depth == 8) { + /* This converts from AG to GA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; @@ -395,9 +443,11 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) *(dp++) = save; } } - /* This converts from AAGG to GGAA */ + +#ifdef PNG_WRITE_16BIT_SUPPORTED else { + /* This converts from AAGG to GGAA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; @@ -413,6 +463,7 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) *(dp++) = save[1]; } } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ } } } @@ -427,12 +478,13 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) { if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { - /* This inverts the alpha channel in RGBA */ if (row_info->bit_depth == 8) { + /* This inverts the alpha channel in RGBA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; + for (i = 0, sp = dp = row; i < row_width; i++) { /* Does nothing @@ -444,9 +496,11 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) *(dp++) = (png_byte)(255 - *(sp++)); } } - /* This inverts the alpha channel in RRGGBBAA */ + +#ifdef PNG_WRITE_16BIT_SUPPORTED else { + /* This inverts the alpha channel in RRGGBBAA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; @@ -466,12 +520,14 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) *(dp++) = (png_byte)(255 - *(sp++)); } } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { - /* This inverts the alpha channel in GA */ if (row_info->bit_depth == 8) { + /* This inverts the alpha channel in GA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; @@ -482,9 +538,11 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) *(dp++) = (png_byte)(255 - *(sp++)); } } - /* This inverts the alpha channel in GGAA */ + +#ifdef PNG_WRITE_16BIT_SUPPORTED else { + /* This inverts the alpha channel in GGAA */ png_bytep sp, dp; png_uint_32 i; png_uint_32 row_width = row_info->width; @@ -500,6 +558,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) *(dp++) = (png_byte)(255 - *(sp++)); } } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ } } } @@ -512,8 +571,7 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row) { png_debug(1, "in png_do_write_intrapixel"); - if ( - (row_info->color_type & PNG_COLOR_MASK_COLOR)) + if ((row_info->color_type & PNG_COLOR_MASK_COLOR)) { int bytes_per_pixel; png_uint_32 row_width = row_info->width; @@ -524,17 +582,21 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row) if (row_info->color_type == PNG_COLOR_TYPE_RGB) bytes_per_pixel = 3; + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) bytes_per_pixel = 4; + else return; for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) { - *(rp) = (png_byte)((*rp - *(rp+1))&0xff); - *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff); + *(rp) = (png_byte)((*rp - *(rp + 1)) & 0xff); + *(rp + 2) = (png_byte)((*(rp + 2) - *(rp + 1)) & 0xff); } } + +#ifdef PNG_WRITE_16BIT_SUPPORTED else if (row_info->bit_depth == 16) { png_bytep rp; @@ -542,24 +604,27 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row) if (row_info->color_type == PNG_COLOR_TYPE_RGB) bytes_per_pixel = 6; + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) bytes_per_pixel = 8; + else return; for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) { - png_uint_32 s0 = (*(rp ) << 8) | *(rp+1); - png_uint_32 s1 = (*(rp+2) << 8) | *(rp+3); - png_uint_32 s2 = (*(rp+4) << 8) | *(rp+5); + png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1); + png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3); + png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5); png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL); png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL); - *(rp ) = (png_byte)((red >> 8) & 0xff); - *(rp+1) = (png_byte)(red & 0xff); - *(rp+4) = (png_byte)((blue >> 8) & 0xff); - *(rp+5) = (png_byte)(blue & 0xff); + *(rp ) = (png_byte)((red >> 8) & 0xff); + *(rp + 1) = (png_byte)(red & 0xff); + *(rp + 4) = (png_byte)((blue >> 8) & 0xff); + *(rp + 5) = (png_byte)(blue & 0xff); } } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ } } #endif /* PNG_MNG_FEATURES_SUPPORTED */ diff --git a/dll/3rdparty/libpng/pngwutil.c b/dll/3rdparty/libpng/pngwutil.c index 19feb1d98c2..2c35785aa12 100644 --- a/dll/3rdparty/libpng/pngwutil.c +++ b/dll/3rdparty/libpng/pngwutil.c @@ -1,8 +1,8 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.4.1 [February 25, 2010] - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Last changed in libpng 1.5.0 [January 6, 2011] + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -11,11 +11,11 @@ * and license in png.h */ -#define PNG_NO_PEDANTIC_WARNINGS -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED #include "pngpriv.h" +#ifdef PNG_WRITE_SUPPORTED + +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED /* Place a 32-bit number into a buffer in PNG byte order. We work * with unsigned numbers for convenience, although one supported * ancillary chunk uses signed (two's complement) numbers. @@ -32,7 +32,9 @@ png_save_uint_32(png_bytep buf, png_uint_32 i) #ifdef PNG_SAVE_INT_32_SUPPORTED /* The png_save_int_32 function assumes integers are stored in two's * complement format. If this isn't the case, then this routine needs to - * be modified to write data in two's complement format. + * be modified to write data in two's complement format. Note that, + * the following works correctly even if png_int_32 has more than 32 bits + * (compare the more complex code required on read for sign extention.) */ void PNGAPI png_save_int_32(png_bytep buf, png_int_32 i) @@ -54,6 +56,7 @@ png_save_uint_16(png_bytep buf, unsigned int i) buf[0] = (png_byte)((i >> 8) & 0xff); buf[1] = (png_byte)(i & 0xff); } +#endif /* Simple function to write the signature. If we have already written * the magic bytes of the signature, or more likely, the PNG stream is @@ -74,6 +77,7 @@ png_write_sig(png_structp png_ptr) /* Write the rest of the 8 byte signature */ png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], (png_size_t)(8 - png_ptr->sig_bytes)); + if (png_ptr->sig_bytes < 3) png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; } @@ -88,11 +92,12 @@ png_write_sig(png_structp png_ptr) * functions instead. */ void PNGAPI -png_write_chunk(png_structp png_ptr, png_bytep chunk_name, - png_bytep data, png_size_t length) +png_write_chunk(png_structp png_ptr, png_const_bytep chunk_name, + png_const_bytep data, png_size_t length) { if (png_ptr == NULL) return; + png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length); png_write_chunk_data(png_ptr, data, (png_size_t)length); png_write_chunk_end(png_ptr); @@ -103,8 +108,8 @@ png_write_chunk(png_structp png_ptr, png_bytep chunk_name, * passing in png_write_chunk_data(). */ void PNGAPI -png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, - png_uint_32 length) +png_write_chunk_start(png_structp png_ptr, png_const_bytep chunk_name, + png_uint_32 length) { png_byte buf[8]; @@ -125,10 +130,13 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, png_save_uint_32(buf, length); png_memcpy(buf + 4, chunk_name, 4); png_write_data(png_ptr, buf, (png_size_t)8); + /* Put the chunk name into png_ptr->chunk_name */ png_memcpy(png_ptr->chunk_name, chunk_name, 4); + /* Reset the crc and run it over the chunk name */ png_reset_crc(png_ptr); + png_calculate_crc(png_ptr, chunk_name, 4); #ifdef PNG_IO_STATE_SUPPORTED @@ -145,14 +153,17 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, * given to png_write_chunk_start(). */ void PNGAPI -png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length) +png_write_chunk_data(png_structp png_ptr, png_const_bytep data, + png_size_t length) { /* Write the data, and run the CRC over it */ if (png_ptr == NULL) return; + if (data != NULL && length > 0) { png_write_data(png_ptr, data, length); + /* Update the CRC after writing the data, * in case that the user I/O routine alters it. */ @@ -190,18 +201,18 @@ png_write_chunk_end(png_structp png_ptr) typedef struct { - char *input; /* The uncompressed input data */ - int input_len; /* Its length */ - int num_output_ptr; /* Number of output pointers used */ - int max_output_ptr; /* Size of output_ptr */ - png_charpp output_ptr; /* Array of pointers to output */ + png_const_bytep input; /* The uncompressed input data */ + png_size_t input_len; /* Its length */ + int num_output_ptr; /* Number of output pointers used */ + int max_output_ptr; /* Size of output_ptr */ + png_bytep *output_ptr; /* Array of pointers to output */ } compression_state; /* Compress given text into storage in the png_ptr structure */ static int /* PRIVATE */ png_text_compress(png_structp png_ptr, - png_charp text, png_size_t text_len, int compression, - compression_state *comp) + png_const_charp text, png_size_t text_len, int compression, + compression_state *comp) { int ret; @@ -214,14 +225,14 @@ png_text_compress(png_structp png_ptr, /* We may just want to pass the text right through */ if (compression == PNG_TEXT_COMPRESSION_NONE) { - comp->input = text; - comp->input_len = text_len; - return((int)text_len); + comp->input = (png_const_bytep)text; + comp->input_len = text_len; + return((int)text_len); } if (compression >= PNG_TEXT_COMPRESSION_LAST) { -#ifdef PNG_STDIO_SUPPORTED +#ifdef PNG_CONSOLE_IO_SUPPORTED char msg[50]; png_snprintf(msg, 50, "Unknown compression type %d", compression); png_warning(png_ptr, msg); @@ -246,24 +257,29 @@ png_text_compress(png_structp png_ptr, */ /* Set up the compression buffers */ + /* TODO: the following cast hides a potential overflow problem. */ png_ptr->zstream.avail_in = (uInt)text_len; + /* NOTE: assume zlib doesn't overwrite the input */ png_ptr->zstream.next_in = (Bytef *)text; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = (Bytef *)png_ptr->zbuf; + png_ptr->zstream.avail_out = png_ptr->zbuf_size; + png_ptr->zstream.next_out = png_ptr->zbuf; /* This is the same compression loop as in png_write_row() */ do { /* Compress the data */ ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); + if (ret != Z_OK) { /* Error */ if (png_ptr->zstream.msg != NULL) png_error(png_ptr, png_ptr->zstream.msg); + else png_error(png_ptr, "zlib error"); } + /* Check to see if we need more room */ if (!(png_ptr->zstream.avail_out)) { @@ -276,28 +292,33 @@ png_text_compress(png_structp png_ptr, comp->max_output_ptr = comp->num_output_ptr + 4; if (comp->output_ptr != NULL) { - png_charpp old_ptr; + png_bytepp old_ptr; old_ptr = comp->output_ptr; - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_alloc_size_t) - (comp->max_output_ptr * png_sizeof(png_charpp))); + + comp->output_ptr = (png_bytepp)png_malloc(png_ptr, + (png_alloc_size_t) + (comp->max_output_ptr * png_sizeof(png_charpp))); + png_memcpy(comp->output_ptr, old_ptr, old_max - * png_sizeof(png_charp)); + * png_sizeof(png_charp)); + png_free(png_ptr, old_ptr); } else - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_alloc_size_t) - (comp->max_output_ptr * png_sizeof(png_charp))); + comp->output_ptr = (png_bytepp)png_malloc(png_ptr, + (png_alloc_size_t) + (comp->max_output_ptr * png_sizeof(png_charp))); } /* Save the data */ comp->output_ptr[comp->num_output_ptr] = - (png_charp)png_malloc(png_ptr, - (png_alloc_size_t)png_ptr->zbuf_size); + (png_bytep)png_malloc(png_ptr, + (png_alloc_size_t)png_ptr->zbuf_size); + png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); + png_ptr->zbuf_size); + comp->num_output_ptr++; /* and reset the buffer */ @@ -327,29 +348,35 @@ png_text_compress(png_structp png_ptr, comp->max_output_ptr = comp->num_output_ptr + 4; if (comp->output_ptr != NULL) { - png_charpp old_ptr; + png_bytepp old_ptr; old_ptr = comp->output_ptr; + /* This could be optimized to realloc() */ - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_alloc_size_t)(comp->max_output_ptr * - png_sizeof(png_charp))); + comp->output_ptr = (png_bytepp)png_malloc(png_ptr, + (png_alloc_size_t)(comp->max_output_ptr * + png_sizeof(png_charp))); + png_memcpy(comp->output_ptr, old_ptr, - old_max * png_sizeof(png_charp)); + old_max * png_sizeof(png_charp)); + png_free(png_ptr, old_ptr); } + else - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_alloc_size_t)(comp->max_output_ptr * - png_sizeof(png_charp))); + comp->output_ptr = (png_bytepp)png_malloc(png_ptr, + (png_alloc_size_t)(comp->max_output_ptr * + png_sizeof(png_charp))); } /* Save the data */ comp->output_ptr[comp->num_output_ptr] = - (png_charp)png_malloc(png_ptr, - (png_alloc_size_t)png_ptr->zbuf_size); + (png_bytep)png_malloc(png_ptr, + (png_alloc_size_t)png_ptr->zbuf_size); + png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); + png_ptr->zbuf_size); + comp->num_output_ptr++; /* and reset the buffer pointers */ @@ -362,6 +389,7 @@ png_text_compress(png_structp png_ptr, /* We got an error */ if (png_ptr->zstream.msg != NULL) png_error(png_ptr, png_ptr->zstream.msg); + else png_error(png_ptr, "zlib error"); } @@ -369,6 +397,7 @@ png_text_compress(png_structp png_ptr, /* Text length is number of buffers plus last buffer */ text_len = png_ptr->zbuf_size * comp->num_output_ptr; + if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out; @@ -384,24 +413,27 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp) /* Handle the no-compression case */ if (comp->input) { - png_write_chunk_data(png_ptr, (png_bytep)comp->input, - (png_size_t)comp->input_len); + png_write_chunk_data(png_ptr, comp->input, comp->input_len); + return; } /* Write saved output buffers, if any */ for (i = 0; i < comp->num_output_ptr; i++) { - png_write_chunk_data(png_ptr, (png_bytep)comp->output_ptr[i], - (png_size_t)png_ptr->zbuf_size); + png_write_chunk_data(png_ptr, comp->output_ptr[i], + (png_size_t)png_ptr->zbuf_size); + png_free(png_ptr, comp->output_ptr[i]); } + if (comp->max_output_ptr != 0) png_free(png_ptr, comp->output_ptr); + /* Write anything left in zbuf */ if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size) png_write_chunk_data(png_ptr, png_ptr->zbuf, - (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out)); + (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out)); /* Reset zlib for another zTXt/iTXt or image data */ deflateReset(&png_ptr->zstream); @@ -415,8 +447,8 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp) */ void /* PRIVATE */ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, - int bit_depth, int color_type, int compression_type, int filter_type, - int interlace_type) + int bit_depth, int color_type, int compression_type, int filter_type, + int interlace_type) { PNG_IHDR; int ret; @@ -435,36 +467,61 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, case 2: case 4: case 8: - case 16: png_ptr->channels = 1; break; - default: png_error(png_ptr, - "Invalid bit depth for grayscale image"); +#ifdef PNG_WRITE_16BIT_SUPPORTED + case 16: +#endif + png_ptr->channels = 1; break; + + default: + png_error(png_ptr, + "Invalid bit depth for grayscale image"); } break; + case PNG_COLOR_TYPE_RGB: +#ifdef PNG_WRITE_16BIT_SUPPORTED if (bit_depth != 8 && bit_depth != 16) +#else + if (bit_depth != 8) +#endif png_error(png_ptr, "Invalid bit depth for RGB image"); + png_ptr->channels = 3; break; + case PNG_COLOR_TYPE_PALETTE: switch (bit_depth) { case 1: case 2: case 4: - case 8: png_ptr->channels = 1; break; - default: png_error(png_ptr, "Invalid bit depth for paletted image"); + case 8: + png_ptr->channels = 1; + break; + + default: + png_error(png_ptr, "Invalid bit depth for paletted image"); } break; + case PNG_COLOR_TYPE_GRAY_ALPHA: if (bit_depth != 8 && bit_depth != 16) png_error(png_ptr, "Invalid bit depth for grayscale+alpha image"); + png_ptr->channels = 2; break; + case PNG_COLOR_TYPE_RGB_ALPHA: +#ifdef PNG_WRITE_16BIT_SUPPORTED if (bit_depth != 8 && bit_depth != 16) +#else + if (bit_depth != 8) +#endif png_error(png_ptr, "Invalid bit depth for RGBA image"); + png_ptr->channels = 4; break; + default: png_error(png_ptr, "Invalid image color type specified"); } @@ -486,13 +543,13 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, */ if ( #ifdef PNG_MNG_FEATURES_SUPPORTED - !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && - (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) && - (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) && + !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) && #endif - filter_type != PNG_FILTER_TYPE_BASE) + filter_type != PNG_FILTER_TYPE_BASE) { png_warning(png_ptr, "Invalid filter type specified"); filter_type = PNG_FILTER_TYPE_BASE; @@ -500,7 +557,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, #ifdef PNG_WRITE_INTERLACING_SUPPORTED if (interlace_type != PNG_INTERLACE_NONE && - interlace_type != PNG_INTERLACE_ADAM7) + interlace_type != PNG_INTERLACE_ADAM7) { png_warning(png_ptr, "Invalid interlace type specified"); interlace_type = PNG_INTERLACE_ADAM7; @@ -537,52 +594,70 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, buf[12] = (png_byte)interlace_type; /* Write the chunk */ - png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13); + png_write_chunk(png_ptr, png_IHDR, buf, (png_size_t)13); /* Initialize zlib with PNG info */ png_ptr->zstream.zalloc = png_zalloc; png_ptr->zstream.zfree = png_zfree; png_ptr->zstream.opaque = (voidpf)png_ptr; + if (!(png_ptr->do_filter)) { if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || - png_ptr->bit_depth < 8) + png_ptr->bit_depth < 8) png_ptr->do_filter = PNG_FILTER_NONE; + else png_ptr->do_filter = PNG_ALL_FILTERS; } + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY)) { if (png_ptr->do_filter != PNG_FILTER_NONE) png_ptr->zlib_strategy = Z_FILTERED; + else png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY; } + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL)) png_ptr->zlib_level = Z_DEFAULT_COMPRESSION; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL)) png_ptr->zlib_mem_level = 8; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS)) png_ptr->zlib_window_bits = 15; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD)) png_ptr->zlib_method = 8; + ret = deflateInit2(&png_ptr->zstream, png_ptr->zlib_level, - png_ptr->zlib_method, png_ptr->zlib_window_bits, - png_ptr->zlib_mem_level, png_ptr->zlib_strategy); + png_ptr->zlib_method, png_ptr->zlib_window_bits, + png_ptr->zlib_mem_level, png_ptr->zlib_strategy); + if (ret != Z_OK) { - if (ret == Z_VERSION_ERROR) png_error(png_ptr, - "zlib failed to initialize compressor -- version error"); - if (ret == Z_STREAM_ERROR) png_error(png_ptr, - "zlib failed to initialize compressor -- stream error"); - if (ret == Z_MEM_ERROR) png_error(png_ptr, - "zlib failed to initialize compressor -- mem error"); + if (ret == Z_VERSION_ERROR) + png_error(png_ptr, + "zlib failed to initialize compressor -- version error"); + + if (ret == Z_STREAM_ERROR) + png_error(png_ptr, + "zlib failed to initialize compressor -- stream error"); + + if (ret == Z_MEM_ERROR) + png_error(png_ptr, + "zlib failed to initialize compressor -- mem error"); + png_error(png_ptr, "zlib failed to initialize compressor"); } + png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - /* libpng is not interested in zstream.data_type */ - /* Set it to a predefined value, to avoid its evaluation inside zlib */ + /* libpng is not interested in zstream.data_type, so set it + * to a predefined value, to avoid its evaluation inside zlib + */ png_ptr->zstream.data_type = Z_BINARY; png_ptr->mode = PNG_HAVE_IHDR; @@ -593,45 +668,48 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, * structure. */ void /* PRIVATE */ -png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) +png_write_PLTE(png_structp png_ptr, png_const_colorp palette, + png_uint_32 num_pal) { PNG_PLTE; png_uint_32 i; - png_colorp pal_ptr; + png_const_colorp pal_ptr; png_byte buf[3]; png_debug(1, "in png_write_PLTE"); if (( #ifdef PNG_MNG_FEATURES_SUPPORTED - !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && + !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && #endif - num_pal == 0) || num_pal > 256) + num_pal == 0) || num_pal > 256) { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_error(png_ptr, "Invalid number of colors in palette"); - } - else - { - png_warning(png_ptr, "Invalid number of colors in palette"); - return; - } + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_error(png_ptr, "Invalid number of colors in palette"); + } + + else + { + png_warning(png_ptr, "Invalid number of colors in palette"); + return; + } } if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) { png_warning(png_ptr, - "Ignoring request to write a PLTE chunk in grayscale PNG"); + "Ignoring request to write a PLTE chunk in grayscale PNG"); + return; } png_ptr->num_palette = (png_uint_16)num_pal; png_debug1(3, "num_palette = %d", png_ptr->num_palette); - png_write_chunk_start(png_ptr, (png_bytep)png_PLTE, - (png_uint_32)(num_pal * 3)); + png_write_chunk_start(png_ptr, png_PLTE, (png_uint_32)(num_pal * 3)); #ifdef PNG_POINTER_INDEXING_SUPPORTED + for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++) { buf[0] = pal_ptr->red; @@ -639,11 +717,13 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) buf[2] = pal_ptr->blue; png_write_chunk_data(png_ptr, buf, (png_size_t)3); } + #else /* This is a little slower but some buggy compilers need to do this * instead */ pal_ptr=palette; + for (i = 0; i < num_pal; i++) { buf[0] = pal_ptr[i].red; @@ -651,6 +731,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) buf[2] = pal_ptr[i].blue; png_write_chunk_data(png_ptr, buf, (png_size_t)3); } + #endif png_write_chunk_end(png_ptr); png_ptr->mode |= PNG_HAVE_PLTE; @@ -681,31 +762,36 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) png_ptr->height < 16384 && png_ptr->width < 16384) { png_uint_32 uncompressed_idat_size = png_ptr->height * - ((png_ptr->width * - png_ptr->channels * png_ptr->bit_depth + 15) >> 3); + ((png_ptr->width * + png_ptr->channels * png_ptr->bit_depth + 15) >> 3); unsigned int z_cinfo = z_cmf >> 4; unsigned int half_z_window_size = 1 << (z_cinfo + 7); while (uncompressed_idat_size <= half_z_window_size && - half_z_window_size >= 256) + half_z_window_size >= 256) { z_cinfo--; half_z_window_size >>= 1; } + z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4); - if (data[0] != (png_byte)z_cmf) + + if (data[0] != z_cmf) { + int tmp; data[0] = (png_byte)z_cmf; - data[1] &= 0xe0; - data[1] += (png_byte)(0x1f - ((z_cmf << 8) + data[1]) % 0x1f); + tmp = data[1] & 0xe0; + tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; + data[1] = (png_byte)tmp; } } } + else png_error(png_ptr, - "Invalid zlib compression method or flags in IDAT"); + "Invalid zlib compression method or flags in IDAT"); } - png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length); + png_write_chunk(png_ptr, png_IDAT, data, length); png_ptr->mode |= PNG_HAVE_IDAT; } @@ -717,30 +803,12 @@ png_write_IEND(png_structp png_ptr) png_debug(1, "in png_write_IEND"); - png_write_chunk(png_ptr, (png_bytep)png_IEND, NULL, - (png_size_t)0); + png_write_chunk(png_ptr, png_IEND, NULL, (png_size_t)0); png_ptr->mode |= PNG_HAVE_IEND; } #ifdef PNG_WRITE_gAMA_SUPPORTED /* Write a gAMA chunk */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -void /* PRIVATE */ -png_write_gAMA(png_structp png_ptr, double file_gamma) -{ - PNG_gAMA; - png_uint_32 igamma; - png_byte buf[4]; - - png_debug(1, "in png_write_gAMA"); - - /* file_gamma is saved in 1/100,000ths */ - igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5); - png_save_uint_32(buf, igamma); - png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED void /* PRIVATE */ png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma) { @@ -751,10 +819,9 @@ png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma) /* file_gamma is saved in 1/100,000ths */ png_save_uint_32(buf, (png_uint_32)file_gamma); - png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); + png_write_chunk(png_ptr, png_gAMA, buf, (png_size_t)4); } #endif -#endif #ifdef PNG_WRITE_sRGB_SUPPORTED /* Write a sRGB chunk */ @@ -767,18 +834,19 @@ png_write_sRGB(png_structp png_ptr, int srgb_intent) png_debug(1, "in png_write_sRGB"); if (srgb_intent >= PNG_sRGB_INTENT_LAST) - png_warning(png_ptr, - "Invalid sRGB rendering intent specified"); + png_warning(png_ptr, + "Invalid sRGB rendering intent specified"); + buf[0]=(png_byte)srgb_intent; - png_write_chunk(png_ptr, (png_bytep)png_sRGB, buf, (png_size_t)1); + png_write_chunk(png_ptr, png_sRGB, buf, (png_size_t)1); } #endif #ifdef PNG_WRITE_iCCP_SUPPORTED /* Write an iCCP chunk */ void /* PRIVATE */ -png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, - png_charp profile, int profile_len) +png_write_iCCP(png_structp png_ptr, png_const_charp name, int compression_type, + png_const_charp profile, int profile_len) { PNG_iCCP; png_size_t name_len; @@ -794,8 +862,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, comp.input = NULL; comp.input_len = 0; - if ((name_len = png_check_keyword(png_ptr, name, - &new_name)) == 0) + if ((name_len = png_check_keyword(png_ptr, name, &new_name)) == 0) return; if (compression_type != PNG_COMPRESSION_TYPE_BASE) @@ -806,15 +873,16 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, if (profile_len > 3) embedded_profile_len = - ((*( (png_bytep)profile ))<<24) | - ((*( (png_bytep)profile + 1))<<16) | - ((*( (png_bytep)profile + 2))<< 8) | - ((*( (png_bytep)profile + 3)) ); + ((*( (png_const_bytep)profile ))<<24) | + ((*( (png_const_bytep)profile + 1))<<16) | + ((*( (png_const_bytep)profile + 2))<< 8) | + ((*( (png_const_bytep)profile + 3)) ); if (embedded_profile_len < 0) { png_warning(png_ptr, - "Embedded profile length in iCCP chunk is negative"); + "Embedded profile length in iCCP chunk is negative"); + png_free(png_ptr, new_name); return; } @@ -822,7 +890,8 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, if (profile_len < embedded_profile_len) { png_warning(png_ptr, - "Embedded profile length too large in iCCP chunk"); + "Embedded profile length too large in iCCP chunk"); + png_free(png_ptr, new_name); return; } @@ -830,20 +899,23 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, if (profile_len > embedded_profile_len) { png_warning(png_ptr, - "Truncating profile to actual length in iCCP chunk"); + "Truncating profile to actual length in iCCP chunk"); + profile_len = embedded_profile_len; } if (profile_len) profile_len = png_text_compress(png_ptr, profile, - (png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp); + (png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp); /* Make sure we include the NULL after the name and the compression type */ - png_write_chunk_start(png_ptr, (png_bytep)png_iCCP, - (png_uint_32)(name_len + profile_len + 2)); + png_write_chunk_start(png_ptr, png_iCCP, + (png_uint_32)(name_len + profile_len + 2)); + new_name[name_len + 1] = 0x00; + png_write_chunk_data(png_ptr, (png_bytep)new_name, - (png_size_t)(name_len + 2)); + (png_size_t)(name_len + 2)); if (profile_len) png_write_compressed_data_out(png_ptr, &comp); @@ -856,7 +928,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, #ifdef PNG_WRITE_sPLT_SUPPORTED /* Write a sPLT chunk */ void /* PRIVATE */ -png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) +png_write_sPLT(png_structp png_ptr, png_const_sPLT_tp spalette) { PNG_sPLT; png_size_t name_len; @@ -875,11 +947,13 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) return; /* Make sure we include the NULL after the name */ - png_write_chunk_start(png_ptr, (png_bytep)png_sPLT, - (png_uint_32)(name_len + 2 + palette_size)); + png_write_chunk_start(png_ptr, png_sPLT, + (png_uint_32)(name_len + 2 + palette_size)); + png_write_chunk_data(png_ptr, (png_bytep)new_name, - (png_size_t)(name_len + 1)); - png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, (png_size_t)1); + (png_size_t)(name_len + 1)); + + png_write_chunk_data(png_ptr, &spalette->depth, (png_size_t)1); /* Loop through each palette entry, writing appropriately */ #ifdef PNG_POINTER_INDEXING_SUPPORTED @@ -887,42 +961,46 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) { if (spalette->depth == 8) { - entrybuf[0] = (png_byte)ep->red; - entrybuf[1] = (png_byte)ep->green; - entrybuf[2] = (png_byte)ep->blue; - entrybuf[3] = (png_byte)ep->alpha; - png_save_uint_16(entrybuf + 4, ep->frequency); + entrybuf[0] = (png_byte)ep->red; + entrybuf[1] = (png_byte)ep->green; + entrybuf[2] = (png_byte)ep->blue; + entrybuf[3] = (png_byte)ep->alpha; + png_save_uint_16(entrybuf + 4, ep->frequency); } + else { - png_save_uint_16(entrybuf + 0, ep->red); - png_save_uint_16(entrybuf + 2, ep->green); - png_save_uint_16(entrybuf + 4, ep->blue); - png_save_uint_16(entrybuf + 6, ep->alpha); - png_save_uint_16(entrybuf + 8, ep->frequency); + png_save_uint_16(entrybuf + 0, ep->red); + png_save_uint_16(entrybuf + 2, ep->green); + png_save_uint_16(entrybuf + 4, ep->blue); + png_save_uint_16(entrybuf + 6, ep->alpha); + png_save_uint_16(entrybuf + 8, ep->frequency); } + png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size); } #else ep=spalette->entries; - for (i=0; i>spalette->nentries; i++) + for (i = 0; i>spalette->nentries; i++) { if (spalette->depth == 8) { - entrybuf[0] = (png_byte)ep[i].red; - entrybuf[1] = (png_byte)ep[i].green; - entrybuf[2] = (png_byte)ep[i].blue; - entrybuf[3] = (png_byte)ep[i].alpha; - png_save_uint_16(entrybuf + 4, ep[i].frequency); + entrybuf[0] = (png_byte)ep[i].red; + entrybuf[1] = (png_byte)ep[i].green; + entrybuf[2] = (png_byte)ep[i].blue; + entrybuf[3] = (png_byte)ep[i].alpha; + png_save_uint_16(entrybuf + 4, ep[i].frequency); } + else { - png_save_uint_16(entrybuf + 0, ep[i].red); - png_save_uint_16(entrybuf + 2, ep[i].green); - png_save_uint_16(entrybuf + 4, ep[i].blue); - png_save_uint_16(entrybuf + 6, ep[i].alpha); - png_save_uint_16(entrybuf + 8, ep[i].frequency); + png_save_uint_16(entrybuf + 0, ep[i].red); + png_save_uint_16(entrybuf + 2, ep[i].green); + png_save_uint_16(entrybuf + 4, ep[i].blue); + png_save_uint_16(entrybuf + 6, ep[i].alpha); + png_save_uint_16(entrybuf + 8, ep[i].frequency); } + png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size); } #endif @@ -935,7 +1013,7 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) #ifdef PNG_WRITE_sBIT_SUPPORTED /* Write the sBIT chunk */ void /* PRIVATE */ -png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) +png_write_sBIT(png_structp png_ptr, png_const_color_8p sbit, int color_type) { PNG_sBIT; png_byte buf[4]; @@ -949,7 +1027,8 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) png_byte maxbits; maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 : - png_ptr->usr_bit_depth); + png_ptr->usr_bit_depth); + if (sbit->red == 0 || sbit->red > maxbits || sbit->green == 0 || sbit->green > maxbits || sbit->blue == 0 || sbit->blue > maxbits) @@ -957,11 +1036,13 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) png_warning(png_ptr, "Invalid sBIT depth specified"); return; } + buf[0] = sbit->red; buf[1] = sbit->green; buf[2] = sbit->blue; size = 3; } + else { if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth) @@ -969,6 +1050,7 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) png_warning(png_ptr, "Invalid sBIT depth specified"); return; } + buf[0] = sbit->gray; size = 1; } @@ -980,67 +1062,21 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) png_warning(png_ptr, "Invalid sBIT depth specified"); return; } + buf[size++] = sbit->alpha; } - png_write_chunk(png_ptr, (png_bytep)png_sBIT, buf, size); + png_write_chunk(png_ptr, png_sBIT, buf, size); } #endif #ifdef PNG_WRITE_cHRM_SUPPORTED /* Write the cHRM chunk */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -void /* PRIVATE */ -png_write_cHRM(png_structp png_ptr, double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y) -{ - PNG_cHRM; - png_byte buf[32]; - - png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, - int_green_x, int_green_y, int_blue_x, int_blue_y; - - png_debug(1, "in png_write_cHRM"); - - int_white_x = (png_uint_32)(white_x * 100000.0 + 0.5); - int_white_y = (png_uint_32)(white_y * 100000.0 + 0.5); - int_red_x = (png_uint_32)(red_x * 100000.0 + 0.5); - int_red_y = (png_uint_32)(red_y * 100000.0 + 0.5); - int_green_x = (png_uint_32)(green_x * 100000.0 + 0.5); - int_green_y = (png_uint_32)(green_y * 100000.0 + 0.5); - int_blue_x = (png_uint_32)(blue_x * 100000.0 + 0.5); - int_blue_y = (png_uint_32)(blue_y * 100000.0 + 0.5); - -#ifdef PNG_CHECK_cHRM_SUPPORTED - if (png_check_cHRM_fixed(png_ptr, int_white_x, int_white_y, - int_red_x, int_red_y, int_green_x, int_green_y, int_blue_x, int_blue_y)) -#endif - { - /* Each value is saved in 1/100,000ths */ - - png_save_uint_32(buf, int_white_x); - png_save_uint_32(buf + 4, int_white_y); - - png_save_uint_32(buf + 8, int_red_x); - png_save_uint_32(buf + 12, int_red_y); - - png_save_uint_32(buf + 16, int_green_x); - png_save_uint_32(buf + 20, int_green_y); - - png_save_uint_32(buf + 24, int_blue_x); - png_save_uint_32(buf + 28, int_blue_y); - - png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32); - } -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED void /* PRIVATE */ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, - png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, - png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, - png_fixed_point blue_y) + png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, + png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, + png_fixed_point blue_y) { PNG_cHRM; png_byte buf[32]; @@ -1050,7 +1086,7 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, /* Each value is saved in 1/100,000ths */ #ifdef PNG_CHECK_cHRM_SUPPORTED if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y, - green_x, green_y, blue_x, blue_y)) + green_x, green_y, blue_x, blue_y)) #endif { png_save_uint_32(buf, (png_uint_32)white_x); @@ -1065,17 +1101,16 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, png_save_uint_32(buf + 24, (png_uint_32)blue_x); png_save_uint_32(buf + 28, (png_uint_32)blue_y); - png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32); + png_write_chunk(png_ptr, png_cHRM, buf, (png_size_t)32); } } #endif -#endif #ifdef PNG_WRITE_tRNS_SUPPORTED /* Write the tRNS chunk */ void /* PRIVATE */ -png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran, - int num_trans, int color_type) +png_write_tRNS(png_structp png_ptr, png_const_bytep trans_alpha, + png_const_color_16p tran, int num_trans, int color_type) { PNG_tRNS; png_byte buf[6]; @@ -1089,36 +1124,46 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran, png_warning(png_ptr, "Invalid number of transparent colors specified"); return; } + /* Write the chunk out as it is */ - png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans_alpha, - (png_size_t)num_trans); + png_write_chunk(png_ptr, png_tRNS, trans_alpha, (png_size_t)num_trans); } + else if (color_type == PNG_COLOR_TYPE_GRAY) { /* One 16 bit value */ if (tran->gray >= (1 << png_ptr->bit_depth)) { png_warning(png_ptr, - "Ignoring attempt to write tRNS chunk out-of-range for bit_depth"); + "Ignoring attempt to write tRNS chunk out-of-range for bit_depth"); + return; } + png_save_uint_16(buf, tran->gray); - png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2); + png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)2); } + else if (color_type == PNG_COLOR_TYPE_RGB) { /* Three 16 bit values */ png_save_uint_16(buf, tran->red); png_save_uint_16(buf + 2, tran->green); png_save_uint_16(buf + 4, tran->blue); +#ifdef PNG_WRITE_16BIT_SUPPORTED if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) +#else + if (buf[0] | buf[2] | buf[4]) +#endif { png_warning(png_ptr, "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8"); return; } - png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6); + + png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)6); } + else { png_warning(png_ptr, "Can't write tRNS with an alpha channel"); @@ -1129,7 +1174,7 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran, #ifdef PNG_WRITE_bKGD_SUPPORTED /* Write the background chunk */ void /* PRIVATE */ -png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) +png_write_bKGD(png_structp png_ptr, png_const_color_16p back, int color_type) { PNG_bKGD; png_byte buf[6]; @@ -1148,32 +1193,43 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) png_warning(png_ptr, "Invalid background palette index"); return; } + buf[0] = back->index; - png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)1); + png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)1); } + else if (color_type & PNG_COLOR_MASK_COLOR) { png_save_uint_16(buf, back->red); png_save_uint_16(buf + 2, back->green); png_save_uint_16(buf + 4, back->blue); +#ifdef PNG_WRITE_16BIT_SUPPORTED if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) +#else + if (buf[0] | buf[2] | buf[4]) +#endif { png_warning(png_ptr, - "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8"); + "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8"); + return; } - png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6); + + png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)6); } + else { if (back->gray >= (1 << png_ptr->bit_depth)) { png_warning(png_ptr, - "Ignoring attempt to write bKGD chunk out-of-range for bit_depth"); + "Ignoring attempt to write bKGD chunk out-of-range for bit_depth"); + return; } + png_save_uint_16(buf, back->gray); - png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2); + png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)2); } } #endif @@ -1181,7 +1237,7 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) #ifdef PNG_WRITE_hIST_SUPPORTED /* Write the histogram */ void /* PRIVATE */ -png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist) +png_write_hIST(png_structp png_ptr, png_const_uint_16p hist, int num_hist) { PNG_hIST; int i; @@ -1192,18 +1248,20 @@ png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist) if (num_hist > (int)png_ptr->num_palette) { png_debug2(3, "num_hist = %d, num_palette = %d", num_hist, - png_ptr->num_palette); + png_ptr->num_palette); + png_warning(png_ptr, "Invalid number of histogram entries specified"); return; } - png_write_chunk_start(png_ptr, (png_bytep)png_hIST, - (png_uint_32)(num_hist * 2)); + png_write_chunk_start(png_ptr, png_hIST, (png_uint_32)(num_hist * 2)); + for (i = 0; i < num_hist; i++) { png_save_uint_16(buf, hist[i]); png_write_chunk_data(png_ptr, buf, (png_size_t)2); } + png_write_chunk_end(png_ptr); } #endif @@ -1221,9 +1279,10 @@ png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist) * static keywords without having to have duplicate copies of the strings. */ png_size_t /* PRIVATE */ -png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) +png_check_keyword(png_structp png_ptr, png_const_charp key, png_charpp new_key) { png_size_t key_len; + png_const_charp ikp; png_charp kp, dp; int kflag; int kwarn=0; @@ -1241,6 +1300,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) png_debug1(2, "Keyword to be checked is '%s'", key); *new_key = (png_charp)png_malloc_warn(png_ptr, (png_uint_32)(key_len + 2)); + if (*new_key == NULL) { png_warning(png_ptr, "Out of memory while procesing keyword"); @@ -1248,25 +1308,26 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) } /* Replace non-printing characters with a blank and print a warning */ - for (kp = key, dp = *new_key; *kp != '\0'; kp++, dp++) + for (ikp = key, dp = *new_key; *ikp != '\0'; ikp++, dp++) { - if ((png_byte)*kp < 0x20 || - ((png_byte)*kp > 0x7E && (png_byte)*kp < 0xA1)) + if ((png_byte)*ikp < 0x20 || + ((png_byte)*ikp > 0x7E && (png_byte)*ikp < 0xA1)) { -#ifdef PNG_STDIO_SUPPORTED +#ifdef PNG_CONSOLE_IO_SUPPORTED char msg[40]; png_snprintf(msg, 40, - "invalid keyword character 0x%02X", (png_byte)*kp); + "invalid keyword character 0x%02X", (png_byte)*ikp); png_warning(png_ptr, msg); #else png_warning(png_ptr, "invalid character in keyword"); #endif *dp = ' '; } + else { - *dp = *kp; + *dp = *ikp; } } *dp = '\0'; @@ -1307,11 +1368,13 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) *(dp++) = *kp; kflag = 1; } + else if (*kp == ' ') { key_len--; - kwarn=1; + kwarn = 1; } + else { *(dp++) = *kp; @@ -1342,8 +1405,8 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) #ifdef PNG_WRITE_tEXt_SUPPORTED /* Write a tEXt chunk */ void /* PRIVATE */ -png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, - png_size_t text_len) +png_write_tEXt(png_structp png_ptr, png_const_charp key, png_const_charp text, + png_size_t text_len) { PNG_tEXt; png_size_t key_len; @@ -1356,12 +1419,13 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, if (text == NULL || *text == '\0') text_len = 0; + else text_len = png_strlen(text); /* Make sure we include the 0 after the key */ - png_write_chunk_start(png_ptr, (png_bytep)png_tEXt, - (png_uint_32)(key_len + text_len + 1)); + png_write_chunk_start(png_ptr, png_tEXt, + (png_uint_32)(key_len + text_len + 1)); /* * We leave it to the application to meet PNG-1.0 requirements on the * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of @@ -1369,9 +1433,11 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. */ png_write_chunk_data(png_ptr, (png_bytep)new_key, - (png_size_t)(key_len + 1)); + (png_size_t)(key_len + 1)); + if (text_len) - png_write_chunk_data(png_ptr, (png_bytep)text, (png_size_t)text_len); + png_write_chunk_data(png_ptr, (png_const_bytep)text, + (png_size_t)text_len); png_write_chunk_end(png_ptr); png_free(png_ptr, new_key); @@ -1381,12 +1447,12 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, #ifdef PNG_WRITE_zTXt_SUPPORTED /* Write a compressed text chunk */ void /* PRIVATE */ -png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, - png_size_t text_len, int compression) +png_write_zTXt(png_structp png_ptr, png_const_charp key, png_const_charp text, + png_size_t text_len, int compression) { PNG_zTXt; png_size_t key_len; - char buf[1]; + png_byte buf; png_charp new_key; compression_state comp; @@ -1398,7 +1464,7 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, comp.input = NULL; comp.input_len = 0; - if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0) + if ((key_len = png_check_keyword(png_ptr, key, &new_key)) == 0) { png_free(png_ptr, new_key); return; @@ -1418,16 +1484,20 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, &comp); /* Write start of chunk */ - png_write_chunk_start(png_ptr, (png_bytep)png_zTXt, - (png_uint_32)(key_len+text_len + 2)); + png_write_chunk_start(png_ptr, png_zTXt, + (png_uint_32)(key_len+text_len + 2)); + /* Write key */ png_write_chunk_data(png_ptr, (png_bytep)new_key, - (png_size_t)(key_len + 1)); + (png_size_t)(key_len + 1)); + png_free(png_ptr, new_key); - buf[0] = (png_byte)compression; + buf = (png_byte)compression; + /* Write compression */ - png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1); + png_write_chunk_data(png_ptr, &buf, (png_size_t)1); + /* Write the compressed data */ png_write_compressed_data_out(png_ptr, &comp); @@ -1439,8 +1509,8 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, #ifdef PNG_WRITE_iTXt_SUPPORTED /* Write an iTXt chunk */ void /* PRIVATE */ -png_write_iTXt(png_structp png_ptr, int compression, png_charp key, - png_charp lang, png_charp lang_key, png_charp text) +png_write_iTXt(png_structp png_ptr, int compression, png_const_charp key, + png_const_charp lang, png_const_charp lang_key, png_const_charp text) { PNG_iTXt; png_size_t lang_len, key_len, lang_key_len, text_len; @@ -1456,10 +1526,10 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key, comp.output_ptr = NULL; comp.input = NULL; - if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0) + if ((key_len = png_check_keyword(png_ptr, key, &new_key)) == 0) return; - if ((lang_len = png_check_keyword(png_ptr, lang, &new_lang))==0) + if ((lang_len = png_check_keyword(png_ptr, lang, &new_lang)) == 0) { png_warning(png_ptr, "Empty language field in iTXt chunk"); new_lang = NULL; @@ -1468,24 +1538,26 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key, if (lang_key == NULL) lang_key_len = 0; + else lang_key_len = png_strlen(lang_key); if (text == NULL) text_len = 0; + else text_len = png_strlen(text); /* Compute the compressed data; do it now for the length */ - text_len = png_text_compress(png_ptr, text, text_len, compression-2, - &comp); + text_len = png_text_compress(png_ptr, text, text_len, compression - 2, + &comp); /* Make sure we include the compression flag, the compression byte, - * and the NULs after the key, lang, and lang_key parts */ + * and the NULs after the key, lang, and lang_key parts + */ - png_write_chunk_start(png_ptr, (png_bytep)png_iTXt, - (png_uint_32)( + png_write_chunk_start(png_ptr, png_iTXt, (png_uint_32)( 5 /* comp byte, comp flag, terminators for key, lang and lang_key */ + key_len + lang_len @@ -1497,27 +1569,32 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key, * any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them. * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. */ - png_write_chunk_data(png_ptr, (png_bytep)new_key, - (png_size_t)(key_len + 1)); + png_write_chunk_data(png_ptr, (png_bytep)new_key, (png_size_t)(key_len + 1)); /* Set the compression flag */ - if (compression == PNG_ITXT_COMPRESSION_NONE || \ + if (compression == PNG_ITXT_COMPRESSION_NONE || compression == PNG_TEXT_COMPRESSION_NONE) - cbuf[0] = 0; + cbuf[0] = 0; + else /* compression == PNG_ITXT_COMPRESSION_zTXt */ - cbuf[0] = 1; + cbuf[0] = 1; + /* Set the compression method */ cbuf[1] = 0; + png_write_chunk_data(png_ptr, cbuf, (png_size_t)2); cbuf[0] = 0; - png_write_chunk_data(png_ptr, (new_lang ? (png_bytep)new_lang : cbuf), - (png_size_t)(lang_len + 1)); - png_write_chunk_data(png_ptr, (lang_key ? (png_bytep)lang_key : cbuf), - (png_size_t)(lang_key_len + 1)); + png_write_chunk_data(png_ptr, (new_lang ? (png_const_bytep)new_lang : cbuf), + (png_size_t)(lang_len + 1)); + + png_write_chunk_data(png_ptr, (lang_key ? (png_const_bytep)lang_key : cbuf), + (png_size_t)(lang_key_len + 1)); + png_write_compressed_data_out(png_ptr, &comp); png_write_chunk_end(png_ptr); + png_free(png_ptr, new_key); png_free(png_ptr, new_lang); } @@ -1527,7 +1604,7 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key, /* Write the oFFs chunk */ void /* PRIVATE */ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, - int unit_type) + int unit_type) { PNG_oFFs; png_byte buf[9]; @@ -1541,14 +1618,15 @@ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, png_save_int_32(buf + 4, y_offset); buf[8] = (png_byte)unit_type; - png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9); + png_write_chunk(png_ptr, png_oFFs, buf, (png_size_t)9); } #endif #ifdef PNG_WRITE_pCAL_SUPPORTED /* Write the pCAL chunk (described in the PNG extensions document) */ void /* PRIVATE */ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, - png_int_32 X1, int type, int nparams, png_charp units, png_charpp params) + png_int_32 X1, int type, int nparams, png_const_charp units, + png_charpp params) { PNG_pCAL; png_size_t purpose_len, units_len, total_len; @@ -1569,35 +1647,36 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, total_len = purpose_len + units_len + 10; params_len = (png_uint_32p)png_malloc(png_ptr, - (png_alloc_size_t)(nparams * png_sizeof(png_uint_32))); + (png_alloc_size_t)(nparams * png_sizeof(png_uint_32))); /* Find the length of each parameter, making sure we don't count the - null terminator for the last parameter. */ + * null terminator for the last parameter. + */ for (i = 0; i < nparams; i++) { params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1); png_debug2(3, "pCAL parameter %d length = %lu", i, - (unsigned long) params_len[i]); + (unsigned long)params_len[i]); total_len += (png_size_t)params_len[i]; } png_debug1(3, "pCAL total length = %d", (int)total_len); - png_write_chunk_start(png_ptr, (png_bytep)png_pCAL, (png_uint_32)total_len); - png_write_chunk_data(png_ptr, (png_bytep)new_purpose, - (png_size_t)purpose_len); + png_write_chunk_start(png_ptr, png_pCAL, (png_uint_32)total_len); + png_write_chunk_data(png_ptr, (png_const_bytep)new_purpose, + (png_size_t)purpose_len); png_save_int_32(buf, X0); png_save_int_32(buf + 4, X1); buf[8] = (png_byte)type; buf[9] = (png_byte)nparams; png_write_chunk_data(png_ptr, buf, (png_size_t)10); - png_write_chunk_data(png_ptr, (png_bytep)units, (png_size_t)units_len); + png_write_chunk_data(png_ptr, (png_const_bytep)units, (png_size_t)units_len); png_free(png_ptr, new_purpose); for (i = 0; i < nparams; i++) { - png_write_chunk_data(png_ptr, (png_bytep)params[i], - (png_size_t)params_len[i]); + png_write_chunk_data(png_ptr, (png_const_bytep)params[i], + (png_size_t)params_len[i]); } png_free(png_ptr, params_len); @@ -1607,30 +1686,9 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, #ifdef PNG_WRITE_sCAL_SUPPORTED /* Write the sCAL chunk */ -#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) void /* PRIVATE */ -png_write_sCAL(png_structp png_ptr, int unit, double width, double height) -{ - PNG_sCAL; - char buf[64]; - png_size_t total_len; - - png_debug(1, "in png_write_sCAL"); - - buf[0] = (char)unit; - png_snprintf(buf + 1, 63, "%12.12e", width); - total_len = 1 + png_strlen(buf + 1) + 1; - png_snprintf(buf + total_len, 64-total_len, "%12.12e", height); - total_len += png_strlen(buf + total_len); - - png_debug1(3, "sCAL total length = %u", (unsigned int)total_len); - png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len); -} -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -void /* PRIVATE */ -png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, - png_charp height) +png_write_sCAL_s(png_structp png_ptr, int unit, png_const_charp width, + png_const_charp height) { PNG_sCAL; png_byte buf[64]; @@ -1641,6 +1699,7 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, wlen = png_strlen(width); hlen = png_strlen(height); total_len = wlen + hlen + 2; + if (total_len > 64) { png_warning(png_ptr, "Can't write sCAL (buffer too small)"); @@ -1652,18 +1711,16 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, png_memcpy(buf + wlen + 2, height, hlen); /* Do NOT append the '\0' here */ png_debug1(3, "sCAL total length = %u", (unsigned int)total_len); - png_write_chunk(png_ptr, (png_bytep)png_sCAL, buf, total_len); + png_write_chunk(png_ptr, png_sCAL, buf, total_len); } #endif -#endif -#endif #ifdef PNG_WRITE_pHYs_SUPPORTED /* Write the pHYs chunk */ void /* PRIVATE */ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, - png_uint_32 y_pixels_per_unit, - int unit_type) + png_uint_32 y_pixels_per_unit, + int unit_type) { PNG_pHYs; png_byte buf[9]; @@ -1677,7 +1734,7 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, png_save_uint_32(buf + 4, y_pixels_per_unit); buf[8] = (png_byte)unit_type; - png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9); + png_write_chunk(png_ptr, png_pHYs, buf, (png_size_t)9); } #endif @@ -1686,7 +1743,7 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, * or png_convert_from_time_t(), or fill in the structure yourself. */ void /* PRIVATE */ -png_write_tIME(png_structp png_ptr, png_timep mod_time) +png_write_tIME(png_structp png_ptr, png_const_timep mod_time) { PNG_tIME; png_byte buf[7]; @@ -1708,7 +1765,7 @@ png_write_tIME(png_structp png_ptr, png_timep mod_time) buf[5] = mod_time->minute; buf[6] = mod_time->second; - png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7); + png_write_chunk(png_ptr, png_tIME, buf, (png_size_t)7); } #endif @@ -1737,19 +1794,20 @@ png_write_start_row(png_structp png_ptr) png_debug(1, "in png_write_start_row"); buf_size = (png_size_t)(PNG_ROWBYTES( - png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1); + png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1); /* Set up row buffer */ png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)buf_size); + (png_alloc_size_t)buf_size); + png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; #ifdef PNG_WRITE_FILTER_SUPPORTED /* Set up filtering buffer, if using this filter */ if (png_ptr->do_filter & PNG_FILTER_SUB) { - png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)(png_ptr->rowbytes + 1)); + png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, png_ptr->rowbytes + 1); + png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; } @@ -1758,26 +1816,29 @@ png_write_start_row(png_structp png_ptr) { /* Set up previous row buffer */ png_ptr->prev_row = (png_bytep)png_calloc(png_ptr, - (png_alloc_size_t)buf_size); + (png_alloc_size_t)buf_size); if (png_ptr->do_filter & PNG_FILTER_UP) { png_ptr->up_row = (png_bytep)png_malloc(png_ptr, - (png_size_t)(png_ptr->rowbytes + 1)); + png_ptr->rowbytes + 1); + png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; } if (png_ptr->do_filter & PNG_FILTER_AVG) { png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_alloc_size_t)(png_ptr->rowbytes + 1)); + png_ptr->rowbytes + 1); + png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; } if (png_ptr->do_filter & PNG_FILTER_PAETH) { png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, - (png_size_t)(png_ptr->rowbytes + 1)); + png_ptr->rowbytes + 1); + png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; } } @@ -1790,22 +1851,26 @@ png_write_start_row(png_structp png_ptr) if (!(png_ptr->transformations & PNG_INTERLACE)) { png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - - png_pass_ystart[0]) / png_pass_yinc[0]; + png_pass_ystart[0]) / png_pass_yinc[0]; + png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 - - png_pass_start[0]) / png_pass_inc[0]; + png_pass_start[0]) / png_pass_inc[0]; } + else { png_ptr->num_rows = png_ptr->height; png_ptr->usr_width = png_ptr->width; } } + else #endif { png_ptr->num_rows = png_ptr->height; png_ptr->usr_width = png_ptr->width; } + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; png_ptr->zstream.next_out = png_ptr->zbuf; } @@ -1850,24 +1915,30 @@ png_write_finish_row(png_structp png_ptr) { png_ptr->pass++; } + else { /* Loop until we find a non-zero width or height pass */ do { png_ptr->pass++; + if (png_ptr->pass >= 7) break; + png_ptr->usr_width = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + if (png_ptr->transformations & PNG_INTERLACE) break; + } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0); } @@ -1877,8 +1948,9 @@ png_write_finish_row(png_structp png_ptr) { if (png_ptr->prev_row != NULL) png_memset(png_ptr->prev_row, 0, - (png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels* - png_ptr->usr_bit_depth, png_ptr->width)) + 1); + (png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels* + png_ptr->usr_bit_depth, png_ptr->width)) + 1); + return; } } @@ -1890,6 +1962,7 @@ png_write_finish_row(png_structp png_ptr) { /* Tell the compressor we are done */ ret = deflate(&png_ptr->zstream, Z_FINISH); + /* Check for an error */ if (ret == Z_OK) { @@ -1901,10 +1974,12 @@ png_write_finish_row(png_structp png_ptr) png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } } + else if (ret != Z_STREAM_END) { if (png_ptr->zstream.msg != NULL) png_error(png_ptr, png_ptr->zstream.msg); + else png_error(png_ptr, "zlib error"); } @@ -1914,7 +1989,7 @@ png_write_finish_row(png_structp png_ptr) if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) { png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size - - png_ptr->zstream.avail_out); + png_ptr->zstream.avail_out); } deflateReset(&png_ptr->zstream); @@ -1961,6 +2036,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) dp = row; d = 0; shift = 7; + for (i = png_pass_start[pass]; i < row_width; i += png_pass_inc[pass]) { @@ -1974,14 +2050,17 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) *dp++ = (png_byte)d; d = 0; } + else shift--; } if (shift != 7) *dp = (png_byte)d; + break; } + case 2: { png_bytep sp; @@ -1995,6 +2074,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) dp = row; shift = 6; d = 0; + for (i = png_pass_start[pass]; i < row_width; i += png_pass_inc[pass]) { @@ -2008,13 +2088,16 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) *dp++ = (png_byte)d; d = 0; } + else shift -= 2; } if (shift != 6) - *dp = (png_byte)d; + *dp = (png_byte)d; + break; } + case 4: { png_bytep sp; @@ -2029,7 +2112,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) shift = 4; d = 0; for (i = png_pass_start[pass]; i < row_width; - i += png_pass_inc[pass]) + i += png_pass_inc[pass]) { sp = row + (png_size_t)(i >> 1); value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f; @@ -2041,13 +2124,16 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) *dp++ = (png_byte)d; d = 0; } + else shift -= 4; } if (shift != 4) *dp = (png_byte)d; + break; } + default: { png_bytep sp; @@ -2058,18 +2144,21 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) /* Start at the beginning */ dp = row; + /* Find out how many bytes each pixel takes up */ pixel_bytes = (row_info->pixel_depth >> 3); - /* Loop through the row, only looking at the pixels that - matter */ + + /* Loop through the row, only looking at the pixels that matter */ for (i = png_pass_start[pass]; i < row_width; i += png_pass_inc[pass]) { /* Find out where the original pixel is */ sp = row + (png_size_t)i * pixel_bytes; + /* Move the pixel */ if (dp != sp) png_memcpy(dp, sp, pixel_bytes); + /* Next pixel */ dp += pixel_bytes; } @@ -2078,11 +2167,12 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) } /* Set new row width */ row_info->width = (row_info->width + - png_pass_inc[pass] - 1 - - png_pass_start[pass]) / - png_pass_inc[pass]; - row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, - row_info->width); + png_pass_inc[pass] - 1 - + png_pass_start[pass]) / + png_pass_inc[pass]; + + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, + row_info->width); } } #endif @@ -2103,7 +2193,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) png_bytep prev_row, row_buf; png_uint_32 mins, bpp; png_byte filter_to_do = png_ptr->do_filter; - png_uint_32 row_bytes = row_info->rowbytes; + png_size_t row_bytes = row_info->rowbytes; #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED int num_p_filters = (int)png_ptr->num_prev_filters; #endif @@ -2113,8 +2203,8 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) #ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS) { - /* These will never be selected so we need not test them. */ - filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH); + /* These will never be selected so we need not test them. */ + filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH); } #endif @@ -2140,11 +2230,14 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) * computationally expensive). * * GRR 980525: consider also + * * (1) minimum sum of absolute differences from running average (i.e., * keep running sum of non-absolute differences & count of bytes) * [track dispersion, too? restart average if dispersion too large?] + * * (1b) minimum sum of absolute differences from sliding average, probably * with window size <= deflate window (usually 32K) + * * (2) minimum sum of squared differences from zero or running average * (i.e., ~ root-mean-square approach) */ @@ -2153,12 +2246,11 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) /* We don't need to test the 'no filter' case if this is the only filter * that has been chosen, as it doesn't actually do anything to the data. */ - if ((filter_to_do & PNG_FILTER_NONE) && - filter_to_do != PNG_FILTER_NONE) + if ((filter_to_do & PNG_FILTER_NONE) && filter_to_do != PNG_FILTER_NONE) { png_bytep rp; png_uint_32 sum = 0; - png_uint_32 i; + png_size_t i; int v; for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++) @@ -2181,9 +2273,10 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) { sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } @@ -2192,12 +2285,14 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) * it has the minimum possible computational cost - none). */ sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (sumhi > PNG_HIMASK) sum = PNG_MAXSUM; + else sum = (sumhi << PNG_HISHIFT) + sumlo; } @@ -2210,17 +2305,20 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) /* It's the only filter so no testing is needed */ { png_bytep rp, lp, dp; - png_uint_32 i; + png_size_t i; + for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; i++, rp++, dp++) { *dp = *rp; } + for (lp = row_buf + 1; i < row_bytes; i++, rp++, lp++, dp++) { *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); } + best_row = png_ptr->sub_row; } @@ -2228,7 +2326,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) { png_bytep rp, dp, lp; png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; + png_size_t i; int v; #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED @@ -2248,19 +2346,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) { lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (lmhi > PNG_HIMASK) lmins = PNG_MAXSUM; + else lmins = (lmhi << PNG_HISHIFT) + lmlo; } @@ -2273,6 +2374,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) sum += (v < 128) ? v : 256 - v; } + for (lp = row_buf + 1; i < row_bytes; i++, rp++, lp++, dp++) { @@ -2297,19 +2399,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) { sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (sumhi > PNG_HIMASK) sum = PNG_MAXSUM; + else sum = (sumhi << PNG_HISHIFT) + sumlo; } @@ -2326,14 +2431,15 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (filter_to_do == PNG_FILTER_UP) { png_bytep rp, dp, pp; - png_uint_32 i; + png_size_t i; for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, - pp = prev_row + 1; i < row_bytes; - i++, rp++, pp++, dp++) + pp = prev_row + 1; i < row_bytes; + i++, rp++, pp++, dp++) { *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); } + best_row = png_ptr->up_row; } @@ -2341,7 +2447,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) { png_bytep rp, dp, pp; png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; + png_size_t i; int v; @@ -2358,26 +2464,29 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) { lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (lmhi > PNG_HIMASK) lmins = PNG_MAXSUM; + else lmins = (lmhi << PNG_HISHIFT) + lmlo; } #endif for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, - pp = prev_row + 1; i < row_bytes; i++) + pp = prev_row + 1; i < row_bytes; i++) { v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); @@ -2400,19 +2509,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) { sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (sumhi > PNG_HIMASK) sum = PNG_MAXSUM; + else sum = (sumhi << PNG_HISHIFT) + sumlo; } @@ -2430,11 +2542,13 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) { png_bytep rp, dp, pp, lp; png_uint_32 i; + for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, pp = prev_row + 1; i < bpp; i++) { *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); } + for (lp = row_buf + 1; i < row_bytes; i++) { *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) @@ -2447,7 +2561,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) { png_bytep rp, dp, pp, lp; png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; + png_size_t i; int v; #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED @@ -2463,19 +2577,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG) { lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (lmhi > PNG_HIMASK) lmins = PNG_MAXSUM; + else lmins = (lmhi << PNG_HISHIFT) + lmlo; } @@ -2488,10 +2605,11 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) sum += (v < 128) ? v : 256 - v; } + for (lp = row_buf + 1; i < row_bytes; i++) { v = *dp++ = - (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff); + (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff); sum += (v < 128) ? v : 256 - v; @@ -2512,19 +2630,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) { sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (sumhi > PNG_HIMASK) sum = PNG_MAXSUM; + else sum = (sumhi << PNG_HISHIFT) + sumlo; } @@ -2541,9 +2662,10 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (filter_to_do == PNG_FILTER_PAETH) { png_bytep rp, dp, pp, cp, lp; - png_uint_32 i; + png_size_t i; + for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, - pp = prev_row + 1; i < bpp; i++) + pp = prev_row + 1; i < bpp; i++) { *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); } @@ -2580,7 +2702,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) { png_bytep rp, dp, pp, cp, lp; png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; + png_size_t i; int v; #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED @@ -2596,26 +2718,29 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) { lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (lmhi > PNG_HIMASK) lmins = PNG_MAXSUM; + else lmins = (lmhi << PNG_HISHIFT) + lmlo; } #endif for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, - pp = prev_row + 1; i < bpp; i++) + pp = prev_row + 1; i < bpp; i++) { v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); @@ -2648,10 +2773,13 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) pa = abs(p - a); pb = abs(p - b); pc = abs(p - c); + if (pa <= pb && pa <= pc) p = a; + else if (pb <= pc) p = b; + else p = c; #endif /* PNG_SLOW_PAETH */ @@ -2677,19 +2805,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) { sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; + PNG_WEIGHT_SHIFT; } } sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; + PNG_COST_SHIFT; if (sumhi > PNG_HIMASK) sum = PNG_MAXSUM; + else sum = (sumhi << PNG_HISHIFT) + sumlo; } @@ -2711,10 +2842,12 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) if (png_ptr->num_prev_filters > 0) { int j; + for (j = 1; j < num_p_filters; j++) { png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1]; } + png_ptr->prev_filters[j] = best_row[0]; } #endif @@ -2726,25 +2859,54 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) void /* PRIVATE */ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) { + png_size_t avail; + png_debug(1, "in png_write_filtered_row"); png_debug1(2, "filter = %d", filtered_row[0]); /* Set up the zlib input buffer */ png_ptr->zstream.next_in = filtered_row; - png_ptr->zstream.avail_in = (uInt)png_ptr->row_info.rowbytes + 1; + png_ptr->zstream.avail_in = 0; + avail = png_ptr->row_info.rowbytes + 1; /* Repeat until we have compressed all the data */ do { int ret; /* Return of zlib */ + /* Record the number of bytes available - zlib supports at least 65535 + * bytes at one step, depending on the size of the zlib type 'uInt', the + * maximum size zlib can write at once is ZLIB_IO_MAX (from pngpriv.h). + * Use this because on 16 bit systems 'rowbytes' can be up to 65536 (i.e. + * one more than 16 bits) and, in this case 'rowbytes+1' can overflow a + * uInt. ZLIB_IO_MAX can be safely reduced to cause zlib to be called + * with smaller chunks of data. + */ + if (png_ptr->zstream.avail_in == 0) + { + if (avail > ZLIB_IO_MAX) + { + png_ptr->zstream.avail_in = ZLIB_IO_MAX; + avail -= ZLIB_IO_MAX; + } + + else + { + /* So this will fit in the available uInt space: */ + png_ptr->zstream.avail_in = (uInt)avail; + avail = 0; + } + } + /* Compress the data */ ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); + /* Check for compression errors */ if (ret != Z_OK) { if (png_ptr->zstream.msg != NULL) png_error(png_ptr, png_ptr->zstream.msg); + else png_error(png_ptr, "zlib error"); } @@ -2758,7 +2920,7 @@ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } /* Repeat until all data has been compressed */ - } while (png_ptr->zstream.avail_in); + } while (avail > 0 || png_ptr->zstream.avail_in > 0); /* Swap the current and previous rows */ if (png_ptr->prev_row != NULL) diff --git a/dll/3rdparty/libtiff/CMakeLists.txt b/dll/3rdparty/libtiff/CMakeLists.txt index 9be13ae70dc..a83ca57ebd5 100644 --- a/dll/3rdparty/libtiff/CMakeLists.txt +++ b/dll/3rdparty/libtiff/CMakeLists.txt @@ -4,8 +4,7 @@ add_definitions( -DNDEBUG -DBUILD_LIBTIFF_DLL -DDLL_EXPORT - -DUSE_WIN32_FILEIO - -D_DLL -D__USE_CRTIMP) + -DUSE_WIN32_FILEIO) include_directories( ${REACTOS_SOURCE_DIR}/include/reactos/libs/libtiff @@ -52,11 +51,7 @@ add_library(libtiff SHARED tif_zip.c) set_entrypoint(libtiff 0) - -target_link_libraries(libtiff mingw_common zlib getopt) - +target_link_libraries(libtiff zlib getopt) add_importlibs(libtiff user32 msvcrt kernel32) - add_dependencies(libtiff psdk) - add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all) diff --git a/dll/3rdparty/libxslt/CMakeLists.txt b/dll/3rdparty/libxslt/CMakeLists.txt index b56c8b4d1e3..882cef34c3e 100644 --- a/dll/3rdparty/libxslt/CMakeLists.txt +++ b/dll/3rdparty/libxslt/CMakeLists.txt @@ -8,8 +8,7 @@ add_definitions( -DHAVE_WIN32_THREADS -D_REENTRANT -D_WINSOCKAPI_ - -DLIBXML_STATIC - -D_DLL -D__USE_CRTIMP) + -DLIBXML_STATIC) add_library(libxslt SHARED attributes.c @@ -33,14 +32,12 @@ add_library(libxslt SHARED xsltutils.c) set_entrypoint(libxslt 0) - target_link_libraries(libxslt libxml2) - add_importlibs(libxslt msvcrt ws2_32 kernel32) + if(MSVC) -add_importlibs(libxslt ntdll) + add_importlibs(libxslt ntdll) endif() add_dependencies(libxslt psdk) - add_cd_file(TARGET libxslt DESTINATION reactos/system32 FOR all) diff --git a/dll/3rdparty/mesa32/CMakeLists.txt b/dll/3rdparty/mesa32/CMakeLists.txt index 49e25ec7fb1..c69a6cbfeae 100644 --- a/dll/3rdparty/mesa32/CMakeLists.txt +++ b/dll/3rdparty/mesa32/CMakeLists.txt @@ -1,22 +1,21 @@ if(NOT MSVC) -add_definitions(-w) + add_compiler_flags(-w) endif() add_definitions( -DUSE_EXTERNAL_DXTN_LIB=1 -DBUILD_GL32 -DWIN32 - -DUSE_3DNOW_ASM - -D_DLL -D__USE_CRTIMP) + -DUSE_3DNOW_ASM) if(ARCH MATCHES i386) -add_definitions( - -DUSE_X86_ASM - -DUSE_MMX_ASM - -DUSE_SSE_ASM) + add_definitions( + -DUSE_X86_ASM + -DUSE_MMX_ASM + -DUSE_SSE_ASM) else() -add_definitions(-DGL_NO_STDCALL) + add_definitions(-DGL_NO_STDCALL) endif(ARCH MATCHES i386) if(NOT MSVC) @@ -229,44 +228,39 @@ list(APPEND SOURCE src/vbo/vbo_split_inplace.c src/drivers/windows/icd/mesa.def) -set_source_files_properties(src/drivers/windows/icd/mesa.def PROPERTIES EXTERNAL_OBJECT TRUE) - if(ARCH MATCHES i386) -list(APPEND SOURCE - src/tnl/t_vertex_sse.c - src/x86/3dnow.c - src/x86/3dnow_normal.S - src/x86/3dnow_xform1.S - src/x86/3dnow_xform2.S - src/x86/3dnow_xform3.S - src/x86/3dnow_xform4.S - src/x86/common_x86.c - src/x86/common_x86_asm.S - src/x86/glapi_x86.S - src/x86/mmx_blend.S - src/x86/read_rgba_span_x86.S - src/x86/sse_normal.S - src/x86/sse_xform1.S - src/x86/sse_xform2.S - src/x86/sse_xform3.S - src/x86/sse_xform4.S - src/x86/sse.c - src/x86/x86.c - src/x86/x86_cliptest.S - src/x86/x86_xform2.S - src/x86/x86_xform3.S - src/x86/x86_xform4.S - src/x86/rtasm/x86sse.c) + list(APPEND SOURCE + src/tnl/t_vertex_sse.c + src/x86/3dnow.c + src/x86/3dnow_normal.S + src/x86/3dnow_xform1.S + src/x86/3dnow_xform2.S + src/x86/3dnow_xform3.S + src/x86/3dnow_xform4.S + src/x86/common_x86.c + src/x86/common_x86_asm.S + src/x86/glapi_x86.S + src/x86/mmx_blend.S + src/x86/read_rgba_span_x86.S + src/x86/sse_normal.S + src/x86/sse_xform1.S + src/x86/sse_xform2.S + src/x86/sse_xform3.S + src/x86/sse_xform4.S + src/x86/sse.c + src/x86/x86.c + src/x86/x86_cliptest.S + src/x86/x86_xform2.S + src/x86/x86_xform3.S + src/x86/x86_xform4.S + src/x86/rtasm/x86sse.c) else() -list(APPEND SOURCE src/x86-64/x86-64.c src/x86-64/xform4.S) -endif(ARCH MATCHES i386) + list(APPEND SOURCE src/x86-64/x86-64.c src/x86-64/xform4.S) +endif() add_library(mesa32 SHARED ${SOURCE}) set_entrypoint(mesa32 0) - add_importlibs(mesa32 gdi32 user32 msvcrt kernel32 ntdll) - add_dependencies(mesa32 psdk) - add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all) diff --git a/dll/cpl/CMakeLists.txt b/dll/cpl/CMakeLists.txt index a81c845dcab..9276f8fd1df 100644 --- a/dll/cpl/CMakeLists.txt +++ b/dll/cpl/CMakeLists.txt @@ -4,6 +4,9 @@ add_subdirectory(appwiz) add_subdirectory(console)#Warning: console\\/lang/cs-CZ.rc:143: unrecognized escape sequence add_subdirectory(desk) add_subdirectory(hdwwiz) +if(NOT MSVC) + add_subdirectory(inetcpl) # FIXME: msvc build. +endif() add_subdirectory(input) add_subdirectory(intl) add_subdirectory(joy) diff --git a/dll/cpl/access/lang/pl-PL.rc b/dll/cpl/access/lang/pl-PL.rc index 5246a77427f..29c89d457a7 100644 --- a/dll/cpl/access/lang/pl-PL.rc +++ b/dll/cpl/access/lang/pl-PL.rc @@ -1,5 +1,8 @@ -//Polish translation Emil Kaczmarek 2005 -//revised and updated by Olaf Siejka (May, 2007) & (Jan, 2008) +/* + * translated by Emil Kaczmarek (2005) + * revised and updated by Olaf Siejka (May, 2007) & (Jan, 2008) + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -9,39 +12,39 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Klawiatura" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "Klawisze Trwae",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Uyj funkcji Klawisze trwae jeli chcesz uywa Shifta, Ctrl-a albo Alta naciskajc je tylko raz.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "&Uyj Klawiszy Trwaych",IDC_STICKY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + GROUPBOX "Klawisze Trwałe",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Użyj funkcji Klawisze Trwałe jeśli chcesz używać Shift, Ctrl albo Alt naciskając je tylko raz.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Użyj Klawiszy Trwałych",IDC_STICKY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 PUSHBUTTON "U&stawienia",IDC_STICKY_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 GROUPBOX "Klawisze Filtra",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 - LTEXT "Uyj funkcji Klawisze Filtra, jeli chcesz, eby ReactOS ignorowa krtkie albo powtarzajce si wcinicia klawiszy albo zmniejsza czsto powtarzania.",-1,PROPSHEETPADDING(2),LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + LTEXT "Użyj funkcji Klawisze Filtra, jeśli chcesz, żeby ReactOS ignorował krótkie albo powtarzające się naciskanie klawiszy albo zmniejszał częstość powtarzania.",-1,PROPSHEETPADDING(2),LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) AUTOCHECKBOX "Klawisze &Filtra",IDC_FILTER_BOX,PROPSHEETPADDING(2),LABELLINE(13)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 PUSHBUTTON "Us&tawienia",IDC_FILTER_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(13)+2,PROPSHEETPADDING(15),14 - GROUPBOX "Klawisze Przeczajce",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Uyj funkcji Klawisze Przeczajce, jeli chcesz sysze dwik przy naciskaniu klawiszy Caps Lock, Num Lock albo Scroll Lock.",-1,PROPSHEETPADDING(2),LABELLINE(18)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "Uyj &Klawiszy Przeczajcych",IDC_TOGGLE_BOX,PROPSHEETPADDING(2),LABELLINE(20)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + GROUPBOX "Klawisze Przełązające",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Użyj funkcji Klawisze Przełączające, jeśli chcesz słyszeć dźwięk przy naciskaniu klawiszy Caps Lock, Num Lock albo Scroll Lock.",-1,PROPSHEETPADDING(2),LABELLINE(18)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Użyj &Klawiszy Przełączających",IDC_TOGGLE_BOX,PROPSHEETPADDING(2),LABELLINE(20)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 PUSHBUTTON "Ustawie&nia",IDC_TOGGLE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(20)+2,PROPSHEETPADDING(15),14 - AUTOCHECKBOX "&Poka dodatkow pomoc klawiatury w programach",IDC_KEYBOARD_EXTRA,PROPSHEETPADDING(1),LABELLINE(23)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),14 + AUTOCHECKBOX "&Pokaż dodatkową pomoc klawiatury w programach",IDC_KEYBOARD_EXTRA,PROPSHEETPADDING(1),LABELLINE(23)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),14 END IDD_PROPPAGESOUND DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Dwik" +CAPTION "Dźwięk" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "Wartownik Dwiku",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10)+PROPSHEETPADDING(1) - LTEXT "Uyj funkcji Wartownik Dwiku jeli chcesz, eby ReactOS pokazywa wizualne ostrzeenia w chwili generacji dwiku.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "Uyj funkcji &Wartownik Dwiku",IDC_SENTRY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETPADDING(15),14 - LTEXT "Uyj nastpujcego ostrzeenia:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Wartownik Dźwięku",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10)+PROPSHEETPADDING(1) + LTEXT "Użyj funkcji Wartownik Dźwięku jeśli chcesz, żeby ReactOS pokazywał wizualne ostrzeżenia w chwili generacji dźwięku.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Użyj funkcji &Wartownik Dźwięku",IDC_SENTRY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETPADDING(15),14 + LTEXT "Użyj następującego ostrzeżenia:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_SENTRY_COMBO, PROPSHEETPADDING(2), LABELLINE(9), PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - GROUPBOX "Poka Dwiki",-1,PROPSHEETPADDING(1),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 - LTEXT "Uyj funkcji Poka Dwiki, aby nakaza swoim programom wywietlanie napisw w chwili generacji dwiku lub mowy.",-1,PROPSHEETPADDING(2),LABELLINE(14)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "Uyj funkcji &Poka Dwiki",IDC_SSHOW_BOX,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Pokaż Dźwięki",-1,PROPSHEETPADDING(1),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 + LTEXT "Użyj funkcji Pokaż Dźwięki, aby nakazać swoim programom wyświetlanie napisów w chwili generacji dźwięku lub mowy.",-1,PROPSHEETPADDING(2),LABELLINE(14)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Użyj funkcji &Pokaż Dźwięki",IDC_SSHOW_BOX,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 END @@ -51,18 +54,18 @@ CAPTION "Ekran" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Wysoki Kontrast",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Uyj tej funkcji, jeli chcesz, eby Reactos uywa kolorw i czcionek zaprojektowanych do atwego czytania",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "&Uyj funkcji Wysoki Kontrast",IDC_CONTRAST_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + LTEXT "Użyj tej funkcji, jeśli chcesz, żeby Reactos używał kolorów i czcionek zaprojektowanych do łatwego czytania",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Użyj funkcji Wysoki Kontrast",IDC_CONTRAST_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 PUSHBUTTON "U&stawienia",IDC_CONTRAST_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 GROUPBOX "Ustawienia kursora",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(13) - LTEXT "Za pomoc suwakw moesz ustawi czstotliwo migotania kursora i jego szeroko.",-1,PROPSHEETPADDING(2),LABELLINE(9)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - CTEXT "Czstotliwo migotania:",-1,PROPSHEETPADDING(2),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "Za pomocą suwaków możesz ustawić częstotliwość migotania kursora i jego szerokość.",-1,PROPSHEETPADDING(2),LABELLINE(9)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + CTEXT "Częstotliwość migotania:",-1,PROPSHEETPADDING(2),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) LTEXT "Brak",-1,PROPSHEETPADDING(3),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) LTEXT "Szybko",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) CONTROL "",IDC_CURSOR_BLINK_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(10),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(2) - CTEXT "Szeroko kursora:",-1,PROPSHEETPADDING(2),LABELLINE(17),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) - LTEXT "Wski",-1,PROPSHEETPADDING(3),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) + CTEXT "Szerokość kursora:",-1,PROPSHEETPADDING(2),LABELLINE(17),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "Wąski",-1,PROPSHEETPADDING(3),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) LTEXT "Szeroki",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) CONTROL "",IDC_CURSOR_WIDTH_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(10),LABELLINE(18)+5,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(2) LTEXT "",IDC_CURSOR_WIDTH_TEXT,PROPSHEETPADDING(3),LABELLINE(16),PROPSHEETPADDING(4),LABELLINE(1)+5 @@ -75,53 +78,53 @@ CAPTION "Mysz" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Klawisze Myszy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Uyj tej opcji, jeli chcesz kontrolowa wskanik myszy przy pomocy klawiatury numerycznej.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "Uyj funkcji Klawisze &Myszy",IDC_MOUSE_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + LTEXT "Użyj tej opcji, jeśli chcesz kontrolować wskaźnik myszy przy pomocy klawiatury numerycznej.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Użyj funkcji Klawisze &Myszy",IDC_MOUSE_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 PUSHBUTTON "U&stawienia",IDC_MOUSE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 END IDD_PROPPAGEGENERAL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Automatyczny reset",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX "&Wycz funkcje uatwiajce dostp kiedy komputer nie jest uywany przez:",IDC_RESET_BOX,PROPSHEETPADDING(2),LABELLINE(2)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Wyłącz funkcje ułatwiające dostęp kiedy komputer nie jest używany przez:",IDC_RESET_BOX,PROPSHEETPADDING(2),LABELLINE(2)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 COMBOBOX IDC_RESET_COMBO, PROPSHEETPADDING(4), LABELLINE(4), PROPSHEETPADDING(10), LABELLINE(5), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP GROUPBOX "Powiadomienia",-1,PROPSHEETPADDING(1),LABELLINE(7)-2,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX "Ostrzegaj kiedy funkcja jest wczana",IDC_NOTIFICATION_MESSAGE,PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "Odgrywaj dwik, kiedy funkcja jest wczana albo wyczana",IDC_NOTIFICATION_SOUND,PROPSHEETPADDING(2),LABELLINE(10)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "Ostrzegaj kiedy funkcja jest włączana",IDC_NOTIFICATION_MESSAGE,PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "Odgrywaj dźwięk, kiedy funkcja jest włączana albo wyłączana",IDC_NOTIFICATION_SOUND,PROPSHEETPADDING(2),LABELLINE(10)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX "Urzdzenia klawiszy szeregowych",-1,PROPSHEETPADDING(1),LABELLINE(13)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - LTEXT "Urzdzenia klawiszy szeregowych zapewniaj alternatywny dostp do funkcji klawiatury lub myszy.",-1,PROPSHEETPADDING(2),LABELLINE(14)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - AUTOCHECKBOX "Wspieraj urzdzenia klawi&szy szeregowych",IDC_SERIAL_BOX,PROPSHEETPADDING(2),LABELLINE(16)-4,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + GROUPBOX "Urządzenia klawiszy szeregowych",-1,PROPSHEETPADDING(1),LABELLINE(13)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + LTEXT "Urządzenia klawiszy szeregowych zapewniają alternatywny dostęp do funkcji klawiatury lub myszy.",-1,PROPSHEETPADDING(2),LABELLINE(14)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + AUTOCHECKBOX "Wspieraj urządzenia klawi&szy szeregowych",IDC_SERIAL_BOX,PROPSHEETPADDING(2),LABELLINE(16)-4,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 PUSHBUTTON "&Ustawienia",IDC_SERIAL_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(16)-4,PROPSHEETPADDING(15),14 - GROUPBOX "Opcje zarzdzania",-1,PROPSHEETPADDING(1),LABELLINE(19)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + GROUPBOX "Opcje zarządzania",-1,PROPSHEETPADDING(1),LABELLINE(19)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) AUTOCHECKBOX "Zastosuj wszystkie ustawienia dla pu&lpitu logowania",IDC_ADMIN_LOGON_BOX,PROPSHEETPADDING(2),LABELLINE(20)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "Zastosuj wszystkie ustawienia dla &domylnego profilu dla nowych uytkownikw",IDC_ADMIN_USERS_BOX,PROPSHEETPADDING(2),LABELLINE(22)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "Zastosuj wszystkie ustawienia dla &domyślnego profilu dla nowych użytkowników",IDC_ADMIN_USERS_BOX,PROPSHEETPADDING(2),LABELLINE(22)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 END IDD_STICKYKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ustawienia Klawiszy Trwaych" +CAPTION "Ustawienia Klawiszy Trwałych" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Klawisze",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Nacinij klawisz SHIFT 5 razy by aktywowa funkcj KlawiszeTrwae.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "A&ktywuj Klawisze Trwae",IDC_STICKY_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + LTEXT "Naciśnij klawisz SHIFT 5 razy by aktywować funkcję Klawisze Trwałe.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "A&ktywuj Klawisze Trwałe",IDC_STICKY_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 GROUPBOX "Ustawienia",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - AUTOCHECKBOX "&Nacinij klawisz modyfikujcy dwukrotnie, aby zablokowa",IDC_STICKY_LOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "&Wycz Klawisze Trwae gdy dwa klawisze zostan wcinite naraz",IDC_STICKY_UNLOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(12),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Naciśnij klawisz modyfikujący dwukrotnie, aby zablokować",IDC_STICKY_LOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Wyłącz Klawisze Trwałe gdy dwa klawisze zostaną wciśnięte naraz",IDC_STICKY_UNLOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(12),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 GROUPBOX "Powiadomienia",-1,PROPSHEETPADDING(1),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - AUTOCHECKBOX "W&ydaj dwik, po naciniciu klawisza modyfikujcego",IDC_STICKY_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "&Poka stan Klawiszy Trwaych na ekranie",IDC_STICKY_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(18),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "W&ydaj dźwięk, po naciśnięciu klawisza modyfikującego",IDC_STICKY_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Pokaż stan Klawiszy Trwałych na ekranie",IDC_STICKY_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(18),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 @@ -130,24 +133,24 @@ END IDD_FILTERKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ustawienia Filtrw Klawiszy" +CAPTION "Ustawienia Filtrów Klawiszy" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Skrt klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Skrt do Filtrw Klawiszy: \nPrzytrzymaj nacinity przez 8 sekund.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "&Uywaj skrtu",IDC_FILTER_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + GROUPBOX "Skrót klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Skrót do Filtrów Klawiszy: \nPrzytrzymaj naciśnięty przez 8 sekund.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Używaj skrótu",IDC_FILTER_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - GROUPBOX "Ustawienia Filtrw",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(8)+5 + GROUPBOX "Ustawienia Filtrów",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(8)+5 AUTORADIOBUTTON "Ign&oruj powtarzane naciskanie klawiszy",IDC_FILTER_BOUNCE_RADIO,PROPSHEETPADDING(2),LABELLINE(9)+7,PROPSHEETPADDING(20),LABELLINE(1),WS_GROUP|WS_TABSTOP AUTORADIOBUTTON "Ig&noruj szybkie naciskanie klawiszy i spowolnij tempo powtarzania",IDC_FILTER_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(11)+5,PROPSHEETPADDING(20),LABELLINE(2),BS_TOP|BS_MULTILINE PUSHBUTTON "U&stawienia",IDC_FILTER_BOUNCE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(9)+5,PROPSHEETPADDING(15),14,WS_GROUP PUSHBUTTON "Us&tawienia",IDC_FILTER_REPEAT_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(11)+5,PROPSHEETPADDING(15),14,WS_GROUP - LTEXT "&Kliknij tutaj i wpisz cokolwiek by przetestowa ustawienia:",-1,PROPSHEETPADDING(2),LABELLINE(14)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "&Kliknij tutaj i wpisz cokolwiek by przetestować ustawienia:",-1,PROPSHEETPADDING(2),LABELLINE(14)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) EDITTEXT IDC_FILTER_TEST_EDIT,PROPSHEETPADDING(2),LABELLINE(15)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),14,WS_GROUP|ES_AUTOHSCROLL GROUPBOX "Powiadomienia",-1,PROPSHEETPADDING(1),LABELLINE(17)+6,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+3 - AUTOCHECKBOX "&Wydaj dwik gdy klawisz zosta nacinity bd zaakceptowany",IDC_FILTER_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(19),PROPSHEETWIDTH-PROPSHEETPADDING(4),10 - AUTOCHECKBOX "&Poka stan Filtrw Klawiszy na ekranie",IDC_FILTER_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(4),10 + AUTOCHECKBOX "&Wydaj dźwięk gdy klawisz został naciśnięty bądź zaakceptowany",IDC_FILTER_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(19),PROPSHEETWIDTH-PROPSHEETPADDING(4),10 + AUTOCHECKBOX "&Pokaż stan Filtrów Klawiszy na ekranie",IDC_FILTER_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(4),10 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 @@ -156,12 +159,12 @@ END IDD_TOGGLEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ustawienia Klawiszy Przeczajcych" +CAPTION "Ustawienia Klawiszy Przełączających" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Skrt klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Skrt do Klawiszy Przeczajcych: \nPrzytrzymaj nacinity przez 5 sekund.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "Uyj &skrtu",IDC_TOGGLE_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Skrót klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Skrót do Klawiszy Przełączających: \nPrzytrzymaj naciśnięty przez 5 sekund.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Użyj &skrótu",IDC_TOGGLE_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 @@ -173,12 +176,12 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ustawienia Wysokiego Kontrastu" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Skrt klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Skrt do Wysokiego Kontrastu: \nNacinij .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "&Uyj skrtu",IDC_CONTRAST_ACTIVATE_CHECK,PROPSHEETPADDING(4),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Skrót klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Skrót do Wysokiego Kontrastu: \nNaciśnij .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Użyj skrótu",IDC_CONTRAST_ACTIVATE_CHECK,PROPSHEETPADDING(4),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX "Schemat kolorw Wysokiego Kontrastu",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - LTEXT "Obecny schemat kolorw:",-1,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Schemat kolorów Wysokiego Kontrastu",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) + LTEXT "Obecny schemat kolorów:",-1,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_CONTRAST_COMBO, PROPSHEETPADDING(2), LABELLINE(11)+2, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP @@ -192,29 +195,29 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ustawienia Klawiszy Myszy" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Skrt klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT "Skrt do Klawiszy Myszy: \nNacinij .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "&Uyj skrtu",IDC_MOUSEKEYS_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Skrót klawiszowy",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Skrót do Klawiszy Myszy: \nNaciśnij .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Użyj skrótu",IDC_MOUSEKEYS_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX "Szybko kursora",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(9) + GROUPBOX "Szybkość kursora",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(9) - LTEXT "&Szybko maksymalna:",-1,PROPSHEETPADDING(2),LABELLINE(10)+4,PROPSHEETPADDING(8),LABELLINE(1) - LTEXT "Maa",-1,PROPSHEETPADDING(11),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "&Szybkość maksymalna:",-1,PROPSHEETPADDING(2),LABELLINE(10)+4,PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "Mała",-1,PROPSHEETPADDING(11),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) CONTROL "",IDC_MOUSEKEYS_SPEED_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(15),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(22),LABELLINE(2) - LTEXT "Dua",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "Duża",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) LTEXT "&Przyspieszenie:",-1,PROPSHEETPADDING(2),LABELLINE(13)+4,PROPSHEETPADDING(8),LABELLINE(1) LTEXT "Wolno",-1,PROPSHEETPADDING(11),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) CONTROL "",IDC_MOUSEKEYS_ACCEL_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(15),LABELLINE(13)+2,PROPSHEETWIDTH-PROPSHEETPADDING(22),LABELLINE(2) LTEXT "Szybko",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) - AUTOCHECKBOX "P&rzytrzymaj klawisz Ctrl by przyspieszy i Shift by spowolni",IDC_MOUSEKEYS_SPEED_CHECK,PROPSHEETPADDING(2),LABELLINE(16),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "P&rzytrzymaj klawisz Ctrl by przyspieszyć i Shift by spowolnić",IDC_MOUSEKEYS_SPEED_CHECK,PROPSHEETPADDING(2),LABELLINE(16),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - LTEXT "Uyj Klawiszy Myszy gdy NumLock jest:",-1,PROPSHEETPADDING(1),LABELLINE(18)+7,PROPSHEETPADDING(20),LABELLINE(1) - AUTORADIOBUTTON "&Wczonyn",IDC_MOUSEKEYS_ON_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(14),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) - AUTORADIOBUTTON "Wy&czony",IDC_MOUSEKEYS_OFF_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(8),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) + LTEXT "Użyj Klawiszy Myszy gdy NumLock jest:",-1,PROPSHEETPADDING(1),LABELLINE(18)+7,PROPSHEETPADDING(20),LABELLINE(1) + AUTORADIOBUTTON "&Włączonyn",IDC_MOUSEKEYS_ON_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(14),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) + AUTORADIOBUTTON "Wyłą&czony",IDC_MOUSEKEYS_OFF_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(8),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) - AUTOCHECKBOX "P&oka stan Klawiszy Myszy na ekranie",IDC_MOUSEKEYS_STATUS_CHECK,PROPSHEETPADDING(1),LABELLINE(20)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "P&okaż stan Klawiszy Myszy na ekranie",IDC_MOUSEKEYS_STATUS_CHECK,PROPSHEETPADDING(1),LABELLINE(20)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 @@ -223,11 +226,11 @@ END IDD_BOUNCEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ustawienia zaawansowane Filtrw Klawiszy" +CAPTION "Ustawienia zaawansowane Filtrów Klawiszy" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Klawisze powtarzane",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - LTEXT "&Ignoruj powtarzajce si naciskanie, szybsze ni:",-1,PROPSHEETPADDING(2),LABELLINE(2)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + LTEXT "&Ignoruj powtarzające się naciskanie, szybsze niż:",-1,PROPSHEETPADDING(2),LABELLINE(2)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_BOUNCE_TIME_COMBO, PROPSHEETPADDING(2), LABELLINE(3)+5, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP @@ -241,24 +244,24 @@ END IDD_REPEATKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ustawienia zaawansowane Filtrw Klawiszy" +CAPTION "Ustawienia zaawansowane Filtrów Klawiszy" BEGIN GROUPBOX "Klawisze powtarzane",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(12) - LTEXT "Zastp ustawienia Klawiatury w Panelu Sterowania:",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + LTEXT "Zastąp ustawienia Klawiatury w Panelu Sterowania:",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) AUTORADIOBUTTON "&Bez powtarzania klawiszy",IDC_REPEAT_NOREPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(3)+3,78,LABELLINE(1),WS_GROUP - AUTORADIOBUTTON "&Zmniejsz czstotliwo powtarzania",IDC_REPEAT_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(4)+7,131,LABELLINE(1) + AUTORADIOBUTTON "&Zmniejsz częstotliwość powtarzania",IDC_REPEAT_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(4)+7,131,LABELLINE(1) - LTEXT "O&pnienie powtarzania:",-1,PROPSHEETPADDING(4),LABELLINE(6)+4,PROPSHEETPADDING(10),LABELLINE(1) + LTEXT "O&późnienie powtarzania:",-1,PROPSHEETPADDING(4),LABELLINE(6)+4,PROPSHEETPADDING(10),LABELLINE(1) COMBOBOX IDC_REPEAT_DELAY_COMBO, PROPSHEETPADDING(4), LABELLINE(7)+6, PROPSHEETWIDTH-PROPSHEETPADDING(6), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "Czs&totliwo powtarzania:",-1,PROPSHEETPADDING(4),LABELLINE(9)+6,PROPSHEETPADDING(10),LABELLINE(1) + LTEXT "Częs&totliwość powtarzania:",-1,PROPSHEETPADDING(4),LABELLINE(9)+6,PROPSHEETPADDING(10),LABELLINE(1) COMBOBOX IDC_REPEAT_REPEAT_COMBO, PROPSHEETPADDING(4), LABELLINE(10)+8, PROPSHEETWIDTH-PROPSHEETPADDING(6), LABELLINE(7), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP GROUPBOX "Spowolnienie Klawiszy",-1,PROPSHEETPADDING(1),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+4 - LTEXT "&Klawisz musi by przycinity przez:",-1,PROPSHEETPADDING(2),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "&Klawisz musi być przyciśnięty przez:",-1,PROPSHEETPADDING(2),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_REPEAT_WAIT_COMBO, PROPSHEETPADDING(2), LABELLINE(16)+4, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(8), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP @@ -272,17 +275,17 @@ END IDD_SERIALKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ustawienia Urzdze Dodatkowych" +CAPTION "Ustawienia Urządzeń Dodatkowych" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Urzdzenie Dodatkowe",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10) - LTEXT "Wybierz port do ktrego podczone jest dodatkowe urzdzenie wejcia.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + GROUPBOX "Urządzenie Dodatkowe",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10) + LTEXT "Wybierz port do którego podłączone jest dodatkowe urządzenie wejścia.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) LTEXT "&Port Szeregowy:",-1,PROPSHEETPADDING(2),LABELLINE(3)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_SERIAL_PORT_COMBO, PROPSHEETPADDING(2), LABELLINE(4)+7, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "&Prdko transmisji:",-1,PROPSHEETPADDING(2),LABELLINE(7),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + LTEXT "&Prędkość transmisji:",-1,PROPSHEETPADDING(2),LABELLINE(7),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_SERIAL_BAUD_COMBO, PROPSHEETPADDING(2), LABELLINE(8)+2, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(8), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP @@ -293,13 +296,13 @@ END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Uatwienia dostpu" - IDS_CPLSYSTEMDESCRIPTION "Personalizuje funkcje uatwie dostpu na twoim komputerze." + IDS_CPLSYSTEMNAME "Ułatwienia dostępu" + IDS_CPLSYSTEMDESCRIPTION "Personalizuje funkcje ułatwień dostępu na twoim komputerze." IDS_SENTRY_NONE "[Brak]" - IDS_SENTRY_TITLE "Migajcy pasek tytuu" - IDS_SENTRY_WINDOW "Migajce okno aktywne" - IDS_SENTRY_DISPLAY "Migajcy pulpit" + IDS_SENTRY_TITLE "Migający pasek tytułu" + IDS_SENTRY_WINDOW "Migające okno aktywne" + IDS_SENTRY_DISPLAY "Migający pulpit" IDS_SECONDS "Sekund" IDS_MINUTES "Minut" diff --git a/dll/cpl/access/lang/ro-RO.rc b/dll/cpl/access/lang/ro-RO.rc index 70b2fe625f9..05cb128a54b 100644 --- a/dll/cpl/access/lang/ro-RO.rc +++ b/dll/cpl/access/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_PROPPAGEKEYBOARD DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Tastatură" @@ -303,5 +301,3 @@ BEGIN IDS_SECONDS "secunde" IDS_MINUTES "minute" END - -#pragma code_page(default) diff --git a/dll/cpl/access/lang/ru-RU.rc b/dll/cpl/access/lang/ru-RU.rc index 1ad3fae36b5..a2a1f9fc4af 100644 --- a/dll/cpl/access/lang/ru-RU.rc +++ b/dll/cpl/access/lang/ru-RU.rc @@ -3,64 +3,64 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGEKEYBOARD DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Клавиатура" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " Shift, Ctrl Alt .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_STICKY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_STICKY_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(5)+6,PROPSHEETPADDING(15)-5,14 + GROUPBOX "Залипание клавиш",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Ввод сочетаний с клавишами Shift, Ctrl или Alt путем последовательного нажатия клавиш.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Залипание клавиш",IDC_STICKY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "&Настройка",IDC_STICKY_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(5)+6,PROPSHEETPADDING(15)-5,14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX " & ",IDC_FILTER_BOX, 12, 125, 134, 14 - PUSHBUTTON "&",IDC_FILTER_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(13)+6,PROPSHEETPADDING(15)-5,14 + GROUPBOX "Фильтрация ввода",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 + LTEXT "Игнорирование случайных кратковременных или повторных нажатий клавиш.",-1,PROPSHEETPADDING(2),LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Использовать &фильтрацию ввода",IDC_FILTER_BOX, 12, 125, 134, 14 + PUSHBUTTON "Н&астройка",IDC_FILTER_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(13)+6,PROPSHEETPADDING(15)-5,14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " Caps Lock, Num Lock Scroll Lock.",-1,PROPSHEETPADDING(2),LABELLINE(18)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - AUTOCHECKBOX "&",IDC_TOGGLE_BOX,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_TOGGLE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(20)+6,PROPSHEETPADDING(15)-5,14 + GROUPBOX "Озвучивание переключения режимов",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Озвучивание нажатия клавиш переключения режимов Caps Lock, Num Lock и Scroll Lock.",-1,PROPSHEETPADDING(2),LABELLINE(18)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + AUTOCHECKBOX "&Озвучивание",IDC_TOGGLE_BOX,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "На&стройка",IDC_TOGGLE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(20)+6,PROPSHEETPADDING(15)-5,14 - AUTOCHECKBOX "& ",IDC_KEYBOARD_EXTRA,PROPSHEETPADDING(1),LABELLINE(23)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),14 + AUTOCHECKBOX "&Дополнительные сведения о работе с клавиатурой",IDC_KEYBOARD_EXTRA,PROPSHEETPADDING(1),LABELLINE(23)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),14 END IDD_PROPPAGESOUND DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Звук" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10)+PROPSHEETPADDING(1) - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_SENTRY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETPADDING(15)+10,14 - LTEXT " :", IDC_SENTRY_TEXT, PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Визуальное оповещение",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10)+PROPSHEETPADDING(1) + LTEXT "Сопровождение звуковых сигналов визуальным оповещением.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "В&изуальное оповещение",IDC_SENTRY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETPADDING(15)+10,14 + LTEXT "Оповещение пользователя:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_SENTRY_COMBO, PROPSHEETPADDING(2), LABELLINE(9), PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(14)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3)-7 - AUTOCHECKBOX "&",IDC_SSHOW_BOX,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Субтитры",-1,PROPSHEETPADDING(1),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 + LTEXT "Сопровождение звуков и речи субтитрами.",-1,PROPSHEETPADDING(2),LABELLINE(14)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3)-7 + AUTOCHECKBOX "С&убтитры",IDC_SSHOW_BOX,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 END IDD_PROPPAGEDISPLAY DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Экран" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " , .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_CONTRAST_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_CONTRAST_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 + GROUPBOX "Высокая контрастность",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Особо подобранные сочетания цветов и шрифтов, облегчающие восприятие.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Высокая контрастность",IDC_CONTRAST_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "&Настройка",IDC_CONTRAST_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(13) - LTEXT " , .",-1,PROPSHEETPADDING(2),LABELLINE(9)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - CTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) - LTEXT "",-1,PROPSHEETPADDING(3),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) + GROUPBOX "Параметры курсора",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(13) + LTEXT "Чтобы изменить частоту мерцания курсора и его ширину, воспользуйтесь следующими ползунками.",-1,PROPSHEETPADDING(2),LABELLINE(9)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + CTEXT "&Частота мерцания:",-1,PROPSHEETPADDING(2),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "Реже",-1,PROPSHEETPADDING(3),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) + LTEXT "Чаще",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) CONTROL "",IDC_CURSOR_BLINK_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(10),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(2) - CTEXT "&:",-1,PROPSHEETPADDING(2),LABELLINE(17),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) - LTEXT "",-1,PROPSHEETPADDING(3),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) + CTEXT "&Толщина:",-1,PROPSHEETPADDING(2),LABELLINE(17),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "Уже",-1,PROPSHEETPADDING(3),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) + LTEXT "Шире",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) CONTROL "",IDC_CURSOR_WIDTH_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(10),LABELLINE(18)+5,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(2) LTEXT "",IDC_CURSOR_WIDTH_TEXT,PROPSHEETPADDING(3),LABELLINE(16),PROPSHEETPADDING(4),LABELLINE(1)+5 END @@ -68,237 +68,237 @@ END IDD_PROPPAGEMOUSE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Мышь" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_MOUSE_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_MOUSE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 + GROUPBOX "Управление указателем с клавиатуры",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Управление указателем с цифровой панели клавиатуры.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Управление с клавиатуры",IDC_MOUSE_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "&Настройка",IDC_MOUSE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 END IDD_PROPPAGEGENERAL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX "& :",IDC_RESET_BOX,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Автоматический сброс",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + AUTOCHECKBOX "&Отключать при простое в течение:",IDC_RESET_BOX,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 COMBOBOX IDC_RESET_COMBO, PROPSHEETPADDING(4), LABELLINE(4), PROPSHEETPADDING(10), LABELLINE(5), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(7)-2,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX " &",IDC_NOTIFICATION_MESSAGE,PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX " &",IDC_NOTIFICATION_SOUND,PROPSHEETPADDING(2),LABELLINE(10)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Уведомление",-1,PROPSHEETPADDING(1),LABELLINE(7)-2,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + AUTOCHECKBOX "Выдавать сообщение при включении &режима",IDC_NOTIFICATION_MESSAGE,PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "Выдавать звуковой сигнал при изменении р&ежима",IDC_NOTIFICATION_SOUND,PROPSHEETPADDING(2),LABELLINE(10)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(13)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - LTEXT " , .",-1,12,124,222,18 - AUTOCHECKBOX "& ",IDC_SERIAL_BOX,12,142,138,14 - PUSHBUTTON "&",IDC_SERIAL_BUTTON,153,142,81,14 + GROUPBOX "Альтернативные устройства ввода",-1,PROPSHEETPADDING(1),LABELLINE(13)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + LTEXT "Использование альтернативных устройств ввода, заменяющих мышь и клавиатуру.",-1,12,124,222,18 + AUTOCHECKBOX "&Альтернативные устройства ввода",IDC_SERIAL_BOX,12,142,138,14 + PUSHBUTTON "На&стройка",IDC_SERIAL_BUTTON,153,142,81,14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(19)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX " & ",IDC_ADMIN_LOGON_BOX,PROPSHEETPADDING(2),LABELLINE(20)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "& ",IDC_ADMIN_USERS_BOX,PROPSHEETPADDING(2),LABELLINE(22)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Административные параметры",-1,PROPSHEETPADDING(1),LABELLINE(19)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + AUTOCHECKBOX "Применить &к рабочему столу входа в систему",IDC_ADMIN_LOGON_BOX,PROPSHEETPADDING(2),LABELLINE(20)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "Ис&пользовать для всех новых пользователей",IDC_ADMIN_USERS_BOX,PROPSHEETPADDING(2),LABELLINE(22)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 END IDD_STICKYKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка режима залипания клавиш" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " SHIFT 5 .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_STICKY_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Клавиши",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Нажатие клавиши SHIFT 5 раз активирует залипание клавиш.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Активировать залипание клавиш",IDC_STICKY_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - AUTOCHECKBOX "& Ctrl, Shift Alt",IDC_STICKY_LOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "& ",IDC_STICKY_UNLOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(12),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Параметры",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) + AUTOCHECKBOX "&Двойное нажатие запирает клавиши Ctrl, Shift и Alt",IDC_STICKY_LOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "Отк&лючать залипание при нажатии сразу двух клавиш",IDC_STICKY_UNLOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(12),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - AUTOCHECKBOX "& Ctrl, Shift Alt",IDC_STICKY_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "& ",IDC_STICKY_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(18),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Уведомление",-1,PROPSHEETPADDING(1),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) + AUTOCHECKBOX "&Выдавать звуковой сигнал при нажатии Ctrl, Shift и Alt",IDC_STICKY_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Отображать состояние режима залипания на экране",IDC_STICKY_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(18),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_FILTERKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка режима фильтрации" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " : \n 8 .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_FILTER_ACTIVATE_CHECK,12,49,154,14 + GROUPBOX "Включение режима",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Включение режима фильтрации: \nудерживание клавиши в течение 8 секунд.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Использовать такой способ включения",IDC_FILTER_ACTIVATE_CHECK,12,49,154,14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(8)+5 - AUTORADIOBUTTON " & ",IDC_FILTER_BOUNCE_RADIO,12,90,141,11,WS_GROUP|WS_TABSTOP - AUTORADIOBUTTON " & ; ",IDC_FILTER_REPEAT_RADIO,12,106,142,20,BS_TOP|BS_MULTILINE - PUSHBUTTON "&",IDC_FILTER_BOUNCE_BUTTON, 159, 88, 75, 14,WS_GROUP - PUSHBUTTON "&",IDC_FILTER_REPEAT_BUTTON, 159, 106, 75, 14,WS_GROUP - LTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(14)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Параметры фильтрации",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(8)+5 + AUTORADIOBUTTON "Игнорировать &повторные нажатия",IDC_FILTER_BOUNCE_RADIO,12,90,141,11,WS_GROUP|WS_TABSTOP + AUTORADIOBUTTON "Игнорировать &краткие нажатия; замедлить повтор",IDC_FILTER_REPEAT_RADIO,12,106,142,20,BS_TOP|BS_MULTILINE + PUSHBUTTON "&Настройка",IDC_FILTER_BOUNCE_BUTTON, 159, 88, 75, 14,WS_GROUP + PUSHBUTTON "Н&астройка",IDC_FILTER_REPEAT_BUTTON, 159, 106, 75, 14,WS_GROUP + LTEXT "&Область проверки параметров фильтрации:",-1,PROPSHEETPADDING(2),LABELLINE(14)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) EDITTEXT IDC_FILTER_TEST_EDIT,PROPSHEETPADDING(2),LABELLINE(15)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),14,WS_GROUP|ES_AUTOHSCROLL - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(17)+6,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+3 - AUTOCHECKBOX "& ",IDC_FILTER_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(19),PROPSHEETWIDTH-PROPSHEETPADDING(4),10 - AUTOCHECKBOX " &",IDC_FILTER_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(4),10 + GROUPBOX "Уведомление",-1,PROPSHEETPADDING(1),LABELLINE(17)+6,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+3 + AUTOCHECKBOX "&Звуковой сигнал при нажатии клавиш и приеме ввода",IDC_FILTER_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(19),PROPSHEETWIDTH-PROPSHEETPADDING(4),10 + AUTOCHECKBOX "Отображать состояние режима фильтрации на &экране",IDC_FILTER_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(4),10 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_TOGGLEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка режима озвучивания" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " : \n 5 .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_TOGGLE_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Включение режима",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Включение режима озвучивания: \nудерживание клавиши в течение 5 секунд.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Использовать такой способ включения",IDC_TOGGLE_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_CONTRASTOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка режима высокой контрастности" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " : \n+ +.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_CONTRAST_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Включение режима",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Включение режима высокой контрастности: \n+ +.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Использовать такой способ включения",IDC_CONTRAST_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - LTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Контрастная схема оформления",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) + LTEXT "&Текущая контрастная схема оформления:",-1,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_CONTRAST_COMBO, PROPSHEETPADDING(2), LABELLINE(11)+2, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_MOUSEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка управления указателем с клавиатуры" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " : \n++",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_MOUSEKEYS_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Включение режима",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Включение управления указателем с клавиатуры: \n++",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Использовать такой способ включения",IDC_MOUSEKEYS_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(9) + GROUPBOX "Скорость перемещения указателя",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(9) - LTEXT "&:",-1,PROPSHEETPADDING(2),LABELLINE(10)+4,PROPSHEETPADDING(8)+2,LABELLINE(1) - LTEXT "",-1,PROPSHEETPADDING(11),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "&Максимальная:",-1,PROPSHEETPADDING(2),LABELLINE(10)+4,PROPSHEETPADDING(8)+2,LABELLINE(1) + LTEXT "ниже",-1,PROPSHEETPADDING(11),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) CONTROL "",IDC_MOUSEKEYS_SPEED_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(15),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(22),LABELLINE(2) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "выше",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) - LTEXT "&:",-1,PROPSHEETPADDING(2),LABELLINE(13)+4,PROPSHEETPADDING(8),LABELLINE(1) - LTEXT "",-1,PROPSHEETPADDING(11),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "У&скорение:",-1,PROPSHEETPADDING(2),LABELLINE(13)+4,PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "ниже",-1,PROPSHEETPADDING(11),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) CONTROL "",IDC_MOUSEKEYS_ACCEL_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(15),LABELLINE(13)+2,PROPSHEETWIDTH-PROPSHEETPADDING(22),LABELLINE(2) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "выше",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) - AUTOCHECKBOX " - &, - ",IDC_MOUSEKEYS_SPEED_CHECK,PROPSHEETPADDING(2),LABELLINE(16),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX " - ус&корение, - замедление движения",IDC_MOUSEKEYS_SPEED_CHECK,PROPSHEETPADDING(2),LABELLINE(16),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - LTEXT " , :",-1, 6, 171, 118, 19 - AUTORADIOBUTTON "&",IDC_MOUSEKEYS_ON_RADIO, 129, 174, 49, 11 - AUTORADIOBUTTON "&",IDC_MOUSEKEYS_OFF_RADIO, 182, 174, 52, 11 + LTEXT "Использовать управление с клавиатуры, если :",-1, 6, 171, 118, 19 + AUTORADIOBUTTON "&включен",IDC_MOUSEKEYS_ON_RADIO, 129, 174, 49, 11 + AUTORADIOBUTTON "о&тключен",IDC_MOUSEKEYS_OFF_RADIO, 182, 174, 52, 11 - AUTOCHECKBOX "& ",IDC_MOUSEKEYS_STATUS_CHECK, 6, 190, 220, 14 + AUTOCHECKBOX "&Отображать состояние режима управления на экране",IDC_MOUSEKEYS_STATUS_CHECK, 6, 190, 220, 14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_BOUNCEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Дополнительные параметры режима фильтрации" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - LTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(2)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + GROUPBOX "Параметры",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + LTEXT "&Игнорировать нажатия с интервалом повтора менее:",-1,PROPSHEETPADDING(2),LABELLINE(2)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_BOUNCE_TIME_COMBO, PROPSHEETPADDING(2), LABELLINE(3)+5, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "&:",-1,PROPSHEETPADDING(1),LABELLINE(7)+3,PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "&Проверка:",-1,PROPSHEETPADDING(1),LABELLINE(7)+3,PROPSHEETPADDING(8),LABELLINE(1) EDITTEXT IDC_BOUNCE_TEST_EDIT,PROPSHEETPADDING(10),LABELLINE(7),PROPSHEETWIDTH-PROPSHEETPADDING(11),14,ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_REPEATKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Дополнительные параметры режима фильтрации" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(12) - LTEXT " :",-1, 12, 20, 190, 11 + GROUPBOX "Повтор символов",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(12) + LTEXT "Изменение параметров работы с клавиатурой:",-1, 12, 20, 190, 11 - AUTORADIOBUTTON "& ",IDC_REPEAT_NOREPEAT_RADIO,12, 32, 160, 11,WS_GROUP - AUTORADIOBUTTON "& ",IDC_REPEAT_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(4)+7,131,LABELLINE(1) + AUTORADIOBUTTON "&нет повторов при удерживании клавиш",IDC_REPEAT_NOREPEAT_RADIO,12, 32, 160, 11,WS_GROUP + AUTORADIOBUTTON "за&медление повторов",IDC_REPEAT_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(4)+7,131,LABELLINE(1) - LTEXT "& :",-1, 24, 60, 167, 11 + LTEXT "&Задержка перед началом повтора символа:",-1, 24, 60, 167, 11 COMBOBOX IDC_REPEAT_DELAY_COMBO, PROPSHEETPADDING(4), LABELLINE(7)+6, PROPSHEETWIDTH-PROPSHEETPADDING(6), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "& :",-1, 24, 89, 89, 11 + LTEXT "С&корость повтора:",-1, 24, 89, 89, 11 COMBOBOX IDC_REPEAT_REPEAT_COMBO, PROPSHEETPADDING(4), LABELLINE(10)+8, PROPSHEETWIDTH-PROPSHEETPADDING(6), LABELLINE(7), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+4 - LTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Медленное нажатие клавиш",-1,PROPSHEETPADDING(1),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+4 + LTEXT "&Удерживание нажатой клавиши:",-1,PROPSHEETPADDING(2),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_REPEAT_WAIT_COMBO, PROPSHEETPADDING(2), LABELLINE(16)+4, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(8), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "&:",-1,PROPSHEETPADDING(1),LABELLINE(20),PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "&Проверка:",-1,PROPSHEETPADDING(1),LABELLINE(20),PROPSHEETPADDING(8),LABELLINE(1) EDITTEXT IDC_REPEAT_TEST_EDIT,PROPSHEETPADDING(10),LABELLINE(19)+7,PROPSHEETWIDTH-PROPSHEETPADDING(11),14,ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_SERIALKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка альтернативного устройства ввода" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "",-1, 6, 6, 234, 92 - LTEXT " , .",-1, 12, 16, 222, 20 + GROUPBOX "Параметры",-1, 6, 6, 234, 92 + LTEXT "Укажите порт, к которому присоединено альтернативное устройство ввода.",-1, 12, 16, 222, 20 - LTEXT "& :",-1, 12, 34, 222, 10 + LTEXT "&Последовательный порт:",-1, 12, 34, 222, 10 COMBOBOX IDC_SERIAL_PORT_COMBO, PROPSHEETPADDING(2), LABELLINE(4)+7, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "& (/):",-1, 12, 65, 222, 10 + LTEXT "&Скорость (бит/с):",-1, 12, 65, 222, 10 COMBOBOX IDC_SERIAL_BAUD_COMBO, PROPSHEETPADDING(2), LABELLINE(8)+2, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(8), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " ." + IDS_CPLSYSTEMNAME "Специальные возможности" + IDS_CPLSYSTEMDESCRIPTION "Настройка специальных возможностей вашего компьютера." - IDS_SENTRY_NONE "[]" - IDS_SENTRY_TITLE " " - IDS_SENTRY_WINDOW " " - IDS_SENTRY_DISPLAY " " + IDS_SENTRY_NONE "[нет]" + IDS_SENTRY_TITLE "Подсвечивать заголовок" + IDS_SENTRY_WINDOW "Подсвечивать активное окно" + IDS_SENTRY_DISPLAY "Подсвечивать рабочий стол" - IDS_SECONDS "." - IDS_MINUTES "." + IDS_SECONDS "сек." + IDS_MINUTES "мин." END diff --git a/dll/cpl/access/lang/uk-UA.rc b/dll/cpl/access/lang/uk-UA.rc index eefa7ca81fd..09c2a6c0bf1 100644 --- a/dll/cpl/access/lang/uk-UA.rc +++ b/dll/cpl/access/lang/uk-UA.rc @@ -11,64 +11,64 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGEKEYBOARD DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Клавіатура" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " Shift, Ctrl Alt, .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_STICKY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_STICKY_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(5)+6,PROPSHEETPADDING(15)-5,14 + GROUPBOX "Залипання клавіш",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Введення комбінацій з клавішами Shift, Ctrl чи Alt, натискаючи клавіші послідовно.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Залипання клавіш",IDC_STICKY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "&Налаштування",IDC_STICKY_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(5)+6,PROPSHEETPADDING(15)-5,14 - GROUPBOX "Գ ",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX " & ",IDC_FILTER_BOX,PROPSHEETPADDING(2),LABELLINE(13)+6,PROPSHEETWIDTH-PROPSHEETPADDING(16),14 - PUSHBUTTON "&",IDC_FILTER_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(13)+6,PROPSHEETPADDING(15)-5,14 + GROUPBOX "Фільтрація вводу",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 + LTEXT "Ігнорування випадкових короткочасних або повторюваних затискань клавіш.",-1,PROPSHEETPADDING(2),LABELLINE(10)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Використовувати &фільтрацію вводу",IDC_FILTER_BOX,PROPSHEETPADDING(2),LABELLINE(13)+6,PROPSHEETWIDTH-PROPSHEETPADDING(16),14 + PUSHBUTTON "Н&алаштування",IDC_FILTER_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(13)+6,PROPSHEETPADDING(15)-5,14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " Caps Lock, Num Lock Scroll Lock .",-1,PROPSHEETPADDING(2),LABELLINE(18)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - AUTOCHECKBOX "&",IDC_TOGGLE_BOX,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_TOGGLE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(20)+6,PROPSHEETPADDING(15)-5,14 + GROUPBOX "Озвучування переключення режимів",-1,PROPSHEETPADDING(1),LABELLINE(16)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "При зміні стану клавіш Caps Lock, Num Lock і Scroll Lock звучить сигнал.",-1,PROPSHEETPADDING(2),LABELLINE(18)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + AUTOCHECKBOX "&Озвучування",IDC_TOGGLE_BOX,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "На&лаштування",IDC_TOGGLE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17)+5,LABELLINE(20)+6,PROPSHEETPADDING(15)-5,14 - AUTOCHECKBOX "& ",IDC_KEYBOARD_EXTRA,PROPSHEETPADDING(1),LABELLINE(23)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),14 + AUTOCHECKBOX "&Додаткові відомості про роботу із клавіатурою в програмах",IDC_KEYBOARD_EXTRA,PROPSHEETPADDING(1),LABELLINE(23)+3,PROPSHEETWIDTH-PROPSHEETPADDING(2),14 END IDD_PROPPAGESOUND DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Звук" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "³ ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10)+PROPSHEETPADDING(1) - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "³& ",IDC_SENTRY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETPADDING(15)+2,14 - LTEXT " :", IDC_SENTRY_TEXT, PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Візуальне сповіщення",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10)+PROPSHEETPADDING(1) + LTEXT "Звукові сигнали системи супроводжуються візуальною інформацією.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Віз&уальне сповіщення",IDC_SENTRY_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETPADDING(15)+2,14 + LTEXT "Інформувати користувача:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_SENTRY_COMBO, PROPSHEETPADDING(2), LABELLINE(9), PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(14)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "&",IDC_SSHOW_BOX,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Субтитри",-1,PROPSHEETPADDING(1),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(7)+2 + LTEXT "Супровід звуку і мови в програмах субтитрами.",-1,PROPSHEETPADDING(2),LABELLINE(14)-3,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "С&убтитри",IDC_SSHOW_BOX,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 END IDD_PROPPAGEDISPLAY DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Екран" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " , .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_CONTRAST_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_CONTRAST_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 + GROUPBOX "Висока контрастність",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Використання системи кольорів і шрифтів, які полекшують зорове сприйняття тексту.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Висока контрастність",IDC_CONTRAST_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "Н&алаштування",IDC_CONTRAST_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(13) - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(9)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - CTEXT " :",-1,PROPSHEETPADDING(2),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) - LTEXT "³",-1,PROPSHEETPADDING(3),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) + GROUPBOX "Параметри курсору",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(13) + LTEXT "Налаштування частоти миготіння і товщини курсору.",-1,PROPSHEETPADDING(2),LABELLINE(9)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + CTEXT "Частота миготіння:",-1,PROPSHEETPADDING(2),LABELLINE(12)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "Відсутнє",-1,PROPSHEETPADDING(3),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) + LTEXT "Швидке",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(14)+2,PROPSHEETPADDING(6),LABELLINE(1) CONTROL "",IDC_CURSOR_BLINK_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(10),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(2) - CTEXT " :",-1,PROPSHEETPADDING(2),LABELLINE(17),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) - LTEXT "",-1,PROPSHEETPADDING(3),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) + CTEXT "Товщина курсору:",-1,PROPSHEETPADDING(2),LABELLINE(17),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "Вузький",-1,PROPSHEETPADDING(3),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) + LTEXT "Широкий",-1,PROPSHEETWIDTH-PROPSHEETPADDING(9),LABELLINE(18)+7,PROPSHEETPADDING(6),LABELLINE(1) CONTROL "",IDC_CURSOR_WIDTH_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(10),LABELLINE(18)+5,PROPSHEETWIDTH-PROPSHEETPADDING(20),LABELLINE(2) LTEXT "",IDC_CURSOR_WIDTH_TEXT,PROPSHEETPADDING(3),LABELLINE(16),PROPSHEETPADDING(4),LABELLINE(1)+5 END @@ -76,237 +76,237 @@ END IDD_PROPPAGEMOUSE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Миша" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_MOUSE_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_MOUSE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 + GROUPBOX "Керування вказівником миші з клавіатури",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Керування мишею із цифрової панелі клавіатури.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Керування з клавіатури",IDC_MOUSE_BOX,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "Н&алаштування",IDC_MOUSE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(5)+2,PROPSHEETPADDING(15),14 END IDD_PROPPAGEGENERAL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX "&³ :",IDC_RESET_BOX,PROPSHEETPADDING(2),LABELLINE(2)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Автоматичне скидання спеціальних можливостей",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + AUTOCHECKBOX "&Відключати спеціальні можливості в разі простою протягом:",IDC_RESET_BOX,PROPSHEETPADDING(2),LABELLINE(2)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 COMBOBOX IDC_RESET_COMBO, PROPSHEETPADDING(4), LABELLINE(4), PROPSHEETPADDING(10), LABELLINE(5), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(7)-2,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX "& ",IDC_NOTIFICATION_MESSAGE,PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "& ",IDC_NOTIFICATION_SOUND,PROPSHEETPADDING(2),LABELLINE(10)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Сповіщення",-1,PROPSHEETPADDING(1),LABELLINE(7)-2,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + AUTOCHECKBOX "&Показувати попередження при ввімкненні режиму",IDC_NOTIFICATION_MESSAGE,PROPSHEETPADDING(2),LABELLINE(8)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "П&одавати звуковий сигнал при зміні режиму",IDC_NOTIFICATION_SOUND,PROPSHEETPADDING(2),LABELLINE(10)-2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(13)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - LTEXT " , .",-1,PROPSHEETPADDING(2),LABELLINE(14)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - AUTOCHECKBOX "& ",IDC_SERIAL_BOX,PROPSHEETPADDING(2),LABELLINE(16)-4,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - PUSHBUTTON "&",IDC_SERIAL_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(16)-4,PROPSHEETPADDING(15),14 + GROUPBOX "Альтрернативні пристрої вводу",-1,PROPSHEETPADDING(1),LABELLINE(13)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + LTEXT "Використання альтернативних пристроїв вводу, які заміняють мишу і клавіатуру.",-1,PROPSHEETPADDING(2),LABELLINE(14)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + AUTOCHECKBOX "&Альтернативні пристрої вводу",IDC_SERIAL_BOX,PROPSHEETPADDING(2),LABELLINE(16)-4,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + PUSHBUTTON "&Налаштування",IDC_SERIAL_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(16)-4,PROPSHEETPADDING(15),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(19)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - AUTOCHECKBOX "& ",IDC_ADMIN_LOGON_BOX,PROPSHEETPADDING(2),LABELLINE(20)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "& ",IDC_ADMIN_USERS_BOX,PROPSHEETPADDING(2),LABELLINE(22)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Адміністративні параметри",-1,PROPSHEETPADDING(1),LABELLINE(19)-4,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + AUTOCHECKBOX "Зас&тосувати до робочого стола входу до системи",IDC_ADMIN_LOGON_BOX,PROPSHEETPADDING(2),LABELLINE(20)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Застосовувати для всіх нових користувачів",IDC_ADMIN_USERS_BOX,PROPSHEETPADDING(2),LABELLINE(22)-4,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 END IDD_STICKYKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Налаштування режиму залипання клавіш" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " SHIFT 5 .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_STICKY_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Увімкнення режиму",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Натискання клавіші SHIFT 5 разів активує режим залипання клавіш.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Використовувати такий спосіб увімкнення",IDC_STICKY_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - AUTOCHECKBOX "& , ",IDC_STICKY_LOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "& ",IDC_STICKY_UNLOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(12),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Параметри",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) + AUTOCHECKBOX "&Щоб заблокувати службову клавішу, натисніть її двічі",IDC_STICKY_LOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Вимикати залипання натисненням двох клавіш одночасно",IDC_STICKY_UNLOCK_CHECK,PROPSHEETPADDING(2),LABELLINE(12),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - AUTOCHECKBOX "& ",IDC_STICKY_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - AUTOCHECKBOX "& ",IDC_STICKY_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(18),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Інформування",-1,PROPSHEETPADDING(1),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) + AUTOCHECKBOX "&Звуковий сигнал при натискансненні службової клавіші",IDC_STICKY_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(16)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "&Показувати стан Залипання клавіш на екрані",IDC_STICKY_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(18),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_FILTERKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Налаштування режиму фільтрації" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " \n 8 ",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_FILTER_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 + GROUPBOX "Увімкнення режиму",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Викликом з клавіатури є \nУтримування правої клавіші впродовж 8 секунд",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Використовувати швидкий виклик",IDC_FILTER_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(20),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(8)+5 - AUTORADIOBUTTON "& ",IDC_FILTER_BOUNCE_RADIO,PROPSHEETPADDING(2),LABELLINE(9)+7,PROPSHEETPADDING(21),LABELLINE(1),WS_GROUP|WS_TABSTOP - AUTORADIOBUTTON " & -\n ",IDC_FILTER_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(11)+5,PROPSHEETPADDING(20),LABELLINE(2),BS_TOP|BS_MULTILINE - PUSHBUTTON "&",IDC_FILTER_BOUNCE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(9)+5,PROPSHEETPADDING(15),14,WS_GROUP - PUSHBUTTON "&",IDC_FILTER_REPEAT_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(11)+5,PROPSHEETPADDING(15),14,WS_GROUP - LTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(14)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Налаштування фільтру",-1,PROPSHEETPADDING(1),LABELLINE(8)+5,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(8)+5 + AUTORADIOBUTTON "&Ігнорувати повторні натискання",IDC_FILTER_BOUNCE_RADIO,PROPSHEETPADDING(2),LABELLINE(9)+7,PROPSHEETPADDING(21),LABELLINE(1),WS_GROUP|WS_TABSTOP + AUTORADIOBUTTON "Ігнорувати &короткочасні натис-\nнення і зменшити їх частоту",IDC_FILTER_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(11)+5,PROPSHEETPADDING(20),LABELLINE(2),BS_TOP|BS_MULTILINE + PUSHBUTTON "&Налаштування",IDC_FILTER_BOUNCE_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(9)+5,PROPSHEETPADDING(15),14,WS_GROUP + PUSHBUTTON "На&лаштування",IDC_FILTER_REPEAT_BUTTON,PROPSHEETWIDTH-PROPSHEETPADDING(17),LABELLINE(11)+5,PROPSHEETPADDING(15),14,WS_GROUP + LTEXT "Н&атисніть тут щоб перевірити налаштування:",-1,PROPSHEETPADDING(2),LABELLINE(14)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) EDITTEXT IDC_FILTER_TEST_EDIT,PROPSHEETPADDING(2),LABELLINE(15)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),14,WS_GROUP|ES_AUTOHSCROLL - GROUPBOX "",-1,PROPSHEETPADDING(1),LABELLINE(17)+6,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+3 - AUTOCHECKBOX "& , ",IDC_FILTER_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(19),PROPSHEETWIDTH-PROPSHEETPADDING(4),10 - AUTOCHECKBOX "& 'Գ ' ",IDC_FILTER_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(4),10 + GROUPBOX "Інформування",-1,PROPSHEETPADDING(1),LABELLINE(17)+6,PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+3 + AUTOCHECKBOX "&Подавати тон, коли натискання клавіші прийнято",IDC_FILTER_SOUND_CHECK,PROPSHEETPADDING(2),LABELLINE(19),PROPSHEETWIDTH-PROPSHEETPADDING(4),10 + AUTOCHECKBOX "По&казувати стан 'Фільтрації вводу' на екрані",IDC_FILTER_STATUS_CHECK,PROPSHEETPADDING(2),LABELLINE(20)+6,PROPSHEETWIDTH-PROPSHEETPADDING(4),10 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_TOGGLEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Озвучування перемикання режимів" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " \n ' .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_TOGGLE_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Увімкнення режиму",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Для швикої активації\nУтримуйте клавішу впродовж п'яти секунд.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "Вико&ристовувати такий швикдий виклик",IDC_TOGGLE_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_CONTRASTOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Налаштування високої контрастності" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " \n .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_CONTRAST_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Увімкнення режиму",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Для активації \nнатисніть .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Використовувати такий спосіб увімкнення",IDC_CONTRAST_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) - LTEXT " :",-1,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Контрастна схема оформлення",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+PROPSHEETPADDING(1) + LTEXT "Поточна контрастна схема оформлення:",-1,PROPSHEETPADDING(2),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_CONTRAST_COMBO, PROPSHEETPADDING(2), LABELLINE(11)+2, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_MOUSEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Налаштування керування вказівником із клавіатури" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) - LTEXT " : \n .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) - AUTOCHECKBOX "& ",IDC_MOUSEKEYS_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + GROUPBOX "Увімкнення режиму",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(6)+PROPSHEETPADDING(1) + LTEXT "Щоб увімкнути режим керування вказівником із клавіатури: \nНатисніть клавіші .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(3) + AUTOCHECKBOX "&Використовувати такий спосіб увімкнення",IDC_MOUSEKEYS_ACTIVATE_CHECK,PROPSHEETPADDING(2),LABELLINE(5)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(9) + GROUPBOX "Швидкість руху вказівника",-1,PROPSHEETPADDING(1),LABELLINE(9),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(9) - LTEXT "&:",-1,PROPSHEETPADDING(2),LABELLINE(10)+4,PROPSHEETPADDING(8),LABELLINE(1) - LTEXT "",-1,PROPSHEETPADDING(11),LABELLINE(10)+4,PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "&Найбільша:",-1,PROPSHEETPADDING(2),LABELLINE(10)+4,PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "нижче",-1,PROPSHEETPADDING(11),LABELLINE(10)+4,PROPSHEETPADDING(4),LABELLINE(1) CONTROL "",IDC_MOUSEKEYS_SPEED_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(15),LABELLINE(10)+2,PROPSHEETWIDTH-PROPSHEETPADDING(22),LABELLINE(2) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "вище",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(10)+4,PROPSHEETPADDING(3),LABELLINE(1) - LTEXT "&:",-1,PROPSHEETPADDING(2),LABELLINE(13)+4,PROPSHEETPADDING(8),LABELLINE(1) - LTEXT "",-1,PROPSHEETPADDING(11),LABELLINE(13)+4,PROPSHEETPADDING(4),LABELLINE(1) + LTEXT "&Прискорення:",-1,PROPSHEETPADDING(2),LABELLINE(13)+4,PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "нижче",-1,PROPSHEETPADDING(11),LABELLINE(13)+4,PROPSHEETPADDING(4),LABELLINE(1) CONTROL "",IDC_MOUSEKEYS_ACCEL_TRACK,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,PROPSHEETPADDING(15),LABELLINE(13)+2,PROPSHEETWIDTH-PROPSHEETPADDING(22),LABELLINE(2) - LTEXT "",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) + LTEXT "вище",-1,PROPSHEETWIDTH-PROPSHEETPADDING(7),LABELLINE(13)+4,PROPSHEETPADDING(3),LABELLINE(1) - AUTOCHECKBOX "CTRL - &, SHIFT - ",IDC_MOUSEKEYS_SPEED_CHECK,PROPSHEETPADDING(2),LABELLINE(16),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "CTRL - прис&корення, SHIFT - уповільення",IDC_MOUSEKEYS_SPEED_CHECK,PROPSHEETPADDING(2),LABELLINE(16),PROPSHEETWIDTH-PROPSHEETPADDING(4),14 - LTEXT ", NumLock:",-1,PROPSHEETPADDING(1),LABELLINE(18)+7,PROPSHEETPADDING(20),LABELLINE(1) - AUTORADIOBUTTON "&",IDC_MOUSEKEYS_ON_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(14),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) - AUTORADIOBUTTON "&",IDC_MOUSEKEYS_OFF_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(8),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) + LTEXT "Використовувати, якщо NumLock:",-1,PROPSHEETPADDING(1),LABELLINE(18)+7,PROPSHEETPADDING(20),LABELLINE(1) + AUTORADIOBUTTON "Уві&мк",IDC_MOUSEKEYS_ON_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(14),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) + AUTORADIOBUTTON "В&имк",IDC_MOUSEKEYS_OFF_RADIO,PROPSHEETWIDTH-PROPSHEETPADDING(8),LABELLINE(18)+7,PROPSHEETPADDING(5),LABELLINE(1) - AUTOCHECKBOX "& ",IDC_MOUSEKEYS_STATUS_CHECK,PROPSHEETPADDING(1),LABELLINE(20)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 + AUTOCHECKBOX "П&оказувати стан керування вказівником на екрані",IDC_MOUSEKEYS_STATUS_CHECK,PROPSHEETPADDING(1),LABELLINE(20)+2,PROPSHEETWIDTH-PROPSHEETPADDING(4),14 DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_BOUNCEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Додаткові параметри режиму фільтрації" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) - LTEXT "& , :",-1,PROPSHEETPADDING(2),LABELLINE(2)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + GROUPBOX "Повторення символів",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(5) + LTEXT "&Ігнорувати натискання клавіш, які повторюються частіше ніж:",-1,PROPSHEETPADDING(2),LABELLINE(2)+1,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_BOUNCE_TIME_COMBO, PROPSHEETPADDING(2), LABELLINE(3)+5, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "&:",-1,PROPSHEETPADDING(1),LABELLINE(7)+3,PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "&Перевірка:",-1,PROPSHEETPADDING(1),LABELLINE(7)+3,PROPSHEETPADDING(8),LABELLINE(1) EDITTEXT IDC_BOUNCE_TEST_EDIT,PROPSHEETPADDING(10),LABELLINE(7),PROPSHEETWIDTH-PROPSHEETPADDING(11),14,ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_REPEATKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Додаткові параметри режиму фільтрації" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(12) - LTEXT " :",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + GROUPBOX "Повторення символів",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(12) + LTEXT "Зміна параметрів клавіатури на панелі керування:",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - AUTORADIOBUTTON "& ",IDC_REPEAT_NOREPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(3)+3,78,LABELLINE(1),WS_GROUP - AUTORADIOBUTTON "& ",IDC_REPEAT_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(4)+7,131,LABELLINE(1) + AUTORADIOBUTTON "&не повторювати",IDC_REPEAT_NOREPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(3)+3,78,LABELLINE(1),WS_GROUP + AUTORADIOBUTTON "&уповільнення повторів",IDC_REPEAT_REPEAT_RADIO,PROPSHEETPADDING(2),LABELLINE(4)+7,131,LABELLINE(1) - LTEXT "& :",-1,PROPSHEETPADDING(4),LABELLINE(6)+4,PROPSHEETPADDING(10),LABELLINE(1) + LTEXT "&Затримка перед повторенням:",-1,PROPSHEETPADDING(4),LABELLINE(6)+4,PROPSHEETPADDING(10),LABELLINE(1) COMBOBOX IDC_REPEAT_DELAY_COMBO, PROPSHEETPADDING(4), LABELLINE(7)+6, PROPSHEETWIDTH-PROPSHEETPADDING(6), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "& :",-1,PROPSHEETPADDING(4),LABELLINE(9)+6,PROPSHEETPADDING(10),LABELLINE(1) + LTEXT "&Швидкість повторення:",-1,PROPSHEETPADDING(4),LABELLINE(9)+6,PROPSHEETPADDING(10),LABELLINE(1) COMBOBOX IDC_REPEAT_REPEAT_COMBO, PROPSHEETPADDING(4), LABELLINE(10)+8, PROPSHEETWIDTH-PROPSHEETPADDING(6), LABELLINE(7), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+4 - LTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) + GROUPBOX "Повільне натискання клавіш",-1,PROPSHEETPADDING(1),LABELLINE(14),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(4)+4 + LTEXT "&Утримування натиснутої клавіші:",-1,PROPSHEETPADDING(2),LABELLINE(15),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(1) COMBOBOX IDC_REPEAT_WAIT_COMBO, PROPSHEETPADDING(2), LABELLINE(16)+4, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(8), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "&:",-1,PROPSHEETPADDING(1),LABELLINE(20),PROPSHEETPADDING(8),LABELLINE(1) + LTEXT "&Перевірка:",-1,PROPSHEETPADDING(1),LABELLINE(20),PROPSHEETPADDING(8),LABELLINE(1) EDITTEXT IDC_REPEAT_TEST_EDIT,PROPSHEETPADDING(10),LABELLINE(19)+7,PROPSHEETWIDTH-PROPSHEETPADDING(11),14,ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END IDD_SERIALKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка альтернативного пристрою вводу" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10) - LTEXT " , .",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + GROUPBOX "послідовний пристрій вводу",-1,PROPSHEETPADDING(1),LABELLINE(1),PROPSHEETWIDTH-PROPSHEETPADDING(2),LABELLINE(10) + LTEXT "Укажіть порт, до якого підключено альтернативний пристрій вводу.",-1,PROPSHEETPADDING(2),LABELLINE(2),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) - LTEXT "& :",-1,PROPSHEETPADDING(2),LABELLINE(3)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + LTEXT "&Послідовний порт:",-1,PROPSHEETPADDING(2),LABELLINE(3)+5,PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_SERIAL_PORT_COMBO, PROPSHEETPADDING(2), LABELLINE(4)+7, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(6), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP - LTEXT "&:",-1,PROPSHEETPADDING(2),LABELLINE(7),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) + LTEXT "&Швидкість:",-1,PROPSHEETPADDING(2),LABELLINE(7),PROPSHEETWIDTH-PROPSHEETPADDING(4),LABELLINE(2) COMBOBOX IDC_SERIAL_BAUD_COMBO, PROPSHEETPADDING(2), LABELLINE(8)+2, PROPSHEETWIDTH-PROPSHEETPADDING(4), LABELLINE(8), CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH-111, PROPSHEETHEIGHT-21, 50, 14 - PUSHBUTTON "", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, PROPSHEETWIDTH-57, PROPSHEETHEIGHT-21, 50, 14 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " '." + IDS_CPLSYSTEMNAME "Спеціальні можливості" + IDS_CPLSYSTEMDESCRIPTION "Налаштування спеціальних можливостей Вашого комп'ютера." - IDS_SENTRY_NONE "[]" - IDS_SENTRY_TITLE "ϳ " - IDS_SENTRY_WINDOW "ϳ " - IDS_SENTRY_DISPLAY "ϳ " + IDS_SENTRY_NONE "[немає]" + IDS_SENTRY_TITLE "Підсвічувати загловок" + IDS_SENTRY_WINDOW "Підсвічувати активне вікно" + IDS_SENTRY_DISPLAY "Підсвічувати робочий стіл" - IDS_SECONDS "" - IDS_MINUTES "" + IDS_SECONDS "секунд" + IDS_MINUTES "хвилин" END diff --git a/dll/cpl/access/rsrc.rc b/dll/cpl/access/rsrc.rc index 9284a15bcb1..fe768729384 100644 --- a/dll/cpl/access/rsrc.rc +++ b/dll/cpl/access/rsrc.rc @@ -14,9 +14,12 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c index 609eb2342d1..44b09afec67 100644 --- a/dll/cpl/appwiz/createlink.c +++ b/dll/cpl/appwiz/createlink.c @@ -340,7 +340,7 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath) } attrs = GetFileAttributesW(szPath); - if (attrs == INVALID_FILE_ATTRIBUTES || (attrs & FILE_ATTRIBUTE_DIRECTORY)) + if (attrs == INVALID_FILE_ATTRIBUTES) { /* invalid path */ return FALSE; diff --git a/dll/cpl/appwiz/lang/pl-PL.rc b/dll/cpl/appwiz/lang/pl-PL.rc index eada53d8597..a836bfcc5cc 100644 --- a/dll/cpl/appwiz/lang/pl-PL.rc +++ b/dll/cpl/appwiz/lang/pl-PL.rc @@ -1,15 +1,16 @@ /* - * translated by Caemyr - Olaf Siejka (Jan, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_FIRSTPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Utwrz cze" +CAPTION "Utwórz łącze" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Text1", -1, 115, 15, 160, 24 @@ -18,7 +19,7 @@ END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Utwrz cze" +CAPTION "Utwórz łącze" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Text1",-1,10,0,225,40 @@ -28,30 +29,30 @@ END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Utwrz skrt" +CAPTION "Utwórz skrót" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Ten program konfiguracyjny pomoe ci stworzy skrty do lokalnych lub\nsieciowych programw, plikw, katalogw, komputerw, bd addresw\nInternetowych.", -1, 120, 15, 200, 30 - LTEXT "Wpisz ciek dostpu do obiektu:", -1, 120, 50, 120, 10 + LTEXT "Ten program konfiguracyjny pomoże ci stworzyć skróty do lokalnych lub\nsieciowych programów, plików, katalogów, komputerów, bądź addresów\nInternetowych.", -1, 120, 15, 200, 30 + LTEXT "Wpisz ścieżkę dostępu do obiektu:", -1, 120, 50, 120, 10 EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Przegldaj...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Nacinij Dalej aby kontynuowa.", -1, 120, 97, 162, 10 + PUSHBUTTON "Przeglądaj...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Naciśnij Dalej aby kontynuować.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Wybierz nazw" +CAPTION "Wybierz nazwę" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Wpisz nazw dla tego skrtu:", -1, 120, 15, 150, 10 + LTEXT "&Wpisz nazwę dla tego skrótu:", -1, 120, 15, 150, 10 EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Nacinij Zakocz by utworzy skrt.", -1, 118, 97, 178, 17 + LTEXT "Naciśnij Zakończ by utworzyć skrót.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Dodaj/Usu Programy" - IDS_CPLSYSTEMDESCRIPTION "Instaluje bd usuwa programy oraz tworzy skrty." - IDS_CREATE_SHORTCUT "Utwrz skrt" - IDS_ERROR_NOT_FOUND "Plik %s nie zosta znaleziony." + IDS_CPLSYSTEMNAME "Dodaj/Usuń Programy" + IDS_CPLSYSTEMDESCRIPTION "Instaluje bądź usuwa programy oraz tworzy skróty." + IDS_CREATE_SHORTCUT "Utwórz skrót" + IDS_ERROR_NOT_FOUND "Plik %s nie został znaleziony." END diff --git a/dll/cpl/appwiz/lang/ru-RU.rc b/dll/cpl/appwiz/lang/ru-RU.rc index 253ed9a766e..d971d6c8164 100644 --- a/dll/cpl/appwiz/lang/ru-RU.rc +++ b/dll/cpl/appwiz/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_FIRSTPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Создания ярлыка" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Text1", -1, 115, 15, 160, 24 @@ -11,7 +11,7 @@ END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Создание ярлыка" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Text1",-1,10,0,225,40 @@ -21,30 +21,30 @@ END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Создание ярлыка" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " \n , , , \n-.", -1, 120, 15, 200, 30 - LTEXT " :", -1, 120, 50, 120, 10 + LTEXT "Этот мастер поможет создать ярлык для локальных или\nсетевых программ, файлов, папок, компьютеров или\nИнтернет-адресов.", -1, 120, 15, 200, 30 + LTEXT "Выберите местоположение элемента:", -1, 120, 50, 120, 10 EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT " """" .", -1, 120, 97, 162, 10 + PUSHBUTTON "Обзор...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Щелкните ""Далее"" для продолжения.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Выбор заголовка для программы" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "& :", -1, 120, 15, 150, 10 + LTEXT "&Введите заголовок ярлыка:", -1, 120, 15, 150, 10 EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT " """" .", -1, 118, 97, 178, 17 + LTEXT "Щелкните ""Завершить"" для создания ярлыка.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " , ." - IDS_CREATE_SHORTCUT " " - IDS_ERROR_NOT_FOUND " %s ." + IDS_CPLSYSTEMNAME "Установка и удаление программ" + IDS_CPLSYSTEMDESCRIPTION "Работа с программами, обновлениями и ярлыками." + IDS_CREATE_SHORTCUT "Создать ярлык" + IDS_ERROR_NOT_FOUND "Файл %s не найден." END diff --git a/dll/cpl/appwiz/lang/uk-UA.rc b/dll/cpl/appwiz/lang/uk-UA.rc index e9dd0bb6b68..a2d7202cb59 100644 --- a/dll/cpl/appwiz/lang/uk-UA.rc +++ b/dll/cpl/appwiz/lang/uk-UA.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_FIRSTPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Створення ярлика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Text1", -1, 115, 15, 160, 24 @@ -19,7 +19,7 @@ END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Створення ярлика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "Text1",-1,10,0,225,40 @@ -29,30 +29,30 @@ END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Створення ярлика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " , \n , , , '\n .", -1, 120, 15, 200, 30 - LTEXT " ':", -1, 120, 50, 120, 10 + LTEXT "Цей майстер допомагає створити ярлик, який указує на\nлокальні або мережні програми, файли, папки, комп'ютери\nабо адреси в Інтернеті.", -1, 120, 15, 200, 30 + LTEXT "Укажіть розташування об'єкта:", -1, 120, 50, 120, 10 EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT " , """".", -1, 120, 97, 162, 10 + PUSHBUTTON "Огляд...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Щоб продовжити установку, натисніть кнопку ""Далі"".", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Вибір назви програми" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "& ' :", -1, 120, 15, 150, 10 + LTEXT "&Введіть ім'я ярлика:", -1, 120, 15, 150, 10 EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT " , """".", -1, 118, 97, 178, 17 + LTEXT "Щоб створити ярлик, натисніть кнопку ""Готово"".", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " ." - IDS_CREATE_SHORTCUT " " - IDS_ERROR_NOT_FOUND " %s ." + IDS_CPLSYSTEMNAME "Установка й видалення програм" + IDS_CPLSYSTEMDESCRIPTION "Встановлення програм і створення ярликів." + IDS_CREATE_SHORTCUT "Створити ярлик" + IDS_ERROR_NOT_FOUND "Файл %s не знайдений." END diff --git a/dll/cpl/appwiz/rsrc.rc b/dll/cpl/appwiz/rsrc.rc index 5440928c43e..237d6c6106d 100644 --- a/dll/cpl/appwiz/rsrc.rc +++ b/dll/cpl/appwiz/rsrc.rc @@ -10,8 +10,11 @@ #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/console/CMakeLists.txt b/dll/cpl/console/CMakeLists.txt index a16f09aedb4..56a66ca628a 100644 --- a/dll/cpl/console/CMakeLists.txt +++ b/dll/cpl/console/CMakeLists.txt @@ -12,7 +12,7 @@ list(APPEND SOURCE console.rc ${CMAKE_CURRENT_BINARY_DIR}/console.def) -add_library(console SHARED ${CMAKE_CURRENT_BINARY_DIR}/console_console.h.gch ${SOURCE}) +add_library(console SHARED ${SOURCE}) set_module_type(console win32dll) @@ -23,5 +23,5 @@ add_importlibs(console comctl32 kernel32) -add_pch(console ${CMAKE_CURRENT_SOURCE_DIR}/console.h ${SOURCE}) +add_pch(console console.h) add_cd_file(TARGET console DESTINATION reactos/system32 FOR all) diff --git a/dll/cpl/console/lang/pl-PL.rc b/dll/cpl/console/lang/pl-PL.rc index 31b785ed860..ceceeda21c3 100644 --- a/dll/cpl/console/lang/pl-PL.rc +++ b/dll/cpl/console/lang/pl-PL.rc @@ -1,10 +1,9 @@ /* * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) */ - #include LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -15,20 +14,20 @@ CAPTION "Opcje" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Rozmiar kursora", -1, 15, 15, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP -CONTROL "&May", IDC_RADIO_SMALL_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 25, 90, 10 -CONTROL "&redni", IDC_RADIO_MEDIUM_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 40, 90, 10 -CONTROL "&Duy", IDC_RADIO_LARGE_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 55, 90, 10 -GROUPBOX "Poka opcje", -1, 140, 15, 100, 70, WS_CHILD | WS_VISIBLE | WS_GROUP +CONTROL "&Mały", IDC_RADIO_SMALL_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 25, 90, 10 +CONTROL "&Średni", IDC_RADIO_MEDIUM_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 40, 90, 10 +CONTROL "&Duży", IDC_RADIO_LARGE_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 55, 90, 10 +GROUPBOX "Pokaż opcje", -1, 140, 15, 100, 70, WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "&Okno", IDC_RADIO_DISPLAY_WINDOW, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 150, 35, 70, 10 -CONTROL "&Peny ekran", IDC_RADIO_DISPLAY_FULL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 150, 50, 70, 10 -GROUPBOX "Historia polece:", -1, 15, 90, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP +CONTROL "&Pełny ekran", IDC_RADIO_DISPLAY_FULL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 150, 50, 70, 10 +GROUPBOX "Historia poleceń:", -1, 15, 90, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP LTEXT "&Rozmiar bufora", -1, 25, 100, 60, 15 EDITTEXT IDC_EDIT_BUFFER_SIZE, 90, 100, 30, 15, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_BUFFER_SIZE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 115, 100, 12, 12 -LTEXT "&Numery buforw:", -1, 25, 120, 80, 15 +LTEXT "&Numery buforów:", -1, 25, 120, 80, 15 EDITTEXT IDC_EDIT_NUM_BUFFER, 90, 120, 30, 15, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_NUM_BUFFER, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 115, 120, 12, 12 -CHECKBOX "O&drzu stare duplikaty", IDC_CHECK_DISCARD_DUPLICATES, 25, 140, 100, 15 +CHECKBOX "O&drzuć stare duplikaty", IDC_CHECK_DISCARD_DUPLICATES, 25, 140, 100, 15 GROUPBOX "Edytuj opcje", -1, 140, 90, 100, 70, BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP @@ -41,7 +40,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "Czcionka" FONT 8, "MS Shell Dlg" BEGIN -LTEXT "Okno podgldu", -1, 10, 7, 65, 10 +LTEXT "Okno podglądu", -1, 10, 7, 65, 10 LTEXT "Rozmiar", -1, 130, 10, 30, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 115, 70 LISTBOX IDC_LBOX_FONTS, 130, 20, 55, 80, LBS_DISABLENOSCROLL | WS_VSCROLL @@ -51,40 +50,40 @@ LISTBOX IDC_LBOX_TYPE, 10, 120, 110, 50, LBS_DISABLENOSCROLL | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 10, 155, 200, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 165, 95, 35 LTEXT "Pogrubiona czcionka:", -1, 130, 165, 75, 10 -LTEXT "szeroko ekranu w pikselach/nwysoko ekranu w pikselach", -1, 140, 180, 65, 20 +LTEXT "szerokość ekranu w pikselach/nwysokość ekranu w pikselach", -1, 140, 180, 65, 20 LTEXT "", IDC_FONT_SIZE_X, 125, 180, 10, 10 LTEXT "", IDC_FONT_SIZE_Y, 125, 188, 10, 10 END IDD_PROPPAGELAYOUT DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Ukad" +CAPTION "Układ" FONT 8, "MS Shell Dlg" BEGIN -LTEXT "Okno podgldu", -1, 10, 7, 65, 10 +LTEXT "Okno podglądu", -1, 10, 7, 65, 10 CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static", SS_SUNKEN | SS_OWNERDRAW, 10, 20, 115, 70 GROUPBOX "Rozmiar bufora ekranu", -1, 130, 15, 115, 40 -LTEXT "&Szeroko:", -1, 135, 30, 25, 10 -LTEXT "&Wysoko:", -1, 135, 40, 25, 10 +LTEXT "&Szerokość:", -1, 135, 30, 25, 10 +LTEXT "&Wysokość:", -1, 135, 40, 25, 10 EDITTEXT IDC_EDIT_SCREEN_BUFFER_WIDTH, 165, 30, 35, 10, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 185, 30, 30, 10 EDITTEXT IDC_EDIT_SCREEN_BUFFER_HEIGHT, 165, 40, 35, 10, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 185, 30, 30, 10 GROUPBOX "Rozmiar okna", -1, 130, 60, 115, 40 -LTEXT "&Szeroko:", -1, 135, 70, 25, 10 -LTEXT "&Wysoko:", -1, 135, 80, 25, 10 +LTEXT "&Szerokość:", -1, 135, 70, 25, 10 +LTEXT "&Wysokość:", -1, 135, 80, 25, 10 EDITTEXT IDC_EDIT_WINDOW_SIZE_WIDTH, 165, 70, 35, 10, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_SIZE_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 185, 30, 30, 10 EDITTEXT IDC_EDIT_WINDOW_SIZE_HEIGHT, 165, 80, 35, 10, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_SIZE_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 185, 30, 30, 10 GROUPBOX "Pozycja okna", -1, 130, 105, 115, 55 LTEXT "&Lewo:", -1, 135, 120, 25, 10 -LTEXT "&Gra:", -1, 135, 130, 25, 10 +LTEXT "&Góra:", -1, 135, 130, 25, 10 EDITTEXT IDC_EDIT_WINDOW_POS_LEFT, 165, 120, 35, 10, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_POS_LEFT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 185, 30, 30, 10 EDITTEXT IDC_EDIT_WINDOW_POS_TOP, 165, 130, 35, 10, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_POS_TOP, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 185, 30, 30, 10 -CHECKBOX "Wybr pozycji okna przez system", IDC_CHECK_SYSTEM_POS_WINDOW, 135, 145, 100, 10 +CHECKBOX "Wybór pozycji okna przez system", IDC_CHECK_SYSTEM_POS_WINDOW, 135, 145, 100, 10 END IDD_PROPPAGECOLORS DIALOGEX 0, 0, 250, 220 @@ -93,10 +92,10 @@ CAPTION "Kolory" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Ekran &tekst", IDC_RADIO_SCREEN_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 15, 90, 10 -CONTROL "Ekran &to", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 25, 90, 10 +CONTROL "Ekran &tło", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 25, 90, 10 CONTROL "&Popup tekst", IDC_RADIO_POPUP_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 35, 90, 10 -CONTROL "Pop&up to", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 45, 90, 10 -GROUPBOX "Wybrane wartoci koloru", -1, 120, 15, 90, 45 +CONTROL "Pop&up tło", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 45, 90, 10 +GROUPBOX "Wybrane wartości koloru", -1, 120, 15, 90, 45 LTEXT "&Czerowny:", -1, 125, 25, 30, 10 EDITTEXT IDC_EDIT_COLOR_RED, 150, 25, 30, 10, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_COLOR_RED, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 165, 25, 30, 10 @@ -130,11 +129,11 @@ END IDD_APPLYOPTIONS DIALOGEX 0, 0, 220, 100 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "Zastosuj waciwoci" +CAPTION "Zastosuj właściwości" FONT 8, "MS Shell Dlg" BEGIN -CONTROL "&Zastosuj waciwoci tylko do aktualnego okna", IDC_RADIO_APPLY_CURRENT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 25, 150, 10 -CONTROL "Z&apisz waciwoci na przysze okna z tym sam tytuem", IDC_RADIO_APPLY_ALL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 40, 185, 10 +CONTROL "&Zastosuj właściwości tylko do aktualnego okna", IDC_RADIO_APPLY_CURRENT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 25, 150, 10 +CONTROL "Z&apisz właściwości na przyszłe okna z tym sam tytułem", IDC_RADIO_APPLY_ALL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 25, 40, 185, 10 PUSHBUTTON "OK", IDOK, 25, 80, 40, 15, WS_VISIBLE PUSHBUTTON "Anuluj", IDCANCEL, 120, 80, 50, 15, WS_VISIBLE END @@ -142,8 +141,8 @@ END STRINGTABLE BEGIN IDS_CPLNAME "Konsola" - IDS_CPLDESCRIPTION "Konfiguruje waciwoci konsoli." - IDS_APPLY_SHORTCUT_ALL "Zmodyfikuj skrt, ktry wywoa to okno" + IDS_CPLDESCRIPTION "Konfiguruje właściwości konsoli." + IDS_APPLY_SHORTCUT_ALL "Zmodyfikuj skrót, który wywołał to okno" IDS_SCREEN_TEXT "C:\\ReactOS> dir\nSYSTEM 10-01-99 5:00\nSYSTEM32 10-01-99 5:00" - IDS_RASTERFONTS "Raster czcionki" + IDS_RASTERFONTS "Czcionki rastrowe" END diff --git a/dll/cpl/console/lang/ro-RO.rc b/dll/cpl/console/lang/ro-RO.rc index f363838f15d..4e0cd903494 100644 --- a/dll/cpl/console/lang/ro-RO.rc +++ b/dll/cpl/console/lang/ro-RO.rc @@ -10,8 +10,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_PROPPAGEOPTIONS DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "Opțiuni" @@ -148,5 +146,3 @@ BEGIN IDS_SCREEN_TEXT "C:\\ReactOS> dir\nSYSTEM 10-01-99 5:00\nSYSTEM32 10-01-99 5:00" IDS_RASTERFONTS "Fonturi raster" END - -#pragma code_page(default) diff --git a/dll/cpl/console/lang/ru-RU.rc b/dll/cpl/console/lang/ru-RU.rc index dfe73e72ec4..8ee4b565b96 100644 --- a/dll/cpl/console/lang/ru-RU.rc +++ b/dll/cpl/console/lang/ru-RU.rc @@ -7,97 +7,97 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGEOPTIONS DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 7, 7, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP - CONTROL "&", IDC_RADIO_SMALL_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 20, 90, 10 - CONTROL "&", IDC_RADIO_MEDIUM_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 40, 90, 10 - CONTROL "&", IDC_RADIO_LARGE_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 60, 90, 10 - GROUPBOX "", -1, 133, 7, 112, 70, WS_CHILD | WS_VISIBLE | WS_GROUP - CONTROL "&", IDC_RADIO_DISPLAY_WINDOW, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 20, 70, 10 - CONTROL "& ", IDC_RADIO_DISPLAY_FULL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 40, 70, 10 - GROUPBOX " ", -1, 7, 84, 120, 77, WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "& :", -1, 14, 101, 60, 12 + GROUPBOX "Размер курсора", -1, 7, 7, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "&Большой", IDC_RADIO_SMALL_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 20, 90, 10 + CONTROL "&Средний", IDC_RADIO_MEDIUM_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 40, 90, 10 + CONTROL "&Маленький", IDC_RADIO_LARGE_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 60, 90, 10 + GROUPBOX "Экран", -1, 133, 7, 112, 70, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "&Окно", IDC_RADIO_DISPLAY_WINDOW, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 20, 70, 10 + CONTROL "&Полный экран", IDC_RADIO_DISPLAY_FULL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 40, 70, 10 + GROUPBOX "История команд", -1, 7, 84, 120, 77, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "&Размер буфера:", -1, 14, 101, 60, 12 EDITTEXT IDC_EDIT_BUFFER_SIZE, 90, 97, 30, 15, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_BUFFER_SIZE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 119, 97, 12, 15 - LTEXT "& :", -1, 14, 124, 60, 12 + LTEXT "&Число буферов:", -1, 14, 124, 60, 12 EDITTEXT IDC_EDIT_NUM_BUFFER, 90, 120, 30, 15, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_NUM_BUFFER, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 119, 120, 12, 15 - CHECKBOX "& ", IDC_CHECK_DISCARD_DUPLICATES, 12, 140, 110, 15 - GROUPBOX "", -1, 133, 85, 112, 77, BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP - CHECKBOX "& ", IDC_CHECK_QUICK_EDIT, 140, 97, 102, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP - CHECKBOX "& ", IDC_CHECK_INSERT_MODE, 140, 113, 76, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "&Убирать старые экземляры", IDC_CHECK_DISCARD_DUPLICATES, 12, 140, 110, 15 + GROUPBOX "Редактирование", -1, 133, 85, 112, 77, BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP + CHECKBOX "&Быстрое редактирование", IDC_CHECK_QUICK_EDIT, 140, 97, 102, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "&Режим вставки", IDC_CHECK_INSERT_MODE, 140, 113, 76, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_PROPPAGEFONT DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Шрифт" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 10, 10, 94, 10 - LTEXT ":", -1, 180, 10, 36, 10 + LTEXT "Окно предпросмотра:", -1, 10, 10, 94, 10 + LTEXT "Размер:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 LISTBOX IDC_LBOX_FONTS, 181, 20, 55, 80, LBS_DISABLENOSCROLL | WS_VSCROLL - LTEXT "&:", -1, 10, 105, 33, 10 - CHECKBOX "&", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 + LTEXT "&Шрифт:", -1, 10, 105, 33, 10 + CHECKBOX "&Жирный", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 LISTBOX IDC_LBOX_TYPE, 10, 120, 110, 40, LBS_DISABLENOSCROLL | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 - LTEXT " :", -1, 124, 166, 75, 10 - LTEXT " \n ", -1, 136, 180, 101, 20 + LTEXT "Каждый символ:", -1, 124, 166, 75, 10 + LTEXT "широкие пикселы на экране\nвысокие пикселы на экране", -1, 136, 180, 101, 20 LTEXT "", IDC_FONT_SIZE_X, 120, 180, 10, 10 LTEXT "", IDC_FONT_SIZE_Y, 120, 188, 10, 10 END IDD_PROPPAGELAYOUT DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Раскладка" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 8, 6, 95, 10 + LTEXT "Окно предпросмотра:", -1, 8, 6, 95, 10 CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static", SS_SUNKEN | SS_OWNERDRAW, 8, 16, 115, 70 - GROUPBOX " ", -1, 130, 12, 115, 50 - LTEXT "&:", -1, 140, 28, 40, 10 - LTEXT "&:", -1, 140, 46, 39, 10 + GROUPBOX "Размер буфера экрана", -1, 130, 12, 115, 50 + LTEXT "&Ширина:", -1, 140, 28, 40, 10 + LTEXT "&Высота:", -1, 140, 46, 39, 10 EDITTEXT IDC_EDIT_SCREEN_BUFFER_WIDTH, 203, 25, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 25, 13, 14 EDITTEXT IDC_EDIT_SCREEN_BUFFER_HEIGHT, 203, 42, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 42, 13, 14 - GROUPBOX " ", -1, 130, 65, 115, 47 - LTEXT "&:", -1, 140, 78, 39, 10 - LTEXT "&:", -1, 140, 95, 37, 10 + GROUPBOX "Размер окна", -1, 130, 65, 115, 47 + LTEXT "Ш&ирина:", -1, 140, 78, 39, 10 + LTEXT "В&ысота:", -1, 140, 95, 37, 10 EDITTEXT IDC_EDIT_WINDOW_SIZE_WIDTH, 203, 75, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_SIZE_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 75, 13, 14 EDITTEXT IDC_EDIT_WINDOW_SIZE_HEIGHT, 203, 92, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_SIZE_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 92, 13, 14 - GROUPBOX " ", -1, 130, 116, 115, 64 - LTEXT "&:", -1, 140, 132, 38, 10 - LTEXT "&:", -1, 140, 149, 40, 10 + GROUPBOX "Положение окна", -1, 130, 116, 115, 64 + LTEXT "&Отступ:", -1, 140, 132, 38, 10 + LTEXT "&Высота:", -1, 140, 149, 40, 10 EDITTEXT IDC_EDIT_WINDOW_POS_LEFT, 203, 128, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_POS_LEFT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 128, 13, 14 EDITTEXT IDC_EDIT_WINDOW_POS_TOP, 203, 146, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_POS_TOP, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 146, 13, 14 - CHECKBOX "& ", IDC_CHECK_SYSTEM_POS_WINDOW, 140, 165, 100, 10 + CHECKBOX "&Системная позиция окна", IDC_CHECK_SYSTEM_POS_WINDOW, 140, 165, 100, 10 END IDD_PROPPAGECOLORS DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Цвета" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "& ", IDC_RADIO_SCREEN_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 12, 112, 10 - CONTROL "& ", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 30, 112, 10 - CONTROL "& ", IDC_RADIO_POPUP_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 48, 112, 10 - CONTROL "& ", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 67, 112, 10 - GROUPBOX " ", -1, 129, 7, 118, 73 - LTEXT "&:", -1, 140, 25, 48, 10 + CONTROL "&Текст на экране", IDC_RADIO_SCREEN_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 12, 112, 10 + CONTROL "&Фон экрана", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 30, 112, 10 + CONTROL "&Всплывающий текст", IDC_RADIO_POPUP_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 48, 112, 10 + CONTROL "В&сплывающий фон", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 67, 112, 10 + GROUPBOX "Выбор значений цветов", -1, 129, 7, 118, 73 + LTEXT "&Красный:", -1, 140, 25, 48, 10 EDITTEXT IDC_EDIT_COLOR_RED, 210, 22, 30, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_COLOR_RED, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 240, 22, 12, 14 - LTEXT "&:", -1, 140, 42, 48, 10 + LTEXT "&Зеленый:", -1, 140, 42, 48, 10 EDITTEXT IDC_EDIT_COLOR_GREEN, 210, 39, 30, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_COLOR_GREEN, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 240, 39, 12, 14 - LTEXT "&:", -1, 140, 60, 48, 10 + LTEXT "&Голубой:", -1, 140, 60, 48, 10 EDITTEXT IDC_EDIT_COLOR_BLUE, 210, 56, 30, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_COLOR_BLUE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 240, 56, 12, 14 CONTROL "", IDC_STATIC_COLOR1, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 17, 90, 12, 12 @@ -116,28 +116,28 @@ BEGIN CONTROL "", IDC_STATIC_COLOR14, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 199, 90, 12, 12 CONTROL "", IDC_STATIC_COLOR15, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 213, 90, 12, 12 CONTROL "", IDC_STATIC_COLOR16, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 227, 90, 12, 12 - GROUPBOX " ", -1, 7, 111, 240, 40 + GROUPBOX "Выбранный цвет экрана", -1, 7, 111, 240, 40 CONTROL "", IDC_STATIC_SCREEN_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 124, 224, 20 - GROUPBOX " ", -1, 7, 162, 240, 40 + GROUPBOX "Выбранные всплывающие цвета", -1, 7, 162, 240, 40 CONTROL "", IDC_STATIC_POPUP_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 176, 224, 20 END IDD_APPLYOPTIONS DIALOGEX 0, 0, 220, 79 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Применить свойства" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "& ", IDC_RADIO_APPLY_CURRENT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 12, 207, 10 - CONTROL "& ", IDC_RADIO_APPLY_ALL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 31, 207, 10 + CONTROL "&Применить свойства только для этого окна", IDC_RADIO_APPLY_CURRENT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 12, 207, 10 + CONTROL "&Сохранить свойства для всех окон с таким заголовком", IDC_RADIO_APPLY_ALL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 31, 207, 10 PUSHBUTTON "OK", IDOK, 58, 58, 50, 14, WS_VISIBLE - PUSHBUTTON "", IDCANCEL, 114, 58, 50, 14, WS_VISIBLE + PUSHBUTTON "Отмена", IDCANCEL, 114, 58, 50, 14, WS_VISIBLE END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " ." - IDS_APPLY_SHORTCUT_ALL "& , " + IDS_CPLNAME "Командная строка" + IDS_CPLDESCRIPTION "Настройка командной строки." + IDS_APPLY_SHORTCUT_ALL "&Изменить ярлык, которым было запущено это окно" IDS_SCREEN_TEXT "C:\\ReactOS> dir\nSYSTEM 10-01-07 5:00\nSYSTEM32 10-01-07 5:00" - IDS_RASTERFONTS " " + IDS_RASTERFONTS "Растровые шрифты" END diff --git a/dll/cpl/console/lang/uk-UA.rc b/dll/cpl/console/lang/uk-UA.rc index d65ddec2965..09e6d85f62d 100644 --- a/dll/cpl/console/lang/uk-UA.rc +++ b/dll/cpl/console/lang/uk-UA.rc @@ -13,97 +13,97 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGEOPTIONS DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 7, 7, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP - CONTROL "&", IDC_RADIO_SMALL_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 20, 90, 10 - CONTROL "&", IDC_RADIO_MEDIUM_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 40, 90, 10 - CONTROL "&", IDC_RADIO_LARGE_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 60, 90, 10 - GROUPBOX " ", -1, 133, 7, 112, 70, WS_CHILD | WS_VISIBLE | WS_GROUP - CONTROL "&", IDC_RADIO_DISPLAY_WINDOW, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 20, 70, 10 - CONTROL "& ", IDC_RADIO_DISPLAY_FULL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 40, 70, 10 - GROUPBOX " ", -1, 7, 84, 120, 77, WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT "& :", -1, 14, 101, 70, 12 + GROUPBOX "Розмір курсору", -1, 7, 7, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "&дрібний", IDC_RADIO_SMALL_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 20, 90, 10 + CONTROL "&середній", IDC_RADIO_MEDIUM_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 40, 90, 10 + CONTROL "&великий", IDC_RADIO_LARGE_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 60, 90, 10 + GROUPBOX "Параметри відображення", -1, 133, 7, 112, 70, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "В&ікно", IDC_RADIO_DISPLAY_WINDOW, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 20, 70, 10 + CONTROL "&На весь екран", IDC_RADIO_DISPLAY_FULL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 40, 70, 10 + GROUPBOX "Журнал команд", -1, 7, 84, 120, 77, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "&Розмір буфера:", -1, 14, 101, 70, 12 EDITTEXT IDC_EDIT_BUFFER_SIZE, 90, 97, 30, 15, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_BUFFER_SIZE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 119, 97, 12, 15 - LTEXT "&ʳ :", -1, 14, 124, 70, 12 + LTEXT "&Кількість буферів:", -1, 14, 124, 70, 12 EDITTEXT IDC_EDIT_NUM_BUFFER, 90, 120, 30, 15, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_NUM_BUFFER, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 119, 120, 12, 15 - CHECKBOX "& ", IDC_CHECK_DISCARD_DUPLICATES, 12, 140, 110, 15 - GROUPBOX " ", -1, 133, 85, 112, 77, BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP - CHECKBOX "& ", IDC_CHECK_QUICK_EDIT, 140, 97, 102, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP - CHECKBOX "& ", IDC_CHECK_INSERT_MODE, 140, 113, 76, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "В&ідкидати повторення", IDC_CHECK_DISCARD_DUPLICATES, 12, 140, 110, 15 + GROUPBOX "Параметри редагування", -1, 133, 85, 112, 77, BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP + CHECKBOX "&Швидке редагування", IDC_CHECK_QUICK_EDIT, 140, 97, 102, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "&Режим вставлення", IDC_CHECK_INSERT_MODE, 140, 113, 76, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_PROPPAGEFONT DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Шрифт" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", -1, 10, 10, 94, 10 + LTEXT "Зразок вікна", -1, 10, 10, 94, 10 LTEXT "Size:", -1, 180, 10, 36, 10 CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 LISTBOX IDC_LBOX_FONTS, 181, 20, 55, 80, LBS_DISABLENOSCROLL | WS_VSCROLL - LTEXT "&:", -1, 10, 105, 33, 10 - CHECKBOX "&", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 + LTEXT "&Шрифт:", -1, 10, 105, 33, 10 + CHECKBOX "&Жирні", IDC_CHECK_BOLD_FONTS, 56, 105, 60, 10 LISTBOX IDC_LBOX_TYPE, 10, 120, 110, 40, LBS_DISABLENOSCROLL | WS_VSCROLL GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 - LTEXT " :", -1, 124, 166, 75, 10 - LTEXT " \n ", -1, 136, 180, 101, 20 + LTEXT "Кожен символ:", -1, 124, 166, 75, 10 + LTEXT "пікселів завширшки\nпікселів заввишки", -1, 136, 180, 101, 20 LTEXT "", IDC_FONT_SIZE_X, 120, 180, 10, 10 LTEXT "", IDC_FONT_SIZE_Y, 120, 188, 10, 10 END IDD_PROPPAGELAYOUT DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Розкладка" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", -1, 8, 6, 95, 10 + LTEXT "Зразок вікна", -1, 8, 6, 95, 10 CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static", SS_SUNKEN | SS_OWNERDRAW, 8, 16, 115, 70 - GROUPBOX " ", -1, 130, 12, 115, 50 - LTEXT "&:", -1, 140, 28, 40, 10 - LTEXT "&:", -1, 140, 46, 39, 10 + GROUPBOX "Розмір буфера екрана", -1, 130, 12, 115, 50 + LTEXT "&Ширина:", -1, 140, 28, 40, 10 + LTEXT "&Висота:", -1, 140, 46, 39, 10 EDITTEXT IDC_EDIT_SCREEN_BUFFER_WIDTH, 203, 25, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 25, 13, 14 EDITTEXT IDC_EDIT_SCREEN_BUFFER_HEIGHT, 203, 42, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 42, 13, 14 - GROUPBOX " ", -1, 130, 65, 115, 47 - LTEXT "&:", -1, 140, 78, 39, 10 - LTEXT "&:", -1, 140, 95, 37, 10 + GROUPBOX "Розмір вікна", -1, 130, 65, 115, 47 + LTEXT "Ши&рина:", -1, 140, 78, 39, 10 + LTEXT "В&исота:", -1, 140, 95, 37, 10 EDITTEXT IDC_EDIT_WINDOW_SIZE_WIDTH, 203, 75, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_SIZE_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 75, 13, 14 EDITTEXT IDC_EDIT_WINDOW_SIZE_HEIGHT, 203, 92, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_SIZE_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 92, 13, 14 - GROUPBOX " ", -1, 130, 116, 115, 64 - LTEXT "&:", -1, 140, 132, 38, 10 - LTEXT "&:", -1, 140, 149, 40, 10 + GROUPBOX "Позиція вікна", -1, 130, 116, 115, 64 + LTEXT "&Зліва:", -1, 140, 132, 38, 10 + LTEXT "З&гори:", -1, 140, 149, 40, 10 EDITTEXT IDC_EDIT_WINDOW_POS_LEFT, 203, 128, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_POS_LEFT, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 128, 13, 14 EDITTEXT IDC_EDIT_WINDOW_POS_TOP, 203, 146, 35, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_WINDOW_POS_TOP, UPDOWN_CLASS, UDS_NOTHOUSANDS | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 238, 146, 13, 14 - CHECKBOX "& ", IDC_CHECK_SYSTEM_POS_WINDOW, 137, 165, 104, 10 + CHECKBOX "&Автоматичний вибір", IDC_CHECK_SYSTEM_POS_WINDOW, 137, 165, 104, 10 END IDD_PROPPAGECOLORS DIALOGEX 0, 0, 253, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Кольори" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "& ", IDC_RADIO_SCREEN_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 12, 112, 10 - CONTROL "& ", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 30, 112, 10 - CONTROL "& ", IDC_RADIO_POPUP_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 48, 112, 10 - CONTROL "& ", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 67, 112, 10 - GROUPBOX " ", -1, 129, 7, 118, 73 - LTEXT "&:", -1, 140, 25, 48, 10 + CONTROL "Т&екст на екрані", IDC_RADIO_SCREEN_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 12, 112, 10 + CONTROL "&Тло екрана", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 30, 112, 10 + CONTROL "Те&кст спливного вікна", IDC_RADIO_POPUP_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 48, 112, 10 + CONTROL "Т&ло спливного вікна", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 67, 112, 10 + GROUPBOX "Значення вибраних кольорів", -1, 129, 7, 118, 73 + LTEXT "&Червоний:", -1, 140, 25, 48, 10 EDITTEXT IDC_EDIT_COLOR_RED, 210, 22, 30, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_COLOR_RED, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 240, 22, 12, 14 - LTEXT "&:", -1, 140, 42, 48, 10 + LTEXT "&Зелений:", -1, 140, 42, 48, 10 EDITTEXT IDC_EDIT_COLOR_GREEN, 210, 39, 30, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_COLOR_GREEN, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 240, 39, 12, 14 - LTEXT "&:", -1, 140, 60, 48, 10 + LTEXT "&Синій:", -1, 140, 60, 48, 10 EDITTEXT IDC_EDIT_COLOR_BLUE, 210, 56, 30, 14, ES_RIGHT | WS_GROUP CONTROL "", IDC_UPDOWN_COLOR_BLUE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 240, 56, 12, 14 CONTROL "", IDC_STATIC_COLOR1, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 17, 90, 12, 12 @@ -122,28 +122,28 @@ BEGIN CONTROL "", IDC_STATIC_COLOR14, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 199, 90, 12, 12 CONTROL "", IDC_STATIC_COLOR15, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 213, 90, 12, 12 CONTROL "", IDC_STATIC_COLOR16, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 227, 90, 12, 12 - GROUPBOX " ", -1, 7, 111, 240, 40 + GROUPBOX "Вибрані кольори екрана", -1, 7, 111, 240, 40 CONTROL "", IDC_STATIC_SCREEN_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 124, 224, 20 - GROUPBOX " ", -1, 7, 162, 240, 40 + GROUPBOX "Вибрані спливні кольори", -1, 7, 162, 240, 40 CONTROL "", IDC_STATIC_POPUP_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 15, 176, 224, 20 END IDD_APPLYOPTIONS DIALOGEX 0, 0, 220, 79 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Зміна властивостей" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "& ", IDC_RADIO_APPLY_CURRENT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 12, 207, 10 - CONTROL "& ", IDC_RADIO_APPLY_ALL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 31, 207, 10 + CONTROL "&Змінити тільки для поточного вікна", IDC_RADIO_APPLY_CURRENT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 12, 207, 10 + CONTROL "&Зберігти для майбутніх вікон з таким самим заголовком", IDC_RADIO_APPLY_ALL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 31, 207, 10 PUSHBUTTON "OK", IDOK, 58, 58, 50, 14, WS_VISIBLE - PUSHBUTTON "", IDCANCEL, 114, 58, 50, 14, WS_VISIBLE + PUSHBUTTON "Скасувати", IDCANCEL, 114, 58, 50, 14, WS_VISIBLE END STRINGTABLE BEGIN - IDS_CPLNAME "" - IDS_CPLDESCRIPTION " ." - IDS_APPLY_SHORTCUT_ALL " &, " + IDS_CPLNAME "Консоль" + IDS_CPLDESCRIPTION "Настроювання властивостей консолі." + IDS_APPLY_SHORTCUT_ALL "Зміна &ярлика, який запустив це вікно" IDS_SCREEN_TEXT "C:\\ReactOS> dir\nSYSTEM 10-01-99 5:00\nSYSTEM32 10-01-99 5:00" - IDS_RASTERFONTS " " + IDS_RASTERFONTS "Растрові шрифти" END diff --git a/dll/cpl/console/rsrc.rc b/dll/cpl/console/rsrc.rc index facd97b3150..0d7e0407690 100644 --- a/dll/cpl/console/rsrc.rc +++ b/dll/cpl/console/rsrc.rc @@ -12,9 +12,12 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/desk/CMakeLists.txt b/dll/cpl/desk/CMakeLists.txt index 51909fc6525..d7d8d8214a7 100644 --- a/dll/cpl/desk/CMakeLists.txt +++ b/dll/cpl/desk/CMakeLists.txt @@ -1,11 +1,9 @@ +add_definitions(-D_WIN32) + set_unicode() - -add_definitions( - -D_WIN32 - -D_DLL -D__USE_CRTIMP) - set_rc_compiler() + spec2def(desk.cpl desk.spec) add_library(desk SHARED diff --git a/dll/cpl/desk/advappdlg.c b/dll/cpl/desk/advappdlg.c index 725fe82e584..837adcf2d73 100644 --- a/dll/cpl/desk/advappdlg.c +++ b/dll/cpl/desk/advappdlg.c @@ -276,8 +276,8 @@ SaveCurrentValues(HWND hwndDlg, GLOBALS *g) if (g_Assignment[g->CurrentElement].Font != -1) { g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfHeight = -MulDiv(GetDlgItemInt(hwndDlg, IDC_ADVAPPEARANCE_FONTSIZE_E, &bTranslated, FALSE), GetDeviceCaps(hdcDlg, LOGPIXELSY), 72); - g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfWeight = (SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTBOLD, BM_GETCHECK, 0, 0) == 1)?FW_BOLD:FW_NORMAL; - g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfItalic = SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTITALIC, BM_GETCHECK, 0, 0); + g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfWeight = (SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTBOLD, BM_GETCHECK, 0, 0) == 1) ? FW_BOLD : FW_NORMAL; + g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfItalic = (BYTE)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTITALIC, BM_GETCHECK, 0, 0); GetDlgItemText(hwndDlg, IDC_ADVAPPEARANCE_FONT_C, g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfFaceName, LF_FACESIZE * sizeof(TCHAR)); } diff --git a/dll/cpl/desk/lang/cs-CZ.rc b/dll/cpl/desk/lang/cs-CZ.rc index 727eb9dcac8..bdc74c6baa9 100644 --- a/dll/cpl/desk/lang/cs-CZ.rc +++ b/dll/cpl/desk/lang/cs-CZ.rc @@ -59,7 +59,7 @@ BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 LTEXT "Poloka:", IDC_STATIC, 7, 159, 26, 9 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Effects...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON "Upesnit", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END diff --git a/dll/cpl/desk/lang/el-GR.rc b/dll/cpl/desk/lang/el-GR.rc index 9c832b0846b..4ce871c079c 100644 --- a/dll/cpl/desk/lang/el-GR.rc +++ b/dll/cpl/desk/lang/el-GR.rc @@ -52,7 +52,7 @@ BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 LTEXT " ", IDC_STATIC, 7, 140, 64, 7 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Effects...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON " ", IDC_APPEARANCE_ADVANCED, 178, 170, 68, 15 END diff --git a/dll/cpl/desk/lang/fr-FR.rc b/dll/cpl/desk/lang/fr-FR.rc index d95e8b42f87..7db68b3b66d 100644 --- a/dll/cpl/desk/lang/fr-FR.rc +++ b/dll/cpl/desk/lang/fr-FR.rc @@ -55,7 +55,7 @@ BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 LTEXT "Modle de couleurs", IDC_STATIC, 7, 140, 64, 7 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Effects...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON "Avanc", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END diff --git a/dll/cpl/desk/lang/hu-HU.rc b/dll/cpl/desk/lang/hu-HU.rc index 202fe1559fd..544d7f0ca36 100644 --- a/dll/cpl/desk/lang/hu-HU.rc +++ b/dll/cpl/desk/lang/hu-HU.rc @@ -53,7 +53,7 @@ BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 LTEXT "Colorscheme", IDC_STATIC, 7, 140, 64, 7 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Effects...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON "Advanced", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END diff --git a/dll/cpl/desk/lang/it-IT.rc b/dll/cpl/desk/lang/it-IT.rc index 30af0cd3ded..3c80466aaaf 100644 --- a/dll/cpl/desk/lang/it-IT.rc +++ b/dll/cpl/desk/lang/it-IT.rc @@ -52,7 +52,7 @@ BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 LTEXT "Schema dei colori", IDC_STATIC, 7, 140, 64, 7 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Effetti...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON "A&vanzato...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END diff --git a/dll/cpl/desk/lang/nl-NL.rc b/dll/cpl/desk/lang/nl-NL.rc index 9165bcecee1..1b49da6be45 100644 --- a/dll/cpl/desk/lang/nl-NL.rc +++ b/dll/cpl/desk/lang/nl-NL.rc @@ -54,7 +54,7 @@ BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 LTEXT "Kleurenschema:", IDC_STATIC, 7, 140, 64, 7 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Effecten...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON "Geavan&ceerd...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END diff --git a/dll/cpl/desk/lang/pl-PL.rc b/dll/cpl/desk/lang/pl-PL.rc index 418502be1df..0629ed38bb5 100644 --- a/dll/cpl/desk/lang/pl-PL.rc +++ b/dll/cpl/desk/lang/pl-PL.rc @@ -1,14 +1,12 @@ /* -* Polish language resource file (Sebastian Gasiorek, 2005-07-07) -* update by xrogers (13.04.2007) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -* update by Caemyr - Olaf Siejka (Jan-Feb, 2008) -* Use ReactOS forum PM or IRC to contact me -* http://www.reactos.org -* IRC: irc.freenode.net #reactos-pl; -* update by Saibamen saibamenppl@gmail.com (29.03.2011) -*/ + * translated by Sebastian Gasiorek, (2005-07-07) + * updated by xrogers (13.04.2007) + * https://sourceforge.net/projects/reactospl + * updated by Caemyr - Olaf Siejka (Jan-Feb, 2008) + * updated by Saibamen saibamenppl@gmail.com (29.03.2011) + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 188 @@ -21,11 +19,11 @@ BEGIN CONTROL "", IDC_BACKGROUND_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 7, 99, 173, 71 - LTEXT "Wybierz obraz do uycia jako tapeta pulpitu:", + LTEXT "Wybierz obraz do użycia jako tapeta pulpitu:", IDC_STATIC, 8, 87, 180, 8 - PUSHBUTTON "&Przegldaj...", IDC_BROWSE_BUTTON, 187, 135, 50, 14 + PUSHBUTTON "&Przeglądaj...", IDC_BROWSE_BUTTON, 187, 135, 50, 14 PUSHBUTTON "&Kolor...", IDC_COLOR_BUTTON, 187, 155, 50, 14 - LTEXT "Pooenie:", IDC_STATIC, 187, 98, 36, 8 + LTEXT "Położenie:", IDC_STATIC, 187, 98, 36, 8 COMBOBOX IDC_PLACEMENT_COMBO, 187, 108, 50, 90, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END @@ -40,30 +38,30 @@ BEGIN GROUPBOX "&Wygaszacz ekranu",IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Ustawienia",IDC_SCREENS_SETTINGS, 120, 103, 50, 13, WS_GROUP - PUSHBUTTON "&Podgld",IDC_SCREENS_TESTSC, 175, 103, 50, 13 + PUSHBUTTON "&Podgląd",IDC_SCREENS_TESTSC, 175, 103, 50, 13 LTEXT "&Czekaj",IDC_WAITTEXT, 14, 125, 16, 9 EDITTEXT IDC_SCREENS_TIMEDELAY, 34, 123, 32, 13, ES_RIGHT | WS_GROUP CONTROL "",IDC_SCREENS_TIME ,UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 54, 123, 12, 13 LTEXT "minut", IDC_MINTEXT, 70, 125, 26, 9 - CONTROL "Ochrona &hasem.",IDC_SCREENS_USEPASSCHK,"button", + CONTROL "Ochrona &hasłem.",IDC_SCREENS_USEPASSCHK,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 108, 120, 104, 19 GROUPBOX "&Zasilanie monitora", IDC_SCREENS_DUMMY2, 6, 155, 232, 41 - LTEXT "Kliknij przycisk Zasilanie, aby dopasowa ustawienia zasilania dla monitora i oszczdzanie energii.", + LTEXT "Kliknij przycisk Zasilanie, aby dopasować ustawienia zasilania dla monitora i oszczędzanie energii.", IDC_STATIC, 14, 166, 146 ,20 PUSHBUTTON "Z&asilanie...", IDC_SCREENS_POWER_BUTTON, 176, 171, 50, 13 END IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Wygld" +CAPTION "Wygląd" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT "Schemat kolorw", IDC_STATIC, 7, 140, 64, 7 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Schemat kolorów", IDC_STATIC, 7, 140, 64, 7 + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Efekty...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON "Zaawansowane", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END @@ -71,7 +69,7 @@ END IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE -CAPTION "Zaawnsowany wygld" +CAPTION "Ustawienia zaawnsowane" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", @@ -112,19 +110,19 @@ EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Efekty" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "&Uyj nastpujcego efektu przejcia dla menu i etykiet narzdzi:",IDC_EFFAPPEARANCE_ANIMATION,"button", + CONTROL "&Użyj następującego efektu przejścia dla menu i etykiet narzędzi:",IDC_EFFAPPEARANCE_ANIMATION,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 5, 285, 19 COMBOBOX IDC_EFFAPPEARANCE_ANIMATIONTYPE, 20, 25, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_CHILD | WS_VSCROLL | WS_TABSTOP - CONTROL "U&yj nastpujcej metody wygadzania krawdzi czcionek ekranowych:",IDC_EFFAPPEARANCE_SMOOTHING,"button", + CONTROL "Uż&yj następującej metody wygładzania krawędzi czcionek ekranowych:",IDC_EFFAPPEARANCE_SMOOTHING,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 42, 285, 19 COMBOBOX IDC_EFFAPPEARANCE_SMOOTHINGTYPE, 20, 62, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - CONTROL "Uy&j duych ikon",IDC_EFFAPPEARANCE_LARGEICONS,"button", + CONTROL "Uży&j dużych ikon",IDC_EFFAPPEARANCE_LARGEICONS,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 80, 285, 19 - CONTROL "Pok&a cienie pod menu",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button", + CONTROL "Pok&aż cienie pod menu",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 95, 285, 19 - CONTROL "Poka za&warto okna podczas przecigania",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button", + CONTROL "Pokaż za&wartość okna podczas przeciągania",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 285, 19 - CONTROL "U&kryj podkrelenie liter do nawigacji klawiatur dopki nie nacisn klawisza Alt",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button", + CONTROL "U&kryj podkreślenie liter do nawigacji klawiaturą o ile klawisz Alt nie jest wciśnięty",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 285, 19 PUSHBUTTON "Anuluj", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 @@ -135,17 +133,17 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ustawienia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Przecignij ikony monitorw tak, by przedstawiay fizyczne rozmieszczenei twoich monitorw.",-1,3,3,240,10 + LTEXT "Przeciągnij ikony monitorów tak, by przedstawiały fizyczne rozmieszczenei twoich monitorów.",-1,3,3,240,10 CONTROL "",IDC_SETTINGS_MONSEL,"MONITORSELWNDCLASS",WS_CHILD|WS_VISIBLE|WS_TABSTOP,3,16,240,82,WS_EX_CLIENTEDGE LTEXT "&Ekran:",1820,3,100,30,8 LTEXT "",IDC_SETTINGS_DEVICE,9,109,224,8 - GROUPBOX "&Rozdzielczo ekranu",1818,3,120,115,43 + GROUPBOX "&Rozdzielczość ekranu",1818,3,120,115,43 CONTROL "",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 30, 130, 58, 17 LTEXT "Mniej",1815,9,130,15,8,NOT WS_GROUP - LTEXT "Wicej",1816,93,130,21,8,NOT WS_GROUP + LTEXT "Więcej",1816,93,130,21,8,NOT WS_GROUP LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,150,100,10,NOT WS_GROUP | SS_CENTER - GROUPBOX "&Jako kolorw",1817,125,120,115,43 + GROUPBOX "&Ilość kolorów",1817,125,120,115,43 COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW | SS_SUNKEN,131,148,103,9 @@ -154,15 +152,15 @@ END IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Ekran", -1, 7, 6, 237, 56, WS_GROUP LTEXT "Rozmiar czcionek:", -1, 14, 20, 222, 8 COMBOBOX IDC_FONTSIZE_COMBO, 14, 30, 223, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "", IDC_FONTSIZE_COSTOM, 14, 46, 223, 12 - GROUPBOX "Tryb zgodnoci", -1, 7, 67, 237, 97 - LTEXT "Niektre programy mog dziaa niepoprawnie, jeli po zmianie ustawie ekranu nie zrestartujesz systemu.\r\n\nPo zmianie ustawie ekranu:", -1, 12, 78, 228, 34 + GROUPBOX "Tryb zgodności", -1, 7, 67, 237, 97 + LTEXT "Niektóre programy mogą działać niepoprawnie, jeśli po zmianie ustawień ekranu nie zrestartujesz systemu.\r\n\nPo zmianie ustawień ekranu:", -1, 12, 78, 228, 34 AUTORADIOBUTTON "&Zrestartuj system przed wprowadzeniem zmian.", IDC_RESTART_RB, 14, 116, 224, 10 AUTORADIOBUTTON "Zastosuj nowe ustawienia ekranu bez restartu systemu.", IDC_WITHOUTREBOOT_RB, 14, 131, 224, 10 AUTORADIOBUTTON "Zapytaj mnie przed wprowadzeniem zmian w ustawieniach ekranu.", IDC_ASKME_RB, 14, 146, 224, 10 @@ -171,7 +169,7 @@ END IDR_PREVIEW_MENU MENU BEGIN MENUITEM "Normalny", ID_MENU_NORMAL - MENUITEM "Wyczony", ID_MENU_DISABLED + MENUITEM "Wyłączony", ID_MENU_DISABLED MENUITEM "Wybrany", ID_MENU_SELECTED END @@ -179,18 +177,18 @@ IDM_MONITOR_MENU MENU BEGIN POPUP "" BEGIN - MENUITEM "&Doczony", ID_MENU_ATTACHED - MENUITEM "&Gwny", ID_MENU_PRIMARY + MENUITEM "&Przyłączony", ID_MENU_ATTACHED + MENUITEM "&Główny", ID_MENU_PRIMARY MENUITEM SEPARATOR MENUITEM "&Identyfikuj", ID_MENU_IDENTIFY - MENUITEM "W&aciwoci", ID_MENU_PROPERTIES + MENUITEM "W&łaściwości", ID_MENU_PROPERTIES END END STRINGTABLE DISCARDABLE BEGIN IDS_SLIDEEFFECT "Efekt przewijania" - IDS_FADEEFFECT "Efekt przejcia" + IDS_FADEEFFECT "Efekt przejścia" END STRINGTABLE DISCARDABLE @@ -201,7 +199,7 @@ END STRINGTABLE BEGIN - IDS_MULTIPLEMONITORS "(Kilka Monitorw)" + IDS_MULTIPLEMONITORS "(Kilka Monitorów)" IDS_UNKNOWNMONITOR "(Monitor Nieznany)" IDS_ADVANCEDTITLEFMT "%s i %s" END @@ -209,18 +207,18 @@ END STRINGTABLE BEGIN IDS_CPLNAME "Ekran" - IDS_CPLDESCRIPTION "Dostosowuje wygld pulpitu oraz wygaszacze." + IDS_CPLDESCRIPTION "Dostosowuje wygląd pulpitu oraz wygaszacze." IDS_NONE "(brak)" - IDS_CENTER "Do rodka" - IDS_STRETCH "Rozcignicie" - IDS_TILE "Ssiadujco" + IDS_CENTER "Do środka" + IDS_STRETCH "Rozciągnięcie" + IDS_TILE "Sąsiadująco" END STRINGTABLE DISCARDABLE BEGIN - IDS_COLOR_4BIT "16 kolorw" - IDS_COLOR_8BIT "256 kolorw" - IDS_COLOR_16BIT "High Color (16 Bitw)" + IDS_COLOR_4BIT "16 kolorów" + IDS_COLOR_8BIT "256 kolorów" + IDS_COLOR_16BIT "High Color (16 Bitów)" IDS_COLOR_24BIT "True Color (24 Bity)" IDS_COLOR_32BIT "True Color (32 Bity)" IDS_PIXEL "%lux%lu pikseli" @@ -228,7 +226,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_BACKGROUND_COMDLG_FILTER "Pliki ta (*.bmp;*.dib)\0*.bmp;*.dib\0" + IDS_BACKGROUND_COMDLG_FILTER "Pliki tła (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END @@ -238,16 +236,16 @@ BEGIN IDS_ACTWIN "Aktywne okno" IDS_WINTEXT "Tekst okna" IDS_MESSBOX "Okno komunikatu" - IDS_MESSTEXT "Tre wiadomoci" + IDS_MESSTEXT "Treść wiadomości" IDS_BUTTEXT "OK" END STRINGTABLE DISCARDABLE BEGIN IDS_ELEMENT_1 "Pulpit" - IDS_ELEMENT_2 "Nieaktywny pasek tytuu" + IDS_ELEMENT_2 "Nieaktywny pasek tytułu" IDS_ELEMENT_3 "Obramowanie nieaktywnego okna" - IDS_ELEMENT_4 "Aktywny pasek tytuu" + IDS_ELEMENT_4 "Aktywny pasek tytułu" IDS_ELEMENT_5 "Obramowanie aktywnego okna" IDS_ELEMENT_6 "Menu" IDS_ELEMENT_7 "Wybrane elementy" @@ -256,21 +254,21 @@ BEGIN IDS_ELEMENT_10 "Obiekty 3D" IDS_ELEMENT_11 "Nazwa palety " IDS_ELEMENT_12 "Etykieta ikony" - IDS_ELEMENT_13 "Belka tytuowa" + IDS_ELEMENT_13 "Belka tytułowa" IDS_ELEMENT_14 "Nieaktywne elementy menu" IDS_ELEMENT_15 "Okno komunikatu" IDS_ELEMENT_16 "Przyciski na pasku przewijania" - IDS_ELEMENT_17 "To aplikacji" - IDS_ELEMENT_18 "Maa belka tytuowa" + IDS_ELEMENT_17 "Tło aplikacji" + IDS_ELEMENT_18 "Mała belka tytułowa" IDS_ELEMENT_19 "Rozmieszczenie ikon (poziome)" IDS_ELEMENT_20 "Rozmieszczenie ikon (pionowe)" - IDS_ELEMENT_21 "Etykieta narzdzia" + IDS_ELEMENT_21 "Etykieta narzędzia" IDS_ELEMENT_22 "Ikona" END STRINGTABLE DISCARDABLE BEGIN IDS_DISPLAY_SETTINGS "Ustawienia ekranu" - IDS_APPLY_FAILED "Nie udao si zastosowa nowych ustawie..." - IDS_APPLY_NEEDS_RESTART "Musisz ponownie uruchomi komputer aby zastosowa zmiany." + IDS_APPLY_FAILED "Nie udało się zastosować nowych ustawień..." + IDS_APPLY_NEEDS_RESTART "Musisz ponownie uruchomić komputer aby zastosować zmiany." END diff --git a/dll/cpl/desk/lang/ro-RO.rc b/dll/cpl/desk/lang/ro-RO.rc index e74329a20f0..887b66a68b2 100644 --- a/dll/cpl/desk/lang/ro-RO.rc +++ b/dll/cpl/desk/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Fundal" @@ -267,5 +265,3 @@ BEGIN IDS_APPLY_FAILED "Nu s-au putut aplica noile setări." IDS_APPLY_NEEDS_RESTART "Trebuie să reporniți computerul pentru a aplica noile setări." END - -#pragma code_page(default) diff --git a/dll/cpl/desk/lang/ru-RU.rc b/dll/cpl/desk/lang/ru-RU.rc index dad783a73ee..e14ed35071f 100644 --- a/dll/cpl/desk/lang/ru-RU.rc +++ b/dll/cpl/desk/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 205 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Рабочий стол" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_BACKGROUND_PREVIEW, "Static", SS_OWNERDRAW, @@ -10,256 +10,256 @@ BEGIN CONTROL "", IDC_BACKGROUND_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 8, 114, 174, 78 - LTEXT " :", + LTEXT "Выберите изображение для рабочего стола:", IDC_STATIC, 8, 103, 180, 9 - PUSHBUTTON "&...", IDC_BROWSE_BUTTON, 188, 114, 55, 15 - PUSHBUTTON "&...", IDC_COLOR_BUTTON, 188, 167, 55, 15 - LTEXT ":", IDC_STATIC, 188, 138, 55, 9 + PUSHBUTTON "&Обзор...", IDC_BROWSE_BUTTON, 188, 114, 55, 15 + PUSHBUTTON "&Цвет...", IDC_COLOR_BUTTON, 188, 167, 55, 15 + LTEXT "Расположение:", IDC_STATIC, 188, 138, 55, 9 COMBOBOX IDC_PLACEMENT_COMBO, 188, 149, 55, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END IDD_SCREENSAVER DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Заставка" FONT 8, "MS Shell Dlg", 0, 0 BEGIN CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE - GROUPBOX "&",IDC_SCREENS_DUMMY, 7, 92, 231, 52 + GROUPBOX "&Заставка",IDC_SCREENS_DUMMY, 7, 92, 231, 52 COMBOBOX IDC_SCREENS_LIST, 14, 104, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&",IDC_SCREENS_SETTINGS, 120, 104, 50, 14, WS_GROUP - PUSHBUTTON "&",IDC_SCREENS_TESTSC, 175, 104, 50, 14 - LTEXT "&:",IDC_WAITTEXT, 14, 124, 40, 10 + PUSHBUTTON "&Параметры",IDC_SCREENS_SETTINGS, 120, 104, 50, 14, WS_GROUP + PUSHBUTTON "П&росмотр",IDC_SCREENS_TESTSC, 175, 104, 50, 14 + LTEXT "И&нтервал:",IDC_WAITTEXT, 14, 124, 40, 10 EDITTEXT IDC_SCREENS_TIMEDELAY, 55, 121, 32, 13, ES_RIGHT | WS_GROUP CONTROL "",IDC_SCREENS_TIME ,UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 54, 123, 12, 13 - LTEXT ".", IDC_MINTEXT, 90, 124, 19, 10 - CONTROL "& ",IDC_SCREENS_USEPASSCHK,"button", + LTEXT "мин.", IDC_MINTEXT, 90, 124, 19, 10 + CONTROL "На&чинать с экрана приветствия",IDC_SCREENS_USEPASSCHK,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 110, 124, 124, 12 - GROUPBOX "&", IDC_SCREENS_DUMMY2, 6, 155, 232, 37 - LTEXT " """".", + GROUPBOX "&Энергосбережение", IDC_SCREENS_DUMMY2, 6, 155, 232, 37 + LTEXT "Для изменения параметров питания монитора нажмите кнопку ""Питание"".", IDC_STATIC, 14, 166, 146 ,20 - PUSHBUTTON "&...", IDC_SCREENS_POWER_BUTTON, 171, 168, 55, 14 + PUSHBUTTON "П&итание...", IDC_SCREENS_POWER_BUTTON, 171, 168, 55, 14 END IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Оформление" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT " :", IDC_STATIC, 7, 139, 154, 10 + LTEXT "Цветовая схема:", IDC_STATIC, 7, 139, 154, 10 COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 155, 200 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 - PUSHBUTTON "", IDC_APPEARANCE_ADVANCED, 168, 170, 70, 14 + PUSHBUTTON "&Эффекты...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 + PUSHBUTTON "Дополнительно", IDC_APPEARANCE_ADVANCED, 168, 170, 70, 14 END IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE -CAPTION " " +CAPTION "Дополнительное оформление" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT ":", 8, 5, 160, 50, 9 + LTEXT "Элемент:", 8, 5, 160, 50, 9 COMBOBOX IDC_ADVAPPEARANCE_ELEMENT, 5, 170, 130, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_CHILD | WS_VSCROLL | WS_TABSTOP - LTEXT "&:", IDC_ADVAPPEARANCE_SIZE_T, 142, 160, 39, 9 + LTEXT "&Размер:", IDC_ADVAPPEARANCE_SIZE_T, 142, 160, 39, 9 EDITTEXT IDC_ADVAPPEARANCE_SIZE_E, 142, 170, 38, 13, ES_RIGHT | WS_GROUP CONTROL "", IDC_ADVAPPEARANCE_SIZE_UD, UPDOWN_CLASS, UDS_AUTOBUDDY | WS_BORDER | WS_GROUP | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT | WS_CHILD | WS_VISIBLE, 172, 170, 10, 13 - LTEXT " &1:", IDC_ADVAPPEARANCE_COLOR1_T, 184, 160, 40, 9 + LTEXT "Цвет &1:", IDC_ADVAPPEARANCE_COLOR1_T, 184, 160, 40, 9 CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR1_B, 184, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP - LTEXT " &2:", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 40, 9 + LTEXT "Цвет &2:", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 40, 9 CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR2_B, 216, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP - LTEXT ":", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 8 + LTEXT "Шрифт:", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 8 COMBOBOX IDC_ADVAPPEARANCE_FONT_C, 5, 200, 130, 90, CBS_DROPDOWN | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT ":", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 39, 8 + LTEXT "Размер:", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 39, 8 COMBOBOX IDC_ADVAPPEARANCE_FONTSIZE_E, 142, 200, 38, 200, CBS_DROPDOWN | WS_VSCROLL - LTEXT ":", IDC_ADVAPPEARANCE_FONTCOLOR_T, 184, 190, 20, 9 + LTEXT "Цвет:", IDC_ADVAPPEARANCE_FONTCOLOR_T, 184, 190, 20, 9 CHECKBOX "", IDC_ADVAPPEARANCE_FONTCOLOR_B, 184, 200, 28, 13, BS_PUSHLIKE | BS_BITMAP - AUTOCHECKBOX "", IDC_ADVAPPEARANCE_FONTBOLD, 216, 200, 14, 13, BS_PUSHLIKE - AUTOCHECKBOX " ", IDC_ADVAPPEARANCE_FONTITALIC, 230, 200, 14, 13, BS_PUSHLIKE + AUTOCHECKBOX "Ж", IDC_ADVAPPEARANCE_FONTBOLD, 216, 200, 14, 13, BS_PUSHLIKE + AUTOCHECKBOX "К ", IDC_ADVAPPEARANCE_FONTITALIC, 230, 200, 14, 13, BS_PUSHLIKE - PUSHBUTTON "", IDCANCEL, 191, 220, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 191, 220, 50, 14 DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE -CAPTION "" +CAPTION "Эффекты" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "& :",IDC_EFFAPPEARANCE_ANIMATION,"button", + CONTROL "&Применять следующий переходный эффект для меню и подсказок:",IDC_EFFAPPEARANCE_ANIMATION,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 5, 285, 19 COMBOBOX IDC_EFFAPPEARANCE_ANIMATIONTYPE, 20, 25, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_CHILD | WS_VSCROLL | WS_TABSTOP - CONTROL "& :",IDC_EFFAPPEARANCE_SMOOTHING,"button", + CONTROL "Пр&именять следующий метод сглаживания для экранных шрифтов:",IDC_EFFAPPEARANCE_SMOOTHING,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 42, 285, 19 COMBOBOX IDC_EFFAPPEARANCE_SMOOTHINGTYPE, 20, 62, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - CONTROL " & ",IDC_EFFAPPEARANCE_LARGEICONS,"button", + CONTROL "Применять &крупные значки",IDC_EFFAPPEARANCE_LARGEICONS,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 80, 285, 19 - CONTROL " &, ",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button", + CONTROL "Отображать &тени, отбрасываемые меню",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 95, 285, 19 - CONTROL "& ",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button", + CONTROL "&Отображать содержимое окна при перетаскивании",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 285, 19 - CONTROL "& ",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button", + CONTROL "Скр&ывать указатели вызова с клавиатуры до нажатия ",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 285, 19 - PUSHBUTTON "", IDCANCEL, 226, 165, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 249, 197 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .",-1,3,7,244,17 + LTEXT "Разместите значки мониторов в соответствии с их расположением.",-1,3,7,244,17 CONTROL "",IDC_SETTINGS_MONSEL,"MONITORSELWNDCLASS",WS_CHILD|WS_VISIBLE|WS_TABSTOP,3,21,240,82,WS_EX_CLIENTEDGE - LTEXT "&:",1820,3,105,40,8 - LTEXT "<>",IDC_SETTINGS_DEVICE,9,115,224,8 - GROUPBOX "& ",1818,3,129,119,46 + LTEXT "&Дисплей:",1820,3,105,40,8 + LTEXT "<нет>",IDC_SETTINGS_DEVICE,9,115,224,8 + GROUPBOX "&Разрешение экрана",1818,3,129,119,46 CONTROL "",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP,33,141,58,17 - LTEXT ".",1815,12,146,21,8,NOT WS_GROUP - LTEXT ".",1816,94,146,21,8,NOT WS_GROUP + LTEXT "мен.",1815,12,146,21,8,NOT WS_GROUP + LTEXT "бол.",1816,94,146,21,8,NOT WS_GROUP LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,161,105,10,NOT WS_GROUP | SS_CENTER - GROUPBOX "& ",1817,129,129,115,46 + GROUPBOX "&Качество цветопередачи",1817,129,129,115,46 COMBOBOX IDC_SETTINGS_BPP,135,141,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW | SS_SUNKEN,135,161,103,9 - PUSHBUTTON "&",IDC_SETTINGS_ADVANCED,173,182,70,14 + PUSHBUTTON "До&полнительно",IDC_SETTINGS_ADVANCED,173,182,70,14 END IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 6, 237, 56, WS_GROUP - LTEXT " :", -1, 14, 20, 222, 8 + GROUPBOX "Экран", -1, 7, 6, 237, 56, WS_GROUP + LTEXT "Размер шрифта:", -1, 14, 20, 222, 8 COMBOBOX IDC_FONTSIZE_COMBO, 14, 30, 223, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "", IDC_FONTSIZE_COSTOM, 14, 46, 223, 12 - GROUPBOX "", -1, 7, 67, 237, 97 - LTEXT " , .\r\n\n :", -1, 12, 78, 228, 34 - AUTORADIOBUTTON "& ", IDC_RESTART_RB, 14, 116, 224, 10 - AUTORADIOBUTTON "& ", IDC_WITHOUTREBOOT_RB, 14, 131, 224, 10 - AUTORADIOBUTTON "& ", IDC_ASKME_RB, 14, 146, 224, 10 + GROUPBOX "Совместимость", -1, 7, 67, 237, 97 + LTEXT "Некоторые программы могут работать неправильно, если вы не перезагрузите компьютер после изменения параметров экрана.\r\n\nПосле изменения параметров экрана следует:", -1, 12, 78, 228, 34 + AUTORADIOBUTTON "Пере&загрузить компьютер с новыми параметрами экрана", IDC_RESTART_RB, 14, 116, 224, 10 + AUTORADIOBUTTON "&Применить новые параметры экрана без перезагрузки", IDC_WITHOUTREBOOT_RB, 14, 131, 224, 10 + AUTORADIOBUTTON "З&апросить перед применением новых параметров экрана", IDC_ASKME_RB, 14, 146, 224, 10 END IDR_PREVIEW_MENU MENU BEGIN - MENUITEM "", ID_MENU_NORMAL - MENUITEM "", ID_MENU_DISABLED - MENUITEM "", ID_MENU_SELECTED + MENUITEM "Обычная", ID_MENU_NORMAL + MENUITEM "Отключенная", ID_MENU_DISABLED + MENUITEM "Выбранная", ID_MENU_SELECTED END IDM_MONITOR_MENU MENU BEGIN POPUP "" BEGIN - MENUITEM "&", ID_MENU_ATTACHED - MENUITEM "&", ID_MENU_PRIMARY + MENUITEM "&Присоединенный", ID_MENU_ATTACHED + MENUITEM "&Основной", ID_MENU_PRIMARY MENUITEM SEPARATOR - MENUITEM "&", ID_MENU_IDENTIFY - MENUITEM "&", ID_MENU_PROPERTIES + MENUITEM "Опр&еделение", ID_MENU_IDENTIFY + MENUITEM "Сво&йства", ID_MENU_PROPERTIES END END STRINGTABLE DISCARDABLE BEGIN - IDS_SLIDEEFFECT "" - IDS_FADEEFFECT "" + IDS_SLIDEEFFECT "Развертывание" + IDS_FADEEFFECT "Затемнение" END STRINGTABLE DISCARDABLE BEGIN - IDS_STANDARDEFFECT "" + IDS_STANDARDEFFECT "Обычный" IDS_CLEARTYPEEFFECT "ClearType" END STRINGTABLE BEGIN - IDS_MULTIPLEMONITORS "( )" - IDS_UNKNOWNMONITOR "( )" - IDS_ADVANCEDTITLEFMT "%s %s" + IDS_MULTIPLEMONITORS "(несколько экранов)" + IDS_UNKNOWNMONITOR "(неизвестный экран)" + IDS_ADVANCEDTITLEFMT "%s и %s" END STRINGTABLE BEGIN - IDS_CPLNAME "" - IDS_CPLDESCRIPTION " ." - IDS_NONE "()" - IDS_CENTER " " - IDS_STRETCH "" - IDS_TILE "" + IDS_CPLNAME "Экран" + IDS_CPLDESCRIPTION "Выберите дисплей рабочего стола и заставку." + IDS_NONE "(нет)" + IDS_CENTER "по центру" + IDS_STRETCH "растянуть" + IDS_TILE "замостить" END STRINGTABLE DISCARDABLE BEGIN - IDS_COLOR_4BIT "16 " - IDS_COLOR_8BIT "256 " - IDS_COLOR_16BIT " (16 )" - IDS_COLOR_24BIT " (24 )" - IDS_COLOR_32BIT " (32 )" - IDS_PIXEL "%lux%lu " + IDS_COLOR_4BIT "16 цветов" + IDS_COLOR_8BIT "256 цветов" + IDS_COLOR_16BIT "Среднее (16 бит)" + IDS_COLOR_24BIT "Высокое (24 бита)" + IDS_COLOR_32BIT "Самое высокое (32 бита)" + IDS_PIXEL "%lux%lu точек" END STRINGTABLE DISCARDABLE BEGIN - IDS_BACKGROUND_COMDLG_FILTER " (*.bmp;*.dib)\000*.bmp;*.dib" + IDS_BACKGROUND_COMDLG_FILTER "Изображения (*.bmp;*.dib)\000*.bmp;*.dib" IDS_SUPPORTED_EXT "*.bmp;*.dib" END STRINGTABLE DISCARDABLE BEGIN - IDS_INACTWIN " " - IDS_ACTWIN " " - IDS_WINTEXT " " - IDS_MESSBOX " " - IDS_MESSTEXT "" + IDS_INACTWIN "Неактивное окно" + IDS_ACTWIN "Активное окно" + IDS_WINTEXT "Текст окна" + IDS_MESSBOX "Окно сообщения" + IDS_MESSTEXT "Сообщение" IDS_BUTTEXT "OK" END STRINGTABLE DISCARDABLE BEGIN - IDS_ELEMENT_1 " " - IDS_ELEMENT_2 " " - IDS_ELEMENT_3 " " - IDS_ELEMENT_4 " " - IDS_ELEMENT_5 " " - IDS_ELEMENT_6 "" - IDS_ELEMENT_7 " " - IDS_ELEMENT_8 "" - IDS_ELEMENT_9 " " - IDS_ELEMENT_10 " " - IDS_ELEMENT_11 " " - IDS_ELEMENT_12 " " - IDS_ELEMENT_13 " " - IDS_ELEMENT_14 " " - IDS_ELEMENT_15 "" - IDS_ELEMENT_16 " " - IDS_ELEMENT_17 " " + IDS_ELEMENT_1 "Рабочий стол" + IDS_ELEMENT_2 "Заголовок неактивных окон" + IDS_ELEMENT_3 "Граница неактивных окон" + IDS_ELEMENT_4 "Заголовок активных окон" + IDS_ELEMENT_5 "Граница активных окон" + IDS_ELEMENT_6 "Меню" + IDS_ELEMENT_7 "Выледенные элементы" + IDS_ELEMENT_8 "Окна" + IDS_ELEMENT_9 "Полоса прокрутки" + IDS_ELEMENT_10 "Рельефные объекты" + IDS_ELEMENT_11 "Цвет заголовка" + IDS_ELEMENT_12 "Иконка заголовка" + IDS_ELEMENT_13 "Строка заголовка" + IDS_ELEMENT_14 "Неактивные пункты меню" + IDS_ELEMENT_15 "Диалог" + IDS_ELEMENT_16 "Полосы прокрутки" + IDS_ELEMENT_17 "Рабочая область приложения" IDS_ELEMENT_18 "Small captionbar" - IDS_ELEMENT_19 " (.)" - IDS_ELEMENT_20 " (.)" - IDS_ELEMENT_21 " " - IDS_ELEMENT_22 "" + IDS_ELEMENT_19 "Интервал между значками (гор.)" + IDS_ELEMENT_20 "Интервал между значками (верт.)" + IDS_ELEMENT_21 "Всплывающая подсказка" + IDS_ELEMENT_22 "Значок" END STRINGTABLE DISCARDABLE BEGIN - IDS_DISPLAY_SETTINGS " " - IDS_APPLY_FAILED " ..." - IDS_APPLY_NEEDS_RESTART " ." + IDS_DISPLAY_SETTINGS "Параметры экрана" + IDS_APPLY_FAILED "Не удалось применить новые настройки..." + IDS_APPLY_NEEDS_RESTART "Вы должны перезагрузить компьютер для применения изменений." END diff --git a/dll/cpl/desk/lang/sv-SE.rc b/dll/cpl/desk/lang/sv-SE.rc index b73e7fa6ca6..fe9659a9b3c 100644 --- a/dll/cpl/desk/lang/sv-SE.rc +++ b/dll/cpl/desk/lang/sv-SE.rc @@ -55,7 +55,7 @@ BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 LTEXT "Item:", IDC_STATIC, 7, 159, 26, 9 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Effects...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 PUSHBUTTON "Advanced", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END diff --git a/dll/cpl/desk/lang/uk-UA.rc b/dll/cpl/desk/lang/uk-UA.rc index ff8888a85a9..03e7c307c91 100644 --- a/dll/cpl/desk/lang/uk-UA.rc +++ b/dll/cpl/desk/lang/uk-UA.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 205 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Робочий стіл" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_BACKGROUND_PREVIEW, "Static", SS_OWNERDRAW, @@ -18,256 +18,256 @@ BEGIN CONTROL "", IDC_BACKGROUND_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 8, 114, 174, 78 - LTEXT " :", + LTEXT "Виберіть зображення для шпалер робочого столу:", IDC_STATIC, 8, 103, 180, 9 - PUSHBUTTON "&...", IDC_BROWSE_BUTTON, 188, 114, 50, 15 - PUSHBUTTON "&...", IDC_COLOR_BUTTON, 188, 177, 50, 15 - LTEXT ":", IDC_STATIC, 188, 138, 51, 9 + PUSHBUTTON "&Огляд...", IDC_BROWSE_BUTTON, 188, 114, 50, 15 + PUSHBUTTON "&Колір...", IDC_COLOR_BUTTON, 188, 177, 50, 15 + LTEXT "Розташування:", IDC_STATIC, 188, 138, 51, 9 COMBOBOX IDC_PLACEMENT_COMBO, 188, 149, 50, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END IDD_SCREENSAVER DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Заставка" FONT 8, "MS Shell Dlg", 0, 0 BEGIN CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE - GROUPBOX "&",IDC_SCREENS_DUMMY, 8, 92, 230, 52 + GROUPBOX "&Заставка",IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&",IDC_SCREENS_SETTINGS, 120, 103, 50, 13, WS_GROUP - PUSHBUTTON "&",IDC_SCREENS_TESTSC, 175, 103, 50, 13 - LTEXT "&",IDC_WAITTEXT, 14, 125, 30, 9 + PUSHBUTTON "П&араметри",IDC_SCREENS_SETTINGS, 120, 103, 50, 13, WS_GROUP + PUSHBUTTON "&Перегляд",IDC_SCREENS_TESTSC, 175, 103, 50, 13 + LTEXT "&Інтервал",IDC_WAITTEXT, 14, 125, 30, 9 EDITTEXT IDC_SCREENS_TIMEDELAY, 48, 123, 32, 13, ES_RIGHT | WS_GROUP CONTROL "",IDC_SCREENS_TIME ,UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 54, 123, 12, 13 - LTEXT "", IDC_MINTEXT, 84, 125, 26, 9 - CONTROL "& ",IDC_SCREENS_USEPASSCHK,"button", + LTEXT "хв", IDC_MINTEXT, 84, 125, 26, 9 + CONTROL "За&хист паролем",IDC_SCREENS_USEPASSCHK,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 108, 120, 104, 19 - GROUPBOX "&", IDC_SCREENS_DUMMY2, 6, 155, 232, 41 - LTEXT " , """".", + GROUPBOX "&Енергозбереження", IDC_SCREENS_DUMMY2, 6, 155, 232, 41 + LTEXT "Щоб змінити параметри живлення монітора, натисніть кнопку ""Живлення"".", IDC_STATIC, 14, 166, 146 ,20 - PUSHBUTTON "&...", IDC_SCREENS_POWER_BUTTON, 176, 171, 50, 13 + PUSHBUTTON "&Живлення...", IDC_SCREENS_POWER_BUTTON, 176, 171, 50, 13 END IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Оформлення" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT " ", IDC_STATIC, 7, 140, 64, 7 - COMBOBOX IDC_APPEARANCE_UI_ITEM, 7, 169, 120, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 - PUSHBUTTON "", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 + LTEXT "Колірна схема", IDC_STATIC, 7, 140, 64, 7 + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 150, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Ефекти...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 + PUSHBUTTON "Додатково", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE -CAPTION " " +CAPTION "Додаткове оформлення" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 - LTEXT ":", 8, 5, 160, 50, 9 + LTEXT "Елемент:", 8, 5, 160, 50, 9 COMBOBOX IDC_ADVAPPEARANCE_ELEMENT, 5, 170, 130, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_CHILD | WS_VSCROLL | WS_TABSTOP - LTEXT "&", IDC_ADVAPPEARANCE_SIZE_T, 142, 160, 21, 9 + LTEXT "&Розмір", IDC_ADVAPPEARANCE_SIZE_T, 142, 160, 21, 9 EDITTEXT IDC_ADVAPPEARANCE_SIZE_E, 142, 170, 38, 13, ES_RIGHT | WS_GROUP CONTROL "", IDC_ADVAPPEARANCE_SIZE_UD, UPDOWN_CLASS, UDS_AUTOBUDDY | WS_BORDER | WS_GROUP | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT | WS_CHILD | WS_VISIBLE, 172, 170, 10, 13 - LTEXT " &1:", IDC_ADVAPPEARANCE_COLOR1_T, 184, 160, 40, 9 + LTEXT "Колір &1:", IDC_ADVAPPEARANCE_COLOR1_T, 184, 160, 40, 9 CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR1_B, 184, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP - LTEXT " &2:", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 40, 9 + LTEXT "Колір &2:", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 40, 9 CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR2_B, 216, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP - LTEXT ":", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 8 + LTEXT "Шрифт:", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 8 COMBOBOX IDC_ADVAPPEARANCE_FONT_C, 5, 200, 130, 90, CBS_DROPDOWN | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT ":", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 39, 8 + LTEXT "Розмір:", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 39, 8 COMBOBOX IDC_ADVAPPEARANCE_FONTSIZE_E, 142, 200, 38, 200, CBS_DROPDOWN | WS_VSCROLL - LTEXT ":", IDC_ADVAPPEARANCE_FONTCOLOR_T, 184, 190, 20, 9 + LTEXT "Колір:", IDC_ADVAPPEARANCE_FONTCOLOR_T, 184, 190, 20, 9 CHECKBOX "", IDC_ADVAPPEARANCE_FONTCOLOR_B, 184, 200, 28, 13, BS_PUSHLIKE | BS_BITMAP - AUTOCHECKBOX "", IDC_ADVAPPEARANCE_FONTBOLD, 216, 200, 14, 13, BS_PUSHLIKE - AUTOCHECKBOX " ", IDC_ADVAPPEARANCE_FONTITALIC, 230, 200, 14, 13, BS_PUSHLIKE + AUTOCHECKBOX "Ж", IDC_ADVAPPEARANCE_FONTBOLD, 216, 200, 14, 13, BS_PUSHLIKE + AUTOCHECKBOX "К ", IDC_ADVAPPEARANCE_FONTITALIC, 230, 200, 14, 13, BS_PUSHLIKE - PUSHBUTTON "", IDCANCEL, 191, 220, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 191, 220, 50, 14 DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE -CAPTION "" +CAPTION "Ефекти" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "& :",IDC_EFFAPPEARANCE_ANIMATION,"button", + CONTROL "&Застосовувати наступний перехідний ефект для меню та підказок:",IDC_EFFAPPEARANCE_ANIMATION,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 5, 285, 19 COMBOBOX IDC_EFFAPPEARANCE_ANIMATIONTYPE, 20, 25, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_CHILD | WS_VSCROLL | WS_TABSTOP - CONTROL "& :",IDC_EFFAPPEARANCE_SMOOTHING,"button", + CONTROL "З&астосовувати наступний метод згладжування для екранних шрифтів:",IDC_EFFAPPEARANCE_SMOOTHING,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 42, 285, 19 COMBOBOX IDC_EFFAPPEARANCE_SMOOTHINGTYPE, 20, 62, 80, 19 , CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - CONTROL " & ",IDC_EFFAPPEARANCE_LARGEICONS,"button", + CONTROL "Застосовувати &великі значки",IDC_EFFAPPEARANCE_LARGEICONS,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 80, 285, 19 - CONTROL "³ ",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button", + CONTROL "Відображати тіні від меню",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button", BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 95, 285, 19 - CONTROL " & ",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button", + CONTROL "Показати &вміст вікна під час перетягування",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 285, 19 - CONTROL "& ",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button", + CONTROL "&Приховувати покажчики виклику з клавіатури до натиснення ",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 285, 19 - PUSHBUTTON "", IDCANCEL, 226, 165, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 188 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .",-1,3,1,240,16 + LTEXT "Розташуйте значки моніторів відповідно до фактичного розташування моніторів.",-1,3,1,240,16 CONTROL "",IDC_SETTINGS_MONSEL,"MONITORSELWNDCLASS",WS_CHILD|WS_VISIBLE|WS_TABSTOP,3,16,240,82,WS_EX_CLIENTEDGE - LTEXT "&:",1820,3,100,30,8 - LTEXT "<>",IDC_SETTINGS_DEVICE,9,109,224,8 - GROUPBOX "& ",1818,3,120,115,43 + LTEXT "&Дисплей:",1820,3,100,30,8 + LTEXT "<немає>",IDC_SETTINGS_DEVICE,9,109,224,8 + GROUPBOX "&Область екрану",1818,3,120,115,43 CONTROL "",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, 30,130,58,17 - LTEXT "",1815,6,130,24,8,NOT WS_GROUP - LTEXT "",1816,90,130,24,8,NOT WS_GROUP + LTEXT "Менше",1815,6,130,24,8,NOT WS_GROUP + LTEXT "Більше",1816,90,130,24,8,NOT WS_GROUP LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,150,100,10, NOT WS_GROUP | SS_CENTER - GROUPBOX "& ",1817,125,120,115,43 + GROUPBOX "&Якість кольоропередачі",1817,125,120,115,43 COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW | SS_SUNKEN,131,148,103,9 - PUSHBUTTON "&...",IDC_SETTINGS_ADVANCED,170,165,70,14 + PUSHBUTTON "Дод&атково...",IDC_SETTINGS_ADVANCED,170,165,70,14 END IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 6, 237, 56, WS_GROUP - LTEXT " :", -1, 14, 20, 222, 8 + GROUPBOX "Екран", -1, 7, 6, 237, 56, WS_GROUP + LTEXT "Розмір шрифту:", -1, 14, 20, 222, 8 COMBOBOX IDC_FONTSIZE_COMBO, 14, 30, 223, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "", IDC_FONTSIZE_COSTOM, 14, 46, 223, 12 - GROUPBOX "", -1, 7, 67, 237, 97 - LTEXT " , ' .\r\n\nϳ :", -1, 12, 78, 228, 34 - AUTORADIOBUTTON "& ' .", IDC_RESTART_RB, 14, 116, 224, 10 - AUTORADIOBUTTON "& .", IDC_WITHOUTREBOOT_RB, 14, 131, 224, 10 - AUTORADIOBUTTON " .", IDC_ASKME_RB, 14, 146, 224, 10 + GROUPBOX "Сумісність", -1, 7, 67, 237, 97 + LTEXT "Деякі програми працюватимуть неправильно, якщо ви не перезавантажите комп'ютер після зміни параметрів кольору.\r\n\nПісля зміни параметрів кольору слід:", -1, 12, 78, 228, 34 + AUTORADIOBUTTON "&Перезавантажити комп'ютер із новими параметрами кольору.", IDC_RESTART_RB, 14, 116, 224, 10 + AUTORADIOBUTTON "&Застосувати нові параметри кольору без перезавантаження.", IDC_WITHOUTREBOOT_RB, 14, 131, 224, 10 + AUTORADIOBUTTON "Запитати перед застосуванням нових параметрів кольору.", IDC_ASKME_RB, 14, 146, 224, 10 END IDR_PREVIEW_MENU MENU BEGIN - MENUITEM "", ID_MENU_NORMAL - MENUITEM "", ID_MENU_DISABLED - MENUITEM "", ID_MENU_SELECTED + MENUITEM "Звичайне", ID_MENU_NORMAL + MENUITEM "Вимкнене", ID_MENU_DISABLED + MENUITEM "Вибране", ID_MENU_SELECTED END IDM_MONITOR_MENU MENU BEGIN POPUP "" BEGIN - MENUITEM "&", ID_MENU_ATTACHED - MENUITEM "&", ID_MENU_PRIMARY + MENUITEM "&Приєднаний", ID_MENU_ATTACHED + MENUITEM "&Основний", ID_MENU_PRIMARY MENUITEM SEPARATOR - MENUITEM "&", ID_MENU_IDENTIFY - MENUITEM "&", ID_MENU_PROPERTIES + MENUITEM "&Визначення", ID_MENU_IDENTIFY + MENUITEM "В&ластивості", ID_MENU_PROPERTIES END END STRINGTABLE DISCARDABLE BEGIN - IDS_SLIDEEFFECT "" - IDS_FADEEFFECT "" + IDS_SLIDEEFFECT "Розгортання" + IDS_FADEEFFECT "Затемнення" END STRINGTABLE DISCARDABLE BEGIN - IDS_STANDARDEFFECT "" - IDS_CLEARTYPEEFFECT "³ " + IDS_STANDARDEFFECT "Звичайний" + IDS_CLEARTYPEEFFECT "Відкритий тип" END STRINGTABLE BEGIN - IDS_MULTIPLEMONITORS "( )" - IDS_UNKNOWNMONITOR "( )" - IDS_ADVANCEDTITLEFMT "%s %s" + IDS_MULTIPLEMONITORS "(Декілька моніторів)" + IDS_UNKNOWNMONITOR "(Невідомий монітор)" + IDS_ADVANCEDTITLEFMT "%s і %s" END STRINGTABLE BEGIN - IDS_CPLNAME "" - IDS_CPLDESCRIPTION " ." - IDS_NONE "()" - IDS_CENTER " " - IDS_STRETCH "" - IDS_TILE "" + IDS_CPLNAME "Екран" + IDS_CPLDESCRIPTION "Виберіть відображення робочого столу й зберігача екрану." + IDS_NONE "(немає)" + IDS_CENTER "По центру" + IDS_STRETCH "Розтягнути" + IDS_TILE "Плиткою" END STRINGTABLE DISCARDABLE BEGIN - IDS_COLOR_4BIT "16 " - IDS_COLOR_8BIT "256 " - IDS_COLOR_16BIT " (16 )" - IDS_COLOR_24BIT " (24 )" - IDS_COLOR_32BIT " (32 )" - IDS_PIXEL "%lu %lu " + IDS_COLOR_4BIT "16 кольорів" + IDS_COLOR_8BIT "256 кольорів" + IDS_COLOR_16BIT "Середня (16 біт)" + IDS_COLOR_24BIT "Висока (24 біта)" + IDS_COLOR_32BIT "Найвища (32 біта)" + IDS_PIXEL "%lu на %lu крапок" END STRINGTABLE DISCARDABLE BEGIN - IDS_BACKGROUND_COMDLG_FILTER " (*.bmp;*.dib)\0*.bmp;*.dib\0" + IDS_BACKGROUND_COMDLG_FILTER "Малюнки (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END STRINGTABLE DISCARDABLE BEGIN - IDS_INACTWIN " " - IDS_ACTWIN " " - IDS_WINTEXT " " - IDS_MESSBOX "³ " - IDS_MESSTEXT "" + IDS_INACTWIN "Неактивне вікно" + IDS_ACTWIN "Активне вікно" + IDS_WINTEXT "Текст у вікні" + IDS_MESSBOX "Вікно повідомлення" + IDS_MESSTEXT "Повідомлення" IDS_BUTTEXT "OK" END STRINGTABLE DISCARDABLE BEGIN - IDS_ELEMENT_1 " " - IDS_ELEMENT_2 " " - IDS_ELEMENT_3 " " - IDS_ELEMENT_4 " " - IDS_ELEMENT_5 " " - IDS_ELEMENT_6 "" - IDS_ELEMENT_7 " " - IDS_ELEMENT_8 "³" - IDS_ELEMENT_9 " " - IDS_ELEMENT_10 " '" - IDS_ELEMENT_11 " " - IDS_ELEMENT_12 "ϳ " - IDS_ELEMENT_13 " " - IDS_ELEMENT_14 " " - IDS_ELEMENT_15 "³ " - IDS_ELEMENT_16 " " - IDS_ELEMENT_17 " " - IDS_ELEMENT_18 " " - IDS_ELEMENT_19 " (.)" - IDS_ELEMENT_20 " (.)" - IDS_ELEMENT_21 " " - IDS_ELEMENT_22 "" + IDS_ELEMENT_1 "Робочий стіл" + IDS_ELEMENT_2 "Заголовок неактивних вікон" + IDS_ELEMENT_3 "Межа неактивних вікон" + IDS_ELEMENT_4 "Заголовок активних вікон" + IDS_ELEMENT_5 "Межа активних вікон" + IDS_ELEMENT_6 "Меню" + IDS_ELEMENT_7 "Виділені пункти" + IDS_ELEMENT_8 "Вікна" + IDS_ELEMENT_9 "Смуга прокрутки" + IDS_ELEMENT_10 "Рельєфні об'єкти" + IDS_ELEMENT_11 "Назва панелі" + IDS_ELEMENT_12 "Підпис значка" + IDS_ELEMENT_13 "Кнопки керування вікном" + IDS_ELEMENT_14 "Недоступні пункти меню" + IDS_ELEMENT_15 "Вікно повідомлення" + IDS_ELEMENT_16 "Елементи управління прокрутки" + IDS_ELEMENT_17 "Робоча область додатка" + IDS_ELEMENT_18 "Значок у заголовку" + IDS_ELEMENT_19 "Інтервал між значками (гор.)" + IDS_ELEMENT_20 "Інтервал між значками (верт.)" + IDS_ELEMENT_21 "Виринаюча підказка" + IDS_ELEMENT_22 "Значок" END STRINGTABLE DISCARDABLE BEGIN - IDS_DISPLAY_SETTINGS " " - IDS_APPLY_FAILED " ..." - IDS_APPLY_NEEDS_RESTART " ' ." + IDS_DISPLAY_SETTINGS "Параметри дисплея" + IDS_APPLY_FAILED "Не вдалося застосувати нові параметри..." + IDS_APPLY_NEEDS_RESTART "Ви повинні перезавантажити комп'ютер для застосування змін." END diff --git a/dll/cpl/desk/resource.h b/dll/cpl/desk/resource.h index ae02abac30f..aafa9407264 100644 --- a/dll/cpl/desk/resource.h +++ b/dll/cpl/desk/resource.h @@ -92,11 +92,10 @@ /* Appearance Page */ #define IDC_APPEARANCE_PREVIEW 1500 -#define IDC_APPEARANCE_UI_ITEM 1501 -#define IDC_APPEARANCE_COLORSCHEME 1502 -#define IDC_APPEARANCE_FONTSIZE 1503 -#define IDC_APPEARANCE_EFFECTS 1504 -#define IDC_APPEARANCE_ADVANCED 1505 +#define IDC_APPEARANCE_COLORSCHEME 1501 +#define IDC_APPEARANCE_FONTSIZE 1502 +#define IDC_APPEARANCE_EFFECTS 1503 +#define IDC_APPEARANCE_ADVANCED 1504 #define IDS_INACTWIN 1510 #define IDS_ACTWIN 1511 diff --git a/dll/cpl/desk/rsrc.rc b/dll/cpl/desk/rsrc.rc index c27b561df3c..91b57b7cf09 100644 --- a/dll/cpl/desk/rsrc.rc +++ b/dll/cpl/desk/rsrc.rc @@ -14,10 +14,13 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/sv-SE.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" -#include "lang/sv-SE.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/desk/screensaver.c b/dll/cpl/desk/screensaver.c index deeeda6ec73..4908514166a 100644 --- a/dll/cpl/desk/screensaver.c +++ b/dll/cpl/desk/screensaver.c @@ -460,6 +460,7 @@ static VOID SetScreenSaver(HWND hwndDlg, PDATA pData) { HKEY regKey; + BOOL DeleteMode = FALSE; if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Control Panel\\Desktop"), @@ -486,6 +487,7 @@ SetScreenSaver(HWND hwndDlg, PDATA pData) { /* Windows deletes the value if no screensaver is set */ RegDeleteValue(regKey, _T("SCRNSAVE.EXE")); + DeleteMode = TRUE; } /* set the screensaver time delay */ @@ -506,6 +508,10 @@ SetScreenSaver(HWND hwndDlg, PDATA pData) (PBYTE)szTime, _tcslen(szTime) * sizeof(TCHAR)); + if (DeleteMode) Time = 0; + + SystemParametersInfoW(SPI_SETSCREENSAVETIMEOUT, Time, 0, SPIF_SENDCHANGE); + /* set the secure value */ Ret = SendDlgItemMessage(hwndDlg, IDC_SCREENS_USEPASSCHK, diff --git a/dll/cpl/desk/theme.c b/dll/cpl/desk/theme.c index bdedc662f07..821206fab2e 100644 --- a/dll/cpl/desk/theme.c +++ b/dll/cpl/desk/theme.c @@ -222,6 +222,7 @@ VOID ApplyTheme(THEME* theme, INT ThemeId) DWORD dwDisposition; TCHAR clText[16]; NONCLIENTMETRICS NonClientMetrics; + ICONMETRICS IconMetrics; /* Apply Colors from global variable */ SetSysColors(NUM_COLORS, g_ColorList, theme->crColor); @@ -247,7 +248,7 @@ VOID ApplyTheme(THEME* theme, INT ThemeId) RegCloseKey(hKey); } - /* Apply the fonts */ + /* Apply non client metrics */ NonClientMetrics.cbSize = sizeof(NONCLIENTMETRICS); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0); NonClientMetrics.lfCaptionFont = theme->lfFont[FONT_CAPTION]; @@ -255,50 +256,30 @@ VOID ApplyTheme(THEME* theme, INT ThemeId) NonClientMetrics.lfMenuFont = theme->lfFont[FONT_MENU]; NonClientMetrics.lfStatusFont = theme->lfFont[FONT_INFO]; NonClientMetrics.lfMessageFont = theme->lfFont[FONT_DIALOG]; - SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0); - SystemParametersInfo(SPI_SETICONTITLELOGFONT, sizeof(LOGFONT), &theme->lfFont[FONT_ICON], 0); + NonClientMetrics.iBorderWidth = theme->Size[SIZE_BORDER_X]; + NonClientMetrics.iScrollWidth = theme->Size[SIZE_SCROLL_X]; + NonClientMetrics.iScrollHeight = theme->Size[SIZE_SCROLL_Y]; + NonClientMetrics.iCaptionWidth = theme->Size[SIZE_CAPTION_Y]; + NonClientMetrics.iCaptionHeight = theme->Size[SIZE_CAPTION_Y]; + NonClientMetrics.iSmCaptionWidth = theme->Size[SIZE_SMCAPTION_Y]; + NonClientMetrics.iSmCaptionHeight = theme->Size[SIZE_SMCAPTION_Y]; + NonClientMetrics.iMenuWidth = theme->Size[SIZE_MENU_SIZE_X]; + NonClientMetrics.iMenuHeight = theme->Size[SIZE_MENU_Y]; + SystemParametersInfo(SPI_SETNONCLIENTMETRICS, + sizeof(NONCLIENTMETRICS), + &NonClientMetrics, + SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); - /* FIXME: Apply size metrics */ - - /* Save fonts and size metrics to registry */ - Result = RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop\\WindowMetrics"), 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition); - if (Result == ERROR_SUCCESS) - { - RegSetValueEx(hKey, TEXT("CaptionFont"), 0, REG_BINARY, (BYTE *)&theme->lfFont[FONT_CAPTION], sizeof(LOGFONT)); - RegSetValueEx(hKey, TEXT("SmCaptionFont"), 0, REG_BINARY, (BYTE *)&theme->lfFont[FONT_SMCAPTION], sizeof(LOGFONT)); - RegSetValueEx(hKey, TEXT("IconFont"), 0, REG_BINARY, (BYTE *)&theme->lfFont[FONT_ICON], sizeof(LOGFONT)); - RegSetValueEx(hKey, TEXT("MenuFont"), 0, REG_BINARY, (BYTE *)&theme->lfFont[FONT_MENU], sizeof(LOGFONT)); - RegSetValueEx(hKey, TEXT("StatusFont"), 0, REG_BINARY, (BYTE *)&theme->lfFont[FONT_INFO], sizeof(LOGFONT)); - RegSetValueEx(hKey, TEXT("MessageFont"), 0, REG_BINARY, (BYTE *)&theme->lfFont[FONT_DIALOG], sizeof(LOGFONT)); - - /* Save size metrics to registry */ - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_BORDER_X]); - RegSetValueEx(hKey, TEXT("BorderWidth"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_CAPTION_Y]); - RegSetValueEx(hKey, TEXT("CaptionWidth"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_CAPTION_Y]); - RegSetValueEx(hKey, TEXT("CaptionHeight"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_SMCAPTION_Y]); - RegSetValueEx(hKey, TEXT("SmCaptionWidth"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_SMCAPTION_Y]); - RegSetValueEx(hKey, TEXT("SmCaptionHeight"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_ICON_SPC_X]); - RegSetValueEx(hKey, TEXT("IconSpacing"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_ICON_SPC_Y]); - RegSetValueEx(hKey, TEXT("IconVerticalSpacing"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_MENU_SIZE_X]); - RegSetValueEx(hKey, TEXT("MenuWidth"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_MENU_Y]); - RegSetValueEx(hKey, TEXT("MenuHeight"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_SCROLL_X]); - RegSetValueEx(hKey, TEXT("ScrollWidth"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), -15 * theme->Size[SIZE_SCROLL_Y]); - RegSetValueEx(hKey, TEXT("ScrollHeight"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - wsprintf(clText, TEXT("%d"), theme->Size[SIZE_ICON_X]); - RegSetValueEx(hKey, TEXT("Shell Icon Size"), 0, REG_SZ, (BYTE *)clText, sizeof(clText)); - - RegCloseKey(hKey); - } + /* Apply icon metrics */ + IconMetrics.cbSize = sizeof(ICONMETRICS); + SystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICS), &IconMetrics, 0); + IconMetrics.iHorzSpacing = theme->Size[SIZE_ICON_SPC_X]; + IconMetrics.iVertSpacing = theme->Size[SIZE_ICON_SPC_Y]; + IconMetrics.lfFont = theme->lfFont[FONT_ICON]; + SystemParametersInfo(SPI_SETICONMETRICS, + sizeof(ICONMETRICS), + &IconMetrics, + SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); /* Effects, save only when needed: */ /* FIXME: XP seems to use grayed checkboxes to reflect differences between menu and tooltips settings diff --git a/dll/cpl/desk/theme.h b/dll/cpl/desk/theme.h index 3641f0794f8..7c72c98193a 100644 --- a/dll/cpl/desk/theme.h +++ b/dll/cpl/desk/theme.h @@ -64,7 +64,7 @@ typedef struct { COLORREF crColor[NUM_COLORS]; LOGFONT lfFont[NUM_FONTS]; - UINT64 Size[NUM_SIZES]; + INT Size[NUM_SIZES]; BOOL bFlatMenus; EFFECTS Effects; } THEME; diff --git a/dll/cpl/hdwwiz/lang/pl-PL.rc b/dll/cpl/hdwwiz/lang/pl-PL.rc index 524f69867f3..418beb6f93a 100644 --- a/dll/cpl/hdwwiz/lang/pl-PL.rc +++ b/dll/cpl/hdwwiz/lang/pl-PL.rc @@ -1,27 +1,29 @@ /* -* translated by niski -* bjauy@o2.pl -* https://sourceforge.net/projects/reactospl -*/ + * translated by niski + * bjauy@o2.pl + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Witamy w Kreatorze dodawania sprztu", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT "Ten kreator pomoe Ci:", -1, 114, 40, 182, 8 - LTEXT "1) Zainstalowa oprogramowanie do obsugi urzdzenia dodanego do Twojego komputera.", -1, 121, 56, 184, 16 - LTEXT "2) Rozwiza problemy sprztowe.", -1, 121, 78, 185, 16 + LTEXT "Witamy w Kreatorze dodawania sprzętu", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Ten kreator pomoże Ci:", -1, 114, 40, 182, 8 + LTEXT "1) Zainstalować oprogramowanie do obsługi urządzenia dodanego do Twojego komputera.", -1, 121, 56, 184, 16 + LTEXT "2) Rozwiązać problemy sprzętowe.", -1, 121, 78, 185, 16 ICON IDI_WARNINGICON, IDC_WARNINGICON, 124, 109, 20, 20 - LTEXT "Jeli do urzdzenia doczona zostaa instalacyjna pyta CD, zaleca si kliknicie przycisku Anuluj w celu zamknicia tego kreatora i uycie pyty CD producenta do zainstalowania tego urzdzenia.", 503, 150, 106, 155, 50 - LTEXT "Aby kontynuowa, kliknij Dalej.", -1, 114, 166, 193, 8 + LTEXT "Jeśli do urządzenia dołączona został nośnik z oprogramowaniem producenta, zaleca się kliknięcie przycisku Anuluj w celu zamknięcia tego kreatora i użycie oprogramowania producenta do zainstalowania tego urządzenia.", 503, 150, 106, 155, 50 + LTEXT "Aby kontynuować, kliknij Dalej.", -1, 114, 166, 193, 8 END IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 8, 275, 32 @@ -30,63 +32,63 @@ END IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Czy urzdzenie zostao ju podczone do komputera?", -1, 20, 11, 275, 8 - AUTORADIOBUTTON "&Tak, urzdzenie zostao ju podczone", IDC_CONNECTED, 29, 23, 266, 8, WS_GROUP - AUTORADIOBUTTON "&Nie, urzdzenie nie zostao jeszcze podczone", IDC_NOTCONNECTED, 29, 35, 266, 8 + LTEXT "Czy urządzenie zostało już podłączone do komputera?", -1, 20, 11, 275, 8 + AUTORADIOBUTTON "&Tak, urządzenie zostało już podłaczone", IDC_CONNECTED, 29, 23, 266, 8, WS_GROUP + AUTORADIOBUTTON "&Nie, urządzenie nie zostało jeszcze podłączone", IDC_NOTCONNECTED, 29, 35, 266, 8 END IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz z poniszej listy zainstalowane urzdzenie, nastpnie kliknij Dalej, aby sprawdzi jego waciwoci lub rozwiza ewentualny problem.", -1, 21, 8, 275, 22 - LTEXT "Aby doda urzdzenie, ktrego nie ma na licie, kliknij przycisk ""Dodaj nowe urzdzenie""", -1, 21, 32, 275, 24 - LTEXT "&Zainstalowane urzdzenia:", -1, 21, 62, 140, 8 + LTEXT "Wybierz z poniższej listy zainstalowane urządzenie, następnie kliknij Dalej, aby sprawdzić jego właściwości lub rozwiązać ewentualny problem.", -1, 21, 8, 275, 22 + LTEXT "Aby dodać urządzenie, którego nie ma na liście, kliknij przycisk ""Dodaj nowe urządzenie""", -1, 21, 32, 275, 24 + LTEXT "&Zainstalowane urządzenia:", -1, 21, 62, 140, 8 CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Kreator moe wyszuka inne urzdzenie i zainstalowa je automatycznie. Moesz take wybra urzdzenie z listy, jeli wiesz dokadnie, jaki model urzdzenia chcesz zainstalowa.", -1, 21, 8, 280, 24 - LTEXT "Co chcesz, aby zrobi kreator?", -1, 23, 40, 275, 8 - AUTORADIOBUTTON "Wy&szukaj i zainstaluj nowe urzdzenie automatycznie (zalecane)", IDC_AUTOINSTALL, 30, 55, 266, 8, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "&Zainstaluj urzdzenie, ktre wybior rcznie z listy (zaawansowane)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP + LTEXT "Kreator może wyszukać inne urządzenie i zainstalować je automatycznie. Możesz także wybrać urządzenie z listy, jeśli wiesz dokładnie, jaki model urządzenia chcesz zainstalować.", -1, 21, 8, 280, 24 + LTEXT "Co chcesz, aby zrobił kreator?", -1, 23, 40, 275, 8 + AUTORADIOBUTTON "Wy&szukaj i zainstaluj nowe urządzenie automatycznie (zalecane)", IDC_AUTOINSTALL, 30, 55, 266, 8, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Zainstaluj urządzenie, które wybiorę ręcznie z listy (zaawansowane)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 9, 275, 40 - LTEXT "Wykryte urzdzenia:", IDC_DETECTEDHWTEXT, 21, 53, 176, 8 + LTEXT "Wykryte urządzenia:", IDC_DETECTEDHWTEXT, 21, 53, 176, 8 CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Jeli nie widzisz odpowiedniej kategorii urzdze kliknij przycisk Poka wszystkie urzdzenia.", IDC_STATUSTEXT, 21, 9, 275, 18 - LTEXT "&Popularne typy urzdze:", IDC_HWTYPESTEXT, 21, 31, 180, 8 + LTEXT "Jeśli nie widzisz odpowiedniej kategorii urządzenia kliknij przycisk Pokaż wszystkie urządzenia.", IDC_STATUSTEXT, 21, 9, 275, 18 + LTEXT "&Popularne typy urządzeń:", IDC_HWTYPESTEXT, 21, 31, 180, 8 CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wyszukiwanie nowych urzdze moe zaj kilka minut.", -1, 21, 8, 275, 15 - LTEXT "Postp cakowity:", IDC_TPROGRESSTEXT, 21, 25, 275, 8 + LTEXT "Wyszukiwanie nowych urządzeń może zająć kilka minut.", -1, 21, 8, 275, 15 + LTEXT "Postęp całkowity:", IDC_TPROGRESSTEXT, 21, 25, 275, 8 CONTROL "", IDC_TPROGRESSBAR, "msctls_progress32", 0, 21, 37, 275, 14 LTEXT "", IDC_PROGRESSTEXT, 58, 58, 200, 8, SS_NOPREFIX CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 @@ -94,59 +96,59 @@ END IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Koczenie pracy Kreatora dodawania sprztu", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT "Pomylnie zakoczono prac Kreatora dodawania sprztu.", -1, 114, 32, 193, 19 + LTEXT "Kończenie pracy Kreatora dodawania sprzętu", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Pomyślnie zakończono pracę Kreatora dodawania sprzętu.", -1, 114, 32, 193, 19 LTEXT "", IDC_STATUSTEXT, 114, 70, 193, 92 - LTEXT "Aby zamkn kreatora, kliknij Zakocz", -1, 114, 166, 132, 8 + LTEXT "Aby zamknąć kreatora, kliknij Zakończ", -1, 114, 166, 132, 8 END IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Koczenie pracy Kreatora dodawania sprztu", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT "Kreator znalaz nastpujce urzdzenia podczone do tego komputera:", -1, 114, 32, 193, 19 - LTEXT "Aby zamkn kreatora, kliknij Zakocz", -1, 114, 166, 132, 8 + LTEXT "Kończenie pracy Kreatora dodawania sprzętu", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Kreator znalazł następujące urządzenia podłączone do tego komputera:", -1, 114, 32, 193, 19 + LTEXT "Aby zamknąć kreatora, kliknij Zakończ", -1, 114, 166, 132, 8 CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Koczenie pracy Kreatora dodawania sprztu", IDC_FINISHTITLE, 114, 8, 195, 28 - LTEXT "Oto aktualny stan wybranego urzdzenia:", -1, 114, 40, 193, 19 + LTEXT "Kończenie pracy Kreatora dodawania sprzętu", IDC_FINISHTITLE, 114, 8, 195, 28 + LTEXT "Oto aktualny stan wybranego urządzenia:", -1, 114, 40, 193, 19 EDITTEXT IDC_HWSTATUSEDIT, 114, 60, 193, 70, ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "Aby uruchomi modu rozwizywania problemw, ktry moe pomc Ci rozwiza ewentualne problemy z urzdzeniem, kliknij Zakocz.", -1, 114, 136, 193, 16 - LTEXT "Aby zamkn kreatora, kliknij przycisk Anuluj", IDC_STATUSTEXT, 114, 166, 132, 8 + LTEXT "Aby uruchomić moduł rozwiązywania problemów, który może pomóc Ci rozwiązać ewentualne problemy z urządzeniem, kliknij Zakończ.", -1, 114, 136, 193, 16 + LTEXT "Aby zamknąć kreatora, kliknij przycisk Anuluj", IDC_STATUSTEXT, 114, 166, 132, 8 END IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Kreator dodawania sprztu" +CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Nie mona kontynuowa pracy Kreatora dodawania sprztu", IDC_FINISHTITLE, 114, 8, 203, 28 - LTEXT "Aby kontynuowa, podcz nowe urzdzenie do komputera.", -1, 114, 40, 193, 16 - AUTOCHECKBOX "&Wycz komputer po klikniciu przycisku Zakocz, aby mona byo otworzy komputer i podczy urzdzenie.", IDC_TURNOFFCHECKBOX, 114, 64, 203, 20, BS_TOP | BS_MULTILINE - LTEXT "W wikszoci przypadkw ReactOS automatycznie zainstaluje urzdzenie po jego podczeniu. Jeli ReactOS nie odnajdzie urzdzenia, uruchom ponownie tego kreatora w celu zainstalowania oprogramowania do obsugi urzdzenia.", -1, 114, 98, 193, 32 - LTEXT "Aby zamkn kreatora, kliknij Zakocz.", IDC_STATUSTEXT, 114, 166, 193, 8 + LTEXT "Nie można kontynuować pracy Kreatora dodawania sprzętu", IDC_FINISHTITLE, 114, 8, 203, 28 + LTEXT "Aby kontynuować, podłącz nowe urządzenie do komputera.", -1, 114, 40, 193, 16 + AUTOCHECKBOX "&Wyłącz komputer po kliknięciu przycisku Zakończ, aby można było otworzyć komputer i podłączyć urządzenie.", IDC_TURNOFFCHECKBOX, 114, 64, 203, 20, BS_TOP | BS_MULTILINE + LTEXT "W większości przypadków ReactOS automatycznie zainstaluje urządzenie po jego podłączeniu. Jeśli ReactOS nie odnajdzie urządzenia, uruchom ponownie tego kreatora w celu zainstalowania oprogramowania do obsługi urządzenia.", -1, 114, 98, 193, 32 + LTEXT "Aby zamknąć kreatora, kliknij Zakończ.", IDC_STATUSTEXT, 114, 166, 193, 8 END STRINGTABLE BEGIN - IDS_CPLNAME "Dodaj sprzt" - IDS_CPLDESCRIPTION "Dodaje sprzt do Twojego komputera." + IDS_CPLNAME "Dodaj sprzęt" + IDS_CPLDESCRIPTION "Dodaje sprzęt do Twojego komputera." IDS_SEARCHTITLE "Czekaj, kreator przeprowadza wyszukiwanie..." - IDS_SEARCHTEXT "Ten kreator wyszukuje urzdzenia, ktre zostay ostatnio podczone do tego komputera, ale jeszcze nie zostay zainstalowane." - IDS_ISCONNECTED "Czy urzdzenie zostao ju podczone do komputera?" - IDS_PROBELISTTITLE "Ponisze urzdzenia s ju zainstalowane na tym komputerze" - IDS_ADDNEWDEVICE "Dodaj nowe urzdzenie sprztowe" - IDS_SELECTWAYTITLE "Kreator moe pomc Tobie zainstalowa inne urzdzenie" - IDS_HDTYPESTITLE "Wybierz z poniszej listy typ urzdzenia, ktre chcesz zainstalowa" + IDS_SEARCHTEXT "Ten kreator wyszukuje urządzenia, które zostały ostatnio podłączone do tego komputera, ale jeszcze nie zostały zainstalowane." + IDS_ISCONNECTED "Czy urządzenie zostało już podłączone do komputera?" + IDS_PROBELISTTITLE "Poniższe urządzenia są już zainstalowane na tym komputerze" + IDS_ADDNEWDEVICE "Dodaj nowe urządzenie sprzętowe" + IDS_SELECTWAYTITLE "Kreator może pomóc Tobie zainstalować inne urządzenie" + IDS_HDTYPESTITLE "Wybierz z poniższej listy typ urządzenia, które chcesz zainstalować" END diff --git a/dll/cpl/hdwwiz/lang/ro-RO.rc b/dll/cpl/hdwwiz/lang/ro-RO.rc index 341abd7de54..7248988f99d 100644 --- a/dll/cpl/hdwwiz/lang/ro-RO.rc +++ b/dll/cpl/hdwwiz/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Expertul de adăugare hardware" @@ -147,5 +145,3 @@ BEGIN IDS_SELECTWAYTITLE "Acest Expert vă poate ajuta să instalați alt hardware" IDS_HDTYPESTITLE "Din lista de mai jos, alegeți dispozitivul pe care vreți să îl instalați." END - -#pragma code_page(default) diff --git a/dll/cpl/hdwwiz/lang/ru-RU.rc b/dll/cpl/hdwwiz/lang/ru-RU.rc index 3b263565bb6..d9dfc0ef285 100644 --- a/dll/cpl/hdwwiz/lang/ru-RU.rc +++ b/dll/cpl/hdwwiz/lang/ru-RU.rc @@ -2,21 +2,21 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT " :", -1, 114, 40, 182, 8 - LTEXT "1) ", -1, 121, 56, 184, 16 - LTEXT "2) ", -1, 121, 78, 185, 16 + LTEXT "Мастер установки оборудования", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Этот мастер помогает:", -1, 114, 40, 182, 8 + LTEXT "1) Устанавливать драйверы для нового оборудования на вашем компьютере", -1, 121, 56, 184, 16 + LTEXT "2) Проводить диагностику неполадок имеющегося оборудования", -1, 121, 78, 185, 16 ICON IDI_WARNINGICON, IDC_WARNINGICON, 124, 109, 20, 20 - LTEXT " , """" .", 503, 150, 106, 155, 50 - LTEXT " """".", -1, 114, 166, 193, 8 + LTEXT "Если к устройству прилагается установочный диск, рекомендуется нажать кнопку ""Отмена"" для закрытия этого мастера и воспользоваться диском изготовителя для установки этого устройства.", 503, 150, 106, 155, 50 + LTEXT "Для продолжения нажмите кнопку ""Далее"".", -1, 114, 166, 193, 8 END IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 8, 275, 32 @@ -25,63 +25,63 @@ END IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ?", -1, 20, 11, 275, 8 - AUTORADIOBUTTON "&, ", IDC_CONNECTED, 29, 23, 266, 8, WS_GROUP - AUTORADIOBUTTON "&, ", IDC_NOTCONNECTED, 29, 35, 266, 8 + LTEXT "Было ли это устройство уже подключено к компьютеру?", -1, 20, 11, 275, 8 + AUTORADIOBUTTON "Д&а, устройство уже подключено", IDC_CONNECTED, 29, 23, 266, 8, WS_GROUP + AUTORADIOBUTTON "Н&ет, это устройство еще не подключено", IDC_NOTCONNECTED, 29, 35, 266, 8 END IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " """", .", -1, 21, 8, 275, 22 - LTEXT " , , "" "".", -1, 21, 32, 275, 24 - LTEXT "& :", -1, 21, 62, 140, 8 + LTEXT "Выберите устройство из списка и нажмите кнопку ""Далее"", чтобы проверить его свойства или выполнить диагностику неполадок.", -1, 21, 8, 275, 22 + LTEXT "Чтобы добавить новое устройство, отсутствующее в этом списке, щелкните элемент ""Добавление нового устройства"".", -1, 21, 32, 275, 24 + LTEXT "&Установленное оборудование:", -1, 21, 62, 140, 8 CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . , , .", -1, 21, 8, 280, 24 - LTEXT " , .", -1, 23, 40, 275, 8 - AUTORADIOBUTTON "& ()", IDC_AUTOINSTALL, 30, 55, 266, 8, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& , ", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP + LTEXT "Мастер может выполнить поиск нового оборудования и установить его автоматически. Если же вы точно знаете изготовителя и модель оборудования, которое нужно установить, вы можете выбрать его из списка вручную.", -1, 21, 8, 280, 24 + LTEXT "Выберите действие, которое следует выполнить.", -1, 23, 40, 275, 8 + AUTORADIOBUTTON "&Поиск и автоматическая установка оборудования (рекомендуется)", IDC_AUTOINSTALL, 30, 55, 266, 8, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Установка оборудования, выбранного из списка вручную", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 9, 275, 40 - LTEXT " :", IDC_DETECTEDHWTEXT, 21, 53, 176, 8 + LTEXT "Обнаруженные устройства:", IDC_DETECTEDHWTEXT, 21, 53, 176, 8 CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , "" "".", IDC_STATUSTEXT, 21, 9, 275, 18 - LTEXT "& :", IDC_HWTYPESTEXT, 21, 31, 180, 8 + LTEXT "Если нужный вам тип оборудования отсутствует, щелкните элемент списка ""Показать все устройства"".", IDC_STATUSTEXT, 21, 9, 275, 18 + LTEXT "&Стандартные типы оборудования:", IDC_HWTYPESTEXT, 21, 31, 180, 8 CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", -1, 21, 8, 275, 15 - LTEXT " :", IDC_TPROGRESSTEXT, 21, 25, 275, 8 + LTEXT "Процесс поиска оборудования может занять несколько минут.", -1, 21, 8, 275, 15 + LTEXT "Общий индикатор выполнения:", IDC_TPROGRESSTEXT, 21, 25, 275, 8 CONTROL "", IDC_TPROGRESSBAR, "msctls_progress32", 0, 21, 37, 275, 14 LTEXT "", IDC_PROGRESSTEXT, 58, 58, 200, 8, SS_NOPREFIX CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 @@ -89,59 +89,59 @@ END IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT " .", -1, 114, 32, 193, 19 + LTEXT "Мастер установки оборудования", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Работа мастера установки оборудования успешно завершена.", -1, 114, 32, 193, 19 LTEXT "", IDC_STATUSTEXT, 114, 70, 193, 92 - LTEXT " """".", -1, 114, 166, 190, 8 + LTEXT "Для закрытия мастера нажмите кнопку ""Готово"".", -1, 114, 166, 190, 8 END IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT " , :", -1, 114, 32, 193, 19 - LTEXT " """".", -1, 114, 166, 190, 8 + LTEXT "Мастер установки оборудования", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Мастер обнаружил следующее оборудование, подключенное к этому компьютеру:", -1, 114, 32, 193, 19 + LTEXT "Для закрытия мастера нажмите кнопку ""Готово"".", -1, 114, 166, 190, 8 CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 195, 28 - LTEXT " :", -1, 114, 40, 193, 19 + LTEXT "Мастер установки оборудования", IDC_FINISHTITLE, 114, 8, 195, 28 + LTEXT "Текущее состояние выбранного оборудования:", -1, 114, 40, 193, 19 EDITTEXT IDC_HWSTATUSEDIT, 114, 60, 193, 70, ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " """".", -1, 114, 136, 193, 16 - LTEXT " """".", IDC_STATUSTEXT, 114, 158, 192, 19 + LTEXT "Для запуска диагностики и получения помощи в устранении неполадок нажмите кнопку ""Готово"".", -1, 114, 136, 193, 16 + LTEXT "Для прекращения работы мастера нажмите кнопку ""Отмена"".", IDC_STATUSTEXT, 114, 158, 192, 19 END IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 28 - LTEXT " , .", -1, 114, 40, 193, 16 - AUTOCHECKBOX "& """", .", IDC_TURNOFFCHECKBOX, 114, 64, 203, 30, BS_TOP | BS_MULTILINE - LTEXT " ReactOS . ReactOS , .", -1, 114, 98, 193, 44 - LTEXT " """".", IDC_STATUSTEXT, 114, 166, 193, 8 + LTEXT "Мастер установки оборудования", IDC_FINISHTITLE, 114, 8, 203, 28 + LTEXT "Чтобы продолжить, подключите это устройство к компьютеру.", -1, 114, 40, 193, 16 + AUTOCHECKBOX "&Отключить компьютер после нажатия кнопки ""Готово"", чтобы можно было открыть корпус и подключить устройство.", IDC_TURNOFFCHECKBOX, 114, 64, 203, 30, BS_TOP | BS_MULTILINE + LTEXT "В большинстве случаев ReactOS автоматически установит новое оборудование после его подключения. Если ReactOS не обнаружит его, надо будет вновь запустить этот мастер для установки программной поддержки.", -1, 114, 98, 193, 44 + LTEXT "Для закрытия мастера нажмите кнопку ""Готово"".", IDC_STATUSTEXT, 114, 166, 193, 8 END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " " - IDS_SEARCHTITLE ", ..." - IDS_SEARCHTEXT " , , ." - IDS_ISCONNECTED " ?" - IDS_PROBELISTTITLE " " - IDS_ADDNEWDEVICE " " - IDS_SELECTWAYTITLE " " - IDS_HDTYPESTITLE " ." + IDS_CPLNAME "Установка оборудования" + IDS_CPLDESCRIPTION "Установка оборудования в компьютер" + IDS_SEARCHTITLE "Подождите, выполняется поиск..." + IDS_SEARCHTEXT "Этот мастер выполняет поиск оборудования, которое недавно было подключено к компьютеру, но еще не было установлено." + IDS_ISCONNECTED "Подключено ли устройство?" + IDS_PROBELISTTITLE "На этом компьютере уже установлено следующее оборудование" + IDS_ADDNEWDEVICE "Добавление нового устройства" + IDS_SELECTWAYTITLE "Этот мастер помогает установить новое оборудование" + IDS_HDTYPESTITLE "Выберите тип устанавливаемого оборудования из списка." END diff --git a/dll/cpl/hdwwiz/lang/uk-UA.rc b/dll/cpl/hdwwiz/lang/uk-UA.rc index 53e8e594504..e2129e039fb 100644 --- a/dll/cpl/hdwwiz/lang/uk-UA.rc +++ b/dll/cpl/hdwwiz/lang/uk-UA.rc @@ -10,21 +10,21 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT " :", -1, 114, 40, 182, 8 - LTEXT "1) '.", -1, 121, 56, 184, 16 - LTEXT "2) .", -1, 121, 78, 185, 16 + LTEXT "Вас вітає майстер встановлення обладнання", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Цей майстер допомагає:", -1, 114, 40, 182, 8 + LTEXT "1) Встановлювати драйвери для нових пристроїв вашого комп'ютера.", -1, 121, 56, 184, 16 + LTEXT "2) Проводити діагностику неполадок наявного обладнання.", -1, 121, 78, 185, 16 ICON IDI_WARNINGICON, IDC_WARNINGICON, 124, 109, 20, 20 - LTEXT " , """" .", 503, 150, 106, 155, 50 - LTEXT " """".", -1, 114, 166, 193, 8 + LTEXT "Якщо до пристрою додається установочний диск, рекомендується натиснути кнопку ""Скасувати"" для закриття цього майстра та використати диск від виробника для встановлення цього пристрою.", 503, 150, 106, 155, 50 + LTEXT "Для продовження натисніть кнопку ""Далі"".", -1, 114, 166, 193, 8 END IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 8, 275, 32 @@ -33,63 +33,63 @@ END IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' '?", -1, 20, 11, 275, 8 - AUTORADIOBUTTON "&, '", IDC_CONNECTED, 29, 23, 266, 8, WS_GROUP - AUTORADIOBUTTON "&ͳ, '", IDC_NOTCONNECTED, 29, 35, 266, 8 + LTEXT "Цей пристрій вже під'єднано до комп'ютера?", -1, 20, 11, 275, 8 + AUTORADIOBUTTON "&Так, пристрій вже під'єднано", IDC_CONNECTED, 29, 23, 266, 8, WS_GROUP + AUTORADIOBUTTON "&Ні, цей пристрій ще не під'єднано", IDC_NOTCONNECTED, 29, 35, 266, 8 END IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " """" .", -1, 21, 8, 275, 22 - LTEXT " , , "" "".", -1, 21, 32, 275, 24 - LTEXT "& :", -1, 21, 62, 140, 8 + LTEXT "Виберіть пристрій зі списку та натисніть кнопку ""Далі"" для перевірки його властивостей чи виконання діагностики неполадок.", -1, 21, 8, 275, 22 + LTEXT "Щоб додати пристрій, відсутній в цьому списку, натисніть ""Додати новий пристрій"".", -1, 21, 32, 275, 24 + LTEXT "В&становлене обладнання:", -1, 21, 62, 140, 8 CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . , , .", -1, 21, 8, 280, 24 - LTEXT " , ", -1, 23, 40, 275, 8 - AUTORADIOBUTTON "& ()", IDC_AUTOINSTALL, 30, 55, 266, 8, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON " , &", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP + LTEXT "Майстер може виконати пошук іншого обладнання та встановити його автоматично. Якщо ж ви точно знаєте виробника та модель обладнання, яке треба встановити, ви можете вибрати його зі списку вручну.", -1, 21, 8, 280, 24 + LTEXT "Виберіть дію, яку треба виконати", -1, 23, 40, 275, 8 + AUTORADIOBUTTON "&Пошук і автоматичне встановлення обладнання (Рекомендовано)", IDC_AUTOINSTALL, 30, 55, 266, 8, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "Встановлення обладнання, що вибрано зі спику в&ручну", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_STATUSTEXT, 21, 9, 275, 40 - LTEXT " :", IDC_DETECTEDHWTEXT, 21, 53, 176, 8 + LTEXT "Знайдені пристрої:", IDC_DETECTEDHWTEXT, 21, 53, 176, 8 CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , "" "".", IDC_STATUSTEXT, 21, 9, 275, 18 - LTEXT "& :", IDC_HWTYPESTEXT, 21, 31, 180, 8 + LTEXT "Якщо потрібний вам тип обладнання відсутній, натисніть елемент списку ""Показати всі пристрої"".", IDC_STATUSTEXT, 21, 9, 275, 18 + LTEXT "&Стандартні типи обладнання:", IDC_HWTYPESTEXT, 21, 31, 180, 8 CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", -1, 21, 8, 275, 15 - LTEXT " :", IDC_TPROGRESSTEXT, 21, 25, 275, 8 + LTEXT "Процес пошуку обладнання може зайняти декілька хвилин.", -1, 21, 8, 275, 15 + LTEXT "Загальний індикатор виконання:", IDC_TPROGRESSTEXT, 21, 25, 275, 8 CONTROL "", IDC_TPROGRESSBAR, "msctls_progress32", 0, 21, 37, 275, 14 LTEXT "", IDC_PROGRESSTEXT, 58, 58, 200, 8, SS_NOPREFIX CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 @@ -97,59 +97,59 @@ END IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT " .", -1, 114, 32, 193, 19 + LTEXT "Завершення роботи майстра встановлення обладнання", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Робота майстра встановлення обладнання успішно завершена.", -1, 114, 32, 193, 19 LTEXT "", IDC_STATUSTEXT, 114, 70, 193, 92 - LTEXT " """".", -1, 114, 166, 132, 8 + LTEXT "Для закриття майстра натисніть кнопку ""Завершити"".", -1, 114, 166, 132, 8 END IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 24 - LTEXT " , ' ':", -1, 114, 32, 193, 19 - LTEXT " """".", -1, 114, 166, 132, 8 + LTEXT "Завершення роботи майстра встановлення обладнання", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "Майстер знайшов наступне обладнання, під'єднане до цього комп'ютера:", -1, 114, 32, 193, 19 + LTEXT "Для закриття майстра натисніть кнопку ""Завершити"".", -1, 114, 166, 132, 8 CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 195, 28 - LTEXT " :", -1, 114, 40, 193, 19 + LTEXT "Завершення роботи майстра встановлення обладнання", IDC_FINISHTITLE, 114, 8, 195, 28 + LTEXT "Поточний стан вибраного пристрою:", -1, 114, 40, 193, 19 EDITTEXT IDC_HWSTATUSEDIT, 114, 60, 193, 70, ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " """".", -1, 114, 136, 193, 16 - LTEXT " """".", IDC_STATUSTEXT, 114, 166, 170, 16 + LTEXT "Для запуску діагностики та отримання допомоги щодо усунення неполадок натисніть ""Завршити"".", -1, 114, 136, 193, 16 + LTEXT "Для припинення роботи майстра натисніть кнопку ""Скасувати"".", IDC_STATUSTEXT, 114, 166, 170, 16 END IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_FINISHTITLE, 114, 8, 203, 28 - LTEXT " ' '.", -1, 114, 40, 193, 16 - AUTOCHECKBOX "& ' """" ' ' .", IDC_TURNOFFCHECKBOX, 114, 64, 203, 25, BS_TOP | BS_MULTILINE - LTEXT " ReactOS '. ReactOS , .", -1, 114, 98, 193, 32 - LTEXT " """".", IDC_STATUSTEXT, 114, 166, 193, 8 + LTEXT "Майстер встановлення обладнання не може продовжити роботу", IDC_FINISHTITLE, 114, 8, 203, 28 + LTEXT "Для продовження під'єднайте цей пристрій до комп'ютера.", -1, 114, 40, 193, 16 + AUTOCHECKBOX "&Вимкнути комп'ютер після натиснення кнопки ""Завершити"" щоб можна було відкрити комп'ютер та під'єднати пристрій.", IDC_TURNOFFCHECKBOX, 114, 64, 203, 25, BS_TOP | BS_MULTILINE + LTEXT "В більшості випадків ReactOS автоматично встановить нове обладнання після його під'єднання. Якщо ReactOS його не знайде, запустіть цього майстра знов для встановлення програмної підтримки.", -1, 114, 98, 193, 32 + LTEXT "Для закриття майстра натисніть кпопку ""Завершити"".", IDC_STATUSTEXT, 114, 166, 193, 8 END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " '." - IDS_SEARCHTITLE ", ..." - IDS_SEARCHTEXT " , ' ', ." - IDS_ISCONNECTED " '?" - IDS_PROBELISTTITLE " ' " - IDS_ADDNEWDEVICE " " - IDS_SELECTWAYTITLE " " - IDS_HDTYPESTITLE " " + IDS_CPLNAME "Додати обладнання" + IDS_CPLDESCRIPTION "Встановлення обладнання в вашому комп'ютері." + IDS_SEARCHTITLE "Зачекайте, виконується пошук..." + IDS_SEARCHTEXT "Цей майстер виконує пошук обладнання, яке недавно було під'єднано до комп'ютера, але ще не було встановлене." + IDS_ISCONNECTED "Пристрій під'єднаний?" + IDS_PROBELISTTITLE "На цьому комп'ютері вже встановлене наступне обладнання" + IDS_ADDNEWDEVICE "Додати новий пристрій" + IDS_SELECTWAYTITLE "Цей майстер допоможе встановити інше обладнання" + IDS_HDTYPESTITLE "Виберіть тип встановлюваного обладнання зі списку" END diff --git a/dll/cpl/hdwwiz/rsrc.rc b/dll/cpl/hdwwiz/rsrc.rc index cde584da6b4..6c45d5f2c0d 100644 --- a/dll/cpl/hdwwiz/rsrc.rc +++ b/dll/cpl/hdwwiz/rsrc.rc @@ -14,11 +14,14 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/th-TH.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/dll/cpl/inetcpl/CMakeLists.txt b/dll/cpl/inetcpl/CMakeLists.txt new file mode 100644 index 00000000000..df363f2f93d --- /dev/null +++ b/dll/cpl/inetcpl/CMakeLists.txt @@ -0,0 +1,41 @@ + +set_unicode() +set_rc_compiler() + +include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine) + +spec2def(inetcpl.cpl inetcpl.spec) + +list(APPEND SOURCE + inetcpl.c + content.c + general.c + security.c + inetcpl.rc + ${CMAKE_CURRENT_BINARY_DIR}/inetcpl_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/inetcpl.def) + +add_library(inetcpl SHARED ${SOURCE}) + +set_module_type(inetcpl cpl) + +target_link_libraries(inetcpl wine) + +add_importlibs(inetcpl + advapi32 + comctl32 + user32 + gdi32 + shlwapi + msvcrt + kernel32 + ntdll) + +add_delay_importlibs(inetcpl + cryptui + wininet + ole32 + urlmon) + +add_cd_file(TARGET inetcpl DESTINATION reactos/system32 FOR all) + diff --git a/dll/cpl/inetcpl/content.c b/dll/cpl/inetcpl/content.c new file mode 100644 index 00000000000..8fb1729308e --- /dev/null +++ b/dll/cpl/inetcpl/content.c @@ -0,0 +1,99 @@ +/* + * Internet control panel applet: content propsheet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#define NONAMELESSUNION + +#include +#include +#include +#include +#include + +#include "inetcpl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); + +/********************************************************************* + * display_cert_manager (internal) + * + * call cryptui to display a specific certificate manager dialog + * + */ +static BOOL display_cert_manager(HWND parent, DWORD flags) +{ + CRYPTUI_CERT_MGR_STRUCT dlg; + + TRACE("(%p, 0x%x)\n", parent, flags); + + ZeroMemory(&dlg, sizeof(CRYPTUI_CERT_MGR_STRUCT)); + dlg.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); + dlg.hwndParent = parent; + dlg.dwFlags = flags; + + return CryptUIDlgCertMgr(&dlg); +} + +/********************************************************************* + * LaunchSiteCertDialog (inetcpl.@) + * + * Launch a dialog to manage personal certificates + * + * PARAMS + * parent [I] Handle for the parent window + * + * RETURNS + * Failure: FALSE + * Success: TRUE + * + * NOTES + * rundll32 callable function: rundll32 inetcpl.cpl,LaunchSiteCertDialog + * + */ +BOOL WINAPI LaunchSiteCertDialog(HWND parent) +{ + return display_cert_manager(parent, 0); +} + +/********************************************************************* + * content_dlgproc [internal] + * + */ +INT_PTR CALLBACK content_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + if ((msg != WM_SETCURSOR) && (msg != WM_NCHITTEST) && (msg != WM_MOUSEMOVE)) + TRACE("(%p, 0x%08x/%d, 0x%lx, 0x%lx)\n", hwnd, msg, msg, wparam, lparam); + + if (msg == WM_COMMAND) + { + switch (LOWORD(wparam)) + { + case IDC_CERT: + display_cert_manager(hwnd, 0); + break; + + case IDC_CERT_PUBLISHER: + display_cert_manager(hwnd, CRYPTUI_CERT_MGR_PUBLISHER_TAB); + break; + } + } + return FALSE; +} diff --git a/dll/cpl/inetcpl/general.c b/dll/cpl/inetcpl/general.c new file mode 100644 index 00000000000..1d8f027e042 --- /dev/null +++ b/dll/cpl/inetcpl/general.c @@ -0,0 +1,297 @@ +/* + * Internet control panel applet: general propsheet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#define NONAMELESSUNION + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "inetcpl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); + +static const WCHAR about_blank[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; +static const WCHAR start_page[] = {'S','t','a','r','t',' ','P','a','g','e',0}; +static const WCHAR reg_ie_main[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\', + 'M','a','i','n',0}; + +/* list of unimplemented buttons */ +static DWORD disabled_general_buttons[] = {IDC_HOME_CURRENT, + IDC_HOME_DEFAULT, + IDC_HISTORY_SETTINGS, + 0}; +static DWORD disabled_delhist_buttons[] = {IDC_DELETE_COOKIES, + IDC_DELETE_HISTORY, + IDC_DELETE_FORM_DATA, + IDC_DELETE_PASSWORDS, + 0}; + +/********************************************************************* + * delhist_on_command [internal] + * + * handle WM_COMMAND in Delete browsing history dialog + * + */ +static INT_PTR delhist_on_command(HWND hdlg, WPARAM wparam) +{ + switch (wparam) + { + case MAKEWPARAM(IDOK, BN_CLICKED): + if (!FreeUrlCacheSpaceW(NULL, 100, FCS_PERCENT_CACHE_SPACE)) + break; /* Don't close the dialog. */ + EndDialog(hdlg, IDOK); + return TRUE; + + case MAKEWPARAM(IDCANCEL, BN_CLICKED): + EndDialog(hdlg, IDCANCEL); + return TRUE; + + case MAKEWPARAM(IDC_DELETE_TEMP_FILES, BN_CLICKED): + case MAKEWPARAM(IDC_DELETE_COOKIES, BN_CLICKED): + case MAKEWPARAM(IDC_DELETE_HISTORY, BN_CLICKED): + case MAKEWPARAM(IDC_DELETE_FORM_DATA, BN_CLICKED): + case MAKEWPARAM(IDC_DELETE_PASSWORDS, BN_CLICKED): + { + BOOL any = IsDlgButtonChecked(hdlg, IDC_DELETE_TEMP_FILES) || + IsDlgButtonChecked(hdlg, IDC_DELETE_COOKIES) || + IsDlgButtonChecked(hdlg, IDC_DELETE_HISTORY) || + IsDlgButtonChecked(hdlg, IDC_DELETE_FORM_DATA) || + IsDlgButtonChecked(hdlg, IDC_DELETE_PASSWORDS); + EnableWindow(GetDlgItem(hdlg, IDOK), any); + break; + } + + default: + break; + } + return FALSE; +} + + +/********************************************************************* + * delhist_dlgproc [internal] + * + * Delete browsing history dialog procedure + * + */ +static INT_PTR CALLBACK delhist_dlgproc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) +{ + switch (msg) + { + case WM_COMMAND: + return delhist_on_command(hdlg, wparam); + + case WM_INITDIALOG: + { + DWORD *ptr = disabled_delhist_buttons; + while (*ptr) + { + EnableWindow(GetDlgItem(hdlg, *ptr), FALSE); + ptr++; + } + CheckDlgButton(hdlg, IDC_DELETE_TEMP_FILES, BST_CHECKED); + break; + } + + default: + break; + } + return FALSE; +} + +/********************************************************************* + * parse_url_from_outside [internal] + * + * Filter an URL, add a usable scheme, when needed + * + */ +static DWORD parse_url_from_outside(LPCWSTR url, LPWSTR out, DWORD maxlen) +{ + HMODULE hdll; + DWORD (WINAPI *pParseURLFromOutsideSourceW)(LPCWSTR, LPWSTR, LPDWORD, LPDWORD); + DWORD res; + + hdll = LoadLibraryA("shdocvw.dll"); + pParseURLFromOutsideSourceW = (void *) GetProcAddress(hdll, (LPSTR) 170); + + if (pParseURLFromOutsideSourceW) + { + res = pParseURLFromOutsideSourceW(url, out, &maxlen, NULL); + FreeLibrary(hdll); + return res; + } + + ERR("failed to get ordinal 170: %d\n", GetLastError()); + FreeLibrary(hdll); + return 0; +} + +/********************************************************************* + * general_on_command [internal] + * + * handle WM_COMMAND + * + */ +static INT_PTR general_on_command(HWND hwnd, WPARAM wparam) +{ + + switch (wparam) + { + case MAKEWPARAM(IDC_HOME_EDIT, EN_CHANGE): + /* enable apply button */ + SendMessageW(GetParent(hwnd), PSM_CHANGED, (WPARAM)hwnd, 0); + break; + + case MAKEWPARAM(IDC_HOME_BLANK, BN_CLICKED): + SetDlgItemTextW(hwnd, IDC_HOME_EDIT, about_blank); + break; + + case MAKEWPARAM(IDC_HISTORY_DELETE, BN_CLICKED): + DialogBoxW(hcpl, MAKEINTRESOURCEW(IDD_DELETE_HISTORY), hwnd, + delhist_dlgproc); + break; + + default: + TRACE("not implemented for command: %d/%d\n", HIWORD(wparam), LOWORD(wparam)); + return FALSE; + } + return TRUE; +} + +/********************************************************************* + * general_on_initdialog [internal] + * + * handle WM_INITDIALOG + * + */ +static VOID general_on_initdialog(HWND hwnd) +{ + WCHAR buffer[INTERNET_MAX_URL_LENGTH]; + DWORD len; + DWORD type; + LONG res; + DWORD *ptr = disabled_general_buttons; + + /* disable unimplemented buttons */ + while (*ptr) + { + EnableWindow(GetDlgItem(hwnd, *ptr), FALSE); + ptr++; + } + + /* read current homepage from the registry. Try HCU first, then HKLM */ + *buffer = 0; + len = sizeof(buffer); + type = REG_SZ; + res = SHRegGetUSValueW(reg_ie_main, start_page, &type, buffer, &len, FALSE, (LPBYTE) about_blank, sizeof(about_blank)); + + if (!res && (type == REG_SZ)) + { + SetDlgItemTextW(hwnd, IDC_HOME_EDIT, buffer); + } +} + +/********************************************************************* + * general_on_notify [internal] + * + * handle WM_NOTIFY + * + */ +static INT_PTR general_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam) +{ + PSHNOTIFY *psn; + WCHAR buffer[INTERNET_MAX_URL_LENGTH]; + WCHAR parsed[INTERNET_MAX_URL_LENGTH]; + LONG res; + + psn = (PSHNOTIFY *) lparam; + TRACE("WM_NOTIFY (%p, 0x%lx, 0x%lx) from %p with code: %d\n", hwnd, wparam, lparam, + psn->hdr.hwndFrom, psn->hdr.code); + + if (psn->hdr.code == PSN_APPLY) + { + *buffer = 0; + GetDlgItemTextW(hwnd, IDC_HOME_EDIT, buffer, sizeof(buffer)/sizeof(WCHAR)); + TRACE("EDITTEXT has %s\n", debugstr_w(buffer)); + + res = parse_url_from_outside(buffer, parsed, sizeof(parsed)/sizeof(WCHAR)); + TRACE("got %d with %s\n", res, debugstr_w(parsed)); + + if (res) + { + HKEY hkey; + + /* update the dialog, when needed */ + if (lstrcmpW(buffer, parsed)) + SetDlgItemTextW(hwnd, IDC_HOME_EDIT, parsed); + + /* update the registry */ + res = RegOpenKeyW(HKEY_CURRENT_USER, reg_ie_main, &hkey); + if (!res) + { + res = RegSetValueExW(hkey, start_page, 0, REG_SZ, (const BYTE *)parsed, + (lstrlenW(parsed) + 1) * sizeof(WCHAR)); + RegCloseKey(hkey); + return !res; + } + } + } + return FALSE; +} + +/********************************************************************* + * general_dlgproc [internal] + * + */ +INT_PTR CALLBACK general_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + + switch (msg) + { + case WM_INITDIALOG: + general_on_initdialog(hwnd); + return TRUE; + + case WM_COMMAND: + return general_on_command(hwnd, wparam); + + case WM_NOTIFY: + return general_on_notify(hwnd, wparam, lparam); + + default: + /* do not flood the log */ + if ((msg == WM_SETCURSOR) || (msg == WM_NCHITTEST) || (msg == WM_MOUSEMOVE)) + return FALSE; + + TRACE("(%p, 0x%08x/%d, 0x%lx, 0x%lx)\n", hwnd, msg, msg, wparam, lparam); + + } + return FALSE; +} diff --git a/dll/cpl/inetcpl/inetcpl.c b/dll/cpl/inetcpl/inetcpl.c new file mode 100644 index 00000000000..751eccd468a --- /dev/null +++ b/dll/cpl/inetcpl/inetcpl.c @@ -0,0 +1,203 @@ +/* + * Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#define NONAMELESSUNION +#define COBJMACROS +#define CONST_VTABLE + +#include +#include +#include +#include +#include +#include +#include +#include "ole2.h" + +#include "wine/debug.h" + +#include "inetcpl.h" + + +WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); + +DECLSPEC_HIDDEN HMODULE hcpl; + +/********************************************************************* + * DllMain (inetcpl.@) + */ +BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved) +{ + TRACE("(%p, %d, %p)\n", hdll, reason, reserved); + + switch (reason) + { + /* case DLL_WINE_PREATTACH: + return FALSE; prefer native version */ + + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hdll); + hcpl = hdll; + } + return TRUE; +} + +/****************************************************************************** + * propsheet_callback [internal] + * + */ +static int CALLBACK propsheet_callback(HWND hwnd, UINT msg, LPARAM lparam) +{ + + TRACE("(%p, 0x%08x/%d, 0x%lx)\n", hwnd, msg, msg, lparam); + switch (msg) + { + case PSCB_INITIALIZED: + SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM) LoadIconW(hcpl, MAKEINTRESOURCEW(ICO_MAIN))); + break; + } + return 0; +} + +/****************************************************************************** + * display_cpl_sheets [internal] + * + * Build and display the dialog with all control panel propertysheets + * + */ +static void display_cpl_sheets(HWND parent) +{ + INITCOMMONCONTROLSEX icex; + PROPSHEETPAGEW psp[NUM_PROPERTY_PAGES]; + PROPSHEETHEADERW psh; + DWORD id = 0; + + OleInitialize(NULL); + /* Initialize common controls */ + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_LISTVIEW_CLASSES | ICC_BAR_CLASSES; + InitCommonControlsEx(&icex); + + ZeroMemory(&psh, sizeof(psh)); + ZeroMemory(psp, sizeof(psp)); + + /* Fill out all PROPSHEETPAGE */ + psp[id].dwSize = sizeof (PROPSHEETPAGEW); + psp[id].hInstance = hcpl; + psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_GENERAL); + psp[id].pfnDlgProc = general_dlgproc; + id++; + + psp[id].dwSize = sizeof (PROPSHEETPAGEW); + psp[id].hInstance = hcpl; + psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_SECURITY); + psp[id].pfnDlgProc = security_dlgproc; + id++; + + psp[id].dwSize = sizeof (PROPSHEETPAGEW); + psp[id].hInstance = hcpl; + psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_CONTENT); + psp[id].pfnDlgProc = content_dlgproc; + id++; + + /* Fill out the PROPSHEETHEADER */ + psh.dwSize = sizeof (PROPSHEETHEADERW); + psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK; + psh.hwndParent = parent; + psh.hInstance = hcpl; + psh.u.pszIcon = MAKEINTRESOURCEW(ICO_MAIN); + psh.pszCaption = MAKEINTRESOURCEW(IDS_CPL_NAME); + psh.nPages = id; + psh.u3.ppsp = psp; + psh.pfnCallback = propsheet_callback; + + /* display the dialog */ + PropertySheetW(&psh); + + OleUninitialize(); +} + +/********************************************************************* + * CPlApplet (inetcpl.@) + * + * Control Panel entry point + * + * PARAMS + * hWnd [I] Handle for the Control Panel Window + * command [I] CPL_* Command + * lParam1 [I] first extra Parameter + * lParam2 [I] second extra Parameter + * + * RETURNS + * Depends on the command + * + */ +LONG CALLBACK CPlApplet(HWND hWnd, UINT command, LPARAM lParam1, LPARAM lParam2) +{ + TRACE("(%p, %u, 0x%lx, 0x%lx)\n", hWnd, command, lParam1, lParam2); + + switch (command) + { + case CPL_INIT: + return TRUE; + + case CPL_GETCOUNT: + return 1; + + case CPL_INQUIRE: + { + CPLINFO *appletInfo = (CPLINFO *) lParam2; + + appletInfo->idIcon = ICO_MAIN; + appletInfo->idName = IDS_CPL_NAME; + appletInfo->idInfo = IDS_CPL_INFO; + appletInfo->lData = 0; + return TRUE; + } + + case CPL_DBLCLK: + display_cpl_sheets(hWnd); + break; + } + + return FALSE; +} + +/********************************************************************* + * LaunchInternetControlPanel (inetcpl.@) + * + * Launch the Internet Control Panel dialog + * + * PARAMS + * parent [I] Handle for the parent window + * + * RETURNS + * Success: TRUE + * + * NOTES + * rundll32 callable function: rundll32 inetcpl.cpl,LaunchInternetControlPanel + * + */ +BOOL WINAPI LaunchInternetControlPanel(HWND parent) +{ + display_cpl_sheets(parent); + return TRUE; +} diff --git a/dll/cpl/inetcpl/inetcpl.h b/dll/cpl/inetcpl/inetcpl.h new file mode 100644 index 00000000000..bd1e55a5bab --- /dev/null +++ b/dll/cpl/inetcpl/inetcpl.h @@ -0,0 +1,105 @@ +/* + * Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#ifndef __WINE_INETCPL__ +#define __WINE_INETCPL__ + +#include +#include +#include + +extern HMODULE hcpl; +INT_PTR CALLBACK content_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; +INT_PTR CALLBACK general_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; +INT_PTR CALLBACK security_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; + +/* ## Memory allocation functions ## */ + +static inline void * __WINE_ALLOC_SIZE(1) heap_alloc( size_t len ) +{ + return HeapAlloc( GetProcessHeap(), 0, len ); +} + +static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero( size_t len ) +{ + return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len ); +} + +static inline BOOL heap_free( void *mem ) +{ + return HeapFree( GetProcessHeap(), 0, mem ); +} + +/* ######### */ + +#define NUM_PROPERTY_PAGES 8 + +/* icons */ +#define ICO_MAIN 100 + +/* strings */ +#define IDS_CPL_NAME 1 +#define IDS_CPL_INFO 2 +#define IDS_SEC_SETTINGS 0x10 +#define IDS_SEC_LEVEL0 0x100 +#define IDS_SEC_LEVEL1 0x101 +#define IDS_SEC_LEVEL2 0x102 +#define IDS_SEC_LEVEL3 0x103 +#define IDS_SEC_LEVEL4 0x104 +#define IDS_SEC_LEVEL5 0x105 +#define IDS_SEC_LEVEL0_INFO 0x200 +#define IDS_SEC_LEVEL1_INFO 0x210 +#define IDS_SEC_LEVEL2_INFO 0x220 +#define IDS_SEC_LEVEL3_INFO 0x230 +#define IDS_SEC_LEVEL4_INFO 0x240 +#define IDS_SEC_LEVEL5_INFO 0x250 + +/* dialogs */ +#define IDC_STATIC -1 + +#define IDD_GENERAL 1000 +#define IDC_HOME_EDIT 1000 +#define IDC_HOME_CURRENT 1001 +#define IDC_HOME_DEFAULT 1002 +#define IDC_HOME_BLANK 1003 +#define IDC_HISTORY_DELETE 1004 +#define IDC_HISTORY_SETTINGS 1005 + +#define IDD_DELETE_HISTORY 1010 +#define IDC_DELETE_TEMP_FILES 1011 +#define IDC_DELETE_COOKIES 1012 +#define IDC_DELETE_HISTORY 1013 +#define IDC_DELETE_FORM_DATA 1014 +#define IDC_DELETE_PASSWORDS 1015 + +#define IDD_SECURITY 2000 +#define IDC_SEC_LISTVIEW 2001 +#define IDC_SEC_ZONE_INFO 2002 +#define IDC_SEC_GROUP 2003 +#define IDC_SEC_TRACKBAR 2004 +#define IDC_SEC_LEVEL 2005 +#define IDC_SEC_LEVEL_INFO 2006 + +#define IDD_CONTENT 4000 +#define IDC_CERT 4100 +#define IDC_CERT_PUBLISHER 4101 + +#endif diff --git a/dll/cpl/inetcpl/inetcpl.ico b/dll/cpl/inetcpl/inetcpl.ico new file mode 100644 index 00000000000..1eae208a702 Binary files /dev/null and b/dll/cpl/inetcpl/inetcpl.ico differ diff --git a/dll/cpl/inetcpl/inetcpl.rbuild b/dll/cpl/inetcpl/inetcpl.rbuild new file mode 100644 index 00000000000..f3abf389807 --- /dev/null +++ b/dll/cpl/inetcpl/inetcpl.rbuild @@ -0,0 +1,23 @@ + + + + + . + include/reactos/wine + cryptui + wininet + ole32 + urlmon + delayimp + wine + advapi32 + user32 + comctl32 + gdi32 + shlwapi + inetcpl.c + content.c + general.c + security.c + inetcpl.rc + diff --git a/dll/cpl/inetcpl/inetcpl.rc b/dll/cpl/inetcpl/inetcpl.rc new file mode 100644 index 00000000000..48b23738ed5 --- /dev/null +++ b/dll/cpl/inetcpl/inetcpl.rc @@ -0,0 +1,69 @@ +/* + * Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +#include "lang/de-DE.rc" +#include "lang/en-US.rc" +#include "lang/fr-FR.rc" +#include "lang/He.rc" +#include "lang/it-IT.rc" +#include "lang/ja-JP.rc" +#include "lang/ko-KR.rc" +#include "lang/lt-LT.rc" +#include "lang/nl-NL.rc" +#include "lang/pt-PT.rc" +#include "lang/ru-RU.rc" +#include "lang/Sr.rc" +#include "lang/sv-SE.rc" +#include "lang/uk-UA.rc" + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +BEGIN + IDS_CPL_NAME "Internet Settings" + IDS_CPL_INFO "Configure Wine Internet Browser and related settings" + IDS_SEC_SETTINGS "Security settings for zone: " + IDS_SEC_LEVEL0 "Custom" + IDS_SEC_LEVEL1 "Very Low" + IDS_SEC_LEVEL2 "Low" + IDS_SEC_LEVEL3 "Medium" + IDS_SEC_LEVEL4 "Increased" + IDS_SEC_LEVEL5 "High" +END + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define WINE_FILENAME_STR "inetcpl.cpl" +#define WINE_FILEDESCRIPTION_STR "Internet Control Panel" + +/* Same Version as IE 8 on WinXP */ +#define WINE_FILEVERSION 8,0,6001,18939 +#define WINE_FILEVERSION_STR "8.00.6001.18939" + +#define WINE_PRODUCTVERSION 8,0,6001,18939 +#define WINE_PRODUCTVERSION_STR "8.00.6001.18939" + +#include "wine/wine_common_ver.rc" + +/* @makedep: inetcpl.ico */ +ICO_MAIN ICON "inetcpl.ico" diff --git a/dll/cpl/inetcpl/inetcpl.spec b/dll/cpl/inetcpl/inetcpl.spec new file mode 100644 index 00000000000..eaf5e4d6e7d --- /dev/null +++ b/dll/cpl/inetcpl/inetcpl.spec @@ -0,0 +1,25 @@ +@ stub ClearMyTracksByProcessW +@ stub AddInternetPropertySheets +@ stub AddInternetPropertySheetsEx +@ stdcall CPlApplet(long long long long) +@ stub DisplayPopupWindowManagementDialog +@ stub DllInstall +@ stub GetAddSitesDisplayUrl +@ stub ImportExportPFX +@ stub LaunchAddSitesDialog +@ stub LaunchConnectionDialog +@ stdcall LaunchInternetControlPanel(long) +@ stub LaunchPerSitePrivacyActionDialog +@ stub LaunchPopupWindowManagementDialog +@ stub LaunchPrivacyDialog +@ stub LaunchSecurityDialog +@ stub LaunchSecurityDialogEx +@ stdcall LaunchSiteCertDialog(long) +@ stub OpenFontsDialog +@ stub OpenFontsDialogEx +@ stub OpenLanguageDialog +@ stub ResetIEtoDefaults +@ stub ShowDeleteBrowsingHistoryDialog +@ stub ShowFeedOptionsDialog +@ stub ShowLanguageDialog +@ stub SiteCert_RunFromCmdLine diff --git a/dll/cpl/inetcpl/inetcpl.svg b/dll/cpl/inetcpl/inetcpl.svg new file mode 100644 index 00000000000..7b943b1ea64 --- /dev/null +++ b/dll/cpl/inetcpl/inetcpl.svg @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dll/cpl/inetcpl/lang/He.rc b/dll/cpl/inetcpl/lang/He.rc new file mode 100644 index 00000000000..256ca084125 --- /dev/null +++ b/dll/cpl/inetcpl/lang/He.rc @@ -0,0 +1,66 @@ +/* + * Hebrew resources for the Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * Copyright 2010 Yaron Shahrabani + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +#pragma code_page(65001) + +LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +EXSTYLE WS_EX_LAYOUTRTL +FONT 8, "MS Shell Dlg" +CAPTION "כללי" +BEGIN + + GROUPBOX " דף הבית ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "באפשרותך לבחור את הכתובת שתשמש כדף הבית שלך.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "העמוד ה&נוכחי", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "עמוד &בררת המחדל", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "עמוד &ריק", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browsing history ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "You can delete cached pages, cookies and other data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Delete &files...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Settings...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +EXSTYLE WS_EX_LAYOUTRTL +FONT 8, "MS Shell Dlg" +CAPTION "תוכן" +BEGIN + + GROUPBOX " אישורים ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "אישורים משמשים כדי לזהות אותך וגם כדי לזהות רשויות ומפיצים.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "אישורים...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "מפיצים...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/Sr.rc b/dll/cpl/inetcpl/lang/Sr.rc new file mode 100644 index 00000000000..0312d2a2b73 --- /dev/null +++ b/dll/cpl/inetcpl/lang/Sr.rc @@ -0,0 +1,103 @@ +/* + * Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * Copyright 2010 Đorđe Vasiljević + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +#pragma code_page(65001) + +LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Опште" +BEGIN + + GROUPBOX "Почетна страна", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Изаберите адресу која ће се користити за почетну страну.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Текућа страна", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&Подразумевана страна", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "Празна &страна", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browsing history ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "You can delete cached pages, cookies and other data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Delete &files...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Settings...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Садржај" +BEGIN + + GROUPBOX "Сертификати", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Сертификати се користе за личну идентификацију, као и за препознавање ауторитета и издавача сертификата.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Сертификати...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Издавачи...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END + +LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Opšte" +BEGIN + + GROUPBOX "Početna strana", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Izaberite adresu koja će se koristiti za početnu stranu.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Tekuća strana", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&Podrazumevana strana", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "Prazna &strana", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browsing history ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "You can delete cached pages, cookies and other data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Delete &files...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Settings...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Sadržaj" +BEGIN + + GROUPBOX "Sertifikati", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Sertifikati se koriste za ličnu identifikaciju, kao i za prepoznavanje autoriteta i izdavača sertifikata.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Sertifikati...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Izdavači...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/de-DE.rc b/dll/cpl/inetcpl/lang/de-DE.rc new file mode 100644 index 00000000000..5d278f140ca --- /dev/null +++ b/dll/cpl/inetcpl/lang/de-DE.rc @@ -0,0 +1,103 @@ +/* + * German resources for the Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +#pragma code_page(65001) + +LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Allgemein" +BEGIN + + GROUPBOX " Startseite ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Sie können eine Addresse wählen, die als Startseite verwendet wird.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "A&ktuelle Seite", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&Standardseite", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "&Leere Seite", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browserverlauf ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "Sie können temporäre Dateien, Cookies und andere Daten löschen.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "&Daten löschen...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Einstellungen...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Delete browsing history" dialog */ +IDD_DELETE_HISTORY DIALOG 0, 0, 250, 250 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Gespeicherte Browserdaten löchen" +BEGIN + + AUTOCHECKBOX "&Temporäre Inernetdateien\nZwischengespeicherte Kopien von Webseiten, Bildern und Zertifikaten.", + IDC_DELETE_TEMP_FILES, 10, 8, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Cookies\nVon Webseiten auf ihrem Computer gespeicherte Dateien, die Benutzereinstellungen oder Anmeldeinformationen enthalten.", + IDC_DELETE_COOKIES, 10, 38, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Verlauf\nListe von Webseiten, die Sie aufgerufen haben.", + IDC_DELETE_HISTORY, 10, 68, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Formulardaten\nBenutzernamen und andere Informationen, die Sie in Formulare eingegeben haben.", + IDC_DELETE_FORM_DATA, 10, 98, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Kennwörter\nGespeicherte Kennwörter, die Sie in Formulare eingegeben haben.", + IDC_DELETE_PASSWORDS, 10, 128, 230, 30, BS_TOP | BS_MULTILINE + DEFPUSHBUTTON "&Abbrechen", IDCANCEL, 185, 230, 60, 15, WS_GROUP + PUSHBUTTON "&Löschen", IDOK, 120, 230, 60, 15, WS_GROUP + +END + +/* "Security" propsheet */ +IDD_SECURITY DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Sicherheit" +BEGIN + + CONTROL "Listview", IDC_SEC_LISTVIEW, "SysListView32", + LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_VSCROLL, + 4, 4, 312, 58 + LTEXT "", IDC_SEC_ZONE_INFO, 4, 68, 312, 20 + GROUPBOX "", IDC_SEC_GROUP, 4, 88, 312, 126 + CONTROL "trackbar", IDC_SEC_TRACKBAR, "msctls_trackbar32", + TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_REVERSED, 8, 98, 32, 100 + LTEXT "", IDC_SEC_LEVEL, 48, 102, 180, 12 + LTEXT "", IDC_SEC_LEVEL_INFO, 48, 114, 260, 80 +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Inhalte" +BEGIN + + GROUPBOX " Zertifikate ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Zertifikate werden benutzt, um sich persönlich, Zertifizierungsstellen und Herausgeber von Zertifikaten zu identifizieren.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Zertifikate...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Herausgeber...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/en-US.rc b/dll/cpl/inetcpl/lang/en-US.rc new file mode 100644 index 00000000000..296864f56eb --- /dev/null +++ b/dll/cpl/inetcpl/lang/en-US.rc @@ -0,0 +1,101 @@ +/* + * English resources for the Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "General" +BEGIN + + GROUPBOX " Home page ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "You can choose the address that will be used as your home page.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Current page", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&Default page", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "&Blank page", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browsing history ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "You can delete cached pages, cookies and other data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Delete &files...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Settings...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Delete browsing history" dialog */ +IDD_DELETE_HISTORY DIALOG 0, 0, 250, 250 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Delete browsing history" +BEGIN + + AUTOCHECKBOX "Temporary internet files\nCached copies of webpages, images and certificates.", + IDC_DELETE_TEMP_FILES, 10, 8, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Cookies\nFiles saved on your computer by websites, which store things like user preferences and login information.", + IDC_DELETE_COOKIES, 10, 38, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "History\nList of websites you have accessed.", + IDC_DELETE_HISTORY, 10, 68, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Form data\nUsernames and other information you have entered into forms.", + IDC_DELETE_FORM_DATA, 10, 98, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Passwords\nSaved passwords you have entered into forms.", + IDC_DELETE_PASSWORDS, 10, 128, 230, 30, BS_TOP | BS_MULTILINE + DEFPUSHBUTTON "Cancel", IDCANCEL, 185, 230, 60, 15, WS_GROUP + PUSHBUTTON "Delete", IDOK, 120, 230, 60, 15, WS_GROUP + +END + +/* "Security" propsheet */ +IDD_SECURITY DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Security" +BEGIN + + CONTROL "Listview", IDC_SEC_LISTVIEW, "SysListView32", + LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_VSCROLL, + 4, 4, 312, 58 + LTEXT "", IDC_SEC_ZONE_INFO, 4, 68, 312, 20 + GROUPBOX "", IDC_SEC_GROUP, 4, 88, 312, 126 + CONTROL "trackbar", IDC_SEC_TRACKBAR, "msctls_trackbar32", + TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_REVERSED, 8, 98, 32, 100 + LTEXT "", IDC_SEC_LEVEL, 48, 102, 180, 12 + LTEXT "", IDC_SEC_LEVEL_INFO, 48, 114, 260, 80 +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Content" +BEGIN + + GROUPBOX " Certificates ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Certificates are used for your personal identification and to identify certificate authorities and publishers.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Certificates...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Publishers...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/fr-FR.rc b/dll/cpl/inetcpl/lang/fr-FR.rc new file mode 100644 index 00000000000..6c55754b917 --- /dev/null +++ b/dll/cpl/inetcpl/lang/fr-FR.rc @@ -0,0 +1,105 @@ +/* + * Internet control panel applet + * French language support + * + * Copyright 2010-2011 Frédéric Delanoy + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +/* UTF-8 */ +#pragma code_page(65001) + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Général" +BEGIN + + GROUPBOX " Page d'accueil ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Vous pouvez spécifier l'adresse à utiliser comme page d'accueil :", + IDC_STATIC, 68, 10, 242, 10 + EDITTEXT IDC_HOME_EDIT, 68, 22, 242, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "Page &courante", IDC_HOME_CURRENT, 68, 36, 77, 14 + PUSHBUTTON "Page par &défaut", IDC_HOME_DEFAULT, 151, 36, 77, 14 + PUSHBUTTON "Page &blanche", IDC_HOME_BLANK, 233, 36, 77, 14 + GROUPBOX " Historique de navigation ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "Vous pouvez effacer les pages en cache, les cookies et d'autres données.", + IDC_STATIC, 68, 72, 242, 10 + PUSHBUTTON "&Effacer les fichiers...", IDC_HISTORY_DELETE, 151, 86, 77, 14 + PUSHBUTTON "&Paramètres...", IDC_HISTORY_SETTINGS, 233, 86, 77, 14 + +END + +/* "Delete browsing history" dialog */ +IDD_DELETE_HISTORY DIALOG 0, 0, 250, 250 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Effacer l'historique de navigation" +BEGIN + + AUTOCHECKBOX "Fichiers internet temporaires\nCopies en cache de pages web, d'images et de certificats.", + IDC_DELETE_TEMP_FILES, 10, 8, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Cookies\nDonnées enregistrées sur votre ordinateur par des sites web, telles que préférences utilisateur et informations de connexion.", + IDC_DELETE_COOKIES, 10, 32, 230, 35, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Historique\nListe des sites web accédés.", + IDC_DELETE_HISTORY, 10, 73, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Données de formulaires\nNoms d'utilisateur et autres informations entrées dans des formulaires.", + IDC_DELETE_FORM_DATA, 10, 98, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Mots de passe\nMots de passe entrés dans des formulaires et sauvegardés.", + IDC_DELETE_PASSWORDS, 10, 128, 230, 30, BS_TOP | BS_MULTILINE + DEFPUSHBUTTON "Annuler", IDCANCEL, 185, 228, 60, 15, WS_GROUP + PUSHBUTTON "Effacer", IDOK, 120, 228, 60, 15, WS_GROUP + +END + +/* "Security" propsheet */ +IDD_SECURITY DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Sécurité" +BEGIN + + CONTROL "Listview", IDC_SEC_LISTVIEW, "SysListView32", + LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_VSCROLL, + 4, 4, 312, 58 + LTEXT "", IDC_SEC_ZONE_INFO, 4, 68, 312, 20 + GROUPBOX "", IDC_SEC_GROUP, 4, 88, 312, 126 + CONTROL "trackbar", IDC_SEC_TRACKBAR, "msctls_trackbar32", + TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_REVERSED, 8, 98, 32, 100 + LTEXT "", IDC_SEC_LEVEL, 48, 102, 180, 12 + LTEXT "", IDC_SEC_LEVEL_INFO, 48, 114, 260, 80 +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Contenu" +BEGIN + + GROUPBOX " Certificats ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Les certificats sont utilisés pour votre identification personnelle, celle d'autorités de certification ou d'éditeurs.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Certificats...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Éditeurs...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/it-IT.rc b/dll/cpl/inetcpl/lang/it-IT.rc new file mode 100644 index 00000000000..566450c9eaa --- /dev/null +++ b/dll/cpl/inetcpl/lang/it-IT.rc @@ -0,0 +1,64 @@ +/* + * Italian resources for the Internet control panel applet + * + * Copyright 2010 Luca Bennati + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Bendrosios" +BEGIN + + GROUPBOX " Pradžios tinklalapis ", IDC_STATIC, 4, 4, 312, 56 + LTEXT "Galite pasirinkti adresą, kuris bus naudojamas kaip jūsų pradžios tinklalapis.", + IDC_STATIC, 58, 14, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 26, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Dabartinis puslapis", IDC_HOME_CURRENT, 58, 40, 80, 14 + PUSHBUTTON "&Numatytasis puslapis", IDC_HOME_DEFAULT, 144, 40, 80, 14 + PUSHBUTTON "&Tuščias puslapis", IDC_HOME_BLANK, 230, 40, 80, 14 + GROUPBOX " Naršymo istorija ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "Jūs galite pašalinti puslapius podėlyje, slapukus ir kitus duomenis.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Šalinti &failus...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "Nuo&statos...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Delete browsing history" dialog */ +IDD_DELETE_HISTORY DIALOG 0, 0, 250, 250 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Šalinti naršymo istoriją" +BEGIN + + AUTOCHECKBOX "Laikini interneto failai\nTinklalapių kopijos podėlyje, paveikslai, liudijimai.", + IDC_DELETE_TEMP_FILES, 10, 8, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Slapukai\nTinklalapių kompiuteryje išsaugoti failai, kuriuose saugomi naudotojų nustatymai ir prisijungimo informacija.", + IDC_DELETE_COOKIES, 10, 38, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Istorija\nTinklalapių, kuriuos naršėte, sąrašas.", + IDC_DELETE_HISTORY, 10, 68, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Formų duomenys\nNaudotojų vardai ir kita informacija, kurią įvedėte į formas.", + IDC_DELETE_FORM_DATA, 10, 98, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Slaptažodžiai\nIšsaugoti slaptažodžiai, kuriuos įvedėte į formas.", + IDC_DELETE_PASSWORDS, 10, 128, 230, 30, BS_TOP | BS_MULTILINE + DEFPUSHBUTTON "Atsisakyti", IDCANCEL, 185, 230, 60, 15, WS_GROUP + PUSHBUTTON "Šalinti", IDOK, 120, 230, 60, 15, WS_GROUP + +END + +/* "Security" propsheet */ +IDD_SECURITY DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Saugumas" +BEGIN + + CONTROL "Listview", IDC_SEC_LISTVIEW, "SysListView32", + LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_VSCROLL, + 4, 4, 312, 58 + LTEXT "", IDC_SEC_ZONE_INFO, 4, 68, 312, 20 + GROUPBOX "", IDC_SEC_GROUP, 4, 88, 312, 126 + CONTROL "trackbar", IDC_SEC_TRACKBAR, "msctls_trackbar32", + TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_REVERSED, 8, 98, 32, 100 + LTEXT "", IDC_SEC_LEVEL, 48, 102, 180, 12 + LTEXT "", IDC_SEC_LEVEL_INFO, 48, 114, 260, 80 +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Turinys" +BEGIN + + GROUPBOX " Liudijimai ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Liudijimai yra naudojami jūsų tapatumo nustatymui ir liudijimo įstaigų bei publikuotojų tapatumui nustatyti.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Liudijimai...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Publikuotojai...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/nl-NL.rc b/dll/cpl/inetcpl/lang/nl-NL.rc new file mode 100644 index 00000000000..5d5fb520de2 --- /dev/null +++ b/dll/cpl/inetcpl/lang/nl-NL.rc @@ -0,0 +1,61 @@ +/* + * Dutch resources for the Internet control panel applet + * + * Copyright 2010 Sven Baars + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Algemeen" +BEGIN + + GROUPBOX " Startpagina ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Hier kunt u het adres kiezen dat gebruikt wordt als uw startpagina.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Huidige pagina", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&Standaardpagina", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "&Lege pagina", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browsing history ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "You can delete cached pages, cookies and other data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Delete &files...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Settings...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Inhoud" +BEGIN + + GROUPBOX " Certificaten ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Certificaten worden gebruikt voor uw persoonlijke identificatie en om certificaat-autoriteiten en uitgevers te identificeren.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Certificaten...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Uitgevers...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/pl-PL.rc b/dll/cpl/inetcpl/lang/pl-PL.rc new file mode 100644 index 00000000000..42f4f38eaea --- /dev/null +++ b/dll/cpl/inetcpl/lang/pl-PL.rc @@ -0,0 +1,83 @@ +/* + * Internet control panel applet + * + * Copyright 2010 ukasz Wojniowicz + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Oglne" +BEGIN + + GROUPBOX " Strona domowa ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Moesz wybra adres strony, ktra bdzie twoj stron domow.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "Uyj &biecej", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "Uyj d&omylnej", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "Uyj pu&stej", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Historia przegldania ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "Moesz usun przechowywane strony, ciasteczka i inne dane.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "&Usu pliki...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "Ustawie&nia...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Delete browsing history" dialog */ +IDD_DELETE_HISTORY DIALOG 0, 0, 250, 250 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Usuwanie historii przegldania" +BEGIN + + AUTOCHECKBOX "Tymczasowe pliki internetowe\nKopie stron sieci Web, obrazw i certyfikatw.", + IDC_DELETE_TEMP_FILES, 10, 8, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Pliki cookies\nPliki przechowywane na komputerze przez witryny sieci Web w celu zapisania preferencji takich jak informacje logowania.", + IDC_DELETE_COOKIES, 10, 38, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Historia\nLista odwiedzonych witryn sieci Web.", + IDC_DELETE_HISTORY, 10, 68, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Dane formularzy\nZapisane informacje, ktre zostay wpisane w formularzach.", + IDC_DELETE_FORM_DATA, 10, 98, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Hasa\nHasa uzupeniane automatycznie po zalogowaniu si do wczeniej odwiedzonej witryny Web.", + IDC_DELETE_PASSWORDS, 10, 128, 230, 30, BS_TOP | BS_MULTILINE + DEFPUSHBUTTON "Anuluj", IDCANCEL, 185, 230, 60, 15, WS_GROUP + PUSHBUTTON "Usu", IDOK, 120, 230, 60, 15, WS_GROUP + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Zawarto" +BEGIN + + GROUPBOX " Certyfikaty ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Certyfikaty s uywane do twojej osobistej identyfikacji oraz do identyfikacji wydawcw i urzdw certyfikujcych.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Certyfikaty...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Wydawcy...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/pt-PT.rc b/dll/cpl/inetcpl/lang/pt-PT.rc new file mode 100644 index 00000000000..5be8c1a6ba9 --- /dev/null +++ b/dll/cpl/inetcpl/lang/pt-PT.rc @@ -0,0 +1,63 @@ +/* + * Portuguese resources for the Internet control panel applet + * + * Copyright 2010 Gustavo Henrique Milaré + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +#pragma code_page(65001) + +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Geral" +BEGIN + + GROUPBOX " Página inicial ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Escolha o endereço que será usado como página inicial.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "Página &atual", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "Página &padrão", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "Página em &branco", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browsing history ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "You can delete cached pages, cookies and other data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Delete &files...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Settings...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Conteúdo" +BEGIN + + GROUPBOX " Certificados ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Certificados são usados para sua identificação pessoal e para identificar certificados de autoridades e editores.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Certificados...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Editores...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/ru-RU.rc b/dll/cpl/inetcpl/lang/ru-RU.rc new file mode 100644 index 00000000000..98b809d0328 --- /dev/null +++ b/dll/cpl/inetcpl/lang/ru-RU.rc @@ -0,0 +1,105 @@ +/* + * Russian resources for the Internet control panel applet + * + * Copyright 2011 Alexander Lakhin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Общие" +BEGIN + + GROUPBOX " Домашняя страница ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Укажите адрес для вашей домашней страницы:", + IDC_STATIC, 58, 14, 252, 8 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Текущая страница", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&По умолчанию", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "Пу&стая страница", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " История использования браузера ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "Вы можете удалить кэшированные страницы, файлы cookies и другие данные.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Удалить &файлы...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Настройки...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Delete browsing history" dialog */ +IDD_DELETE_HISTORY DIALOG 0, 0, 250, 250 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Очистка истории" +BEGIN + + AUTOCHECKBOX "Временные файлы\nКэшированные копии страниц, изображений и сертификатов.", + IDC_DELETE_TEMP_FILES, 10, 8, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Файлы cookies\nФайлы, сохранённые на вашем компьютере, могут содержать пользовательские настройки и информацию для авторизации.", + IDC_DELETE_COOKIES, 10, 38, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "История\nПеречень сайтов, к которым осуществлялся доступ.", + IDC_DELETE_HISTORY, 10, 68, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Данные веб-форм\nИмена пользователя и другая информация, которая использовалась при заполнении форм.", + IDC_DELETE_FORM_DATA, 10, 98, 230, 30, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Пароли\nСохранённые пароли, которые были указаны в веб-формах.", + IDC_DELETE_PASSWORDS, 10, 128, 230, 30, BS_TOP | BS_MULTILINE + DEFPUSHBUTTON "Отмена", IDCANCEL, 185, 230, 60, 15, WS_GROUP + PUSHBUTTON "Удалить", IDOK, 120, 230, 60, 15, WS_GROUP + +END + +/* "Security" propsheet */ +IDD_SECURITY DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Безопасность" +BEGIN + + CONTROL "Listview", IDC_SEC_LISTVIEW, "SysListView32", + LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_VSCROLL, + 4, 4, 312, 58 + LTEXT "", IDC_SEC_ZONE_INFO, 4, 68, 312, 20 + GROUPBOX "", IDC_SEC_GROUP, 4, 88, 312, 126 + CONTROL "trackbar", IDC_SEC_TRACKBAR, "msctls_trackbar32", + TBS_VERT | TBS_AUTOTICKS | TBS_BOTH | TBS_REVERSED, 8, 98, 32, 100 + LTEXT "", IDC_SEC_LEVEL, 48, 102, 180, 12 + LTEXT "", IDC_SEC_LEVEL_INFO, 48, 114, 260, 80 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Содержание" +BEGIN + + GROUPBOX " Сертификаты ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Сертификаты используются для идентификации личности, а также для проверки подлинности центров сертификации и издателей.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Сертификаты...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Издатели...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/sv-SE.rc b/dll/cpl/inetcpl/lang/sv-SE.rc new file mode 100644 index 00000000000..997fd31a04e --- /dev/null +++ b/dll/cpl/inetcpl/lang/sv-SE.rc @@ -0,0 +1,63 @@ +/* + * Swedish resources for the Internet control panel applet + * + * Copyright 2010 Anders Jonsson + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +#pragma code_page(65001) + +LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Allmänt" +BEGIN + + GROUPBOX " Startsida ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Du kan välja vilken adress som ska användas som startsida.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Aktuell sida", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "För&vald sida", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "&Blank sida", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Bläddringshistorik ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "Du kan ta bort cachade sidor, kakor och annan data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Ta bort &filer...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Inställningar...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Innehåll" +BEGIN + + GROUPBOX " Certifikat ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Certifikat används för din personliga identifikation samt för att identifiera certifikats-auktoriteter och -utgivare.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Certifikat...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Utgivare...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/lang/uk-UA.rc b/dll/cpl/inetcpl/lang/uk-UA.rc new file mode 100644 index 00000000000..102fb0cc999 --- /dev/null +++ b/dll/cpl/inetcpl/lang/uk-UA.rc @@ -0,0 +1,65 @@ +/* + * Internet control panel applet + * + * Copyright 2010 Detlef Riekenberg + * Copyright 2010 Igor Paliychuk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "inetcpl.h" + +/* UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Загальні" +BEGIN + + GROUPBOX " Домашня сторінка ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Ви можете вказати адресу, що буде використана як домашня сторінка.", + IDC_STATIC, 58, 12, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Поточна сторінка", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&За замовчуванням", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "По&рожня сторінка", IDC_HOME_BLANK, 230, 36, 80, 14 + GROUPBOX " Browsing history ", IDC_STATIC, 4, 60, 312, 46 + LTEXT "You can delete cached pages, cookies and other data.", + IDC_STATIC, 58, 72, 252, 10 + PUSHBUTTON "Delete &files...", IDC_HISTORY_DELETE, 144, 86, 80, 14 + PUSHBUTTON "&Settings...", IDC_HISTORY_SETTINGS, 230, 86, 80, 14 + +END + +/* "Content" propsheet */ +IDD_CONTENT DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Вміст" +BEGIN + + GROUPBOX " Сертифікати ", IDC_STATIC, 4, 4, 312, 50 + LTEXT "Сертифікати використовуються для вашої ідентифікації та для ідентифікації органів сертифікації та видавців.", + IDC_STATIC, 58, 14, 252, 18 + PUSHBUTTON "Сертифікати...", IDC_CERT, 146, 34, 80, 14 + PUSHBUTTON "Видавці...", IDC_CERT_PUBLISHER, 230, 34, 80, 14 + +END diff --git a/dll/cpl/inetcpl/security.c b/dll/cpl/inetcpl/security.c new file mode 100644 index 00000000000..118718533b1 --- /dev/null +++ b/dll/cpl/inetcpl/security.c @@ -0,0 +1,444 @@ +/* + * Internet control panel applet: security propsheet + * + * Copyright 2011 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#define COBJMACROS +#define CONST_VTABLE +#define NONAMELESSUNION + +#include +#include +#include +#include +#include +#include "commctrl.h" + +#include "ole2.h" +#include "urlmon.h" +#include "initguid.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "inetcpl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); + +typedef struct secdlg_data_s { + HWND hsec; /* security propsheet */ + HWND hlv; /* listview */ + HWND htb; /* trackbar */ + IInternetSecurityManager *sec_mgr; + IInternetZoneManager *zone_mgr; + DWORD zone_enumerator; + DWORD num_zones; + ZONEATTRIBUTES *zone_attr; + DWORD *zones; + DWORD *levels; + HIMAGELIST himages; + DWORD last_lv_index; + DWORD last_level; +} secdlg_data; + +#define NUM_TRACKBAR_POS 5 + +static WCHAR spaceW[] = {' ',0}; +static DWORD url_templates[] = {URLTEMPLATE_CUSTOM, + URLTEMPLATE_LOW, + URLTEMPLATE_MEDLOW, + URLTEMPLATE_MEDIUM, + URLTEMPLATE_MEDHIGH, + URLTEMPLATE_HIGH}; + +/********************************************************************* + * index_from_urltemplate [internal] + * + */ +static DWORD index_from_urltemplate(URLTEMPLATE value) +{ + + DWORD index = sizeof(url_templates) / sizeof(url_templates[0]); + + while((index > 0) && (url_templates[index-1] != value)) + index--; + + index--; /* table entries are 0 based */ + if (!index && value) + FIXME("URLTEMPLATE 0x%x not supported\n", value); + + TRACE("URLTEMPLATE 0x%08x=> Level %d\n", value, index); + return index; +} + +/********************************************************************* + * update_security_level [internal] + * + */ +static void update_security_level(secdlg_data *sd, DWORD lv_index, DWORD tb_index) +{ + WCHAR name[512]; + DWORD current_index; + + TRACE("(%p, lv_index: %u, tb_index: %u)\n", sd, lv_index, tb_index); + + if ((sd->levels[lv_index] != sd->last_level) || (tb_index > 0)) { + /* show or hide the trackbar */ + if (!sd->levels[lv_index] || !sd->last_level) + ShowWindow(sd->htb, sd->levels[lv_index] ? SW_NORMAL : SW_HIDE); + + current_index = (tb_index > 0) ? tb_index : index_from_urltemplate(sd->levels[lv_index]); + + name[0] = 0; + LoadStringW(hcpl, IDS_SEC_LEVEL0 + current_index, name, sizeof(name)/sizeof(name[0])); + TRACE("new level #%d: %s\n", current_index, debugstr_w(name)); + SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_LEVEL), name); + + name[0] = 0; + LoadStringW(hcpl, IDS_SEC_LEVEL0_INFO + (current_index * 0x10), name, sizeof(name)/sizeof(name[0])); + TRACE("new level info: %s\n", debugstr_w(name)); + SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_LEVEL_INFO), name); + + if (current_index) + SendMessageW(sd->htb, TBM_SETPOS, TRUE, NUM_TRACKBAR_POS - current_index); + + sd->last_level = sd->levels[lv_index]; + + } +} + +/********************************************************************* + * update_zone_info [internal] + * + */ +static void update_zone_info(secdlg_data *sd, DWORD lv_index) +{ + ZONEATTRIBUTES *za = &sd->zone_attr[lv_index]; + WCHAR name[MAX_PATH]; + DWORD len; + + SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_ZONE_INFO), za->szDescription); + + name[0] = ' '; + name[1] = 0; + + LoadStringW(hcpl, IDS_SEC_SETTINGS, &name[1], sizeof(name)/sizeof(name[0]) - 3); + len = lstrlenW(name); + lstrcpynW(&name[len], za->szDisplayName, sizeof(name)/sizeof(name[0]) - len - 3); + lstrcatW(name, spaceW); + + TRACE("new title: %s\n", debugstr_w(name)); + SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_GROUP), name); + + update_security_level(sd, lv_index, 0); + sd->last_lv_index = lv_index; +} + +/********************************************************************* + * add_zone_to_listview [internal] + * + */ +static void add_zone_to_listview(secdlg_data *sd, DWORD *pindex, DWORD zone) +{ + DWORD lv_index = *pindex; + ZONEATTRIBUTES *za = &sd->zone_attr[lv_index]; + LVITEMW lvitem; + HRESULT hr; + INT iconid = 0; + HMODULE hdll = NULL; + WCHAR * ptr; + HICON icon; + + TRACE("item %d (zone %d)\n", lv_index, zone); + + sd->zones[lv_index] = zone; + + memset(&lvitem, 0, sizeof(LVITEMW)); + memset(za, 0, sizeof(ZONEATTRIBUTES)); + za->cbSize = sizeof(ZONEATTRIBUTES); + hr = IInternetZoneManager_GetZoneAttributes(sd->zone_mgr, zone, za); + if (SUCCEEDED(hr)) { + TRACE("displayname: %s\n", debugstr_w(za->szDisplayName)); + TRACE("description: %s\n", debugstr_w(za->szDescription)); + TRACE("minlevel: 0x%x, recommended: 0x%x, current: 0x%x (flags: 0x%x)\n", za->dwTemplateMinLevel, + za->dwTemplateRecommended, za->dwTemplateCurrentLevel, za->dwFlags); + + if (za->dwFlags & ZAFLAGS_NO_UI ) { + TRACE("item %d (zone %d): UI disabled for %s\n", lv_index, zone, debugstr_w(za->szDisplayName)); + return; + } + + sd->levels[lv_index] = za->dwTemplateCurrentLevel; + + lvitem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; + lvitem.iItem = lv_index; + lvitem.iSubItem = 0; + lvitem.pszText = za->szDisplayName; + lvitem.lParam = (LPARAM) zone; + + /* format is "filename.ext#iconid" */ + ptr = StrChrW(za->szIconPath, '#'); + if (ptr) { + *ptr = 0; + ptr++; + iconid = StrToIntW(ptr); + hdll = LoadLibraryExW(za->szIconPath, NULL, LOAD_LIBRARY_AS_DATAFILE); + TRACE("%p: icon #%d from %s\n", hdll, iconid, debugstr_w(za->szIconPath)); + + icon = LoadImageW(hdll, MAKEINTRESOURCEW(iconid), IMAGE_ICON, GetSystemMetrics(SM_CXICON), + GetSystemMetrics(SM_CYICON), LR_SHARED); + + if (!icon) { + FIXME("item %d (zone %d): missing icon #%d in %s\n", lv_index, zone, iconid, debugstr_w(za->szIconPath)); + } + + /* the failure result (NULL) from LoadImageW let ImageList_AddIcon fail + with -1, which is reused in ListView_InsertItemW to disable the image */ + lvitem.iImage = ImageList_AddIcon(sd->himages, icon); + } + else + FIXME("item %d (zone %d): malformed szIconPath %s\n", lv_index, zone, debugstr_w(za->szIconPath)); + + if (ListView_InsertItemW(sd->hlv, &lvitem) >= 0) { + /* activate first item in the listview */ + if (! lv_index) { + lvitem.state = LVIS_FOCUSED | LVIS_SELECTED; + lvitem.stateMask = LVIS_FOCUSED | LVIS_SELECTED; + SendMessageW(sd->hlv, LVM_SETITEMSTATE, 0, (LPARAM) &lvitem); + sd->last_level = ~0; + update_zone_info(sd, lv_index); + } + (*pindex)++; + } + FreeLibrary(hdll); + } + else + FIXME("item %d (zone %d): GetZoneAttributes failed with 0x%x\n", lv_index, zone, hr); +} + +/********************************************************************* + * security_cleanup_zones [internal] + * + */ +static void security_cleanup_zones(secdlg_data *sd) +{ + if (sd->zone_enumerator) { + IInternetZoneManager_DestroyZoneEnumerator(sd->zone_mgr, sd->zone_enumerator); + } + + if (sd->zone_mgr) { + IInternetZoneManager_Release(sd->zone_mgr); + } + + if (sd->sec_mgr) { + IInternetSecurityManager_Release(sd->sec_mgr); + } +} + +/********************************************************************* + * security_enum_zones [internal] + * + */ +static HRESULT security_enum_zones(secdlg_data * sd) +{ + HRESULT hr; + + hr = CoInternetCreateSecurityManager(NULL, &sd->sec_mgr, 0); + if (SUCCEEDED(hr)) { + hr = CoInternetCreateZoneManager(NULL, &sd->zone_mgr, 0); + if (SUCCEEDED(hr)) { + hr = IInternetZoneManager_CreateZoneEnumerator(sd->zone_mgr, &sd->zone_enumerator, &sd->num_zones, 0); + } + } + return hr; +} + +/********************************************************************* + * security_on_destroy [internal] + * + * handle WM_NCDESTROY + * + */ +static INT_PTR security_on_destroy(secdlg_data * sd) +{ + TRACE("(%p)\n", sd); + + heap_free(sd->zone_attr); + heap_free(sd->zones); + if (sd->himages) { + SendMessageW(sd->hlv, LVM_SETIMAGELIST, LVSIL_NORMAL, 0); + ImageList_Destroy(sd->himages); + } + + security_cleanup_zones(sd); + SetWindowLongPtrW(sd->hsec, DWLP_USER, 0); + heap_free(sd); + return TRUE; +} + +/********************************************************************* + * security_on_initdialog [internal] + * + * handle WM_INITDIALOG + * + */ +static INT_PTR security_on_initdialog(HWND hsec) +{ + secdlg_data *sd; + HRESULT hr; + DWORD current_zone; + DWORD lv_index = 0; + DWORD i; + + sd = heap_alloc_zero(sizeof(secdlg_data)); + SetWindowLongPtrW(hsec, DWLP_USER, (LONG_PTR) sd); + if (!sd) { + return FALSE; + } + + sd->hsec = hsec; + sd->hlv = GetDlgItem(hsec, IDC_SEC_LISTVIEW); + sd->htb = GetDlgItem(hsec, IDC_SEC_TRACKBAR); + + EnableWindow(sd->htb, FALSE); /* not changeable yet */ + + TRACE("(%p) (data: %p, listview: %p, trackbar: %p)\n", hsec, sd, sd->hlv, sd->htb); + + SendMessageW(sd->htb, TBM_SETRANGE, FALSE, MAKELONG(0, NUM_TRACKBAR_POS - 1)); + SendMessageW(sd->htb, TBM_SETTICFREQ, 1, 0 ); + + /* Create the image lists for the listview */ + sd->himages = ImageList_Create(GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), ILC_COLOR32 | ILC_MASK, 1, 1); + + TRACE("using imagelist: %p\n", sd->himages); + if (!sd->himages) { + ERR("ImageList_Create failed!\n"); + return FALSE; + } + SendMessageW(sd->hlv, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)sd->himages); + + hr = security_enum_zones(sd); + if (FAILED(hr)) { + ERR("got 0x%x\n", hr); + security_on_destroy(sd); + return FALSE; + } + + TRACE("found %d zones\n", sd->num_zones); + + /* remember ZONEATTRIBUTES for a listview entry */ + sd->zone_attr = heap_alloc(sizeof(ZONEATTRIBUTES) * sd->num_zones); + if (!sd->zone_attr) { + security_on_destroy(sd); + return FALSE; + } + + /* remember zone number and current security level for a listview entry */ + sd->zones = heap_alloc((sizeof(DWORD) + sizeof(DWORD)) * sd->num_zones); + if (!sd->zones) { + security_on_destroy(sd); + return FALSE; + } + sd->levels = &sd->zones[sd->num_zones]; + + /* use the same order as visible with native inetcpl.cpl */ + add_zone_to_listview(sd, &lv_index, URLZONE_INTERNET); + add_zone_to_listview(sd, &lv_index, URLZONE_INTRANET); + add_zone_to_listview(sd, &lv_index, URLZONE_TRUSTED); + add_zone_to_listview(sd, &lv_index, URLZONE_UNTRUSTED); + + for (i = 0; i < sd->num_zones; i++) + { + hr = IInternetZoneManager_GetZoneAt(sd->zone_mgr, sd->zone_enumerator, i, ¤t_zone); + if (SUCCEEDED(hr) && (current_zone != (DWORD)URLZONE_INVALID)) { + if (!current_zone || (current_zone > URLZONE_UNTRUSTED)) { + add_zone_to_listview(sd, &lv_index, current_zone); + } + } + } + return TRUE; +} + +/********************************************************************* + * security_on_notify [internal] + * + * handle WM_NOTIFY + * + */ +static INT_PTR security_on_notify(secdlg_data *sd, WPARAM wparam, LPARAM lparam) +{ + NMLISTVIEW *nm; + + nm = (NMLISTVIEW *) lparam; + switch (nm->hdr.code) + { + case LVN_ITEMCHANGED: + TRACE("LVN_ITEMCHANGED (0x%lx, 0x%lx) from %p with code: %d (item: %d, uNewState: %u)\n", + wparam, lparam, nm->hdr.hwndFrom, nm->hdr.code, nm->iItem, nm->uNewState); + if ((nm->uNewState & LVIS_SELECTED) == LVIS_SELECTED) { + update_zone_info(sd, nm->iItem); + } + break; + + case PSN_APPLY: + TRACE("PSN_APPLY (0x%lx, 0x%lx) from %p with code: %d\n", wparam, lparam, + nm->hdr.hwndFrom, nm->hdr.code); + break; + + default: + TRACE("WM_NOTIFY (0x%lx, 0x%lx) from %p with code: %d\n", wparam, lparam, + nm->hdr.hwndFrom, nm->hdr.code); + + } + return FALSE; +} + +/********************************************************************* + * security_dlgproc [internal] + * + */ +INT_PTR CALLBACK security_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + secdlg_data *sd; + + if (msg == WM_INITDIALOG) { + return security_on_initdialog(hwnd); + } + + sd = (secdlg_data *)GetWindowLongPtrW(hwnd, DWLP_USER); + if (sd) { + switch (msg) + { + case WM_NOTIFY: + return security_on_notify(sd, wparam, lparam); + + case WM_NCDESTROY: + return security_on_destroy(sd); + + default: + /* do not flood the log */ + if ((msg == WM_SETCURSOR) || (msg == WM_NCHITTEST) || + (msg == WM_MOUSEMOVE) || (msg == WM_MOUSEACTIVATE) || (msg == WM_PARENTNOTIFY)) + return FALSE; + + TRACE("(%p, 0x%08x/%03d, 0x%08lx, 0x%08lx)\n", hwnd, msg, msg, wparam, lparam); + } + } + return FALSE; +} diff --git a/dll/cpl/input/lang/de-DE.rc b/dll/cpl/input/lang/de-DE.rc index 6412b5a6348..90df65fda9d 100644 --- a/dll/cpl/input/lang/de-DE.rc +++ b/dll/cpl/input/lang/de-DE.rc @@ -20,8 +20,8 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWIN CAPTION "Erweiterte Tasteneinstellungen" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Um Caps Lock zu deaktivieren", -1, 7, 7, 258, 26 - AUTORADIOBUTTON "Caps &Lock Taste drcken", IDC_PRESS_CL_KEY_RB, 14, 17, 120, 11, WS_GROUP + GROUPBOX "Um die Feststelltaste zu deaktivieren", -1, 7, 7, 258, 26 + AUTORADIOBUTTON "Festste&lltaste drcken", IDC_PRESS_CL_KEY_RB, 14, 17, 120, 11, WS_GROUP AUTORADIOBUTTON "Um&schalttaste drcken", IDC_PRESS_SHIFT_KEY_RB, 144, 17, 120, 11, NOT WS_TABSTOP GROUPBOX "Schnelltasten fr Eingabesprachen", -1, 7, 37, 258, 95 LTEXT "Aktion", -1, 14, 47, 60, 9 diff --git a/dll/cpl/input/lang/it-IT.rc b/dll/cpl/input/lang/it-IT.rc index b4f26739978..0ea57d32e34 100644 --- a/dll/cpl/input/lang/it-IT.rc +++ b/dll/cpl/input/lang/it-IT.rc @@ -9,7 +9,7 @@ BEGIN CONTROL "TEXT", IDC_KEYLAYOUT_LIST, "SYSLISTVIEW32", WS_BORDER | WS_VSCROLL | WS_TABSTOP | LVS_SORTASCENDING | LVS_REPORT | 0x0000808D, 8, 28, 237, 109 PUSHBUTTON "&Predefinito", IDC_SET_DEFAULT, 101, 159, 144, 14 PUSHBUTTON "&Aggiungi...", IDC_ADD_BUTTON, 27, 142, 70, 14 - PUSHBUTTON "&Remuovi...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 + PUSHBUTTON "&Rimuovi...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 PUSHBUTTON "&Propriet...", IDC_PROP_BUTTON, 175, 142, 70, 14 GROUPBOX "Preferenze", -1, 7, 185, 240, 36 PUSHBUTTON "&Impostazioni tasti...", IDC_KEY_SET_BTN, 14, 198, 110, 14 diff --git a/dll/cpl/input/lang/pl-PL.rc b/dll/cpl/input/lang/pl-PL.rc index b18fe84620e..a05ebfc1bc4 100644 --- a/dll/cpl/input/lang/pl-PL.rc +++ b/dll/cpl/input/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Jan,March 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan,March 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -12,12 +13,12 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ustawienia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz usugi dla kadego uywanego jzyka z listy.\nList mona modyfikowa przyciskami Dodaj i Usu.", -1, 9, 6, 238, 17 + LTEXT "Wybierz usługi dla każdego używanego języka z listy.\nListę można modyfikować przyciskami Dodaj i Usuń.", -1, 9, 6, 238, 17 CONTROL "TEXT", IDC_KEYLAYOUT_LIST, "SYSLISTVIEW32", WS_BORDER | WS_VSCROLL | WS_TABSTOP | LVS_SORTASCENDING | LVS_REPORT | 0x0000808D, 8, 28, 237, 109 - PUSHBUTTON "&Ustaw domylne", IDC_SET_DEFAULT, 101, 159, 144, 14 + PUSHBUTTON "&Ustaw domyślne", IDC_SET_DEFAULT, 101, 159, 144, 14 PUSHBUTTON "&Dodaj...", IDC_ADD_BUTTON, 27, 142, 70, 14 - PUSHBUTTON "U&su...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 - PUSHBUTTON "&Waciwoci...", IDC_PROP_BUTTON, 175, 142, 70, 14 + PUSHBUTTON "U&suń...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 + PUSHBUTTON "&Właściwości...", IDC_PROP_BUTTON, 175, 142, 70, 14 GROUPBOX "Preferencje", -1, 7, 185, 240, 36 PUSHBUTTON "Us&tawienia klawiszy...", IDC_KEY_SET_BTN, 14, 198, 110, 14 END @@ -27,26 +28,26 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWIN CAPTION "Zaawansowane ustawienia klawiszy" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Wyczenie CAPSLOCK", -1, 7, 7, 258, 26 - AUTORADIOBUTTON "Nacinicie klawisza CAPS&LOCK", IDC_PRESS_CL_KEY_RB, 14, 17, 120, 11, WS_GROUP - AUTORADIOBUTTON "Nacinicie klawisza SHI&FT", IDC_PRESS_SHIFT_KEY_RB, 144, 17, 120, 11, NOT WS_TABSTOP - GROUPBOX "Klawisze skrtu jzykw", -1, 7, 37, 258, 95 + GROUPBOX "Wyłączenie CAPSLOCK", -1, 7, 7, 258, 26 + AUTORADIOBUTTON "Naciśnięcie klawisza CAPS&LOCK", IDC_PRESS_CL_KEY_RB, 14, 17, 120, 11, WS_GROUP + AUTORADIOBUTTON "Naciśnięcie klawisza SHI&FT", IDC_PRESS_SHIFT_KEY_RB, 144, 17, 120, 11, NOT WS_TABSTOP + GROUPBOX "Klawisze skrótu języków", -1, 7, 37, 258, 95 LTEXT "Akcja", -1, 14, 47, 60, 9 RTEXT "&Sekwencja klawiszy", -1, 177, 47, 79, 9 CONTROL "", IDC_KEY_LISTVIEW, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_AUTOARRANGE | LVS_SINGLESEL, 14, 57, 244, 52, WS_EX_CLIENTEDGE - PUSHBUTTON "Z&mie sekwencj klawiszy...", IDC_CHANGE_KEY_SEQ_BTN, 152, 113, 106, 14, WS_GROUP + PUSHBUTTON "Z&mień sekwencję klawiszy...", IDC_CHANGE_KEY_SEQ_BTN, 152, 113, 106, 14, WS_GROUP DEFPUSHBUTTON "OK", IDOK, 66, 140, 70, 14 PUSHBUTTON "Anuluj", IDCANCEL, 146, 140, 70, 14 END IDD_ADD DIALOGEX 20, 20, 227, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Dodawanie jzykw" +CAPTION "Dodawanie języków" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Jzyk:", -1, 7, 7, 61, 10 + LTEXT "&Język:", -1, 7, 7, 61, 10 COMBOBOX IDC_INPUT_LANG_COMBO, 7, 17, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT "&Ukad klawiatury/IME:", -1, 7, 36, 110, 10 + LTEXT "&Układ klawiatury/IME:", -1, 7, 36, 110, 10 COMBOBOX IDC_KEYBOARD_LO_COMBO, 7, 47, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 68, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, 169, 68, 50, 14 @@ -58,12 +59,12 @@ CAPTION "Zmiana sekwencji klawiszy" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", -1, 9, 5, 155, 110 - AUTOCHECKBOX "&Przecz ukad klawiatury", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 + AUTOCHECKBOX "&Przełącz układ klawiatury", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 LTEXT "Shift", -1, 73, 37, 27, 12 CTEXT "+", -1, 62, 37, 8, 9 AUTORADIOBUTTON "&Ctrl", IDC_CTRL_LANG, 29, 31, 30, 11 AUTORADIOBUTTON "Lewy &ALT", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 - AUTOCHECKBOX "P&rzecz ukad klawiatur", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 + AUTOCHECKBOX "P&rzełącz układ klawiatur", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 LTEXT "Shift", -1, 74, 87, 27, 12 CTEXT "+", -1, 63, 87, 8, 9 AUTORADIOBUTTON "C&trl", IDC_CTRL_LAYOUT, 30, 81, 30, 11 @@ -74,12 +75,12 @@ END IDD_INPUT_LANG_PROP DIALOGEX 20, 20, 227, 75 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Waciwoci jzyka" +CAPTION "Właściwości języka" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Jzyk:", -1, 7, 7, 61, 8 + LTEXT "Język:", -1, 7, 7, 61, 8 LTEXT "", IDC_INPUT_LANG_STR, 73, 7, 129, 8 - LTEXT "&Ukad klawiatury/IME:", -1, 7, 21, 110, 10 + LTEXT "&Układ klawiatury/IME:", -1, 7, 21, 110, 10 COMBOBOX IDC_KB_LAYOUT_IME_COMBO, 7, 32, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 53, 52, 14 PUSHBUTTON "Anuluj", IDCANCEL, 169, 53, 52, 14 @@ -87,22 +88,22 @@ END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Jzyki i usugi tekstowe" - IDS_CPLSYSTEMDESCRIPTION "Umoliwia zmian ustawie jzykw." + IDS_CPLSYSTEMNAME "Języki i usługi tekstowe" + IDS_CPLSYSTEMDESCRIPTION "Umożliwia zmianę ustawień języków." IDS_KEYBOARD "Klawiatura" IDS_NONE "(Brak)" IDS_UNKNOWN "(Nieznany)" - IDS_RESTART "Czy chcesz zrestartowa swj komputer w tej chwili?" + IDS_RESTART "Czy chcesz zrestartować swój komputer w tej chwili?" IDS_WHATS_THIS "Co to jest?" - IDS_LANGUAGE "Jzyk" - IDS_LAYOUT "Ukad klawiatury" - IDS_REM_QUESTION "Czy chcesz usun dany ukad klawiatury?" + IDS_LANGUAGE "Język" + IDS_LAYOUT "Układ klawiatury" + IDS_REM_QUESTION "Czy chcesz usunąć dany układ klawiatury?" IDS_CONFIRMATION "Potwierdzenie" - IDS_LAYOUT_EXISTS "Taki ukad ju istnieje." - IDS_LAYOUT_EXISTS2 "Taki ukad ju istnieje i nie mona go doda ponownie." + IDS_LAYOUT_EXISTS "Taki układ już istnieje." + IDS_LAYOUT_EXISTS2 "Taki układ już istnieje i nie można go dodać ponownie." IDS_CTRL_SHIFT "Ctrl+Shift" IDS_LEFT_ALT_SHIFT "Lewy Alt+Shift" - IDS_SWITCH_BET_INLANG "Przecza pomidzy ukadami klawiatury" + IDS_SWITCH_BET_INLANG "Przełącza pomiędzy układami klawiatury" END STRINGTABLE @@ -113,44 +114,44 @@ BEGIN IDS_PORTUGUESE_BRAZILIAN_ABNT_LAYOUT, "Portugalski (Brazylijski ABNT)" IDS_CANADIAN_FRENCH_LAYOUT, "Kanadyjski Francuski" IDS_CANADIAN_FRENCH_LEGACY_LAYOUT, "Kanadyjski Francuski (Legacy)" - IDS_DANISH_LAYOUT, "Duski" + IDS_DANISH_LAYOUT, "Duński" IDS_DUTCH_LAYOUT, "Holenderski" - IDS_FINNISH_LAYOUT, "Fiski" + IDS_FINNISH_LAYOUT, "Fiński" IDS_FRENCH_LAYOUT, "Francuski" IDS_GERMAN_LAYOUT, "Niemiecki" IDS_GERMAN_IBM_LAYOUT, "Niemiecki (IBM)" IDS_ICELANDIC_LAYOUT, "Islandzki" IDS_IRISH_LAYOUT, "Irlandzki" - IDS_ITALIAN_LAYOUT, "Woski" - IDS_ITALIAN_142_LAYOUT, "Woski (142)" - IDS_LATIN_AMERICAN_LAYOUT, "Latynoamerykaski" + IDS_ITALIAN_LAYOUT, "Włoski" + IDS_ITALIAN_142_LAYOUT, "Włoski (142)" + IDS_LATIN_AMERICAN_LAYOUT, "Latynoamerykański" IDS_NORWEGIAN_LAYOUT, "Norweski" IDS_PORTUGUESE_LAYOUT, "Portugalski" - IDS_SPANISH_LAYOUT, "Hiszpaski" - IDS_SPANISH_VARIANTION_LAYOUT, "Hiszpaski (odmiana)" + IDS_SPANISH_LAYOUT, "Hiszpański" + IDS_SPANISH_VARIANTION_LAYOUT, "Hiszpański (odmiana)" IDS_SWEDISH_LAYOUT, "Szwedzki" IDS_SWISS_FRENCH_LAYOUT, "Szwajcarski Francuski" IDS_SWISS_GERMAN_LAYOUT, "Szwajcarski Niemiecki" IDS_UNITED_KINGDOM_LAYOUT, "Angielski (Wielka Brytania)" - IDS_UNITED_STATES_INTERNATIONAL_LAYOUT, "Midzynarodowy (USA)" - IDS_UNITED_STATES_DVORAK_FOR_LEFT_HAND_LAYOUT, "Angielski (Dvoraka dla leworcznych)" - IDS_UNITED_STATES_DVORAK_FOR_RIGHT_HAND_LAYOUT, "Angielski (Dvoraka dla praworcznych)" - IDS_ALBANIAN_LAYOUT, "Albaski" + IDS_UNITED_STATES_INTERNATIONAL_LAYOUT, "Międzynarodowy (USA)" + IDS_UNITED_STATES_DVORAK_FOR_LEFT_HAND_LAYOUT, "Angielski (Dvoraka dla leworęcznych)" + IDS_UNITED_STATES_DVORAK_FOR_RIGHT_HAND_LAYOUT, "Angielski (Dvoraka dla praworęcznych)" + IDS_ALBANIAN_LAYOUT, "Albański" IDS_CROATIAN_LAYOUT, "Chorwacki" IDS_CZECH_LAYOUT, "Czeski" IDS_CZECH_QWERTY_LAYOUT, "Czeski (QWERTY)" - IDS_HUNGARIAN_LAYOUT, "Wgierski" - IDS_HUNGARIAN_101_KEY_LAYOUT, "Wgierski (101-klawiszy)" + IDS_HUNGARIAN_LAYOUT, "Węgierski" + IDS_HUNGARIAN_101_KEY_LAYOUT, "Węgierski (101-klawiszy)" IDS_POLISH_LAYOUT, "Polski (Programisty)" IDS_POLISH_214_LAYOUT, "Polski (214)" - IDS_ROMANIAN_LAYOUT, "Rumuski" + IDS_ROMANIAN_LAYOUT, "Rumuński" IDS_SERBIAN_LATIN_LAYOUT, "Serbski (Latin)" - IDS_SLOVAK_LAYOUT, "Sowacki" - IDS_SLOVAK_QWERTY_LAYOUT, "Sowacki (QWERTY)" - IDS_SLOVENIAN_LAYOUT, "Sloweski" - IDS_ESTONIAN_LAYOUT, "Estoski" - IDS_LATVIAN_LAYOUT, "otewski" - IDS_LATVIAN_QWERTY_LAYOUT, "otewski (QWERTY)" + IDS_SLOVAK_LAYOUT, "Słowacki" + IDS_SLOVAK_QWERTY_LAYOUT, "Słowacki (QWERTY)" + IDS_SLOVENIAN_LAYOUT, "Sloweński" + IDS_ESTONIAN_LAYOUT, "Estoński" + IDS_LATVIAN_LAYOUT, "Łotewski" + IDS_LATVIAN_QWERTY_LAYOUT, "Łotewski (QWERTY)" IDS_LITHUANIAN_IBM_LAYOUT, "Litewski (IBM)" IDS_GREEK_LAYOUT, "Grecki" IDS_GREEK_LATIN_LAYOUT, "Grecki (Latin)" @@ -158,31 +159,31 @@ BEGIN IDS_GREEK_319_LAYOUT, "Grecki (319)" IDS_GREEK_220_LATIN_LAYOUT, "Grecki (220, Latin)" IDS_GREEK_319_LATIN_LAYOUT, "Grecki (319, Latin)" - IDS_BELARUSIAN_LAYOUT, "Biaoruski" - IDS_BULGARIAN_LAYOUT, "Bugarski" - IDS_BULGARIAN_LATIN_LAYOUT, "Bugarski (Latin)" + IDS_BELARUSIAN_LAYOUT, "Białoruski" + IDS_BULGARIAN_LAYOUT, "Bułgarski" + IDS_BULGARIAN_LATIN_LAYOUT, "Bułgarski (Latin)" IDS_RUSSIAN_LAYOUT, "Rosyjski" IDS_RUSSIAN_TYPEWRITER_LAYOUT, "Rosyjski (Maszynisty)" IDS_SERBIAN_CYRILLIC_LAYOUT, "Serbski (Cyrylica)" - IDS_UKRAINIAN_LAYOUT, "Ukraiski" + IDS_UKRAINIAN_LAYOUT, "Ukraiński" IDS_TURKISH_F_LAYOUT, "Turecki (F)" IDS_TURKISH_Q_LAYOUT, "Turecki (Q)" - IDS_JAPANESE_LAYOUT, "Japoski" - IDS_JAPANESE_INPUT_SYSTEM_MSIME2002_LAYOUT, "Japoski (MS-IME2002)" - IDS_KOREAN_LAYOUT, "Koreaski" - IDS_KOREAN_INPUT_SYSTEM_MSIME2002_LAYOUT, "Koreaski (MS-IME2002)" - IDS_CHINESE_TRADITIONAL_USKEYBOARD_LAYOUT, "Chiski (Tradycyjny) - Klawiatura US" - IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT, "Chiski (Tradycyjny) - Fonetyczny" - IDS_CHINESE_TRADITIONAL_CHANGJIE_LAYOUT, "Chiski (Tradycyjny) - ChangJie" - IDS_CHINESE_TRADITIONAL_BIG5CODE_LAYOUT, "Chiski (Tradycyjny) - Kod Big5" - IDS_CHINESE_TRADITIONAL_DAYI_LAYOUT, "Chiski (Tradycyjny) - DaYi" - IDS_CHINESE_TRADITIONAL_UNICODE_LAYOUT, "Chiski (Tradycyjny) - Unicode" - IDS_CHINESE_TRADITIONAL_ALPHANUMERIC_LAYOUT, "Chiski (Tradycyjny) - Alfanumeryczny" - IDS_CHINESE_SIMPLIFIED_USKEYBOARD_LAYOUT, "Chiski (Uproszczony) - Klawiatura US" - IDS_CHINESE_SIMPLIFIED_QUANPIN_LAYOUT, "Chiski (Uproszczony) - QuanPin" - IDS_CHINESE_SIMPLIFIED_SHUANGPIN_LAYOUT, "Chiski (Uproszczony) - ShuangPin" - IDS_CHINESE_SIMPLIFIED_ZHENGMA_LAYOUT, "Chiski (Uproszczony) - ZhengMa" - IDS_CHINESE_SIMPLIFIED_NEIMA_LAYOUT, "Chiski (Uproszczony) - NeiMa" + IDS_JAPANESE_LAYOUT, "Japoński" + IDS_JAPANESE_INPUT_SYSTEM_MSIME2002_LAYOUT, "Japoński (MS-IME2002)" + IDS_KOREAN_LAYOUT, "Koreański" + IDS_KOREAN_INPUT_SYSTEM_MSIME2002_LAYOUT, "Koreański (MS-IME2002)" + IDS_CHINESE_TRADITIONAL_USKEYBOARD_LAYOUT, "Chiński (Tradycyjny) - Klawiatura US" + IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT, "Chiński (Tradycyjny) - Fonetyczny" + IDS_CHINESE_TRADITIONAL_CHANGJIE_LAYOUT, "Chiński (Tradycyjny) - ChangJie" + IDS_CHINESE_TRADITIONAL_BIG5CODE_LAYOUT, "Chiński (Tradycyjny) - Kod Big5" + IDS_CHINESE_TRADITIONAL_DAYI_LAYOUT, "Chiński (Tradycyjny) - DaYi" + IDS_CHINESE_TRADITIONAL_UNICODE_LAYOUT, "Chiński (Tradycyjny) - Unicode" + IDS_CHINESE_TRADITIONAL_ALPHANUMERIC_LAYOUT, "Chiński (Tradycyjny) - Alfanumeryczny" + IDS_CHINESE_SIMPLIFIED_USKEYBOARD_LAYOUT, "Chiński (Uproszczony) - Klawiatura US" + IDS_CHINESE_SIMPLIFIED_QUANPIN_LAYOUT, "Chiński (Uproszczony) - QuanPin" + IDS_CHINESE_SIMPLIFIED_SHUANGPIN_LAYOUT, "Chiński (Uproszczony) - ShuangPin" + IDS_CHINESE_SIMPLIFIED_ZHENGMA_LAYOUT, "Chiński (Uproszczony) - ZhengMa" + IDS_CHINESE_SIMPLIFIED_NEIMA_LAYOUT, "Chiński (Uproszczony) - NeiMa" IDS_THAI_KEDMANEE_LAYOUT, "Tajski (Kedmanee)" IDS_THAI_PATTACHOTE_LAYOUT, "Tajski (Pattachote)" IDS_THAI_KEDMANEE_NONSHIFTLOCK_LAYOUT, "Tajski (Kedmanee, bez ShiftLock)" @@ -194,37 +195,37 @@ BEGIN IDS_CZECH_PROGRAMMERS_LAYOUT, "Czeski (Programisty)" IDS_LITHUANIAN_LAYOUT, "Litewski" IDS_BELGIAN_COMMA_LAYOUT, "Belgijski (Comma)" - IDS_CHINESE_TRADITIONAL_NEWPHONETIC_LAYOUT, "Chiski (Tradycyjny) - Nowa fonetyka" - IDS_CHINESE_SIMPLIFIED_MSPINYINIME30_LAYOUT, "Chiski (Uproszczony) - Microsoft Pinyin IME 3.0" + IDS_CHINESE_TRADITIONAL_NEWPHONETIC_LAYOUT, "Chiński (Tradycyjny) - Nowa fonetyka" + IDS_CHINESE_SIMPLIFIED_MSPINYINIME30_LAYOUT, "Chiński (Uproszczony) - Microsoft Pinyin IME 3.0" IDS_UNITED_STATES_DVIRAK_LAYOUT, "Angielski (US-Dvorak)" - IDS_CHINESE_TRADITIONAL_NEWCHANGJIE_LAYOUT, "Chiski (Tradycyjny) - Nowy ChangJie" + IDS_CHINESE_TRADITIONAL_NEWCHANGJIE_LAYOUT, "Chiński (Tradycyjny) - Nowy ChangJie" IDS_ASSAMESE_LAYOUT, "Assamski" IDS_BENGALI_LAYOUT, "Bengalski" IDS_DEVANAGARI_INSCRIPT_LAYOUT, "Dewanagari (INSCRIPT)" - IDS_GUJARATI_LAYOUT, "Gudarati" + IDS_GUJARATI_LAYOUT, "Gudźarati" IDS_KANNADA_LAYOUT, "Kannada" IDS_MALAYALAM_LAYOUT, "Malayalam" IDS_ORIYA_LAYOUT, "Orija" - IDS_PUNJABI_LAYOUT, "Pendabski" + IDS_PUNJABI_LAYOUT, "Pendżabski" IDS_TAMIL_LAYOUT, "Tamilski" IDS_TELUGU_LAYOUT, "Telugu" IDS_MARATHI_LAYOUT, "Marathi" IDS_HINDI_TRADITIONAL_LAYOUT, "Hindi (Tradycyjny)" - IDS_CANTONESE_PHONETIC_LAYOUT, "Kantoski (Fonetyczny)" + IDS_CANTONESE_PHONETIC_LAYOUT, "Kantoński (Fonetyczny)" IDS_FAEROESE_LAYOUT, "Farerski" - IDS_FYRO_MACEDONIAN_LAYOUT, "Macedoski(FYRO)" - IDS_CANADIAN_MULTILINGUAL_STD_LAYOUT, "Kanadyjski wielojzykowy" - IDS_CHINESE_TRADITIONAL_QUICK_LAYOUT, "Chiski (Tradycyjny) - Quick" - IDS_CHINESE_TRADITIONAL_ARRAY_LAYOUT, "Chiski (Tradycyjny) - Array" + IDS_FYRO_MACEDONIAN_LAYOUT, "Macedoński(FYRO)" + IDS_CANADIAN_MULTILINGUAL_STD_LAYOUT, "Kanadyjski wielojęzykowy" + IDS_CHINESE_TRADITIONAL_QUICK_LAYOUT, "Chiński (Tradycyjny) - Quick" + IDS_CHINESE_TRADITIONAL_ARRAY_LAYOUT, "Chiński (Tradycyjny) - Array" IDS_KAZAKH_LAYOUT, "Kazachski" IDS_UZBEK_CYRILLIC_LAYOUT, "Uzbecki (Cyrylica)" IDS_AZERI_CYRILLIC_LAYOUT, "Azerski (Cyrylica)" IDS_TATAR_LAYOUT, "Tatarski" IDS_AZERI_LATIN_LAYOUT, "Azerski (Latin)" IDS_VIETNAMESE_LAYOUT, "Wietnamski" - IDS_GEORGIAN_LAYOUT, "Gruziski" - IDS_ARMENIAN_EASTERN_LAYOUT, "Armeski wschodni" - IDS_ARMENIAN_WESTERN_LAYOUT, "Armeski zachodni" + IDS_GEORGIAN_LAYOUT, "Gruziński" + IDS_ARMENIAN_EASTERN_LAYOUT, "Armeński wschodni" + IDS_ARMENIAN_WESTERN_LAYOUT, "Armeński zachodni" IDS_GREEK_POLYTONIC_LAYOUT, "Grecki Politoniczny" IDS_USENG_TABLE_IBM_ARABIC238L_LAYOUT, "Tablica Angielska (US) dla Arabskiego (IBM 238_L)" IDS_FARSI_LAYOUT, "Perski" @@ -237,12 +238,12 @@ BEGIN IDS_SYRIAC_PHONETIC_LAYOUT, "Syriacki (Fonetyczny)" IDS_DIVEHI_PHONETIC_LAYOUT, "Malediwski (Fonetyczny)" IDS_DIVEHI_TYPEWRITER_LAYOUT, "Malediwski (Maszynisty)" - IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, "Bugarski (Fonetyczny)" - IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, "Bugarski (Fonetyczny, BDS)" - IDS_BULGARIAN_BDS_LAYOUT, "Bugarski BDS 5237-1978" + IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, "Bułgarski (Fonetyczny)" + IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, "Bułgarski (Fonetyczny, BDS)" + IDS_BULGARIAN_BDS_LAYOUT, "Bułgarski BDS 5237-1978" IDS_GERMAN_RISTOME_LAYOUT, "Niemiecki (RISTOME)" IDS_GERMAN_NEO_11_LAYOUT, "Niemiecki (NEO-1.1)" IDS_GERMAN_DE_ERGO_LAYOUT, "Niemiecki (de_ergo)" - IDS_BURMESE_LAYOUT, "Birmaski" - IDS_UKRAINIAN_STUDENT_LAYOUT, "Ukraiski (Student)" + IDS_BURMESE_LAYOUT, "Birmański" + IDS_UKRAINIAN_STUDENT_LAYOUT, "Ukraiński (Student)" END diff --git a/dll/cpl/input/lang/ro-RO.rc b/dll/cpl/input/lang/ro-RO.rc index 14092528eee..896b238833e 100644 --- a/dll/cpl/input/lang/ro-RO.rc +++ b/dll/cpl/input/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_PROPPAGESETTINGS DIALOGEX 0, 0, 254, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Setări" @@ -241,5 +239,3 @@ BEGIN IDS_UZBEK_CYRILLIC_LAYOUT, "Uzbek Cyrillic" IDS_VIETNAMESE_LAYOUT, "Vietnamese" END - -#pragma code_page(default) diff --git a/dll/cpl/input/lang/ru-RU.rc b/dll/cpl/input/lang/ru-RU.rc index 52f4a0dbcfb..8f43df12529 100644 --- a/dll/cpl/input/lang/ru-RU.rc +++ b/dll/cpl/input/lang/ru-RU.rc @@ -2,240 +2,240 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGESETTINGS DIALOGEX 0, 0, 254, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . """" """".", -1, 9, 6, 238, 17 + LTEXT "Выберите нужные раскладки для каждого языка ввода из списка. Для изменения списка служат кнопки ""Добавить"" и ""Удалить"".", -1, 9, 6, 238, 17 CONTROL "TEXT", IDC_KEYLAYOUT_LIST, "SYSLISTVIEW32", WS_BORDER | WS_VSCROLL | WS_TABSTOP | LVS_SORTASCENDING | LVS_REPORT | 0x0000808D, 8, 28, 237, 109 - PUSHBUTTON "& ", IDC_SET_DEFAULT, 101, 159, 144, 14 - PUSHBUTTON "&...", IDC_ADD_BUTTON, 27, 142, 70, 14 - PUSHBUTTON "&...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 - PUSHBUTTON "&...", IDC_PROP_BUTTON, 175, 142, 70, 14 - GROUPBOX "", -1, 7, 185, 240, 36 - PUSHBUTTON "& ...", IDC_KEY_SET_BTN, 14, 198, 110, 14 + PUSHBUTTON "Ус&тановить по умолчанию", IDC_SET_DEFAULT, 101, 159, 144, 14 + PUSHBUTTON "&Добавить...", IDC_ADD_BUTTON, 27, 142, 70, 14 + PUSHBUTTON "&Удалить...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 + PUSHBUTTON "&Свойства...", IDC_PROP_BUTTON, 175, 142, 70, 14 + GROUPBOX "Параметры", -1, 7, 185, 240, 36 + PUSHBUTTON "&Параметры клавиатуры...", IDC_KEY_SET_BTN, 14, 198, 110, 14 END IDD_KEYSETTINGS DIALOGEX 0, 0, 272, 163 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Дополнительные параметры клавиатуры" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " Caps Lock", -1, 7, 7, 258, 26 - AUTORADIOBUTTON "& CAPS LOCK", IDC_PRESS_CL_KEY_RB, 14, 17, 120, 11, WS_GROUP - AUTORADIOBUTTON "& SHIFT", IDC_PRESS_SHIFT_KEY_RB, 144, 17, 120, 11, NOT WS_TABSTOP - GROUPBOX " ", -1, 7, 37, 258, 95 - LTEXT "", -1, 14, 47, 60, 9 - RTEXT "& ", -1, 177, 47, 79, 9 + GROUPBOX "Отключение режима Caps Lock", -1, 7, 7, 258, 26 + AUTORADIOBUTTON "&Клавишей CAPS LOCK", IDC_PRESS_CL_KEY_RB, 14, 17, 120, 11, WS_GROUP + AUTORADIOBUTTON "К&лавишей SHIFT", IDC_PRESS_SHIFT_KEY_RB, 144, 17, 120, 11, NOT WS_TABSTOP + GROUPBOX "Сочетания клавиш для языков ввода", -1, 7, 37, 258, 95 + LTEXT "Действие", -1, 14, 47, 60, 9 + RTEXT "&Сочетание клавиш", -1, 177, 47, 79, 9 CONTROL "", IDC_KEY_LISTVIEW, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_AUTOARRANGE | LVS_SINGLESEL, 14, 57, 244, 52, WS_EX_CLIENTEDGE - PUSHBUTTON "& ...", IDC_CHANGE_KEY_SEQ_BTN, 152, 113, 106, 14, WS_GROUP + PUSHBUTTON "См&ена сочетания клавиш...", IDC_CHANGE_KEY_SEQ_BTN, 152, 113, 106, 14, WS_GROUP DEFPUSHBUTTON "OK", IDOK, 66, 140, 70, 14 - PUSHBUTTON "", IDCANCEL, 146, 140, 70, 14 + PUSHBUTTON "Отмена", IDCANCEL, 146, 140, 70, 14 END IDD_ADD DIALOGEX 20, 20, 227, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Добавление языка ввода" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 61, 10 + LTEXT "&Язык ввода:", -1, 7, 7, 61, 10 COMBOBOX IDC_INPUT_LANG_COMBO, 7, 17, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT "& :", -1, 7, 36, 170, 10 + LTEXT "&Раскладка клавиатуры:", -1, 7, 36, 170, 10 COMBOBOX IDC_KEYBOARD_LO_COMBO, 7, 47, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 68, 50, 14 - PUSHBUTTON "", IDCANCEL, 169, 68, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 169, 68, 50, 14 END IDD_CHANGE_KEY_SEQ DIALOGEX 5, 100, 230, 125 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Смена сочетания клавиш" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", -1, 9, 5, 155, 110 - AUTOCHECKBOX " & ", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 + AUTOCHECKBOX "Переключать &языки ввода", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 LTEXT "Shift", -1, 73, 37, 27, 12 CTEXT "+", -1, 62, 37, 8, 9 AUTORADIOBUTTON "&Ctrl", IDC_CTRL_LANG, 29, 31, 30, 11 - AUTORADIOBUTTON "Alt &", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 - AUTOCHECKBOX " &", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 + AUTORADIOBUTTON "Alt с&лева", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 + AUTOCHECKBOX "Переключать раскладки &клавиатуры", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 LTEXT "Shift", -1, 74, 87, 27, 12 CTEXT "+", -1, 63, 87, 8, 9 AUTORADIOBUTTON "C&trl", IDC_CTRL_LAYOUT, 30, 81, 30, 11 - AUTORADIOBUTTON "Alt &", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 - DEFPUSHBUTTON "", IDOK, 172, 9, 50, 14 - PUSHBUTTON "", IDCANCEL, 172, 27, 50, 14 + AUTORADIOBUTTON "Alt сл&ева", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 + DEFPUSHBUTTON "ОК", IDOK, 172, 9, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 172, 27, 50, 14 END IDD_INPUT_LANG_PROP DIALOGEX 20, 20, 227, 75 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Свойства языка ввода" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 7, 7, 61, 8 + LTEXT "Язык ввода:", -1, 7, 7, 61, 8 LTEXT "", IDC_INPUT_LANG_STR, 73, 7, 129, 8 - LTEXT "& :", -1, 7, 21, 170, 10 + LTEXT "&Раскладка клавиатуры:", -1, 7, 21, 170, 10 COMBOBOX IDC_KB_LAYOUT_IME_COMBO, 7, 32, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 114, 53, 52, 14 - PUSHBUTTON "", IDCANCEL, 169, 53, 52, 14 + PUSHBUTTON "Отмена", IDCANCEL, 169, 53, 52, 14 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " ." - IDS_KEYBOARD "" - IDS_NONE "()" - IDS_UNKNOWN "( )" - IDS_RESTART " ?" - IDS_WHATS_THIS " ?" - IDS_LANGUAGE " " - IDS_LAYOUT "" - IDS_REM_QUESTION " ?" - IDS_CONFIRMATION "" - IDS_LAYOUT_EXISTS " ." - IDS_LAYOUT_EXISTS2 " ." + IDS_CPLSYSTEMNAME "Текстовые сервисы и ввод языков" + IDS_CPLSYSTEMDESCRIPTION "Дополнительные параметры текстового ввода языков." + IDS_KEYBOARD "Клавиатура" + IDS_NONE "(нет)" + IDS_UNKNOWN "(нет данных)" + IDS_RESTART "Выполнить перезагрузку сейчас?" + IDS_WHATS_THIS "Что это?" + IDS_LANGUAGE "Язык ввода" + IDS_LAYOUT "Раскладка" + IDS_REM_QUESTION "Вы действительно хотите удалить выбранную раскладку клавиатуры?" + IDS_CONFIRMATION "Подтверждение" + IDS_LAYOUT_EXISTS "Такая раскладка уже существует." + IDS_LAYOUT_EXISTS2 "Такая раскладка уже существует и не может быть добавлена." IDS_CTRL_SHIFT "Ctrl+Shift" - IDS_LEFT_ALT_SHIFT "Alt +Shift" - IDS_SWITCH_BET_INLANG " " + IDS_LEFT_ALT_SHIFT "Alt слева+Shift" + IDS_SWITCH_BET_INLANG "Переключение между языками ввода" END STRINGTABLE BEGIN - IDS_US_LAYOUT, "" - IDS_BELGIAN_LAYOUT, " ( )" - IDS_BELGIAN_FRENCH_LAYOUT, " ()" - IDS_PORTUGUESE_BRAZILIAN_ABNT_LAYOUT, " ( ABNT)" - IDS_CANADIAN_FRENCH_LAYOUT, " ()" - IDS_CANADIAN_FRENCH_LEGACY_LAYOUT, " ( )" - IDS_DANISH_LAYOUT, "" - IDS_DUTCH_LAYOUT, "" - IDS_FINNISH_LAYOUT, "" - IDS_FRENCH_LAYOUT, "" - IDS_GERMAN_LAYOUT, "" - IDS_GERMAN_IBM_LAYOUT, " (IBM)" - IDS_ICELANDIC_LAYOUT, "" - IDS_IRISH_LAYOUT, "" - IDS_ITALIAN_LAYOUT, "" - IDS_ITALIAN_142_LAYOUT, " (142)" - IDS_LATIN_AMERICAN_LAYOUT, "" - IDS_NORWEGIAN_LAYOUT, "" - IDS_PORTUGUESE_LAYOUT, "" - IDS_SPANISH_LAYOUT, "" - IDS_SPANISH_VARIANTION_LAYOUT, " 2" - IDS_SWEDISH_LAYOUT, "" - IDS_SWISS_FRENCH_LAYOUT, " " - IDS_SWISS_GERMAN_LAYOUT, " " - IDS_UNITED_KINGDOM_LAYOUT, "" - IDS_UNITED_STATES_INTERNATIONAL_LAYOUT, " - " - IDS_UNITED_STATES_DVORAK_FOR_LEFT_HAND_LAYOUT, " - " - IDS_UNITED_STATES_DVORAK_FOR_RIGHT_HAND_LAYOUT, " - " - IDS_ALBANIAN_LAYOUT, "" - IDS_CROATIAN_LAYOUT, "" - IDS_CZECH_LAYOUT, "" - IDS_CZECH_QWERTY_LAYOUT, " (QWERTY)" - IDS_HUNGARIAN_LAYOUT, "" - IDS_HUNGARIAN_101_KEY_LAYOUT, " (101 )" - IDS_POLISH_LAYOUT, " ()" - IDS_POLISH_214_LAYOUT, " (214)" - IDS_ROMANIAN_LAYOUT, "" - IDS_SERBIAN_LATIN_LAYOUT, " ()" - IDS_SLOVAK_LAYOUT, "" - IDS_SLOVAK_QWERTY_LAYOUT, " (QWERTY)" - IDS_SLOVENIAN_LAYOUT, "" - IDS_ESTONIAN_LAYOUT, "" - IDS_LATVIAN_LAYOUT, "" - IDS_LATVIAN_QWERTY_LAYOUT, " (QWERTY)" - IDS_LITHUANIAN_IBM_LAYOUT, " IBM" - IDS_GREEK_LAYOUT, "" - IDS_GREEK_LATIN_LAYOUT, " " - IDS_GREEK_220_LAYOUT, " (220)" - IDS_GREEK_319_LAYOUT, " (319)" - IDS_GREEK_220_LATIN_LAYOUT, " (220) " - IDS_GREEK_319_LATIN_LAYOUT, " (319) " - IDS_BELARUSIAN_LAYOUT, "" - IDS_BULGARIAN_LAYOUT, "" - IDS_BULGARIAN_LATIN_LAYOUT, " ()" - IDS_RUSSIAN_LAYOUT, "" - IDS_RUSSIAN_TYPEWRITER_LAYOUT, " ()" - IDS_SERBIAN_CYRILLIC_LAYOUT, " ()" - IDS_UKRAINIAN_LAYOUT, "" - IDS_TURKISH_F_LAYOUT, " F" - IDS_TURKISH_Q_LAYOUT, " Q" - IDS_JAPANESE_LAYOUT, "" - IDS_JAPANESE_INPUT_SYSTEM_MSIME2002_LAYOUT, " (MS-IME2002)" - IDS_KOREAN_LAYOUT, "" - IDS_KOREAN_INPUT_SYSTEM_MSIME2002_LAYOUT, " (MS-IME98)" - IDS_CHINESE_TRADITIONAL_USKEYBOARD_LAYOUT, " () - " - IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT, " () - " - IDS_CHINESE_TRADITIONAL_CHANGJIE_LAYOUT, " () - ChangJie" - IDS_CHINESE_TRADITIONAL_BIG5CODE_LAYOUT, " () - Big5 Code" - IDS_CHINESE_TRADITIONAL_DAYI_LAYOUT, " () - DaYi" - IDS_CHINESE_TRADITIONAL_UNICODE_LAYOUT, " () - " - IDS_CHINESE_TRADITIONAL_ALPHANUMERIC_LAYOUT, " () - -" - IDS_CHINESE_SIMPLIFIED_USKEYBOARD_LAYOUT, " () - " - IDS_CHINESE_SIMPLIFIED_QUANPIN_LAYOUT, " () - QuanPin" - IDS_CHINESE_SIMPLIFIED_SHUANGPIN_LAYOUT, " () - ShuangPin" - IDS_CHINESE_SIMPLIFIED_ZHENGMA_LAYOUT, " () - ZhengMa" - IDS_CHINESE_SIMPLIFIED_NEIMA_LAYOUT, " () - NeiMa" - IDS_THAI_KEDMANEE_LAYOUT, " " - IDS_THAI_PATTACHOTE_LAYOUT, " " - IDS_THAI_KEDMANEE_NONSHIFTLOCK_LAYOUT, " ( ShiftLock)" - IDS_THAI_PATTACHOTE_NONSHIFTLOCK_LAYOUT, " ( ShiftLock)" - IDS_HEBREW_LAYOUT, "" - IDS_ARABIC_101_LAYOUT, " (101)" - IDS_ARABIC_102_LAYOUT, " (102)" - IDS_ARABIC_102_AZERTY_LAYOUT, " (102) AZERTY" - IDS_CZECH_PROGRAMMERS_LAYOUT, " ()" - IDS_LITHUANIAN_LAYOUT, "" - IDS_BELGIAN_COMMA_LAYOUT, " ( )" - IDS_CHINESE_TRADITIONAL_NEWPHONETIC_LAYOUT, " () - " - IDS_CHINESE_SIMPLIFIED_MSPINYINIME30_LAYOUT, " () - Microsoft Pinyin IME 3.0" - IDS_UNITED_STATES_DVIRAK_LAYOUT, " - " - IDS_CHINESE_TRADITIONAL_NEWCHANGJIE_LAYOUT, " () - ChangJie" - IDS_ASSAMESE_LAYOUT, "" - IDS_BENGALI_LAYOUT, "" - IDS_DEVANAGARI_INSCRIPT_LAYOUT, " - " - IDS_GUJARATI_LAYOUT, "" - IDS_KANNADA_LAYOUT, "" - IDS_MALAYALAM_LAYOUT, "" - IDS_ORIYA_LAYOUT, "" - IDS_PUNJABI_LAYOUT, "" - IDS_TAMIL_LAYOUT, "" - IDS_TELUGU_LAYOUT, "" - IDS_MARATHI_LAYOUT, "" - IDS_HINDI_TRADITIONAL_LAYOUT, " " - IDS_CANTONESE_PHONETIC_LAYOUT, " " - IDS_FAEROESE_LAYOUT, "" - IDS_FYRO_MACEDONIAN_LAYOUT, " (FYROM)" - IDS_CANADIAN_MULTILINGUAL_STD_LAYOUT, " ()" - IDS_CHINESE_TRADITIONAL_QUICK_LAYOUT, " () - " - IDS_CHINESE_TRADITIONAL_ARRAY_LAYOUT, " () - " - IDS_KAZAKH_LAYOUT, "" - IDS_UZBEK_CYRILLIC_LAYOUT, " " - IDS_AZERI_CYRILLIC_LAYOUT, " ()" - IDS_TATAR_LAYOUT, "" - IDS_AZERI_LATIN_LAYOUT, " ()" - IDS_VIETNAMESE_LAYOUT, "" - IDS_GEORGIAN_LAYOUT, "" - IDS_ARMENIAN_EASTERN_LAYOUT, " " - IDS_ARMENIAN_WESTERN_LAYOUT, " " - IDS_GREEK_POLYTONIC_LAYOUT, " " - IDS_USENG_TABLE_IBM_ARABIC238L_LAYOUT, " IBM 238_L" - IDS_FARSI_LAYOUT, "" - IDS_GAELIC_LAYOUT, "" - IDS_PORTUGUESE_BRAZIL_ABNT2_LAYOUT, " ()" - IDS_MONGOLIAN_CYRILLIC_LAYOUT, " ()" - IDS_KYRGYZ_CYRILLIC_LAYOUT, " ()" - IDS_URDU_LAYOUT, "" - IDS_SYRIAC_LAYOUT, "" - IDS_SYRIAC_PHONETIC_LAYOUT, " " - IDS_DIVEHI_PHONETIC_LAYOUT, " " - IDS_DIVEHI_TYPEWRITER_LAYOUT, " " - IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, " ()" - IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, " (BDS)" - IDS_BULGARIAN_BDS_LAYOUT, " (BDS 5237-1978)" - IDS_GERMAN_RISTOME_LAYOUT, " (RISTOME)" - IDS_GERMAN_NEO_11_LAYOUT, " (NEO-1.1)" - IDS_GERMAN_DE_ERGO_LAYOUT, " (de_ergo)" - IDS_BURMESE_LAYOUT, "" - IDS_UKRAINIAN_STUDENT_LAYOUT, " ()" + IDS_US_LAYOUT, "США" + IDS_BELGIAN_LAYOUT, "Бельгийская (с точкой)" + IDS_BELGIAN_FRENCH_LAYOUT, "Бельгийская (французская)" + IDS_PORTUGUESE_BRAZILIAN_ABNT_LAYOUT, "Португальская (Бразильская ABNT)" + IDS_CANADIAN_FRENCH_LAYOUT, "Канадская (французская)" + IDS_CANADIAN_FRENCH_LEGACY_LAYOUT, "Канадская (французская традиционная)" + IDS_DANISH_LAYOUT, "Датская" + IDS_DUTCH_LAYOUT, "Голландская" + IDS_FINNISH_LAYOUT, "Финская" + IDS_FRENCH_LAYOUT, "Французская" + IDS_GERMAN_LAYOUT, "Немецкая" + IDS_GERMAN_IBM_LAYOUT, "Немецкая (IBM)" + IDS_ICELANDIC_LAYOUT, "Исландская" + IDS_IRISH_LAYOUT, "Ирландская" + IDS_ITALIAN_LAYOUT, "Итальянская" + IDS_ITALIAN_142_LAYOUT, "Итальянская (142)" + IDS_LATIN_AMERICAN_LAYOUT, "Латиноамериканская" + IDS_NORWEGIAN_LAYOUT, "Норвежская" + IDS_PORTUGUESE_LAYOUT, "Португальская" + IDS_SPANISH_LAYOUT, "Испанская" + IDS_SPANISH_VARIANTION_LAYOUT, "Испанская 2" + IDS_SWEDISH_LAYOUT, "Шведская" + IDS_SWISS_FRENCH_LAYOUT, "Швейцарская французская" + IDS_SWISS_GERMAN_LAYOUT, "Швейцарская немецкая" + IDS_UNITED_KINGDOM_LAYOUT, "Британская" + IDS_UNITED_STATES_INTERNATIONAL_LAYOUT, "США - международная" + IDS_UNITED_STATES_DVORAK_FOR_LEFT_HAND_LAYOUT, "США - по Двораку для левой руки" + IDS_UNITED_STATES_DVORAK_FOR_RIGHT_HAND_LAYOUT, "США - по Двораку для правой руки" + IDS_ALBANIAN_LAYOUT, "Албанская" + IDS_CROATIAN_LAYOUT, "Хорватская" + IDS_CZECH_LAYOUT, "Чешская" + IDS_CZECH_QWERTY_LAYOUT, "Чешская (QWERTY)" + IDS_HUNGARIAN_LAYOUT, "Венгерская" + IDS_HUNGARIAN_101_KEY_LAYOUT, "Венгерская (101 клавиша)" + IDS_POLISH_LAYOUT, "Польская (программистская)" + IDS_POLISH_214_LAYOUT, "Польская (214)" + IDS_ROMANIAN_LAYOUT, "Румынская" + IDS_SERBIAN_LATIN_LAYOUT, "Сербская (латиница)" + IDS_SLOVAK_LAYOUT, "Словацкая" + IDS_SLOVAK_QWERTY_LAYOUT, "Словацкая (QWERTY)" + IDS_SLOVENIAN_LAYOUT, "Словенская" + IDS_ESTONIAN_LAYOUT, "Эстонская" + IDS_LATVIAN_LAYOUT, "Латышская" + IDS_LATVIAN_QWERTY_LAYOUT, "Латвийская (QWERTY)" + IDS_LITHUANIAN_IBM_LAYOUT, "Литовская IBM" + IDS_GREEK_LAYOUT, "Греческая" + IDS_GREEK_LATIN_LAYOUT, "Греческая латиница" + IDS_GREEK_220_LAYOUT, "Греческая (220)" + IDS_GREEK_319_LAYOUT, "Греческая (319)" + IDS_GREEK_220_LATIN_LAYOUT, "Греческая (220) латиница" + IDS_GREEK_319_LATIN_LAYOUT, "Греческая (319) латиница" + IDS_BELARUSIAN_LAYOUT, "Белорусская" + IDS_BULGARIAN_LAYOUT, "Болгарская" + IDS_BULGARIAN_LATIN_LAYOUT, "Болгарская (латиница)" + IDS_RUSSIAN_LAYOUT, "Русская" + IDS_RUSSIAN_TYPEWRITER_LAYOUT, "Русская (машинопись)" + IDS_SERBIAN_CYRILLIC_LAYOUT, "Сербская (кириллица)" + IDS_UKRAINIAN_LAYOUT, "Украинская" + IDS_TURKISH_F_LAYOUT, "Турецкая F" + IDS_TURKISH_Q_LAYOUT, "Турецкая Q" + IDS_JAPANESE_LAYOUT, "Японская" + IDS_JAPANESE_INPUT_SYSTEM_MSIME2002_LAYOUT, "Японская система ввода (MS-IME2002)" + IDS_KOREAN_LAYOUT, "Корейский" + IDS_KOREAN_INPUT_SYSTEM_MSIME2002_LAYOUT, "Корейская система ввода (MS-IME98)" + IDS_CHINESE_TRADITIONAL_USKEYBOARD_LAYOUT, "Китайская (традиционная) - США" + IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT, "Китайская (традиционная) - фонетическая" + IDS_CHINESE_TRADITIONAL_CHANGJIE_LAYOUT, "Китайская (традиционная) - ChangJie" + IDS_CHINESE_TRADITIONAL_BIG5CODE_LAYOUT, "Китайская (традиционная) - Big5 Code" + IDS_CHINESE_TRADITIONAL_DAYI_LAYOUT, "Китайская (традиционная) - DaYi" + IDS_CHINESE_TRADITIONAL_UNICODE_LAYOUT, "Китайская (традиционная) - Юникод" + IDS_CHINESE_TRADITIONAL_ALPHANUMERIC_LAYOUT, "Китайская (традиционная) - алфавитно-цифровая" + IDS_CHINESE_SIMPLIFIED_USKEYBOARD_LAYOUT, "Китайская (упрощенная) - США" + IDS_CHINESE_SIMPLIFIED_QUANPIN_LAYOUT, "Китайская (упрощенная) - QuanPin" + IDS_CHINESE_SIMPLIFIED_SHUANGPIN_LAYOUT, "Китайская (упрощенная) - ShuangPin" + IDS_CHINESE_SIMPLIFIED_ZHENGMA_LAYOUT, "Китайская (упрощенная) - ZhengMa" + IDS_CHINESE_SIMPLIFIED_NEIMA_LAYOUT, "Китайская (упрощенная) - NeiMa" + IDS_THAI_KEDMANEE_LAYOUT, "Тайская Кедмани" + IDS_THAI_PATTACHOTE_LAYOUT, "Тайская Паташот" + IDS_THAI_KEDMANEE_NONSHIFTLOCK_LAYOUT, "Тайская Кедмани (без ShiftLock)" + IDS_THAI_PATTACHOTE_NONSHIFTLOCK_LAYOUT, "Тайская Паташот (без ShiftLock)" + IDS_HEBREW_LAYOUT, "Иврит" + IDS_ARABIC_101_LAYOUT, "Арабская (101)" + IDS_ARABIC_102_LAYOUT, "Арабская (102)" + IDS_ARABIC_102_AZERTY_LAYOUT, "Арабская (102) AZERTY" + IDS_CZECH_PROGRAMMERS_LAYOUT, "Чешская (программистская)" + IDS_LITHUANIAN_LAYOUT, "Литовская" + IDS_BELGIAN_COMMA_LAYOUT, "Бельгийская (с запятой)" + IDS_CHINESE_TRADITIONAL_NEWPHONETIC_LAYOUT, "Китайская (традиционная) - новая фонетическая" + IDS_CHINESE_SIMPLIFIED_MSPINYINIME30_LAYOUT, "Китайская (упрощенная) - Microsoft Pinyin IME 3.0" + IDS_UNITED_STATES_DVIRAK_LAYOUT, "США - по Двораку" + IDS_CHINESE_TRADITIONAL_NEWCHANGJIE_LAYOUT, "Китайская (традиционная) - новая ChangJie" + IDS_ASSAMESE_LAYOUT, "Ассамская" + IDS_BENGALI_LAYOUT, "Бенгальская" + IDS_DEVANAGARI_INSCRIPT_LAYOUT, "Деванагари - инскрипт" + IDS_GUJARATI_LAYOUT, "Гуджарати" + IDS_KANNADA_LAYOUT, "Каннада" + IDS_MALAYALAM_LAYOUT, "Малаялам" + IDS_ORIYA_LAYOUT, "Ория" + IDS_PUNJABI_LAYOUT, "Пенджабская" + IDS_TAMIL_LAYOUT, "Тамильская" + IDS_TELUGU_LAYOUT, "Телугу" + IDS_MARATHI_LAYOUT, "Маратхи" + IDS_HINDI_TRADITIONAL_LAYOUT, "Хинди традиционная" + IDS_CANTONESE_PHONETIC_LAYOUT, "Кантонская фонетическая" + IDS_FAEROESE_LAYOUT, "Фарерская" + IDS_FYRO_MACEDONIAN_LAYOUT, "Македонский (FYROM)" + IDS_CANADIAN_MULTILINGUAL_STD_LAYOUT, "Канадская стандартная (многоязычная)" + IDS_CHINESE_TRADITIONAL_QUICK_LAYOUT, "Китайская (традиционная) - быстрая" + IDS_CHINESE_TRADITIONAL_ARRAY_LAYOUT, "Китайская (традиционная) - таблицей" + IDS_KAZAKH_LAYOUT, "Казахская" + IDS_UZBEK_CYRILLIC_LAYOUT, "Узбекская кириллица" + IDS_AZERI_CYRILLIC_LAYOUT, "Азербайджанская (кир)" + IDS_TATAR_LAYOUT, "Татарская" + IDS_AZERI_LATIN_LAYOUT, "Азербайджанская (лат)" + IDS_VIETNAMESE_LAYOUT, "Вьетнамская" + IDS_GEORGIAN_LAYOUT, "Грузинская" + IDS_ARMENIAN_EASTERN_LAYOUT, "Армянская восточная" + IDS_ARMENIAN_WESTERN_LAYOUT, "Армянская западная" + IDS_GREEK_POLYTONIC_LAYOUT, "Греческая политоническая" + IDS_USENG_TABLE_IBM_ARABIC238L_LAYOUT, "США английская табличная для IBM арабского 238_L" + IDS_FARSI_LAYOUT, "Фарси" + IDS_GAELIC_LAYOUT, "Гэльская" + IDS_PORTUGUESE_BRAZIL_ABNT2_LAYOUT, "Португальская (Бразилия)" + IDS_MONGOLIAN_CYRILLIC_LAYOUT, "Монгольская (кириллица)" + IDS_KYRGYZ_CYRILLIC_LAYOUT, "Киргизская (кириллица)" + IDS_URDU_LAYOUT, "Урду" + IDS_SYRIAC_LAYOUT, "Сирийская" + IDS_SYRIAC_PHONETIC_LAYOUT, "Сирийская фонетическая" + IDS_DIVEHI_PHONETIC_LAYOUT, "Дивихай фонетическая" + IDS_DIVEHI_TYPEWRITER_LAYOUT, "Дивихай машинопись" + IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, "Болгарская фонетическая (классическая)" + IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, "Болгарская фонетическая (BDS)" + IDS_BULGARIAN_BDS_LAYOUT, "Болгарская (BDS 5237-1978)" + IDS_GERMAN_RISTOME_LAYOUT, "Немецкая (RISTOME)" + IDS_GERMAN_NEO_11_LAYOUT, "Немецкая (NEO-1.1)" + IDS_GERMAN_DE_ERGO_LAYOUT, "Немецкая (de_ergo)" + IDS_BURMESE_LAYOUT, "Бирманская" + IDS_UKRAINIAN_STUDENT_LAYOUT, "Украинская (студенческая)" END diff --git a/dll/cpl/input/lang/uk-UA.rc b/dll/cpl/input/lang/uk-UA.rc index ad112a86d6a..df36abaab1b 100644 --- a/dll/cpl/input/lang/uk-UA.rc +++ b/dll/cpl/input/lang/uk-UA.rc @@ -10,241 +10,241 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGESETTINGS DIALOGEX 0, 0, 254, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . """" """".", -1, 9, 6, 238, 25 + LTEXT "Виберіть потрібні розкладки для кожної мови введення зі списку. Для зміни списку використовуйте кнопки ""Додати"" і ""Видалити"".", -1, 9, 6, 238, 25 CONTROL "TEXT", IDC_KEYLAYOUT_LIST, "SYSLISTVIEW32", WS_BORDER | WS_VSCROLL | WS_TABSTOP | LVS_SORTASCENDING | LVS_REPORT | 0x0000808D, 8, 36, 237, 101 - PUSHBUTTON "&", IDC_SET_DEFAULT, 101, 159, 144, 14 - PUSHBUTTON "&...", IDC_ADD_BUTTON, 27, 142, 70, 14 - PUSHBUTTON "&...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 - PUSHBUTTON "&...", IDC_PROP_BUTTON, 175, 142, 70, 14 - GROUPBOX "", -1, 7, 185, 240, 36 - PUSHBUTTON "& ...", IDC_KEY_SET_BTN, 14, 198, 110, 14 + PUSHBUTTON "Замов&чування", IDC_SET_DEFAULT, 101, 159, 144, 14 + PUSHBUTTON "&Додати...", IDC_ADD_BUTTON, 27, 142, 70, 14 + PUSHBUTTON "В&идалити...", IDC_REMOVE_BUTTON, 101, 142, 70, 14 + PUSHBUTTON "В&ластивості...", IDC_PROP_BUTTON, 175, 142, 70, 14 + GROUPBOX "Налаштування", -1, 7, 185, 240, 36 + PUSHBUTTON "&Параметри клавіатури...", IDC_KEY_SET_BTN, 14, 198, 110, 14 END IDD_KEYSETTINGS DIALOGEX 0, 0, 272, 163 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Додаткові параметри клавіатури" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " Caps Lock", -1, 7, 7, 258, 26 - AUTORADIOBUTTON "& CAPS LOCK", IDC_PRESS_CL_KEY_RB, 10, 17, 130, 11, WS_GROUP - AUTORADIOBUTTON " & SHIFT", IDC_PRESS_SHIFT_KEY_RB, 144, 17, 120, 11, NOT WS_TABSTOP - GROUPBOX " ", -1, 7, 37, 258, 95 - LTEXT "ij", -1, 14, 47, 60, 9 - RTEXT "& ", -1, 177, 47, 79, 9 + GROUPBOX "Вимкнення режиму Caps Lock", -1, 7, 7, 258, 26 + AUTORADIOBUTTON "&при натисненні клавіші CAPS LOCK", IDC_PRESS_CL_KEY_RB, 10, 17, 130, 11, WS_GROUP + AUTORADIOBUTTON "при &натисненні клавіші SHIFT", IDC_PRESS_SHIFT_KEY_RB, 144, 17, 120, 11, NOT WS_TABSTOP + GROUPBOX "Сполучення клавіш для мов вводу", -1, 7, 37, 258, 95 + LTEXT "Дія", -1, 14, 47, 60, 9 + RTEXT "&Сполучення клавіш", -1, 177, 47, 79, 9 CONTROL "", IDC_KEY_LISTVIEW, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_AUTOARRANGE | LVS_SINGLESEL, 14, 57, 244, 52, WS_EX_CLIENTEDGE - PUSHBUTTON "& ...", IDC_CHANGE_KEY_SEQ_BTN, 152, 113, 106, 14, WS_GROUP + PUSHBUTTON "З&міна сполучення клавіш...", IDC_CHANGE_KEY_SEQ_BTN, 152, 113, 106, 14, WS_GROUP DEFPUSHBUTTON "OK", IDOK, 66, 140, 70, 14 - PUSHBUTTON "", IDCANCEL, 146, 140, 70, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 146, 140, 70, 14 END IDD_ADD DIALOGEX 20, 20, 227, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Додавання мови вводу" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 61, 10 + LTEXT "&Мова вводу:", -1, 7, 7, 61, 10 COMBOBOX IDC_INPUT_LANG_COMBO, 7, 17, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT "& (IME):", -1, 7, 36, 140, 10 + LTEXT "&Розкладка клавіатури або засіб вводу (IME):", -1, 7, 36, 140, 10 COMBOBOX IDC_KEYBOARD_LO_COMBO, 7, 47, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 68, 50, 14 - PUSHBUTTON "", IDCANCEL, 169, 68, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 169, 68, 50, 14 END IDD_CHANGE_KEY_SEQ DIALOGEX 5, 100, 230, 125 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Зміна сполучення клавіш" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", -1, 9, 5, 155, 110 - AUTOCHECKBOX "& ", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 + AUTOCHECKBOX "&Перемикати мови вводу", IDC_SWITCH_INPUT_LANG_CB, 15, 15, 105, 12 LTEXT "Shift", -1, 73, 37, 27, 12 CTEXT "+", -1, 62, 37, 8, 9 AUTORADIOBUTTON "&Ctrl", IDC_CTRL_LANG, 29, 31, 30, 11 - AUTORADIOBUTTON "ALT &", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 - AUTOCHECKBOX "& ", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 + AUTORADIOBUTTON "ALT з&ліва", IDC_LEFT_ALT_LANG, 29, 45, 46, 12 + AUTOCHECKBOX "Переми&кати розкладки клавіатури", IDC_SWITCH_KBLAYOUTS_CB, 16, 65, 141, 12 LTEXT "Shift", -1, 74, 87, 27, 12 CTEXT "+", -1, 63, 87, 8, 9 AUTORADIOBUTTON "C&trl", IDC_CTRL_LAYOUT, 30, 81, 30, 11 - AUTORADIOBUTTON "ALT &", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 + AUTORADIOBUTTON "ALT &зліва", IDC_LEFT_ALT_LAYOUT, 30, 95, 44, 12 DEFPUSHBUTTON "OK", IDOK, 172, 9, 50, 14 - PUSHBUTTON "", IDCANCEL, 172, 27, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 172, 27, 50, 14 END IDD_INPUT_LANG_PROP DIALOGEX 20, 20, 227, 75 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Властивості мови вводу" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 7, 7, 61, 8 + LTEXT "Мова вводу:", -1, 7, 7, 61, 8 LTEXT "", IDC_INPUT_LANG_STR, 73, 7, 129, 8 - LTEXT "& (IME):", -1, 7, 21, 150, 10 + LTEXT "&Розкладка клавіатури або засіб вводу (IME):", -1, 7, 21, 150, 10 COMBOBOX IDC_KB_LAYOUT_IME_COMBO, 7, 32, 212, 150, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 53, 52, 14 - PUSHBUTTON "", IDCANCEL, 169, 53, 52, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 169, 53, 52, 14 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " ." - IDS_KEYBOARD "" - IDS_NONE "()" - IDS_UNKNOWN "( )" - IDS_RESTART " ' ?" - IDS_WHATS_THIS " ?" - IDS_LANGUAGE "" - IDS_LAYOUT " " - IDS_REM_QUESTION " ?" - IDS_CONFIRMATION "ϳ" - IDS_LAYOUT_EXISTS " ." - IDS_LAYOUT_EXISTS2 " ." + IDS_CPLSYSTEMNAME "Мови та служби текстового вводу" + IDS_CPLSYSTEMDESCRIPTION "Налаштовує параметри для текстового вводу." + IDS_KEYBOARD "Клавіатура" + IDS_NONE "(Немає)" + IDS_UNKNOWN "(Немає даних)" + IDS_RESTART "Ви дійсно бажаєте перезавантажити комп'ютер зараз?" + IDS_WHATS_THIS "Що це?" + IDS_LANGUAGE "Мова" + IDS_LAYOUT "Розкладка клавіатури" + IDS_REM_QUESTION "Ви дійсно хочете видалити вибрану розкладку клавіатури?" + IDS_CONFIRMATION "Підтвердження" + IDS_LAYOUT_EXISTS "Ця розкладка вже існує." + IDS_LAYOUT_EXISTS2 "Ця розкладка вже існує і не може бути додана." IDS_CTRL_SHIFT "Ctrl+Shift" - IDS_LEFT_ALT_SHIFT "Alt +Shift" - IDS_SWITCH_BET_INLANG " " + IDS_LEFT_ALT_SHIFT "Alt зліва+Shift" + IDS_SWITCH_BET_INLANG "Перемикання мов вводу" END STRINGTABLE BEGIN - IDS_US_LAYOUT, "" - IDS_BELGIAN_LAYOUT, " ( )" - IDS_BELGIAN_FRENCH_LAYOUT, " ()" - IDS_PORTUGUESE_BRAZILIAN_ABNT_LAYOUT, " ( ABNT)" - IDS_CANADIAN_FRENCH_LAYOUT, " ()" - IDS_CANADIAN_FRENCH_LEGACY_LAYOUT, " (, )" - IDS_DANISH_LAYOUT, "" - IDS_DUTCH_LAYOUT, "ͳ" - IDS_FINNISH_LAYOUT, "Գ" - IDS_FRENCH_LAYOUT, "" - IDS_GERMAN_LAYOUT, "ͳ" - IDS_GERMAN_IBM_LAYOUT, "ͳ (IBM)" - IDS_ICELANDIC_LAYOUT, "" - IDS_IRISH_LAYOUT, "" - IDS_ITALIAN_LAYOUT, "" - IDS_ITALIAN_142_LAYOUT, " (142)" - IDS_LATIN_AMERICAN_LAYOUT, " " - IDS_NORWEGIAN_LAYOUT, "" - IDS_PORTUGUESE_LAYOUT, "" - IDS_SPANISH_LAYOUT, "" - IDS_SPANISH_VARIANTION_LAYOUT, " 2" - IDS_SWEDISH_LAYOUT, "" - IDS_SWISS_FRENCH_LAYOUT, " ()" - IDS_SWISS_GERMAN_LAYOUT, "ͳ ()" - IDS_UNITED_KINGDOM_LAYOUT, "" - IDS_UNITED_STATES_INTERNATIONAL_LAYOUT, " - " - IDS_UNITED_STATES_DVORAK_FOR_LEFT_HAND_LAYOUT, " - ( )" - IDS_UNITED_STATES_DVORAK_FOR_RIGHT_HAND_LAYOUT, " - ( )" - IDS_ALBANIAN_LAYOUT, "" - IDS_CROATIAN_LAYOUT, "" - IDS_CZECH_LAYOUT, "" - IDS_CZECH_QWERTY_LAYOUT, " (QWERTY)" - IDS_HUNGARIAN_LAYOUT, "" - IDS_HUNGARIAN_101_KEY_LAYOUT, " (101 )" - IDS_POLISH_LAYOUT, " ()" - IDS_POLISH_214_LAYOUT, " (214)" - IDS_ROMANIAN_LAYOUT, "" - IDS_SERBIAN_LATIN_LAYOUT, " ()" - IDS_SLOVAK_LAYOUT, "" - IDS_SLOVAK_QWERTY_LAYOUT, " (QWERTY)" - IDS_SLOVENIAN_LAYOUT, "" - IDS_ESTONIAN_LAYOUT, "" - IDS_LATVIAN_LAYOUT, "" - IDS_LATVIAN_QWERTY_LAYOUT, " (QWERTY)" - IDS_LITHUANIAN_IBM_LAYOUT, " (IBM)" - IDS_GREEK_LAYOUT, "" - IDS_GREEK_LATIN_LAYOUT, " ()" - IDS_GREEK_220_LAYOUT, " (220)" - IDS_GREEK_319_LAYOUT, " (319)" - IDS_GREEK_220_LATIN_LAYOUT, " (220, )" - IDS_GREEK_319_LATIN_LAYOUT, " (319, )" - IDS_BELARUSIAN_LAYOUT, "" - IDS_BULGARIAN_LAYOUT, "" - IDS_BULGARIAN_LATIN_LAYOUT, " ()" - IDS_RUSSIAN_LAYOUT, "" - IDS_RUSSIAN_TYPEWRITER_LAYOUT, " ( )" - IDS_SERBIAN_CYRILLIC_LAYOUT, " ()" - IDS_UKRAINIAN_LAYOUT, "" - IDS_TURKISH_F_LAYOUT, " F" - IDS_TURKISH_Q_LAYOUT, " Q" - IDS_JAPANESE_LAYOUT, "" - IDS_JAPANESE_INPUT_SYSTEM_MSIME2002_LAYOUT, " (MS-IME2002)" - IDS_KOREAN_LAYOUT, "" - IDS_KOREAN_INPUT_SYSTEM_MSIME2002_LAYOUT, " (MS-IME2002)" - IDS_CHINESE_TRADITIONAL_USKEYBOARD_LAYOUT, " ( ) - " - IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT, " ( ) - " - IDS_CHINESE_TRADITIONAL_CHANGJIE_LAYOUT, " ( ) - ChangJie" - IDS_CHINESE_TRADITIONAL_BIG5CODE_LAYOUT, " ( ) - Big5 Code" - IDS_CHINESE_TRADITIONAL_DAYI_LAYOUT, " ( ) - DaYi" - IDS_CHINESE_TRADITIONAL_UNICODE_LAYOUT, " ( ) - " - IDS_CHINESE_TRADITIONAL_ALPHANUMERIC_LAYOUT, " ( ) - -" - IDS_CHINESE_SIMPLIFIED_USKEYBOARD_LAYOUT, " ( ) - " - IDS_CHINESE_SIMPLIFIED_QUANPIN_LAYOUT, " ( ) - QuanPin" - IDS_CHINESE_SIMPLIFIED_SHUANGPIN_LAYOUT, " ( ) - ShuangPin" - IDS_CHINESE_SIMPLIFIED_ZHENGMA_LAYOUT, " ( ) - ZhengMa" - IDS_CHINESE_SIMPLIFIED_NEIMA_LAYOUT, " ( ) - NeiMa" - IDS_THAI_KEDMANEE_LAYOUT, " " - IDS_THAI_PATTACHOTE_LAYOUT, " " - IDS_THAI_KEDMANEE_NONSHIFTLOCK_LAYOUT, " ( ShiftLock)" - IDS_THAI_PATTACHOTE_NONSHIFTLOCK_LAYOUT, " ( ShiftLock)" - IDS_HEBREW_LAYOUT, "" - IDS_ARABIC_101_LAYOUT, " (101)" - IDS_ARABIC_102_LAYOUT, " (102)" - IDS_ARABIC_102_AZERTY_LAYOUT, " (102) AZERTY" - IDS_CZECH_PROGRAMMERS_LAYOUT, " ()" - IDS_LITHUANIAN_LAYOUT, "" - IDS_BELGIAN_COMMA_LAYOUT, " ( )" - IDS_CHINESE_TRADITIONAL_NEWPHONETIC_LAYOUT, " ( ) - " - IDS_CHINESE_SIMPLIFIED_MSPINYINIME30_LAYOUT, " ( ) - Microsoft Pinyin IME 3.0" - IDS_UNITED_STATES_DVIRAK_LAYOUT, " - " - IDS_CHINESE_TRADITIONAL_NEWCHANGJIE_LAYOUT, " ( ) - ChangJie" - IDS_ASSAMESE_LAYOUT, "" - IDS_BENGALI_LAYOUT, "" - IDS_DEVANAGARI_INSCRIPT_LAYOUT, " (INSCRIPT)" - IDS_GUJARATI_LAYOUT, "" - IDS_KANNADA_LAYOUT, "" - IDS_MALAYALAM_LAYOUT, "" - IDS_ORIYA_LAYOUT, "" - IDS_PUNJABI_LAYOUT, "" - IDS_TAMIL_LAYOUT, "" - IDS_TELUGU_LAYOUT, "" - IDS_MARATHI_LAYOUT, "" - IDS_HINDI_TRADITIONAL_LAYOUT, "ճ ()" - IDS_CANTONESE_PHONETIC_LAYOUT, " ()" - IDS_FAEROESE_LAYOUT, "" - IDS_FYRO_MACEDONIAN_LAYOUT, " ()" - IDS_CANADIAN_MULTILINGUAL_STD_LAYOUT, " ()" - IDS_CHINESE_TRADITIONAL_QUICK_LAYOUT, " ( ) - " - IDS_CHINESE_TRADITIONAL_ARRAY_LAYOUT, " ( ) - " - IDS_KAZAKH_LAYOUT, "" - IDS_UZBEK_CYRILLIC_LAYOUT, " ()" - IDS_AZERI_CYRILLIC_LAYOUT, " ()" - IDS_TATAR_LAYOUT, "" - IDS_AZERI_LATIN_LAYOUT, " ()" - IDS_VIETNAMESE_LAYOUT, "'" - IDS_GEORGIAN_LAYOUT, "" - IDS_ARMENIAN_EASTERN_LAYOUT, "³ ()" - IDS_ARMENIAN_WESTERN_LAYOUT, "³ ()" - IDS_GREEK_POLYTONIC_LAYOUT, " ()" - IDS_USENG_TABLE_IBM_ARABIC238L_LAYOUT, " () (IBM, 238_L)" - IDS_FARSI_LAYOUT, "" - IDS_GAELIC_LAYOUT, "" - IDS_PORTUGUESE_BRAZIL_ABNT2_LAYOUT, " ( ABNT2)" - IDS_MONGOLIAN_CYRILLIC_LAYOUT, " ()" - IDS_KYRGYZ_CYRILLIC_LAYOUT, " ()" - IDS_URDU_LAYOUT, "" - IDS_SYRIAC_LAYOUT, "" - IDS_SYRIAC_PHONETIC_LAYOUT, " ()" - IDS_DIVEHI_PHONETIC_LAYOUT, " ()" - IDS_DIVEHI_TYPEWRITER_LAYOUT, " ( )" - IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, " ()" - IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, " (BDS)" - IDS_BULGARIAN_BDS_LAYOUT, " BDS 5237-1978" - IDS_GERMAN_RISTOME_LAYOUT, "ͳ (RISTOME)" - IDS_GERMAN_NEO_11_LAYOUT, "ͳ (NEO-1.1)" - IDS_GERMAN_DE_ERGO_LAYOUT, "ͳ (de_ergo)" - IDS_BURMESE_LAYOUT, "" - IDS_UKRAINIAN_STUDENT_LAYOUT, " ()" + IDS_US_LAYOUT, "США" + IDS_BELGIAN_LAYOUT, "Бельгійська (із крапкою)" + IDS_BELGIAN_FRENCH_LAYOUT, "Французька (Бельгія)" + IDS_PORTUGUESE_BRAZILIAN_ABNT_LAYOUT, "Португальська (Бразилія ABNT)" + IDS_CANADIAN_FRENCH_LAYOUT, "Французька (Канада)" + IDS_CANADIAN_FRENCH_LEGACY_LAYOUT, "Французька (Канада, традиційна)" + IDS_DANISH_LAYOUT, "Датська" + IDS_DUTCH_LAYOUT, "Нідерландська" + IDS_FINNISH_LAYOUT, "Фінська" + IDS_FRENCH_LAYOUT, "Французька" + IDS_GERMAN_LAYOUT, "Німецька" + IDS_GERMAN_IBM_LAYOUT, "Німецька (IBM)" + IDS_ICELANDIC_LAYOUT, "Ісландська" + IDS_IRISH_LAYOUT, "Ірландська" + IDS_ITALIAN_LAYOUT, "Італійська" + IDS_ITALIAN_142_LAYOUT, "Італійська (142)" + IDS_LATIN_AMERICAN_LAYOUT, "Латинська Америка" + IDS_NORWEGIAN_LAYOUT, "Норвезька" + IDS_PORTUGUESE_LAYOUT, "Португальська" + IDS_SPANISH_LAYOUT, "Іспанська" + IDS_SPANISH_VARIANTION_LAYOUT, "Іспанська 2" + IDS_SWEDISH_LAYOUT, "Шведська" + IDS_SWISS_FRENCH_LAYOUT, "Французька (Швейцарія)" + IDS_SWISS_GERMAN_LAYOUT, "Німецька (Швейцарія)" + IDS_UNITED_KINGDOM_LAYOUT, "Великобританія" + IDS_UNITED_STATES_INTERNATIONAL_LAYOUT, "США - міжнародна" + IDS_UNITED_STATES_DVORAK_FOR_LEFT_HAND_LAYOUT, "США - Дворак (для лівої руки)" + IDS_UNITED_STATES_DVORAK_FOR_RIGHT_HAND_LAYOUT, "США - Дворак (для правої руки)" + IDS_ALBANIAN_LAYOUT, "Албанська" + IDS_CROATIAN_LAYOUT, "Хорватська" + IDS_CZECH_LAYOUT, "Чеська" + IDS_CZECH_QWERTY_LAYOUT, "Чеська (QWERTY)" + IDS_HUNGARIAN_LAYOUT, "Угорська" + IDS_HUNGARIAN_101_KEY_LAYOUT, "Угорська (101 клавіша)" + IDS_POLISH_LAYOUT, "Польська (програмістська)" + IDS_POLISH_214_LAYOUT, "Польська (214)" + IDS_ROMANIAN_LAYOUT, "Румунська" + IDS_SERBIAN_LATIN_LAYOUT, "Сербська (латиниця)" + IDS_SLOVAK_LAYOUT, "Словацька" + IDS_SLOVAK_QWERTY_LAYOUT, "Словацька (QWERTY)" + IDS_SLOVENIAN_LAYOUT, "Словенська" + IDS_ESTONIAN_LAYOUT, "Естонська" + IDS_LATVIAN_LAYOUT, "Латвійська" + IDS_LATVIAN_QWERTY_LAYOUT, "Латвійська (QWERTY)" + IDS_LITHUANIAN_IBM_LAYOUT, "Литовська (IBM)" + IDS_GREEK_LAYOUT, "Грецька" + IDS_GREEK_LATIN_LAYOUT, "Грецька (латиниця)" + IDS_GREEK_220_LAYOUT, "Грецька (220)" + IDS_GREEK_319_LAYOUT, "Грецька (319)" + IDS_GREEK_220_LATIN_LAYOUT, "Грецька (220, латиниця)" + IDS_GREEK_319_LATIN_LAYOUT, "Грецька (319, латиниця)" + IDS_BELARUSIAN_LAYOUT, "Білоруська" + IDS_BULGARIAN_LAYOUT, "Болгарська" + IDS_BULGARIAN_LATIN_LAYOUT, "Болгарська (латиниця)" + IDS_RUSSIAN_LAYOUT, "Російська" + IDS_RUSSIAN_TYPEWRITER_LAYOUT, "Російська (друкарська машинка)" + IDS_SERBIAN_CYRILLIC_LAYOUT, "Сербська (кирилиця)" + IDS_UKRAINIAN_LAYOUT, "Українська" + IDS_TURKISH_F_LAYOUT, "Турецька F" + IDS_TURKISH_Q_LAYOUT, "Турецька Q" + IDS_JAPANESE_LAYOUT, "Японська" + IDS_JAPANESE_INPUT_SYSTEM_MSIME2002_LAYOUT, "Японський засіб вводу (MS-IME2002)" + IDS_KOREAN_LAYOUT, "Корейська" + IDS_KOREAN_INPUT_SYSTEM_MSIME2002_LAYOUT, "Корейський засіб вводу (MS-IME2002)" + IDS_CHINESE_TRADITIONAL_USKEYBOARD_LAYOUT, "Китайська (традиційне письмо) - США" + IDS_CHINESE_TRADITIONAL_PHONETIC_LAYOUT, "Китайська (традиційне письмо) - фонетична" + IDS_CHINESE_TRADITIONAL_CHANGJIE_LAYOUT, "Китайська (традиційне письмо) - ChangJie" + IDS_CHINESE_TRADITIONAL_BIG5CODE_LAYOUT, "Китайська (традиційне письмо) - Big5 Code" + IDS_CHINESE_TRADITIONAL_DAYI_LAYOUT, "Китайська (традиційне письмо) - DaYi" + IDS_CHINESE_TRADITIONAL_UNICODE_LAYOUT, "Китайська (традиційне письмо) - Юнікод" + IDS_CHINESE_TRADITIONAL_ALPHANUMERIC_LAYOUT, "Китайська (традиційне письмо) - алфавітно-цифрова" + IDS_CHINESE_SIMPLIFIED_USKEYBOARD_LAYOUT, "Китайська (спрощене письмо) - США" + IDS_CHINESE_SIMPLIFIED_QUANPIN_LAYOUT, "Китайська (спрощене письмо) - QuanPin" + IDS_CHINESE_SIMPLIFIED_SHUANGPIN_LAYOUT, "Китайська (спрощене письмо) - ShuangPin" + IDS_CHINESE_SIMPLIFIED_ZHENGMA_LAYOUT, "Китайська (спрощене письмо) - ZhengMa" + IDS_CHINESE_SIMPLIFIED_NEIMA_LAYOUT, "Китайська (спрощене письмо) - NeiMa" + IDS_THAI_KEDMANEE_LAYOUT, "Тайська Кедмані" + IDS_THAI_PATTACHOTE_LAYOUT, "Тайська Паташот" + IDS_THAI_KEDMANEE_NONSHIFTLOCK_LAYOUT, "Тайська Кедмані (без ShiftLock)" + IDS_THAI_PATTACHOTE_NONSHIFTLOCK_LAYOUT, "Тайська Паташот (без ShiftLock)" + IDS_HEBREW_LAYOUT, "Іврит" + IDS_ARABIC_101_LAYOUT, "Арабська (101)" + IDS_ARABIC_102_LAYOUT, "Арабська (102)" + IDS_ARABIC_102_AZERTY_LAYOUT, "Арабська (102) AZERTY" + IDS_CZECH_PROGRAMMERS_LAYOUT, "Чеська (програмістська)" + IDS_LITHUANIAN_LAYOUT, "Литовська" + IDS_BELGIAN_COMMA_LAYOUT, "Бельгійська (з комою)" + IDS_CHINESE_TRADITIONAL_NEWPHONETIC_LAYOUT, "Китайська (традиційне письмо) - нова фонетична" + IDS_CHINESE_SIMPLIFIED_MSPINYINIME30_LAYOUT, "Китайська (спрощене письмо) - Microsoft Pinyin IME 3.0" + IDS_UNITED_STATES_DVIRAK_LAYOUT, "США - Дворак" + IDS_CHINESE_TRADITIONAL_NEWCHANGJIE_LAYOUT, "Китайська (традиційне письмо) - нова ChangJie" + IDS_ASSAMESE_LAYOUT, "Ассамська" + IDS_BENGALI_LAYOUT, "Бенгалі" + IDS_DEVANAGARI_INSCRIPT_LAYOUT, "Деванагарі (INSCRIPT)" + IDS_GUJARATI_LAYOUT, "Гуджараті" + IDS_KANNADA_LAYOUT, "Каннада" + IDS_MALAYALAM_LAYOUT, "Малаялам" + IDS_ORIYA_LAYOUT, "Орія" + IDS_PUNJABI_LAYOUT, "Панджабі" + IDS_TAMIL_LAYOUT, "Тамільська" + IDS_TELUGU_LAYOUT, "Телугу" + IDS_MARATHI_LAYOUT, "Маратхі" + IDS_HINDI_TRADITIONAL_LAYOUT, "Хінді (традиційна)" + IDS_CANTONESE_PHONETIC_LAYOUT, "Кантонська (фонетична)" + IDS_FAEROESE_LAYOUT, "Фарерська" + IDS_FYRO_MACEDONIAN_LAYOUT, "Македонська (Македонія)" + IDS_CANADIAN_MULTILINGUAL_STD_LAYOUT, "Канадська стандартна (багатомовна)" + IDS_CHINESE_TRADITIONAL_QUICK_LAYOUT, "Китайська (традиційне письмо) - швидка" + IDS_CHINESE_TRADITIONAL_ARRAY_LAYOUT, "Китайська (традиційне письмо) - таблична" + IDS_KAZAKH_LAYOUT, "Казахська" + IDS_UZBEK_CYRILLIC_LAYOUT, "Узбецька (кирилиця)" + IDS_AZERI_CYRILLIC_LAYOUT, "Азербайджанська (кирилиця)" + IDS_TATAR_LAYOUT, "Татарська" + IDS_AZERI_LATIN_LAYOUT, "Азербайджанська (латиниця)" + IDS_VIETNAMESE_LAYOUT, "В'єтнамська" + IDS_GEORGIAN_LAYOUT, "Грузинська" + IDS_ARMENIAN_EASTERN_LAYOUT, "Вірменська (східна)" + IDS_ARMENIAN_WESTERN_LAYOUT, "Вірменська (західна)" + IDS_GREEK_POLYTONIC_LAYOUT, "Грецька (політонічна)" + IDS_USENG_TABLE_IBM_ARABIC238L_LAYOUT, "Англійська таблична (США) для арабської (IBM, 238_L)" + IDS_FARSI_LAYOUT, "Перська" + IDS_GAELIC_LAYOUT, "Гельська" + IDS_PORTUGUESE_BRAZIL_ABNT2_LAYOUT, "Португальська (Бразилія ABNT2)" + IDS_MONGOLIAN_CYRILLIC_LAYOUT, "Монгольська (кирилиця)" + IDS_KYRGYZ_CYRILLIC_LAYOUT, "Киргизька (кирилиця)" + IDS_URDU_LAYOUT, "Урду" + IDS_SYRIAC_LAYOUT, "Сирійська" + IDS_SYRIAC_PHONETIC_LAYOUT, "Сирійська (фонетична)" + IDS_DIVEHI_PHONETIC_LAYOUT, "Мальдівська (фонетична)" + IDS_DIVEHI_TYPEWRITER_LAYOUT, "Мальдівська (друкарська машинка)" + IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT, "Болгарська фонетична (класична)" + IDS_BULGARIAN_PHONETIC_BDS_LAYOUT, "Болгарська фонетична (BDS)" + IDS_BULGARIAN_BDS_LAYOUT, "Болгарська BDS 5237-1978" + IDS_GERMAN_RISTOME_LAYOUT, "Німецька (RISTOME)" + IDS_GERMAN_NEO_11_LAYOUT, "Німецька (NEO-1.1)" + IDS_GERMAN_DE_ERGO_LAYOUT, "Німецька (de_ergo)" + IDS_BURMESE_LAYOUT, "Бірманська" + IDS_UKRAINIAN_STUDENT_LAYOUT, "Українська (студентська)" END diff --git a/dll/cpl/input/rsrc.rc b/dll/cpl/input/rsrc.rc index 2dcb7b7f22a..3c2eb0e4311 100644 --- a/dll/cpl/input/rsrc.rc +++ b/dll/cpl/input/rsrc.rc @@ -10,9 +10,12 @@ #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/intl/CMakeLists.txt b/dll/cpl/intl/CMakeLists.txt index cae9ec0d80e..a1f1aa5ab29 100644 --- a/dll/cpl/intl/CMakeLists.txt +++ b/dll/cpl/intl/CMakeLists.txt @@ -2,8 +2,6 @@ set_unicode() set_rc_compiler() -add_definitions(-D_DLL -D__USE_CRTIMP) - spec2def(intl.cpl intl.spec) add_library(intl SHARED diff --git a/dll/cpl/intl/lang/pl-PL.rc b/dll/cpl/intl/lang/pl-PL.rc index 3b566acdc75..c03fb81ee92 100644 --- a/dll/cpl/intl/lang/pl-PL.rc +++ b/dll/cpl/intl/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Jan, 2008; May 2010) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan, 2008; May 2010) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -13,38 +14,38 @@ CAPTION "Ustawienia regionalne" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Standardy i formaty", -1, 5, 5, 234, 162 - LTEXT "Te opcje wpywaj na to jak niektre programy odczytuj liczby, waluty, daty i czas.", -1, 14, 17, 220, 25 - LTEXT "Wybierz opcj z listy, albo kliknij na Dostosuj, by wprowadzi wasny format:", -1, 14, 37, 220, 22 + LTEXT "Te opcje wpływają na to jak niektóre programy odczytują liczby, waluty, daty i czas.", -1, 14, 17, 220, 25 + LTEXT "Wybierz opcję z listy, albo kliknij na Dostosuj, by wprowadzić własny format:", -1, 14, 37, 220, 22 COMBOBOX IDC_LANGUAGELIST, 14, 56, 160, 160, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL PUSHBUTTON "Do&stosuj...", IDC_SETUP_BUTTON, 178, 56, 52, 13 - LTEXT "Przykady", -1, 14, 73, 70, 10 + LTEXT "Przykłady", -1, 14, 73, 70, 10 LTEXT "Liczby:", -1, 16, 86, 48, 10 LTEXT "Waluty:", -1, 16, 101, 48, 10 LTEXT "Czas:", -1, 16, 116, 48, 10 - LTEXT "Data (krtka):", -1, 16, 131, 48, 10 - LTEXT "Data (duga):", -1, 16, 146, 48, 10 + LTEXT "Data (krótka):", -1, 16, 131, 48, 10 + LTEXT "Data (długa):", -1, 16, 146, 48, 10 EDITTEXT IDC_NUMSAMPLE_EDIT, 89, 86, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_MONEYSAMPLE_EDIT, 89, 101, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_TIMESAMPLE_EDIT, 89, 116, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_SHORTTIMESAMPLE_EDIT, 89, 131, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_FULLTIMESAMPLE_EDIT, 89, 146, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP GROUPBOX "Lokalizacja geograficzna", -1, 5, 171, 234, 55 - LTEXT "Ustaw swoj obecn lokalizacj, by pewne usugi mogy dostarcza lokalnych informacji; na przykad wiadomoci i prognozy pogody.", -1, 14, 180, 215, 24 + LTEXT "Ustaw swoją obecną lokalizację, by pewne usługi mogły dostarczać lokalnych informacji; na przykład wiadomości i prognozy pogody.", -1, 14, 180, 215, 24 COMBOBOX IDC_LOCATION_COMBO, 14, 207, 217, 160, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT END IDD_LANGUAGESPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Jzyki" +CAPTION "Języki" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Jzyki i usugi tekstowe", -1, 5, 5, 234, 52 - LTEXT "Aby przejrze bd zmieni zainstalowane jzyki lub usugi tekstowe, nacinij ""Szczegy...""", -1, 12, 15, 220, 18 - PUSHBUTTON "Szcze&gy...", IDC_DETAIL_BUTTON, 177, 34, 54, 14 - GROUPBOX "Dodatkowe wsparcie jzykw", -1, 5, 62, 234, 82 - LTEXT "Wikszo jzykw jest instalowana domylnie. Aby zainstalowa dodatkowe jzyki, zaznacz odpowiedni opcj poniej.", -1, 12, 72, 220, 18 - CHECKBOX "I&nstalacja jzykw o zoonej skadni i jzykw pisanych od prawej do lewej", IDC_INST_FILES_FOR_RTOL_LANG, 12, 92, 215, 22, BS_MULTILINE - CHECKBOX "In&stalacja jzykw wschodnioazjatyckich", IDC_INST_FILES_FOR_ASIAN, 12, 114, 180, 22, BS_MULTILINE + GROUPBOX "Języki i usługi tekstowe", -1, 5, 5, 234, 52 + LTEXT "Aby przejrzeć bądź zmienić zainstalowane języki lub usługi tekstowe, naciśnij ""Szczegóły...""", -1, 12, 15, 220, 18 + PUSHBUTTON "Szcze&góły...", IDC_DETAIL_BUTTON, 177, 34, 54, 14 + GROUPBOX "Dodatkowe wsparcie języków", -1, 5, 62, 234, 82 + LTEXT "Większość języków jest instalowana domyślnie. Aby zainstalować dodatkowe języki, zaznacz odpowiednią opcję poniżej.", -1, 12, 72, 220, 18 + CHECKBOX "I&nstalacja języków o złożonej składni i języków pisanych od prawej do lewej", IDC_INST_FILES_FOR_RTOL_LANG, 12, 92, 215, 22, BS_MULTILINE + CHECKBOX "In&stalacja języków wschodnioazjatyckich", IDC_INST_FILES_FOR_ASIAN, 12, 114, 180, 22, BS_MULTILINE END IDD_ADVANCEDPAGE DIALOGEX 0, 0, 246, 230 @@ -52,14 +53,14 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Zaawansowane" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Jzyki dla programw bez Unicode", -1, 5, 5, 234, 90 + GROUPBOX "Języki dla programów bez wsparcia Unicode", -1, 5, 5, 234, 90 COMBOBOX IDC_LANGUAGE_COMBO, 14, 75, 217, 160, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Te ustawienia umoliwiaj programom bez standardu Unicode wywietla menu i dialogi w odpowiednich jzykach. Nie ma to wpywu na programy Unicode ale dotyczy profili domylnych.", -1, 14, 18, 223, 33 - LTEXT "Wybierz taki jzyk, ktry ma by uywany przez programy bez Unicode:", -1, 14, 55, 223, 18 + LTEXT "Te ustawienia umożliwiają programom niewspierających Unicode wyświetlanie menu i dialogów w odpowiednich językach. Nie ma to wpływu na programy Unicode ale dotyczy profili domyślnych.", -1, 14, 18, 223, 33 + LTEXT "Wybierz taki język, który ma być używany przez programy bez Unicode:", -1, 14, 55, 223, 18 GROUPBOX "Tablice konwersji stron kodowych", -1, 5, 101, 234, 88 CONTROL "", IDC_CONV_TABLES, "SysListView32", LVS_REPORT | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP, 14, 114, 217, 70 - GROUPBOX "Ustawienia domylne uytkownika", -1, 5, 193, 234, 30 - CHECKBOX "Zastosuj ustawienia dla obecnego konta jak i dla profilu domylnego.", IDC_APPLY_CUR_USER_DEF_PROFILE, 12, 200, 220, 22, BS_MULTILINE + GROUPBOX "Ustawienia domyślne użytkownika", -1, 5, 193, 234, 30 + CHECKBOX "Zastosuj ustawienia dla obecnego konta jak i dla profilu domyślnego.", IDC_APPLY_CUR_USER_DEF_PROFILE, 12, 200, 220, 22, BS_MULTILINE END IDD_NUMBERSPAGE DIALOGEX 0, 0, 246, 234 @@ -67,24 +68,24 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Liczby" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Przykad", -1, 7, 7, 230, 53, WS_CHILD | WS_VISIBLE + GROUPBOX "Przykład", -1, 7, 7, 230, 53, WS_CHILD | WS_VISIBLE LTEXT "Dodatnie:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_NUMBERSPOSSAMPLE, 48, 19, 67, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP LTEXT "Ujemne:", -1, 120, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_NUMBERSNEGSAMPLE, 154, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "&Symbol dziesitny:", -1, 8, 67, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Symbol dziesiętny:", -1, 8, 67, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERDSYMBOL, 137, 65, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "Liczba cyfr &po symbolu dziesitnym:", -1, 8, 83, 124, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Liczba cyfr &po symbolu dziesiętnym:", -1, 8, 83, 124, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNDIGDEC, 137, 81, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL LTEXT "Symbol grupowania &cyfr:", -1, 8, 100, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDIGITGRSYM, 137, 97, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL LTEXT "&Grupowanie cyfr:", -1, 8, 117, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDGROUPING, 137, 113, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "Sy&mbol wartoci ujemnych:", -1, 8, 134, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Sy&mbol wartości ujemnych:", -1, 8, 134, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNSIGNSYM, 137, 129, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL LTEXT "&Format liczb ujemnych:", -1, 8, 149, 100, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNNUMFORMAT, 137, 145, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "Wywietlanie &zer wiodcych:", -1, 8, 166, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Wyświetlanie &zer wiodących:", -1, 8, 166, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDISPLEADZER, 137, 161, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL LTEXT "Separator &listy:", -1, 8, 181, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSLSEP, 137, 177, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL @@ -98,20 +99,20 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Waluta" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Przykad", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE + GROUPBOX "Przykład", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE LTEXT "Dodatnie:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_CURRENCYPOSSAMPLE, 43, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP LTEXT "Ujemne:", -1, 120, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_CURRENCYNEGSAMPLE, 154, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP LTEXT "&Symbol waluty:", -1, 10, 51, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYSYMBOL, 134, 49, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "&Format iloci dodatnich:", -1, 10, 68, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Format ilości dodatnich:", -1, 10, 68, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYPOSVALUE, 134, 66, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "F&ormat iloci ujemnych:", -1, 10, 85, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "F&ormat ilości ujemnych:", -1, 10, 85, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYNEGVALUE, 134, 83, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "S&ymbol dziesitny:", -1, 10, 111, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "S&ymbol dziesiętny:", -1, 10, 111, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYDECSEP, 134, 109, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "Liczba cyfr &po symbolu dziesitnym:", -1, 10, 128, 121, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Liczba cyfr &po symbolu dziesiętnym:", -1, 10, 128, 121, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYDECNUM, 134, 126, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL LTEXT "Symbol grupowania &cyfr:", -1, 10, 156, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYGRPSEP, 134, 154, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL @@ -125,22 +126,22 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Czas" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Przykad", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE - LTEXT "Przykad czasu:", -1, 13, 21, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + GROUPBOX "Przykład", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE + LTEXT "Przykład czasu:", -1, 13, 21, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_TIMESAMPLE, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP LTEXT "&Format czasu:", -1, 13, 52, 130, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEFORMAT, 149, 50, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_TABSTOP LTEXT "&Separator:", -1, 13, 70, 130, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMESEPARATOR, 149, 68, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "S&ymbol AM ""Przed Poudniem"":", -1, 13, 88, 130, 10, WS_VISIBLE | WS_GROUP + LTEXT "S&ymbol AM ""Przed Południem"":", -1, 13, 88, 130, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEAMSYMBOL, 149, 86, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "Sy&mbol PM ""Po Poudniu"":", -1, 13, 106, 130, 10, WS_VISIBLE | WS_GROUP + LTEXT "Sy&mbol PM ""Po Południu"":", -1, 13, 106, 130, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEPMSYMBOL, 149, 104, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP GROUPBOX "", -1, 7, 140, 230, 80, WS_VISIBLE LTEXT "Notacja formatu czasu\n\n\ h = godzina m = minuta s = sekunda t = am lub pm\n\n\ h = 12 godzin H = 24 godziny\n\ -hh, mm, ss = zero wiodce h, m, s = bez zera wiodcego", +hh, mm, ss = zero wiodące h, m, s = bez zera wiodącego", -1, 13, 150, 214, 50, WS_CHILD |WS_VISIBLE | WS_GROUP END @@ -151,30 +152,30 @@ CAPTION "Data" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Kalendarz", -1, 7, 7, 230, 74 - LTEXT "Jeeli rok zostanie zapisany w postaci dwch cyfr, intepretuj go jako rok z przedziau:", -1, 13, 18, 215, 8 + LTEXT "Jeżeli rok zostanie zapisany w postaci dwóch cyfr, intepretuj go jako rok z przedziału:", -1, 13, 18, 215, 8 EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED LTEXT "do", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 LTEXT "Rodzaj kalendarza:", -1, 13, 48, 64, 10 COMBOBOX IDC_CALTYPE_COMBO, 77, 46, 153, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - LTEXT "Kalendarz muzumaski:", -1, 13, 62, 60, 16 + LTEXT "Kalendarz muzułmański:", -1, 13, 62, 60, 16 COMBOBOX IDC_HIJCHRON_COMBO, 77, 64, 153, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - GROUPBOX "Format daty krtkiej", -1, 7, 83, 230, 81 - LTEXT "Przykad:", -1, 13, 95, 63, 10 + GROUPBOX "Format daty krótkiej", -1, 7, 83, 230, 81 + LTEXT "Przykład:", -1, 13, 95, 63, 10 EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "Przykad - z prawej do lewej:", -1, 13, 109, 60, 16 + LTEXT "Przykład - z prawej do lewej:", -1, 13, 109, 60, 16 EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED - LTEXT "Data krtka:", -1, 13, 131, 60, 10 + LTEXT "Data krótka:", -1, 13, 131, 60, 10 COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE LTEXT "Separator daty:", -1, 13, 148, 113, 10 COMBOBOX IDC_SHRTDATESEP_COMBO, 180, 146, 51, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - GROUPBOX "Format daty dugiej", -1, 7, 167, 230, 64 - LTEXT "Przykad:", -1, 13, 179, 61, 10 + GROUPBOX "Format daty długiej", -1, 7, 167, 230, 64 + LTEXT "Przykład:", -1, 13, 179, 61, 10 EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "Przykad - z prawej do lewej:", -1, 13, 193, 61, 16 + LTEXT "Przykład - z prawej do lewej:", -1, 13, 193, 61, 16 EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED - LTEXT "Data duga:", -1, 13, 215, 60, 10 + LTEXT "Data długa:", -1, 13, 215, 60, 10 COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END @@ -185,8 +186,8 @@ CAPTION "Sortowanie" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Sortowanie", -1, 7, 7, 230, 74 - LTEXT "Metody sortowania okrelaj porzdek znakw, sw, plikw i katalogw.", -1, 14, 17, 220, 25 - LTEXT "Wybierz metod sortowania dla twojego jzyka:", -1, 14, 37, 220, 22 + LTEXT "Metody sortowania określają porządek znaków, słów, plików i katalogów.", -1, 14, 17, 220, 25 + LTEXT "Wybierz metodę sortowania dla twojego języka:", -1, 14, 37, 220, 22 COMBOBOX IDC_SORTLIST_COMBO, 14, 56, 217, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END @@ -194,7 +195,7 @@ END STRINGTABLE BEGIN IDS_CUSTOMIZE_TITLE "Dostosuj Ustawienia regionalne" - IDS_SPAIN "Hiszpaski (Hiszpania)" + IDS_SPAIN "Hiszpański (Hiszpania)" IDS_METRIC "Metryczne" IDS_IMPERIAL "Imperialne" END @@ -202,5 +203,5 @@ END STRINGTABLE BEGIN IDS_CPLNAME "Ustawienia regionalne" - IDS_CPLDESCRIPTION "Ustawienia jzykw oraz formaty liczb, walut, daty i czasu." + IDS_CPLDESCRIPTION "Ustawienia języków oraz formaty liczb, walut, daty i czasu." END diff --git a/dll/cpl/intl/lang/ro-RO.rc b/dll/cpl/intl/lang/ro-RO.rc index 621985509ac..28fe8ec0f54 100644 --- a/dll/cpl/intl/lang/ro-RO.rc +++ b/dll/cpl/intl/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_GENERALPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Opțiuni regionale" @@ -199,5 +197,3 @@ BEGIN IDS_CPLNAME "Opțiuni regionale" IDS_CPLDESCRIPTION "Setări limbi și formatare numere, valute, dată și timp." END - -#pragma code_page(default) diff --git a/dll/cpl/intl/lang/ru-RU.rc b/dll/cpl/intl/lang/ru-RU.rc index 6c3b3d637c8..ac4fe597814 100644 --- a/dll/cpl/intl/lang/ru-RU.rc +++ b/dll/cpl/intl/lang/ru-RU.rc @@ -2,196 +2,196 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_GENERALPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Региональные параметры" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 5, 5, 234, 162 - LTEXT " , , .", -1, 14, 17, 220, 25 - LTEXT " """" , :", -1, 14, 37, 220, 22 + GROUPBOX "Языковые стандарты и форматы", -1, 5, 5, 234, 162 + LTEXT "Этот параметр влияет на способ отображения некоторыми программами чисел, денежных сумм, дат и времени.", -1, 14, 17, 220, 25 + LTEXT "Выберите элемент из списка или нажмите кнопку ""Настройка"" для того, чтобы задать форматы самостоятельно:", -1, 14, 37, 220, 22 COMBOBOX IDC_LANGUAGELIST, 14, 56, 160, 160, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - PUSHBUTTON "&...", IDC_SETUP_BUTTON, 178, 56, 52, 13 - LTEXT "", -1, 14, 73, 70, 10 - LTEXT ":", -1, 16, 86, 48, 10 - LTEXT " :", -1, 16, 101, 48, 10 - LTEXT ":", -1, 16, 116, 48, 10 - LTEXT " :", -1, 16, 131, 55, 10 - LTEXT " :", -1, 16, 146, 48, 10 + PUSHBUTTON "Настро&йка...", IDC_SETUP_BUTTON, 178, 56, 52, 13 + LTEXT "Образцы", -1, 14, 73, 70, 10 + LTEXT "Число:", -1, 16, 86, 48, 10 + LTEXT "Сумма денег:", -1, 16, 101, 48, 10 + LTEXT "Время:", -1, 16, 116, 48, 10 + LTEXT "Короткая дата:", -1, 16, 131, 55, 10 + LTEXT "Полная дата:", -1, 16, 146, 48, 10 EDITTEXT IDC_NUMSAMPLE_EDIT, 89, 86, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_MONEYSAMPLE_EDIT, 89, 101, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_TIMESAMPLE_EDIT, 89, 116, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_SHORTTIMESAMPLE_EDIT, 89, 131, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_FULLTIMESAMPLE_EDIT, 89, 146, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - GROUPBOX " ", -1, 5, 171, 234, 55 - LTEXT "& , , , :", -1, 14, 180, 217, 24 + GROUPBOX "Географического расположение", -1, 5, 171, 234, 55 + LTEXT "&Укажите ваше расположение для того, чтобы службы могли снабжать вас местной информацией, например, новостями и сводками погоды:", -1, 14, 180, 217, 24 COMBOBOX IDC_LOCATION_COMBO, 14, 207, 217, 160, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT END IDD_LANGUAGESPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Языки" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 5, 5, 234, 52 - LTEXT " , """"", -1, 12, 15, 220, 18 - PUSHBUTTON "&...", IDC_DETAIL_BUTTON, 177, 34, 54, 14 - GROUPBOX " ", -1, 5, 61, 234, 90 - LTEXT " . , .", -1, 12, 72, 220, 32 - CHECKBOX "& ", IDC_INST_FILES_FOR_RTOL_LANG, 12, 108, 215, 18, BS_MULTILINE - CHECKBOX "& ", IDC_INST_FILES_FOR_ASIAN, 12, 129, 215, 15, BS_MULTILINE + GROUPBOX "Языки и службы текстового ввода", -1, 5, 5, 234, 52 + LTEXT "Чтобы просмотреть или изменить язык или метод ввода текста, нажмите кнопку ""Подробнее""", -1, 12, 15, 220, 18 + PUSHBUTTON "&Подробнее...", IDC_DETAIL_BUTTON, 177, 34, 54, 14 + GROUPBOX "Дополнительная языковая поддержка", -1, 5, 61, 234, 90 + LTEXT "Поддержка большинства языков устанавливается по умолчанию. Чтобы установить дополнительную поддержку языков с особыми способами письма, установите соответствующие флажки.", -1, 12, 72, 220, 32 + CHECKBOX "&Установить поддержку языков с письмом справа налево и сложным письмом", IDC_INST_FILES_FOR_RTOL_LANG, 12, 108, 215, 18, BS_MULTILINE + CHECKBOX "Ус&тановить поддержку языков с письмом иероглифами", IDC_INST_FILES_FOR_ASIAN, 12, 129, 215, 15, BS_MULTILINE END IDD_ADVANCEDPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " , ", -1, 5, 5, 234, 90 + GROUPBOX "Язык программ, не поддерживающих Юникод", -1, 5, 5, 234, 90 COMBOBOX IDC_LANGUAGE_COMBO, 14, 75, 217, 160, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT " , , . - , .", -1, 14, 18, 223, 33 - LTEXT " , , :", -1, 14, 55, 223, 18 - GROUPBOX " ", -1, 5, 101, 234, 88 + LTEXT "Этот параметр позволяет программам, не поддерживающим Юникод, отображать меню и диалоги на своем языке. Он не влияет на Юникод-совместимые программы, но применяется для всех пользователей этого компьютера.", -1, 14, 18, 223, 33 + LTEXT "Выберите язык, соответствующий языку используемых программ, которые не поддерживают Юникод:", -1, 14, 55, 223, 18 + GROUPBOX "Кодовые страницы таблиц преобразования", -1, 5, 101, 234, 88 CONTROL "", IDC_CONV_TABLES, "SysListView32", LVS_REPORT | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP, 14, 114, 217, 70 - GROUPBOX " ", -1, 5, 193, 234, 30 - CHECKBOX " ", IDC_APPLY_CUR_USER_DEF_PROFILE, 12, 200, 220, 22, BS_MULTILINE + GROUPBOX "Параметры для стандартной учетной записи", -1, 5, 193, 234, 30 + CHECKBOX "Применить эти параметры для текущей учетной записи и для стандартного профиля", IDC_APPLY_CUR_USER_DEF_PROFILE, 12, 200, 220, 22, BS_MULTILINE END IDD_NUMBERSPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Числа" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 53, WS_CHILD | WS_VISIBLE - LTEXT ".:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + GROUPBOX "Образцы", -1, 7, 7, 230, 53, WS_CHILD | WS_VISIBLE + LTEXT "Полож.:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_NUMBERSPOSSAMPLE, 43, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT ".:", -1, 123, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Отриц.:", -1, 123, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_NUMBERSNEGSAMPLE, 154, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "&. :", -1, 8, 67, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Раздел. целой и дробной части:", -1, 8, 67, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERDSYMBOL, 137, 65, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 8, 83, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Количество дробных знаков:", -1, 8, 83, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNDIGDEC, 137, 81, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 8, 100, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Разделитель &групп разрядов:", -1, 8, 100, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDIGITGRSYM, 137, 97, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 8, 117, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Количество &цифр в группе:", -1, 8, 117, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDGROUPING, 137, 113, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 8, 134, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Признак отрицательного числа:", -1, 8, 134, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNSIGNSYM, 137, 129, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 8, 149, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Формат отрицательного числа:", -1, 8, 149, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNNUMFORMAT, 137, 145, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 8, 166, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Вывод нулей в начале числа:", -1, 8, 166, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDISPLEADZER, 137, 161, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 8, 181, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Разделитель &элементов списка:", -1, 8, 181, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSLSEP, 137, 177, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 8, 197, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Система едениц:", -1, 8, 197, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSMEASSYS, 137, 193, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END IDD_CURRENCYPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Денежная единица" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE - LTEXT ".:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + GROUPBOX "Образцы", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE + LTEXT "Полож.:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_CURRENCYPOSSAMPLE, 43, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT ".:", -1, 123, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Отриц.:", -1, 123, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_CURRENCYNEGSAMPLE, 154, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "& :", -1, 8, 51, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "О&бозначение денежной еденицы:", -1, 8, 51, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYSYMBOL, 134, 49, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " &. :", -1, 8, 68, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Формат &полож. денежных сумм:", -1, 8, 68, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYPOSVALUE, 134, 66, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " &. :", -1, 8, 85, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Формат &отриц. денежных сумм:", -1, 8, 85, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYNEGVALUE, 134, 83, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "&. :", -1, 8, 111, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Раздел. целой и дробной части:", -1, 8, 111, 125, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYDECSEP, 134, 109, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 8, 128, 110, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Количество дробных знаков:", -1, 8, 128, 110, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYDECNUM, 134, 126, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 8, 156, 110, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Разделитель &групп разрядов:", -1, 8, 156, 110, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYGRPSEP, 134, 154, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 8, 173, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Количество &цифр в группе:", -1, 8, 173, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYGRPNUM, 134, 171, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END IDD_TIMEPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Время" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE - LTEXT ":", -1, 13, 21, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + GROUPBOX "Образцы", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE + LTEXT "Образец:", -1, 13, 21, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_TIMESAMPLE, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "& :", -1, 13, 52, 135, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Формат времени:", -1, 13, 52, 135, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEFORMAT, 152, 50, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "&. :", -1, 13, 70, 135, 10, WS_VISIBLE | WS_GROUP + LTEXT "&Раздел. компонентов времени:", -1, 13, 70, 135, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMESEPARATOR, 152, 68, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "&. (AM):", -1, 13, 88, 135, 10, WS_VISIBLE | WS_GROUP + LTEXT "&Обозн. времени до полудня (AM):", -1, 13, 88, 135, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEAMSYMBOL, 152, 86, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "&. (PM):", -1, 13, 106, 135, 10, WS_VISIBLE | WS_GROUP + LTEXT "О&бозн. времени после полудня (PM):", -1, 13, 106, 135, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEPMSYMBOL, 152, 104, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP GROUPBOX "", -1, 7, 140, 230, 80, WS_VISIBLE - LTEXT " \n\n\ -h = m = s = t = am pm\n\n\ -h = 12- \n\ -H = 24- \n\ -hh, mm, ss = \n\ -h, m, s = ", + LTEXT "Обозначение формата времени\n\n\ +h = час m = минута s = секунда t = am или pm\n\n\ +h = 12-часовой формат суток\n\ +H = 24-часовой формат суток\n\ +hh, mm, ss = с выводом нулей в начале\n\ +h, m, s = без вывода нулей", -1, 13, 150, 214, 50, WS_CHILD |WS_VISIBLE | WS_GROUP END IDD_DATEPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Дата" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 74 - LTEXT " , :", -1, 13, 18, 221, 8 + GROUPBOX "Календарь", -1, 7, 7, 230, 74 + LTEXT "Если год введен двумя цифрами, отображать как год между:", -1, 13, 18, 221, 8 EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED - LTEXT "", -1, 55, 32, 17, 8 + LTEXT "и", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 - LTEXT " :", -1, 13, 48, 56, 10 + LTEXT "Тип календаря:", -1, 13, 48, 56, 10 COMBOBOX IDC_CALTYPE_COMBO, 77, 46, 153, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - LTEXT " :", -1, 13, 61, 60, 16 + LTEXT "Мусульманский календарь:", -1, 13, 61, 60, 16 COMBOBOX IDC_HIJCHRON_COMBO, 77, 64, 153, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - GROUPBOX " ", -1, 7, 83, 230, 81 - LTEXT ":", -1, 13, 95, 63, 10 + GROUPBOX "Краткий формат даты", -1, 7, 83, 230, 81 + LTEXT "Образец:", -1, 13, 95, 63, 10 EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT " - :", -1, 13, 111, 60, 16 + LTEXT "Образец - справа на лево:", -1, 13, 111, 60, 16 EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED - LTEXT " :", -1, 13, 131, 60, 10 + LTEXT "Краткий формат:", -1, 13, 131, 60, 10 COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT "& :", -1, 13, 148, 125, 10 + LTEXT "&Разделитель компонентов даты:", -1, 13, 148, 125, 10 COMBOBOX IDC_SHRTDATESEP_COMBO, 180, 146, 51, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - GROUPBOX " ", -1, 7, 167, 230, 64 - LTEXT ":", -1, 13, 179, 61, 10 + GROUPBOX "Полный формат даты", -1, 7, 167, 230, 64 + LTEXT "Образец:", -1, 13, 179, 61, 10 EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT " - :", -1, 13, 195, 61, 16 + LTEXT "Образец - справа на лево:", -1, 13, 195, 61, 16 EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED - LTEXT "& :", -1, 13, 215, 60, 10 + LTEXT "&Полный формат:", -1, 13, 215, 60, 10 COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END IDD_SORTPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Сортировка" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 74 - LTEXT " , , .", -1, 14, 17, 220, 25 - LTEXT "& :", -1, 14, 37, 220, 22 + GROUPBOX "Сортировка", -1, 7, 7, 230, 74 + LTEXT "Методы сортировки влияют на порядок сортировки символов, слов, имен файлов и папок.", -1, 14, 17, 220, 25 + LTEXT "&Выбрать метод сортировки для этого языка:", -1, 14, 37, 220, 22 COMBOBOX IDC_SORTLIST_COMBO, 14, 56, 217, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END STRINGTABLE BEGIN - IDS_CUSTOMIZE_TITLE " " - IDS_SPAIN " ()" + IDS_CUSTOMIZE_TITLE "Настройка региональных параметров" + IDS_SPAIN "Испанский (Испания)" IDS_METRIC "Metric" IDS_IMPERIAL "Imperial" END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " , , , ." + IDS_CPLNAME "Язык и региональные стандарты" + IDS_CPLDESCRIPTION "Выбор языка, формата чисел, денежных единиц, времени и даты." END diff --git a/dll/cpl/intl/lang/uk-UA.rc b/dll/cpl/intl/lang/uk-UA.rc index 8b9aa001eac..17af13e5cb6 100644 --- a/dll/cpl/intl/lang/uk-UA.rc +++ b/dll/cpl/intl/lang/uk-UA.rc @@ -10,199 +10,199 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_GENERALPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Регіональні параметри" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 5, 5, 234, 162 - LTEXT " , , .", -1, 14, 17, 220, 25 - LTEXT "& """", :", -1, 14, 37, 220, 22 + GROUPBOX "Мовні стандарти й формати", -1, 5, 5, 234, 162 + LTEXT "Цей параметр впливає на відображення чисел, грошових сум, дати й часу в деяких програмах.", -1, 14, 17, 220, 25 + LTEXT "&Виберіть зі списку найбільш прийнятний елемент або натисніть кнопку ""Налаштування"", щоб указати формати самостійно:", -1, 14, 37, 220, 22 COMBOBOX IDC_LANGUAGELIST, 14, 56, 160, 160, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - PUSHBUTTON "&...", IDC_SETUP_BUTTON, 175, 56, 60, 13 - LTEXT "", -1, 14, 73, 70, 10 - LTEXT ":", -1, 16, 86, 48, 10 - LTEXT " :", -1, 16, 101, 48, 10 - LTEXT ":", -1, 16, 116, 48, 10 - LTEXT " :", -1, 16, 131, 48, 10 - LTEXT " :", -1, 16, 146, 48, 10 + PUSHBUTTON "Налашту&вання...", IDC_SETUP_BUTTON, 175, 56, 60, 13 + LTEXT "Зразки", -1, 14, 73, 70, 10 + LTEXT "Число:", -1, 16, 86, 48, 10 + LTEXT "Сума грошей:", -1, 16, 101, 48, 10 + LTEXT "Час:", -1, 16, 116, 48, 10 + LTEXT "Коротка дата:", -1, 16, 131, 48, 10 + LTEXT "Повна дата:", -1, 16, 146, 48, 10 EDITTEXT IDC_NUMSAMPLE_EDIT, 89, 86, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_MONEYSAMPLE_EDIT, 89, 101, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_TIMESAMPLE_EDIT, 89, 116, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_SHORTTIMESAMPLE_EDIT, 89, 131, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_FULLTIMESAMPLE_EDIT, 89, 146, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - GROUPBOX " ", -1, 5, 171, 234, 55 - LTEXT " , , , ", -1, 14, 180, 215, 24 + GROUPBOX "Географічне розташування", -1, 5, 171, 234, 55 + LTEXT "Укажіть ваше поточне розташування, щоб служби могли надавати вам місцеву інформацію, наприклад, новини та прогноз погоди", -1, 14, 180, 215, 24 COMBOBOX IDC_LOCATION_COMBO, 14, 207, 217, 160, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT END IDD_LANGUAGESPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Мови" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 5, 5, 234, 52 - LTEXT " , ""...""", -1, 12, 15, 220, 18 - PUSHBUTTON "&...", IDC_DETAIL_BUTTON, 177, 34, 54, 14 - GROUPBOX " ", -1, 5, 62, 234, 82 - LTEXT " . , .", -1, 12, 72, 220, 18 - CHECKBOX "& ", IDC_INST_FILES_FOR_RTOL_LANG, 12, 92, 215, 22, BS_MULTILINE - CHECKBOX "& - ", IDC_INST_FILES_FOR_ASIAN, 12, 114, 180, 22, BS_MULTILINE + GROUPBOX "Текстові служби та мови вводу", -1, 5, 5, 234, 52 + LTEXT "Щоб переглянути або змінити мову або засіб вводу тексту, натисніть кнопку ""Подробиці...""", -1, 12, 15, 220, 18 + PUSHBUTTON "&Подробиці...", IDC_DETAIL_BUTTON, 177, 34, 54, 14 + GROUPBOX "Додаткова мовна підтримка", -1, 5, 62, 234, 82 + LTEXT "Більшість мов установлюється за замовчуванням. Щоб установити додаткові мови, установіть відповідні прапорці.", -1, 12, 72, 220, 18 + CHECKBOX "&Установити підтримку для мов із письмом справа наліво та для мов зі складними знаками", IDC_INST_FILES_FOR_RTOL_LANG, 12, 92, 215, 22, BS_MULTILINE + CHECKBOX "Ус&тановити підтримку для східно-азіатських мов", IDC_INST_FILES_FOR_ASIAN, 12, 114, 180, 22, BS_MULTILINE END IDD_ADVANCEDPAGE DIALOGEX 0, 0, 246, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " , ", -1, 5, 5, 234, 90 + GROUPBOX "Мова програм, які не підтримують Юнікод", -1, 5, 5, 234, 90 COMBOBOX IDC_LANGUAGE_COMBO, 14, 75, 217, 160, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT " , , . ³ , '.", -1, 14, 18, 223, 33 - LTEXT " , .", -1, 14, 55, 223, 18 - GROUPBOX " ", -1, 5, 101, 234, 88 + LTEXT "Цей системний параметр дає змогу програмам, які не підтримують Юнікод, показувати меню та діалоги рідною мовою. Він не впливає на програми з підтримкою Юнікоду, але застосовується до всіх користувачів цього комп'ютера.", -1, 14, 18, 223, 33 + LTEXT "Виберіть мову, яка відповідає мовній версії бажаних програм без підтримки Юнікоду.", -1, 14, 55, 223, 18 + GROUPBOX "Таблиці перетворення кодових сторінок", -1, 5, 101, 234, 88 CONTROL "", IDC_CONV_TABLES, "SysListView32", LVS_REPORT | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP, 14, 114, 217, 70 - GROUPBOX " ", -1, 5, 193, 234, 30 - CHECKBOX " ", IDC_APPLY_CUR_USER_DEF_PROFILE, 12, 200, 220, 22, BS_MULTILINE + GROUPBOX "Параметри стандартного облікового запису", -1, 5, 193, 234, 30 + CHECKBOX "Застосувати всі параметри до поточного облікового запису та до стандартного профілю користувача", IDC_APPLY_CUR_USER_DEF_PROFILE, 12, 200, 220, 22, BS_MULTILINE END IDD_NUMBERSPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Числа" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 53, WS_CHILD | WS_VISIBLE - LTEXT ".:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + GROUPBOX "Зразки", -1, 7, 7, 230, 53, WS_CHILD | WS_VISIBLE + LTEXT "Додатн.:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_NUMBERSPOSSAMPLE, 48, 19, 67, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "³'.:", -1, 120, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Від'ємн.:", -1, 120, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_NUMBERSNEGSAMPLE, 154, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT " &:", -1, 8, 67, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Десятковий &розділювач:", -1, 8, 67, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERDSYMBOL, 137, 65, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "&ʳ :", -1, 8, 83, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Кількість дробових знаків:", -1, 8, 83, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNDIGDEC, 137, 81, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 8, 100, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Розділювач &груп розрядів:", -1, 8, 100, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDIGITGRSYM, 137, 97, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "ʳ& :", -1, 8, 117, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Кіл&ькість цифр у групі:", -1, 8, 117, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDGROUPING, 137, 113, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& ' :", -1, 8, 134, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Оз&нака від'ємного числа:", -1, 8, 134, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNSIGNSYM, 137, 129, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& ' :", -1, 8, 149, 100, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Формат від'ємних чисел:", -1, 8, 149, 100, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSNNUMFORMAT, 137, 145, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "&³. :", -1, 8, 166, 127, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Відображ. нулів на початку числа:", -1, 8, 166, 127, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSDISPLEADZER, 137, 161, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 8, 181, 124, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Розділювач &елементів списку:", -1, 8, 181, 124, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSLSEP, 137, 177, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 8, 197, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Система одиниць:", -1, 8, 197, 96, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSMEASSYS, 137, 193, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END IDD_CURRENCYPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Грошова одиниця" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE - LTEXT ".:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + GROUPBOX "Зразки", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE + LTEXT "Додатн.:", -1, 13, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_CURRENCYPOSSAMPLE, 46, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "³'.:", -1, 120, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Від'ємн.:", -1, 120, 21, 31, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_CURRENCYNEGSAMPLE, 154, 19, 72, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "& :", -1, 10, 51, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Позначення грошової одиниці:", -1, 10, 51, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYSYMBOL, 134, 49, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& :", -1, 10, 68, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Формат додатних грошових сум:", -1, 10, 68, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYPOSVALUE, 134, 66, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "& ' :", -1, 10, 85, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Фор&мат від'ємних грошових сум:", -1, 10, 85, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYNEGVALUE, 134, 83, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " &:", -1, 10, 111, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Десятковий &розділювач:", -1, 10, 111, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYDECSEP, 134, 109, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "&ʳ :", -1, 10, 128, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Кількість дробових знаків:", -1, 10, 128, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYDECNUM, 134, 126, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT " & :", -1, 10, 156, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Розділювач &груп розрядів:", -1, 10, 156, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYGRPSEP, 134, 154, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "ʳ & :", -1, 10, 173, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "Кількість &цифр у групі:", -1, 10, 173, 111, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_CURRENCYGRPNUM, 134, 171, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END IDD_TIMEPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Час" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE - LTEXT " :", -1, 13, 21, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + GROUPBOX "Зразки", -1, 7, 7, 230, 33, WS_CHILD | WS_VISIBLE + LTEXT "Зразок часу:", -1, 13, 21, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP EDITTEXT IDC_TIMESAMPLE, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "& :", -1, 13, 52, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP + LTEXT "&Формат часу:", -1, 13, 52, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEFORMAT, 149, 50, 84, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "& :", -1, 13, 70, 130, 10, WS_VISIBLE | WS_GROUP + LTEXT "&Розділювач компонентів часу:", -1, 13, 70, 130, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMESEPARATOR, 149, 68, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "& (AM):", -1, 13, 88, 130, 10, WS_VISIBLE | WS_GROUP + LTEXT "По&значення часу до полудня (AM):", -1, 13, 88, 130, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEAMSYMBOL, 149, 86, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "& (PM):", -1, 13, 106, 130, 10, WS_VISIBLE | WS_GROUP + LTEXT "&Позначення часу після полудня (PM):", -1, 13, 106, 130, 10, WS_VISIBLE | WS_GROUP COMBOBOX IDC_TIMEPMSYMBOL, 149, 104, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP GROUPBOX "", -1, 7, 140, 230, 80, WS_VISIBLE - LTEXT " \n\n\ -h = m = s = t = \n\n\ -h = 12- H = 24- \n\ -hh, mm, ss = h, m, s = ", + LTEXT "Позначення формату часу\n\n\ +h = година m = хвилина s = секунда t = АМ або РМ\n\n\ +h = 12-годинний формат доби H = 24-годинний формат доби\n\ +hh, mm, ss = з виводом нулів на початку h, m, s = без виводу нулів", -1, 13, 150, 214, 55, WS_CHILD |WS_VISIBLE | WS_GROUP END IDD_DATEPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Дата" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 74 - LTEXT " , :", -1, 9, 18, 226, 8 + GROUPBOX "Календар", -1, 7, 7, 230, 74 + LTEXT "Якщо рік введено двома цифрами, інтерпретувати його як рік між:", -1, 9, 18, 226, 8 EDITTEXT IDC_FIRSTYEAR_EDIT, 13, 30, 36, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_DISABLED - LTEXT "", -1, 55, 32, 17, 8 + LTEXT "і", -1, 55, 32, 17, 8 EDITTEXT IDC_SECONDYEAR_EDIT, 77, 30, 36, 12, ES_LEFT | ES_NUMBER | WS_GROUP CONTROL "",IDC_SCR_MAX_YEAR, "msctls_updown32", UDS_NOTHOUSANDS | UDS_WRAP | UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_CHILD | WS_VISIBLE, 113, 30, 10, 12 - LTEXT " :", -1, 13, 48, 56, 10 + LTEXT "Тип календаря:", -1, 13, 48, 56, 10 COMBOBOX IDC_CALTYPE_COMBO, 77, 46, 153, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - LTEXT "˳ :", -1, 13, 62, 60, 16 + LTEXT "Літочислення за хиджрою:", -1, 13, 62, 60, 16 COMBOBOX IDC_HIJCHRON_COMBO, 77, 64, 153, 100, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_DISABLED - GROUPBOX " ", -1, 7, 83, 230, 81 - LTEXT ":", -1, 13, 95, 63, 10 + GROUPBOX "Короткий формат дати", -1, 7, 83, 230, 81 + LTEXT "Зразок:", -1, 13, 95, 63, 10 EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT " - :", -1, 13, 109, 60, 16 + LTEXT "Зразок - читання справа наліво:", -1, 13, 109, 60, 16 EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED - LTEXT " :", -1, 13, 128, 62, 16 + LTEXT "Короткий формат:", -1, 13, 128, 62, 16 COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - LTEXT " :", -1, 13, 148, 113, 10 + LTEXT "Розділювач компонентів дати:", -1, 13, 148, 113, 10 COMBOBOX IDC_SHRTDATESEP_COMBO, 180, 146, 51, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE - GROUPBOX " ", -1, 7, 167, 230, 64 - LTEXT ":", -1, 13, 179, 61, 10 + GROUPBOX "Повний формат дати", -1, 7, 167, 230, 64 + LTEXT "Зразок:", -1, 13, 179, 61, 10 EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT " - :", -1, 13, 193, 61, 16 + LTEXT "Зразок - читання справа наліво:", -1, 13, 193, 61, 16 EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED - LTEXT " :", -1, 13, 215, 60, 10 + LTEXT "Повний формат:", -1, 13, 215, 60, 10 COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE END IDD_SORTPAGE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Сортування" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 230, 74 - LTEXT " , , .", -1, 14, 17, 220, 25 - LTEXT " :", -1, 14, 37, 220, 22 + GROUPBOX "Сортування", -1, 7, 7, 230, 74 + LTEXT "Методи сортування визначають порядок сортування символів, слів, імен файлів і папок.", -1, 14, 17, 220, 25 + LTEXT "Вибрати метод сортування для Вашої мови:", -1, 14, 37, 220, 22 COMBOBOX IDC_SORTLIST_COMBO, 14, 56, 217, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END STRINGTABLE BEGIN - IDS_CUSTOMIZE_TITLE " " - IDS_SPAIN " ()" - IDS_METRIC "" - IDS_IMPERIAL "" + IDS_CUSTOMIZE_TITLE "Налаштування регіональних параметрів" + IDS_SPAIN "Іспанська (Іспанія)" + IDS_METRIC "Метрична" + IDS_IMPERIAL "Американська" END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " , , ." + IDS_CPLNAME "Регіональні стандарти" + IDS_CPLDESCRIPTION "Налаштування мовних параметрів і формату чисел, грошових одиниць, часу й дат." END diff --git a/dll/cpl/intl/rsrc.rc b/dll/cpl/intl/rsrc.rc index fad6ac0b9c3..f8a17b20a64 100644 --- a/dll/cpl/intl/rsrc.rc +++ b/dll/cpl/intl/rsrc.rc @@ -9,9 +9,12 @@ #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/joy/lang/pl-PL.rc b/dll/cpl/joy/lang/pl-PL.rc index 18632f68ecd..446c2a45065 100644 --- a/dll/cpl/joy/lang/pl-PL.rc +++ b/dll/cpl/joy/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Jan, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -14,12 +15,12 @@ CAPTION "Kontrolery gier" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 7, 7, 20, 20 - LTEXT "Te ustawienia pomog ci skonfigurowa kontolery gier, zainstalowane na tym komputerze.", -1, 33, 7, 214, 20, NOT WS_GROUP + LTEXT "Te ustawienia pomogą ci skonfigurować kontolery gier, zainstalowane na tym komputerze.", -1, 33, 7, 214, 20, NOT WS_GROUP GROUPBOX "&Zainstalowane kontrolery gier", -1, 7, 34, 238, 117 CONTROL "List1", IDC_CONTROLLER_LIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000808D, 14, 44, 224, 80 PUSHBUTTON "&Dodaj.", IDC_ADD_BUTTON, 35, 129, 65, 14 - PUSHBUTTON "&Usu..", IDC_REMOVE_BUTTON, 104, 129, 65, 14, WS_DISABLED - PUSHBUTTON "&Waciwoci", IDC_PROPERTIES_BUTTON, 173, 129, 65, 14, WS_DISABLED + PUSHBUTTON "&Usuń..", IDC_REMOVE_BUTTON, 104, 129, 65, 14, WS_DISABLED + PUSHBUTTON "&Właściwości", IDC_PROPERTIES_BUTTON, 173, 129, 65, 14, WS_DISABLED PUSHBUTTON "Z&aawansowane", IDC_ADVANCED_BUTTON, 111, 157, 65, 14 PUSHBUTTON "D&iagnostyka", IDC_TROUBLESHOOT_BUTTON, 180, 157, 65, 14 PUSHBUTTON "OK", IDOK, 195, 185, 50, 14 @@ -32,13 +33,13 @@ CAPTION "Dodawanie Kontrolera" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 8, 7, 20, 20 - LTEXT "Wybierz Kontroler gier z listy poniej i nacinij OK. Jeeli twojego Kontrolera gier nie ma na licie, nacinij Wasny.", -1, 35, 7, 210, 33 + LTEXT "Wybierz Kontroler gier z listy poniżej i naciśnij OK. Jeżeli twojego Kontrolera gier nie ma na liście, naciśnij Własny.", -1, 35, 7, 210, 33 LTEXT "&Kontrolery gier:", -1, 8, 45, 126, 8 LISTBOX IDC_GAME_CONTROLLERS_LIST, 7, 55, 251, 57, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | LBS_WANTKEYBOARDINPUT | WS_HSCROLL | WS_TABSTOP - AUTOCHECKBOX "&Wcz ster i peday", IDC_ENABLE_RUDDERS_CHECKBOX, 7, 114, 100, 10, WS_GROUP + AUTOCHECKBOX "&Włącz ster i pedały", IDC_ENABLE_RUDDERS_CHECKBOX, 7, 114, 100, 10, WS_GROUP LTEXT "&Port gier:", -1, 7, 134, 38, 8, NOT WS_VISIBLE COMBOBOX IDC_GAME_PORT_COMBO, 7, 147, 140, 50, CBS_DROPDOWNLIST | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL - PUSHBUTTON "&Wasny...", IDC_CUSTOM_BUTTON, 208, 147, 50, 14 + PUSHBUTTON "&Własny...", IDC_CUSTOM_BUTTON, 208, 147, 50, 14 CONTROL "", -25525, "STATIC", SS_ETCHEDHORZ, 7, 170, 251, 1 DEFPUSHBUTTON "OK", IDOK, 155, 179, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, 208, 179, 50, 14 @@ -47,7 +48,7 @@ END IDD_CUSTOM DIALOGEX 0, 0, 265, 183, 0 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION "Wasny Kontroler gier" +CAPTION "Własny Kontroler gier" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Charakterystyka", -1, 7, 7, 245, 52 @@ -57,11 +58,11 @@ BEGIN AUTORADIOBUTTON "&Kierownica", IDC_RACE_CAR_RADIO, 147, 40, 93, 10 GROUPBOX "&Osie", -1, 7, 67, 116, 44, WS_GROUP COMBOBOX IDC_AXES_COMBO, 37, 79, 48, 50, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - AUTORADIOBUTTON "Ster/Peday", IDC_RUDDER_PEDALS_RADIO, 14, 97, 63, 10, NOT WS_VISIBLE - AUTORADIOBUTTON "O Z", IDC_Z_AXIS_RADIO, 81, 97, 35, 10, NOT WS_VISIBLE + AUTORADIOBUTTON "Ster/Pedały", IDC_RUDDER_PEDALS_RADIO, 14, 97, 63, 10, NOT WS_VISIBLE + AUTORADIOBUTTON "Oś Z", IDC_Z_AXIS_RADIO, 81, 97, 35, 10, NOT WS_VISIBLE GROUPBOX "&Przyciski", -1, 137, 67, 116, 44 COMBOBOX IDC_BUTTONS_COMBO, 178, 79, 48, 50, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL, WS_EX_CLIENTEDGE - AUTOCHECKBOX "&Zawiera kontrol obszaru widoku", IDC_INC_POINT_CHECKBOX, 7, 123, 115, 10 + AUTOCHECKBOX "&Zawiera kontrolę obszaru widoku", IDC_INC_POINT_CHECKBOX, 7, 123, 115, 10 LTEXT "&Nazwa kontrolera:", -1, 7, 139, 200, 9 EDITTEXT IDC_CONTROLLER_NAME_EDIT, 7, 150, 116, 15, ES_AUTOHSCROLL, WS_EX_CLIENTEDGE | WS_EX_STATICEDGE DEFPUSHBUTTON "OK", IDOK, 137, 150, 50, 14 @@ -77,8 +78,8 @@ BEGIN ICON IDI_CPLSYSTEM, -1, 7, 24, 20, 20 DEFPUSHBUTTON "OK", IDOK, 106, 65, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, 163, 65, 50, 14 - LTEXT "Wybierz urzdzenie, ktrego chcesz uywa domylnie ze starszymi programami.", -1, 7, 7, 208, 10 - LTEXT "&Urzdzenie preferowane:", -1, 34, 24, 70, 10 + LTEXT "Wybierz urządzenie, którego chcesz używać domyślnie ze starszymi programami.", -1, 7, 7, 208, 10 + LTEXT "&Urządzenie preferowane:", -1, 34, 24, 70, 10 COMBOBOX IDC_PREFERRED_DEV_COMBO, 34, 38, 179, 75, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL END diff --git a/dll/cpl/joy/lang/ro-RO.rc b/dll/cpl/joy/lang/ro-RO.rc index dac950291a9..9930de2e2a9 100644 --- a/dll/cpl/joy/lang/ro-RO.rc +++ b/dll/cpl/joy/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_PROPPAGEMAIN DIALOGEX 0, 0, 252, 205 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP @@ -84,5 +82,3 @@ BEGIN IDS_CONTROLLER "Controlor" IDS_STATUS "Stare" END - -#pragma code_page(default) diff --git a/dll/cpl/joy/lang/ru-RU.rc b/dll/cpl/joy/lang/ru-RU.rc index 7e18f557cd1..2995a5ce72f 100644 --- a/dll/cpl/joy/lang/ru-RU.rc +++ b/dll/cpl/joy/lang/ru-RU.rc @@ -3,82 +3,82 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGEMAIN DIALOGEX 0, 0, 252, 205 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Игровые устройства" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 7, 7, 20, 20 - LTEXT " , .", -1, 33, 7, 214, 20, NOT WS_GROUP - GROUPBOX " & ", -1, 7, 34, 238, 117 + LTEXT "Эти параметры позволяют настроить игровые устройства, установленные на компьютере.", -1, 33, 7, 214, 20, NOT WS_GROUP + GROUPBOX "Установленные &игровые устройства", -1, 7, 34, 238, 117 CONTROL "List1", IDC_CONTROLLER_LIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000808D, 14, 44, 224, 80 - PUSHBUTTON "&...", IDC_ADD_BUTTON, 35, 129, 65, 14 - PUSHBUTTON "&", IDC_REMOVE_BUTTON, 104, 129, 65, 14, WS_DISABLED - PUSHBUTTON "&", IDC_PROPERTIES_BUTTON, 173, 129, 65, 14, WS_DISABLED - PUSHBUTTON "&...", IDC_ADVANCED_BUTTON, 101, 157, 70, 14 - PUSHBUTTON "&...", IDC_TROUBLESHOOT_BUTTON, 175, 157, 70, 14 + PUSHBUTTON "До&бавить...", IDC_ADD_BUTTON, 35, 129, 65, 14 + PUSHBUTTON "&Удалить", IDC_REMOVE_BUTTON, 104, 129, 65, 14, WS_DISABLED + PUSHBUTTON "Сво&йства", IDC_PROPERTIES_BUTTON, 173, 129, 65, 14, WS_DISABLED + PUSHBUTTON "Д&ополнительно...", IDC_ADVANCED_BUTTON, 101, 157, 70, 14 + PUSHBUTTON "Диа&гностика...", IDC_TROUBLESHOOT_BUTTON, 175, 157, 70, 14 PUSHBUTTON "OK", IDOK, 195, 185, 50, 14 END IDD_ADD DIALOGEX 0, 0, 265, 200 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Добавление игрового устройства" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 8, 7, 20, 20 - LTEXT " . , """".", -1, 35, 7, 210, 33 - LTEXT "& :", -1, 8, 45, 126, 8 + LTEXT "Выберите игровой контроллер в расположенном ниже списке и нажмите кнопку ОК. Если ваш игровой контроллер отсутствует в списке, нажмите кнопку ""Другой"".", -1, 35, 7, 210, 33 + LTEXT "&Игровые устройства:", -1, 8, 45, 126, 8 LISTBOX IDC_GAME_CONTROLLERS_LIST, 7, 55, 251, 57, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | LBS_WANTKEYBOARDINPUT | WS_HSCROLL | WS_TABSTOP - AUTOCHECKBOX "& ", IDC_ENABLE_RUDDERS_CHECKBOX, 7, 114, 120, 10, WS_GROUP - LTEXT "& :", -1, 7, 134, 38, 8, NOT WS_VISIBLE + AUTOCHECKBOX "&Подключить руль или педали", IDC_ENABLE_RUDDERS_CHECKBOX, 7, 114, 120, 10, WS_GROUP + LTEXT "&Игровой порт:", -1, 7, 134, 38, 8, NOT WS_VISIBLE COMBOBOX IDC_GAME_PORT_COMBO, 7, 147, 140, 50, CBS_DROPDOWNLIST | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL - PUSHBUTTON "&...", IDC_CUSTOM_BUTTON, 208, 147, 50, 14 + PUSHBUTTON "&Другой...", IDC_CUSTOM_BUTTON, 208, 147, 50, 14 CONTROL "", -25525, "STATIC", SS_ETCHEDHORZ, 7, 170, 251, 1 DEFPUSHBUTTON "OK", IDOK, 155, 179, 50, 14 - PUSHBUTTON "", IDCANCEL, 208, 179, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 208, 179, 50, 14 END IDD_CUSTOM DIALOGEX 0, 0, 265, 183, 0 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Особое игровое устройство" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 245, 52 - AUTORADIOBUTTON "&", IDC_JOYSTICK_RADIO, 17, 23, 55, 10 - AUTORADIOBUTTON "& ", IDC_FLIGHT_YOKE_RADIO, 100, 23, 143, 10 - AUTORADIOBUTTON "& ", IDC_GAME_PAD_RADIO, 17, 40, 75, 10 - AUTORADIOBUTTON " &", IDC_RACE_CAR_RADIO, 100, 40, 143, 10 - GROUPBOX "& ", -1, 7, 67, 116, 44, WS_GROUP + GROUPBOX "Особенности", -1, 7, 7, 245, 52 + AUTORADIOBUTTON "&Джойстик", IDC_JOYSTICK_RADIO, 17, 23, 55, 10 + AUTORADIOBUTTON "&Штурвал или рукоятка управления", IDC_FLIGHT_YOKE_RADIO, 100, 23, 143, 10 + AUTORADIOBUTTON "&Игровой планшет", IDC_GAME_PAD_RADIO, 17, 40, 75, 10 + AUTORADIOBUTTON "Управление гоночной &автомашиной", IDC_RACE_CAR_RADIO, 100, 40, 143, 10 + GROUPBOX "&Степень свободы", -1, 7, 67, 116, 44, WS_GROUP COMBOBOX IDC_AXES_COMBO, 37, 79, 48, 50, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - AUTORADIOBUTTON " ", IDC_RUDDER_PEDALS_RADIO, 14, 97, 63, 10, NOT WS_VISIBLE - AUTORADIOBUTTON " Z", IDC_Z_AXIS_RADIO, 81, 97, 35, 10, NOT WS_VISIBLE - GROUPBOX "&", -1, 137, 67, 116, 44 + AUTORADIOBUTTON "Руль управления или педали", IDC_RUDDER_PEDALS_RADIO, 14, 97, 63, 10, NOT WS_VISIBLE + AUTORADIOBUTTON "Ось Z", IDC_Z_AXIS_RADIO, 81, 97, 35, 10, NOT WS_VISIBLE + GROUPBOX "К&нопки", -1, 137, 67, 116, 44 COMBOBOX IDC_BUTTONS_COMBO, 178, 79, 48, 50, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL, WS_EX_CLIENTEDGE - AUTOCHECKBOX " & POV", IDC_INC_POINT_CHECKBOX, 7, 123, 115, 10 - LTEXT "&:", -1, 7, 139, 200, 9 + AUTOCHECKBOX "Имеется &переключатель POV", IDC_INC_POINT_CHECKBOX, 7, 123, 115, 10 + LTEXT "&Контролер:", -1, 7, 139, 200, 9 EDITTEXT IDC_CONTROLLER_NAME_EDIT, 7, 150, 116, 15, ES_AUTOHSCROLL, WS_EX_CLIENTEDGE | WS_EX_STATICEDGE DEFPUSHBUTTON "OK", IDOK, 137, 150, 50, 14 - PUSHBUTTON "", IDCANCEL, 203, 150, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 203, 150, 50, 14 END IDD_ADVANCED DIALOGEX 0, 0, 220, 86 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Дополнительные параметры" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 7, 24, 20, 20 - LTEXT " , .", -1, 7, 5, 208, 17 - LTEXT "& :", -1, 34, 24, 180, 10 + LTEXT "Выберите устройство, которое следует использовать со старыми программами.", -1, 7, 5, 208, 17 + LTEXT "&Предпочитаемое устройство:", -1, 34, 24, 180, 10 COMBOBOX IDC_PREFERRED_DEV_COMBO, 34, 38, 179, 75, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL DEFPUSHBUTTON "OK", IDOK, 106, 65, 50, 14 - PUSHBUTTON "", IDCANCEL, 163, 65, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 163, 65, 50, 14 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION ", , , ." - IDS_CONTROLLER "" - IDS_STATUS "" + IDS_CPLSYSTEMNAME "Игровые устройства" + IDS_CPLSYSTEMDESCRIPTION "Добавление, удаление и настройка параметров игровых устройств, например, джойстиков или игровых планшетов." + IDS_CONTROLLER "Устройство" + IDS_STATUS "Состояние" END diff --git a/dll/cpl/joy/lang/uk-UA.rc b/dll/cpl/joy/lang/uk-UA.rc index 13546069fbd..564c961fa7e 100644 --- a/dll/cpl/joy/lang/uk-UA.rc +++ b/dll/cpl/joy/lang/uk-UA.rc @@ -11,82 +11,82 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGEMAIN DIALOGEX 0, 0, 252, 205 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Ігрові пристрої" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 7, 7, 20, 20 - LTEXT "ֳ , '.", -1, 33, 7, 214, 20, NOT WS_GROUP - GROUPBOX "& ", -1, 7, 34, 238, 117 + LTEXT "Ці параметри дають змогу налаштувати ігрові пристрої, установлені на цьому комп'ютері.", -1, 33, 7, 214, 20, NOT WS_GROUP + GROUPBOX "&Установлені ігрові пристрої", -1, 7, 34, 238, 117 CONTROL "List1", IDC_CONTROLLER_LIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000808D, 14, 44, 224, 80 - PUSHBUTTON "&...", IDC_ADD_BUTTON, 35, 129, 65, 14 - PUSHBUTTON "&", IDC_REMOVE_BUTTON, 104, 129, 65, 14, WS_DISABLED - PUSHBUTTON "&", IDC_PROPERTIES_BUTTON, 173, 129, 65, 14, WS_DISABLED - PUSHBUTTON "&...", IDC_ADVANCED_BUTTON, 111, 157, 65, 14 - PUSHBUTTON "ij&...", IDC_TROUBLESHOOT_BUTTON, 180, 157, 65, 14 + PUSHBUTTON "&Додати...", IDC_ADD_BUTTON, 35, 129, 65, 14 + PUSHBUTTON "В&идалити", IDC_REMOVE_BUTTON, 104, 129, 65, 14, WS_DISABLED + PUSHBUTTON "В&ластивості", IDC_PROPERTIES_BUTTON, 173, 129, 65, 14, WS_DISABLED + PUSHBUTTON "Д&одатково...", IDC_ADVANCED_BUTTON, 111, 157, 65, 14 + PUSHBUTTON "Діа&гностика...", IDC_TROUBLESHOOT_BUTTON, 180, 157, 65, 14 PUSHBUTTON "OK", IDOK, 195, 185, 50, 14 END IDD_ADD DIALOGEX 0, 0, 265, 200 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Додавання ігрового пристрою" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 8, 7, 20, 20 - LTEXT " ""OK"". , """".", -1, 35, 7, 210, 33 - LTEXT "& :", -1, 8, 45, 126, 8 + LTEXT "Виберіть ігровий пристрій із нижченаведеного списку й натисніть кнопку ""OK"". Якщо вашого ігрового пристрою немає у списку, натисніть кнопку ""Інший"".", -1, 35, 7, 210, 33 + LTEXT "&Ігрові пристрої:", -1, 8, 45, 126, 8 LISTBOX IDC_GAME_CONTROLLERS_LIST, 7, 55, 251, 57, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | LBS_WANTKEYBOARDINPUT | WS_HSCROLL | WS_TABSTOP - AUTOCHECKBOX "&ϳ ", IDC_ENABLE_RUDDERS_CHECKBOX, 7, 114, 100, 10, WS_GROUP - LTEXT "& :", -1, 7, 134, 38, 8, NOT WS_VISIBLE + AUTOCHECKBOX "&Підключити руль і педалі", IDC_ENABLE_RUDDERS_CHECKBOX, 7, 114, 100, 10, WS_GROUP + LTEXT "І&гровий порт:", -1, 7, 134, 38, 8, NOT WS_VISIBLE COMBOBOX IDC_GAME_PORT_COMBO, 7, 147, 140, 50, CBS_DROPDOWNLIST | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL - PUSHBUTTON "&...", IDC_CUSTOM_BUTTON, 208, 147, 50, 14 + PUSHBUTTON "Ін&ший...", IDC_CUSTOM_BUTTON, 208, 147, 50, 14 CONTROL "", -25525, "STATIC", SS_ETCHEDHORZ, 7, 170, 251, 1 DEFPUSHBUTTON "OK", IDOK, 155, 179, 50, 14 - PUSHBUTTON "", IDCANCEL, 208, 179, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 208, 179, 50, 14 END IDD_CUSTOM DIALOGEX 0, 0, 265, 183, 0 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Особливий ігровий пристрій" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 7, 7, 245, 52 - AUTORADIOBUTTON "&", IDC_JOYSTICK_RADIO, 17, 23, 55, 10 - AUTORADIOBUTTON "& ", IDC_FLIGHT_YOKE_RADIO, 125, 23, 116, 10 - AUTORADIOBUTTON "& ", IDC_GAME_PAD_RADIO, 17, 40, 70, 10 - AUTORADIOBUTTON " . &", IDC_RACE_CAR_RADIO, 125, 40, 125, 10 - GROUPBOX "& ", -1, 7, 67, 116, 44, WS_GROUP + GROUPBOX "Особливості", -1, 7, 7, 245, 52 + AUTORADIOBUTTON "Джо&йстик", IDC_JOYSTICK_RADIO, 17, 23, 55, 10 + AUTORADIOBUTTON "&Штурвал або ручка керування", IDC_FLIGHT_YOKE_RADIO, 125, 23, 116, 10 + AUTORADIOBUTTON "І&гровий планшет", IDC_GAME_PAD_RADIO, 17, 40, 70, 10 + AUTORADIOBUTTON "Керування перегон. &автомобілем", IDC_RACE_CAR_RADIO, 125, 40, 125, 10 + GROUPBOX "&Степені вільності", -1, 7, 67, 116, 44, WS_GROUP COMBOBOX IDC_AXES_COMBO, 37, 79, 48, 50, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - AUTORADIOBUTTON " ", IDC_RUDDER_PEDALS_RADIO, 14, 97, 63, 10, NOT WS_VISIBLE - AUTORADIOBUTTON "³ Z", IDC_Z_AXIS_RADIO, 81, 97, 35, 10, NOT WS_VISIBLE - GROUPBOX "&", -1, 137, 67, 116, 44 + AUTORADIOBUTTON "Руль або педалі", IDC_RUDDER_PEDALS_RADIO, 14, 97, 63, 10, NOT WS_VISIBLE + AUTORADIOBUTTON "Вісь Z", IDC_Z_AXIS_RADIO, 81, 97, 35, 10, NOT WS_VISIBLE + GROUPBOX "К&нопки", -1, 137, 67, 116, 44 COMBOBOX IDC_BUTTONS_COMBO, 178, 79, 48, 50, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL, WS_EX_CLIENTEDGE - AUTOCHECKBOX " & ", IDC_INC_POINT_CHECKBOX, 7, 123, 115, 10 - LTEXT "&' :", -1, 7, 139, 200, 9 + AUTOCHECKBOX "Є &перемикач точки зору", IDC_INC_POINT_CHECKBOX, 7, 123, 115, 10 + LTEXT "&Ім'я пристрою:", -1, 7, 139, 200, 9 EDITTEXT IDC_CONTROLLER_NAME_EDIT, 7, 150, 116, 15, ES_AUTOHSCROLL, WS_EX_CLIENTEDGE | WS_EX_STATICEDGE DEFPUSHBUTTON "OK", IDOK, 137, 150, 50, 14 - PUSHBUTTON "", IDCANCEL, 203, 150, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 203, 150, 50, 14 END IDD_ADVANCED DIALOGEX 0, 0, 220, 86 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Додаткові параметри" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLSYSTEM, -1, 7, 24, 20, 20 DEFPUSHBUTTON "OK", IDOK, 106, 65, 50, 14 - PUSHBUTTON "", IDCANCEL, 163, 65, 50, 14 - LTEXT " , .", -1, 7, 7, 190, 18 - LTEXT "& :", -1, 34, 24, 70, 10 + PUSHBUTTON "Скасувати", IDCANCEL, 163, 65, 50, 14 + LTEXT "Виберіть пристрій, який слід використовувати зі старими програмами.", -1, 7, 7, 190, 18 + LTEXT "&Кращий пристрій:", -1, 34, 24, 70, 10 COMBOBOX IDC_PREFERRED_DEV_COMBO, 34, 38, 179, 75, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION ", , , ." - IDS_CONTROLLER "" - IDS_STATUS "" + IDS_CPLSYSTEMNAME "Ігрові пристрої" + IDS_CPLSYSTEMDESCRIPTION "Додавання, видалення й настройка параметрів ігрових пристроїв, наприклад, джойстиків або ігрових планшетів." + IDS_CONTROLLER "Пристрій" + IDS_STATUS "Стан" END diff --git a/dll/cpl/joy/rsrc.rc b/dll/cpl/joy/rsrc.rc index ba9ed7bd74b..84cdb798a67 100644 --- a/dll/cpl/joy/rsrc.rc +++ b/dll/cpl/joy/rsrc.rc @@ -10,9 +10,12 @@ #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/liccpa/lang/pl-PL.rc b/dll/cpl/liccpa/lang/pl-PL.rc index 9c3b2507569..e0365b67a46 100644 --- a/dll/cpl/liccpa/lang/pl-PL.rc +++ b/dll/cpl/liccpa/lang/pl-PL.rc @@ -1,8 +1,10 @@ /* -* translated by xrogers -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 @@ -11,22 +13,22 @@ CAPTION "Wybierz tryb licencjonowania" FONT 8, "Helv" BEGIN CONTROL "Tryb licencjonowania klienckiego", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94 - CONTROL "Na urzdzenie lub na uytkownika", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12 - CONTROL "Na serwer. Liczba jednoczesnych pocze:", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 + CONTROL "Na urządzenie lub na użytkownika", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12 + CONTROL "Na serwer. Liczba jednoczesnych połączeń:", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 CONTROL "Produkt:", 105, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8 CONTROL "", 106, "COMBOBOX", CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP, 49, 20, 171, 12 CONTROL "OK", 107, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 7, 46, 14 CONTROL "Anuluj", 108, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 27, 46, 14 CONTROL "Pomoc", 109, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 48, 46, 14 CONTROL "Replikacja...", 110, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 68, 46, 14 - CONTROL "Dodaj licencj", 111, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56, 65, 15 - CONTROL "Usu licencj", 112, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56, 61, 16 + CONTROL "Dodaj licencję", 111, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56, 65, 15 + CONTROL "Usuń licencję", 112, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56, 61, 16 CONTROL "", 114, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 187, 39, 32, 12 END STRINGTABLE BEGIN - IDS_CPLNAME_1 "Meneder licencji" - IDS_CPLDESCRIPTION_1 "Meneder licencji" + IDS_CPLNAME_1 "Menedżer licencji" + IDS_CPLDESCRIPTION_1 "Menedżer licencji" IDS_REACTOS "ReactOS - darmowe oprogramowanie" END diff --git a/dll/cpl/liccpa/lang/ru-RU.rc b/dll/cpl/liccpa/lang/ru-RU.rc index bf435849d24..f64e0adc2a0 100644 --- a/dll/cpl/liccpa/lang/ru-RU.rc +++ b/dll/cpl/liccpa/lang/ru-RU.rc @@ -2,26 +2,26 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU -CAPTION " " +CAPTION "Выбор вариантов лицензирования" FONT 8, "Helv" BEGIN - CONTROL " ", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94 - CONTROL " ", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12 - CONTROL " . :", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 - CONTROL ":", 105, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8 + CONTROL "Вариант клиентской лицензии", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94 + CONTROL "На устройство или на пользователя", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12 + CONTROL "На сервер. Число одновременных подключений:", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 + CONTROL "Продукт:", 105, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8 CONTROL "", 106, "COMBOBOX", CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP, 49, 20, 171, 12 CONTROL "OK", 107, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 7, 46, 14 - CONTROL "", 108, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 27, 46, 14 - CONTROL "", 109, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 48, 46, 14 - CONTROL "...", 110, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 68, 46, 14 - CONTROL " ", 111, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56, 65, 15 - CONTROL " ", 112, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56, 61, 16 + CONTROL "Отмена", 108, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 27, 46, 14 + CONTROL "Справка", 109, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 48, 46, 14 + CONTROL "Репликация...", 110, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 68, 46, 14 + CONTROL "Добавить лицензии", 111, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56, 65, 15 + CONTROL "Удалить лицензии", 112, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56, 61, 16 CONTROL "", 114, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 187, 39, 32, 12 END STRINGTABLE BEGIN - IDS_CPLNAME_1 " " - IDS_CPLDESCRIPTION_1 " " - IDS_REACTOS "ReactOS - " + IDS_CPLNAME_1 "Менеджер лицензий" + IDS_CPLDESCRIPTION_1 "Менеджер лицензий" + IDS_REACTOS "ReactOS - Свободное программное обеспечение" END diff --git a/dll/cpl/liccpa/lang/uk-UA.rc b/dll/cpl/liccpa/lang/uk-UA.rc index fe492daa7cd..b3b697479b7 100644 --- a/dll/cpl/liccpa/lang/uk-UA.rc +++ b/dll/cpl/liccpa/lang/uk-UA.rc @@ -10,26 +10,26 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU -CAPTION " " +CAPTION "Вибір режиму ліцензування" FONT 8, "Helv" BEGIN - CONTROL " 볺 糿", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94 - CONTROL " ", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12 - CONTROL " . :", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 - CONTROL ":", 105, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8 + CONTROL "Режим клієнтської ліцензії", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94 + CONTROL "На пристрій або на користувача", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12 + CONTROL "На сервер. Число одночасних підключень:", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9 + CONTROL "Продукт:", 105, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8 CONTROL "", 106, "COMBOBOX", CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP, 49, 20, 171, 12 CONTROL "OK", 107, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 7, 46, 14 - CONTROL "", 108, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 27, 46, 14 - CONTROL "", 109, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 48, 46, 14 - CONTROL "...", 110, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 68, 46, 14 - CONTROL " 糿", 111, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56, 65, 15 - CONTROL " 糿", 112, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56, 61, 16 + CONTROL "Скасувати", 108, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 27, 46, 14 + CONTROL "Довідка", 109, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 48, 46, 14 + CONTROL "Реплікація...", 110, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 68, 46, 14 + CONTROL "Додати ліцензії", 111, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56, 65, 15 + CONTROL "Видалити ліцензії", 112, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56, 61, 16 CONTROL "", 114, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 187, 39, 32, 12 END STRINGTABLE BEGIN - IDS_CPLNAME_1 " " - IDS_CPLDESCRIPTION_1 " " - IDS_REACTOS "ReactOS - ³ " + IDS_CPLNAME_1 "Менеджер ліцензій" + IDS_CPLDESCRIPTION_1 "Менеджер ліцензій" + IDS_REACTOS "ReactOS - Вільне ПЗ" END diff --git a/dll/cpl/liccpa/rsrc.rc b/dll/cpl/liccpa/rsrc.rc index 46d6d98cfa5..dce56362d51 100644 --- a/dll/cpl/liccpa/rsrc.rc +++ b/dll/cpl/liccpa/rsrc.rc @@ -12,8 +12,11 @@ #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/main/CMakeLists.txt b/dll/cpl/main/CMakeLists.txt index 0f6a5f56840..e193a61032f 100644 --- a/dll/cpl/main/CMakeLists.txt +++ b/dll/cpl/main/CMakeLists.txt @@ -2,8 +2,6 @@ set_unicode() set_rc_compiler() -add_definitions(-D_DLL -D__USE_CRTIMP) - spec2def(main.cpl main.spec) add_library(main SHARED diff --git a/dll/cpl/main/lang/pl-PL.rc b/dll/cpl/main/lang/pl-PL.rc index 1f2b5cf5653..e6ec1677587 100644 --- a/dll/cpl/main/lang/pl-PL.rc +++ b/dll/cpl/main/lang/pl-PL.rc @@ -1,54 +1,55 @@ /* - * translation by xrogers - * xxrogers@users.sourceforge.net - * https://sourceforge.net/projects/reactospl + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) */ - + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_KEYBSPEED DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Szybko" +CAPTION "Szybkość" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Powtarzanie znaku", -1, 5, 5, 230, 130 ICON IDI_REPEAT_DELAY, IDC_ICON_REPEAT_DELAY, 15, 15, 15, 15 - LTEXT "&Opnienie powtarzania:", -1, 40, 15, 50, 10 - LTEXT "Due", -1, 40, 30, 20, 10 - LTEXT "Mae", -1, 200, 30, 20, 10 + LTEXT "&Opóźnienie powtarzania:", -1, 40, 15, 50, 10 + LTEXT "Duże", -1, 40, 30, 20, 10 + LTEXT "Małe", -1, 200, 30, 20, 10 CONTROL "",IDC_SLIDER_REPEAT_DELAY, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 30, 130, 17 ICON IDI_REPEAT_RATE, IDC_ICON_REPEAT_RATE, 15, 70, 15, 15 - LTEXT "&Czstotliwo powtarzania", -1, 40, 70, 50, 10 - LTEXT "Maa", -1, 40, 85, 20, 10 - LTEXT "Dua", -1, 200, 85, 20, 10 + LTEXT "&Częstotliwość powtarzania", -1, 40, 70, 50, 10 + LTEXT "Mała", -1, 40, 85, 20, 10 + LTEXT "Duża", -1, 200, 85, 20, 10 CONTROL "",IDC_SLIDER_REPEAT_RATE, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 85, 130, 17 - LTEXT "&Kliknij tutaj i przytrzymaj klawisz, aby sprawdzi szybko powtarzania:", -1, 15, 105, 150, 10 + LTEXT "&Kliknij tutaj i przytrzymaj klawisz, aby sprawdzić szybkość powtarzania:", -1, 15, 105, 150, 10 EDITTEXT IDC_EDIT_REPEAT_RATE, 15, 115, 200, 15, WS_CHILD | WS_VISIBLE | WS_GROUP - GROUPBOX "Czstotliwo &migania kursora", -1, 5, 145, 230, 50 + GROUPBOX "Częstotliwość &migania kursora", -1, 5, 145, 230, 50 LTEXT "", IDC_TEXT_CURSOR_BLINK, 20, 165, 1, 8 LTEXT "Brak", -1, 40, 165, 30, 10 - LTEXT "Dua", -1, 200, 165, 30, 10 + LTEXT "Duża", -1, 200, 165, 30, 10 CONTROL "",IDC_SLIDER_CURSOR_BLINK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 165, 130, 17 END IDD_HARDWARE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Sprzt" +CAPTION "Sprzęt" FONT 8, "MS Shell Dlg" BEGIN END IDD_CLICK_LOCK DIALOGEX 0, 0, 246, 100 STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU -CAPTION "Blokada Kliknicia" +CAPTION "Blokada Kliknięcia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Krtko", -1, 35, 50, 30, 10 - LTEXT "Dugo", -1, 140, 50, 30, 10 + LTEXT "Krótko", -1, 35, 50, 30, 10 + LTEXT "Długo", -1, 140, 50, 30, 10 CONTROL "",IDC_SLIDER_CLICK_LOCK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 50, 70, 17 PUSHBUTTON "&Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Anuluj", IDCANCEL, 175, 75, 50, 15 - LTEXT "&Dopasuj czas potrzebny do przytrzymania wcinitego przycisku myszy lub urzdzenia wskazujcego przed zablokowaniem kliknicia.",-1,60,15,170,30 + LTEXT "&Dopasuj czas potrzebny do przytrzymania wciśniętego przycisku myszy lub urządzenia wskazującego przed „zablokowaniem” kliknięcia.",-1,60,15,170,30 ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END @@ -57,37 +58,37 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "Przyciski" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Konfiguracja przyciskw", -1, 5, 5, 230, 70 - CHECKBOX "&Przecz przycisk podstawowy i pomocniczy", IDC_SWAP_MOUSE_BUTTONS, 10, 15, 140, 10 + GROUPBOX "Konfiguracja przycisków", -1, 5, 5, 230, 70 + CHECKBOX "&Przełącz przycisk podstawowy i pomocniczy", IDC_SWAP_MOUSE_BUTTONS, 10, 15, 140, 10 CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON | SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE - LTEXT "Zaznacz to pole wyboru, aby uywa prawego przycisku do wykonywania funkcji podstawowych, takich jak zaznaczanie i przeciganie.", -1, 10, 30, 150, 30 - GROUPBOX "Szybko dwukrotnego kliknicia", -1, 5, 75, 230, 70 - LTEXT "Kliknij dwukrotnie folder, aby przetestowa ustawienie. Jeli folder nie otworzy si lub nie zamknie, sprbuj uy wolniejszego ustawienia.", -1, 10, 85, 150, 30 - LTEXT "&Szybko: Wolno", -1, 10, 120, 90, 8 + LTEXT "Zaznacz to pole wyboru, aby używać prawego przycisku do wykonywania funkcji podstawowych, takich jak zaznaczanie i przeciąganie.", -1, 10, 30, 150, 30 + GROUPBOX "Szybkość dwukrotnego kliknięcia", -1, 5, 75, 230, 70 + LTEXT "Kliknij dwukrotnie folder, aby przetestować ustawienie. Jeśli folder nie otworzy się lub nie zamknie, spróbuj użyć wolniejszego ustawienia.", -1, 10, 85, 150, 30 + LTEXT "&Szybkość: Wolno", -1, 10, 120, 90, 8 LTEXT "Szybko", -1, 140, 120, 30, 8 CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 60, 120, 70, 17 CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON | SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE - GROUPBOX "Blokada Kliknicia", -1, 5, 150, 230, 70 - CHECKBOX "&Wcz funkcj Blokada Kliknicia", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20 + GROUPBOX "Blokada Kliknięcia", -1, 5, 150, 230, 70 + CHECKBOX "&Włącz funkcję Blokada Kliknięcia", IDC_CHECK_CLICK_LOCK, 10, 160, 70, 20 PUSHBUTTON "&Ustawienia...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10 - LTEXT "Umoliwia podwietlanie lub przeciganie bez przytrzymywania nacinitego przycisku myszy. Aby ustawi, nacinij na krtko przycisk myszy. Aby zwolni, kliknij przycisk myszy ponownie.", -1, 10, 180, 190, 30 + LTEXT "Umożliwia podświetlanie lub przeciąganie bez przytrzymywania naciśniętego przycisku myszy. Aby ustawić, naciśnij na krótko przycisk myszy. Aby zwolnić, kliknij przycisk myszy ponownie.", -1, 10, 180, 190, 30 END IDD_PAGE_POINTER DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Wskaniki" +CAPTION "Wskaźniki" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "&Schemat", -1, 5, 5, 170, 45 COMBOBOX IDC_COMBO_CURSOR_SCHEME, 10, 15, 145, 200, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Z&apisz jako...", IDC_BUTTON_SAVEAS_SCHEME, 70, 30, 50, 15 - PUSHBUTTON "&Usu", IDC_BUTTON_DELETE_SCHEME, 125, 30, 40, 15 + PUSHBUTTON "&Usuń", IDC_BUTTON_DELETE_SCHEME, 125, 30, 40, 15 CONTROL "", IDC_IMAGE_CURRENT_CURSOR, "Static", SS_ICON | SS_CENTERIMAGE | WS_VISIBLE, 190, 9, 45, 41, WS_EX_STATICEDGE LTEXT "&Dostosuj:", -1, 5, 60, 40, 10 LISTBOX IDC_LISTBOX_CURSOR, 5, 70, 230, 120, WS_VISIBLE | WS_BORDER | WS_TABSTOP | WS_VSCROLL | LBS_OWNERDRAWFIXED | LBS_NOTIFY - CHECKBOX "&Wcz cie wskanika", IDC_CHECK_CURSOR_SHADOW, 5, 200, 100, 10 - PUSHBUTTON "Uyj d&omylnego", IDC_BUTTON_USE_DEFAULT_CURSOR, 120, 200, 50, 15 - PUSHBUTTON "&Przegldaj...", IDC_BUTTON_BROWSE_CURSOR, 175, 200, 50, 15 + CHECKBOX "&Włącz cień wskaźnika", IDC_CHECK_CURSOR_SHADOW, 5, 200, 100, 10 + PUSHBUTTON "Użyj d&omyślnego", IDC_BUTTON_USE_DEFAULT_CURSOR, 120, 200, 50, 15 + PUSHBUTTON "&Przeglądaj...", IDC_BUTTON_BROWSE_CURSOR, 175, 200, 50, 15 END IDD_CURSOR_SCHEME_SAVEAS DIALOGEX 0, 0, 200, 75 @@ -95,7 +96,7 @@ STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU CAPTION "Zapisz schemat" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Zapisz ten schemat kursorw jako:", -1, 5, 5, 100, 10 + LTEXT "Zapisz ten schemat kursorów jako:", -1, 5, 5, 100, 10 EDITTEXT IDC_EDIT_SCHEME_NAME, 5, 15, 180, 15, WS_CHILD | WS_VISIBLE | WS_GROUP PUSHBUTTON "&Ok", IDOK, 60, 45, 50, 15 PUSHBUTTON "&Anuluj", IDCANCEL, 115, 45, 50, 15 @@ -104,41 +105,41 @@ END IDD_PAGE_OPTION DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Opcje wskanika" +CAPTION "Opcje wskaźnika" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Ruch", -1, 5, 5, 230, 60 - LTEXT "&Wybierz szybko wskanika:", -1, 60, 15, 110, 10 + LTEXT "&Wybierz szybkość wskaźnika:", -1, 60, 15, 110, 10 LTEXT "Wolno", -1, 60, 30, 20, 10 CONTROL "",IDC_SLIDER_MOUSE_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 90, 30, 70, 17 LTEXT "Szybko", -1, 170, 30, 20, 10 ICON IDI_MOUSE_SPEED, IDC_ICON_MOUSE_SPEED, 15, 15, 15, 15 - CHECKBOX "Zwiksz pr&ecyzj wskanika", IDC_CHECK_POINTER_PRECISION, 60, 50, 100, 10 - GROUPBOX "Przyciganie do", -1, 5, 65, 230, 40 - CHECKBOX "&Automatycznie przenie wskanik na domylny przycisk w oknie dialogowym", + CHECKBOX "Zwiększ pr&ecyzję wskaźnika", IDC_CHECK_POINTER_PRECISION, 60, 50, 100, 10 + GROUPBOX "Przyciąganie do", -1, 5, 65, 230, 40 + CHECKBOX "&Automatycznie przenieś wskaźnik na domyślny przycisk w oknie dialogowym", IDC_CHECK_SNAP_TO, 60, 75, 170, 20, BS_MULTILINE | BS_TOP ICON IDI_MOUSE_BUTTON, IDC_ICON_SNAP_TO, 15, 75, 15, 15 - GROUPBOX "Widoczno", -1, 5, 105, 230, 95 - CHECKBOX "&Poka lady wskanika", IDC_CHECK_POINTER_TRAIL, 60, 115, 80, 10 - LTEXT "Dugo", IDC_TEXT_TRAIL_SHORT, 60, 130, 30, 10 - LTEXT "Krtko", IDC_TEXT_TRAIL_LONG, 160, 130, 30, 10 + GROUPBOX "Widoczność", -1, 5, 105, 230, 95 + CHECKBOX "&Pokaż ślady wskaźnika", IDC_CHECK_POINTER_TRAIL, 60, 115, 80, 10 + LTEXT "Długo", IDC_TEXT_TRAIL_SHORT, 60, 130, 30, 10 + LTEXT "Krótko", IDC_TEXT_TRAIL_LONG, 160, 130, 30, 10 ICON IDI_MOUSE_TRAILS, IDC_ICON_POINTER_TRAIL, 15, 115, 15, 15 CONTROL "", IDC_SLIDER_POINTER_TRAIL ,"msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 80, 130, 70, 17 - CHECKBOX "&Ukryj wskanik podczas pisania", IDC_CHECK_HIDE_POINTER, 60, 150, 90, 10 + CHECKBOX "&Ukryj wskaźnik podczas pisania", IDC_CHECK_HIDE_POINTER, 60, 150, 90, 10 ICON IDI_MOUSE_SPEED, IDC_ICON_HIDE_POINTER, 15, 145, 15, 15 - CHECKBOX "Poka lokalizacj wskanika po naciniciu klawisza &CTRL", + CHECKBOX "Pokaż lokalizację wskaźnika po naciśnięciu klawisza &CTRL", IDC_CHECK_SHOW_POINTER, 60, 175, 170, 20, BS_MULTILINE | BS_TOP ICON IDI_MOUSE_POINTER, IDC_ICON_SHOW_POINTER, 15, 170, 15, 15 END IDD_PAGE_WHEEL DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Kko" +CAPTION "Kółko" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Przewijanie", -1, 5, 5, 230, 80 ICON IDI_MOUSE_WHEEL, IDC_ICON_WHEEL, 20, 20, 32, 32 - LTEXT "Obrcenie kkiem o jeden skok powoduje przewinicie:", -1, 60, 15, 150, 10 + LTEXT "Obrócenie kółkiem o jeden skok powoduje przewinięcie:", -1, 60, 15, 150, 10 RADIOBUTTON "&O tyle linii naraz:", IDC_RADIO_WHEEL_SCROLL_LINES, 60, 30, 150, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP RADIOBUTTON "O jeden &ekran", IDC_RADIO_WHEEL_SCROLL_PAGE, 60, 65, 90, 10 EDITTEXT IDC_EDIT_WHEEL_SCROLL_LINES, 70, 45, 60, 15, ES_RIGHT | WS_VISIBLE | WS_GROUP | WS_TABSTOP @@ -151,28 +152,28 @@ BEGIN IDS_CPLDESCRIPTION_1 "Dostosowuje ustawienia myszy." IDS_CPLNAME_2 "Klawiatura" IDS_CPLDESCRIPTION_2 "Dostosowuje ustawienia klawiatury." - IDS_ARROW "Wybr normalny" - IDS_HELP "Wybr pomocy" + IDS_ARROW "Wybór normalny" + IDS_HELP "Wybór pomocy" IDS_APPSTARTING "Praca w tle" - IDS_WAIT "Zajty" - IDS_CROSSHAIR "Wybr precyzyjny" - IDS_IBEAM "Wybr tekstowy" - IDS_NWPEN "Pismo rczne" - IDS_NO "Niedostpny" + IDS_WAIT "Zajęty" + IDS_CROSSHAIR "Wybór precyzyjny" + IDS_IBEAM "Wybór tekstowy" + IDS_NWPEN "Pismo ręczne" + IDS_NO "Niedostępny" IDS_SIZENS "Zmiana wymiaru pionowego" IDS_SIZEWE "Zmiana wymiaru poziomego" - IDS_SIZENWSE "Zmiana wymiarw po przektnej 1" - IDS_SIZENESW "Zmiana wymiarw po przektnej 2" - IDS_SIZEALL "Przenie" - IDS_UPARROW "Alternatywny wybr" - IDS_HAND "Wybr cza" + IDS_SIZENWSE "Zmiana wymiarów po przekątnej 1" + IDS_SIZENESW "Zmiana wymiarów po przekątnej 2" + IDS_SIZEALL "Przenieś" + IDS_UPARROW "Alternatywny wybór" + IDS_HAND "Wybór łącza" IDS_NONE "(brak)" IDS_SYSTEM_SCHEME "(schemat systemu)" IDS_BROWSE_FILTER "Kursory (*.ani, *.cur)\0*.ani;*.cur\0Animowane kusory (*.ani)\0*.ani\0Kursory statyczne (*.cur)\0*.cur\0Wszystkie pliki\0*.*\0\0" - IDS_BROWSE_TITLE "Przegldaj" - IDS_REMOVE_TITLE "Potwierd usunicie schematu" - IDS_REMOVE_TEXT "Czy na pewno chcesz usun schemat kursorw '%s'?" - IDS_OVERWRITE_TITLE "Potwierd nadpisanie schematu kursorw" - IDS_OVERWRITE_TEXT "Wybrana nazwa schematu kursorw jest ju w uyciu. Czy chcesz nadpisa istniejcy schemat?" + IDS_BROWSE_TITLE "Przeglądaj" + IDS_REMOVE_TITLE "Potwierdź usunięcie schematu" + IDS_REMOVE_TEXT "Czy na pewno chcesz usunąć schemat kursorów '%s'?" + IDS_OVERWRITE_TITLE "Potwierdź nadpisanie schematu kursorów" + IDS_OVERWRITE_TEXT "Wybrana nazwa schematu kursorów jest już w użyciu. Czy chcesz nadpisać istniejący schemat?" IDS_ANIMATE_CURSOR "Kursor animowany" END diff --git a/dll/cpl/main/lang/ro-RO.rc b/dll/cpl/main/lang/ro-RO.rc index e6c05386f50..b18396d3000 100644 --- a/dll/cpl/main/lang/ro-RO.rc +++ b/dll/cpl/main/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_KEYBSPEED DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Viteză" @@ -172,5 +170,3 @@ BEGIN IDS_OVERWRITE_TEXT "Numele de schemă ales este deja în folosință. Vreți să suprascrieți schema actuală?" IDS_ANIMATE_CURSOR "Cursoare animate" END - -#pragma code_page(default) diff --git a/dll/cpl/main/lang/ru-RU.rc b/dll/cpl/main/lang/ru-RU.rc index 6cd6898c5c8..c9c4f6f2ca2 100644 --- a/dll/cpl/main/lang/ru-RU.rc +++ b/dll/cpl/main/lang/ru-RU.rc @@ -2,139 +2,139 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_KEYBSPEED DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Скорость" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 5, 5, 236, 150 + GROUPBOX "Повтор вводимого символа", -1, 5, 5, 236, 150 ICON IDI_REPEAT_DELAY, IDC_ICON_REPEAT_DELAY, 15, 20, 15, 15 - LTEXT "& :", -1, 51, 20, 160, 10 - LTEXT "", -1, 50, 42, 35, 11 - LTEXT "", -1, 190, 42, 33, 10 + LTEXT "&Задержка перед началом повтора:", -1, 51, 20, 160, 10 + LTEXT "Длиннее", -1, 50, 42, 35, 11 + LTEXT "Короче", -1, 190, 42, 33, 10 CONTROL "",IDC_SLIDER_REPEAT_DELAY, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 84, 35, 102, 17 ICON IDI_REPEAT_RATE, IDC_ICON_REPEAT_RATE, 15, 70, 15, 15 - LTEXT "& :", -1, 51, 70, 100, 10 - LTEXT "", -1, 60, 91, 22, 10 - LTEXT "", -1, 191, 91, 22, 10 + LTEXT "&Скорость повтора:", -1, 51, 70, 100, 10 + LTEXT "Ниже", -1, 60, 91, 22, 10 + LTEXT "Выше", -1, 191, 91, 22, 10 CONTROL "",IDC_SLIDER_REPEAT_RATE, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 84, 85, 102, 17 - LTEXT "& , , :", -1, 15, 105, 216, 22 + LTEXT "&Чтобы проверить скорость повтора, поместите курсор в поле, нажмите любую клавишу и не отпускайте ее:", -1, 15, 105, 216, 22 EDITTEXT IDC_EDIT_REPEAT_RATE, 15, 130, 213, 15, WS_CHILD | WS_VISIBLE | WS_GROUP - GROUPBOX " ", -1, 5, 160, 236, 50 + GROUPBOX "Частота мерцания курсора", -1, 5, 160, 236, 50 LTEXT "", IDC_TEXT_CURSOR_BLINK, 23, 180, 1, 8 - LTEXT "", -1, 45, 180, 30, 10 - LTEXT "", -1, 205, 180, 30, 10 + LTEXT "Ниже", -1, 45, 180, 30, 10 + LTEXT "Выше", -1, 205, 180, 30, 10 CONTROL "",IDC_SLIDER_CURSOR_BLINK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 70, 180, 130, 17 END IDD_HARDWARE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Оборудование" FONT 8, "MS Shell Dlg" BEGIN END IDD_CLICK_LOCK DIALOGEX 0, 0, 234, 100 STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Залипание клавиш" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", -1, 60, 50, 30, 10 - LTEXT "", -1, 165, 50, 30, 10 + LTEXT "Короче", -1, 60, 50, 30, 10 + LTEXT "Дольше", -1, 165, 50, 30, 10 CONTROL "",IDC_SLIDER_CLICK_LOCK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 90, 50, 70, 17 PUSHBUTTON "&OK", IDOK, 120, 79, 50, 15 - PUSHBUTTON "&", IDCANCEL, 177, 79, 50, 15 - LTEXT "&, , .",-1,60,15,170,30 + PUSHBUTTON "&Отмена", IDCANCEL, 177, 79, 50, 15 + LTEXT "&Выберите, как долго следует удерживать нажатой кнопку мыши или трекбола для того, чтобы сработало залипание.",-1,60,15,170,30 ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " " +CAPTION "Кнопки мыши" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 5, 5, 236, 70 - CHECKBOX "& ", IDC_SWAP_MOUSE_BUTTONS, 14, 17, 140, 10 + GROUPBOX "Конфигурация кнопок", -1, 5, 5, 236, 70 + CHECKBOX "&Обменять назначение кнопок", IDC_SWAP_MOUSE_BUTTONS, 14, 17, 140, 10 CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON | SS_CENTERIMAGE | WS_VISIBLE, 176, 16, 58, 51, WS_EX_STATICEDGE - LTEXT " , . , .", -1, 12, 30, 150, 38 - GROUPBOX " ", -1, 5, 79, 236, 70 - LTEXT " . , .", -1, 12, 89, 160, 35 - LTEXT "&: ", -1, 12, 124, 61, 10 - LTEXT "", -1, 146, 124, 24, 10 + LTEXT "Назначает правую кнопку для выполнения таких основных функций, как выбор и перетаскивание. Часто используется теми, кто работает мышью левой рукой.", -1, 12, 30, 150, 38 + GROUPBOX "Скорость выполнения двойного щелчка", -1, 5, 79, 236, 70 + LTEXT "Сделайте двойной щелчок по этому значку. Если папка не открывается или не закрывается, выберите более низкую скорость.", -1, 12, 89, 160, 35 + LTEXT "&Скорость: Ниже", -1, 12, 124, 61, 10 + LTEXT "Выше", -1, 146, 124, 24, 10 CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 71, 125, 70, 17 CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON | SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 176, 90, 58, 51, WS_EX_STATICEDGE - GROUPBOX " ", -1, 5, 153, 236, 70 - CHECKBOX "& ", IDC_CHECK_CLICK_LOCK, 14, 164, 99, 17 - PUSHBUTTON "&...", IDC_BUTTON_CLICK_LOCK, 173, 165, 55, 14 - LTEXT " . . .", -1, 12, 183, 222, 36 + GROUPBOX "Залипание кнопки мыши", -1, 5, 153, 236, 70 + CHECKBOX "&Включить залипание", IDC_CHECK_CLICK_LOCK, 14, 164, 99, 17 + PUSHBUTTON "&Параметры...", IDC_BUTTON_CLICK_LOCK, 173, 165, 55, 14 + LTEXT "Позволяет выполнять выделение и перетаскивание без удерживания кнопки нажатой. Для включения ненадолго задержите кнопку мыши в нажатом положении. Для освобождения снова сделайте щелчок.", -1, 12, 183, 222, 36 END IDD_PAGE_POINTER DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Указатели" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 5, 5, 183, 45 + GROUPBOX "Схема", -1, 5, 5, 183, 45 COMBOBOX IDC_COMBO_CURSOR_SCHEME, 10, 15, 172, 200, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON " &...", IDC_BUTTON_SAVEAS_SCHEME, 58, 30, 70, 14 - PUSHBUTTON "&", IDC_BUTTON_DELETE_SCHEME, 132, 30, 50, 14 + PUSHBUTTON "Сохранить &как...", IDC_BUTTON_SAVEAS_SCHEME, 58, 30, 70, 14 + PUSHBUTTON "&Удалить", IDC_BUTTON_DELETE_SCHEME, 132, 30, 50, 14 CONTROL "", IDC_IMAGE_CURRENT_CURSOR, "Static", SS_ICON | SS_CENTERIMAGE | WS_VISIBLE, 195, 9, 45, 41, WS_EX_STATICEDGE - LTEXT "&", -1, 5, 60, 40, 10 + LTEXT "&Настройка", -1, 5, 60, 40, 10 LISTBOX IDC_LISTBOX_CURSOR, 5, 70, 235, 125, WS_VISIBLE | WS_BORDER | WS_TABSTOP | WS_VSCROLL | LBS_OWNERDRAWFIXED | LBS_NOTIFY - CHECKBOX " & ", IDC_CHECK_CURSOR_SHADOW, 5, 203, 108, 10 - PUSHBUTTON "& ", IDC_BUTTON_USE_DEFAULT_CURSOR, 116, 200, 64, 14 - PUSHBUTTON "&", IDC_BUTTON_BROWSE_CURSOR, 185, 200, 55, 14 + CHECKBOX "Включить &тень указателя", IDC_CHECK_CURSOR_SHADOW, 5, 203, 108, 10 + PUSHBUTTON "&По умолчанию", IDC_BUTTON_USE_DEFAULT_CURSOR, 116, 200, 64, 14 + PUSHBUTTON "&Обзор", IDC_BUTTON_BROWSE_CURSOR, 185, 200, 55, 14 END IDD_CURSOR_SCHEME_SAVEAS DIALOGEX 0, 0, 200, 65 STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Сохранение схемы" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 5, 5, 190, 10 + LTEXT "Название сохраняемой схемы указателей мыши:", -1, 5, 5, 190, 10 EDITTEXT IDC_EDIT_SCHEME_NAME, 5, 18, 190, 15, WS_CHILD | WS_VISIBLE | WS_GROUP PUSHBUTTON "&OK", IDOK, 90, 45, 50, 15 - PUSHBUTTON "&", IDCANCEL, 145, 45, 50, 15 + PUSHBUTTON "&Отмена", IDCANCEL, 145, 45, 50, 15 END IDD_PAGE_OPTION DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " " +CAPTION "Параметры указателя" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 5, 5, 236, 60 - LTEXT "& :", -1, 60, 15, 150, 10 - LTEXT "", -1, 60, 30, 20, 10 + GROUPBOX "Перемещение", -1, 5, 5, 236, 60 + LTEXT "&Задайте скорость движение указателя:", -1, 60, 15, 150, 10 + LTEXT "Ниже", -1, 60, 30, 20, 10 CONTROL "",IDC_SLIDER_MOUSE_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 90, 30, 70, 17 - LTEXT "", -1, 170, 30, 20, 10 + LTEXT "Выше", -1, 170, 30, 20, 10 ICON IDI_MOUSE_SPEED, IDC_ICON_MOUSE_SPEED, 15, 18, 15, 15 - CHECKBOX "& ", IDC_CHECK_POINTER_PRECISION, 20, 50, 205, 10 - GROUPBOX " ", -1, 5, 71, 236, 42 - CHECKBOX "& , ", + CHECKBOX "&Включить повышенную точность установки указателя", IDC_CHECK_POINTER_PRECISION, 20, 50, 205, 10 + GROUPBOX "Исходное положение в диалоговом окне", -1, 5, 71, 236, 42 + CHECKBOX "&На кнопке, выбираемой по умолчанию", IDC_CHECK_SNAP_TO, 44, 88, 170, 20, BS_MULTILINE | BS_TOP ICON IDI_MOUSE_BUTTON, IDC_ICON_SNAP_TO, 15, 83, 15, 15 - GROUPBOX "", -1, 5, 118, 236, 104 - CHECKBOX "& ", IDC_CHECK_POINTER_TRAIL, 44, 135, 135, 10 - LTEXT "", IDC_TEXT_TRAIL_SHORT, 54, 149, 30, 10 - LTEXT "", IDC_TEXT_TRAIL_LONG, 160, 149, 30, 10 + GROUPBOX "Видимость", -1, 5, 118, 236, 104 + CHECKBOX "&Отображать след указателя мыши", IDC_CHECK_POINTER_TRAIL, 44, 135, 135, 10 + LTEXT "Короче", IDC_TEXT_TRAIL_SHORT, 54, 149, 30, 10 + LTEXT "Длиннее", IDC_TEXT_TRAIL_LONG, 160, 149, 30, 10 ICON IDI_MOUSE_TRAILS, IDC_ICON_POINTER_TRAIL, 15, 134, 15, 15 CONTROL "", IDC_SLIDER_POINTER_TRAIL ,"msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 82, 146, 70, 17 - CHECKBOX "& ", IDC_CHECK_HIDE_POINTER, 44, 164, 190, 20 + CHECKBOX "&Скрывать указатель во время ввода с клавиатуры", IDC_CHECK_HIDE_POINTER, 44, 164, 190, 20 ICON IDI_MOUSE_SPEED, IDC_ICON_HIDE_POINTER, 15, 167, 15, 15 - CHECKBOX " & CTRL", + CHECKBOX "Обозначать поло&жение указателя при нажатии CTRL", IDC_CHECK_SHOW_POINTER, 44, 197, 186, 20, BS_MULTILINE | BS_TOP ICON IDI_MOUSE_POINTER, IDC_ICON_SHOW_POINTER, 15, 194, 15, 15 END IDD_PAGE_WHEEL DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Колесико" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 5, 5, 236, 80 + GROUPBOX "Прокрутка", -1, 5, 5, 236, 80 ICON IDI_MOUSE_WHEEL, IDC_ICON_WHEEL, 20, 28, 32, 32 - LTEXT " :", -1, 20, 17, 212, 10 - RADIOBUTTON " &:", IDC_RADIO_WHEEL_SCROLL_LINES, 60, 30, 150, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP - RADIOBUTTON " &", IDC_RADIO_WHEEL_SCROLL_PAGE, 60, 65, 90, 10 + LTEXT "Поворот колесика на один щелчок служит для прокрутки:", -1, 20, 17, 212, 10 + RADIOBUTTON "на указанное количество &строк:", IDC_RADIO_WHEEL_SCROLL_LINES, 60, 30, 150, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP + RADIOBUTTON "на один &экран", IDC_RADIO_WHEEL_SCROLL_PAGE, 60, 65, 90, 10 EDITTEXT IDC_EDIT_WHEEL_SCROLL_LINES, 70, 45, 56, 12, ES_RIGHT | WS_VISIBLE | WS_GROUP | WS_TABSTOP CONTROL "", IDC_UPDOWN_WHEEL_SCROLL_LINES, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER, 125, 45, 12, 12 END @@ -142,32 +142,32 @@ END STRINGTABLE BEGIN - IDS_CPLNAME_1 "" - IDS_CPLDESCRIPTION_1 " ." - IDS_CPLNAME_2 "" - IDS_CPLDESCRIPTION_2 " ." - IDS_ARROW " " - IDS_HELP " " - IDS_APPSTARTING " " - IDS_WAIT " " - IDS_CROSSHAIR " " - IDS_IBEAM " " - IDS_NWPEN " " - IDS_NO " " - IDS_SIZENS " " - IDS_SIZEWE " " - IDS_SIZENWSE " 1" - IDS_SIZENESW " 2" - IDS_SIZEALL "" - IDS_UPARROW " " - IDS_HAND " " - IDS_NONE "()" - IDS_SYSTEM_SCHEME "( )" - IDS_BROWSE_FILTER " (*.ani, *.cur)\0*.ani;*.cur\0 (*.ani)\0*.ani\0 (*.cur)\0*.cur\0 \0*.*\0\0" - IDS_BROWSE_TITLE "" - IDS_REMOVE_TITLE " " - IDS_REMOVE_TEXT " '%s'?" - IDS_OVERWRITE_TITLE " " - IDS_OVERWRITE_TEXT " . ?" - IDS_ANIMATE_CURSOR " " + IDS_CPLNAME_1 "Мышь" + IDS_CPLDESCRIPTION_1 "Изменение настроек мыши." + IDS_CPLNAME_2 "Клавиатура" + IDS_CPLDESCRIPTION_2 "Изменение настроек клавиатуры." + IDS_ARROW "Основной режим" + IDS_HELP "Выбор справки" + IDS_APPSTARTING "Фоновой режим" + IDS_WAIT "Система недоступна" + IDS_CROSSHAIR "Графическое выделение" + IDS_IBEAM "Выделение текста" + IDS_NWPEN "Рукописный ввод" + IDS_NO "Операция невозможна" + IDS_SIZENS "Изменение вертикальных размеров" + IDS_SIZEWE "Изменение горизонтальных размеров" + IDS_SIZENWSE "Изменение размеров по диагонали 1" + IDS_SIZENESW "Изменение размеров по диагонали 2" + IDS_SIZEALL "Перемещение" + IDS_UPARROW "Специальное выделение" + IDS_HAND "Выбор ссылки" + IDS_NONE "(нет)" + IDS_SYSTEM_SCHEME "(системная схема)" + IDS_BROWSE_FILTER "Курсоры (*.ani, *.cur)\0*.ani;*.cur\0Анимированные курсоры (*.ani)\0*.ani\0Обычные курсоры (*.cur)\0*.cur\0Все файлы\0*.*\0\0" + IDS_BROWSE_TITLE "Обзор" + IDS_REMOVE_TITLE "Подтверждение удаления схемы" + IDS_REMOVE_TEXT "Вы действительно хотите удалить схему курсоров '%s'?" + IDS_OVERWRITE_TITLE "Подтверждение замены схемы" + IDS_OVERWRITE_TEXT "Выбранное имя схемы курсоров уже занято. Заменить существующую схему?" + IDS_ANIMATE_CURSOR "Анимированный курсор" END diff --git a/dll/cpl/main/lang/uk-UA.rc b/dll/cpl/main/lang/uk-UA.rc index 3caeae1e55c..79df2db7fc9 100644 --- a/dll/cpl/main/lang/uk-UA.rc +++ b/dll/cpl/main/lang/uk-UA.rc @@ -10,171 +10,171 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_KEYBSPEED DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Швидкість" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " , ", -1, 5, 5, 230, 130 + GROUPBOX "Повтор символу, що вводиться", -1, 5, 5, 230, 130 ICON IDI_REPEAT_DELAY, IDC_ICON_REPEAT_DELAY, 15, 15, 15, 15 - LTEXT "& ", -1, 40, 15, 170, 10 - LTEXT "", -1, 40, 30, 23, 10 - LTEXT "", -1, 200, 30, 29, 10 + LTEXT "&Затримка перед початком повтору символу", -1, 40, 15, 170, 10 + LTEXT "Довше", -1, 40, 30, 23, 10 + LTEXT "Коротше", -1, 200, 30, 29, 10 CONTROL "",IDC_SLIDER_REPEAT_DELAY, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 30, 130, 17 ICON IDI_REPEAT_RATE, IDC_ICON_REPEAT_RATE, 15, 70, 15, 15 - LTEXT "& ", -1, 40, 70, 80, 10 - LTEXT "", -1, 40, 85, 22, 10 - LTEXT "", -1, 200, 85, 20, 10 + LTEXT "&Швидкість повтору", -1, 40, 70, 80, 10 + LTEXT "Нижче", -1, 40, 85, 22, 10 + LTEXT "Вище", -1, 200, 85, 20, 10 CONTROL "",IDC_SLIDER_REPEAT_RATE, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 85, 130, 17 - LTEXT " & :", -1, 15, 105, 150, 10 + LTEXT "Затисніть клавішу в полі для &перевірки швидкості повтору:", -1, 15, 105, 150, 10 EDITTEXT IDC_EDIT_REPEAT_RATE, 15, 115, 200, 15, WS_CHILD | WS_VISIBLE | WS_GROUP - GROUPBOX " & :", -1, 5, 145, 230, 50 + GROUPBOX "Частота м&ерехтіння курсора:", -1, 5, 145, 230, 50 LTEXT "", IDC_TEXT_CURSOR_BLINK, 20, 165, 1, 8 - LTEXT "", -1, 40, 165, 30, 10 - LTEXT "", -1, 200, 165, 30, 10 + LTEXT "Немає", -1, 40, 165, 30, 10 + LTEXT "Швидко", -1, 200, 165, 30, 10 CONTROL "",IDC_SLIDER_CURSOR_BLINK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 165, 130, 17 END IDD_HARDWARE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Обладнання" FONT 8, "MS Shell Dlg" BEGIN END IDD_CLICK_LOCK DIALOGEX 0, 0, 246, 100 STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Залипання" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", -1, 35, 50, 30, 10 - LTEXT "", -1, 140, 50, 30, 10 + LTEXT "Коротше", -1, 35, 50, 30, 10 + LTEXT "Довше", -1, 140, 50, 30, 10 CONTROL "",IDC_SLIDER_CLICK_LOCK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 65, 50, 70, 17 PUSHBUTTON "&OK", IDOK, 120, 75, 50, 15 - PUSHBUTTON "&", IDCANCEL, 175, 75, 50, 15 - LTEXT "&, ",-1,60,15,170,30 + PUSHBUTTON "&Скасувати", IDCANCEL, 175, 75, 50, 15 + LTEXT "&Виберіть, як довго слід утримувати натиснуту кнопку миші або трекбола перед спрацьовуванням залипання",-1,60,15,170,30 ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " " +CAPTION "Кнопки миші" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 5, 5, 230, 70 - CHECKBOX "& ", IDC_SWAP_MOUSE_BUTTONS, 10, 15, 140, 10 + GROUPBOX "Конфігурація кнопок", -1, 5, 5, 230, 70 + CHECKBOX "О&бміняти призначення кнопок", IDC_SWAP_MOUSE_BUTTONS, 10, 15, 140, 10 CONTROL "", IDC_IMAGE_SWAP_MOUSE, "Static", SS_ICON | SS_CENTERIMAGE | WS_VISIBLE, 165, 15, 65, 57, WS_EX_STATICEDGE - LTEXT " , , ", -1, 10, 30, 150, 30 - GROUPBOX " ", -1, 5, 75, 230, 70 - LTEXT " . , .", -1, 10, 85, 150, 30 - LTEXT "&: ", -1, 10, 120, 90, 8 - LTEXT "", -1, 142, 120, 30, 8 + LTEXT "Встановіть цей прапорець, щоб призначити праву кнопку для виконання таких основних функцій, як вибір і перетягування", -1, 10, 30, 150, 30 + GROUPBOX "Швидкість подвійного клацання", -1, 5, 75, 230, 70 + LTEXT "Двічі клацніть по цій теці. Якщо тека не відкривається або не закривається, виберіть меншу швидкість.", -1, 10, 85, 150, 30 + LTEXT "&Швидкість: Нижче", -1, 10, 120, 90, 8 + LTEXT "Вище", -1, 142, 120, 30, 8 CONTROL "",IDC_SLIDER_DOUBLE_CLICK_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 72, 120, 70, 17 CONTROL "", IDC_IMAGE_DOUBLE_CLICK_SPEED, "Static", SS_ICON | SS_NOTIFY | SS_CENTERIMAGE | WS_VISIBLE, 165, 85, 65, 57, WS_EX_STATICEDGE - GROUPBOX " ", -1, 5, 150, 230, 70 - CHECKBOX "& ", IDC_CHECK_CLICK_LOCK, 10, 160, 87, 35 - PUSHBUTTON "&...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10 - LTEXT " , . , . , .", -1, 10, 180, 190, 33 + GROUPBOX "Залипання кнопки миші", -1, 5, 150, 230, 70 + CHECKBOX "&Увімкнути залипання", IDC_CHECK_CLICK_LOCK, 10, 160, 87, 35 + PUSHBUTTON "&Параметри...", IDC_BUTTON_CLICK_LOCK, 170, 160, 50, 10 + LTEXT "Дозволяє виконувати виділення й перетягування, не утримуючи кнопку миші натиснутою. Щоб увімкнути цей режим, ненадовго натисніть кнопку миші. Щоб вимкнути цей режим, натисніть кнопку миші ще раз.", -1, 10, 180, 190, 33 END IDD_PAGE_POINTER DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Вказівники" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 5, 5, 170, 45 + GROUPBOX "Схема", -1, 5, 5, 170, 45 COMBOBOX IDC_COMBO_CURSOR_SCHEME, 10, 15, 145, 200, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON " &...", IDC_BUTTON_SAVEAS_SCHEME, 70, 30, 50, 15 - PUSHBUTTON "&", IDC_BUTTON_DELETE_SCHEME, 125, 30, 40, 15 + PUSHBUTTON "Зберегти &як...", IDC_BUTTON_SAVEAS_SCHEME, 70, 30, 50, 15 + PUSHBUTTON "В&идалити", IDC_BUTTON_DELETE_SCHEME, 125, 30, 40, 15 CONTROL "", IDC_IMAGE_CURRENT_CURSOR, "Static", SS_ICON | SS_CENTERIMAGE | WS_VISIBLE, 190, 9, 45, 41, WS_EX_STATICEDGE - LTEXT "&", -1, 5, 60, 40, 10 + LTEXT "&Настройка", -1, 5, 60, 40, 10 LISTBOX IDC_LISTBOX_CURSOR, 5, 70, 230, 120, WS_VISIBLE | WS_BORDER | WS_TABSTOP | WS_VSCROLL | LBS_OWNERDRAWFIXED | LBS_NOTIFY - CHECKBOX " & ", IDC_CHECK_CURSOR_SHADOW, 5, 200, 100, 10 - PUSHBUTTON "&", IDC_BUTTON_USE_DEFAULT_CURSOR, 120, 200, 50, 15 - PUSHBUTTON "&", IDC_BUTTON_BROWSE_CURSOR, 175, 200, 50, 15 + CHECKBOX "Увімкнути &тінь вказівника", IDC_CHECK_CURSOR_SHADOW, 5, 200, 100, 10 + PUSHBUTTON "&Стандартно", IDC_BUTTON_USE_DEFAULT_CURSOR, 120, 200, 50, 15 + PUSHBUTTON "&Огляд", IDC_BUTTON_BROWSE_CURSOR, 175, 200, 50, 15 END IDD_CURSOR_SCHEME_SAVEAS DIALOGEX 0, 0, 200, 75 STYLE DS_SHELLFONT | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Збереження схеми" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 5, 5, 100, 10 + LTEXT "Назва схеми вказівників миші:", -1, 5, 5, 100, 10 EDITTEXT IDC_EDIT_SCHEME_NAME, 5, 15, 180, 15, WS_CHILD | WS_VISIBLE | WS_GROUP PUSHBUTTON "&OK", IDOK, 60, 45, 50, 15 - PUSHBUTTON "&", IDCANCEL, 115, 45, 50, 15 + PUSHBUTTON "&Скасувати", IDCANCEL, 115, 45, 50, 15 END IDD_PAGE_OPTION DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " " +CAPTION "Параметри вказівника" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 5, 5, 230, 60 - LTEXT "& :", -1, 60, 15, 150, 10 - LTEXT "", -1, 60, 30, 23, 10 + GROUPBOX "Переміщення", -1, 5, 5, 230, 60 + LTEXT "&Виберіть швидкість руху вказівника:", -1, 60, 15, 150, 10 + LTEXT "Нижче", -1, 60, 30, 23, 10 CONTROL "",IDC_SLIDER_MOUSE_SPEED, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 90, 30, 70, 17 - LTEXT "", -1, 170, 30, 20, 10 + LTEXT "Вище", -1, 170, 30, 20, 10 ICON IDI_MOUSE_SPEED, IDC_ICON_MOUSE_SPEED, 15, 15, 15, 15 - CHECKBOX "&ϳ ", IDC_CHECK_POINTER_PRECISION, 60, 50, 118, 10 - GROUPBOX "' ", -1, 5, 65, 230, 40 - CHECKBOX ", & ", + CHECKBOX "&Підвищена точність вказівника", IDC_CHECK_POINTER_PRECISION, 60, 50, 118, 10 + GROUPBOX "Прив'язка до", -1, 5, 65, 230, 40 + CHECKBOX "Кнопки, що &вибирана за замовчуванням в діалоговому вікні", IDC_CHECK_SNAP_TO, 60, 75, 170, 20, BS_MULTILINE | BS_TOP ICON IDI_MOUSE_BUTTON, IDC_ICON_SNAP_TO, 15, 75, 15, 15 - GROUPBOX "", -1, 5, 105, 230, 95 - CHECKBOX "&³ ", IDC_CHECK_POINTER_TRAIL, 60, 115, 110, 10 - LTEXT "", IDC_TEXT_TRAIL_SHORT, 60, 130, 30, 10 - LTEXT "", IDC_TEXT_TRAIL_LONG, 160, 130, 30, 10 + GROUPBOX "Видимість", -1, 5, 105, 230, 95 + CHECKBOX "&Відображати слід вказівника", IDC_CHECK_POINTER_TRAIL, 60, 115, 110, 10 + LTEXT "Коротше", IDC_TEXT_TRAIL_SHORT, 60, 130, 30, 10 + LTEXT "Довше", IDC_TEXT_TRAIL_LONG, 160, 130, 30, 10 ICON IDI_MOUSE_TRAILS, IDC_ICON_POINTER_TRAIL, 15, 115, 15, 15 CONTROL "", IDC_SLIDER_POINTER_TRAIL ,"msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, 90, 130, 70, 17 - CHECKBOX "& ", IDC_CHECK_HIDE_POINTER, 60, 150, 90, 10 + CHECKBOX "П&риховувати вказівник під час введення з клавіатури", IDC_CHECK_HIDE_POINTER, 60, 150, 90, 10 ICON IDI_MOUSE_SPEED, IDC_ICON_HIDE_POINTER, 15, 145, 15, 15 - CHECKBOX " & CTRL", + CHECKBOX "Показувати ро&зташування вказівника при натисненні CTRL", IDC_CHECK_SHOW_POINTER, 60, 175, 170, 20, BS_MULTILINE | BS_TOP ICON IDI_MOUSE_POINTER, IDC_ICON_SHOW_POINTER, 15, 170, 15, 15 END IDD_PAGE_WHEEL DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Коліщатко" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 5, 5, 230, 80 + GROUPBOX "Прокрутка", -1, 5, 5, 230, 80 ICON IDI_MOUSE_WHEEL, IDC_ICON_WHEEL, 20, 20, 32, 32 - LTEXT " ", -1, 60, 15, 150, 10 - RADIOBUTTON " &:", IDC_RADIO_WHEEL_SCROLL_LINES, 60, 30, 150, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP - RADIOBUTTON " &", IDC_RADIO_WHEEL_SCROLL_PAGE, 60, 65, 90, 10 + LTEXT "Поворот коліщатка на одне клацання прокручує", -1, 60, 15, 150, 10 + RADIOBUTTON "На вказану кількість &рядків:", IDC_RADIO_WHEEL_SCROLL_LINES, 60, 30, 150, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP + RADIOBUTTON "На один &екран", IDC_RADIO_WHEEL_SCROLL_PAGE, 60, 65, 90, 10 EDITTEXT IDC_EDIT_WHEEL_SCROLL_LINES, 70, 45, 60, 15, ES_RIGHT | WS_VISIBLE | WS_GROUP | WS_TABSTOP CONTROL "", IDC_UPDOWN_WHEEL_SCROLL_LINES, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER, 125, 45, 12, 12 END STRINGTABLE BEGIN - IDS_CPLNAME_1 "" - IDS_CPLDESCRIPTION_1 " ." - IDS_CPLNAME_2 "" - IDS_CPLDESCRIPTION_2 " ." - IDS_ARROW " " - IDS_HELP " " - IDS_APPSTARTING " " - IDS_WAIT " " - IDS_CROSSHAIR " " - IDS_IBEAM " " - IDS_NWPEN " " - IDS_NO " " - IDS_SIZENS " " - IDS_SIZEWE " " - IDS_SIZENWSE " 1" - IDS_SIZENESW " 2" - IDS_SIZEALL "" - IDS_UPARROW " " - IDS_HAND " " - IDS_NONE "()" - IDS_SYSTEM_SCHEME "( )" - IDS_BROWSE_FILTER " (*.ani, *.cur)\0*.ani;*.cur\0 (*.ani)\0*.ani\0 (*.cur)\0*.cur\0 \0*.*\0\0" - IDS_BROWSE_TITLE "" - IDS_REMOVE_TITLE "ϳ " - IDS_REMOVE_TEXT " '%s' ?" - IDS_OVERWRITE_TITLE "ϳ " - IDS_OVERWRITE_TEXT " . ?" - IDS_ANIMATE_CURSOR " " + IDS_CPLNAME_1 "Миша" + IDS_CPLDESCRIPTION_1 "Змінює настройки миші." + IDS_CPLNAME_2 "Клавіатура" + IDS_CPLDESCRIPTION_2 "Змінює настройки клавіатури." + IDS_ARROW "Основний режим" + IDS_HELP "Вибір довідки" + IDS_APPSTARTING "Фоновий режим" + IDS_WAIT "Система зайнята" + IDS_CROSSHAIR "Графічне виділення" + IDS_IBEAM "Виділення тексту" + IDS_NWPEN "Рукописне введення" + IDS_NO "Операція неможлива" + IDS_SIZENS "Зміна вертикальних розмірів" + IDS_SIZEWE "Зміна горизонтальних розмірів" + IDS_SIZENWSE "Зміна розмірів по діагоналі 1" + IDS_SIZENESW "Зміна розмірів по діагоналі 2" + IDS_SIZEALL "Переміщення" + IDS_UPARROW "Спеціальне виділення" + IDS_HAND "Вибір посилання" + IDS_NONE "(немає)" + IDS_SYSTEM_SCHEME "(системна схема)" + IDS_BROWSE_FILTER "Вказівники (*.ani, *.cur)\0*.ani;*.cur\0Анімовані вказівники (*.ani)\0*.ani\0Звичайні вказівники (*.cur)\0*.cur\0Усі файли\0*.*\0\0" + IDS_BROWSE_TITLE "Огляд" + IDS_REMOVE_TITLE "Підтвердження видалення схеми" + IDS_REMOVE_TEXT "Ви дійсно бажаєте видалити схему '%s' із системи?" + IDS_OVERWRITE_TITLE "Підтвердження заміни схеми" + IDS_OVERWRITE_TEXT "Вибрана схема вказівників уже використовується. Замінити вихідну схему?" + IDS_ANIMATE_CURSOR "Анімований вказівник" END diff --git a/dll/cpl/main/rsrc.rc b/dll/cpl/main/rsrc.rc index 9284a15bcb1..fe768729384 100644 --- a/dll/cpl/main/rsrc.rc +++ b/dll/cpl/main/rsrc.rc @@ -14,9 +14,12 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/mmsys/CMakeLists.txt b/dll/cpl/mmsys/CMakeLists.txt index f0078e88a03..5206561480f 100644 --- a/dll/cpl/mmsys/CMakeLists.txt +++ b/dll/cpl/mmsys/CMakeLists.txt @@ -2,8 +2,6 @@ set_unicode() set_rc_compiler() -add_definitions(-D_DLL -D__USE_CRTIMP) - spec2def(mmsys.cpl mmsys.spec) add_library(mmsys SHARED diff --git a/dll/cpl/mmsys/lang/pl-PL.rc b/dll/cpl/mmsys/lang/pl-PL.rc index 1765b4a273c..928b6d5468a 100644 --- a/dll/cpl/mmsys/lang/pl-PL.rc +++ b/dll/cpl/mmsys/lang/pl-PL.rc @@ -1,54 +1,56 @@ /* - * translated by Caemyr - Olaf Siejka (Jan-Feb, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan-Feb, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; * - * IDS_CPLNAME and IDS_CPLDESCRIPTION translated by xrogers - * xxrogers@users.sourceforge.net - * https://sourceforge.net/projects/reactospl -*/ + * IDS_CPLNAME and IDS_CPLDESCRIPTION translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_VOLUME DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Gono" +CAPTION "Głośność" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLICON, IDI_CPLICON, 8,5,32,32 LTEXT "",IDC_DEVICE_NAME,40,10,194,36 - GROUPBOX "Gono urzdzenia", -1, 7,30,230,100 + GROUPBOX "Głośność urządzenia", -1, 7,30,230,100 CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE,17,45,32,32 CONTROL "",IDC_VOLUME_TRACKBAR, "msctls_trackbar32", TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14 - LTEXT "Maa",-1,62,66,30,17 - LTEXT "Dua",-1,195,66,30,17 + LTEXT "Mała",-1,62,66,30,17 + LTEXT "Duża",-1,195,66,30,17 CHECKBOX "&Wycisz", IDC_MUTE_CHECKBOX, 50, 78, 140, 10 - CHECKBOX "Umie &ikon gonoci w zasobniku systemowym", IDC_ICON_IN_TASKBAR, 50, 92, 140, 10 + CHECKBOX "Umieść &ikonę głośności w zasobniku systemowym", IDC_ICON_IN_TASKBAR, 50, 92, 140, 10 PUSHBUTTON "&Zaawansowane...", IDC_ADVANCED_BTN, 150,105,75,15 - GROUPBOX "Ustawienia gonikw", IDC_SPEAKER_SET_BTN, 7,140,230,80 + GROUPBOX "Ustawienia głośników", IDC_SPEAKER_SET_BTN, 7,140,230,80 CONTROL "", IDC_SPEAKIMG, "Static", SS_OWNERDRAW, 4, 160, 70, 70 - LTEXT "Uyj ustawie poniej aby zmieni indywidualny poziom gonoci i dostosowa ustawienia zaawansowane.",-1,70,155,150,36 - PUSHBUTTON "&Goniki...", IDC_SPEAKER_VOL_BTN, 70,195,75,15 + LTEXT "Użyj ustawień poniżej aby zmienić indywidualny poziom głośności i dostosować ustawienia zaawansowane.",-1,70,155,150,36 + PUSHBUTTON "&Głośniki...", IDC_SPEAKER_VOL_BTN, 70,195,75,15 PUSHBUTTON "Z&aawansowane...", IDC_ADVANCED2_BTN, 150,195,75,15 END IDD_SOUNDS DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Dwiki" +CAPTION "Dźwięki" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Schemat dwikowy to zestaw dwikw dla kadego ze zdarze systemowych w ReactOS i aplikacjach. Moesz wybra istniejcy ju schemat albo stworzy i zapisa wasny.",-1,8,7,230,40 - LTEXT "S&chemat dwikowy:",-1,8,42,150,17 + LTEXT "Schemat dźwiękowy to zestaw dźwięków dla każdego ze zdarzeń systemowych w ReactOS i aplikacjach. Możesz wybrać istniejący już schemat albo stworzyć i zapisać własny.",-1,8,7,230,40 + LTEXT "S&chemat dźwiękowy:",-1,8,42,150,17 COMBOBOX IDC_SOUND_SCHEME, 8, 53, 230, 46, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Za&pisz jako...", IDC_SAVEAS_BTN, 134,70,50,15 PUSHBUTTON "S&kasuj", IDC_DELETE_BTN, 188,70,50,15 - LTEXT "Aby zmieni dwik, kliknij na zdarzenie z listy poniej a nastpnie wybierz dwik. Zmiany moesz zapisa w nowym lub obecnym schemacie dwikowym.",-1,8,90,230,40 + LTEXT "Aby zmienić dźwięk, kliknij na zdarzenie z listy poniżej a następnie wybierz dźwięk. Zmiany możesz zapisać w nowym lub obecnym schemacie dźwiękowym.",-1,8,90,230,40 LTEXT "&Zdarzenia:",-1,8,118,150,17 CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130, 230, 60, WS_EX_CLIENTEDGE - LTEXT "&Dwiki:", IDC_TEXT_SOUND,8,194,80,17, WS_DISABLED + LTEXT "&Dźwięki:", IDC_TEXT_SOUND,8,194,80,17, WS_DISABLED COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED PUSHBUTTON "", IDC_PLAY_SOUND, 168,205,15,15, WS_DISABLED | BS_ICON - PUSHBUTTON "&Przegldaj...", IDC_BROWSE_SOUND, 188,205,50,15, WS_DISABLED + PUSHBUTTON "&Przeglądaj...", IDC_BROWSE_SOUND, 188,205,50,15, WS_DISABLED END IDD_AUDIO DIALOGEX 0, 0, 246, 228 @@ -56,51 +58,51 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Audio" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Odtwarzanie dwiku", -1, 7,7,230,60 + GROUPBOX "Odtwarzanie dźwięku", -1, 7,7,230,60 ICON IDI_CPLICON, IDI_CPLICON, 15,20,32,32 - LTEXT "Urzdzen&ie domylne:",-1,50,20,80,17 + LTEXT "Urządzen&ie domyślne:",-1,50,20,80,17 COMBOBOX IDC_DEVICE_PLAY_LIST, 50, 30, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&Gono...", IDC_VOLUME1_BTN, 85,47,70,15 + PUSHBUTTON "&Głośność...", IDC_VOLUME1_BTN, 85,47,70,15 PUSHBUTTON "Zaa&wansowane", IDC_ADV2_BTN, 160,47,70,15 - GROUPBOX "Nagrywanie dwiku", -1, 7,75,230,60 + GROUPBOX "Nagrywanie dźwięku", -1, 7,75,230,60 ICON IDI_MICROPHONE_ICON, IDI_MICROPHONE_ICON, 15,88,32,32 - LTEXT "U&rzdzenie domylne:",-1,50,88,80,17 + LTEXT "U&rządzenie domyślne:",-1,50,88,80,17 COMBOBOX IDC_DEVICE_REC_LIST, 50, 98, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "G&ono....", IDC_VOLUME2_BTN, 85,115,70,15 + PUSHBUTTON "Gł&ośność....", IDC_VOLUME2_BTN, 85,115,70,15 PUSHBUTTON "Zaawan&sowane", IDC_ADV1_BTN, 160,115,70,15 GROUPBOX "Odtwarzanie MIDI", -1, 7,145,230,60 ICON IDI_MIDICON, IDI_MIDICON, 15,158,32,32 - LTEXT "Urz&dzenie domylne:",-1,50,158,80,17 + LTEXT "Urzą&dzenie domyślne:",-1,50,158,80,17 COMBOBOX IDC_DEVICE_MIDI_LIST, 50, 168, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "Go&no....", IDC_VOLUME3_BTN, 85,185,70,15 + PUSHBUTTON "Głoś&ność....", IDC_VOLUME3_BTN, 85,185,70,15 PUSHBUTTON "In&formacje", IDC_ADV3_BTN, 160,185,70,15 - CHECKBOX "&Uyj wycznie urzdze domylnych", IDC_DEFAULT_DEV_CHECKBOX, 7, 212, 140, 10 + CHECKBOX "&Użyj wyłącznie urządzeń domyślnych", IDC_DEFAULT_DEV_CHECKBOX, 7, 212, 140, 10 END IDD_VOICE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Gos" +CAPTION "Głos" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Te ustawienia reguluj gono i zaawansowan konfiguracj dla odwtarzania i nagrywania gosu za pomoc wybranych urzdze.",-1,8,7,230,40 - GROUPBOX "Odtwarzanie gosu", -1, 7,37,230,60 + LTEXT "Te ustawienia regulują głośność i zaawansowaną konfigurację dla odwtarzania i nagrywania głosu za pomocą wybranych urządzeń.",-1,8,7,230,40 + GROUPBOX "Odtwarzanie głosu", -1, 7,37,230,60 ICON IDI_CPLICON, IDI_CPLICON, 15,50,32,32 - LTEXT "&Urzdzenie domylne:",-1,50,50,80,17 + LTEXT "&Urządzenie domyślne:",-1,50,50,80,17 COMBOBOX IDC_DEVICE_VOICE_LIST, 50, 60, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&Gono....", IDC_VOLUME4_BTN, 85,77,70,15 + PUSHBUTTON "&Głośność....", IDC_VOLUME4_BTN, 85,77,70,15 PUSHBUTTON "&Zaawansowane", IDC_ADV4_BTN, 160,77,70,15 - GROUPBOX "Nagrywanie gosu", -1, 7,105,230,60 + GROUPBOX "Nagrywanie głosu", -1, 7,105,230,60 ICON IDI_MICROPHONE_ICON, IDI_MICROPHONE_ICON, 15,118,32,32 - LTEXT "U&rzdzenie domylne:",-1,50,118,80,17 + LTEXT "U&rządzenie domyślne:",-1,50,118,80,17 COMBOBOX IDC_DEVICE_VOICE_REC_LIST, 50, 128, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "G&ono....", IDC_VOLUME5_BTN, 85,145,70,15 + PUSHBUTTON "Gł&ośność....", IDC_VOLUME5_BTN, 85,145,70,15 PUSHBUTTON "Zaa&wansowane", IDC_ADV5_BTN, 160,145,70,15 - PUSHBUTTON "&Test sprztu", IDC_TEST_HARDWARE, 160,175,70,15 + PUSHBUTTON "&Test sprzętu", IDC_TEST_HARDWARE, 160,175,70,15 END IDD_HARDWARE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Sprzt" +CAPTION "Sprzęt" FONT 8, "MS Shell Dlg" BEGIN @@ -111,7 +113,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBL CAPTION "Zapisz schemat jako..." FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Zapisz biecy schemat dzwikowy jako:", -1, 7, 7, 212, 9 + LTEXT "&Zapisz bieżący schemat dźwiękowy jako:", -1, 7, 7, 212, 9 EDITTEXT 8960, 7, 17, 211, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 93, 36, 60, 14 PUSHBUTTON "Anuluj", IDCANCEL, 157, 36, 60, 14 @@ -119,56 +121,56 @@ END IDD_SPEAKERS DIALOG 0, 0, 257, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Goniki" +CAPTION "Głośniki" FONT 8, "MS Shell Dlg" BEGIN ICON 4379, -1, 7, 8, 20, 20 - LTEXT "Wybierz takie ustawienie gonikw, ktre najbardziej odpowiada rzeczywistemu.", -1, 36, 8, 215, 27 + LTEXT "Wybierz takie ustawienie głośników, które najbardziej odpowiada rzeczywistemu.", -1, 36, 8, 215, 27 CONTROL 110, 5376, "STATIC", SS_BITMAP | SS_CENTERIMAGE, 37, 40, 209, 112, WS_EX_TRANSPARENT - LTEXT "&Ustawienie gonikw:", 8502, 53, 169, 55, 10 + LTEXT "&Ustawienie głośników:", 8502, 53, 169, 55, 10 COMBOBOX 5401, 52, 182, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END IDD_PERFORMANCE1 DIALOG 0, 0, 257, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Wydajno" +CAPTION "Wydajność" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Niniejsze ustawienia maj wpyw na dwik, odtwarzany przez ReactOS. Moesz, dziki nim, zdiagnozowa niektre problemy z dzwikiem.", 8492, 34, 7, 218, 23 + LTEXT "Niniejsze ustawienia mają wpływ na dźwięk, odtwarzany przez ReactOS. Możesz, dzięki nim, zdiagnozować niektóre problemy z dźwiękiem.", 8492, 34, 7, 218, 23 GROUPBOX "Odtwarzanie", 8494, 7, 32, 243, 152 ICON 4379, 8512, 8, 8, 20, 20 - LTEXT "&Przyspieszanie sprztowe:", 8495, 13, 56, 111, 14 + LTEXT "&Przyspieszanie sprzętowe:", 8495, 13, 56, 111, 14 CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 54, 62, 18 - LTEXT "&Jako prbkowania dwiku:", 8496, 13, 123, 103, 14 + LTEXT "&Jakość próbkowania dźwięku:", 8496, 13, 123, 103, 14 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 121, 62, 18 - PUSHBUTTON "&Odtwrz domylne", 5400, 7, 191, 110, 14 + PUSHBUTTON "&Odtwórz domyślne", 5400, 7, 191, 110, 14 LTEXT "Brak", 8497, 128, 56, 21, 10 - LTEXT "Pene", 8498, 214, 56, 21, 9 - LTEXT "Saba", 8499, 128, 123, 21, 10 + LTEXT "Pełne", 8498, 214, 56, 21, 9 + LTEXT "Słaba", 8499, 128, 123, 21, 10 LTEXT "Najlepsza", 8500, 214, 123, 23, 9 - LTEXT "Ustawienia sprztowe urzdzenia nagrywania", 5399, 13, 145, 227, 21 - LTEXT "Ustawienia sprztowe urzdzenia odtwarzania", 5398, 13, 78, 227, 22 + LTEXT "Ustawienia sprzętowe urządzenia nagrywania", 5399, 13, 145, 227, 21 + LTEXT "Ustawienia sprzętowe urządzenia odtwarzania", 5398, 13, 78, 227, 22 END IDD_PERFORMANCE2 DIALOG 0, 0, 257, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Wydajno" +CAPTION "Wydajność" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Niniejsze ustawienia maj wpyw na dwik, odtwarzany przez ReactOS. Moesz, dziki nim, zdiagnozowa niektre problemy z dzwikiem.", 8492, 34, 7, 217, 20 + LTEXT "Niniejsze ustawienia mają wpływ na dźwięk, odtwarzany przez ReactOS. Możesz, dzięki nim, zdiagnozować niektóre problemy z dźwiękiem.", 8492, 34, 7, 217, 20 GROUPBOX "Nagrywanie", 8494, 7, 29, 242, 122 ICON 4380, 8512, 8, 7, 20, 20 - LTEXT "&Przyspieszanie sprztowe:", 8495, 13, 46, 103, 17 + LTEXT "&Przyspieszanie sprzętowe:", 8495, 13, 46, 103, 17 CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 43, 62, 18 - LTEXT "&Jako prbkowania dwiku:", 8496, 13, 103, 103, 17 + LTEXT "&Jakość próbkowania dźwięku:", 8496, 13, 103, 103, 17 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 101, 62, 18 - PUSHBUTTON "&Odtwrz domylne", 5400, 9, 158, 110, 14 + PUSHBUTTON "&Odtwórz domyślne", 5400, 9, 158, 110, 14 LTEXT "Brak", 8497, 125, 46, 24, 10 - LTEXT "Pene", 8498, 217, 46, 19, 9 - LTEXT "Saba", 8499, 125, 103, 24, 10 + LTEXT "Pełne", 8498, 217, 46, 19, 9 + LTEXT "Słaba", 8499, 125, 103, 24, 10 LTEXT "Najlepsza", 8500, 217, 103, 19, 9 - LTEXT "Ustawienia sprztowe urzdzenia nagrywania", 5399, 13, 125, 222, 21 - LTEXT "Ustawienia sprztowe urzdzenia odtwarzania", 5398, 13, 68, 218, 24 + LTEXT "Ustawienia sprzętowe urządzenia nagrywania", 5399, 13, 125, 222, 21 + LTEXT "Ustawienia sprzętowe urządzenia odtwarzania", 5398, 13, 68, 218, 24 END IDD_SETUP1 DIALOG 0, 0, 227, 206 @@ -176,55 +178,55 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Konfiguracja" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Usuga ReactOS Audio", 10243, 7, 5, 213, 192 + GROUPBOX "Usługa ReactOS Audio", 10243, 7, 5, 213, 192 ICON 4393, 10241, 26, 26, 20, 20 - LTEXT "Ten komputer nie moe odtwarza dwiku, poniewa usuga ReactOS Audio nie zostaa wczona.", 10245, 60, 25, 150, 40 - AUTOCHECKBOX "&Wcz ReactOS Audio", 10253, 60, 68, 150, 9 + LTEXT "Ten komputer nie może odtwarzać dźwięku, ponieważ usługa ReactOS Audio nie została włączona.", 10245, 60, 25, 150, 40 + AUTOCHECKBOX "&Włącz ReactOS Audio", 10253, 60, 68, 150, 9 LTEXT "Uwagi", 10246, 58, 87, 150, 11 - LTEXT "1. Musisz mie uprawnienia administratora, by wczy t usug. Jeli nie masz uprawnie, konieczne bdzie przelogowanie si na konto administratora.", 10247, 60, 100, 150, 40 - LTEXT "2. Po wczeniu usugi ReactOS Audio konieczne bdzie zrestartowanie komputera.", 10248, 60, 140, 150, 40 + LTEXT "1. Musisz mieć uprawnienia administratora, by włączyć tę usługę. Jeśli nie masz uprawnień, konieczne będzie przelogowanie się na konto administratora.", 10247, 60, 100, 150, 40 + LTEXT "2. Po włączeniu usługi ReactOS Audio konieczne będzie zrestartowanie komputera.", 10248, 60, 140, 150, 40 END IDD_MULTICHANNEL DIALOG 0, 0, 227, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Dzwik wielokanaowy" +CAPTION "Dźwięk wielokanałowy" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Opis ma by tutaj.", 9506, 8, 4, 212, 24 - LTEXT "Maa", 9473, 65, 31, 14, 8 + LTEXT "Opis ma być tutaj.", 9506, 8, 4, 212, 24 + LTEXT "Mała", 9473, 65, 31, 14, 8 LTEXT "", 9472, 5, 31, 55, 8 CONTROL "Slider1", 9475, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 29, 108, 17 - LTEXT "Dua", 9474, 202, 31, 17, 8 - LTEXT "Maa", 9477, 65, 50, 14, 8 + LTEXT "Duża", 9474, 202, 31, 17, 8 + LTEXT "Mała", 9477, 65, 50, 14, 8 LTEXT "", 9476, 5, 50, 55, 8 CONTROL "Slider1", 9479, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 48, 108, 17 - LTEXT "Dua", 9478, 202, 50, 17, 8 - LTEXT "Maa", 9481, 65, 69, 14, 8 + LTEXT "Duża", 9478, 202, 50, 17, 8 + LTEXT "Mała", 9481, 65, 69, 14, 8 LTEXT "", 9480, 5, 69, 55, 8 CONTROL "Slider1", 9483, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 67, 108, 17 - LTEXT "Dua", 9482, 202, 69, 17, 8 - LTEXT "Maa", 9485, 65, 88, 14, 8 + LTEXT "Duża", 9482, 202, 69, 17, 8 + LTEXT "Mała", 9485, 65, 88, 14, 8 LTEXT "", 9484, 5, 88, 55, 8 CONTROL "Slider1", 9487, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 86, 108, 17 - LTEXT "Dua", 9486, 202, 88, 17, 8 - LTEXT "Maa", 9489, 65, 107, 14, 8 + LTEXT "Duża", 9486, 202, 88, 17, 8 + LTEXT "Mała", 9489, 65, 107, 14, 8 LTEXT "", 9488, 5, 107, 55, 8 CONTROL "Slider1", 9491, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 105, 108, 17 - LTEXT "Dua", 9490, 202, 107, 17, 8 - LTEXT "Maa", 9493, 65, 126, 14, 8 + LTEXT "Duża", 9490, 202, 107, 17, 8 + LTEXT "Mała", 9493, 65, 126, 14, 8 LTEXT "", 9492, 5, 126, 55, 8 CONTROL "Slider1", 9495, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 124, 108, 17 - LTEXT "Dua", 9494, 202, 126, 17, 8 - LTEXT "Maa", 9497, 65, 145, 14, 8 + LTEXT "Duża", 9494, 202, 126, 17, 8 + LTEXT "Mała", 9497, 65, 145, 14, 8 LTEXT "", 9496, 5, 145, 55, 8 CONTROL "Slider1", 9499, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 143, 108, 17 - LTEXT "Dua", 9498, 202, 145, 17, 8 - LTEXT "Maa", 9501, 65, 164, 14, 8 + LTEXT "Duża", 9498, 202, 145, 17, 8 + LTEXT "Mała", 9501, 65, 164, 14, 8 LTEXT "", 9500, 5, 164, 55, 8 CONTROL "Slider1", 9503, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 162, 108, 17 - LTEXT "Dua", 9502, 202, 164, 17, 8 - AUTOCHECKBOX "&Pocz wszystkie suwaki", 9504, 5, 185, 216, 9 - PUSHBUTTON "Odtwrz &domylne", 9505, 110, 199, 110, 14 + LTEXT "Duża", 9502, 202, 164, 17, 8 + AUTOCHECKBOX "&Połącz wszystkie suwaki", 9504, 5, 185, 216, 9 + PUSHBUTTON "Odtwórz &domyślne", 9505, 110, 199, 110, 14 END IDD_SETUP2 DIALOG 0, 0, 227, 206 @@ -232,43 +234,43 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Konfiguracja" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Usuga ReactOS Audio", 10259, 7, 5, 213, 192 + GROUPBOX "Usługa ReactOS Audio", 10259, 7, 5, 213, 192 ICON 4394, 10257, 25, 25, 20, 20 - LTEXT "Usuga ReactOS Audio zostaa pomylnie wczona. Jednake dwik moe nie by poprawnie odtwarzany, dopki nie zrestartujesz systemu. Przed restartem upewnij si, czy wszystkie twoje dokumenty zostay zapisane.", 10261, 60, 25, 150, 50 - LTEXT "Aby zrestartowa ReactOS, nacinij OK.", 10262, 60, 75, 150, 20 - LTEXT "Jeli wciniesz Anuluj, konieczny bdzie pzniejszy restart systemu aby usuga ReactOS Audio zadziaaa prawidowo.", 10263, 60, 100, 150, 40 + LTEXT "Usługa ReactOS Audio została pomyślnie włączona. Jednakże dźwięk może nie być poprawnie odtwarzany, dopóki nie zrestartujesz systemu. Przed restartem upewnij się, czy wszystkie twoje dokumenty zostały zapisane.", 10261, 60, 25, 150, 50 + LTEXT "Aby zrestartować ReactOS, naciśnij OK.", 10262, 60, 75, 150, 20 + LTEXT "Jeśli wciśniesz Anuluj, konieczny będzie pózniejszy restart systemu aby usługa ReactOS Audio zadziałała prawidłowo.", 10263, 60, 100, 150, 40 END STRINGTABLE BEGIN - IDS_CPLNAME "Dwik i urzdzenia audio" - IDS_CPLDESCRIPTION "Zmie schemat dwikowy dla tego komputera lub skonfiguruj ustawienia gonikw i urzdze nagrywajcych." + IDS_CPLNAME "Dźwięk i urządzenia audio" + IDS_CPLDESCRIPTION "Zmień schemat dźwiękowy dla tego komputera lub skonfiguruj ustawienia głośników i urządzeń nagrywających." IDS_NO_SOUND "(Brak)" - IDS_NO_DEVICES "Brak urzdze" + IDS_NO_DEVICES "Brak urządzeń" - 5825 "Bd programu" + 5825 "Błąd programu" 5826 "Zamknij program" 5827 "Krytyczny stan baterii" - 5828 "Urzdzenie podczone" - 5829 "Urzdzenie odczone" - 5830 "Bd podczas podczania urzdzenia" - 5831 "Oprnianie kosza" + 5828 "Urządzenie podłączone" + 5829 "Urządzenie odłączone" + 5830 "Błąd podczas podłączania urządzenia" + 5831 "Opróżnianie kosza" 5832 "Niski stan baterii" - 5833 "Peen ekran" + 5833 "Pełen ekran" 5834 "Polecenie Menu" - 5835 "Wywoanie Menu" + 5835 "Wywołanie Menu" 5836 "Minimalizuj" 5837 "Powiadomienie o nowej poczcie" - 5838 "Rozpoczcie nawigacji" + 5838 "Rozpoczęcie nawigacji" 5839 "Uruchomienie programu" - 5840 "Zakoczenie programu" - 5841 "Przywrcenie w d" - 5842 "Przywrcenie w gr" + 5840 "Zakończenie programu" + 5841 "Przywrócenie w dół" + 5842 "Przywrócenie w górę" 5843 "Gwiazdka" - 5844 "Dwik domylny" + 5844 "Dźwięk domyślny" 5845 "Wykrzyknik" - 5846 "Zamknicie ReactOS" - 5847 "Bd krytyczny" + 5846 "Zamknięcie ReactOS" + 5847 "Błąd krytyczny" 5848 "Powiadomienie systemowe" 5849 "Znak zapytania" 5850 "Uruchomienie ReactOS" diff --git a/dll/cpl/mmsys/lang/ro-RO.rc b/dll/cpl/mmsys/lang/ro-RO.rc index 94631712a12..02df5eb3783 100644 --- a/dll/cpl/mmsys/lang/ro-RO.rc +++ b/dll/cpl/mmsys/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_VOLUME DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Volum" @@ -269,5 +267,3 @@ BEGIN 5853 "Intrare în ReactOS" 5854 "ReactOS Explorer" END - -#pragma code_page(default) diff --git a/dll/cpl/mmsys/lang/ru-RU.rc b/dll/cpl/mmsys/lang/ru-RU.rc index a1c537a5509..5d86b8f1a21 100644 --- a/dll/cpl/mmsys/lang/ru-RU.rc +++ b/dll/cpl/mmsys/lang/ru-RU.rc @@ -2,267 +2,267 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_VOLUME DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Громкость" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLICON, IDI_CPLICON, 8,5,32,32 LTEXT "",IDC_DEVICE_NAME,40,10,194,19 - GROUPBOX " ", -1, 7,30,230,100 + GROUPBOX "Громкость микшера", -1, 7,30,230,100 CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE,17,45,32,32 CONTROL "",IDC_VOLUME_TRACKBAR, "msctls_trackbar32", TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14 - LTEXT "",-1,62,66,30,9 - LTEXT "",-1,195,66,30,9 - CHECKBOX "& ", IDC_MUTE_CHECKBOX, 50, 78, 140, 10 - CHECKBOX " & ", IDC_ICON_IN_TASKBAR, 50, 92, 140, 10 - PUSHBUTTON "&...", IDC_ADVANCED_BTN, 155,110,75,15 - GROUPBOX " ", IDC_SPEAKER_SET_BTN, 7,140,230,80 + LTEXT "ниже",-1,62,66,30,9 + LTEXT "выше",-1,195,66,30,9 + CHECKBOX "В&ыключить звук", IDC_MUTE_CHECKBOX, 50, 78, 140, 10 + CHECKBOX "Отображать &значок на панели задач", IDC_ICON_IN_TASKBAR, 50, 92, 140, 10 + PUSHBUTTON "&Дополнительно...", IDC_ADVANCED_BTN, 155,110,75,15 + GROUPBOX "Настройки динамиков", IDC_SPEAKER_SET_BTN, 7,140,230,80 CONTROL "", IDC_SPEAKIMG, "Static", SS_OWNERDRAW, 4, 160, 70, 70 - LTEXT " .",-1,70,155,150,36 - PUSHBUTTON "&...", IDC_SPEAKER_VOL_BTN, 70,200,80,15 - PUSHBUTTON "&...", IDC_ADVANCED2_BTN, 155,200,75,15 + LTEXT "Расположенные ниже кнопки позволяют выполнить индивидуальную настройку громкости динамиков и других параметров.",-1,70,155,150,36 + PUSHBUTTON "Гром&кость...", IDC_SPEAKER_VOL_BTN, 70,200,80,15 + PUSHBUTTON "Д&ополнительно...", IDC_ADVANCED2_BTN, 155,200,75,15 END IDD_SOUNDS DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Звуки" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , ReactOS . .",-1,8,7,230,30 - LTEXT " &:",-1,8,42,150,9 + LTEXT "Звуковая схема задает звуки, сопровождающие события в операционной системе ReactOS и программах. Можно выбрать одну из существующих схем или создать новую.",-1,8,7,230,30 + LTEXT "Звуковая с&хема:",-1,8,42,150,9 COMBOBOX IDC_SOUND_SCHEME, 8, 53, 230, 46, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON " &...", IDC_SAVEAS_BTN, 119,70,65,15 - PUSHBUTTON "&", IDC_DELETE_BTN, 188,70,50,15 - LTEXT " , . .",-1,8,90,230,28 - LTEXT " &:",-1,8,118,150,9 + PUSHBUTTON "Сохранить &как...", IDC_SAVEAS_BTN, 119,70,65,15 + PUSHBUTTON "&Удалить", IDC_DELETE_BTN, 188,70,50,15 + LTEXT "Чтобы изменить звуковое сопровождение, щелкните на событии в списке и выберите нужный звук. Изменения можно сохранить как новую звуковую схему.",-1,8,90,230,28 + LTEXT "Программные &события:",-1,8,118,150,9 CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130, 230, 60, WS_EX_CLIENTEDGE - LTEXT "&:",IDC_TEXT_SOUND,8,194,80,9, WS_DISABLED + LTEXT "&Звуки:",IDC_TEXT_SOUND,8,194,80,9, WS_DISABLED COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED PUSHBUTTON "", IDC_PLAY_SOUND, 168,205,15,15, WS_DISABLED | BS_ICON - PUSHBUTTON "&...", IDC_BROWSE_SOUND, 188,205,50,15, WS_DISABLED + PUSHBUTTON "&Обзор...", IDC_BROWSE_SOUND, 188,205,50,15, WS_DISABLED END IDD_AUDIO DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Аудио" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 7,7,230,60 + GROUPBOX "Воспроизведение звука", -1, 7,7,230,60 ICON IDI_CPLICON, IDI_CPLICON, 15,20,32,32 - LTEXT "& :",-1,50,20,180,9 + LTEXT "&Используемое по умолчанию устройство:",-1,50,20,180,9 COMBOBOX IDC_DEVICE_PLAY_LIST, 50, 30, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME1_BTN, 85,47,70,15 - PUSHBUTTON "&...", IDC_ADV2_BTN, 160,47,70,15 - GROUPBOX " ", -1, 7,75,230,60 + PUSHBUTTON "&Громкость...", IDC_VOLUME1_BTN, 85,47,70,15 + PUSHBUTTON "&Настройка...", IDC_ADV2_BTN, 160,47,70,15 + GROUPBOX "Запись звука", -1, 7,75,230,60 ICON IDI_MICROPHONE_ICON, IDI_MICROPHONE_ICON, 15,88,32,32 - LTEXT "& :",-1,50,88,180,9 + LTEXT "И&используемое по умолчанию устройство:",-1,50,88,180,9 COMBOBOX IDC_DEVICE_REC_LIST, 50, 98, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME2_BTN, 85,115,70,15 - PUSHBUTTON "&...", IDC_ADV1_BTN, 160,115,70,15 - GROUPBOX " MIDI", -1, 7,145,230,60 + PUSHBUTTON "Гро&мкость...", IDC_VOLUME2_BTN, 85,115,70,15 + PUSHBUTTON "Н&астройка...", IDC_ADV1_BTN, 160,115,70,15 + GROUPBOX "Воспроизведение MIDI", -1, 7,145,230,60 ICON IDI_MIDICON, IDI_MIDICON, 15,158,32,32 - LTEXT "& :",-1,50,158,180,9 + LTEXT "Ис&пользуемое по умолчанию устройство:",-1,50,158,180,9 COMBOBOX IDC_DEVICE_MIDI_LIST, 50, 168, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME3_BTN, 85,185,70,15 - PUSHBUTTON "&...", IDC_ADV3_BTN, 160,185,70,15 - CHECKBOX " & ", IDC_DEFAULT_DEV_CHECKBOX, 7, 212, 180, 10 + PUSHBUTTON "Гром&кость...", IDC_VOLUME3_BTN, 85,185,70,15 + PUSHBUTTON "Св&едения...", IDC_ADV3_BTN, 160,185,70,15 + CHECKBOX "Использовать то&лько устройства по умолчанию", IDC_DEFAULT_DEV_CHECKBOX, 7, 212, 180, 10 END IDD_VOICE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Речь" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .",-1,8,7,230,30 - GROUPBOX " ", -1, 7,37,230,60 + LTEXT "Можно изменить громкость и другие параметры для выбранных вами устройств воспроизведения и записи речи.",-1,8,7,230,30 + GROUPBOX "Воспроизведение речи", -1, 7,37,230,60 ICON IDI_CPLICON, IDI_CPLICON, 15,50,32,32 - LTEXT "& :",-1,50,50,180,9 + LTEXT "&Используемое по умолчанию устройство:",-1,50,50,180,9 COMBOBOX IDC_DEVICE_VOICE_LIST, 50, 60, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME4_BTN, 85,77,70,15 - PUSHBUTTON "&...", IDC_ADV4_BTN, 160,77,70,15 - GROUPBOX " ", -1, 7,105,230,60 + PUSHBUTTON "&Громкость...", IDC_VOLUME4_BTN, 85,77,70,15 + PUSHBUTTON "&Дополнительно...", IDC_ADV4_BTN, 160,77,70,15 + GROUPBOX "Запись речи", -1, 7,105,230,60 ICON IDI_MICROPHONE_ICON, IDI_MICROPHONE_ICON, 15,118,32,32 - LTEXT "& :",-1,50,118,180,9 + LTEXT "И&спользуемое по умолчанию утройство:",-1,50,118,180,9 COMBOBOX IDC_DEVICE_VOICE_REC_LIST, 50, 128, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME5_BTN, 85,145,70,15 - PUSHBUTTON "&...", IDC_ADV5_BTN, 160,145,70,15 - PUSHBUTTON "&...", IDC_TEST_HARDWARE, 160,175,70,15 + PUSHBUTTON "Гро&мкость...", IDC_VOLUME5_BTN, 85,145,70,15 + PUSHBUTTON "Допо&лнительно...", IDC_ADV5_BTN, 160,145,70,15 + PUSHBUTTON "&Проверка...", IDC_TEST_HARDWARE, 160,175,70,15 END IDD_HARDWARE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Оборудование" FONT 8, "MS Shell Dlg" BEGIN END IDD_SAVE_SCHEME_AS DIALOG 9, 23, 225, 54 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Сохранить схему как" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 212, 9 + LTEXT "&Сохранить эту схему как:", -1, 7, 7, 212, 9 EDITTEXT 8960, 7, 17, 211, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 93, 36, 60, 14 - PUSHBUTTON "", IDCANCEL, 157, 36, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 157, 36, 60, 14 END IDD_SPEAKERS DIALOG 0, 0, 257, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Динамики" FONT 8, "MS Shell Dlg" BEGIN ICON 4379, -1, 7, 8, 20, 20 - LTEXT " , .", -1, 36, 8, 215, 27 + LTEXT "Укажите расположение динамиков, наиболее соответствующее реальному для данного компьютера.", -1, 36, 8, 215, 27 CONTROL 110, 5376, "STATIC", SS_BITMAP | SS_CENTERIMAGE, 37, 40, 209, 112, WS_EX_TRANSPARENT - LTEXT "& :", 8502, 53, 169, 100, 10 + LTEXT "&Расположение динамиков:", 8502, 53, 169, 100, 10 COMBOBOX 5401, 52, 182, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END IDD_PERFORMANCE1 DIALOG 0, 0, 257, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Производительность" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 8492, 34, 7, 218, 23 - GROUPBOX " ", 8494, 7, 32, 243, 152 + LTEXT "Эти параметры управляют воспроизведением звука и могут помочь при диагностике неполадок со звуком.", 8492, 34, 7, 218, 23 + GROUPBOX "Воспроизведение звука", 8494, 7, 32, 243, 152 ICON 4379, 8512, 8, 8, 20, 20 - LTEXT "& :", 8495, 13, 56, 111, 14 + LTEXT "&Аппаратное ускорение:", 8495, 13, 56, 111, 14 CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 54, 62, 18 - LTEXT "& :", 8496, 13, 123, 103, 14 + LTEXT "&Частота дискретизации:", 8496, 13, 123, 103, 14 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 121, 62, 18 - PUSHBUTTON "& ", 5400, 7, 191, 110, 14 - LTEXT "", 8497, 128, 56, 21, 10 - LTEXT "", 8498, 214, 56, 30, 9 - LTEXT "", 8499, 128, 123, 21, 10 - LTEXT "", 8500, 214, 123, 23, 9 - LTEXT " ", 5399, 13, 145, 227, 21 - LTEXT " ", 5398, 13, 78, 227, 22 + PUSHBUTTON "&Восстановить умолчания", 5400, 7, 191, 110, 14 + LTEXT "Нет", 8497, 128, 56, 21, 10 + LTEXT "Полное", 8498, 214, 56, 30, 9 + LTEXT "Ниже", 8499, 128, 123, 21, 10 + LTEXT "Выше", 8500, 214, 123, 23, 9 + LTEXT "Этот параметр описывает настройку устройства захвата звука", 5399, 13, 145, 227, 21 + LTEXT "Этот параметр описывает настройку устройства обработки звука", 5398, 13, 78, 227, 22 END IDD_PERFORMANCE2 DIALOG 0, 0, 257, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Производительность" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 8492, 34, 7, 217, 20 - GROUPBOX " ", 8494, 7, 29, 242, 122 + LTEXT "Эти параметры управляют записью звука и могут помочь при диагностике неполадок со звуком.", 8492, 34, 7, 217, 20 + GROUPBOX "Запись звука", 8494, 7, 29, 242, 122 ICON 4380, 8512, 8, 7, 20, 20 - LTEXT "& :", 8495, 13, 46, 103, 9 + LTEXT "&Аппаратное ускорение:", 8495, 13, 46, 103, 9 CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 43, 62, 18 - LTEXT "& :", 8496, 13, 103, 103, 9 + LTEXT "&Частота дискретизации:", 8496, 13, 103, 103, 9 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 101, 62, 18 - PUSHBUTTON "& ", 5400, 9, 158, 110, 14 - LTEXT "", 8497, 125, 46, 24, 10 - LTEXT "", 8498, 217, 46, 30, 9 - LTEXT "", 8499, 125, 103, 24, 10 - LTEXT "", 8500, 217, 103, 19, 9 - LTEXT " ", 5399, 13, 125, 222, 21 - LTEXT " ", 5398, 13, 68, 218, 17 + PUSHBUTTON "&Восстановить умолчания", 5400, 9, 158, 110, 14 + LTEXT "Нет", 8497, 125, 46, 24, 10 + LTEXT "Полное", 8498, 217, 46, 30, 9 + LTEXT "Ниже", 8499, 125, 103, 24, 10 + LTEXT "Выше", 8500, 217, 103, 19, 9 + LTEXT "Этот параметр описывает настройку устройства захвата звука", 5399, 13, 125, 222, 21 + LTEXT "Этот параметр описывает настройку устройства обработки звука", 5398, 13, 68, 218, 17 END IDD_SETUP1 DIALOG 0, 0, 227, 206 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Установка" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ReactOS", 10243, 7, 5, 213, 192 + GROUPBOX "Звук ReactOS", 10243, 7, 5, 213, 192 ICON 4393, 10241, 26, 26, 20, 20 - LTEXT " ReactOS .", 10245, 60, 25, 150, 40 - AUTOCHECKBOX "& ReactOS", 10253, 60, 68, 150, 9 - LTEXT "", 10246, 58, 87, 150, 9 + LTEXT "Этот компьютер не может воспроизводить звук пока служба звука ReactOS не включена.", 10245, 60, 25, 150, 40 + AUTOCHECKBOX "&Включить Звук ReactOS", 10253, 60, 68, 150, 9 + LTEXT "Примечания", 10246, 58, 87, 150, 9 LTEXT "1. You must be an administrator to enable this service. If you are not logged on as administrator, you will be prompted for an administrator name and password.", 10247, 60, 100, 150, 40 - LTEXT "2. , ReactOS, .", 10248, 60, 140, 150, 40 + LTEXT "2. После того, как вы включите Звук ReactOS, вы должны перезагрузить компьютер.", 10248, 60, 140, 150, 40 END IDD_MULTICHANNEL DIALOG 0, 0, 227, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Многоканальный" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ".", 9506, 8, 4, 212, 24 - LTEXT ".", 9473, 65, 31, 14, 8 + LTEXT "Описание.", 9506, 8, 4, 212, 24 + LTEXT "Мин.", 9473, 65, 31, 14, 8 LTEXT "", 9472, 5, 31, 55, 8 CONTROL "Slider1", 9475, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 29, 108, 17 - LTEXT ".", 9474, 202, 31, 17, 8 - LTEXT ".", 9477, 65, 50, 14, 8 + LTEXT "Макс.", 9474, 202, 31, 17, 8 + LTEXT "Мин.", 9477, 65, 50, 14, 8 LTEXT "", 9476, 5, 50, 55, 8 CONTROL "Slider1", 9479, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 48, 108, 17 - LTEXT ".", 9478, 202, 50, 17, 8 - LTEXT ".", 9481, 65, 69, 14, 8 + LTEXT "Макс.", 9478, 202, 50, 17, 8 + LTEXT "Мин.", 9481, 65, 69, 14, 8 LTEXT "", 9480, 5, 69, 55, 8 CONTROL "Slider1", 9483, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 67, 108, 17 - LTEXT ".", 9482, 202, 69, 17, 8 - LTEXT ".", 9485, 65, 88, 14, 8 + LTEXT "Макс.", 9482, 202, 69, 17, 8 + LTEXT "Мин.", 9485, 65, 88, 14, 8 LTEXT "", 9484, 5, 88, 55, 8 CONTROL "Slider1", 9487, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 86, 108, 17 - LTEXT ".", 9486, 202, 88, 17, 8 - LTEXT ".", 9489, 65, 107, 14, 8 + LTEXT "Макс.", 9486, 202, 88, 17, 8 + LTEXT "Мин.", 9489, 65, 107, 14, 8 LTEXT "", 9488, 5, 107, 55, 8 CONTROL "Slider1", 9491, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 105, 108, 17 - LTEXT ".", 9490, 202, 107, 17, 8 - LTEXT ".", 9493, 65, 126, 14, 8 + LTEXT "Макс.", 9490, 202, 107, 17, 8 + LTEXT "Мин.", 9493, 65, 126, 14, 8 LTEXT "", 9492, 5, 126, 55, 8 CONTROL "Slider1", 9495, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 124, 108, 17 - LTEXT ".", 9494, 202, 126, 17, 8 - LTEXT ".", 9497, 65, 145, 14, 8 + LTEXT "Макс.", 9494, 202, 126, 17, 8 + LTEXT "Мин.", 9497, 65, 145, 14, 8 LTEXT "", 9496, 5, 145, 55, 8 CONTROL "Slider1", 9499, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 143, 108, 17 - LTEXT ".", 9498, 202, 145, 17, 8 - LTEXT ".", 9501, 65, 164, 14, 8 + LTEXT "Макс.", 9498, 202, 145, 17, 8 + LTEXT "Мин.", 9501, 65, 164, 14, 8 LTEXT "", 9500, 5, 164, 55, 8 CONTROL "Slider1", 9503, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 162, 108, 17 - LTEXT ".", 9502, 202, 164, 17, 8 - AUTOCHECKBOX "& ", 9504, 5, 185, 216, 9 - PUSHBUTTON "& ", 9505, 110, 199, 110, 14 + LTEXT "Макс.", 9502, 202, 164, 17, 8 + AUTOCHECKBOX "П&ередвигать все регуляторы одновременно", 9504, 5, 185, 216, 9 + PUSHBUTTON "&Востановить умолчания", 9505, 110, 199, 110, 14 END IDD_SETUP2 DIALOG 0, 0, 227, 206 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Установка" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ReactOS", 10259, 7, 5, 213, 192 + GROUPBOX "Звук ReactOS", 10259, 7, 5, 213, 192 ICON 4394, 10257, 25, 25, 20, 20 LTEXT "The ReactOS Audio service is now enabled. However, audio may not function properly until you restart ReactOS. If you want to restart now, first save your work and close all programs.", 10261, 60, 25, 150, 50 - LTEXT " ReactOS ""OK"".", 10262, 60, 75, 150, 20 + LTEXT "Для перезагрузки ReactOS нажмите ""OK"".", 10262, 60, 75, 150, 20 LTEXT "If you Cancel, you will need to restart later for ReactOS Audio to function properly.", 10263, 60, 100, 150, 40 END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " , ." - IDS_NO_SOUND "()" + IDS_CPLNAME "Звук и аудиоустройства" + IDS_CPLDESCRIPTION "Изменение звуковых схем вашего компьютера, настройка колонок и записывающих устройств." + IDS_NO_SOUND "(Нет)" IDS_NO_DEVICES "No Devices" - 5825 " " - 5826 " " - 5827 " " - 5828 " " - 5829 " " - 5830 " " - 5831 " " - 5832 " " - 5833 "" - 5834 " " - 5835 " " - 5836 "" - 5837 " " - 5838 " " - 5839 " " - 5840 " " - 5841 " " - 5842 " " - 5843 "" - 5844 " " - 5845 "" - 5846 " ReactOS" - 5847 " " - 5848 " " - 5849 "" - 5850 " ReactOS" - 5851 " " - 5852 " ReactOS" - 5853 " ReactOS" - 5854 " ReactOS" + 5825 "Ошибка программы" + 5826 "Закрыть программу" + 5827 "Сигнал почти полной разрядки батарей" + 5828 "Подключение устройства" + 5829 "Отключение устройства" + 5830 "Ошибка подключения устройства" + 5831 "Очистка карзины" + 5832 "Сигнал низкого заряда батарей" + 5833 "Развертывание" + 5834 "Команда меню" + 5835 "Раскрытие меню" + 5836 "Свертывание" + 5837 "Уведомление о получении почты" + 5838 "Начать обзор" + 5839 "Открытие программы" + 5840 "Печать завершена" + 5841 "Восстановление окна с полного экрана" + 5842 "Восстановление окна из значка" + 5843 "Звездочка" + 5844 "Стандартный звук" + 5845 "Восклицание" + 5846 "Завершение работы ReactOS" + 5847 "Критическая ошибка" + 5848 "Системное уведомление" + 5849 "Вопрос" + 5850 "Запуск ReactOS" + 5851 "Главное меню" + 5852 "Выход из ReactOS" + 5853 "Вход в ReactOS" + 5854 "Проводник ReactOS" END diff --git a/dll/cpl/mmsys/lang/uk-UA.rc b/dll/cpl/mmsys/lang/uk-UA.rc index d9477c763d5..d5e042e4601 100644 --- a/dll/cpl/mmsys/lang/uk-UA.rc +++ b/dll/cpl/mmsys/lang/uk-UA.rc @@ -10,95 +10,95 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_VOLUME DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Гучність" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_CPLICON, IDI_CPLICON, 8,5,32,32 LTEXT "",IDC_DEVICE_NAME,40,10,194,36 - GROUPBOX " ", -1, 7,30,230,100 + GROUPBOX "Гучність мікшера", -1, 7,30,230,100 CONTROL "", IDC_MUTE_ICON, "Static", SS_ICON | WS_VISIBLE,17,45,32,32 CONTROL "",IDC_VOLUME_TRACKBAR, "msctls_trackbar32", TBS_AUTOTICKS | TBS_ENABLESELRANGE | TBS_BOTTOM | TBS_HORZ | WS_TABSTOP, 65, 45, 140, 14 - LTEXT "",-1,62,66,30,17 - LTEXT "",-1,195,66,30,17 - CHECKBOX "& ", IDC_MUTE_CHECKBOX, 50, 78, 140, 10 - CHECKBOX "& ", IDC_ICON_IN_TASKBAR, 50, 92, 140, 10 - PUSHBUTTON "&...", IDC_ADVANCED_BTN, 150,105,75,15 - GROUPBOX " ", IDC_SPEAKER_SET_BTN, 7,140,230,80 + LTEXT "нижче",-1,62,66,30,17 + LTEXT "вище",-1,195,66,30,17 + CHECKBOX "&Вимкнути звук", IDC_MUTE_CHECKBOX, 50, 78, 140, 10 + CHECKBOX "Пока&зувати значок гучності на панелі завдань", IDC_ICON_IN_TASKBAR, 50, 92, 140, 10 + PUSHBUTTON "&Додатково...", IDC_ADVANCED_BTN, 150,105,75,15 + GROUPBOX "Налаштування динаміків", IDC_SPEAKER_SET_BTN, 7,140,230,80 CONTROL "", IDC_SPEAKIMG, "Static", SS_OWNERDRAW, 4, 160, 70, 70 - LTEXT " .",-1,70,155,150,36 - PUSHBUTTON "& ...", IDC_SPEAKER_VOL_BTN, 70,195,75,15 - PUSHBUTTON "&...", IDC_ADVANCED2_BTN, 150,195,75,15 + LTEXT "За допомогою розташованих нижче кнопок можна виконати індивідуальну настройку гучності динаміків та інших параметрів.",-1,70,155,150,36 + PUSHBUTTON "&Гучність динаміків...", IDC_SPEAKER_VOL_BTN, 70,195,75,15 + PUSHBUTTON "Дод&атково...", IDC_ADVANCED2_BTN, 150,195,75,15 END IDD_SOUNDS DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Звуки" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , 䳿 ReactOS . .",-1,8,7,230,40 - LTEXT " &:",-1,8,42,150,17 + LTEXT "Звукова схема визначає звуки, які супроводжують події в системі ReactOS і у програмах. Можна вибрати одну з наявних схем або створити нову.",-1,8,7,230,40 + LTEXT "Звукова с&хема:",-1,8,42,150,17 COMBOBOX IDC_SOUND_SCHEME, 8, 53, 230, 46, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON " &...", IDC_SAVEAS_BTN, 134,70,50,15 - PUSHBUTTON "&", IDC_DELETE_BTN, 188,70,50,15 - LTEXT " , . .",-1,8,90,230,40 - LTEXT "& 䳿:",-1,8,118,150,17 + PUSHBUTTON "Зберегти &як...", IDC_SAVEAS_BTN, 134,70,50,15 + PUSHBUTTON "В&идалити", IDC_DELETE_BTN, 188,70,50,15 + LTEXT "Щоб змінити звуковий супровід, клацніть подію у списку та виберіть потрібний звук. Зміни можна зберегти як нову звукову схему.",-1,8,90,230,40 + LTEXT "&Програмні події:",-1,8,118,150,17 CONTROL "", IDC_SCHEME_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 8, 130, 230, 60, WS_EX_CLIENTEDGE - LTEXT "&:", IDC_TEXT_SOUND,8,194,80,17, WS_DISABLED + LTEXT "&Звуки:", IDC_TEXT_SOUND,8,194,80,17, WS_DISABLED COMBOBOX IDC_SOUND_LIST, 8, 205, 155, 146, CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED PUSHBUTTON "", IDC_PLAY_SOUND, 168,205,15,15, WS_DISABLED | BS_ICON - PUSHBUTTON "&...", IDC_BROWSE_SOUND, 188,205,50,15, WS_DISABLED + PUSHBUTTON "О&гляд...", IDC_BROWSE_SOUND, 188,205,50,15, WS_DISABLED END IDD_AUDIO DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Аудіо" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "³ ", -1, 7,7,230,60 + GROUPBOX "Відтворення звуку", -1, 7,7,230,60 ICON IDI_CPLICON, IDI_CPLICON, 15,20,32,32 - LTEXT "& :",-1,50,20,140,17 + LTEXT "&Пристрій за замовчуванням:",-1,50,20,140,17 COMBOBOX IDC_DEVICE_PLAY_LIST, 50, 30, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME1_BTN, 85,47,70,15 - PUSHBUTTON "&...", IDC_ADV2_BTN, 160,47,70,15 - GROUPBOX " ", -1, 7,75,230,60 + PUSHBUTTON "&Гучність...", IDC_VOLUME1_BTN, 85,47,70,15 + PUSHBUTTON "&Додатково...", IDC_ADV2_BTN, 160,47,70,15 + GROUPBOX "Запис звуку", -1, 7,75,230,60 ICON IDI_MICROPHONE_ICON, IDI_MICROPHONE_ICON, 15,88,32,32 - LTEXT "& :",-1,50,88,140,17 + LTEXT "Пр&истрій за замовчуванням:",-1,50,88,140,17 COMBOBOX IDC_DEVICE_REC_LIST, 50, 98, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME2_BTN, 85,115,70,15 - PUSHBUTTON "&...", IDC_ADV1_BTN, 160,115,70,15 - GROUPBOX "³ MIDI", -1, 7,145,230,60 + PUSHBUTTON "Гу&чність...", IDC_VOLUME2_BTN, 85,115,70,15 + PUSHBUTTON "Д&одатково...", IDC_ADV1_BTN, 160,115,70,15 + GROUPBOX "Відтворення MIDI", -1, 7,145,230,60 ICON IDI_MIDICON, IDI_MIDICON, 15,158,32,32 - LTEXT "& :",-1,50,158,140,17 + LTEXT "При&стрій за замовчуванням:",-1,50,158,140,17 COMBOBOX IDC_DEVICE_MIDI_LIST, 50, 168, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME3_BTN, 85,185,70,15 - PUSHBUTTON "&³...", IDC_ADV3_BTN, 160,185,70,15 - CHECKBOX "& ", IDC_DEFAULT_DEV_CHECKBOX, 7, 212, 140, 10 + PUSHBUTTON "Гучніст&ь...", IDC_VOLUME3_BTN, 85,185,70,15 + PUSHBUTTON "&Відомості...", IDC_ADV3_BTN, 160,185,70,15 + CHECKBOX "&Лише пристрої за замовчуванням", IDC_DEFAULT_DEV_CHECKBOX, 7, 212, 140, 10 END IDD_VOICE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Мовлення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ֳ .",-1,8,7,230,40 - GROUPBOX "³ ", -1, 7,37,230,60 + LTEXT "Ці параметри керують гучністю та додатковою настройкою вибраних пристроїв відтворення або запису мовлення.",-1,8,7,230,40 + GROUPBOX "Відтворення мовлення", -1, 7,37,230,60 ICON IDI_CPLICON, IDI_CPLICON, 15,50,32,32 - LTEXT " & :",-1,50,50,140,17 + LTEXT "Пристрій &за замовчуванням:",-1,50,50,140,17 COMBOBOX IDC_DEVICE_VOICE_LIST, 50, 60, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME4_BTN, 85,77,70,15 - PUSHBUTTON "&...", IDC_ADV4_BTN, 160,77,70,15 - GROUPBOX " ", -1, 7,105,230,60 + PUSHBUTTON "&Гучність...", IDC_VOLUME4_BTN, 85,77,70,15 + PUSHBUTTON "&Додатково...", IDC_ADV4_BTN, 160,77,70,15 + GROUPBOX "Запис мовлення", -1, 7,105,230,60 ICON IDI_MICROPHONE_ICON, IDI_MICROPHONE_ICON, 15,118,32,32 - LTEXT "& :",-1,50,118,140,17 + LTEXT "Пр&истрій за замовчуванням:",-1,50,118,140,17 COMBOBOX IDC_DEVICE_VOICE_REC_LIST, 50, 128, 180, 46, CBS_DROPDOWNLIST - PUSHBUTTON "&...", IDC_VOLUME5_BTN, 85,145,70,15 - PUSHBUTTON "&...", IDC_ADV5_BTN, 160,145,70,15 - PUSHBUTTON "&...", IDC_TEST_HARDWARE, 160,175,70,15 + PUSHBUTTON "Гу&чність...", IDC_VOLUME5_BTN, 85,145,70,15 + PUSHBUTTON "Дод&атково...", IDC_ADV5_BTN, 160,145,70,15 + PUSHBUTTON "&Перевірка...", IDC_TEST_HARDWARE, 160,175,70,15 END IDD_HARDWARE DIALOGEX 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Обладнання" FONT 8, "MS Shell Dlg" BEGIN @@ -106,172 +106,172 @@ END IDD_SAVE_SCHEME_AS DIALOG 9, 23, 225, 54 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Збереження схеми" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 212, 9 + LTEXT "&Назва схеми:", -1, 7, 7, 212, 9 EDITTEXT 8960, 7, 17, 211, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 93, 36, 60, 14 - PUSHBUTTON "", IDCANCEL, 157, 36, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 157, 36, 60, 14 END IDD_SPEAKERS DIALOG 0, 0, 257, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Динаміки" FONT 8, "MS Shell Dlg" BEGIN ICON 4379, -1, 7, 8, 20, 20 - LTEXT " , '.", -1, 36, 8, 215, 27 + LTEXT "Виберіть схему розташування динаміків, яка найбільш відповідає реальному розташуванню динаміків вашого комп'ютера.", -1, 36, 8, 215, 27 CONTROL 110, 5376, "STATIC", SS_BITMAP | SS_CENTERIMAGE, 37, 40, 209, 112, WS_EX_TRANSPARENT - LTEXT "& :", 8502, 53, 169, 55, 10 + LTEXT "&Розташування динаміків:", 8502, 53, 169, 55, 10 COMBOBOX 5401, 52, 182, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END IDD_PERFORMANCE1 DIALOG 0, 0, 257, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Якість відтворення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ֳ . .", 8492, 34, 7, 218, 23 - GROUPBOX "³ ", 8494, 7, 32, 243, 152 + LTEXT "Ці параметри керують відтворенням звуку. За їх допомогою можна виправляти неполадки зі звуком.", 8492, 34, 7, 218, 23 + GROUPBOX "Відтворення звуку", 8494, 7, 32, 243, 152 ICON 4379, 8512, 8, 8, 20, 20 - LTEXT "& :", 8495, 13, 56, 111, 14 + LTEXT "&Апаратне прискорення:", 8495, 13, 56, 111, 14 CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 54, 62, 18 - LTEXT "& :", 8496, 13, 123, 103, 14 + LTEXT "&Частота дискретизації:", 8496, 13, 123, 103, 14 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 121, 62, 18 - PUSHBUTTON "&³", 5400, 7, 191, 110, 14 - LTEXT "", 8497, 128, 56, 21, 10 - LTEXT "", 8498, 214, 56, 21, 9 - LTEXT "", 8499, 128, 123, 21, 10 - LTEXT "", 8500, 214, 123, 23, 9 - LTEXT " ", 5399, 13, 145, 227, 21 - LTEXT " ", 5398, 13, 78, 227, 22 + PUSHBUTTON "&Відновити", 5400, 7, 191, 110, 14 + LTEXT "Немає", 8497, 128, 56, 21, 10 + LTEXT "Повне", 8498, 214, 56, 21, 9 + LTEXT "Нижче", 8499, 128, 123, 21, 10 + LTEXT "Вище", 8500, 214, 123, 23, 9 + LTEXT "Цей параметр описує настройку пристрою звукозапису", 5399, 13, 145, 227, 21 + LTEXT "Цей параметр описує настройку пристрою обробки звуку", 5398, 13, 78, 227, 22 END IDD_PERFORMANCE2 DIALOG 0, 0, 257, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Якість запису" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ֳ . .", 8492, 34, 7, 217, 20 - GROUPBOX " ", 8494, 7, 29, 242, 122 + LTEXT "Ці параметри керують записом звуку. За їх допомогою можна виправляти неполадки зі звуком.", 8492, 34, 7, 217, 20 + GROUPBOX "Запис звуку", 8494, 7, 29, 242, 122 ICON 4380, 8512, 8, 7, 20, 20 - LTEXT "& :", 8495, 13, 46, 103, 17 + LTEXT "&Апаратне прискорення:", 8495, 13, 46, 103, 17 CONTROL "Slider1", 5395, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000401, 150, 43, 62, 18 - LTEXT "& :", 8496, 13, 103, 103, 17 + LTEXT "&Частота дискретизації:", 8496, 13, 103, 103, 17 CONTROL "Slider1", 5396, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 150, 101, 62, 18 - PUSHBUTTON "&³", 5400, 9, 158, 110, 14 - LTEXT "", 8497, 125, 46, 24, 10 - LTEXT "", 8498, 217, 46, 19, 9 - LTEXT "", 8499, 125, 103, 24, 10 - LTEXT "", 8500, 217, 103, 19, 9 - LTEXT " ", 5399, 13, 125, 222, 21 - LTEXT " ", 5398, 13, 68, 218, 24 + PUSHBUTTON "&Відновити", 5400, 9, 158, 110, 14 + LTEXT "Немає", 8497, 125, 46, 24, 10 + LTEXT "Повне", 8498, 217, 46, 19, 9 + LTEXT "Нижче", 8499, 125, 103, 24, 10 + LTEXT "Вище", 8500, 217, 103, 19, 9 + LTEXT "Цей параметр описує настройку пристрою звукозапису", 5399, 13, 125, 222, 21 + LTEXT "Цей параметр описує настройку пристрою обробки звуку", 5398, 13, 68, 218, 24 END IDD_SETUP1 DIALOG 0, 0, 227, 206 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Установка" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ReactOS ", 10243, 7, 5, 213, 192 + GROUPBOX "Служба ReactOS аудіо", 10243, 7, 5, 213, 192 ICON 4393, 10241, 26, 26, 20, 20 - LTEXT " ' , ReactOS .", 10245, 60, 25, 150, 40 - AUTOCHECKBOX "& ReactOS ", 10253, 60, 68, 150, 9 - LTEXT "", 10246, 58, 87, 150, 11 - LTEXT "1. ҳ . , .", 10247, 60, 100, 150, 40 - LTEXT "2. ϳ ReactOS '.", 10248, 60, 140, 150, 40 + LTEXT "Цей комп'ютер не може відтворювати звукові дані, оскільки служба ReactOS аудіо не включена.", 10245, 60, 25, 150, 40 + AUTOCHECKBOX "&Включити службу ReactOS аудіо", 10253, 60, 68, 150, 9 + LTEXT "Примітки", 10246, 58, 87, 150, 11 + LTEXT "1. Тільки адміністратор може включити цю службу. Якщо ви не виконали вхід в систему як адміністратор, ви отримаєте запит на введення імені і пароля адміністратора.", 10247, 60, 100, 150, 40 + LTEXT "2. Після включення служби ReactOS аудіо треба буде перезавантажити комп'ютер.", 10248, 60, 140, 150, 40 END IDD_MULTICHANNEL DIALOG 0, 0, 227, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Багатоканальний" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ".", 9506, 8, 4, 212, 24 - LTEXT "̳.", 9473, 65, 31, 14, 8 + LTEXT "Опис.", 9506, 8, 4, 212, 24 + LTEXT "Мін.", 9473, 65, 31, 14, 8 LTEXT "", 9472, 5, 31, 55, 8 CONTROL "Slider1", 9475, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 29, 108, 17 - LTEXT ".", 9474, 202, 31, 17, 8 - LTEXT "̳.", 9477, 65, 50, 14, 8 + LTEXT "Макс.", 9474, 202, 31, 17, 8 + LTEXT "Мін.", 9477, 65, 50, 14, 8 LTEXT "", 9476, 5, 50, 55, 8 CONTROL "Slider1", 9479, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 48, 108, 17 - LTEXT ".", 9478, 202, 50, 17, 8 - LTEXT "̳.", 9481, 65, 69, 14, 8 + LTEXT "Макс.", 9478, 202, 50, 17, 8 + LTEXT "Мін.", 9481, 65, 69, 14, 8 LTEXT "", 9480, 5, 69, 55, 8 CONTROL "Slider1", 9483, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 67, 108, 17 - LTEXT ".", 9482, 202, 69, 17, 8 - LTEXT "̳.", 9485, 65, 88, 14, 8 + LTEXT "Макс.", 9482, 202, 69, 17, 8 + LTEXT "Мін.", 9485, 65, 88, 14, 8 LTEXT "", 9484, 5, 88, 55, 8 CONTROL "Slider1", 9487, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 86, 108, 17 - LTEXT ".", 9486, 202, 88, 17, 8 - LTEXT "̳.", 9489, 65, 107, 14, 8 + LTEXT "Макс.", 9486, 202, 88, 17, 8 + LTEXT "Мін.", 9489, 65, 107, 14, 8 LTEXT "", 9488, 5, 107, 55, 8 CONTROL "Slider1", 9491, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 105, 108, 17 - LTEXT ".", 9490, 202, 107, 17, 8 - LTEXT "̳.", 9493, 65, 126, 14, 8 + LTEXT "Макс.", 9490, 202, 107, 17, 8 + LTEXT "Мін.", 9493, 65, 126, 14, 8 LTEXT "", 9492, 5, 126, 55, 8 CONTROL "Slider1", 9495, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 124, 108, 17 - LTEXT ".", 9494, 202, 126, 17, 8 - LTEXT "̳.", 9497, 65, 145, 14, 8 + LTEXT "Макс.", 9494, 202, 126, 17, 8 + LTEXT "Мін.", 9497, 65, 145, 14, 8 LTEXT "", 9496, 5, 145, 55, 8 CONTROL "Slider1", 9499, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 143, 108, 17 - LTEXT ".", 9498, 202, 145, 17, 8 - LTEXT "̳.", 9501, 65, 164, 14, 8 + LTEXT "Макс.", 9498, 202, 145, 17, 8 + LTEXT "Мін.", 9501, 65, 164, 14, 8 LTEXT "", 9500, 5, 164, 55, 8 CONTROL "Slider1", 9503, "MSCTLS_TRACKBAR32", WS_TABSTOP | 0x00000401, 87, 162, 108, 17 - LTEXT ".", 9502, 202, 164, 17, 8 - AUTOCHECKBOX "& ", 9504, 5, 185, 216, 9 - PUSHBUTTON "&³", 9505, 110, 199, 110, 14 + LTEXT "Макс.", 9502, 202, 164, 17, 8 + AUTOCHECKBOX "П&ереміщати всі повзунки одночасно", 9504, 5, 185, 216, 9 + PUSHBUTTON "&Відновити", 9505, 110, 199, 110, 14 END IDD_SETUP2 DIALOG 0, 0, 227, 206 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Установка" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ReactOS ", 10259, 7, 5, 213, 192 + GROUPBOX "Служба ReactOS аудіо", 10259, 7, 5, 213, 192 ICON 4394, 10257, 25, 25, 20, 20 - LTEXT " ReactOS . ReactOS. .", 10261, 60, 25, 150, 50 - LTEXT " ReactOS, ""OK"".", 10262, 60, 75, 150, 20 - LTEXT " """", ReactOS ' .", 10263, 60, 100, 150, 40 + LTEXT "Служба ReactOS аудіо тепер включена. Проте для правильного відтворення звукових даних слід перезавантажити ReactOS. Перед перезавантаженням потрібно зберегти всі дані і завершити роботу всіх програм.", 10261, 60, 25, 150, 50 + LTEXT "Щоб перезавантажити ReactOS, натисніть кнопку ""OK"".", 10262, 60, 75, 150, 20 + LTEXT "Якщо натиснути кнопку ""Скасувати"", то для правильної роботи служби ReactOS аудіо потрібно буде перезавантажити комп'ютер пізніше.", 10263, 60, 100, 150, 40 END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " ', ." - IDS_NO_SOUND "()" + IDS_CPLNAME "Звукові і аудіо пристрої" + IDS_CPLDESCRIPTION "Зміна звукових схем вашого комп'ютера, настроювання колонок і записуючих пристроїв." + IDS_NO_SOUND "(немає)" IDS_NO_DEVICES "No Devices" - 5825 " " - 5826 " " - 5827 " " - 5828 "ϳ " - 5829 "³ " - 5830 " " - 5831 " " - 5832 " " - 5833 "" - 5834 " " - 5835 " " - 5836 "" - 5837 " " - 5838 " " - 5839 "³ " - 5840 " " - 5841 "³ " - 5842 "³ " - 5843 "dz" - 5844 " " - 5845 "" - 5846 " ReactOS" - 5847 " " - 5848 " " - 5849 "" - 5850 " ReactOS" - 5851 " " - 5852 " ReactOS" - 5853 " ReactOS" + 5825 "Помилка програми" + 5826 "Закрити програму" + 5827 "Сигнал критичної розрядки батарей" + 5828 "Підключення пристрою" + 5829 "Відключення пристрою" + 5830 "Помилка підключення пристрою" + 5831 "Очищення кошика" + 5832 "Сигнал значної розрядки батарей" + 5833 "Розгортання" + 5834 "Команда меню" + 5835 "Розгортання меню" + 5836 "Згортання" + 5837 "Сповіщення про отримання пошти" + 5838 "Почати огляд" + 5839 "Відкриття програми" + 5840 "Друк завершено" + 5841 "Відновлення після розгортання" + 5842 "Відновлення після згортання" + 5843 "Зірочка" + 5844 "Стандартний звук" + 5845 "Вигук" + 5846 "Завершення роботи ReactOS" + 5847 "Критична помилка" + 5848 "Системне сповіщення" + 5849 "Запитання" + 5850 "Запуск ReactOS" + 5851 "Головне меню" + 5852 "Вихід із ReactOS" + 5853 "Вхід до ReactOS" 5854 "ReactOS Explorer" END diff --git a/dll/cpl/mmsys/rsrc.rc b/dll/cpl/mmsys/rsrc.rc index 51954a3a650..28849c5890b 100644 --- a/dll/cpl/mmsys/rsrc.rc +++ b/dll/cpl/mmsys/rsrc.rc @@ -12,10 +12,13 @@ #include "lang/it-IT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" +#include "lang/sk-SK.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/powercfg/lang/pl-PL.rc b/dll/cpl/powercfg/lang/pl-PL.rc index f6faf4d7ff2..42081492382 100644 --- a/dll/cpl/powercfg/lang/pl-PL.rc +++ b/dll/cpl/powercfg/lang/pl-PL.rc @@ -1,9 +1,11 @@ -/** - * translated by aart3k - * aart3k@gmail.com - * https://sourceforge.net/projects/reactospl - * updated by Caemyr - Olaf Siejka (Jan, 2008) +/* + * translated by aart3k + * aart3k@gmail.com + * https://sourceforge.net/projects/reactospl + * updated by Caemyr - Olaf Siejka (Jan, 2008) + * UTF-8 conversion by Caemyr (May, 2011) */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_PROPPAGEPOWERSHEMES DIALOGEX 0, 0, 250, 220 @@ -12,22 +14,22 @@ CAPTION "Schematy zasilania" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ACDC, IDI_ACDC, 7,7,28,22 - LTEXT "Wybierz schemat zasilana najbardziej pasujcy do Twojego komputera. Miej na uwadze, e zmiany poniej spowoduj modyfikacj wybranego schematu.", + LTEXT "Wybierz schemat zasilana najbardziej pasujący do Twojego komputera. Miej na uwadze, że zmiany poniżej spowodują modyfikację wybranego schematu.", -1,45,13,194,36 GROUPBOX "&Schematy zasilania", -1, 7,57,240,46 COMBOBOX IDC_ENERGYLIST, 14,70,224,92, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Zapisz jako...", IDC_SAVEAS_BTN, 100,85,75,15,WS_DISABLED - PUSHBUTTON "&Usu", IDC_DELETE_BTN, 180,85,55,15,WS_DISABLED + PUSHBUTTON "&Usuń", IDC_DELETE_BTN, 180,85,55,15,WS_DISABLED GROUPBOX "Nieznany", IDC_GRPDETAIL, 7,108,240,105 LTEXT "Kiedy komputer jest:",IDC_SAT,15,120,60,10 - LTEXT "Podczony",IDC_SAC,100,120,45,15 + LTEXT "Podłączony",IDC_SAC,100,120,45,15 ICON IDI_AC, IDC_IAC, 75,115,25,15 LTEXT "Zasilany akumulatorem",IDC_SDC,197,120,45,15 ICON IDI_DC, IDC_IDC, 165,115,25,15 - LTEXT "Wycz &monitor:",IDC_MONITOR,15,145,80,10 + LTEXT "Wyłącz &monitor:",IDC_MONITOR,15,145,80,10 COMBOBOX IDC_MONITORACLIST, 100,140,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_MONITORDCLIST, 175,140,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Wycz &dysk twardy:",IDC_DISK,15,160,80,10 + LTEXT "Wyłącz &dysk twardy:",IDC_DISK,15,160,80,10 COMBOBOX IDC_DISKACLIST, 100,155,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_DISKDCLIST, 175,155,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "System w stan &czuwania:",IDC_STANDBY,15,180,80,10 @@ -40,37 +42,37 @@ END IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ostrzeenia" +CAPTION "Ostrzeżenia" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Saba bateria",-1,10,15,235,95 - CONTROL "Aktywuj ostrzeenie, kiedy &poziom mocy siga:",IDC_ALARM1, + GROUPBOX "Słaba bateria",-1,10,15,235,95 + CONTROL "Aktywuj ostrzeżenie, kiedy &poziom mocy sięga:",IDC_ALARM1, "Przycisk",BS_AUTOCHECKBOX | WS_TABSTOP,15,25,180,15 LTEXT "nieznany",IDC_ALARMVALUE1,200,25,40,10 LTEXT "0%",-1,20,40,15,15 CONTROL "Slider1",IDC_ALARMBAR1,"msctls_trackbar32",TBS_HORZ | TBS_AUTOTICKS | WS_TABSTOP,30,40,170,15 LTEXT "100%",-1,215,40,25,10 - PUSHBUTTON "Dziaanie &alarmu...",-1,20,70,70,15,WS_DISABLED + PUSHBUTTON "Działanie &alarmu...",-1,20,70,70,15,WS_DISABLED LTEXT "Powiadomienie:",-1,95,70,50,10 LTEXT "Nieznane",IDC_ALARMMSG1,145,70,95,10 - LTEXT "Dziaanie:",-1,95,80,45,10 + LTEXT "Działanie:",-1,95,80,45,10 LTEXT "Nieznane",IDC_ALARMAKTION1,145,80,95,10 LTEXT "Uruchom program:",-1,95,90,50,10 LTEXT "Nieznany",IDC_ALARMPROG1,150,90,40,10 - GROUPBOX "Krytycznie saba bateria",-1,10,115,235,95 - CONTROL "Aktywuj ostrzeenie, kiedy &poziom mocy siga:",IDC_ALARM2, + GROUPBOX "Krytycznie słaba bateria",-1,10,115,235,95 + CONTROL "Aktywuj ostrzeżenie, kiedy &poziom mocy sięga:",IDC_ALARM2, "Przycisk",BS_AUTOCHECKBOX | WS_TABSTOP,15,125,180,15 LTEXT "nieznany",IDC_ALARMVALUE2,200,125,40,10 LTEXT "0%",-1,20,140,15,15 CONTROL "Slider1",IDC_ALARMBAR2,"msctls_trackbar32",TBS_HORZ | TBS_AUTOTICKS | WS_TABSTOP,30,140,170,15 LTEXT "100%",-1,215,140,25,10 - PUSHBUTTON "Dziaanie &alarmu...",-1,20,170,70,15,WS_DISABLED + PUSHBUTTON "Działanie &alarmu...",-1,20,170,70,15,WS_DISABLED LTEXT "Powiadomienie:",-1,95,170,50,10 LTEXT "Nieznane",IDC_ALARMMSG2,145,170,95,10 - LTEXT "Dziaanie:",-1,95,180,45,10 + LTEXT "Działanie:",-1,95,180,45,10 LTEXT "Nieznane",IDC_ALARMAKTION2,145,180,95,10 LTEXT "Uruchom program:",-1,95,190,50,10 LTEXT "Nieznany",IDC_ALARMPROG2,150,190,40,10 @@ -82,22 +84,22 @@ CAPTION "Zaawansowane" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ACDC,IDI_ACDC,5,5,20,20 - LTEXT "Wybierz, ktrych ustawie oszczdzania energii chcesz uywa.",-1,30,5,205,20 + LTEXT "Wybierz, których ustawień oszczędzania energii chcesz używać.",-1,30,5,205,20 GROUPBOX "Opcje",-1,5,35,225,55 - CONTROL "&Zawsze pokazuj ikon w zasobniku systemowym",IDC_SYSTRAYBATTERYMETER,"Button",BS_AUTOCHECKBOX | + CONTROL "&Zawsze pokazuj ikonę w zasobniku systemowym",IDC_SYSTRAYBATTERYMETER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,45,200,10 - CONTROL "Zapytaj o &haso kiedy komputer powraca ze stanu czuwania",IDC_PASSWORDLOGON,"Button",BS_AUTOCHECKBOX | + CONTROL "Zapytaj o &hasło kiedy komputer powraca ze stanu czuwania",IDC_PASSWORDLOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,55,200,10 CONTROL "&Przyciemniaj ekran, kiedy zasilanie z akumulatora",IDC_VIDEODIMDISPLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,65,200,10 GROUPBOX "Przyciski zasilania",-1,5,100,230,105 - LTEXT "&Kiedy zamykam mj komputer przenony:", IDC_SLIDCLOSE,10,110,210,10 + LTEXT "&Kiedy zamykam mój komputer przenośny:", IDC_SLIDCLOSE,10,110,210,10 COMBOBOX IDC_LIDCLOSE,10,120,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "K&iedy naciskam wycznik mojego komputera:", IDC_SPOWERBUTTON,10,135,210,10 + LTEXT "K&iedy naciskam przycisk zasilania mojego komputera:", IDC_SPOWERBUTTON,10,135,210,10 COMBOBOX IDC_POWERBUTTON,10,150,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Ki&edy naciskam przycisk upienia:", IDC_SSLEEPBUTTON,10,165,210,10 + LTEXT "Ki&edy naciskam przycisk uśpienia:", IDC_SSLEEPBUTTON,10,165,210,10 COMBOBOX IDC_SLEEPBUTTON,10,180,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP END @@ -108,43 +110,43 @@ CAPTION "Hibernacja" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SCREEN,IDI_SCREEN,5,5,20,20 - LTEXT "Kiedy Twj komputer przechodzi w stan hibernacji caa zawarto pamici jest zrzucana na dysk twardy i komputer jest wyczany. Kiedy komputer budzi si z hibernacji, powraca on do poprzedniego stanu. ", + LTEXT "Kiedy Twój komputer przechodzi w stan hibernacji cała zawartość pamięci jest zrzucana na dysk twardy i komputer jest wyłączany. Kiedy komputer budzi się z hibernacji, powraca on do poprzedniego stanu. ", -1,35,5,195,35 GROUPBOX "Hibernacja",-1,5,45,235,25 - CONTROL "Wcz &hibernacj",IDC_HIBERNATEFILE,"Button",BS_AUTOCHECKBOX | + CONTROL "Włącz &hibernację",IDC_HIBERNATEFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,55,210,10 - GROUPBOX "Przestrze dyskowa dla hibernacji",-1,5,80,240,60 - LTEXT "Wolna przestrze dyskowa:",-1,10,90,100,10 + GROUPBOX "Przestrzeń dyskowa dla hibernacji",-1,5,80,240,60 + LTEXT "Wolna przestrzeń dyskowa:",-1,10,90,100,10 LTEXT "Nieznana",IDC_FREESPACE,120,90,70,10 - LTEXT "Przestrze wymagana do hibernacji:",-1,10,100,115,10 + LTEXT "Przestrzeń wymagana do hibernacji:",-1,10,100,115,10 LTEXT "Nieznana",IDC_SPACEFORHIBERNATEFILE,120,100,55,10 - LTEXT "Musisz zwolni nieco miejsca na dysku przed przejciem w stan hibernacji. ",IDC_TOLESSFREESPACE,10,115,220,20 + LTEXT "Musisz zwolnić więcej miejsca na dysku przed przejściem w stan hibernacji. ",IDC_TOLESSFREESPACE,10,115,220,20 END STRINGTABLE BEGIN IDS_CPLNAME_1 "Opcje zasilania" - IDS_CPLDESCRIPTION_1 "Konfiguracja ustawie oszczdzania energii dla Twojego komputera." + IDS_CPLDESCRIPTION_1 "Konfiguracja ustawień oszczędzania energii dla Twojego komputera." IDS_PROCENT "%i%%" - IDS_SOUND "Dwik" + IDS_SOUND "Dźwięk" IDS_TEXT "Tekst" IDS_CONFIG1 "Ustawienia dla schematu %1" IDS_CONFIG2 "Zaawansowane ustawienia dla %1" - IDS_SIZEBYTS "%i bajtw" + IDS_SIZEBYTS "%i bajtów" IDS_SIZEMB "%i MB" - IDS_NOACTION "Nie rb nic" + IDS_NOACTION "Nie rób nic" IDS_PowerActionNone1 "Brak akcji" IDS_PowerActionUnknown "Nieznana" - IDS_PowerActionSleep "Przejd w stan czuwania" + IDS_PowerActionSleep "Przejdź w stan czuwania" IDS_PowerActionHibernate "Hibernuj" IDS_PowerActionShutdown "Zamknij" IDS_PowerActionRestart "Uruchom ponownie" - IDS_PowerActionShutdownOff "Zamknij i wycz" - IDS_PowerActionWarmEject "Zapytaj co zrobi" - IDS_PowerActionNone2 "Nic nie rb" + IDS_PowerActionShutdownOff "Zamknij i wyłącz" + IDS_PowerActionWarmEject "Zapytaj co zrobić" + IDS_PowerActionNone2 "Nic nie rób" IDS_TIMEOUT1 "Po 1 minucie" IDS_TIMEOUT2 "Po 2 minutach" @@ -163,9 +165,6 @@ BEGIN IDS_TIMEOUT15 "Po 5 godzinach" IDS_TIMEOUT16 "Nigdy" - IDS_DEL_SCHEME "Czy na pewno chcesz skasowa schemat oszczdzania energii?" + IDS_DEL_SCHEME "Czy na pewno chcesz skasować schemat oszczędzania energii?" IDS_DEL_SCHEME_TITLE "Skasuj schemat" END - - - diff --git a/dll/cpl/powercfg/lang/ro-RO.rc b/dll/cpl/powercfg/lang/ro-RO.rc index 26be69be6e4..c05aafaf235 100644 --- a/dll/cpl/powercfg/lang/ro-RO.rc +++ b/dll/cpl/powercfg/lang/ro-RO.rc @@ -2,8 +2,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_PROPPAGEPOWERSHEMES DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Scheme de alimentare" @@ -164,5 +162,3 @@ BEGIN IDS_DEL_SCHEME "Sunteți sigur că vreți să eliminați această schemă?" IDS_DEL_SCHEME_TITLE "Eliminare schemă" END - -#pragma code_page(default) diff --git a/dll/cpl/powercfg/lang/ru-RU.rc b/dll/cpl/powercfg/lang/ru-RU.rc index 907ffec174d..3cb3f9b5f5e 100644 --- a/dll/cpl/powercfg/lang/ru-RU.rc +++ b/dll/cpl/powercfg/lang/ru-RU.rc @@ -4,160 +4,160 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGEPOWERSHEMES DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Схемы управления питанием" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ACDC, IDI_ACDC, 5,5,32,32 - LTEXT " . .", + LTEXT "Выберите схему управления электропитанием с наиболее подходящими параметрами для этого компьютера. Изменение нижеследующих параметров изменит выбранную схему.", -1,37,5,194,36 - GROUPBOX "& ", -1, 7,57,240,46 + GROUPBOX "&Схемы управления питанием", -1, 7,57,240,46 COMBOBOX IDC_ENERGYLIST, 14,70,224,92, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON " &...", IDC_SAVEAS_BTN, 103,85,75,15,WS_DISABLED - PUSHBUTTON "&", IDC_DELETE_BTN, 183,85,55,15,WS_DISABLED - GROUPBOX " ", IDC_GRPDETAIL, 7,108,240,105 - LTEXT " :",IDC_SAT,15,120,60,10 - LTEXT " ",IDC_SAC,113,120,45,15 + PUSHBUTTON "Сохранить &как...", IDC_SAVEAS_BTN, 103,85,75,15,WS_DISABLED + PUSHBUTTON "&Удалить", IDC_DELETE_BTN, 183,85,55,15,WS_DISABLED + GROUPBOX "Нет данных", IDC_GRPDETAIL, 7,108,240,105 + LTEXT "При питании:",IDC_SAT,15,120,60,10 + LTEXT "от сети",IDC_SAC,113,120,45,15 ICON IDI_AC, IDC_IAC, 85,115,25,15 - LTEXT " ",IDC_SDC,190,120,45,15 + LTEXT "от батарей",IDC_SDC,190,120,45,15 ICON IDI_DC, IDC_IDC, 165,115,25,15 - LTEXT " &:",IDC_MONITOR,15,142,80,10 + LTEXT "Отключить &монитор:",IDC_MONITOR,15,142,80,10 COMBOBOX IDC_MONITORACLIST, 100,140,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_MONITORDCLIST, 175,140,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT " &:",IDC_DISK,15,157,80,10 + LTEXT "Отключить &диски:",IDC_DISK,15,157,80,10 COMBOBOX IDC_DISKACLIST, 100,155,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_DISKDCLIST, 175,155,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "& :",IDC_STANDBY,15,177,80,10 + LTEXT "&Ждущий режим через:",IDC_STANDBY,15,177,80,10 COMBOBOX IDC_STANDBYACLIST, 100,175,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_STANDBYDCLIST, 175,175,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "& :",IDC_HYBERNATE,15,192,80,10 + LTEXT "С&пящий режим через:",IDC_HYBERNATE,15,192,80,10 COMBOBOX IDC_HYBERNATEACLIST, 100,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Уведомления" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,10,15,235,95 - CONTROL " & :",IDC_ALARM1, + GROUPBOX "Сигнал низкого заряда батарей",-1,10,15,235,95 + CONTROL "Включить сигнал н&изкого заряда при уровне:",IDC_ALARM1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,25,180,15 - LTEXT " ",IDC_ALARMVALUE1,200,25,40,10 + LTEXT "Нет данных",IDC_ALARMVALUE1,200,25,40,10 LTEXT "0%",-1,20,40,15,15 CONTROL "Slider1",IDC_ALARMBAR1,"msctls_trackbar32",TBS_HORZ | TBS_AUTOTICKS | WS_TABSTOP,30,40,170,15 LTEXT "100%",-1,215,40,25,10 - PUSHBUTTON "&...",-1,20,70,70,15,WS_DISABLED - LTEXT ":",-1,95,70,50,10 - LTEXT " ",IDC_ALARMMSG1,145,70,95,10 - LTEXT ":",-1,95,80,45,10 - LTEXT " ",IDC_ALARMAKTION1,145,80,95,10 - LTEXT " :",-1,95,90,50,10 - LTEXT " ",IDC_ALARMPROG1,150,90,40,10 + PUSHBUTTON "Д&ействие...",-1,20,70,70,15,WS_DISABLED + LTEXT "Уведомление:",-1,95,70,50,10 + LTEXT "Нет данных",IDC_ALARMMSG1,145,70,95,10 + LTEXT "Действие:",-1,95,80,45,10 + LTEXT "Нет данных",IDC_ALARMAKTION1,145,80,95,10 + LTEXT "Запуск программы:",-1,95,90,50,10 + LTEXT "Нет данных",IDC_ALARMPROG1,150,90,40,10 - GROUPBOX " ",-1,10,115,235,95 - CONTROL " & :",IDC_ALARM2, + GROUPBOX "Сигнал критически низкого заряда батарей",-1,10,115,235,95 + CONTROL "Включить такой &сигнал при уровне:",IDC_ALARM2, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,125,180,15 - LTEXT " ",IDC_ALARMVALUE2,200,125,40,10 + LTEXT "Нет данных",IDC_ALARMVALUE2,200,125,40,10 LTEXT "0%",-1,20,140,15,15 CONTROL "Slider1",IDC_ALARMBAR2,"msctls_trackbar32",TBS_HORZ | TBS_AUTOTICKS | WS_TABSTOP,30,140,170,15 LTEXT "100%",-1,215,140,25,10 - PUSHBUTTON "&...",-1,20,170,70,15,WS_DISABLED - LTEXT ":",-1,95,170,50,10 - LTEXT " ",IDC_ALARMMSG2,145,170,95,10 - LTEXT ":",-1,95,180,45,10 - LTEXT " ",IDC_ALARMAKTION2,145,180,95,10 - LTEXT " :",-1,95,190,50,10 - LTEXT " ",IDC_ALARMPROG2,150,190,40,10 + PUSHBUTTON "Де&йствие...",-1,20,170,70,15,WS_DISABLED + LTEXT "Уведомление:",-1,95,170,50,10 + LTEXT "Нет данных",IDC_ALARMMSG2,145,170,95,10 + LTEXT "Действие:",-1,95,180,45,10 + LTEXT "Нет данных",IDC_ALARMAKTION2,145,180,95,10 + LTEXT "Запуск программы:",-1,95,190,50,10 + LTEXT "Нет данных",IDC_ALARMPROG2,150,190,40,10 END IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ACDC,IDI_ACDC,5,5,32,32 - LTEXT " .",-1,37,5,205,20 - GROUPBOX "",-1,5,35,225,55 - CONTROL "& ",IDC_SYSTRAYBATTERYMETER,"Button",BS_AUTOCHECKBOX | + LTEXT "Выберите желаемые параметры энергосбережения.",-1,37,5,205,20 + GROUPBOX "Параметры",-1,5,35,225,55 + CONTROL "&Всегда отображать значок на панели задач",IDC_SYSTRAYBATTERYMETER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,48,200,10 - CONTROL "& ",IDC_PASSWORDLOGON,"Button",BS_AUTOCHECKBOX | + CONTROL "&Запрашивать пароль при выходе из ждущего режима",IDC_PASSWORDLOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,60,200,10 - CONTROL "& ",IDC_VIDEODIMDISPLAY,"Button",BS_AUTOCHECKBOX | + CONTROL "&Снизить яркость монитора при работе от батарей",IDC_VIDEODIMDISPLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,72,200,10 - GROUPBOX " ",-1,5,100,230,105 - LTEXT "& :", IDC_SLIDCLOSE,10,110,210,10 + GROUPBOX "Кнопки питания",-1,5,100,230,105 + LTEXT "&При закрытии крышки переносного компьютера:", IDC_SLIDCLOSE,10,110,210,10 COMBOBOX IDC_LIDCLOSE,10,120,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT " & :", IDC_SPOWERBUTTON,10,140,210,10 + LTEXT "При &нажатии кнопки включения питания компьютера:", IDC_SPOWERBUTTON,10,140,210,10 COMBOBOX IDC_POWERBUTTON,10,150,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT " & :", IDC_SSLEEPBUTTON,10,170,210,10 + LTEXT "При нажатии &кнопки перехода в спящий режим:", IDC_SSLEEPBUTTON,10,170,210,10 COMBOBOX IDC_SLEEPBUTTON,10,180,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP END IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Спящий режим" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SCREEN,IDI_SCREEN,5,5,32,32 - LTEXT " . .", + LTEXT "При переходе в спящий режим компьютер переносит содержимое оперативной памяти на диск и выключается. При выходе из спящего режима компьютер возвращается в прежнее состояние.", -1,37,5,195,35 - GROUPBOX " ",-1,5,57,235,25 - CONTROL "& ",IDC_HIBERNATEFILE,"Button",BS_AUTOCHECKBOX | + GROUPBOX "Спящий режим",-1,5,57,235,25 + CONTROL "&Разрешить переход в спящий режим",IDC_HIBERNATEFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,67,210,10 - GROUPBOX " ",-1,5,92,240,60 - LTEXT " :",-1,10,102,100,10 - LTEXT " ",IDC_FREESPACE,130,102,70,10 - LTEXT " :",-1,10,112,115,10 - LTEXT " ",IDC_SPACEFORHIBERNATEFILE,130,112,55,10 - LTEXT " .",IDC_TOLESSFREESPACE,10,127,220,20 + GROUPBOX "Место на диске для перехода в спящий режим",-1,5,92,240,60 + LTEXT "Свободно места на диске:",-1,10,102,100,10 + LTEXT "Нет данных",IDC_FREESPACE,130,102,70,10 + LTEXT "Требуется для спящего режима:",-1,10,112,115,10 + LTEXT "Нет данных",IDC_SPACEFORHIBERNATEFILE,130,112,55,10 + LTEXT "Для возможности перехода в спящий режим требуется освободить место на диске.",IDC_TOLESSFREESPACE,10,127,220,20 END STRINGTABLE BEGIN - IDS_CPLNAME_1 "" - IDS_CPLDESCRIPTION_1 " ." + IDS_CPLNAME_1 "Электропитание" + IDS_CPLDESCRIPTION_1 "Настройка параметров энергосбережения для компьютера." IDS_PROCENT "%i%%" - IDS_SOUND "" - IDS_TEXT "" - IDS_CONFIG1 " %1" - IDS_CONFIG2 " %1" + IDS_SOUND "Звук" + IDS_TEXT "Текст" + IDS_CONFIG1 "Параметры схемы %1" + IDS_CONFIG2 "Дополнительные параметры схемы %1" - IDS_SIZEBYTS "%i " - IDS_SIZEMB "%i " + IDS_SIZEBYTS "%i байт" + IDS_SIZEMB "%i МБ" - IDS_NOACTION " " + IDS_NOACTION "Не делать ничего" - IDS_PowerActionNone1 " " - IDS_PowerActionUnknown " " - IDS_PowerActionSleep " " - IDS_PowerActionHibernate " " - IDS_PowerActionShutdown " " - IDS_PowerActionRestart "" - IDS_PowerActionShutdownOff " " - IDS_PowerActionWarmEject " " - IDS_PowerActionNone2 "" + IDS_PowerActionNone1 "Действие не требуется" + IDS_PowerActionUnknown "Нет данных" + IDS_PowerActionSleep "Ждущий режим" + IDS_PowerActionHibernate "Спящий режим" + IDS_PowerActionShutdown "Завершение работы" + IDS_PowerActionRestart "Перезагрузка" + IDS_PowerActionShutdownOff "Завершение работы и выключение питания" + IDS_PowerActionWarmEject "Спросить о нужном действии" + IDS_PowerActionNone2 "Отсутствует" - IDS_TIMEOUT1 " 1 " - IDS_TIMEOUT2 " 2 " - IDS_TIMEOUT3 " 3 " - IDS_TIMEOUT4 " 5 " - IDS_TIMEOUT5 " 10 " - IDS_TIMEOUT6 " 15 " - IDS_TIMEOUT7 " 20 " - IDS_TIMEOUT8 " 25 " - IDS_TIMEOUT9 " 30 " - IDS_TIMEOUT10 " 45 " - IDS_TIMEOUT11 " 1 " - IDS_TIMEOUT12 " 2 " - IDS_TIMEOUT13 " 3 " - IDS_TIMEOUT14 " 4 " - IDS_TIMEOUT15 " 5 " - IDS_TIMEOUT16 "" + IDS_TIMEOUT1 "через 1 мин" + IDS_TIMEOUT2 "через 2 мин" + IDS_TIMEOUT3 "через 3 мин" + IDS_TIMEOUT4 "через 5 мин" + IDS_TIMEOUT5 "через 10 мин" + IDS_TIMEOUT6 "через 15 мин" + IDS_TIMEOUT7 "через 20 мин" + IDS_TIMEOUT8 "через 25 мин" + IDS_TIMEOUT9 "через 30 мин" + IDS_TIMEOUT10 "через 45 мин" + IDS_TIMEOUT11 "через 1 час" + IDS_TIMEOUT12 "через 2 часа" + IDS_TIMEOUT13 "через 3 часа" + IDS_TIMEOUT14 "через 4 часа" + IDS_TIMEOUT15 "через 5 часов" + IDS_TIMEOUT16 "никогда" IDS_DEL_SCHEME "Are you sure you want to delete the power scheme?" IDS_DEL_SCHEME_TITLE "Delete Scheme" diff --git a/dll/cpl/powercfg/lang/uk-UA.rc b/dll/cpl/powercfg/lang/uk-UA.rc index d2a728b4b73..a9d32ed5a58 100644 --- a/dll/cpl/powercfg/lang/uk-UA.rc +++ b/dll/cpl/powercfg/lang/uk-UA.rc @@ -10,163 +10,163 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGEPOWERSHEMES DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Схеми керування живленням" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ACDC, IDI_ACDC, 7, 7, 28, 22 - LTEXT " ' . , .", + LTEXT "Виберіть схему керування живленням із найбільш прийнятними для цього комп'ютера параметрами. Якщо змінити нижченаведені параметри, вибрана схема також зміниться.", -1,37, 6, 209, 36 - GROUPBOX "& ", -1, 6, 43, 240, 50 + GROUPBOX "&Схеми керування живленням", -1, 6, 43, 240, 50 COMBOBOX IDC_ENERGYLIST, 14, 54, 224, 92, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL - PUSHBUTTON " &...", IDC_SAVEAS_BTN, 109, 72, 70, 14, WS_DISABLED - PUSHBUTTON "&", IDC_DELETE_BTN, 183, 72, 55, 14, WS_DISABLED - GROUPBOX " ", IDC_GRPDETAIL, 6, 95, 240, 136 - LTEXT " :",IDC_SAT, 12, 109, 60, 12 - LTEXT " ",IDC_SAC, 123, 110, 45, 15 + PUSHBUTTON "Зберегти &як...", IDC_SAVEAS_BTN, 109, 72, 70, 14, WS_DISABLED + PUSHBUTTON "В&идалити", IDC_DELETE_BTN, 183, 72, 55, 14, WS_DISABLED + GROUPBOX "Немає даних", IDC_GRPDETAIL, 6, 95, 240, 136 + LTEXT "При живленні:",IDC_SAT, 12, 109, 60, 12 + LTEXT "від мережі",IDC_SAC, 123, 110, 45, 15 ICON IDI_AC, IDC_IAC, 97, 108, 21, 20 - LTEXT " ",IDC_SDC, 195, 110, 45, 15 + LTEXT "від батарей",IDC_SDC, 195, 110, 45, 15 ICON IDI_DC, IDC_IDC, 170, 108, 21, 20 - LTEXT " &:",IDC_MONITOR, 13, 148, 84, 10 + LTEXT "Вимкнення дисп&лея:",IDC_MONITOR, 13, 148, 84, 10 COMBOBOX IDC_MONITORACLIST, 100, 145, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_MONITORDCLIST, 173, 145, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "& :",IDC_DISK, 13, 171, 84, 10 + LTEXT "&Вимкнення дисків:",IDC_DISK, 13, 171, 84, 10 COMBOBOX IDC_DISKACLIST, 100, 167, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_DISKDCLIST, 173, 167, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "& :",IDC_STANDBY, 13, 191, 84, 10 + LTEXT "Ре&жим очікування:",IDC_STANDBY, 13, 191, 84, 10 COMBOBOX IDC_STANDBYACLIST, 100, 188, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_STANDBYDCLIST, 173, 188, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "& :",IDC_HYBERNATE, 13, 212, 84, 10 + LTEXT "С&плячий режим:",IDC_HYBERNATE, 13, 212, 84, 10 COMBOBOX IDC_HYBERNATEACLIST, 100, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Сигналізація" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ",-1,10,15,235,95 - CONTROL "& , :",IDC_ALARM1, + GROUPBOX "Сигнал значної розрядки батарей",-1,10,15,235,95 + CONTROL "Подават&и сигнал, якщо рівень живлення досягає:",IDC_ALARM1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,25,180,15 - LTEXT " ",IDC_ALARMVALUE1,200,25,40,10 + LTEXT "немає даних",IDC_ALARMVALUE1,200,25,40,10 LTEXT "0%",-1,20,40,15,15 CONTROL "Slider1",IDC_ALARMBAR1,"msctls_trackbar32",TBS_HORZ | TBS_AUTOTICKS | WS_TABSTOP,30,40,170,15 LTEXT "100%",-1,215,40,25,10 - PUSHBUTTON "&ij...",-1,20,70,70,15,WS_DISABLED - LTEXT ":",-1,95,70,50,10 - LTEXT " ",IDC_ALARMMSG1,145,70,95,10 - LTEXT "ij:",-1,95,80,45,10 - LTEXT " ",IDC_ALARMAKTION1,145,80,95,10 - LTEXT " :",-1,95,90,50,10 - LTEXT " ",IDC_ALARMPROG1,150,90,40,10 + PUSHBUTTON "&Дія...",-1,20,70,70,15,WS_DISABLED + LTEXT "Сповіщення:",-1,95,70,50,10 + LTEXT "Немає даних",IDC_ALARMMSG1,145,70,95,10 + LTEXT "Дія:",-1,95,80,45,10 + LTEXT "Немає даних",IDC_ALARMAKTION1,145,80,95,10 + LTEXT "Запуск програми:",-1,95,90,50,10 + LTEXT "Немає даних",IDC_ALARMPROG1,150,90,40,10 - GROUPBOX " ",-1,10,115,235,95 - CONTROL " &, :",IDC_ALARM2, + GROUPBOX "Сигнал критичної розрядки батарей",-1,10,115,235,95 + CONTROL "Подавати &сигнал, якщо рівень живлення досягає:",IDC_ALARM2, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,125,180,15 - LTEXT " ",IDC_ALARMVALUE2,200,125,40,10 + LTEXT "немає даних",IDC_ALARMVALUE2,200,125,40,10 LTEXT "0%",-1,20,140,15,15 CONTROL "Slider1",IDC_ALARMBAR2,"msctls_trackbar32",TBS_HORZ | TBS_AUTOTICKS | WS_TABSTOP,30,140,170,15 LTEXT "100%",-1,215,140,25,10 - PUSHBUTTON "&ij...",-1,20,170,70,15,WS_DISABLED - LTEXT ":",-1,95,170,50,10 - LTEXT " ",IDC_ALARMMSG2,145,170,95,10 - LTEXT "ij:",-1,95,180,45,10 - LTEXT " ",IDC_ALARMAKTION2,145,180,95,10 - LTEXT " :",-1,95,190,50,10 - LTEXT " ",IDC_ALARMPROG2,150,190,40,10 + PUSHBUTTON "&Дія...",-1,20,170,70,15,WS_DISABLED + LTEXT "Сповіщення:",-1,95,170,50,10 + LTEXT "Немає даних",IDC_ALARMMSG2,145,170,95,10 + LTEXT "Дія:",-1,95,180,45,10 + LTEXT "Немає даних",IDC_ALARMAKTION2,145,180,95,10 + LTEXT "Запуск програми:",-1,95,190,50,10 + LTEXT "Немає даних",IDC_ALARMPROG2,150,190,40,10 END IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ACDC,IDI_ACDC,5,5,20,20 - LTEXT " .",-1,30,5,205,20 - GROUPBOX "",-1,5,35,225,55 - CONTROL "& ",IDC_SYSTRAYBATTERYMETER,"Button",BS_AUTOCHECKBOX | + LTEXT "Виберіть бажані параметри енергозбереження.",-1,30,5,205,20 + GROUPBOX "Параметри",-1,5,35,225,55 + CONTROL "За&вжди показувати значок на панелі завдань",IDC_SYSTRAYBATTERYMETER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,45,200,10 - CONTROL "& ",IDC_PASSWORDLOGON,"Button",BS_AUTOCHECKBOX | + CONTROL "&Запитувати пароль при виході з режиму очікування",IDC_PASSWORDLOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,55,200,10 - CONTROL "& .",IDC_VIDEODIMDISPLAY,"Button",BS_AUTOCHECKBOX | + CONTROL "З&меншити яскравість монітора в разі живлення від батарей.",IDC_VIDEODIMDISPLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,65,200,10 - GROUPBOX " ",-1,5,100,230,105 - LTEXT "& & ':", IDC_SLIDCLOSE,10,110,210,10 + GROUPBOX "Кнопки живлення",-1,5,100,230,105 + LTEXT "&При закритті кришки &портативного комп'ютера:", IDC_SLIDCLOSE,10,110,210,10 COMBOBOX IDC_LIDCLOSE,10,120,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT " & ':", IDC_SPOWERBUTTON,10,135,210,10 + LTEXT "При нат&исненні вимикача живлення на моєму комп'ютері:", IDC_SPOWERBUTTON,10,135,210,10 COMBOBOX IDC_POWERBUTTON,10,150,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT " & :", IDC_SSLEEPBUTTON,10,165,210,10 + LTEXT "При нати&сненні кнопки переходу до сплячого режиму:", IDC_SSLEEPBUTTON,10,165,210,10 COMBOBOX IDC_SLEEPBUTTON,10,180,220,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP END IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Сплячий режим" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_SCREEN,IDI_SCREEN,5,5,20,20 - LTEXT " ' , ' . , ' . ", + LTEXT "Коли комп'ютер переходить до сплячого режиму, увесь вміст пам'яті записується на жорсткий диск і робота завершується. Виходячи зі сплячого режиму, комп'ютер повертається до попереднього стану. ", -1,35,5,195,35 - GROUPBOX " ",-1,5,45,235,25 - CONTROL " &",IDC_HIBERNATEFILE,"Button",BS_AUTOCHECKBOX | + GROUPBOX "Сплячий режим",-1,5,45,235,25 + CONTROL "Дозволити сплячий &режим",IDC_HIBERNATEFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,55,210,10 - GROUPBOX "̳ ",-1,5,80,240,60 - LTEXT " :",-1,10,90,100,10 - LTEXT " ",IDC_FREESPACE,120,90,70,10 - LTEXT " :",-1,10,100,115,10 - LTEXT " ",IDC_SPACEFORHIBERNATEFILE,120,100,55,10 - LTEXT " ' . ",IDC_TOLESSFREESPACE,10,115,220,20 + GROUPBOX "Місце на диску для сплячого режиму",-1,5,80,240,60 + LTEXT "Доступно на диску:",-1,10,90,100,10 + LTEXT "немає даних",IDC_FREESPACE,120,90,70,10 + LTEXT "Для сплячого режиму потрібно:",-1,10,100,115,10 + LTEXT "Немає даних",IDC_SPACEFORHIBERNATEFILE,120,100,55,10 + LTEXT "Перед переведенням комп'ютера до сплячого режиму слід звільнити місце на диску. ",IDC_TOLESSFREESPACE,10,115,220,20 END STRINGTABLE BEGIN - IDS_CPLNAME_1 "" - IDS_CPLDESCRIPTION_1 " '." + IDS_CPLNAME_1 "Електроживлення" + IDS_CPLDESCRIPTION_1 "Налаштування параметрів енергозбереження для комп'ютера." IDS_PROCENT "%i%%" - IDS_SOUND "" - IDS_TEXT "" - IDS_CONFIG1 " %1" - IDS_CONFIG2 " %1" + IDS_SOUND "Звук" + IDS_TEXT "Текст" + IDS_CONFIG1 "Налаштування схеми живлення %1" + IDS_CONFIG2 "Додаткові налаштування для %1" - IDS_SIZEBYTS "%i " - IDS_SIZEMB "%i " + IDS_SIZEBYTS "%i байт" + IDS_SIZEMB "%i МБ" - IDS_NOACTION " " + IDS_NOACTION "Не робити нічого" - IDS_PowerActionNone1 "ij " - IDS_PowerActionUnknown " " - IDS_PowerActionSleep " " - IDS_PowerActionHibernate " " - IDS_PowerActionShutdown " " - IDS_PowerActionRestart "" - IDS_PowerActionShutdownOff " " - IDS_PowerActionWarmEject ", " - IDS_PowerActionNone2 "³" + IDS_PowerActionNone1 "Дія не потрібна" + IDS_PowerActionUnknown "Немає даних" + IDS_PowerActionSleep "Перехід до очікування" + IDS_PowerActionHibernate "Перехід до сплячого режиму" + IDS_PowerActionShutdown "Завершення роботи" + IDS_PowerActionRestart "Перезавантаження" + IDS_PowerActionShutdownOff "Завершення роботи і вимкнення живлення" + IDS_PowerActionWarmEject "Запитувати, що слід зробити" + IDS_PowerActionNone2 "Відсутня" - IDS_TIMEOUT1 " 1 " - IDS_TIMEOUT2 " 2 " - IDS_TIMEOUT3 " 3 " - IDS_TIMEOUT4 " 5 " - IDS_TIMEOUT5 " 10 " - IDS_TIMEOUT6 " 15 " - IDS_TIMEOUT7 " 20 " - IDS_TIMEOUT8 " 25 " - IDS_TIMEOUT9 " 30 " - IDS_TIMEOUT10 " 45 " - IDS_TIMEOUT11 " 1 " - IDS_TIMEOUT12 " 2 " - IDS_TIMEOUT13 " 3 " - IDS_TIMEOUT14 " 4 " - IDS_TIMEOUT15 " 5 " - IDS_TIMEOUT16 "" + IDS_TIMEOUT1 "через 1 хв" + IDS_TIMEOUT2 "через 2 хв" + IDS_TIMEOUT3 "через 3 хв" + IDS_TIMEOUT4 "через 5 хв" + IDS_TIMEOUT5 "через 10 хв" + IDS_TIMEOUT6 "через 15 хв" + IDS_TIMEOUT7 "через 20 хв" + IDS_TIMEOUT8 "через 25 хв" + IDS_TIMEOUT9 "через 30 хв" + IDS_TIMEOUT10 "через 45 хв" + IDS_TIMEOUT11 "через 1 годину" + IDS_TIMEOUT12 "через 2 години" + IDS_TIMEOUT13 "через 3 години" + IDS_TIMEOUT14 "через 4 години" + IDS_TIMEOUT15 "через 5 годин" + IDS_TIMEOUT16 "ніколи" - IDS_DEL_SCHEME " ?" - IDS_DEL_SCHEME_TITLE " " + IDS_DEL_SCHEME "Ви дійсно бажаєте видалити схему керування електроживленням?" + IDS_DEL_SCHEME_TITLE "Видалення схеми" END diff --git a/dll/cpl/powercfg/rsrc.rc b/dll/cpl/powercfg/rsrc.rc index f9e7669231e..a98245f11e5 100644 --- a/dll/cpl/powercfg/rsrc.rc +++ b/dll/cpl/powercfg/rsrc.rc @@ -13,10 +13,13 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/th-TH.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" -#include "lang/th-TH.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" diff --git a/dll/cpl/sysdm/CMakeLists.txt b/dll/cpl/sysdm/CMakeLists.txt index 14c585c0044..fb98ed6fa25 100644 --- a/dll/cpl/sysdm/CMakeLists.txt +++ b/dll/cpl/sysdm/CMakeLists.txt @@ -18,7 +18,7 @@ list(APPEND SOURCE sysdm.rc ${CMAKE_CURRENT_BINARY_DIR}/sysdm.def) -add_library(sysdm SHARED ${CMAKE_CURRENT_BINARY_DIR}/sysdm_precomp.h.gch ${SOURCE}) +add_library(sysdm SHARED ${SOURCE}) set_module_type(sysdm cpl) @@ -37,5 +37,5 @@ add_importlibs(sysdm kernel32 ntdll) -add_pch(sysdm ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(sysdm precomp.h) add_cd_file(TARGET sysdm DESTINATION reactos/system32 FOR all) diff --git a/dll/cpl/sysdm/lang/pl-PL.rc b/dll/cpl/sysdm/lang/pl-PL.rc index 91f7db5ed4c..1e90af06bc9 100644 --- a/dll/cpl/sysdm/lang/pl-PL.rc +++ b/dll/cpl/sysdm/lang/pl-PL.rc @@ -1,14 +1,16 @@ /* -* translated by xrogers -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -* updated by Caemyr - Olaf Siejka (Jan, 2008) -*/ + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * updated by Caemyr - Olaf Siejka (Jan, 2008) + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_PROPPAGEGENERAL DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111 @@ -23,30 +25,30 @@ BEGIN LTEXT "", IDC_MACHINELINE3, 130, 162, 118, 9 LTEXT "", IDC_MACHINELINE4, 130, 171, 118, 9 LTEXT "", IDC_MACHINELINE5, 130, 180, 118, 9 - CONTROL "Odwied Stron domow ReactOS", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 200, 123, 8 - PUSHBUTTON "Wywietl &licencj...", IDC_LICENCE, 170, 199, 78, 14 + CONTROL "Odwiedź Stronę domową ReactOS", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 200, 123, 8 + PUSHBUTTON "Wyświetl &licencję...", IDC_LICENCE, 170, 199, 78, 14 END IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Sprzt" +CAPTION "Sprzęt" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "Meneder urzdze", IDC_STATIC, 6, 7, 244, 61 + GROUPBOX "Menedżer urządzeń", IDC_STATIC, 6, 7, 244, 61 ICON IDI_DEVMGR, IDC_STATIC, 12, 18, 23, 21, SS_ICON - LTEXT "Meneder urzdze wywietla wszystkie urzdzenia sprztowe zainstalowane w komputerze. Moesz uy Menedera urzdze, aby zmieni waciwoci kadego urzdzenia.", IDC_STATIC, 42, 18, 204, 24 - PUSHBUTTON "&Meneder urzdze", IDC_HARDWARE_DEVICE_MANAGER, 154, 48, 90, 14 + LTEXT "Menedżer urządzeń wyświetla wszystkie urządzenia sprzętowe zainstalowane w komputerze. Możesz użyć Menedżera urządzeń, aby zmienić właściwości każdego urządzenia.", IDC_STATIC, 42, 18, 204, 24 + PUSHBUTTON "&Menedżer urządzeń", IDC_HARDWARE_DEVICE_MANAGER, 154, 48, 90, 14 - GROUPBOX "Kreator sprztu", IDC_STATIC, 6, 79, 244, 61 + GROUPBOX "Kreator sprzętu", IDC_STATIC, 6, 79, 244, 61 ICON IDI_DEVMGR, IDC_STATIC, 12, 90, 23, 21, SS_ICON - LTEXT "Kreator sprztu pomaga w instalacji, deinstalacji, odczaniu, usuwaniu i konfiguracji sprztu.", IDC_STATIC, 42, 90, 204, 24 - PUSHBUTTON "&Kreator sprztu", IDC_HARDWARE_WIZARD, 154, 120, 90, 14 + LTEXT "Kreator sprzętu pomaga w instalacji, deinstalacji, odłączaniu, usuwaniu i konfiguracji sprzętu.", IDC_STATIC, 42, 90, 204, 24 + PUSHBUTTON "&Kreator sprzętu", IDC_HARDWARE_WIZARD, 154, 120, 90, 14 - GROUPBOX "Profile sprztu", IDC_STATIC, 6, 149, 244, 61 + GROUPBOX "Profile sprzętu", IDC_STATIC, 6, 149, 244, 61 ICON IDI_HARDPROF, IDC_STATIC, 12, 160, 23, 21, SS_ICON - LTEXT "Dziki profilom sprztu moesz instalowa oraz przechowywa rne konfiguracje sprztu.", IDC_STATIC, 42, 160, 204, 24 - PUSHBUTTON "Profile &sprztu", IDC_HARDWARE_PROFILE, 154, 190, 90, 14 + LTEXT "Dzięki profilom sprzętu możesz instalować oraz przechowywać różne konfiguracje sprzętu.", IDC_STATIC, 42, 160, 204, 24 + PUSHBUTTON "Profile &sprzętu", IDC_HARDWARE_PROFILE, 154, 190, 90, 14 END IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 256, 218 @@ -54,21 +56,21 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Zaawansowane" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Aby mc przeprowadzi wikszo tych zmian, musisz zalogowa si jako administrator.", IDC_STATIC, 12, 5, 236, 8 - GROUPBOX "Wydajno", IDC_STATIC, 6, 18, 244, 50 - LTEXT "Efekty wizualne, planowanie uycia procesora, wykorzystanie pamici i pami wirtualna.", IDC_STATIC, 16, 29, 210, 17 + LTEXT "Aby móc przeprowadzić większość tych zmian, musisz zalogować się jako administrator.", IDC_STATIC, 12, 5, 236, 8 + GROUPBOX "Wydajność", IDC_STATIC, 6, 18, 244, 50 + LTEXT "Efekty wizualne, planowanie użycia procesora, wykorzystanie pamięci i pamięć wirtualna.", IDC_STATIC, 16, 29, 210, 17 PUSHBUTTON "&Ustawienia", IDC_PERFOR, 194, 48, 50, 14 - GROUPBOX "Profile uytkownika", IDC_STATIC, 6,75,244,48 - LTEXT "Ustawienia pulpitu powizane z logowaniem uytkownika.", IDC_STATIC, 16, 88, 210, 20 + GROUPBOX "Profile użytkownika", IDC_STATIC, 6,75,244,48 + LTEXT "Ustawienia pulpitu powiązane z logowaniem użytkownika.", IDC_STATIC, 16, 88, 210, 20 PUSHBUTTON "U&stawienia", IDC_USERPROFILE, 194, 103, 50, 14 GROUPBOX "Uruchamianie i odzyskiwanie", IDC_STATIC, 6, 131, 244, 52 LTEXT "Informacje o uruchamianiu systemu, awariach systemu i debugowaniu.", IDC_STATIC, 16, 144, 210, 19 PUSHBUTTON "Us&tawienia", IDC_STAREC, 194, 162, 50, 14 - PUSHBUTTON "Z&mienne rodowiskowe", IDC_ENVVAR, 84, 192, 80, 14 - PUSHBUTTON "&Raportowanie bdw", IDC_ERRORREPORT, 170, 192, 80, 14 + PUSHBUTTON "Z&mienne Środowiskowe", IDC_ENVVAR, 84, 192, 80, 14 + PUSHBUTTON "&Raportowanie błędów", IDC_ERRORREPORT, 170, 192, 80, 14 END IDD_SYSSETTINGS DIALOGEX 0, 0, 221, 106 @@ -77,32 +79,32 @@ CAPTION "Ustawienia systemowe" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN GROUPBOX "Informowanie o wersji",IDC_STATIC,6,3,210,73 - CONTROL "Zgaszaj jako stacj robocz",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,110,10 - LTEXT "ReactOS jest zbudowany w oparciu o wersj serwerow. Zaznacz pole, aby ReactOS zgasza si aplikacjom jako stacja robocza.",IDC_STATIC,15,15,183,41 + CONTROL "Zgłaszaj jako stację roboczą",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,110,10 + LTEXT "ReactOS jest zbudowany w oparciu o wersję serwerową. Zaznacz pole, aby ReactOS zgłaszał się aplikacjom jako stacja robocza.",IDC_STATIC,15,15,183,41 PUSHBUTTON "OK",IDOK,166,83,50,14 END IDD_HARDWAREPROFILES DIALOGEX 6, 18, 254, 234 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Profile sprztu" +CAPTION "Profile sprzętu" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_HARDPROF, IDC_STATIC, 8, 11, 18, 20, SS_ICON - LTEXT "Moesz okreli profile sprztu dla rnych konfiguracji sprztu. Podczas uruchamiania moesz wybra profil, ktrego chcesz uy.", IDC_STATIC, 46, 11, 188, 25 - LTEXT "&Dostpne profile sprztu:", IDC_STATIC, 8, 41, 120, 8 + LTEXT "Możesz określić profile sprzętu dla różnych konfiguracji sprzętu. Podczas uruchamiania możesz wybrać profil, którego chcesz użyć.", IDC_STATIC, 46, 11, 188, 25 + LTEXT "&Dostępne profile sprzętu:", IDC_STATIC, 8, 41, 120, 8 LISTBOX IDC_HRDPROFLSTBOX, 8, 52, 215, 54, LBS_NOTIFY PUSHBUTTON "", IDC_HRDPROFUP, 232, 59, 15, 14, BS_ICON PUSHBUTTON "", IDC_HRDPROFDWN, 232, 79, 15, 14, BS_ICON - PUSHBUTTON "&Waciwoci", IDC_HRDPROFPROP, 8, 106, 50, 14 + PUSHBUTTON "&Właściwości", IDC_HRDPROFPROP, 8, 106, 50, 14 PUSHBUTTON "&Kopiuj", IDC_HRDPROFCOPY, 63, 106, 50, 14 - PUSHBUTTON "Z&mie nazw", IDC_HRDPROFRENAME, 118, 106, 50, 14 - PUSHBUTTON "&Usu", IDC_HRDPROFDEL, 173, 106, 50, 14 + PUSHBUTTON "Z&mień nazwę", IDC_HRDPROFRENAME, 118, 106, 50, 14 + PUSHBUTTON "&Usuń", IDC_HRDPROFDEL, 173, 106, 50, 14 - GROUPBOX "Wybr profilw sprztu", IDC_STATIC, 7, 130, 240, 75 + GROUPBOX "Wybór profili sprzętu", IDC_STATIC, 7, 130, 240, 75 LTEXT "Podczas uruchamiania ReactOS:", IDC_STATIC, 14, 142, 210, 8 - AUTORADIOBUTTON "&Czekaj na wybr profilu sprztu przez uytkownika", IDC_HRDPROFWAIT, 14, 158, 133, 8, WS_GROUP - AUTORADIOBUTTON "&Wybierz &pierwszy profil na licie, jeeli uytkownik nie wybierze profilu w cigu", IDC_HRDPROFSELECT, 14, 173, 190, 8 + AUTORADIOBUTTON "&Czekaj na wybór profilu sprzętu przez użytkownika", IDC_HRDPROFWAIT, 14, 158, 133, 8, WS_GROUP + AUTORADIOBUTTON "&Wybierz &pierwszy profil na liście, jeżeli użytkownik nie wybierze profilu w ciągu", IDC_HRDPROFSELECT, 14, 173, 190, 8 LTEXT "s", IDC_STATIC, 65, 187, 35, 8 EDITTEXT IDC_HRDPROFEDIT, 25, 185, 35, 12 CONTROL "", IDC_HRDPROFUPDWN, "msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 25, 185, 7, 10 @@ -129,20 +131,20 @@ END IDD_USERPROFILE DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Profile uytkownika" +CAPTION "Profile użytkownika" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_USERPROF, IDC_STATIC, 6, 11, 16, 16, SS_ICON - LTEXT "Profile uytkownika przechowuj ustawienia pulpitu oraz inne informacje zwizane z kontem uytkownika. Moesz utworzy inny profil na kadym z uywanych komputerw lub wybra profil mobilny, ktry jest taki sam dla kadego z uywanych komputerw.", + LTEXT "Profile użytkownika przechowują ustawienia pulpitu oraz inne informacje związane z kontem użytkownika. Możesz utworzyć inny profil na każdym z używanych komputerów lub wybrać profil mobilny, który jest taki sam dla każdego z używanych komputerów.", IDC_STATIC, 40, 11, 204, 35 LTEXT "&Profile przechowywane na tym komputerze:", IDC_STATIC, 16, 51, 204, 9 CONTROL "", IDC_USERPROFILE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 6, 66, 244, 85, WS_EX_CLIENTEDGE - PUSHBUTTON "&Zmie typ", IDC_USERPROFILE_CHANGE, 90, 156, 50, 14 - PUSHBUTTON "&Usu", IDC_USERPROFILE_DELETE, 145, 156, 50, 14 + PUSHBUTTON "&Zmień typ", IDC_USERPROFILE_CHANGE, 90, 156, 50, 14 + PUSHBUTTON "&Usuń", IDC_USERPROFILE_DELETE, 145, 156, 50, 14 PUSHBUTTON "&Kopiuj do", IDC_USERPROFILE_COPY, 200, 156, 50, 14 - CONTROL "Aby utworzy nowe konta uytkownikw, otwrz aplet Konta uytkownikw w Panelu sterowania.", IDC_USERACCOUNT_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 175, 204, 18 + CONTROL "Aby utworzyć nowe konta użytkowników, otwórz aplet Konta użytkowników w Panelu sterowania.", IDC_USERACCOUNT_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 175, 204, 18 DEFPUSHBUTTON "OK", IDOK, 134, 200, 54, 14 PUSHBUTTON "Anuluj", IDCANCEL, 196, 200, 54, 14 @@ -155,29 +157,29 @@ CAPTION "Uruchamianie i odzyskiwanie" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Uruchamianie systemu", IDC_STATIC, 7, 12, 238, 95 - LTEXT "&Domylny system operacyjny:", IDC_STATIC, 14, 26, 100, 8 + LTEXT "&Domyślny system operacyjny:", IDC_STATIC, 14, 26, 100, 8 COMBOBOX IDC_STRECOSCOMBO, 14, 37, 224, 46, CBS_DROPDOWNLIST - AUTOCHECKBOX "&Czas wywietlania listy systemw operacyjnych:", IDC_STRECLIST, 14, 56, 150, 8 + AUTOCHECKBOX "&Czas wyświetlania listy systemów operacyjnych:", IDC_STRECLIST, 14, 56, 150, 8 EDITTEXT IDC_STRRECLISTEDIT, 179, 54, 30, 12, ES_NUMBER CONTROL "", IDC_STRRECLISTUPDWN, "msctls_updown32", UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 0, 0, 8, 13 LTEXT "s", IDC_STATIC, 215, 56, 25, 8 - AUTOCHECKBOX "Czas wywietlania w razie potrzeby &opcji odzyskiwania:", IDC_STRRECREC, 14, 70, 163, 8 + AUTOCHECKBOX "Czas wyświetlania w razie potrzeby &opcji odzyskiwania:", IDC_STRRECREC, 14, 70, 163, 8 EDITTEXT IDC_STRRECRECEDIT, 179, 68, 30, 12, ES_NUMBER CONTROL "", IDC_STRRECRECUPDWN, "msctls_updown32", UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 0, 0, 8, 13 LTEXT "s", IDC_STATIC, 215, 70, 25, 8 - LTEXT "Aby rcznie edytowa plik opcji autostartu, kliknij przycisk Edytuj.", IDC_STATIC, 14, 89, 187, 8 + LTEXT "Aby ręcznie edytować plik opcji autostartu, kliknij przycisk Edytuj.", IDC_STATIC, 14, 89, 187, 8 PUSHBUTTON "&Edytuj", IDC_STRRECEDIT, 188, 87, 50, 14 GROUPBOX "Awaria systemu", IDC_STATIC, 7, 111, 238, 140 AUTOCHECKBOX "&Zapisz zdarzenie do dziennika systemu", IDC_STRRECWRITEEVENT, 14, 124, 148, 10 - AUTOCHECKBOX "&Wylij alert administracyjny", IDC_STRRECSENDALERT, 14, 138, 148, 10 + AUTOCHECKBOX "&Wyślij alert administracyjny", IDC_STRRECSENDALERT, 14, 138, 148, 10 AUTOCHECKBOX "A&utomatycznie uruchom ponownie", IDC_STRRECRESTART, 14, 152, 145, 10 GROUPBOX "Zapisywanie informacji o debugowaniu", IDC_STATIC, 12, 167, 227, 76 COMBOBOX IDC_STRRECDEBUGCOMBO, 17, 182, 151, 49, CBS_DROPDOWNLIST LTEXT "&Plik zrzutu:", IDC_STATIC, 17, 202, 150, 8 EDITTEXT IDC_STRRECDUMPFILE, 17, 210, 153, 12 - AUTOCHECKBOX "Z&astp wszystkie istniejce pliki", IDC_STRRECOVERWRITE, 17, 228, 125, 10 + AUTOCHECKBOX "Z&astąp wszystkie istniejące pliki", IDC_STRRECOVERWRITE, 17, 228, 125, 10 DEFPUSHBUTTON "OK", IDOK, 141, 259, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, 195, 259, 50, 14 @@ -186,7 +188,7 @@ END IDD_VIRTMEM DIALOGEX 6, 6, 223, 248 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Pami wirtualna" +CAPTION "Pamięć wirtualna" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "&Dysk [Etykieta woluminu]", IDC_STATIC, 12, 5, 96, 9 @@ -195,9 +197,9 @@ BEGIN GROUPBOX "Rozmiar pliku stronicowania dla wybranego dysku", IDC_DRIVEGROUP, 10, 70, 204, 104 LTEXT "Dysk:", IDC_STATIC, 20, 80, 20, 8 LTEXT "", IDC_DRIVE, 88, 81, 100, 9 - LTEXT "Dostpne miejsce:", IDC_STATIC, 20, 92, 56, 9 + LTEXT "Dostępne miejsce:", IDC_STATIC, 20, 92, 56, 9 LTEXT "", IDC_SPACEAVAIL, 88, 92, 104, 9 - LTEXT "R&ozmiar pocztkowy (MB):", -1, 22, 118, 54, 9 + LTEXT "R&ozmiar początkowy (MB):", -1, 22, 118, 54, 9 LTEXT "Rozmiar &maksymalny (MB):", -1, 22, 131, 64, 9 AUTORADIOBUTTON "&Rozmiar niestandardowy:", IDC_CUSTOM, 20, 105, 54, 9, WS_GROUP AUTORADIOBUTTON "Rozmiar &kontrolowany przez system", IDC_SYSMANSIZE, 20, 145, 88, 9 @@ -206,7 +208,7 @@ BEGIN EDITTEXT IDC_MAXSIZE, 100, 129, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE PUSHBUTTON "Ustaw", IDC_SET, 158, 155, 50, 14 - GROUPBOX "Cakowity rozmiar plikw stronicowania dla wszystkich dyskw", IDC_TOTALGROUP, 10, 177, 204, 46 + GROUPBOX "Całkowity rozmiar plików stronicowania dla wszystkich dysków", IDC_TOTALGROUP, 10, 177, 204, 46 LTEXT "Dopuszczalne minimum:", IDC_STATIC, 18, 188, 58, 9 LTEXT "", IDC_MINIMUM, 88, 188, 100, 9 LTEXT "Zalecane:", IDC_STATIC, 18, 199, 52, 9 @@ -221,17 +223,17 @@ END IDD_ENVIRONMENT_VARIABLES DIALOGEX 6, 18, 252, 245 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Zmienne rodowiskowe" +CAPTION "Zmienne Środowiskowe" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "Zmienne uytkownika", IDC_STATIC, 7, 12, 238, 100 + GROUPBOX "Zmienne użytkownika", IDC_STATIC, 7, 12, 238, 100 CONTROL "", IDC_USER_VARIABLE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 25, 224, 58, WS_EX_CLIENTEDGE PUSHBUTTON "&Nowa...", IDC_USER_VARIABLE_NEW, 80, 90, 50, 14 PUSHBUTTON "&Edytuj...", IDC_USER_VARIABLE_EDIT, 134, 90, 50, 14 - PUSHBUTTON "&Usu", IDC_USER_VARIABLE_DELETE, 188, 90, 50, 14 + PUSHBUTTON "&Usuń", IDC_USER_VARIABLE_DELETE, 188, 90, 50, 14 GROUPBOX "Zmienne systemowe", IDC_STATIC, 7, 116, 238, 100 CONTROL "", IDC_SYSTEM_VARIABLE_LIST, "SysListView32", @@ -239,7 +241,7 @@ BEGIN WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 129, 224, 58, WS_EX_CLIENTEDGE PUSHBUTTON "N&owa...", IDC_SYSTEM_VARIABLE_NEW, 80, 194, 50, 14 PUSHBUTTON "E&dytuj...", IDC_SYSTEM_VARIABLE_EDIT, 134, 194, 50, 14 - PUSHBUTTON "U&su", IDC_SYSTEM_VARIABLE_DELETE, 188, 194, 50, 14 + PUSHBUTTON "U&suń", IDC_SYSTEM_VARIABLE_DELETE, 188, 194, 50, 14 DEFPUSHBUTTON "OK", IDOK, 141, 224, 50, 14, WS_GROUP PUSHBUTTON "Anuluj", IDCANCEL, 195, 224, 50, 14 END @@ -252,7 +254,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LTEXT "&Nazwa zmiennej:", IDC_STATIC, 7, 14, 50, 8 EDITTEXT IDC_VARIABLE_NAME, 75, 12, 145, 12, ES_AUTOHSCROLL - LTEXT "&Warto zmiennej:", IDC_STATIC, 7, 32, 50, 8 + LTEXT "&Wartość zmiennej:", IDC_STATIC, 7, 32, 50, 8 EDITTEXT IDC_VARIABLE_VALUE, 75, 30, 145, 12, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 50, 50, 14 PUSHBUTTON "Anuluj", IDCANCEL, 170, 50, 50, 14 @@ -272,25 +274,25 @@ END STRINGTABLE DISCARDABLE BEGIN IDS_CPLSYSTEMNAME "System" - IDS_CPLSYSTEMDESCRIPTION "Wywietl informacje o swoim systemie komputerowym, zmie ustawienia dotyczce sprztu i wydajnoci" + IDS_CPLSYSTEMDESCRIPTION "Wyświetl informacje o swoim systemie komputerowym, zmień ustawienia dotyczące sprzętu i wydajności" IDS_MEGABYTE "MB RAM" IDS_GIGABYTE "GB RAM" IDS_TERABYTE "TB RAM" IDS_PETABYTE "PB RAM" IDS_VARIABLE "Zmienna" - IDS_VALUE "Warto" + IDS_VALUE "Wartość" IDS_NO_DUMP "(Brak)" - IDS_MINI_DUMP "Minimalny zrzut pamici(64KB)" - IDS_KERNEL_DUMP "Zrzut pamici kernela" - IDS_FULL_DUMP "Zrzut caej pamici" + IDS_MINI_DUMP "Minimalny zrzut pamięci(64KB)" + IDS_KERNEL_DUMP "Zrzut pamięci kernela" + IDS_FULL_DUMP "Zrzut całej pamięci" IDS_USERPROFILE_NAME "Nazwa" IDS_USERPROFILE_SIZE "Rozmiar" IDS_USERPROFILE_TYPE "Typ" IDS_USERPROFILE_STATUS "Stan" IDS_USERPROFILE_MODIFIED "Zmodyfikowano" - IDS_MESSAGEBOXTITLE "System control panel applet" - IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging file." - IDS_WARNMAXIMUMSIZE "Enter a numeric value for the maximum size of the paging file." - IDS_WARNINITIALRANGE "The initial size of the paging file must not be smaller than 2 MB and must not exceed the available space on the selected drive." - IDS_WARNMAXIMUMRANGE "The maximum size of the paging file must not be smaller than its initial size and must not exceed the available space on the selected drive." + IDS_MESSAGEBOXTITLE "System" + IDS_WARNINITIALSIZE "Wprowadź wielkość dla początkowego rozmiaru pliku stronicowania." + IDS_WARNMAXIMUMSIZE "Wprowadź wielkość dla maksymalnego rozmiaru pliku stronicowania." + IDS_WARNINITIALRANGE "Początkowy rozmiar pliku stronicowania nie może być mniejszy niż 2MB i nie może przekraczać dostępnej ilości miejsca w wybranym napędzie." + IDS_WARNMAXIMUMRANGE "Maksymalny rozmiar pliku stronicowania nie może być mniejszy niż jego rozmiar początkowy i nie może przekraczać dostępnej ilości miejsca w wybranym napędzie." END diff --git a/dll/cpl/sysdm/lang/ro-RO.rc b/dll/cpl/sysdm/lang/ro-RO.rc index 26c61341a7f..63460dd0fb6 100644 --- a/dll/cpl/sysdm/lang/ro-RO.rc +++ b/dll/cpl/sysdm/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_PROPPAGEGENERAL DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generalități" @@ -290,5 +288,3 @@ BEGIN IDS_WARNINITIALRANGE "The initial size of the paging file must not be smaller than 2 MB and must not exceed the available space on the selected drive." IDS_WARNMAXIMUMRANGE "The maximum size of the paging file must not be smaller than its initial size and must not exceed the available space on the selected drive." END - -#pragma code_page(default) diff --git a/dll/cpl/sysdm/lang/ru-RU.rc b/dll/cpl/sysdm/lang/ru-RU.rc index 72ecb3cc417..236c55f0db0 100644 --- a/dll/cpl/sysdm/lang/ru-RU.rc +++ b/dll/cpl/sysdm/lang/ru-RU.rc @@ -2,45 +2,45 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGEGENERAL DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111 - LTEXT " :", IDC_STATIC, 4, 132, 87, 9 + LTEXT "Операционная система:", IDC_STATIC, 4, 132, 87, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 144, 116, 9 - LTEXT " ", IDC_STATIC, 10, 153, 25, 9 + LTEXT "Версия ", IDC_STATIC, 10, 153, 25, 9 LTEXT REACTOS_STR_PRODUCT_VERSION, IDC_STATIC, 35, 153, 91, 9 LTEXT REACTOS_STR_PRODUCT_BUILD, IDC_STATIC, 10, 162, 60, 9 - LTEXT ":", IDC_STATIC, 124, 132, 40, 9 + LTEXT "Компьютер:", IDC_STATIC, 124, 132, 40, 9 LTEXT "", IDC_MACHINELINE1, 130, 144, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 153, 118, 9 LTEXT "", IDC_MACHINELINE3, 130, 162, 118, 9 LTEXT "", IDC_MACHINELINE4, 130, 171, 118, 9 LTEXT "", IDC_MACHINELINE5, 130, 180, 118, 9 - CONTROL " ReactOS.", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 204, 220, 8 - PUSHBUTTON "&...", IDC_LICENCE, 170, 200, 78, 14 + CONTROL "Посетите домашнюю страницу ReactOS.", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 204, 220, 8 + PUSHBUTTON "&Лицензия...", IDC_LICENCE, 170, 200, 78, 14 END IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Оборудование" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", IDC_STATIC, 6, 7, 244, 61 + GROUPBOX "Диспетчер устройств", IDC_STATIC, 6, 7, 244, 61 ICON IDI_DEVMGR, IDC_STATIC, 12, 18, 23, 21, SS_ICON - LTEXT " .", IDC_STATIC, 42, 18, 204, 24 - PUSHBUTTON "& ...", IDC_HARDWARE_DEVICE_MANAGER, 144, 48, 100, 14 + LTEXT "Диспетчер устройств приводит список всего установленного оборудования на данном компьютере и позволяет изменить свойства любого устройства.", IDC_STATIC, 42, 18, 204, 24 + PUSHBUTTON "&Диспетчер устройств...", IDC_HARDWARE_DEVICE_MANAGER, 144, 48, 100, 14 - GROUPBOX " ", IDC_STATIC, 6, 79, 244, 61 + GROUPBOX "Мастер оборудования", IDC_STATIC, 6, 79, 244, 61 ICON IDI_DEVMGR, IDC_STATIC, 12, 90, 23, 21, SS_ICON - LTEXT " , , , .", IDC_STATIC, 42, 90, 204, 24 - PUSHBUTTON "& ...", IDC_HARDWARE_WIZARD, 144, 120, 100, 14 + LTEXT "Мастер оборудования помогает установить, востановить, отключить или извлечь любое устройство, а также настроить его.", IDC_STATIC, 42, 90, 204, 24 + PUSHBUTTON "&Мастер оборудования...", IDC_HARDWARE_WIZARD, 144, 120, 100, 14 - GROUPBOX " ", IDC_STATIC, 6, 149, 244, 61 + GROUPBOX "Профили оборудования", IDC_STATIC, 6, 149, 244, 61 ICON IDI_HARDPROF, IDC_STATIC, 12, 160, 23, 21, SS_ICON - LTEXT " .", IDC_STATIC, 42, 160, 204, 24 - PUSHBUTTON "& ...", IDC_HARDWARE_PROFILE, 144, 190, 100, 14 + LTEXT "Профили оборудования помогают устанавливать и хранить различные конфигурации оборудования.", IDC_STATIC, 42, 160, 204, 24 + PUSHBUTTON "&Профили оборудования...", IDC_HARDWARE_PROFILE, 144, 190, 100, 14 END IDD_SYSSETTINGS DIALOGEX 0, 0, 221, 106 @@ -56,205 +56,205 @@ END IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " .", IDC_STATIC, 12, 5, 253, 8 - GROUPBOX "", IDC_STATIC, 6, 18, 244, 50 - LTEXT " , , .", IDC_STATIC, 16, 29, 210, 20 - PUSHBUTTON "&", IDC_PERFOR, 194, 48, 50, 14 + LTEXT "Для изменения этих параметров требуются права Администратора.", IDC_STATIC, 12, 5, 253, 8 + GROUPBOX "Быстродействие", IDC_STATIC, 6, 18, 244, 50 + LTEXT "Визуальные эффекты, использование процессора, оперативной и виртуальной памяти.", IDC_STATIC, 16, 29, 210, 20 + PUSHBUTTON "&Параметры", IDC_PERFOR, 194, 48, 50, 14 - GROUPBOX " ", IDC_STATIC, 6,75,244,48 - LTEXT " , .", IDC_STATIC, 16, 88, 210, 20 - PUSHBUTTON "", IDC_USERPROFILE, 194, 103, 50, 14 + GROUPBOX "Профили пользователей", IDC_STATIC, 6,75,244,48 + LTEXT "Параметры рабочего стола, относящиеся ко входу в систему.", IDC_STATIC, 16, 88, 210, 20 + PUSHBUTTON "Параметры", IDC_USERPROFILE, 194, 103, 50, 14 - GROUPBOX " ", IDC_STATIC, 6, 131, 244, 52 - LTEXT " , .", IDC_STATIC, 16, 144, 210, 20 - PUSHBUTTON "&", IDC_STAREC, 194, 162, 50, 14 + GROUPBOX "Загрузка и восстановление", IDC_STATIC, 6, 131, 244, 52 + LTEXT "Загрузка и восстановление системы, отладочная информация.", IDC_STATIC, 16, 144, 210, 20 + PUSHBUTTON "&Параметры", IDC_STAREC, 194, 162, 50, 14 - PUSHBUTTON "& ", IDC_ENVVAR, 84, 192, 80, 14 - PUSHBUTTON " ", IDC_ERRORREPORT, 170, 192, 80, 14 + PUSHBUTTON "П&еременные среды", IDC_ENVVAR, 84, 192, 80, 14 + PUSHBUTTON "Отчет об ошибках", IDC_ERRORREPORT, 170, 192, 80, 14 END IDD_HARDWAREPROFILES DIALOGEX 6, 18, 254, 234 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Профили оборудования" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_HARDPROF, IDC_STATIC, 8, 11, 18, 20, SS_ICON - LTEXT " .", IDC_STATIC, 46, 11, 188, 25 - LTEXT " :", IDC_STATIC, 8, 41, 120, 8 + LTEXT "Можно создать несколько профилей для различных конфигураций оборудования и выбрать нужный при загрузке системы.", IDC_STATIC, 46, 11, 188, 25 + LTEXT "Доступные профили оборудования:", IDC_STATIC, 8, 41, 120, 8 LISTBOX IDC_HRDPROFLSTBOX, 8, 52, 215, 54, LBS_NOTIFY PUSHBUTTON "", IDC_HRDPROFUP, 232, 59, 15, 14, BS_ICON PUSHBUTTON "", IDC_HRDPROFDWN, 232, 79, 15, 14, BS_ICON - PUSHBUTTON "", IDC_HRDPROFPROP, 8, 106, 47, 14 - PUSHBUTTON "", IDC_HRDPROFCOPY, 60, 106, 47, 14 - PUSHBUTTON "", IDC_HRDPROFRENAME, 112, 106, 59, 14 - PUSHBUTTON "", IDC_HRDPROFDEL, 176, 106, 47, 14 + PUSHBUTTON "Свойства", IDC_HRDPROFPROP, 8, 106, 47, 14 + PUSHBUTTON "Копировать", IDC_HRDPROFCOPY, 60, 106, 47, 14 + PUSHBUTTON "Переименовать", IDC_HRDPROFRENAME, 112, 106, 59, 14 + PUSHBUTTON "Удалить", IDC_HRDPROFDEL, 176, 106, 47, 14 - GROUPBOX " ", IDC_STATIC, 7, 130, 240, 75 - LTEXT " ReactOS :", IDC_STATIC, 14, 142, 210, 8 - AUTORADIOBUTTON "& ", IDC_HRDPROFWAIT, 14, 158, 190, 8, WS_GROUP - AUTORADIOBUTTON "& , ", IDC_HRDPROFSELECT, 14, 173, 225, 8 - LTEXT ".", IDC_STATIC, 65, 187, 35, 8 + GROUPBOX "Выбор профиля оборудования", IDC_STATIC, 7, 130, 240, 75 + LTEXT "При загрузке ReactOS следует:", IDC_STATIC, 14, 142, 210, 8 + AUTORADIOBUTTON "&Дождаться явного указания от пользователя", IDC_HRDPROFWAIT, 14, 158, 190, 8, WS_GROUP + AUTORADIOBUTTON "&Выбрать первый профиль в списке, если выбор не сделан за", IDC_HRDPROFSELECT, 14, 173, 225, 8 + LTEXT "сек.", IDC_STATIC, 65, 187, 35, 8 EDITTEXT IDC_HRDPROFEDIT, 25, 185, 35, 12 CONTROL "", IDC_HRDPROFUPDWN, "msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 25, 185, 7, 10 DEFPUSHBUTTON "OK", IDOK, 143, 213, 50, 14 - PUSHBUTTON "", IDCANCEL, 197, 213, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 197, 213, 50, 14 END IDD_RENAMEPROFILE DIALOGEX 12, 26, 256, 52 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Переименовать профиль" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ":", IDC_STATIC, 5, 10, 20, 8 + LTEXT "ИЗ:", IDC_STATIC, 5, 10, 20, 8 LTEXT "", IDC_RENPROFEDITFROM, 30, 10, 160, 10 - LTEXT ":", IDC_STATIC, 5, 30, 20, 8 + LTEXT "в:", IDC_STATIC, 5, 30, 20, 8 EDITTEXT IDC_RENPROFEDITTO, 30, 30, 160, 12 DEFPUSHBUTTON "OK", IDOK, 199, 9, 50, 14 - PUSHBUTTON "", IDCANCEL, 199, 30, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 199, 30, 50, 14 END IDD_USERPROFILE DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Профили пользователей" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_USERPROF, IDC_STATIC, 6, 11, 16, 16, SS_ICON - LTEXT " , . .", + LTEXT "Профиль пользователя содержит настройки рабочего стола и другие сведения, используемые при входе в систему. Можно создать различные профили на разных компьютерах для одного пользователя или использовать один общий профиль.", IDC_STATIC, 40, 11, 204, 35 - LTEXT ", :", IDC_STATIC, 16, 51, 204, 9 + LTEXT "Профили, хранящиеся на этом компьютере:", IDC_STATIC, 16, 51, 204, 9 CONTROL "", IDC_USERPROFILE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 6, 66, 244, 85, WS_EX_CLIENTEDGE - PUSHBUTTON " ", IDC_USERPROFILE_CHANGE, 90, 156, 50, 14 - PUSHBUTTON "", IDC_USERPROFILE_DELETE, 145, 156, 50, 14 - PUSHBUTTON "", IDC_USERPROFILE_COPY, 200, 156, 50, 14 + PUSHBUTTON "Сменить тип", IDC_USERPROFILE_CHANGE, 90, 156, 50, 14 + PUSHBUTTON "Удалить", IDC_USERPROFILE_DELETE, 145, 156, 50, 14 + PUSHBUTTON "Копировать", IDC_USERPROFILE_COPY, 200, 156, 50, 14 - CONTROL " , .", IDC_USERACCOUNT_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 175, 204, 18 + CONTROL "Создайте новый профиль, используя Профили пользователей в Панели управления.", IDC_USERACCOUNT_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 175, 204, 18 DEFPUSHBUTTON "OK", IDOK, 134, 200, 54, 14 - PUSHBUTTON "", IDCANCEL, 196, 200, 54, 14 + PUSHBUTTON "Отмена", IDCANCEL, 196, 200, 54, 14 END IDD_STARTUPRECOVERY DIALOGEX 6, 18, 252, 280 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Загрузка и востановление" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", IDC_STATIC, 7, 12, 238, 95 - LTEXT " :", IDC_STATIC, 14, 26, 145, 8 + GROUPBOX "Загрузка операционной системы", IDC_STATIC, 7, 12, 238, 95 + LTEXT "Операционная система по умолчанию:", IDC_STATIC, 14, 26, 145, 8 COMBOBOX IDC_STRECOSCOMBO, 14, 37, 224, 46, CBS_DROPDOWNLIST - AUTOCHECKBOX "& :", IDC_STRECLIST, 14, 56, 161, 8 + AUTOCHECKBOX "О&тображать список операционных систем:", IDC_STRECLIST, 14, 56, 161, 8 EDITTEXT IDC_STRRECLISTEDIT, 179, 54, 30, 12, ES_NUMBER CONTROL "", IDC_STRRECLISTUPDWN, "msctls_updown32", UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 0, 0, 8, 13 - LTEXT "", IDC_STATIC, 213, 56, 25, 8 - AUTOCHECKBOX " & :", IDC_STRRECREC, 14, 70, 163, 8 + LTEXT "секунд", IDC_STATIC, 213, 56, 25, 8 + AUTOCHECKBOX "Отображать &варианты востановления:", IDC_STRRECREC, 14, 70, 163, 8 EDITTEXT IDC_STRRECRECEDIT, 179, 68, 30, 12, ES_NUMBER CONTROL "", IDC_STRRECRECUPDWN, "msctls_updown32", UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 0, 0, 8, 13 - LTEXT "", IDC_STATIC, 213, 70, 25, 8 - LTEXT " . """"", IDC_STATIC, 14, 90, 187, 8 - PUSHBUTTON "&", IDC_STRRECEDIT, 188, 87, 50, 14 + LTEXT "секунд", IDC_STATIC, 213, 70, 25, 8 + LTEXT "Для редактир. вручную нажмите ""Изменить""", IDC_STATIC, 14, 90, 187, 8 + PUSHBUTTON "&Изменить", IDC_STRRECEDIT, 188, 87, 50, 14 - GROUPBOX " ", IDC_STATIC, 7, 111, 238, 140 - AUTOCHECKBOX " &", IDC_STRRECWRITEEVENT, 14, 124, 154, 10 - AUTOCHECKBOX "& ", IDC_STRRECSENDALERT, 14, 138, 165, 10 - AUTOCHECKBOX " & ", IDC_STRRECRESTART, 14, 152, 160, 10 + GROUPBOX "Отказ системы", IDC_STATIC, 7, 111, 238, 140 + AUTOCHECKBOX "Записать событие в системный &журнал", IDC_STRRECWRITEEVENT, 14, 124, 154, 10 + AUTOCHECKBOX "&Отправить административное оповещение", IDC_STRRECSENDALERT, 14, 138, 165, 10 + AUTOCHECKBOX "Выполнить &автоматическую перезагрузку", IDC_STRRECRESTART, 14, 152, 160, 10 - GROUPBOX " ", IDC_STATIC, 12, 167, 227, 76 + GROUPBOX "Запись отладочной информации", IDC_STATIC, 12, 167, 227, 76 COMBOBOX IDC_STRRECDEBUGCOMBO, 17, 182, 151, 49, CBS_DROPDOWNLIST - LTEXT " :", IDC_STATIC, 17, 202, 150, 8 + LTEXT "Файл дампа памяти:", IDC_STATIC, 17, 202, 150, 8 EDITTEXT IDC_STRRECDUMPFILE, 17, 210, 153, 12 - AUTOCHECKBOX " & ", IDC_STRRECOVERWRITE, 17, 228, 145, 10 + AUTOCHECKBOX "Заменять &существующий файл дампа", IDC_STRRECOVERWRITE, 17, 228, 145, 10 DEFPUSHBUTTON "OK", IDOK, 141, 259, 50, 14 - PUSHBUTTON "", IDCANCEL, 195, 259, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 195, 259, 50, 14 END IDD_VIRTMEM DIALOGEX 6, 6, 223, 248 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Виртуальная память" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " [ ]", IDC_STATIC, 12, 5, 96, 9 - LTEXT " (MB)", IDC_STATIC, 115, 5, 96, 9 + LTEXT "Диск [метка тома]", IDC_STATIC, 12, 5, 96, 9 + LTEXT "Файл подкачки (MB)", IDC_STATIC, 115, 5, 96, 9 LISTBOX IDC_PAGEFILELIST, 10, 16, 204, 52, LBS_NOTIFY | LBS_USETABSTOPS - GROUPBOX " ", IDC_DRIVEGROUP, 10, 70, 204, 104 - LTEXT ":", IDC_STATIC, 20, 80, 20, 8 + GROUPBOX "Размер файла подкачки для выбранного диска", IDC_DRIVEGROUP, 10, 70, 204, 104 + LTEXT "Диск:", IDC_STATIC, 20, 80, 20, 8 LTEXT "", IDC_DRIVE, 88, 81, 100, 9 - LTEXT " :", IDC_STATIC, 20, 92, 183, 9 + LTEXT "Доступное пространство:", IDC_STATIC, 20, 92, 183, 9 LTEXT "", IDC_SPACEAVAIL, 154, 92, 104, 9 - LTEXT " (MB):", -1, 22, 118, 80, 9 - LTEXT " (MB):", -1, 22, 131, 98, 9 - AUTORADIOBUTTON "& ", IDC_CUSTOM, 20, 105, 65, 9, WS_GROUP - AUTORADIOBUTTON " ", IDC_SYSMANSIZE, 20, 145, 105, 9 - AUTORADIOBUTTON " ", IDC_NOPAGEFILE, 20, 158, 85, 9 + LTEXT "Исходный размер (MB):", -1, 22, 118, 80, 9 + LTEXT "Максимальный размер (MB):", -1, 22, 131, 98, 9 + AUTORADIOBUTTON "&Другой размер", IDC_CUSTOM, 20, 105, 65, 9, WS_GROUP + AUTORADIOBUTTON "Размер по выбору системы", IDC_SYSMANSIZE, 20, 145, 105, 9 + AUTORADIOBUTTON "Без файла подкачки", IDC_NOPAGEFILE, 20, 158, 85, 9 EDITTEXT IDC_INITIALSIZE, 120, 114, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE EDITTEXT IDC_MAXSIZE, 120, 129, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE - PUSHBUTTON "", IDC_SET, 158, 155, 50, 14 + PUSHBUTTON "Установить", IDC_SET, 158, 155, 50, 14 - GROUPBOX " ", IDC_TOTALGROUP, 10, 177, 204, 46 - LTEXT " :", IDC_STATIC, 18, 188, 120, 9 + GROUPBOX "Общий объем файла подкачки на всех дисках", IDC_TOTALGROUP, 10, 177, 204, 46 + LTEXT "Минимальный размер:", IDC_STATIC, 18, 188, 120, 9 LTEXT "", IDC_MINIMUM, 145, 188, 60, 9 - LTEXT ":", IDC_STATIC, 18, 199, 120, 9 + LTEXT "Рекомендуемый:", IDC_STATIC, 18, 199, 120, 9 LTEXT "", IDC_RECOMMENDED, 145, 197, 60, 9 - LTEXT " :", IDC_STATIC, 18, 210, 120, 9 + LTEXT "Текущий размер:", IDC_STATIC, 18, 210, 120, 9 LTEXT "", IDC_CURRENT, 145, 208, 60, 9 DEFPUSHBUTTON "OK", IDOK, 114, 232, 48, 14 - PUSHBUTTON "", IDCANCEL, 168, 232, 48, 14 + PUSHBUTTON "Отмена", IDCANCEL, 168, 232, 48, 14 END IDD_ENVIRONMENT_VARIABLES DIALOGEX 6, 18, 252, 245 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Перемнные среды" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", IDC_STATIC, 7, 12, 238, 100 + GROUPBOX "Переменные пользователя", IDC_STATIC, 7, 12, 238, 100 CONTROL "", IDC_USER_VARIABLE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 25, 224, 58, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", IDC_USER_VARIABLE_NEW, 80, 90, 50, 14 - PUSHBUTTON "&...", IDC_USER_VARIABLE_EDIT, 134, 90, 50, 14 - PUSHBUTTON "&", IDC_USER_VARIABLE_DELETE, 188, 90, 50, 14 - GROUPBOX " ", IDC_STATIC, 7, 116, 238, 100 + PUSHBUTTON "&Создать...", IDC_USER_VARIABLE_NEW, 80, 90, 50, 14 + PUSHBUTTON "&Изменить...", IDC_USER_VARIABLE_EDIT, 134, 90, 50, 14 + PUSHBUTTON "&Удалить", IDC_USER_VARIABLE_DELETE, 188, 90, 50, 14 + GROUPBOX "Системные переменные", IDC_STATIC, 7, 116, 238, 100 CONTROL "", IDC_SYSTEM_VARIABLE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 129, 224, 58, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", IDC_SYSTEM_VARIABLE_NEW, 80, 194, 50, 14 - PUSHBUTTON "&...", IDC_SYSTEM_VARIABLE_EDIT, 134, 194, 50, 14 - PUSHBUTTON "&", IDC_SYSTEM_VARIABLE_DELETE, 188, 194, 50, 14 + PUSHBUTTON "С&оздать...", IDC_SYSTEM_VARIABLE_NEW, 80, 194, 50, 14 + PUSHBUTTON "И&зменить...", IDC_SYSTEM_VARIABLE_EDIT, 134, 194, 50, 14 + PUSHBUTTON "У&далить", IDC_SYSTEM_VARIABLE_DELETE, 188, 194, 50, 14 DEFPUSHBUTTON "OK", IDOK, 141, 224, 50, 14, WS_GROUP - PUSHBUTTON "", IDCANCEL, 195, 224, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 195, 224, 50, 14 END IDD_EDIT_VARIABLE DIALOGEX 10, 15, 227, 71 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Изменение переменной" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "& :", IDC_STATIC, 7, 14, 50, 8 + LTEXT "Им&я переменной:", IDC_STATIC, 7, 14, 50, 8 EDITTEXT IDC_VARIABLE_NAME, 75, 12, 145, 12, ES_AUTOHSCROLL - LTEXT " &:", IDC_STATIC, 7, 32, 50, 8 + LTEXT "Значение перемен&ной:", IDC_STATIC, 7, 32, 50, 8 EDITTEXT IDC_VARIABLE_VALUE, 75, 30, 145, 12, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 50, 50, 14 - PUSHBUTTON "", IDCANCEL, 170, 50, 50, 14 + PUSHBUTTON "Отмена", IDCANCEL, 170, 50, 50, 14 END IDD_LICENCE DIALOGEX 6, 5, 267, 159 -CAPTION " " +CAPTION "Лицензионное соглашение" FONT 8, "MS Shell Dlg", 0, 0, 0x0 STYLE DS_SHELLFONT | WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU BEGIN @@ -265,23 +265,23 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_CPLSYSTEMNAME "" - IDS_CPLSYSTEMDESCRIPTION " ." - IDS_MEGABYTE " " - IDS_GIGABYTE " " - IDS_TERABYTE " " - IDS_PETABYTE " " - IDS_VARIABLE "" - IDS_VALUE "" - IDS_NO_DUMP "()" - IDS_MINI_DUMP " (64)" - IDS_KERNEL_DUMP " " - IDS_FULL_DUMP " " - IDS_USERPROFILE_NAME "" - IDS_USERPROFILE_SIZE "" - IDS_USERPROFILE_TYPE "" - IDS_USERPROFILE_STATUS "" - IDS_USERPROFILE_MODIFIED "" + IDS_CPLSYSTEMNAME "Система" + IDS_CPLSYSTEMDESCRIPTION "Просмотр информации о вашем компьютере и изменение различных системных и аппаратных параметров." + IDS_MEGABYTE "Мб ОЗУ" + IDS_GIGABYTE "Гб ОЗУ" + IDS_TERABYTE "Тб ОЗУ" + IDS_PETABYTE "Пб ОЗУ" + IDS_VARIABLE "Переменная" + IDS_VALUE "Значение" + IDS_NO_DUMP "(нет)" + IDS_MINI_DUMP "Малый дамп(64Кб)" + IDS_KERNEL_DUMP "Дамп ядра" + IDS_FULL_DUMP "Полный дамп" + IDS_USERPROFILE_NAME "Имя" + IDS_USERPROFILE_SIZE "Размер" + IDS_USERPROFILE_TYPE "Тип" + IDS_USERPROFILE_STATUS "Состояние" + IDS_USERPROFILE_MODIFIED "Изменен" IDS_MESSAGEBOXTITLE "System control panel applet" IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging file." IDS_WARNMAXIMUMSIZE "Enter a numeric value for the maximum size of the paging file." diff --git a/dll/cpl/sysdm/lang/uk-UA.rc b/dll/cpl/sysdm/lang/uk-UA.rc index 7d3e434e806..8901f465f0a 100644 --- a/dll/cpl/sysdm/lang/uk-UA.rc +++ b/dll/cpl/sysdm/lang/uk-UA.rc @@ -10,259 +10,259 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGEGENERAL DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", IDC_ROSIMG, "Static", SS_OWNERDRAW, 4, 5, 248, 111 - LTEXT " :", IDC_STATIC, 4, 132, 82, 9 + LTEXT "Операційна система:", IDC_STATIC, 4, 132, 82, 9 LTEXT REACTOS_STR_PRODUCT_NAME, IDC_STATIC, 10, 144, 116, 9 - LTEXT " ", IDC_STATIC, 10, 153, 25, 9 + LTEXT "Версія ", IDC_STATIC, 10, 153, 25, 9 LTEXT REACTOS_STR_PRODUCT_VERSION, IDC_STATIC, 35, 153, 91, 9 LTEXT REACTOS_STR_PRODUCT_BUILD, IDC_STATIC, 10, 162, 60, 9 - LTEXT "':", IDC_STATIC, 124, 132, 36, 9 + LTEXT "Комп'ютер:", IDC_STATIC, 124, 132, 36, 9 LTEXT "", IDC_MACHINELINE1, 130, 144, 118, 9 LTEXT "", IDC_MACHINELINE2, 130, 153, 118, 9 LTEXT "", IDC_MACHINELINE3, 130, 162, 118, 9 LTEXT "", IDC_MACHINELINE4, 130, 171, 118, 9 LTEXT "", IDC_MACHINELINE5, 130, 180, 118, 9 - CONTROL "³ ReactOS", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 200, 150, 8 - PUSHBUTTON "&˳...", IDC_LICENCE, 170, 199, 78, 14 + CONTROL "Відвідаєте домашню сторінку ReactOS", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 200, 150, 8 + PUSHBUTTON "&Ліцензія...", IDC_LICENCE, 170, 199, 78, 14 END IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Обладнання" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", IDC_STATIC, 6, 7, 244, 61 + GROUPBOX "Диспетчер пристроїв", IDC_STATIC, 6, 7, 244, 61 ICON IDI_DEVMGR, IDC_STATIC, 12, 18, 23, 21, SS_ICON - LTEXT " , '. - .", IDC_STATIC, 42, 18, 204, 24 - PUSHBUTTON "& ...", IDC_HARDWARE_DEVICE_MANAGER, 154, 48, 90, 14 + LTEXT "Диспетчер пристроїв перелічує все обладнання, установлене на цьому комп'ютері. За його допомогою можна змінити властивості будь-якого пристрою.", IDC_STATIC, 42, 18, 204, 24 + PUSHBUTTON "&Диспетчер пристроїв...", IDC_HARDWARE_DEVICE_MANAGER, 154, 48, 90, 14 - GROUPBOX " ", IDC_STATIC, 6, 79, 244, 61 + GROUPBOX "Установка обладнання", IDC_STATIC, 6, 79, 244, 61 ICON IDI_DEVMGR, IDC_STATIC, 12, 90, 23, 21, SS_ICON - LTEXT " , , , , .", IDC_STATIC, 42, 90, 204, 24 - PUSHBUTTON "& ...", IDC_HARDWARE_WIZARD, 154, 120, 90, 14 + LTEXT "Майстер установки обладнання допомагає установити, відключити, відновити, витягнути, та налаштувати ваше обладнання.", IDC_STATIC, 42, 90, 204, 24 + PUSHBUTTON "&Установка обладнання...", IDC_HARDWARE_WIZARD, 154, 120, 90, 14 - GROUPBOX " ", IDC_STATIC, 6, 149, 244, 61 + GROUPBOX "Профілі обладнання", IDC_STATIC, 6, 149, 244, 61 ICON IDI_HARDPROF, IDC_STATIC, 12, 160, 23, 21, SS_ICON - LTEXT " .", IDC_STATIC, 42, 160, 204, 24 - PUSHBUTTON "& ...", IDC_HARDWARE_PROFILE, 154, 190, 90, 14 + LTEXT "Профілі обладнання дають змогу установлювати й зберігати різні конфігурації обладнання.", IDC_STATIC, 42, 160, 204, 24 + PUSHBUTTON "&Профілі обладнання...", IDC_HARDWARE_PROFILE, 154, 190, 90, 14 END IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " , .", IDC_STATIC, 12, 5, 236, 8 - GROUPBOX "", IDC_STATIC, 6, 18, 244, 50 - LTEXT "³ , , '.", IDC_STATIC, 16, 29, 210, 17 - PUSHBUTTON "", IDC_PERFOR, 194, 48, 50, 14 + LTEXT "Потрібно мати права адміністратора, щоб виконати більшу частину цих змін.", IDC_STATIC, 12, 5, 236, 8 + GROUPBOX "Швидкодія", IDC_STATIC, 6, 18, 244, 50 + LTEXT "Візуальні ефекти, використання процесора, оперативної та віртуальної пам'яті.", IDC_STATIC, 16, 29, 210, 17 + PUSHBUTTON "Параметри", IDC_PERFOR, 194, 48, 50, 14 - GROUPBOX " ", IDC_STATIC, 6,75,244,48 - LTEXT " , .", IDC_STATIC, 16, 88, 210, 20 - PUSHBUTTON "", IDC_USERPROFILE, 194, 103, 50, 14 + GROUPBOX "Профілі користувачів", IDC_STATIC, 6,75,244,48 + LTEXT "Параметри робочого стола, які стосуються входу до системи.", IDC_STATIC, 16, 88, 210, 20 + PUSHBUTTON "Параметри", IDC_USERPROFILE, 194, 103, 50, 14 - GROUPBOX " ", IDC_STATIC, 6, 131, 244, 52 - LTEXT " , .", IDC_STATIC, 16, 144, 210, 19 - PUSHBUTTON "", IDC_STAREC, 194, 162, 50, 14 + GROUPBOX "Завантаження й відновлення", IDC_STATIC, 6, 131, 244, 52 + LTEXT "Завантаження й відновлення системи, налагоджувальна інформація.", IDC_STATIC, 16, 144, 210, 19 + PUSHBUTTON "Параметри", IDC_STAREC, 194, 162, 50, 14 - PUSHBUTTON " ", IDC_SYSSETTINGS, 2, 192, 80, 15 - PUSHBUTTON " ", IDC_ENVVAR, 84, 192, 80, 14 - PUSHBUTTON " ", IDC_ERRORREPORT, 170, 192, 80, 14 + PUSHBUTTON "Налаштування системи", IDC_SYSSETTINGS, 2, 192, 80, 15 + PUSHBUTTON "Змінні оточення", IDC_ENVVAR, 84, 192, 80, 14 + PUSHBUTTON "Звіт про помилки", IDC_ERRORREPORT, 170, 192, 80, 14 END IDD_SYSSETTINGS DIALOGEX 0, 0, 221, 106 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Налаштування системи" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX " ",IDC_STATIC,6,3,210,73 - CONTROL " ",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,118,10 - LTEXT "ReactOS , . , .",IDC_STATIC,15,15,183,41 + GROUPBOX "Інформація про версію",IDC_STATIC,6,3,210,73 + CONTROL "Позначити як робочу станцію",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,118,10 + LTEXT "ReactOS повудована як серверна ОС, і так само про себе повідомляє. Обрати прапорець, щоб змінити це лише для програм.",IDC_STATIC,15,15,183,41 PUSHBUTTON "OK",IDOK,166,83,50,14 END IDD_HARDWAREPROFILES DIALOGEX 6, 18, 254, 234 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Профілі обладнання" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_HARDPROF, IDC_STATIC, 8, 11, 18, 20, SS_ICON - LTEXT " .", IDC_STATIC, 46, 11, 188, 25 - LTEXT " :", IDC_STATIC, 8, 41, 120, 8 + LTEXT "Можна створити декілька профілів для різних конфігурацій устаткування й вибирати потрібний профіль під час завантаження системи.", IDC_STATIC, 46, 11, 188, 25 + LTEXT "Наявні профілі обладнання:", IDC_STATIC, 8, 41, 120, 8 LISTBOX IDC_HRDPROFLSTBOX, 8, 52, 215, 54, LBS_NOTIFY PUSHBUTTON "", IDC_HRDPROFUP, 232, 59, 15, 14, BS_ICON PUSHBUTTON "", IDC_HRDPROFDWN, 232, 79, 15, 14, BS_ICON - PUSHBUTTON "&", IDC_HRDPROFPROP, 8, 106, 50, 14 - PUSHBUTTON "&", IDC_HRDPROFCOPY, 63, 106, 50, 14 - PUSHBUTTON "&", IDC_HRDPROFRENAME, 116, 106, 54, 14 - PUSHBUTTON "&", IDC_HRDPROFDEL, 173, 106, 50, 14 + PUSHBUTTON "В&ластивості", IDC_HRDPROFPROP, 8, 106, 50, 14 + PUSHBUTTON "&Копіювати", IDC_HRDPROFCOPY, 63, 106, 50, 14 + PUSHBUTTON "Переі&менувати", IDC_HRDPROFRENAME, 116, 106, 54, 14 + PUSHBUTTON "В&идалити", IDC_HRDPROFDEL, 173, 106, 50, 14 - GROUPBOX " ", IDC_STATIC, 7, 130, 240, 75 - LTEXT "ϳ ReactOS :", IDC_STATIC, 14, 142, 210, 8 - AUTORADIOBUTTON ", & ", IDC_HRDPROFWAIT, 14, 158, 185, 8, WS_GROUP - AUTORADIOBUTTON "& , ", IDC_HRDPROFSELECT, 14, 173, 230, 8 - LTEXT "", IDC_STATIC, 65, 187, 35, 8 + GROUPBOX "Вибір профілю устаткування", IDC_STATIC, 7, 130, 240, 75 + LTEXT "Під час завантаження ReactOS слід:", IDC_STATIC, 14, 142, 210, 8 + AUTORADIOBUTTON "зачекати, п&оки користувач не вибере профіль", IDC_HRDPROFWAIT, 14, 158, 185, 8, WS_GROUP + AUTORADIOBUTTON "ви&брати перший профіль у списку, якщо вибір не зроблено за", IDC_HRDPROFSELECT, 14, 173, 230, 8 + LTEXT "сек", IDC_STATIC, 65, 187, 35, 8 EDITTEXT IDC_HRDPROFEDIT, 25, 185, 35, 12 CONTROL "", IDC_HRDPROFUPDWN, "msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 25, 185, 7, 10 DEFPUSHBUTTON "OK", IDOK, 143, 213, 50, 14 - PUSHBUTTON "", IDCANCEL, 197, 213, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 197, 213, 50, 14 END IDD_RENAMEPROFILE DIALOGEX 12, 26, 256, 52 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Перейменування профілю" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ":", IDC_STATIC, 5, 10, 20, 8 + LTEXT "З:", IDC_STATIC, 5, 10, 20, 8 LTEXT "", IDC_RENPROFEDITFROM, 30, 10, 160, 10 - LTEXT ":", IDC_STATIC, 5, 30, 20, 8 + LTEXT "На:", IDC_STATIC, 5, 30, 20, 8 EDITTEXT IDC_RENPROFEDITTO, 30, 30, 160, 12 DEFPUSHBUTTON "OK", IDOK, 196, 6, 50, 14 - PUSHBUTTON "", IDCANCEL, 196, 24, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 196, 24, 50, 14 END IDD_USERPROFILE DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Профілі користувачів" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_USERPROF, IDC_STATIC, 6, 11, 16, 16, SS_ICON - LTEXT " . ', , '.", + LTEXT "Профілі користувачів містять параметри робочого стола та інші відомості стосовно облікових записів користувачів. Ви можете створити окремі профілі для кожного з комп'ютерів, на яких ви працюєте, або використовувати один спільний профіль для всіх комп'ютерів.", IDC_STATIC, 40, 11, 204, 39 - LTEXT ", ':", IDC_STATIC, 16, 51, 204, 9 + LTEXT "Профілі, які зберігаються на цьому комп'ютері:", IDC_STATIC, 16, 51, 204, 9 CONTROL "", IDC_USERPROFILE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 6, 66, 244, 85, WS_EX_CLIENTEDGE - PUSHBUTTON " ", IDC_USERPROFILE_CHANGE, 90, 156, 50, 14 - PUSHBUTTON "", IDC_USERPROFILE_DELETE, 145, 156, 50, 14 - PUSHBUTTON "...", IDC_USERPROFILE_COPY, 200, 156, 50, 14 + PUSHBUTTON "Змінити тип", IDC_USERPROFILE_CHANGE, 90, 156, 50, 14 + PUSHBUTTON "Видалити", IDC_USERPROFILE_DELETE, 145, 156, 50, 14 + PUSHBUTTON "Копіювати...", IDC_USERPROFILE_COPY, 200, 156, 50, 14 - CONTROL " .", IDC_USERACCOUNT_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 175, 204, 18 + CONTROL "Для створення нового профілю відкрийте Профілі користувачів в Панелі керування.", IDC_USERACCOUNT_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 175, 204, 18 DEFPUSHBUTTON "OK", IDOK, 134, 200, 54, 14 - PUSHBUTTON "", IDCANCEL, 196, 200, 54, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 196, 200, 54, 14 END IDD_STARTUPRECOVERY DIALOGEX 6, 18, 252, 280 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Завантаження й відновлення" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", IDC_STATIC, 7, 12, 238, 95 - LTEXT "& :", IDC_STATIC, 14, 26, 100, 8 + GROUPBOX "Завантаження операційної системи", IDC_STATIC, 7, 12, 238, 95 + LTEXT "&Операційна система за замовчуванням:", IDC_STATIC, 14, 26, 100, 8 COMBOBOX IDC_STRECOSCOMBO, 14, 37, 224, 46, CBS_DROPDOWNLIST - AUTOCHECKBOX "& :", IDC_STRECLIST, 14, 56, 150, 8 + AUTOCHECKBOX "&Показувати список операційних систем:", IDC_STRECLIST, 14, 56, 150, 8 EDITTEXT IDC_STRRECLISTEDIT, 179, 54, 30, 12, ES_NUMBER CONTROL "", IDC_STRRECLISTUPDWN, "msctls_updown32", UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 0, 0, 8, 13 - LTEXT "", IDC_STATIC, 215, 56, 25, 8 - AUTOCHECKBOX "& :", IDC_STRRECREC, 14, 70, 163, 8 + LTEXT "сек", IDC_STATIC, 215, 56, 25, 8 + AUTOCHECKBOX "По&казувати варіанти відновлення:", IDC_STRRECREC, 14, 70, 163, 8 EDITTEXT IDC_STRRECRECEDIT, 179, 68, 30, 12, ES_NUMBER CONTROL "", IDC_STRRECRECUPDWN, "msctls_updown32", UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | WS_CHILD | WS_VISIBLE, 0, 0, 8, 13 - LTEXT "", IDC_STATIC, 215, 70, 25, 8 - LTEXT "³ .", IDC_STATIC, 14, 89, 187, 8 - PUSHBUTTON "&", IDC_STRRECEDIT, 188, 87, 50, 14 + LTEXT "сек", IDC_STATIC, 215, 70, 25, 8 + LTEXT "Відредагувати список завантаження вручну.", IDC_STATIC, 14, 89, 187, 8 + PUSHBUTTON "&Змінити", IDC_STRRECEDIT, 188, 87, 50, 14 - GROUPBOX "³ ", IDC_STATIC, 7, 111, 238, 140 - AUTOCHECKBOX " &", IDC_STRRECWRITEEVENT, 14, 124, 148, 10 - AUTOCHECKBOX "& ", IDC_STRRECSENDALERT, 14, 138, 148, 10 - AUTOCHECKBOX "& ", IDC_STRRECRESTART, 14, 152, 145, 10 + GROUPBOX "Відмова системи", IDC_STATIC, 7, 111, 238, 140 + AUTOCHECKBOX "Записати подію до системного &журналу", IDC_STRRECWRITEEVENT, 14, 124, 148, 10 + AUTOCHECKBOX "&Надіслати адміністративне оповіщення", IDC_STRRECSENDALERT, 14, 138, 148, 10 + AUTOCHECKBOX "&Автоматичне перезавантаження", IDC_STRRECRESTART, 14, 152, 145, 10 - GROUPBOX " ", IDC_STATIC, 12, 167, 227, 76 + GROUPBOX "Записати налагоджувальну інформацію", IDC_STATIC, 12, 167, 227, 76 COMBOBOX IDC_STRRECDEBUGCOMBO, 17, 182, 151, 49, CBS_DROPDOWNLIST - LTEXT "& ':", IDC_STATIC, 17, 202, 150, 8 + LTEXT "&Файл дампа пам'яті:", IDC_STATIC, 17, 202, 150, 8 EDITTEXT IDC_STRRECDUMPFILE, 17, 210, 153, 12 - AUTOCHECKBOX "& ", IDC_STRRECOVERWRITE, 17, 228, 125, 10 + AUTOCHECKBOX "За&мінювати наявний файл", IDC_STRRECOVERWRITE, 17, 228, 125, 10 DEFPUSHBUTTON "OK", IDOK, 141, 259, 50, 14 - PUSHBUTTON "", IDCANCEL, 195, 259, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 195, 259, 50, 14 END IDD_VIRTMEM DIALOGEX 6, 6, 223, 248 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "³ '" +CAPTION "Віртуальна пам'ять" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " [ ]", IDC_STATIC, 12, 5, 96, 9 - LTEXT " ()", IDC_STATIC, 115, 5, 96, 9 + LTEXT "Диск [мітка тому]", IDC_STATIC, 12, 5, 96, 9 + LTEXT "Файл довантаження (МБ)", IDC_STATIC, 115, 5, 96, 9 LISTBOX IDC_PAGEFILELIST, 10, 16, 204, 52, LBS_NOTIFY | LBS_USETABSTOPS - GROUPBOX " ", IDC_DRIVEGROUP, 10, 70, 204, 104 - LTEXT ":", IDC_STATIC, 20, 80, 20, 8 + GROUPBOX "Розмір файлу довантаження для вибраного диска", IDC_DRIVEGROUP, 10, 70, 204, 104 + LTEXT "Диск:", IDC_STATIC, 20, 80, 20, 8 LTEXT "", IDC_DRIVE, 88, 81, 100, 9 - LTEXT ":", IDC_STATIC, 20, 92, 56, 9 + LTEXT "Доступно:", IDC_STATIC, 20, 92, 56, 9 LTEXT "", IDC_SPACEAVAIL, 88, 92, 104, 9 - LTEXT "& ():", -1, 22, 118, 75, 9 - LTEXT "& ():", -1, 22, 131, 92, 9 - AUTORADIOBUTTON "& ", IDC_CUSTOM, 20, 105, 79, 9, WS_GROUP - AUTORADIOBUTTON "&, ", IDC_SYSMANSIZE, 20, 145, 143, 9 - AUTORADIOBUTTON "& ", IDC_NOPAGEFILE, 20, 158, 103,9 + LTEXT "&Вихідний розмір (МБ):", -1, 22, 118, 75, 9 + LTEXT "&Максимальний розмір (МБ):", -1, 22, 131, 92, 9 + AUTORADIOBUTTON "&Особливий розмір", IDC_CUSTOM, 20, 105, 79, 9, WS_GROUP + AUTORADIOBUTTON "&Розмір, установлюваний системою", IDC_SYSMANSIZE, 20, 145, 143, 9 + AUTORADIOBUTTON "&Без файлу довантаження", IDC_NOPAGEFILE, 20, 158, 103,9 EDITTEXT IDC_INITIALSIZE, 115, 114, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE EDITTEXT IDC_MAXSIZE, 115, 129, 44, 13, NOT WS_BORDER, WS_EX_CLIENTEDGE - PUSHBUTTON "", IDC_SET, 158, 155, 50, 14 + PUSHBUTTON "Установити", IDC_SET, 158, 155, 50, 14 - GROUPBOX " ", IDC_TOTALGROUP, 10, 177, 204, 46 - LTEXT "̳ :", IDC_STATIC, 18, 188, 88, 9 + GROUPBOX "Загальний розмір файлу довантаження для всіх дисків", IDC_TOTALGROUP, 10, 177, 204, 46 + LTEXT "Мінімальний розмір:", IDC_STATIC, 18, 188, 88, 9 LTEXT "", IDC_MINIMUM, 93, 188, 100, 9 - LTEXT ":", IDC_STATIC, 18, 199, 55, 9 + LTEXT "Рекомендовано:", IDC_STATIC, 18, 199, 55, 9 LTEXT "", IDC_RECOMMENDED, 93, 199, 100, 9 - LTEXT " :", IDC_STATIC, 18, 210, 66, 9 + LTEXT "Поточний розмір:", IDC_STATIC, 18, 210, 66, 9 LTEXT "", IDC_CURRENT, 93, 210, 100, 9 DEFPUSHBUTTON "OK", IDOK, 114, 232, 48, 14 - PUSHBUTTON "", IDCANCEL, 168, 232, 48, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 168, 232, 48, 14 END IDD_ENVIRONMENT_VARIABLES DIALOGEX 6, 18, 252, 245 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Змінні оточення" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", IDC_STATIC, 7, 12, 238, 100 + GROUPBOX "Змінні користувача", IDC_STATIC, 7, 12, 238, 100 CONTROL "", IDC_USER_VARIABLE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 25, 224, 58, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", IDC_USER_VARIABLE_NEW, 80, 90, 50, 14 - PUSHBUTTON "&...", IDC_USER_VARIABLE_EDIT, 134, 90, 50, 14 - PUSHBUTTON "&", IDC_USER_VARIABLE_DELETE, 188, 90, 50, 14 - GROUPBOX " ", IDC_STATIC, 7, 116, 238, 100 + PUSHBUTTON "&Створити...", IDC_USER_VARIABLE_NEW, 80, 90, 50, 14 + PUSHBUTTON "&Змінити...", IDC_USER_VARIABLE_EDIT, 134, 90, 50, 14 + PUSHBUTTON "В&идалити", IDC_USER_VARIABLE_DELETE, 188, 90, 50, 14 + GROUPBOX "Системні змінні", IDC_STATIC, 7, 116, 238, 100 CONTROL "", IDC_SYSTEM_VARIABLE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 14, 129, 224, 58, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", IDC_SYSTEM_VARIABLE_NEW, 80, 194, 50, 14 - PUSHBUTTON "&...", IDC_SYSTEM_VARIABLE_EDIT, 134, 194, 50, 14 - PUSHBUTTON "&", IDC_SYSTEM_VARIABLE_DELETE, 188, 194, 50, 14 + PUSHBUTTON "&Створити...", IDC_SYSTEM_VARIABLE_NEW, 80, 194, 50, 14 + PUSHBUTTON "&Змінити...", IDC_SYSTEM_VARIABLE_EDIT, 134, 194, 50, 14 + PUSHBUTTON "В&идалити", IDC_SYSTEM_VARIABLE_DELETE, 188, 194, 50, 14 DEFPUSHBUTTON "OK", IDOK, 141, 224, 50, 14, WS_GROUP - PUSHBUTTON "", IDCANCEL, 195, 224, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 195, 224, 50, 14 END IDD_EDIT_VARIABLE DIALOGEX 10, 15, 227, 71 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Редагування змінної" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&' :", IDC_STATIC, 7, 14, 50, 8 + LTEXT "&Ім'я змінної:", IDC_STATIC, 7, 14, 50, 8 EDITTEXT IDC_VARIABLE_NAME, 75, 12, 145, 12, ES_AUTOHSCROLL - LTEXT "& :", IDC_STATIC, 7, 32, 87, 8 + LTEXT "&Значення змінної:", IDC_STATIC, 7, 32, 87, 8 EDITTEXT IDC_VARIABLE_VALUE, 75, 30, 145, 12, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", IDOK, 116, 50, 50, 14 - PUSHBUTTON "", IDCANCEL, 170, 50, 50, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 170, 50, 50, 14 END IDD_LICENCE DIALOGEX 6, 5, 267, 159 -CAPTION "˳ " +CAPTION "Ліцензійна угода" FONT 8, "MS Shell Dlg", 0, 0, 0x0 STYLE DS_SHELLFONT | WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU BEGIN @@ -273,27 +273,27 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_CPLSYSTEMNAME "" - IDS_CPLSYSTEMDESCRIPTION " ' , 䳿, ." - IDS_MEGABYTE " " - IDS_GIGABYTE " " - IDS_TERABYTE " " - IDS_PETABYTE " " - IDS_VARIABLE "" - IDS_VALUE "" - IDS_NO_DUMP "()" - IDS_MINI_DUMP "̳(64)" - IDS_KERNEL_DUMP " " - IDS_FULL_DUMP " " - IDS_USERPROFILE_NAME "'" - IDS_USERPROFILE_SIZE "" - IDS_USERPROFILE_TYPE "" - IDS_USERPROFILE_STATUS "" - IDS_USERPROFILE_MODIFIED "" + IDS_CPLSYSTEMNAME "Система" + IDS_CPLSYSTEMDESCRIPTION "Перегляд відомостей про систему комп'ютера та зміна параметрів обладнання, швидкодії, автоматичних оновлень." + IDS_MEGABYTE "Мб ОЗП" + IDS_GIGABYTE "Гб ОЗП" + IDS_TERABYTE "Тб ОЗП" + IDS_PETABYTE "Пб ОЗП" + IDS_VARIABLE "Змінна" + IDS_VALUE "Значення" + IDS_NO_DUMP "(немає)" + IDS_MINI_DUMP "Мінідамп(64Кб)" + IDS_KERNEL_DUMP "Дамп ядра" + IDS_FULL_DUMP "Повний дамп" + IDS_USERPROFILE_NAME "Ім'я" + IDS_USERPROFILE_SIZE "Розмір" + IDS_USERPROFILE_TYPE "Тип" + IDS_USERPROFILE_STATUS "Стан" + IDS_USERPROFILE_MODIFIED "Змінено" IDS_MESSAGEBOXTITLE "System control panel applet" - IDS_WARNINITIALSIZE " ." - IDS_WARNMAXIMUMSIZE " ." - IDS_WARNINITIALRANGE " 2 ' ." - IDS_WARNMAXIMUMRANGE " ' ." - IDS_DEVS "\nReactOS Team\n\nProject Coordinator\n\nAleksey Bragin\n\nDevelopment Team\n\nAleksey Bragin\nAndrew Greenwood\nAndrey Korotaev\nArt Yerkes\nChristoph von Wittich\nColin Finck\nDaniel Reimer\nDmitry Chapyshev\nEric Kohl\nGed Murphy\nGregor Brunmar\nHerv Poussineau\nJames Tabor\nJeffrey Morlan\nJohannes Anderwald\nKJK::Hyperion\nMaarten Bosma\nMagnus Olsen\nMarc Piulachs\nMatthias Kupfer\nMike Nordell\nPeter Ward\nPierre Schweitzer\nSaveliy Tretiakov\nStefan Ginsberg\nSylvain Petreolle\nThomas Blmel\nTimo Kreuzer \n\nAlex Ionescu\nFilip Navara\nGunnar Dalsnes\nMartin Fuchs\nRoyce Mitchell III\nBrandon Turner\nBrian Palmer\nCasper Hornstrup\nDavid Welch\nEmanuele Aliberti\nG van Geldorp\nGregor Anich\nJason Filby\nJens Collin\nMichael Wirth\nNathan Woods\nRobert Dickenson\nRex Jolliff\nVizzini \n\nRelease Engineers\n\nColin Finck\nZ98\n\nWebsite Team\n\nColin Finck\nJaix Bly\nKlemens Friedl\nZ98\n\nMedia Team\n\nMindflyer\nWierd_W\n\nfurther thanks go to\n\nall Contributers\nWine Team\n\n" + IDS_WARNINITIALSIZE "Введіть числове значення для початкового розміру файлу довантаження." + IDS_WARNMAXIMUMSIZE "Введіть числове значення для максимального розміру файлу довантаження." + IDS_WARNINITIALRANGE "Початковий розмір файлу довантаження не повинен бути меншим 2 Мб і не повинен перевищувати об'єм вільного місця на обраному диску." + IDS_WARNMAXIMUMRANGE "Максимальний розмір файлу довантаження не повинен бути меншим від початкового та не повинен перевищувати об'єм вільного місця на обраному диску." + IDS_DEVS "\nReactOS Team\n\nProject Coordinator\n\nAleksey Bragin\n\nDevelopment Team\n\nAleksey Bragin\nAndrew Greenwood\nAndrey Korotaev\nArt Yerkes\nChristoph von Wittich\nColin Finck\nDaniel Reimer\nDmitry Chapyshev\nEric Kohl\nGed Murphy\nGregor Brunmar\nHervé Poussineau\nJames Tabor\nJeffrey Morlan\nJohannes Anderwald\nKJK::Hyperion\nMaarten Bosma\nMagnus Olsen\nMarc Piulachs\nMatthias Kupfer\nMike Nordell\nPeter Ward\nPierre Schweitzer\nSaveliy Tretiakov\nStefan Ginsberg\nSylvain Petreolle\nThomas Blümel\nTimo Kreuzer \n\nAlex Ionescu\nFilip Navara\nGunnar Dalsnes\nMartin Fuchs\nRoyce Mitchell III\nBrandon Turner\nBrian Palmer\nCasper Hornstrup\nDavid Welch\nEmanuele Aliberti\nGé van Geldorp\nGregor Anich\nJason Filby\nJens Collin\nMichael Wirth\nNathan Woods\nRobert Dickenson\nRex Jolliff\nVizzini \n\nRelease Engineers\n\nColin Finck\nZ98\n\nWebsite Team\n\nColin Finck\nJaix Bly\nKlemens Friedl\nZ98\n\nMedia Team\n\nMindflyer\nWierd_W\n\nfurther thanks go to\n\nall Contributers\nWine Team\n\n" END diff --git a/dll/cpl/sysdm/licence.c b/dll/cpl/sysdm/licence.c index a1a799c70c3..8dfe6cf1b15 100644 --- a/dll/cpl/sysdm/licence.c +++ b/dll/cpl/sysdm/licence.c @@ -54,7 +54,7 @@ OnInitDialog(HWND hDlg, PLIC_CONTEXT pLicInfo) EM_SETSEL, -1, 0); - + PostMessage(GetDlgItem(hDlg, IDC_LICENCEEDIT), WM_VSCROLL, SB_TOP, 0); return TRUE; } diff --git a/dll/cpl/sysdm/precomp.h b/dll/cpl/sysdm/precomp.h index cf3afd6f62a..f3b20cfbc57 100644 --- a/dll/cpl/sysdm/precomp.h +++ b/dll/cpl/sysdm/precomp.h @@ -49,11 +49,11 @@ INT_PTR CALLBACK LicenceDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l typedef struct _PAGEFILE { - TCHAR szDrive[3]; - INT InitialSize; - INT MaximumSize; - INT FreeSize; - BOOL bUsed; + TCHAR szDrive[3]; + UINT InitialSize; + UINT MaximumSize; + UINT FreeSize; + BOOL bUsed; } PAGEFILE, *PPAGEFILE; typedef struct _VIRTMEM diff --git a/dll/cpl/sysdm/rsrc.rc b/dll/cpl/sysdm/rsrc.rc index ee3e6ff485e..2542bb47c7b 100644 --- a/dll/cpl/sysdm/rsrc.rc +++ b/dll/cpl/sysdm/rsrc.rc @@ -12,13 +12,16 @@ #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" +#include "lang/sv-SE.rc" +#include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" -#include "lang/sv-SE.rc" #include "lang/uk-UA.rc" -#include "lang/zh-CN.rc" /* #include "lang/da-DK.rc" diff --git a/dll/cpl/sysdm/virtmem.c b/dll/cpl/sysdm/virtmem.c index c09b6e40dcf..648b1c41f7c 100644 --- a/dll/cpl/sysdm/virtmem.c +++ b/dll/cpl/sysdm/virtmem.c @@ -206,8 +206,7 @@ WritePageFileSettings(PVIRTMEM pVirtMem) HKEY hk = NULL; TCHAR szPagingFiles[2048]; TCHAR szText[256]; - INT i; - INT nPos = 0; + INT i, nPos = 0; BOOL bErr = TRUE; for (i = 0; i < pVirtMem->Count; ++i) @@ -312,7 +311,7 @@ OnSet(PVIRTMEM pVirtMem) LB_GETCURSEL, 0, 0); - if (Index < pVirtMem->Count) + if (Index >= 0 && Index < pVirtMem->Count) { /* check if custom settings are checked */ if (IsDlgButtonChecked(pVirtMem->hSelf, @@ -463,8 +462,8 @@ OnSelChange(HWND hwndDlg, PVIRTMEM pVirtMem) if (GetDiskFreeSpaceEx(pVirtMem->Pagefile[Index].szDrive, NULL, NULL, &FreeBytes)) { - pVirtMem->Pagefile[Index].FreeSize = FreeBytes.QuadPart >> 20; - _stprintf(szBuffer, _T("%I64u MB"), FreeBytes.QuadPart / (1024 * 1024)); + pVirtMem->Pagefile[Index].FreeSize = (UINT)(FreeBytes.QuadPart / (1024 * 1024)); + _stprintf(szBuffer, _T("%I64u MB"), pVirtMem->Pagefile[Index].FreeSize); SetDlgItemText(hwndDlg, IDC_SPACEAVAIL, szBuffer); } diff --git a/dll/cpl/telephon/lang/pl-PL.rc b/dll/cpl/telephon/lang/pl-PL.rc index 021eecb8830..ff518f7514c 100644 --- a/dll/cpl/telephon/lang/pl-PL.rc +++ b/dll/cpl/telephon/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Jan,2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan,2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,5 +11,5 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Opcje telefonu i modemu" - IDS_CPLSYSTEMDESCRIPTION "Skonfiguruj reguy wybierania numerw oraz ustawienia modemu." + IDS_CPLSYSTEMDESCRIPTION "Skonfiguruj reguły wybierania numerów oraz ustawienia modemu." END diff --git a/dll/cpl/telephon/lang/ro-RO.rc b/dll/cpl/telephon/lang/ro-RO.rc index ae4a013dafc..a81b9ac9ee6 100644 --- a/dll/cpl/telephon/lang/ro-RO.rc +++ b/dll/cpl/telephon/lang/ro-RO.rc @@ -1,11 +1,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Opțiuni telefon și modem" IDS_CPLSYSTEMDESCRIPTION "Configurează regulile de apelare telefonică și setările pentru modem." END - -#pragma code_page(default) diff --git a/dll/cpl/telephon/lang/ru-RU.rc b/dll/cpl/telephon/lang/ru-RU.rc index 8d3255b5603..c53bf01618d 100644 --- a/dll/cpl/telephon/lang/ru-RU.rc +++ b/dll/cpl/telephon/lang/ru-RU.rc @@ -2,6 +2,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " ." + IDS_CPLSYSTEMNAME "Телефон и модем" + IDS_CPLSYSTEMDESCRIPTION "Настройка правил набора номера и других параметров при работе с модемом." END diff --git a/dll/cpl/telephon/lang/uk-UA.rc b/dll/cpl/telephon/lang/uk-UA.rc index 31715fe51a9..ba04a999e43 100644 --- a/dll/cpl/telephon/lang/uk-UA.rc +++ b/dll/cpl/telephon/lang/uk-UA.rc @@ -10,6 +10,6 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME " " - IDS_CPLSYSTEMDESCRIPTION " ." + IDS_CPLSYSTEMNAME "Телефон і модем" + IDS_CPLSYSTEMDESCRIPTION "Настройка правил набору номера та інших параметрів модема." END diff --git a/dll/cpl/telephon/rsrc.rc b/dll/cpl/telephon/rsrc.rc index 1f531b2c9cf..fdf7c3ffeb3 100644 --- a/dll/cpl/telephon/rsrc.rc +++ b/dll/cpl/telephon/rsrc.rc @@ -11,8 +11,11 @@ #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/dll/cpl/timedate/lang/pl-PL.rc b/dll/cpl/timedate/lang/pl-PL.rc index b5b5363a290..562bba58a0c 100644 --- a/dll/cpl/timedate/lang/pl-PL.rc +++ b/dll/cpl/timedate/lang/pl-PL.rc @@ -1,11 +1,12 @@ -// Polish translation by Sebastian Gasiorek /* -* update by xrogers (13.04.2007) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -* -* update by Caemyr - Olaf Siejka (Jan, 2008) -*/ + * translated by Sebastian Gasiorek + * updated by xrogers (13.04.2007) + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * updated by Caemyr - Olaf Siejka (Jan, 2008) + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146 @@ -40,7 +41,7 @@ BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE - AUTOCHECKBOX "&Automatycznie uwzgldnij zmiany czasu", + AUTOCHECKBOX "&Automatycznie uwzględnij zmiany czasu", IDC_AUTODAYLIGHT, 6, 132, 242, 11, WS_VISIBLE | WS_GROUP | WS_TABSTOP END @@ -57,19 +58,19 @@ BEGIN PUSHBUTTON "&Aktualizuj teraz", IDC_UPDATEBUTTON, 187, 22, 49, 14 LTEXT "", IDC_SUCSYNC, 16, 54, 214, 23 LTEXT "", IDC_NEXTSYNC, 12, 96, 137, 12 - LTEXT "Synchronizacja moe nastpi tylko wtedy, gdy komputer jest podczony do Internetu.", -1, 12, 114, 225, 25 + LTEXT "Synchronizacja może nastąpić tylko wtedy, gdy komputer jest podłączony do Internetu.", -1, 12, 114, 225, 25 END STRINGTABLE BEGIN IDS_CPLNAME "Data/Godzina" - IDS_CPLDESCRIPTION "Ustaw dat, godzin i stref czasow komputera." + IDS_CPLDESCRIPTION "Ustaw datę, godzinę i strefę czasową komputera." IDS_TIMEZONETEXT "Aktualna strefa czasowa: %s" - IDS_TIMEZONEINVALID "Nieprawidowa" + IDS_TIMEZONEINVALID "Nieprawidłowa" IDS_TIMEZONEUNKNOWN "Nieznana" - IDS_INETTIMESUCSYNC "Zegar zosta pomylnie zsynchronizowany z %s w dniu %s o %s" - IDS_INETTIMENEXTSYNC "Nastpna synchronizacja w dniu %s o %s" - IDS_INETTIMESYNCING "Prosz czeka, gdy ReactOS zsynchronizuje czas z %s" - IDS_INETTIMEERROR "Wystpi bd podczas gdy ReactOS synchronizowa czas z %s" + IDS_INETTIMESUCSYNC "Zegar został pomyślnie zsynchronizowany z %s w dniu %s o %s" + IDS_INETTIMENEXTSYNC "Następna synchronizacja w dniu %s o %s" + IDS_INETTIMESYNCING "Proszę czekać, gdy ReactOS zsynchronizuje czas z %s" + IDS_INETTIMEERROR "Wystąpił błąd podczas próby synchronizacji czasu z %s" END diff --git a/dll/cpl/timedate/lang/ro-RO.rc b/dll/cpl/timedate/lang/ro-RO.rc index c5311390e25..fb523a8c87a 100644 --- a/dll/cpl/timedate/lang/ro-RO.rc +++ b/dll/cpl/timedate/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Dată și timp" @@ -68,5 +66,3 @@ BEGIN IDS_INETTIMESYNCING "Așteptași cât ReactOS se sincronizează cu %s" IDS_INETTIMEERROR "A apărut o eroare cât timp ReactOS se sincroniza cu %s" END - -#pragma code_page(default) diff --git a/dll/cpl/timedate/lang/ru-RU.rc b/dll/cpl/timedate/lang/ru-RU.rc index 63d508a8492..0b9b80ba0b6 100644 --- a/dll/cpl/timedate/lang/ru-RU.rc +++ b/dll/cpl/timedate/lang/ru-RU.rc @@ -2,10 +2,10 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Дата и время" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "&", -1, 4, 2, 122, 125 + GROUPBOX "&Дата", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_LEFT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | @@ -14,7 +14,7 @@ BEGIN CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 11, 37, 108, 80, WS_EX_CLIENTEDGE - GROUPBOX "&", -1, 132, 2, 113, 125 + GROUPBOX "&Время", -1, 132, 2, 113, 125 CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 144, 105, 90, 12 @@ -26,42 +26,42 @@ END IDD_TIMEZONEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Часовой пояс" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE - AUTOCHECKBOX "& ", + AUTOCHECKBOX "Автомати&ческий переход на летнее время и обратно", IDC_AUTODAYLIGHT, 6, 132, 242, 11, WS_VISIBLE | WS_GROUP | WS_TABSTOP END IDD_INETTIMEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Время через Интернет" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_SERVERLIST, 65, 22, 117, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - AUTOCHECKBOX "& ", IDC_AUTOSYNC, + AUTOCHECKBOX "&Выполнять синхронизацию с сервером времени в Интернете", IDC_AUTOSYNC, 11 ,7, 246, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - LTEXT ":", IDC_SERVERTEXT, 34, 22, 28, 13 - PUSHBUTTON "&", IDC_UPDATEBUTTON, 187, 22, 49, 13 + LTEXT "Сервер:", IDC_SERVERTEXT, 34, 22, 28, 13 + PUSHBUTTON "&Обновить", IDC_UPDATEBUTTON, 187, 22, 49, 13 LTEXT "", IDC_SUCSYNC, 16, 54, 214, 23 LTEXT "", IDC_NEXTSYNC, 12, 96, 137, 12 - LTEXT " .", -1, 12, 114, 225, 25 + LTEXT "Синхронизация может быть выполнена только при наличии подключения к сети Интернет.", -1, 12, 114, 225, 25 END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " , " - IDS_TIMEZONETEXT " : %s" - IDS_TIMEZONEINVALID "" - IDS_TIMEZONEUNKNOWN "" - IDS_INETTIMESUCSYNC " %s %s %s" - IDS_INETTIMENEXTSYNC " : %s %s" - IDS_INETTIMESYNCING ", %s" - IDS_INETTIMEERROR " %s" + IDS_CPLNAME "Дата и время" + IDS_CPLDESCRIPTION "Установка даты, времени и часового пояса для этого компьютера" + IDS_TIMEZONETEXT "Текущий часовой пояс: %s" + IDS_TIMEZONEINVALID "Недействительная" + IDS_TIMEZONEUNKNOWN "Неизвестная" + IDS_INETTIMESUCSYNC "Время было успешно синхронизировано с %s на %s в %s" + IDS_INETTIMENEXTSYNC "Следующая синхронизация через: %s в %s" + IDS_INETTIMESYNCING "Подождите, пока РеактОС синхронизирует время с %s" + IDS_INETTIMEERROR "Возникла ошибка во время синхронизации с %s" END diff --git a/dll/cpl/timedate/lang/uk-UA.rc b/dll/cpl/timedate/lang/uk-UA.rc index b1f33aaf8ae..da3d43985e4 100644 --- a/dll/cpl/timedate/lang/uk-UA.rc +++ b/dll/cpl/timedate/lang/uk-UA.rc @@ -10,10 +10,10 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Дата й час" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "&", -1, 4, 2, 122, 125 + GROUPBOX "&Дата", -1, 4, 2, 122, 125 COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_LEFT | WS_GROUP | ES_READONLY CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | @@ -23,7 +23,7 @@ BEGIN CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 11, 37, 108, 80, WS_EX_CLIENTEDGE - GROUPBOX "&", -1, 132, 2, 113, 125 + GROUPBOX "&Час", -1, 132, 2, 113, 125 CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 144, 105, 90, 12 @@ -35,42 +35,42 @@ END IDD_TIMEZONEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Часовий пояс" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE - AUTOCHECKBOX "& / ", + AUTOCHECKBOX "Автомати&чне переведення годинника на літний/зимовий час", IDC_AUTODAYLIGHT, 6, 132, 242, 11, WS_VISIBLE | WS_GROUP | WS_TABSTOP END IDD_INETTIMEPAGE DIALOGEX 0, 0, 252, 146 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Час Інтернету" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_SERVERLIST, 65, 22, 117, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - AUTOCHECKBOX " ", IDC_AUTOSYNC, + AUTOCHECKBOX "Автоматично синхронізувати з сервером часу в Інтернеті", IDC_AUTOSYNC, 11 ,7, 241, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - LTEXT ":", IDC_SERVERTEXT, 34, 22, 28, 13 - PUSHBUTTON "", IDC_UPDATEBUTTON, 187, 22, 49, 14 + LTEXT "Сервер:", IDC_SERVERTEXT, 34, 22, 28, 13 + PUSHBUTTON "Оновити", IDC_UPDATEBUTTON, 187, 22, 49, 14 LTEXT "", IDC_SUCSYNC, 12, 54, 214, 23 LTEXT "", IDC_NEXTSYNC, 12, 96, 137, 12 - LTEXT " , ' .", -1, 12, 114, 225, 25 + LTEXT "Синхронізація можлива, лише коли комп'ютер підключений до Інтернету.", -1, 12, 114, 225, 25 END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " , '." - IDS_TIMEZONETEXT " : %s" - IDS_TIMEZONEINVALID "" - IDS_TIMEZONEUNKNOWN "" - IDS_INETTIMESUCSYNC " %s %s %s" - IDS_INETTIMENEXTSYNC " : %s %s" - IDS_INETTIMESYNCING " , ReactOS %s" - IDS_INETTIMEERROR " %s" + IDS_CPLNAME "Дата й час" + IDS_CPLDESCRIPTION "Установлення дати, часу й часового поясу для цього комп'ютера." + IDS_TIMEZONETEXT "Поточний часовий пояс: %s" + IDS_TIMEZONEINVALID "Недійсний" + IDS_TIMEZONEUNKNOWN "Невідомий" + IDS_INETTIMESUCSYNC "Час було успішно синхронізовано з %s на %s в %s" + IDS_INETTIMENEXTSYNC "Наступна синхронізація: %s в %s" + IDS_INETTIMESYNCING "Будь ласка зачекайте, поки ReactOS синхронізує час з %s" + IDS_INETTIMEERROR "Помилка під час синхронізації з %s" END diff --git a/dll/cpl/timedate/rsrc.rc b/dll/cpl/timedate/rsrc.rc index f726f79d7d8..3855b76d051 100644 --- a/dll/cpl/timedate/rsrc.rc +++ b/dll/cpl/timedate/rsrc.rc @@ -16,10 +16,13 @@ #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/cpl/usrmgr/lang/pl-PL.rc b/dll/cpl/usrmgr/lang/pl-PL.rc index cf349ab053b..6d851dc85be 100644 --- a/dll/cpl/usrmgr/lang/pl-PL.rc +++ b/dll/cpl/usrmgr/lang/pl-PL.rc @@ -1,10 +1,19 @@ +/* + * translated by Caemyr - Olaf Siejka (Jun,2008) + * updated by Saibamen - Adam Stachowicz (Jul, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT /* Dialogs */ IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Uytkownicy" +CAPTION "Użytkownicy" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_USERS_LIST, "SysListView32", LVS_REPORT | LVS_EDITLABELS | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, @@ -27,38 +36,38 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Dodatki" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Przestrze celowo pozostawiona pusta", IDC_STATIC, 66, 90, 112, 8 + LTEXT "Przestrzeń celowo pozostawiona pusta", IDC_STATIC, 66, 90, 112, 8 END IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_USER_GENERAL_NAME, 7, 12, 112, 8 - LTEXT "Imi i nazwisko:", -1, 7, 46, 63, 8 + LTEXT "Imię i Nazwisko:", -1, 7, 46, 63, 8 EDITTEXT IDC_USER_GENERAL_FULL_NAME,77,43,168,13,ES_AUTOHSCROLL LTEXT "Opis:", -1, 7, 64, 63, 8 EDITTEXT IDC_USER_GENERAL_DESCRIPTION,77,61,168,13,ES_AUTOHSCROLL - AUTOCHECKBOX "Uytkownik musi zmieni haso podczas pierwszego logowania",IDC_USER_GENERAL_FORCE_CHANGE,7,82,210,10 - AUTOCHECKBOX "Uytkownik nie moe zmieni hasa",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10 - AUTOCHECKBOX "Haso nigdy nie wygasa",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10 - AUTOCHECKBOX "Konto jest wyczone",IDC_USER_GENERAL_DISABLED,7,121,210,10 + AUTOCHECKBOX "Użytkownik musi zmienić hasło podczas pierwszego logowania",IDC_USER_GENERAL_FORCE_CHANGE,7,82,210,10 + AUTOCHECKBOX "Użytkownik nie może zmienić hasła",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10 + AUTOCHECKBOX "Hasło nigdy nie wygasa",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10 + AUTOCHECKBOX "Konto jest wyłączone",IDC_USER_GENERAL_DISABLED,7,121,210,10 AUTOCHECKBOX "Konto jest zablokowane",IDC_USER_GENERAL_LOCKED,7,134,210,10 END IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Czonkostwo" +CAPTION "Członkostwo" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Naley do:", -1, 7, 7, 56, 8 + LTEXT "Należy do:", -1, 7, 7, 56, 8 CONTROL "", IDC_USER_MEMBERSHIP_LIST, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 18, 238, 173, WS_EX_CLIENTEDGE PUSHBUTTON "Dodaj...", IDC_USER_MEMBERSHIP_ADD, 7, 197, 50, 14 - PUSHBUTTON "Usu", IDC_USER_MEMBERSHIP_REMOVE, 61, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Usuń", IDC_USER_MEMBERSHIP_REMOVE, 61, 197, 50, 14, WS_DISABLED END @@ -67,15 +76,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Profil" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Profil uytkownika", -1, 7, 7, 238, 54 - LTEXT "cieka profilu:", -1, 16, 22, 55, 8 + GROUPBOX "Profil użytkownika", -1, 7, 7, 238, 54 + LTEXT "Ścieżka profilu:", -1, 16, 22, 55, 8 EDITTEXT IDC_USER_PROFILE_PATH, 78, 19, 160, 13, ES_AUTOHSCROLL LTEXT "Skrypt logowania:", -1, 16, 40, 55, 8 EDITTEXT IDC_USER_PROFILE_SCRIPT, 78, 37, 160, 13, ES_AUTOHSCROLL GROUPBOX "Katalog domowy", -1, 7, 68, 238, 54 - AUTORADIOBUTTON "cieka lokalna:", IDC_USER_PROFILE_LOCAL, 16, 83, 60, 10 - AUTORADIOBUTTON "Pocz:", IDC_USER_PROFILE_REMOTE, 16, 100, 60, 10 + AUTORADIOBUTTON "Ścieżka lokalna:", IDC_USER_PROFILE_LOCAL, 16, 83, 60, 10 + AUTORADIOBUTTON "Połącz:", IDC_USER_PROFILE_REMOTE, 16, 100, 60, 10 EDITTEXT IDC_USER_PROFILE_LOCAL_PATH, 78, 81, 160, 13, ES_AUTOHSCROLL COMBOBOX IDC_USER_PROFILE_DRIVE, 78, 99, 26, 160, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL LTEXT "z:", -1, 112, 101, 12, 8 @@ -85,29 +94,29 @@ END IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_GROUP_GENERAL_NAME, 7, 12, 112, 8 LTEXT "Opis:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL - LTEXT "Czonkowie:", -1, 7, 63, 45, 8 + LTEXT "Członkowie:", -1, 7, 63, 45, 8 CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Dodaj...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14, WS_DISABLED - PUSHBUTTON "Usu", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Usuń", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "Zmiana hasa" +CAPTION "Zmiana hasła" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_EDIT_PASSWORD1,107,7,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT "Nowe haso:", -1,7,10,96,8 + RTEXT "Nowe hasło:", -1,7,10,96,8 EDITTEXT IDC_EDIT_PASSWORD2,107,25,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT "Powtrz haso:", -1,7,28,96,8 + RTEXT "Powtórz hasło:", -1,7,28,96,8 DEFPUSHBUTTON "OK",IDOK,156,53,50,14 PUSHBUTTON "Anuluj",IDCANCEL,210,53,50,14 END @@ -115,22 +124,22 @@ END IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "Nowy uytkownik" +CAPTION "Nowy użytkownik" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_USER_NEW_NAME,107,7,153,14,ES_AUTOHSCROLL - RTEXT "Nazwa uytkownika:", -1,7,10,96,8 + RTEXT "Nazwa użytkownika:", -1,7,10,96,8 EDITTEXT IDC_USER_NEW_FULL_NAME,107,25,153,14,ES_AUTOHSCROLL - RTEXT "Imi i nazwisko:", -1,7,28,96,8 + RTEXT "Imię i Nazwisko:", -1,7,28,96,8 EDITTEXT IDC_USER_NEW_DESCRIPTION,107,43,153,14,ES_AUTOHSCROLL RTEXT "Opis:", -1,7,46,96,8 EDITTEXT IDC_USER_NEW_PASSWORD1,107,67,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT "Haso:", -1,7,70,96,8 + RTEXT "Hasło:", -1,7,70,96,8 EDITTEXT IDC_USER_NEW_PASSWORD2,107,85,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT "Powtrz haso:", -1,7,88,96,8 - AUTOCHECKBOX "Uytkownik musi zmieni haso podczas pierwszego logowania",IDC_USER_NEW_FORCE_CHANGE,7,109,200,10 - AUTOCHECKBOX "Uytkownik nie moe zmieni hasa",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED - AUTOCHECKBOX "Haso nigdy nie wygasa",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED + RTEXT "Powtórz hasło:", -1,7,88,96,8 + AUTOCHECKBOX "Użytkownik musi zmienić hasło podczas pierwszego logowania",IDC_USER_NEW_FORCE_CHANGE,7,109,200,10 + AUTOCHECKBOX "Użytkownik nie może zmienić hasła",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED + AUTOCHECKBOX "Hasło nigdy nie wygasa",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED AUTOCHECKBOX "Konto jest zablokowane",IDC_USER_NEW_DISABLED,7,151,200,10 DEFPUSHBUTTON "OK",IDOK,156,179,50,14,WS_DISABLED PUSHBUTTON "Anuluj",IDCANCEL,210,179,50,14 @@ -153,10 +162,10 @@ END IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION "Przynaleno do grup" +CAPTION "Przynależność do grup" FONT 8, "MS Shell Dlg" BEGIN -LTEXT "Naley do:", -1, 7, 7, 56, 8 +LTEXT "Należy do:", -1, 7, 7, 56, 8 CONTROL "", IDC_USER_ADD_MEMBERSHIP_LIST, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 18, 238, 173, WS_EX_CLIENTEDGE DEFPUSHBUTTON "OK",IDOK,156,197,50,14 @@ -175,12 +184,12 @@ BEGIN END POPUP "" BEGIN - MENUITEM "Dodaj czonka grupy", IDM_GROUP_ADD_MEMBER, GRAYED + MENUITEM "Dodaj członka grupy", IDM_GROUP_ADD_MEMBER, GRAYED MENUITEM SEPARATOR - MENUITEM "Usu", IDM_GROUP_DELETE - MENUITEM "Zmie nazw", IDM_GROUP_RENAME + MENUITEM "Usuń", IDM_GROUP_DELETE + MENUITEM "Zmień nazwę", IDM_GROUP_RENAME MENUITEM SEPARATOR - MENUITEM "Waciwoci", IDM_GROUP_PROPERTIES + MENUITEM "Właściwości", IDM_GROUP_PROPERTIES END END @@ -189,16 +198,16 @@ IDM_POPUP_USER MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "Nowy uytkownik...", IDM_USER_NEW + MENUITEM "Nowy użytkownik...", IDM_USER_NEW END POPUP "" BEGIN - MENUITEM "Zmie haso", IDM_USER_CHANGE_PASSWORD + MENUITEM "Zmień hasło", IDM_USER_CHANGE_PASSWORD MENUITEM SEPARATOR - MENUITEM "Usu", IDM_USER_DELETE - MENUITEM "Zmie nazw", IDM_USER_RENAME + MENUITEM "Usuń", IDM_USER_DELETE + MENUITEM "Zmień nazwę", IDM_USER_RENAME MENUITEM SEPARATOR - MENUITEM "Waciwoci", IDM_USER_PROPERTIES + MENUITEM "Właściwości", IDM_USER_PROPERTIES END END @@ -207,13 +216,13 @@ END STRINGTABLE BEGIN - IDS_CPLNAME "Konta uytkownikw" - IDS_CPLDESCRIPTION "Zarzdzanie uytkownikami i grupami." + IDS_CPLNAME "Konta użytkowników" + IDS_CPLDESCRIPTION "Zarządzanie użytkownikami i grupami." END STRINGTABLE BEGIN IDS_NAME "Nazwa" - IDS_FULLNAME "Imi i nazwisko" + IDS_FULLNAME "Imię i Nazwisko" IDS_DESCRIPTION "Opis" END diff --git a/dll/cpl/usrmgr/lang/ru-RU.rc b/dll/cpl/usrmgr/lang/ru-RU.rc index aaede5b8428..5448bc2264b 100644 --- a/dll/cpl/usrmgr/lang/ru-RU.rc +++ b/dll/cpl/usrmgr/lang/ru-RU.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Пользователи" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_USERS_LIST, "SysListView32", LVS_REPORT | LVS_EDITLABELS | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, @@ -19,7 +19,7 @@ END IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Группы" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_GROUPS_LIST, "SysListView32", LVS_REPORT | LVS_EDITLABELS | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, @@ -29,130 +29,130 @@ END IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_STATIC, 66, 90, 112, 8 + LTEXT "Это место преднамерено осталено чистым", IDC_STATIC, 66, 90, 112, 8 END IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_USER_GENERAL_NAME, 7, 12, 112, 8 - LTEXT " :", -1, 7, 46, 63, 8 + LTEXT "Полное имя:", -1, 7, 46, 63, 8 EDITTEXT IDC_USER_GENERAL_FULL_NAME,77,43,168,13,ES_AUTOHSCROLL - LTEXT ":", -1, 7, 64, 63, 8 + LTEXT "Описание:", -1, 7, 64, 63, 8 EDITTEXT IDC_USER_GENERAL_DESCRIPTION,77,61,168,13,ES_AUTOHSCROLL - AUTOCHECKBOX " ",IDC_USER_GENERAL_FORCE_CHANGE,7,82,230,10 - AUTOCHECKBOX " ",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10 - AUTOCHECKBOX " ",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10 - AUTOCHECKBOX " ",IDC_USER_GENERAL_DISABLED,7,121,210,10 - AUTOCHECKBOX " ",IDC_USER_GENERAL_LOCKED,7,134,210,10 + AUTOCHECKBOX "Потребовать смену пароля при следующем входе в систему",IDC_USER_GENERAL_FORCE_CHANGE,7,82,230,10 + AUTOCHECKBOX "Запретить смену пароля пользователем",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10 + AUTOCHECKBOX "Срок действия пароля не ограничен",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10 + AUTOCHECKBOX "Отключить учётную запись",IDC_USER_GENERAL_DISABLED,7,121,210,10 + AUTOCHECKBOX "Заблокировать учётную запись",IDC_USER_GENERAL_LOCKED,7,134,210,10 END IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Членство в группах" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 7, 7, 56, 8 + LTEXT "Член групп:", -1, 7, 7, 56, 8 CONTROL "", IDC_USER_MEMBERSHIP_LIST, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 18, 238, 173, WS_EX_CLIENTEDGE - PUSHBUTTON "...", IDC_USER_MEMBERSHIP_ADD, 7, 197, 50, 14, WS_DISABLED - PUSHBUTTON "", IDC_USER_MEMBERSHIP_REMOVE, 61, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Добавить...", IDC_USER_MEMBERSHIP_ADD, 7, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Удалить", IDC_USER_MEMBERSHIP_REMOVE, 61, 197, 50, 14, WS_DISABLED END IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Профиль" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 7, 7, 238, 54 - LTEXT " :", -1, 16, 22, 80, 8 + GROUPBOX "Профиль пользователя", -1, 7, 7, 238, 54 + LTEXT "Путь к профилю:", -1, 16, 22, 80, 8 EDITTEXT IDC_USER_PROFILE_PATH, 88, 19, 150, 13, ES_AUTOHSCROLL - LTEXT " :", -1, 16, 40, 80, 8 + LTEXT "Сценарий входа:", -1, 16, 40, 80, 8 EDITTEXT IDC_USER_PROFILE_SCRIPT, 88, 37, 150, 13, ES_AUTOHSCROLL - GROUPBOX " ", -1, 7, 68, 238, 54 - AUTORADIOBUTTON " :", IDC_USER_PROFILE_LOCAL, 16, 83, 80, 10 - AUTORADIOBUTTON ":", IDC_USER_PROFILE_REMOTE, 16, 100, 60, 10 + GROUPBOX "Домашняя папка", -1, 7, 68, 238, 54 + AUTORADIOBUTTON "Локальный путь:", IDC_USER_PROFILE_LOCAL, 16, 83, 80, 10 + AUTORADIOBUTTON "Подключить:", IDC_USER_PROFILE_REMOTE, 16, 100, 60, 10 EDITTEXT IDC_USER_PROFILE_LOCAL_PATH, 88, 81, 150, 13, ES_AUTOHSCROLL COMBOBOX IDC_USER_PROFILE_DRIVE, 78, 99, 26, 153, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT ":", -1, 112, 101, 12, 8 + LTEXT "на:", -1, 112, 101, 12, 8 EDITTEXT IDC_USER_PROFILE_REMOTE_PATH, 130, 99, 108, 13, ES_AUTOHSCROLL END IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_GROUP_GENERAL_NAME, 7, 12, 112, 8 - LTEXT ":", -1, 7, 45, 46, 8 + LTEXT "Описание:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL - LTEXT " :", -1, 7, 63, 45, 8 + LTEXT "Члены группы:", -1, 7, 63, 45, 8 CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE - PUSHBUTTON "...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14, WS_DISABLED - PUSHBUTTON "", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Добавить...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Удалить", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION " " +CAPTION "Установка пароля" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_EDIT_PASSWORD1,107,7,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT " :", -1,7,10,96,8 + RTEXT "Новый пароль:", -1,7,10,96,8 EDITTEXT IDC_EDIT_PASSWORD2,107,25,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT ":", -1,7,28,96,8 - DEFPUSHBUTTON "",IDOK,156,53,50,14 - PUSHBUTTON "",IDCANCEL,210,53,50,14 + RTEXT "Подтверждение:", -1,7,28,96,8 + DEFPUSHBUTTON "ОК",IDOK,156,53,50,14 + PUSHBUTTON "Отмена",IDCANCEL,210,53,50,14 END IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION " " +CAPTION "Новый пользователь" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_USER_NEW_NAME,107,7,153,14,ES_AUTOHSCROLL - RTEXT " :", -1,7,10,96,8 + RTEXT "Имя пользователя:", -1,7,10,96,8 EDITTEXT IDC_USER_NEW_FULL_NAME,107,25,153,14,ES_AUTOHSCROLL - RTEXT " :", -1,7,28,96,8 + RTEXT "Полное имя пользователя:", -1,7,28,96,8 EDITTEXT IDC_USER_NEW_DESCRIPTION,107,43,153,14,ES_AUTOHSCROLL - RTEXT ":", -1,7,46,96,8 + RTEXT "Описание:", -1,7,46,96,8 EDITTEXT IDC_USER_NEW_PASSWORD1,107,67,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT ":", -1,7,70,96,8 + RTEXT "Пароль:", -1,7,70,96,8 EDITTEXT IDC_USER_NEW_PASSWORD2,107,85,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT ":", -1,7,88,96,8 - AUTOCHECKBOX " ",IDC_USER_NEW_FORCE_CHANGE,7,109,200,10 - AUTOCHECKBOX " ",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED - AUTOCHECKBOX " ",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED - AUTOCHECKBOX " ",IDC_USER_NEW_DISABLED,7,151,200,10 + RTEXT "Подтвердите:", -1,7,88,96,8 + AUTOCHECKBOX "Потребовать смену пароля при следующем входе в систему",IDC_USER_NEW_FORCE_CHANGE,7,109,200,10 + AUTOCHECKBOX "Запретить смену пароля пользователем",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED + AUTOCHECKBOX "Срок действия пароля не ограничен",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED + AUTOCHECKBOX "Отключить учётную запись",IDC_USER_NEW_DISABLED,7,151,200,10 DEFPUSHBUTTON "OK",IDOK,156,179,50,14,WS_DISABLED - PUSHBUTTON "",IDCANCEL,210,179,50,14 + PUSHBUTTON "Отмена",IDCANCEL,210,179,50,14 END IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION " " +CAPTION "Новая группа" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_GROUP_NEW_NAME,107,7,153,14,ES_AUTOHSCROLL - RTEXT " :", -1,7,10,96,8 + RTEXT "Имя группы:", -1,7,10,96,8 EDITTEXT IDC_GROUP_NEW_DESCRIPTION,107,25,153,14,ES_AUTOHSCROLL - RTEXT ":", -1,7,28,96,8 + RTEXT "Описание:", -1,7,28,96,8 DEFPUSHBUTTON "OK",IDOK,156,53,50,14,WS_DISABLED - PUSHBUTTON "",IDCANCEL,210,53,50,14 + PUSHBUTTON "Отмена",IDCANCEL,210,53,50,14 END @@ -162,16 +162,16 @@ IDM_POPUP_GROUP MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM " ...", IDM_GROUP_NEW + MENUITEM "Создать группу...", IDM_GROUP_NEW END POPUP "" BEGIN - MENUITEM " ...", IDM_GROUP_ADD_MEMBER, GRAYED + MENUITEM "Добавить в группу...", IDM_GROUP_ADD_MEMBER, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDM_GROUP_DELETE - MENUITEM "", IDM_GROUP_RENAME + MENUITEM "Удалить", IDM_GROUP_DELETE + MENUITEM "Переименовать", IDM_GROUP_RENAME MENUITEM SEPARATOR - MENUITEM "", IDM_GROUP_PROPERTIES + MENUITEM "Свойства", IDM_GROUP_PROPERTIES END END @@ -180,16 +180,16 @@ IDM_POPUP_USER MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM " ...", IDM_USER_NEW + MENUITEM "Новый пользователь...", IDM_USER_NEW END POPUP "" BEGIN - MENUITEM " ...", IDM_USER_CHANGE_PASSWORD + MENUITEM "Задать пароль...", IDM_USER_CHANGE_PASSWORD MENUITEM SEPARATOR - MENUITEM "", IDM_USER_DELETE - MENUITEM "", IDM_USER_RENAME + MENUITEM "Удалить", IDM_USER_DELETE + MENUITEM "Переименовать", IDM_USER_RENAME MENUITEM SEPARATOR - MENUITEM "", IDM_USER_PROPERTIES + MENUITEM "Свойства", IDM_USER_PROPERTIES END END @@ -198,13 +198,13 @@ END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " ." + IDS_CPLNAME "Учётные записи пользователей" + IDS_CPLDESCRIPTION "Управление пользователями и группами." END STRINGTABLE BEGIN - IDS_NAME "" - IDS_FULLNAME " " - IDS_DESCRIPTION "" + IDS_NAME "Имя" + IDS_FULLNAME "Полное имя" + IDS_DESCRIPTION "Описание" END diff --git a/dll/cpl/usrmgr/lang/uk-UA.rc b/dll/cpl/usrmgr/lang/uk-UA.rc index 36c118c9b1d..25851627589 100644 --- a/dll/cpl/usrmgr/lang/uk-UA.rc +++ b/dll/cpl/usrmgr/lang/uk-UA.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Користувачі" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_USERS_LIST, "SysListView32", LVS_REPORT | LVS_EDITLABELS | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, @@ -19,7 +19,7 @@ END IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Групи" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_GROUPS_LIST, "SysListView32", LVS_REPORT | LVS_EDITLABELS | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, @@ -29,143 +29,143 @@ END IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ", IDC_STATIC, 66, 90, 112, 8 + LTEXT "Це місце навмисно залишене порожнім", IDC_STATIC, 66, 90, 112, 8 END IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_USER_GENERAL_NAME, 7, 12, 112, 8 - LTEXT " ':", -1, 7, 46, 63, 8 + LTEXT "Повне Ім'я:", -1, 7, 46, 63, 8 EDITTEXT IDC_USER_GENERAL_FULL_NAME,77,43,168,13,ES_AUTOHSCROLL - LTEXT ":", -1, 7, 64, 63, 8 + LTEXT "Опис:", -1, 7, 64, 63, 8 EDITTEXT IDC_USER_GENERAL_DESCRIPTION,77,61,168,13,ES_AUTOHSCROLL - AUTOCHECKBOX " ",IDC_USER_GENERAL_FORCE_CHANGE,7,82,210,10 - AUTOCHECKBOX " ",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10 - AUTOCHECKBOX " 䳿 ",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10 - AUTOCHECKBOX " ",IDC_USER_GENERAL_DISABLED,7,121,210,10 - AUTOCHECKBOX " ",IDC_USER_GENERAL_LOCKED,7,134,210,10 + AUTOCHECKBOX "Користувач має змінити пароль при першому вході",IDC_USER_GENERAL_FORCE_CHANGE,7,82,210,10 + AUTOCHECKBOX "Користувач не може змінювати пароль",IDC_USER_GENERAL_CANNOT_CHANGE,7,95,210,10 + AUTOCHECKBOX "Термін дії паролю необмежений",IDC_USER_GENERAL_NEVER_EXPIRES,7,108,210,10 + AUTOCHECKBOX "Обліковий запис вимкнено",IDC_USER_GENERAL_DISABLED,7,121,210,10 + AUTOCHECKBOX "Обліковий запис заблоковано",IDC_USER_GENERAL_LOCKED,7,134,210,10 END IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Членство" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 7, 7, 56, 8 + LTEXT "Член Групи:", -1, 7, 7, 56, 8 CONTROL "", IDC_USER_MEMBERSHIP_LIST, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 18, 238, 173, WS_EX_CLIENTEDGE - PUSHBUTTON "...", IDC_USER_MEMBERSHIP_ADD, 7, 197, 50, 14 - PUSHBUTTON "", IDC_USER_MEMBERSHIP_REMOVE, 61, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Додати...", IDC_USER_MEMBERSHIP_ADD, 7, 197, 50, 14 + PUSHBUTTON "Вилучити", IDC_USER_MEMBERSHIP_REMOVE, 61, 197, 50, 14, WS_DISABLED END IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Профіль" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 7, 7, 238, 54 - LTEXT " :", -1, 16, 22, 55, 8 + GROUPBOX "Профіль Користувача", -1, 7, 7, 238, 54 + LTEXT "Шлях до Профілю:", -1, 16, 22, 55, 8 EDITTEXT IDC_USER_PROFILE_PATH, 78, 19, 160, 13, ES_AUTOHSCROLL - LTEXT " :", -1, 16, 40, 55, 8 + LTEXT "Сценарій входу:", -1, 16, 40, 55, 8 EDITTEXT IDC_USER_PROFILE_SCRIPT, 78, 37, 160, 13, ES_AUTOHSCROLL - GROUPBOX " ", -1, 7, 68, 238, 54 - AUTORADIOBUTTON " :", IDC_USER_PROFILE_LOCAL, 16, 83, 60, 10 - AUTORADIOBUTTON "ϳ':", IDC_USER_PROFILE_REMOTE, 16, 100, 60, 10 + GROUPBOX "Домашня тека", -1, 7, 68, 238, 54 + AUTORADIOBUTTON "Локальний шлях:", IDC_USER_PROFILE_LOCAL, 16, 83, 60, 10 + AUTORADIOBUTTON "Під'єднати:", IDC_USER_PROFILE_REMOTE, 16, 100, 60, 10 EDITTEXT IDC_USER_PROFILE_LOCAL_PATH, 78, 81, 160, 13, ES_AUTOHSCROLL COMBOBOX IDC_USER_PROFILE_DRIVE, 78, 99, 26, 160, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT ":", -1, 112, 101, 12, 8 + LTEXT "до:", -1, 112, 101, 12, 8 EDITTEXT IDC_USER_PROFILE_REMOTE_PATH, 130, 99, 108, 13, ES_AUTOHSCROLL END IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_GROUP_GENERAL_NAME, 7, 12, 112, 8 - LTEXT ":", -1, 7, 45, 46, 8 + LTEXT "Опис:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL - LTEXT ":", -1, 7, 63, 45, 8 + LTEXT "Члени:", -1, 7, 63, 45, 8 CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE - PUSHBUTTON "...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 - PUSHBUTTON "", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Додати...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 + PUSHBUTTON "Вилучити", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION " " +CAPTION "Зміна Паролю" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_EDIT_PASSWORD1,107,7,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT " :", -1,7,10,96,8 + RTEXT "Новий Пароль:", -1,7,10,96,8 EDITTEXT IDC_EDIT_PASSWORD2,107,25,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT " :", -1,7,28,96,8 + RTEXT "Повтор Паролю:", -1,7,28,96,8 DEFPUSHBUTTON "OK",IDOK,156,53,50,14 - PUSHBUTTON "",IDCANCEL,210,53,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,210,53,50,14 END IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION " " +CAPTION "Новий Користувач" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_USER_NEW_NAME,107,7,153,14,ES_AUTOHSCROLL - RTEXT "' :", -1,7,10,96,8 + RTEXT "Ім'я Користувача:", -1,7,10,96,8 EDITTEXT IDC_USER_NEW_FULL_NAME,107,25,153,14,ES_AUTOHSCROLL - RTEXT " ' :", -1,7,28,96,8 + RTEXT "Повне Ім'я Користувача:", -1,7,28,96,8 EDITTEXT IDC_USER_NEW_DESCRIPTION,107,43,153,14,ES_AUTOHSCROLL - RTEXT ":", -1,7,46,96,8 + RTEXT "Опис:", -1,7,46,96,8 EDITTEXT IDC_USER_NEW_PASSWORD1,107,67,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT ":", -1,7,70,96,8 + RTEXT "Пароль:", -1,7,70,96,8 EDITTEXT IDC_USER_NEW_PASSWORD2,107,85,153,14,ES_AUTOHSCROLL | ES_PASSWORD - RTEXT " :", -1,7,88,96,8 - AUTOCHECKBOX " ",IDC_USER_NEW_FORCE_CHANGE,7,109,200,10 - AUTOCHECKBOX " ",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED - AUTOCHECKBOX " 䳿 ",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED - AUTOCHECKBOX " ",IDC_USER_NEW_DISABLED,7,151,200,10 + RTEXT "Повтор Паролю:", -1,7,88,96,8 + AUTOCHECKBOX "Користувач має змінити пароль при першому вході",IDC_USER_NEW_FORCE_CHANGE,7,109,200,10 + AUTOCHECKBOX "Користувач не може змінювати пароль",IDC_USER_NEW_CANNOT_CHANGE,7,123,200,10,WS_DISABLED + AUTOCHECKBOX "Термін дії паролю необмежений",IDC_USER_NEW_NEVER_EXPIRES,7,137,200,10,WS_DISABLED + AUTOCHECKBOX "Обліковий запис вимкнено",IDC_USER_NEW_DISABLED,7,151,200,10 DEFPUSHBUTTON "OK",IDOK,156,179,50,14,WS_DISABLED - PUSHBUTTON "",IDCANCEL,210,179,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,210,179,50,14 END IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION " " +CAPTION "Нова Група" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_GROUP_NEW_NAME,107,7,153,14,ES_AUTOHSCROLL - RTEXT " :", -1,7,10,96,8 + RTEXT "Назва Групи:", -1,7,10,96,8 EDITTEXT IDC_GROUP_NEW_DESCRIPTION,107,25,153,14,ES_AUTOHSCROLL - RTEXT ":", -1,7,28,96,8 + RTEXT "Опис:", -1,7,28,96,8 DEFPUSHBUTTON "OK",IDOK,156,53,50,14,WS_DISABLED - PUSHBUTTON "",IDCANCEL,210,53,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,210,53,50,14 END IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT -CAPTION " " +CAPTION "Членство в Групах" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 7, 7, 56, 8 + LTEXT "Член Групи:", -1, 7, 7, 56, 8 CONTROL "", IDC_USER_ADD_MEMBERSHIP_LIST, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 18, 238, 173, WS_EX_CLIENTEDGE DEFPUSHBUTTON "OK",IDOK,141,197,50,14 - PUSHBUTTON "",IDCANCEL,195,197,50,14 + PUSHBUTTON "Скасувати",IDCANCEL,195,197,50,14 END @@ -175,16 +175,16 @@ IDM_POPUP_GROUP MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM " ...", IDM_GROUP_NEW + MENUITEM "Створити Групу...", IDM_GROUP_NEW END POPUP "" BEGIN - MENUITEM " ", IDM_GROUP_ADD_MEMBER, GRAYED + MENUITEM "Додати в Групу", IDM_GROUP_ADD_MEMBER, GRAYED MENUITEM SEPARATOR - MENUITEM "", IDM_GROUP_DELETE - MENUITEM "", IDM_GROUP_RENAME + MENUITEM "Видалити", IDM_GROUP_DELETE + MENUITEM "Перейменувати", IDM_GROUP_RENAME MENUITEM SEPARATOR - MENUITEM "", IDM_GROUP_PROPERTIES + MENUITEM "Властивості", IDM_GROUP_PROPERTIES END END @@ -193,16 +193,16 @@ IDM_POPUP_USER MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM " ...", IDM_USER_NEW + MENUITEM "Новий Користувач...", IDM_USER_NEW END POPUP "" BEGIN - MENUITEM " ", IDM_USER_CHANGE_PASSWORD + MENUITEM "Змінити Пароль", IDM_USER_CHANGE_PASSWORD MENUITEM SEPARATOR - MENUITEM "", IDM_USER_DELETE - MENUITEM "", IDM_USER_RENAME + MENUITEM "Видалити", IDM_USER_DELETE + MENUITEM "Перейменувати", IDM_USER_RENAME MENUITEM SEPARATOR - MENUITEM "", IDM_USER_PROPERTIES + MENUITEM "Властивості", IDM_USER_PROPERTIES END END @@ -211,13 +211,13 @@ END STRINGTABLE BEGIN - IDS_CPLNAME " " - IDS_CPLDESCRIPTION " ." + IDS_CPLNAME "Облікові записи користувачів" + IDS_CPLDESCRIPTION "Керування Користувачами та Групами." END STRINGTABLE BEGIN - IDS_NAME "'" - IDS_FULLNAME " '" - IDS_DESCRIPTION "" + IDS_NAME "Ім'я" + IDS_FULLNAME "Повне Ім'я" + IDS_DESCRIPTION "Опис" END diff --git a/dll/cpl/usrmgr/rsrc.rc b/dll/cpl/usrmgr/rsrc.rc index 42a24ad3303..d9287f6a689 100644 --- a/dll/cpl/usrmgr/rsrc.rc +++ b/dll/cpl/usrmgr/rsrc.rc @@ -5,6 +5,9 @@ #include "lang/en-US.rc" #include "lang/es-ES.rc" #include "lang/fr-FR.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/directx/CMakeLists.txt b/dll/directx/CMakeLists.txt index 5a92a036a35..0f8f70ab3f6 100644 --- a/dll/directx/CMakeLists.txt +++ b/dll/directx/CMakeLists.txt @@ -16,7 +16,9 @@ add_subdirectory(dplayx) add_subdirectory(dsound) #add_subdirectory(dsound_new) #disabled in trunk add_subdirectory(dxdiagn) -add_subdirectory(ksproxy) +if(NOT MSVC) + add_subdirectory(ksproxy) #FIXME: fix msvc build +endif() add_subdirectory(ksuser) add_subdirectory(msdmo) #add_subdirectory(msdvbnp) #disabled in trunk diff --git a/dll/directx/dsound/CMakeLists.txt b/dll/directx/dsound/CMakeLists.txt index c4b7218871a..84f3782c9ff 100644 --- a/dll/directx/dsound/CMakeLists.txt +++ b/dll/directx/dsound/CMakeLists.txt @@ -1,8 +1,7 @@ add_definitions( -D_WINE - -D_USE_MATH_DEFINES - -D_DLL -D__USE_CRTIMP) + -D_USE_MATH_DEFINES) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) diff --git a/dll/directx/ksproxy/CMakeLists.txt b/dll/directx/ksproxy/CMakeLists.txt index c1ab338b565..68b8c6853ac 100644 --- a/dll/directx/ksproxy/CMakeLists.txt +++ b/dll/directx/ksproxy/CMakeLists.txt @@ -2,7 +2,6 @@ spec2def(ksproxy.ax ksproxy.spec) add_definitions( - -D_DLL -D__USE_CRTIMP -DNATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/include/c++ -DNATIVE_C_INCLUDE=${REACTOS_SOURCE_DIR}/include/crt) @@ -36,11 +35,11 @@ if(MSVC) else() #FIXME : can't build if this is enabled, check if this is needed #set_target_properties(ksproxy PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti") - target_link_libraries(ksproxy -lsupc++ -lgcc -lmingw32 -lcoldname) -endif(MSVC) + target_link_libraries(ksproxy -lsupc++ -lgcc -lmingw32 oldnames) +endif() + +target_link_libraries(ksproxy stlport strmiids) -target_link_libraries(ksproxy stlport strmiids) - add_importlibs(ksproxy advapi32 ole32 diff --git a/dll/directx/qedit/CMakeLists.txt b/dll/directx/qedit/CMakeLists.txt index 2d393e1ae44..b088850deb6 100644 --- a/dll/directx/qedit/CMakeLists.txt +++ b/dll/directx/qedit/CMakeLists.txt @@ -1,9 +1,7 @@ set_unicode() -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__WINESRC__) remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) diff --git a/dll/directx/quartz/CMakeLists.txt b/dll/directx/quartz/CMakeLists.txt index 946d73eba30..338fd2e5a97 100644 --- a/dll/directx/quartz/CMakeLists.txt +++ b/dll/directx/quartz/CMakeLists.txt @@ -6,9 +6,7 @@ add_definitions( -D__WINESRC__ -DENTRY_PREFIX=QUARTZ_ -DREGISTER_PROXY_DLL - -DPROXY_DELEGATION - -D_DLL - -D__USE_CRTIMP) + -DPROXY_DELEGATION) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) diff --git a/dll/directx/wine/CMakeLists.txt b/dll/directx/wine/CMakeLists.txt index be9f27b8150..59580031371 100644 --- a/dll/directx/wine/CMakeLists.txt +++ b/dll/directx/wine/CMakeLists.txt @@ -1,4 +1,5 @@ +if(NOT MSVC) add_subdirectory(d3d8) add_subdirectory(d3d9) add_subdirectory(d3dx9_24) @@ -22,3 +23,4 @@ add_subdirectory(d3dx9_41) add_subdirectory(d3dx9_42) add_subdirectory(ddraw) add_subdirectory(wined3d) +endif() diff --git a/dll/directx/wine/d3d8/CMakeLists.txt b/dll/directx/wine/d3d8/CMakeLists.txt index a8cc0a720d0..5586bd68c78 100644 --- a/dll/directx/wine/d3d8/CMakeLists.txt +++ b/dll/directx/wine/d3d8/CMakeLists.txt @@ -7,10 +7,6 @@ add_definitions( include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -if(MSVC) - add_definitions(-FImsvchelper.h) -endif() - set_rc_compiler() spec2def(d3d8.dll d3d8.spec) @@ -29,7 +25,6 @@ list(APPEND SOURCE volume.c volumetexture.c version.rc - #${REACTOS_BINARY_DIR}/include/reactos/wine/wined3d_i.c ${CMAKE_CURRENT_BINARY_DIR}/d3d8.def) add_library(d3d8 SHARED ${SOURCE}) diff --git a/dll/directx/wine/d3d8/buffer.c b/dll/directx/wine/d3d8/buffer.c index f7dc12d8f60..8cf55311ba9 100644 --- a/dll/directx/wine/d3d8/buffer.c +++ b/dll/directx/wine/d3d8/buffer.c @@ -51,7 +51,7 @@ static ULONG WINAPI d3d8_vertexbuffer_AddRef(IDirect3DVertexBuffer8 *iface) { IDirect3DDevice8_AddRef(buffer->parentDevice); wined3d_mutex_lock(); - IWineD3DBuffer_AddRef(buffer->wineD3DVertexBuffer); + wined3d_buffer_incref(buffer->wineD3DVertexBuffer); wined3d_mutex_unlock(); } @@ -70,7 +70,7 @@ static ULONG WINAPI d3d8_vertexbuffer_Release(IDirect3DVertexBuffer8 *iface) IDirect3DDevice8 *device = buffer->parentDevice; wined3d_mutex_lock(); - IWineD3DBuffer_Release(buffer->wineD3DVertexBuffer); + wined3d_buffer_decref(buffer->wineD3DVertexBuffer); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -101,7 +101,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_SetPrivateData(IDirect3DVertexBuffer8 *i iface, debugstr_guid(guid), data, data_size, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_SetPrivateData(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, + hr = wined3d_buffer_set_private_data(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, guid, data, data_size, flags); wined3d_mutex_unlock(); @@ -117,7 +117,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_GetPrivateData(IDirect3DVertexBuffer8 *i iface, debugstr_guid(guid), data, data_size); wined3d_mutex_lock(); - hr = IWineD3DBuffer_GetPrivateData(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, + hr = wined3d_buffer_get_private_data(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, guid, data, data_size); wined3d_mutex_unlock(); @@ -131,7 +131,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_FreePrivateData(IDirect3DVertexBuffer8 * TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); wined3d_mutex_lock(); - hr = IWineD3DBuffer_FreePrivateData(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, guid); + hr = wined3d_buffer_free_private_data(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, guid); wined3d_mutex_unlock(); return hr; @@ -144,7 +144,7 @@ static DWORD WINAPI d3d8_vertexbuffer_SetPriority(IDirect3DVertexBuffer8 *iface, TRACE("iface %p, priority %u.\n", iface, priority); wined3d_mutex_lock(); - previous = IWineD3DBuffer_SetPriority(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, priority); + previous = wined3d_buffer_set_priority(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, priority); wined3d_mutex_unlock(); return previous; @@ -157,7 +157,7 @@ static DWORD WINAPI d3d8_vertexbuffer_GetPriority(IDirect3DVertexBuffer8 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - priority = IWineD3DBuffer_GetPriority(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer); + priority = wined3d_buffer_get_priority(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer); wined3d_mutex_unlock(); return priority; @@ -168,7 +168,7 @@ static void WINAPI d3d8_vertexbuffer_PreLoad(IDirect3DVertexBuffer8 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DBuffer_PreLoad(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer); + wined3d_buffer_preload(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer); wined3d_mutex_unlock(); } @@ -188,7 +188,7 @@ static HRESULT WINAPI d3d8_vertexbuffer_Lock(IDirect3DVertexBuffer8 *iface, iface, offset, size, data, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Map(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, + hr = wined3d_buffer_map(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer, offset, size, data, flags); wined3d_mutex_unlock(); @@ -197,32 +197,32 @@ static HRESULT WINAPI d3d8_vertexbuffer_Lock(IDirect3DVertexBuffer8 *iface, static HRESULT WINAPI d3d8_vertexbuffer_Unlock(IDirect3DVertexBuffer8 *iface) { - HRESULT hr; - TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Unmap(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer); + wined3d_buffer_unmap(((IDirect3DVertexBuffer8Impl *)iface)->wineD3DVertexBuffer); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_vertexbuffer_GetDesc(IDirect3DVertexBuffer8 *iface, D3DVERTEXBUFFER_DESC *desc) { IDirect3DVertexBuffer8Impl *buffer = (IDirect3DVertexBuffer8Impl *)iface; - WINED3DBUFFER_DESC wined3d_desc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - IWineD3DBuffer_GetDesc(buffer->wineD3DVertexBuffer, &wined3d_desc); + wined3d_resource = wined3d_buffer_get_resource(buffer->wineD3DVertexBuffer); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); desc->Type = D3DRTYPE_VERTEXBUFFER; - desc->Usage = wined3d_desc.Usage; - desc->Pool = wined3d_desc.Pool; - desc->Size = wined3d_desc.Size; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; desc->FVF = buffer->fvf; desc->Format = D3DFMT_VERTEXDATA; @@ -270,7 +270,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im buffer->fvf = fvf; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVertexBuffer(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK, + hr = wined3d_buffer_create_vb(device->wined3d_device, size, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, buffer, &d3d8_vertexbuffer_wined3d_parent_ops, &buffer->wineD3DVertexBuffer); wined3d_mutex_unlock(); if (FAILED(hr)) @@ -279,7 +279,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im return hr; } - buffer->parentDevice = (IDirect3DDevice8 *)device; + buffer->parentDevice = &device->IDirect3DDevice8_iface; IUnknown_AddRef(buffer->parentDevice); return D3D_OK; @@ -315,7 +315,7 @@ static ULONG WINAPI d3d8_indexbuffer_AddRef(IDirect3DIndexBuffer8 *iface) { IDirect3DDevice8_AddRef(buffer->parentDevice); wined3d_mutex_lock(); - IWineD3DBuffer_AddRef(buffer->wineD3DIndexBuffer); + wined3d_buffer_incref(buffer->wineD3DIndexBuffer); wined3d_mutex_unlock(); } @@ -334,7 +334,7 @@ static ULONG WINAPI d3d8_indexbuffer_Release(IDirect3DIndexBuffer8 *iface) IDirect3DDevice8 *device = buffer->parentDevice; wined3d_mutex_lock(); - IWineD3DBuffer_Release(buffer->wineD3DIndexBuffer); + wined3d_buffer_decref(buffer->wineD3DIndexBuffer); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -365,7 +365,7 @@ static HRESULT WINAPI d3d8_indexbuffer_SetPrivateData(IDirect3DIndexBuffer8 *ifa iface, debugstr_guid(guid), data, data_size, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_SetPrivateData(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, + hr = wined3d_buffer_set_private_data(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, guid, data, data_size, flags); wined3d_mutex_unlock(); @@ -381,7 +381,7 @@ static HRESULT WINAPI d3d8_indexbuffer_GetPrivateData(IDirect3DIndexBuffer8 *ifa iface, debugstr_guid(guid), data, data_size); wined3d_mutex_lock(); - hr = IWineD3DBuffer_GetPrivateData(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, + hr = wined3d_buffer_get_private_data(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, guid, data, data_size); wined3d_mutex_unlock(); @@ -395,7 +395,7 @@ static HRESULT WINAPI d3d8_indexbuffer_FreePrivateData(IDirect3DIndexBuffer8 *if TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); wined3d_mutex_lock(); - hr = IWineD3DBuffer_FreePrivateData(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, guid); + hr = wined3d_buffer_free_private_data(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, guid); wined3d_mutex_unlock(); return hr; @@ -408,7 +408,7 @@ static DWORD WINAPI d3d8_indexbuffer_SetPriority(IDirect3DIndexBuffer8 *iface, D TRACE("iface %p, priority %u.\n", iface, priority); wined3d_mutex_lock(); - previous = IWineD3DBuffer_SetPriority(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, priority); + previous = wined3d_buffer_set_priority(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, priority); wined3d_mutex_unlock(); return previous; @@ -421,7 +421,7 @@ static DWORD WINAPI d3d8_indexbuffer_GetPriority(IDirect3DIndexBuffer8 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - priority = IWineD3DBuffer_GetPriority(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer); + priority = wined3d_buffer_get_priority(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer); wined3d_mutex_unlock(); return priority; @@ -432,7 +432,7 @@ static void WINAPI d3d8_indexbuffer_PreLoad(IDirect3DIndexBuffer8 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DBuffer_PreLoad(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer); + wined3d_buffer_preload(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer); wined3d_mutex_unlock(); } @@ -452,7 +452,7 @@ static HRESULT WINAPI d3d8_indexbuffer_Lock(IDirect3DIndexBuffer8 *iface, iface, offset, size, data, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Map(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, + hr = wined3d_buffer_map(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer, offset, size, data, flags); wined3d_mutex_unlock(); @@ -461,33 +461,33 @@ static HRESULT WINAPI d3d8_indexbuffer_Lock(IDirect3DIndexBuffer8 *iface, static HRESULT WINAPI d3d8_indexbuffer_Unlock(IDirect3DIndexBuffer8 *iface) { - HRESULT hr; - TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Unmap(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer); + wined3d_buffer_unmap(((IDirect3DIndexBuffer8Impl *)iface)->wineD3DIndexBuffer); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_indexbuffer_GetDesc(IDirect3DIndexBuffer8 *iface, D3DINDEXBUFFER_DESC *desc) { IDirect3DIndexBuffer8Impl *buffer = (IDirect3DIndexBuffer8Impl *)iface; - WINED3DBUFFER_DESC wined3d_desc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - IWineD3DBuffer_GetDesc(buffer->wineD3DIndexBuffer, &wined3d_desc); + wined3d_resource = wined3d_buffer_get_resource(buffer->wineD3DIndexBuffer); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); desc->Format = d3dformat_from_wined3dformat(buffer->format); desc->Type = D3DRTYPE_INDEXBUFFER; - desc->Usage = wined3d_desc.Usage; - desc->Pool = wined3d_desc.Pool; - desc->Size = wined3d_desc.Size; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; return D3D_OK; } @@ -533,7 +533,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl buffer->format = wined3dformat_from_d3dformat(format); wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateIndexBuffer(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK, + hr = wined3d_buffer_create_ib(device->wined3d_device, size, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, buffer, &d3d8_indexbuffer_wined3d_parent_ops, &buffer->wineD3DIndexBuffer); wined3d_mutex_unlock(); if (FAILED(hr)) @@ -542,7 +542,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl return hr; } - buffer->parentDevice = (IDirect3DDevice8 *)device; + buffer->parentDevice = &device->IDirect3DDevice8_iface; IUnknown_AddRef(buffer->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d8/cubetexture.c b/dll/directx/wine/d3d8/cubetexture.c index b9b411a1156..5915c54e730 100644 --- a/dll/directx/wine/d3d8/cubetexture.c +++ b/dll/directx/wine/d3d8/cubetexture.c @@ -23,9 +23,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); -/* IDirect3DCubeTexture8 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DCubeTexture8Impl_QueryInterface(LPDIRECT3DCUBETEXTURE8 iface, REFIID riid, LPVOID *ppobj) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static inline IDirect3DCubeTexture8Impl *impl_from_IDirect3DCubeTexture8(IDirect3DCubeTexture8 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DCubeTexture8Impl, IDirect3DCubeTexture8_iface); +} + +static HRESULT WINAPI IDirect3DCubeTexture8Impl_QueryInterface(IDirect3DCubeTexture8 *iface, + REFIID riid, void **ppobj) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -43,8 +49,9 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_QueryInterface(LPDIRECT3DCUBETEX return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DCubeTexture8Impl_AddRef(LPDIRECT3DCUBETEXTURE8 iface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static ULONG WINAPI IDirect3DCubeTexture8Impl_AddRef(IDirect3DCubeTexture8 *iface) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -53,15 +60,16 @@ static ULONG WINAPI IDirect3DCubeTexture8Impl_AddRef(LPDIRECT3DCUBETEXTURE8 ifac { IUnknown_AddRef(This->parentDevice); wined3d_mutex_lock(); - IWineD3DCubeTexture_AddRef(This->wineD3DCubeTexture); + wined3d_texture_incref(This->wined3d_texture); wined3d_mutex_unlock(); } return ref; } -static ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 iface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static ULONG WINAPI IDirect3DCubeTexture8Impl_Release(IDirect3DCubeTexture8 *iface) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -69,10 +77,10 @@ static ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 ifa if (ref == 0) { IDirect3DDevice8 *parentDevice = This->parentDevice; - TRACE("Releasing child %p\n", This->wineD3DCubeTexture); + TRACE("Releasing child %p.\n", This->wined3d_texture); wined3d_mutex_lock(); - IWineD3DCubeTexture_Release(This->wineD3DCubeTexture); + wined3d_texture_decref(This->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -82,9 +90,10 @@ static ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 ifa } /* IDirect3DCubeTexture8 IDirect3DResource8 Interface follow: */ -static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetDevice(IDirect3DCubeTexture8 *iface, IDirect3DDevice8 **device) +static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetDevice(IDirect3DCubeTexture8 *iface, + IDirect3DDevice8 **device) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -96,221 +105,275 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetDevice(IDirect3DCubeTexture8 return D3D_OK; } -static HRESULT WINAPI IDirect3DCubeTexture8Impl_SetPrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture8Impl_SetPrivateData(IDirect3DCubeTexture8 *iface, + REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_SetPrivateData(This->wineD3DCubeTexture,refguid,pData,SizeOfData,Flags); + hr = wined3d_texture_set_private_data(This->wined3d_texture, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetPrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid, void *pData, DWORD *pSizeOfData) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetPrivateData(IDirect3DCubeTexture8 *iface, + REFGUID refguid, void *pData, DWORD *pSizeOfData) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_GetPrivateData(This->wineD3DCubeTexture,refguid,pData,pSizeOfData); + hr = wined3d_texture_get_private_data(This->wined3d_texture, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DCubeTexture8Impl_FreePrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture8Impl_FreePrivateData(IDirect3DCubeTexture8 *iface, + REFGUID refguid) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_FreePrivateData(This->wineD3DCubeTexture,refguid); + hr = wined3d_texture_free_private_data(This->wined3d_texture, refguid); wined3d_mutex_unlock(); return hr; } -static DWORD WINAPI IDirect3DCubeTexture8Impl_SetPriority(LPDIRECT3DCUBETEXTURE8 iface, DWORD PriorityNew) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture8Impl_SetPriority(IDirect3DCubeTexture8 *iface, + DWORD PriorityNew) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); DWORD ret; TRACE("iface %p, priority %u.\n", iface, PriorityNew); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_SetPriority(This->wineD3DCubeTexture, PriorityNew); + ret = wined3d_texture_set_priority(This->wined3d_texture, PriorityNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DCubeTexture8Impl_GetPriority(LPDIRECT3DCUBETEXTURE8 iface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture8Impl_GetPriority(IDirect3DCubeTexture8 *iface) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_GetPriority(This->wineD3DCubeTexture); + ret = wined3d_texture_get_priority(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static void WINAPI IDirect3DCubeTexture8Impl_PreLoad(LPDIRECT3DCUBETEXTURE8 iface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static void WINAPI IDirect3DCubeTexture8Impl_PreLoad(IDirect3DCubeTexture8 *iface) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DCubeTexture_PreLoad(This->wineD3DCubeTexture); + wined3d_texture_preload(This->wined3d_texture); wined3d_mutex_unlock(); } -static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture8Impl_GetType(LPDIRECT3DCUBETEXTURE8 iface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture8Impl_GetType(IDirect3DCubeTexture8 *iface) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); D3DRESOURCETYPE type; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - type = IWineD3DCubeTexture_GetType(This->wineD3DCubeTexture); + type = wined3d_texture_get_type(This->wined3d_texture); wined3d_mutex_unlock(); return type; } /* IDirect3DCubeTexture8 IDirect3DBaseTexture8 Interface follow: */ -static DWORD WINAPI IDirect3DCubeTexture8Impl_SetLOD(LPDIRECT3DCUBETEXTURE8 iface, DWORD LODNew) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture8Impl_SetLOD(IDirect3DCubeTexture8 *iface, DWORD LODNew) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); DWORD lod; TRACE("iface %p, lod %u.\n", iface, LODNew); wined3d_mutex_lock(); - lod = IWineD3DCubeTexture_SetLOD(This->wineD3DCubeTexture, LODNew); + lod = wined3d_texture_set_lod(This->wined3d_texture, LODNew); wined3d_mutex_unlock(); return lod; } -static DWORD WINAPI IDirect3DCubeTexture8Impl_GetLOD(LPDIRECT3DCUBETEXTURE8 iface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture8Impl_GetLOD(IDirect3DCubeTexture8 *iface) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); DWORD lod; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - lod = IWineD3DCubeTexture_GetLOD((LPDIRECT3DBASETEXTURE8) This); + lod = wined3d_texture_get_lod(This->wined3d_texture); wined3d_mutex_unlock(); return lod; } -static DWORD WINAPI IDirect3DCubeTexture8Impl_GetLevelCount(LPDIRECT3DCUBETEXTURE8 iface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture8Impl_GetLevelCount(IDirect3DCubeTexture8 *iface) +{ + IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface); DWORD cnt; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - cnt = IWineD3DCubeTexture_GetLevelCount(This->wineD3DCubeTexture); + cnt = wined3d_texture_get_level_count(This->wined3d_texture); wined3d_mutex_unlock(); return cnt; } /* IDirect3DCubeTexture8 Interface follow: */ -static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 iface, UINT Level, D3DSURFACE_DESC *pDesc) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; - HRESULT hr; - WINED3DSURFACE_DESC wined3ddesc; +static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(IDirect3DCubeTexture8 *iface, + UINT level, D3DSURFACE_DESC *desc) +{ + IDirect3DCubeTexture8Impl *texture = impl_from_IDirect3DCubeTexture8(iface); + struct wined3d_resource *sub_resource; + HRESULT hr = D3D_OK; - TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); + TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_GetLevelDesc(This->wineD3DCubeTexture, Level, &wined3ddesc); - wined3d_mutex_unlock(); - - if (SUCCEEDED(hr)) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else { - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format); - pDesc->Type = wined3ddesc.resource_type; - pDesc->Usage = wined3ddesc.usage; - pDesc->Pool = wined3ddesc.pool; - pDesc->Size = wined3ddesc.size; - pDesc->MultiSampleType = wined3ddesc.multisample_type; - pDesc->Width = wined3ddesc.width; - pDesc->Height = wined3ddesc.height; + struct wined3d_resource_desc wined3d_desc; + + wined3d_resource_get_desc(sub_resource, &wined3d_desc); + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; + desc->MultiSampleType = wined3d_desc.multisample_type; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; } + wined3d_mutex_unlock(); return hr; } static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetCubeMapSurface(IDirect3DCubeTexture8 *iface, - D3DCUBEMAP_FACES FaceType, UINT Level, IDirect3DSurface8 **ppCubeMapSurface) + D3DCUBEMAP_FACES face, UINT level, IDirect3DSurface8 **surface) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; - IWineD3DSurface *mySurface = NULL; - HRESULT hr; + IDirect3DCubeTexture8Impl *texture = impl_from_IDirect3DCubeTexture8(iface); + struct wined3d_resource *sub_resource; + UINT sub_resource_idx; - TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, FaceType, Level, ppCubeMapSurface); + TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, face, level, surface); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_GetCubeMapSurface(This->wineD3DCubeTexture, - (WINED3DCUBEMAP_FACES) FaceType, Level, &mySurface); - if (SUCCEEDED(hr) && ppCubeMapSurface) + sub_resource_idx = wined3d_texture_get_level_count(texture->wined3d_texture) * face + level; + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) { - *ppCubeMapSurface = IWineD3DCubeTexture_GetParent(mySurface); - IDirect3DSurface8_AddRef(*ppCubeMapSurface); - IWineD3DCubeTexture_Release(mySurface); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; } + + *surface = wined3d_resource_get_parent(sub_resource); + IDirect3DSurface8_AddRef(*surface); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } -static HRESULT WINAPI IDirect3DCubeTexture8Impl_LockRect(LPDIRECT3DCUBETEXTURE8 iface, D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT *pRect, DWORD Flags) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture8Impl_LockRect(IDirect3DCubeTexture8 *iface, + D3DCUBEMAP_FACES face, UINT level, D3DLOCKED_RECT *locked_rect, const RECT *rect, + DWORD flags) +{ + IDirect3DCubeTexture8Impl *texture = impl_from_IDirect3DCubeTexture8(iface); + struct wined3d_resource *sub_resource; + UINT sub_resource_idx; HRESULT hr; TRACE("iface %p, face %#x, level %u, locked_rect %p, rect %p, flags %#x.\n", - iface, FaceType, Level, pLockedRect, pRect, Flags); + iface, face, level, locked_rect, rect, flags); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_LockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level, (WINED3DLOCKED_RECT *) pLockedRect, pRect, Flags); + sub_resource_idx = wined3d_texture_get_level_count(texture->wined3d_texture) * face + level; + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface8_LockRect((IDirect3DSurface8 *)wined3d_resource_get_parent(sub_resource), + locked_rect, rect, flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DCubeTexture8Impl_UnlockRect(LPDIRECT3DCUBETEXTURE8 iface, D3DCUBEMAP_FACES FaceType, UINT Level) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture8Impl_UnlockRect(IDirect3DCubeTexture8 *iface, + D3DCUBEMAP_FACES face, UINT level) +{ + IDirect3DCubeTexture8Impl *texture = impl_from_IDirect3DCubeTexture8(iface); + struct wined3d_resource *sub_resource; + UINT sub_resource_idx; HRESULT hr; - TRACE("iface %p, face %#x, level %u.\n", iface, FaceType, Level); + TRACE("iface %p, face %#x, level %u.\n", iface, face, level); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_UnlockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level); + sub_resource_idx = wined3d_texture_get_level_count(texture->wined3d_texture) * face + level; + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface8_UnlockRect((IDirect3DSurface8 *)wined3d_resource_get_parent(sub_resource)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE8 iface, D3DCUBEMAP_FACES FaceType, CONST RECT *pDirtyRect) { - IDirect3DCubeTexture8Impl *This = (IDirect3DCubeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(IDirect3DCubeTexture8 *iface, + D3DCUBEMAP_FACES face, const RECT *dirty_rect) +{ + IDirect3DCubeTexture8Impl *texture = impl_from_IDirect3DCubeTexture8(iface); HRESULT hr; - TRACE("iface %p, face %#x, dirty_rect %p.\n", iface, FaceType, pDirtyRect); + TRACE("iface %p, face %#x, dirty_rect %s.\n", + iface, face, wine_dbgstr_rect(dirty_rect)); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_AddDirtyRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, pDirtyRect); + if (!dirty_rect) + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, face, NULL); + else + { + WINED3DBOX dirty_region; + + dirty_region.Left = dirty_rect->left; + dirty_region.Top = dirty_rect->top; + dirty_region.Right = dirty_rect->right; + dirty_region.Bottom = dirty_rect->bottom; + dirty_region.Front = 0; + dirty_region.Back = 1; + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, face, &dirty_region); + } wined3d_mutex_unlock(); return hr; @@ -358,13 +421,13 @@ HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Imp { HRESULT hr; - texture->lpVtbl = &Direct3DCubeTexture8_Vtbl; + texture->IDirect3DCubeTexture8_iface.lpVtbl = &Direct3DCubeTexture8_Vtbl; texture->ref = 1; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateCubeTexture(device->WineD3DDevice, edge_length, levels, + hr = wined3d_texture_create_cube(device->wined3d_device, edge_length, levels, usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture, - &d3d8_cubetexture_wined3d_parent_ops, &texture->wineD3DCubeTexture); + &d3d8_cubetexture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -372,7 +435,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Imp return hr; } - texture->parentDevice = (IDirect3DDevice8 *)device; + texture->parentDevice = &device->IDirect3DDevice8_iface; IDirect3DDevice8_AddRef(texture->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d8/d3d8_main.c b/dll/directx/wine/d3d8/d3d8_main.c index 6cefe574d19..7a25a93c928 100644 --- a/dll/directx/wine/d3d8/d3d8_main.c +++ b/dll/directx/wine/d3d8/d3d8_main.c @@ -43,9 +43,9 @@ IDirect3D8* WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT SDKVersion) { object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D8Impl)); - object->lpVtbl = &Direct3D8_Vtbl; + object->IDirect3D8_iface.lpVtbl = &Direct3D8_Vtbl; object->ref = 1; - object->WineD3D = WineDirect3DCreate(8, (IUnknown *)object); + object->WineD3D = wined3d_create(8, &object->IDirect3D8_iface); TRACE("Created Direct3D object @ %p, WineObj @ %p\n", object, object->WineD3D); @@ -56,7 +56,7 @@ IDirect3D8* WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT SDKVersion) { HeapFree( GetProcessHeap(), 0, object ); object = NULL; } - return (IDirect3D8*) object; + return &object->IDirect3D8_iface; } /* At process attach */ diff --git a/dll/directx/wine/d3d8/d3d8_private.h b/dll/directx/wine/d3d8/d3d8_private.h index 7e896671922..914dec58357 100644 --- a/dll/directx/wine/d3d8/d3d8_private.h +++ b/dll/directx/wine/d3d8/d3d8_private.h @@ -109,7 +109,6 @@ typedef struct IDirect3DCubeTexture8Impl IDirect3DCubeTexture8Impl; typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl; typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl; typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl; -typedef struct IDirect3DResource8Impl IDirect3DResource8Impl; typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl; typedef struct IDirect3DVertexBuffer8Impl IDirect3DVertexBuffer8Impl; typedef struct IDirect3DVertexShader8Impl IDirect3DVertexShader8Impl; @@ -132,12 +131,9 @@ extern const IDirect3D8Vtbl Direct3D8_Vtbl DECLSPEC_HIDDEN; */ struct IDirect3D8Impl { - /* IUnknown fields */ - const IDirect3D8Vtbl *lpVtbl; - LONG ref; - - /* The WineD3D device */ - IWineD3D *WineD3D; + IDirect3D8 IDirect3D8_iface; + LONG ref; + struct wined3d *WineD3D; }; /***************************************************************************** @@ -178,22 +174,22 @@ struct FvfToDecl struct IDirect3DDevice8Impl { /* IUnknown fields */ - const IDirect3DDevice8Vtbl *lpVtbl; - const IWineD3DDeviceParentVtbl *device_parent_vtbl; - LONG ref; -/* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */ - IWineD3DDevice *WineD3DDevice; - struct d3d8_handle_table handle_table; + IDirect3DDevice8 IDirect3DDevice8_iface; + struct wined3d_device_parent device_parent; + LONG ref; + struct wined3d_device *wined3d_device; + struct d3d8_handle_table handle_table; /* FVF management */ struct FvfToDecl *decls; UINT numConvertedDecls, declArraySize; /* Avoids recursion with nested ReleaseRef to 0 */ - BOOL inDestruction; + BOOL inDestruction; + BOOL lost; }; -HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapter, +HRESULT device_init(IDirect3DDevice8Impl *device, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) DECLSPEC_HIDDEN; /* ---------------- */ @@ -205,18 +201,11 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte */ struct IDirect3DVolume8Impl { - /* IUnknown fields */ - const IDirect3DVolume8Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DVolume8 fields */ - IWineD3DVolume *wineD3DVolume; - - /* The volume container */ - IUnknown *container; - - /* If set forward refcounting to this object */ - IUnknown *forwardReference; + IDirect3DVolume8 IDirect3DVolume8_iface; + LONG ref; + struct wined3d_volume *wined3d_volume; + IUnknown *container; + IUnknown *forwardReference; }; HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device, UINT width, UINT height, @@ -232,14 +221,10 @@ HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device, struct IDirect3DSwapChain8Impl { /* IUnknown fields */ - const IDirect3DSwapChain8Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DSwapChain8 fields */ - IWineD3DSwapChain *wineD3DSwapChain; - - /* Parent reference */ - LPDIRECT3DDEVICE8 parentDevice; + IDirect3DSwapChain8 IDirect3DSwapChain8_iface; + LONG ref; + struct wined3d_swapchain *wined3d_swapchain; + IDirect3DDevice8 *parentDevice; }; HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl *device, @@ -257,12 +242,8 @@ struct IDirect3DSurface8Impl /* IUnknown fields */ const IDirect3DSurface8Vtbl *lpVtbl; LONG ref; - - /* IDirect3DSurface8 fields */ - IWineD3DSurface *wineD3DSurface; - - /* Parent reference */ - LPDIRECT3DDEVICE8 parentDevice; + struct wined3d_surface *wined3d_surface; + IDirect3DDevice8 *parentDevice; /* The surface container */ IUnknown *container; @@ -275,16 +256,6 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic UINT width, UINT height, D3DFORMAT format, BOOL lockable, BOOL discard, UINT level, DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) DECLSPEC_HIDDEN; -struct IDirect3DResource8Impl -{ - /* IUnknown fields */ - const IDirect3DResource8Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DResource8 fields */ - IWineD3DResource *wineD3DResource; -}; - /* ---------------------- */ /* IDirect3DVertexBuffer8 */ /* ---------------------- */ @@ -298,13 +269,9 @@ struct IDirect3DVertexBuffer8Impl const IDirect3DVertexBuffer8Vtbl *lpVtbl; LONG ref; - /* IDirect3DResource8 fields */ - IWineD3DBuffer *wineD3DVertexBuffer; - - /* Parent reference */ - LPDIRECT3DDEVICE8 parentDevice; - - DWORD fvf; + struct wined3d_buffer *wineD3DVertexBuffer; + IDirect3DDevice8 *parentDevice; + DWORD fvf; }; HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Impl *device, @@ -323,12 +290,8 @@ struct IDirect3DIndexBuffer8Impl const IDirect3DIndexBuffer8Vtbl *lpVtbl; LONG ref; - /* IDirect3DResource8 fields */ - IWineD3DBuffer *wineD3DIndexBuffer; - - /* Parent reference */ - LPDIRECT3DDEVICE8 parentDevice; - + struct wined3d_buffer *wineD3DIndexBuffer; + IDirect3DDevice8 *parentDevice; enum wined3d_format_id format; }; @@ -347,9 +310,7 @@ struct IDirect3DBaseTexture8Impl /* IUnknown fields */ const IDirect3DBaseTexture8Vtbl *lpVtbl; LONG ref; - - /* IDirect3DResource8 fields */ - IWineD3DBaseTexture *wineD3DBaseTexture; + struct wined3d_texture *wined3d_texture; }; /* --------------------- */ @@ -361,15 +322,10 @@ struct IDirect3DBaseTexture8Impl */ struct IDirect3DCubeTexture8Impl { - /* IUnknown fields */ - const IDirect3DCubeTexture8Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DResource8 fields */ - IWineD3DCubeTexture *wineD3DCubeTexture; - - /* Parent reference */ - LPDIRECT3DDEVICE8 parentDevice; + IDirect3DCubeTexture8 IDirect3DCubeTexture8_iface; + LONG ref; + struct wined3d_texture *wined3d_texture; + IDirect3DDevice8 *parentDevice; }; HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Impl *device, @@ -384,15 +340,10 @@ HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Imp */ struct IDirect3DTexture8Impl { - /* IUnknown fields */ - const IDirect3DTexture8Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DResourc8 fields */ - IWineD3DTexture *wineD3DTexture; - - /* Parent reference */ - LPDIRECT3DDEVICE8 parentDevice; + IDirect3DTexture8 IDirect3DTexture8_iface; + LONG ref; + struct wined3d_texture *wined3d_texture; + IDirect3DDevice8 *parentDevice; }; HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *device, @@ -407,15 +358,10 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic */ struct IDirect3DVolumeTexture8Impl { - /* IUnknown fields */ - const IDirect3DVolumeTexture8Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DResource8 fields */ - IWineD3DVolumeTexture *wineD3DVolumeTexture; - - /* Parent reference */ - LPDIRECT3DDEVICE8 parentDevice; + IDirect3DVolumeTexture8 IDirect3DVolumeTexture8_iface; + LONG ref; + struct wined3d_texture *wined3d_texture; + IDirect3DDevice8 *parentDevice; }; HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice8Impl *device, @@ -455,7 +401,7 @@ typedef struct { DWORD *elements; DWORD elements_size; /* Size of elements, in bytes */ - IWineD3DVertexDeclaration *wined3d_vertex_declaration; + struct wined3d_vertex_declaration *wined3d_vertex_declaration; DWORD shader_handle; } IDirect3DVertexDeclaration8Impl; @@ -509,11 +455,10 @@ DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown) */ struct IDirect3DVertexShader8Impl { - const IDirect3DVertexShader8Vtbl *lpVtbl; - LONG ref; - - IDirect3DVertexDeclaration8 *vertex_declaration; - IWineD3DVertexShader *wineD3DVertexShader; + IDirect3DVertexShader8 IDirect3DVertexShader8_iface; + LONG ref; + IDirect3DVertexDeclaration8 *vertex_declaration; + struct wined3d_shader *wined3d_shader; }; HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Impl *device, @@ -525,11 +470,10 @@ HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Im * IDirect3DPixelShader implementation structure */ typedef struct IDirect3DPixelShader8Impl { - const IDirect3DPixelShader8Vtbl *lpVtbl; + IDirect3DPixelShader8 IDirect3DPixelShader8_iface; LONG ref; - - DWORD handle; - IWineD3DPixelShader *wineD3DPixelShader; + DWORD handle; + struct wined3d_shader *wined3d_shader; } IDirect3DPixelShader8Impl; HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl *device, @@ -537,7 +481,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN; enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN; -void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader) DECLSPEC_HIDDEN; +void load_local_constants(const DWORD *d3d8_elements, struct wined3d_shader *wined3d_vertex_shader) DECLSPEC_HIDDEN; size_t parse_token(const DWORD *pToken) DECLSPEC_HIDDEN; #endif /* __WINE_D3DX8_PRIVATE_H */ diff --git a/dll/directx/wine/d3d8/device.c b/dll/directx/wine/d3d8/device.c index f54f043e006..aa85c61c398 100644 --- a/dll/directx/wine/d3d8/device.c +++ b/dll/directx/wine/d3d8/device.c @@ -254,20 +254,15 @@ static void *d3d8_get_object(struct d3d8_handle_table *t, DWORD handle, enum d3d return entry->object; } -static ULONG WINAPI D3D8CB_DestroySwapChain(IWineD3DSwapChain *swapchain) +static inline IDirect3DDevice8Impl *impl_from_IDirect3DDevice8(IDirect3DDevice8 *iface) { - IUnknown *parent; - - TRACE("swapchain %p.\n", swapchain); - - parent = IWineD3DSwapChain_GetParent(swapchain); - return IUnknown_Release(parent); + return CONTAINING_RECORD(iface, IDirect3DDevice8Impl, IDirect3DDevice8_iface); } -/* IDirect3D IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DDevice8Impl_QueryInterface(LPDIRECT3DDEVICE8 iface,REFIID riid,LPVOID *ppobj) +static HRESULT WINAPI IDirect3DDevice8Impl_QueryInterface(IDirect3DDevice8 *iface, REFIID riid, + void **ppobj) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -279,20 +274,14 @@ static HRESULT WINAPI IDirect3DDevice8Impl_QueryInterface(LPDIRECT3DDEVICE8 ifac return S_OK; } - if (IsEqualGUID(riid, &IID_IWineD3DDeviceParent)) - { - IUnknown_AddRef((IUnknown *)&This->device_parent_vtbl); - *ppobj = &This->device_parent_vtbl; - return S_OK; - } - WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); *ppobj = NULL; return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DDevice8Impl_AddRef(LPDIRECT3DDEVICE8 iface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static ULONG WINAPI IDirect3DDevice8Impl_AddRef(IDirect3DDevice8 *iface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -300,8 +289,9 @@ static ULONG WINAPI IDirect3DDevice8Impl_AddRef(LPDIRECT3DDEVICE8 iface) { return ref; } -static ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static ULONG WINAPI IDirect3DDevice8Impl_Release(IDirect3DDevice8 *iface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); ULONG ref; if (This->inDestruction) return 0; @@ -312,7 +302,7 @@ static ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) { if (ref == 0) { unsigned i; - TRACE("Releasing wined3d device %p\n", This->WineD3DDevice); + TRACE("Releasing wined3d device %p.\n", This->wined3d_device); wined3d_mutex_lock(); @@ -323,9 +313,9 @@ static ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) { } HeapFree(GetProcessHeap(), 0, This->decls); - IWineD3DDevice_Uninit3D(This->WineD3DDevice, D3D8CB_DestroySwapChain); - IWineD3DDevice_ReleaseFocusWindow(This->WineD3DDevice); - IWineD3DDevice_Release(This->WineD3DDevice); + wined3d_device_uninit_3d(This->wined3d_device); + wined3d_device_release_focus_window(This->wined3d_device); + wined3d_device_decref(This->wined3d_device); HeapFree(GetProcessHeap(), 0, This->handle_table.entries); HeapFree(GetProcessHeap(), 0, This); @@ -337,33 +327,44 @@ static ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) { /* IDirect3DDevice Interface follow: */ static HRESULT WINAPI IDirect3DDevice8Impl_TestCooperativeLevel(IDirect3DDevice8 *iface) { + IDirect3DDevice8Impl *device = impl_from_IDirect3DDevice8(iface); + TRACE("iface %p.\n", iface); + if (device->lost) + { + TRACE("Device is lost.\n"); + return D3DERR_DEVICENOTRESET; + } + return D3D_OK; } -static UINT WINAPI IDirect3DDevice8Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE8 iface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static UINT WINAPI IDirect3DDevice8Impl_GetAvailableTextureMem(IDirect3DDevice8 *iface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetAvailableTextureMem(This->WineD3DDevice); + hr = wined3d_device_get_available_texture_mem(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_ResourceManagerDiscardBytes(LPDIRECT3DDEVICE8 iface, DWORD Bytes) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_ResourceManagerDiscardBytes(IDirect3DDevice8 *iface, + DWORD Bytes) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, byte_count %u.\n", iface, Bytes); FIXME("Byte count ignored.\n"); wined3d_mutex_lock(); - hr = IWineD3DDevice_EvictManagedResources(This->WineD3DDevice); + hr = wined3d_device_evict_managed_resources(This->wined3d_device); wined3d_mutex_unlock(); return hr; @@ -371,8 +372,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ResourceManagerDiscardBytes(LPDIRECT3 static HRESULT WINAPI IDirect3DDevice8Impl_GetDirect3D(IDirect3DDevice8 *iface, IDirect3D8 **ppD3D8) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3D *pWineD3D; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d *wined3d; HRESULT hr; TRACE("iface %p, d3d8 %p.\n", iface, ppD3D8); @@ -382,12 +383,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDirect3D(IDirect3DDevice8 *iface, } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetDirect3D(This->WineD3DDevice, &pWineD3D); - if (SUCCEEDED(hr) && pWineD3D) + hr = wined3d_device_get_wined3d(This->wined3d_device, &wined3d); + if (SUCCEEDED(hr) && wined3d) { - *ppD3D8 = IWineD3D_GetParent(pWineD3D); + *ppD3D8 = wined3d_get_parent(wined3d); IDirect3D8_AddRef(*ppD3D8); - IWineD3D_Release(pWineD3D); + wined3d_decref(wined3d); } else { @@ -401,8 +402,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDirect3D(IDirect3DDevice8 *iface, return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface, D3DCAPS8* pCaps) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(IDirect3DDevice8 *iface, D3DCAPS8 *pCaps) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hrc = D3D_OK; WINED3DCAPS *pWineCaps; @@ -417,7 +419,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface } wined3d_mutex_lock(); - hrc = IWineD3DDevice_GetDeviceCaps(This->WineD3DDevice, pWineCaps); + hrc = wined3d_device_get_device_caps(This->wined3d_device, pWineCaps); wined3d_mutex_unlock(); fixup_caps(pWineCaps); @@ -428,14 +430,16 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface return hrc; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetDisplayMode(LPDIRECT3DDEVICE8 iface, D3DDISPLAYMODE* pMode) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetDisplayMode(IDirect3DDevice8 *iface, + D3DDISPLAYMODE *pMode) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, mode %p.\n", iface, pMode); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetDisplayMode(This->WineD3DDevice, 0, (WINED3DDISPLAYMODE *) pMode); + hr = wined3d_device_get_display_mode(This->wined3d_device, 0, (WINED3DDISPLAYMODE *)pMode); wined3d_mutex_unlock(); if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); @@ -443,58 +447,67 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDisplayMode(LPDIRECT3DDEVICE8 ifac return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetCreationParameters(LPDIRECT3DDEVICE8 iface, D3DDEVICE_CREATION_PARAMETERS *pParameters) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetCreationParameters(IDirect3DDevice8 *iface, + D3DDEVICE_CREATION_PARAMETERS *pParameters) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, parameters %p.\n", iface, pParameters); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetCreationParameters(This->WineD3DDevice, (WINED3DDEVICE_CREATION_PARAMETERS *) pParameters); + hr = wined3d_device_get_creation_parameters(This->wined3d_device, + (WINED3DDEVICE_CREATION_PARAMETERS *)pParameters); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetCursorProperties(LPDIRECT3DDEVICE8 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface8* pCursorBitmap) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetCursorProperties(IDirect3DDevice8 *iface, + UINT XHotSpot, UINT YHotSpot, IDirect3DSurface8 *pCursorBitmap) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DSurface8Impl *pSurface = (IDirect3DSurface8Impl*)pCursorBitmap; HRESULT hr; TRACE("iface %p, hotspot_x %u, hotspot_y %u, bitmap %p.\n", iface, XHotSpot, YHotSpot, pCursorBitmap); - if(!pCursorBitmap) { - WARN("No cursor bitmap, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; + if (!pCursorBitmap) + { + WARN("No cursor bitmap, returning D3DERR_INVALIDCALL.\n"); + return D3DERR_INVALIDCALL; } wined3d_mutex_lock(); - hr = IWineD3DDevice_SetCursorProperties(This->WineD3DDevice,XHotSpot,YHotSpot,pSurface->wineD3DSurface); + hr = wined3d_device_set_cursor_properties(This->wined3d_device, XHotSpot, YHotSpot, pSurface->wined3d_surface); wined3d_mutex_unlock(); return hr; } -static void WINAPI IDirect3DDevice8Impl_SetCursorPosition(LPDIRECT3DDEVICE8 iface, UINT XScreenSpace, UINT YScreenSpace, DWORD Flags) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static void WINAPI IDirect3DDevice8Impl_SetCursorPosition(IDirect3DDevice8 *iface, + UINT XScreenSpace, UINT YScreenSpace, DWORD Flags) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); TRACE("iface %p, x %u, y %u, flags %#x.\n", iface, XScreenSpace, YScreenSpace, Flags); wined3d_mutex_lock(); - IWineD3DDevice_SetCursorPosition(This->WineD3DDevice, XScreenSpace, YScreenSpace, Flags); + wined3d_device_set_cursor_position(This->wined3d_device, XScreenSpace, YScreenSpace, Flags); wined3d_mutex_unlock(); } -static BOOL WINAPI IDirect3DDevice8Impl_ShowCursor(LPDIRECT3DDEVICE8 iface, BOOL bShow) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static BOOL WINAPI IDirect3DDevice8Impl_ShowCursor(IDirect3DDevice8 *iface, BOOL bShow) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); BOOL ret; TRACE("iface %p, show %#x.\n", iface, bShow); wined3d_mutex_lock(); - ret = IWineD3DDevice_ShowCursor(This->WineD3DDevice, bShow); + ret = wined3d_device_show_cursor(This->wined3d_device, bShow); wined3d_mutex_unlock(); return ret; @@ -503,7 +516,7 @@ static BOOL WINAPI IDirect3DDevice8Impl_ShowCursor(LPDIRECT3DDEVICE8 iface, BOOL static HRESULT WINAPI IDirect3DDevice8Impl_CreateAdditionalSwapChain(IDirect3DDevice8 *iface, D3DPRESENT_PARAMETERS *present_parameters, IDirect3DSwapChain8 **swapchain) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DSwapChain8Impl *object; HRESULT hr; @@ -526,18 +539,76 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateAdditionalSwapChain(IDirect3DDe } TRACE("Created swapchain %p.\n", object); - *swapchain = (IDirect3DSwapChain8 *)object; + *swapchain = &object->IDirect3DSwapChain8_iface; return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface, D3DPRESENT_PARAMETERS* pPresentationParameters) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI reset_enum_callback(struct wined3d_resource *resource, void *data) +{ + struct wined3d_resource_desc desc; + BOOL *resources_ok = data; + + wined3d_resource_get_desc(resource, &desc); + if (desc.pool == WINED3DPOOL_DEFAULT) + { + IDirect3DSurface8 *surface; + + if (desc.resource_type != WINED3DRTYPE_SURFACE) + { + WARN("Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.\n", resource); + *resources_ok = FALSE; + return S_FALSE; + } + + surface = wined3d_resource_get_parent(resource); + + IDirect3DSurface8_AddRef(surface); + if (IDirect3DSurface8_Release(surface)) + { + WARN("Surface %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.\n", surface, resource); + *resources_ok = FALSE; + return S_FALSE; + } + + WARN("Surface %p (resource %p) is an implicit resource with ref 0.\n", surface, resource); + } + + return S_OK; +} + +static HRESULT WINAPI IDirect3DDevice8Impl_Reset(IDirect3DDevice8 *iface, + D3DPRESENT_PARAMETERS *pPresentationParameters) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); WINED3DPRESENT_PARAMETERS localParameters; + BOOL resources_ok = TRUE; HRESULT hr; + UINT i; TRACE("iface %p, present_parameters %p.\n", iface, pPresentationParameters); + wined3d_mutex_lock(); + wined3d_device_set_index_buffer(This->wined3d_device, NULL, WINED3DFMT_UNKNOWN); + for (i = 0; i < 16; ++i) + { + wined3d_device_set_stream_source(This->wined3d_device, i, NULL, 0, 0); + } + for (i = 0; i < 16; ++i) + { + wined3d_device_set_texture(This->wined3d_device, i, NULL); + } + + wined3d_device_enum_resources(This->wined3d_device, reset_enum_callback, &resources_ok); + if (!resources_ok) + { + WARN("The application is holding D3DPOOL_DEFAULT resources, rejecting reset.\n"); + This->lost = TRUE; + wined3d_mutex_unlock(); + + return D3DERR_DEVICELOST; + } + localParameters.BackBufferWidth = pPresentationParameters->BackBufferWidth; localParameters.BackBufferHeight = pPresentationParameters->BackBufferHeight; localParameters.BackBufferFormat = wined3dformat_from_d3dformat(pPresentationParameters->BackBufferFormat); @@ -554,10 +625,15 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface, D3DPRE localParameters.PresentationInterval = pPresentationParameters->FullScreen_PresentationInterval; localParameters.AutoRestoreDisplayMode = TRUE; - wined3d_mutex_lock(); - hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters); - if(SUCCEEDED(hr)) { - hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0); + hr = wined3d_device_reset(This->wined3d_device, &localParameters); + if (SUCCEEDED(hr)) + { + hr = wined3d_device_set_render_state(This->wined3d_device, WINED3DRS_POINTSIZE_MIN, 0); + This->lost = FALSE; + } + else + { + This->lost = TRUE; } wined3d_mutex_unlock(); @@ -578,15 +654,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface, D3DPRE return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_Present(LPDIRECT3DDEVICE8 iface, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_Present(IDirect3DDevice8 *iface, const RECT *pSourceRect, + const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p.\n", iface, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); wined3d_mutex_lock(); - hr = IWineD3DDevice_Present(This->WineD3DDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); + hr = wined3d_device_present(This->wined3d_device, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); wined3d_mutex_unlock(); return hr; @@ -595,58 +673,64 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Present(LPDIRECT3DDEVICE8 iface, CONS static HRESULT WINAPI IDirect3DDevice8Impl_GetBackBuffer(IDirect3DDevice8 *iface, UINT BackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface8 **ppBackBuffer) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DSurface *retSurface = NULL; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_surface *wined3d_surface = NULL; HRESULT hr; TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", iface, BackBuffer, Type, ppBackBuffer); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, 0, BackBuffer, (WINED3DBACKBUFFER_TYPE)Type, &retSurface); - if (SUCCEEDED(hr) && retSurface && ppBackBuffer) + hr = wined3d_device_get_back_buffer(This->wined3d_device, 0, + BackBuffer, (WINED3DBACKBUFFER_TYPE)Type, &wined3d_surface); + if (SUCCEEDED(hr) && wined3d_surface && ppBackBuffer) { - *ppBackBuffer = IWineD3DSurface_GetParent(retSurface); + *ppBackBuffer = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface8_AddRef(*ppBackBuffer); - IWineD3DSurface_Release(retSurface); + wined3d_surface_decref(wined3d_surface); } wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetRasterStatus(LPDIRECT3DDEVICE8 iface, D3DRASTER_STATUS* pRasterStatus) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetRasterStatus(IDirect3DDevice8 *iface, + D3DRASTER_STATUS *pRasterStatus) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, raster_status %p.\n", iface, pRasterStatus); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetRasterStatus(This->WineD3DDevice, 0, (WINED3DRASTER_STATUS *) pRasterStatus); + hr = wined3d_device_get_raster_status(This->wined3d_device, 0, (WINED3DRASTER_STATUS *)pRasterStatus); wined3d_mutex_unlock(); return hr; } -static void WINAPI IDirect3DDevice8Impl_SetGammaRamp(LPDIRECT3DDEVICE8 iface, DWORD Flags, CONST D3DGAMMARAMP* pRamp) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static void WINAPI IDirect3DDevice8Impl_SetGammaRamp(IDirect3DDevice8 *iface, DWORD Flags, + const D3DGAMMARAMP *pRamp) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); TRACE("iface %p, flags %#x, ramp %p.\n", iface, Flags, pRamp); /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ wined3d_mutex_lock(); - IWineD3DDevice_SetGammaRamp(This->WineD3DDevice, 0, Flags, (CONST WINED3DGAMMARAMP *) pRamp); + wined3d_device_set_gamma_ramp(This->wined3d_device, 0, Flags, (const WINED3DGAMMARAMP *)pRamp); wined3d_mutex_unlock(); } -static void WINAPI IDirect3DDevice8Impl_GetGammaRamp(LPDIRECT3DDEVICE8 iface, D3DGAMMARAMP* pRamp) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static void WINAPI IDirect3DDevice8Impl_GetGammaRamp(IDirect3DDevice8 *iface, D3DGAMMARAMP *pRamp) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); TRACE("iface %p, ramp %p.\n", iface, pRamp); /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ wined3d_mutex_lock(); - IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, 0, (WINED3DGAMMARAMP *) pRamp); + wined3d_device_get_gamma_ramp(This->wined3d_device, 0, (WINED3DGAMMARAMP *)pRamp); wined3d_mutex_unlock(); } @@ -654,7 +738,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(IDirect3DDevice8 *iface UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture8 **texture) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DTexture8Impl *object; HRESULT hr; @@ -677,7 +761,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(IDirect3DDevice8 *iface } TRACE("Created texture %p.\n", object); - *texture = (IDirect3DTexture8 *)object; + *texture = &object->IDirect3DTexture8_iface; return D3D_OK; } @@ -686,7 +770,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(IDirect3DDevice8 UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture8 **texture) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DVolumeTexture8Impl *object; HRESULT hr; @@ -709,7 +793,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(IDirect3DDevice8 } TRACE("Created volume texture %p.\n", object); - *texture = (IDirect3DVolumeTexture8 *)object; + *texture = &object->IDirect3DVolumeTexture8_iface; return D3D_OK; } @@ -717,7 +801,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(IDirect3DDevice8 static HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(IDirect3DDevice8 *iface, UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture8 **texture) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DCubeTexture8Impl *object; HRESULT hr; @@ -740,15 +824,15 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(IDirect3DDevice8 *i } TRACE("Created cube texture %p.\n", object); - *texture = (IDirect3DCubeTexture8 *)object; + *texture = &object->IDirect3DCubeTexture8_iface; return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(IDirect3DDevice8 *iface, UINT size, DWORD usage, - DWORD fvf, D3DPOOL pool, IDirect3DVertexBuffer8 **buffer) +static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(IDirect3DDevice8 *iface, UINT size, + DWORD usage, DWORD fvf, D3DPOOL pool, IDirect3DVertexBuffer8 **buffer) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DVertexBuffer8Impl *object; HRESULT hr; @@ -776,10 +860,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(IDirect3DDevice8 * return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(IDirect3DDevice8 *iface, UINT size, DWORD usage, - D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer8 **buffer) +static HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(IDirect3DDevice8 *iface, UINT size, + DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer8 **buffer) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DIndexBuffer8Impl *object; HRESULT hr; @@ -807,17 +891,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(IDirect3DDevice8 *i return D3D_OK; } -static HRESULT IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT Width, UINT Height, - D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface8 **ppSurface, - UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality) +static HRESULT IDirect3DDevice8Impl_CreateSurface(IDirect3DDevice8Impl *device, UINT Width, + UINT Height, D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, + IDirect3DSurface8 **ppSurface, UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, + DWORD MultisampleQuality) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; IDirect3DSurface8Impl *object; HRESULT hr; - TRACE("iface %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p,\n" + TRACE("device %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p,\n" "\tusage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", - iface, Width, Height, Format, Lockable, Discard, Level, ppSurface, + device, Width, Height, Format, Lockable, Discard, Level, ppSurface, Usage, Pool, MultiSample, MultisampleQuality); object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DSurface8Impl)); @@ -827,8 +911,8 @@ static HRESULT IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT return D3DERR_OUTOFVIDEOMEMORY; } - hr = surface_init(object, This, Width, Height, Format, Lockable, Discard, - Level, Usage, Pool, MultiSample, MultisampleQuality); + hr = surface_init(object, device, Width, Height, Format, Lockable, Discard, Level, Usage, + Pool, MultiSample, MultisampleQuality); if (FAILED(hr)) { WARN("Failed to initialize surface, hr %#x.\n", hr); @@ -842,52 +926,66 @@ static HRESULT IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_CreateRenderTarget(LPDIRECT3DDEVICE8 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, BOOL Lockable, IDirect3DSurface8** ppSurface) { +static HRESULT WINAPI IDirect3DDevice8Impl_CreateRenderTarget(IDirect3DDevice8 *iface, UINT Width, + UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, BOOL Lockable, + IDirect3DSurface8 **ppSurface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, lockable %#x, surface %p.\n", iface, Width, Height, Format, MultiSample, Lockable, ppSurface); - hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, Lockable, FALSE /* Discard */, - 0 /* Level */, ppSurface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, MultiSample, 0); + hr = IDirect3DDevice8Impl_CreateSurface(This, Width, Height, Format, Lockable, + FALSE /* Discard */, 0 /* Level */, ppSurface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, + MultiSample, 0); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_CreateDepthStencilSurface(LPDIRECT3DDEVICE8 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, IDirect3DSurface8** ppSurface) { +static HRESULT WINAPI IDirect3DDevice8Impl_CreateDepthStencilSurface(IDirect3DDevice8 *iface, + UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, + IDirect3DSurface8 **ppSurface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, surface %p.\n", iface, Width, Height, Format, MultiSample, ppSurface); /* TODO: Verify that Discard is false */ - hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, FALSE, + hr = IDirect3DDevice8Impl_CreateSurface(This, Width, Height, Format, TRUE /* Lockable */, FALSE, 0 /* Level */, ppSurface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, MultiSample, 0); return hr; } /* IDirect3DDevice8Impl::CreateImageSurface returns surface with pool type SYSTEMMEM */ -static HRESULT WINAPI IDirect3DDevice8Impl_CreateImageSurface(LPDIRECT3DDEVICE8 iface, UINT Width, UINT Height, D3DFORMAT Format, IDirect3DSurface8** ppSurface) { +static HRESULT WINAPI IDirect3DDevice8Impl_CreateImageSurface(IDirect3DDevice8 *iface, UINT Width, + UINT Height, D3DFORMAT Format, IDirect3DSurface8 **ppSurface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, width %u, height %u, format %#x, surface %p.\n", iface, Width, Height, Format, ppSurface); - hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, FALSE /* Discard */, - 0 /* Level */, ppSurface, 0 /* Usage (undefined/none) */, D3DPOOL_SYSTEMMEM, D3DMULTISAMPLE_NONE, - 0 /* MultisampleQuality */); + hr = IDirect3DDevice8Impl_CreateSurface(This, Width, Height, Format, TRUE /* Lockable */, + FALSE /* Discard */, 0 /* Level */, ppSurface, 0 /* Usage (undefined/none) */, + D3DPOOL_SYSTEMMEM, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8 *pSourceSurface, CONST RECT *pSourceRects, UINT cRects, IDirect3DSurface8 *pDestinationSurface, CONST POINT *pDestPoints) { +static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface, + IDirect3DSurface8 *pSourceSurface, const RECT *pSourceRects, UINT cRects, + IDirect3DSurface8 *pDestinationSurface, const POINT *pDestPoints) +{ IDirect3DSurface8Impl *Source = (IDirect3DSurface8Impl *) pSourceSurface; IDirect3DSurface8Impl *Dest = (IDirect3DSurface8Impl *) pDestinationSurface; - - HRESULT hr = WINED3D_OK; enum wined3d_format_id srcFormat, destFormat; - WINED3DSURFACE_DESC winedesc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; TRACE("iface %p, src_surface %p, src_rects %p, rect_count %u, dst_surface %p, dst_points %p.\n", iface, pSourceSurface, pSourceRects, cRects, pDestinationSurface, pDestPoints); @@ -896,58 +994,81 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface, ID * destination texture is in WINED3DPOOL_DEFAULT. */ wined3d_mutex_lock(); - IWineD3DSurface_GetDesc(Source->wineD3DSurface, &winedesc); - srcFormat = winedesc.format; + wined3d_resource = wined3d_surface_get_resource(Source->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); + srcFormat = wined3d_desc.format; - IWineD3DSurface_GetDesc(Dest->wineD3DSurface, &winedesc); - destFormat = winedesc.format; + wined3d_resource = wined3d_surface_get_resource(Dest->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); + destFormat = wined3d_desc.format; /* Check that the source and destination formats match */ - if (srcFormat != destFormat && WINED3DFMT_UNKNOWN != destFormat) { - WARN("(%p) source %p format must match the dest %p format, returning WINED3DERR_INVALIDCALL\n", iface, pSourceSurface, pDestinationSurface); + if (srcFormat != destFormat && WINED3DFMT_UNKNOWN != destFormat) + { + WARN("Source %p format must match the dest %p format, returning D3DERR_INVALIDCALL.\n", + pSourceSurface, pDestinationSurface); wined3d_mutex_unlock(); - return WINED3DERR_INVALIDCALL; - } else if (WINED3DFMT_UNKNOWN == destFormat) { + return D3DERR_INVALIDCALL; + } + else if (WINED3DFMT_UNKNOWN == destFormat) + { TRACE("(%p) : Converting destination surface from WINED3DFMT_UNKNOWN to the source format\n", iface); - IWineD3DSurface_SetFormat(Dest->wineD3DSurface, srcFormat); + wined3d_surface_set_format(Dest->wined3d_surface, srcFormat); } /* Quick if complete copy ... */ - if (cRects == 0 && pSourceRects == NULL && pDestPoints == NULL) { - IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, NULL, WINEDDBLTFAST_NOCOLORKEY); - } else { + if (!cRects && !pSourceRects && !pDestPoints) + { + wined3d_surface_bltfast(Dest->wined3d_surface, 0, 0, + Source->wined3d_surface, NULL, WINEDDBLTFAST_NOCOLORKEY); + } + else + { unsigned int i; /* Copy rect by rect */ - if (NULL != pSourceRects && NULL != pDestPoints) { - for (i = 0; i < cRects; ++i) { - IWineD3DSurface_BltFast(Dest->wineD3DSurface, pDestPoints[i].x, pDestPoints[i].y, Source->wineD3DSurface, &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY); + if (pSourceRects && pDestPoints) + { + for (i = 0; i < cRects; ++i) + { + wined3d_surface_bltfast(Dest->wined3d_surface, pDestPoints[i].x, pDestPoints[i].y, + Source->wined3d_surface, &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY); } - } else { - for (i = 0; i < cRects; ++i) { - IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY); + } + else + { + for (i = 0; i < cRects; ++i) + { + wined3d_surface_bltfast(Dest->wined3d_surface, 0, 0, + Source->wined3d_surface, &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY); } } } wined3d_mutex_unlock(); - return hr; + return WINED3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_UpdateTexture(LPDIRECT3DDEVICE8 iface, IDirect3DBaseTexture8* pSourceTexture, IDirect3DBaseTexture8* pDestinationTexture) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_UpdateTexture(IDirect3DDevice8 *iface, + IDirect3DBaseTexture8 *src_texture, IDirect3DBaseTexture8 *dst_texture) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; - TRACE("iface %p, src_texture %p, dst_texture %p.\n", iface, pSourceTexture, pDestinationTexture); + TRACE("iface %p, src_texture %p, dst_texture %p.\n", iface, src_texture, dst_texture); wined3d_mutex_lock(); - hr = IWineD3DDevice_UpdateTexture(This->WineD3DDevice, ((IDirect3DBaseTexture8Impl *)pSourceTexture)->wineD3DBaseTexture, ((IDirect3DBaseTexture8Impl *)pDestinationTexture)->wineD3DBaseTexture); + hr = wined3d_device_update_texture(This->wined3d_device, + ((IDirect3DBaseTexture8Impl *)src_texture)->wined3d_texture, + ((IDirect3DBaseTexture8Impl *)dst_texture)->wined3d_texture); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetFrontBuffer(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pDestSurface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetFrontBuffer(IDirect3DDevice8 *iface, + IDirect3DSurface8 *pDestSurface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DSurface8Impl *destSurface = (IDirect3DSurface8Impl *)pDestSurface; HRESULT hr; @@ -959,32 +1080,70 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetFrontBuffer(LPDIRECT3DDEVICE8 ifac } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetFrontBufferData(This->WineD3DDevice, 0, destSurface->wineD3DSurface); + hr = wined3d_device_get_front_buffer_data(This->wined3d_device, 0, destSurface->wined3d_surface); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pRenderTarget, IDirect3DSurface8* pNewZStencil) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(IDirect3DDevice8 *iface, + IDirect3DSurface8 *pRenderTarget, IDirect3DSurface8 *pNewZStencil) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DSurface8Impl *pSurface = (IDirect3DSurface8Impl *)pRenderTarget; IDirect3DSurface8Impl *pZSurface = (IDirect3DSurface8Impl *)pNewZStencil; - IWineD3DSurface *original_ds = NULL; + struct wined3d_surface *original_ds = NULL; HRESULT hr; TRACE("iface %p, render_target %p, depth_stencil %p.\n", iface, pRenderTarget, pNewZStencil); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice, &original_ds); + if (pZSurface) + { + struct wined3d_resource_desc ds_desc, rt_desc; + struct wined3d_resource *wined3d_resource; + IDirect3DSurface8 *orig_rt = NULL; + + /* If no render target is passed in check the size against the current RT */ + if (!pRenderTarget) + { + hr = IDirect3DDevice8_GetRenderTarget(iface, &orig_rt); + if (FAILED(hr)) + { + wined3d_mutex_unlock(); + return hr; + } + pSurface = (IDirect3DSurface8Impl *)orig_rt; + } + + wined3d_resource = wined3d_surface_get_resource(pZSurface->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &ds_desc); + wined3d_resource = wined3d_surface_get_resource(pSurface->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &rt_desc); + if (orig_rt) IDirect3DSurface8_Release(orig_rt); + + if (ds_desc.width < rt_desc.width || ds_desc.height < rt_desc.height) + { + WARN("Depth stencil is smaller than the render target, returning D3DERR_INVALIDCALL\n"); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; + } + } + + hr = wined3d_device_get_depth_stencil(This->wined3d_device, &original_ds); if (hr == WINED3D_OK || hr == WINED3DERR_NOTFOUND) { - hr = IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, pZSurface ? pZSurface->wineD3DSurface : NULL); - if (SUCCEEDED(hr) && pSurface) - hr = IWineD3DDevice_SetRenderTarget(This->WineD3DDevice, 0, pSurface->wineD3DSurface, TRUE); - if (FAILED(hr)) IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, original_ds); + hr = wined3d_device_set_depth_stencil(This->wined3d_device, pZSurface ? pZSurface->wined3d_surface : NULL); + if (SUCCEEDED(hr) && pRenderTarget) + { + hr = wined3d_device_set_render_target(This->wined3d_device, 0, pSurface->wined3d_surface, TRUE); + if (FAILED(hr)) + wined3d_device_set_depth_stencil(This->wined3d_device, original_ds); + } } - if (original_ds) IWineD3DSurface_Release(original_ds); + if (original_ds) + wined3d_surface_decref(original_ds); wined3d_mutex_unlock(); @@ -994,8 +1153,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(LPDIRECT3DDEVICE8 ifa static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(IDirect3DDevice8 *iface, IDirect3DSurface8 **ppRenderTarget) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DSurface *pRenderTarget; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_surface *wined3d_surface; HRESULT hr; TRACE("iface %p, render_target %p.\n", iface, ppRenderTarget); @@ -1005,12 +1164,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(IDirect3DDevice8 *ifa } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetRenderTarget(This->WineD3DDevice, 0, &pRenderTarget); - if (SUCCEEDED(hr) && pRenderTarget) + hr = wined3d_device_get_render_target(This->wined3d_device, 0, &wined3d_surface); + if (SUCCEEDED(hr) && wined3d_surface) { - *ppRenderTarget = IWineD3DSurface_GetParent(pRenderTarget); + *ppRenderTarget = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface8_AddRef(*ppRenderTarget); - IWineD3DSurface_Release(pRenderTarget); + wined3d_surface_decref(wined3d_surface); } else { @@ -1025,8 +1184,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(IDirect3DDevice8 *ifa static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(IDirect3DDevice8 *iface, IDirect3DSurface8 **ppZStencilSurface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DSurface *pZStencilSurface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_surface *wined3d_surface; HRESULT hr; TRACE("iface %p, depth_stencil %p.\n", iface, ppZStencilSurface); @@ -1036,12 +1195,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(IDirect3DDevic } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice, &pZStencilSurface); + hr = wined3d_device_get_depth_stencil(This->wined3d_device, &wined3d_surface); if (SUCCEEDED(hr)) { - *ppZStencilSurface = IWineD3DSurface_GetParent(pZStencilSurface); + *ppZStencilSurface = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface8_AddRef(*ppZStencilSurface); - IWineD3DSurface_Release(pZStencilSurface); + wined3d_surface_decref(wined3d_surface); } else { @@ -1054,266 +1213,336 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(IDirect3DDevic return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_BeginScene(LPDIRECT3DDEVICE8 iface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_BeginScene(IDirect3DDevice8 *iface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_BeginScene(This->WineD3DDevice); + hr = wined3d_device_begin_scene(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice8Impl_EndScene(LPDIRECT3DDEVICE8 iface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice8Impl_EndScene(IDirect3DDevice8 *iface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_EndScene(This->WineD3DDevice); + hr = wined3d_device_end_scene(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_Clear(IDirect3DDevice8 *iface, DWORD Count, + const D3DRECT *pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, rect_count %u, rects %p, flags %#x, color 0x%08x, z %.8e, stencil %u.\n", iface, Count, pRects, Flags, Color, Z, Stencil); wined3d_mutex_lock(); - hr = IWineD3DDevice_Clear(This->WineD3DDevice, Count, (const RECT *)pRects, Flags, Color, Z, Stencil); + hr = wined3d_device_clear(This->wined3d_device, Count, (const RECT *)pRects, Flags, Color, Z, Stencil); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* lpMatrix) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(IDirect3DDevice8 *iface, + D3DTRANSFORMSTATETYPE State, const D3DMATRIX *lpMatrix) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, State, lpMatrix); /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetTransform(This->WineD3DDevice, State, (CONST WINED3DMATRIX*) lpMatrix); + hr = wined3d_device_set_transform(This->wined3d_device, State, (const WINED3DMATRIX *)lpMatrix); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(IDirect3DDevice8 *iface, + D3DTRANSFORMSTATETYPE State, D3DMATRIX *pMatrix) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, State, pMatrix); /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetTransform(This->WineD3DDevice, State, (WINED3DMATRIX*) pMatrix); + hr = wined3d_device_get_transform(This->wined3d_device, State, (WINED3DMATRIX *)pMatrix); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_MultiplyTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_MultiplyTransform(IDirect3DDevice8 *iface, + D3DTRANSFORMSTATETYPE State, const D3DMATRIX *pMatrix) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, State, pMatrix); /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ wined3d_mutex_lock(); - hr = IWineD3DDevice_MultiplyTransform(This->WineD3DDevice, State, (CONST WINED3DMATRIX*) pMatrix); + hr = wined3d_device_multiply_transform(This->wined3d_device, State, (const WINED3DMATRIX *)pMatrix); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetViewport(LPDIRECT3DDEVICE8 iface, CONST D3DVIEWPORT8* pViewport) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetViewport(IDirect3DDevice8 *iface, + const D3DVIEWPORT8 *pViewport) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, pViewport); /* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetViewport(This->WineD3DDevice, (const WINED3DVIEWPORT *)pViewport); + hr = wined3d_device_set_viewport(This->wined3d_device, (const WINED3DVIEWPORT *)pViewport); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetViewport(LPDIRECT3DDEVICE8 iface, D3DVIEWPORT8* pViewport) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetViewport(IDirect3DDevice8 *iface, + D3DVIEWPORT8 *pViewport) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, pViewport); /* Note: D3DVIEWPORT8 is compatible with WINED3DVIEWPORT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetViewport(This->WineD3DDevice, (WINED3DVIEWPORT *)pViewport); + hr = wined3d_device_get_viewport(This->wined3d_device, (WINED3DVIEWPORT *)pViewport); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetMaterial(LPDIRECT3DDEVICE8 iface, CONST D3DMATERIAL8* pMaterial) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetMaterial(IDirect3DDevice8 *iface, + const D3DMATERIAL8 *pMaterial) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, material %p.\n", iface, pMaterial); /* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetMaterial(This->WineD3DDevice, (const WINED3DMATERIAL *)pMaterial); + hr = wined3d_device_set_material(This->wined3d_device, (const WINED3DMATERIAL *)pMaterial); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetMaterial(LPDIRECT3DDEVICE8 iface, D3DMATERIAL8* pMaterial) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetMaterial(IDirect3DDevice8 *iface, + D3DMATERIAL8 *pMaterial) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, material %p.\n", iface, pMaterial); /* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetMaterial(This->WineD3DDevice, (WINED3DMATERIAL *)pMaterial); + hr = wined3d_device_get_material(This->wined3d_device, (WINED3DMATERIAL *)pMaterial); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetLight(LPDIRECT3DDEVICE8 iface, DWORD Index, CONST D3DLIGHT8* pLight) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetLight(IDirect3DDevice8 *iface, DWORD Index, + const D3DLIGHT8 *pLight) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, index %u, light %p.\n", iface, Index, pLight); /* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetLight(This->WineD3DDevice, Index, (const WINED3DLIGHT *)pLight); + hr = wined3d_device_set_light(This->wined3d_device, Index, (const WINED3DLIGHT *)pLight); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetLight(LPDIRECT3DDEVICE8 iface, DWORD Index,D3DLIGHT8* pLight) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetLight(IDirect3DDevice8 *iface, DWORD Index, + D3DLIGHT8 *pLight) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, index %u, light %p.\n", iface, Index, pLight); /* Note: D3DLIGHT8 is compatible with WINED3DLIGHT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetLight(This->WineD3DDevice, Index, (WINED3DLIGHT *)pLight); + hr = wined3d_device_get_light(This->wined3d_device, Index, (WINED3DLIGHT *)pLight); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface, DWORD Index,BOOL Enable) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(IDirect3DDevice8 *iface, DWORD Index, + BOOL Enable) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, index %u, enable %#x.\n", iface, Index, Enable); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetLightEnable(This->WineD3DDevice, Index, Enable); + hr = wined3d_device_set_light_enable(This->wined3d_device, Index, Enable); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetLightEnable(LPDIRECT3DDEVICE8 iface, DWORD Index,BOOL* pEnable) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetLightEnable(IDirect3DDevice8 *iface, DWORD Index, + BOOL *pEnable) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, index %u, enable %p.\n", iface, Index, pEnable); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetLightEnable(This->WineD3DDevice, Index, pEnable); + hr = wined3d_device_get_light_enable(This->wined3d_device, Index, pEnable); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetClipPlane(LPDIRECT3DDEVICE8 iface, DWORD Index,CONST float* pPlane) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetClipPlane(IDirect3DDevice8 *iface, DWORD Index, + const float *pPlane) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetClipPlane(This->WineD3DDevice, Index, pPlane); + hr = wined3d_device_set_clip_plane(This->wined3d_device, Index, pPlane); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetClipPlane(LPDIRECT3DDEVICE8 iface, DWORD Index,float* pPlane) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetClipPlane(IDirect3DDevice8 *iface, DWORD Index, + float *pPlane) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetClipPlane(This->WineD3DDevice, Index, pPlane); + hr = wined3d_device_get_clip_plane(This->wined3d_device, Index, pPlane); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3DRENDERSTATETYPE State,DWORD Value) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +/* This factor is the result of a trial-and-error search. Both ZBIAS and DEPTHBIAS require + * guesswork by design. d3d9 apps usually use a DEPTHBIAS of -0.00002(Mass Effect 2, WoW). + * d3d8 apps(Final Fantasy XI) set ZBIAS to 15 and still expect the depth test to sort + * objects properly. */ +static const float zbias_factor = -0.000005f; + +static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(IDirect3DDevice8 *iface, + D3DRENDERSTATETYPE State, DWORD Value) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; + union + { + DWORD d; + float f; + } wined3d_value; TRACE("iface %p, state %#x, value %#x.\n", iface, State, Value); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, State, Value); + switch (State) + { + case D3DRS_ZBIAS: + wined3d_value.f = Value * zbias_factor; + hr = wined3d_device_set_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, wined3d_value.d); + break; + + default: + hr = wined3d_device_set_render_state(This->wined3d_device, State, Value); + } wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderState(LPDIRECT3DDEVICE8 iface, D3DRENDERSTATETYPE State,DWORD* pValue) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderState(IDirect3DDevice8 *iface, + D3DRENDERSTATETYPE State, DWORD *pValue) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; + union + { + DWORD d; + float f; + } wined3d_value; TRACE("iface %p, state %#x, value %p.\n", iface, State, pValue); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, State, pValue); + switch (State) + { + case D3DRS_ZBIAS: + hr = wined3d_device_get_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, &wined3d_value.d); + if (SUCCEEDED(hr)) *pValue = (DWORD)(wined3d_value.f / zbias_factor); + break; + + default: + hr = wined3d_device_get_render_state(This->wined3d_device, State, pValue); + } wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_BeginStateBlock(LPDIRECT3DDEVICE8 iface) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_BeginStateBlock(IDirect3DDevice8 *iface) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_BeginStateBlock(This->WineD3DDevice); + hr = wined3d_device_begin_stateblock(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface, DWORD* pToken) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DStateBlock *stateblock; +static HRESULT WINAPI IDirect3DDevice8Impl_EndStateBlock(IDirect3DDevice8 *iface, DWORD *pToken) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_stateblock *stateblock; HRESULT hr; TRACE("iface %p, token %p.\n", iface, pToken); @@ -1322,8 +1551,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface * of memory later and cause locking problems) */ wined3d_mutex_lock(); - hr = IWineD3DDevice_EndStateBlock(This->WineD3DDevice , &stateblock); - if (hr != D3D_OK) { + hr = wined3d_device_end_stateblock(This->wined3d_device, &stateblock); + if (FAILED(hr)) + { WARN("IWineD3DDevice_EndStateBlock returned an error\n"); wined3d_mutex_unlock(); return hr; @@ -1336,7 +1566,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface { ERR("Failed to create a handle\n"); wined3d_mutex_lock(); - IWineD3DStateBlock_Release(stateblock); + wined3d_stateblock_decref(stateblock); wined3d_mutex_unlock(); return E_FAIL; } @@ -1347,9 +1577,34 @@ static HRESULT WINAPI IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_ApplyStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DStateBlock *stateblock; +static HRESULT WINAPI IDirect3DDevice8Impl_ApplyStateBlock(IDirect3DDevice8 *iface, DWORD Token) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_stateblock *stateblock; + HRESULT hr; + + TRACE("iface %p, token %#x.\n", iface, Token); + + if (!Token) return D3D_OK; + + wined3d_mutex_lock(); + stateblock = d3d8_get_object(&This->handle_table, Token - 1, D3D8_HANDLE_SB); + if (!stateblock) + { + WARN("Invalid handle (%#x) passed.\n", Token); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; + } + hr = wined3d_stateblock_apply(stateblock); + wined3d_mutex_unlock(); + + return hr; +} + +static HRESULT WINAPI IDirect3DDevice8Impl_CaptureStateBlock(IDirect3DDevice8 *iface, DWORD Token) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_stateblock *stateblock; HRESULT hr; TRACE("iface %p, token %#x.\n", iface, Token); @@ -1362,36 +1617,16 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ApplyStateBlock(LPDIRECT3DDEVICE8 ifa wined3d_mutex_unlock(); return D3DERR_INVALIDCALL; } - hr = IWineD3DStateBlock_Apply(stateblock); + hr = wined3d_stateblock_capture(stateblock); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_CaptureStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DStateBlock *stateblock; - HRESULT hr; - - TRACE("iface %p, token %#x.\n", iface, Token); - - wined3d_mutex_lock(); - stateblock = d3d8_get_object(&This->handle_table, Token - 1, D3D8_HANDLE_SB); - if (!stateblock) - { - WARN("Invalid handle (%#x) passed.\n", Token); - wined3d_mutex_unlock(); - return D3DERR_INVALIDCALL; - } - hr = IWineD3DStateBlock_Capture(stateblock); - wined3d_mutex_unlock(); - - return hr; -} - -static HRESULT WINAPI IDirect3DDevice8Impl_DeleteStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DStateBlock *stateblock; +static HRESULT WINAPI IDirect3DDevice8Impl_DeleteStateBlock(IDirect3DDevice8 *iface, DWORD Token) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_stateblock *stateblock; TRACE("iface %p, token %#x.\n", iface, Token); @@ -1405,7 +1640,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteStateBlock(LPDIRECT3DDEVICE8 if return D3DERR_INVALIDCALL; } - if (IWineD3DStateBlock_Release((IUnknown *)stateblock)) + if (wined3d_stateblock_decref(stateblock)) { ERR("Stateblock %p has references left, this shouldn't happen.\n", stateblock); } @@ -1417,8 +1652,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteStateBlock(LPDIRECT3DDEVICE8 if static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(IDirect3DDevice8 *iface, D3DSTATEBLOCKTYPE Type, DWORD *handle) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DStateBlock *stateblock; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_stateblock *stateblock; HRESULT hr; TRACE("iface %p, type %#x, handle %p.\n", iface, Type, handle); @@ -1432,7 +1667,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(IDirect3DDevice8 *if } wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateStateBlock(This->WineD3DDevice, (WINED3DSTATEBLOCKTYPE)Type, &stateblock); + hr = wined3d_stateblock_create(This->wined3d_device, (WINED3DSTATEBLOCKTYPE)Type, &stateblock); if (FAILED(hr)) { wined3d_mutex_unlock(); @@ -1447,7 +1682,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(IDirect3DDevice8 *if { ERR("Failed to allocate a handle.\n"); wined3d_mutex_lock(); - IWineD3DStateBlock_Release(stateblock); + wined3d_stateblock_decref(stateblock); wined3d_mutex_unlock(); return E_FAIL; } @@ -1458,28 +1693,32 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(IDirect3DDevice8 *if return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetClipStatus(LPDIRECT3DDEVICE8 iface, CONST D3DCLIPSTATUS8* pClipStatus) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetClipStatus(IDirect3DDevice8 *iface, + const D3DCLIPSTATUS8 *pClipStatus) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); /* FIXME: Verify that D3DCLIPSTATUS8 ~= WINED3DCLIPSTATUS */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetClipStatus(This->WineD3DDevice, (const WINED3DCLIPSTATUS *)pClipStatus); + hr = wined3d_device_set_clip_status(This->wined3d_device, (const WINED3DCLIPSTATUS *)pClipStatus); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetClipStatus(LPDIRECT3DDEVICE8 iface, D3DCLIPSTATUS8* pClipStatus) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetClipStatus(IDirect3DDevice8 *iface, + D3DCLIPSTATUS8 *pClipStatus) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetClipStatus(This->WineD3DDevice, (WINED3DCLIPSTATUS *)pClipStatus); + hr = wined3d_device_get_clip_status(This->wined3d_device, (WINED3DCLIPSTATUS *)pClipStatus); wined3d_mutex_unlock(); return hr; @@ -1488,8 +1727,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetClipStatus(LPDIRECT3DDEVICE8 iface static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(IDirect3DDevice8 *iface, DWORD Stage, IDirect3DBaseTexture8 **ppTexture) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DBaseTexture *retTexture; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_texture *wined3d_texture; HRESULT hr; TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, ppTexture); @@ -1499,7 +1738,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(IDirect3DDevice8 *iface, } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, &retTexture); + hr = wined3d_device_get_texture(This->wined3d_device, Stage, &wined3d_texture); if (FAILED(hr)) { WARN("Failed to get texture for stage %u, hr %#x.\n", Stage, hr); @@ -1508,11 +1747,11 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(IDirect3DDevice8 *iface, return hr; } - if (retTexture) + if (wined3d_texture) { - *ppTexture = IWineD3DBaseTexture_GetParent(retTexture); + *ppTexture = wined3d_texture_get_parent(wined3d_texture); IDirect3DBaseTexture8_AddRef(*ppTexture); - IWineD3DBaseTexture_Release(retTexture); + wined3d_texture_decref(wined3d_texture); } else { @@ -1523,15 +1762,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(IDirect3DDevice8 *iface, return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage, IDirect3DBaseTexture8* pTexture) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(IDirect3DDevice8 *iface, DWORD Stage, + IDirect3DBaseTexture8 *pTexture) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, pTexture); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetTexture(This->WineD3DDevice, Stage, - pTexture==NULL ? NULL : ((IDirect3DBaseTexture8Impl *)pTexture)->wineD3DBaseTexture); + hr = wined3d_device_set_texture(This->wined3d_device, Stage, + pTexture ? ((IDirect3DBaseTexture8Impl *)pTexture)->wined3d_texture : NULL); wined3d_mutex_unlock(); return hr; @@ -1575,9 +1816,10 @@ tss_lookup[] = {FALSE, WINED3DTSS_RESULTARG}, /* 28, D3DTSS_RESULTARG */ }; -static HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD *pValue) +static HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(IDirect3DDevice8 *iface, + DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD *pValue) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); const struct tss_lookup *l; HRESULT hr; @@ -1592,16 +1834,19 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVI l = &tss_lookup[Type]; wined3d_mutex_lock(); - if (l->sampler_state) hr = IWineD3DDevice_GetSamplerState(This->WineD3DDevice, Stage, l->state, pValue); - else hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, l->state, pValue); + if (l->sampler_state) + hr = wined3d_device_get_sampler_state(This->wined3d_device, Stage, l->state, pValue); + else + hr = wined3d_device_get_texture_stage_state(This->wined3d_device, Stage, l->state, pValue); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) +static HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(IDirect3DDevice8 *iface, + DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); const struct tss_lookup *l; HRESULT hr; @@ -1616,21 +1861,25 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE l = &tss_lookup[Type]; wined3d_mutex_lock(); - if (l->sampler_state) hr = IWineD3DDevice_SetSamplerState(This->WineD3DDevice, Stage, l->state, Value); - else hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, l->state, Value); + if (l->sampler_state) + hr = wined3d_device_set_sampler_state(This->wined3d_device, Stage, l->state, Value); + else + hr = wined3d_device_set_texture_stage_state(This->wined3d_device, Stage, l->state, Value); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_ValidateDevice(LPDIRECT3DDEVICE8 iface, DWORD* pNumPasses) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_ValidateDevice(IDirect3DDevice8 *iface, + DWORD *pNumPasses) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, pass_count %p.\n", iface, pNumPasses); wined3d_mutex_lock(); - hr = IWineD3DDevice_ValidateDevice(This->WineD3DDevice, pNumPasses); + hr = wined3d_device_validate_device(This->wined3d_device, pNumPasses); wined3d_mutex_unlock(); return hr; @@ -1644,103 +1893,116 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetInfo(IDirect3DDevice8 *iface, return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetPaletteEntries(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetPaletteEntries(IDirect3DDevice8 *iface, + UINT PaletteNumber, const PALETTEENTRY *pEntries) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries); + hr = wined3d_device_set_palette_entries(This->wined3d_device, PaletteNumber, pEntries); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetPaletteEntries(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber, PALETTEENTRY* pEntries) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetPaletteEntries(IDirect3DDevice8 *iface, + UINT PaletteNumber, PALETTEENTRY *pEntries) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries); + hr = wined3d_device_get_palette_entries(This->wined3d_device, PaletteNumber, pEntries); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetCurrentTexturePalette(IDirect3DDevice8 *iface, + UINT PaletteNumber) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, palette_idx %u.\n", iface, PaletteNumber); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber); + hr = wined3d_device_set_current_texture_palette(This->wined3d_device, PaletteNumber); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface, UINT *PaletteNumber) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetCurrentTexturePalette(IDirect3DDevice8 *iface, + UINT *PaletteNumber) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, palette_idx %p.\n", iface, PaletteNumber); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber); + hr = wined3d_device_get_current_texture_palette(This->wined3d_device, PaletteNumber); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DrawPrimitive(IDirect3DDevice8 *iface, D3DPRIMITIVETYPE PrimitiveType, - UINT StartVertex, UINT PrimitiveCount) +static HRESULT WINAPI IDirect3DDevice8Impl_DrawPrimitive(IDirect3DDevice8 *iface, + D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, start_vertex %u, primitive_count %u.\n", iface, PrimitiveType, StartVertex, PrimitiveCount); wined3d_mutex_lock(); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawPrimitive(This->WineD3DDevice, StartVertex, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_primitive(This->wined3d_device, StartVertex, vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DrawIndexedPrimitive(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType, - UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DrawIndexedPrimitive(IDirect3DDevice8 *iface, + D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, + UINT primCount) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, start_idx %u, primitive_count %u.\n", iface, PrimitiveType, MinVertexIndex, NumVertices, startIndex, primCount); wined3d_mutex_lock(); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, startIndex, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_indexed_primitive(This->wined3d_device, startIndex, vertex_count_from_primitive_count(PrimitiveType, primCount)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DrawPrimitiveUP(IDirect3DDevice8 *iface, + D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, const void *pVertexStreamZeroData, + UINT VertexStreamZeroStride) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, primitive_count %u, data %p, stride %u.\n", iface, PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_lock(); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawPrimitiveUP(This->WineD3DDevice, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_primitive_up(This->wined3d_device, vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount), pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_unlock(); @@ -1748,11 +2010,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE8 ifa return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex, - UINT NumVertexIndices,UINT PrimitiveCount,CONST void* pIndexData, - D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData, - UINT VertexStreamZeroStride) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface, + D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertexIndices, + UINT PrimitiveCount, const void *pIndexData, D3DFORMAT IndexDataFormat, + const void *pVertexStreamZeroData, UINT VertexStreamZeroStride) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, index_count %u, primitive_count %u,\n" @@ -1761,8 +2024,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDEVI pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_lock(); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->WineD3DDevice, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_indexed_primitive_up(This->wined3d_device, vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount), pIndexData, wined3dformat_from_d3dformat(IndexDataFormat), pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_unlock(); @@ -1770,8 +2033,11 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDEVI return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(LPDIRECT3DDEVICE8 iface, UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(IDirect3DDevice8 *iface, + UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer8 *pDestBuffer, + DWORD Flags) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; IDirect3DVertexBuffer8Impl *dest = (IDirect3DVertexBuffer8Impl *) pDestBuffer; @@ -1779,7 +2045,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(LPDIRECT3DDEVICE8 ifa iface, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, Flags); wined3d_mutex_lock(); - hr = IWineD3DDevice_ProcessVertices(This->WineD3DDevice,SrcStartIndex, DestIndex, VertexCount, dest->wineD3DVertexBuffer, NULL, Flags, dest->fvf); + hr = wined3d_device_process_vertices(This->wined3d_device, SrcStartIndex, DestIndex, + VertexCount, dest->wineD3DVertexBuffer, NULL, Flags, dest->fvf); wined3d_mutex_unlock(); return hr; @@ -1788,7 +2055,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(LPDIRECT3DDEVICE8 ifa static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexShader(IDirect3DDevice8 *iface, const DWORD *declaration, const DWORD *byte_code, DWORD *shader, DWORD usage) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DVertexShader8Impl *object; DWORD shader_handle; DWORD handle; @@ -1898,8 +2165,9 @@ static IDirect3DVertexDeclaration8Impl *IDirect3DDevice8Impl_FindDecl(IDirect3DD return d3d8_declaration; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(IDirect3DDevice8 *iface, DWORD pShader) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DVertexShader8Impl *shader; HRESULT hr; @@ -1909,9 +2177,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 ifa TRACE("Setting FVF, %#x\n", pShader); wined3d_mutex_lock(); - IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, + wined3d_device_set_vertex_declaration(This->wined3d_device, IDirect3DDevice8Impl_FindDecl(This, pShader)->wined3d_vertex_declaration); - IWineD3DDevice_SetVertexShader(This->WineD3DDevice, NULL); + wined3d_device_set_vertex_shader(This->wined3d_device, NULL); wined3d_mutex_unlock(); return D3D_OK; @@ -1929,9 +2197,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 ifa return D3DERR_INVALIDCALL; } - hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, + hr = wined3d_device_set_vertex_declaration(This->wined3d_device, ((IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration)->wined3d_vertex_declaration); - if (SUCCEEDED(hr)) hr = IWineD3DDevice_SetVertexShader(This->WineD3DDevice, shader->wineD3DVertexShader); + if (SUCCEEDED(hr)) + hr = wined3d_device_set_vertex_shader(This->wined3d_device, shader->wined3d_shader); wined3d_mutex_unlock(); TRACE("Returning hr %#x\n", hr); @@ -1941,20 +2210,20 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 ifa static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(IDirect3DDevice8 *iface, DWORD *ppShader) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DVertexDeclaration *wined3d_declaration; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_vertex_declaration *wined3d_declaration; IDirect3DVertexDeclaration8 *d3d8_declaration; HRESULT hr; TRACE("iface %p, shader %p.\n", iface, ppShader); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &wined3d_declaration); + hr = wined3d_device_get_vertex_declaration(This->wined3d_device, &wined3d_declaration); if (FAILED(hr)) { wined3d_mutex_unlock(); WARN("(%p) : Call to IWineD3DDevice_GetVertexDeclaration failed %#x (device %p)\n", - This, hr, This->WineD3DDevice); + This, hr, This->wined3d_device); return hr; } @@ -1965,8 +2234,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(IDirect3DDevice8 *ifa return D3D_OK; } - d3d8_declaration = IWineD3DVertexDeclaration_GetParent(wined3d_declaration); - IWineD3DVertexDeclaration_Release(wined3d_declaration); + d3d8_declaration = wined3d_vertex_declaration_get_parent(wined3d_declaration); + wined3d_vertex_declaration_decref(wined3d_declaration); wined3d_mutex_unlock(); *ppShader = ((IDirect3DVertexDeclaration8Impl *)d3d8_declaration)->shader_handle; @@ -1975,10 +2244,11 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(IDirect3DDevice8 *ifa return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(IDirect3DDevice8 *iface, DWORD pShader) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DVertexShader8Impl *shader; - IWineD3DVertexShader *cur; + struct wined3d_shader *cur; TRACE("iface %p, shader %#x.\n", iface, pShader); @@ -1992,16 +2262,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE return D3DERR_INVALIDCALL; } - cur = IWineD3DDevice_GetVertexShader(This->WineD3DDevice); + cur = wined3d_device_get_vertex_shader(This->wined3d_device); if (cur) { - if (cur == shader->wineD3DVertexShader) IDirect3DDevice8_SetVertexShader(iface, 0); - IWineD3DVertexShader_Release(cur); + if (cur == shader->wined3d_shader) + IDirect3DDevice8_SetVertexShader(iface, 0); + wined3d_shader_decref(cur); } wined3d_mutex_unlock(); - if (IUnknown_Release((IUnknown *)shader)) + if (IDirect3DVertexShader8_Release(&shader->IDirect3DVertexShader8_iface)) { ERR("Shader %p has references left, this shouldn't happen.\n", shader); } @@ -2009,8 +2280,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, CONST void* pConstantData, DWORD ConstantCount) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(IDirect3DDevice8 *iface, + DWORD Register, const void *pConstantData, DWORD ConstantCount) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, register %u, data %p, count %u.\n", @@ -2023,14 +2296,16 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(LPDIRECT3DDEV } wined3d_mutex_lock(); - hr = IWineD3DDevice_SetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount); + hr = wined3d_device_set_vs_consts_f(This->wined3d_device, Register, pConstantData, ConstantCount); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, void* pConstantData, DWORD ConstantCount) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(IDirect3DDevice8 *iface, + DWORD Register, void *pConstantData, DWORD ConstantCount) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, register %u, data %p, count %u.\n", @@ -2043,14 +2318,16 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(LPDIRECT3DDEV } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetVertexShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount); + hr = wined3d_device_get_vs_consts_f(This->wined3d_device, Register, pConstantData, ConstantCount); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderDeclaration(LPDIRECT3DDEVICE8 iface, DWORD pVertexShader, void* pData, DWORD* pSizeOfData) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderDeclaration(IDirect3DDevice8 *iface, + DWORD pVertexShader, void *pData, DWORD *pSizeOfData) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DVertexDeclaration8Impl *declaration; IDirect3DVertexShader8Impl *shader; @@ -2086,8 +2363,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderDeclaration(LPDIRECT3D return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD pVertexShader, void* pData, DWORD* pSizeOfData) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(IDirect3DDevice8 *iface, + DWORD pVertexShader, void *pData, DWORD *pSizeOfData) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DVertexShader8Impl *shader = NULL; HRESULT hr; @@ -2104,21 +2383,23 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEV return D3DERR_INVALIDCALL; } - if (!shader->wineD3DVertexShader) + if (!shader->wined3d_shader) { wined3d_mutex_unlock(); *pSizeOfData = 0; return D3D_OK; } - hr = IWineD3DVertexShader_GetFunction(shader->wineD3DVertexShader, pData, pSizeOfData); + hr = wined3d_shader_get_byte_code(shader->wined3d_shader, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, IDirect3DIndexBuffer8* pIndexData, UINT baseVertexIndex) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(IDirect3DDevice8 *iface, + IDirect3DIndexBuffer8 *pIndexData, UINT baseVertexIndex) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; IDirect3DIndexBuffer8Impl *ib = (IDirect3DIndexBuffer8Impl *)pIndexData; @@ -2131,8 +2412,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, I * problem) */ wined3d_mutex_lock(); - IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, baseVertexIndex); - hr = IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice, + wined3d_device_set_base_vertex_index(This->wined3d_device, baseVertexIndex); + hr = wined3d_device_set_index_buffer(This->wined3d_device, ib ? ib->wineD3DIndexBuffer : NULL, ib ? ib->format : WINED3DFMT_UNKNOWN); wined3d_mutex_unlock(); @@ -2143,8 +2424,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, I static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(IDirect3DDevice8 *iface, IDirect3DIndexBuffer8 **ppIndexData, UINT *pBaseVertexIndex) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DBuffer *retIndexData = NULL; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_buffer *retIndexData = NULL; HRESULT hr; TRACE("iface %p, buffer %p, base_vertex_index %p.\n", iface, ppIndexData, pBaseVertexIndex); @@ -2155,13 +2436,13 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(IDirect3DDevice8 *iface, /* The case from UINT to INT is safe because d3d8 will never set negative values */ wined3d_mutex_lock(); - IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, (INT *) pBaseVertexIndex); - hr = IWineD3DDevice_GetIndexBuffer(This->WineD3DDevice, &retIndexData); + *pBaseVertexIndex = wined3d_device_get_base_vertex_index(This->wined3d_device); + hr = wined3d_device_get_index_buffer(This->wined3d_device, &retIndexData); if (SUCCEEDED(hr) && retIndexData) { - *ppIndexData = IWineD3DBuffer_GetParent(retIndexData); + *ppIndexData = wined3d_buffer_get_parent(retIndexData); IDirect3DIndexBuffer8_AddRef(*ppIndexData); - IWineD3DBuffer_Release(retIndexData); + wined3d_buffer_decref(retIndexData); } else { if (FAILED(hr)) FIXME("Call to GetIndices failed\n"); *ppIndexData = NULL; @@ -2174,7 +2455,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(IDirect3DDevice8 *iface, static HRESULT WINAPI IDirect3DDevice8Impl_CreatePixelShader(IDirect3DDevice8 *iface, const DWORD *byte_code, DWORD *shader) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DPixelShader8Impl *object; DWORD shader_handle; DWORD handle; @@ -2225,8 +2506,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreatePixelShader(IDirect3DDevice8 *i return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(IDirect3DDevice8 *iface, DWORD pShader) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DPixelShader8Impl *shader; HRESULT hr; @@ -2236,7 +2518,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 ifac if (!pShader) { - hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, NULL); + hr = wined3d_device_set_pixel_shader(This->wined3d_device, NULL); wined3d_mutex_unlock(); return hr; } @@ -2250,7 +2532,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 ifac } TRACE("(%p) : Setting shader %p\n", This, shader); - hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, shader->wineD3DPixelShader); + hr = wined3d_device_set_pixel_shader(This->wined3d_device, shader->wined3d_shader); wined3d_mutex_unlock(); return hr; @@ -2258,8 +2540,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 ifac static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *iface, DWORD *ppShader) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DPixelShader *object; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_shader *object; TRACE("iface %p, shader %p.\n", iface, ppShader); @@ -2269,12 +2551,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac } wined3d_mutex_lock(); - object = IWineD3DDevice_GetPixelShader(This->WineD3DDevice); + object = wined3d_device_get_pixel_shader(This->wined3d_device); if (object) { IDirect3DPixelShader8Impl *d3d8_shader; - d3d8_shader = IWineD3DPixelShader_GetParent(object); - IWineD3DPixelShader_Release(object); + d3d8_shader = wined3d_shader_get_parent(object); + wined3d_shader_decref(object); *ppShader = d3d8_shader->handle; } else @@ -2288,10 +2570,11 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(IDirect3DDevice8 *iface, DWORD pShader) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DPixelShader8Impl *shader; - IWineD3DPixelShader *cur; + struct wined3d_shader *cur; TRACE("iface %p, shader %#x.\n", iface, pShader); @@ -2305,16 +2588,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 i return D3DERR_INVALIDCALL; } - cur = IWineD3DDevice_GetPixelShader(This->WineD3DDevice); + cur = wined3d_device_get_pixel_shader(This->wined3d_device); if (cur) { - if (cur == shader->wineD3DPixelShader) IDirect3DDevice8_SetPixelShader(iface, 0); - IWineD3DPixelShader_Release(cur); + if (cur == shader->wined3d_shader) + IDirect3DDevice8_SetPixelShader(iface, 0); + wined3d_shader_decref(cur); } wined3d_mutex_unlock(); - if (IUnknown_Release((IUnknown *)shader)) + if (IDirect3DPixelShader8_Release(&shader->IDirect3DPixelShader8_iface)) { ERR("Shader %p has references left, this shouldn't happen.\n", shader); } @@ -2322,36 +2606,42 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 i return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, CONST void* pConstantData, DWORD ConstantCount) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShaderConstant(IDirect3DDevice8 *iface, + DWORD Register, const void *pConstantData, DWORD ConstantCount) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, register %u, data %p, count %u.\n", iface, Register, pConstantData, ConstantCount); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount); + hr = wined3d_device_set_ps_consts_f(This->wined3d_device, Register, pConstantData, ConstantCount); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register, void* pConstantData, DWORD ConstantCount) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderConstant(IDirect3DDevice8 *iface, + DWORD Register, void *pConstantData, DWORD ConstantCount) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, register %u, data %p, count %u.\n", iface, Register, pConstantData, ConstantCount); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetPixelShaderConstantF(This->WineD3DDevice, Register, pConstantData, ConstantCount); + hr = wined3d_device_get_ps_consts_f(This->wined3d_device, Register, pConstantData, ConstantCount); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD pPixelShader, void* pData, DWORD* pSizeOfData) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderFunction(IDirect3DDevice8 *iface, + DWORD pPixelShader, void *pData, DWORD *pSizeOfData) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); IDirect3DPixelShader8Impl *shader = NULL; HRESULT hr; @@ -2368,64 +2658,73 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderFunction(LPDIRECT3DDEVI return D3DERR_INVALIDCALL; } - hr = IWineD3DPixelShader_GetFunction(shader->wineD3DPixelShader, pData, pSizeOfData); + hr = wined3d_shader_get_byte_code(shader->wined3d_shader, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DrawRectPatch(LPDIRECT3DDEVICE8 iface, UINT Handle,CONST float* pNumSegs,CONST D3DRECTPATCH_INFO* pRectPatchInfo) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DrawRectPatch(IDirect3DDevice8 *iface, UINT Handle, + const float *pNumSegs, const D3DRECTPATCH_INFO *pRectPatchInfo) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, handle %#x, segment_count %p, patch_info %p.\n", iface, Handle, pNumSegs, pRectPatchInfo); wined3d_mutex_lock(); - hr = IWineD3DDevice_DrawRectPatch(This->WineD3DDevice, Handle, pNumSegs, (CONST WINED3DRECTPATCH_INFO *)pRectPatchInfo); + hr = wined3d_device_draw_rect_patch(This->wined3d_device, Handle, + pNumSegs, (const WINED3DRECTPATCH_INFO *)pRectPatchInfo); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DrawTriPatch(LPDIRECT3DDEVICE8 iface, UINT Handle,CONST float* pNumSegs,CONST D3DTRIPATCH_INFO* pTriPatchInfo) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DrawTriPatch(IDirect3DDevice8 *iface, UINT Handle, + const float *pNumSegs, const D3DTRIPATCH_INFO *pTriPatchInfo) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, handle %#x, segment_count %p, patch_info %p.\n", iface, Handle, pNumSegs, pTriPatchInfo); wined3d_mutex_lock(); - hr = IWineD3DDevice_DrawTriPatch(This->WineD3DDevice, Handle, pNumSegs, (CONST WINED3DTRIPATCH_INFO *)pTriPatchInfo); + hr = wined3d_device_draw_tri_patch(This->wined3d_device, Handle, + pNumSegs, (const WINED3DTRIPATCH_INFO *)pTriPatchInfo); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_DeletePatch(LPDIRECT3DDEVICE8 iface, UINT Handle) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_DeletePatch(IDirect3DDevice8 *iface, UINT Handle) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, handle %#x.\n", iface, Handle); wined3d_mutex_lock(); - hr = IWineD3DDevice_DeletePatch(This->WineD3DDevice, Handle); + hr = wined3d_device_delete_patch(This->wined3d_device, Handle); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(LPDIRECT3DDEVICE8 iface, UINT StreamNumber,IDirect3DVertexBuffer8* pStreamData,UINT Stride) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; +static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(IDirect3DDevice8 *iface, + UINT StreamNumber, IDirect3DVertexBuffer8 *pStreamData, UINT Stride) +{ + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); HRESULT hr; TRACE("iface %p, stream_idx %u, buffer %p, stride %u.\n", iface, StreamNumber, pStreamData, Stride); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetStreamSource(This->WineD3DDevice, StreamNumber, - NULL == pStreamData ? NULL : ((IDirect3DVertexBuffer8Impl *)pStreamData)->wineD3DVertexBuffer, - 0/* Offset in bytes */, Stride); + hr = wined3d_device_set_stream_source(This->wined3d_device, StreamNumber, + pStreamData ? ((IDirect3DVertexBuffer8Impl *)pStreamData)->wineD3DVertexBuffer : NULL, + 0/* Offset in bytes */, Stride); wined3d_mutex_unlock(); return hr; @@ -2434,8 +2733,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(LPDIRECT3DDEVICE8 ifa static HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(IDirect3DDevice8 *iface, UINT StreamNumber, IDirect3DVertexBuffer8 **pStream, UINT *pStride) { - IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - IWineD3DBuffer *retStream = NULL; + IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); + struct wined3d_buffer *retStream = NULL; HRESULT hr; TRACE("iface %p, stream_idx %u, buffer %p, stride %p.\n", @@ -2446,13 +2745,13 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(IDirect3DDevice8 *ifa } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetStreamSource(This->WineD3DDevice, StreamNumber, + hr = wined3d_device_get_stream_source(This->wined3d_device, StreamNumber, &retStream, 0 /* Offset in bytes */, pStride); if (SUCCEEDED(hr) && retStream) { - *pStream = IWineD3DBuffer_GetParent(retStream); + *pStream = wined3d_buffer_get_parent(retStream); IDirect3DVertexBuffer8_AddRef(*pStream); - IWineD3DBuffer_Release(retStream); + wined3d_buffer_decref(retStream); } else { @@ -2565,148 +2864,129 @@ static const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl = IDirect3DDevice8Impl_DeletePatch }; -/* IWineD3DDeviceParent IUnknown methods */ - -static inline struct IDirect3DDevice8Impl *device_from_device_parent(IWineD3DDeviceParent *iface) +static inline IDirect3DDevice8Impl *device_from_device_parent(struct wined3d_device_parent *device_parent) { - return (struct IDirect3DDevice8Impl *)((char*)iface - - FIELD_OFFSET(struct IDirect3DDevice8Impl, device_parent_vtbl)); + return CONTAINING_RECORD(device_parent, IDirect3DDevice8Impl, device_parent); } -static HRESULT STDMETHODCALLTYPE device_parent_QueryInterface(IWineD3DDeviceParent *iface, REFIID riid, void **object) +static void CDECL device_parent_wined3d_device_created(struct wined3d_device_parent *device_parent, + struct wined3d_device *device) { - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); - return IDirect3DDevice8Impl_QueryInterface((IDirect3DDevice8 *)This, riid, object); + TRACE("device_parent %p, device %p\n", device_parent, device); } -static ULONG STDMETHODCALLTYPE device_parent_AddRef(IWineD3DDeviceParent *iface) +static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, + WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface) { - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); - return IDirect3DDevice8Impl_AddRef((IDirect3DDevice8 *)This); -} - -static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface) -{ - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); - return IDirect3DDevice8Impl_Release((IDirect3DDevice8 *)This); -} - -/* IWineD3DDeviceParent methods */ - -static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceParent *iface, IWineD3DDevice *device) -{ - TRACE("iface %p, device %p\n", iface, device); -} - -static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, - WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface) -{ - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); + IDirect3DDevice8Impl *device = device_from_device_parent(device_parent); IDirect3DSurface8Impl *d3d_surface; BOOL lockable = TRUE; HRESULT hr; - TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, level %u, face %u, surface %p\n", - iface, superior, width, height, format, usage, pool, level, face, surface); + TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" + "\tpool %#x, level %u, face %u, surface %p.\n", + device_parent, container_parent, width, height, format, usage, pool, level, face, surface); if (pool == WINED3DPOOL_DEFAULT && !(usage & WINED3DUSAGE_DYNAMIC)) lockable = FALSE; - hr = IDirect3DDevice8Impl_CreateSurface((IDirect3DDevice8 *)This, width, height, + hr = IDirect3DDevice8Impl_CreateSurface(device, width, height, d3dformat_from_wined3dformat(format), lockable, FALSE /* Discard */, level, (IDirect3DSurface8 **)&d3d_surface, usage, pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); if (FAILED(hr)) { - ERR("(%p) CreateSurface failed, returning %#x\n", iface, hr); + WARN("Failed to create surface, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = d3d_surface->wined3d_surface; + wined3d_surface_incref(*surface); - d3d_surface->container = superior; + d3d_surface->container = container_parent; IUnknown_Release(d3d_surface->parentDevice); d3d_surface->parentDevice = NULL; IDirect3DSurface8_Release((IDirect3DSurface8 *)d3d_surface); - d3d_surface->forwardReference = superior; + d3d_surface->forwardReference = container_parent; return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, +static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable, - IWineD3DSurface **surface) + struct wined3d_surface **surface) { - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); + IDirect3DDevice8Impl *device = device_from_device_parent(device_parent); IDirect3DSurface8Impl *d3d_surface; HRESULT hr; - TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n" - "\tmultisample_quality %u, lockable %u, surface %p\n", - iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface); + TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n" + "\tmultisample_quality %u, lockable %u, surface %p.\n", + device_parent, container_parent, width, height, format, + multisample_type, multisample_quality, lockable, surface); - hr = IDirect3DDevice8_CreateRenderTarget((IDirect3DDevice8 *)This, width, height, + hr = IDirect3DDevice8_CreateRenderTarget(&device->IDirect3DDevice8_iface, width, height, d3dformat_from_wined3dformat(format), multisample_type, lockable, (IDirect3DSurface8 **)&d3d_surface); if (FAILED(hr)) { - ERR("(%p) CreateRenderTarget failed, returning %#x\n", iface, hr); + WARN("Failed to create rendertarget, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = d3d_surface->wined3d_surface; + wined3d_surface_incref(*surface); - d3d_surface->container = (IUnknown *)This; + d3d_surface->container = (IUnknown *)&device->IDirect3DDevice8_iface; /* Implicit surfaces are created with an refcount of 0 */ IUnknown_Release((IUnknown *)d3d_surface); return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface, +static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent, UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type, - DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface) + DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface) { - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); + IDirect3DDevice8Impl *device = device_from_device_parent(device_parent); IDirect3DSurface8Impl *d3d_surface; HRESULT hr; - TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x,\n" - "\tmultisample_quality %u, discard %u, surface %p\n", - iface, width, height, format, multisample_type, multisample_quality, discard, surface); + TRACE("device_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n" + "\tmultisample_quality %u, discard %u, surface %p.\n", + device_parent, width, height, format, multisample_type, multisample_quality, discard, surface); - hr = IDirect3DDevice8_CreateDepthStencilSurface((IDirect3DDevice8 *)This, width, height, + hr = IDirect3DDevice8_CreateDepthStencilSurface(&device->IDirect3DDevice8_iface, width, height, d3dformat_from_wined3dformat(format), multisample_type, (IDirect3DSurface8 **)&d3d_surface); if (FAILED(hr)) { - ERR("(%p) CreateDepthStencilSurface failed, returning %#x\n", iface, hr); + WARN("Failed to create depth/stencil surface, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = d3d_surface->wined3d_surface; + wined3d_surface_incref(*surface); - d3d_surface->container = (IUnknown *)This; + d3d_surface->container = (IUnknown *)&device->IDirect3DDevice8_iface; /* Implicit surfaces are created with an refcount of 0 */ IUnknown_Release((IUnknown *)d3d_surface); return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, UINT depth, enum wined3d_format_id format, - WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume) +static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format, + WINED3DPOOL pool, DWORD usage, struct wined3d_volume **volume) { - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); + IDirect3DDevice8Impl *device = device_from_device_parent(device_parent); IDirect3DVolume8Impl *object; HRESULT hr; - TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n", - iface, superior, width, height, depth, format, pool, usage, volume); + TRACE("device_parent %p, container_parent %p, width %u, height %u, depth %u, " + "format %#x, pool %#x, usage %#x, volume %p.\n", + device_parent, container_parent, width, height, depth, + format, pool, usage, volume); /* Allocate the storage for the device */ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); @@ -2717,7 +2997,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent return D3DERR_OUTOFVIDEOMEMORY; } - hr = volume_init(object, This, width, height, depth, usage, format, pool); + hr = volume_init(object, device, width, height, depth, usage, format, pool); if (FAILED(hr)) { WARN("Failed to initialize volume, hr %#x.\n", hr); @@ -2725,27 +3005,27 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent return hr; } - *volume = object->wineD3DVolume; - IWineD3DVolume_AddRef(*volume); - IDirect3DVolume8_Release((IDirect3DVolume8 *)object); + *volume = object->wined3d_volume; + wined3d_volume_incref(*volume); + IDirect3DVolume8_Release(&object->IDirect3DVolume8_iface); - object->container = superior; - object->forwardReference = superior; + object->container = container_parent; + object->forwardReference = container_parent; - TRACE("(%p) Created volume %p\n", iface, object); + TRACE("Created volume %p.\n", object); return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDeviceParent *iface, - WINED3DPRESENT_PARAMETERS *present_parameters, IWineD3DSwapChain **swapchain) +static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent *device_parent, + WINED3DPRESENT_PARAMETERS *present_parameters, struct wined3d_swapchain **swapchain) { - struct IDirect3DDevice8Impl *This = device_from_device_parent(iface); - IDirect3DSwapChain8Impl *d3d_swapchain; + IDirect3DDevice8Impl *device = device_from_device_parent(device_parent); D3DPRESENT_PARAMETERS local_parameters; + IDirect3DSwapChain8 *d3d_swapchain; HRESULT hr; - TRACE("iface %p, present_parameters %p, swapchain %p\n", iface, present_parameters, swapchain); + TRACE("device_parent %p, present_parameters %p, swapchain %p.\n", device_parent, present_parameters, swapchain); /* Copy the presentation parameters */ local_parameters.BackBufferWidth = present_parameters->BackBufferWidth; @@ -2762,18 +3042,18 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar local_parameters.FullScreen_RefreshRateInHz = present_parameters->FullScreen_RefreshRateInHz; local_parameters.FullScreen_PresentationInterval = present_parameters->PresentationInterval; - hr = IDirect3DDevice8_CreateAdditionalSwapChain((IDirect3DDevice8 *)This, - &local_parameters, (IDirect3DSwapChain8 **)&d3d_swapchain); + hr = IDirect3DDevice8_CreateAdditionalSwapChain(&device->IDirect3DDevice8_iface, + &local_parameters, &d3d_swapchain); if (FAILED(hr)) { - ERR("(%p) CreateAdditionalSwapChain failed, returning %#x\n", iface, hr); + WARN("Failed to create swapchain, hr %#x.\n", hr); *swapchain = NULL; return hr; } - *swapchain = d3d_swapchain->wineD3DSwapChain; - IUnknown_Release(d3d_swapchain->parentDevice); - d3d_swapchain->parentDevice = NULL; + *swapchain = ((IDirect3DSwapChain8Impl *)d3d_swapchain)->wined3d_swapchain; + wined3d_swapchain_incref(*swapchain); + IDirect3DSwapChain8_Release(d3d_swapchain); /* Copy back the presentation parameters */ present_parameters->BackBufferWidth = local_parameters.BackBufferWidth; @@ -2793,19 +3073,14 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar return hr; } -static const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl = +static const struct wined3d_device_parent_ops d3d8_wined3d_device_parent_ops = { - /* IUnknown methods */ - device_parent_QueryInterface, - device_parent_AddRef, - device_parent_Release, - /* IWineD3DDeviceParent methods */ - device_parent_WineD3DDeviceCreated, - device_parent_CreateSurface, - device_parent_CreateRenderTarget, - device_parent_CreateDepthStencilSurface, - device_parent_CreateVolume, - device_parent_CreateSwapChain, + device_parent_wined3d_device_created, + device_parent_create_surface, + device_parent_create_rendertarget, + device_parent_create_depth_stencil, + device_parent_create_volume, + device_parent_create_swapchain, }; static void setup_fpu(void) @@ -2820,14 +3095,14 @@ static void setup_fpu(void) #endif } -HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapter, +HRESULT device_init(IDirect3DDevice8Impl *device, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) { WINED3DPRESENT_PARAMETERS wined3d_parameters; HRESULT hr; - device->lpVtbl = &Direct3DDevice8_Vtbl; - device->device_parent_vtbl = &d3d8_wined3d_device_parent_vtbl; + device->IDirect3DDevice8_iface.lpVtbl = &Direct3DDevice8_Vtbl; + device->device_parent.ops = &d3d8_wined3d_device_parent_ops; device->ref = 1; device->handle_table.entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, D3D8_INITIAL_HANDLE_TABLE_SIZE * sizeof(*device->handle_table.entries)); @@ -2841,8 +3116,8 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte if (!(flags & D3DCREATE_FPU_PRESERVE)) setup_fpu(); wined3d_mutex_lock(); - hr = IWineD3D_CreateDevice(wined3d, adapter, device_type, focus_window, flags, - (IWineD3DDeviceParent *)&device->device_parent_vtbl, &device->WineD3DDevice); + hr = wined3d_device_create(wined3d, adapter, device_type, focus_window, flags, + &device->device_parent, &device->wined3d_device); if (FAILED(hr)) { WARN("Failed to create wined3d device, hr %#x.\n", hr); @@ -2853,18 +3128,28 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte if (!parameters->Windowed) { - if (!focus_window) focus_window = parameters->hDeviceWindow; - if (FAILED(hr = IWineD3DDevice_AcquireFocusWindow(device->WineD3DDevice, focus_window))) + HWND device_window = parameters->hDeviceWindow; + + if (!focus_window) + focus_window = device_window; + if (FAILED(hr = wined3d_device_acquire_focus_window(device->wined3d_device, focus_window))) { ERR("Failed to acquire focus window, hr %#x.\n", hr); - IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_device_decref(device->wined3d_device); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, device->handle_table.entries); return hr; } + + if (!device_window) + device_window = focus_window; + wined3d_device_setup_fullscreen_window(device->wined3d_device, device_window, + parameters->BackBufferWidth, + parameters->BackBufferHeight); } - if (flags & D3DCREATE_MULTITHREADED) IWineD3DDevice_SetMultithreaded(device->WineD3DDevice); + if (flags & D3DCREATE_MULTITHREADED) + wined3d_device_set_multithreaded(device->wined3d_device); wined3d_parameters.BackBufferWidth = parameters->BackBufferWidth; wined3d_parameters.BackBufferHeight = parameters->BackBufferHeight; @@ -2882,18 +3167,18 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte wined3d_parameters.PresentationInterval = parameters->FullScreen_PresentationInterval; wined3d_parameters.AutoRestoreDisplayMode = TRUE; - hr = IWineD3DDevice_Init3D(device->WineD3DDevice, &wined3d_parameters); + hr = wined3d_device_init_3d(device->wined3d_device, &wined3d_parameters); if (FAILED(hr)) { WARN("Failed to initialize 3D, hr %#x.\n", hr); - IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); - IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_device_release_focus_window(device->wined3d_device); + wined3d_device_decref(device->wined3d_device); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, device->handle_table.entries); return hr; } - hr = IWineD3DDevice_SetRenderState(device->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0); + hr = wined3d_device_set_render_state(device->wined3d_device, WINED3DRS_POINTSIZE_MIN, 0); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -2928,9 +3213,9 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IWineD3D *wined3d, UINT adapte err: wined3d_mutex_lock(); - IWineD3DDevice_Uninit3D(device->WineD3DDevice, D3D8CB_DestroySwapChain); - IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); - IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_device_uninit_3d(device->wined3d_device); + wined3d_device_release_focus_window(device->wined3d_device); + wined3d_device_decref(device->wined3d_device); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, device->handle_table.entries); return hr; diff --git a/dll/directx/wine/d3d8/directx.c b/dll/directx/wine/d3d8/directx.c index 8bcd5abf9c9..249399e8452 100644 --- a/dll/directx/wine/d3d8/directx.c +++ b/dll/directx/wine/d3d8/directx.c @@ -37,10 +37,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); -/* IDirect3D IUnknown parts follow: */ +static inline IDirect3D8Impl *impl_from_IDirect3D8(IDirect3D8 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3D8Impl, IDirect3D8_iface); +} + static HRESULT WINAPI IDirect3D8Impl_QueryInterface(LPDIRECT3D8 iface, REFIID riid,LPVOID *ppobj) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -56,8 +60,9 @@ static HRESULT WINAPI IDirect3D8Impl_QueryInterface(LPDIRECT3D8 iface, REFIID ri return E_NOINTERFACE; } -static ULONG WINAPI IDirect3D8Impl_AddRef(LPDIRECT3D8 iface) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static ULONG WINAPI IDirect3D8Impl_AddRef(LPDIRECT3D8 iface) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -65,8 +70,9 @@ static ULONG WINAPI IDirect3D8Impl_AddRef(LPDIRECT3D8 iface) { return ref; } -static ULONG WINAPI IDirect3D8Impl_Release(LPDIRECT3D8 iface) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static ULONG WINAPI IDirect3D8Impl_Release(LPDIRECT3D8 iface) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -75,7 +81,7 @@ static ULONG WINAPI IDirect3D8Impl_Release(LPDIRECT3D8 iface) { TRACE("Releasing wined3d %p\n", This->WineD3D); wined3d_mutex_lock(); - IWineD3D_Release(This->WineD3D); + wined3d_decref(This->WineD3D); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, This); @@ -84,37 +90,39 @@ static ULONG WINAPI IDirect3D8Impl_Release(LPDIRECT3D8 iface) { return ref; } -/* IDirect3D8 Interface follow: */ -static HRESULT WINAPI IDirect3D8Impl_RegisterSoftwareDevice (LPDIRECT3D8 iface, void* pInitializeFunction) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static HRESULT WINAPI IDirect3D8Impl_RegisterSoftwareDevice(LPDIRECT3D8 iface, + void* pInitializeFunction) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p, init_function %p.\n", iface, pInitializeFunction); wined3d_mutex_lock(); - hr = IWineD3D_RegisterSoftwareDevice(This->WineD3D, pInitializeFunction); + hr = wined3d_register_software_device(This->WineD3D, pInitializeFunction); wined3d_mutex_unlock(); return hr; } -static UINT WINAPI IDirect3D8Impl_GetAdapterCount (LPDIRECT3D8 iface) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static UINT WINAPI IDirect3D8Impl_GetAdapterCount(LPDIRECT3D8 iface) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterCount(This->WineD3D); + hr = wined3d_get_adapter_count(This->WineD3D); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface, - UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER8 *pIdentifier) +static HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface, UINT Adapter, + DWORD Flags, D3DADAPTER_IDENTIFIER8 *pIdentifier) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); WINED3DADAPTER_IDENTIFIER adapter_id; HRESULT hr; @@ -129,7 +137,7 @@ static HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface, adapter_id.device_name_size = 0; /* d3d9 only */ wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, Adapter, Flags, &adapter_id); + hr = wined3d_get_adapter_identifier(This->WineD3D, Adapter, Flags, &adapter_id); wined3d_mutex_unlock(); pIdentifier->DriverVersion = adapter_id.driver_version; @@ -143,28 +151,31 @@ static HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface, return hr; } -static UINT WINAPI IDirect3D8Impl_GetAdapterModeCount (LPDIRECT3D8 iface,UINT Adapter) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static UINT WINAPI IDirect3D8Impl_GetAdapterModeCount(LPDIRECT3D8 iface,UINT Adapter) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p, adapter %u.\n", iface, Adapter); wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterModeCount(This->WineD3D, Adapter, 0 /* format */); + hr = wined3d_get_adapter_mode_count(This->WineD3D, Adapter, 0); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes (LPDIRECT3D8 iface, UINT Adapter, UINT Mode, D3DDISPLAYMODE* pMode) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes(LPDIRECT3D8 iface, UINT Adapter, UINT Mode, + D3DDISPLAYMODE* pMode) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p, adapter %u, mode_idx %u, mode %p.\n", iface, Adapter, Mode, pMode); wined3d_mutex_lock(); - hr = IWineD3D_EnumAdapterModes(This->WineD3D, Adapter, WINED3DFMT_UNKNOWN, Mode, (WINED3DDISPLAYMODE *) pMode); + hr = wined3d_enum_adapter_modes(This->WineD3D, Adapter, WINED3DFMT_UNKNOWN, Mode, (WINED3DDISPLAYMODE *)pMode); wined3d_mutex_unlock(); if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); @@ -172,15 +183,17 @@ static HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes (LPDIRECT3D8 iface, UINT A return hr; } -static HRESULT WINAPI IDirect3D8Impl_GetAdapterDisplayMode (LPDIRECT3D8 iface, UINT Adapter, D3DDISPLAYMODE* pMode) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static HRESULT WINAPI IDirect3D8Impl_GetAdapterDisplayMode(LPDIRECT3D8 iface, UINT Adapter, + D3DDISPLAYMODE* pMode) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p, adapter %u, mode %p.\n", iface, Adapter, pMode); wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) pMode); + hr = wined3d_get_adapter_display_mode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *)pMode); wined3d_mutex_unlock(); if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); @@ -188,27 +201,28 @@ static HRESULT WINAPI IDirect3D8Impl_GetAdapterDisplayMode (LPDIRECT3D8 iface, U return hr; } -static HRESULT WINAPI IDirect3D8Impl_CheckDeviceType (LPDIRECT3D8 iface, - UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat, - D3DFORMAT BackBufferFormat, BOOL Windowed) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static HRESULT WINAPI IDirect3D8Impl_CheckDeviceType(LPDIRECT3D8 iface, UINT Adapter, + D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, BOOL Windowed) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x.\n", iface, Adapter, CheckType, DisplayFormat, BackBufferFormat, Windowed); wined3d_mutex_lock(); - hr = IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, wined3dformat_from_d3dformat(DisplayFormat), + hr = wined3d_check_device_type(This->WineD3D, Adapter, CheckType, wined3dformat_from_d3dformat(DisplayFormat), wined3dformat_from_d3dformat(BackBufferFormat), Windowed); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 iface, - UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, - DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT Adapter, + D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, + D3DFORMAT CheckFormat) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; WINED3DRESOURCETYPE WineD3DRType; @@ -235,7 +249,7 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 i } wined3d_mutex_lock(); - hr = IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat), + hr = wined3d_check_device_format(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat), Usage, WineD3DRType, wined3dformat_from_d3dformat(CheckFormat), SURFACE_OPENGL); wined3d_mutex_unlock(); @@ -243,33 +257,35 @@ static HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 i } static HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(IDirect3D8 *iface, UINT Adapter, - D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType) + D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, + D3DMULTISAMPLE_TYPE MultiSampleType) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, format %#x, windowed %#x, multisample_type %#x.\n", iface, Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType); wined3d_mutex_lock(); - hr = IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType, - wined3dformat_from_d3dformat(SurfaceFormat), Windowed, (WINED3DMULTISAMPLE_TYPE) MultiSampleType, NULL); + hr = wined3d_check_device_multisample_type(This->WineD3D, Adapter, DeviceType, + wined3dformat_from_d3dformat(SurfaceFormat), Windowed, (WINED3DMULTISAMPLE_TYPE)MultiSampleType, NULL); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(IDirect3D8 *iface, UINT Adapter, D3DDEVTYPE DeviceType, - D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) +static HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(IDirect3D8 *iface, UINT Adapter, + D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, + D3DFORMAT DepthStencilFormat) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, rt_format %#x, ds_format %#x.\n", iface, Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat); wined3d_mutex_lock(); - hr = IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType, + hr = wined3d_check_depth_stencil_match(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat), wined3dformat_from_d3dformat(RenderTargetFormat), wined3dformat_from_d3dformat(DepthStencilFormat)); wined3d_mutex_unlock(); @@ -291,8 +307,10 @@ void fixup_caps(WINED3DCAPS *caps) caps->StencilCaps &= ~WINED3DSTENCILCAPS_TWOSIDED; } -static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS8* pCaps) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, + D3DDEVTYPE DeviceType, D3DCAPS8* pCaps) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HRESULT hrc = D3D_OK; WINED3DCAPS *pWineCaps; @@ -307,7 +325,7 @@ static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Ada } wined3d_mutex_lock(); - hrc = IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, pWineCaps); + hrc = wined3d_get_device_caps(This->WineD3D, Adapter, DeviceType, pWineCaps); wined3d_mutex_unlock(); fixup_caps(pWineCaps); @@ -318,23 +336,25 @@ static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Ada return hrc; } -static HMONITOR WINAPI IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT Adapter) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; +static HMONITOR WINAPI IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT Adapter) +{ + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); HMONITOR ret; TRACE("iface %p, adapter %u.\n", iface, Adapter); wined3d_mutex_lock(); - ret = IWineD3D_GetAdapterMonitor(This->WineD3D, Adapter); + ret = wined3d_get_adapter_monitor(This->WineD3D, Adapter); wined3d_mutex_unlock(); return ret; } -static HRESULT WINAPI IDirect3D8Impl_CreateDevice(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, - HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, IDirect3DDevice8 **device) +static HRESULT WINAPI IDirect3D8Impl_CreateDevice(IDirect3D8 *iface, UINT adapter, + D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, + IDirect3DDevice8 **device) { - IDirect3D8Impl *This = (IDirect3D8Impl *)iface; + IDirect3D8Impl *This = impl_from_IDirect3D8(iface); IDirect3DDevice8Impl *object; HRESULT hr; @@ -357,7 +377,7 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(IDirect3D8 *iface, UINT adapte } TRACE("Created device %p.\n", object); - *device = (IDirect3DDevice8 *)object; + *device = &object->IDirect3DDevice8_iface; return D3D_OK; } diff --git a/dll/directx/wine/d3d8/shader.c b/dll/directx/wine/d3d8/shader.c index a59f10b57b4..e04c2a2960f 100644 --- a/dll/directx/wine/d3d8/shader.c +++ b/dll/directx/wine/d3d8/shader.c @@ -22,6 +22,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); +static inline IDirect3DVertexShader8Impl *impl_from_IDirect3DVertexShader8(IDirect3DVertexShader8 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DVertexShader8Impl, IDirect3DVertexShader8_iface); +} + static HRESULT WINAPI d3d8_vertexshader_QueryInterface(IDirect3DVertexShader8 *iface, REFIID riid, void **object) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); @@ -42,15 +47,15 @@ static HRESULT WINAPI d3d8_vertexshader_QueryInterface(IDirect3DVertexShader8 *i static ULONG WINAPI d3d8_vertexshader_AddRef(IDirect3DVertexShader8 *iface) { - IDirect3DVertexShader8Impl *shader = (IDirect3DVertexShader8Impl *)iface; + IDirect3DVertexShader8Impl *shader = impl_from_IDirect3DVertexShader8(iface); ULONG refcount = InterlockedIncrement(&shader->ref); TRACE("%p increasing refcount to %u.\n", iface, refcount); - if (refcount == 1 && shader->wineD3DVertexShader) + if (refcount == 1 && shader->wined3d_shader) { wined3d_mutex_lock(); - IWineD3DVertexShader_AddRef(shader->wineD3DVertexShader); + wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); } @@ -66,17 +71,17 @@ static void STDMETHODCALLTYPE d3d8_vertexshader_wined3d_object_destroyed(void *p static ULONG WINAPI d3d8_vertexshader_Release(IDirect3DVertexShader8 *iface) { - IDirect3DVertexShader8Impl *shader = (IDirect3DVertexShader8Impl *)iface; + IDirect3DVertexShader8Impl *shader = impl_from_IDirect3DVertexShader8(iface); ULONG refcount = InterlockedDecrement(&shader->ref); TRACE("%p decreasing refcount to %u.\n", iface, refcount); if (!refcount) { - if (shader->wineD3DVertexShader) + if (shader->wined3d_shader) { wined3d_mutex_lock(); - IWineD3DVertexShader_Release(shader->wineD3DVertexShader); + wined3d_shader_decref(shader->wined3d_shader); wined3d_mutex_unlock(); } else @@ -157,7 +162,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Im } shader->ref = 1; - shader->lpVtbl = &d3d8_vertexshader_vtbl; + shader->IDirect3DVertexShader8_iface.lpVtbl = &d3d8_vertexshader_vtbl; hr = d3d8_vertexshader_create_vertexdeclaration(device, declaration, shader_handle, &shader->vertex_declaration); if (FAILED(hr)) @@ -171,8 +176,8 @@ HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Im if (usage) FIXME("Usage %#x not implemented.\n", usage); wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVertexShader(device->WineD3DDevice, byte_code, NULL /* output signature */, - shader, &d3d8_vertexshader_wined3d_parent_ops, &shader->wineD3DVertexShader); + hr = wined3d_shader_create_vs(device->wined3d_device, byte_code, NULL /* output signature */, + shader, &d3d8_vertexshader_wined3d_parent_ops, &shader->wined3d_shader); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -181,12 +186,17 @@ HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Im return hr; } - load_local_constants(declaration, shader->wineD3DVertexShader); + load_local_constants(declaration, shader->wined3d_shader); } return D3D_OK; } +static inline IDirect3DPixelShader8Impl *impl_from_IDirect3DPixelShader8(IDirect3DPixelShader8 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DPixelShader8Impl, IDirect3DPixelShader8_iface); +} + static HRESULT WINAPI d3d8_pixelshader_QueryInterface(IDirect3DPixelShader8 *iface, REFIID riid, void **object) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); @@ -207,7 +217,7 @@ static HRESULT WINAPI d3d8_pixelshader_QueryInterface(IDirect3DPixelShader8 *ifa static ULONG WINAPI d3d8_pixelshader_AddRef(IDirect3DPixelShader8 *iface) { - IDirect3DPixelShader8Impl *shader = (IDirect3DPixelShader8Impl *)iface; + IDirect3DPixelShader8Impl *shader = impl_from_IDirect3DPixelShader8(iface); ULONG refcount = InterlockedIncrement(&shader->ref); TRACE("%p increasing refcount to %u.\n", iface, refcount); @@ -215,7 +225,7 @@ static ULONG WINAPI d3d8_pixelshader_AddRef(IDirect3DPixelShader8 *iface) if (refcount == 1) { wined3d_mutex_lock(); - IWineD3DPixelShader_AddRef(shader->wineD3DPixelShader); + wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); } @@ -224,7 +234,7 @@ static ULONG WINAPI d3d8_pixelshader_AddRef(IDirect3DPixelShader8 *iface) static ULONG WINAPI d3d8_pixelshader_Release(IDirect3DPixelShader8 *iface) { - IDirect3DPixelShader8Impl *shader = (IDirect3DPixelShader8Impl *)iface; + IDirect3DPixelShader8Impl *shader = impl_from_IDirect3DPixelShader8(iface); ULONG refcount = InterlockedDecrement(&shader->ref); TRACE("%p decreasing refcount to %u.\n", iface, refcount); @@ -232,7 +242,7 @@ static ULONG WINAPI d3d8_pixelshader_Release(IDirect3DPixelShader8 *iface) if (!refcount) { wined3d_mutex_lock(); - IWineD3DPixelShader_Release(shader->wineD3DPixelShader); + wined3d_shader_decref(shader->wined3d_shader); wined3d_mutex_unlock(); } @@ -263,12 +273,12 @@ HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl HRESULT hr; shader->ref = 1; - shader->lpVtbl = &d3d8_pixelshader_vtbl; + shader->IDirect3DPixelShader8_iface.lpVtbl = &d3d8_pixelshader_vtbl; shader->handle = shader_handle; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreatePixelShader(device->WineD3DDevice, byte_code, NULL, shader, - &d3d8_pixelshader_wined3d_parent_ops, &shader->wineD3DPixelShader); + hr = wined3d_shader_create_ps(device->wined3d_device, byte_code, NULL, shader, + &d3d8_pixelshader_wined3d_parent_ops, &shader->wined3d_shader); wined3d_mutex_unlock(); if (FAILED(hr)) { diff --git a/dll/directx/wine/d3d8/surface.c b/dll/directx/wine/d3d8/surface.c index 6e59bd65f75..8a07244e604 100644 --- a/dll/directx/wine/d3d8/surface.c +++ b/dll/directx/wine/d3d8/surface.c @@ -61,7 +61,7 @@ static ULONG WINAPI IDirect3DSurface8Impl_AddRef(LPDIRECT3DSURFACE8 iface) { { if (This->parentDevice) IUnknown_AddRef(This->parentDevice); wined3d_mutex_lock(); - IUnknown_AddRef(This->wineD3DSurface); + wined3d_surface_incref(This->wined3d_surface); wined3d_mutex_unlock(); } @@ -89,7 +89,7 @@ static ULONG WINAPI IDirect3DSurface8Impl_Release(LPDIRECT3DSURFACE8 iface) { /* Implicit surfaces are destroyed with the device, not if refcount reaches 0. */ wined3d_mutex_lock(); - IWineD3DSurface_Release(This->wineD3DSurface); + wined3d_surface_decref(This->wined3d_surface); wined3d_mutex_unlock(); if (parentDevice) IDirect3DDevice8_Release(parentDevice); @@ -139,7 +139,7 @@ static HRESULT WINAPI IDirect3DSurface8Impl_SetPrivateData(LPDIRECT3DSURFACE8 if iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DSurface_SetPrivateData(This->wineD3DSurface, refguid, pData, SizeOfData, Flags); + hr = wined3d_surface_set_private_data(This->wined3d_surface, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; @@ -153,7 +153,7 @@ static HRESULT WINAPI IDirect3DSurface8Impl_GetPrivateData(LPDIRECT3DSURFACE8 if iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DSurface_GetPrivateData(This->wineD3DSurface, refguid, pData, pSizeOfData); + hr = wined3d_surface_get_private_data(This->wined3d_surface, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; @@ -166,7 +166,7 @@ static HRESULT WINAPI IDirect3DSurface8Impl_FreePrivateData(LPDIRECT3DSURFACE8 i TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DSurface_FreePrivateData(This->wineD3DSurface, refguid); + hr = wined3d_surface_free_private_data(This->wined3d_surface, refguid); wined3d_mutex_unlock(); return hr; @@ -187,24 +187,27 @@ static HRESULT WINAPI IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 ifac return res; } -static HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFACE_DESC *pDesc) { +static HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(IDirect3DSurface8 *iface, D3DSURFACE_DESC *desc) +{ IDirect3DSurface8Impl *This = (IDirect3DSurface8Impl *)iface; - WINED3DSURFACE_DESC wined3ddesc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; - TRACE("iface %p, desc %p.\n", iface, pDesc); + TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - IWineD3DSurface_GetDesc(This->wineD3DSurface, &wined3ddesc); + wined3d_resource = wined3d_surface_get_resource(This->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format); - pDesc->Type = wined3ddesc.resource_type; - pDesc->Usage = wined3ddesc.usage; - pDesc->Pool = wined3ddesc.pool; - pDesc->Size = wined3ddesc.size; - pDesc->MultiSampleType = wined3ddesc.multisample_type; - pDesc->Width = wined3ddesc.width; - pDesc->Height = wined3ddesc.height; + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; + desc->MultiSampleType = wined3d_desc.multisample_type; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; return D3D_OK; } @@ -233,7 +236,7 @@ static HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D } } - hr = IWineD3DSurface_LockRect(This->wineD3DSurface, (WINED3DLOCKED_RECT *) pLockedRect, pRect, Flags); + hr = wined3d_surface_map(This->wined3d_surface, (WINED3DLOCKED_RECT *)pLockedRect, pRect, Flags); wined3d_mutex_unlock(); return hr; @@ -246,7 +249,7 @@ static HRESULT WINAPI IDirect3DSurface8Impl_UnlockRect(LPDIRECT3DSURFACE8 iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DSurface_UnlockRect(This->wineD3DSurface); + hr = wined3d_surface_unmap(This->wined3d_surface); wined3d_mutex_unlock(); switch(hr) @@ -301,9 +304,9 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic } wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateSurface(device->WineD3DDevice, width, height, wined3dformat_from_d3dformat(format), + hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format), lockable, discard, level, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, multisample_type, - multisample_quality, SURFACE_OPENGL, surface, &d3d8_surface_wined3d_parent_ops, &surface->wineD3DSurface); + multisample_quality, SURFACE_OPENGL, surface, &d3d8_surface_wined3d_parent_ops, &surface->wined3d_surface); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -311,7 +314,7 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic return hr; } - surface->parentDevice = (IDirect3DDevice8 *)device; + surface->parentDevice = &device->IDirect3DDevice8_iface; IUnknown_AddRef(surface->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d8/swapchain.c b/dll/directx/wine/d3d8/swapchain.c index 1c2a5357824..866335fcdc8 100644 --- a/dll/directx/wine/d3d8/swapchain.c +++ b/dll/directx/wine/d3d8/swapchain.c @@ -23,10 +23,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); -/* IDirect3DSwapChain IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN8 iface, REFIID riid, LPVOID* ppobj) +static inline IDirect3DSwapChain8Impl *impl_from_IDirect3DSwapChain8(IDirect3DSwapChain8 *iface) { - IDirect3DSwapChain8Impl *This = (IDirect3DSwapChain8Impl *)iface; + return CONTAINING_RECORD(iface, IDirect3DSwapChain8Impl, IDirect3DSwapChain8_iface); +} + +static HRESULT WINAPI IDirect3DSwapChain8Impl_QueryInterface(IDirect3DSwapChain8 *iface, + REFIID riid, void **ppobj) +{ + IDirect3DSwapChain8Impl *This = impl_from_IDirect3DSwapChain8(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -42,42 +47,59 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DSwapChain8Impl_AddRef(LPDIRECT3DSWAPCHAIN8 iface) { - IDirect3DSwapChain8Impl *This = (IDirect3DSwapChain8Impl *)iface; +static ULONG WINAPI IDirect3DSwapChain8Impl_AddRef(IDirect3DSwapChain8 *iface) +{ + IDirect3DSwapChain8Impl *This = impl_from_IDirect3DSwapChain8(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); + if (ref == 1) + { + if (This->parentDevice) + IDirect3DDevice8_AddRef(This->parentDevice); + wined3d_mutex_lock(); + wined3d_swapchain_incref(This->wined3d_swapchain); + wined3d_mutex_unlock(); + } + return ref; } -static ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface) { - IDirect3DSwapChain8Impl *This = (IDirect3DSwapChain8Impl *)iface; +static ULONG WINAPI IDirect3DSwapChain8Impl_Release(IDirect3DSwapChain8 *iface) +{ + IDirect3DSwapChain8Impl *This = impl_from_IDirect3DSwapChain8(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); - if (ref == 0) { + if (!ref) + { + IDirect3DDevice8 *parentDevice = This->parentDevice; + wined3d_mutex_lock(); - IWineD3DSwapChain_Destroy(This->wineD3DSwapChain); + wined3d_swapchain_decref(This->wined3d_swapchain); wined3d_mutex_unlock(); - if (This->parentDevice) IUnknown_Release(This->parentDevice); - HeapFree(GetProcessHeap(), 0, This); + if (parentDevice) + IDirect3DDevice8_Release(parentDevice); } return ref; } -/* IDirect3DSwapChain8 parts follow: */ -static HRESULT WINAPI IDirect3DSwapChain8Impl_Present(LPDIRECT3DSWAPCHAIN8 iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion) { - IDirect3DSwapChain8Impl *This = (IDirect3DSwapChain8Impl *)iface; +static HRESULT WINAPI IDirect3DSwapChain8Impl_Present(IDirect3DSwapChain8 *iface, + const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, + const RGNDATA *pDirtyRegion) +{ + IDirect3DSwapChain8Impl *This = impl_from_IDirect3DSwapChain8(iface); HRESULT hr; TRACE("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p.\n", iface, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_Present(This->wineD3DSwapChain, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, 0); + hr = wined3d_swapchain_present(This->wined3d_swapchain, pSourceRect, + pDestRect, hDestWindowOverride, pDirtyRegion, 0); wined3d_mutex_unlock(); return hr; @@ -86,21 +108,21 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_Present(LPDIRECT3DSWAPCHAIN8 iface static HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(IDirect3DSwapChain8 *iface, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface8 **ppBackBuffer) { - IDirect3DSwapChain8Impl *This = (IDirect3DSwapChain8Impl *)iface; - IWineD3DSurface *mySurface = NULL; + IDirect3DSwapChain8Impl *This = impl_from_IDirect3DSwapChain8(iface); + struct wined3d_surface *wined3d_surface = NULL; HRESULT hr; TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", iface, iBackBuffer, Type, ppBackBuffer); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, - (WINED3DBACKBUFFER_TYPE)Type, &mySurface); - if (SUCCEEDED(hr) && mySurface) + hr = wined3d_swapchain_get_back_buffer(This->wined3d_swapchain, + iBackBuffer, (WINED3DBACKBUFFER_TYPE)Type, &wined3d_surface); + if (SUCCEEDED(hr) && wined3d_surface) { - *ppBackBuffer = IWineD3DSurface_GetParent(mySurface); + *ppBackBuffer = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface8_AddRef(*ppBackBuffer); - IWineD3DSurface_Release(mySurface); + wined3d_surface_decref(wined3d_surface); } wined3d_mutex_unlock(); @@ -116,6 +138,16 @@ static const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl = IDirect3DSwapChain8Impl_GetBackBuffer }; +static void STDMETHODCALLTYPE d3d8_swapchain_wined3d_object_released(void *parent) +{ + HeapFree(GetProcessHeap(), 0, parent); +} + +static const struct wined3d_parent_ops d3d8_swapchain_wined3d_parent_ops = +{ + d3d8_swapchain_wined3d_object_released, +}; + HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl *device, D3DPRESENT_PARAMETERS *present_parameters) { @@ -123,7 +155,7 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl HRESULT hr; swapchain->ref = 1; - swapchain->lpVtbl = &Direct3DSwapChain8_Vtbl; + swapchain->IDirect3DSwapChain8_iface.lpVtbl = &Direct3DSwapChain8_Vtbl; wined3d_parameters.BackBufferWidth = present_parameters->BackBufferWidth; wined3d_parameters.BackBufferHeight = present_parameters->BackBufferHeight; @@ -142,8 +174,9 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl wined3d_parameters.AutoRestoreDisplayMode = TRUE; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateSwapChain(device->WineD3DDevice, &wined3d_parameters, - SURFACE_OPENGL, swapchain, &swapchain->wineD3DSwapChain); + hr = wined3d_swapchain_create(device->wined3d_device, &wined3d_parameters, + SURFACE_OPENGL, swapchain, &d3d8_swapchain_wined3d_parent_ops, + &swapchain->wined3d_swapchain); wined3d_mutex_unlock(); present_parameters->BackBufferWidth = wined3d_parameters.BackBufferWidth; @@ -166,7 +199,7 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl return hr; } - swapchain->parentDevice = (IDirect3DDevice8 *)device; + swapchain->parentDevice = &device->IDirect3DDevice8_iface; IDirect3DDevice8_AddRef(swapchain->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d8/texture.c b/dll/directx/wine/d3d8/texture.c index a8421604862..1b9db9d2303 100644 --- a/dll/directx/wine/d3d8/texture.c +++ b/dll/directx/wine/d3d8/texture.c @@ -24,8 +24,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); /* IDirect3DTexture8 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DTexture8Impl_QueryInterface(LPDIRECT3DTEXTURE8 iface, REFIID riid, LPVOID *ppobj) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static inline IDirect3DTexture8Impl *impl_from_IDirect3DTexture8(IDirect3DTexture8 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DTexture8Impl, IDirect3DTexture8_iface); +} + +static HRESULT WINAPI IDirect3DTexture8Impl_QueryInterface(IDirect3DTexture8 *iface, REFIID riid, + void **ppobj) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -43,8 +50,9 @@ static HRESULT WINAPI IDirect3DTexture8Impl_QueryInterface(LPDIRECT3DTEXTURE8 if return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DTexture8Impl_AddRef(LPDIRECT3DTEXTURE8 iface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static ULONG WINAPI IDirect3DTexture8Impl_AddRef(IDirect3DTexture8 *iface) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -53,15 +61,16 @@ static ULONG WINAPI IDirect3DTexture8Impl_AddRef(LPDIRECT3DTEXTURE8 iface) { { IDirect3DDevice8_AddRef(This->parentDevice); wined3d_mutex_lock(); - IWineD3DTexture_AddRef(This->wineD3DTexture); + wined3d_texture_incref(This->wined3d_texture); wined3d_mutex_unlock(); } return ref; } -static ULONG WINAPI IDirect3DTexture8Impl_Release(LPDIRECT3DTEXTURE8 iface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static ULONG WINAPI IDirect3DTexture8Impl_Release(IDirect3DTexture8 *iface) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -70,7 +79,7 @@ static ULONG WINAPI IDirect3DTexture8Impl_Release(LPDIRECT3DTEXTURE8 iface) { IDirect3DDevice8 *parentDevice = This->parentDevice; wined3d_mutex_lock(); - IWineD3DTexture_Release(This->wineD3DTexture); + wined3d_texture_decref(This->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -80,9 +89,10 @@ static ULONG WINAPI IDirect3DTexture8Impl_Release(LPDIRECT3DTEXTURE8 iface) { } /* IDirect3DTexture8 IDirect3DResource8 Interface follow: */ -static HRESULT WINAPI IDirect3DTexture8Impl_GetDevice(IDirect3DTexture8 *iface, IDirect3DDevice8 **device) +static HRESULT WINAPI IDirect3DTexture8Impl_GetDevice(IDirect3DTexture8 *iface, + IDirect3DDevice8 **device) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -94,220 +104,264 @@ static HRESULT WINAPI IDirect3DTexture8Impl_GetDevice(IDirect3DTexture8 *iface, return D3D_OK; } -static HRESULT WINAPI IDirect3DTexture8Impl_SetPrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid, CONST void *pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DTexture8Impl_SetPrivateData(IDirect3DTexture8 *iface, + REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DTexture_SetPrivateData(This->wineD3DTexture, refguid, pData, SizeOfData, Flags); + hr = wined3d_texture_set_private_data(This->wined3d_texture, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture8Impl_GetPrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid, void *pData, DWORD* pSizeOfData) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DTexture8Impl_GetPrivateData(IDirect3DTexture8 *iface, + REFGUID refguid, void *pData, DWORD *pSizeOfData) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DTexture_GetPrivateData(This->wineD3DTexture, refguid, pData, pSizeOfData); + hr = wined3d_texture_get_private_data(This->wined3d_texture, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture8Impl_FreePrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DTexture8Impl_FreePrivateData(IDirect3DTexture8 *iface, + REFGUID refguid) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DTexture_FreePrivateData(This->wineD3DTexture, refguid); + hr = wined3d_texture_free_private_data(This->wined3d_texture, refguid); wined3d_mutex_unlock(); return hr; } -static DWORD WINAPI IDirect3DTexture8Impl_SetPriority(LPDIRECT3DTEXTURE8 iface, DWORD PriorityNew) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static DWORD WINAPI IDirect3DTexture8Impl_SetPriority(IDirect3DTexture8 *iface, DWORD PriorityNew) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); DWORD ret; TRACE("iface %p, priority %u.\n", iface, PriorityNew); wined3d_mutex_lock(); - ret = IWineD3DTexture_SetPriority(This->wineD3DTexture, PriorityNew); + ret = wined3d_texture_set_priority(This->wined3d_texture, PriorityNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DTexture8Impl_GetPriority(LPDIRECT3DTEXTURE8 iface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static DWORD WINAPI IDirect3DTexture8Impl_GetPriority(IDirect3DTexture8 *iface) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DTexture_GetPriority(This->wineD3DTexture); + ret = wined3d_texture_get_priority(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static void WINAPI IDirect3DTexture8Impl_PreLoad(LPDIRECT3DTEXTURE8 iface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static void WINAPI IDirect3DTexture8Impl_PreLoad(IDirect3DTexture8 *iface) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DTexture_PreLoad(This->wineD3DTexture); + wined3d_texture_preload(This->wined3d_texture); wined3d_mutex_unlock(); } -static D3DRESOURCETYPE WINAPI IDirect3DTexture8Impl_GetType(LPDIRECT3DTEXTURE8 iface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static D3DRESOURCETYPE WINAPI IDirect3DTexture8Impl_GetType(IDirect3DTexture8 *iface) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); D3DRESOURCETYPE type; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - type = IWineD3DTexture_GetType(This->wineD3DTexture); + type = wined3d_texture_get_type(This->wined3d_texture); wined3d_mutex_unlock(); return type; } /* IDirect3DTexture8 IDirect3DBaseTexture8 Interface follow: */ -static DWORD WINAPI IDirect3DTexture8Impl_SetLOD(LPDIRECT3DTEXTURE8 iface, DWORD LODNew) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static DWORD WINAPI IDirect3DTexture8Impl_SetLOD(IDirect3DTexture8 *iface, DWORD LODNew) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); DWORD ret; TRACE("iface %p, lod %u.\n", iface, LODNew); wined3d_mutex_lock(); - ret = IWineD3DTexture_SetLOD(This->wineD3DTexture, LODNew); + ret = wined3d_texture_set_lod(This->wined3d_texture, LODNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DTexture8Impl_GetLOD(LPDIRECT3DTEXTURE8 iface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static DWORD WINAPI IDirect3DTexture8Impl_GetLOD(IDirect3DTexture8 *iface) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DTexture_GetLOD(This->wineD3DTexture); + ret = wined3d_texture_get_lod(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DTexture8Impl_GetLevelCount(LPDIRECT3DTEXTURE8 iface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static DWORD WINAPI IDirect3DTexture8Impl_GetLevelCount(IDirect3DTexture8 *iface) +{ + IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DTexture_GetLevelCount(This->wineD3DTexture); + ret = wined3d_texture_get_level_count(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -/* IDirect3DTexture8 Interface follow: */ -static HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface, UINT Level, D3DSURFACE_DESC *pDesc) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; - WINED3DSURFACE_DESC wined3ddesc; - HRESULT hr; +static HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(IDirect3DTexture8 *iface, + UINT level, D3DSURFACE_DESC *desc) +{ + IDirect3DTexture8Impl *texture = impl_from_IDirect3DTexture8(iface); + struct wined3d_resource *sub_resource; + HRESULT hr = D3D_OK; - TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); + TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); wined3d_mutex_lock(); - hr = IWineD3DTexture_GetLevelDesc(This->wineD3DTexture, Level, &wined3ddesc); - wined3d_mutex_unlock(); - - if (SUCCEEDED(hr)) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else { - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format); - pDesc->Type = wined3ddesc.resource_type; - pDesc->Usage = wined3ddesc.usage; - pDesc->Pool = wined3ddesc.pool; - pDesc->Size = wined3ddesc.size; - pDesc->MultiSampleType = wined3ddesc.multisample_type; - pDesc->Width = wined3ddesc.width; - pDesc->Height = wined3ddesc.height; + struct wined3d_resource_desc wined3d_desc; + + wined3d_resource_get_desc(sub_resource, &wined3d_desc); + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; + desc->MultiSampleType = wined3d_desc.multisample_type; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; } + wined3d_mutex_unlock(); return hr; } static HRESULT WINAPI IDirect3DTexture8Impl_GetSurfaceLevel(IDirect3DTexture8 *iface, - UINT Level, IDirect3DSurface8 **ppSurfaceLevel) + UINT level, IDirect3DSurface8 **surface) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; - IWineD3DSurface *mySurface = NULL; - HRESULT hr; + IDirect3DTexture8Impl *texture = impl_from_IDirect3DTexture8(iface); + struct wined3d_resource *sub_resource; - TRACE("iface %p, level %u, surface %p.\n", iface, Level, ppSurfaceLevel); + TRACE("iface %p, level %u, surface %p.\n", iface, level, surface); wined3d_mutex_lock(); - hr = IWineD3DTexture_GetSurfaceLevel(This->wineD3DTexture, Level, &mySurface); - if (SUCCEEDED(hr) && ppSurfaceLevel) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) { - *ppSurfaceLevel = IWineD3DSurface_GetParent(mySurface); - IDirect3DSurface8_AddRef(*ppSurfaceLevel); - IWineD3DSurface_Release(mySurface); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; } + + *surface = wined3d_resource_get_parent(sub_resource); + IDirect3DSurface8_AddRef(*surface); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } -static HRESULT WINAPI IDirect3DTexture8Impl_LockRect(LPDIRECT3DTEXTURE8 iface, UINT Level, D3DLOCKED_RECT *pLockedRect, CONST RECT *pRect, DWORD Flags) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DTexture8Impl_LockRect(IDirect3DTexture8 *iface, UINT level, + D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags) +{ + IDirect3DTexture8Impl *texture = impl_from_IDirect3DTexture8(iface); + struct wined3d_resource *sub_resource; HRESULT hr; TRACE("iface %p, level %u, locked_rect %p, rect %p, flags %#x.\n", - iface, Level, pLockedRect, pRect, Flags); + iface, level, locked_rect, rect, flags); wined3d_mutex_lock(); - hr = IWineD3DTexture_LockRect(This->wineD3DTexture, Level, (WINED3DLOCKED_RECT *) pLockedRect, pRect, Flags); + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface8_LockRect((IDirect3DSurface8 *)wined3d_resource_get_parent(sub_resource), + locked_rect, rect, flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture8Impl_UnlockRect(LPDIRECT3DTEXTURE8 iface, UINT Level) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DTexture8Impl_UnlockRect(IDirect3DTexture8 *iface, UINT level) +{ + IDirect3DTexture8Impl *texture = impl_from_IDirect3DTexture8(iface); + struct wined3d_resource *sub_resource; HRESULT hr; - TRACE("iface %p, level %u.\n", iface, Level); + TRACE("iface %p, level %u.\n", iface, level); wined3d_mutex_lock(); - hr = IWineD3DTexture_UnlockRect(This->wineD3DTexture, Level); + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface8_UnlockRect((IDirect3DSurface8 *)wined3d_resource_get_parent(sub_resource)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture8Impl_AddDirtyRect(LPDIRECT3DTEXTURE8 iface, CONST RECT *pDirtyRect) { - IDirect3DTexture8Impl *This = (IDirect3DTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DTexture8Impl_AddDirtyRect(IDirect3DTexture8 *iface, const RECT *dirty_rect) +{ + IDirect3DTexture8Impl *texture = impl_from_IDirect3DTexture8(iface); HRESULT hr; - TRACE("iface %p, dirty_rect %p.\n", iface, pDirtyRect); + TRACE("iface %p, dirty_rect %s.\n", + iface, wine_dbgstr_rect(dirty_rect)); wined3d_mutex_lock(); - hr = IWineD3DTexture_AddDirtyRect(This->wineD3DTexture, pDirtyRect); + if (!dirty_rect) + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, 0, NULL); + else + { + WINED3DBOX dirty_region; + + dirty_region.Left = dirty_rect->left; + dirty_region.Top = dirty_rect->top; + dirty_region.Right = dirty_rect->right; + dirty_region.Bottom = dirty_rect->bottom; + dirty_region.Front = 0; + dirty_region.Back = 1; + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, 0, &dirty_region); + } wined3d_mutex_unlock(); return hr; @@ -355,13 +409,13 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic { HRESULT hr; - texture->lpVtbl = &Direct3DTexture8_Vtbl; + texture->IDirect3DTexture8_iface.lpVtbl = &Direct3DTexture8_Vtbl; texture->ref = 1; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateTexture(device->WineD3DDevice, width, height, levels, + hr = wined3d_texture_create_2d(device->wined3d_device, width, height, levels, usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, - texture, &d3d8_texture_wined3d_parent_ops, &texture->wineD3DTexture); + texture, &d3d8_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -369,7 +423,7 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic return hr; } - texture->parentDevice = (IDirect3DDevice8 *)device; + texture->parentDevice = &device->IDirect3DDevice8_iface; IDirect3DDevice8_AddRef(texture->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d8/vertexdeclaration.c b/dll/directx/wine/d3d8/vertexdeclaration.c index 58573a50f84..78a59d11ad5 100644 --- a/dll/directx/wine/d3d8/vertexdeclaration.c +++ b/dll/directx/wine/d3d8/vertexdeclaration.c @@ -53,7 +53,7 @@ static ULONG WINAPI IDirect3DVertexDeclaration8Impl_AddRef(IDirect3DVertexDeclar if (ref_count == 1) { wined3d_mutex_lock(); - IWineD3DVertexDeclaration_AddRef(This->wined3d_vertex_declaration); + wined3d_vertex_declaration_incref(This->wined3d_vertex_declaration); wined3d_mutex_unlock(); } @@ -69,7 +69,7 @@ static ULONG WINAPI IDirect3DVertexDeclaration8Impl_Release(IDirect3DVertexDecla if (!ref_count) { wined3d_mutex_lock(); - IWineD3DVertexDeclaration_Release(This->wined3d_vertex_declaration); + wined3d_vertex_declaration_decref(This->wined3d_vertex_declaration); wined3d_mutex_unlock(); } @@ -199,7 +199,7 @@ size_t parse_token(const DWORD* pToken) return tokenlen; } -void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader) +void load_local_constants(const DWORD *d3d8_elements, struct wined3d_shader *wined3d_vertex_shader) { const DWORD *token = d3d8_elements; @@ -224,7 +224,8 @@ void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wine *(const float *)(token + i * 4 + 4)); } } - hr = IWineD3DVertexShader_SetLocalConstantsF(wined3d_vertex_shader, constant_idx, (const float *)token+1, count); + hr = wined3d_shader_set_local_constants_float(wined3d_vertex_shader, + constant_idx, (const float *)token + 1, count); if (FAILED(hr)) ERR("Failed setting shader constants\n"); } @@ -308,7 +309,7 @@ static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3 WINED3DVERTEXELEMENT *element; D3DVSD_TOKENTYPE token_type; unsigned int element_count = 0; - DWORD stream = 0; + WORD stream = 0; int offset = 0; TRACE("d3d8_elements %p, wined3d_elements %p\n", d3d8_elements, wined3d_elements); @@ -399,7 +400,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration8Impl *declaration, memcpy(declaration->elements, elements, declaration->elements_size); wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVertexDeclaration(device->WineD3DDevice, wined3d_elements, wined3d_element_count, + hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count, declaration, &d3d8_vertexdeclaration_wined3d_parent_ops, &declaration->wined3d_vertex_declaration); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, wined3d_elements); @@ -424,7 +425,7 @@ HRESULT vertexdeclaration_init_fvf(IDirect3DVertexDeclaration8Impl *declaration, declaration->elements_size = 0; declaration->shader_handle = fvf; - hr = IWineD3DDevice_CreateVertexDeclarationFromFVF(device->WineD3DDevice, fvf, declaration, + hr = wined3d_vertex_declaration_create_from_fvf(device->wined3d_device, fvf, declaration, &d3d8_vertexdeclaration_wined3d_parent_ops, &declaration->wined3d_vertex_declaration); if (FAILED(hr)) { diff --git a/dll/directx/wine/d3d8/volume.c b/dll/directx/wine/d3d8/volume.c index 1705822cf5d..2726880aa83 100644 --- a/dll/directx/wine/d3d8/volume.c +++ b/dll/directx/wine/d3d8/volume.c @@ -23,9 +23,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); -/* IDirect3DVolume8 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 iface, REFIID riid, LPVOID *ppobj) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static inline IDirect3DVolume8Impl *impl_from_IDirect3DVolume8(IDirect3DVolume8 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DVolume8Impl, IDirect3DVolume8_iface); +} + +static HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(IDirect3DVolume8 *iface, REFIID riid, + void **ppobj) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -41,8 +47,9 @@ static HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 ifac return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static ULONG WINAPI IDirect3DVolume8Impl_AddRef(IDirect3DVolume8 *iface) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); TRACE("iface %p.\n", iface); @@ -59,7 +66,7 @@ static ULONG WINAPI IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface) { if (ref == 1) { wined3d_mutex_lock(); - IWineD3DVolume_AddRef(This->wineD3DVolume); + wined3d_volume_incref(This->wined3d_volume); wined3d_mutex_unlock(); } @@ -67,8 +74,9 @@ static ULONG WINAPI IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface) { } } -static ULONG WINAPI IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static ULONG WINAPI IDirect3DVolume8Impl_Release(IDirect3DVolume8 *iface) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); TRACE("iface %p.\n", iface); @@ -85,7 +93,7 @@ static ULONG WINAPI IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface) { if (ref == 0) { wined3d_mutex_lock(); - IWineD3DVolume_Release(This->wineD3DVolume); + wined3d_volume_decref(This->wined3d_volume); wined3d_mutex_unlock(); } @@ -93,10 +101,10 @@ static ULONG WINAPI IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface) { } } -/* IDirect3DVolume8 Interface follow: */ -static HRESULT WINAPI IDirect3DVolume8Impl_GetDevice(IDirect3DVolume8 *iface, IDirect3DDevice8 **device) +static HRESULT WINAPI IDirect3DVolume8Impl_GetDevice(IDirect3DVolume8 *iface, + IDirect3DDevice8 **device) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); IDirect3DResource8 *resource; HRESULT hr; @@ -114,49 +122,56 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetDevice(IDirect3DVolume8 *iface, ID return hr; } -static HRESULT WINAPI IDirect3DVolume8Impl_SetPrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid, CONST void *pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static HRESULT WINAPI IDirect3DVolume8Impl_SetPrivateData(IDirect3DVolume8 *iface, REFGUID refguid, + const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DVolume_SetPrivateData(This->wineD3DVolume, refguid, pData, SizeOfData, Flags); + hr = wined3d_volume_set_private_data(This->wined3d_volume, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume8Impl_GetPrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid, void *pData, DWORD* pSizeOfData) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static HRESULT WINAPI IDirect3DVolume8Impl_GetPrivateData(IDirect3DVolume8 *iface, REFGUID refguid, + void *pData, DWORD *pSizeOfData) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DVolume_GetPrivateData(This->wineD3DVolume, refguid, pData, pSizeOfData); + hr = wined3d_volume_get_private_data(This->wined3d_volume, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume8Impl_FreePrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static HRESULT WINAPI IDirect3DVolume8Impl_FreePrivateData(IDirect3DVolume8 *iface, REFGUID refguid) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DVolume_FreePrivateData(This->wineD3DVolume, refguid); + hr = wined3d_volume_free_private_data(This->wined3d_volume, refguid); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface, REFIID riid, void **ppContainer) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(IDirect3DVolume8 *iface, REFIID riid, + void **ppContainer) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); HRESULT res; TRACE("iface %p, riid %s, container %p.\n", @@ -164,10 +179,6 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface, if (!This->container) return E_NOINTERFACE; - if (!ppContainer) { - ERR("Called without a valid ppContainer.\n"); - } - res = IUnknown_QueryInterface(This->container, riid, ppContainer); TRACE("Returning ppContainer %p, *ppContainer %p\n", ppContainer, *ppContainer); @@ -175,50 +186,57 @@ static HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface, return res; } -static HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DVOLUME_DESC *pDesc) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; - WINED3DVOLUME_DESC wined3ddesc; +static HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(IDirect3DVolume8 *iface, D3DVOLUME_DESC *desc) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; - TRACE("iface %p, desc %p.\n", iface, pDesc); + TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - IWineD3DVolume_GetDesc(This->wineD3DVolume, &wined3ddesc); + wined3d_resource = wined3d_volume_get_resource(This->wined3d_volume); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.Format); - pDesc->Type = wined3ddesc.Type; - pDesc->Usage = wined3ddesc.Usage; - pDesc->Pool = wined3ddesc.Pool; - pDesc->Size = wined3ddesc.Size; - pDesc->Width = wined3ddesc.Width; - pDesc->Height = wined3ddesc.Height; - pDesc->Depth = wined3ddesc.Depth; + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; + desc->Depth = wined3d_desc.depth; return D3D_OK; } -static HRESULT WINAPI IDirect3DVolume8Impl_LockBox(LPDIRECT3DVOLUME8 iface, D3DLOCKED_BOX *pLockedVolume, CONST D3DBOX *pBox, DWORD Flags) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static HRESULT WINAPI IDirect3DVolume8Impl_LockBox(IDirect3DVolume8 *iface, + D3DLOCKED_BOX *pLockedVolume, const D3DBOX *pBox, DWORD Flags) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); HRESULT hr; TRACE("iface %p, locked_box %p, box %p, flags %#x.\n", iface, pLockedVolume, pBox, Flags); wined3d_mutex_lock(); - hr = IWineD3DVolume_LockBox(This->wineD3DVolume, (WINED3DLOCKED_BOX *) pLockedVolume, (CONST WINED3DBOX *) pBox, Flags); + hr = wined3d_volume_map(This->wined3d_volume, (WINED3DLOCKED_BOX *)pLockedVolume, + (const WINED3DBOX *)pBox, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume8Impl_UnlockBox(LPDIRECT3DVOLUME8 iface) { - IDirect3DVolume8Impl *This = (IDirect3DVolume8Impl *)iface; +static HRESULT WINAPI IDirect3DVolume8Impl_UnlockBox(IDirect3DVolume8 *iface) +{ + IDirect3DVolume8Impl *This = impl_from_IDirect3DVolume8(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DVolume_UnlockBox(This->wineD3DVolume); + hr = wined3d_volume_unmap(This->wined3d_volume); wined3d_mutex_unlock(); return hr; @@ -256,11 +274,11 @@ HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device, { HRESULT hr; - volume->lpVtbl = &Direct3DVolume8_Vtbl; + volume->IDirect3DVolume8_iface.lpVtbl = &Direct3DVolume8_Vtbl; volume->ref = 1; - hr = IWineD3DDevice_CreateVolume(device->WineD3DDevice, width, height, depth, usage, - format, pool, volume, &d3d8_volume_wined3d_parent_ops, &volume->wineD3DVolume); + hr = wined3d_volume_create(device->wined3d_device, width, height, depth, usage, + format, pool, volume, &d3d8_volume_wined3d_parent_ops, &volume->wined3d_volume); if (FAILED(hr)) { WARN("Failed to create wined3d volume, hr %#x.\n", hr); diff --git a/dll/directx/wine/d3d8/volumetexture.c b/dll/directx/wine/d3d8/volumetexture.c index bd72d68e916..08e36807bba 100644 --- a/dll/directx/wine/d3d8/volumetexture.c +++ b/dll/directx/wine/d3d8/volumetexture.c @@ -23,9 +23,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); -/* IDirect3DVolumeTexture8 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_QueryInterface(LPDIRECT3DVOLUMETEXTURE8 iface, REFIID riid, LPVOID *ppobj) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static inline IDirect3DVolumeTexture8Impl *impl_from_IDirect3DVolumeTexture8(IDirect3DVolumeTexture8 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DVolumeTexture8Impl, IDirect3DVolumeTexture8_iface); +} + +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_QueryInterface(IDirect3DVolumeTexture8 *iface, + REFIID riid, void **ppobj) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -43,8 +49,9 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_QueryInterface(LPDIRECT3DVOLUM return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DVolumeTexture8Impl_AddRef(LPDIRECT3DVOLUMETEXTURE8 iface) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static ULONG WINAPI IDirect3DVolumeTexture8Impl_AddRef(IDirect3DVolumeTexture8 *iface) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -53,15 +60,16 @@ static ULONG WINAPI IDirect3DVolumeTexture8Impl_AddRef(LPDIRECT3DVOLUMETEXTURE8 { IDirect3DDevice8_AddRef(This->parentDevice); wined3d_mutex_lock(); - IWineD3DVolumeTexture_AddRef(This->wineD3DVolumeTexture); + wined3d_texture_incref(This->wined3d_texture); wined3d_mutex_unlock(); } return ref; } -static ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8 iface) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(IDirect3DVolumeTexture8 *iface) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -70,7 +78,7 @@ static ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8 IDirect3DDevice8 *parentDevice = This->parentDevice; wined3d_mutex_lock(); - IWineD3DVolumeTexture_Release(This->wineD3DVolumeTexture); + wined3d_texture_decref(This->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -80,9 +88,10 @@ static ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8 } /* IDirect3DVolumeTexture8 IDirect3DResource8 Interface follow: */ -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetDevice(IDirect3DVolumeTexture8 *iface, IDirect3DDevice8 **device) +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetDevice(IDirect3DVolumeTexture8 *iface, + IDirect3DDevice8 **device) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -94,220 +103,253 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetDevice(IDirect3DVolumeTextu return D3D_OK; } -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_SetPrivateData(IDirect3DVolumeTexture8 *iface, + REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_SetPrivateData(This->wineD3DVolumeTexture, refguid, pData, SizeOfData, Flags); + hr = wined3d_texture_set_private_data(This->wined3d_texture, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, void *pData, DWORD *pSizeOfData) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetPrivateData(IDirect3DVolumeTexture8 *iface, + REFGUID refguid, void *pData, DWORD *pSizeOfData) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_GetPrivateData(This->wineD3DVolumeTexture, refguid, pData, pSizeOfData); + hr = wined3d_texture_get_private_data(This->wined3d_texture, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_FreePrivateData(IDirect3DVolumeTexture8 *iface, + REFGUID refguid) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_FreePrivateData(This->wineD3DVolumeTexture, refguid); + hr = wined3d_texture_free_private_data(This->wined3d_texture, refguid); wined3d_mutex_unlock(); return hr; } -static DWORD WINAPI IDirect3DVolumeTexture8Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD PriorityNew) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture8Impl_SetPriority(IDirect3DVolumeTexture8 *iface, + DWORD PriorityNew) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); DWORD ret; TRACE("iface %p, priority %u.\n", iface, PriorityNew); wined3d_mutex_lock(); - ret = IWineD3DVolumeTexture_SetPriority(This->wineD3DVolumeTexture, PriorityNew); + ret = wined3d_texture_set_priority(This->wined3d_texture, PriorityNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE8 iface) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetPriority(IDirect3DVolumeTexture8 *iface) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DVolumeTexture_GetPriority(This->wineD3DVolumeTexture); + ret = wined3d_texture_get_priority(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static void WINAPI IDirect3DVolumeTexture8Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE8 iface) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static void WINAPI IDirect3DVolumeTexture8Impl_PreLoad(IDirect3DVolumeTexture8 *iface) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DVolumeTexture_PreLoad(This->wineD3DVolumeTexture); + wined3d_texture_preload(This->wined3d_texture); wined3d_mutex_unlock(); } -static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture8Impl_GetType(LPDIRECT3DVOLUMETEXTURE8 iface) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture8Impl_GetType(IDirect3DVolumeTexture8 *iface) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); D3DRESOURCETYPE type; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - type = IWineD3DVolumeTexture_GetType(This->wineD3DVolumeTexture); + type = wined3d_texture_get_type(This->wined3d_texture); wined3d_mutex_unlock(); return type; } /* IDirect3DVolumeTexture8 IDirect3DBaseTexture8 Interface follow: */ -static DWORD WINAPI IDirect3DVolumeTexture8Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD LODNew) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture8Impl_SetLOD(IDirect3DVolumeTexture8 *iface, DWORD LODNew) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); DWORD ret; TRACE("iface %p, lod %u.\n", iface, LODNew); wined3d_mutex_lock(); - ret = IWineD3DVolumeTexture_SetLOD(This->wineD3DVolumeTexture, LODNew); + ret = wined3d_texture_set_lod(This->wined3d_texture, LODNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE8 iface) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLOD(IDirect3DVolumeTexture8 *iface) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DVolumeTexture_GetLOD(This->wineD3DVolumeTexture); + ret = wined3d_texture_get_lod(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE8 iface) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLevelCount(IDirect3DVolumeTexture8 *iface) +{ + IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DVolumeTexture_GetLevelCount(This->wineD3DVolumeTexture); + ret = wined3d_texture_get_level_count(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -/* IDirect3DVolumeTexture8 Interface follow: */ -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level, D3DVOLUME_DESC* pDesc) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; - WINED3DVOLUME_DESC wined3ddesc; - HRESULT hr; +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(IDirect3DVolumeTexture8 *iface, + UINT level, D3DVOLUME_DESC *desc) +{ + IDirect3DVolumeTexture8Impl *texture = impl_from_IDirect3DVolumeTexture8(iface); + struct wined3d_resource *sub_resource; + HRESULT hr = D3D_OK; - TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); + TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_GetLevelDesc(This->wineD3DVolumeTexture, Level, &wined3ddesc); - wined3d_mutex_unlock(); - - if (SUCCEEDED(hr)) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else { - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.Format); - pDesc->Type = wined3ddesc.Type; - pDesc->Usage = wined3ddesc.Usage; - pDesc->Pool = wined3ddesc.Pool; - pDesc->Size = wined3ddesc.Size; - pDesc->Width = wined3ddesc.Width; - pDesc->Height = wined3ddesc.Height; - pDesc->Depth = wined3ddesc.Depth; + struct wined3d_resource_desc wined3d_desc; + + wined3d_resource_get_desc(sub_resource, &wined3d_desc); + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; + desc->Depth = wined3d_desc.depth; } + wined3d_mutex_unlock(); return hr; } static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetVolumeLevel(IDirect3DVolumeTexture8 *iface, - UINT Level, IDirect3DVolume8 **ppVolumeLevel) + UINT level, IDirect3DVolume8 **volume) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; - IWineD3DVolume *myVolume = NULL; - HRESULT hr; + IDirect3DVolumeTexture8Impl *texture = impl_from_IDirect3DVolumeTexture8(iface); + struct wined3d_resource *sub_resource; - TRACE("iface %p, level %u, volume %p.\n", iface, Level, ppVolumeLevel); + TRACE("iface %p, level %u, volume %p.\n", iface, level, volume); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_GetVolumeLevel(This->wineD3DVolumeTexture, Level, &myVolume); - if (SUCCEEDED(hr) && ppVolumeLevel) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) { - *ppVolumeLevel = IWineD3DVolumeTexture_GetParent(myVolume); - IDirect3DVolume8_AddRef(*ppVolumeLevel); - IWineD3DVolumeTexture_Release(myVolume); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; } + + *volume = wined3d_resource_get_parent(sub_resource); + IDirect3DVolume8_AddRef(*volume); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_LockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level, D3DLOCKED_BOX *pLockedVolume, CONST D3DBOX *pBox, DWORD Flags) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_LockBox(IDirect3DVolumeTexture8 *iface, + UINT level, D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags) +{ + IDirect3DVolumeTexture8Impl *texture = impl_from_IDirect3DVolumeTexture8(iface); + struct wined3d_resource *sub_resource; HRESULT hr; TRACE("iface %p, level %u, locked_box %p, box %p, flags %#x.\n", - iface, Level, pLockedVolume, pBox, Flags); + iface, level, locked_box, box, flags); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_LockBox(This->wineD3DVolumeTexture, Level, (WINED3DLOCKED_BOX *) pLockedVolume, (CONST WINED3DBOX *) pBox, Flags); + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DVolume8_LockBox((IDirect3DVolume8 *)wined3d_resource_get_parent(sub_resource), + locked_box, box, flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_UnlockBox(IDirect3DVolumeTexture8 *iface, + UINT level) +{ + IDirect3DVolumeTexture8Impl *texture = impl_from_IDirect3DVolumeTexture8(iface); + struct wined3d_resource *sub_resource; HRESULT hr; - TRACE("iface %p, level %u.\n", iface, Level); + TRACE("iface %p, level %u.\n", iface, level); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_UnlockBox(This->wineD3DVolumeTexture, Level); + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DVolume8_UnlockBox((IDirect3DVolume8 *)wined3d_resource_get_parent(sub_resource)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture8Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE8 iface, CONST D3DBOX *pDirtyBox) { - IDirect3DVolumeTexture8Impl *This = (IDirect3DVolumeTexture8Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture8Impl_AddDirtyBox(IDirect3DVolumeTexture8 *iface, + const D3DBOX *dirty_box) +{ + IDirect3DVolumeTexture8Impl *texture = impl_from_IDirect3DVolumeTexture8(iface); HRESULT hr; - TRACE("iface %p, dirty_box %p.\n", iface, pDirtyBox); + TRACE("iface %p, dirty_box %p.\n", iface, dirty_box); wined3d_mutex_lock(); - hr = IWineD3DVolumeTexture_AddDirtyBox(This->wineD3DVolumeTexture, (CONST WINED3DBOX *) pDirtyBox); + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, 0, (const WINED3DBOX *)dirty_box); wined3d_mutex_unlock(); return hr; @@ -355,13 +397,13 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice { HRESULT hr; - texture->lpVtbl = &Direct3DVolumeTexture8_Vtbl; + texture->IDirect3DVolumeTexture8_iface.lpVtbl = &Direct3DVolumeTexture8_Vtbl; texture->ref = 1; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVolumeTexture(device->WineD3DDevice, width, height, depth, levels, + hr = wined3d_texture_create_3d(device->wined3d_device, width, height, depth, levels, usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture, - &d3d8_volumetexture_wined3d_parent_ops, &texture->wineD3DVolumeTexture); + &d3d8_volumetexture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -369,7 +411,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice return hr; } - texture->parentDevice = (IDirect3DDevice8 *)device; + texture->parentDevice = &device->IDirect3DDevice8_iface; IDirect3DDevice8_AddRef(texture->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/CMakeLists.txt b/dll/directx/wine/d3d9/CMakeLists.txt index bdd13db21b7..642815dc02b 100644 --- a/dll/directx/wine/d3d9/CMakeLists.txt +++ b/dll/directx/wine/d3d9/CMakeLists.txt @@ -7,10 +7,6 @@ add_definitions( include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -if(MSVC) - add_definitions(-FImsvchelper.h) -endif() - set_rc_compiler() spec2def(d3d9.dll d3d9.spec) @@ -31,7 +27,6 @@ list(APPEND SOURCE volume.c volumetexture.c version.rc - #${REACTOS_BINARY_DIR}/include/reactos/wine/wined3d_i.c ${CMAKE_CURRENT_BINARY_DIR}/d3d9_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3d9.def) diff --git a/dll/directx/wine/d3d9/buffer.c b/dll/directx/wine/d3d9/buffer.c index ac8c2443e33..d9a5564d577 100644 --- a/dll/directx/wine/d3d9/buffer.c +++ b/dll/directx/wine/d3d9/buffer.c @@ -53,7 +53,7 @@ static ULONG WINAPI d3d9_vertexbuffer_AddRef(IDirect3DVertexBuffer9 *iface) { IDirect3DDevice9Ex_AddRef(buffer->parentDevice); wined3d_mutex_lock(); - IWineD3DBuffer_AddRef(buffer->wineD3DVertexBuffer); + wined3d_buffer_incref(buffer->wineD3DVertexBuffer); wined3d_mutex_unlock(); } @@ -72,7 +72,7 @@ static ULONG WINAPI d3d9_vertexbuffer_Release(IDirect3DVertexBuffer9 *iface) IDirect3DDevice9Ex *device = buffer->parentDevice; wined3d_mutex_lock(); - IWineD3DBuffer_Release(buffer->wineD3DVertexBuffer); + wined3d_buffer_decref(buffer->wineD3DVertexBuffer); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -103,7 +103,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_SetPrivateData(IDirect3DVertexBuffer9 *i iface, debugstr_guid(guid), data, data_size, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_SetPrivateData(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, + hr = wined3d_buffer_set_private_data(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, guid, data, data_size, flags); wined3d_mutex_unlock(); @@ -119,7 +119,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_GetPrivateData(IDirect3DVertexBuffer9 *i iface, debugstr_guid(guid), data, data_size); wined3d_mutex_lock(); - hr = IWineD3DBuffer_GetPrivateData(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, + hr = wined3d_buffer_get_private_data(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, guid, data, data_size); wined3d_mutex_unlock(); @@ -133,7 +133,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_FreePrivateData(IDirect3DVertexBuffer9 * TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); wined3d_mutex_lock(); - hr = IWineD3DBuffer_FreePrivateData(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, guid); + hr = wined3d_buffer_free_private_data(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, guid); wined3d_mutex_unlock(); return hr; @@ -146,7 +146,7 @@ static DWORD WINAPI d3d9_vertexbuffer_SetPriority(IDirect3DVertexBuffer9 *iface, TRACE("iface %p, priority %u.\n", iface, priority); wined3d_mutex_lock(); - previous = IWineD3DBuffer_SetPriority(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, priority); + previous = wined3d_buffer_set_priority(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, priority); wined3d_mutex_unlock(); return previous; @@ -159,7 +159,7 @@ static DWORD WINAPI d3d9_vertexbuffer_GetPriority(IDirect3DVertexBuffer9 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - priority = IWineD3DBuffer_GetPriority(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer); + priority = wined3d_buffer_get_priority(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer); wined3d_mutex_unlock(); return priority; @@ -170,7 +170,7 @@ static void WINAPI d3d9_vertexbuffer_PreLoad(IDirect3DVertexBuffer9 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DBuffer_PreLoad(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer); + wined3d_buffer_preload(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer); wined3d_mutex_unlock(); } @@ -190,7 +190,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_Lock(IDirect3DVertexBuffer9 *iface, iface, offset, size, data, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Map(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, + hr = wined3d_buffer_map(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer, offset, size, (BYTE **)data, flags); wined3d_mutex_unlock(); @@ -199,32 +199,32 @@ static HRESULT WINAPI d3d9_vertexbuffer_Lock(IDirect3DVertexBuffer9 *iface, static HRESULT WINAPI d3d9_vertexbuffer_Unlock(IDirect3DVertexBuffer9 *iface) { - HRESULT hr; - TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Unmap(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer); + wined3d_buffer_unmap(((IDirect3DVertexBuffer9Impl *)iface)->wineD3DVertexBuffer); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_vertexbuffer_GetDesc(IDirect3DVertexBuffer9 *iface, D3DVERTEXBUFFER_DESC *desc) { IDirect3DVertexBuffer9Impl *buffer = (IDirect3DVertexBuffer9Impl *)iface; - WINED3DBUFFER_DESC wined3d_desc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - IWineD3DBuffer_GetDesc(buffer->wineD3DVertexBuffer, &wined3d_desc); + wined3d_resource = wined3d_buffer_get_resource(buffer->wineD3DVertexBuffer); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); desc->Format = D3DFMT_VERTEXDATA; - desc->Usage = wined3d_desc.Usage; - desc->Pool = wined3d_desc.Pool; - desc->Size = wined3d_desc.Size; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; desc->Type = D3DRTYPE_VERTEXBUFFER; desc->FVF = buffer->fvf; @@ -272,7 +272,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im buffer->fvf = fvf; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVertexBuffer(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK, + hr = wined3d_buffer_create_vb(device->wined3d_device, size, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, buffer, &d3d9_vertexbuffer_wined3d_parent_ops, &buffer->wineD3DVertexBuffer); wined3d_mutex_unlock(); if (FAILED(hr)) @@ -281,7 +281,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im return hr; } - buffer->parentDevice = (IDirect3DDevice9Ex *)device; + buffer->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(buffer->parentDevice); return D3D_OK; @@ -317,7 +317,7 @@ static ULONG WINAPI d3d9_indexbuffer_AddRef(IDirect3DIndexBuffer9 *iface) { IDirect3DDevice9Ex_AddRef(buffer->parentDevice); wined3d_mutex_lock(); - IWineD3DBuffer_AddRef(buffer->wineD3DIndexBuffer); + wined3d_buffer_incref(buffer->wineD3DIndexBuffer); wined3d_mutex_unlock(); } @@ -336,7 +336,7 @@ static ULONG WINAPI d3d9_indexbuffer_Release(IDirect3DIndexBuffer9 *iface) IDirect3DDevice9Ex *device = buffer->parentDevice; wined3d_mutex_lock(); - IWineD3DBuffer_Release(buffer->wineD3DIndexBuffer); + wined3d_buffer_decref(buffer->wineD3DIndexBuffer); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -367,7 +367,7 @@ static HRESULT WINAPI d3d9_indexbuffer_SetPrivateData(IDirect3DIndexBuffer9 *ifa iface, debugstr_guid(guid), data, data_size, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_SetPrivateData(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, + hr = wined3d_buffer_set_private_data(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, guid, data, data_size, flags); wined3d_mutex_unlock(); @@ -383,7 +383,7 @@ static HRESULT WINAPI d3d9_indexbuffer_GetPrivateData(IDirect3DIndexBuffer9 *ifa iface, debugstr_guid(guid), data, data_size); wined3d_mutex_lock(); - hr = IWineD3DBuffer_GetPrivateData(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, + hr = wined3d_buffer_get_private_data(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, guid, data, data_size); wined3d_mutex_unlock(); @@ -397,7 +397,7 @@ static HRESULT WINAPI d3d9_indexbuffer_FreePrivateData(IDirect3DIndexBuffer9 *if TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); wined3d_mutex_lock(); - hr = IWineD3DBuffer_FreePrivateData(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, guid); + hr = wined3d_buffer_free_private_data(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, guid); wined3d_mutex_unlock(); return hr; @@ -410,7 +410,7 @@ static DWORD WINAPI d3d9_indexbuffer_SetPriority(IDirect3DIndexBuffer9 *iface, D TRACE("iface %p, priority %u.\n", iface, priority); wined3d_mutex_lock(); - previous = IWineD3DBuffer_SetPriority(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, priority); + previous = wined3d_buffer_set_priority(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, priority); wined3d_mutex_unlock(); return previous; @@ -423,7 +423,7 @@ static DWORD WINAPI d3d9_indexbuffer_GetPriority(IDirect3DIndexBuffer9 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - priority = IWineD3DBuffer_GetPriority(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer); + priority = wined3d_buffer_get_priority(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer); wined3d_mutex_unlock(); return priority; @@ -434,7 +434,7 @@ static void WINAPI d3d9_indexbuffer_PreLoad(IDirect3DIndexBuffer9 *iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DBuffer_PreLoad(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer); + wined3d_buffer_preload(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer); wined3d_mutex_unlock(); } @@ -454,7 +454,7 @@ static HRESULT WINAPI d3d9_indexbuffer_Lock(IDirect3DIndexBuffer9 *iface, iface, offset, size, data, flags); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Map(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, + hr = wined3d_buffer_map(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer, offset, size, (BYTE **)data, flags); wined3d_mutex_unlock(); @@ -463,32 +463,32 @@ static HRESULT WINAPI d3d9_indexbuffer_Lock(IDirect3DIndexBuffer9 *iface, static HRESULT WINAPI d3d9_indexbuffer_Unlock(IDirect3DIndexBuffer9 *iface) { - HRESULT hr; - TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DBuffer_Unmap(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer); + wined3d_buffer_unmap(((IDirect3DIndexBuffer9Impl *)iface)->wineD3DIndexBuffer); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_indexbuffer_GetDesc(IDirect3DIndexBuffer9 *iface, D3DINDEXBUFFER_DESC *desc) { IDirect3DIndexBuffer9Impl *buffer = (IDirect3DIndexBuffer9Impl *)iface; - WINED3DBUFFER_DESC wined3d_desc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - IWineD3DBuffer_GetDesc(buffer->wineD3DIndexBuffer, &wined3d_desc); + wined3d_resource = wined3d_buffer_get_resource(buffer->wineD3DIndexBuffer); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); desc->Format = d3dformat_from_wined3dformat(buffer->format); - desc->Usage = wined3d_desc.Usage; - desc->Pool = wined3d_desc.Pool; - desc->Size = wined3d_desc.Size; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Size = wined3d_desc.size; desc->Type = D3DRTYPE_INDEXBUFFER; return D3D_OK; @@ -535,7 +535,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl buffer->format = wined3dformat_from_d3dformat(format); wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateIndexBuffer(device->WineD3DDevice, size, usage & WINED3DUSAGE_MASK, + hr = wined3d_buffer_create_ib(device->wined3d_device, size, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, buffer, &d3d9_indexbuffer_wined3d_parent_ops, &buffer->wineD3DIndexBuffer); wined3d_mutex_unlock(); if (FAILED(hr)) @@ -544,7 +544,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl return hr; } - buffer->parentDevice = (IDirect3DDevice9Ex *)device; + buffer->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(buffer->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/cubetexture.c b/dll/directx/wine/d3d9/cubetexture.c index 508784f8958..1f5e27b8033 100644 --- a/dll/directx/wine/d3d9/cubetexture.c +++ b/dll/directx/wine/d3d9/cubetexture.c @@ -26,9 +26,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -/* IDirect3DCubeTexture9 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DCubeTexture9Impl_QueryInterface(LPDIRECT3DCUBETEXTURE9 iface, REFIID riid, LPVOID* ppobj) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static inline IDirect3DCubeTexture9Impl *impl_from_IDirect3DCubeTexture9(IDirect3DCubeTexture9 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DCubeTexture9Impl, IDirect3DCubeTexture9_iface); +} + +static HRESULT WINAPI IDirect3DCubeTexture9Impl_QueryInterface(IDirect3DCubeTexture9 *iface, + REFIID riid, void **ppobj) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -46,8 +52,9 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_QueryInterface(LPDIRECT3DCUBETEX return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DCubeTexture9Impl_AddRef(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static ULONG WINAPI IDirect3DCubeTexture9Impl_AddRef(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -56,15 +63,16 @@ static ULONG WINAPI IDirect3DCubeTexture9Impl_AddRef(LPDIRECT3DCUBETEXTURE9 ifac { IDirect3DDevice9Ex_AddRef(This->parentDevice); wined3d_mutex_lock(); - IWineD3DCubeTexture_AddRef(This->wineD3DCubeTexture); + wined3d_texture_incref(This->wined3d_texture); wined3d_mutex_unlock(); } return ref; } -static ULONG WINAPI IDirect3DCubeTexture9Impl_Release(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static ULONG WINAPI IDirect3DCubeTexture9Impl_Release(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -72,10 +80,10 @@ static ULONG WINAPI IDirect3DCubeTexture9Impl_Release(LPDIRECT3DCUBETEXTURE9 ifa if (ref == 0) { IDirect3DDevice9Ex *parentDevice = This->parentDevice; - TRACE("Releasing child %p\n", This->wineD3DCubeTexture); + TRACE("Releasing child %p.\n", This->wined3d_texture); wined3d_mutex_lock(); - IWineD3DCubeTexture_Release(This->wineD3DCubeTexture); + wined3d_texture_decref(This->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -85,9 +93,10 @@ static ULONG WINAPI IDirect3DCubeTexture9Impl_Release(LPDIRECT3DCUBETEXTURE9 ifa } /* IDirect3DCubeTexture9 IDirect3DResource9 Interface follow: */ -static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetDevice(IDirect3DCubeTexture9 *iface, IDirect3DDevice9 **device) +static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetDevice(IDirect3DCubeTexture9 *iface, + IDirect3DDevice9 **device) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -99,263 +108,320 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetDevice(IDirect3DCubeTexture9 return D3D_OK; } -static HRESULT WINAPI IDirect3DCubeTexture9Impl_SetPrivateData(LPDIRECT3DCUBETEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture9Impl_SetPrivateData(IDirect3DCubeTexture9 *iface, + REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_SetPrivateData(This->wineD3DCubeTexture,refguid,pData,SizeOfData,Flags); + hr = wined3d_texture_set_private_data(This->wined3d_texture, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetPrivateData(LPDIRECT3DCUBETEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetPrivateData(IDirect3DCubeTexture9 *iface, + REFGUID refguid, void *pData, DWORD *pSizeOfData) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_GetPrivateData(This->wineD3DCubeTexture,refguid,pData,pSizeOfData); + hr = wined3d_texture_get_private_data(This->wined3d_texture, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DCubeTexture9Impl_FreePrivateData(LPDIRECT3DCUBETEXTURE9 iface, REFGUID refguid) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture9Impl_FreePrivateData(IDirect3DCubeTexture9 *iface, + REFGUID refguid) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_FreePrivateData(This->wineD3DCubeTexture,refguid); + hr = wined3d_texture_free_private_data(This->wined3d_texture, refguid); wined3d_mutex_unlock(); return hr; } -static DWORD WINAPI IDirect3DCubeTexture9Impl_SetPriority(LPDIRECT3DCUBETEXTURE9 iface, DWORD PriorityNew) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture9Impl_SetPriority(IDirect3DCubeTexture9 *iface, + DWORD PriorityNew) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); DWORD ret; TRACE("iface %p, priority %u.\n", iface, PriorityNew); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_SetPriority(This->wineD3DCubeTexture, PriorityNew); + ret = wined3d_texture_set_priority(This->wined3d_texture, PriorityNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DCubeTexture9Impl_GetPriority(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture9Impl_GetPriority(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_GetPriority(This->wineD3DCubeTexture); + ret = wined3d_texture_get_priority(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static void WINAPI IDirect3DCubeTexture9Impl_PreLoad(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static void WINAPI IDirect3DCubeTexture9Impl_PreLoad(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DCubeTexture_PreLoad(This->wineD3DCubeTexture); + wined3d_texture_preload(This->wined3d_texture); wined3d_mutex_unlock(); } -static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture9Impl_GetType(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture9Impl_GetType(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); D3DRESOURCETYPE ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_GetType(This->wineD3DCubeTexture); + ret = wined3d_texture_get_type(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } /* IDirect3DCubeTexture9 IDirect3DBaseTexture9 Interface follow: */ -static DWORD WINAPI IDirect3DCubeTexture9Impl_SetLOD(LPDIRECT3DCUBETEXTURE9 iface, DWORD LODNew) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture9Impl_SetLOD(IDirect3DCubeTexture9 *iface, DWORD LODNew) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); DWORD ret; TRACE("iface %p, lod %u.\n", iface, LODNew); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_SetLOD(This->wineD3DCubeTexture, LODNew); + ret = wined3d_texture_set_lod(This->wined3d_texture, LODNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DCubeTexture9Impl_GetLOD(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture9Impl_GetLOD(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_GetLOD(This->wineD3DCubeTexture); + ret = wined3d_texture_get_lod(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DCubeTexture9Impl_GetLevelCount(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DCubeTexture9Impl_GetLevelCount(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DCubeTexture_GetLevelCount(This->wineD3DCubeTexture); + ret = wined3d_texture_get_level_count(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static HRESULT WINAPI IDirect3DCubeTexture9Impl_SetAutoGenFilterType(LPDIRECT3DCUBETEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DCubeTexture9Impl_SetAutoGenFilterType(IDirect3DCubeTexture9 *iface, + D3DTEXTUREFILTERTYPE FilterType) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); HRESULT hr; TRACE("iface %p, filter_type %#x.\n", iface, FilterType); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_SetAutoGenFilterType(This->wineD3DCubeTexture, (WINED3DTEXTUREFILTERTYPE) FilterType); + hr = wined3d_texture_set_autogen_filter_type(This->wined3d_texture, (WINED3DTEXTUREFILTERTYPE)FilterType); wined3d_mutex_unlock(); return hr; } -static D3DTEXTUREFILTERTYPE WINAPI IDirect3DCubeTexture9Impl_GetAutoGenFilterType(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static D3DTEXTUREFILTERTYPE WINAPI IDirect3DCubeTexture9Impl_GetAutoGenFilterType(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); D3DTEXTUREFILTERTYPE ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = (D3DTEXTUREFILTERTYPE) IWineD3DCubeTexture_GetAutoGenFilterType(This->wineD3DCubeTexture); + ret = (D3DTEXTUREFILTERTYPE)wined3d_texture_get_autogen_filter_type(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static void WINAPI IDirect3DCubeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DCUBETEXTURE9 iface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; +static void WINAPI IDirect3DCubeTexture9Impl_GenerateMipSubLevels(IDirect3DCubeTexture9 *iface) +{ + IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DCubeTexture_GenerateMipSubLevels(This->wineD3DCubeTexture); + wined3d_texture_generate_mipmaps(This->wined3d_texture); wined3d_mutex_unlock(); } /* IDirect3DCubeTexture9 Interface follow: */ -static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 iface, UINT Level, D3DSURFACE_DESC* pDesc) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; - WINED3DSURFACE_DESC wined3ddesc; - HRESULT hr; +static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(IDirect3DCubeTexture9 *iface, + UINT level, D3DSURFACE_DESC *desc) +{ + IDirect3DCubeTexture9Impl *texture = impl_from_IDirect3DCubeTexture9(iface); + struct wined3d_resource *sub_resource; + HRESULT hr = D3D_OK; - TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); + TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_GetLevelDesc(This->wineD3DCubeTexture, Level, &wined3ddesc); - wined3d_mutex_unlock(); - - if (SUCCEEDED(hr)) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else { - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format); - pDesc->Type = wined3ddesc.resource_type; - pDesc->Usage = wined3ddesc.usage; - pDesc->Pool = wined3ddesc.pool; - pDesc->MultiSampleType = wined3ddesc.multisample_type; - pDesc->MultiSampleQuality = wined3ddesc.multisample_quality; - pDesc->Width = wined3ddesc.width; - pDesc->Height = wined3ddesc.height; + struct wined3d_resource_desc wined3d_desc; + + wined3d_resource_get_desc(sub_resource, &wined3d_desc); + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->MultiSampleType = wined3d_desc.multisample_type; + desc->MultiSampleQuality = wined3d_desc.multisample_quality; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; } + wined3d_mutex_unlock(); return hr; } static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetCubeMapSurface(IDirect3DCubeTexture9 *iface, - D3DCUBEMAP_FACES FaceType, UINT Level, IDirect3DSurface9 **ppCubeMapSurface) + D3DCUBEMAP_FACES face, UINT level, IDirect3DSurface9 **surface) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; - IWineD3DSurface *mySurface = NULL; - HRESULT hr; + IDirect3DCubeTexture9Impl *texture = impl_from_IDirect3DCubeTexture9(iface); + struct wined3d_resource *sub_resource; + UINT sub_resource_idx; - TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, FaceType, Level, ppCubeMapSurface); + TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, face, level, surface); wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_GetCubeMapSurface(This->wineD3DCubeTexture, - (WINED3DCUBEMAP_FACES)FaceType, Level, &mySurface); - if (SUCCEEDED(hr) && ppCubeMapSurface) + sub_resource_idx = wined3d_texture_get_level_count(texture->wined3d_texture) * face + level; + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) { - *ppCubeMapSurface = IWineD3DCubeTexture_GetParent(mySurface); - IDirect3DSurface9_AddRef(*ppCubeMapSurface); - IWineD3DCubeTexture_Release(mySurface); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; + } + + *surface = wined3d_resource_get_parent(sub_resource); + IDirect3DSurface9_AddRef(*surface); + wined3d_mutex_unlock(); + + return D3D_OK; +} + +static HRESULT WINAPI IDirect3DCubeTexture9Impl_LockRect(IDirect3DCubeTexture9 *iface, + D3DCUBEMAP_FACES face, UINT level, D3DLOCKED_RECT *locked_rect, const RECT *rect, + DWORD flags) +{ + IDirect3DCubeTexture9Impl *texture = impl_from_IDirect3DCubeTexture9(iface); + struct wined3d_resource *sub_resource; + UINT sub_resource_idx; + HRESULT hr; + + TRACE("iface %p, face %#x, level %u, locked_rect %p, rect %p, flags %#x.\n", + iface, face, level, locked_rect, rect, flags); + + wined3d_mutex_lock(); + sub_resource_idx = wined3d_texture_get_level_count(texture->wined3d_texture) * face + level; + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface9_LockRect((IDirect3DSurface9 *)wined3d_resource_get_parent(sub_resource), + locked_rect, rect, flags); + wined3d_mutex_unlock(); + + return hr; +} + +static HRESULT WINAPI IDirect3DCubeTexture9Impl_UnlockRect(IDirect3DCubeTexture9 *iface, + D3DCUBEMAP_FACES face, UINT level) +{ + IDirect3DCubeTexture9Impl *texture = impl_from_IDirect3DCubeTexture9(iface); + struct wined3d_resource *sub_resource; + UINT sub_resource_idx; + HRESULT hr; + + TRACE("iface %p, face %#x, level %u.\n", iface, face, level); + + wined3d_mutex_lock(); + sub_resource_idx = wined3d_texture_get_level_count(texture->wined3d_texture) * face + level; + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface9_UnlockRect((IDirect3DSurface9 *)wined3d_resource_get_parent(sub_resource)); + wined3d_mutex_unlock(); + + return hr; +} + +static HRESULT WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(IDirect3DCubeTexture9 *iface, + D3DCUBEMAP_FACES face, const RECT *dirty_rect) +{ + IDirect3DCubeTexture9Impl *texture = impl_from_IDirect3DCubeTexture9(iface); + HRESULT hr; + + TRACE("iface %p, face %#x, dirty_rect %s.\n", + iface, face, wine_dbgstr_rect(dirty_rect)); + + wined3d_mutex_lock(); + if (!dirty_rect) + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, face, NULL); + else + { + WINED3DBOX dirty_region; + + dirty_region.Left = dirty_rect->left; + dirty_region.Top = dirty_rect->top; + dirty_region.Right = dirty_rect->right; + dirty_region.Bottom = dirty_rect->bottom; + dirty_region.Front = 0; + dirty_region.Back = 1; + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, face, &dirty_region); } wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DCubeTexture9Impl_LockRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; - HRESULT hr; - - TRACE("iface %p, face %#x, level %u, locked_rect %p, rect %p, flags %#x.\n", - iface, FaceType, Level, pLockedRect, pRect, Flags); - - wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_LockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level, (WINED3DLOCKED_RECT *) pLockedRect, pRect, Flags); - wined3d_mutex_unlock(); - - return hr; -} - -static HRESULT WINAPI IDirect3DCubeTexture9Impl_UnlockRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, UINT Level) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; - HRESULT hr; - - TRACE("iface %p, face %#x, level %u.\n", iface, FaceType, Level); - - wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_UnlockRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, Level); - wined3d_mutex_unlock(); - - return hr; -} - -static HRESULT WINAPI IDirect3DCubeTexture9Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE9 iface, D3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) { - IDirect3DCubeTexture9Impl *This = (IDirect3DCubeTexture9Impl *)iface; - HRESULT hr; - - TRACE("iface %p, face %#x, dirty_rect %p.\n", iface, FaceType, pDirtyRect); - - wined3d_mutex_lock(); - hr = IWineD3DCubeTexture_AddDirtyRect(This->wineD3DCubeTexture, (WINED3DCUBEMAP_FACES) FaceType, pDirtyRect); - wined3d_mutex_unlock(); - - return hr; -} - - static const IDirect3DCubeTexture9Vtbl Direct3DCubeTexture9_Vtbl = { /* IUnknown */ @@ -400,13 +466,13 @@ HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Imp { HRESULT hr; - texture->lpVtbl = &Direct3DCubeTexture9_Vtbl; + texture->IDirect3DCubeTexture9_iface.lpVtbl = &Direct3DCubeTexture9_Vtbl; texture->ref = 1; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateCubeTexture(device->WineD3DDevice, edge_length, + hr = wined3d_texture_create_cube(device->wined3d_device, edge_length, levels, usage, wined3dformat_from_d3dformat(format), pool, texture, - &d3d9_cubetexture_wined3d_parent_ops, &texture->wineD3DCubeTexture); + &d3d9_cubetexture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -414,7 +480,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Imp return hr; } - texture->parentDevice = (IDirect3DDevice9Ex *)device; + texture->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(texture->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/d3d9_main.c b/dll/directx/wine/d3d9/d3d9_main.c index c405a5747d7..0d3ecec99d4 100644 --- a/dll/directx/wine/d3d9/d3d9_main.c +++ b/dll/directx/wine/d3d9/d3d9_main.c @@ -36,11 +36,11 @@ void WINAPI DebugSetMute(void) { IDirect3D9* WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT SDKVersion) { IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl)); - object->lpVtbl = &Direct3D9_Vtbl; + object->IDirect3D9Ex_iface.lpVtbl = &Direct3D9_Vtbl; object->ref = 1; wined3d_mutex_lock(); - object->WineD3D = WineDirect3DCreate(9, (IUnknown *)object); + object->WineD3D = wined3d_create(9, object); wined3d_mutex_unlock(); TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D); @@ -66,7 +66,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT SDKVersion, IDirect3D9Ex object = (IDirect3D9Impl *) ret; object->extended = TRUE; /* Enables QI for extended interfaces */ - *direct3d9ex = (IDirect3D9Ex *) object; + *direct3d9ex = &object->IDirect3D9Ex_iface; return D3D_OK; } diff --git a/dll/directx/wine/d3d9/d3d9_private.h b/dll/directx/wine/d3d9/d3d9_private.h index f1bc1a0e23d..23e7f00353e 100644 --- a/dll/directx/wine/d3d9/d3d9_private.h +++ b/dll/directx/wine/d3d9/d3d9_private.h @@ -146,11 +146,10 @@ extern const IDirect3D9ExVtbl Direct3D9_Vtbl DECLSPEC_HIDDEN; typedef struct IDirect3D9Impl { /* IUnknown fields */ - const IDirect3D9ExVtbl *lpVtbl; + IDirect3D9Ex IDirect3D9Ex_iface; LONG ref; - /* The WineD3D device */ - IWineD3D *WineD3D; + struct wined3d *WineD3D; /* Created via Direct3DCreate9Ex? Can QI extended interfaces */ BOOL extended; @@ -163,14 +162,10 @@ void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN; */ typedef struct IDirect3DDevice9Impl { - /* IUnknown fields */ - const IDirect3DDevice9ExVtbl *lpVtbl; - const IWineD3DDeviceParentVtbl *device_parent_vtbl; - LONG ref; - - /* IDirect3DDevice9 fields */ - IWineD3DDevice *WineD3DDevice; - + IDirect3DDevice9Ex IDirect3DDevice9Ex_iface; + struct wined3d_device_parent device_parent; + LONG ref; + struct wined3d_device *wined3d_device; /* Avoids recursion with nested ReleaseRef to 0 */ BOOL inDestruction; @@ -180,8 +175,8 @@ typedef struct IDirect3DDevice9Impl BOOL notreset; } IDirect3DDevice9Impl; -HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapter, D3DDEVTYPE device_type, - HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) DECLSPEC_HIDDEN; +HRESULT device_init(IDirect3DDevice9Impl *device, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type, + HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode) DECLSPEC_HIDDEN; /***************************************************************************** * IDirect3DVolume9 implementation structure @@ -189,17 +184,11 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte typedef struct IDirect3DVolume9Impl { /* IUnknown fields */ - const IDirect3DVolume9Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DVolume9 fields */ - IWineD3DVolume *wineD3DVolume; - - /* The volume container */ - IUnknown *container; - - /* If set forward refcounting to this object */ - IUnknown *forwardReference; + IDirect3DVolume9 IDirect3DVolume9_iface; + LONG ref; + struct wined3d_volume *wined3d_volume; + IUnknown *container; + IUnknown *forwardReference; } IDirect3DVolume9Impl; HRESULT volume_init(IDirect3DVolume9Impl *volume, IDirect3DDevice9Impl *device, UINT width, UINT height, @@ -217,15 +206,8 @@ typedef struct IDirect3DSwapChain9Impl /* IUnknown fields */ const IDirect3DSwapChain9Vtbl *lpVtbl; LONG ref; - - /* IDirect3DSwapChain9 fields */ - IWineD3DSwapChain *wineD3DSwapChain; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; - - /* Flags an implicit swap chain */ - BOOL isImplicit; + struct wined3d_swapchain *wined3d_swapchain; + IDirect3DDevice9Ex *parentDevice; } IDirect3DSwapChain9Impl; HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl *device, @@ -243,12 +225,8 @@ typedef struct IDirect3DSurface9Impl /* IUnknown fields */ const IDirect3DSurface9Vtbl *lpVtbl; LONG ref; - - /* IDirect3DResource9 fields */ - IWineD3DSurface *wineD3DSurface; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + struct wined3d_surface *wined3d_surface; + IDirect3DDevice9Ex *parentDevice; /* The surface container */ IUnknown *container; @@ -276,12 +254,8 @@ typedef struct IDirect3DVertexBuffer9Impl const IDirect3DVertexBuffer9Vtbl *lpVtbl; LONG ref; - /* IDirect3DResource9 fields */ - IWineD3DBuffer *wineD3DVertexBuffer; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; - + struct wined3d_buffer *wineD3DVertexBuffer; + IDirect3DDevice9Ex *parentDevice; DWORD fvf; } IDirect3DVertexBuffer9Impl; @@ -301,11 +275,8 @@ typedef struct IDirect3DIndexBuffer9Impl const IDirect3DIndexBuffer9Vtbl *lpVtbl; LONG ref; - /* IDirect3DResource9 fields */ - IWineD3DBuffer *wineD3DIndexBuffer; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + struct wined3d_buffer *wineD3DIndexBuffer; + IDirect3DDevice9Ex *parentDevice; enum wined3d_format_id format; } IDirect3DIndexBuffer9Impl; @@ -321,12 +292,9 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl */ typedef struct IDirect3DBaseTexture9Impl { - /* IUnknown fields */ const IDirect3DBaseTexture9Vtbl *lpVtbl; LONG ref; - - /* IDirect3DResource9 fields */ - IWineD3DBaseTexture *wineD3DBaseTexture; + struct wined3d_texture *wined3d_texture; } IDirect3DBaseTexture9Impl; /* --------------------- */ @@ -338,15 +306,10 @@ typedef struct IDirect3DBaseTexture9Impl */ typedef struct IDirect3DCubeTexture9Impl { - /* IUnknown fields */ - const IDirect3DCubeTexture9Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DResource9 fields */ - IWineD3DCubeTexture *wineD3DCubeTexture; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + IDirect3DCubeTexture9 IDirect3DCubeTexture9_iface; + LONG ref; + struct wined3d_texture *wined3d_texture; + IDirect3DDevice9Ex *parentDevice; } IDirect3DCubeTexture9Impl; HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Impl *device, @@ -361,15 +324,10 @@ HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Imp */ typedef struct IDirect3DTexture9Impl { - /* IUnknown fields */ - const IDirect3DTexture9Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DResource9 fields */ - IWineD3DTexture *wineD3DTexture; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + IDirect3DTexture9 IDirect3DTexture9_iface; + LONG ref; + struct wined3d_texture *wined3d_texture; + IDirect3DDevice9Ex *parentDevice; } IDirect3DTexture9Impl; HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *device, @@ -384,15 +342,10 @@ HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *devic */ typedef struct IDirect3DVolumeTexture9Impl { - /* IUnknown fields */ - const IDirect3DVolumeTexture9Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DResource9 fields */ - IWineD3DVolumeTexture *wineD3DVolumeTexture; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + IDirect3DVolumeTexture9 IDirect3DVolumeTexture9_iface; + LONG ref; + struct wined3d_texture *wined3d_texture; + IDirect3DDevice9Ex *parentDevice; } IDirect3DVolumeTexture9Impl; HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice9Impl *device, @@ -406,19 +359,18 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice * IDirect3DStateBlock9 implementation structure */ typedef struct IDirect3DStateBlock9Impl { - /* IUnknown fields */ - const IDirect3DStateBlock9Vtbl *lpVtbl; + IDirect3DStateBlock9 IDirect3DStateBlock9_iface; LONG ref; /* IDirect3DStateBlock9 fields */ - IWineD3DStateBlock *wineD3DStateBlock; + struct wined3d_stateblock *wined3d_stateblock; /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + IDirect3DDevice9Ex *parentDevice; } IDirect3DStateBlock9Impl; HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Impl *device, - D3DSTATEBLOCKTYPE type, IWineD3DStateBlock *wined3d_stateblock) DECLSPEC_HIDDEN; + D3DSTATEBLOCKTYPE type, struct wined3d_stateblock *wined3d_stateblock) DECLSPEC_HIDDEN; /* --------------------------- */ /* IDirect3DVertexDeclaration9 */ @@ -436,7 +388,7 @@ typedef struct IDirect3DVertexDeclaration9Impl { UINT element_count; /* IDirect3DVertexDeclaration9 fields */ - IWineD3DVertexDeclaration *wineD3DVertexDeclaration; + struct wined3d_vertex_declaration *wineD3DVertexDeclaration; DWORD convFVF; /* Parent reference */ @@ -457,13 +409,9 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration, typedef struct IDirect3DVertexShader9Impl { /* IUnknown fields */ const IDirect3DVertexShader9Vtbl *lpVtbl; - LONG ref; - - /* IDirect3DVertexShader9 fields */ - IWineD3DVertexShader *wineD3DVertexShader; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + LONG ref; + struct wined3d_shader *wined3d_shader; + IDirect3DDevice9Ex *parentDevice; } IDirect3DVertexShader9Impl; HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, @@ -483,12 +431,8 @@ typedef struct IDirect3DPixelShader9Impl { /* IUnknown fields */ const IDirect3DPixelShader9Vtbl *lpVtbl; LONG ref; - - /* IDirect3DPixelShader9 fields */ - IWineD3DPixelShader *wineD3DPixelShader; - - /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + struct wined3d_shader *wined3d_shader; + IDirect3DDevice9Ex *parentDevice; } IDirect3DPixelShader9Impl; HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, @@ -502,15 +446,14 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, * IDirect3DPixelShader implementation structure */ typedef struct IDirect3DQuery9Impl { - /* IUnknown fields */ - const IDirect3DQuery9Vtbl *lpVtbl; + IDirect3DQuery9 IDirect3DQuery9_iface; LONG ref; /* IDirect3DQuery9 fields */ - IWineD3DQuery *wineD3DQuery; + struct wined3d_query *wineD3DQuery; /* Parent reference */ - LPDIRECT3DDEVICE9EX parentDevice; + IDirect3DDevice9Ex *parentDevice; } IDirect3DQuery9Impl; HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, diff --git a/dll/directx/wine/d3d9/device.c b/dll/directx/wine/d3d9/device.c index c788b987c8a..2af2c82460a 100644 --- a/dll/directx/wine/d3d9/device.c +++ b/dll/directx/wine/d3d9/device.c @@ -181,21 +181,15 @@ static UINT vertex_count_from_primitive_count(D3DPRIMITIVETYPE primitive_type, U } } -static ULONG WINAPI D3D9CB_DestroySwapChain(IWineD3DSwapChain *swapchain) +static inline IDirect3DDevice9Impl *impl_from_IDirect3DDevice9Ex(IDirect3DDevice9Ex *iface) { - IDirect3DSwapChain9Impl *parent; - - TRACE("swapchain %p.\n", swapchain); - - parent = IWineD3DSwapChain_GetParent(swapchain); - parent->isImplicit = FALSE; - IDirect3DSwapChain9_AddRef((IDirect3DSwapChain9 *)parent); - return IDirect3DSwapChain9_Release((IDirect3DSwapChain9 *)parent); + return CONTAINING_RECORD(iface, IDirect3DDevice9Impl, IDirect3DDevice9Ex_iface); } -/* IDirect3D IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9EX iface, REFIID riid, LPVOID* ppobj) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(IDirect3DDevice9Ex *iface, REFIID riid, + void **ppobj) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3D9 *d3d; IDirect3D9Impl *d3dimpl; @@ -228,20 +222,14 @@ static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9EX if } } - if (IsEqualGUID(riid, &IID_IWineD3DDeviceParent)) - { - IUnknown_AddRef((IUnknown *)&This->device_parent_vtbl); - *ppobj = &This->device_parent_vtbl; - return S_OK; - } - WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj); *ppobj = NULL; return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DDevice9Impl_AddRef(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static ULONG WINAPI IDirect3DDevice9Impl_AddRef(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -249,8 +237,9 @@ static ULONG WINAPI IDirect3DDevice9Impl_AddRef(LPDIRECT3DDEVICE9EX iface) { return ref; } -static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); ULONG ref; if (This->inDestruction) return 0; @@ -271,9 +260,9 @@ static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(LPDIRECT3DDEV } HeapFree(GetProcessHeap(), 0, This->convertedDecls); - IWineD3DDevice_Uninit3D(This->WineD3DDevice, D3D9CB_DestroySwapChain); - IWineD3DDevice_ReleaseFocusWindow(This->WineD3DDevice); - IWineD3DDevice_Release(This->WineD3DDevice); + wined3d_device_uninit_3d(This->wined3d_device); + wined3d_device_release_focus_window(This->wined3d_device); + wined3d_device_decref(This->wined3d_device); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, This); @@ -281,10 +270,9 @@ static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(LPDIRECT3DDEV return ref; } -/* IDirect3DDevice Interface follow: */ static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(IDirect3DDevice9Ex *iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); TRACE("iface %p.\n", iface); @@ -297,36 +285,40 @@ static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(IDirect3DDevice9 return D3D_OK; } -static UINT WINAPI IDirect3DDevice9Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static UINT WINAPI IDirect3DDevice9Impl_GetAvailableTextureMem(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetAvailableTextureMem(This->WineD3DDevice); + hr = wined3d_device_get_available_texture_mem(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_EvictManagedResources(This->WineD3DDevice); + hr = wined3d_device_evict_managed_resources(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9EX iface, IDirect3D9** ppD3D9) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(IDirect3DDevice9Ex *iface, + IDirect3D9 **ppD3D9) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d *wined3d; HRESULT hr = D3D_OK; - IWineD3D* pWineD3D; TRACE("iface %p, d3d9 %p.\n", iface, ppD3D9); @@ -335,13 +327,15 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9EX iface } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetDirect3D(This->WineD3DDevice, &pWineD3D); - if (hr == D3D_OK && pWineD3D != NULL) + hr = wined3d_device_get_wined3d(This->wined3d_device, &wined3d); + if (hr == D3D_OK && wined3d) { - *ppD3D9 = IWineD3D_GetParent(pWineD3D); + *ppD3D9 = wined3d_get_parent(wined3d); IDirect3D9_AddRef(*ppD3D9); - IWineD3D_Release(pWineD3D); - } else { + wined3d_decref(wined3d); + } + else + { FIXME("Call to IWineD3DDevice_GetDirect3D failed\n"); *ppD3D9 = NULL; } @@ -351,8 +345,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9EX iface return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9EX iface, D3DCAPS9* pCaps) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCAPS9 *pCaps) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hrc = D3D_OK; WINED3DCAPS *pWineCaps; @@ -369,7 +364,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9EX i memset(pCaps, 0, sizeof(*pCaps)); wined3d_mutex_lock(); - hrc = IWineD3DDevice_GetDeviceCaps(This->WineD3DDevice, pWineCaps); + hrc = wined3d_device_get_device_caps(This->wined3d_device, pWineCaps); wined3d_mutex_unlock(); WINECAPSTOD3D9CAPS(pCaps, pWineCaps) @@ -384,14 +379,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9EX i return hrc; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, D3DDISPLAYMODE* pMode) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(IDirect3DDevice9Ex *iface, + UINT iSwapChain, D3DDISPLAYMODE *pMode) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, swapchain %u, mode %p.\n", iface, iSwapChain, pMode); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetDisplayMode(This->WineD3DDevice, iSwapChain, (WINED3DDISPLAYMODE *) pMode); + hr = wined3d_device_get_display_mode(This->wined3d_device, iSwapChain, (WINED3DDISPLAYMODE *)pMode); wined3d_mutex_unlock(); if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); @@ -399,57 +396,66 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9EX return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(LPDIRECT3DDEVICE9EX iface, D3DDEVICE_CREATION_PARAMETERS *pParameters) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(IDirect3DDevice9Ex *iface, + D3DDEVICE_CREATION_PARAMETERS *pParameters) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, parameters %p.\n", iface, pParameters); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetCreationParameters(This->WineD3DDevice, (WINED3DDEVICE_CREATION_PARAMETERS *) pParameters); + hr = wined3d_device_get_creation_parameters(This->wined3d_device, + (WINED3DDEVICE_CREATION_PARAMETERS *)pParameters); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetCursorProperties(LPDIRECT3DDEVICE9EX iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetCursorProperties(IDirect3DDevice9Ex *iface, + UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9 *pCursorBitmap) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DSurface9Impl *pSurface = (IDirect3DSurface9Impl*)pCursorBitmap; HRESULT hr; TRACE("iface %p, hotspot_x %u, hotspot_y %u, bitmap %p.\n", iface, XHotSpot, YHotSpot, pCursorBitmap); - if(!pCursorBitmap) { - WARN("No cursor bitmap, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; + if (!pCursorBitmap) + { + WARN("No cursor bitmap, returning D3DERR_INVALIDCALL.\n"); + return D3DERR_INVALIDCALL; } wined3d_mutex_lock(); - hr = IWineD3DDevice_SetCursorProperties(This->WineD3DDevice, XHotSpot, YHotSpot, pSurface->wineD3DSurface); + hr = wined3d_device_set_cursor_properties(This->wined3d_device, XHotSpot, YHotSpot, pSurface->wined3d_surface); wined3d_mutex_unlock(); return hr; } -static void WINAPI IDirect3DDevice9Impl_SetCursorPosition(LPDIRECT3DDEVICE9EX iface, int XScreenSpace, int YScreenSpace, DWORD Flags) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static void WINAPI IDirect3DDevice9Impl_SetCursorPosition(IDirect3DDevice9Ex *iface, + int XScreenSpace, int YScreenSpace, DWORD Flags) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); TRACE("iface %p, x %u, y %u, flags %#x.\n", iface, XScreenSpace, YScreenSpace, Flags); wined3d_mutex_lock(); - IWineD3DDevice_SetCursorPosition(This->WineD3DDevice, XScreenSpace, YScreenSpace, Flags); + wined3d_device_set_cursor_position(This->wined3d_device, XScreenSpace, YScreenSpace, Flags); wined3d_mutex_unlock(); } -static BOOL WINAPI IDirect3DDevice9Impl_ShowCursor(LPDIRECT3DDEVICE9EX iface, BOOL bShow) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static BOOL WINAPI IDirect3DDevice9Impl_ShowCursor(IDirect3DDevice9Ex *iface, BOOL bShow) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); BOOL ret; TRACE("iface %p, show %#x.\n", iface, bShow); wined3d_mutex_lock(); - ret = IWineD3DDevice_ShowCursor(This->WineD3DDevice, bShow); + ret = wined3d_device_show_cursor(This->wined3d_device, bShow); wined3d_mutex_unlock(); return ret; @@ -458,7 +464,7 @@ static BOOL WINAPI IDirect3DDevice9Impl_ShowCursor(LPDIRECT3DDEVICE9EX ifac static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_CreateAdditionalSwapChain(IDirect3DDevice9Ex *iface, D3DPRESENT_PARAMETERS *present_parameters, IDirect3DSwapChain9 **swapchain) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DSwapChain9Impl *object; HRESULT hr; @@ -489,19 +495,19 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_CreateAdditionalSwa static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_GetSwapChain(IDirect3DDevice9Ex *iface, UINT swapchain_idx, IDirect3DSwapChain9 **swapchain) { - IWineD3DSwapChain *wined3d_swapchain = NULL; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_swapchain *wined3d_swapchain = NULL; HRESULT hr; TRACE("iface %p, swapchain_idx %u, swapchain %p.\n", iface, swapchain_idx, swapchain); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetSwapChain(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, - swapchain_idx, &wined3d_swapchain); - if (SUCCEEDED(hr) && swapchain) + hr = wined3d_device_get_swapchain(This->wined3d_device, swapchain_idx, &wined3d_swapchain); + if (SUCCEEDED(hr) && wined3d_swapchain) { - *swapchain = IWineD3DSwapChain_GetParent(wined3d_swapchain); + *swapchain = wined3d_swapchain_get_parent(wined3d_swapchain); IDirect3DSwapChain9_AddRef(*swapchain); - IWineD3DSwapChain_Release(wined3d_swapchain); + wined3d_swapchain_decref(wined3d_swapchain); } else { @@ -514,78 +520,55 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_GetSwapChain(IDirec static UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(IDirect3DDevice9Ex *iface) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); UINT count; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - count = IWineD3DDevice_GetNumberOfSwapChains(((IDirect3DDevice9Impl *)iface)->WineD3DDevice); + count = wined3d_device_get_swapchain_count(This->wined3d_device); wined3d_mutex_unlock(); return count; } -static HRESULT WINAPI reset_enum_callback(IWineD3DResource *resource, void *data) { +static HRESULT WINAPI reset_enum_callback(struct wined3d_resource *resource, void *data) +{ + struct wined3d_resource_desc desc; BOOL *resources_ok = data; - D3DRESOURCETYPE type; - HRESULT ret = S_OK; - WINED3DSURFACE_DESC surface_desc; - WINED3DVOLUME_DESC volume_desc; - D3DINDEXBUFFER_DESC index_desc; - D3DVERTEXBUFFER_DESC vertex_desc; - WINED3DPOOL pool; - IDirect3DResource9 *parent; - parent = IWineD3DResource_GetParent(resource); - type = IDirect3DResource9_GetType(parent); - switch(type) { - case D3DRTYPE_SURFACE: - IWineD3DSurface_GetDesc((IWineD3DSurface *) resource, &surface_desc); - pool = surface_desc.pool; - break; - - case D3DRTYPE_VOLUME: - IWineD3DVolume_GetDesc((IWineD3DVolume *) resource, &volume_desc); - pool = volume_desc.Pool; - break; - - case D3DRTYPE_INDEXBUFFER: - IDirect3DIndexBuffer9_GetDesc((IDirect3DIndexBuffer9 *) parent, &index_desc); - pool = index_desc.Pool; - break; - - case D3DRTYPE_VERTEXBUFFER: - IDirect3DVertexBuffer9_GetDesc((IDirect3DVertexBuffer9 *)parent, &vertex_desc); - pool = vertex_desc.Pool; - break; - - /* No need to check for textures. If there is a D3DPOOL_DEFAULT texture, there - * is a D3DPOOL_DEFAULT surface or volume as well - */ - default: - pool = WINED3DPOOL_SCRATCH; /* a harmless pool */ - break; - } - - if (pool == WINED3DPOOL_DEFAULT) + wined3d_resource_get_desc(resource, &desc); + if (desc.pool == WINED3DPOOL_DEFAULT) { - IDirect3DResource9_AddRef(parent); - if (IUnknown_Release(parent) == 0) - { - TRACE("Parent %p is an implicit resource with ref 0\n", parent); - } else { - WARN("Resource %p(wineD3D %p) with pool D3DPOOL_DEFAULT blocks the Reset call\n", parent, resource); - ret = S_FALSE; - *resources_ok = FALSE; - } - } - IWineD3DResource_Release(resource); + IDirect3DSurface9 *surface; - return ret; + if (desc.resource_type != WINED3DRTYPE_SURFACE) + { + WARN("Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.\n", resource); + *resources_ok = FALSE; + return S_FALSE; + } + + surface = wined3d_resource_get_parent(resource); + + IDirect3DSurface9_AddRef(surface); + if (IDirect3DSurface9_Release(surface)) + { + WARN("Surface %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.\n", surface, resource); + *resources_ok = FALSE; + return S_FALSE; + } + + WARN("Surface %p (resource %p) is an implicit resource with ref 0.\n", surface, resource); + } + + return S_OK; } -static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(LPDIRECT3DDEVICE9EX iface, D3DPRESENT_PARAMETERS* pPresentationParameters) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(IDirect3DDevice9Ex *iface, + D3DPRESENT_PARAMETERS *pPresentationParameters) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); WINED3DPRESENT_PARAMETERS localParameters; HRESULT hr; BOOL resources_ok = TRUE; @@ -602,21 +585,24 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(LPDIRECT3DDE * below fails, the device is considered "lost", and _Reset and _Release are the only allowed calls */ wined3d_mutex_lock(); - IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice, NULL, WINED3DFMT_UNKNOWN); - for(i = 0; i < 16; i++) { - IWineD3DDevice_SetStreamSource(This->WineD3DDevice, i, NULL, 0, 0); + wined3d_device_set_index_buffer(This->wined3d_device, NULL, WINED3DFMT_UNKNOWN); + for (i = 0; i < 16; ++i) + { + wined3d_device_set_stream_source(This->wined3d_device, i, NULL, 0, 0); } - for(i = 0; i < 16; i++) { - IWineD3DDevice_SetTexture(This->WineD3DDevice, i, NULL); + for (i = 0; i < 16; ++i) + { + wined3d_device_set_texture(This->wined3d_device, i, NULL); } - IWineD3DDevice_EnumResources(This->WineD3DDevice, reset_enum_callback, &resources_ok); - if(!resources_ok) { + wined3d_device_enum_resources(This->wined3d_device, reset_enum_callback, &resources_ok); + if (!resources_ok) + { WARN("The application is holding D3DPOOL_DEFAULT resources, rejecting reset\n"); This->notreset = TRUE; wined3d_mutex_unlock(); - return WINED3DERR_INVALIDCALL; + return D3DERR_INVALIDCALL; } localParameters.BackBufferWidth = pPresentationParameters->BackBufferWidth; @@ -635,7 +621,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(LPDIRECT3DDE localParameters.PresentationInterval = pPresentationParameters->PresentationInterval; localParameters.AutoRestoreDisplayMode = TRUE; - hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters); + hr = wined3d_device_reset(This->wined3d_device, &localParameters); if(FAILED(hr)) { This->notreset = TRUE; @@ -662,16 +648,18 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(LPDIRECT3DDE return hr; } -static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Present(LPDIRECT3DDEVICE9EX iface, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* - pDirtyRegion) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Present(IDirect3DDevice9Ex *iface, + const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, + const RGNDATA *pDirtyRegion) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p.\n", iface, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); wined3d_mutex_lock(); - hr = IWineD3DDevice_Present(This->WineD3DDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); + hr = wined3d_device_present(This->wined3d_device, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); wined3d_mutex_unlock(); return hr; @@ -680,47 +668,51 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Present(LPDIRECT3D static HRESULT WINAPI IDirect3DDevice9Impl_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT iSwapChain, UINT BackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9 **ppBackBuffer) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - IWineD3DSurface *retSurface = NULL; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_surface *wined3d_surface = NULL; HRESULT hr; TRACE("iface %p, swapchain %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", iface, iSwapChain, BackBuffer, Type, ppBackBuffer); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, iSwapChain, - BackBuffer, (WINED3DBACKBUFFER_TYPE) Type, &retSurface); - if (SUCCEEDED(hr) && retSurface && ppBackBuffer) + hr = wined3d_device_get_back_buffer(This->wined3d_device, iSwapChain, + BackBuffer, (WINED3DBACKBUFFER_TYPE) Type, &wined3d_surface); + if (SUCCEEDED(hr) && wined3d_surface && ppBackBuffer) { - *ppBackBuffer = IWineD3DSurface_GetParent(retSurface); + *ppBackBuffer = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface9_AddRef(*ppBackBuffer); - IWineD3DSurface_Release(retSurface); + wined3d_surface_decref(wined3d_surface); } wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetRasterStatus(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetRasterStatus(IDirect3DDevice9Ex *iface, + UINT iSwapChain, D3DRASTER_STATUS *pRasterStatus) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, swapchain %u, raster_status %p.\n", iface, iSwapChain, pRasterStatus); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetRasterStatus(This->WineD3DDevice, iSwapChain, (WINED3DRASTER_STATUS *) pRasterStatus); + hr = wined3d_device_get_raster_status(This->wined3d_device, iSwapChain, (WINED3DRASTER_STATUS *)pRasterStatus); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetDialogBoxMode(LPDIRECT3DDEVICE9EX iface, BOOL bEnableDialogs) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetDialogBoxMode(IDirect3DDevice9Ex *iface, + BOOL bEnableDialogs) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, enable %#x.\n", iface, bEnableDialogs); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetDialogBoxMode(This->WineD3DDevice, bEnableDialogs); + hr = wined3d_device_set_dialog_box_mode(This->wined3d_device, bEnableDialogs); wined3d_mutex_unlock(); return hr; @@ -729,24 +721,26 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetDialogBoxMode(LPDIRECT3DDEVICE9EX static void WINAPI IDirect3DDevice9Impl_SetGammaRamp(IDirect3DDevice9Ex *iface, UINT iSwapChain, DWORD Flags, const D3DGAMMARAMP *pRamp) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); TRACE("iface %p, swapchain %u, flags %#x, ramp %p.\n", iface, iSwapChain, Flags, pRamp); /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ wined3d_mutex_lock(); - IWineD3DDevice_SetGammaRamp(This->WineD3DDevice, iSwapChain, Flags, (CONST WINED3DGAMMARAMP *)pRamp); + wined3d_device_set_gamma_ramp(This->wined3d_device, iSwapChain, Flags, (const WINED3DGAMMARAMP *)pRamp); wined3d_mutex_unlock(); } -static void WINAPI IDirect3DDevice9Impl_GetGammaRamp(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, D3DGAMMARAMP* pRamp) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static void WINAPI IDirect3DDevice9Impl_GetGammaRamp(IDirect3DDevice9Ex *iface, UINT iSwapChain, + D3DGAMMARAMP *pRamp) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); TRACE("iface %p, swapchain %u, ramp %p.\n", iface, iSwapChain, pRamp); /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ wined3d_mutex_lock(); - IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, iSwapChain, (WINED3DGAMMARAMP *) pRamp); + wined3d_device_get_gamma_ramp(This->wined3d_device, iSwapChain, (WINED3DGAMMARAMP *)pRamp); wined3d_mutex_unlock(); } @@ -754,7 +748,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(IDirect3DDevice9Ex *ifa UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DTexture9 **texture, HANDLE *shared_handle) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DTexture9Impl *object; HRESULT hr; @@ -777,7 +771,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(IDirect3DDevice9Ex *ifa } TRACE("Created texture %p.\n", object); - *texture = (IDirect3DTexture9 *)object; + *texture = &object->IDirect3DTexture9_iface; return D3D_OK; } @@ -786,7 +780,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(IDirect3DDevice9E UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DVolumeTexture9 **texture, HANDLE *shared_handle) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DVolumeTexture9Impl *object; HRESULT hr; @@ -811,7 +805,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(IDirect3DDevice9E } TRACE("Created volume texture %p.\n", object); - *texture = (IDirect3DVolumeTexture9 *)object; + *texture = &object->IDirect3DVolumeTexture9_iface; return D3D_OK; } @@ -820,7 +814,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(IDirect3DDevice9Ex UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DCubeTexture9 **texture, HANDLE *shared_handle) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DCubeTexture9Impl *object; HRESULT hr; @@ -843,15 +837,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(IDirect3DDevice9Ex } TRACE("Created cube texture %p.\n", object); - *texture = (IDirect3DCubeTexture9 *)object; + *texture = &object->IDirect3DCubeTexture9_iface; return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(IDirect3DDevice9Ex *iface, UINT size, DWORD usage, - DWORD fvf, D3DPOOL pool, IDirect3DVertexBuffer9 **buffer, HANDLE *shared_handle) +static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(IDirect3DDevice9Ex *iface, UINT size, + DWORD usage, DWORD fvf, D3DPOOL pool, IDirect3DVertexBuffer9 **buffer, + HANDLE *shared_handle) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DVertexBuffer9Impl *object; HRESULT hr; @@ -879,10 +874,11 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(IDirect3DDevice9Ex return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(IDirect3DDevice9Ex *iface, UINT size, DWORD usage, - D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer9 **buffer, HANDLE *shared_handle) +static HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(IDirect3DDevice9Ex *iface, UINT size, + DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer9 **buffer, + HANDLE *shared_handle) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DIndexBuffer9Impl *object; HRESULT hr; @@ -910,18 +906,18 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(IDirect3DDevice9Ex return D3D_OK; } -static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, - D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface9 **ppSurface, - UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality) +static HRESULT IDirect3DDevice9Impl_CreateSurface(IDirect3DDevice9Impl *device, UINT Width, + UINT Height, D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, + IDirect3DSurface9 **ppSurface, UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, + DWORD MultisampleQuality) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; IDirect3DSurface9Impl *object; HRESULT hr; - TRACE("iface %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p.\n" + TRACE("device %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p.\n" "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", - iface, Width, Height, Format, Lockable, Discard, Level, ppSurface, - Usage, Pool, MultiSample, MultisampleQuality); + device, Width, Height, Format, Lockable, Discard, Level, ppSurface, Usage, Pool, + MultiSample, MultisampleQuality); object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DSurface9Impl)); if (!object) @@ -930,8 +926,8 @@ static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UIN return D3DERR_OUTOFVIDEOMEMORY; } - hr = surface_init(object, This, Width, Height, Format, Lockable, Discard, - Level, Usage, Pool, MultiSample, MultisampleQuality); + hr = surface_init(object, device, Width, Height, Format, Lockable, Discard, Level, Usage, Pool, + MultiSample, MultisampleQuality); if (FAILED(hr)) { WARN("Failed to initialize surface, hr %#x.\n", hr); @@ -945,10 +941,11 @@ static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UIN return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateRenderTarget(IDirect3DDevice9Ex *iface, UINT Width, UINT Height, - D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, - IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle) +static HRESULT WINAPI IDirect3DDevice9Impl_CreateRenderTarget(IDirect3DDevice9Ex *iface, UINT Width, + UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, + BOOL Lockable, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.\n" @@ -956,16 +953,19 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateRenderTarget(IDirect3DDevice9Ex iface, Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle); - hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, Lockable, FALSE /* Discard */, - 0 /* Level */, ppSurface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality); + hr = IDirect3DDevice9Impl_CreateSurface(This, Width, Height, Format, Lockable, + FALSE /* Discard */, 0 /* Level */, ppSurface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, + MultiSample, MultisampleQuality); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateDepthStencilSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, - D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, - DWORD MultisampleQuality, BOOL Discard, - IDirect3DSurface9 **ppSurface, HANDLE* pSharedHandle) { +static HRESULT WINAPI IDirect3DDevice9Impl_CreateDepthStencilSurface(IDirect3DDevice9Ex *iface, + UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, + DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9 **ppSurface, + HANDLE *pSharedHandle) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.\n" @@ -973,35 +973,45 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateDepthStencilSurface(LPDIRECT3 iface, Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle); - hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, Discard, - 0 /* Level */, ppSurface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, MultiSample, MultisampleQuality); + hr = IDirect3DDevice9Impl_CreateSurface(This, Width, Height, Format, TRUE /* Lockable */, + Discard, 0 /* Level */, ppSurface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, MultiSample, + MultisampleQuality); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_UpdateSurface(LPDIRECT3DDEVICE9EX iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_UpdateSurface(IDirect3DDevice9Ex *iface, + IDirect3DSurface9 *pSourceSurface, const RECT *pSourceRect, + IDirect3DSurface9 *pDestinationSurface, const POINT *pDestPoint) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, src_surface %p, src_rect %p, dst_surface %p, dst_point %p.\n", iface, pSourceSurface, pSourceRect, pDestinationSurface, pDestPoint); wined3d_mutex_lock(); - hr = IWineD3DDevice_UpdateSurface(This->WineD3DDevice, ((IDirect3DSurface9Impl *)pSourceSurface)->wineD3DSurface, pSourceRect, ((IDirect3DSurface9Impl *)pDestinationSurface)->wineD3DSurface, pDestPoint); + hr = wined3d_device_update_surface(This->wined3d_device, + ((IDirect3DSurface9Impl *)pSourceSurface)->wined3d_surface, pSourceRect, + ((IDirect3DSurface9Impl *)pDestinationSurface)->wined3d_surface, pDestPoint); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_UpdateTexture(LPDIRECT3DDEVICE9EX iface, IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_UpdateTexture(IDirect3DDevice9Ex *iface, + IDirect3DBaseTexture9 *src_texture, IDirect3DBaseTexture9 *dst_texture) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; - TRACE("iface %p, src_texture %p, dst_texture %p.\n", iface, pSourceTexture, pDestinationTexture); + TRACE("iface %p, src_texture %p, dst_texture %p.\n", iface, src_texture, dst_texture); wined3d_mutex_lock(); - hr = IWineD3DDevice_UpdateTexture(This->WineD3DDevice, ((IDirect3DBaseTexture9Impl *)pSourceTexture)->wineD3DBaseTexture, ((IDirect3DBaseTexture9Impl *)pDestinationTexture)->wineD3DBaseTexture); + hr = wined3d_device_update_texture(This->wined3d_device, + ((IDirect3DBaseTexture9Impl *)src_texture)->wined3d_texture, + ((IDirect3DBaseTexture9Impl *)dst_texture)->wined3d_texture); wined3d_mutex_unlock(); return hr; @@ -1017,21 +1027,24 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTargetData(IDirect3DDevice9E TRACE("iface %p, render_target %p, dst_surface %p.\n", iface, pRenderTarget, pDestSurface); wined3d_mutex_lock(); - hr = IWineD3DSurface_BltFast(destSurface->wineD3DSurface, 0, 0, renderTarget->wineD3DSurface, NULL, WINEDDBLTFAST_NOCOLORKEY); + hr = wined3d_surface_bltfast(destSurface->wined3d_surface, 0, 0, + renderTarget->wined3d_surface, NULL, WINEDDBLTFAST_NOCOLORKEY); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetFrontBufferData(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, IDirect3DSurface9* pDestSurface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetFrontBufferData(IDirect3DDevice9Ex *iface, + UINT iSwapChain, IDirect3DSurface9 *pDestSurface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DSurface9Impl *destSurface = (IDirect3DSurface9Impl *)pDestSurface; HRESULT hr; TRACE("iface %p, swapchain %u, dst_surface %p.\n", iface, iSwapChain, pDestSurface); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetFrontBufferData(This->WineD3DDevice, iSwapChain, destSurface->wineD3DSurface); + hr = wined3d_device_get_front_buffer_data(This->wined3d_device, iSwapChain, destSurface->wined3d_surface); wined3d_mutex_unlock(); return hr; @@ -1048,7 +1061,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(IDirect3DDevice9Ex *iface iface, pSourceSurface, pSourceRect, pDestSurface, pDestRect, Filter); wined3d_mutex_lock(); - hr = IWineD3DSurface_Blt(dst->wineD3DSurface, pDestRect, src->wineD3DSurface, pSourceRect, 0, NULL, Filter); + hr = wined3d_surface_blt(dst->wined3d_surface, pDestRect, src->wined3d_surface, pSourceRect, 0, NULL, Filter); wined3d_mutex_unlock(); return hr; @@ -1064,41 +1077,41 @@ static HRESULT WINAPI IDirect3DDevice9Impl_ColorFill(IDirect3DDevice9Ex *iface, (color & 0xff) / 255.0f, ((color >> 24) & 0xff) / 255.0f, }; - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DSurface9Impl *surface = (IDirect3DSurface9Impl *)pSurface; - WINED3DPOOL pool; - WINED3DRESOURCETYPE restype; - DWORD usage; - WINED3DSURFACE_DESC desc; + struct wined3d_resource *wined3d_resource; + struct wined3d_resource_desc desc; HRESULT hr; TRACE("iface %p, surface %p, rect %p, color 0x%08x.\n", iface, pSurface, pRect, color); wined3d_mutex_lock(); - IWineD3DSurface_GetDesc(surface->wineD3DSurface, &desc); - usage = desc.usage; - pool = desc.pool; - restype = desc.resource_type; + wined3d_resource = wined3d_surface_get_resource(surface->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &desc); - /* This method is only allowed with surfaces that are render targets, or offscreen plain surfaces - * in D3DPOOL_DEFAULT - */ - if(!(usage & WINED3DUSAGE_RENDERTARGET) && (pool != WINED3DPOOL_DEFAULT || restype != WINED3DRTYPE_SURFACE)) { + /* This method is only allowed with surfaces that are render targets, or + * offscreen plain surfaces in D3DPOOL_DEFAULT. */ + if (!(desc.usage & WINED3DUSAGE_RENDERTARGET) && desc.pool != WINED3DPOOL_DEFAULT) + { wined3d_mutex_unlock(); WARN("Surface is not a render target, or not a stand-alone D3DPOOL_DEFAULT surface\n"); return D3DERR_INVALIDCALL; } /* Colorfill can only be used on rendertarget surfaces, or offscreen plain surfaces in D3DPOOL_DEFAULT */ - hr = IWineD3DDevice_ColorFill(This->WineD3DDevice, surface->wineD3DSurface, pRect, &c); + hr = wined3d_device_color_fill(This->wined3d_device, surface->wined3d_surface, pRect, &c); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9 **ppSurface, HANDLE* pSharedHandle) { +static HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(IDirect3DDevice9Ex *iface, + UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9 **ppSurface, + HANDLE *pSharedHandle) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, width %u, height %u, format %#x, pool %#x, surface %p, shared_handle %p.\n", @@ -1115,16 +1128,18 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIREC Why, their always lockable? should I change the usage to dynamic? */ - hr = IDirect3DDevice9Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Lockable */, FALSE /* Discard */, - 0 /* Level */, ppSurface, 0 /* Usage (undefined/none) */, (WINED3DPOOL)Pool, D3DMULTISAMPLE_NONE, - 0 /* MultisampleQuality */); + hr = IDirect3DDevice9Impl_CreateSurface(This, Width, Height, Format, TRUE /* Lockable */, + FALSE /* Discard */, 0 /* Level */, ppSurface, 0 /* Usage (undefined/none) */, + (WINED3DPOOL)Pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); return hr; } /* TODO: move to wineD3D */ -static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(LPDIRECT3DDEVICE9EX iface, DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(IDirect3DDevice9Ex *iface, + DWORD RenderTargetIndex, IDirect3DSurface9 *pRenderTarget) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DSurface9Impl *pSurface = (IDirect3DSurface9Impl*)pRenderTarget; HRESULT hr; @@ -1137,7 +1152,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(LPDIRECT3DDEVICE9EX } wined3d_mutex_lock(); - hr = IWineD3DDevice_SetRenderTarget(This->WineD3DDevice, RenderTargetIndex, pSurface ? pSurface->wineD3DSurface : NULL, TRUE); + hr = wined3d_device_set_render_target(This->wined3d_device, RenderTargetIndex, + pSurface ? pSurface->wined3d_surface : NULL, TRUE); wined3d_mutex_unlock(); return hr; @@ -1146,8 +1162,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(LPDIRECT3DDEVICE9EX static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(IDirect3DDevice9Ex *iface, DWORD RenderTargetIndex, IDirect3DSurface9 **ppRenderTarget) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - IWineD3DSurface *pRenderTarget; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_surface *wined3d_surface; HRESULT hr; TRACE("iface %p, idx %u, surface %p.\n", iface, RenderTargetIndex, ppRenderTarget); @@ -1164,21 +1180,21 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(IDirect3DDevice9Ex *i wined3d_mutex_lock(); - hr=IWineD3DDevice_GetRenderTarget(This->WineD3DDevice,RenderTargetIndex,&pRenderTarget); + hr = wined3d_device_get_render_target(This->wined3d_device, RenderTargetIndex, &wined3d_surface); if (FAILED(hr)) { FIXME("Call to IWineD3DDevice_GetRenderTarget failed, hr %#x\n", hr); } - else if (!pRenderTarget) + else if (!wined3d_surface) { *ppRenderTarget = NULL; } else { - *ppRenderTarget = IWineD3DSurface_GetParent(pRenderTarget); + *ppRenderTarget = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface9_AddRef(*ppRenderTarget); - IWineD3DSurface_Release(pRenderTarget); + wined3d_surface_decref(wined3d_surface); } wined3d_mutex_unlock(); @@ -1186,8 +1202,10 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(IDirect3DDevice9Ex *i return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(LPDIRECT3DDEVICE9EX iface, IDirect3DSurface9* pZStencilSurface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(IDirect3DDevice9Ex *iface, + IDirect3DSurface9 *pZStencilSurface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DSurface9Impl *pSurface; HRESULT hr; @@ -1196,7 +1214,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(LPDIRECT3DDE pSurface = (IDirect3DSurface9Impl*)pZStencilSurface; wined3d_mutex_lock(); - hr = IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, NULL==pSurface ? NULL : pSurface->wineD3DSurface); + hr = wined3d_device_set_depth_stencil(This->wined3d_device, pSurface ? pSurface->wined3d_surface : NULL); wined3d_mutex_unlock(); return hr; @@ -1205,8 +1223,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(LPDIRECT3DDE static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(IDirect3DDevice9Ex *iface, IDirect3DSurface9 **ppZStencilSurface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - IWineD3DSurface *pZStencilSurface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_surface *wined3d_surface; HRESULT hr; TRACE("iface %p, depth_stencil %p.\n", iface, ppZStencilSurface); @@ -1216,12 +1234,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(IDirect3DDevic } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface); + hr = wined3d_device_get_depth_stencil(This->wined3d_device, &wined3d_surface); if (SUCCEEDED(hr)) { - *ppZStencilSurface = IWineD3DSurface_GetParent(pZStencilSurface); + *ppZStencilSurface = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface9_AddRef(*ppZStencilSurface); - IWineD3DSurface_Release(pZStencilSurface); + wined3d_surface_decref(wined3d_surface); } else { @@ -1234,34 +1252,38 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(IDirect3DDevic return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_BeginScene(This->WineD3DDevice); + hr = wined3d_device_begin_scene(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_EndScene(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_EndScene(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_EndScene(This->WineD3DDevice); + hr = wined3d_device_end_scene(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_Clear(LPDIRECT3DDEVICE9EX iface, DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_Clear(IDirect3DDevice9Ex *iface, DWORD Count, + const D3DRECT *pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, rect_count %u, rects %p, flags %#x, color 0x%08x, z %.8e, stencil %u.\n", @@ -1269,211 +1291,241 @@ static HRESULT WINAPI IDirect3DDevice9Impl_Clear(LPDIRECT3DDEVICE9EX iface, DW /* Note: D3DRECT is compatible with WINED3DRECT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_Clear(This->WineD3DDevice, Count, (const RECT *)pRects, Flags, Color, Z, Stencil); + hr = wined3d_device_clear(This->wined3d_device, Count, (const RECT *)pRects, Flags, Color, Z, Stencil); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetTransform(LPDIRECT3DDEVICE9EX iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* lpMatrix) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetTransform(IDirect3DDevice9Ex *iface, + D3DTRANSFORMSTATETYPE State, const D3DMATRIX *lpMatrix) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, State, lpMatrix); /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetTransform(This->WineD3DDevice, State, (CONST WINED3DMATRIX*) lpMatrix); + hr = wined3d_device_set_transform(This->wined3d_device, State, (const WINED3DMATRIX *)lpMatrix); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetTransform(LPDIRECT3DDEVICE9EX iface, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetTransform(IDirect3DDevice9Ex *iface, + D3DTRANSFORMSTATETYPE State, D3DMATRIX *pMatrix) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, State, pMatrix); /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetTransform(This->WineD3DDevice, State, (WINED3DMATRIX*) pMatrix); + hr = wined3d_device_get_transform(This->wined3d_device, State, (WINED3DMATRIX *)pMatrix); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_MultiplyTransform(LPDIRECT3DDEVICE9EX iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_MultiplyTransform(IDirect3DDevice9Ex *iface, + D3DTRANSFORMSTATETYPE State, const D3DMATRIX *pMatrix) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, state %#x, matrix %p.\n", iface, State, pMatrix); /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ wined3d_mutex_lock(); - hr = IWineD3DDevice_MultiplyTransform(This->WineD3DDevice, State, (CONST WINED3DMATRIX*) pMatrix); + hr = wined3d_device_multiply_transform(This->wined3d_device, State, (const WINED3DMATRIX *)pMatrix); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetViewport(LPDIRECT3DDEVICE9EX iface, CONST D3DVIEWPORT9* pViewport) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetViewport(IDirect3DDevice9Ex *iface, + const D3DVIEWPORT9 *pViewport) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, pViewport); /* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetViewport(This->WineD3DDevice, (const WINED3DVIEWPORT *)pViewport); + hr = wined3d_device_set_viewport(This->wined3d_device, (const WINED3DVIEWPORT *)pViewport); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetViewport(LPDIRECT3DDEVICE9EX iface, D3DVIEWPORT9* pViewport) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetViewport(IDirect3DDevice9Ex *iface, + D3DVIEWPORT9 *pViewport) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, pViewport); /* Note: D3DVIEWPORT9 is compatible with WINED3DVIEWPORT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetViewport(This->WineD3DDevice, (WINED3DVIEWPORT *)pViewport); + hr = wined3d_device_get_viewport(This->wined3d_device, (WINED3DVIEWPORT *)pViewport); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetMaterial(LPDIRECT3DDEVICE9EX iface, CONST D3DMATERIAL9* pMaterial) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetMaterial(IDirect3DDevice9Ex *iface, + const D3DMATERIAL9 *pMaterial) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, material %p.\n", iface, pMaterial); /* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetMaterial(This->WineD3DDevice, (const WINED3DMATERIAL *)pMaterial); + hr = wined3d_device_set_material(This->wined3d_device, (const WINED3DMATERIAL *)pMaterial); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetMaterial(LPDIRECT3DDEVICE9EX iface, D3DMATERIAL9* pMaterial) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetMaterial(IDirect3DDevice9Ex *iface, + D3DMATERIAL9 *pMaterial) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, material %p.\n", iface, pMaterial); /* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetMaterial(This->WineD3DDevice, (WINED3DMATERIAL *)pMaterial); + hr = wined3d_device_get_material(This->wined3d_device, (WINED3DMATERIAL *)pMaterial); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetLight(LPDIRECT3DDEVICE9EX iface, DWORD Index, CONST D3DLIGHT9* pLight) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetLight(IDirect3DDevice9Ex *iface, DWORD Index, + const D3DLIGHT9 *pLight) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, index %u, light %p.\n", iface, Index, pLight); /* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_SetLight(This->WineD3DDevice, Index, (const WINED3DLIGHT *)pLight); + hr = wined3d_device_set_light(This->wined3d_device, Index, (const WINED3DLIGHT *)pLight); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetLight(LPDIRECT3DDEVICE9EX iface, DWORD Index, D3DLIGHT9* pLight) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetLight(IDirect3DDevice9Ex *iface, DWORD Index, + D3DLIGHT9 *pLight) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, index %u, light %p.\n", iface, Index, pLight); /* Note: D3DLIGHT9 is compatible with WINED3DLIGHT */ wined3d_mutex_lock(); - hr = IWineD3DDevice_GetLight(This->WineD3DDevice, Index, (WINED3DLIGHT *)pLight); + hr = wined3d_device_get_light(This->wined3d_device, Index, (WINED3DLIGHT *)pLight); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_LightEnable(LPDIRECT3DDEVICE9EX iface, DWORD Index, BOOL Enable) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_LightEnable(IDirect3DDevice9Ex *iface, DWORD Index, + BOOL Enable) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, index %u, enable %#x.\n", iface, Index, Enable); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetLightEnable(This->WineD3DDevice, Index, Enable); + hr = wined3d_device_set_light_enable(This->wined3d_device, Index, Enable); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetLightEnable(LPDIRECT3DDEVICE9EX iface, DWORD Index, BOOL* pEnable) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetLightEnable(IDirect3DDevice9Ex *iface, DWORD Index, + BOOL *pEnable) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, index %u, enable %p.\n", iface, Index, pEnable); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetLightEnable(This->WineD3DDevice, Index, pEnable); + hr = wined3d_device_get_light_enable(This->wined3d_device, Index, pEnable); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetClipPlane(LPDIRECT3DDEVICE9EX iface, DWORD Index, CONST float* pPlane) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetClipPlane(IDirect3DDevice9Ex *iface, DWORD Index, + const float *pPlane) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetClipPlane(This->WineD3DDevice, Index, pPlane); + hr = wined3d_device_set_clip_plane(This->wined3d_device, Index, pPlane); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetClipPlane(LPDIRECT3DDEVICE9EX iface, DWORD Index, float* pPlane) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetClipPlane(IDirect3DDevice9Ex *iface, DWORD Index, + float *pPlane) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, index %u, plane %p.\n", iface, Index, pPlane); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetClipPlane(This->WineD3DDevice, Index, pPlane); + hr = wined3d_device_get_clip_plane(This->wined3d_device, Index, pPlane); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetRenderState(LPDIRECT3DDEVICE9EX iface, D3DRENDERSTATETYPE State, DWORD Value) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetRenderState(IDirect3DDevice9Ex *iface, + D3DRENDERSTATETYPE State, DWORD Value) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, state %#x, value %#x.\n", iface, State, Value); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, State, Value); + hr = wined3d_device_set_render_state(This->wined3d_device, State, Value); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderState(LPDIRECT3DDEVICE9EX iface, D3DRENDERSTATETYPE State, DWORD* pValue) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderState(IDirect3DDevice9Ex *iface, + D3DRENDERSTATETYPE State, DWORD *pValue) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, state %#x, value %p.\n", iface, State, pValue); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetRenderState(This->WineD3DDevice, State, pValue); + hr = wined3d_device_get_render_state(This->wined3d_device, State, pValue); wined3d_mutex_unlock(); return hr; @@ -1482,7 +1534,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderState(LPDIRECT3DDEVICE9EX static HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(IDirect3DDevice9Ex *iface, D3DSTATEBLOCKTYPE type, IDirect3DStateBlock9 **stateblock) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DStateBlock9Impl *object; HRESULT hr; @@ -1510,36 +1562,37 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(IDirect3DDevice9Ex * } TRACE("Created stateblock %p.\n", object); - *stateblock = (IDirect3DStateBlock9 *)object; + *stateblock = &object->IDirect3DStateBlock9_iface; return D3D_OK; } static HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(IDirect3DDevice9Ex *iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DDevice_BeginStateBlock(This->WineD3DDevice); + hr = wined3d_device_begin_stateblock(This->wined3d_device); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *iface, IDirect3DStateBlock9 **stateblock) +static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *iface, + IDirect3DStateBlock9 **stateblock) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - IWineD3DStateBlock *wined3d_stateblock; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_stateblock *wined3d_stateblock; IDirect3DStateBlock9Impl *object; HRESULT hr; TRACE("iface %p, stateblock %p.\n", iface, stateblock); wined3d_mutex_lock(); - hr = IWineD3DDevice_EndStateBlock(This->WineD3DDevice, &wined3d_stateblock); + hr = wined3d_device_end_stateblock(This->wined3d_device, &wined3d_stateblock); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -1551,7 +1604,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *ifa if (!object) { ERR("Failed to allocate stateblock memory.\n"); - IWineD3DStateBlock_Release(wined3d_stateblock); + wined3d_mutex_lock(); + wined3d_stateblock_decref(wined3d_stateblock); + wined3d_mutex_unlock(); return E_OUTOFMEMORY; } @@ -1559,48 +1614,54 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *ifa if (FAILED(hr)) { WARN("Failed to initialize stateblock, hr %#x.\n", hr); - IWineD3DStateBlock_Release(wined3d_stateblock); + wined3d_mutex_lock(); + wined3d_stateblock_decref(wined3d_stateblock); + wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, object); return hr; } TRACE("Created stateblock %p.\n", object); - *stateblock = (IDirect3DStateBlock9 *)object; + *stateblock = &object->IDirect3DStateBlock9_iface; return D3D_OK; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetClipStatus(LPDIRECT3DDEVICE9EX iface, CONST D3DCLIPSTATUS9* pClipStatus) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - HRESULT hr; - - TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); - - wined3d_mutex_lock(); - hr = IWineD3DDevice_SetClipStatus(This->WineD3DDevice, (const WINED3DCLIPSTATUS *)pClipStatus); - wined3d_mutex_unlock(); - - return hr; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetClipStatus(LPDIRECT3DDEVICE9EX iface, D3DCLIPSTATUS9* pClipStatus) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - HRESULT hr; - - TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); - - wined3d_mutex_lock(); - hr = IWineD3DDevice_GetClipStatus(This->WineD3DDevice, (WINED3DCLIPSTATUS *)pClipStatus); - wined3d_mutex_unlock(); - - return hr; -} - -static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface, - DWORD Stage, IDirect3DBaseTexture9 **ppTexture) +static HRESULT WINAPI IDirect3DDevice9Impl_SetClipStatus(IDirect3DDevice9Ex *iface, + const D3DCLIPSTATUS9 *pClipStatus) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - IWineD3DBaseTexture *retTexture = NULL; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + HRESULT hr; + + TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); + + wined3d_mutex_lock(); + hr = wined3d_device_set_clip_status(This->wined3d_device, (const WINED3DCLIPSTATUS *)pClipStatus); + wined3d_mutex_unlock(); + + return hr; +} + +static HRESULT WINAPI IDirect3DDevice9Impl_GetClipStatus(IDirect3DDevice9Ex *iface, + D3DCLIPSTATUS9 *pClipStatus) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + HRESULT hr; + + TRACE("iface %p, clip_status %p.\n", iface, pClipStatus); + + wined3d_mutex_lock(); + hr = wined3d_device_get_clip_status(This->wined3d_device, (WINED3DCLIPSTATUS *)pClipStatus); + wined3d_mutex_unlock(); + + return hr; +} + +static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface, DWORD Stage, + IDirect3DBaseTexture9 **ppTexture) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_texture *wined3d_texture = NULL; HRESULT hr; TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, ppTexture); @@ -1610,18 +1671,18 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface, } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, &retTexture); - if (SUCCEEDED(hr) && retTexture) + hr = wined3d_device_get_texture(This->wined3d_device, Stage, &wined3d_texture); + if (SUCCEEDED(hr) && wined3d_texture) { - *ppTexture = IWineD3DBaseTexture_GetParent(retTexture); - IWineD3DBaseTexture_AddRef(*ppTexture); - IWineD3DBaseTexture_Release(retTexture); + *ppTexture = wined3d_texture_get_parent(wined3d_texture); + IDirect3DBaseTexture9_AddRef(*ppTexture); + wined3d_texture_decref(wined3d_texture); } else { if (FAILED(hr)) { - WARN("Call to get texture (%d) failed (%p)\n", Stage, retTexture); + WARN("Call to get texture (%u) failed (%p).\n", Stage, wined3d_texture); } *ppTexture = NULL; } @@ -1630,15 +1691,17 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface, return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetTexture(LPDIRECT3DDEVICE9EX iface, DWORD Stage, IDirect3DBaseTexture9* pTexture) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetTexture(IDirect3DDevice9Ex *iface, DWORD stage, + IDirect3DBaseTexture9 *texture) +{ + IDirect3DDevice9Impl *device = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; - TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, pTexture); + TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetTexture(This->WineD3DDevice, Stage, - pTexture==NULL ? NULL:((IDirect3DBaseTexture9Impl *)pTexture)->wineD3DBaseTexture); + hr = wined3d_device_set_texture(device->wined3d_device, stage, + texture ? ((IDirect3DBaseTexture9Impl *)texture)->wined3d_texture : NULL); wined3d_mutex_unlock(); return hr; @@ -1681,9 +1744,10 @@ static const WINED3DTEXTURESTAGESTATETYPE tss_lookup[] = WINED3DTSS_CONSTANT, /* 32, D3DTSS_CONSTANT */ }; -static HRESULT WINAPI IDirect3DDevice9Impl_GetTextureStageState(LPDIRECT3DDEVICE9EX iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD *pValue) +static HRESULT WINAPI IDirect3DDevice9Impl_GetTextureStageState(IDirect3DDevice9Ex *iface, + DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD *pValue) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, Stage, Type, pValue); @@ -1695,15 +1759,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTextureStageState(LPDIRECT3DDEVI } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetTextureStageState(This->WineD3DDevice, Stage, tss_lookup[Type], pValue); + hr = wined3d_device_get_texture_stage_state(This->wined3d_device, Stage, tss_lookup[Type], pValue); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(LPDIRECT3DDEVICE9EX iface, DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) +static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(IDirect3DDevice9Ex *iface, + DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, stage %u, state %#x, value %#x.\n", iface, Stage, Type, Value); @@ -1715,7 +1780,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(LPDIRECT3DDEVI } wined3d_mutex_lock(); - hr = IWineD3DDevice_SetTextureStageState(This->WineD3DDevice, Stage, tss_lookup[Type], Value); + hr = wined3d_device_set_texture_stage_state(This->wined3d_device, Stage, tss_lookup[Type], Value); wined3d_mutex_unlock(); return hr; @@ -1724,197 +1789,217 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(LPDIRECT3DDEVI static HRESULT WINAPI IDirect3DDevice9Impl_GetSamplerState(IDirect3DDevice9Ex *iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD *pValue) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, sampler %u, state %#x, value %p.\n", iface, Sampler, Type, pValue); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetSamplerState(This->WineD3DDevice, Sampler, Type, pValue); + hr = wined3d_device_get_sampler_state(This->wined3d_device, Sampler, Type, pValue); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetSamplerState(LPDIRECT3DDEVICE9EX iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_SetSamplerState(IDirect3DDevice9Ex *iface, + DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, sampler %u, state %#x, value %#x.\n", iface, Sampler, Type, Value); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetSamplerState(This->WineD3DDevice, Sampler, Type, Value); + hr = wined3d_device_set_sampler_state(This->wined3d_device, Sampler, Type, Value); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_ValidateDevice(LPDIRECT3DDEVICE9EX iface, DWORD* pNumPasses) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_ValidateDevice(IDirect3DDevice9Ex *iface, + DWORD *pNumPasses) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, pass_count %p.\n", iface, pNumPasses); wined3d_mutex_lock(); - hr = IWineD3DDevice_ValidateDevice(This->WineD3DDevice, pNumPasses); + hr = wined3d_device_validate_device(This->wined3d_device, pNumPasses); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(IDirect3DDevice9Ex *iface, UINT PaletteNumber, - const PALETTEENTRY *pEntries) +static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(IDirect3DDevice9Ex *iface, + UINT PaletteNumber, const PALETTEENTRY *pEntries) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries); + hr = wined3d_device_set_palette_entries(This->wined3d_device, PaletteNumber, pEntries); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetPaletteEntries(LPDIRECT3DDEVICE9EX iface, UINT PaletteNumber, PALETTEENTRY* pEntries) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetPaletteEntries(IDirect3DDevice9Ex *iface, + UINT PaletteNumber, PALETTEENTRY *pEntries) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, palette_idx %u, entries %p.\n", iface, PaletteNumber, pEntries); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetPaletteEntries(This->WineD3DDevice, PaletteNumber, pEntries); + hr = wined3d_device_get_palette_entries(This->wined3d_device, PaletteNumber, pEntries); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetCurrentTexturePalette(LPDIRECT3DDEVICE9EX iface, UINT PaletteNumber) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetCurrentTexturePalette(IDirect3DDevice9Ex *iface, + UINT PaletteNumber) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, palette_idx %u.\n", iface, PaletteNumber); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber); + hr = wined3d_device_set_current_texture_palette(This->wined3d_device, PaletteNumber); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetCurrentTexturePalette(LPDIRECT3DDEVICE9EX iface, UINT* PaletteNumber) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetCurrentTexturePalette(IDirect3DDevice9Ex *iface, + UINT *PaletteNumber) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, palette_idx %p.\n", iface, PaletteNumber); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetCurrentTexturePalette(This->WineD3DDevice, PaletteNumber); + hr = wined3d_device_get_current_texture_palette(This->wined3d_device, PaletteNumber); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetScissorRect(LPDIRECT3DDEVICE9EX iface, CONST RECT* pRect) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetScissorRect(IDirect3DDevice9Ex *iface, + const RECT *pRect) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, rect %p.\n", iface, pRect); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetScissorRect(This->WineD3DDevice, pRect); + hr = wined3d_device_set_scissor_rect(This->wined3d_device, pRect); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetScissorRect(LPDIRECT3DDEVICE9EX iface, RECT* pRect) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetScissorRect(IDirect3DDevice9Ex *iface, RECT *pRect) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, rect %p.\n", iface, pRect); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetScissorRect(This->WineD3DDevice, pRect); + hr = wined3d_device_get_scissor_rect(This->wined3d_device, pRect); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetSoftwareVertexProcessing(LPDIRECT3DDEVICE9EX iface, BOOL bSoftware) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetSoftwareVertexProcessing(IDirect3DDevice9Ex *iface, + BOOL bSoftware) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, software %#x.\n", iface, bSoftware); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetSoftwareVertexProcessing(This->WineD3DDevice, bSoftware); + hr = wined3d_device_set_software_vertex_processing(This->wined3d_device, bSoftware); wined3d_mutex_unlock(); return hr; } -static BOOL WINAPI IDirect3DDevice9Impl_GetSoftwareVertexProcessing(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static BOOL WINAPI IDirect3DDevice9Impl_GetSoftwareVertexProcessing(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); BOOL ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DDevice_GetSoftwareVertexProcessing(This->WineD3DDevice); + ret = wined3d_device_get_software_vertex_processing(This->wined3d_device); wined3d_mutex_unlock(); return ret; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetNPatchMode(LPDIRECT3DDEVICE9EX iface, float nSegments) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetNPatchMode(IDirect3DDevice9Ex *iface, float nSegments) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, segment_count %.8e.\n", iface, nSegments); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetNPatchMode(This->WineD3DDevice, nSegments); + hr = wined3d_device_set_npatch_mode(This->wined3d_device, nSegments); wined3d_mutex_unlock(); return hr; } -static float WINAPI IDirect3DDevice9Impl_GetNPatchMode(LPDIRECT3DDEVICE9EX iface) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static float WINAPI IDirect3DDevice9Impl_GetNPatchMode(IDirect3DDevice9Ex *iface) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); float ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DDevice_GetNPatchMode(This->WineD3DDevice); + ret = wined3d_device_get_npatch_mode(This->wined3d_device); wined3d_mutex_unlock(); return ret; } -static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitive(IDirect3DDevice9Ex *iface, D3DPRIMITIVETYPE PrimitiveType, - UINT StartVertex, UINT PrimitiveCount) +static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitive(IDirect3DDevice9Ex *iface, + D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, start_vertex %u, primitive_count %u.\n", iface, PrimitiveType, StartVertex, PrimitiveCount); wined3d_mutex_lock(); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawPrimitive(This->WineD3DDevice, StartVertex, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_primitive(This->wined3d_device, StartVertex, vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(LPDIRECT3DDEVICE9EX iface, D3DPRIMITIVETYPE PrimitiveType, - INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(IDirect3DDevice9Ex *iface, + D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, + UINT startIndex, UINT primCount) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, base_vertex_idx %u, min_vertex_idx %u,\n" @@ -1923,27 +2008,28 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(LPDIRECT3DDEVI NumVertices, startIndex, primCount); wined3d_mutex_lock(); - IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, BaseVertexIndex); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawIndexedPrimitive(This->WineD3DDevice, startIndex, + wined3d_device_set_base_vertex_index(This->wined3d_device, BaseVertexIndex); + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_indexed_primitive(This->wined3d_device, startIndex, vertex_count_from_primitive_count(PrimitiveType, primCount)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitiveUP(IDirect3DDevice9Ex *iface, D3DPRIMITIVETYPE PrimitiveType, - UINT PrimitiveCount, const void *pVertexStreamZeroData, UINT VertexStreamZeroStride) +static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitiveUP(IDirect3DDevice9Ex *iface, + D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, const void *pVertexStreamZeroData, + UINT VertexStreamZeroStride) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, primitive_count %u, data %p, stride %u.\n", iface, PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_lock(); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawPrimitiveUP(This->WineD3DDevice, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_primitive_up(This->wined3d_device, vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount), pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_unlock(); @@ -1951,10 +2037,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitiveUP(IDirect3DDevice9Ex *i return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDEVICE9EX iface, D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, - UINT NumVertexIndices, UINT PrimitiveCount, CONST void* pIndexData, - D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *iface, + D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertexIndices, + UINT PrimitiveCount, const void *pIndexData, D3DFORMAT IndexDataFormat, + const void *pVertexStreamZeroData, UINT VertexStreamZeroStride) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, index_count %u, primitive_count %u,\n" @@ -1963,8 +2051,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDE pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_lock(); - IWineD3DDevice_SetPrimitiveType(This->WineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->WineD3DDevice, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_indexed_primitive_up(This->wined3d_device, vertex_count_from_primitive_count(PrimitiveType, PrimitiveCount), pIndexData, wined3dformat_from_d3dformat(IndexDataFormat), pVertexStreamZeroData, VertexStreamZeroStride); wined3d_mutex_unlock(); @@ -1972,8 +2060,11 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDE return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_ProcessVertices(LPDIRECT3DDEVICE9EX iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_ProcessVertices(IDirect3DDevice9Ex *iface, + UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9 *pDestBuffer, + IDirect3DVertexDeclaration9 *pVertexDecl, DWORD Flags) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DVertexDeclaration9Impl *Decl = (IDirect3DVertexDeclaration9Impl *) pVertexDecl; HRESULT hr; IDirect3DVertexBuffer9Impl *dest = (IDirect3DVertexBuffer9Impl *) pDestBuffer; @@ -1982,7 +2073,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_ProcessVertices(LPDIRECT3DDEVICE9EX iface, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags); wined3d_mutex_lock(); - hr = IWineD3DDevice_ProcessVertices(This->WineD3DDevice,SrcStartIndex, DestIndex, VertexCount, dest->wineD3DVertexBuffer, Decl ? Decl->wineD3DVertexDeclaration : NULL, Flags, dest->fvf); + hr = wined3d_device_process_vertices(This->wined3d_device, SrcStartIndex, DestIndex, VertexCount, + dest->wineD3DVertexBuffer, Decl ? Decl->wineD3DVertexDeclaration : NULL, Flags, dest->fvf); wined3d_mutex_unlock(); return hr; @@ -1991,7 +2083,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_ProcessVertices(LPDIRECT3DDEVICE9EX static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(IDirect3DDevice9Ex *iface, const D3DVERTEXELEMENT9 *elements, IDirect3DVertexDeclaration9 **declaration) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DVertexDeclaration9Impl *object; HRESULT hr; @@ -2027,12 +2119,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(IDirect3DDevi static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(IDirect3DDevice9Ex *iface, IDirect3DVertexDeclaration9 *declaration) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, declaration %p.\n", iface, declaration); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetVertexDeclaration(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, + hr = wined3d_device_set_vertex_declaration(This->wined3d_device, declaration ? ((IDirect3DVertexDeclaration9Impl *)declaration)->wineD3DVertexDeclaration : NULL); wined3d_mutex_unlock(); @@ -2042,7 +2135,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(IDirect3DDevice9 static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(IDirect3DDevice9Ex *iface, IDirect3DVertexDeclaration9 **declaration) { - IWineD3DVertexDeclaration *wined3d_declaration = NULL; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_vertex_declaration *wined3d_declaration = NULL; HRESULT hr; TRACE("iface %p, declaration %p.\n", iface, declaration); @@ -2050,12 +2144,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(IDirect3DDevice9 if (!declaration) return D3DERR_INVALIDCALL; wined3d_mutex_lock(); - hr = IWineD3DDevice_GetVertexDeclaration(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, &wined3d_declaration); + hr = wined3d_device_get_vertex_declaration(This->wined3d_device, &wined3d_declaration); if (SUCCEEDED(hr) && wined3d_declaration) { - *declaration = IWineD3DVertexDeclaration_GetParent(wined3d_declaration); + *declaration = wined3d_vertex_declaration_get_parent(wined3d_declaration); IDirect3DVertexDeclaration9_AddRef(*declaration); - IWineD3DVertexDeclaration_Release(wined3d_declaration); + wined3d_vertex_declaration_decref(wined3d_declaration); } else { @@ -2095,7 +2189,8 @@ static IDirect3DVertexDeclaration9 *getConvertedDecl(IDirect3DDevice9Impl *This, hr = vdecl_convert_fvf(fvf, &elements); if (hr != S_OK) return NULL; - hr = IDirect3DDevice9Impl_CreateVertexDeclaration((IDirect3DDevice9Ex *) This, elements, &pDecl); + hr = IDirect3DDevice9Impl_CreateVertexDeclaration(&This->IDirect3DDevice9Ex_iface, elements, + &pDecl); HeapFree(GetProcessHeap(), 0, elements); /* CreateVertexDeclaration makes a copy */ if (hr != S_OK) return NULL; @@ -2124,8 +2219,9 @@ static IDirect3DVertexDeclaration9 *getConvertedDecl(IDirect3DDevice9Impl *This, return pDecl; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetFVF(LPDIRECT3DDEVICE9EX iface, DWORD FVF) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetFVF(IDirect3DDevice9Ex *iface, DWORD FVF) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DVertexDeclaration9 *decl; HRESULT hr; @@ -2187,7 +2283,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF(IDirect3DDevice9Ex *iface, DWO static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(IDirect3DDevice9Ex *iface, const DWORD *byte_code, IDirect3DVertexShader9 **shader) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DVertexShader9Impl *object; HRESULT hr; @@ -2217,13 +2313,14 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(IDirect3DDevice9Ex static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(IDirect3DDevice9Ex *iface, IDirect3DVertexShader9 *shader) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, shader %p.\n", iface, shader); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetVertexShader(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, - shader ? ((IDirect3DVertexShader9Impl *)shader)->wineD3DVertexShader : NULL); + hr = wined3d_device_set_vertex_shader(This->wined3d_device, + shader ? ((IDirect3DVertexShader9Impl *)shader)->wined3d_shader : NULL); wined3d_mutex_unlock(); return hr; @@ -2232,17 +2329,18 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(IDirect3DDevice9Ex *i static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *iface, IDirect3DVertexShader9 **shader) { - IWineD3DVertexShader *wined3d_shader; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_shader *wined3d_shader; TRACE("iface %p, shader %p.\n", iface, shader); wined3d_mutex_lock(); - wined3d_shader = IWineD3DDevice_GetVertexShader(((IDirect3DDevice9Impl *)iface)->WineD3DDevice); + wined3d_shader = wined3d_device_get_vertex_shader(This->wined3d_device); if (wined3d_shader) { - *shader = IWineD3DVertexShader_GetParent(wined3d_shader); + *shader = wined3d_shader_get_parent(wined3d_shader); IDirect3DVertexShader9_AddRef(*shader); - IWineD3DVertexShader_Release(wined3d_shader); + wined3d_shader_decref(wined3d_shader); } else { @@ -2258,6 +2356,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *i static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDevice9Ex *iface, UINT reg_idx, const float *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); @@ -2270,7 +2369,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDev } wined3d_mutex_lock(); - hr = IWineD3DDevice_SetVertexShaderConstantF(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_set_vs_consts_f(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2279,6 +2378,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDev static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDevice9Ex *iface, UINT reg_idx, float *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); @@ -2291,7 +2391,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDev } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetVertexShaderConstantF(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_get_vs_consts_f(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2300,12 +2400,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDev static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(IDirect3DDevice9Ex *iface, UINT reg_idx, const int *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetVertexShaderConstantI(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_set_vs_consts_i(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2314,12 +2415,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(IDirect3DDev static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(IDirect3DDevice9Ex *iface, UINT reg_idx, int *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetVertexShaderConstantI(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_get_vs_consts_i(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2328,12 +2430,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(IDirect3DDev static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(IDirect3DDevice9Ex *iface, UINT reg_idx, const BOOL *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetVertexShaderConstantB(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_set_vs_consts_b(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2342,26 +2445,29 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(IDirect3DDev static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(IDirect3DDevice9Ex *iface, UINT reg_idx, BOOL *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetVertexShaderConstantB(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_get_vs_consts_b(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(LPDIRECT3DDEVICE9EX iface, UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(IDirect3DDevice9Ex *iface, + UINT StreamNumber, IDirect3DVertexBuffer9 *pStreamData, UINT OffsetInBytes, UINT Stride) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, stream_idx %u, buffer %p, offset %u, stride %u.\n", iface, StreamNumber, pStreamData, OffsetInBytes, Stride); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetStreamSource(This->WineD3DDevice, StreamNumber, + hr = wined3d_device_set_stream_source(This->wined3d_device, StreamNumber, pStreamData ? ((IDirect3DVertexBuffer9Impl *)pStreamData)->wineD3DVertexBuffer : NULL, OffsetInBytes, Stride); wined3d_mutex_unlock(); @@ -2370,10 +2476,10 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(LPDIRECT3DDEVICE9EX i } static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(IDirect3DDevice9Ex *iface, - UINT StreamNumber, IDirect3DVertexBuffer9 **pStream, UINT* OffsetInBytes, UINT* pStride) + UINT StreamNumber, IDirect3DVertexBuffer9 **pStream, UINT *OffsetInBytes, UINT *pStride) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - IWineD3DBuffer *retStream = NULL; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_buffer *retStream = NULL; HRESULT hr; TRACE("iface %p, stream_idx %u, buffer %p, offset %p, stride %p.\n", @@ -2384,12 +2490,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(IDirect3DDevice9Ex *i } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetStreamSource(This->WineD3DDevice, StreamNumber, &retStream, OffsetInBytes, pStride); + hr = wined3d_device_get_stream_source(This->wined3d_device, StreamNumber, &retStream, OffsetInBytes, pStride); if (SUCCEEDED(hr) && retStream) { - *pStream = IWineD3DBuffer_GetParent(retStream); + *pStream = wined3d_buffer_get_parent(retStream); IDirect3DVertexBuffer9_AddRef(*pStream); - IWineD3DBuffer_Release(retStream); + wined3d_buffer_decref(retStream); } else { @@ -2404,43 +2510,47 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(IDirect3DDevice9Ex *i return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSourceFreq(IDirect3DDevice9Ex *iface, UINT StreamNumber, - UINT Divider) +static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSourceFreq(IDirect3DDevice9Ex *iface, + UINT StreamNumber, UINT Divider) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, stream_idx %u, freq %u.\n", iface, StreamNumber, Divider); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetStreamSourceFreq(This->WineD3DDevice, StreamNumber, Divider); + hr = wined3d_device_set_stream_source_freq(This->wined3d_device, StreamNumber, Divider); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSourceFreq(LPDIRECT3DDEVICE9EX iface, UINT StreamNumber, UINT* Divider) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSourceFreq(IDirect3DDevice9Ex *iface, + UINT StreamNumber, UINT *Divider) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, stream_idx %u, freq %p.\n", iface, StreamNumber, Divider); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetStreamSourceFreq(This->WineD3DDevice, StreamNumber, Divider); + hr = wined3d_device_get_stream_source_freq(This->wined3d_device, StreamNumber, Divider); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(LPDIRECT3DDEVICE9EX iface, IDirect3DIndexBuffer9* pIndexData) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(IDirect3DDevice9Ex *iface, + IDirect3DIndexBuffer9 *pIndexData) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; IDirect3DIndexBuffer9Impl *ib = (IDirect3DIndexBuffer9Impl *) pIndexData; TRACE("iface %p, buffer %p.\n", iface, pIndexData); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetIndexBuffer(This->WineD3DDevice, + hr = wined3d_device_set_index_buffer(This->wined3d_device, ib ? ib->wineD3DIndexBuffer : NULL, ib ? ib->format : WINED3DFMT_UNKNOWN); wined3d_mutex_unlock(); @@ -2448,10 +2558,11 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(LPDIRECT3DDEVICE9EX ifac return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(IDirect3DDevice9Ex *iface, IDirect3DIndexBuffer9 **ppIndexData) +static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(IDirect3DDevice9Ex *iface, + IDirect3DIndexBuffer9 **ppIndexData) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; - IWineD3DBuffer *retIndexData = NULL; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_buffer *retIndexData = NULL; HRESULT hr; TRACE("iface %p, buffer %p.\n", iface, ppIndexData); @@ -2461,12 +2572,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(IDirect3DDevice9Ex *iface, } wined3d_mutex_lock(); - hr = IWineD3DDevice_GetIndexBuffer(This->WineD3DDevice, &retIndexData); + hr = wined3d_device_get_index_buffer(This->wined3d_device, &retIndexData); if (SUCCEEDED(hr) && retIndexData) { - *ppIndexData = IWineD3DBuffer_GetParent(retIndexData); + *ppIndexData = wined3d_buffer_get_parent(retIndexData); IDirect3DIndexBuffer9_AddRef(*ppIndexData); - IWineD3DBuffer_Release(retIndexData); + wined3d_buffer_decref(retIndexData); } else { @@ -2481,7 +2592,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9Impl_CreatePixelShader(IDirect3DDevice9Ex *iface, const DWORD *byte_code, IDirect3DPixelShader9 **shader) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DPixelShader9Impl *object; HRESULT hr; @@ -2511,13 +2622,14 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreatePixelShader(IDirect3DDevice9Ex static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *iface, IDirect3DPixelShader9 *shader) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, shader %p.\n", iface, shader); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetPixelShader(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, - shader ? ((IDirect3DPixelShader9Impl *)shader)->wineD3DPixelShader : NULL); + hr = wined3d_device_set_pixel_shader(This->wined3d_device, + shader ? ((IDirect3DPixelShader9Impl *)shader)->wined3d_shader : NULL); wined3d_mutex_unlock(); return hr; @@ -2526,19 +2638,20 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *if static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *iface, IDirect3DPixelShader9 **shader) { - IWineD3DPixelShader *wined3d_shader; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_shader *wined3d_shader; TRACE("iface %p, shader %p.\n", iface, shader); if (!shader) return D3DERR_INVALIDCALL; wined3d_mutex_lock(); - wined3d_shader = IWineD3DDevice_GetPixelShader(((IDirect3DDevice9Impl *)iface)->WineD3DDevice); + wined3d_shader = wined3d_device_get_pixel_shader(This->wined3d_device); if (wined3d_shader) { - *shader = IWineD3DPixelShader_GetParent(wined3d_shader); + *shader = wined3d_shader_get_parent(wined3d_shader); IDirect3DPixelShader9_AddRef(*shader); - IWineD3DPixelShader_Release(wined3d_shader); + wined3d_shader_decref(wined3d_shader); } else { @@ -2554,12 +2667,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *if static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(IDirect3DDevice9Ex *iface, UINT reg_idx, const float *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetPixelShaderConstantF(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_set_ps_consts_f(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2568,12 +2682,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(IDirect3DDevi static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(IDirect3DDevice9Ex *iface, UINT reg_idx, float *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetPixelShaderConstantF(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_get_ps_consts_f(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2582,12 +2697,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(IDirect3DDevi static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(IDirect3DDevice9Ex *iface, UINT reg_idx, const int *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetPixelShaderConstantI(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_set_ps_consts_i(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2596,12 +2712,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(IDirect3DDevi static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(IDirect3DDevice9Ex *iface, UINT reg_idx, int *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetPixelShaderConstantI(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_get_ps_consts_i(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2610,12 +2727,13 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(IDirect3DDevi static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(IDirect3DDevice9Ex *iface, UINT reg_idx, const BOOL *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_SetPixelShaderConstantB(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_set_ps_consts_b(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; @@ -2624,62 +2742,70 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(IDirect3DDevi static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(IDirect3DDevice9Ex *iface, UINT reg_idx, BOOL *data, UINT count) { + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); wined3d_mutex_lock(); - hr = IWineD3DDevice_GetPixelShaderConstantB(((IDirect3DDevice9Impl *)iface)->WineD3DDevice, reg_idx, data, count); + hr = wined3d_device_get_ps_consts_b(This->wined3d_device, reg_idx, data, count); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_DrawRectPatch(LPDIRECT3DDEVICE9EX iface, UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_DrawRectPatch(IDirect3DDevice9Ex *iface, UINT Handle, + const float *pNumSegs, const D3DRECTPATCH_INFO *pRectPatchInfo) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, handle %#x, segment_count %p, patch_info %p.\n", iface, Handle, pNumSegs, pRectPatchInfo); wined3d_mutex_lock(); - hr = IWineD3DDevice_DrawRectPatch(This->WineD3DDevice, Handle, pNumSegs, (CONST WINED3DRECTPATCH_INFO *)pRectPatchInfo); + hr = wined3d_device_draw_rect_patch(This->wined3d_device, Handle, + pNumSegs, (const WINED3DRECTPATCH_INFO *)pRectPatchInfo); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_DrawTriPatch(LPDIRECT3DDEVICE9EX iface, UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_DrawTriPatch(IDirect3DDevice9Ex *iface, UINT Handle, + const float *pNumSegs, const D3DTRIPATCH_INFO *pTriPatchInfo) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, handle %#x, segment_count %p, patch_info %p.\n", iface, Handle, pNumSegs, pTriPatchInfo); wined3d_mutex_lock(); - hr = IWineD3DDevice_DrawTriPatch(This->WineD3DDevice, Handle, pNumSegs, (CONST WINED3DTRIPATCH_INFO *)pTriPatchInfo); + hr = wined3d_device_draw_tri_patch(This->wined3d_device, Handle, + pNumSegs, (const WINED3DTRIPATCH_INFO *)pTriPatchInfo); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_DeletePatch(LPDIRECT3DDEVICE9EX iface, UINT Handle) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; +static HRESULT WINAPI IDirect3DDevice9Impl_DeletePatch(IDirect3DDevice9Ex *iface, UINT Handle) +{ + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; TRACE("iface %p, handle %#x.\n", iface, Handle); wined3d_mutex_lock(); - hr = IWineD3DDevice_DeletePatch(This->WineD3DDevice, Handle); + hr = wined3d_device_delete_patch(This->wined3d_device, Handle); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(IDirect3DDevice9Ex *iface, - D3DQUERYTYPE type, IDirect3DQuery9 **query) +static HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(IDirect3DDevice9Ex *iface, D3DQUERYTYPE type, + IDirect3DQuery9 **query) { - IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; + IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); IDirect3DQuery9Impl *object; HRESULT hr; @@ -2701,8 +2827,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(IDirect3DDevice9Ex *iface } TRACE("Created query %p.\n", object); - if (query) *query = (IDirect3DQuery9 *)object; - else IDirect3DQuery9_Release((IDirect3DQuery9 *)object); + if (query) *query = &object->IDirect3DQuery9_iface; + else IDirect3DQuery9_Release(&object->IDirect3DQuery9_iface); return D3D_OK; } @@ -2713,7 +2839,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_SetConvolutionMonoKernel(IDirect3DD FIXME("iface %p, width %u, height %u, rows %p, columns %p stub!\n", iface, width, height, rows, columns); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(IDirect3DDevice9Ex *iface, @@ -2725,7 +2851,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(IDirect3DDevice9Ex *if iface, src_surface, dst_surface, src_descs, rect_count, dst_descs, operation, offset_x, offset_y); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(IDirect3DDevice9Ex *iface, @@ -2735,28 +2861,28 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(IDirect3DDevice9Ex *iface FIXME("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p, flags %#x stub!\n", iface, src_rect, dst_rect, dst_window_override, dirty_region, flags); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_GetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT *priority) { FIXME("iface %p, priority %p stub!\n", iface, priority); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_SetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT priority) { FIXME("iface %p, priority %d stub!\n", iface, priority); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_WaitForVBlank(IDirect3DDevice9Ex *iface, UINT swapchain_idx) { FIXME("iface %p, swapchain_idx %u stub!\n", iface, swapchain_idx); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckResourceResidency(IDirect3DDevice9Ex *iface, @@ -2765,14 +2891,14 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckResourceResidency(IDirect3DDev FIXME("iface %p, resources %p, resource_count %u stub!\n", iface, resources, resource_count); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_SetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT max_latency) { FIXME("iface %p, max_latency %u stub!\n", iface, max_latency); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT *max_latency) @@ -2781,14 +2907,19 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(IDirect3DDev *max_latency = 2; - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckDeviceState(IDirect3DDevice9Ex *iface, HWND dst_window) { - FIXME("iface %p, dst_window %p stub!\n", iface, dst_window); + static int i; - return WINED3DERR_INVALIDCALL; + TRACE("iface %p, dst_window %p stub!\n", iface, dst_window); + + if (!i++) + FIXME("iface %p, dst_window %p stub!\n", iface, dst_window); + + return D3D_OK; } static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(IDirect3DDevice9Ex *iface, @@ -2800,7 +2931,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(IDirect3DDevic iface, width, height, format, multisample_type, multisample_quality, lockable, surface, shared_handle, usage); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(IDirect3DDevice9Ex *iface, @@ -2810,7 +2941,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(IDire FIXME("iface %p, width %u, height %u, format %#x, pool %#x, surface %p, shared_handle %p, usage %#x stub!\n", iface, width, height, format, pool, surface, shared_handle, usage); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex *iface, @@ -2822,7 +2953,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(IDirect iface, width, height, format, multisample_type, multisample_quality, discard, surface, shared_handle, usage); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(IDirect3DDevice9Ex *iface, @@ -2830,7 +2961,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(IDirect3DDevice9Ex *iface, { FIXME("iface %p, present_parameters %p, mode %p stub!\n", iface, present_parameters, mode); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(IDirect3DDevice9Ex *iface, @@ -2838,7 +2969,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(IDirect3DDevice9 { FIXME("iface %p, swapchain_idx %u, mode %p, rotation %p stub!\n", iface, swapchain_idx, mode, rotation); - return WINED3DERR_INVALIDCALL; + return E_NOTIMPL; } static const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl = @@ -2982,149 +3113,130 @@ static const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl = IDirect3DDevice9ExImpl_GetDisplayModeEx }; -/* IWineD3DDeviceParent IUnknown methods */ - -static inline struct IDirect3DDevice9Impl *device_from_device_parent(IWineD3DDeviceParent *iface) +static inline struct IDirect3DDevice9Impl *device_from_device_parent(struct wined3d_device_parent *device_parent) { - return (struct IDirect3DDevice9Impl *)((char*)iface - - FIELD_OFFSET(struct IDirect3DDevice9Impl, device_parent_vtbl)); + return CONTAINING_RECORD(device_parent, struct IDirect3DDevice9Impl, device_parent); } -static HRESULT STDMETHODCALLTYPE device_parent_QueryInterface(IWineD3DDeviceParent *iface, REFIID riid, void **object) +static void CDECL device_parent_wined3d_device_created(struct wined3d_device_parent *device_parent, + struct wined3d_device *device) { - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); - return IDirect3DDevice9Impl_QueryInterface((IDirect3DDevice9Ex *)This, riid, object); + TRACE("device_parent %p, device %p.\n", device_parent, device); } -static ULONG STDMETHODCALLTYPE device_parent_AddRef(IWineD3DDeviceParent *iface) +static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, + WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface) { - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); - return IDirect3DDevice9Impl_AddRef((IDirect3DDevice9Ex *)This); -} - -static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface) -{ - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); - return IDirect3DDevice9Impl_Release((IDirect3DDevice9Ex *)This); -} - -/* IWineD3DDeviceParent methods */ - -static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceParent *iface, IWineD3DDevice *device) -{ - TRACE("iface %p, device %p\n", iface, device); -} - -static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, - WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface) -{ - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); + struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent); IDirect3DSurface9Impl *d3d_surface; BOOL lockable = TRUE; HRESULT hr; - TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, level %u, face %u, surface %p\n", - iface, superior, width, height, format, usage, pool, level, face, surface); + TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" + "\tpool %#x, level %u, face %u, surface %p.\n", + device_parent, container_parent, width, height, format, usage, pool, level, face, surface); if (pool == WINED3DPOOL_DEFAULT && !(usage & D3DUSAGE_DYNAMIC)) lockable = FALSE; - hr = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9Ex *)This, width, height, + hr = IDirect3DDevice9Impl_CreateSurface(device, width, height, d3dformat_from_wined3dformat(format), lockable, FALSE /* Discard */, level, (IDirect3DSurface9 **)&d3d_surface, usage, pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); if (FAILED(hr)) { - ERR("(%p) CreateSurface failed, returning %#x\n", iface, hr); + WARN("Failed to create surface, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = d3d_surface->wined3d_surface; + wined3d_surface_incref(*surface); - d3d_surface->container = superior; + d3d_surface->container = container_parent; IDirect3DDevice9Ex_Release(d3d_surface->parentDevice); d3d_surface->parentDevice = NULL; IDirect3DSurface9_Release((IDirect3DSurface9 *)d3d_surface); - d3d_surface->forwardReference = superior; + d3d_surface->forwardReference = container_parent; return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, +static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable, - IWineD3DSurface **surface) + struct wined3d_surface **surface) { - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); + struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent); IDirect3DSurface9Impl *d3d_surface; HRESULT hr; - TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n" - "\tmultisample_quality %u, lockable %u, surface %p\n", - iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface); + TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n" + "\tmultisample_quality %u, lockable %u, surface %p.\n", + device_parent, container_parent, width, height, format, multisample_type, + multisample_quality, lockable, surface); - hr = IDirect3DDevice9Impl_CreateRenderTarget((IDirect3DDevice9Ex *)This, width, height, + hr = IDirect3DDevice9Impl_CreateRenderTarget(&device->IDirect3DDevice9Ex_iface, width, height, d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, lockable, (IDirect3DSurface9 **)&d3d_surface, NULL); if (FAILED(hr)) { - ERR("(%p) CreateRenderTarget failed, returning %#x\n", iface, hr); + WARN("Failed to create rendertarget, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = d3d_surface->wined3d_surface; + wined3d_surface_incref(*surface); - d3d_surface->container = superior; + d3d_surface->container = container_parent; /* Implicit surfaces are created with an refcount of 0 */ IDirect3DSurface9_Release((IDirect3DSurface9 *)d3d_surface); return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface, +static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent, UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type, - DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface) + DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface) { - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); + struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent); IDirect3DSurface9Impl *d3d_surface; HRESULT hr; - TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x,\n" - "\tmultisample_quality %u, discard %u, surface %p\n", - iface, width, height, format, multisample_type, multisample_quality, discard, surface); + TRACE("device_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n" + "\tmultisample_quality %u, discard %u, surface %p.\n", + device_parent, width, height, format, multisample_type, multisample_quality, discard, surface); - hr = IDirect3DDevice9Impl_CreateDepthStencilSurface((IDirect3DDevice9Ex *)This, width, height, - d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, discard, - (IDirect3DSurface9 **)&d3d_surface, NULL); + hr = IDirect3DDevice9Impl_CreateDepthStencilSurface(&device->IDirect3DDevice9Ex_iface, width, + height, d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, + discard, (IDirect3DSurface9 **)&d3d_surface, NULL); if (FAILED(hr)) { - ERR("(%p) CreateDepthStencilSurface failed, returning %#x\n", iface, hr); + WARN("Failed to create depth/stencil surface, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wineD3DSurface; - IWineD3DSurface_AddRef(*surface); - d3d_surface->container = (IUnknown *)This; + *surface = d3d_surface->wined3d_surface; + wined3d_surface_incref(*surface); + d3d_surface->container = (IUnknown *)&device->IDirect3DDevice9Ex_iface; /* Implicit surfaces are created with an refcount of 0 */ IDirect3DSurface9_Release((IDirect3DSurface9 *)d3d_surface); return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, UINT depth, enum wined3d_format_id format, - WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume) +static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format, + WINED3DPOOL pool, DWORD usage, struct wined3d_volume **volume) { - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); + struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent); IDirect3DVolume9Impl *object; HRESULT hr; - TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n", - iface, superior, width, height, depth, format, pool, usage, volume); + TRACE("device_parent %p, container_parent %p, width %u, height %u, depth %u, " + "format %#x, pool %#x, usage %#x, volume %p\n", + device_parent, container_parent, width, height, depth, + format, pool, usage, volume); /* Allocate the storage for the device */ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); @@ -3135,7 +3247,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent return D3DERR_OUTOFVIDEOMEMORY; } - hr = volume_init(object, This, width, height, depth, usage, format, pool); + hr = volume_init(object, device, width, height, depth, usage, format, pool); if (FAILED(hr)) { WARN("Failed to initialize volume, hr %#x.\n", hr); @@ -3143,27 +3255,27 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent return hr; } - *volume = object->wineD3DVolume; - IWineD3DVolume_AddRef(*volume); - IDirect3DVolume9_Release((IDirect3DVolume9 *)object); + *volume = object->wined3d_volume; + wined3d_volume_incref(*volume); + IDirect3DVolume9_Release(&object->IDirect3DVolume9_iface); - object->container = superior; - object->forwardReference = superior; + object->container = container_parent; + object->forwardReference = container_parent; - TRACE("(%p) Created volume %p\n", iface, object); + TRACE("Created volume %p.\n", object); return hr; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDeviceParent *iface, - WINED3DPRESENT_PARAMETERS *present_parameters, IWineD3DSwapChain **swapchain) +static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent *device_parent, + WINED3DPRESENT_PARAMETERS *present_parameters, struct wined3d_swapchain **swapchain) { - struct IDirect3DDevice9Impl *This = device_from_device_parent(iface); - IDirect3DSwapChain9Impl *d3d_swapchain; + struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent); D3DPRESENT_PARAMETERS local_parameters; + IDirect3DSwapChain9 *d3d_swapchain; HRESULT hr; - TRACE("iface %p, present_parameters %p, swapchain %p\n", iface, present_parameters, swapchain); + TRACE("device_parent %p, present_parameters %p, swapchain %p\n", device_parent, present_parameters, swapchain); /* Copy the presentation parameters */ local_parameters.BackBufferWidth = present_parameters->BackBufferWidth; @@ -3181,18 +3293,17 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar local_parameters.FullScreen_RefreshRateInHz = present_parameters->FullScreen_RefreshRateInHz; local_parameters.PresentationInterval = present_parameters->PresentationInterval; - hr = IDirect3DDevice9Impl_CreateAdditionalSwapChain((IDirect3DDevice9Ex *)This, - &local_parameters, (IDirect3DSwapChain9 **)&d3d_swapchain); + hr = IDirect3DDevice9Impl_CreateAdditionalSwapChain(&device->IDirect3DDevice9Ex_iface, + &local_parameters, &d3d_swapchain); if (FAILED(hr)) { - ERR("(%p) CreateAdditionalSwapChain failed, returning %#x\n", iface, hr); + WARN("Failed to create swapchain, hr %#x.\n", hr); *swapchain = NULL; return hr; } - *swapchain = d3d_swapchain->wineD3DSwapChain; - d3d_swapchain->isImplicit = TRUE; - /* Implicit swap chains are created with an refcount of 0 */ + *swapchain = ((IDirect3DSwapChain9Impl *)d3d_swapchain)->wined3d_swapchain; + wined3d_swapchain_incref(*swapchain); IDirect3DSwapChain9_Release((IDirect3DSwapChain9 *)d3d_swapchain); /* Copy back the presentation parameters */ @@ -3214,19 +3325,14 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar return hr; } -static const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl = +static const struct wined3d_device_parent_ops d3d9_wined3d_device_parent_ops = { - /* IUnknown methods */ - device_parent_QueryInterface, - device_parent_AddRef, - device_parent_Release, - /* IWineD3DDeviceParent methods */ - device_parent_WineD3DDeviceCreated, - device_parent_CreateSurface, - device_parent_CreateRenderTarget, - device_parent_CreateDepthStencilSurface, - device_parent_CreateVolume, - device_parent_CreateSwapChain, + device_parent_wined3d_device_created, + device_parent_create_surface, + device_parent_create_rendertarget, + device_parent_create_depth_stencil, + device_parent_create_volume, + device_parent_create_swapchain, }; static void setup_fpu(void) @@ -3241,22 +3347,25 @@ static void setup_fpu(void) #endif } -HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapter, D3DDEVTYPE device_type, - HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) +HRESULT device_init(IDirect3DDevice9Impl *device, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type, + HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode) { WINED3DPRESENT_PARAMETERS *wined3d_parameters; UINT i, count = 1; HRESULT hr; - device->lpVtbl = &Direct3DDevice9_Vtbl; - device->device_parent_vtbl = &d3d9_wined3d_device_parent_vtbl; + if (mode) + FIXME("Ignoring display mode.\n"); + + device->IDirect3DDevice9Ex_iface.lpVtbl = &Direct3DDevice9_Vtbl; + device->device_parent.ops = &d3d9_wined3d_device_parent_ops; device->ref = 1; if (!(flags & D3DCREATE_FPU_PRESERVE)) setup_fpu(); wined3d_mutex_lock(); - hr = IWineD3D_CreateDevice(wined3d, adapter, device_type, focus_window, flags, - (IWineD3DDeviceParent *)&device->device_parent_vtbl, &device->WineD3DDevice); + hr = wined3d_device_create(wined3d, adapter, device_type, focus_window, flags, + &device->device_parent, &device->wined3d_device); if (FAILED(hr)) { WARN("Failed to create wined3d device, hr %#x.\n", hr); @@ -3264,33 +3373,45 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte return hr; } - if (!parameters->Windowed) - { - if (!focus_window) focus_window = parameters->hDeviceWindow; - if (FAILED(hr = IWineD3DDevice_AcquireFocusWindow(device->WineD3DDevice, focus_window))) - { - ERR("Failed to acquire focus window, hr %#x.\n", hr); - IWineD3DDevice_Release(device->WineD3DDevice); - wined3d_mutex_unlock(); - return hr; - } - } - if (flags & D3DCREATE_ADAPTERGROUP_DEVICE) { WINED3DCAPS caps; - IWineD3D_GetDeviceCaps(wined3d, adapter, device_type, &caps); + wined3d_get_device_caps(wined3d, adapter, device_type, &caps); count = caps.NumberOfAdaptersInGroup; } - if (flags & D3DCREATE_MULTITHREADED) IWineD3DDevice_SetMultithreaded(device->WineD3DDevice); + if (flags & D3DCREATE_MULTITHREADED) + wined3d_device_set_multithreaded(device->wined3d_device); + + if (!parameters->Windowed) + { + if (!focus_window) + focus_window = parameters->hDeviceWindow; + if (FAILED(hr = wined3d_device_acquire_focus_window(device->wined3d_device, focus_window))) + { + ERR("Failed to acquire focus window, hr %#x.\n", hr); + wined3d_device_decref(device->wined3d_device); + wined3d_mutex_unlock(); + return hr; + } + + for (i = 0; i < count; ++i) + { + HWND device_window = parameters[i].hDeviceWindow; + + if (!device_window) device_window = focus_window; + wined3d_device_setup_fullscreen_window(device->wined3d_device, device_window, + parameters[i].BackBufferWidth, + parameters[i].BackBufferHeight); + } + } wined3d_parameters = HeapAlloc(GetProcessHeap(), 0, sizeof(*wined3d_parameters) * count); if (!wined3d_parameters) { ERR("Failed to allocate wined3d parameters.\n"); - IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_device_decref(device->wined3d_device); wined3d_mutex_unlock(); return E_OUTOFMEMORY; } @@ -3315,13 +3436,13 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte wined3d_parameters[i].AutoRestoreDisplayMode = TRUE; } - hr = IWineD3DDevice_Init3D(device->WineD3DDevice, wined3d_parameters); + hr = wined3d_device_init_3d(device->wined3d_device, wined3d_parameters); if (FAILED(hr)) { WARN("Failed to initialize 3D, hr %#x.\n", hr); - IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); + wined3d_device_release_focus_window(device->wined3d_device); HeapFree(GetProcessHeap(), 0, wined3d_parameters); - IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_device_decref(device->wined3d_device); wined3d_mutex_unlock(); return hr; } @@ -3355,9 +3476,9 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapte { ERR("Failed to allocate FVF vertex declaration map memory.\n"); wined3d_mutex_lock(); - IWineD3DDevice_Uninit3D(device->WineD3DDevice, D3D9CB_DestroySwapChain); - IWineD3DDevice_ReleaseFocusWindow(device->WineD3DDevice); - IWineD3DDevice_Release(device->WineD3DDevice); + wined3d_device_uninit_3d(device->wined3d_device); + wined3d_device_release_focus_window(device->wined3d_device); + wined3d_device_decref(device->wined3d_device); wined3d_mutex_unlock(); return E_OUTOFMEMORY; } diff --git a/dll/directx/wine/d3d9/directx.c b/dll/directx/wine/d3d9/directx.c index 1fcc8c47fcf..7a22c30223d 100644 --- a/dll/directx/wine/d3d9/directx.c +++ b/dll/directx/wine/d3d9/directx.c @@ -24,10 +24,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -/* IDirect3D9 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9EX iface, REFIID riid, LPVOID* ppobj) +static inline IDirect3D9Impl *impl_from_IDirect3D9Ex(IDirect3D9Ex *iface) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; + return CONTAINING_RECORD(iface, IDirect3D9Impl, IDirect3D9Ex_iface); +} + +static HRESULT WINAPI IDirect3D9Impl_QueryInterface(IDirect3D9Ex *iface, REFIID riid, void **ppobj) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -55,8 +59,9 @@ static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9EX iface, REFIID return E_NOINTERFACE; } -static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9EX iface) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static ULONG WINAPI IDirect3D9Impl_AddRef(IDirect3D9Ex *iface) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -64,15 +69,16 @@ static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9EX iface) { return ref; } -static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9EX iface) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static ULONG WINAPI IDirect3D9Impl_Release(IDirect3D9Ex *iface) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); if (ref == 0) { wined3d_mutex_lock(); - IWineD3D_Release(This->WineD3D); + wined3d_decref(This->WineD3D); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, This); @@ -82,34 +88,39 @@ static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9EX iface) { } /* IDirect3D9 Interface follow: */ -static HRESULT WINAPI IDirect3D9Impl_RegisterSoftwareDevice(LPDIRECT3D9EX iface, void* pInitializeFunction) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static HRESULT WINAPI IDirect3D9Impl_RegisterSoftwareDevice(IDirect3D9Ex *iface, + void *pInitializeFunction) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, init_function %p.\n", iface, pInitializeFunction); wined3d_mutex_lock(); - hr = IWineD3D_RegisterSoftwareDevice(This->WineD3D, pInitializeFunction); + hr = wined3d_register_software_device(This->WineD3D, pInitializeFunction); wined3d_mutex_unlock(); return hr; } -static UINT WINAPI IDirect3D9Impl_GetAdapterCount(LPDIRECT3D9EX iface) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static UINT WINAPI IDirect3D9Impl_GetAdapterCount(IDirect3D9Ex *iface) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterCount(This->WineD3D); + hr = wined3d_get_adapter_count(This->WineD3D); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(IDirect3D9Ex *iface, UINT Adapter, + DWORD Flags, D3DADAPTER_IDENTIFIER9 *pIdentifier) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); WINED3DADAPTER_IDENTIFIER adapter_id; HRESULT hr; @@ -124,7 +135,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, U adapter_id.device_name_size = sizeof(pIdentifier->DeviceName); wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, Adapter, Flags, &adapter_id); + hr = wined3d_get_adapter_identifier(This->WineD3D, Adapter, Flags, &adapter_id); wined3d_mutex_unlock(); pIdentifier->DriverVersion = adapter_id.driver_version; @@ -138,8 +149,10 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, U return hr; } -static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9EX iface, UINT Adapter, D3DFORMAT Format) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(IDirect3D9Ex *iface, UINT Adapter, + D3DFORMAT Format) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, adapter %u, format %#x.\n", iface, Adapter, Format); @@ -150,14 +163,16 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9EX iface, UINT } wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterModeCount(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format)); + hr = wined3d_get_adapter_mode_count(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9EX iface, UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(IDirect3D9Ex *iface, UINT Adapter, + D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE *pMode) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, adapter %u, format %#x, mode_idx %u, mode %p.\n", @@ -169,7 +184,7 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9EX iface, UINT return D3DERR_INVALIDCALL; wined3d_mutex_lock(); - hr = IWineD3D_EnumAdapterModes(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format), + hr = wined3d_enum_adapter_modes(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format), Mode, (WINED3DDISPLAYMODE *) pMode); wined3d_mutex_unlock(); @@ -178,14 +193,16 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9EX iface, UINT return hr; } -static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9EX iface, UINT Adapter, D3DDISPLAYMODE* pMode) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(IDirect3D9Ex *iface, UINT Adapter, + D3DDISPLAYMODE *pMode) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, adapter %u, mode %p.\n", iface, Adapter, pMode); wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) pMode); + hr = wined3d_get_adapter_display_mode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *)pMode); wined3d_mutex_unlock(); if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); @@ -196,24 +213,25 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9EX iface, static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(IDirect3D9Ex *iface, UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, BOOL Windowed) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x.\n", iface, Adapter, CheckType, DisplayFormat, BackBufferFormat, Windowed); wined3d_mutex_lock(); - hr = IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, wined3dformat_from_d3dformat(DisplayFormat), + hr = wined3d_check_device_type(This->WineD3D, Adapter, CheckType, wined3dformat_from_d3dformat(DisplayFormat), wined3dformat_from_d3dformat(BackBufferFormat), Windowed); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT Adapter, D3DDEVTYPE DeviceType, - D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) +static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT Adapter, + D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, + D3DFORMAT CheckFormat) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; WINED3DRESOURCETYPE WineD3DRType; @@ -244,7 +262,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT } wined3d_mutex_lock(); - hr = IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat), + hr = wined3d_check_device_format(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat), Usage, WineD3DRType, wined3dformat_from_d3dformat(CheckFormat), SURFACE_OPENGL); wined3d_mutex_unlock(); @@ -252,17 +270,17 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT } static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(IDirect3D9Ex *iface, UINT Adapter, - D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, - DWORD *pQualityLevels) + D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, + D3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, format %#x, windowed %#x, multisample_type %#x, levels %p.\n", iface, Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels); wined3d_mutex_lock(); - hr = IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType, + hr = wined3d_check_device_multisample_type(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(SurfaceFormat), Windowed, MultiSampleType, pQualityLevels); wined3d_mutex_unlock(); @@ -270,16 +288,17 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(IDirect3D9Ex *if } static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(IDirect3D9Ex *iface, UINT Adapter, - D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) + D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, + D3DFORMAT DepthStencilFormat) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, rt_format %#x, ds_format %#x.\n", iface, Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat); wined3d_mutex_lock(); - hr = IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType, + hr = wined3d_check_depth_stencil_match(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat), wined3dformat_from_d3dformat(RenderTargetFormat), wined3dformat_from_d3dformat(DepthStencilFormat)); wined3d_mutex_unlock(); @@ -287,15 +306,17 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(IDirect3D9Ex *iface, return hr; } -static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9EX iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(IDirect3D9Ex *iface, UINT Adapter, + D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, src_format %#x, dst_format %#x.\n", iface, Adapter, DeviceType, SourceFormat, TargetFormat); wined3d_mutex_lock(); - hr = IWineD3D_CheckDeviceFormatConversion(This->WineD3D, Adapter, DeviceType, + hr = wined3d_check_device_format_conversion(This->WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(SourceFormat), wined3dformat_from_d3dformat(TargetFormat)); wined3d_mutex_unlock(); @@ -362,8 +383,10 @@ void filter_caps(D3DCAPS9* pCaps) pCaps->NumSimultaneousRTs = min(D3D9_MAX_SIMULTANEOUS_RENDERTARGETS, pCaps->NumSimultaneousRTs); } -static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9EX iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(IDirect3D9Ex *iface, UINT Adapter, + D3DDEVTYPE DeviceType, D3DCAPS9 *pCaps) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HRESULT hrc = D3D_OK; WINED3DCAPS *pWineCaps; @@ -379,7 +402,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9EX iface, UINT Ada memset(pCaps, 0, sizeof(*pCaps)); wined3d_mutex_lock(); - hrc = IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, pWineCaps); + hrc = wined3d_get_device_caps(This->WineD3D, Adapter, DeviceType, pWineCaps); wined3d_mutex_unlock(); WINECAPSTOD3D9CAPS(pCaps, pWineCaps) @@ -394,14 +417,15 @@ static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9EX iface, UINT Ada return hrc; } -static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9EX iface, UINT Adapter) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; +static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(IDirect3D9Ex *iface, UINT Adapter) +{ + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); HMONITOR ret; TRACE("iface %p, adapter %u.\n", iface, Adapter); wined3d_mutex_lock(); - ret = IWineD3D_GetAdapterMonitor(This->WineD3D, Adapter); + ret = wined3d_get_adapter_monitor(This->WineD3D, Adapter); wined3d_mutex_unlock(); return ret; @@ -411,7 +435,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9Impl_CreateDevice(IDirect3D9Ex D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, IDirect3DDevice9 **device) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); IDirect3DDevice9Impl *object; HRESULT hr; @@ -425,7 +449,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9Impl_CreateDevice(IDirect3D9Ex return E_OUTOFMEMORY; } - hr = device_init(object, This->WineD3D, adapter, device_type, focus_window, flags, parameters); + hr = device_init(object, This->WineD3D, adapter, device_type, focus_window, flags, parameters, NULL); if (FAILED(hr)) { WARN("Failed to initialize device, hr %#x.\n", hr); @@ -444,7 +468,7 @@ static UINT WINAPI IDirect3D9ExImpl_GetAdapterModeCountEx(IDirect3D9Ex *iface, { FIXME("iface %p, adapter %u, filter %p stub!\n", iface, adapter, filter); - return D3DERR_DRIVERINTERNALERROR; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3D9ExImpl_EnumAdapterModesEx(IDirect3D9Ex *iface, @@ -453,7 +477,7 @@ static HRESULT WINAPI IDirect3D9ExImpl_EnumAdapterModesEx(IDirect3D9Ex *iface, FIXME("iface %p, adapter %u, filter %p, mode_idx %u, mode %p stub!\n", iface, adapter, filter, mode_idx, mode); - return D3DERR_DRIVERINTERNALERROR; + return E_NOTIMPL; } static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *iface, @@ -462,26 +486,44 @@ static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *ifa FIXME("iface %p, adapter %u, mode %p, rotation %p stub!\n", iface, adapter, mode, rotation); - return D3DERR_DRIVERINTERNALERROR; + return E_NOTIMPL; } static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9ExImpl_CreateDeviceEx(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode, IDirect3DDevice9Ex **device) { - FIXME("iface %p, adapter %u, device_type %#x, focus_window %p, flags %#x,\n" - "parameters %p, mode %p, device %p stub!\n", - iface, adapter, device_type, focus_window, flags, - parameters, mode, device); + IDirect3D9Impl *d3d9 = impl_from_IDirect3D9Ex(iface); + IDirect3DDevice9Impl *object; + HRESULT hr; - *device = NULL; + TRACE("iface %p, adapter %u, device_type %#x, focus_window %p, flags %#x, parameters %p, mode %p, device %p.\n", + iface, adapter, device_type, focus_window, flags, parameters, mode, device); - return D3DERR_DRIVERINTERNALERROR; + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate device memory.\n"); + return E_OUTOFMEMORY; + } + + hr = device_init(object, d3d9->WineD3D, adapter, device_type, focus_window, flags, parameters, mode); + if (FAILED(hr)) + { + WARN("Failed to initialize device, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created device %p.\n", object); + *device = &object->IDirect3DDevice9Ex_iface; + + return D3D_OK; } static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter, LUID *luid) { - IDirect3D9Impl *This = (IDirect3D9Impl *)iface; + IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface); WINED3DADAPTER_IDENTIFIER adapter_id; HRESULT hr; @@ -492,7 +534,7 @@ static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter_id.device_name_size = 0; wined3d_mutex_lock(); - hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, adapter, 0, &adapter_id); + hr = wined3d_get_adapter_identifier(This->WineD3D, adapter, 0, &adapter_id); wined3d_mutex_unlock(); memcpy(luid, &adapter_id.adapter_luid, sizeof(*luid)); diff --git a/dll/directx/wine/d3d9/query.c b/dll/directx/wine/d3d9/query.c index 4a5869696fb..42523320f33 100644 --- a/dll/directx/wine/d3d9/query.c +++ b/dll/directx/wine/d3d9/query.c @@ -25,9 +25,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -/* IDirect3DQuery9 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DQuery9Impl_QueryInterface(LPDIRECT3DQUERY9 iface, REFIID riid, LPVOID* ppobj) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; +static inline IDirect3DQuery9Impl *impl_from_IDirect3DQuery9(IDirect3DQuery9 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DQuery9Impl, IDirect3DQuery9_iface); +} + +static HRESULT WINAPI IDirect3DQuery9Impl_QueryInterface(IDirect3DQuery9 *iface, REFIID riid, + void **ppobj) +{ + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -43,8 +49,9 @@ static HRESULT WINAPI IDirect3DQuery9Impl_QueryInterface(LPDIRECT3DQUERY9 iface, return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DQuery9Impl_AddRef(LPDIRECT3DQUERY9 iface) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; +static ULONG WINAPI IDirect3DQuery9Impl_AddRef(IDirect3DQuery9 *iface) +{ + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -52,15 +59,16 @@ static ULONG WINAPI IDirect3DQuery9Impl_AddRef(LPDIRECT3DQUERY9 iface) { return ref; } -static ULONG WINAPI IDirect3DQuery9Impl_Release(LPDIRECT3DQUERY9 iface) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; +static ULONG WINAPI IDirect3DQuery9Impl_Release(IDirect3DQuery9 *iface) +{ + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); if (ref == 0) { wined3d_mutex_lock(); - IWineD3DQuery_Release(This->wineD3DQuery); + wined3d_query_decref(This->wineD3DQuery); wined3d_mutex_unlock(); IDirect3DDevice9Ex_Release(This->parentDevice); @@ -69,10 +77,10 @@ static ULONG WINAPI IDirect3DQuery9Impl_Release(LPDIRECT3DQUERY9 iface) { return ref; } -/* IDirect3DQuery9 Interface follow: */ -static HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(IDirect3DQuery9 *iface, IDirect3DDevice9 **device) +static HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(IDirect3DQuery9 *iface, + IDirect3DDevice9 **device) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -84,54 +92,59 @@ static HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(IDirect3DQuery9 *iface, IDir return D3D_OK; } -static D3DQUERYTYPE WINAPI IDirect3DQuery9Impl_GetType(LPDIRECT3DQUERY9 iface) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; - HRESULT hr; +static D3DQUERYTYPE WINAPI IDirect3DQuery9Impl_GetType(IDirect3DQuery9 *iface) +{ + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); + D3DQUERYTYPE type; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DQuery_GetType(This->wineD3DQuery); + type = wined3d_query_get_type(This->wineD3DQuery); wined3d_mutex_unlock(); - return hr; + return type; } -static DWORD WINAPI IDirect3DQuery9Impl_GetDataSize(LPDIRECT3DQUERY9 iface) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; +static DWORD WINAPI IDirect3DQuery9Impl_GetDataSize(IDirect3DQuery9 *iface) +{ + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DQuery_GetDataSize(This->wineD3DQuery); + ret = wined3d_query_get_data_size(This->wineD3DQuery); wined3d_mutex_unlock(); return ret; } -static HRESULT WINAPI IDirect3DQuery9Impl_Issue(LPDIRECT3DQUERY9 iface, DWORD dwIssueFlags) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; +static HRESULT WINAPI IDirect3DQuery9Impl_Issue(IDirect3DQuery9 *iface, DWORD dwIssueFlags) +{ + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); HRESULT hr; TRACE("iface %p, flags %#x.\n", iface, dwIssueFlags); wined3d_mutex_lock(); - hr = IWineD3DQuery_Issue(This->wineD3DQuery, dwIssueFlags); + hr = wined3d_query_issue(This->wineD3DQuery, dwIssueFlags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DQuery9Impl_GetData(LPDIRECT3DQUERY9 iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) { - IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface; +static HRESULT WINAPI IDirect3DQuery9Impl_GetData(IDirect3DQuery9 *iface, void *pData, + DWORD dwSize, DWORD dwGetDataFlags) +{ + IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface); HRESULT hr; TRACE("iface %p, data %p, size %u, flags %#x.\n", iface, pData, dwSize, dwGetDataFlags); wined3d_mutex_lock(); - hr = IWineD3DQuery_GetData(This->wineD3DQuery, pData, dwSize, dwGetDataFlags); + hr = wined3d_query_get_data(This->wineD3DQuery, pData, dwSize, dwGetDataFlags); wined3d_mutex_unlock(); return hr; @@ -154,11 +167,11 @@ HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3D { HRESULT hr; - query->lpVtbl = &Direct3DQuery9_Vtbl; + query->IDirect3DQuery9_iface.lpVtbl = &Direct3DQuery9_Vtbl; query->ref = 1; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateQuery(device->WineD3DDevice, type, &query->wineD3DQuery); + hr = wined3d_query_create(device->wined3d_device, type, &query->wineD3DQuery); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -166,7 +179,7 @@ HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3D return hr; } - query->parentDevice = (IDirect3DDevice9Ex *)device; + query->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(query->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/shader.c b/dll/directx/wine/d3d9/shader.c index c6656e524c3..c36600dcd60 100644 --- a/dll/directx/wine/d3d9/shader.c +++ b/dll/directx/wine/d3d9/shader.c @@ -51,7 +51,7 @@ static ULONG WINAPI d3d9_vertexshader_AddRef(IDirect3DVertexShader9 *iface) { IDirect3DDevice9Ex_AddRef(shader->parentDevice); wined3d_mutex_lock(); - IWineD3DVertexShader_AddRef(shader->wineD3DVertexShader); + wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); } @@ -70,7 +70,7 @@ static ULONG WINAPI d3d9_vertexshader_Release(IDirect3DVertexShader9 *iface) IDirect3DDevice9Ex *device = shader->parentDevice; wined3d_mutex_lock(); - IWineD3DVertexShader_Release(shader->wineD3DVertexShader); + wined3d_shader_decref(shader->wined3d_shader); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -100,7 +100,7 @@ static HRESULT WINAPI d3d9_vertexshader_GetFunction(IDirect3DVertexShader9 *ifac TRACE("iface %p, data %p, data_size %p.\n", iface, data, data_size); wined3d_mutex_lock(); - hr = IWineD3DVertexShader_GetFunction(((IDirect3DVertexShader9Impl *)iface)->wineD3DVertexShader, data, data_size); + hr = wined3d_shader_get_byte_code(((IDirect3DVertexShader9Impl *)iface)->wined3d_shader, data, data_size); wined3d_mutex_unlock(); return hr; @@ -135,8 +135,8 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im shader->lpVtbl = &d3d9_vertexshader_vtbl; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVertexShader(device->WineD3DDevice, byte_code, NULL, - shader, &d3d9_vertexshader_wined3d_parent_ops, &shader->wineD3DVertexShader); + hr = wined3d_shader_create_vs(device->wined3d_device, byte_code, NULL, + shader, &d3d9_vertexshader_wined3d_parent_ops, &shader->wined3d_shader); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -144,7 +144,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im return hr; } - shader->parentDevice = (IDirect3DDevice9Ex *)device; + shader->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(shader->parentDevice); return D3D_OK; @@ -179,7 +179,7 @@ static ULONG WINAPI d3d9_pixelshader_AddRef(IDirect3DPixelShader9 *iface) { IDirect3DDevice9Ex_AddRef(shader->parentDevice); wined3d_mutex_lock(); - IWineD3DPixelShader_AddRef(shader->wineD3DPixelShader); + wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); } @@ -198,7 +198,7 @@ static ULONG WINAPI d3d9_pixelshader_Release(IDirect3DPixelShader9 *iface) IDirect3DDevice9Ex *device = shader->parentDevice; wined3d_mutex_lock(); - IWineD3DPixelShader_Release(shader->wineD3DPixelShader); + wined3d_shader_decref(shader->wined3d_shader); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -227,7 +227,7 @@ static HRESULT WINAPI d3d9_pixelshader_GetFunction(IDirect3DPixelShader9 *iface, TRACE("iface %p, data %p, data_size %p.\n", iface, data, data_size); wined3d_mutex_lock(); - hr = IWineD3DPixelShader_GetFunction(((IDirect3DPixelShader9Impl *)iface)->wineD3DPixelShader, data, data_size); + hr = wined3d_shader_get_byte_code(((IDirect3DPixelShader9Impl *)iface)->wined3d_shader, data, data_size); wined3d_mutex_unlock(); return hr; @@ -262,8 +262,8 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, IDirect3DDevice9Impl shader->lpVtbl = &d3d9_pixelshader_vtbl; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreatePixelShader(device->WineD3DDevice, byte_code, NULL, shader, - &d3d9_pixelshader_wined3d_parent_ops, &shader->wineD3DPixelShader); + hr = wined3d_shader_create_ps(device->wined3d_device, byte_code, NULL, shader, + &d3d9_pixelshader_wined3d_parent_ops, &shader->wined3d_shader); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -271,7 +271,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, IDirect3DDevice9Impl return hr; } - shader->parentDevice = (IDirect3DDevice9Ex *)device; + shader->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(shader->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/stateblock.c b/dll/directx/wine/d3d9/stateblock.c index 01a882eea54..06f8aedba75 100644 --- a/dll/directx/wine/d3d9/stateblock.c +++ b/dll/directx/wine/d3d9/stateblock.c @@ -25,9 +25,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -/* IDirect3DStateBlock9 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DStateBlock9Impl_QueryInterface(LPDIRECT3DSTATEBLOCK9 iface, REFIID riid, LPVOID* ppobj) { - IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; +static inline IDirect3DStateBlock9Impl *impl_from_IDirect3DStateBlock9(IDirect3DStateBlock9 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DStateBlock9Impl, IDirect3DStateBlock9_iface); +} + +static HRESULT WINAPI IDirect3DStateBlock9Impl_QueryInterface(IDirect3DStateBlock9 *iface, + REFIID riid, void **ppobj) +{ + IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -43,8 +49,9 @@ static HRESULT WINAPI IDirect3DStateBlock9Impl_QueryInterface(LPDIRECT3DSTATEBLO return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DStateBlock9Impl_AddRef(LPDIRECT3DSTATEBLOCK9 iface) { - IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; +static ULONG WINAPI IDirect3DStateBlock9Impl_AddRef(IDirect3DStateBlock9 *iface) +{ + IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -52,15 +59,16 @@ static ULONG WINAPI IDirect3DStateBlock9Impl_AddRef(LPDIRECT3DSTATEBLOCK9 iface) return ref; } -static ULONG WINAPI IDirect3DStateBlock9Impl_Release(LPDIRECT3DSTATEBLOCK9 iface) { - IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; +static ULONG WINAPI IDirect3DStateBlock9Impl_Release(IDirect3DStateBlock9 *iface) +{ + IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); if (ref == 0) { wined3d_mutex_lock(); - IWineD3DStateBlock_Release(This->wineD3DStateBlock); + wined3d_stateblock_decref(This->wined3d_stateblock); wined3d_mutex_unlock(); IDirect3DDevice9Ex_Release(This->parentDevice); @@ -70,9 +78,10 @@ static ULONG WINAPI IDirect3DStateBlock9Impl_Release(LPDIRECT3DSTATEBLOCK9 iface } /* IDirect3DStateBlock9 Interface follow: */ -static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(IDirect3DStateBlock9 *iface, IDirect3DDevice9 **device) +static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(IDirect3DStateBlock9 *iface, + IDirect3DDevice9 **device) { - IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; + IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -84,27 +93,29 @@ static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(IDirect3DStateBlock9 *i return D3D_OK; } -static HRESULT WINAPI IDirect3DStateBlock9Impl_Capture(LPDIRECT3DSTATEBLOCK9 iface) { - IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; +static HRESULT WINAPI IDirect3DStateBlock9Impl_Capture(IDirect3DStateBlock9 *iface) +{ + IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DStateBlock_Capture(This->wineD3DStateBlock); + hr = wined3d_stateblock_capture(This->wined3d_stateblock); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DStateBlock9Impl_Apply(LPDIRECT3DSTATEBLOCK9 iface) { - IDirect3DStateBlock9Impl *This = (IDirect3DStateBlock9Impl *)iface; +static HRESULT WINAPI IDirect3DStateBlock9Impl_Apply(IDirect3DStateBlock9 *iface) +{ + IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DStateBlock_Apply(This->wineD3DStateBlock); + hr = wined3d_stateblock_apply(This->wined3d_stateblock); wined3d_mutex_unlock(); return hr; @@ -124,22 +135,22 @@ static const IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl = }; HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Impl *device, - D3DSTATEBLOCKTYPE type, IWineD3DStateBlock *wined3d_stateblock) + D3DSTATEBLOCKTYPE type, struct wined3d_stateblock *wined3d_stateblock) { HRESULT hr; - stateblock->lpVtbl = &Direct3DStateBlock9_Vtbl; + stateblock->IDirect3DStateBlock9_iface.lpVtbl = &Direct3DStateBlock9_Vtbl; stateblock->ref = 1; if (wined3d_stateblock) { - stateblock->wineD3DStateBlock = wined3d_stateblock; + stateblock->wined3d_stateblock = wined3d_stateblock; } else { wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateStateBlock(device->WineD3DDevice, - (WINED3DSTATEBLOCKTYPE)type, &stateblock->wineD3DStateBlock); + hr = wined3d_stateblock_create(device->wined3d_device, + (WINED3DSTATEBLOCKTYPE)type, &stateblock->wined3d_stateblock); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -148,7 +159,7 @@ HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Im } } - stateblock->parentDevice = (IDirect3DDevice9Ex *)device; + stateblock->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(stateblock->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/surface.c b/dll/directx/wine/d3d9/surface.c index de3fb779e0d..1d66bde2d90 100644 --- a/dll/directx/wine/d3d9/surface.c +++ b/dll/directx/wine/d3d9/surface.c @@ -62,7 +62,7 @@ static ULONG WINAPI IDirect3DSurface9Impl_AddRef(LPDIRECT3DSURFACE9 iface) { { if (This->parentDevice) IDirect3DDevice9Ex_AddRef(This->parentDevice); wined3d_mutex_lock(); - IWineD3DSurface_AddRef(This->wineD3DSurface); + wined3d_surface_incref(This->wined3d_surface); wined3d_mutex_unlock(); } @@ -90,7 +90,7 @@ static ULONG WINAPI IDirect3DSurface9Impl_Release(LPDIRECT3DSURFACE9 iface) { IDirect3DDevice9Ex *parentDevice = This->parentDevice; wined3d_mutex_lock(); - IWineD3DSurface_Release(This->wineD3DSurface); + wined3d_surface_decref(This->wined3d_surface); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -141,7 +141,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_SetPrivateData(LPDIRECT3DSURFACE9 if iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DSurface_SetPrivateData(This->wineD3DSurface, refguid, pData, SizeOfData, Flags); + hr = wined3d_surface_set_private_data(This->wined3d_surface, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; @@ -155,7 +155,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetPrivateData(LPDIRECT3DSURFACE9 if iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DSurface_GetPrivateData(This->wineD3DSurface, refguid, pData, pSizeOfData); + hr = wined3d_surface_get_private_data(This->wined3d_surface, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; @@ -168,7 +168,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_FreePrivateData(LPDIRECT3DSURFACE9 i TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DSurface_FreePrivateData(This->wineD3DSurface, refguid); + hr = wined3d_surface_free_private_data(This->wined3d_surface, refguid); wined3d_mutex_unlock(); return hr; @@ -181,7 +181,7 @@ static DWORD WINAPI IDirect3DSurface9Impl_SetPriority(LPDIRECT3DSURFACE9 iface, TRACE("iface %p, priority %u.\n", iface, PriorityNew); wined3d_mutex_lock(); - hr = IWineD3DSurface_SetPriority(This->wineD3DSurface, PriorityNew); + hr = wined3d_surface_set_priority(This->wined3d_surface, PriorityNew); wined3d_mutex_unlock(); return hr; @@ -194,7 +194,7 @@ static DWORD WINAPI IDirect3DSurface9Impl_GetPriority(LPDIRECT3DSURFACE9 iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DSurface_GetPriority(This->wineD3DSurface); + hr = wined3d_surface_get_priority(This->wined3d_surface); wined3d_mutex_unlock(); return hr; @@ -206,21 +206,15 @@ static void WINAPI IDirect3DSurface9Impl_PreLoad(LPDIRECT3DSURFACE9 iface) { TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DSurface_PreLoad(This->wineD3DSurface); + wined3d_surface_preload(This->wined3d_surface); wined3d_mutex_unlock(); } -static D3DRESOURCETYPE WINAPI IDirect3DSurface9Impl_GetType(LPDIRECT3DSURFACE9 iface) { - IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; - D3DRESOURCETYPE ret; - +static D3DRESOURCETYPE WINAPI IDirect3DSurface9Impl_GetType(IDirect3DSurface9 *iface) +{ TRACE("iface %p.\n", iface); - wined3d_mutex_lock(); - ret = IWineD3DSurface_GetType(This->wineD3DSurface); - wined3d_mutex_unlock(); - - return ret; + return D3DRTYPE_SURFACE; } /* IDirect3DSurface9 Interface follow: */ @@ -232,10 +226,6 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetContainer(LPDIRECT3DSURFACE9 ifac if (!This->container) return E_NOINTERFACE; - if (!ppContainer) { - ERR("Called without a valid ppContainer\n"); - } - res = IUnknown_QueryInterface(This->container, riid, ppContainer); TRACE("Returning ppContainer %p, *ppContainer %p\n", ppContainer, *ppContainer); @@ -243,24 +233,27 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetContainer(LPDIRECT3DSURFACE9 ifac return res; } -static HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFACE_DESC* pDesc) { +static HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(IDirect3DSurface9 *iface, D3DSURFACE_DESC *desc) +{ IDirect3DSurface9Impl *This = (IDirect3DSurface9Impl *)iface; - WINED3DSURFACE_DESC wined3ddesc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; - TRACE("iface %p, desc %p.\n", iface, pDesc); + TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - IWineD3DSurface_GetDesc(This->wineD3DSurface, &wined3ddesc); + wined3d_resource = wined3d_surface_get_resource(This->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format); - pDesc->Type = wined3ddesc.resource_type; - pDesc->Usage = wined3ddesc.usage; - pDesc->Pool = wined3ddesc.pool; - pDesc->MultiSampleType = wined3ddesc.multisample_type; - pDesc->MultiSampleQuality = wined3ddesc.multisample_quality; - pDesc->Width = wined3ddesc.width; - pDesc->Height = wined3ddesc.height; + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->MultiSampleType = wined3d_desc.multisample_type; + desc->MultiSampleQuality = wined3d_desc.multisample_quality; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; return D3D_OK; } @@ -272,7 +265,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_LockRect(LPDIRECT3DSURFACE9 iface, D TRACE("iface %p, locked_rect %p, rect %p, flags %#x.\n", iface, pLockedRect, pRect, Flags); wined3d_mutex_lock(); - hr = IWineD3DSurface_LockRect(This->wineD3DSurface, (WINED3DLOCKED_RECT *) pLockedRect, pRect, Flags); + hr = wined3d_surface_map(This->wined3d_surface, (WINED3DLOCKED_RECT *)pLockedRect, pRect, Flags); wined3d_mutex_unlock(); return hr; @@ -285,7 +278,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_UnlockRect(LPDIRECT3DSURFACE9 iface) TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = IWineD3DSurface_UnlockRect(This->wineD3DSurface); + hr = wined3d_surface_unmap(This->wined3d_surface); wined3d_mutex_unlock(); switch(hr) @@ -309,7 +302,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetDC(LPDIRECT3DSURFACE9 iface, HDC* } wined3d_mutex_lock(); - hr = IWineD3DSurface_GetDC(This->wineD3DSurface, phdc); + hr = wined3d_surface_getdc(This->wined3d_surface, phdc); wined3d_mutex_unlock(); return hr; @@ -322,11 +315,12 @@ static HRESULT WINAPI IDirect3DSurface9Impl_ReleaseDC(LPDIRECT3DSURFACE9 iface, TRACE("iface %p, hdc %p.\n", iface, hdc); wined3d_mutex_lock(); - hr = IWineD3DSurface_ReleaseDC(This->wineD3DSurface, hdc); + hr = wined3d_surface_releasedc(This->wined3d_surface, hdc); wined3d_mutex_unlock(); - switch(hr) { - case WINEDDERR_NODC: return WINED3DERR_INVALIDCALL; + switch (hr) + { + case WINEDDERR_NODC: return D3DERR_INVALIDCALL; default: return hr; } } @@ -398,9 +392,9 @@ HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *devic } wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateSurface(device->WineD3DDevice, width, height, wined3dformat_from_d3dformat(format), + hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format), lockable, discard, level, usage & WINED3DUSAGE_MASK, (WINED3DPOOL)pool, multisample_type, - multisample_quality, SURFACE_OPENGL, surface, &d3d9_surface_wined3d_parent_ops, &surface->wineD3DSurface); + multisample_quality, SURFACE_OPENGL, surface, &d3d9_surface_wined3d_parent_ops, &surface->wined3d_surface); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -408,7 +402,7 @@ HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *devic return hr; } - surface->parentDevice = (IDirect3DDevice9Ex *)device; + surface->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(surface->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/swapchain.c b/dll/directx/wine/d3d9/swapchain.c index 0d523914f92..26437079970 100644 --- a/dll/directx/wine/d3d9/swapchain.c +++ b/dll/directx/wine/d3d9/swapchain.c @@ -50,7 +50,15 @@ static ULONG WINAPI IDirect3DSwapChain9Impl_AddRef(LPDIRECT3DSWAPCHAIN9 iface) { TRACE("%p increasing refcount to %u.\n", iface, ref); - if(ref == 1 && This->parentDevice) IDirect3DDevice9Ex_AddRef(This->parentDevice); + if (ref == 1) + { + if (This->parentDevice) + IDirect3DDevice9Ex_AddRef(This->parentDevice); + + wined3d_mutex_lock(); + wined3d_swapchain_incref(This->wined3d_swapchain); + wined3d_mutex_unlock(); + } return ref; } @@ -64,13 +72,9 @@ static ULONG WINAPI IDirect3DSwapChain9Impl_Release(LPDIRECT3DSWAPCHAIN9 iface) if (ref == 0) { IDirect3DDevice9Ex *parentDevice = This->parentDevice; - if (!This->isImplicit) { - wined3d_mutex_lock(); - IWineD3DSwapChain_Destroy(This->wineD3DSwapChain); - wined3d_mutex_unlock(); - - HeapFree(GetProcessHeap(), 0, This); - } + wined3d_mutex_lock(); + wined3d_swapchain_decref(This->wined3d_swapchain); + wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ if (parentDevice) IDirect3DDevice9Ex_Release(parentDevice); @@ -87,7 +91,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DSwapChain9Impl_Present(LPDIRECT iface, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_Present(This->wineD3DSwapChain, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags); + hr = wined3d_swapchain_present(This->wined3d_swapchain, pSourceRect, + pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags); wined3d_mutex_unlock(); return hr; @@ -100,7 +105,8 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetFrontBufferData(LPDIRECT3DSWAPC TRACE("iface %p, surface %p.\n", iface, pDestSurface); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_GetFrontBufferData(This->wineD3DSwapChain, ((IDirect3DSurface9Impl *)pDestSurface)->wineD3DSurface); + hr = wined3d_swapchain_get_front_buffer_data(This->wined3d_swapchain, + ((IDirect3DSurface9Impl *)pDestSurface)->wined3d_surface); wined3d_mutex_unlock(); return hr; @@ -110,20 +116,20 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetBackBuffer(IDirect3DSwapChain9 UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9 **ppBackBuffer) { IDirect3DSwapChain9Impl *This = (IDirect3DSwapChain9Impl *)iface; - IWineD3DSurface *mySurface = NULL; + struct wined3d_surface *wined3d_surface = NULL; HRESULT hr; TRACE("iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", iface, iBackBuffer, Type, ppBackBuffer); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, - (WINED3DBACKBUFFER_TYPE)Type, &mySurface); - if (SUCCEEDED(hr) && mySurface) + hr = wined3d_swapchain_get_back_buffer(This->wined3d_swapchain, + iBackBuffer, (WINED3DBACKBUFFER_TYPE)Type, &wined3d_surface); + if (SUCCEEDED(hr) && wined3d_surface) { - *ppBackBuffer = IWineD3DSurface_GetParent(mySurface); + *ppBackBuffer = wined3d_surface_get_parent(wined3d_surface); IDirect3DSurface9_AddRef(*ppBackBuffer); - IWineD3DSurface_Release(mySurface); + wined3d_surface_decref(wined3d_surface); } wined3d_mutex_unlock(); @@ -138,7 +144,7 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetRasterStatus(LPDIRECT3DSWAPCHAI TRACE("iface %p, raster_status %p.\n", iface, pRasterStatus); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_GetRasterStatus(This->wineD3DSwapChain, (WINED3DRASTER_STATUS *) pRasterStatus); + hr = wined3d_swapchain_get_raster_status(This->wined3d_swapchain, (WINED3DRASTER_STATUS *)pRasterStatus); wined3d_mutex_unlock(); return hr; @@ -151,7 +157,7 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetDisplayMode(LPDIRECT3DSWAPCHAIN TRACE("iface %p, mode %p.\n", iface, pMode); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_GetDisplayMode(This->wineD3DSwapChain, (WINED3DDISPLAYMODE *) pMode); + hr = wined3d_swapchain_get_display_mode(This->wined3d_swapchain, (WINED3DDISPLAYMODE *)pMode); wined3d_mutex_unlock(); if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format); @@ -181,7 +187,7 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetPresentParameters(LPDIRECT3DSWA TRACE("iface %p, parameters %p.\n", iface, pPresentationParameters); wined3d_mutex_lock(); - hr = IWineD3DSwapChain_GetPresentParameters(This->wineD3DSwapChain, &winePresentParameters); + hr = wined3d_swapchain_get_present_parameters(This->wined3d_swapchain, &winePresentParameters); wined3d_mutex_unlock(); pPresentationParameters->BackBufferWidth = winePresentParameters.BackBufferWidth; @@ -217,6 +223,16 @@ static const IDirect3DSwapChain9Vtbl Direct3DSwapChain9_Vtbl = IDirect3DSwapChain9Impl_GetPresentParameters }; +static void STDMETHODCALLTYPE d3d9_swapchain_wined3d_object_released(void *parent) +{ + HeapFree(GetProcessHeap(), 0, parent); +} + +static const struct wined3d_parent_ops d3d9_swapchain_wined3d_parent_ops = +{ + d3d9_swapchain_wined3d_object_released, +}; + HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl *device, D3DPRESENT_PARAMETERS *present_parameters) { @@ -243,8 +259,9 @@ HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl wined3d_parameters.AutoRestoreDisplayMode = TRUE; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateSwapChain(device->WineD3DDevice, &wined3d_parameters, - SURFACE_OPENGL, swapchain, &swapchain->wineD3DSwapChain); + hr = wined3d_swapchain_create(device->wined3d_device, &wined3d_parameters, + SURFACE_OPENGL, swapchain, &d3d9_swapchain_wined3d_parent_ops, + &swapchain->wined3d_swapchain); wined3d_mutex_unlock(); present_parameters->BackBufferWidth = wined3d_parameters.BackBufferWidth; @@ -268,7 +285,7 @@ HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl return hr; } - swapchain->parentDevice = (IDirect3DDevice9Ex *)device; + swapchain->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(swapchain->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/texture.c b/dll/directx/wine/d3d9/texture.c index dbe9798ab64..d1df0f5ee7b 100644 --- a/dll/directx/wine/d3d9/texture.c +++ b/dll/directx/wine/d3d9/texture.c @@ -25,9 +25,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -/* IDirect3DTexture9 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DTexture9Impl_QueryInterface(LPDIRECT3DTEXTURE9 iface, REFIID riid, LPVOID* ppobj) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static inline IDirect3DTexture9Impl *impl_from_IDirect3DTexture9(IDirect3DTexture9 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DTexture9Impl, IDirect3DTexture9_iface); +} + +static HRESULT WINAPI IDirect3DTexture9Impl_QueryInterface(IDirect3DTexture9 *iface, REFIID riid, + void **ppobj) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -45,8 +51,9 @@ static HRESULT WINAPI IDirect3DTexture9Impl_QueryInterface(LPDIRECT3DTEXTURE9 if return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DTexture9Impl_AddRef(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static ULONG WINAPI IDirect3DTexture9Impl_AddRef(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -55,15 +62,16 @@ static ULONG WINAPI IDirect3DTexture9Impl_AddRef(LPDIRECT3DTEXTURE9 iface) { { IDirect3DDevice9Ex_AddRef(This->parentDevice); wined3d_mutex_lock(); - IWineD3DTexture_AddRef(This->wineD3DTexture); + wined3d_texture_incref(This->wined3d_texture); wined3d_mutex_unlock(); } return ref; } -static ULONG WINAPI IDirect3DTexture9Impl_Release(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static ULONG WINAPI IDirect3DTexture9Impl_Release(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -72,7 +80,7 @@ static ULONG WINAPI IDirect3DTexture9Impl_Release(LPDIRECT3DTEXTURE9 iface) { IDirect3DDevice9Ex *parentDevice = This->parentDevice; wined3d_mutex_lock(); - IWineD3DTexture_Release(This->wineD3DTexture); + wined3d_texture_decref(This->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -81,10 +89,10 @@ static ULONG WINAPI IDirect3DTexture9Impl_Release(LPDIRECT3DTEXTURE9 iface) { return ref; } -/* IDirect3DTexture9 IDirect3DResource9 Interface follow: */ -static HRESULT WINAPI IDirect3DTexture9Impl_GetDevice(IDirect3DTexture9 *iface, IDirect3DDevice9 **device) +static HRESULT WINAPI IDirect3DTexture9Impl_GetDevice(IDirect3DTexture9 *iface, + IDirect3DDevice9 **device) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -96,256 +104,305 @@ static HRESULT WINAPI IDirect3DTexture9Impl_GetDevice(IDirect3DTexture9 *iface, return D3D_OK; } -static HRESULT WINAPI IDirect3DTexture9Impl_SetPrivateData(LPDIRECT3DTEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DTexture9Impl_SetPrivateData(IDirect3DTexture9 *iface, + REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - hr = IWineD3DTexture_SetPrivateData(This->wineD3DTexture, refguid, pData, SizeOfData, Flags); + hr = wined3d_texture_set_private_data(This->wined3d_texture, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture9Impl_GetPrivateData(LPDIRECT3DTEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DTexture9Impl_GetPrivateData(IDirect3DTexture9 *iface, + REFGUID refguid, void *pData, DWORD *pSizeOfData) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - hr = IWineD3DTexture_GetPrivateData(This->wineD3DTexture, refguid, pData, pSizeOfData); + hr = wined3d_texture_get_private_data(This->wined3d_texture, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture9Impl_FreePrivateData(LPDIRECT3DTEXTURE9 iface, REFGUID refguid) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DTexture9Impl_FreePrivateData(IDirect3DTexture9 *iface, + REFGUID refguid) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - hr = IWineD3DTexture_FreePrivateData(This->wineD3DTexture, refguid); + hr = wined3d_texture_free_private_data(This->wined3d_texture, refguid); wined3d_mutex_unlock(); return hr; } -static DWORD WINAPI IDirect3DTexture9Impl_SetPriority(LPDIRECT3DTEXTURE9 iface, DWORD PriorityNew) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static DWORD WINAPI IDirect3DTexture9Impl_SetPriority(IDirect3DTexture9 *iface, DWORD PriorityNew) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); DWORD ret; TRACE("iface %p, priority %u.\n", iface, PriorityNew); wined3d_mutex_lock(); - ret = IWineD3DTexture_SetPriority(This->wineD3DTexture, PriorityNew); + ret = wined3d_texture_set_priority(This->wined3d_texture, PriorityNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DTexture9Impl_GetPriority(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static DWORD WINAPI IDirect3DTexture9Impl_GetPriority(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DTexture_GetPriority(This->wineD3DTexture); + ret = wined3d_texture_get_priority(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static void WINAPI IDirect3DTexture9Impl_PreLoad(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static void WINAPI IDirect3DTexture9Impl_PreLoad(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DTexture_PreLoad(This->wineD3DTexture); + wined3d_texture_preload(This->wined3d_texture); wined3d_mutex_unlock(); } -static D3DRESOURCETYPE WINAPI IDirect3DTexture9Impl_GetType(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static D3DRESOURCETYPE WINAPI IDirect3DTexture9Impl_GetType(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); HRESULT ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DTexture_GetType(This->wineD3DTexture); + ret = wined3d_texture_get_type(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } /* IDirect3DTexture9 IDirect3DBaseTexture9 Interface follow: */ -static DWORD WINAPI IDirect3DTexture9Impl_SetLOD(LPDIRECT3DTEXTURE9 iface, DWORD LODNew) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static DWORD WINAPI IDirect3DTexture9Impl_SetLOD(IDirect3DTexture9 *iface, DWORD LODNew) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); DWORD ret; TRACE("iface %p, lod %u.\n", iface, LODNew); wined3d_mutex_lock(); - ret = IWineD3DTexture_SetLOD(This->wineD3DTexture, LODNew); + ret = wined3d_texture_set_lod(This->wined3d_texture, LODNew); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DTexture9Impl_GetLOD(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static DWORD WINAPI IDirect3DTexture9Impl_GetLOD(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DTexture_GetLOD(This->wineD3DTexture); + ret = wined3d_texture_get_lod(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static DWORD WINAPI IDirect3DTexture9Impl_GetLevelCount(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static DWORD WINAPI IDirect3DTexture9Impl_GetLevelCount(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); DWORD ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = IWineD3DTexture_GetLevelCount(This->wineD3DTexture); + ret = wined3d_texture_get_level_count(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static HRESULT WINAPI IDirect3DTexture9Impl_SetAutoGenFilterType(LPDIRECT3DTEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DTexture9Impl_SetAutoGenFilterType(IDirect3DTexture9 *iface, + D3DTEXTUREFILTERTYPE FilterType) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); HRESULT hr; TRACE("iface %p, filter_type %#x.\n", iface, FilterType); wined3d_mutex_lock(); - hr = IWineD3DTexture_SetAutoGenFilterType(This->wineD3DTexture, (WINED3DTEXTUREFILTERTYPE) FilterType); + hr = wined3d_texture_set_autogen_filter_type(This->wined3d_texture, (WINED3DTEXTUREFILTERTYPE)FilterType); wined3d_mutex_unlock(); return hr; } -static D3DTEXTUREFILTERTYPE WINAPI IDirect3DTexture9Impl_GetAutoGenFilterType(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static D3DTEXTUREFILTERTYPE WINAPI IDirect3DTexture9Impl_GetAutoGenFilterType(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); D3DTEXTUREFILTERTYPE ret; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - ret = (D3DTEXTUREFILTERTYPE) IWineD3DTexture_GetAutoGenFilterType(This->wineD3DTexture); + ret = (D3DTEXTUREFILTERTYPE)wined3d_texture_get_autogen_filter_type(This->wined3d_texture); wined3d_mutex_unlock(); return ret; } -static void WINAPI IDirect3DTexture9Impl_GenerateMipSubLevels(LPDIRECT3DTEXTURE9 iface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static void WINAPI IDirect3DTexture9Impl_GenerateMipSubLevels(IDirect3DTexture9 *iface) +{ + IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - IWineD3DTexture_GenerateMipSubLevels(This->wineD3DTexture); + wined3d_texture_generate_mipmaps(This->wined3d_texture); wined3d_mutex_unlock(); } -/* IDirect3DTexture9 Interface follow: */ -static HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 iface, UINT Level, D3DSURFACE_DESC* pDesc) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; - WINED3DSURFACE_DESC wined3ddesc; - HRESULT hr; +static HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(IDirect3DTexture9 *iface, + UINT level, D3DSURFACE_DESC *desc) +{ + IDirect3DTexture9Impl *texture = impl_from_IDirect3DTexture9(iface); + struct wined3d_resource *sub_resource; + HRESULT hr = D3D_OK; - TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); + TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); wined3d_mutex_lock(); - hr = IWineD3DTexture_GetLevelDesc(This->wineD3DTexture, Level, &wined3ddesc); - wined3d_mutex_unlock(); - - if (SUCCEEDED(hr)) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else { - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.format); - pDesc->Type = wined3ddesc.resource_type; - pDesc->Usage = wined3ddesc.usage; - pDesc->Pool = wined3ddesc.pool; - pDesc->MultiSampleType = wined3ddesc.multisample_type; - pDesc->MultiSampleQuality = wined3ddesc.multisample_quality; - pDesc->Width = wined3ddesc.width; - pDesc->Height = wined3ddesc.height; + struct wined3d_resource_desc wined3d_desc; + + wined3d_resource_get_desc(sub_resource, &wined3d_desc); + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->MultiSampleType = wined3d_desc.multisample_type; + desc->MultiSampleQuality = wined3d_desc.multisample_quality; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; } + wined3d_mutex_unlock(); return hr; } static HRESULT WINAPI IDirect3DTexture9Impl_GetSurfaceLevel(IDirect3DTexture9 *iface, - UINT Level, IDirect3DSurface9 **ppSurfaceLevel) + UINT level, IDirect3DSurface9 **surface) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; - IWineD3DSurface *mySurface = NULL; - HRESULT hr; + IDirect3DTexture9Impl *texture = impl_from_IDirect3DTexture9(iface); + struct wined3d_resource *sub_resource; - TRACE("iface %p, level %u, surface %p.\n", iface, Level, ppSurfaceLevel); + TRACE("iface %p, level %u, surface %p.\n", iface, level, surface); wined3d_mutex_lock(); - hr = IWineD3DTexture_GetSurfaceLevel(This->wineD3DTexture, Level, &mySurface); - if (SUCCEEDED(hr) && ppSurfaceLevel) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) { - *ppSurfaceLevel = IWineD3DSurface_GetParent(mySurface); - IDirect3DSurface9_AddRef(*ppSurfaceLevel); - IWineD3DSurface_Release(mySurface); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; } + + *surface = wined3d_resource_get_parent(sub_resource); + IDirect3DSurface9_AddRef(*surface); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } -static HRESULT WINAPI IDirect3DTexture9Impl_LockRect(LPDIRECT3DTEXTURE9 iface, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DTexture9Impl_LockRect(IDirect3DTexture9 *iface, + UINT level, D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags) +{ + IDirect3DTexture9Impl *texture = impl_from_IDirect3DTexture9(iface); + struct wined3d_resource *sub_resource; HRESULT hr; TRACE("iface %p, level %u, locked_rect %p, rect %p, flags %#x.\n", - iface, Level, pLockedRect, pRect, Flags); + iface, level, locked_rect, rect, flags); wined3d_mutex_lock(); - hr = IWineD3DTexture_LockRect(This->wineD3DTexture, Level, (WINED3DLOCKED_RECT *) pLockedRect, pRect, Flags); + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface9_LockRect((IDirect3DSurface9 *)wined3d_resource_get_parent(sub_resource), + locked_rect, rect, flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture9Impl_UnlockRect(LPDIRECT3DTEXTURE9 iface, UINT Level) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DTexture9Impl_UnlockRect(IDirect3DTexture9 *iface, UINT level) +{ + IDirect3DTexture9Impl *texture = impl_from_IDirect3DTexture9(iface); + struct wined3d_resource *sub_resource; HRESULT hr; - TRACE("iface %p, level %u.\n", iface, Level); + TRACE("iface %p, level %u.\n", iface, level); wined3d_mutex_lock(); - hr = IWineD3DTexture_UnlockRect(This->wineD3DTexture, Level); + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DSurface9_UnlockRect((IDirect3DSurface9 *)wined3d_resource_get_parent(sub_resource)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DTexture9Impl_AddDirtyRect(LPDIRECT3DTEXTURE9 iface, CONST RECT* pDirtyRect) { - IDirect3DTexture9Impl *This = (IDirect3DTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DTexture9Impl_AddDirtyRect(IDirect3DTexture9 *iface, + const RECT *dirty_rect) +{ + IDirect3DTexture9Impl *texture = impl_from_IDirect3DTexture9(iface); HRESULT hr; - TRACE("iface %p, dirty_rect %p.\n", iface, pDirtyRect); + TRACE("iface %p, dirty_rect %s.\n", + iface, wine_dbgstr_rect(dirty_rect)); wined3d_mutex_lock(); - hr = IWineD3DTexture_AddDirtyRect(This->wineD3DTexture, pDirtyRect); + if (!dirty_rect) + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, 0, NULL); + else + { + WINED3DBOX dirty_region; + + dirty_region.Left = dirty_rect->left; + dirty_region.Top = dirty_rect->top; + dirty_region.Right = dirty_rect->right; + dirty_region.Bottom = dirty_rect->bottom; + dirty_region.Front = 0; + dirty_region.Back = 1; + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, 0, &dirty_region); + } wined3d_mutex_unlock(); return hr; @@ -396,13 +453,13 @@ HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *devic { HRESULT hr; - texture->lpVtbl = &Direct3DTexture9_Vtbl; + texture->IDirect3DTexture9_iface.lpVtbl = &Direct3DTexture9_Vtbl; texture->ref = 1; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateTexture(device->WineD3DDevice, width, height, levels, + hr = wined3d_texture_create_2d(device->wined3d_device, width, height, levels, usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, - texture, &d3d9_texture_wined3d_parent_ops, &texture->wineD3DTexture); + texture, &d3d9_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -410,7 +467,7 @@ HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *devic return hr; } - texture->parentDevice = (IDirect3DDevice9Ex *)device; + texture->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(texture->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/vertexdeclaration.c b/dll/directx/wine/d3d9/vertexdeclaration.c index 88f912f1dba..62246147d3c 100644 --- a/dll/directx/wine/d3d9/vertexdeclaration.c +++ b/dll/directx/wine/d3d9/vertexdeclaration.c @@ -222,7 +222,7 @@ static ULONG WINAPI IDirect3DVertexDeclaration9Impl_AddRef(LPDIRECT3DVERTEXDECLA if (!This->convFVF) { wined3d_mutex_lock(); - IWineD3DVertexDeclaration_AddRef(This->wineD3DVertexDeclaration); + wined3d_vertex_declaration_incref(This->wineD3DVertexDeclaration); wined3d_mutex_unlock(); } } @@ -239,7 +239,7 @@ void IDirect3DVertexDeclaration9Impl_Destroy(LPDIRECT3DVERTEXDECLARATION9 iface) } wined3d_mutex_lock(); - IWineD3DVertexDeclaration_Release(This->wineD3DVertexDeclaration); + wined3d_vertex_declaration_decref(This->wineD3DVertexDeclaration); wined3d_mutex_unlock(); } @@ -395,7 +395,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration, declaration->element_count = element_count; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVertexDeclaration(device->WineD3DDevice, wined3d_elements, wined3d_element_count, + hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count, declaration, &d3d9_vertexdeclaration_wined3d_parent_ops, &declaration->wineD3DVertexDeclaration); wined3d_mutex_unlock(); HeapFree(GetProcessHeap(), 0, wined3d_elements); @@ -406,7 +406,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration, return hr; } - declaration->parentDevice = (IDirect3DDevice9Ex *)device; + declaration->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(declaration->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/d3d9/volume.c b/dll/directx/wine/d3d9/volume.c index 1ecd2b27d29..ba495b644d0 100644 --- a/dll/directx/wine/d3d9/volume.c +++ b/dll/directx/wine/d3d9/volume.c @@ -24,9 +24,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -/* IDirect3DVolume9 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DVolume9Impl_QueryInterface(LPDIRECT3DVOLUME9 iface, REFIID riid, LPVOID* ppobj) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static inline IDirect3DVolume9Impl *impl_from_IDirect3DVolume9(IDirect3DVolume9 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DVolume9Impl, IDirect3DVolume9_iface); +} + +static HRESULT WINAPI IDirect3DVolume9Impl_QueryInterface(IDirect3DVolume9 *iface, REFIID riid, + void **ppobj) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -42,8 +48,9 @@ static HRESULT WINAPI IDirect3DVolume9Impl_QueryInterface(LPDIRECT3DVOLUME9 ifac return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DVolume9Impl_AddRef(LPDIRECT3DVOLUME9 iface) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static ULONG WINAPI IDirect3DVolume9Impl_AddRef(IDirect3DVolume9 *iface) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); TRACE("iface %p.\n", iface); @@ -60,7 +67,7 @@ static ULONG WINAPI IDirect3DVolume9Impl_AddRef(LPDIRECT3DVOLUME9 iface) { if (ref == 1) { wined3d_mutex_lock(); - IWineD3DVolume_AddRef(This->wineD3DVolume); + wined3d_volume_incref(This->wined3d_volume); wined3d_mutex_unlock(); } @@ -68,8 +75,9 @@ static ULONG WINAPI IDirect3DVolume9Impl_AddRef(LPDIRECT3DVOLUME9 iface) { } } -static ULONG WINAPI IDirect3DVolume9Impl_Release(LPDIRECT3DVOLUME9 iface) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static ULONG WINAPI IDirect3DVolume9Impl_Release(IDirect3DVolume9 *iface) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); TRACE("iface %p.\n", iface); @@ -85,7 +93,7 @@ static ULONG WINAPI IDirect3DVolume9Impl_Release(LPDIRECT3DVOLUME9 iface) { if (ref == 0) { wined3d_mutex_lock(); - IWineD3DVolume_Release(This->wineD3DVolume); + wined3d_volume_decref(This->wined3d_volume); wined3d_mutex_unlock(); } @@ -93,10 +101,10 @@ static ULONG WINAPI IDirect3DVolume9Impl_Release(LPDIRECT3DVOLUME9 iface) { } } -/* IDirect3DVolume9 Interface follow: */ -static HRESULT WINAPI IDirect3DVolume9Impl_GetDevice(IDirect3DVolume9 *iface, IDirect3DDevice9 **device) +static HRESULT WINAPI IDirect3DVolume9Impl_GetDevice(IDirect3DVolume9 *iface, + IDirect3DDevice9 **device) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); IDirect3DResource9 *resource; HRESULT hr; @@ -114,65 +122,62 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetDevice(IDirect3DVolume9 *iface, ID return hr; } -static HRESULT WINAPI IDirect3DVolume9Impl_SetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static HRESULT WINAPI IDirect3DVolume9Impl_SetPrivateData(IDirect3DVolume9 *iface, REFGUID refguid, + const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - - hr = IWineD3DVolume_SetPrivateData(This->wineD3DVolume, refguid, pData, SizeOfData, Flags); - + hr = wined3d_volume_set_private_data(This->wined3d_volume, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume9Impl_GetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static HRESULT WINAPI IDirect3DVolume9Impl_GetPrivateData(IDirect3DVolume9 *iface, REFGUID refguid, + void *pData, DWORD *pSizeOfData) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - - hr = IWineD3DVolume_GetPrivateData(This->wineD3DVolume, refguid, pData, pSizeOfData); - + hr = wined3d_volume_get_private_data(This->wined3d_volume, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume9Impl_FreePrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static HRESULT WINAPI IDirect3DVolume9Impl_FreePrivateData(IDirect3DVolume9 *iface, REFGUID refguid) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - - hr = IWineD3DVolume_FreePrivateData(This->wineD3DVolume, refguid); - + hr = wined3d_volume_free_private_data(This->wined3d_volume, refguid); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume9Impl_GetContainer(LPDIRECT3DVOLUME9 iface, REFIID riid, void** ppContainer) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static HRESULT WINAPI IDirect3DVolume9Impl_GetContainer(IDirect3DVolume9 *iface, REFIID riid, + void **ppContainer) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); HRESULT res; TRACE("iface %p, riid %s, container %p.\n", iface, debugstr_guid(riid), ppContainer); if (!This->container) return E_NOINTERFACE; - if (!ppContainer) { - ERR("Called without a valid ppContainer.\n"); - } - res = IUnknown_QueryInterface(This->container, riid, ppContainer); TRACE("Returning ppContainer %p, *ppContainer %p\n", ppContainer, *ppContainer); @@ -180,56 +185,56 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetContainer(LPDIRECT3DVOLUME9 iface, return res; } -static HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_DESC* pDesc) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; - WINED3DVOLUME_DESC wined3ddesc; +static HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(IDirect3DVolume9 *iface, D3DVOLUME_DESC *desc) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; - TRACE("iface %p, desc %p.\n", iface, pDesc); + TRACE("iface %p, desc %p.\n", iface, desc); wined3d_mutex_lock(); - - IWineD3DVolume_GetDesc(This->wineD3DVolume, &wined3ddesc); - + wined3d_resource = wined3d_volume_get_resource(This->wined3d_volume); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); wined3d_mutex_unlock(); - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.Format); - pDesc->Type = wined3ddesc.Type; - pDesc->Usage = wined3ddesc.Usage; - pDesc->Pool = wined3ddesc.Pool; - pDesc->Width = wined3ddesc.Width; - pDesc->Height = wined3ddesc.Height; - pDesc->Depth = wined3ddesc.Depth; + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; + desc->Depth = wined3d_desc.depth; return D3D_OK; } -static HRESULT WINAPI IDirect3DVolume9Impl_LockBox(LPDIRECT3DVOLUME9 iface, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static HRESULT WINAPI IDirect3DVolume9Impl_LockBox(IDirect3DVolume9 *iface, + D3DLOCKED_BOX *pLockedVolume, const D3DBOX *pBox, DWORD Flags) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); HRESULT hr; TRACE("iface %p, locked_box %p, box %p, flags %#x.\n", iface, pLockedVolume, pBox, Flags); wined3d_mutex_lock(); - - hr = IWineD3DVolume_LockBox(This->wineD3DVolume, (WINED3DLOCKED_BOX *)pLockedVolume, + hr = wined3d_volume_map(This->wined3d_volume, (WINED3DLOCKED_BOX *)pLockedVolume, (const WINED3DBOX *)pBox, Flags); - wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolume9Impl_UnlockBox(LPDIRECT3DVOLUME9 iface) { - IDirect3DVolume9Impl *This = (IDirect3DVolume9Impl *)iface; +static HRESULT WINAPI IDirect3DVolume9Impl_UnlockBox(IDirect3DVolume9 *iface) +{ + IDirect3DVolume9Impl *This = impl_from_IDirect3DVolume9(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - hr = IWineD3DVolume_UnlockBox(This->wineD3DVolume); - + hr = wined3d_volume_unmap(This->wined3d_volume); wined3d_mutex_unlock(); return hr; @@ -267,11 +272,11 @@ HRESULT volume_init(IDirect3DVolume9Impl *volume, IDirect3DDevice9Impl *device, { HRESULT hr; - volume->lpVtbl = &Direct3DVolume9_Vtbl; + volume->IDirect3DVolume9_iface.lpVtbl = &Direct3DVolume9_Vtbl; volume->ref = 1; - hr = IWineD3DDevice_CreateVolume(device->WineD3DDevice, width, height, depth, usage & WINED3DUSAGE_MASK, - format, pool, volume, &d3d9_volume_wined3d_parent_ops, &volume->wineD3DVolume); + hr = wined3d_volume_create(device->wined3d_device, width, height, depth, usage & WINED3DUSAGE_MASK, + format, pool, volume, &d3d9_volume_wined3d_parent_ops, &volume->wined3d_volume); if (FAILED(hr)) { WARN("Failed to create wined3d volume, hr %#x.\n", hr); diff --git a/dll/directx/wine/d3d9/volumetexture.c b/dll/directx/wine/d3d9/volumetexture.c index 7ce46237cc3..9528e9b8dd5 100644 --- a/dll/directx/wine/d3d9/volumetexture.c +++ b/dll/directx/wine/d3d9/volumetexture.c @@ -24,9 +24,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -/* IDirect3DVolumeTexture9 IUnknown parts follow: */ -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_QueryInterface(LPDIRECT3DVOLUMETEXTURE9 iface, REFIID riid, LPVOID* ppobj) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static inline IDirect3DVolumeTexture9Impl *impl_from_IDirect3DVolumeTexture9(IDirect3DVolumeTexture9 *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DVolumeTexture9Impl, IDirect3DVolumeTexture9_iface); +} + +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_QueryInterface(IDirect3DVolumeTexture9 *iface, + REFIID riid, void **ppobj) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); @@ -44,8 +50,9 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_QueryInterface(LPDIRECT3DVOLUM return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DVolumeTexture9Impl_AddRef(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static ULONG WINAPI IDirect3DVolumeTexture9Impl_AddRef(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -54,15 +61,16 @@ static ULONG WINAPI IDirect3DVolumeTexture9Impl_AddRef(LPDIRECT3DVOLUMETEXTURE9 { IDirect3DDevice9Ex_AddRef(This->parentDevice); wined3d_mutex_lock(); - IWineD3DVolumeTexture_AddRef(This->wineD3DVolumeTexture); + wined3d_texture_incref(This->wined3d_texture); wined3d_mutex_unlock(); } return ref; } -static ULONG WINAPI IDirect3DVolumeTexture9Impl_Release(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static ULONG WINAPI IDirect3DVolumeTexture9Impl_Release(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -71,7 +79,7 @@ static ULONG WINAPI IDirect3DVolumeTexture9Impl_Release(LPDIRECT3DVOLUMETEXTURE9 IDirect3DDevice9Ex *parentDevice = This->parentDevice; wined3d_mutex_lock(); - IWineD3DVolumeTexture_Release(This->wineD3DVolumeTexture); + wined3d_texture_decref(This->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, as it may cause the device to be destroyed. */ @@ -80,10 +88,10 @@ static ULONG WINAPI IDirect3DVolumeTexture9Impl_Release(LPDIRECT3DVOLUMETEXTURE9 return ref; } -/* IDirect3DVolumeTexture9 IDirect3DResource9 Interface follow: */ -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetDevice(IDirect3DVolumeTexture9 *iface, IDirect3DDevice9 **device) +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetDevice(IDirect3DVolumeTexture9 *iface, + IDirect3DDevice9 **device) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -95,292 +103,291 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetDevice(IDirect3DVolumeTextu return D3D_OK; } -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetPrivateData(IDirect3DVolumeTexture9 *iface, + REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(refguid), pData, SizeOfData, Flags); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_SetPrivateData(This->wineD3DVolumeTexture, refguid, pData, SizeOfData, Flags); - + hr = wined3d_texture_set_private_data(This->wined3d_texture, refguid, pData, SizeOfData, Flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetPrivateData(IDirect3DVolumeTexture9 *iface, + REFGUID refguid, void *pData, DWORD *pSizeOfData) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(refguid), pData, pSizeOfData); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_GetPrivateData(This->wineD3DVolumeTexture, refguid, pData, pSizeOfData); - + hr = wined3d_texture_get_private_data(This->wined3d_texture, refguid, pData, pSizeOfData); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE9 iface, REFGUID refguid) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_FreePrivateData(IDirect3DVolumeTexture9 *iface, + REFGUID refguid) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); HRESULT hr; TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid)); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_FreePrivateData(This->wineD3DVolumeTexture, refguid); - + hr = wined3d_texture_free_private_data(This->wined3d_texture, refguid); wined3d_mutex_unlock(); return hr; } -static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE9 iface, DWORD PriorityNew) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetPriority(IDirect3DVolumeTexture9 *iface, + DWORD PriorityNew) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); DWORD priority; TRACE("iface %p, priority %u.\n", iface, PriorityNew); wined3d_mutex_lock(); - - priority = IWineD3DVolumeTexture_SetPriority(This->wineD3DVolumeTexture, PriorityNew); - + priority = wined3d_texture_set_priority(This->wined3d_texture, PriorityNew); wined3d_mutex_unlock(); return priority; } -static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetPriority(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); DWORD priority; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - priority = IWineD3DVolumeTexture_GetPriority(This->wineD3DVolumeTexture); - + priority = wined3d_texture_get_priority(This->wined3d_texture); wined3d_mutex_unlock(); return priority; } -static void WINAPI IDirect3DVolumeTexture9Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static void WINAPI IDirect3DVolumeTexture9Impl_PreLoad(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - IWineD3DVolumeTexture_PreLoad(This->wineD3DVolumeTexture); - + wined3d_texture_preload(This->wined3d_texture); wined3d_mutex_unlock(); } -static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture9Impl_GetType(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture9Impl_GetType(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); D3DRESOURCETYPE type; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - type = IWineD3DVolumeTexture_GetType(This->wineD3DVolumeTexture); - + type = wined3d_texture_get_type(This->wined3d_texture); wined3d_mutex_unlock(); return type; } -/* IDirect3DVolumeTexture9 IDirect3DBaseTexture9 Interface follow: */ -static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE9 iface, DWORD LODNew) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetLOD(IDirect3DVolumeTexture9 *iface, DWORD LODNew) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); DWORD lod; TRACE("iface %p, lod %u.\n", iface, LODNew); wined3d_mutex_lock(); - - lod = IWineD3DVolumeTexture_SetLOD(This->wineD3DVolumeTexture, LODNew); - + lod = wined3d_texture_set_lod(This->wined3d_texture, LODNew); wined3d_mutex_unlock(); return lod; } -static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLOD(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); DWORD lod; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - lod = IWineD3DVolumeTexture_GetLOD(This->wineD3DVolumeTexture); - + lod = wined3d_texture_get_lod(This->wined3d_texture); wined3d_mutex_unlock(); return lod; } -static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLevelCount(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); DWORD level_count; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - level_count = IWineD3DVolumeTexture_GetLevelCount(This->wineD3DVolumeTexture); - + level_count = wined3d_texture_get_level_count(This->wined3d_texture); wined3d_mutex_unlock(); return level_count; } -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetAutoGenFilterType(LPDIRECT3DVOLUMETEXTURE9 iface, D3DTEXTUREFILTERTYPE FilterType) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetAutoGenFilterType(IDirect3DVolumeTexture9 *iface, + D3DTEXTUREFILTERTYPE FilterType) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); HRESULT hr; TRACE("iface %p, filter_type %#x.\n", iface, FilterType); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_SetAutoGenFilterType(This->wineD3DVolumeTexture, (WINED3DTEXTUREFILTERTYPE) FilterType); - + hr = wined3d_texture_set_autogen_filter_type(This->wined3d_texture, (WINED3DTEXTUREFILTERTYPE)FilterType); wined3d_mutex_unlock(); return hr; } -static D3DTEXTUREFILTERTYPE WINAPI IDirect3DVolumeTexture9Impl_GetAutoGenFilterType(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static D3DTEXTUREFILTERTYPE WINAPI IDirect3DVolumeTexture9Impl_GetAutoGenFilterType(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); D3DTEXTUREFILTERTYPE filter_type; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - filter_type = (D3DTEXTUREFILTERTYPE)IWineD3DVolumeTexture_GetAutoGenFilterType(This->wineD3DVolumeTexture); - + filter_type = (D3DTEXTUREFILTERTYPE)wined3d_texture_get_autogen_filter_type(This->wined3d_texture); wined3d_mutex_unlock(); return filter_type; } -static void WINAPI IDirect3DVolumeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DVOLUMETEXTURE9 iface) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static void WINAPI IDirect3DVolumeTexture9Impl_GenerateMipSubLevels(IDirect3DVolumeTexture9 *iface) +{ + IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - - IWineD3DVolumeTexture_GenerateMipSubLevels(This->wineD3DVolumeTexture); - + wined3d_texture_generate_mipmaps(This->wined3d_texture); wined3d_mutex_unlock(); } -/* IDirect3DVolumeTexture9 Interface follow: */ -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level, D3DVOLUME_DESC* pDesc) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; - WINED3DVOLUME_DESC wined3ddesc; - HRESULT hr; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(IDirect3DVolumeTexture9 *iface, + UINT level, D3DVOLUME_DESC *desc) +{ + IDirect3DVolumeTexture9Impl *texture = impl_from_IDirect3DVolumeTexture9(iface); + struct wined3d_resource *sub_resource; + HRESULT hr = D3D_OK; - TRACE("iface %p, level %u, desc %p.\n", iface, Level, pDesc); + TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_GetLevelDesc(This->wineD3DVolumeTexture, Level, &wined3ddesc); - - wined3d_mutex_unlock(); - - if (SUCCEEDED(hr)) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else { - pDesc->Format = d3dformat_from_wined3dformat(wined3ddesc.Format); - pDesc->Type = wined3ddesc.Type; - pDesc->Usage = wined3ddesc.Usage; - pDesc->Pool = wined3ddesc.Pool; - pDesc->Width = wined3ddesc.Width; - pDesc->Height = wined3ddesc.Height; - pDesc->Depth = wined3ddesc.Depth; + struct wined3d_resource_desc wined3d_desc; + + wined3d_resource_get_desc(sub_resource, &wined3d_desc); + desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format); + desc->Type = wined3d_desc.resource_type; + desc->Usage = wined3d_desc.usage; + desc->Pool = wined3d_desc.pool; + desc->Width = wined3d_desc.width; + desc->Height = wined3d_desc.height; + desc->Depth = wined3d_desc.depth; } + wined3d_mutex_unlock(); return hr; } static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetVolumeLevel(IDirect3DVolumeTexture9 *iface, - UINT Level, IDirect3DVolume9 **ppVolumeLevel) + UINT level, IDirect3DVolume9 **volume) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; - IWineD3DVolume *myVolume = NULL; - HRESULT hr; + IDirect3DVolumeTexture9Impl *texture = impl_from_IDirect3DVolumeTexture9(iface); + struct wined3d_resource *sub_resource; - TRACE("iface %p, level %u, volume %p.\n", iface, Level, ppVolumeLevel); + TRACE("iface %p, level %u, volume %p.\n", iface, level, volume); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_GetVolumeLevel(This->wineD3DVolumeTexture, Level, &myVolume); - if (SUCCEEDED(hr) && ppVolumeLevel) + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) { - *ppVolumeLevel = IWineD3DVolumeTexture_GetParent(myVolume); - IDirect3DVolumeTexture9_AddRef(*ppVolumeLevel); - IWineD3DVolumeTexture_Release(myVolume); + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; } + *volume = wined3d_resource_get_parent(sub_resource); + IDirect3DVolume9_AddRef(*volume); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_LockBox(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_LockBox(IDirect3DVolumeTexture9 *iface, + UINT level, D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags) +{ + IDirect3DVolumeTexture9Impl *texture = impl_from_IDirect3DVolumeTexture9(iface); + struct wined3d_resource *sub_resource; HRESULT hr; TRACE("iface %p, level %u, locked_box %p, box %p, flags %#x.\n", - iface, Level, pLockedVolume, pBox, Flags); + iface, level, locked_box, box, flags); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_LockBox(This->wineD3DVolumeTexture, Level, (WINED3DLOCKED_BOX *)pLockedVolume, - (const WINED3DBOX *)pBox, Flags); - + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DVolume9_LockBox((IDirect3DVolume9 *)wined3d_resource_get_parent(sub_resource), + locked_box, box, flags); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE9 iface, UINT Level) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_UnlockBox(IDirect3DVolumeTexture9 *iface, + UINT level) +{ + IDirect3DVolumeTexture9Impl *texture = impl_from_IDirect3DVolumeTexture9(iface); + struct wined3d_resource *sub_resource; HRESULT hr; - TRACE("iface %p, level %u.\n", iface, Level); + TRACE("iface %p, level %u.\n", iface, level); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_UnlockBox(This->wineD3DVolumeTexture, Level); - + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) + hr = D3DERR_INVALIDCALL; + else + hr = IDirect3DVolume9_UnlockBox((IDirect3DVolume9 *)wined3d_resource_get_parent(sub_resource)); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DVolumeTexture9Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE9 iface, CONST D3DBOX* pDirtyBox) { - IDirect3DVolumeTexture9Impl *This = (IDirect3DVolumeTexture9Impl *)iface; +static HRESULT WINAPI IDirect3DVolumeTexture9Impl_AddDirtyBox(IDirect3DVolumeTexture9 *iface, + const D3DBOX *dirty_box) +{ + IDirect3DVolumeTexture9Impl *texture = impl_from_IDirect3DVolumeTexture9(iface); HRESULT hr; - TRACE("iface %p, dirty_box %p.\n", iface, pDirtyBox); + TRACE("iface %p, dirty_box %p.\n", iface, dirty_box); wined3d_mutex_lock(); - - hr = IWineD3DVolumeTexture_AddDirtyBox(This->wineD3DVolumeTexture, (CONST WINED3DBOX *)pDirtyBox); - + hr = wined3d_texture_add_dirty_region(texture->wined3d_texture, 0, (const WINED3DBOX *)dirty_box); wined3d_mutex_unlock(); return hr; @@ -432,13 +439,13 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice { HRESULT hr; - texture->lpVtbl = &Direct3DVolumeTexture9_Vtbl; + texture->IDirect3DVolumeTexture9_iface.lpVtbl = &Direct3DVolumeTexture9_Vtbl; texture->ref = 1; wined3d_mutex_lock(); - hr = IWineD3DDevice_CreateVolumeTexture(device->WineD3DDevice, width, height, depth, levels, + hr = wined3d_texture_create_3d(device->wined3d_device, width, height, depth, levels, usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture, - &d3d9_volumetexture_wined3d_parent_ops, &texture->wineD3DVolumeTexture); + &d3d9_volumetexture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -446,7 +453,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice return hr; } - texture->parentDevice = (IDirect3DDevice9Ex *)device; + texture->parentDevice = &device->IDirect3DDevice9Ex_iface; IDirect3DDevice9Ex_AddRef(texture->parentDevice); return D3D_OK; diff --git a/dll/directx/wine/ddraw/CMakeLists.txt b/dll/directx/wine/ddraw/CMakeLists.txt index 81732d6678b..b05d1a50343 100644 --- a/dll/directx/wine/ddraw/CMakeLists.txt +++ b/dll/directx/wine/ddraw/CMakeLists.txt @@ -22,7 +22,6 @@ list(APPEND SOURCE main.c material.c palette.c - parent.c regsvr.c stubs.c surface.c @@ -40,7 +39,6 @@ target_link_libraries(ddraw wine uuid dxguid - wined3d_guid ${PSEH_LIB}) add_importlibs(ddraw diff --git a/dll/directx/wine/ddraw/clipper.c b/dll/directx/wine/ddraw/clipper.c index b4c493c4bad..c9290c85a50 100644 --- a/dll/directx/wine/ddraw/clipper.c +++ b/dll/directx/wine/ddraw/clipper.c @@ -95,7 +95,7 @@ static ULONG WINAPI IDirectDrawClipperImpl_Release(IDirectDrawClipper *iface) { if (ref == 0) { EnterCriticalSection(&ddraw_cs); - IWineD3DClipper_Release(This->wineD3DClipper); + wined3d_clipper_decref(This->wineD3DClipper); HeapFree(GetProcessHeap(), 0, This); LeaveCriticalSection(&ddraw_cs); return 0; @@ -127,9 +127,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetHwnd( TRACE("iface %p, flags %#x, window %p.\n", iface, dwFlags, hWnd); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DClipper_SetHWnd(This->wineD3DClipper, - dwFlags, - hWnd); + hr = wined3d_clipper_set_window(This->wineD3DClipper, dwFlags, hWnd); LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -167,10 +165,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetClipList( iface, wine_dbgstr_rect(lpRect), lpClipList, lpdwSize); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DClipper_GetClipList(This->wineD3DClipper, - lpRect, - lpClipList, - lpdwSize); + hr = wined3d_clipper_get_clip_list(This->wineD3DClipper, lpRect, lpClipList, lpdwSize); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -198,9 +193,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetClipList( TRACE("iface %p, clip_list %p, flags %#x.\n", iface, lprgn, dwFlag); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DClipper_SetClipList(This->wineD3DClipper, - lprgn, - dwFlag); + hr = wined3d_clipper_set_clip_list(This->wineD3DClipper, lprgn, dwFlag); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -225,8 +218,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd( TRACE("iface %p, window %p.\n", iface, hWndPtr); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DClipper_GetHWnd(This->wineD3DClipper, - hWndPtr); + hr = wined3d_clipper_get_window(This->wineD3DClipper, hWndPtr); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -307,7 +299,7 @@ HRESULT ddraw_clipper_init(IDirectDrawClipperImpl *clipper) { clipper->lpVtbl = &ddraw_clipper_vtbl; clipper->ref = 1; - clipper->wineD3DClipper = pWineDirect3DCreateClipper(); + clipper->wineD3DClipper = wined3d_clipper_create(); if (!clipper->wineD3DClipper) { WARN("Failed to create wined3d clipper.\n"); diff --git a/dll/directx/wine/ddraw/ddraw.c b/dll/directx/wine/ddraw/ddraw.c index bef9cf0f8a6..0c6ba3c2656 100644 --- a/dll/directx/wine/ddraw/ddraw.c +++ b/dll/directx/wine/ddraw/ddraw.c @@ -46,24 +46,49 @@ const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops = ddraw_null_wined3d_object_destroyed, }; -static inline IDirectDrawImpl *ddraw_from_ddraw1(IDirectDraw *iface) +static inline IDirectDrawImpl *impl_from_IDirectDraw(IDirectDraw *iface) { - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw_vtbl)); + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirectDraw_iface); } -static inline IDirectDrawImpl *ddraw_from_ddraw2(IDirectDraw2 *iface) +static inline IDirectDrawImpl *impl_from_IDirectDraw2(IDirectDraw2 *iface) { - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw2_vtbl)); + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirectDraw2_iface); } -static inline IDirectDrawImpl *ddraw_from_ddraw3(IDirectDraw3 *iface) +static inline IDirectDrawImpl *impl_from_IDirectDraw3(IDirectDraw3 *iface) { - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw3_vtbl)); + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirectDraw3_iface); } -static inline IDirectDrawImpl *ddraw_from_ddraw4(IDirectDraw4 *iface) +static inline IDirectDrawImpl *impl_from_IDirectDraw4(IDirectDraw4 *iface) { - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw4_vtbl)); + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirectDraw4_iface); +} + +static inline IDirectDrawImpl *impl_from_IDirectDraw7(IDirectDraw7 *iface) +{ + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirectDraw7_iface); +} + +static inline IDirectDrawImpl *impl_from_IDirect3D(IDirect3D *iface) +{ + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirect3D_iface); +} + +static inline IDirectDrawImpl *impl_from_IDirect3D2(IDirect3D2 *iface) +{ + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirect3D2_iface); +} + +static inline IDirectDrawImpl *impl_from_IDirect3D3(IDirect3D3 *iface) +{ + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirect3D3_iface); +} + +static inline IDirectDrawImpl *impl_from_IDirect3D7(IDirect3D7 *iface) +{ + return CONTAINING_RECORD(iface, IDirectDrawImpl, IDirect3D7_iface); } /***************************************************************************** @@ -92,7 +117,7 @@ static inline IDirectDrawImpl *ddraw_from_ddraw4(IDirectDraw4 *iface) *****************************************************************************/ static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID refiid, void **obj) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(refiid), obj); @@ -117,7 +142,7 @@ static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID refiid, } else if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) { - *obj = &This->IDirectDraw4_vtbl; + *obj = &This->IDirectDraw4_iface; TRACE("(%p) Returning IDirectDraw4 interface at %p\n", This, *obj); } else if ( IsEqualGUID( &IID_IDirectDraw3, refiid ) ) @@ -130,12 +155,12 @@ static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID refiid, } else if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) { - *obj = &This->IDirectDraw2_vtbl; + *obj = &This->IDirectDraw2_iface; TRACE("(%p) Returning IDirectDraw2 interface at %p\n", This, *obj); } else if ( IsEqualGUID( &IID_IDirectDraw, refiid ) ) { - *obj = &This->IDirectDraw_vtbl; + *obj = &This->IDirectDraw_iface; TRACE("(%p) Returning IDirectDraw interface at %p\n", This, *obj); } @@ -174,33 +199,28 @@ static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID refiid, if ( IsEqualGUID( &IID_IDirect3D , refiid ) ) { This->d3dversion = 1; - *obj = &This->IDirect3D_vtbl; + *obj = &This->IDirect3D_iface; TRACE(" returning Direct3D interface at %p.\n", *obj); } else if ( IsEqualGUID( &IID_IDirect3D2 , refiid ) ) { This->d3dversion = 2; - *obj = &This->IDirect3D2_vtbl; + *obj = &This->IDirect3D2_iface; TRACE(" returning Direct3D2 interface at %p.\n", *obj); } else if ( IsEqualGUID( &IID_IDirect3D3 , refiid ) ) { This->d3dversion = 3; - *obj = &This->IDirect3D3_vtbl; + *obj = &This->IDirect3D3_iface; TRACE(" returning Direct3D3 interface at %p.\n", *obj); } else if(IsEqualGUID( &IID_IDirect3D7 , refiid )) { This->d3dversion = 7; - *obj = &This->IDirect3D7_vtbl; + *obj = &This->IDirect3D7_iface; TRACE(" returning Direct3D7 interface at %p.\n", *obj); } } - else if (IsEqualGUID(refiid, &IID_IWineD3DDeviceParent)) - { - *obj = &This->device_parent_vtbl; - } - /* Unknown interface */ else { @@ -216,58 +236,74 @@ static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID refiid, static HRESULT WINAPI ddraw4_QueryInterface(IDirectDraw4 *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw4(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } static HRESULT WINAPI ddraw3_QueryInterface(IDirectDraw3 *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw3(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } static HRESULT WINAPI ddraw2_QueryInterface(IDirectDraw2 *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw2(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } static HRESULT WINAPI ddraw1_QueryInterface(IDirectDraw *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw1(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } static HRESULT WINAPI d3d7_QueryInterface(IDirect3D7 *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_d3d7(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } static HRESULT WINAPI d3d3_QueryInterface(IDirect3D3 *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_d3d3(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } static HRESULT WINAPI d3d2_QueryInterface(IDirect3D2 *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_d3d2(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } static HRESULT WINAPI d3d1_QueryInterface(IDirect3D *iface, REFIID riid, void **object) { + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - return ddraw7_QueryInterface((IDirectDraw7 *)ddraw_from_d3d1(iface), riid, object); + return ddraw7_QueryInterface(&This->IDirectDraw7_iface, riid, object); } /***************************************************************************** @@ -290,7 +326,7 @@ static HRESULT WINAPI d3d1_QueryInterface(IDirect3D *iface, REFIID riid, void ** *****************************************************************************/ static ULONG WINAPI ddraw7_AddRef(IDirectDraw7 *iface) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); ULONG ref = InterlockedIncrement(&This->ref7); TRACE("%p increasing refcount to %u.\n", This, ref); @@ -302,78 +338,86 @@ static ULONG WINAPI ddraw7_AddRef(IDirectDraw7 *iface) static ULONG WINAPI ddraw4_AddRef(IDirectDraw4 *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw4(iface); - ULONG ref = InterlockedIncrement(&ddraw->ref4); + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + ULONG ref = InterlockedIncrement(&This->ref4); - TRACE("%p increasing refcount to %u.\n", ddraw, ref); + TRACE("%p increasing refcount to %u.\n", This, ref); - if (ref == 1) InterlockedIncrement(&ddraw->numIfaces); + if (ref == 1) InterlockedIncrement(&This->numIfaces); return ref; } static ULONG WINAPI ddraw3_AddRef(IDirectDraw3 *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw3(iface); - ULONG ref = InterlockedIncrement(&ddraw->ref3); + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + ULONG ref = InterlockedIncrement(&This->ref3); - TRACE("%p increasing refcount to %u.\n", ddraw, ref); + TRACE("%p increasing refcount to %u.\n", This, ref); - if (ref == 1) InterlockedIncrement(&ddraw->numIfaces); + if (ref == 1) InterlockedIncrement(&This->numIfaces); return ref; } static ULONG WINAPI ddraw2_AddRef(IDirectDraw2 *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw2(iface); - ULONG ref = InterlockedIncrement(&ddraw->ref2); + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + ULONG ref = InterlockedIncrement(&This->ref2); - TRACE("%p increasing refcount to %u.\n", ddraw, ref); + TRACE("%p increasing refcount to %u.\n", This, ref); - if (ref == 1) InterlockedIncrement(&ddraw->numIfaces); + if (ref == 1) InterlockedIncrement(&This->numIfaces); return ref; } static ULONG WINAPI ddraw1_AddRef(IDirectDraw *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw1(iface); - ULONG ref = InterlockedIncrement(&ddraw->ref1); + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + ULONG ref = InterlockedIncrement(&This->ref1); - TRACE("%p increasing refcount to %u.\n", ddraw, ref); + TRACE("%p increasing refcount to %u.\n", This, ref); - if (ref == 1) InterlockedIncrement(&ddraw->numIfaces); + if (ref == 1) InterlockedIncrement(&This->numIfaces); return ref; } static ULONG WINAPI d3d7_AddRef(IDirect3D7 *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); + TRACE("iface %p.\n", iface); - return ddraw7_AddRef((IDirectDraw7 *)ddraw_from_d3d7(iface)); + return ddraw7_AddRef(&This->IDirectDraw7_iface); } static ULONG WINAPI d3d3_AddRef(IDirect3D3 *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); + TRACE("iface %p.\n", iface); - return ddraw1_AddRef((IDirectDraw *)&ddraw_from_d3d3(iface)->IDirectDraw_vtbl); + return ddraw1_AddRef(&This->IDirectDraw_iface); } static ULONG WINAPI d3d2_AddRef(IDirect3D2 *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); + TRACE("iface %p.\n", iface); - return ddraw1_AddRef((IDirectDraw *)&ddraw_from_d3d2(iface)->IDirectDraw_vtbl); + return ddraw1_AddRef(&This->IDirectDraw_iface); } static ULONG WINAPI d3d1_AddRef(IDirect3D *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p.\n", iface); - return ddraw1_AddRef((IDirectDraw *)&ddraw_from_d3d1(iface)->IDirectDraw_vtbl); + return ddraw1_AddRef(&This->IDirectDraw_iface); } /***************************************************************************** @@ -388,8 +432,8 @@ static ULONG WINAPI d3d1_AddRef(IDirect3D *iface) *****************************************************************************/ static void ddraw_destroy(IDirectDrawImpl *This) { - IDirectDraw7_SetCooperativeLevel((IDirectDraw7 *)This, NULL, DDSCL_NORMAL); - IDirectDraw7_RestoreDisplayMode((IDirectDraw7 *)This); + IDirectDraw7_SetCooperativeLevel(&This->IDirectDraw7_iface, NULL, DDSCL_NORMAL); + IDirectDraw7_RestoreDisplayMode(&This->IDirectDraw7_iface); /* Destroy the device window if we created one */ if(This->devicewindow != 0) @@ -404,8 +448,8 @@ static void ddraw_destroy(IDirectDrawImpl *This) LeaveCriticalSection(&ddraw_cs); /* Release the attached WineD3D stuff */ - IWineD3DDevice_Release(This->wineD3DDevice); - IWineD3D_Release(This->wineD3D); + wined3d_device_decref(This->wined3d_device); + wined3d_decref(This->wineD3D); /* Now free the object */ HeapFree(GetProcessHeap(), 0, This); @@ -420,7 +464,7 @@ static void ddraw_destroy(IDirectDrawImpl *This) *****************************************************************************/ static ULONG WINAPI ddraw7_Release(IDirectDraw7 *iface) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); ULONG ref = InterlockedDecrement(&This->ref7); TRACE("%p decreasing refcount to %u.\n", This, ref); @@ -433,82 +477,90 @@ static ULONG WINAPI ddraw7_Release(IDirectDraw7 *iface) static ULONG WINAPI ddraw4_Release(IDirectDraw4 *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw4(iface); - ULONG ref = InterlockedDecrement(&ddraw->ref4); + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + ULONG ref = InterlockedDecrement(&This->ref4); - TRACE("%p decreasing refcount to %u.\n", ddraw, ref); + TRACE("%p decreasing refcount to %u.\n", This, ref); - if (!ref && !InterlockedDecrement(&ddraw->numIfaces)) - ddraw_destroy(ddraw); + if (!ref && !InterlockedDecrement(&This->numIfaces)) + ddraw_destroy(This); return ref; } static ULONG WINAPI ddraw3_Release(IDirectDraw3 *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw3(iface); - ULONG ref = InterlockedDecrement(&ddraw->ref3); + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + ULONG ref = InterlockedDecrement(&This->ref3); - TRACE("%p decreasing refcount to %u.\n", ddraw, ref); + TRACE("%p decreasing refcount to %u.\n", This, ref); - if (!ref && !InterlockedDecrement(&ddraw->numIfaces)) - ddraw_destroy(ddraw); + if (!ref && !InterlockedDecrement(&This->numIfaces)) + ddraw_destroy(This); return ref; } static ULONG WINAPI ddraw2_Release(IDirectDraw2 *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw2(iface); - ULONG ref = InterlockedDecrement(&ddraw->ref2); + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + ULONG ref = InterlockedDecrement(&This->ref2); - TRACE("%p decreasing refcount to %u.\n", ddraw, ref); + TRACE("%p decreasing refcount to %u.\n", This, ref); - if (!ref && !InterlockedDecrement(&ddraw->numIfaces)) - ddraw_destroy(ddraw); + if (!ref && !InterlockedDecrement(&This->numIfaces)) + ddraw_destroy(This); return ref; } static ULONG WINAPI ddraw1_Release(IDirectDraw *iface) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw1(iface); - ULONG ref = InterlockedDecrement(&ddraw->ref1); + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + ULONG ref = InterlockedDecrement(&This->ref1); - TRACE("%p decreasing refcount to %u.\n", ddraw, ref); + TRACE("%p decreasing refcount to %u.\n", This, ref); - if (!ref && !InterlockedDecrement(&ddraw->numIfaces)) - ddraw_destroy(ddraw); + if (!ref && !InterlockedDecrement(&This->numIfaces)) + ddraw_destroy(This); return ref; } static ULONG WINAPI d3d7_Release(IDirect3D7 *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); + TRACE("iface %p.\n", iface); - return ddraw7_Release((IDirectDraw7 *)ddraw_from_d3d7(iface)); + return ddraw7_Release(&This->IDirectDraw7_iface); } static ULONG WINAPI d3d3_Release(IDirect3D3 *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); + TRACE("iface %p.\n", iface); - return ddraw1_Release((IDirectDraw *)&ddraw_from_d3d3(iface)->IDirectDraw_vtbl); + return ddraw1_Release(&This->IDirectDraw_iface); } static ULONG WINAPI d3d2_Release(IDirect3D2 *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); + TRACE("iface %p.\n", iface); - return ddraw1_Release((IDirectDraw *)&ddraw_from_d3d2(iface)->IDirectDraw_vtbl); + return ddraw1_Release(&This->IDirectDraw_iface); } static ULONG WINAPI d3d1_Release(IDirect3D *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p.\n", iface); - return ddraw1_Release((IDirectDraw *)&ddraw_from_d3d1(iface)->IDirectDraw_vtbl); + return ddraw1_Release(&This->IDirectDraw_iface); } /***************************************************************************** @@ -561,7 +613,7 @@ static ULONG WINAPI d3d1_Release(IDirect3D *iface) *****************************************************************************/ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, DWORD cooplevel) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); HWND window; TRACE("iface %p, window %p, flags %#x.\n", iface, hwnd, cooplevel); @@ -586,21 +638,23 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, if(cooplevel & DDSCL_SETFOCUSWINDOW) { /* This isn't compatible with a lot of flags */ - if(cooplevel & ( DDSCL_MULTITHREADED | - DDSCL_FPUSETUP | - DDSCL_FPUPRESERVE | - DDSCL_ALLOWREBOOT | - DDSCL_ALLOWMODEX | - DDSCL_SETDEVICEWINDOW | - DDSCL_NORMAL | - DDSCL_EXCLUSIVE | - DDSCL_FULLSCREEN ) ) + if(cooplevel & ( DDSCL_MULTITHREADED | + DDSCL_CREATEDEVICEWINDOW | + DDSCL_FPUSETUP | + DDSCL_FPUPRESERVE | + DDSCL_ALLOWREBOOT | + DDSCL_ALLOWMODEX | + DDSCL_SETDEVICEWINDOW | + DDSCL_NORMAL | + DDSCL_EXCLUSIVE | + DDSCL_FULLSCREEN ) ) { TRACE("Called with incompatible flags, returning DDERR_INVALIDPARAMS\n"); LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } - else if( (This->cooperative_level & DDSCL_FULLSCREEN) && window) + + if( (This->cooperative_level & DDSCL_EXCLUSIVE) && window ) { TRACE("Setting DDSCL_SETFOCUSWINDOW with an already set window, returning DDERR_HWNDALREADYSET\n"); LeaveCriticalSection(&ddraw_cs); @@ -620,79 +674,62 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, DestroyWindow(This->devicewindow); This->devicewindow = NULL; } + + LeaveCriticalSection(&ddraw_cs); + return DD_OK; } - /* DDSCL_NORMAL or DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE */ - if(cooplevel & DDSCL_NORMAL) + + if(cooplevel & DDSCL_EXCLUSIVE) { - /* Can't coexist with fullscreen or exclusive */ - if(cooplevel & (DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE) ) + if( !(cooplevel & DDSCL_FULLSCREEN) || !hwnd ) { - TRACE("(%p) DDSCL_NORMAL is not compative with DDSCL_FULLSCREEN or DDSCL_EXCLUSIVE\n", This); + TRACE("(%p) DDSCL_EXCLUSIVE needs DDSCL_FULLSCREEN and a window\n", This); LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } - - /* Switching from fullscreen? */ - if(This->cooperative_level & DDSCL_FULLSCREEN) - { - This->cooperative_level &= ~DDSCL_FULLSCREEN; - This->cooperative_level &= ~DDSCL_EXCLUSIVE; - This->cooperative_level &= ~DDSCL_ALLOWMODEX; - - IWineD3DDevice_ReleaseFocusWindow(This->wineD3DDevice); - } - - /* Don't override focus windows or private device windows */ - if( hwnd && - !(This->focuswindow) && - !(This->devicewindow) && - (hwnd != window) ) - { - This->dest_window = hwnd; - } } - else if(cooplevel & DDSCL_FULLSCREEN) + else if( !(cooplevel & DDSCL_NORMAL) ) { - /* Needs DDSCL_EXCLUSIVE */ - if(!(cooplevel & DDSCL_EXCLUSIVE) ) - { - TRACE("(%p) DDSCL_FULLSCREEN needs DDSCL_EXCLUSIVE\n", This); - LeaveCriticalSection(&ddraw_cs); - return DDERR_INVALIDPARAMS; - } - /* Need a HWND - if(hwnd == 0) - { - TRACE("(%p) DDSCL_FULLSCREEN needs a HWND\n", This); - return DDERR_INVALIDPARAMS; - } - */ - - This->cooperative_level &= ~DDSCL_NORMAL; - - /* Don't override focus windows or private device windows */ - if( hwnd && - !(This->focuswindow) && - !(This->devicewindow) && - (hwnd != window) ) - { - HRESULT hr = IWineD3DDevice_AcquireFocusWindow(This->wineD3DDevice, hwnd); - if (FAILED(hr)) - { - ERR("Failed to acquire focus window, hr %#x.\n", hr); - LeaveCriticalSection(&ddraw_cs); - return hr; - } - This->dest_window = hwnd; - } - } - else if(cooplevel & DDSCL_EXCLUSIVE) - { - TRACE("(%p) DDSCL_EXCLUSIVE needs DDSCL_FULLSCREEN\n", This); + TRACE("(%p) SetCooperativeLevel needs at least SetFocusWindow or Exclusive or Normal mode\n", This); LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } + if ((This->cooperative_level & DDSCL_EXCLUSIVE) + && (hwnd != window || !(cooplevel & DDSCL_EXCLUSIVE))) + wined3d_device_release_focus_window(This->wined3d_device); + + if ((cooplevel & DDSCL_FULLSCREEN) != (This->cooperative_level & DDSCL_FULLSCREEN) || hwnd != window) + { + if (This->cooperative_level & DDSCL_FULLSCREEN) + wined3d_device_restore_fullscreen_window(This->wined3d_device, window); + + if (cooplevel & DDSCL_FULLSCREEN) + { + WINED3DDISPLAYMODE display_mode; + + wined3d_get_adapter_display_mode(This->wineD3D, WINED3DADAPTER_DEFAULT, &display_mode); + wined3d_device_setup_fullscreen_window(This->wined3d_device, hwnd, + display_mode.Width, display_mode.Height); + } + } + + if ((cooplevel & DDSCL_EXCLUSIVE) + && (hwnd != window || !(This->cooperative_level & DDSCL_EXCLUSIVE))) + { + HRESULT hr = wined3d_device_acquire_focus_window(This->wined3d_device, hwnd); + if (FAILED(hr)) + { + ERR("Failed to acquire focus window, hr %#x.\n", hr); + LeaveCriticalSection(&ddraw_cs); + return hr; + } + } + + /* Don't override focus windows or private device windows */ + if (hwnd && !This->focuswindow && !This->devicewindow && (hwnd != window)) + This->dest_window = hwnd; + if(cooplevel & DDSCL_CREATEDEVICEWINDOW) { /* Don't create a device window if a focus window is set */ @@ -716,11 +753,8 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, } } - if(cooplevel & DDSCL_MULTITHREADED && !(This->cooperative_level & DDSCL_MULTITHREADED)) - { - /* Enable thread safety in wined3d */ - IWineD3DDevice_SetMultithreaded(This->wineD3DDevice); - } + if (cooplevel & DDSCL_MULTITHREADED && !(This->cooperative_level & DDSCL_MULTITHREADED)) + wined3d_device_set_multithreaded(This->wined3d_device); /* Unhandled flags */ if(cooplevel & DDSCL_ALLOWREBOOT) @@ -731,7 +765,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, WARN("(%p) Unhandled flag DDSCL_FPUSETUP, harmless\n", This); /* Store the cooperative_level */ - This->cooperative_level |= cooplevel; + This->cooperative_level = cooplevel; TRACE("SetCooperativeLevel retuning DD_OK\n"); LeaveCriticalSection(&ddraw_cs); return DD_OK; @@ -739,30 +773,38 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, static HRESULT WINAPI ddraw4_SetCooperativeLevel(IDirectDraw4 *iface, HWND window, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); - return ddraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw4(iface), window, flags); + return ddraw7_SetCooperativeLevel(&This->IDirectDraw7_iface, window, flags); } static HRESULT WINAPI ddraw3_SetCooperativeLevel(IDirectDraw3 *iface, HWND window, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); - return ddraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw3(iface), window, flags); + return ddraw7_SetCooperativeLevel(&This->IDirectDraw7_iface, window, flags); } static HRESULT WINAPI ddraw2_SetCooperativeLevel(IDirectDraw2 *iface, HWND window, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); - return ddraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw2(iface), window, flags); + return ddraw7_SetCooperativeLevel(&This->IDirectDraw7_iface, window, flags); } static HRESULT WINAPI ddraw1_SetCooperativeLevel(IDirectDraw *iface, HWND window, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); - return ddraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw1(iface), window, flags); + return ddraw7_SetCooperativeLevel(&This->IDirectDraw7_iface, window, flags); } /***************************************************************************** @@ -777,15 +819,15 @@ static HRESULT WINAPI ddraw1_SetCooperativeLevel(IDirectDraw *iface, HWND window * ddraw7_SetDisplayMode. * *****************************************************************************/ -static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD Height, +static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD Height, DWORD BPP, DWORD RefreshRate, DWORD Flags) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + enum wined3d_format_id format; WINED3DDISPLAYMODE Mode; HRESULT hr; - TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", - iface, Width, Height, BPP, RefreshRate, Flags); + TRACE("ddraw %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", ddraw, Width, + Height, BPP, RefreshRate, Flags); EnterCriticalSection(&ddraw_cs); if( !Width || !Height ) @@ -796,8 +838,32 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He return DD_OK; } + switch(BPP) + { + case 8: format = WINED3DFMT_P8_UINT; break; + case 15: format = WINED3DFMT_B5G5R5X1_UNORM; break; + case 16: format = WINED3DFMT_B5G6R5_UNORM; break; + case 24: format = WINED3DFMT_B8G8R8_UNORM; break; + case 32: format = WINED3DFMT_B8G8R8X8_UNORM; break; + default: format = WINED3DFMT_UNKNOWN; break; + } + + if (FAILED(hr = wined3d_device_get_display_mode(ddraw->wined3d_device, 0, &Mode))) + { + ERR("Failed to get current display mode, hr %#x.\n", hr); + } + else if (Mode.Width == Width + && Mode.Height == Height + && Mode.Format == format + && Mode.RefreshRate == RefreshRate) + { + TRACE("Skipping redundant mode setting call.\n"); + LeaveCriticalSection(&ddraw_cs); + return DD_OK; + } + /* Check the exclusive mode - if(!(This->cooperative_level & DDSCL_EXCLUSIVE)) + if(!(ddraw->cooperative_level & DDSCL_EXCLUSIVE)) return DDERR_NOEXCLUSIVEMODE; * This is WRONG. Don't know if the SDK is completely * wrong and if there are any conditions when DDERR_NOEXCLUSIVE @@ -808,14 +874,7 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He Mode.Width = Width; Mode.Height = Height; Mode.RefreshRate = RefreshRate; - switch(BPP) - { - case 8: Mode.Format = WINED3DFMT_P8_UINT; break; - case 15: Mode.Format = WINED3DFMT_B5G5R5X1_UNORM; break; - case 16: Mode.Format = WINED3DFMT_B5G6R5_UNORM; break; - case 24: Mode.Format = WINED3DFMT_B8G8R8_UNORM; break; - case 32: Mode.Format = WINED3DFMT_B8G8R8X8_UNORM; break; - } + Mode.Format = format; /* TODO: The possible return values from msdn suggest that * the screen mode can't be changed if a surface is locked @@ -823,9 +882,14 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He */ /* TODO: Lose the primary surface */ - hr = IWineD3DDevice_SetDisplayMode(This->wineD3DDevice, - 0, /* First swapchain */ - &Mode); + hr = wined3d_device_set_display_mode(ddraw->wined3d_device, 0, &Mode); + + if (ddraw->cooperative_level & DDSCL_EXCLUSIVE) + { + wined3d_device_restore_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window); + wined3d_device_setup_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window, Width, Height); + } + LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -859,6 +923,8 @@ static HRESULT ddraw_set_display_mode(IDirectDraw7 *iface, DWORD Width, DWORD He static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD Width, DWORD Height, DWORD BPP, DWORD RefreshRate, DWORD Flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); + TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", iface, Width, Height, BPP, RefreshRate, Flags); @@ -869,44 +935,49 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD Width, DW RefreshRate = force_refresh_rate; } - return ddraw_set_display_mode(iface, Width, Height, BPP, RefreshRate, Flags); + return ddraw_set_display_mode(This, Width, Height, BPP, RefreshRate, Flags); } -static HRESULT WINAPI ddraw4_SetDisplayMode(IDirectDraw4 *iface, - DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags) +static HRESULT WINAPI ddraw4_SetDisplayMode(IDirectDraw4 *iface, DWORD width, DWORD height, + DWORD bpp, DWORD refresh_rate, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", iface, width, height, bpp, refresh_rate, flags); - return ddraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw4(iface), - width, height, bpp, refresh_rate, flags); + return ddraw7_SetDisplayMode(&This->IDirectDraw7_iface, width, height, bpp, refresh_rate, flags); } -static HRESULT WINAPI ddraw3_SetDisplayMode(IDirectDraw3 *iface, - DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags) +static HRESULT WINAPI ddraw3_SetDisplayMode(IDirectDraw3 *iface, DWORD width, DWORD height, + DWORD bpp, DWORD refresh_rate, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", iface, width, height, bpp, refresh_rate, flags); - return ddraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw3(iface), - width, height, bpp, refresh_rate, flags); + return ddraw7_SetDisplayMode(&This->IDirectDraw7_iface, width, height, bpp, refresh_rate, flags); } static HRESULT WINAPI ddraw2_SetDisplayMode(IDirectDraw2 *iface, DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", iface, width, height, bpp, refresh_rate, flags); - return ddraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw2(iface), - width, height, bpp, refresh_rate, flags); + return ddraw7_SetDisplayMode(&This->IDirectDraw7_iface, width, height, bpp, refresh_rate, flags); } static HRESULT WINAPI ddraw1_SetDisplayMode(IDirectDraw *iface, DWORD width, DWORD height, DWORD bpp) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, width %u, height %u, bpp %u.\n", iface, width, height, bpp); - return ddraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw1(iface), width, height, bpp, 0, 0); + return ddraw7_SetDisplayMode(&This->IDirectDraw7_iface, width, height, bpp, 0, 0); } /***************************************************************************** @@ -932,39 +1003,47 @@ static HRESULT WINAPI ddraw1_SetDisplayMode(IDirectDraw *iface, DWORD width, DWO *****************************************************************************/ static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); TRACE("iface %p.\n", iface); - return ddraw_set_display_mode(iface, This->orig_width, This->orig_height, This->orig_bpp, 0, 0); + return ddraw_set_display_mode(This, This->orig_width, This->orig_height, This->orig_bpp, 0, 0); } static HRESULT WINAPI ddraw4_RestoreDisplayMode(IDirectDraw4 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p.\n", iface); - return ddraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw4(iface)); + return ddraw7_RestoreDisplayMode(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw3_RestoreDisplayMode(IDirectDraw3 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p.\n", iface); - return ddraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw3(iface)); + return ddraw7_RestoreDisplayMode(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw2_RestoreDisplayMode(IDirectDraw2 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p.\n", iface); - return ddraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw2(iface)); + return ddraw7_RestoreDisplayMode(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw1_RestoreDisplayMode(IDirectDraw *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p.\n", iface); - return ddraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw1(iface)); + return ddraw7_RestoreDisplayMode(&This->IDirectDraw7_iface); } /***************************************************************************** @@ -984,12 +1063,11 @@ static HRESULT WINAPI ddraw1_RestoreDisplayMode(IDirectDraw *iface) *****************************************************************************/ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DDCAPS *HELCaps) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); DDCAPS caps; WINED3DCAPS winecaps; HRESULT hr; DDSCAPS2 ddscaps = {0, 0, 0, {0}}; - TRACE("(%p)->(%p,%p)\n", This, DriverCaps, HELCaps); TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, DriverCaps, HELCaps); @@ -1004,8 +1082,9 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD memset(&winecaps, 0, sizeof(winecaps)); caps.dwSize = sizeof(caps); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetDeviceCaps(This->wineD3DDevice, &winecaps); - if(FAILED(hr)) { + hr = wined3d_device_get_device_caps(This->wined3d_device, &winecaps); + if (FAILED(hr)) + { WARN("IWineD3DDevice::GetDeviceCaps failed\n"); LeaveCriticalSection(&ddraw_cs); return hr; @@ -1071,30 +1150,38 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD static HRESULT WINAPI ddraw4_GetCaps(IDirectDraw4 *iface, DDCAPS *driver_caps, DDCAPS *hel_caps) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, driver_caps, hel_caps); - return ddraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw4(iface), driver_caps, hel_caps); + return ddraw7_GetCaps(&This->IDirectDraw7_iface, driver_caps, hel_caps); } static HRESULT WINAPI ddraw3_GetCaps(IDirectDraw3 *iface, DDCAPS *driver_caps, DDCAPS *hel_caps) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, driver_caps, hel_caps); - return ddraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw3(iface), driver_caps, hel_caps); + return ddraw7_GetCaps(&This->IDirectDraw7_iface, driver_caps, hel_caps); } static HRESULT WINAPI ddraw2_GetCaps(IDirectDraw2 *iface, DDCAPS *driver_caps, DDCAPS *hel_caps) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, driver_caps, hel_caps); - return ddraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw2(iface), driver_caps, hel_caps); + return ddraw7_GetCaps(&This->IDirectDraw7_iface, driver_caps, hel_caps); } static HRESULT WINAPI ddraw1_GetCaps(IDirectDraw *iface, DDCAPS *driver_caps, DDCAPS *hel_caps) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, driver_caps, hel_caps); - return ddraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw1(iface), driver_caps, hel_caps); + return ddraw7_GetCaps(&This->IDirectDraw7_iface, driver_caps, hel_caps); } /***************************************************************************** @@ -1115,30 +1202,38 @@ static HRESULT WINAPI ddraw7_Compact(IDirectDraw7 *iface) static HRESULT WINAPI ddraw4_Compact(IDirectDraw4 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p.\n", iface); - return ddraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw4(iface)); + return ddraw7_Compact(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw3_Compact(IDirectDraw3 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p.\n", iface); - return ddraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw3(iface)); + return ddraw7_Compact(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw2_Compact(IDirectDraw2 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p.\n", iface); - return ddraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw2(iface)); + return ddraw7_Compact(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw1_Compact(IDirectDraw *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p.\n", iface); - return ddraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw1(iface)); + return ddraw7_Compact(&This->IDirectDraw7_iface); } /***************************************************************************** @@ -1157,7 +1252,7 @@ static HRESULT WINAPI ddraw1_Compact(IDirectDraw *iface) *****************************************************************************/ static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2 *DDSD) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); HRESULT hr; WINED3DDISPLAYMODE Mode; DWORD Size; @@ -1173,12 +1268,9 @@ static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2 } /* The necessary members of LPDDSURFACEDESC and LPDDSURFACEDESC2 are equal, - * so one method can be used for all versions (Hopefully) - */ - hr = IWineD3DDevice_GetDisplayMode(This->wineD3DDevice, - 0 /* swapchain 0 */, - &Mode); - if( hr != D3D_OK ) + * so one method can be used for all versions (Hopefully) */ + hr = wined3d_device_get_display_mode(This->wined3d_device, 0, &Mode); + if (FAILED(hr)) { ERR(" (%p) IWineD3DDevice::GetDisplayMode returned %08x\n", This, hr); LeaveCriticalSection(&ddraw_cs); @@ -1210,30 +1302,38 @@ static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2 static HRESULT WINAPI ddraw4_GetDisplayMode(IDirectDraw4 *iface, DDSURFACEDESC2 *surface_desc) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, surface_desc %p.\n", iface, surface_desc); - return ddraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw4(iface), surface_desc); + return ddraw7_GetDisplayMode(&This->IDirectDraw7_iface, surface_desc); } static HRESULT WINAPI ddraw3_GetDisplayMode(IDirectDraw3 *iface, DDSURFACEDESC *surface_desc) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, surface_desc %p.\n", iface, surface_desc); - return ddraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw3(iface), (DDSURFACEDESC2 *)surface_desc); + return ddraw7_GetDisplayMode(&This->IDirectDraw7_iface, (DDSURFACEDESC2 *)surface_desc); } static HRESULT WINAPI ddraw2_GetDisplayMode(IDirectDraw2 *iface, DDSURFACEDESC *surface_desc) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, surface_desc %p.\n", iface, surface_desc); - return ddraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw2(iface), (DDSURFACEDESC2 *)surface_desc); + return ddraw7_GetDisplayMode(&This->IDirectDraw7_iface, (DDSURFACEDESC2 *)surface_desc); } static HRESULT WINAPI ddraw1_GetDisplayMode(IDirectDraw *iface, DDSURFACEDESC *surface_desc) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, surface_desc %p.\n", iface, surface_desc); - return ddraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw1(iface), (DDSURFACEDESC2 *)surface_desc); + return ddraw7_GetDisplayMode(&This->IDirectDraw7_iface, (DDSURFACEDESC2 *)surface_desc); } /***************************************************************************** @@ -1255,7 +1355,7 @@ static HRESULT WINAPI ddraw1_GetDisplayMode(IDirectDraw *iface, DDSURFACEDESC *s *****************************************************************************/ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes, DWORD *Codes) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); static const enum wined3d_format_id formats[] = { WINED3DFMT_YUY2, WINED3DFMT_UYVY, WINED3DFMT_YV12, @@ -1269,28 +1369,21 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes TRACE("iface %p, codes_count %p, codes %p.\n", iface, NumCodes, Codes); - IWineD3DDevice_GetDisplayMode(This->wineD3DDevice, - 0 /* swapchain 0 */, - &d3ddm); + wined3d_device_get_display_mode(This->wined3d_device, 0, &d3ddm); outsize = NumCodes && Codes ? *NumCodes : 0; if(type == SURFACE_UNKNOWN) type = SURFACE_GDI; - for(i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { - hr = IWineD3D_CheckDeviceFormat(This->wineD3D, - WINED3DADAPTER_DEFAULT, - WINED3DDEVTYPE_HAL, - d3ddm.Format /* AdapterFormat */, - 0 /* usage */, - WINED3DRTYPE_SURFACE, - formats[i], - type); - if(SUCCEEDED(hr)) { - if(count < outsize) { + for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); ++i) + { + hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, WINED3DDEVTYPE_HAL, + d3ddm.Format, 0, WINED3DRTYPE_SURFACE, formats[i], type); + if (SUCCEEDED(hr)) + { + if (count < outsize) Codes[count] = formats[i]; - } - count++; + ++count; } } if(NumCodes) { @@ -1303,30 +1396,38 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes static HRESULT WINAPI ddraw4_GetFourCCCodes(IDirectDraw4 *iface, DWORD *codes_count, DWORD *codes) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, codes_count %p, codes %p.\n", iface, codes_count, codes); - return ddraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw4(iface), codes_count, codes); + return ddraw7_GetFourCCCodes(&This->IDirectDraw7_iface, codes_count, codes); } static HRESULT WINAPI ddraw3_GetFourCCCodes(IDirectDraw3 *iface, DWORD *codes_count, DWORD *codes) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, codes_count %p, codes %p.\n", iface, codes_count, codes); - return ddraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw3(iface), codes_count, codes); + return ddraw7_GetFourCCCodes(&This->IDirectDraw7_iface, codes_count, codes); } static HRESULT WINAPI ddraw2_GetFourCCCodes(IDirectDraw2 *iface, DWORD *codes_count, DWORD *codes) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, codes_count %p, codes %p.\n", iface, codes_count, codes); - return ddraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw2(iface), codes_count, codes); + return ddraw7_GetFourCCCodes(&This->IDirectDraw7_iface, codes_count, codes); } static HRESULT WINAPI ddraw1_GetFourCCCodes(IDirectDraw *iface, DWORD *codes_count, DWORD *codes) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, codes_count %p, codes %p.\n", iface, codes_count, codes); - return ddraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw1(iface), codes_count, codes); + return ddraw7_GetFourCCCodes(&This->IDirectDraw7_iface, codes_count, codes); } /***************************************************************************** @@ -1356,30 +1457,38 @@ static HRESULT WINAPI ddraw7_GetMonitorFrequency(IDirectDraw7 *iface, DWORD *Fre static HRESULT WINAPI ddraw4_GetMonitorFrequency(IDirectDraw4 *iface, DWORD *frequency) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, frequency %p.\n", iface, frequency); - return ddraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw4(iface), frequency); + return ddraw7_GetMonitorFrequency(&This->IDirectDraw7_iface, frequency); } static HRESULT WINAPI ddraw3_GetMonitorFrequency(IDirectDraw3 *iface, DWORD *frequency) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, frequency %p.\n", iface, frequency); - return ddraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw3(iface), frequency); + return ddraw7_GetMonitorFrequency(&This->IDirectDraw7_iface, frequency); } static HRESULT WINAPI ddraw2_GetMonitorFrequency(IDirectDraw2 *iface, DWORD *frequency) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, frequency %p.\n", iface, frequency); - return ddraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw2(iface), frequency); + return ddraw7_GetMonitorFrequency(&This->IDirectDraw7_iface, frequency); } static HRESULT WINAPI ddraw1_GetMonitorFrequency(IDirectDraw *iface, DWORD *frequency) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, frequency %p.\n", iface, frequency); - return ddraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw1(iface), frequency); + return ddraw7_GetMonitorFrequency(&This->IDirectDraw7_iface, frequency); } /***************************************************************************** @@ -1398,7 +1507,7 @@ static HRESULT WINAPI ddraw1_GetMonitorFrequency(IDirectDraw *iface, DWORD *freq *****************************************************************************/ static HRESULT WINAPI ddraw7_GetVerticalBlankStatus(IDirectDraw7 *iface, BOOL *status) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); TRACE("iface %p, status %p.\n", iface, status); @@ -1418,30 +1527,38 @@ static HRESULT WINAPI ddraw7_GetVerticalBlankStatus(IDirectDraw7 *iface, BOOL *s static HRESULT WINAPI ddraw4_GetVerticalBlankStatus(IDirectDraw4 *iface, BOOL *status) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, status %p.\n", iface, status); - return ddraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw4(iface), status); + return ddraw7_GetVerticalBlankStatus(&This->IDirectDraw7_iface, status); } static HRESULT WINAPI ddraw3_GetVerticalBlankStatus(IDirectDraw3 *iface, BOOL *status) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, status %p.\n", iface, status); - return ddraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw3(iface), status); + return ddraw7_GetVerticalBlankStatus(&This->IDirectDraw7_iface, status); } static HRESULT WINAPI ddraw2_GetVerticalBlankStatus(IDirectDraw2 *iface, BOOL *status) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, status %p.\n", iface, status); - return ddraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw2(iface), status); + return ddraw7_GetVerticalBlankStatus(&This->IDirectDraw7_iface, status); } static HRESULT WINAPI ddraw1_GetVerticalBlankStatus(IDirectDraw *iface, BOOL *status) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, status %p.\n", iface, status); - return ddraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw1(iface), status); + return ddraw7_GetVerticalBlankStatus(&This->IDirectDraw7_iface, status); } /***************************************************************************** @@ -1459,9 +1576,10 @@ static HRESULT WINAPI ddraw1_GetVerticalBlankStatus(IDirectDraw *iface, BOOL *st * DDERR_INVALIDPARAMS of free and total are NULL * *****************************************************************************/ -static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *Caps, DWORD *total, DWORD *free) +static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *Caps, DWORD *total, + DWORD *free) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); TRACE("iface %p, caps %p, total %p, free %p.\n", iface, Caps, total, free); @@ -1483,8 +1601,10 @@ static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *C return DDERR_INVALIDPARAMS; } - if(total) *total = This->total_vidmem; - if(free) *free = IWineD3DDevice_GetAvailableTextureMem(This->wineD3DDevice); + if (total) + *total = This->total_vidmem; + if (free) + *free = wined3d_device_get_available_texture_mem(This->wined3d_device); LeaveCriticalSection(&ddraw_cs); return DD_OK; @@ -1493,31 +1613,35 @@ static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *C static HRESULT WINAPI ddraw4_GetAvailableVidMem(IDirectDraw4 *iface, DDSCAPS2 *caps, DWORD *total, DWORD *free) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, caps %p, total %p, free %p.\n", iface, caps, total, free); - return ddraw7_GetAvailableVidMem((IDirectDraw7 *)ddraw_from_ddraw4(iface), caps, total, free); + return ddraw7_GetAvailableVidMem(&This->IDirectDraw7_iface, caps, total, free); } -static HRESULT WINAPI ddraw3_GetAvailableVidMem(IDirectDraw3 *iface, - DDSCAPS *caps, DWORD *total, DWORD *free) +static HRESULT WINAPI ddraw3_GetAvailableVidMem(IDirectDraw3 *iface, DDSCAPS *caps, DWORD *total, + DWORD *free) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); DDSCAPS2 caps2; TRACE("iface %p, caps %p, total %p, free %p.\n", iface, caps, total, free); DDRAW_Convert_DDSCAPS_1_To_2(caps, &caps2); - return ddraw7_GetAvailableVidMem((IDirectDraw7 *)ddraw_from_ddraw3(iface), &caps2, total, free); + return ddraw7_GetAvailableVidMem(&This->IDirectDraw7_iface, &caps2, total, free); } static HRESULT WINAPI ddraw2_GetAvailableVidMem(IDirectDraw2 *iface, DDSCAPS *caps, DWORD *total, DWORD *free) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); DDSCAPS2 caps2; TRACE("iface %p, caps %p, total %p, free %p.\n", iface, caps, total, free); DDRAW_Convert_DDSCAPS_1_To_2(caps, &caps2); - return ddraw7_GetAvailableVidMem((IDirectDraw7 *)ddraw_from_ddraw2(iface), &caps2, total, free); + return ddraw7_GetAvailableVidMem(&This->IDirectDraw7_iface, &caps2, total, free); } /***************************************************************************** @@ -1536,7 +1660,7 @@ static HRESULT WINAPI ddraw2_GetAvailableVidMem(IDirectDraw2 *iface, *****************************************************************************/ static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *Guid) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); TRACE("iface %p, guid %s.\n", iface, debugstr_guid(Guid)); @@ -1552,30 +1676,38 @@ static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *Guid) static HRESULT WINAPI ddraw4_Initialize(IDirectDraw4 *iface, GUID *guid) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - return ddraw7_Initialize((IDirectDraw7 *)ddraw_from_ddraw4(iface), guid); + return ddraw7_Initialize(&This->IDirectDraw7_iface, guid); } static HRESULT WINAPI ddraw3_Initialize(IDirectDraw3 *iface, GUID *guid) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - return ddraw7_Initialize((IDirectDraw7 *)ddraw_from_ddraw3(iface), guid); + return ddraw7_Initialize(&This->IDirectDraw7_iface, guid); } static HRESULT WINAPI ddraw2_Initialize(IDirectDraw2 *iface, GUID *guid) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - return ddraw7_Initialize((IDirectDraw7 *)ddraw_from_ddraw2(iface), guid); + return ddraw7_Initialize(&This->IDirectDraw7_iface, guid); } static HRESULT WINAPI ddraw1_Initialize(IDirectDraw *iface, GUID *guid) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - return ddraw7_Initialize((IDirectDraw7 *)ddraw_from_ddraw1(iface), guid); + return ddraw7_Initialize(&This->IDirectDraw7_iface, guid); } static HRESULT WINAPI d3d1_Initialize(IDirect3D *iface, REFIID riid) @@ -1607,30 +1739,38 @@ static HRESULT WINAPI ddraw7_FlipToGDISurface(IDirectDraw7 *iface) static HRESULT WINAPI ddraw4_FlipToGDISurface(IDirectDraw4 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p.\n", iface); - return ddraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw4(iface)); + return ddraw7_FlipToGDISurface(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw3_FlipToGDISurface(IDirectDraw3 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p.\n", iface); - return ddraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw3(iface)); + return ddraw7_FlipToGDISurface(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw2_FlipToGDISurface(IDirectDraw2 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p.\n", iface); - return ddraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw2(iface)); + return ddraw7_FlipToGDISurface(&This->IDirectDraw7_iface); } static HRESULT WINAPI ddraw1_FlipToGDISurface(IDirectDraw *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p.\n", iface); - return ddraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw1(iface)); + return ddraw7_FlipToGDISurface(&This->IDirectDraw7_iface); } /***************************************************************************** @@ -1672,30 +1812,38 @@ static HRESULT WINAPI ddraw7_WaitForVerticalBlank(IDirectDraw7 *iface, DWORD Fla static HRESULT WINAPI ddraw4_WaitForVerticalBlank(IDirectDraw4 *iface, DWORD flags, HANDLE event) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); - return ddraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw4(iface), flags, event); + return ddraw7_WaitForVerticalBlank(&This->IDirectDraw7_iface, flags, event); } static HRESULT WINAPI ddraw3_WaitForVerticalBlank(IDirectDraw3 *iface, DWORD flags, HANDLE event) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); - return ddraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw3(iface), flags, event); + return ddraw7_WaitForVerticalBlank(&This->IDirectDraw7_iface, flags, event); } static HRESULT WINAPI ddraw2_WaitForVerticalBlank(IDirectDraw2 *iface, DWORD flags, HANDLE event) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); - return ddraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw2(iface), flags, event); + return ddraw7_WaitForVerticalBlank(&This->IDirectDraw7_iface, flags, event); } static HRESULT WINAPI ddraw1_WaitForVerticalBlank(IDirectDraw *iface, DWORD flags, HANDLE event) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); - return ddraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw1(iface), flags, event); + return ddraw7_WaitForVerticalBlank(&This->IDirectDraw7_iface, flags, event); } /***************************************************************************** @@ -1712,7 +1860,7 @@ static HRESULT WINAPI ddraw1_WaitForVerticalBlank(IDirectDraw *iface, DWORD flag *****************************************************************************/ static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); static BOOL hide = FALSE; WINED3DDISPLAYMODE Mode; @@ -1726,9 +1874,7 @@ static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline) hide = TRUE; } - IWineD3DDevice_GetDisplayMode(This->wineD3DDevice, - 0, - &Mode); + wined3d_device_get_display_mode(This->wined3d_device, 0, &Mode); /* Fake the line sweeping of the monitor */ /* FIXME: We should synchronize with a source to keep the refresh rate */ @@ -1743,30 +1889,38 @@ static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline) static HRESULT WINAPI ddraw4_GetScanLine(IDirectDraw4 *iface, DWORD *line) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, line %p.\n", iface, line); - return ddraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw4(iface), line); + return ddraw7_GetScanLine(&This->IDirectDraw7_iface, line); } static HRESULT WINAPI ddraw3_GetScanLine(IDirectDraw3 *iface, DWORD *line) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, line %p.\n", iface, line); - return ddraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw3(iface), line); + return ddraw7_GetScanLine(&This->IDirectDraw7_iface, line); } static HRESULT WINAPI ddraw2_GetScanLine(IDirectDraw2 *iface, DWORD *line) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, line %p.\n", iface, line); - return ddraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw2(iface), line); + return ddraw7_GetScanLine(&This->IDirectDraw7_iface, line); } static HRESULT WINAPI ddraw1_GetScanLine(IDirectDraw *iface, DWORD *line) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, line %p.\n", iface, line); - return ddraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw1(iface), line); + return ddraw7_GetScanLine(&This->IDirectDraw7_iface, line); } /***************************************************************************** @@ -1790,9 +1944,11 @@ static HRESULT WINAPI ddraw7_TestCooperativeLevel(IDirectDraw7 *iface) static HRESULT WINAPI ddraw4_TestCooperativeLevel(IDirectDraw4 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p.\n", iface); - return ddraw7_TestCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw4(iface)); + return ddraw7_TestCooperativeLevel(&This->IDirectDraw7_iface); } /***************************************************************************** @@ -1811,8 +1967,8 @@ static HRESULT WINAPI ddraw4_TestCooperativeLevel(IDirectDraw4 *iface) *****************************************************************************/ static HRESULT WINAPI ddraw7_GetGDISurface(IDirectDraw7 *iface, IDirectDrawSurface7 **GDISurface) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; - IWineD3DSurface *Surf; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); + struct wined3d_surface *wined3d_surface; IDirectDrawSurface7 *ddsurf; HRESULT hr; DDSCAPS2 ddsCaps; @@ -1820,25 +1976,19 @@ static HRESULT WINAPI ddraw7_GetGDISurface(IDirectDraw7 *iface, IDirectDrawSurfa TRACE("iface %p, surface %p.\n", iface, GDISurface); /* Get the back buffer from the wineD3DDevice and search its - * attached surfaces for the front buffer - */ + * attached surfaces for the front buffer. */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetBackBuffer(This->wineD3DDevice, - 0, /* SwapChain */ - 0, /* first back buffer*/ - WINED3DBACKBUFFER_TYPE_MONO, - &Surf); - - if( (hr != D3D_OK) || - (!Surf) ) + hr = wined3d_device_get_back_buffer(This->wined3d_device, + 0, 0, WINED3DBACKBUFFER_TYPE_MONO, &wined3d_surface); + if (FAILED(hr) || !wined3d_surface) { ERR("IWineD3DDevice::GetBackBuffer failed\n"); LeaveCriticalSection(&ddraw_cs); return DDERR_NOTFOUND; } - ddsurf = IWineD3DSurface_GetParent(Surf); - IWineD3DSurface_Release(Surf); + ddsurf = wined3d_surface_get_parent(wined3d_surface); + wined3d_surface_decref(wined3d_surface); /* Find the front buffer */ ddsCaps.dwCaps = DDSCAPS_FRONTBUFFER; @@ -1857,19 +2007,22 @@ static HRESULT WINAPI ddraw7_GetGDISurface(IDirectDraw7 *iface, IDirectDrawSurfa static HRESULT WINAPI ddraw4_GetGDISurface(IDirectDraw4 *iface, IDirectDrawSurface4 **surface) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, surface %p.\n", iface, surface); - return ddraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw4(iface), (IDirectDrawSurface7 **)surface); + return ddraw7_GetGDISurface(&This->IDirectDraw7_iface, (IDirectDrawSurface7 **)surface); } static HRESULT WINAPI ddraw3_GetGDISurface(IDirectDraw3 *iface, IDirectDrawSurface **surface) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); IDirectDrawSurface7 *surface7; HRESULT hr; TRACE("iface %p, surface %p.\n", iface, surface); - hr = ddraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw3(iface), &surface7); + hr = ddraw7_GetGDISurface(&This->IDirectDraw7_iface, &surface7); *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; return hr; @@ -1877,12 +2030,13 @@ static HRESULT WINAPI ddraw3_GetGDISurface(IDirectDraw3 *iface, IDirectDrawSurfa static HRESULT WINAPI ddraw2_GetGDISurface(IDirectDraw2 *iface, IDirectDrawSurface **surface) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); IDirectDrawSurface7 *surface7; HRESULT hr; TRACE("iface %p, surface %p.\n", iface, surface); - hr = ddraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw2(iface), &surface7); + hr = ddraw7_GetGDISurface(&This->IDirectDraw7_iface, &surface7); *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; return hr; @@ -1890,12 +2044,13 @@ static HRESULT WINAPI ddraw2_GetGDISurface(IDirectDraw2 *iface, IDirectDrawSurfa static HRESULT WINAPI ddraw1_GetGDISurface(IDirectDraw *iface, IDirectDrawSurface **surface) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); IDirectDrawSurface7 *surface7; HRESULT hr; TRACE("iface %p, surface %p.\n", iface, surface); - hr = ddraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw1(iface), &surface7); + hr = ddraw7_GetGDISurface(&This->IDirectDraw7_iface, &surface7); *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; return hr; @@ -1925,7 +2080,8 @@ static HRESULT CALLBACK EnumDisplayModesCallbackThunk(DDSURFACEDESC2 *surface_de * the DDSD parameter. * * Params: - * Flags: can be DDEDM_REFRESHRATES and DDEDM_STANDARDVGAMODES + * Flags: can be DDEDM_REFRESHRATES and DDEDM_STANDARDVGAMODES. For old ddraw + * versions (3 and older?) this is reserved and must be 0. * DDSD: Surface description to filter the modes * Context: Pointer passed back to the callback function * cb: Application-provided callback function @@ -1938,13 +2094,13 @@ static HRESULT CALLBACK EnumDisplayModesCallbackThunk(DDSURFACEDESC2 *surface_de static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMMODESCALLBACK2 cb) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); unsigned int modenum, fmt; - enum wined3d_format_id pixelformat = WINED3DFMT_UNKNOWN; WINED3DDISPLAYMODE mode; DDSURFACEDESC2 callback_sd; WINED3DDISPLAYMODE *enum_modes = NULL; unsigned enum_mode_count = 0, enum_mode_array_size = 0; + DDPIXELFORMAT pixelformat; static const enum wined3d_format_id checkFormatList[] = { @@ -1964,12 +2120,6 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, return DDERR_INVALIDPARAMS; } - if(DDSD) - { - if ((DDSD->dwFlags & DDSD_PIXELFORMAT) && (DDSD->u4.ddpfPixelFormat.dwFlags & DDPF_RGB) ) - pixelformat = PixelFormat_DD2WineD3D(&DDSD->u4.ddpfPixelFormat); - } - if(!(Flags & DDEDM_REFRESHRATES)) { enum_mode_array_size = 16; @@ -1982,24 +2132,21 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, } } + pixelformat.dwSize = sizeof(pixelformat); for(fmt = 0; fmt < (sizeof(checkFormatList) / sizeof(checkFormatList[0])); fmt++) { - if(pixelformat != WINED3DFMT_UNKNOWN && checkFormatList[fmt] != pixelformat) - { - continue; - } - modenum = 0; - while(IWineD3D_EnumAdapterModes(This->wineD3D, - WINED3DADAPTER_DEFAULT, - checkFormatList[fmt], - modenum++, - &mode) == WINED3D_OK) + while (wined3d_enum_adapter_modes(This->wineD3D, WINED3DADAPTER_DEFAULT, + checkFormatList[fmt], modenum++, &mode) == WINED3D_OK) { + PixelFormat_WineD3DtoDD(&pixelformat, mode.Format); if(DDSD) { if(DDSD->dwFlags & DDSD_WIDTH && mode.Width != DDSD->dwWidth) continue; if(DDSD->dwFlags & DDSD_HEIGHT && mode.Height != DDSD->dwHeight) continue; + if(DDSD->dwFlags & DDSD_REFRESHRATE && mode.RefreshRate != DDSD->u2.dwRefreshRate) continue; + if (DDSD->dwFlags & DDSD_PIXELFORMAT && + pixelformat.u1.dwRGBBitCount != DDSD->u4.ddpfPixelFormat.u1.dwRGBBitCount) continue; } if(!(Flags & DDEDM_REFRESHRATES)) @@ -2028,17 +2175,16 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, callback_sd.dwSize = sizeof(callback_sd); callback_sd.u4.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); - callback_sd.dwFlags = DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_PITCH; + callback_sd.dwFlags = DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_PITCH|DDSD_REFRESHRATE; if(Flags & DDEDM_REFRESHRATES) { - callback_sd.dwFlags |= DDSD_REFRESHRATE; callback_sd.u2.dwRefreshRate = mode.RefreshRate; } callback_sd.dwWidth = mode.Width; callback_sd.dwHeight = mode.Height; - PixelFormat_WineD3DtoDD(&callback_sd.u4.ddpfPixelFormat, mode.Format); + callback_sd.u4.ddpfPixelFormat=pixelformat; /* Calc pitch and DWORD align like MSDN says */ callback_sd.u1.lPitch = (callback_sd.u4.ddpfPixelFormat.u1.dwRGBBitCount / 8) * mode.Width; @@ -2089,16 +2235,18 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, static HRESULT WINAPI ddraw4_EnumDisplayModes(IDirectDraw4 *iface, DWORD flags, DDSURFACEDESC2 *surface_desc, void *context, LPDDENUMMODESCALLBACK2 callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", iface, flags, surface_desc, context, callback); - return ddraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw4(iface), flags, - surface_desc, context, callback); + return ddraw7_EnumDisplayModes(&This->IDirectDraw7_iface, flags, surface_desc, context, callback); } static HRESULT WINAPI ddraw3_EnumDisplayModes(IDirectDraw3 *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMMODESCALLBACK callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); struct displaymodescallback_context cbcontext; TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", @@ -2107,13 +2255,14 @@ static HRESULT WINAPI ddraw3_EnumDisplayModes(IDirectDraw3 *iface, DWORD flags, cbcontext.func = callback; cbcontext.context = context; - return ddraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw3(iface), flags, - (DDSURFACEDESC2 *)surface_desc, &cbcontext, EnumDisplayModesCallbackThunk); + return ddraw7_EnumDisplayModes(&This->IDirectDraw7_iface, flags, (DDSURFACEDESC2 *)surface_desc, + &cbcontext, EnumDisplayModesCallbackThunk); } static HRESULT WINAPI ddraw2_EnumDisplayModes(IDirectDraw2 *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMMODESCALLBACK callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); struct displaymodescallback_context cbcontext; TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", @@ -2122,13 +2271,14 @@ static HRESULT WINAPI ddraw2_EnumDisplayModes(IDirectDraw2 *iface, DWORD flags, cbcontext.func = callback; cbcontext.context = context; - return ddraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw2(iface), flags, - (DDSURFACEDESC2 *)surface_desc, &cbcontext, EnumDisplayModesCallbackThunk); + return ddraw7_EnumDisplayModes(&This->IDirectDraw7_iface, flags, (DDSURFACEDESC2 *)surface_desc, + &cbcontext, EnumDisplayModesCallbackThunk); } static HRESULT WINAPI ddraw1_EnumDisplayModes(IDirectDraw *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMMODESCALLBACK callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); struct displaymodescallback_context cbcontext; TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", @@ -2137,8 +2287,8 @@ static HRESULT WINAPI ddraw1_EnumDisplayModes(IDirectDraw *iface, DWORD flags, cbcontext.func = callback; cbcontext.context = context; - return ddraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw1(iface), flags, - (DDSURFACEDESC2 *)surface_desc, &cbcontext, EnumDisplayModesCallbackThunk); + return ddraw7_EnumDisplayModes(&This->IDirectDraw7_iface, flags, (DDSURFACEDESC2 *)surface_desc, + &cbcontext, EnumDisplayModesCallbackThunk); } /***************************************************************************** @@ -2203,12 +2353,13 @@ static HRESULT WINAPI ddraw7_GetDeviceIdentifier(IDirectDraw7 *iface, static HRESULT WINAPI ddraw4_GetDeviceIdentifier(IDirectDraw4 *iface, DDDEVICEIDENTIFIER *identifier, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); DDDEVICEIDENTIFIER2 identifier2; HRESULT hr; TRACE("iface %p, identifier %p, flags %#x.\n", iface, identifier, flags); - hr = ddraw7_GetDeviceIdentifier((IDirectDraw7 *)ddraw_from_ddraw4(iface), &identifier2, flags); + hr = ddraw7_GetDeviceIdentifier(&This->IDirectDraw7_iface, &identifier2, flags); DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(&identifier2, identifier); return hr; @@ -2228,17 +2379,18 @@ static HRESULT WINAPI ddraw4_GetDeviceIdentifier(IDirectDraw4 *iface, * Always returns DD_OK because it's a stub * *****************************************************************************/ -static HRESULT WINAPI ddraw7_GetSurfaceFromDC(IDirectDraw7 *iface, HDC hdc, IDirectDrawSurface7 **Surface) +static HRESULT WINAPI ddraw7_GetSurfaceFromDC(IDirectDraw7 *iface, HDC hdc, + IDirectDrawSurface7 **Surface) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; - IWineD3DSurface *wined3d_surface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); + struct wined3d_surface *wined3d_surface; HRESULT hr; TRACE("iface %p, dc %p, surface %p.\n", iface, hdc, Surface); if (!Surface) return E_INVALIDARG; - hr = IWineD3DDevice_GetSurfaceFromDC(This->wineD3DDevice, hdc, &wined3d_surface); + hr = wined3d_device_get_surface_from_dc(This->wined3d_device, hdc, &wined3d_surface); if (FAILED(hr)) { TRACE("No surface found for dc %p.\n", hdc); @@ -2246,14 +2398,16 @@ static HRESULT WINAPI ddraw7_GetSurfaceFromDC(IDirectDraw7 *iface, HDC hdc, IDir return DDERR_NOTFOUND; } - *Surface = IWineD3DSurface_GetParent(wined3d_surface); + *Surface = wined3d_surface_get_parent(wined3d_surface); IDirectDrawSurface7_AddRef(*Surface); TRACE("Returning surface %p.\n", Surface); return DD_OK; } -static HRESULT WINAPI ddraw4_GetSurfaceFromDC(IDirectDraw4 *iface, HDC dc, IDirectDrawSurface4 **surface) +static HRESULT WINAPI ddraw4_GetSurfaceFromDC(IDirectDraw4 *iface, HDC dc, + IDirectDrawSurface4 **surface) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); IDirectDrawSurface7 *surface7; HRESULT hr; @@ -2261,18 +2415,20 @@ static HRESULT WINAPI ddraw4_GetSurfaceFromDC(IDirectDraw4 *iface, HDC dc, IDire if (!surface) return E_INVALIDARG; - hr = ddraw7_GetSurfaceFromDC((IDirectDraw7 *)ddraw_from_ddraw4(iface), dc, &surface7); + hr = ddraw7_GetSurfaceFromDC(&This->IDirectDraw7_iface, dc, &surface7); *surface = surface7 ? (IDirectDrawSurface4 *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; return hr; } -static HRESULT WINAPI ddraw3_GetSurfaceFromDC(IDirectDraw3 *iface, HDC dc, IDirectDrawSurface **surface) +static HRESULT WINAPI ddraw3_GetSurfaceFromDC(IDirectDraw3 *iface, HDC dc, + IDirectDrawSurface **surface) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, dc %p, surface %p.\n", iface, dc, surface); - return ddraw7_GetSurfaceFromDC((IDirectDraw7 *)ddraw_from_ddraw3(iface), - dc, (IDirectDrawSurface7 **)surface); + return ddraw7_GetSurfaceFromDC(&This->IDirectDraw7_iface, dc, (IDirectDrawSurface7 **)surface); } /***************************************************************************** @@ -2300,9 +2456,11 @@ static HRESULT WINAPI ddraw7_RestoreAllSurfaces(IDirectDraw7 *iface) static HRESULT WINAPI ddraw4_RestoreAllSurfaces(IDirectDraw4 *iface) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p.\n", iface); - return ddraw7_RestoreAllSurfaces((IDirectDraw7 *)ddraw_from_ddraw4(iface)); + return ddraw7_RestoreAllSurfaces(&This->IDirectDraw7_iface); } /***************************************************************************** @@ -2356,22 +2514,14 @@ static HRESULT WINAPI ddraw7_StartModeTest(IDirectDraw7 *iface, SIZE *Modes, DWO HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDESC2 *desc, void *Context) { IDirectDrawSurfaceImpl *surfImpl = (IDirectDrawSurfaceImpl *)surf; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; IDirectDrawImpl *This = surfImpl->ddraw; - IWineD3DSurface *wineD3DSurface; - IWineD3DSwapChain *swapchain; + struct wined3d_surface *wined3d_surface; + struct wined3d_swapchain *swapchain; + struct wined3d_clipper *clipper; void *parent; HRESULT hr; - IWineD3DClipper *clipper = NULL; - - WINED3DSURFACE_DESC Desc; - enum wined3d_format_id Format; - DWORD Usage; - WINED3DPOOL Pool; - - WINED3DMULTISAMPLE_TYPE MultiSampleType; - DWORD MultiSampleQuality; - UINT Width; - UINT Height; TRACE("surface %p, surface_desc %p, context %p.\n", surf, desc, Context); @@ -2382,51 +2532,46 @@ HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDE if(surfImpl->ImplType == This->ImplType) return DDENUMRET_OK; /* Continue */ /* Get the objects */ - swapchain = surfImpl->wineD3DSwapChain; - surfImpl->wineD3DSwapChain = NULL; - wineD3DSurface = surfImpl->WineD3DSurface; + swapchain = surfImpl->wined3d_swapchain; + surfImpl->wined3d_swapchain = NULL; + wined3d_surface = surfImpl->wined3d_surface; /* get the clipper */ - IWineD3DSurface_GetClipper(wineD3DSurface, &clipper); + clipper = wined3d_surface_get_clipper(wined3d_surface); /* Get the surface properties */ - IWineD3DSurface_GetDesc(wineD3DSurface, &Desc); + wined3d_resource = wined3d_surface_get_resource(wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); - Format = Desc.format; - Usage = Desc.usage; - Pool = Desc.pool; - MultiSampleType = Desc.multisample_type; - MultiSampleQuality = Desc.multisample_quality; - Width = Desc.width; - Height = Desc.height; - - parent = IWineD3DSurface_GetParent(wineD3DSurface); - hr = IWineD3DDevice_CreateSurface(This->wineD3DDevice, Width, Height, Format, TRUE /* Lockable */, - FALSE /* Discard */, surfImpl->mipmap_level, Usage, Pool, MultiSampleType, MultiSampleQuality, - This->ImplType, parent, &ddraw_null_wined3d_parent_ops, &surfImpl->WineD3DSurface); + parent = wined3d_surface_get_parent(wined3d_surface); + hr = wined3d_surface_create(This->wined3d_device, wined3d_desc.width, wined3d_desc.height, + wined3d_desc.format, TRUE, FALSE, surfImpl->mipmap_level, wined3d_desc.usage, wined3d_desc.pool, + wined3d_desc.multisample_type, wined3d_desc.multisample_quality, This->ImplType, + parent, &ddraw_surface_wined3d_parent_ops, &surfImpl->wined3d_surface); if (FAILED(hr)) { - surfImpl->WineD3DSurface = wineD3DSurface; + surfImpl->wined3d_surface = wined3d_surface; return hr; } - IWineD3DSurface_SetClipper(surfImpl->WineD3DSurface, clipper); + wined3d_surface_set_clipper(surfImpl->wined3d_surface, clipper); /* TODO: Copy the surface content, except for render targets */ /* If there's a swapchain, it owns the wined3d surfaces. So Destroy * the swapchain */ - if(swapchain) { + if (swapchain) + { /* The backbuffers have the swapchain set as well, but the primary - * owns it and destroys it - */ - if(surfImpl->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { - IWineD3DDevice_UninitGDI(This->wineD3DDevice, D3D7CB_DestroySwapChain); - } + * owns it and destroys it. */ + if (surfImpl->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) + wined3d_device_uninit_gdi(This->wined3d_device); surfImpl->isRenderTarget = FALSE; - } else { - if(IWineD3DSurface_Release(wineD3DSurface) == 0) + } + else + { + if (!wined3d_surface_decref(wined3d_surface)) TRACE("Surface released successful, next surface\n"); else ERR("Something's still holding the old WineD3DSurface\n"); @@ -2434,10 +2579,6 @@ HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDE surfImpl->ImplType = This->ImplType; - if(clipper) - { - IWineD3DClipper_Release(clipper); - } return DDENUMRET_OK; } @@ -2459,24 +2600,15 @@ static HRESULT ddraw_recreate_surfaces(IDirectDrawImpl *This) /* Should happen almost never */ FIXME("(%p) Switching to non-opengl surfaces with d3d started. Is this a bug?\n", This); /* Shutdown d3d */ - IWineD3DDevice_Uninit3D(This->wineD3DDevice, D3D7CB_DestroySwapChain); + wined3d_device_uninit_3d(This->wined3d_device); } /* Contrary: D3D starting is handled by the caller, because it knows the render target */ memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); - return IDirectDraw7_EnumSurfaces((IDirectDraw7 *)This, 0, &desc, This, ddraw_recreate_surfaces_cb); -} - -ULONG WINAPI D3D7CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain) -{ - IUnknown *swapChainParent; - - TRACE("swapchain %p.\n", pSwapChain); - - swapChainParent = IWineD3DSwapChain_GetParent(pSwapChain); - return IUnknown_Release(swapChainParent); + return IDirectDraw7_EnumSurfaces(&This->IDirectDraw7_iface, 0, &desc, This, + ddraw_recreate_surfaces_cb); } /***************************************************************************** @@ -2737,11 +2869,12 @@ static HRESULT ddraw_attach_d3d_device(IDirectDrawImpl *ddraw, IDirectDrawSurfac localParameters.Flags = 0; localParameters.FullScreen_RefreshRateInHz = WINED3DPRESENT_RATE_DEFAULT; localParameters.PresentationInterval = WINED3DPRESENT_INTERVAL_DEFAULT; + localParameters.AutoRestoreDisplayMode = FALSE; /* Set this NOW, otherwise creating the depth stencil surface will cause a * recursive loop until ram or emulated video memory is full. */ ddraw->d3d_initialized = TRUE; - hr = IWineD3DDevice_Init3D(ddraw->wineD3DDevice, &localParameters); + hr = wined3d_device_init_3d(ddraw->wined3d_device, &localParameters); if (FAILED(hr)) { ddraw->d3d_target = NULL; @@ -2755,7 +2888,7 @@ static HRESULT ddraw_attach_d3d_device(IDirectDrawImpl *ddraw, IDirectDrawSurfac { ERR("Error allocating an array for the converted vertex decls.\n"); ddraw->declArraySize = 0; - hr = IWineD3DDevice_Uninit3D(ddraw->wineD3DDevice, D3D7CB_DestroySwapChain); + hr = wined3d_device_uninit_3d(ddraw->wined3d_device); return E_OUTOFMEMORY; } @@ -2791,14 +2924,15 @@ static HRESULT ddraw_create_gdi_swapchain(IDirectDrawImpl *ddraw, IDirectDrawSur presentation_parameters.Flags = 0; presentation_parameters.FullScreen_RefreshRateInHz = WINED3DPRESENT_RATE_DEFAULT; presentation_parameters.PresentationInterval = WINED3DPRESENT_INTERVAL_DEFAULT; + presentation_parameters.AutoRestoreDisplayMode = FALSE; ddraw->d3d_target = primary; - hr = IWineD3DDevice_InitGDI(ddraw->wineD3DDevice, &presentation_parameters); + hr = wined3d_device_init_gdi(ddraw->wined3d_device, &presentation_parameters); ddraw->d3d_target = NULL; if (FAILED(hr)) { WARN("Failed to initialize GDI ddraw implementation, hr %#x.\n", hr); - primary->wineD3DSwapChain = NULL; + primary->wined3d_swapchain = NULL; } return hr; @@ -2881,10 +3015,9 @@ static HRESULT ddraw_create_gdi_swapchain(IDirectDrawImpl *ddraw, IDirectDrawSur * DDERR_* if an error occurs * *****************************************************************************/ -static HRESULT CreateSurface(IDirectDraw7 *iface, - DDSURFACEDESC2 *DDSD, IDirectDrawSurface7 **Surf, IUnknown *UnkOuter) +static HRESULT CreateSurface(IDirectDrawImpl *ddraw, DDSURFACEDESC2 *DDSD, + IDirectDrawSurface7 **Surf, IUnknown *UnkOuter) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; IDirectDrawSurfaceImpl *object = NULL; HRESULT hr; LONG extra_surfaces = 0; @@ -2892,27 +3025,26 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, WINED3DDISPLAYMODE Mode; const DWORD sysvidmem = DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY; - TRACE("iface %p, surface_desc %p, surface %p, outer_unknown %p.\n", - iface, DDSD, Surf, UnkOuter); + TRACE("ddraw %p, surface_desc %p, surface %p, outer_unknown %p.\n", ddraw, DDSD, Surf, UnkOuter); /* Some checks before we start */ if (TRACE_ON(ddraw)) { - TRACE(" (%p) Requesting surface desc :\n", This); + TRACE(" (%p) Requesting surface desc :\n", ddraw); DDRAW_dump_surface_desc(DDSD); } EnterCriticalSection(&ddraw_cs); if (UnkOuter != NULL) { - FIXME("(%p) : outer != NULL?\n", This); + FIXME("(%p) : outer != NULL?\n", ddraw); LeaveCriticalSection(&ddraw_cs); return CLASS_E_NOAGGREGATION; /* unchecked */ } if (Surf == NULL) { - FIXME("(%p) You want to get back a surface? Don't give NULL ptrs!\n", This); + FIXME("(%p) You want to get back a surface? Don't give NULL ptrs!\n", ddraw); LeaveCriticalSection(&ddraw_cs); return E_POINTER; /* unchecked */ } @@ -2932,14 +3064,15 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, if ((DDSD->dwFlags & DDSD_LPSURFACE) && (DDSD->lpSurface == NULL)) { /* Frank Herbert's Dune specifies a null pointer for the surface, ignore the LPSURFACE field */ - WARN("(%p) Null surface pointer specified, ignore it!\n", This); + WARN("(%p) Null surface pointer specified, ignore it!\n", ddraw); DDSD->dwFlags &= ~DDSD_LPSURFACE; } if((DDSD->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE)) == (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE) && - !(This->cooperative_level & DDSCL_EXCLUSIVE)) + !(ddraw->cooperative_level & DDSCL_EXCLUSIVE)) { - TRACE("(%p): Attempt to create a flipable primary surface without DDSCL_EXCLUSIVE set\n", This); + TRACE("(%p): Attempt to create a flipable primary surface without DDSCL_EXCLUSIVE set\n", + ddraw); *Surf = NULL; LeaveCriticalSection(&ddraw_cs); return DDERR_NOEXCLUSIVEMODE; @@ -2992,20 +3125,15 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, DDSD->ddsCaps.dwCaps2 &= ~DDSCAPS2_MIPMAPSUBLEVEL; /* Modify some flags */ - memset(&desc2, 0, sizeof(desc2)); - desc2.dwSize = sizeof(desc2); /* For the struct copy */ - DD_STRUCT_COPY_BYSIZE(&desc2, DDSD); - desc2.dwSize = sizeof(desc2); /* To override a possibly smaller size */ + copy_to_surfacedesc2(&desc2, DDSD); desc2.u4.ddpfPixelFormat.dwSize=sizeof(DDPIXELFORMAT); /* Just to be sure */ /* Get the video mode from WineD3D - we will need it */ - hr = IWineD3DDevice_GetDisplayMode(This->wineD3DDevice, - 0, /* Swapchain 0 */ - &Mode); - if(FAILED(hr)) + hr = wined3d_device_get_display_mode(ddraw->wined3d_device, 0, &Mode); + if (FAILED(hr)) { ERR("Failed to read display mode from wined3d\n"); - switch(This->orig_bpp) + switch(ddraw->orig_bpp) { case 8: Mode.Format = WINED3DFMT_P8_UINT; @@ -3027,8 +3155,8 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, Mode.Format = WINED3DFMT_B8G8R8X8_UNORM; break; } - Mode.Width = This->orig_width; - Mode.Height = This->orig_height; + Mode.Width = ddraw->orig_width; + Mode.Height = ddraw->orig_height; } /* No pixelformat given? Use the current screen format */ @@ -3083,6 +3211,12 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, desc2.dwHeight = Mode.Height; } + if (!desc2.dwWidth || !desc2.dwHeight) + { + LeaveCriticalSection(&ddraw_cs); + return DDERR_INVALIDPARAMS; + } + /* Mipmap count fixes */ if(desc2.ddsCaps.dwCaps & DDSCAPS_MIPMAP) { @@ -3138,7 +3272,7 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, } /* Create the first surface */ - hr = ddraw_create_surface(This, &desc2, &object, 0); + hr = ddraw_create_surface(ddraw, &desc2, &object, 0); if (FAILED(hr)) { WARN("ddraw_create_surface failed, hr %#x.\n", hr); @@ -3167,24 +3301,24 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, { desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_ALLFACES; desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEZ; - hr |= CreateAdditionalSurfaces(This, object, extra_surfaces + 1, desc2, TRUE); + hr |= CreateAdditionalSurfaces(ddraw, object, extra_surfaces + 1, desc2, TRUE); desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_NEGATIVEZ; desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEZ; - hr |= CreateAdditionalSurfaces(This, object, extra_surfaces + 1, desc2, TRUE); + hr |= CreateAdditionalSurfaces(ddraw, object, extra_surfaces + 1, desc2, TRUE); desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_POSITIVEZ; desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEY; - hr |= CreateAdditionalSurfaces(This, object, extra_surfaces + 1, desc2, TRUE); + hr |= CreateAdditionalSurfaces(ddraw, object, extra_surfaces + 1, desc2, TRUE); desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_NEGATIVEY; desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEY; - hr |= CreateAdditionalSurfaces(This, object, extra_surfaces + 1, desc2, TRUE); + hr |= CreateAdditionalSurfaces(ddraw, object, extra_surfaces + 1, desc2, TRUE); desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_POSITIVEY; desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEX; - hr |= CreateAdditionalSurfaces(This, object, extra_surfaces + 1, desc2, TRUE); + hr |= CreateAdditionalSurfaces(ddraw, object, extra_surfaces + 1, desc2, TRUE); desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_NEGATIVEX; desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEX; } - hr |= CreateAdditionalSurfaces(This, object, extra_surfaces, desc2, FALSE); + hr |= CreateAdditionalSurfaces(ddraw, object, extra_surfaces, desc2, FALSE); if(hr != DD_OK) { /* This destroys and possibly created surfaces too */ @@ -3201,14 +3335,14 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, * the render target as first surface. In this case the render target creation * will cause the 3D init. */ - if( (This->ImplType == SURFACE_OPENGL) && !(This->d3d_initialized) && + if( (ddraw->ImplType == SURFACE_OPENGL) && !(ddraw->d3d_initialized) && desc2.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE) ) { IDirectDrawSurfaceImpl *target = object, *surface; struct list *entry; /* Search for the primary to use as render target */ - LIST_FOR_EACH(entry, &This->surface_list) + LIST_FOR_EACH(entry, &ddraw->surface_list) { surface = LIST_ENTRY(entry, IDirectDrawSurfaceImpl, surface_list_entry); if((surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER)) == @@ -3221,8 +3355,8 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, } } - TRACE("(%p) Attaching a D3DDevice, rendertarget = %p\n", This, target); - hr = ddraw_attach_d3d_device(This, target); + TRACE("(%p) Attaching a D3DDevice, rendertarget = %p\n", ddraw, target); + hr = ddraw_attach_d3d_device(ddraw, target); if (hr != D3D_OK) { IDirectDrawSurfaceImpl *release_surf; @@ -3246,70 +3380,32 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, return hr; } } - else if(!(This->d3d_initialized) && desc2.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) + else if(!(ddraw->d3d_initialized) && desc2.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { - ddraw_create_gdi_swapchain(This, object); + ddraw_create_gdi_swapchain(ddraw, object); } /* Addref the ddraw interface to keep an reference for each surface */ - IDirectDraw7_AddRef(iface); - object->ifaceToRelease = (IUnknown *) iface; + IDirectDraw7_AddRef(&ddraw->IDirectDraw7_iface); + object->ifaceToRelease = (IUnknown *)&ddraw->IDirectDraw7_iface; /* Create a WineD3DTexture if a texture was requested */ - if(desc2.ddsCaps.dwCaps & DDSCAPS_TEXTURE) + if (desc2.ddsCaps.dwCaps & DDSCAPS_TEXTURE) { - enum wined3d_format_id Format; - UINT levels; - WINED3DPOOL Pool = WINED3DPOOL_DEFAULT; - - This->tex_root = object; - - if(desc2.ddsCaps.dwCaps & DDSCAPS_MIPMAP) - { - /* a mipmap is created, create enough levels */ - levels = desc2.u2.dwMipMapCount; - } - else - { - /* No mipmap is created, create one level */ - levels = 1; - } - - /* DDSCAPS_SYSTEMMEMORY textures are in WINED3DPOOL_SYSTEMMEM */ - if(DDSD->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) - { - Pool = WINED3DPOOL_SYSTEMMEM; - } - /* Should I forward the MANAGED cap to the managed pool ? */ - - /* Get the format. It's set already by CreateNewSurface */ - Format = PixelFormat_DD2WineD3D(&object->surface_desc.u4.ddpfPixelFormat); - - /* The surfaces are already created, the callback only - * passes the IWineD3DSurface to WineD3D - */ - if(desc2.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP) - { - hr = IWineD3DDevice_CreateCubeTexture(This->wineD3DDevice, DDSD->dwWidth /* Edgelength */, levels, - 0 /* usage */, Format, Pool, object, &ddraw_null_wined3d_parent_ops, - (IWineD3DCubeTexture **)&object->wineD3DTexture); - } - else - { - hr = IWineD3DDevice_CreateTexture(This->wineD3DDevice, DDSD->dwWidth, DDSD->dwHeight, levels, - 0 /* usage */, Format, Pool, object, &ddraw_null_wined3d_parent_ops, - (IWineD3DTexture **)&object->wineD3DTexture); - } - This->tex_root = NULL; + ddraw->tex_root = object; + ddraw_surface_create_texture(object); + ddraw->tex_root = NULL; } LeaveCriticalSection(&ddraw_cs); return hr; } -static HRESULT WINAPI ddraw7_CreateSurface(IDirectDraw7 *iface, - DDSURFACEDESC2 *surface_desc, IDirectDrawSurface7 **surface, IUnknown *outer_unknown) +static HRESULT WINAPI ddraw7_CreateSurface(IDirectDraw7 *iface, DDSURFACEDESC2 *surface_desc, + IDirectDrawSurface7 **surface, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); + TRACE("iface %p, surface_desc %p, surface %p, outer_unknown %p.\n", iface, surface_desc, surface, outer_unknown); @@ -3331,13 +3427,13 @@ static HRESULT WINAPI ddraw7_CreateSurface(IDirectDraw7 *iface, return DDERR_INVALIDCAPS; } - return CreateSurface(iface, surface_desc, surface, outer_unknown); + return CreateSurface(This, surface_desc, surface, outer_unknown); } static HRESULT WINAPI ddraw4_CreateSurface(IDirectDraw4 *iface, DDSURFACEDESC2 *surface_desc, IDirectDrawSurface4 **surface, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw4(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); IDirectDrawSurfaceImpl *impl; HRESULT hr; @@ -3362,12 +3458,12 @@ static HRESULT WINAPI ddraw4_CreateSurface(IDirectDraw4 *iface, return DDERR_INVALIDCAPS; } - hr = CreateSurface((IDirectDraw7 *)ddraw, surface_desc, (IDirectDrawSurface7 **)surface, outer_unknown); + hr = CreateSurface(This, surface_desc, (IDirectDrawSurface7 **)surface, outer_unknown); impl = (IDirectDrawSurfaceImpl *)*surface; if (SUCCEEDED(hr) && impl) { ddraw_set_surface_version(impl, 4); - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); IDirectDraw4_AddRef(iface); impl->ifaceToRelease = (IUnknown *)iface; } @@ -3375,10 +3471,10 @@ static HRESULT WINAPI ddraw4_CreateSurface(IDirectDraw4 *iface, return hr; } -static HRESULT WINAPI ddraw3_CreateSurface(IDirectDraw3 *iface, - DDSURFACEDESC *surface_desc, IDirectDrawSurface **surface, IUnknown *outer_unknown) +static HRESULT WINAPI ddraw3_CreateSurface(IDirectDraw3 *iface, DDSURFACEDESC *surface_desc, + IDirectDrawSurface **surface, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw3(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); IDirectDrawSurface7 *surface7; IDirectDrawSurfaceImpl *impl; HRESULT hr; @@ -3404,7 +3500,7 @@ static HRESULT WINAPI ddraw3_CreateSurface(IDirectDraw3 *iface, return DDERR_INVALIDCAPS; } - hr = CreateSurface((IDirectDraw7 *)ddraw, (DDSURFACEDESC2 *)surface_desc, &surface7, outer_unknown); + hr = CreateSurface(This, (DDSURFACEDESC2 *)surface_desc, &surface7, outer_unknown); if (FAILED(hr)) { *surface = NULL; @@ -3414,7 +3510,7 @@ static HRESULT WINAPI ddraw3_CreateSurface(IDirectDraw3 *iface, impl = (IDirectDrawSurfaceImpl *)surface7; *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl; ddraw_set_surface_version(impl, 3); - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); IDirectDraw3_AddRef(iface); impl->ifaceToRelease = (IUnknown *)iface; @@ -3424,7 +3520,7 @@ static HRESULT WINAPI ddraw3_CreateSurface(IDirectDraw3 *iface, static HRESULT WINAPI ddraw2_CreateSurface(IDirectDraw2 *iface, DDSURFACEDESC *surface_desc, IDirectDrawSurface **surface, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw2(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); IDirectDrawSurface7 *surface7; IDirectDrawSurfaceImpl *impl; HRESULT hr; @@ -3450,7 +3546,7 @@ static HRESULT WINAPI ddraw2_CreateSurface(IDirectDraw2 *iface, return DDERR_INVALIDCAPS; } - hr = CreateSurface((IDirectDraw7 *)ddraw, (DDSURFACEDESC2 *)surface_desc, &surface7, outer_unknown); + hr = CreateSurface(This, (DDSURFACEDESC2 *)surface_desc, &surface7, outer_unknown); if (FAILED(hr)) { *surface = NULL; @@ -3460,7 +3556,7 @@ static HRESULT WINAPI ddraw2_CreateSurface(IDirectDraw2 *iface, impl = (IDirectDrawSurfaceImpl *)surface7; *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl; ddraw_set_surface_version(impl, 2); - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); impl->ifaceToRelease = NULL; return hr; @@ -3469,7 +3565,7 @@ static HRESULT WINAPI ddraw2_CreateSurface(IDirectDraw2 *iface, static HRESULT WINAPI ddraw1_CreateSurface(IDirectDraw *iface, DDSURFACEDESC *surface_desc, IDirectDrawSurface **surface, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw1(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); IDirectDrawSurface7 *surface7; IDirectDrawSurfaceImpl *impl; HRESULT hr; @@ -3486,7 +3582,7 @@ static HRESULT WINAPI ddraw1_CreateSurface(IDirectDraw *iface, /* Remove front buffer flag, this causes failure in v7, and its added to normal * primaries anyway. */ surface_desc->ddsCaps.dwCaps &= ~DDSCAPS_FRONTBUFFER; - hr = CreateSurface((IDirectDraw7 *)ddraw, (DDSURFACEDESC2 *)surface_desc, &surface7, outer_unknown); + hr = CreateSurface(This, (DDSURFACEDESC2 *)surface_desc, &surface7, outer_unknown); if (FAILED(hr)) { *surface = NULL; @@ -3496,7 +3592,7 @@ static HRESULT WINAPI ddraw1_CreateSurface(IDirectDraw *iface, impl = (IDirectDrawSurfaceImpl *)surface7; *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl; ddraw_set_surface_version(impl, 1); - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); impl->ifaceToRelease = NULL; return hr; @@ -3657,7 +3753,7 @@ static HRESULT WINAPI ddraw7_EnumSurfaces(IDirectDraw7 *iface, DWORD Flags, * because WineDDraw doesn't handle ddraw-like surface * caps structures */ - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); IDirectDrawSurfaceImpl *surf; BOOL all, nomatch; DDSURFACEDESC2 desc; @@ -3699,16 +3795,19 @@ static HRESULT WINAPI ddraw7_EnumSurfaces(IDirectDraw7 *iface, DWORD Flags, static HRESULT WINAPI ddraw4_EnumSurfaces(IDirectDraw4 *iface, DWORD flags, DDSURFACEDESC2 *surface_desc, void *context, LPDDENUMSURFACESCALLBACK2 callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", iface, flags, surface_desc, context, callback); - return ddraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw4(iface), - flags, surface_desc, context, (LPDDENUMSURFACESCALLBACK7)callback); + return ddraw7_EnumSurfaces(&This->IDirectDraw7_iface, flags, surface_desc, context, + (LPDDENUMSURFACESCALLBACK7)callback); } static HRESULT WINAPI ddraw3_EnumSurfaces(IDirectDraw3 *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMSURFACESCALLBACK callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); struct surfacescallback_context cbcontext; TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", @@ -3717,13 +3816,14 @@ static HRESULT WINAPI ddraw3_EnumSurfaces(IDirectDraw3 *iface, DWORD flags, cbcontext.func = callback; cbcontext.context = context; - return ddraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw3(iface), flags, - (DDSURFACEDESC2 *)surface_desc, &cbcontext, EnumSurfacesCallbackThunk); + return ddraw7_EnumSurfaces(&This->IDirectDraw7_iface, flags, (DDSURFACEDESC2 *)surface_desc, + &cbcontext, EnumSurfacesCallbackThunk); } static HRESULT WINAPI ddraw2_EnumSurfaces(IDirectDraw2 *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMSURFACESCALLBACK callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); struct surfacescallback_context cbcontext; TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", @@ -3732,13 +3832,14 @@ static HRESULT WINAPI ddraw2_EnumSurfaces(IDirectDraw2 *iface, DWORD flags, cbcontext.func = callback; cbcontext.context = context; - return ddraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw2(iface), flags, - (DDSURFACEDESC2 *)surface_desc, &cbcontext, EnumSurfacesCallbackThunk); + return ddraw7_EnumSurfaces(&This->IDirectDraw7_iface, flags, (DDSURFACEDESC2 *)surface_desc, + &cbcontext, EnumSurfacesCallbackThunk); } static HRESULT WINAPI ddraw1_EnumSurfaces(IDirectDraw *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMSURFACESCALLBACK callback) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); struct surfacescallback_context cbcontext; TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n", @@ -3747,8 +3848,8 @@ static HRESULT WINAPI ddraw1_EnumSurfaces(IDirectDraw *iface, DWORD flags, cbcontext.func = callback; cbcontext.context = context; - return ddraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw1(iface), flags, - (DDSURFACEDESC2 *)surface_desc, &cbcontext, EnumSurfacesCallbackThunk); + return ddraw7_EnumSurfaces(&This->IDirectDraw7_iface, flags, (DDSURFACEDESC2 *)surface_desc, + &cbcontext, EnumSurfacesCallbackThunk); } /***************************************************************************** @@ -3784,12 +3885,6 @@ DirectDrawCreateClipper(DWORD Flags, return CLASS_E_NOAGGREGATION; } - if (!LoadWineD3D()) - { - LeaveCriticalSection(&ddraw_cs); - return DDERR_NODIRECTDRAWSUPPORT; - } - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawClipperImpl)); if (object == NULL) @@ -3828,40 +3923,48 @@ static HRESULT WINAPI ddraw7_CreateClipper(IDirectDraw7 *iface, DWORD Flags, return DirectDrawCreateClipper(Flags, Clipper, UnkOuter); } -static HRESULT WINAPI ddraw4_CreateClipper(IDirectDraw4 *iface, - DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown) +static HRESULT WINAPI ddraw4_CreateClipper(IDirectDraw4 *iface, DWORD flags, + IDirectDrawClipper **clipper, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown); - return ddraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw4(iface), flags, clipper, outer_unknown); + return ddraw7_CreateClipper(&This->IDirectDraw7_iface, flags, clipper, outer_unknown); } -static HRESULT WINAPI ddraw3_CreateClipper(IDirectDraw3 *iface, - DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown) +static HRESULT WINAPI ddraw3_CreateClipper(IDirectDraw3 *iface, DWORD flags, + IDirectDrawClipper **clipper, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); + TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown); - return ddraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw3(iface), flags, clipper, outer_unknown); + return ddraw7_CreateClipper(&This->IDirectDraw7_iface, flags, clipper, outer_unknown); } static HRESULT WINAPI ddraw2_CreateClipper(IDirectDraw2 *iface, DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); + TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown); - return ddraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw2(iface), flags, clipper, outer_unknown); + return ddraw7_CreateClipper(&This->IDirectDraw7_iface, flags, clipper, outer_unknown); } static HRESULT WINAPI ddraw1_CreateClipper(IDirectDraw *iface, DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); + TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown); - return ddraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw1(iface), flags, clipper, outer_unknown); + return ddraw7_CreateClipper(&This->IDirectDraw7_iface, flags, clipper, outer_unknown); } /***************************************************************************** @@ -3884,7 +3987,7 @@ static HRESULT WINAPI ddraw1_CreateClipper(IDirectDraw *iface, static HRESULT WINAPI ddraw7_CreatePalette(IDirectDraw7 *iface, DWORD Flags, PALETTEENTRY *ColorTable, IDirectDrawPalette **Palette, IUnknown *pUnkOuter) { - IDirectDrawImpl *This = (IDirectDrawImpl *)iface; + IDirectDrawImpl *This = impl_from_IDirectDraw7(iface); IDirectDrawPaletteImpl *object; HRESULT hr; @@ -3930,20 +4033,20 @@ static HRESULT WINAPI ddraw7_CreatePalette(IDirectDraw7 *iface, DWORD Flags, return DD_OK; } -static HRESULT WINAPI ddraw4_CreatePalette(IDirectDraw4 *iface, DWORD flags, - PALETTEENTRY *entries, IDirectDrawPalette **palette, IUnknown *outer_unknown) +static HRESULT WINAPI ddraw4_CreatePalette(IDirectDraw4 *iface, DWORD flags, PALETTEENTRY *entries, + IDirectDrawPalette **palette, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw4(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); HRESULT hr; TRACE("iface %p, flags %#x, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown); - hr = ddraw7_CreatePalette((IDirectDraw7 *)ddraw, flags, entries, palette, outer_unknown); + hr = ddraw7_CreatePalette(&This->IDirectDraw7_iface, flags, entries, palette, outer_unknown); if (SUCCEEDED(hr) && *palette) { IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*palette; - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); IDirectDraw4_AddRef(iface); impl->ifaceToRelease = (IUnknown *)iface; } @@ -3953,17 +4056,17 @@ static HRESULT WINAPI ddraw4_CreatePalette(IDirectDraw4 *iface, DWORD flags, static HRESULT WINAPI ddraw3_CreatePalette(IDirectDraw3 *iface, DWORD flags, PALETTEENTRY *entries, IDirectDrawPalette **palette, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw3(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); HRESULT hr; TRACE("iface %p, flags %#x, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown); - hr = ddraw7_CreatePalette((IDirectDraw7 *)ddraw, flags, entries, palette, outer_unknown); + hr = ddraw7_CreatePalette(&This->IDirectDraw7_iface, flags, entries, palette, outer_unknown); if (SUCCEEDED(hr) && *palette) { IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*palette; - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); IDirectDraw4_AddRef(iface); impl->ifaceToRelease = (IUnknown *)iface; } @@ -3974,17 +4077,17 @@ static HRESULT WINAPI ddraw3_CreatePalette(IDirectDraw3 *iface, DWORD flags, static HRESULT WINAPI ddraw2_CreatePalette(IDirectDraw2 *iface, DWORD flags, PALETTEENTRY *entries, IDirectDrawPalette **palette, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw2(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); HRESULT hr; TRACE("iface %p, flags %#x, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown); - hr = ddraw7_CreatePalette((IDirectDraw7 *)ddraw, flags, entries, palette, outer_unknown); + hr = ddraw7_CreatePalette(&This->IDirectDraw7_iface, flags, entries, palette, outer_unknown); if (SUCCEEDED(hr) && *palette) { IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*palette; - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); impl->ifaceToRelease = NULL; } @@ -3994,17 +4097,17 @@ static HRESULT WINAPI ddraw2_CreatePalette(IDirectDraw2 *iface, DWORD flags, static HRESULT WINAPI ddraw1_CreatePalette(IDirectDraw *iface, DWORD flags, PALETTEENTRY *entries, IDirectDrawPalette **palette, IUnknown *outer_unknown) { - IDirectDrawImpl *ddraw = ddraw_from_ddraw1(iface); + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); HRESULT hr; TRACE("iface %p, flags %#x, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown); - hr = ddraw7_CreatePalette((IDirectDraw7 *)ddraw, flags, entries, palette, outer_unknown); + hr = ddraw7_CreatePalette(&This->IDirectDraw7_iface, flags, entries, palette, outer_unknown); if (SUCCEEDED(hr) && *palette) { IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*palette; - IDirectDraw7_Release((IDirectDraw7 *)ddraw); + IDirectDraw7_Release(&This->IDirectDraw7_iface); impl->ifaceToRelease = NULL; } @@ -4042,24 +4145,27 @@ static HRESULT WINAPI ddraw7_DuplicateSurface(IDirectDraw7 *iface, NULL); } -static HRESULT WINAPI ddraw4_DuplicateSurface(IDirectDraw4 *iface, - IDirectDrawSurface4 *src, IDirectDrawSurface4 **dst) +static HRESULT WINAPI ddraw4_DuplicateSurface(IDirectDraw4 *iface, IDirectDrawSurface4 *src, + IDirectDrawSurface4 **dst) { + IDirectDrawImpl *This = impl_from_IDirectDraw4(iface); + TRACE("iface %p, src %p, dst %p.\n", iface, src, dst); - return ddraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw4(iface), - (IDirectDrawSurface7 *)src, (IDirectDrawSurface7 **)dst); + return ddraw7_DuplicateSurface(&This->IDirectDraw7_iface, (IDirectDrawSurface7 *)src, + (IDirectDrawSurface7 **)dst); } -static HRESULT WINAPI ddraw3_DuplicateSurface(IDirectDraw3 *iface, - IDirectDrawSurface *src, IDirectDrawSurface **dst) +static HRESULT WINAPI ddraw3_DuplicateSurface(IDirectDraw3 *iface, IDirectDrawSurface *src, + IDirectDrawSurface **dst) { + IDirectDrawImpl *This = impl_from_IDirectDraw3(iface); IDirectDrawSurface7 *src7, *dst7; HRESULT hr; TRACE("iface %p, src %p, dst %p.\n", iface, src, dst); src7 = (IDirectDrawSurface7 *)surface_from_surface3((IDirectDrawSurface3 *)src); - hr = ddraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw3(iface), src7, &dst7); + hr = ddraw7_DuplicateSurface(&This->IDirectDraw7_iface, src7, &dst7); if (FAILED(hr)) return hr; *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_vtbl; @@ -4069,27 +4175,29 @@ static HRESULT WINAPI ddraw3_DuplicateSurface(IDirectDraw3 *iface, static HRESULT WINAPI ddraw2_DuplicateSurface(IDirectDraw2 *iface, IDirectDrawSurface *src, IDirectDrawSurface **dst) { + IDirectDrawImpl *This = impl_from_IDirectDraw2(iface); IDirectDrawSurface7 *src7, *dst7; HRESULT hr; TRACE("iface %p, src %p, dst %p.\n", iface, src, dst); src7 = (IDirectDrawSurface7 *)surface_from_surface3((IDirectDrawSurface3 *)src); - hr = ddraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw2(iface), src7, &dst7); + hr = ddraw7_DuplicateSurface(&This->IDirectDraw7_iface, src7, &dst7); if (FAILED(hr)) return hr; *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_vtbl; return hr; } -static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, - IDirectDrawSurface *src, IDirectDrawSurface **dst) +static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSurface *src, + IDirectDrawSurface **dst) { + IDirectDrawImpl *This = impl_from_IDirectDraw(iface); IDirectDrawSurface7 *src7, *dst7; HRESULT hr; TRACE("iface %p, src %p, dst %p.\n", iface, src, dst); src7 = (IDirectDrawSurface7 *)surface_from_surface3((IDirectDrawSurface3 *)src); - hr = ddraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw1(iface), src7, &dst7); + hr = ddraw7_DuplicateSurface(&This->IDirectDraw7_iface, src7, &dst7); if (FAILED(hr)) return hr; *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_vtbl; @@ -4119,7 +4227,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA char interface_name_rgb[] = "WINE Direct3D7 RGB Software Emulation using WineD3D"; char device_name_rgb[] = "Wine D3D7 RGB"; - IDirectDrawImpl *ddraw = ddraw_from_d3d7(iface); + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); D3DDEVICEDESC7 device_desc7; D3DDEVICEDESC device_desc1; HRESULT hr; @@ -4128,7 +4236,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA EnterCriticalSection(&ddraw_cs); - hr = IDirect3DImpl_GetCaps(ddraw->wineD3D, &device_desc1, &device_desc7); + hr = IDirect3DImpl_GetCaps(This->wineD3D, &device_desc1, &device_desc7); if (hr != D3D_OK) { LeaveCriticalSection(&ddraw_cs); @@ -4170,7 +4278,7 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA { static CHAR wined3d_description[] = "Wine D3DDevice using WineD3D and OpenGL"; - IDirectDrawImpl *ddraw = ddraw_from_d3d3(iface); + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); D3DDEVICEDESC device_desc1, hal_desc, hel_desc; D3DDEVICEDESC7 device_desc7; HRESULT hr; @@ -4185,7 +4293,7 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA EnterCriticalSection(&ddraw_cs); - hr = IDirect3DImpl_GetCaps(ddraw->wineD3D, &device_desc1, &device_desc7); + hr = IDirect3DImpl_GetCaps(This->wineD3D, &device_desc1, &device_desc7); if (hr != D3D_OK) { LeaveCriticalSection(&ddraw_cs); @@ -4211,7 +4319,7 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA * limitation flag), and it refuses all devices that have the perspective * flag set. This way it refuses the emulation device, and HAL devices * never have POW2 unset in d3d7 on windows. */ - if (ddraw->d3dversion != 1) + if (This->d3dversion != 1) { static CHAR reference_description[] = "RGB Direct3D emulation"; @@ -4260,16 +4368,20 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA static HRESULT WINAPI d3d2_EnumDevices(IDirect3D2 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); + TRACE("iface %p, callback %p, context %p.\n", iface, callback, context); - return d3d3_EnumDevices((IDirect3D3 *)&ddraw_from_d3d2(iface)->IDirect3D3_vtbl, callback, context); + return d3d3_EnumDevices(&This->IDirect3D3_iface, callback, context); } static HRESULT WINAPI d3d1_EnumDevices(IDirect3D *iface, LPD3DENUMDEVICESCALLBACK callback, void *context) { + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p, callback %p, context %p.\n", iface, callback, context); - return d3d3_EnumDevices((IDirect3D3 *)&ddraw_from_d3d1(iface)->IDirect3D3_vtbl, callback, context); + return d3d3_EnumDevices(&This->IDirect3D3_iface, callback, context); } /***************************************************************************** @@ -4293,8 +4405,10 @@ static HRESULT WINAPI d3d1_EnumDevices(IDirect3D *iface, LPD3DENUMDEVICESCALLBAC * CLASS_E_NOAGGREGATION if outer_unknown != NULL * *****************************************************************************/ -static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light, IUnknown *outer_unknown) +static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light, + IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); IDirect3DLightImpl *object; TRACE("iface %p, light %p, outer_unknown %p.\n", iface, light, outer_unknown); @@ -4308,7 +4422,7 @@ static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light return DDERR_OUTOFMEMORY; } - d3d_light_init(object, ddraw_from_d3d3(iface)); + d3d_light_init(object, This); TRACE("Created light %p.\n", object); *light = (IDirect3DLight *)object; @@ -4318,16 +4432,20 @@ static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light static HRESULT WINAPI d3d2_CreateLight(IDirect3D2 *iface, IDirect3DLight **light, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); + TRACE("iface %p, light %p, outer_unknown %p.\n", iface, light, outer_unknown); - return d3d3_CreateLight((IDirect3D3 *)&ddraw_from_d3d2(iface)->IDirect3D3_vtbl, light, outer_unknown); + return d3d3_CreateLight(&This->IDirect3D3_iface, light, outer_unknown); } static HRESULT WINAPI d3d1_CreateLight(IDirect3D *iface, IDirect3DLight **light, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p, light %p, outer_unknown %p.\n", iface, light, outer_unknown); - return d3d3_CreateLight((IDirect3D3 *)&ddraw_from_d3d1(iface)->IDirect3D3_vtbl, light, outer_unknown); + return d3d3_CreateLight(&This->IDirect3D3_iface, light, outer_unknown); } /***************************************************************************** @@ -4350,8 +4468,10 @@ static HRESULT WINAPI d3d1_CreateLight(IDirect3D *iface, IDirect3DLight **light, * CLASS_E_NOAGGREGATION if outer_unknown != NULL * *****************************************************************************/ -static HRESULT WINAPI d3d3_CreateMaterial(IDirect3D3 *iface, IDirect3DMaterial3 **material, IUnknown *outer_unknown) +static HRESULT WINAPI d3d3_CreateMaterial(IDirect3D3 *iface, IDirect3DMaterial3 **material, + IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); IDirect3DMaterialImpl *object; TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown); @@ -4365,7 +4485,7 @@ static HRESULT WINAPI d3d3_CreateMaterial(IDirect3D3 *iface, IDirect3DMaterial3 return DDERR_OUTOFMEMORY; } - d3d_material_init(object, ddraw_from_d3d3(iface)); + d3d_material_init(object, This); TRACE("Created material %p.\n", object); *material = (IDirect3DMaterial3 *)object; @@ -4375,12 +4495,13 @@ static HRESULT WINAPI d3d3_CreateMaterial(IDirect3D3 *iface, IDirect3DMaterial3 static HRESULT WINAPI d3d2_CreateMaterial(IDirect3D2 *iface, IDirect3DMaterial2 **material, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); IDirect3DMaterial3 *material3; HRESULT hr; TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown); - hr = d3d3_CreateMaterial((IDirect3D3 *)&ddraw_from_d3d2(iface)->IDirect3D3_vtbl, &material3, outer_unknown); + hr = d3d3_CreateMaterial(&This->IDirect3D3_iface, &material3, outer_unknown); *material = material3 ? (IDirect3DMaterial2 *)&((IDirect3DMaterialImpl *)material3)->IDirect3DMaterial2_vtbl : NULL; TRACE("Returning material %p.\n", *material); @@ -4393,9 +4514,11 @@ static HRESULT WINAPI d3d1_CreateMaterial(IDirect3D *iface, IDirect3DMaterial ** IDirect3DMaterial3 *material3; HRESULT hr; + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown); - hr = d3d3_CreateMaterial((IDirect3D3 *)&ddraw_from_d3d1(iface)->IDirect3D3_vtbl, &material3, outer_unknown); + hr = d3d3_CreateMaterial(&This->IDirect3D3_iface, &material3, outer_unknown); *material = material3 ? (IDirect3DMaterial *)&((IDirect3DMaterialImpl *)material3)->IDirect3DMaterial_vtbl : NULL; TRACE("Returning material %p.\n", *material); @@ -4423,8 +4546,10 @@ static HRESULT WINAPI d3d1_CreateMaterial(IDirect3D *iface, IDirect3DMaterial ** * CLASS_E_NOAGGREGATION if outer_unknown != NULL * *****************************************************************************/ -static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3 **viewport, IUnknown *outer_unknown) +static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3 **viewport, + IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); IDirect3DViewportImpl *object; TRACE("iface %p, viewport %p, outer_unknown %p.\n", iface, viewport, outer_unknown); @@ -4438,7 +4563,7 @@ static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3 return DDERR_OUTOFMEMORY; } - d3d_viewport_init(object, ddraw_from_d3d3(iface)); + d3d_viewport_init(object, This); TRACE("Created viewport %p.\n", object); *viewport = (IDirect3DViewport3 *)object; @@ -4448,18 +4573,22 @@ static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3 static HRESULT WINAPI d3d2_CreateViewport(IDirect3D2 *iface, IDirect3DViewport2 **viewport, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); + TRACE("iface %p, viewport %p, outer_unknown %p.\n", iface, viewport, outer_unknown); - return d3d3_CreateViewport((IDirect3D3 *)&ddraw_from_d3d2(iface)->IDirect3D3_vtbl, - (IDirect3DViewport3 **)viewport, outer_unknown); + return d3d3_CreateViewport(&This->IDirect3D3_iface, (IDirect3DViewport3 **)viewport, + outer_unknown); } static HRESULT WINAPI d3d1_CreateViewport(IDirect3D *iface, IDirect3DViewport **viewport, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p, viewport %p, outer_unknown %p.\n", iface, viewport, outer_unknown); - return d3d3_CreateViewport((IDirect3D3 *)&ddraw_from_d3d1(iface)->IDirect3D3_vtbl, - (IDirect3DViewport3 **)viewport, outer_unknown); + return d3d3_CreateViewport(&This->IDirect3D3_iface, (IDirect3DViewport3 **)viewport, + outer_unknown); } /***************************************************************************** @@ -4480,7 +4609,7 @@ static HRESULT WINAPI d3d1_CreateViewport(IDirect3D *iface, IDirect3DViewport ** *****************************************************************************/ static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr) { - IDirectDrawImpl *ddraw = ddraw_from_d3d3(iface); + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); D3DDEVICEDESC7 desc7; D3DDEVICEDESC desc1; HRESULT hr; @@ -4513,7 +4642,7 @@ static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fd } /* Get the caps */ - hr = IDirect3DImpl_GetCaps(ddraw->wineD3D, &desc1, &desc7); + hr = IDirect3DImpl_GetCaps(This->wineD3D, &desc1, &desc7); if (hr != D3D_OK) return hr; /* Now return our own GUID */ @@ -4528,16 +4657,20 @@ static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fd static HRESULT WINAPI d3d2_FindDevice(IDirect3D2 *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); + TRACE("iface %p, fds %p, fdr %p.\n", iface, fds, fdr); - return d3d3_FindDevice((IDirect3D3 *)&ddraw_from_d3d2(iface)->IDirect3D3_vtbl, fds, fdr); + return d3d3_FindDevice(&This->IDirect3D3_iface, fds, fdr); } static HRESULT WINAPI d3d1_FindDevice(IDirect3D *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr) { + IDirectDrawImpl *This = impl_from_IDirect3D(iface); + TRACE("iface %p, fds %p, fdr %p.\n", iface, fds, fdr); - return d3d3_FindDevice((IDirect3D3 *)&ddraw_from_d3d1(iface)->IDirect3D3_vtbl, fds, fdr); + return d3d3_FindDevice(&This->IDirect3D3_iface, fds, fdr); } /***************************************************************************** @@ -4565,7 +4698,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid, IDirectDrawSurface7 *surface, IDirect3DDevice7 **device) { IDirectDrawSurfaceImpl *target = (IDirectDrawSurfaceImpl *)surface; - IDirectDrawImpl *ddraw = ddraw_from_d3d7(iface); + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); IDirect3DDeviceImpl *object; HRESULT hr; @@ -4575,7 +4708,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid, *device = NULL; /* Fail device creation if non-opengl surfaces are used. */ - if (ddraw->ImplType != SURFACE_OPENGL) + if (This->ImplType != SURFACE_OPENGL) { ERR("The application wants to create a Direct3D device, but non-opengl surfaces are set in the registry.\n"); ERR("Please set the surface implementation to opengl or autodetection to allow 3D rendering.\n"); @@ -4586,7 +4719,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid, return DDERR_NO3D; } - if (ddraw->d3ddevice) + if (This->d3ddevice) { FIXME("Only one Direct3D device per DirectDraw object supported.\n"); LeaveCriticalSection(&ddraw_cs); @@ -4601,7 +4734,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid, return DDERR_OUTOFMEMORY; } - hr = d3d_device_init(object, ddraw, target); + hr = d3d_device_init(object, This, target); if (FAILED(hr)) { WARN("Failed to initialize device, hr %#x.\n", hr); @@ -4620,6 +4753,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid, static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid, IDirectDrawSurface4 *surface, IDirect3DDevice3 **device, IUnknown *outer_unknown) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); HRESULT hr; TRACE("iface %p, riid %s, surface %p, device %p, outer_unknown %p.\n", @@ -4627,8 +4761,8 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid, if (outer_unknown) return CLASS_E_NOAGGREGATION; - hr = d3d7_CreateDevice((IDirect3D7 *)&ddraw_from_d3d3(iface)->IDirect3D7_vtbl, riid, - (IDirectDrawSurface7 *)surface, (IDirect3DDevice7 **)device); + hr = d3d7_CreateDevice(&This->IDirect3D7_iface, riid, (IDirectDrawSurface7 *)surface, + (IDirect3DDevice7 **)device); if (*device) *device = (IDirect3DDevice3 *)&((IDirect3DDeviceImpl *)*device)->IDirect3DDevice3_vtbl; return hr; @@ -4637,12 +4771,13 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid, static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid, IDirectDrawSurface *surface, IDirect3DDevice2 **device) { + IDirectDrawImpl *This = impl_from_IDirect3D2(iface); HRESULT hr; TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device); - hr = d3d7_CreateDevice((IDirect3D7 *)&ddraw_from_d3d2(iface)->IDirect3D7_vtbl, riid, + hr = d3d7_CreateDevice(&This->IDirect3D7_iface, riid, surface ? (IDirectDrawSurface7 *)surface_from_surface3((IDirectDrawSurface3 *)surface) : NULL, (IDirect3DDevice7 **)device); if (*device) *device = (IDirect3DDevice2 *)&((IDirect3DDeviceImpl *)*device)->IDirect3DDevice2_vtbl; @@ -4673,6 +4808,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid, static HRESULT WINAPI d3d7_CreateVertexBuffer(IDirect3D7 *iface, D3DVERTEXBUFFERDESC *desc, IDirect3DVertexBuffer7 **vertex_buffer, DWORD flags) { + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); IDirect3DVertexBufferImpl *object; HRESULT hr; @@ -4695,7 +4831,7 @@ static HRESULT WINAPI d3d7_CreateVertexBuffer(IDirect3D7 *iface, D3DVERTEXBUFFER return DDERR_OUTOFMEMORY; } - hr = d3d_vertex_buffer_init(object, ddraw_from_d3d7(iface), desc); + hr = d3d_vertex_buffer_init(object, This, desc); if (FAILED(hr)) { WARN("Failed to initialize vertex buffer, hr %#x.\n", hr); @@ -4712,7 +4848,7 @@ static HRESULT WINAPI d3d7_CreateVertexBuffer(IDirect3D7 *iface, D3DVERTEXBUFFER static HRESULT WINAPI d3d3_CreateVertexBuffer(IDirect3D3 *iface, D3DVERTEXBUFFERDESC *desc, IDirect3DVertexBuffer **vertex_buffer, DWORD flags, IUnknown *outer_unknown) { - IDirectDrawImpl *This = ddraw_from_d3d3(iface); + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); HRESULT hr; TRACE("iface %p, desc %p, vertex_buffer %p, flags %#x, outer_unknown %p.\n", @@ -4720,8 +4856,8 @@ static HRESULT WINAPI d3d3_CreateVertexBuffer(IDirect3D3 *iface, D3DVERTEXBUFFER if (outer_unknown) return CLASS_E_NOAGGREGATION; - hr = d3d7_CreateVertexBuffer((IDirect3D7 *)&This->IDirect3D7_vtbl, - desc, (IDirect3DVertexBuffer7 **)vertex_buffer, flags); + hr = d3d7_CreateVertexBuffer(&This->IDirect3D7_iface, desc, + (IDirect3DVertexBuffer7 **)vertex_buffer, flags); if (*vertex_buffer) *vertex_buffer = (IDirect3DVertexBuffer *)&((IDirect3DVertexBufferImpl *)*vertex_buffer)->IDirect3DVertexBuffer_vtbl; @@ -4749,7 +4885,7 @@ static HRESULT WINAPI d3d3_CreateVertexBuffer(IDirect3D3 *iface, D3DVERTEXBUFFER static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device_iid, LPD3DENUMPIXELFORMATSCALLBACK callback, void *context) { - IDirectDrawImpl *ddraw = ddraw_from_d3d7(iface); + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); WINED3DDISPLAYMODE d3ddm; WINED3DDEVTYPE type; unsigned int i; @@ -4808,11 +4944,11 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device * not like that we'll have to find some workaround, like iterating over * all imaginable formats and collecting all the depth stencil formats we * can get. */ - hr = IWineD3DDevice_GetDisplayMode(ddraw->wineD3DDevice, 0, &d3ddm); + hr = wined3d_device_get_display_mode(This->wined3d_device, 0, &d3ddm); for (i = 0; i < (sizeof(formats) / sizeof(*formats)); ++i) { - hr = IWineD3D_CheckDeviceFormat(ddraw->wineD3D, WINED3DADAPTER_DEFAULT, type, d3ddm.Format, + hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, type, d3ddm.Format, WINED3DUSAGE_DEPTHSTENCIL, WINED3DRTYPE_SURFACE, formats[i], SURFACE_OPENGL); if (SUCCEEDED(hr)) { @@ -4841,11 +4977,12 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device static HRESULT WINAPI d3d3_EnumZBufferFormats(IDirect3D3 *iface, REFCLSID device_iid, LPD3DENUMPIXELFORMATSCALLBACK callback, void *context) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); + TRACE("iface %p, device_iid %s, callback %p, context %p.\n", iface, debugstr_guid(device_iid), callback, context); - return d3d7_EnumZBufferFormats((IDirect3D7 *)&ddraw_from_d3d3(iface)->IDirect3D7_vtbl, - device_iid, callback, context); + return d3d7_EnumZBufferFormats(&This->IDirect3D7_iface, device_iid, callback, context); } /***************************************************************************** @@ -4872,9 +5009,11 @@ static HRESULT WINAPI d3d7_EvictManagedTextures(IDirect3D7 *iface) static HRESULT WINAPI d3d3_EvictManagedTextures(IDirect3D3 *iface) { + IDirectDrawImpl *This = impl_from_IDirect3D3(iface); + TRACE("iface %p.\n", iface); - return d3d7_EvictManagedTextures((IDirect3D7 *)&ddraw_from_d3d3(iface)->IDirect3D7_vtbl); + return d3d7_EvictManagedTextures(&This->IDirect3D7_iface); } /***************************************************************************** @@ -4893,7 +5032,7 @@ static HRESULT WINAPI d3d3_EvictManagedTextures(IDirect3D3 *iface) * D3D_OK on success, or the return value of IWineD3D::GetCaps * *****************************************************************************/ -HRESULT IDirect3DImpl_GetCaps(IWineD3D *wined3d, D3DDEVICEDESC *desc1, D3DDEVICEDESC7 *desc7) +HRESULT IDirect3DImpl_GetCaps(const struct wined3d *wined3d, D3DDEVICEDESC *desc1, D3DDEVICEDESC7 *desc7) { WINED3DCAPS wined3d_caps; HRESULT hr; @@ -4903,7 +5042,7 @@ HRESULT IDirect3DImpl_GetCaps(IWineD3D *wined3d, D3DDEVICEDESC *desc1, D3DDEVICE memset(&wined3d_caps, 0, sizeof(wined3d_caps)); EnterCriticalSection(&ddraw_cs); - hr = IWineD3D_GetDeviceCaps(wined3d, 0, WINED3DDEVTYPE_HAL, &wined3d_caps); + hr = wined3d_get_device_caps(wined3d, 0, WINED3DDEVTYPE_HAL, &wined3d_caps); LeaveCriticalSection(&ddraw_cs); if (FAILED(hr)) { @@ -5428,14 +5567,13 @@ static const struct IDirect3DVtbl d3d1_vtbl = * fvf: Fvf to find the decl for * * Returns: - * NULL in case of an error, the IWineD3DVertexDeclaration interface for the - * fvf otherwise. + * NULL in case of an error, the vertex declaration for the FVF otherwise. * *****************************************************************************/ -IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) +struct wined3d_vertex_declaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) { + struct wined3d_vertex_declaration *pDecl = NULL; HRESULT hr; - IWineD3DVertexDeclaration* pDecl = NULL; int p, low, high; /* deliberately signed */ struct FvfToDecl *convertedDecls = This->decls; @@ -5457,7 +5595,7 @@ IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) } TRACE("not found. Creating and inserting at position %d.\n", low); - hr = IWineD3DDevice_CreateVertexDeclarationFromFVF(This->wineD3DDevice, + hr = wined3d_vertex_declaration_create_from_fvf(This->wined3d_device, fvf, This, &ddraw_null_wined3d_parent_ops, &pDecl); if (hr != S_OK) return NULL; @@ -5465,9 +5603,9 @@ IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) int grow = max(This->declArraySize / 2, 8); convertedDecls = HeapReAlloc(GetProcessHeap(), 0, convertedDecls, sizeof(convertedDecls[0]) * (This->numConvertedDecls + grow)); - if(!convertedDecls) { - /* This will destroy it */ - IWineD3DVertexDeclaration_Release(pDecl); + if (!convertedDecls) + { + wined3d_vertex_declaration_decref(pDecl); return NULL; } This->decls = convertedDecls; @@ -5483,50 +5621,29 @@ IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) return pDecl; } -/* IWineD3DDeviceParent IUnknown methods */ - -static inline struct IDirectDrawImpl *ddraw_from_device_parent(IWineD3DDeviceParent *iface) +static inline struct IDirectDrawImpl *ddraw_from_device_parent(struct wined3d_device_parent *device_parent) { - return (struct IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(struct IDirectDrawImpl, device_parent_vtbl)); + return CONTAINING_RECORD(device_parent, struct IDirectDrawImpl, device_parent); } -static HRESULT STDMETHODCALLTYPE device_parent_QueryInterface(IWineD3DDeviceParent *iface, REFIID riid, void **object) +static void CDECL device_parent_wined3d_device_created(struct wined3d_device_parent *device_parent, + struct wined3d_device *device) { - struct IDirectDrawImpl *This = ddraw_from_device_parent(iface); - return ddraw7_QueryInterface((IDirectDraw7 *)This, riid, object); + TRACE("device_parent %p, device %p.\n", device_parent, device); } -static ULONG STDMETHODCALLTYPE device_parent_AddRef(IWineD3DDeviceParent *iface) +static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, + WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface) { - struct IDirectDrawImpl *This = ddraw_from_device_parent(iface); - return ddraw7_AddRef((IDirectDraw7 *)This); -} - -static ULONG STDMETHODCALLTYPE device_parent_Release(IWineD3DDeviceParent *iface) -{ - struct IDirectDrawImpl *This = ddraw_from_device_parent(iface); - return ddraw7_Release((IDirectDraw7 *)This); -} - -/* IWineD3DDeviceParent methods */ - -static void STDMETHODCALLTYPE device_parent_WineD3DDeviceCreated(IWineD3DDeviceParent *iface, IWineD3DDevice *device) -{ - TRACE("iface %p, device %p\n", iface, device); -} - -static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, - WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, IWineD3DSurface **surface) -{ - struct IDirectDrawImpl *This = ddraw_from_device_parent(iface); + struct IDirectDrawImpl *ddraw = ddraw_from_device_parent(device_parent); IDirectDrawSurfaceImpl *surf = NULL; UINT i = 0; - DDSCAPS2 searchcaps = This->tex_root->surface_desc.ddsCaps; + DDSCAPS2 searchcaps = ddraw->tex_root->surface_desc.ddsCaps; - TRACE("iface %p, superior %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, level %u, face %u, surface %p\n", - iface, superior, width, height, format, usage, pool, level, face, surface); + TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" + "\tpool %#x, level %u, face %u, surface %p.\n", + device_parent, container_parent, width, height, format, usage, pool, level, face, surface); searchcaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_ALLFACES; switch(face) @@ -5537,7 +5654,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen { searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEX; } - surf = This->tex_root; break; + surf = ddraw->tex_root; break; case WINED3DCUBEMAP_FACE_NEGATIVE_X: TRACE("Asked for negative x\n"); searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEX; break; @@ -5559,7 +5676,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen if (!surf) { IDirectDrawSurface7 *attached; - IDirectDrawSurface7_GetAttachedSurface((IDirectDrawSurface7 *)This->tex_root, &searchcaps, &attached); + IDirectDrawSurface7_GetAttachedSurface((IDirectDrawSurface7 *)ddraw->tex_root, &searchcaps, &attached); surf = (IDirectDrawSurfaceImpl *)attached; IDirectDrawSurface7_Release(attached); } @@ -5577,8 +5694,8 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen } /* Return the surface */ - *surface = surf->WineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = surf->wined3d_surface; + wined3d_surface_incref(*surface); TRACE("Returning wineD3DSurface %p, it belongs to surface %p\n", *surface, surf); @@ -5606,18 +5723,19 @@ static HRESULT WINAPI findRenderTarget(IDirectDrawSurface7 *surface, DDSURFACEDE return DDENUMRET_OK; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format, +static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable, - IWineD3DSurface **surface) + struct wined3d_surface **surface) { - struct IDirectDrawImpl *This = ddraw_from_device_parent(iface); - IDirectDrawSurfaceImpl *d3d_surface = This->d3d_target; + struct IDirectDrawImpl *ddraw = ddraw_from_device_parent(device_parent); + IDirectDrawSurfaceImpl *d3d_surface = ddraw->d3d_target; IDirectDrawSurfaceImpl *target = NULL; - TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n" - "\tmultisample_quality %u, lockable %u, surface %p\n", - iface, superior, width, height, format, multisample_type, multisample_quality, lockable, surface); + TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n" + "\tmultisample_quality %u, lockable %u, surface %p.\n", + device_parent, container_parent, width, height, format, multisample_type, + multisample_quality, lockable, surface); if (d3d_surface->isRenderTarget) { @@ -5630,14 +5748,14 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice if (!target) { - target = This->d3d_target; - ERR(" (%p) : No DirectDrawSurface found to create the back buffer. Using the front buffer as back buffer. Uncertain consequences\n", This); + target = ddraw->d3d_target; + ERR(" (%p) : No DirectDrawSurface found to create the back buffer. Using the front buffer as back buffer. Uncertain consequences\n", ddraw); } /* TODO: Return failure if the dimensions do not match, but this shouldn't happen */ - *surface = target->WineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = target->wined3d_surface; + wined3d_surface_incref(*surface); target->isRenderTarget = TRUE; TRACE("Returning wineD3DSurface %p, it belongs to surface %p\n", *surface, d3d_surface); @@ -5645,18 +5763,18 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice return D3D_OK; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface, +static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent, UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type, - DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface) + DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface) { - struct IDirectDrawImpl *This = ddraw_from_device_parent(iface); + struct IDirectDrawImpl *ddraw = ddraw_from_device_parent(device_parent); IDirectDrawSurfaceImpl *ddraw_surface; DDSURFACEDESC2 ddsd; HRESULT hr; - TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x,\n" - "\tmultisample_quality %u, discard %u, surface %p\n", - iface, width, height, format, multisample_type, multisample_quality, discard, surface); + TRACE("device_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n" + "\tmultisample_quality %u, discard %u, surface %p.\n", + device_parent, width, height, format, multisample_type, multisample_quality, discard, surface); *surface = NULL; @@ -5677,89 +5795,74 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3 ddsd.dwFlags ^= DDSD_PIXELFORMAT; } - This->depthstencil = TRUE; - hr = IDirectDraw7_CreateSurface((IDirectDraw7 *)This, &ddsd, (IDirectDrawSurface7 **)&ddraw_surface, NULL); - This->depthstencil = FALSE; - if(FAILED(hr)) + ddraw->depthstencil = TRUE; + hr = IDirectDraw7_CreateSurface(&ddraw->IDirectDraw7_iface, &ddsd, + (IDirectDrawSurface7 **)&ddraw_surface, NULL); + ddraw->depthstencil = FALSE; + if (FAILED(hr)) { - ERR(" (%p) Creating a DepthStencil Surface failed, result = %x\n", This, hr); + WARN("Failed to create depth/stencil surface, hr %#x.\n", hr); return hr; } - *surface = ddraw_surface->WineD3DSurface; - IWineD3DSurface_AddRef(*surface); + *surface = ddraw_surface->wined3d_surface; + wined3d_surface_incref(*surface); IDirectDrawSurface7_Release((IDirectDrawSurface7 *)ddraw_surface); return D3D_OK; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface, - IUnknown *superior, UINT width, UINT height, UINT depth, enum wined3d_format_id format, - WINED3DPOOL pool, DWORD usage, IWineD3DVolume **volume) +static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *device_parent, + void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format, + WINED3DPOOL pool, DWORD usage, struct wined3d_volume **volume) { - TRACE("iface %p, superior %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p\n", - iface, superior, width, height, depth, format, pool, usage, volume); + TRACE("device_parent %p, container_parent %p, width %u, height %u, depth %u, " + "format %#x, pool %#x, usage %#x, volume %p.\n", + device_parent, container_parent, width, height, depth, + format, pool, usage, volume); ERR("Not implemented!\n"); return E_NOTIMPL; } -static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDeviceParent *iface, - WINED3DPRESENT_PARAMETERS *present_parameters, IWineD3DSwapChain **swapchain) +static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent *device_parent, + WINED3DPRESENT_PARAMETERS *present_parameters, struct wined3d_swapchain **swapchain) { - struct IDirectDrawImpl *This = ddraw_from_device_parent(iface); + struct IDirectDrawImpl *ddraw = ddraw_from_device_parent(device_parent); IDirectDrawSurfaceImpl *iterator; - IParentImpl *object; HRESULT hr; - TRACE("iface %p, present_parameters %p, swapchain %p\n", iface, present_parameters, swapchain); + TRACE("device_parent %p, present_parameters %p, swapchain %p.\n", device_parent, present_parameters, swapchain); - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IParentImpl)); - if (!object) - { - FIXME("Allocation of memory failed\n"); - *swapchain = NULL; - return DDERR_OUTOFVIDEOMEMORY; - } - - ddraw_parent_init(object); - - hr = IWineD3DDevice_CreateSwapChain(This->wineD3DDevice, present_parameters, - This->ImplType, object, swapchain); + hr = wined3d_swapchain_create(ddraw->wined3d_device, present_parameters, + ddraw->ImplType, NULL, &ddraw_null_wined3d_parent_ops, swapchain); if (FAILED(hr)) { - FIXME("(%p) CreateSwapChain failed, returning %#x\n", iface, hr); - HeapFree(GetProcessHeap(), 0 , object); + WARN("Failed to create swapchain, hr %#x.\n", hr); *swapchain = NULL; return hr; } - object->child = (IUnknown *)*swapchain; - This->d3d_target->wineD3DSwapChain = *swapchain; - iterator = This->d3d_target->complex_array[0]; + ddraw->d3d_target->wined3d_swapchain = *swapchain; + iterator = ddraw->d3d_target->complex_array[0]; while (iterator) { - iterator->wineD3DSwapChain = *swapchain; + iterator->wined3d_swapchain = *swapchain; iterator = iterator->complex_array[0]; } return hr; } -static const IWineD3DDeviceParentVtbl ddraw_wined3d_device_parent_vtbl = +static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops = { - /* IUnknown methods */ - device_parent_QueryInterface, - device_parent_AddRef, - device_parent_Release, - /* IWineD3DDeviceParent methods */ - device_parent_WineD3DDeviceCreated, - device_parent_CreateSurface, - device_parent_CreateRenderTarget, - device_parent_CreateDepthStencilSurface, - device_parent_CreateVolume, - device_parent_CreateSwapChain, + device_parent_wined3d_device_created, + device_parent_create_surface, + device_parent_create_rendertarget, + device_parent_create_depth_stencil, + device_parent_create_volume, + device_parent_create_swapchain, }; HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type) @@ -5767,16 +5870,16 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type) HRESULT hr; HDC hDC; - ddraw->lpVtbl = &ddraw7_vtbl; - ddraw->IDirectDraw_vtbl = &ddraw1_vtbl; - ddraw->IDirectDraw2_vtbl = &ddraw2_vtbl; - ddraw->IDirectDraw3_vtbl = &ddraw3_vtbl; - ddraw->IDirectDraw4_vtbl = &ddraw4_vtbl; - ddraw->IDirect3D_vtbl = &d3d1_vtbl; - ddraw->IDirect3D2_vtbl = &d3d2_vtbl; - ddraw->IDirect3D3_vtbl = &d3d3_vtbl; - ddraw->IDirect3D7_vtbl = &d3d7_vtbl; - ddraw->device_parent_vtbl = &ddraw_wined3d_device_parent_vtbl; + ddraw->IDirectDraw7_iface.lpVtbl = &ddraw7_vtbl; + ddraw->IDirectDraw_iface.lpVtbl = &ddraw1_vtbl; + ddraw->IDirectDraw2_iface.lpVtbl = &ddraw2_vtbl; + ddraw->IDirectDraw3_iface.lpVtbl = &ddraw3_vtbl; + ddraw->IDirectDraw4_iface.lpVtbl = &ddraw4_vtbl; + ddraw->IDirect3D_iface.lpVtbl = &d3d1_vtbl; + ddraw->IDirect3D2_iface.lpVtbl = &d3d2_vtbl; + ddraw->IDirect3D3_iface.lpVtbl = &d3d3_vtbl; + ddraw->IDirect3D7_iface.lpVtbl = &d3d7_vtbl; + ddraw->device_parent.ops = &ddraw_wined3d_device_parent_ops; ddraw->numIfaces = 1; ddraw->ref7 = 1; @@ -5791,30 +5894,24 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type) ddraw->orig_width = GetSystemMetrics(SM_CXSCREEN); ddraw->orig_height = GetSystemMetrics(SM_CYSCREEN); - if (!LoadWineD3D()) - { - ERR("Failed to load wined3d - broken OpenGL setup?\n"); - return DDERR_NODIRECTDRAWSUPPORT; - } - - ddraw->wineD3D = pWineDirect3DCreate(7, (IUnknown *)ddraw); + ddraw->wineD3D = wined3d_create(7, &ddraw->IDirectDraw7_iface); if (!ddraw->wineD3D) { WARN("Failed to create a wined3d object.\n"); return E_OUTOFMEMORY; } - hr = IWineD3D_CreateDevice(ddraw->wineD3D, WINED3DADAPTER_DEFAULT, device_type, NULL, 0, - (IWineD3DDeviceParent *)&ddraw->device_parent_vtbl, &ddraw->wineD3DDevice); + hr = wined3d_device_create(ddraw->wineD3D, WINED3DADAPTER_DEFAULT, device_type, + NULL, 0, &ddraw->device_parent, &ddraw->wined3d_device); if (FAILED(hr)) { WARN("Failed to create a wined3d device, hr %#x.\n", hr); - IWineD3D_Release(ddraw->wineD3D); + wined3d_decref(ddraw->wineD3D); return hr; } /* Get the amount of video memory */ - ddraw->total_vidmem = IWineD3DDevice_GetAvailableTextureMem(ddraw->wineD3DDevice); + ddraw->total_vidmem = wined3d_device_get_available_texture_mem(ddraw->wined3d_device); list_init(&ddraw->surface_list); diff --git a/dll/directx/wine/ddraw/ddraw_private.h b/dll/directx/wine/ddraw/ddraw_private.h index 91662fe3003..78e69b77aad 100644 --- a/dll/directx/wine/ddraw/ddraw_private.h +++ b/dll/directx/wine/ddraw/ddraw_private.h @@ -38,32 +38,9 @@ #include "wine/wined3d.h" #include "legacy.h" +extern const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops DECLSPEC_HIDDEN; extern const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops DECLSPEC_HIDDEN; -/***************************************************************************** - * IParent - a helper interface - *****************************************************************************/ -DEFINE_GUID(IID_IParent, 0xc20e4c88, 0x74e7, 0x4940, 0xba, 0x9f, 0x2e, 0x32, 0x3f, 0x9d, 0xc9, 0x81); -typedef struct IParent *LPPARENT, *PPARENT; - -#define INTERFACE IParent -DECLARE_INTERFACE_(IParent,IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; -}; -#undef INTERFACE - -#if !defined(__cplusplus) || defined(CINTERFACE) -/*** IUnknown methods ***/ -#define IParent_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IParent_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IParent_Release(p) (p)->lpVtbl->Release(p) -#endif - - /* Typdef the interfaces */ typedef struct IDirectDrawImpl IDirectDrawImpl; typedef struct IDirectDrawSurfaceImpl IDirectDrawSurfaceImpl; @@ -75,10 +52,6 @@ typedef struct IDirect3DViewportImpl IDirect3DViewportImpl; typedef struct IDirect3DMaterialImpl IDirect3DMaterialImpl; typedef struct IDirect3DExecuteBufferImpl IDirect3DExecuteBufferImpl; typedef struct IDirect3DVertexBufferImpl IDirect3DVertexBufferImpl; -typedef struct IParentImpl IParentImpl; - -/* Callbacks for implicit object destruction */ -extern ULONG WINAPI D3D7CB_DestroySwapChain(IWineD3DSwapChain *pSwapChain) DECLSPEC_HIDDEN; /* Global critical section */ extern CRITICAL_SECTION ddraw_cs DECLSPEC_HIDDEN; @@ -91,29 +64,29 @@ extern DWORD force_refresh_rate DECLSPEC_HIDDEN; struct FvfToDecl { DWORD fvf; - IWineD3DVertexDeclaration *decl; + struct wined3d_vertex_declaration *decl; }; struct IDirectDrawImpl { - /* IUnknown fields */ - const IDirectDraw7Vtbl *lpVtbl; - const IDirectDraw4Vtbl *IDirectDraw4_vtbl; - const IDirectDraw3Vtbl *IDirectDraw3_vtbl; - const IDirectDraw2Vtbl *IDirectDraw2_vtbl; - const IDirectDrawVtbl *IDirectDraw_vtbl; - const IDirect3D7Vtbl *IDirect3D7_vtbl; - const IDirect3D3Vtbl *IDirect3D3_vtbl; - const IDirect3D2Vtbl *IDirect3D2_vtbl; - const IDirect3DVtbl *IDirect3D_vtbl; - const IWineD3DDeviceParentVtbl *device_parent_vtbl; + /* Interfaces */ + IDirectDraw7 IDirectDraw7_iface; + IDirectDraw4 IDirectDraw4_iface; + IDirectDraw3 IDirectDraw3_iface; + IDirectDraw2 IDirectDraw2_iface; + IDirectDraw IDirectDraw_iface; + IDirect3D7 IDirect3D7_iface; + IDirect3D3 IDirect3D3_iface; + IDirect3D2 IDirect3D2_iface; + IDirect3D IDirect3D_iface; + struct wined3d_device_parent device_parent; /* See comment in IDirectDraw::AddRef */ LONG ref7, ref4, ref2, ref3, ref1, numIfaces; /* WineD3D linkage */ - IWineD3D *wineD3D; - IWineD3DDevice *wineD3DDevice; + struct wined3d *wineD3D; + struct wined3d_device *wined3d_device; BOOL d3d_initialized; /* Misc ddraw fields */ @@ -183,35 +156,11 @@ void DDRAW_Convert_DDSCAPS_1_To_2(const DDSCAPS *pIn, DDSCAPS2 *pOut) DECLSPEC_H void DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(const DDDEVICEIDENTIFIER2 *pIn, DDDEVICEIDENTIFIER *pOut) DECLSPEC_HIDDEN; HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDESC2 *desc, void *Context) DECLSPEC_HIDDEN; -IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) DECLSPEC_HIDDEN; - -static inline IDirectDrawImpl *ddraw_from_d3d1(IDirect3D *iface) -{ - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirect3D_vtbl)); -} - -static inline IDirectDrawImpl *ddraw_from_d3d2(IDirect3D2 *iface) -{ - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirect3D2_vtbl)); -} - -static inline IDirectDrawImpl *ddraw_from_d3d3(IDirect3D3 *iface) -{ - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirect3D3_vtbl)); -} - -static inline IDirectDrawImpl *ddraw_from_d3d7(IDirect3D7 *iface) -{ - return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirect3D7_vtbl)); -} +struct wined3d_vertex_declaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) DECLSPEC_HIDDEN; /* The default surface type */ extern WINED3DSURFTYPE DefaultSurfaceType DECLSPEC_HIDDEN; -extern typeof(WineDirect3DCreateClipper) *pWineDirect3DCreateClipper DECLSPEC_HIDDEN; -extern typeof(WineDirect3DCreate) *pWineDirect3DCreate DECLSPEC_HIDDEN; - - /***************************************************************************** * IDirectDrawSurface implementation structure *****************************************************************************/ @@ -232,9 +181,9 @@ struct IDirectDrawSurfaceImpl /* Connections to other Objects */ IDirectDrawImpl *ddraw; - IWineD3DSurface *WineD3DSurface; - IWineD3DBaseTexture *wineD3DTexture; - IWineD3DSwapChain *wineD3DSwapChain; + struct wined3d_surface *wined3d_surface; + struct wined3d_texture *wined3d_texture; + struct wined3d_swapchain *wined3d_swapchain; /* This implementation handles attaching surfaces to other surfaces */ IDirectDrawSurfaceImpl *next_attached; @@ -272,6 +221,7 @@ struct IDirectDrawSurfaceImpl DWORD Handle; }; +HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface) DECLSPEC_HIDDEN; void ddraw_surface_destroy(IDirectDrawSurfaceImpl *surface) DECLSPEC_HIDDEN; HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddraw, DDSURFACEDESC2 *desc, UINT mip_level, WINED3DSURFTYPE surface_type) DECLSPEC_HIDDEN; @@ -295,26 +245,6 @@ static inline IDirectDrawSurfaceImpl *surface_from_surface3(IDirectDrawSurface3 #define PFGET_BPP(pf) (pf.dwFlags&DDPF_PALETTEINDEXED8?1:((pf.dwRGBBitCount+7)/8)) #define GET_BPP(desc) PFGET_BPP(desc.ddpfPixelFormat) -/***************************************************************************** - * IParent Implementation - *****************************************************************************/ -struct IParentImpl -{ - /* IUnknown fields */ - const IParentVtbl *lpVtbl; - LONG ref; - - /* IParentImpl fields */ - IUnknown *child; - -}; - -void ddraw_parent_init(IParentImpl *parent) DECLSPEC_HIDDEN; - -/***************************************************************************** - * IDirect3DDevice implementation - *****************************************************************************/ - #define DDRAW_INVALID_HANDLE ~0U enum ddraw_handle_type @@ -356,13 +286,13 @@ struct IDirect3DDeviceImpl LONG ref; /* Other object connections */ - IWineD3DDevice *wineD3DDevice; + struct wined3d_device *wined3d_device; IDirectDrawImpl *ddraw; - IWineD3DBuffer *indexbuffer; + struct wined3d_buffer *indexbuffer; IDirectDrawSurfaceImpl *target; /* Viewport management */ - IDirect3DViewportImpl *viewport_list; + struct list viewport_list; IDirect3DViewportImpl *current_viewport; D3DVIEWPORT7 active_viewport; @@ -393,7 +323,8 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, extern const GUID IID_D3DDEVICE_WineD3D DECLSPEC_HIDDEN; /* Helper functions */ -HRESULT IDirect3DImpl_GetCaps(IWineD3D *WineD3D, D3DDEVICEDESC *Desc123, D3DDEVICEDESC7 *Desc7) DECLSPEC_HIDDEN; +HRESULT IDirect3DImpl_GetCaps(const struct wined3d *wined3d, + D3DDEVICEDESC *Desc123, D3DDEVICEDESC7 *Desc7) DECLSPEC_HIDDEN; WINED3DZBUFFERTYPE IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) DECLSPEC_HIDDEN; static inline IDirect3DDeviceImpl *device_from_device1(IDirect3DDevice *iface) @@ -435,7 +366,7 @@ struct IDirectDrawClipperImpl const IDirectDrawClipperVtbl *lpVtbl; LONG ref; - IWineD3DClipper *wineD3DClipper; + struct wined3d_clipper *wineD3DClipper; BOOL initialized; }; @@ -450,8 +381,7 @@ struct IDirectDrawPaletteImpl const IDirectDrawPaletteVtbl *lpVtbl; LONG ref; - /* WineD3D uplink */ - IWineD3DPalette *wineD3DPalette; + struct wined3d_palette *wineD3DPalette; /* IDirectDrawPalette fields */ IUnknown *ifaceToRelease; @@ -460,17 +390,6 @@ struct IDirectDrawPaletteImpl HRESULT ddraw_palette_init(IDirectDrawPaletteImpl *palette, IDirectDrawImpl *ddraw, DWORD flags, PALETTEENTRY *entries) DECLSPEC_HIDDEN; -/****************************************************************************** - * DirectDraw ClassFactory implementation - incomplete - ******************************************************************************/ -typedef struct -{ - const IClassFactoryVtbl *lpVtbl; - - LONG ref; - HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, REFIID iid, LPVOID *ppObj); -} IClassFactoryImpl; - /* Helper structures */ struct object_creation_info { @@ -498,8 +417,7 @@ struct IDirect3DLightImpl DWORD dwLightIndex; - /* Chained list used for adding / removing from viewports */ - IDirect3DLightImpl *next; + struct list entry; }; /* Helper functions */ @@ -554,11 +472,8 @@ struct IDirect3DViewportImpl D3DVIEWPORT2 vp2; } viewports; - /* Field used to chain viewports together */ - IDirect3DViewportImpl *next; - - /* Lights list */ - IDirect3DLightImpl *lights; + struct list entry; + struct list light_list; /* Background material */ IDirect3DMaterialImpl *background; @@ -599,8 +514,8 @@ HRESULT d3d_execute_buffer_init(IDirect3DExecuteBufferImpl *execute_buffer, IDirect3DDeviceImpl *device, D3DEXECUTEBUFFERDESC *desc) DECLSPEC_HIDDEN; /* The execute function */ -void IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, - IDirect3DDeviceImpl *Device, IDirect3DViewportImpl *ViewportImpl) DECLSPEC_HIDDEN; +HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *execute_buffer, + IDirect3DDeviceImpl *device, IDirect3DViewportImpl *viewport) DECLSPEC_HIDDEN; /***************************************************************************** * IDirect3DVertexBuffer @@ -613,8 +528,8 @@ struct IDirect3DVertexBufferImpl LONG ref; /*** WineD3D and ddraw links ***/ - IWineD3DBuffer *wineD3DVertexBuffer; - IWineD3DVertexDeclaration *wineD3DVertexDeclaration; + struct wined3d_buffer *wineD3DVertexBuffer; + struct wined3d_vertex_declaration *wineD3DVertexDeclaration; IDirectDrawImpl *ddraw; /*** Storage for D3D7 specific things ***/ @@ -654,11 +569,6 @@ void DDRAW_dump_cooperativelevel(DWORD cooplevel) DECLSPEC_HIDDEN; * IDirect3DExecuteBuffer isn't in WineD3D */ void multiply_matrix(LPD3DMATRIX dest, const D3DMATRIX *src1, const D3DMATRIX *src2) DECLSPEC_HIDDEN; -void multiply_matrix_D3D_way(LPD3DMATRIX result, const D3DMATRIX *m1, const D3DMATRIX *m2) DECLSPEC_HIDDEN; - -/* Helper function in main.c */ -BOOL LoadWineD3D(void) DECLSPEC_HIDDEN; - /* Used for generic dumping */ typedef struct { @@ -679,22 +589,30 @@ typedef struct /* Structure copy */ #define ME(x,f,e) { x, #x, (void (*)(const void *))(f), offsetof(STRUCT, e) } -#define DD_STRUCT_COPY_BYSIZE(to,from) \ - do { \ - DWORD __size = (to)->dwSize; \ - DWORD __copysize = __size; \ - DWORD __resetsize = __size; \ - assert(to != from); \ - if (__resetsize > sizeof(*to)) \ - __resetsize = sizeof(*to); \ - memset(to,0,__resetsize); \ - if ((from)->dwSize < __size) \ - __copysize = (from)->dwSize; \ - memcpy(to,from,__copysize); \ - (to)->dwSize = __size;/*restore size*/ \ - } while (0) +#define DD_STRUCT_COPY_BYSIZE_(to,from,from_size) \ + do { \ + DWORD __size = (to)->dwSize; \ + DWORD __copysize = min(__size, from_size); \ + assert(to != from); \ + memcpy(to, from, __copysize); \ + memset((char*)(to) + __copysize, 0, __size - __copysize); \ + (to)->dwSize = __size; /* restore size */ \ + } while (0) +#define DD_STRUCT_COPY_BYSIZE(to,from) DD_STRUCT_COPY_BYSIZE_(to,from,(from)->dwSize) -#endif +#define SIZEOF_END_PADDING(type, last_field) \ + (sizeof(type) - offsetof(type, last_field) - sizeof(((type *)0)->last_field)) + +static inline void copy_to_surfacedesc2(DDSURFACEDESC2 *to, DDSURFACEDESC2 *from) +{ + DWORD from_size = from->dwSize; + if (from_size == sizeof(DDSURFACEDESC)) + from_size -= SIZEOF_END_PADDING(DDSURFACEDESC, ddsCaps); + to->dwSize = sizeof(DDSURFACEDESC2); /* for struct copy */ + DD_STRUCT_COPY_BYSIZE_(to, from, from_size); +} HRESULT hr_ddraw_from_wined3d(HRESULT hr) DECLSPEC_HIDDEN; + +#endif diff --git a/dll/directx/wine/ddraw/device.c b/dll/directx/wine/ddraw/device.c index 9f0f631724c..ad5edfe9019 100644 --- a/dll/directx/wine/ddraw/device.c +++ b/dll/directx/wine/ddraw/device.c @@ -116,47 +116,47 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface, *obj = iface; } - /* Check DirectDraw Interfacs */ + /* Check DirectDraw Interfaces. */ else if( IsEqualGUID( &IID_IDirectDraw7, refiid ) ) { - *obj = This->ddraw; + *obj = &This->ddraw->IDirectDraw7_iface; TRACE("(%p) Returning IDirectDraw7 interface at %p\n", This, *obj); } else if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) ) { - *obj = &This->ddraw->IDirectDraw4_vtbl; + *obj = &This->ddraw->IDirectDraw4_iface; TRACE("(%p) Returning IDirectDraw4 interface at %p\n", This, *obj); } else if ( IsEqualGUID( &IID_IDirectDraw2, refiid ) ) { - *obj = &This->ddraw->IDirectDraw2_vtbl; + *obj = &This->ddraw->IDirectDraw2_iface; TRACE("(%p) Returning IDirectDraw2 interface at %p\n", This, *obj); } else if( IsEqualGUID( &IID_IDirectDraw, refiid ) ) { - *obj = &This->ddraw->IDirectDraw_vtbl; + *obj = &This->ddraw->IDirectDraw_iface; TRACE("(%p) Returning IDirectDraw interface at %p\n", This, *obj); } /* Direct3D */ else if ( IsEqualGUID( &IID_IDirect3D , refiid ) ) { - *obj = &This->ddraw->IDirect3D_vtbl; + *obj = &This->ddraw->IDirect3D_iface; TRACE("(%p) Returning IDirect3D interface at %p\n", This, *obj); } else if ( IsEqualGUID( &IID_IDirect3D2 , refiid ) ) { - *obj = &This->ddraw->IDirect3D2_vtbl; + *obj = &This->ddraw->IDirect3D2_iface; TRACE("(%p) Returning IDirect3D2 interface at %p\n", This, *obj); } else if ( IsEqualGUID( &IID_IDirect3D3 , refiid ) ) { - *obj = &This->ddraw->IDirect3D3_vtbl; + *obj = &This->ddraw->IDirect3D3_iface; TRACE("(%p) Returning IDirect3D3 interface at %p\n", This, *obj); } else if ( IsEqualGUID( &IID_IDirect3D7 , refiid ) ) { - *obj = &This->ddraw->IDirect3D7_vtbl; + *obj = &This->ddraw->IDirect3D7_iface; TRACE("(%p) Returning IDirect3D7 interface at %p\n", This, *obj); } @@ -191,30 +191,24 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_QueryInterface(IDirect3DDevice3 *iface, - REFIID riid, - void **obj) +static HRESULT WINAPI IDirect3DDeviceImpl_3_QueryInterface(IDirect3DDevice3 *iface, REFIID riid, + void **obj) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obj); return IDirect3DDevice7_QueryInterface((IDirect3DDevice7 *)device_from_device3(iface), riid, obj); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_QueryInterface(IDirect3DDevice2 *iface, - REFIID riid, - void **obj) +static HRESULT WINAPI IDirect3DDeviceImpl_2_QueryInterface(IDirect3DDevice2 *iface, REFIID riid, + void **obj) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obj); return IDirect3DDevice7_QueryInterface((IDirect3DDevice7 *)device_from_device2(iface), riid, obj); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_QueryInterface(IDirect3DDevice *iface, - REFIID riid, - void **obp) +static HRESULT WINAPI IDirect3DDeviceImpl_1_QueryInterface(IDirect3DDevice *iface, REFIID riid, + void **obp) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obp); @@ -244,24 +238,21 @@ IDirect3DDeviceImpl_7_AddRef(IDirect3DDevice7 *iface) return ref; } -static ULONG WINAPI -Thunk_IDirect3DDeviceImpl_3_AddRef(IDirect3DDevice3 *iface) +static ULONG WINAPI IDirect3DDeviceImpl_3_AddRef(IDirect3DDevice3 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_AddRef((IDirect3DDevice7 *)device_from_device3(iface)); } -static ULONG WINAPI -Thunk_IDirect3DDeviceImpl_2_AddRef(IDirect3DDevice2 *iface) +static ULONG WINAPI IDirect3DDeviceImpl_2_AddRef(IDirect3DDevice2 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_AddRef((IDirect3DDevice7 *)device_from_device2(iface)); } -static ULONG WINAPI -Thunk_IDirect3DDeviceImpl_1_AddRef(IDirect3DDevice *iface) +static ULONG WINAPI IDirect3DDeviceImpl_1_AddRef(IDirect3DDevice *iface) { TRACE("iface %p.\n", iface); @@ -294,33 +285,24 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface) */ if (ref == 0) { - IParent *IndexBufferParent; DWORD i; EnterCriticalSection(&ddraw_cs); - /* Free the index buffer. */ - IWineD3DDevice_SetIndexBuffer(This->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN); - IndexBufferParent = IWineD3DBuffer_GetParent(This->indexbuffer); - if (IParent_Release(IndexBufferParent)) - { - ERR(" (%p) Something is still holding the index buffer parent %p\n", This, IndexBufferParent); - } - /* There is no need to unset the vertex buffer here, IWineD3DDevice_Uninit3D will do that when - * destroying the primary stateblock. If a vertex buffer is destroyed while it is bound - * IDirect3DVertexBuffer::Release will unset it. - */ + /* There is no need to unset any resources here, wined3d will take + * care of that on Uninit3D(). */ + + /* Free the index buffer. */ + wined3d_buffer_decref(This->indexbuffer); /* Set the device up to render to the front buffer since the back * buffer will vanish soon. */ - IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0, - This->ddraw->d3d_target->WineD3DSurface, TRUE); + wined3d_device_set_render_target(This->wined3d_device, 0, + This->ddraw->d3d_target->wined3d_surface, TRUE); - /* Release the WineD3DDevice. This won't destroy it */ - if(IWineD3DDevice_Release(This->wineD3DDevice) <= 0) - { - ERR(" (%p) The wineD3D device %p was destroyed unexpectedly. Prepare for trouble\n", This, This->wineD3DDevice); - } + /* Release the WineD3DDevice. This won't destroy it. */ + if (!wined3d_device_decref(This->wined3d_device)) + ERR("The wined3d device (%p) was destroyed unexpectedly.\n", This->wined3d_device); /* The texture handles should be unset by now, but there might be some bits * missing in our reference counting(needs test). Do a sanity check. */ @@ -392,24 +374,21 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface) return ref; } -static ULONG WINAPI -Thunk_IDirect3DDeviceImpl_3_Release(IDirect3DDevice3 *iface) +static ULONG WINAPI IDirect3DDeviceImpl_3_Release(IDirect3DDevice3 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_Release((IDirect3DDevice7 *)device_from_device3(iface)); } -static ULONG WINAPI -Thunk_IDirect3DDeviceImpl_2_Release(IDirect3DDevice2 *iface) +static ULONG WINAPI IDirect3DDeviceImpl_2_Release(IDirect3DDevice2 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_Release((IDirect3DDevice7 *)device_from_device2(iface)); } -static ULONG WINAPI -Thunk_IDirect3DDeviceImpl_1_Release(IDirect3DDevice *iface) +static ULONG WINAPI IDirect3DDeviceImpl_1_Release(IDirect3DDevice *iface) { TRACE("iface %p.\n", iface); @@ -531,20 +510,16 @@ IDirect3DDeviceImpl_3_GetCaps(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetCaps(IDirect3DDevice2 *iface, - D3DDEVICEDESC *D3DHWDevDesc, - D3DDEVICEDESC *D3DHELDevDesc) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetCaps(IDirect3DDevice2 *iface, + D3DDEVICEDESC *D3DHWDevDesc, D3DDEVICEDESC *D3DHELDevDesc) { IDirect3DDeviceImpl *This = device_from_device2(iface); TRACE("iface %p, hw_desc %p, hel_desc %p.\n", iface, D3DHWDevDesc, D3DHELDevDesc); return IDirect3DDevice3_GetCaps((IDirect3DDevice3 *)&This->IDirect3DDevice3_vtbl, D3DHWDevDesc, D3DHELDevDesc); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_GetCaps(IDirect3DDevice *iface, - D3DDEVICEDESC *D3DHWDevDesc, - D3DDEVICEDESC *D3DHELDevDesc) +static HRESULT WINAPI IDirect3DDeviceImpl_1_GetCaps(IDirect3DDevice *iface, + D3DDEVICEDESC *D3DHWDevDesc, D3DDEVICEDESC *D3DHELDevDesc) { IDirect3DDeviceImpl *This = device_from_device1(iface); TRACE("iface %p, hw_desc %p, hel_desc %p.\n", iface, D3DHWDevDesc, D3DHELDevDesc); @@ -589,10 +564,8 @@ IDirect3DDeviceImpl_2_SwapTextureHandles(IDirect3DDevice2 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_SwapTextureHandles(IDirect3DDevice *iface, - IDirect3DTexture *D3DTex1, - IDirect3DTexture *D3DTex2) +static HRESULT WINAPI IDirect3DDeviceImpl_1_SwapTextureHandles(IDirect3DDevice *iface, + IDirect3DTexture *D3DTex1, IDirect3DTexture *D3DTex2) { IDirect3DDeviceImpl *This = device_from_device1(iface); IDirectDrawSurfaceImpl *surf1 = surface_from_texture1(D3DTex1); @@ -642,9 +615,7 @@ IDirect3DDeviceImpl_3_GetStats(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetStats(IDirect3DDevice2 *iface, - D3DSTATS *Stats) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetStats(IDirect3DDevice2 *iface, D3DSTATS *Stats) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -653,9 +624,7 @@ Thunk_IDirect3DDeviceImpl_2_GetStats(IDirect3DDevice2 *iface, return IDirect3DDevice3_GetStats((IDirect3DDevice3 *)&This->IDirect3DDevice3_vtbl, Stats); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_GetStats(IDirect3DDevice *iface, - D3DSTATS *Stats) +static HRESULT WINAPI IDirect3DDeviceImpl_1_GetStats(IDirect3DDevice *iface, D3DSTATS *Stats) { IDirect3DDeviceImpl *This = device_from_device1(iface); @@ -747,6 +716,7 @@ IDirect3DDeviceImpl_1_Execute(IDirect3DDevice *iface, IDirect3DDeviceImpl *This = device_from_device1(iface); IDirect3DExecuteBufferImpl *Direct3DExecuteBufferImpl = (IDirect3DExecuteBufferImpl *)ExecuteBuffer; IDirect3DViewportImpl *Direct3DViewportImpl = (IDirect3DViewportImpl *)Viewport; + HRESULT hr; TRACE("iface %p, buffer %p, viewport %p, flags %#x.\n", iface, ExecuteBuffer, Viewport, Flags); @@ -755,10 +725,10 @@ IDirect3DDeviceImpl_1_Execute(IDirect3DDevice *iface, /* Execute... */ EnterCriticalSection(&ddraw_cs); - IDirect3DExecuteBufferImpl_Execute(Direct3DExecuteBufferImpl, This, Direct3DViewportImpl); + hr = d3d_execute_buffer_execute(Direct3DExecuteBufferImpl, This, Direct3DViewportImpl); LeaveCriticalSection(&ddraw_cs); - return D3D_OK; + return hr; } /***************************************************************************** @@ -792,8 +762,7 @@ IDirect3DDeviceImpl_3_AddViewport(IDirect3DDevice3 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - vp->next = This->viewport_list; - This->viewport_list = vp; + list_add_head(&This->viewport_list, &vp->entry); vp->active_device = This; /* Viewport must be usable for Clear() after AddViewport, so set active_device here. */ LeaveCriticalSection(&ddraw_cs); @@ -801,9 +770,8 @@ IDirect3DDeviceImpl_3_AddViewport(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_AddViewport(IDirect3DDevice2 *iface, - IDirect3DViewport2 *Direct3DViewport2) +static HRESULT WINAPI IDirect3DDeviceImpl_2_AddViewport(IDirect3DDevice2 *iface, + IDirect3DViewport2 *Direct3DViewport2) { IDirect3DDeviceImpl *This = device_from_device2(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Direct3DViewport2; @@ -813,9 +781,8 @@ Thunk_IDirect3DDeviceImpl_2_AddViewport(IDirect3DDevice2 *iface, return IDirect3DDevice3_AddViewport((IDirect3DDevice3 *)&This->IDirect3DDevice3_vtbl, (IDirect3DViewport3 *)vp); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_AddViewport(IDirect3DDevice *iface, - IDirect3DViewport *Direct3DViewport) +static HRESULT WINAPI IDirect3DDeviceImpl_1_AddViewport(IDirect3DDevice *iface, + IDirect3DViewport *Direct3DViewport) { IDirect3DDeviceImpl *This = device_from_device1(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Direct3DViewport; @@ -841,39 +808,31 @@ Thunk_IDirect3DDeviceImpl_1_AddViewport(IDirect3DDevice *iface, * DDERR_INVALIDPARAMS if the viewport wasn't found in the list * *****************************************************************************/ -static HRESULT WINAPI -IDirect3DDeviceImpl_3_DeleteViewport(IDirect3DDevice3 *iface, - IDirect3DViewport3 *Viewport) +static HRESULT WINAPI IDirect3DDeviceImpl_3_DeleteViewport(IDirect3DDevice3 *iface, IDirect3DViewport3 *viewport) { - IDirect3DDeviceImpl *This = device_from_device3(iface); - IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *) Viewport; - IDirect3DViewportImpl *cur_viewport, *prev_viewport = NULL; + IDirect3DDeviceImpl *device = device_from_device3(iface); + IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)viewport; - TRACE("iface %p, viewport %p.\n", iface, Viewport); + TRACE("iface %p, viewport %p.\n", iface, viewport); EnterCriticalSection(&ddraw_cs); - cur_viewport = This->viewport_list; - while (cur_viewport != NULL) + + if (vp->active_device != device) { - if (cur_viewport == vp) - { - if (prev_viewport == NULL) This->viewport_list = cur_viewport->next; - else prev_viewport->next = cur_viewport->next; - /* TODO : add desactivate of the viewport and all associated lights... */ - LeaveCriticalSection(&ddraw_cs); - return D3D_OK; - } - prev_viewport = cur_viewport; - cur_viewport = cur_viewport->next; + WARN("Viewport %p active device is %p.\n", vp, vp->active_device); + LeaveCriticalSection(&ddraw_cs); + return DDERR_INVALIDPARAMS; } + vp->active_device = NULL; + list_remove(&vp->entry); + LeaveCriticalSection(&ddraw_cs); - return DDERR_INVALIDPARAMS; + return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_DeleteViewport(IDirect3DDevice2 *iface, - IDirect3DViewport2 *Direct3DViewport2) +static HRESULT WINAPI IDirect3DDeviceImpl_2_DeleteViewport(IDirect3DDevice2 *iface, + IDirect3DViewport2 *Direct3DViewport2) { IDirect3DDeviceImpl *This = device_from_device2(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Direct3DViewport2; @@ -883,9 +842,8 @@ Thunk_IDirect3DDeviceImpl_2_DeleteViewport(IDirect3DDevice2 *iface, return IDirect3DDevice3_DeleteViewport((IDirect3DDevice3 *)&This->IDirect3DDevice3_vtbl, (IDirect3DViewport3 *)vp); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_DeleteViewport(IDirect3DDevice *iface, - IDirect3DViewport *Direct3DViewport) +static HRESULT WINAPI IDirect3DDeviceImpl_1_DeleteViewport(IDirect3DDevice *iface, + IDirect3DViewport *Direct3DViewport) { IDirect3DDeviceImpl *This = device_from_device1(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Direct3DViewport; @@ -921,7 +879,7 @@ IDirect3DDeviceImpl_3_NextViewport(IDirect3DDevice3 *iface, { IDirect3DDeviceImpl *This = device_from_device3(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Viewport3; - IDirect3DViewportImpl *res = NULL; + struct list *entry; TRACE("iface %p, viewport %p, next %p, flags %#x.\n", iface, Viewport3, lplpDirect3DViewport3, Flags); @@ -937,41 +895,35 @@ IDirect3DDeviceImpl_3_NextViewport(IDirect3DDevice3 *iface, switch (Flags) { case D3DNEXT_NEXT: - { - res = vp->next; - } - break; + entry = list_next(&This->viewport_list, &vp->entry); + break; + case D3DNEXT_HEAD: - { - res = This->viewport_list; - } - break; + entry = list_head(&This->viewport_list); + break; + case D3DNEXT_TAIL: - { - IDirect3DViewportImpl *cur_viewport = This->viewport_list; - if (cur_viewport != NULL) - { - while (cur_viewport->next != NULL) cur_viewport = cur_viewport->next; - } - res = cur_viewport; - } - break; + entry = list_tail(&This->viewport_list); + break; + default: + WARN("Invalid flags %#x.\n", Flags); *lplpDirect3DViewport3 = NULL; LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } - *lplpDirect3DViewport3 = (IDirect3DViewport3 *)res; + if (entry) + *lplpDirect3DViewport3 = (IDirect3DViewport3 *)LIST_ENTRY(entry, IDirect3DViewportImpl, entry); + else + *lplpDirect3DViewport3 = NULL; + LeaveCriticalSection(&ddraw_cs); return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_NextViewport(IDirect3DDevice2 *iface, - IDirect3DViewport2 *Viewport2, - IDirect3DViewport2 **lplpDirect3DViewport2, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_2_NextViewport(IDirect3DDevice2 *iface, + IDirect3DViewport2 *Viewport2, IDirect3DViewport2 **lplpDirect3DViewport2, DWORD Flags) { IDirect3DDeviceImpl *This = device_from_device2(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Viewport2; @@ -987,11 +939,8 @@ Thunk_IDirect3DDeviceImpl_2_NextViewport(IDirect3DDevice2 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_NextViewport(IDirect3DDevice *iface, - IDirect3DViewport *Viewport, - IDirect3DViewport **lplpDirect3DViewport, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_1_NextViewport(IDirect3DDevice *iface, + IDirect3DViewport *Viewport, IDirect3DViewport **lplpDirect3DViewport, DWORD Flags) { IDirect3DDeviceImpl *This = device_from_device1(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Viewport; @@ -1135,10 +1084,9 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, EnterCriticalSection(&ddraw_cs); memset(&mode, 0, sizeof(mode)); - hr = IWineD3DDevice_GetDisplayMode(This->ddraw->wineD3DDevice, - 0, - &mode); - if(FAILED(hr)) { + hr = wined3d_device_get_display_mode(This->ddraw->wined3d_device, 0, &mode); + if (FAILED(hr)) + { LeaveCriticalSection(&ddraw_cs); WARN("Cannot get the current adapter format\n"); return hr; @@ -1146,15 +1094,9 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i) { - hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D, - WINED3DADAPTER_DEFAULT, - WINED3DDEVTYPE_HAL, - mode.Format, - 0 /* Usage */, - WINED3DRTYPE_TEXTURE, - FormatList[i], - SURFACE_OPENGL); - if(hr == D3D_OK) + hr = wined3d_check_device_format(This->ddraw->wineD3D, WINED3DADAPTER_DEFAULT, WINED3DDEVTYPE_HAL, + mode.Format, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL); + if (hr == D3D_OK) { DDPIXELFORMAT pformat; @@ -1175,15 +1117,10 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, for (i = 0; i < sizeof(BumpFormatList) / sizeof(*BumpFormatList); ++i) { - hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D, - WINED3DADAPTER_DEFAULT, - WINED3DDEVTYPE_HAL, - mode.Format, - WINED3DUSAGE_QUERY_LEGACYBUMPMAP, - WINED3DRTYPE_TEXTURE, - BumpFormatList[i], - SURFACE_OPENGL); - if(hr == D3D_OK) + hr = wined3d_check_device_format(This->ddraw->wineD3D, WINED3DADAPTER_DEFAULT, + WINED3DDEVTYPE_HAL, mode.Format, WINED3DUSAGE_QUERY_LEGACYBUMPMAP, + WINED3DRTYPE_TEXTURE, BumpFormatList[i], SURFACE_OPENGL); + if (hr == D3D_OK) { DDPIXELFORMAT pformat; @@ -1229,10 +1166,8 @@ IDirect3DDeviceImpl_7_EnumTextureFormats_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_EnumTextureFormats(IDirect3DDevice3 *iface, - LPD3DENUMPIXELFORMATSCALLBACK Callback, - void *Arg) +static HRESULT WINAPI IDirect3DDeviceImpl_3_EnumTextureFormats(IDirect3DDevice3 *iface, + LPD3DENUMPIXELFORMATSCALLBACK Callback, void *Arg) { IDirect3DDeviceImpl *This = device_from_device3(iface); @@ -1287,10 +1222,9 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface, EnterCriticalSection(&ddraw_cs); memset(&mode, 0, sizeof(mode)); - hr = IWineD3DDevice_GetDisplayMode(This->ddraw->wineD3DDevice, - 0, - &mode); - if(FAILED(hr)) { + hr = wined3d_device_get_display_mode(This->ddraw->wined3d_device, 0, &mode); + if (FAILED(hr)) + { LeaveCriticalSection(&ddraw_cs); WARN("Cannot get the current adapter format\n"); return hr; @@ -1298,15 +1232,9 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface, for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i) { - hr = IWineD3D_CheckDeviceFormat(This->ddraw->wineD3D, - 0 /* Adapter */, - WINED3DDEVTYPE_HAL, - mode.Format, - 0 /* Usage */, - WINED3DRTYPE_TEXTURE, - FormatList[i], - SURFACE_OPENGL); - if(hr == D3D_OK) + hr = wined3d_check_device_format(This->ddraw->wineD3D, 0, WINED3DDEVTYPE_HAL, + mode.Format, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL); + if (hr == D3D_OK) { DDSURFACEDESC sdesc; @@ -1332,10 +1260,8 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_EnumTextureFormats(IDirect3DDevice *iface, - LPD3DENUMTEXTUREFORMATSCALLBACK Callback, - void *Arg) +static HRESULT WINAPI IDirect3DDeviceImpl_1_EnumTextureFormats(IDirect3DDevice *iface, + LPD3DENUMTEXTUREFORMATSCALLBACK Callback, void *Arg) { IDirect3DDeviceImpl *This = device_from_device1(iface); @@ -1443,24 +1369,14 @@ IDirect3DDeviceImpl_1_SetMatrix(IDirect3DDevice *iface, *m = *D3DMatrix; - if(This->world == D3DMatHandle) - { - IWineD3DDevice_SetTransform(This->wineD3DDevice, - WINED3DTS_WORLDMATRIX(0), - (WINED3DMATRIX *) D3DMatrix); - } - if(This->view == D3DMatHandle) - { - IWineD3DDevice_SetTransform(This->wineD3DDevice, - WINED3DTS_VIEW, - (WINED3DMATRIX *) D3DMatrix); - } - if(This->proj == D3DMatHandle) - { - IWineD3DDevice_SetTransform(This->wineD3DDevice, - WINED3DTS_PROJECTION, - (WINED3DMATRIX *) D3DMatrix); - } + if (D3DMatHandle == This->world) + wined3d_device_set_transform(This->wined3d_device, WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)D3DMatrix); + + if (D3DMatHandle == This->view) + wined3d_device_set_transform(This->wined3d_device, WINED3DTS_VIEW, (WINED3DMATRIX *)D3DMatrix); + + if (D3DMatHandle == This->proj) + wined3d_device_set_transform(This->wined3d_device, WINED3DTS_PROJECTION, (WINED3DMATRIX *)D3DMatrix); LeaveCriticalSection(&ddraw_cs); return D3D_OK; @@ -1574,7 +1490,7 @@ IDirect3DDeviceImpl_7_BeginScene(IDirect3DDevice7 *iface) TRACE("iface %p.\n", iface); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_BeginScene(This->wineD3DDevice); + hr = wined3d_device_begin_scene(This->wined3d_device); LeaveCriticalSection(&ddraw_cs); if(hr == WINED3D_OK) return D3D_OK; else return D3DERR_SCENE_IN_SCENE; /* TODO: Other possible causes of failure */ @@ -1599,24 +1515,21 @@ IDirect3DDeviceImpl_7_BeginScene_FPUPreserve(IDirect3DDevice7 *iface) return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_BeginScene(IDirect3DDevice3 *iface) +static HRESULT WINAPI IDirect3DDeviceImpl_3_BeginScene(IDirect3DDevice3 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_BeginScene((IDirect3DDevice7 *)device_from_device3(iface)); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_BeginScene(IDirect3DDevice2 *iface) +static HRESULT WINAPI IDirect3DDeviceImpl_2_BeginScene(IDirect3DDevice2 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_BeginScene((IDirect3DDevice7 *)device_from_device2(iface)); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_BeginScene(IDirect3DDevice *iface) +static HRESULT WINAPI IDirect3DDeviceImpl_1_BeginScene(IDirect3DDevice *iface) { TRACE("iface %p.\n", iface); @@ -1646,7 +1559,7 @@ IDirect3DDeviceImpl_7_EndScene(IDirect3DDevice7 *iface) TRACE("iface %p.\n", iface); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_EndScene(This->wineD3DDevice); + hr = wined3d_device_end_scene(This->wined3d_device); LeaveCriticalSection(&ddraw_cs); if(hr == WINED3D_OK) return D3D_OK; else return D3DERR_SCENE_NOT_IN_SCENE; @@ -1671,24 +1584,21 @@ IDirect3DDeviceImpl_7_EndScene_FPUPreserve(IDirect3DDevice7 *iface) return hr; } -static HRESULT WINAPI DECLSPEC_HOTPATCH -Thunk_IDirect3DDeviceImpl_3_EndScene(IDirect3DDevice3 *iface) +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDeviceImpl_3_EndScene(IDirect3DDevice3 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_EndScene((IDirect3DDevice7 *)device_from_device3(iface)); } -static HRESULT WINAPI DECLSPEC_HOTPATCH -Thunk_IDirect3DDeviceImpl_2_EndScene(IDirect3DDevice2 *iface) +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDeviceImpl_2_EndScene(IDirect3DDevice2 *iface) { TRACE("iface %p.\n", iface); return IDirect3DDevice7_EndScene((IDirect3DDevice7 *)device_from_device2(iface)); } -static HRESULT WINAPI DECLSPEC_HOTPATCH -Thunk_IDirect3DDeviceImpl_1_EndScene(IDirect3DDevice *iface) +static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDeviceImpl_1_EndScene(IDirect3DDevice *iface) { TRACE("iface %p.\n", iface); @@ -1720,63 +1630,57 @@ IDirect3DDeviceImpl_7_GetDirect3D(IDirect3DDevice7 *iface, if(!Direct3D7) return DDERR_INVALIDPARAMS; - *Direct3D7 = (IDirect3D7 *)&This->ddraw->IDirect3D7_vtbl; + *Direct3D7 = &This->ddraw->IDirect3D7_iface; IDirect3D7_AddRef(*Direct3D7); TRACE(" returning interface %p\n", *Direct3D7); return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_GetDirect3D(IDirect3DDevice3 *iface, - IDirect3D3 **Direct3D3) +static HRESULT WINAPI IDirect3DDeviceImpl_3_GetDirect3D(IDirect3DDevice3 *iface, + IDirect3D3 **Direct3D3) { IDirect3DDeviceImpl *This = device_from_device3(iface); - HRESULT ret; - IDirect3D7 *ret_ptr; TRACE("iface %p, d3d %p.\n", iface, Direct3D3); - ret = IDirect3DDevice7_GetDirect3D((IDirect3DDevice7 *)This, &ret_ptr); - if(ret != D3D_OK) - return ret; - *Direct3D3 = ret_ptr ? (IDirect3D3 *)&ddraw_from_d3d7(ret_ptr)->IDirect3D3_vtbl : NULL; + if(!Direct3D3) + return DDERR_INVALIDPARAMS; + + IDirect3D3_AddRef(&This->ddraw->IDirect3D3_iface); + *Direct3D3 = &This->ddraw->IDirect3D3_iface; TRACE(" returning interface %p\n", *Direct3D3); return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetDirect3D(IDirect3DDevice2 *iface, - IDirect3D2 **Direct3D2) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetDirect3D(IDirect3DDevice2 *iface, + IDirect3D2 **Direct3D2) { IDirect3DDeviceImpl *This = device_from_device2(iface); - HRESULT ret; - IDirect3D7 *ret_ptr; TRACE("iface %p, d3d %p.\n", iface, Direct3D2); - ret = IDirect3DDevice7_GetDirect3D((IDirect3DDevice7 *)This, &ret_ptr); - if(ret != D3D_OK) - return ret; - *Direct3D2 = ret_ptr ? (IDirect3D2 *)&ddraw_from_d3d7(ret_ptr)->IDirect3D2_vtbl : NULL; + if(!Direct3D2) + return DDERR_INVALIDPARAMS; + + IDirect3D2_AddRef(&This->ddraw->IDirect3D2_iface); + *Direct3D2 = &This->ddraw->IDirect3D2_iface; TRACE(" returning interface %p\n", *Direct3D2); return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_1_GetDirect3D(IDirect3DDevice *iface, - IDirect3D **Direct3D) +static HRESULT WINAPI IDirect3DDeviceImpl_1_GetDirect3D(IDirect3DDevice *iface, + IDirect3D **Direct3D) { IDirect3DDeviceImpl *This = device_from_device1(iface); - HRESULT ret; - IDirect3D7 *ret_ptr; TRACE("iface %p, d3d %p.\n", iface, Direct3D); - ret = IDirect3DDevice7_GetDirect3D((IDirect3DDevice7 *)This, &ret_ptr); - if(ret != D3D_OK) - return ret; - *Direct3D = ret_ptr ? (IDirect3D *)&ddraw_from_d3d7(ret_ptr)->IDirect3D_vtbl : NULL; + if(!Direct3D) + return DDERR_INVALIDPARAMS; + + IDirect3D_AddRef(&This->ddraw->IDirect3D_iface); + *Direct3D = &This->ddraw->IDirect3D_iface; TRACE(" returning interface %p\n", *Direct3D); return D3D_OK; } @@ -1814,7 +1718,12 @@ IDirect3DDeviceImpl_3_SetCurrentViewport(IDirect3DDevice3 *iface, return D3D_OK; } - /* Should check if the viewport was added or not */ + if (vp->active_device != This) + { + WARN("Viewport %p active device is %p.\n", vp, vp->active_device); + LeaveCriticalSection(&ddraw_cs); + return DDERR_INVALIDPARAMS; + } /* Release previous viewport and AddRef the new one */ if (This->current_viewport) @@ -1829,16 +1738,14 @@ IDirect3DDeviceImpl_3_SetCurrentViewport(IDirect3DDevice3 *iface, This->current_viewport = vp; /* Activate this viewport */ - This->current_viewport->active_device = This; viewport_activate(This->current_viewport, FALSE); LeaveCriticalSection(&ddraw_cs); return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_SetCurrentViewport(IDirect3DDevice2 *iface, - IDirect3DViewport2 *Direct3DViewport2) +static HRESULT WINAPI IDirect3DDeviceImpl_2_SetCurrentViewport(IDirect3DDevice2 *iface, + IDirect3DViewport2 *Direct3DViewport2) { IDirect3DDeviceImpl *This = device_from_device2(iface); IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)Direct3DViewport2; @@ -1887,9 +1794,8 @@ IDirect3DDeviceImpl_3_GetCurrentViewport(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetCurrentViewport(IDirect3DDevice2 *iface, - IDirect3DViewport2 **Direct3DViewport2) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetCurrentViewport(IDirect3DDevice2 *iface, + IDirect3DViewport2 **Direct3DViewport2) { IDirect3DDeviceImpl *This = device_from_device2(iface); HRESULT hr; @@ -1941,10 +1847,8 @@ IDirect3DDeviceImpl_7_SetRenderTarget(IDirect3DDevice7 *iface, return D3D_OK; } - hr = IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, - 0, - Target ? Target->WineD3DSurface : NULL, - FALSE); + hr = wined3d_device_set_render_target(This->wined3d_device, 0, + Target ? Target->wined3d_surface : NULL, FALSE); if(hr != D3D_OK) { LeaveCriticalSection(&ddraw_cs); @@ -1981,10 +1885,8 @@ IDirect3DDeviceImpl_7_SetRenderTarget_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_SetRenderTarget(IDirect3DDevice3 *iface, - IDirectDrawSurface4 *NewRenderTarget, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_3_SetRenderTarget(IDirect3DDevice3 *iface, + IDirectDrawSurface4 *NewRenderTarget, DWORD Flags) { IDirect3DDeviceImpl *This = device_from_device3(iface); IDirectDrawSurfaceImpl *Target = (IDirectDrawSurfaceImpl *)NewRenderTarget; @@ -1994,10 +1896,8 @@ Thunk_IDirect3DDeviceImpl_3_SetRenderTarget(IDirect3DDevice3 *iface, return IDirect3DDevice7_SetRenderTarget((IDirect3DDevice7 *)This, (IDirectDrawSurface7 *)Target, Flags); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_SetRenderTarget(IDirect3DDevice2 *iface, - IDirectDrawSurface *NewRenderTarget, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_2_SetRenderTarget(IDirect3DDevice2 *iface, + IDirectDrawSurface *NewRenderTarget, DWORD Flags) { IDirect3DDeviceImpl *This = device_from_device2(iface); IDirectDrawSurfaceImpl *Target = (IDirectDrawSurfaceImpl *)NewRenderTarget; @@ -2043,9 +1943,8 @@ IDirect3DDeviceImpl_7_GetRenderTarget(IDirect3DDevice7 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_GetRenderTarget(IDirect3DDevice3 *iface, - IDirectDrawSurface4 **RenderTarget) +static HRESULT WINAPI IDirect3DDeviceImpl_3_GetRenderTarget(IDirect3DDevice3 *iface, + IDirectDrawSurface4 **RenderTarget) { IDirect3DDeviceImpl *This = device_from_device3(iface); HRESULT hr; @@ -2057,9 +1956,8 @@ Thunk_IDirect3DDeviceImpl_3_GetRenderTarget(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetRenderTarget(IDirect3DDevice2 *iface, - IDirectDrawSurface **RenderTarget) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetRenderTarget(IDirect3DDevice2 *iface, + IDirectDrawSurface **RenderTarget) { IDirect3DDeviceImpl *This = device_from_device2(iface); HRESULT hr; @@ -2113,11 +2011,8 @@ IDirect3DDeviceImpl_3_Begin(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_Begin(IDirect3DDevice2 *iface, - D3DPRIMITIVETYPE d3dpt, - D3DVERTEXTYPE dwVertexTypeDesc, - DWORD dwFlags) +static HRESULT WINAPI IDirect3DDeviceImpl_2_Begin(IDirect3DDevice2 *iface, D3DPRIMITIVETYPE d3dpt, + D3DVERTEXTYPE dwVertexTypeDesc, DWORD dwFlags) { DWORD FVF; IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -2172,13 +2067,9 @@ IDirect3DDeviceImpl_3_BeginIndexed(IDirect3DDevice3 *iface, } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_BeginIndexed(IDirect3DDevice2 *iface, - D3DPRIMITIVETYPE d3dptPrimitiveType, - D3DVERTEXTYPE d3dvtVertexType, - void *lpvVertices, - DWORD dwNumVertices, - DWORD dwFlags) +static HRESULT WINAPI IDirect3DDeviceImpl_2_BeginIndexed(IDirect3DDevice2 *iface, + D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, + void *lpvVertices, DWORD dwNumVertices, DWORD dwFlags) { DWORD FVF; IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -2248,9 +2139,7 @@ IDirect3DDeviceImpl_3_Vertex(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_Vertex(IDirect3DDevice2 *iface, - void *lpVertexType) +static HRESULT WINAPI IDirect3DDeviceImpl_2_Vertex(IDirect3DDevice2 *iface, void *lpVertexType) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -2281,9 +2170,7 @@ IDirect3DDeviceImpl_3_Index(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_Index(IDirect3DDevice2 *iface, - WORD wVertexIndex) +static HRESULT WINAPI IDirect3DDeviceImpl_2_Index(IDirect3DDevice2 *iface, WORD wVertexIndex) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -2322,9 +2209,7 @@ IDirect3DDeviceImpl_3_End(IDirect3DDevice3 *iface, This->vertex_type, This->vertex_buffer, This->nb_vertices, This->render_flags); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_End(IDirect3DDevice2 *iface, - DWORD dwFlags) +static HRESULT WINAPI IDirect3DDeviceImpl_2_End(IDirect3DDevice2 *iface, DWORD dwFlags) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -2350,6 +2235,8 @@ Thunk_IDirect3DDeviceImpl_2_End(IDirect3DDevice2 *iface, * DDERR_INVALIDPARAMS if Value == NULL * *****************************************************************************/ +static const float zbias_factor = -0.000005f; + static HRESULT IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, D3DRENDERSTATETYPE RenderStateType, @@ -2370,9 +2257,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, { WINED3DTEXTUREFILTERTYPE tex_mag; - hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_MAGFILTER, - &tex_mag); + hr = wined3d_device_get_sampler_state(This->wined3d_device, 0, WINED3DSAMP_MAGFILTER, &tex_mag); switch (tex_mag) { @@ -2394,14 +2279,14 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, WINED3DTEXTUREFILTERTYPE tex_min; WINED3DTEXTUREFILTERTYPE tex_mip; - hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice, + hr = wined3d_device_get_sampler_state(This->wined3d_device, 0, WINED3DSAMP_MINFILTER, &tex_min); if (FAILED(hr)) { LeaveCriticalSection(&ddraw_cs); return hr; } - hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice, + hr = wined3d_device_get_sampler_state(This->wined3d_device, 0, WINED3DSAMP_MIPFILTER, &tex_mip); switch (tex_min) @@ -2452,14 +2337,12 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, case D3DRENDERSTATE_TEXTUREADDRESS: case D3DRENDERSTATE_TEXTUREADDRESSU: - hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_ADDRESSU, - Value); + hr = wined3d_device_get_sampler_state(This->wined3d_device, + 0, WINED3DSAMP_ADDRESSU, Value); break; case D3DRENDERSTATE_TEXTUREADDRESSV: - hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_ADDRESSV, - Value); + hr = wined3d_device_get_sampler_state(This->wined3d_device, + 0, WINED3DSAMP_ADDRESSV, Value); break; case D3DRENDERSTATE_BORDERCOLOR: @@ -2473,6 +2356,20 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, hr = DDERR_INVALIDPARAMS; break; + case D3DRENDERSTATE_ZBIAS: + { + union + { + DWORD d; + float f; + } wined3d_value; + + hr = wined3d_device_get_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, &wined3d_value.d); + if (SUCCEEDED(hr)) + *Value = wined3d_value.f / zbias_factor; + break; + } + default: if (RenderStateType >= D3DRENDERSTATE_STIPPLEPATTERN00 && RenderStateType <= D3DRENDERSTATE_STIPPLEPATTERN31) @@ -2482,9 +2379,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, hr = E_NOTIMPL; break; } - hr = IWineD3DDevice_GetRenderState(This->wineD3DDevice, - RenderStateType, - Value); + hr = wined3d_device_get_render_state(This->wined3d_device, RenderStateType, Value); } LeaveCriticalSection(&ddraw_cs); return hr; @@ -2528,21 +2423,20 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface, case D3DRENDERSTATE_TEXTUREHANDLE: { /* This state is wrapped to SetTexture in SetRenderState, so - * it has to be wrapped to GetTexture here - */ - IWineD3DBaseTexture *tex = NULL; + * it has to be wrapped to GetTexture here. */ + struct wined3d_texture *tex = NULL; *lpdwRenderState = 0; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, 0, &tex); + hr = wined3d_device_get_texture(This->wined3d_device, 0, &tex); if (SUCCEEDED(hr) && tex) { /* The parent of the texture is the IDirectDrawSurface7 * interface of the ddraw surface. */ - IDirectDrawSurfaceImpl *parent = IWineD3DBaseTexture_GetParent(tex); + IDirectDrawSurfaceImpl *parent = wined3d_texture_get_parent(tex); if (parent) *lpdwRenderState = parent->Handle; - IWineD3DBaseTexture_Release(tex); + wined3d_texture_decref(tex); } LeaveCriticalSection(&ddraw_cs); @@ -2561,12 +2455,12 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface, This->legacyTextureBlending = TRUE; - IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, &colorop); - IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, &colorarg1); - IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, &colorarg2); - IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, &alphaop); - IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, &alphaarg1); - IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, &alphaarg2); + wined3d_device_get_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_COLOROP, &colorop); + wined3d_device_get_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_COLORARG1, &colorarg1); + wined3d_device_get_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_COLORARG2, &colorarg2); + wined3d_device_get_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_ALPHAOP, &alphaop); + wined3d_device_get_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_ALPHAARG1, &alphaarg1); + wined3d_device_get_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_ALPHAARG2, &alphaarg2); if (colorop == WINED3DTOP_SELECTARG1 && colorarg1 == WINED3DTA_TEXTURE && alphaop == WINED3DTOP_SELECTARG1 && alphaarg1 == WINED3DTA_TEXTURE) @@ -2585,27 +2479,28 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface, } else { + struct wined3d_texture *tex = NULL; HRESULT hr; BOOL tex_alpha = FALSE; - IWineD3DBaseTexture *tex = NULL; - WINED3DSURFACE_DESC desc; DDPIXELFORMAT ddfmt; - hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, - 0, - &tex); + hr = wined3d_device_get_texture(This->wined3d_device, 0, &tex); if(hr == WINED3D_OK && tex) { - hr = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc); - if (SUCCEEDED(hr)) + struct wined3d_resource *sub_resource; + + if ((sub_resource = wined3d_texture_get_sub_resource(tex, 0))) { + struct wined3d_resource_desc desc; + + wined3d_resource_get_desc(sub_resource, &desc); ddfmt.dwSize = sizeof(ddfmt); PixelFormat_WineD3DtoDD(&ddfmt, desc.format); if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE; } - IWineD3DBaseTexture_Release(tex); + wined3d_texture_decref(tex); } if (!(colorop == WINED3DTOP_MODULATE && colorarg1 == WINED3DTA_TEXTURE && colorarg2 == WINED3DTA_CURRENT && @@ -2628,10 +2523,8 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface, } } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetRenderState(IDirect3DDevice2 *iface, - D3DRENDERSTATETYPE dwRenderStateType, - DWORD *lpdwRenderState) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetRenderState(IDirect3DDevice2 *iface, + D3DRENDERSTATETYPE dwRenderStateType, DWORD *lpdwRenderState) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -2707,9 +2600,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, break; } - hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_MAGFILTER, - tex_mag); + hr = wined3d_device_set_sampler_state(This->wined3d_device, 0, WINED3DSAMP_MAGFILTER, tex_mag); break; } @@ -2752,28 +2643,24 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, break; } - IWineD3DDevice_SetSamplerState(This->wineD3DDevice, + wined3d_device_set_sampler_state(This->wined3d_device, 0, WINED3DSAMP_MIPFILTER, tex_mip); - hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_MINFILTER, - tex_min); + hr = wined3d_device_set_sampler_state(This->wined3d_device, + 0, WINED3DSAMP_MINFILTER, tex_min); break; } case D3DRENDERSTATE_TEXTUREADDRESS: - IWineD3DDevice_SetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_ADDRESSV, - Value); + wined3d_device_set_sampler_state(This->wined3d_device, + 0, WINED3DSAMP_ADDRESSV, Value); /* Drop through */ case D3DRENDERSTATE_TEXTUREADDRESSU: - hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_ADDRESSU, - Value); + hr = wined3d_device_set_sampler_state(This->wined3d_device, + 0, WINED3DSAMP_ADDRESSU, Value); break; case D3DRENDERSTATE_TEXTUREADDRESSV: - hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice, - 0, WINED3DSAMP_ADDRESSV, - Value); + hr = wined3d_device_set_sampler_state(This->wined3d_device, + 0, WINED3DSAMP_ADDRESSV, Value); break; case D3DRENDERSTATE_BORDERCOLOR: @@ -2789,6 +2676,18 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, hr = DDERR_INVALIDPARAMS; break; + case D3DRENDERSTATE_ZBIAS: + { + union + { + DWORD d; + float f; + } wined3d_value; + wined3d_value.f = Value * zbias_factor; + hr = wined3d_device_set_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, wined3d_value.d); + break; + } + default: if (RenderStateType >= D3DRENDERSTATE_STIPPLEPATTERN00 && RenderStateType <= D3DRENDERSTATE_STIPPLEPATTERN31) @@ -2799,9 +2698,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface, break; } - hr = IWineD3DDevice_SetRenderState(This->wineD3DDevice, - RenderStateType, - Value); + hr = wined3d_device_set_render_state(This->wined3d_device, RenderStateType, Value); break; } LeaveCriticalSection(&ddraw_cs); @@ -2870,9 +2767,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface, if(Value == 0) { - hr = IWineD3DDevice_SetTexture(This->wineD3DDevice, - 0, - NULL); + hr = wined3d_device_set_texture(This->wined3d_device, 0, NULL); break; } @@ -2896,73 +2791,99 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface, { case D3DTBLEND_MODULATE: { + struct wined3d_texture *tex = NULL; BOOL tex_alpha = FALSE; - IWineD3DBaseTexture *tex = NULL; - WINED3DSURFACE_DESC desc; DDPIXELFORMAT ddfmt; - hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, - 0, - &tex); + hr = wined3d_device_get_texture(This->wined3d_device, 0, &tex); if(hr == WINED3D_OK && tex) { - memset(&desc, 0, sizeof(desc)); - hr = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc); - if (SUCCEEDED(hr)) + struct wined3d_resource *sub_resource; + + if ((sub_resource = wined3d_texture_get_sub_resource(tex, 0))) { + struct wined3d_resource_desc desc; + + wined3d_resource_get_desc(sub_resource, &desc); ddfmt.dwSize = sizeof(ddfmt); PixelFormat_WineD3DtoDD(&ddfmt, desc.format); if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE; } - IWineD3DBaseTexture_Release(tex); + wined3d_texture_decref(tex); } if (tex_alpha) - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1); else - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE); - + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE); break; } case D3DTBLEND_ADD: - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_ADD); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLOROP, WINED3DTOP_ADD); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); break; case D3DTBLEND_MODULATEALPHA: - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_MODULATE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLOROP, WINED3DTOP_MODULATE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAOP, WINED3DTOP_MODULATE); break; case D3DTBLEND_COPY: case D3DTBLEND_DECAL: - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_SELECTARG1); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLOROP, WINED3DTOP_SELECTARG1); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1); break; case D3DTBLEND_DECALALPHA: - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLOROP, WINED3DTOP_BLENDTEXTUREALPHA); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLOROP, WINED3DTOP_BLENDTEXTUREALPHA); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG1, WINED3DTA_TEXTURE); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_COLORARG2, WINED3DTA_CURRENT); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); + wined3d_device_set_texture_stage_state(This->wined3d_device, + 0, WINED3DTSS_ALPHAARG2, WINED3DTA_CURRENT); break; default: @@ -2983,10 +2904,8 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_SetRenderState(IDirect3DDevice2 *iface, - D3DRENDERSTATETYPE RenderStateType, - DWORD Value) +static HRESULT WINAPI IDirect3DDeviceImpl_2_SetRenderState(IDirect3DDevice2 *iface, + D3DRENDERSTATETYPE RenderStateType, DWORD Value) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -3100,10 +3019,8 @@ IDirect3DDeviceImpl_3_SetLightState(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_SetLightState(IDirect3DDevice2 *iface, - D3DLIGHTSTATETYPE LightStateType, - DWORD Value) +static HRESULT WINAPI IDirect3DDeviceImpl_2_SetLightState(IDirect3DDevice2 *iface, + D3DLIGHTSTATETYPE LightStateType, DWORD Value) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -3196,10 +3113,8 @@ IDirect3DDeviceImpl_3_GetLightState(IDirect3DDevice3 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetLightState(IDirect3DDevice2 *iface, - D3DLIGHTSTATETYPE LightStateType, - DWORD *Value) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetLightState(IDirect3DDevice2 *iface, + D3DLIGHTSTATETYPE LightStateType, DWORD *Value) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -3249,14 +3164,12 @@ IDirect3DDeviceImpl_7_SetTransform(IDirect3DDevice7 *iface, default: type = TransformStateType; } - if(!Matrix) - return DDERR_INVALIDPARAMS; + if (!Matrix) + return DDERR_INVALIDPARAMS; /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetTransform(This->wineD3DDevice, - type, - (WINED3DMATRIX*) Matrix); + hr = wined3d_device_set_transform(This->wined3d_device, type, (WINED3DMATRIX *)Matrix); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -3284,10 +3197,8 @@ IDirect3DDeviceImpl_7_SetTransform_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_SetTransform(IDirect3DDevice3 *iface, - D3DTRANSFORMSTATETYPE TransformStateType, - D3DMATRIX *D3DMatrix) +static HRESULT WINAPI IDirect3DDeviceImpl_3_SetTransform(IDirect3DDevice3 *iface, + D3DTRANSFORMSTATETYPE TransformStateType, D3DMATRIX *D3DMatrix) { IDirect3DDeviceImpl *This = device_from_device3(iface); @@ -3296,10 +3207,8 @@ Thunk_IDirect3DDeviceImpl_3_SetTransform(IDirect3DDevice3 *iface, return IDirect3DDevice7_SetTransform((IDirect3DDevice7 *)This, TransformStateType, D3DMatrix); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_SetTransform(IDirect3DDevice2 *iface, - D3DTRANSFORMSTATETYPE TransformStateType, - D3DMATRIX *D3DMatrix) +static HRESULT WINAPI IDirect3DDeviceImpl_2_SetTransform(IDirect3DDevice2 *iface, + D3DTRANSFORMSTATETYPE TransformStateType, D3DMATRIX *D3DMatrix) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -3350,7 +3259,7 @@ IDirect3DDeviceImpl_7_GetTransform(IDirect3DDevice7 *iface, /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetTransform(This->wineD3DDevice, type, (WINED3DMATRIX*) Matrix); + hr = wined3d_device_get_transform(This->wined3d_device, type, (WINED3DMATRIX *)Matrix); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -3378,10 +3287,8 @@ IDirect3DDeviceImpl_7_GetTransform_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_GetTransform(IDirect3DDevice3 *iface, - D3DTRANSFORMSTATETYPE TransformStateType, - D3DMATRIX *D3DMatrix) +static HRESULT WINAPI IDirect3DDeviceImpl_3_GetTransform(IDirect3DDevice3 *iface, + D3DTRANSFORMSTATETYPE TransformStateType, D3DMATRIX *D3DMatrix) { IDirect3DDeviceImpl *This = device_from_device3(iface); @@ -3390,10 +3297,8 @@ Thunk_IDirect3DDeviceImpl_3_GetTransform(IDirect3DDevice3 *iface, return IDirect3DDevice7_GetTransform((IDirect3DDevice7 *)This, TransformStateType, D3DMatrix); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetTransform(IDirect3DDevice2 *iface, - D3DTRANSFORMSTATETYPE TransformStateType, - D3DMATRIX *D3DMatrix) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetTransform(IDirect3DDevice2 *iface, + D3DTRANSFORMSTATETYPE TransformStateType, D3DMATRIX *D3DMatrix) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -3442,9 +3347,8 @@ IDirect3DDeviceImpl_7_MultiplyTransform(IDirect3DDevice7 *iface, /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_MultiplyTransform(This->wineD3DDevice, - type, - (WINED3DMATRIX*) D3DMatrix); + hr = wined3d_device_multiply_transform(This->wined3d_device, + type, (WINED3DMATRIX *)D3DMatrix); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -3472,10 +3376,8 @@ IDirect3DDeviceImpl_7_MultiplyTransform_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_MultiplyTransform(IDirect3DDevice3 *iface, - D3DTRANSFORMSTATETYPE TransformStateType, - D3DMATRIX *D3DMatrix) +static HRESULT WINAPI IDirect3DDeviceImpl_3_MultiplyTransform(IDirect3DDevice3 *iface, + D3DTRANSFORMSTATETYPE TransformStateType, D3DMATRIX *D3DMatrix) { IDirect3DDeviceImpl *This = device_from_device3(iface); @@ -3484,10 +3386,8 @@ Thunk_IDirect3DDeviceImpl_3_MultiplyTransform(IDirect3DDevice3 *iface, return IDirect3DDevice7_MultiplyTransform((IDirect3DDevice7 *)This, TransformStateType, D3DMatrix); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_MultiplyTransform(IDirect3DDevice2 *iface, - D3DTRANSFORMSTATETYPE TransformStateType, - D3DMATRIX *D3DMatrix) +static HRESULT WINAPI IDirect3DDeviceImpl_2_MultiplyTransform(IDirect3DDevice2 *iface, + D3DTRANSFORMSTATETYPE TransformStateType, D3DMATRIX *D3DMatrix) { IDirect3DDeviceImpl *This = device_from_device2(iface); @@ -3540,7 +3440,7 @@ IDirect3DDeviceImpl_7_DrawPrimitive(IDirect3DDevice7 *iface, /* Set the FVF */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType)); + hr = wined3d_device_set_vertex_declaration(This->wined3d_device, ddraw_find_decl(This->ddraw, VertexType)); if(hr != D3D_OK) { LeaveCriticalSection(&ddraw_cs); @@ -3548,8 +3448,8 @@ IDirect3DDeviceImpl_7_DrawPrimitive(IDirect3DDevice7 *iface, } /* This method translates to the user pointer draw of WineD3D */ - IWineD3DDevice_SetPrimitiveType(This->wineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawPrimitiveUP(This->wineD3DDevice, VertexCount, Vertices, stride); + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_primitive_up(This->wined3d_device, VertexCount, Vertices, stride); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -3583,13 +3483,9 @@ IDirect3DDeviceImpl_7_DrawPrimitive_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_DrawPrimitive(IDirect3DDevice3 *iface, - D3DPRIMITIVETYPE PrimitiveType, - DWORD VertexType, - void *Vertices, - DWORD VertexCount, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawPrimitive(IDirect3DDevice3 *iface, + D3DPRIMITIVETYPE PrimitiveType, DWORD VertexType, void *Vertices, DWORD VertexCount, + DWORD Flags) { TRACE("iface %p, primitive_type %#x, FVF %#x, vertices %p, vertex_count %u, flags %#x.\n", iface, PrimitiveType, VertexType, Vertices, VertexCount, Flags); @@ -3598,13 +3494,9 @@ Thunk_IDirect3DDeviceImpl_3_DrawPrimitive(IDirect3DDevice3 *iface, PrimitiveType, VertexType, Vertices, VertexCount, Flags); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_DrawPrimitive(IDirect3DDevice2 *iface, - D3DPRIMITIVETYPE PrimitiveType, - D3DVERTEXTYPE VertexType, - void *Vertices, - DWORD VertexCount, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_2_DrawPrimitive(IDirect3DDevice2 *iface, + D3DPRIMITIVETYPE PrimitiveType, D3DVERTEXTYPE VertexType, void *Vertices, + DWORD VertexCount, DWORD Flags) { DWORD FVF; @@ -3667,7 +3559,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitive(IDirect3DDevice7 *iface, /* Set the D3DDevice's FVF */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType)); + hr = wined3d_device_set_vertex_declaration(This->wined3d_device, ddraw_find_decl(This->ddraw, VertexType)); if(FAILED(hr)) { ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr); @@ -3675,8 +3567,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitive(IDirect3DDevice7 *iface, return hr; } - IWineD3DDevice_SetPrimitiveType(This->wineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->wineD3DDevice, IndexCount, Indices, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_indexed_primitive_up(This->wined3d_device, IndexCount, Indices, WINED3DFMT_R16_UINT, Vertices, get_flexible_vertex_size(VertexType)); LeaveCriticalSection(&ddraw_cs); return hr; @@ -3715,15 +3607,9 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitive_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitive(IDirect3DDevice3 *iface, - D3DPRIMITIVETYPE PrimitiveType, - DWORD VertexType, - void *Vertices, - DWORD VertexCount, - WORD *Indices, - DWORD IndexCount, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawIndexedPrimitive(IDirect3DDevice3 *iface, + D3DPRIMITIVETYPE PrimitiveType, DWORD VertexType, void *Vertices, DWORD VertexCount, + WORD *Indices, DWORD IndexCount, DWORD Flags) { TRACE("iface %p, primitive_type %#x, FVF %#x, vertices %p, vertex_count %u, indices %p, index_count %u, flags %#x.\n", iface, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags); @@ -3732,15 +3618,9 @@ Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitive(IDirect3DDevice3 *iface, PrimitiveType, VertexType, Vertices, VertexCount, Indices, IndexCount, Flags); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_DrawIndexedPrimitive(IDirect3DDevice2 *iface, - D3DPRIMITIVETYPE PrimitiveType, - D3DVERTEXTYPE VertexType, - void *Vertices, - DWORD VertexCount, - WORD *Indices, - DWORD IndexCount, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_2_DrawIndexedPrimitive(IDirect3DDevice2 *iface, + D3DPRIMITIVETYPE PrimitiveType, D3DVERTEXTYPE VertexType, void *Vertices, + DWORD VertexCount, WORD *Indices, DWORD IndexCount, DWORD Flags) { DWORD FVF; @@ -3790,18 +3670,16 @@ IDirect3DDeviceImpl_7_SetClipStatus(IDirect3DDevice7 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_SetClipStatus(IDirect3DDevice3 *iface, - D3DCLIPSTATUS *ClipStatus) +static HRESULT WINAPI IDirect3DDeviceImpl_3_SetClipStatus(IDirect3DDevice3 *iface, + D3DCLIPSTATUS *ClipStatus) { TRACE("iface %p, clip_status %p.\n", iface, ClipStatus); return IDirect3DDevice7_SetClipStatus((IDirect3DDevice7 *)device_from_device3(iface), ClipStatus); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_SetClipStatus(IDirect3DDevice2 *iface, - D3DCLIPSTATUS *ClipStatus) +static HRESULT WINAPI IDirect3DDeviceImpl_2_SetClipStatus(IDirect3DDevice2 *iface, + D3DCLIPSTATUS *ClipStatus) { TRACE("iface %p, clip_status %p.\n", iface, ClipStatus); @@ -3831,18 +3709,16 @@ IDirect3DDeviceImpl_7_GetClipStatus(IDirect3DDevice7 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_GetClipStatus(IDirect3DDevice3 *iface, - D3DCLIPSTATUS *ClipStatus) +static HRESULT WINAPI IDirect3DDeviceImpl_3_GetClipStatus(IDirect3DDevice3 *iface, + D3DCLIPSTATUS *ClipStatus) { TRACE("iface %p, clip_status %p.\n", iface, ClipStatus); return IDirect3DDevice7_GetClipStatus((IDirect3DDevice7 *)device_from_device3(iface), ClipStatus); } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_2_GetClipStatus(IDirect3DDevice2 *iface, - D3DCLIPSTATUS *ClipStatus) +static HRESULT WINAPI IDirect3DDeviceImpl_2_GetClipStatus(IDirect3DDevice2 *iface, + D3DCLIPSTATUS *ClipStatus) { TRACE("iface %p, clip_status %p.\n", iface, ClipStatus); @@ -3944,8 +3820,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface, /* WineD3D doesn't need the FVF here */ EnterCriticalSection(&ddraw_cs); - IWineD3DDevice_SetPrimitiveType(This->wineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawPrimitiveStrided(This->wineD3DDevice, VertexCount, &WineD3DStrided); + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_primitive_strided(This->wined3d_device, VertexCount, &WineD3DStrided); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -3979,13 +3855,9 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveStrided(IDirect3DDevice3 *iface, - D3DPRIMITIVETYPE PrimitiveType, - DWORD VertexType, - D3DDRAWPRIMITIVESTRIDEDDATA *D3DDrawPrimStrideData, - DWORD VertexCount, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawPrimitiveStrided(IDirect3DDevice3 *iface, + D3DPRIMITIVETYPE PrimitiveType, DWORD VertexType, + D3DDRAWPRIMITIVESTRIDEDDATA *D3DDrawPrimStrideData, DWORD VertexCount, DWORD Flags) { TRACE("iface %p, primitive_type %#x, FVF %#x, strided_data %p, vertex_count %u, flags %#x.\n", iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Flags); @@ -4087,8 +3959,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface, /* WineD3D doesn't need the FVF here */ EnterCriticalSection(&ddraw_cs); - IWineD3DDevice_SetPrimitiveType(This->wineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawIndexedPrimitiveStrided(This->wineD3DDevice, + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_indexed_primitive_strided(This->wined3d_device, IndexCount, &WineD3DStrided, VertexCount, Indices, WINED3DFMT_R16_UINT); LeaveCriticalSection(&ddraw_cs); return hr; @@ -4127,15 +3999,10 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided_FPUPreserve(IDirect3DDevice7 * return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveStrided(IDirect3DDevice3 *iface, - D3DPRIMITIVETYPE PrimitiveType, - DWORD VertexType, - D3DDRAWPRIMITIVESTRIDEDDATA *D3DDrawPrimStrideData, - DWORD VertexCount, - WORD *Indices, - DWORD IndexCount, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawIndexedPrimitiveStrided(IDirect3DDevice3 *iface, + D3DPRIMITIVETYPE PrimitiveType, DWORD VertexType, + D3DDRAWPRIMITIVESTRIDEDDATA *D3DDrawPrimStrideData, DWORD VertexCount, WORD *Indices, + DWORD IndexCount, DWORD Flags) { TRACE("iface %p, primitive_type %#x, FVF %#x, strided_data %p, vertex_count %u, indices %p, index_count %u, flags %#x.\n", iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Indices, IndexCount, Flags); @@ -4188,9 +4055,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(IDirect3DDevice7 *iface, stride = get_flexible_vertex_size(vb->fvf); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, - vb->wineD3DVertexDeclaration); - if(FAILED(hr)) + hr = wined3d_device_set_vertex_declaration(This->wined3d_device, vb->wineD3DVertexDeclaration); + if (FAILED(hr)) { ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr); LeaveCriticalSection(&ddraw_cs); @@ -4198,11 +4064,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(IDirect3DDevice7 *iface, } /* Set the vertex stream source */ - hr = IWineD3DDevice_SetStreamSource(This->wineD3DDevice, - 0 /* StreamNumber */, - vb->wineD3DVertexBuffer, - 0 /* StartVertex - we pass this to DrawPrimitive */, - stride); + hr = wined3d_device_set_stream_source(This->wined3d_device, 0, vb->wineD3DVertexBuffer, 0, stride); if(hr != D3D_OK) { ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr); @@ -4211,8 +4073,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB(IDirect3DDevice7 *iface, } /* Now draw the primitives */ - IWineD3DDevice_SetPrimitiveType(This->wineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawPrimitive(This->wineD3DDevice, StartVertex, NumVertices); + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_primitive(This->wined3d_device, StartVertex, NumVertices); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -4246,13 +4108,9 @@ IDirect3DDeviceImpl_7_DrawPrimitiveVB_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveVB(IDirect3DDevice3 *iface, - D3DPRIMITIVETYPE PrimitiveType, - IDirect3DVertexBuffer *D3DVertexBuf, - DWORD StartVertex, - DWORD NumVertices, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawPrimitiveVB(IDirect3DDevice3 *iface, + D3DPRIMITIVETYPE PrimitiveType, IDirect3DVertexBuffer *D3DVertexBuf, DWORD StartVertex, + DWORD NumVertices, DWORD Flags) { IDirect3DVertexBufferImpl *vb = D3DVertexBuf ? vb_from_vb1(D3DVertexBuf) : NULL; @@ -4294,9 +4152,10 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, IDirect3DDeviceImpl *This = (IDirect3DDeviceImpl *)iface; IDirect3DVertexBufferImpl *vb = (IDirect3DVertexBufferImpl *)D3DVertexBuf; DWORD stride = get_flexible_vertex_size(vb->fvf); + struct wined3d_resource *wined3d_resource; + struct wined3d_resource_desc desc; WORD *LockedIndices; HRESULT hr; - WINED3DBUFFER_DESC desc; TRACE("iface %p, primitive_type %#x, vb %p, start_vertex %u, vertex_count %u, indices %p, index_count %u, flags %#x.\n", iface, PrimitiveType, D3DVertexBuf, StartVertex, NumVertices, Indices, IndexCount, Flags); @@ -4310,9 +4169,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, - vb->wineD3DVertexDeclaration); - if(FAILED(hr)) + hr = wined3d_device_set_vertex_declaration(This->wined3d_device, vb->wineD3DVertexDeclaration); + if (FAILED(hr)) { ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr); LeaveCriticalSection(&ddraw_cs); @@ -4321,18 +4179,17 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, /* check that the buffer is large enough to hold the indices, * reallocate if necessary. */ - IWineD3DBuffer_GetDesc(This->indexbuffer, &desc); - if (desc.Size < IndexCount * sizeof(WORD)) + wined3d_resource = wined3d_buffer_get_resource(This->indexbuffer); + wined3d_resource_get_desc(wined3d_resource, &desc); + if (desc.size < IndexCount * sizeof(WORD)) { - UINT size = max(desc.Size * 2, IndexCount * sizeof(WORD)); - IWineD3DBuffer *buffer; - IParentImpl *parent; + UINT size = max(desc.size * 2, IndexCount * sizeof(WORD)); + struct wined3d_buffer *buffer; TRACE("Growing index buffer to %u bytes\n", size); - parent = IWineD3DBuffer_GetParent(This->indexbuffer); - hr = IWineD3DDevice_CreateIndexBuffer(This->wineD3DDevice, size, WINED3DUSAGE_DYNAMIC /* Usage */, - WINED3DPOOL_DEFAULT, parent, &ddraw_null_wined3d_parent_ops, &buffer); + hr = wined3d_buffer_create_ib(This->wined3d_device, size, WINED3DUSAGE_DYNAMIC /* Usage */, + WINED3DPOOL_DEFAULT, NULL, &ddraw_null_wined3d_parent_ops, &buffer); if (FAILED(hr)) { ERR("(%p) IWineD3DDevice::CreateIndexBuffer failed with hr = %08x\n", This, hr); @@ -4340,50 +4197,32 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, return hr; } - IWineD3DBuffer_Release(This->indexbuffer); + wined3d_buffer_decref(This->indexbuffer); This->indexbuffer = buffer; - - parent->child = (IUnknown *)buffer; } - /* copy the index stream into the index buffer. - * A new IWineD3DDevice method could be created - * which takes an user pointer containing the indices - * or a SetData-Method for the index buffer, which - * overrides the index buffer data with our pointer. - */ - hr = IWineD3DBuffer_Map(This->indexbuffer, - 0 /* OffSetToLock */, - IndexCount * sizeof(WORD), - (BYTE **) &LockedIndices, - 0 /* Flags */); - if(hr != D3D_OK) + /* Copy the index stream into the index buffer. A new IWineD3DDevice + * method could be created which takes an user pointer containing the + * indices or a SetData-Method for the index buffer, which overrides the + * index buffer data with our pointer. */ + hr = wined3d_buffer_map(This->indexbuffer, 0, IndexCount * sizeof(WORD), + (BYTE **)&LockedIndices, 0); + if (FAILED(hr)) { - ERR("(%p) IWineD3DBuffer::Map failed with hr = %08x\n", This, hr); + ERR("Failed to map buffer, hr %#x.\n", hr); LeaveCriticalSection(&ddraw_cs); return hr; } memcpy(LockedIndices, Indices, IndexCount * sizeof(WORD)); - hr = IWineD3DBuffer_Unmap(This->indexbuffer); - if(hr != D3D_OK) - { - ERR("(%p) IWineD3DBuffer::Unmap failed with hr = %08x\n", This, hr); - LeaveCriticalSection(&ddraw_cs); - return hr; - } + wined3d_buffer_unmap(This->indexbuffer); /* Set the index stream */ - IWineD3DDevice_SetBaseVertexIndex(This->wineD3DDevice, StartVertex); - hr = IWineD3DDevice_SetIndexBuffer(This->wineD3DDevice, This->indexbuffer, - WINED3DFMT_R16_UINT); + wined3d_device_set_base_vertex_index(This->wined3d_device, StartVertex); + hr = wined3d_device_set_index_buffer(This->wined3d_device, This->indexbuffer, WINED3DFMT_R16_UINT); /* Set the vertex stream source */ - hr = IWineD3DDevice_SetStreamSource(This->wineD3DDevice, - 0 /* StreamNumber */, - vb->wineD3DVertexBuffer, - 0 /* offset, we pass this to DrawIndexedPrimitive */, - stride); - if(hr != D3D_OK) + hr = wined3d_device_set_stream_source(This->wined3d_device, 0, vb->wineD3DVertexBuffer, 0, stride); + if (FAILED(hr)) { ERR("(%p) IDirect3DDevice::SetStreamSource failed with hr = %08x\n", This, hr); LeaveCriticalSection(&ddraw_cs); @@ -4391,8 +4230,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, } - IWineD3DDevice_SetPrimitiveType(This->wineD3DDevice, PrimitiveType); - hr = IWineD3DDevice_DrawIndexedPrimitive(This->wineD3DDevice, 0 /* StartIndex */, IndexCount); + wined3d_device_set_primitive_type(This->wined3d_device, PrimitiveType); + hr = wined3d_device_draw_indexed_primitive(This->wined3d_device, 0, IndexCount); LeaveCriticalSection(&ddraw_cs); return hr; @@ -4431,13 +4270,9 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB_FPUPreserve(IDirect3DDevice7 *iface return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB(IDirect3DDevice3 *iface, - D3DPRIMITIVETYPE PrimitiveType, - IDirect3DVertexBuffer *D3DVertexBuf, - WORD *Indices, - DWORD IndexCount, - DWORD Flags) +static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB(IDirect3DDevice3 *iface, + D3DPRIMITIVETYPE PrimitiveType, IDirect3DVertexBuffer *D3DVertexBuf, WORD *Indices, + DWORD IndexCount, DWORD Flags) { IDirect3DVertexBufferImpl *VB = vb_from_vb1(D3DVertexBuf); @@ -4508,11 +4343,11 @@ IDirect3DDeviceImpl_7_ComputeSphereVisibility(IDirect3DDevice7 *iface, if ( hr != DD_OK ) return DDERR_INVALIDPARAMS; hr = IDirect3DDeviceImpl_7_GetTransform(iface, D3DTRANSFORMSTATE_VIEW, &temp); if ( hr != DD_OK ) return DDERR_INVALIDPARAMS; - multiply_matrix_D3D_way(&m, &m, &temp); + multiply_matrix(&m, &temp, &m); hr = IDirect3DDeviceImpl_7_GetTransform(iface, D3DTRANSFORMSTATE_PROJECTION, &temp); if ( hr != DD_OK ) return DDERR_INVALIDPARAMS; - multiply_matrix_D3D_way(&m, &m, &temp); + multiply_matrix(&m, &temp, &m); /* Left plane */ vec[0].u1.x = m._14 + m._11; @@ -4559,13 +4394,8 @@ IDirect3DDeviceImpl_7_ComputeSphereVisibility(IDirect3DDevice7 *iface, return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_ComputeSphereVisibility(IDirect3DDevice3 *iface, - D3DVECTOR *Centers, - D3DVALUE *Radii, - DWORD NumSpheres, - DWORD Flags, - DWORD *ReturnValues) +static HRESULT WINAPI IDirect3DDeviceImpl_3_ComputeSphereVisibility(IDirect3DDevice3 *iface, + D3DVECTOR *Centers, D3DVALUE *Radii, DWORD NumSpheres, DWORD Flags, DWORD *ReturnValues) { TRACE("iface %p, centers %p, radii %p, sphere_count %u, flags %#x, return_values %p.\n", iface, Centers, Radii, NumSpheres, Flags, ReturnValues); @@ -4599,7 +4429,7 @@ IDirect3DDeviceImpl_7_GetTexture(IDirect3DDevice7 *iface, IDirectDrawSurface7 **Texture) { IDirect3DDeviceImpl *This = (IDirect3DDeviceImpl *)iface; - IWineD3DBaseTexture *Surf; + struct wined3d_texture *wined3d_texture; HRESULT hr; TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, Texture); @@ -4611,15 +4441,15 @@ IDirect3DDeviceImpl_7_GetTexture(IDirect3DDevice7 *iface, } EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetTexture(This->wineD3DDevice, Stage, &Surf); - if( (hr != D3D_OK) || (!Surf) ) + hr = wined3d_device_get_texture(This->wined3d_device, Stage, &wined3d_texture); + if (FAILED(hr) || !wined3d_texture) { *Texture = NULL; LeaveCriticalSection(&ddraw_cs); return hr; } - *Texture = IWineD3DBaseTexture_GetParent(Surf); + *Texture = wined3d_texture_get_parent(wined3d_texture); IDirectDrawSurface7_AddRef(*Texture); LeaveCriticalSection(&ddraw_cs); return hr; @@ -4648,10 +4478,8 @@ IDirect3DDeviceImpl_7_GetTexture_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_GetTexture(IDirect3DDevice3 *iface, - DWORD Stage, - IDirect3DTexture2 **Texture2) +static HRESULT WINAPI IDirect3DDeviceImpl_3_GetTexture(IDirect3DDevice3 *iface, DWORD Stage, + IDirect3DTexture2 **Texture2) { HRESULT ret; IDirectDrawSurface7 *ret_val; @@ -4696,9 +4524,8 @@ IDirect3DDeviceImpl_7_SetTexture(IDirect3DDevice7 *iface, /* Texture may be NULL here */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetTexture(This->wineD3DDevice, - Stage, - surf ? surf->wineD3DTexture : NULL); + hr = wined3d_device_set_texture(This->wined3d_device, + Stage, surf ? surf->wined3d_texture : NULL); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -4749,35 +4576,34 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface, { /* This fixup is required by the way D3DTBLEND_MODULATE maps to texture stage states. See IDirect3DDeviceImpl_3_SetRenderState for details. */ + struct wined3d_texture *tex = NULL; BOOL tex_alpha = FALSE; - IWineD3DBaseTexture *tex = NULL; - WINED3DSURFACE_DESC desc; DDPIXELFORMAT ddfmt; HRESULT result; - result = IWineD3DDevice_GetTexture(This->wineD3DDevice, - 0, - &tex); - - if(result == WINED3D_OK && tex) + result = wined3d_device_get_texture(This->wined3d_device, 0, &tex); + if (result == WINED3D_OK && tex) { - memset(&desc, 0, sizeof(desc)); - result = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc); - if (SUCCEEDED(result)) + struct wined3d_resource *sub_resource; + + if ((sub_resource = wined3d_texture_get_sub_resource(tex, 0))) { + struct wined3d_resource_desc desc; + + wined3d_resource_get_desc(sub_resource, &desc); ddfmt.dwSize = sizeof(ddfmt); PixelFormat_WineD3DtoDD(&ddfmt, desc.format); if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE; } - IWineD3DBaseTexture_Release(tex); + wined3d_texture_decref(tex); } /* Arg 1/2 are already set to WINED3DTA_TEXTURE/WINED3DTA_CURRENT in case of D3DTBLEND_MODULATE */ if (tex_alpha) - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1); + wined3d_device_set_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG1); else - IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); + wined3d_device_set_texture_stage_state(This->wined3d_device, 0, WINED3DTSS_ALPHAOP, WINED3DTOP_SELECTARG2); } LeaveCriticalSection(&ddraw_cs); @@ -4865,7 +4691,7 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface, if (l->sampler_state) { - hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice, Stage, l->state, State); + hr = wined3d_device_get_sampler_state(This->wined3d_device, Stage, l->state, State); switch(TexStageStateType) { @@ -4909,7 +4735,7 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface, } else { - hr = IWineD3DDevice_GetTextureStageState(This->wineD3DDevice, Stage, l->state, State); + hr = wined3d_device_get_texture_stage_state(This->wined3d_device, Stage, l->state, State); } LeaveCriticalSection(&ddraw_cs); @@ -4941,11 +4767,8 @@ IDirect3DDeviceImpl_7_GetTextureStageState_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_GetTextureStageState(IDirect3DDevice3 *iface, - DWORD Stage, - D3DTEXTURESTAGESTATETYPE TexStageStateType, - DWORD *State) +static HRESULT WINAPI IDirect3DDeviceImpl_3_GetTextureStageState(IDirect3DDevice3 *iface, + DWORD Stage, D3DTEXTURESTAGESTATETYPE TexStageStateType, DWORD *State) { TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, Stage, TexStageStateType, State); @@ -5035,18 +4858,18 @@ IDirect3DDeviceImpl_7_SetTextureStageState(IDirect3DDevice7 *iface, } case D3DTSS_ADDRESS: - IWineD3DDevice_SetSamplerState(This->wineD3DDevice, Stage, WINED3DSAMP_ADDRESSV, State); + wined3d_device_set_sampler_state(This->wined3d_device, Stage, WINED3DSAMP_ADDRESSV, State); break; default: break; } - hr = IWineD3DDevice_SetSamplerState(This->wineD3DDevice, Stage, l->state, State); + hr = wined3d_device_set_sampler_state(This->wined3d_device, Stage, l->state, State); } else { - hr = IWineD3DDevice_SetTextureStageState(This->wineD3DDevice, Stage, l->state, State); + hr = wined3d_device_set_texture_stage_state(This->wined3d_device, Stage, l->state, State); } LeaveCriticalSection(&ddraw_cs); @@ -5078,11 +4901,8 @@ IDirect3DDeviceImpl_7_SetTextureStageState_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_SetTextureStageState(IDirect3DDevice3 *iface, - DWORD Stage, - D3DTEXTURESTAGESTATETYPE TexStageStateType, - DWORD State) +static HRESULT WINAPI IDirect3DDeviceImpl_3_SetTextureStageState(IDirect3DDevice3 *iface, + DWORD Stage, D3DTEXTURESTAGESTATETYPE TexStageStateType, DWORD State) { TRACE("iface %p, stage %u, state %#x, value %#x.\n", iface, Stage, TexStageStateType, State); @@ -5119,7 +4939,7 @@ IDirect3DDeviceImpl_7_ValidateDevice(IDirect3DDevice7 *iface, TRACE("iface %p, pass_count %p.\n", iface, NumPasses); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_ValidateDevice(This->wineD3DDevice, NumPasses); + hr = wined3d_device_validate_device(This->wined3d_device, NumPasses); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -5145,9 +4965,7 @@ IDirect3DDeviceImpl_7_ValidateDevice_FPUPreserve(IDirect3DDevice7 *iface, return hr; } -static HRESULT WINAPI -Thunk_IDirect3DDeviceImpl_3_ValidateDevice(IDirect3DDevice3 *iface, - DWORD *Passes) +static HRESULT WINAPI IDirect3DDeviceImpl_3_ValidateDevice(IDirect3DDevice3 *iface, DWORD *Passes) { TRACE("iface %p, pass_count %p.\n", iface, Passes); @@ -5191,7 +5009,7 @@ IDirect3DDeviceImpl_7_Clear(IDirect3DDevice7 *iface, iface, Count, Rects, Flags, Color, Z, Stencil); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_Clear(This->wineD3DDevice, Count, (RECT *)Rects, Flags, Color, Z, Stencil); + hr = wined3d_device_clear(This->wined3d_device, Count, (RECT *)Rects, Flags, Color, Z, Stencil); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -5258,8 +5076,7 @@ IDirect3DDeviceImpl_7_SetViewport(IDirect3DDevice7 *iface, /* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetViewport(This->wineD3DDevice, - (WINED3DVIEWPORT*) Data); + hr = wined3d_device_set_viewport(This->wined3d_device, (WINED3DVIEWPORT *)Data); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -5315,8 +5132,7 @@ IDirect3DDeviceImpl_7_GetViewport(IDirect3DDevice7 *iface, /* Note: D3DVIEWPORT7 is compatible with WINED3DVIEWPORT */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetViewport(This->wineD3DDevice, - (WINED3DVIEWPORT*) Data); + hr = wined3d_device_get_viewport(This->wined3d_device, (WINED3DVIEWPORT *)Data); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); @@ -5371,8 +5187,7 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface, if (!Mat) return DDERR_INVALIDPARAMS; /* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */ EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetMaterial(This->wineD3DDevice, - (WINED3DMATERIAL*) Mat); + hr = wined3d_device_set_material(This->wined3d_device, (WINED3DMATERIAL *)Mat); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); } @@ -5425,8 +5240,7 @@ IDirect3DDeviceImpl_7_GetMaterial(IDirect3DDevice7 *iface, EnterCriticalSection(&ddraw_cs); /* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */ - hr = IWineD3DDevice_GetMaterial(This->wineD3DDevice, - (WINED3DMATERIAL*) Mat); + hr = wined3d_device_get_material(This->wined3d_device, (WINED3DMATERIAL *)Mat); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); } @@ -5480,9 +5294,7 @@ IDirect3DDeviceImpl_7_SetLight(IDirect3DDevice7 *iface, EnterCriticalSection(&ddraw_cs); /* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */ - hr = IWineD3DDevice_SetLight(This->wineD3DDevice, - LightIndex, - (WINED3DLIGHT*) Light); + hr = wined3d_device_set_light(This->wined3d_device, LightIndex, (WINED3DLIGHT *)Light); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); } @@ -5536,9 +5348,7 @@ IDirect3DDeviceImpl_7_GetLight(IDirect3DDevice7 *iface, EnterCriticalSection(&ddraw_cs); /* Note: D3DLIGHT7 is compatible with WINED3DLIGHT */ - rc = IWineD3DDevice_GetLight(This->wineD3DDevice, - LightIndex, - (WINED3DLIGHT*) Light); + rc = wined3d_device_get_light(This->wined3d_device, LightIndex, (WINED3DLIGHT *)Light); /* Translate the result. WineD3D returns other values than D3D7 */ LeaveCriticalSection(&ddraw_cs); @@ -5589,7 +5399,7 @@ IDirect3DDeviceImpl_7_BeginStateBlock(IDirect3DDevice7 *iface) TRACE("iface %p.\n", iface); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_BeginStateBlock(This->wineD3DDevice); + hr = wined3d_device_begin_stateblock(This->wined3d_device); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); } @@ -5635,7 +5445,7 @@ IDirect3DDeviceImpl_7_EndStateBlock(IDirect3DDevice7 *iface, DWORD *BlockHandle) { IDirect3DDeviceImpl *This = (IDirect3DDeviceImpl *)iface; - IWineD3DStateBlock *wined3d_sb; + struct wined3d_stateblock *wined3d_sb; HRESULT hr; DWORD h; @@ -5649,7 +5459,7 @@ IDirect3DDeviceImpl_7_EndStateBlock(IDirect3DDevice7 *iface, EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_EndStateBlock(This->wineD3DDevice, &wined3d_sb); + hr = wined3d_device_end_stateblock(This->wined3d_device, &wined3d_sb); if (FAILED(hr)) { WARN("Failed to end stateblock, hr %#x.\n", hr); @@ -5662,7 +5472,7 @@ IDirect3DDeviceImpl_7_EndStateBlock(IDirect3DDevice7 *iface, if (h == DDRAW_INVALID_HANDLE) { ERR("Failed to allocate a stateblock handle.\n"); - IWineD3DStateBlock_Release(wined3d_sb); + wined3d_stateblock_decref(wined3d_sb); LeaveCriticalSection(&ddraw_cs); *BlockHandle = 0; return DDERR_OUTOFMEMORY; @@ -5724,7 +5534,7 @@ IDirect3DDeviceImpl_7_PreLoad(IDirect3DDevice7 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - IWineD3DSurface_PreLoad(surf->WineD3DSurface); + wined3d_surface_preload(surf->wined3d_surface); LeaveCriticalSection(&ddraw_cs); return D3D_OK; } @@ -5768,7 +5578,7 @@ IDirect3DDeviceImpl_7_ApplyStateBlock(IDirect3DDevice7 *iface, DWORD BlockHandle) { IDirect3DDeviceImpl *This = (IDirect3DDeviceImpl *)iface; - IWineD3DStateBlock *wined3d_sb; + struct wined3d_stateblock *wined3d_sb; HRESULT hr; TRACE("iface %p, stateblock %#x.\n", iface, BlockHandle); @@ -5783,7 +5593,7 @@ IDirect3DDeviceImpl_7_ApplyStateBlock(IDirect3DDevice7 *iface, return D3DERR_INVALIDSTATEBLOCK; } - hr = IWineD3DStateBlock_Apply(wined3d_sb); + hr = wined3d_stateblock_apply(wined3d_sb); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); @@ -5831,7 +5641,7 @@ IDirect3DDeviceImpl_7_CaptureStateBlock(IDirect3DDevice7 *iface, DWORD BlockHandle) { IDirect3DDeviceImpl *This = (IDirect3DDeviceImpl *)iface; - IWineD3DStateBlock *wined3d_sb; + struct wined3d_stateblock *wined3d_sb; HRESULT hr; TRACE("iface %p, stateblock %#x.\n", iface, BlockHandle); @@ -5846,7 +5656,7 @@ IDirect3DDeviceImpl_7_CaptureStateBlock(IDirect3DDevice7 *iface, return D3DERR_INVALIDSTATEBLOCK; } - hr = IWineD3DStateBlock_Capture(wined3d_sb); + hr = wined3d_stateblock_capture(wined3d_sb); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); } @@ -5892,7 +5702,7 @@ IDirect3DDeviceImpl_7_DeleteStateBlock(IDirect3DDevice7 *iface, DWORD BlockHandle) { IDirect3DDeviceImpl *This = (IDirect3DDeviceImpl *)iface; - IWineD3DStateBlock *wined3d_sb; + struct wined3d_stateblock *wined3d_sb; ULONG ref; TRACE("iface %p, stateblock %#x.\n", iface, BlockHandle); @@ -5907,7 +5717,7 @@ IDirect3DDeviceImpl_7_DeleteStateBlock(IDirect3DDevice7 *iface, return D3DERR_INVALIDSTATEBLOCK; } - if ((ref = IWineD3DStateBlock_Release(wined3d_sb))) + if ((ref = wined3d_stateblock_decref(wined3d_sb))) { ERR("Something is still holding stateblock %p (refcount %u).\n", wined3d_sb, ref); } @@ -5959,7 +5769,7 @@ IDirect3DDeviceImpl_7_CreateStateBlock(IDirect3DDevice7 *iface, DWORD *BlockHandle) { IDirect3DDeviceImpl *This = (IDirect3DDeviceImpl *)iface; - IWineD3DStateBlock *wined3d_sb; + struct wined3d_stateblock *wined3d_sb; HRESULT hr; DWORD h; @@ -5979,7 +5789,7 @@ IDirect3DDeviceImpl_7_CreateStateBlock(IDirect3DDevice7 *iface, EnterCriticalSection(&ddraw_cs); /* The D3DSTATEBLOCKTYPE enum is fine here. */ - hr = IWineD3DDevice_CreateStateBlock(This->wineD3DDevice, Type, &wined3d_sb); + hr = wined3d_stateblock_create(This->wined3d_device, Type, &wined3d_sb); if (FAILED(hr)) { WARN("Failed to create stateblock, hr %#x.\n", hr); @@ -5991,7 +5801,7 @@ IDirect3DDeviceImpl_7_CreateStateBlock(IDirect3DDevice7 *iface, if (h == DDRAW_INVALID_HANDLE) { ERR("Failed to allocate stateblock handle.\n"); - IWineD3DStateBlock_Release(wined3d_sb); + wined3d_stateblock_decref(wined3d_sb); LeaveCriticalSection(&ddraw_cs); return DDERR_OUTOFMEMORY; } @@ -6135,19 +5945,20 @@ static void copy_mipmap_chain(IDirect3DDeviceImpl *device, if (src_level->surface_desc.dwWidth == dest_level->surface_desc.dwWidth && src_level->surface_desc.dwHeight == dest_level->surface_desc.dwHeight) { - /* Try UpdateSurface that may perform a more direct opengl loading. But skip this if destination is paletted texture and has no palette. - * Some games like Sacrifice set palette after Load, and it is a waste of effort to try to load texture without palette and generates - * warnings in wined3d. */ + /* Try UpdateSurface that may perform a more direct OpenGL + * loading. But skip this if destination is paletted texture and + * has no palette. Some games like Sacrifice set palette after + * Load, and it is a waste of effort to try to load texture + * without palette and generates warnings in wined3d. */ if (!palette_missing) - hr = IWineD3DDevice_UpdateSurface(device->wineD3DDevice, src_level->WineD3DSurface, &rect, dest_level->WineD3DSurface, - &point); + hr = wined3d_device_update_surface(device->wined3d_device, src_level->wined3d_surface, + &rect, dest_level->wined3d_surface, &point); if (palette_missing || FAILED(hr)) { /* UpdateSurface may fail e.g. if dest is in system memory. Fall back to BltFast that is less strict. */ - IWineD3DSurface_BltFast(dest_level->WineD3DSurface, - point.x, point.y, - src_level->WineD3DSurface, &rect, 0); + wined3d_surface_bltfast(dest_level->wined3d_surface, point.x, point.y, + src_level->wined3d_surface, &rect, 0); } ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE; @@ -6434,7 +6245,7 @@ IDirect3DDeviceImpl_7_LightEnable(IDirect3DDevice7 *iface, TRACE("iface %p, light_idx %u, enabled %#x.\n", iface, LightIndex, Enable); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetLightEnable(This->wineD3DDevice, LightIndex, Enable); + hr = wined3d_device_set_light_enable(This->wined3d_device, LightIndex, Enable); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); } @@ -6493,7 +6304,7 @@ IDirect3DDeviceImpl_7_GetLightEnable(IDirect3DDevice7 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetLightEnable(This->wineD3DDevice, LightIndex, Enable); + hr = wined3d_device_get_light_enable(This->wined3d_device, LightIndex, Enable); LeaveCriticalSection(&ddraw_cs); return hr_ddraw_from_wined3d(hr); } @@ -6552,7 +6363,7 @@ IDirect3DDeviceImpl_7_SetClipPlane(IDirect3DDevice7 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_SetClipPlane(This->wineD3DDevice, Index, PlaneEquation); + hr = wined3d_device_set_clip_plane(This->wined3d_device, Index, PlaneEquation); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -6609,7 +6420,7 @@ IDirect3DDeviceImpl_7_GetClipPlane(IDirect3DDevice7 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_GetClipPlane(This->wineD3DDevice, Index, PlaneEquation); + hr = wined3d_device_get_clip_plane(This->wined3d_device, Index, PlaneEquation); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -6800,23 +6611,23 @@ static const struct IDirect3DDevice7Vtbl d3d_device7_fpu_preserve_vtbl = static const struct IDirect3DDevice3Vtbl d3d_device3_vtbl = { /*** IUnknown Methods ***/ - Thunk_IDirect3DDeviceImpl_3_QueryInterface, - Thunk_IDirect3DDeviceImpl_3_AddRef, - Thunk_IDirect3DDeviceImpl_3_Release, + IDirect3DDeviceImpl_3_QueryInterface, + IDirect3DDeviceImpl_3_AddRef, + IDirect3DDeviceImpl_3_Release, /*** IDirect3DDevice3 ***/ IDirect3DDeviceImpl_3_GetCaps, IDirect3DDeviceImpl_3_GetStats, IDirect3DDeviceImpl_3_AddViewport, IDirect3DDeviceImpl_3_DeleteViewport, IDirect3DDeviceImpl_3_NextViewport, - Thunk_IDirect3DDeviceImpl_3_EnumTextureFormats, - Thunk_IDirect3DDeviceImpl_3_BeginScene, - Thunk_IDirect3DDeviceImpl_3_EndScene, - Thunk_IDirect3DDeviceImpl_3_GetDirect3D, + IDirect3DDeviceImpl_3_EnumTextureFormats, + IDirect3DDeviceImpl_3_BeginScene, + IDirect3DDeviceImpl_3_EndScene, + IDirect3DDeviceImpl_3_GetDirect3D, IDirect3DDeviceImpl_3_SetCurrentViewport, IDirect3DDeviceImpl_3_GetCurrentViewport, - Thunk_IDirect3DDeviceImpl_3_SetRenderTarget, - Thunk_IDirect3DDeviceImpl_3_GetRenderTarget, + IDirect3DDeviceImpl_3_SetRenderTarget, + IDirect3DDeviceImpl_3_GetRenderTarget, IDirect3DDeviceImpl_3_Begin, IDirect3DDeviceImpl_3_BeginIndexed, IDirect3DDeviceImpl_3_Vertex, @@ -6826,90 +6637,90 @@ static const struct IDirect3DDevice3Vtbl d3d_device3_vtbl = IDirect3DDeviceImpl_3_SetRenderState, IDirect3DDeviceImpl_3_GetLightState, IDirect3DDeviceImpl_3_SetLightState, - Thunk_IDirect3DDeviceImpl_3_SetTransform, - Thunk_IDirect3DDeviceImpl_3_GetTransform, - Thunk_IDirect3DDeviceImpl_3_MultiplyTransform, - Thunk_IDirect3DDeviceImpl_3_DrawPrimitive, - Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitive, - Thunk_IDirect3DDeviceImpl_3_SetClipStatus, - Thunk_IDirect3DDeviceImpl_3_GetClipStatus, - Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveStrided, - Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveStrided, - Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveVB, - Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB, - Thunk_IDirect3DDeviceImpl_3_ComputeSphereVisibility, - Thunk_IDirect3DDeviceImpl_3_GetTexture, + IDirect3DDeviceImpl_3_SetTransform, + IDirect3DDeviceImpl_3_GetTransform, + IDirect3DDeviceImpl_3_MultiplyTransform, + IDirect3DDeviceImpl_3_DrawPrimitive, + IDirect3DDeviceImpl_3_DrawIndexedPrimitive, + IDirect3DDeviceImpl_3_SetClipStatus, + IDirect3DDeviceImpl_3_GetClipStatus, + IDirect3DDeviceImpl_3_DrawPrimitiveStrided, + IDirect3DDeviceImpl_3_DrawIndexedPrimitiveStrided, + IDirect3DDeviceImpl_3_DrawPrimitiveVB, + IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB, + IDirect3DDeviceImpl_3_ComputeSphereVisibility, + IDirect3DDeviceImpl_3_GetTexture, IDirect3DDeviceImpl_3_SetTexture, - Thunk_IDirect3DDeviceImpl_3_GetTextureStageState, - Thunk_IDirect3DDeviceImpl_3_SetTextureStageState, - Thunk_IDirect3DDeviceImpl_3_ValidateDevice + IDirect3DDeviceImpl_3_GetTextureStageState, + IDirect3DDeviceImpl_3_SetTextureStageState, + IDirect3DDeviceImpl_3_ValidateDevice }; static const struct IDirect3DDevice2Vtbl d3d_device2_vtbl = { /*** IUnknown Methods ***/ - Thunk_IDirect3DDeviceImpl_2_QueryInterface, - Thunk_IDirect3DDeviceImpl_2_AddRef, - Thunk_IDirect3DDeviceImpl_2_Release, + IDirect3DDeviceImpl_2_QueryInterface, + IDirect3DDeviceImpl_2_AddRef, + IDirect3DDeviceImpl_2_Release, /*** IDirect3DDevice2 ***/ - Thunk_IDirect3DDeviceImpl_2_GetCaps, + IDirect3DDeviceImpl_2_GetCaps, IDirect3DDeviceImpl_2_SwapTextureHandles, - Thunk_IDirect3DDeviceImpl_2_GetStats, - Thunk_IDirect3DDeviceImpl_2_AddViewport, - Thunk_IDirect3DDeviceImpl_2_DeleteViewport, - Thunk_IDirect3DDeviceImpl_2_NextViewport, + IDirect3DDeviceImpl_2_GetStats, + IDirect3DDeviceImpl_2_AddViewport, + IDirect3DDeviceImpl_2_DeleteViewport, + IDirect3DDeviceImpl_2_NextViewport, IDirect3DDeviceImpl_2_EnumTextureFormats, - Thunk_IDirect3DDeviceImpl_2_BeginScene, - Thunk_IDirect3DDeviceImpl_2_EndScene, - Thunk_IDirect3DDeviceImpl_2_GetDirect3D, - Thunk_IDirect3DDeviceImpl_2_SetCurrentViewport, - Thunk_IDirect3DDeviceImpl_2_GetCurrentViewport, - Thunk_IDirect3DDeviceImpl_2_SetRenderTarget, - Thunk_IDirect3DDeviceImpl_2_GetRenderTarget, - Thunk_IDirect3DDeviceImpl_2_Begin, - Thunk_IDirect3DDeviceImpl_2_BeginIndexed, - Thunk_IDirect3DDeviceImpl_2_Vertex, - Thunk_IDirect3DDeviceImpl_2_Index, - Thunk_IDirect3DDeviceImpl_2_End, - Thunk_IDirect3DDeviceImpl_2_GetRenderState, - Thunk_IDirect3DDeviceImpl_2_SetRenderState, - Thunk_IDirect3DDeviceImpl_2_GetLightState, - Thunk_IDirect3DDeviceImpl_2_SetLightState, - Thunk_IDirect3DDeviceImpl_2_SetTransform, - Thunk_IDirect3DDeviceImpl_2_GetTransform, - Thunk_IDirect3DDeviceImpl_2_MultiplyTransform, - Thunk_IDirect3DDeviceImpl_2_DrawPrimitive, - Thunk_IDirect3DDeviceImpl_2_DrawIndexedPrimitive, - Thunk_IDirect3DDeviceImpl_2_SetClipStatus, - Thunk_IDirect3DDeviceImpl_2_GetClipStatus + IDirect3DDeviceImpl_2_BeginScene, + IDirect3DDeviceImpl_2_EndScene, + IDirect3DDeviceImpl_2_GetDirect3D, + IDirect3DDeviceImpl_2_SetCurrentViewport, + IDirect3DDeviceImpl_2_GetCurrentViewport, + IDirect3DDeviceImpl_2_SetRenderTarget, + IDirect3DDeviceImpl_2_GetRenderTarget, + IDirect3DDeviceImpl_2_Begin, + IDirect3DDeviceImpl_2_BeginIndexed, + IDirect3DDeviceImpl_2_Vertex, + IDirect3DDeviceImpl_2_Index, + IDirect3DDeviceImpl_2_End, + IDirect3DDeviceImpl_2_GetRenderState, + IDirect3DDeviceImpl_2_SetRenderState, + IDirect3DDeviceImpl_2_GetLightState, + IDirect3DDeviceImpl_2_SetLightState, + IDirect3DDeviceImpl_2_SetTransform, + IDirect3DDeviceImpl_2_GetTransform, + IDirect3DDeviceImpl_2_MultiplyTransform, + IDirect3DDeviceImpl_2_DrawPrimitive, + IDirect3DDeviceImpl_2_DrawIndexedPrimitive, + IDirect3DDeviceImpl_2_SetClipStatus, + IDirect3DDeviceImpl_2_GetClipStatus }; static const struct IDirect3DDeviceVtbl d3d_device1_vtbl = { /*** IUnknown Methods ***/ - Thunk_IDirect3DDeviceImpl_1_QueryInterface, - Thunk_IDirect3DDeviceImpl_1_AddRef, - Thunk_IDirect3DDeviceImpl_1_Release, + IDirect3DDeviceImpl_1_QueryInterface, + IDirect3DDeviceImpl_1_AddRef, + IDirect3DDeviceImpl_1_Release, /*** IDirect3DDevice1 ***/ IDirect3DDeviceImpl_1_Initialize, - Thunk_IDirect3DDeviceImpl_1_GetCaps, - Thunk_IDirect3DDeviceImpl_1_SwapTextureHandles, + IDirect3DDeviceImpl_1_GetCaps, + IDirect3DDeviceImpl_1_SwapTextureHandles, IDirect3DDeviceImpl_1_CreateExecuteBuffer, - Thunk_IDirect3DDeviceImpl_1_GetStats, + IDirect3DDeviceImpl_1_GetStats, IDirect3DDeviceImpl_1_Execute, - Thunk_IDirect3DDeviceImpl_1_AddViewport, - Thunk_IDirect3DDeviceImpl_1_DeleteViewport, - Thunk_IDirect3DDeviceImpl_1_NextViewport, + IDirect3DDeviceImpl_1_AddViewport, + IDirect3DDeviceImpl_1_DeleteViewport, + IDirect3DDeviceImpl_1_NextViewport, IDirect3DDeviceImpl_1_Pick, IDirect3DDeviceImpl_1_GetPickRecords, - Thunk_IDirect3DDeviceImpl_1_EnumTextureFormats, + IDirect3DDeviceImpl_1_EnumTextureFormats, IDirect3DDeviceImpl_1_CreateMatrix, IDirect3DDeviceImpl_1_SetMatrix, IDirect3DDeviceImpl_1_GetMatrix, IDirect3DDeviceImpl_1_DeleteMatrix, - Thunk_IDirect3DDeviceImpl_1_BeginScene, - Thunk_IDirect3DDeviceImpl_1_EndScene, - Thunk_IDirect3DDeviceImpl_1_GetDirect3D + IDirect3DDeviceImpl_1_BeginScene, + IDirect3DDeviceImpl_1_EndScene, + IDirect3DDeviceImpl_1_GetDirect3D }; /***************************************************************************** @@ -6933,15 +6744,13 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) if(!depthStencil) { TRACE("Setting wined3d depth stencil to NULL\n"); - IWineD3DDevice_SetDepthStencilSurface(This->wineD3DDevice, - NULL); + wined3d_device_set_depth_stencil(This->wined3d_device, NULL); return WINED3DZB_FALSE; } dsi = (IDirectDrawSurfaceImpl *)depthStencil; - TRACE("Setting wined3d depth stencil to %p (wined3d %p)\n", dsi, dsi->WineD3DSurface); - IWineD3DDevice_SetDepthStencilSurface(This->wineD3DDevice, - dsi->WineD3DSurface); + TRACE("Setting wined3d depth stencil to %p (wined3d %p)\n", dsi, dsi->wined3d_surface); + wined3d_device_set_depth_stencil(This->wined3d_device, dsi->wined3d_surface); IDirectDrawSurface7_Release(depthStencil); return WINED3DZB_TRUE; @@ -6949,7 +6758,6 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDirectDrawSurfaceImpl *target) { - IParentImpl *index_buffer_parent; HRESULT hr; if (ddraw->cooperative_level & DDSCL_FPUPRESERVE) @@ -6963,6 +6771,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi device->ref = 1; device->ddraw = ddraw; device->target = target; + list_init(&device->viewport_list); if (!ddraw_handle_table_init(&device->handle_table, 64)) { @@ -6973,38 +6782,26 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi device->legacyTextureBlending = FALSE; /* Create an index buffer, it's needed for indexed drawing */ - index_buffer_parent = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*index_buffer_parent)); - if (!index_buffer_parent) - { - ERR("Failed to allocate index buffer parent memory.\n"); - ddraw_handle_table_destroy(&device->handle_table); - return DDERR_OUTOFMEMORY; - } - - ddraw_parent_init(index_buffer_parent); - - hr = IWineD3DDevice_CreateIndexBuffer(ddraw->wineD3DDevice, 0x40000 /* Length. Don't know how long it should be */, - WINED3DUSAGE_DYNAMIC /* Usage */, WINED3DPOOL_DEFAULT, index_buffer_parent, + hr = wined3d_buffer_create_ib(ddraw->wined3d_device, 0x40000 /* Length. Don't know how long it should be */, + WINED3DUSAGE_DYNAMIC /* Usage */, WINED3DPOOL_DEFAULT, NULL, &ddraw_null_wined3d_parent_ops, &device->indexbuffer); if (FAILED(hr)) { ERR("Failed to create an index buffer, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, index_buffer_parent); ddraw_handle_table_destroy(&device->handle_table); return hr; } - index_buffer_parent->child = (IUnknown *)device->indexbuffer; /* This is for convenience. */ - device->wineD3DDevice = ddraw->wineD3DDevice; - IWineD3DDevice_AddRef(ddraw->wineD3DDevice); + device->wined3d_device = ddraw->wined3d_device; + wined3d_device_incref(ddraw->wined3d_device); /* Render to the back buffer */ - hr = IWineD3DDevice_SetRenderTarget(ddraw->wineD3DDevice, 0, target->WineD3DSurface, TRUE); + hr = wined3d_device_set_render_target(ddraw->wined3d_device, 0, target->wined3d_surface, TRUE); if (FAILED(hr)) { ERR("Failed to set render target, hr %#x.\n", hr); - IParent_Release((IParent *)index_buffer_parent); + wined3d_buffer_decref(device->indexbuffer); ddraw_handle_table_destroy(&device->handle_table); return hr; } @@ -7023,7 +6820,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi ddraw->d3ddevice = device; - IWineD3DDevice_SetRenderState(ddraw->wineD3DDevice, WINED3DRS_ZENABLE, + wined3d_device_set_render_state(ddraw->wined3d_device, WINED3DRS_ZENABLE, IDirect3DDeviceImpl_UpdateDepthStencil(device)); return D3D_OK; diff --git a/dll/directx/wine/ddraw/executebuffer.c b/dll/directx/wine/ddraw/executebuffer.c index d4d2dd0b72f..86a3aa9e581 100644 --- a/dll/directx/wine/ddraw/executebuffer.c +++ b/dll/directx/wine/ddraw/executebuffer.c @@ -68,10 +68,8 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) { * Viewport: Viewport for this operation * *****************************************************************************/ -void -IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, - IDirect3DDeviceImpl *lpDevice, - IDirect3DViewportImpl *lpViewport) +HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This, + IDirect3DDeviceImpl *lpDevice, IDirect3DViewportImpl *lpViewport) { /* DWORD bs = This->desc.dwBufferSize; */ DWORD vs = This->data.dwVertexOffset; @@ -81,10 +79,14 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, char *instr = (char *)This->desc.lpData + is; - /* Should check if the viewport was added or not to the device */ + if (lpViewport->active_device != lpDevice) + { + WARN("Viewport %p active device is %p.\n", + lpViewport, lpViewport->active_device); + return DDERR_INVALIDPARAMS; + } /* Activate the viewport */ - lpViewport->active_device = lpDevice; viewport_activate(lpViewport, FALSE); TRACE("ExecuteData :\n"); @@ -153,11 +155,8 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, } /* IDirect3DDevices have color keying always enabled - * enable it before drawing. This overwrites any ALPHA* - * render state - */ - IWineD3DDevice_SetRenderState(lpDevice->wineD3DDevice, - WINED3DRS_COLORKEYENABLE, - 1); + * render state. */ + wined3d_device_set_render_state(lpDevice->wined3d_device, WINED3DRS_COLORKEYENABLE, 1); IDirect3DDevice7_DrawIndexedPrimitive((IDirect3DDevice7 *)lpDevice, D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, 0, This->indices, count * 3, 0); } break; @@ -316,18 +315,12 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, /* Get the transform and world matrix */ /* Note: D3DMATRIX is compatible with WINED3DMATRIX */ - - IWineD3DDevice_GetTransform(lpDevice->wineD3DDevice, - D3DTRANSFORMSTATE_VIEW, - (WINED3DMATRIX*) &view_mat); - - IWineD3DDevice_GetTransform(lpDevice->wineD3DDevice, - D3DTRANSFORMSTATE_PROJECTION, - (WINED3DMATRIX*) &proj_mat); - - IWineD3DDevice_GetTransform(lpDevice->wineD3DDevice, - WINED3DTS_WORLDMATRIX(0), - (WINED3DMATRIX*) &world_mat); + wined3d_device_get_transform(lpDevice->wined3d_device, + D3DTRANSFORMSTATE_VIEW, (WINED3DMATRIX *)&view_mat); + wined3d_device_get_transform(lpDevice->wined3d_device, + D3DTRANSFORMSTATE_PROJECTION, (WINED3DMATRIX *)&proj_mat); + wined3d_device_get_transform(lpDevice->wined3d_device, + WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)&world_mat); for (i = 0; i < count; i++) { LPD3DPROCESSVERTICES ci = (LPD3DPROCESSVERTICES) instr; @@ -551,7 +544,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, } end_of_buffer: - ; + return D3D_OK; } /***************************************************************************** diff --git a/dll/directx/wine/ddraw/main.c b/dll/directx/wine/ddraw/main.c index 217a2cbcff8..875e1947f8d 100644 --- a/dll/directx/wine/ddraw/main.c +++ b/dll/directx/wine/ddraw/main.c @@ -38,8 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); /* The configured default surface */ WINED3DSURFTYPE DefaultSurfaceType = SURFACE_UNKNOWN; -typeof(WineDirect3DCreateClipper) *pWineDirect3DCreateClipper DECLSPEC_HIDDEN; -typeof(WineDirect3DCreate) *pWineDirect3DCreate DECLSPEC_HIDDEN; + /* DDraw list and critical section */ static struct list global_ddraw_list = LIST_INIT(global_ddraw_list); @@ -167,31 +166,6 @@ void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_ha return entry->object; } -/* - * Helper Function for DDRAW_Create and DirectDrawCreateClipper for - * lazy loading of the Wine D3D driver. - * - * Returns - * TRUE on success - * FALSE on failure. - */ - -BOOL LoadWineD3D(void) -{ - static HMODULE hWineD3D = (HMODULE) -1; - if (hWineD3D == (HMODULE) -1) - { - hWineD3D = LoadLibraryA("wined3d"); - if (hWineD3D) - { - pWineDirect3DCreate = (typeof(WineDirect3DCreate) *)GetProcAddress(hWineD3D, "WineDirect3DCreate"); - pWineDirect3DCreateClipper = (typeof(WineDirect3DCreateClipper) *) GetProcAddress(hWineD3D, "WineDirect3DCreateClipper"); - return TRUE; - } - } - return hWineD3D != NULL; -} - /*********************************************************************** * * Helper function for DirectDrawCreate and friends @@ -270,8 +244,8 @@ DDRAW_Create(const GUID *guid, return hr; } - hr = IDirectDraw7_QueryInterface((IDirectDraw7 *)This, iid, DD); - IDirectDraw7_Release((IDirectDraw7 *)This); + hr = IDirectDraw7_QueryInterface(&This->IDirectDraw7_iface, iid, DD); + IDirectDraw7_Release(&This->IDirectDraw7_iface); if (SUCCEEDED(hr)) list_add_head(&global_ddraw_list, &This->ddraw_list_entry); else WARN("Failed to query interface %s from ddraw object %p.\n", debugstr_guid(iid), This); @@ -525,6 +499,23 @@ static const struct object_creation_info object_creation[] = { &CLSID_DirectDrawClipper, CF_CreateDirectDrawClipper } }; + +/****************************************************************************** + * DirectDraw ClassFactory implementation + ******************************************************************************/ +typedef struct +{ + IClassFactory IClassFactory_iface; + + LONG ref; + HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, REFIID iid, LPVOID *ppObj); +} IClassFactoryImpl; + +static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface); +} + /******************************************************************************* * IDirectDrawClassFactory::QueryInterface * @@ -539,12 +530,10 @@ static const struct object_creation_info object_creation[] = * Failure: E_NOINTERFACE * *******************************************************************************/ -static HRESULT WINAPI -IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface, - REFIID riid, - void **obj) +static HRESULT WINAPI IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface, REFIID riid, + void **obj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obj); @@ -569,10 +558,9 @@ IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface, * The new refcount * *******************************************************************************/ -static ULONG WINAPI -IDirectDrawClassFactoryImpl_AddRef(IClassFactory *iface) +static ULONG WINAPI IDirectDrawClassFactoryImpl_AddRef(IClassFactory *iface) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", This, ref); @@ -590,10 +578,9 @@ IDirectDrawClassFactoryImpl_AddRef(IClassFactory *iface) * The new refcount * *******************************************************************************/ -static ULONG WINAPI -IDirectDrawClassFactoryImpl_Release(IClassFactory *iface) +static ULONG WINAPI IDirectDrawClassFactoryImpl_Release(IClassFactory *iface) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", This, ref); @@ -617,13 +604,10 @@ IDirectDrawClassFactoryImpl_Release(IClassFactory *iface) * ??? * *******************************************************************************/ -static HRESULT WINAPI -IDirectDrawClassFactoryImpl_CreateInstance(IClassFactory *iface, - IUnknown *UnkOuter, - REFIID riid, - void **obj) +static HRESULT WINAPI IDirectDrawClassFactoryImpl_CreateInstance(IClassFactory *iface, + IUnknown *UnkOuter, REFIID riid, void **obj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); TRACE("iface %p, outer_unknown %p, riid %s, object %p.\n", iface, UnkOuter, debugstr_guid(riid), obj); @@ -706,7 +690,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) factory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*factory)); if (factory == NULL) return E_OUTOFMEMORY; - factory->lpVtbl = &IClassFactory_Vtbl; + factory->IClassFactory_iface.lpVtbl = &IClassFactory_Vtbl; factory->ref = 1; factory->pfnCreateInstance = object_creation[i].pfnCreateInstance; @@ -916,11 +900,11 @@ DllMain(HINSTANCE hInstDLL, WARN("DDraw %p has a refcount of %d\n", ddraw, ddraw->ref7 + ddraw->ref4 + ddraw->ref3 + ddraw->ref2 + ddraw->ref1); /* Add references to each interface to avoid freeing them unexpectedly */ - IDirectDraw_AddRef((IDirectDraw *)&ddraw->IDirectDraw_vtbl); - IDirectDraw2_AddRef((IDirectDraw2 *)&ddraw->IDirectDraw2_vtbl); - IDirectDraw3_AddRef((IDirectDraw3 *)&ddraw->IDirectDraw3_vtbl); - IDirectDraw4_AddRef((IDirectDraw4 *)&ddraw->IDirectDraw4_vtbl); - IDirectDraw7_AddRef((IDirectDraw7 *)ddraw); + IDirectDraw_AddRef(&ddraw->IDirectDraw_iface); + IDirectDraw2_AddRef(&ddraw->IDirectDraw2_iface); + IDirectDraw3_AddRef(&ddraw->IDirectDraw3_iface); + IDirectDraw4_AddRef(&ddraw->IDirectDraw4_iface); + IDirectDraw7_AddRef(&ddraw->IDirectDraw7_iface); /* Does a D3D device exist? Destroy it * TODO: Destroy all Vertex buffers, Lights, Materials @@ -939,8 +923,8 @@ DllMain(HINSTANCE hInstDLL, desc.dwSize = sizeof(desc); for(i = 0; i <= 1; i++) { - hr = IDirectDraw7_EnumSurfaces((IDirectDraw7 *)ddraw, - DDENUMSURFACES_ALL, &desc, ddraw, DestroyCallback); + hr = IDirectDraw7_EnumSurfaces(&ddraw->IDirectDraw7_iface, DDENUMSURFACES_ALL, + &desc, ddraw, DestroyCallback); if(hr != D3D_OK) ERR("(%p) EnumSurfaces failed, prepare for trouble\n", ddraw); } @@ -952,11 +936,11 @@ DllMain(HINSTANCE hInstDLL, /* Release all hanging references to destroy the objects. This * restores the screen mode too */ - while(IDirectDraw_Release((IDirectDraw *)&ddraw->IDirectDraw_vtbl)); - while(IDirectDraw2_Release((IDirectDraw2 *)&ddraw->IDirectDraw2_vtbl)); - while(IDirectDraw3_Release((IDirectDraw3 *)&ddraw->IDirectDraw3_vtbl)); - while(IDirectDraw4_Release((IDirectDraw4 *)&ddraw->IDirectDraw4_vtbl)); - while(IDirectDraw7_Release((IDirectDraw7 *)ddraw)); + while(IDirectDraw_Release(&ddraw->IDirectDraw_iface)); + while(IDirectDraw2_Release(&ddraw->IDirectDraw2_iface)); + while(IDirectDraw3_Release(&ddraw->IDirectDraw3_iface)); + while(IDirectDraw4_Release(&ddraw->IDirectDraw4_iface)); + while(IDirectDraw7_Release(&ddraw->IDirectDraw7_iface)); } } diff --git a/dll/directx/wine/ddraw/material.c b/dll/directx/wine/ddraw/material.c index 42d5edcbce5..e137bfcbed5 100644 --- a/dll/directx/wine/ddraw/material.c +++ b/dll/directx/wine/ddraw/material.c @@ -326,7 +326,7 @@ IDirect3DMaterialImpl_GetHandle(IDirect3DMaterial3 *iface, return D3D_OK; } -static HRESULT WINAPI Thunk_IDirect3DMaterialImpl_2_GetHandle(IDirect3DMaterial2 *iface, +static HRESULT WINAPI IDirect3DMaterialImpl_2_GetHandle(IDirect3DMaterial2 *iface, IDirect3DDevice2 *lpDirect3DDevice2, D3DMATERIALHANDLE *lpHandle) { TRACE("iface %p, device %p, handle %p.\n", iface, lpDirect3DDevice2, lpHandle); @@ -335,7 +335,7 @@ static HRESULT WINAPI Thunk_IDirect3DMaterialImpl_2_GetHandle(IDirect3DMaterial2 (IDirect3DDevice3 *)&device_from_device2(lpDirect3DDevice2)->IDirect3DDevice3_vtbl : NULL, lpHandle); } -static HRESULT WINAPI Thunk_IDirect3DMaterialImpl_1_GetHandle(IDirect3DMaterial *iface, +static HRESULT WINAPI IDirect3DMaterialImpl_1_GetHandle(IDirect3DMaterial *iface, IDirect3DDevice *lpDirect3DDevice, D3DMATERIALHANDLE *lpHandle) { TRACE("iface %p, device %p, handle %p.\n", iface, lpDirect3DDevice, lpHandle); @@ -344,88 +344,76 @@ static HRESULT WINAPI Thunk_IDirect3DMaterialImpl_1_GetHandle(IDirect3DMaterial (IDirect3DDevice3 *)&device_from_device1(lpDirect3DDevice)->IDirect3DDevice3_vtbl : NULL, lpHandle); } -static HRESULT WINAPI -Thunk_IDirect3DMaterialImpl_2_QueryInterface(LPDIRECT3DMATERIAL2 iface, - REFIID riid, - LPVOID* obp) +static HRESULT WINAPI IDirect3DMaterialImpl_2_QueryInterface(LPDIRECT3DMATERIAL2 iface, REFIID riid, + LPVOID* obp) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obp); return IDirect3DMaterial3_QueryInterface((IDirect3DMaterial3 *)material_from_material2(iface), riid, obp); } -static HRESULT WINAPI -Thunk_IDirect3DMaterialImpl_1_QueryInterface(LPDIRECT3DMATERIAL iface, - REFIID riid, - LPVOID* obp) +static HRESULT WINAPI IDirect3DMaterialImpl_1_QueryInterface(LPDIRECT3DMATERIAL iface, REFIID riid, + LPVOID* obp) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obp); return IDirect3DMaterial3_QueryInterface((IDirect3DMaterial3 *)material_from_material1(iface), riid, obp); } -static ULONG WINAPI -Thunk_IDirect3DMaterialImpl_2_AddRef(LPDIRECT3DMATERIAL2 iface) +static ULONG WINAPI IDirect3DMaterialImpl_2_AddRef(LPDIRECT3DMATERIAL2 iface) { TRACE("iface %p.\n", iface); return IDirect3DMaterial3_AddRef((IDirect3DMaterial3 *)material_from_material2(iface)); } -static ULONG WINAPI -Thunk_IDirect3DMaterialImpl_1_AddRef(LPDIRECT3DMATERIAL iface) +static ULONG WINAPI IDirect3DMaterialImpl_1_AddRef(LPDIRECT3DMATERIAL iface) { TRACE("iface %p.\n", iface); return IDirect3DMaterial3_AddRef((IDirect3DMaterial3 *)material_from_material1(iface)); } -static ULONG WINAPI -Thunk_IDirect3DMaterialImpl_2_Release(LPDIRECT3DMATERIAL2 iface) +static ULONG WINAPI IDirect3DMaterialImpl_2_Release(LPDIRECT3DMATERIAL2 iface) { TRACE("iface %p.\n", iface); return IDirect3DMaterial3_Release((IDirect3DMaterial3 *)material_from_material2(iface)); } -static ULONG WINAPI -Thunk_IDirect3DMaterialImpl_1_Release(LPDIRECT3DMATERIAL iface) +static ULONG WINAPI IDirect3DMaterialImpl_1_Release(LPDIRECT3DMATERIAL iface) { TRACE("iface %p.\n", iface); return IDirect3DMaterial3_Release((IDirect3DMaterial3 *)material_from_material1(iface)); } -static HRESULT WINAPI -Thunk_IDirect3DMaterialImpl_2_SetMaterial(LPDIRECT3DMATERIAL2 iface, - LPD3DMATERIAL lpMat) +static HRESULT WINAPI IDirect3DMaterialImpl_2_SetMaterial(LPDIRECT3DMATERIAL2 iface, + LPD3DMATERIAL lpMat) { TRACE("iface %p, material %p.\n", iface, lpMat); return IDirect3DMaterial3_SetMaterial((IDirect3DMaterial3 *)material_from_material2(iface), lpMat); } -static HRESULT WINAPI -Thunk_IDirect3DMaterialImpl_1_SetMaterial(LPDIRECT3DMATERIAL iface, - LPD3DMATERIAL lpMat) +static HRESULT WINAPI IDirect3DMaterialImpl_1_SetMaterial(LPDIRECT3DMATERIAL iface, + LPD3DMATERIAL lpMat) { TRACE("iface %p, material %p.\n", iface, lpMat); return IDirect3DMaterial3_SetMaterial((IDirect3DMaterial3 *)material_from_material1(iface), lpMat); } -static HRESULT WINAPI -Thunk_IDirect3DMaterialImpl_2_GetMaterial(LPDIRECT3DMATERIAL2 iface, - LPD3DMATERIAL lpMat) +static HRESULT WINAPI IDirect3DMaterialImpl_2_GetMaterial(LPDIRECT3DMATERIAL2 iface, + LPD3DMATERIAL lpMat) { TRACE("iface %p, material %p.\n", iface, lpMat); return IDirect3DMaterial3_GetMaterial((IDirect3DMaterial3 *)material_from_material2(iface), lpMat); } -static HRESULT WINAPI -Thunk_IDirect3DMaterialImpl_1_GetMaterial(LPDIRECT3DMATERIAL iface, - LPD3DMATERIAL lpMat) +static HRESULT WINAPI IDirect3DMaterialImpl_1_GetMaterial(LPDIRECT3DMATERIAL iface, + LPD3DMATERIAL lpMat) { TRACE("iface %p, material %p.\n", iface, lpMat); @@ -471,26 +459,26 @@ static const struct IDirect3DMaterial3Vtbl d3d_material3_vtbl = static const struct IDirect3DMaterial2Vtbl d3d_material2_vtbl = { /*** IUnknown Methods ***/ - Thunk_IDirect3DMaterialImpl_2_QueryInterface, - Thunk_IDirect3DMaterialImpl_2_AddRef, - Thunk_IDirect3DMaterialImpl_2_Release, + IDirect3DMaterialImpl_2_QueryInterface, + IDirect3DMaterialImpl_2_AddRef, + IDirect3DMaterialImpl_2_Release, /*** IDirect3DMaterial2 Methods ***/ - Thunk_IDirect3DMaterialImpl_2_SetMaterial, - Thunk_IDirect3DMaterialImpl_2_GetMaterial, - Thunk_IDirect3DMaterialImpl_2_GetHandle, + IDirect3DMaterialImpl_2_SetMaterial, + IDirect3DMaterialImpl_2_GetMaterial, + IDirect3DMaterialImpl_2_GetHandle, }; static const struct IDirect3DMaterialVtbl d3d_material1_vtbl = { /*** IUnknown Methods ***/ - Thunk_IDirect3DMaterialImpl_1_QueryInterface, - Thunk_IDirect3DMaterialImpl_1_AddRef, - Thunk_IDirect3DMaterialImpl_1_Release, + IDirect3DMaterialImpl_1_QueryInterface, + IDirect3DMaterialImpl_1_AddRef, + IDirect3DMaterialImpl_1_Release, /*** IDirect3DMaterial1 Methods ***/ IDirect3DMaterialImpl_Initialize, - Thunk_IDirect3DMaterialImpl_1_SetMaterial, - Thunk_IDirect3DMaterialImpl_1_GetMaterial, - Thunk_IDirect3DMaterialImpl_1_GetHandle, + IDirect3DMaterialImpl_1_SetMaterial, + IDirect3DMaterialImpl_1_GetMaterial, + IDirect3DMaterialImpl_1_GetHandle, IDirect3DMaterialImpl_Reserve, IDirect3DMaterialImpl_Unreserve }; diff --git a/dll/directx/wine/ddraw/palette.c b/dll/directx/wine/ddraw/palette.c index 7064ba02790..b68cf82d4f0 100644 --- a/dll/directx/wine/ddraw/palette.c +++ b/dll/directx/wine/ddraw/palette.c @@ -98,7 +98,7 @@ IDirectDrawPaletteImpl_Release(IDirectDrawPalette *iface) if (ref == 0) { EnterCriticalSection(&ddraw_cs); - IWineD3DPalette_Release(This->wineD3DPalette); + wined3d_palette_decref(This->wineD3DPalette); if(This->ifaceToRelease) { IUnknown_Release(This->ifaceToRelease); @@ -156,14 +156,14 @@ IDirectDrawPaletteImpl_GetCaps(IDirectDrawPalette *iface, DWORD *Caps) { IDirectDrawPaletteImpl *This = (IDirectDrawPaletteImpl *)iface; - HRESULT hr; TRACE("iface %p, caps %p.\n", iface, Caps); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DPalette_GetCaps(This->wineD3DPalette, Caps); + *Caps = wined3d_palette_get_flags(This->wineD3DPalette); LeaveCriticalSection(&ddraw_cs); - return hr; + + return D3D_OK; } /***************************************************************************** @@ -201,7 +201,7 @@ IDirectDrawPaletteImpl_SetEntries(IDirectDrawPalette *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DPalette_SetEntries(This->wineD3DPalette, Flags, Start, Count, PalEnt); + hr = wined3d_palette_set_entries(This->wineD3DPalette, Flags, Start, Count, PalEnt); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -240,7 +240,7 @@ IDirectDrawPaletteImpl_GetEntries(IDirectDrawPalette *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DPalette_GetEntries(This->wineD3DPalette, Flags, Start, Count, PalEnt); + hr = wined3d_palette_get_entries(This->wineD3DPalette, Flags, Start, Count, PalEnt); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -266,7 +266,7 @@ HRESULT ddraw_palette_init(IDirectDrawPaletteImpl *palette, palette->lpVtbl = &ddraw_palette_vtbl; palette->ref = 1; - hr = IWineD3DDevice_CreatePalette(ddraw->wineD3DDevice, flags, + hr = wined3d_palette_create(ddraw->wined3d_device, flags, entries, palette, &palette->wineD3DPalette); if (FAILED(hr)) { @@ -274,7 +274,7 @@ HRESULT ddraw_palette_init(IDirectDrawPaletteImpl *palette, return hr; } - palette->ifaceToRelease = (IUnknown *)ddraw; + palette->ifaceToRelease = (IUnknown *)&ddraw->IDirectDraw7_iface; IUnknown_AddRef(palette->ifaceToRelease); return DD_OK; diff --git a/dll/directx/wine/ddraw/surface.c b/dll/directx/wine/ddraw/surface.c index cff2f95aab4..ee30d8666d3 100644 --- a/dll/directx/wine/ddraw/surface.c +++ b/dll/directx/wine/ddraw/surface.c @@ -102,7 +102,8 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, IDirect3DDevice7 *d3d; /* Call into IDirect3D7 for creation */ - IDirect3D7_CreateDevice((IDirect3D7 *)&This->ddraw->IDirect3D7_vtbl, riid, (IDirectDrawSurface7 *)This, &d3d); + IDirect3D7_CreateDevice(&This->ddraw->IDirect3D7_iface, riid, (IDirectDrawSurface7 *)This, + &d3d); if (d3d) { @@ -179,10 +180,13 @@ static ULONG WINAPI ddraw_surface7_AddRef(IDirectDrawSurface7 *iface) TRACE("%p increasing refcount to %u.\n", This, refCount); - if (refCount == 1 && This->WineD3DSurface) + if (refCount == 1) { EnterCriticalSection(&ddraw_cs); - IWineD3DSurface_AddRef(This->WineD3DSurface); + if (This->wined3d_surface) + wined3d_surface_incref(This->wined3d_surface); + if (This->wined3d_texture) + wined3d_texture_incref(This->wined3d_texture); LeaveCriticalSection(&ddraw_cs); } @@ -243,53 +247,100 @@ void ddraw_surface_destroy(IDirectDrawSurfaceImpl *This) WARN("(%p): Destroying surface with refount %d\n", This, This->ref); } - /* Check for attached surfaces and detach them */ - if(This->first_attached != This) + if (This->wined3d_surface) + wined3d_surface_decref(This->wined3d_surface); +} + +static void ddraw_surface_cleanup(IDirectDrawSurfaceImpl *surface) +{ + IDirectDrawSurfaceImpl *surf; + IUnknown *ifaceToRelease; + UINT i; + + TRACE("surface %p.\n", surface); + + if (surface->wined3d_swapchain) { - /* Well, this shouldn't happen: The surface being attached is addref()ed - * in AddAttachedSurface, so it shouldn't be released until DeleteAttachedSurface - * is called, because the refcount is held. It looks like the app released() - * it often enough to force this - */ - IDirectDrawSurface7 *root = (IDirectDrawSurface7 *)This->first_attached; - IDirectDrawSurface7 *detach = (IDirectDrawSurface7 *)This; + IDirectDrawImpl *ddraw = surface->ddraw; - FIXME("(%p) Freeing a surface that is attached to surface %p\n", This, This->first_attached); - - /* The refcount will drop to -1 here */ - if(IDirectDrawSurface7_DeleteAttachedSurface(root, 0, detach) != DD_OK) + /* If it's the render target, destroy the D3D device. */ + if (ddraw->d3d_initialized && surface == ddraw->d3d_target) { - ERR("(%p) DeleteAttachedSurface failed!\n", This); + TRACE("Destroying the render target, uninitializing D3D.\n"); + + for (i = 0; i < ddraw->numConvertedDecls; ++i) + { + wined3d_vertex_declaration_decref(ddraw->decls[i].decl); + } + HeapFree(GetProcessHeap(), 0, ddraw->decls); + ddraw->numConvertedDecls = 0; + + if (FAILED(wined3d_device_uninit_3d(ddraw->wined3d_device))) + { + ERR("Failed to uninit 3D.\n"); + } + else + { + /* Free the d3d window if one was created. */ + if (ddraw->d3d_window && ddraw->d3d_window != ddraw->dest_window) + { + TRACE("Destroying the hidden render window %p.\n", ddraw->d3d_window); + DestroyWindow(ddraw->d3d_window); + ddraw->d3d_window = 0; + } + } + + ddraw->d3d_initialized = FALSE; + ddraw->d3d_target = NULL; + } + else + { + wined3d_device_uninit_gdi(ddraw->wined3d_device); + } + + surface->wined3d_swapchain = NULL; + + /* Reset to the default surface implementation type. This is needed + * if applications use non render target surfaces and expect blits to + * work after destroying the render target. + * + * TODO: Recreate existing offscreen surfaces. */ + ddraw->ImplType = DefaultSurfaceType; + + TRACE("D3D unloaded.\n"); + } + + /* The refcount test shows that the palette is detached when the surface + * is destroyed. */ + IDirectDrawSurface7_SetPalette((IDirectDrawSurface7 *)surface, NULL); + + /* Loop through all complex attached surfaces and destroy them. + * + * Yet again, only the root can have more than one complexly attached + * surface, all the others have a total of one. */ + for (i = 0; i < MAX_COMPLEX_ATTACHED; ++i) + { + if (!surface->complex_array[i]) + break; + + surf = surface->complex_array[i]; + surface->complex_array[i] = NULL; + while (surf) + { + IDirectDrawSurfaceImpl *destroy = surf; + surf = surf->complex_array[0]; /* Iterate through the "tree" */ + ddraw_surface_destroy(destroy); /* Destroy it */ } } - while(This->next_attached != NULL) - { - IDirectDrawSurface7 *root = (IDirectDrawSurface7 *)This; - IDirectDrawSurface7 *detach = (IDirectDrawSurface7 *)This->next_attached; + ifaceToRelease = surface->ifaceToRelease; - if(IDirectDrawSurface7_DeleteAttachedSurface(root, 0, detach) != DD_OK) - { - ERR("(%p) DeleteAttachedSurface failed!\n", This); - assert(0); - } - } + /* Destroy the root surface. */ + ddraw_surface_destroy(surface); - /* Now destroy the surface. Wait: It could have been released if we are a texture */ - if(This->WineD3DSurface) - IWineD3DSurface_Release(This->WineD3DSurface); - - /* Having a texture handle set implies that the device still exists */ - if(This->Handle) - { - ddraw_free_handle(&This->ddraw->d3ddevice->handle_table, This->Handle - 1, DDRAW_HANDLE_SURFACE); - } - - /* Reduce the ddraw surface count */ - InterlockedDecrement(&This->ddraw->surfaces); - list_remove(&This->surface_list_entry); - - HeapFree(GetProcessHeap(), 0, This); + /* Reduce the ddraw refcount */ + if (ifaceToRelease) + IUnknown_Release(ifaceToRelease); } /***************************************************************************** @@ -330,12 +381,6 @@ static ULONG WINAPI ddraw_surface7_Release(IDirectDrawSurface7 *iface) if (ref == 0) { - - IDirectDrawSurfaceImpl *surf; - IDirectDrawImpl *ddraw; - IUnknown *ifaceToRelease = This->ifaceToRelease; - UINT i; - /* Complex attached surfaces are destroyed implicitly when the root is released */ EnterCriticalSection(&ddraw_cs); if(!This->is_complex_root) @@ -344,101 +389,10 @@ static ULONG WINAPI ddraw_surface7_Release(IDirectDrawSurface7 *iface) LeaveCriticalSection(&ddraw_cs); return ref; } - ddraw = This->ddraw; - - /* If it's a texture, destroy the WineD3DTexture. - * WineD3D will destroy the IParent interfaces - * of the sublevels, which destroys the WineD3DSurfaces. - * Set the surfaces to NULL to avoid destroying them again later - */ - if(This->wineD3DTexture) - { - IWineD3DBaseTexture_Release(This->wineD3DTexture); - } - /* If it's the RenderTarget, destroy the d3ddevice */ - else if(This->wineD3DSwapChain) - { - if((ddraw->d3d_initialized) && (This == ddraw->d3d_target)) { - TRACE("(%p) Destroying the render target, uninitializing D3D\n", This); - - /* Unset any index buffer, just to be sure */ - IWineD3DDevice_SetIndexBuffer(ddraw->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN); - IWineD3DDevice_SetDepthStencilSurface(ddraw->wineD3DDevice, NULL); - IWineD3DDevice_SetVertexDeclaration(ddraw->wineD3DDevice, NULL); - for(i = 0; i < ddraw->numConvertedDecls; i++) - { - IWineD3DVertexDeclaration_Release(ddraw->decls[i].decl); - } - HeapFree(GetProcessHeap(), 0, ddraw->decls); - ddraw->numConvertedDecls = 0; - - if (FAILED(IWineD3DDevice_Uninit3D(ddraw->wineD3DDevice, D3D7CB_DestroySwapChain))) - { - /* Not good */ - ERR("(%p) Failed to uninit 3D\n", This); - } - else - { - /* Free the d3d window if one was created */ - if(ddraw->d3d_window != 0 && ddraw->d3d_window != ddraw->dest_window) - { - TRACE(" (%p) Destroying the hidden render window %p\n", This, ddraw->d3d_window); - DestroyWindow(ddraw->d3d_window); - ddraw->d3d_window = 0; - } - /* Unset the pointers */ - } - - This->wineD3DSwapChain = NULL; /* Uninit3D releases the swapchain */ - ddraw->d3d_initialized = FALSE; - ddraw->d3d_target = NULL; - } else { - IWineD3DDevice_UninitGDI(ddraw->wineD3DDevice, D3D7CB_DestroySwapChain); - This->wineD3DSwapChain = NULL; - } - - /* Reset to the default surface implementation type. This is needed if apps use - * non render target surfaces and expect blits to work after destroying the render - * target. - * - * TODO: Recreate existing offscreen surfaces - */ - ddraw->ImplType = DefaultSurfaceType; - - /* Write a trace because D3D unloading was the reason for many - * crashes during development. - */ - TRACE("(%p) D3D unloaded\n", This); - } - - /* The refcount test shows that the palette is detached when the surface is destroyed */ - IDirectDrawSurface7_SetPalette((IDirectDrawSurface7 *)This, NULL); - - /* Loop through all complex attached surfaces, - * and destroy them. - * - * Yet again, only the root can have more than one complexly attached surface, all the others - * have a total of one; - */ - for(i = 0; i < MAX_COMPLEX_ATTACHED; i++) - { - if(!This->complex_array[i]) break; - - surf = This->complex_array[i]; - This->complex_array[i] = NULL; - while(surf) - { - IDirectDrawSurfaceImpl *destroy = surf; - surf = surf->complex_array[0]; /* Iterate through the "tree" */ - ddraw_surface_destroy(destroy); /* Destroy it */ - } - } - - /* Destroy the root surface. */ - ddraw_surface_destroy(This); - - /* Reduce the ddraw refcount */ - if(ifaceToRelease) IUnknown_Release(ifaceToRelease); + if (This->wined3d_texture) /* If it's a texture, destroy the wined3d texture. */ + wined3d_texture_decref(This->wined3d_texture); + else + ddraw_surface_cleanup(This); LeaveCriticalSection(&ddraw_cs); } @@ -679,11 +633,8 @@ static HRESULT WINAPI ddraw_surface7_Lock(IDirectDrawSurface7 *iface, } } - hr = IWineD3DSurface_LockRect(This->WineD3DSurface, - &LockedRect, - Rect, - Flags); - if(hr != D3D_OK) + hr = wined3d_surface_map(This->wined3d_surface, &LockedRect, Rect, Flags); + if (FAILED(hr)) { LeaveCriticalSection(&ddraw_cs); switch(hr) @@ -744,8 +695,8 @@ static HRESULT WINAPI ddraw_surface7_Unlock(IDirectDrawSurface7 *iface, RECT *pR TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(pRect)); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_UnlockRect(This->WineD3DSurface); - if(SUCCEEDED(hr)) + hr = wined3d_surface_unmap(This->wined3d_surface); + if (SUCCEEDED(hr)) { This->surface_desc.lpSurface = NULL; } @@ -817,9 +768,7 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra ddraw_surface7_Release(Override7); } - hr = IWineD3DSurface_Flip(This->WineD3DSurface, - Override->WineD3DSurface, - Flags); + hr = wined3d_surface_flip(This->wined3d_surface, Override->wined3d_surface, Flags); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -856,7 +805,7 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR IDirectDrawSurfaceImpl *Src = (IDirectDrawSurfaceImpl *)SrcSurface; HRESULT hr; - TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %p, flags %#x, fx %p.\n", + TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n", iface, wine_dbgstr_rect(DestRect), SrcSurface, wine_dbgstr_rect(SrcRect), Flags, DDBltFx); /* Check for validity of the flags here. WineD3D Has the software-opengl selection path and would have @@ -903,17 +852,12 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR return DDERR_INVALIDPARAMS; } - /* TODO: Check if the DDBltFx contains any ddraw surface pointers. If it does, copy the struct, - * and replace the ddraw surfaces with the wined3d surfaces - * So far no blitting operations using surfaces in the bltfx struct are supported anyway. - */ - hr = IWineD3DSurface_Blt(This->WineD3DSurface, - DestRect, - Src ? Src->WineD3DSurface : NULL, - SrcRect, - Flags, - (WINEDDBLTFX *) DDBltFx, - WINED3DTEXF_POINT); + /* TODO: Check if the DDBltFx contains any ddraw surface pointers. If it + * does, copy the struct, and replace the ddraw surfaces with the wined3d + * surfaces. So far no blitting operations using surfaces in the bltfx + * struct are supported anyway. */ + hr = wined3d_surface_blt(This->wined3d_surface, DestRect, Src ? Src->wined3d_surface : NULL, + SrcRect, Flags, (WINEDDBLTFX *)DDBltFx, WINED3DTEXF_LINEAR); LeaveCriticalSection(&ddraw_cs); switch(hr) @@ -927,7 +871,7 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR static HRESULT WINAPI ddraw_surface3_Blt(IDirectDrawSurface3 *iface, RECT *dst_rect, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx) { - TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %p, flags %#x, fx %p.\n", + TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n", iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx); return ddraw_surface7_Blt((IDirectDrawSurface7 *)surface_from_surface3(iface), dst_rect, @@ -1199,8 +1143,7 @@ static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *hdc) return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_GetDC(This->WineD3DSurface, - hdc); + hr = wined3d_surface_getdc(This->wined3d_surface, hdc); LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -1243,7 +1186,7 @@ static HRESULT WINAPI ddraw_surface7_ReleaseDC(IDirectDrawSurface7 *iface, HDC h TRACE("iface %p, dc %p.\n", iface, hdc); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_ReleaseDC(This->WineD3DSurface, hdc); + hr = wined3d_surface_releasedc(This->wined3d_surface, hdc); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -1316,7 +1259,7 @@ static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWO TRACE("iface %p, priority %u.\n", iface, Priority); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_SetPriority(This->WineD3DSurface, Priority); + hr = wined3d_surface_set_priority(This->wined3d_surface, Priority); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -1347,7 +1290,7 @@ static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWO } EnterCriticalSection(&ddraw_cs); - *Priority = IWineD3DSurface_GetPriority(This->WineD3DSurface); + *Priority = wined3d_surface_get_priority(This->wined3d_surface); LeaveCriticalSection(&ddraw_cs); return DD_OK; } @@ -1379,11 +1322,7 @@ static HRESULT WINAPI ddraw_surface7_SetPrivateData(IDirectDrawSurface7 *iface, iface, debugstr_guid(tag), Data, Size, Flags); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_SetPrivateData(This->WineD3DSurface, - tag, - Data, - Size, - Flags); + hr = wined3d_surface_set_private_data(This->wined3d_surface, tag, Data, Size, Flags); LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -1420,10 +1359,7 @@ static HRESULT WINAPI ddraw_surface7_GetPrivateData(IDirectDrawSurface7 *iface, return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_GetPrivateData(This->WineD3DSurface, - tag, - Data, - Size); + hr = wined3d_surface_get_private_data(This->wined3d_surface, tag, Data, Size); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -1449,7 +1385,7 @@ static HRESULT WINAPI ddraw_surface7_FreePrivateData(IDirectDrawSurface7 *iface, TRACE("iface %p, tag %s.\n", iface, debugstr_guid(tag)); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_FreePrivateData(This->WineD3DSurface, tag); + hr = wined3d_surface_free_private_data(This->wined3d_surface, tag); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -1680,7 +1616,7 @@ static HRESULT WINAPI ddraw_surface7_GetBltStatus(IDirectDrawSurface7 *iface, DW TRACE("iface %p, flags %#x.\n", iface, Flags); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_GetBltStatus(This->WineD3DSurface, Flags); + hr = wined3d_surface_get_blt_status(This->wined3d_surface, Flags); LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -1795,7 +1731,7 @@ static HRESULT WINAPI ddraw_surface7_GetFlipStatus(IDirectDrawSurface7 *iface, D TRACE("iface %p, flags %#x.\n", iface, Flags); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_GetFlipStatus(This->WineD3DSurface, Flags); + hr = wined3d_surface_get_flip_status(This->wined3d_surface, Flags); LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -1831,9 +1767,7 @@ static HRESULT WINAPI ddraw_surface7_GetOverlayPosition(IDirectDrawSurface7 *ifa TRACE("iface %p, x %p, y %p.\n", iface, X, Y); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_GetOverlayPosition(This->WineD3DSurface, - X, - Y); + hr = wined3d_surface_get_overlay_position(This->wined3d_surface, X, Y); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -2029,7 +1963,7 @@ static HRESULT WINAPI ddraw_surface7_IsLost(IDirectDrawSurface7 *iface) return DDERR_SURFACELOST; } - hr = IWineD3DSurface_IsLost(This->WineD3DSurface); + hr = wined3d_surface_is_lost(This->wined3d_surface); LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -2073,7 +2007,7 @@ static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface) IDirectDrawSurface_AddRef(iface); ddraw_recreate_surfaces_cb(iface, &This->surface_desc, NULL /* Not needed */); } - hr = IWineD3DSurface_Restore(This->WineD3DSurface); + hr = wined3d_surface_restore(This->wined3d_surface); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -2105,9 +2039,7 @@ static HRESULT WINAPI ddraw_surface7_SetOverlayPosition(IDirectDrawSurface7 *ifa TRACE("iface %p, x %d, y %d.\n", iface, X, Y); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_SetOverlayPosition(This->WineD3DSurface, - X, - Y); + hr = wined3d_surface_set_overlay_position(This->wined3d_surface, X, Y); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -2145,12 +2077,8 @@ static HRESULT WINAPI ddraw_surface7_UpdateOverlay(IDirectDrawSurface7 *iface, R iface, wine_dbgstr_rect(SrcRect), DstSurface, wine_dbgstr_rect(DstRect), Flags, FX); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_UpdateOverlay(This->WineD3DSurface, - SrcRect, - Dst ? Dst->WineD3DSurface : NULL, - DstRect, - Flags, - (WINEDDOVERLAYFX *) FX); + hr = wined3d_surface_update_overlay(This->wined3d_surface, SrcRect, + Dst ? Dst->wined3d_surface : NULL, DstRect, Flags, (WINEDDOVERLAYFX *)FX); LeaveCriticalSection(&ddraw_cs); switch(hr) { case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS; @@ -2219,9 +2147,8 @@ static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder(IDirectDrawSurface7 *if TRACE("iface %p, flags %#x, reference %p.\n", iface, Flags, DDSRef); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_UpdateOverlayZOrder(This->WineD3DSurface, - Flags, - Ref ? Ref->WineD3DSurface : NULL); + hr = wined3d_surface_update_overlay_z_order(This->wined3d_surface, + Flags, Ref ? Ref->wined3d_surface : NULL); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -2261,19 +2188,19 @@ static HRESULT WINAPI ddraw_surface7_GetDDInterface(IDirectDrawSurface7 *iface, switch(This->version) { case 7: - *DD = This->ddraw; + *DD = &This->ddraw->IDirectDraw7_iface; break; case 4: - *DD = &This->ddraw->IDirectDraw4_vtbl; + *DD = &This->ddraw->IDirectDraw4_iface; break; case 2: - *DD = &This->ddraw->IDirectDraw2_vtbl; + *DD = &This->ddraw->IDirectDraw2_iface; break; case 1: - *DD = &This->ddraw->IDirectDraw_vtbl; + *DD = &This->ddraw->IDirectDraw_iface; break; } @@ -2359,15 +2286,14 @@ static HRESULT WINAPI ddraw_surface7_SetLOD(IDirectDrawSurface7 *iface, DWORD Ma return DDERR_INVALIDOBJECT; } - if(!This->wineD3DTexture) + if (!This->wined3d_texture) { ERR("(%p) The DirectDraw texture has no WineD3DTexture!\n", This); LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDOBJECT; } - hr = IWineD3DBaseTexture_SetLOD(This->wineD3DTexture, - MaxLOD); + hr = wined3d_texture_set_lod(This->wined3d_texture, MaxLOD); LeaveCriticalSection(&ddraw_cs); return hr; } @@ -2402,7 +2328,7 @@ static HRESULT WINAPI ddraw_surface7_GetLOD(IDirectDrawSurface7 *iface, DWORD *M return DDERR_INVALIDOBJECT; } - *MaxLOD = IWineD3DBaseTexture_GetLOD(This->wineD3DTexture); + *MaxLOD = wined3d_texture_get_lod(This->wined3d_texture); LeaveCriticalSection(&ddraw_cs); return DD_OK; } @@ -2468,11 +2394,8 @@ static HRESULT WINAPI ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD d } EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_BltFast(This->WineD3DSurface, - dstx, dsty, - src ? src->WineD3DSurface : NULL, - rsrc, - trans); + hr = wined3d_surface_bltfast(This->wined3d_surface, dstx, dsty, + src ? src->wined3d_surface : NULL, rsrc, trans); LeaveCriticalSection(&ddraw_cs); switch(hr) { @@ -2574,21 +2497,20 @@ static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDir if(oldClipper) IDirectDrawClipper_Release((IDirectDrawClipper *)oldClipper); - hr = IWineD3DSurface_SetClipper(This->WineD3DSurface, This->clipper ? This->clipper->wineD3DClipper : NULL); + hr = wined3d_surface_set_clipper(This->wined3d_surface, + This->clipper ? This->clipper->wineD3DClipper : NULL); - if(This->wineD3DSwapChain) { + if (This->wined3d_swapchain) + { clipWindow = NULL; if(Clipper) { IDirectDrawClipper_GetHWnd(Clipper, &clipWindow); } - if(clipWindow) { - IWineD3DSwapChain_SetDestWindowOverride(This->wineD3DSwapChain, - clipWindow); - } else { - IWineD3DSwapChain_SetDestWindowOverride(This->wineD3DSwapChain, - This->ddraw->d3d_window); - } + if (clipWindow) + wined3d_swapchain_set_window(This->wined3d_swapchain, clipWindow); + else + wined3d_swapchain_set_window(This->wined3d_swapchain, This->ddraw->d3d_window); } LeaveCriticalSection(&ddraw_cs); @@ -2642,9 +2564,8 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, } if(newFormat != PixelFormat_DD2WineD3D(&This->surface_desc.u4.ddpfPixelFormat) ) { - hr = IWineD3DSurface_SetFormat(This->WineD3DSurface, - newFormat); - if(hr != DD_OK) + hr = wined3d_surface_set_format(This->wined3d_surface, newFormat); + if (FAILED(hr)) { LeaveCriticalSection(&ddraw_cs); return hr; @@ -2653,32 +2574,28 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, } if (DDSD->dwFlags & DDSD_CKDESTOVERLAY) { - IWineD3DSurface_SetColorKey(This->WineD3DSurface, - DDCKEY_DESTOVERLAY, - (WINEDDCOLORKEY *) &DDSD->u3.ddckCKDestOverlay); + wined3d_surface_set_color_key(This->wined3d_surface, DDCKEY_DESTOVERLAY, + (WINEDDCOLORKEY *)&DDSD->u3.ddckCKDestOverlay); } if (DDSD->dwFlags & DDSD_CKDESTBLT) { - IWineD3DSurface_SetColorKey(This->WineD3DSurface, - DDCKEY_DESTBLT, - (WINEDDCOLORKEY *) &DDSD->ddckCKDestBlt); + wined3d_surface_set_color_key(This->wined3d_surface, DDCKEY_DESTBLT, + (WINEDDCOLORKEY *)&DDSD->ddckCKDestBlt); } if (DDSD->dwFlags & DDSD_CKSRCOVERLAY) { - IWineD3DSurface_SetColorKey(This->WineD3DSurface, - DDCKEY_SRCOVERLAY, - (WINEDDCOLORKEY *) &DDSD->ddckCKSrcOverlay); + wined3d_surface_set_color_key(This->wined3d_surface, DDCKEY_SRCOVERLAY, + (WINEDDCOLORKEY *)&DDSD->ddckCKSrcOverlay); } if (DDSD->dwFlags & DDSD_CKSRCBLT) { - IWineD3DSurface_SetColorKey(This->WineD3DSurface, - DDCKEY_SRCBLT, - (WINEDDCOLORKEY *) &DDSD->ddckCKSrcBlt); + wined3d_surface_set_color_key(This->wined3d_surface, DDCKEY_SRCBLT, + (WINEDDCOLORKEY *)&DDSD->ddckCKSrcBlt); } if (DDSD->dwFlags & DDSD_LPSURFACE && DDSD->lpSurface) { - hr = IWineD3DSurface_SetMem(This->WineD3DSurface, DDSD->lpSurface); - if(hr != WINED3D_OK) + hr = wined3d_surface_set_mem(This->wined3d_surface, DDSD->lpSurface); + if (FAILED(hr)) { /* No need for a trace here, wined3d does that for us */ switch(hr) @@ -2724,8 +2641,8 @@ static HRESULT WINAPI ddraw_surface3_SetSurfaceDesc(IDirectDrawSurface3 *iface, static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **Pal) { IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface; - IWineD3DPalette *wPal; - HRESULT hr; + struct wined3d_palette *wined3d_palette; + HRESULT hr = DD_OK; TRACE("iface %p, palette %p.\n", iface, Pal); @@ -2733,16 +2650,10 @@ static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDir return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - hr = IWineD3DSurface_GetPalette(This->WineD3DSurface, &wPal); - if(hr != DD_OK) + wined3d_palette = wined3d_surface_get_palette(This->wined3d_surface); + if (wined3d_palette) { - LeaveCriticalSection(&ddraw_cs); - return hr; - } - - if(wPal) - { - *Pal = IWineD3DPalette_GetParent(wPal); + *Pal = wined3d_palette_get_parent(wined3d_palette); IDirectDrawPalette_AddRef(*Pal); } else @@ -2785,10 +2696,8 @@ SetColorKeyEnum(IDirectDrawSurface7 *surface, struct SCKContext *ctx = context; HRESULT hr; - hr = IWineD3DSurface_SetColorKey(This->WineD3DSurface, - ctx->Flags, - ctx->CKey); - if(hr != DD_OK) + hr = wined3d_surface_set_color_key(This->wined3d_surface, ctx->Flags, ctx->CKey); + if (FAILED(hr)) { WARN("IWineD3DSurface_SetColorKey failed, hr = %08x\n", hr); ctx->ret = hr; @@ -2884,7 +2793,7 @@ static HRESULT WINAPI ddraw_surface7_SetColorKey(IDirectDrawSurface7 *iface, DWO return DDERR_INVALIDPARAMS; } } - ctx.ret = IWineD3DSurface_SetColorKey(This->WineD3DSurface, Flags, ctx.CKey); + ctx.ret = wined3d_surface_set_color_key(This->wined3d_surface, Flags, ctx.CKey); ddraw_surface7_EnumAttachedSurfaces(iface, &ctx, SetColorKeyEnum); LeaveCriticalSection(&ddraw_cs); switch(ctx.ret) @@ -2939,8 +2848,7 @@ static HRESULT WINAPI ddraw_surface7_SetPalette(IDirectDrawSurface7 *iface, IDir if(oldPal) IDirectDrawPalette_Release(oldPal); /* For the GetPalette */ /* Set the new Palette */ - IWineD3DSurface_SetPalette(This->WineD3DSurface, - PalImpl ? PalImpl->wineD3DPalette : NULL); + wined3d_surface_set_palette(This->wined3d_surface, PalImpl ? PalImpl->wineD3DPalette : NULL); /* AddRef the Palette */ if(Pal) IDirectDrawPalette_AddRef(Pal); @@ -3015,7 +2923,7 @@ static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp(IDirectDrawGammaControl * if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { /* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP. */ - IWineD3DDevice_GetGammaRamp(surface->ddraw->wineD3DDevice, 0, (WINED3DGAMMARAMP *)gamma_ramp); + wined3d_device_get_gamma_ramp(surface->ddraw->wined3d_device, 0, (WINED3DGAMMARAMP *)gamma_ramp); } else { @@ -3057,7 +2965,7 @@ static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp(IDirectDrawGammaControl * if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { /* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */ - IWineD3DDevice_SetGammaRamp(surface->ddraw->wineD3DDevice, 0, flags, (WINED3DGAMMARAMP *)gamma_ramp); + wined3d_device_set_gamma_ramp(surface->ddraw->wined3d_device, 0, flags, (WINED3DGAMMARAMP *)gamma_ramp); } else { @@ -3234,7 +3142,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu for (;;) { - IWineD3DPalette *wined3d_dst_pal, *wined3d_src_pal; + struct wined3d_palette *wined3d_dst_pal, *wined3d_src_pal; IDirectDrawPalette *dst_pal = NULL, *src_pal = NULL; DDSURFACEDESC *src_desc, *dst_desc; @@ -3245,23 +3153,13 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD; /* Get the palettes */ - hr = IWineD3DSurface_GetPalette(dst_surface->WineD3DSurface, &wined3d_dst_pal); - if (FAILED(hr)) - { - ERR("Failed to get destination palette, hr %#x.\n", hr); - LeaveCriticalSection(&ddraw_cs); - return D3DERR_TEXTURE_LOAD_FAILED; - } - if (wined3d_dst_pal) dst_pal = IWineD3DPalette_GetParent(wined3d_dst_pal); + wined3d_dst_pal = wined3d_surface_get_palette(dst_surface->wined3d_surface); + if (wined3d_dst_pal) + dst_pal = wined3d_palette_get_parent(wined3d_dst_pal); - hr = IWineD3DSurface_GetPalette(src_surface->WineD3DSurface, &wined3d_src_pal); - if (FAILED(hr)) - { - ERR("Failed to get source palette, hr %#x.\n", hr); - LeaveCriticalSection(&ddraw_cs); - return D3DERR_TEXTURE_LOAD_FAILED; - } - if (wined3d_src_pal) src_pal = IWineD3DPalette_GetParent(wined3d_src_pal); + wined3d_src_pal = wined3d_surface_get_palette(src_surface->wined3d_surface); + if (wined3d_src_pal) + src_pal = wined3d_palette_get_parent(wined3d_src_pal); if (src_pal) { @@ -3302,7 +3200,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu /* Copy the main memory texture into the surface that corresponds * to the OpenGL texture object. */ - hr = IWineD3DSurface_LockRect(src_surface->WineD3DSurface, &src_rect, NULL, 0); + hr = wined3d_surface_map(src_surface->wined3d_surface, &src_rect, NULL, 0); if (FAILED(hr)) { ERR("Failed to lock source surface, hr %#x.\n", hr); @@ -3310,11 +3208,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu return D3DERR_TEXTURE_LOAD_FAILED; } - hr = IWineD3DSurface_LockRect(dst_surface->WineD3DSurface, &dst_rect, NULL, 0); + hr = wined3d_surface_map(dst_surface->wined3d_surface, &dst_rect, NULL, 0); if (FAILED(hr)) { ERR("Failed to lock destination surface, hr %#x.\n", hr); - IWineD3DSurface_UnlockRect(src_surface->WineD3DSurface); + wined3d_surface_unmap(src_surface->wined3d_surface); LeaveCriticalSection(&ddraw_cs); return D3DERR_TEXTURE_LOAD_FAILED; } @@ -3324,8 +3222,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu else memcpy(dst_rect.pBits, src_rect.pBits, src_rect.Pitch * src_desc->dwHeight); - IWineD3DSurface_UnlockRect(src_surface->WineD3DSurface); - IWineD3DSurface_UnlockRect(dst_surface->WineD3DSurface); + wined3d_surface_unmap(src_surface->wined3d_surface); + wined3d_surface_unmap(dst_surface->wined3d_surface); } if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP) @@ -3501,11 +3399,103 @@ static const struct IDirect3DTextureVtbl d3d_texture1_vtbl = d3d_texture1_Unload, }; +static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed(void *parent) +{ + IDirectDrawSurfaceImpl *surface = parent; + + TRACE("surface %p.\n", surface); + + /* Check for attached surfaces and detach them. */ + if (surface->first_attached != surface) + { + IDirectDrawSurface7 *root = (IDirectDrawSurface7 *)surface->first_attached; + IDirectDrawSurface7 *detach = (IDirectDrawSurface7 *)surface; + + /* Well, this shouldn't happen: The surface being attached is + * referenced in AddAttachedSurface(), so it shouldn't be released + * until DeleteAttachedSurface() is called, because the refcount is + * held. It looks like the application released it often enough to + * force this. */ + WARN("Surface is still attached to surface %p.\n", surface->first_attached); + + /* The refcount will drop to -1 here */ + if (FAILED(IDirectDrawSurface7_DeleteAttachedSurface(root, 0, detach))) + ERR("DeleteAttachedSurface failed.\n"); + } + + while (surface->next_attached) + { + IDirectDrawSurface7 *root = (IDirectDrawSurface7 *)surface; + IDirectDrawSurface7 *detach = (IDirectDrawSurface7 *)surface->next_attached; + + if (FAILED(IDirectDrawSurface7_DeleteAttachedSurface(root, 0, detach))) + ERR("DeleteAttachedSurface failed.\n"); + } + + /* Having a texture handle set implies that the device still exists. */ + if (surface->Handle) + ddraw_free_handle(&surface->ddraw->d3ddevice->handle_table, surface->Handle - 1, DDRAW_HANDLE_SURFACE); + + /* Reduce the ddraw surface count. */ + InterlockedDecrement(&surface->ddraw->surfaces); + list_remove(&surface->surface_list_entry); + + HeapFree(GetProcessHeap(), 0, surface); +} + +const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops = +{ + ddraw_surface_wined3d_object_destroyed, +}; + +static void STDMETHODCALLTYPE ddraw_texture_wined3d_object_destroyed(void *parent) +{ + IDirectDrawSurfaceImpl *surface = parent; + + TRACE("surface %p.\n", surface); + + ddraw_surface_cleanup(surface); +} + +static const struct wined3d_parent_ops ddraw_texture_wined3d_parent_ops = +{ + ddraw_texture_wined3d_object_destroyed, +}; + +HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface) +{ + const DDSURFACEDESC2 *desc = &surface->surface_desc; + enum wined3d_format_id format; + WINED3DPOOL pool; + UINT levels; + + if (desc->ddsCaps.dwCaps & DDSCAPS_MIPMAP) + levels = desc->u2.dwMipMapCount; + else + levels = 1; + + /* DDSCAPS_SYSTEMMEMORY textures are in WINED3DPOOL_SYSTEMMEM. + * Should I forward the MANAGED cap to the managed pool? */ + if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) + pool = WINED3DPOOL_SYSTEMMEM; + else + pool = WINED3DPOOL_DEFAULT; + + format = PixelFormat_DD2WineD3D(&surface->surface_desc.u4.ddpfPixelFormat); + if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP) + return wined3d_texture_create_cube(surface->ddraw->wined3d_device, desc->dwWidth, + levels, 0, format, pool, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture); + else + return wined3d_texture_create_2d(surface->ddraw->wined3d_device, desc->dwWidth, desc->dwHeight, + levels, 0, format, pool, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture); +} + HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddraw, DDSURFACEDESC2 *desc, UINT mip_level, WINED3DSURFTYPE surface_type) { + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; WINED3DPOOL pool = WINED3DPOOL_DEFAULT; - WINED3DSURFACE_DESC wined3d_desc; enum wined3d_format_id format; DWORD usage = 0; HRESULT hr; @@ -3519,12 +3509,17 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr desc->ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; } - if (desc->ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_3DDEVICE)) + if (desc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { usage |= WINED3DUSAGE_RENDERTARGET; desc->ddsCaps.dwCaps |= DDSCAPS_VISIBLE; } + if ((desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) && !(desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) + { + usage |= WINED3DUSAGE_RENDERTARGET; + } + if (desc->ddsCaps.dwCaps & (DDSCAPS_OVERLAY)) { usage |= WINED3DUSAGE_OVERLAY; @@ -3570,17 +3565,15 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr surface->version = 7; surface->ddraw = ddraw; - surface->surface_desc.dwSize = sizeof(DDSURFACEDESC2); - surface->surface_desc.u4.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); - DD_STRUCT_COPY_BYSIZE(&surface->surface_desc, desc); + copy_to_surfacedesc2(&surface->surface_desc, desc); surface->first_attached = surface; surface->ImplType = surface_type; - hr = IWineD3DDevice_CreateSurface(ddraw->wineD3DDevice, desc->dwWidth, desc->dwHeight, format, + hr = wined3d_surface_create(ddraw->wined3d_device, desc->dwWidth, desc->dwHeight, format, TRUE /* Lockable */, FALSE /* Discard */, mip_level, usage, pool, WINED3DMULTISAMPLE_NONE, 0 /* MultiSampleQuality */, surface_type, surface, - &ddraw_null_wined3d_parent_ops, &surface->WineD3DSurface); + &ddraw_surface_wined3d_parent_ops, &surface->wined3d_surface); if (FAILED(hr)) { WARN("Failed to create wined3d surface, hr %#x.\n", hr); @@ -3588,7 +3581,8 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr } surface->surface_desc.dwFlags |= DDSD_PIXELFORMAT; - IWineD3DSurface_GetDesc(surface->WineD3DSurface, &wined3d_desc); + wined3d_resource = wined3d_surface_get_resource(surface->wined3d_surface); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); format = wined3d_desc.format; if (format == WINED3DFMT_UNKNOWN) @@ -3615,36 +3609,36 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr else { surface->surface_desc.dwFlags |= DDSD_PITCH; - surface->surface_desc.u1.lPitch = IWineD3DSurface_GetPitch(surface->WineD3DSurface); + surface->surface_desc.u1.lPitch = wined3d_surface_get_pitch(surface->wined3d_surface); } if (desc->dwFlags & DDSD_CKDESTOVERLAY) { - IWineD3DSurface_SetColorKey(surface->WineD3DSurface, - DDCKEY_DESTOVERLAY, (WINEDDCOLORKEY *)&desc->u3.ddckCKDestOverlay); + wined3d_surface_set_color_key(surface->wined3d_surface, DDCKEY_DESTOVERLAY, + (WINEDDCOLORKEY *)&desc->u3.ddckCKDestOverlay); } if (desc->dwFlags & DDSD_CKDESTBLT) { - IWineD3DSurface_SetColorKey(surface->WineD3DSurface, - DDCKEY_DESTBLT, (WINEDDCOLORKEY *)&desc->ddckCKDestBlt); + wined3d_surface_set_color_key(surface->wined3d_surface, DDCKEY_DESTBLT, + (WINEDDCOLORKEY *)&desc->ddckCKDestBlt); } if (desc->dwFlags & DDSD_CKSRCOVERLAY) { - IWineD3DSurface_SetColorKey(surface->WineD3DSurface, - DDCKEY_SRCOVERLAY, (WINEDDCOLORKEY *)&desc->ddckCKSrcOverlay); + wined3d_surface_set_color_key(surface->wined3d_surface, DDCKEY_SRCOVERLAY, + (WINEDDCOLORKEY *)&desc->ddckCKSrcOverlay); } if (desc->dwFlags & DDSD_CKSRCBLT) { - IWineD3DSurface_SetColorKey(surface->WineD3DSurface, - DDCKEY_SRCBLT, (WINEDDCOLORKEY *)&desc->ddckCKSrcBlt); + wined3d_surface_set_color_key(surface->wined3d_surface, DDCKEY_SRCBLT, + (WINEDDCOLORKEY *)&desc->ddckCKSrcBlt); } if (desc->dwFlags & DDSD_LPSURFACE) { - hr = IWineD3DSurface_SetMem(surface->WineD3DSurface, desc->lpSurface); + hr = wined3d_surface_set_mem(surface->wined3d_surface, desc->lpSurface); if (FAILED(hr)) { ERR("Failed to set surface memory, hr %#x.\n", hr); - IWineD3DSurface_Release(surface->WineD3DSurface); + wined3d_surface_decref(surface->wined3d_surface); return hr; } } diff --git a/dll/directx/wine/ddraw/utils.c b/dll/directx/wine/ddraw/utils.c index 039a3a05776..62e4b43ba90 100644 --- a/dll/directx/wine/ddraw/utils.c +++ b/dll/directx/wine/ddraw/utils.c @@ -1172,30 +1172,6 @@ multiply_matrix(D3DMATRIX *dest, memcpy(dest, &temp, 16 * sizeof(D3DVALUE)); } -void multiply_matrix_D3D_way(D3DMATRIX* result, const D3DMATRIX *m1, const D3DMATRIX *m2) -{ - D3DMATRIX temp; - - temp._11 = m1->_11 * m2->_11 + m1->_12 * m2->_21 + m1->_13 * m2->_31 + m1->_14 * m2->_41; - temp._12 = m1->_11 * m2->_12 + m1->_12 * m2->_22 + m1->_13 * m2->_32 + m1->_14 * m2->_42; - temp._13 = m1->_11 * m2->_13 + m1->_12 * m2->_23 + m1->_13 * m2->_33 + m1->_14 * m2->_43; - temp._14 = m1->_11 * m2->_14 + m1->_12 * m2->_24 + m1->_13 * m2->_34 + m1->_14 * m2->_44; - temp._21 = m1->_21 * m2->_11 + m1->_22 * m2->_21 + m1->_23 * m2->_31 + m1->_24 * m2->_41; - temp._22 = m1->_21 * m2->_12 + m1->_22 * m2->_22 + m1->_23 * m2->_32 + m1->_24 * m2->_42; - temp._23 = m1->_21 * m2->_13 + m1->_22 * m2->_23 + m1->_23 * m2->_33 + m1->_24 * m2->_43; - temp._24 = m1->_21 * m2->_14 + m1->_22 * m2->_24 + m1->_23 * m2->_34 + m1->_24 * m2->_44; - temp._31 = m1->_31 * m2->_11 + m1->_32 * m2->_21 + m1->_33 * m2->_31 + m1->_34 * m2->_41; - temp._32 = m1->_31 * m2->_12 + m1->_32 * m2->_22 + m1->_33 * m2->_32 + m1->_34 * m2->_42; - temp._33 = m1->_31 * m2->_13 + m1->_32 * m2->_23 + m1->_33 * m2->_33 + m1->_34 * m2->_43; - temp._34 = m1->_31 * m2->_14 + m1->_32 * m2->_24 + m1->_33 * m2->_34 + m1->_34 * m2->_44; - temp._41 = m1->_41 * m2->_11 + m1->_42 * m2->_21 + m1->_43 * m2->_31 + m1->_44 * m2->_41; - temp._42 = m1->_41 * m2->_12 + m1->_42 * m2->_22 + m1->_43 * m2->_32 + m1->_44 * m2->_42; - temp._43 = m1->_41 * m2->_13 + m1->_42 * m2->_23 + m1->_43 * m2->_33 + m1->_44 * m2->_43; - temp._44 = m1->_41 * m2->_14 + m1->_42 * m2->_24 + m1->_43 * m2->_34 + m1->_44 * m2->_44; - - *result = temp; -} - HRESULT hr_ddraw_from_wined3d(HRESULT hr) { diff --git a/dll/directx/wine/ddraw/vertexbuffer.c b/dll/directx/wine/ddraw/vertexbuffer.c index 36087f280f7..af4e8bcab84 100644 --- a/dll/directx/wine/ddraw/vertexbuffer.c +++ b/dll/directx/wine/ddraw/vertexbuffer.c @@ -82,10 +82,8 @@ IDirect3DVertexBufferImpl_QueryInterface(IDirect3DVertexBuffer7 *iface, return E_NOINTERFACE; } -static HRESULT WINAPI -Thunk_IDirect3DVertexBufferImpl_1_QueryInterface(IDirect3DVertexBuffer *iface, - REFIID riid, - void **obj) +static HRESULT WINAPI IDirect3DVertexBufferImpl_1_QueryInterface(IDirect3DVertexBuffer *iface, + REFIID riid, void **obj) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obj); @@ -112,8 +110,7 @@ IDirect3DVertexBufferImpl_AddRef(IDirect3DVertexBuffer7 *iface) return ref; } -static ULONG WINAPI -Thunk_IDirect3DVertexBufferImpl_1_AddRef(IDirect3DVertexBuffer *iface) +static ULONG WINAPI IDirect3DVertexBufferImpl_1_AddRef(IDirect3DVertexBuffer *iface) { TRACE("iface %p.\n", iface); @@ -140,34 +137,23 @@ IDirect3DVertexBufferImpl_Release(IDirect3DVertexBuffer7 *iface) if (ref == 0) { - IWineD3DBuffer *curVB = NULL; + struct wined3d_buffer *curVB = NULL; UINT offset, stride; EnterCriticalSection(&ddraw_cs); - /* D3D7 Vertex buffers don't stay bound in the device, they are passed as a parameter - * to drawPrimitiveVB. DrawPrimitiveVB sets them as the stream source in wined3d, - * and they should get unset there before they are destroyed - */ - IWineD3DDevice_GetStreamSource(This->ddraw->wineD3DDevice, - 0 /* Stream number */, - &curVB, - &offset, - &stride); - if(curVB == This->wineD3DVertexBuffer) - { - IWineD3DDevice_SetStreamSource(This->ddraw->wineD3DDevice, - 0 /* Steam number */, - NULL /* stream data */, - 0 /* Offset */, - 0 /* stride */); - } - if(curVB) - { - IWineD3DBuffer_Release(curVB); /* For the GetStreamSource */ - } + /* D3D7 Vertex buffers don't stay bound in the device, they are passed + * as a parameter to drawPrimitiveVB. DrawPrimitiveVB sets them as the + * stream source in wined3d, and they should get unset there before + * they are destroyed. */ + wined3d_device_get_stream_source(This->ddraw->wined3d_device, + 0, &curVB, &offset, &stride); + if (curVB == This->wineD3DVertexBuffer) + wined3d_device_set_stream_source(This->ddraw->wined3d_device, 0, NULL, 0, 0); + if (curVB) + wined3d_buffer_decref(curVB); /* For the GetStreamSource */ - IWineD3DVertexDeclaration_Release(This->wineD3DVertexDeclaration); - IWineD3DBuffer_Release(This->wineD3DVertexBuffer); + wined3d_vertex_declaration_decref(This->wineD3DVertexDeclaration); + wined3d_buffer_decref(This->wineD3DVertexBuffer); LeaveCriticalSection(&ddraw_cs); HeapFree(GetProcessHeap(), 0, This); @@ -176,8 +162,7 @@ IDirect3DVertexBufferImpl_Release(IDirect3DVertexBuffer7 *iface) return ref; } -static ULONG WINAPI -Thunk_IDirect3DVertexBufferImpl_1_Release(IDirect3DVertexBuffer *iface) +static ULONG WINAPI IDirect3DVertexBufferImpl_1_Release(IDirect3DVertexBuffer *iface) { TRACE("iface %p.\n", iface); @@ -214,7 +199,8 @@ IDirect3DVertexBufferImpl_Lock(IDirect3DVertexBuffer7 *iface, DWORD *Size) { IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface; - WINED3DBUFFER_DESC Desc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; HRESULT hr; DWORD wined3d_flags = 0; @@ -232,21 +218,18 @@ IDirect3DVertexBufferImpl_Lock(IDirect3DVertexBuffer7 *iface, if(Size) { /* Get the size, for returning it, and for locking */ - IWineD3DBuffer_GetDesc(This->wineD3DVertexBuffer, &Desc); - *Size = Desc.Size; + wined3d_resource = wined3d_buffer_get_resource(This->wineD3DVertexBuffer); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); + *Size = wined3d_desc.size; } - hr = IWineD3DBuffer_Map(This->wineD3DVertexBuffer, 0 /* OffsetToLock */, - 0 /* SizeToLock, 0 == Full lock */, (BYTE **)Data, wined3d_flags); + hr = wined3d_buffer_map(This->wineD3DVertexBuffer, 0, 0, (BYTE **)Data, wined3d_flags); LeaveCriticalSection(&ddraw_cs); return hr; } -static HRESULT WINAPI -Thunk_IDirect3DVertexBufferImpl_1_Lock(IDirect3DVertexBuffer *iface, - DWORD Flags, - void **Data, - DWORD *Size) +static HRESULT WINAPI IDirect3DVertexBufferImpl_1_Lock(IDirect3DVertexBuffer *iface, DWORD Flags, + void **Data, DWORD *Size) { TRACE("iface %p, flags %#x, data %p, data_size %p.\n", iface, Flags, Data, Size); @@ -266,19 +249,17 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_Unlock(IDirect3DVertexBuffer7 *iface) { IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface; - HRESULT hr; TRACE("iface %p.\n", iface); EnterCriticalSection(&ddraw_cs); - hr = IWineD3DBuffer_Unmap(This->wineD3DVertexBuffer); + wined3d_buffer_unmap(This->wineD3DVertexBuffer); LeaveCriticalSection(&ddraw_cs); - return hr; + return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DVertexBufferImpl_1_Unlock(IDirect3DVertexBuffer *iface) +static HRESULT WINAPI IDirect3DVertexBufferImpl_1_Unlock(IDirect3DVertexBuffer *iface) { TRACE("iface %p.\n", iface); @@ -345,50 +326,26 @@ IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface, * the vertex ops */ doClip = VertexOp & D3DVOP_CLIP ? TRUE : FALSE; - IWineD3DDevice_GetRenderState(D3D->wineD3DDevice, - WINED3DRS_CLIPPING, - (DWORD *) &oldClip); - if(doClip != oldClip) - { - IWineD3DDevice_SetRenderState(D3D->wineD3DDevice, - WINED3DRS_CLIPPING, - doClip); - } + wined3d_device_get_render_state(D3D->wined3d_device, WINED3DRS_CLIPPING, (DWORD *)&oldClip); + if (doClip != oldClip) + wined3d_device_set_render_state(D3D->wined3d_device, WINED3DRS_CLIPPING, doClip); - IWineD3DDevice_SetStreamSource(D3D->wineD3DDevice, - 0, /* Stream No */ - Src->wineD3DVertexBuffer, - 0, /* Offset */ - get_flexible_vertex_size(Src->fvf)); - IWineD3DDevice_SetVertexDeclaration(D3D->wineD3DDevice, - Src->wineD3DVertexDeclaration); - hr = IWineD3DDevice_ProcessVertices(D3D->wineD3DDevice, - SrcIndex, - DestIndex, - Count, - This->wineD3DVertexBuffer, - NULL /* Output vdecl */, - Flags, - This->fvf); + wined3d_device_set_stream_source(D3D->wined3d_device, + 0, Src->wineD3DVertexBuffer, 0, get_flexible_vertex_size(Src->fvf)); + wined3d_device_set_vertex_declaration(D3D->wined3d_device, Src->wineD3DVertexDeclaration); + hr = wined3d_device_process_vertices(D3D->wined3d_device, SrcIndex, DestIndex, + Count, This->wineD3DVertexBuffer, NULL, Flags, This->fvf); /* Restore the states if needed */ - if(doClip != oldClip) - IWineD3DDevice_SetRenderState(D3D->wineD3DDevice, - WINED3DRS_CLIPPING, - oldClip); + if (doClip != oldClip) + wined3d_device_set_render_state(D3D->wined3d_device, WINED3DRS_CLIPPING, oldClip); LeaveCriticalSection(&ddraw_cs); return hr; } -static HRESULT WINAPI -Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices(IDirect3DVertexBuffer *iface, - DWORD VertexOp, - DWORD DestIndex, - DWORD Count, - IDirect3DVertexBuffer *SrcBuffer, - DWORD SrcIndex, - IDirect3DDevice3 *D3DDevice, - DWORD Flags) +static HRESULT WINAPI IDirect3DVertexBufferImpl_1_ProcessVertices(IDirect3DVertexBuffer *iface, + DWORD VertexOp, DWORD DestIndex, DWORD Count, IDirect3DVertexBuffer *SrcBuffer, + DWORD SrcIndex, IDirect3DDevice3 *D3DDevice, DWORD Flags) { IDirect3DVertexBufferImpl *Src = SrcBuffer ? vb_from_vb1(SrcBuffer) : NULL; IDirect3DDeviceImpl *D3D = D3DDevice ? device_from_device3(D3DDevice) : NULL; @@ -418,27 +375,28 @@ IDirect3DVertexBufferImpl_GetVertexBufferDesc(IDirect3DVertexBuffer7 *iface, D3DVERTEXBUFFERDESC *Desc) { IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface; - WINED3DBUFFER_DESC WDesc; + struct wined3d_resource_desc wined3d_desc; + struct wined3d_resource *wined3d_resource; TRACE("iface %p, desc %p.\n", iface, Desc); if(!Desc) return DDERR_INVALIDPARAMS; EnterCriticalSection(&ddraw_cs); - IWineD3DBuffer_GetDesc(This->wineD3DVertexBuffer, &WDesc); + wined3d_resource = wined3d_buffer_get_resource(This->wineD3DVertexBuffer); + wined3d_resource_get_desc(wined3d_resource, &wined3d_desc); LeaveCriticalSection(&ddraw_cs); /* Now fill the Desc structure */ Desc->dwCaps = This->Caps; Desc->dwFVF = This->fvf; - Desc->dwNumVertices = WDesc.Size / get_flexible_vertex_size(This->fvf); + Desc->dwNumVertices = wined3d_desc.size / get_flexible_vertex_size(This->fvf); return D3D_OK; } -static HRESULT WINAPI -Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc(IDirect3DVertexBuffer *iface, - D3DVERTEXBUFFERDESC *Desc) +static HRESULT WINAPI IDirect3DVertexBufferImpl_1_GetVertexBufferDesc(IDirect3DVertexBuffer *iface, + D3DVERTEXBUFFERDESC *Desc) { TRACE("iface %p, desc %p.\n", iface, Desc); @@ -485,10 +443,8 @@ IDirect3DVertexBufferImpl_Optimize(IDirect3DVertexBuffer7 *iface, return DD_OK; } -static HRESULT WINAPI -Thunk_IDirect3DVertexBufferImpl_1_Optimize(IDirect3DVertexBuffer *iface, - IDirect3DDevice3 *D3DDevice, - DWORD Flags) +static HRESULT WINAPI IDirect3DVertexBufferImpl_1_Optimize(IDirect3DVertexBuffer *iface, + IDirect3DDevice3 *D3DDevice, DWORD Flags) { IDirect3DDeviceImpl *D3D = D3DDevice ? device_from_device3(D3DDevice) : NULL; @@ -559,15 +515,15 @@ static const struct IDirect3DVertexBuffer7Vtbl d3d_vertex_buffer7_vtbl = static const struct IDirect3DVertexBufferVtbl d3d_vertex_buffer1_vtbl = { /*** IUnknown Methods ***/ - Thunk_IDirect3DVertexBufferImpl_1_QueryInterface, - Thunk_IDirect3DVertexBufferImpl_1_AddRef, - Thunk_IDirect3DVertexBufferImpl_1_Release, + IDirect3DVertexBufferImpl_1_QueryInterface, + IDirect3DVertexBufferImpl_1_AddRef, + IDirect3DVertexBufferImpl_1_Release, /*** IDirect3DVertexBuffer Methods ***/ - Thunk_IDirect3DVertexBufferImpl_1_Lock, - Thunk_IDirect3DVertexBufferImpl_1_Unlock, - Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices, - Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, - Thunk_IDirect3DVertexBufferImpl_1_Optimize + IDirect3DVertexBufferImpl_1_Lock, + IDirect3DVertexBufferImpl_1_Unlock, + IDirect3DVertexBufferImpl_1_ProcessVertices, + IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, + IDirect3DVertexBufferImpl_1_Optimize }; HRESULT d3d_vertex_buffer_init(IDirect3DVertexBufferImpl *buffer, @@ -589,7 +545,7 @@ HRESULT d3d_vertex_buffer_init(IDirect3DVertexBufferImpl *buffer, EnterCriticalSection(&ddraw_cs); - hr = IWineD3DDevice_CreateVertexBuffer(ddraw->wineD3DDevice, + hr = wined3d_buffer_create_vb(ddraw->wined3d_device, get_flexible_vertex_size(desc->dwFVF) * desc->dwNumVertices, usage, desc->dwCaps & D3DVBCAPS_SYSTEMMEMORY ? WINED3DPOOL_SYSTEMMEM : WINED3DPOOL_DEFAULT, buffer, &ddraw_null_wined3d_parent_ops, &buffer->wineD3DVertexBuffer); @@ -608,12 +564,12 @@ HRESULT d3d_vertex_buffer_init(IDirect3DVertexBufferImpl *buffer, if (!buffer->wineD3DVertexDeclaration) { ERR("Failed to find vertex declaration for fvf %#x.\n", desc->dwFVF); - IWineD3DBuffer_Release(buffer->wineD3DVertexBuffer); + wined3d_buffer_decref(buffer->wineD3DVertexBuffer); LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } - IWineD3DVertexDeclaration_AddRef(buffer->wineD3DVertexDeclaration); + wined3d_vertex_declaration_incref(buffer->wineD3DVertexDeclaration); LeaveCriticalSection(&ddraw_cs); diff --git a/dll/directx/wine/ddraw/viewport.c b/dll/directx/wine/ddraw/viewport.c index 6e0725e604e..08af7e2380f 100644 --- a/dll/directx/wine/ddraw/viewport.c +++ b/dll/directx/wine/ddraw/viewport.c @@ -36,18 +36,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); * activates the viewport using IDirect3DDevice7::SetViewport * *****************************************************************************/ -void viewport_activate(IDirect3DViewportImpl* This, BOOL ignore_lights) { - IDirect3DLightImpl* light; +void viewport_activate(IDirect3DViewportImpl *This, BOOL ignore_lights) +{ D3DVIEWPORT7 vp; - if (!ignore_lights) { - /* Activate all the lights associated with this context */ - light = This->lights; + if (!ignore_lights) + { + IDirect3DLightImpl *light; - while (light) + /* Activate all the lights associated with this context */ + LIST_FOR_EACH_ENTRY(light, &This->light_list, IDirect3DLightImpl, entry) { light_activate(light); - light = light->next; } } @@ -387,17 +387,12 @@ IDirect3DViewportImpl_TransformVertices(IDirect3DViewport3 *iface, EnterCriticalSection(&ddraw_cs); - IWineD3DDevice_GetTransform(This->active_device->wineD3DDevice, - D3DTRANSFORMSTATE_VIEW, - (WINED3DMATRIX*) &view_mat); - - IWineD3DDevice_GetTransform(This->active_device->wineD3DDevice, - D3DTRANSFORMSTATE_PROJECTION, - (WINED3DMATRIX*) &proj_mat); - - IWineD3DDevice_GetTransform(This->active_device->wineD3DDevice, - WINED3DTS_WORLDMATRIX(0), - (WINED3DMATRIX*) &world_mat); + wined3d_device_get_transform(This->active_device->wined3d_device, + D3DTRANSFORMSTATE_VIEW, (WINED3DMATRIX *)&view_mat); + wined3d_device_get_transform(This->active_device->wined3d_device, + D3DTRANSFORMSTATE_PROJECTION, (WINED3DMATRIX *)&proj_mat); + wined3d_device_get_transform(This->active_device->wined3d_device, + WINED3DTS_WORLDMATRIX(0), (WINED3DMATRIX *)&world_mat); multiply_matrix(&mat,&view_mat,&world_mat); multiply_matrix(&mat,&proj_mat,&mat); @@ -749,8 +744,7 @@ IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface, This->map_lights |= 1<next = This->lights; - This->lights = lpDirect3DLightImpl; + list_add_head(&This->light_list, &lpDirect3DLightImpl->entry); IDirect3DLight_AddRef(lpDirect3DLight); /* Attach the light to the viewport */ @@ -782,33 +776,29 @@ IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface, IDirect3DLight *lpDirect3DLight) { IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface; - IDirect3DLightImpl *lpDirect3DLightImpl = (IDirect3DLightImpl *)lpDirect3DLight; - IDirect3DLightImpl *cur_light, *prev_light = NULL; + IDirect3DLightImpl *l = (IDirect3DLightImpl *)lpDirect3DLight; TRACE("iface %p, light %p.\n", iface, lpDirect3DLight); EnterCriticalSection(&ddraw_cs); - cur_light = This->lights; - while (cur_light != NULL) { - if (cur_light == lpDirect3DLightImpl) - { - light_deactivate(lpDirect3DLightImpl); - if (!prev_light) This->lights = cur_light->next; - else prev_light->next = cur_light->next; - /* Detach the light from the viewport. */ - cur_light->active_viewport = NULL; - IDirect3DLight_Release((IDirect3DLight *)cur_light); - --This->num_lights; - This->map_lights &= ~(1 << lpDirect3DLightImpl->dwLightIndex); - LeaveCriticalSection(&ddraw_cs); - return D3D_OK; - } - prev_light = cur_light; - cur_light = cur_light->next; + + if (l->active_viewport != This) + { + WARN("Light %p active viewport is %p.\n", l, l->active_viewport); + LeaveCriticalSection(&ddraw_cs); + return DDERR_INVALIDPARAMS; } + + light_deactivate(l); + list_remove(&l->entry); + l->active_viewport = NULL; + IDirect3DLight_Release(lpDirect3DLight); + --This->num_lights; + This->map_lights &= ~(1 << l->dwLightIndex); + LeaveCriticalSection(&ddraw_cs); - return DDERR_INVALIDPARAMS; + return D3D_OK; } /***************************************************************************** @@ -831,7 +821,9 @@ IDirect3DViewportImpl_NextLight(IDirect3DViewport3 *iface, DWORD dwFlags) { IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface; - IDirect3DLightImpl *cur_light, *prev_light = NULL; + IDirect3DLightImpl *l = (IDirect3DLightImpl *)lpDirect3DLight; + struct list *entry; + HRESULT hr; TRACE("iface %p, light %p, next_light %p, flags %#x.\n", iface, lpDirect3DLight, lplpDirect3DLight, dwFlags); @@ -839,47 +831,50 @@ IDirect3DViewportImpl_NextLight(IDirect3DViewport3 *iface, if (!lplpDirect3DLight) return DDERR_INVALIDPARAMS; - *lplpDirect3DLight = NULL; - EnterCriticalSection(&ddraw_cs); - cur_light = This->lights; - - switch (dwFlags) { + switch (dwFlags) + { case D3DNEXT_NEXT: - if (!lpDirect3DLight) { - LeaveCriticalSection(&ddraw_cs); - return DDERR_INVALIDPARAMS; - } - while (cur_light != NULL) { - if (cur_light == (IDirect3DLightImpl *)lpDirect3DLight) { - *lplpDirect3DLight = (IDirect3DLight*)cur_light->next; - break; - } - cur_light = cur_light->next; + if (!l || l->active_viewport != This) + { + if (l) + WARN("Light %p active viewport is %p.\n", l, l->active_viewport); + entry = NULL; } + else + entry = list_next(&This->light_list, &l->entry); break; + case D3DNEXT_HEAD: - *lplpDirect3DLight = (IDirect3DLight*)This->lights; + entry = list_head(&This->light_list); break; + case D3DNEXT_TAIL: - while (cur_light != NULL) { - prev_light = cur_light; - cur_light = cur_light->next; - } - *lplpDirect3DLight = (IDirect3DLight*)prev_light; + entry = list_tail(&This->light_list); break; + default: - ERR("Unknown flag %d\n", dwFlags); + entry = NULL; + WARN("Invalid flags %#x.\n", dwFlags); break; } - if (*lplpDirect3DLight) + if (entry) + { + *lplpDirect3DLight = (IDirect3DLight *)LIST_ENTRY(entry, IDirect3DLightImpl, entry); IDirect3DLight_AddRef(*lplpDirect3DLight); + hr = D3D_OK; + } + else + { + *lplpDirect3DLight = NULL; + hr = DDERR_INVALIDPARAMS; + } LeaveCriticalSection(&ddraw_cs); - return *lplpDirect3DLight ? D3D_OK : DDERR_INVALIDPARAMS; + return hr; } /***************************************************************************** @@ -1131,4 +1126,5 @@ void d3d_viewport_init(IDirect3DViewportImpl *viewport, IDirectDrawImpl *ddraw) viewport->ref = 1; viewport->ddraw = ddraw; viewport->use_vp2 = 0xff; + list_init(&viewport->light_list); } diff --git a/dll/directx/wine/wined3d/CMakeLists.txt b/dll/directx/wine/wined3d/CMakeLists.txt index 4a45c3b7b58..01989775c42 100644 --- a/dll/directx/wine/wined3d/CMakeLists.txt +++ b/dll/directx/wine/wined3d/CMakeLists.txt @@ -18,11 +18,9 @@ spec2def(wined3d.dll wined3d.spec) list(APPEND SOURCE ati_fragment_shader.c arb_program_shader.c - basetexture.c buffer.c clipper.c context.c - cubetexture.c device.c directx.c drawprim.c @@ -37,18 +35,13 @@ list(APPEND SOURCE shader_sm4.c state.c stateblock.c - surface_base.c surface.c - surface_gdi.c swapchain.c - swapchain_base.c - swapchain_gdi.c texture.c utils.c vertexdeclaration.c view.c volume.c - volumetexture.c wined3d_main.c version.rc ${CMAKE_CURRENT_BINARY_DIR}/wined3d.def) @@ -62,7 +55,7 @@ endif() add_library(wined3d SHARED ${SOURCE}) set_module_type(wined3d win32dll) -target_link_libraries(wined3d wine uuid wined3d_guid) +target_link_libraries(wined3d wine) add_importlibs(wined3d user32 diff --git a/dll/directx/wine/wined3d/arb_program_shader.c b/dll/directx/wine/wined3d/arb_program_shader.c index c053e7faf10..ee5bf86d88a 100644 --- a/dll/directx/wine/wined3d/arb_program_shader.c +++ b/dll/directx/wine/wined3d/arb_program_shader.c @@ -78,47 +78,6 @@ static void shader_arb_dump_program_source(const char *source) HeapFree(GetProcessHeap(), 0, tmp); } -/* GL locking for state handlers is done by the caller. */ -static BOOL need_rel_addr_const(IWineD3DBaseShaderImpl *shader, const struct wined3d_gl_info *gl_info) -{ - if (shader->baseShader.reg_maps.shader_version.type == WINED3D_SHADER_TYPE_VERTEX) - { - if (((IWineD3DVertexShaderImpl *)shader)->rel_offset) return TRUE; - } - if (!shader->baseShader.reg_maps.usesmova) return FALSE; - return !gl_info->supported[NV_VERTEX_PROGRAM2_OPTION]; -} - -/* Returns TRUE if result.clip from GL_NV_vertex_program2 should be used and FALSE otherwise */ -static inline BOOL use_nv_clip(const struct wined3d_gl_info *gl_info) -{ - return gl_info->supported[NV_VERTEX_PROGRAM2_OPTION] - && !(gl_info->quirks & WINED3D_QUIRK_NV_CLIP_BROKEN); -} - -static BOOL need_helper_const(IWineD3DBaseShaderImpl *shader, const struct wined3d_gl_info *gl_info) -{ - if (need_rel_addr_const(shader, gl_info)) return TRUE; - if (!gl_info->supported[NV_VERTEX_PROGRAM]) return TRUE; /* Need to init colors. */ - if (gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT) return TRUE; /* Load the immval offset. */ - if (gl_info->quirks & WINED3D_QUIRK_SET_TEXCOORD_W) return TRUE; /* Have to init texcoords. */ - if (!use_nv_clip(gl_info)) return TRUE; /* Init the clip texcoord */ - if (shader->baseShader.reg_maps.usesnrm) return TRUE; /* 0.0 */ - if (shader->baseShader.reg_maps.usesrcp) return TRUE; /* EPS */ - return FALSE; -} - -static unsigned int reserved_vs_const(IWineD3DBaseShaderImpl *shader, const struct wined3d_gl_info *gl_info) -{ - unsigned int ret = 1; - /* We use one PARAM for the pos fixup, and in some cases one to load - * some immediate values into the shader - */ - if(need_helper_const(shader, gl_info)) ret++; - if(need_rel_addr_const(shader, gl_info)) ret++; - return ret; -} - enum arb_helper_value { ARB_ZERO, @@ -145,7 +104,7 @@ static const char *arb_get_helper_value(enum wined3d_shader_type shader, enum ar case ARB_ZERO: return "ps_helper_const.x"; case ARB_ONE: return "ps_helper_const.y"; case ARB_TWO: return "coefmul.x"; - case ARB_0001: return "helper_const.xxxy"; + case ARB_0001: return "ps_helper_const.xxxy"; case ARB_EPS: return "ps_helper_const.z"; default: break; } @@ -335,6 +294,7 @@ struct arb_pshader_private { struct arb_vshader_private { struct arb_vs_compiled_shader *gl_shaders; UINT num_gl_shaders, shader_array_size; + UINT rel_offset; }; struct shader_arb_priv @@ -355,9 +315,45 @@ struct shader_arb_priv DWORD ps_sig_number; }; -/******************************************************** - * ARB_[vertex/fragment]_program helper functions follow - ********************************************************/ +/* GL locking for state handlers is done by the caller. */ +static BOOL need_rel_addr_const(const struct arb_vshader_private *shader_data, + const struct wined3d_shader_reg_maps *reg_maps, const struct wined3d_gl_info *gl_info) +{ + if (shader_data->rel_offset) return TRUE; + if (!reg_maps->usesmova) return FALSE; + return !gl_info->supported[NV_VERTEX_PROGRAM2_OPTION]; +} + +/* Returns TRUE if result.clip from GL_NV_vertex_program2 should be used and FALSE otherwise */ +static inline BOOL use_nv_clip(const struct wined3d_gl_info *gl_info) +{ + return gl_info->supported[NV_VERTEX_PROGRAM2_OPTION] + && !(gl_info->quirks & WINED3D_QUIRK_NV_CLIP_BROKEN); +} + +static BOOL need_helper_const(const struct arb_vshader_private *shader_data, + const struct wined3d_shader_reg_maps *reg_maps, const struct wined3d_gl_info *gl_info) +{ + if (need_rel_addr_const(shader_data, reg_maps, gl_info)) return TRUE; + if (!gl_info->supported[NV_VERTEX_PROGRAM]) return TRUE; /* Need to init colors. */ + if (gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT) return TRUE; /* Load the immval offset. */ + if (gl_info->quirks & WINED3D_QUIRK_SET_TEXCOORD_W) return TRUE; /* Have to init texcoords. */ + if (!use_nv_clip(gl_info)) return TRUE; /* Init the clip texcoord */ + if (reg_maps->usesnrm) return TRUE; /* 0.0 */ + if (reg_maps->usespow) return TRUE; /* EPS, 0.0 and 1.0 */ + return FALSE; +} + +static unsigned int reserved_vs_const(const struct arb_vshader_private *shader_data, + const struct wined3d_shader_reg_maps *reg_maps, const struct wined3d_gl_info *gl_info) +{ + unsigned int ret = 1; + /* We use one PARAM for the pos fixup, and in some cases one to load + * some immediate values into the shader. */ + if (need_helper_const(shader_data, reg_maps, gl_info)) ++ret; + if (need_rel_addr_const(shader_data, reg_maps, gl_info)) ++ret; + return ret; +} /* Loads floating point constants into the currently set ARB_vertex/fragment_program. * When constant_list == NULL, it will load all the constants. @@ -366,7 +362,7 @@ struct shader_arb_priv * or GL_FRAGMENT_PROGRAM_ARB (for pixel shaders) */ /* GL locking is done by the caller */ -static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info, +static unsigned int shader_arb_load_constantsF(struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, GLuint target_type, unsigned int max_constants, const float *constants, char *dirty_consts) { local_constant* lconst; @@ -386,7 +382,7 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, con i = 0; /* In 1.X pixel shaders constants are implicitly clamped in the range [-1;1] */ - if (target_type == GL_FRAGMENT_PROGRAM_ARB && This->baseShader.reg_maps.shader_version.major == 1) + if (target_type == GL_FRAGMENT_PROGRAM_ARB && shader->reg_maps.shader_version.major == 1) { float lcl_const[4]; /* ps 1.x supports only 8 constants, clamp only those. When switching between 1.x and higher @@ -455,9 +451,12 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, con checkGLcall("glProgramEnvParameter4fvARB()"); /* Load immediate constants */ - if(This->baseShader.load_local_constsF) { - if (TRACE_ON(d3d_shader)) { - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { + if (shader->load_local_constsF) + { + if (TRACE_ON(d3d_shader)) + { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { GLfloat* values = (GLfloat*)lconst->value; TRACE_(d3d_constants)("Loading local constants %i: %f, %f, %f, %f\n", lconst->idx, values[0], values[1], values[2], values[3]); @@ -465,7 +464,8 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, con } /* Immediate constants are clamped for 1.X shaders at loading times */ ret = 0; - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { dirty_consts[lconst->idx] = 1; /* Dirtify so the non-immediate constant overwrites it next time */ ret = max(ret, lconst->idx + 1); GL_EXTCALL(glProgramEnvParameter4fvARB(target_type, lconst->idx, (GLfloat*)lconst->value)); @@ -480,20 +480,13 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, con /** * Loads the texture dimensions for NP2 fixup into the currently set ARB_[vertex/fragment]_programs. */ -static void shader_arb_load_np2fixup_constants( - IWineD3DDevice* device, - char usePixelShader, - char useVertexShader) { +static void shader_arb_load_np2fixup_constants(void *shader_priv, + const struct wined3d_gl_info *gl_info, const struct wined3d_state *state) +{ + const struct shader_arb_priv * priv = shader_priv; - IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl *) device; - const struct shader_arb_priv* const priv = (const struct shader_arb_priv *) deviceImpl->shader_priv; - IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock; - const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info; - - if (!usePixelShader) { - /* NP2 texcoord fixup is (currently) only done for pixelshaders. */ - return; - } + /* NP2 texcoord fixup is (currently) only done for pixelshaders. */ + if (!use_ps(state)) return; if (priv->compiled_fprog && priv->compiled_fprog->np2fixup_info.super.active) { const struct arb_ps_np2fixup_info* const fixup = &priv->compiled_fprog->np2fixup_info; @@ -501,9 +494,10 @@ static void shader_arb_load_np2fixup_constants( WORD active = fixup->super.active; GLfloat np2fixup_constants[4 * MAX_FRAGMENT_SAMPLERS]; - for (i = 0; active; active >>= 1, ++i) { + for (i = 0; active; active >>= 1, ++i) + { + const struct wined3d_texture *tex = state->textures[i]; const unsigned char idx = fixup->super.idx[i]; - const IWineD3DBaseTextureImpl *tex = stateBlock->state.textures[i]; GLfloat *tex_dim = &np2fixup_constants[(idx >> 1) * 4]; if (!(active & 1)) continue; @@ -513,10 +507,15 @@ static void shader_arb_load_np2fixup_constants( continue; } - if (idx % 2) { - tex_dim[2] = tex->baseTexture.pow2Matrix[0]; tex_dim[3] = tex->baseTexture.pow2Matrix[5]; - } else { - tex_dim[0] = tex->baseTexture.pow2Matrix[0]; tex_dim[1] = tex->baseTexture.pow2Matrix[5]; + if (idx % 2) + { + tex_dim[2] = tex->pow2_matrix[0]; + tex_dim[3] = tex->pow2_matrix[5]; + } + else + { + tex_dim[0] = tex->pow2_matrix[0]; + tex_dim[1] = tex->pow2_matrix[5]; } } @@ -528,21 +527,18 @@ static void shader_arb_load_np2fixup_constants( } /* GL locking is done by the caller. */ -static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl) +static void shader_arb_ps_local_constants(const struct arb_ps_compiled_shader *gl_shader, + const struct wined3d_context *context, const struct wined3d_state *state, UINT rt_height) { - const struct wined3d_context *context = context_get_current(); - IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock; const struct wined3d_gl_info *gl_info = context->gl_info; unsigned char i; - struct shader_arb_priv *priv = deviceImpl->shader_priv; - const struct arb_ps_compiled_shader *gl_shader = priv->compiled_fprog; for(i = 0; i < gl_shader->numbumpenvmatconsts; i++) { int texunit = gl_shader->bumpenvmatconst[i].texunit; /* The state manager takes care that this function is always called if the bump env matrix changes */ - const float *data = (const float *)&stateBlock->state.texture_states[texunit][WINED3DTSS_BUMPENVMAT00]; + const float *data = (const float *)&state->texture_states[texunit][WINED3DTSS_BUMPENVMAT00]; GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, gl_shader->bumpenvmatconst[i].const_num, data)); @@ -553,7 +549,7 @@ static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl) * don't care about them. The pointers are valid for sure because the stateblock is bigger. * (they're WINED3DTSS_TEXTURETRANSFORMFLAGS and WINED3DTSS_ADDRESSW, so most likely 0 or NaN */ - const float *scale = (const float *)&stateBlock->state.texture_states[texunit][WINED3DTSS_BUMPENVLSCALE]; + const float *scale = (const float *)&state->texture_states[texunit][WINED3DTSS_BUMPENVLSCALE]; GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, gl_shader->luminanceconst[i].const_num, scale)); } @@ -568,8 +564,7 @@ static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl) * ycorrection.w: 0.0 */ float val[4]; - val[0] = context->render_offscreen ? 0.0f - : deviceImpl->render_targets[0]->currentDesc.Height; + val[0] = context->render_offscreen ? 0.0f : (float) rt_height; val[1] = context->render_offscreen ? 1.0f : -1.0f; val[2] = 1.0f; val[3] = 0.0f; @@ -584,9 +579,9 @@ static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl) if(gl_shader->int_consts[i] != WINED3D_CONST_NUM_UNUSED) { float val[4]; - val[0] = (float)stateBlock->state.ps_consts_i[4 * i]; - val[1] = (float)stateBlock->state.ps_consts_i[4 * i + 1]; - val[2] = (float)stateBlock->state.ps_consts_i[4 * i + 2]; + val[0] = (float)state->ps_consts_i[4 * i]; + val[1] = (float)state->ps_consts_i[4 * i + 1]; + val[2] = (float)state->ps_consts_i[4 * i + 2]; val[3] = -1.0f; GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, gl_shader->int_consts[i], val)); @@ -596,29 +591,27 @@ static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl) } /* GL locking is done by the caller. */ -static inline void shader_arb_vs_local_constants(IWineD3DDeviceImpl* deviceImpl) +static void shader_arb_vs_local_constants(const struct arb_vs_compiled_shader *gl_shader, + const struct wined3d_context *context, const struct wined3d_state *state) { - IWineD3DStateBlockImpl* stateBlock; - const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info; + const struct wined3d_gl_info *gl_info = context->gl_info; + float position_fixup[4]; unsigned char i; - struct shader_arb_priv *priv = deviceImpl->shader_priv; - const struct arb_vs_compiled_shader *gl_shader = priv->compiled_vprog; /* Upload the position fixup */ - GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, gl_shader->pos_fixup, deviceImpl->posFixup)); + shader_get_position_fixup(context, state, position_fixup); + GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, gl_shader->pos_fixup, position_fixup)); if (!gl_shader->num_int_consts) return; - stateBlock = deviceImpl->stateBlock; - for(i = 0; i < MAX_CONST_I; i++) { if(gl_shader->int_consts[i] != WINED3D_CONST_NUM_UNUSED) { float val[4]; - val[0] = (float)stateBlock->state.vs_consts_i[4 * i]; - val[1] = (float)stateBlock->state.vs_consts_i[4 * i + 1]; - val[2] = (float)stateBlock->state.vs_consts_i[4 * i + 2]; + val[0] = (float)state->vs_consts_i[4 * i]; + val[1] = (float)state->vs_consts_i[4 * i + 1]; + val[2] = (float)state->vs_consts_i[4 * i + 2]; val[3] = -1.0f; GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, gl_shader->int_consts[i], val)); @@ -636,83 +629,88 @@ static inline void shader_arb_vs_local_constants(IWineD3DDeviceImpl* deviceImpl) /* GL locking is done by the caller (state handler) */ static void shader_arb_load_constants(const struct wined3d_context *context, char usePixelShader, char useVertexShader) { - IWineD3DDeviceImpl *device = context->swapchain->device; - IWineD3DStateBlockImpl* stateBlock = device->stateBlock; + struct wined3d_device *device = context->swapchain->device; + struct wined3d_stateblock *stateBlock = device->stateBlock; const struct wined3d_gl_info *gl_info = context->gl_info; + struct shader_arb_priv *priv = device->shader_priv; if (useVertexShader) { - IWineD3DBaseShaderImpl *vshader = (IWineD3DBaseShaderImpl *)stateBlock->state.vertex_shader; + struct wined3d_shader *vshader = stateBlock->state.vertex_shader; + const struct arb_vs_compiled_shader *gl_shader = priv->compiled_vprog; /* Load DirectX 9 float constants for vertex shader */ device->highest_dirty_vs_const = shader_arb_load_constantsF(vshader, gl_info, GL_VERTEX_PROGRAM_ARB, device->highest_dirty_vs_const, stateBlock->state.vs_consts_f, context->vshader_const_dirty); - shader_arb_vs_local_constants(device); + shader_arb_vs_local_constants(gl_shader, context, &stateBlock->state); } if (usePixelShader) { - IWineD3DBaseShaderImpl *pshader = (IWineD3DBaseShaderImpl *)stateBlock->state.pixel_shader; + struct wined3d_shader *pshader = stateBlock->state.pixel_shader; + const struct arb_ps_compiled_shader *gl_shader = priv->compiled_fprog; + UINT rt_height = device->fb.render_targets[0]->resource.height; /* Load DirectX 9 float constants for pixel shader */ device->highest_dirty_ps_const = shader_arb_load_constantsF(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB, device->highest_dirty_ps_const, stateBlock->state.ps_consts_f, context->pshader_const_dirty); - shader_arb_ps_local_constants(device); + shader_arb_ps_local_constants(gl_shader, context, &stateBlock->state, rt_height); } } -static void shader_arb_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count) +static void shader_arb_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_context *context = context_get_current(); /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active * context. On a context switch the old context will be fully dirtified */ - if (!context || context->swapchain->device != This) return; + if (!context || context->swapchain->device != device) return; memset(context->vshader_const_dirty + start, 1, sizeof(*context->vshader_const_dirty) * count); - This->highest_dirty_vs_const = max(This->highest_dirty_vs_const, start + count); + device->highest_dirty_vs_const = max(device->highest_dirty_vs_const, start + count); } -static void shader_arb_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) +static void shader_arb_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_context *context = context_get_current(); /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active * context. On a context switch the old context will be fully dirtified */ - if (!context || context->swapchain->device != This) return; + if (!context || context->swapchain->device != device) return; memset(context->pshader_const_dirty + start, 1, sizeof(*context->pshader_const_dirty) * count); - This->highest_dirty_ps_const = max(This->highest_dirty_ps_const, start + count); + device->highest_dirty_ps_const = max(device->highest_dirty_ps_const, start + count); } -static DWORD *local_const_mapping(IWineD3DBaseShaderImpl *This) +static DWORD *local_const_mapping(const struct wined3d_shader *shader) { DWORD *ret; DWORD idx = 0; const local_constant *lconst; - if(This->baseShader.load_local_constsF || list_empty(&This->baseShader.constantsF)) return NULL; + if (shader->load_local_constsF || list_empty(&shader->constantsF)) + return NULL; - ret = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * This->baseShader.limits.constant_float); - if(!ret) { + ret = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * shader->limits.constant_float); + if (!ret) + { ERR("Out of memory\n"); return NULL; } - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { ret[lconst->idx] = idx++; } return ret; } /* Generate the variable & register declarations for the ARB_vertex_program output target */ -static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps, - struct wined3d_shader_buffer *buffer, const struct wined3d_gl_info *gl_info, DWORD *lconst_map, +static DWORD shader_generate_arb_declarations(struct wined3d_shader *shader, + const struct wined3d_shader_reg_maps *reg_maps, struct wined3d_shader_buffer *buffer, + const struct wined3d_gl_info *gl_info, DWORD *lconst_map, DWORD *num_clipplanes, struct shader_arb_ctx_priv *ctx) { - IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface; DWORD i, next_local = 0; char pshader = shader_is_pshader_version(reg_maps->shader_version.type); unsigned max_constantsF; @@ -738,6 +736,7 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s } else { + const struct arb_vshader_private *shader_data = shader->backend_data; max_constantsF = gl_info->limits.arb_vs_native_constants; /* 96 is the minimum MAX_PROGRAM_ENV_PARAMETERS_ARB value. * Also prevents max_constantsF from becoming less than 0 and @@ -745,13 +744,14 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s if (max_constantsF < 96) max_constantsF = gl_info->limits.arb_vs_float_constants; - if(This->baseShader.reg_maps.usesrelconstF) { + if (reg_maps->usesrelconstF) + { DWORD highest_constf = 0, clip_limit; - max_constantsF -= reserved_vs_const(This, gl_info); - max_constantsF -= count_bits(This->baseShader.reg_maps.integer_constants); + max_constantsF -= reserved_vs_const(shader_data, reg_maps, gl_info); + max_constantsF -= count_bits(reg_maps->integer_constants); - for(i = 0; i < This->baseShader.limits.constant_float; i++) + for (i = 0; i < shader->limits.constant_float; ++i) { DWORD idx = i >> 5; DWORD shift = i & 0x1f; @@ -805,8 +805,10 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s /* Load local constants using the program-local space, * this avoids reloading them each time the shader is used */ - if(lconst_map) { - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { + if (lconst_map) + { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { shader_addline(buffer, "PARAM C%u = program.local[%u];\n", lconst->idx, lconst_map[lconst->idx]); next_local = max(next_local, lconst_map[lconst->idx] + 1); @@ -826,7 +828,7 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s } /* Avoid declaring more constants than needed */ - max_constantsF = min(max_constantsF, This->baseShader.limits.constant_float); + max_constantsF = min(max_constantsF, shader->limits.constant_float); /* we use the array-based constants array if the local constants are marked for loading, * because then we use indirect addressing, or when the local constant list is empty, @@ -834,7 +836,8 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s * local constants do not declare the loaded constants as an array because ARB compilers usually * do not optimize unused constants away */ - if(This->baseShader.reg_maps.usesrelconstF) { + if (reg_maps->usesrelconstF) + { /* Need to PARAM the environment parameters (constants) so we can use relative addressing */ shader_addline(buffer, "PARAM C[%d] = { program.env[0..%d] };\n", max_constantsF, max_constantsF - 1); @@ -843,7 +846,8 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s DWORD idx, mask; idx = i >> 5; mask = 1 << (i & 0x1f); - if(!shader_constant_is_local(This, i) && (This->baseShader.reg_maps.constf[idx] & mask)) { + if (!shader_constant_is_local(shader, i) && (reg_maps->constf[idx] & mask)) + { shader_addline(buffer, "PARAM C%d = program.env[%d];\n",i, i); } } @@ -940,8 +944,9 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction { /* oPos, oFog and oPts in D3D */ static const char * const rastout_reg_names[] = {"TMP_OUT", "result.fogcoord", "result.pointsize"}; - IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - BOOL pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type); + struct wined3d_shader *shader = ins->ctx->shader; + const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps; + BOOL pshader = shader_is_pshader_version(reg_maps->shader_version.type); struct shader_arb_ctx_priv *ctx = ins->ctx->backend_data; *is_color = FALSE; @@ -955,7 +960,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction case WINED3DSPR_INPUT: if (pshader) { - if(This->baseShader.reg_maps.shader_version.major < 3) + if (reg_maps->shader_version.major < 3) { if (!reg->idx) strcpy(register_name, "fragment.color.primary"); else strcpy(register_name, "fragment.color.secondary"); @@ -980,7 +985,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction sprintf(register_name, "out_of_bounds_%u", idx); } } - else if(This->baseShader.reg_maps.input_registers & 0x0300) + else if (reg_maps->input_registers & 0x0300) { /* There are two ways basically: * @@ -1041,10 +1046,12 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction case WINED3DSPR_CONST: if (!pshader && reg->rel_addr) { + const struct arb_vshader_private *shader_data = shader->backend_data; + UINT rel_offset = shader_data->rel_offset; BOOL aL = FALSE; char rel_reg[50]; - UINT rel_offset = ((IWineD3DVertexShaderImpl *)This)->rel_offset; - if(This->baseShader.reg_maps.shader_version.major < 2) { + if (reg_maps->shader_version.major < 2) + { sprintf(rel_reg, "A0.x"); } else { shader_arb_get_src_param(ins, reg->rel_addr, 0, rel_reg); @@ -1067,7 +1074,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction } else { - if (This->baseShader.reg_maps.usesrelconstF) + if (reg_maps->usesrelconstF) sprintf(register_name, "C[%u]", reg->idx); else sprintf(register_name, "C%u", reg->idx); @@ -1075,9 +1082,11 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction break; case WINED3DSPR_TEXTURE: /* case WINED3DSPR_ADDR: */ - if (pshader) { - if(This->baseShader.reg_maps.shader_version.major == 1 && - This->baseShader.reg_maps.shader_version.minor <= 3) { + if (pshader) + { + if (reg_maps->shader_version.major == 1 + && reg_maps->shader_version.minor <= 3) + { /* In ps <= 1.3, Tx is a temporary register as destination to all instructions, * and as source to most instructions. For some instructions it is the texcoord * input. Those instructions know about the special use @@ -1090,7 +1099,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction } else { - if(This->baseShader.reg_maps.shader_version.major == 1 || ctx->target_version >= NV2) + if (reg_maps->shader_version.major == 1 || ctx->target_version >= NV2) { sprintf(register_name, "A%u", reg->idx); } @@ -1109,7 +1118,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction else { if(ctx->cur_ps_args->super.srgb_correction) FIXME("sRGB correction on higher render targets\n"); - if(This->baseShader.reg_maps.highest_render_target > 0) + if (reg_maps->rt_mask > 1) { sprintf(register_name, "result.color[%u]", reg->idx); } @@ -1142,7 +1151,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction } else { - if(This->baseShader.reg_maps.shader_version.major < 3) + if (reg_maps->shader_version.major < 3) { strcpy(register_name, ctx->texcrd_output[reg->idx]); } @@ -1328,11 +1337,11 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; DWORD sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx]; - IWineD3DBaseTextureImpl *texture; + const struct wined3d_texture *texture; const char *tex_type; BOOL np2_fixup = FALSE; - IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device; + struct wined3d_shader *shader = ins->ctx->shader; + struct wined3d_device *device = shader->device; struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; const char *mod; BOOL pshader = shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type); @@ -1347,7 +1356,7 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD case WINED3DSTT_2D: texture = device->stateBlock->state.textures[sampler_idx]; - if (texture && texture->baseTexture.target == GL_TEXTURE_RECTANGLE_ARB) + if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) { tex_type = "RECT"; } else { @@ -1476,7 +1485,7 @@ static void shader_arb_get_src_param(const struct wined3d_shader_instruction *in shader_addline(buffer, "MAD T%c, %s, %s, -%s;\n", 'A' + tmpreg, regstr, two, one); break; case WINED3DSPSM_SIGNNEG: - shader_addline(buffer, "MAD T%c, %s, %s, %s;\n", 'A' + tmpreg, regstr, two, one); + shader_addline(buffer, "MAD T%c, %s, -%s, %s;\n", 'A' + tmpreg, regstr, two, one); break; case WINED3DSPSM_COMP: shader_addline(buffer, "SUB T%c, %s, %s;\n", 'A' + tmpreg, one, regstr); @@ -1579,7 +1588,6 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins) char src_name[3][50]; DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); - BOOL is_color; shader_arb_get_dst_param(ins, dst, dst_name); shader_arb_get_src_param(ins, &ins->src[1], 1, src_name[1]); @@ -1588,7 +1596,9 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins) if (shader_version <= WINED3D_SHADER_VERSION(1, 3) && ins->coissue) { shader_addline(buffer, "MOV%s %s, %s;\n", shader_arb_get_modifier(ins), dst_name, src_name[1]); - } else { + } + else + { struct wined3d_shader_src_param src0_copy = ins->src[0]; char extra_neg; @@ -1598,15 +1608,8 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins) shader_arb_get_src_param(ins, &src0_copy, 0, src_name[0]); shader_arb_get_src_param(ins, &ins->src[2], 2, src_name[2]); shader_addline(buffer, "ADD TA, %c%s, coefdiv.x;\n", extra_neg, src_name[0]); - /* No modifiers supported on CMP */ - shader_addline(buffer, "CMP %s, TA, %s, %s;\n", dst_name, src_name[1], src_name[2]); - - /* _SAT on CMP doesn't make much sense, but it is not a pure NOP */ - if(ins->dst[0].modifiers & WINED3DSPDM_SATURATE) - { - shader_arb_get_register_name(ins, &dst->reg, src_name[0], &is_color); - shader_addline(buffer, "MOV_SAT %s, %s;\n", dst_name, dst_name); - } + shader_addline(buffer, "CMP%s %s, TA, %s, %s;\n", shader_arb_get_modifier(ins), + dst_name, src_name[1], src_name[2]); } } @@ -1616,7 +1619,6 @@ static void pshader_hw_cmp(const struct wined3d_shader_instruction *ins) struct wined3d_shader_buffer *buffer = ins->ctx->buffer; char dst_name[50]; char src_name[3][50]; - BOOL is_color; shader_arb_get_dst_param(ins, dst, dst_name); @@ -1625,15 +1627,8 @@ static void pshader_hw_cmp(const struct wined3d_shader_instruction *ins) shader_arb_get_src_param(ins, &ins->src[1], 1, src_name[1]); shader_arb_get_src_param(ins, &ins->src[2], 2, src_name[2]); - /* No modifiers are supported on CMP */ - shader_addline(buffer, "CMP %s, %s, %s, %s;\n", dst_name, - src_name[0], src_name[2], src_name[1]); - - if(ins->dst[0].modifiers & WINED3DSPDM_SATURATE) - { - shader_arb_get_register_name(ins, &dst->reg, src_name[0], &is_color); - shader_addline(buffer, "MOV_SAT %s, %s;\n", dst_name, src_name[0]); - } + shader_addline(buffer, "CMP%s %s, %s, %s, %s;\n", shader_arb_get_modifier(ins), + dst_name, src_name[0], src_name[2], src_name[1]); } /** Process the WINED3DSIO_DP2ADD instruction in ARB. @@ -1747,17 +1742,20 @@ static void shader_hw_nop(const struct wined3d_shader_instruction *ins) static void shader_hw_mov(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - BOOL pshader = shader_is_pshader_version(shader->baseShader.reg_maps.shader_version.type); + struct wined3d_shader *shader = ins->ctx->shader; + const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps; + BOOL pshader = shader_is_pshader_version(reg_maps->shader_version.type); struct shader_arb_ctx_priv *ctx = ins->ctx->backend_data; - const char *zero = arb_get_helper_value(shader->baseShader.reg_maps.shader_version.type, ARB_ZERO); - const char *one = arb_get_helper_value(shader->baseShader.reg_maps.shader_version.type, ARB_ONE); - const char *two = arb_get_helper_value(shader->baseShader.reg_maps.shader_version.type, ARB_TWO); + const char *zero = arb_get_helper_value(reg_maps->shader_version.type, ARB_ZERO); + const char *one = arb_get_helper_value(reg_maps->shader_version.type, ARB_ONE); + const char *two = arb_get_helper_value(reg_maps->shader_version.type, ARB_TWO); struct wined3d_shader_buffer *buffer = ins->ctx->buffer; char src0_param[256]; - if(ins->handler_idx == WINED3DSIH_MOVA) { + if (ins->handler_idx == WINED3DSIH_MOVA) + { + const struct arb_vshader_private *shader_data = shader->backend_data; char write_mask[6]; const char *offset = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_VS_REL_OFFSET); @@ -1784,19 +1782,22 @@ static void shader_hw_mov(const struct wined3d_shader_instruction *ins) shader_addline(buffer, "ABS TA%s, %s;\n", write_mask, src0_param); shader_addline(buffer, "ADD TA%s, TA, rel_addr_const.x;\n", write_mask); shader_addline(buffer, "FLR TA%s, TA;\n", write_mask); - if (((IWineD3DVertexShaderImpl *)shader)->rel_offset) + if (shader_data->rel_offset) { shader_addline(buffer, "ADD TA%s, TA, %s;\n", write_mask, offset); } shader_addline(buffer, "MUL A0_SHADOW%s, TA, A0_SHADOW;\n", write_mask); ((struct shader_arb_ctx_priv *)ins->ctx->backend_data)->addr_reg[0] = '\0'; - } else if (ins->ctx->reg_maps->shader_version.major == 1 - && !shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type) + } + else if (reg_maps->shader_version.major == 1 + && !shader_is_pshader_version(reg_maps->shader_version.type) && ins->dst[0].reg.type == WINED3DSPR_ADDR) { + const struct arb_vshader_private *shader_data = shader->backend_data; src0_param[0] = '\0'; - if (((IWineD3DVertexShaderImpl *)shader)->rel_offset) + + if (shader_data->rel_offset) { const char *offset = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_VS_REL_OFFSET); shader_arb_get_src_param(ins, &ins->src[0], 0, src0_param); @@ -1816,8 +1817,7 @@ static void shader_hw_mov(const struct wined3d_shader_instruction *ins) } else if (ins->dst[0].reg.type == WINED3DSPR_COLOROUT && !ins->dst[0].reg.idx && pshader) { - IWineD3DPixelShaderImpl *ps = (IWineD3DPixelShaderImpl *) shader; - if(ctx->cur_ps_args->super.srgb_correction && ps->color0_mov) + if (ctx->cur_ps_args->super.srgb_correction && shader->u.ps.color0_mov) { shader_addline(buffer, "#mov handled in srgb write code\n"); return; @@ -2098,8 +2098,7 @@ static void pshader_hw_texm3x2pad(const struct wined3d_shader_instruction *ins) static void pshader_hw_texm3x2tex(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; DWORD flags; DWORD reg = ins->dst[0].reg.idx; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; @@ -2114,14 +2113,13 @@ static void pshader_hw_texm3x2tex(const struct wined3d_shader_instruction *ins) shader_arb_get_dst_param(ins, &ins->dst[0], dst_str); shader_arb_get_src_param(ins, &ins->src[0], 0, src0_name); shader_addline(buffer, "DP3 %s.y, fragment.texcoord[%u], %s;\n", dst_reg, reg, src0_name); - flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->state.texture_states[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0; + flags = reg < MAX_TEXTURES ? priv->cur_ps_args->super.tex_transform >> reg * WINED3D_PSARGS_TEXTRANSFORM_SHIFT : 0; shader_hw_sample(ins, reg, dst_str, dst_reg, flags & WINED3DTTFF_PROJECTED ? TEX_PROJ : 0, NULL, NULL); } static void pshader_hw_texm3x3pad(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - SHADER_PARSE_STATE *current_state = &shader->baseShader.parse_state; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; DWORD reg = ins->dst[0].reg.idx; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; char src0_name[50], dst_name[50]; @@ -2132,20 +2130,19 @@ static void pshader_hw_texm3x3pad(const struct wined3d_shader_instruction *ins) * incrementing ins->dst[0].register_idx numbers. So the pad instruction already knows the final destination * register, and this register is uninitialized(otherwise the assembler complains that it is 'redeclared') */ - tmp_reg.idx = reg + 2 - current_state->current_row; + tmp_reg.idx = reg + 2 - tex_mx->current_row; shader_arb_get_register_name(ins, &tmp_reg, dst_name, &is_color); shader_arb_get_src_param(ins, &ins->src[0], 0, src0_name); shader_addline(buffer, "DP3 %s.%c, fragment.texcoord[%u], %s;\n", - dst_name, 'x' + current_state->current_row, reg, src0_name); - current_state->texcoord_w[current_state->current_row++] = reg; + dst_name, 'x' + tex_mx->current_row, reg, src0_name); + tex_mx->texcoord_w[tex_mx->current_row++] = reg; } static void pshader_hw_texm3x3tex(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; - SHADER_PARSE_STATE *current_state = &shader->baseShader.parse_state; + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; DWORD flags; DWORD reg = ins->dst[0].reg.idx; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; @@ -2159,16 +2156,15 @@ static void pshader_hw_texm3x3tex(const struct wined3d_shader_instruction *ins) /* Sample the texture using the calculated coordinates */ shader_arb_get_dst_param(ins, &ins->dst[0], dst_str); - flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->state.texture_states[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0; + flags = reg < MAX_TEXTURES ? priv->cur_ps_args->super.tex_transform >> reg * WINED3D_PSARGS_TEXTRANSFORM_SHIFT : 0; shader_hw_sample(ins, reg, dst_str, dst_name, flags & WINED3DTTFF_PROJECTED ? TEX_PROJ : 0, NULL, NULL); - current_state->current_row = 0; + tex_mx->current_row = 0; } static void pshader_hw_texm3x3vspec(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; - SHADER_PARSE_STATE *current_state = &shader->baseShader.parse_state; + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; DWORD flags; DWORD reg = ins->dst[0].reg.idx; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; @@ -2185,8 +2181,8 @@ static void pshader_hw_texm3x3vspec(const struct wined3d_shader_instruction *ins shader_addline(buffer, "DP3 %s.z, fragment.texcoord[%u], %s;\n", dst_reg, reg, src0_name); /* Construct the eye-ray vector from w coordinates */ - shader_addline(buffer, "MOV TB.x, fragment.texcoord[%u].w;\n", current_state->texcoord_w[0]); - shader_addline(buffer, "MOV TB.y, fragment.texcoord[%u].w;\n", current_state->texcoord_w[1]); + shader_addline(buffer, "MOV TB.x, fragment.texcoord[%u].w;\n", tex_mx->texcoord_w[0]); + shader_addline(buffer, "MOV TB.y, fragment.texcoord[%u].w;\n", tex_mx->texcoord_w[1]); shader_addline(buffer, "MOV TB.z, fragment.texcoord[%u].w;\n", reg); /* Calculate reflection vector @@ -2201,16 +2197,15 @@ static void pshader_hw_texm3x3vspec(const struct wined3d_shader_instruction *ins /* Sample the texture using the calculated coordinates */ shader_arb_get_dst_param(ins, &ins->dst[0], dst_str); - flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->state.texture_states[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0; + flags = reg < MAX_TEXTURES ? priv->cur_ps_args->super.tex_transform >> reg * WINED3D_PSARGS_TEXTRANSFORM_SHIFT : 0; shader_hw_sample(ins, reg, dst_str, dst_reg, flags & WINED3DTTFF_PROJECTED ? TEX_PROJ : 0, NULL, NULL); - current_state->current_row = 0; + tex_mx->current_row = 0; } static void pshader_hw_texm3x3spec(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; - SHADER_PARSE_STATE *current_state = &shader->baseShader.parse_state; + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; DWORD flags; DWORD reg = ins->dst[0].reg.idx; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; @@ -2243,9 +2238,9 @@ static void pshader_hw_texm3x3spec(const struct wined3d_shader_instruction *ins) /* Sample the texture using the calculated coordinates */ shader_arb_get_dst_param(ins, &ins->dst[0], dst_str); - flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->state.texture_states[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0; + flags = reg < MAX_TEXTURES ? priv->cur_ps_args->super.tex_transform >> reg * WINED3D_PSARGS_TEXTRANSFORM_SHIFT : 0; shader_hw_sample(ins, reg, dst_str, dst_reg, flags & WINED3DTTFF_PROJECTED ? TEX_PROJ : 0, NULL, NULL); - current_state->current_row = 0; + tex_mx->current_row = 0; } static void pshader_hw_texdepth(const struct wined3d_shader_instruction *ins) @@ -2415,8 +2410,6 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins) static void shader_hw_rcp(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; - const char *flt_eps = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_EPS); char dst[50]; char src[50]; @@ -2431,23 +2424,7 @@ static void shader_hw_rcp(const struct wined3d_shader_instruction *ins) strcat(src, ".w"); } - /* TODO: If the destination is readable, and not the same as the source, the destination - * can be used instead of TA - */ - if (priv->target_version >= NV2) - { - shader_addline(buffer, "MOVC TA.x, %s;\n", src); - shader_addline(buffer, "MOV TA.x (EQ.x), %s;\n", flt_eps); - shader_addline(buffer, "RCP%s %s, TA.x;\n", shader_arb_get_modifier(ins), dst); - } - else - { - const char *zero = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_ZERO); - shader_addline(buffer, "ABS TA.x, %s;\n", src); - shader_addline(buffer, "SGE TA.y, -TA.x, %s;\n", zero); - shader_addline(buffer, "MAD TA.x, TA.y, %s, %s;\n", flt_eps, src); - shader_addline(buffer, "RCP%s %s, TA.x;\n", shader_arb_get_modifier(ins), dst); - } + shader_addline(buffer, "RCP%s %s, %s;\n", shader_arb_get_modifier(ins), dst, src); } static void shader_hw_scalar_op(const struct wined3d_shader_instruction *ins) @@ -2743,47 +2720,33 @@ static DWORD abs_modifier(DWORD mod, BOOL *need_abs) return mod; } -static void shader_hw_log_pow(const struct wined3d_shader_instruction *ins) +static void shader_hw_log(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - char src0[50], src1[50], dst[50]; + char src0[50], dst[50]; struct wined3d_shader_src_param src0_copy = ins->src[0]; BOOL need_abs = FALSE; const char *instr; - BOOL arg2 = FALSE; switch(ins->handler_idx) { case WINED3DSIH_LOG: instr = "LG2"; break; case WINED3DSIH_LOGP: instr = "LOG"; break; - case WINED3DSIH_POW: instr = "POW"; arg2 = TRUE; break; default: ERR("Unexpected instruction %d\n", ins->handler_idx); return; } - /* LOG, LOGP and POW operate on the absolute value of the input */ + /* LOG and LOGP operate on the absolute value of the input */ src0_copy.modifiers = abs_modifier(src0_copy.modifiers, &need_abs); shader_arb_get_dst_param(ins, &ins->dst[0], dst); shader_arb_get_src_param(ins, &src0_copy, 0, src0); - if(arg2) shader_arb_get_src_param(ins, &ins->src[1], 1, src1); if(need_abs) { shader_addline(buffer, "ABS TA, %s;\n", src0); - if(arg2) - { - shader_addline(buffer, "%s%s %s, TA, %s;\n", instr, shader_arb_get_modifier(ins), dst, src1); - } - else - { - shader_addline(buffer, "%s%s %s, TA;\n", instr, shader_arb_get_modifier(ins), dst); - } - } - else if(arg2) - { - shader_addline(buffer, "%s%s %s, %s, %s;\n", instr, shader_arb_get_modifier(ins), dst, src0, src1); + shader_addline(buffer, "%s%s %s, TA;\n", instr, shader_arb_get_modifier(ins), dst); } else { @@ -2791,6 +2754,48 @@ static void shader_hw_log_pow(const struct wined3d_shader_instruction *ins) } } +static void shader_hw_pow(const struct wined3d_shader_instruction *ins) +{ + struct wined3d_shader_buffer *buffer = ins->ctx->buffer; + char src0[50], src1[50], dst[50]; + struct wined3d_shader_src_param src0_copy = ins->src[0]; + BOOL need_abs = FALSE; + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; + const char *one = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_ONE); + + /* POW operates on the absolute value of the input */ + src0_copy.modifiers = abs_modifier(src0_copy.modifiers, &need_abs); + + shader_arb_get_dst_param(ins, &ins->dst[0], dst); + shader_arb_get_src_param(ins, &src0_copy, 0, src0); + shader_arb_get_src_param(ins, &ins->src[1], 1, src1); + + if (need_abs) + shader_addline(buffer, "ABS TA.x, %s;\n", src0); + else + shader_addline(buffer, "MOV TA.x, %s;\n", src0); + + if (priv->target_version >= NV2) + { + shader_addline(buffer, "MOVC TA.y, %s;\n", src1); + shader_addline(buffer, "POW%s %s, TA.x, TA.y;\n", shader_arb_get_modifier(ins), dst); + shader_addline(buffer, "MOV %s (EQ.y), %s;\n", dst, one); + } + else + { + const char *zero = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_ZERO); + const char *flt_eps = arb_get_helper_value(ins->ctx->reg_maps->shader_version.type, ARB_EPS); + + shader_addline(buffer, "ABS TA.y, %s;\n", src1); + shader_addline(buffer, "SGE TA.y, -TA.y, %s;\n", zero); + /* Possibly add flt_eps to avoid getting float special values */ + shader_addline(buffer, "MAD TA.z, TA.y, %s, %s;\n", flt_eps, src1); + shader_addline(buffer, "POW%s TA.x, TA.x, TA.z;\n", shader_arb_get_modifier(ins)); + shader_addline(buffer, "MAD TA.x, -TA.x, TA.y, TA.x;\n"); + shader_addline(buffer, "MAD %s, TA.y, %s, TA.x;\n", dst, one); + } +} + static void shader_hw_loop(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; @@ -3101,12 +3106,11 @@ static void shader_hw_label(const struct wined3d_shader_instruction *ins) shader_addline(buffer, "l%u:\n", ins->src[0].reg.idx); } -static void vshader_add_footer(IWineD3DVertexShaderImpl *This, struct wined3d_shader_buffer *buffer, - const struct arb_vs_compile_args *args, struct shader_arb_ctx_priv *priv_ctx) +static void vshader_add_footer(struct shader_arb_ctx_priv *priv_ctx, + const struct arb_vshader_private *shader_data, const struct arb_vs_compile_args *args, + const struct wined3d_shader_reg_maps *reg_maps, const struct wined3d_gl_info *gl_info, + struct wined3d_shader_buffer *buffer) { - const shader_reg_maps *reg_maps = &This->baseShader.reg_maps; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; unsigned int i; /* The D3DRS_FOGTABLEMODE render state defines if the shader-generated fog coord is used @@ -3114,35 +3118,24 @@ static void vshader_add_footer(IWineD3DVertexShaderImpl *This, struct wined3d_sh * the fog frag coord is thrown away. If the fog frag coord is used, but not written by * the shader, it is set to 0.0(fully fogged, since start = 1.0, end = 0.0) */ - if(args->super.fog_src == VS_FOG_Z) { + if (args->super.fog_src == VS_FOG_Z) shader_addline(buffer, "MOV result.fogcoord, TMP_OUT.z;\n"); - } else if (!reg_maps->fog) { - /* posFixup.x is always 1.0, so we can savely use it */ + else if (!reg_maps->fog) + /* posFixup.x is always 1.0, so we can safely use it */ shader_addline(buffer, "ADD result.fogcoord, posFixup.x, -posFixup.x;\n"); - } - /* Write the final position. - * - * OpenGL coordinates specify the center of the pixel while d3d coords specify - * the corner. The offsets are stored in z and w in posFixup. posFixup.y contains - * 1.0 or -1.0 to turn the rendering upside down for offscreen rendering. PosFixup.x - * contains 1.0 to allow a mad, but arb vs swizzles are too restricted for that. - */ - shader_addline(buffer, "MUL TA, posFixup, TMP_OUT.w;\n"); - shader_addline(buffer, "ADD TMP_OUT.x, TMP_OUT.x, TA.z;\n"); - shader_addline(buffer, "MAD TMP_OUT.y, TMP_OUT.y, posFixup.y, TA.w;\n"); - - if(use_nv_clip(gl_info) && priv_ctx->target_version >= NV2) + /* Clipplanes are always stored without y inversion */ + if (use_nv_clip(gl_info) && priv_ctx->target_version >= NV2) { - if(args->super.clip_enabled) + if (args->super.clip_enabled) { - for(i = 0; i < priv_ctx->vs_clipplanes; i++) + for (i = 0; i < priv_ctx->vs_clipplanes; i++) { shader_addline(buffer, "DP4 result.clip[%u].x, TMP_OUT, state.clip[%u].plane;\n", i, i); } } } - else if(args->clip.boolclip.clip_texcoord) + else if (args->clip.boolclip.clip_texcoord) { unsigned int cur_clip = 0; char component[4] = {'x', 'y', 'z', 'w'}; @@ -3150,13 +3143,13 @@ static void vshader_add_footer(IWineD3DVertexShaderImpl *This, struct wined3d_sh for (i = 0; i < gl_info->limits.clipplanes; ++i) { - if(args->clip.boolclip.clipplane_mask & (1 << i)) + if (args->clip.boolclip.clipplane_mask & (1 << i)) { shader_addline(buffer, "DP4 TA.%c, TMP_OUT, state.clip[%u].plane;\n", component[cur_clip++], i); } } - switch(cur_clip) + switch (cur_clip) { case 0: shader_addline(buffer, "MOV TA, %s;\n", zero); @@ -3175,13 +3168,27 @@ static void vshader_add_footer(IWineD3DVertexShaderImpl *This, struct wined3d_sh args->clip.boolclip.clip_texcoord - 1); } + /* Write the final position. + * + * OpenGL coordinates specify the center of the pixel while d3d coords specify + * the corner. The offsets are stored in z and w in posFixup. posFixup.y contains + * 1.0 or -1.0 to turn the rendering upside down for offscreen rendering. PosFixup.x + * contains 1.0 to allow a mad, but arb vs swizzles are too restricted for that. + */ + shader_addline(buffer, "MUL TA, posFixup, TMP_OUT.w;\n"); + shader_addline(buffer, "ADD TMP_OUT.x, TMP_OUT.x, TA.z;\n"); + shader_addline(buffer, "MAD TMP_OUT.y, TMP_OUT.y, posFixup.y, TA.w;\n"); + /* Z coord [0;1]->[-1;1] mapping, see comment in transform_projection in state.c * and the glsl equivalent */ - if(need_helper_const((IWineD3DBaseShaderImpl *) This, gl_info)) { + if (need_helper_const(shader_data, reg_maps, gl_info)) + { const char *two = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_TWO); shader_addline(buffer, "MAD TMP_OUT.z, TMP_OUT.z, %s, -TMP_OUT.w;\n", two); - } else { + } + else + { shader_addline(buffer, "ADD TMP_OUT.z, TMP_OUT.z, TMP_OUT.z;\n"); shader_addline(buffer, "ADD TMP_OUT.z, TMP_OUT.z, -TMP_OUT.w;\n"); } @@ -3195,14 +3202,15 @@ static void shader_hw_ret(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *) ins->ctx->shader; + struct wined3d_shader *shader = ins->ctx->shader; BOOL vshader = shader_is_vshader_version(ins->ctx->reg_maps->shader_version.type); if(priv->target_version == ARB) return; if(vshader) { - if(priv->in_main_func) vshader_add_footer((IWineD3DVertexShaderImpl *) shader, buffer, priv->cur_vs_args, priv); + if (priv->in_main_func) vshader_add_footer(priv, shader->backend_data, + priv->cur_vs_args, ins->ctx->reg_maps, ins->ctx->gl_info, buffer); } shader_addline(buffer, "RET;\n"); @@ -3401,11 +3409,11 @@ static void arbfp_add_sRGB_correction(struct wined3d_shader_buffer *buffer, cons /* [0.0;1.0] clamping. Not needed, this is done implicitly */ } -static const DWORD *find_loop_control_values(IWineD3DBaseShaderImpl *This, DWORD idx) +static const DWORD *find_loop_control_values(const struct wined3d_shader *shader, DWORD idx) { const local_constant *constant; - LIST_FOR_EACH_ENTRY(constant, &This->baseShader.constantsI, local_constant, entry) + LIST_FOR_EACH_ENTRY(constant, &shader->constantsI, local_constant, entry) { if (constant->idx == idx) { @@ -3415,8 +3423,8 @@ static const DWORD *find_loop_control_values(IWineD3DBaseShaderImpl *This, DWORD return NULL; } -static void init_ps_input(const IWineD3DPixelShaderImpl *This, const struct arb_ps_compile_args *args, - struct shader_arb_ctx_priv *priv) +static void init_ps_input(const struct wined3d_shader *shader, + const struct arb_ps_compile_args *args, struct shader_arb_ctx_priv *priv) { static const char * const texcoords[8] = { @@ -3424,7 +3432,7 @@ static void init_ps_input(const IWineD3DPixelShaderImpl *This, const struct arb_ "fragment.texcoord[4]", "fragment.texcoord[5]", "fragment.texcoord[6]", "fragment.texcoord[7]" }; unsigned int i; - const struct wined3d_shader_signature_element *sig = This->baseShader.input_signature; + const struct wined3d_shader_signature_element *sig = shader->input_signature; const char *semantic_name; DWORD semantic_idx; @@ -3490,20 +3498,20 @@ static void init_ps_input(const IWineD3DPixelShaderImpl *This, const struct arb_ } /* GL locking is done by the caller */ -static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct wined3d_shader_buffer *buffer, +static GLuint shader_arb_generate_pshader(struct wined3d_shader *shader, + const struct wined3d_gl_info *gl_info, struct wined3d_shader_buffer *buffer, const struct arb_ps_compile_args *args, struct arb_ps_compiled_shader *compiled) { - const shader_reg_maps* reg_maps = &This->baseShader.reg_maps; - CONST DWORD *function = This->baseShader.function; - const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info; + const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; + const DWORD *function = shader->function; const local_constant *lconst; GLuint retval; char fragcolor[16]; - DWORD *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This), next_local, cur; + DWORD *lconst_map = local_const_mapping(shader), next_local; struct shader_arb_ctx_priv priv_ctx; BOOL dcl_td = FALSE; BOOL want_nv_prog = FALSE; - struct arb_pshader_private *shader_priv = This->baseShader.backend_data; + struct arb_pshader_private *shader_priv = shader->backend_data; GLint errPos; DWORD map; @@ -3513,7 +3521,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct for (i = 0, map = reg_maps->temporary; map; map >>= 1, ++i) { if (!(map & 1) - || (This->color0_mov && i == This->color0_reg) + || (shader->u.ps.color0_mov && i == shader->u.ps.color0_reg) || (reg_maps->shader_version.major < 2 && !i)) continue; @@ -3551,7 +3559,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct priv_ctx.cur_ps_args = args; priv_ctx.compiled_fprog = compiled; priv_ctx.cur_np2fixup_info = &compiled->np2fixup_info; - init_ps_input(This, args, &priv_ctx); + init_ps_input(shader, args, &priv_ctx); list_init(&priv_ctx.control_frames); /* Avoid enabling NV_fragment_program* if we do not need it. @@ -3593,7 +3601,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct priv_ctx.target_version = ARB; } - if(This->baseShader.reg_maps.highest_render_target > 0) + if (reg_maps->rt_mask > 1) { shader_addline(buffer, "OPTION ARB_draw_buffers;\n"); } @@ -3630,11 +3638,17 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct if (reg_maps->shader_version.major < 2) { strcpy(fragcolor, "R0"); - } else { - if(args->super.srgb_correction) { - if(This->color0_mov) { - sprintf(fragcolor, "R%u", This->color0_reg); - } else { + } + else + { + if (args->super.srgb_correction) + { + if (shader->u.ps.color0_mov) + { + sprintf(fragcolor, "R%u", shader->u.ps.color0_reg); + } + else + { shader_addline(buffer, "TEMP TMP_COLOR;\n"); strcpy(fragcolor, "TMP_COLOR"); } @@ -3651,18 +3665,20 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct } /* Base Declarations */ - next_local = shader_generate_arb_declarations((IWineD3DBaseShader *)This, - reg_maps, buffer, gl_info, lconst_map, NULL, &priv_ctx); + next_local = shader_generate_arb_declarations(shader, reg_maps, + buffer, gl_info, lconst_map, NULL, &priv_ctx); for (i = 0, map = reg_maps->bumpmat; map; map >>= 1, ++i) { + unsigned char bump_const; + if (!(map & 1)) continue; - cur = compiled->numbumpenvmatconsts; - compiled->bumpenvmatconst[cur].const_num = WINED3D_CONST_NUM_UNUSED; - compiled->bumpenvmatconst[cur].texunit = i; - compiled->luminanceconst[cur].const_num = WINED3D_CONST_NUM_UNUSED; - compiled->luminanceconst[cur].texunit = i; + bump_const = compiled->numbumpenvmatconsts; + compiled->bumpenvmatconst[bump_const].const_num = WINED3D_CONST_NUM_UNUSED; + compiled->bumpenvmatconst[bump_const].texunit = i; + compiled->luminanceconst[bump_const].const_num = WINED3D_CONST_NUM_UNUSED; + compiled->luminanceconst[bump_const].texunit = i; /* We can fit the constants into the constant limit for sure because texbem, texbeml, bem and beml are only supported * in 1.x shaders, and GL_ARB_fragment_program has a constant limit of 24 constants. So in the worst case we're loading @@ -3673,16 +3689,16 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct * shaders in newer shader models. Since the bump env parameters have to share their space with NP2 fixup constants, * their location is shader dependent anyway and they cannot be loaded globally. */ - compiled->bumpenvmatconst[cur].const_num = next_local++; + compiled->bumpenvmatconst[bump_const].const_num = next_local++; shader_addline(buffer, "PARAM bumpenvmat%d = program.local[%d];\n", - i, compiled->bumpenvmatconst[cur].const_num); - compiled->numbumpenvmatconsts = cur + 1; + i, compiled->bumpenvmatconst[bump_const].const_num); + compiled->numbumpenvmatconsts = bump_const + 1; if (!(reg_maps->luminanceparams & (1 << i))) continue; - compiled->luminanceconst[cur].const_num = next_local++; + compiled->luminanceconst[bump_const].const_num = next_local++; shader_addline(buffer, "PARAM luminance%d = program.local[%d];\n", - i, compiled->luminanceconst[cur].const_num); + i, compiled->luminanceconst[bump_const].const_num); } for(i = 0; i < MAX_CONST_I; i++) @@ -3690,7 +3706,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct compiled->int_consts[i] = WINED3D_CONST_NUM_UNUSED; if (reg_maps->integer_constants & (1 << i) && priv_ctx.target_version >= NV2) { - const DWORD *control_values = find_loop_control_values((IWineD3DBaseShaderImpl *) This, i); + const DWORD *control_values = find_loop_control_values(shader, i); if(control_values) { @@ -3735,6 +3751,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct * applied / activated. This will probably result in wrong rendering of the texture, but will save us from * shader compilation errors and the subsequent errors when drawing with this shader. */ if (priv_ctx.cur_ps_args->super.np2_fixup) { + unsigned char cur_fixup_sampler = 0; struct arb_ps_np2fixup_info* const fixup = priv_ctx.cur_np2fixup_info; const WORD map = priv_ctx.cur_ps_args->super.np2_fixup; @@ -3743,13 +3760,12 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct fixup->offset = next_local; fixup->super.active = 0; - cur = 0; for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) { if (!(map & (1 << i))) continue; - if (fixup->offset + (cur >> 1) < max_lconsts) { + if (fixup->offset + (cur_fixup_sampler >> 1) < max_lconsts) { fixup->super.active |= (1 << i); - fixup->super.idx[i] = cur++; + fixup->super.idx[i] = cur_fixup_sampler++; } else { FIXME("No free constant found to load NP2 fixup data into shader. " "Sampling from this texture will probably look wrong.\n"); @@ -3757,7 +3773,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct } } - fixup->super.num_consts = (cur + 1) >> 1; + fixup->super.num_consts = (cur_fixup_sampler + 1) >> 1; if (fixup->super.num_consts) { shader_addline(buffer, "PARAM np2fixup[%u] = { program.env[%u..%u] };\n", fixup->super.num_consts, fixup->offset, fixup->super.num_consts + fixup->offset - 1); @@ -3772,7 +3788,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct } /* Base Shader Body */ - shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function, &priv_ctx); + shader_generate_main(shader, buffer, reg_maps, function, &priv_ctx); if(args->super.srgb_correction) { arbfp_add_sRGB_correction(buffer, fragcolor, srgbtmp[0], srgbtmp[1], srgbtmp[2], srgbtmp[3], @@ -3814,8 +3830,10 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct } /* Load immediate constants */ - if(lconst_map) { - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { + if (lconst_map) + { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { const float *value = (const float *)lconst->value; GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, lconst_map[lconst->idx], value)); checkGLcall("glProgramLocalParameter4fvARB"); @@ -3843,7 +3861,7 @@ static int compare_sig(const struct wined3d_shader_signature_element *sig1, cons if ((ret = strcmp(sig1[i].semantic_name, sig2[i].semantic_name))) return ret; if(sig1[i].semantic_idx != sig2[i].semantic_idx) return sig1[i].semantic_idx < sig2[i].semantic_idx ? -1 : 1; if(sig1[i].sysval_semantic != sig2[i].sysval_semantic) return sig1[i].sysval_semantic < sig2[i].sysval_semantic ? -1 : 1; - if(sig1[i].component_type != sig2[i].component_type) return sig1[i].sysval_semantic < sig2[i].component_type ? -1 : 1; + if(sig1[i].component_type != sig2[i].component_type) return sig1[i].component_type < sig2[i].component_type ? -1 : 1; if(sig1[i].register_idx != sig2[i].register_idx) return sig1[i].register_idx < sig2[i].register_idx ? -1 : 1; if(sig1[i].mask != sig2->mask) return sig1[i].mask < sig2[i].mask ? -1 : 1; } @@ -3892,8 +3910,8 @@ static DWORD find_input_signature(struct shader_arb_priv *priv, const struct win return found_sig->idx; } -static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_num, struct shader_arb_ctx_priv *priv_ctx, - struct arb_vs_compiled_shader *compiled) +static void init_output_registers(struct wined3d_shader *shader, DWORD sig_num, + struct shader_arb_ctx_priv *priv_ctx, struct arb_vs_compiled_shader *compiled) { unsigned int i, j; static const char * const texcoords[8] = @@ -3901,8 +3919,7 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu "result.texcoord[0]", "result.texcoord[1]", "result.texcoord[2]", "result.texcoord[3]", "result.texcoord[4]", "result.texcoord[5]", "result.texcoord[6]", "result.texcoord[7]" }; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) shader->baseShader.device; - IWineD3DBaseShaderClass *baseshader = &shader->baseShader; + struct wined3d_device *device = shader->device; const struct wined3d_shader_signature_element *sig; const char *semantic_name; DWORD semantic_idx, reg_idx; @@ -3930,42 +3947,42 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu priv_ctx->fog_output = "result.fogcoord"; /* Map declared regs to builtins. Use "TA" to /dev/null unread output */ - for (i = 0; i < (sizeof(baseshader->output_signature) / sizeof(*baseshader->output_signature)); ++i) + for (i = 0; i < (sizeof(shader->output_signature) / sizeof(*shader->output_signature)); ++i) { - semantic_name = baseshader->output_signature[i].semantic_name; + semantic_name = shader->output_signature[i].semantic_name; if (!semantic_name) continue; if(shader_match_semantic(semantic_name, WINED3DDECLUSAGE_POSITION)) { TRACE("o%u is TMP_OUT\n", i); - if (!baseshader->output_signature[i].semantic_idx) priv_ctx->vs_output[i] = "TMP_OUT"; + if (!shader->output_signature[i].semantic_idx) priv_ctx->vs_output[i] = "TMP_OUT"; else priv_ctx->vs_output[i] = "TA"; } else if(shader_match_semantic(semantic_name, WINED3DDECLUSAGE_PSIZE)) { TRACE("o%u is result.pointsize\n", i); - if (!baseshader->output_signature[i].semantic_idx) priv_ctx->vs_output[i] = "result.pointsize"; + if (!shader->output_signature[i].semantic_idx) priv_ctx->vs_output[i] = "result.pointsize"; else priv_ctx->vs_output[i] = "TA"; } else if(shader_match_semantic(semantic_name, WINED3DDECLUSAGE_COLOR)) { - TRACE("o%u is result.color.?, idx %u\n", i, baseshader->output_signature[i].semantic_idx); - if (!baseshader->output_signature[i].semantic_idx) + TRACE("o%u is result.color.?, idx %u\n", i, shader->output_signature[i].semantic_idx); + if (!shader->output_signature[i].semantic_idx) priv_ctx->vs_output[i] = "result.color.primary"; - else if (baseshader->output_signature[i].semantic_idx == 1) + else if (shader->output_signature[i].semantic_idx == 1) priv_ctx->vs_output[i] = "result.color.secondary"; else priv_ctx->vs_output[i] = "TA"; } else if(shader_match_semantic(semantic_name, WINED3DDECLUSAGE_TEXCOORD)) { - TRACE("o%u is %s\n", i, texcoords[baseshader->output_signature[i].semantic_idx]); - if (baseshader->output_signature[i].semantic_idx >= 8) priv_ctx->vs_output[i] = "TA"; - else priv_ctx->vs_output[i] = texcoords[baseshader->output_signature[i].semantic_idx]; + TRACE("o%u is %s\n", i, texcoords[shader->output_signature[i].semantic_idx]); + if (shader->output_signature[i].semantic_idx >= 8) priv_ctx->vs_output[i] = "TA"; + else priv_ctx->vs_output[i] = texcoords[shader->output_signature[i].semantic_idx]; } else if(shader_match_semantic(semantic_name, WINED3DDECLUSAGE_FOG)) { TRACE("o%u is result.fogcoord\n", i); - if (baseshader->output_signature[i].semantic_idx > 0) priv_ctx->vs_output[i] = "TA"; + if (shader->output_signature[i].semantic_idx > 0) priv_ctx->vs_output[i] = "TA"; else priv_ctx->vs_output[i] = "result.fogcoord"; } else @@ -3979,7 +3996,7 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu /* Instead of searching for the signature in the signature list, read the one from the current pixel shader. * Its maybe not the shader where the signature came from, but it is the same signature and faster to find */ - sig = device->stateBlock->state.pixel_shader->baseShader.input_signature; + sig = device->stateBlock->state.pixel_shader->input_signature; TRACE("Pixel shader uses declared varyings\n"); /* Map builtin to declared. /dev/null the results by default to the TA temp reg */ @@ -4029,21 +4046,21 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu } /* Map declared to declared */ - for (i = 0; i < (sizeof(baseshader->output_signature) / sizeof(*baseshader->output_signature)); ++i) + for (i = 0; i < (sizeof(shader->output_signature) / sizeof(*shader->output_signature)); ++i) { /* Write unread output to TA to throw them away */ priv_ctx->vs_output[i] = "TA"; - semantic_name = baseshader->output_signature[i].semantic_name; + semantic_name = shader->output_signature[i].semantic_name; if (!semantic_name) continue; if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_POSITION) - && !baseshader->output_signature[i].semantic_idx) + && !shader->output_signature[i].semantic_idx) { priv_ctx->vs_output[i] = "TMP_OUT"; continue; } else if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_PSIZE) - && !baseshader->output_signature[i].semantic_idx) + && !shader->output_signature[i].semantic_idx) { priv_ctx->vs_output[i] = "result.pointsize"; continue; @@ -4054,7 +4071,7 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu if (!sig[j].semantic_name) continue; if (!strcmp(sig[j].semantic_name, semantic_name) - && sig[j].semantic_idx == baseshader->output_signature[i].semantic_idx) + && sig[j].semantic_idx == shader->output_signature[i].semantic_idx) { priv_ctx->vs_output[i] = decl_idx_to_string[sig[j].register_idx]; @@ -4069,16 +4086,16 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu } /* GL locking is done by the caller */ -static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct wined3d_shader_buffer *buffer, +static GLuint shader_arb_generate_vshader(struct wined3d_shader *shader, + const struct wined3d_gl_info *gl_info, struct wined3d_shader_buffer *buffer, const struct arb_vs_compile_args *args, struct arb_vs_compiled_shader *compiled) { - const shader_reg_maps *reg_maps = &This->baseShader.reg_maps; - CONST DWORD *function = This->baseShader.function; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct arb_vshader_private *shader_data = shader->backend_data; + const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; + const DWORD *function = shader->function; const local_constant *lconst; GLuint ret; - DWORD next_local, *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This); + DWORD next_local, *lconst_map = local_const_mapping(shader); struct shader_arb_ctx_priv priv_ctx; unsigned int i; GLint errPos; @@ -4086,7 +4103,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct memset(&priv_ctx, 0, sizeof(priv_ctx)); priv_ctx.cur_vs_args = args; list_init(&priv_ctx.control_frames); - init_output_registers(This, args->ps_signature, &priv_ctx, compiled); + init_output_registers(shader, args->ps_signature, &priv_ctx, compiled); /* Create the hw ARB shader */ shader_addline(buffer, "!!ARBvp1.0\n"); @@ -4110,26 +4127,29 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct } shader_addline(buffer, "TEMP TMP_OUT;\n"); - if(need_helper_const((IWineD3DBaseShaderImpl *) This, gl_info)) { + if (need_helper_const(shader_data, reg_maps, gl_info)) + { shader_addline(buffer, "PARAM helper_const = { 0.0, 1.0, 2.0, %1.10f};\n", eps); } - if(need_rel_addr_const((IWineD3DBaseShaderImpl *) This, gl_info)) { - shader_addline(buffer, "PARAM rel_addr_const = { 0.5, %d.0, 0.0, 0.0 };\n", This->rel_offset); + if (need_rel_addr_const(shader_data, reg_maps, gl_info)) + { + shader_addline(buffer, "PARAM rel_addr_const = { 0.5, %d.0, 0.0, 0.0 };\n", shader_data->rel_offset); shader_addline(buffer, "TEMP A0_SHADOW;\n"); } shader_addline(buffer, "TEMP TA;\n"); + shader_addline(buffer, "TEMP TB;\n"); /* Base Declarations */ - next_local = shader_generate_arb_declarations((IWineD3DBaseShader *)This, - reg_maps, buffer, gl_info, lconst_map, &priv_ctx.vs_clipplanes, &priv_ctx); + next_local = shader_generate_arb_declarations(shader, reg_maps, buffer, + gl_info, lconst_map, &priv_ctx.vs_clipplanes, &priv_ctx); for(i = 0; i < MAX_CONST_I; i++) { compiled->int_consts[i] = WINED3D_CONST_NUM_UNUSED; if(reg_maps->integer_constants & (1 << i) && priv_ctx.target_version >= NV2) { - const DWORD *control_values = find_loop_control_values((IWineD3DBaseShaderImpl *) This, i); + const DWORD *control_values = find_loop_control_values(shader, i); if(control_values) { @@ -4162,6 +4182,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct */ if (!gl_info->supported[NV_VERTEX_PROGRAM]) { + struct wined3d_device *device = shader->device; const char *color_init = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_0001); shader_addline(buffer, "MOV result.color.secondary, %s;\n", color_init); @@ -4171,8 +4192,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct const char *one = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_ONE); for(i = 0; i < min(8, MAX_REG_TEXCRD); i++) { - if (This->baseShader.reg_maps.texcoord_mask[i] - && This->baseShader.reg_maps.texcoord_mask[i] != WINED3DSP_WRITEMASK_ALL) + if (reg_maps->texcoord_mask[i] && reg_maps->texcoord_mask[i] != WINED3DSP_WRITEMASK_ALL) shader_addline(buffer, "MOV result.texcoord[%u].w, %s\n", i, one); } } @@ -4181,9 +4201,10 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct /* The shader starts with the main function */ priv_ctx.in_main_func = TRUE; /* Base Shader Body */ - shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function, &priv_ctx); + shader_generate_main(shader, buffer, reg_maps, function, &priv_ctx); - if(!priv_ctx.footer_written) vshader_add_footer(This, buffer, args, &priv_ctx); + if (!priv_ctx.footer_written) vshader_add_footer(&priv_ctx, + shader_data, args, reg_maps, gl_info, buffer); shader_addline(buffer, "END\n"); @@ -4216,8 +4237,10 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct if (!native) WARN("Program exceeds native resource limits.\n"); /* Load immediate constants */ - if(lconst_map) { - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { + if (lconst_map) + { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { const float *value = (const float *)lconst->value; GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, lconst_map[lconst->idx], value)); } @@ -4229,9 +4252,11 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct } /* GL locking is done by the caller */ -static struct arb_ps_compiled_shader *find_arb_pshader(IWineD3DPixelShaderImpl *shader, const struct arb_ps_compile_args *args) +static struct arb_ps_compiled_shader *find_arb_pshader(struct wined3d_shader *shader, + const struct arb_ps_compile_args *args) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)shader->baseShader.device; + struct wined3d_device *device = shader->device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; UINT i; DWORD new_size; struct arb_ps_compiled_shader *new_array; @@ -4239,28 +4264,29 @@ static struct arb_ps_compiled_shader *find_arb_pshader(IWineD3DPixelShaderImpl * struct arb_pshader_private *shader_data; GLuint ret; - if (!shader->baseShader.backend_data) + if (!shader->backend_data) { - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct shader_arb_priv *priv = device->shader_priv; - shader->baseShader.backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); - shader_data = shader->baseShader.backend_data; - shader_data->clamp_consts = shader->baseShader.reg_maps.shader_version.major == 1; + shader->backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); + shader_data = shader->backend_data; + shader_data->clamp_consts = shader->reg_maps.shader_version.major == 1; - if(shader->baseShader.reg_maps.shader_version.major < 3) shader_data->input_signature_idx = ~0; - else shader_data->input_signature_idx = find_input_signature(priv, shader->baseShader.input_signature); + if (shader->reg_maps.shader_version.major < 3) + shader_data->input_signature_idx = ~0; + else + shader_data->input_signature_idx = find_input_signature(priv, shader->input_signature); shader_data->has_signature_idx = TRUE; TRACE("Shader got assigned input signature index %u\n", shader_data->input_signature_idx); if (!device->vs_clipping) - shader_data->clipplane_emulation = shader_find_free_input_register(&shader->baseShader.reg_maps, + shader_data->clipplane_emulation = shader_find_free_input_register(&shader->reg_maps, gl_info->limits.texture_stages - 1); else shader_data->clipplane_emulation = ~0U; } - shader_data = shader->baseShader.backend_data; + shader_data = shader->backend_data; /* Usually we have very few GL shaders for each d3d shader(just 1 or maybe 2), * so a linear search is more performant than a hashmap or a binary search @@ -4294,8 +4320,7 @@ static struct arb_ps_compiled_shader *find_arb_pshader(IWineD3DPixelShaderImpl * shader_data->gl_shaders[shader_data->num_gl_shaders].args = *args; - pixelshader_update_samplers(&shader->baseShader.reg_maps, - (IWineD3DBaseTexture **)device->stateBlock->state.textures); + pixelshader_update_samplers(&shader->reg_maps, device->stateBlock->state.textures); if (!shader_buffer_init(&buffer)) { @@ -4303,8 +4328,8 @@ static struct arb_ps_compiled_shader *find_arb_pshader(IWineD3DPixelShaderImpl * return 0; } - ret = shader_arb_generate_pshader(shader, &buffer, args, - &shader_data->gl_shaders[shader_data->num_gl_shaders]); + ret = shader_arb_generate_pshader(shader, gl_info, &buffer, args, + &shader_data->gl_shaders[shader_data->num_gl_shaders]); shader_buffer_free(&buffer); shader_data->gl_shaders[shader_data->num_gl_shaders].prgId = ret; @@ -4324,22 +4349,42 @@ static inline BOOL vs_args_equal(const struct arb_vs_compile_args *stored, const return !memcmp(stored->loop_ctrl, new->loop_ctrl, sizeof(stored->loop_ctrl)); } -static struct arb_vs_compiled_shader *find_arb_vshader(IWineD3DVertexShaderImpl *shader, const struct arb_vs_compile_args *args) +static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *shader, + const struct arb_vs_compile_args *args) { + struct wined3d_device *device = shader->device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + DWORD use_map = device->strided_streams.use_map; UINT i; DWORD new_size; struct arb_vs_compiled_shader *new_array; - DWORD use_map = ((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.use_map; struct wined3d_shader_buffer buffer; struct arb_vshader_private *shader_data; GLuint ret; - const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)shader->baseShader.device)->adapter->gl_info; - if (!shader->baseShader.backend_data) + if (!shader->backend_data) { - shader->baseShader.backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); + const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; + + shader->backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); + shader_data = shader->backend_data; + + if ((gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT) + && reg_maps->min_rel_offset <= reg_maps->max_rel_offset) + { + if (reg_maps->max_rel_offset - reg_maps->min_rel_offset > 127) + { + FIXME("The difference between the minimum and maximum relative offset is > 127.\n"); + FIXME("Which this OpenGL implementation does not support. Try using GLSL.\n"); + FIXME("Min: %u, Max: %u.\n", reg_maps->min_rel_offset, reg_maps->max_rel_offset); + } + else if (reg_maps->max_rel_offset - reg_maps->min_rel_offset > 63) + shader_data->rel_offset = reg_maps->min_rel_offset + 63; + else if (reg_maps->max_rel_offset > 63) + shader_data->rel_offset = reg_maps->min_rel_offset; + } } - shader_data = shader->baseShader.backend_data; + shader_data = shader->backend_data; /* Usually we have very few GL shaders for each d3d shader(just 1 or maybe 2), * so a linear search is more performant than a hashmap or a binary search @@ -4382,7 +4427,7 @@ static struct arb_vs_compiled_shader *find_arb_vshader(IWineD3DVertexShaderImpl return 0; } - ret = shader_arb_generate_vshader(shader, &buffer, args, + ret = shader_arb_generate_vshader(shader, gl_info, &buffer, args, &shader_data->gl_shaders[shader_data->num_gl_shaders]); shader_buffer_free(&buffer); shader_data->gl_shaders[shader_data->num_gl_shaders].prgId = ret; @@ -4391,16 +4436,17 @@ static struct arb_vs_compiled_shader *find_arb_vshader(IWineD3DVertexShaderImpl } static void find_arb_ps_compile_args(const struct wined3d_state *state, - IWineD3DPixelShaderImpl *shader, struct arb_ps_compile_args *args) + const struct wined3d_shader *shader, struct arb_ps_compile_args *args) { + struct wined3d_device *device = shader->device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; int i; WORD int_skip; - const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)shader->baseShader.device)->adapter->gl_info; find_ps_compile_args(state, shader, &args->super); /* This forces all local boolean constants to 1 to make them stateblock independent */ - args->bools = shader->baseShader.reg_maps.local_bool_consts; + args->bools = shader->reg_maps.local_bool_consts; for(i = 0; i < MAX_CONST_B; i++) { @@ -4412,7 +4458,7 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state, * is quite expensive because it forces the driver to disable early Z discards. It is cheaper to * duplicate the shader than have a no-op KIL instruction in every shader */ - if ((!((IWineD3DDeviceImpl *)shader->baseShader.device)->vs_clipping) && use_vs(state) + if (!device->vs_clipping && use_vs(state) && state->render_states[WINED3DRS_CLIPPING] && state->render_states[WINED3DRS_CLIPPLANEENABLE]) args->clip = 1; @@ -4420,7 +4466,7 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state, args->clip = 0; /* Skip if unused or local, or supported natively */ - int_skip = ~shader->baseShader.reg_maps.integer_constants | shader->baseShader.reg_maps.local_int_consts; + int_skip = ~shader->reg_maps.integer_constants | shader->reg_maps.local_int_consts; if (int_skip == 0xffff || gl_info->supported[NV_FRAGMENT_PROGRAM_OPTION]) { memset(&args->loop_ctrl, 0, sizeof(args->loop_ctrl)); @@ -4445,20 +4491,20 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state, } static void find_arb_vs_compile_args(const struct wined3d_state *state, - IWineD3DVertexShaderImpl *shader, struct arb_vs_compile_args *args) + const struct wined3d_shader *shader, struct arb_vs_compile_args *args) { + struct wined3d_device *device = shader->device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; int i; WORD int_skip; - IWineD3DDeviceImpl *dev = (IWineD3DDeviceImpl *)shader->baseShader.device; - const struct wined3d_gl_info *gl_info = &dev->adapter->gl_info; find_vs_compile_args(state, shader, &args->super); args->clip.boolclip_compare = 0; if (use_ps(state)) { - IWineD3DPixelShaderImpl *ps = state->pixel_shader; - struct arb_pshader_private *shader_priv = ps->baseShader.backend_data; + const struct wined3d_shader *ps = state->pixel_shader; + const struct arb_pshader_private *shader_priv = ps->backend_data; args->ps_signature = shader_priv->input_signature_idx; args->clip.boolclip.clip_texcoord = shader_priv->clipplane_emulation + 1; @@ -4466,7 +4512,7 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state, else { args->ps_signature = ~0; - if(!dev->vs_clipping) + if (!device->vs_clipping) { args->clip.boolclip.clip_texcoord = ffp_clip_emul(state) ? gl_info->limits.texture_stages : 0; } @@ -4481,7 +4527,7 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state, } /* This forces all local boolean constants to 1 to make them stateblock independent */ - args->clip.boolclip.bools = shader->baseShader.reg_maps.local_bool_consts; + args->clip.boolclip.bools = shader->reg_maps.local_bool_consts; /* TODO: Figure out if it would be better to store bool constants as bitmasks in the stateblock */ for(i = 0; i < MAX_CONST_B; i++) { @@ -4489,13 +4535,13 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state, args->clip.boolclip.bools |= ( 1 << i); } - args->vertex.samplers[0] = dev->texUnitMap[MAX_FRAGMENT_SAMPLERS + 0]; - args->vertex.samplers[1] = dev->texUnitMap[MAX_FRAGMENT_SAMPLERS + 1]; - args->vertex.samplers[2] = dev->texUnitMap[MAX_FRAGMENT_SAMPLERS + 2]; + args->vertex.samplers[0] = device->texUnitMap[MAX_FRAGMENT_SAMPLERS + 0]; + args->vertex.samplers[1] = device->texUnitMap[MAX_FRAGMENT_SAMPLERS + 1]; + args->vertex.samplers[2] = device->texUnitMap[MAX_FRAGMENT_SAMPLERS + 2]; args->vertex.samplers[3] = 0; /* Skip if unused or local */ - int_skip = ~shader->baseShader.reg_maps.integer_constants | shader->baseShader.reg_maps.local_int_consts; + int_skip = ~shader->reg_maps.integer_constants | shader->reg_maps.local_int_consts; /* This is about flow control, not clipping. */ if (int_skip == 0xffff || gl_info->supported[NV_VERTEX_PROGRAM2_OPTION]) { @@ -4523,16 +4569,16 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state, /* GL locking is done by the caller */ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) { - IWineD3DDeviceImpl *This = context->swapchain->device; - struct shader_arb_priv *priv = This->shader_priv; + struct wined3d_device *device = context->swapchain->device; + struct shader_arb_priv *priv = device->shader_priv; const struct wined3d_gl_info *gl_info = context->gl_info; - const struct wined3d_state *state = &This->stateBlock->state; + const struct wined3d_state *state = &device->stateBlock->state; int i; /* Deal with pixel shaders first so the vertex shader arg function has the input signature ready */ if (usePS) { - IWineD3DPixelShaderImpl *ps = state->pixel_shader; + struct wined3d_shader *ps = state->pixel_shader; struct arb_ps_compile_args compile_args; struct arb_ps_compiled_shader *compiled; @@ -4551,15 +4597,16 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, glEnable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB);"); } - TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n", This, priv->current_fprogram_id); + TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n", + device, priv->current_fprogram_id); /* Pixel Shader 1.x constants are clamped to [-1;1], Pixel Shader 2.0 constants are not. If switching between * a 1.x and newer shader, reload the first 8 constants */ - if(priv->last_ps_const_clamped != ((struct arb_pshader_private *)ps->baseShader.backend_data)->clamp_consts) + if (priv->last_ps_const_clamped != ((struct arb_pshader_private *)ps->backend_data)->clamp_consts) { - priv->last_ps_const_clamped = ((struct arb_pshader_private *)ps->baseShader.backend_data)->clamp_consts; - This->highest_dirty_ps_const = max(This->highest_dirty_ps_const, 8); + priv->last_ps_const_clamped = ((struct arb_pshader_private *)ps->backend_data)->clamp_consts; + device->highest_dirty_ps_const = max(device->highest_dirty_ps_const, 8); for(i = 0; i < 8; i++) { context->pshader_const_dirty[i] = 1; @@ -4569,12 +4616,13 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, } else { - shader_arb_ps_local_constants(This); + UINT rt_height = device->fb.render_targets[0]->resource.height; + shader_arb_ps_local_constants(compiled, context, state, rt_height); } /* Force constant reloading for the NP2 fixup (see comment in shader_glsl_select for more info) */ if (compiled->np2fixup_info.super.active) - shader_arb_load_np2fixup_constants((IWineD3DDevice *)This, usePS, useVS); + shader_arb_load_np2fixup_constants(priv, gl_info, state); } else if (gl_info->supported[ARB_FRAGMENT_PROGRAM] && !priv->use_arbfp_fixed_func) { @@ -4589,7 +4637,7 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, if (useVS) { - IWineD3DVertexShaderImpl *vs = state->vertex_shader; + struct wined3d_shader *vs = state->vertex_shader; struct arb_vs_compile_args compile_args; struct arb_vs_compiled_shader *compiled; @@ -4606,8 +4654,8 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, /* Enable OpenGL vertex programs */ glEnable(GL_VERTEX_PROGRAM_ARB); checkGLcall("glEnable(GL_VERTEX_PROGRAM_ARB);"); - TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", This, priv->current_vprogram_id); - shader_arb_vs_local_constants(This); + TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", device, priv->current_vprogram_id); + shader_arb_vs_local_constants(compiled, context, state); if(priv->last_vs_color_unclamp != compiled->need_color_unclamp) { priv->last_vs_color_unclamp = compiled->need_color_unclamp; @@ -4630,13 +4678,12 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, } /* GL locking is done by the caller */ -static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size) +static void shader_arb_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info, + enum tex_types tex_type, const SIZE *ds_mask_size) { const float mask[] = {0.0f, 0.0f, (float)ds_mask_size->cx, (float)ds_mask_size->cy}; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; BOOL masked = ds_mask_size->cx && ds_mask_size->cy; - struct shader_arb_priv *priv = This->shader_priv; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; + struct shader_arb_priv *priv = shader_priv; GLuint *blt_fprogram; if (!priv->depth_blt_vprogram_id) priv->depth_blt_vprogram_id = create_arb_blt_vertex_program(gl_info); @@ -4651,17 +4698,18 @@ static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types te } /* GL locking is done by the caller */ -static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - struct shader_arb_priv *priv = This->shader_priv; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; +static void shader_arb_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info) +{ + struct shader_arb_priv *priv = shader_priv; if (priv->current_vprogram_id) { GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id)); checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, vertexShader->prgId);"); - TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", This, priv->current_vprogram_id); - } else { + TRACE("Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB.\n", priv->current_vprogram_id); + } + else + { glDisable(GL_VERTEX_PROGRAM_ARB); checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)"); } @@ -4670,21 +4718,23 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) { GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id)); checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, pixelShader->prgId);"); - TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n", This, priv->current_fprogram_id); - } else if(!priv->use_arbfp_fixed_func) { + TRACE("Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB.\n", priv->current_fprogram_id); + } + else if(!priv->use_arbfp_fixed_func) + { glDisable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); } } -static void shader_arb_destroy(IWineD3DBaseShader *iface) { - IWineD3DBaseShaderImpl *baseShader = (IWineD3DBaseShaderImpl *) iface; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)baseShader->baseShader.device; +static void shader_arb_destroy(struct wined3d_shader *shader) +{ + struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - if (shader_is_pshader_version(baseShader->baseShader.reg_maps.shader_version.type)) + if (shader_is_pshader_version(shader->reg_maps.shader_version.type)) { - struct arb_pshader_private *shader_data = baseShader->baseShader.backend_data; + struct arb_pshader_private *shader_data = shader->backend_data; UINT i; if(!shader_data) return; /* This can happen if a shader was never compiled */ @@ -4706,11 +4756,11 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) { HeapFree(GetProcessHeap(), 0, shader_data->gl_shaders); HeapFree(GetProcessHeap(), 0, shader_data); - baseShader->baseShader.backend_data = NULL; + shader->backend_data = NULL; } else { - struct arb_vshader_private *shader_data = baseShader->baseShader.backend_data; + struct arb_vshader_private *shader_data = shader->backend_data; UINT i; if(!shader_data) return; /* This can happen if a shader was never compiled */ @@ -4732,7 +4782,7 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) { HeapFree(GetProcessHeap(), 0, shader_data->gl_shaders); HeapFree(GetProcessHeap(), 0, shader_data); - baseShader->baseShader.backend_data = NULL; + shader->backend_data = NULL; } } @@ -4750,8 +4800,8 @@ static const struct wine_rb_functions sig_tree_functions = sig_tree_compare }; -static HRESULT shader_arb_alloc(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +static HRESULT shader_arb_alloc(struct wined3d_device *device) +{ struct shader_arb_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*priv)); if(wine_rb_init(&priv->signature_tree, &sig_tree_functions) == -1) { @@ -4759,7 +4809,7 @@ static HRESULT shader_arb_alloc(IWineD3DDevice *iface) { HeapFree(GetProcessHeap(), 0, priv); return E_OUTOFMEMORY; } - This->shader_priv = priv; + device->shader_priv = priv; return WINED3D_OK; } @@ -4776,10 +4826,10 @@ static void release_signature(struct wine_rb_entry *entry, void *context) } /* Context activation is done by the caller. */ -static void shader_arb_free(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - struct shader_arb_priv *priv = This->shader_priv; +static void shader_arb_free(struct wined3d_device *device) +{ + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + struct shader_arb_priv *priv = device->shader_priv; int i; ENTER_GL(); @@ -4800,14 +4850,15 @@ static void shader_arb_free(IWineD3DDevice *iface) { LEAVE_GL(); wine_rb_destroy(&priv->signature_tree, release_signature, NULL); - HeapFree(GetProcessHeap(), 0, This->shader_priv); + HeapFree(GetProcessHeap(), 0, device->shader_priv); } -static BOOL shader_arb_dirty_const(IWineD3DDevice *iface) { +static BOOL shader_arb_dirty_const(void) +{ return TRUE; } -static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *pCaps) +static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps) { if (gl_info->supported[ARB_VERTEX_PROGRAM]) { @@ -4824,26 +4875,26 @@ static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct sh if (gl_info->supported[NV_VERTEX_PROGRAM3]) { - pCaps->VertexShaderVersion = WINED3DVS_VERSION(3,0); + caps->VertexShaderVersion = WINED3DVS_VERSION(3,0); TRACE_(d3d_caps)("Hardware vertex shader version 3.0 enabled (NV_VERTEX_PROGRAM3)\n"); } else if (vs_consts >= 256) { /* Shader Model 2.0 requires at least 256 vertex shader constants */ - pCaps->VertexShaderVersion = WINED3DVS_VERSION(2,0); + caps->VertexShaderVersion = WINED3DVS_VERSION(2,0); TRACE_(d3d_caps)("Hardware vertex shader version 2.0 enabled (ARB_PROGRAM)\n"); } else { - pCaps->VertexShaderVersion = WINED3DVS_VERSION(1,1); + caps->VertexShaderVersion = WINED3DVS_VERSION(1,1); TRACE_(d3d_caps)("Hardware vertex shader version 1.1 enabled (ARB_PROGRAM)\n"); } - pCaps->MaxVertexShaderConst = vs_consts; + caps->MaxVertexShaderConst = vs_consts; } else { - pCaps->VertexShaderVersion = 0; - pCaps->MaxVertexShaderConst = 0; + caps->VertexShaderVersion = 0; + caps->MaxVertexShaderConst = 0; } if (gl_info->supported[ARB_FRAGMENT_PROGRAM]) @@ -4859,31 +4910,31 @@ static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct sh if (gl_info->supported[NV_FRAGMENT_PROGRAM2]) { - pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0); + caps->PixelShaderVersion = WINED3DPS_VERSION(3,0); TRACE_(d3d_caps)("Hardware pixel shader version 3.0 enabled (NV_FRAGMENT_PROGRAM2)\n"); } else if (ps_consts >= 32) { /* Shader Model 2.0 requires at least 32 pixel shader constants */ - pCaps->PixelShaderVersion = WINED3DPS_VERSION(2,0); + caps->PixelShaderVersion = WINED3DPS_VERSION(2,0); TRACE_(d3d_caps)("Hardware pixel shader version 2.0 enabled (ARB_PROGRAM)\n"); } else { - pCaps->PixelShaderVersion = WINED3DPS_VERSION(1,4); + caps->PixelShaderVersion = WINED3DPS_VERSION(1,4); TRACE_(d3d_caps)("Hardware pixel shader version 1.4 enabled (ARB_PROGRAM)\n"); } - pCaps->PixelShader1xMaxValue = 8.0f; - pCaps->MaxPixelShaderConst = ps_consts; + caps->PixelShader1xMaxValue = 8.0f; + caps->MaxPixelShaderConst = ps_consts; } else { - pCaps->PixelShaderVersion = 0; - pCaps->PixelShader1xMaxValue = 0.0f; - pCaps->MaxPixelShaderConst = 0; + caps->PixelShaderVersion = 0; + caps->PixelShader1xMaxValue = 0.0f; + caps->MaxPixelShaderConst = 0; } - pCaps->VSClipping = use_nv_clip(gl_info); + caps->VSClipping = use_nv_clip(gl_info); } static BOOL shader_arb_color_fixup_supported(struct color_fixup_desc fixup) @@ -4948,6 +4999,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_DEF */ NULL, /* WINED3DSIH_DEFB */ NULL, /* WINED3DSIH_DEFI */ NULL, + /* WINED3DSIH_DIV */ NULL, /* WINED3DSIH_DP2ADD */ pshader_hw_dp2add, /* WINED3DSIH_DP3 */ shader_hw_map2gl, /* WINED3DSIH_DP4 */ shader_hw_map2gl, @@ -4962,15 +5014,19 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_EXP */ shader_hw_scalar_op, /* WINED3DSIH_EXPP */ shader_hw_scalar_op, /* WINED3DSIH_FRC */ shader_hw_map2gl, + /* WINED3DSIH_FTOI */ NULL, /* WINED3DSIH_IADD */ NULL, + /* WINED3DSIH_IEQ */ NULL, /* WINED3DSIH_IF */ NULL /* Hardcoded into the shader */, /* WINED3DSIH_IFC */ shader_hw_ifc, /* WINED3DSIH_IGE */ NULL, /* WINED3DSIH_IMUL */ NULL, + /* WINED3DSIH_ITOF */ NULL, /* WINED3DSIH_LABEL */ shader_hw_label, + /* WINED3DSIH_LD */ NULL, /* WINED3DSIH_LIT */ shader_hw_map2gl, - /* WINED3DSIH_LOG */ shader_hw_log_pow, - /* WINED3DSIH_LOGP */ shader_hw_log_pow, + /* WINED3DSIH_LOG */ shader_hw_log, + /* WINED3DSIH_LOGP */ shader_hw_log, /* WINED3DSIH_LOOP */ shader_hw_loop, /* WINED3DSIH_LRP */ shader_hw_lrp, /* WINED3DSIH_LT */ NULL, @@ -4989,16 +5045,20 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_NOP */ shader_hw_nop, /* WINED3DSIH_NRM */ shader_hw_nrm, /* WINED3DSIH_PHASE */ NULL, - /* WINED3DSIH_POW */ shader_hw_log_pow, + /* WINED3DSIH_POW */ shader_hw_pow, /* WINED3DSIH_RCP */ shader_hw_rcp, /* WINED3DSIH_REP */ shader_hw_rep, /* WINED3DSIH_RET */ shader_hw_ret, /* WINED3DSIH_RSQ */ shader_hw_scalar_op, + /* WINED3DSIH_SAMPLE */ NULL, + /* WINED3DSIH_SAMPLE_GRAD */ NULL, + /* WINED3DSIH_SAMPLE_LOD */ NULL, /* WINED3DSIH_SETP */ NULL, /* WINED3DSIH_SGE */ shader_hw_map2gl, /* WINED3DSIH_SGN */ shader_hw_sgn, /* WINED3DSIH_SINCOS */ shader_hw_sincos, /* WINED3DSIH_SLT */ shader_hw_map2gl, + /* WINED3DSIH_SQRT */ NULL, /* WINED3DSIH_SUB */ shader_hw_map2gl, /* WINED3DSIH_TEX */ pshader_hw_tex, /* WINED3DSIH_TEXBEM */ pshader_hw_texbem, @@ -5022,20 +5082,23 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_TEXREG2AR */ pshader_hw_texreg2ar, /* WINED3DSIH_TEXREG2GB */ pshader_hw_texreg2gb, /* WINED3DSIH_TEXREG2RGB */ pshader_hw_texreg2rgb, + /* WINED3DSIH_UTOF */ NULL, }; -static inline BOOL get_bool_const(const struct wined3d_shader_instruction *ins, IWineD3DBaseShaderImpl *This, DWORD idx) +static BOOL get_bool_const(const struct wined3d_shader_instruction *ins, + const struct wined3d_shader *shader, DWORD idx) { - BOOL vshader = shader_is_vshader_version(This->baseShader.reg_maps.shader_version.type); + const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps; + BOOL vshader = shader_is_vshader_version(reg_maps->shader_version.type); WORD bools = 0; WORD flag = (1 << idx); const local_constant *constant; struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; - if(This->baseShader.reg_maps.local_bool_consts & flag) + if (reg_maps->local_bool_consts & flag) { /* What good is a if(bool) with a hardcoded local constant? I don't know, but handle it */ - LIST_FOR_EACH_ENTRY(constant, &This->baseShader.constantsB, local_constant, entry) + LIST_FOR_EACH_ENTRY(constant, &shader->constantsB, local_constant, entry) { if (constant->idx == idx) { @@ -5054,17 +5117,18 @@ static inline BOOL get_bool_const(const struct wined3d_shader_instruction *ins, } static void get_loop_control_const(const struct wined3d_shader_instruction *ins, - IWineD3DBaseShaderImpl *This, UINT idx, struct wined3d_shader_loop_control *loop_control) + const struct wined3d_shader *shader, UINT idx, struct wined3d_shader_loop_control *loop_control) { + const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps; struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; /* Integer constants can either be a local constant, or they can be stored in the shader * type specific compile args. */ - if (This->baseShader.reg_maps.local_int_consts & (1 << idx)) + if (reg_maps->local_int_consts & (1 << idx)) { const local_constant *constant; - LIST_FOR_EACH_ENTRY(constant, &This->baseShader.constantsI, local_constant, entry) + LIST_FOR_EACH_ENTRY(constant, &shader->constantsI, local_constant, entry) { if (constant->idx == idx) { @@ -5083,7 +5147,7 @@ static void get_loop_control_const(const struct wined3d_shader_instruction *ins, return; } - switch (This->baseShader.reg_maps.shader_version.type) + switch (reg_maps->shader_version.type) { case WINED3D_SHADER_TYPE_VERTEX: /* Count and aL start value are unsigned */ @@ -5100,7 +5164,7 @@ static void get_loop_control_const(const struct wined3d_shader_instruction *ins, break; default: - FIXME("Unhandled shader type %#x.\n", This->baseShader.reg_maps.shader_version.type); + FIXME("Unhandled shader type %#x.\n", reg_maps->shader_version.type); break; } } @@ -5193,7 +5257,7 @@ static void free_recorded_instruction(struct list *list) static void shader_arb_handle_instruction(const struct wined3d_shader_instruction *ins) { SHADER_HANDLER hw_fct; struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; - IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; + struct wined3d_shader *shader = ins->ctx->shader; struct control_frame *control_frame; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; BOOL bool_const; @@ -5224,7 +5288,7 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio list_init(&priv->record); priv->recording = TRUE; control_frame->outer_loop = TRUE; - get_loop_control_const(ins, This, ins->src[0].reg.idx, &control_frame->loop_control); + get_loop_control_const(ins, shader, ins->src[0].reg.idx, &control_frame->loop_control); return; /* Instruction is handled */ } /* Record this loop in the outer loop's recording */ @@ -5321,7 +5385,7 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio list_add_head(&priv->control_frames, &control_frame->entry); control_frame->type = IF; - bool_const = get_bool_const(ins, This, ins->src[0].reg.idx); + bool_const = get_bool_const(ins, shader, ins->src[0].reg.idx); if(ins->src[0].modifiers == WINED3DSPSM_NOT) bool_const = !bool_const; if (!priv->muted && !bool_const) { @@ -5408,7 +5472,8 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio shader_arb_add_instruction_modifiers(ins); } -const shader_backend_t arb_program_shader_backend = { +const struct wined3d_shader_backend_ops arb_program_shader_backend = +{ shader_arb_handle_instruction, shader_arb_select, shader_arb_select_depth_blt, @@ -5439,9 +5504,9 @@ struct arbfp_ffp_desc unsigned int num_textures_used; }; -/* Context activation is done by the caller. */ -static void arbfp_enable(IWineD3DDevice *iface, BOOL enable) { - ENTER_GL(); +/* Context activation and GL locking are done by the caller. */ +static void arbfp_enable(BOOL enable) +{ if(enable) { glEnable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB)"); @@ -5449,27 +5514,29 @@ static void arbfp_enable(IWineD3DDevice *iface, BOOL enable) { glDisable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); } - LEAVE_GL(); } -static HRESULT arbfp_alloc(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; +static HRESULT arbfp_alloc(struct wined3d_device *device) +{ struct shader_arb_priv *priv; /* Share private data between the shader backend and the pipeline replacement, if both * are the arb implementation. This is needed to figure out whether ARBfp should be disabled * if no pixel shader is bound or not */ - if(This->shader_backend == &arb_program_shader_backend) { - This->fragment_priv = This->shader_priv; - } else { - This->fragment_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_arb_priv)); - if(!This->fragment_priv) return E_OUTOFMEMORY; + if (device->shader_backend == &arb_program_shader_backend) + { + device->fragment_priv = device->shader_priv; } - priv = This->fragment_priv; + else + { + device->fragment_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_arb_priv)); + if (!device->fragment_priv) return E_OUTOFMEMORY; + } + priv = device->fragment_priv; if (wine_rb_init(&priv->fragment_shaders, &wined3d_ffp_frag_program_rb_functions) == -1) { ERR("Failed to initialize rbtree.\n"); - HeapFree(GetProcessHeap(), 0, This->fragment_priv); + HeapFree(GetProcessHeap(), 0, device->fragment_priv); return E_OUTOFMEMORY; } priv->use_arbfp_fixed_func = TRUE; @@ -5490,15 +5557,16 @@ static void arbfp_free_ffpshader(struct wine_rb_entry *entry, void *context) } /* Context activation is done by the caller. */ -static void arbfp_free(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - struct shader_arb_priv *priv = This->fragment_priv; +static void arbfp_free(struct wined3d_device *device) +{ + struct shader_arb_priv *priv = device->fragment_priv; - wine_rb_destroy(&priv->fragment_shaders, arbfp_free_ffpshader, &This->adapter->gl_info); + wine_rb_destroy(&priv->fragment_shaders, arbfp_free_ffpshader, &device->adapter->gl_info); priv->use_arbfp_fixed_func = FALSE; - if(This->shader_backend != &arb_program_shader_backend) { - HeapFree(GetProcessHeap(), 0, This->fragment_priv); + if (device->shader_backend != &arb_program_shader_backend) + { + HeapFree(GetProcessHeap(), 0, device->fragment_priv); } } @@ -5537,11 +5605,12 @@ static void arbfp_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen caps->MaxSimultaneousTextures = min(gl_info->limits.fragment_samplers, 8); } -static void state_texfactor_arbfp(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_texfactor_arbfp(DWORD state_id, + struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; float col[4]; /* Don't load the parameter if we're using an arbfp pixel shader, otherwise we'll overwrite @@ -5562,11 +5631,11 @@ static void state_texfactor_arbfp(DWORD state_id, IWineD3DStateBlockImpl *stateb } static void state_arb_specularenable(DWORD state_id, - IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) + struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; float col[4]; /* Don't load the parameter if we're using an arbfp pixel shader, otherwise we'll overwrite @@ -5593,18 +5662,17 @@ static void state_arb_specularenable(DWORD state_id, checkGLcall("glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_SPECULAR_ENABLE, col)"); } -static void set_bumpmat_arbfp(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void set_bumpmat_arbfp(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; float mat[2][2]; if (use_ps(state)) { - IWineD3DPixelShaderImpl *ps = state->pixel_shader; - if (stage && (ps->baseShader.reg_maps.bumpmat & (1 << stage))) + if (stage && (state->pixel_shader->reg_maps.bumpmat & (1 << stage))) { /* The pixel shader has to know the bump env matrix. Do a constants update if it isn't scheduled * anyway @@ -5631,18 +5699,18 @@ static void set_bumpmat_arbfp(DWORD state_id, IWineD3DStateBlockImpl *stateblock checkGLcall("glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_BUMPMAT(stage), &mat[0][0])"); } -static void tex_bumpenvlum_arbfp(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void tex_bumpenvlum_arbfp(DWORD state_id, + struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; float param[4]; if (use_ps(state)) { - IWineD3DPixelShaderImpl *ps = state->pixel_shader; - if (stage && (ps->baseShader.reg_maps.luminanceparams & (1 << stage))) + if (stage && (state->pixel_shader->reg_maps.luminanceparams & (1 << stage))) { /* The pixel shader has to know the luminance offset. Do a constants update if it * isn't scheduled anyway @@ -5766,12 +5834,14 @@ static void gen_ffp_instr(struct wined3d_shader_buffer *buffer, unsigned int sta case WINED3DTOP_SELECTARG2: arg1 = arg2; + /* FALLTHROUGH */ case WINED3DTOP_SELECTARG1: shader_addline(buffer, "MOV %s%s, %s;\n", dstreg, dstmask, arg1); break; case WINED3DTOP_MODULATE4X: mul = 2; + /* FALLTHROUGH */ case WINED3DTOP_MODULATE2X: mul *= 2; if (!strcmp(dstreg, "result.color")) @@ -5779,6 +5849,7 @@ static void gen_ffp_instr(struct wined3d_shader_buffer *buffer, unsigned int sta dstreg = "ret"; mul_final_dest = TRUE; } + /* FALLTHROUGH */ case WINED3DTOP_MODULATE: shader_addline(buffer, "MUL %s%s, %s, %s;\n", dstreg, dstmask, arg1, arg2); break; @@ -5790,9 +5861,11 @@ static void gen_ffp_instr(struct wined3d_shader_buffer *buffer, unsigned int sta dstreg = "ret"; mul_final_dest = TRUE; } + /* FALLTHROUGH */ case WINED3DTOP_ADDSIGNED: shader_addline(buffer, "SUB arg2, %s, const.w;\n", arg2); arg2 = "arg2"; + /* FALLTHROUGH */ case WINED3DTOP_ADD: shader_addline(buffer, "ADD_SAT %s%s, %s, %s;\n", dstreg, dstmask, arg1, arg2); break; @@ -5883,7 +5956,7 @@ static void gen_ffp_instr(struct wined3d_shader_buffer *buffer, unsigned int sta } } -static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWineD3DStateBlockImpl *stateblock) +static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, struct wined3d_stateblock *stateblock) { const struct wined3d_gl_info *gl_info = &stateblock->device->adapter->gl_info; unsigned int stage; @@ -6160,11 +6233,11 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWi return ret; } -static void fragment_prog_arbfp(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void fragment_prog_arbfp(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; struct shader_arb_priv *priv = device->fragment_priv; BOOL use_vshader = use_vs(state); BOOL use_pshader = use_ps(state); @@ -6258,7 +6331,7 @@ static void fragment_prog_arbfp(DWORD state_id, IWineD3DStateBlockImpl *stateblo * is that changing the fog start and fog end(which links to FOGENABLE in vertex) results in the * fragment_prog_arbfp function being called because FOGENABLE is dirty, which calls this function here */ -static void state_arbfp_fog(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_arbfp_fog(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; enum fogsource new_source; @@ -6293,11 +6366,10 @@ static void state_arbfp_fog(DWORD state_id, IWineD3DStateBlockImpl *stateblock, } } -static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void textransform(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - if(!isStateDirty(context, STATE_PIXELSHADER)) { + if (!isStateDirty(context, STATE_PIXELSHADER)) fragment_prog_arbfp(state, stateblock, context); - } } static const struct StateEntryTemplate arbfp_fragmentstate_template[] = { @@ -6422,14 +6494,6 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = { {STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT11), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVMAT00), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(0), { STATE_SAMPLER(0), sampler_texdim }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(1), { STATE_SAMPLER(1), sampler_texdim }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(2), { STATE_SAMPLER(2), sampler_texdim }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(3), { STATE_SAMPLER(3), sampler_texdim }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(4), { STATE_SAMPLER(4), sampler_texdim }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(5), { STATE_SAMPLER(5), sampler_texdim }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(6), { STATE_SAMPLER(6), sampler_texdim }, WINED3D_GL_EXT_NONE }, - {STATE_SAMPLER(7), { STATE_SAMPLER(7), sampler_texdim }, WINED3D_GL_EXT_NONE }, {STATE_PIXELSHADER, { STATE_PIXELSHADER, fragment_prog_arbfp }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3DRS_FOGENABLE), { STATE_RENDER(WINED3DRS_FOGENABLE), state_arbfp_fog }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3DRS_FOGTABLEMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, @@ -6469,8 +6533,8 @@ struct arbfp_blit_priv { GLuint palette_texture; }; -static HRESULT arbfp_blit_alloc(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; +static HRESULT arbfp_blit_alloc(struct wined3d_device *device) +{ device->blit_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct arbfp_blit_priv)); if(!device->blit_priv) { ERR("Out of memory\n"); @@ -6480,8 +6544,8 @@ static HRESULT arbfp_blit_alloc(IWineD3DDevice *iface) { } /* Context activation is done by the caller. */ -static void arbfp_blit_free(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; +static void arbfp_blit_free(struct wined3d_device *device) +{ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct arbfp_blit_priv *priv = device->blit_priv; @@ -6737,12 +6801,11 @@ static BOOL gen_yv12_read(struct wined3d_shader_buffer *buffer, GLenum textype, return TRUE; } -static GLuint gen_p8_shader(IWineD3DDeviceImpl *device, GLenum textype) +static GLuint gen_p8_shader(struct arbfp_blit_priv *priv, + const struct wined3d_gl_info *gl_info, GLenum textype) { - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; GLenum shader; struct wined3d_shader_buffer buffer; - struct arbfp_blit_priv *priv = device->blit_priv; GLint pos; /* Shader header */ @@ -6805,10 +6868,10 @@ static GLuint gen_p8_shader(IWineD3DDeviceImpl *device, GLenum textype) } /* Context activation is done by the caller. */ -static void upload_palette(IWineD3DSurfaceImpl *surface) +static void upload_palette(struct wined3d_surface *surface) { BYTE table[256][4]; - IWineD3DDeviceImpl *device = surface->resource.device; + struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct arbfp_blit_priv *priv = device->blit_priv; BOOL colorkey = (surface->CKeyFlags & WINEDDSD_CKSRCBLT) ? TRUE : FALSE; @@ -6838,13 +6901,12 @@ static void upload_palette(IWineD3DSurfaceImpl *surface) } /* Context activation is done by the caller. */ -static GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, enum complex_fixup yuv_fixup, GLenum textype) +static GLuint gen_yuv_shader(struct arbfp_blit_priv *priv, const struct wined3d_gl_info *gl_info, + enum complex_fixup yuv_fixup, GLenum textype) { - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; GLenum shader; struct wined3d_shader_buffer buffer; char luminance_component; - struct arbfp_blit_priv *priv = device->blit_priv; GLint pos; /* Shader header */ @@ -6995,13 +7057,11 @@ static GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, enum complex_fixup yuv_ } /* Context activation is done by the caller. */ -static HRESULT arbfp_blit_set(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface) +static HRESULT arbfp_blit_set(void *blit_priv, const struct wined3d_gl_info *gl_info, struct wined3d_surface *surface) { GLenum shader; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; float size[4] = {(float) surface->pow2Width, (float) surface->pow2Height, 1.0f, 1.0f}; - struct arbfp_blit_priv *priv = device->blit_priv; + struct arbfp_blit_priv *priv = blit_priv; enum complex_fixup fixup; GLenum textype = surface->texture_target; @@ -7035,7 +7095,7 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surfac case COMPLEX_FIXUP_P8: shader = textype == GL_TEXTURE_RECTANGLE_ARB ? priv->p8_rect_shader : priv->p8_2d_shader; - if (!shader) shader = gen_p8_shader(device, textype); + if (!shader) shader = gen_p8_shader(priv, gl_info, textype); upload_palette(surface); break; @@ -7049,7 +7109,7 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surfac return E_NOTIMPL; } - if (!shader) shader = gen_yuv_shader(device, fixup, textype); + if (!shader) shader = gen_yuv_shader(priv, gl_info, fixup, textype); ENTER_GL(); glEnable(GL_FRAGMENT_PROGRAM_ARB); @@ -7064,10 +7124,8 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surfac } /* Context activation is done by the caller. */ -static void arbfp_blit_unset(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - +static void arbfp_blit_unset(const struct wined3d_gl_info *gl_info) +{ ENTER_GL(); glDisable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); @@ -7086,13 +7144,16 @@ static void arbfp_blit_unset(IWineD3DDevice *iface) { LEAVE_GL(); } -static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, +static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op, const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format) { enum complex_fixup src_fixup; - if (blit_op != BLIT_OP_BLIT) + if (!gl_info->supported[ARB_FRAGMENT_PROGRAM]) + return FALSE; + + if (blit_op != WINED3D_BLIT_OP_COLOR_BLIT) { TRACE("Unsupported blit_op=%d\n", blit_op); return FALSE; @@ -7140,11 +7201,9 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info, enum bli } } -HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_surface, const RECT *src_rect, - IWineD3DSurfaceImpl *dst_surface, const RECT *dst_rect_in, enum blit_operation blit_op, - DWORD Filter) +HRESULT arbfp_blit_surface(struct wined3d_device *device, struct wined3d_surface *src_surface, const RECT *src_rect, + struct wined3d_surface *dst_surface, const RECT *dst_rect_in, enum wined3d_blit_op blit_op, DWORD Filter) { - IWineD3DSwapChainImpl *dst_swapchain; struct wined3d_context *context; RECT dst_rect = *dst_rect_in; @@ -7155,17 +7214,10 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_ context = context_acquire(device, dst_surface); context_apply_blit_state(context, device); - /* The coordinates of the ddraw front buffer are always fullscreen ('screen coordinates', - * while OpenGL coordinates are window relative. - * Also beware of the origin difference(top left vs bottom left). - * Also beware that the front buffer's surface size is screen width x screen height, - * whereas the real gl drawable size is the size of the window. */ - dst_swapchain = dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN - ? dst_surface->container.u.swapchain : NULL; - if (dst_swapchain && dst_surface == dst_swapchain->front_buffer) - surface_translate_frontbuffer_coords(dst_surface, context->win_handle, &dst_rect); + if (!surface_is_offscreen(dst_surface)) + surface_translate_drawable_coords(dst_surface, context->win_handle, &dst_rect); - arbfp_blit_set((IWineD3DDevice *)device, src_surface); + arbfp_blit_set(device->blit_priv, context->gl_info, src_surface); ENTER_GL(); @@ -7175,11 +7227,11 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_ LEAVE_GL(); /* Leave the opengl state valid for blitting */ - arbfp_blit_unset((IWineD3DDevice *)device); + arbfp_blit_unset(context->gl_info); - if (wined3d_settings.strict_draw_ordering || (dst_swapchain - && (dst_surface == dst_swapchain->front_buffer - || dst_swapchain->num_contexts > 1))) + if (wined3d_settings.strict_draw_ordering + || (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN + && (dst_surface->container.u.swapchain->front_buffer == dst_surface))) wglFlush(); /* Flush to ensure ordering across contexts. */ context_release(context); @@ -7189,18 +7241,27 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_ } /* Do not call while under the GL lock. */ -static HRESULT arbfp_blit_color_fill(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *dst_surface, +static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface, const RECT *dst_rect, const WINED3DCOLORVALUE *color) { FIXME("Color filling not implemented by arbfp_blit\n"); return WINED3DERR_INVALIDCALL; } +/* Do not call while under the GL lock. */ +static HRESULT arbfp_blit_depth_fill(struct wined3d_device *device, + struct wined3d_surface *surface, const RECT *rect, float depth) +{ + FIXME("Depth filling not implemented by arbfp_blit.\n"); + return WINED3DERR_INVALIDCALL; +} + const struct blit_shader arbfp_blit = { arbfp_blit_alloc, arbfp_blit_free, arbfp_blit_set, arbfp_blit_unset, arbfp_blit_supported, - arbfp_blit_color_fill + arbfp_blit_color_fill, + arbfp_blit_depth_fill, }; diff --git a/dll/directx/wine/wined3d/ati_fragment_shader.c b/dll/directx/wine/wined3d/ati_fragment_shader.c index 35838e18d73..02817573cb8 100644 --- a/dll/directx/wine/wined3d/ati_fragment_shader.c +++ b/dll/directx/wine/wined3d/ati_fragment_shader.c @@ -796,13 +796,13 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[MAX_TEXTURES], con return ret; } -static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void set_tex_op_atifs(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; - IWineD3DDeviceImpl *This = stateblock->device; + struct wined3d_device *device = stateblock->device; const struct atifs_ffp_desc *desc; - struct ffp_frag_settings settings; - struct atifs_private_data *priv = This->fragment_priv; + struct ffp_frag_settings settings; + struct atifs_private_data *priv = device->fragment_priv; DWORD mapped_stage; unsigned int i; @@ -832,8 +832,9 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, st /* GL_ATI_fragment_shader depends on the GL_TEXTURE_xD enable settings. Update the texture stages * used by this shader */ - for(i = 0; i < desc->num_textures_used; i++) { - mapped_stage = This->texUnitMap[i]; + for (i = 0; i < desc->num_textures_used; ++i) + { + mapped_stage = device->texUnitMap[i]; if (mapped_stage != WINED3D_UNMAPPED_STAGE) { GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage)); @@ -845,7 +846,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, st GL_EXTCALL(glBindFragmentShaderATI(desc->shader)); } -static void state_texfactor_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_texfactor_atifs(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; float col[4]; @@ -855,7 +856,7 @@ static void state_texfactor_atifs(DWORD state, IWineD3DStateBlockImpl *statebloc checkGLcall("glSetFragmentShaderConstantATI(ATI_FFP_CONST_TFACTOR, col)"); } -static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void set_bumpmat(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); const struct wined3d_gl_info *gl_info = context->gl_info; @@ -880,17 +881,17 @@ static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, struct checkGLcall("glSetFragmentShaderConstantATI(ATI_FFP_CONST_BUMPMAT(stage), mat)"); } -static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void textransform(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - if(!isStateDirty(context, STATE_PIXELSHADER)) { + if (!isStateDirty(context, STATE_PIXELSHADER)) set_tex_op_atifs(state, stateblock, context); - } } -static void atifs_apply_pixelshader(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void atifs_apply_pixelshader(DWORD state_id, + struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; BOOL use_vshader = use_vs(state); context->last_was_pshader = use_ps(state); @@ -913,7 +914,7 @@ static void atifs_apply_pixelshader(DWORD state_id, IWineD3DStateBlockImpl *stat } } -static void atifs_srgbwriteenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void atifs_srgbwriteenable(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_SRGBWRITEENABLE]) WARN("sRGB writes are not supported by this fragment pipe.\n"); @@ -1053,9 +1054,9 @@ static const struct StateEntryTemplate atifs_fragmentstate_template[] = { {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; -/* Context activation is done by the caller. */ -static void atifs_enable(IWineD3DDevice *iface, BOOL enable) { - ENTER_GL(); +/* Context activation and GL locking are done by the caller. */ +static void atifs_enable(BOOL enable) +{ if(enable) { glEnable(GL_FRAGMENT_SHADER_ATI); checkGLcall("glEnable(GL_FRAGMENT_SHADER_ATI)"); @@ -1063,7 +1064,6 @@ static void atifs_enable(IWineD3DDevice *iface, BOOL enable) { glDisable(GL_FRAGMENT_SHADER_ATI); checkGLcall("glDisable(GL_FRAGMENT_SHADER_ATI)"); } - LEAVE_GL(); } static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps) @@ -1113,20 +1113,21 @@ static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen caps->MaxSimultaneousTextures = 6; } -static HRESULT atifs_alloc(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; +static HRESULT atifs_alloc(struct wined3d_device *device) +{ struct atifs_private_data *priv; - This->fragment_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct atifs_private_data)); - if(!This->fragment_priv) { + device->fragment_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct atifs_private_data)); + if (!device->fragment_priv) + { ERR("Out of memory\n"); return E_OUTOFMEMORY; } - priv = This->fragment_priv; + priv = device->fragment_priv; if (wine_rb_init(&priv->fragment_shaders, &wined3d_ffp_frag_program_rb_functions) == -1) { ERR("Failed to initialize rbtree.\n"); - HeapFree(GetProcessHeap(), 0, This->fragment_priv); + HeapFree(GetProcessHeap(), 0, device->fragment_priv); return E_OUTOFMEMORY; } return WINED3D_OK; @@ -1135,8 +1136,8 @@ static HRESULT atifs_alloc(IWineD3DDevice *iface) { /* Context activation is done by the caller. */ static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *context) { - IWineD3DDeviceImpl *This = context; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; + struct wined3d_device *device = context; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct atifs_ffp_desc *entry_ati = WINE_RB_ENTRY_VALUE(entry, struct atifs_ffp_desc, parent.entry); ENTER_GL(); @@ -1147,14 +1148,14 @@ static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *context) } /* Context activation is done by the caller. */ -static void atifs_free(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - struct atifs_private_data *priv = This->fragment_priv; +static void atifs_free(struct wined3d_device *device) +{ + struct atifs_private_data *priv = device->fragment_priv; - wine_rb_destroy(&priv->fragment_shaders, atifs_free_ffpshader, This); + wine_rb_destroy(&priv->fragment_shaders, atifs_free_ffpshader, device); HeapFree(GetProcessHeap(), 0, priv); - This->fragment_priv = NULL; + device->fragment_priv = NULL; } static BOOL atifs_color_fixup_supported(struct color_fixup_desc fixup) diff --git a/dll/directx/wine/wined3d/basetexture.c b/dll/directx/wine/wined3d/basetexture.c deleted file mode 100644 index bf3b4d4ff70..00000000000 --- a/dll/directx/wine/wined3d/basetexture.c +++ /dev/null @@ -1,542 +0,0 @@ -/* - * IWineD3DBaseTexture Implementation - * - * Copyright 2002-2004 Jason Edmeades - * Copyright 2002-2004 Raphael Junqueira - * Copyright 2005 Oliver Stieber - * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wined3d_private.h" - -WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); - -HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT layer_count, UINT level_count, - WINED3DRESOURCETYPE resource_type, IWineD3DDeviceImpl *device, UINT size, DWORD usage, - const struct wined3d_format *format, WINED3DPOOL pool, void *parent, - const struct wined3d_parent_ops *parent_ops) -{ - HRESULT hr; - - hr = resource_init((IWineD3DResource *)texture, resource_type, device, - size, usage, format, pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize resource, returning %#x\n", hr); - return hr; - } - - texture->baseTexture.sub_resources = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - level_count * layer_count * sizeof(*texture->baseTexture.sub_resources)); - if (!texture->baseTexture.sub_resources) - { - ERR("Failed to allocate sub-resource array.\n"); - resource_cleanup((IWineD3DResource *)texture); - return E_OUTOFMEMORY; - } - - texture->baseTexture.layer_count = layer_count; - texture->baseTexture.level_count = level_count; - texture->baseTexture.filterType = (usage & WINED3DUSAGE_AUTOGENMIPMAP) ? WINED3DTEXF_LINEAR : WINED3DTEXF_NONE; - texture->baseTexture.LOD = 0; - texture->baseTexture.texture_rgb.dirty = TRUE; - texture->baseTexture.texture_srgb.dirty = TRUE; - texture->baseTexture.is_srgb = FALSE; - texture->baseTexture.pow2Matrix_identity = TRUE; - - if (texture->resource.format->Flags & WINED3DFMT_FLAG_FILTERING) - { - texture->baseTexture.minMipLookup = minMipLookup; - texture->baseTexture.magLookup = magLookup; - } - else - { - texture->baseTexture.minMipLookup = minMipLookup_noFilter; - texture->baseTexture.magLookup = magLookup_noFilter; - } - - return WINED3D_OK; -} - -void basetexture_cleanup(IWineD3DBaseTexture *iface) -{ - basetexture_unload(iface); - HeapFree(GetProcessHeap(), 0, ((IWineD3DBaseTextureImpl *)iface)->baseTexture.sub_resources); - resource_cleanup((IWineD3DResource *)iface); -} - -IWineD3DResourceImpl *basetexture_get_sub_resource(IWineD3DBaseTextureImpl *texture, UINT layer, UINT level) -{ - if (layer >= texture->baseTexture.layer_count) - { - WARN("layer %u >= layer_count %u.\n", layer, texture->baseTexture.layer_count); - return NULL; - } - - if (level >= texture->baseTexture.level_count) - { - WARN("level %u >= level_count %u.\n", level, texture->baseTexture.level_count); - return NULL; - } - - return texture->baseTexture.sub_resources[layer * texture->baseTexture.level_count + level]; -} - -/* A GL context is provided by the caller */ -static void gltexture_delete(struct gl_texture *tex) -{ - ENTER_GL(); - glDeleteTextures(1, &tex->name); - LEAVE_GL(); - tex->name = 0; -} - -void basetexture_unload(IWineD3DBaseTexture *iface) -{ - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - IWineD3DDeviceImpl *device = This->resource.device; - struct wined3d_context *context = NULL; - - if (This->baseTexture.texture_rgb.name || This->baseTexture.texture_srgb.name) - { - context = context_acquire(device, NULL); - } - - if(This->baseTexture.texture_rgb.name) { - gltexture_delete(&This->baseTexture.texture_rgb); - } - if(This->baseTexture.texture_srgb.name) { - gltexture_delete(&This->baseTexture.texture_srgb); - } - - if (context) context_release(context); - - This->baseTexture.texture_rgb.dirty = TRUE; - This->baseTexture.texture_srgb.dirty = TRUE; - - resource_unload((IWineD3DResourceImpl *)This); -} - -DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD LODNew) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - DWORD old = This->baseTexture.LOD; - - /* The d3d9:texture test shows that SetLOD is ignored on non-managed - * textures. The call always returns 0, and GetLOD always returns 0 - */ - if (This->resource.pool != WINED3DPOOL_MANAGED) { - TRACE("Ignoring SetLOD on %s texture, returning 0\n", debug_d3dpool(This->resource.pool)); - return 0; - } - - if (LODNew >= This->baseTexture.level_count) - LODNew = This->baseTexture.level_count - 1; - - if(This->baseTexture.LOD != LODNew) { - This->baseTexture.LOD = LODNew; - - This->baseTexture.texture_rgb.states[WINED3DTEXSTA_MAXMIPLEVEL] = ~0U; - This->baseTexture.texture_srgb.states[WINED3DTEXSTA_MAXMIPLEVEL] = ~0U; - if(This->baseTexture.bindCount) { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_SAMPLER(This->baseTexture.sampler)); - } - } - - TRACE("(%p) : set LOD to %d\n", This, This->baseTexture.LOD); - - return old; -} - -DWORD basetexture_get_lod(IWineD3DBaseTexture *iface) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - - TRACE("(%p) : returning %d\n", This, This->baseTexture.LOD); - - return This->baseTexture.LOD; -} - -DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - TRACE("iface %p, returning %u.\n", iface, This->baseTexture.level_count); - return This->baseTexture.level_count; -} - -HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - IWineD3DDeviceImpl *device = This->resource.device; - GLenum textureDimensions = This->baseTexture.target; - - if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { - TRACE("(%p) : returning invalid call\n", This); - return WINED3DERR_INVALIDCALL; - } - if(This->baseTexture.filterType != FilterType) { - /* What about multithreading? Do we want all the context overhead just to set this value? - * Or should we delay the applying until the texture is used for drawing? For now, apply - * immediately. - */ - struct wined3d_context *context = context_acquire(device, NULL); - - ENTER_GL(); - glBindTexture(textureDimensions, This->baseTexture.texture_rgb.name); - checkGLcall("glBindTexture"); - switch(FilterType) { - case WINED3DTEXF_NONE: - case WINED3DTEXF_POINT: - glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST); - checkGLcall("glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST)"); - - break; - case WINED3DTEXF_LINEAR: - glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST); - checkGLcall("glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST)"); - - break; - default: - WARN("Unexpected filter type %d, setting to GL_NICEST\n", FilterType); - glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST); - checkGLcall("glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST)"); - } - LEAVE_GL(); - - context_release(context); - } - This->baseTexture.filterType = FilterType; - TRACE("(%p) :\n", This); - return WINED3D_OK; -} - -WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - - FIXME("(%p) : stub\n", This); - - return This->baseTexture.filterType; -} - -void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface) -{ - /* TODO: Implement filters using GL_SGI_generate_mipmaps. */ - FIXME("iface %p stub!\n", iface); -} - -BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty) -{ - BOOL old; - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - old = This->baseTexture.texture_rgb.dirty || This->baseTexture.texture_srgb.dirty; - This->baseTexture.texture_rgb.dirty = dirty; - This->baseTexture.texture_srgb.dirty = dirty; - return old; -} - -BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - return This->baseTexture.texture_rgb.dirty || This->baseTexture.texture_srgb.dirty; -} - -/* Context activation is done by the caller. */ -HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surface_desc) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - HRESULT hr = WINED3D_OK; - GLenum textureDimensions; - BOOL isNewTexture = FALSE; - struct gl_texture *gl_tex; - TRACE("(%p) : About to bind texture\n", This); - - This->baseTexture.is_srgb = srgb; /* SRGB mode cache for PreLoad calls outside drawprim */ - if(srgb) { - gl_tex = &This->baseTexture.texture_srgb; - } else { - gl_tex = &This->baseTexture.texture_rgb; - } - - textureDimensions = This->baseTexture.target; - ENTER_GL(); - /* Generate a texture name if we don't already have one */ - if (!gl_tex->name) - { - *set_surface_desc = TRUE; - glGenTextures(1, &gl_tex->name); - checkGLcall("glGenTextures"); - TRACE("Generated texture %d\n", gl_tex->name); - if (This->resource.pool == WINED3DPOOL_DEFAULT) { - /* Tell opengl to try and keep this texture in video ram (well mostly) */ - GLclampf tmp; - tmp = 0.9f; - glPrioritizeTextures(1, &gl_tex->name, &tmp); - - } - /* Initialise the state of the texture object - to the openGL defaults, not the directx defaults */ - gl_tex->states[WINED3DTEXSTA_ADDRESSU] = WINED3DTADDRESS_WRAP; - gl_tex->states[WINED3DTEXSTA_ADDRESSV] = WINED3DTADDRESS_WRAP; - gl_tex->states[WINED3DTEXSTA_ADDRESSW] = WINED3DTADDRESS_WRAP; - gl_tex->states[WINED3DTEXSTA_BORDERCOLOR] = 0; - gl_tex->states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_LINEAR; - gl_tex->states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; /* GL_NEAREST_MIPMAP_LINEAR */ - gl_tex->states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_LINEAR; /* GL_NEAREST_MIPMAP_LINEAR */ - gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] = 0; - gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] = 1; - gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE] = 0; - gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE; - IWineD3DBaseTexture_SetDirty(iface, TRUE); - isNewTexture = TRUE; - - if(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP) { - /* This means double binding the texture at creation, but keeps the code simpler all - * in all, and the run-time path free from additional checks - */ - glBindTexture(textureDimensions, gl_tex->name); - checkGLcall("glBindTexture"); - glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); - checkGLcall("glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_SGIS, GL_TRUE)"); - } - } else { - *set_surface_desc = FALSE; - } - - /* Bind the texture */ - if (gl_tex->name) - { - glBindTexture(textureDimensions, gl_tex->name); - checkGLcall("glBindTexture"); - if (isNewTexture) { - /* For a new texture we have to set the textures levels after binding the texture. - * In theory this is all we should ever have to do, but because ATI's drivers are broken, we - * also need to set the texture dimensions before the texture is set - * Beware that texture rectangles do not support mipmapping, but set the maxmiplevel if we're - * relying on the partial GL_ARB_texture_non_power_of_two emulation with texture rectangles - * (ie, do not care for cond_np2 here, just look for GL_TEXTURE_RECTANGLE_ARB) - */ - if (textureDimensions != GL_TEXTURE_RECTANGLE_ARB) - { - TRACE("Setting GL_TEXTURE_MAX_LEVEL to %u.\n", This->baseTexture.level_count - 1); - glTexParameteri(textureDimensions, GL_TEXTURE_MAX_LEVEL, This->baseTexture.level_count - 1); - checkGLcall("glTexParameteri(textureDimensions, GL_TEXTURE_MAX_LEVEL, This->baseTexture.level_count)"); - } - if(textureDimensions==GL_TEXTURE_CUBE_MAP_ARB) { - /* Cubemaps are always set to clamp, regardless of the sampler state. */ - glTexParameteri(textureDimensions, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(textureDimensions, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(textureDimensions, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); - } - } - } else { /* this only happened if we've run out of openGL textures */ - WARN("This texture doesn't have an openGL texture assigned to it\n"); - hr = WINED3DERR_INVALIDCALL; - } - - LEAVE_GL(); - return hr; -} - -/* GL locking is done by the caller */ -static void apply_wrap(const struct wined3d_gl_info *gl_info, GLenum target, - WINED3DTEXTUREADDRESS d3d_wrap, GLenum param, BOOL cond_np2) -{ - GLint gl_wrap; - - if (d3d_wrap < WINED3DTADDRESS_WRAP || d3d_wrap > WINED3DTADDRESS_MIRRORONCE) - { - FIXME("Unrecognized or unsupported WINED3DTEXTUREADDRESS %#x.\n", d3d_wrap); - return; - } - - if (target == GL_TEXTURE_CUBE_MAP_ARB - || (cond_np2 && d3d_wrap == WINED3DTADDRESS_WRAP)) - { - /* Cubemaps are always set to clamp, regardless of the sampler state. */ - gl_wrap = GL_CLAMP_TO_EDGE; - } - else - { - gl_wrap = gl_info->wrap_lookup[d3d_wrap - WINED3DTADDRESS_WRAP]; - } - - TRACE("Setting param %#x to %#x for target %#x.\n", param, gl_wrap, target); - glTexParameteri(target, param, gl_wrap); - checkGLcall("glTexParameteri(target, param, gl_wrap)"); -} - -/* GL locking is done by the caller (state handler) */ -void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, - const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], - const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1], - const struct wined3d_gl_info *gl_info) -{ - IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - GLenum textureDimensions = This->baseTexture.target; - DWORD state; - BOOL cond_np2 = IWineD3DBaseTexture_IsCondNP2(iface); - DWORD aniso; - struct gl_texture *gl_tex; - - TRACE("iface %p, textureStates %p, samplerStates %p\n", iface, textureStates, samplerStates); - - if(This->baseTexture.is_srgb) { - gl_tex = &This->baseTexture.texture_srgb; - } else { - gl_tex = &This->baseTexture.texture_rgb; - } - - /* This function relies on the correct texture being bound and loaded. */ - - if(samplerStates[WINED3DSAMP_ADDRESSU] != gl_tex->states[WINED3DTEXSTA_ADDRESSU]) { - state = samplerStates[WINED3DSAMP_ADDRESSU]; - apply_wrap(gl_info, textureDimensions, state, GL_TEXTURE_WRAP_S, cond_np2); - gl_tex->states[WINED3DTEXSTA_ADDRESSU] = state; - } - - if(samplerStates[WINED3DSAMP_ADDRESSV] != gl_tex->states[WINED3DTEXSTA_ADDRESSV]) { - state = samplerStates[WINED3DSAMP_ADDRESSV]; - apply_wrap(gl_info, textureDimensions, state, GL_TEXTURE_WRAP_T, cond_np2); - gl_tex->states[WINED3DTEXSTA_ADDRESSV] = state; - } - - if(samplerStates[WINED3DSAMP_ADDRESSW] != gl_tex->states[WINED3DTEXSTA_ADDRESSW]) { - state = samplerStates[WINED3DSAMP_ADDRESSW]; - apply_wrap(gl_info, textureDimensions, state, GL_TEXTURE_WRAP_R, cond_np2); - gl_tex->states[WINED3DTEXSTA_ADDRESSW] = state; - } - - if(samplerStates[WINED3DSAMP_BORDERCOLOR] != gl_tex->states[WINED3DTEXSTA_BORDERCOLOR]) { - float col[4]; - - state = samplerStates[WINED3DSAMP_BORDERCOLOR]; - D3DCOLORTOGLFLOAT4(state, col); - TRACE("Setting border color for %u to %x\n", textureDimensions, state); - glTexParameterfv(textureDimensions, GL_TEXTURE_BORDER_COLOR, &col[0]); - checkGLcall("glTexParameteri(..., GL_TEXTURE_BORDER_COLOR, ...)"); - gl_tex->states[WINED3DTEXSTA_BORDERCOLOR] = state; - } - - if(samplerStates[WINED3DSAMP_MAGFILTER] != gl_tex->states[WINED3DTEXSTA_MAGFILTER]) { - GLint glValue; - state = samplerStates[WINED3DSAMP_MAGFILTER]; - if (state > WINED3DTEXF_ANISOTROPIC) { - FIXME("Unrecognized or unsupported MAGFILTER* value %d\n", state); - } - - glValue = wined3d_gl_mag_filter(This->baseTexture.magLookup, - min(max(state, WINED3DTEXF_POINT), WINED3DTEXF_LINEAR)); - TRACE("ValueMAG=%d setting MAGFILTER to %x\n", state, glValue); - glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue); - - gl_tex->states[WINED3DTEXSTA_MAGFILTER] = state; - } - - if((samplerStates[WINED3DSAMP_MINFILTER] != gl_tex->states[WINED3DTEXSTA_MINFILTER] || - samplerStates[WINED3DSAMP_MIPFILTER] != gl_tex->states[WINED3DTEXSTA_MIPFILTER] || - samplerStates[WINED3DSAMP_MAXMIPLEVEL] != gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL])) { - GLint glValue; - - gl_tex->states[WINED3DTEXSTA_MIPFILTER] = samplerStates[WINED3DSAMP_MIPFILTER]; - gl_tex->states[WINED3DTEXSTA_MINFILTER] = samplerStates[WINED3DSAMP_MINFILTER]; - gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] = samplerStates[WINED3DSAMP_MAXMIPLEVEL]; - - if (gl_tex->states[WINED3DTEXSTA_MINFILTER] > WINED3DTEXF_ANISOTROPIC - || gl_tex->states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_ANISOTROPIC) - { - - FIXME("Unrecognized or unsupported D3DSAMP_MINFILTER value %d D3DSAMP_MIPFILTER value %d\n", - gl_tex->states[WINED3DTEXSTA_MINFILTER], - gl_tex->states[WINED3DTEXSTA_MIPFILTER]); - } - glValue = wined3d_gl_min_mip_filter(This->baseTexture.minMipLookup, - min(max(samplerStates[WINED3DSAMP_MINFILTER], WINED3DTEXF_POINT), WINED3DTEXF_LINEAR), - min(max(samplerStates[WINED3DSAMP_MIPFILTER], WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)); - - TRACE("ValueMIN=%d, ValueMIP=%d, setting MINFILTER to %x\n", - samplerStates[WINED3DSAMP_MINFILTER], - samplerStates[WINED3DSAMP_MIPFILTER], glValue); - glTexParameteri(textureDimensions, GL_TEXTURE_MIN_FILTER, glValue); - checkGLcall("glTexParameter GL_TEXTURE_MIN_FILTER, ..."); - - if (!cond_np2) - { - if (gl_tex->states[WINED3DTEXSTA_MIPFILTER] == WINED3DTEXF_NONE) - glValue = This->baseTexture.LOD; - else if (gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] >= This->baseTexture.level_count) - glValue = This->baseTexture.level_count - 1; - else if (gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] < This->baseTexture.LOD) - /* baseTexture.LOD is already clamped in the setter */ - glValue = This->baseTexture.LOD; - else - glValue = gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL]; - - /* Note that D3DSAMP_MAXMIPLEVEL specifies the biggest mipmap(default 0), while - * GL_TEXTURE_MAX_LEVEL specifies the smallest mimap used(default 1000). - * So D3DSAMP_MAXMIPLEVEL is the same as GL_TEXTURE_BASE_LEVEL. - */ - glTexParameteri(textureDimensions, GL_TEXTURE_BASE_LEVEL, glValue); - } - } - - if ((gl_tex->states[WINED3DTEXSTA_MAGFILTER] != WINED3DTEXF_ANISOTROPIC - && gl_tex->states[WINED3DTEXSTA_MINFILTER] != WINED3DTEXF_ANISOTROPIC - && gl_tex->states[WINED3DTEXSTA_MIPFILTER] != WINED3DTEXF_ANISOTROPIC) - || cond_np2) - { - aniso = 1; - } - else - { - aniso = samplerStates[WINED3DSAMP_MAXANISOTROPY]; - } - - if (gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] != aniso) - { - if (gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC]) - { - glTexParameteri(textureDimensions, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso); - checkGLcall("glTexParameteri(GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso)"); - } - else - { - WARN("Anisotropic filtering not supported.\n"); - } - gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] = aniso; - } - - if (!(This->resource.format->Flags & WINED3DFMT_FLAG_SHADOW) - != !gl_tex->states[WINED3DTEXSTA_SHADOW]) - { - if (This->resource.format->Flags & WINED3DFMT_FLAG_SHADOW) - { - glTexParameteri(textureDimensions, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE); - glTexParameteri(textureDimensions, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB); - checkGLcall("glTexParameteri(textureDimensions, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB)"); - gl_tex->states[WINED3DTEXSTA_SHADOW] = TRUE; - } - else - { - glTexParameteri(textureDimensions, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); - checkGLcall("glTexParameteri(textureDimensions, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE)"); - gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE; - } - } -} diff --git a/dll/directx/wine/wined3d/buffer.c b/dll/directx/wine/wined3d/buffer.c index 23b4a4ad67c..f2f806ec3e5 100644 --- a/dll/directx/wine/wined3d/buffer.c +++ b/dll/directx/wine/wined3d/buffer.c @@ -4,7 +4,7 @@ * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber * Copyright 2007-2010 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2010 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -287,11 +287,9 @@ static BOOL buffer_process_converted_attribute(struct wined3d_buffer *This, static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct wined3d_stream_info *si, UINT attrib_idx, const BOOL check_d3dcolor, const BOOL is_ffp_position, const BOOL is_ffp_color, - DWORD *stride_this_run, BOOL *float16_used) + DWORD *stride_this_run) { const struct wined3d_stream_info_element *attrib = &si->elements[attrib_idx]; - IWineD3DDeviceImpl *device = This->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; enum wined3d_format_id format; BOOL ret = FALSE; @@ -304,16 +302,7 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win format = attrib->format->id; /* Look for newly appeared conversion */ - if (!gl_info->supported[ARB_HALF_FLOAT_VERTEX] - && (format == WINED3DFMT_R16G16_FLOAT || format == WINED3DFMT_R16G16B16A16_FLOAT)) - { - ret = buffer_process_converted_attribute(This, CONV_FLOAT16_2, attrib, stride_this_run); - - if (is_ffp_position) FIXME("Test FLOAT16 fixed function processing positions\n"); - else if (is_ffp_color) FIXME("test FLOAT16 fixed function processing colors\n"); - *float16_used = TRUE; - } - else if (check_d3dcolor && format == WINED3DFMT_B8G8R8A8_UNORM) + if (check_d3dcolor && format == WINED3DFMT_B8G8R8A8_UNORM) { ret = buffer_process_converted_attribute(This, CONV_D3DCOLOR, attrib, stride_this_run); @@ -331,81 +320,15 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win return ret; } -static UINT *find_conversion_shift(struct wined3d_buffer *This, - const struct wined3d_stream_info *strided, UINT stride) -{ - UINT *ret, i, j, shift, orig_type_size; - - if (!stride) - { - TRACE("No shift\n"); - return NULL; - } - - This->conversion_stride = stride; - ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DWORD) * stride); - for (i = 0; i < MAX_ATTRIBS; ++i) - { - enum wined3d_format_id format; - - if (!(strided->use_map & (1 << i)) || strided->elements[i].buffer_object != This->buffer_object) continue; - - format = strided->elements[i].format->id; - if (format == WINED3DFMT_R16G16_FLOAT) - { - shift = 4; - } - else if (format == WINED3DFMT_R16G16B16A16_FLOAT) - { - shift = 8; - /* Pre-shift the last 4 bytes in the FLOAT16_4 by 4 bytes - this makes FLOAT16_2 and FLOAT16_4 conversions - * compatible - */ - for (j = 4; j < 8; ++j) - { - ret[(DWORD_PTR)strided->elements[i].data + j] += 4; - } - } - else - { - shift = 0; - } - This->conversion_stride += shift; - - if (shift) - { - orig_type_size = strided->elements[i].format->component_count - * strided->elements[i].format->component_size; - for (j = (DWORD_PTR)strided->elements[i].data + orig_type_size; j < stride; ++j) - { - ret[j] += shift; - } - } - } - - if (TRACE_ON(d3d)) - { - TRACE("Dumping conversion shift:\n"); - for (i = 0; i < stride; ++i) - { - TRACE("[%d]", ret[i]); - } - TRACE("\n"); - } - - return ret; -} - static BOOL buffer_find_decl(struct wined3d_buffer *This) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = This->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const struct wined3d_stream_info *si = &device->strided_streams; const struct wined3d_state *state = &device->stateBlock->state; UINT stride_this_run = 0; - BOOL float16_used = FALSE; BOOL ret = FALSE; - unsigned int i; + BOOL support_d3dcolor = gl_info->supported[ARB_VERTEX_ARRAY_BGRA]; /* In d3d7 the vertex buffer declaration NEVER changes because it is stored in the d3d7 vertex buffer. * Once we have our declaration there is no need to look it up again. Index buffers also never need @@ -416,6 +339,20 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This) if(This->resource.usage & WINED3DUSAGE_STATICDECL) return FALSE; } + if (use_vs(state)) + { + TRACE("Vertex shaders used, no VBO conversion is needed\n"); + if(This->conversion_map) + { + HeapFree(GetProcessHeap(), 0, This->conversion_map); + This->conversion_map = NULL; + This->stride = 0; + return TRUE; + } + + return FALSE; + } + TRACE("Finding vertex buffer conversion information\n"); /* Certain declaration types need some fixups before we can pass them to * opengl. This means D3DCOLOR attributes with fixed function vertex @@ -461,79 +398,31 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This) * conversion types depend on the semantic as well, for example a FLOAT4 * texcoord needs no conversion while a FLOAT4 positiont needs one */ - if (use_vs(state)) - { - TRACE("vshader\n"); - /* If the current vertex declaration is marked for no half float conversion don't bother to - * analyse the strided streams in depth, just set them up for no conversion. Return decl changed - * if we used conversion before - */ - if (!state->vertex_declaration->half_float_conv_needed) - { - if (This->conversion_map) - { - TRACE("Now using shaders without conversion, but conversion used before\n"); - HeapFree(GetProcessHeap(), 0, This->conversion_map); - HeapFree(GetProcessHeap(), 0, This->conversion_shift); - This->conversion_map = NULL; - This->stride = 0; - This->conversion_shift = NULL; - This->conversion_stride = 0; - return TRUE; - } - else - { - return FALSE; - } - } - for (i = 0; i < MAX_ATTRIBS; ++i) - { - ret = buffer_check_attribute(This, si, i, FALSE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - } - /* Recalculate the conversion shift map if the declaration has changed, - * and we're using float16 conversion or used it on the last run - */ - if (ret && (float16_used || This->conversion_map)) - { - HeapFree(GetProcessHeap(), 0, This->conversion_shift); - This->conversion_shift = find_conversion_shift(This, si, This->stride); - } - } - else - { - /* Fixed function is a bit trickier. We have to take care for D3DCOLOR types, FLOAT4 positions and of course - * FLOAT16s if not supported. Also, we can't iterate over the array, so use macros to generate code for all - * the attributes that our current fixed function pipeline implementation cares for. - */ - BOOL support_d3dcolor = gl_info->supported[ARB_VERTEX_ARRAY_BGRA]; - ret = buffer_check_attribute(This, si, WINED3D_FFP_POSITION, - TRUE, TRUE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_NORMAL, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_DIFFUSE, - !support_d3dcolor, FALSE, TRUE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_SPECULAR, - !support_d3dcolor, FALSE, TRUE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD0, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD1, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD2, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD3, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD4, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD5, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD6, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD7, - TRUE, FALSE, FALSE, &stride_this_run, &float16_used) || ret; - - if (float16_used) FIXME("Float16 conversion used with fixed function vertex processing\n"); - } + ret = buffer_check_attribute(This, si, WINED3D_FFP_POSITION, + TRUE, TRUE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_NORMAL, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_DIFFUSE, + !support_d3dcolor, FALSE, TRUE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_SPECULAR, + !support_d3dcolor, FALSE, TRUE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD0, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD1, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD2, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD3, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD4, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD5, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD6, + TRUE, FALSE, FALSE, &stride_this_run) || ret; + ret = buffer_check_attribute(This, si, WINED3D_FFP_TEXCOORD7, + TRUE, FALSE, FALSE, &stride_this_run) || ret; if (!stride_this_run && This->conversion_map) { @@ -549,36 +438,6 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This) return ret; } -/* Context activation is done by the caller. */ -static void buffer_check_buffer_object_size(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info) -{ - UINT size = This->conversion_stride ? - This->conversion_stride * (This->resource.size / This->stride) : This->resource.size; - if (This->buffer_object_size != size) - { - TRACE("Old size %u, creating new size %u\n", This->buffer_object_size, size); - - if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) - { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); - } - - /* Rescue the data before resizing the buffer object if we do not have our backup copy */ - if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)) - { - buffer_get_sysmem(This, gl_info); - } - - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); - checkGLcall("glBindBufferARB"); - GL_EXTCALL(glBufferDataARB(This->buffer_type_hint, size, NULL, This->buffer_object_usage)); - This->buffer_object_size = size; - checkGLcall("glBufferDataARB"); - LEAVE_GL(); - } -} - static inline void fixup_d3dcolor(DWORD *dst_color) { DWORD src_color = *dst_color; @@ -611,24 +470,23 @@ static inline void fixup_transformed_pos(float *p) } /* Context activation is done by the caller. */ -const BYTE *buffer_get_memory(IWineD3DBuffer *iface, const struct wined3d_gl_info *gl_info, GLuint *buffer_object) +const BYTE *buffer_get_memory(struct wined3d_buffer *buffer, + const struct wined3d_gl_info *gl_info, GLuint *buffer_object) { - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; - - *buffer_object = This->buffer_object; - if (!This->buffer_object) + *buffer_object = buffer->buffer_object; + if (!buffer->buffer_object) { - if (This->flags & WINED3D_BUFFER_CREATEBO) + if (buffer->flags & WINED3D_BUFFER_CREATEBO) { - buffer_create_buffer_object(This, gl_info); - This->flags &= ~WINED3D_BUFFER_CREATEBO; - if (This->buffer_object) + buffer_create_buffer_object(buffer, gl_info); + buffer->flags &= ~WINED3D_BUFFER_CREATEBO; + if (buffer->buffer_object) { - *buffer_object = This->buffer_object; + *buffer_object = buffer->buffer_object; return NULL; } } - return This->resource.allocatedMemory; + return buffer->resource.allocatedMemory; } else { @@ -636,36 +494,11 @@ const BYTE *buffer_get_memory(IWineD3DBuffer *iface, const struct wined3d_gl_inf } } -/* IUnknown methods */ - -static HRESULT STDMETHODCALLTYPE buffer_QueryInterface(IWineD3DBuffer *iface, - REFIID riid, void **object) +ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer) { - TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + ULONG refcount = InterlockedIncrement(&buffer->resource.ref); - if (IsEqualGUID(riid, &IID_IWineD3DBuffer) - || IsEqualGUID(riid, &IID_IWineD3DResource) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); - - *object = NULL; - - return E_NOINTERFACE; -} - -static ULONG STDMETHODCALLTYPE buffer_AddRef(IWineD3DBuffer *iface) -{ - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; - ULONG refcount = InterlockedIncrement(&This->resource.ref); - - TRACE("%p increasing refcount to %u\n", This, refcount); + TRACE("%p increasing refcount to %u.\n", buffer, refcount); return refcount; } @@ -678,6 +511,12 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_inf This->resource.heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->resource.size + RESOURCE_ALIGNMENT); This->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + + if (This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + { + IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); + } + ENTER_GL(); GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); GL_EXTCALL(glGetBufferSubDataARB(This->buffer_type_hint, 0, This->resource.size, This->resource.allocatedMemory)); @@ -688,99 +527,93 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_inf } /* Do not call while under the GL lock. */ -static void STDMETHODCALLTYPE buffer_UnLoad(IWineD3DBuffer *iface) +static void buffer_unload(struct wined3d_resource *resource) { - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; + struct wined3d_buffer *buffer = buffer_from_resource(resource); - TRACE("iface %p\n", iface); + TRACE("buffer %p.\n", buffer); - if (This->buffer_object) + if (buffer->buffer_object) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = resource->device; struct wined3d_context *context; context = context_acquire(device, NULL); /* Download the buffer, but don't permanently enable double buffering */ - if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)) + if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER)) { - buffer_get_sysmem(This, context->gl_info); - This->flags &= ~WINED3D_BUFFER_DOUBLEBUFFER; + buffer_get_sysmem(buffer, context->gl_info); + buffer->flags &= ~WINED3D_BUFFER_DOUBLEBUFFER; } - delete_gl_buffer(This, context->gl_info); - This->flags |= WINED3D_BUFFER_CREATEBO; /* Recreate the buffer object next load */ - buffer_clear_dirty_areas(This); + delete_gl_buffer(buffer, context->gl_info); + buffer->flags |= WINED3D_BUFFER_CREATEBO; /* Recreate the buffer object next load */ + buffer_clear_dirty_areas(buffer); context_release(context); - HeapFree(GetProcessHeap(), 0, This->conversion_shift); - This->conversion_shift = NULL; - HeapFree(GetProcessHeap(), 0, This->conversion_map); - This->conversion_map = NULL; - This->stride = 0; - This->conversion_stride = 0; - This->flags &= ~WINED3D_BUFFER_HASDESC; + HeapFree(GetProcessHeap(), 0, buffer->conversion_map); + buffer->conversion_map = NULL; + buffer->stride = 0; + buffer->conversion_stride = 0; + buffer->flags &= ~WINED3D_BUFFER_HASDESC; } - resource_unload((IWineD3DResourceImpl *)This); + resource_unload(resource); } /* Do not call while under the GL lock. */ -static ULONG STDMETHODCALLTYPE buffer_Release(IWineD3DBuffer *iface) +ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer) { - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; - ULONG refcount = InterlockedDecrement(&This->resource.ref); + ULONG refcount = InterlockedDecrement(&buffer->resource.ref); - TRACE("%p decreasing refcount to %u\n", This, refcount); + TRACE("%p decreasing refcount to %u.\n", buffer, refcount); if (!refcount) { - buffer_UnLoad(iface); - resource_cleanup((IWineD3DResource *)iface); - This->resource.parent_ops->wined3d_object_destroyed(This->resource.parent); - HeapFree(GetProcessHeap(), 0, This->maps); - HeapFree(GetProcessHeap(), 0, This); + buffer_unload(&buffer->resource); + resource_cleanup(&buffer->resource); + buffer->resource.parent_ops->wined3d_object_destroyed(buffer->resource.parent); + HeapFree(GetProcessHeap(), 0, buffer->maps); + HeapFree(GetProcessHeap(), 0, buffer); } return refcount; } -/* IWineD3DBase methods */ -static void * STDMETHODCALLTYPE buffer_GetParent(IWineD3DBuffer *iface) +void * CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer) { - TRACE("iface %p.\n", iface); + TRACE("buffer %p.\n", buffer); - return ((struct wined3d_buffer *)iface)->resource.parent; + return buffer->resource.parent; } -/* IWineD3DResource methods */ - -static HRESULT STDMETHODCALLTYPE buffer_SetPrivateData(IWineD3DBuffer *iface, +HRESULT CDECL wined3d_buffer_set_private_data(struct wined3d_buffer *buffer, REFGUID guid, const void *data, DWORD data_size, DWORD flags) { - return resource_set_private_data((IWineD3DResource *)iface, guid, data, data_size, flags); + return resource_set_private_data(&buffer->resource, guid, data, data_size, flags); } -static HRESULT STDMETHODCALLTYPE buffer_GetPrivateData(IWineD3DBuffer *iface, +HRESULT CDECL wined3d_buffer_get_private_data(const struct wined3d_buffer *buffer, REFGUID guid, void *data, DWORD *data_size) { - return resource_get_private_data((IWineD3DResource *)iface, guid, data, data_size); + return resource_get_private_data(&buffer->resource, guid, data, data_size); } -static HRESULT STDMETHODCALLTYPE buffer_FreePrivateData(IWineD3DBuffer *iface, REFGUID guid) +HRESULT CDECL wined3d_buffer_free_private_data(struct wined3d_buffer *buffer, REFGUID guid) { - return resource_free_private_data((IWineD3DResource *)iface, guid); + return resource_free_private_data(&buffer->resource, guid); } -static DWORD STDMETHODCALLTYPE buffer_SetPriority(IWineD3DBuffer *iface, DWORD priority) +DWORD CDECL wined3d_buffer_set_priority(struct wined3d_buffer *buffer, DWORD priority) { - return resource_set_priority((IWineD3DResource *)iface, priority); + return resource_set_priority(&buffer->resource, priority); } -static DWORD STDMETHODCALLTYPE buffer_GetPriority(IWineD3DBuffer *iface) +DWORD CDECL wined3d_buffer_get_priority(const struct wined3d_buffer *buffer) { - return resource_get_priority((IWineD3DResource *)iface); + return resource_get_priority(&buffer->resource); } /* The caller provides a context and binds the buffer */ @@ -857,120 +690,124 @@ drop_query: /* The caller provides a GL context */ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info, DWORD flags) { - BYTE *map; - UINT start = 0, len = 0; + BYTE *map; + UINT start = 0, len = 0; + + ENTER_GL(); + + /* This potentially invalidates the element array buffer binding, but the + * caller always takes care of this. */ + GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + checkGLcall("glBindBufferARB"); + if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + { + GLbitfield mapflags; + mapflags = GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; + if (flags & WINED3D_BUFFER_DISCARD) + { + mapflags |= GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_BUFFER_BIT; + } + else if (flags & WINED3D_BUFFER_NOSYNC) + { + mapflags |= GL_MAP_UNSYNCHRONIZED_BIT; + } + map = GL_EXTCALL(glMapBufferRange(This->buffer_type_hint, 0, + This->resource.size, mapflags)); + checkGLcall("glMapBufferRange"); + } + else + { + if (This->flags & WINED3D_BUFFER_APPLESYNC) + { + DWORD syncflags = 0; + if (flags & WINED3D_BUFFER_DISCARD) syncflags |= WINED3DLOCK_DISCARD; + if (flags & WINED3D_BUFFER_NOSYNC) syncflags |= WINED3DLOCK_NOOVERWRITE; + LEAVE_GL(); + buffer_sync_apple(This, syncflags, gl_info); + ENTER_GL(); + } + map = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_WRITE_ONLY_ARB)); + checkGLcall("glMapBufferARB"); + } + if (!map) + { + LEAVE_GL(); + ERR("Failed to map opengl buffer\n"); + return; + } + + while (This->modified_areas) + { + This->modified_areas--; + start = This->maps[This->modified_areas].offset; + len = This->maps[This->modified_areas].size; + + memcpy(map + start, This->resource.allocatedMemory + start, len); - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); - checkGLcall("glBindBufferARB"); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { - GLbitfield mapflags; - mapflags = GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; - if (flags & WINED3D_BUFFER_DISCARD) - { - mapflags |= GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_BUFFER_BIT; - } - else if (flags & WINED3D_BUFFER_NOSYNC) - { - mapflags |= GL_MAP_UNSYNCHRONIZED_BIT; - } - map = GL_EXTCALL(glMapBufferRange(This->buffer_type_hint, 0, - This->resource.size, mapflags)); - checkGLcall("glMapBufferRange"); + GL_EXTCALL(glFlushMappedBufferRange(This->buffer_type_hint, start, len)); + checkGLcall("glFlushMappedBufferRange"); } - else + else if (This->flags & WINED3D_BUFFER_FLUSH) { - if (This->flags & WINED3D_BUFFER_APPLESYNC) - { - DWORD syncflags = 0; - if (flags & WINED3D_BUFFER_DISCARD) syncflags |= WINED3DLOCK_DISCARD; - if (flags & WINED3D_BUFFER_NOSYNC) syncflags |= WINED3DLOCK_NOOVERWRITE; - LEAVE_GL(); - buffer_sync_apple(This, syncflags, gl_info); - ENTER_GL(); - } - map = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_WRITE_ONLY_ARB)); - checkGLcall("glMapBufferARB"); - } - if (!map) - { - LEAVE_GL(); - ERR("Failed to map opengl buffer\n"); - return; + GL_EXTCALL(glFlushMappedBufferRangeAPPLE(This->buffer_type_hint, start, len)); + checkGLcall("glFlushMappedBufferRangeAPPLE"); } + } + GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint)); + checkGLcall("glUnmapBufferARB"); - while(This->modified_areas) - { - This->modified_areas--; - start = This->maps[This->modified_areas].offset; - len = This->maps[This->modified_areas].size; - - memcpy(map + start, This->resource.allocatedMemory + start, len); - - if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) - { - GL_EXTCALL(glFlushMappedBufferRange(This->buffer_type_hint, start, len)); - checkGLcall("glFlushMappedBufferRange"); - } - else if (This->flags & WINED3D_BUFFER_FLUSH) - { - GL_EXTCALL(glFlushMappedBufferRangeAPPLE(This->buffer_type_hint, start, len)); - checkGLcall("glFlushMappedBufferRangeAPPLE"); - } - } - GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint)); - checkGLcall("glUnmapBufferARB"); - LEAVE_GL(); + LEAVE_GL(); } /* Do not call while under the GL lock. */ -static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) +void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer) { - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; - IWineD3DDeviceImpl *device = This->resource.device; + DWORD flags = buffer->flags & (WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD); + struct wined3d_device *device = buffer->resource.device; UINT start = 0, end = 0, len = 0, vertices; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; BOOL decl_changed = FALSE; unsigned int i, j; BYTE *data; - DWORD flags = This->flags & (WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD); - TRACE("iface %p\n", iface); - This->flags &= ~(WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD); + TRACE("buffer %p.\n", buffer); - context = context_acquire(device, NULL); - gl_info = context->gl_info; + buffer->flags &= ~(WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD); - if (!This->buffer_object) + if (!buffer->buffer_object) { /* TODO: Make converting independent from VBOs */ - if (This->flags & WINED3D_BUFFER_CREATEBO) + if (buffer->flags & WINED3D_BUFFER_CREATEBO) { - buffer_create_buffer_object(This, gl_info); - This->flags &= ~WINED3D_BUFFER_CREATEBO; + context = context_acquire(device, NULL); + buffer_create_buffer_object(buffer, context->gl_info); + context_release(context); + buffer->flags &= ~WINED3D_BUFFER_CREATEBO; } else { /* Not doing any conversion */ - goto end; + return; } } /* Reading the declaration makes only sense if the stateblock is finalized and the buffer bound to a stream */ - if (device->isInDraw && This->bind_count > 0) + if (device->isInDraw && buffer->bind_count > 0) { - decl_changed = buffer_find_decl(This); - This->flags |= WINED3D_BUFFER_HASDESC; + decl_changed = buffer_find_decl(buffer); + buffer->flags |= WINED3D_BUFFER_HASDESC; } - if (!decl_changed && !(This->flags & WINED3D_BUFFER_HASDESC && buffer_is_dirty(This))) + if (!decl_changed && !(buffer->flags & WINED3D_BUFFER_HASDESC && buffer_is_dirty(buffer))) { - context_release(context); - ++This->draw_count; - if (This->draw_count > VB_RESETDECLCHANGE) This->decl_change_count = 0; - if (This->draw_count > VB_RESETFULLCONVS) This->full_conversion_count = 0; + ++buffer->draw_count; + if (buffer->draw_count > VB_RESETDECLCHANGE) + buffer->decl_change_count = 0; + if (buffer->draw_count > VB_RESETFULLCONVS) + buffer->full_conversion_count = 0; return; } @@ -980,34 +817,33 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) */ if (decl_changed) { - ++This->decl_change_count; - This->draw_count = 0; + ++buffer->decl_change_count; + buffer->draw_count = 0; - if (This->decl_change_count > VB_MAXDECLCHANGES || - (This->conversion_map && (This->resource.usage & WINED3DUSAGE_DYNAMIC))) + if (buffer->decl_change_count > VB_MAXDECLCHANGES + || (buffer->conversion_map && (buffer->resource.usage & WINED3DUSAGE_DYNAMIC))) { FIXME("Too many declaration changes or converting dynamic buffer, stopping converting\n"); - IWineD3DBuffer_UnLoad(iface); - This->flags &= ~WINED3D_BUFFER_CREATEBO; + buffer_unload(&buffer->resource); + buffer->flags &= ~WINED3D_BUFFER_CREATEBO; - /* The stream source state handler might have read the memory of the vertex buffer already - * and got the memory in the vbo which is not valid any longer. Dirtify the stream source - * to force a reload. This happens only once per changed vertexbuffer and should occur rather - * rarely - */ + /* The stream source state handler might have read the memory of + * the vertex buffer already and got the memory in the vbo which + * is not valid any longer. Dirtify the stream source to force a + * reload. This happens only once per changed vertexbuffer and + * should occur rather rarely. */ IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); - goto end; + return; } - buffer_check_buffer_object_size(This, gl_info); /* The declaration changed, reload the whole buffer */ WARN("Reloading buffer because of decl change\n"); - buffer_clear_dirty_areas(This); - if(!buffer_add_dirty_area(This, 0, 0)) + buffer_clear_dirty_areas(buffer); + if (!buffer_add_dirty_area(buffer, 0, 0)) { ERR("buffer_add_dirty_area failed, this is not expected\n"); - goto end; + return; } /* Avoid unfenced updates, we might overwrite more areas of the buffer than the application * cleared for unsynchronized updates @@ -1020,172 +856,111 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) * changes it every minute drop the VBO after VB_MAX_DECL_CHANGES minutes. So count draws without * decl changes and reset the decl change count after a specific number of them */ - if(buffer_is_fully_dirty(This)) + if (buffer->conversion_map && buffer_is_fully_dirty(buffer)) { - ++This->full_conversion_count; - if(This->full_conversion_count > VB_MAXFULLCONVERSIONS) + ++buffer->full_conversion_count; + if (buffer->full_conversion_count > VB_MAXFULLCONVERSIONS) { - FIXME("Too many full buffer conversions, stopping converting\n"); - IWineD3DBuffer_UnLoad(iface); - This->flags &= ~WINED3D_BUFFER_CREATEBO; + FIXME("Too many full buffer conversions, stopping converting.\n"); + buffer_unload(&buffer->resource); + buffer->flags &= ~WINED3D_BUFFER_CREATEBO; IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); - goto end; + return; } } else { - ++This->draw_count; - if (This->draw_count > VB_RESETDECLCHANGE) This->decl_change_count = 0; - if (This->draw_count > VB_RESETFULLCONVS) This->full_conversion_count = 0; + ++buffer->draw_count; + if (buffer->draw_count > VB_RESETDECLCHANGE) + buffer->decl_change_count = 0; + if (buffer->draw_count > VB_RESETFULLCONVS) + buffer->full_conversion_count = 0; } } - if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) - { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); - } + if (buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); - if (!This->conversion_map) + if (!buffer->conversion_map) { - /* That means that there is nothing to fixup. Just upload from This->resource.allocatedMemory - * directly into the vbo. Do not free the system memory copy because drawPrimitive may need it if - * the stride is 0, for instancing emulation, vertex blending emulation or shader emulation. - */ - TRACE("No conversion needed\n"); + /* That means that there is nothing to fixup. Just upload from + * buffer->resource.allocatedMemory directly into the vbo. Do not + * free the system memory copy because drawPrimitive may need it if + * the stride is 0, for instancing emulation, vertex blending + * emulation or shader emulation. */ + TRACE("No conversion needed.\n"); /* Nothing to do because we locked directly into the vbo */ - if (!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)) + if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER)) { - context_release(context); return; } - buffer_direct_upload(This, context->gl_info, flags); + context = context_acquire(device, NULL); + buffer_direct_upload(buffer, context->gl_info, flags); context_release(context); return; } - if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)) + context = context_acquire(device, NULL); + gl_info = context->gl_info; + + if(!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER)) { - buffer_get_sysmem(This, gl_info); + buffer_get_sysmem(buffer, gl_info); } /* Now for each vertex in the buffer that needs conversion */ - vertices = This->resource.size / This->stride; + vertices = buffer->resource.size / buffer->stride; - if (This->conversion_shift) + data = HeapAlloc(GetProcessHeap(), 0, buffer->resource.size); + + while(buffer->modified_areas) { - TRACE("Shifted conversion\n"); - data = HeapAlloc(GetProcessHeap(), 0, vertices * This->conversion_stride); - - start = 0; - len = This->resource.size; + buffer->modified_areas--; + start = buffer->maps[buffer->modified_areas].offset; + len = buffer->maps[buffer->modified_areas].size; end = start + len; - if (This->maps[0].offset || This->maps[0].size != This->resource.size) + memcpy(data + start, buffer->resource.allocatedMemory + start, end - start); + for (i = start / buffer->stride; i < min((end / buffer->stride) + 1, vertices); ++i) { - FIXME("Implement partial buffer load with shifted conversion\n"); - } - - for (i = start / This->stride; i < min((end / This->stride) + 1, vertices); ++i) - { - for (j = 0; j < This->stride; ++j) + for (j = 0; j < buffer->stride; ++j) { - switch(This->conversion_map[j]) + switch (buffer->conversion_map[j]) { case CONV_NONE: - data[This->conversion_stride * i + j + This->conversion_shift[j]] - = This->resource.allocatedMemory[This->stride * i + j]; + /* Done already */ + j += 3; + break; + case CONV_D3DCOLOR: + fixup_d3dcolor((DWORD *) (data + i * buffer->stride + j)); + j += 3; break; - case CONV_FLOAT16_2: - { - float *out = (float *)(&data[This->conversion_stride * i + j + This->conversion_shift[j]]); - const WORD *in = (WORD *)(&This->resource.allocatedMemory[i * This->stride + j]); - - out[1] = float_16_to_32(in + 1); - out[0] = float_16_to_32(in + 0); - j += 3; /* Skip 3 additional bytes,as a FLOAT16_2 has 4 bytes */ + case CONV_POSITIONT: + fixup_transformed_pos((float *) (data + i * buffer->stride + j)); + j += 15; break; - } - default: - FIXME("Unimplemented conversion %d in shifted conversion\n", This->conversion_map[j]); - break; + FIXME("Unimplemented conversion %d in shifted conversion\n", buffer->conversion_map[j]); } } } ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + GL_EXTCALL(glBindBufferARB(buffer->buffer_type_hint, buffer->buffer_object)); checkGLcall("glBindBufferARB"); - GL_EXTCALL(glBufferSubDataARB(This->buffer_type_hint, 0, vertices * This->conversion_stride, data)); + GL_EXTCALL(glBufferSubDataARB(buffer->buffer_type_hint, start, len, data + start)); checkGLcall("glBufferSubDataARB"); LEAVE_GL(); } - else - { - data = HeapAlloc(GetProcessHeap(), 0, This->resource.size); - - while(This->modified_areas) - { - This->modified_areas--; - start = This->maps[This->modified_areas].offset; - len = This->maps[This->modified_areas].size; - end = start + len; - - memcpy(data + start, This->resource.allocatedMemory + start, end - start); - for (i = start / This->stride; i < min((end / This->stride) + 1, vertices); ++i) - { - for (j = 0; j < This->stride; ++j) - { - switch(This->conversion_map[j]) - { - case CONV_NONE: - /* Done already */ - j += 3; - break; - case CONV_D3DCOLOR: - fixup_d3dcolor((DWORD *) (data + i * This->stride + j)); - j += 3; - break; - - case CONV_POSITIONT: - fixup_transformed_pos((float *) (data + i * This->stride + j)); - j += 15; - break; - - case CONV_FLOAT16_2: - ERR("Did not expect FLOAT16 conversion in unshifted conversion\n"); - default: - FIXME("Unimplemented conversion %d in shifted conversion\n", This->conversion_map[j]); - } - } - } - - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); - checkGLcall("glBindBufferARB"); - GL_EXTCALL(glBufferSubDataARB(This->buffer_type_hint, start, len, data + start)); - checkGLcall("glBufferSubDataARB"); - LEAVE_GL(); - } - } HeapFree(GetProcessHeap(), 0, data); - -end: context_release(context); } -static WINED3DRESOURCETYPE STDMETHODCALLTYPE buffer_GetType(IWineD3DBuffer *iface) -{ - return resource_get_type((IWineD3DResource *)iface); -} - -/* IWineD3DBuffer methods */ - static DWORD buffer_sanitize_flags(struct wined3d_buffer *buffer, DWORD flags) { /* Not all flags make sense together, but Windows never returns an error. Catch the @@ -1236,75 +1011,80 @@ static GLbitfield buffer_gl_map_flags(DWORD d3d_flags) return ret; } -static HRESULT STDMETHODCALLTYPE buffer_Map(IWineD3DBuffer *iface, UINT offset, UINT size, BYTE **data, DWORD flags) +struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer) { - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; + TRACE("buffer %p.\n", buffer); + + return &buffer->resource; +} + +HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UINT size, BYTE **data, DWORD flags) +{ + BOOL dirty = buffer_is_dirty(buffer); LONG count; - BOOL dirty = buffer_is_dirty(This); - TRACE("iface %p, offset %u, size %u, data %p, flags %#x\n", iface, offset, size, data, flags); + TRACE("buffer %p, offset %u, size %u, data %p, flags %#x\n", buffer, offset, size, data, flags); - flags = buffer_sanitize_flags(This, flags); + flags = buffer_sanitize_flags(buffer, flags); if (!(flags & WINED3DLOCK_READONLY)) { - if (!buffer_add_dirty_area(This, offset, size)) return E_OUTOFMEMORY; + if (!buffer_add_dirty_area(buffer, offset, size)) return E_OUTOFMEMORY; } - count = InterlockedIncrement(&This->lock_count); + count = InterlockedIncrement(&buffer->lock_count); - if (This->buffer_object) + if (buffer->buffer_object) { - if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER)) + if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER)) { - if(count == 1) + if (count == 1) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = buffer->resource.device; struct wined3d_context *context; const struct wined3d_gl_info *gl_info; - if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) - { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); - } + if (buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); context = context_acquire(device, NULL); gl_info = context->gl_info; ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + GL_EXTCALL(glBindBufferARB(buffer->buffer_type_hint, buffer->buffer_object)); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { GLbitfield mapflags = buffer_gl_map_flags(flags); - This->resource.allocatedMemory = GL_EXTCALL(glMapBufferRange(This->buffer_type_hint, 0, - This->resource.size, mapflags)); + buffer->resource.allocatedMemory = GL_EXTCALL(glMapBufferRange(buffer->buffer_type_hint, + 0, buffer->resource.size, mapflags)); checkGLcall("glMapBufferRange"); } else { - if(This->flags & WINED3D_BUFFER_APPLESYNC) + if (buffer->flags & WINED3D_BUFFER_APPLESYNC) { LEAVE_GL(); - buffer_sync_apple(This, flags, gl_info); + buffer_sync_apple(buffer, flags, gl_info); ENTER_GL(); } - This->resource.allocatedMemory = GL_EXTCALL(glMapBufferARB(This->buffer_type_hint, GL_READ_WRITE_ARB)); + buffer->resource.allocatedMemory = GL_EXTCALL(glMapBufferARB(buffer->buffer_type_hint, + GL_READ_WRITE_ARB)); checkGLcall("glMapBufferARB"); } LEAVE_GL(); - if (((DWORD_PTR) This->resource.allocatedMemory) & (RESOURCE_ALIGNMENT - 1)) + if (((DWORD_PTR)buffer->resource.allocatedMemory) & (RESOURCE_ALIGNMENT - 1)) { - WARN("Pointer %p is not %u byte aligned, falling back to double buffered operation\n", - This->resource.allocatedMemory, RESOURCE_ALIGNMENT); + WARN("Pointer %p is not %u byte aligned, falling back to double buffered operation.\n", + buffer->resource.allocatedMemory, RESOURCE_ALIGNMENT); ENTER_GL(); - GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint)); + GL_EXTCALL(glUnmapBufferARB(buffer->buffer_type_hint)); checkGLcall("glUnmapBufferARB"); LEAVE_GL(); - This->resource.allocatedMemory = NULL; + buffer->resource.allocatedMemory = NULL; - buffer_get_sysmem(This, gl_info); - TRACE("New pointer is %p\n", This->resource.allocatedMemory); + buffer_get_sysmem(buffer, gl_info); + TRACE("New pointer is %p.\n", buffer->resource.allocatedMemory); } context_release(context); } @@ -1313,143 +1093,108 @@ static HRESULT STDMETHODCALLTYPE buffer_Map(IWineD3DBuffer *iface, UINT offset, { if (dirty) { - if (This->flags & WINED3D_BUFFER_NOSYNC && !(flags & WINED3DLOCK_NOOVERWRITE)) + if (buffer->flags & WINED3D_BUFFER_NOSYNC && !(flags & WINED3DLOCK_NOOVERWRITE)) { - This->flags &= ~WINED3D_BUFFER_NOSYNC; + buffer->flags &= ~WINED3D_BUFFER_NOSYNC; } } else if(flags & WINED3DLOCK_NOOVERWRITE) { - This->flags |= WINED3D_BUFFER_NOSYNC; + buffer->flags |= WINED3D_BUFFER_NOSYNC; } if (flags & WINED3DLOCK_DISCARD) { - This->flags |= WINED3D_BUFFER_DISCARD; + buffer->flags |= WINED3D_BUFFER_DISCARD; } } } - *data = This->resource.allocatedMemory + offset; + *data = buffer->resource.allocatedMemory + offset; - TRACE("Returning memory at %p (base %p, offset %u)\n", *data, This->resource.allocatedMemory, offset); - /* TODO: check Flags compatibility with This->currentDesc.Usage (see MSDN) */ + TRACE("Returning memory at %p (base %p, offset %u).\n", *data, buffer->resource.allocatedMemory, offset); + /* TODO: check Flags compatibility with buffer->currentDesc.Usage (see MSDN) */ return WINED3D_OK; } -static HRESULT STDMETHODCALLTYPE buffer_Unmap(IWineD3DBuffer *iface) +void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer) { - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; ULONG i; - TRACE("(%p)\n", This); + TRACE("buffer %p.\n", buffer); /* In the case that the number of Unmap calls > the * number of Map calls, d3d returns always D3D_OK. * This is also needed to prevent Map from returning garbage on * the next call (this will happen if the lock_count is < 0). */ - if (!This->lock_count) + if (!buffer->lock_count) { - TRACE("Unmap called without a previous Map call!\n"); - return WINED3D_OK; + WARN("Unmap called without a previous map call.\n"); + return; } - if (InterlockedDecrement(&This->lock_count)) + if (InterlockedDecrement(&buffer->lock_count)) { /* Delay loading the buffer until everything is unlocked */ - TRACE("Ignoring unlock\n"); - return WINED3D_OK; + TRACE("Ignoring unmap.\n"); + return; } - if(!(This->flags & WINED3D_BUFFER_DOUBLEBUFFER) && This->buffer_object) + if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER) && buffer->buffer_object) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = buffer->resource.device; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; - if(This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + if (buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_INDEXBUFFER); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); } context = context_acquire(device, NULL); gl_info = context->gl_info; ENTER_GL(); - GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object)); + GL_EXTCALL(glBindBufferARB(buffer->buffer_type_hint, buffer->buffer_object)); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { - for(i = 0; i < This->modified_areas; i++) + for (i = 0; i < buffer->modified_areas; ++i) { - GL_EXTCALL(glFlushMappedBufferRange(This->buffer_type_hint, - This->maps[i].offset, - This->maps[i].size)); + GL_EXTCALL(glFlushMappedBufferRange(buffer->buffer_type_hint, + buffer->maps[i].offset, buffer->maps[i].size)); checkGLcall("glFlushMappedBufferRange"); } } - else if (This->flags & WINED3D_BUFFER_FLUSH) + else if (buffer->flags & WINED3D_BUFFER_FLUSH) { - for(i = 0; i < This->modified_areas; i++) + for (i = 0; i < buffer->modified_areas; ++i) { - GL_EXTCALL(glFlushMappedBufferRangeAPPLE(This->buffer_type_hint, - This->maps[i].offset, - This->maps[i].size)); + GL_EXTCALL(glFlushMappedBufferRangeAPPLE(buffer->buffer_type_hint, + buffer->maps[i].offset, buffer->maps[i].size)); checkGLcall("glFlushMappedBufferRangeAPPLE"); } } - GL_EXTCALL(glUnmapBufferARB(This->buffer_type_hint)); + GL_EXTCALL(glUnmapBufferARB(buffer->buffer_type_hint)); LEAVE_GL(); context_release(context); - This->resource.allocatedMemory = NULL; - buffer_clear_dirty_areas(This); + buffer->resource.allocatedMemory = NULL; + buffer_clear_dirty_areas(buffer); } - else if (This->flags & WINED3D_BUFFER_HASDESC) + else if (buffer->flags & WINED3D_BUFFER_HASDESC) { - buffer_PreLoad(iface); + wined3d_buffer_preload(buffer); } - - return WINED3D_OK; } -static void STDMETHODCALLTYPE buffer_GetDesc(IWineD3DBuffer *iface, WINED3DBUFFER_DESC *desc) +static const struct wined3d_resource_ops buffer_resource_ops = { - struct wined3d_buffer *This = (struct wined3d_buffer *)iface; - - TRACE("(%p)\n", This); - - desc->Type = This->resource.resourceType; - desc->Usage = This->resource.usage; - desc->Pool = This->resource.pool; - desc->Size = This->resource.size; -} - -static const struct IWineD3DBufferVtbl wined3d_buffer_vtbl = -{ - /* IUnknown methods */ - buffer_QueryInterface, - buffer_AddRef, - buffer_Release, - /* IWineD3DBase methods */ - buffer_GetParent, - /* IWineD3DResource methods */ - buffer_SetPrivateData, - buffer_GetPrivateData, - buffer_FreePrivateData, - buffer_SetPriority, - buffer_GetPriority, - buffer_PreLoad, - buffer_UnLoad, - buffer_GetType, - /* IWineD3DBuffer methods */ - buffer_Map, - buffer_Unmap, - buffer_GetDesc, + buffer_unload, }; -HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device, +static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device, UINT size, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, GLenum bind_hint, const char *data, void *parent, const struct wined3d_parent_ops *parent_ops) { @@ -1464,10 +1209,9 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device, return WINED3DERR_INVALIDCALL; } - buffer->vtbl = &wined3d_buffer_vtbl; - - hr = resource_init((IWineD3DResource *)buffer, WINED3DRTYPE_BUFFER, - device, size, usage, format, pool, parent, parent_ops); + hr = resource_init(&buffer->resource, device, WINED3DRTYPE_BUFFER, format, + WINED3DMULTISAMPLE_NONE, 0, usage, pool, size, 1, 1, size, + parent, parent_ops, &buffer_resource_ops); if (FAILED(hr)) { WARN("Failed to initialize resource, hr %#x\n", hr); @@ -1509,36 +1253,137 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device, { BYTE *ptr; - hr = IWineD3DBuffer_Map((IWineD3DBuffer *)buffer, 0, size, &ptr, 0); + hr = wined3d_buffer_map(buffer, 0, size, &ptr, 0); if (FAILED(hr)) { ERR("Failed to map buffer, hr %#x\n", hr); - buffer_UnLoad((IWineD3DBuffer *)buffer); - resource_cleanup((IWineD3DResource *)buffer); + buffer_unload(&buffer->resource); + resource_cleanup(&buffer->resource); return hr; } memcpy(ptr, data, size); - hr = IWineD3DBuffer_Unmap((IWineD3DBuffer *)buffer); - if (FAILED(hr)) - { - ERR("Failed to unmap buffer, hr %#x\n", hr); - buffer_UnLoad((IWineD3DBuffer *)buffer); - resource_cleanup((IWineD3DResource *)buffer); - return hr; - } + wined3d_buffer_unmap(buffer); } buffer->maps = HeapAlloc(GetProcessHeap(), 0, sizeof(*buffer->maps)); if (!buffer->maps) { ERR("Out of memory\n"); - buffer_UnLoad((IWineD3DBuffer *)buffer); - resource_cleanup((IWineD3DResource *)buffer); + buffer_unload(&buffer->resource); + resource_cleanup(&buffer->resource); return E_OUTOFMEMORY; } buffer->maps_size = 1; return WINED3D_OK; } + +HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, struct wined3d_buffer_desc *desc, const void *data, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer) +{ + struct wined3d_buffer *object; + HRESULT hr; + + TRACE("device %p, desc %p, data %p, parent %p, buffer %p\n", device, desc, data, parent, buffer); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate memory\n"); + return E_OUTOFMEMORY; + } + + FIXME("Ignoring access flags (pool)\n"); + + hr = buffer_init(object, device, desc->byte_width, desc->usage, WINED3DFMT_UNKNOWN, + WINED3DPOOL_MANAGED, GL_ARRAY_BUFFER_ARB, data, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize buffer, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + object->desc = *desc; + + TRACE("Created buffer %p.\n", object); + + *buffer = object; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_buffer_create_vb(struct wined3d_device *device, UINT size, DWORD usage, WINED3DPOOL pool, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer) +{ + struct wined3d_buffer *object; + HRESULT hr; + + TRACE("device %p, size %u, usage %#x, pool %#x, parent %p, parent_ops %p, buffer %p.\n", + device, size, usage, pool, parent, parent_ops, buffer); + + if (pool == WINED3DPOOL_SCRATCH) + { + /* The d3d9 tests shows that this is not allowed. It doesn't make much + * sense anyway, SCRATCH buffers wouldn't be usable anywhere. */ + WARN("Vertex buffer in WINED3DPOOL_SCRATCH requested, returning WINED3DERR_INVALIDCALL.\n"); + *buffer = NULL; + return WINED3DERR_INVALIDCALL; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Out of memory\n"); + *buffer = NULL; + return WINED3DERR_OUTOFVIDEOMEMORY; + } + + hr = buffer_init(object, device, size, usage, WINED3DFMT_VERTEXDATA, + pool, GL_ARRAY_BUFFER_ARB, NULL, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize buffer, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created buffer %p.\n", object); + *buffer = object; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_buffer_create_ib(struct wined3d_device *device, UINT size, DWORD usage, WINED3DPOOL pool, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer) +{ + struct wined3d_buffer *object; + HRESULT hr; + + TRACE("device %p, size %u, usage %#x, pool %#x, parent %p, parent_ops %p, buffer %p.\n", + device, size, usage, pool, parent, parent_ops, buffer); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Out of memory\n"); + *buffer = NULL; + return WINED3DERR_OUTOFVIDEOMEMORY; + } + + hr = buffer_init(object, device, size, usage | WINED3DUSAGE_STATICDECL, + WINED3DFMT_UNKNOWN, pool, GL_ELEMENT_ARRAY_BUFFER_ARB, NULL, + parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize buffer, hr %#x\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created buffer %p.\n", object); + *buffer = object; + + return WINED3D_OK; +} diff --git a/dll/directx/wine/wined3d/clipper.c b/dll/directx/wine/wined3d/clipper.c index 48ce06f76d4..e5131d7f749 100644 --- a/dll/directx/wine/wined3d/clipper.c +++ b/dll/directx/wine/wined3d/clipper.c @@ -28,70 +28,51 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); -static HRESULT WINAPI IWineD3DClipperImpl_QueryInterface(IWineD3DClipper *iface, REFIID riid, void **object) +ULONG CDECL wined3d_clipper_incref(struct wined3d_clipper *clipper) { - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); + ULONG refcount = InterlockedIncrement(&clipper->ref); - if (IsEqualGUID(riid, &IID_IWineD3DClipper) - || IsEqualGUID(riid, &IID_IUnknown)) + TRACE("%p increasing refcount to %u.\n", clipper, refcount); + + return refcount; +} + +ULONG CDECL wined3d_clipper_decref(struct wined3d_clipper *clipper) +{ + ULONG refcount = InterlockedDecrement(&clipper->ref); + + TRACE("%p decreasing refcount to %u.\n", clipper, refcount); + + if (!refcount) + HeapFree(GetProcessHeap(), 0, clipper); + + return refcount; +} + +HRESULT CDECL wined3d_clipper_set_window(struct wined3d_clipper *clipper, DWORD flags, HWND window) +{ + TRACE("clipper %p, flags %#x, window %p.\n", clipper, flags, window); + + if (flags) { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI IWineD3DClipperImpl_AddRef(IWineD3DClipper *iface ) -{ - IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface; - ULONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p)->() incrementing from %u.\n", This, ref - 1); - - return ref; -} - -static ULONG WINAPI IWineD3DClipperImpl_Release(IWineD3DClipper *iface) -{ - IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p)->() decrementing from %u.\n", This, ref + 1); - - if (!ref) HeapFree(GetProcessHeap(), 0, This); - - return ref; -} - -static HRESULT WINAPI IWineD3DClipperImpl_SetHwnd(IWineD3DClipper *iface, DWORD Flags, HWND hWnd) -{ - IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface; - - TRACE("(%p)->(0x%08x,%p)\n", This, Flags, hWnd); - if( Flags ) - { - FIXME("Flags = 0x%08x, not supported.\n",Flags); + FIXME("flags %#x, not supported.\n", flags); return WINED3DERR_INVALIDCALL; } - This->hWnd = hWnd; + clipper->hWnd = window; + return WINED3D_OK; } -static HRESULT WINAPI IWineD3DClipperImpl_GetClipList(IWineD3DClipper *iface, const RECT *Rect, - RGNDATA *ClipList, DWORD *Size) +HRESULT CDECL wined3d_clipper_get_clip_list(const struct wined3d_clipper *clipper, const RECT *rect, + RGNDATA *clip_list, DWORD *clip_list_size) { - IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface; - TRACE("(%p,%p,%p,%p)\n", This, Rect, ClipList, Size); + TRACE("clipper %p, rect %s, clip_list %p, clip_list_size %p.\n", + clipper, wine_dbgstr_rect(rect), clip_list, clip_list_size); - if (This->hWnd) + if (clipper->hWnd) { - HDC hDC = GetDCEx(This->hWnd, NULL, DCX_WINDOW); + HDC hDC = GetDCEx(clipper->hWnd, NULL, DCX_WINDOW); if (hDC) { HRGN hRgn = CreateRectRgn(0,0,0,0); @@ -101,55 +82,60 @@ static HRESULT WINAPI IWineD3DClipperImpl_GetClipList(IWineD3DClipper *iface, co { /* map region to screen coordinates */ POINT org; - GetDCOrgEx( hDC, &org ); - OffsetRgn( hRgn, org.x, org.y ); + GetDCOrgEx(hDC, &org); + OffsetRgn(hRgn, org.x, org.y); } - if (Rect) + if (rect) { - HRGN hRgnClip = CreateRectRgn(Rect->left, Rect->top, - Rect->right, Rect->bottom); + HRGN hRgnClip = CreateRectRgn(rect->left, rect->top, + rect->right, rect->bottom); CombineRgn(hRgn, hRgn, hRgnClip, RGN_AND); DeleteObject(hRgnClip); } - *Size = GetRegionData(hRgn, *Size, ClipList); + *clip_list_size = GetRegionData(hRgn, *clip_list_size, clip_list); } DeleteObject(hRgn); - ReleaseDC(This->hWnd, hDC); + ReleaseDC(clipper->hWnd, hDC); } return WINED3D_OK; } else { - static int warned = 0; - if (warned++ < 10) - FIXME("(%p,%p,%p,%p),stub!\n",This,Rect,ClipList,Size); - if (Size) *Size=0; + static unsigned int once; + + if (!once++) + FIXME("clipper %p, rect %s, clip_list %p, clip_list_size %p stub!\n", + clipper, wine_dbgstr_rect(rect), clip_list, clip_list_size); + + if (clip_list_size) + *clip_list_size = 0; + return WINEDDERR_NOCLIPLIST; } } -static HRESULT WINAPI IWineD3DClipperImpl_SetClipList(IWineD3DClipper *iface, const RGNDATA *rgn, DWORD Flags) +HRESULT CDECL wined3d_clipper_set_clip_list(struct wined3d_clipper *clipper, const RGNDATA *region, DWORD flags) { - static int warned = 0; + static unsigned int once; - if (warned++ < 10 || !rgn) - FIXME("iface %p, region %p, flags %#x stub!\n", iface, rgn, Flags); + if (!once++ || !region) + FIXME("clipper %p, region %p, flags %#x stub!\n", clipper, region, flags); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DClipperImpl_GetHwnd(IWineD3DClipper *iface, HWND *hwnd) +HRESULT CDECL wined3d_clipper_get_window(const struct wined3d_clipper *clipper, HWND *window) { - IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface; - TRACE("(%p)->(%p)\n", This, hwnd); + TRACE("clipper %p, window %p.\n", clipper, window); + + *window = clipper->hWnd; - *hwnd = This->hWnd; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DClipperImpl_IsClipListChanged(IWineD3DClipper *iface, BOOL *changed) +HRESULT CDECL wined3d_clipper_is_clip_list_changed(const struct wined3d_clipper *clipper, BOOL *changed) { - FIXME("iface %p, changed %p stub!\n", iface, changed); + FIXME("clipper %p, changed %p stub!\n", clipper, changed); /* XXX What is safest? */ *changed = FALSE; @@ -157,33 +143,20 @@ static HRESULT WINAPI IWineD3DClipperImpl_IsClipListChanged(IWineD3DClipper *ifa return WINED3D_OK; } -static const IWineD3DClipperVtbl IWineD3DClipper_Vtbl = +struct wined3d_clipper * CDECL wined3d_clipper_create(void) { - IWineD3DClipperImpl_QueryInterface, - IWineD3DClipperImpl_AddRef, - IWineD3DClipperImpl_Release, - IWineD3DClipperImpl_GetClipList, - IWineD3DClipperImpl_GetHwnd, - IWineD3DClipperImpl_IsClipListChanged, - IWineD3DClipperImpl_SetClipList, - IWineD3DClipperImpl_SetHwnd -}; - -IWineD3DClipper * WINAPI WineDirect3DCreateClipper(void) -{ - IWineD3DClipperImpl *obj; + struct wined3d_clipper *clipper; TRACE("\n"); - obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj)); - if(!obj) + clipper = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*clipper)); + if (!clipper) { ERR("Out of memory when trying to allocate a WineD3D Clipper\n"); return NULL; } - obj->lpVtbl = &IWineD3DClipper_Vtbl; + wined3d_clipper_incref(clipper); - IWineD3DClipper_AddRef((IWineD3DClipper *)obj); - return (IWineD3DClipper *) obj; + return clipper; } diff --git a/dll/directx/wine/wined3d/context.c b/dll/directx/wine/wined3d/context.c index 6f9d9d7ce22..04942527e07 100644 --- a/dll/directx/wine/wined3d/context.c +++ b/dll/directx/wine/wined3d/context.c @@ -2,7 +2,7 @@ * Context and render target management in wined3d * * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -112,13 +112,14 @@ static void context_destroy_fbo(struct wined3d_context *context, GLuint *fbo) } /* GL locking is done by the caller */ -static void context_apply_attachment_filter_states(IWineD3DSurfaceImpl *surface, DWORD location) +static void context_apply_attachment_filter_states(const struct wined3d_context *context, + struct wined3d_surface *surface, DWORD location) { /* Update base texture states array */ if (surface->container.type == WINED3D_CONTAINER_TEXTURE) { - IWineD3DBaseTextureImpl *texture_impl = surface->container.u.texture; - IWineD3DDeviceImpl *device = surface->resource.device; + struct wined3d_texture *texture = surface->container.u.texture; + struct wined3d_device *device = surface->resource.device; BOOL update_minfilter = FALSE; BOOL update_magfilter = FALSE; struct gl_texture *gl_tex; @@ -126,16 +127,13 @@ static void context_apply_attachment_filter_states(IWineD3DSurfaceImpl *surface, switch (location) { case SFLAG_INTEXTURE: - gl_tex = &texture_impl->baseTexture.texture_rgb; - break; - case SFLAG_INSRGBTEX: - gl_tex = &texture_impl->baseTexture.texture_srgb; + gl_tex = wined3d_texture_get_gl_texture(texture, + context->gl_info, location == SFLAG_INSRGBTEX); break; default: ERR("Unsupported location %s (%#x).\n", debug_surflocation(location), location); - IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture_impl); return; } @@ -153,10 +151,10 @@ static void context_apply_attachment_filter_states(IWineD3DSurfaceImpl *surface, update_magfilter = TRUE; } - if (texture_impl->baseTexture.bindCount) + if (texture->bind_count) { WARN("Render targets should not be bound to a sampler\n"); - IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(texture_impl->baseTexture.sampler)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(texture->sampler)); } if (update_minfilter || update_magfilter) @@ -193,7 +191,7 @@ static void context_apply_attachment_filter_states(IWineD3DSurfaceImpl *surface, /* GL locking is done by the caller */ void context_attach_depth_stencil_fbo(struct wined3d_context *context, - GLenum fbo_target, IWineD3DSurfaceImpl *depth_stencil, BOOL use_render_buffer) + GLenum fbo_target, struct wined3d_surface *depth_stencil, BOOL use_render_buffer) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -201,7 +199,7 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context, if (depth_stencil) { - DWORD format_flags = depth_stencil->resource.format->Flags; + DWORD format_flags = depth_stencil->resource.format->flags; if (use_render_buffer && depth_stencil->current_renderbuffer) { @@ -222,7 +220,7 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context, else { surface_prepare_texture(depth_stencil, gl_info, FALSE); - context_apply_attachment_filter_states(depth_stencil, SFLAG_INTEXTURE); + context_apply_attachment_filter_states(context, depth_stencil, SFLAG_INTEXTURE); if (format_flags & WINED3DFMT_FLAG_DEPTH) { @@ -265,28 +263,26 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context, /* GL locking is done by the caller */ static void context_attach_surface_fbo(const struct wined3d_context *context, - GLenum fbo_target, DWORD idx, IWineD3DSurfaceImpl *surface, DWORD location) + GLenum fbo_target, DWORD idx, struct wined3d_surface *surface, DWORD location) { const struct wined3d_gl_info *gl_info = context->gl_info; TRACE("Attach surface %p to %u\n", surface, idx); - if (surface) + if (surface && surface->resource.format->id != WINED3DFMT_NULL) { + BOOL srgb; + switch (location) { case SFLAG_INTEXTURE: - surface_prepare_texture(surface, gl_info, FALSE); - context_apply_attachment_filter_states(surface, location); - gl_info->fbo_ops.glFramebufferTexture2D(fbo_target, GL_COLOR_ATTACHMENT0 + idx, - surface->texture_target, surface->texture_name, surface->texture_level); - break; - case SFLAG_INSRGBTEX: - surface_prepare_texture(surface, gl_info, TRUE); - context_apply_attachment_filter_states(surface, location); + srgb = location == SFLAG_INSRGBTEX; + surface_prepare_texture(surface, gl_info, srgb); + context_apply_attachment_filter_states(context, surface, location); gl_info->fbo_ops.glFramebufferTexture2D(fbo_target, GL_COLOR_ATTACHMENT0 + idx, - surface->texture_target, surface->texture_name_srgb, surface->texture_level); + surface->texture_target, surface_get_texture_name(surface, gl_info, srgb), + surface->texture_level); break; default: @@ -303,7 +299,7 @@ static void context_attach_surface_fbo(const struct wined3d_context *context, } /* GL locking is done by the caller */ -static void context_check_fbo_status(struct wined3d_context *context, GLenum target) +void context_check_fbo_status(struct wined3d_context *context, GLenum target) { const struct wined3d_gl_info *gl_info = context->gl_info; GLenum status; @@ -312,9 +308,12 @@ static void context_check_fbo_status(struct wined3d_context *context, GLenum tar if (status == GL_FRAMEBUFFER_COMPLETE) { TRACE("FBO complete\n"); - } else { - IWineD3DSurfaceImpl *attachment; + } + else + { + struct wined3d_surface *attachment; unsigned int i; + FIXME("FBO status %s (%#x)\n", debug_fbostatus(status), status); if (!context->current_fbo) @@ -348,7 +347,7 @@ static void context_check_fbo_status(struct wined3d_context *context, GLenum tar } static struct fbo_entry *context_create_fbo_entry(struct wined3d_context *context, - IWineD3DSurfaceImpl **render_targets, IWineD3DSurfaceImpl *depth_stencil, DWORD location) + struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location) { const struct wined3d_gl_info *gl_info = context->gl_info; struct fbo_entry *entry; @@ -366,7 +365,7 @@ static struct fbo_entry *context_create_fbo_entry(struct wined3d_context *contex /* GL locking is done by the caller */ static void context_reuse_fbo_entry(struct wined3d_context *context, GLenum target, - IWineD3DSurfaceImpl **render_targets, IWineD3DSurfaceImpl *depth_stencil, + struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location, struct fbo_entry *entry) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -397,11 +396,21 @@ static void context_destroy_fbo_entry(struct wined3d_context *context, struct fb /* GL locking is done by the caller */ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context, GLenum target, - IWineD3DSurfaceImpl **render_targets, IWineD3DSurfaceImpl *depth_stencil, DWORD location) + struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location) { const struct wined3d_gl_info *gl_info = context->gl_info; struct fbo_entry *entry; + if (depth_stencil && render_targets && render_targets[0]) + { + if (depth_stencil->resource.width < render_targets[0]->resource.width || + depth_stencil->resource.height < render_targets[0]->resource.height) + { + WARN("Depth stencil is smaller than the primary color buffer, disabling\n"); + depth_stencil = NULL; + } + } + LIST_FOR_EACH_ENTRY(entry, &context->fbo_list, struct fbo_entry, entry) { if (!memcmp(entry->render_targets, @@ -449,10 +458,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ /* Apply depth targets */ if (entry->depth_stencil) - { - surface_set_compatible_renderbuffer(entry->depth_stencil, - entry->render_targets[0]->pow2Width, entry->render_targets[0]->pow2Height); - } + surface_set_compatible_renderbuffer(entry->depth_stencil, entry->render_targets[0]); context_attach_depth_stencil_fbo(context, target, entry->depth_stencil, TRUE); entry->attached = TRUE; @@ -462,16 +468,16 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ for (i = 0; i < gl_info->limits.buffers; ++i) { if (entry->render_targets[i]) - context_apply_attachment_filter_states(entry->render_targets[i], entry->location); + context_apply_attachment_filter_states(context, entry->render_targets[i], entry->location); } if (entry->depth_stencil) - context_apply_attachment_filter_states(entry->depth_stencil, SFLAG_INTEXTURE); + context_apply_attachment_filter_states(context, entry->depth_stencil, SFLAG_INTEXTURE); } } /* GL locking is done by the caller */ static void context_apply_fbo_state(struct wined3d_context *context, GLenum target, - IWineD3DSurfaceImpl **render_targets, IWineD3DSurfaceImpl *depth_stencil, DWORD location) + struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location) { struct fbo_entry *entry, *entry2; @@ -496,15 +502,13 @@ static void context_apply_fbo_state(struct wined3d_context *context, GLenum targ context->current_fbo = NULL; context_bind_fbo(context, target, NULL); } - - context_check_fbo_status(context, target); } /* GL locking is done by the caller */ void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, - IWineD3DSurfaceImpl *render_target, IWineD3DSurfaceImpl *depth_stencil, DWORD location) + struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) { - if (surface_is_offscreen(render_target)) + if (location != SFLAG_INDRAWABLE || surface_is_offscreen(render_target)) { UINT clear_size = (context->gl_info->limits.buffers - 1) * sizeof(*context->blit_targets); context->blit_targets[0] = render_target; @@ -648,12 +652,12 @@ void context_free_event_query(struct wined3d_event_query *query) typedef void (context_fbo_entry_func_t)(struct wined3d_context *context, struct fbo_entry *entry); -static void context_enum_surface_fbo_entries(IWineD3DDeviceImpl *device, - IWineD3DSurfaceImpl *surface, context_fbo_entry_func_t *callback) +static void context_enum_surface_fbo_entries(struct wined3d_device *device, + struct wined3d_surface *surface, context_fbo_entry_func_t *callback) { UINT i; - for (i = 0; i < device->numContexts; ++i) + for (i = 0; i < device->context_count; ++i) { struct wined3d_context *context = device->contexts[i]; const struct wined3d_gl_info *gl_info = context->gl_info; @@ -689,14 +693,15 @@ static void context_queue_fbo_entry_destruction(struct wined3d_context *context, list_add_head(&context->fbo_destroy_list, &entry->entry); } -void context_resource_released(IWineD3DDeviceImpl *device, IWineD3DResource *resource, WINED3DRESOURCETYPE type) +void context_resource_released(struct wined3d_device *device, + struct wined3d_resource *resource, WINED3DRESOURCETYPE type) { if (!device->d3d_initialized) return; switch (type) { case WINED3DRTYPE_SURFACE: - context_enum_surface_fbo_entries(device, (IWineD3DSurfaceImpl *)resource, + context_enum_surface_fbo_entries(device, surface_from_resource(resource), context_queue_fbo_entry_destruction); break; @@ -710,12 +715,13 @@ static void context_detach_fbo_entry(struct wined3d_context *context, struct fbo entry->attached = FALSE; } -void context_resource_unloaded(IWineD3DDeviceImpl *device, IWineD3DResource *resource, WINED3DRESOURCETYPE type) +void context_resource_unloaded(struct wined3d_device *device, + struct wined3d_resource *resource, WINED3DRESOURCETYPE type) { switch (type) { case WINED3DRTYPE_SURFACE: - context_enum_surface_fbo_entries(device, (IWineD3DSurfaceImpl *)resource, + context_enum_surface_fbo_entries(device, surface_from_resource(resource), context_detach_fbo_entry); break; @@ -724,7 +730,7 @@ void context_resource_unloaded(IWineD3DDeviceImpl *device, IWineD3DResource *res } } -void context_surface_update(struct wined3d_context *context, IWineD3DSurfaceImpl *surface) +void context_surface_update(struct wined3d_context *context, struct wined3d_surface *surface) { const struct wined3d_gl_info *gl_info = context->gl_info; struct fbo_entry *entry = context->current_fbo; @@ -790,14 +796,98 @@ static BOOL context_set_pixel_format(const struct wined3d_gl_info *gl_info, HDC return TRUE; } +static BOOL context_set_gl_context(struct wined3d_context *ctx) +{ + struct wined3d_swapchain *swapchain = ctx->swapchain; + + if (!pwglMakeCurrent(ctx->hdc, ctx->glCtx)) + { + WARN("Failed to make GL context %p current on device context %p, last error %#x.\n", + ctx->glCtx, ctx->hdc, GetLastError()); + ctx->valid = 0; + WARN("Trying fallback to the backup window.\n"); + + if (!swapchain->backup_dc) + { + TRACE("Creating the backup window for swapchain %p.\n", swapchain); + swapchain->backup_wnd = CreateWindowA(WINED3D_OPENGL_WINDOW_CLASS_NAME, "WineD3D fake window", + WS_OVERLAPPEDWINDOW, 10, 10, 10, 10, NULL, NULL, NULL, NULL); + if (!swapchain->backup_wnd) + { + ERR("Failed to create a window.\n"); + goto fail; + } + swapchain->backup_dc = GetDC(swapchain->backup_wnd); + if (!swapchain->backup_dc) + { + ERR("Failed to get a DC.\n"); + goto fail; + } + if (!context_set_pixel_format(ctx->gl_info, swapchain->backup_dc, ctx->pixel_format)) + { + ERR("Failed to set pixel format %d on device context %p.\n", + ctx->pixel_format, swapchain->backup_dc); + goto fail; + } + } + + if (!pwglMakeCurrent(swapchain->backup_dc, ctx->glCtx)) + { + ERR("Fallback to backup window (dc %p) failed too, last error %#x.\n", + swapchain->backup_dc, GetLastError()); + context_set_current(NULL); + return FALSE; + } + } + return TRUE; + +fail: + if (swapchain->backup_dc) + { + ReleaseDC(swapchain->backup_wnd, swapchain->backup_dc); + swapchain->backup_dc = NULL; + } + if (swapchain->backup_wnd) + { + DestroyWindow(swapchain->backup_wnd); + swapchain->backup_wnd = NULL; + } + context_set_current(NULL); + return FALSE; +} + +static void context_restore_gl_context(HDC dc, HGLRC gl_ctx) +{ + if (!pwglMakeCurrent(dc, gl_ctx)) + { + ERR("Failed to restore GL context %p on device context %p, last error %#x.\n", + gl_ctx, dc, GetLastError()); + context_set_current(NULL); + } +} + static void context_update_window(struct wined3d_context *context) { + if (context->win_handle == context->swapchain->win_handle) + return; + TRACE("Updating context %p window from %p to %p.\n", context, context->win_handle, context->swapchain->win_handle); if (context->valid) { - if (!ReleaseDC(context->win_handle, context->hdc)) + /* You'd figure ReleaseDC() would fail if the DC doesn't match the + * window. However, that's not what actually happens, and there are + * user32 tests that confirm ReleaseDC() with the wrong window is + * supposed to succeed. So explicitly check that the DC belongs to + * the window, since we want to avoid releasing a DC that belongs to + * some other window if the original window was already destroyed. */ + if (WindowFromDC(context->hdc) != context->win_handle) + { + WARN("DC %p does not belong to window %p.\n", + context->hdc, context->win_handle); + } + else if (!ReleaseDC(context->win_handle, context->hdc)) { ERR("Failed to release device context %p, last error %#x.\n", context->hdc, GetLastError()); @@ -820,12 +910,7 @@ static void context_update_window(struct wined3d_context *context) goto err; } - if (!pwglMakeCurrent(context->hdc, context->glCtx)) - { - ERR("Failed to make GL context %p current on device context %p, last error %#x.\n", - context->glCtx, context->hdc, GetLastError()); - goto err; - } + context_set_gl_context(context); return; @@ -833,22 +918,6 @@ err: context->valid = 0; } -/* Do not call while under the GL lock. */ -static void context_validate(struct wined3d_context *context) -{ - HWND wnd = WindowFromDC(context->hdc); - - if (wnd != context->win_handle) - { - WARN("DC %p belongs to window %p instead of %p.\n", - context->hdc, wnd, context->win_handle); - context->valid = 0; - } - - if (context->win_handle != context->swapchain->win_handle) - context_update_window(context); -} - /* Do not call while under the GL lock. */ static void context_destroy_gl_resources(struct wined3d_context *context) { @@ -863,8 +932,9 @@ static void context_destroy_gl_resources(struct wined3d_context *context) restore_ctx = pwglGetCurrentContext(); restore_dc = pwglGetCurrentDC(); - context_validate(context); - if (context->valid && restore_ctx != context->glCtx) pwglMakeCurrent(context->hdc, context->glCtx); + context_update_window(context); + if (context->valid && restore_ctx != context->glCtx) + context_set_gl_context(context); else restore_ctx = NULL; ENTER_GL(); @@ -919,7 +989,10 @@ static void context_destroy_gl_resources(struct wined3d_context *context) if (gl_info->supported[ARB_SYNC]) { - if (event_query->object.sync) GL_EXTCALL(glDeleteSync(event_query->object.sync)); + for (i = 0; i < context->free_event_query_count; ++i) + { + GL_EXTCALL(glDeleteSync(context->free_event_queries[i].sync)); + } } else if (gl_info->supported[APPLE_FENCE]) { @@ -946,12 +1019,7 @@ static void context_destroy_gl_resources(struct wined3d_context *context) if (restore_ctx) { - if (!pwglMakeCurrent(restore_dc, restore_ctx)) - { - DWORD err = GetLastError(); - ERR("Failed to restore GL context %p on device context %p, last error %#x.\n", - restore_ctx, restore_dc, err); - } + context_restore_gl_context(restore_dc, restore_ctx); } else if (pwglGetCurrentContext() && !pwglMakeCurrent(NULL, NULL)) { @@ -1009,15 +1077,15 @@ BOOL context_set_current(struct wined3d_context *ctx) if (ctx) { - TRACE("Switching to D3D context %p, GL context %p, device context %p.\n", ctx, ctx->glCtx, ctx->hdc); - if (!pwglMakeCurrent(ctx->hdc, ctx->glCtx)) + if (!ctx->valid) { - DWORD err = GetLastError(); - ERR("Failed to make GL context %p current on device context %p, last error %#x.\n", - ctx->glCtx, ctx->hdc, err); - TlsSetValue(wined3d_context_tls_idx, NULL); + ERR("Trying to make invalid context %p current\n", ctx); return FALSE; } + + TRACE("Switching to D3D context %p, GL context %p, device context %p.\n", ctx, ctx->glCtx, ctx->hdc); + if (!context_set_gl_context(ctx)) + return FALSE; ctx->current = 1; } else if(pwglGetCurrentContext()) @@ -1050,12 +1118,7 @@ void context_release(struct wined3d_context *context) if (!--context->level && context->restore_ctx) { TRACE("Restoring GL context %p on device context %p.\n", context->restore_ctx, context->restore_dc); - if (!pwglMakeCurrent(context->restore_dc, context->restore_ctx)) - { - DWORD err = GetLastError(); - ERR("Failed to restore GL context %p on device context %p, last error %#x.\n", - context->restore_ctx, context->restore_dc, err); - } + context_restore_gl_context(context->restore_dc, context->restore_ctx); context->restore_ctx = NULL; context->restore_dc = NULL; } @@ -1108,14 +1171,14 @@ static void Context_MarkStateDirty(struct wined3d_context *context, DWORD state, } /* This function takes care of WineD3D pixel format selection. */ -static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, +static int WineD3D_ChoosePixelFormat(struct wined3d_device *device, HDC hdc, const struct wined3d_format *color_format, const struct wined3d_format *ds_format, BOOL auxBuffers, int numSamples, BOOL findCompatible) { int iPixelFormat=0; unsigned int matchtry; - short redBits, greenBits, blueBits, alphaBits, colorBits; - short depthBits=0, stencilBits=0; + BYTE redBits, greenBits, blueBits, alphaBits, colorBits; + BYTE depthBits=0, stencilBits=0; static const struct { @@ -1141,7 +1204,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, }; int i = 0; - int nCfgs = This->adapter->nCfgs; + int nCfgs = device->adapter->nCfgs; TRACE("ColorFormat=%s, DepthStencilFormat=%s, auxBuffers=%d, numSamples=%d, findCompatible=%d\n", debug_d3dformat(color_format->id), debug_d3dformat(ds_format->id), @@ -1156,10 +1219,12 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, getDepthStencilBits(ds_format, &depthBits, &stencilBits); - for(matchtry = 0; matchtry < (sizeof(matches) / sizeof(matches[0])) && !iPixelFormat; matchtry++) { - for(i=0; iadapter->cfgs[i]; BOOL exactDepthMatch = TRUE; - WineD3D_PixelFormat *cfg = &This->adapter->cfgs[i]; /* For now only accept RGBA formats. Perhaps some day we will * allow floating point formats for pbuffers. */ @@ -1208,7 +1273,8 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, * even when we don't need stencil because it could affect performance EXCEPT * on cards which don't offer depth formats without stencil like the i915 drivers * on Linux. */ - if(stencilBits != cfg->stencilSize && !(This->adapter->brokenStencil && stencilBits <= cfg->stencilSize)) + if (stencilBits != cfg->stencilSize + && !(device->adapter->brokenStencil && stencilBits <= cfg->stencilSize)) continue; /* Check multisampling support */ @@ -1268,10 +1334,10 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, } /* Do not call while under the GL lock. */ -struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, - IWineD3DSurfaceImpl *target, const struct wined3d_format *ds_format) +struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, + struct wined3d_surface *target, const struct wined3d_format *ds_format) { - IWineD3DDeviceImpl *device = swapchain->device; + struct wined3d_device *device = swapchain->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const struct wined3d_format *color_format; struct wined3d_context *ret; @@ -1280,6 +1346,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, int numSamples = 0; int pixel_format; unsigned int s; + int swap_interval; DWORD state; HGLRC ctx; HDC hdc; @@ -1314,7 +1381,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, } /* DirectDraw supports 8bit paletted render targets and these are used by - * old games like Starcraft and C&C. Most modern hardware doesn't support + * old games like StarCraft and C&C. Most modern hardware doesn't support * 8bit natively so we perform some form of 8bit -> 32bit conversion. The * conversion (ab)uses the alpha component for storing the palette index. * For this reason we require a format with 8bit alpha, so request @@ -1361,7 +1428,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, } ctx = pwglCreateContext(hdc); - if (device->numContexts) + if (device->context_count) { if (!pwglShareLists(device->contexts[0]->glCtx, ctx)) { @@ -1410,7 +1477,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, ret->hdc = hdc; ret->pixel_format = pixel_format; - if (device->shader_backend->shader_dirtifyable_constants((IWineD3DDevice *)device)) + if (device->shader_backend->shader_dirtifyable_constants()) { /* Create the dirty constants array and initialize them to dirty */ ret->vshader_const_dirty = HeapAlloc(GetProcessHeap(), 0, @@ -1460,6 +1527,36 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, goto out; } + switch (swapchain->presentParms.PresentationInterval) + { + case WINED3DPRESENT_INTERVAL_IMMEDIATE: + swap_interval = 0; + break; + case WINED3DPRESENT_INTERVAL_DEFAULT: + case WINED3DPRESENT_INTERVAL_ONE: + swap_interval = 1; + break; + case WINED3DPRESENT_INTERVAL_TWO: + swap_interval = 2; + break; + case WINED3DPRESENT_INTERVAL_THREE: + swap_interval = 3; + break; + case WINED3DPRESENT_INTERVAL_FOUR: + swap_interval = 4; + break; + default: + FIXME("Unknown presentation interval %08x\n", swapchain->presentParms.PresentationInterval); + swap_interval = 1; + } + + if (gl_info->supported[WGL_EXT_SWAP_CONTROL]) + { + if (!GL_EXTCALL(wglSwapIntervalEXT(swap_interval))) + ERR("wglSwapIntervalEXT failed to set swap interval %d for context %p, last error %#x\n", + swap_interval, ret, GetLastError()); + } + ENTER_GL(); glGetIntegerv(GL_AUX_BUFFERS, &ret->aux_buffers); @@ -1544,23 +1641,6 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)"); } - if (gl_info->supported[WINED3D_GL_VERSION_2_0]) - { - /* Windows doesn't support to query the glPointParameteri function pointer, so use the - * NV_POINT_SPRITE extension. - */ - if (glPointParameteri) - { - glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT); - checkGLcall("glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT)"); - } - else if (gl_info->supported[NV_POINT_SPRITE]) - { - GL_EXTCALL(glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT)); - checkGLcall("glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT)"); - } - } - if (gl_info->supported[ARB_PROVOKING_VERTEX]) { GL_EXTCALL(glProvokingVertex(GL_FIRST_VERTEX_CONVENTION)); @@ -1569,11 +1649,10 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, { GL_EXTCALL(glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT)); } + device->frag_pipe->enable_extension(TRUE); LEAVE_GL(); - device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); - TRACE("Created context %p.\n", ret); return ret; @@ -1590,7 +1669,7 @@ out: } /* Do not call while under the GL lock. */ -void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) +void context_destroy(struct wined3d_device *device, struct wined3d_context *context) { BOOL destroy; @@ -1612,7 +1691,7 @@ void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) HeapFree(GetProcessHeap(), 0, context->blit_targets); HeapFree(GetProcessHeap(), 0, context->vshader_const_dirty); HeapFree(GetProcessHeap(), 0, context->pshader_const_dirty); - device_context_remove(This, context); + device_context_remove(device, context); if (destroy) HeapFree(GetProcessHeap(), 0, context); } @@ -1622,7 +1701,7 @@ static inline void set_blit_dimension(UINT width, UINT height) { checkGLcall("glMatrixMode(GL_PROJECTION)"); glLoadIdentity(); checkGLcall("glLoadIdentity()"); - glOrtho(0, width, height, 0, 0.0, -1.0); + glOrtho(0, width, 0, height, 0.0, -1.0); checkGLcall("glOrtho"); glViewport(0, 0, width, height); checkGLcall("glViewport"); @@ -1645,13 +1724,13 @@ static inline void set_blit_dimension(UINT width, UINT height) { * *****************************************************************************/ /* Context activation is done by the caller. */ -static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *context) +static void SetupForBlit(struct wined3d_device *device, struct wined3d_context *context) { int i; - const struct StateEntry *StateTable = This->StateTable; + const struct StateEntry *StateTable = device->StateTable; const struct wined3d_gl_info *gl_info = context->gl_info; - UINT width = context->current_rt->currentDesc.Width; - UINT height = context->current_rt->currentDesc.Height; + UINT width = context->current_rt->resource.width; + UINT height = context->current_rt->resource.height; DWORD sampler; TRACE("Setting up context %p for blitting\n", context); @@ -1675,7 +1754,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte /* Disable shaders */ ENTER_GL(); - This->shader_backend->shader_select(context, FALSE, FALSE); + device->shader_backend->shader_select(context, FALSE, FALSE); LEAVE_GL(); Context_MarkStateDirty(context, STATE_VSHADER, StateTable); @@ -1696,7 +1775,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte */ for (i = gl_info->limits.textures - 1; i > 0 ; --i) { - sampler = This->rev_tex_unit_map[i]; + sampler = device->rev_tex_unit_map[i]; GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i)); checkGLcall("glActiveTextureARB"); @@ -1729,7 +1808,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); checkGLcall("glActiveTextureARB"); - sampler = This->rev_tex_unit_map[0]; + sampler = device->rev_tex_unit_map[0]; if (gl_info->supported[ARB_TEXTURE_CUBE_MAP]) { @@ -1758,7 +1837,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.0f); - checkGLcall("glTexEnvi GL_TEXTURE_LOD_BIAS_EXT ..."); + checkGLcall("glTexEnvf GL_TEXTURE_LOD_BIAS_EXT ..."); } if (sampler != WINED3D_UNMAPPED_STAGE) @@ -1833,44 +1912,19 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_CLIPPING), StateTable); set_blit_dimension(width, height); + device->frag_pipe->enable_extension(FALSE); LEAVE_GL(); context->blit_w = width; context->blit_h = height; Context_MarkStateDirty(context, STATE_VIEWPORT, StateTable); Context_MarkStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION), StateTable); - - - This->frag_pipe->enable_extension((IWineD3DDevice *) This, FALSE); -} - -/***************************************************************************** - * findThreadContextForSwapChain - * - * Searches a swapchain for all contexts and picks one for the thread tid. - * If none can be found the swapchain is requested to create a new context - * - *****************************************************************************/ -static struct wined3d_context *findThreadContextForSwapChain(IWineD3DSwapChain *swapchain, DWORD tid) -{ - unsigned int i; - - for(i = 0; i < ((IWineD3DSwapChainImpl *) swapchain)->num_contexts; i++) { - if(((IWineD3DSwapChainImpl *) swapchain)->context[i]->tid == tid) { - return ((IWineD3DSwapChainImpl *) swapchain)->context[i]; - } - - } - - /* Create a new context for the thread */ - return swapchain_create_context_for_thread(swapchain); } /* Do not call while under the GL lock. */ -static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target) +static struct wined3d_context *FindContext(struct wined3d_device *device, struct wined3d_surface *target) { struct wined3d_context *current_context = context_get_current(); - DWORD tid = GetCurrentThreadId(); struct wined3d_context *context; if (current_context && current_context->destroyed) current_context = NULL; @@ -1879,13 +1933,13 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur { if (current_context && current_context->current_rt - && current_context->swapchain->device == This) + && current_context->swapchain->device == device) { target = current_context->current_rt; } else { - IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *)This->swapchains[0]; + struct wined3d_swapchain *swapchain = device->swapchains[0]; if (swapchain->back_buffers) target = swapchain->back_buffers[0]; else target = swapchain->front_buffer; } @@ -1893,74 +1947,67 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur if (current_context && current_context->current_rt == target) { - context_validate(current_context); + context_update_window(current_context); return current_context; } if (target->container.type == WINED3D_CONTAINER_SWAPCHAIN) { - IWineD3DSwapChain *swapchain; - TRACE("Rendering onscreen\n"); - swapchain = (IWineD3DSwapChain *)target->container.u.swapchain; - context = findThreadContextForSwapChain(swapchain, tid); + context = swapchain_get_context(target->container.u.swapchain); } else { TRACE("Rendering offscreen\n"); - /* Stay with the currently active context. */ - if (current_context && current_context->swapchain->device == This) - { + /* Stay with the current context if possible. Otherwise use the + * context for the primary swapchain. */ + if (current_context && current_context->swapchain->device == device) context = current_context; - } else - { - /* This may happen if the app jumps straight into offscreen rendering - * Start using the context of the primary swapchain. tid == 0 is no problem - * for findThreadContextForSwapChain. - * - * Can also happen on thread switches - in that case findThreadContextForSwapChain - * is perfect to call. */ - context = findThreadContextForSwapChain(This->swapchains[0], tid); - } + context = swapchain_get_context(device->swapchains[0]); } - context_validate(context); + context_update_window(context); return context; } -/* Context activation is done by the caller. */ -static void context_apply_draw_buffers(struct wined3d_context *context, UINT rt_count, IWineD3DSurfaceImpl **rts) +/* Context activation and GL locking are done by the caller. */ +static void context_apply_draw_buffers(struct wined3d_context *context, DWORD rt_mask, struct wined3d_surface **rts) { - if (!surface_is_offscreen(rts[0])) + if (!rt_mask) + { + glDrawBuffer(GL_NONE); + checkGLcall("glDrawBuffer()"); + } + else if (!surface_is_offscreen(rts[0])) { - ENTER_GL(); glDrawBuffer(surface_get_gl_buffer(rts[0])); checkGLcall("glDrawBuffer()"); - LEAVE_GL(); } else { - ENTER_GL(); if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { const struct wined3d_gl_info *gl_info = context->gl_info; - unsigned int i; + unsigned int i = 0; - for (i = 0; i < gl_info->limits.buffers; ++i) + while (rt_mask) { - if (i < rt_count && rts[i]) + if ((rt_mask & 1) && rts[i] && rts[i]->resource.format->id != WINED3DFMT_NULL) context->draw_buffers[i] = GL_COLOR_ATTACHMENT0 + i; else context->draw_buffers[i] = GL_NONE; + + rt_mask >>= 1; + ++i; } if (gl_info->supported[ARB_DRAW_BUFFERS]) { - GL_EXTCALL(glDrawBuffersARB(gl_info->limits.buffers, context->draw_buffers)); + GL_EXTCALL(glDrawBuffersARB(i, context->draw_buffers)); checkGLcall("glDrawBuffers()"); } else @@ -1974,7 +2021,6 @@ static void context_apply_draw_buffers(struct wined3d_context *context, UINT rt_ glDrawBuffer(rts[0]->resource.device->offscreenBuffer); checkGLcall("glDrawBuffer()"); } - LEAVE_GL(); } } @@ -1989,29 +2035,10 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) static inline void context_set_render_offscreen(struct wined3d_context *context, const struct StateEntry *StateTable, BOOL offscreen) { - const struct wined3d_gl_info *gl_info = context->gl_info; - if (context->render_offscreen == offscreen) return; - if (gl_info->supported[WINED3D_GL_VERSION_2_0]) - { - /* Windows doesn't support to query the glPointParameteri function pointer, so use the - * NV_POINT_SPRITE extension. - */ - if (glPointParameteri) - { - glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, offscreen ? GL_LOWER_LEFT : GL_UPPER_LEFT); - checkGLcall("glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, ...)"); - } - else if (gl_info->supported[NV_POINT_SPRITE]) - { - GL_EXTCALL(glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, offscreen ? GL_LOWER_LEFT : GL_UPPER_LEFT)); - checkGLcall("glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, ...)"); - } - } - + Context_MarkStateDirty(context, STATE_POINTSPRITECOORDORIGIN, StateTable); Context_MarkStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION), StateTable); - Context_MarkStateDirty(context, STATE_VDECL, StateTable); Context_MarkStateDirty(context, STATE_VIEWPORT, StateTable); Context_MarkStateDirty(context, STATE_SCISSORRECT, StateTable); Context_MarkStateDirty(context, STATE_FRONTFACE, StateTable); @@ -2021,10 +2048,10 @@ static inline void context_set_render_offscreen(struct wined3d_context *context, static BOOL match_depth_stencil_format(const struct wined3d_format *existing, const struct wined3d_format *required) { - short existing_depth, existing_stencil, required_depth, required_stencil; + BYTE existing_depth, existing_stencil, required_depth, required_stencil; - if(existing == required) return TRUE; - if((existing->Flags & WINED3DFMT_FLAG_FLOAT) != (required->Flags & WINED3DFMT_FLAG_FLOAT)) return FALSE; + if (existing == required) return TRUE; + if ((existing->flags & WINED3DFMT_FLAG_FLOAT) != (required->flags & WINED3DFMT_FLAG_FLOAT)) return FALSE; getDepthStencilBits(existing, &existing_depth, &existing_stencil); getDepthStencilBits(required, &required_depth, &required_stencil); @@ -2035,12 +2062,13 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing, if(required_stencil && required_stencil != existing_stencil) return FALSE; return TRUE; } + /* The caller provides a context */ -static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device, - struct wined3d_context *context, IWineD3DSurfaceImpl *depth_stencil) +static void context_validate_onscreen_formats(struct wined3d_device *device, + struct wined3d_context *context, struct wined3d_surface *depth_stencil) { /* Onscreen surfaces are always in a swapchain */ - IWineD3DSwapChainImpl *swapchain = context->current_rt->container.u.swapchain; + struct wined3d_swapchain *swapchain = context->current_rt->container.u.swapchain; if (context->render_offscreen || !depth_stencil) return; if (match_depth_stencil_format(swapchain->ds_format, depth_stencil->resource.format)) return; @@ -2057,7 +2085,7 @@ static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device, } /* Context activation is done by the caller. */ -void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) +void context_apply_blit_state(struct wined3d_context *context, struct wined3d_device *device) { if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { @@ -2065,7 +2093,6 @@ void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImp if (context->render_offscreen) { - FIXME("Applying blit state for an offscreen target with ORM_FBO. This should be avoided.\n"); surface_internal_preload(context->current_rt, SRGB_RGB); ENTER_GL(); @@ -2082,6 +2109,7 @@ void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImp context->draw_buffer_dirty = TRUE; } + ENTER_GL(); if (context->draw_buffer_dirty) { context_apply_draw_buffers(context, 1, &context->current_rt); @@ -2089,27 +2117,56 @@ void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImp context->draw_buffer_dirty = FALSE; } + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { + context_check_fbo_status(context, GL_FRAMEBUFFER); + } + LEAVE_GL(); + SetupForBlit(device, context); } +static BOOL context_validate_rt_config(UINT rt_count, + struct wined3d_surface **rts, struct wined3d_surface *ds) +{ + unsigned int i; + + if (ds) return TRUE; + + for (i = 0; i < rt_count; ++i) + { + if (rts[i] && rts[i]->resource.format->id != WINED3DFMT_NULL) + return TRUE; + } + + WARN("Invalid render target config, need at least one attachment.\n"); + return FALSE; +} + /* Context activation is done by the caller. */ -void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceImpl *device, - UINT rt_count, IWineD3DSurfaceImpl **rts, IWineD3DSurfaceImpl *depth_stencil) +BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_device *device, + UINT rt_count, struct wined3d_surface **rts, struct wined3d_surface *depth_stencil) { const struct StateEntry *state_table = device->StateTable; + DWORD rt_mask = 0; UINT i; + if (!context_validate_rt_config(rt_count, rts, depth_stencil)) + return FALSE; + + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { context_validate_onscreen_formats(device, context, depth_stencil); ENTER_GL(); - if (surface_is_offscreen(rts[0])) + if (!rt_count || surface_is_offscreen(rts[0])) { for (i = 0; i < rt_count; ++i) { context->blit_targets[i] = rts[i]; + rt_mask |= (1 << i); } while (i < context->gl_info->limits.buffers) { @@ -2117,27 +2174,39 @@ void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm ++i; } context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE); + glReadBuffer(GL_NONE); + checkGLcall("glReadBuffer"); } else { context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, SFLAG_INDRAWABLE); + rt_mask = 1; } LEAVE_GL(); } + else + { + rt_mask = 1; + } - context_apply_draw_buffers(context, rt_count, rts); + ENTER_GL(); + context_apply_draw_buffers(context, rt_mask, rts); context->draw_buffer_dirty = TRUE; + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { + context_check_fbo_status(context, GL_FRAMEBUFFER); + } + if (context->last_was_blit) { - device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + device->frag_pipe->enable_extension(TRUE); } /* Blending and clearing should be orthogonal, but tests on the nvidia * driver show that disabling blending when clearing improves the clearing * performance incredibly. */ - ENTER_GL(); glDisable(GL_BLEND); glEnable(GL_SCISSOR_TEST); checkGLcall("glEnable GL_SCISSOR_TEST"); @@ -2147,25 +2216,32 @@ void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), state_table); Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE), state_table); Context_MarkStateDirty(context, STATE_SCISSORRECT, state_table); + + return TRUE; } /* Context activation is done by the caller. */ -void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) +BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) { const struct StateEntry *state_table = device->StateTable; + const struct wined3d_fb_state *fb = &device->fb; unsigned int i; + if (!context_validate_rt_config(context->gl_info->limits.buffers, + fb->render_targets, fb->depth_stencil)) + return FALSE; + /* Preload resources before FBO setup. Texture preload in particular may * result in changes to the current FBO, due to using e.g. FBO blits for * updating a resource location. */ - IWineD3DDeviceImpl_FindTexUnitMap(device); + device_update_tex_unit_map(device); device_preload_textures(device); if (isStateDirty(context, STATE_VDECL)) device_update_stream_info(device, context->gl_info); if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - context_validate_onscreen_formats(device, context, device->depth_stencil); + context_validate_onscreen_formats(device, context, fb->depth_stencil); if (!context->render_offscreen) { @@ -2176,24 +2252,34 @@ void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp else { ENTER_GL(); - context_apply_fbo_state(context, GL_FRAMEBUFFER, device->render_targets, - device->depth_stencil, SFLAG_INTEXTURE); + context_apply_fbo_state(context, GL_FRAMEBUFFER, fb->render_targets, fb->depth_stencil, SFLAG_INTEXTURE); + glReadBuffer(GL_NONE); + checkGLcall("glReadBuffer"); LEAVE_GL(); } } + ENTER_GL(); if (context->draw_buffer_dirty) { - context_apply_draw_buffers(context, context->gl_info->limits.buffers, device->render_targets); + const struct wined3d_shader *ps = device->stateBlock->state.pixel_shader; + DWORD rt_mask = ps ? ps->reg_maps.rt_mask : 1; + + rt_mask &= device->valid_rt_mask; + context_apply_draw_buffers(context, rt_mask, fb->render_targets); context->draw_buffer_dirty = FALSE; } + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) + { + context_check_fbo_status(context, GL_FRAMEBUFFER); + } + if (context->last_was_blit) { - device->frag_pipe->enable_extension((IWineD3DDevice *)device, TRUE); + device->frag_pipe->enable_extension(TRUE); } - ENTER_GL(); for (i = 0; i < context->numDirtyEntries; ++i) { DWORD rep = context->dirtyArray[i]; @@ -2205,10 +2291,12 @@ void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp LEAVE_GL(); context->numDirtyEntries = 0; /* This makes the whole list clean */ context->last_was_blit = FALSE; + + return TRUE; } -static void context_setup_target(IWineD3DDeviceImpl *device, - struct wined3d_context *context, IWineD3DSurfaceImpl *target) +static void context_setup_target(struct wined3d_device *device, + struct wined3d_context *context, struct wined3d_surface *target) { BOOL old_render_offscreen = context->render_offscreen, render_offscreen; const struct StateEntry *StateTable = device->StateTable; @@ -2232,12 +2320,12 @@ static void context_setup_target(IWineD3DDeviceImpl *device, { /* Disable blending when the alpha mask has changed and when a format doesn't support blending. */ if ((old->alpha_mask && !new->alpha_mask) || (!old->alpha_mask && new->alpha_mask) - || !(new->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) + || !(new->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) { Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), StateTable); } /* Update sRGB writing when switching between formats that do/do not support sRGB writing */ - if ((old->Flags & WINED3DFMT_FLAG_SRGB_WRITE) != (new->Flags & WINED3DFMT_FLAG_SRGB_WRITE)) + if ((old->flags & WINED3DFMT_FLAG_SRGB_WRITE) != (new->flags & WINED3DFMT_FLAG_SRGB_WRITE)) { Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), StateTable); } @@ -2255,14 +2343,8 @@ static void context_setup_target(IWineD3DDeviceImpl *device, { /* Read the back buffer of the old drawable into the destination texture. */ if (context->current_rt->texture_name_srgb) - { - surface_internal_preload(context->current_rt, SRGB_BOTH); - } - else - { - surface_internal_preload(context->current_rt, SRGB_RGB); - } - + surface_internal_preload(context->current_rt, SRGB_SRGB); + surface_internal_preload(context->current_rt, SRGB_RGB); surface_modify_location(context->current_rt, SFLAG_INDRAWABLE, FALSE); } } @@ -2273,7 +2355,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device, } /* Do not call while under the GL lock. */ -struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *target) +struct wined3d_context *context_acquire(struct wined3d_device *device, struct wined3d_surface *target) { struct wined3d_context *current_context = context_get_current(); struct wined3d_context *context; @@ -2287,8 +2369,16 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf if (context != current_context) { - if (!context_set_current(context)) ERR("Failed to activate the new context.\n"); - else device->frag_pipe->enable_extension((IWineD3DDevice *)device, !context->last_was_blit); + if (!context_set_current(context)) + { + ERR("Failed to activate the new context.\n"); + } + else + { + ENTER_GL(); + device->frag_pipe->enable_extension(!context->last_was_blit); + LEAVE_GL(); + } if (context->vshader_const_dirty) { @@ -2305,12 +2395,7 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf } else if (context->restore_ctx) { - if (!pwglMakeCurrent(context->hdc, context->glCtx)) - { - DWORD err = GetLastError(); - ERR("Failed to make GL context %p current on device context %p, last error %#x.\n", - context->hdc, context->glCtx, err); - } + context_set_gl_context(context); } return context; diff --git a/dll/directx/wine/wined3d/cubetexture.c b/dll/directx/wine/wined3d/cubetexture.c deleted file mode 100644 index 2d2c04c2c21..00000000000 --- a/dll/directx/wine/wined3d/cubetexture.c +++ /dev/null @@ -1,573 +0,0 @@ -/* - * IWineD3DCubeTexture implementation - * - * Copyright 2002-2005 Jason Edmeades - * Copyright 2002-2005 Raphael Junqueira - * Copyright 2005 Oliver Stieber - * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wined3d_private.h" - -WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); - -/* Do not call while under the GL lock. */ -static void cubetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb) -{ - /* Override the IWineD3DResource Preload method. */ - IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - UINT sub_count = This->baseTexture.level_count * This->baseTexture.layer_count; - IWineD3DDeviceImpl *device = This->resource.device; - struct wined3d_context *context = NULL; - BOOL srgb_mode; - BOOL *dirty; - UINT i; - - switch (srgb) - { - case SRGB_RGB: - srgb_mode = FALSE; - break; - - case SRGB_BOTH: - cubetexture_internal_preload(iface, SRGB_RGB); - /* Fallthrough */ - - case SRGB_SRGB: - srgb_mode = TRUE; - break; - - default: - srgb_mode = This->baseTexture.is_srgb; - break; - } - dirty = srgb_mode ? &This->baseTexture.texture_srgb.dirty : &This->baseTexture.texture_rgb.dirty; - - TRACE("(%p) : About to load texture: dirtified(%u).\n", This, *dirty); - - /* We only have to activate a context for gl when we're not drawing. - * In most cases PreLoad will be called during draw and a context was - * activated at the beginning of drawPrimitive. */ - if (!device->isInDraw) - { - /* No danger of recursive calls, context_acquire() sets isInDraw to true - * when loading offscreen render targets into their texture. */ - context = context_acquire(device, NULL); - } - - if (This->resource.format->id == WINED3DFMT_P8_UINT - || This->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) - { - for (i = 0; i < sub_count; ++i) - { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - - if (palette9_changed(surface)) - { - TRACE("Reloading surface %p because the d3d8/9 palette was changed.\n", surface); - /* TODO: This is not necessarily needed with hw palettized texture support. */ - surface_load_location(surface, SFLAG_INSYSMEM, NULL); - /* Make sure the texture is reloaded because of the palette change, - * this kills performance though :( */ - surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); - } - } - } - - /* If the texture is marked dirty or the srgb sampler setting has changed - * since the last load then reload the surfaces. */ - if (*dirty) - { - for (i = 0; i < sub_count; ++i) - { - IWineD3DSurface_LoadTexture((IWineD3DSurface *)This->baseTexture.sub_resources[i], srgb_mode); - } - } - else - { - TRACE("(%p) Texture not dirty, nothing to do.\n" , iface); - } - - /* No longer dirty. */ - *dirty = FALSE; - - if (context) context_release(context); -} - -static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This) -{ - UINT sub_count = This->baseTexture.level_count * This->baseTexture.layer_count; - UINT i; - - TRACE("(%p) : Cleaning up.\n", This); - - for (i = 0; i < sub_count; ++i) - { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - - if (surface) - { - /* Clean out the texture name we gave to the surface so that the - * surface doesn't try and release it. */ - surface_set_texture_name(surface, 0, TRUE); - surface_set_texture_name(surface, 0, FALSE); - surface_set_texture_target(surface, 0); - surface_set_container(surface, WINED3D_CONTAINER_NONE, NULL); - IWineD3DSurface_Release((IWineD3DSurface *)surface); - } - } - basetexture_cleanup((IWineD3DBaseTexture *)This); -} - -/* ******************************************* - IWineD3DCubeTexture IUnknown parts follow - ******************************************* */ - -static HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture *iface, REFIID riid, LPVOID *ppobj) -{ - IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IWineD3DResource) - || IsEqualGUID(riid, &IID_IWineD3DBaseTexture) - || IsEqualGUID(riid, &IID_IWineD3DCubeTexture)) { - IUnknown_AddRef(iface); - *ppobj = This; - return S_OK; - } - *ppobj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI IWineD3DCubeTextureImpl_AddRef(IWineD3DCubeTexture *iface) { - IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref); - return InterlockedIncrement(&This->resource.ref); -} - -/* Do not call while under the GL lock. */ -static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface) { - IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - ULONG ref; - TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); - ref = InterlockedDecrement(&This->resource.ref); - if (!ref) - { - cubetexture_cleanup(This); - This->resource.parent_ops->wined3d_object_destroyed(This->resource.parent); - HeapFree(GetProcessHeap(), 0, This); - } - return ref; -} - -/* **************************************************** - IWineD3DCubeTexture IWineD3DResource parts follow - **************************************************** */ -static HRESULT WINAPI IWineD3DCubeTextureImpl_SetPrivateData(IWineD3DCubeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags); -} - -static HRESULT WINAPI IWineD3DCubeTextureImpl_GetPrivateData(IWineD3DCubeTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData); -} - -static HRESULT WINAPI IWineD3DCubeTextureImpl_FreePrivateData(IWineD3DCubeTexture *iface, REFGUID refguid) { - return resource_free_private_data((IWineD3DResource *)iface, refguid); -} - -static DWORD WINAPI IWineD3DCubeTextureImpl_SetPriority(IWineD3DCubeTexture *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); -} - -static DWORD WINAPI IWineD3DCubeTextureImpl_GetPriority(IWineD3DCubeTexture *iface) { - return resource_get_priority((IWineD3DResource *)iface); -} - -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) { - cubetexture_internal_preload((IWineD3DBaseTexture *) iface, SRGB_ANY); -} - -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DCubeTextureImpl_UnLoad(IWineD3DCubeTexture *iface) -{ - IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - UINT sub_count = This->baseTexture.level_count * This->baseTexture.layer_count; - UINT i; - - TRACE("iface %p.\n", iface); - - /* Unload all the surfaces and reset the texture name. If UnLoad was called on the - * surface before, this one will be a NOP and vice versa. Unloading an unloaded - * surface is fine. */ - - for (i = 0; i < sub_count; ++i) - { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - - IWineD3DSurface_UnLoad((IWineD3DSurface *)surface); - surface_set_texture_name(surface, 0, TRUE); - surface_set_texture_name(surface, 0, FALSE); - } - - basetexture_unload((IWineD3DBaseTexture *)iface); -} - -static WINED3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) { - return resource_get_type((IWineD3DResource *)iface); -} - -static void * WINAPI IWineD3DCubeTextureImpl_GetParent(IWineD3DCubeTexture *iface) -{ - TRACE("iface %p.\n", iface); - - return ((IWineD3DCubeTextureImpl *)iface)->resource.parent; -} - -/* ****************************************************** - IWineD3DCubeTexture IWineD3DBaseTexture parts follow - ****************************************************** */ -static DWORD WINAPI IWineD3DCubeTextureImpl_SetLOD(IWineD3DCubeTexture *iface, DWORD LODNew) { - return basetexture_set_lod((IWineD3DBaseTexture *)iface, LODNew); -} - -static DWORD WINAPI IWineD3DCubeTextureImpl_GetLOD(IWineD3DCubeTexture *iface) { - return basetexture_get_lod((IWineD3DBaseTexture *)iface); -} - -static DWORD WINAPI IWineD3DCubeTextureImpl_GetLevelCount(IWineD3DCubeTexture *iface) { - return basetexture_get_level_count((IWineD3DBaseTexture *)iface); -} - -static HRESULT WINAPI IWineD3DCubeTextureImpl_SetAutoGenFilterType(IWineD3DCubeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { - return basetexture_set_autogen_filter_type((IWineD3DBaseTexture *)iface, FilterType); -} - -static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DCubeTextureImpl_GetAutoGenFilterType(IWineD3DCubeTexture *iface) { - return basetexture_get_autogen_filter_type((IWineD3DBaseTexture *)iface); -} - -static void WINAPI IWineD3DCubeTextureImpl_GenerateMipSubLevels(IWineD3DCubeTexture *iface) { - basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface); -} - -/* Internal function, No d3d mapping */ -static BOOL WINAPI IWineD3DCubeTextureImpl_SetDirty(IWineD3DCubeTexture *iface, BOOL dirty) { - return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty); -} - -/* Internal function, No d3d mapping */ -static BOOL WINAPI IWineD3DCubeTextureImpl_GetDirty(IWineD3DCubeTexture *iface) { - return basetexture_get_dirty((IWineD3DBaseTexture *)iface); -} - -/* Context activation is done by the caller. */ -static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *iface, BOOL srgb) { - IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; - BOOL set_gl_texture_desc; - HRESULT hr; - - TRACE("(%p) : relay to BaseTexture\n", This); - - hr = basetexture_bind((IWineD3DBaseTexture *)iface, srgb, &set_gl_texture_desc); - if (set_gl_texture_desc && SUCCEEDED(hr)) - { - UINT sub_count = This->baseTexture.level_count * This->baseTexture.layer_count; - UINT i; - - for (i = 0; i < sub_count; ++i) - { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - - if (This->baseTexture.is_srgb) - surface_set_texture_name(surface, This->baseTexture.texture_srgb.name, TRUE); - else - surface_set_texture_name(surface, This->baseTexture.texture_rgb.name, FALSE); - } - } - - return hr; -} - -static BOOL WINAPI IWineD3DCubeTextureImpl_IsCondNP2(IWineD3DCubeTexture *iface) -{ - TRACE("iface %p.\n", iface); - - return FALSE; -} - -/* ******************************************* - IWineD3DCubeTexture IWineD3DCubeTexture parts follow - ******************************************* */ -static HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *iface, - UINT level, WINED3DSURFACE_DESC *desc) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *surface; - - TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); - - if (!(surface = (IWineD3DSurface *)basetexture_get_sub_resource(texture, 0, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - IWineD3DSurface_GetDesc(surface, desc); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *iface, - WINED3DCUBEMAP_FACES face, UINT level, IWineD3DSurface **surface) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *s; - - TRACE("iface %p, face %u, level %u, surface %p.\n", - iface, face, level, surface); - - if (!(s = (IWineD3DSurface *)basetexture_get_sub_resource(texture, face, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - IWineD3DSurface_AddRef(s); - *surface = s; - - TRACE("Returning surface %p.\n", *surface); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, - WINED3DCUBEMAP_FACES face, UINT level, WINED3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *surface; - - TRACE("iface %p, face %u, level %u, locked_rect %p, rect %s, flags %#x.\n", - iface, face, level, locked_rect, wine_dbgstr_rect(rect), flags); - - if (!(surface = (IWineD3DSurface *)basetexture_get_sub_resource(texture, face, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - return IWineD3DSurface_LockRect(surface, locked_rect, rect, flags); -} - -static HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, - WINED3DCUBEMAP_FACES face, UINT level) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *surface; - - TRACE("iface %p, face %u, level %u.\n", - iface, face, level); - - if (!(surface = (IWineD3DSurface *)basetexture_get_sub_resource(texture, face, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - return IWineD3DSurface_UnlockRect(surface); -} - -static HRESULT WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture *iface, - WINED3DCUBEMAP_FACES face, const RECT *dirty_rect) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurfaceImpl *surface; - - TRACE("iface %p, face %u, dirty_rect %s.\n", - iface, face, wine_dbgstr_rect(dirty_rect)); - - if (!(surface = (IWineD3DSurfaceImpl *)basetexture_get_sub_resource(texture, face, 0))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - texture->baseTexture.texture_rgb.dirty = TRUE; - texture->baseTexture.texture_srgb.dirty = TRUE; - surface_add_dirty_rect(surface, dirty_rect); - - return WINED3D_OK; -} - -static const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl = -{ - /* IUnknown */ - IWineD3DCubeTextureImpl_QueryInterface, - IWineD3DCubeTextureImpl_AddRef, - IWineD3DCubeTextureImpl_Release, - /* IWineD3DResource */ - IWineD3DCubeTextureImpl_GetParent, - IWineD3DCubeTextureImpl_SetPrivateData, - IWineD3DCubeTextureImpl_GetPrivateData, - IWineD3DCubeTextureImpl_FreePrivateData, - IWineD3DCubeTextureImpl_SetPriority, - IWineD3DCubeTextureImpl_GetPriority, - IWineD3DCubeTextureImpl_PreLoad, - IWineD3DCubeTextureImpl_UnLoad, - IWineD3DCubeTextureImpl_GetType, - /* IWineD3DBaseTexture */ - IWineD3DCubeTextureImpl_SetLOD, - IWineD3DCubeTextureImpl_GetLOD, - IWineD3DCubeTextureImpl_GetLevelCount, - IWineD3DCubeTextureImpl_SetAutoGenFilterType, - IWineD3DCubeTextureImpl_GetAutoGenFilterType, - IWineD3DCubeTextureImpl_GenerateMipSubLevels, - IWineD3DCubeTextureImpl_SetDirty, - IWineD3DCubeTextureImpl_GetDirty, - IWineD3DCubeTextureImpl_BindTexture, - IWineD3DCubeTextureImpl_IsCondNP2, - /* IWineD3DCubeTexture */ - IWineD3DCubeTextureImpl_GetLevelDesc, - IWineD3DCubeTextureImpl_GetCubeMapSurface, - IWineD3DCubeTextureImpl_LockRect, - IWineD3DCubeTextureImpl_UnlockRect, - IWineD3DCubeTextureImpl_AddDirtyRect -}; - -HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UINT levels, - IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, - void *parent, const struct wined3d_parent_ops *parent_ops) -{ - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); - UINT pow2_edge_length; - unsigned int i, j; - UINT tmp_w; - HRESULT hr; - - /* TODO: It should only be possible to create textures for formats - * that are reported as supported. */ - if (WINED3DFMT_UNKNOWN >= format_id) - { - WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); - return WINED3DERR_INVALIDCALL; - } - - if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP] && pool != WINED3DPOOL_SCRATCH) - { - WARN("(%p) : Tried to create not supported cube texture.\n", texture); - return WINED3DERR_INVALIDCALL; - } - - /* Calculate levels for mip mapping */ - if (usage & WINED3DUSAGE_AUTOGENMIPMAP) - { - if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) - { - WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - - if (levels > 1) - { - WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - - levels = 1; - } - else if (!levels) - { - levels = wined3d_log2i(edge_length) + 1; - TRACE("Calculated levels = %u.\n", levels); - } - - texture->lpVtbl = &IWineD3DCubeTexture_Vtbl; - - hr = basetexture_init((IWineD3DBaseTextureImpl *)texture, 6, levels, - WINED3DRTYPE_CUBETEXTURE, device, 0, usage, format, pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize basetexture, returning %#x\n", hr); - return hr; - } - - /* Find the nearest pow2 match. */ - pow2_edge_length = 1; - while (pow2_edge_length < edge_length) pow2_edge_length <<= 1; - - if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || (edge_length == pow2_edge_length)) - { - /* Precalculated scaling for 'faked' non power of two texture coords. */ - texture->baseTexture.pow2Matrix[0] = 1.0f; - texture->baseTexture.pow2Matrix[5] = 1.0f; - texture->baseTexture.pow2Matrix[10] = 1.0f; - texture->baseTexture.pow2Matrix[15] = 1.0f; - } - else - { - /* Precalculated scaling for 'faked' non power of two texture coords. */ - texture->baseTexture.pow2Matrix[0] = ((float)edge_length) / ((float)pow2_edge_length); - texture->baseTexture.pow2Matrix[5] = ((float)edge_length) / ((float)pow2_edge_length); - texture->baseTexture.pow2Matrix[10] = ((float)edge_length) / ((float)pow2_edge_length); - texture->baseTexture.pow2Matrix[15] = 1.0f; - texture->baseTexture.pow2Matrix_identity = FALSE; - } - texture->baseTexture.target = GL_TEXTURE_CUBE_MAP_ARB; - - /* Generate all the surfaces. */ - tmp_w = edge_length; - for (i = 0; i < texture->baseTexture.level_count; ++i) - { - /* Create the 6 faces. */ - for (j = 0; j < 6; ++j) - { - static const GLenum cube_targets[6] = - { - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, - }; - UINT idx = j * texture->baseTexture.level_count + i; - IWineD3DSurface *surface; - - hr = IWineD3DDeviceParent_CreateSurface(device->device_parent, parent, tmp_w, tmp_w, - format_id, usage, pool, i /* Level */, j, &surface); - if (FAILED(hr)) - { - FIXME("(%p) Failed to create surface, hr %#x.\n", texture, hr); - cubetexture_cleanup(texture); - return hr; - } - - surface_set_container((IWineD3DSurfaceImpl *)surface, WINED3D_CONTAINER_TEXTURE, (IWineD3DBase *)texture); - surface_set_texture_target((IWineD3DSurfaceImpl *)surface, cube_targets[j]); - texture->baseTexture.sub_resources[idx] = (IWineD3DResourceImpl *)surface; - TRACE("Created surface level %u @ %p.\n", i, surface); - } - tmp_w = max(1, tmp_w >> 1); - } - texture->baseTexture.internal_preload = cubetexture_internal_preload; - - return WINED3D_OK; -} diff --git a/dll/directx/wine/wined3d/device.c b/dll/directx/wine/wined3d/device.c index 97acd5f9946..8724cdfb3e8 100644 --- a/dll/directx/wine/wined3d/device.c +++ b/dll/directx/wine/wined3d/device.c @@ -9,7 +9,7 @@ * Copyright 2006-2008 Stefan Dösinger for CodeWeavers * Copyright 2006-2008 Henri Verbeet * Copyright 2007 Andrew Riedi - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -173,11 +173,11 @@ static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum) } /* Context activation is done by the caller. */ -void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, +void device_stream_info_from_declaration(struct wined3d_device *device, BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup) { /* We need to deal with frequency data! */ - IWineD3DVertexDeclarationImpl *declaration = This->stateBlock->state.vertex_declaration; + struct wined3d_vertex_declaration *declaration = device->stateBlock->state.vertex_declaration; unsigned int i; stream_info->use_map = 0; @@ -191,7 +191,7 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, for (i = 0; i < declaration->element_count; ++i) { const struct wined3d_vertex_declaration_element *element = &declaration->elements[i]; - struct wined3d_buffer *buffer = This->stateBlock->state.streams[element->input_slot].buffer; + struct wined3d_buffer *buffer = device->stateBlock->state.streams[element->input_slot].buffer; GLuint buffer_object = 0; const BYTE *data = NULL; BOOL stride_used; @@ -203,8 +203,8 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, if (!buffer) continue; - stride = This->stateBlock->state.streams[element->input_slot].stride; - if (This->stateBlock->state.user_stream) + stride = device->stateBlock->state.streams[element->input_slot].stride; + if (device->stateBlock->state.user_stream) { TRACE("Stream %u is UP, %p\n", element->input_slot, buffer); buffer_object = 0; @@ -213,20 +213,20 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, else { TRACE("Stream %u isn't UP, %p\n", element->input_slot, buffer); - data = buffer_get_memory((IWineD3DBuffer *)buffer, &This->adapter->gl_info, &buffer_object); + data = buffer_get_memory(buffer, &device->adapter->gl_info, &buffer_object); /* Can't use vbo's if the base vertex index is negative. OpenGL doesn't accept negative offsets * (or rather offsets bigger than the vbo, because the pointer is unsigned), so use system memory * sources. In most sane cases the pointer - offset will still be > 0, otherwise it will wrap * around to some big value. Hope that with the indices, the driver wraps it back internally. If * not, drawStridedSlow is needed, including a vertex buffer path. */ - if (This->stateBlock->state.load_base_vertex_index < 0) + if (device->stateBlock->state.load_base_vertex_index < 0) { WARN("load_base_vertex_index is < 0 (%d), not using VBOs.\n", - This->stateBlock->state.load_base_vertex_index); + device->stateBlock->state.load_base_vertex_index); buffer_object = 0; - data = buffer_get_sysmem(buffer, &This->adapter->gl_info); - if ((UINT_PTR)data < -This->stateBlock->state.load_base_vertex_index * stride) + data = buffer_get_sysmem(buffer, &device->adapter->gl_info); + if ((UINT_PTR)data < -device->stateBlock->state.load_base_vertex_index * stride) { FIXME("System memory vertex data load offset is negative!\n"); } @@ -260,7 +260,7 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, /* TODO: Assuming vertexdeclarations are usually used with the * same or a similar shader, it might be worth it to store the * last used output slot and try that one first. */ - stride_used = vshader_get_input(This->stateBlock->state.vertex_shader, + stride_used = vshader_get_input(device->stateBlock->state.vertex_shader, element->usage, element->usage_idx, &idx); } else @@ -297,7 +297,7 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, stream_info->elements[idx].stream_idx = element->input_slot; stream_info->elements[idx].buffer_object = buffer_object; - if (!This->adapter->gl_info.supported[ARB_VERTEX_ARRAY_BGRA] + if (!device->adapter->gl_info.supported[ARB_VERTEX_ARRAY_BGRA] && element->format->id == WINED3DFMT_B8G8R8A8_UNORM) { stream_info->swizzle_map |= 1 << idx; @@ -306,8 +306,8 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, } } - This->num_buffer_queries = 0; - if (!This->stateBlock->state.user_stream) + device->num_buffer_queries = 0; + if (!device->stateBlock->state.user_stream) { WORD map = stream_info->use_map; @@ -320,18 +320,18 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, if (!(map & 1)) continue; element = &stream_info->elements[i]; - buffer = This->stateBlock->state.streams[element->stream_idx].buffer; - IWineD3DBuffer_PreLoad((IWineD3DBuffer *)buffer); + buffer = device->stateBlock->state.streams[element->stream_idx].buffer; + wined3d_buffer_preload(buffer); /* If PreLoad dropped the buffer object, update the stream info. */ if (buffer->buffer_object != element->buffer_object) { element->buffer_object = 0; - element->data = buffer_get_sysmem(buffer, &This->adapter->gl_info) + (ptrdiff_t)element->data; + element->data = buffer_get_sysmem(buffer, &device->adapter->gl_info) + (ptrdiff_t)element->data; } if (buffer->query) - This->buffer_queries[This->num_buffer_queries++] = buffer->query; + device->buffer_queries[device->num_buffer_queries++] = buffer->query; } } } @@ -405,7 +405,7 @@ static void device_trace_strided_stream_info(const struct wined3d_stream_info *s } /* Context activation is done by the caller. */ -void device_update_stream_info(IWineD3DDeviceImpl *device, const struct wined3d_gl_info *gl_info) +void device_update_stream_info(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) { struct wined3d_stream_info *stream_info = &device->strided_streams; const struct wined3d_state *state = &device->stateBlock->state; @@ -455,15 +455,15 @@ void device_update_stream_info(IWineD3DDeviceImpl *device, const struct wined3d_ static void device_preload_texture(const struct wined3d_state *state, unsigned int idx) { - IWineD3DBaseTextureImpl *texture; + struct wined3d_texture *texture; enum WINED3DSRGB srgb; if (!(texture = state->textures[idx])) return; srgb = state->sampler_states[idx][WINED3DSAMP_SRGBTEXTURE] ? SRGB_SRGB : SRGB_RGB; - texture->baseTexture.internal_preload((IWineD3DBaseTexture *)texture, srgb); + texture->texture_ops->texture_preload(texture, srgb); } -void device_preload_textures(IWineD3DDeviceImpl *device) +void device_preload_textures(struct wined3d_device *device) { const struct wined3d_state *state = &device->stateBlock->state; unsigned int i; @@ -472,7 +472,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device) { for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) { - if (state->vertex_shader->baseShader.reg_maps.sampler_type[i]) + if (state->vertex_shader->reg_maps.sampler_type[i]) device_preload_texture(state, MAX_FRAGMENT_SAMPLERS + i); } } @@ -481,7 +481,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device) { for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) { - if (state->pixel_shader->baseShader.reg_maps.sampler_type[i]) + if (state->pixel_shader->reg_maps.sampler_type[i]) device_preload_texture(state, i); } } @@ -497,14 +497,15 @@ void device_preload_textures(IWineD3DDeviceImpl *device) } } -BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *context) +BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context) { struct wined3d_context **new_array; TRACE("Adding context %p.\n", context); if (!device->contexts) new_array = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_array)); - else new_array = HeapReAlloc(GetProcessHeap(), 0, device->contexts, sizeof(*new_array) * (device->numContexts + 1)); + else new_array = HeapReAlloc(GetProcessHeap(), 0, device->contexts, + sizeof(*new_array) * (device->context_count + 1)); if (!new_array) { @@ -512,12 +513,12 @@ BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *cont return FALSE; } - new_array[device->numContexts++] = context; + new_array[device->context_count++] = context; device->contexts = new_array; return TRUE; } -void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *context) +void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) { struct wined3d_context **new_array; BOOL found = FALSE; @@ -525,7 +526,7 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c TRACE("Removing context %p.\n", context); - for (i = 0; i < device->numContexts; ++i) + for (i = 0; i < device->context_count; ++i) { if (device->contexts[i] == context) { @@ -540,15 +541,15 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c return; } - if (!--device->numContexts) + if (!--device->context_count) { HeapFree(GetProcessHeap(), 0, device->contexts); device->contexts = NULL; return; } - memmove(&device->contexts[i], &device->contexts[i + 1], (device->numContexts - i) * sizeof(*device->contexts)); - new_array = HeapReAlloc(GetProcessHeap(), 0, device->contexts, device->numContexts * sizeof(*device->contexts)); + memmove(&device->contexts[i], &device->contexts[i + 1], (device->context_count - i) * sizeof(*device->contexts)); + new_array = HeapReAlloc(GetProcessHeap(), 0, device->contexts, device->context_count * sizeof(*device->contexts)); if (!new_array) { ERR("Failed to shrink context array. Oh well.\n"); @@ -558,9 +559,9 @@ void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *c device->contexts = new_array; } -void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) +void device_get_draw_rect(struct wined3d_device *device, RECT *rect) { - IWineD3DStateBlockImpl *stateblock = device->stateBlock; + struct wined3d_stateblock *stateblock = device->stateBlock; WINED3DVIEWPORT *vp = &stateblock->state.viewport; SetRect(rect, vp->X, vp->Y, vp->X + vp->Width, vp->Y + vp->Height); @@ -572,8 +573,8 @@ void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) } /* Do not call while under the GL lock. */ -void device_switch_onscreen_ds(IWineD3DDeviceImpl *device, - struct wined3d_context *context, IWineD3DSurfaceImpl *depth_stencil) +void device_switch_onscreen_ds(struct wined3d_device *device, + struct wined3d_context *context, struct wined3d_surface *depth_stencil) { if (device->onscreen_depth_stencil) { @@ -581,35 +582,35 @@ void device_switch_onscreen_ds(IWineD3DDeviceImpl *device, surface_modify_ds_location(device->onscreen_depth_stencil, SFLAG_DS_OFFSCREEN, device->onscreen_depth_stencil->ds_current_size.cx, device->onscreen_depth_stencil->ds_current_size.cy); - IWineD3DSurface_Release((IWineD3DSurface *)device->onscreen_depth_stencil); + wined3d_surface_decref(device->onscreen_depth_stencil); } device->onscreen_depth_stencil = depth_stencil; - IWineD3DSurface_AddRef((IWineD3DSurface *)device->onscreen_depth_stencil); + wined3d_surface_incref(device->onscreen_depth_stencil); } -static BOOL is_full_clear(IWineD3DSurfaceImpl *target, const RECT *draw_rect, const RECT *clear_rect) +static BOOL is_full_clear(struct wined3d_surface *target, const RECT *draw_rect, const RECT *clear_rect) { /* partial draw rect */ if (draw_rect->left || draw_rect->top - || draw_rect->right < target->currentDesc.Width - || draw_rect->bottom < target->currentDesc.Height) + || draw_rect->right < target->resource.width + || draw_rect->bottom < target->resource.height) return FALSE; /* partial clear rect */ if (clear_rect && (clear_rect->left > 0 || clear_rect->top > 0 - || clear_rect->right < target->currentDesc.Width - || clear_rect->bottom < target->currentDesc.Height)) + || clear_rect->right < target->resource.width + || clear_rect->bottom < target->resource.height)) return FALSE; return TRUE; } -static void prepare_ds_clear(IWineD3DSurfaceImpl *ds, struct wined3d_context *context, +static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context *context, DWORD location, const RECT *draw_rect, UINT rect_count, const RECT *clear_rect) { RECT current_rect, r; - if (ds->Flags & location) + if (ds->flags & location) SetRect(¤t_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy); @@ -650,16 +651,16 @@ static void prepare_ds_clear(IWineD3DSurfaceImpl *ds, struct wined3d_context *co } /* Do not call while under the GL lock. */ -HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, IWineD3DSurfaceImpl **rts, - UINT rect_count, const RECT *rects, const RECT *draw_rect, DWORD flags, - const WINED3DCOLORVALUE *color, float depth, DWORD stencil) +HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count, struct wined3d_surface **rts, + struct wined3d_surface *depth_stencil, UINT rect_count, const RECT *rects, const RECT *draw_rect, + DWORD flags, const WINED3DCOLORVALUE *color, float depth, DWORD stencil) { const RECT *clear_rect = (rect_count > 0 && rects) ? (const RECT *)rects : NULL; - IWineD3DSurfaceImpl *depth_stencil = device->depth_stencil; - IWineD3DSurfaceImpl *target = rts[0]; + struct wined3d_surface *target = rt_count ? rts[0] : NULL; UINT drawable_width, drawable_height; struct wined3d_context *context; GLbitfield clear_mask = 0; + BOOL render_offscreen; unsigned int i; /* When we're clearing parts of the drawable, make sure that the target surface is well up to date in the @@ -686,9 +687,24 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I return WINED3D_OK; } - context_apply_clear_state(context, device, rt_count, rts, depth_stencil); + if (!context_apply_clear_state(context, device, rt_count, rts, depth_stencil)) + { + context_release(context); + WARN("Failed to apply clear state, skipping clear.\n"); + return WINED3D_OK; + } - target->get_drawable_size(context, &drawable_width, &drawable_height); + if (target) + { + render_offscreen = context->render_offscreen; + target->get_drawable_size(context, &drawable_width, &drawable_height); + } + else + { + render_offscreen = TRUE; + drawable_width = depth_stencil->pow2Width; + drawable_height = depth_stencil->pow2Height; + } ENTER_GL(); @@ -709,7 +725,7 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I if (flags & WINED3DCLEAR_ZBUFFER) { - DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; + DWORD location = render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; if (location == SFLAG_DS_ONSCREEN && depth_stencil != device->onscreen_depth_stencil) { @@ -746,7 +762,7 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I if (!clear_rect) { - if (context->render_offscreen) + if (render_offscreen) { glScissor(draw_rect->left, draw_rect->top, draw_rect->right - draw_rect->left, draw_rect->bottom - draw_rect->top); @@ -783,7 +799,7 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I continue; } - if (context->render_offscreen) + if (render_offscreen) { glScissor(current_rect.left, current_rect.top, current_rect.right - current_rect.left, current_rect.bottom - current_rect.top); @@ -802,7 +818,8 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I LEAVE_GL(); - if (wined3d_settings.strict_draw_ordering || (target->container.type == WINED3D_CONTAINER_SWAPCHAIN + if (wined3d_settings.strict_draw_ordering || (flags & WINED3DCLEAR_TARGET + && target->container.type == WINED3D_CONTAINER_SWAPCHAIN && target->container.u.swapchain->front_buffer == target)) wglFlush(); /* Flush to ensure ordering across contexts. */ @@ -811,828 +828,90 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I return WINED3D_OK; } - -/********************************************************** - * IUnknown parts follows - **********************************************************/ - -static HRESULT WINAPI IWineD3DDeviceImpl_QueryInterface(IWineD3DDevice *iface, REFIID riid, void **object) +ULONG CDECL wined3d_device_incref(struct wined3d_device *device) { - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); + ULONG refcount = InterlockedIncrement(&device->ref); - if (IsEqualGUID(riid, &IID_IWineD3DDevice) - || IsEqualGUID(riid, &IID_IUnknown)) + TRACE("%p increasing refcount to %u.\n", device, refcount); + + return refcount; +} + +ULONG CDECL wined3d_device_decref(struct wined3d_device *device) +{ + ULONG refcount = InterlockedDecrement(&device->ref); + + TRACE("%p decreasing refcount to %u.\n", device, refcount); + + if (!refcount) { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI IWineD3DDeviceImpl_AddRef(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1); - return refCount; -} - -static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p) : Releasing from %d\n", This, refCount + 1); - - if (!refCount) { UINT i; - for (i = 0; i < sizeof(This->multistate_funcs)/sizeof(This->multistate_funcs[0]); ++i) { - HeapFree(GetProcessHeap(), 0, This->multistate_funcs[i]); - This->multistate_funcs[i] = NULL; + for (i = 0; i < sizeof(device->multistate_funcs) / sizeof(device->multistate_funcs[0]); ++i) + { + HeapFree(GetProcessHeap(), 0, device->multistate_funcs[i]); + device->multistate_funcs[i] = NULL; } - /* TODO: Clean up all the surfaces and textures! */ - /* NOTE: You must release the parent if the object was created via a callback - ** ***************************/ - - if (!list_empty(&This->resources)) + if (!list_empty(&device->resources)) { - IWineD3DResourceImpl *resource; - FIXME("(%p) Device released with resources still bound, acceptable but unexpected\n", This); + struct wined3d_resource *resource; - LIST_FOR_EACH_ENTRY(resource, &This->resources, IWineD3DResourceImpl, resource.resource_list_entry) + FIXME("Device released with resources still bound, acceptable but unexpected.\n"); + + LIST_FOR_EACH_ENTRY(resource, &device->resources, struct wined3d_resource, resource_list_entry) { - WINED3DRESOURCETYPE type = IWineD3DResource_GetType((IWineD3DResource *)resource); FIXME("Leftover resource %p with type %s (%#x).\n", - resource, debug_d3dresourcetype(type), type); + resource, debug_d3dresourcetype(resource->resourceType), resource->resourceType); } } - if(This->contexts) ERR("Context array not freed!\n"); - if (This->hardwareCursor) DestroyCursor(This->hardwareCursor); - This->haveHardwareCursor = FALSE; + if (device->contexts) + ERR("Context array not freed!\n"); + if (device->hardwareCursor) + DestroyCursor(device->hardwareCursor); + device->hardwareCursor = 0; - IWineD3D_Release(This->wined3d); - This->wined3d = NULL; - HeapFree(GetProcessHeap(), 0, This); - TRACE("Freed device %p\n", This); - This = NULL; + wined3d_decref(device->wined3d); + device->wined3d = NULL; + HeapFree(GetProcessHeap(), 0, device); + TRACE("Freed device %p.\n", device); } - return refCount; + + return refcount; } -static HRESULT WINAPI IWineD3DDeviceImpl_CreateBuffer(IWineD3DDevice *iface, struct wined3d_buffer_desc *desc, - const void *data, void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DBuffer **buffer) +UINT CDECL wined3d_device_get_swapchain_count(struct wined3d_device *device) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - struct wined3d_buffer *object; - HRESULT hr; + TRACE("device %p.\n", device); - TRACE("iface %p, desc %p, data %p, parent %p, buffer %p\n", iface, desc, data, parent, buffer); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate memory\n"); - return E_OUTOFMEMORY; - } - - FIXME("Ignoring access flags (pool)\n"); - - hr = buffer_init(object, This, desc->byte_width, desc->usage, WINED3DFMT_UNKNOWN, - WINED3DPOOL_MANAGED, GL_ARRAY_BUFFER_ARB, data, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize buffer, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - object->desc = *desc; - - TRACE("Created buffer %p.\n", object); - - *buffer = (IWineD3DBuffer *)object; - - return WINED3D_OK; + return device->swapchain_count; } -static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, - UINT Size, DWORD Usage, WINED3DPOOL Pool, void *parent, - const struct wined3d_parent_ops *parent_ops, IWineD3DBuffer **ppVertexBuffer) +HRESULT CDECL wined3d_device_get_swapchain(struct wined3d_device *device, + UINT swapchain_idx, struct wined3d_swapchain **swapchain) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - struct wined3d_buffer *object; - HRESULT hr; + TRACE("device %p, swapchain_idx %u, swapchain %p.\n", + device, swapchain_idx, swapchain); - TRACE("iface %p, size %u, usage %#x, pool %#x, buffer %p, parent %p, parent_ops %p.\n", - iface, Size, Usage, Pool, ppVertexBuffer, parent, parent_ops); - - if (Pool == WINED3DPOOL_SCRATCH) + if (swapchain_idx >= device->swapchain_count) { - /* The d3d9 testsuit shows that this is not allowed. It doesn't make much sense - * anyway, SCRATCH vertex buffers aren't usable anywhere - */ - WARN("Vertex buffer in D3DPOOL_SCRATCH requested, returning WINED3DERR_INVALIDCALL\n"); - *ppVertexBuffer = NULL; + WARN("swapchain_idx %u >= swapchain_count %u.\n", + swapchain_idx, device->swapchain_count); + *swapchain = NULL; + return WINED3DERR_INVALIDCALL; } - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Out of memory\n"); - *ppVertexBuffer = NULL; - return WINED3DERR_OUTOFVIDEOMEMORY; - } - - hr = buffer_init(object, This, Size, Usage, WINED3DFMT_VERTEXDATA, - Pool, GL_ARRAY_BUFFER_ARB, NULL, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize buffer, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created buffer %p.\n", object); - *ppVertexBuffer = (IWineD3DBuffer *)object; + *swapchain = device->swapchains[swapchain_idx]; + wined3d_swapchain_incref(*swapchain); + TRACE("Returning %p.\n", *swapchain); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, - UINT Length, DWORD Usage, WINED3DPOOL Pool, void *parent, - const struct wined3d_parent_ops *parent_ops, IWineD3DBuffer **ppIndexBuffer) +static void IWineD3DDeviceImpl_LoadLogo(struct wined3d_device *device, const char *filename) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - struct wined3d_buffer *object; - HRESULT hr; - - TRACE("(%p) Creating index buffer\n", This); - - /* Allocate the storage for the device */ - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Out of memory\n"); - *ppIndexBuffer = NULL; - return WINED3DERR_OUTOFVIDEOMEMORY; - } - - hr = buffer_init(object, This, Length, Usage | WINED3DUSAGE_STATICDECL, - WINED3DFMT_UNKNOWN, Pool, GL_ELEMENT_ARRAY_BUFFER_ARB, NULL, - parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize buffer, hr %#x\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created buffer %p.\n", object); - - *ppIndexBuffer = (IWineD3DBuffer *) object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice *iface, - WINED3DSTATEBLOCKTYPE type, IWineD3DStateBlock **stateblock) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DStateBlockImpl *object; - HRESULT hr; - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if(!object) - { - ERR("Failed to allocate stateblock memory.\n"); - return E_OUTOFMEMORY; - } - - hr = stateblock_init(object, This, type); - if (FAILED(hr)) - { - WARN("Failed to initialize stateblock, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created stateblock %p.\n", object); - *stateblock = (IWineD3DStateBlock *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height, - enum wined3d_format_id Format, BOOL Lockable, BOOL Discard, UINT Level, DWORD Usage, WINED3DPOOL Pool, - WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, WINED3DSURFTYPE Impl, - void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DSurface **surface) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DSurfaceImpl *object; - HRESULT hr; - - TRACE("iface %p, width %u, height %u, format %s (%#x), lockable %#x, discard %#x, level %u\n", - iface, Width, Height, debug_d3dformat(Format), Format, Lockable, Discard, Level); - TRACE("surface %p, usage %s (%#x), pool %s (%#x), multisample_type %#x, multisample_quality %u\n", - surface, debug_d3dusage(Usage), Usage, debug_d3dpool(Pool), Pool, MultiSample, MultisampleQuality); - TRACE("surface_type %#x, parent %p, parent_ops %p.\n", Impl, parent, parent_ops); - - if (Impl == SURFACE_OPENGL && !This->adapter) - { - ERR("OpenGL surfaces are not available without OpenGL.\n"); - return WINED3DERR_NOTAVAILABLE; - } - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate surface memory.\n"); - return WINED3DERR_OUTOFVIDEOMEMORY; - } - - hr = surface_init(object, Impl, This->surface_alignment, Width, Height, Level, Lockable, - Discard, MultiSample, MultisampleQuality, This, Usage, Format, Pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize surface, returning %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("(%p) : Created surface %p\n", This, object); - - *surface = (IWineD3DSurface *)object; - - return hr; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateRendertargetView(IWineD3DDevice *iface, - IWineD3DResource *resource, void *parent, IWineD3DRendertargetView **rendertarget_view) -{ - struct wined3d_rendertarget_view *object; - - TRACE("iface %p, resource %p, parent %p, rendertarget_view %p.\n", - iface, resource, parent, rendertarget_view); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate memory\n"); - return E_OUTOFMEMORY; - } - - wined3d_rendertarget_view_init(object, resource, parent); - - TRACE("Created render target view %p.\n", object); - *rendertarget_view = (IWineD3DRendertargetView *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, - UINT Width, UINT Height, UINT Levels, DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool, - void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DTexture **ppTexture) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DTextureImpl *object; - HRESULT hr; - - TRACE("(%p) : Width %d, Height %d, Levels %d, Usage %#x\n", This, Width, Height, Levels, Usage); - TRACE("Format %#x (%s), Pool %#x, ppTexture %p, parent %p\n", - Format, debug_d3dformat(Format), Pool, ppTexture, parent); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Out of memory\n"); - *ppTexture = NULL; - return WINED3DERR_OUTOFVIDEOMEMORY; - } - - hr = texture_init(object, Width, Height, Levels, This, Usage, Format, Pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize texture, returning %#x\n", hr); - HeapFree(GetProcessHeap(), 0, object); - *ppTexture = NULL; - return hr; - } - - *ppTexture = (IWineD3DTexture *)object; - - TRACE("(%p) : Created texture %p\n", This, object); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, - UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool, - void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DVolumeTexture **ppVolumeTexture) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DVolumeTextureImpl *object; - HRESULT hr; - - TRACE("(%p) : W(%u) H(%u) D(%u), Lvl(%u) Usage(%#x), Fmt(%u,%s), Pool(%s)\n", This, Width, Height, - Depth, Levels, Usage, Format, debug_d3dformat(Format), debug_d3dpool(Pool)); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Out of memory\n"); - *ppVolumeTexture = NULL; - return WINED3DERR_OUTOFVIDEOMEMORY; - } - - hr = volumetexture_init(object, Width, Height, Depth, Levels, This, Usage, Format, Pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize volumetexture, returning %#x\n", hr); - HeapFree(GetProcessHeap(), 0, object); - *ppVolumeTexture = NULL; - return hr; - } - - TRACE("(%p) : Created volume texture %p.\n", This, object); - *ppVolumeTexture = (IWineD3DVolumeTexture *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface, UINT Width, UINT Height, - UINT Depth, DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool, void *parent, - const struct wined3d_parent_ops *parent_ops, IWineD3DVolume **ppVolume) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DVolumeImpl *object; - HRESULT hr; - - TRACE("(%p) : W(%d) H(%d) D(%d), Usage(%d), Fmt(%u,%s), Pool(%s)\n", This, Width, Height, - Depth, Usage, Format, debug_d3dformat(Format), debug_d3dpool(Pool)); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Out of memory\n"); - *ppVolume = NULL; - return WINED3DERR_OUTOFVIDEOMEMORY; - } - - hr = volume_init(object, This, Width, Height, Depth, Usage, Format, Pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize volume, returning %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("(%p) : Created volume %p.\n", This, object); - *ppVolume = (IWineD3DVolume *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT EdgeLength, UINT Levels, - DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool, void *parent, - const struct wined3d_parent_ops *parent_ops, IWineD3DCubeTexture **ppCubeTexture) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DCubeTextureImpl *object; /** NOTE: impl ref allowed since this is a create function **/ - HRESULT hr; - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Out of memory\n"); - *ppCubeTexture = NULL; - return WINED3DERR_OUTOFVIDEOMEMORY; - } - - hr = cubetexture_init(object, EdgeLength, Levels, This, Usage, Format, Pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize cubetexture, returning %#x\n", hr); - HeapFree(GetProcessHeap(), 0, object); - *ppCubeTexture = NULL; - return hr; - } - - TRACE("(%p) : Created Cube Texture %p\n", This, object); - *ppCubeTexture = (IWineD3DCubeTexture *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, - WINED3DQUERYTYPE type, IWineD3DQuery **query) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DQueryImpl *object; - HRESULT hr; - - TRACE("iface %p, type %#x, query %p.\n", iface, type, query); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate query memory.\n"); - return E_OUTOFMEMORY; - } - - hr = query_init(object, This, type); - if (FAILED(hr)) - { - WARN("Failed to initialize query, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created query %p.\n", object); - *query = (IWineD3DQuery *)object; - - return WINED3D_OK; -} - -/* Do not call while under the GL lock. */ -static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface, - WINED3DPRESENT_PARAMETERS *present_parameters, WINED3DSURFTYPE surface_type, - void *parent, IWineD3DSwapChain **swapchain) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DSwapChainImpl *object; - HRESULT hr; - - TRACE("iface %p, present_parameters %p, swapchain %p, parent %p, surface_type %#x.\n", - iface, present_parameters, swapchain, parent, surface_type); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate swapchain memory.\n"); - return E_OUTOFMEMORY; - } - - hr = swapchain_init(object, surface_type, This, present_parameters, parent); - if (FAILED(hr)) - { - WARN("Failed to initialize swapchain, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created swapchain %p.\n", object); - *swapchain = (IWineD3DSwapChain *)object; - - return WINED3D_OK; -} - -/** NOTE: These are ahead of the other getters and setters to save using a forward declaration **/ -static UINT WINAPI IWineD3DDeviceImpl_GetNumberOfSwapChains(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p)\n", This); - - return This->NumberOfSwapChains; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetSwapChain(IWineD3DDevice *iface, UINT iSwapChain, IWineD3DSwapChain **pSwapChain) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p) : swapchain %d\n", This, iSwapChain); - - if(iSwapChain < This->NumberOfSwapChains) { - *pSwapChain = This->swapchains[iSwapChain]; - IWineD3DSwapChain_AddRef(*pSwapChain); - TRACE("(%p) returning %p\n", This, *pSwapChain); - return WINED3D_OK; - } else { - TRACE("Swapchain out of range\n"); - *pSwapChain = NULL; - return WINED3DERR_INVALIDCALL; - } -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexDeclaration(IWineD3DDevice *iface, - const WINED3DVERTEXELEMENT *elements, UINT element_count, void *parent, - const struct wined3d_parent_ops *parent_ops, IWineD3DVertexDeclaration **declaration) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DVertexDeclarationImpl *object = NULL; - HRESULT hr; - - TRACE("iface %p, declaration %p, parent %p, elements %p, element_count %u.\n", - iface, declaration, parent, elements, element_count); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if(!object) - { - ERR("Failed to allocate vertex declaration memory.\n"); - return E_OUTOFMEMORY; - } - - hr = vertexdeclaration_init(object, This, elements, element_count, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize vertex declaration, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created vertex declaration %p.\n", object); - *declaration = (IWineD3DVertexDeclaration *)object; - - return WINED3D_OK; -} - -struct wined3d_fvf_convert_state -{ - const struct wined3d_gl_info *gl_info; - WINED3DVERTEXELEMENT *elements; - UINT offset; - UINT idx; -}; - -static void append_decl_element(struct wined3d_fvf_convert_state *state, - enum wined3d_format_id format_id, WINED3DDECLUSAGE usage, UINT usage_idx) -{ - WINED3DVERTEXELEMENT *elements = state->elements; - const struct wined3d_format *format; - UINT offset = state->offset; - UINT idx = state->idx; - - elements[idx].format = format_id; - elements[idx].input_slot = 0; - elements[idx].offset = offset; - elements[idx].output_slot = 0; - elements[idx].method = WINED3DDECLMETHOD_DEFAULT; - elements[idx].usage = usage; - elements[idx].usage_idx = usage_idx; - - format = wined3d_get_format(state->gl_info, format_id); - state->offset += format->component_count * format->component_size; - ++state->idx; -} - -static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the GL info, which has the type table */ - DWORD fvf, WINED3DVERTEXELEMENT **ppVertexElements) -{ - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - BOOL has_pos = !!(fvf & WINED3DFVF_POSITION_MASK); - BOOL has_blend = (fvf & WINED3DFVF_XYZB5) > WINED3DFVF_XYZRHW; - BOOL has_blend_idx = has_blend && - (((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB5) || - (fvf & WINED3DFVF_LASTBETA_D3DCOLOR) || - (fvf & WINED3DFVF_LASTBETA_UBYTE4)); - BOOL has_normal = !!(fvf & WINED3DFVF_NORMAL); - BOOL has_psize = !!(fvf & WINED3DFVF_PSIZE); - BOOL has_diffuse = !!(fvf & WINED3DFVF_DIFFUSE); - BOOL has_specular = !!(fvf & WINED3DFVF_SPECULAR); - - DWORD num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT; - DWORD texcoords = (fvf & 0xFFFF0000) >> 16; - struct wined3d_fvf_convert_state state; - unsigned int size; - unsigned int idx; - DWORD num_blends = 1 + (((fvf & WINED3DFVF_XYZB5) - WINED3DFVF_XYZB1) >> 1); - if (has_blend_idx) num_blends--; - - /* Compute declaration size */ - size = has_pos + (has_blend && num_blends > 0) + has_blend_idx + has_normal + - has_psize + has_diffuse + has_specular + num_textures; - - state.gl_info = gl_info; - state.elements = HeapAlloc(GetProcessHeap(), 0, size * sizeof(*state.elements)); - if (!state.elements) return ~0U; - state.offset = 0; - state.idx = 0; - - if (has_pos) - { - if (!has_blend && (fvf & WINED3DFVF_XYZRHW)) - append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_POSITIONT, 0); - else if ((fvf & WINED3DFVF_XYZW) == WINED3DFVF_XYZW) - append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_POSITION, 0); - else - append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_POSITION, 0); - } - - if (has_blend && (num_blends > 0)) - { - if ((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2 && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR)) - append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_BLENDWEIGHT, 0); - else - { - switch (num_blends) - { - case 1: - append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); - break; - case 2: - append_decl_element(&state, WINED3DFMT_R32G32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); - break; - case 3: - append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); - break; - case 4: - append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); - break; - default: - ERR("Unexpected amount of blend values: %u\n", num_blends); - } - } - } - - if (has_blend_idx) - { - if ((fvf & WINED3DFVF_LASTBETA_UBYTE4) - || ((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2 && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR))) - append_decl_element(&state, WINED3DFMT_R8G8B8A8_UINT, WINED3DDECLUSAGE_BLENDINDICES, 0); - else if (fvf & WINED3DFVF_LASTBETA_D3DCOLOR) - append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_BLENDINDICES, 0); - else - append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_BLENDINDICES, 0); - } - - if (has_normal) append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_NORMAL, 0); - if (has_psize) append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_PSIZE, 0); - if (has_diffuse) append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_COLOR, 0); - if (has_specular) append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_COLOR, 1); - - for (idx = 0; idx < num_textures; ++idx) - { - switch ((texcoords >> (idx * 2)) & 0x03) - { - case WINED3DFVF_TEXTUREFORMAT1: - append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); - break; - case WINED3DFVF_TEXTUREFORMAT2: - append_decl_element(&state, WINED3DFMT_R32G32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); - break; - case WINED3DFVF_TEXTUREFORMAT3: - append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); - break; - case WINED3DFVF_TEXTUREFORMAT4: - append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); - break; - } - } - - *ppVertexElements = state.elements; - return size; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexDeclarationFromFVF(IWineD3DDevice *iface, - DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, - IWineD3DVertexDeclaration **declaration) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - WINED3DVERTEXELEMENT *elements; - unsigned int size; - DWORD hr; - - TRACE("iface %p, declaration %p, parent %p, fvf %#x.\n", iface, declaration, parent, fvf); - - size = ConvertFvfToDeclaration(This, fvf, &elements); - if (size == ~0U) return E_OUTOFMEMORY; - - hr = IWineD3DDeviceImpl_CreateVertexDeclaration(iface, elements, size, parent, parent_ops, declaration); - HeapFree(GetProcessHeap(), 0, elements); - return hr; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *iface, - const DWORD *pFunction, const struct wined3d_shader_signature *output_signature, - void *parent, const struct wined3d_parent_ops *parent_ops, - IWineD3DVertexShader **ppVertexShader) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DVertexShaderImpl *object; - HRESULT hr; - - if (This->vs_selected_mode == SHADER_NONE) - return WINED3DERR_INVALIDCALL; - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate shader memory.\n"); - return E_OUTOFMEMORY; - } - - hr = vertexshader_init(object, This, pFunction, output_signature, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize vertex shader, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created vertex shader %p.\n", object); - *ppVertexShader = (IWineD3DVertexShader *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreateGeometryShader(IWineD3DDevice *iface, - const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, - void *parent, const struct wined3d_parent_ops *parent_ops, - IWineD3DGeometryShader **shader) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - struct wined3d_geometryshader *object; - HRESULT hr; - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate shader memory.\n"); - return E_OUTOFMEMORY; - } - - hr = geometryshader_init(object, This, byte_code, output_signature, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize geometry shader, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created geometry shader %p.\n", object); - *shader = (IWineD3DGeometryShader *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface, - const DWORD *pFunction, const struct wined3d_shader_signature *output_signature, - void *parent, const struct wined3d_parent_ops *parent_ops, - IWineD3DPixelShader **ppPixelShader) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DPixelShaderImpl *object; - HRESULT hr; - - if (This->ps_selected_mode == SHADER_NONE) - return WINED3DERR_INVALIDCALL; - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate shader memory.\n"); - return E_OUTOFMEMORY; - } - - hr = pixelshader_init(object, This, pFunction, output_signature, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize pixel shader, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created pixel shader %p.\n", object); - *ppPixelShader = (IWineD3DPixelShader *)object; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DWORD Flags, - const PALETTEENTRY *PalEnt, void *parent, IWineD3DPalette **Palette) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - IWineD3DPaletteImpl *object; - HRESULT hr; - - TRACE("iface %p, flags %#x, entries %p, palette %p, parent %p.\n", - iface, Flags, PalEnt, Palette, parent); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - { - ERR("Failed to allocate palette memory.\n"); - return E_OUTOFMEMORY; - } - - hr = wined3d_palette_init(object, This, Flags, PalEnt, parent); - if (FAILED(hr)) - { - WARN("Failed to initialize palette, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); - return hr; - } - - TRACE("Created palette %p.\n", object); - *Palette = (IWineD3DPalette *)object; - - return WINED3D_OK; -} - -static void IWineD3DDeviceImpl_LoadLogo(IWineD3DDeviceImpl *This, const char *filename) { HBITMAP hbm; BITMAP bm; HRESULT hr; @@ -1657,30 +936,31 @@ static void IWineD3DDeviceImpl_LoadLogo(IWineD3DDeviceImpl *This, const char *fi bm.bmHeight = 32; } - hr = IWineD3DDevice_CreateSurface((IWineD3DDevice *)This, bm.bmWidth, bm.bmHeight, WINED3DFMT_B5G6R5_UNORM, TRUE, + hr = wined3d_surface_create(device, bm.bmWidth, bm.bmHeight, WINED3DFMT_B5G6R5_UNORM, TRUE, FALSE, 0, 0, WINED3DPOOL_DEFAULT, WINED3DMULTISAMPLE_NONE, 0, SURFACE_OPENGL, NULL, - &wined3d_null_parent_ops, &This->logo_surface); + &wined3d_null_parent_ops, &device->logo_surface); if (FAILED(hr)) { ERR("Wine logo requested, but failed to create surface, hr %#x.\n", hr); goto out; } - if(dcb) { - hr = IWineD3DSurface_GetDC(This->logo_surface, &dcs); - if(FAILED(hr)) goto out; + if (dcb) + { + if (FAILED(hr = wined3d_surface_getdc(device->logo_surface, &dcs))) + goto out; BitBlt(dcs, 0, 0, bm.bmWidth, bm.bmHeight, dcb, 0, 0, SRCCOPY); - IWineD3DSurface_ReleaseDC(This->logo_surface, dcs); + wined3d_surface_releasedc(device->logo_surface, dcs); colorkey.dwColorSpaceLowValue = 0; colorkey.dwColorSpaceHighValue = 0; - IWineD3DSurface_SetColorKey(This->logo_surface, WINEDDCKEY_SRCBLT, &colorkey); + wined3d_surface_set_color_key(device->logo_surface, WINEDDCKEY_SRCBLT, &colorkey); } else { const WINED3DCOLORVALUE c = {1.0f, 1.0f, 1.0f, 1.0f}; /* Fill the surface with a white color to show that wined3d is there */ - IWineD3DDevice_ColorFill((IWineD3DDevice *)This, This->logo_surface, NULL, &c); + wined3d_device_color_fill(device, device->logo_surface, NULL, &c); } out: @@ -1689,9 +969,9 @@ out: } /* Context activation is done by the caller. */ -static void create_dummy_textures(IWineD3DDeviceImpl *This) +static void create_dummy_textures(struct wined3d_device *device) { - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; unsigned int i; /* Under DirectX you can have texture stage operations even if no texture is bound, whereas opengl will only do texture operations when a valid texture is @@ -1716,13 +996,13 @@ static void create_dummy_textures(IWineD3DDeviceImpl *This) checkGLcall("glActiveTextureARB"); /* Generate an opengl texture name */ - glGenTextures(1, &This->dummyTextureName[i]); + glGenTextures(1, &device->dummyTextureName[i]); checkGLcall("glGenTextures"); - TRACE("Dummy Texture %d given name %d\n", i, This->dummyTextureName[i]); + TRACE("Dummy Texture %d given name %d.\n", i, device->dummyTextureName[i]); /* Generate a dummy 2d texture (not using 1d because they cause many * DRI drivers fall back to sw) */ - glBindTexture(GL_TEXTURE_2D, This->dummyTextureName[i]); + glBindTexture(GL_TEXTURE_2D, device->dummyTextureName[i]); checkGLcall("glBindTexture"); glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 1, 1, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, &white); @@ -1740,7 +1020,7 @@ static void create_dummy_textures(IWineD3DDeviceImpl *This) } /* Context activation is done by the caller. */ -static void destroy_dummy_textures(IWineD3DDeviceImpl *device, const struct wined3d_gl_info *gl_info) +static void destroy_dummy_textures(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) { ENTER_GL(); glDeleteTextures(gl_info->limits.textures, device->dummyTextureName); @@ -1750,9 +1030,92 @@ static void destroy_dummy_textures(IWineD3DDeviceImpl *device, const struct wine memset(device->dummyTextureName, 0, gl_info->limits.textures * sizeof(*device->dummyTextureName)); } -static HRESULT WINAPI IWineD3DDeviceImpl_AcquireFocusWindow(IWineD3DDevice *iface, HWND window) +static LONG fullscreen_style(LONG style) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; + /* Make sure the window is managed, otherwise we won't get keyboard input. */ + style |= WS_POPUP | WS_SYSMENU; + style &= ~(WS_CAPTION | WS_THICKFRAME); + + return style; +} + +static LONG fullscreen_exstyle(LONG exstyle) +{ + /* Filter out window decorations. */ + exstyle &= ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE); + + return exstyle; +} + +void CDECL wined3d_device_setup_fullscreen_window(struct wined3d_device *device, HWND window, UINT w, UINT h) +{ + BOOL filter_messages; + LONG style, exstyle; + + TRACE("Setting up window %p for fullscreen mode.\n", window); + + if (device->style || device->exStyle) + { + ERR("Changing the window style for window %p, but another style (%08x, %08x) is already stored.\n", + window, device->style, device->exStyle); + } + + device->style = GetWindowLongW(window, GWL_STYLE); + device->exStyle = GetWindowLongW(window, GWL_EXSTYLE); + + style = fullscreen_style(device->style); + exstyle = fullscreen_exstyle(device->exStyle); + + TRACE("Old style was %08x, %08x, setting to %08x, %08x.\n", + device->style, device->exStyle, style, exstyle); + + filter_messages = device->filter_messages; + device->filter_messages = TRUE; + + SetWindowLongW(window, GWL_STYLE, style); + SetWindowLongW(window, GWL_EXSTYLE, exstyle); + SetWindowPos(window, HWND_TOP, 0, 0, w, h, SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE); + + device->filter_messages = filter_messages; +} + +void CDECL wined3d_device_restore_fullscreen_window(struct wined3d_device *device, HWND window) +{ + BOOL filter_messages; + LONG style, exstyle; + + if (!device->style && !device->exStyle) return; + + TRACE("Restoring window style of window %p to %08x, %08x.\n", + window, device->style, device->exStyle); + + style = GetWindowLongW(window, GWL_STYLE); + exstyle = GetWindowLongW(window, GWL_EXSTYLE); + + filter_messages = device->filter_messages; + device->filter_messages = TRUE; + + /* Only restore the style if the application didn't modify it during the + * fullscreen phase. Some applications change it before calling Reset() + * when switching between windowed and fullscreen modes (HL2), some + * depend on the original style (Eve Online). */ + if (style == fullscreen_style(device->style) && exstyle == fullscreen_exstyle(device->exStyle)) + { + SetWindowLongW(window, GWL_STYLE, device->style); + SetWindowLongW(window, GWL_EXSTYLE, device->exStyle); + } + SetWindowPos(window, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); + + device->filter_messages = filter_messages; + + /* Delete the old values. */ + device->style = 0; + device->exStyle = 0; +} + +HRESULT CDECL wined3d_device_acquire_focus_window(struct wined3d_device *device, HWND window) +{ + TRACE("device %p, window %p.\n", device, window); if (!wined3d_register_window(window, device)) { @@ -1761,131 +1124,146 @@ static HRESULT WINAPI IWineD3DDeviceImpl_AcquireFocusWindow(IWineD3DDevice *ifac } device->focus_window = window; - SetForegroundWindow(window); + SetWindowPos(window, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); return WINED3D_OK; } -static void WINAPI IWineD3DDeviceImpl_ReleaseFocusWindow(IWineD3DDevice *iface) +void CDECL wined3d_device_release_focus_window(struct wined3d_device *device) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; + TRACE("device %p.\n", device); if (device->focus_window) wined3d_unregister_window(device->focus_window); device->focus_window = NULL; } -static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, - WINED3DPRESENT_PARAMETERS *pPresentationParameters) +HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, + WINED3DPRESENT_PARAMETERS *present_parameters) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - IWineD3DSwapChainImpl *swapchain = NULL; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + struct wined3d_swapchain *swapchain = NULL; struct wined3d_context *context; HRESULT hr; DWORD state; unsigned int i; - TRACE("(%p)->(%p)\n", This, pPresentationParameters); + TRACE("device %p, present_parameters %p.\n", device, present_parameters); - if(This->d3d_initialized) return WINED3DERR_INVALIDCALL; - if(!This->adapter->opengl) return WINED3DERR_INVALIDCALL; + if (device->d3d_initialized) + return WINED3DERR_INVALIDCALL; + if (!device->adapter->opengl) + return WINED3DERR_INVALIDCALL; - TRACE("(%p) : Creating stateblock\n", This); - hr = IWineD3DDevice_CreateStateBlock(iface, WINED3DSBT_INIT, (IWineD3DStateBlock **)&This->stateBlock); + TRACE("Creating stateblock.\n"); + hr = wined3d_stateblock_create(device, WINED3DSBT_INIT, &device->stateBlock); if (FAILED(hr)) { WARN("Failed to create stateblock\n"); goto err_out; } - TRACE("(%p) : Created stateblock (%p)\n", This, This->stateBlock); - This->updateStateBlock = This->stateBlock; - IWineD3DStateBlock_AddRef((IWineD3DStateBlock*)This->updateStateBlock); - This->render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(*This->render_targets) * gl_info->limits.buffers); + TRACE("Created stateblock %p.\n", device->stateBlock); + device->updateStateBlock = device->stateBlock; + wined3d_stateblock_incref(device->updateStateBlock); - This->NumberOfPalettes = 1; - This->palettes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PALETTEENTRY*)); - if (!This->palettes || !This->render_targets) + device->valid_rt_mask = 0; + for (i = 0; i < gl_info->limits.buffers; ++i) + device->valid_rt_mask |= (1 << i); + device->fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*device->fb.render_targets) * gl_info->limits.buffers); + + device->palette_count = 1; + device->palettes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PALETTEENTRY*)); + if (!device->palettes || !device->fb.render_targets) { ERR("Out of memory!\n"); hr = E_OUTOFMEMORY; goto err_out; } - This->palettes[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256); - if(!This->palettes[0]) { + + device->palettes[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256); + if (!device->palettes[0]) + { ERR("Out of memory!\n"); hr = E_OUTOFMEMORY; goto err_out; } - for (i = 0; i < 256; ++i) { - This->palettes[0][i].peRed = 0xFF; - This->palettes[0][i].peGreen = 0xFF; - This->palettes[0][i].peBlue = 0xFF; - This->palettes[0][i].peFlags = 0xFF; + + for (i = 0; i < 256; ++i) + { + device->palettes[0][i].peRed = 0xff; + device->palettes[0][i].peGreen = 0xff; + device->palettes[0][i].peBlue = 0xff; + device->palettes[0][i].peFlags = 0xff; } - This->currentPalette = 0; + device->currentPalette = 0; /* Initialize the texture unit mapping to a 1:1 mapping */ for (state = 0; state < MAX_COMBINED_SAMPLERS; ++state) { if (state < gl_info->limits.fragment_samplers) { - This->texUnitMap[state] = state; - This->rev_tex_unit_map[state] = state; - } else { - This->texUnitMap[state] = WINED3D_UNMAPPED_STAGE; - This->rev_tex_unit_map[state] = WINED3D_UNMAPPED_STAGE; + device->texUnitMap[state] = state; + device->rev_tex_unit_map[state] = state; + } + else + { + device->texUnitMap[state] = WINED3D_UNMAPPED_STAGE; + device->rev_tex_unit_map[state] = WINED3D_UNMAPPED_STAGE; } } /* Setup the implicit swapchain. This also initializes a context. */ TRACE("Creating implicit swapchain\n"); - hr = IWineD3DDeviceParent_CreateSwapChain(This->device_parent, - pPresentationParameters, (IWineD3DSwapChain **)&swapchain); + hr = device->device_parent->ops->create_swapchain(device->device_parent, + present_parameters, &swapchain); if (FAILED(hr)) { WARN("Failed to create implicit swapchain\n"); goto err_out; } - This->NumberOfSwapChains = 1; - This->swapchains = HeapAlloc(GetProcessHeap(), 0, This->NumberOfSwapChains * sizeof(IWineD3DSwapChain *)); - if(!This->swapchains) { + device->swapchain_count = 1; + device->swapchains = HeapAlloc(GetProcessHeap(), 0, device->swapchain_count * sizeof(*device->swapchains)); + if (!device->swapchains) + { ERR("Out of memory!\n"); goto err_out; } - This->swapchains[0] = (IWineD3DSwapChain *) swapchain; + device->swapchains[0] = swapchain; if (swapchain->back_buffers && swapchain->back_buffers[0]) { TRACE("Setting rendertarget to %p.\n", swapchain->back_buffers); - This->render_targets[0] = swapchain->back_buffers[0]; + device->fb.render_targets[0] = swapchain->back_buffers[0]; } else { TRACE("Setting rendertarget to %p.\n", swapchain->front_buffer); - This->render_targets[0] = swapchain->front_buffer; + device->fb.render_targets[0] = swapchain->front_buffer; } - IWineD3DSurface_AddRef((IWineD3DSurface *)This->render_targets[0]); + wined3d_surface_incref(device->fb.render_targets[0]); /* Depth Stencil support */ - This->depth_stencil = This->auto_depth_stencil; - if (This->depth_stencil) - IWineD3DSurface_AddRef((IWineD3DSurface *)This->depth_stencil); + device->fb.depth_stencil = device->auto_depth_stencil; + if (device->fb.depth_stencil) + wined3d_surface_incref(device->fb.depth_stencil); - hr = This->shader_backend->shader_alloc_private(iface); - if(FAILED(hr)) { + hr = device->shader_backend->shader_alloc_private(device); + if (FAILED(hr)) + { TRACE("Shader private data couldn't be allocated\n"); goto err_out; } - hr = This->frag_pipe->alloc_private(iface); - if(FAILED(hr)) { + hr = device->frag_pipe->alloc_private(device); + if (FAILED(hr)) + { TRACE("Fragment pipeline private data couldn't be allocated\n"); goto err_out; } - hr = This->blitter->alloc_private(iface); - if(FAILED(hr)) { + hr = device->blitter->alloc_private(device); + if (FAILED(hr)) + { TRACE("Blitter private data couldn't be allocated\n"); goto err_out; } @@ -1893,23 +1271,22 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, /* Set up some starting GL setup */ /* Setup all the devices defaults */ - stateblock_init_default_state(This->stateBlock); + stateblock_init_default_state(device->stateBlock); - context = context_acquire(This, swapchain->front_buffer); + context = context_acquire(device, swapchain->front_buffer); - create_dummy_textures(This); + create_dummy_textures(device); ENTER_GL(); /* Initialize the current view state */ - This->view_ident = 1; - This->contexts[0]->last_was_rhw = 0; - glGetIntegerv(GL_MAX_LIGHTS, &This->maxConcurrentLights); - checkGLcall("glGetIntegerv(GL_MAX_LIGHTS, &This->maxConcurrentLights)"); + device->view_ident = 1; + device->contexts[0]->last_was_rhw = 0; - switch(wined3d_settings.offscreen_rendering_mode) { + switch (wined3d_settings.offscreen_rendering_mode) + { case ORM_FBO: - This->offscreenBuffer = GL_COLOR_ATTACHMENT0; + device->offscreenBuffer = GL_COLOR_ATTACHMENT0; break; case ORM_BACKBUFFER: @@ -1917,265 +1294,272 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, if (context_get_current()->aux_buffers > 0) { TRACE("Using auxilliary buffer for offscreen rendering\n"); - This->offscreenBuffer = GL_AUX0; - } else { + device->offscreenBuffer = GL_AUX0; + } + else + { TRACE("Using back buffer for offscreen rendering\n"); - This->offscreenBuffer = GL_BACK; + device->offscreenBuffer = GL_BACK; } } } - TRACE("(%p) All defaults now set up, leaving Init3D with %p\n", This, This); + TRACE("All defaults now set up, leaving 3D init.\n"); LEAVE_GL(); context_release(context); /* Clear the screen */ - IWineD3DDevice_Clear((IWineD3DDevice *) This, 0, NULL, - WINED3DCLEAR_TARGET | pPresentationParameters->EnableAutoDepthStencil ? WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL : 0, - 0x00, 1.0f, 0); + wined3d_device_clear(device, 0, NULL, WINED3DCLEAR_TARGET + | (present_parameters->EnableAutoDepthStencil ? WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL : 0), + 0x00, 1.0f, 0); - This->d3d_initialized = TRUE; + device->d3d_initialized = TRUE; - if(wined3d_settings.logo) { - IWineD3DDeviceImpl_LoadLogo(This, wined3d_settings.logo); - } - This->highest_dirty_ps_const = 0; - This->highest_dirty_vs_const = 0; + if (wined3d_settings.logo) + IWineD3DDeviceImpl_LoadLogo(device, wined3d_settings.logo); + device->highest_dirty_ps_const = 0; + device->highest_dirty_vs_const = 0; return WINED3D_OK; err_out: - HeapFree(GetProcessHeap(), 0, This->render_targets); - HeapFree(GetProcessHeap(), 0, This->swapchains); - This->NumberOfSwapChains = 0; - if(This->palettes) { - HeapFree(GetProcessHeap(), 0, This->palettes[0]); - HeapFree(GetProcessHeap(), 0, This->palettes); + HeapFree(GetProcessHeap(), 0, device->fb.render_targets); + HeapFree(GetProcessHeap(), 0, device->swapchains); + device->swapchain_count = 0; + if (device->palettes) + { + HeapFree(GetProcessHeap(), 0, device->palettes[0]); + HeapFree(GetProcessHeap(), 0, device->palettes); } - This->NumberOfPalettes = 0; - if(swapchain) { - IWineD3DSwapChain_Release( (IWineD3DSwapChain *) swapchain); - } - if(This->stateBlock) { - IWineD3DStateBlock_Release((IWineD3DStateBlock *) This->stateBlock); - This->stateBlock = NULL; - } - if (This->blit_priv) { - This->blitter->free_private(iface); - } - if (This->fragment_priv) { - This->frag_pipe->free_private(iface); - } - if (This->shader_priv) { - This->shader_backend->shader_free_private(iface); + device->palette_count = 0; + if (swapchain) + wined3d_swapchain_decref(swapchain); + if (device->stateBlock) + { + wined3d_stateblock_decref(device->stateBlock); + device->stateBlock = NULL; } + if (device->blit_priv) + device->blitter->free_private(device); + if (device->fragment_priv) + device->frag_pipe->free_private(device); + if (device->shader_priv) + device->shader_backend->shader_free_private(device); + return hr; } -static HRESULT WINAPI IWineD3DDeviceImpl_InitGDI(IWineD3DDevice *iface, - WINED3DPRESENT_PARAMETERS *pPresentationParameters) +HRESULT CDECL wined3d_device_init_gdi(struct wined3d_device *device, + WINED3DPRESENT_PARAMETERS *present_parameters) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - IWineD3DSwapChainImpl *swapchain = NULL; + struct wined3d_swapchain *swapchain = NULL; HRESULT hr; + TRACE("device %p, present_parameters %p.\n", device, present_parameters); + /* Setup the implicit swapchain */ TRACE("Creating implicit swapchain\n"); - hr = IWineD3DDeviceParent_CreateSwapChain(This->device_parent, - pPresentationParameters, (IWineD3DSwapChain **)&swapchain); + hr = device->device_parent->ops->create_swapchain(device->device_parent, + present_parameters, &swapchain); if (FAILED(hr)) { WARN("Failed to create implicit swapchain\n"); goto err_out; } - This->NumberOfSwapChains = 1; - This->swapchains = HeapAlloc(GetProcessHeap(), 0, This->NumberOfSwapChains * sizeof(IWineD3DSwapChain *)); - if(!This->swapchains) { + device->swapchain_count = 1; + device->swapchains = HeapAlloc(GetProcessHeap(), 0, device->swapchain_count * sizeof(*device->swapchains)); + if (!device->swapchains) + { ERR("Out of memory!\n"); goto err_out; } - This->swapchains[0] = (IWineD3DSwapChain *) swapchain; + device->swapchains[0] = swapchain; return WINED3D_OK; err_out: - IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + wined3d_swapchain_decref(swapchain); return hr; } -static HRESULT WINAPI device_unload_resource(IWineD3DResource *resource, void *ctx) +static HRESULT WINAPI device_unload_resource(struct wined3d_resource *resource, void *data) { - IWineD3DResource_UnLoad(resource); - IWineD3DResource_Release(resource); - return WINED3D_OK; + TRACE("Unloading resource %p.\n", resource); + + resource->resource_ops->resource_unload(resource); + + return S_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, - D3DCB_DESTROYSWAPCHAINFN D3DCB_DestroySwapChain) +HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; - int sampler; + struct wined3d_surface *surface; UINT i; - TRACE("(%p)\n", This); - if(!This->d3d_initialized) return WINED3DERR_INVALIDCALL; + TRACE("device %p.\n", device); + if (!device->d3d_initialized) + return WINED3DERR_INVALIDCALL; + + /* Force making the context current again, to verify it is still valid + * (workaround for broken drivers) */ + context_set_current(NULL); /* I don't think that the interface guarantees that the device is destroyed from the same thread * it was created. Thus make sure a context is active for the glDelete* calls */ - context = context_acquire(This, NULL); + context = context_acquire(device, NULL); gl_info = context->gl_info; - if(This->logo_surface) IWineD3DSurface_Release(This->logo_surface); + if (device->logo_surface) + wined3d_surface_decref(device->logo_surface); /* Unload resources */ - IWineD3DDevice_EnumResources(iface, device_unload_resource, NULL); + wined3d_device_enum_resources(device, device_unload_resource, NULL); TRACE("Deleting high order patches\n"); for(i = 0; i < PATCHMAP_SIZE; i++) { struct list *e1, *e2; struct WineD3DRectPatch *patch; - LIST_FOR_EACH_SAFE(e1, e2, &This->patches[i]) { + LIST_FOR_EACH_SAFE(e1, e2, &device->patches[i]) + { patch = LIST_ENTRY(e1, struct WineD3DRectPatch, entry); - IWineD3DDevice_DeletePatch(iface, patch->Handle); + wined3d_device_delete_patch(device, patch->Handle); } } /* Delete the mouse cursor texture */ - if(This->cursorTexture) { + if (device->cursorTexture) + { ENTER_GL(); - glDeleteTextures(1, &This->cursorTexture); + glDeleteTextures(1, &device->cursorTexture); LEAVE_GL(); - This->cursorTexture = 0; - } - - for (sampler = 0; sampler < MAX_FRAGMENT_SAMPLERS; ++sampler) { - IWineD3DDevice_SetTexture(iface, sampler, NULL); - } - for (sampler = 0; sampler < MAX_VERTEX_SAMPLERS; ++sampler) { - IWineD3DDevice_SetTexture(iface, WINED3DVERTEXTEXTURESAMPLER0 + sampler, NULL); + device->cursorTexture = 0; } /* Destroy the depth blt resources, they will be invalid after the reset. Also free shader * private data, it might contain opengl pointers */ - if(This->depth_blt_texture) { + if (device->depth_blt_texture) + { ENTER_GL(); - glDeleteTextures(1, &This->depth_blt_texture); + glDeleteTextures(1, &device->depth_blt_texture); LEAVE_GL(); - This->depth_blt_texture = 0; + device->depth_blt_texture = 0; } - if (This->depth_blt_rb) { + if (device->depth_blt_rb) + { ENTER_GL(); - gl_info->fbo_ops.glDeleteRenderbuffers(1, &This->depth_blt_rb); + gl_info->fbo_ops.glDeleteRenderbuffers(1, &device->depth_blt_rb); LEAVE_GL(); - This->depth_blt_rb = 0; - This->depth_blt_rb_w = 0; - This->depth_blt_rb_h = 0; + device->depth_blt_rb = 0; + device->depth_blt_rb_w = 0; + device->depth_blt_rb_h = 0; } /* Release the update stateblock */ - if(IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->updateStateBlock) > 0){ - if(This->updateStateBlock != This->stateBlock) - FIXME("(%p) Something's still holding the Update stateblock\n",This); + if (wined3d_stateblock_decref(device->updateStateBlock)) + { + if (device->updateStateBlock != device->stateBlock) + FIXME("Something's still holding the update stateblock.\n"); } - This->updateStateBlock = NULL; + device->updateStateBlock = NULL; - { /* because were not doing proper internal refcounts releasing the primary state block - causes recursion with the extra checks in ResourceReleased, to avoid this we have - to set this->stateBlock = NULL; first */ - IWineD3DStateBlock *stateBlock = (IWineD3DStateBlock *)This->stateBlock; - This->stateBlock = NULL; + { + struct wined3d_stateblock *stateblock = device->stateBlock; + device->stateBlock = NULL; /* Release the stateblock */ - if(IWineD3DStateBlock_Release(stateBlock) > 0){ - FIXME("(%p) Something's still holding the Update stateblock\n",This); - } + if (wined3d_stateblock_decref(stateblock)) + FIXME("Something's still holding the stateblock.\n"); } /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */ - This->blitter->free_private(iface); - This->frag_pipe->free_private(iface); - This->shader_backend->shader_free_private(iface); + device->blitter->free_private(device); + device->frag_pipe->free_private(device); + device->shader_backend->shader_free_private(device); /* Release the buffers (with sanity checks)*/ - if (This->onscreen_depth_stencil) + if (device->onscreen_depth_stencil) { - IWineD3DSurface_Release((IWineD3DSurface *)This->onscreen_depth_stencil); - This->onscreen_depth_stencil = NULL; + surface = device->onscreen_depth_stencil; + device->onscreen_depth_stencil = NULL; + wined3d_surface_decref(surface); } - if (This->depth_stencil) + if (device->fb.depth_stencil) { - IWineD3DSurfaceImpl *ds = This->depth_stencil; + surface = device->fb.depth_stencil; - TRACE("Releasing depth/stencil buffer %p.\n", ds); + TRACE("Releasing depth/stencil buffer %p.\n", surface); - This->depth_stencil = NULL; - if (IWineD3DSurface_Release((IWineD3DSurface *)ds) - && ds != This->auto_depth_stencil) - { - ERR("Something is still holding a reference to depth/stencil buffer %p.\n", ds); - } + device->fb.depth_stencil = NULL; + if (wined3d_surface_decref(surface) + && surface != device->auto_depth_stencil) + ERR("Something is still holding a reference to depth/stencil buffer %p.\n", surface); } - TRACE("Releasing the render target at %p\n", This->render_targets[0]); - IWineD3DSurface_Release((IWineD3DSurface *)This->render_targets[0]); - - TRACE("Setting rendertarget to NULL\n"); - This->render_targets[0] = NULL; - - if (This->auto_depth_stencil) + if (device->auto_depth_stencil) { - if (IWineD3DSurface_Release((IWineD3DSurface *)This->auto_depth_stencil)) - { - FIXME("(%p) Something's still holding the auto depth stencil buffer\n", This); - } - This->auto_depth_stencil = NULL; + surface = device->auto_depth_stencil; + device->auto_depth_stencil = NULL; + if (wined3d_surface_decref(surface)) + FIXME("Something's still holding the auto depth stencil buffer (%p).\n", surface); } + for (i = 1; i < gl_info->limits.buffers; ++i) + { + wined3d_device_set_render_target(device, i, NULL, FALSE); + } + + surface = device->fb.render_targets[0]; + TRACE("Setting rendertarget 0 to NULL\n"); + device->fb.render_targets[0] = NULL; + TRACE("Releasing the render target at %p\n", surface); + wined3d_surface_decref(surface); + context_release(context); - for(i=0; i < This->NumberOfSwapChains; i++) { - TRACE("Releasing the implicit swapchain %d\n", i); - if (D3DCB_DestroySwapChain(This->swapchains[i]) > 0) { - FIXME("(%p) Something's still holding the implicit swapchain\n", This); - } + for (i = 0; i < device->swapchain_count; ++i) + { + TRACE("Releasing the implicit swapchain %u.\n", i); + if (wined3d_swapchain_decref(device->swapchains[i])) + FIXME("Something's still holding the implicit swapchain.\n"); } - HeapFree(GetProcessHeap(), 0, This->swapchains); - This->swapchains = NULL; - This->NumberOfSwapChains = 0; + HeapFree(GetProcessHeap(), 0, device->swapchains); + device->swapchains = NULL; + device->swapchain_count = 0; - for (i = 0; i < This->NumberOfPalettes; i++) HeapFree(GetProcessHeap(), 0, This->palettes[i]); - HeapFree(GetProcessHeap(), 0, This->palettes); - This->palettes = NULL; - This->NumberOfPalettes = 0; + for (i = 0; i < device->palette_count; ++i) + HeapFree(GetProcessHeap(), 0, device->palettes[i]); + HeapFree(GetProcessHeap(), 0, device->palettes); + device->palettes = NULL; + device->palette_count = 0; - HeapFree(GetProcessHeap(), 0, This->render_targets); - This->render_targets = NULL; + HeapFree(GetProcessHeap(), 0, device->fb.render_targets); + device->fb.render_targets = NULL; - This->d3d_initialized = FALSE; + device->d3d_initialized = FALSE; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_UninitGDI(IWineD3DDevice *iface, D3DCB_DESTROYSWAPCHAINFN D3DCB_DestroySwapChain) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; +HRESULT CDECL wined3d_device_uninit_gdi(struct wined3d_device *device) +{ unsigned int i; - for(i=0; i < This->NumberOfSwapChains; i++) { - TRACE("Releasing the implicit swapchain %d\n", i); - if (D3DCB_DestroySwapChain(This->swapchains[i]) > 0) { - FIXME("(%p) Something's still holding the implicit swapchain\n", This); - } + for (i = 0; i < device->swapchain_count; ++i) + { + TRACE("Releasing the implicit swapchain %u.\n", i); + if (wined3d_swapchain_decref(device->swapchains[i])) + FIXME("Something's still holding the implicit swapchain.\n"); } - HeapFree(GetProcessHeap(), 0, This->swapchains); - This->swapchains = NULL; - This->NumberOfSwapChains = 0; + HeapFree(GetProcessHeap(), 0, device->swapchains); + device->swapchains = NULL; + device->swapchain_count = 0; return WINED3D_OK; } @@ -2185,22 +1569,24 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UninitGDI(IWineD3DDevice *iface, D3DCB_ * * There is no way to deactivate thread safety once it is enabled. */ -static void WINAPI IWineD3DDeviceImpl_SetMultithreaded(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; +void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device) +{ + TRACE("device %p.\n", device); - /*For now just store the flag(needed in case of ddraw) */ - This->createParms.BehaviorFlags |= WINED3DCREATE_MULTITHREADED; + /* For now just store the flag (needed in case of ddraw). */ + device->createParms.BehaviorFlags |= WINED3DCREATE_MULTITHREADED; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, UINT iSwapChain, - const WINED3DDISPLAYMODE* pMode) { +HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device, + UINT swapchain_idx, const WINED3DDISPLAYMODE *mode) +{ + const struct wined3d_format *format = wined3d_get_format(&device->adapter->gl_info, mode->Format); DEVMODEW devmode; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_format *format = wined3d_get_format(&This->adapter->gl_info, pMode->Format); LONG ret; RECT clip_rc; - TRACE("(%p)->(%d,%p) Mode=%dx%dx@%d, %s\n", This, iSwapChain, pMode, pMode->Width, pMode->Height, pMode->RefreshRate, debug_d3dformat(pMode->Format)); + TRACE("device %p, swapchain_idx %u, mode %p (%ux%u@%u %s).\n", device, swapchain_idx, mode, + mode->Width, mode->Height, mode->RefreshRate, debug_d3dformat(mode->Format)); /* Resize the screen even without a window: * The app could have unset it with SetCooperativeLevel, but not called @@ -2212,16 +1598,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U devmode.dmSize = sizeof(devmode); devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmBitsPerPel = format->byte_count * CHAR_BIT; - devmode.dmPelsWidth = pMode->Width; - devmode.dmPelsHeight = pMode->Height; + devmode.dmPelsWidth = mode->Width; + devmode.dmPelsHeight = mode->Height; - devmode.dmDisplayFrequency = pMode->RefreshRate; - if (pMode->RefreshRate) + devmode.dmDisplayFrequency = mode->RefreshRate; + if (mode->RefreshRate) devmode.dmFields |= DM_DISPLAYFREQUENCY; /* Only change the mode if necessary */ - if (This->ddraw_width == pMode->Width && This->ddraw_height == pMode->Height - && This->ddraw_format == pMode->Format && !pMode->RefreshRate) + if (device->ddraw_width == mode->Width && device->ddraw_height == mode->Height + && device->ddraw_format == mode->Format && !mode->RefreshRate) return WINED3D_OK; ret = ChangeDisplaySettingsExW(NULL, &devmode, NULL, CDS_FULLSCREEN, NULL); @@ -2240,310 +1626,296 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U } /* Store the new values */ - This->ddraw_width = pMode->Width; - This->ddraw_height = pMode->Height; - This->ddraw_format = pMode->Format; + device->ddraw_width = mode->Width; + device->ddraw_height = mode->Height; + device->ddraw_format = mode->Format; /* And finally clip mouse to our screen */ - SetRect(&clip_rc, 0, 0, pMode->Width, pMode->Height); + SetRect(&clip_rc, 0, 0, mode->Width, mode->Height); ClipCursor(&clip_rc); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetDirect3D(IWineD3DDevice *iface, IWineD3D **ppD3D) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - *ppD3D = This->wined3d; - TRACE("Returning %p.\n", *ppD3D); - IWineD3D_AddRef(*ppD3D); - return WINED3D_OK; -} - -static UINT WINAPI IWineD3DDeviceImpl_GetAvailableTextureMem(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - - TRACE("(%p) : simulating %dMB, returning %dMB left\n", This, - (This->adapter->TextureRam/(1024*1024)), - ((This->adapter->TextureRam - This->adapter->UsedTextureRam) / (1024*1024))); - /* return simulated texture memory left */ - return (This->adapter->TextureRam - This->adapter->UsedTextureRam); -} - -/***** - * Get / Set Stream Source - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, UINT StreamNumber, - IWineD3DBuffer *pStreamData, UINT OffsetInBytes, UINT Stride) +HRESULT CDECL wined3d_device_get_wined3d(struct wined3d_device *device, struct wined3d **wined3d) +{ + TRACE("device %p, wined3d %p.\n", device, wined3d); + + *wined3d = device->wined3d; + wined3d_incref(*wined3d); + + TRACE("Returning %p.\n", *wined3d); + + return WINED3D_OK; +} + +UINT CDECL wined3d_device_get_available_texture_mem(struct wined3d_device *device) +{ + TRACE("device %p.\n", device); + + TRACE("Emulating %d MB, returning %d MB left.\n", + device->adapter->TextureRam / (1024 * 1024), + (device->adapter->TextureRam - device->adapter->UsedTextureRam) / (1024 * 1024)); + + return device->adapter->TextureRam - device->adapter->UsedTextureRam; +} + +HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, + struct wined3d_buffer *buffer, UINT offset, UINT stride) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_stream_state *stream; - IWineD3DBuffer *oldSrc; + struct wined3d_buffer *prev_buffer; - TRACE("iface %p, stream_idx %u, buffer %p, offset %u, stride %u.\n", - iface, StreamNumber, pStreamData, OffsetInBytes, Stride); + TRACE("device %p, stream_idx %u, buffer %p, offset %u, stride %u.\n", + device, stream_idx, buffer, offset, stride); - if (StreamNumber >= MAX_STREAMS) { - WARN("Stream out of range %d\n", StreamNumber); + if (stream_idx >= MAX_STREAMS) + { + WARN("Stream index %u out of range.\n", stream_idx); return WINED3DERR_INVALIDCALL; - } else if(OffsetInBytes & 0x3) { - WARN("OffsetInBytes is not 4 byte aligned: %d\n", OffsetInBytes); + } + else if (offset & 0x3) + { + WARN("Offset %u is not 4 byte aligned.\n", offset); return WINED3DERR_INVALIDCALL; } - stream = &This->updateStateBlock->state.streams[StreamNumber]; - oldSrc = (IWineD3DBuffer *)stream->buffer; + stream = &device->updateStateBlock->state.streams[stream_idx]; + prev_buffer = stream->buffer; - This->updateStateBlock->changed.streamSource |= 1 << StreamNumber; + device->updateStateBlock->changed.streamSource |= 1 << stream_idx; - if (oldSrc == pStreamData - && stream->stride == Stride - && stream->offset == OffsetInBytes) + if (prev_buffer == buffer + && stream->stride == stride + && stream->offset == offset) { - TRACE("Application is setting the old values over, nothing to do\n"); + TRACE("Application is setting the old values over, nothing to do.\n"); return WINED3D_OK; } - stream->buffer = (struct wined3d_buffer *)pStreamData; - if (pStreamData) + stream->buffer = buffer; + if (buffer) { - stream->stride = Stride; - stream->offset = OffsetInBytes; + stream->stride = stride; + stream->offset = offset; } - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - if (pStreamData) IWineD3DBuffer_AddRef(pStreamData); - if (oldSrc) IWineD3DBuffer_Release(oldSrc); + /* Handle recording of state blocks. */ + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); + if (buffer) + wined3d_buffer_incref(buffer); + if (prev_buffer) + wined3d_buffer_decref(prev_buffer); return WINED3D_OK; } - if (pStreamData) + if (buffer) { - InterlockedIncrement(&((struct wined3d_buffer *)pStreamData)->bind_count); - IWineD3DBuffer_AddRef(pStreamData); + InterlockedIncrement(&buffer->bind_count); + wined3d_buffer_incref(buffer); } - if (oldSrc) + if (prev_buffer) { - InterlockedDecrement(&((struct wined3d_buffer *)oldSrc)->bind_count); - IWineD3DBuffer_Release(oldSrc); + InterlockedDecrement(&prev_buffer->bind_count); + wined3d_buffer_decref(prev_buffer); } - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface, - UINT StreamNumber, IWineD3DBuffer **pStream, UINT *pOffset, UINT *pStride) +HRESULT CDECL wined3d_device_get_stream_source(struct wined3d_device *device, + UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_stream_state *stream; - TRACE("iface %p, stream_idx %u, buffer %p, offset %p, stride %p.\n", - iface, StreamNumber, pStream, pOffset, pStride); + TRACE("device %p, stream_idx %u, buffer %p, offset %p, stride %p.\n", + device, stream_idx, buffer, offset, stride); - if (StreamNumber >= MAX_STREAMS) + if (stream_idx >= MAX_STREAMS) { - WARN("Stream out of range %d\n", StreamNumber); + WARN("Stream index %u out of range.\n", stream_idx); return WINED3DERR_INVALIDCALL; } - stream = &This->stateBlock->state.streams[StreamNumber]; - *pStream = (IWineD3DBuffer *)stream->buffer; - *pStride = stream->stride; - if (pOffset) *pOffset = stream->offset; - - if (*pStream) IWineD3DBuffer_AddRef(*pStream); + stream = &device->stateBlock->state.streams[stream_idx]; + *buffer = stream->buffer; + if (*buffer) + wined3d_buffer_incref(*buffer); + if (offset) + *offset = stream->offset; + *stride = stream->stride; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSourceFreq(IWineD3DDevice *iface, UINT StreamNumber, UINT Divider) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider) +{ struct wined3d_stream_state *stream; - UINT oldFlags, oldFreq; + UINT old_flags, old_freq; - TRACE("iface %p, stream_idx %u, divider %#x.\n", iface, StreamNumber, Divider); + TRACE("device %p, stream_idx %u, divider %#x.\n", device, stream_idx, divider); - /* Verify input at least in d3d9 this is invalid. */ - if ((Divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && (Divider & WINED3DSTREAMSOURCE_INDEXEDDATA)) + /* Verify input. At least in d3d9 this is invalid. */ + if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && (divider & WINED3DSTREAMSOURCE_INDEXEDDATA)) { - WARN("INSTANCEDATA and INDEXEDDATA were set, returning D3DERR_INVALIDCALL\n"); + WARN("INSTANCEDATA and INDEXEDDATA were set, returning D3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } - if ((Divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && !StreamNumber) + if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && !stream_idx) { - WARN("INSTANCEDATA used on stream 0, returning D3DERR_INVALIDCALL\n"); + WARN("INSTANCEDATA used on stream 0, returning D3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } - if (!Divider) + if (!divider) { - WARN("Divider is 0, returning D3DERR_INVALIDCALL\n"); + WARN("Divider is 0, returning D3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } - stream = &This->updateStateBlock->state.streams[StreamNumber]; - oldFlags = stream->flags; - oldFreq = stream->frequency; + stream = &device->updateStateBlock->state.streams[stream_idx]; + old_flags = stream->flags; + old_freq = stream->frequency; - stream->flags = Divider & (WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA); - stream->frequency = Divider & 0x7FFFFF; + stream->flags = divider & (WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA); + stream->frequency = divider & 0x7fffff; - This->updateStateBlock->changed.streamFreq |= 1 << StreamNumber; + device->updateStateBlock->changed.streamFreq |= 1 << stream_idx; - if (stream->frequency != oldFreq || stream->flags != oldFlags) - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC); + if (stream->frequency != old_freq || stream->flags != old_flags) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSourceFreq(IWineD3DDevice *iface, UINT StreamNumber, UINT* Divider) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_get_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT *divider) +{ struct wined3d_stream_state *stream; - TRACE("iface %p, stream_idx %u, divider %p.\n", iface, StreamNumber, Divider); + TRACE("device %p, stream_idx %u, divider %p.\n", device, stream_idx, divider); - stream = &This->updateStateBlock->state.streams[StreamNumber]; - *Divider = stream->flags | stream->frequency; + stream = &device->updateStateBlock->state.streams[stream_idx]; + *divider = stream->flags | stream->frequency; - TRACE("Returning %#x.\n", *Divider); + TRACE("Returning %#x.\n", *divider); return WINED3D_OK; } -/***** - * Get / Set & Multiply Transform - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetTransform(IWineD3DDevice *iface, WINED3DTRANSFORMSTATETYPE d3dts, CONST WINED3DMATRIX* lpmatrix) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_set_transform(struct wined3d_device *device, + WINED3DTRANSFORMSTATETYPE d3dts, const WINED3DMATRIX *matrix) +{ + TRACE("device %p, state %s, matrix %p.\n", + device, debug_d3dtstype(d3dts), matrix); - /* Most of this routine, comments included copied from ddraw tree initially: */ - TRACE("(%p) : Transform State=%s\n", This, debug_d3dtstype(d3dts)); - - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - This->updateStateBlock->changed.transform[d3dts >> 5] |= 1 << (d3dts & 0x1f); - This->updateStateBlock->state.transforms[d3dts] = *lpmatrix; + /* Handle recording of state blocks. */ + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); + device->updateStateBlock->changed.transform[d3dts >> 5] |= 1 << (d3dts & 0x1f); + device->updateStateBlock->state.transforms[d3dts] = *matrix; return WINED3D_OK; } - /* - * If the new matrix is the same as the current one, + /* If the new matrix is the same as the current one, * we cut off any further processing. this seems to be a reasonable * optimization because as was noticed, some apps (warcraft3 for example) * tend towards setting the same matrix repeatedly for some reason. * - * From here on we assume that the new matrix is different, wherever it matters. - */ - if (!memcmp(&This->stateBlock->state.transforms[d3dts].u.m[0][0], lpmatrix, sizeof(*lpmatrix))) + * From here on we assume that the new matrix is different, wherever it matters. */ + if (!memcmp(&device->stateBlock->state.transforms[d3dts].u.m[0][0], matrix, sizeof(*matrix))) { - TRACE("The app is setting the same matrix over again\n"); + TRACE("The application is setting the same matrix over again.\n"); return WINED3D_OK; } - else - { - conv_mat(lpmatrix, &This->stateBlock->state.transforms[d3dts].u.m[0][0]); - } - /* - ScreenCoord = ProjectionMat * ViewMat * WorldMat * ObjectCoord - where ViewMat = Camera space, WorldMat = world space. + conv_mat(matrix, &device->stateBlock->state.transforms[d3dts].u.m[0][0]); - In OpenGL, camera and world space is combined into GL_MODELVIEW - matrix. The Projection matrix stay projection matrix. - */ + /* ScreenCoord = ProjectionMat * ViewMat * WorldMat * ObjectCoord + * where ViewMat = Camera space, WorldMat = world space. + * + * In OpenGL, camera and world space is combined into GL_MODELVIEW + * matrix. The Projection matrix stay projection matrix. */ - /* Capture the times we can just ignore the change for now */ - if (d3dts == WINED3DTS_VIEW) { /* handle the VIEW matrix */ - This->view_ident = !memcmp(lpmatrix, identity, 16 * sizeof(float)); - /* Handled by the state manager */ - } + if (d3dts == WINED3DTS_VIEW) + device->view_ident = !memcmp(matrix, identity, 16 * sizeof(float)); - if (d3dts < WINED3DTS_WORLDMATRIX(This->adapter->gl_info.limits.blends)) - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TRANSFORM(d3dts)); + if (d3dts < WINED3DTS_WORLDMATRIX(device->adapter->gl_info.limits.blends)) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TRANSFORM(d3dts)); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetTransform(IWineD3DDevice *iface, +HRESULT CDECL wined3d_device_get_transform(struct wined3d_device *device, WINED3DTRANSFORMSTATETYPE state, WINED3DMATRIX *matrix) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; - - TRACE("iface %p, state %s, matrix %p.\n", iface, debug_d3dtstype(state), matrix); + TRACE("device %p, state %s, matrix %p.\n", device, debug_d3dtstype(state), matrix); *matrix = device->stateBlock->state.transforms[state]; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_MultiplyTransform(IWineD3DDevice *iface, WINED3DTRANSFORMSTATETYPE State, CONST WINED3DMATRIX* pMatrix) { +HRESULT CDECL wined3d_device_multiply_transform(struct wined3d_device *device, + WINED3DTRANSFORMSTATETYPE state, const WINED3DMATRIX *matrix) +{ const WINED3DMATRIX *mat = NULL; WINED3DMATRIX temp; + TRACE("device %p, state %s, matrix %p.\n", device, debug_d3dtstype(state), matrix); + /* Note: Using 'updateStateBlock' rather than 'stateblock' in the code * below means it will be recorded in a state block change, but it * works regardless where it is recorded. - * If this is found to be wrong, change to StateBlock. - */ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p) : For state %s\n", This, debug_d3dtstype(State)); + * If this is found to be wrong, change to StateBlock. */ - if (State <= HIGHEST_TRANSFORMSTATE) - { - mat = &This->updateStateBlock->state.transforms[State]; - } + if (state <= HIGHEST_TRANSFORMSTATE) + mat = &device->updateStateBlock->state.transforms[state]; else - { - FIXME("Unhandled transform state!!\n"); - } + FIXME("Unhandled transform state %#x.\n", state); - multiply_matrix(&temp, mat, pMatrix); + multiply_matrix(&temp, mat, matrix); - /* Apply change via set transform - will reapply to eg. lights this way */ - return IWineD3DDeviceImpl_SetTransform(iface, State, &temp); + /* Apply change via set transform - will reapply to eg. lights this way. */ + return wined3d_device_set_transform(device, state, &temp); } -/***** - * Get / Set Light - *****/ -/* Note lights are real special cases. Although the device caps state only eg. 8 are supported, - you can reference any indexes you want as long as that number max are enabled at any - one point in time! Therefore since the indexes can be anything, we need a hashmap of them. - However, this causes stateblock problems. When capturing the state block, I duplicate the hashmap, - but when recording, just build a chain pretty much of commands to be replayed. */ - -static HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD Index, CONST WINED3DLIGHT* pLight) { - float rho; +/* Note lights are real special cases. Although the device caps state only + * e.g. 8 are supported, you can reference any indexes you want as long as + * that number max are enabled at any one point in time. Therefore since the + * indices can be anything, we need a hashmap of them. However, this causes + * stateblock problems. When capturing the state block, I duplicate the + * hashmap, but when recording, just build a chain pretty much of commands to + * be replayed. */ +HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, UINT light_idx, const WINED3DLIGHT *light) +{ + UINT hash_idx = LIGHTMAP_HASHFUNC(light_idx); struct wined3d_light_info *object = NULL; - UINT Hi = LIGHTMAP_HASHFUNC(Index); struct list *e; + float rho; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p) : Idx(%d), pLight(%p). Hash index is %d\n", This, Index, pLight, Hi); + TRACE("device %p, light_idx %u, light %p.\n", device, light_idx, light); - /* Check the parameter range. Need for speed most wanted sets junk lights which confuse - * the gl driver. - */ - if(!pLight) { - WARN("Light pointer = NULL, returning WINED3DERR_INVALIDCALL\n"); + /* Check the parameter range. Need for speed most wanted sets junk lights + * which confuse the GL driver. */ + if (!light) return WINED3DERR_INVALIDCALL; - } - switch(pLight->Type) { + switch (light->Type) + { case WINED3DLIGHT_POINT: case WINED3DLIGHT_SPOT: case WINED3DLIGHT_PARALLELPOINT: case WINED3DLIGHT_GLSPOT: - /* Incorrect attenuation values can cause the gl driver to crash. Happens with Need for speed - * most wanted - */ - if (pLight->Attenuation0 < 0.0f || pLight->Attenuation1 < 0.0f || pLight->Attenuation2 < 0.0f) + /* Incorrect attenuation values can cause the gl driver to crash. + * Happens with Need for speed most wanted. */ + if (light->Attenuation0 < 0.0f || light->Attenuation1 < 0.0f || light->Attenuation2 < 0.0f) { - WARN("Attenuation is negative, returning WINED3DERR_INVALIDCALL\n"); + WARN("Attenuation is negative, returning WINED3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } break; @@ -2557,882 +1929,902 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD I return WINED3DERR_INVALIDCALL; } - LIST_FOR_EACH(e, &This->updateStateBlock->state.light_map[Hi]) + LIST_FOR_EACH(e, &device->updateStateBlock->state.light_map[hash_idx]) { object = LIST_ENTRY(e, struct wined3d_light_info, entry); - if(object->OriginalIndex == Index) break; + if (object->OriginalIndex == light_idx) + break; object = NULL; } - if(!object) { + if (!object) + { TRACE("Adding new light\n"); object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if(!object) { + if (!object) + { ERR("Out of memory error when allocating a light\n"); return E_OUTOFMEMORY; } - list_add_head(&This->updateStateBlock->state.light_map[Hi], &object->entry); + list_add_head(&device->updateStateBlock->state.light_map[hash_idx], &object->entry); object->glIndex = -1; - object->OriginalIndex = Index; + object->OriginalIndex = light_idx; } - /* Initialize the object */ - TRACE("Light %d setting to type %d, Diffuse(%f,%f,%f,%f), Specular(%f,%f,%f,%f), Ambient(%f,%f,%f,%f)\n", Index, pLight->Type, - pLight->Diffuse.r, pLight->Diffuse.g, pLight->Diffuse.b, pLight->Diffuse.a, - pLight->Specular.r, pLight->Specular.g, pLight->Specular.b, pLight->Specular.a, - pLight->Ambient.r, pLight->Ambient.g, pLight->Ambient.b, pLight->Ambient.a); - TRACE("... Pos(%f,%f,%f), Dirn(%f,%f,%f)\n", pLight->Position.x, pLight->Position.y, pLight->Position.z, - pLight->Direction.x, pLight->Direction.y, pLight->Direction.z); - TRACE("... Range(%f), Falloff(%f), Theta(%f), Phi(%f)\n", pLight->Range, pLight->Falloff, pLight->Theta, pLight->Phi); + /* Initialize the object. */ + TRACE("Light %d setting to type %d, Diffuse(%f,%f,%f,%f), Specular(%f,%f,%f,%f), Ambient(%f,%f,%f,%f)\n", + light_idx, light->Type, + light->Diffuse.r, light->Diffuse.g, light->Diffuse.b, light->Diffuse.a, + light->Specular.r, light->Specular.g, light->Specular.b, light->Specular.a, + light->Ambient.r, light->Ambient.g, light->Ambient.b, light->Ambient.a); + TRACE("... Pos(%f,%f,%f), Dir(%f,%f,%f)\n", light->Position.x, light->Position.y, light->Position.z, + light->Direction.x, light->Direction.y, light->Direction.z); + TRACE("... Range(%f), Falloff(%f), Theta(%f), Phi(%f)\n", + light->Range, light->Falloff, light->Theta, light->Phi); - /* Save away the information */ - object->OriginalParms = *pLight; + /* Save away the information. */ + object->OriginalParms = *light; - switch (pLight->Type) { - case WINED3DLIGHT_POINT: - /* Position */ - object->lightPosn[0] = pLight->Position.x; - object->lightPosn[1] = pLight->Position.y; - object->lightPosn[2] = pLight->Position.z; - object->lightPosn[3] = 1.0f; - object->cutoff = 180.0f; - /* FIXME: Range */ - break; + switch (light->Type) + { + case WINED3DLIGHT_POINT: + /* Position */ + object->lightPosn[0] = light->Position.x; + object->lightPosn[1] = light->Position.y; + object->lightPosn[2] = light->Position.z; + object->lightPosn[3] = 1.0f; + object->cutoff = 180.0f; + /* FIXME: Range */ + break; - case WINED3DLIGHT_DIRECTIONAL: - /* Direction */ - object->lightPosn[0] = -pLight->Direction.x; - object->lightPosn[1] = -pLight->Direction.y; - object->lightPosn[2] = -pLight->Direction.z; - object->lightPosn[3] = 0.0f; - object->exponent = 0.0f; - object->cutoff = 180.0f; - break; - - case WINED3DLIGHT_SPOT: - /* Position */ - object->lightPosn[0] = pLight->Position.x; - object->lightPosn[1] = pLight->Position.y; - object->lightPosn[2] = pLight->Position.z; - object->lightPosn[3] = 1.0f; - - /* Direction */ - object->lightDirn[0] = pLight->Direction.x; - object->lightDirn[1] = pLight->Direction.y; - object->lightDirn[2] = pLight->Direction.z; - object->lightDirn[3] = 1.0f; - - /* - * opengl-ish and d3d-ish spot lights use too different models for the - * light "intensity" as a function of the angle towards the main light direction, - * so we only can approximate very roughly. - * however spot lights are rather rarely used in games (if ever used at all). - * furthermore if still used, probably nobody pays attention to such details. - */ - if (!pLight->Falloff) - { - /* Falloff = 0 is easy, because d3d's and opengl's spot light equations have the - * falloff resp. exponent parameter as an exponent, so the spot light lighting - * will always be 1.0 for both of them, and we don't have to care for the - * rest of the rather complex calculation - */ + case WINED3DLIGHT_DIRECTIONAL: + /* Direction */ + object->lightPosn[0] = -light->Direction.x; + object->lightPosn[1] = -light->Direction.y; + object->lightPosn[2] = -light->Direction.z; + object->lightPosn[3] = 0.0f; object->exponent = 0.0f; - } else { - rho = pLight->Theta + (pLight->Phi - pLight->Theta)/(2*pLight->Falloff); - if (rho < 0.0001f) rho = 0.0001f; - object->exponent = -0.3f/logf(cosf(rho/2)); - } - if (object->exponent > 128.0f) - { - object->exponent = 128.0f; - } - object->cutoff = (float) (pLight->Phi*90/M_PI); + object->cutoff = 180.0f; + break; - /* FIXME: Range */ - break; + case WINED3DLIGHT_SPOT: + /* Position */ + object->lightPosn[0] = light->Position.x; + object->lightPosn[1] = light->Position.y; + object->lightPosn[2] = light->Position.z; + object->lightPosn[3] = 1.0f; - default: - FIXME("Unrecognized light type %d\n", pLight->Type); + /* Direction */ + object->lightDirn[0] = light->Direction.x; + object->lightDirn[1] = light->Direction.y; + object->lightDirn[2] = light->Direction.z; + object->lightDirn[3] = 1.0f; + + /* opengl-ish and d3d-ish spot lights use too different models + * for the light "intensity" as a function of the angle towards + * the main light direction, so we only can approximate very + * roughly. However, spot lights are rather rarely used in games + * (if ever used at all). Furthermore if still used, probably + * nobody pays attention to such details. */ + if (!light->Falloff) + { + /* Falloff = 0 is easy, because d3d's and opengl's spot light + * equations have the falloff resp. exponent parameter as an + * exponent, so the spot light lighting will always be 1.0 for + * both of them, and we don't have to care for the rest of the + * rather complex calculation. */ + object->exponent = 0.0f; + } + else + { + rho = light->Theta + (light->Phi - light->Theta) / (2 * light->Falloff); + if (rho < 0.0001f) + rho = 0.0001f; + object->exponent = -0.3f / logf(cosf(rho / 2)); + } + + if (object->exponent > 128.0f) + object->exponent = 128.0f; + + object->cutoff = (float)(light->Phi * 90 / M_PI); + /* FIXME: Range */ + break; + + default: + FIXME("Unrecognized light type %#x.\n", light->Type); } - /* Update the live definitions if the light is currently assigned a glIndex */ - if (object->glIndex != -1 && !This->isRecordingState) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(object->glIndex)); - } + /* Update the live definitions if the light is currently assigned a glIndex. */ + if (object->glIndex != -1 && !device->isRecordingState) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_ACTIVELIGHT(object->glIndex)); + return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetLight(IWineD3DDevice *iface, DWORD Index, WINED3DLIGHT *pLight) +HRESULT CDECL wined3d_device_get_light(struct wined3d_device *device, UINT light_idx, WINED3DLIGHT *light) { - struct wined3d_light_info *lightInfo = NULL; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - DWORD Hi = LIGHTMAP_HASHFUNC(Index); + UINT hash_idx = LIGHTMAP_HASHFUNC(light_idx); + struct wined3d_light_info *light_info = NULL; struct list *e; - TRACE("(%p) : Idx(%d), pLight(%p)\n", This, Index, pLight); - LIST_FOR_EACH(e, &This->stateBlock->state.light_map[Hi]) + TRACE("device %p, light_idx %u, light %p.\n", device, light_idx, light); + + LIST_FOR_EACH(e, &device->stateBlock->state.light_map[hash_idx]) { - lightInfo = LIST_ENTRY(e, struct wined3d_light_info, entry); - if(lightInfo->OriginalIndex == Index) break; - lightInfo = NULL; + light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); + if (light_info->OriginalIndex == light_idx) + break; + light_info = NULL; } - if (!lightInfo) + if (!light_info) { TRACE("Light information requested but light not defined\n"); return WINED3DERR_INVALIDCALL; } - *pLight = lightInfo->OriginalParms; + *light = light_info->OriginalParms; return WINED3D_OK; } -/***** - * Get / Set Light Enable - * (Note for consistency, renamed d3dx function by adding the 'set' prefix) - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD Index, BOOL Enable) +HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable) { - struct wined3d_light_info *lightInfo = NULL; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - UINT Hi = LIGHTMAP_HASHFUNC(Index); + UINT hash_idx = LIGHTMAP_HASHFUNC(light_idx); + struct wined3d_light_info *light_info = NULL; struct list *e; - TRACE("(%p) : Idx(%d), enable? %d\n", This, Index, Enable); - LIST_FOR_EACH(e, &This->updateStateBlock->state.light_map[Hi]) + TRACE("device %p, light_idx %u, enable %#x.\n", device, light_idx, enable); + + LIST_FOR_EACH(e, &device->updateStateBlock->state.light_map[hash_idx]) { - lightInfo = LIST_ENTRY(e, struct wined3d_light_info, entry); - if(lightInfo->OriginalIndex == Index) break; - lightInfo = NULL; + light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); + if (light_info->OriginalIndex == light_idx) + break; + light_info = NULL; } - TRACE("Found light: %p\n", lightInfo); + TRACE("Found light %p.\n", light_info); - /* Special case - enabling an undefined light creates one with a strict set of parms! */ - if (!lightInfo) + /* Special case - enabling an undefined light creates one with a strict set of parameters. */ + if (!light_info) { TRACE("Light enabled requested but light not defined, so defining one!\n"); - IWineD3DDeviceImpl_SetLight(iface, Index, &WINED3D_default_light); + wined3d_device_set_light(device, light_idx, &WINED3D_default_light); - /* Search for it again! Should be fairly quick as near head of list */ - LIST_FOR_EACH(e, &This->updateStateBlock->state.light_map[Hi]) + /* Search for it again! Should be fairly quick as near head of list. */ + LIST_FOR_EACH(e, &device->updateStateBlock->state.light_map[hash_idx]) { - lightInfo = LIST_ENTRY(e, struct wined3d_light_info, entry); - if(lightInfo->OriginalIndex == Index) break; - lightInfo = NULL; + light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); + if (light_info->OriginalIndex == light_idx) + break; + light_info = NULL; } - if (!lightInfo) + if (!light_info) { FIXME("Adding default lights has failed dismally\n"); return WINED3DERR_INVALIDCALL; } } - if(!Enable) { - if(lightInfo->glIndex != -1) { - if(!This->isRecordingState) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(lightInfo->glIndex)); - } + if (!enable) + { + if (light_info->glIndex != -1) + { + if (!device->isRecordingState) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_ACTIVELIGHT(light_info->glIndex)); - This->updateStateBlock->state.lights[lightInfo->glIndex] = NULL; - lightInfo->glIndex = -1; - } else { + device->updateStateBlock->state.lights[light_info->glIndex] = NULL; + light_info->glIndex = -1; + } + else + { TRACE("Light already disabled, nothing to do\n"); } - lightInfo->enabled = FALSE; - } else { - lightInfo->enabled = TRUE; - if (lightInfo->glIndex != -1) { - /* nop */ + light_info->enabled = FALSE; + } + else + { + light_info->enabled = TRUE; + if (light_info->glIndex != -1) + { TRACE("Nothing to do as light was enabled\n"); - } else { - int i; - /* Find a free gl light */ - for (i = 0; i < This->maxConcurrentLights; ++i) + } + else + { + unsigned int i; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + /* Find a free GL light. */ + for (i = 0; i < gl_info->limits.lights; ++i) { - if (!This->updateStateBlock->state.lights[i]) + if (!device->updateStateBlock->state.lights[i]) { - This->updateStateBlock->state.lights[i] = lightInfo; - lightInfo->glIndex = i; + device->updateStateBlock->state.lights[i] = light_info; + light_info->glIndex = i; break; } } - if(lightInfo->glIndex == -1) { + if (light_info->glIndex == -1) + { /* Our tests show that Windows returns D3D_OK in this situation, even with * D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE devices. This * is consistent among ddraw, d3d8 and d3d9. GetLightEnable returns TRUE * as well for those lights. * - * TODO: Test how this affects rendering - */ + * TODO: Test how this affects rendering. */ WARN("Too many concurrently active lights\n"); return WINED3D_OK; } - /* i == lightInfo->glIndex */ - if(!This->isRecordingState) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(i)); - } + /* i == light_info->glIndex */ + if (!device->isRecordingState) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_ACTIVELIGHT(i)); } } return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetLightEnable(IWineD3DDevice *iface, DWORD Index,BOOL* pEnable) +HRESULT CDECL wined3d_device_get_light_enable(struct wined3d_device *device, UINT light_idx, BOOL *enable) { - struct wined3d_light_info *lightInfo = NULL; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + UINT hash_idx = LIGHTMAP_HASHFUNC(light_idx); + struct wined3d_light_info *light_info = NULL; struct list *e; - UINT Hi = LIGHTMAP_HASHFUNC(Index); - TRACE("(%p) : for idx(%d)\n", This, Index); - LIST_FOR_EACH(e, &This->stateBlock->state.light_map[Hi]) + TRACE("device %p, light_idx %u, enable %p.\n", device, light_idx, enable); + + LIST_FOR_EACH(e, &device->stateBlock->state.light_map[hash_idx]) { - lightInfo = LIST_ENTRY(e, struct wined3d_light_info, entry); - if(lightInfo->OriginalIndex == Index) break; - lightInfo = NULL; + light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); + if (light_info->OriginalIndex == light_idx) + break; + light_info = NULL; } - if (!lightInfo) + if (!light_info) { - TRACE("Light enabled state requested but light not defined\n"); + TRACE("Light enabled state requested but light not defined.\n"); return WINED3DERR_INVALIDCALL; } /* true is 128 according to SetLightEnable */ - *pEnable = lightInfo->enabled ? 128 : 0; + *enable = light_info->enabled ? 128 : 0; return WINED3D_OK; } -/***** - * Get / Set Clip Planes - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWORD Index, CONST float *pPlane) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p) : for idx %d, %p\n", This, Index, pPlane); - - /* Validate Index */ - if (Index >= This->adapter->gl_info.limits.clipplanes) - { - TRACE("Application has requested clipplane this device doesn't support\n"); - return WINED3DERR_INVALIDCALL; - } - - This->updateStateBlock->changed.clipplane |= 1 << Index; - - if (This->updateStateBlock->state.clip_planes[Index][0] == pPlane[0] - && This->updateStateBlock->state.clip_planes[Index][1] == pPlane[1] - && This->updateStateBlock->state.clip_planes[Index][2] == pPlane[2] - && This->updateStateBlock->state.clip_planes[Index][3] == pPlane[3]) - { - TRACE("Application is setting old values over, nothing to do\n"); - return WINED3D_OK; - } - - This->updateStateBlock->state.clip_planes[Index][0] = pPlane[0]; - This->updateStateBlock->state.clip_planes[Index][1] = pPlane[1]; - This->updateStateBlock->state.clip_planes[Index][2] = pPlane[2]; - This->updateStateBlock->state.clip_planes[Index][3] = pPlane[3]; - - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - return WINED3D_OK; - } - - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_CLIPPLANE(Index)); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetClipPlane(IWineD3DDevice *iface, DWORD Index, float *pPlane) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p) : for idx %d\n", This, Index); - - /* Validate Index */ - if (Index >= This->adapter->gl_info.limits.clipplanes) - { - TRACE("Application has requested clipplane this device doesn't support\n"); - return WINED3DERR_INVALIDCALL; - } - - pPlane[0] = (float)This->stateBlock->state.clip_planes[Index][0]; - pPlane[1] = (float)This->stateBlock->state.clip_planes[Index][1]; - pPlane[2] = (float)This->stateBlock->state.clip_planes[Index][2]; - pPlane[3] = (float)This->stateBlock->state.clip_planes[Index][3]; - return WINED3D_OK; -} - -/***** - * Get / Set Clip Plane Status - * WARNING: This code relies on the fact that D3DCLIPSTATUS8 == D3DCLIPSTATUS9 - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetClipStatus(IWineD3DDevice *iface, CONST WINED3DCLIPSTATUS* pClipStatus) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - FIXME("(%p) : stub\n", This); - - if (!pClipStatus) - return WINED3DERR_INVALIDCALL; - - This->updateStateBlock->state.clip_status.ClipUnion = pClipStatus->ClipUnion; - This->updateStateBlock->state.clip_status.ClipIntersection = pClipStatus->ClipIntersection; - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface, WINED3DCLIPSTATUS* pClipStatus) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - FIXME("(%p) : stub\n", This); - - if (!pClipStatus) - return WINED3DERR_INVALIDCALL; - - pClipStatus->ClipUnion = This->updateStateBlock->state.clip_status.ClipUnion; - pClipStatus->ClipIntersection = This->updateStateBlock->state.clip_status.ClipIntersection; - return WINED3D_OK; -} - -/***** - * Get / Set Material - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetMaterial(IWineD3DDevice *iface, CONST WINED3DMATERIAL* pMaterial) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - - This->updateStateBlock->changed.material = TRUE; - This->updateStateBlock->state.material = *pMaterial; - - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - return WINED3D_OK; - } - - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_MATERIAL); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetMaterial(IWineD3DDevice *iface, WINED3DMATERIAL* pMaterial) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - *pMaterial = This->updateStateBlock->state.material; - TRACE("(%p) : Diffuse (%f,%f,%f,%f)\n", This, pMaterial->Diffuse.r, pMaterial->Diffuse.g, - pMaterial->Diffuse.b, pMaterial->Diffuse.a); - TRACE("(%p) : Ambient (%f,%f,%f,%f)\n", This, pMaterial->Ambient.r, pMaterial->Ambient.g, - pMaterial->Ambient.b, pMaterial->Ambient.a); - TRACE("(%p) : Specular (%f,%f,%f,%f)\n", This, pMaterial->Specular.r, pMaterial->Specular.g, - pMaterial->Specular.b, pMaterial->Specular.a); - TRACE("(%p) : Emissive (%f,%f,%f,%f)\n", This, pMaterial->Emissive.r, pMaterial->Emissive.g, - pMaterial->Emissive.b, pMaterial->Emissive.a); - TRACE("(%p) : Power (%f)\n", This, pMaterial->Power); - - return WINED3D_OK; -} - -/***** - * Get / Set Indices - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetIndexBuffer(IWineD3DDevice *iface, - IWineD3DBuffer *pIndexData, enum wined3d_format_id fmt) +HRESULT CDECL wined3d_device_set_clip_plane(struct wined3d_device *device, UINT plane_idx, const float *plane) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DBuffer *oldIdxs; + TRACE("device %p, plane_idx %u, plane %p.\n", device, plane_idx, plane); - TRACE("(%p) : Setting to %p\n", This, pIndexData); - oldIdxs = (IWineD3DBuffer *)This->updateStateBlock->state.index_buffer; + /* Validate plane_idx. */ + if (plane_idx >= device->adapter->gl_info.limits.clipplanes) + { + TRACE("Application has requested clipplane this device doesn't support.\n"); + return WINED3DERR_INVALIDCALL; + } - This->updateStateBlock->changed.indices = TRUE; - This->updateStateBlock->state.index_buffer = (struct wined3d_buffer *)pIndexData; - This->updateStateBlock->state.index_format = fmt; + device->updateStateBlock->changed.clipplane |= 1 << plane_idx; - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - if(pIndexData) IWineD3DBuffer_AddRef(pIndexData); - if(oldIdxs) IWineD3DBuffer_Release(oldIdxs); + if (device->updateStateBlock->state.clip_planes[plane_idx][0] == plane[0] + && device->updateStateBlock->state.clip_planes[plane_idx][1] == plane[1] + && device->updateStateBlock->state.clip_planes[plane_idx][2] == plane[2] + && device->updateStateBlock->state.clip_planes[plane_idx][3] == plane[3]) + { + TRACE("Application is setting old values over, nothing to do.\n"); return WINED3D_OK; } - if(oldIdxs != pIndexData) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER); - if(pIndexData) { - InterlockedIncrement(&((struct wined3d_buffer *)pIndexData)->bind_count); - IWineD3DBuffer_AddRef(pIndexData); + device->updateStateBlock->state.clip_planes[plane_idx][0] = plane[0]; + device->updateStateBlock->state.clip_planes[plane_idx][1] = plane[1]; + device->updateStateBlock->state.clip_planes[plane_idx][2] = plane[2]; + device->updateStateBlock->state.clip_planes[plane_idx][3] = plane[3]; + + /* Handle recording of state blocks. */ + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); + return WINED3D_OK; + } + + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_CLIPPLANE(plane_idx)); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_clip_plane(struct wined3d_device *device, UINT plane_idx, float *plane) +{ + TRACE("device %p, plane_idx %u, plane %p.\n", device, plane_idx, plane); + + /* Validate plane_idx. */ + if (plane_idx >= device->adapter->gl_info.limits.clipplanes) + { + TRACE("Application has requested clipplane this device doesn't support.\n"); + return WINED3DERR_INVALIDCALL; + } + + plane[0] = (float)device->stateBlock->state.clip_planes[plane_idx][0]; + plane[1] = (float)device->stateBlock->state.clip_planes[plane_idx][1]; + plane[2] = (float)device->stateBlock->state.clip_planes[plane_idx][2]; + plane[3] = (float)device->stateBlock->state.clip_planes[plane_idx][3]; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_clip_status(struct wined3d_device *device, const WINED3DCLIPSTATUS *clip_status) +{ + FIXME("device %p, clip_status %p stub!\n", device, clip_status); + + if (!clip_status) + return WINED3DERR_INVALIDCALL; + + device->updateStateBlock->state.clip_status.ClipUnion = clip_status->ClipUnion; + device->updateStateBlock->state.clip_status.ClipIntersection = clip_status->ClipIntersection; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_clip_status(struct wined3d_device *device, WINED3DCLIPSTATUS *clip_status) +{ + FIXME("device %p, clip_status %p stub!\n", device, clip_status); + + if (!clip_status) + return WINED3DERR_INVALIDCALL; + + clip_status->ClipUnion = device->updateStateBlock->state.clip_status.ClipUnion; + clip_status->ClipIntersection = device->updateStateBlock->state.clip_status.ClipIntersection; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_material(struct wined3d_device *device, const WINED3DMATERIAL *material) +{ + TRACE("device %p, material %p.\n", device, material); + + device->updateStateBlock->changed.material = TRUE; + device->updateStateBlock->state.material = *material; + + /* Handle recording of state blocks */ + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); + return WINED3D_OK; + } + + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_MATERIAL); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_material(struct wined3d_device *device, WINED3DMATERIAL *material) +{ + TRACE("device %p, material %p.\n", device, material); + + *material = device->updateStateBlock->state.material; + + TRACE("Diffuse {%.8e, %.8e, %.8e, %.8e}\n", + material->Diffuse.r, material->Diffuse.g, + material->Diffuse.b, material->Diffuse.a); + TRACE("Ambient {%.8e, %.8e, %.8e, %.8e}\n", + material->Ambient.r, material->Ambient.g, + material->Ambient.b, material->Ambient.a); + TRACE("Specular {%.8e, %.8e, %.8e, %.8e}\n", + material->Specular.r, material->Specular.g, + material->Specular.b, material->Specular.a); + TRACE("Emissive {%.8e, %.8e, %.8e, %.8e}\n", + material->Emissive.r, material->Emissive.g, + material->Emissive.b, material->Emissive.a); + TRACE("Power %.8e.\n", material->Power); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, + struct wined3d_buffer *buffer, enum wined3d_format_id format_id) +{ + struct wined3d_buffer *prev_buffer; + + TRACE("device %p, buffer %p, format %s.\n", + device, buffer, debug_d3dformat(format_id)); + + prev_buffer = device->updateStateBlock->state.index_buffer; + + device->updateStateBlock->changed.indices = TRUE; + device->updateStateBlock->state.index_buffer = buffer; + device->updateStateBlock->state.index_format = format_id; + + /* Handle recording of state blocks. */ + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); + if (buffer) + wined3d_buffer_incref(buffer); + if (prev_buffer) + wined3d_buffer_decref(prev_buffer); + return WINED3D_OK; + } + + if (prev_buffer != buffer) + { + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); + if (buffer) + { + InterlockedIncrement(&buffer->bind_count); + wined3d_buffer_incref(buffer); } - if(oldIdxs) { - InterlockedDecrement(&((struct wined3d_buffer *)oldIdxs)->bind_count); - IWineD3DBuffer_Release(oldIdxs); + if (prev_buffer) + { + InterlockedDecrement(&prev_buffer->bind_count); + wined3d_buffer_decref(prev_buffer); } } return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetIndexBuffer(IWineD3DDevice *iface, IWineD3DBuffer **ppIndexData) +HRESULT CDECL wined3d_device_get_index_buffer(struct wined3d_device *device, struct wined3d_buffer **buffer) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + TRACE("device %p, buffer %p.\n", device, buffer); - *ppIndexData = (IWineD3DBuffer *)This->stateBlock->state.index_buffer; + *buffer = device->stateBlock->state.index_buffer; - /* up ref count on ppindexdata */ - if (*ppIndexData) { - IWineD3DBuffer_AddRef(*ppIndexData); - TRACE("(%p) index data set to %p\n", This, ppIndexData); - }else{ - TRACE("(%p) No index data set\n", This); - } - TRACE("Returning %p\n", *ppIndexData); + if (*buffer) + wined3d_buffer_incref(*buffer); + + TRACE("Returning %p.\n", *buffer); return WINED3D_OK; } /* Method to offer d3d9 a simple way to set the base vertex index without messing with the index buffer */ -static HRESULT WINAPI IWineD3DDeviceImpl_SetBaseVertexIndex(IWineD3DDevice *iface, INT BaseIndex) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p)->(%d)\n", This, BaseIndex); +HRESULT CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, INT base_index) +{ + TRACE("device %p, base_index %d.\n", device, base_index); - if (This->updateStateBlock->state.base_vertex_index == BaseIndex) + if (device->updateStateBlock->state.base_vertex_index == base_index) { TRACE("Application is setting the old value over, nothing to do\n"); return WINED3D_OK; } - This->updateStateBlock->state.base_vertex_index = BaseIndex; + device->updateStateBlock->state.base_vertex_index = base_index; - if (This->isRecordingState) { + if (device->isRecordingState) + { TRACE("Recording... not performing anything\n"); return WINED3D_OK; } + /* The base vertex index affects the stream sources */ - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetBaseVertexIndex(IWineD3DDevice *iface, INT* base_index) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p) : base_index %p\n", This, base_index); - - *base_index = This->stateBlock->state.base_vertex_index; - - TRACE("Returning %u\n", *base_index); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); return WINED3D_OK; } -/***** - * Get / Set Viewports - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetViewport(IWineD3DDevice *iface, CONST WINED3DVIEWPORT* pViewport) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +INT CDECL wined3d_device_get_base_vertex_index(struct wined3d_device *device) +{ + TRACE("device %p.\n", device); - TRACE("(%p)\n", This); - This->updateStateBlock->changed.viewport = TRUE; - This->updateStateBlock->state.viewport = *pViewport; + return device->stateBlock->state.base_vertex_index; +} + +HRESULT CDECL wined3d_device_set_viewport(struct wined3d_device *device, const WINED3DVIEWPORT *viewport) +{ + TRACE("device %p, viewport %p.\n", device, viewport); + TRACE("x %u, y %u, w %u, h %u, minz %.8e, maxz %.8e.\n", + viewport->X, viewport->Y, viewport->Width, viewport->Height, viewport->MinZ, viewport->MaxZ); + + device->updateStateBlock->changed.viewport = TRUE; + device->updateStateBlock->state.viewport = *viewport; /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - return WINED3D_OK; - } - - TRACE("(%p) : x=%d, y=%d, wid=%d, hei=%d, minz=%f, maxz=%f\n", This, - pViewport->X, pViewport->Y, pViewport->Width, pViewport->Height, pViewport->MinZ, pViewport->MaxZ); - - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VIEWPORT); - return WINED3D_OK; - -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetViewport(IWineD3DDevice *iface, WINED3DVIEWPORT* pViewport) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p)\n", This); - *pViewport = This->stateBlock->state.viewport; - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, - WINED3DRENDERSTATETYPE State, DWORD Value) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - DWORD oldValue = This->stateBlock->state.render_states[State]; - - TRACE("iface %p, state %s (%#x), value %#x.\n", iface, debug_d3drenderstate(State), State, Value); - - This->updateStateBlock->changed.renderState[State >> 5] |= 1 << (State & 0x1f); - This->updateStateBlock->state.render_states[State] = Value; - - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - return WINED3D_OK; - } - - /* Compared here and not before the assignment to allow proper stateblock recording */ - if(Value == oldValue) { - TRACE("Application is setting the old value over, nothing to do\n"); - } else { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(State)); - } - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderState(IWineD3DDevice *iface, - WINED3DRENDERSTATETYPE State, DWORD *pValue) -{ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - - TRACE("iface %p, state %s (%#x), value %p.\n", iface, debug_d3drenderstate(State), State, pValue); - - *pValue = This->stateBlock->state.render_states[State]; - return WINED3D_OK; -} - -/***** - * Get / Set Sampler States - * TODO: Verify against dx9 definitions - *****/ - -static HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface, DWORD Sampler, WINED3DSAMPLERSTATETYPE Type, DWORD Value) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - DWORD oldValue; - - TRACE("(%p) : Sampler %#x, Type %s (%#x), Value %#x\n", - This, Sampler, debug_d3dsamplerstate(Type), Type, Value); - - if (Sampler >= WINED3DVERTEXTEXTURESAMPLER0 && Sampler <= WINED3DVERTEXTEXTURESAMPLER3) { - Sampler -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - } - - if (Sampler >= sizeof(This->stateBlock->state.sampler_states) / sizeof(*This->stateBlock->state.sampler_states)) + if (device->isRecordingState) { - ERR("Current Sampler overflows sampleState0 array (sampler %d)\n", Sampler); + TRACE("Recording... not performing anything\n"); + return WINED3D_OK; + } + + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VIEWPORT); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_viewport(struct wined3d_device *device, WINED3DVIEWPORT *viewport) +{ + TRACE("device %p, viewport %p.\n", device, viewport); + + *viewport = device->stateBlock->state.viewport; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device, + WINED3DRENDERSTATETYPE state, DWORD value) +{ + DWORD old_value = device->stateBlock->state.render_states[state]; + + TRACE("device %p, state %s (%#x), value %#x.\n", device, debug_d3drenderstate(state), state, value); + + device->updateStateBlock->changed.renderState[state >> 5] |= 1 << (state & 0x1f); + device->updateStateBlock->state.render_states[state] = value; + + /* Handle recording of state blocks. */ + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); + return WINED3D_OK; + } + + /* Compared here and not before the assignment to allow proper stateblock recording. */ + if (value == old_value) + TRACE("Application is setting the old value over, nothing to do.\n"); + else + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(state)); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_render_state(struct wined3d_device *device, + WINED3DRENDERSTATETYPE state, DWORD *value) +{ + TRACE("device %p, state %s (%#x), value %p.\n", device, debug_d3drenderstate(state), state, value); + + *value = device->stateBlock->state.render_states[state]; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_sampler_state(struct wined3d_device *device, + UINT sampler_idx, WINED3DSAMPLERSTATETYPE state, DWORD value) +{ + DWORD old_value; + + TRACE("device %p, sampler_idx %u, state %s, value %#x.\n", + device, sampler_idx, debug_d3dsamplerstate(state), value); + + if (sampler_idx >= WINED3DVERTEXTEXTURESAMPLER0 && sampler_idx <= WINED3DVERTEXTEXTURESAMPLER3) + sampler_idx -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); + + if (sampler_idx >= sizeof(device->stateBlock->state.sampler_states) + / sizeof(*device->stateBlock->state.sampler_states)) + { + WARN("Invalid sampler %u.\n", sampler_idx); return WINED3D_OK; /* Windows accepts overflowing this array ... we do not. */ } - oldValue = This->stateBlock->state.sampler_states[Sampler][Type]; - This->updateStateBlock->state.sampler_states[Sampler][Type] = Value; - This->updateStateBlock->changed.samplerState[Sampler] |= 1 << Type; + old_value = device->stateBlock->state.sampler_states[sampler_idx][state]; + device->updateStateBlock->state.sampler_states[sampler_idx][state] = value; + device->updateStateBlock->changed.samplerState[sampler_idx] |= 1 << state; - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); + /* Handle recording of state blocks. */ + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); return WINED3D_OK; } - if(oldValue == Value) { - TRACE("Application is setting the old value over, nothing to do\n"); + if (old_value == value) + { + TRACE("Application is setting the old value over, nothing to do.\n"); return WINED3D_OK; } - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(Sampler)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(sampler_idx)); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetSamplerState(IWineD3DDevice *iface, DWORD Sampler, WINED3DSAMPLERSTATETYPE Type, DWORD* Value) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_get_sampler_state(struct wined3d_device *device, + UINT sampler_idx, WINED3DSAMPLERSTATETYPE state, DWORD *value) +{ + TRACE("device %p, sampler_idx %u, state %s, value %p.\n", + device, sampler_idx, debug_d3dsamplerstate(state), value); - TRACE("(%p) : Sampler %#x, Type %s (%#x)\n", - This, Sampler, debug_d3dsamplerstate(Type), Type); + if (sampler_idx >= WINED3DVERTEXTEXTURESAMPLER0 && sampler_idx <= WINED3DVERTEXTEXTURESAMPLER3) + sampler_idx -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - if (Sampler >= WINED3DVERTEXTEXTURESAMPLER0 && Sampler <= WINED3DVERTEXTEXTURESAMPLER3) { - Sampler -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - } - - if (Sampler >= sizeof(This->stateBlock->state.sampler_states) / sizeof(*This->stateBlock->state.sampler_states)) + if (sampler_idx >= sizeof(device->stateBlock->state.sampler_states) + / sizeof(*device->stateBlock->state.sampler_states)) { - ERR("Current Sampler overflows sampleState0 array (sampler %d)\n", Sampler); + WARN("Invalid sampler %u.\n", sampler_idx); return WINED3D_OK; /* Windows accepts overflowing this array ... we do not. */ } - *Value = This->stateBlock->state.sampler_states[Sampler][Type]; - TRACE("(%p) : Returning %#x\n", This, *Value); + + *value = device->stateBlock->state.sampler_states[sampler_idx][state]; + TRACE("Returning %#x.\n", *value); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, CONST RECT* pRect) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect) +{ + TRACE("device %p, rect %s.\n", device, wine_dbgstr_rect(rect)); - This->updateStateBlock->changed.scissorRect = TRUE; - if (EqualRect(&This->updateStateBlock->state.scissor_rect, pRect)) + device->updateStateBlock->changed.scissorRect = TRUE; + if (EqualRect(&device->updateStateBlock->state.scissor_rect, rect)) { TRACE("App is setting the old scissor rectangle over, nothing to do.\n"); return WINED3D_OK; } - CopyRect(&This->updateStateBlock->state.scissor_rect, pRect); + CopyRect(&device->updateStateBlock->state.scissor_rect, rect); - if(This->isRecordingState) { - TRACE("Recording... not performing anything\n"); + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); return WINED3D_OK; } - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SCISSORRECT); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SCISSORRECT); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetScissorRect(IWineD3DDevice *iface, RECT* pRect) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - - *pRect = This->updateStateBlock->state.scissor_rect; - TRACE("(%p)Returning a Scissor Rect of %d:%d-%d:%d\n", This, pRect->left, pRect->top, pRect->right, pRect->bottom); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* iface, IWineD3DVertexDeclaration* pDecl) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - IWineD3DVertexDeclaration *oldDecl = (IWineD3DVertexDeclaration *)This->updateStateBlock->state.vertex_declaration; - - TRACE("(%p) : pDecl=%p\n", This, pDecl); - - if (pDecl) IWineD3DVertexDeclaration_AddRef(pDecl); - if (oldDecl) IWineD3DVertexDeclaration_Release(oldDecl); - - This->updateStateBlock->state.vertex_declaration = (IWineD3DVertexDeclarationImpl *)pDecl; - This->updateStateBlock->changed.vertexDecl = TRUE; - - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - return WINED3D_OK; - } else if(pDecl == oldDecl) { - /* Checked after the assignment to allow proper stateblock recording */ - TRACE("Application is setting the old declaration over, nothing to do\n"); - return WINED3D_OK; - } - - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetVertexDeclaration(IWineD3DDevice* iface, IWineD3DVertexDeclaration** ppDecl) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - - TRACE("(%p) : ppDecl=%p\n", This, ppDecl); - - *ppDecl = (IWineD3DVertexDeclaration *)This->stateBlock->state.vertex_declaration; - if (*ppDecl) IWineD3DVertexDeclaration_AddRef(*ppDecl); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface, IWineD3DVertexShader *pShader) +HRESULT CDECL wined3d_device_get_scissor_rect(struct wined3d_device *device, RECT *rect) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DVertexShader *oldShader = (IWineD3DVertexShader *)This->updateStateBlock->state.vertex_shader; + TRACE("device %p, rect %p.\n", device, rect); - This->updateStateBlock->state.vertex_shader = (IWineD3DVertexShaderImpl *)pShader; - This->updateStateBlock->changed.vertexShader = TRUE; - - if (This->isRecordingState) { - if(pShader) IWineD3DVertexShader_AddRef(pShader); - if(oldShader) IWineD3DVertexShader_Release(oldShader); - TRACE("Recording... not performing anything\n"); - return WINED3D_OK; - } else if(oldShader == pShader) { - /* Checked here to allow proper stateblock recording */ - TRACE("App is setting the old shader over, nothing to do\n"); - return WINED3D_OK; - } - - TRACE("(%p) : setting pShader(%p)\n", This, pShader); - if(pShader) IWineD3DVertexShader_AddRef(pShader); - if(oldShader) IWineD3DVertexShader_Release(oldShader); - - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VSHADER); + *rect = device->updateStateBlock->state.scissor_rect; + TRACE("Returning rect %s.\n", wine_dbgstr_rect(rect)); return WINED3D_OK; } -static IWineD3DVertexShader * WINAPI IWineD3DDeviceImpl_GetVertexShader(IWineD3DDevice *iface) +HRESULT CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device, + struct wined3d_vertex_declaration *declaration) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; - IWineD3DVertexShader *shader; + struct wined3d_vertex_declaration *prev = device->updateStateBlock->state.vertex_declaration; - TRACE("iface %p.\n", iface); + TRACE("device %p, declaration %p.\n", device, declaration); - shader = (IWineD3DVertexShader *)device->stateBlock->state.vertex_shader; - if (shader) IWineD3DVertexShader_AddRef(shader); + if (declaration) + wined3d_vertex_declaration_incref(declaration); + if (prev) + wined3d_vertex_declaration_decref(prev); + + device->updateStateBlock->state.vertex_declaration = declaration; + device->updateStateBlock->changed.vertexDecl = TRUE; + + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); + return WINED3D_OK; + } + else if (declaration == prev) + { + /* Checked after the assignment to allow proper stateblock recording. */ + TRACE("Application is setting the old declaration over, nothing to do.\n"); + return WINED3D_OK; + } + + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VDECL); + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_vertex_declaration(struct wined3d_device *device, + struct wined3d_vertex_declaration **declaration) +{ + TRACE("device %p, declaration %p.\n", device, declaration); + + *declaration = device->stateBlock->state.vertex_declaration; + if (*declaration) + wined3d_vertex_declaration_incref(*declaration); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader) +{ + struct wined3d_shader *prev = device->updateStateBlock->state.vertex_shader; + + TRACE("device %p, shader %p.\n", device, shader); + + device->updateStateBlock->state.vertex_shader = shader; + device->updateStateBlock->changed.vertexShader = TRUE; + + if (device->isRecordingState) + { + if (shader) + wined3d_shader_incref(shader); + if (prev) + wined3d_shader_decref(prev); + TRACE("Recording... not performing anything.\n"); + return WINED3D_OK; + } + + if (shader == prev) + { + TRACE("Application is setting the old shader over, nothing to do.\n"); + return WINED3D_OK; + } + + if (shader) + wined3d_shader_incref(shader); + if (prev) + wined3d_shader_decref(prev); + + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VSHADER); + + return WINED3D_OK; +} + +struct wined3d_shader * CDECL wined3d_device_get_vertex_shader(struct wined3d_device *device) +{ + struct wined3d_shader *shader; + + TRACE("device %p.\n", device); + + shader = device->stateBlock->state.vertex_shader; + if (shader) + wined3d_shader_incref(shader); TRACE("Returning %p.\n", shader); return shader; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantB( - IWineD3DDevice *iface, - UINT start, - CONST BOOL *srcData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - unsigned int i, cnt = min(count, MAX_CONST_B - start); - - TRACE("(iface %p, srcData %p, start %d, count %d)\n", - iface, srcData, start, count); - - if (!srcData || start >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - - memcpy(&This->updateStateBlock->state.vs_consts_b[start], srcData, cnt * sizeof(BOOL)); - for (i = 0; i < cnt; i++) - TRACE("Set BOOL constant %u to %s\n", start + i, srcData[i]? "true":"false"); - - for (i = start; i < cnt + start; ++i) { - This->updateStateBlock->changed.vertexShaderConstantsB |= (1 << i); - } - - if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstantB( - IWineD3DDevice *iface, - UINT start, - BOOL *dstData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_CONST_B - start); - - TRACE("(iface %p, dstData %p, start %d, count %d)\n", - iface, dstData, start, count); - - if (!dstData || cnt < 0) - return WINED3DERR_INVALIDCALL; - - memcpy(dstData, &This->stateBlock->state.vs_consts_b[start], cnt * sizeof(BOOL)); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantI( - IWineD3DDevice *iface, - UINT start, - CONST int *srcData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - unsigned int i, cnt = min(count, MAX_CONST_I - start); - - TRACE("(iface %p, srcData %p, start %d, count %d)\n", - iface, srcData, start, count); - - if (!srcData || start >= MAX_CONST_I) return WINED3DERR_INVALIDCALL; - - memcpy(&This->updateStateBlock->state.vs_consts_i[start * 4], srcData, cnt * sizeof(int) * 4); - for (i = 0; i < cnt; i++) - TRACE("Set INT constant %u to { %d, %d, %d, %d }\n", start + i, - srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]); - - for (i = start; i < cnt + start; ++i) { - This->updateStateBlock->changed.vertexShaderConstantsI |= (1 << i); - } - - if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstantI( - IWineD3DDevice *iface, - UINT start, - int *dstData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_CONST_I - start); - - TRACE("(iface %p, dstData %p, start %d, count %d)\n", - iface, dstData, start, count); - - if (!dstData || ((signed int)MAX_CONST_I - (signed int)start) <= 0) - return WINED3DERR_INVALIDCALL; - - memcpy(dstData, &This->stateBlock->state.vs_consts_i[start * 4], cnt * sizeof(int) * 4); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantF( - IWineD3DDevice *iface, - UINT start, - CONST float *srcData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device, + UINT start_register, const BOOL *constants, UINT bool_count) +{ + UINT count = min(bool_count, MAX_CONST_B - start_register); UINT i; - TRACE("(iface %p, srcData %p, start %d, count %d)\n", - iface, srcData, start, count); + TRACE("device %p, start_register %u, constants %p, bool_count %u.\n", + device, start_register, constants, bool_count); - /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */ - if (!srcData || start + count > This->d3d_vshader_constantF || start > This->d3d_vshader_constantF) + if (!constants || start_register >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - memcpy(&This->updateStateBlock->state.vs_consts_f[start * 4], srcData, count * sizeof(float) * 4); - if(TRACE_ON(d3d)) { - for (i = 0; i < count; i++) - TRACE("Set FLOAT constant %u to { %f, %f, %f, %f }\n", start + i, - srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]); - } + memcpy(&device->updateStateBlock->state.vs_consts_b[start_register], constants, count * sizeof(BOOL)); + for (i = 0; i < count; ++i) + TRACE("Set BOOL constant %u to %s.\n", start_register + i, constants[i] ? "true" : "false"); - if (!This->isRecordingState) - { - This->shader_backend->shader_update_float_vertex_constants(iface, start, count); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VERTEXSHADERCONSTANT); - } + for (i = start_register; i < count + start_register; ++i) + device->updateStateBlock->changed.vertexShaderConstantsB |= (1 << i); - memset(This->updateStateBlock->changed.vertexShaderConstantsF + start, 1, - sizeof(*This->updateStateBlock->changed.vertexShaderConstantsF) * count); + if (!device->isRecordingState) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VERTEXSHADERCONSTANT); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstantF( - IWineD3DDevice *iface, - UINT start, - float *dstData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, This->d3d_vshader_constantF - start); - - TRACE("(iface %p, dstData %p, start %d, count %d)\n", - iface, dstData, start, count); - - if (!dstData || cnt < 0) - return WINED3DERR_INVALIDCALL; - - memcpy(dstData, &This->stateBlock->state.vs_consts_f[start * 4], cnt * sizeof(float) * 4); - return WINED3D_OK; -} - -static inline void markTextureStagesDirty(IWineD3DDeviceImpl *This, DWORD stage) { - DWORD i; - for(i = 0; i <= WINED3D_HIGHEST_TEXTURE_STATE; ++i) - { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(stage, i)); - } -} - -static void device_map_stage(IWineD3DDeviceImpl *This, DWORD stage, DWORD unit) +HRESULT CDECL wined3d_device_get_vs_consts_b(struct wined3d_device *device, + UINT start_register, BOOL *constants, UINT bool_count) { - DWORD i = This->rev_tex_unit_map[unit]; - DWORD j = This->texUnitMap[stage]; + UINT count = min(bool_count, MAX_CONST_B - start_register); - This->texUnitMap[stage] = unit; - if (i != WINED3D_UNMAPPED_STAGE && i != stage) + TRACE("device %p, start_register %u, constants %p, bool_count %u.\n", + device, start_register, constants, bool_count); + + if (!constants || start_register >= MAX_CONST_B) + return WINED3DERR_INVALIDCALL; + + memcpy(constants, &device->stateBlock->state.vs_consts_b[start_register], count * sizeof(BOOL)); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device, + UINT start_register, const int *constants, UINT vector4i_count) +{ + UINT count = min(vector4i_count, MAX_CONST_I - start_register); + UINT i; + + TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n", + device, start_register, constants, vector4i_count); + + if (!constants || start_register >= MAX_CONST_I) + return WINED3DERR_INVALIDCALL; + + memcpy(&device->updateStateBlock->state.vs_consts_i[start_register * 4], constants, count * sizeof(int) * 4); + for (i = 0; i < count; ++i) + TRACE("Set INT constant %u to {%d, %d, %d, %d}.\n", start_register + i, + constants[i * 4], constants[i * 4 + 1], + constants[i * 4 + 2], constants[i * 4 + 3]); + + for (i = start_register; i < count + start_register; ++i) + device->updateStateBlock->changed.vertexShaderConstantsI |= (1 << i); + + if (!device->isRecordingState) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VERTEXSHADERCONSTANT); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_vs_consts_i(struct wined3d_device *device, + UINT start_register, int *constants, UINT vector4i_count) +{ + UINT count = min(vector4i_count, MAX_CONST_I - start_register); + + TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n", + device, start_register, constants, vector4i_count); + + if (!constants || start_register >= MAX_CONST_I) + return WINED3DERR_INVALIDCALL; + + memcpy(constants, &device->stateBlock->state.vs_consts_i[start_register * 4], count * sizeof(int) * 4); + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, + UINT start_register, const float *constants, UINT vector4f_count) +{ + UINT i; + + TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", + device, start_register, constants, vector4f_count); + + /* Specifically test start_register > limit to catch MAX_UINT overflows + * when adding start_register + vector4f_count. */ + if (!constants + || start_register + vector4f_count > device->d3d_vshader_constantF + || start_register > device->d3d_vshader_constantF) + return WINED3DERR_INVALIDCALL; + + memcpy(&device->updateStateBlock->state.vs_consts_f[start_register * 4], + constants, vector4f_count * sizeof(float) * 4); + if (TRACE_ON(d3d)) { - This->texUnitMap[i] = WINED3D_UNMAPPED_STAGE; + for (i = 0; i < vector4f_count; ++i) + TRACE("Set FLOAT constant %u to {%.8e, %.8e, %.8e, %.8e}.\n", start_register + i, + constants[i * 4], constants[i * 4 + 1], + constants[i * 4 + 2], constants[i * 4 + 3]); } - This->rev_tex_unit_map[unit] = stage; - if (j != WINED3D_UNMAPPED_STAGE && j != unit) + if (!device->isRecordingState) { - This->rev_tex_unit_map[j] = WINED3D_UNMAPPED_STAGE; + device->shader_backend->shader_update_float_vertex_constants(device, start_register, vector4f_count); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VERTEXSHADERCONSTANT); + } + + memset(device->updateStateBlock->changed.vertexShaderConstantsF + start_register, 1, + sizeof(*device->updateStateBlock->changed.vertexShaderConstantsF) * vector4f_count); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_vs_consts_f(struct wined3d_device *device, + UINT start_register, float *constants, UINT vector4f_count) +{ + int count = min(vector4f_count, device->d3d_vshader_constantF - start_register); + + TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", + device, start_register, constants, vector4f_count); + + if (!constants || count < 0) + return WINED3DERR_INVALIDCALL; + + memcpy(constants, &device->stateBlock->state.vs_consts_f[start_register * 4], count * sizeof(float) * 4); + + return WINED3D_OK; +} + +static inline void markTextureStagesDirty(struct wined3d_device *device, DWORD stage) +{ + DWORD i; + + for (i = 0; i <= WINED3D_HIGHEST_TEXTURE_STATE; ++i) + { + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(stage, i)); } } -static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) { - int i; +static void device_map_stage(struct wined3d_device *device, DWORD stage, DWORD unit) +{ + DWORD i = device->rev_tex_unit_map[unit]; + DWORD j = device->texUnitMap[stage]; - This->fixed_function_usage_map = 0; + device->texUnitMap[stage] = unit; + if (i != WINED3D_UNMAPPED_STAGE && i != stage) + device->texUnitMap[i] = WINED3D_UNMAPPED_STAGE; + + device->rev_tex_unit_map[unit] = stage; + if (j != WINED3D_UNMAPPED_STAGE && j != unit) + device->rev_tex_unit_map[j] = WINED3D_UNMAPPED_STAGE; +} + +static void device_update_fixed_function_usage_map(struct wined3d_device *device) +{ + UINT i; + + device->fixed_function_usage_map = 0; for (i = 0; i < MAX_TEXTURES; ++i) { - const struct wined3d_state *state = &This->stateBlock->state; + const struct wined3d_state *state = &device->stateBlock->state; WINED3DTEXTUREOP color_op = state->texture_states[i][WINED3DTSS_COLOROP]; WINED3DTEXTUREOP alpha_op = state->texture_states[i][WINED3DTSS_ALPHAOP]; DWORD color_arg1 = state->texture_states[i][WINED3DTSS_COLORARG1] & WINED3DTA_SELECTMASK; @@ -3449,38 +2841,39 @@ static void device_update_fixed_function_usage_map(IWineD3DDeviceImpl *This) { if (((color_arg1 == WINED3DTA_TEXTURE) && color_op != WINED3DTOP_SELECTARG2) || ((color_arg2 == WINED3DTA_TEXTURE) && color_op != WINED3DTOP_SELECTARG1) - || ((color_arg3 == WINED3DTA_TEXTURE) && (color_op == WINED3DTOP_MULTIPLYADD || color_op == WINED3DTOP_LERP)) + || ((color_arg3 == WINED3DTA_TEXTURE) + && (color_op == WINED3DTOP_MULTIPLYADD || color_op == WINED3DTOP_LERP)) || ((alpha_arg1 == WINED3DTA_TEXTURE) && alpha_op != WINED3DTOP_SELECTARG2) || ((alpha_arg2 == WINED3DTA_TEXTURE) && alpha_op != WINED3DTOP_SELECTARG1) - || ((alpha_arg3 == WINED3DTA_TEXTURE) && (alpha_op == WINED3DTOP_MULTIPLYADD || alpha_op == WINED3DTOP_LERP))) { - This->fixed_function_usage_map |= (1 << i); - } + || ((alpha_arg3 == WINED3DTA_TEXTURE) + && (alpha_op == WINED3DTOP_MULTIPLYADD || alpha_op == WINED3DTOP_LERP))) + device->fixed_function_usage_map |= (1 << i); - if ((color_op == WINED3DTOP_BUMPENVMAP || color_op == WINED3DTOP_BUMPENVMAPLUMINANCE) && i < MAX_TEXTURES - 1) { - This->fixed_function_usage_map |= (1 << (i + 1)); - } + if ((color_op == WINED3DTOP_BUMPENVMAP || color_op == WINED3DTOP_BUMPENVMAPLUMINANCE) && i < MAX_TEXTURES - 1) + device->fixed_function_usage_map |= (1 << (i + 1)); } } -static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This, const struct wined3d_gl_info *gl_info) +static void device_map_fixed_function_samplers(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) { unsigned int i, tex; WORD ffu_map; - device_update_fixed_function_usage_map(This); - ffu_map = This->fixed_function_usage_map; + device_update_fixed_function_usage_map(device); + ffu_map = device->fixed_function_usage_map; - if (This->max_ffp_textures == gl_info->limits.texture_stages - || This->stateBlock->state.lowest_disabled_stage <= This->max_ffp_textures) + if (device->max_ffp_textures == gl_info->limits.texture_stages + || device->stateBlock->state.lowest_disabled_stage <= device->max_ffp_textures) { for (i = 0; ffu_map; ffu_map >>= 1, ++i) { if (!(ffu_map & 1)) continue; - if (This->texUnitMap[i] != i) { - device_map_stage(This, i, i); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i)); - markTextureStagesDirty(This, i); + if (device->texUnitMap[i] != i) + { + device_map_stage(device, i, i); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(i)); + markTextureStagesDirty(device, i); } } return; @@ -3492,39 +2885,42 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This, const s { if (!(ffu_map & 1)) continue; - if (This->texUnitMap[i] != tex) { - device_map_stage(This, i, tex); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i)); - markTextureStagesDirty(This, i); + if (device->texUnitMap[i] != tex) + { + device_map_stage(device, i, tex); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(i)); + markTextureStagesDirty(device, i); } ++tex; } } -static void device_map_psamplers(IWineD3DDeviceImpl *This, const struct wined3d_gl_info *gl_info) +static void device_map_psamplers(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) { const WINED3DSAMPLER_TEXTURE_TYPE *sampler_type = - This->stateBlock->state.pixel_shader->baseShader.reg_maps.sampler_type; + device->stateBlock->state.pixel_shader->reg_maps.sampler_type; unsigned int i; - for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) { - if (sampler_type[i] && This->texUnitMap[i] != i) + for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) + { + if (sampler_type[i] && device->texUnitMap[i] != i) { - device_map_stage(This, i, i); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(i)); + device_map_stage(device, i, i); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(i)); if (i < gl_info->limits.texture_stages) { - markTextureStagesDirty(This, i); + markTextureStagesDirty(device, i); } } } } -static BOOL device_unit_free_for_vs(IWineD3DDeviceImpl *This, const WINED3DSAMPLER_TEXTURE_TYPE *pshader_sampler_tokens, +static BOOL device_unit_free_for_vs(struct wined3d_device *device, + const WINED3DSAMPLER_TEXTURE_TYPE *pshader_sampler_tokens, const WINED3DSAMPLER_TEXTURE_TYPE *vshader_sampler_tokens, DWORD unit) { - DWORD current_mapping = This->rev_tex_unit_map[unit]; + DWORD current_mapping = device->rev_tex_unit_map[unit]; /* Not currently used */ if (current_mapping == WINED3D_UNMAPPED_STAGE) return TRUE; @@ -3534,7 +2930,7 @@ static BOOL device_unit_free_for_vs(IWineD3DDeviceImpl *This, const WINED3DSAMPL if (!pshader_sampler_tokens) { /* No pixel shader, check fixed function */ - return current_mapping >= MAX_TEXTURES || !(This->fixed_function_usage_map & (1 << current_mapping)); + return current_mapping >= MAX_TEXTURES || !(device->fixed_function_usage_map & (1 << current_mapping)); } /* Pixel shader, check the shader's sampler map */ @@ -3545,38 +2941,37 @@ static BOOL device_unit_free_for_vs(IWineD3DDeviceImpl *This, const WINED3DSAMPL return !vshader_sampler_tokens[current_mapping - MAX_FRAGMENT_SAMPLERS]; } -static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps, const struct wined3d_gl_info *gl_info) +static void device_map_vsamplers(struct wined3d_device *device, BOOL ps, const struct wined3d_gl_info *gl_info) { const WINED3DSAMPLER_TEXTURE_TYPE *vshader_sampler_type = - This->stateBlock->state.vertex_shader->baseShader.reg_maps.sampler_type; + device->stateBlock->state.vertex_shader->reg_maps.sampler_type; const WINED3DSAMPLER_TEXTURE_TYPE *pshader_sampler_type = NULL; int start = min(MAX_COMBINED_SAMPLERS, gl_info->limits.combined_samplers) - 1; int i; if (ps) { - IWineD3DPixelShaderImpl *pshader = This->stateBlock->state.pixel_shader; - /* Note that we only care if a sampler is sampled or not, not the sampler's specific type. * Otherwise we'd need to call shader_update_samplers() here for 1.x pixelshaders. */ - pshader_sampler_type = pshader->baseShader.reg_maps.sampler_type; + pshader_sampler_type = device->stateBlock->state.pixel_shader->reg_maps.sampler_type; } for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) { DWORD vsampler_idx = i + MAX_FRAGMENT_SAMPLERS; if (vshader_sampler_type[i]) { - if (This->texUnitMap[vsampler_idx] != WINED3D_UNMAPPED_STAGE) + if (device->texUnitMap[vsampler_idx] != WINED3D_UNMAPPED_STAGE) { /* Already mapped somewhere */ continue; } - while (start >= 0) { - if (device_unit_free_for_vs(This, pshader_sampler_type, vshader_sampler_type, start)) + while (start >= 0) + { + if (device_unit_free_for_vs(device, pshader_sampler_type, vshader_sampler_type, start)) { - device_map_stage(This, vsampler_idx, start); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(vsampler_idx)); + device_map_stage(device, vsampler_idx, start); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(vsampler_idx)); --start; break; @@ -3588,10 +2983,10 @@ static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps, const struct } } -void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) +void device_update_tex_unit_map(struct wined3d_device *device) { - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - const struct wined3d_state *state = &This->stateBlock->state; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_state *state = &device->stateBlock->state; BOOL vs = use_vs(state); BOOL ps = use_ps(state); /* @@ -3601,214 +2996,209 @@ void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) * -> When the mapping of a stage is changed, sampler and ALL texture stage states have * to be reset. Because of that try to work with a 1:1 mapping as much as possible */ - if (ps) device_map_psamplers(This, gl_info); - else device_map_fixed_function_samplers(This, gl_info); + if (ps) + device_map_psamplers(device, gl_info); + else + device_map_fixed_function_samplers(device, gl_info); - if (vs) device_map_vsamplers(This, ps, gl_info); + if (vs) + device_map_vsamplers(device, ps, gl_info); } -static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, IWineD3DPixelShader *pShader) +HRESULT CDECL wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DPixelShader *oldShader = (IWineD3DPixelShader *)This->updateStateBlock->state.pixel_shader; - This->updateStateBlock->state.pixel_shader = (IWineD3DPixelShaderImpl *)pShader; - This->updateStateBlock->changed.pixelShader = TRUE; + struct wined3d_shader *prev = device->updateStateBlock->state.pixel_shader; - /* Handle recording of state blocks */ - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - } + TRACE("device %p, shader %p.\n", device, shader); - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); - if(pShader) IWineD3DPixelShader_AddRef(pShader); - if(oldShader) IWineD3DPixelShader_Release(oldShader); + device->updateStateBlock->state.pixel_shader = shader; + device->updateStateBlock->changed.pixelShader = TRUE; + + if (device->isRecordingState) + { + if (shader) + wined3d_shader_incref(shader); + if (prev) + wined3d_shader_decref(prev); + TRACE("Recording... not performing anything.\n"); return WINED3D_OK; } - if(pShader == oldShader) { - TRACE("App is setting the old pixel shader over, nothing to do\n"); + if (shader == prev) + { + TRACE("Application is setting the old shader over, nothing to do.\n"); return WINED3D_OK; } - if(pShader) IWineD3DPixelShader_AddRef(pShader); - if(oldShader) IWineD3DPixelShader_Release(oldShader); + if (shader) + wined3d_shader_incref(shader); + if (prev) + wined3d_shader_decref(prev); - TRACE("(%p) : setting pShader(%p)\n", This, pShader); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_PIXELSHADER); return WINED3D_OK; } -static IWineD3DPixelShader * WINAPI IWineD3DDeviceImpl_GetPixelShader(IWineD3DDevice *iface) +struct wined3d_shader * CDECL wined3d_device_get_pixel_shader(struct wined3d_device *device) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; - IWineD3DPixelShader *shader; + struct wined3d_shader *shader; - TRACE("iface %p.\n", iface); + TRACE("device %p.\n", device); - shader = (IWineD3DPixelShader *)device->stateBlock->state.pixel_shader; - if (shader) IWineD3DPixelShader_AddRef(shader); + shader = device->stateBlock->state.pixel_shader; + if (shader) + wined3d_shader_incref(shader); TRACE("Returning %p.\n", shader); return shader; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantB( - IWineD3DDevice *iface, - UINT start, - CONST BOOL *srcData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - unsigned int i, cnt = min(count, MAX_CONST_B - start); - - TRACE("(iface %p, srcData %p, start %u, count %u)\n", - iface, srcData, start, count); - - if (!srcData || start >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - - memcpy(&This->updateStateBlock->state.ps_consts_b[start], srcData, cnt * sizeof(BOOL)); - for (i = 0; i < cnt; i++) - TRACE("Set BOOL constant %u to %s\n", start + i, srcData[i]? "true":"false"); - - for (i = start; i < cnt + start; ++i) { - This->updateStateBlock->changed.pixelShaderConstantsB |= (1 << i); - } - - if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstantB( - IWineD3DDevice *iface, - UINT start, - BOOL *dstData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_CONST_B - start); - - TRACE("(iface %p, dstData %p, start %d, count %d)\n", - iface, dstData, start, count); - - if (!dstData || cnt < 0) - return WINED3DERR_INVALIDCALL; - - memcpy(dstData, &This->stateBlock->state.ps_consts_b[start], cnt * sizeof(BOOL)); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantI( - IWineD3DDevice *iface, - UINT start, - CONST int *srcData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - unsigned int i, cnt = min(count, MAX_CONST_I - start); - - TRACE("(iface %p, srcData %p, start %u, count %u)\n", - iface, srcData, start, count); - - if (!srcData || start >= MAX_CONST_I) return WINED3DERR_INVALIDCALL; - - memcpy(&This->updateStateBlock->state.ps_consts_i[start * 4], srcData, cnt * sizeof(int) * 4); - for (i = 0; i < cnt; i++) - TRACE("Set INT constant %u to { %d, %d, %d, %d }\n", start + i, - srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]); - - for (i = start; i < cnt + start; ++i) { - This->updateStateBlock->changed.pixelShaderConstantsI |= (1 << i); - } - - if (!This->isRecordingState) IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstantI( - IWineD3DDevice *iface, - UINT start, - int *dstData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, MAX_CONST_I - start); - - TRACE("(iface %p, dstData %p, start %d, count %d)\n", - iface, dstData, start, count); - - if (!dstData || cnt < 0) - return WINED3DERR_INVALIDCALL; - - memcpy(dstData, &This->stateBlock->state.ps_consts_i[start * 4], cnt * sizeof(int) * 4); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantF( - IWineD3DDevice *iface, - UINT start, - CONST float *srcData, - UINT count) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device, + UINT start_register, const BOOL *constants, UINT bool_count) +{ + UINT count = min(bool_count, MAX_CONST_B - start_register); UINT i; - TRACE("(iface %p, srcData %p, start %d, count %d)\n", - iface, srcData, start, count); + TRACE("device %p, start_register %u, constants %p, bool_count %u.\n", + device, start_register, constants, bool_count); - /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */ - if (!srcData || start + count > This->d3d_pshader_constantF || start > This->d3d_pshader_constantF) + if (!constants || start_register >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - memcpy(&This->updateStateBlock->state.ps_consts_f[start * 4], srcData, count * sizeof(float) * 4); - if(TRACE_ON(d3d)) { - for (i = 0; i < count; i++) - TRACE("Set FLOAT constant %u to { %f, %f, %f, %f }\n", start + i, - srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]); - } + memcpy(&device->updateStateBlock->state.ps_consts_b[start_register], constants, count * sizeof(BOOL)); + for (i = 0; i < count; ++i) + TRACE("Set BOOL constant %u to %s.\n", start_register + i, constants[i] ? "true" : "false"); - if (!This->isRecordingState) - { - This->shader_backend->shader_update_float_pixel_constants(iface, start, count); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADERCONSTANT); - } + for (i = start_register; i < count + start_register; ++i) + device->updateStateBlock->changed.pixelShaderConstantsB |= (1 << i); - memset(This->updateStateBlock->changed.pixelShaderConstantsF + start, 1, - sizeof(*This->updateStateBlock->changed.pixelShaderConstantsF) * count); + if (!device->isRecordingState) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_PIXELSHADERCONSTANT); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstantF( - IWineD3DDevice *iface, - UINT start, - float *dstData, - UINT count) { +HRESULT CDECL wined3d_device_get_ps_consts_b(struct wined3d_device *device, + UINT start_register, BOOL *constants, UINT bool_count) +{ + UINT count = min(bool_count, MAX_CONST_B - start_register); - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int cnt = min(count, This->d3d_pshader_constantF - start); + TRACE("device %p, start_register %u, constants %p, bool_count %u.\n", + device, start_register, constants, bool_count); - TRACE("(iface %p, dstData %p, start %d, count %d)\n", - iface, dstData, start, count); - - if (!dstData || cnt < 0) + if (!constants || start_register >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - memcpy(dstData, &This->stateBlock->state.ps_consts_f[start * 4], cnt * sizeof(float) * 4); + memcpy(constants, &device->stateBlock->state.ps_consts_b[start_register], count * sizeof(BOOL)); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device, + UINT start_register, const int *constants, UINT vector4i_count) +{ + UINT count = min(vector4i_count, MAX_CONST_I - start_register); + UINT i; + + TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n", + device, start_register, constants, vector4i_count); + + if (!constants || start_register >= MAX_CONST_I) + return WINED3DERR_INVALIDCALL; + + memcpy(&device->updateStateBlock->state.ps_consts_i[start_register * 4], constants, count * sizeof(int) * 4); + for (i = 0; i < count; ++i) + TRACE("Set INT constant %u to {%d, %d, %d, %d}.\n", start_register + i, + constants[i * 4], constants[i * 4 + 1], + constants[i * 4 + 2], constants[i * 4 + 3]); + + for (i = start_register; i < count + start_register; ++i) + device->updateStateBlock->changed.pixelShaderConstantsI |= (1 << i); + + if (!device->isRecordingState) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_PIXELSHADERCONSTANT); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_ps_consts_i(struct wined3d_device *device, + UINT start_register, int *constants, UINT vector4i_count) +{ + UINT count = min(vector4i_count, MAX_CONST_I - start_register); + + TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n", + device, start_register, constants, vector4i_count); + + if (!constants || start_register >= MAX_CONST_I) + return WINED3DERR_INVALIDCALL; + + memcpy(constants, &device->stateBlock->state.ps_consts_i[start_register * 4], count * sizeof(int) * 4); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device, + UINT start_register, const float *constants, UINT vector4f_count) +{ + UINT i; + + TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", + device, start_register, constants, vector4f_count); + + /* Specifically test start_register > limit to catch MAX_UINT overflows + * when adding start_register + vector4f_count. */ + if (!constants + || start_register + vector4f_count > device->d3d_pshader_constantF + || start_register > device->d3d_pshader_constantF) + return WINED3DERR_INVALIDCALL; + + memcpy(&device->updateStateBlock->state.ps_consts_f[start_register * 4], + constants, vector4f_count * sizeof(float) * 4); + if (TRACE_ON(d3d)) + { + for (i = 0; i < vector4f_count; ++i) + TRACE("Set FLOAT constant %u to {%.8e, %.8e, %.8e, %.8e}.\n", start_register + i, + constants[i * 4], constants[i * 4 + 1], + constants[i * 4 + 2], constants[i * 4 + 3]); + } + + if (!device->isRecordingState) + { + device->shader_backend->shader_update_float_pixel_constants(device, start_register, vector4f_count); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_PIXELSHADERCONSTANT); + } + + memset(device->updateStateBlock->changed.pixelShaderConstantsF + start_register, 1, + sizeof(*device->updateStateBlock->changed.pixelShaderConstantsF) * vector4f_count); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_ps_consts_f(struct wined3d_device *device, + UINT start_register, float *constants, UINT vector4f_count) +{ + int count = min(vector4f_count, device->d3d_pshader_constantF - start_register); + + TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", + device, start_register, constants, vector4f_count); + + if (!constants || count < 0) + return WINED3DERR_INVALIDCALL; + + memcpy(constants, &device->stateBlock->state.ps_consts_f[start_register * 4], count * sizeof(float) * 4); + return WINED3D_OK; } /* Context activation is done by the caller. */ /* Do not call while under the GL lock. */ #define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size) -static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCount, - const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD dwFlags, +static HRESULT process_vertices_strided(struct wined3d_device *device, DWORD dwDestIndex, DWORD dwCount, + const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD flags, DWORD DestFVF) { - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; char *dest_ptr, *dest_conv = NULL, *dest_conv_addr = NULL; unsigned int i; WINED3DVIEWPORT vp; @@ -3836,7 +3226,7 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn if (!dest->buffer_object && gl_info->supported[ARB_VERTEX_BUFFER_OBJECT]) { dest->flags |= WINED3D_BUFFER_CREATEBO; - IWineD3DBuffer_PreLoad((IWineD3DBuffer *)dest); + wined3d_buffer_preload(dest); } if (dest->buffer_object) @@ -3855,7 +3245,7 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn dest_conv = dest_conv_addr; } - if (This->stateBlock->state.render_states[WINED3DRS_CLIPPING]) + if (device->stateBlock->state.render_states[WINED3DRS_CLIPPING]) { static BOOL warned = FALSE; /* @@ -3874,15 +3264,9 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn } else doClip = FALSE; dest_ptr = ((char *)buffer_get_sysmem(dest, gl_info)) + dwDestIndex * get_flexible_vertex_size(DestFVF); - IWineD3DDevice_GetTransform( (IWineD3DDevice *) This, - WINED3DTS_VIEW, - &view_mat); - IWineD3DDevice_GetTransform( (IWineD3DDevice *) This, - WINED3DTS_PROJECTION, - &proj_mat); - IWineD3DDevice_GetTransform( (IWineD3DDevice *) This, - WINED3DTS_WORLDMATRIX(0), - &world_mat); + wined3d_device_get_transform(device, WINED3DTS_VIEW, &view_mat); + wined3d_device_get_transform(device, WINED3DTS_PROJECTION, &proj_mat); + wined3d_device_get_transform(device, WINED3DTS_WORLDMATRIX(0), &world_mat); TRACE("View mat:\n"); TRACE("%f %f %f %f\n", view_mat.u.s._11, view_mat.u.s._12, view_mat.u.s._13, view_mat.u.s._14); @@ -3903,7 +3287,7 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn TRACE("%f %f %f %f\n", world_mat.u.s._41, world_mat.u.s._42, world_mat.u.s._43, world_mat.u.s._44); /* Get the viewport */ - IWineD3DDevice_GetViewport( (IWineD3DDevice *) This, &vp); + wined3d_device_get_viewport(device, &vp); TRACE("Viewport: X=%d, Y=%d, Width=%d, Height=%d, MinZ=%f, MaxZ=%f\n", vp.X, vp.Y, vp.Width, vp.Height, vp.MinZ, vp.MaxZ); @@ -4147,35 +3531,37 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn #undef copy_and_next /* Do not call while under the GL lock. */ -static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, UINT SrcStartIndex, UINT DestIndex, - UINT VertexCount, IWineD3DBuffer *pDestBuffer, IWineD3DVertexDeclaration *pVertexDecl, DWORD Flags, - DWORD DestFVF) +HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, + UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer, + struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + BOOL vbo = FALSE, streamWasUP = device->stateBlock->state.user_stream; struct wined3d_stream_info stream_info; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; - BOOL vbo = FALSE, streamWasUP = This->stateBlock->state.user_stream; HRESULT hr; - TRACE("(%p)->(%d,%d,%d,%p,%p,%d\n", This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags); + TRACE("device %p, src_start_idx %u, dst_idx %u, vertex_count %u, " + "dst_buffer %p, declaration %p, flags %#x, dst_fvf %#x.\n", + device, src_start_idx, dst_idx, vertex_count, + dst_buffer, declaration, flags, dst_fvf); - if(pVertexDecl) { - ERR("Output vertex declaration not implemented yet\n"); - } + if (declaration) + FIXME("Output vertex declaration not implemented yet.\n"); /* Need any context to write to the vbo. */ - context = context_acquire(This, NULL); + context = context_acquire(device, NULL); gl_info = context->gl_info; /* ProcessVertices reads from vertex buffers, which have to be assigned. DrawPrimitive and DrawPrimitiveUP * control the streamIsUP flag, thus restore it afterwards. */ - This->stateBlock->state.user_stream = FALSE; - device_stream_info_from_declaration(This, FALSE, &stream_info, &vbo); - This->stateBlock->state.user_stream = streamWasUP; + device->stateBlock->state.user_stream = FALSE; + device_stream_info_from_declaration(device, FALSE, &stream_info, &vbo); + device->stateBlock->state.user_stream = streamWasUP; - if(vbo || SrcStartIndex) { + if (vbo || src_start_idx) + { unsigned int i; /* ProcessVertices can't convert FROM a vbo, and vertex buffers used to source into ProcessVertices are * unlikely to ever be used for drawing. Release vbos in those buffers and fix up the stream_info structure @@ -4191,7 +3577,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, e = &stream_info.elements[i]; if (e->buffer_object) { - struct wined3d_buffer *vb = This->stateBlock->state.streams[e->stream_idx].buffer; + struct wined3d_buffer *vb = device->stateBlock->state.streams[e->stream_idx].buffer; e->buffer_object = 0; e->data = (BYTE *)((ULONG_PTR)e->data + (ULONG_PTR)buffer_get_sysmem(vb, gl_info)); ENTER_GL(); @@ -4199,160 +3585,159 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, vb->buffer_object = 0; LEAVE_GL(); } - if (e->data) e->data += e->stride * SrcStartIndex; + if (e->data) + e->data += e->stride * src_start_idx; } } - hr = process_vertices_strided(This, DestIndex, VertexCount, &stream_info, - (struct wined3d_buffer *)pDestBuffer, Flags, DestFVF); + hr = process_vertices_strided(device, dst_idx, vertex_count, + &stream_info, dst_buffer, flags, dst_fvf); context_release(context); return hr; } -/***** - * Get / Set Texture Stage States - * TODO: Verify against dx9 definitions - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *iface, DWORD Stage, WINED3DTEXTURESTAGESTATETYPE Type, DWORD Value) +HRESULT CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, + UINT stage, WINED3DTEXTURESTAGESTATETYPE state, DWORD value) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - DWORD oldValue; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + DWORD old_value; - TRACE("(%p) : Stage=%d, Type=%s(%d), Value=%d\n", This, Stage, debug_d3dtexturestate(Type), Type, Value); + TRACE("device %p, stage %u, state %s, value %#x.\n", + device, stage, debug_d3dtexturestate(state), value); - if (Type > WINED3D_HIGHEST_TEXTURE_STATE) + if (state > WINED3D_HIGHEST_TEXTURE_STATE) { - WARN("Invalid Type %d passed.\n", Type); + WARN("Invalid state %#x passed.\n", state); return WINED3D_OK; } - if (Stage >= gl_info->limits.texture_stages) + if (stage >= gl_info->limits.texture_stages) { WARN("Attempting to set stage %u which is higher than the max stage %u, ignoring.\n", - Stage, gl_info->limits.texture_stages - 1); + stage, gl_info->limits.texture_stages - 1); return WINED3D_OK; } - oldValue = This->updateStateBlock->state.texture_states[Stage][Type]; - This->updateStateBlock->changed.textureState[Stage] |= 1 << Type; - This->updateStateBlock->state.texture_states[Stage][Type] = Value; + old_value = device->updateStateBlock->state.texture_states[stage][state]; + device->updateStateBlock->changed.textureState[stage] |= 1 << state; + device->updateStateBlock->state.texture_states[stage][state] = value; - if (This->isRecordingState) { - TRACE("Recording... not performing anything\n"); + if (device->isRecordingState) + { + TRACE("Recording... not performing anything.\n"); return WINED3D_OK; } - /* Checked after the assignments to allow proper stateblock recording */ - if(oldValue == Value) { - TRACE("App is setting the old value over, nothing to do\n"); + /* Checked after the assignments to allow proper stateblock recording. */ + if (old_value == value) + { + TRACE("Application is setting the old value over, nothing to do.\n"); return WINED3D_OK; } - if (Stage > This->stateBlock->state.lowest_disabled_stage - && This->StateTable[STATE_TEXTURESTAGE(0, Type)].representative + if (stage > device->stateBlock->state.lowest_disabled_stage + && device->StateTable[STATE_TEXTURESTAGE(0, state)].representative == STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP)) { - /* Colorop change above lowest disabled stage? That won't change anything in the gl setup - * Changes in other states are important on disabled stages too - */ + /* Colorop change above lowest disabled stage? That won't change + * anything in the GL setup. Changes in other states are important on + * disabled stages too. */ return WINED3D_OK; } - if(Type == WINED3DTSS_COLOROP) { + if (state == WINED3DTSS_COLOROP) + { unsigned int i; - if(Value == WINED3DTOP_DISABLE && oldValue != WINED3DTOP_DISABLE) { - /* Previously enabled stage disabled now. Make sure to dirtify all enabled stages above Stage, - * they have to be disabled + if (value == WINED3DTOP_DISABLE && old_value != WINED3DTOP_DISABLE) + { + /* Previously enabled stage disabled now. Make sure to dirtify + * all enabled stages above stage, they have to be disabled. * - * The current stage is dirtified below. - */ - for (i = Stage + 1; i < This->stateBlock->state.lowest_disabled_stage; ++i) + * The current stage is dirtified below. */ + for (i = stage + 1; i < device->stateBlock->state.lowest_disabled_stage; ++i) { - TRACE("Additionally dirtifying stage %u\n", i); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP)); + TRACE("Additionally dirtifying stage %u.\n", i); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP)); } - This->stateBlock->state.lowest_disabled_stage = Stage; - TRACE("New lowest disabled: %u\n", Stage); - } else if(Value != WINED3DTOP_DISABLE && oldValue == WINED3DTOP_DISABLE) { - /* Previously disabled stage enabled. Stages above it may need enabling - * stage must be lowest_disabled_stage here, if it's bigger success is returned above, - * and stages below the lowest disabled stage can't be enabled(because they are enabled already). + device->stateBlock->state.lowest_disabled_stage = stage; + TRACE("New lowest disabled: %u.\n", stage); + } + else if (value != WINED3DTOP_DISABLE && old_value == WINED3DTOP_DISABLE) + { + /* Previously disabled stage enabled. Stages above it may need + * enabling. Stage must be lowest_disabled_stage here, if it's + * bigger success is returned above, and stages below the lowest + * disabled stage can't be enabled (because they are enabled + * already). * - * Again stage Stage doesn't need to be dirtified here, it is handled below. - */ - - for (i = Stage + 1; i < This->adapter->gl_info.limits.texture_stages; ++i) + * Again stage stage doesn't need to be dirtified here, it is + * handled below. */ + for (i = stage + 1; i < gl_info->limits.texture_stages; ++i) { - if (This->updateStateBlock->state.texture_states[i][WINED3DTSS_COLOROP] == WINED3DTOP_DISABLE) + if (device->updateStateBlock->state.texture_states[i][WINED3DTSS_COLOROP] == WINED3DTOP_DISABLE) break; - TRACE("Additionally dirtifying stage %u due to enable\n", i); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP)); + TRACE("Additionally dirtifying stage %u due to enable.\n", i); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP)); } - This->stateBlock->state.lowest_disabled_stage = i; - TRACE("New lowest disabled: %u\n", i); + device->stateBlock->state.lowest_disabled_stage = i; + TRACE("New lowest disabled: %u.\n", i); } } - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(Stage, Type)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(stage, state)); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetTextureStageState(IWineD3DDevice *iface, DWORD Stage, WINED3DTEXTURESTAGESTATETYPE Type, DWORD *pValue) +HRESULT CDECL wined3d_device_get_texture_stage_state(struct wined3d_device *device, + UINT stage, WINED3DTEXTURESTAGESTATETYPE state, DWORD *value) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + TRACE("device %p, stage %u, state %s, value %p.\n", + device, stage, debug_d3dtexturestate(state), value); - TRACE("iface %p, stage %u, state %s, value %p.\n", - iface, Stage, debug_d3dtexturestate(Type), pValue); - - if (Type > WINED3D_HIGHEST_TEXTURE_STATE) + if (state > WINED3D_HIGHEST_TEXTURE_STATE) { - WARN("Invalid Type %d passed.\n", Type); + WARN("Invalid state %#x passed.\n", state); return WINED3D_OK; } - *pValue = This->updateStateBlock->state.texture_states[Stage][Type]; - TRACE("Returning %#x.\n", *pValue); + *value = device->updateStateBlock->state.texture_states[stage][state]; + TRACE("Returning %#x.\n", *value); return WINED3D_OK; } -/***** - * Get / Set Texture - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, - DWORD stage, IWineD3DBaseTexture *texture) +HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, + UINT stage, struct wined3d_texture *texture) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - IWineD3DBaseTexture *prev; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + struct wined3d_texture *prev; - TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture); + TRACE("device %p, stage %u, texture %p.\n", device, stage, texture); if (stage >= WINED3DVERTEXTEXTURESAMPLER0 && stage <= WINED3DVERTEXTEXTURESAMPLER3) stage -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); /* Windows accepts overflowing this array... we do not. */ - if (stage >= sizeof(This->stateBlock->state.textures) / sizeof(*This->stateBlock->state.textures)) + if (stage >= sizeof(device->stateBlock->state.textures) / sizeof(*device->stateBlock->state.textures)) { WARN("Ignoring invalid stage %u.\n", stage); return WINED3D_OK; } /* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH */ - if (texture && ((IWineD3DTextureImpl *)texture)->resource.pool == WINED3DPOOL_SCRATCH) + if (texture && texture->resource.pool == WINED3DPOOL_SCRATCH) { WARN("Rejecting attempt to set scratch texture.\n"); return WINED3DERR_INVALIDCALL; } - This->updateStateBlock->changed.textures |= 1 << stage; + device->updateStateBlock->changed.textures |= 1 << stage; - prev = (IWineD3DBaseTexture *)This->updateStateBlock->state.textures[stage]; + prev = device->updateStateBlock->state.textures[stage]; TRACE("Previous texture %p.\n", prev); if (texture == prev) @@ -4362,55 +3747,53 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, } TRACE("Setting new texture to %p.\n", texture); - This->updateStateBlock->state.textures[stage] = (IWineD3DBaseTextureImpl *)texture; + device->updateStateBlock->state.textures[stage] = texture; - if (This->isRecordingState) + if (device->isRecordingState) { TRACE("Recording... not performing anything\n"); - if (texture) IWineD3DBaseTexture_AddRef(texture); - if (prev) IWineD3DBaseTexture_Release(prev); + if (texture) wined3d_texture_incref(texture); + if (prev) wined3d_texture_decref(prev); return WINED3D_OK; } if (texture) { - IWineD3DBaseTextureImpl *t = (IWineD3DBaseTextureImpl *)texture; - LONG bind_count = InterlockedIncrement(&t->baseTexture.bindCount); - GLenum dimensions = t->baseTexture.target; + LONG bind_count = InterlockedIncrement(&texture->bind_count); - IWineD3DBaseTexture_AddRef(texture); + wined3d_texture_incref(texture); - if (!prev || dimensions != ((IWineD3DBaseTextureImpl *)prev)->baseTexture.target) - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER); + if (!prev || texture->target != prev->target) + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_PIXELSHADER); if (!prev && stage < gl_info->limits.texture_stages) { /* The source arguments for color and alpha ops have different * meanings when a NULL texture is bound, so the COLOROP and * ALPHAOP have to be dirtified. */ - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(stage, WINED3DTSS_COLOROP)); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(stage, WINED3DTSS_ALPHAOP)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(stage, WINED3DTSS_COLOROP)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(stage, WINED3DTSS_ALPHAOP)); } - if (bind_count == 1) t->baseTexture.sampler = stage; + if (bind_count == 1) + texture->sampler = stage; } if (prev) { - IWineD3DBaseTextureImpl *t = (IWineD3DBaseTextureImpl *)prev; - LONG bind_count = InterlockedDecrement(&t->baseTexture.bindCount); + LONG bind_count = InterlockedDecrement(&prev->bind_count); - IWineD3DBaseTexture_Release(prev); + wined3d_texture_decref(prev); if (!texture && stage < gl_info->limits.texture_stages) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(stage, WINED3DTSS_COLOROP)); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(stage, WINED3DTSS_ALPHAOP)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(stage, WINED3DTSS_COLOROP)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_TEXTURESTAGE(stage, WINED3DTSS_ALPHAOP)); } - if (bind_count && t->baseTexture.sampler == stage) + if (bind_count && prev->sampler == stage) { unsigned int i; @@ -4419,66 +3802,62 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, TRACE("Searching for other stages the texture is bound to.\n"); for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) { - if (This->updateStateBlock->state.textures[i] == t) + if (device->updateStateBlock->state.textures[i] == prev) { TRACE("Texture is also bound to stage %u.\n", i); - t->baseTexture.sampler = i; + prev->sampler = i; break; } } } } - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(stage)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(stage)); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD Stage, IWineD3DBaseTexture** ppTexture) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_get_texture(struct wined3d_device *device, + UINT stage, struct wined3d_texture **texture) +{ + TRACE("device %p, stage %u, texture %p.\n", device, stage, texture); - TRACE("(%p) : Stage %#x, ppTexture %p\n", This, Stage, ppTexture); + if (stage >= WINED3DVERTEXTEXTURESAMPLER0 && stage <= WINED3DVERTEXTEXTURESAMPLER3) + stage -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - if (Stage >= WINED3DVERTEXTEXTURESAMPLER0 && Stage <= WINED3DVERTEXTEXTURESAMPLER3) { - Stage -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - } - - if (Stage >= sizeof(This->stateBlock->state.textures) / sizeof(*This->stateBlock->state.textures)) + if (stage >= sizeof(device->stateBlock->state.textures) / sizeof(*device->stateBlock->state.textures)) { - ERR("Current stage overflows textures array (stage %d)\n", Stage); + WARN("Ignoring invalid stage %u.\n", stage); return WINED3D_OK; /* Windows accepts overflowing this array ... we do not. */ } - *ppTexture = (IWineD3DBaseTexture *)This->stateBlock->state.textures[Stage]; - if (*ppTexture) - IWineD3DBaseTexture_AddRef(*ppTexture); + *texture = device->stateBlock->state.textures[stage]; + if (*texture) + wined3d_texture_incref(*texture); - TRACE("(%p) : Returning %p\n", This, *ppTexture); + TRACE("Returning %p.\n", *texture); return WINED3D_OK; } -/***** - * Get Back Buffer - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UINT swapchain_idx, - UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, IWineD3DSurface **backbuffer) +HRESULT CDECL wined3d_device_get_back_buffer(struct wined3d_device *device, UINT swapchain_idx, + UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, struct wined3d_surface **backbuffer) { - IWineD3DSwapChain *swapchain; + struct wined3d_swapchain *swapchain; HRESULT hr; - TRACE("iface %p, swapchain_idx %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", - iface, swapchain_idx, backbuffer_idx, backbuffer_type, backbuffer); + TRACE("device %p, swapchain_idx %u, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n", + device, swapchain_idx, backbuffer_idx, backbuffer_type, backbuffer); - hr = IWineD3DDeviceImpl_GetSwapChain(iface, swapchain_idx, &swapchain); + hr = wined3d_device_get_swapchain(device, swapchain_idx, &swapchain); if (FAILED(hr)) { WARN("Failed to get swapchain %u, hr %#x.\n", swapchain_idx, hr); return hr; } - hr = IWineD3DSwapChain_GetBackBuffer(swapchain, backbuffer_idx, backbuffer_type, backbuffer); - IWineD3DSwapChain_Release(swapchain); + hr = wined3d_swapchain_get_back_buffer(swapchain, backbuffer_idx, backbuffer_type, backbuffer); + wined3d_swapchain_decref(swapchain); if (FAILED(hr)) { WARN("Failed to get backbuffer %u, hr %#x.\n", backbuffer_idx, hr); @@ -4488,371 +3867,377 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UI return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetDeviceCaps(IWineD3DDevice *iface, WINED3DCAPS* pCaps) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - WARN("(%p) : stub, calling idirect3d for now\n", This); - return IWineD3D_GetDeviceCaps(This->wined3d, This->adapter->ordinal, This->devType, pCaps); +HRESULT CDECL wined3d_device_get_device_caps(struct wined3d_device *device, WINED3DCAPS *caps) +{ + TRACE("device %p, caps %p.\n", device, caps); + + return wined3d_get_device_caps(device->wined3d, device->adapter->ordinal, device->devType, caps); } -static HRESULT WINAPI IWineD3DDeviceImpl_GetDisplayMode(IWineD3DDevice *iface, UINT iSwapChain, WINED3DDISPLAYMODE* pMode) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DSwapChain *swapChain; +HRESULT CDECL wined3d_device_get_display_mode(struct wined3d_device *device, + UINT swapchain_idx, WINED3DDISPLAYMODE *mode) +{ + struct wined3d_swapchain *swapchain; HRESULT hr; - if(iSwapChain > 0) { - hr = IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapChain); - if (hr == WINED3D_OK) { - hr = IWineD3DSwapChain_GetDisplayMode(swapChain, pMode); - IWineD3DSwapChain_Release(swapChain); - } else { - FIXME("(%p) Error getting display mode\n", This); - } - } else { - /* Don't read the real display mode, - but return the stored mode instead. X11 can't change the color - depth, and some apps are pretty angry if they SetDisplayMode from - 24 to 16 bpp and find out that GetDisplayMode still returns 24 bpp + TRACE("device %p, swapchain_idx %u, mode %p.\n", device, swapchain_idx, mode); - Also don't relay to the swapchain because with ddraw it's possible - that there isn't a swapchain at all */ - pMode->Width = This->ddraw_width; - pMode->Height = This->ddraw_height; - pMode->Format = This->ddraw_format; - pMode->RefreshRate = 0; + if (swapchain_idx) + { + hr = wined3d_device_get_swapchain(device, swapchain_idx, &swapchain); + if (SUCCEEDED(hr)) + { + hr = wined3d_swapchain_get_display_mode(swapchain, mode); + wined3d_swapchain_decref(swapchain); + } + } + else + { + /* Don't read the real display mode, but return the stored mode + * instead. X11 can't change the color depth, and some apps are + * pretty angry if they SetDisplayMode from 24 to 16 bpp and find out + * that GetDisplayMode still returns 24 bpp. + * + * Also don't relay to the swapchain because with ddraw it's possible + * that there isn't a swapchain at all. */ + mode->Width = device->ddraw_width; + mode->Height = device->ddraw_height; + mode->Format = device->ddraw_format; + mode->RefreshRate = 0; hr = WINED3D_OK; } return hr; } -/***** - * Stateblock related functions - *****/ - -static HRESULT WINAPI IWineD3DDeviceImpl_BeginStateBlock(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DStateBlock *stateblock; +HRESULT CDECL wined3d_device_begin_stateblock(struct wined3d_device *device) +{ + struct wined3d_stateblock *stateblock; HRESULT hr; - TRACE("(%p)\n", This); + TRACE("device %p.\n", device); - if (This->isRecordingState) return WINED3DERR_INVALIDCALL; + if (device->isRecordingState) + return WINED3DERR_INVALIDCALL; - hr = IWineD3DDeviceImpl_CreateStateBlock(iface, WINED3DSBT_RECORDED, &stateblock); - if (FAILED(hr)) return hr; + hr = wined3d_stateblock_create(device, WINED3DSBT_RECORDED, &stateblock); + if (FAILED(hr)) + return hr; - IWineD3DStateBlock_Release((IWineD3DStateBlock*)This->updateStateBlock); - This->updateStateBlock = (IWineD3DStateBlockImpl *)stateblock; - This->isRecordingState = TRUE; + wined3d_stateblock_decref(device->updateStateBlock); + device->updateStateBlock = stateblock; + device->isRecordingState = TRUE; - TRACE("(%p) recording stateblock %p\n", This, stateblock); + TRACE("Recording stateblock %p.\n", stateblock); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_EndStateBlock(IWineD3DDevice *iface, IWineD3DStateBlock** ppStateBlock) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DStateBlockImpl *object = This->updateStateBlock; +HRESULT CDECL wined3d_device_end_stateblock(struct wined3d_device *device, + struct wined3d_stateblock **stateblock) +{ + struct wined3d_stateblock *object = device->updateStateBlock; - if (!This->isRecordingState) { - WARN("(%p) not recording! returning error\n", This); - *ppStateBlock = NULL; + TRACE("device %p, stateblock %p.\n", device, stateblock); + + if (!device->isRecordingState) + { + WARN("Not recording.\n"); + *stateblock = NULL; return WINED3DERR_INVALIDCALL; } stateblock_init_contained_states(object); - *ppStateBlock = (IWineD3DStateBlock*) object; - This->isRecordingState = FALSE; - This->updateStateBlock = This->stateBlock; - IWineD3DStateBlock_AddRef((IWineD3DStateBlock*)This->updateStateBlock); - /* IWineD3DStateBlock_AddRef(*ppStateBlock); don't need to do this, since we should really just release UpdateStateBlock first */ - TRACE("(%p) returning token (ptr to stateblock) of %p\n", This, *ppStateBlock); + *stateblock = object; + device->isRecordingState = FALSE; + device->updateStateBlock = device->stateBlock; + wined3d_stateblock_incref(device->updateStateBlock); + + TRACE("Returning stateblock %p.\n", *stateblock); + return WINED3D_OK; } -/***** - * Scene related functions - *****/ -static HRESULT WINAPI IWineD3DDeviceImpl_BeginScene(IWineD3DDevice *iface) { +HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device) +{ /* At the moment we have no need for any functionality at the beginning - of a scene */ - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p)\n", This); + * of a scene. */ + TRACE("device %p.\n", device); - if(This->inScene) { - TRACE("Already in Scene, returning WINED3DERR_INVALIDCALL\n"); + if (device->inScene) + { + WARN("Already in scene, returning WINED3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } - This->inScene = TRUE; + device->inScene = TRUE; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_EndScene(IWineD3DDevice *iface) +HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_context *context; - TRACE("(%p)\n", This); + TRACE("device %p.\n", device); - if(!This->inScene) { - TRACE("Not in scene, returning WINED3DERR_INVALIDCALL\n"); + if (!device->inScene) + { + WARN("Not in scene, returning WINED3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } - context = context_acquire(This, NULL); + context = context_acquire(device, NULL); /* We only have to do this if we need to read the, swapbuffers performs a flush for us */ wglFlush(); /* No checkGLcall here to avoid locking the lock just for checking a call that hardly ever * fails. */ context_release(context); - This->inScene = FALSE; + device->inScene = FALSE; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_Present(IWineD3DDevice *iface, - const RECT *pSourceRect, const RECT *pDestRect, - HWND hDestWindowOverride, const RGNDATA *pDirtyRegion) +HRESULT CDECL wined3d_device_present(struct wined3d_device *device, const RECT *src_rect, + const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region) { - IWineD3DSwapChain *swapChain = NULL; - int i; - int swapchains = IWineD3DDeviceImpl_GetNumberOfSwapChains(iface); + UINT i; - TRACE("iface %p.\n", iface); + TRACE("device %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p.\n", + device, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), + dst_window_override, dirty_region); - for(i = 0 ; i < swapchains ; i ++) { - - IWineD3DDeviceImpl_GetSwapChain(iface, i, &swapChain); - TRACE("Presenting chain %d, %p.\n", i, swapChain); - IWineD3DSwapChain_Present(swapChain, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, 0); - IWineD3DSwapChain_Release(swapChain); + for (i = 0; i < device->swapchain_count; ++i) + { + wined3d_swapchain_present(device->swapchains[i], src_rect, + dst_rect, dst_window_override, dirty_region, 0); } return WINED3D_OK; } /* Do not call while under the GL lock. */ -static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD rect_count, +HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count, const RECT *rects, DWORD flags, WINED3DCOLOR color, float depth, DWORD stencil) { const WINED3DCOLORVALUE c = {D3DCOLOR_R(color), D3DCOLOR_G(color), D3DCOLOR_B(color), D3DCOLOR_A(color)}; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; RECT draw_rect; - TRACE("iface %p, rect_count %u, rects %p, flags %#x, color 0x%08x, depth %.8e, stencil %u.\n", - iface, rect_count, rects, flags, color, depth, stencil); + TRACE("device %p, rect_count %u, rects %p, flags %#x, color 0x%08x, depth %.8e, stencil %u.\n", + device, rect_count, rects, flags, color, depth, stencil); - if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL) && !device->depth_stencil) + if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL)) { - WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n"); - /* TODO: What about depth stencil buffers without stencil bits? */ - return WINED3DERR_INVALIDCALL; + struct wined3d_surface *ds = device->fb.depth_stencil; + if (!ds) + { + WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n"); + /* TODO: What about depth stencil buffers without stencil bits? */ + return WINED3DERR_INVALIDCALL; + } + else if (flags & WINED3DCLEAR_TARGET) + { + if (ds->resource.width < device->fb.render_targets[0]->resource.width + || ds->resource.height < device->fb.render_targets[0]->resource.height) + { + WARN("Silently ignoring depth and target clear with mismatching sizes\n"); + return WINED3D_OK; + } + } } device_get_draw_rect(device, &draw_rect); return device_clear_render_targets(device, device->adapter->gl_info.limits.buffers, - device->render_targets, rect_count, rects, &draw_rect, flags, &c, depth, stencil); + device->fb.render_targets, device->fb.depth_stencil, rect_count, rects, + &draw_rect, flags, &c, depth, stencil); } -/***** - * Drawing functions - *****/ - -static void WINAPI IWineD3DDeviceImpl_SetPrimitiveType(IWineD3DDevice *iface, +void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device, WINED3DPRIMITIVETYPE primitive_type) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type)); - TRACE("iface %p, primitive_type %s\n", iface, debug_d3dprimitivetype(primitive_type)); - - This->updateStateBlock->changed.primitive_type = TRUE; - This->updateStateBlock->state.gl_primitive_type = gl_primitive_type_from_d3d(primitive_type); + device->updateStateBlock->changed.primitive_type = TRUE; + device->updateStateBlock->state.gl_primitive_type = gl_primitive_type_from_d3d(primitive_type); } -static void WINAPI IWineD3DDeviceImpl_GetPrimitiveType(IWineD3DDevice *iface, +void CDECL wined3d_device_get_primitive_type(struct wined3d_device *device, WINED3DPRIMITIVETYPE *primitive_type) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + TRACE("device %p, primitive_type %p\n", device, primitive_type); - TRACE("iface %p, primitive_type %p\n", iface, primitive_type); - - *primitive_type = d3d_primitive_type_from_gl(This->stateBlock->state.gl_primitive_type); + *primitive_type = d3d_primitive_type_from_gl(device->stateBlock->state.gl_primitive_type); TRACE("Returning %s\n", debug_d3dprimitivetype(*primitive_type)); } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, UINT StartVertex, UINT vertex_count) +HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT start_vertex, UINT vertex_count) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count); - TRACE("(%p) : start %u, count %u\n", This, StartVertex, vertex_count); - - if (!This->stateBlock->state.vertex_declaration) + if (!device->stateBlock->state.vertex_declaration) { - WARN("(%p) : Called without a valid vertex declaration set\n", This); + WARN("Called without a valid vertex declaration set.\n"); return WINED3DERR_INVALIDCALL; } /* The index buffer is not needed here, but restore it, otherwise it is hell to keep track of */ - if (This->stateBlock->state.user_stream) + if (device->stateBlock->state.user_stream) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER); - This->stateBlock->state.user_stream = FALSE; + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); + device->stateBlock->state.user_stream = FALSE; } - if (This->stateBlock->state.load_base_vertex_index) + if (device->stateBlock->state.load_base_vertex_index) { - This->stateBlock->state.load_base_vertex_index = 0; - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC); + device->stateBlock->state.load_base_vertex_index = 0; + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); } - /* Account for the loading offset due to index buffers. Instead of reloading all sources correct it with the startvertex parameter */ - drawPrimitive(iface, vertex_count, StartVertex /* start_idx */, 0 /* indxSize */, NULL /* indxData */); + + /* Account for the loading offset due to index buffers. Instead of + * reloading all sources correct it with the startvertex parameter. */ + drawPrimitive(device, vertex_count, start_vertex, 0, NULL); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *iface, UINT startIndex, UINT index_count) +HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_buffer *index_buffer; - UINT idxStride = 2; + UINT index_size = 2; GLuint vbo; - index_buffer = This->stateBlock->state.index_buffer; + TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count); + + index_buffer = device->stateBlock->state.index_buffer; if (!index_buffer) { /* D3D9 returns D3DERR_INVALIDCALL when DrawIndexedPrimitive is called * without an index buffer set. (The first time at least...) * D3D8 simply dies, but I doubt it can do much harm to return * D3DERR_INVALIDCALL there as well. */ - WARN("(%p) : Called without a valid index buffer set, returning WINED3DERR_INVALIDCALL\n", This); + WARN("Called without a valid index buffer set, returning WINED3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } - if (!This->stateBlock->state.vertex_declaration) + if (!device->stateBlock->state.vertex_declaration) { - WARN("(%p) : Called without a valid vertex declaration set\n", This); + WARN("Called without a valid vertex declaration set.\n"); return WINED3DERR_INVALIDCALL; } - if (This->stateBlock->state.user_stream) + if (device->stateBlock->state.user_stream) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER); - This->stateBlock->state.user_stream = FALSE; + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); + device->stateBlock->state.user_stream = FALSE; } vbo = index_buffer->buffer_object; - TRACE("(%p) : startIndex %u, index count %u.\n", This, startIndex, index_count); - - if (This->stateBlock->state.index_format == WINED3DFMT_R16_UINT) - idxStride = 2; + if (device->stateBlock->state.index_format == WINED3DFMT_R16_UINT) + index_size = 2; else - idxStride = 4; + index_size = 4; - if (This->stateBlock->state.load_base_vertex_index != This->stateBlock->state.base_vertex_index) + if (device->stateBlock->state.load_base_vertex_index != device->stateBlock->state.base_vertex_index) { - This->stateBlock->state.load_base_vertex_index = This->stateBlock->state.base_vertex_index; - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC); + device->stateBlock->state.load_base_vertex_index = device->stateBlock->state.base_vertex_index; + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); } - drawPrimitive(iface, index_count, startIndex, idxStride, + drawPrimitive(device, index_count, start_idx, index_size, vbo ? NULL : index_buffer->resource.allocatedMemory); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface, UINT vertex_count, - const void *pVertexStreamZeroData, UINT VertexStreamZeroStride) +HRESULT CDECL wined3d_device_draw_primitive_up(struct wined3d_device *device, UINT vertex_count, + const void *stream_data, UINT stream_stride) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_stream_state *stream; - IWineD3DBuffer *vb; + struct wined3d_buffer *vb; - TRACE("(%p) : vertex count %u, pVtxData %p, stride %u\n", - This, vertex_count, pVertexStreamZeroData, VertexStreamZeroStride); + TRACE("device %p, vertex count %u, stream_data %p, stream_stride %u.\n", + device, vertex_count, stream_data, stream_stride); - if (!This->stateBlock->state.vertex_declaration) + if (!device->stateBlock->state.vertex_declaration) { - WARN("(%p) : Called without a valid vertex declaration set\n", This); + WARN("Called without a valid vertex declaration set.\n"); return WINED3DERR_INVALIDCALL; } /* Note in the following, it's not this type, but that's the purpose of streamIsUP */ - stream = &This->stateBlock->state.streams[0]; - vb = (IWineD3DBuffer *)stream->buffer; - stream->buffer = (struct wined3d_buffer *)pVertexStreamZeroData; - if (vb) IWineD3DBuffer_Release(vb); + stream = &device->stateBlock->state.streams[0]; + vb = stream->buffer; + stream->buffer = (struct wined3d_buffer *)stream_data; + if (vb) + wined3d_buffer_decref(vb); stream->offset = 0; - stream->stride = VertexStreamZeroStride; - This->stateBlock->state.user_stream = TRUE; - This->stateBlock->state.load_base_vertex_index = 0; + stream->stride = stream_stride; + device->stateBlock->state.user_stream = TRUE; + device->stateBlock->state.load_base_vertex_index = 0; /* TODO: Only mark dirty if drawing from a different UP address */ - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); - drawPrimitive(iface, vertex_count, 0 /* start_idx */, 0 /* indxSize*/, NULL /* indxData */); + drawPrimitive(device, vertex_count, 0, 0, NULL); /* MSDN specifies stream zero settings must be set to NULL */ stream->buffer = NULL; stream->stride = 0; - /* stream zero settings set to null at end, as per the msdn. No need to mark dirty here, the app has to set - * the new stream sources or use UP drawing again - */ + /* stream zero settings set to null at end, as per the msdn. No need to + * mark dirty here, the app has to set the new stream sources or use UP + * drawing again. */ return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *iface, - UINT index_count, const void *pIndexData, enum wined3d_format_id IndexDataFormat, - const void *pVertexStreamZeroData, UINT VertexStreamZeroStride) +HRESULT CDECL wined3d_device_draw_indexed_primitive_up(struct wined3d_device *device, + UINT index_count, const void *index_data, enum wined3d_format_id index_data_format_id, + const void *stream_data, UINT stream_stride) { - int idxStride; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_stream_state *stream; - IWineD3DBuffer *vb; - IWineD3DBuffer *ib; + struct wined3d_buffer *vb, *ib; + UINT index_size; - TRACE("(%p) : index count %u, pidxdata %p, IdxFmt %u, pVtxdata %p, stride=%u.\n", - This, index_count, pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride); + TRACE("device %p, index_count %u, index_data %p, index_data_format %s, stream_data %p, stream_stride %u.\n", + device, index_count, index_data, debug_d3dformat(index_data_format_id), stream_data, stream_stride); - if (!This->stateBlock->state.vertex_declaration) + if (!device->stateBlock->state.vertex_declaration) { - WARN("(%p) : Called without a valid vertex declaration set\n", This); + WARN("(%p) : Called without a valid vertex declaration set\n", device); return WINED3DERR_INVALIDCALL; } - if (IndexDataFormat == WINED3DFMT_R16_UINT) { - idxStride = 2; - } else { - idxStride = 4; - } + if (index_data_format_id == WINED3DFMT_R16_UINT) + index_size = 2; + else + index_size = 4; - stream = &This->stateBlock->state.streams[0]; - vb = (IWineD3DBuffer *)stream->buffer; - stream->buffer = (struct wined3d_buffer *)pVertexStreamZeroData; - if (vb) IWineD3DBuffer_Release(vb); + stream = &device->stateBlock->state.streams[0]; + vb = stream->buffer; + stream->buffer = (struct wined3d_buffer *)stream_data; + if (vb) + wined3d_buffer_decref(vb); stream->offset = 0; - stream->stride = VertexStreamZeroStride; - This->stateBlock->state.user_stream = TRUE; + stream->stride = stream_stride; + device->stateBlock->state.user_stream = TRUE; /* Set to 0 as per msdn. Do it now due to the stream source loading during drawPrimitive */ - This->stateBlock->state.base_vertex_index = 0; - This->stateBlock->state.load_base_vertex_index = 0; + device->stateBlock->state.base_vertex_index = 0; + device->stateBlock->state.load_base_vertex_index = 0; /* Mark the state dirty until we have nicer tracking of the stream source pointers */ - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VDECL); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); - drawPrimitive(iface, index_count, 0 /* start_idx */, idxStride, pIndexData); + drawPrimitive(device, index_count, 0, index_size, index_data); /* MSDN specifies stream zero settings and index buffer must be set to NULL */ stream->buffer = NULL; stream->stride = 0; - ib = (IWineD3DBuffer *)This->stateBlock->state.index_buffer; + ib = device->stateBlock->state.index_buffer; if (ib) { - IWineD3DBuffer_Release(ib); - This->stateBlock->state.index_buffer = NULL; + wined3d_buffer_decref(ib); + device->stateBlock->state.index_buffer = NULL; } /* No need to mark the stream source state dirty here. Either the app calls UP drawing again, or it has to call * SetStreamSource to specify a vertex buffer @@ -4861,86 +4246,82 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice * return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveStrided(IWineD3DDevice *iface, - UINT vertex_count, const WineDirect3DVertexStridedData *DrawPrimStrideData) +HRESULT CDECL wined3d_device_draw_primitive_strided(struct wined3d_device *device, + UINT vertex_count, const WineDirect3DVertexStridedData *strided_data) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - - /* Mark the state dirty until we have nicer tracking - * its fine to change baseVertexIndex because that call is only called by ddraw which does not need - * that value. - */ - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER); - This->stateBlock->state.base_vertex_index = 0; - This->up_strided = DrawPrimStrideData; - drawPrimitive(iface, vertex_count, 0, 0, NULL); - This->up_strided = NULL; + /* Mark the state dirty until we have nicer tracking. It's fine to change + * baseVertexIndex because that call is only called by ddraw which does + * not need that value. */ + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VDECL); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); + device->stateBlock->state.base_vertex_index = 0; + device->up_strided = strided_data; + drawPrimitive(device, vertex_count, 0, 0, NULL); + device->up_strided = NULL; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided(IWineD3DDevice *iface, - UINT vertex_count, const WineDirect3DVertexStridedData *DrawPrimStrideData, - UINT NumVertices, const void *pIndexData, enum wined3d_format_id IndexDataFormat) +HRESULT CDECL wined3d_device_draw_indexed_primitive_strided(struct wined3d_device *device, + UINT index_count, const WineDirect3DVertexStridedData *strided_data, + UINT vertex_count, const void *index_data, enum wined3d_format_id index_data_format_id) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - DWORD idxSize = (IndexDataFormat == WINED3DFMT_R32_UINT ? 4 : 2); + UINT index_size = index_data_format_id == WINED3DFMT_R32_UINT ? 4 : 2; /* Mark the state dirty until we have nicer tracking * its fine to change baseVertexIndex because that call is only called by ddraw which does not need * that value. */ - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER); - This->stateBlock->state.user_stream = TRUE; - This->stateBlock->state.base_vertex_index = 0; - This->up_strided = DrawPrimStrideData; - drawPrimitive(iface, vertex_count, 0 /* start_idx */, idxSize, pIndexData); - This->up_strided = NULL; + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_VDECL); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_INDEXBUFFER); + device->stateBlock->state.user_stream = TRUE; + device->stateBlock->state.base_vertex_index = 0; + device->up_strided = strided_data; + drawPrimitive(device, index_count, 0, index_size, index_data); + device->up_strided = NULL; return WINED3D_OK; } /* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */ -static HRESULT IWineD3DDeviceImpl_UpdateVolume(IWineD3DDevice *iface, - IWineD3DVolume *pSourceVolume, IWineD3DVolume *pDestinationVolume) +static HRESULT IWineD3DDeviceImpl_UpdateVolume(struct wined3d_device *device, + struct wined3d_volume *src_volume, struct wined3d_volume *dst_volume) { WINED3DLOCKED_BOX src; WINED3DLOCKED_BOX dst; HRESULT hr; - TRACE("iface %p, src_volume %p, dst_volume %p.\n", - iface, pSourceVolume, pDestinationVolume); + TRACE("device %p, src_volume %p, dst_volume %p.\n", + device, src_volume, dst_volume); - /* TODO: Implement direct loading into the gl volume instead of using memcpy and - * dirtification to improve loading performance. - */ - hr = IWineD3DVolume_LockBox(pSourceVolume, &src, NULL, WINED3DLOCK_READONLY); - if(FAILED(hr)) return hr; - hr = IWineD3DVolume_LockBox(pDestinationVolume, &dst, NULL, WINED3DLOCK_DISCARD); - if(FAILED(hr)) { - IWineD3DVolume_UnlockBox(pSourceVolume); - return hr; + /* TODO: Implement direct loading into the gl volume instead of using + * memcpy and dirtification to improve loading performance. */ + hr = wined3d_volume_map(src_volume, &src, NULL, WINED3DLOCK_READONLY); + if (FAILED(hr)) return hr; + hr = wined3d_volume_map(dst_volume, &dst, NULL, WINED3DLOCK_DISCARD); + if (FAILED(hr)) + { + wined3d_volume_unmap(src_volume); + return hr; } - memcpy(dst.pBits, src.pBits, ((IWineD3DVolumeImpl *) pDestinationVolume)->resource.size); + memcpy(dst.pBits, src.pBits, dst_volume->resource.size); + + hr = wined3d_volume_unmap(dst_volume); + if (FAILED(hr)) + wined3d_volume_unmap(src_volume); + else + hr = wined3d_volume_unmap(src_volume); - hr = IWineD3DVolume_UnlockBox(pDestinationVolume); - if(FAILED(hr)) { - IWineD3DVolume_UnlockBox(pSourceVolume); - } else { - hr = IWineD3DVolume_UnlockBox(pSourceVolume); - } return hr; } -static HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture(IWineD3DDevice *iface, - IWineD3DBaseTexture *src_texture, IWineD3DBaseTexture *dst_texture) +HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, + struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture) { unsigned int level_count, i; WINED3DRESOURCETYPE type; HRESULT hr; - TRACE("iface %p, src_texture %p, dst_texture %p.\n", iface, src_texture, dst_texture); + TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture); /* Verify that the source and destination textures are non-NULL. */ if (!src_texture || !dst_texture) @@ -4956,39 +4337,37 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture(IWineD3DDevice *iface, } /* Verify that the source and destination textures are the same type. */ - type = IWineD3DBaseTexture_GetType(src_texture); - if (IWineD3DBaseTexture_GetType(dst_texture) != type) + type = wined3d_texture_get_type(src_texture); + if (wined3d_texture_get_type(dst_texture) != type) { WARN("Source and destination have different types, returning WINED3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } /* Check that both textures have the identical numbers of levels. */ - level_count = IWineD3DBaseTexture_GetLevelCount(src_texture); - if (IWineD3DBaseTexture_GetLevelCount(dst_texture) != level_count) + level_count = wined3d_texture_get_level_count(src_texture); + if (wined3d_texture_get_level_count(dst_texture) != level_count) { WARN("Source and destination have different level counts, returning WINED3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } /* Make sure that the destination texture is loaded. */ - ((IWineD3DBaseTextureImpl *)dst_texture)->baseTexture.internal_preload(dst_texture, SRGB_RGB); + dst_texture->texture_ops->texture_preload(dst_texture, SRGB_RGB); /* Update every surface level of the texture. */ switch (type) { case WINED3DRTYPE_TEXTURE: { - IWineD3DSurface *src_surface; - IWineD3DSurface *dst_surface; + struct wined3d_surface *src_surface; + struct wined3d_surface *dst_surface; for (i = 0; i < level_count; ++i) { - IWineD3DTexture_GetSurfaceLevel((IWineD3DTexture *)src_texture, i, &src_surface); - IWineD3DTexture_GetSurfaceLevel((IWineD3DTexture *)dst_texture, i, &dst_surface); - hr = IWineD3DDevice_UpdateSurface(iface, src_surface, NULL, dst_surface, NULL); - IWineD3DSurface_Release(dst_surface); - IWineD3DSurface_Release(src_surface); + src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i)); + dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)); + hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL); if (FAILED(hr)) { WARN("IWineD3DDevice_UpdateSurface failed, hr %#x.\n", hr); @@ -5000,29 +4379,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture(IWineD3DDevice *iface, case WINED3DRTYPE_CUBETEXTURE: { - IWineD3DSurface *src_surface; - IWineD3DSurface *dst_surface; - WINED3DCUBEMAP_FACES face; + struct wined3d_surface *src_surface; + struct wined3d_surface *dst_surface; - for (i = 0; i < level_count; ++i) + for (i = 0; i < level_count * 6; ++i) { - /* Update each cube face. */ - for (face = WINED3DCUBEMAP_FACE_POSITIVE_X; face <= WINED3DCUBEMAP_FACE_NEGATIVE_Z; ++face) + src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i)); + dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)); + hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL); + if (FAILED(hr)) { - hr = IWineD3DCubeTexture_GetCubeMapSurface((IWineD3DCubeTexture *)src_texture, - face, i, &src_surface); - if (FAILED(hr)) ERR("Failed to get src cube surface face %u, level %u, hr %#x.\n", face, i, hr); - hr = IWineD3DCubeTexture_GetCubeMapSurface((IWineD3DCubeTexture *)dst_texture, - face, i, &dst_surface); - if (FAILED(hr)) ERR("Failed to get dst cube surface face %u, level %u, hr %#x.\n", face, i, hr); - hr = IWineD3DDevice_UpdateSurface(iface, src_surface, NULL, dst_surface, NULL); - IWineD3DSurface_Release(dst_surface); - IWineD3DSurface_Release(src_surface); - if (FAILED(hr)) - { - WARN("IWineD3DDevice_UpdateSurface failed, hr %#x.\n", hr); - return hr; - } + WARN("IWineD3DDevice_UpdateSurface failed, hr %#x.\n", hr); + return hr; } } break; @@ -5030,16 +4398,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture(IWineD3DDevice *iface, case WINED3DRTYPE_VOLUMETEXTURE: { - IWineD3DVolume *src_volume; - IWineD3DVolume *dst_volume; - for (i = 0; i < level_count; ++i) { - IWineD3DVolumeTexture_GetVolumeLevel((IWineD3DVolumeTexture *)src_texture, i, &src_volume); - IWineD3DVolumeTexture_GetVolumeLevel((IWineD3DVolumeTexture *)dst_texture, i, &dst_volume); - hr = IWineD3DDeviceImpl_UpdateVolume(iface, src_volume, dst_volume); - IWineD3DVolume_Release(dst_volume); - IWineD3DVolume_Release(src_volume); + hr = IWineD3DDeviceImpl_UpdateVolume(device, + volume_from_resource(wined3d_texture_get_sub_resource(src_texture, i)), + volume_from_resource(wined3d_texture_get_sub_resource(dst_texture, i))); if (FAILED(hr)) { WARN("IWineD3DDeviceImpl_UpdateVolume failed, hr %#x.\n", hr); @@ -5057,78 +4420,93 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture(IWineD3DDevice *iface, return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetFrontBufferData(IWineD3DDevice *iface, - UINT swapchain_idx, IWineD3DSurface *dst_surface) +HRESULT CDECL wined3d_device_get_front_buffer_data(struct wined3d_device *device, + UINT swapchain_idx, struct wined3d_surface *dst_surface) { - IWineD3DSwapChain *swapchain; + struct wined3d_swapchain *swapchain; HRESULT hr; - TRACE("iface %p, swapchain_idx %u, dst_surface %p.\n", iface, swapchain_idx, dst_surface); + TRACE("device %p, swapchain_idx %u, dst_surface %p.\n", device, swapchain_idx, dst_surface); - hr = IWineD3DDeviceImpl_GetSwapChain(iface, swapchain_idx, &swapchain); + hr = wined3d_device_get_swapchain(device, swapchain_idx, &swapchain); if (FAILED(hr)) return hr; - hr = IWineD3DSwapChain_GetFrontBufferData(swapchain, dst_surface); - IWineD3DSwapChain_Release(swapchain); + hr = wined3d_swapchain_get_front_buffer_data(swapchain, dst_surface); + wined3d_swapchain_decref(swapchain); return hr; } -static HRESULT WINAPI IWineD3DDeviceImpl_ValidateDevice(IWineD3DDevice *iface, DWORD* pNumPasses) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DBaseTextureImpl *texture; +HRESULT CDECL wined3d_device_validate_device(struct wined3d_device *device, DWORD *num_passes) +{ + const struct wined3d_state *state = &device->stateBlock->state; + struct wined3d_texture *texture; DWORD i; - TRACE("(%p) : %p\n", This, pNumPasses); + TRACE("device %p, num_passes %p.\n", device, num_passes); for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) { - if (This->stateBlock->state.sampler_states[i][WINED3DSAMP_MINFILTER] == WINED3DTEXF_NONE) + if (state->sampler_states[i][WINED3DSAMP_MINFILTER] == WINED3DTEXF_NONE) { WARN("Sampler state %u has minfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n", i); return WINED3DERR_UNSUPPORTEDTEXTUREFILTER; } - if (This->stateBlock->state.sampler_states[i][WINED3DSAMP_MAGFILTER] == WINED3DTEXF_NONE) + if (state->sampler_states[i][WINED3DSAMP_MAGFILTER] == WINED3DTEXF_NONE) { WARN("Sampler state %u has magfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n", i); return WINED3DERR_UNSUPPORTEDTEXTUREFILTER; } - texture = This->stateBlock->state.textures[i]; - if (!texture || texture->resource.format->Flags & WINED3DFMT_FLAG_FILTERING) continue; + texture = state->textures[i]; + if (!texture || texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING) continue; - if (This->stateBlock->state.sampler_states[i][WINED3DSAMP_MAGFILTER] != WINED3DTEXF_POINT) + if (state->sampler_states[i][WINED3DSAMP_MAGFILTER] != WINED3DTEXF_POINT) { WARN("Non-filterable texture and mag filter enabled on samper %u, returning E_FAIL\n", i); return E_FAIL; } - if (This->stateBlock->state.sampler_states[i][WINED3DSAMP_MINFILTER] != WINED3DTEXF_POINT) + if (state->sampler_states[i][WINED3DSAMP_MINFILTER] != WINED3DTEXF_POINT) { WARN("Non-filterable texture and min filter enabled on samper %u, returning E_FAIL\n", i); return E_FAIL; } - if (This->stateBlock->state.sampler_states[i][WINED3DSAMP_MIPFILTER] != WINED3DTEXF_NONE - && This->stateBlock->state.sampler_states[i][WINED3DSAMP_MIPFILTER] != WINED3DTEXF_POINT) + if (state->sampler_states[i][WINED3DSAMP_MIPFILTER] != WINED3DTEXF_NONE + && state->sampler_states[i][WINED3DSAMP_MIPFILTER] != WINED3DTEXF_POINT) { WARN("Non-filterable texture and mip filter enabled on samper %u, returning E_FAIL\n", i); return E_FAIL; } } + if (state->render_states[WINED3DRS_ZENABLE] || state->render_states[WINED3DRS_ZWRITEENABLE] || + state->render_states[WINED3DRS_STENCILENABLE]) + { + struct wined3d_surface *ds = device->fb.depth_stencil; + struct wined3d_surface *target = device->fb.render_targets[0]; + + if(ds && target + && (ds->resource.width < target->resource.width || ds->resource.height < target->resource.height)) + { + WARN("Depth stencil is smaller than the color buffer, returning D3DERR_CONFLICTINGRENDERSTATE\n"); + return WINED3DERR_CONFLICTINGRENDERSTATE; + } + } + /* return a sensible default */ - *pNumPasses = 1; + *num_passes = 1; TRACE("returning D3D_OK\n"); return WINED3D_OK; } -static void dirtify_p8_texture_samplers(IWineD3DDeviceImpl *device) +static void dirtify_p8_texture_samplers(struct wined3d_device *device) { - int i; + UINT i; for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) { - IWineD3DBaseTextureImpl *texture = device->stateBlock->state.textures[i]; + struct wined3d_texture *texture = device->stateBlock->state.textures[i]; if (texture && (texture->resource.format->id == WINED3DFMT_P8_UINT || texture->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM)) { @@ -5137,147 +4515,172 @@ static void dirtify_p8_texture_samplers(IWineD3DDeviceImpl *device) } } -static HRESULT WINAPI IWineD3DDeviceImpl_SetPaletteEntries(IWineD3DDevice *iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int j; - UINT NewSize; - PALETTEENTRY **palettes; +HRESULT CDECL wined3d_device_set_palette_entries(struct wined3d_device *device, + UINT palette_idx, const PALETTEENTRY *entries) +{ + UINT i; - TRACE("(%p) : PaletteNumber %u\n", This, PaletteNumber); + TRACE("device %p, palette_idx %u, entries %p.\n", device, palette_idx, entries); - if (PaletteNumber >= MAX_PALETTES) { - ERR("(%p) : (%u) Out of range 0-%u, returning Invalid Call\n", This, PaletteNumber, MAX_PALETTES); + if (palette_idx >= MAX_PALETTES) + { + WARN("Invalid palette index %u.\n", palette_idx); return WINED3DERR_INVALIDCALL; } - if (PaletteNumber >= This->NumberOfPalettes) { - NewSize = This->NumberOfPalettes; - do { - NewSize *= 2; - } while(PaletteNumber >= NewSize); - palettes = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->palettes, sizeof(PALETTEENTRY*) * NewSize); - if (!palettes) { + if (palette_idx >= device->palette_count) + { + UINT new_size = device->palette_count; + PALETTEENTRY **palettes; + + do + { + new_size *= 2; + } while (palette_idx >= new_size); + palettes = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, device->palettes, sizeof(*palettes) * new_size); + if (!palettes) + { ERR("Out of memory!\n"); return E_OUTOFMEMORY; } - This->palettes = palettes; - This->NumberOfPalettes = NewSize; + device->palettes = palettes; + device->palette_count = new_size; } - if (!This->palettes[PaletteNumber]) { - This->palettes[PaletteNumber] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256); - if (!This->palettes[PaletteNumber]) { + if (!device->palettes[palette_idx]) + { + device->palettes[palette_idx] = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256); + if (!device->palettes[palette_idx]) + { ERR("Out of memory!\n"); return E_OUTOFMEMORY; } } - for (j = 0; j < 256; ++j) { - This->palettes[PaletteNumber][j].peRed = pEntries[j].peRed; - This->palettes[PaletteNumber][j].peGreen = pEntries[j].peGreen; - This->palettes[PaletteNumber][j].peBlue = pEntries[j].peBlue; - This->palettes[PaletteNumber][j].peFlags = pEntries[j].peFlags; - } - if (PaletteNumber == This->currentPalette) dirtify_p8_texture_samplers(This); - TRACE("(%p) : returning\n", This); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetPaletteEntries(IWineD3DDevice *iface, UINT PaletteNumber, PALETTEENTRY* pEntries) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int j; - TRACE("(%p) : PaletteNumber %u\n", This, PaletteNumber); - if (PaletteNumber >= This->NumberOfPalettes || !This->palettes[PaletteNumber]) { - /* What happens in such situation isn't documented; Native seems to silently abort - on such conditions. Return Invalid Call. */ - ERR("(%p) : (%u) Nonexistent palette. NumberOfPalettes %u\n", This, PaletteNumber, This->NumberOfPalettes); - return WINED3DERR_INVALIDCALL; - } - for (j = 0; j < 256; ++j) { - pEntries[j].peRed = This->palettes[PaletteNumber][j].peRed; - pEntries[j].peGreen = This->palettes[PaletteNumber][j].peGreen; - pEntries[j].peBlue = This->palettes[PaletteNumber][j].peBlue; - pEntries[j].peFlags = This->palettes[PaletteNumber][j].peFlags; - } - TRACE("(%p) : returning\n", This); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_SetCurrentTexturePalette(IWineD3DDevice *iface, UINT PaletteNumber) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - TRACE("(%p) : PaletteNumber %u\n", This, PaletteNumber); - /* Native appears to silently abort on attempt to make an uninitialized palette current and render. - (tested with reference rasterizer). Return Invalid Call. */ - if (PaletteNumber >= This->NumberOfPalettes || !This->palettes[PaletteNumber]) { - ERR("(%p) : (%u) Nonexistent palette. NumberOfPalettes %u\n", This, PaletteNumber, This->NumberOfPalettes); - return WINED3DERR_INVALIDCALL; - } - /*TODO: stateblocks */ - if (This->currentPalette != PaletteNumber) { - This->currentPalette = PaletteNumber; - dirtify_p8_texture_samplers(This); - } - TRACE("(%p) : returning\n", This); - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DDeviceImpl_GetCurrentTexturePalette(IWineD3DDevice *iface, UINT* PaletteNumber) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - - if (!PaletteNumber) + for (i = 0; i < 256; ++i) { - WARN("(%p) : returning Invalid Call\n", This); - return WINED3DERR_INVALIDCALL; + device->palettes[palette_idx][i].peRed = entries[i].peRed; + device->palettes[palette_idx][i].peGreen = entries[i].peGreen; + device->palettes[palette_idx][i].peBlue = entries[i].peBlue; + device->palettes[palette_idx][i].peFlags = entries[i].peFlags; } - /*TODO: stateblocks */ - *PaletteNumber = This->currentPalette; - TRACE("(%p) : returning %u\n", This, *PaletteNumber); + + if (palette_idx == device->currentPalette) + dirtify_p8_texture_samplers(device); + return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetSoftwareVertexProcessing(IWineD3DDevice *iface, BOOL bSoftware) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_get_palette_entries(struct wined3d_device *device, + UINT palette_idx, PALETTEENTRY *entries) +{ + UINT i; + + TRACE("device %p, palette_idx %u, entries %p.\n", device, palette_idx, entries); + + if (palette_idx >= device->palette_count || !device->palettes[palette_idx]) + { + /* What happens in such situation isn't documented; Native seems to + * silently abort on such conditions. */ + WARN("Invalid palette index %u.\n", palette_idx); + return WINED3DERR_INVALIDCALL; + } + + for (i = 0; i < 256; ++i) + { + entries[i].peRed = device->palettes[palette_idx][i].peRed; + entries[i].peGreen = device->palettes[palette_idx][i].peGreen; + entries[i].peBlue = device->palettes[palette_idx][i].peBlue; + entries[i].peFlags = device->palettes[palette_idx][i].peFlags; + } + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_current_texture_palette(struct wined3d_device *device, UINT palette_idx) +{ + TRACE("device %p, palette_idx %u.\n", device, palette_idx); + + /* Native appears to silently abort on attempt to make an uninitialized + * palette current and render. (tested with reference rasterizer). */ + if (palette_idx >= device->palette_count || !device->palettes[palette_idx]) + { + WARN("Invalid palette index %u.\n", palette_idx); + return WINED3DERR_INVALIDCALL; + } + + /* TODO: stateblocks? */ + if (device->currentPalette != palette_idx) + { + device->currentPalette = palette_idx; + dirtify_p8_texture_samplers(device); + } + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_get_current_texture_palette(struct wined3d_device *device, UINT *palette_idx) +{ + TRACE("device %p, palette_idx %p.\n", device, palette_idx); + + if (!palette_idx) + return WINED3DERR_INVALIDCALL; + + *palette_idx = device->currentPalette; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *device, BOOL software) +{ static BOOL warned; + + TRACE("device %p, software %#x.\n", device, software); + if (!warned) { - FIXME("(%p) : stub\n", This); + FIXME("device %p, software %#x stub!\n", device, software); warned = TRUE; } - This->softwareVertexProcessing = bSoftware; + device->softwareVertexProcessing = software; + return WINED3D_OK; } - -static BOOL WINAPI IWineD3DDeviceImpl_GetSoftwareVertexProcessing(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +BOOL CDECL wined3d_device_get_software_vertex_processing(struct wined3d_device *device) +{ static BOOL warned; + + TRACE("device %p.\n", device); + if (!warned) { - FIXME("(%p) : stub\n", This); + TRACE("device %p stub!\n", device); warned = TRUE; } - return This->softwareVertexProcessing; + + return device->softwareVertexProcessing; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetRasterStatus(IWineD3DDevice *iface, +HRESULT CDECL wined3d_device_get_raster_status(struct wined3d_device *device, UINT swapchain_idx, WINED3DRASTER_STATUS *raster_status) { - IWineD3DSwapChain *swapchain; + struct wined3d_swapchain *swapchain; HRESULT hr; - TRACE("iface %p, swapchain_idx %u, raster_status %p.\n", - iface, swapchain_idx, raster_status); + TRACE("device %p, swapchain_idx %u, raster_status %p.\n", + device, swapchain_idx, raster_status); - hr = IWineD3DDeviceImpl_GetSwapChain(iface, swapchain_idx, &swapchain); + hr = wined3d_device_get_swapchain(device, swapchain_idx, &swapchain); if (FAILED(hr)) { WARN("Failed to get swapchain %u, hr %#x.\n", swapchain_idx, hr); return hr; } - hr = IWineD3DSwapChain_GetRasterStatus(swapchain, raster_status); - IWineD3DSwapChain_Release(swapchain); + hr = wined3d_swapchain_get_raster_status(swapchain, raster_status); + wined3d_swapchain_decref(swapchain); if (FAILED(hr)) { WARN("Failed to get raster status, hr %#x.\n", hr); @@ -5287,37 +4690,43 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRasterStatus(IWineD3DDevice *iface, return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetNPatchMode(IWineD3DDevice *iface, float nSegments) +HRESULT CDECL wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments) { static BOOL warned; - if(nSegments != 0.0f) { + + TRACE("device %p, segments %.8e.\n", device, segments); + + if (segments != 0.0f) + { if (!warned) { - FIXME("iface %p, nSegments %.8e stub!\n", iface, nSegments); + FIXME("device %p, segments %.8e stub!\n", device, segments); warned = TRUE; } } + return WINED3D_OK; } -static float WINAPI IWineD3DDeviceImpl_GetNPatchMode(IWineD3DDevice *iface) +float CDECL wined3d_device_get_npatch_mode(struct wined3d_device *device) { static BOOL warned; + + TRACE("device %p.\n", device); + if (!warned) { - FIXME("iface %p stub!\n", iface); + FIXME("device %p stub!\n", device); warned = TRUE; } + return 0.0f; } -static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, - IWineD3DSurface *src_surface, const RECT *src_rect, - IWineD3DSurface *dst_surface, const POINT *dst_point) +HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, + struct wined3d_surface *src_surface, const RECT *src_rect, + struct wined3d_surface *dst_surface, const POINT *dst_point) { - IWineD3DSurfaceImpl *src_impl = (IWineD3DSurfaceImpl *)src_surface; - IWineD3DSurfaceImpl *dst_impl = (IWineD3DSurfaceImpl *)dst_surface; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; const struct wined3d_format *src_format; const struct wined3d_format *dst_format; const struct wined3d_gl_info *gl_info; @@ -5330,19 +4739,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, DWORD sampler; struct wined3d_format format; - TRACE("iface %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n", - iface, src_surface, wine_dbgstr_rect(src_rect), + TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n", + device, src_surface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_point(dst_point)); - if (src_impl->resource.pool != WINED3DPOOL_SYSTEMMEM || dst_impl->resource.pool != WINED3DPOOL_DEFAULT) + if (src_surface->resource.pool != WINED3DPOOL_SYSTEMMEM || dst_surface->resource.pool != WINED3DPOOL_DEFAULT) { WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning WINED3DERR_INVALIDCALL\n", src_surface, dst_surface); return WINED3DERR_INVALIDCALL; } - src_format = src_impl->resource.format; - dst_format = dst_impl->resource.format; + src_format = src_surface->resource.format; + dst_format = dst_surface->resource.format; if (src_format->id != dst_format->id) { @@ -5357,11 +4766,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, * surface to the destination's sysmem copy. If surface conversion is * needed, use BltFast instead to copy in sysmem and use regular surface * loading. */ - d3dfmt_get_conv(dst_impl, FALSE, TRUE, &format, &convert); + d3dfmt_get_conv(dst_surface, FALSE, TRUE, &format, &convert); if (convert != NO_CONVERSION || format.convert) - return IWineD3DSurface_BltFast(dst_surface, dst_x, dst_y, src_surface, src_rect, 0); + return wined3d_surface_bltfast(dst_surface, dst_x, dst_y, src_surface, src_rect, 0); - context = context_acquire(This, NULL); + context = context_acquire(device, NULL); gl_info = context->gl_info; ENTER_GL(); @@ -5370,20 +4779,20 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, LEAVE_GL(); /* Make sure the surface is loaded and up to date */ - surface_internal_preload(dst_impl, SRGB_RGB); - IWineD3DSurface_BindTexture(dst_surface, FALSE); + surface_internal_preload(dst_surface, SRGB_RGB); + surface_bind(dst_surface, gl_info, FALSE); - src_w = src_impl->currentDesc.Width; - src_h = src_impl->currentDesc.Height; + src_w = src_surface->resource.width; + src_h = src_surface->resource.height; update_w = src_rect ? src_rect->right - src_rect->left : src_w; update_h = src_rect ? src_rect->bottom - src_rect->top : src_h; - data = IWineD3DSurface_GetData(src_surface); + data = src_surface->resource.allocatedMemory; if (!data) ERR("Source surface has no allocated memory, but should be a sysmem surface.\n"); ENTER_GL(); - if (dst_format->Flags & WINED3DFMT_FLAG_COMPRESSED) + if (dst_format->flags & WINED3DFMT_FLAG_COMPRESSED) { UINT row_length = wined3d_format_calculate_size(src_format, 1, update_w, 1); UINT row_count = (update_h + src_format->block_height - 1) / src_format->block_height; @@ -5396,12 +4805,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, } TRACE("glCompressedTexSubImage2DARB, target %#x, level %d, x %d, y %d, w %d, h %d, " - "format %#x, image_size %#x, data %p.\n", dst_impl->texture_target, dst_impl->texture_level, + "format %#x, image_size %#x, data %p.\n", dst_surface->texture_target, dst_surface->texture_level, dst_x, dst_y, update_w, update_h, dst_format->glFormat, row_count * row_length, data); if (row_length == src_pitch) { - GL_EXTCALL(glCompressedTexSubImage2DARB(dst_impl->texture_target, dst_impl->texture_level, + GL_EXTCALL(glCompressedTexSubImage2DARB(dst_surface->texture_target, dst_surface->texture_level, dst_x, dst_y, update_w, update_h, dst_format->glInternal, row_count * row_length, data)); } else @@ -5412,7 +4821,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, * can't use the unpack row length like below. */ for (row = 0, y = dst_y; row < row_count; ++row) { - GL_EXTCALL(glCompressedTexSubImage2DARB(dst_impl->texture_target, dst_impl->texture_level, + GL_EXTCALL(glCompressedTexSubImage2DARB(dst_surface->texture_target, dst_surface->texture_level, dst_x, y, update_w, src_format->block_height, dst_format->glInternal, row_length, data)); y += src_format->block_height; data += src_pitch; @@ -5429,11 +4838,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, } TRACE("glTexSubImage2D, target %#x, level %d, x %d, y %d, w %d, h %d, format %#x, type %#x, data %p.\n", - dst_impl->texture_target, dst_impl->texture_level, dst_x, dst_y, + dst_surface->texture_target, dst_surface->texture_level, dst_x, dst_y, update_w, update_h, dst_format->glFormat, dst_format->glType, data); glPixelStorei(GL_UNPACK_ROW_LENGTH, src_w); - glTexSubImage2D(dst_impl->texture_target, dst_impl->texture_level, dst_x, dst_y, + glTexSubImage2D(dst_surface->texture_target, dst_surface->texture_level, dst_x, dst_y, update_w, update_h, dst_format->glFormat, dst_format->glType, data); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); checkGLcall("glTexSubImage2D"); @@ -5442,51 +4851,61 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, LEAVE_GL(); context_release(context); - surface_modify_location(dst_impl, SFLAG_INTEXTURE, TRUE); - sampler = This->rev_tex_unit_map[0]; + surface_modify_location(dst_surface, SFLAG_INTEXTURE, TRUE); + sampler = device->rev_tex_unit_map[0]; if (sampler != WINED3D_UNMAPPED_STAGE) { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(sampler)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(sampler)); } return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawRectPatch(IWineD3DDevice *iface, UINT Handle, CONST float* pNumSegs, CONST WINED3DRECTPATCH_INFO* pRectPatchInfo) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; +HRESULT CDECL wined3d_device_draw_rect_patch(struct wined3d_device *device, UINT handle, + const float *num_segs, const WINED3DRECTPATCH_INFO *rect_patch_info) +{ struct WineD3DRectPatch *patch; GLenum old_primitive_type; unsigned int i; struct list *e; BOOL found; - TRACE("(%p) Handle(%d) noSegs(%p) rectpatch(%p)\n", This, Handle, pNumSegs, pRectPatchInfo); - if(!(Handle || pRectPatchInfo)) { + TRACE("device %p, handle %#x, num_segs %p, rect_patch_info %p.\n", + device, handle, num_segs, rect_patch_info); + + if (!(handle || rect_patch_info)) + { /* TODO: Write a test for the return value, thus the FIXME */ - FIXME("Both Handle and pRectPatchInfo are NULL\n"); + FIXME("Both handle and rect_patch_info are NULL.\n"); return WINED3DERR_INVALIDCALL; } - if(Handle) { - i = PATCHMAP_HASHFUNC(Handle); + if (handle) + { + i = PATCHMAP_HASHFUNC(handle); found = FALSE; - LIST_FOR_EACH(e, &This->patches[i]) { + LIST_FOR_EACH(e, &device->patches[i]) + { patch = LIST_ENTRY(e, struct WineD3DRectPatch, entry); - if(patch->Handle == Handle) { + if (patch->Handle == handle) + { found = TRUE; break; } } - if(!found) { + if (!found) + { TRACE("Patch does not exist. Creating a new one\n"); patch = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*patch)); - patch->Handle = Handle; - list_add_head(&This->patches[i], &patch->entry); + patch->Handle = handle; + list_add_head(&device->patches[i], &patch->entry); } else { TRACE("Found existing patch %p\n", patch); } - } else { + } + else + { /* Since opengl does not load tesselated vertex attributes into numbered vertex * attributes we have to tesselate, read back, and draw. This needs a patch * management structure instance. Create one. @@ -5498,68 +4917,73 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawRectPatch(IWineD3DDevice *iface, UI patch = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*patch)); } - if (pNumSegs[0] != patch->numSegs[0] || pNumSegs[1] != patch->numSegs[1] - || pNumSegs[2] != patch->numSegs[2] || pNumSegs[3] != patch->numSegs[3] - || (pRectPatchInfo && memcmp(pRectPatchInfo, &patch->RectPatchInfo, sizeof(*pRectPatchInfo)))) + if (num_segs[0] != patch->numSegs[0] || num_segs[1] != patch->numSegs[1] + || num_segs[2] != patch->numSegs[2] || num_segs[3] != patch->numSegs[3] + || (rect_patch_info && memcmp(rect_patch_info, &patch->RectPatchInfo, sizeof(*rect_patch_info)))) { HRESULT hr; TRACE("Tesselation density or patch info changed, retesselating\n"); - if(pRectPatchInfo) { - patch->RectPatchInfo = *pRectPatchInfo; - } - patch->numSegs[0] = pNumSegs[0]; - patch->numSegs[1] = pNumSegs[1]; - patch->numSegs[2] = pNumSegs[2]; - patch->numSegs[3] = pNumSegs[3]; + if (rect_patch_info) + patch->RectPatchInfo = *rect_patch_info; - hr = tesselate_rectpatch(This, patch); - if(FAILED(hr)) { - WARN("Patch tesselation failed\n"); + patch->numSegs[0] = num_segs[0]; + patch->numSegs[1] = num_segs[1]; + patch->numSegs[2] = num_segs[2]; + patch->numSegs[3] = num_segs[3]; + + hr = tesselate_rectpatch(device, patch); + if (FAILED(hr)) + { + WARN("Patch tesselation failed.\n"); /* Do not release the handle to store the params of the patch */ - if(!Handle) { + if (!handle) HeapFree(GetProcessHeap(), 0, patch); - } + return hr; } } - This->currentPatch = patch; - old_primitive_type = This->stateBlock->state.gl_primitive_type; - This->stateBlock->state.gl_primitive_type = GL_TRIANGLES; - IWineD3DDevice_DrawPrimitiveStrided(iface, patch->numSegs[0] * patch->numSegs[1] * 2 * 3, &patch->strided); - This->stateBlock->state.gl_primitive_type = old_primitive_type; - This->currentPatch = NULL; + device->currentPatch = patch; + old_primitive_type = device->stateBlock->state.gl_primitive_type; + device->stateBlock->state.gl_primitive_type = GL_TRIANGLES; + wined3d_device_draw_primitive_strided(device, patch->numSegs[0] * patch->numSegs[1] * 2 * 3, &patch->strided); + device->stateBlock->state.gl_primitive_type = old_primitive_type; + device->currentPatch = NULL; /* Destroy uncached patches */ - if(!Handle) { + if (!handle) + { HeapFree(GetProcessHeap(), 0, patch->mem); HeapFree(GetProcessHeap(), 0, patch); } return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DrawTriPatch(IWineD3DDevice *iface, - UINT handle, const float *segment_count, const WINED3DTRIPATCH_INFO *patch_info) +HRESULT CDECL wined3d_device_draw_tri_patch(struct wined3d_device *device, UINT handle, + const float *segment_count, const WINED3DTRIPATCH_INFO *patch_info) { - FIXME("iface %p, handle %#x, segment_count %p, patch_info %p stub!\n", - iface, handle, segment_count, patch_info); + FIXME("device %p, handle %#x, segment_count %p, patch_info %p stub!\n", + device, handle, segment_count, patch_info); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_DeletePatch(IWineD3DDevice *iface, UINT Handle) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - int i; +HRESULT CDECL wined3d_device_delete_patch(struct wined3d_device *device, UINT handle) +{ struct WineD3DRectPatch *patch; struct list *e; - TRACE("(%p) Handle(%d)\n", This, Handle); + int i; - i = PATCHMAP_HASHFUNC(Handle); - LIST_FOR_EACH(e, &This->patches[i]) { + TRACE("device %p, handle %#x.\n", device, handle); + + i = PATCHMAP_HASHFUNC(handle); + LIST_FOR_EACH(e, &device->patches[i]) + { patch = LIST_ENTRY(e, struct WineD3DRectPatch, entry); - if(patch->Handle == Handle) { + if (patch->Handle == handle) + { TRACE("Deleting patch %p\n", patch); list_remove(&patch->entry); HeapFree(GetProcessHeap(), 0, patch->mem); @@ -5574,59 +4998,45 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DeletePatch(IWineD3DDevice *iface, UINT } /* Do not call while under the GL lock. */ -static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, - IWineD3DSurface *surface, const RECT *rect, const WINED3DCOLORVALUE *color) +HRESULT CDECL wined3d_device_color_fill(struct wined3d_device *device, + struct wined3d_surface *surface, const RECT *rect, const WINED3DCOLORVALUE *color) { - IWineD3DSurfaceImpl *s = (IWineD3DSurfaceImpl *)surface; - - TRACE("iface %p, surface %p, rect %s, color {%.8e, %.8e, %.8e, %.8e}.\n", - iface, surface, wine_dbgstr_rect(rect), + TRACE("device %p, surface %p, rect %s, color {%.8e, %.8e, %.8e, %.8e}.\n", + device, surface, wine_dbgstr_rect(rect), color->r, color->g, color->b, color->a); - if (s->resource.pool != WINED3DPOOL_DEFAULT && s->resource.pool != WINED3DPOOL_SYSTEMMEM) + if (surface->resource.pool != WINED3DPOOL_DEFAULT && surface->resource.pool != WINED3DPOOL_SYSTEMMEM) { FIXME("call to colorfill with non WINED3DPOOL_DEFAULT or WINED3DPOOL_SYSTEMMEM surface\n"); return WINED3DERR_INVALIDCALL; } - return surface_color_fill(s, rect, color); + return surface_color_fill(surface, rect, color); } /* Do not call while under the GL lock. */ -static void WINAPI IWineD3DDeviceImpl_ClearRendertargetView(IWineD3DDevice *iface, - IWineD3DRendertargetView *rendertarget_view, const WINED3DCOLORVALUE *color) +void CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device, + struct wined3d_rendertarget_view *rendertarget_view, const WINED3DCOLORVALUE *color) { - IWineD3DResource *resource; + struct wined3d_resource *resource; HRESULT hr; - hr = IWineD3DRendertargetView_GetResource(rendertarget_view, &resource); - if (FAILED(hr)) - { - ERR("Failed to get resource, hr %#x\n", hr); - return; - } - - if (IWineD3DResource_GetType(resource) != WINED3DRTYPE_SURFACE) + resource = rendertarget_view->resource; + if (resource->resourceType != WINED3DRTYPE_SURFACE) { FIXME("Only supported on surface resources\n"); - IWineD3DResource_Release(resource); return; } - hr = surface_color_fill((IWineD3DSurfaceImpl *)resource, NULL, color); + hr = surface_color_fill(surface_from_resource(resource), NULL, color); if (FAILED(hr)) ERR("Color fill failed, hr %#x.\n", hr); - - IWineD3DResource_Release(resource); } -/* rendertarget and depth stencil functions */ -static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice *iface, - DWORD render_target_idx, IWineD3DSurface **render_target) +HRESULT CDECL wined3d_device_get_render_target(struct wined3d_device *device, + UINT render_target_idx, struct wined3d_surface **render_target) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; - - TRACE("iface %p, render_target_idx %u, render_target %p.\n", - iface, render_target_idx, render_target); + TRACE("device %p, render_target_idx %u, render_target %p.\n", + device, render_target_idx, render_target); if (render_target_idx >= device->adapter->gl_info.limits.buffers) { @@ -5634,36 +5044,37 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice *iface, return WINED3DERR_INVALIDCALL; } - *render_target = (IWineD3DSurface *)device->render_targets[render_target_idx]; - if (*render_target) IWineD3DSurface_AddRef(*render_target); + *render_target = device->fb.render_targets[render_target_idx]; + if (*render_target) + wined3d_surface_incref(*render_target); TRACE("Returning render target %p.\n", *render_target); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetDepthStencilSurface(IWineD3DDevice *iface, IWineD3DSurface **depth_stencil) +HRESULT CDECL wined3d_device_get_depth_stencil(struct wined3d_device *device, struct wined3d_surface **depth_stencil) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; + TRACE("device %p, depth_stencil %p.\n", device, depth_stencil); - TRACE("iface %p, depth_stencil %p.\n", iface, depth_stencil); - - *depth_stencil = (IWineD3DSurface *)device->depth_stencil; + *depth_stencil = device->fb.depth_stencil; TRACE("Returning depth/stencil surface %p.\n", *depth_stencil); - if (!*depth_stencil) return WINED3DERR_NOTFOUND; - IWineD3DSurface_AddRef(*depth_stencil); + + if (!*depth_stencil) + return WINED3DERR_NOTFOUND; + + wined3d_surface_incref(*depth_stencil); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, - DWORD render_target_idx, IWineD3DSurface *render_target, BOOL set_viewport) +HRESULT CDECL wined3d_device_set_render_target(struct wined3d_device *device, + UINT render_target_idx, struct wined3d_surface *render_target, BOOL set_viewport) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; - IWineD3DSurfaceImpl *prev; + struct wined3d_surface *prev; - TRACE("iface %p, render_target_idx %u, render_target %p, set_viewport %#x.\n", - iface, render_target_idx, render_target, set_viewport); + TRACE("device %p, render_target_idx %u, render_target %p, set_viewport %#x.\n", + device, render_target_idx, render_target, set_viewport); if (render_target_idx >= device->adapter->gl_info.limits.buffers) { @@ -5671,8 +5082,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, return WINED3DERR_INVALIDCALL; } - prev = device->render_targets[render_target_idx]; - if (render_target == (IWineD3DSurface *)prev) + prev = device->fb.render_targets[render_target_idx]; + if (render_target == prev) { TRACE("Trying to do a NOP SetRenderTarget operation.\n"); return WINED3D_OK; @@ -5685,17 +5096,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, return WINED3DERR_INVALIDCALL; } - if (render_target && !(((IWineD3DSurfaceImpl *)render_target)->resource.usage & WINED3DUSAGE_RENDERTARGET)) + if (render_target && !(render_target->resource.usage & WINED3DUSAGE_RENDERTARGET)) { FIXME("Surface %p doesn't have render target usage.\n", render_target); return WINED3DERR_INVALIDCALL; } - if (render_target) IWineD3DSurface_AddRef(render_target); - device->render_targets[render_target_idx] = (IWineD3DSurfaceImpl *)render_target; + if (render_target) + wined3d_surface_incref(render_target); + device->fb.render_targets[render_target_idx] = render_target; /* Release after the assignment, to prevent device_resource_released() * from seeing the surface as still in use. */ - if (prev) IWineD3DSurface_Release((IWineD3DSurface *)prev); + if (prev) + wined3d_surface_decref(prev); /* Render target 0 is special. */ if (!render_target_idx && set_viewport) @@ -5703,8 +5116,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, /* Set the viewport and scissor rectangles, if requested. Tests show * that stateblock recording is ignored, the change goes directly * into the primary stateblock. */ - device->stateBlock->state.viewport.Height = device->render_targets[0]->currentDesc.Height; - device->stateBlock->state.viewport.Width = device->render_targets[0]->currentDesc.Width; + device->stateBlock->state.viewport.Height = device->fb.render_targets[0]->resource.height; + device->stateBlock->state.viewport.Width = device->fb.render_targets[0]->resource.width; device->stateBlock->state.viewport.X = 0; device->stateBlock->state.viewport.Y = 0; device->stateBlock->state.viewport.MaxZ = 1.0f; @@ -5721,175 +5134,172 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface, return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *iface, IWineD3DSurface *depth_stencil) +HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, struct wined3d_surface *depth_stencil) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DSurfaceImpl *tmp; + struct wined3d_surface *prev = device->fb.depth_stencil; - TRACE("device %p, depth_stencil %p, old depth_stencil %p.\n", This, depth_stencil, This->depth_stencil); + TRACE("device %p, depth_stencil %p, old depth_stencil %p.\n", + device, depth_stencil, prev); - if (This->depth_stencil == (IWineD3DSurfaceImpl *)depth_stencil) + if (prev == depth_stencil) { TRACE("Trying to do a NOP SetRenderTarget operation.\n"); return WINED3D_OK; } - if (This->depth_stencil) + if (prev) { - if (((IWineD3DSwapChainImpl *)This->swapchains[0])->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL - || This->depth_stencil->Flags & SFLAG_DISCARD) + if (device->swapchains[0]->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL + || prev->flags & SFLAG_DISCARD) { - surface_modify_ds_location(This->depth_stencil, SFLAG_DS_DISCARDED, - This->depth_stencil->currentDesc.Width, - This->depth_stencil->currentDesc.Height); - if (This->depth_stencil == This->onscreen_depth_stencil) + surface_modify_ds_location(prev, SFLAG_DS_DISCARDED, + prev->resource.width, prev->resource.height); + if (prev == device->onscreen_depth_stencil) { - IWineD3DSurface_Release((IWineD3DSurface *)This->onscreen_depth_stencil); - This->onscreen_depth_stencil = NULL; + wined3d_surface_decref(device->onscreen_depth_stencil); + device->onscreen_depth_stencil = NULL; } } } - tmp = This->depth_stencil; - This->depth_stencil = (IWineD3DSurfaceImpl *)depth_stencil; - if (This->depth_stencil) IWineD3DSurface_AddRef((IWineD3DSurface *)This->depth_stencil); - if (tmp) IWineD3DSurface_Release((IWineD3DSurface *)tmp); + device->fb.depth_stencil = depth_stencil; + if (depth_stencil) + wined3d_surface_incref(depth_stencil); + if (prev) + wined3d_surface_decref(prev); - if ((!tmp && depth_stencil) || (!depth_stencil && tmp)) + if (!prev != !depth_stencil) { /* Swapping NULL / non NULL depth stencil affects the depth and tests */ - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZENABLE)); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_STENCILENABLE)); - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_STENCILWRITEMASK)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_ZENABLE)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_STENCILENABLE)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_STENCILWRITEMASK)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_DEPTHBIAS)); + } + else if (prev && prev->resource.format->depth_size != depth_stencil->resource.format->depth_size) + { + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_DEPTHBIAS)); } return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice *iface, - UINT XHotSpot, UINT YHotSpot, IWineD3DSurface *cursor_image) +HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device, + UINT x_hotspot, UINT y_hotspot, struct wined3d_surface *cursor_image) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - IWineD3DSurfaceImpl *s = (IWineD3DSurfaceImpl *)cursor_image; WINED3DLOCKED_RECT lockedRect; - TRACE("iface %p, hotspot_x %u, hotspot_y %u, cursor_image %p.\n", - iface, XHotSpot, YHotSpot, cursor_image); + TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n", + device, x_hotspot, y_hotspot, cursor_image); /* some basic validation checks */ - if (This->cursorTexture) + if (device->cursorTexture) { - struct wined3d_context *context = context_acquire(This, NULL); + struct wined3d_context *context = context_acquire(device, NULL); ENTER_GL(); - glDeleteTextures(1, &This->cursorTexture); + glDeleteTextures(1, &device->cursorTexture); LEAVE_GL(); context_release(context); - This->cursorTexture = 0; + device->cursorTexture = 0; } - if ((s->currentDesc.Width == 32) && (s->currentDesc.Height == 32)) - This->haveHardwareCursor = TRUE; - else - This->haveHardwareCursor = FALSE; - if (cursor_image) { WINED3DLOCKED_RECT rect; /* MSDN: Cursor must be A8R8G8B8 */ - if (s->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM) + if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM) { WARN("surface %p has an invalid format.\n", cursor_image); return WINED3DERR_INVALIDCALL; } /* MSDN: Cursor must be smaller than the display mode */ - if (s->currentDesc.Width > This->ddraw_width - || s->currentDesc.Height > This->ddraw_height) + if (cursor_image->resource.width > device->ddraw_width + || cursor_image->resource.height > device->ddraw_height) { WARN("Surface %p dimensions are %ux%u, but screen dimensions are %ux%u.\n", - s, s->currentDesc.Width, s->currentDesc.Height, This->ddraw_width, This->ddraw_height); + cursor_image, cursor_image->resource.width, cursor_image->resource.height, + device->ddraw_width, device->ddraw_height); return WINED3DERR_INVALIDCALL; } - if (!This->haveHardwareCursor) { - /* TODO: MSDN: Cursor sizes must be a power of 2 */ + /* TODO: MSDN: Cursor sizes must be a power of 2 */ - /* Do not store the surface's pointer because the application may - * release it after setting the cursor image. Windows doesn't - * addref the set surface, so we can't do this either without - * creating circular refcount dependencies. Copy out the gl texture - * instead. - */ - This->cursorWidth = s->currentDesc.Width; - This->cursorHeight = s->currentDesc.Height; - if (SUCCEEDED(IWineD3DSurface_LockRect(cursor_image, &rect, NULL, WINED3DLOCK_READONLY))) + /* Do not store the surface's pointer because the application may + * release it after setting the cursor image. Windows doesn't + * addref the set surface, so we can't do this either without + * creating circular refcount dependencies. Copy out the gl texture + * instead. */ + device->cursorWidth = cursor_image->resource.width; + device->cursorHeight = cursor_image->resource.height; + if (SUCCEEDED(wined3d_surface_map(cursor_image, &rect, NULL, WINED3DLOCK_READONLY))) + { + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_format *format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM); + struct wined3d_context *context; + char *mem, *bits = rect.pBits; + GLint intfmt = format->glInternal; + GLint gl_format = format->glFormat; + GLint type = format->glType; + INT height = device->cursorHeight; + INT width = device->cursorWidth; + INT bpp = format->byte_count; + DWORD sampler; + INT i; + + /* Reformat the texture memory (pitch and width can be + * different) */ + mem = HeapAlloc(GetProcessHeap(), 0, width * height * bpp); + for(i = 0; i < height; i++) + memcpy(&mem[width * bpp * i], &bits[rect.Pitch * i], width * bpp); + wined3d_surface_unmap(cursor_image); + + context = context_acquire(device, NULL); + + ENTER_GL(); + + if (gl_info->supported[APPLE_CLIENT_STORAGE]) { - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM); - struct wined3d_context *context; - char *mem, *bits = rect.pBits; - GLint intfmt = format->glInternal; - GLint gl_format = format->glFormat; - GLint type = format->glType; - INT height = This->cursorHeight; - INT width = This->cursorWidth; - INT bpp = format->byte_count; - DWORD sampler; - INT i; - - /* Reformat the texture memory (pitch and width can be - * different) */ - mem = HeapAlloc(GetProcessHeap(), 0, width * height * bpp); - for(i = 0; i < height; i++) - memcpy(&mem[width * bpp * i], &bits[rect.Pitch * i], width * bpp); - IWineD3DSurface_UnlockRect(cursor_image); - - context = context_acquire(This, NULL); - - ENTER_GL(); - - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); - } - - /* Make sure that a proper texture unit is selected */ - GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); - checkGLcall("glActiveTextureARB"); - sampler = This->rev_tex_unit_map[0]; - if (sampler != WINED3D_UNMAPPED_STAGE) - { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(sampler)); - } - /* Create a new cursor texture */ - glGenTextures(1, &This->cursorTexture); - checkGLcall("glGenTextures"); - glBindTexture(GL_TEXTURE_2D, This->cursorTexture); - checkGLcall("glBindTexture"); - /* Copy the bitmap memory into the cursor texture */ - glTexImage2D(GL_TEXTURE_2D, 0, intfmt, width, height, 0, gl_format, type, mem); - HeapFree(GetProcessHeap(), 0, mem); - checkGLcall("glTexImage2D"); - - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); - } - - LEAVE_GL(); - - context_release(context); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); + checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); } - else + + /* Make sure that a proper texture unit is selected */ + GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); + checkGLcall("glActiveTextureARB"); + sampler = device->rev_tex_unit_map[0]; + if (sampler != WINED3D_UNMAPPED_STAGE) { - FIXME("A cursor texture was not returned.\n"); - This->cursorTexture = 0; + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(sampler)); } + /* Create a new cursor texture */ + glGenTextures(1, &device->cursorTexture); + checkGLcall("glGenTextures"); + glBindTexture(GL_TEXTURE_2D, device->cursorTexture); + checkGLcall("glBindTexture"); + /* Copy the bitmap memory into the cursor texture */ + glTexImage2D(GL_TEXTURE_2D, 0, intfmt, width, height, 0, gl_format, type, mem); + checkGLcall("glTexImage2D"); + HeapFree(GetProcessHeap(), 0, mem); + + if (gl_info->supported[APPLE_CLIENT_STORAGE]) + { + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); + checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); + } + + LEAVE_GL(); + + context_release(context); } else + { + FIXME("A cursor texture was not returned.\n"); + device->cursorTexture = 0; + } + + if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32) { /* Draw a hardware cursor */ ICONINFO cursorInfo; @@ -5898,104 +5308,126 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice *ifa * 32-bit cursors. 32x32 bits split into 32-bit chunks == 32 * chunks. */ DWORD *maskBits = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - (s->currentDesc.Width * s->currentDesc.Height / 8)); - IWineD3DSurface_LockRect(cursor_image, &lockedRect, NULL, + (cursor_image->resource.width * cursor_image->resource.height / 8)); + wined3d_surface_map(cursor_image, &lockedRect, NULL, WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY); - TRACE("width: %u height: %u.\n", s->currentDesc.Width, s->currentDesc.Height); + TRACE("width: %u height: %u.\n", cursor_image->resource.width, cursor_image->resource.height); cursorInfo.fIcon = FALSE; - cursorInfo.xHotspot = XHotSpot; - cursorInfo.yHotspot = YHotSpot; - cursorInfo.hbmMask = CreateBitmap(s->currentDesc.Width, s->currentDesc.Height, 1, 1, maskBits); - cursorInfo.hbmColor = CreateBitmap(s->currentDesc.Width, s->currentDesc.Height, 1, 32, lockedRect.pBits); - IWineD3DSurface_UnlockRect(cursor_image); + cursorInfo.xHotspot = x_hotspot; + cursorInfo.yHotspot = y_hotspot; + cursorInfo.hbmMask = CreateBitmap(cursor_image->resource.width, cursor_image->resource.height, + 1, 1, maskBits); + cursorInfo.hbmColor = CreateBitmap(cursor_image->resource.width, cursor_image->resource.height, + 1, 32, lockedRect.pBits); + wined3d_surface_unmap(cursor_image); /* Create our cursor and clean up. */ cursor = CreateIconIndirect(&cursorInfo); - SetCursor(cursor); if (cursorInfo.hbmMask) DeleteObject(cursorInfo.hbmMask); if (cursorInfo.hbmColor) DeleteObject(cursorInfo.hbmColor); - if (This->hardwareCursor) DestroyCursor(This->hardwareCursor); - This->hardwareCursor = cursor; + if (device->hardwareCursor) DestroyCursor(device->hardwareCursor); + device->hardwareCursor = cursor; + if (device->bCursorVisible) SetCursor( cursor ); HeapFree(GetProcessHeap(), 0, maskBits); } } - This->xHotSpot = XHotSpot; - This->yHotSpot = YHotSpot; + device->xHotSpot = x_hotspot; + device->yHotSpot = y_hotspot; return WINED3D_OK; } -static void WINAPI IWineD3DDeviceImpl_SetCursorPosition(IWineD3DDevice* iface, int XScreenSpace, int YScreenSpace, DWORD Flags) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - TRACE("(%p) : SetPos to (%u,%u)\n", This, XScreenSpace, YScreenSpace); +void CDECL wined3d_device_set_cursor_position(struct wined3d_device *device, + int x_screen_space, int y_screen_space, DWORD flags) +{ + TRACE("device %p, x %d, y %d, flags %#x.\n", + device, x_screen_space, y_screen_space, flags); - This->xScreenSpace = XScreenSpace; - This->yScreenSpace = YScreenSpace; - - return; + device->xScreenSpace = x_screen_space; + device->yScreenSpace = y_screen_space; + /* switch to the software cursor if position diverges from the hardware one */ + if (device->hardwareCursor) + { + POINT pt; + GetCursorPos( &pt ); + if (x_screen_space != pt.x || y_screen_space != pt.y) + { + if (device->bCursorVisible) SetCursor( NULL ); + DestroyCursor( device->hardwareCursor ); + device->hardwareCursor = 0; + } + } } -static BOOL WINAPI IWineD3DDeviceImpl_ShowCursor(IWineD3DDevice* iface, BOOL bShow) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - BOOL oldVisible = This->bCursorVisible; - POINT pt; +BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show) +{ + BOOL oldVisible = device->bCursorVisible; - TRACE("(%p) : visible(%d)\n", This, bShow); + TRACE("device %p, show %#x.\n", device, show); /* * When ShowCursor is first called it should make the cursor appear at the OS's last - * known cursor position. Because of this, some applications just repetitively call - * ShowCursor in order to update the cursor's position. This behavior is undocumented. + * known cursor position. */ - GetCursorPos(&pt); - This->xScreenSpace = pt.x; - This->yScreenSpace = pt.y; + if (show && !oldVisible) + { + POINT pt; + GetCursorPos(&pt); + device->xScreenSpace = pt.x; + device->yScreenSpace = pt.y; + } - if (This->haveHardwareCursor) { - This->bCursorVisible = bShow; - if (bShow) - SetCursor(This->hardwareCursor); + if (device->hardwareCursor) + { + device->bCursorVisible = show; + if (show) + SetCursor(device->hardwareCursor); else SetCursor(NULL); } else { - if (This->cursorTexture) - This->bCursorVisible = bShow; + if (device->cursorTexture) + device->bCursorVisible = show; } return oldVisible; } -static HRESULT WINAPI evict_managed_resource(IWineD3DResource *resource, void *data) { +static HRESULT WINAPI evict_managed_resource(struct wined3d_resource *resource, void *data) +{ TRACE("checking resource %p for eviction\n", resource); - if(((IWineD3DResourceImpl *) resource)->resource.pool == WINED3DPOOL_MANAGED) { - TRACE("Evicting %p\n", resource); - IWineD3DResource_UnLoad(resource); + + if (resource->pool == WINED3DPOOL_MANAGED) + { + TRACE("Evicting %p.\n", resource); + resource->resource_ops->resource_unload(resource); } - IWineD3DResource_Release(resource); + return S_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_EvictManagedResources(IWineD3DDevice *iface) +HRESULT CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) { - TRACE("iface %p.\n", iface); + TRACE("device %p.\n", device); - IWineD3DDevice_EnumResources(iface, evict_managed_resource, NULL); + wined3d_device_enum_resources(device, evict_managed_resource, NULL); /* Invalidate stream sources, the buffer(s) may have been evicted. */ - IWineD3DDeviceImpl_MarkStateDirty((IWineD3DDeviceImpl *)iface, STATE_STREAMSRC); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_STREAMSRC); return WINED3D_OK; } -static HRESULT updateSurfaceDesc(IWineD3DSurfaceImpl *surface, const WINED3DPRESENT_PARAMETERS* pPresentationParameters) +static HRESULT updateSurfaceDesc(struct wined3d_surface *surface, + const WINED3DPRESENT_PARAMETERS *pPresentationParameters) { - IWineD3DDeviceImpl *device = surface->resource.device; + struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; /* Reallocate proper memory for the front and back buffer and adjust their sizes */ - if(surface->Flags & SFLAG_DIBSECTION) { + if (surface->flags & SFLAG_DIBSECTION) + { /* Release the DC */ SelectObject(surface->hDC, surface->dib.holdbitmap); DeleteDC(surface->hDC); @@ -6003,10 +5435,10 @@ static HRESULT updateSurfaceDesc(IWineD3DSurfaceImpl *surface, const WINED3DPRES DeleteObject(surface->dib.DIBsection); surface->dib.bitmap_data = NULL; surface->resource.allocatedMemory = NULL; - surface->Flags &= ~SFLAG_DIBSECTION; + surface->flags &= ~SFLAG_DIBSECTION; } - surface->currentDesc.Width = pPresentationParameters->BackBufferWidth; - surface->currentDesc.Height = pPresentationParameters->BackBufferHeight; + surface->resource.width = pPresentationParameters->BackBufferWidth; + surface->resource.height = pPresentationParameters->BackBufferHeight; if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || gl_info->supported[ARB_TEXTURE_RECTANGLE] || gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]) { @@ -6026,18 +5458,21 @@ static HRESULT updateSurfaceDesc(IWineD3DSurfaceImpl *surface, const WINED3DPRES LEAVE_GL(); context_release(context); surface->texture_name = 0; - surface->Flags &= ~SFLAG_CLIENT; + surface->flags &= ~SFLAG_CLIENT; } - if(surface->pow2Width != pPresentationParameters->BackBufferWidth || - surface->pow2Height != pPresentationParameters->BackBufferHeight) { - surface->Flags |= SFLAG_NONPOW2; - } else { - surface->Flags &= ~SFLAG_NONPOW2; + if (surface->pow2Width != pPresentationParameters->BackBufferWidth + || surface->pow2Height != pPresentationParameters->BackBufferHeight) + { + surface->flags |= SFLAG_NONPOW2; + } + else + { + surface->flags &= ~SFLAG_NONPOW2; } HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); surface->resource.allocatedMemory = NULL; surface->resource.heapMemory = NULL; - surface->resource.size = IWineD3DSurface_GetPitch((IWineD3DSurface *) surface) * surface->pow2Width; + surface->resource.size = wined3d_surface_get_pitch(surface) * surface->pow2Width; /* Put all surfaces into sysmem - the drawable might disappear if the backbuffer was rendered * to a FBO */ @@ -6048,14 +5483,7 @@ static HRESULT updateSurfaceDesc(IWineD3DSurfaceImpl *surface, const WINED3DPRES return WINED3D_OK; } -static HRESULT WINAPI reset_unload_resources(IWineD3DResource *resource, void *data) { - TRACE("Unloading resource %p\n", resource); - IWineD3DResource_UnLoad(resource); - IWineD3DResource_Release(resource); - return S_OK; -} - -static BOOL is_display_mode_supported(IWineD3DDeviceImpl *This, const WINED3DPRESENT_PARAMETERS *pp) +static BOOL is_display_mode_supported(struct wined3d_device *device, const WINED3DPRESENT_PARAMETERS *pp) { UINT i, count; WINED3DDISPLAYMODE m; @@ -6066,61 +5494,62 @@ static BOOL is_display_mode_supported(IWineD3DDeviceImpl *This, const WINED3DPRE if(!pp->BackBufferWidth) return TRUE; if(!pp->BackBufferHeight) return TRUE; - count = IWineD3D_GetAdapterModeCount(This->wined3d, This->adapter->ordinal, WINED3DFMT_UNKNOWN); - for(i = 0; i < count; i++) { + count = wined3d_get_adapter_mode_count(device->wined3d, device->adapter->ordinal, WINED3DFMT_UNKNOWN); + for (i = 0; i < count; ++i) + { memset(&m, 0, sizeof(m)); - hr = IWineD3D_EnumAdapterModes(This->wined3d, This->adapter->ordinal, WINED3DFMT_UNKNOWN, i, &m); - if(FAILED(hr)) { - ERR("EnumAdapterModes failed\n"); - } - if(m.Width == pp->BackBufferWidth && m.Height == pp->BackBufferHeight) { - /* Mode found, it is supported */ + hr = wined3d_enum_adapter_modes(device->wined3d, device->adapter->ordinal, WINED3DFMT_UNKNOWN, i, &m); + if (FAILED(hr)) + ERR("Failed to enumerate adapter mode.\n"); + if (m.Width == pp->BackBufferWidth && m.Height == pp->BackBufferHeight) + /* Mode found, it is supported. */ return TRUE; - } } /* Mode not found -> not supported */ return FALSE; } /* Do not call while under the GL lock. */ -static void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChainImpl *swapchain) +static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; - IWineD3DBaseShaderImpl *shader; + struct wined3d_shader *shader; - context = context_acquire(This, NULL); + context = context_acquire(device, NULL); gl_info = context->gl_info; - IWineD3DDevice_EnumResources(iface, reset_unload_resources, NULL); - LIST_FOR_EACH_ENTRY(shader, &This->shaders, IWineD3DBaseShaderImpl, baseShader.shader_list_entry) { - This->shader_backend->shader_destroy((IWineD3DBaseShader *) shader); + wined3d_device_enum_resources(device, device_unload_resource, NULL); + LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry) + { + device->shader_backend->shader_destroy(shader); } ENTER_GL(); - if(This->depth_blt_texture) { - glDeleteTextures(1, &This->depth_blt_texture); - This->depth_blt_texture = 0; + if (device->depth_blt_texture) + { + glDeleteTextures(1, &device->depth_blt_texture); + device->depth_blt_texture = 0; } - if (This->depth_blt_rb) { - gl_info->fbo_ops.glDeleteRenderbuffers(1, &This->depth_blt_rb); - This->depth_blt_rb = 0; - This->depth_blt_rb_w = 0; - This->depth_blt_rb_h = 0; + if (device->depth_blt_rb) + { + gl_info->fbo_ops.glDeleteRenderbuffers(1, &device->depth_blt_rb); + device->depth_blt_rb = 0; + device->depth_blt_rb_w = 0; + device->depth_blt_rb_h = 0; } LEAVE_GL(); - This->blitter->free_private(iface); - This->frag_pipe->free_private(iface); - This->shader_backend->shader_free_private(iface); - destroy_dummy_textures(This, gl_info); + device->blitter->free_private(device); + device->frag_pipe->free_private(device); + device->shader_backend->shader_free_private(device); + destroy_dummy_textures(device, gl_info); context_release(context); - while (This->numContexts) + while (device->context_count) { - context_destroy(This, This->contexts[0]); + context_destroy(device, device->contexts[0]); } HeapFree(GetProcessHeap(), 0, swapchain->context); swapchain->context = NULL; @@ -6128,12 +5557,11 @@ static void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChainImpl } /* Do not call while under the GL lock. */ -static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChainImpl *swapchain) +static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; struct wined3d_context *context; + struct wined3d_surface *target; HRESULT hr; - IWineD3DSurfaceImpl *target; /* Recreate the primary swapchain's context */ swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context)); @@ -6153,67 +5581,70 @@ static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwap swapchain->context[0] = context; swapchain->num_contexts = 1; - create_dummy_textures(This); + create_dummy_textures(device); context_release(context); - hr = This->shader_backend->shader_alloc_private(iface); + hr = device->shader_backend->shader_alloc_private(device); if (FAILED(hr)) { ERR("Failed to allocate shader private data, hr %#x.\n", hr); goto err; } - hr = This->frag_pipe->alloc_private(iface); + hr = device->frag_pipe->alloc_private(device); if (FAILED(hr)) { ERR("Failed to allocate fragment pipe private data, hr %#x.\n", hr); - This->shader_backend->shader_free_private(iface); + device->shader_backend->shader_free_private(device); goto err; } - hr = This->blitter->alloc_private(iface); + hr = device->blitter->alloc_private(device); if (FAILED(hr)) { ERR("Failed to allocate blitter private data, hr %#x.\n", hr); - This->frag_pipe->free_private(iface); - This->shader_backend->shader_free_private(iface); + device->frag_pipe->free_private(device); + device->shader_backend->shader_free_private(device); goto err; } return WINED3D_OK; err: - context_acquire(This, NULL); - destroy_dummy_textures(This, context->gl_info); + context_acquire(device, NULL); + destroy_dummy_textures(device, context->gl_info); context_release(context); - context_destroy(This, context); + context_destroy(device, context); HeapFree(GetProcessHeap(), 0, swapchain->context); swapchain->num_contexts = 0; return hr; } /* Do not call while under the GL lock. */ -static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface, - WINED3DPRESENT_PARAMETERS *pPresentationParameters) +HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, + WINED3DPRESENT_PARAMETERS *present_parameters) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - IWineD3DSwapChainImpl *swapchain; - HRESULT hr; + struct wined3d_swapchain *swapchain; BOOL DisplayModeChanged = FALSE; WINED3DDISPLAYMODE mode; - TRACE("(%p)\n", This); + HRESULT hr; - hr = IWineD3DDevice_GetSwapChain(iface, 0, (IWineD3DSwapChain **) &swapchain); - if(FAILED(hr)) { + TRACE("device %p, present_parameters %p.\n", device, present_parameters); + + hr = wined3d_device_get_swapchain(device, 0, &swapchain); + if (FAILED(hr)) + { ERR("Failed to get the first implicit swapchain\n"); return hr; } - if(!is_display_mode_supported(This, pPresentationParameters)) { + if (!is_display_mode_supported(device, present_parameters)) + { WARN("Rejecting Reset() call because the requested display mode is not supported\n"); - WARN("Requested mode: %d, %d\n", pPresentationParameters->BackBufferWidth, - pPresentationParameters->BackBufferHeight); - IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); + WARN("Requested mode: %d, %d.\n", + present_parameters->BackBufferWidth, + present_parameters->BackBufferHeight); + wined3d_swapchain_decref(swapchain); return WINED3DERR_INVALIDCALL; } @@ -6225,198 +5656,201 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface, * TODO: Figure out what happens to explicit swapchains, or if we have more than one implicit swapchain */ TRACE("New params:\n"); - TRACE("BackBufferWidth = %d\n", pPresentationParameters->BackBufferWidth); - TRACE("BackBufferHeight = %d\n", pPresentationParameters->BackBufferHeight); - TRACE("BackBufferFormat = %s\n", debug_d3dformat(pPresentationParameters->BackBufferFormat)); - TRACE("BackBufferCount = %d\n", pPresentationParameters->BackBufferCount); - TRACE("MultiSampleType = %d\n", pPresentationParameters->MultiSampleType); - TRACE("MultiSampleQuality = %d\n", pPresentationParameters->MultiSampleQuality); - TRACE("SwapEffect = %d\n", pPresentationParameters->SwapEffect); - TRACE("hDeviceWindow = %p\n", pPresentationParameters->hDeviceWindow); - TRACE("Windowed = %s\n", pPresentationParameters->Windowed ? "true" : "false"); - TRACE("EnableAutoDepthStencil = %s\n", pPresentationParameters->EnableAutoDepthStencil ? "true" : "false"); - TRACE("Flags = %08x\n", pPresentationParameters->Flags); - TRACE("FullScreen_RefreshRateInHz = %d\n", pPresentationParameters->FullScreen_RefreshRateInHz); - TRACE("PresentationInterval = %d\n", pPresentationParameters->PresentationInterval); + TRACE("BackBufferWidth = %d\n", present_parameters->BackBufferWidth); + TRACE("BackBufferHeight = %d\n", present_parameters->BackBufferHeight); + TRACE("BackBufferFormat = %s\n", debug_d3dformat(present_parameters->BackBufferFormat)); + TRACE("BackBufferCount = %d\n", present_parameters->BackBufferCount); + TRACE("MultiSampleType = %d\n", present_parameters->MultiSampleType); + TRACE("MultiSampleQuality = %d\n", present_parameters->MultiSampleQuality); + TRACE("SwapEffect = %d\n", present_parameters->SwapEffect); + TRACE("hDeviceWindow = %p\n", present_parameters->hDeviceWindow); + TRACE("Windowed = %s\n", present_parameters->Windowed ? "true" : "false"); + TRACE("EnableAutoDepthStencil = %s\n", present_parameters->EnableAutoDepthStencil ? "true" : "false"); + TRACE("Flags = %08x\n", present_parameters->Flags); + TRACE("FullScreen_RefreshRateInHz = %d\n", present_parameters->FullScreen_RefreshRateInHz); + TRACE("PresentationInterval = %d\n", present_parameters->PresentationInterval); /* No special treatment of these parameters. Just store them */ - swapchain->presentParms.SwapEffect = pPresentationParameters->SwapEffect; - swapchain->presentParms.Flags = pPresentationParameters->Flags; - swapchain->presentParms.PresentationInterval = pPresentationParameters->PresentationInterval; - swapchain->presentParms.FullScreen_RefreshRateInHz = pPresentationParameters->FullScreen_RefreshRateInHz; + swapchain->presentParms.SwapEffect = present_parameters->SwapEffect; + swapchain->presentParms.Flags = present_parameters->Flags; + swapchain->presentParms.PresentationInterval = present_parameters->PresentationInterval; + swapchain->presentParms.FullScreen_RefreshRateInHz = present_parameters->FullScreen_RefreshRateInHz; /* What to do about these? */ - if (pPresentationParameters->BackBufferCount - && pPresentationParameters->BackBufferCount != swapchain->presentParms.BackBufferCount) - ERR("Cannot change the back buffer count yet\n"); + if (present_parameters->BackBufferCount + && present_parameters->BackBufferCount != swapchain->presentParms.BackBufferCount) + FIXME("Cannot change the back buffer count yet.\n"); - if(pPresentationParameters->BackBufferFormat != WINED3DFMT_UNKNOWN && - pPresentationParameters->BackBufferFormat != swapchain->presentParms.BackBufferFormat) { - ERR("Cannot change the back buffer format yet\n"); - } + if (present_parameters->BackBufferFormat != WINED3DFMT_UNKNOWN + && present_parameters->BackBufferFormat != swapchain->presentParms.BackBufferFormat) + FIXME("Cannot change the back buffer format yet.\n"); - if (pPresentationParameters->hDeviceWindow - && pPresentationParameters->hDeviceWindow != swapchain->presentParms.hDeviceWindow) - ERR("Cannot change the device window yet\n"); + if (present_parameters->hDeviceWindow + && present_parameters->hDeviceWindow != swapchain->presentParms.hDeviceWindow) + FIXME("Cannot change the device window yet.\n"); - if (pPresentationParameters->EnableAutoDepthStencil && !This->auto_depth_stencil) + if (present_parameters->EnableAutoDepthStencil && !device->auto_depth_stencil) { HRESULT hrc; TRACE("Creating the depth stencil buffer\n"); - hrc = IWineD3DDeviceParent_CreateDepthStencilSurface(This->device_parent, - pPresentationParameters->BackBufferWidth, - pPresentationParameters->BackBufferHeight, - pPresentationParameters->AutoDepthStencilFormat, - pPresentationParameters->MultiSampleType, - pPresentationParameters->MultiSampleQuality, + hrc = device->device_parent->ops->create_depth_stencil(device->device_parent, + present_parameters->BackBufferWidth, + present_parameters->BackBufferHeight, + present_parameters->AutoDepthStencilFormat, + present_parameters->MultiSampleType, + present_parameters->MultiSampleQuality, FALSE, - (IWineD3DSurface **)&This->auto_depth_stencil); - - if (FAILED(hrc)) { - ERR("Failed to create the depth stencil buffer\n"); - IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + &device->auto_depth_stencil); + if (FAILED(hrc)) + { + ERR("Failed to create the depth stencil buffer.\n"); + wined3d_swapchain_decref(swapchain); return WINED3DERR_INVALIDCALL; } } - if (This->onscreen_depth_stencil) + if (device->onscreen_depth_stencil) { - IWineD3DSurface_Release((IWineD3DSurface *)This->onscreen_depth_stencil); - This->onscreen_depth_stencil = NULL; + wined3d_surface_decref(device->onscreen_depth_stencil); + device->onscreen_depth_stencil = NULL; } /* Reset the depth stencil */ - if (pPresentationParameters->EnableAutoDepthStencil) - IWineD3DDevice_SetDepthStencilSurface(iface, (IWineD3DSurface *)This->auto_depth_stencil); + if (present_parameters->EnableAutoDepthStencil) + wined3d_device_set_depth_stencil(device, device->auto_depth_stencil); else - IWineD3DDevice_SetDepthStencilSurface(iface, NULL); + wined3d_device_set_depth_stencil(device, NULL); TRACE("Resetting stateblock\n"); - IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->updateStateBlock); - IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock); + wined3d_stateblock_decref(device->updateStateBlock); + wined3d_stateblock_decref(device->stateBlock); - delete_opengl_contexts(iface, swapchain); + delete_opengl_contexts(device, swapchain); - if(pPresentationParameters->Windowed) { + if (present_parameters->Windowed) + { mode.Width = swapchain->orig_width; mode.Height = swapchain->orig_height; mode.RefreshRate = 0; mode.Format = swapchain->presentParms.BackBufferFormat; - } else { - mode.Width = pPresentationParameters->BackBufferWidth; - mode.Height = pPresentationParameters->BackBufferHeight; - mode.RefreshRate = pPresentationParameters->FullScreen_RefreshRateInHz; + } + else + { + mode.Width = present_parameters->BackBufferWidth; + mode.Height = present_parameters->BackBufferHeight; + mode.RefreshRate = present_parameters->FullScreen_RefreshRateInHz; mode.Format = swapchain->presentParms.BackBufferFormat; } /* Should Width == 800 && Height == 0 set 800x600? */ - if (pPresentationParameters->BackBufferWidth && pPresentationParameters->BackBufferHeight - && (pPresentationParameters->BackBufferWidth != swapchain->presentParms.BackBufferWidth - || pPresentationParameters->BackBufferHeight != swapchain->presentParms.BackBufferHeight)) + if (present_parameters->BackBufferWidth && present_parameters->BackBufferHeight + && (present_parameters->BackBufferWidth != swapchain->presentParms.BackBufferWidth + || present_parameters->BackBufferHeight != swapchain->presentParms.BackBufferHeight)) { UINT i; - if(!pPresentationParameters->Windowed) { + if (!present_parameters->Windowed) DisplayModeChanged = TRUE; - } - swapchain->presentParms.BackBufferWidth = pPresentationParameters->BackBufferWidth; - swapchain->presentParms.BackBufferHeight = pPresentationParameters->BackBufferHeight; - hr = updateSurfaceDesc(swapchain->front_buffer, pPresentationParameters); - if(FAILED(hr)) + swapchain->presentParms.BackBufferWidth = present_parameters->BackBufferWidth; + swapchain->presentParms.BackBufferHeight = present_parameters->BackBufferHeight; + + hr = updateSurfaceDesc(swapchain->front_buffer, present_parameters); + if (FAILED(hr)) { - IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + wined3d_swapchain_decref(swapchain); return hr; } for (i = 0; i < swapchain->presentParms.BackBufferCount; ++i) { - hr = updateSurfaceDesc(swapchain->back_buffers[i], pPresentationParameters); - if(FAILED(hr)) + hr = updateSurfaceDesc(swapchain->back_buffers[i], present_parameters); + if (FAILED(hr)) { - IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + wined3d_swapchain_decref(swapchain); return hr; } } - if (This->auto_depth_stencil) + if (device->auto_depth_stencil) { - hr = updateSurfaceDesc(This->auto_depth_stencil, pPresentationParameters); - if(FAILED(hr)) + hr = updateSurfaceDesc(device->auto_depth_stencil, present_parameters); + if (FAILED(hr)) { - IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + wined3d_swapchain_decref(swapchain); return hr; } } } - if (!pPresentationParameters->Windowed != !swapchain->presentParms.Windowed + if (!present_parameters->Windowed != !swapchain->presentParms.Windowed || DisplayModeChanged) { - BOOL filter = This->filter_messages; - This->filter_messages = TRUE; + wined3d_device_set_display_mode(device, 0, &mode); - IWineD3DDevice_SetDisplayMode(iface, 0, &mode); - - if (!pPresentationParameters->Windowed) + if (!present_parameters->Windowed) { if (swapchain->presentParms.Windowed) { - HWND focus_window = This->createParms.hFocusWindow; - if (!focus_window) focus_window = pPresentationParameters->hDeviceWindow; - if (FAILED(hr = IWineD3DDevice_AcquireFocusWindow(iface, focus_window))) + HWND focus_window = device->createParms.hFocusWindow; + if (!focus_window) + focus_window = present_parameters->hDeviceWindow; + if (FAILED(hr = wined3d_device_acquire_focus_window(device, focus_window))) { ERR("Failed to acquire focus window, hr %#x.\n", hr); - IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); + wined3d_swapchain_decref(swapchain); return hr; } /* switch from windowed to fs */ - swapchain_setup_fullscreen_window(swapchain, pPresentationParameters->BackBufferWidth, - pPresentationParameters->BackBufferHeight); + wined3d_device_setup_fullscreen_window(device, swapchain->device_window, + present_parameters->BackBufferWidth, + present_parameters->BackBufferHeight); } else { /* Fullscreen -> fullscreen mode change */ MoveWindow(swapchain->device_window, 0, 0, - pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight, + present_parameters->BackBufferWidth, present_parameters->BackBufferHeight, TRUE); } } else if (!swapchain->presentParms.Windowed) { /* Fullscreen -> windowed switch */ - swapchain_restore_fullscreen_window(swapchain); - IWineD3DDevice_ReleaseFocusWindow(iface); + wined3d_device_restore_fullscreen_window(device, swapchain->device_window); + wined3d_device_release_focus_window(device); } - swapchain->presentParms.Windowed = pPresentationParameters->Windowed; - - This->filter_messages = filter; + swapchain->presentParms.Windowed = present_parameters->Windowed; } - else if (!pPresentationParameters->Windowed) + else if (!present_parameters->Windowed) { - DWORD style = This->style, exStyle = This->exStyle; + DWORD style = device->style; + DWORD exStyle = device->exStyle; /* If we're in fullscreen, and the mode wasn't changed, we have to get the window back into * the right position. Some applications(Battlefield 2, Guild Wars) move it and then call * Reset to clear up their mess. Guild Wars also loses the device during that. */ - This->style = 0; - This->exStyle = 0; - swapchain_setup_fullscreen_window(swapchain, pPresentationParameters->BackBufferWidth, - pPresentationParameters->BackBufferHeight); - This->style = style; - This->exStyle = exStyle; + device->style = 0; + device->exStyle = 0; + wined3d_device_setup_fullscreen_window(device, swapchain->device_window, + present_parameters->BackBufferWidth, + present_parameters->BackBufferHeight); + device->style = style; + device->exStyle = exStyle; } /* Note: No parent needed for initial internal stateblock */ - hr = IWineD3DDevice_CreateStateBlock(iface, WINED3DSBT_INIT, (IWineD3DStateBlock **)&This->stateBlock); - if (FAILED(hr)) ERR("Resetting the stateblock failed with error 0x%08x\n", hr); - else TRACE("Created stateblock %p\n", This->stateBlock); - This->updateStateBlock = This->stateBlock; - IWineD3DStateBlock_AddRef((IWineD3DStateBlock *)This->updateStateBlock); + hr = wined3d_stateblock_create(device, WINED3DSBT_INIT, &device->stateBlock); + if (FAILED(hr)) + ERR("Resetting the stateblock failed with error %#x.\n", hr); + else + TRACE("Created stateblock %p.\n", device->stateBlock); + device->updateStateBlock = device->stateBlock; + wined3d_stateblock_incref(device->updateStateBlock); - stateblock_init_default_state(This->stateBlock); + stateblock_init_default_state(device->stateBlock); if(wined3d_settings.offscreen_rendering_mode == ORM_FBO) { @@ -6444,8 +5878,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface, } } - hr = create_primary_opengl_context(iface, swapchain); - IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + hr = create_primary_opengl_context(device, swapchain); + wined3d_swapchain_decref(swapchain); /* All done. There is no need to reload resources or shaders, this will happen automatically on the * first use @@ -6453,9 +5887,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface, return hr; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetDialogBoxMode(IWineD3DDevice *iface, BOOL enable_dialogs) +HRESULT CDECL wined3d_device_set_dialog_box_mode(struct wined3d_device *device, BOOL enable_dialogs) { - TRACE("iface %p, enable_dialogs %#x.\n", iface, enable_dialogs); + TRACE("device %p, enable_dialogs %#x.\n", device, enable_dialogs); if (!enable_dialogs) FIXME("Dialogs cannot be disabled yet.\n"); @@ -6463,62 +5897,61 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDialogBoxMode(IWineD3DDevice *iface, } -static HRESULT WINAPI IWineD3DDeviceImpl_GetCreationParameters(IWineD3DDevice *iface, WINED3DDEVICE_CREATION_PARAMETERS *pParameters) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - TRACE("(%p) : pParameters %p\n", This, pParameters); +HRESULT CDECL wined3d_device_get_creation_parameters(struct wined3d_device *device, + WINED3DDEVICE_CREATION_PARAMETERS *parameters) +{ + TRACE("device %p, parameters %p.\n", device, parameters); - *pParameters = This->createParms; + *parameters = device->createParms; return WINED3D_OK; } -static void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT iSwapChain, DWORD Flags, CONST WINED3DGAMMARAMP* pRamp) { - IWineD3DSwapChain *swapchain; +void CDECL wined3d_device_set_gamma_ramp(struct wined3d_device *device, + UINT swapchain_idx, DWORD flags, const WINED3DGAMMARAMP *ramp) +{ + struct wined3d_swapchain *swapchain; - TRACE("Relaying to swapchain\n"); + TRACE("device %p, swapchain_idx %u, flags %#x, ramp %p.\n", + device, swapchain_idx, flags, ramp); - if (IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain) == WINED3D_OK) { - IWineD3DSwapChain_SetGammaRamp(swapchain, Flags, pRamp); - IWineD3DSwapChain_Release(swapchain); + if (SUCCEEDED(wined3d_device_get_swapchain(device, swapchain_idx, &swapchain))) + { + wined3d_swapchain_set_gamma_ramp(swapchain, flags, ramp); + wined3d_swapchain_decref(swapchain); } } -static void WINAPI IWineD3DDeviceImpl_GetGammaRamp(IWineD3DDevice *iface, UINT iSwapChain, WINED3DGAMMARAMP* pRamp) { - IWineD3DSwapChain *swapchain; +void CDECL wined3d_device_get_gamma_ramp(struct wined3d_device *device, UINT swapchain_idx, WINED3DGAMMARAMP *ramp) +{ + struct wined3d_swapchain *swapchain; - TRACE("Relaying to swapchain\n"); + TRACE("device %p, swapchain_idx %u, ramp %p.\n", + device, swapchain_idx, ramp); - if (IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain) == WINED3D_OK) { - IWineD3DSwapChain_GetGammaRamp(swapchain, pRamp); - IWineD3DSwapChain_Release(swapchain); + if (SUCCEEDED(wined3d_device_get_swapchain(device, swapchain_idx, &swapchain))) + { + wined3d_swapchain_get_gamma_ramp(swapchain, ramp); + wined3d_swapchain_decref(swapchain); } } - -/** ******************************************************** -* Notification functions -** ********************************************************/ -/** This function must be called in the release of a resource when ref == 0, -* the contents of resource must still be correct, -* any handles to other resource held by the caller must be closed -* (e.g. a texture should release all held surfaces because telling the device that it's been released.) - *****************************************************/ -void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource) +void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) { - TRACE("(%p) : Adding resource %p\n", This, resource); + TRACE("device %p, resource %p.\n", device, resource); - list_add_head(&This->resources, &((IWineD3DResourceImpl *) resource)->resource.resource_list_entry); + list_add_head(&device->resources, &resource->resource_list_entry); } -static void device_resource_remove(IWineD3DDeviceImpl *This, IWineD3DResource *resource) +static void device_resource_remove(struct wined3d_device *device, struct wined3d_resource *resource) { - TRACE("(%p) : Removing resource %p\n", This, resource); + TRACE("device %p, resource %p.\n", device, resource); - list_remove(&((IWineD3DResourceImpl *) resource)->resource.resource_list_entry); + list_remove(&resource->resource_list_entry); } -void device_resource_released(IWineD3DDeviceImpl *device, IWineD3DResource *resource) +void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) { - WINED3DRESOURCETYPE type = IWineD3DResource_GetType(resource); + WINED3DRESOURCETYPE type = resource->resourceType; unsigned int i; TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type)); @@ -6528,21 +5961,25 @@ void device_resource_released(IWineD3DDeviceImpl *device, IWineD3DResource *reso switch (type) { case WINED3DRTYPE_SURFACE: - if (!device->d3d_initialized) break; - - for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { - if (device->render_targets[i] == (IWineD3DSurfaceImpl *)resource) + struct wined3d_surface *surface = surface_from_resource(resource); + + if (!device->d3d_initialized) break; + + for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { - ERR("Surface %p is still in use as render target %u.\n", resource, i); - device->render_targets[i] = NULL; + if (device->fb.render_targets[i] == surface) + { + ERR("Surface %p is still in use as render target %u.\n", surface, i); + device->fb.render_targets[i] = NULL; + } } - } - if (device->depth_stencil == (IWineD3DSurfaceImpl *)resource) - { - ERR("Surface %p is still in use as depth/stencil buffer.\n", resource); - device->depth_stencil = NULL; + if (device->fb.depth_stencil == surface) + { + ERR("Surface %p is still in use as depth/stencil buffer.\n", surface); + device->fb.depth_stencil = NULL; + } } break; @@ -6551,57 +5988,62 @@ void device_resource_released(IWineD3DDeviceImpl *device, IWineD3DResource *reso case WINED3DRTYPE_VOLUMETEXTURE: for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) { - if (device->stateBlock && device->stateBlock->state.textures[i] == (IWineD3DBaseTextureImpl *)resource) + struct wined3d_texture *texture = wined3d_texture_from_resource(resource); + + if (device->stateBlock && device->stateBlock->state.textures[i] == texture) { ERR("Texture %p is still in use by stateblock %p, stage %u.\n", - resource, device->stateBlock, i); + texture, device->stateBlock, i); device->stateBlock->state.textures[i] = NULL; } if (device->updateStateBlock != device->stateBlock - && device->updateStateBlock->state.textures[i] == (IWineD3DBaseTextureImpl *)resource) + && device->updateStateBlock->state.textures[i] == texture) { ERR("Texture %p is still in use by stateblock %p, stage %u.\n", - resource, device->updateStateBlock, i); + texture, device->updateStateBlock, i); device->updateStateBlock->state.textures[i] = NULL; } } break; case WINED3DRTYPE_BUFFER: - for (i = 0; i < MAX_STREAMS; ++i) { - if (device->stateBlock - && device->stateBlock->state.streams[i].buffer == (struct wined3d_buffer *)resource) + struct wined3d_buffer *buffer = buffer_from_resource(resource); + + for (i = 0; i < MAX_STREAMS; ++i) { - ERR("Buffer %p is still in use by stateblock %p, stream %u.\n", - resource, device->stateBlock, i); - device->stateBlock->state.streams[i].buffer = NULL; + if (device->stateBlock && device->stateBlock->state.streams[i].buffer == buffer) + { + ERR("Buffer %p is still in use by stateblock %p, stream %u.\n", + buffer, device->stateBlock, i); + device->stateBlock->state.streams[i].buffer = NULL; + } + + if (device->updateStateBlock != device->stateBlock + && device->updateStateBlock->state.streams[i].buffer == buffer) + { + ERR("Buffer %p is still in use by stateblock %p, stream %u.\n", + buffer, device->updateStateBlock, i); + device->updateStateBlock->state.streams[i].buffer = NULL; + } + + } + + if (device->stateBlock && device->stateBlock->state.index_buffer == buffer) + { + ERR("Buffer %p is still in use by stateblock %p as index buffer.\n", + buffer, device->stateBlock); + device->stateBlock->state.index_buffer = NULL; } if (device->updateStateBlock != device->stateBlock - && device->updateStateBlock->state.streams[i].buffer == (struct wined3d_buffer *)resource) + && device->updateStateBlock->state.index_buffer == buffer) { - ERR("Buffer %p is still in use by stateblock %p, stream %u.\n", - resource, device->updateStateBlock, i); - device->updateStateBlock->state.streams[i].buffer = NULL; + ERR("Buffer %p is still in use by stateblock %p as index buffer.\n", + buffer, device->updateStateBlock); + device->updateStateBlock->state.index_buffer = NULL; } - - } - - if (device->stateBlock && device->stateBlock->state.index_buffer == (struct wined3d_buffer *)resource) - { - ERR("Buffer %p is still in use by stateblock %p as index buffer.\n", - resource, device->stateBlock); - device->stateBlock->state.index_buffer = NULL; - } - - if (device->updateStateBlock != device->stateBlock - && device->updateStateBlock->state.index_buffer == (struct wined3d_buffer *)resource) - { - ERR("Buffer %p is still in use by stateblock %p as index buffer.\n", - resource, device->updateStateBlock); - device->updateStateBlock->state.index_buffer = NULL; } break; @@ -6615,38 +6057,43 @@ void device_resource_released(IWineD3DDeviceImpl *device, IWineD3DResource *reso TRACE("Resource released.\n"); } -static HRESULT WINAPI IWineD3DDeviceImpl_EnumResources(IWineD3DDevice *iface, D3DCB_ENUMRESOURCES pCallback, void *pData) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - IWineD3DResourceImpl *resource, *cursor; - HRESULT ret; - TRACE("(%p)->(%p,%p)\n", This, pCallback, pData); +HRESULT CDECL wined3d_device_enum_resources(struct wined3d_device *device, + D3DCB_ENUMRESOURCES callback, void *data) +{ + struct wined3d_resource *resource, *cursor; - LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &This->resources, IWineD3DResourceImpl, resource.resource_list_entry) { - TRACE("enumerating resource %p\n", resource); - IWineD3DResource_AddRef((IWineD3DResource *) resource); - ret = pCallback((IWineD3DResource *) resource, pData); - if(ret == S_FALSE) { - TRACE("Canceling enumeration\n"); + TRACE("device %p, callback %p, data %p.\n", device, callback, data); + + LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) + { + TRACE("enumerating resource %p.\n", resource); + if (callback(resource, data) == S_FALSE) + { + TRACE("Canceling enumeration.\n"); break; } } + return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetSurfaceFromDC(IWineD3DDevice *iface, HDC dc, IWineD3DSurface **surface) +HRESULT CDECL wined3d_device_get_surface_from_dc(struct wined3d_device *device, + HDC dc, struct wined3d_surface **surface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - IWineD3DResourceImpl *resource; + struct wined3d_resource *resource; - LIST_FOR_EACH_ENTRY(resource, &This->resources, IWineD3DResourceImpl, resource.resource_list_entry) + TRACE("device %p, dc %p, surface %p.\n", device, dc, surface); + + LIST_FOR_EACH_ENTRY(resource, &device->resources, struct wined3d_resource, resource_list_entry) { - WINED3DRESOURCETYPE type = IWineD3DResource_GetType((IWineD3DResource *)resource); - if (type == WINED3DRTYPE_SURFACE) + if (resource->resourceType == WINED3DRTYPE_SURFACE) { - if (((IWineD3DSurfaceImpl *)resource)->hDC == dc) + struct wined3d_surface *s = surface_from_resource(resource); + + if (s->hDC == dc) { - TRACE("Found surface %p for dc %p.\n", resource, dc); - *surface = (IWineD3DSurface *)resource; + TRACE("Found surface %p for dc %p.\n", s, dc); + *surface = s; return WINED3D_OK; } } @@ -6655,161 +6102,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetSurfaceFromDC(IWineD3DDevice *iface, return WINED3DERR_INVALIDCALL; } -/********************************************************** - * IWineD3DDevice VTbl follows - **********************************************************/ - -static const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl = -{ - /*** IUnknown methods ***/ - IWineD3DDeviceImpl_QueryInterface, - IWineD3DDeviceImpl_AddRef, - IWineD3DDeviceImpl_Release, - /*** IWineD3DDevice methods ***/ - /*** Creation methods**/ - IWineD3DDeviceImpl_CreateBuffer, - IWineD3DDeviceImpl_CreateVertexBuffer, - IWineD3DDeviceImpl_CreateIndexBuffer, - IWineD3DDeviceImpl_CreateStateBlock, - IWineD3DDeviceImpl_CreateSurface, - IWineD3DDeviceImpl_CreateRendertargetView, - IWineD3DDeviceImpl_CreateTexture, - IWineD3DDeviceImpl_CreateVolumeTexture, - IWineD3DDeviceImpl_CreateVolume, - IWineD3DDeviceImpl_CreateCubeTexture, - IWineD3DDeviceImpl_CreateQuery, - IWineD3DDeviceImpl_CreateSwapChain, - IWineD3DDeviceImpl_CreateVertexDeclaration, - IWineD3DDeviceImpl_CreateVertexDeclarationFromFVF, - IWineD3DDeviceImpl_CreateVertexShader, - IWineD3DDeviceImpl_CreateGeometryShader, - IWineD3DDeviceImpl_CreatePixelShader, - IWineD3DDeviceImpl_CreatePalette, - /*** Odd functions **/ - IWineD3DDeviceImpl_Init3D, - IWineD3DDeviceImpl_InitGDI, - IWineD3DDeviceImpl_Uninit3D, - IWineD3DDeviceImpl_UninitGDI, - IWineD3DDeviceImpl_SetMultithreaded, - IWineD3DDeviceImpl_EvictManagedResources, - IWineD3DDeviceImpl_GetAvailableTextureMem, - IWineD3DDeviceImpl_GetBackBuffer, - IWineD3DDeviceImpl_GetCreationParameters, - IWineD3DDeviceImpl_GetDeviceCaps, - IWineD3DDeviceImpl_GetDirect3D, - IWineD3DDeviceImpl_GetDisplayMode, - IWineD3DDeviceImpl_SetDisplayMode, - IWineD3DDeviceImpl_GetNumberOfSwapChains, - IWineD3DDeviceImpl_GetRasterStatus, - IWineD3DDeviceImpl_GetSwapChain, - IWineD3DDeviceImpl_Reset, - IWineD3DDeviceImpl_SetDialogBoxMode, - IWineD3DDeviceImpl_SetCursorProperties, - IWineD3DDeviceImpl_SetCursorPosition, - IWineD3DDeviceImpl_ShowCursor, - /*** Getters and setters **/ - IWineD3DDeviceImpl_SetClipPlane, - IWineD3DDeviceImpl_GetClipPlane, - IWineD3DDeviceImpl_SetClipStatus, - IWineD3DDeviceImpl_GetClipStatus, - IWineD3DDeviceImpl_SetCurrentTexturePalette, - IWineD3DDeviceImpl_GetCurrentTexturePalette, - IWineD3DDeviceImpl_SetDepthStencilSurface, - IWineD3DDeviceImpl_GetDepthStencilSurface, - IWineD3DDeviceImpl_SetGammaRamp, - IWineD3DDeviceImpl_GetGammaRamp, - IWineD3DDeviceImpl_SetIndexBuffer, - IWineD3DDeviceImpl_GetIndexBuffer, - IWineD3DDeviceImpl_SetBaseVertexIndex, - IWineD3DDeviceImpl_GetBaseVertexIndex, - IWineD3DDeviceImpl_SetLight, - IWineD3DDeviceImpl_GetLight, - IWineD3DDeviceImpl_SetLightEnable, - IWineD3DDeviceImpl_GetLightEnable, - IWineD3DDeviceImpl_SetMaterial, - IWineD3DDeviceImpl_GetMaterial, - IWineD3DDeviceImpl_SetNPatchMode, - IWineD3DDeviceImpl_GetNPatchMode, - IWineD3DDeviceImpl_SetPaletteEntries, - IWineD3DDeviceImpl_GetPaletteEntries, - IWineD3DDeviceImpl_SetPixelShader, - IWineD3DDeviceImpl_GetPixelShader, - IWineD3DDeviceImpl_SetPixelShaderConstantB, - IWineD3DDeviceImpl_GetPixelShaderConstantB, - IWineD3DDeviceImpl_SetPixelShaderConstantI, - IWineD3DDeviceImpl_GetPixelShaderConstantI, - IWineD3DDeviceImpl_SetPixelShaderConstantF, - IWineD3DDeviceImpl_GetPixelShaderConstantF, - IWineD3DDeviceImpl_SetRenderState, - IWineD3DDeviceImpl_GetRenderState, - IWineD3DDeviceImpl_SetRenderTarget, - IWineD3DDeviceImpl_GetRenderTarget, - IWineD3DDeviceImpl_SetSamplerState, - IWineD3DDeviceImpl_GetSamplerState, - IWineD3DDeviceImpl_SetScissorRect, - IWineD3DDeviceImpl_GetScissorRect, - IWineD3DDeviceImpl_SetSoftwareVertexProcessing, - IWineD3DDeviceImpl_GetSoftwareVertexProcessing, - IWineD3DDeviceImpl_SetStreamSource, - IWineD3DDeviceImpl_GetStreamSource, - IWineD3DDeviceImpl_SetStreamSourceFreq, - IWineD3DDeviceImpl_GetStreamSourceFreq, - IWineD3DDeviceImpl_SetTexture, - IWineD3DDeviceImpl_GetTexture, - IWineD3DDeviceImpl_SetTextureStageState, - IWineD3DDeviceImpl_GetTextureStageState, - IWineD3DDeviceImpl_SetTransform, - IWineD3DDeviceImpl_GetTransform, - IWineD3DDeviceImpl_SetVertexDeclaration, - IWineD3DDeviceImpl_GetVertexDeclaration, - IWineD3DDeviceImpl_SetVertexShader, - IWineD3DDeviceImpl_GetVertexShader, - IWineD3DDeviceImpl_SetVertexShaderConstantB, - IWineD3DDeviceImpl_GetVertexShaderConstantB, - IWineD3DDeviceImpl_SetVertexShaderConstantI, - IWineD3DDeviceImpl_GetVertexShaderConstantI, - IWineD3DDeviceImpl_SetVertexShaderConstantF, - IWineD3DDeviceImpl_GetVertexShaderConstantF, - IWineD3DDeviceImpl_SetViewport, - IWineD3DDeviceImpl_GetViewport, - IWineD3DDeviceImpl_MultiplyTransform, - IWineD3DDeviceImpl_ValidateDevice, - IWineD3DDeviceImpl_ProcessVertices, - /*** State block ***/ - IWineD3DDeviceImpl_BeginStateBlock, - IWineD3DDeviceImpl_EndStateBlock, - /*** Scene management ***/ - IWineD3DDeviceImpl_BeginScene, - IWineD3DDeviceImpl_EndScene, - IWineD3DDeviceImpl_Present, - IWineD3DDeviceImpl_Clear, - IWineD3DDeviceImpl_ClearRendertargetView, - /*** Drawing ***/ - IWineD3DDeviceImpl_SetPrimitiveType, - IWineD3DDeviceImpl_GetPrimitiveType, - IWineD3DDeviceImpl_DrawPrimitive, - IWineD3DDeviceImpl_DrawIndexedPrimitive, - IWineD3DDeviceImpl_DrawPrimitiveUP, - IWineD3DDeviceImpl_DrawIndexedPrimitiveUP, - IWineD3DDeviceImpl_DrawPrimitiveStrided, - IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided, - IWineD3DDeviceImpl_DrawRectPatch, - IWineD3DDeviceImpl_DrawTriPatch, - IWineD3DDeviceImpl_DeletePatch, - IWineD3DDeviceImpl_ColorFill, - IWineD3DDeviceImpl_UpdateTexture, - IWineD3DDeviceImpl_UpdateSurface, - IWineD3DDeviceImpl_GetFrontBufferData, - /*** object tracking ***/ - IWineD3DDeviceImpl_EnumResources, - IWineD3DDeviceImpl_GetSurfaceFromDC, - IWineD3DDeviceImpl_AcquireFocusWindow, - IWineD3DDeviceImpl_ReleaseFocusWindow, -}; - -HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, +HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags, - IWineD3DDeviceParent *device_parent) + struct wined3d_device_parent *device_parent) { struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx]; const struct fragment_pipeline *fragment_pipeline; @@ -6819,24 +6114,22 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, unsigned int i; HRESULT hr; - device->lpVtbl = &IWineD3DDevice_Vtbl; device->ref = 1; - device->wined3d = (IWineD3D *)wined3d; - IWineD3D_AddRef(device->wined3d); + device->wined3d = wined3d; + wined3d_incref(device->wined3d); device->adapter = wined3d->adapter_count ? adapter : NULL; device->device_parent = device_parent; list_init(&device->resources); list_init(&device->shaders); device->surface_alignment = wined3d->dxVersion == 7 ? DDRAW_PITCH_ALIGNMENT : D3D8_PITCH_ALIGNMENT; - device->posFixup[0] = 1.0f; /* This is needed to get the x coord unmodified through a MAD. */ /* Get the initial screen setup for ddraw. */ - hr = IWineD3D_GetAdapterDisplayMode((IWineD3D *)wined3d, adapter_idx, &mode); + hr = wined3d_get_adapter_display_mode(wined3d, adapter_idx, &mode); if (FAILED(hr)) { ERR("Failed to get the adapter's display mode, hr %#x.\n", hr); - IWineD3D_Release(device->wined3d); + wined3d_decref(device->wined3d); return hr; } device->ddraw_width = mode.Width; @@ -6874,7 +6167,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, if (FAILED(hr)) { ERR("Failed to compile state table, hr %#x.\n", hr); - IWineD3D_Release(device->wined3d); + wined3d_decref(device->wined3d); return hr; } } @@ -6884,15 +6177,17 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, } -void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) { - DWORD rep = This->StateTable[state].representative; +void IWineD3DDeviceImpl_MarkStateDirty(struct wined3d_device *device, DWORD state) +{ + DWORD rep = device->StateTable[state].representative; struct wined3d_context *context; DWORD idx; BYTE shift; UINT i; - for(i = 0; i < This->numContexts; i++) { - context = This->contexts[i]; + for (i = 0; i < device->context_count; ++i) + { + context = device->contexts[i]; if(isStateDirty(context, rep)) continue; context->dirtyArray[context->numDirtyEntries++] = rep; @@ -6911,7 +6206,7 @@ void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *h void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height) { - IWineD3DSwapChainImpl *swapchain = context->swapchain; + struct wined3d_swapchain *swapchain = context->swapchain; /* The drawable size of a backbuffer / aux buffer offscreen target is the size of the * current context's drawable, which is the size of the back buffer of the swapchain * the active context belongs to. */ @@ -6919,14 +6214,17 @@ void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, *height = swapchain->presentParms.BackBufferHeight; } -LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, +LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) { if (device->filter_messages) { TRACE("Filtering message: window %p, message %#x, wparam %#lx, lparam %#lx.\n", window, message, wparam, lparam); - return DefWindowProcW(window, message, wparam, lparam); + if (unicode) + return DefWindowProcW(window, message, wparam, lparam); + else + return DefWindowProcA(window, message, wparam, lparam); } if (message == WM_DESTROY) @@ -6938,5 +6236,8 @@ LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, else ERR("Window %p is not the focus window for device %p.\n", window, device); } - return CallWindowProcW(proc, window, message, wparam, lparam); + if (unicode) + return CallWindowProcW(proc, window, message, wparam, lparam); + else + return CallWindowProcA(proc, window, message, wparam, lparam); } diff --git a/dll/directx/wine/wined3d/directx.c b/dll/directx/wine/wined3d/directx.c index 1df2eaa8082..f8cad58e59e 100644 --- a/dll/directx/wine/wined3d/directx.c +++ b/dll/directx/wine/wined3d/directx.c @@ -6,7 +6,7 @@ * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2010 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -61,7 +61,6 @@ static const struct { {"GL_ARB_geometry_shader4", ARB_GEOMETRY_SHADER4, 0 }, {"GL_ARB_half_float_pixel", ARB_HALF_FLOAT_PIXEL, 0 }, {"GL_ARB_half_float_vertex", ARB_HALF_FLOAT_VERTEX, 0 }, - {"GL_ARB_imaging", ARB_IMAGING, 0 }, {"GL_ARB_map_buffer_range", ARB_MAP_BUFFER_RANGE, 0 }, {"GL_ARB_multisample", ARB_MULTISAMPLE, 0 }, /* needs GLX_ARB_MULTISAMPLE as well */ {"GL_ARB_multitexture", ARB_MULTITEXTURE, 0 }, @@ -105,6 +104,7 @@ static const struct { {"GL_EXT_blend_equation_separate", EXT_BLEND_EQUATION_SEPARATE, 0 }, {"GL_EXT_blend_func_separate", EXT_BLEND_FUNC_SEPARATE, 0 }, {"GL_EXT_blend_minmax", EXT_BLEND_MINMAX, 0 }, + {"GL_EXT_blend_subtract", EXT_BLEND_SUBTRACT, 0 }, {"GL_EXT_depth_bounds_test", EXT_DEPTH_BOUNDS_TEST, 0 }, {"GL_EXT_draw_buffers2", EXT_DRAW_BUFFERS2, 0 }, {"GL_EXT_fog_coord", EXT_FOG_COORD, 0 }, @@ -129,6 +129,7 @@ static const struct { {"GL_EXT_texture_filter_anisotropic", EXT_TEXTURE_FILTER_ANISOTROPIC, 0 }, {"GL_EXT_texture_lod_bias", EXT_TEXTURE_LOD_BIAS, 0 }, {"GL_EXT_texture_sRGB", EXT_TEXTURE_SRGB, 0 }, + {"GL_EXT_texture_sRGB_decode", EXT_TEXTURE_SRGB_DECODE, 0 }, {"GL_EXT_vertex_array_bgra", EXT_VERTEX_ARRAY_BGRA, 0 }, /* NV */ @@ -328,7 +329,7 @@ fail: } /* Adjust the amount of used texture memory */ -unsigned int WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *device, unsigned int glram) +unsigned int WineD3DAdapterChangeGLRam(struct wined3d_device *device, int glram) { struct wined3d_adapter *adapter = device->adapter; @@ -343,52 +344,33 @@ static void wined3d_adapter_cleanup(struct wined3d_adapter *adapter) HeapFree(GetProcessHeap(), 0, adapter->cfgs); } -/********************************************************** - * IUnknown parts follows - **********************************************************/ - -static HRESULT WINAPI IWineD3DImpl_QueryInterface(IWineD3D *iface,REFIID riid,LPVOID *ppobj) +ULONG CDECL wined3d_incref(struct wined3d *wined3d) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + ULONG refcount = InterlockedIncrement(&wined3d->ref); - TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IWineD3DDevice)) { - IUnknown_AddRef(iface); - *ppobj = This; - return S_OK; - } - *ppobj = NULL; - return E_NOINTERFACE; + TRACE("%p increasing refcount to %u.\n", wined3d, refcount); + + return refcount; } -static ULONG WINAPI IWineD3DImpl_AddRef(IWineD3D *iface) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); +ULONG CDECL wined3d_decref(struct wined3d *wined3d) +{ + ULONG refcount = InterlockedDecrement(&wined3d->ref); - TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1); - return refCount; -} + TRACE("%p decreasing refcount to %u.\n", wined3d, refcount); -static ULONG WINAPI IWineD3DImpl_Release(IWineD3D *iface) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - ULONG ref; - TRACE("(%p) : Releasing from %d\n", This, This->ref); - ref = InterlockedDecrement(&This->ref); - - if (!ref) + if (!refcount) { unsigned int i; - for (i = 0; i < This->adapter_count; ++i) + for (i = 0; i < wined3d->adapter_count; ++i) { - wined3d_adapter_cleanup(&This->adapters[i]); + wined3d_adapter_cleanup(&wined3d->adapters[i]); } - HeapFree(GetProcessHeap(), 0, This); + HeapFree(GetProcessHeap(), 0, wined3d); } - return ref; + return refcount; } /********************************************************** @@ -442,13 +424,13 @@ static DWORD ver_for_ext(GL_SupportedExt ext) return 0; } -static BOOL match_ati_r300_to_500(const struct wined3d_gl_info *gl_info, const char *gl_renderer, +static BOOL match_amd_r300_to_500(const struct wined3d_gl_info *gl_info, const char *gl_renderer, enum wined3d_gl_vendor gl_vendor, enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device) { - if (card_vendor != HW_VENDOR_ATI) return FALSE; - if (device == CARD_ATI_RADEON_9500) return TRUE; - if (device == CARD_ATI_RADEON_X700) return TRUE; - if (device == CARD_ATI_RADEON_X1600) return TRUE; + if (card_vendor != HW_VENDOR_AMD) return FALSE; + if (device == CARD_AMD_RADEON_9500) return TRUE; + if (device == CARD_AMD_RADEON_X700) return TRUE; + if (device == CARD_AMD_RADEON_X1600) return TRUE; return FALSE; } @@ -573,8 +555,8 @@ static BOOL match_apple_nonr500ati(const struct wined3d_gl_info *gl_info, const enum wined3d_gl_vendor gl_vendor, enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device) { if (gl_vendor != GL_VENDOR_APPLE) return FALSE; - if (card_vendor != HW_VENDOR_ATI) return FALSE; - if (device == CARD_ATI_RADEON_X1600) return FALSE; + if (card_vendor != HW_VENDOR_AMD) return FALSE; + if (device == CARD_AMD_RADEON_X1600) return FALSE; return TRUE; } @@ -774,7 +756,7 @@ static void quirk_one_point_sprite(struct wined3d_gl_info *gl_info) } } -static void quirk_ati_dx9(struct wined3d_gl_info *gl_info) +static void quirk_amd_dx9(struct wined3d_gl_info *gl_info) { quirk_arb_constants(gl_info); @@ -879,9 +861,9 @@ struct driver_quirk static const struct driver_quirk quirk_table[] = { { - match_ati_r300_to_500, - quirk_ati_dx9, - "ATI GLSL constant and normalized texrect quirk" + match_amd_r300_to_500, + quirk_amd_dx9, + "AMD GLSL constant and normalized texrect quirk" }, /* MacOS advertises more GLSL vertex shader uniforms than supported by the hardware, and if more are * used it falls back to software. While the compiler can detect if the shader uses all declared @@ -995,17 +977,17 @@ struct driver_version_information /* The driver version table contains driver information for different devices on several OS versions. */ static const struct driver_version_information driver_version_table[] = { - /* ATI + /* AMD * - Radeon HD2x00 (R600) and up supported by current drivers. - * - Radeon 9500 (R300) - X1*00 (R5xx) supported upto Catalyst 9.3 (Linux) and 10.2 (XP/Vista/Win7) - * - Radeon 7xxx (R100) - 9250 (RV250) supported upto Catalyst 6.11 (XP) - * - Rage 128 supported upto XP, latest official build 6.13.3279 dated October 2001 */ - {DRIVER_ATI_RAGE_128PRO, DRIVER_MODEL_NT5X, "ati2dvaa.dll", 13, 3279, 0}, - {DRIVER_ATI_R100, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 6614}, - {DRIVER_ATI_R300, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 6764}, - {DRIVER_ATI_R600, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 8681}, - {DRIVER_ATI_R300, DRIVER_MODEL_NT6X, "atiumdag.dll", 14, 10, 741 }, - {DRIVER_ATI_R600, DRIVER_MODEL_NT6X, "atiumdag.dll", 14, 10, 741 }, + * - Radeon 9500 (R300) - X1*00 (R5xx) supported up to Catalyst 9.3 (Linux) and 10.2 (XP/Vista/Win7) + * - Radeon 7xxx (R100) - 9250 (RV250) supported up to Catalyst 6.11 (XP) + * - Rage 128 supported up to XP, latest official build 6.13.3279 dated October 2001 */ + {DRIVER_AMD_RAGE_128PRO, DRIVER_MODEL_NT5X, "ati2dvaa.dll", 13, 3279, 0}, + {DRIVER_AMD_R100, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 6614}, + {DRIVER_AMD_R300, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 6764}, + {DRIVER_AMD_R600, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 8681}, + {DRIVER_AMD_R300, DRIVER_MODEL_NT6X, "atiumdag.dll", 14, 10, 741 }, + {DRIVER_AMD_R600, DRIVER_MODEL_NT6X, "atiumdag.dll", 14, 10, 741 }, /* Intel * The drivers are unified but not all versions support all GPUs. At some point the 2k/xp @@ -1027,8 +1009,8 @@ static const struct driver_version_information driver_version_table[] = {DRIVER_NVIDIA_TNT, DRIVER_MODEL_NT5X, "nv4_disp.dll", 14, 10, 7186}, {DRIVER_NVIDIA_GEFORCE2MX, DRIVER_MODEL_NT5X, "nv4_disp.dll", 14, 10, 9371}, {DRIVER_NVIDIA_GEFORCEFX, DRIVER_MODEL_NT5X, "nv4_disp.dll", 14, 11, 7516}, - {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT5X, "nv4_disp.dll", 15, 11, 9745}, - {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT6X, "nvd3dum.dll", 15, 11, 9745}, + {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT5X, "nv4_disp.dll", 15, 12, 6658}, + {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT6X, "nvd3dum.dll", 15, 12, 6658}, }; struct gpu_description @@ -1080,30 +1062,46 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX260, "NVIDIA GeForce GTX 260", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX275, "NVIDIA GeForce GTX 275", DRIVER_NVIDIA_GEFORCE6, 896 }, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX280, "NVIDIA GeForce GTX 280", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT320M, "NVIDIA GeForce GT 320M", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT325M, "NVIDIA GeForce GT 325M", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT330, "NVIDIA GeForce GT 330", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTS350M, "NVIDIA GeForce GTS 350M", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT420, "NVIDIA GeForce GT 420", DRIVER_NVIDIA_GEFORCE6, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT430, "NVIDIA GeForce GT 430", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT440, "NVIDIA GeForce GT 440", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTS450, "NVIDIA GeForce GTS 450", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX460, "NVIDIA GeForce GTX 460", DRIVER_NVIDIA_GEFORCE6, 768 }, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX465, "NVIDIA GeForce GTX 465", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX470, "NVIDIA GeForce GTX 470", DRIVER_NVIDIA_GEFORCE6, 1280}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX480, "NVIDIA GeForce GTX 480", DRIVER_NVIDIA_GEFORCE6, 1536}, - /* ATI cards */ - {HW_VENDOR_ATI, CARD_ATI_RAGE_128PRO, "ATI Rage Fury", DRIVER_ATI_RAGE_128PRO, 16 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_7200, "ATI RADEON 7200 SERIES", DRIVER_ATI_R100, 32 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_8500, "ATI RADEON 8500 SERIES", DRIVER_ATI_R100, 64 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_9500, "ATI Radeon 9500", DRIVER_ATI_R300, 64 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_XPRESS_200M, "ATI RADEON XPRESS 200M Series", DRIVER_ATI_R300, 64 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_X700, "ATI Radeon X700 SE", DRIVER_ATI_R300, 128 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_X1600, "ATI Radeon X1600 Series", DRIVER_ATI_R300, 128 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD2350, "ATI Mobility Radeon HD 2350", DRIVER_ATI_R600, 256 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD2600, "ATI Mobility Radeon HD 2600", DRIVER_ATI_R600, 256 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD2900, "ATI Radeon HD 2900 XT", DRIVER_ATI_R600, 512 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD3200, "ATI Radeon HD 3200 Graphics", DRIVER_ATI_R600, 128 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD4350, "ATI Radeon HD 4350", DRIVER_ATI_R600, 256 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD4600, "ATI Radeon HD 4600 Series", DRIVER_ATI_R600, 512 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD4700, "ATI Radeon HD 4700 Series", DRIVER_ATI_R600, 512 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD4800, "ATI Radeon HD 4800 Series", DRIVER_ATI_R600, 512 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD5700, "ATI Radeon HD 5700 Series", DRIVER_ATI_R600, 512 }, - {HW_VENDOR_ATI, CARD_ATI_RADEON_HD5800, "ATI Radeon HD 5800 Series", DRIVER_ATI_R600, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560, "NVIDIA GeForce GTX 560 TI", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX570, "NVIDIA GeForce GTX 570", DRIVER_NVIDIA_GEFORCE6, 1280}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX580, "NVIDIA GeForce GTX 580", DRIVER_NVIDIA_GEFORCE6, 1536}, + + /* AMD cards */ + {HW_VENDOR_AMD, CARD_AMD_RAGE_128PRO, "ATI Rage Fury", DRIVER_AMD_RAGE_128PRO, 16 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_7200, "ATI RADEON 7200 SERIES", DRIVER_AMD_R100, 32 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_8500, "ATI RADEON 8500 SERIES", DRIVER_AMD_R100, 64 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_9500, "ATI Radeon 9500", DRIVER_AMD_R300, 64 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_XPRESS_200M, "ATI RADEON XPRESS 200M Series", DRIVER_AMD_R300, 64 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_X700, "ATI Radeon X700 SE", DRIVER_AMD_R300, 128 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_X1600, "ATI Radeon X1600 Series", DRIVER_AMD_R300, 128 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD2350, "ATI Mobility Radeon HD 2350", DRIVER_AMD_R600, 256 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD2600, "ATI Mobility Radeon HD 2600", DRIVER_AMD_R600, 256 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD2900, "ATI Radeon HD 2900 XT", DRIVER_AMD_R600, 512 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD3200, "ATI Radeon HD 3200 Graphics", DRIVER_AMD_R600, 128 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4350, "ATI Radeon HD 4350", DRIVER_AMD_R600, 256 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4600, "ATI Radeon HD 4600 Series", DRIVER_AMD_R600, 512 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4700, "ATI Radeon HD 4700 Series", DRIVER_AMD_R600, 512 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4800, "ATI Radeon HD 4800 Series", DRIVER_AMD_R600, 512 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD5400, "ATI Radeon HD 5400 Series", DRIVER_AMD_R600, 512 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD5600, "ATI Radeon HD 5600 Series", DRIVER_AMD_R600, 512 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD5700, "ATI Radeon HD 5700 Series", DRIVER_AMD_R600, 512 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD5800, "ATI Radeon HD 5800 Series", DRIVER_AMD_R600, 1024}, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD5900, "ATI Radeon HD 5900 Series", DRIVER_AMD_R600, 1024}, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD6310, "AMD Radeon HD 6310 Graphics", DRIVER_AMD_R600, 1024}, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD6800, "AMD Radeon HD 6800 Series", DRIVER_AMD_R600, 1024}, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD6900, "AMD Radeon HD 6900 Series", DRIVER_AMD_R600, 2048}, /* Intel cards */ {HW_VENDOR_INTEL, CARD_INTEL_I830G, "Intel(R) 82830M Graphics Controller", DRIVER_INTEL_GMA800, 32 }, {HW_VENDOR_INTEL, CARD_INTEL_I855G, "Intel(R) 82852/82855 GM/GME Graphics Controller", DRIVER_INTEL_GMA800, 32 }, @@ -1111,7 +1109,8 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_INTEL, CARD_INTEL_I915G, "Intel(R) 82915G/GV/910GL Express Chipset Family", DRIVER_INTEL_GMA900, 64 }, {HW_VENDOR_INTEL, CARD_INTEL_I915GM, "Mobile Intel(R) 915GM/GMS,910GML Express Chipset Family", DRIVER_INTEL_GMA900, 64 }, {HW_VENDOR_INTEL, CARD_INTEL_I945GM, "Mobile Intel(R) 945GM Express Chipset Family", DRIVER_INTEL_GMA950, 64 }, - {HW_VENDOR_INTEL, CARD_INTEL_X3100, "Mobile Intel(R) 965 Express Chipset Family", DRIVER_INTEL_GMA3000, 128} + {HW_VENDOR_INTEL, CARD_INTEL_X3100, "Mobile Intel(R) 965 Express Chipset Family", DRIVER_INTEL_GMA3000, 128}, + {HW_VENDOR_INTEL, CARD_INTEL_GM45, "Mobile Intel(R) GM45 Express Chipset Family", DRIVER_INTEL_GMA3000, 512} }; static const struct driver_version_information *get_driver_version_info(enum wined3d_display_driver driver, @@ -1367,18 +1366,20 @@ static enum wined3d_gl_vendor wined3d_guess_gl_vendor(struct wined3d_gl_info *gl static enum wined3d_pci_vendor wined3d_guess_card_vendor(const char *gl_vendor_string, const char *gl_renderer) { - if (strstr(gl_vendor_string, "NVIDIA")) + if (strstr(gl_vendor_string, "NVIDIA") + || strstr(gl_vendor_string, "nouveau")) return HW_VENDOR_NVIDIA; if (strstr(gl_vendor_string, "ATI") || strstr(gl_vendor_string, "Advanced Micro Devices, Inc.") || strstr(gl_vendor_string, "X.Org R300 Project") + || strstr(gl_renderer, "AMD") || strstr(gl_renderer, "R100") || strstr(gl_renderer, "R200") || strstr(gl_renderer, "R300") || strstr(gl_renderer, "R600") || strstr(gl_renderer, "R700")) - return HW_VENDOR_ATI; + return HW_VENDOR_AMD; if (strstr(gl_vendor_string, "Intel(R)") /* Intel switched from Intel(R) to Intel® recently, so just match Intel. */ @@ -1401,161 +1402,74 @@ static enum wined3d_pci_vendor wined3d_guess_card_vendor(const char *gl_vendor_s static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl_info *gl_info, const char *gl_renderer) { + unsigned int i; + if (WINE_D3D10_CAPABLE(gl_info)) { - /* Geforce 400 - highend */ - if (strstr(gl_renderer, "GTX 480")) + static const struct { - return CARD_NVIDIA_GEFORCE_GTX480; + const char *renderer; + enum wined3d_pci_device id; } + cards[] = + { + {"GTX 580", CARD_NVIDIA_GEFORCE_GTX580}, /* Geforce 500 - highend */ + {"GTX 570", CARD_NVIDIA_GEFORCE_GTX570}, /* Geforce 500 - midend high */ + {"GTX 560 TI", CARD_NVIDIA_GEFORCE_GTX560}, /* Geforce 500 - midend */ + {"GTX 480", CARD_NVIDIA_GEFORCE_GTX480}, /* Geforce 400 - highend */ + {"GTX 470", CARD_NVIDIA_GEFORCE_GTX470}, /* Geforce 400 - midend high */ + {"GTX 465", CARD_NVIDIA_GEFORCE_GTX465}, /* Geforce 400 - midend */ + {"GTX 460", CARD_NVIDIA_GEFORCE_GTX460}, /* Geforce 400 - midend */ + {"GTS 450", CARD_NVIDIA_GEFORCE_GTS450}, /* Geforce 400 - midend low */ + {"GT 440", CARD_NVIDIA_GEFORCE_GT440}, /* Geforce 400 - lowend */ + {"GT 430", CARD_NVIDIA_GEFORCE_GT430}, /* Geforce 400 - lowend */ + {"GT 420", CARD_NVIDIA_GEFORCE_GT420}, /* Geforce 400 - lowend */ + {"GT 330", CARD_NVIDIA_GEFORCE_GT330}, /* Geforce 300 - highend */ + {"GTS 360M", CARD_NVIDIA_GEFORCE_GTS350M}, /* Geforce 300 - highend mobile */ + {"GTS 350M", CARD_NVIDIA_GEFORCE_GTS350M}, /* Geforce 300 - highend mobile */ + {"GT 330M", CARD_NVIDIA_GEFORCE_GT325M}, /* Geforce 300 - midend mobile */ + {"GT 325M", CARD_NVIDIA_GEFORCE_GT325M}, /* Geforce 300 - midend mobile */ + {"GT 320M", CARD_NVIDIA_GEFORCE_GT320M}, /* Geforce 300 - midend mobile */ + {"GTX 295", CARD_NVIDIA_GEFORCE_GTX280}, /* Geforce 200 - highend */ + {"GTX 285", CARD_NVIDIA_GEFORCE_GTX280}, /* Geforce 200 - highend */ + {"GTX 280", CARD_NVIDIA_GEFORCE_GTX280}, /* Geforce 200 - highend */ + {"GTX 275", CARD_NVIDIA_GEFORCE_GTX275}, /* Geforce 200 - midend high */ + {"GTX 260", CARD_NVIDIA_GEFORCE_GTX260}, /* Geforce 200 - midend */ + {"GT 240", CARD_NVIDIA_GEFORCE_GT240}, /* Geforce 200 - midend */ + {"GT 220", CARD_NVIDIA_GEFORCE_GT220}, /* Geforce 200 - lowend */ + {"Geforce 310", CARD_NVIDIA_GEFORCE_210}, /* Geforce 200 - lowend */ + {"Geforce 305", CARD_NVIDIA_GEFORCE_210}, /* Geforce 200 - lowend */ + {"Geforce 210", CARD_NVIDIA_GEFORCE_210}, /* Geforce 200 - lowend */ + {"G 210", CARD_NVIDIA_GEFORCE_210}, /* Geforce 200 - lowend */ + {"GTS 250", CARD_NVIDIA_GEFORCE_9800GT}, /* Geforce 9 - highend / Geforce 200 - midend */ + {"GTS 150", CARD_NVIDIA_GEFORCE_9800GT}, /* Geforce 9 - highend / Geforce 200 - midend */ + {"9800", CARD_NVIDIA_GEFORCE_9800GT}, /* Geforce 9 - highend / Geforce 200 - midend */ + {"GT 140", CARD_NVIDIA_GEFORCE_9600GT}, /* Geforce 9 - midend */ + {"9600", CARD_NVIDIA_GEFORCE_9600GT}, /* Geforce 9 - midend */ + {"GT 130", CARD_NVIDIA_GEFORCE_9500GT}, /* Geforce 9 - midend low / Geforce 200 - low */ + {"GT 120", CARD_NVIDIA_GEFORCE_9500GT}, /* Geforce 9 - midend low / Geforce 200 - low */ + {"9500", CARD_NVIDIA_GEFORCE_9500GT}, /* Geforce 9 - midend low / Geforce 200 - low */ + {"9400", CARD_NVIDIA_GEFORCE_9400GT}, /* Geforce 9 - lowend */ + {"9300", CARD_NVIDIA_GEFORCE_9200}, /* Geforce 9 - lowend low */ + {"9200", CARD_NVIDIA_GEFORCE_9200}, /* Geforce 9 - lowend low */ + {"9100", CARD_NVIDIA_GEFORCE_9200}, /* Geforce 9 - lowend low */ + {"G 100", CARD_NVIDIA_GEFORCE_9200}, /* Geforce 9 - lowend low */ + {"8800 GTX", CARD_NVIDIA_GEFORCE_8800GTX}, /* Geforce 8 - highend high */ + {"8800", CARD_NVIDIA_GEFORCE_8800GTS}, /* Geforce 8 - highend */ + {"8600 M", CARD_NVIDIA_GEFORCE_8600MGT}, /* Geforce 8 - midend mobile */ + {"8700", CARD_NVIDIA_GEFORCE_8600GT}, /* Geforce 8 - midend */ + {"8600", CARD_NVIDIA_GEFORCE_8600GT}, /* Geforce 8 - midend */ + {"8500", CARD_NVIDIA_GEFORCE_8400GS}, /* Geforce 8 - mid-lowend */ + {"8400", CARD_NVIDIA_GEFORCE_8400GS}, /* Geforce 8 - mid-lowend */ + {"8300", CARD_NVIDIA_GEFORCE_8300GS}, /* Geforce 8 - lowend */ + {"8200", CARD_NVIDIA_GEFORCE_8300GS}, /* Geforce 8 - lowend */ + {"8100", CARD_NVIDIA_GEFORCE_8300GS}, /* Geforce 8 - lowend */ + }; - /* Geforce 400 - midend high */ - if (strstr(gl_renderer, "GTX 470")) + for (i = 0; i < sizeof(cards) / sizeof(*cards); ++i) { - return CARD_NVIDIA_GEFORCE_GTX470; - } - - /* Geforce 400 - midend */ - if (strstr(gl_renderer, "GTX 465")) - { - return CARD_NVIDIA_GEFORCE_GTX465; - } - - /* Geforce 400 - midend */ - if (strstr(gl_renderer, "GTX 460")) - { - return CARD_NVIDIA_GEFORCE_GTX460; - } - - /* Geforce 300 highend mobile */ - if (strstr(gl_renderer, "GTS 350M") - || strstr(gl_renderer, "GTS 360M")) - { - return CARD_NVIDIA_GEFORCE_GTS350M; - } - - /* Geforce 300 midend mobile (Geforce GT 325M/330M use the same core) */ - if (strstr(gl_renderer, "GT 325M") - || strstr(gl_renderer, "GT 330M")) - { - return CARD_NVIDIA_GEFORCE_GT325M; - } - - /* Geforce 200 - highend */ - if (strstr(gl_renderer, "GTX 280") - || strstr(gl_renderer, "GTX 285") - || strstr(gl_renderer, "GTX 295")) - { - return CARD_NVIDIA_GEFORCE_GTX280; - } - - /* Geforce 200 - midend high */ - if (strstr(gl_renderer, "GTX 275")) - { - return CARD_NVIDIA_GEFORCE_GTX275; - } - - /* Geforce 200 - midend */ - if (strstr(gl_renderer, "GTX 260")) - { - return CARD_NVIDIA_GEFORCE_GTX260; - } - /* Geforce 200 - midend */ - if (strstr(gl_renderer, "GT 240")) - { - return CARD_NVIDIA_GEFORCE_GT240; - } - - /* Geforce 200 lowend */ - if (strstr(gl_renderer, "GT 220")) - { - return CARD_NVIDIA_GEFORCE_GT220; - } - /* Geforce 200 lowend (Geforce 305/310 use the same core) */ - if (strstr(gl_renderer, "Geforce 210") - || strstr(gl_renderer, "G 210") - || strstr(gl_renderer, "Geforce 305") - || strstr(gl_renderer, "Geforce 310")) - { - return CARD_NVIDIA_GEFORCE_210; - } - - /* Geforce9 - highend / Geforce 200 - midend (GTS 150/250 are based on the same core) */ - if (strstr(gl_renderer, "9800") - || strstr(gl_renderer, "GTS 150") - || strstr(gl_renderer, "GTS 250")) - { - return CARD_NVIDIA_GEFORCE_9800GT; - } - - /* Geforce9 - midend (GT 140 uses the same core as the 9600GT) */ - if (strstr(gl_renderer, "9600") - || strstr(gl_renderer, "GT 140")) - { - return CARD_NVIDIA_GEFORCE_9600GT; - } - - /* Geforce9 - midend low / Geforce 200 - low */ - if (strstr(gl_renderer, "9500") - || strstr(gl_renderer, "GT 120") - || strstr(gl_renderer, "GT 130")) - { - return CARD_NVIDIA_GEFORCE_9500GT; - } - - /* Geforce9 - lowend */ - if (strstr(gl_renderer, "9400")) - { - return CARD_NVIDIA_GEFORCE_9400GT; - } - - /* Geforce9 - lowend low */ - if (strstr(gl_renderer, "9100") - || strstr(gl_renderer, "9200") - || strstr(gl_renderer, "9300") - || strstr(gl_renderer, "G 100")) - { - return CARD_NVIDIA_GEFORCE_9200; - } - - /* Geforce8 - highend high*/ - if (strstr(gl_renderer, "8800 GTX")) - { - return CARD_NVIDIA_GEFORCE_8800GTX; - } - - /* Geforce8 - highend */ - if (strstr(gl_renderer, "8800")) - { - return CARD_NVIDIA_GEFORCE_8800GTS; - } - - /* Geforce8 - midend mobile */ - if (strstr(gl_renderer, "8600 M")) - { - return CARD_NVIDIA_GEFORCE_8600MGT; - } - - /* Geforce8 - midend */ - if (strstr(gl_renderer, "8600") - || strstr(gl_renderer, "8700")) - { - return CARD_NVIDIA_GEFORCE_8600GT; - } - - /* Geforce8 - mid-lowend */ - if (strstr(gl_renderer, "8400") - || strstr(gl_renderer, "8500")) - { - return CARD_NVIDIA_GEFORCE_8400GS; - } - - /* Geforce8 - lowend */ - if (strstr(gl_renderer, "8100") - || strstr(gl_renderer, "8200") - || strstr(gl_renderer, "8300")) - { - return CARD_NVIDIA_GEFORCE_8300GS; + if (strstr(gl_renderer, cards[i].renderer)) + return cards[i].id; } /* Geforce8-compatible fall back if the GPU is not in the list yet */ @@ -1567,50 +1481,35 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl */ if (WINE_D3D9_CAPABLE(gl_info) && gl_info->supported[NV_VERTEX_PROGRAM3]) { - /* Geforce7 - highend */ - if (strstr(gl_renderer, "7800") - || strstr(gl_renderer, "7900") - || strstr(gl_renderer, "7950") - || strstr(gl_renderer, "Quadro FX 4") - || strstr(gl_renderer, "Quadro FX 5")) + static const struct { - return CARD_NVIDIA_GEFORCE_7800GT; + const char *renderer; + enum wined3d_pci_device id; + } + cards[] = + { + {"Quadro FX 5", CARD_NVIDIA_GEFORCE_7800GT}, /* Geforce 7 - highend */ + {"Quadro FX 4", CARD_NVIDIA_GEFORCE_7800GT}, /* Geforce 7 - highend */ + {"7950", CARD_NVIDIA_GEFORCE_7800GT}, /* Geforce 7 - highend */ + {"7900", CARD_NVIDIA_GEFORCE_7800GT}, /* Geforce 7 - highend */ + {"7800", CARD_NVIDIA_GEFORCE_7800GT}, /* Geforce 7 - highend */ + {"7700", CARD_NVIDIA_GEFORCE_7600}, /* Geforce 7 - midend */ + {"7600", CARD_NVIDIA_GEFORCE_7600}, /* Geforce 7 - midend */ + {"7400", CARD_NVIDIA_GEFORCE_7400}, /* Geforce 7 - lower medium */ + {"7300", CARD_NVIDIA_GEFORCE_7300}, /* Geforce 7 - lowend */ + {"6800", CARD_NVIDIA_GEFORCE_6800}, /* Geforce 6 - highend */ + {"6700", CARD_NVIDIA_GEFORCE_6600GT}, /* Geforce 6 - midend */ + {"6610", CARD_NVIDIA_GEFORCE_6600GT}, /* Geforce 6 - midend */ + {"6600", CARD_NVIDIA_GEFORCE_6600GT}, /* Geforce 6 - midend */ + }; + + for (i = 0; i < sizeof(cards) / sizeof(*cards); ++i) + { + if (strstr(gl_renderer, cards[i].renderer)) + return cards[i].id; } - /* Geforce7 midend */ - if (strstr(gl_renderer, "7600") - || strstr(gl_renderer, "7700")) - { - return CARD_NVIDIA_GEFORCE_7600; - } - - /* Geforce7 lower medium */ - if (strstr(gl_renderer, "7400")) - { - return CARD_NVIDIA_GEFORCE_7400; - } - - /* Geforce7 lowend */ - if (strstr(gl_renderer, "7300")) - { - return CARD_NVIDIA_GEFORCE_7300; - } - - /* Geforce6 highend */ - if (strstr(gl_renderer, "6800")) - { - return CARD_NVIDIA_GEFORCE_6800; - } - - /* Geforce6 - midend */ - if (strstr(gl_renderer, "6600") - || strstr(gl_renderer, "6610") - || strstr(gl_renderer, "6700")) - { - return CARD_NVIDIA_GEFORCE_6600GT; - } - - /* Geforce6/7 lowend */ + /* Geforce 6/7 - lowend */ return CARD_NVIDIA_GEFORCE_6200; /* Geforce 6100/6150/6200/7300/7400/7500 */ } @@ -1676,7 +1575,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl return CARD_NVIDIA_RIVA_TNT; /* Riva TNT, Vanta */ } -static enum wined3d_pci_device select_card_ati_binary(const struct wined3d_gl_info *gl_info, +static enum wined3d_pci_device select_card_amd_binary(const struct wined3d_gl_info *gl_info, const char *gl_renderer) { /* See http://developer.amd.com/drivers/pc_vendor_id/Pages/default.aspx @@ -1685,93 +1584,67 @@ static enum wined3d_pci_device select_card_ati_binary(const struct wined3d_gl_in * eg HD 4800 is returned for multiple cards, even for RV790 based ones. */ if (WINE_D3D10_CAPABLE(gl_info)) { - /* Radeon EG CYPRESS XT / PRO HD5800 - highend */ - if (strstr(gl_renderer, "HD 5800") /* Radeon EG CYPRESS HD58xx generic renderer string */ - || strstr(gl_renderer, "HD 5850") /* Radeon EG CYPRESS XT */ - || strstr(gl_renderer, "HD 5870")) /* Radeon EG CYPRESS PRO */ - { - return CARD_ATI_RADEON_HD5800; - } + unsigned int i; - /* Radeon EG JUNIPER XT / LE HD5700 - midend */ - if (strstr(gl_renderer, "HD 5700") /* Radeon EG JUNIPER HD57xx generic renderer string */ - || strstr(gl_renderer, "HD 5750") /* Radeon EG JUNIPER LE */ - || strstr(gl_renderer, "HD 5770")) /* Radeon EG JUNIPER XT */ + static const struct { - return CARD_ATI_RADEON_HD5700; + const char *renderer; + enum wined3d_pci_device id; } - - /* Radeon R7xx HD4800 - highend */ - if (strstr(gl_renderer, "HD 4800") /* Radeon RV7xx HD48xx generic renderer string */ - || strstr(gl_renderer, "HD 4830") /* Radeon RV770 */ - || strstr(gl_renderer, "HD 4850") /* Radeon RV770 */ - || strstr(gl_renderer, "HD 4870") /* Radeon RV770 */ - || strstr(gl_renderer, "HD 4890")) /* Radeon RV790 */ + cards[] = { - return CARD_ATI_RADEON_HD4800; - } + /* Evergreen */ + {"HD 5870", CARD_AMD_RADEON_HD5800}, /* Radeon EG CYPRESS PRO */ + {"HD 5850", CARD_AMD_RADEON_HD5800}, /* Radeon EG CYPRESS XT */ + {"HD 5800", CARD_AMD_RADEON_HD5800}, /* Radeon EG CYPRESS HD58xx generic renderer string */ + {"HD 5770", CARD_AMD_RADEON_HD5700}, /* Radeon EG JUNIPER XT */ + {"HD 5750", CARD_AMD_RADEON_HD5700}, /* Radeon EG JUNIPER LE */ + {"HD 5700", CARD_AMD_RADEON_HD5700}, /* Radeon EG JUNIPER HD57xx generic renderer string */ + {"HD 5670", CARD_AMD_RADEON_HD5600}, /* Radeon EG REDWOOD XT */ + {"HD 5570", CARD_AMD_RADEON_HD5600}, /* Radeon EG REDWOOD PRO mapped to HD5600 series */ + {"HD 5550", CARD_AMD_RADEON_HD5600}, /* Radeon EG REDWOOD LE mapped to HD5600 series */ + {"HD 5450", CARD_AMD_RADEON_HD5400}, /* Radeon EG CEDAR PRO */ + /* R700 */ + {"HD 4890", CARD_AMD_RADEON_HD4800}, /* Radeon RV790 */ + {"HD 4870", CARD_AMD_RADEON_HD4800}, /* Radeon RV770 */ + {"HD 4850", CARD_AMD_RADEON_HD4800}, /* Radeon RV770 */ + {"HD 4830", CARD_AMD_RADEON_HD4800}, /* Radeon RV770 */ + {"HD 4800", CARD_AMD_RADEON_HD4800}, /* Radeon RV7xx HD48xx generic renderer string */ + {"HD 4770", CARD_AMD_RADEON_HD4700}, /* Radeon RV740 */ + {"HD 4700", CARD_AMD_RADEON_HD4700}, /* Radeon RV7xx HD47xx generic renderer string */ + {"HD 4670", CARD_AMD_RADEON_HD4600}, /* Radeon RV730 */ + {"HD 4650", CARD_AMD_RADEON_HD4600}, /* Radeon RV730 */ + {"HD 4600", CARD_AMD_RADEON_HD4600}, /* Radeon RV730 */ + {"HD 4550", CARD_AMD_RADEON_HD4350}, /* Radeon RV710 */ + {"HD 4350", CARD_AMD_RADEON_HD4350}, /* Radeon RV710 */ + /* R600/R700 integrated */ + {"HD 3300", CARD_AMD_RADEON_HD3200}, + {"HD 3200", CARD_AMD_RADEON_HD3200}, + {"HD 3100", CARD_AMD_RADEON_HD3200}, + /* R600 */ + {"HD 3870", CARD_AMD_RADEON_HD2900}, /* HD2900/HD3800 - highend */ + {"HD 3850", CARD_AMD_RADEON_HD2900}, /* HD2900/HD3800 - highend */ + {"HD 2900", CARD_AMD_RADEON_HD2900}, /* HD2900/HD3800 - highend */ + {"HD 3830", CARD_AMD_RADEON_HD2600}, /* China-only midend */ + {"HD 3690", CARD_AMD_RADEON_HD2600}, /* HD2600/HD3600 - midend */ + {"HD 3650", CARD_AMD_RADEON_HD2600}, /* HD2600/HD3600 - midend */ + {"HD 2600", CARD_AMD_RADEON_HD2600}, /* HD2600/HD3600 - midend */ + {"HD 3470", CARD_AMD_RADEON_HD2350}, /* HD2350/HD2400/HD3400 - lowend */ + {"HD 3450", CARD_AMD_RADEON_HD2350}, /* HD2350/HD2400/HD3400 - lowend */ + {"HD 3430", CARD_AMD_RADEON_HD2350}, /* HD2350/HD2400/HD3400 - lowend */ + {"HD 3400", CARD_AMD_RADEON_HD2350}, /* HD2350/HD2400/HD3400 - lowend */ + {"HD 2400", CARD_AMD_RADEON_HD2350}, /* HD2350/HD2400/HD3400 - lowend */ + {"HD 2350", CARD_AMD_RADEON_HD2350}, /* HD2350/HD2400/HD3400 - lowend */ + }; - /* Radeon R740 HD4700 - midend */ - if (strstr(gl_renderer, "HD 4700") /* Radeon RV770 */ - || strstr(gl_renderer, "HD 4770")) /* Radeon RV740 */ + for (i = 0; i < sizeof(cards) / sizeof(*cards); ++i) { - return CARD_ATI_RADEON_HD4700; - } - - /* Radeon R730 HD4600 - midend */ - if (strstr(gl_renderer, "HD 4600") /* Radeon RV730 */ - || strstr(gl_renderer, "HD 4650") /* Radeon RV730 */ - || strstr(gl_renderer, "HD 4670")) /* Radeon RV730 */ - { - return CARD_ATI_RADEON_HD4600; - } - - /* Radeon R710 HD4500/HD4350 - lowend */ - if (strstr(gl_renderer, "HD 4350") /* Radeon RV710 */ - || strstr(gl_renderer, "HD 4550")) /* Radeon RV710 */ - { - return CARD_ATI_RADEON_HD4350; - } - - /* Radeon R6xx HD2900/HD3800 - highend */ - if (strstr(gl_renderer, "HD 2900") - || strstr(gl_renderer, "HD 3870") - || strstr(gl_renderer, "HD 3850")) - { - return CARD_ATI_RADEON_HD2900; - } - - /* Radeon R6xx HD2600/HD3600 - midend; HD3830 is China-only midend */ - if (strstr(gl_renderer, "HD 2600") - || strstr(gl_renderer, "HD 3830") - || strstr(gl_renderer, "HD 3690") - || strstr(gl_renderer, "HD 3650")) - { - return CARD_ATI_RADEON_HD2600; - } - - /* Radeon R6xx HD2350/HD2400/HD3400 - lowend - * Note HD2300=DX9, HD2350=DX10 */ - if (strstr(gl_renderer, "HD 2350") - || strstr(gl_renderer, "HD 2400") - || strstr(gl_renderer, "HD 3470") - || strstr(gl_renderer, "HD 3450") - || strstr(gl_renderer, "HD 3430") - || strstr(gl_renderer, "HD 3400")) - { - return CARD_ATI_RADEON_HD2350; - } - - /* Radeon R6xx/R7xx integrated */ - if (strstr(gl_renderer, "HD 3100") - || strstr(gl_renderer, "HD 3200") - || strstr(gl_renderer, "HD 3300")) - { - return CARD_ATI_RADEON_HD3200; + if (strstr(gl_renderer, cards[i].renderer)) + return cards[i].id; } /* Default for when no GPU has been found */ - return CARD_ATI_RADEON_HD3200; + return CARD_AMD_RADEON_HD3200; } if (WINE_D3D8_CAPABLE(gl_info)) @@ -1783,7 +1656,7 @@ static enum wined3d_pci_device select_card_ati_binary(const struct wined3d_gl_in || strstr(gl_renderer, "X1900") || strstr(gl_renderer, "X1950")) { - return CARD_ATI_RADEON_X1600; + return CARD_AMD_RADEON_X1600; } /* Radeon R4xx + X1300/X1400/X1450/X1550/X2300/X2500/HD2300 (lowend R5xx) @@ -1800,35 +1673,36 @@ static enum wined3d_pci_device select_card_ati_binary(const struct wined3d_gl_in || strstr(gl_renderer, "HD 2300") ) { - return CARD_ATI_RADEON_X700; + return CARD_AMD_RADEON_X700; } /* Radeon Xpress Series - onboard, DX9b, Shader 2.0, 300-400MHz */ if (strstr(gl_renderer, "Radeon Xpress")) { - return CARD_ATI_RADEON_XPRESS_200M; + return CARD_AMD_RADEON_XPRESS_200M; } /* Radeon R3xx */ - return CARD_ATI_RADEON_9500; /* Radeon 9500/9550/9600/9700/9800/X300/X550/X600 */ + return CARD_AMD_RADEON_9500; /* Radeon 9500/9550/9600/9700/9800/X300/X550/X600 */ } if (WINE_D3D8_CAPABLE(gl_info)) { - return CARD_ATI_RADEON_8500; /* Radeon 8500/9000/9100/9200/9300 */ + return CARD_AMD_RADEON_8500; /* Radeon 8500/9000/9100/9200/9300 */ } if (WINE_D3D7_CAPABLE(gl_info)) { - return CARD_ATI_RADEON_7200; /* Radeon 7000/7100/7200/7500 */ + return CARD_AMD_RADEON_7200; /* Radeon 7000/7100/7200/7500 */ } - return CARD_ATI_RAGE_128PRO; + return CARD_AMD_RAGE_128PRO; } static enum wined3d_pci_device select_card_intel(const struct wined3d_gl_info *gl_info, const char *gl_renderer) { + if (strstr(gl_renderer, "GM45")) return CARD_INTEL_GM45; if (strstr(gl_renderer, "X3100") || strstr(gl_renderer, "965GM")) { /* MacOS calls the card GMA X3100, otherwise known as GM965/GL960 */ @@ -1850,195 +1724,225 @@ static enum wined3d_pci_device select_card_intel(const struct wined3d_gl_info *g } -static enum wined3d_pci_device select_card_ati_mesa(const struct wined3d_gl_info *gl_info, +static enum wined3d_pci_device select_card_amd_mesa(const struct wined3d_gl_info *gl_info, const char *gl_renderer) { + unsigned int i; + /* See http://developer.amd.com/drivers/pc_vendor_id/Pages/default.aspx * * Beware: renderer string do not match exact card model, * eg HD 4800 is returned for multiple cards, even for RV790 based ones. */ if (strstr(gl_renderer, "Gallium")) { - /* Radeon R7xx HD4800 - highend */ - if (strstr(gl_renderer, "R700") /* Radeon R7xx HD48xx generic renderer string */ - || strstr(gl_renderer, "RV770") /* Radeon RV770 */ - || strstr(gl_renderer, "RV790")) /* Radeon RV790 */ + /* 20101109 - These are never returned by current Gallium radeon + * drivers: R700, RV790, R680, RV535, RV516, R410, RS485, RV360, RV351. + * + * These are returned but not handled: RC410, RV380. */ + static const struct { - return CARD_ATI_RADEON_HD4800; + const char *renderer; + enum wined3d_pci_device id; } - - /* Radeon R740 HD4700 - midend */ - if (strstr(gl_renderer, "RV740")) /* Radeon RV740 */ + cards[] = { - return CARD_ATI_RADEON_HD4700; - } + /* Northern Islands */ + {"CAYMAN", CARD_AMD_RADEON_HD6900}, + {"BARTS", CARD_AMD_RADEON_HD6800}, + {"PALM", CARD_AMD_RADEON_HD6310}, + /* Evergreen */ + {"HEMLOCK", CARD_AMD_RADEON_HD5900}, + {"CYPRESS", CARD_AMD_RADEON_HD5800}, + {"JUNIPER", CARD_AMD_RADEON_HD5700}, + {"REDWOOD", CARD_AMD_RADEON_HD5600}, + {"CEDAR", CARD_AMD_RADEON_HD5400}, + /* R700 */ + {"R700", CARD_AMD_RADEON_HD4800}, /* HD4800 - highend */ + {"RV790", CARD_AMD_RADEON_HD4800}, + {"RV770", CARD_AMD_RADEON_HD4800}, + {"RV740", CARD_AMD_RADEON_HD4700}, /* HD4700 - midend */ + {"RV730", CARD_AMD_RADEON_HD4600}, /* HD4600 - midend */ + {"RV710", CARD_AMD_RADEON_HD4350}, /* HD4500/HD4350 - lowend */ + /* R600/R700 integrated */ + {"RS880", CARD_AMD_RADEON_HD3200}, + {"RS780", CARD_AMD_RADEON_HD3200}, + /* R600 */ + {"R680", CARD_AMD_RADEON_HD2900}, /* HD2900/HD3800 - highend */ + {"R600", CARD_AMD_RADEON_HD2900}, + {"RV670", CARD_AMD_RADEON_HD2900}, + {"RV635", CARD_AMD_RADEON_HD2600}, /* HD2600/HD3600 - midend; HD3830 is China-only midend */ + {"RV630", CARD_AMD_RADEON_HD2600}, + {"RV620", CARD_AMD_RADEON_HD2350}, /* HD2350/HD2400/HD3400 - lowend */ + {"RV610", CARD_AMD_RADEON_HD2350}, + /* R500 */ + {"R580", CARD_AMD_RADEON_X1600}, + {"R520", CARD_AMD_RADEON_X1600}, + {"RV570", CARD_AMD_RADEON_X1600}, + {"RV560", CARD_AMD_RADEON_X1600}, + {"RV535", CARD_AMD_RADEON_X1600}, + {"RV530", CARD_AMD_RADEON_X1600}, + {"RV516", CARD_AMD_RADEON_X700}, /* X700 is actually R400. */ + {"RV515", CARD_AMD_RADEON_X700}, + /* R400 */ + {"R481", CARD_AMD_RADEON_X700}, + {"R480", CARD_AMD_RADEON_X700}, + {"R430", CARD_AMD_RADEON_X700}, + {"R423", CARD_AMD_RADEON_X700}, + {"R420", CARD_AMD_RADEON_X700}, + {"R410", CARD_AMD_RADEON_X700}, + {"RV410", CARD_AMD_RADEON_X700}, + /* Radeon Xpress - onboard, DX9b, Shader 2.0, 300-400MHz */ + {"RS740", CARD_AMD_RADEON_XPRESS_200M}, + {"RS690", CARD_AMD_RADEON_XPRESS_200M}, + {"RS600", CARD_AMD_RADEON_XPRESS_200M}, + {"RS485", CARD_AMD_RADEON_XPRESS_200M}, + {"RS482", CARD_AMD_RADEON_XPRESS_200M}, + {"RS480", CARD_AMD_RADEON_XPRESS_200M}, + {"RS400", CARD_AMD_RADEON_XPRESS_200M}, + /* R300 */ + {"R360", CARD_AMD_RADEON_9500}, + {"R350", CARD_AMD_RADEON_9500}, + {"R300", CARD_AMD_RADEON_9500}, + {"RV370", CARD_AMD_RADEON_9500}, + {"RV360", CARD_AMD_RADEON_9500}, + {"RV351", CARD_AMD_RADEON_9500}, + {"RV350", CARD_AMD_RADEON_9500}, + }; - /* Radeon R730 HD4600 - midend */ - if (strstr(gl_renderer, "RV730")) /* Radeon RV730 */ + for (i = 0; i < sizeof(cards) / sizeof(*cards); ++i) { - return CARD_ATI_RADEON_HD4600; - } - - /* Radeon R710 HD4500/HD4350 - lowend */ - if (strstr(gl_renderer, "RV710")) /* Radeon RV710 */ - { - return CARD_ATI_RADEON_HD4350; - } - - /* Radeon R6xx HD2900/HD3800 - highend */ - if (strstr(gl_renderer, "R600") - || strstr(gl_renderer, "RV670") - || strstr(gl_renderer, "R680")) - { - return CARD_ATI_RADEON_HD2900; - } - - /* Radeon R6xx HD2600/HD3600 - midend; HD3830 is China-only midend */ - if (strstr(gl_renderer, "RV630") - || strstr(gl_renderer, "RV635")) - { - return CARD_ATI_RADEON_HD2600; - } - - /* Radeon R6xx HD2350/HD2400/HD3400 - lowend */ - if (strstr(gl_renderer, "RV610") - || strstr(gl_renderer, "RV620")) - { - return CARD_ATI_RADEON_HD2350; - } - - /* Radeon R6xx/R7xx integrated */ - if (strstr(gl_renderer, "RS780") - || strstr(gl_renderer, "RS880")) - { - return CARD_ATI_RADEON_HD3200; - } - - /* Radeon R5xx */ - if (strstr(gl_renderer, "RV530") - || strstr(gl_renderer, "RV535") - || strstr(gl_renderer, "RV560") - || strstr(gl_renderer, "R520") - || strstr(gl_renderer, "RV570") - || strstr(gl_renderer, "R580")) - { - return CARD_ATI_RADEON_X1600; - } - - /* Radeon R4xx + X1300/X1400/X1450/X1550/X2300 (lowend R5xx) */ - if (strstr(gl_renderer, "R410") - || strstr(gl_renderer, "R420") - || strstr(gl_renderer, "R423") - || strstr(gl_renderer, "R430") - || strstr(gl_renderer, "R480") - || strstr(gl_renderer, "R481") - || strstr(gl_renderer, "RV410") - || strstr(gl_renderer, "RV515") - || strstr(gl_renderer, "RV516")) - { - return CARD_ATI_RADEON_X700; - } - - /* Radeon Xpress Series - onboard, DX9b, Shader 2.0, 300-400MHz */ - if (strstr(gl_renderer, "RS400") - || strstr(gl_renderer, "RS480") - || strstr(gl_renderer, "RS482") - || strstr(gl_renderer, "RS485") - || strstr(gl_renderer, "RS600") - || strstr(gl_renderer, "RS690") - || strstr(gl_renderer, "RS740")) - { - return CARD_ATI_RADEON_XPRESS_200M; - } - - /* Radeon R3xx */ - if (strstr(gl_renderer, "R300") - || strstr(gl_renderer, "RV350") - || strstr(gl_renderer, "RV351") - || strstr(gl_renderer, "RV360") - || strstr(gl_renderer, "RV370") - || strstr(gl_renderer, "R350") - || strstr(gl_renderer, "R360")) - { - return CARD_ATI_RADEON_9500; /* Radeon 9500/9550/9600/9700/9800/X300/X550/X600 */ + if (strstr(gl_renderer, cards[i].renderer)) + return cards[i].id; } } if (WINE_D3D9_CAPABLE(gl_info)) { - /* Radeon R7xx HD4800 - highend */ - if (strstr(gl_renderer, "(R700") /* Radeon R7xx HD48xx generic renderer string */ - || strstr(gl_renderer, "(RV770") /* Radeon RV770 */ - || strstr(gl_renderer, "(RV790")) /* Radeon RV790 */ + static const struct { - return CARD_ATI_RADEON_HD4800; + const char *renderer; + enum wined3d_pci_device id; } - - /* Radeon R740 HD4700 - midend */ - if (strstr(gl_renderer, "(RV740")) /* Radeon RV740 */ + cards[] = { - return CARD_ATI_RADEON_HD4700; - } + /* R700 */ + {"(R700", CARD_AMD_RADEON_HD4800}, /* HD4800 - highend */ + {"(RV790", CARD_AMD_RADEON_HD4800}, + {"(RV770", CARD_AMD_RADEON_HD4800}, + {"(RV740", CARD_AMD_RADEON_HD4700}, /* HD4700 - midend */ + {"(RV730", CARD_AMD_RADEON_HD4600}, /* HD4600 - midend */ + {"(RV710", CARD_AMD_RADEON_HD4350}, /* HD4500/HD4350 - lowend */ + /* R600/R700 integrated */ + {"RS880", CARD_AMD_RADEON_HD3200}, + {"RS780", CARD_AMD_RADEON_HD3200}, + /* R600 */ + {"(R680", CARD_AMD_RADEON_HD2900}, /* HD2900/HD3800 - highend */ + {"(R600", CARD_AMD_RADEON_HD2900}, + {"(RV670", CARD_AMD_RADEON_HD2900}, + {"(RV635", CARD_AMD_RADEON_HD2600}, /* HD2600/HD3600 - midend; HD3830 is China-only midend */ + {"(RV630", CARD_AMD_RADEON_HD2600}, + {"(RV620", CARD_AMD_RADEON_HD2350}, /* HD2300/HD2400/HD3400 - lowend */ + {"(RV610", CARD_AMD_RADEON_HD2350}, + }; - /* Radeon R730 HD4600 - midend */ - if (strstr(gl_renderer, "(RV730")) /* Radeon RV730 */ + for (i = 0; i < sizeof(cards) / sizeof(*cards); ++i) { - return CARD_ATI_RADEON_HD4600; - } - - /* Radeon R710 HD4500/HD4350 - lowend */ - if (strstr(gl_renderer, "(RV710")) /* Radeon RV710 */ - { - return CARD_ATI_RADEON_HD4350; - } - - /* Radeon R6xx HD2900/HD3800 - highend */ - if (strstr(gl_renderer, "(R600") - || strstr(gl_renderer, "(RV670") - || strstr(gl_renderer, "(R680")) - { - return CARD_ATI_RADEON_HD2900; - } - - /* Radeon R6xx HD2600/HD3600 - midend; HD3830 is China-only midend */ - if (strstr(gl_renderer, "(RV630") - || strstr(gl_renderer, "(RV635")) - { - return CARD_ATI_RADEON_HD2600; - } - - /* Radeon R6xx HD2300/HD2400/HD3400 - lowend */ - if (strstr(gl_renderer, "(RV610") - || strstr(gl_renderer, "(RV620")) - { - return CARD_ATI_RADEON_HD2350; - } - - /* Radeon R6xx/R7xx integrated */ - if (strstr(gl_renderer, "(RS780") - || strstr(gl_renderer, "(RS880")) - { - return CARD_ATI_RADEON_HD3200; + if (strstr(gl_renderer, cards[i].renderer)) + return cards[i].id; } } if (WINE_D3D8_CAPABLE(gl_info)) { - return CARD_ATI_RADEON_8500; /* Radeon 8500/9000/9100/9200/9300 */ + return CARD_AMD_RADEON_8500; /* Radeon 8500/9000/9100/9200/9300 */ } if (WINE_D3D7_CAPABLE(gl_info)) { - return CARD_ATI_RADEON_7200; /* Radeon 7000/7100/7200/7500 */ + return CARD_AMD_RADEON_7200; /* Radeon 7000/7100/7200/7500 */ } - return CARD_ATI_RAGE_128PRO; + return CARD_AMD_RAGE_128PRO; } static enum wined3d_pci_device select_card_nvidia_mesa(const struct wined3d_gl_info *gl_info, const char *gl_renderer) { - FIXME_(d3d_caps)("Card selection not handled for Mesa Nouveau driver\n"); + if (strstr(gl_renderer, "Gallium")) + { + unsigned int i; + + static const struct + { + const char *renderer; + enum wined3d_pci_device id; + } + cards[] = + { + {"NVC8", CARD_NVIDIA_GEFORCE_GTX570}, + {"NVC4", CARD_NVIDIA_GEFORCE_GTX460}, + {"NVC3", CARD_NVIDIA_GEFORCE_GT440}, + {"NVC0", CARD_NVIDIA_GEFORCE_GTX480}, + {"NVAF", CARD_NVIDIA_GEFORCE_GT320M}, + {"NVAC", CARD_NVIDIA_GEFORCE_8200}, + {"NVAA", CARD_NVIDIA_GEFORCE_8200}, + {"NVA8", CARD_NVIDIA_GEFORCE_210}, + {"NVA5", CARD_NVIDIA_GEFORCE_GT220}, + {"NVA3", CARD_NVIDIA_GEFORCE_GT240}, + {"NVA0", CARD_NVIDIA_GEFORCE_GTX280}, + {"NV98", CARD_NVIDIA_GEFORCE_9200}, + {"NV96", CARD_NVIDIA_GEFORCE_9400GT}, + {"NV94", CARD_NVIDIA_GEFORCE_9600GT}, + {"NV92", CARD_NVIDIA_GEFORCE_9800GT}, + {"NV86", CARD_NVIDIA_GEFORCE_8500GT}, + {"NV84", CARD_NVIDIA_GEFORCE_8600GT}, + {"NV68", CARD_NVIDIA_GEFORCE_6200}, /* 7050 */ + {"NV67", CARD_NVIDIA_GEFORCE_6200}, /* 7000M */ + {"NV63", CARD_NVIDIA_GEFORCE_6200}, /* 7100 */ + {"NV50", CARD_NVIDIA_GEFORCE_8800GTX}, + {"NV4E", CARD_NVIDIA_GEFORCE_6200}, /* 6100 Go / 6150 Go */ + {"NV4C", CARD_NVIDIA_GEFORCE_6200}, /* 6150SE */ + {"NV4B", CARD_NVIDIA_GEFORCE_7600}, + {"NV4A", CARD_NVIDIA_GEFORCE_6200}, + {"NV49", CARD_NVIDIA_GEFORCE_7800GT}, /* 7900 */ + {"NV47", CARD_NVIDIA_GEFORCE_7800GT}, + {"NV46", CARD_NVIDIA_GEFORCE_7400}, + {"NV45", CARD_NVIDIA_GEFORCE_6800}, + {"NV44", CARD_NVIDIA_GEFORCE_6200}, + {"NV43", CARD_NVIDIA_GEFORCE_6600GT}, + {"NV42", CARD_NVIDIA_GEFORCE_6800}, + {"NV41", CARD_NVIDIA_GEFORCE_6800}, + {"NV40", CARD_NVIDIA_GEFORCE_6800}, + {"NV38", CARD_NVIDIA_GEFORCEFX_5800}, /* FX 5950 Ultra */ + {"NV36", CARD_NVIDIA_GEFORCEFX_5800}, /* FX 5700/5750 */ + {"NV35", CARD_NVIDIA_GEFORCEFX_5800}, /* FX 5900 */ + {"NV34", CARD_NVIDIA_GEFORCEFX_5200}, + {"NV31", CARD_NVIDIA_GEFORCEFX_5600}, + {"NV30", CARD_NVIDIA_GEFORCEFX_5800}, + {"NV28", CARD_NVIDIA_GEFORCE4_TI4200}, + {"NV25", CARD_NVIDIA_GEFORCE4_TI4200}, + {"NV20", CARD_NVIDIA_GEFORCE3}, + {"NV1F", CARD_NVIDIA_GEFORCE4_MX}, /* GF4 MX IGP */ + {"NV1A", CARD_NVIDIA_GEFORCE2}, /* GF2 IGP */ + {"NV18", CARD_NVIDIA_GEFORCE4_MX}, + {"NV17", CARD_NVIDIA_GEFORCE4_MX}, + {"NV16", CARD_NVIDIA_GEFORCE2}, + {"NV15", CARD_NVIDIA_GEFORCE2}, + {"NV11", CARD_NVIDIA_GEFORCE2_MX}, + {"NV10", CARD_NVIDIA_GEFORCE}, + {"NV05", CARD_NVIDIA_RIVA_TNT2}, + {"NV04", CARD_NVIDIA_RIVA_TNT}, + {"NV03", CARD_NVIDIA_RIVA_128}, + }; + + for (i = 0; i < sizeof(cards) / sizeof(*cards); ++i) + { + if (strstr(gl_renderer, cards[i].renderer)) + return cards[i].id; + } + } + + FIXME_(d3d_caps)("Unknown renderer %s.\n", debugstr_a(gl_renderer)); if (WINE_D3D9_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCEFX_5600; if (WINE_D3D8_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE3; if (WINE_D3D7_CAPABLE(gl_info)) return CARD_NVIDIA_GEFORCE; @@ -2059,10 +1963,10 @@ static const struct vendor_card_selection vendor_card_select_table[] = { {GL_VENDOR_NVIDIA, HW_VENDOR_NVIDIA, "Nvidia binary driver", select_card_nvidia_binary}, {GL_VENDOR_APPLE, HW_VENDOR_NVIDIA, "Apple OSX NVidia binary driver", select_card_nvidia_binary}, - {GL_VENDOR_APPLE, HW_VENDOR_ATI, "Apple OSX AMD/ATI binary driver", select_card_ati_binary}, + {GL_VENDOR_APPLE, HW_VENDOR_AMD, "Apple OSX AMD/ATI binary driver", select_card_amd_binary}, {GL_VENDOR_APPLE, HW_VENDOR_INTEL, "Apple OSX Intel binary driver", select_card_intel}, - {GL_VENDOR_FGLRX, HW_VENDOR_ATI, "AMD/ATI binary driver", select_card_ati_binary}, - {GL_VENDOR_MESA, HW_VENDOR_ATI, "Mesa AMD/ATI driver", select_card_ati_mesa}, + {GL_VENDOR_FGLRX, HW_VENDOR_AMD, "AMD/ATI binary driver", select_card_amd_binary}, + {GL_VENDOR_MESA, HW_VENDOR_AMD, "Mesa AMD/ATI driver", select_card_amd_mesa}, {GL_VENDOR_MESA, HW_VENDOR_NVIDIA, "Mesa Nouveau driver", select_card_nvidia_mesa}, {GL_VENDOR_MESA, HW_VENDOR_INTEL, "Mesa Intel driver", select_card_intel}, {GL_VENDOR_INTEL, HW_VENDOR_INTEL, "Mesa Intel driver", select_card_intel} @@ -2167,7 +2071,7 @@ static const struct fragment_pipeline *select_fragment_implementation(struct win else return &ffp_fragment_pipeline; } -static const shader_backend_t *select_shader_backend(struct wined3d_adapter *adapter) +static const struct wined3d_shader_backend_ops *select_shader_backend(struct wined3d_adapter *adapter) { int vs_selected_mode, ps_selected_mode; @@ -2750,6 +2654,10 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) gl_info->supported[WGL_ARB_PIXEL_FORMAT] = TRUE; TRACE_(d3d_caps)("FOUND: WGL_ARB_pixel_format support\n"); } + if (!strcmp(ThisExtn, "WGL_EXT_swap_control")) { + gl_info->supported[WGL_EXT_SWAP_CONTROL] = TRUE; + TRACE_(d3d_caps)("FOUND: WGL_EXT_swap_control support\n"); + } if (!strcmp(ThisExtn, "WGL_WINE_pixel_format_passthrough")) { gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH] = TRUE; TRACE_(d3d_caps)("FOUND: WGL_WINE_pixel_format_passthrough support\n"); @@ -2765,55 +2673,47 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) return TRUE; } -/********************************************************** - * IWineD3D implementation follows - **********************************************************/ +UINT CDECL wined3d_get_adapter_count(const struct wined3d *wined3d) +{ + TRACE_(d3d_caps)("wined3d %p, reporting %u adapters.\n", + wined3d, wined3d->adapter_count); -static UINT WINAPI IWineD3DImpl_GetAdapterCount (IWineD3D *iface) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - - TRACE_(d3d_caps)("(%p): Reporting %u adapters\n", This, This->adapter_count); - - return This->adapter_count; + return wined3d->adapter_count; } -static HRESULT WINAPI IWineD3DImpl_RegisterSoftwareDevice(IWineD3D *iface, void *init_function) +HRESULT CDECL wined3d_register_software_device(struct wined3d *wined3d, void *init_function) { - FIXME("iface %p, init_function %p stub!\n", iface, init_function); + FIXME("wined3d %p, init_function %p stub!\n", wined3d, init_function); return WINED3D_OK; } -static HMONITOR WINAPI IWineD3DImpl_GetAdapterMonitor(IWineD3D *iface, UINT Adapter) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; +HMONITOR CDECL wined3d_get_adapter_monitor(const struct wined3d *wined3d, UINT adapter_idx) +{ + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u.\n", wined3d, adapter_idx); - TRACE_(d3d_caps)("(%p)->(%d)\n", This, Adapter); - - if (Adapter >= IWineD3DImpl_GetAdapterCount(iface)) { + if (adapter_idx >= wined3d->adapter_count) return NULL; - } - return MonitorFromPoint(This->adapters[Adapter].monitorPoint, MONITOR_DEFAULTTOPRIMARY); + return MonitorFromPoint(wined3d->adapters[adapter_idx].monitorPoint, MONITOR_DEFAULTTOPRIMARY); } /* FIXME: GetAdapterModeCount and EnumAdapterModes currently only returns modes of the same bpp but different resolutions */ /* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */ -static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Adapter, enum wined3d_format_id format_id) +UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT adapter_idx, + enum wined3d_format_id format_id) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, format %s.\n", wined3d, adapter_idx, debug_d3dformat(format_id)); - TRACE_(d3d_caps)("iface %p, adapter %u, format_id: %s.\n", iface, Adapter, debug_d3dformat(format_id)); - - if (Adapter >= IWineD3D_GetAdapterCount(iface)) { + if (adapter_idx >= wined3d->adapter_count) return 0; - } /* TODO: Store modes per adapter and read it from the adapter structure */ - if (Adapter == 0) + if (!adapter_idx) { - const struct wined3d_format *format = wined3d_get_format(&This->adapters[Adapter].gl_info, format_id); + const struct wined3d_format *format = wined3d_get_format(&wined3d->adapters[adapter_idx].gl_info, format_id); UINT format_bits = format->byte_count * CHAR_BIT; unsigned int i = 0; unsigned int j = 0; @@ -2837,34 +2737,36 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Adapte } } - TRACE_(d3d_caps)("(%p}->(Adapter: %d) => %d (out of %d)\n", This, Adapter, i, j); + TRACE_(d3d_caps)("Returning %u matching modes (out of %u total) for adapter %u.\n", i, j, adapter_idx); + return i; - } else { - FIXME_(d3d_caps)("Adapter not primary display\n"); } + else + { + FIXME_(d3d_caps)("Adapter not primary display.\n"); + } + return 0; } /* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */ -static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, - enum wined3d_format_id format_id, UINT Mode, WINED3DDISPLAYMODE *pMode) +HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT adapter_idx, + enum wined3d_format_id format_id, UINT mode_idx, WINED3DDISPLAYMODE *mode) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - - TRACE_(d3d_caps)("iface %p, adapter_idx %u, format %s, mode_idx %u, mode %p.\n", - iface, Adapter, debug_d3dformat(format_id), Mode, pMode); + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, format %s, mode_idx %u, mode %p.\n", + wined3d, adapter_idx, debug_d3dformat(format_id), mode_idx, mode); /* Validate the parameters as much as possible */ - if (!pMode || Adapter >= IWineD3DImpl_GetAdapterCount(iface) - || Mode >= IWineD3DImpl_GetAdapterModeCount(iface, Adapter, format_id)) + if (!mode || adapter_idx >= wined3d->adapter_count + || mode_idx >= wined3d_get_adapter_mode_count(wined3d, adapter_idx, format_id)) { return WINED3DERR_INVALIDCALL; } /* TODO: Store modes per adapter and read it from the adapter structure */ - if (Adapter == 0) + if (!adapter_idx) { - const struct wined3d_format *format = wined3d_get_format(&This->adapters[Adapter].gl_info, format_id); + const struct wined3d_format *format = wined3d_get_format(&wined3d->adapters[adapter_idx].gl_info, format_id); UINT format_bits = format->byte_count * CHAR_BIT; DEVMODEW DevModeW; int ModeIdx = 0; @@ -2877,7 +2779,7 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte /* If we are filtering to a specific format (D3D9), then need to skip all unrelated modes, but if mode is irrelevant (D3D8), then we can just count through the ones with valid bit depths */ - while ((i<=Mode) && EnumDisplaySettingsExW(NULL, j++, &DevModeW, 0)) + while (i <= mode_idx && EnumDisplaySettingsExW(NULL, j++, &DevModeW, 0)) { if (format_id == WINED3DFMT_UNKNOWN) { @@ -2898,28 +2800,28 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte ModeIdx = j - 1; /* Now get the display mode via the calculated index */ - if (EnumDisplaySettingsExW(NULL, ModeIdx, &DevModeW, 0)) { - pMode->Width = DevModeW.dmPelsWidth; - pMode->Height = DevModeW.dmPelsHeight; - pMode->RefreshRate = DEFAULT_REFRESH_RATE; + if (EnumDisplaySettingsExW(NULL, ModeIdx, &DevModeW, 0)) + { + mode->Width = DevModeW.dmPelsWidth; + mode->Height = DevModeW.dmPelsHeight; + mode->RefreshRate = DEFAULT_REFRESH_RATE; if (DevModeW.dmFields & DM_DISPLAYFREQUENCY) - pMode->RefreshRate = DevModeW.dmDisplayFrequency; + mode->RefreshRate = DevModeW.dmDisplayFrequency; if (format_id == WINED3DFMT_UNKNOWN) - pMode->Format = pixelformat_for_depth(DevModeW.dmBitsPerPel); + mode->Format = pixelformat_for_depth(DevModeW.dmBitsPerPel); else - pMode->Format = format_id; + mode->Format = format_id; } else { - TRACE_(d3d_caps)("Requested mode out of range %d\n", Mode); + TRACE_(d3d_caps)("Requested mode %u out of range.\n", mode_idx); return WINED3DERR_INVALIDCALL; } - TRACE_(d3d_caps)("W %d H %d rr %d fmt (%x - %s) bpp %u\n", pMode->Width, pMode->Height, - pMode->RefreshRate, pMode->Format, debug_d3dformat(pMode->Format), - DevModeW.dmBitsPerPel); - + TRACE_(d3d_caps)("W %d H %d rr %d fmt (%x - %s) bpp %u\n", + mode->Width, mode->Height, mode->RefreshRate, mode->Format, + debug_d3dformat(mode->Format), DevModeW.dmBitsPerPel); } else { @@ -2929,115 +2831,116 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte return WINED3D_OK; } -static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT Adapter, WINED3DDISPLAYMODE *pMode) +HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDISPLAYMODE *mode) { - TRACE("iface %p, adapter_idx %u, display_mode %p.\n", iface, Adapter, pMode); + TRACE("wined3d %p, adapter_idx %u, display_mode %p.\n", wined3d, adapter_idx, mode); - if (!pMode || Adapter >= IWineD3D_GetAdapterCount(iface)) + if (!mode || adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - if (Adapter == 0) { /* Display */ - int bpp = 0; + if (!adapter_idx) + { DEVMODEW DevModeW; + unsigned int bpp; ZeroMemory(&DevModeW, sizeof(DevModeW)); DevModeW.dmSize = sizeof(DevModeW); EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &DevModeW, 0); - pMode->Width = DevModeW.dmPelsWidth; - pMode->Height = DevModeW.dmPelsHeight; - bpp = DevModeW.dmBitsPerPel; - pMode->RefreshRate = DEFAULT_REFRESH_RATE; + mode->Width = DevModeW.dmPelsWidth; + mode->Height = DevModeW.dmPelsHeight; + bpp = DevModeW.dmBitsPerPel; + mode->RefreshRate = DEFAULT_REFRESH_RATE; if (DevModeW.dmFields&DM_DISPLAYFREQUENCY) - { - pMode->RefreshRate = DevModeW.dmDisplayFrequency; - } - - pMode->Format = pixelformat_for_depth(bpp); - } else { + mode->RefreshRate = DevModeW.dmDisplayFrequency; + mode->Format = pixelformat_for_depth(bpp); + } + else + { FIXME_(d3d_caps)("Adapter not primary display\n"); } - TRACE_(d3d_caps)("returning w:%d, h:%d, ref:%d, fmt:%s\n", pMode->Width, - pMode->Height, pMode->RefreshRate, debug_d3dformat(pMode->Format)); + TRACE_(d3d_caps)("returning w:%d, h:%d, ref:%d, fmt:%s\n", mode->Width, + mode->Height, mode->RefreshRate, debug_d3dformat(mode->Format)); return WINED3D_OK; } /* NOTE: due to structure differences between dx8 and dx9 D3DADAPTER_IDENTIFIER, and fields being inserted in the middle, a new structure is used in place */ -static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, DWORD Flags, - WINED3DADAPTER_IDENTIFIER* pIdentifier) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - struct wined3d_adapter *adapter; +HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d, + UINT adapter_idx, DWORD flags, WINED3DADAPTER_IDENTIFIER *identifier) +{ + const struct wined3d_adapter *adapter; size_t len; - TRACE_(d3d_caps)("(%p}->(Adapter: %d, Flags: %x, pId=%p)\n", This, Adapter, Flags, pIdentifier); + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, flags %#x, indentifier %p.\n", + wined3d, adapter_idx, flags, identifier); - if (Adapter >= IWineD3D_GetAdapterCount(iface)) { + if (adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - } - adapter = &This->adapters[Adapter]; + adapter = &wined3d->adapters[adapter_idx]; /* Return the information requested */ TRACE_(d3d_caps)("device/Vendor Name and Version detection using FillGLCaps\n"); - if (pIdentifier->driver_size) + if (identifier->driver_size) { const char *name = adapter->driver_info.name; - len = min(strlen(name), pIdentifier->driver_size - 1); - memcpy(pIdentifier->driver, name, len); - pIdentifier->driver[len] = '\0'; + len = min(strlen(name), identifier->driver_size - 1); + memcpy(identifier->driver, name, len); + identifier->driver[len] = '\0'; } - if (pIdentifier->description_size) + if (identifier->description_size) { const char *description = adapter->driver_info.description; - len = min(strlen(description), pIdentifier->description_size - 1); - memcpy(pIdentifier->description, description, len); - pIdentifier->description[len] = '\0'; + len = min(strlen(description), identifier->description_size - 1); + memcpy(identifier->description, description, len); + identifier->description[len] = '\0'; } /* Note that d3d8 doesn't supply a device name. */ - if (pIdentifier->device_name_size) + if (identifier->device_name_size) { static const char *device_name = "\\\\.\\DISPLAY1"; /* FIXME: May depend on desktop? */ len = strlen(device_name); - if (len >= pIdentifier->device_name_size) + if (len >= identifier->device_name_size) { ERR("Device name size too small.\n"); return WINED3DERR_INVALIDCALL; } - memcpy(pIdentifier->device_name, device_name, len); - pIdentifier->device_name[len] = '\0'; + memcpy(identifier->device_name, device_name, len); + identifier->device_name[len] = '\0'; } - pIdentifier->driver_version.u.HighPart = adapter->driver_info.version_high; - pIdentifier->driver_version.u.LowPart = adapter->driver_info.version_low; - pIdentifier->vendor_id = adapter->driver_info.vendor; - pIdentifier->device_id = adapter->driver_info.device; - pIdentifier->subsystem_id = 0; - pIdentifier->revision = 0; - memcpy(&pIdentifier->device_identifier, &IID_D3DDEVICE_D3DUID, sizeof(pIdentifier->device_identifier)); - pIdentifier->whql_level = (Flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1; - memcpy(&pIdentifier->adapter_luid, &adapter->luid, sizeof(pIdentifier->adapter_luid)); - pIdentifier->video_memory = adapter->TextureRam; + identifier->driver_version.u.HighPart = adapter->driver_info.version_high; + identifier->driver_version.u.LowPart = adapter->driver_info.version_low; + identifier->vendor_id = adapter->driver_info.vendor; + identifier->device_id = adapter->driver_info.device; + identifier->subsystem_id = 0; + identifier->revision = 0; + memcpy(&identifier->device_identifier, &IID_D3DDEVICE_D3DUID, sizeof(identifier->device_identifier)); + identifier->whql_level = (flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1; + memcpy(&identifier->adapter_luid, &adapter->luid, sizeof(identifier->adapter_luid)); + identifier->video_memory = adapter->TextureRam; return WINED3D_OK; } static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined3d_gl_info *gl_info, - const WineD3D_PixelFormat *cfg, const struct wined3d_format *format) + const struct wined3d_pixel_format *cfg, const struct wined3d_format *format) { - short redSize, greenSize, blueSize, alphaSize, colorBits; + BYTE redSize, greenSize, blueSize, alphaSize, colorBits; if(!cfg) return FALSE; /* Float formats need FBOs. If FBOs are used this function isn't called */ - if (format->Flags & WINED3DFMT_FLAG_FLOAT) return FALSE; + if (format->flags & WINED3DFMT_FLAG_FLOAT) return FALSE; if(cfg->iPixelType == WGL_TYPE_RGBA_ARB) { /* Integer RGBA formats */ if (!getColorBits(format, &redSize, &greenSize, &blueSize, &alphaSize, &colorBits)) @@ -3066,9 +2969,9 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined } static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3d_gl_info *gl_info, - const WineD3D_PixelFormat *cfg, const struct wined3d_format *format) + const struct wined3d_pixel_format *cfg, const struct wined3d_format *format) { - short depthSize, stencilSize; + BYTE depthSize, stencilSize; BOOL lockable = FALSE; if(!cfg) @@ -3081,7 +2984,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3 } /* Float formats need FBOs. If FBOs are used this function isn't called */ - if (format->Flags & WINED3DFMT_FLAG_FLOAT) return FALSE; + if (format->flags & WINED3DFMT_FLAG_FLOAT) return FALSE; if ((format->id == WINED3DFMT_D16_LOCKABLE) || (format->id == WINED3DFMT_D32_FLOAT)) lockable = TRUE; @@ -3100,138 +3003,136 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3 return TRUE; } -static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, - UINT Adapter, WINED3DDEVTYPE DeviceType, enum wined3d_format_id AdapterFormat, - enum wined3d_format_id RenderTargetFormat, enum wined3d_format_id DepthStencilFormat) +HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d, + UINT adapter_idx, WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, + enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - int nCfgs; - const WineD3D_PixelFormat *cfgs; - const struct wined3d_adapter *adapter; const struct wined3d_format *rt_format; const struct wined3d_format *ds_format; - int it; + const struct wined3d_adapter *adapter; - WARN_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%x,%s), AdptFmt:(%x,%s), RendrTgtFmt:(%x,%s), DepthStencilFmt:(%x,%s))\n", - This, Adapter, - DeviceType, debug_d3ddevicetype(DeviceType), - AdapterFormat, debug_d3dformat(AdapterFormat), - RenderTargetFormat, debug_d3dformat(RenderTargetFormat), - DepthStencilFormat, debug_d3dformat(DepthStencilFormat)); + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, device_type %s,\n" + "adapter_format %s, render_target_format %s, depth_stencil_format %s.\n", + wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(adapter_format_id), + debug_d3dformat(render_target_format_id), debug_d3dformat(depth_stencil_format_id)); - if (Adapter >= IWineD3D_GetAdapterCount(iface)) { - TRACE("(%p) Failed: Atapter (%u) higher than supported adapters (%u) returning WINED3DERR_INVALIDCALL\n", This, Adapter, IWineD3D_GetAdapterCount(iface)); + if (adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - } - adapter = &This->adapters[Adapter]; - rt_format = wined3d_get_format(&adapter->gl_info, RenderTargetFormat); - ds_format = wined3d_get_format(&adapter->gl_info, DepthStencilFormat); + adapter = &wined3d->adapters[adapter_idx]; + rt_format = wined3d_get_format(&adapter->gl_info, render_target_format_id); + ds_format = wined3d_get_format(&adapter->gl_info, depth_stencil_format_id); if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - if ((rt_format->Flags & WINED3DFMT_FLAG_RENDERTARGET) - && (ds_format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))) + if ((rt_format->flags & WINED3DFMT_FLAG_RENDERTARGET) + && (ds_format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))) { - TRACE_(d3d_caps)("(%p) : Formats matched\n", This); + TRACE_(d3d_caps)("Formats match.\n"); return WINED3D_OK; } } else { + const struct wined3d_pixel_format *cfgs; + unsigned int cfg_count; + unsigned int i; + cfgs = adapter->cfgs; - nCfgs = adapter->nCfgs; - for (it = 0; it < nCfgs; ++it) + cfg_count = adapter->nCfgs; + for (i = 0; i < cfg_count; ++i) { - if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, &cfgs[it], rt_format)) + if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, &cfgs[i], rt_format)) { - if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, &cfgs[it], ds_format)) + if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, &cfgs[i], ds_format)) { - TRACE_(d3d_caps)("(%p) : Formats matched\n", This); + TRACE_(d3d_caps)("Formats match.\n"); return WINED3D_OK; } } } } - WARN_(d3d_caps)("unsupported format pair: %s and %s\n", debug_d3dformat(RenderTargetFormat), debug_d3dformat(DepthStencilFormat)); + + TRACE_(d3d_caps)("Unsupported format pair: %s and %s.\n", + debug_d3dformat(render_target_format_id), + debug_d3dformat(depth_stencil_format_id)); return WINED3DERR_NOTAVAILABLE; } -static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Adapter, - WINED3DDEVTYPE DeviceType, enum wined3d_format_id SurfaceFormat, BOOL Windowed, - WINED3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels) +HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, enum wined3d_format_id surface_format_id, BOOL windowed, + WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; const struct wined3d_adapter *adapter; const struct wined3d_format *format; - TRACE_(d3d_caps)("(%p)-> (Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x, pQual:%p)\n", - This, - Adapter, - DeviceType, debug_d3ddevicetype(DeviceType), - SurfaceFormat, debug_d3dformat(SurfaceFormat), - Windowed, - MultiSampleType, - pQualityLevels); + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, device_type %s, surface_format %s,\n" + "windowed %#x, multisample_type %#x, quality_levels %p.\n", + wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(surface_format_id), + windowed, multisample_type, quality_levels); - if (Adapter >= IWineD3D_GetAdapterCount(iface)) { + if (adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - } - /* TODO: handle Windowed, add more quality levels */ + /* TODO: Handle windowed, add more quality levels. */ - if (WINED3DMULTISAMPLE_NONE == MultiSampleType) { - if(pQualityLevels) *pQualityLevels = 1; + if (WINED3DMULTISAMPLE_NONE == multisample_type) + { + if (quality_levels) *quality_levels = 1; return WINED3D_OK; } /* By default multisampling is disabled right now as it causes issues * on some Nvidia driver versions and it doesn't work well in combination * with FBOs yet. */ - if(!wined3d_settings.allow_multisampling) + if (!wined3d_settings.allow_multisampling) return WINED3DERR_NOTAVAILABLE; - adapter = &This->adapters[Adapter]; - format = wined3d_get_format(&adapter->gl_info, SurfaceFormat); + adapter = &wined3d->adapters[adapter_idx]; + format = wined3d_get_format(&adapter->gl_info, surface_format_id); if (!format) return WINED3DERR_INVALIDCALL; - if (format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) + if (format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) { - int i, nCfgs; - const WineD3D_PixelFormat *cfgs; + const struct wined3d_pixel_format *cfgs; + unsigned int i, cfg_count; cfgs = adapter->cfgs; - nCfgs = adapter->nCfgs; - for(i=0; inCfgs; + for (i = 0; i < cfg_count; ++i) + { + if(cfgs[i].numSamples != multisample_type) continue; if (!IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, &cfgs[i], format)) continue; - TRACE("Found iPixelFormat=%d to support MultiSampleType=%d for format %s\n", cfgs[i].iPixelFormat, MultiSampleType, debug_d3dformat(SurfaceFormat)); + TRACE("Found pixel format %u to support multisample_type %#x for format %s.\n", + cfgs[i].iPixelFormat, multisample_type, debug_d3dformat(surface_format_id)); + + if (quality_levels) *quality_levels = 1; - if(pQualityLevels) - *pQualityLevels = 1; /* Guess at a value! */ return WINED3D_OK; } } - else if (format->Flags & WINED3DFMT_FLAG_RENDERTARGET) + else if (format->flags & WINED3DFMT_FLAG_RENDERTARGET) { - short redSize, greenSize, blueSize, alphaSize, colorBits; - int i, nCfgs; - const WineD3D_PixelFormat *cfgs; + BYTE redSize, greenSize, blueSize, alphaSize, colorBits; + const struct wined3d_pixel_format *cfgs; + unsigned int i, cfg_count; if (!getColorBits(format, &redSize, &greenSize, &blueSize, &alphaSize, &colorBits)) { - ERR("Unable to color bits for format %#x, can't check multisampling capability!\n", SurfaceFormat); + ERR("Unable to get color bits for format %s, can't check multisampling capability.\n", + debug_d3dformat(surface_format_id)); return WINED3DERR_NOTAVAILABLE; } cfgs = adapter->cfgs; - nCfgs = adapter->nCfgs; - for(i=0; inCfgs; + for (i = 0; i < cfg_count; ++i) + { + if(cfgs[i].numSamples != multisample_type) continue; if(cfgs[i].redSize != redSize) continue; @@ -3239,16 +3140,18 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U continue; if(cfgs[i].blueSize != blueSize) continue; - /* Not all drivers report alpha-less formats since they use 32-bit anyway, so accept alpha even if we didn't ask for it. */ + /* Not all drivers report alpha-less formats since they use 32-bit + * anyway, so accept alpha even if we didn't ask for it. */ if(alphaSize && cfgs[i].alphaSize != alphaSize) continue; if (cfgs[i].colorSize != (format->byte_count << 3)) continue; - TRACE("Found iPixelFormat=%d to support MultiSampleType=%d for format %s\n", cfgs[i].iPixelFormat, MultiSampleType, debug_d3dformat(SurfaceFormat)); + TRACE("Found pixel format %u to support multisample_type %#x for format %s.\n", + cfgs[i].iPixelFormat, multisample_type, debug_d3dformat(surface_format_id)); + + if (quality_levels) *quality_levels = 1; - if(pQualityLevels) - *pQualityLevels = 1; /* Guess at a value! */ return WINED3D_OK; } } @@ -3256,17 +3159,17 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, U } /* Check if we support bumpmapping for a format */ -static BOOL CheckBumpMapCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format) +static BOOL CheckBumpMapCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { /* Ask the fixed function pipeline implementation if it can deal * with the conversion. If we've got a GL extension giving native * support this will be an identity conversion. */ - return (format->Flags & WINED3DFMT_FLAG_BUMPMAP) + return (format->flags & WINED3DFMT_FLAG_BUMPMAP) && adapter->fragment_pipe->color_fixup_supported(format->color_fixup); } /* Check if the given DisplayFormat + DepthStencilFormat combination is valid for the Adapter */ -static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter, +static BOOL CheckDepthStencilCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *display_format, const struct wined3d_format *ds_format) { int it=0; @@ -3277,14 +3180,14 @@ static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter, if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { /* With FBOs WGL limitations do not apply, but the format needs to be FBO attachable */ - if (ds_format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) return TRUE; + if (ds_format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) return TRUE; } else { /* Walk through all WGL pixel formats to find a match */ for (it = 0; it < adapter->nCfgs; ++it) { - WineD3D_PixelFormat *cfg = &adapter->cfgs[it]; + const struct wined3d_pixel_format *cfg = &adapter->cfgs[it]; if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, cfg, display_format)) { if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, cfg, ds_format)) @@ -3298,26 +3201,26 @@ static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter, return FALSE; } -static BOOL CheckFilterCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format) +static BOOL CheckFilterCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { /* The flags entry of a format contains the filtering capability */ - if (format->Flags & WINED3DFMT_FLAG_FILTERING) return TRUE; + if (format->flags & WINED3DFMT_FLAG_FILTERING) return TRUE; return FALSE; } /* Check the render target capabilities of a format */ -static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter, +static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *adapter_format, const struct wined3d_format *check_format) { /* Filter out non-RT formats */ - if (!(check_format->Flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE; + if (!(check_format->flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE; if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) { - WineD3D_PixelFormat *cfgs = adapter->cfgs; + BYTE AdapterRed, AdapterGreen, AdapterBlue, AdapterAlpha, AdapterTotalSize; + BYTE CheckRed, CheckGreen, CheckBlue, CheckAlpha, CheckTotalSize; + const struct wined3d_pixel_format *cfgs = adapter->cfgs; int it; - short AdapterRed, AdapterGreen, AdapterBlue, AdapterAlpha, AdapterTotalSize; - short CheckRed, CheckGreen, CheckBlue, CheckAlpha, CheckTotalSize; getColorBits(adapter_format, &AdapterRed, &AdapterGreen, &AdapterBlue, &AdapterAlpha, &AdapterTotalSize); getColorBits(check_format, &CheckRed, &CheckGreen, &CheckBlue, &CheckAlpha, &CheckTotalSize); @@ -3351,17 +3254,17 @@ static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter, return FALSE; } -static BOOL CheckSrgbReadCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format) +static BOOL CheckSrgbReadCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { - return adapter->gl_info.supported[EXT_TEXTURE_SRGB] && (format->Flags & WINED3DFMT_FLAG_SRGB_READ); + return format->flags & WINED3DFMT_FLAG_SRGB_READ; } -static BOOL CheckSrgbWriteCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format) +static BOOL CheckSrgbWriteCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { /* Only offer SRGB writing on X8R8G8B8/A8R8G8B8 when we use ARB or GLSL shaders as we are * doing the color fixup in shaders. * Note Windows drivers (at least on the Geforce 8800) also offer this on R5G6B5. */ - if (format->Flags & WINED3DFMT_FLAG_SRGB_WRITE) + if (format->flags & WINED3DFMT_FLAG_SRGB_WRITE) { int vs_selected_mode; int ps_selected_mode; @@ -3378,16 +3281,16 @@ static BOOL CheckSrgbWriteCapability(struct wined3d_adapter *adapter, const stru } /* Check if a format support blending in combination with pixel shaders */ -static BOOL CheckPostPixelShaderBlendingCapability(struct wined3d_adapter *adapter, +static BOOL CheckPostPixelShaderBlendingCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { /* The flags entry of a format contains the post pixel shader blending capability */ - if (format->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) return TRUE; + if (format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) return TRUE; return FALSE; } -static BOOL CheckWrapAndMipCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format) +static BOOL CheckWrapAndMipCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { /* OpenGL supports mipmapping on all formats basically. Wrapping is unsupported, * but we have to report mipmapping so we cannot reject this flag. Tests show that @@ -3402,7 +3305,7 @@ static BOOL CheckWrapAndMipCapability(struct wined3d_adapter *adapter, const str } /* Check if a texture format is supported on the given adapter */ -static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct wined3d_format *format) +static BOOL CheckTextureCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { const struct wined3d_gl_info *gl_info = &adapter->gl_info; @@ -3470,6 +3373,12 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct case WINED3DFMT_D32_FLOAT: return TRUE; + case WINED3DFMT_INTZ: + if (gl_info->supported[EXT_PACKED_DEPTH_STENCIL] + || gl_info->supported[ARB_FRAMEBUFFER_OBJECT]) + return TRUE; + return FALSE; + /***** * Not supported everywhere(depends on GL_ATI_envmap_bumpmap or * GL_NV_texture_shader). Emulated by shaders @@ -3637,6 +3546,11 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct TRACE_(d3d_caps)("[FAILED]\n"); return FALSE; + case WINED3DFMT_NULL: + if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT]) + return TRUE; + return FALSE; + case WINED3DFMT_UNKNOWN: return FALSE; @@ -3647,7 +3561,7 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct return FALSE; } -static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, +static BOOL CheckSurfaceCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *adapter_format, const struct wined3d_format *check_format, WINED3DSURFTYPE SurfaceType) @@ -3688,7 +3602,7 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, if (CheckDepthStencilCapability(adapter, adapter_format, check_format)) return TRUE; /* If opengl can't process the format natively, the blitter may be able to convert it */ - if (adapter->blitter->blit_supported(&adapter->gl_info, BLIT_OP_BLIT, + if (adapter->blitter->blit_supported(&adapter->gl_info, WINED3D_BLIT_OP_COLOR_BLIT, NULL, WINED3DPOOL_DEFAULT, 0, check_format, NULL, WINED3DPOOL_DEFAULT, 0, adapter_format)) { @@ -3701,37 +3615,32 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, return FALSE; } -static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter, +static BOOL CheckVertexTextureCapability(const struct wined3d_adapter *adapter, const struct wined3d_format *format) { - return adapter->gl_info.limits.vertex_samplers && (format->Flags & WINED3DFMT_FLAG_VTF); + return adapter->gl_info.limits.vertex_samplers && (format->flags & WINED3DFMT_FLAG_VTF); } -static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType, - enum wined3d_format_id AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, - enum wined3d_format_id CheckFormat, WINED3DSURFTYPE SurfaceType) +HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, DWORD usage, + WINED3DRESOURCETYPE resource_type, enum wined3d_format_id check_format_id, WINED3DSURFTYPE surface_type) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - struct wined3d_adapter *adapter = &This->adapters[Adapter]; + const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx]; const struct wined3d_gl_info *gl_info = &adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, CheckFormat); - const struct wined3d_format *adapter_format = wined3d_get_format(gl_info, AdapterFormat); - DWORD UsageCaps = 0; + const struct wined3d_format *adapter_format = wined3d_get_format(gl_info, adapter_format_id); + const struct wined3d_format *format = wined3d_get_format(gl_info, check_format_id); + DWORD usage_caps = 0; - TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%u,%s,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s))\n", - This, - Adapter, - DeviceType, debug_d3ddevicetype(DeviceType), - AdapterFormat, debug_d3dformat(AdapterFormat), - Usage, debug_d3dusage(Usage), debug_d3dusagequery(Usage), - RType, debug_d3dresourcetype(RType), - CheckFormat, debug_d3dformat(CheckFormat)); + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, device_type %s, adapter_format %s, usage %s, %s,\n" + "resource_type %s, check_format %s, surface_type %#x.\n", + wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(adapter_format_id), + debug_d3dusage(usage), debug_d3dusagequery(usage), debug_d3dresourcetype(resource_type), + debug_d3dformat(check_format_id), surface_type); - if (Adapter >= IWineD3D_GetAdapterCount(iface)) { + if (adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - } - switch (RType) + switch (resource_type) { case WINED3DRTYPE_CUBETEXTURE: /* Cubetexture allows: @@ -3743,7 +3652,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt * - WINED3DUSAGE_SOFTWAREPROCESSING * - WINED3DUSAGE_QUERY_WRAPANDMIP */ - if (SurfaceType != SURFACE_OPENGL) + if (surface_type != SURFACE_OPENGL) { TRACE_(d3d_caps)("[FAILED]\n"); return WINED3DERR_NOTAVAILABLE; @@ -3761,92 +3670,92 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt return WINED3DERR_NOTAVAILABLE; } - if (Usage & WINED3DUSAGE_AUTOGENMIPMAP) + if (usage & WINED3DUSAGE_AUTOGENMIPMAP) { if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) /* When autogenmipmap isn't around continue and return * WINED3DOK_NOAUTOGEN instead of D3D_OK. */ TRACE_(d3d_caps)("[FAILED] - No autogenmipmap support, but continuing\n"); else - UsageCaps |= WINED3DUSAGE_AUTOGENMIPMAP; + usage_caps |= WINED3DUSAGE_AUTOGENMIPMAP; } /* Always report dynamic locking. */ - if (Usage & WINED3DUSAGE_DYNAMIC) - UsageCaps |= WINED3DUSAGE_DYNAMIC; + if (usage & WINED3DUSAGE_DYNAMIC) + usage_caps |= WINED3DUSAGE_DYNAMIC; - if (Usage & WINED3DUSAGE_RENDERTARGET) + if (usage & WINED3DUSAGE_RENDERTARGET) { if (!CheckRenderTargetCapability(adapter, adapter_format, format)) { TRACE_(d3d_caps)("[FAILED] - No rendertarget support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_RENDERTARGET; + usage_caps |= WINED3DUSAGE_RENDERTARGET; } /* Always report software processing. */ - if (Usage & WINED3DUSAGE_SOFTWAREPROCESSING) - UsageCaps |= WINED3DUSAGE_SOFTWAREPROCESSING; + if (usage & WINED3DUSAGE_SOFTWAREPROCESSING) + usage_caps |= WINED3DUSAGE_SOFTWAREPROCESSING; - if (Usage & WINED3DUSAGE_QUERY_FILTER) + if (usage & WINED3DUSAGE_QUERY_FILTER) { if (!CheckFilterCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query filter support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_FILTER; + usage_caps |= WINED3DUSAGE_QUERY_FILTER; } - if (Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) + if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) { if (!CheckPostPixelShaderBlendingCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query post pixelshader blending support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; + usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; } - if (Usage & WINED3DUSAGE_QUERY_SRGBREAD) + if (usage & WINED3DUSAGE_QUERY_SRGBREAD) { if (!CheckSrgbReadCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query srgbread support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_SRGBREAD; + usage_caps |= WINED3DUSAGE_QUERY_SRGBREAD; } - if (Usage & WINED3DUSAGE_QUERY_SRGBWRITE) + if (usage & WINED3DUSAGE_QUERY_SRGBWRITE) { if (!CheckSrgbWriteCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query srgbwrite support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_SRGBWRITE; + usage_caps |= WINED3DUSAGE_QUERY_SRGBWRITE; } - if (Usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) + if (usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) { if (!CheckVertexTextureCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query vertextexture support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; + usage_caps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; } - if (Usage & WINED3DUSAGE_QUERY_WRAPANDMIP) + if (usage & WINED3DUSAGE_QUERY_WRAPANDMIP) { if (!CheckWrapAndMipCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No wrapping and mipmapping support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_WRAPANDMIP; + usage_caps |= WINED3DUSAGE_QUERY_WRAPANDMIP; } break; @@ -3856,40 +3765,40 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt * - WINED3DUSAGE_NONSECURE (d3d9ex) * - WINED3DUSAGE_RENDERTARGET */ - if (!CheckSurfaceCapability(adapter, adapter_format, format, SurfaceType)) + if (!CheckSurfaceCapability(adapter, adapter_format, format, surface_type)) { TRACE_(d3d_caps)("[FAILED] - Not supported for plain surfaces\n"); return WINED3DERR_NOTAVAILABLE; } - if (Usage & WINED3DUSAGE_DEPTHSTENCIL) + if (usage & WINED3DUSAGE_DEPTHSTENCIL) { if (!CheckDepthStencilCapability(adapter, adapter_format, format)) { TRACE_(d3d_caps)("[FAILED] - No depthstencil support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL; + usage_caps |= WINED3DUSAGE_DEPTHSTENCIL; } - if (Usage & WINED3DUSAGE_RENDERTARGET) + if (usage & WINED3DUSAGE_RENDERTARGET) { if (!CheckRenderTargetCapability(adapter, adapter_format, format)) { TRACE_(d3d_caps)("[FAILED] - No rendertarget support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_RENDERTARGET; + usage_caps |= WINED3DUSAGE_RENDERTARGET; } - if (Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) + if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) { if (!CheckPostPixelShaderBlendingCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query post pixelshader blending support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; + usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; } break; @@ -3905,7 +3814,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt * - WINED3DUSAGE_TEXTAPI (d3d9ex) * - WINED3DUSAGE_QUERY_WRAPANDMIP */ - if (SurfaceType != SURFACE_OPENGL) + if (surface_type != SURFACE_OPENGL) { TRACE_(d3d_caps)("[FAILED]\n"); return WINED3DERR_NOTAVAILABLE; @@ -3917,117 +3826,117 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt return WINED3DERR_NOTAVAILABLE; } - if (Usage & WINED3DUSAGE_AUTOGENMIPMAP) + if (usage & WINED3DUSAGE_AUTOGENMIPMAP) { if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) /* When autogenmipmap isn't around continue and return * WINED3DOK_NOAUTOGEN instead of D3D_OK. */ TRACE_(d3d_caps)("[FAILED] - No autogenmipmap support, but continuing\n"); else - UsageCaps |= WINED3DUSAGE_AUTOGENMIPMAP; + usage_caps |= WINED3DUSAGE_AUTOGENMIPMAP; } /* Always report dynamic locking. */ - if (Usage & WINED3DUSAGE_DYNAMIC) - UsageCaps |= WINED3DUSAGE_DYNAMIC; + if (usage & WINED3DUSAGE_DYNAMIC) + usage_caps |= WINED3DUSAGE_DYNAMIC; - if (Usage & WINED3DUSAGE_RENDERTARGET) + if (usage & WINED3DUSAGE_RENDERTARGET) { if (!CheckRenderTargetCapability(adapter, adapter_format, format)) { TRACE_(d3d_caps)("[FAILED] - No rendertarget support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_RENDERTARGET; + usage_caps |= WINED3DUSAGE_RENDERTARGET; } /* Always report software processing. */ - if (Usage & WINED3DUSAGE_SOFTWAREPROCESSING) - UsageCaps |= WINED3DUSAGE_SOFTWAREPROCESSING; + if (usage & WINED3DUSAGE_SOFTWAREPROCESSING) + usage_caps |= WINED3DUSAGE_SOFTWAREPROCESSING; - if (Usage & WINED3DUSAGE_QUERY_FILTER) + if (usage & WINED3DUSAGE_QUERY_FILTER) { if (!CheckFilterCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query filter support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_FILTER; + usage_caps |= WINED3DUSAGE_QUERY_FILTER; } - if (Usage & WINED3DUSAGE_QUERY_LEGACYBUMPMAP) + if (usage & WINED3DUSAGE_QUERY_LEGACYBUMPMAP) { if (!CheckBumpMapCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No legacy bumpmap support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_LEGACYBUMPMAP; + usage_caps |= WINED3DUSAGE_QUERY_LEGACYBUMPMAP; } - if (Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) + if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) { if (!CheckPostPixelShaderBlendingCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query post pixelshader blending support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; + usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; } - if (Usage & WINED3DUSAGE_QUERY_SRGBREAD) + if (usage & WINED3DUSAGE_QUERY_SRGBREAD) { if (!CheckSrgbReadCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query srgbread support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_SRGBREAD; + usage_caps |= WINED3DUSAGE_QUERY_SRGBREAD; } - if (Usage & WINED3DUSAGE_QUERY_SRGBWRITE) + if (usage & WINED3DUSAGE_QUERY_SRGBWRITE) { if (!CheckSrgbWriteCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query srgbwrite support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_SRGBWRITE; + usage_caps |= WINED3DUSAGE_QUERY_SRGBWRITE; } - if (Usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) + if (usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) { if (!CheckVertexTextureCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query vertextexture support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; + usage_caps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; } - if (Usage & WINED3DUSAGE_QUERY_WRAPANDMIP) + if (usage & WINED3DUSAGE_QUERY_WRAPANDMIP) { if (!CheckWrapAndMipCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No wrapping and mipmapping support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_WRAPANDMIP; + usage_caps |= WINED3DUSAGE_QUERY_WRAPANDMIP; } - if (Usage & WINED3DUSAGE_DEPTHSTENCIL) + if (usage & WINED3DUSAGE_DEPTHSTENCIL) { if (!CheckDepthStencilCapability(adapter, adapter_format, format)) { TRACE_(d3d_caps)("[FAILED] - No depth stencil support\n"); return WINED3DERR_NOTAVAILABLE; } - if ((format->Flags & WINED3DFMT_FLAG_SHADOW) && !gl_info->supported[ARB_SHADOW]) + if ((format->flags & WINED3DFMT_FLAG_SHADOW) && !gl_info->supported[ARB_SHADOW]) { TRACE_(d3d_caps)("[FAILED] - No shadow sampler support.\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL; + usage_caps |= WINED3DUSAGE_DEPTHSTENCIL; } break; @@ -4043,7 +3952,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt * - D3DUSAGE_SOFTWAREPROCESSING * - D3DUSAGE_QUERY_WRAPANDMIP */ - if (SurfaceType != SURFACE_OPENGL) + if (surface_type != SURFACE_OPENGL) { TRACE_(d3d_caps)("[FAILED]\n"); return WINED3DERR_NOTAVAILABLE; @@ -4068,7 +3977,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt * leading applications into temptation. The windows drivers don't * support most of those formats on volumes anyway, except for * WINED3DFMT_R32_FLOAT. */ - switch (CheckFormat) + switch (check_format_id) { case WINED3DFMT_P8_UINT: case WINED3DFMT_L4A4_UNORM: @@ -4116,118 +4025,115 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt } /* Always report dynamic locking. */ - if (Usage & WINED3DUSAGE_DYNAMIC) - UsageCaps |= WINED3DUSAGE_DYNAMIC; + if (usage & WINED3DUSAGE_DYNAMIC) + usage_caps |= WINED3DUSAGE_DYNAMIC; /* Always report software processing. */ - if (Usage & WINED3DUSAGE_SOFTWAREPROCESSING) - UsageCaps |= WINED3DUSAGE_SOFTWAREPROCESSING; + if (usage & WINED3DUSAGE_SOFTWAREPROCESSING) + usage_caps |= WINED3DUSAGE_SOFTWAREPROCESSING; - if (Usage & WINED3DUSAGE_QUERY_FILTER) + if (usage & WINED3DUSAGE_QUERY_FILTER) { if (!CheckFilterCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query filter support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_FILTER; + usage_caps |= WINED3DUSAGE_QUERY_FILTER; } - if (Usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) + if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) { if (!CheckPostPixelShaderBlendingCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query post pixelshader blending support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; + usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; } - if (Usage & WINED3DUSAGE_QUERY_SRGBREAD) + if (usage & WINED3DUSAGE_QUERY_SRGBREAD) { if (!CheckSrgbReadCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query srgbread support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_SRGBREAD; + usage_caps |= WINED3DUSAGE_QUERY_SRGBREAD; } - if (Usage & WINED3DUSAGE_QUERY_SRGBWRITE) + if (usage & WINED3DUSAGE_QUERY_SRGBWRITE) { if (!CheckSrgbWriteCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query srgbwrite support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_SRGBWRITE; + usage_caps |= WINED3DUSAGE_QUERY_SRGBWRITE; } - if (Usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) + if (usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) { if (!CheckVertexTextureCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No query vertextexture support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; + usage_caps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; } - if (Usage & WINED3DUSAGE_QUERY_WRAPANDMIP) + if (usage & WINED3DUSAGE_QUERY_WRAPANDMIP) { if (!CheckWrapAndMipCapability(adapter, format)) { TRACE_(d3d_caps)("[FAILED] - No wrapping and mipmapping support\n"); return WINED3DERR_NOTAVAILABLE; } - UsageCaps |= WINED3DUSAGE_QUERY_WRAPANDMIP; + usage_caps |= WINED3DUSAGE_QUERY_WRAPANDMIP; } break; default: - FIXME_(d3d_caps)("Unhandled resource type %s.\n", debug_d3dresourcetype(RType)); + FIXME_(d3d_caps)("Unhandled resource type %s.\n", debug_d3dresourcetype(resource_type)); return WINED3DERR_NOTAVAILABLE; } - /* When the UsageCaps exactly matches Usage return WINED3D_OK except for + /* When the usage_caps exactly matches usage return WINED3D_OK except for * the situation in which WINED3DUSAGE_AUTOGENMIPMAP isn't around, then * WINED3DOK_NOAUTOGEN is returned if all the other usage flags match. */ - if (UsageCaps == Usage) + if (usage_caps == usage) return WINED3D_OK; - if (UsageCaps == (Usage & ~WINED3DUSAGE_AUTOGENMIPMAP)) + if (usage_caps == (usage & ~WINED3DUSAGE_AUTOGENMIPMAP)) return WINED3DOK_NOAUTOGEN; - TRACE_(d3d_caps)("[FAILED] - Usage %#x requested for CheckFormat %s and RType %s but only %#x is available\n", - Usage, debug_d3dformat(CheckFormat), debug_d3dresourcetype(RType), UsageCaps); + TRACE_(d3d_caps)("[FAILED] - Usage %#x requested for format %s and resource_type %s but only %#x is available.\n", + usage, debug_d3dformat(check_format_id), debug_d3dresourcetype(resource_type), usage_caps); return WINED3DERR_NOTAVAILABLE; } -static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormatConversion(IWineD3D *iface, UINT adapter_idx, +HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, enum wined3d_format_id src_format, enum wined3d_format_id dst_format) { - FIXME("iface %p, adapter_idx %u, device_type %s, src_format %s, dst_format %s stub!\n", - iface, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(src_format), + FIXME("wined3d %p, adapter_idx %u, device_type %s, src_format %s, dst_format %s stub!\n", + wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(src_format), debug_d3dformat(dst_format)); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT adapter_idx, WINED3DDEVTYPE device_type, +HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, enum wined3d_format_id display_format, enum wined3d_format_id backbuffer_format, BOOL windowed) { UINT mode_count; HRESULT hr; - TRACE("iface %p, adapter_idx %u, device_type %s, display_format %s, backbuffer_format %s, windowed %#x.\n", - iface, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(display_format), + TRACE("wined3d %p, adapter_idx %u, device_type %s, display_format %s, backbuffer_format %s, windowed %#x.\n", + wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(display_format), debug_d3dformat(backbuffer_format), windowed); - if (adapter_idx >= IWineD3D_GetAdapterCount(iface)) - { - WARN_(d3d_caps)("adapter_idx >= IWineD3D_GetAdapterCount(iface), returning WINED3DERR_INVALIDCALL\n"); + if (adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - } /* The task of this function is to check whether a certain display / backbuffer format * combination is available on the given adapter. In fullscreen mode microsoft specified @@ -4249,7 +4155,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT adapter } /* If the requested display format is not available, don't continue. */ - mode_count = IWineD3DImpl_GetAdapterModeCount(iface, adapter_idx, display_format); + mode_count = wined3d_get_adapter_mode_count(wined3d, adapter_idx, display_format); if (!mode_count) { TRACE_(d3d_caps)("No available modes for display format %s.\n", debug_d3dformat(display_format)); @@ -4306,7 +4212,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT adapter } /* Use CheckDeviceFormat to see if the backbuffer_format is usable with the given display_format */ - hr = IWineD3DImpl_CheckDeviceFormat(iface, adapter_idx, device_type, display_format, + hr = wined3d_check_device_format(wined3d, adapter_idx, device_type, display_format, WINED3DUSAGE_RENDERTARGET, WINED3DRTYPE_SURFACE, backbuffer_format, SURFACE_OPENGL); if (FAILED(hr)) TRACE_(d3d_caps)("Unsupported display/backbuffer format combination %s / %s.\n", @@ -4318,10 +4224,10 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT adapter /* Note: d3d8 passes in a pointer to a D3DCAPS8 structure, which is a true subset of a D3DCAPS9 structure. However, it has to come via a void * as the d3d8 interface cannot import the d3d9 header */ -static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType, WINED3DCAPS* pCaps) { - - IWineD3DImpl *This = (IWineD3DImpl *)iface; - struct wined3d_adapter *adapter = &This->adapters[Adapter]; +HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, WINED3DCAPS *caps) +{ + const struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx]; const struct wined3d_gl_info *gl_info = &adapter->gl_info; int vs_selected_mode; int ps_selected_mode; @@ -4329,40 +4235,39 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, struct fragment_caps fragment_caps; DWORD ckey_caps, blit_caps, fx_caps, pal_caps; - TRACE_(d3d_caps)("(%p)->(Adptr:%d, DevType: %x, pCaps: %p)\n", This, Adapter, DeviceType, pCaps); + TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, device_type %s, caps %p.\n", + wined3d, adapter_idx, debug_d3ddevicetype(device_type), caps); - if (Adapter >= IWineD3D_GetAdapterCount(iface)) { + if (adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - } select_shader_mode(&adapter->gl_info, &ps_selected_mode, &vs_selected_mode); /* ------------------------------------------------ The following fields apply to both d3d8 and d3d9 ------------------------------------------------ */ - pCaps->DeviceType = (DeviceType == WINED3DDEVTYPE_HAL) ? WINED3DDEVTYPE_HAL : WINED3DDEVTYPE_REF; /* Not quite true, but use h/w supported by opengl I suppose */ - pCaps->AdapterOrdinal = Adapter; + /* Not quite true, but use h/w supported by opengl I suppose */ + caps->DeviceType = (device_type == WINED3DDEVTYPE_HAL) ? WINED3DDEVTYPE_HAL : WINED3DDEVTYPE_REF; + caps->AdapterOrdinal = adapter_idx; - pCaps->Caps = 0; - pCaps->Caps2 = WINED3DCAPS2_CANRENDERWINDOWED | + caps->Caps = 0; + caps->Caps2 = WINED3DCAPS2_CANRENDERWINDOWED | WINED3DCAPS2_FULLSCREENGAMMA | WINED3DCAPS2_DYNAMICTEXTURES; if (gl_info->supported[SGIS_GENERATE_MIPMAP]) - { - pCaps->Caps2 |= WINED3DCAPS2_CANAUTOGENMIPMAP; - } + caps->Caps2 |= WINED3DCAPS2_CANAUTOGENMIPMAP; - pCaps->Caps3 = WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD | + caps->Caps3 = WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD | WINED3DCAPS3_COPY_TO_VIDMEM | WINED3DCAPS3_COPY_TO_SYSTEMMEM; - pCaps->PresentationIntervals = WINED3DPRESENT_INTERVAL_IMMEDIATE | + caps->PresentationIntervals = WINED3DPRESENT_INTERVAL_IMMEDIATE | WINED3DPRESENT_INTERVAL_ONE; - pCaps->CursorCaps = WINED3DCURSORCAPS_COLOR | + caps->CursorCaps = WINED3DCURSORCAPS_COLOR | WINED3DCURSORCAPS_LOWRES; - pCaps->DevCaps = WINED3DDEVCAPS_FLOATTLVERTEX | + caps->DevCaps = WINED3DDEVCAPS_FLOATTLVERTEX | WINED3DDEVCAPS_EXECUTESYSTEMMEMORY | WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY| WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY | @@ -4378,7 +4283,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DDEVCAPS_DRAWPRIMITIVES2EX | WINED3DDEVCAPS_RTPATCHES; - pCaps->PrimitiveMiscCaps = WINED3DPMISCCAPS_CULLNONE | + caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_CULLNONE | WINED3DPMISCCAPS_CULLCCW | WINED3DPMISCCAPS_CULLCW | WINED3DPMISCCAPS_COLORWRITEENABLE | @@ -4394,11 +4299,11 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPMISCCAPS_FOGVERTEXCLAMPED */ if (gl_info->supported[EXT_BLEND_EQUATION_SEPARATE] && gl_info->supported[EXT_BLEND_FUNC_SEPARATE]) - pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_SEPARATEALPHABLEND; + caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_SEPARATEALPHABLEND; if (gl_info->supported[EXT_DRAW_BUFFERS2]) - pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS; + caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS; - pCaps->RasterCaps = WINED3DPRASTERCAPS_DITHER | + caps->RasterCaps = WINED3DPRASTERCAPS_DITHER | WINED3DPRASTERCAPS_PAT | WINED3DPRASTERCAPS_WFOG | WINED3DPRASTERCAPS_ZFOG | @@ -4413,13 +4318,13 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, if (gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC]) { - pCaps->RasterCaps |= WINED3DPRASTERCAPS_ANISOTROPY | + caps->RasterCaps |= WINED3DPRASTERCAPS_ANISOTROPY | WINED3DPRASTERCAPS_ZBIAS | WINED3DPRASTERCAPS_MIPMAPLODBIAS; } if (gl_info->supported[NV_FOG_DISTANCE]) { - pCaps->RasterCaps |= WINED3DPRASTERCAPS_FOGRANGE; + caps->RasterCaps |= WINED3DPRASTERCAPS_FOGRANGE; } /* FIXME Add: WINED3DPRASTERCAPS_COLORPERSPECTIVE @@ -4428,7 +4333,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPRASTERCAPS_ZBUFFERLESSHSR WINED3DPRASTERCAPS_WBUFFER */ - pCaps->ZCmpCaps = WINED3DPCMPCAPS_ALWAYS | + caps->ZCmpCaps = WINED3DPCMPCAPS_ALWAYS | WINED3DPCMPCAPS_EQUAL | WINED3DPCMPCAPS_GREATER | WINED3DPCMPCAPS_GREATEREQUAL | @@ -4437,7 +4342,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPCMPCAPS_NEVER | WINED3DPCMPCAPS_NOTEQUAL; - pCaps->SrcBlendCaps = WINED3DPBLENDCAPS_BOTHINVSRCALPHA | + caps->SrcBlendCaps = WINED3DPBLENDCAPS_BOTHINVSRCALPHA | WINED3DPBLENDCAPS_BOTHSRCALPHA | WINED3DPBLENDCAPS_DESTALPHA | WINED3DPBLENDCAPS_DESTCOLOR | @@ -4451,7 +4356,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPBLENDCAPS_SRCCOLOR | WINED3DPBLENDCAPS_ZERO; - pCaps->DestBlendCaps = WINED3DPBLENDCAPS_DESTALPHA | + caps->DestBlendCaps = WINED3DPBLENDCAPS_DESTALPHA | WINED3DPBLENDCAPS_DESTCOLOR | WINED3DPBLENDCAPS_INVDESTALPHA | WINED3DPBLENDCAPS_INVDESTCOLOR | @@ -4470,12 +4375,12 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, if (gl_info->supported[EXT_BLEND_COLOR]) { - pCaps->SrcBlendCaps |= WINED3DPBLENDCAPS_BLENDFACTOR; - pCaps->DestBlendCaps |= WINED3DPBLENDCAPS_BLENDFACTOR; + caps->SrcBlendCaps |= WINED3DPBLENDCAPS_BLENDFACTOR; + caps->DestBlendCaps |= WINED3DPBLENDCAPS_BLENDFACTOR; } - pCaps->AlphaCmpCaps = WINED3DPCMPCAPS_ALWAYS | + caps->AlphaCmpCaps = WINED3DPCMPCAPS_ALWAYS | WINED3DPCMPCAPS_EQUAL | WINED3DPCMPCAPS_GREATER | WINED3DPCMPCAPS_GREATEREQUAL | @@ -4484,7 +4389,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPCMPCAPS_NEVER | WINED3DPCMPCAPS_NOTEQUAL; - pCaps->ShadeCaps = WINED3DPSHADECAPS_SPECULARGOURAUDRGB | + caps->ShadeCaps = WINED3DPSHADECAPS_SPECULARGOURAUDRGB | WINED3DPSHADECAPS_COLORGOURAUDRGB | WINED3DPSHADECAPS_ALPHAFLATBLEND | WINED3DPSHADECAPS_ALPHAGOURAUDBLEND | @@ -4493,7 +4398,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPSHADECAPS_FOGGOURAUD | WINED3DPSHADECAPS_SPECULARFLATRGB; - pCaps->TextureCaps = WINED3DPTEXTURECAPS_ALPHA | + caps->TextureCaps = WINED3DPTEXTURECAPS_ALPHA | WINED3DPTEXTURECAPS_ALPHAPALETTE | WINED3DPTEXTURECAPS_TRANSPARENCY | WINED3DPTEXTURECAPS_BORDER | @@ -4503,26 +4408,31 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, if (!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) { - pCaps->TextureCaps |= WINED3DPTEXTURECAPS_POW2 | + caps->TextureCaps |= WINED3DPTEXTURECAPS_POW2 | WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL; } if (gl_info->supported[EXT_TEXTURE3D]) { - pCaps->TextureCaps |= WINED3DPTEXTURECAPS_VOLUMEMAP | - WINED3DPTEXTURECAPS_MIPVOLUMEMAP | - WINED3DPTEXTURECAPS_VOLUMEMAP_POW2; + caps->TextureCaps |= WINED3DPTEXTURECAPS_VOLUMEMAP | + WINED3DPTEXTURECAPS_MIPVOLUMEMAP; + if (!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) + { + caps->TextureCaps |= WINED3DPTEXTURECAPS_VOLUMEMAP_POW2; + } } if (gl_info->supported[ARB_TEXTURE_CUBE_MAP]) { - pCaps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP | - WINED3DPTEXTURECAPS_MIPCUBEMAP | - WINED3DPTEXTURECAPS_CUBEMAP_POW2; - + caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP | + WINED3DPTEXTURECAPS_MIPCUBEMAP; + if (!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) + { + caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP_POW2; + } } - pCaps->TextureFilterCaps = WINED3DPTFILTERCAPS_MAGFLINEAR | + caps->TextureFilterCaps = WINED3DPTFILTERCAPS_MAGFLINEAR | WINED3DPTFILTERCAPS_MAGFPOINT | WINED3DPTFILTERCAPS_MINFLINEAR | WINED3DPTFILTERCAPS_MINFPOINT | @@ -4537,13 +4447,13 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, if (gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC]) { - pCaps->TextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC | + caps->TextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC | WINED3DPTFILTERCAPS_MINFANISOTROPIC; } if (gl_info->supported[ARB_TEXTURE_CUBE_MAP]) { - pCaps->CubeTextureFilterCaps = WINED3DPTFILTERCAPS_MAGFLINEAR | + caps->CubeTextureFilterCaps = WINED3DPTFILTERCAPS_MAGFLINEAR | WINED3DPTFILTERCAPS_MAGFPOINT | WINED3DPTFILTERCAPS_MINFLINEAR | WINED3DPTFILTERCAPS_MINFPOINT | @@ -4558,15 +4468,18 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, if (gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC]) { - pCaps->CubeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC | + caps->CubeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC | WINED3DPTFILTERCAPS_MINFANISOTROPIC; } - } else - pCaps->CubeTextureFilterCaps = 0; + } + else + { + caps->CubeTextureFilterCaps = 0; + } if (gl_info->supported[EXT_TEXTURE3D]) { - pCaps->VolumeTextureFilterCaps = WINED3DPTFILTERCAPS_MAGFLINEAR | + caps->VolumeTextureFilterCaps = WINED3DPTFILTERCAPS_MAGFLINEAR | WINED3DPTFILTERCAPS_MAGFPOINT | WINED3DPTFILTERCAPS_MINFLINEAR | WINED3DPTFILTERCAPS_MINFPOINT | @@ -4578,47 +4491,53 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DPTFILTERCAPS_MIPLINEAR | WINED3DPTFILTERCAPS_MIPNEAREST | WINED3DPTFILTERCAPS_NEAREST; - } else - pCaps->VolumeTextureFilterCaps = 0; + } + else + { + caps->VolumeTextureFilterCaps = 0; + } - pCaps->TextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | + caps->TextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | WINED3DPTADDRESSCAPS_CLAMP | WINED3DPTADDRESSCAPS_WRAP; if (gl_info->supported[ARB_TEXTURE_BORDER_CLAMP]) { - pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; + caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; } if (gl_info->supported[ARB_TEXTURE_MIRRORED_REPEAT]) { - pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; + caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; } if (gl_info->supported[ATI_TEXTURE_MIRROR_ONCE]) { - pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; + caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; } if (gl_info->supported[EXT_TEXTURE3D]) { - pCaps->VolumeTextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | + caps->VolumeTextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | WINED3DPTADDRESSCAPS_CLAMP | WINED3DPTADDRESSCAPS_WRAP; if (gl_info->supported[ARB_TEXTURE_BORDER_CLAMP]) { - pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; + caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; } if (gl_info->supported[ARB_TEXTURE_MIRRORED_REPEAT]) { - pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; + caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; } if (gl_info->supported[ATI_TEXTURE_MIRROR_ONCE]) { - pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; + caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; } - } else - pCaps->VolumeTextureAddressCaps = 0; + } + else + { + caps->VolumeTextureAddressCaps = 0; + } - pCaps->LineCaps = WINED3DLINECAPS_TEXTURE | + caps->LineCaps = WINED3DLINECAPS_TEXTURE | WINED3DLINECAPS_ZTEST | WINED3DLINECAPS_BLEND | WINED3DLINECAPS_ALPHACMP | @@ -4627,26 +4546,26 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, * idea how generating the smoothing alpha values works; the result is different */ - pCaps->MaxTextureWidth = gl_info->limits.texture_size; - pCaps->MaxTextureHeight = gl_info->limits.texture_size; + caps->MaxTextureWidth = gl_info->limits.texture_size; + caps->MaxTextureHeight = gl_info->limits.texture_size; if (gl_info->supported[EXT_TEXTURE3D]) - pCaps->MaxVolumeExtent = gl_info->limits.texture3d_size; + caps->MaxVolumeExtent = gl_info->limits.texture3d_size; else - pCaps->MaxVolumeExtent = 0; + caps->MaxVolumeExtent = 0; - pCaps->MaxTextureRepeat = 32768; - pCaps->MaxTextureAspectRatio = gl_info->limits.texture_size; - pCaps->MaxVertexW = 1.0f; + caps->MaxTextureRepeat = 32768; + caps->MaxTextureAspectRatio = gl_info->limits.texture_size; + caps->MaxVertexW = 1.0f; - pCaps->GuardBandLeft = 0.0f; - pCaps->GuardBandTop = 0.0f; - pCaps->GuardBandRight = 0.0f; - pCaps->GuardBandBottom = 0.0f; + caps->GuardBandLeft = 0.0f; + caps->GuardBandTop = 0.0f; + caps->GuardBandRight = 0.0f; + caps->GuardBandBottom = 0.0f; - pCaps->ExtentsAdjust = 0.0f; + caps->ExtentsAdjust = 0.0f; - pCaps->StencilCaps = WINED3DSTENCILCAPS_DECRSAT | + caps->StencilCaps = WINED3DSTENCILCAPS_DECRSAT | WINED3DSTENCILCAPS_INCRSAT | WINED3DSTENCILCAPS_INVERT | WINED3DSTENCILCAPS_KEEP | @@ -4654,162 +4573,185 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DSTENCILCAPS_ZERO; if (gl_info->supported[EXT_STENCIL_WRAP]) { - pCaps->StencilCaps |= WINED3DSTENCILCAPS_DECR | + caps->StencilCaps |= WINED3DSTENCILCAPS_DECR | WINED3DSTENCILCAPS_INCR; } if (gl_info->supported[EXT_STENCIL_TWO_SIDE] || gl_info->supported[ATI_SEPARATE_STENCIL]) { - pCaps->StencilCaps |= WINED3DSTENCILCAPS_TWOSIDED; + caps->StencilCaps |= WINED3DSTENCILCAPS_TWOSIDED; } - pCaps->FVFCaps = WINED3DFVFCAPS_PSIZE | 0x0008; /* 8 texture coords */ + caps->FVFCaps = WINED3DFVFCAPS_PSIZE | 0x0008; /* 8 texture coords */ - pCaps->MaxUserClipPlanes = gl_info->limits.clipplanes; - pCaps->MaxActiveLights = gl_info->limits.lights; + caps->MaxUserClipPlanes = gl_info->limits.clipplanes; + caps->MaxActiveLights = gl_info->limits.lights; - pCaps->MaxVertexBlendMatrices = gl_info->limits.blends; - pCaps->MaxVertexBlendMatrixIndex = 0; + caps->MaxVertexBlendMatrices = gl_info->limits.blends; + caps->MaxVertexBlendMatrixIndex = 0; - pCaps->MaxAnisotropy = gl_info->limits.anisotropy; - pCaps->MaxPointSize = gl_info->limits.pointsize_max; + caps->MaxAnisotropy = gl_info->limits.anisotropy; + caps->MaxPointSize = gl_info->limits.pointsize_max; /* FIXME: Add D3DVTXPCAPS_TWEENING, D3DVTXPCAPS_TEXGEN_SPHEREMAP */ - pCaps->VertexProcessingCaps = WINED3DVTXPCAPS_DIRECTIONALLIGHTS | + caps->VertexProcessingCaps = WINED3DVTXPCAPS_DIRECTIONALLIGHTS | WINED3DVTXPCAPS_MATERIALSOURCE7 | WINED3DVTXPCAPS_POSITIONALLIGHTS | WINED3DVTXPCAPS_LOCALVIEWER | WINED3DVTXPCAPS_VERTEXFOG | WINED3DVTXPCAPS_TEXGEN; - pCaps->MaxPrimitiveCount = 0xFFFFF; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */ - pCaps->MaxVertexIndex = 0xFFFFF; - pCaps->MaxStreams = MAX_STREAMS; - pCaps->MaxStreamStride = 1024; + caps->MaxPrimitiveCount = 0xFFFFF; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */ + caps->MaxVertexIndex = 0xFFFFF; + caps->MaxStreams = MAX_STREAMS; + caps->MaxStreamStride = 1024; /* d3d9.dll sets D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES here because StretchRects is implemented in d3d9 */ - pCaps->DevCaps2 = WINED3DDEVCAPS2_STREAMOFFSET | - WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET; - pCaps->MaxNpatchTessellationLevel = 0; - pCaps->MasterAdapterOrdinal = 0; - pCaps->AdapterOrdinalInGroup = 0; - pCaps->NumberOfAdaptersInGroup = 1; + caps->DevCaps2 = WINED3DDEVCAPS2_STREAMOFFSET | + WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET; + caps->MaxNpatchTessellationLevel = 0; + caps->MasterAdapterOrdinal = 0; + caps->AdapterOrdinalInGroup = 0; + caps->NumberOfAdaptersInGroup = 1; - pCaps->NumSimultaneousRTs = gl_info->limits.buffers; + caps->NumSimultaneousRTs = gl_info->limits.buffers; - pCaps->StretchRectFilterCaps = WINED3DPTFILTERCAPS_MINFPOINT | + caps->StretchRectFilterCaps = WINED3DPTFILTERCAPS_MINFPOINT | WINED3DPTFILTERCAPS_MAGFPOINT | WINED3DPTFILTERCAPS_MINFLINEAR | WINED3DPTFILTERCAPS_MAGFLINEAR; - pCaps->VertexTextureFilterCaps = 0; + caps->VertexTextureFilterCaps = 0; adapter->shader_backend->shader_get_caps(&adapter->gl_info, &shader_caps); adapter->fragment_pipe->get_caps(&adapter->gl_info, &fragment_caps); /* Add shader misc caps. Only some of them belong to the shader parts of the pipeline */ - pCaps->PrimitiveMiscCaps |= fragment_caps.PrimitiveMiscCaps; + caps->PrimitiveMiscCaps |= fragment_caps.PrimitiveMiscCaps; /* This takes care for disabling vertex shader or pixel shader caps while leaving the other one enabled. * Ignore shader model capabilities if disabled in config */ - if(vs_selected_mode == SHADER_NONE) { + if (vs_selected_mode == SHADER_NONE) + { TRACE_(d3d_caps)("Vertex shader disabled in config, reporting version 0.0\n"); - pCaps->VertexShaderVersion = WINED3DVS_VERSION(0,0); - pCaps->MaxVertexShaderConst = 0; - } else { - pCaps->VertexShaderVersion = shader_caps.VertexShaderVersion; - pCaps->MaxVertexShaderConst = shader_caps.MaxVertexShaderConst; + caps->VertexShaderVersion = WINED3DVS_VERSION(0,0); + caps->MaxVertexShaderConst = 0; + } + else + { + caps->VertexShaderVersion = shader_caps.VertexShaderVersion; + caps->MaxVertexShaderConst = shader_caps.MaxVertexShaderConst; } - if(ps_selected_mode == SHADER_NONE) { + if (ps_selected_mode == SHADER_NONE) + { TRACE_(d3d_caps)("Pixel shader disabled in config, reporting version 0.0\n"); - pCaps->PixelShaderVersion = WINED3DPS_VERSION(0,0); - pCaps->PixelShader1xMaxValue = 0.0f; + caps->PixelShaderVersion = WINED3DPS_VERSION(0,0); + caps->PixelShader1xMaxValue = 0.0f; } else { - pCaps->PixelShaderVersion = shader_caps.PixelShaderVersion; - pCaps->PixelShader1xMaxValue = shader_caps.PixelShader1xMaxValue; + caps->PixelShaderVersion = shader_caps.PixelShaderVersion; + caps->PixelShader1xMaxValue = shader_caps.PixelShader1xMaxValue; } - pCaps->TextureOpCaps = fragment_caps.TextureOpCaps; - pCaps->MaxTextureBlendStages = fragment_caps.MaxTextureBlendStages; - pCaps->MaxSimultaneousTextures = fragment_caps.MaxSimultaneousTextures; + caps->TextureOpCaps = fragment_caps.TextureOpCaps; + caps->MaxTextureBlendStages = fragment_caps.MaxTextureBlendStages; + caps->MaxSimultaneousTextures = fragment_caps.MaxSimultaneousTextures; /* The following caps are shader specific, but they are things we cannot detect, or which * are the same among all shader models. So to avoid code duplication set the shader version * specific, but otherwise constant caps here */ - if(pCaps->VertexShaderVersion == WINED3DVS_VERSION(3,0)) { - /* Where possible set the caps based on OpenGL extensions and if they aren't set (in case of software rendering) - use the VS 3.0 from MSDN or else if there's OpenGL spec use a hardcoded value minimum VS3.0 value. */ - pCaps->VS20Caps.Caps = WINED3DVS20CAPS_PREDICATION; - pCaps->VS20Caps.DynamicFlowControlDepth = WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* VS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */ - pCaps->VS20Caps.NumTemps = max(32, adapter->gl_info.limits.arb_vs_temps); - pCaps->VS20Caps.StaticFlowControlDepth = WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH ; /* level of nesting in loops / if-statements; VS 3.0 requires MAX (4) */ - - pCaps->MaxVShaderInstructionsExecuted = 65535; /* VS 3.0 needs at least 65535, some cards even use 2^32-1 */ - pCaps->MaxVertexShader30InstructionSlots = max(512, adapter->gl_info.limits.arb_vs_instructions); - } - else if (pCaps->VertexShaderVersion == WINED3DVS_VERSION(2,0)) + if (caps->VertexShaderVersion == WINED3DVS_VERSION(3,0)) { - pCaps->VS20Caps.Caps = 0; - pCaps->VS20Caps.DynamicFlowControlDepth = WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH; - pCaps->VS20Caps.NumTemps = max(12, adapter->gl_info.limits.arb_vs_temps); - pCaps->VS20Caps.StaticFlowControlDepth = 1; + /* Where possible set the caps based on OpenGL extensions and if they + * aren't set (in case of software rendering) use the VS 3.0 from + * MSDN or else if there's OpenGL spec use a hardcoded value minimum + * VS3.0 value. */ + caps->VS20Caps.Caps = WINED3DVS20CAPS_PREDICATION; + /* VS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */ + caps->VS20Caps.DynamicFlowControlDepth = WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH; + caps->VS20Caps.NumTemps = max(32, adapter->gl_info.limits.arb_vs_temps); + /* level of nesting in loops / if-statements; VS 3.0 requires MAX (4) */ + caps->VS20Caps.StaticFlowControlDepth = WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH; - pCaps->MaxVShaderInstructionsExecuted = 65535; - pCaps->MaxVertexShader30InstructionSlots = 0; - } else { /* VS 1.x */ - pCaps->VS20Caps.Caps = 0; - pCaps->VS20Caps.DynamicFlowControlDepth = 0; - pCaps->VS20Caps.NumTemps = 0; - pCaps->VS20Caps.StaticFlowControlDepth = 0; + caps->MaxVShaderInstructionsExecuted = 65535; /* VS 3.0 needs at least 65535, some cards even use 2^32-1 */ + caps->MaxVertexShader30InstructionSlots = max(512, adapter->gl_info.limits.arb_vs_instructions); + } + else if (caps->VertexShaderVersion == WINED3DVS_VERSION(2,0)) + { + caps->VS20Caps.Caps = 0; + caps->VS20Caps.DynamicFlowControlDepth = WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH; + caps->VS20Caps.NumTemps = max(12, adapter->gl_info.limits.arb_vs_temps); + caps->VS20Caps.StaticFlowControlDepth = 1; - pCaps->MaxVShaderInstructionsExecuted = 0; - pCaps->MaxVertexShader30InstructionSlots = 0; + caps->MaxVShaderInstructionsExecuted = 65535; + caps->MaxVertexShader30InstructionSlots = 0; + } + else + { /* VS 1.x */ + caps->VS20Caps.Caps = 0; + caps->VS20Caps.DynamicFlowControlDepth = 0; + caps->VS20Caps.NumTemps = 0; + caps->VS20Caps.StaticFlowControlDepth = 0; + + caps->MaxVShaderInstructionsExecuted = 0; + caps->MaxVertexShader30InstructionSlots = 0; } - if(pCaps->PixelShaderVersion == WINED3DPS_VERSION(3,0)) { - /* Where possible set the caps based on OpenGL extensions and if they aren't set (in case of software rendering) - use the PS 3.0 from MSDN or else if there's OpenGL spec use a hardcoded value minimum PS 3.0 value. */ + if (caps->PixelShaderVersion == WINED3DPS_VERSION(3,0)) + { + /* Where possible set the caps based on OpenGL extensions and if they + * aren't set (in case of software rendering) use the PS 3.0 from + * MSDN or else if there's OpenGL spec use a hardcoded value minimum + * PS 3.0 value. */ - /* Caps is more or less undocumented on MSDN but it appears to be used for PS20Caps based on results from R9600/FX5900/Geforce6800 cards from Windows */ - pCaps->PS20Caps.Caps = WINED3DPS20CAPS_ARBITRARYSWIZZLE | + /* Caps is more or less undocumented on MSDN but it appears to be + * used for PS20Caps based on results from R9600/FX5900/Geforce6800 + * cards from Windows */ + caps->PS20Caps.Caps = WINED3DPS20CAPS_ARBITRARYSWIZZLE | WINED3DPS20CAPS_GRADIENTINSTRUCTIONS | WINED3DPS20CAPS_PREDICATION | WINED3DPS20CAPS_NODEPENDENTREADLIMIT | WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT; - pCaps->PS20Caps.DynamicFlowControlDepth = WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */ - pCaps->PS20Caps.NumTemps = max(32, adapter->gl_info.limits.arb_ps_temps); - pCaps->PS20Caps.StaticFlowControlDepth = WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_STATICFLOWCONTROLDEPTH (4) */ - pCaps->PS20Caps.NumInstructionSlots = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS; /* PS 3.0 requires MAX_NUMINSTRUCTIONSLOTS (512) */ + /* PS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */ + caps->PS20Caps.DynamicFlowControlDepth = WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH; + caps->PS20Caps.NumTemps = max(32, adapter->gl_info.limits.arb_ps_temps); + /* PS 3.0 requires MAX_STATICFLOWCONTROLDEPTH (4) */ + caps->PS20Caps.StaticFlowControlDepth = WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH; + /* PS 3.0 requires MAX_NUMINSTRUCTIONSLOTS (512) */ + caps->PS20Caps.NumInstructionSlots = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS; - pCaps->MaxPShaderInstructionsExecuted = 65535; - pCaps->MaxPixelShader30InstructionSlots = max(WINED3DMIN30SHADERINSTRUCTIONS, + caps->MaxPShaderInstructionsExecuted = 65535; + caps->MaxPixelShader30InstructionSlots = max(WINED3DMIN30SHADERINSTRUCTIONS, adapter->gl_info.limits.arb_ps_instructions); } - else if(pCaps->PixelShaderVersion == WINED3DPS_VERSION(2,0)) + else if(caps->PixelShaderVersion == WINED3DPS_VERSION(2,0)) { /* Below we assume PS2.0 specs, not extended 2.0a(GeforceFX)/2.0b(Radeon R3xx) ones */ - pCaps->PS20Caps.Caps = 0; - pCaps->PS20Caps.DynamicFlowControlDepth = 0; /* WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0 */ - pCaps->PS20Caps.NumTemps = max(12, adapter->gl_info.limits.arb_ps_temps); - pCaps->PS20Caps.StaticFlowControlDepth = WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH; /* Minimum: 1 */ - pCaps->PS20Caps.NumInstructionSlots = WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS; /* Minimum number (64 ALU + 32 Texture), a GeforceFX uses 512 */ + caps->PS20Caps.Caps = 0; + caps->PS20Caps.DynamicFlowControlDepth = 0; /* WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0 */ + caps->PS20Caps.NumTemps = max(12, adapter->gl_info.limits.arb_ps_temps); + caps->PS20Caps.StaticFlowControlDepth = WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH; /* Minimum: 1 */ + /* Minimum number (64 ALU + 32 Texture), a GeforceFX uses 512 */ + caps->PS20Caps.NumInstructionSlots = WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS; - pCaps->MaxPShaderInstructionsExecuted = 512; /* Minimum value, a GeforceFX uses 1024 */ - pCaps->MaxPixelShader30InstructionSlots = 0; - } else { /* PS 1.x */ - pCaps->PS20Caps.Caps = 0; - pCaps->PS20Caps.DynamicFlowControlDepth = 0; - pCaps->PS20Caps.NumTemps = 0; - pCaps->PS20Caps.StaticFlowControlDepth = 0; - pCaps->PS20Caps.NumInstructionSlots = 0; + caps->MaxPShaderInstructionsExecuted = 512; /* Minimum value, a GeforceFX uses 1024 */ + caps->MaxPixelShader30InstructionSlots = 0; + } + else /* PS 1.x */ + { + caps->PS20Caps.Caps = 0; + caps->PS20Caps.DynamicFlowControlDepth = 0; + caps->PS20Caps.NumTemps = 0; + caps->PS20Caps.StaticFlowControlDepth = 0; + caps->PS20Caps.NumInstructionSlots = 0; - pCaps->MaxPShaderInstructionsExecuted = 0; - pCaps->MaxPixelShader30InstructionSlots = 0; + caps->MaxPShaderInstructionsExecuted = 0; + caps->MaxPixelShader30InstructionSlots = 0; } - if(pCaps->VertexShaderVersion >= WINED3DVS_VERSION(2,0)) { + if (caps->VertexShaderVersion >= WINED3DVS_VERSION(2,0)) + { /* OpenGL supports all the formats below, perhaps not always * without conversion, but it supports them. * Further GLSL doesn't seem to have an official unsigned type so @@ -4817,17 +4759,20 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, * We might need to add some clamping in the shader engine to * support it. * TODO: WINED3DDTCAPS_USHORT2N, WINED3DDTCAPS_USHORT4N, WINED3DDTCAPS_UDEC3, WINED3DDTCAPS_DEC3N */ - pCaps->DeclTypes = WINED3DDTCAPS_UBYTE4 | - WINED3DDTCAPS_UBYTE4N | - WINED3DDTCAPS_SHORT2N | - WINED3DDTCAPS_SHORT4N; + caps->DeclTypes = WINED3DDTCAPS_UBYTE4 | + WINED3DDTCAPS_UBYTE4N | + WINED3DDTCAPS_SHORT2N | + WINED3DDTCAPS_SHORT4N; if (gl_info->supported[ARB_HALF_FLOAT_VERTEX]) { - pCaps->DeclTypes |= WINED3DDTCAPS_FLOAT16_2 | - WINED3DDTCAPS_FLOAT16_4; + caps->DeclTypes |= WINED3DDTCAPS_FLOAT16_2 | + WINED3DDTCAPS_FLOAT16_4; } - } else - pCaps->DeclTypes = 0; + } + else + { + caps->DeclTypes = 0; + } /* Set DirectDraw helper Caps */ ckey_caps = WINEDDCKEYCAPS_DESTBLT | @@ -4858,28 +4803,28 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINEDDPCAPS_PRIMARYSURFACE; /* Fill the ddraw caps structure */ - pCaps->DirectDrawCaps.Caps = WINEDDCAPS_GDI | + caps->DirectDrawCaps.Caps = WINEDDCAPS_GDI | WINEDDCAPS_PALETTE | blit_caps; - pCaps->DirectDrawCaps.Caps2 = WINEDDCAPS2_CERTIFIED | + caps->DirectDrawCaps.Caps2 = WINEDDCAPS2_CERTIFIED | WINEDDCAPS2_NOPAGELOCKREQUIRED | WINEDDCAPS2_PRIMARYGAMMA | WINEDDCAPS2_WIDESURFACES | WINEDDCAPS2_CANRENDERWINDOWED; - pCaps->DirectDrawCaps.CKeyCaps = ckey_caps; - pCaps->DirectDrawCaps.FXCaps = fx_caps; - pCaps->DirectDrawCaps.PalCaps = pal_caps; - pCaps->DirectDrawCaps.SVBCaps = blit_caps; - pCaps->DirectDrawCaps.SVBCKeyCaps = ckey_caps; - pCaps->DirectDrawCaps.SVBFXCaps = fx_caps; - pCaps->DirectDrawCaps.VSBCaps = blit_caps; - pCaps->DirectDrawCaps.VSBCKeyCaps = ckey_caps; - pCaps->DirectDrawCaps.VSBFXCaps = fx_caps; - pCaps->DirectDrawCaps.SSBCaps = blit_caps; - pCaps->DirectDrawCaps.SSBCKeyCaps = ckey_caps; - pCaps->DirectDrawCaps.SSBFXCaps = fx_caps; + caps->DirectDrawCaps.CKeyCaps = ckey_caps; + caps->DirectDrawCaps.FXCaps = fx_caps; + caps->DirectDrawCaps.PalCaps = pal_caps; + caps->DirectDrawCaps.SVBCaps = blit_caps; + caps->DirectDrawCaps.SVBCKeyCaps = ckey_caps; + caps->DirectDrawCaps.SVBFXCaps = fx_caps; + caps->DirectDrawCaps.VSBCaps = blit_caps; + caps->DirectDrawCaps.VSBCKeyCaps = ckey_caps; + caps->DirectDrawCaps.VSBFXCaps = fx_caps; + caps->DirectDrawCaps.SSBCaps = blit_caps; + caps->DirectDrawCaps.SSBCKeyCaps = ckey_caps; + caps->DirectDrawCaps.SSBFXCaps = fx_caps; - pCaps->DirectDrawCaps.ddsCaps = WINEDDSCAPS_ALPHA | + caps->DirectDrawCaps.ddsCaps = WINEDDSCAPS_ALPHA | WINEDDSCAPS_BACKBUFFER | WINEDDSCAPS_FLIP | WINEDDSCAPS_FRONTBUFFER | @@ -4889,37 +4834,34 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINEDDSCAPS_SYSTEMMEMORY | WINEDDSCAPS_VIDEOMEMORY | WINEDDSCAPS_VISIBLE; - pCaps->DirectDrawCaps.StrideAlign = DDRAW_PITCH_ALIGNMENT; + caps->DirectDrawCaps.StrideAlign = DDRAW_PITCH_ALIGNMENT; /* Set D3D caps if OpenGL is available. */ if (adapter->opengl) { - pCaps->DirectDrawCaps.ddsCaps |=WINEDDSCAPS_3DDEVICE | + caps->DirectDrawCaps.ddsCaps |= WINEDDSCAPS_3DDEVICE | WINEDDSCAPS_MIPMAP | WINEDDSCAPS_TEXTURE | WINEDDSCAPS_ZBUFFER; - pCaps->DirectDrawCaps.Caps |= WINEDDCAPS_3D; + caps->DirectDrawCaps.Caps |= WINEDDCAPS_3D; } return WINED3D_OK; } -static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT adapter_idx, WINED3DDEVTYPE device_type, - HWND focus_window, DWORD flags, IWineD3DDeviceParent *device_parent, IWineD3DDevice **device) +HRESULT CDECL wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, + HWND focus_window, DWORD flags, struct wined3d_device_parent *device_parent, struct wined3d_device **device) { - IWineD3DImpl *This = (IWineD3DImpl *)iface; - IWineD3DDeviceImpl *object; + struct wined3d_device *object; HRESULT hr; - TRACE("iface %p, adapter_idx %u, device_type %#x, focus_window %p, flags %#x, device_parent %p, device %p.\n", - iface, adapter_idx, device_type, focus_window, flags, device_parent, device); + TRACE("wined3d %p, adapter_idx %u, device_type %#x, focus_window %p, flags %#x, device_parent %p, device %p.\n", + wined3d, adapter_idx, device_type, focus_window, flags, device_parent, device); /* Validate the adapter number. If no adapters are available(no GL), ignore the adapter * number and create a device without a 3D adapter for 2D only operation. */ - if (IWineD3D_GetAdapterCount(iface) && adapter_idx >= IWineD3D_GetAdapterCount(iface)) - { + if (wined3d->adapter_count && adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; - } object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) @@ -4928,7 +4870,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT adapter_id return E_OUTOFMEMORY; } - hr = device_init(object, This, adapter_idx, device_type, focus_window, flags, device_parent); + hr = device_init(object, wined3d, adapter_idx, device_type, focus_window, flags, device_parent); if (FAILED(hr)) { WARN("Failed to initialize device, hr %#x.\n", hr); @@ -4937,18 +4879,18 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT adapter_id } TRACE("Created device %p.\n", object); - *device = (IWineD3DDevice *)object; + *device = object; - IWineD3DDeviceParent_WineD3DDeviceCreated(device_parent, *device); + device_parent->ops->wined3d_device_created(device_parent, *device); return WINED3D_OK; } -static void * WINAPI IWineD3DImpl_GetParent(IWineD3D *iface) +void * CDECL wined3d_get_parent(const struct wined3d *wined3d) { - TRACE("iface %p.\n", iface); + TRACE("wined3d %p.\n", wined3d); - return ((IWineD3DImpl *)iface)->parent; + return wined3d->parent; } static void WINE_GLAPI invalid_func(const void *data) @@ -5138,7 +5080,7 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info) } /* Do not call while under the GL lock. */ -static BOOL InitAdapters(IWineD3DImpl *This) +static BOOL InitAdapters(struct wined3d *wined3d) { static HMODULE mod_gl; BOOL ret; @@ -5195,13 +5137,13 @@ static BOOL InitAdapters(IWineD3DImpl *This) /* For now only one default adapter */ { - struct wined3d_adapter *adapter = &This->adapters[0]; + struct wined3d_adapter *adapter = &wined3d->adapters[0]; const struct wined3d_gl_info *gl_info = &adapter->gl_info; struct wined3d_fake_gl_ctx fake_gl_ctx = {0}; + struct wined3d_pixel_format *cfgs; int iPixelFormat; int res; int i; - WineD3D_PixelFormat *cfgs; DISPLAY_DEVICEW DisplayDevice; HDC hdc; @@ -5260,7 +5202,7 @@ static BOOL InitAdapters(IWineD3DImpl *This) attribute = WGL_NUMBER_PIXEL_FORMATS_ARB; GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &adapter->nCfgs)); - adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, adapter->nCfgs *sizeof(WineD3D_PixelFormat)); + adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, adapter->nCfgs * sizeof(*adapter->cfgs)); cfgs = adapter->cfgs; attribs[nAttribs++] = WGL_RED_BITS_ARB; attribs[nAttribs++] = WGL_GREEN_BITS_ARB; @@ -5320,7 +5262,7 @@ static BOOL InitAdapters(IWineD3DImpl *This) else { int nCfgs = DescribePixelFormat(hdc, 0, 0, 0); - adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nCfgs*sizeof(WineD3D_PixelFormat)); + adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nCfgs * sizeof(*adapter->cfgs)); adapter->nCfgs = 0; /* We won't accept all formats e.g. software accelerated ones will be skipped */ cfgs = adapter->cfgs; @@ -5401,61 +5343,32 @@ static BOOL InitAdapters(IWineD3DImpl *This) fillGLAttribFuncs(&adapter->gl_info); adapter->opengl = TRUE; } - This->adapter_count = 1; - TRACE("%u adapters successfully initialized\n", This->adapter_count); + wined3d->adapter_count = 1; + TRACE("%u adapters successfully initialized.\n", wined3d->adapter_count); return TRUE; nogl_adapter: /* Initialize an adapter for ddraw-only memory counting */ - memset(This->adapters, 0, sizeof(This->adapters)); - This->adapters[0].ordinal = 0; - This->adapters[0].opengl = FALSE; - This->adapters[0].monitorPoint.x = -1; - This->adapters[0].monitorPoint.y = -1; + memset(wined3d->adapters, 0, sizeof(wined3d->adapters)); + wined3d->adapters[0].ordinal = 0; + wined3d->adapters[0].opengl = FALSE; + wined3d->adapters[0].monitorPoint.x = -1; + wined3d->adapters[0].monitorPoint.y = -1; - This->adapters[0].driver_info.name = "Display"; - This->adapters[0].driver_info.description = "WineD3D DirectDraw Emulation"; - if(wined3d_settings.emulated_textureram) { - This->adapters[0].TextureRam = wined3d_settings.emulated_textureram; - } else { - This->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */ - } + wined3d->adapters[0].driver_info.name = "Display"; + wined3d->adapters[0].driver_info.description = "WineD3D DirectDraw Emulation"; + if (wined3d_settings.emulated_textureram) + wined3d->adapters[0].TextureRam = wined3d_settings.emulated_textureram; + else + wined3d->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */ - initPixelFormatsNoGL(&This->adapters[0].gl_info); + initPixelFormatsNoGL(&wined3d->adapters[0].gl_info); - This->adapter_count = 1; + wined3d->adapter_count = 1; return FALSE; } -/********************************************************** - * IWineD3D VTbl follows - **********************************************************/ - -static const struct IWineD3DVtbl IWineD3D_Vtbl = -{ - /* IUnknown */ - IWineD3DImpl_QueryInterface, - IWineD3DImpl_AddRef, - IWineD3DImpl_Release, - /* IWineD3D */ - IWineD3DImpl_GetParent, - IWineD3DImpl_GetAdapterCount, - IWineD3DImpl_RegisterSoftwareDevice, - IWineD3DImpl_GetAdapterMonitor, - IWineD3DImpl_GetAdapterModeCount, - IWineD3DImpl_EnumAdapterModes, - IWineD3DImpl_GetAdapterDisplayMode, - IWineD3DImpl_GetAdapterIdentifier, - IWineD3DImpl_CheckDeviceMultiSampleType, - IWineD3DImpl_CheckDepthStencilMatch, - IWineD3DImpl_CheckDeviceType, - IWineD3DImpl_CheckDeviceFormat, - IWineD3DImpl_CheckDeviceFormatConversion, - IWineD3DImpl_GetDeviceCaps, - IWineD3DImpl_CreateDevice -}; - static void STDMETHODCALLTYPE wined3d_null_wined3d_object_destroyed(void *parent) {} const struct wined3d_parent_ops wined3d_null_parent_ops = @@ -5464,9 +5377,8 @@ const struct wined3d_parent_ops wined3d_null_parent_ops = }; /* Do not call while under the GL lock. */ -HRESULT wined3d_init(IWineD3DImpl *wined3d, UINT version, void *parent) +HRESULT wined3d_init(struct wined3d *wined3d, UINT version, void *parent) { - wined3d->lpVtbl = &IWineD3D_Vtbl; wined3d->dxVersion = version; wined3d->ref = 1; wined3d->parent = parent; diff --git a/dll/directx/wine/wined3d/drawprim.c b/dll/directx/wine/wined3d/drawprim.c index 6b6102bc330..4dbba92710b 100644 --- a/dll/directx/wine/wined3d/drawprim.c +++ b/dll/directx/wine/wined3d/drawprim.c @@ -55,7 +55,7 @@ static void drawStridedFast(GLenum primitive_type, UINT count, UINT idx_size, co */ /* GL locking is done by the caller */ -static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context *context, +static void drawStridedSlow(struct wined3d_device *device, const struct wined3d_context *context, const struct wined3d_stream_info *si, UINT NumVertexes, GLenum glPrimType, const void *idxData, UINT idxSize, UINT startIdx) { @@ -63,8 +63,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context const WORD *pIdxBufS = NULL; const DWORD *pIdxBufL = NULL; UINT vx_index; - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_state *state = &This->stateBlock->state; + const struct wined3d_state *state = &device->stateBlock->state; const struct wined3d_stream_state *streams = state->streams; LONG SkipnStrides = startIdx + state->load_base_vertex_index; BOOL pixelShader = use_ps(state); @@ -166,7 +165,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context for (textureNo = 0; textureNo < texture_stages; ++textureNo) { int coordIdx = state->texture_states[textureNo][WINED3DTSS_TEXCOORDINDEX]; - DWORD texture_idx = This->texUnitMap[textureNo]; + DWORD texture_idx = device->texUnitMap[textureNo]; if (!gl_info->supported[ARB_MULTITEXTURE] && textureNo > 0) { @@ -238,7 +237,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context coord_idx = state->texture_states[texture][WINED3DTSS_TEXCOORDINDEX]; ptr = texCoords[coord_idx] + (SkipnStrides * si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].stride); - texture_idx = This->texUnitMap[texture]; + texture_idx = device->texUnitMap[texture]; multi_texcoord_funcs[si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->emit_idx]( GL_TEXTURE0_ARB + texture_idx, ptr); } @@ -275,7 +274,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context if (specular_fog) { DWORD specularColor = *(const DWORD *)ptrToCoords; - GL_EXTCALL(glFogCoordfEXT(specularColor >> 24)); + GL_EXTCALL(glFogCoordfEXT((float) (specularColor >> 24))); } } @@ -559,11 +558,9 @@ static void remove_vbos(const struct wined3d_gl_info *gl_info, } /* Routine common to the draw primitive and draw indexed primitive routines */ -void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT idxSize, const void *idxData) +void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartIdx, UINT idxSize, const void *idxData) { - - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_state *state = &This->stateBlock->state; + const struct wined3d_state *state = &device->stateBlock->state; struct wined3d_context *context; unsigned int i; @@ -572,9 +569,9 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT if (state->render_states[WINED3DRS_COLORWRITEENABLE]) { /* Invalidate the back buffer memory so LockRect will read it the next time */ - for (i = 0; i < This->adapter->gl_info.limits.buffers; ++i) + for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { - IWineD3DSurfaceImpl *target = This->render_targets[i]; + struct wined3d_surface *target = device->fb.render_targets[i]; if (target) { surface_load_location(target, SFLAG_INDRAWABLE, NULL); @@ -584,9 +581,9 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT } /* Signals other modules that a drawing is in progress and the stateblock finalized */ - This->isInDraw = TRUE; + device->isInDraw = TRUE; - context = context_acquire(This, This->render_targets[0]); + context = context_acquire(device, device->fb.render_targets[0]); if (!context->valid) { context_release(context); @@ -594,42 +591,44 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT return; } - context_apply_draw_state(context, This); + if (!context_apply_draw_state(context, device)) + { + context_release(context); + WARN("Unable to apply draw state, skipping draw.\n"); + return; + } - if (This->depth_stencil) + if (device->fb.depth_stencil) { /* Note that this depends on the context_acquire() call above to set - * This->render_offscreen properly. We don't currently take the + * context->render_offscreen properly. We don't currently take the * Z-compare function into account, but we could skip loading the * depthstencil for D3DCMP_NEVER and D3DCMP_ALWAYS as well. Also note * that we never copy the stencil data.*/ DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; if (state->render_states[WINED3DRS_ZWRITEENABLE] || state->render_states[WINED3DRS_ZENABLE]) { + struct wined3d_surface *ds = device->fb.depth_stencil; RECT current_rect, draw_rect, r; - if (location == SFLAG_DS_ONSCREEN && This->depth_stencil != This->onscreen_depth_stencil) - device_switch_onscreen_ds(This, context, This->depth_stencil); + if (location == SFLAG_DS_ONSCREEN && ds != device->onscreen_depth_stencil) + device_switch_onscreen_ds(device, context, ds); - if (This->depth_stencil->Flags & location) - SetRect(¤t_rect, 0, 0, - This->depth_stencil->ds_current_size.cx, - This->depth_stencil->ds_current_size.cy); + if (ds->flags & location) + SetRect(¤t_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy); else SetRectEmpty(¤t_rect); - device_get_draw_rect(This, &draw_rect); + device_get_draw_rect(device, &draw_rect); IntersectRect(&r, &draw_rect, ¤t_rect); if (!EqualRect(&r, &draw_rect)) - surface_load_ds_location(This->depth_stencil, context, location); + surface_load_ds_location(ds, context, location); if (state->render_states[WINED3DRS_ZWRITEENABLE]) { - surface_modify_ds_location(This->depth_stencil, location, - This->depth_stencil->ds_current_size.cx, - This->depth_stencil->ds_current_size.cy); - surface_modify_location(This->depth_stencil, SFLAG_INDRAWABLE, TRUE); + surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); + surface_modify_location(ds, SFLAG_INDRAWABLE, TRUE); } } } @@ -648,12 +647,12 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT { GLenum glPrimType = state->gl_primitive_type; BOOL emulation = FALSE; - const struct wined3d_stream_info *stream_info = &This->strided_streams; + const struct wined3d_stream_info *stream_info = &device->strided_streams; struct wined3d_stream_info stridedlcl; if (!use_vs(state)) { - if (!This->strided_streams.position_transformed && context->num_untracked_materials + if (!stream_info->position_transformed && context->num_untracked_materials && state->render_states[WINED3DRS_LIGHTING]) { static BOOL warned; @@ -682,12 +681,12 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT if(emulation) { stream_info = &stridedlcl; - memcpy(&stridedlcl, &This->strided_streams, sizeof(stridedlcl)); + memcpy(&stridedlcl, &device->strided_streams, sizeof(stridedlcl)); remove_vbos(context->gl_info, state, &stridedlcl); } } - if (This->useDrawStridedSlow || emulation) + if (device->useDrawStridedSlow || emulation) { /* Immediate mode drawing */ if (use_vs(state)) @@ -704,11 +703,11 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT } else { - drawStridedSlow(iface, context, stream_info, index_count, + drawStridedSlow(device, context, stream_info, index_count, glPrimType, idxData, idxSize, StartIdx); } } - else if (This->instancedDraw) + else if (device->instancedDraw) { /* Instancing emulation with mixing immediate mode and arrays */ drawStridedInstanced(context->gl_info, state, stream_info, @@ -723,9 +722,9 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT /* Finished updating the screen, restore lock */ LEAVE_GL(); - for(i = 0; i < This->num_buffer_queries; i++) + for(i = 0; i < device->num_buffer_queries; ++i) { - wined3d_event_query_issue(This->buffer_queries[i], This); + wined3d_event_query_issue(device->buffer_queries[i], device); } if (wined3d_settings.strict_draw_ordering) wglFlush(); /* Flush to ensure ordering across contexts. */ @@ -735,7 +734,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT TRACE("Done all gl drawing\n"); /* Control goes back to the device, stateblock values may change again */ - This->isInDraw = FALSE; + device->isInDraw = FALSE; } static void normalize_normal(float *n) { @@ -769,8 +768,8 @@ static void normalize_normal(float *n) { * responsible of taking care that either the gl states are restored, or the context activated * for drawing to reset the lastWasBlit flag. */ -HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, - struct WineD3DRectPatch *patch) { +HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch *patch) +{ unsigned int i, j, num_quads, out_vertex_size, buffer_size, d3d_out_vertex_size; float max_x = 0.0f, max_y = 0.0f, max_z = 0.0f, neg_z = 0.0f; struct wined3d_stream_info stream_info; @@ -842,7 +841,7 @@ HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, glMatrixMode(GL_PROJECTION); checkGLcall("glMatrixMode(GL_PROJECTION)"); glLoadIdentity(); - checkGLcall("glLoadIndentity()"); + checkGLcall("glLoadIdentity()"); glScalef(1.0f / (max_x), 1.0f / (max_y), max_z == 0.0f ? 1.0f : 1.0f / (2.0f * max_z)); glTranslatef(0.0f, 0.0f, 0.5f); checkGLcall("glScalef"); diff --git a/dll/directx/wine/wined3d/gl_compat.c b/dll/directx/wine/wined3d/gl_compat.c index 0f8eaba83d2..57564452f46 100644 --- a/dll/directx/wine/wined3d/gl_compat.c +++ b/dll/directx/wine/wined3d/gl_compat.c @@ -178,9 +178,9 @@ static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) { } } else { if(pname == GL_FOG_START) { - ctx->fogstart = param; + ctx->fogstart = (float) param; } else if(pname == GL_FOG_END) { - ctx->fogend = param; + ctx->fogend = (float) param; } old_fogcoord_glFogi(pname, param); } @@ -199,9 +199,9 @@ static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) { } } else { if(pname == GL_FOG_START) { - ctx->fogstart = *param; + ctx->fogstart = (float) *param; } else if(pname == GL_FOG_END) { - ctx->fogend = *param; + ctx->fogend = (float) *param; } old_fogcoord_glFogiv(pname, param); } @@ -331,13 +331,13 @@ static void WINE_GLAPI wine_glFogCoordfEXT(GLfloat f) { ctx->fog_coord_value = f; } static void WINE_GLAPI wine_glFogCoorddEXT(GLdouble f) { - wine_glFogCoordfEXT(f); + wine_glFogCoordfEXT((GLfloat) f); } static void WINE_GLAPI wine_glFogCoordfvEXT(const GLfloat *f) { wine_glFogCoordfEXT(*f); } static void WINE_GLAPI wine_glFogCoorddvEXT(const GLdouble *f) { - wine_glFogCoordfEXT(*f); + wine_glFogCoordfEXT((GLfloat) *f); } /* End GL_EXT_fog_coord emulation */ diff --git a/dll/directx/wine/wined3d/glsl_shader.c b/dll/directx/wine/wined3d/glsl_shader.c index 0b5bb3671d3..9b8cd5b4007 100644 --- a/dll/directx/wine/wined3d/glsl_shader.c +++ b/dll/directx/wine/wined3d/glsl_shader.c @@ -4,7 +4,7 @@ * Copyright 2006 Jason Green * Copyright 2006-2007 Henri Verbeet * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -109,20 +109,21 @@ struct glsl_shader_prog_link { GLint luminanceoffset_location[MAX_TEXTURES]; GLint ycorrection_location; GLenum vertex_color_clamp; - IWineD3DVertexShader *vshader; - IWineD3DPixelShader *pshader; + const struct wined3d_shader *vshader; + const struct wined3d_shader *pshader; struct vs_compile_args vs_args; struct ps_compile_args ps_args; UINT constant_version; const struct ps_np2fixup_info *np2Fixup_info; }; -typedef struct { - IWineD3DVertexShader *vshader; - IWineD3DPixelShader *pshader; +struct glsl_program_key +{ + const struct wined3d_shader *vshader; + const struct wined3d_shader *pshader; struct ps_compile_args ps_args; struct vs_compile_args vs_args; -} glsl_program_key_t; +}; struct shader_glsl_ctx_priv { const struct vs_compile_args *cur_vs_args; @@ -534,27 +535,27 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i /* Loads floating point constants (aka uniforms) into the currently set GLSL program. */ /* GL locking is done by the caller */ -static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info, +static void shader_glsl_load_constantsF(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, const float *constants, const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, UINT version) { const local_constant *lconst; /* 1.X pshaders have the constants clamped to [-1;1] implicitly. */ - if (This->baseShader.reg_maps.shader_version.major == 1 - && shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type)) + if (shader->reg_maps.shader_version.major == 1 + && shader_is_pshader_version(shader->reg_maps.shader_version.type)) walk_constant_heap_clamped(gl_info, constants, constant_locations, heap, stack, version); else walk_constant_heap(gl_info, constants, constant_locations, heap, stack, version); - if (!This->baseShader.load_local_constsF) + if (!shader->load_local_constsF) { TRACE("No need to load local float constants for this shader\n"); return; } /* Immediate constants are clamped to [-1;1] at shader creation time if needed */ - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) { GLint location = constant_locations[lconst->idx]; /* We found this uniform name in the program - go ahead and send the data */ @@ -565,7 +566,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl *This, const stru /* Loads integer constants (aka uniforms) into the currently set GLSL program. */ /* GL locking is done by the caller */ -static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info, +static void shader_glsl_load_constantsI(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, const GLint locations[MAX_CONST_I], const int *constants, WORD constants_set) { unsigned int i; @@ -584,8 +585,9 @@ static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const stru } /* Load immediate constants */ - ptr = list_head(&This->baseShader.constantsI); - while (ptr) { + ptr = list_head(&shader->constantsI); + while (ptr) + { const struct local_constant *lconst = LIST_ENTRY(ptr, const struct local_constant, entry); unsigned int idx = lconst->idx; const GLint *values = (const GLint *)lconst->value; @@ -596,13 +598,13 @@ static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const stru /* We found this uniform name in the program - go ahead and send the data */ GL_EXTCALL(glUniform4ivARB(locations[idx], 1, values)); checkGLcall("glUniform4ivARB"); - ptr = list_next(&This->baseShader.constantsI, ptr); + ptr = list_next(&shader->constantsI, ptr); } } /* Loads boolean constants (aka uniforms) into the currently set GLSL program. */ /* GL locking is done by the caller */ -static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info, +static void shader_glsl_load_constantsB(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, GLhandleARB programId, const BOOL *constants, WORD constants_set) { GLint tmp_loc; @@ -611,7 +613,7 @@ static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const stru const char *prefix; struct list* ptr; - switch (This->baseShader.reg_maps.shader_version.type) + switch (shader->reg_maps.shader_version.type) { case WINED3D_SHADER_TYPE_VERTEX: prefix = "VB"; @@ -627,7 +629,7 @@ static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const stru default: FIXME("Unknown shader type %#x.\n", - This->baseShader.reg_maps.shader_version.type); + shader->reg_maps.shader_version.type); prefix = "UB"; break; } @@ -653,8 +655,9 @@ static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const stru } /* Load immediate constants */ - ptr = list_head(&This->baseShader.constantsB); - while (ptr) { + ptr = list_head(&shader->constantsB); + while (ptr) + { const struct local_constant *lconst = LIST_ENTRY(ptr, const struct local_constant, entry); unsigned int idx = lconst->idx; const GLint *values = (const GLint *)lconst->value; @@ -668,7 +671,7 @@ static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const stru GL_EXTCALL(glUniform1ivARB(tmp_loc, 1, values)); checkGLcall("glUniform1ivARB"); } - ptr = list_next(&This->baseShader.constantsB, ptr); + ptr = list_next(&shader->constantsB, ptr); } } @@ -681,34 +684,28 @@ static void reset_program_constant_version(struct wine_rb_entry *entry, void *co * Loads the texture dimensions for NP2 fixup into the currently set GLSL program. */ /* GL locking is done by the caller (state handler) */ -static void shader_glsl_load_np2fixup_constants( - IWineD3DDevice* device, - char usePixelShader, - char useVertexShader) { +static void shader_glsl_load_np2fixup_constants(void *shader_priv, + const struct wined3d_gl_info *gl_info, const struct wined3d_state *state) +{ + struct shader_glsl_priv *glsl_priv = shader_priv; + const struct glsl_shader_prog_link *prog = glsl_priv->glsl_program; - const IWineD3DDeviceImpl* deviceImpl = (const IWineD3DDeviceImpl*) device; - const struct glsl_shader_prog_link* prog = ((struct shader_glsl_priv *)(deviceImpl->shader_priv))->glsl_program; + /* No GLSL program set - nothing to do. */ + if (!prog) return; - if (!prog) { - /* No GLSL program set - nothing to do. */ - return; - } + /* NP2 texcoord fixup is (currently) only done for pixelshaders. */ + if (!use_ps(state)) return; - if (!usePixelShader) { - /* NP2 texcoord fixup is (currently) only done for pixelshaders. */ - return; - } - - if (prog->ps_args.np2_fixup && -1 != prog->np2Fixup_location) { - const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info; - const IWineD3DStateBlockImpl* stateBlock = (const IWineD3DStateBlockImpl*) deviceImpl->stateBlock; + if (prog->ps_args.np2_fixup && prog->np2Fixup_location != -1) + { UINT i; UINT fixup = prog->ps_args.np2_fixup; GLfloat np2fixup_constants[4 * MAX_FRAGMENT_SAMPLERS]; - for (i = 0; fixup; fixup >>= 1, ++i) { + for (i = 0; fixup; fixup >>= 1, ++i) + { + const struct wined3d_texture *tex = state->textures[i]; const unsigned char idx = prog->np2Fixup_info->idx[i]; - const IWineD3DBaseTextureImpl *tex = stateBlock->state.textures[i]; GLfloat *tex_dim = &np2fixup_constants[(idx >> 1) * 4]; if (!tex) @@ -717,10 +714,15 @@ static void shader_glsl_load_np2fixup_constants( continue; } - if (idx % 2) { - tex_dim[2] = tex->baseTexture.pow2Matrix[0]; tex_dim[3] = tex->baseTexture.pow2Matrix[5]; - } else { - tex_dim[0] = tex->baseTexture.pow2Matrix[0]; tex_dim[1] = tex->baseTexture.pow2Matrix[5]; + if (idx % 2) + { + tex_dim[2] = tex->pow2_matrix[0]; + tex_dim[3] = tex->pow2_matrix[5]; + } + else + { + tex_dim[0] = tex->pow2_matrix[0]; + tex_dim[1] = tex->pow2_matrix[5]; } } @@ -736,9 +738,10 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, char usePixelShader, char useVertexShader) { const struct wined3d_gl_info *gl_info = context->gl_info; - IWineD3DDeviceImpl *device = context->swapchain->device; - IWineD3DStateBlockImpl* stateBlock = device->stateBlock; + struct wined3d_device *device = context->swapchain->device; + struct wined3d_stateblock *stateBlock = device->stateBlock; struct shader_glsl_priv *priv = device->shader_priv; + float position_fixup[4]; GLhandleARB programId; struct glsl_shader_prog_link *prog = priv->glsl_program; @@ -754,7 +757,7 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, if (useVertexShader) { - IWineD3DBaseShaderImpl *vshader = (IWineD3DBaseShaderImpl *)stateBlock->state.vertex_shader; + const struct wined3d_shader *vshader = stateBlock->state.vertex_shader; /* Load DirectX 9 float constants/uniforms for vertex shader */ shader_glsl_load_constantsF(vshader, gl_info, stateBlock->state.vs_consts_f, @@ -762,20 +765,21 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, /* Load DirectX 9 integer constants/uniforms for vertex shader */ shader_glsl_load_constantsI(vshader, gl_info, prog->vuniformI_locations, stateBlock->state.vs_consts_i, - stateBlock->changed.vertexShaderConstantsI & vshader->baseShader.reg_maps.integer_constants); + stateBlock->changed.vertexShaderConstantsI & vshader->reg_maps.integer_constants); /* Load DirectX 9 boolean constants/uniforms for vertex shader */ shader_glsl_load_constantsB(vshader, gl_info, programId, stateBlock->state.vs_consts_b, - stateBlock->changed.vertexShaderConstantsB & vshader->baseShader.reg_maps.boolean_constants); + stateBlock->changed.vertexShaderConstantsB & vshader->reg_maps.boolean_constants); /* Upload the position fixup params */ - GL_EXTCALL(glUniform4fvARB(prog->posFixup_location, 1, &device->posFixup[0])); + shader_get_position_fixup(context, &stateBlock->state, position_fixup); + GL_EXTCALL(glUniform4fvARB(prog->posFixup_location, 1, position_fixup)); checkGLcall("glUniform4fvARB"); } if (usePixelShader) { - IWineD3DBaseShaderImpl *pshader = (IWineD3DBaseShaderImpl *)stateBlock->state.pixel_shader; + const struct wined3d_shader *pshader = stateBlock->state.pixel_shader; /* Load DirectX 9 float constants/uniforms for pixel shader */ shader_glsl_load_constantsF(pshader, gl_info, stateBlock->state.ps_consts_f, @@ -783,11 +787,11 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, /* Load DirectX 9 integer constants/uniforms for pixel shader */ shader_glsl_load_constantsI(pshader, gl_info, prog->puniformI_locations, stateBlock->state.ps_consts_i, - stateBlock->changed.pixelShaderConstantsI & pshader->baseShader.reg_maps.integer_constants); + stateBlock->changed.pixelShaderConstantsI & pshader->reg_maps.integer_constants); /* Load DirectX 9 boolean constants/uniforms for pixel shader */ shader_glsl_load_constantsB(pshader, gl_info, programId, stateBlock->state.ps_consts_b, - stateBlock->changed.pixelShaderConstantsB & pshader->baseShader.reg_maps.boolean_constants); + stateBlock->changed.pixelShaderConstantsB & pshader->reg_maps.boolean_constants); /* Upload the environment bump map matrix if needed. The needsbumpmat member specifies the texture stage to load the matrix from. * It can't be 0 for a valid texbem instruction. @@ -816,7 +820,8 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, } } - if(((IWineD3DPixelShaderImpl *) pshader)->vpos_uniform) { + if (pshader->u.ps.vpos_uniform) + { float correction_params[4]; if (context->render_offscreen) @@ -825,7 +830,7 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, correction_params[1] = 1.0f; } else { /* position is window relative, not viewport relative */ - correction_params[0] = context->current_rt->currentDesc.Height; + correction_params[0] = (float) context->current_rt->resource.height; correction_params[1] = -1.0f; } GL_EXTCALL(glUniform4fvARB(prog->ycorrection_location, 1, correction_params)); @@ -867,32 +872,30 @@ static inline void update_heap_entry(struct constant_heap *heap, unsigned int id positions[idx] = heap_idx; } -static void shader_glsl_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count) +static void shader_glsl_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - struct shader_glsl_priv *priv = This->shader_priv; + struct shader_glsl_priv *priv = device->shader_priv; struct constant_heap *heap = &priv->vconst_heap; UINT i; for (i = start; i < count + start; ++i) { - if (!This->stateBlock->changed.vertexShaderConstantsF[i]) + if (!device->stateBlock->changed.vertexShaderConstantsF[i]) update_heap_entry(heap, i, heap->size++, priv->next_constant_version); else update_heap_entry(heap, i, heap->positions[i], priv->next_constant_version); } } -static void shader_glsl_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) +static void shader_glsl_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - struct shader_glsl_priv *priv = This->shader_priv; + struct shader_glsl_priv *priv = device->shader_priv; struct constant_heap *heap = &priv->pconst_heap; UINT i; for (i = start; i < count + start; ++i) { - if (!This->stateBlock->changed.pixelShaderConstantsF[i]) + if (!device->stateBlock->changed.pixelShaderConstantsF[i]) update_heap_entry(heap, i, heap->size++, priv->next_constant_version); else update_heap_entry(heap, i, heap->positions[i], priv->next_constant_version); @@ -912,14 +915,13 @@ static unsigned int vec4_varyings(DWORD shader_major, const struct wined3d_gl_in /** Generate the variable & register declarations for the GLSL output target */ static void shader_generate_glsl_declarations(const struct wined3d_context *context, - struct wined3d_shader_buffer *buffer, IWineD3DBaseShader *iface, - const shader_reg_maps *reg_maps, struct shader_glsl_ctx_priv *ctx_priv) + struct wined3d_shader_buffer *buffer, struct wined3d_shader *shader, + const struct wined3d_shader_reg_maps *reg_maps, struct shader_glsl_ctx_priv *ctx_priv) { - IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device; - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &shader->device->stateBlock->state; const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args; const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_fb_state *fb = &shader->device->fb; unsigned int i, extra_constants_needed = 0; const local_constant *lconst; DWORD map; @@ -935,7 +937,8 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } /* Declare the constants (aka uniforms) */ - if (This->baseShader.limits.constant_float > 0) { + if (shader->limits.constant_float > 0) + { unsigned max_constantsF; /* Unless the shader uses indirect addressing, always declare the maximum array size and ignore that we need some * uniforms privately. E.g. if GL supports 256 uniforms, and we need 2 for the pos fixup and immediate values, still @@ -957,25 +960,29 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } else { - if(This->baseShader.reg_maps.usesrelconstF) { - /* Subtract the other potential uniforms from the max available (bools, ints, and 1 row of projection matrix). - * Subtract another uniform for immediate values, which have to be loaded via uniform by the driver as well. - * The shader code only uses 0.5, 2.0, 1.0, 128 and -128 in vertex shader code, so one vec4 should be enough - * (Unfortunately the Nvidia driver doesn't store 128 and -128 in one float). + if (reg_maps->usesrelconstF) + { + /* Subtract the other potential uniforms from the max + * available (bools, ints, and 1 row of projection matrix). + * Subtract another uniform for immediate values, which have + * to be loaded via uniform by the driver as well. The shader + * code only uses 0.5, 2.0, 1.0, 128 and -128 in vertex + * shader code, so one vec4 should be enough. (Unfortunately + * the Nvidia driver doesn't store 128 and -128 in one float). * - * Writing gl_ClipVertex requires one uniform for each clipplane as well. - */ + * Writing gl_ClipVertex requires one uniform for each + * clipplane as well. */ max_constantsF = gl_info->limits.glsl_vs_float_constants - 3; if(ctx_priv->cur_vs_args->clip_enabled) { max_constantsF -= gl_info->limits.clipplanes; } - max_constantsF -= count_bits(This->baseShader.reg_maps.integer_constants); + max_constantsF -= count_bits(reg_maps->integer_constants); /* Strictly speaking a bool only uses one scalar, but the nvidia(Linux) compiler doesn't pack them properly, * so each scalar requires a full vec4. We could work around this by packing the booleans ourselves, but * for now take this into account when calculating the number of available constants */ - max_constantsF -= count_bits(This->baseShader.reg_maps.boolean_constants); + max_constantsF -= count_bits(reg_maps->boolean_constants); /* Set by driver quirks in directx.c */ max_constantsF -= gl_info->reserved_glsl_constants; } @@ -984,18 +991,18 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont max_constantsF = gl_info->limits.glsl_vs_float_constants; } } - max_constantsF = min(This->baseShader.limits.constant_float, max_constantsF); + max_constantsF = min(shader->limits.constant_float, max_constantsF); shader_addline(buffer, "uniform vec4 %cC[%u];\n", prefix, max_constantsF); } - /* Always declare the full set of constants, the compiler can remove the unused ones because d3d doesn't(yet) - * support indirect int and bool constant addressing. This avoids problems if the app uses e.g. i0 and i9. - */ - if (This->baseShader.limits.constant_int > 0 && This->baseShader.reg_maps.integer_constants) - shader_addline(buffer, "uniform ivec4 %cI[%u];\n", prefix, This->baseShader.limits.constant_int); + /* Always declare the full set of constants, the compiler can remove the + * unused ones because d3d doesn't (yet) support indirect int and bool + * constant addressing. This avoids problems if the app uses e.g. i0 and i9. */ + if (shader->limits.constant_int > 0 && reg_maps->integer_constants) + shader_addline(buffer, "uniform ivec4 %cI[%u];\n", prefix, shader->limits.constant_int); - if (This->baseShader.limits.constant_bool > 0 && This->baseShader.reg_maps.boolean_constants) - shader_addline(buffer, "uniform bool %cB[%u];\n", prefix, This->baseShader.limits.constant_bool); + if (shader->limits.constant_bool > 0 && reg_maps->boolean_constants) + shader_addline(buffer, "uniform bool %cB[%u];\n", prefix, shader->limits.constant_bool); if (!pshader) { @@ -1029,19 +1036,21 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } if (reg_maps->vpos || reg_maps->usesdsy) { - if (This->baseShader.limits.constant_float + extra_constants_needed + if (shader->limits.constant_float + extra_constants_needed + 1 < gl_info->limits.glsl_ps_float_constants) { shader_addline(buffer, "uniform vec4 ycorrection;\n"); - ((IWineD3DPixelShaderImpl *) This)->vpos_uniform = 1; + shader->u.ps.vpos_uniform = 1; extra_constants_needed++; - } else { + } + else + { /* This happens because we do not have proper tracking of the constant registers that are * actually used, only the max limit of the shader version */ FIXME("Cannot find a free uniform for vpos correction params\n"); shader_addline(buffer, "const vec4 ycorrection = vec4(%f, %f, 0.0, 0.0);\n", - context->render_offscreen ? 0.0f : device->render_targets[0]->currentDesc.Height, + context->render_offscreen ? 0.0f : fb->render_targets[0]->resource.height, context->render_offscreen ? 1.0f : -1.0f); } shader_addline(buffer, "vec4 vpos;\n"); @@ -1049,10 +1058,11 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } /* Declare texture samplers */ - for (i = 0; i < This->baseShader.limits.sampler; i++) { + for (i = 0; i < shader->limits.sampler; ++i) + { if (reg_maps->sampler_type[i]) { - IWineD3DBaseTextureImpl *texture; + const struct wined3d_texture *texture; switch (reg_maps->sampler_type[i]) { @@ -1066,14 +1076,14 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont texture = state->textures[i]; if (pshader && ps_args->shadow & (1 << i)) { - if (texture && texture->baseTexture.target == GL_TEXTURE_RECTANGLE_ARB) + if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) shader_addline(buffer, "uniform sampler2DRectShadow %csampler%u;\n", prefix, i); else shader_addline(buffer, "uniform sampler2DShadow %csampler%u;\n", prefix, i); } else { - if (texture && texture->baseTexture.target == GL_TEXTURE_RECTANGLE_ARB) + if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) shader_addline(buffer, "uniform sampler2DRect %csampler%u;\n", prefix, i); else shader_addline(buffer, "uniform sampler2D %csampler%u;\n", prefix, i); @@ -1109,8 +1119,10 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont * samplerNP2Fixup stores texture dimensions and is updated through * shader_glsl_load_np2fixup_constants when the sampler changes. */ - for (i = 0; i < This->baseShader.limits.sampler; ++i) { - if (reg_maps->sampler_type[i]) { + for (i = 0; i < shader->limits.sampler; ++i) + { + if (reg_maps->sampler_type[i]) + { if (!(ps_args->np2_fixup & (1 << i))) continue; if (WINED3DSTT_2D != reg_maps->sampler_type[i]) { @@ -1156,9 +1168,8 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } /* Declare output register temporaries */ - if(This->baseShader.limits.packed_output) { - shader_addline(buffer, "vec4 OUT[%u];\n", This->baseShader.limits.packed_output); - } + if (shader->limits.packed_output) + shader_addline(buffer, "vec4 OUT[%u];\n", shader->limits.packed_output); /* Declare temporary variables */ for (i = 0, map = reg_maps->temporary; map; map >>= 1, ++i) @@ -1189,8 +1200,10 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont * They can't be hardcoded into the shader text via LC = {x, y, z, w}; because the * float -> string conversion can cause precision loss. */ - if(!This->baseShader.load_local_constsF) { - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { + if (!shader->load_local_constsF) + { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { shader_addline(buffer, "uniform vec4 %cLC%u;\n", prefix, lconst->idx); } } @@ -1201,7 +1214,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont /* DirectX apps expect integer values, while OpenGL drivers add approximately 0.5. This causes * off-by-one problems as spotted by the vPos d3d9 visual test. Unfortunately the ATI cards do * not add exactly 0.5, but rather something like 0.49999999 or 0.50000001, which still causes - * precision troubles when we just substract 0.5. + * precision troubles when we just subtract 0.5. * * To deal with that just floor() the position. This will eliminate the fraction on all cards. * @@ -1305,9 +1318,10 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * /* oPos, oFog and oPts in D3D */ static const char * const hwrastout_reg_names[] = {"OUT[10]", "OUT[11].x", "OUT[11].y"}; - IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; + struct wined3d_shader *shader = ins->ctx->shader; + const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps; const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; - char pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type); + char pshader = shader_is_pshader_version(reg_maps->shader_version.type); *is_color = FALSE; @@ -1328,10 +1342,10 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * } /* pixel shaders >= 3.0 */ - if (This->baseShader.reg_maps.shader_version.major >= 3) + if (reg_maps->shader_version.major >= 3) { - DWORD idx = ((IWineD3DPixelShaderImpl *)This)->input_reg_map[reg->idx]; - unsigned int in_count = vec4_varyings(This->baseShader.reg_maps.shader_version.major, gl_info); + DWORD idx = shader->u.ps.input_reg_map[reg->idx]; + unsigned int in_count = vec4_varyings(reg_maps->shader_version.major, gl_info); if (reg->rel_addr) { @@ -1343,7 +1357,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * * operation there */ if (idx) { - if (((IWineD3DPixelShaderImpl *)This)->declared_in_count > in_count) + if (shader->u.ps.declared_in_count > in_count) { sprintf(register_name, "((%s + %u) > %d ? (%s + %u) > %d ? gl_SecondaryColor : gl_Color : IN[%s + %u])", @@ -1357,7 +1371,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * } else { - if (((IWineD3DPixelShaderImpl *)This)->declared_in_count > in_count) + if (shader->u.ps.declared_in_count > in_count) { sprintf(register_name, "((%s) > %d ? (%s) > %d ? gl_SecondaryColor : gl_Color : IN[%s])", rel_param.param_str, in_count - 1, rel_param.param_str, in_count, @@ -1398,7 +1412,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * } else { - if (shader_constant_is_local(This, reg->idx)) + if (shader_constant_is_local(shader, reg->idx)) sprintf(register_name, "%cLC%u", prefix, reg->idx); else sprintf(register_name, "%cC[%u]", prefix, reg->idx); @@ -1422,7 +1436,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * break; case WINED3DSPR_LOOP: - sprintf(register_name, "aL%u", This->baseShader.cur_loop_regno - 1); + sprintf(register_name, "aL%u", ins->ctx->loop_state->current_reg - 1); break; case WINED3DSPR_SAMPLER: @@ -2219,13 +2233,13 @@ static void shader_glsl_pow(const struct wined3d_shader_instruction *ins) if (dst_size > 1) { - shader_addline(buffer, "vec%u(pow(abs(%s), %s)));\n", - dst_size, src0_param.param_str, src1_param.param_str); + shader_addline(buffer, "vec%u(%s == 0.0 ? 1.0 : pow(abs(%s), %s)));\n", + dst_size, src1_param.param_str, src0_param.param_str, src1_param.param_str); } else { - shader_addline(buffer, "pow(abs(%s), %s));\n", - src0_param.param_str, src1_param.param_str); + shader_addline(buffer, "%s == 0.0 ? 1.0 : pow(abs(%s), %s));\n", + src1_param.param_str, src0_param.param_str, src1_param.param_str); } } @@ -2311,16 +2325,18 @@ static void shader_glsl_nrm(const struct wined3d_shader_instruction *ins) mask_size = shader_glsl_get_write_mask_size(write_mask); shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src_param); - shader_addline(buffer, "tmp0.x = length(%s);\n", src_param.param_str); + shader_addline(buffer, "tmp0.x = dot(%s, %s);\n", + src_param.param_str, src_param.param_str); shader_glsl_append_dst(buffer, ins); + if (mask_size > 1) { - shader_addline(buffer, "tmp0.x == 0.0 ? vec%u(0.0) : (%s / tmp0.x));\n", + shader_addline(buffer, "tmp0.x == 0.0 ? vec%u(0.0) : (%s * inversesqrt(tmp0.x)));\n", mask_size, src_param.param_str); } else { - shader_addline(buffer, "tmp0.x == 0.0 ? 0.0 : (%s / tmp0.x));\n", + shader_addline(buffer, "tmp0.x == 0.0 ? 0.0 : (%s * inversesqrt(tmp0.x)));\n", src_param.param_str); } } @@ -2825,8 +2841,9 @@ static void shader_glsl_sgn(const struct wined3d_shader_instruction *ins) /* FIXME: I don't think nested loops will work correctly this way. */ static void shader_glsl_loop(const struct wined3d_shader_instruction *ins) { + struct wined3d_shader_loop_state *loop_state = ins->ctx->loop_state; glsl_src_param_t src1_param; - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; + struct wined3d_shader *shader = ins->ctx->shader; const DWORD *control_values = NULL; const local_constant *constant; @@ -2839,7 +2856,8 @@ static void shader_glsl_loop(const struct wined3d_shader_instruction *ins) */ if (ins->src[1].reg.type == WINED3DSPR_CONSTINT) { - LIST_FOR_EACH_ENTRY(constant, &shader->baseShader.constantsI, local_constant, entry) { + LIST_FOR_EACH_ENTRY(constant, &shader->constantsI, local_constant, entry) + { if (constant->idx == ins->src[1].reg.idx) { control_values = constant->value; @@ -2858,57 +2876,58 @@ static void shader_glsl_loop(const struct wined3d_shader_instruction *ins) if (loop_control.step > 0) { shader_addline(ins->ctx->buffer, "for (aL%u = %u; aL%u < (%u * %d + %u); aL%u += %d) {\n", - shader->baseShader.cur_loop_depth, loop_control.start, - shader->baseShader.cur_loop_depth, loop_control.count, loop_control.step, loop_control.start, - shader->baseShader.cur_loop_depth, loop_control.step); + loop_state->current_depth, loop_control.start, + loop_state->current_depth, loop_control.count, loop_control.step, loop_control.start, + loop_state->current_depth, loop_control.step); } else if (loop_control.step < 0) { shader_addline(ins->ctx->buffer, "for (aL%u = %u; aL%u > (%u * %d + %u); aL%u += %d) {\n", - shader->baseShader.cur_loop_depth, loop_control.start, - shader->baseShader.cur_loop_depth, loop_control.count, loop_control.step, loop_control.start, - shader->baseShader.cur_loop_depth, loop_control.step); + loop_state->current_depth, loop_control.start, + loop_state->current_depth, loop_control.count, loop_control.step, loop_control.start, + loop_state->current_depth, loop_control.step); } else { shader_addline(ins->ctx->buffer, "for (aL%u = %u, tmpInt%u = 0; tmpInt%u < %u; tmpInt%u++) {\n", - shader->baseShader.cur_loop_depth, loop_control.start, shader->baseShader.cur_loop_depth, - shader->baseShader.cur_loop_depth, loop_control.count, - shader->baseShader.cur_loop_depth); + loop_state->current_depth, loop_control.start, loop_state->current_depth, + loop_state->current_depth, loop_control.count, + loop_state->current_depth); } } else { shader_addline(ins->ctx->buffer, "for (tmpInt%u = 0, aL%u = %s.y; tmpInt%u < %s.x; tmpInt%u++, aL%u += %s.z) {\n", - shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_regno, - src1_param.reg_name, shader->baseShader.cur_loop_depth, src1_param.reg_name, - shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_regno, src1_param.reg_name); + loop_state->current_depth, loop_state->current_reg, + src1_param.reg_name, loop_state->current_depth, src1_param.reg_name, + loop_state->current_depth, loop_state->current_reg, src1_param.reg_name); } - shader->baseShader.cur_loop_depth++; - shader->baseShader.cur_loop_regno++; + ++loop_state->current_depth; + ++loop_state->current_reg; } static void shader_glsl_end(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; + struct wined3d_shader_loop_state *loop_state = ins->ctx->loop_state; shader_addline(ins->ctx->buffer, "}\n"); if (ins->handler_idx == WINED3DSIH_ENDLOOP) { - shader->baseShader.cur_loop_depth--; - shader->baseShader.cur_loop_regno--; + --loop_state->current_depth; + --loop_state->current_reg; } if (ins->handler_idx == WINED3DSIH_ENDREP) { - shader->baseShader.cur_loop_depth--; + --loop_state->current_depth; } } static void shader_glsl_rep(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; + struct wined3d_shader *shader = ins->ctx->shader; + struct wined3d_shader_loop_state *loop_state = ins->ctx->loop_state; glsl_src_param_t src0_param; const DWORD *control_values = NULL; const local_constant *constant; @@ -2916,7 +2935,7 @@ static void shader_glsl_rep(const struct wined3d_shader_instruction *ins) /* Try to hardcode local values to help the GLSL compiler to unroll and optimize the loop */ if (ins->src[0].reg.type == WINED3DSPR_CONSTINT) { - LIST_FOR_EACH_ENTRY(constant, &shader->baseShader.constantsI, local_constant, entry) + LIST_FOR_EACH_ENTRY(constant, &shader->constantsI, local_constant, entry) { if (constant->idx == ins->src[0].reg.idx) { @@ -2926,17 +2945,21 @@ static void shader_glsl_rep(const struct wined3d_shader_instruction *ins) } } - if(control_values) { + if (control_values) + { shader_addline(ins->ctx->buffer, "for (tmpInt%d = 0; tmpInt%d < %d; tmpInt%d++) {\n", - shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_depth, - control_values[0], shader->baseShader.cur_loop_depth); - } else { + loop_state->current_depth, loop_state->current_depth, + control_values[0], loop_state->current_depth); + } + else + { shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src0_param); shader_addline(ins->ctx->buffer, "for (tmpInt%d = 0; tmpInt%d < %s; tmpInt%d++) {\n", - shader->baseShader.cur_loop_depth, shader->baseShader.cur_loop_depth, - src0_param.param_str, shader->baseShader.cur_loop_depth); + loop_state->current_depth, loop_state->current_depth, + src0_param.param_str, loop_state->current_depth); } - shader->baseShader.cur_loop_depth++; + + ++loop_state->current_depth; } static void shader_glsl_if(const struct wined3d_shader_instruction *ins) @@ -3013,12 +3036,12 @@ static void shader_glsl_ret(const struct wined3d_shader_instruction *ins) ********************************************/ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; + struct wined3d_shader *shader = ins->ctx->shader; + struct wined3d_device *device = shader->device; DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); glsl_sample_function_t sample_function; - IWineD3DBaseTextureImpl *texture; + const struct wined3d_texture *texture; DWORD sample_flags = 0; DWORD sampler_idx; DWORD mask = 0, swizzle; @@ -3027,7 +3050,7 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) * 2.0+: Use provided sampler source. */ if (shader_version < WINED3D_SHADER_VERSION(2,0)) sampler_idx = ins->dst[0].reg.idx; else sampler_idx = ins->src[1].reg.idx; - texture = deviceImpl->stateBlock->state.textures[sampler_idx]; + texture = device->stateBlock->state.textures[sampler_idx]; if (shader_version < WINED3D_SHADER_VERSION(1,4)) { @@ -3068,7 +3091,7 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) } } - if (texture && texture->baseTexture.target == GL_TEXTURE_RECTANGLE_ARB) + if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) sample_flags |= WINED3D_GLSL_SAMPLE_RECT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); @@ -3103,15 +3126,15 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device; + struct wined3d_shader *shader = ins->ctx->shader; + struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; glsl_sample_function_t sample_function; glsl_src_param_t coord_param, dx_param, dy_param; DWORD sample_flags = WINED3D_GLSL_SAMPLE_GRAD; DWORD sampler_idx; DWORD swizzle = ins->src[1].swizzle; - IWineD3DBaseTextureImpl *texture; + const struct wined3d_texture *texture; if (!gl_info->supported[ARB_SHADER_TEXTURE_LOD] && !gl_info->supported[EXT_GPU_SHADER4]) { @@ -3121,8 +3144,8 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) } sampler_idx = ins->src[1].reg.idx; - texture = deviceImpl->stateBlock->state.textures[sampler_idx]; - if (texture && texture->baseTexture.target == GL_TEXTURE_RECTANGLE_ARB) + texture = device->stateBlock->state.textures[sampler_idx]; + if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) sample_flags |= WINED3D_GLSL_SAMPLE_RECT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); @@ -3136,19 +3159,19 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device; + struct wined3d_shader *shader = ins->ctx->shader; + struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; glsl_sample_function_t sample_function; glsl_src_param_t coord_param, lod_param; DWORD sample_flags = WINED3D_GLSL_SAMPLE_LOD; DWORD sampler_idx; DWORD swizzle = ins->src[1].swizzle; - IWineD3DBaseTextureImpl *texture; + const struct wined3d_texture *texture; sampler_idx = ins->src[1].reg.idx; - texture = deviceImpl->stateBlock->state.textures[sampler_idx]; - if (texture && texture->baseTexture.target == GL_TEXTURE_RECTANGLE_ARB) + texture = device->stateBlock->state.textures[sampler_idx]; + if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) sample_flags |= WINED3D_GLSL_SAMPLE_RECT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); @@ -3330,16 +3353,15 @@ static void shader_glsl_texm3x2pad(const struct wined3d_shader_instruction *ins) * Calculate the 1st or 2nd row of a 3-row matrix multiplication. */ static void shader_glsl_texm3x3pad(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2; DWORD reg = ins->dst[0].reg.idx; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - SHADER_PARSE_STATE* current_state = &shader->baseShader.parse_state; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; glsl_src_param_t src0_param; shader_glsl_add_src_param(ins, &ins->src[0], src_mask, &src0_param); - shader_addline(buffer, "tmp0.%c = dot(T%u.xyz, %s);\n", 'x' + current_state->current_row, reg, src0_param.param_str); - current_state->texcoord_w[current_state->current_row++] = reg; + shader_addline(buffer, "tmp0.%c = dot(T%u.xyz, %s);\n", 'x' + tex_mx->current_row, reg, src0_param.param_str); + tex_mx->texcoord_w[tex_mx->current_row++] = reg; } static void shader_glsl_texm3x2tex(const struct wined3d_shader_instruction *ins) @@ -3364,8 +3386,7 @@ static void shader_glsl_texm3x2tex(const struct wined3d_shader_instruction *ins) static void shader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins) { DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2; - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - SHADER_PARSE_STATE *current_state = &shader->baseShader.parse_state; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; glsl_src_param_t src0_param; DWORD reg = ins->dst[0].reg.idx; glsl_sample_function_t sample_function; @@ -3379,7 +3400,7 @@ static void shader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins) /* Sample the texture using the calculated coordinates */ shader_glsl_gen_sample_code(ins, reg, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL, "tmp0.xyz"); - current_state->current_row = 0; + tex_mx->current_row = 0; } /** Process the WINED3DSIO_TEXM3X3 instruction in GLSL @@ -3387,8 +3408,7 @@ static void shader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins) static void shader_glsl_texm3x3(const struct wined3d_shader_instruction *ins) { DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2; - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - SHADER_PARSE_STATE *current_state = &shader->baseShader.parse_state; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; glsl_src_param_t src0_param; char dst_mask[6]; DWORD reg = ins->dst[0].reg.idx; @@ -3399,19 +3419,18 @@ static void shader_glsl_texm3x3(const struct wined3d_shader_instruction *ins) shader_glsl_get_write_mask(&ins->dst[0], dst_mask); shader_addline(ins->ctx->buffer, "vec4(tmp0.xy, dot(T%u.xyz, %s), 1.0)%s);\n", reg, src0_param.param_str, dst_mask); - current_state->current_row = 0; + tex_mx->current_row = 0; } /* Process the WINED3DSIO_TEXM3X3SPEC instruction in GLSL * Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */ static void shader_glsl_texm3x3spec(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; DWORD reg = ins->dst[0].reg.idx; glsl_src_param_t src0_param; glsl_src_param_t src1_param; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - SHADER_PARSE_STATE* current_state = &shader->baseShader.parse_state; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2; glsl_sample_function_t sample_function; @@ -3429,17 +3448,16 @@ static void shader_glsl_texm3x3spec(const struct wined3d_shader_instruction *ins /* Sample the texture */ shader_glsl_gen_sample_code(ins, reg, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL, "tmp0.xyz"); - current_state->current_row = 0; + tex_mx->current_row = 0; } /* Process the WINED3DSIO_TEXM3X3VSPEC instruction in GLSL * Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */ static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; DWORD reg = ins->dst[0].reg.idx; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - SHADER_PARSE_STATE* current_state = &shader->baseShader.parse_state; + struct wined3d_shader_tex_mx *tex_mx = ins->ctx->tex_mx; glsl_src_param_t src0_param; DWORD src_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2; glsl_sample_function_t sample_function; @@ -3451,7 +3469,7 @@ static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *in /* Construct the eye-ray vector from w coordinates */ shader_addline(buffer, "tmp1.xyz = normalize(vec3(gl_TexCoord[%u].w, gl_TexCoord[%u].w, gl_TexCoord[%u].w));\n", - current_state->texcoord_w[0], current_state->texcoord_w[1], reg); + tex_mx->texcoord_w[0], tex_mx->texcoord_w[1], reg); shader_addline(buffer, "tmp0.xyz = -reflect(tmp1.xyz, normalize(tmp0.xyz));\n"); /* Dependent read, not valid with conditional NP2 */ @@ -3460,7 +3478,7 @@ static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *in /* Sample the texture using the calculated coordinates */ shader_glsl_gen_sample_code(ins, reg, &sample_function, WINED3DSP_NOSWIZZLE, NULL, NULL, NULL, "tmp0.xyz"); - current_state->current_row = 0; + tex_mx->current_row = 0; } /** Process the WINED3DSIO_TEXBEM instruction in GLSL. @@ -3630,13 +3648,13 @@ static void shader_glsl_dp2add(const struct wined3d_shader_instruction *ins) } } -static void shader_glsl_input_pack(IWineD3DPixelShader *iface, struct wined3d_shader_buffer *buffer, - const struct wined3d_shader_signature_element *input_signature, const struct shader_reg_maps *reg_maps, +static void shader_glsl_input_pack(const struct wined3d_shader *shader, struct wined3d_shader_buffer *buffer, + const struct wined3d_shader_signature_element *input_signature, + const struct wined3d_shader_reg_maps *reg_maps, enum vertexprocessing_mode vertexprocessing) { - unsigned int i; - IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface; WORD map = reg_maps->input_registers; + unsigned int i; for (i = 0; map; map >>= 1, ++i) { @@ -3655,27 +3673,27 @@ static void shader_glsl_input_pack(IWineD3DPixelShader *iface, struct wined3d_sh { if (semantic_idx < 8 && vertexprocessing == pretransformed) shader_addline(buffer, "IN[%u]%s = gl_TexCoord[%u]%s;\n", - This->input_reg_map[i], reg_mask, semantic_idx, reg_mask); + shader->u.ps.input_reg_map[i], reg_mask, semantic_idx, reg_mask); else shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n", - This->input_reg_map[i], reg_mask, reg_mask); + shader->u.ps.input_reg_map[i], reg_mask, reg_mask); } else if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_COLOR)) { if (!semantic_idx) shader_addline(buffer, "IN[%u]%s = vec4(gl_Color)%s;\n", - This->input_reg_map[i], reg_mask, reg_mask); + shader->u.ps.input_reg_map[i], reg_mask, reg_mask); else if (semantic_idx == 1) shader_addline(buffer, "IN[%u]%s = vec4(gl_SecondaryColor)%s;\n", - This->input_reg_map[i], reg_mask, reg_mask); + shader->u.ps.input_reg_map[i], reg_mask, reg_mask); else shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n", - This->input_reg_map[i], reg_mask, reg_mask); + shader->u.ps.input_reg_map[i], reg_mask, reg_mask); } else { shader_addline(buffer, "IN[%u]%s = vec4(0.0, 0.0, 0.0, 0.0)%s;\n", - This->input_reg_map[i], reg_mask, reg_mask); + shader->u.ps.input_reg_map[i], reg_mask, reg_mask); } } } @@ -3684,8 +3702,9 @@ static void shader_glsl_input_pack(IWineD3DPixelShader *iface, struct wined3d_sh * Vertex Shader Specific Code begins here ********************************************/ -static void add_glsl_program_entry(struct shader_glsl_priv *priv, struct glsl_shader_prog_link *entry) { - glsl_program_key_t key; +static void add_glsl_program_entry(struct shader_glsl_priv *priv, struct glsl_shader_prog_link *entry) +{ + struct glsl_program_key key; key.vshader = entry->vshader; key.pshader = entry->pshader; @@ -3699,10 +3718,11 @@ static void add_glsl_program_entry(struct shader_glsl_priv *priv, struct glsl_sh } static struct glsl_shader_prog_link *get_glsl_program_entry(struct shader_glsl_priv *priv, - IWineD3DVertexShader *vshader, IWineD3DPixelShader *pshader, struct vs_compile_args *vs_args, - struct ps_compile_args *ps_args) { + const struct wined3d_shader *vshader, const struct wined3d_shader *pshader, + struct vs_compile_args *vs_args, struct ps_compile_args *ps_args) +{ struct wine_rb_entry *entry; - glsl_program_key_t key; + struct glsl_program_key key; key.vshader = vshader; key.pshader = pshader; @@ -3717,7 +3737,7 @@ static struct glsl_shader_prog_link *get_glsl_program_entry(struct shader_glsl_p static void delete_glsl_program_entry(struct shader_glsl_priv *priv, const struct wined3d_gl_info *gl_info, struct glsl_shader_prog_link *entry) { - glsl_program_key_t key; + struct glsl_program_key key; key.vshader = entry->vshader; key.pshader = entry->pshader; @@ -3733,9 +3753,12 @@ static void delete_glsl_program_entry(struct shader_glsl_priv *priv, const struc HeapFree(GetProcessHeap(), 0, entry); } -static void handle_ps3_input(struct wined3d_shader_buffer *buffer, const struct wined3d_gl_info *gl_info, const DWORD *map, - const struct wined3d_shader_signature_element *input_signature, const struct shader_reg_maps *reg_maps_in, - const struct wined3d_shader_signature_element *output_signature, const struct shader_reg_maps *reg_maps_out) +static void handle_ps3_input(struct wined3d_shader_buffer *buffer, + const struct wined3d_gl_info *gl_info, const DWORD *map, + const struct wined3d_shader_signature_element *input_signature, + const struct wined3d_shader_reg_maps *reg_maps_in, + const struct wined3d_shader_signature_element *output_signature, + const struct wined3d_shader_reg_maps *reg_maps_out) { unsigned int i, j; const char *semantic_name_in; @@ -3789,7 +3812,7 @@ static void handle_ps3_input(struct wined3d_shader_buffer *buffer, const struct set[in_idx] = mask; shader_glsl_write_mask_to_str(mask, reg_mask); - shader_addline(buffer, "%s%s = clamp(OUT[%u]%s, -FLT_MAX, FLT_MAX);\n", + shader_addline(buffer, "%s%s = OUT[%u]%s;\n", destination, reg_mask, j, reg_mask); } } @@ -3823,23 +3846,21 @@ static void handle_ps3_input(struct wined3d_shader_buffer *buffer, const struct /* GL locking is done by the caller */ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer *buffer, - IWineD3DVertexShader *vertexshader, IWineD3DPixelShader *pixelshader, const struct wined3d_gl_info *gl_info) + const struct wined3d_shader *vs, const struct wined3d_shader *ps, + const struct wined3d_gl_info *gl_info) { GLhandleARB ret = 0; - IWineD3DVertexShaderImpl *vs = (IWineD3DVertexShaderImpl *) vertexshader; - IWineD3DPixelShaderImpl *ps = (IWineD3DPixelShaderImpl *) pixelshader; - DWORD ps_major = ps ? ps->baseShader.reg_maps.shader_version.major : 0; + DWORD ps_major = ps ? ps->reg_maps.shader_version.major : 0; unsigned int i; const char *semantic_name; UINT semantic_idx; char reg_mask[6]; - const struct wined3d_shader_signature_element *output_signature = vs->baseShader.output_signature; - WORD map = vs->baseShader.reg_maps.output_registers; + const struct wined3d_shader_signature_element *output_signature = vs->output_signature; + WORD map = vs->reg_maps.output_registers; shader_buffer_clear(buffer); shader_addline(buffer, "#version 120\n"); - shader_addline(buffer, "const float FLT_MAX = 1e38;\n"); if (ps_major < 3) { @@ -3859,15 +3880,15 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_COLOR)) { if (!semantic_idx) - shader_addline(buffer, "gl_FrontColor%s = clamp(OUT[%u]%s, -FLT_MAX, FLT_MAX);\n", + shader_addline(buffer, "gl_FrontColor%s = OUT[%u]%s;\n", reg_mask, i, reg_mask); else if (semantic_idx == 1) - shader_addline(buffer, "gl_FrontSecondaryColor%s = clamp(OUT[%u]%s, -FLT_MAX, FLT_MAX);\n", + shader_addline(buffer, "gl_FrontSecondaryColor%s = OUT[%u]%s;\n", reg_mask, i, reg_mask); } else if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_POSITION)) { - shader_addline(buffer, "gl_Position%s = clamp(OUT[%u]%s, -FLT_MAX, FLT_MAX);\n", + shader_addline(buffer, "gl_Position%s = OUT[%u]%s;\n", reg_mask, i, reg_mask); } else if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_TEXCOORD)) @@ -3877,7 +3898,7 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer if (!(gl_info->quirks & WINED3D_QUIRK_SET_TEXCOORD_W) || ps_major > 0) write_mask |= WINED3DSP_WRITEMASK_3; - shader_addline(buffer, "gl_TexCoord[%u]%s = clamp(OUT[%u]%s, -FLT_MAX, FLT_MAX);\n", + shader_addline(buffer, "gl_TexCoord[%u]%s = OUT[%u]%s;\n", semantic_idx, reg_mask, i, reg_mask); if (!(write_mask & WINED3DSP_WRITEMASK_3)) shader_addline(buffer, "gl_TexCoord[%u].w = 1.0;\n", semantic_idx); @@ -3885,11 +3906,11 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer } else if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_PSIZE)) { - shader_addline(buffer, "gl_PointSize = clamp(OUT[%u].%c, -FLT_MAX, FLT_MAX);\n", i, reg_mask[1]); + shader_addline(buffer, "gl_PointSize = OUT[%u].%c;\n", i, reg_mask[1]); } else if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_FOG)) { - shader_addline(buffer, "gl_FogFragCoord = clamp(OUT[%u].%c, -FLT_MAX, FLT_MAX);\n", i, reg_mask[1]); + shader_addline(buffer, "gl_FogFragCoord = OUT[%u].%c;\n", i, reg_mask[1]); } } shader_addline(buffer, "}\n"); @@ -3911,18 +3932,18 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_POSITION)) { - shader_addline(buffer, "gl_Position%s = clamp(OUT[%u]%s, -FLT_MAX, FLT_MAX);\n", + shader_addline(buffer, "gl_Position%s = OUT[%u]%s;\n", reg_mask, i, reg_mask); } else if (shader_match_semantic(semantic_name, WINED3DDECLUSAGE_PSIZE)) { - shader_addline(buffer, "gl_PointSize = clamp(OUT[%u].%c, -FLT_MAX, FLT_MAX);\n", i, reg_mask[1]); + shader_addline(buffer, "gl_PointSize = OUT[%u].%c;\n", i, reg_mask[1]); } } /* Then, fix the pixel shader input */ - handle_ps3_input(buffer, gl_info, ps->input_reg_map, ps->baseShader.input_signature, - &ps->baseShader.reg_maps, output_signature, &vs->baseShader.reg_maps); + handle_ps3_input(buffer, gl_info, ps->u.ps.input_reg_map, ps->input_signature, + &ps->reg_maps, output_signature, &vs->reg_maps); shader_addline(buffer, "}\n"); } @@ -3935,15 +3956,16 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer } /* GL locking is done by the caller */ -static void hardcode_local_constants(IWineD3DBaseShaderImpl *shader, const struct wined3d_gl_info *gl_info, - GLhandleARB programId, char prefix) +static void hardcode_local_constants(const struct wined3d_shader *shader, + const struct wined3d_gl_info *gl_info, GLhandleARB programId, char prefix) { const local_constant *lconst; GLint tmp_loc; const float *value; char glsl_name[8]; - LIST_FOR_EACH_ENTRY(lconst, &shader->baseShader.constantsF, local_constant, entry) { + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { value = (const float *)lconst->value; snprintf(glsl_name, sizeof(glsl_name), "%cLC%u", prefix, lconst->idx); tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name)); @@ -3954,12 +3976,12 @@ static void hardcode_local_constants(IWineD3DBaseShaderImpl *shader, const struc /* GL locking is done by the caller */ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context, - struct wined3d_shader_buffer *buffer, IWineD3DPixelShaderImpl *This, + struct wined3d_shader_buffer *buffer, struct wined3d_shader *shader, const struct ps_compile_args *args, struct ps_np2fixup_info *np2fixup_info) { - const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps; + const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; const struct wined3d_gl_info *gl_info = context->gl_info; - CONST DWORD *function = This->baseShader.function; + const DWORD *function = shader->function; struct shader_glsl_ctx_priv priv_ctx; /* Create the hw GLSL shader object and assign it as the shader->prgId */ @@ -3988,17 +4010,14 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context } /* Base Declarations */ - shader_generate_glsl_declarations(context, buffer, (IWineD3DBaseShader *)This, reg_maps, &priv_ctx); + shader_generate_glsl_declarations(context, buffer, shader, reg_maps, &priv_ctx); /* Pack 3.0 inputs */ if (reg_maps->shader_version.major >= 3 && args->vp_mode != vertexshader) - { - shader_glsl_input_pack((IWineD3DPixelShader *) This, buffer, - This->baseShader.input_signature, reg_maps, args->vp_mode); - } + shader_glsl_input_pack(shader, buffer, shader->input_signature, reg_maps, args->vp_mode); /* Base Shader Body */ - shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function, &priv_ctx); + shader_generate_main(shader, buffer, reg_maps, function, &priv_ctx); /* Pixel shaders < 2.0 place the resulting color in R0 implicitly */ if (reg_maps->shader_version.major < 2) @@ -4058,12 +4077,12 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context /* GL locking is done by the caller */ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context, - struct wined3d_shader_buffer *buffer, IWineD3DVertexShaderImpl *This, + struct wined3d_shader_buffer *buffer, struct wined3d_shader *shader, const struct vs_compile_args *args) { - const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps; + const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; const struct wined3d_gl_info *gl_info = context->gl_info; - CONST DWORD *function = This->baseShader.function; + const DWORD *function = shader->function; struct shader_glsl_ctx_priv priv_ctx; /* Create the hw GLSL shader program and assign it as the shader->prgId */ @@ -4072,18 +4091,16 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context shader_addline(buffer, "#version 120\n"); if (gl_info->supported[EXT_GPU_SHADER4]) - { shader_addline(buffer, "#extension GL_EXT_gpu_shader4 : enable\n"); - } memset(&priv_ctx, 0, sizeof(priv_ctx)); priv_ctx.cur_vs_args = args; /* Base Declarations */ - shader_generate_glsl_declarations(context, buffer, (IWineD3DBaseShader *)This, reg_maps, &priv_ctx); + shader_generate_glsl_declarations(context, buffer, shader, reg_maps, &priv_ctx); /* Base Shader Body */ - shader_generate_main((IWineD3DBaseShader*)This, buffer, reg_maps, function, &priv_ctx); + shader_generate_main(shader, buffer, reg_maps, function, &priv_ctx); /* Unpack outputs */ shader_addline(buffer, "order_ps_input(OUT);\n"); @@ -4093,11 +4110,14 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context * the fog frag coord is thrown away. If the fog frag coord is used, but not written by * the shader, it is set to 0.0(fully fogged, since start = 1.0, end = 0.0) */ - if(args->fog_src == VS_FOG_Z) { + if (args->fog_src == VS_FOG_Z) shader_addline(buffer, "gl_FogFragCoord = gl_Position.z;\n"); - } else if (!reg_maps->fog) { + else if (!reg_maps->fog) shader_addline(buffer, "gl_FogFragCoord = 0.0;\n"); - } + + /* We always store the clipplanes without y inversion */ + if (args->clip_enabled) + shader_addline(buffer, "gl_ClipVertex = gl_Position;\n"); /* Write the final position. * @@ -4108,9 +4128,6 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context */ shader_addline(buffer, "gl_Position.y = gl_Position.y * posFixup.y;\n"); shader_addline(buffer, "gl_Position.xy += posFixup.zw * gl_Position.ww;\n"); - if(args->clip_enabled) { - shader_addline(buffer, "gl_ClipVertex = gl_Position;\n"); - } /* Z coord [0;1]->[-1;1] mapping, see comment in transform_projection in state.c * @@ -4129,10 +4146,10 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context } static GLhandleARB find_glsl_pshader(const struct wined3d_context *context, - struct wined3d_shader_buffer *buffer, IWineD3DPixelShaderImpl *shader, + struct wined3d_shader_buffer *buffer, struct wined3d_shader *shader, const struct ps_compile_args *args, const struct ps_np2fixup_info **np2fixup_info) { - struct wined3d_state *state = &((IWineD3DDeviceImpl *)shader->baseShader.device)->stateBlock->state; + struct wined3d_state *state = &shader->device->stateBlock->state; UINT i; DWORD new_size; struct glsl_ps_compiled_shader *new_array; @@ -4140,16 +4157,16 @@ static GLhandleARB find_glsl_pshader(const struct wined3d_context *context, struct ps_np2fixup_info *np2fixup = NULL; GLhandleARB ret; - if (!shader->baseShader.backend_data) + if (!shader->backend_data) { - shader->baseShader.backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); - if (!shader->baseShader.backend_data) + shader->backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); + if (!shader->backend_data) { ERR("Failed to allocate backend data.\n"); return 0; } } - shader_data = shader->baseShader.backend_data; + shader_data = shader->backend_data; /* Usually we have very few GL shaders for each d3d shader(just 1 or maybe 2), * so a linear search is more performant than a hashmap or a binary search @@ -4189,7 +4206,7 @@ static GLhandleARB find_glsl_pshader(const struct wined3d_context *context, memset(&shader_data->gl_shaders[shader_data->num_gl_shaders].np2fixup, 0, sizeof(struct ps_np2fixup_info)); if (args->np2_fixup) np2fixup = &shader_data->gl_shaders[shader_data->num_gl_shaders].np2fixup; - pixelshader_update_samplers(&shader->baseShader.reg_maps, (IWineD3DBaseTexture **)state->textures); + pixelshader_update_samplers(&shader->reg_maps, state->textures); shader_buffer_clear(buffer); ret = shader_glsl_generate_pshader(context, buffer, shader, args, np2fixup); @@ -4207,26 +4224,26 @@ static inline BOOL vs_args_equal(const struct vs_compile_args *stored, const str } static GLhandleARB find_glsl_vshader(const struct wined3d_context *context, - struct wined3d_shader_buffer *buffer, IWineD3DVertexShaderImpl *shader, + struct wined3d_shader_buffer *buffer, struct wined3d_shader *shader, const struct vs_compile_args *args) { UINT i; DWORD new_size; struct glsl_vs_compiled_shader *new_array; - DWORD use_map = ((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.use_map; + DWORD use_map = shader->device->strided_streams.use_map; struct glsl_vshader_private *shader_data; GLhandleARB ret; - if (!shader->baseShader.backend_data) + if (!shader->backend_data) { - shader->baseShader.backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); - if (!shader->baseShader.backend_data) + shader->backend_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); + if (!shader->backend_data) { ERR("Failed to allocate backend data.\n"); return 0; } } - shader_data = shader->baseShader.backend_data; + shader_data = shader->backend_data; /* Usually we have very few GL shaders for each d3d shader(just 1 or maybe 2), * so a linear search is more performant than a hashmap or a binary search @@ -4279,11 +4296,11 @@ static GLhandleARB find_glsl_vshader(const struct wined3d_context *context, /* GL locking is done by the caller */ static void set_glsl_shader_program(const struct wined3d_context *context, - IWineD3DDeviceImpl *device, BOOL use_ps, BOOL use_vs) + struct wined3d_device *device, BOOL use_ps, BOOL use_vs) { const struct wined3d_state *state = &device->stateBlock->state; - IWineD3DVertexShader *vshader = use_vs ? (IWineD3DVertexShader *)state->vertex_shader : NULL; - IWineD3DPixelShader *pshader = use_ps ? (IWineD3DPixelShader *)state->pixel_shader : NULL; + struct wined3d_shader *vshader = use_vs ? state->vertex_shader : NULL; + struct wined3d_shader *pshader = use_ps ? state->pixel_shader : NULL; const struct wined3d_gl_info *gl_info = context->gl_info; struct shader_glsl_priv *priv = device->shader_priv; struct glsl_shader_prog_link *entry = NULL; @@ -4294,11 +4311,12 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struct ps_compile_args ps_compile_args; struct vs_compile_args vs_compile_args; - if (vshader) find_vs_compile_args(state, (IWineD3DVertexShaderImpl *)vshader, &vs_compile_args); - if (pshader) find_ps_compile_args(state, (IWineD3DPixelShaderImpl *)pshader, &ps_compile_args); + if (vshader) find_vs_compile_args(state, vshader, &vs_compile_args); + if (pshader) find_ps_compile_args(state, pshader, &ps_compile_args); entry = get_glsl_program_entry(priv, vshader, pshader, &vs_compile_args, &ps_compile_args); - if (entry) { + if (entry) + { priv->glsl_program = entry; return; } @@ -4325,9 +4343,8 @@ static void set_glsl_shader_program(const struct wined3d_context *context, /* Attach GLSL vshader */ if (vshader) { - GLhandleARB vshader_id = find_glsl_vshader(context, &priv->shader_buffer, - (IWineD3DVertexShaderImpl *)vshader, &vs_compile_args); - WORD map = ((IWineD3DBaseShaderImpl *)vshader)->baseShader.reg_maps.input_registers; + GLhandleARB vshader_id = find_glsl_vshader(context, &priv->shader_buffer, vshader, &vs_compile_args); + WORD map = vshader->reg_maps.input_registers; char tmp_name[10]; reorder_shader_id = generate_param_reorder_function(&priv->shader_buffer, vshader, pshader, gl_info); @@ -4361,19 +4378,19 @@ static void set_glsl_shader_program(const struct wined3d_context *context, } checkGLcall("glBindAttribLocationARB"); - list_add_head(&((IWineD3DBaseShaderImpl *)vshader)->baseShader.linked_programs, &entry->vshader_entry); + list_add_head(&vshader->linked_programs, &entry->vshader_entry); } /* Attach GLSL pshader */ if (pshader) { GLhandleARB pshader_id = find_glsl_pshader(context, &priv->shader_buffer, - (IWineD3DPixelShaderImpl *)pshader, &ps_compile_args, &entry->np2Fixup_info); + pshader, &ps_compile_args, &entry->np2Fixup_info); TRACE("Attaching GLSL shader object %u to program %u\n", pshader_id, programId); GL_EXTCALL(glAttachObjectARB(programId, pshader_id)); checkGLcall("glAttachObjectARB"); - list_add_head(&((IWineD3DBaseShaderImpl *)pshader)->baseShader.linked_programs, &entry->pshader_entry); + list_add_head(&pshader->linked_programs, &entry->pshader_entry); } /* Link the program */ @@ -4431,9 +4448,8 @@ static void set_glsl_shader_program(const struct wined3d_context *context, entry->ycorrection_location = GL_EXTCALL(glGetUniformLocationARB(programId, "ycorrection")); checkGLcall("Find glsl program uniform locations"); - if (pshader - && ((IWineD3DPixelShaderImpl *)pshader)->baseShader.reg_maps.shader_version.major >= 3 - && ((IWineD3DPixelShaderImpl *)pshader)->declared_in_count > vec4_varyings(3, gl_info)) + if (pshader && pshader->reg_maps.shader_version.major >= 3 + && pshader->u.ps.declared_in_count > vec4_varyings(3, gl_info)) { TRACE("Shader %d needs vertex color clamping disabled\n", programId); entry->vertex_color_clamp = GL_FALSE; @@ -4460,14 +4476,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, * load them now to have them hardcoded in the GLSL program. This saves some CPU cycles * later */ - if (pshader && !((IWineD3DBaseShaderImpl *)pshader)->baseShader.load_local_constsF) - { - hardcode_local_constants((IWineD3DBaseShaderImpl *) pshader, gl_info, programId, 'P'); - } - if (vshader && !((IWineD3DBaseShaderImpl *)vshader)->baseShader.load_local_constsF) - { - hardcode_local_constants((IWineD3DBaseShaderImpl *) vshader, gl_info, programId, 'V'); - } + if (pshader && !pshader->load_local_constsF) + hardcode_local_constants(pshader, gl_info, programId, 'P'); + if (vshader && !vshader->load_local_constsF) + hardcode_local_constants(vshader, gl_info, programId, 'V'); } /* GL locking is done by the caller */ @@ -4556,7 +4568,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info, if (!blt_pshader) { FIXME("tex_type %#x not supported\n", tex_type); - tex_type = tex_2d; + return 0; } vshader_id = GL_EXTCALL(glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB)); @@ -4584,7 +4596,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info, static void shader_glsl_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) { const struct wined3d_gl_info *gl_info = context->gl_info; - IWineD3DDeviceImpl *device = context->swapchain->device; + struct wined3d_device *device = context->swapchain->device; struct shader_glsl_priv *priv = device->shader_priv; GLhandleARB program_id = 0; GLenum old_vertex_color_clamp, current_vertex_color_clamp; @@ -4619,18 +4631,16 @@ static void shader_glsl_select(const struct wined3d_context *context, BOOL usePS * called between selecting the shader and using it, which results in wrong fixup for some frames. */ if (priv->glsl_program && priv->glsl_program->np2Fixup_info) { - shader_glsl_load_np2fixup_constants((IWineD3DDevice *)device, usePS, useVS); + shader_glsl_load_np2fixup_constants(priv, gl_info, &device->stateBlock->state); } } /* GL locking is done by the caller */ -static void shader_glsl_select_depth_blt(IWineD3DDevice *iface, +static void shader_glsl_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info, enum tex_types tex_type, const SIZE *ds_mask_size) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; BOOL masked = ds_mask_size->cx && ds_mask_size->cy; - struct shader_glsl_priv *priv = This->shader_priv; + struct shader_glsl_priv *priv = shader_priv; GLhandleARB *blt_program; GLint loc; @@ -4655,10 +4665,9 @@ static void shader_glsl_select_depth_blt(IWineD3DDevice *iface, } /* GL locking is done by the caller */ -static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - struct shader_glsl_priv *priv = This->shader_priv; +static void shader_glsl_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info) +{ + struct shader_glsl_priv *priv = shader_priv; GLhandleARB program_id; program_id = priv->glsl_program ? priv->glsl_program->programId : 0; @@ -4668,52 +4677,52 @@ static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) { checkGLcall("glUseProgramObjectARB"); } -static void shader_glsl_destroy(IWineD3DBaseShader *iface) { - const struct list *linked_programs; - IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) iface; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device; +static void shader_glsl_destroy(struct wined3d_shader *shader) +{ + struct wined3d_device *device = shader->device; struct shader_glsl_priv *priv = device->shader_priv; const struct wined3d_gl_info *gl_info; + const struct list *linked_programs; struct wined3d_context *context; - /* Note: Do not use QueryInterface here to find out which shader type this is because this code - * can be called from IWineD3DBaseShader::Release - */ - char pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type); + char pshader = shader_is_pshader_version(shader->reg_maps.shader_version.type); + + if (pshader) + { + struct glsl_pshader_private *shader_data = shader->backend_data; - if(pshader) { - struct glsl_pshader_private *shader_data; - shader_data = This->baseShader.backend_data; if (!shader_data || !shader_data->num_gl_shaders) { HeapFree(GetProcessHeap(), 0, shader_data); - This->baseShader.backend_data = NULL; + shader->backend_data = NULL; return; } context = context_acquire(device, NULL); gl_info = context->gl_info; - if (priv->glsl_program && (IWineD3DBaseShader *)priv->glsl_program->pshader == iface) + if (priv->glsl_program && priv->glsl_program->pshader == shader) { ENTER_GL(); shader_glsl_select(context, FALSE, FALSE); LEAVE_GL(); } - } else { - struct glsl_vshader_private *shader_data; - shader_data = This->baseShader.backend_data; + } + else + { + struct glsl_vshader_private *shader_data = shader->backend_data; + if (!shader_data || !shader_data->num_gl_shaders) { HeapFree(GetProcessHeap(), 0, shader_data); - This->baseShader.backend_data = NULL; + shader->backend_data = NULL; return; } context = context_acquire(device, NULL); gl_info = context->gl_info; - if (priv->glsl_program && (IWineD3DBaseShader *)priv->glsl_program->vshader == iface) + if (priv->glsl_program && priv->glsl_program->vshader == shader) { ENTER_GL(); shader_glsl_select(context, FALSE, FALSE); @@ -4721,7 +4730,7 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) { } } - linked_programs = &This->baseShader.linked_programs; + linked_programs = &shader->linked_programs; TRACE("Deleting linked programs\n"); if (linked_programs->next) { @@ -4740,9 +4749,10 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) { LEAVE_GL(); } - if(pshader) { + if (pshader) + { + struct glsl_pshader_private *shader_data = shader->backend_data; UINT i; - struct glsl_pshader_private *shader_data = This->baseShader.backend_data; ENTER_GL(); for(i = 0; i < shader_data->num_gl_shaders; i++) { @@ -4755,8 +4765,8 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) { } else { + struct glsl_vshader_private *shader_data = shader->backend_data; UINT i; - struct glsl_vshader_private *shader_data = This->baseShader.backend_data; ENTER_GL(); for(i = 0; i < shader_data->num_gl_shaders; i++) { @@ -4768,15 +4778,15 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) { HeapFree(GetProcessHeap(), 0, shader_data->gl_shaders); } - HeapFree(GetProcessHeap(), 0, This->baseShader.backend_data); - This->baseShader.backend_data = NULL; + HeapFree(GetProcessHeap(), 0, shader->backend_data); + shader->backend_data = NULL; context_release(context); } static int glsl_program_key_compare(const void *key, const struct wine_rb_entry *entry) { - const glsl_program_key_t *k = key; + const struct glsl_program_key *k = key; const struct glsl_shader_prog_link *prog = WINE_RB_ENTRY_VALUE(entry, const struct glsl_shader_prog_link, program_lookup_entry); int cmp; @@ -4825,9 +4835,9 @@ static const struct wine_rb_functions wined3d_glsl_program_rb_functions = glsl_program_key_compare, }; -static HRESULT shader_glsl_alloc(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; +static HRESULT shader_glsl_alloc(struct wined3d_device *device) +{ + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct shader_glsl_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_glsl_priv)); SIZE_T stack_size = wined3d_log2i(max(gl_info->limits.glsl_vs_float_constants, gl_info->limits.glsl_ps_float_constants)) + 1; @@ -4865,7 +4875,7 @@ static HRESULT shader_glsl_alloc(IWineD3DDevice *iface) { priv->next_constant_version = 1; - This->shader_priv = priv; + device->shader_priv = priv; return WINED3D_OK; fail: @@ -4878,10 +4888,10 @@ fail: } /* Context activation is done by the caller. */ -static void shader_glsl_free(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->adapter->gl_info; - struct shader_glsl_priv *priv = This->shader_priv; +static void shader_glsl_free(struct wined3d_device *device) +{ + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + struct shader_glsl_priv *priv = device->shader_priv; int i; ENTER_GL(); @@ -4904,51 +4914,49 @@ static void shader_glsl_free(IWineD3DDevice *iface) { HeapFree(GetProcessHeap(), 0, priv->stack); shader_buffer_free(&priv->shader_buffer); - HeapFree(GetProcessHeap(), 0, This->shader_priv); - This->shader_priv = NULL; + HeapFree(GetProcessHeap(), 0, device->shader_priv); + device->shader_priv = NULL; } -static BOOL shader_glsl_dirty_const(IWineD3DDevice *iface) { +static BOOL shader_glsl_dirty_const(void) +{ /* TODO: GL_EXT_bindable_uniform can be used to share constants across shaders */ return FALSE; } -static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *pCaps) +static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps) { - /* Nvidia Geforce6/7 or Ati R4xx/R5xx cards with GLSL support, support VS 3.0 but older Nvidia/Ati - * models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support based - * on the version of NV_vertex_program. - * For Ati cards there's no way using glsl (it abstracts the lowlevel info away) and also not - * using ARB_vertex_program. It is safe to assume that when a card supports pixel shader 2.0 it - * supports vertex shader 2.0 too and the way around. We can detect ps2.0 using the maximum number - * of native instructions, so use that here. For more info see the pixel shader versioning code below. - */ - if ((gl_info->supported[NV_VERTEX_PROGRAM2] && !gl_info->supported[NV_VERTEX_PROGRAM3]) - || gl_info->limits.arb_ps_instructions <= 512) - pCaps->VertexShaderVersion = WINED3DVS_VERSION(2,0); - else - pCaps->VertexShaderVersion = WINED3DVS_VERSION(3,0); - TRACE_(d3d_caps)("Hardware vertex shader version %d.%d enabled (GLSL)\n", (pCaps->VertexShaderVersion >> 8) & 0xff, pCaps->VertexShaderVersion & 0xff); - pCaps->MaxVertexShaderConst = gl_info->limits.glsl_vs_float_constants; - - /* Older DX9-class videocards (GeforceFX / Radeon >9500/X*00) only support pixel shader 2.0/2.0a/2.0b. - * In OpenGL the extensions related to GLSL abstract lowlevel GL info away which is needed - * to distinguish between 2.0 and 3.0 (and 2.0a/2.0b). In case of Nvidia we use their fragment - * program extensions. On other hardware including ATI GL_ARB_fragment_program offers the info - * in max native instructions. Intel and others also offer the info in this extension but they - * don't support GLSL (at least on Windows). + /* NVIDIA GeForce 6 / 7 or ATI R4xx / R5xx cards with GLSL support + * support SM3, but older NVIDIA / ATI models with GLSL support only + * support SM2. In case of NVIDIA we can detect SM3 support based on the + * version of NV_vertex_program / NV_fragment_program. For other cards we + * try to detect SM3 based on the maximum number of native fragment + * program instructions. PS2.0 requires at least 96 instructions, 2.0a/b + * goes up to 512. Assume that if the number of instructions is 512 or + * less we have to do with SM2 hardware. NOTE: SM3 requires 512 or more + * instructions but ATI and NVIDIA offer more than that (1024 vs 4096) on + * their most basic SM3 hardware. * - * PS2.0 requires at least 96 instructions, 2.0a/2.0b go up to 512. Assume that if the number - * of instructions is 512 or less we have to do with ps2.0 hardware. - * NOTE: ps3.0 hardware requires 512 or more instructions but ati and nvidia offer 'enough' (1024 vs 4096) on their most basic ps3.0 hardware. - */ - if ((gl_info->supported[NV_FRAGMENT_PROGRAM] && !gl_info->supported[NV_FRAGMENT_PROGRAM2]) - || gl_info->limits.arb_ps_instructions <= 512) - pCaps->PixelShaderVersion = WINED3DPS_VERSION(2,0); + * ARB_shader_texture_lod is a requirement for SM3 (texldd). Ideally we'd + * make this a hard requirement, but the extension is still somewhat new, + * and relatively few SM3 shaders actually depend on it. For the moment + * just use it to enable SM3 (20110423). */ + if ((gl_info->supported[NV_VERTEX_PROGRAM3] && gl_info->supported[NV_FRAGMENT_PROGRAM2]) + || gl_info->limits.arb_ps_instructions > 512 + || gl_info->supported[ARB_SHADER_TEXTURE_LOD] + || gl_info->supported[EXT_GPU_SHADER4]) + { + caps->VertexShaderVersion = WINED3DVS_VERSION(3,0); + caps->PixelShaderVersion = WINED3DPS_VERSION(3,0); + } else - pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0); + { + caps->VertexShaderVersion = WINED3DVS_VERSION(2,0); + caps->PixelShaderVersion = WINED3DPS_VERSION(2,0); + } - pCaps->MaxPixelShaderConst = gl_info->limits.glsl_ps_float_constants; + caps->MaxVertexShaderConst = gl_info->limits.glsl_vs_float_constants; + caps->MaxPixelShaderConst = gl_info->limits.glsl_ps_float_constants; /* FIXME: The following line is card dependent. -8.0 to 8.0 is the * Direct3D minimum requirement. @@ -4962,10 +4970,14 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s * the shader will generate incorrect results too. Unfortunately, GL deliberately doesn't * offer a way to query this. */ - pCaps->PixelShader1xMaxValue = 8.0; - TRACE_(d3d_caps)("Hardware pixel shader version %d.%d enabled (GLSL)\n", (pCaps->PixelShaderVersion >> 8) & 0xff, pCaps->PixelShaderVersion & 0xff); + caps->PixelShader1xMaxValue = 8.0; - pCaps->VSClipping = TRUE; + caps->VSClipping = TRUE; + + TRACE_(d3d_caps)("Hardware vertex shader version %u.%u enabled (GLSL).\n", + (caps->VertexShaderVersion >> 8) & 0xff, caps->VertexShaderVersion & 0xff); + TRACE_(d3d_caps)("Hardware pixel shader version %u.%u enabled (GLSL).\n", + (caps->PixelShaderVersion >> 8) & 0xff, caps->PixelShaderVersion & 0xff); } static BOOL shader_glsl_color_fixup_supported(struct color_fixup_desc fixup) @@ -5006,6 +5018,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DEF */ NULL, /* WINED3DSIH_DEFB */ NULL, /* WINED3DSIH_DEFI */ NULL, + /* WINED3DSIH_DIV */ NULL, /* WINED3DSIH_DP2ADD */ shader_glsl_dp2add, /* WINED3DSIH_DP3 */ shader_glsl_dot, /* WINED3DSIH_DP4 */ shader_glsl_dot, @@ -5020,12 +5033,16 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_EXP */ shader_glsl_map2gl, /* WINED3DSIH_EXPP */ shader_glsl_expp, /* WINED3DSIH_FRC */ shader_glsl_map2gl, + /* WINED3DSIH_FTOI */ NULL, /* WINED3DSIH_IADD */ NULL, + /* WINED3DSIH_IEQ */ NULL, /* WINED3DSIH_IF */ shader_glsl_if, /* WINED3DSIH_IFC */ shader_glsl_ifc, /* WINED3DSIH_IGE */ NULL, /* WINED3DSIH_IMUL */ NULL, + /* WINED3DSIH_ITOF */ NULL, /* WINED3DSIH_LABEL */ shader_glsl_label, + /* WINED3DSIH_LD */ NULL, /* WINED3DSIH_LIT */ shader_glsl_lit, /* WINED3DSIH_LOG */ shader_glsl_log, /* WINED3DSIH_LOGP */ shader_glsl_log, @@ -5052,11 +5069,15 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_REP */ shader_glsl_rep, /* WINED3DSIH_RET */ shader_glsl_ret, /* WINED3DSIH_RSQ */ shader_glsl_rsq, + /* WINED3DSIH_SAMPLE */ NULL, + /* WINED3DSIH_SAMPLE_GRAD */ NULL, + /* WINED3DSIH_SAMPLE_LOD */ NULL, /* WINED3DSIH_SETP */ NULL, /* WINED3DSIH_SGE */ shader_glsl_compare, /* WINED3DSIH_SGN */ shader_glsl_sgn, /* WINED3DSIH_SINCOS */ shader_glsl_sincos, /* WINED3DSIH_SLT */ shader_glsl_compare, + /* WINED3DSIH_SQRT */ NULL, /* WINED3DSIH_SUB */ shader_glsl_arith, /* WINED3DSIH_TEX */ shader_glsl_tex, /* WINED3DSIH_TEXBEM */ shader_glsl_texbem, @@ -5080,6 +5101,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_TEXREG2AR */ shader_glsl_texreg2ar, /* WINED3DSIH_TEXREG2GB */ shader_glsl_texreg2gb, /* WINED3DSIH_TEXREG2RGB */ shader_glsl_texreg2rgb, + /* WINED3DSIH_UTOF */ NULL, }; static void shader_glsl_handle_instruction(const struct wined3d_shader_instruction *ins) { @@ -5099,7 +5121,8 @@ static void shader_glsl_handle_instruction(const struct wined3d_shader_instructi shader_glsl_add_instruction_modifiers(ins); } -const shader_backend_t glsl_shader_backend = { +const struct wined3d_shader_backend_ops glsl_shader_backend = +{ shader_glsl_handle_instruction, shader_glsl_select, shader_glsl_select_depth_blt, diff --git a/dll/directx/wine/wined3d/nvidia_texture_shader.c b/dll/directx/wine/wined3d/nvidia_texture_shader.c index 00a51f85dfa..f20fc7ac6a7 100644 --- a/dll/directx/wine/wined3d/nvidia_texture_shader.c +++ b/dll/directx/wine/wined3d/nvidia_texture_shader.c @@ -45,7 +45,7 @@ static void nvts_activate_dimensions(const struct wined3d_state *state, DWORD st if (state->textures[stage]) { - switch (state->textures[stage]->baseTexture.target) + switch (state->textures[stage]->target) { case GL_TEXTURE_2D: glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, bumpmap ? GL_OFFSET_TEXTURE_2D_NV : GL_TEXTURE_2D); @@ -456,7 +456,7 @@ void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d } -static void nvrc_colorop(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void nvrc_colorop(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); BOOL tex_used = stateblock->device->fixed_function_usage_map & (1 << stage); @@ -566,7 +566,7 @@ static void nvrc_colorop(DWORD state_id, IWineD3DStateBlockImpl *stateblock, str } } -static void nvts_texdim(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void nvts_texdim(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD sampler = state_id - STATE_SAMPLER(0); DWORD mapped_stage = stateblock->device->texUnitMap[sampler]; @@ -583,7 +583,7 @@ static void nvts_texdim(DWORD state_id, IWineD3DStateBlockImpl *stateblock, stru nvts_activate_dimensions(state, sampler, context); } -static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void nvts_bumpenvmat(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); DWORD mapped_stage = stateblock->device->texUnitMap[stage + 1]; @@ -612,7 +612,7 @@ static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, str } } -static void nvrc_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void nvrc_texfactor(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; float col[4]; @@ -621,11 +621,11 @@ static void nvrc_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, stru } /* Context activation is done by the caller. */ -static void nvrc_enable(IWineD3DDevice *iface, BOOL enable) { } +static void nvrc_enable(BOOL enable) {} -/* Context activation is done by the caller. */ -static void nvts_enable(IWineD3DDevice *iface, BOOL enable) { - ENTER_GL(); +/* Context activation and GL locking are done by the caller. */ +static void nvts_enable(BOOL enable) +{ if(enable) { glEnable(GL_TEXTURE_SHADER_NV); checkGLcall("glEnable(GL_TEXTURE_SHADER_NV)"); @@ -633,68 +633,66 @@ static void nvts_enable(IWineD3DDevice *iface, BOOL enable) { glDisable(GL_TEXTURE_SHADER_NV); checkGLcall("glDisable(GL_TEXTURE_SHADER_NV)"); } - LEAVE_GL(); } -static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps) +static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps) { - pCaps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP; + caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP; /* The caps below can be supported but aren't handled yet in utils.c * 'd3dta_to_combiner_input', disable them until support is fixed */ #if 0 if (gl_info->supported[NV_REGISTER_COMBINERS2]) - pCaps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_PERSTAGECONSTANT; + caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_PERSTAGECONSTANT; #endif - pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD | - WINED3DTEXOPCAPS_ADDSIGNED | - WINED3DTEXOPCAPS_ADDSIGNED2X | - WINED3DTEXOPCAPS_MODULATE | - WINED3DTEXOPCAPS_MODULATE2X | - WINED3DTEXOPCAPS_MODULATE4X | - WINED3DTEXOPCAPS_SELECTARG1 | - WINED3DTEXOPCAPS_SELECTARG2 | - WINED3DTEXOPCAPS_DISABLE | - WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA | - WINED3DTEXOPCAPS_BLENDTEXTUREALPHA | - WINED3DTEXOPCAPS_BLENDFACTORALPHA | - WINED3DTEXOPCAPS_BLENDCURRENTALPHA | - WINED3DTEXOPCAPS_LERP | - WINED3DTEXOPCAPS_SUBTRACT | - WINED3DTEXOPCAPS_ADDSMOOTH | - WINED3DTEXOPCAPS_MULTIPLYADD | - WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR | - WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA | - WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM | - WINED3DTEXOPCAPS_DOTPRODUCT3 | - WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR | - WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA; + caps->TextureOpCaps = WINED3DTEXOPCAPS_ADD + | WINED3DTEXOPCAPS_ADDSIGNED + | WINED3DTEXOPCAPS_ADDSIGNED2X + | WINED3DTEXOPCAPS_MODULATE + | WINED3DTEXOPCAPS_MODULATE2X + | WINED3DTEXOPCAPS_MODULATE4X + | WINED3DTEXOPCAPS_SELECTARG1 + | WINED3DTEXOPCAPS_SELECTARG2 + | WINED3DTEXOPCAPS_DISABLE + | WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA + | WINED3DTEXOPCAPS_BLENDTEXTUREALPHA + | WINED3DTEXOPCAPS_BLENDFACTORALPHA + | WINED3DTEXOPCAPS_BLENDCURRENTALPHA + | WINED3DTEXOPCAPS_LERP + | WINED3DTEXOPCAPS_SUBTRACT + | WINED3DTEXOPCAPS_ADDSMOOTH + | WINED3DTEXOPCAPS_MULTIPLYADD + | WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR + | WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA + | WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM + | WINED3DTEXOPCAPS_DOTPRODUCT3 + | WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR + | WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA; if (gl_info->supported[NV_TEXTURE_SHADER2]) { /* Bump mapping is supported already in NV_TEXTURE_SHADER, but that extension does * not support 3D textures. This asks for trouble if an app uses both bump mapping * and 3D textures. It also allows us to keep the code simpler by having texture - * shaders constantly enabled. - */ - pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAP; + * shaders constantly enabled. */ + caps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAP; /* TODO: Luminance bump map? */ } #if 0 /* FIXME: Add - pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE + caps->TextureOpCaps |= WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE WINED3DTEXOPCAPS_PREMODULATE */ #endif - pCaps->MaxTextureBlendStages = min(MAX_TEXTURES, gl_info->limits.general_combiners); - pCaps->MaxSimultaneousTextures = gl_info->limits.textures; + caps->MaxTextureBlendStages = min(MAX_TEXTURES, gl_info->limits.general_combiners); + caps->MaxSimultaneousTextures = gl_info->limits.textures; } -static HRESULT nvrc_fragment_alloc(IWineD3DDevice *iface) { return WINED3D_OK; } +static HRESULT nvrc_fragment_alloc(struct wined3d_device *device) { return WINED3D_OK; } /* Context activation is done by the caller. */ -static void nvrc_fragment_free(IWineD3DDevice *iface) {} +static void nvrc_fragment_free(struct wined3d_device *device) {} /* Two fixed function pipeline implementations using GL_NV_register_combiners and * GL_NV_texture_shader. The nvts_fragment_pipeline assumes that both extensions diff --git a/dll/directx/wine/wined3d/palette.c b/dll/directx/wine/wined3d/palette.c index 2b7ce2cfc20..1fcc6ba1c9a 100644 --- a/dll/directx/wine/wined3d/palette.c +++ b/dll/directx/wine/wined3d/palette.c @@ -30,183 +30,145 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); #define SIZE_BITS (WINEDDPCAPS_1BIT | WINEDDPCAPS_2BIT | WINEDDPCAPS_4BIT | WINEDDPCAPS_8BIT) -static HRESULT WINAPI IWineD3DPaletteImpl_QueryInterface(IWineD3DPalette *iface, REFIID riid, void **object) +ULONG CDECL wined3d_palette_incref(struct wined3d_palette *palette) { - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); + ULONG refcount = InterlockedIncrement(&palette->ref); - if (IsEqualGUID(riid, &IID_IWineD3DPalette) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) + TRACE("%p increasing refcount to %u.\n", palette, refcount); + + return refcount; +} + +ULONG CDECL wined3d_palette_decref(struct wined3d_palette *palette) +{ + ULONG refcount = InterlockedDecrement(&palette->ref); + + TRACE("%p decreasing refcount to %u.\n", palette, refcount); + + if (!refcount) { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; + DeleteObject(palette->hpal); + HeapFree(GetProcessHeap(), 0, palette); } - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; + return refcount; } -static ULONG WINAPI IWineD3DPaletteImpl_AddRef(IWineD3DPalette *iface) { - IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; - ULONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p)->() incrementing from %u.\n", This, ref - 1); - - return ref; -} - -static ULONG WINAPI IWineD3DPaletteImpl_Release(IWineD3DPalette *iface) { - IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p)->() decrementing from %u.\n", This, ref + 1); - - if (!ref) { - DeleteObject(This->hpal); - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - - return ref; -} - -/* Not called from the vtable */ -static WORD IWineD3DPaletteImpl_Size(DWORD dwFlags) +static WORD wined3d_palette_size(DWORD flags) { - switch (dwFlags & SIZE_BITS) { + switch (flags & SIZE_BITS) + { case WINEDDPCAPS_1BIT: return 2; case WINEDDPCAPS_2BIT: return 4; case WINEDDPCAPS_4BIT: return 16; case WINEDDPCAPS_8BIT: return 256; default: - FIXME("Unhandled size bits %#x.\n", dwFlags & SIZE_BITS); + FIXME("Unhandled size bits %#x.\n", flags & SIZE_BITS); return 256; } } -static HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface, DWORD Flags, DWORD Start, DWORD Count, PALETTEENTRY *PalEnt) { - IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; +HRESULT CDECL wined3d_palette_get_entries(const struct wined3d_palette *palette, + DWORD flags, DWORD start, DWORD count, PALETTEENTRY *entries) +{ + TRACE("palette %p, flags %#x, start %u, count %u, entries %p.\n", + palette, flags, start, count, entries); - TRACE("(%p)->(%08x,%d,%d,%p)\n",This,Flags,Start,Count,PalEnt); - - if (Flags) return WINED3DERR_INVALIDCALL; /* unchecked */ - if (Start + Count > IWineD3DPaletteImpl_Size(This->Flags)) + if (flags) return WINED3DERR_INVALIDCALL; /* unchecked */ + if (start + count > wined3d_palette_size(palette->flags)) return WINED3DERR_INVALIDCALL; - if (This->Flags & WINEDDPCAPS_8BITENTRIES) + if (palette->flags & WINEDDPCAPS_8BITENTRIES) { + BYTE *entry = (BYTE *)entries; unsigned int i; - LPBYTE entry = (LPBYTE)PalEnt; - for (i=Start; i < Count+Start; i++) - *entry++ = This->palents[i].peRed; + for (i = start; i < count + start; ++i) + *entry++ = palette->palents[i].peRed; } else - memcpy(PalEnt, This->palents+Start, Count * sizeof(PALETTEENTRY)); + memcpy(entries, palette->palents + start, count * sizeof(*entries)); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, - DWORD Flags, DWORD Start, DWORD Count, const PALETTEENTRY *PalEnt) +HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette, + DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries) { - IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; - IWineD3DResourceImpl *res; + struct wined3d_resource *resource; - TRACE("(%p)->(%08x,%d,%d,%p)\n",This,Flags,Start,Count,PalEnt); - TRACE("Palette flags: %#x\n", This->Flags); + TRACE("palette %p, flags %#x, start %u, count %u, entries %p.\n", + palette, flags, start, count, entries); + TRACE("Palette flags: %#x.\n", palette->flags); - if (This->Flags & WINEDDPCAPS_8BITENTRIES) { + if (palette->flags & WINEDDPCAPS_8BITENTRIES) + { + const BYTE *entry = (const BYTE *)entries; unsigned int i; - const BYTE* entry = (const BYTE*)PalEnt; - for (i=Start; i < Count+Start; i++) - This->palents[i].peRed = *entry++; + for (i = start; i < count + start; ++i) + palette->palents[i].peRed = *entry++; } - else { - memcpy(This->palents+Start, PalEnt, Count * sizeof(PALETTEENTRY)); + else + { + memcpy(palette->palents + start, entries, count * sizeof(*palette->palents)); /* When WINEDDCAPS_ALLOW256 isn't set we need to override entry 0 with black and 255 with white */ - if(!(This->Flags & WINEDDPCAPS_ALLOW256)) + if (!(palette->flags & WINEDDPCAPS_ALLOW256)) { TRACE("WINEDDPCAPS_ALLOW256 set, overriding palette entry 0 with black and 255 with white\n"); - This->palents[0].peRed = 0; - This->palents[0].peGreen = 0; - This->palents[0].peBlue = 0; + palette->palents[0].peRed = 0; + palette->palents[0].peGreen = 0; + palette->palents[0].peBlue = 0; - This->palents[255].peRed = 255; - This->palents[255].peGreen = 255; - This->palents[255].peBlue = 255; + palette->palents[255].peRed = 255; + palette->palents[255].peGreen = 255; + palette->palents[255].peBlue = 255; } - if (This->hpal) - SetPaletteEntries(This->hpal, Start, Count, This->palents+Start); + if (palette->hpal) + SetPaletteEntries(palette->hpal, start, count, palette->palents + start); } -#if 0 - /* Now, if we are in 'depth conversion mode', update the screen palette */ - /* FIXME: we need to update the image or we won't get palette fading. */ - if (This->ddraw->d->palette_convert) - This->ddraw->d->palette_convert(palent,This->screen_palents,start,count); -#endif - /* If the palette is attached to the render target, update all render targets */ - - LIST_FOR_EACH_ENTRY(res, &This->device->resources, IWineD3DResourceImpl, resource.resource_list_entry) + LIST_FOR_EACH_ENTRY(resource, &palette->device->resources, struct wined3d_resource, resource_list_entry) { - if(IWineD3DResource_GetType((IWineD3DResource *) res) == WINED3DRTYPE_SURFACE) { - IWineD3DSurfaceImpl *impl = (IWineD3DSurfaceImpl *) res; - if(impl->palette == This) - IWineD3DSurface_RealizePalette((IWineD3DSurface *) res); + if (resource->resourceType == WINED3DRTYPE_SURFACE) + { + struct wined3d_surface *surface = surface_from_resource(resource); + if (surface->palette == palette) + surface->surface_ops->surface_realize_palette(surface); } } return WINED3D_OK; } -static HRESULT WINAPI IWineD3DPaletteImpl_GetCaps(IWineD3DPalette *iface, DWORD *Caps) { - IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; - TRACE("(%p)->(%p)\n", This, Caps); +DWORD CDECL wined3d_palette_get_flags(const struct wined3d_palette *palette) +{ + TRACE("palette %p.\n", palette); - *Caps = This->Flags; - return WINED3D_OK; + return palette->flags; } -static void * WINAPI IWineD3DPaletteImpl_GetParent(IWineD3DPalette *iface) +void * CDECL wined3d_palette_get_parent(const struct wined3d_palette *palette) { - TRACE("iface %p.\n", iface); + TRACE("palette %p.\n", palette); - return ((IWineD3DPaletteImpl *)iface)->parent; + return palette->parent; } -static const IWineD3DPaletteVtbl IWineD3DPalette_Vtbl = -{ - /*** IUnknown ***/ - IWineD3DPaletteImpl_QueryInterface, - IWineD3DPaletteImpl_AddRef, - IWineD3DPaletteImpl_Release, - /*** IWineD3DPalette ***/ - IWineD3DPaletteImpl_GetParent, - IWineD3DPaletteImpl_GetEntries, - IWineD3DPaletteImpl_GetCaps, - IWineD3DPaletteImpl_SetEntries -}; - -HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *device, +static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wined3d_device *device, DWORD flags, const PALETTEENTRY *entries, void *parent) { HRESULT hr; - palette->lpVtbl = &IWineD3DPalette_Vtbl; palette->ref = 1; palette->parent = parent; palette->device = device; - palette->Flags = flags; + palette->flags = flags; - palette->palNumEntries = IWineD3DPaletteImpl_Size(flags); + palette->palNumEntries = wined3d_palette_size(flags); palette->hpal = CreatePalette((const LOGPALETTE *)&palette->palVersion); if (!palette->hpal) { @@ -214,7 +176,7 @@ HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *d return E_FAIL; } - hr = IWineD3DPalette_SetEntries((IWineD3DPalette *)palette, 0, 0, IWineD3DPaletteImpl_Size(flags), entries); + hr = wined3d_palette_set_entries(palette, 0, 0, wined3d_palette_size(flags), entries); if (FAILED(hr)) { WARN("Failed to set palette entries, hr %#x.\n", hr); @@ -224,3 +186,33 @@ HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *d return WINED3D_OK; } + +HRESULT CDECL wined3d_palette_create(struct wined3d_device *device, DWORD flags, + const PALETTEENTRY *entries, void *parent, struct wined3d_palette **palette) +{ + struct wined3d_palette *object; + HRESULT hr; + + TRACE("device %p, flags %#x, entries %p, palette %p, parent %p.\n", + device, flags, entries, palette, parent); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate palette memory.\n"); + return E_OUTOFMEMORY; + } + + hr = wined3d_palette_init(object, device, flags, entries, parent); + if (FAILED(hr)) + { + WARN("Failed to initialize palette, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created palette %p.\n", object); + *palette = object; + + return WINED3D_OK; +} diff --git a/dll/directx/wine/wined3d/query.c b/dll/directx/wine/wined3d/query.c index 254efbed825..ca4426f5cc7 100644 --- a/dll/directx/wine/wined3d/query.c +++ b/dll/directx/wine/wined3d/query.c @@ -3,7 +3,7 @@ * * Copyright 2005 Oliver Stieber * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers. + * Copyright 2009-2010 Henri Verbeet for CodeWeavers. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -37,7 +37,8 @@ void wined3d_event_query_destroy(struct wined3d_event_query *query) HeapFree(GetProcessHeap(), 0, query); } -enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) +static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_query *query, + struct wined3d_device *device) { struct wined3d_context *context; const struct wined3d_gl_info *gl_info; @@ -111,7 +112,8 @@ enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_qu return ret; } -enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) +enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query, + struct wined3d_device *device) { struct wined3d_context *context; const struct wined3d_gl_info *gl_info; @@ -179,7 +181,7 @@ enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_ return ret; } -void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) +void wined3d_event_query_issue(struct wined3d_event_query *query, struct wined3d_device *device) { const struct wined3d_gl_info *gl_info; struct wined3d_context *context; @@ -230,64 +232,74 @@ void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDevice context_release(context); } -static HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, REFIID riid, void **object) +ULONG CDECL wined3d_query_incref(struct wined3d_query *query) { - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); + ULONG refcount = InterlockedIncrement(&query->ref); - if (IsEqualGUID(riid, &IID_IWineD3DQuery) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } + TRACE("%p increasing refcount to %u.\n", query, refcount); - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; + return refcount; } -static ULONG WINAPI IWineD3DQueryImpl_AddRef(IWineD3DQuery *iface) { - IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; - TRACE("(%p) : AddRef increasing from %d\n", This, This->ref); - return InterlockedIncrement(&This->ref); -} +ULONG CDECL wined3d_query_decref(struct wined3d_query *query) +{ + ULONG refcount = InterlockedDecrement(&query->ref); -static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) { - IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; - ULONG ref; - TRACE("(%p) : Releasing from %d\n", This, This->ref); - ref = InterlockedDecrement(&This->ref); + TRACE("%p decreasing refcount to %u.\n", query, refcount); - if (!ref) + if (!refcount) { /* Queries are specific to the GL context that created them. Not * deleting the query will obviously leak it, but that's still better * than potentially deleting a different query with the same id in this * context, and (still) leaking the actual query. */ - if (This->type == WINED3DQUERYTYPE_EVENT) + if (query->type == WINED3DQUERYTYPE_EVENT) { - struct wined3d_event_query *query = This->extendedData; - if (query) wined3d_event_query_destroy(query); + struct wined3d_event_query *event_query = query->extendedData; + if (event_query) wined3d_event_query_destroy(event_query); } - else if (This->type == WINED3DQUERYTYPE_OCCLUSION) + else if (query->type == WINED3DQUERYTYPE_OCCLUSION) { - struct wined3d_occlusion_query *query = This->extendedData; + struct wined3d_occlusion_query *oq = query->extendedData; - if (query->context) context_free_occlusion_query(query); - HeapFree(GetProcessHeap(), 0, This->extendedData); + if (oq->context) context_free_occlusion_query(oq); + HeapFree(GetProcessHeap(), 0, query->extendedData); } - HeapFree(GetProcessHeap(), 0, This); + HeapFree(GetProcessHeap(), 0, query); } - return ref; + + return refcount; } -static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) { - IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface; - struct wined3d_occlusion_query *query = This->extendedData; - IWineD3DDeviceImpl *device = This->device; +HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query, + void *data, UINT data_size, DWORD flags) +{ + TRACE("query %p, data %p, data_size %u, flags %#x.\n", + query, data, data_size, flags); + + return query->query_ops->query_get_data(query, data, data_size, flags); +} + +UINT CDECL wined3d_query_get_data_size(const struct wined3d_query *query) +{ + TRACE("query %p.\n", query); + + return query->data_size; +} + +HRESULT CDECL wined3d_query_issue(struct wined3d_query *query, DWORD flags) +{ + TRACE("query %p, flags %#x.\n", query, flags); + + return query->query_ops->query_issue(query, flags); +} + +static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query, + void *pData, DWORD dwSize, DWORD flags) +{ + struct wined3d_occlusion_query *oq = query->extendedData; + struct wined3d_device *device = query->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct wined3d_context *context; DWORD* data = pData; @@ -295,11 +307,12 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, GLuint samples; HRESULT res; - TRACE("(%p) : type D3DQUERY_OCCLUSION, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags); + TRACE("(%p) : type D3DQUERY_OCCLUSION, pData %p, dwSize %#x, flags %#x.\n", query, pData, dwSize, flags); - if (!query->context) This->state = QUERY_CREATED; + if (!oq->context) + query->state = QUERY_CREATED; - if (This->state == QUERY_CREATED) + if (query->state == QUERY_CREATED) { /* D3D allows GetData on a new query, OpenGL doesn't. So just invent the data ourselves */ TRACE("Query wasn't yet started, returning S_OK\n"); @@ -307,7 +320,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, return S_OK; } - if (This->state == QUERY_BUILDING) + if (query->state == QUERY_BUILDING) { /* Msdn says this returns an error, but our tests show that S_FALSE is returned */ TRACE("Query is building, returning S_FALSE\n"); @@ -316,33 +329,33 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, if (!gl_info->supported[ARB_OCCLUSION_QUERY]) { - WARN("(%p) : Occlusion queries not supported. Returning 1.\n", This); + WARN("%p Occlusion queries not supported. Returning 1.\n", query); *data = 1; return S_OK; } - if (query->context->tid != GetCurrentThreadId()) + if (oq->context->tid != GetCurrentThreadId()) { - FIXME("%p Wrong thread, returning 1.\n", This); + FIXME("%p Wrong thread, returning 1.\n", query); *data = 1; return S_OK; } - context = context_acquire(This->device, query->context->current_rt); + context = context_acquire(query->device, oq->context->current_rt); ENTER_GL(); - GL_EXTCALL(glGetQueryObjectuivARB(query->id, GL_QUERY_RESULT_AVAILABLE_ARB, &available)); + GL_EXTCALL(glGetQueryObjectuivARB(oq->id, GL_QUERY_RESULT_AVAILABLE_ARB, &available)); checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT_AVAILABLE)"); - TRACE("(%p) : available %d.\n", This, available); + TRACE("available %#x.\n", available); if (available) { if (data) { - GL_EXTCALL(glGetQueryObjectuivARB(query->id, GL_QUERY_RESULT_ARB, &samples)); + GL_EXTCALL(glGetQueryObjectuivARB(oq->id, GL_QUERY_RESULT_ARB, &samples)); checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT)"); - TRACE("(%p) : Returning %d samples.\n", This, samples); + TRACE("Returning %d samples.\n", samples); *data = samples; } res = S_OK; @@ -359,23 +372,24 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, return res; } -static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) { - IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface; - struct wined3d_event_query *query = This->extendedData; +static HRESULT wined3d_event_query_ops_get_data(struct wined3d_query *query, + void *pData, DWORD dwSize, DWORD flags) +{ + struct wined3d_event_query *event_query = query->extendedData; BOOL *data = pData; enum wined3d_event_query_result ret; - TRACE("(%p) : type D3DQUERY_EVENT, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags); + TRACE("query %p, pData %p, dwSize %#x, flags %#x.\n", query, pData, dwSize, flags); if (!pData || !dwSize) return S_OK; - if (!query) + if (!event_query) { - WARN("(%p): Event query not supported by GL, reporting GPU idle\n", This); + WARN("Event query not supported by GL, reporting GPU idle.\n"); *data = TRUE; return S_OK; } - ret = wined3d_event_query_test(query, This->device); + ret = wined3d_event_query_test(event_query, query->device); switch(ret) { case WINED3D_EVENT_QUERY_OK: @@ -388,7 +402,7 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void break; case WINED3D_EVENT_QUERY_WRONG_THREAD: - FIXME("(%p) Wrong thread, reporting GPU idle.\n", This); + FIXME("(%p) Wrong thread, reporting GPU idle.\n", query); *data = TRUE; break; @@ -400,77 +414,69 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void return S_OK; } -static DWORD WINAPI IWineD3DEventQueryImpl_GetDataSize(IWineD3DQuery* iface){ - TRACE("(%p) : type D3DQUERY_EVENT\n", iface); +WINED3DQUERYTYPE CDECL wined3d_query_get_type(const struct wined3d_query *query) +{ + TRACE("query %p.\n", query); - return sizeof(BOOL); + return query->type; } -static DWORD WINAPI IWineD3DOcclusionQueryImpl_GetDataSize(IWineD3DQuery* iface){ - TRACE("(%p) : type D3DQUERY_OCCLUSION\n", iface); +static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD flags) +{ + TRACE("query %p, flags %#x.\n", query, flags); - return sizeof(DWORD); -} - -static WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){ - IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; - return This->type; -} - -static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) { - IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; - - TRACE("(%p) : dwIssueFlags %#x, type D3DQUERY_EVENT\n", This, dwIssueFlags); - if (dwIssueFlags & WINED3DISSUE_END) + TRACE("(%p) : flags %#x, type D3DQUERY_EVENT\n", query, flags); + if (flags & WINED3DISSUE_END) { - struct wined3d_event_query *query = This->extendedData; + struct wined3d_event_query *event_query = query->extendedData; /* Faked event query support */ - if (!query) return WINED3D_OK; + if (!event_query) return WINED3D_OK; - wined3d_event_query_issue(query, This->device); + wined3d_event_query_issue(event_query, query->device); } - else if(dwIssueFlags & WINED3DISSUE_BEGIN) + else if (flags & WINED3DISSUE_BEGIN) { /* Started implicitly at device creation */ ERR("Event query issued with START flag - what to do?\n"); } - if(dwIssueFlags & WINED3DISSUE_BEGIN) { - This->state = QUERY_BUILDING; - } else { - This->state = QUERY_SIGNALLED; - } + if (flags & WINED3DISSUE_BEGIN) + query->state = QUERY_BUILDING; + else + query->state = QUERY_SIGNALLED; return WINED3D_OK; } -static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) { - IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; - IWineD3DDeviceImpl *device = This->device; +static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD flags) +{ + struct wined3d_device *device = query->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + TRACE("query %p, flags %#x.\n", query, flags); + if (gl_info->supported[ARB_OCCLUSION_QUERY]) { - struct wined3d_occlusion_query *query = This->extendedData; + struct wined3d_occlusion_query *oq = query->extendedData; struct wined3d_context *context; /* This is allowed according to msdn and our tests. Reset the query and restart */ - if (dwIssueFlags & WINED3DISSUE_BEGIN) + if (flags & WINED3DISSUE_BEGIN) { - if (This->state == QUERY_BUILDING) + if (query->state == QUERY_BUILDING) { - if (query->context->tid != GetCurrentThreadId()) + if (oq->context->tid != GetCurrentThreadId()) { FIXME("Wrong thread, can't restart query.\n"); - context_free_occlusion_query(query); - context = context_acquire(This->device, NULL); - context_alloc_occlusion_query(context, query); + context_free_occlusion_query(oq); + context = context_acquire(query->device, NULL); + context_alloc_occlusion_query(context, oq); } else { - context = context_acquire(This->device, query->context->current_rt); + context = context_acquire(query->device, oq->context->current_rt); ENTER_GL(); GL_EXTCALL(glEndQueryARB(GL_SAMPLES_PASSED_ARB)); @@ -480,32 +486,33 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D } else { - if (query->context) context_free_occlusion_query(query); - context = context_acquire(This->device, NULL); - context_alloc_occlusion_query(context, query); + if (oq->context) context_free_occlusion_query(oq); + context = context_acquire(query->device, NULL); + context_alloc_occlusion_query(context, oq); } ENTER_GL(); - GL_EXTCALL(glBeginQueryARB(GL_SAMPLES_PASSED_ARB, query->id)); + GL_EXTCALL(glBeginQueryARB(GL_SAMPLES_PASSED_ARB, oq->id)); checkGLcall("glBeginQuery()"); LEAVE_GL(); context_release(context); } - if (dwIssueFlags & WINED3DISSUE_END) { + if (flags & WINED3DISSUE_END) + { /* Msdn says _END on a non-building occlusion query returns an error, but * our tests show that it returns OK. But OpenGL doesn't like it, so avoid * generating an error */ - if (This->state == QUERY_BUILDING) + if (query->state == QUERY_BUILDING) { - if (query->context->tid != GetCurrentThreadId()) + if (oq->context->tid != GetCurrentThreadId()) { FIXME("Wrong thread, can't end query.\n"); } else { - context = context_acquire(This->device, query->context->current_rt); + context = context_acquire(query->device, oq->context->current_rt); ENTER_GL(); GL_EXTCALL(glEndQueryARB(GL_SAMPLES_PASSED_ARB)); @@ -516,45 +523,33 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D } } } - } else { - FIXME("(%p) : Occlusion queries not supported\n", This); + } + else + { + FIXME("%p Occlusion queries not supported.\n", query); } - if(dwIssueFlags & WINED3DISSUE_BEGIN) { - This->state = QUERY_BUILDING; - } else { - This->state = QUERY_SIGNALLED; - } + if (flags & WINED3DISSUE_BEGIN) + query->state = QUERY_BUILDING; + else + query->state = QUERY_SIGNALLED; + return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */ } -static const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl = +static const struct wined3d_query_ops event_query_ops = { - /*** IUnknown methods ***/ - IWineD3DQueryImpl_QueryInterface, - IWineD3DQueryImpl_AddRef, - IWineD3DQueryImpl_Release, - /*** IWineD3Dquery methods ***/ - IWineD3DEventQueryImpl_GetData, - IWineD3DEventQueryImpl_GetDataSize, - IWineD3DQueryImpl_GetType, - IWineD3DEventQueryImpl_Issue + wined3d_event_query_ops_get_data, + wined3d_event_query_ops_issue, }; -static const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl = +static const struct wined3d_query_ops occlusion_query_ops = { - /*** IUnknown methods ***/ - IWineD3DQueryImpl_QueryInterface, - IWineD3DQueryImpl_AddRef, - IWineD3DQueryImpl_Release, - /*** IWineD3Dquery methods ***/ - IWineD3DOcclusionQueryImpl_GetData, - IWineD3DOcclusionQueryImpl_GetDataSize, - IWineD3DQueryImpl_GetType, - IWineD3DOcclusionQueryImpl_Issue + wined3d_occlusion_query_ops_get_data, + wined3d_occlusion_query_ops_issue, }; -HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, WINED3DQUERYTYPE type) +static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *device, WINED3DQUERYTYPE type) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; @@ -567,7 +562,8 @@ HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, WINED3D WARN("Unsupported in local OpenGL implementation: ARB_OCCLUSION_QUERY.\n"); return WINED3DERR_NOTAVAILABLE; } - query->lpVtbl = &IWineD3DOcclusionQuery_Vtbl; + query->query_ops = &occlusion_query_ops; + query->data_size = sizeof(DWORD); query->extendedData = HeapAlloc(GetProcessHeap(), 0, sizeof(struct wined3d_occlusion_query)); if (!query->extendedData) { @@ -587,7 +583,8 @@ HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, WINED3D * lowering performance. */ FIXME("Event query: Unimplemented, but pretending to be supported.\n"); } - query->lpVtbl = &IWineD3DEventQuery_Vtbl; + query->query_ops = &event_query_ops; + query->data_size = sizeof(BOOL); query->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct wined3d_event_query)); if (!query->extendedData) { @@ -620,3 +617,32 @@ HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, WINED3D return WINED3D_OK; } + +HRESULT CDECL wined3d_query_create(struct wined3d_device *device, + WINED3DQUERYTYPE type, struct wined3d_query **query) +{ + struct wined3d_query *object; + HRESULT hr; + + TRACE("device %p, type %#x, query %p.\n", device, type, query); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate query memory.\n"); + return E_OUTOFMEMORY; + } + + hr = query_init(object, device, type); + if (FAILED(hr)) + { + WARN("Failed to initialize query, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created query %p.\n", object); + *query = object; + + return WINED3D_OK; +} diff --git a/dll/directx/wine/wined3d/resource.c b/dll/directx/wine/wined3d/resource.c index c95cf1b8b55..4060bc67861 100644 --- a/dll/directx/wine/wined3d/resource.c +++ b/dll/directx/wine/wined3d/resource.c @@ -5,7 +5,7 @@ * Copyright 2003-2004 Raphael Junqueira * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2010 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,24 +27,87 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); -HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type, - IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format *format, - WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) +struct private_data { - struct IWineD3DResourceClass *resource = &((IWineD3DResourceImpl *)iface)->resource; + struct list entry; + GUID tag; + DWORD flags; /* DDSPD_* */ + + union + { + void *data; + IUnknown *object; + } ptr; + + DWORD size; +}; + +static DWORD resource_access_from_pool(WINED3DPOOL pool) +{ + switch (pool) + { + case WINED3DPOOL_DEFAULT: + return WINED3D_RESOURCE_ACCESS_GPU; + + case WINED3DPOOL_MANAGED: + return WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU; + + case WINED3DPOOL_SYSTEMMEM: + return WINED3D_RESOURCE_ACCESS_CPU; + + case WINED3DPOOL_SCRATCH: + return WINED3D_RESOURCE_ACCESS_SCRATCH; + + default: + FIXME("Unhandled pool %#x.\n", pool); + return 0; + } +} + +static void resource_check_usage(DWORD usage) +{ + static const DWORD handled = WINED3DUSAGE_RENDERTARGET + | WINED3DUSAGE_DEPTHSTENCIL + | WINED3DUSAGE_DYNAMIC + | WINED3DUSAGE_AUTOGENMIPMAP + | WINED3DUSAGE_STATICDECL + | WINED3DUSAGE_OVERLAY; + + if (usage & ~handled) + FIXME("Unhandled usage flags %#x.\n", usage & ~handled); +} + +HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device, + WINED3DRESOURCETYPE resource_type, const struct wined3d_format *format, + WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality, + DWORD usage, WINED3DPOOL pool, UINT width, UINT height, UINT depth, UINT size, + void *parent, const struct wined3d_parent_ops *parent_ops, + const struct wined3d_resource_ops *resource_ops) +{ + resource->ref = 1; resource->device = device; resource->resourceType = resource_type; - resource->ref = 1; - resource->pool = pool; resource->format = format; + resource->multisample_type = multisample_type; + resource->multisample_quality = multisample_quality; resource->usage = usage; + resource->pool = pool; + resource->access_flags = resource_access_from_pool(pool); + if (usage & WINED3DUSAGE_DYNAMIC) + resource->access_flags |= WINED3D_RESOURCE_ACCESS_CPU; + resource->width = width; + resource->height = height; + resource->depth = depth; resource->size = size; resource->priority = 0; resource->parent = parent; resource->parent_ops = parent_ops; + resource->resource_ops = resource_ops; list_init(&resource->privateData); + resource_check_usage(usage); + if (size) { resource->heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + RESOURCE_ALIGNMENT); @@ -58,12 +121,13 @@ HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type { resource->heapMemory = NULL; } - resource->allocatedMemory = (BYTE *)(((ULONG_PTR)resource->heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + resource->allocatedMemory = (BYTE *)(((ULONG_PTR)resource->heapMemory + + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); /* Check that we have enough video ram left */ if (pool == WINED3DPOOL_DEFAULT) { - if (size > IWineD3DDevice_GetAvailableTextureMem((IWineD3DDevice *)device)) + if (size > wined3d_device_get_available_texture_mem(device)) { ERR("Out of adapter memory\n"); HeapFree(GetProcessHeap(), 0, resource->heapMemory); @@ -72,54 +136,56 @@ HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type WineD3DAdapterChangeGLRam(device, size); } - device_resource_add(device, iface); + device_resource_add(device, resource); return WINED3D_OK; } -void resource_cleanup(IWineD3DResource *iface) +void resource_cleanup(struct wined3d_resource *resource) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; + struct private_data *data; struct list *e1, *e2; - PrivateData *data; HRESULT hr; - TRACE("(%p) Cleaning up resource\n", This); - if (This->resource.pool == WINED3DPOOL_DEFAULT) { - TRACE("Decrementing device memory pool by %u\n", This->resource.size); - WineD3DAdapterChangeGLRam(This->resource.device, -This->resource.size); + TRACE("Cleaning up resource %p.\n", resource); + + if (resource->pool == WINED3DPOOL_DEFAULT) + { + TRACE("Decrementing device memory pool by %u.\n", resource->size); + WineD3DAdapterChangeGLRam(resource->device, 0 - resource->size); } - LIST_FOR_EACH_SAFE(e1, e2, &This->resource.privateData) { - data = LIST_ENTRY(e1, PrivateData, entry); - hr = resource_free_private_data(iface, &data->tag); - if(hr != WINED3D_OK) { - ERR("Failed to free private data when destroying resource %p, hr = %08x\n", This, hr); - } + LIST_FOR_EACH_SAFE(e1, e2, &resource->privateData) + { + data = LIST_ENTRY(e1, struct private_data, entry); + hr = resource_free_private_data(resource, &data->tag); + if (FAILED(hr)) + ERR("Failed to free private data when destroying resource %p, hr = %#x.\n", resource, hr); } - HeapFree(GetProcessHeap(), 0, This->resource.heapMemory); - This->resource.allocatedMemory = 0; - This->resource.heapMemory = 0; + HeapFree(GetProcessHeap(), 0, resource->heapMemory); + resource->allocatedMemory = 0; + resource->heapMemory = 0; - if (This->resource.device) device_resource_released(This->resource.device, iface); + if (resource->device) + device_resource_released(resource->device, resource); } -void resource_unload(IWineD3DResourceImpl *resource) +void resource_unload(struct wined3d_resource *resource) { - context_resource_unloaded(resource->resource.device, (IWineD3DResource *)resource, - resource->resource.resourceType); + context_resource_unloaded(resource->device, + resource, resource->resourceType); } -static PrivateData* resource_find_private_data(IWineD3DResourceImpl *This, REFGUID tag) +static struct private_data *resource_find_private_data(const struct wined3d_resource *resource, REFGUID tag) { - PrivateData *data; + struct private_data *data; struct list *entry; TRACE("Searching for private data %s\n", debugstr_guid(tag)); - LIST_FOR_EACH(entry, &This->resource.privateData) + LIST_FOR_EACH(entry, &resource->privateData) { - data = LIST_ENTRY(entry, PrivateData, entry); + data = LIST_ENTRY(entry, struct private_data, entry); if (IsEqualGUID(&data->tag, tag)) { TRACE("Found %p\n", data); return data; @@ -129,85 +195,91 @@ static PrivateData* resource_find_private_data(IWineD3DResourceImpl *This, REFGU return NULL; } -HRESULT resource_set_private_data(IWineD3DResource *iface, REFGUID refguid, - const void *pData, DWORD SizeOfData, DWORD Flags) +HRESULT resource_set_private_data(struct wined3d_resource *resource, REFGUID guid, + const void *data, DWORD data_size, DWORD flags) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - PrivateData *data; + struct private_data *d; - TRACE("(%p) : %s %p %d %d\n", This, debugstr_guid(refguid), pData, SizeOfData, Flags); - resource_free_private_data(iface, refguid); + TRACE("resource %p, riid %s, data %p, data_size %u, flags %#x.\n", + resource, debugstr_guid(guid), data, data_size, flags); - data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data)); - if (!data) return E_OUTOFMEMORY; + resource_free_private_data(resource, guid); - data->tag = *refguid; - data->flags = Flags; + d = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*d)); + if (!d) return E_OUTOFMEMORY; - if (Flags & WINED3DSPD_IUNKNOWN) { - if(SizeOfData != sizeof(IUnknown *)) { - WARN("IUnknown data with size %d, returning WINED3DERR_INVALIDCALL\n", SizeOfData); - HeapFree(GetProcessHeap(), 0, data); + d->tag = *guid; + d->flags = flags; + + if (flags & WINED3DSPD_IUNKNOWN) + { + if (data_size != sizeof(IUnknown *)) + { + WARN("IUnknown data with size %u, returning WINED3DERR_INVALIDCALL.\n", data_size); + HeapFree(GetProcessHeap(), 0, d); return WINED3DERR_INVALIDCALL; } - data->ptr.object = (LPUNKNOWN)pData; - data->size = sizeof(LPUNKNOWN); - IUnknown_AddRef(data->ptr.object); + d->ptr.object = (IUnknown *)data; + d->size = sizeof(IUnknown *); + IUnknown_AddRef(d->ptr.object); } else { - data->ptr.data = HeapAlloc(GetProcessHeap(), 0, SizeOfData); - if (!data->ptr.data) + d->ptr.data = HeapAlloc(GetProcessHeap(), 0, data_size); + if (!d->ptr.data) { - HeapFree(GetProcessHeap(), 0, data); + HeapFree(GetProcessHeap(), 0, d); return E_OUTOFMEMORY; } - data->size = SizeOfData; - memcpy(data->ptr.data, pData, SizeOfData); + d->size = data_size; + memcpy(d->ptr.data, data, data_size); } - list_add_tail(&This->resource.privateData, &data->entry); + list_add_tail(&resource->privateData, &d->entry); return WINED3D_OK; } -HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID refguid, void *pData, DWORD *pSizeOfData) +HRESULT resource_get_private_data(const struct wined3d_resource *resource, REFGUID guid, void *data, DWORD *data_size) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - PrivateData *data; + const struct private_data *d; - TRACE("(%p) : %p %p %p\n", This, refguid, pData, pSizeOfData); - data = resource_find_private_data(This, refguid); - if (!data) return WINED3DERR_NOTFOUND; + TRACE("resource %p, guid %s, data %p, data_size %p.\n", + resource, debugstr_guid(guid), data, data_size); - if (*pSizeOfData < data->size) { - *pSizeOfData = data->size; + d = resource_find_private_data(resource, guid); + if (!d) return WINED3DERR_NOTFOUND; + + if (*data_size < d->size) + { + *data_size = d->size; return WINED3DERR_MOREDATA; } - if (data->flags & WINED3DSPD_IUNKNOWN) { - *(LPUNKNOWN *)pData = data->ptr.object; - if (((IWineD3DImpl *)This->resource.device->wined3d)->dxVersion != 7) + if (d->flags & WINED3DSPD_IUNKNOWN) + { + *(IUnknown **)data = d->ptr.object; + if (resource->device->wined3d->dxVersion != 7) { - /* D3D8 and D3D9 addref the private data, DDraw does not. This can't be handled in - * ddraw because it doesn't know if the pointer returned is an IUnknown * or just a - * Blob - */ - IUnknown_AddRef(data->ptr.object); + /* D3D8 and D3D9 addref the private data, DDraw does not. This + * can't be handled in ddraw because it doesn't know if the + * pointer returned is an IUnknown * or just a blob. */ + IUnknown_AddRef(d->ptr.object); } } - else { - memcpy(pData, data->ptr.data, data->size); + else + { + memcpy(data, d->ptr.data, d->size); } return WINED3D_OK; } -HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID refguid) +HRESULT resource_free_private_data(struct wined3d_resource *resource, REFGUID guid) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - PrivateData *data; + struct private_data *data; - TRACE("(%p) : %s\n", This, debugstr_guid(refguid)); - data = resource_find_private_data(This, refguid); + TRACE("resource %p, guid %s.\n", resource, debugstr_guid(guid)); + + data = resource_find_private_data(resource, guid); if (!data) return WINED3DERR_NOTFOUND; if (data->flags & WINED3DSPD_IUNKNOWN) @@ -226,25 +298,35 @@ HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID refguid) return WINED3D_OK; } -DWORD resource_set_priority(IWineD3DResource *iface, DWORD PriorityNew) +DWORD resource_set_priority(struct wined3d_resource *resource, DWORD priority) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - DWORD PriorityOld = This->resource.priority; - This->resource.priority = PriorityNew; - TRACE("(%p) : new priority %d, returning old priority %d\n", This, PriorityNew, PriorityOld ); - return PriorityOld; + DWORD prev = resource->priority; + resource->priority = priority; + TRACE("resource %p, new priority %u, returning old priority %u.\n", resource, priority, prev); + return prev; } -DWORD resource_get_priority(IWineD3DResource *iface) +DWORD resource_get_priority(const struct wined3d_resource *resource) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - TRACE("(%p) : returning %d\n", This, This->resource.priority ); - return This->resource.priority; + TRACE("resource %p, returning %u.\n", resource, resource->priority); + return resource->priority; } -WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) +void * CDECL wined3d_resource_get_parent(const struct wined3d_resource *resource) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - TRACE("(%p) : returning %d\n", This, This->resource.resourceType); - return This->resource.resourceType; + return resource->parent; +} + +void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, struct wined3d_resource_desc *desc) +{ + desc->resource_type = resource->resourceType; + desc->format = resource->format->id; + desc->multisample_type = resource->multisample_type; + desc->multisample_quality = resource->multisample_quality; + desc->usage = resource->usage; + desc->pool = resource->pool; + desc->width = resource->width; + desc->height = resource->height; + desc->depth = resource->depth; + desc->size = resource->size; } diff --git a/dll/directx/wine/wined3d/shader.c b/dll/directx/wine/wined3d/shader.c index bc39b3b2aa8..79a27595f02 100644 --- a/dll/directx/wine/wined3d/shader.c +++ b/dll/directx/wine/wined3d/shader.c @@ -5,7 +5,7 @@ * Copyright 2005 Oliver Stieber * Copyright 2006 Ivan Gyurdiev * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -52,6 +52,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_DEF */ "def", /* WINED3DSIH_DEFB */ "defb", /* WINED3DSIH_DEFI */ "defi", + /* WINED3DSIH_DIV */ "div", /* WINED3DSIH_DP2ADD */ "dp2add", /* WINED3DSIH_DP3 */ "dp3", /* WINED3DSIH_DP4 */ "dp4", @@ -66,12 +67,16 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_EXP */ "exp", /* WINED3DSIH_EXPP */ "expp", /* WINED3DSIH_FRC */ "frc", + /* WINED3DSIH_FTOI */ "ftoi", /* WINED3DSIH_IADD */ "iadd", + /* WINED3DSIH_IEQ */ "ieq", /* WINED3DSIH_IF */ "if", /* WINED3DSIH_IFC */ "ifc", /* WINED3DSIH_IGE */ "ige", /* WINED3DSIH_IMUL */ "imul", + /* WINED3DSIH_ITOF */ "itof", /* WINED3DSIH_LABEL */ "label", + /* WINED3DSIH_LD */ "ld", /* WINED3DSIH_LIT */ "lit", /* WINED3DSIH_LOG */ "log", /* WINED3DSIH_LOGP */ "logp", @@ -98,11 +103,15 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_REP */ "rep", /* WINED3DSIH_RET */ "ret", /* WINED3DSIH_RSQ */ "rsq", + /* WINED3DSIH_SAMPLE */ "sample", + /* WINED3DSIH_SAMPLE_GRAD */ "sample_d", + /* WINED3DSIH_SAMPLE_LOD */ "sample_l", /* WINED3DSIH_SETP */ "setp", /* WINED3DSIH_SGE */ "sge", /* WINED3DSIH_SGN */ "sgn", /* WINED3DSIH_SINCOS */ "sincos", /* WINED3DSIH_SLT */ "slt", + /* WINED3DSIH_SQRT */ "sqrt", /* WINED3DSIH_SUB */ "sub", /* WINED3DSIH_TEX */ "texld", /* WINED3DSIH_TEXBEM */ "texbem", @@ -126,6 +135,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_TEXREG2AR */ "texreg2ar", /* WINED3DSIH_TEXREG2GB */ "texreg2gb", /* WINED3DSIH_TEXREG2RGB */ "texreg2rgb", + /* WINED3DSIH_UTOF */ "utof", }; static const char * const semantic_names[] = @@ -288,11 +298,11 @@ int shader_addline(struct wined3d_shader_buffer *buffer, const char *format, ... return ret; } -static void shader_init(struct IWineD3DBaseShaderClass *shader, IWineD3DDeviceImpl *device, +static void shader_init(struct wined3d_shader *shader, struct wined3d_device *device, void *parent, const struct wined3d_parent_ops *parent_ops) { shader->ref = 1; - shader->device = (IWineD3DDevice *)device; + shader->device = device; shader->parent = parent; shader->parent_ops = parent_ops; list_init(&shader->linked_programs); @@ -338,7 +348,7 @@ static inline void set_bitmap_bit(DWORD *bitmap, DWORD bit) bitmap[idx] |= (1 << shift); } -static void shader_record_register_usage(IWineD3DBaseShaderImpl *shader, struct shader_reg_maps *reg_maps, +static void shader_record_register_usage(struct wined3d_shader *shader, struct wined3d_shader_reg_maps *reg_maps, const struct wined3d_shader_register *reg, enum wined3d_shader_type shader_type) { switch (reg->type) @@ -363,12 +373,12 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *shader, struct unsigned int i; for (i = 0; i < MAX_REG_INPUT; ++i) { - ((IWineD3DPixelShaderImpl *)shader)->input_reg_used[i] = TRUE; + shader->u.ps.input_reg_used[i] = TRUE; } } else { - ((IWineD3DPixelShaderImpl *)shader)->input_reg_used[reg->idx] = TRUE; + shader->u.ps.input_reg_used[reg->idx] = TRUE; } } else reg_maps->input_registers |= 1 << reg->idx; @@ -389,17 +399,8 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *shader, struct case WINED3DSPR_CONST: if (reg->rel_addr) { - if (shader_type != WINED3D_SHADER_TYPE_PIXEL) - { - if (reg->idx < ((IWineD3DVertexShaderImpl *)shader)->min_rel_offset) - { - ((IWineD3DVertexShaderImpl *)shader)->min_rel_offset = reg->idx; - } - if (reg->idx > ((IWineD3DVertexShaderImpl *)shader)->max_rel_offset) - { - ((IWineD3DVertexShaderImpl *)shader)->max_rel_offset = reg->idx; - } - } + if (reg->idx < reg_maps->min_rel_offset) reg_maps->min_rel_offset = reg->idx; + if (reg->idx > reg_maps->max_rel_offset) reg_maps->max_rel_offset = reg->idx; reg_maps->usesrelconstF = TRUE; } else @@ -417,7 +418,7 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *shader, struct break; case WINED3DSPR_COLOROUT: - reg_maps->highest_render_target = max(reg_maps->highest_render_target, reg->idx); + reg_maps->rt_mask |= (1 << reg->idx); break; default: @@ -447,24 +448,17 @@ static unsigned int get_instr_extra_regcount(enum WINED3D_SHADER_INSTRUCTION_HAN } /* Note that this does not count the loop register as an address register. */ -static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3d_shader_frontend *fe, - struct shader_reg_maps *reg_maps, struct wined3d_shader_signature_element *input_signature, +static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const struct wined3d_shader_frontend *fe, + struct wined3d_shader_reg_maps *reg_maps, struct wined3d_shader_signature_element *input_signature, struct wined3d_shader_signature_element *output_signature, const DWORD *byte_code, DWORD constf_size) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)iface; unsigned int cur_loop_depth = 0, max_loop_depth = 0; - void *fe_data = shader->baseShader.frontend_data; + void *fe_data = shader->frontend_data; struct wined3d_shader_version shader_version; const DWORD *ptr = byte_code; memset(reg_maps, 0, sizeof(*reg_maps)); - - /* get_registers_used() is called on every compile on some 1.x shaders, - * which can result in stacking up a collection of local constants. - * Delete the old constants if existing. */ - shader_delete_constant_list(&shader->baseShader.constantsF); - shader_delete_constant_list(&shader->baseShader.constantsB); - shader_delete_constant_list(&shader->baseShader.constantsI); + reg_maps->min_rel_offset = ~0U; fe->shader_read_header(fe_data, &ptr, &shader_version); reg_maps->shader_version = shader_version; @@ -559,7 +553,7 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct else if (value[3] > 1.0f) value[3] = 1.0f; } - list_add_head(&shader->baseShader.constantsF, &lconst->entry); + list_add_head(&shader->constantsF, &lconst->entry); } else if (ins.handler_idx == WINED3DSIH_DEFI) { @@ -575,7 +569,7 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct memcpy(lconst->value, ptr, 4 * sizeof(DWORD)); ptr += 4; - list_add_head(&shader->baseShader.constantsI, &lconst->entry); + list_add_head(&shader->constantsI, &lconst->entry); reg_maps->local_int_consts |= (1 << dst.reg.idx); } else if (ins.handler_idx == WINED3DSIH_DEFB) @@ -592,7 +586,7 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct memcpy(lconst->value, ptr, sizeof(DWORD)); ++ptr; - list_add_head(&shader->baseShader.constantsB, &lconst->entry); + list_add_head(&shader->constantsB, &lconst->entry); reg_maps->local_bool_consts |= (1 << dst.reg.idx); } /* If there's a loop in the shader. */ @@ -634,7 +628,7 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct else { BOOL color0_mov = FALSE; - int i, limit; + unsigned int i, limit; /* This will loop over all the registers and try to * make a bitmask of the ones we're interested in. @@ -722,19 +716,16 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct if (shader_version.type == WINED3D_SHADER_TYPE_PIXEL) { - IWineD3DPixelShaderImpl *ps = (IWineD3DPixelShaderImpl *)shader; - if (dst_param.reg.type == WINED3DSPR_COLOROUT && !dst_param.reg.idx) { - /* Many 2.0 and 3.0 pixel shaders end with a MOV from a temp register to - * COLOROUT 0. If we know this in advance, the ARB shader backend can skip - * the mov and perform the sRGB write correction from the source register. - * - * However, if the mov is only partial, we can't do this, and if the write - * comes from an instruction other than MOV it is hard to do as well. If - * COLOROUT 0 is overwritten partially later, the marker is dropped again. */ - - ps->color0_mov = FALSE; + /* Many 2.0 and 3.0 pixel shaders end with a MOV from a temp register to + * COLOROUT 0. If we know this in advance, the ARB shader backend can skip + * the mov and perform the sRGB write correction from the source register. + * + * However, if the mov is only partial, we can't do this, and if the write + * comes from an instruction other than MOV it is hard to do as well. If + * COLOROUT 0 is overwritten partially later, the marker is dropped again. */ + shader->u.ps.color0_mov = FALSE; if (ins.handler_idx == WINED3DSIH_MOV && dst_param.write_mask == WINED3DSP_WRITEMASK_ALL) { @@ -745,9 +736,10 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct /* Also drop the MOV marker if the source register is overwritten prior to the shader * end */ - else if (dst_param.reg.type == WINED3DSPR_TEMP && dst_param.reg.idx == ps->color0_reg) + else if (dst_param.reg.type == WINED3DSPR_TEMP + && dst_param.reg.idx == shader->u.ps.color0_reg) { - ps->color0_mov = FALSE; + shader->u.ps.color0_mov = FALSE; } } @@ -796,7 +788,7 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct else if (ins.handler_idx == WINED3DSIH_MOVA) reg_maps->usesmova = 1; else if (ins.handler_idx == WINED3DSIH_IFC) reg_maps->usesifc = 1; else if (ins.handler_idx == WINED3DSIH_CALL) reg_maps->usescall = 1; - else if (ins.handler_idx == WINED3DSIH_RCP) reg_maps->usesrcp = 1; + else if (ins.handler_idx == WINED3DSIH_POW) reg_maps->usespow = 1; limit = ins.src_count + (ins.predicate ? 1 : 0); for (i = 0; i < limit; ++i) @@ -817,12 +809,11 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct if (color0_mov) { - IWineD3DPixelShaderImpl *ps = (IWineD3DPixelShaderImpl *)shader; if (src_param.reg.type == WINED3DSPR_TEMP && src_param.swizzle == WINED3DSP_NOSWIZZLE) { - ps->color0_mov = TRUE; - ps->color0_reg = src_param.reg.idx; + shader->u.ps.color0_mov = TRUE; + shader->u.ps.color0_reg = src_param.reg.idx; } } } @@ -830,12 +821,17 @@ static HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct } reg_maps->loop_depth = max_loop_depth; - shader->baseShader.functionLength = ((const char *)ptr - (const char *)byte_code); + /* PS before 2.0 don't have explicit color outputs. Instead the value of + * R0 is written to the render target. */ + if (shader_version.major < 2 && shader_version.type == WINED3D_SHADER_TYPE_PIXEL) + reg_maps->rt_mask |= (1 << 0); + + shader->functionLength = ((const char *)ptr - (const char *)byte_code); return WINED3D_OK; } -unsigned int shader_find_free_input_register(const struct shader_reg_maps *reg_maps, unsigned int max) +unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_maps *reg_maps, unsigned int max) { DWORD map = 1 << max; map |= map - 1; @@ -1023,6 +1019,10 @@ static void shader_dump_register(const struct wined3d_shader_register *reg, TRACE("null"); break; + case WINED3DSPR_RESOURCE: + TRACE("t"); + break; + default: TRACE("unhandled_rtype(%#x)", reg->type); break; @@ -1164,34 +1164,40 @@ void shader_dump_src_param(const struct wined3d_shader_src_param *param, /* Shared code in order to generate the bulk of the shader string. * NOTE: A description of how to parse tokens can be found on MSDN. */ -void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffer *buffer, - const shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) +void shader_generate_main(struct wined3d_shader *shader, struct wined3d_shader_buffer *buffer, + const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)iface; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)shader->baseShader.device; - const struct wined3d_shader_frontend *fe = shader->baseShader.frontend; - void *fe_data = shader->baseShader.frontend_data; + struct wined3d_device *device = shader->device; + const struct wined3d_shader_frontend *fe = shader->frontend; + void *fe_data = shader->frontend_data; struct wined3d_shader_src_param dst_rel_addr[2]; struct wined3d_shader_src_param src_rel_addr[4]; struct wined3d_shader_dst_param dst_param[2]; struct wined3d_shader_src_param src_param[4]; struct wined3d_shader_version shader_version; + struct wined3d_shader_loop_state loop_state; struct wined3d_shader_instruction ins; + struct wined3d_shader_tex_mx tex_mx; struct wined3d_shader_context ctx; const DWORD *ptr = byte_code; DWORD i; /* Initialize current parsing state. */ - ctx.shader = iface; + tex_mx.current_row = 0; + loop_state.current_depth = 0; + loop_state.current_reg = 0; + + ctx.shader = shader; ctx.gl_info = &device->adapter->gl_info; ctx.reg_maps = reg_maps; ctx.buffer = buffer; + ctx.tex_mx = &tex_mx; + ctx.loop_state = &loop_state; ctx.backend_data = backend_ctx; ins.ctx = &ctx; ins.dst = dst_param; ins.src = src_param; - shader->baseShader.parse_state.current_row = 0; fe->shader_read_header(fe_data, &ptr, &shader_version); @@ -1469,36 +1475,34 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe } } -static void shader_cleanup(IWineD3DBaseShader *iface) +static void shader_cleanup(struct wined3d_shader *shader) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)iface; + shader->device->shader_backend->shader_destroy(shader); + HeapFree(GetProcessHeap(), 0, shader->reg_maps.constf); + HeapFree(GetProcessHeap(), 0, shader->function); + shader_delete_constant_list(&shader->constantsF); + shader_delete_constant_list(&shader->constantsB); + shader_delete_constant_list(&shader->constantsI); + list_remove(&shader->shader_list_entry); - ((IWineD3DDeviceImpl *)shader->baseShader.device)->shader_backend->shader_destroy(iface); - HeapFree(GetProcessHeap(), 0, shader->baseShader.reg_maps.constf); - HeapFree(GetProcessHeap(), 0, shader->baseShader.function); - shader_delete_constant_list(&shader->baseShader.constantsF); - shader_delete_constant_list(&shader->baseShader.constantsB); - shader_delete_constant_list(&shader->baseShader.constantsI); - list_remove(&shader->baseShader.shader_list_entry); - - if (shader->baseShader.frontend && shader->baseShader.frontend_data) - { - shader->baseShader.frontend->shader_free(shader->baseShader.frontend_data); - } + if (shader->frontend && shader->frontend_data) + shader->frontend->shader_free(shader->frontend_data); } static void shader_none_handle_instruction(const struct wined3d_shader_instruction *ins) {} static void shader_none_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) {} -static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size) {} -static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {} -static void shader_none_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count) {} -static void shader_none_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) {} +static void shader_none_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info, + enum tex_types tex_type, const SIZE *ds_mask_size) {} +static void shader_none_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info) {} +static void shader_none_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count) {} +static void shader_none_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count) {} static void shader_none_load_constants(const struct wined3d_context *context, char usePS, char useVS) {} -static void shader_none_load_np2fixup_constants(IWineD3DDevice *iface, char usePS, char useVS) {} -static void shader_none_destroy(IWineD3DBaseShader *iface) {} -static HRESULT shader_none_alloc(IWineD3DDevice *iface) {return WINED3D_OK;} -static void shader_none_free(IWineD3DDevice *iface) {} -static BOOL shader_none_dirty_const(IWineD3DDevice *iface) {return FALSE;} +static void shader_none_load_np2fixup_constants(void *shader_priv, + const struct wined3d_gl_info *gl_info, const struct wined3d_state *state) {} +static void shader_none_destroy(struct wined3d_shader *shader) {} +static HRESULT shader_none_alloc(struct wined3d_device *device) {return WINED3D_OK;} +static void shader_none_free(struct wined3d_device *device) {} +static BOOL shader_none_dirty_const(void) {return FALSE;} static void shader_none_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps) { @@ -1530,7 +1534,8 @@ static BOOL shader_none_color_fixup_supported(struct color_fixup_desc fixup) return FALSE; } -const shader_backend_t none_shader_backend = { +const struct wined3d_shader_backend_ops none_shader_backend = +{ shader_none_handle_instruction, shader_none_select, shader_none_select_depth_blt, @@ -1547,31 +1552,10 @@ const shader_backend_t none_shader_backend = { shader_none_color_fixup_supported, }; -static HRESULT shader_get_function(IWineD3DBaseShaderImpl *shader, void *data, UINT *data_size) -{ - if (!data) - { - *data_size = shader->baseShader.functionLength; - return WINED3D_OK; - } - - if (*data_size < shader->baseShader.functionLength) - { - /* MSDN claims (for d3d8 at least) that if *pSizeOfData is smaller - * than the required size we should write the required size and - * return D3DERR_MOREDATA. That's not actually true. */ - return WINED3DERR_INVALIDCALL; - } - - memcpy(data, shader->baseShader.function, shader->baseShader.functionLength); - - return WINED3D_OK; -} - -static HRESULT shader_set_function(IWineD3DBaseShaderImpl *shader, const DWORD *byte_code, +static HRESULT shader_set_function(struct wined3d_shader *shader, const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, DWORD float_const_count) { - struct shader_reg_maps *reg_maps = &shader->baseShader.reg_maps; + struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; const struct wined3d_shader_frontend *fe; HRESULT hr; @@ -1584,59 +1568,40 @@ static HRESULT shader_set_function(IWineD3DBaseShaderImpl *shader, const DWORD * FIXME("Unable to find frontend for shader.\n"); return WINED3DERR_INVALIDCALL; } - shader->baseShader.frontend = fe; - shader->baseShader.frontend_data = fe->shader_init(byte_code, output_signature); - if (!shader->baseShader.frontend_data) + shader->frontend = fe; + shader->frontend_data = fe->shader_init(byte_code, output_signature); + if (!shader->frontend_data) { FIXME("Failed to initialize frontend.\n"); return WINED3DERR_INVALIDCALL; } /* First pass: trace shader. */ - if (TRACE_ON(d3d_shader)) shader_trace_init(fe, shader->baseShader.frontend_data, byte_code); + if (TRACE_ON(d3d_shader)) + shader_trace_init(fe, shader->frontend_data, byte_code); /* Initialize immediate constant lists. */ - list_init(&shader->baseShader.constantsF); - list_init(&shader->baseShader.constantsB); - list_init(&shader->baseShader.constantsI); + list_init(&shader->constantsF); + list_init(&shader->constantsB); + list_init(&shader->constantsI); /* Second pass: figure out which registers are used, what the semantics are, etc. */ - hr = shader_get_registers_used((IWineD3DBaseShader *)shader, fe, - reg_maps, shader->baseShader.input_signature, shader->baseShader.output_signature, + hr = shader_get_registers_used(shader, fe, + reg_maps, shader->input_signature, shader->output_signature, byte_code, float_const_count); if (FAILED(hr)) return hr; - shader->baseShader.function = HeapAlloc(GetProcessHeap(), 0, shader->baseShader.functionLength); - if (!shader->baseShader.function) return E_OUTOFMEMORY; - memcpy(shader->baseShader.function, byte_code, shader->baseShader.functionLength); + shader->function = HeapAlloc(GetProcessHeap(), 0, shader->functionLength); + if (!shader->function) + return E_OUTOFMEMORY; + memcpy(shader->function, byte_code, shader->functionLength); return WINED3D_OK; } -static HRESULT STDMETHODCALLTYPE vertexshader_QueryInterface(IWineD3DVertexShader *iface, REFIID riid, void **object) +ULONG CDECL wined3d_shader_incref(struct wined3d_shader *shader) { - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - - if (IsEqualGUID(riid, &IID_IWineD3DVertexShader) - || IsEqualGUID(riid, &IID_IWineD3DBaseShader) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; -} - -static ULONG STDMETHODCALLTYPE vertexshader_AddRef(IWineD3DVertexShader *iface) -{ - IWineD3DVertexShaderImpl *shader = (IWineD3DVertexShaderImpl *)iface; - ULONG refcount = InterlockedIncrement(&shader->baseShader.ref); + ULONG refcount = InterlockedIncrement(&shader->ref); TRACE("%p increasing refcount to %u.\n", shader, refcount); @@ -1644,89 +1609,91 @@ static ULONG STDMETHODCALLTYPE vertexshader_AddRef(IWineD3DVertexShader *iface) } /* Do not call while under the GL lock. */ -static ULONG STDMETHODCALLTYPE vertexshader_Release(IWineD3DVertexShader *iface) +ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader) { - IWineD3DVertexShaderImpl *shader = (IWineD3DVertexShaderImpl *)iface; - ULONG refcount = InterlockedDecrement(&shader->baseShader.ref); + ULONG refcount = InterlockedDecrement(&shader->ref); TRACE("%p decreasing refcount to %u.\n", shader, refcount); if (!refcount) { - shader_cleanup((IWineD3DBaseShader *)iface); - shader->baseShader.parent_ops->wined3d_object_destroyed(shader->baseShader.parent); + shader_cleanup(shader); + shader->parent_ops->wined3d_object_destroyed(shader->parent); HeapFree(GetProcessHeap(), 0, shader); } return refcount; } -static void * STDMETHODCALLTYPE vertexshader_GetParent(IWineD3DVertexShader *iface) +void * CDECL wined3d_shader_get_parent(const struct wined3d_shader *shader) { - TRACE("iface %p.\n", iface); + TRACE("shader %p.\n", shader); - return ((IWineD3DBaseShaderImpl *)iface)->baseShader.parent; + return shader->parent; } -static HRESULT STDMETHODCALLTYPE vertexshader_GetFunction(IWineD3DVertexShader *iface, void *data, UINT *data_size) +HRESULT CDECL wined3d_shader_get_byte_code(const struct wined3d_shader *shader, + void *byte_code, UINT *byte_code_size) { - TRACE("iface %p, data %p, data_size %p.\n", iface, data, data_size); + TRACE("shader %p, byte_code %p, byte_code_size %p.\n", shader, byte_code, byte_code_size); - return shader_get_function((IWineD3DBaseShaderImpl *)iface, data, data_size); + if (!byte_code) + { + *byte_code_size = shader->functionLength; + return WINED3D_OK; + } + + if (*byte_code_size < shader->functionLength) + { + /* MSDN claims (for d3d8 at least) that if *byte_code_size is smaller + * than the required size we should write the required size and + * return D3DERR_MOREDATA. That's not actually true. */ + return WINED3DERR_INVALIDCALL; + } + + memcpy(byte_code, shader->function, shader->functionLength); + + return WINED3D_OK; } /* Set local constants for d3d8 shaders. */ -static HRESULT STDMETHODCALLTYPE vertexshader_SetLocalConstantsF(IWineD3DVertexShader *iface, +HRESULT CDECL wined3d_shader_set_local_constants_float(struct wined3d_shader *shader, UINT start_idx, const float *src_data, UINT count) { - IWineD3DVertexShaderImpl *shader =(IWineD3DVertexShaderImpl *)iface; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)shader->baseShader.device; - UINT i, end_idx; + UINT end_idx = start_idx + count; + UINT i; - TRACE("iface %p, start_idx %u, src_data %p, count %u.\n", iface, start_idx, src_data, count); + TRACE("shader %p, start_idx %u, src_data %p, count %u.\n", shader, start_idx, src_data, count); - end_idx = start_idx + count; - if (end_idx > device->d3d_vshader_constantF) + if (end_idx > shader->limits.constant_float) { - WARN("end_idx %u > float constants limit %u.\n", end_idx, device->d3d_vshader_constantF); - end_idx = device->d3d_vshader_constantF; + WARN("end_idx %u > float constants limit %u.\n", + end_idx, shader->limits.constant_float); + end_idx = shader->limits.constant_float; } for (i = start_idx; i < end_idx; ++i) { - local_constant* lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant)); - if (!lconst) return E_OUTOFMEMORY; + struct local_constant *lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(local_constant)); + if (!lconst) + return E_OUTOFMEMORY; lconst->idx = i; memcpy(lconst->value, src_data + (i - start_idx) * 4 /* 4 components */, 4 * sizeof(float)); - list_add_head(&shader->baseShader.constantsF, &lconst->entry); + list_add_head(&shader->constantsF, &lconst->entry); } return WINED3D_OK; } -static const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl = -{ - /* IUnknown methods */ - vertexshader_QueryInterface, - vertexshader_AddRef, - vertexshader_Release, - /* IWineD3DBase methods */ - vertexshader_GetParent, - /* IWineD3DBaseShader methods */ - vertexshader_GetFunction, - /* IWineD3DVertexShader methods */ - vertexshader_SetLocalConstantsF, -}; - void find_vs_compile_args(const struct wined3d_state *state, - IWineD3DVertexShaderImpl *shader, struct vs_compile_args *args) + const struct wined3d_shader *shader, struct vs_compile_args *args) { args->fog_src = state->render_states[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE ? VS_FOG_COORD : VS_FOG_Z; args->clip_enabled = state->render_states[WINED3DRS_CLIPPING] && state->render_states[WINED3DRS_CLIPPLANEENABLE]; - args->swizzle_map = ((IWineD3DDeviceImpl *)shader->baseShader.device)->strided_streams.swizzle_map; + args->swizzle_map = shader->device->strided_streams.swizzle_map; } static BOOL match_usage(BYTE usage1, BYTE usage_idx1, BYTE usage2, BYTE usage_idx2) @@ -1739,18 +1706,18 @@ static BOOL match_usage(BYTE usage1, BYTE usage_idx1, BYTE usage2, BYTE usage_id return FALSE; } -BOOL vshader_get_input(struct IWineD3DVertexShaderImpl *shader, +BOOL vshader_get_input(struct wined3d_shader *shader, BYTE usage_req, BYTE usage_idx_req, unsigned int *regnum) { - WORD map = shader->baseShader.reg_maps.input_registers; + WORD map = shader->reg_maps.input_registers; unsigned int i; for (i = 0; map; map >>= 1, ++i) { if (!(map & 1)) continue; - if (match_usage(shader->attributes[i].usage, - shader->attributes[i].usage_idx, usage_req, usage_idx_req)) + if (match_usage(shader->u.vs.attributes[i].usage, + shader->u.vs.attributes[i].usage_idx, usage_req, usage_idx_req)) { *regnum = i; return TRUE; @@ -1759,43 +1726,43 @@ BOOL vshader_get_input(struct IWineD3DVertexShaderImpl *shader, return FALSE; } -static void vertexshader_set_limits(IWineD3DVertexShaderImpl *shader) +static void vertexshader_set_limits(struct wined3d_shader *shader) { - DWORD shader_version = WINED3D_SHADER_VERSION(shader->baseShader.reg_maps.shader_version.major, - shader->baseShader.reg_maps.shader_version.minor); - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)shader->baseShader.device; + DWORD shader_version = WINED3D_SHADER_VERSION(shader->reg_maps.shader_version.major, + shader->reg_maps.shader_version.minor); + struct wined3d_device *device = shader->device; - shader->baseShader.limits.texcoord = 0; - shader->baseShader.limits.attributes = 16; - shader->baseShader.limits.packed_input = 0; + shader->limits.texcoord = 0; + shader->limits.attributes = 16; + shader->limits.packed_input = 0; switch (shader_version) { case WINED3D_SHADER_VERSION(1, 0): case WINED3D_SHADER_VERSION(1, 1): - shader->baseShader.limits.temporary = 12; - shader->baseShader.limits.constant_bool = 0; - shader->baseShader.limits.constant_int = 0; - shader->baseShader.limits.address = 1; - shader->baseShader.limits.packed_output = 12; - shader->baseShader.limits.sampler = 0; - shader->baseShader.limits.label = 0; + shader->limits.temporary = 12; + shader->limits.constant_bool = 0; + shader->limits.constant_int = 0; + shader->limits.address = 1; + shader->limits.packed_output = 12; + shader->limits.sampler = 0; + shader->limits.label = 0; /* TODO: vs_1_1 has a minimum of 96 constants. What happens when * a vs_1_1 shader is used on a vs_3_0 capable card that has 256 * constants? */ - shader->baseShader.limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.constant_float = min(256, device->d3d_vshader_constantF); break; case WINED3D_SHADER_VERSION(2, 0): case WINED3D_SHADER_VERSION(2, 1): - shader->baseShader.limits.temporary = 12; - shader->baseShader.limits.constant_bool = 16; - shader->baseShader.limits.constant_int = 16; - shader->baseShader.limits.address = 1; - shader->baseShader.limits.packed_output = 12; - shader->baseShader.limits.sampler = 0; - shader->baseShader.limits.label = 16; - shader->baseShader.limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.temporary = 12; + shader->limits.constant_bool = 16; + shader->limits.constant_int = 16; + shader->limits.address = 1; + shader->limits.packed_output = 12; + shader->limits.sampler = 0; + shader->limits.label = 16; + shader->limits.constant_float = min(256, device->d3d_vshader_constantF); break; case WINED3D_SHADER_VERSION(4, 0): @@ -1803,68 +1770,65 @@ static void vertexshader_set_limits(IWineD3DVertexShaderImpl *shader) /* Fall through. */ case WINED3D_SHADER_VERSION(3, 0): - shader->baseShader.limits.temporary = 32; - shader->baseShader.limits.constant_bool = 32; - shader->baseShader.limits.constant_int = 32; - shader->baseShader.limits.address = 1; - shader->baseShader.limits.packed_output = 12; - shader->baseShader.limits.sampler = 4; - shader->baseShader.limits.label = 16; /* FIXME: 2048 */ + shader->limits.temporary = 32; + shader->limits.constant_bool = 32; + shader->limits.constant_int = 32; + shader->limits.address = 1; + shader->limits.packed_output = 12; + shader->limits.sampler = 4; + shader->limits.label = 16; /* FIXME: 2048 */ /* DX10 cards on Windows advertise a d3d9 constant limit of 256 * even though they are capable of supporting much more (GL * drivers advertise 1024). d3d9.dll and d3d8.dll clamp the * wined3d-advertised maximum. Clamp the constant limit for <= 3.0 * shaders to 256. */ - shader->baseShader.limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.constant_float = min(256, device->d3d_vshader_constantF); break; default: - shader->baseShader.limits.temporary = 12; - shader->baseShader.limits.constant_bool = 16; - shader->baseShader.limits.constant_int = 16; - shader->baseShader.limits.address = 1; - shader->baseShader.limits.packed_output = 12; - shader->baseShader.limits.sampler = 0; - shader->baseShader.limits.label = 16; - shader->baseShader.limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.temporary = 12; + shader->limits.constant_bool = 16; + shader->limits.constant_int = 16; + shader->limits.address = 1; + shader->limits.packed_output = 12; + shader->limits.sampler = 0; + shader->limits.label = 16; + shader->limits.constant_float = min(256, device->d3d_vshader_constantF); FIXME("Unrecognized vertex shader version \"%u.%u\".\n", - shader->baseShader.reg_maps.shader_version.major, - shader->baseShader.reg_maps.shader_version.minor); + shader->reg_maps.shader_version.major, + shader->reg_maps.shader_version.minor); } } -HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl *device, +static HRESULT vertexshader_init(struct wined3d_shader *shader, struct wined3d_device *device, const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, void *parent, const struct wined3d_parent_ops *parent_ops) { - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - struct shader_reg_maps *reg_maps = &shader->baseShader.reg_maps; + struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; unsigned int i; HRESULT hr; WORD map; if (!byte_code) return WINED3DERR_INVALIDCALL; - shader->lpVtbl = &IWineD3DVertexShader_Vtbl; - shader_init(&shader->baseShader, device, parent, parent_ops); - - hr = shader_set_function((IWineD3DBaseShaderImpl *)shader, byte_code, - output_signature, device->d3d_vshader_constantF); + shader_init(shader, device, parent, parent_ops); + hr = shader_set_function(shader, byte_code, output_signature, device->d3d_vshader_constantF); if (FAILED(hr)) { WARN("Failed to set function, hr %#x.\n", hr); - shader_cleanup((IWineD3DBaseShader *)shader); + shader_cleanup(shader); return hr; } - map = shader->baseShader.reg_maps.input_registers; + map = reg_maps->input_registers; for (i = 0; map; map >>= 1, ++i) { - if (!(map & 1) || !shader->baseShader.input_signature[i].semantic_name) continue; + if (!(map & 1) || !shader->input_signature[i].semantic_name) + continue; - shader->attributes[i].usage = - shader_usage_from_semantic_name(shader->baseShader.input_signature[i].semantic_name); - shader->attributes[i].usage_idx = shader->baseShader.input_signature[i].semantic_idx; + shader->u.vs.attributes[i].usage = + shader_usage_from_semantic_name(shader->input_signature[i].semantic_name); + shader->u.vs.attributes[i].usage_idx = shader->input_signature[i].semantic_idx; } if (output_signature) @@ -1873,229 +1837,54 @@ HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl * { struct wined3d_shader_signature_element *e = &output_signature->elements[i]; reg_maps->output_registers |= 1 << e->register_idx; - shader->baseShader.output_signature[e->register_idx] = *e; + shader->output_signature[e->register_idx] = *e; } } vertexshader_set_limits(shader); - if (device->vs_selected_mode == SHADER_ARB - && (gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT) - && shader->min_rel_offset <= shader->max_rel_offset) - { - if (shader->max_rel_offset - shader->min_rel_offset > 127) - { - FIXME("The difference between the minimum and maximum relative offset is > 127.\n"); - FIXME("Which this OpenGL implementation does not support. Try using GLSL.\n"); - FIXME("Min: %d, Max: %d.\n", shader->min_rel_offset, shader->max_rel_offset); - } - else if (shader->max_rel_offset - shader->min_rel_offset > 63) - { - shader->rel_offset = shader->min_rel_offset + 63; - } - else if (shader->max_rel_offset > 63) - { - shader->rel_offset = shader->min_rel_offset; - } - else - { - shader->rel_offset = 0; - } - } - - shader->baseShader.load_local_constsF = shader->baseShader.reg_maps.usesrelconstF - && !list_empty(&shader->baseShader.constantsF); + shader->load_local_constsF = reg_maps->usesrelconstF + && !list_empty(&shader->constantsF); return WINED3D_OK; } -static HRESULT STDMETHODCALLTYPE geometryshader_QueryInterface(IWineD3DGeometryShader *iface, - REFIID riid, void **object) -{ - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - - if (IsEqualGUID(riid, &IID_IWineD3DGeometryShader) - || IsEqualGUID(riid, &IID_IWineD3DBaseShader) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; -} - -static ULONG STDMETHODCALLTYPE geometryshader_AddRef(IWineD3DGeometryShader *iface) -{ - struct wined3d_geometryshader *shader = (struct wined3d_geometryshader *)iface; - ULONG refcount = InterlockedIncrement(&shader->base_shader.ref); - - TRACE("%p increasing refcount to %u.\n", shader, refcount); - - return refcount; -} - -/* Do not call while under the GL lock. */ -static ULONG STDMETHODCALLTYPE geometryshader_Release(IWineD3DGeometryShader *iface) -{ - struct wined3d_geometryshader *shader = (struct wined3d_geometryshader *)iface; - ULONG refcount = InterlockedDecrement(&shader->base_shader.ref); - - TRACE("%p decreasing refcount to %u.\n", shader, refcount); - - if (!refcount) - { - shader_cleanup((IWineD3DBaseShader *)iface); - shader->base_shader.parent_ops->wined3d_object_destroyed(shader->base_shader.parent); - HeapFree(GetProcessHeap(), 0, shader); - } - - return refcount; -} - -static void * STDMETHODCALLTYPE geometryshader_GetParent(IWineD3DGeometryShader *iface) -{ - TRACE("iface %p.\n", iface); - - return ((IWineD3DBaseShaderImpl *)iface)->baseShader.parent; -} - -static HRESULT STDMETHODCALLTYPE geometryshader_GetFunction(IWineD3DGeometryShader *iface, void *data, UINT *data_size) -{ - TRACE("iface %p, data %p, data_size %p.\n", iface, data, data_size); - - return shader_get_function((IWineD3DBaseShaderImpl *)iface, data, data_size); -} - -static const IWineD3DGeometryShaderVtbl wined3d_geometryshader_vtbl = -{ - /* IUnknown methods */ - geometryshader_QueryInterface, - geometryshader_AddRef, - geometryshader_Release, - /* IWineD3DBase methods */ - geometryshader_GetParent, - /* IWineD3DBaseShader methods */ - geometryshader_GetFunction, -}; - -HRESULT geometryshader_init(struct wined3d_geometryshader *shader, IWineD3DDeviceImpl *device, +static HRESULT geometryshader_init(struct wined3d_shader *shader, struct wined3d_device *device, const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, void *parent, const struct wined3d_parent_ops *parent_ops) { HRESULT hr; - shader->vtbl = &wined3d_geometryshader_vtbl; - shader_init(&shader->base_shader, device, parent, parent_ops); - - hr = shader_set_function((IWineD3DBaseShaderImpl *)shader, byte_code, output_signature, 0); + shader_init(shader, device, parent, parent_ops); + hr = shader_set_function(shader, byte_code, output_signature, 0); if (FAILED(hr)) { WARN("Failed to set function, hr %#x.\n", hr); - shader_cleanup((IWineD3DBaseShader *)shader); + shader_cleanup(shader); return hr; } - shader->base_shader.load_local_constsF = FALSE; + shader->load_local_constsF = FALSE; return WINED3D_OK; } -static HRESULT STDMETHODCALLTYPE pixelshader_QueryInterface(IWineD3DPixelShader *iface, REFIID riid, void **object) -{ - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - - if (IsEqualGUID(riid, &IID_IWineD3DPixelShader) - || IsEqualGUID(riid, &IID_IWineD3DBaseShader) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; -} - -static ULONG STDMETHODCALLTYPE pixelshader_AddRef(IWineD3DPixelShader *iface) -{ - IWineD3DPixelShaderImpl *shader = (IWineD3DPixelShaderImpl *)iface; - ULONG refcount = InterlockedIncrement(&shader->baseShader.ref); - - TRACE("%p increasing refcount to %u.\n", shader, refcount); - - return refcount; -} - -/* Do not call while under the GL lock. */ -static ULONG STDMETHODCALLTYPE pixelshader_Release(IWineD3DPixelShader *iface) -{ - IWineD3DPixelShaderImpl *shader = (IWineD3DPixelShaderImpl *)iface; - ULONG refcount = InterlockedDecrement(&shader->baseShader.ref); - - TRACE("%p decreasing refcount to %u.\n", shader, refcount); - - if (!refcount) - { - shader_cleanup((IWineD3DBaseShader *)iface); - shader->baseShader.parent_ops->wined3d_object_destroyed(shader->baseShader.parent); - HeapFree(GetProcessHeap(), 0, shader); - } - - return refcount; -} - -static void * STDMETHODCALLTYPE pixelshader_GetParent(IWineD3DPixelShader *iface) -{ - TRACE("iface %p.\n", iface); - - return ((IWineD3DBaseShaderImpl *)iface)->baseShader.parent; -} - -static HRESULT STDMETHODCALLTYPE pixelshader_GetFunction(IWineD3DPixelShader *iface, void *data, UINT *data_size) -{ - TRACE("iface %p, data %p, data_size %p.\n", iface, data, data_size); - - return shader_get_function((IWineD3DBaseShaderImpl *)iface, data, data_size); -} - -static const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl = -{ - /* IUnknown methods */ - pixelshader_QueryInterface, - pixelshader_AddRef, - pixelshader_Release, - /* IWineD3DBase methods */ - pixelshader_GetParent, - /* IWineD3DBaseShader methods */ - pixelshader_GetFunction -}; - void find_ps_compile_args(const struct wined3d_state *state, - IWineD3DPixelShaderImpl *shader, struct ps_compile_args *args) + const struct wined3d_shader *shader, struct ps_compile_args *args) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)shader->baseShader.device; - IWineD3DBaseTextureImpl *texture; + struct wined3d_device *device = shader->device; + const struct wined3d_texture *texture; UINT i; memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ if (state->render_states[WINED3DRS_SRGBWRITEENABLE]) { - IWineD3DSurfaceImpl *rt = device->render_targets[0]; - if(rt->resource.format->Flags & WINED3DFMT_FLAG_SRGB_WRITE) args->srgb_correction = 1; + struct wined3d_surface *rt = device->fb.render_targets[0]; + if (rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) args->srgb_correction = 1; } - if (shader->baseShader.reg_maps.shader_version.major == 1 - && shader->baseShader.reg_maps.shader_version.minor <= 3) + if (shader->reg_maps.shader_version.major == 1 + && shader->reg_maps.shader_version.minor <= 3) { for (i = 0; i < 4; ++i) { @@ -2109,7 +1898,9 @@ void find_ps_compile_args(const struct wined3d_state *state, for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) { - if (!shader->baseShader.reg_maps.sampler_type[i]) continue; + if (!shader->reg_maps.sampler_type[i]) + continue; + texture = state->textures[i]; if (!texture) { @@ -2118,16 +1909,14 @@ void find_ps_compile_args(const struct wined3d_state *state, } args->color_fixup[i] = texture->resource.format->color_fixup; - if (texture->resource.format->Flags & WINED3DFMT_FLAG_SHADOW) + if (texture->resource.format->flags & WINED3DFMT_FLAG_SHADOW) args->shadow |= 1 << i; /* Flag samplers that need NP2 texcoord fixup. */ - if (!texture->baseTexture.pow2Matrix_identity) - { + if (!(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT)) args->np2_fixup |= (1 << i); - } } - if (shader->baseShader.reg_maps.shader_version.major >= 3) + if (shader->reg_maps.shader_version.major >= 3) { if (device->strided_streams.position_transformed) { @@ -2178,14 +1967,14 @@ void find_ps_compile_args(const struct wined3d_state *state, } } -static void pixelshader_set_limits(IWineD3DPixelShaderImpl *shader) +static void pixelshader_set_limits(struct wined3d_shader *shader) { - DWORD shader_version = WINED3D_SHADER_VERSION(shader->baseShader.reg_maps.shader_version.major, - shader->baseShader.reg_maps.shader_version.minor); + DWORD shader_version = WINED3D_SHADER_VERSION(shader->reg_maps.shader_version.major, + shader->reg_maps.shader_version.minor); - shader->baseShader.limits.attributes = 0; - shader->baseShader.limits.address = 0; - shader->baseShader.limits.packed_output = 0; + shader->limits.attributes = 0; + shader->limits.address = 0; + shader->limits.packed_output = 0; switch (shader_version) { @@ -2193,47 +1982,47 @@ static void pixelshader_set_limits(IWineD3DPixelShaderImpl *shader) case WINED3D_SHADER_VERSION(1, 1): case WINED3D_SHADER_VERSION(1, 2): case WINED3D_SHADER_VERSION(1, 3): - shader->baseShader.limits.temporary = 2; - shader->baseShader.limits.constant_float = 8; - shader->baseShader.limits.constant_int = 0; - shader->baseShader.limits.constant_bool = 0; - shader->baseShader.limits.texcoord = 4; - shader->baseShader.limits.sampler = 4; - shader->baseShader.limits.packed_input = 0; - shader->baseShader.limits.label = 0; + shader->limits.temporary = 2; + shader->limits.constant_float = 8; + shader->limits.constant_int = 0; + shader->limits.constant_bool = 0; + shader->limits.texcoord = 4; + shader->limits.sampler = 4; + shader->limits.packed_input = 0; + shader->limits.label = 0; break; case WINED3D_SHADER_VERSION(1, 4): - shader->baseShader.limits.temporary = 6; - shader->baseShader.limits.constant_float = 8; - shader->baseShader.limits.constant_int = 0; - shader->baseShader.limits.constant_bool = 0; - shader->baseShader.limits.texcoord = 6; - shader->baseShader.limits.sampler = 6; - shader->baseShader.limits.packed_input = 0; - shader->baseShader.limits.label = 0; + shader->limits.temporary = 6; + shader->limits.constant_float = 8; + shader->limits.constant_int = 0; + shader->limits.constant_bool = 0; + shader->limits.texcoord = 6; + shader->limits.sampler = 6; + shader->limits.packed_input = 0; + shader->limits.label = 0; break; /* FIXME: Temporaries must match D3DPSHADERCAPS2_0.NumTemps. */ case WINED3D_SHADER_VERSION(2, 0): - shader->baseShader.limits.temporary = 32; - shader->baseShader.limits.constant_float = 32; - shader->baseShader.limits.constant_int = 16; - shader->baseShader.limits.constant_bool = 16; - shader->baseShader.limits.texcoord = 8; - shader->baseShader.limits.sampler = 16; - shader->baseShader.limits.packed_input = 0; + shader->limits.temporary = 32; + shader->limits.constant_float = 32; + shader->limits.constant_int = 16; + shader->limits.constant_bool = 16; + shader->limits.texcoord = 8; + shader->limits.sampler = 16; + shader->limits.packed_input = 0; break; case WINED3D_SHADER_VERSION(2, 1): - shader->baseShader.limits.temporary = 32; - shader->baseShader.limits.constant_float = 32; - shader->baseShader.limits.constant_int = 16; - shader->baseShader.limits.constant_bool = 16; - shader->baseShader.limits.texcoord = 8; - shader->baseShader.limits.sampler = 16; - shader->baseShader.limits.packed_input = 0; - shader->baseShader.limits.label = 16; + shader->limits.temporary = 32; + shader->limits.constant_float = 32; + shader->limits.constant_int = 16; + shader->limits.constant_bool = 16; + shader->limits.texcoord = 8; + shader->limits.sampler = 16; + shader->limits.packed_input = 0; + shader->limits.label = 16; break; case WINED3D_SHADER_VERSION(4, 0): @@ -2241,32 +2030,32 @@ static void pixelshader_set_limits(IWineD3DPixelShaderImpl *shader) /* Fall through. */ case WINED3D_SHADER_VERSION(3, 0): - shader->baseShader.limits.temporary = 32; - shader->baseShader.limits.constant_float = 224; - shader->baseShader.limits.constant_int = 16; - shader->baseShader.limits.constant_bool = 16; - shader->baseShader.limits.texcoord = 0; - shader->baseShader.limits.sampler = 16; - shader->baseShader.limits.packed_input = 12; - shader->baseShader.limits.label = 16; /* FIXME: 2048 */ + shader->limits.temporary = 32; + shader->limits.constant_float = 224; + shader->limits.constant_int = 16; + shader->limits.constant_bool = 16; + shader->limits.texcoord = 0; + shader->limits.sampler = 16; + shader->limits.packed_input = 12; + shader->limits.label = 16; /* FIXME: 2048 */ break; default: - shader->baseShader.limits.temporary = 32; - shader->baseShader.limits.constant_float = 32; - shader->baseShader.limits.constant_int = 16; - shader->baseShader.limits.constant_bool = 16; - shader->baseShader.limits.texcoord = 8; - shader->baseShader.limits.sampler = 16; - shader->baseShader.limits.packed_input = 0; - shader->baseShader.limits.label = 0; + shader->limits.temporary = 32; + shader->limits.constant_float = 32; + shader->limits.constant_int = 16; + shader->limits.constant_bool = 16; + shader->limits.texcoord = 8; + shader->limits.sampler = 16; + shader->limits.packed_input = 0; + shader->limits.label = 0; FIXME("Unrecognized pixel shader version %u.%u\n", - shader->baseShader.reg_maps.shader_version.major, - shader->baseShader.reg_maps.shader_version.minor); + shader->reg_maps.shader_version.major, + shader->reg_maps.shader_version.minor); } } -HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *device, +static HRESULT pixelshader_init(struct wined3d_shader *shader, struct wined3d_device *device, const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, void *parent, const struct wined3d_parent_ops *parent_ops) { @@ -2276,15 +2065,12 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de if (!byte_code) return WINED3DERR_INVALIDCALL; - shader->lpVtbl = &IWineD3DPixelShader_Vtbl; - shader_init(&shader->baseShader, device, parent, parent_ops); - - hr = shader_set_function((IWineD3DBaseShaderImpl *)shader, byte_code, - output_signature, device->d3d_pshader_constantF); + shader_init(shader, device, parent, parent_ops); + hr = shader_set_function(shader, byte_code, output_signature, device->d3d_pshader_constantF); if (FAILED(hr)) { WARN("Failed to set function, hr %#x.\n", hr); - shader_cleanup((IWineD3DBaseShader *)shader); + shader_cleanup(shader); return hr; } @@ -2292,7 +2078,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de for (i = 0; i < MAX_REG_INPUT; ++i) { - if (shader->input_reg_used[i]) + if (shader->u.ps.input_reg_used[i]) { ++num_regs_used; highest_reg_used = i; @@ -2314,27 +2100,28 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de for (i = 0; i < MAX_REG_INPUT; ++i) { - shader->input_reg_map[i] = i; + shader->u.ps.input_reg_map[i] = i; } - shader->declared_in_count = highest_reg_used + 1; + shader->u.ps.declared_in_count = highest_reg_used + 1; } else { - shader->declared_in_count = 0; + shader->u.ps.declared_in_count = 0; for (i = 0; i < MAX_REG_INPUT; ++i) { - if (shader->input_reg_used[i]) shader->input_reg_map[i] = shader->declared_in_count++; - else shader->input_reg_map[i] = ~0U; + if (shader->u.ps.input_reg_used[i]) + shader->u.ps.input_reg_map[i] = shader->u.ps.declared_in_count++; + else shader->u.ps.input_reg_map[i] = ~0U; } } - shader->baseShader.load_local_constsF = FALSE; + shader->load_local_constsF = FALSE; return WINED3D_OK; } -void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures) +void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, struct wined3d_texture * const *textures) { WINED3DSAMPLER_TEXTURE_TYPE *sampler_type = reg_maps->sampler_type; unsigned int i; @@ -2353,7 +2140,7 @@ void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseT continue; } - switch (((IWineD3DBaseTextureImpl *)textures[i])->baseTexture.target) + switch (textures[i]->target) { case GL_TEXTURE_RECTANGLE_ARB: case GL_TEXTURE_2D: @@ -2372,9 +2159,107 @@ void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseT break; default: - FIXME("Unrecognized texture type %#x, using 2D.\n", - ((IWineD3DBaseTextureImpl *)textures[i])->baseTexture.target); + FIXME("Unrecognized texture type %#x, using 2D.\n", textures[i]->target); sampler_type[i] = WINED3DSTT_2D; } } } + +HRESULT CDECL wined3d_shader_create_gs(struct wined3d_device *device, const DWORD *byte_code, + const struct wined3d_shader_signature *output_signature, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader) +{ + struct wined3d_shader *object; + HRESULT hr; + + TRACE("device %p, byte_code %p, output_signature %p, parent %p, parent_ops %p, shader %p.\n", + device, byte_code, output_signature, parent, parent_ops, shader); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate shader memory.\n"); + return E_OUTOFMEMORY; + } + + hr = geometryshader_init(object, device, byte_code, output_signature, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize geometry shader, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created geometry shader %p.\n", object); + *shader = object; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_shader_create_ps(struct wined3d_device *device, const DWORD *byte_code, + const struct wined3d_shader_signature *output_signature, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader) +{ + struct wined3d_shader *object; + HRESULT hr; + + TRACE("device %p, byte_code %p, output_signature %p, parent %p, parent_ops %p, shader %p.\n", + device, byte_code, output_signature, parent, parent_ops, shader); + + if (device->ps_selected_mode == SHADER_NONE) + return WINED3DERR_INVALIDCALL; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate shader memory.\n"); + return E_OUTOFMEMORY; + } + + hr = pixelshader_init(object, device, byte_code, output_signature, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize pixel shader, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created pixel shader %p.\n", object); + *shader = object; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_shader_create_vs(struct wined3d_device *device, const DWORD *byte_code, + const struct wined3d_shader_signature *output_signature, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader) +{ + struct wined3d_shader *object; + HRESULT hr; + + TRACE("device %p, byte_code %p, output_signature %p, parent %p, parent_ops %p, shader %p.\n", + device, byte_code, output_signature, parent, parent_ops, shader); + + if (device->vs_selected_mode == SHADER_NONE) + return WINED3DERR_INVALIDCALL; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate shader memory.\n"); + return E_OUTOFMEMORY; + } + + hr = vertexshader_init(object, device, byte_code, output_signature, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize vertex shader, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created vertex shader %p.\n", object); + *shader = object; + + return WINED3D_OK; +} diff --git a/dll/directx/wine/wined3d/shader_sm4.c b/dll/directx/wine/wined3d/shader_sm4.c index a43861498bc..d0b36c6715c 100644 --- a/dll/directx/wine/wined3d/shader_sm4.c +++ b/dll/directx/wine/wined3d/shader_sm4.c @@ -23,11 +23,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); +#define WINED3D_SM4_INSTRUCTION_MODIFIER (1 << 31) + #define WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT 24 #define WINED3D_SM4_INSTRUCTION_LENGTH_MASK (0xf << WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT) #define WINED3D_SM4_OPCODE_MASK 0xff +#define WINED3D_SM4_REGISTER_MODIFIER (1 << 31) + #define WINED3D_SM4_REGISTER_ORDER_SHIFT 20 #define WINED3D_SM4_REGISTER_ORDER_MASK (0x3 << WINED3D_SM4_REGISTER_ORDER_SHIFT) @@ -48,34 +52,44 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); enum wined3d_sm4_opcode { - WINED3D_SM4_OP_ADD = 0x00, - WINED3D_SM4_OP_AND = 0x01, - WINED3D_SM4_OP_BREAK = 0x02, - WINED3D_SM4_OP_BREAKC = 0x03, - WINED3D_SM4_OP_CUT = 0x09, - WINED3D_SM4_OP_DP3 = 0x10, - WINED3D_SM4_OP_DP4 = 0x11, - WINED3D_SM4_OP_EMIT = 0x13, - WINED3D_SM4_OP_ENDIF = 0x15, - WINED3D_SM4_OP_ENDLOOP = 0x16, - WINED3D_SM4_OP_EXP = 0x19, - WINED3D_SM4_OP_FRC = 0x1a, - WINED3D_SM4_OP_IADD = 0x1e, - WINED3D_SM4_OP_IF = 0x1f, - WINED3D_SM4_OP_IGE = 0x21, - WINED3D_SM4_OP_IMUL = 0x26, - WINED3D_SM4_OP_LOG = 0x2f, - WINED3D_SM4_OP_LOOP = 0x30, - WINED3D_SM4_OP_LT = 0x31, - WINED3D_SM4_OP_MAD = 0x32, - WINED3D_SM4_OP_MIN = 0x33, - WINED3D_SM4_OP_MAX = 0x34, - WINED3D_SM4_OP_MOV = 0x36, - WINED3D_SM4_OP_MOVC = 0x37, - WINED3D_SM4_OP_MUL = 0x38, - WINED3D_SM4_OP_RET = 0x3e, - WINED3D_SM4_OP_RSQ = 0x44, - WINED3D_SM4_OP_SINCOS = 0x4d, + WINED3D_SM4_OP_ADD = 0x00, + WINED3D_SM4_OP_AND = 0x01, + WINED3D_SM4_OP_BREAK = 0x02, + WINED3D_SM4_OP_BREAKC = 0x03, + WINED3D_SM4_OP_CUT = 0x09, + WINED3D_SM4_OP_DIV = 0x0e, + WINED3D_SM4_OP_DP3 = 0x10, + WINED3D_SM4_OP_DP4 = 0x11, + WINED3D_SM4_OP_EMIT = 0x13, + WINED3D_SM4_OP_ENDIF = 0x15, + WINED3D_SM4_OP_ENDLOOP = 0x16, + WINED3D_SM4_OP_EXP = 0x19, + WINED3D_SM4_OP_FRC = 0x1a, + WINED3D_SM4_OP_FTOI = 0x1b, + WINED3D_SM4_OP_IADD = 0x1e, + WINED3D_SM4_OP_IF = 0x1f, + WINED3D_SM4_OP_IEQ = 0x20, + WINED3D_SM4_OP_IGE = 0x21, + WINED3D_SM4_OP_IMUL = 0x26, + WINED3D_SM4_OP_ITOF = 0x2b, + WINED3D_SM4_OP_LD = 0x2d, + WINED3D_SM4_OP_LOG = 0x2f, + WINED3D_SM4_OP_LOOP = 0x30, + WINED3D_SM4_OP_LT = 0x31, + WINED3D_SM4_OP_MAD = 0x32, + WINED3D_SM4_OP_MIN = 0x33, + WINED3D_SM4_OP_MAX = 0x34, + WINED3D_SM4_OP_MOV = 0x36, + WINED3D_SM4_OP_MOVC = 0x37, + WINED3D_SM4_OP_MUL = 0x38, + WINED3D_SM4_OP_RET = 0x3e, + WINED3D_SM4_OP_RSQ = 0x44, + WINED3D_SM4_OP_SAMPLE = 0x45, + WINED3D_SM4_OP_SAMPLE_LOD = 0x48, + WINED3D_SM4_OP_SAMPLE_GRAD = 0x49, + WINED3D_SM4_OP_SQRT = 0x4b, + WINED3D_SM4_OP_SINCOS = 0x4d, + WINED3D_SM4_OP_UTOF = 0x56, }; enum wined3d_sm4_register_type @@ -84,6 +98,7 @@ enum wined3d_sm4_register_type WINED3D_SM4_RT_INPUT = 0x1, WINED3D_SM4_RT_OUTPUT = 0x2, WINED3D_SM4_RT_IMMCONST = 0x4, + WINED3D_SM4_RT_SAMPLER = 0x6, WINED3D_SM4_RT_CONSTBUFFER = 0x8, WINED3D_SM4_RT_NULL = 0xd, }; @@ -118,34 +133,44 @@ struct sysval_map static const struct wined3d_sm4_opcode_info opcode_table[] = { - {WINED3D_SM4_OP_ADD, WINED3DSIH_ADD, 1, 2}, - {WINED3D_SM4_OP_AND, WINED3DSIH_AND, 1, 2}, - {WINED3D_SM4_OP_BREAK, WINED3DSIH_BREAK, 0, 0}, - {WINED3D_SM4_OP_BREAKC, WINED3DSIH_BREAKP, 0, 1}, - {WINED3D_SM4_OP_CUT, WINED3DSIH_CUT, 0, 0}, - {WINED3D_SM4_OP_DP3, WINED3DSIH_DP3, 1, 2}, - {WINED3D_SM4_OP_DP4, WINED3DSIH_DP4, 1, 2}, - {WINED3D_SM4_OP_EMIT, WINED3DSIH_EMIT, 0, 0}, - {WINED3D_SM4_OP_ENDIF, WINED3DSIH_ENDIF, 0, 0}, - {WINED3D_SM4_OP_ENDLOOP,WINED3DSIH_ENDLOOP, 0, 0}, - {WINED3D_SM4_OP_EXP, WINED3DSIH_EXP, 1, 1}, - {WINED3D_SM4_OP_FRC, WINED3DSIH_FRC, 1, 1}, - {WINED3D_SM4_OP_IADD, WINED3DSIH_IADD, 1, 2}, - {WINED3D_SM4_OP_IF, WINED3DSIH_IF, 0, 1}, - {WINED3D_SM4_OP_IGE, WINED3DSIH_IGE, 1, 2}, - {WINED3D_SM4_OP_IMUL, WINED3DSIH_IMUL, 2, 2}, - {WINED3D_SM4_OP_LOG, WINED3DSIH_LOG, 1, 1}, - {WINED3D_SM4_OP_LOOP, WINED3DSIH_LOOP, 0, 0}, - {WINED3D_SM4_OP_LT, WINED3DSIH_LT, 1, 2}, - {WINED3D_SM4_OP_MAD, WINED3DSIH_MAD, 1, 3}, - {WINED3D_SM4_OP_MIN, WINED3DSIH_MIN, 1, 2}, - {WINED3D_SM4_OP_MAX, WINED3DSIH_MAX, 1, 2}, - {WINED3D_SM4_OP_MOV, WINED3DSIH_MOV, 1, 1}, - {WINED3D_SM4_OP_MOVC, WINED3DSIH_MOVC, 1, 3}, - {WINED3D_SM4_OP_MUL, WINED3DSIH_MUL, 1, 2}, - {WINED3D_SM4_OP_RET, WINED3DSIH_RET, 0, 0}, - {WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, 1, 1}, - {WINED3D_SM4_OP_SINCOS, WINED3DSIH_SINCOS, 2, 1}, + {WINED3D_SM4_OP_ADD, WINED3DSIH_ADD, 1, 2}, + {WINED3D_SM4_OP_AND, WINED3DSIH_AND, 1, 2}, + {WINED3D_SM4_OP_BREAK, WINED3DSIH_BREAK, 0, 0}, + {WINED3D_SM4_OP_BREAKC, WINED3DSIH_BREAKP, 0, 1}, + {WINED3D_SM4_OP_CUT, WINED3DSIH_CUT, 0, 0}, + {WINED3D_SM4_OP_DIV, WINED3DSIH_DIV, 1, 2}, + {WINED3D_SM4_OP_DP3, WINED3DSIH_DP3, 1, 2}, + {WINED3D_SM4_OP_DP4, WINED3DSIH_DP4, 1, 2}, + {WINED3D_SM4_OP_EMIT, WINED3DSIH_EMIT, 0, 0}, + {WINED3D_SM4_OP_ENDIF, WINED3DSIH_ENDIF, 0, 0}, + {WINED3D_SM4_OP_ENDLOOP, WINED3DSIH_ENDLOOP, 0, 0}, + {WINED3D_SM4_OP_EXP, WINED3DSIH_EXP, 1, 1}, + {WINED3D_SM4_OP_FRC, WINED3DSIH_FRC, 1, 1}, + {WINED3D_SM4_OP_FTOI, WINED3DSIH_FTOI, 1, 1}, + {WINED3D_SM4_OP_IADD, WINED3DSIH_IADD, 1, 2}, + {WINED3D_SM4_OP_IF, WINED3DSIH_IF, 0, 1}, + {WINED3D_SM4_OP_IEQ, WINED3DSIH_IEQ, 1, 2}, + {WINED3D_SM4_OP_IGE, WINED3DSIH_IGE, 1, 2}, + {WINED3D_SM4_OP_IMUL, WINED3DSIH_IMUL, 2, 2}, + {WINED3D_SM4_OP_ITOF, WINED3DSIH_ITOF, 1, 1}, + {WINED3D_SM4_OP_LD, WINED3DSIH_LD, 1, 2}, + {WINED3D_SM4_OP_LOG, WINED3DSIH_LOG, 1, 1}, + {WINED3D_SM4_OP_LOOP, WINED3DSIH_LOOP, 0, 0}, + {WINED3D_SM4_OP_LT, WINED3DSIH_LT, 1, 2}, + {WINED3D_SM4_OP_MAD, WINED3DSIH_MAD, 1, 3}, + {WINED3D_SM4_OP_MIN, WINED3DSIH_MIN, 1, 2}, + {WINED3D_SM4_OP_MAX, WINED3DSIH_MAX, 1, 2}, + {WINED3D_SM4_OP_MOV, WINED3DSIH_MOV, 1, 1}, + {WINED3D_SM4_OP_MOVC, WINED3DSIH_MOVC, 1, 3}, + {WINED3D_SM4_OP_MUL, WINED3DSIH_MUL, 1, 2}, + {WINED3D_SM4_OP_RET, WINED3DSIH_RET, 0, 0}, + {WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, 1, 1}, + {WINED3D_SM4_OP_SAMPLE, WINED3DSIH_SAMPLE, 1, 3}, + {WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD, 1, 4}, + {WINED3D_SM4_OP_SAMPLE_GRAD,WINED3DSIH_SAMPLE_GRAD, 1, 5}, + {WINED3D_SM4_OP_SQRT, WINED3DSIH_SQRT, 1, 1}, + {WINED3D_SM4_OP_SINCOS, WINED3DSIH_SINCOS, 2, 1}, + {WINED3D_SM4_OP_UTOF, WINED3DSIH_UTOF, 1, 1}, }; static const WINED3DSHADER_PARAM_REGISTER_TYPE register_type_table[] = @@ -156,8 +181,8 @@ static const WINED3DSHADER_PARAM_REGISTER_TYPE register_type_table[] = /* UNKNOWN */ 0, /* WINED3D_SM4_RT_IMMCONST */ WINED3DSPR_IMMCONST, /* UNKNOWN */ 0, - /* UNKNOWN */ 0, - /* UNKNOWN */ 0, + /* WINED3D_SM4_RT_SAMPLER */ WINED3DSPR_SAMPLER, + /* WINED3D_SM4_RT_RESOURCE */ WINED3DSPR_RESOURCE, /* WINED3D_SM4_RT_CONSTBUFFER */ WINED3DSPR_CONSTBUFFER, /* UNKNOWN */ 0, /* UNKNOWN */ 0, @@ -315,6 +340,12 @@ static void shader_sm4_read_opcode(void *data, const DWORD **ptr, struct wined3d ins->predicate = 0; ins->dst_count = opcode_info->dst_count; ins->src_count = opcode_info->src_count; + + if (token & WINED3D_SM4_INSTRUCTION_MODIFIER) + { + DWORD modifier = *(*ptr)++; + FIXME("Skipping modifier 0x%08x.\n", modifier); + } } static void shader_sm4_read_src_param(void *data, const DWORD **ptr, struct wined3d_shader_src_param *src_param, @@ -336,6 +367,34 @@ static void shader_sm4_read_src_param(void *data, const DWORD **ptr, struct wine src_param->reg.type = register_type_table[register_type]; } + if (token & WINED3D_SM4_REGISTER_MODIFIER) + { + DWORD modifier = *(*ptr)++; + + /* FIXME: This will probably break down at some point. The SM4 + * modifiers look like flags, while wined3d currently has an enum + * with possible combinations, e.g. WINED3DSPSM_ABSNEG. */ + switch (modifier) + { + case 0x41: + src_param->modifiers = WINED3DSPSM_NEG; + break; + + case 0x81: + src_param->modifiers = WINED3DSPSM_ABS; + break; + + default: + FIXME("Skipping modifier 0x%08x.\n", modifier); + src_param->modifiers = WINED3DSPSM_NONE; + break; + } + } + else + { + src_param->modifiers = WINED3DSPSM_NONE; + } + order = (token & WINED3D_SM4_REGISTER_ORDER_MASK) >> WINED3D_SM4_REGISTER_ORDER_SHIFT; if (order < 1) src_param->reg.idx = ~0U; @@ -376,7 +435,6 @@ static void shader_sm4_read_src_param(void *data, const DWORD **ptr, struct wine src_param->swizzle = (token & WINED3D_SM4_SWIZZLE_MASK) >> WINED3D_SM4_SWIZZLE_SHIFT; } - src_param->modifiers = 0; src_param->reg.rel_addr = NULL; map_register(priv, &src_param->reg); diff --git a/dll/directx/wine/wined3d/state.c b/dll/directx/wine/wined3d/state.c index 319237287af..378e0f96827 100644 --- a/dll/directx/wine/wined3d/state.c +++ b/dll/directx/wine/wined3d/state.c @@ -8,7 +8,7 @@ * Copyright 2005 Oliver Stieber * Copyright 2006 Henri Verbeet * Copyright 2006-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -37,19 +37,19 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_shader); /* GL locking for state handlers is done by the caller. */ -static void state_blendop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context); +static void state_blendop(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context); -static void state_undefined(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_undefined(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { ERR("Undefined state.\n"); } -static void state_nop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_nop(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { TRACE("%s: nop in current pipe config.\n", debug_d3dstate(state)); } -static void state_fillmode(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_fillmode(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { WINED3DFILLMODE Value = stateblock->state.render_states[WINED3DRS_FILLMODE]; @@ -71,7 +71,7 @@ static void state_fillmode(DWORD state, IWineD3DStateBlockImpl *stateblock, stru } } -static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_lighting(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { /* Lighting is not enabled if transformed vertices are drawn * but lighting does not affect the stream sources, so it is not grouped for performance reasons. @@ -94,10 +94,10 @@ static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock, stru } } -static void state_zenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_zenable(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { /* No z test without depth stencil buffers */ - if (!stateblock->device->depth_stencil) + if (!stateblock->device->fb.depth_stencil) { TRACE("No Z buffer - disabling depth test\n"); glDisable(GL_DEPTH_TEST); /* This also disables z writing in gl */ @@ -126,7 +126,7 @@ static void state_zenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struc } } -static void state_cullmode(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_cullmode(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { /* glFrontFace() is set in context.c at context init and on an * offscreen / onscreen rendering switch. */ @@ -154,7 +154,7 @@ static void state_cullmode(DWORD state, IWineD3DStateBlockImpl *stateblock, stru } } -static void state_shademode(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_shademode(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { switch (stateblock->state.render_states[WINED3DRS_SHADEMODE]) { @@ -175,7 +175,7 @@ static void state_shademode(DWORD state, IWineD3DStateBlockImpl *stateblock, str } } -static void state_ditherenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_ditherenable(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_DITHERENABLE]) { @@ -189,7 +189,7 @@ static void state_ditherenable(DWORD state, IWineD3DStateBlockImpl *stateblock, } } -static void state_zwritenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_zwritenable(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { /* TODO: Test if in d3d z writing is enabled even if ZENABLE is off. * If yes, this has to be merged with ZENABLE and ZFUNC. */ @@ -205,7 +205,7 @@ static void state_zwritenable(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void state_zfunc(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_zfunc(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { GLenum depth_func = CompareFunc(stateblock->state.render_states[WINED3DRS_ZFUNC]); @@ -230,7 +230,7 @@ static void state_zfunc(DWORD state, IWineD3DStateBlockImpl *stateblock, struct checkGLcall("glDepthFunc"); } -static void state_ambient(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_ambient(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { float col[4]; D3DCOLORTOGLFLOAT4(stateblock->state.render_states[WINED3DRS_AMBIENT], col); @@ -240,12 +240,54 @@ static void state_ambient(DWORD state, IWineD3DStateBlockImpl *stateblock, struc checkGLcall("glLightModel for MODEL_AMBIENT"); } -static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static GLenum gl_blend_factor(WINED3DBLEND factor, const struct wined3d_format *dst_format) { - IWineD3DSurfaceImpl *target = stateblock->device->render_targets[0]; + switch (factor) + { + case WINED3DBLEND_ZERO: + return GL_ZERO; + case WINED3DBLEND_ONE: + return GL_ONE; + case WINED3DBLEND_SRCCOLOR: + return GL_SRC_COLOR; + case WINED3DBLEND_INVSRCCOLOR: + return GL_ONE_MINUS_SRC_COLOR; + case WINED3DBLEND_SRCALPHA: + return GL_SRC_ALPHA; + case WINED3DBLEND_INVSRCALPHA: + return GL_ONE_MINUS_SRC_ALPHA; + case WINED3DBLEND_DESTCOLOR: + return GL_DST_COLOR; + case WINED3DBLEND_INVDESTCOLOR: + return GL_ONE_MINUS_DST_COLOR; + /* To compensate for the lack of format switching with backbuffer + * offscreen rendering, and with onscreen rendering, we modify the + * alpha test parameters for (INV)DESTALPHA if the render target + * doesn't support alpha blending. A nonexistent alpha channel + * returns 1.0, so WINED3DBLEND_DESTALPHA becomes GL_ONE, and + * WINED3DBLEND_INVDESTALPHA becomes GL_ZERO. */ + case WINED3DBLEND_DESTALPHA: + return dst_format->alpha_mask ? GL_DST_ALPHA : GL_ONE; + case WINED3DBLEND_INVDESTALPHA: + return dst_format->alpha_mask ? GL_ONE_MINUS_DST_ALPHA : GL_ZERO; + case WINED3DBLEND_SRCALPHASAT: + return GL_SRC_ALPHA_SATURATE; + case WINED3DBLEND_BLENDFACTOR: + return GL_CONSTANT_COLOR_EXT; + case WINED3DBLEND_INVBLENDFACTOR: + return GL_ONE_MINUS_CONSTANT_COLOR_EXT; + default: + FIXME("Unhandled blend factor %#x.\n", factor); + return GL_NONE; + } +} + +static void state_blend(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) +{ + struct wined3d_surface *target = stateblock->device->fb.render_targets[0]; const struct wined3d_gl_info *gl_info = context->gl_info; - int srcBlend = GL_ZERO; - int dstBlend = GL_ZERO; + GLenum srcBlend, dstBlend; + WINED3DBLEND d3d_blend; /* According to the red book, GL_LINE_SMOOTH needs GL_BLEND with specific * blending parameters to work. */ @@ -257,7 +299,7 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct * With blending on we could face a big performance penalty. * The d3d9 visual test confirms the behavior. */ if (context->render_offscreen - && !(target->resource.format->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) + && !(target->resource.format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) { glDisable(GL_BLEND); checkGLcall("glDisable GL_BLEND"); @@ -273,86 +315,25 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct return; }; - switch (stateblock->state.render_states[WINED3DRS_DESTBLEND]) + /* WINED3DBLEND_BOTHSRCALPHA and WINED3DBLEND_BOTHINVSRCALPHA are legacy + * source blending values which are still valid up to d3d9. They should + * not occur as dest blend values. */ + d3d_blend = stateblock->state.render_states[WINED3DRS_SRCBLEND]; + if (d3d_blend == WINED3DBLEND_BOTHSRCALPHA) { - case WINED3DBLEND_ZERO : dstBlend = GL_ZERO; break; - case WINED3DBLEND_ONE : dstBlend = GL_ONE; break; - case WINED3DBLEND_SRCCOLOR : dstBlend = GL_SRC_COLOR; break; - case WINED3DBLEND_INVSRCCOLOR : dstBlend = GL_ONE_MINUS_SRC_COLOR; break; - case WINED3DBLEND_SRCALPHA : dstBlend = GL_SRC_ALPHA; break; - case WINED3DBLEND_INVSRCALPHA : dstBlend = GL_ONE_MINUS_SRC_ALPHA; break; - case WINED3DBLEND_DESTCOLOR : dstBlend = GL_DST_COLOR; break; - case WINED3DBLEND_INVDESTCOLOR : dstBlend = GL_ONE_MINUS_DST_COLOR; break; - - /* To compensate the lack of format switching with backbuffer offscreen rendering, - * and with onscreen rendering, we modify the alpha test parameters for (INV)DESTALPHA - * if the render target doesn't support alpha blending. A nonexistent alpha channel - * returns 1.0, so D3DBLEND_DESTALPHA is GL_ONE, and D3DBLEND_INVDESTALPHA is GL_ZERO - */ - case WINED3DBLEND_DESTALPHA : - dstBlend = target->resource.format->alpha_mask ? GL_DST_ALPHA : GL_ONE; - break; - case WINED3DBLEND_INVDESTALPHA : - dstBlend = target->resource.format->alpha_mask ? GL_ONE_MINUS_DST_ALPHA : GL_ZERO; - break; - - case WINED3DBLEND_SRCALPHASAT : - dstBlend = GL_SRC_ALPHA_SATURATE; - WARN("Application uses SRCALPHASAT as dest blend factor, expect problems\n"); - break; - - /* WINED3DBLEND_BOTHSRCALPHA and WINED3DBLEND_BOTHINVSRCALPHA are legacy source blending - * values which are still valid up to d3d9. They should not occur as dest blend values - */ - case WINED3DBLEND_BOTHSRCALPHA : dstBlend = GL_SRC_ALPHA; - srcBlend = GL_SRC_ALPHA; - FIXME("WINED3DRS_DESTBLEND = WINED3DBLEND_BOTHSRCALPHA, what to do?\n"); - break; - - case WINED3DBLEND_BOTHINVSRCALPHA : dstBlend = GL_ONE_MINUS_SRC_ALPHA; - srcBlend = GL_ONE_MINUS_SRC_ALPHA; - FIXME("WINED3DRS_DESTBLEND = WINED3DBLEND_BOTHINVSRCALPHA, what to do?\n"); - break; - - case WINED3DBLEND_BLENDFACTOR : dstBlend = GL_CONSTANT_COLOR; break; - case WINED3DBLEND_INVBLENDFACTOR : dstBlend = GL_ONE_MINUS_CONSTANT_COLOR; break; - default: - FIXME("Unrecognized dst blend value %#x.\n", - stateblock->state.render_states[WINED3DRS_DESTBLEND]); + srcBlend = GL_SRC_ALPHA; + dstBlend = GL_ONE_MINUS_SRC_ALPHA; } - - switch (stateblock->state.render_states[WINED3DRS_SRCBLEND]) + else if (d3d_blend == WINED3DBLEND_BOTHINVSRCALPHA) { - case WINED3DBLEND_ZERO : srcBlend = GL_ZERO; break; - case WINED3DBLEND_ONE : srcBlend = GL_ONE; break; - case WINED3DBLEND_SRCCOLOR : srcBlend = GL_SRC_COLOR; break; - case WINED3DBLEND_INVSRCCOLOR : srcBlend = GL_ONE_MINUS_SRC_COLOR; break; - case WINED3DBLEND_SRCALPHA : srcBlend = GL_SRC_ALPHA; break; - case WINED3DBLEND_INVSRCALPHA : srcBlend = GL_ONE_MINUS_SRC_ALPHA; break; - case WINED3DBLEND_DESTCOLOR : srcBlend = GL_DST_COLOR; break; - case WINED3DBLEND_INVDESTCOLOR : srcBlend = GL_ONE_MINUS_DST_COLOR; break; - case WINED3DBLEND_SRCALPHASAT : srcBlend = GL_SRC_ALPHA_SATURATE; break; - - case WINED3DBLEND_DESTALPHA : - srcBlend = target->resource.format->alpha_mask ? GL_DST_ALPHA : GL_ONE; - break; - case WINED3DBLEND_INVDESTALPHA : - srcBlend = target->resource.format->alpha_mask ? GL_ONE_MINUS_DST_ALPHA : GL_ZERO; - break; - - case WINED3DBLEND_BOTHSRCALPHA : srcBlend = GL_SRC_ALPHA; - dstBlend = GL_ONE_MINUS_SRC_ALPHA; - break; - - case WINED3DBLEND_BOTHINVSRCALPHA : srcBlend = GL_ONE_MINUS_SRC_ALPHA; - dstBlend = GL_SRC_ALPHA; - break; - - case WINED3DBLEND_BLENDFACTOR : srcBlend = GL_CONSTANT_COLOR; break; - case WINED3DBLEND_INVBLENDFACTOR : srcBlend = GL_ONE_MINUS_CONSTANT_COLOR; break; - default: - FIXME("Unrecognized src blend value %#x.\n", - stateblock->state.render_states[WINED3DRS_SRCBLEND]); + srcBlend = GL_ONE_MINUS_SRC_ALPHA; + dstBlend = GL_SRC_ALPHA; + } + else + { + srcBlend = gl_blend_factor(d3d_blend, target->resource.format); + dstBlend = gl_blend_factor(stateblock->state.render_states[WINED3DRS_DESTBLEND], + target->resource.format); } if (stateblock->state.render_states[WINED3DRS_EDGEANTIALIAS] @@ -378,8 +359,7 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct if (stateblock->state.render_states[WINED3DRS_SEPARATEALPHABLENDENABLE]) { - int srcBlendAlpha = GL_ZERO; - int dstBlendAlpha = GL_ZERO; + GLenum srcBlendAlpha, dstBlendAlpha; /* Separate alpha blending requires GL_EXT_blend_function_separate, so make sure it is around */ if (!context->gl_info->supported[EXT_BLEND_FUNC_SEPARATE]) @@ -388,68 +368,25 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct return; } - switch (stateblock->state.render_states[WINED3DRS_DESTBLENDALPHA]) + /* WINED3DBLEND_BOTHSRCALPHA and WINED3DBLEND_BOTHINVSRCALPHA are legacy + * source blending values which are still valid up to d3d9. They should + * not occur as dest blend values. */ + d3d_blend = stateblock->state.render_states[WINED3DRS_SRCBLENDALPHA]; + if (d3d_blend == WINED3DBLEND_BOTHSRCALPHA) { - case WINED3DBLEND_ZERO : dstBlendAlpha = GL_ZERO; break; - case WINED3DBLEND_ONE : dstBlendAlpha = GL_ONE; break; - case WINED3DBLEND_SRCCOLOR : dstBlendAlpha = GL_SRC_COLOR; break; - case WINED3DBLEND_INVSRCCOLOR : dstBlendAlpha = GL_ONE_MINUS_SRC_COLOR; break; - case WINED3DBLEND_SRCALPHA : dstBlendAlpha = GL_SRC_ALPHA; break; - case WINED3DBLEND_INVSRCALPHA : dstBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; break; - case WINED3DBLEND_DESTCOLOR : dstBlendAlpha = GL_DST_COLOR; break; - case WINED3DBLEND_INVDESTCOLOR : dstBlendAlpha = GL_ONE_MINUS_DST_COLOR; break; - case WINED3DBLEND_DESTALPHA : dstBlendAlpha = GL_DST_ALPHA; break; - case WINED3DBLEND_INVDESTALPHA : dstBlendAlpha = GL_DST_ALPHA; break; - case WINED3DBLEND_SRCALPHASAT : - dstBlend = GL_SRC_ALPHA_SATURATE; - WARN("Application uses SRCALPHASAT as dest blend factor, expect problems\n"); - break; - /* WINED3DBLEND_BOTHSRCALPHA and WINED3DBLEND_BOTHINVSRCALPHA are legacy source blending - * values which are still valid up to d3d9. They should not occur as dest blend values - */ - case WINED3DBLEND_BOTHSRCALPHA : - dstBlendAlpha = GL_SRC_ALPHA; - srcBlendAlpha = GL_SRC_ALPHA; - FIXME("WINED3DRS_DESTBLENDALPHA = WINED3DBLEND_BOTHSRCALPHA, what to do?\n"); - break; - case WINED3DBLEND_BOTHINVSRCALPHA : - dstBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; - srcBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; - FIXME("WINED3DRS_DESTBLENDALPHA = WINED3DBLEND_BOTHINVSRCALPHA, what to do?\n"); - break; - case WINED3DBLEND_BLENDFACTOR : dstBlendAlpha = GL_CONSTANT_COLOR; break; - case WINED3DBLEND_INVBLENDFACTOR : dstBlendAlpha = GL_ONE_MINUS_CONSTANT_COLOR; break; - default: - FIXME("Unrecognized dst blend alpha value %#x.\n", - stateblock->state.render_states[WINED3DRS_DESTBLENDALPHA]); + srcBlendAlpha = GL_SRC_ALPHA; + dstBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; } - - switch (stateblock->state.render_states[WINED3DRS_SRCBLENDALPHA]) + else if (d3d_blend == WINED3DBLEND_BOTHINVSRCALPHA) { - case WINED3DBLEND_ZERO : srcBlendAlpha = GL_ZERO; break; - case WINED3DBLEND_ONE : srcBlendAlpha = GL_ONE; break; - case WINED3DBLEND_SRCCOLOR : srcBlendAlpha = GL_SRC_COLOR; break; - case WINED3DBLEND_INVSRCCOLOR : srcBlendAlpha = GL_ONE_MINUS_SRC_COLOR; break; - case WINED3DBLEND_SRCALPHA : srcBlendAlpha = GL_SRC_ALPHA; break; - case WINED3DBLEND_INVSRCALPHA : srcBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; break; - case WINED3DBLEND_DESTCOLOR : srcBlendAlpha = GL_DST_COLOR; break; - case WINED3DBLEND_INVDESTCOLOR : srcBlendAlpha = GL_ONE_MINUS_DST_COLOR; break; - case WINED3DBLEND_SRCALPHASAT : srcBlendAlpha = GL_SRC_ALPHA_SATURATE; break; - case WINED3DBLEND_DESTALPHA : srcBlendAlpha = GL_DST_ALPHA; break; - case WINED3DBLEND_INVDESTALPHA : srcBlendAlpha = GL_DST_ALPHA; break; - case WINED3DBLEND_BOTHSRCALPHA : - srcBlendAlpha = GL_SRC_ALPHA; - dstBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; - break; - case WINED3DBLEND_BOTHINVSRCALPHA : - srcBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; - dstBlendAlpha = GL_SRC_ALPHA; - break; - case WINED3DBLEND_BLENDFACTOR : srcBlendAlpha = GL_CONSTANT_COLOR; break; - case WINED3DBLEND_INVBLENDFACTOR : srcBlendAlpha = GL_ONE_MINUS_CONSTANT_COLOR; break; - default: - FIXME("Unrecognized src blend alpha value %#x.\n", - stateblock->state.render_states[WINED3DRS_SRCBLENDALPHA]); + srcBlendAlpha = GL_ONE_MINUS_SRC_ALPHA; + dstBlendAlpha = GL_SRC_ALPHA; + } + else + { + srcBlendAlpha = gl_blend_factor(d3d_blend, target->resource.format); + dstBlendAlpha = gl_blend_factor(stateblock->state.render_states[WINED3DRS_DESTBLENDALPHA], + target->resource.format); } GL_EXTCALL(glBlendFuncSeparateEXT(srcBlend, dstBlend, srcBlendAlpha, dstBlendAlpha)); @@ -466,12 +403,12 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct stateblock_apply_state(STATE_TEXTURESTAGE(0, WINED3DTSS_ALPHAOP), stateblock, context); } -static void state_blendfactor_w(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_blendfactor_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { WARN("Unsupported in local OpenGL implementation: glBlendColorEXT\n"); } -static void state_blendfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_blendfactor(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; float col[4]; @@ -482,7 +419,7 @@ static void state_blendfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, s checkGLcall("glBlendColor"); } -static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_alpha(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { int glParm = 0; float ref; @@ -498,12 +435,12 @@ static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, struct */ if (stateblock->state.textures[0]) { - IWineD3DBaseTextureImpl *texture = stateblock->state.textures[0]; - GLenum texture_dimensions = texture->baseTexture.target; + struct wined3d_texture *texture = stateblock->state.textures[0]; + GLenum texture_dimensions = texture->target; if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB) { - IWineD3DSurfaceImpl *surf = (IWineD3DSurfaceImpl *)texture->baseTexture.sub_resources[0]; + struct wined3d_surface *surf = surface_from_resource(texture->sub_resources[0]); if (surf->CKeyFlags & WINEDDSD_CKSRCBLT) { @@ -547,7 +484,7 @@ static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, struct } } -static void state_clipping(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_clipping(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; @@ -629,16 +566,36 @@ static void state_clipping(DWORD state_id, IWineD3DStateBlockImpl *stateblock, s } } -static void state_blendop_w(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_blendop_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { WARN("Unsupported in local OpenGL implementation: glBlendEquation\n"); } -static void state_blendop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static GLenum gl_blend_op(WINED3DBLENDOP op) +{ + switch (op) + { + case WINED3DBLENDOP_ADD: + return GL_FUNC_ADD_EXT; + case WINED3DBLENDOP_SUBTRACT: + return GL_FUNC_SUBTRACT_EXT; + case WINED3DBLENDOP_REVSUBTRACT: + return GL_FUNC_REVERSE_SUBTRACT_EXT; + case WINED3DBLENDOP_MIN: + return GL_MIN_EXT; + case WINED3DBLENDOP_MAX: + return GL_MAX_EXT; + default: + FIXME("Unhandled blend op %#x.\n", op); + return GL_NONE; + } +} + +static void state_blendop(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; - int blendEquation = GL_FUNC_ADD; - int blendEquationAlpha = GL_FUNC_ADD; + int blendEquation = GL_FUNC_ADD_EXT; + int blendEquationAlpha = GL_FUNC_ADD_EXT; /* BLENDOPALPHA requires GL_EXT_blend_equation_separate, so make sure it is around */ if (stateblock->state.render_states[WINED3DRS_BLENDOPALPHA] @@ -648,29 +605,8 @@ static void state_blendop(DWORD state, IWineD3DStateBlockImpl *stateblock, struc return; } - switch (stateblock->state.render_states[WINED3DRS_BLENDOP]) - { - case WINED3DBLENDOP_ADD : blendEquation = GL_FUNC_ADD; break; - case WINED3DBLENDOP_SUBTRACT : blendEquation = GL_FUNC_SUBTRACT; break; - case WINED3DBLENDOP_REVSUBTRACT : blendEquation = GL_FUNC_REVERSE_SUBTRACT; break; - case WINED3DBLENDOP_MIN : blendEquation = GL_MIN; break; - case WINED3DBLENDOP_MAX : blendEquation = GL_MAX; break; - default: - FIXME("Unrecognized/Unhandled D3DBLENDOP value %#x.\n", - stateblock->state.render_states[WINED3DRS_BLENDOP]); - } - - switch (stateblock->state.render_states[WINED3DRS_BLENDOPALPHA]) - { - case WINED3DBLENDOP_ADD : blendEquationAlpha = GL_FUNC_ADD; break; - case WINED3DBLENDOP_SUBTRACT : blendEquationAlpha = GL_FUNC_SUBTRACT; break; - case WINED3DBLENDOP_REVSUBTRACT : blendEquationAlpha = GL_FUNC_REVERSE_SUBTRACT; break; - case WINED3DBLENDOP_MIN : blendEquationAlpha = GL_MIN; break; - case WINED3DBLENDOP_MAX : blendEquationAlpha = GL_MAX; break; - default: - FIXME("Unrecognized/Unhandled D3DBLENDOP value %#x\n", - stateblock->state.render_states[WINED3DRS_BLENDOPALPHA]); - } + blendEquation = gl_blend_op(stateblock->state.render_states[WINED3DRS_BLENDOP]); + blendEquationAlpha = gl_blend_op(stateblock->state.render_states[WINED3DRS_BLENDOPALPHA]); if (stateblock->state.render_states[WINED3DRS_SEPARATEALPHABLENDENABLE]) { @@ -684,7 +620,7 @@ static void state_blendop(DWORD state, IWineD3DStateBlockImpl *stateblock, struc } } -static void state_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_specularenable(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; /* Originally this used glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR) @@ -801,7 +737,7 @@ static void state_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock checkGLcall("glMaterialfv(GL_EMISSION)"); } -static void state_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_texfactor(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; unsigned int i; @@ -841,7 +777,7 @@ static void renderstate_stencil_twosided(struct wined3d_context *context, GLint checkGLcall("glStencilOp(...)"); } -static void state_stencil(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_stencil(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; DWORD onesided_enable = FALSE; @@ -858,7 +794,7 @@ static void state_stencil(DWORD state, IWineD3DStateBlockImpl *stateblock, struc GLint stencilPass_ccw = GL_KEEP; /* No stencil test without a stencil buffer. */ - if (!stateblock->device->depth_stencil) + if (!stateblock->device->fb.depth_stencil) { glDisable(GL_STENCIL_TEST); checkGLcall("glDisable GL_STENCIL_TEST"); @@ -939,9 +875,9 @@ static void state_stencil(DWORD state, IWineD3DStateBlockImpl *stateblock, struc } } -static void state_stencilwrite2s(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_stencilwrite2s(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - DWORD mask = stateblock->device->depth_stencil ? stateblock->state.render_states[WINED3DRS_STENCILWRITEMASK] : 0; + DWORD mask = stateblock->device->fb.depth_stencil ? stateblock->state.render_states[WINED3DRS_STENCILWRITEMASK] : 0; const struct wined3d_gl_info *gl_info = context->gl_info; GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK)); @@ -953,15 +889,15 @@ static void state_stencilwrite2s(DWORD state, IWineD3DStateBlockImpl *stateblock glStencilMask(mask); } -static void state_stencilwrite(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_stencilwrite(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - DWORD mask = stateblock->device->depth_stencil ? stateblock->state.render_states[WINED3DRS_STENCILWRITEMASK] : 0; + DWORD mask = stateblock->device->fb.depth_stencil ? stateblock->state.render_states[WINED3DRS_STENCILWRITEMASK] : 0; glStencilMask(mask); checkGLcall("glStencilMask"); } -static void state_fog_vertexpart(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_fog_vertexpart(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context); @@ -1001,7 +937,7 @@ static void state_fog_vertexpart(DWORD state, IWineD3DStateBlockImpl *stateblock } } -void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +void state_fogstartend(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { float fogstart, fogend; union { @@ -1050,7 +986,7 @@ void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct w TRACE("Fog End == %f\n", fogend); } -void state_fog_fragpart(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +void state_fog_fragpart(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; enum fogsource new_source; @@ -1202,13 +1138,13 @@ void state_fog_fragpart(DWORD state_id, IWineD3DStateBlockImpl *stateblock, stru } } -static void state_rangefog_w(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_rangefog_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_RANGEFOGENABLE]) WARN("Range fog enabled, but not supported by this opengl implementation\n"); } -static void state_rangefog(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_rangefog(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_RANGEFOGENABLE]) { @@ -1220,7 +1156,7 @@ static void state_rangefog(DWORD state, IWineD3DStateBlockImpl *stateblock, stru } } -void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +void state_fogcolor(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { float col[4]; D3DCOLORTOGLFLOAT4(stateblock->state.render_states[WINED3DRS_FOGCOLOR], col); @@ -1228,7 +1164,7 @@ void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wine checkGLcall("glFog GL_FOG_COLOR"); } -void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +void state_fogdensity(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { union { DWORD d; @@ -1239,10 +1175,10 @@ void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wi checkGLcall("glFogf(GL_FOG_DENSITY, (float) Value)"); } -static void state_colormat(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_colormat(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; GLenum Parm = 0; /* Depends on the decoded vertex declaration to read the existence of diffuse data. @@ -1363,7 +1299,7 @@ static void state_colormat(DWORD state_id, IWineD3DStateBlockImpl *stateblock, s context->tracking_parm = Parm; } -static void state_linepattern(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_linepattern(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { union { DWORD d; @@ -1384,37 +1320,7 @@ static void state_linepattern(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void state_zbias(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) -{ - union { - DWORD d; - float f; - } tmpvalue; - - if (stateblock->state.render_states[WINED3DRS_ZBIAS]) - { - tmpvalue.d = stateblock->state.render_states[WINED3DRS_ZBIAS]; - TRACE("ZBias value %f\n", tmpvalue.f); - glPolygonOffset(0, -tmpvalue.f); - checkGLcall("glPolygonOffset(0, -Value)"); - glEnable(GL_POLYGON_OFFSET_FILL); - checkGLcall("glEnable(GL_POLYGON_OFFSET_FILL);"); - glEnable(GL_POLYGON_OFFSET_LINE); - checkGLcall("glEnable(GL_POLYGON_OFFSET_LINE);"); - glEnable(GL_POLYGON_OFFSET_POINT); - checkGLcall("glEnable(GL_POLYGON_OFFSET_POINT);"); - } else { - glDisable(GL_POLYGON_OFFSET_FILL); - checkGLcall("glDisable(GL_POLYGON_OFFSET_FILL);"); - glDisable(GL_POLYGON_OFFSET_LINE); - checkGLcall("glDisable(GL_POLYGON_OFFSET_LINE);"); - glDisable(GL_POLYGON_OFFSET_POINT); - checkGLcall("glDisable(GL_POLYGON_OFFSET_POINT);"); - } -} - - -static void state_normalize(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_normalize(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if(isStateDirty(context, STATE_VDECL)) { return; @@ -1434,7 +1340,7 @@ static void state_normalize(DWORD state, IWineD3DStateBlockImpl *stateblock, str } } -static void state_psizemin_w(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_psizemin_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { union { DWORD d; @@ -1454,7 +1360,7 @@ static void state_psizemin_w(DWORD state, IWineD3DStateBlockImpl *stateblock, st } -static void state_psizemin_ext(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_psizemin_ext(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; union @@ -1477,7 +1383,7 @@ static void state_psizemin_ext(DWORD state, IWineD3DStateBlockImpl *stateblock, checkGLcall("glPointParameterfEXT(...)"); } -static void state_psizemin_arb(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_psizemin_arb(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; union @@ -1500,7 +1406,7 @@ static void state_psizemin_arb(DWORD state, IWineD3DStateBlockImpl *stateblock, checkGLcall("glPointParameterfARB(...)"); } -static void state_pscale(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_pscale(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; /* TODO: Group this with the viewport */ @@ -1579,12 +1485,12 @@ static void state_pscale(DWORD state, IWineD3DStateBlockImpl *stateblock, struct checkGLcall("glPointSize(...);"); } -static void state_debug_monitor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_debug_monitor(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { WARN("token: %#x\n", stateblock->state.render_states[WINED3DRS_DEBUGMONITORTOKEN]); } -static void state_colorwrite(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_colorwrite(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD mask0 = stateblock->state.render_states[WINED3DRS_COLORWRITEENABLE]; DWORD mask1 = stateblock->state.render_states[WINED3DRS_COLORWRITEENABLE1]; @@ -1620,27 +1526,27 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW mask & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE)); } -static void state_colorwrite0(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_colorwrite0(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { set_color_mask(context->gl_info, 0, stateblock->state.render_states[WINED3DRS_COLORWRITEENABLE]); } -static void state_colorwrite1(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_colorwrite1(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { set_color_mask(context->gl_info, 1, stateblock->state.render_states[WINED3DRS_COLORWRITEENABLE1]); } -static void state_colorwrite2(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_colorwrite2(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { set_color_mask(context->gl_info, 2, stateblock->state.render_states[WINED3DRS_COLORWRITEENABLE2]); } -static void state_colorwrite3(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_colorwrite3(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { set_color_mask(context->gl_info, 3, stateblock->state.render_states[WINED3DRS_COLORWRITEENABLE3]); } -static void state_localviewer(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_localviewer(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_LOCALVIEWER]) { @@ -1652,7 +1558,7 @@ static void state_localviewer(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void state_lastpixel(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_lastpixel(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_LASTPIXEL]) { @@ -1668,7 +1574,7 @@ static void state_lastpixel(DWORD state, IWineD3DStateBlockImpl *stateblock, str } } -static void state_pointsprite_w(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_pointsprite_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { static BOOL warned; @@ -1681,7 +1587,7 @@ static void state_pointsprite_w(DWORD state, IWineD3DStateBlockImpl *stateblock, } } -static void state_pointsprite(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_pointsprite(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; @@ -1707,7 +1613,7 @@ static void state_pointsprite(DWORD state_id, IWineD3DStateBlockImpl *stateblock } } -static void state_wrap(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_wrap(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { /** http://www.cosc.brocku.ca/Offerings/3P98/course/lectures/texture/ @@ -1738,13 +1644,13 @@ static void state_wrap(DWORD state, IWineD3DStateBlockImpl *stateblock, struct w } } -static void state_msaa_w(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_msaa_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_MULTISAMPLEANTIALIAS]) WARN("Multisample antialiasing not supported by gl\n"); } -static void state_msaa(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_msaa(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_MULTISAMPLEANTIALIAS]) { @@ -1756,7 +1662,7 @@ static void state_msaa(DWORD state, IWineD3DStateBlockImpl *stateblock, struct w } } -static void state_scissor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_scissor(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_SCISSORTESTENABLE]) { @@ -1774,14 +1680,17 @@ static void state_scissor(DWORD state, IWineD3DStateBlockImpl *stateblock, struc * convert from D3D to GL we need to divide the D3D depth bias by that value. * There's no practical way to retrieve that value from a given GL * implementation, but the D3D application has essentially the same problem, - * which makes a guess of 1e-6f seem reasonable here. Note that - * SLOPESCALEDEPTHBIAS is a scaling factor for the depth slope, and doesn't - * need to be scaled. */ -static void state_depthbias(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) + * which makes a guess of the depth buffer format's highest possible value a + * reasonable guess. Note that SLOPESCALEDEPTHBIAS is a scaling factor for the + * depth slope, and doesn't need to be scaled. */ +static void state_depthbias(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_SLOPESCALEDEPTHBIAS] || stateblock->state.render_states[WINED3DRS_DEPTHBIAS]) { + struct wined3d_surface *depth = stateblock->device->fb.depth_stencil; + float scale; + union { DWORD d; @@ -1794,7 +1703,21 @@ static void state_depthbias(DWORD state, IWineD3DStateBlockImpl *stateblock, str glEnable(GL_POLYGON_OFFSET_FILL); checkGLcall("glEnable(GL_POLYGON_OFFSET_FILL)"); - glPolygonOffset(scale_bias.f, const_bias.f * 1e6f); + if (depth) + { + const struct wined3d_format *fmt = depth->resource.format; + scale = powf(2, fmt->depth_size) - 1; + TRACE("Depth format %s, using depthbias scale of %f\n", + debug_d3dformat(fmt->id), scale); + } + else + { + /* The context manager will reapply this state on a depth stencil change */ + TRACE("No depth stencil, using depthbias scale of 0.0\n"); + scale = 0; + } + + glPolygonOffset(scale_bias.f, const_bias.f * scale); checkGLcall("glPolygonOffset(...)"); } else { glDisable(GL_POLYGON_OFFSET_FILL); @@ -1802,13 +1725,13 @@ static void state_depthbias(DWORD state, IWineD3DStateBlockImpl *stateblock, str } } -static void state_zvisible(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_zvisible(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_ZVISIBLE]) FIXME("WINED3DRS_ZVISIBLE not implemented.\n"); } -static void state_perspective(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_perspective(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_TEXTUREPERSPECTIVE]) { @@ -1820,33 +1743,33 @@ static void state_perspective(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void state_stippledalpha(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_stippledalpha(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_STIPPLEDALPHA]) FIXME(" Stippled Alpha not supported yet.\n"); } -static void state_antialias(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_antialias(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_ANTIALIAS]) FIXME("Antialias not supported yet.\n"); } -static void state_multisampmask(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_multisampmask(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_MULTISAMPLEMASK] != 0xffffffff) FIXME("WINED3DRS_MULTISAMPLEMASK %#x not yet implemented.\n", stateblock->state.render_states[WINED3DRS_MULTISAMPLEMASK]); } -static void state_patchedgestyle(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_patchedgestyle(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_PATCHEDGESTYLE] != WINED3DPATCHEDGE_DISCRETE) FIXME("WINED3DRS_PATCHEDGESTYLE %#x not yet implemented.\n", stateblock->state.render_states[WINED3DRS_PATCHEDGESTYLE]); } -static void state_patchsegments(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_patchsegments(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { union { DWORD d; @@ -1866,28 +1789,28 @@ static void state_patchsegments(DWORD state, IWineD3DStateBlockImpl *stateblock, } } -static void state_positiondegree(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_positiondegree(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_POSITIONDEGREE] != WINED3DDEGREE_CUBIC) FIXME("WINED3DRS_POSITIONDEGREE %#x not yet implemented.\n", stateblock->state.render_states[WINED3DRS_POSITIONDEGREE]); } -static void state_normaldegree(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_normaldegree(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_NORMALDEGREE] != WINED3DDEGREE_LINEAR) FIXME("WINED3DRS_NORMALDEGREE %#x not yet implemented.\n", stateblock->state.render_states[WINED3DRS_NORMALDEGREE]); } -static void state_tessellation(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_tessellation(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_ENABLEADAPTIVETESSELLATION]) FIXME("WINED3DRS_ENABLEADAPTIVETESSELLATION %#x not yet implemented.\n", stateblock->state.render_states[WINED3DRS_ENABLEADAPTIVETESSELLATION]); } -static void state_nvdb(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_nvdb(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { union { DWORD d; @@ -1923,91 +1846,91 @@ static void state_nvdb(DWORD state, IWineD3DStateBlockImpl *stateblock, struct w state_tessellation(state, stateblock, context); } -static void state_wrapu(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_wrapu(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_WRAPU]) FIXME("Render state WINED3DRS_WRAPU not implemented yet.\n"); } -static void state_wrapv(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_wrapv(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_WRAPV]) FIXME("Render state WINED3DRS_WRAPV not implemented yet.\n"); } -static void state_monoenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_monoenable(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_MONOENABLE]) FIXME("Render state WINED3DRS_MONOENABLE not implemented yet.\n"); } -static void state_rop2(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_rop2(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_ROP2]) FIXME("Render state WINED3DRS_ROP2 not implemented yet.\n"); } -static void state_planemask(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_planemask(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_PLANEMASK]) FIXME("Render state WINED3DRS_PLANEMASK not implemented yet.\n"); } -static void state_subpixel(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_subpixel(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_SUBPIXEL]) FIXME("Render state WINED3DRS_SUBPIXEL not implemented yet.\n"); } -static void state_subpixelx(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_subpixelx(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_SUBPIXELX]) FIXME("Render state WINED3DRS_SUBPIXELX not implemented yet.\n"); } -static void state_stippleenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_stippleenable(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_STIPPLEENABLE]) FIXME("Render state WINED3DRS_STIPPLEENABLE not implemented yet.\n"); } -static void state_mipmaplodbias(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_mipmaplodbias(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_MIPMAPLODBIAS]) FIXME("Render state WINED3DRS_MIPMAPLODBIAS not implemented yet.\n"); } -static void state_anisotropy(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_anisotropy(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_ANISOTROPY]) FIXME("Render state WINED3DRS_ANISOTROPY not implemented yet.\n"); } -static void state_flushbatch(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_flushbatch(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_FLUSHBATCH]) FIXME("Render state WINED3DRS_FLUSHBATCH not implemented yet.\n"); } -static void state_translucentsi(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_translucentsi(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_TRANSLUCENTSORTINDEPENDENT]) FIXME("Render state WINED3DRS_TRANSLUCENTSORTINDEPENDENT not implemented yet.\n"); } -static void state_extents(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_extents(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_EXTENTS]) FIXME("Render state WINED3DRS_EXTENTS not implemented yet.\n"); } -static void state_ckeyblend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_ckeyblend(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_COLORKEYBLENDENABLE]) FIXME("Render state WINED3DRS_COLORKEYBLENDENABLE not implemented yet.\n"); } -static void state_swvp(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_swvp(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (stateblock->state.render_states[WINED3DRS_SOFTWAREVERTEXPROCESSING]) FIXME("Software vertex processing not implemented.\n"); @@ -3100,7 +3023,7 @@ static void set_tex_op(const struct wined3d_gl_info *gl_info, const struct wined } -static void tex_colorop(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void tex_colorop(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); BOOL tex_used = stateblock->device->fixed_function_usage_map & (1 << stage); @@ -3163,7 +3086,7 @@ static void tex_colorop(DWORD state_id, IWineD3DStateBlockImpl *stateblock, stru state->texture_states[stage][WINED3DTSS_COLORARG0]); } -void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +void tex_alphaop(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); BOOL tex_used = stateblock->device->fixed_function_usage_map & (1 << stage); @@ -3191,12 +3114,12 @@ void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d if (stateblock->state.render_states[WINED3DRS_COLORKEYENABLE] && !stage && stateblock->state.textures[0]) { - IWineD3DBaseTextureImpl *texture = stateblock->state.textures[0]; - GLenum texture_dimensions = texture->baseTexture.target; + struct wined3d_texture *texture = stateblock->state.textures[0]; + GLenum texture_dimensions = texture->target; if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB) { - IWineD3DSurfaceImpl *surf = (IWineD3DSurfaceImpl *)texture->baseTexture.sub_resources[0]; + struct wined3d_surface *surf = surface_from_resource(texture->sub_resources[0]); if (surf->CKeyFlags & WINEDDSD_CKSRCBLT && !surf->resource.format->alpha_mask) { @@ -3264,7 +3187,7 @@ void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d } } -static void transform_texture(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void transform_texture(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD texUnit = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); DWORD mapped_stage = stateblock->device->texUnitMap[texUnit]; @@ -3307,7 +3230,7 @@ static void transform_texture(DWORD state_id, IWineD3DStateBlockImpl *stateblock if (!use_ps(state)) { TRACE("Non power two matrix multiply fixup\n"); - glMultMatrixf(state->textures[texUnit]->baseTexture.pow2Matrix); + glMultMatrixf(state->textures[texUnit]->pow2_matrix); } } } @@ -3323,7 +3246,7 @@ static void unloadTexCoords(const struct wined3d_gl_info *gl_info) } } -static void loadTexCoords(const struct wined3d_gl_info *gl_info, IWineD3DStateBlockImpl *stateblock, +static void loadTexCoords(const struct wined3d_gl_info *gl_info, struct wined3d_stateblock *stateblock, const struct wined3d_stream_info *si, GLuint *curVBO) { unsigned int mapped_stage = 0; @@ -3374,7 +3297,7 @@ static void loadTexCoords(const struct wined3d_gl_info *gl_info, IWineD3DStateBl checkGLcall("loadTexCoords"); } -static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void tex_coordindex(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); DWORD mapped_stage = stateblock->device->texUnitMap[stage]; @@ -3550,10 +3473,10 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, stru } } -static void shaderconstant(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void shaderconstant(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; /* Vertex and pixel shader states will call a shader upload, don't do anything as long one of them * has an update pending @@ -3566,12 +3489,12 @@ static void shaderconstant(DWORD state_id, IWineD3DStateBlockImpl *stateblock, s device->shader_backend->shader_load_constants(context, use_ps(state), use_vs(state)); } -static void tex_bumpenvlscale(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void tex_bumpenvlscale(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); - IWineD3DPixelShaderImpl *ps = stateblock->state.pixel_shader; + const struct wined3d_shader *ps = stateblock->state.pixel_shader; - if (ps && stage && (ps->baseShader.reg_maps.luminanceparams & (1 << stage))) + if (ps && stage && (ps->reg_maps.luminanceparams & (1 << stage))) { /* The pixel shader has to know the luminance scale. Do a constants update if it * isn't scheduled anyway @@ -3583,23 +3506,24 @@ static void tex_bumpenvlscale(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void sampler_texmatrix(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const DWORD sampler = state - STATE_SAMPLER(0); - IWineD3DBaseTextureImpl *texture = stateblock->state.textures[sampler]; + struct wined3d_texture *texture = stateblock->state.textures[sampler]; TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context); if(!texture) return; /* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates - * basetexture_apply_state_changes() multiplies the set matrix with a fixup matrix. Before the + * wined3d_texture_apply_state_changes() multiplies the set matrix with a fixup matrix. Before the * scaling is reapplied or removed, the texture matrix has to be reapplied * * The mapped stage is already active because the sampler() function below, which is part of the * misc pipeline */ - if(sampler < MAX_TEXTURES) { - const BOOL texIsPow2 = !texture->baseTexture.pow2Matrix_identity; + if (sampler < MAX_TEXTURES) + { + const BOOL texIsPow2 = !(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT); if (texIsPow2 || (context->lastWasPow2Texture & (1 << sampler))) { @@ -3611,10 +3535,11 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void sampler(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void sampler(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD sampler = state_id - STATE_SAMPLER(0); - DWORD mapped_stage = stateblock->device->texUnitMap[sampler]; + struct wined3d_device *device = stateblock->device; + DWORD mapped_stage = device->texUnitMap[sampler]; const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; union { @@ -3642,13 +3567,11 @@ static void sampler(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct w if (state->textures[sampler]) { - IWineD3DBaseTexture *texture = (IWineD3DBaseTexture *)state->textures[sampler]; + struct wined3d_texture *texture = state->textures[sampler]; BOOL srgb = state->sampler_states[sampler][WINED3DSAMP_SRGBTEXTURE]; - IWineD3DBaseTexture_BindTexture(texture, srgb); - basetexture_apply_state_changes(texture, - state->texture_states[sampler], - state->sampler_states[sampler], gl_info); + texture->texture_ops->texture_bind(texture, gl_info, srgb); + wined3d_texture_apply_state_changes(texture, state->sampler_states[sampler], gl_info); if (gl_info->supported[EXT_TEXTURE_LOD_BIAS]) { @@ -3656,7 +3579,7 @@ static void sampler(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct w glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, tmpvalue.f); - checkGLcall("glTexEnvi(GL_TEXTURE_LOD_BIAS_EXT, ...)"); + checkGLcall("glTexEnvf(GL_TEXTURE_LOD_BIAS_EXT, ...)"); } if (!use_ps(state) && sampler < state->lowest_disabled_stage) @@ -3671,12 +3594,8 @@ static void sampler(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct w } /* Trigger shader constant reloading (for NP2 texcoord fixup) */ - if (!state->textures[sampler]->baseTexture.pow2Matrix_identity) - { - IWineD3DDeviceImpl *d3ddevice = stateblock->device; - d3ddevice->shader_backend->shader_load_np2fixup_constants( - (IWineD3DDevice*)d3ddevice, use_ps(state), use_vs(state)); - } + if (!(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT)) + device->shader_backend->shader_load_np2fixup_constants(device->shader_priv, gl_info, state); } else if (mapped_stage < gl_info->limits.textures) { @@ -3691,15 +3610,15 @@ static void sampler(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct w state_alpha(WINED3DRS_COLORKEYENABLE, stateblock, context); } } /* Otherwise tex_colorop disables the stage */ - glBindTexture(GL_TEXTURE_2D, stateblock->device->dummyTextureName[sampler]); - checkGLcall("glBindTexture(GL_TEXTURE_2D, stateblock->device->dummyTextureName[sampler])"); + glBindTexture(GL_TEXTURE_2D, device->dummyTextureName[sampler]); + checkGLcall("glBindTexture(GL_TEXTURE_2D, device->dummyTextureName[sampler])"); } } -void apply_pixelshader(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +void apply_pixelshader(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; BOOL use_vshader = use_vs(state); BOOL use_pshader = use_ps(state); unsigned int i; @@ -3741,12 +3660,12 @@ void apply_pixelshader(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struc } } -static void shader_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void shader_bumpenvmat(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); - IWineD3DPixelShaderImpl *ps = stateblock->state.pixel_shader; + const struct wined3d_shader *ps = stateblock->state.pixel_shader; - if (ps && stage && (ps->baseShader.reg_maps.bumpmat & (1 << stage))) + if (ps && stage && (ps->reg_maps.bumpmat & (1 << stage))) { /* The pixel shader has to know the bump env matrix. Do a constants update if it isn't scheduled * anyway @@ -3758,7 +3677,7 @@ static void shader_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void transform_world(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void transform_world(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { /* This function is called by transform_view below if the view matrix was changed too * @@ -3790,7 +3709,7 @@ static void transform_world(DWORD state, IWineD3DStateBlockImpl *stateblock, str } } -static void clipplane(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void clipplane(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; UINT index = state_id - STATE_CLIPPLANE(0); @@ -3800,24 +3719,17 @@ static void clipplane(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct return; } + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + /* Clip Plane settings are affected by the model view in OpenGL, the View transform in direct3d */ if (!use_vs(state)) - { - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); glLoadMatrixf(&state->transforms[WINED3DTS_VIEW].u.m[0][0]); - } else - { /* with vertex shaders, clip planes are not transformed in direct3d, * in OpenGL they are still transformed by the model view. - * Use this to swap the y coordinate if necessary */ - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); glLoadIdentity(); - if (context->render_offscreen) glScalef(1.0f, -1.0f, 1.0f); - } TRACE("Clipplane [%.8e, %.8e, %.8e, %.8e]\n", state->clip_planes[index][0], @@ -3830,7 +3742,7 @@ static void clipplane(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct glPopMatrix(); } -static void transform_worldex(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void transform_worldex(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { UINT matrix = state - STATE_TRANSFORM(WINED3DTS_WORLDMATRIX(0)); GLenum glMat; @@ -3874,7 +3786,7 @@ static void transform_worldex(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void state_vertexblend_w(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_vertexblend_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { WINED3DVERTEXBLENDFLAGS f = stateblock->state.render_states[WINED3DRS_VERTEXBLEND]; static unsigned int once; @@ -3885,7 +3797,7 @@ static void state_vertexblend_w(DWORD state, IWineD3DStateBlockImpl *stateblock, else WARN("Vertex blend flags %#x not supported.\n", f); } -static void state_vertexblend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void state_vertexblend(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { WINED3DVERTEXBLENDFLAGS val = stateblock->state.render_states[WINED3DRS_VERTEXBLEND]; const struct wined3d_gl_info *gl_info = context->gl_info; @@ -3929,7 +3841,7 @@ static void state_vertexblend(DWORD state, IWineD3DStateBlockImpl *stateblock, s } } -static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void transform_view(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_light_info *light = NULL; @@ -3947,7 +3859,7 @@ static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, stru checkGLcall("glLoadMatrixf(...)"); /* Reset lights. TODO: Call light apply func */ - for (k = 0; k < stateblock->device->maxConcurrentLights; ++k) + for (k = 0; k < gl_info->limits.lights; ++k) { light = stateblock->state.lights[k]; if(!light) continue; @@ -3991,7 +3903,7 @@ static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, stru } } -static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void transform_projection(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { glMatrixMode(GL_PROJECTION); checkGLcall("glMatrixMode(GL_PROJECTION)"); @@ -4137,14 +4049,13 @@ static inline void unloadNumberedArrays(struct wined3d_context *context) } } -static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock, +static void loadNumberedArrays(struct wined3d_stateblock *stateblock, const struct wined3d_stream_info *stream_info, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; GLuint curVBO = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0U : 0; int i; struct wined3d_buffer *vb; - DWORD_PTR shift_index; /* Default to no instancing */ stateblock->device->instancedDraw = FALSE; @@ -4184,31 +4095,12 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock, * curVBO will be 0. If there is a vertex buffer but no vbo we * won't be load converted attributes anyway. */ vb = stream->buffer; - if (curVBO && vb->conversion_shift) - { - TRACE("Loading attribute from shifted buffer\n"); - TRACE("Attrib %d has original stride %d, new stride %d\n", - i, stream_info->elements[i].stride, vb->conversion_stride); - TRACE("Original offset %p, additional offset 0x%08x\n", - stream_info->elements[i].data, vb->conversion_shift[(DWORD_PTR)stream_info->elements[i].data]); - TRACE("Opengl type %#x\n", stream_info->elements[i].format->gl_vtx_type); - shift_index = ((DWORD_PTR)stream_info->elements[i].data + stream->offset); - shift_index = shift_index % stream_info->elements[i].stride; - GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format->gl_vtx_format, - stream_info->elements[i].format->gl_vtx_type, - stream_info->elements[i].format->gl_normalized, - vb->conversion_stride, stream_info->elements[i].data + vb->conversion_shift[shift_index] - + stateblock->state.load_base_vertex_index * stream_info->elements[i].stride - + stream->offset)); - - } else { - GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format->gl_vtx_format, - stream_info->elements[i].format->gl_vtx_type, - stream_info->elements[i].format->gl_normalized, - stream_info->elements[i].stride, stream_info->elements[i].data - + stateblock->state.load_base_vertex_index * stream_info->elements[i].stride - + stream->offset)); - } + GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format->gl_vtx_format, + stream_info->elements[i].format->gl_vtx_type, + stream_info->elements[i].format->gl_normalized, + stream_info->elements[i].stride, stream_info->elements[i].data + + stateblock->state.load_base_vertex_index * stream_info->elements[i].stride + + stream->offset)); if (!(context->numbered_array_mask & (1 << i))) { @@ -4320,7 +4212,7 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock, } /* Used from 2 different functions, and too big to justify making it inlined */ -static void loadVertexData(const struct wined3d_context *context, IWineD3DStateBlockImpl *stateblock, +static void loadVertexData(const struct wined3d_context *context, struct wined3d_stateblock *stateblock, const struct wined3d_stream_info *si) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -4389,7 +4281,7 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB { static const GLbyte one = 1; GL_EXTCALL(glWeightbvARB(1, &one)); - checkGLcall("glWeightivARB(gl_info->max_blends, weights)"); + checkGLcall("glWeightbvARB(gl_info->max_blends, weights)"); } } @@ -4583,9 +4475,9 @@ static void loadVertexData(const struct wined3d_context *context, IWineD3DStateB loadTexCoords(gl_info, stateblock, si, &curVBO); } -static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void streamsrc(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; BOOL load_numbered = use_vs(&stateblock->state) && !device->useDrawStridedSlow; BOOL load_named = !use_vs(&stateblock->state) && !device->useDrawStridedSlow; @@ -4615,27 +4507,21 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wi } } -static void vertexdeclaration(DWORD state_id, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void vertexdeclaration(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_state *state = &stateblock->state; + struct wined3d_device *device = stateblock->device; BOOL useVertexShaderFunction = use_vs(state); BOOL usePixelShaderFunction = use_ps(state); BOOL updateFog = FALSE; - IWineD3DDeviceImpl *device = stateblock->device; BOOL transformed; BOOL wasrhw = context->last_was_rhw; unsigned int i; transformed = device->strided_streams.position_transformed; - if(transformed != context->last_was_rhw && !useVertexShaderFunction) { + if (transformed != context->last_was_rhw && !useVertexShaderFunction) updateFog = TRUE; - } - - /* Reapply lighting if it is not scheduled for reapplication already */ - if(!isStateDirty(context, STATE_RENDER(WINED3DRS_LIGHTING))) { - state_lighting(STATE_RENDER(WINED3DRS_LIGHTING), stateblock, context); - } if (transformed) { context->last_was_rhw = TRUE; @@ -4645,20 +4531,6 @@ static void vertexdeclaration(DWORD state_id, IWineD3DStateBlockImpl *stateblock context->last_was_rhw = FALSE; /* This turns off the Z scale trick to 'disable' viewport frustum clipping in rhw mode*/ device->untransformed = TRUE; - - /* Todo for sw shaders: Vertex Shader output is already transformed, so set up identity matrices - * Not needed as long as only hw shaders are supported - */ - - /* This sets the shader output position correction constants. - * TODO: Move to the viewport state - */ - if (useVertexShaderFunction) - { - GLfloat yoffset = -(63.0f / 64.0f) / stateblock->state.viewport.Height; - device->posFixup[1] = context->render_offscreen ? -1.0f : 1.0f; - device->posFixup[3] = device->posFixup[1] * yoffset; - } } /* Don't have to apply the matrices when vertex shaders are used. When vshaders are turned @@ -4693,6 +4565,9 @@ static void vertexdeclaration(DWORD state_id, IWineD3DStateBlockImpl *stateblock if(!isStateDirty(context, STATE_RENDER(WINED3DRS_COLORVERTEX))) { state_colormat(STATE_RENDER(WINED3DRS_COLORVERTEX), stateblock, context); } + if(!isStateDirty(context, STATE_RENDER(WINED3DRS_LIGHTING))) { + state_lighting(STATE_RENDER(WINED3DRS_LIGHTING), stateblock, context); + } if(context->last_was_vshader) { updateFog = TRUE; @@ -4777,14 +4652,16 @@ static void vertexdeclaration(DWORD state_id, IWineD3DStateBlockImpl *stateblock } } -static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void viewport_miscpart(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - IWineD3DSurfaceImpl *target = stateblock->device->render_targets[0]; + struct wined3d_surface *target = stateblock->device->fb.render_targets[0]; UINT width, height; WINED3DVIEWPORT vp = stateblock->state.viewport; - if(vp.Width > target->currentDesc.Width) vp.Width = target->currentDesc.Width; - if(vp.Height > target->currentDesc.Height) vp.Height = target->currentDesc.Height; + if (vp.Width > target->resource.width) + vp.Width = target->resource.width; + if (vp.Height > target->resource.height) + vp.Height = target->resource.height; glDepthRange(vp.MinZ, vp.MaxZ); checkGLcall("glDepthRange"); @@ -4804,24 +4681,20 @@ static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl *stateblock, s checkGLcall("glViewport"); } -static void viewport_vertexpart(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void viewport_vertexpart(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - GLfloat yoffset = -(63.0f / 64.0f) / stateblock->state.viewport.Height; - - stateblock->device->posFixup[2] = (63.0f / 64.0f) / stateblock->state.viewport.Width; - stateblock->device->posFixup[3] = stateblock->device->posFixup[1] * yoffset; - if(!isStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION))) { transform_projection(STATE_TRANSFORM(WINED3DTS_PROJECTION), stateblock, context); } if(!isStateDirty(context, STATE_RENDER(WINED3DRS_POINTSCALEENABLE))) { state_pscale(STATE_RENDER(WINED3DRS_POINTSCALEENABLE), stateblock, context); } + /* Update the position fixup. */ if (!isStateDirty(context, STATE_VERTEXSHADERCONSTANT)) shaderconstant(STATE_VERTEXSHADERCONSTANT, stateblock, context); } -static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void light(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { UINT Index = state - STATE_ACTIVELIGHT(0); const struct wined3d_light_info *lightInfo = stateblock->state.lights[Index]; @@ -4935,9 +4808,9 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3 } } -static void scissorrect(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void scissorrect(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { - IWineD3DSurfaceImpl *target = stateblock->device->render_targets[0]; + struct wined3d_surface *target = stateblock->device->fb.render_targets[0]; RECT *pRect = &stateblock->state.scissor_rect; UINT height; UINT width; @@ -4958,7 +4831,7 @@ static void scissorrect(DWORD state, IWineD3DStateBlockImpl *stateblock, struct checkGLcall("glScissor"); } -static void indexbuffer(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void indexbuffer(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -4973,7 +4846,7 @@ static void indexbuffer(DWORD state, IWineD3DStateBlockImpl *stateblock, struct } } -static void frontface(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void frontface(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { if (context->render_offscreen) { @@ -4985,6 +4858,34 @@ static void frontface(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wi } } +static void psorigin_w(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) +{ + static BOOL warned; + + if (!warned) + { + WARN("Point sprite coordinate origin switching not supported.\n"); + warned = TRUE; + } +} + +static void psorigin(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + GLint origin = context->render_offscreen ? GL_LOWER_LEFT : GL_UPPER_LEFT; + + if (glPointParameteri) + { + glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, origin); + checkGLcall("glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, ...)"); + } + else if (gl_info->supported[NV_POINT_SPRITE]) + { + GL_EXTCALL(glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, origin)); + checkGLcall("glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, ...)"); + } +} + const struct StateEntryTemplate misc_state_template[] = { { STATE_RENDER(WINED3DRS_SRCBLEND), { STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_DESTBLEND), { STATE_RENDER(WINED3DRS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, @@ -5000,6 +4901,9 @@ const struct StateEntryTemplate misc_state_template[] = { { STATE_VDECL, { STATE_VDECL, streamsrc }, WINED3D_GL_EXT_NONE }, { STATE_FRONTFACE, { STATE_FRONTFACE, frontface }, WINED3D_GL_EXT_NONE }, { STATE_SCISSORRECT, { STATE_SCISSORRECT, scissorrect }, WINED3D_GL_EXT_NONE }, + { STATE_POINTSPRITECOORDORIGIN, { STATE_POINTSPRITECOORDORIGIN, psorigin }, WINED3D_GL_VERSION_2_0 }, + { STATE_POINTSPRITECOORDORIGIN, { STATE_POINTSPRITECOORDORIGIN, psorigin_w }, WINED3D_GL_EXT_NONE }, + /* TODO: Move shader constant loading to vertex and fragment pipeline repectively, as soon as the pshader and * vshader loadings are untied from each other */ @@ -5080,7 +4984,6 @@ const struct StateEntryTemplate misc_state_template[] = { { STATE_RENDER(WINED3DRS_SUBPIXEL), { STATE_RENDER(WINED3DRS_SUBPIXEL), state_subpixel }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_SUBPIXELX), { STATE_RENDER(WINED3DRS_SUBPIXELX), state_subpixelx }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_STIPPLEDALPHA), { STATE_RENDER(WINED3DRS_STIPPLEDALPHA), state_stippledalpha }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3DRS_ZBIAS), { STATE_RENDER(WINED3DRS_ZBIAS), state_zbias }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_STIPPLEENABLE), { STATE_RENDER(WINED3DRS_STIPPLEENABLE), state_stippleenable }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_MIPMAPLODBIAS), { STATE_RENDER(WINED3DRS_MIPMAPLODBIAS), state_mipmaplodbias }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3DRS_ANISOTROPY), { STATE_RENDER(WINED3DRS_ANISOTROPY), state_anisotropy }, WINED3D_GL_EXT_NONE }, @@ -5675,51 +5578,51 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = { {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; -/* Context activation is done by the caller. */ -static void ffp_enable(IWineD3DDevice *iface, BOOL enable) { } +/* Context activation and GL locking are done by the caller. */ +static void ffp_enable(BOOL enable) {} -static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps) +static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps) { - pCaps->PrimitiveMiscCaps = 0; - pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD | - WINED3DTEXOPCAPS_ADDSIGNED | - WINED3DTEXOPCAPS_ADDSIGNED2X | - WINED3DTEXOPCAPS_MODULATE | - WINED3DTEXOPCAPS_MODULATE2X | - WINED3DTEXOPCAPS_MODULATE4X | - WINED3DTEXOPCAPS_SELECTARG1 | - WINED3DTEXOPCAPS_SELECTARG2 | - WINED3DTEXOPCAPS_DISABLE; + caps->PrimitiveMiscCaps = 0; + caps->TextureOpCaps = WINED3DTEXOPCAPS_ADD + | WINED3DTEXOPCAPS_ADDSIGNED + | WINED3DTEXOPCAPS_ADDSIGNED2X + | WINED3DTEXOPCAPS_MODULATE + | WINED3DTEXOPCAPS_MODULATE2X + | WINED3DTEXOPCAPS_MODULATE4X + | WINED3DTEXOPCAPS_SELECTARG1 + | WINED3DTEXOPCAPS_SELECTARG2 + | WINED3DTEXOPCAPS_DISABLE; if (gl_info->supported[ARB_TEXTURE_ENV_COMBINE] || gl_info->supported[EXT_TEXTURE_ENV_COMBINE] || gl_info->supported[NV_TEXTURE_ENV_COMBINE4]) { - pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA | - WINED3DTEXOPCAPS_BLENDTEXTUREALPHA | - WINED3DTEXOPCAPS_BLENDFACTORALPHA | - WINED3DTEXOPCAPS_BLENDCURRENTALPHA | - WINED3DTEXOPCAPS_LERP | - WINED3DTEXOPCAPS_SUBTRACT; + caps->TextureOpCaps |= WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA + | WINED3DTEXOPCAPS_BLENDTEXTUREALPHA + | WINED3DTEXOPCAPS_BLENDFACTORALPHA + | WINED3DTEXOPCAPS_BLENDCURRENTALPHA + | WINED3DTEXOPCAPS_LERP + | WINED3DTEXOPCAPS_SUBTRACT; } if (gl_info->supported[ATI_TEXTURE_ENV_COMBINE3] || gl_info->supported[NV_TEXTURE_ENV_COMBINE4]) { - pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_ADDSMOOTH | - WINED3DTEXOPCAPS_MULTIPLYADD | - WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR | - WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA | - WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM; + caps->TextureOpCaps |= WINED3DTEXOPCAPS_ADDSMOOTH + | WINED3DTEXOPCAPS_MULTIPLYADD + | WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR + | WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA + | WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM; } if (gl_info->supported[ARB_TEXTURE_ENV_DOT3]) - pCaps->TextureOpCaps |= WINED3DTEXOPCAPS_DOTPRODUCT3; + caps->TextureOpCaps |= WINED3DTEXOPCAPS_DOTPRODUCT3; - pCaps->MaxTextureBlendStages = gl_info->limits.textures; - pCaps->MaxSimultaneousTextures = gl_info->limits.textures; + caps->MaxTextureBlendStages = gl_info->limits.textures; + caps->MaxSimultaneousTextures = gl_info->limits.textures; } -static HRESULT ffp_fragment_alloc(IWineD3DDevice *iface) { return WINED3D_OK; } -static void ffp_fragment_free(IWineD3DDevice *iface) {} +static HRESULT ffp_fragment_alloc(struct wined3d_device *device) { return WINED3D_OK; } +static void ffp_fragment_free(struct wined3d_device *device) {} static BOOL ffp_color_fixup_supported(struct color_fixup_desc fixup) { if (TRACE_ON(d3d)) @@ -5756,13 +5659,13 @@ static unsigned int num_handlers(const APPLYSTATEFUNC *funcs) return i; } -static void multistate_apply_2(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void multistate_apply_2(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { stateblock->device->multistate_funcs[state][0](state, stateblock, context); stateblock->device->multistate_funcs[state][1](state, stateblock, context); } -static void multistate_apply_3(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +static void multistate_apply_3(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { stateblock->device->multistate_funcs[state][0](state, stateblock, context); stateblock->device->multistate_funcs[state][1](state, stateblock, context); @@ -5812,6 +5715,7 @@ static void validate_state_table(struct StateEntry *state_table) { 17, 18}, { 21, 21}, { 42, 45}, + { 47, 47}, { 61, 127}, {149, 150}, {169, 169}, @@ -5832,6 +5736,7 @@ static void validate_state_table(struct StateEntry *state_table) STATE_VIEWPORT, STATE_SCISSORRECT, STATE_FRONTFACE, + STATE_POINTSPRITECOORDORIGIN, }; unsigned int i, current; diff --git a/dll/directx/wine/wined3d/stateblock.c b/dll/directx/wine/wined3d/stateblock.c index de8ee8eff21..5beea287376 100644 --- a/dll/directx/wine/wined3d/stateblock.c +++ b/dll/directx/wine/wined3d/stateblock.c @@ -191,9 +191,9 @@ static const DWORD vertex_states_sampler[] = /* Allocates the correct amount of space for pixel and vertex shader constants, * along with their set/changed flags on the given stateblock object */ -static HRESULT stateblock_allocate_shader_constants(IWineD3DStateBlockImpl *object) +static HRESULT stateblock_allocate_shader_constants(struct wined3d_stateblock *object) { - IWineD3DDeviceImpl *device = object->device; + struct wined3d_device *device = object->device; /* Allocate space for floating point constants */ object->state.ps_consts_f = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -327,9 +327,9 @@ static void stateblock_savedstates_set_vertex(SAVEDSTATES *states, const DWORD n memset(states->vertexShaderConstantsF, TRUE, sizeof(BOOL) * num_constants); } -void stateblock_init_contained_states(IWineD3DStateBlockImpl *stateblock) +void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) { - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; unsigned int i, j; for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i) @@ -439,7 +439,7 @@ void stateblock_init_contained_states(IWineD3DStateBlockImpl *stateblock) } } -static void stateblock_init_lights(IWineD3DStateBlockImpl *stateblock, struct list *light_map) +static void stateblock_init_lights(struct wined3d_stateblock *stateblock, struct list *light_map) { unsigned int i; @@ -457,68 +457,68 @@ static void stateblock_init_lights(IWineD3DStateBlockImpl *stateblock, struct li } } -/********************************************************** - * IWineD3DStateBlockImpl IUnknown parts follows - **********************************************************/ -static HRESULT WINAPI IWineD3DStateBlockImpl_QueryInterface(IWineD3DStateBlock *iface,REFIID riid,LPVOID *ppobj) +ULONG CDECL wined3d_stateblock_incref(struct wined3d_stateblock *stateblock) { - IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; - TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IWineD3DStateBlock)) + ULONG refcount = InterlockedIncrement(&stateblock->ref); + + TRACE("%p increasing refcount to %u.\n", stateblock, refcount); + + return refcount; +} + +ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock) +{ + ULONG refcount = InterlockedDecrement(&stateblock->ref); + + TRACE("%p decreasing refcount to %u\n", stateblock, refcount); + + if (!refcount) { - IUnknown_AddRef(iface); - *ppobj = This; - return S_OK; - } - *ppobj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI IWineD3DStateBlockImpl_AddRef(IWineD3DStateBlock *iface) { - IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1); - return refCount; -} - -static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) { - IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p) : Releasing from %d\n", This, refCount + 1); - - if (!refCount) { + struct wined3d_buffer *buffer; int counter; - if (This->state.vertex_declaration) - IWineD3DVertexDeclaration_Release((IWineD3DVertexDeclaration *)This->state.vertex_declaration); + if (stateblock->state.vertex_declaration) + wined3d_vertex_declaration_decref(stateblock->state.vertex_declaration); for (counter = 0; counter < MAX_COMBINED_SAMPLERS; counter++) { - if (This->state.textures[counter]) - IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)This->state.textures[counter]); + struct wined3d_texture *texture = stateblock->state.textures[counter]; + if (texture) + { + stateblock->state.textures[counter] = NULL; + wined3d_texture_decref(texture); + } } for (counter = 0; counter < MAX_STREAMS; ++counter) { - struct wined3d_buffer *buffer = This->state.streams[counter].buffer; + buffer = stateblock->state.streams[counter].buffer; if (buffer) { - if (IWineD3DBuffer_Release((IWineD3DBuffer *)buffer)) + stateblock->state.streams[counter].buffer = NULL; + if (wined3d_buffer_decref(buffer)) { WARN("Buffer %p still referenced by stateblock, stream %u.\n", buffer, counter); } } } - if (This->state.index_buffer) IWineD3DBuffer_Release((IWineD3DBuffer *)This->state.index_buffer); - if (This->state.vertex_shader) IWineD3DVertexShader_Release((IWineD3DVertexShader *)This->state.vertex_shader); - if (This->state.pixel_shader) IWineD3DPixelShader_Release((IWineD3DPixelShader *)This->state.pixel_shader); - for(counter = 0; counter < LIGHTMAP_SIZE; counter++) { + buffer = stateblock->state.index_buffer; + if (buffer) + { + stateblock->state.index_buffer = NULL; + wined3d_buffer_decref(buffer); + } + + if (stateblock->state.vertex_shader) + wined3d_shader_decref(stateblock->state.vertex_shader); + if (stateblock->state.pixel_shader) + wined3d_shader_decref(stateblock->state.pixel_shader); + + for (counter = 0; counter < LIGHTMAP_SIZE; ++counter) + { struct list *e1, *e2; - LIST_FOR_EACH_SAFE(e1, e2, &This->state.light_map[counter]) + LIST_FOR_EACH_SAFE(e1, e2, &stateblock->state.light_map[counter]) { struct wined3d_light_info *light = LIST_ENTRY(e1, struct wined3d_light_info, entry); list_remove(&light->entry); @@ -526,15 +526,16 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) { } } - HeapFree(GetProcessHeap(), 0, This->state.vs_consts_f); - HeapFree(GetProcessHeap(), 0, This->changed.vertexShaderConstantsF); - HeapFree(GetProcessHeap(), 0, This->state.ps_consts_f); - HeapFree(GetProcessHeap(), 0, This->changed.pixelShaderConstantsF); - HeapFree(GetProcessHeap(), 0, This->contained_vs_consts_f); - HeapFree(GetProcessHeap(), 0, This->contained_ps_consts_f); - HeapFree(GetProcessHeap(), 0, This); + HeapFree(GetProcessHeap(), 0, stateblock->state.vs_consts_f); + HeapFree(GetProcessHeap(), 0, stateblock->changed.vertexShaderConstantsF); + HeapFree(GetProcessHeap(), 0, stateblock->state.ps_consts_f); + HeapFree(GetProcessHeap(), 0, stateblock->changed.pixelShaderConstantsF); + HeapFree(GetProcessHeap(), 0, stateblock->contained_vs_consts_f); + HeapFree(GetProcessHeap(), 0, stateblock->contained_ps_consts_f); + HeapFree(GetProcessHeap(), 0, stateblock); } - return refCount; + + return refcount; } static void wined3d_state_record_lights(struct wined3d_state *dst_state, const struct wined3d_state *src_state) @@ -594,33 +595,32 @@ static void wined3d_state_record_lights(struct wined3d_state *dst_state, const s } } -static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) +HRESULT CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock) { - IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; - const struct wined3d_state *src_state = &This->device->stateBlock->state; + const struct wined3d_state *src_state = &stateblock->device->stateBlock->state; unsigned int i; DWORD map; - TRACE("iface %p.\n", iface); + TRACE("stateblock %p.\n", stateblock); TRACE("Capturing state %p.\n", src_state); - if (This->changed.vertexShader && This->state.vertex_shader != src_state->vertex_shader) + if (stateblock->changed.vertexShader && stateblock->state.vertex_shader != src_state->vertex_shader) { TRACE("Updating vertex shader from %p to %p\n", - This->state.vertex_shader, src_state->vertex_shader); + stateblock->state.vertex_shader, src_state->vertex_shader); if (src_state->vertex_shader) - IWineD3DVertexShader_AddRef((IWineD3DVertexShader *)src_state->vertex_shader); - if (This->state.vertex_shader) - IWineD3DVertexShader_Release((IWineD3DVertexShader *)This->state.vertex_shader); - This->state.vertex_shader = src_state->vertex_shader; + wined3d_shader_incref(src_state->vertex_shader); + if (stateblock->state.vertex_shader) + wined3d_shader_decref(stateblock->state.vertex_shader); + stateblock->state.vertex_shader = src_state->vertex_shader; } - /* Vertex Shader Float Constants */ - for (i = 0; i < This->num_contained_vs_consts_f; ++i) + /* Vertex shader float constants. */ + for (i = 0; i < stateblock->num_contained_vs_consts_f; ++i) { - unsigned int idx = This->contained_vs_consts_f[i]; + unsigned int idx = stateblock->contained_vs_consts_f[i]; TRACE("Setting vs_consts_f[%u] to {%.8e, %.8e, %.8e, %.8e}.\n", idx, src_state->vs_consts_f[idx * 4 + 0], @@ -628,16 +628,16 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) src_state->vs_consts_f[idx * 4 + 2], src_state->vs_consts_f[idx * 4 + 3]); - This->state.vs_consts_f[idx * 4 + 0] = src_state->vs_consts_f[idx * 4 + 0]; - This->state.vs_consts_f[idx * 4 + 1] = src_state->vs_consts_f[idx * 4 + 1]; - This->state.vs_consts_f[idx * 4 + 2] = src_state->vs_consts_f[idx * 4 + 2]; - This->state.vs_consts_f[idx * 4 + 3] = src_state->vs_consts_f[idx * 4 + 3]; + stateblock->state.vs_consts_f[idx * 4 + 0] = src_state->vs_consts_f[idx * 4 + 0]; + stateblock->state.vs_consts_f[idx * 4 + 1] = src_state->vs_consts_f[idx * 4 + 1]; + stateblock->state.vs_consts_f[idx * 4 + 2] = src_state->vs_consts_f[idx * 4 + 2]; + stateblock->state.vs_consts_f[idx * 4 + 3] = src_state->vs_consts_f[idx * 4 + 3]; } - /* Vertex Shader Integer Constants */ - for (i = 0; i < This->num_contained_vs_consts_i; ++i) + /* Vertex shader integer constants. */ + for (i = 0; i < stateblock->num_contained_vs_consts_i; ++i) { - unsigned int idx = This->contained_vs_consts_i[i]; + unsigned int idx = stateblock->contained_vs_consts_i[i]; TRACE("Setting vs_consts[%u] to {%d, %d, %d, %d}.\n", idx, src_state->vs_consts_i[idx * 4 + 0], @@ -645,27 +645,27 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) src_state->vs_consts_i[idx * 4 + 2], src_state->vs_consts_i[idx * 4 + 3]); - This->state.vs_consts_i[idx * 4 + 0] = src_state->vs_consts_i[idx * 4 + 0]; - This->state.vs_consts_i[idx * 4 + 1] = src_state->vs_consts_i[idx * 4 + 1]; - This->state.vs_consts_i[idx * 4 + 2] = src_state->vs_consts_i[idx * 4 + 2]; - This->state.vs_consts_i[idx * 4 + 3] = src_state->vs_consts_i[idx * 4 + 3]; + stateblock->state.vs_consts_i[idx * 4 + 0] = src_state->vs_consts_i[idx * 4 + 0]; + stateblock->state.vs_consts_i[idx * 4 + 1] = src_state->vs_consts_i[idx * 4 + 1]; + stateblock->state.vs_consts_i[idx * 4 + 2] = src_state->vs_consts_i[idx * 4 + 2]; + stateblock->state.vs_consts_i[idx * 4 + 3] = src_state->vs_consts_i[idx * 4 + 3]; } - /* Vertex Shader Boolean Constants */ - for (i = 0; i < This->num_contained_vs_consts_b; ++i) + /* Vertex shader boolean constants. */ + for (i = 0; i < stateblock->num_contained_vs_consts_b; ++i) { - unsigned int idx = This->contained_vs_consts_b[i]; + unsigned int idx = stateblock->contained_vs_consts_b[i]; TRACE("Setting vs_consts_b[%u] to %s.\n", idx, src_state->vs_consts_b[idx] ? "TRUE" : "FALSE"); - This->state.vs_consts_b[idx] = src_state->vs_consts_b[idx]; + stateblock->state.vs_consts_b[idx] = src_state->vs_consts_b[idx]; } - /* Pixel Shader Float Constants */ - for (i = 0; i < This->num_contained_ps_consts_f; ++i) + /* Pixel shader float constants. */ + for (i = 0; i < stateblock->num_contained_ps_consts_f; ++i) { - unsigned int idx = This->contained_ps_consts_f[i]; + unsigned int idx = stateblock->contained_ps_consts_f[i]; TRACE("Setting ps_consts_f[%u] to {%.8e, %.8e, %.8e, %.8e}.\n", idx, src_state->ps_consts_f[idx * 4 + 0], @@ -673,217 +673,219 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) src_state->ps_consts_f[idx * 4 + 2], src_state->ps_consts_f[idx * 4 + 3]); - This->state.ps_consts_f[idx * 4 + 0] = src_state->ps_consts_f[idx * 4 + 0]; - This->state.ps_consts_f[idx * 4 + 1] = src_state->ps_consts_f[idx * 4 + 1]; - This->state.ps_consts_f[idx * 4 + 2] = src_state->ps_consts_f[idx * 4 + 2]; - This->state.ps_consts_f[idx * 4 + 3] = src_state->ps_consts_f[idx * 4 + 3]; + stateblock->state.ps_consts_f[idx * 4 + 0] = src_state->ps_consts_f[idx * 4 + 0]; + stateblock->state.ps_consts_f[idx * 4 + 1] = src_state->ps_consts_f[idx * 4 + 1]; + stateblock->state.ps_consts_f[idx * 4 + 2] = src_state->ps_consts_f[idx * 4 + 2]; + stateblock->state.ps_consts_f[idx * 4 + 3] = src_state->ps_consts_f[idx * 4 + 3]; } - /* Pixel Shader Integer Constants */ - for (i = 0; i < This->num_contained_ps_consts_i; ++i) + /* Pixel shader integer constants. */ + for (i = 0; i < stateblock->num_contained_ps_consts_i; ++i) { - unsigned int idx = This->contained_ps_consts_i[i]; + unsigned int idx = stateblock->contained_ps_consts_i[i]; TRACE("Setting ps_consts_i[%u] to {%d, %d, %d, %d}.\n", idx, src_state->ps_consts_i[idx * 4 + 0], src_state->ps_consts_i[idx * 4 + 1], src_state->ps_consts_i[idx * 4 + 2], src_state->ps_consts_i[idx * 4 + 3]); - This->state.ps_consts_i[idx * 4 + 0] = src_state->ps_consts_i[idx * 4 + 0]; - This->state.ps_consts_i[idx * 4 + 1] = src_state->ps_consts_i[idx * 4 + 1]; - This->state.ps_consts_i[idx * 4 + 2] = src_state->ps_consts_i[idx * 4 + 2]; - This->state.ps_consts_i[idx * 4 + 3] = src_state->ps_consts_i[idx * 4 + 3]; + stateblock->state.ps_consts_i[idx * 4 + 0] = src_state->ps_consts_i[idx * 4 + 0]; + stateblock->state.ps_consts_i[idx * 4 + 1] = src_state->ps_consts_i[idx * 4 + 1]; + stateblock->state.ps_consts_i[idx * 4 + 2] = src_state->ps_consts_i[idx * 4 + 2]; + stateblock->state.ps_consts_i[idx * 4 + 3] = src_state->ps_consts_i[idx * 4 + 3]; } - /* Pixel Shader Boolean Constants */ - for (i = 0; i < This->num_contained_ps_consts_b; ++i) + /* Pixel shader boolean constants. */ + for (i = 0; i < stateblock->num_contained_ps_consts_b; ++i) { - unsigned int idx = This->contained_ps_consts_b[i]; + unsigned int idx = stateblock->contained_ps_consts_b[i]; TRACE("Setting ps_consts_b[%u] to %s.\n", idx, src_state->ps_consts_b[idx] ? "TRUE" : "FALSE"); - This->state.ps_consts_b[idx] = src_state->ps_consts_b[idx]; + stateblock->state.ps_consts_b[idx] = src_state->ps_consts_b[idx]; } /* Others + Render & Texture */ - for (i = 0; i < This->num_contained_transform_states; ++i) + for (i = 0; i < stateblock->num_contained_transform_states; ++i) { - WINED3DTRANSFORMSTATETYPE transform = This->contained_transform_states[i]; + WINED3DTRANSFORMSTATETYPE transform = stateblock->contained_transform_states[i]; TRACE("Updating transform %#x.\n", transform); - This->state.transforms[transform] = src_state->transforms[transform]; + stateblock->state.transforms[transform] = src_state->transforms[transform]; } - if (This->changed.primitive_type) - This->state.gl_primitive_type = src_state->gl_primitive_type; + if (stateblock->changed.primitive_type) + stateblock->state.gl_primitive_type = src_state->gl_primitive_type; - if (This->changed.indices - && ((This->state.index_buffer != src_state->index_buffer) - || (This->state.base_vertex_index != src_state->base_vertex_index) - || (This->state.index_format != src_state->index_format))) + if (stateblock->changed.indices + && ((stateblock->state.index_buffer != src_state->index_buffer) + || (stateblock->state.base_vertex_index != src_state->base_vertex_index) + || (stateblock->state.index_format != src_state->index_format))) { TRACE("Updating index buffer to %p, base vertex index to %d.\n", src_state->index_buffer, src_state->base_vertex_index); if (src_state->index_buffer) - IWineD3DBuffer_AddRef((IWineD3DBuffer *)src_state->index_buffer); - if (This->state.index_buffer) - IWineD3DBuffer_Release((IWineD3DBuffer *)This->state.index_buffer); - This->state.index_buffer = src_state->index_buffer; - This->state.base_vertex_index = src_state->base_vertex_index; - This->state.index_format = src_state->index_format; + wined3d_buffer_incref(src_state->index_buffer); + if (stateblock->state.index_buffer) + wined3d_buffer_decref(stateblock->state.index_buffer); + stateblock->state.index_buffer = src_state->index_buffer; + stateblock->state.base_vertex_index = src_state->base_vertex_index; + stateblock->state.index_format = src_state->index_format; } - if (This->changed.vertexDecl && This->state.vertex_declaration != src_state->vertex_declaration) + if (stateblock->changed.vertexDecl && stateblock->state.vertex_declaration != src_state->vertex_declaration) { TRACE("Updating vertex declaration from %p to %p.\n", - This->state.vertex_declaration, src_state->vertex_declaration); + stateblock->state.vertex_declaration, src_state->vertex_declaration); if (src_state->vertex_declaration) - IWineD3DVertexDeclaration_AddRef((IWineD3DVertexDeclaration *)src_state->vertex_declaration); - if (This->state.vertex_declaration) - IWineD3DVertexDeclaration_Release((IWineD3DVertexDeclaration *)This->state.vertex_declaration); - This->state.vertex_declaration = src_state->vertex_declaration; + wined3d_vertex_declaration_incref(src_state->vertex_declaration); + if (stateblock->state.vertex_declaration) + wined3d_vertex_declaration_decref(stateblock->state.vertex_declaration); + stateblock->state.vertex_declaration = src_state->vertex_declaration; } - if (This->changed.material && memcmp(&src_state->material, &This->state.material, sizeof(This->state.material))) + if (stateblock->changed.material + && memcmp(&src_state->material, &stateblock->state.material, sizeof(stateblock->state.material))) { TRACE("Updating material.\n"); - This->state.material = src_state->material; + stateblock->state.material = src_state->material; } - if (This->changed.viewport && memcmp(&src_state->viewport, &This->state.viewport, sizeof(This->state.viewport))) + if (stateblock->changed.viewport + && memcmp(&src_state->viewport, &stateblock->state.viewport, sizeof(stateblock->state.viewport))) { TRACE("Updating viewport.\n"); - This->state.viewport = src_state->viewport; + stateblock->state.viewport = src_state->viewport; } - if (This->changed.scissorRect && memcmp(&src_state->scissor_rect, - &This->state.scissor_rect, sizeof(This->state.scissor_rect))) + if (stateblock->changed.scissorRect && memcmp(&src_state->scissor_rect, + &stateblock->state.scissor_rect, sizeof(stateblock->state.scissor_rect))) { TRACE("Updating scissor rect.\n"); - This->state.scissor_rect = src_state->scissor_rect; + stateblock->state.scissor_rect = src_state->scissor_rect; } - map = This->changed.streamSource; + map = stateblock->changed.streamSource; for (i = 0; map; map >>= 1, ++i) { if (!(map & 1)) continue; - if (This->state.streams[i].stride != src_state->streams[i].stride - || This->state.streams[i].buffer != src_state->streams[i].buffer) + if (stateblock->state.streams[i].stride != src_state->streams[i].stride + || stateblock->state.streams[i].buffer != src_state->streams[i].buffer) { TRACE("Updating stream source %u to %p, stride to %u.\n", i, src_state->streams[i].buffer, src_state->streams[i].stride); - This->state.streams[i].stride = src_state->streams[i].stride; + stateblock->state.streams[i].stride = src_state->streams[i].stride; if (src_state->streams[i].buffer) - IWineD3DBuffer_AddRef((IWineD3DBuffer *)src_state->streams[i].buffer); - if (This->state.streams[i].buffer) - IWineD3DBuffer_Release((IWineD3DBuffer *)This->state.streams[i].buffer); - This->state.streams[i].buffer = src_state->streams[i].buffer; + wined3d_buffer_incref(src_state->streams[i].buffer); + if (stateblock->state.streams[i].buffer) + wined3d_buffer_decref(stateblock->state.streams[i].buffer); + stateblock->state.streams[i].buffer = src_state->streams[i].buffer; } } - map = This->changed.streamFreq; + map = stateblock->changed.streamFreq; for (i = 0; map; map >>= 1, ++i) { if (!(map & 1)) continue; - if (This->state.streams[i].frequency != src_state->streams[i].frequency - || This->state.streams[i].flags != src_state->streams[i].flags) + if (stateblock->state.streams[i].frequency != src_state->streams[i].frequency + || stateblock->state.streams[i].flags != src_state->streams[i].flags) { TRACE("Updating stream frequency %u to %u flags to %#x.\n", i, src_state->streams[i].frequency, src_state->streams[i].flags); - This->state.streams[i].frequency = src_state->streams[i].frequency; - This->state.streams[i].flags = src_state->streams[i].flags; + stateblock->state.streams[i].frequency = src_state->streams[i].frequency; + stateblock->state.streams[i].flags = src_state->streams[i].flags; } } - map = This->changed.clipplane; + map = stateblock->changed.clipplane; for (i = 0; map; map >>= 1, ++i) { if (!(map & 1)) continue; - if (memcmp(src_state->clip_planes[i], This->state.clip_planes[i], sizeof(*This->state.clip_planes))) + if (memcmp(src_state->clip_planes[i], stateblock->state.clip_planes[i], sizeof(*stateblock->state.clip_planes))) { TRACE("Updating clipplane %u.\n", i); - memcpy(This->state.clip_planes[i], src_state->clip_planes[i], sizeof(*This->state.clip_planes)); + memcpy(stateblock->state.clip_planes[i], src_state->clip_planes[i], sizeof(*stateblock->state.clip_planes)); } } /* Render */ - for (i = 0; i < This->num_contained_render_states; ++i) + for (i = 0; i < stateblock->num_contained_render_states; ++i) { - WINED3DRENDERSTATETYPE rs = This->contained_render_states[i]; + WINED3DRENDERSTATETYPE rs = stateblock->contained_render_states[i]; TRACE("Updating render state %#x to %u.\n", rs, src_state->render_states[rs]); - This->state.render_states[rs] = src_state->render_states[rs]; + stateblock->state.render_states[rs] = src_state->render_states[rs]; } /* Texture states */ - for (i = 0; i < This->num_contained_tss_states; ++i) + for (i = 0; i < stateblock->num_contained_tss_states; ++i) { - DWORD stage = This->contained_tss_states[i].stage; - DWORD state = This->contained_tss_states[i].state; + DWORD stage = stateblock->contained_tss_states[i].stage; + DWORD state = stateblock->contained_tss_states[i].state; TRACE("Updating texturestage state %u, %u to %#x (was %#x).\n", stage, state, - src_state->texture_states[stage][state], This->state.texture_states[stage][state]); + src_state->texture_states[stage][state], stateblock->state.texture_states[stage][state]); - This->state.texture_states[stage][state] = src_state->texture_states[stage][state]; + stateblock->state.texture_states[stage][state] = src_state->texture_states[stage][state]; } /* Samplers */ - map = This->changed.textures; + map = stateblock->changed.textures; for (i = 0; map; map >>= 1, ++i) { if (!(map & 1)) continue; TRACE("Updating texture %u to %p (was %p).\n", - i, src_state->textures[i], This->state.textures[i]); + i, src_state->textures[i], stateblock->state.textures[i]); if (src_state->textures[i]) - IWineD3DBaseTexture_AddRef((IWineD3DBaseTexture *)src_state->textures[i]); - if (This->state.textures[i]) - IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)This->state.textures[i]); - This->state.textures[i] = src_state->textures[i]; + wined3d_texture_incref(src_state->textures[i]); + if (stateblock->state.textures[i]) + wined3d_texture_decref(stateblock->state.textures[i]); + stateblock->state.textures[i] = src_state->textures[i]; } - for (i = 0; i < This->num_contained_sampler_states; ++i) + for (i = 0; i < stateblock->num_contained_sampler_states; ++i) { - DWORD stage = This->contained_sampler_states[i].stage; - DWORD state = This->contained_sampler_states[i].state; + DWORD stage = stateblock->contained_sampler_states[i].stage; + DWORD state = stateblock->contained_sampler_states[i].state; TRACE("Updating sampler state %u, %u to %#x (was %#x).\n", stage, state, - src_state->sampler_states[stage][state], This->state.sampler_states[stage][state]); + src_state->sampler_states[stage][state], stateblock->state.sampler_states[stage][state]); - This->state.sampler_states[stage][state] = src_state->sampler_states[stage][state]; + stateblock->state.sampler_states[stage][state] = src_state->sampler_states[stage][state]; } - if (This->changed.pixelShader && This->state.pixel_shader != src_state->pixel_shader) + if (stateblock->changed.pixelShader && stateblock->state.pixel_shader != src_state->pixel_shader) { if (src_state->pixel_shader) - IWineD3DPixelShader_AddRef((IWineD3DPixelShader *)src_state->pixel_shader); - if (This->state.pixel_shader) - IWineD3DPixelShader_Release((IWineD3DPixelShader *)This->state.pixel_shader); - This->state.pixel_shader = src_state->pixel_shader; + wined3d_shader_incref(src_state->pixel_shader); + if (stateblock->state.pixel_shader) + wined3d_shader_decref(stateblock->state.pixel_shader); + stateblock->state.pixel_shader = src_state->pixel_shader; } - wined3d_state_record_lights(&This->state, src_state); + wined3d_state_record_lights(&stateblock->state, src_state); TRACE("Captue done.\n"); return WINED3D_OK; } -static void apply_lights(IWineD3DDevice *device, const struct wined3d_state *state) +static void apply_lights(struct wined3d_device *device, const struct wined3d_state *state) { UINT i; @@ -895,148 +897,139 @@ static void apply_lights(IWineD3DDevice *device, const struct wined3d_state *sta { const struct wined3d_light_info *light = LIST_ENTRY(e, struct wined3d_light_info, entry); - IWineD3DDevice_SetLight(device, light->OriginalIndex, &light->OriginalParms); - IWineD3DDevice_SetLightEnable(device, light->OriginalIndex, light->glIndex != -1); + wined3d_device_set_light(device, light->OriginalIndex, &light->OriginalParms); + wined3d_device_set_light_enable(device, light->OriginalIndex, light->glIndex != -1); } } } -static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) +HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock) { - IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; - IWineD3DDevice *device = (IWineD3DDevice *)This->device; + struct wined3d_device *device = stateblock->device; unsigned int i; DWORD map; - TRACE("(%p) : Applying state block %p ------------------v\n", This, device); + TRACE("Applying stateblock %p to device %p.\n", stateblock, device); + TRACE("Blocktype: %#x.\n", stateblock->blockType); - TRACE("Blocktype: %d\n", This->blockType); + if (stateblock->changed.vertexShader) + wined3d_device_set_vertex_shader(device, stateblock->state.vertex_shader); - if (This->changed.vertexShader) - IWineD3DDevice_SetVertexShader(device, (IWineD3DVertexShader *)This->state.vertex_shader); - - /* Vertex Shader Constants */ - for (i = 0; i < This->num_contained_vs_consts_f; ++i) + /* Vertex Shader Constants. */ + for (i = 0; i < stateblock->num_contained_vs_consts_f; ++i) { - IWineD3DDevice_SetVertexShaderConstantF(device, This->contained_vs_consts_f[i], - This->state.vs_consts_f + This->contained_vs_consts_f[i] * 4, 1); + wined3d_device_set_vs_consts_f(device, stateblock->contained_vs_consts_f[i], + stateblock->state.vs_consts_f + stateblock->contained_vs_consts_f[i] * 4, 1); } - for (i = 0; i < This->num_contained_vs_consts_i; ++i) + for (i = 0; i < stateblock->num_contained_vs_consts_i; ++i) { - IWineD3DDevice_SetVertexShaderConstantI(device, This->contained_vs_consts_i[i], - This->state.vs_consts_i + This->contained_vs_consts_i[i] * 4, 1); + wined3d_device_set_vs_consts_i(device, stateblock->contained_vs_consts_i[i], + stateblock->state.vs_consts_i + stateblock->contained_vs_consts_i[i] * 4, 1); } - for (i = 0; i < This->num_contained_vs_consts_b; ++i) + for (i = 0; i < stateblock->num_contained_vs_consts_b; ++i) { - IWineD3DDevice_SetVertexShaderConstantB(device, This->contained_vs_consts_b[i], - This->state.vs_consts_b + This->contained_vs_consts_b[i], 1); + wined3d_device_set_vs_consts_b(device, stateblock->contained_vs_consts_b[i], + stateblock->state.vs_consts_b + stateblock->contained_vs_consts_b[i], 1); } - apply_lights(device, &This->state); + apply_lights(device, &stateblock->state); - if (This->changed.pixelShader) - IWineD3DDevice_SetPixelShader(device, (IWineD3DPixelShader *)This->state.pixel_shader); + if (stateblock->changed.pixelShader) + wined3d_device_set_pixel_shader(device, stateblock->state.pixel_shader); - /* Pixel Shader Constants */ - for (i = 0; i < This->num_contained_ps_consts_f; ++i) + /* Pixel Shader Constants. */ + for (i = 0; i < stateblock->num_contained_ps_consts_f; ++i) { - IWineD3DDevice_SetPixelShaderConstantF(device, This->contained_ps_consts_f[i], - This->state.ps_consts_f + This->contained_ps_consts_f[i] * 4, 1); + wined3d_device_set_ps_consts_f(device, stateblock->contained_ps_consts_f[i], + stateblock->state.ps_consts_f + stateblock->contained_ps_consts_f[i] * 4, 1); } - for (i = 0; i < This->num_contained_ps_consts_i; ++i) + for (i = 0; i < stateblock->num_contained_ps_consts_i; ++i) { - IWineD3DDevice_SetPixelShaderConstantI(device, This->contained_ps_consts_i[i], - This->state.ps_consts_i + This->contained_ps_consts_i[i] * 4, 1); + wined3d_device_set_ps_consts_i(device, stateblock->contained_ps_consts_i[i], + stateblock->state.ps_consts_i + stateblock->contained_ps_consts_i[i] * 4, 1); } - for (i = 0; i < This->num_contained_ps_consts_b; ++i) + for (i = 0; i < stateblock->num_contained_ps_consts_b; ++i) { - IWineD3DDevice_SetPixelShaderConstantB(device, This->contained_ps_consts_b[i], - This->state.ps_consts_b + This->contained_ps_consts_b[i], 1); + wined3d_device_set_ps_consts_b(device, stateblock->contained_ps_consts_b[i], + stateblock->state.ps_consts_b + stateblock->contained_ps_consts_b[i], 1); } - /* Render */ - for (i = 0; i < This->num_contained_render_states; ++i) + /* Render states. */ + for (i = 0; i < stateblock->num_contained_render_states; ++i) { - IWineD3DDevice_SetRenderState(device, This->contained_render_states[i], - This->state.render_states[This->contained_render_states[i]]); + wined3d_device_set_render_state(device, stateblock->contained_render_states[i], + stateblock->state.render_states[stateblock->contained_render_states[i]]); } - /* Texture states */ - for (i = 0; i < This->num_contained_tss_states; ++i) + /* Texture states. */ + for (i = 0; i < stateblock->num_contained_tss_states; ++i) { - DWORD stage = This->contained_tss_states[i].stage; - DWORD state = This->contained_tss_states[i].state; + DWORD stage = stateblock->contained_tss_states[i].stage; + DWORD state = stateblock->contained_tss_states[i].state; - IWineD3DDevice_SetTextureStageState(device, stage, state, This->state.texture_states[stage][state]); + wined3d_device_set_texture_stage_state(device, stage, state, stateblock->state.texture_states[stage][state]); } - /* Sampler states */ - for (i = 0; i < This->num_contained_sampler_states; ++i) + /* Sampler states. */ + for (i = 0; i < stateblock->num_contained_sampler_states; ++i) { - DWORD stage = This->contained_sampler_states[i].stage; - DWORD state = This->contained_sampler_states[i].state; - DWORD value = This->state.sampler_states[stage][state]; + DWORD stage = stateblock->contained_sampler_states[i].stage; + DWORD state = stateblock->contained_sampler_states[i].state; + DWORD value = stateblock->state.sampler_states[stage][state]; if (stage >= MAX_FRAGMENT_SAMPLERS) stage += WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS; - IWineD3DDevice_SetSamplerState(device, stage, state, value); + wined3d_device_set_sampler_state(device, stage, state, value); } - for (i = 0; i < This->num_contained_transform_states; ++i) + /* Transform states. */ + for (i = 0; i < stateblock->num_contained_transform_states; ++i) { - IWineD3DDevice_SetTransform(device, This->contained_transform_states[i], - &This->state.transforms[This->contained_transform_states[i]]); + wined3d_device_set_transform(device, stateblock->contained_transform_states[i], + &stateblock->state.transforms[stateblock->contained_transform_states[i]]); } - if (This->changed.primitive_type) + if (stateblock->changed.primitive_type) { - This->device->updateStateBlock->changed.primitive_type = TRUE; - This->device->updateStateBlock->state.gl_primitive_type = This->state.gl_primitive_type; + stateblock->device->updateStateBlock->changed.primitive_type = TRUE; + stateblock->device->updateStateBlock->state.gl_primitive_type = stateblock->state.gl_primitive_type; } - if (This->changed.indices) + if (stateblock->changed.indices) { - IWineD3DDevice_SetIndexBuffer(device, (IWineD3DBuffer *)This->state.index_buffer, This->state.index_format); - IWineD3DDevice_SetBaseVertexIndex(device, This->state.base_vertex_index); + wined3d_device_set_index_buffer(device, stateblock->state.index_buffer, stateblock->state.index_format); + wined3d_device_set_base_vertex_index(device, stateblock->state.base_vertex_index); } - if (This->changed.vertexDecl && This->state.vertex_declaration) - { - IWineD3DDevice_SetVertexDeclaration(device, (IWineD3DVertexDeclaration *)This->state.vertex_declaration); - } + if (stateblock->changed.vertexDecl && stateblock->state.vertex_declaration) + wined3d_device_set_vertex_declaration(device, stateblock->state.vertex_declaration); - if (This->changed.material) - { - IWineD3DDevice_SetMaterial(device, &This->state.material); - } + if (stateblock->changed.material) + wined3d_device_set_material(device, &stateblock->state.material); - if (This->changed.viewport) - { - IWineD3DDevice_SetViewport(device, &This->state.viewport); - } + if (stateblock->changed.viewport) + wined3d_device_set_viewport(device, &stateblock->state.viewport); - if (This->changed.scissorRect) - { - IWineD3DDevice_SetScissorRect(device, &This->state.scissor_rect); - } + if (stateblock->changed.scissorRect) + wined3d_device_set_scissor_rect(device, &stateblock->state.scissor_rect); - map = This->changed.streamSource; + map = stateblock->changed.streamSource; for (i = 0; map; map >>= 1, ++i) { if (map & 1) - IWineD3DDevice_SetStreamSource(device, i, - (IWineD3DBuffer *)This->state.streams[i].buffer, - 0, This->state.streams[i].stride); + wined3d_device_set_stream_source(device, i, + stateblock->state.streams[i].buffer, + 0, stateblock->state.streams[i].stride); } - map = This->changed.streamFreq; + map = stateblock->changed.streamFreq; for (i = 0; map; map >>= 1, ++i) { if (map & 1) - IWineD3DDevice_SetStreamSourceFreq(device, i, - This->state.streams[i].frequency | This->state.streams[i].flags); + wined3d_device_set_stream_source_freq(device, i, + stateblock->state.streams[i].frequency | stateblock->state.streams[i].flags); } - map = This->changed.textures; + map = stateblock->changed.textures; for (i = 0; map; map >>= 1, ++i) { DWORD stage; @@ -1044,40 +1037,41 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) if (!(map & 1)) continue; stage = i < MAX_FRAGMENT_SAMPLERS ? i : WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS; - IWineD3DDevice_SetTexture(device, stage, (IWineD3DBaseTexture *)This->state.textures[i]); + wined3d_device_set_texture(device, stage, stateblock->state.textures[i]); } - map = This->changed.clipplane; + map = stateblock->changed.clipplane; for (i = 0; map; map >>= 1, ++i) { float clip[4]; if (!(map & 1)) continue; - clip[0] = This->state.clip_planes[i][0]; - clip[1] = This->state.clip_planes[i][1]; - clip[2] = This->state.clip_planes[i][2]; - clip[3] = This->state.clip_planes[i][3]; - IWineD3DDevice_SetClipPlane(device, i, clip); + clip[0] = (float) stateblock->state.clip_planes[i][0]; + clip[1] = (float) stateblock->state.clip_planes[i][1]; + clip[2] = (float) stateblock->state.clip_planes[i][2]; + clip[3] = (float) stateblock->state.clip_planes[i][3]; + wined3d_device_set_clip_plane(device, i, clip); } - This->device->stateBlock->state.lowest_disabled_stage = MAX_TEXTURES - 1; + stateblock->device->stateBlock->state.lowest_disabled_stage = MAX_TEXTURES - 1; for (i = 0; i < MAX_TEXTURES - 1; ++i) { - if (This->device->stateBlock->state.texture_states[i][WINED3DTSS_COLOROP] == WINED3DTOP_DISABLE) + if (stateblock->device->stateBlock->state.texture_states[i][WINED3DTSS_COLOROP] == WINED3DTOP_DISABLE) { - This->device->stateBlock->state.lowest_disabled_stage = i; + stateblock->device->stateBlock->state.lowest_disabled_stage = i; break; } } - TRACE("(%p) : Applied state block %p ------------------^\n", This, device); + + TRACE("Applied stateblock %p.\n", stateblock); return WINED3D_OK; } -void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) +void stateblock_init_default_state(struct wined3d_stateblock *stateblock) { - IWineD3DDeviceImpl *device = stateblock->device; + struct wined3d_device *device = stateblock->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct wined3d_state *state = &stateblock->state; union { @@ -1089,8 +1083,8 @@ void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) DWORD d; } tmpfloat; unsigned int i; - IWineD3DSwapChain *swapchain; - IWineD3DSurface *backbuffer; + struct wined3d_swapchain *swapchain; + struct wined3d_surface *backbuffer; HRESULT hr; TRACE("stateblock %p.\n", stateblock); @@ -1139,7 +1133,6 @@ void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) tmpfloat.f = 1.0f; state->render_states[WINED3DRS_FOGDENSITY] = tmpfloat.d; state->render_states[WINED3DRS_EDGEANTIALIAS] = FALSE; - state->render_states[WINED3DRS_ZBIAS] = 0; state->render_states[WINED3DRS_RANGEFOGENABLE] = FALSE; state->render_states[WINED3DRS_STENCILENABLE] = FALSE; state->render_states[WINED3DRS_STENCILFAIL] = WINED3DSTENCILOP_KEEP; @@ -1294,16 +1287,16 @@ void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) } /* check the return values, because the GetBackBuffer call isn't valid for ddraw */ - hr = IWineD3DDevice_GetSwapChain((IWineD3DDevice *)device, 0, &swapchain); + hr = wined3d_device_get_swapchain(device, 0, &swapchain); if (SUCCEEDED(hr) && swapchain) { - hr = IWineD3DSwapChain_GetBackBuffer(swapchain, 0, WINED3DBACKBUFFER_TYPE_MONO, &backbuffer); + hr = wined3d_swapchain_get_back_buffer(swapchain, 0, WINED3DBACKBUFFER_TYPE_MONO, &backbuffer); if (SUCCEEDED(hr) && backbuffer) { - WINED3DSURFACE_DESC desc; + struct wined3d_resource_desc desc; - IWineD3DSurface_GetDesc(backbuffer, &desc); - IWineD3DSurface_Release(backbuffer); + wined3d_resource_get_desc(&backbuffer->resource, &desc); + wined3d_surface_decref(backbuffer); /* Set the default scissor rect values */ state->scissor_rect.left = 0; @@ -1315,38 +1308,23 @@ void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) /* Set the default viewport */ state->viewport.X = 0; state->viewport.Y = 0; - state->viewport.Width = ((IWineD3DSwapChainImpl *)swapchain)->presentParms.BackBufferWidth; - state->viewport.Height = ((IWineD3DSwapChainImpl *)swapchain)->presentParms.BackBufferHeight; + state->viewport.Width = swapchain->presentParms.BackBufferWidth; + state->viewport.Height = swapchain->presentParms.BackBufferHeight; state->viewport.MinZ = 0.0f; state->viewport.MaxZ = 1.0f; - IWineD3DSwapChain_Release(swapchain); + wined3d_swapchain_decref(swapchain); } TRACE("Done.\n"); } -/********************************************************** - * IWineD3DStateBlock VTbl follows - **********************************************************/ - -static const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl = -{ - /* IUnknown */ - IWineD3DStateBlockImpl_QueryInterface, - IWineD3DStateBlockImpl_AddRef, - IWineD3DStateBlockImpl_Release, - /* IWineD3DStateBlock */ - IWineD3DStateBlockImpl_Capture, - IWineD3DStateBlockImpl_Apply, -}; - -HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type) +static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, + struct wined3d_device *device, WINED3DSTATEBLOCKTYPE type) { unsigned int i; HRESULT hr; - stateblock->lpVtbl = &IWineD3DStateBlock_Vtbl; stateblock->ref = 1; stateblock->device = device; stateblock->blockType = type; @@ -1389,7 +1367,37 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl * } stateblock_init_contained_states(stateblock); - IWineD3DStateBlockImpl_Capture((IWineD3DStateBlock *)stateblock); + wined3d_stateblock_capture(stateblock); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_stateblock_create(struct wined3d_device *device, + WINED3DSTATEBLOCKTYPE type, struct wined3d_stateblock **stateblock) +{ + struct wined3d_stateblock *object; + HRESULT hr; + + TRACE("device %p, type %#x, stateblock %p.\n", + device, type, stateblock); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate stateblock memory.\n"); + return E_OUTOFMEMORY; + } + + hr = stateblock_init(object, device, type); + if (FAILED(hr)) + { + WARN("Failed to initialize stateblock, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created stateblock %p.\n", object); + *stateblock = object; return WINED3D_OK; } diff --git a/dll/directx/wine/wined3d/surface.c b/dll/directx/wine/wined3d/surface.c index 442ce757920..91b16a6fa0e 100644 --- a/dll/directx/wine/wined3d/surface.c +++ b/dll/directx/wine/wined3d/surface.c @@ -1,7 +1,6 @@ /* - * IWineD3DSurface Implementation - * - * Copyright 1998 Lionel Ulmer + * Copyright 1997-2000 Marcus Meissner + * Copyright 1998-2000 Lionel Ulmer * Copyright 2000-2001 TransGaming Technologies Inc. * Copyright 2002-2005 Jason Edmeades * Copyright 2002-2003 Raphael Junqueira @@ -10,7 +9,7 @@ * Copyright 2006-2008 Stefan Dösinger for CodeWeavers * Copyright 2007-2008 Henri Verbeet * Copyright 2006-2008 Roderick Colenbrander - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -34,34 +33,43 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); WINE_DECLARE_DEBUG_CHANNEL(d3d); -static void surface_cleanup(IWineD3DSurfaceImpl *This) -{ - TRACE("(%p) : Cleaning up.\n", This); +static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, + const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter); +static HRESULT surface_cpu_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD trans); +static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surface, const RECT *dst_rect, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, + WINED3DTEXTUREFILTERTYPE filter); - if (This->texture_name || (This->Flags & SFLAG_PBO) || !list_empty(&This->renderbuffers)) +static void surface_cleanup(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + if (surface->texture_name || (surface->flags & SFLAG_PBO) || !list_empty(&surface->renderbuffers)) { + struct wined3d_renderbuffer_entry *entry, *entry2; const struct wined3d_gl_info *gl_info; - renderbuffer_entry_t *entry, *entry2; struct wined3d_context *context; - context = context_acquire(This->resource.device, NULL); + context = context_acquire(surface->resource.device, NULL); gl_info = context->gl_info; ENTER_GL(); - if (This->texture_name) + if (surface->texture_name) { - TRACE("Deleting texture %u.\n", This->texture_name); - glDeleteTextures(1, &This->texture_name); + TRACE("Deleting texture %u.\n", surface->texture_name); + glDeleteTextures(1, &surface->texture_name); } - if (This->Flags & SFLAG_PBO) + if (surface->flags & SFLAG_PBO) { - TRACE("Deleting PBO %u.\n", This->pbo); - GL_EXTCALL(glDeleteBuffersARB(1, &This->pbo)); + TRACE("Deleting PBO %u.\n", surface->pbo); + GL_EXTCALL(glDeleteBuffersARB(1, &surface->pbo)); } - LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &This->renderbuffers, renderbuffer_entry_t, entry) + LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &surface->renderbuffers, struct wined3d_renderbuffer_entry, entry) { TRACE("Deleting renderbuffer %u.\n", entry->id); gl_info->fbo_ops.glDeleteRenderbuffers(1, &entry->id); @@ -73,26 +81,28 @@ static void surface_cleanup(IWineD3DSurfaceImpl *This) context_release(context); } - if (This->Flags & SFLAG_DIBSECTION) + if (surface->flags & SFLAG_DIBSECTION) { /* Release the DC. */ - SelectObject(This->hDC, This->dib.holdbitmap); - DeleteDC(This->hDC); + SelectObject(surface->hDC, surface->dib.holdbitmap); + DeleteDC(surface->hDC); /* Release the DIB section. */ - DeleteObject(This->dib.DIBsection); - This->dib.bitmap_data = NULL; - This->resource.allocatedMemory = NULL; + DeleteObject(surface->dib.DIBsection); + surface->dib.bitmap_data = NULL; + surface->resource.allocatedMemory = NULL; } - if (This->Flags & SFLAG_USERPTR) IWineD3DSurface_SetMem((IWineD3DSurface *)This, NULL); - if (This->overlay_dest) list_remove(&This->overlay_entry); + if (surface->flags & SFLAG_USERPTR) + wined3d_surface_set_mem(surface, NULL); + if (surface->overlay_dest) + list_remove(&surface->overlay_entry); - HeapFree(GetProcessHeap(), 0, This->palette9); + HeapFree(GetProcessHeap(), 0, surface->palette9); - resource_cleanup((IWineD3DResource *)This); + resource_cleanup(&surface->resource); } -void surface_set_container(IWineD3DSurfaceImpl *surface, enum wined3d_container_type type, IWineD3DBase *container) +void surface_set_container(struct wined3d_surface *surface, enum wined3d_container_type type, void *container) { TRACE("surface %p, container %p.\n", surface, container); @@ -149,22 +159,11 @@ static inline void cube_coords_float(const RECT *r, UINT w, UINT h, struct float f->b = ((r->bottom * 2.0f) / h) - 1.0f; } -static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, GLsizei h, struct blt_info *info) +static void surface_get_blt_info(GLenum target, const RECT *rect, GLsizei w, GLsizei h, struct blt_info *info) { GLfloat (*coords)[3] = info->coords; - RECT rect; struct float_rect f; - if (rect_in) - rect = *rect_in; - else - { - rect.left = 0; - rect.top = h; - rect.right = w; - rect.bottom = 0; - } - switch (target) { default: @@ -174,20 +173,20 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, info->binding = GL_TEXTURE_BINDING_2D; info->bind_target = GL_TEXTURE_2D; info->tex_type = tex_2d; - coords[0][0] = (float)rect.left / w; - coords[0][1] = (float)rect.top / h; + coords[0][0] = (float)rect->left / w; + coords[0][1] = (float)rect->top / h; coords[0][2] = 0.0f; - coords[1][0] = (float)rect.right / w; - coords[1][1] = (float)rect.top / h; + coords[1][0] = (float)rect->right / w; + coords[1][1] = (float)rect->top / h; coords[1][2] = 0.0f; - coords[2][0] = (float)rect.left / w; - coords[2][1] = (float)rect.bottom / h; + coords[2][0] = (float)rect->left / w; + coords[2][1] = (float)rect->bottom / h; coords[2][2] = 0.0f; - coords[3][0] = (float)rect.right / w; - coords[3][1] = (float)rect.bottom / h; + coords[3][0] = (float)rect->right / w; + coords[3][1] = (float)rect->bottom / h; coords[3][2] = 0.0f; break; @@ -195,17 +194,17 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, info->binding = GL_TEXTURE_BINDING_RECTANGLE_ARB; info->bind_target = GL_TEXTURE_RECTANGLE_ARB; info->tex_type = tex_rect; - coords[0][0] = rect.left; coords[0][1] = rect.top; coords[0][2] = 0.0f; - coords[1][0] = rect.right; coords[1][1] = rect.top; coords[1][2] = 0.0f; - coords[2][0] = rect.left; coords[2][1] = rect.bottom; coords[2][2] = 0.0f; - coords[3][0] = rect.right; coords[3][1] = rect.bottom; coords[3][2] = 0.0f; + coords[0][0] = rect->left; coords[0][1] = rect->top; coords[0][2] = 0.0f; + coords[1][0] = rect->right; coords[1][1] = rect->top; coords[1][2] = 0.0f; + coords[2][0] = rect->left; coords[2][1] = rect->bottom; coords[2][2] = 0.0f; + coords[3][0] = rect->right; coords[3][1] = rect->bottom; coords[3][2] = 0.0f; break; case GL_TEXTURE_CUBE_MAP_POSITIVE_X: info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - cube_coords_float(&rect, w, h, &f); + cube_coords_float(rect, w, h, &f); coords[0][0] = 1.0f; coords[0][1] = -f.t; coords[0][2] = -f.l; coords[1][0] = 1.0f; coords[1][1] = -f.t; coords[1][2] = -f.r; @@ -217,7 +216,7 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - cube_coords_float(&rect, w, h, &f); + cube_coords_float(rect, w, h, &f); coords[0][0] = -1.0f; coords[0][1] = -f.t; coords[0][2] = f.l; coords[1][0] = -1.0f; coords[1][1] = -f.t; coords[1][2] = f.r; @@ -229,7 +228,7 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - cube_coords_float(&rect, w, h, &f); + cube_coords_float(rect, w, h, &f); coords[0][0] = f.l; coords[0][1] = 1.0f; coords[0][2] = f.t; coords[1][0] = f.r; coords[1][1] = 1.0f; coords[1][2] = f.t; @@ -241,7 +240,7 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - cube_coords_float(&rect, w, h, &f); + cube_coords_float(rect, w, h, &f); coords[0][0] = f.l; coords[0][1] = -1.0f; coords[0][2] = -f.t; coords[1][0] = f.r; coords[1][1] = -1.0f; coords[1][2] = -f.t; @@ -253,7 +252,7 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - cube_coords_float(&rect, w, h, &f); + cube_coords_float(rect, w, h, &f); coords[0][0] = f.l; coords[0][1] = -f.t; coords[0][2] = 1.0f; coords[1][0] = f.r; coords[1][1] = -f.t; coords[1][2] = 1.0f; @@ -265,7 +264,7 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - cube_coords_float(&rect, w, h, &f); + cube_coords_float(rect, w, h, &f); coords[0][0] = -f.l; coords[0][1] = -f.t; coords[0][2] = -1.0f; coords[1][0] = -f.r; coords[1][1] = -f.t; coords[1][2] = -1.0f; @@ -275,7 +274,7 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, } } -static inline void surface_get_rect(IWineD3DSurfaceImpl *This, const RECT *rect_in, RECT *rect_out) +static inline void surface_get_rect(struct wined3d_surface *surface, const RECT *rect_in, RECT *rect_out) { if (rect_in) *rect_out = *rect_in; @@ -283,13 +282,14 @@ static inline void surface_get_rect(IWineD3DSurfaceImpl *This, const RECT *rect_ { rect_out->left = 0; rect_out->top = 0; - rect_out->right = This->currentDesc.Width; - rect_out->bottom = This->currentDesc.Height; + rect_out->right = surface->resource.width; + rect_out->bottom = surface->resource.height; } } /* GL locking and context activation is done by the caller */ -void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect, const RECT *dst_rect, WINED3DTEXTUREFILTERTYPE Filter) +void draw_textured_quad(struct wined3d_surface *src_surface, const RECT *src_rect, + const RECT *dst_rect, WINED3DTEXTUREFILTERTYPE Filter) { struct blt_info info; @@ -337,139 +337,1554 @@ void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect, * container about this to get the filters reset properly next draw. */ if (src_surface->container.type == WINED3D_CONTAINER_TEXTURE) { - IWineD3DBaseTextureImpl *texture = src_surface->container.u.texture; - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; + struct wined3d_texture *texture = src_surface->container.u.texture; + texture->texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; + texture->texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; + texture->texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; } } -HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, - UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type, - UINT multisample_quality, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, - WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) +static HRESULT surface_create_dib_section(struct wined3d_surface *surface) { - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); - void (*cleanup)(IWineD3DSurfaceImpl *This); - unsigned int resource_size; - HRESULT hr; + const struct wined3d_format *format = surface->resource.format; + SYSTEM_INFO sysInfo; + BITMAPINFO *b_info; + int extraline = 0; + DWORD *masks; + UINT usage; + HDC dc; - if (multisample_quality > 0) + TRACE("surface %p.\n", surface); + + if (!(format->flags & WINED3DFMT_FLAG_GETDC)) { - FIXME("multisample_quality set to %u, substituting 0\n", multisample_quality); - multisample_quality = 0; + WARN("Cannot use GetDC on a %s surface.\n", debug_d3dformat(format->id)); + return WINED3DERR_INVALIDCALL; } - /* FIXME: Check that the format is supported by the device. */ - - resource_size = wined3d_format_calculate_size(format, alignment, width, height); - - /* Look at the implementation and set the correct Vtable. */ - switch (surface_type) + switch (format->byte_count) { - case SURFACE_OPENGL: - surface->lpVtbl = &IWineD3DSurface_Vtbl; - cleanup = surface_cleanup; + case 2: + case 4: + /* Allocate extra space to store the RGB bit masks. */ + b_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER) + 3 * sizeof(DWORD)); break; - case SURFACE_GDI: - surface->lpVtbl = &IWineGDISurface_Vtbl; - cleanup = surface_gdi_cleanup; + case 3: + b_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER)); break; default: - ERR("Requested unknown surface implementation %#x.\n", surface_type); + /* Allocate extra space for a palette. */ + b_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << (format->byte_count * 8))); + break; + } + + if (!b_info) + return E_OUTOFMEMORY; + + /* Some applications access the surface in via DWORDs, and do not take + * the necessary care at the end of the surface. So we need at least + * 4 extra bytes at the end of the surface. Check against the page size, + * if the last page used for the surface has at least 4 spare bytes we're + * safe, otherwise add an extra line to the DIB section. */ + GetSystemInfo(&sysInfo); + if( ((surface->resource.size + 3) % sysInfo.dwPageSize) < 4) + { + extraline = 1; + TRACE("Adding an extra line to the DIB section.\n"); + } + + b_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + /* TODO: Is there a nicer way to force a specific alignment? (8 byte for ddraw) */ + b_info->bmiHeader.biWidth = wined3d_surface_get_pitch(surface) / format->byte_count; + b_info->bmiHeader.biHeight = 0 - surface->resource.height - extraline; + b_info->bmiHeader.biSizeImage = (surface->resource.height + extraline) + * wined3d_surface_get_pitch(surface); + b_info->bmiHeader.biPlanes = 1; + b_info->bmiHeader.biBitCount = format->byte_count * 8; + + b_info->bmiHeader.biXPelsPerMeter = 0; + b_info->bmiHeader.biYPelsPerMeter = 0; + b_info->bmiHeader.biClrUsed = 0; + b_info->bmiHeader.biClrImportant = 0; + + /* Get the bit masks */ + masks = (DWORD *)b_info->bmiColors; + switch (surface->resource.format->id) + { + case WINED3DFMT_B8G8R8_UNORM: + usage = DIB_RGB_COLORS; + b_info->bmiHeader.biCompression = BI_RGB; + break; + + case WINED3DFMT_B5G5R5X1_UNORM: + case WINED3DFMT_B5G5R5A1_UNORM: + case WINED3DFMT_B4G4R4A4_UNORM: + case WINED3DFMT_B4G4R4X4_UNORM: + case WINED3DFMT_B2G3R3_UNORM: + case WINED3DFMT_B2G3R3A8_UNORM: + case WINED3DFMT_R10G10B10A2_UNORM: + case WINED3DFMT_R8G8B8A8_UNORM: + case WINED3DFMT_R8G8B8X8_UNORM: + case WINED3DFMT_B10G10R10A2_UNORM: + case WINED3DFMT_B5G6R5_UNORM: + case WINED3DFMT_R16G16B16A16_UNORM: + usage = 0; + b_info->bmiHeader.biCompression = BI_BITFIELDS; + masks[0] = format->red_mask; + masks[1] = format->green_mask; + masks[2] = format->blue_mask; + break; + + default: + /* Don't know palette */ + b_info->bmiHeader.biCompression = BI_RGB; + usage = 0; + break; + } + + if (!(dc = GetDC(0))) + { + HeapFree(GetProcessHeap(), 0, b_info); + return HRESULT_FROM_WIN32(GetLastError()); + } + + TRACE("Creating a DIB section with size %dx%dx%d, size=%d.\n", + b_info->bmiHeader.biWidth, b_info->bmiHeader.biHeight, + b_info->bmiHeader.biBitCount, b_info->bmiHeader.biSizeImage); + surface->dib.DIBsection = CreateDIBSection(dc, b_info, usage, &surface->dib.bitmap_data, 0, 0); + ReleaseDC(0, dc); + + if (!surface->dib.DIBsection) + { + ERR("Failed to create DIB section.\n"); + HeapFree(GetProcessHeap(), 0, b_info); + return HRESULT_FROM_WIN32(GetLastError()); + } + + TRACE("DIBSection at %p.\n", surface->dib.bitmap_data); + /* Copy the existing surface to the dib section. */ + if (surface->resource.allocatedMemory) + { + memcpy(surface->dib.bitmap_data, surface->resource.allocatedMemory, + surface->resource.height * wined3d_surface_get_pitch(surface)); + } + else + { + /* This is to make maps read the GL texture although memory is allocated. */ + surface->flags &= ~SFLAG_INSYSMEM; + } + surface->dib.bitmap_size = b_info->bmiHeader.biSizeImage; + + HeapFree(GetProcessHeap(), 0, b_info); + + /* Now allocate a DC. */ + surface->hDC = CreateCompatibleDC(0); + surface->dib.holdbitmap = SelectObject(surface->hDC, surface->dib.DIBsection); + TRACE("Using wined3d palette %p.\n", surface->palette); + SelectPalette(surface->hDC, surface->palette ? surface->palette->hpal : 0, FALSE); + + surface->flags |= SFLAG_DIBSECTION; + + HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); + surface->resource.heapMemory = NULL; + + return WINED3D_OK; +} + +static void surface_prepare_system_memory(struct wined3d_surface *surface) +{ + struct wined3d_device *device = surface->resource.device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + + TRACE("surface %p.\n", surface); + + /* Performance optimization: Count how often a surface is locked, if it is + * locked regularly do not throw away the system memory copy. This avoids + * the need to download the surface from OpenGL all the time. The surface + * is still downloaded if the OpenGL texture is changed. */ + if (!(surface->flags & SFLAG_DYNLOCK)) + { + if (++surface->lockCount > MAXLOCKCOUNT) + { + TRACE("Surface is locked regularly, not freeing the system memory copy any more.\n"); + surface->flags |= SFLAG_DYNLOCK; + } + } + + /* Create a PBO for dynamically locked surfaces but don't do it for + * converted or NPOT surfaces. Also don't create a PBO for systemmem + * surfaces. */ + if (gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] && (surface->flags & SFLAG_DYNLOCK) + && !(surface->flags & (SFLAG_PBO | SFLAG_CONVERTED | SFLAG_NONPOW2)) + && (surface->resource.pool != WINED3DPOOL_SYSTEMMEM)) + { + struct wined3d_context *context; + GLenum error; + + context = context_acquire(device, NULL); + ENTER_GL(); + + GL_EXTCALL(glGenBuffersARB(1, &surface->pbo)); + error = glGetError(); + if (!surface->pbo || error != GL_NO_ERROR) + ERR("Failed to create a PBO with error %s (%#x).\n", debug_glerror(error), error); + + TRACE("Binding PBO %u.\n", surface->pbo); + + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); + checkGLcall("glBindBufferARB"); + + GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->resource.size + 4, + surface->resource.allocatedMemory, GL_STREAM_DRAW_ARB)); + checkGLcall("glBufferDataARB"); + + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("glBindBufferARB"); + + /* We don't need the system memory anymore and we can't even use it for PBOs. */ + if (!(surface->flags & SFLAG_CLIENT)) + { + HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); + surface->resource.heapMemory = NULL; + } + surface->resource.allocatedMemory = NULL; + surface->flags |= SFLAG_PBO; + LEAVE_GL(); + context_release(context); + } + else if (!(surface->resource.allocatedMemory || surface->flags & SFLAG_PBO)) + { + /* Whatever surface we have, make sure that there is memory allocated + * for the downloaded copy, or a PBO to map. */ + if (!surface->resource.heapMemory) + surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), 0, surface->resource.size + RESOURCE_ALIGNMENT); + + surface->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)surface->resource.heapMemory + + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + + if (surface->flags & SFLAG_INSYSMEM) + ERR("Surface without memory or PBO has SFLAG_INSYSMEM set.\n"); + } +} + +static void surface_evict_sysmem(struct wined3d_surface *surface) +{ + if (surface->flags & SFLAG_DONOTFREE) + return; + + HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); + surface->resource.allocatedMemory = NULL; + surface->resource.heapMemory = NULL; + surface_modify_location(surface, SFLAG_INSYSMEM, FALSE); +} + +/* Context activation is done by the caller. */ +static void surface_bind_and_dirtify(struct wined3d_surface *surface, + const struct wined3d_gl_info *gl_info, BOOL srgb) +{ + struct wined3d_device *device = surface->resource.device; + DWORD active_sampler; + GLint active_texture; + + /* We don't need a specific texture unit, but after binding the texture + * the current unit is dirty. Read the unit back instead of switching to + * 0, this avoids messing around with the state manager's GL states. The + * current texture unit should always be a valid one. + * + * To be more specific, this is tricky because we can implicitly be + * called from sampler() in state.c. This means we can't touch anything + * other than whatever happens to be the currently active texture, or we + * would risk marking already applied sampler states dirty again. + * + * TODO: Track the current active texture per GL context instead of using + * glGet(). */ + + ENTER_GL(); + glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture); + LEAVE_GL(); + active_sampler = device->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB]; + + if (active_sampler != WINED3D_UNMAPPED_STAGE) + { + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(active_sampler)); + } + surface_bind(surface, gl_info, srgb); +} + +static void surface_force_reload(struct wined3d_surface *surface) +{ + surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); +} + +static void surface_release_client_storage(struct wined3d_surface *surface) +{ + struct wined3d_context *context = context_acquire(surface->resource.device, NULL); + + ENTER_GL(); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); + if (surface->texture_name) + { + surface_bind_and_dirtify(surface, context->gl_info, FALSE); + glTexImage2D(surface->texture_target, surface->texture_level, + GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); + } + if (surface->texture_name_srgb) + { + surface_bind_and_dirtify(surface, context->gl_info, TRUE); + glTexImage2D(surface->texture_target, surface->texture_level, + GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); + } + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); + LEAVE_GL(); + + context_release(context); + + surface_modify_location(surface, SFLAG_INSRGBTEX, FALSE); + surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); + surface_force_reload(surface); +} + +static HRESULT surface_private_setup(struct wined3d_surface *surface) +{ + /* TODO: Check against the maximum texture sizes supported by the video card. */ + const struct wined3d_gl_info *gl_info = &surface->resource.device->adapter->gl_info; + unsigned int pow2Width, pow2Height; + + TRACE("surface %p.\n", surface); + + surface->texture_name = 0; + surface->texture_target = GL_TEXTURE_2D; + + /* Non-power2 support */ + if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]) + { + pow2Width = surface->resource.width; + pow2Height = surface->resource.height; + } + else + { + /* Find the nearest pow2 match */ + pow2Width = pow2Height = 1; + while (pow2Width < surface->resource.width) + pow2Width <<= 1; + while (pow2Height < surface->resource.height) + pow2Height <<= 1; + } + surface->pow2Width = pow2Width; + surface->pow2Height = pow2Height; + + if (pow2Width > surface->resource.width || pow2Height > surface->resource.height) + { + /* TODO: Add support for non power two compressed textures. */ + if (surface->resource.format->flags & WINED3DFMT_FLAG_COMPRESSED) + { + FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n", + surface, surface->resource.width, surface->resource.height); + return WINED3DERR_NOTAVAILABLE; + } + } + + if (pow2Width != surface->resource.width + || pow2Height != surface->resource.height) + { + surface->flags |= SFLAG_NONPOW2; + } + + if ((surface->pow2Width > gl_info->limits.texture_size || surface->pow2Height > gl_info->limits.texture_size) + && !(surface->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL))) + { + /* One of three options: + * 1: Do the same as we do with NPOT and scale the texture, (any + * texture ops would require the texture to be scaled which is + * potentially slow) + * 2: Set the texture to the maximum size (bad idea). + * 3: WARN and return WINED3DERR_NOTAVAILABLE; + * 4: Create the surface, but allow it to be used only for DirectDraw + * Blts. Some apps (e.g. Swat 3) create textures with a Height of + * 16 and a Width > 3000 and blt 16x16 letter areas from them to + * the render target. */ + if (surface->resource.pool == WINED3DPOOL_DEFAULT || surface->resource.pool == WINED3DPOOL_MANAGED) + { + WARN("Unable to allocate a surface which exceeds the maximum OpenGL texture size.\n"); + return WINED3DERR_NOTAVAILABLE; + } + + /* We should never use this surface in combination with OpenGL! */ + TRACE("Creating an oversized surface: %ux%u.\n", + surface->pow2Width, surface->pow2Height); + } + else + { + /* Don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 + * and EXT_PALETTED_TEXTURE is used in combination with texture + * uploads (RTL_READTEX/RTL_TEXTEX). The reason is that + * EXT_PALETTED_TEXTURE doesn't work in combination with + * ARB_TEXTURE_RECTANGLE. */ + if (surface->flags & SFLAG_NONPOW2 && gl_info->supported[ARB_TEXTURE_RECTANGLE] + && !(surface->resource.format->id == WINED3DFMT_P8_UINT + && gl_info->supported[EXT_PALETTED_TEXTURE] + && wined3d_settings.rendertargetlock_mode == RTL_READTEX)) + { + surface->texture_target = GL_TEXTURE_RECTANGLE_ARB; + surface->pow2Width = surface->resource.width; + surface->pow2Height = surface->resource.height; + surface->flags &= ~(SFLAG_NONPOW2 | SFLAG_NORMCOORD); + } + } + + switch (wined3d_settings.offscreen_rendering_mode) + { + case ORM_FBO: + surface->get_drawable_size = get_drawable_size_fbo; + break; + + case ORM_BACKBUFFER: + surface->get_drawable_size = get_drawable_size_backbuffer; + break; + + default: + ERR("Unhandled offscreen rendering mode %#x.\n", wined3d_settings.offscreen_rendering_mode); return WINED3DERR_INVALIDCALL; } - hr = resource_init((IWineD3DResource *)surface, WINED3DRTYPE_SURFACE, - device, resource_size, usage, format, pool, parent, parent_ops); - if (FAILED(hr)) + surface->flags |= SFLAG_INSYSMEM; + + return WINED3D_OK; +} + +static void surface_realize_palette(struct wined3d_surface *surface) +{ + struct wined3d_palette *palette = surface->palette; + + TRACE("surface %p.\n", surface); + + if (!palette) return; + + if (surface->resource.format->id == WINED3DFMT_P8_UINT + || surface->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) { - WARN("Failed to initialize resource, returning %#x.\n", hr); - return hr; - } + if (surface->resource.usage & WINED3DUSAGE_RENDERTARGET) + { + /* Make sure the texture is up to date. This call doesn't do + * anything if the texture is already up to date. */ + surface_load_location(surface, SFLAG_INTEXTURE, NULL); - /* "Standalone" surface. */ - surface_set_container(surface, WINED3D_CONTAINER_NONE, NULL); - - surface->currentDesc.Width = width; - surface->currentDesc.Height = height; - surface->currentDesc.MultiSampleType = multisample_type; - surface->currentDesc.MultiSampleQuality = multisample_quality; - surface->texture_level = level; - list_init(&surface->overlays); - - /* Flags */ - surface->Flags = SFLAG_NORMCOORD; /* Default to normalized coords. */ - if (discard) surface->Flags |= SFLAG_DISCARD; - if (lockable || format_id == WINED3DFMT_D16_LOCKABLE) surface->Flags |= SFLAG_LOCKABLE; - - /* Quick lockable sanity check. - * TODO: remove this after surfaces, usage and lockability have been debugged properly - * this function is too deep to need to care about things like this. - * Levels need to be checked too, since they all affect what can be done. */ - switch (pool) - { - case WINED3DPOOL_SCRATCH: - if(!lockable) + /* We want to force a palette refresh, so mark the drawable as not being up to date */ + if (!surface_is_offscreen(surface)) + surface_modify_location(surface, SFLAG_INDRAWABLE, FALSE); + } + else + { + if (!(surface->flags & SFLAG_INSYSMEM)) { - FIXME("Called with a pool of SCRATCH and a lockable of FALSE " - "which are mutually exclusive, setting lockable to TRUE.\n"); - lockable = TRUE; + TRACE("Palette changed with surface that does not have an up to date system memory copy.\n"); + surface_load_location(surface, SFLAG_INSYSMEM, NULL); } - break; - - case WINED3DPOOL_SYSTEMMEM: - if (!lockable) - FIXME("Called with a pool of SYSTEMMEM and a lockable of FALSE, this is acceptable but unexpected.\n"); - break; - - case WINED3DPOOL_MANAGED: - if (usage & WINED3DUSAGE_DYNAMIC) - FIXME("Called with a pool of MANAGED and a usage of DYNAMIC which are mutually exclusive.\n"); - break; - - case WINED3DPOOL_DEFAULT: - if (lockable && !(usage & (WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL))) - WARN("Creating a lockable surface with a POOL of DEFAULT, that doesn't specify DYNAMIC usage.\n"); - break; - - default: - FIXME("Unknown pool %#x.\n", pool); - break; - }; - - if (usage & WINED3DUSAGE_RENDERTARGET && pool != WINED3DPOOL_DEFAULT) - { - FIXME("Trying to create a render target that isn't in the default pool.\n"); + surface_modify_location(surface, SFLAG_INSYSMEM, TRUE); + } } - /* Mark the texture as dirty so that it gets loaded first time around. */ - surface_add_dirty_rect(surface, NULL); - list_init(&surface->renderbuffers); - - TRACE("surface %p, memory %p, size %u\n", surface, surface->resource.allocatedMemory, surface->resource.size); - - /* Call the private setup routine */ - hr = IWineD3DSurface_PrivateSetup((IWineD3DSurface *)surface); - if (FAILED(hr)) + if (surface->flags & SFLAG_DIBSECTION) { - ERR("Private setup failed, returning %#x\n", hr); - cleanup(surface); - return hr; + RGBQUAD col[256]; + unsigned int i; + + TRACE("Updating the DC's palette.\n"); + + for (i = 0; i < 256; ++i) + { + col[i].rgbRed = palette->palents[i].peRed; + col[i].rgbGreen = palette->palents[i].peGreen; + col[i].rgbBlue = palette->palents[i].peBlue; + col[i].rgbReserved = 0; + } + SetDIBColorTable(surface->hDC, 0, 256, col); } + /* Propagate the changes to the drawable when we have a palette. */ + if (surface->resource.usage & WINED3DUSAGE_RENDERTARGET) + surface_load_location(surface, SFLAG_INDRAWABLE, NULL); +} + +static HRESULT surface_draw_overlay(struct wined3d_surface *surface) +{ + HRESULT hr; + + /* If there's no destination surface there is nothing to do. */ + if (!surface->overlay_dest) + return WINED3D_OK; + + /* Blt calls ModifyLocation on the dest surface, which in turn calls + * DrawOverlay to update the overlay. Prevent an endless recursion. */ + if (surface->overlay_dest->flags & SFLAG_INOVERLAYDRAW) + return WINED3D_OK; + + surface->overlay_dest->flags |= SFLAG_INOVERLAYDRAW; + hr = wined3d_surface_blt(surface->overlay_dest, &surface->overlay_destrect, surface, + &surface->overlay_srcrect, WINEDDBLT_WAIT, NULL, WINED3DTEXF_LINEAR); + surface->overlay_dest->flags &= ~SFLAG_INOVERLAYDRAW; + return hr; } -static void surface_force_reload(IWineD3DSurfaceImpl *surface) +static void surface_preload(struct wined3d_surface *surface) { - surface->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); + TRACE("surface %p.\n", surface); + + surface_internal_preload(surface, SRGB_ANY); } -void surface_set_texture_name(IWineD3DSurfaceImpl *surface, GLuint new_name, BOOL srgb) +static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags) +{ + struct wined3d_device *device = surface->resource.device; + const RECT *pass_rect = rect; + + TRACE("surface %p, rect %s, flags %#x.\n", + surface, wine_dbgstr_rect(rect), flags); + + if (flags & WINED3DLOCK_DISCARD) + { + TRACE("WINED3DLOCK_DISCARD flag passed, marking SYSMEM as up to date.\n"); + surface_prepare_system_memory(surface); + surface_modify_location(surface, SFLAG_INSYSMEM, TRUE); + } + else + { + /* surface_load_location() does not check if the rectangle specifies + * the full surface. Most callers don't need that, so do it here. */ + if (rect && !rect->top && !rect->left + && rect->right == surface->resource.width + && rect->bottom == surface->resource.height) + pass_rect = NULL; + + if (!(wined3d_settings.rendertargetlock_mode == RTL_DISABLE + && ((surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) + || surface == device->fb.render_targets[0]))) + surface_load_location(surface, SFLAG_INSYSMEM, pass_rect); + } + + if (surface->flags & SFLAG_PBO) + { + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; + + context = context_acquire(device, NULL); + gl_info = context->gl_info; + + ENTER_GL(); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); + checkGLcall("glBindBufferARB"); + + /* This shouldn't happen but could occur if some other function + * didn't handle the PBO properly. */ + if (surface->resource.allocatedMemory) + ERR("The surface already has PBO memory allocated.\n"); + + surface->resource.allocatedMemory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB)); + checkGLcall("glMapBufferARB"); + + /* Make sure the PBO isn't set anymore in order not to break non-PBO + * calls. */ + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("glBindBufferARB"); + + LEAVE_GL(); + context_release(context); + } + + if (!(flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY))) + { + if (!rect) + surface_add_dirty_rect(surface, NULL); + else + { + WINED3DBOX b; + + b.Left = rect->left; + b.Top = rect->top; + b.Right = rect->right; + b.Bottom = rect->bottom; + b.Front = 0; + b.Back = 1; + surface_add_dirty_rect(surface, &b); + } + } +} + +static void surface_unmap(struct wined3d_surface *surface) +{ + struct wined3d_device *device = surface->resource.device; + BOOL fullsurface; + + TRACE("surface %p.\n", surface); + + memset(&surface->lockedRect, 0, sizeof(surface->lockedRect)); + + if (surface->flags & SFLAG_PBO) + { + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; + + TRACE("Freeing PBO memory.\n"); + + context = context_acquire(device, NULL); + gl_info = context->gl_info; + + ENTER_GL(); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); + GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("glUnmapBufferARB"); + LEAVE_GL(); + context_release(context); + + surface->resource.allocatedMemory = NULL; + } + + TRACE("dirtyfied %u.\n", surface->flags & (SFLAG_INDRAWABLE | SFLAG_INTEXTURE) ? 0 : 1); + + if (surface->flags & (SFLAG_INDRAWABLE | SFLAG_INTEXTURE)) + { + TRACE("Not dirtified, nothing to do.\n"); + goto done; + } + + if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN + || (device->fb.render_targets && surface == device->fb.render_targets[0])) + { + if (wined3d_settings.rendertargetlock_mode == RTL_DISABLE) + { + static BOOL warned = FALSE; + if (!warned) + { + ERR("The application tries to write to the render target, but render target locking is disabled.\n"); + warned = TRUE; + } + goto done; + } + + if (!surface->dirtyRect.left && !surface->dirtyRect.top + && surface->dirtyRect.right == surface->resource.width + && surface->dirtyRect.bottom == surface->resource.height) + { + fullsurface = TRUE; + } + else + { + /* TODO: Proper partial rectangle tracking. */ + fullsurface = FALSE; + surface->flags |= SFLAG_INSYSMEM; + } + + surface_load_location(surface, SFLAG_INDRAWABLE, fullsurface ? NULL : &surface->dirtyRect); + + /* Partial rectangle tracking is not commonly implemented, it is only + * done for render targets. INSYSMEM was set before to tell + * surface_load_location() where to read the rectangle from. + * Indrawable is set because all modifications from the partial + * sysmem copy are written back to the drawable, thus the surface is + * merged again in the drawable. The sysmem copy is not fully up to + * date because only a subrectangle was read in Map(). */ + if (!fullsurface) + { + surface_modify_location(surface, SFLAG_INDRAWABLE, TRUE); + surface_evict_sysmem(surface); + } + + surface->dirtyRect.left = surface->resource.width; + surface->dirtyRect.top = surface->resource.height; + surface->dirtyRect.right = 0; + surface->dirtyRect.bottom = 0; + } + else if (surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) + { + FIXME("Depth / stencil buffer locking is not implemented.\n"); + } + +done: + /* Overlays have to be redrawn manually after changes with the GL implementation */ + if (surface->overlay_dest) + surface->surface_ops->surface_draw_overlay(surface); +} + +static HRESULT surface_getdc(struct wined3d_surface *surface) +{ + WINED3DLOCKED_RECT lock; + HRESULT hr; + + TRACE("surface %p.\n", surface); + + /* Create a DIB section if there isn't a dc yet. */ + if (!surface->hDC) + { + if (surface->flags & SFLAG_CLIENT) + { + surface_load_location(surface, SFLAG_INSYSMEM, NULL); + surface_release_client_storage(surface); + } + hr = surface_create_dib_section(surface); + if (FAILED(hr)) + return WINED3DERR_INVALIDCALL; + + /* Use the DIB section from now on if we are not using a PBO. */ + if (!(surface->flags & SFLAG_PBO)) + surface->resource.allocatedMemory = surface->dib.bitmap_data; + } + + /* Map the surface. */ + hr = wined3d_surface_map(surface, &lock, NULL, 0); + if (FAILED(hr)) + ERR("Map failed, hr %#x.\n", hr); + + /* Sync the DIB with the PBO. This can't be done earlier because Map() + * activates the allocatedMemory. */ + if (surface->flags & SFLAG_PBO) + memcpy(surface->dib.bitmap_data, surface->resource.allocatedMemory, surface->dib.bitmap_size); + + return hr; +} + +static HRESULT surface_flip(struct wined3d_surface *surface, struct wined3d_surface *override) +{ + TRACE("surface %p, override %p.\n", surface, override); + + /* Flipping is only supported on render targets and overlays. */ + if (!(surface->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_OVERLAY))) + { + WARN("Tried to flip a non-render target, non-overlay surface.\n"); + return WINEDDERR_NOTFLIPPABLE; + } + + if (surface->resource.usage & WINED3DUSAGE_OVERLAY) + { + flip_surface(surface, override); + + /* Update the overlay if it is visible */ + if (surface->overlay_dest) + return surface->surface_ops->surface_draw_overlay(surface); + else + return WINED3D_OK; + } + + return WINED3D_OK; +} + +static BOOL surface_is_full_rect(struct wined3d_surface *surface, const RECT *r) +{ + if ((r->left && r->right) || abs(r->right - r->left) != surface->resource.width) + return FALSE; + if ((r->top && r->bottom) || abs(r->bottom - r->top) != surface->resource.height) + return FALSE; + return TRUE; +} + +static void wined3d_surface_depth_blt_fbo(struct wined3d_device *device, struct wined3d_surface *src_surface, + const RECT *src_rect, struct wined3d_surface *dst_surface, const RECT *dst_rect) +{ + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; + DWORD src_mask, dst_mask; + GLbitfield gl_mask; + + TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_rect %s.\n", + device, src_surface, wine_dbgstr_rect(src_rect), + dst_surface, wine_dbgstr_rect(dst_rect)); + + src_mask = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); + dst_mask = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); + + if (src_mask != dst_mask) + { + ERR("Incompatible formats %s and %s.\n", + debug_d3dformat(src_surface->resource.format->id), + debug_d3dformat(dst_surface->resource.format->id)); + return; + } + + if (!src_mask) + { + ERR("Not a depth / stencil format: %s.\n", + debug_d3dformat(src_surface->resource.format->id)); + return; + } + + gl_mask = 0; + if (src_mask & WINED3DFMT_FLAG_DEPTH) + gl_mask |= GL_DEPTH_BUFFER_BIT; + if (src_mask & WINED3DFMT_FLAG_STENCIL) + gl_mask |= GL_STENCIL_BUFFER_BIT; + + /* Make sure the locations are up-to-date. Loading the destination + * surface isn't required if the entire surface is overwritten. */ + surface_load_location(src_surface, SFLAG_INTEXTURE, NULL); + if (!surface_is_full_rect(dst_surface, dst_rect)) + surface_load_location(dst_surface, SFLAG_INTEXTURE, NULL); + + context = context_acquire(device, NULL); + if (!context->valid) + { + context_release(context); + WARN("Invalid context, skipping blit.\n"); + return; + } + + gl_info = context->gl_info; + + ENTER_GL(); + + context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, NULL, src_surface, SFLAG_INTEXTURE); + glReadBuffer(GL_NONE); + checkGLcall("glReadBuffer()"); + context_check_fbo_status(context, GL_READ_FRAMEBUFFER); + + context_apply_fbo_state_blit(context, GL_DRAW_FRAMEBUFFER, NULL, dst_surface, SFLAG_INTEXTURE); + context_set_draw_buffer(context, GL_NONE); + context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER); + + if (gl_mask & GL_DEPTH_BUFFER_BIT) + { + glDepthMask(GL_TRUE); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_ZWRITEENABLE)); + } + if (gl_mask & GL_STENCIL_BUFFER_BIT) + { + if (context->gl_info->supported[EXT_STENCIL_TWO_SIDE]) + { + glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE)); + } + glStencilMask(~0U); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_STENCILWRITEMASK)); + } + + glDisable(GL_SCISSOR_TEST); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); + + gl_info->fbo_ops.glBlitFramebuffer(src_rect->left, src_rect->top, src_rect->right, src_rect->bottom, + dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, gl_mask, GL_NEAREST); + checkGLcall("glBlitFramebuffer()"); + + LEAVE_GL(); + + if (wined3d_settings.strict_draw_ordering) + wglFlush(); /* Flush to ensure ordering across contexts. */ + + context_release(context); +} + +static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op, + const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, + const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format) +{ + if ((wined3d_settings.offscreen_rendering_mode != ORM_FBO) || !gl_info->fbo_ops.glBlitFramebuffer) + return FALSE; + + /* Source and/or destination need to be on the GL side */ + if (src_pool == WINED3DPOOL_SYSTEMMEM || dst_pool == WINED3DPOOL_SYSTEMMEM) + return FALSE; + + switch (blit_op) + { + case WINED3D_BLIT_OP_COLOR_BLIT: + if (!((src_format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (src_usage & WINED3DUSAGE_RENDERTARGET))) + return FALSE; + if (!((dst_format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (dst_usage & WINED3DUSAGE_RENDERTARGET))) + return FALSE; + break; + + case WINED3D_BLIT_OP_DEPTH_BLIT: + if (!(src_format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))) + return FALSE; + if (!(dst_format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))) + return FALSE; + break; + + default: + return FALSE; + } + + if (!(src_format->id == dst_format->id + || (is_identity_fixup(src_format->color_fixup) + && is_identity_fixup(dst_format->color_fixup)))) + return FALSE; + + return TRUE; +} + +static BOOL surface_convert_depth_to_float(struct wined3d_surface *surface, DWORD depth, float *float_depth) +{ + const struct wined3d_format *format = surface->resource.format; + + switch (format->id) + { + case WINED3DFMT_S1_UINT_D15_UNORM: + *float_depth = depth / (float)0x00007fff; + break; + + case WINED3DFMT_D16_UNORM: + *float_depth = depth / (float)0x0000ffff; + break; + + case WINED3DFMT_D24_UNORM_S8_UINT: + case WINED3DFMT_X8D24_UNORM: + *float_depth = depth / (float)0x00ffffff; + break; + + case WINED3DFMT_D32_UNORM: + *float_depth = depth / (float)0xffffffff; + break; + + default: + ERR("Unhandled conversion from %s to floating point.\n", debug_d3dformat(format->id)); + return FALSE; + } + + return TRUE; +} + +/* Do not call while under the GL lock. */ +static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const RECT *rect, float depth) +{ + const struct wined3d_resource *resource = &surface->resource; + struct wined3d_device *device = resource->device; + const struct blit_shader *blitter; + + blitter = wined3d_select_blitter(&device->adapter->gl_info, WINED3D_BLIT_OP_DEPTH_FILL, + NULL, 0, 0, NULL, rect, resource->usage, resource->pool, resource->format); + if (!blitter) + { + FIXME("No blitter is capable of performing the requested depth fill operation.\n"); + return WINED3DERR_INVALIDCALL; + } + + return blitter->depth_fill(device, surface, rect, depth); +} + +static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, const RECT *src_rect, + struct wined3d_surface *dst_surface, const RECT *dst_rect) +{ + struct wined3d_device *device = src_surface->resource.device; + + if (!fbo_blit_supported(&device->adapter->gl_info, WINED3D_BLIT_OP_DEPTH_BLIT, + src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format, + dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format)) + return WINED3DERR_INVALIDCALL; + + wined3d_surface_depth_blt_fbo(device, src_surface, src_rect, dst_surface, dst_rect); + + surface_modify_ds_location(dst_surface, SFLAG_DS_OFFSCREEN, + dst_surface->ds_current_size.cx, dst_surface->ds_current_size.cy); + surface_modify_location(dst_surface, SFLAG_INDRAWABLE, TRUE); + + return WINED3D_OK; +} + +/* Do not call while under the GL lock. */ +static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect_in, + struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags, + const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter) +{ + struct wined3d_device *device = dst_surface->resource.device; + DWORD src_ds_flags, dst_ds_flags; + + TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", + dst_surface, wine_dbgstr_rect(dst_rect_in), src_surface, wine_dbgstr_rect(src_rect_in), + flags, fx, debug_d3dtexturefiltertype(filter)); + TRACE("Usage is %s.\n", debug_d3dusage(dst_surface->resource.usage)); + + if ((dst_surface->flags & SFLAG_LOCKED) || (src_surface && (src_surface->flags & SFLAG_LOCKED))) + { + WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); + return WINEDDERR_SURFACEBUSY; + } + + dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); + if (src_surface) + src_ds_flags = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); + else + src_ds_flags = 0; + + if (src_ds_flags || dst_ds_flags) + { + if (flags & WINEDDBLT_DEPTHFILL) + { + float depth; + RECT rect; + + TRACE("Depth fill.\n"); + + surface_get_rect(dst_surface, dst_rect_in, &rect); + + if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth)) + return WINED3DERR_INVALIDCALL; + + if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, &rect, depth))) + return WINED3D_OK; + } + else + { + RECT src_rect, dst_rect; + + /* Accessing depth / stencil surfaces is supposed to fail while in + * a scene, except for fills, which seem to work. */ + if (device->inScene) + { + WARN("Rejecting depth / stencil access while in scene.\n"); + return WINED3DERR_INVALIDCALL; + } + + if (src_ds_flags != dst_ds_flags) + { + WARN("Rejecting depth / stencil blit between incompatible formats.\n"); + return WINED3DERR_INVALIDCALL; + } + + if (src_rect_in && (src_rect_in->top || src_rect_in->left + || src_rect_in->bottom != src_surface->resource.height + || src_rect_in->right != src_surface->resource.width)) + { + WARN("Rejecting depth / stencil blit with invalid source rect %s.\n", + wine_dbgstr_rect(src_rect_in)); + return WINED3DERR_INVALIDCALL; + } + + if (dst_rect_in && (dst_rect_in->top || dst_rect_in->left + || dst_rect_in->bottom != dst_surface->resource.height + || dst_rect_in->right != dst_surface->resource.width)) + { + WARN("Rejecting depth / stencil blit with invalid destination rect %s.\n", + wine_dbgstr_rect(src_rect_in)); + return WINED3DERR_INVALIDCALL; + } + + if (src_surface->resource.height != dst_surface->resource.height + || src_surface->resource.width != dst_surface->resource.width) + { + WARN("Rejecting depth / stencil blit with mismatched surface sizes.\n"); + return WINED3DERR_INVALIDCALL; + } + + surface_get_rect(src_surface, src_rect_in, &src_rect); + surface_get_rect(dst_surface, dst_rect_in, &dst_rect); + + if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, &src_rect, dst_surface, &dst_rect))) + return WINED3D_OK; + } + } + + /* Special cases for render targets. */ + if ((dst_surface->resource.usage & WINED3DUSAGE_RENDERTARGET) + || (src_surface && (src_surface->resource.usage & WINED3DUSAGE_RENDERTARGET))) + { + if (SUCCEEDED(IWineD3DSurfaceImpl_BltOverride(dst_surface, dst_rect_in, + src_surface, src_rect_in, flags, fx, filter))) + return WINED3D_OK; + } + + /* For the rest call the X11 surface implementation. For render targets + * this should be implemented OpenGL accelerated in BltOverride, other + * blits are rather rare. */ + return surface_cpu_blt(dst_surface, dst_rect_in, src_surface, src_rect_in, flags, fx, filter); +} + +/* Do not call while under the GL lock. */ +static HRESULT surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, + struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD trans) +{ + struct wined3d_device *device = dst_surface->resource.device; + + TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", + dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect_in), trans); + + if ((dst_surface->flags & SFLAG_LOCKED) || (src_surface->flags & SFLAG_LOCKED)) + { + WARN("Surface is busy, returning WINEDDERR_SURFACEBUSY.\n"); + return WINEDDERR_SURFACEBUSY; + } + + if (device->inScene && (dst_surface == device->fb.depth_stencil || src_surface == device->fb.depth_stencil)) + { + WARN("Attempt to access the depth / stencil surface while in a scene.\n"); + return WINED3DERR_INVALIDCALL; + } + + /* Special cases for RenderTargets */ + if ((dst_surface->resource.usage & WINED3DUSAGE_RENDERTARGET) + || (src_surface->resource.usage & WINED3DUSAGE_RENDERTARGET)) + { + + RECT src_rect, dst_rect; + DWORD flags = 0; + + surface_get_rect(src_surface, src_rect_in, &src_rect); + + dst_rect.left = dst_x; + dst_rect.top = dst_y; + dst_rect.right = dst_x + src_rect.right - src_rect.left; + dst_rect.bottom = dst_y + src_rect.bottom - src_rect.top; + + /* Convert BltFast flags into Blt ones because BltOverride is called + * from Blt as well. */ + if (trans & WINEDDBLTFAST_SRCCOLORKEY) + flags |= WINEDDBLT_KEYSRC; + if (trans & WINEDDBLTFAST_DESTCOLORKEY) + flags |= WINEDDBLT_KEYDEST; + if (trans & WINEDDBLTFAST_WAIT) + flags |= WINEDDBLT_WAIT; + if (trans & WINEDDBLTFAST_DONOTWAIT) + flags |= WINEDDBLT_DONOTWAIT; + + if (SUCCEEDED(IWineD3DSurfaceImpl_BltOverride(dst_surface, + &dst_rect, src_surface, &src_rect, flags, NULL, WINED3DTEXF_POINT))) + return WINED3D_OK; + } + + return surface_cpu_bltfast(dst_surface, dst_x, dst_y, src_surface, src_rect_in, trans); +} + +static HRESULT surface_set_mem(struct wined3d_surface *surface, void *mem) +{ + TRACE("surface %p, mem %p.\n", surface, mem); + + if (mem && mem != surface->resource.allocatedMemory) + { + void *release = NULL; + + /* Do I have to copy the old surface content? */ + if (surface->flags & SFLAG_DIBSECTION) + { + SelectObject(surface->hDC, surface->dib.holdbitmap); + DeleteDC(surface->hDC); + /* Release the DIB section. */ + DeleteObject(surface->dib.DIBsection); + surface->dib.bitmap_data = NULL; + surface->resource.allocatedMemory = NULL; + surface->hDC = NULL; + surface->flags &= ~SFLAG_DIBSECTION; + } + else if (!(surface->flags & SFLAG_USERPTR)) + { + release = surface->resource.heapMemory; + surface->resource.heapMemory = NULL; + } + surface->resource.allocatedMemory = mem; + surface->flags |= SFLAG_USERPTR; + + /* Now the surface memory is most up do date. Invalidate drawable and texture. */ + surface_modify_location(surface, SFLAG_INSYSMEM, TRUE); + + /* For client textures OpenGL has to be notified. */ + if (surface->flags & SFLAG_CLIENT) + surface_release_client_storage(surface); + + /* Now free the old memory if any. */ + HeapFree(GetProcessHeap(), 0, release); + } + else if (surface->flags & SFLAG_USERPTR) + { + /* Map and GetDC will re-create the dib section and allocated memory. */ + surface->resource.allocatedMemory = NULL; + /* HeapMemory should be NULL already. */ + if (surface->resource.heapMemory) + ERR("User pointer surface has heap memory allocated.\n"); + surface->flags &= ~(SFLAG_USERPTR | SFLAG_INSYSMEM); + + if (surface->flags & SFLAG_CLIENT) + surface_release_client_storage(surface); + + surface_prepare_system_memory(surface); + surface_modify_location(surface, SFLAG_INSYSMEM, TRUE); + } + + return WINED3D_OK; +} + +/* Context activation is done by the caller. */ +static void surface_remove_pbo(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info) +{ + if (!surface->resource.heapMemory) + { + surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), 0, surface->resource.size + RESOURCE_ALIGNMENT); + surface->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)surface->resource.heapMemory + + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + } + + ENTER_GL(); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); + checkGLcall("glBindBufferARB(GL_PIXEL_UNPACK_BUFFER, surface->pbo)"); + GL_EXTCALL(glGetBufferSubDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0, + surface->resource.size, surface->resource.allocatedMemory)); + checkGLcall("glGetBufferSubDataARB"); + GL_EXTCALL(glDeleteBuffersARB(1, &surface->pbo)); + checkGLcall("glDeleteBuffersARB"); + LEAVE_GL(); + + surface->pbo = 0; + surface->flags &= ~SFLAG_PBO; +} + +/* Do not call while under the GL lock. */ +static void surface_unload(struct wined3d_resource *resource) +{ + struct wined3d_surface *surface = surface_from_resource(resource); + struct wined3d_renderbuffer_entry *entry, *entry2; + struct wined3d_device *device = resource->device; + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; + + TRACE("surface %p.\n", surface); + + if (resource->pool == WINED3DPOOL_DEFAULT) + { + /* Default pool resources are supposed to be destroyed before Reset is called. + * Implicit resources stay however. So this means we have an implicit render target + * or depth stencil. The content may be destroyed, but we still have to tear down + * opengl resources, so we cannot leave early. + * + * Put the surfaces into sysmem, and reset the content. The D3D content is undefined, + * but we can't set the sysmem INDRAWABLE because when we're rendering the swapchain + * or the depth stencil into an FBO the texture or render buffer will be removed + * and all flags get lost + */ + surface_init_sysmem(surface); + } + else + { + /* Load the surface into system memory */ + surface_load_location(surface, SFLAG_INSYSMEM, NULL); + surface_modify_location(surface, SFLAG_INDRAWABLE, FALSE); + } + surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); + surface_modify_location(surface, SFLAG_INSRGBTEX, FALSE); + surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); + + context = context_acquire(device, NULL); + gl_info = context->gl_info; + + /* Destroy PBOs, but load them into real sysmem before */ + if (surface->flags & SFLAG_PBO) + surface_remove_pbo(surface, gl_info); + + /* Destroy fbo render buffers. This is needed for implicit render targets, for + * all application-created targets the application has to release the surface + * before calling _Reset + */ + LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &surface->renderbuffers, struct wined3d_renderbuffer_entry, entry) + { + ENTER_GL(); + gl_info->fbo_ops.glDeleteRenderbuffers(1, &entry->id); + LEAVE_GL(); + list_remove(&entry->entry); + HeapFree(GetProcessHeap(), 0, entry); + } + list_init(&surface->renderbuffers); + surface->current_renderbuffer = NULL; + + /* If we're in a texture, the texture name belongs to the texture. + * Otherwise, destroy it. */ + if (surface->container.type != WINED3D_CONTAINER_TEXTURE) + { + ENTER_GL(); + glDeleteTextures(1, &surface->texture_name); + surface->texture_name = 0; + glDeleteTextures(1, &surface->texture_name_srgb); + surface->texture_name_srgb = 0; + LEAVE_GL(); + } + + context_release(context); + + resource_unload(resource); +} + +static const struct wined3d_resource_ops surface_resource_ops = +{ + surface_unload, +}; + +static const struct wined3d_surface_ops surface_ops = +{ + surface_private_setup, + surface_cleanup, + surface_realize_palette, + surface_draw_overlay, + surface_preload, + surface_map, + surface_unmap, + surface_getdc, + surface_flip, + surface_blt, + surface_bltfast, + surface_set_mem, +}; + +/***************************************************************************** + * Initializes the GDI surface, aka creates the DIB section we render to + * The DIB section creation is done by calling GetDC, which will create the + * section and releasing the dc to allow the app to use it. The dib section + * will stay until the surface is released + * + * GDI surfaces do not need to be a power of 2 in size, so the pow2 sizes + * are set to the real sizes to save memory. The NONPOW2 flag is unset to + * avoid confusion in the shared surface code. + * + * Returns: + * WINED3D_OK on success + * The return values of called methods on failure + * + *****************************************************************************/ +static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface) +{ + HRESULT hr; + + TRACE("surface %p.\n", surface); + + if (surface->resource.usage & WINED3DUSAGE_OVERLAY) + { + ERR("Overlays not yet supported by GDI surfaces.\n"); + return WINED3DERR_INVALIDCALL; + } + + /* Sysmem textures have memory already allocated - release it, + * this avoids an unnecessary memcpy. */ + hr = surface_create_dib_section(surface); + if (SUCCEEDED(hr)) + { + HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); + surface->resource.heapMemory = NULL; + surface->resource.allocatedMemory = surface->dib.bitmap_data; + } + + /* We don't mind the nonpow2 stuff in GDI. */ + surface->pow2Width = surface->resource.width; + surface->pow2Height = surface->resource.height; + + return WINED3D_OK; +} + +static void surface_gdi_cleanup(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + if (surface->flags & SFLAG_DIBSECTION) + { + /* Release the DC. */ + SelectObject(surface->hDC, surface->dib.holdbitmap); + DeleteDC(surface->hDC); + /* Release the DIB section. */ + DeleteObject(surface->dib.DIBsection); + surface->dib.bitmap_data = NULL; + surface->resource.allocatedMemory = NULL; + } + + if (surface->flags & SFLAG_USERPTR) + wined3d_surface_set_mem(surface, NULL); + if (surface->overlay_dest) + list_remove(&surface->overlay_entry); + + HeapFree(GetProcessHeap(), 0, surface->palette9); + + resource_cleanup(&surface->resource); +} + +static void gdi_surface_realize_palette(struct wined3d_surface *surface) +{ + struct wined3d_palette *palette = surface->palette; + + TRACE("surface %p.\n", surface); + + if (!palette) return; + + if (surface->flags & SFLAG_DIBSECTION) + { + RGBQUAD col[256]; + unsigned int i; + + TRACE("Updating the DC's palette.\n"); + + for (i = 0; i < 256; ++i) + { + col[i].rgbRed = palette->palents[i].peRed; + col[i].rgbGreen = palette->palents[i].peGreen; + col[i].rgbBlue = palette->palents[i].peBlue; + col[i].rgbReserved = 0; + } + SetDIBColorTable(surface->hDC, 0, 256, col); + } + + /* Update the image because of the palette change. Some games like e.g. + * Red Alert call SetEntries a lot to implement fading. */ + /* Tell the swapchain to update the screen. */ + if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) + { + struct wined3d_swapchain *swapchain = surface->container.u.swapchain; + if (surface == swapchain->front_buffer) + { + x11_copy_to_screen(swapchain, NULL); + } + } +} + +static HRESULT gdi_surface_draw_overlay(struct wined3d_surface *surface) +{ + FIXME("GDI surfaces can't draw overlays yet.\n"); + return E_FAIL; +} + +static void gdi_surface_preload(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + ERR("Preloading GDI surfaces is not supported.\n"); +} + +static void gdi_surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags) +{ + TRACE("surface %p, rect %s, flags %#x.\n", + surface, wine_dbgstr_rect(rect), flags); + + if (!surface->resource.allocatedMemory) + { + /* This happens on gdi surfaces if the application set a user pointer + * and resets it. Recreate the DIB section. */ + surface_create_dib_section(surface); + surface->resource.allocatedMemory = surface->dib.bitmap_data; + } +} + +static void gdi_surface_unmap(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + /* Tell the swapchain to update the screen. */ + if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) + { + struct wined3d_swapchain *swapchain = surface->container.u.swapchain; + if (surface == swapchain->front_buffer) + { + x11_copy_to_screen(swapchain, &surface->lockedRect); + } + } + + memset(&surface->lockedRect, 0, sizeof(RECT)); +} + +static HRESULT gdi_surface_getdc(struct wined3d_surface *surface) +{ + WINED3DLOCKED_RECT lock; + HRESULT hr; + + TRACE("surface %p.\n", surface); + + /* Should have a DIB section already. */ + if (!(surface->flags & SFLAG_DIBSECTION)) + { + WARN("DC not supported on this surface\n"); + return WINED3DERR_INVALIDCALL; + } + + /* Map the surface. */ + hr = wined3d_surface_map(surface, &lock, NULL, 0); + if (FAILED(hr)) + ERR("Map failed, hr %#x.\n", hr); + + return hr; +} + +static HRESULT gdi_surface_flip(struct wined3d_surface *surface, struct wined3d_surface *override) +{ + TRACE("surface %p, override %p.\n", surface, override); + + return WINED3D_OK; +} + +static HRESULT gdi_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, + const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter) +{ + TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", + dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), + flags, fx, debug_d3dtexturefiltertype(filter)); + + return surface_cpu_blt(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter); +} + +static HRESULT gdi_surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD trans) +{ + TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", + dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), trans); + + return surface_cpu_bltfast(dst_surface, dst_x, dst_y, src_surface, src_rect, trans); +} + +static HRESULT gdi_surface_set_mem(struct wined3d_surface *surface, void *mem) +{ + TRACE("surface %p, mem %p.\n", surface, mem); + + /* Render targets depend on their hdc, and we can't create an hdc on a user pointer. */ + if (surface->resource.usage & WINED3DUSAGE_RENDERTARGET) + { + ERR("Not supported on render targets.\n"); + return WINED3DERR_INVALIDCALL; + } + + if (mem && mem != surface->resource.allocatedMemory) + { + void *release = NULL; + + /* Do I have to copy the old surface content? */ + if (surface->flags & SFLAG_DIBSECTION) + { + SelectObject(surface->hDC, surface->dib.holdbitmap); + DeleteDC(surface->hDC); + /* Release the DIB section. */ + DeleteObject(surface->dib.DIBsection); + surface->dib.bitmap_data = NULL; + surface->resource.allocatedMemory = NULL; + surface->hDC = NULL; + surface->flags &= ~SFLAG_DIBSECTION; + } + else if (!(surface->flags & SFLAG_USERPTR)) + { + release = surface->resource.allocatedMemory; + } + surface->resource.allocatedMemory = mem; + surface->flags |= SFLAG_USERPTR | SFLAG_INSYSMEM; + + /* Now free the old memory, if any. */ + HeapFree(GetProcessHeap(), 0, release); + } + else if (surface->flags & SFLAG_USERPTR) + { + /* Map() and GetDC() will re-create the dib section and allocated memory. */ + surface->resource.allocatedMemory = NULL; + surface->flags &= ~SFLAG_USERPTR; + } + + return WINED3D_OK; +} + +static const struct wined3d_surface_ops gdi_surface_ops = +{ + gdi_surface_private_setup, + surface_gdi_cleanup, + gdi_surface_realize_palette, + gdi_surface_draw_overlay, + gdi_surface_preload, + gdi_surface_map, + gdi_surface_unmap, + gdi_surface_getdc, + gdi_surface_flip, + gdi_surface_blt, + gdi_surface_bltfast, + gdi_surface_set_mem, +}; + +void surface_set_texture_name(struct wined3d_surface *surface, GLuint new_name, BOOL srgb) { GLuint *name; DWORD flag; @@ -491,7 +1906,7 @@ void surface_set_texture_name(IWineD3DSurfaceImpl *surface, GLuint new_name, BOO { /* FIXME: We shouldn't need to remove SFLAG_INTEXTURE if the * surface has no texture name yet. See if we can get rid of this. */ - if (surface->Flags & flag) + if (surface->flags & flag) ERR("Surface has %s set, but no texture name.\n", debug_surflocation(flag)); surface_modify_location(surface, flag, FALSE); } @@ -500,7 +1915,7 @@ void surface_set_texture_name(IWineD3DSurfaceImpl *surface, GLuint new_name, BOO surface_force_reload(surface); } -void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target) +void surface_set_texture_target(struct wined3d_surface *surface, GLenum target) { TRACE("surface %p, target %#x.\n", surface, target); @@ -508,11 +1923,11 @@ void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target) { if (target == GL_TEXTURE_RECTANGLE_ARB) { - surface->Flags &= ~SFLAG_NORMCOORD; + surface->flags &= ~SFLAG_NORMCOORD; } else if (surface->texture_target == GL_TEXTURE_RECTANGLE_ARB) { - surface->Flags |= SFLAG_NORMCOORD; + surface->flags |= SFLAG_NORMCOORD; } } surface->texture_target = target; @@ -520,39 +1935,62 @@ void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target) } /* Context activation is done by the caller. */ -static void surface_bind_and_dirtify(IWineD3DSurfaceImpl *This, BOOL srgb) { - DWORD active_sampler; +void surface_bind(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) +{ + TRACE("surface %p, gl_info %p, srgb %#x.\n", surface, gl_info, srgb); - /* We don't need a specific texture unit, but after binding the texture the current unit is dirty. - * Read the unit back instead of switching to 0, this avoids messing around with the state manager's - * gl states. The current texture unit should always be a valid one. - * - * To be more specific, this is tricky because we can implicitly be called - * from sampler() in state.c. This means we can't touch anything other than - * whatever happens to be the currently active texture, or we would risk - * marking already applied sampler states dirty again. - * - * TODO: Track the current active texture per GL context instead of using glGet - */ - GLint active_texture; - ENTER_GL(); - glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture); - LEAVE_GL(); - active_sampler = This->resource.device->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB]; - - if (active_sampler != WINED3D_UNMAPPED_STAGE) + if (surface->container.type == WINED3D_CONTAINER_TEXTURE) { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_SAMPLER(active_sampler)); + struct wined3d_texture *texture = surface->container.u.texture; + + TRACE("Passing to container (%p).\n", texture); + texture->texture_ops->texture_bind(texture, gl_info, srgb); + } + else + { + if (surface->texture_level) + { + ERR("Standalone surface %p is non-zero texture level %u.\n", + surface, surface->texture_level); + } + + if (srgb) + ERR("Trying to bind standalone surface %p as sRGB.\n", surface); + + ENTER_GL(); + + if (!surface->texture_name) + { + glGenTextures(1, &surface->texture_name); + checkGLcall("glGenTextures"); + + TRACE("Surface %p given name %u.\n", surface, surface->texture_name); + + glBindTexture(surface->texture_target, surface->texture_name); + checkGLcall("glBindTexture"); + glTexParameteri(surface->texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(surface->texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(surface->texture_target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + glTexParameteri(surface->texture_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(surface->texture_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + checkGLcall("glTexParameteri"); + } + else + { + glBindTexture(surface->texture_target, surface->texture_name); + checkGLcall("glBindTexture"); + } + + LEAVE_GL(); } - IWineD3DSurface_BindTexture((IWineD3DSurface *)This, srgb); } /* This function checks if the primary render target uses the 8bit paletted format. */ -static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device) +static BOOL primary_render_target_is_p8(struct wined3d_device *device) { - if (device->render_targets && device->render_targets[0]) + if (device->fb.render_targets && device->fb.render_targets[0]) { - IWineD3DSurfaceImpl *render_target = device->render_targets[0]; + struct wined3d_surface *render_target = device->fb.render_targets[0]; if ((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET) && (render_target->resource.format->id == WINED3DFMT_P8_UINT)) return TRUE; @@ -563,12 +2001,12 @@ static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device) /* This call just downloads data, the caller is responsible for binding the * correct texture. */ /* Context activation is done by the caller. */ -static void surface_download_data(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info) +static void surface_download_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info) { - const struct wined3d_format *format = This->resource.format; + const struct wined3d_format *format = surface->resource.format; - /* Only support read back of converted P8 surfaces */ - if (This->Flags & SFLAG_CONVERTED && format->id != WINED3DFMT_P8_UINT) + /* Only support read back of converted P8 surfaces. */ + if (surface->flags & SFLAG_CONVERTED && format->id != WINED3DFMT_P8_UINT) { FIXME("Readback conversion not supported for format %s.\n", debug_d3dformat(format->id)); return; @@ -576,72 +2014,81 @@ static void surface_download_data(IWineD3DSurfaceImpl *This, const struct wined3 ENTER_GL(); - if (format->Flags & WINED3DFMT_FLAG_COMPRESSED) + if (format->flags & WINED3DFMT_FLAG_COMPRESSED) { TRACE("(%p) : Calling glGetCompressedTexImageARB level %d, format %#x, type %#x, data %p.\n", - This, This->texture_level, format->glFormat, format->glType, - This->resource.allocatedMemory); + surface, surface->texture_level, format->glFormat, format->glType, + surface->resource.allocatedMemory); - if (This->Flags & SFLAG_PBO) + if (surface->flags & SFLAG_PBO) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, This->pbo)); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, surface->pbo)); checkGLcall("glBindBufferARB"); - GL_EXTCALL(glGetCompressedTexImageARB(This->texture_target, This->texture_level, NULL)); + GL_EXTCALL(glGetCompressedTexImageARB(surface->texture_target, surface->texture_level, NULL)); checkGLcall("glGetCompressedTexImageARB"); GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); checkGLcall("glBindBufferARB"); } else { - GL_EXTCALL(glGetCompressedTexImageARB(This->texture_target, - This->texture_level, This->resource.allocatedMemory)); + GL_EXTCALL(glGetCompressedTexImageARB(surface->texture_target, + surface->texture_level, surface->resource.allocatedMemory)); checkGLcall("glGetCompressedTexImageARB"); } LEAVE_GL(); - } else { + } + else + { void *mem; GLenum gl_format = format->glFormat; GLenum gl_type = format->glType; int src_pitch = 0; int dst_pitch = 0; - /* In case of P8 the index is stored in the alpha component if the primary render target uses P8 */ - if (format->id == WINED3DFMT_P8_UINT && primary_render_target_is_p8(This->resource.device)) + /* In case of P8 the index is stored in the alpha component if the primary render target uses P8. */ + if (format->id == WINED3DFMT_P8_UINT && primary_render_target_is_p8(surface->resource.device)) { gl_format = GL_ALPHA; gl_type = GL_UNSIGNED_BYTE; } - if (This->Flags & SFLAG_NONPOW2) { - unsigned char alignment = This->resource.device->surface_alignment; - src_pitch = format->byte_count * This->pow2Width; - dst_pitch = IWineD3DSurface_GetPitch((IWineD3DSurface *) This); + if (surface->flags & SFLAG_NONPOW2) + { + unsigned char alignment = surface->resource.device->surface_alignment; + src_pitch = format->byte_count * surface->pow2Width; + dst_pitch = wined3d_surface_get_pitch(surface); src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1); - mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * This->pow2Height); - } else { - mem = This->resource.allocatedMemory; + mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height); + } + else + { + mem = surface->resource.allocatedMemory; } TRACE("(%p) : Calling glGetTexImage level %d, format %#x, type %#x, data %p\n", - This, This->texture_level, gl_format, gl_type, mem); + surface, surface->texture_level, gl_format, gl_type, mem); - if(This->Flags & SFLAG_PBO) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, This->pbo)); + if (surface->flags & SFLAG_PBO) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, surface->pbo)); checkGLcall("glBindBufferARB"); - glGetTexImage(This->texture_target, This->texture_level, gl_format, gl_type, NULL); + glGetTexImage(surface->texture_target, surface->texture_level, gl_format, gl_type, NULL); checkGLcall("glGetTexImage"); GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); checkGLcall("glBindBufferARB"); - } else { - glGetTexImage(This->texture_target, This->texture_level, gl_format, gl_type, mem); + } + else + { + glGetTexImage(surface->texture_target, surface->texture_level, gl_format, gl_type, mem); checkGLcall("glGetTexImage"); } LEAVE_GL(); - if (This->Flags & SFLAG_NONPOW2) { + if (surface->flags & SFLAG_NONPOW2) + { const BYTE *src_data; BYTE *dst_data; UINT y; @@ -689,16 +2136,16 @@ static void surface_download_data(IWineD3DSurfaceImpl *This, const struct wined3 * standard texture with a non-power2 width instead of texture boxed up to be a power2 texture. * * internally the texture is still stored in a boxed format so any references to textureName will - * get a boxed texture with width pow2width and not a texture of width currentDesc.Width. + * get a boxed texture with width pow2width and not a texture of width resource.width. * * Performance should not be an issue, because applications normally do not lock the surfaces when * rendering. If an app does, the SFLAG_DYNLOCK flag will kick in and the memory copy won't be released, - * and doesn't have to be re-read. - */ + * and doesn't have to be re-read. */ src_data = mem; - dst_data = This->resource.allocatedMemory; - TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", This, src_pitch, dst_pitch); - for (y = 1 ; y < This->currentDesc.Height; y++) { + dst_data = surface->resource.allocatedMemory; + TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", surface, src_pitch, dst_pitch); + for (y = 1; y < surface->resource.height; ++y) + { /* skip the first row */ src_data += src_pitch; dst_data += dst_pitch; @@ -710,24 +2157,24 @@ static void surface_download_data(IWineD3DSurfaceImpl *This, const struct wined3 } /* Surface has now been downloaded */ - This->Flags |= SFLAG_INSYSMEM; + surface->flags |= SFLAG_INSYSMEM; } /* This call just uploads data, the caller is responsible for binding the * correct texture. */ /* Context activation is done by the caller. */ -static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info, +static void surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, const struct wined3d_format *format, BOOL srgb, const GLvoid *data) { - GLsizei width = This->currentDesc.Width; - GLsizei height = This->currentDesc.Height; + GLsizei width = surface->resource.width; + GLsizei height = surface->resource.height; GLenum internal; if (srgb) { internal = format->glGammaInternal; } - else if (This->resource.usage & WINED3DUSAGE_RENDERTARGET && surface_is_offscreen(This)) + else if (surface->resource.usage & WINED3DUSAGE_RENDERTARGET && surface_is_offscreen(surface)) { internal = format->rtInternal; } @@ -736,42 +2183,42 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_ internal = format->glInternal; } - TRACE("This %p, internal %#x, width %d, height %d, format %#x, type %#x, data %p.\n", - This, internal, width, height, format->glFormat, format->glType, data); + TRACE("surface %p, internal %#x, width %d, height %d, format %#x, type %#x, data %p.\n", + surface, internal, width, height, format->glFormat, format->glType, data); TRACE("target %#x, level %u, resource size %u.\n", - This->texture_target, This->texture_level, This->resource.size); + surface->texture_target, surface->texture_level, surface->resource.size); if (format->heightscale != 1.0f && format->heightscale != 0.0f) height *= format->heightscale; ENTER_GL(); - if (This->Flags & SFLAG_PBO) + if (surface->flags & SFLAG_PBO) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); checkGLcall("glBindBufferARB"); - TRACE("(%p) pbo: %#x, data: %p.\n", This, This->pbo, data); + TRACE("(%p) pbo: %#x, data: %p.\n", surface, surface->pbo, data); data = NULL; } - if (format->Flags & WINED3DFMT_FLAG_COMPRESSED) + if (format->flags & WINED3DFMT_FLAG_COMPRESSED) { TRACE("Calling glCompressedTexSubImage2DARB.\n"); - GL_EXTCALL(glCompressedTexSubImage2DARB(This->texture_target, This->texture_level, - 0, 0, width, height, internal, This->resource.size, data)); + GL_EXTCALL(glCompressedTexSubImage2DARB(surface->texture_target, surface->texture_level, + 0, 0, width, height, internal, surface->resource.size, data)); checkGLcall("glCompressedTexSubImage2DARB"); } else { TRACE("Calling glTexSubImage2D.\n"); - glTexSubImage2D(This->texture_target, This->texture_level, + glTexSubImage2D(surface->texture_target, surface->texture_level, 0, 0, width, height, format->glFormat, format->glType, data); checkGLcall("glTexSubImage2D"); } - if (This->Flags & SFLAG_PBO) + if (surface->flags & SFLAG_PBO) { GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); checkGLcall("glBindBufferARB"); @@ -781,12 +2228,12 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_ if (gl_info->quirks & WINED3D_QUIRK_FBO_TEX_UPDATE) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = surface->resource.device; unsigned int i; - for (i = 0; i < device->numContexts; ++i) + for (i = 0; i < device->context_count; ++i) { - context_surface_update(device->contexts[i], This); + context_surface_update(device->contexts[i], surface); } } } @@ -794,12 +2241,12 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_ /* This call just allocates the texture, the caller is responsible for binding * the correct texture. */ /* Context activation is done by the caller. */ -static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info, +static void surface_allocate_surface(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, const struct wined3d_format *format, BOOL srgb) { BOOL enable_client_storage = FALSE; - GLsizei width = This->pow2Width; - GLsizei height = This->pow2Height; + GLsizei width = surface->pow2Width; + GLsizei height = surface->pow2Height; const BYTE *mem = NULL; GLenum internal; @@ -807,7 +2254,7 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct win { internal = format->glGammaInternal; } - else if (This->resource.usage & WINED3DUSAGE_RENDERTARGET && surface_is_offscreen(This)) + else if (surface->resource.usage & WINED3DUSAGE_RENDERTARGET && surface_is_offscreen(surface)) { internal = format->rtInternal; } @@ -819,15 +2266,15 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct win if (format->heightscale != 1.0f && format->heightscale != 0.0f) height *= format->heightscale; TRACE("(%p) : Creating surface (target %#x) level %d, d3d format %s, internal format %#x, width %d, height %d, gl format %#x, gl type=%#x\n", - This, This->texture_target, This->texture_level, debug_d3dformat(format->id), + surface, surface->texture_target, surface->texture_level, debug_d3dformat(format->id), internal, width, height, format->glFormat, format->glType); ENTER_GL(); if (gl_info->supported[APPLE_CLIENT_STORAGE]) { - if (This->Flags & (SFLAG_NONPOW2 | SFLAG_DIBSECTION | SFLAG_CONVERTED) - || !This->resource.allocatedMemory) + if (surface->flags & (SFLAG_NONPOW2 | SFLAG_DIBSECTION | SFLAG_CONVERTED) + || !surface->resource.allocatedMemory) { /* In some cases we want to disable client storage. * SFLAG_NONPOW2 has a bigger opengl texture than the client memory, and different pitches @@ -837,27 +2284,30 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct win */ glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); - This->Flags &= ~SFLAG_CLIENT; + surface->flags &= ~SFLAG_CLIENT; enable_client_storage = TRUE; - } else { - This->Flags |= SFLAG_CLIENT; + } + else + { + surface->flags |= SFLAG_CLIENT; - /* Point opengl to our allocated texture memory. Do not use resource.allocatedMemory here because - * it might point into a pbo. Instead use heapMemory, but get the alignment right. - */ - mem = (BYTE *)(((ULONG_PTR) This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + /* Point OpenGL to our allocated texture memory. Do not use + * resource.allocatedMemory here because it might point into a + * PBO. Instead use heapMemory, but get the alignment right. */ + mem = (BYTE *)(((ULONG_PTR)surface->resource.heapMemory + + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); } } - if (format->Flags & WINED3DFMT_FLAG_COMPRESSED && mem) + if (format->flags & WINED3DFMT_FLAG_COMPRESSED && mem) { - GL_EXTCALL(glCompressedTexImage2DARB(This->texture_target, This->texture_level, - internal, width, height, 0, This->resource.size, mem)); + GL_EXTCALL(glCompressedTexImage2DARB(surface->texture_target, surface->texture_level, + internal, width, height, 0, surface->resource.size, mem)); checkGLcall("glCompressedTexImage2DARB"); } else { - glTexImage2D(This->texture_target, This->texture_level, + glTexImage2D(surface->texture_target, surface->texture_level, internal, width, height, 0, format->glFormat, format->glType, mem); checkGLcall("glTexImage2D"); } @@ -873,12 +2323,24 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct win * render target dimensions. With FBOs, the dimensions have to be an exact match. */ /* TODO: We should synchronize the renderbuffer's content with the texture's content. */ /* GL locking is done by the caller */ -void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface, unsigned int width, unsigned int height) +void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, struct wined3d_surface *rt) { const struct wined3d_gl_info *gl_info = &surface->resource.device->adapter->gl_info; - renderbuffer_entry_t *entry; + struct wined3d_renderbuffer_entry *entry; GLuint renderbuffer = 0; unsigned int src_width, src_height; + unsigned int width, height; + + if (rt && rt->resource.format->id != WINED3DFMT_NULL) + { + width = rt->pow2Width; + height = rt->pow2Height; + } + else + { + width = surface->pow2Width; + height = surface->pow2Height; + } src_width = surface->pow2Width; src_height = surface->pow2Height; @@ -895,7 +2357,7 @@ void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface, unsigned } /* Look if we've already got a renderbuffer of the correct dimensions */ - LIST_FOR_EACH_ENTRY(entry, &surface->renderbuffers, renderbuffer_entry_t, entry) + LIST_FOR_EACH_ENTRY(entry, &surface->renderbuffers, struct wined3d_renderbuffer_entry, entry) { if (entry->width == width && entry->height == height) { @@ -912,7 +2374,7 @@ void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface, unsigned gl_info->fbo_ops.glRenderbufferStorage(GL_RENDERBUFFER, surface->resource.format->glInternal, width, height); - entry = HeapAlloc(GetProcessHeap(), 0, sizeof(renderbuffer_entry_t)); + entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*entry)); entry->width = width; entry->height = height; entry->id = renderbuffer; @@ -924,9 +2386,9 @@ void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface, unsigned checkGLcall("set_compatible_renderbuffer"); } -GLenum surface_get_gl_buffer(IWineD3DSurfaceImpl *surface) +GLenum surface_get_gl_buffer(struct wined3d_surface *surface) { - IWineD3DSwapChainImpl *swapchain = surface->container.u.swapchain; + struct wined3d_swapchain *swapchain = surface->container.u.swapchain; TRACE("surface %p.\n", surface); @@ -957,42 +2419,43 @@ GLenum surface_get_gl_buffer(IWineD3DSurfaceImpl *surface) } /* Slightly inefficient way to handle multiple dirty rects but it works :) */ -void surface_add_dirty_rect(IWineD3DSurfaceImpl *surface, const RECT *dirty_rect) +void surface_add_dirty_rect(struct wined3d_surface *surface, const WINED3DBOX *dirty_rect) { - TRACE("surface %p, dirty_rect %s.\n", surface, wine_dbgstr_rect(dirty_rect)); + TRACE("surface %p, dirty_rect %p.\n", surface, dirty_rect); - if (!(surface->Flags & SFLAG_INSYSMEM) && (surface->Flags & SFLAG_INTEXTURE)) + if (!(surface->flags & SFLAG_INSYSMEM) && (surface->flags & SFLAG_INTEXTURE)) /* No partial locking for textures yet. */ surface_load_location(surface, SFLAG_INSYSMEM, NULL); surface_modify_location(surface, SFLAG_INSYSMEM, TRUE); if (dirty_rect) { - surface->dirtyRect.left = min(surface->dirtyRect.left, dirty_rect->left); - surface->dirtyRect.top = min(surface->dirtyRect.top, dirty_rect->top); - surface->dirtyRect.right = max(surface->dirtyRect.right, dirty_rect->right); - surface->dirtyRect.bottom = max(surface->dirtyRect.bottom, dirty_rect->bottom); + surface->dirtyRect.left = min(surface->dirtyRect.left, dirty_rect->Left); + surface->dirtyRect.top = min(surface->dirtyRect.top, dirty_rect->Top); + surface->dirtyRect.right = max(surface->dirtyRect.right, dirty_rect->Right); + surface->dirtyRect.bottom = max(surface->dirtyRect.bottom, dirty_rect->Bottom); } else { surface->dirtyRect.left = 0; surface->dirtyRect.top = 0; - surface->dirtyRect.right = surface->currentDesc.Width; - surface->dirtyRect.bottom = surface->currentDesc.Height; + surface->dirtyRect.right = surface->resource.width; + surface->dirtyRect.bottom = surface->resource.height; } - /* if the container is a basetexture then mark it dirty. */ + /* if the container is a texture then mark it dirty. */ if (surface->container.type == WINED3D_CONTAINER_TEXTURE) { TRACE("Passing to container.\n"); - IWineD3DBaseTexture_SetDirty((IWineD3DBaseTexture *)surface->container.u.texture, TRUE); + wined3d_texture_set_dirty(surface->container.u.texture, TRUE); } } -static BOOL surface_convert_color_to_float(IWineD3DSurfaceImpl *surface, DWORD color, WINED3DCOLORVALUE *float_color) +static BOOL surface_convert_color_to_float(struct wined3d_surface *surface, + DWORD color, WINED3DCOLORVALUE *float_color) { const struct wined3d_format *format = surface->resource.format; - IWineD3DDeviceImpl *device = surface->resource.device; + struct wined3d_device *device = surface->resource.device; switch (format->id) { @@ -1042,42 +2505,1145 @@ static BOOL surface_convert_color_to_float(IWineD3DSurfaceImpl *surface, DWORD c return TRUE; } -/* Do not call while under the GL lock. */ -static ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) +HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - ULONG ref = InterlockedDecrement(&This->resource.ref); - TRACE("(%p) : Releasing from %d\n", This, ref + 1); + DWORD flag = srgb ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE; - if (!ref) + TRACE("surface %p, srgb %#x.\n", surface, srgb); + + if (surface->resource.pool == WINED3DPOOL_SCRATCH) { - surface_cleanup(This); - This->resource.parent_ops->wined3d_object_destroyed(This->resource.parent); - - TRACE("(%p) Released.\n", This); - HeapFree(GetProcessHeap(), 0, This); + ERR("Not supported on scratch surfaces.\n"); + return WINED3DERR_INVALIDCALL; } - return ref; + if (!(surface->flags & flag)) + { + TRACE("Reloading because surface is dirty\n"); + } + /* Reload if either the texture and sysmem have different ideas about the + * color key, or the actual key values changed. */ + else if (!(surface->flags & SFLAG_GLCKEY) != !(surface->CKeyFlags & WINEDDSD_CKSRCBLT) + || ((surface->CKeyFlags & WINEDDSD_CKSRCBLT) + && (surface->glCKey.dwColorSpaceLowValue != surface->SrcBltCKey.dwColorSpaceLowValue + || surface->glCKey.dwColorSpaceHighValue != surface->SrcBltCKey.dwColorSpaceHighValue))) + { + TRACE("Reloading because of color keying\n"); + /* To perform the color key conversion we need a sysmem copy of + * the surface. Make sure we have it. */ + + surface_load_location(surface, SFLAG_INSYSMEM, NULL); + /* Make sure the texture is reloaded because of the color key change, + * this kills performance though :( */ + /* TODO: This is not necessarily needed with hw palettized texture support. */ + surface_modify_location(surface, SFLAG_INSYSMEM, TRUE); + } + else + { + TRACE("surface is already in texture\n"); + return WINED3D_OK; + } + + /* No partial locking for textures yet. */ + surface_load_location(surface, flag, NULL); + surface_evict_sysmem(surface); + + return WINED3D_OK; } -/* **************************************************** - IWineD3DSurface IWineD3DResource parts follow - **************************************************** */ +/* See also float_16_to_32() in wined3d_private.h */ +static inline unsigned short float_32_to_16(const float *in) +{ + int exp = 0; + float tmp = fabsf(*in); + unsigned int mantissa; + unsigned short ret; + + /* Deal with special numbers */ + if (*in == 0.0f) + return 0x0000; + if (isnan(*in)) + return 0x7c01; + if (isinf(*in)) + return (*in < 0.0f ? 0xfc00 : 0x7c00); + + if (tmp < powf(2, 10)) + { + do + { + tmp = tmp * 2.0f; + exp--; + } while (tmp < powf(2, 10)); + } + else if (tmp >= powf(2, 11)) + { + do + { + tmp /= 2.0f; + exp++; + } while (tmp >= powf(2, 11)); + } + + mantissa = (unsigned int)tmp; + if (tmp - mantissa >= 0.5f) + ++mantissa; /* Round to nearest, away from zero. */ + + exp += 10; /* Normalize the mantissa. */ + exp += 15; /* Exponent is encoded with excess 15. */ + + if (exp > 30) /* too big */ + { + ret = 0x7c00; /* INF */ + } + else if (exp <= 0) + { + /* exp == 0: Non-normalized mantissa. Returns 0x0000 (=0.0) for too small numbers. */ + while (exp <= 0) + { + mantissa = mantissa >> 1; + ++exp; + } + ret = mantissa & 0x3ff; + } + else + { + ret = (exp << 10) | (mantissa & 0x3ff); + } + + ret |= ((*in < 0.0f ? 1 : 0) << 15); /* Add the sign */ + return ret; +} + +ULONG CDECL wined3d_surface_incref(struct wined3d_surface *surface) +{ + ULONG refcount; + + TRACE("Surface %p, container %p of type %#x.\n", + surface, surface->container.u.base, surface->container.type); + + switch (surface->container.type) + { + case WINED3D_CONTAINER_TEXTURE: + return wined3d_texture_incref(surface->container.u.texture); + + case WINED3D_CONTAINER_SWAPCHAIN: + return wined3d_swapchain_incref(surface->container.u.swapchain); + + default: + ERR("Unhandled container type %#x.\n", surface->container.type); + case WINED3D_CONTAINER_NONE: + break; + } + + refcount = InterlockedIncrement(&surface->resource.ref); + TRACE("%p increasing refcount to %u.\n", surface, refcount); + + return refcount; +} /* Do not call while under the GL lock. */ -void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srgb) +ULONG CDECL wined3d_surface_decref(struct wined3d_surface *surface) { - IWineD3DDeviceImpl *device = surface->resource.device; + ULONG refcount; + + TRACE("Surface %p, container %p of type %#x.\n", + surface, surface->container.u.base, surface->container.type); + + switch (surface->container.type) + { + case WINED3D_CONTAINER_TEXTURE: + return wined3d_texture_decref(surface->container.u.texture); + + case WINED3D_CONTAINER_SWAPCHAIN: + return wined3d_swapchain_decref(surface->container.u.swapchain); + + default: + ERR("Unhandled container type %#x.\n", surface->container.type); + case WINED3D_CONTAINER_NONE: + break; + } + + refcount = InterlockedDecrement(&surface->resource.ref); + TRACE("%p decreasing refcount to %u.\n", surface, refcount); + + if (!refcount) + { + surface->surface_ops->surface_cleanup(surface); + surface->resource.parent_ops->wined3d_object_destroyed(surface->resource.parent); + + TRACE("Destroyed surface %p.\n", surface); + HeapFree(GetProcessHeap(), 0, surface); + } + + return refcount; +} + +HRESULT CDECL wined3d_surface_set_private_data(struct wined3d_surface *surface, + REFGUID riid, const void *data, DWORD data_size, DWORD flags) +{ + return resource_set_private_data(&surface->resource, riid, data, data_size, flags); +} + +HRESULT CDECL wined3d_surface_get_private_data(const struct wined3d_surface *surface, + REFGUID guid, void *data, DWORD *data_size) +{ + return resource_get_private_data(&surface->resource, guid, data, data_size); +} + +HRESULT CDECL wined3d_surface_free_private_data(struct wined3d_surface *surface, REFGUID refguid) +{ + return resource_free_private_data(&surface->resource, refguid); +} + +DWORD CDECL wined3d_surface_set_priority(struct wined3d_surface *surface, DWORD priority) +{ + return resource_set_priority(&surface->resource, priority); +} + +DWORD CDECL wined3d_surface_get_priority(const struct wined3d_surface *surface) +{ + return resource_get_priority(&surface->resource); +} + +void CDECL wined3d_surface_preload(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + surface->surface_ops->surface_preload(surface); +} + +void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + return surface->resource.parent; +} + +struct wined3d_resource * CDECL wined3d_surface_get_resource(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + return &surface->resource; +} + +HRESULT CDECL wined3d_surface_get_blt_status(const struct wined3d_surface *surface, DWORD flags) +{ + TRACE("surface %p, flags %#x.\n", surface, flags); + + switch (flags) + { + case WINEDDGBS_CANBLT: + case WINEDDGBS_ISBLTDONE: + return WINED3D_OK; + + default: + return WINED3DERR_INVALIDCALL; + } +} + +HRESULT CDECL wined3d_surface_get_flip_status(const struct wined3d_surface *surface, DWORD flags) +{ + TRACE("surface %p, flags %#x.\n", surface, flags); + + /* XXX: DDERR_INVALIDSURFACETYPE */ + + switch (flags) + { + case WINEDDGFS_CANFLIP: + case WINEDDGFS_ISFLIPDONE: + return WINED3D_OK; + + default: + return WINED3DERR_INVALIDCALL; + } +} + +HRESULT CDECL wined3d_surface_is_lost(const struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + /* D3D8 and 9 loose full devices, ddraw only surfaces. */ + return surface->flags & SFLAG_LOST ? WINED3DERR_DEVICELOST : WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + /* So far we don't lose anything :) */ + surface->flags &= ~SFLAG_LOST; + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_set_palette(struct wined3d_surface *surface, struct wined3d_palette *palette) +{ + TRACE("surface %p, palette %p.\n", surface, palette); + + if (surface->palette == palette) + { + TRACE("Nop palette change.\n"); + return WINED3D_OK; + } + + if (surface->palette && (surface->resource.usage & WINED3DUSAGE_RENDERTARGET)) + surface->palette->flags &= ~WINEDDPCAPS_PRIMARYSURFACE; + + surface->palette = palette; + + if (palette) + { + if (surface->resource.usage & WINED3DUSAGE_RENDERTARGET) + palette->flags |= WINEDDPCAPS_PRIMARYSURFACE; + + surface->surface_ops->surface_realize_palette(surface); + } + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_set_color_key(struct wined3d_surface *surface, + DWORD flags, const WINEDDCOLORKEY *color_key) +{ + TRACE("surface %p, flags %#x, color_key %p.\n", surface, flags, color_key); + + if (flags & WINEDDCKEY_COLORSPACE) + { + FIXME(" colorkey value not supported (%08x) !\n", flags); + return WINED3DERR_INVALIDCALL; + } + + /* Dirtify the surface, but only if a key was changed. */ + if (color_key) + { + switch (flags & ~WINEDDCKEY_COLORSPACE) + { + case WINEDDCKEY_DESTBLT: + surface->DestBltCKey = *color_key; + surface->CKeyFlags |= WINEDDSD_CKDESTBLT; + break; + + case WINEDDCKEY_DESTOVERLAY: + surface->DestOverlayCKey = *color_key; + surface->CKeyFlags |= WINEDDSD_CKDESTOVERLAY; + break; + + case WINEDDCKEY_SRCOVERLAY: + surface->SrcOverlayCKey = *color_key; + surface->CKeyFlags |= WINEDDSD_CKSRCOVERLAY; + break; + + case WINEDDCKEY_SRCBLT: + surface->SrcBltCKey = *color_key; + surface->CKeyFlags |= WINEDDSD_CKSRCBLT; + break; + } + } + else + { + switch (flags & ~WINEDDCKEY_COLORSPACE) + { + case WINEDDCKEY_DESTBLT: + surface->CKeyFlags &= ~WINEDDSD_CKDESTBLT; + break; + + case WINEDDCKEY_DESTOVERLAY: + surface->CKeyFlags &= ~WINEDDSD_CKDESTOVERLAY; + break; + + case WINEDDCKEY_SRCOVERLAY: + surface->CKeyFlags &= ~WINEDDSD_CKSRCOVERLAY; + break; + + case WINEDDCKEY_SRCBLT: + surface->CKeyFlags &= ~WINEDDSD_CKSRCBLT; + break; + } + } + + return WINED3D_OK; +} + +struct wined3d_palette * CDECL wined3d_surface_get_palette(const struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + return surface->palette; +} + +DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface) +{ + const struct wined3d_format *format = surface->resource.format; + DWORD pitch; + + TRACE("surface %p.\n", surface); + + if ((format->flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED) + { + /* Since compressed formats are block based, pitch means the amount of + * bytes to the next row of block rather than the next row of pixels. */ + UINT row_block_count = (surface->resource.width + format->block_width - 1) / format->block_width; + pitch = row_block_count * format->block_byte_count; + } + else + { + unsigned char alignment = surface->resource.device->surface_alignment; + pitch = surface->resource.format->byte_count * surface->resource.width; /* Bytes / row */ + pitch = (pitch + alignment - 1) & ~(alignment - 1); + } + + TRACE("Returning %u.\n", pitch); + + return pitch; +} + +HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem) +{ + TRACE("surface %p, mem %p.\n", surface, mem); + + if (surface->flags & (SFLAG_LOCKED | SFLAG_DCINUSE)) + { + WARN("Surface is locked or the DC is in use.\n"); + return WINED3DERR_INVALIDCALL; + } + + return surface->surface_ops->surface_set_mem(surface, mem); +} + +HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y) +{ + LONG w, h; + + TRACE("surface %p, x %d, y %d.\n", surface, x, y); + + if (!(surface->resource.usage & WINED3DUSAGE_OVERLAY)) + { + WARN("Not an overlay surface.\n"); + return WINEDDERR_NOTAOVERLAYSURFACE; + } + + w = surface->overlay_destrect.right - surface->overlay_destrect.left; + h = surface->overlay_destrect.bottom - surface->overlay_destrect.top; + surface->overlay_destrect.left = x; + surface->overlay_destrect.top = y; + surface->overlay_destrect.right = x + w; + surface->overlay_destrect.bottom = y + h; + + surface->surface_ops->surface_draw_overlay(surface); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y) +{ + TRACE("surface %p, x %p, y %p.\n", surface, x, y); + + if (!(surface->resource.usage & WINED3DUSAGE_OVERLAY)) + { + TRACE("Not an overlay surface.\n"); + return WINEDDERR_NOTAOVERLAYSURFACE; + } + + if (!surface->overlay_dest) + { + TRACE("Overlay not visible.\n"); + *x = 0; + *y = 0; + return WINEDDERR_OVERLAYNOTVISIBLE; + } + + *x = surface->overlay_destrect.left; + *y = surface->overlay_destrect.top; + + TRACE("Returning position %d, %d.\n", *x, *y); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_update_overlay_z_order(struct wined3d_surface *surface, + DWORD flags, struct wined3d_surface *ref) +{ + FIXME("surface %p, flags %#x, ref %p stub!\n", surface, flags, ref); + + if (!(surface->resource.usage & WINED3DUSAGE_OVERLAY)) + { + TRACE("Not an overlay surface.\n"); + return WINEDDERR_NOTAOVERLAYSURFACE; + } + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_update_overlay(struct wined3d_surface *surface, const RECT *src_rect, + struct wined3d_surface *dst_surface, const RECT *dst_rect, DWORD flags, const WINEDDOVERLAYFX *fx) +{ + TRACE("surface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n", + surface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx); + + if (!(surface->resource.usage & WINED3DUSAGE_OVERLAY)) + { + WARN("Not an overlay surface.\n"); + return WINEDDERR_NOTAOVERLAYSURFACE; + } + else if (!dst_surface) + { + WARN("Dest surface is NULL.\n"); + return WINED3DERR_INVALIDCALL; + } + + if (src_rect) + { + surface->overlay_srcrect = *src_rect; + } + else + { + surface->overlay_srcrect.left = 0; + surface->overlay_srcrect.top = 0; + surface->overlay_srcrect.right = surface->resource.width; + surface->overlay_srcrect.bottom = surface->resource.height; + } + + if (dst_rect) + { + surface->overlay_destrect = *dst_rect; + } + else + { + surface->overlay_destrect.left = 0; + surface->overlay_destrect.top = 0; + surface->overlay_destrect.right = dst_surface ? dst_surface->resource.width : 0; + surface->overlay_destrect.bottom = dst_surface ? dst_surface->resource.height : 0; + } + + if (surface->overlay_dest && (surface->overlay_dest != dst_surface || flags & WINEDDOVER_HIDE)) + { + list_remove(&surface->overlay_entry); + } + + if (flags & WINEDDOVER_SHOW) + { + if (surface->overlay_dest != dst_surface) + { + surface->overlay_dest = dst_surface; + list_add_tail(&dst_surface->overlays, &surface->overlay_entry); + } + } + else if (flags & WINEDDOVER_HIDE) + { + /* tests show that the rectangles are erased on hide */ + surface->overlay_srcrect.left = 0; surface->overlay_srcrect.top = 0; + surface->overlay_srcrect.right = 0; surface->overlay_srcrect.bottom = 0; + surface->overlay_destrect.left = 0; surface->overlay_destrect.top = 0; + surface->overlay_destrect.right = 0; surface->overlay_destrect.bottom = 0; + surface->overlay_dest = NULL; + } + + surface->surface_ops->surface_draw_overlay(surface); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_set_clipper(struct wined3d_surface *surface, struct wined3d_clipper *clipper) +{ + TRACE("surface %p, clipper %p.\n", surface, clipper); + + surface->clipper = clipper; + + return WINED3D_OK; +} + +struct wined3d_clipper * CDECL wined3d_surface_get_clipper(const struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + return surface->clipper; +} + +HRESULT CDECL wined3d_surface_set_format(struct wined3d_surface *surface, enum wined3d_format_id format_id) +{ + const struct wined3d_format *format = wined3d_get_format(&surface->resource.device->adapter->gl_info, format_id); + + TRACE("surface %p, format %s.\n", surface, debug_d3dformat(format_id)); + + if (surface->resource.format->id != WINED3DFMT_UNKNOWN) + { + FIXME("The format of the surface must be WINED3DFORMAT_UNKNOWN.\n"); + return WINED3DERR_INVALIDCALL; + } + + surface->resource.size = wined3d_format_calculate_size(format, surface->resource.device->surface_alignment, + surface->pow2Width, surface->pow2Height); + surface->flags |= (WINED3DFMT_D16_LOCKABLE == format_id) ? SFLAG_LOCKABLE : 0; + surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); + surface->resource.format = format; + + TRACE("size %u, byte_count %u\n", surface->resource.size, format->byte_count); + TRACE("glFormat %#x, glInternal %#x, glType %#x.\n", + format->glFormat, format->glInternal, format->glType); + + return WINED3D_OK; +} + +static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst, + DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) +{ + unsigned short *dst_s; + const float *src_f; + unsigned int x, y; + + TRACE("Converting %ux%u pixels, pitches %u %u.\n", w, h, pitch_in, pitch_out); + + for (y = 0; y < h; ++y) + { + src_f = (const float *)(src + y * pitch_in); + dst_s = (unsigned short *) (dst + y * pitch_out); + for (x = 0; x < w; ++x) + { + dst_s[x] = float_32_to_16(src_f + x); + } + } +} + +static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst, + DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) +{ + static const unsigned char convert_5to8[] = + { + 0x00, 0x08, 0x10, 0x19, 0x21, 0x29, 0x31, 0x3a, + 0x42, 0x4a, 0x52, 0x5a, 0x63, 0x6b, 0x73, 0x7b, + 0x84, 0x8c, 0x94, 0x9c, 0xa5, 0xad, 0xb5, 0xbd, + 0xc5, 0xce, 0xd6, 0xde, 0xe6, 0xef, 0xf7, 0xff, + }; + static const unsigned char convert_6to8[] = + { + 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, 0x18, 0x1c, + 0x20, 0x24, 0x28, 0x2d, 0x31, 0x35, 0x39, 0x3d, + 0x41, 0x45, 0x49, 0x4d, 0x51, 0x55, 0x59, 0x5d, + 0x61, 0x65, 0x69, 0x6d, 0x71, 0x75, 0x79, 0x7d, + 0x82, 0x86, 0x8a, 0x8e, 0x92, 0x96, 0x9a, 0x9e, + 0xa2, 0xa6, 0xaa, 0xae, 0xb2, 0xb6, 0xba, 0xbe, + 0xc2, 0xc6, 0xca, 0xce, 0xd2, 0xd7, 0xdb, 0xdf, + 0xe3, 0xe7, 0xeb, 0xef, 0xf3, 0xf7, 0xfb, 0xff, + }; + unsigned int x, y; + + TRACE("Converting %ux%u pixels, pitches %u %u.\n", w, h, pitch_in, pitch_out); + + for (y = 0; y < h; ++y) + { + const WORD *src_line = (const WORD *)(src + y * pitch_in); + DWORD *dst_line = (DWORD *)(dst + y * pitch_out); + for (x = 0; x < w; ++x) + { + WORD pixel = src_line[x]; + dst_line[x] = 0xff000000 + | convert_5to8[(pixel & 0xf800) >> 11] << 16 + | convert_6to8[(pixel & 0x07e0) >> 5] << 8 + | convert_5to8[(pixel & 0x001f)]; + } + } +} + +static void convert_a8r8g8b8_x8r8g8b8(const BYTE *src, BYTE *dst, + DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) +{ + unsigned int x, y; + + TRACE("Converting %ux%u pixels, pitches %u %u.\n", w, h, pitch_in, pitch_out); + + for (y = 0; y < h; ++y) + { + const DWORD *src_line = (const DWORD *)(src + y * pitch_in); + DWORD *dst_line = (DWORD *)(dst + y * pitch_out); + + for (x = 0; x < w; ++x) + { + dst_line[x] = 0xff000000 | (src_line[x] & 0xffffff); + } + } +} + +static inline BYTE cliptobyte(int x) +{ + return (BYTE)((x < 0) ? 0 : ((x > 255) ? 255 : x)); +} + +static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst, + DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) +{ + int c2, d, e, r2 = 0, g2 = 0, b2 = 0; + unsigned int x, y; + + TRACE("Converting %ux%u pixels, pitches %u %u.\n", w, h, pitch_in, pitch_out); + + for (y = 0; y < h; ++y) + { + const BYTE *src_line = src + y * pitch_in; + DWORD *dst_line = (DWORD *)(dst + y * pitch_out); + for (x = 0; x < w; ++x) + { + /* YUV to RGB conversion formulas from http://en.wikipedia.org/wiki/YUV: + * C = Y - 16; D = U - 128; E = V - 128; + * R = cliptobyte((298 * C + 409 * E + 128) >> 8); + * G = cliptobyte((298 * C - 100 * D - 208 * E + 128) >> 8); + * B = cliptobyte((298 * C + 516 * D + 128) >> 8); + * Two adjacent YUY2 pixels are stored as four bytes: Y0 U Y1 V . + * U and V are shared between the pixels. */ + if (!(x & 1)) /* For every even pixel, read new U and V. */ + { + d = (int) src_line[1] - 128; + e = (int) src_line[3] - 128; + r2 = 409 * e + 128; + g2 = - 100 * d - 208 * e + 128; + b2 = 516 * d + 128; + } + c2 = 298 * ((int) src_line[0] - 16); + dst_line[x] = 0xff000000 + | cliptobyte((c2 + r2) >> 8) << 16 /* red */ + | cliptobyte((c2 + g2) >> 8) << 8 /* green */ + | cliptobyte((c2 + b2) >> 8); /* blue */ + /* Scale RGB values to 0..255 range, + * then clip them if still not in range (may be negative), + * then shift them within DWORD if necessary. */ + src_line += 2; + } + } +} + +static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst, + DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) +{ + unsigned int x, y; + int c2, d, e, r2 = 0, g2 = 0, b2 = 0; + + TRACE("Converting %ux%u pixels, pitches %u %u\n", w, h, pitch_in, pitch_out); + + for (y = 0; y < h; ++y) + { + const BYTE *src_line = src + y * pitch_in; + WORD *dst_line = (WORD *)(dst + y * pitch_out); + for (x = 0; x < w; ++x) + { + /* YUV to RGB conversion formulas from http://en.wikipedia.org/wiki/YUV: + * C = Y - 16; D = U - 128; E = V - 128; + * R = cliptobyte((298 * C + 409 * E + 128) >> 8); + * G = cliptobyte((298 * C - 100 * D - 208 * E + 128) >> 8); + * B = cliptobyte((298 * C + 516 * D + 128) >> 8); + * Two adjacent YUY2 pixels are stored as four bytes: Y0 U Y1 V . + * U and V are shared between the pixels. */ + if (!(x & 1)) /* For every even pixel, read new U and V. */ + { + d = (int) src_line[1] - 128; + e = (int) src_line[3] - 128; + r2 = 409 * e + 128; + g2 = - 100 * d - 208 * e + 128; + b2 = 516 * d + 128; + } + c2 = 298 * ((int) src_line[0] - 16); + dst_line[x] = (cliptobyte((c2 + r2) >> 8) >> 3) << 11 /* red */ + | (cliptobyte((c2 + g2) >> 8) >> 2) << 5 /* green */ + | (cliptobyte((c2 + b2) >> 8) >> 3); /* blue */ + /* Scale RGB values to 0..255 range, + * then clip them if still not in range (may be negative), + * then shift them within DWORD if necessary. */ + src_line += 2; + } + } +} + +struct d3dfmt_convertor_desc +{ + enum wined3d_format_id from, to; + void (*convert)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h); +}; + +static const struct d3dfmt_convertor_desc convertors[] = +{ + {WINED3DFMT_R32_FLOAT, WINED3DFMT_R16_FLOAT, convert_r32_float_r16_float}, + {WINED3DFMT_B5G6R5_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_r5g6b5_x8r8g8b8}, + {WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_a8r8g8b8_x8r8g8b8}, + {WINED3DFMT_YUY2, WINED3DFMT_B8G8R8X8_UNORM, convert_yuy2_x8r8g8b8}, + {WINED3DFMT_YUY2, WINED3DFMT_B5G6R5_UNORM, convert_yuy2_r5g6b5}, +}; + +static inline const struct d3dfmt_convertor_desc *find_convertor(enum wined3d_format_id from, + enum wined3d_format_id to) +{ + unsigned int i; + + for (i = 0; i < (sizeof(convertors) / sizeof(*convertors)); ++i) + { + if (convertors[i].from == from && convertors[i].to == to) + return &convertors[i]; + } + + return NULL; +} + +/***************************************************************************** + * surface_convert_format + * + * Creates a duplicate of a surface in a different format. Is used by Blt to + * blit between surfaces with different formats. + * + * Parameters + * source: Source surface + * fmt: Requested destination format + * + *****************************************************************************/ +static struct wined3d_surface *surface_convert_format(struct wined3d_surface *source, enum wined3d_format_id to_fmt) +{ + const struct d3dfmt_convertor_desc *conv; + WINED3DLOCKED_RECT lock_src, lock_dst; + struct wined3d_surface *ret = NULL; + HRESULT hr; + + conv = find_convertor(source->resource.format->id, to_fmt); + if (!conv) + { + FIXME("Cannot find a conversion function from format %s to %s.\n", + debug_d3dformat(source->resource.format->id), debug_d3dformat(to_fmt)); + return NULL; + } + + wined3d_surface_create(source->resource.device, source->resource.width, + source->resource.height, to_fmt, TRUE /* lockable */, TRUE /* discard */, 0 /* level */, + 0 /* usage */, WINED3DPOOL_SCRATCH, WINED3DMULTISAMPLE_NONE /* TODO: Multisampled conversion */, + 0 /* MultiSampleQuality */, source->surface_type, NULL /* parent */, &wined3d_null_parent_ops, &ret); + if (!ret) + { + ERR("Failed to create a destination surface for conversion.\n"); + return NULL; + } + + memset(&lock_src, 0, sizeof(lock_src)); + memset(&lock_dst, 0, sizeof(lock_dst)); + + hr = wined3d_surface_map(source, &lock_src, NULL, WINED3DLOCK_READONLY); + if (FAILED(hr)) + { + ERR("Failed to lock the source surface.\n"); + wined3d_surface_decref(ret); + return NULL; + } + hr = wined3d_surface_map(ret, &lock_dst, NULL, WINED3DLOCK_READONLY); + if (FAILED(hr)) + { + ERR("Failed to lock the destination surface.\n"); + wined3d_surface_unmap(source); + wined3d_surface_decref(ret); + return NULL; + } + + conv->convert(lock_src.pBits, lock_dst.pBits, lock_src.Pitch, lock_dst.Pitch, + source->resource.width, source->resource.height); + + wined3d_surface_unmap(ret); + wined3d_surface_unmap(source); + + return ret; +} + +static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height, + unsigned int bpp, UINT pitch, DWORD color) +{ + BYTE *first; + int x, y; + + /* Do first row */ + +#define COLORFILL_ROW(type) \ +do { \ + type *d = (type *)buf; \ + for (x = 0; x < width; ++x) \ + d[x] = (type)color; \ +} while(0) + + switch (bpp) + { + case 1: + COLORFILL_ROW(BYTE); + break; + + case 2: + COLORFILL_ROW(WORD); + break; + + case 3: + { + BYTE *d = buf; + for (x = 0; x < width; ++x, d += 3) + { + d[0] = (color ) & 0xFF; + d[1] = (color >> 8) & 0xFF; + d[2] = (color >> 16) & 0xFF; + } + break; + } + case 4: + COLORFILL_ROW(DWORD); + break; + + default: + FIXME("Color fill not implemented for bpp %u!\n", bpp * 8); + return WINED3DERR_NOTAVAILABLE; + } + +#undef COLORFILL_ROW + + /* Now copy first row. */ + first = buf; + for (y = 1; y < height; ++y) + { + buf += pitch; + memcpy(buf, first, width * bpp); + } + + return WINED3D_OK; +} + +/* Do not call while under the GL lock. */ +HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, + const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter) +{ + TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", + dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), + flags, fx, debug_d3dtexturefiltertype(filter)); + + return dst_surface->surface_ops->surface_blt(dst_surface, + dst_rect, src_surface, src_rect, flags, fx, filter); +} + +/* Do not call while under the GL lock. */ +HRESULT CDECL wined3d_surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD trans) +{ + TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, trans %#x.\n", + dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), trans); + + return dst_surface->surface_ops->surface_bltfast(dst_surface, + dst_x, dst_y, src_surface, src_rect, trans); +} + +HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface) +{ + TRACE("surface %p.\n", surface); + + if (!(surface->flags & SFLAG_LOCKED)) + { + WARN("Trying to unmap unmapped surface.\n"); + return WINEDDERR_NOTLOCKED; + } + surface->flags &= ~SFLAG_LOCKED; + + surface->surface_ops->surface_unmap(surface); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, + WINED3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags) +{ + TRACE("surface %p, locked_rect %p, rect %s, flags %#x.\n", + surface, locked_rect, wine_dbgstr_rect(rect), flags); + + if (surface->flags & SFLAG_LOCKED) + { + WARN("Surface is already mapped.\n"); + return WINED3DERR_INVALIDCALL; + } + surface->flags |= SFLAG_LOCKED; + + if (!(surface->flags & SFLAG_LOCKABLE)) + WARN("Trying to lock unlockable surface.\n"); + + surface->surface_ops->surface_map(surface, rect, flags); + + locked_rect->Pitch = wined3d_surface_get_pitch(surface); + + if (!rect) + { + locked_rect->pBits = surface->resource.allocatedMemory; + surface->lockedRect.left = 0; + surface->lockedRect.top = 0; + surface->lockedRect.right = surface->resource.width; + surface->lockedRect.bottom = surface->resource.height; + } + else + { + const struct wined3d_format *format = surface->resource.format; + + if ((format->flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED) + { + /* Compressed textures are block based, so calculate the offset of + * the block that contains the top-left pixel of the locked rectangle. */ + locked_rect->pBits = surface->resource.allocatedMemory + + ((rect->top / format->block_height) * locked_rect->Pitch) + + ((rect->left / format->block_width) * format->block_byte_count); + } + else + { + locked_rect->pBits = surface->resource.allocatedMemory + + (locked_rect->Pitch * rect->top) + + (rect->left * format->byte_count); + } + surface->lockedRect.left = rect->left; + surface->lockedRect.top = rect->top; + surface->lockedRect.right = rect->right; + surface->lockedRect.bottom = rect->bottom; + } + + TRACE("Locked rect %s.\n", wine_dbgstr_rect(&surface->lockedRect)); + TRACE("Returning memory %p, pitch %u.\n", locked_rect->pBits, locked_rect->Pitch); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) +{ + HRESULT hr; + + TRACE("surface %p, dc %p.\n", surface, dc); + + if (surface->flags & SFLAG_USERPTR) + { + ERR("Not supported on surfaces with application-provided memory.\n"); + return WINEDDERR_NODC; + } + + /* Give more detailed info for ddraw. */ + if (surface->flags & SFLAG_DCINUSE) + return WINEDDERR_DCALREADYCREATED; + + /* Can't GetDC if the surface is locked. */ + if (surface->flags & SFLAG_LOCKED) + return WINED3DERR_INVALIDCALL; + + hr = surface->surface_ops->surface_getdc(surface); + if (FAILED(hr)) + return hr; + + if (surface->resource.format->id == WINED3DFMT_P8_UINT + || surface->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) + { + /* GetDC on palettized formats is unsupported in D3D9, and the method + * is missing in D3D8, so this should only be used for DX <=7 + * surfaces (with non-device palettes). */ + const PALETTEENTRY *pal = NULL; + + if (surface->palette) + { + pal = surface->palette->palents; + } + else + { + struct wined3d_swapchain *swapchain = surface->resource.device->swapchains[0]; + struct wined3d_surface *dds_primary = swapchain->front_buffer; + + if (dds_primary && dds_primary->palette) + pal = dds_primary->palette->palents; + } + + if (pal) + { + RGBQUAD col[256]; + unsigned int i; + + for (i = 0; i < 256; ++i) + { + col[i].rgbRed = pal[i].peRed; + col[i].rgbGreen = pal[i].peGreen; + col[i].rgbBlue = pal[i].peBlue; + col[i].rgbReserved = 0; + } + SetDIBColorTable(surface->hDC, 0, 256, col); + } + } + + surface->flags |= SFLAG_DCINUSE; + + *dc = surface->hDC; + TRACE("Returning dc %p.\n", *dc); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) +{ + TRACE("surface %p, dc %p.\n", surface, dc); + + if (!(surface->flags & SFLAG_DCINUSE)) + return WINEDDERR_NODC; + + if (surface->hDC != dc) + { + WARN("Application tries to release invalid DC %p, surface DC is %p.\n", + dc, surface->hDC); + return WINEDDERR_NODC; + } + + if ((surface->flags & SFLAG_PBO) && surface->resource.allocatedMemory) + { + /* Copy the contents of the DIB over to the PBO. */ + memcpy(surface->resource.allocatedMemory, surface->dib.bitmap_data, surface->dib.bitmap_size); + } + + /* We locked first, so unlock now. */ + wined3d_surface_unmap(surface); + + surface->flags &= ~SFLAG_DCINUSE; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_surface_flip(struct wined3d_surface *surface, struct wined3d_surface *override, DWORD flags) +{ + struct wined3d_swapchain *swapchain; + HRESULT hr; + + TRACE("surface %p, override %p, flags %#x.\n", surface, override, flags); + + if (surface->container.type != WINED3D_CONTAINER_SWAPCHAIN) + { + ERR("Flipped surface is not on a swapchain.\n"); + return WINEDDERR_NOTFLIPPABLE; + } + swapchain = surface->container.u.swapchain; + + hr = surface->surface_ops->surface_flip(surface, override); + if (FAILED(hr)) + return hr; + + /* Just overwrite the swapchain presentation interval. This is ok because + * only ddraw apps can call Flip, and only d3d8 and d3d9 applications + * specify the presentation interval. */ + if (!(flags & (WINEDDFLIP_NOVSYNC | WINEDDFLIP_INTERVAL2 | WINEDDFLIP_INTERVAL3 | WINEDDFLIP_INTERVAL4))) + swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_ONE; + else if (flags & WINEDDFLIP_NOVSYNC) + swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_IMMEDIATE; + else if (flags & WINEDDFLIP_INTERVAL2) + swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_TWO; + else if (flags & WINEDDFLIP_INTERVAL3) + swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_THREE; + else + swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_FOUR; + + return wined3d_swapchain_present(swapchain, NULL, NULL, swapchain->win_handle, NULL, 0); +} + +/* Do not call while under the GL lock. */ +void surface_internal_preload(struct wined3d_surface *surface, enum WINED3DSRGB srgb) +{ + struct wined3d_device *device = surface->resource.device; TRACE("iface %p, srgb %#x.\n", surface, srgb); if (surface->container.type == WINED3D_CONTAINER_TEXTURE) { - IWineD3DBaseTextureImpl *texture = surface->container.u.texture; + struct wined3d_texture *texture = surface->container.u.texture; - TRACE("Passing to container.\n"); - texture->baseTexture.internal_preload((IWineD3DBaseTexture *)texture, srgb); + TRACE("Passing to container (%p).\n", texture); + texture->texture_ops->texture_preload(texture, srgb); } else { @@ -1100,7 +3666,7 @@ void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srg } } - IWineD3DSurface_LoadTexture((IWineD3DSurface *)surface, srgb == SRGB_SRGB ? TRUE : FALSE); + surface_load(surface, srgb == SRGB_SRGB ? TRUE : FALSE); if (surface->resource.pool == WINED3DPOOL_DEFAULT) { @@ -1116,32 +3682,7 @@ void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srg } } -static void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) -{ - surface_internal_preload((IWineD3DSurfaceImpl *)iface, SRGB_ANY); -} - -/* Context activation is done by the caller. */ -static void surface_remove_pbo(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info) -{ - This->resource.heapMemory = HeapAlloc(GetProcessHeap() ,0 , This->resource.size + RESOURCE_ALIGNMENT); - This->resource.allocatedMemory = - (BYTE *)(((ULONG_PTR) This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); - - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); - checkGLcall("glBindBufferARB(GL_PIXEL_UNPACK_BUFFER, This->pbo)"); - GL_EXTCALL(glGetBufferSubDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0, This->resource.size, This->resource.allocatedMemory)); - checkGLcall("glGetBufferSubDataARB"); - GL_EXTCALL(glDeleteBuffersARB(1, &This->pbo)); - checkGLcall("glDeleteBuffersARB"); - LEAVE_GL(); - - This->pbo = 0; - This->Flags &= ~SFLAG_PBO; -} - -BOOL surface_init_sysmem(IWineD3DSurfaceImpl *surface) +BOOL surface_init_sysmem(struct wined3d_surface *surface) { if (!surface->resource.allocatedMemory) { @@ -1165,86 +3706,10 @@ BOOL surface_init_sysmem(IWineD3DSurfaceImpl *surface) return TRUE; } -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - IWineD3DDeviceImpl *device = This->resource.device; - const struct wined3d_gl_info *gl_info; - renderbuffer_entry_t *entry, *entry2; - struct wined3d_context *context; - - TRACE("(%p)\n", iface); - - if(This->resource.pool == WINED3DPOOL_DEFAULT) { - /* Default pool resources are supposed to be destroyed before Reset is called. - * Implicit resources stay however. So this means we have an implicit render target - * or depth stencil. The content may be destroyed, but we still have to tear down - * opengl resources, so we cannot leave early. - * - * Put the surfaces into sysmem, and reset the content. The D3D content is undefined, - * but we can't set the sysmem INDRAWABLE because when we're rendering the swapchain - * or the depth stencil into an FBO the texture or render buffer will be removed - * and all flags get lost - */ - surface_init_sysmem(This); - } - else - { - /* Load the surface into system memory */ - surface_load_location(This, SFLAG_INSYSMEM, NULL); - surface_modify_location(This, SFLAG_INDRAWABLE, FALSE); - } - surface_modify_location(This, SFLAG_INTEXTURE, FALSE); - surface_modify_location(This, SFLAG_INSRGBTEX, FALSE); - This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); - - context = context_acquire(device, NULL); - gl_info = context->gl_info; - - /* Destroy PBOs, but load them into real sysmem before */ - if (This->Flags & SFLAG_PBO) - surface_remove_pbo(This, gl_info); - - /* Destroy fbo render buffers. This is needed for implicit render targets, for - * all application-created targets the application has to release the surface - * before calling _Reset - */ - LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &This->renderbuffers, renderbuffer_entry_t, entry) { - ENTER_GL(); - gl_info->fbo_ops.glDeleteRenderbuffers(1, &entry->id); - LEAVE_GL(); - list_remove(&entry->entry); - HeapFree(GetProcessHeap(), 0, entry); - } - list_init(&This->renderbuffers); - This->current_renderbuffer = NULL; - - /* If we're in a texture, the texture name belongs to the texture. - * Otherwise, destroy it. */ - if (This->container.type != WINED3D_CONTAINER_TEXTURE) - { - ENTER_GL(); - glDeleteTextures(1, &This->texture_name); - This->texture_name = 0; - glDeleteTextures(1, &This->texture_name_srgb); - This->texture_name_srgb = 0; - LEAVE_GL(); - } - - context_release(context); - - resource_unload((IWineD3DResourceImpl *)This); -} - -/* ****************************************************** - IWineD3DSurface IWineD3DSurface parts follow - ****************************************************** */ - /* Read the framebuffer back into the surface */ -static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, void *dest, UINT pitch) +static void read_from_framebuffer(struct wined3d_surface *surface, const RECT *rect, void *dest, UINT pitch) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; BYTE *mem; @@ -1268,12 +3733,7 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v return; } - /* Activate the surface. Set it up for blitting now, although not necessarily needed for LockRect. - * Certain graphics drivers seem to dislike some enabled states when reading from opengl, the blitting usage - * should help here. Furthermore unlockrect will need the context set up for blitting. The context manager will find - * context->last_was_blit set on the unlock. - */ - context = context_acquire(device, This); + context = context_acquire(device, surface); context_apply_blit_state(context, device); gl_info = context->gl_info; @@ -1283,37 +3743,39 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v * There is no need to keep track of the current read buffer or reset it, every part of the code * that reads sets the read buffer as desired. */ - if (surface_is_offscreen(This)) + if (surface_is_offscreen(surface)) { - /* Locking the primary render target which is not on a swapchain(=offscreen render target). - * Read from the back buffer - */ - TRACE("Locking offscreen render target\n"); + /* Mapping the primary render target which is not on a swapchain. + * Read from the back buffer. */ + TRACE("Mapping offscreen render target.\n"); glReadBuffer(device->offscreenBuffer); srcIsUpsideDown = TRUE; } else { /* Onscreen surfaces are always part of a swapchain */ - GLenum buffer = surface_get_gl_buffer(This); - TRACE("Locking %#x buffer\n", buffer); + GLenum buffer = surface_get_gl_buffer(surface); + TRACE("Mapping %#x buffer.\n", buffer); glReadBuffer(buffer); checkGLcall("glReadBuffer"); srcIsUpsideDown = FALSE; } /* TODO: Get rid of the extra rectangle comparison and construction of a full surface rectangle */ - if(!rect) { + if (!rect) + { local_rect.left = 0; local_rect.top = 0; - local_rect.right = This->currentDesc.Width; - local_rect.bottom = This->currentDesc.Height; - } else { + local_rect.right = surface->resource.width; + local_rect.bottom = surface->resource.height; + } + else + { local_rect = *rect; } /* TODO: Get rid of the extra GetPitch call, LockRect does that too. Cache the pitch */ - switch (This->resource.format->id) + switch (surface->resource.format->id) { case WINED3DFMT_P8_UINT: { @@ -1323,8 +3785,10 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v fmt = GL_ALPHA; type = GL_UNSIGNED_BYTE; mem = dest; - bpp = This->resource.format->byte_count; - } else { + bpp = surface->resource.format->byte_count; + } + else + { /* GL can't return palettized data, so read ARGB pixels into a * separate block of memory and convert them into palettized format * in software. Slow, but if the app means to use palettized render @@ -1337,26 +3801,28 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v fmt = GL_RGB; type = GL_UNSIGNED_BYTE; pitch *= 3; - mem = HeapAlloc(GetProcessHeap(), 0, This->resource.size * 3); - if(!mem) { + mem = HeapAlloc(GetProcessHeap(), 0, surface->resource.size * 3); + if (!mem) + { ERR("Out of memory\n"); LEAVE_GL(); return; } - bpp = This->resource.format->byte_count * 3; + bpp = surface->resource.format->byte_count * 3; } } break; default: mem = dest; - fmt = This->resource.format->glFormat; - type = This->resource.format->glType; - bpp = This->resource.format->byte_count; + fmt = surface->resource.format->glFormat; + type = surface->resource.format->glType; + bpp = surface->resource.format->byte_count; } - if(This->Flags & SFLAG_PBO) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, This->pbo)); + if (surface->flags & SFLAG_PBO) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, surface->pbo)); checkGLcall("glBindBufferARB"); if (mem) { @@ -1374,17 +3840,17 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v checkGLcall("glGetIntegerv"); /* Setup pixel store pack state -- to glReadPixels into the correct place */ - glPixelStorei(GL_PACK_ROW_LENGTH, This->currentDesc.Width); + glPixelStorei(GL_PACK_ROW_LENGTH, surface->resource.width); checkGLcall("glPixelStorei"); glPixelStorei(GL_PACK_SKIP_PIXELS, local_rect.left); checkGLcall("glPixelStorei"); glPixelStorei(GL_PACK_SKIP_ROWS, local_rect.top); checkGLcall("glPixelStorei"); - glReadPixels(local_rect.left, (!srcIsUpsideDown) ? (This->currentDesc.Height - local_rect.bottom) : local_rect.top , - local_rect.right - local_rect.left, - local_rect.bottom - local_rect.top, - fmt, type, mem); + glReadPixels(local_rect.left, !srcIsUpsideDown ? (surface->resource.height - local_rect.bottom) : local_rect.top, + local_rect.right - local_rect.left, + local_rect.bottom - local_rect.top, + fmt, type, mem); checkGLcall("glReadPixels"); /* Reset previous pixel store pack state */ @@ -1395,7 +3861,8 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v glPixelStorei(GL_PACK_SKIP_ROWS, skipRow); checkGLcall("glPixelStorei"); - if(This->Flags & SFLAG_PBO) { + if (surface->flags & SFLAG_PBO) + { GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); checkGLcall("glBindBufferARB"); @@ -1403,8 +3870,9 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v * to get a pointer to it and perform the flipping in software. This is a lot * faster than calling glReadPixels for each line. In case we want more speed * we should rerender it flipped in a FBO and read the data back from the FBO. */ - if(!srcIsUpsideDown) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); + if (!srcIsUpsideDown) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); checkGLcall("glBindBufferARB"); mem = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB)); @@ -1423,7 +3891,8 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v row = HeapAlloc(GetProcessHeap(), 0, len); if(!row) { ERR("Out of memory\n"); - if (This->resource.format->id == WINED3DFMT_P8_UINT) HeapFree(GetProcessHeap(), 0, mem); + if (surface->resource.format->id == WINED3DFMT_P8_UINT) + HeapFree(GetProcessHeap(), 0, mem); LEAVE_GL(); return; } @@ -1440,7 +3909,8 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v HeapFree(GetProcessHeap(), 0, row); /* Unmap the temp PBO buffer */ - if(This->Flags & SFLAG_PBO) { + if (surface->flags & SFLAG_PBO) + { GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); } @@ -1449,23 +3919,26 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v LEAVE_GL(); context_release(context); - /* For P8 textures we need to perform an inverse palette lookup. This is done by searching for a palette - * index which matches the RGB value. Note this isn't guaranteed to work when there are multiple entries for - * the same color but we have no choice. - * In case of P8 render targets, the index is stored in the alpha component so no conversion is needed. - */ - if (This->resource.format->id == WINED3DFMT_P8_UINT && !primary_render_target_is_p8(device)) + /* For P8 textures we need to perform an inverse palette lookup. This is + * done by searching for a palette index which matches the RGB value. + * Note this isn't guaranteed to work when there are multiple entries for + * the same color but we have no choice. In case of P8 render targets, + * the index is stored in the alpha component so no conversion is needed. */ + if (surface->resource.format->id == WINED3DFMT_P8_UINT && !primary_render_target_is_p8(device)) { const PALETTEENTRY *pal = NULL; DWORD width = pitch / 3; int x, y, c; - if(This->palette) { - pal = This->palette->palents; - } else { + if (surface->palette) + { + pal = surface->palette->palents; + } + else + { ERR("Palette is missing, cannot perform inverse palette lookup\n"); HeapFree(GetProcessHeap(), 0, mem); - return ; + return; } for(y = local_rect.top; y < local_rect.bottom; y++) { @@ -1491,13 +3964,13 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, const RECT *rect, v } /* Read the framebuffer contents into a texture */ -static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb) +static void read_from_framebuffer_texture(struct wined3d_surface *surface, BOOL srgb) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; - if (!surface_is_offscreen(This)) + if (!surface_is_offscreen(surface)) { /* We would need to flip onscreen surfaces, but there's no efficient * way to do that here. It makes more sense for the caller to @@ -1510,21 +3983,21 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb) * locking during offscreen rendering). RESOURCELOAD is ok because glCopyTexSubImage2D isn't affected by any * states in the stateblock, and no driver was found yet that had bugs in that regard. */ - context = context_acquire(device, This); + context = context_acquire(device, surface); gl_info = context->gl_info; - surface_prepare_texture(This, gl_info, srgb); - surface_bind_and_dirtify(This, srgb); + surface_prepare_texture(surface, gl_info, srgb); + surface_bind_and_dirtify(surface, gl_info, srgb); - TRACE("Reading back offscreen render target %p.\n", This); + TRACE("Reading back offscreen render target %p.\n", surface); ENTER_GL(); glReadBuffer(device->offscreenBuffer); checkGLcall("glReadBuffer"); - glCopyTexSubImage2D(This->texture_target, This->texture_level, - 0, 0, 0, 0, This->currentDesc.Width, This->currentDesc.Height); + glCopyTexSubImage2D(surface->texture_target, surface->texture_level, + 0, 0, 0, 0, surface->resource.width, surface->resource.height); checkGLcall("glCopyTexSubImage2D"); LEAVE_GL(); @@ -1533,38 +4006,38 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb) } /* Context activation is done by the caller. */ -static void surface_prepare_texture_internal(IWineD3DSurfaceImpl *surface, +static void surface_prepare_texture_internal(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) { DWORD alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED; CONVERT_TYPES convert; struct wined3d_format format; - if (surface->Flags & alloc_flag) return; + if (surface->flags & alloc_flag) return; d3dfmt_get_conv(surface, TRUE, TRUE, &format, &convert); - if (convert != NO_CONVERSION || format.convert) surface->Flags |= SFLAG_CONVERTED; - else surface->Flags &= ~SFLAG_CONVERTED; + if (convert != NO_CONVERSION || format.convert) surface->flags |= SFLAG_CONVERTED; + else surface->flags &= ~SFLAG_CONVERTED; - surface_bind_and_dirtify(surface, srgb); + surface_bind_and_dirtify(surface, gl_info, srgb); surface_allocate_surface(surface, gl_info, &format, srgb); - surface->Flags |= alloc_flag; + surface->flags |= alloc_flag; } /* Context activation is done by the caller. */ -void surface_prepare_texture(IWineD3DSurfaceImpl *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) +void surface_prepare_texture(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) { if (surface->container.type == WINED3D_CONTAINER_TEXTURE) { - IWineD3DBaseTextureImpl *texture = surface->container.u.texture; - UINT sub_count = texture->baseTexture.level_count * texture->baseTexture.layer_count; + struct wined3d_texture *texture = surface->container.u.texture; + UINT sub_count = texture->level_count * texture->layer_count; UINT i; TRACE("surface %p is a subresource of texture %p.\n", surface, texture); for (i = 0; i < sub_count; ++i) { - IWineD3DSurfaceImpl *s = (IWineD3DSurfaceImpl *)texture->baseTexture.sub_resources[i]; + struct wined3d_surface *s = surface_from_resource(texture->sub_resources[i]); surface_prepare_texture_internal(s, gl_info, srgb); } @@ -1574,563 +4047,96 @@ void surface_prepare_texture(IWineD3DSurfaceImpl *surface, const struct wined3d_ surface_prepare_texture_internal(surface, gl_info, srgb); } -static void surface_prepare_system_memory(IWineD3DSurfaceImpl *This) +static void flush_to_framebuffer_drawpixels(struct wined3d_surface *surface, + const RECT *rect, GLenum fmt, GLenum type, UINT bpp, const BYTE *mem) { - IWineD3DDeviceImpl *device = This->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - - /* Performance optimization: Count how often a surface is locked, if it is locked regularly do not throw away the system memory copy. - * This avoids the need to download the surface from opengl all the time. The surface is still downloaded if the opengl texture is - * changed - */ - if(!(This->Flags & SFLAG_DYNLOCK)) { - This->lockCount++; - /* MAXLOCKCOUNT is defined in wined3d_private.h */ - if(This->lockCount > MAXLOCKCOUNT) { - TRACE("Surface is locked regularly, not freeing the system memory copy any more\n"); - This->Flags |= SFLAG_DYNLOCK; - } - } - - /* Create a PBO for dynamically locked surfaces but don't do it for converted or non-pow2 surfaces. - * Also don't create a PBO for systemmem surfaces. - */ - if (gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] && (This->Flags & SFLAG_DYNLOCK) - && !(This->Flags & (SFLAG_PBO | SFLAG_CONVERTED | SFLAG_NONPOW2)) - && (This->resource.pool != WINED3DPOOL_SYSTEMMEM)) - { - GLenum error; - struct wined3d_context *context; - - context = context_acquire(device, NULL); - ENTER_GL(); - - GL_EXTCALL(glGenBuffersARB(1, &This->pbo)); - error = glGetError(); - if (!This->pbo || error != GL_NO_ERROR) - ERR("Failed to bind the PBO with error %s (%#x)\n", debug_glerror(error), error); - - TRACE("Attaching pbo=%#x to (%p)\n", This->pbo, This); - - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); - checkGLcall("glBindBufferARB"); - - GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->resource.size + 4, This->resource.allocatedMemory, GL_STREAM_DRAW_ARB)); - checkGLcall("glBufferDataARB"); - - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); - - /* We don't need the system memory anymore and we can't even use it for PBOs */ - if(!(This->Flags & SFLAG_CLIENT)) { - HeapFree(GetProcessHeap(), 0, This->resource.heapMemory); - This->resource.heapMemory = NULL; - } - This->resource.allocatedMemory = NULL; - This->Flags |= SFLAG_PBO; - LEAVE_GL(); - context_release(context); - } - else if (!(This->resource.allocatedMemory || This->Flags & SFLAG_PBO)) - { - /* Whatever surface we have, make sure that there is memory allocated for the downloaded copy, - * or a pbo to map - */ - if(!This->resource.heapMemory) { - This->resource.heapMemory = HeapAlloc(GetProcessHeap() ,0 , This->resource.size + RESOURCE_ALIGNMENT); - } - This->resource.allocatedMemory = - (BYTE *)(((ULONG_PTR) This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); - if(This->Flags & SFLAG_INSYSMEM) { - ERR("Surface without memory or pbo has SFLAG_INSYSMEM set!\n"); - } - } -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DDeviceImpl *device = This->resource.device; - const RECT *pass_rect = pRect; - - TRACE("iface %p, locked_rect %p, rect %s, flags %#x.\n", - iface, pLockedRect, wine_dbgstr_rect(pRect), Flags); - - /* This is also done in the base class, but we have to verify this before loading any data from - * gl into the sysmem copy. The PBO may be mapped, a different rectangle locked, the discard flag - * may interfere, and all other bad things may happen - */ - if (This->Flags & SFLAG_LOCKED) { - WARN("Surface is already locked, returning D3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; - } - This->Flags |= SFLAG_LOCKED; - - if (!(This->Flags & SFLAG_LOCKABLE)) - { - TRACE("Warning: trying to lock unlockable surf@%p\n", This); - } - - if (Flags & WINED3DLOCK_DISCARD) { - /* Set SFLAG_INSYSMEM, so we'll never try to download the data from the texture. */ - TRACE("WINED3DLOCK_DISCARD flag passed, marking local copy as up to date\n"); - surface_prepare_system_memory(This); /* Makes sure memory is allocated */ - This->Flags |= SFLAG_INSYSMEM; - goto lock_end; - } - - if (This->Flags & SFLAG_INSYSMEM) { - TRACE("Local copy is up to date, not downloading data\n"); - surface_prepare_system_memory(This); /* Makes sure memory is allocated */ - goto lock_end; - } - - /* surface_load_location() does not check if the rectangle specifies - * the full surface. Most callers don't need that, so do it here. */ - if (pRect && !pRect->top && !pRect->left - && pRect->right == This->currentDesc.Width - && pRect->bottom == This->currentDesc.Height) - { - pass_rect = NULL; - } - - if (!(wined3d_settings.rendertargetlock_mode == RTL_DISABLE - && ((This->container.type == WINED3D_CONTAINER_SWAPCHAIN) || This == device->render_targets[0]))) - { - surface_load_location(This, SFLAG_INSYSMEM, pass_rect); - } - -lock_end: - if (This->Flags & SFLAG_PBO) - { - const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; - - context = context_acquire(device, NULL); - gl_info = context->gl_info; - - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); - checkGLcall("glBindBufferARB"); - - /* This shouldn't happen but could occur if some other function didn't handle the PBO properly */ - if(This->resource.allocatedMemory) { - ERR("The surface already has PBO memory allocated!\n"); - } - - This->resource.allocatedMemory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB)); - checkGLcall("glMapBufferARB"); - - /* Make sure the pbo isn't set anymore in order not to break non-pbo calls */ - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); - - LEAVE_GL(); - context_release(context); - } - - if (Flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY)) { - /* Don't dirtify */ - } - else - { - surface_add_dirty_rect(This, pRect); - - if (This->container.type == WINED3D_CONTAINER_TEXTURE) - { - TRACE("Making container dirty.\n"); - IWineD3DBaseTexture_SetDirty((IWineD3DBaseTexture *)This->container.u.texture, TRUE); - } - else - { - TRACE("Surface is standalone, no need to dirty the container\n"); - } - } - - return IWineD3DBaseSurfaceImpl_LockRect(iface, pLockedRect, pRect, Flags); -} - -static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fmt, GLenum type, UINT bpp, const BYTE *mem) { - GLint prev_store; - GLint prev_rasterpos[4]; - GLint skipBytes = 0; - UINT pitch = IWineD3DSurface_GetPitch((IWineD3DSurface *) This); /* target is argb, 4 byte */ - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = surface->resource.device; + UINT pitch = wined3d_surface_get_pitch(surface); const struct wined3d_gl_info *gl_info; struct wined3d_context *context; + RECT local_rect; + UINT w, h; + + surface_get_rect(surface, rect, &local_rect); + + mem += local_rect.top * pitch + local_rect.left * bpp; + w = local_rect.right - local_rect.left; + h = local_rect.bottom - local_rect.top; /* Activate the correct context for the render target */ - context = context_acquire(device, This); + context = context_acquire(device, surface); context_apply_blit_state(context, device); gl_info = context->gl_info; ENTER_GL(); - if (!surface_is_offscreen(This)) + if (!surface_is_offscreen(surface)) { - GLenum buffer = surface_get_gl_buffer(This); + GLenum buffer = surface_get_gl_buffer(surface); TRACE("Unlocking %#x buffer.\n", buffer); context_set_draw_buffer(context, buffer); + + surface_translate_drawable_coords(surface, context->win_handle, &local_rect); + glPixelZoom(1.0f, -1.0f); } else { /* Primary offscreen render target */ TRACE("Offscreen render target.\n"); context_set_draw_buffer(context, device->offscreenBuffer); + + glPixelZoom(1.0f, 1.0f); } - glGetIntegerv(GL_PACK_SWAP_BYTES, &prev_store); - checkGLcall("glGetIntegerv"); - glGetIntegerv(GL_CURRENT_RASTER_POSITION, &prev_rasterpos[0]); - checkGLcall("glGetIntegerv"); - glPixelZoom(1.0f, -1.0f); - checkGLcall("glPixelZoom"); - - /* If not fullscreen, we need to skip a number of bytes to find the next row of data */ - glGetIntegerv(GL_UNPACK_ROW_LENGTH, &skipBytes); - glPixelStorei(GL_UNPACK_ROW_LENGTH, This->currentDesc.Width); - - glRasterPos3i(This->lockedRect.left, This->lockedRect.top, 1); + glRasterPos3i(local_rect.left, local_rect.top, 1); checkGLcall("glRasterPos3i"); - /* Some drivers(radeon dri, others?) don't like exceptions during - * glDrawPixels. If the surface is a DIB section, it might be in GDIMode - * after ReleaseDC. Reading it will cause an exception, which x11drv will - * catch to put the dib section in InSync mode, which leads to a crash - * and a blocked x server on my radeon card. - * - * The following lines read the dib section so it is put in InSync mode - * before glDrawPixels is called and the crash is prevented. There won't - * be any interfering gdi accesses, because UnlockRect is called from - * ReleaseDC, and the app won't use the dc any more afterwards. - */ - if((This->Flags & SFLAG_DIBSECTION) && !(This->Flags & SFLAG_PBO)) { - volatile BYTE read; - read = This->resource.allocatedMemory[0]; - } + /* If not fullscreen, we need to skip a number of bytes to find the next row of data */ + glPixelStorei(GL_UNPACK_ROW_LENGTH, surface->resource.width); - if(This->Flags & SFLAG_PBO) { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); + if (surface->flags & SFLAG_PBO) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); checkGLcall("glBindBufferARB"); } - /* When the surface is locked we only have to refresh the locked part else we need to update the whole image */ - if(This->Flags & SFLAG_LOCKED) { - glDrawPixels(This->lockedRect.right - This->lockedRect.left, - (This->lockedRect.bottom - This->lockedRect.top)-1, - fmt, type, - mem + bpp * This->lockedRect.left + pitch * This->lockedRect.top); - checkGLcall("glDrawPixels"); - } else { - glDrawPixels(This->currentDesc.Width, - This->currentDesc.Height, - fmt, type, mem); - checkGLcall("glDrawPixels"); - } + glDrawPixels(w, h, fmt, type, mem); + checkGLcall("glDrawPixels"); - if(This->Flags & SFLAG_PBO) { + if (surface->flags & SFLAG_PBO) + { GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); checkGLcall("glBindBufferARB"); } - glPixelZoom(1.0f, 1.0f); - checkGLcall("glPixelZoom"); - - glRasterPos3iv(&prev_rasterpos[0]); - checkGLcall("glRasterPos3iv"); - - /* Reset to previous pack row length */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, skipBytes); - checkGLcall("glPixelStorei(GL_UNPACK_ROW_LENGTH)"); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + checkGLcall("glPixelStorei(GL_UNPACK_ROW_LENGTH, 0)"); LEAVE_GL(); + + if (wined3d_settings.strict_draw_ordering + || (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN + && surface->container.u.swapchain->front_buffer == surface)) + wglFlush(); + context_release(context); } -static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DDeviceImpl *device = This->resource.device; - BOOL fullsurface; - - if (!(This->Flags & SFLAG_LOCKED)) { - WARN("trying to Unlock an unlocked surf@%p\n", This); - return WINEDDERR_NOTLOCKED; - } - - if (This->Flags & SFLAG_PBO) - { - const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; - - TRACE("Freeing PBO memory\n"); - - context = context_acquire(device, NULL); - gl_info = context->gl_info; - - ENTER_GL(); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, This->pbo)); - GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glUnmapBufferARB"); - LEAVE_GL(); - context_release(context); - - This->resource.allocatedMemory = NULL; - } - - TRACE("(%p) : dirtyfied(%d)\n", This, This->Flags & (SFLAG_INDRAWABLE | SFLAG_INTEXTURE) ? 0 : 1); - - if (This->Flags & (SFLAG_INDRAWABLE | SFLAG_INTEXTURE)) { - TRACE("(%p) : Not Dirtified so nothing to do, return now\n", This); - goto unlock_end; - } - - if (This->container.type == WINED3D_CONTAINER_SWAPCHAIN - || (device->render_targets && This == device->render_targets[0])) - { - if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) { - static BOOL warned = FALSE; - if(!warned) { - ERR("The application tries to write to the render target, but render target locking is disabled\n"); - warned = TRUE; - } - goto unlock_end; - } - - if (!This->dirtyRect.left && !This->dirtyRect.top - && This->dirtyRect.right == This->currentDesc.Width - && This->dirtyRect.bottom == This->currentDesc.Height) - { - fullsurface = TRUE; - } else { - /* TODO: Proper partial rectangle tracking */ - fullsurface = FALSE; - This->Flags |= SFLAG_INSYSMEM; - } - - switch(wined3d_settings.rendertargetlock_mode) { - case RTL_READTEX: - surface_load_location(This, SFLAG_INTEXTURE, NULL /* partial texture loading not supported yet */); - /* drop through */ - - case RTL_READDRAW: - surface_load_location(This, SFLAG_INDRAWABLE, fullsurface ? NULL : &This->dirtyRect); - break; - } - - if(!fullsurface) { - /* Partial rectangle tracking is not commonly implemented, it is only done for render targets. Overwrite - * the flags to bring them back into a sane state. INSYSMEM was set before to tell LoadLocation where - * to read the rectangle from. Indrawable is set because all modifications from the partial sysmem copy - * are written back to the drawable, thus the surface is merged again in the drawable. The sysmem copy is - * not fully up to date because only a subrectangle was read in LockRect. - */ - This->Flags &= ~SFLAG_INSYSMEM; - This->Flags |= SFLAG_INDRAWABLE; - } - - This->dirtyRect.left = This->currentDesc.Width; - This->dirtyRect.top = This->currentDesc.Height; - This->dirtyRect.right = 0; - This->dirtyRect.bottom = 0; - } - else if (This == device->depth_stencil) - { - FIXME("Depth Stencil buffer locking is not implemented\n"); - } else { - /* The rest should be a normal texture */ - /* Check if the texture is bound, if yes dirtify the sampler to force a re-upload of the texture - * Can't load the texture here because PreLoad may destroy and recreate the gl texture, so sampler - * states need resetting - */ - if (This->container.type == WINED3D_CONTAINER_TEXTURE) - { - IWineD3DBaseTextureImpl *texture = This->container.u.texture; - if (texture->baseTexture.bindCount) - IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(texture->baseTexture.sampler)); - } - } - - unlock_end: - This->Flags &= ~SFLAG_LOCKED; - memset(&This->lockedRect, 0, sizeof(RECT)); - - /* Overlays have to be redrawn manually after changes with the GL implementation */ - if(This->overlay_dest) { - IWineD3DSurface_DrawOverlay(iface); - } - return WINED3D_OK; -} - -static void surface_release_client_storage(IWineD3DSurfaceImpl *surface) -{ - struct wined3d_context *context; - - context = context_acquire(surface->resource.device, NULL); - - ENTER_GL(); - glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - if (surface->texture_name) - { - surface_bind_and_dirtify(surface, FALSE); - glTexImage2D(surface->texture_target, surface->texture_level, - GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); - } - if (surface->texture_name_srgb) - { - surface_bind_and_dirtify(surface, TRUE); - glTexImage2D(surface->texture_target, surface->texture_level, - GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); - } - glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); - - LEAVE_GL(); - context_release(context); - - surface_modify_location(surface, SFLAG_INSRGBTEX, FALSE); - surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); - surface_force_reload(surface); -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - WINED3DLOCKED_RECT lock; - HRESULT hr; - RGBQUAD col[256]; - - TRACE("(%p)->(%p)\n",This,pHDC); - - if(This->Flags & SFLAG_USERPTR) { - ERR("Not supported on surfaces with an application-provided surfaces\n"); - return WINEDDERR_NODC; - } - - /* Give more detailed info for ddraw */ - if (This->Flags & SFLAG_DCINUSE) - return WINEDDERR_DCALREADYCREATED; - - /* Can't GetDC if the surface is locked */ - if (This->Flags & SFLAG_LOCKED) - return WINED3DERR_INVALIDCALL; - - memset(&lock, 0, sizeof(lock)); /* To be sure */ - - /* Create a DIB section if there isn't a hdc yet */ - if (!This->hDC) - { - if (This->Flags & SFLAG_CLIENT) - { - surface_load_location(This, SFLAG_INSYSMEM, NULL); - surface_release_client_storage(This); - } - hr = IWineD3DBaseSurfaceImpl_CreateDIBSection(iface); - if(FAILED(hr)) return WINED3DERR_INVALIDCALL; - - /* Use the dib section from now on if we are not using a PBO */ - if(!(This->Flags & SFLAG_PBO)) - This->resource.allocatedMemory = This->dib.bitmap_data; - } - - /* Lock the surface */ - hr = IWineD3DSurface_LockRect(iface, - &lock, - NULL, - 0); - - if(This->Flags & SFLAG_PBO) { - /* Sync the DIB with the PBO. This can't be done earlier because LockRect activates the allocatedMemory */ - memcpy(This->dib.bitmap_data, This->resource.allocatedMemory, This->dib.bitmap_size); - } - - if(FAILED(hr)) { - ERR("IWineD3DSurface_LockRect failed with hr = %08x\n", hr); - /* keep the dib section */ - return hr; - } - - if (This->resource.format->id == WINED3DFMT_P8_UINT - || This->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) - { - /* GetDC on palettized formats is unsupported in D3D9, and the method is missing in - D3D8, so this should only be used for DX <=7 surfaces (with non-device palettes) */ - unsigned int n; - const PALETTEENTRY *pal = NULL; - - if(This->palette) { - pal = This->palette->palents; - } else { - IWineD3DSurfaceImpl *dds_primary; - IWineD3DSwapChainImpl *swapchain; - swapchain = (IWineD3DSwapChainImpl *)This->resource.device->swapchains[0]; - dds_primary = swapchain->front_buffer; - if (dds_primary && dds_primary->palette) - pal = dds_primary->palette->palents; - } - - if (pal) { - for (n=0; n<256; n++) { - col[n].rgbRed = pal[n].peRed; - col[n].rgbGreen = pal[n].peGreen; - col[n].rgbBlue = pal[n].peBlue; - col[n].rgbReserved = 0; - } - SetDIBColorTable(This->hDC, 0, 256, col); - } - } - - *pHDC = This->hDC; - TRACE("returning %p\n",*pHDC); - This->Flags |= SFLAG_DCINUSE; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - TRACE("(%p)->(%p)\n",This,hDC); - - if (!(This->Flags & SFLAG_DCINUSE)) - return WINEDDERR_NODC; - - if (This->hDC !=hDC) { - WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC); - return WINEDDERR_NODC; - } - - if((This->Flags & SFLAG_PBO) && This->resource.allocatedMemory) { - /* Copy the contents of the DIB over to the PBO */ - memcpy(This->resource.allocatedMemory, This->dib.bitmap_data, This->dib.bitmap_size); - } - - /* we locked first, so unlock now */ - IWineD3DSurface_UnlockRect(iface); - - This->Flags &= ~SFLAG_DCINUSE; - - return WINED3D_OK; -} - -/* ****************************************************** - IWineD3DSurface Internal (No mapping to directx api) parts follow - ****************************************************** */ - -HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, +HRESULT d3dfmt_get_conv(struct wined3d_surface *surface, BOOL need_alpha_ck, BOOL use_texturing, struct wined3d_format *format, CONVERT_TYPES *convert) { - BOOL colorkey_active = need_alpha_ck && (This->CKeyFlags & WINEDDSD_CKSRCBLT); - IWineD3DDeviceImpl *device = This->resource.device; + BOOL colorkey_active = need_alpha_ck && (surface->CKeyFlags & WINEDDSD_CKSRCBLT); + struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; BOOL blit_supported = FALSE; /* Copy the default values from the surface. Below we might perform fixups */ /* TODO: get rid of color keying desc fixups by using e.g. a table. */ - *format = *This->resource.format; + *format = *surface->resource.format; *convert = NO_CONVERSION; /* Ok, now look if we have to do any conversion */ - switch (This->resource.format->id) + switch (surface->resource.format->id) { case WINED3DFMT_P8_UINT: /* Below the call to blit_supported is disabled for Wine 1.2 @@ -2142,9 +4148,9 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, * 8-bit blits need to be handled by the blit_shader. * TODO: get rid of this #if 0. */ #if 0 - blit_supported = device->blitter->blit_supported(&device->adapter->gl_info, BLIT_OP_BLIT, - &rect, This->resource.usage, This->resource.pool, This->resource.format, - &rect, This->resource.usage, This->resource.pool, This->resource.format); + blit_supported = device->blitter->blit_supported(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_BLIT, + &rect, surface->resource.usage, surface->resource.pool, surface->resource.format, + &rect, surface->resource.usage, surface->resource.pool, surface->resource.format); #endif blit_supported = gl_info->supported[EXT_PALETTED_TEXTURE] || gl_info->supported[ARB_FRAGMENT_PROGRAM]; @@ -2154,7 +4160,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, * in which the main render target uses p8. Some games like GTA Vice City use P8 for texturing which * conflicts with this. */ - if (!((blit_supported && device->render_targets && This == device->render_targets[0])) + if (!((blit_supported && device->fb.render_targets && surface == device->fb.render_targets[0])) || colorkey_active || !use_texturing) { format->glFormat = GL_RGBA; @@ -2230,10 +4236,10 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, return WINED3D_OK; } -void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL colorkey) +void d3dfmt_p8_init_palette(struct wined3d_surface *surface, BYTE table[256][4], BOOL colorkey) { - IWineD3DDeviceImpl *device = This->resource.device; - IWineD3DPaletteImpl *pal = This->palette; + struct wined3d_device *device = surface->resource.device; + struct wined3d_palette *pal = surface->palette; BOOL index_in_alpha = FALSE; unsigned int i; @@ -2246,7 +4252,7 @@ void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL if (!pal) { - UINT dxVersion = ((IWineD3DImpl *)device->wined3d)->dxVersion; + UINT dxVersion = device->wined3d->dxVersion; /* In DirectDraw the palette is a property of the surface, there are no such things as device palettes. */ if (dxVersion <= 7) @@ -2293,12 +4299,12 @@ void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL { table[i][3] = i; } - else if (colorkey && (i >= This->SrcBltCKey.dwColorSpaceLowValue) - && (i <= This->SrcBltCKey.dwColorSpaceHighValue)) + else if (colorkey && (i >= surface->SrcBltCKey.dwColorSpaceLowValue) + && (i <= surface->SrcBltCKey.dwColorSpaceHighValue)) { table[i][3] = 0x00; } - else if(pal->Flags & WINEDDPCAPS_ALPHA) + else if (pal->flags & WINEDDPCAPS_ALPHA) { table[i][3] = pal->palents[i].peFlags; } @@ -2311,11 +4317,11 @@ void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL } static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UINT width, - UINT height, UINT outpitch, CONVERT_TYPES convert, IWineD3DSurfaceImpl *This) + UINT height, UINT outpitch, CONVERT_TYPES convert, struct wined3d_surface *surface) { const BYTE *source; BYTE *dest; - TRACE("(%p)->(%p),(%d,%d,%d,%d,%p)\n", src, dst, pitch, height, outpitch, convert,This); + TRACE("(%p)->(%p),(%d,%d,%d,%d,%p)\n", src, dst, pitch, height, outpitch, convert, surface); switch (convert) { case NO_CONVERSION: @@ -2329,7 +4335,7 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI BYTE table[256][4]; unsigned int x, y; - d3dfmt_p8_init_palette(This, table, (convert == CONVERT_PALETTED_CK)); + d3dfmt_p8_init_palette(surface, table, (convert == CONVERT_PALETTED_CK)); for (y = 0; y < height; y++) { @@ -2371,10 +4377,9 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI for (x = 0; x < width; x++ ) { WORD color = *Source++; *Dest = ((color & 0xFFC0) | ((color & 0x1F) << 1)); - if ((color < This->SrcBltCKey.dwColorSpaceLowValue) || - (color > This->SrcBltCKey.dwColorSpaceHighValue)) { + if ((color < surface->SrcBltCKey.dwColorSpaceLowValue) + || (color > surface->SrcBltCKey.dwColorSpaceHighValue)) *Dest |= 0x0001; - } Dest++; } } @@ -2394,13 +4399,11 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI for (x = 0; x < width; x++ ) { WORD color = *Source++; *Dest = color; - if ((color < This->SrcBltCKey.dwColorSpaceLowValue) || - (color > This->SrcBltCKey.dwColorSpaceHighValue)) { + if ((color < surface->SrcBltCKey.dwColorSpaceLowValue) + || (color > surface->SrcBltCKey.dwColorSpaceHighValue)) *Dest |= (1 << 15); - } - else { + else *Dest &= ~(1 << 15); - } Dest++; } } @@ -2418,10 +4421,9 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI for (x = 0; x < width; x++) { DWORD color = ((DWORD)source[0] << 16) + ((DWORD)source[1] << 8) + (DWORD)source[2] ; DWORD dstcolor = color << 8; - if ((color < This->SrcBltCKey.dwColorSpaceLowValue) || - (color > This->SrcBltCKey.dwColorSpaceHighValue)) { + if ((color < surface->SrcBltCKey.dwColorSpaceLowValue) + || (color > surface->SrcBltCKey.dwColorSpaceHighValue)) dstcolor |= 0xff; - } *(DWORD*)dest = dstcolor; source += 3; dest += 4; @@ -2441,10 +4443,9 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI for (x = 0; x < width; x++) { DWORD color = 0xffffff & *(const DWORD*)source; DWORD dstcolor = color << 8; - if ((color < This->SrcBltCKey.dwColorSpaceLowValue) || - (color > This->SrcBltCKey.dwColorSpaceHighValue)) { + if ((color < surface->SrcBltCKey.dwColorSpaceLowValue) + || (color > surface->SrcBltCKey.dwColorSpaceHighValue)) dstcolor |= 0xff; - } *(DWORD*)dest = dstcolor; source += 4; dest += 4; @@ -2459,12 +4460,12 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI return WINED3D_OK; } -BOOL palette9_changed(IWineD3DSurfaceImpl *This) +BOOL palette9_changed(struct wined3d_surface *surface) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = surface->resource.device; - if (This->palette || (This->resource.format->id != WINED3DFMT_P8_UINT - && This->resource.format->id != WINED3DFMT_P8_UINT_A8_UNORM)) + if (surface->palette || (surface->resource.format->id != WINED3DFMT_P8_UINT + && surface->resource.format->id != WINED3DFMT_P8_UINT_A8_UNORM)) { /* If a ddraw-style palette is attached assume no d3d9 palette change. * Also the palette isn't interesting if the surface format isn't P8 or A8P8 @@ -2472,199 +4473,24 @@ BOOL palette9_changed(IWineD3DSurfaceImpl *This) return FALSE; } - if (This->palette9) + if (surface->palette9) { - if (!memcmp(This->palette9, device->palettes[device->currentPalette], sizeof(PALETTEENTRY) * 256)) + if (!memcmp(surface->palette9, device->palettes[device->currentPalette], sizeof(PALETTEENTRY) * 256)) { return FALSE; } - } else { - This->palette9 = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256); - } - memcpy(This->palette9, device->palettes[device->currentPalette], sizeof(PALETTEENTRY) * 256); - return TRUE; -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BOOL srgb_mode) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - DWORD flag = srgb_mode ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE; - - TRACE("iface %p, srgb %#x.\n", iface, srgb_mode); - - if (!(This->Flags & flag)) { - TRACE("Reloading because surface is dirty\n"); - } else if(/* Reload: gl texture has ck, now no ckey is set OR */ - ((This->Flags & SFLAG_GLCKEY) && (!(This->CKeyFlags & WINEDDSD_CKSRCBLT))) || - /* Reload: vice versa OR */ - ((!(This->Flags & SFLAG_GLCKEY)) && (This->CKeyFlags & WINEDDSD_CKSRCBLT)) || - /* Also reload: Color key is active AND the color key has changed */ - ((This->CKeyFlags & WINEDDSD_CKSRCBLT) && ( - (This->glCKey.dwColorSpaceLowValue != This->SrcBltCKey.dwColorSpaceLowValue) || - (This->glCKey.dwColorSpaceHighValue != This->SrcBltCKey.dwColorSpaceHighValue)))) { - TRACE("Reloading because of color keying\n"); - /* To perform the color key conversion we need a sysmem copy of - * the surface. Make sure we have it - */ - - surface_load_location(This, SFLAG_INSYSMEM, NULL); - /* Make sure the texture is reloaded because of the color key change, this kills performance though :( */ - /* TODO: This is not necessarily needed with hw palettized texture support */ - surface_modify_location(This, SFLAG_INSYSMEM, TRUE); - } else { - TRACE("surface is already in texture\n"); - return WINED3D_OK; - } - - /* Resources are placed in system RAM and do not need to be recreated when a device is lost. - * These resources are not bound by device size or format restrictions. Because of this, - * these resources cannot be accessed by the Direct3D device nor set as textures or render targets. - * However, these resources can always be created, locked, and copied. - */ - if (This->resource.pool == WINED3DPOOL_SCRATCH ) - { - FIXME("(%p) Operation not supported for scratch textures\n",This); - return WINED3DERR_INVALIDCALL; - } - - surface_load_location(This, flag, NULL /* no partial locking for textures yet */); - - if (!(This->Flags & SFLAG_DONOTFREE)) { - HeapFree(GetProcessHeap(), 0, This->resource.heapMemory); - This->resource.allocatedMemory = NULL; - This->resource.heapMemory = NULL; - surface_modify_location(This, SFLAG_INSYSMEM, FALSE); - } - - return WINED3D_OK; -} - -/* Context activation is done by the caller. */ -static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - TRACE("iface %p, srgb %#x.\n", iface, srgb); - - if (This->container.type == WINED3D_CONTAINER_TEXTURE) - { - TRACE("Passing to container.\n"); - IWineD3DBaseTexture_BindTexture((IWineD3DBaseTexture *)This->container.u.texture, srgb); } else { - GLuint *name; - - TRACE("(%p) : Binding surface\n", This); - - name = srgb ? &This->texture_name_srgb : &This->texture_name; - - ENTER_GL(); - - if (!This->texture_level) - { - if (!*name) { - glGenTextures(1, name); - checkGLcall("glGenTextures"); - TRACE("Surface %p given name %d\n", This, *name); - - glBindTexture(This->texture_target, *name); - checkGLcall("glBindTexture"); - glTexParameteri(This->texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - checkGLcall("glTexParameteri(dimension, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)"); - glTexParameteri(This->texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - checkGLcall("glTexParameteri(dimension, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)"); - glTexParameteri(This->texture_target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); - checkGLcall("glTexParameteri(dimension, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE)"); - glTexParameteri(This->texture_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri(dimension, GL_TEXTURE_MIN_FILTER, GL_NEAREST)"); - glTexParameteri(This->texture_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri(dimension, GL_TEXTURE_MAG_FILTER, GL_NEAREST)"); - } - /* This is where we should be reducing the amount of GLMemoryUsed */ - } else if (*name) { - /* Mipmap surfaces should have a base texture container */ - ERR("Mipmap surface has a glTexture bound to it!\n"); - } - - glBindTexture(This->texture_target, *name); - checkGLcall("glBindTexture"); - - LEAVE_GL(); + surface->palette9 = HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * 256); } + memcpy(surface->palette9, device->palettes[device->currentPalette], sizeof(PALETTEENTRY) * 256); + + return TRUE; } -static HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, enum wined3d_format_id format) +void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - HRESULT hr; - - TRACE("(%p) : Calling base function first\n", This); - hr = IWineD3DBaseSurfaceImpl_SetFormat(iface, format); - if(SUCCEEDED(hr)) { - This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); - TRACE("(%p) : glFormat %d, glFormatInternal %d, glType %d\n", This, This->resource.format->glFormat, - This->resource.format->glInternal, This->resource.format->glType); - } - return hr; -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - - if(This->Flags & (SFLAG_LOCKED | SFLAG_DCINUSE)) { - WARN("Surface is locked or the HDC is in use\n"); - return WINED3DERR_INVALIDCALL; - } - - if(Mem && Mem != This->resource.allocatedMemory) { - void *release = NULL; - - /* Do I have to copy the old surface content? */ - if(This->Flags & SFLAG_DIBSECTION) { - /* Release the DC. No need to hold the critical section for the update - * Thread because this thread runs only on front buffers, but this method - * fails for render targets in the check above. - */ - SelectObject(This->hDC, This->dib.holdbitmap); - DeleteDC(This->hDC); - /* Release the DIB section */ - DeleteObject(This->dib.DIBsection); - This->dib.bitmap_data = NULL; - This->resource.allocatedMemory = NULL; - This->hDC = NULL; - This->Flags &= ~SFLAG_DIBSECTION; - } else if(!(This->Flags & SFLAG_USERPTR)) { - release = This->resource.heapMemory; - This->resource.heapMemory = NULL; - } - This->resource.allocatedMemory = Mem; - This->Flags |= SFLAG_USERPTR | SFLAG_INSYSMEM; - - /* Now the surface memory is most up do date. Invalidate drawable and texture */ - surface_modify_location(This, SFLAG_INSYSMEM, TRUE); - - /* For client textures opengl has to be notified */ - if (This->Flags & SFLAG_CLIENT) - surface_release_client_storage(This); - - /* Now free the old memory if any */ - HeapFree(GetProcessHeap(), 0, release); - } else if(This->Flags & SFLAG_USERPTR) { - /* LockRect and GetDC will re-create the dib section and allocated memory */ - This->resource.allocatedMemory = NULL; - /* HeapMemory should be NULL already */ - if (This->resource.heapMemory) - ERR("User pointer surface has heap memory allocated.\n"); - This->Flags &= ~SFLAG_USERPTR; - - if (This->Flags & SFLAG_CLIENT) - surface_release_client_storage(This); - } - return WINED3D_OK; -} - -void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) { - /* Flip the surface contents */ /* Flip the DC */ { @@ -2677,15 +4503,15 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) { /* Flip the DIBsection */ { HBITMAP tmp; - BOOL hasDib = front->Flags & SFLAG_DIBSECTION; + BOOL hasDib = front->flags & SFLAG_DIBSECTION; tmp = front->dib.DIBsection; front->dib.DIBsection = back->dib.DIBsection; back->dib.DIBsection = tmp; - if(back->Flags & SFLAG_DIBSECTION) front->Flags |= SFLAG_DIBSECTION; - else front->Flags &= ~SFLAG_DIBSECTION; - if(hasDib) back->Flags |= SFLAG_DIBSECTION; - else back->Flags &= ~SFLAG_DIBSECTION; + if (back->flags & SFLAG_DIBSECTION) front->flags |= SFLAG_DIBSECTION; + else front->flags &= ~SFLAG_DIBSECTION; + if (hasDib) back->flags |= SFLAG_DIBSECTION; + else back->flags &= ~SFLAG_DIBSECTION; } /* Flip the surface data */ @@ -2731,82 +4557,24 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) { tmp = back->texture_name_srgb; back->texture_name_srgb = front->texture_name_srgb; front->texture_name_srgb = tmp; + + resource_unload(&back->resource); + resource_unload(&front->resource); } { - DWORD tmp_flags = back->Flags; - back->Flags = front->Flags; - front->Flags = tmp_flags; + DWORD tmp_flags = back->flags; + back->flags = front->flags; + front->flags = tmp_flags; } } -static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DSurface *override, DWORD Flags) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DSwapChainImpl *swapchain = NULL; - - TRACE("(%p)->(%p,%x)\n", This, override, Flags); - - /* Flipping is only supported on RenderTargets and overlays*/ - if( !(This->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_OVERLAY)) ) { - WARN("Tried to flip a non-render target, non-overlay surface\n"); - return WINEDDERR_NOTFLIPPABLE; - } - - if(This->resource.usage & WINED3DUSAGE_OVERLAY) { - flip_surface(This, (IWineD3DSurfaceImpl *) override); - - /* Update the overlay if it is visible */ - if(This->overlay_dest) { - return IWineD3DSurface_DrawOverlay((IWineD3DSurface *) This); - } else { - return WINED3D_OK; - } - } - - if(override) { - /* DDraw sets this for the X11 surfaces, so don't confuse the user - * FIXME("(%p) Target override is not supported by now\n", This); - * Additionally, it isn't really possible to support triple-buffering - * properly on opengl at all - */ - } - - if (This->container.type != WINED3D_CONTAINER_SWAPCHAIN) - { - ERR("Flipped surface is not on a swapchain\n"); - return WINEDDERR_NOTFLIPPABLE; - } - swapchain = This->container.u.swapchain; - - /* Just overwrite the swapchain presentation interval. This is ok because only ddraw apps can call Flip, - * and only d3d8 and d3d9 apps specify the presentation interval - */ - if (!(Flags & (WINEDDFLIP_NOVSYNC | WINEDDFLIP_INTERVAL2 | WINEDDFLIP_INTERVAL3 | WINEDDFLIP_INTERVAL4))) - { - /* Most common case first to avoid wasting time on all the other cases */ - swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_ONE; - } else if(Flags & WINEDDFLIP_NOVSYNC) { - swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_IMMEDIATE; - } else if(Flags & WINEDDFLIP_INTERVAL2) { - swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_TWO; - } else if(Flags & WINEDDFLIP_INTERVAL3) { - swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_THREE; - } else { - swapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_FOUR; - } - - /* Flipping a OpenGL surface -> Use WineD3DDevice::Present */ - return IWineD3DSwapChain_Present((IWineD3DSwapChain *)swapchain, - NULL, NULL, swapchain->win_handle, NULL, 0); -} - -/* Does a direct frame buffer -> texture copy. Stretching is done - * with single pixel copy calls - */ -static void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *dst_surface, IWineD3DSurfaceImpl *src_surface, +/* Does a direct frame buffer -> texture copy. Stretching is done with single + * pixel copy calls. */ +static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface, const RECT *src_rect, const RECT *dst_rect_in, WINED3DTEXTUREFILTERTYPE Filter) { - IWineD3DDeviceImpl *device = dst_surface->resource.device; + struct wined3d_device *device = dst_surface->resource.device; float xrel, yrel; UINT row; struct wined3d_context *context; @@ -2868,10 +4636,12 @@ static void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *dst_surface, IWineD3D glCopyTexSubImage2D(dst_surface->texture_target, dst_surface->texture_level, dst_rect.left /*xoffset */, dst_rect.top /* y offset */, - src_rect->left, src_surface->currentDesc.Height - src_rect->bottom, + src_rect->left, src_surface->resource.height - src_rect->bottom, dst_rect.right - dst_rect.left, dst_rect.bottom - dst_rect.top); - } else { - UINT yoffset = src_surface->currentDesc.Height - src_rect->top + dst_rect.top - 1; + } + else + { + UINT yoffset = src_surface->resource.height - src_rect->top + dst_rect.top - 1; /* I have to process this row by row to swap the image, * otherwise it would be upside down, so stretching in y direction * doesn't cost extra time @@ -2913,15 +4683,15 @@ static void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *dst_surface, IWineD3D } /* Uses the hardware to stretch and flip the image */ -static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWineD3DSurfaceImpl *src_surface, +static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface, const RECT *src_rect, const RECT *dst_rect_in, WINED3DTEXTUREFILTERTYPE Filter) { - IWineD3DDeviceImpl *device = dst_surface->resource.device; + struct wined3d_device *device = dst_surface->resource.device; + struct wined3d_swapchain *src_swapchain = NULL; GLuint src, backup = 0; - IWineD3DSwapChainImpl *src_swapchain = NULL; float left, right, top, bottom; /* Texture coordinates */ - UINT fbwidth = src_surface->currentDesc.Width; - UINT fbheight = src_surface->currentDesc.Height; + UINT fbwidth = src_surface->resource.width; + UINT fbheight = src_surface->resource.height; struct wined3d_context *context; GLenum drawBuffer = GL_BACK; GLenum texture_target; @@ -2976,7 +4746,7 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine checkGLcall("glEnable(texture_target)"); /* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */ - src_surface->Flags &= ~SFLAG_INTEXTURE; + src_surface->flags &= ~SFLAG_INTEXTURE; } /* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag @@ -3064,18 +4834,18 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine left = src_rect->left; right = src_rect->right; - if (upsidedown) + if (!upsidedown) { - top = src_surface->currentDesc.Height - src_rect->top; - bottom = src_surface->currentDesc.Height - src_rect->bottom; + top = src_surface->resource.height - src_rect->top; + bottom = src_surface->resource.height - src_rect->bottom; } else { - top = src_surface->currentDesc.Height - src_rect->bottom; - bottom = src_surface->currentDesc.Height - src_rect->top; + top = src_surface->resource.height - src_rect->bottom; + bottom = src_surface->resource.height - src_rect->top; } - if (src_surface->Flags & SFLAG_NORMCOORD) + if (src_surface->flags & SFLAG_NORMCOORD) { left /= src_surface->pow2Width; right /= src_surface->pow2Width; @@ -3093,19 +4863,19 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine glBegin(GL_QUADS); /* bottom left */ glTexCoord2f(left, bottom); - glVertex2i(0, fbheight); + glVertex2i(0, 0); /* top left */ glTexCoord2f(left, top); - glVertex2i(0, fbheight - dst_rect.bottom - dst_rect.top); + glVertex2i(0, dst_rect.bottom - dst_rect.top); /* top right */ glTexCoord2f(right, top); - glVertex2i(dst_rect.right - dst_rect.left, fbheight - dst_rect.bottom - dst_rect.top); + glVertex2i(dst_rect.right - dst_rect.left, dst_rect.bottom - dst_rect.top); /* bottom right */ glTexCoord2f(right, bottom); - glVertex2i(dst_rect.right - dst_rect.left, fbheight); + glVertex2i(dst_rect.right - dst_rect.left, 0); glEnd(); checkGLcall("glEnd and previous"); @@ -3151,21 +4921,21 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine glBegin(GL_QUADS); /* top left */ - glTexCoord2f(0.0f, (float)fbheight / (float)src_surface->pow2Height); - glVertex2i(0, 0); - - /* bottom left */ glTexCoord2f(0.0f, 0.0f); glVertex2i(0, fbheight); - /* bottom right */ - glTexCoord2f((float)fbwidth / (float)src_surface->pow2Width, 0.0f); - glVertex2i(fbwidth, src_surface->currentDesc.Height); + /* bottom left */ + glTexCoord2f(0.0f, (float)fbheight / (float)src_surface->pow2Height); + glVertex2i(0, 0); - /* top right */ + /* bottom right */ glTexCoord2f((float)fbwidth / (float)src_surface->pow2Width, (float)fbheight / (float)src_surface->pow2Height); glVertex2i(fbwidth, 0); + + /* top right */ + glTexCoord2f((float)fbwidth / (float)src_surface->pow2Width, 0.0f); + glVertex2i(fbwidth, fbheight); glEnd(); } glDisable(texture_target); @@ -3194,40 +4964,40 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine surface_modify_location(dst_surface, SFLAG_INTEXTURE, TRUE); } -/* Until the blit_shader is ready, define some prototypes here. */ -static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, - const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, - const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format); - /* Front buffer coordinates are always full screen coordinates, but our GL * drawable is limited to the window's client area. The sysmem and texture * copies do have the full screen size. Note that GL has a bottom-left * origin, while D3D has a top-left origin. */ -void surface_translate_frontbuffer_coords(IWineD3DSurfaceImpl *surface, HWND window, RECT *rect) +void surface_translate_drawable_coords(struct wined3d_surface *surface, HWND window, RECT *rect) { - POINT offset = {0, surface->currentDesc.Height}; - RECT windowsize; + UINT drawable_height; - GetClientRect(window, &windowsize); - offset.y -= windowsize.bottom - windowsize.top; - ScreenToClient(window, &offset); - OffsetRect(rect, offset.x, offset.y); -} + if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN + && surface == surface->container.u.swapchain->front_buffer) + { + POINT offset = {0, 0}; + RECT windowsize; -static BOOL surface_is_full_rect(IWineD3DSurfaceImpl *surface, const RECT *r) -{ - if ((r->left && r->right) || abs(r->right - r->left) != surface->currentDesc.Width) - return FALSE; - if ((r->top && r->bottom) || abs(r->bottom - r->top) != surface->currentDesc.Height) - return FALSE; - return TRUE; + ScreenToClient(window, &offset); + OffsetRect(rect, offset.x, offset.y); + + GetClientRect(window, &windowsize); + drawable_height = windowsize.bottom - windowsize.top; + } + else + { + drawable_height = surface->resource.height; + } + + rect->top = drawable_height - rect->top; + rect->bottom = drawable_height - rect->bottom; } /* blit between surface locations. onscreen on different swapchains is not supported. * depth / stencil is not supported. */ -static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILTERTYPE filter, - IWineD3DSurfaceImpl *src_surface, DWORD src_location, const RECT *src_rect_in, - IWineD3DSurfaceImpl *dst_surface, DWORD dst_location, const RECT *dst_rect_in) +static void surface_blt_fbo(struct wined3d_device *device, const WINED3DTEXTUREFILTERTYPE filter, + struct wined3d_surface *src_surface, DWORD src_location, const RECT *src_rect_in, + struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect_in) { const struct wined3d_gl_info *gl_info; struct wined3d_context *context; @@ -3289,11 +5059,7 @@ static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILT TRACE("Source surface %p is onscreen.\n", src_surface); - if (buffer == GL_FRONT) - surface_translate_frontbuffer_coords(src_surface, context->win_handle, &src_rect); - - src_rect.top = src_surface->currentDesc.Height - src_rect.top; - src_rect.bottom = src_surface->currentDesc.Height - src_rect.bottom; + surface_translate_drawable_coords(src_surface, context->win_handle, &src_rect); ENTER_GL(); context_bind_fbo(context, GL_READ_FRAMEBUFFER, NULL); @@ -3308,6 +5074,7 @@ static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILT glReadBuffer(GL_COLOR_ATTACHMENT0); checkGLcall("glReadBuffer()"); } + context_check_fbo_status(context, GL_READ_FRAMEBUFFER); LEAVE_GL(); if (dst_location == SFLAG_INDRAWABLE) @@ -3316,11 +5083,7 @@ static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILT TRACE("Destination surface %p is onscreen.\n", dst_surface); - if (buffer == GL_FRONT) - surface_translate_frontbuffer_coords(dst_surface, context->win_handle, &dst_rect); - - dst_rect.top = dst_surface->currentDesc.Height - dst_rect.top; - dst_rect.bottom = dst_surface->currentDesc.Height - dst_rect.bottom; + surface_translate_drawable_coords(dst_surface, context->win_handle, &dst_rect); ENTER_GL(); context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, NULL); @@ -3334,6 +5097,7 @@ static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILT context_apply_fbo_state_blit(context, GL_DRAW_FRAMEBUFFER, dst_surface, NULL, dst_location); context_set_draw_buffer(context, GL_COLOR_ATTACHMENT0); } + context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE)); @@ -3350,18 +5114,90 @@ static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILT LEAVE_GL(); - if (wined3d_settings.strict_draw_ordering) wglFlush(); /* Flush to ensure ordering across contexts. */ + if (wined3d_settings.strict_draw_ordering + || (dst_location == SFLAG_INDRAWABLE + && dst_surface->container.u.swapchain->front_buffer == dst_surface)) + wglFlush(); + + context_release(context); +} + +static void surface_blt_to_drawable(struct wined3d_device *device, + WINED3DTEXTUREFILTERTYPE filter, BOOL color_key, + struct wined3d_surface *src_surface, const RECT *src_rect_in, + struct wined3d_surface *dst_surface, const RECT *dst_rect_in) +{ + struct wined3d_context *context; + RECT src_rect, dst_rect; + + src_rect = *src_rect_in; + dst_rect = *dst_rect_in; + + /* Make sure the surface is up-to-date. This should probably use + * surface_load_location() and worry about the destination surface too, + * unless we're overwriting it completely. */ + surface_internal_preload(src_surface, SRGB_RGB); + + /* Activate the destination context, set it up for blitting */ + context = context_acquire(device, dst_surface); + context_apply_blit_state(context, device); + + if (!surface_is_offscreen(dst_surface)) + surface_translate_drawable_coords(dst_surface, context->win_handle, &dst_rect); + + device->blitter->set_shader(device->blit_priv, context->gl_info, src_surface); + + ENTER_GL(); + + if (color_key) + { + glEnable(GL_ALPHA_TEST); + checkGLcall("glEnable(GL_ALPHA_TEST)"); + + /* When the primary render target uses P8, the alpha component + * contains the palette index. Which means that the colorkey is one of + * the palette entries. In other cases pixels that should be masked + * away have alpha set to 0. */ + if (primary_render_target_is_p8(device)) + glAlphaFunc(GL_NOTEQUAL, (float)src_surface->SrcBltCKey.dwColorSpaceLowValue / 256.0f); + else + glAlphaFunc(GL_NOTEQUAL, 0.0f); + checkGLcall("glAlphaFunc"); + } + else + { + glDisable(GL_ALPHA_TEST); + checkGLcall("glDisable(GL_ALPHA_TEST)"); + } + + draw_textured_quad(src_surface, &src_rect, &dst_rect, filter); + + if (color_key) + { + glDisable(GL_ALPHA_TEST); + checkGLcall("glDisable(GL_ALPHA_TEST)"); + } + + LEAVE_GL(); + + /* Leave the opengl state valid for blitting */ + device->blitter->unset_shader(context->gl_info); + + if (wined3d_settings.strict_draw_ordering + || (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN + && (dst_surface->container.u.swapchain->front_buffer == dst_surface))) + wglFlush(); /* Flush to ensure ordering across contexts. */ context_release(context); } /* Do not call while under the GL lock. */ -HRESULT surface_color_fill(IWineD3DSurfaceImpl *s, const RECT *rect, const WINED3DCOLORVALUE *color) +HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const WINED3DCOLORVALUE *color) { - IWineD3DDeviceImpl *device = s->resource.device; + struct wined3d_device *device = s->resource.device; const struct blit_shader *blitter; - blitter = wined3d_select_blitter(&device->adapter->gl_info, BLIT_OP_COLOR_FILL, + blitter = wined3d_select_blitter(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_FILL, NULL, 0, 0, NULL, rect, s->resource.usage, s->resource.pool, s->resource.format); if (!blitter) { @@ -3372,20 +5208,19 @@ HRESULT surface_color_fill(IWineD3DSurfaceImpl *s, const RECT *rect, const WINED return blitter->color_fill(device, s, rect, color); } -/* Not called from the VTable */ /* Do not call while under the GL lock. */ -static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, const RECT *DestRect, - IWineD3DSurfaceImpl *src_surface, const RECT *SrcRect, DWORD Flags, const WINEDDBLTFX *DDBltFx, +static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surface, const RECT *DestRect, + struct wined3d_surface *src_surface, const RECT *SrcRect, DWORD flags, const WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter) { - IWineD3DDeviceImpl *device = dst_surface->resource.device; + struct wined3d_device *device = dst_surface->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - IWineD3DSwapChainImpl *srcSwapchain = NULL, *dstSwapchain = NULL; + struct wined3d_swapchain *srcSwapchain = NULL, *dstSwapchain = NULL; RECT dst_rect, src_rect; TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n", dst_surface, wine_dbgstr_rect(DestRect), src_surface, wine_dbgstr_rect(SrcRect), - Flags, DDBltFx, debug_d3dtexturefiltertype(Filter)); + flags, DDBltFx, debug_d3dtexturefiltertype(Filter)); /* Get the swapchain. One of the surfaces has to be a primary surface */ if (dst_surface->resource.pool == WINED3DPOOL_SYSTEMMEM) @@ -3411,15 +5246,16 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, /* Early sort out of cases where no render target is used */ if (!dstSwapchain && !srcSwapchain - && src_surface != device->render_targets[0] - && dst_surface != device->render_targets[0]) + && src_surface != device->fb.render_targets[0] + && dst_surface != device->fb.render_targets[0]) { TRACE("No surface is render target, not using hardware blit.\n"); return WINED3DERR_INVALIDCALL; } /* No destination color keying supported */ - if(Flags & (WINEDDBLT_KEYDEST | WINEDDBLT_KEYDESTOVERRIDE)) { + if (flags & (WINEDDBLT_KEYDEST | WINEDDBLT_KEYDESTOVERRIDE)) + { /* Can we support that with glBlendFunc if blitting to the frame buffer? */ TRACE("Destination color key not supported in accelerated Blit, falling back to software\n"); return WINED3DERR_INVALIDCALL; @@ -3445,8 +5281,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, TRACE("Looking if a Present can be done...\n"); /* Source Rectangle must be full surface */ if (src_rect.left || src_rect.top - || src_rect.right != src_surface->currentDesc.Width - || src_rect.bottom != src_surface->currentDesc.Height) + || src_rect.right != src_surface->resource.width + || src_rect.bottom != src_surface->resource.height) { TRACE("No, Source rectangle doesn't match\n"); break; @@ -3460,16 +5296,16 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, } /* Destination must be full surface or match the clipping rectangle */ - if (dst_surface->clipper && ((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd) + if (dst_surface->clipper && dst_surface->clipper->hWnd) { RECT cliprect; POINT pos[2]; - GetClientRect(((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd, &cliprect); + GetClientRect(dst_surface->clipper->hWnd, &cliprect); pos[0].x = dst_rect.left; pos[0].y = dst_rect.top; pos[1].x = dst_rect.right; pos[1].y = dst_rect.bottom; - MapWindowPoints(GetDesktopWindow(), ((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd, pos, 2); + MapWindowPoints(GetDesktopWindow(), dst_surface->clipper->hWnd, pos, 2); if(pos[0].x != cliprect.left || pos[0].y != cliprect.top || pos[1].x != cliprect.right || pos[1].y != cliprect.bottom) @@ -3481,8 +5317,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, } } else if (dst_rect.left || dst_rect.top - || dst_rect.right != dst_surface->currentDesc.Width - || dst_rect.bottom != dst_surface->currentDesc.Height) + || dst_rect.right != dst_surface->resource.width + || dst_rect.bottom != dst_surface->resource.height) { TRACE("No, dest rectangle doesn't match(surface size)\n"); break; @@ -3491,7 +5327,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, TRACE("Yes\n"); /* These flags are unimportant for the flag check, remove them */ - if (!(Flags & ~(WINEDDBLT_DONOTWAIT | WINEDDBLT_WAIT))) + if (!(flags & ~(WINEDDBLT_DONOTWAIT | WINEDDBLT_WAIT))) { WINED3DSWAPEFFECT orig_swap = dstSwapchain->presentParms.SwapEffect; @@ -3513,9 +5349,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, dstSwapchain->presentParms.SwapEffect = WINED3DSWAPEFFECT_COPY; dstSwapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_IMMEDIATE; - TRACE("Full screen back buffer -> front buffer blt, performing a flip instead\n"); - IWineD3DSwapChain_Present((IWineD3DSwapChain *)dstSwapchain, - NULL, NULL, dstSwapchain->win_handle, NULL, 0); + TRACE("Full screen back buffer -> front buffer blt, performing a flip instead.\n"); + wined3d_swapchain_present(dstSwapchain, NULL, NULL, dstSwapchain->win_handle, NULL, 0); dstSwapchain->presentParms.SwapEffect = orig_swap; @@ -3536,16 +5371,16 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, else if (dstSwapchain) { /* Handled with regular texture -> swapchain blit */ - if (src_surface == device->render_targets[0]) + if (src_surface == device->fb.render_targets[0]) TRACE("Blit from active render target to a swapchain\n"); } - else if (srcSwapchain && dst_surface == device->render_targets[0]) + else if (srcSwapchain && dst_surface == device->fb.render_targets[0]) { FIXME("Implement blit from a swapchain to the active render target\n"); return WINED3DERR_INVALIDCALL; } - if ((srcSwapchain || src_surface == device->render_targets[0]) && !dstSwapchain) + if ((srcSwapchain || src_surface == device->fb.render_targets[0]) && !dstSwapchain) { /* Blit from render target to texture */ BOOL stretchx; @@ -3558,7 +5393,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, return WINED3DERR_INVALIDCALL; } - if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) { + if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) + { TRACE("Color keying not supported by frame buffer to texture blit\n"); return WINED3DERR_INVALIDCALL; /* Destination color key is checked above */ @@ -3583,9 +5419,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, * * If EXT_framebuffer_blit is supported that can be used instead. Note that EXT_framebuffer_blit implies * FBO support, so it doesn't really make sense to try and make it work with different offscreen rendering - * backends. - */ - if (fbo_blit_supported(gl_info, BLIT_OP_BLIT, + * backends. */ + if (fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format, &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format)) { @@ -3594,8 +5429,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, dst_surface, SFLAG_INDRAWABLE, &dst_rect); surface_modify_location(dst_surface, SFLAG_INDRAWABLE, TRUE); } - else if (!stretchx || dst_rect.right - dst_rect.left > src_surface->currentDesc.Width - || dst_rect.bottom - dst_rect.top > src_surface->currentDesc.Height) + else if (!stretchx || dst_rect.right - dst_rect.left > src_surface->resource.width + || dst_rect.bottom - dst_rect.top > src_surface->resource.height) { TRACE("No stretching in x direction, using direct framebuffer -> texture copy\n"); fb_copy_to_texture_direct(dst_surface, src_surface, &src_rect, &dst_rect, Filter); @@ -3604,7 +5439,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, fb_copy_to_texture_hwstretch(dst_surface, src_surface, &src_rect, &dst_rect, Filter); } - if (!(dst_surface->Flags & SFLAG_DONOTFREE)) + if (!(dst_surface->flags & SFLAG_DONOTFREE)) { HeapFree(GetProcessHeap(), 0, dst_surface->resource.heapMemory); dst_surface->resource.allocatedMemory = NULL; @@ -3612,7 +5447,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, } else { - dst_surface->Flags &= ~SFLAG_INSYSMEM; + dst_surface->flags &= ~SFLAG_INSYSMEM; } return WINED3D_OK; @@ -3622,12 +5457,11 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, /* Blit from offscreen surface to render target */ DWORD oldCKeyFlags = src_surface->CKeyFlags; WINEDDCOLORKEY oldBltCKey = src_surface->SrcBltCKey; - struct wined3d_context *context; TRACE("Blt from surface %p to rendertarget %p\n", src_surface, dst_surface); - if (!(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) - && fbo_blit_supported(gl_info, BLIT_OP_BLIT, + if (!(flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) + && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format, &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, @@ -3643,14 +5477,23 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, return WINED3D_OK; } - if (!(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) - && arbfp_blit.blit_supported(gl_info, BLIT_OP_BLIT, + if (!(flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) + && arbfp_blit.blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format, &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format)) { - return arbfp_blit_surface(device, src_surface, &src_rect, dst_surface, &dst_rect, BLIT_OP_BLIT, Filter); + return arbfp_blit_surface(device, src_surface, &src_rect, dst_surface, &dst_rect, + WINED3D_BLIT_OP_COLOR_BLIT, Filter); + } + + if (!device->blitter->blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, + &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format, + &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format)) + { + FIXME("Unsupported blit operation falling back to software\n"); + return WINED3DERR_INVALIDCALL; } /* Color keying: Check if we have to do a color keyed blt, @@ -3660,86 +5503,29 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, * The surface keeps track of the color key last used to load the opengl surface. * PreLoad will catch the change to the flags and color key and reload if necessary. */ - if(Flags & WINEDDBLT_KEYSRC) { + if (flags & WINEDDBLT_KEYSRC) + { /* Use color key from surface */ - } else if(Flags & WINEDDBLT_KEYSRCOVERRIDE) { + } + else if (flags & WINEDDBLT_KEYSRCOVERRIDE) + { /* Use color key from DDBltFx */ src_surface->CKeyFlags |= WINEDDSD_CKSRCBLT; src_surface->SrcBltCKey = DDBltFx->ddckSrcColorkey; - } else { + } + else + { /* Do not use color key */ src_surface->CKeyFlags &= ~WINEDDSD_CKSRCBLT; } - /* Now load the surface */ - surface_internal_preload(src_surface, SRGB_RGB); - - /* Activate the destination context, set it up for blitting */ - context = context_acquire(device, dst_surface); - context_apply_blit_state(context, device); - - if (dstSwapchain && dst_surface == dstSwapchain->front_buffer) - surface_translate_frontbuffer_coords(dst_surface, context->win_handle, &dst_rect); - - if (!device->blitter->blit_supported(gl_info, BLIT_OP_BLIT, - &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format, - &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format)) - { - FIXME("Unsupported blit operation falling back to software\n"); - return WINED3DERR_INVALIDCALL; - } - - device->blitter->set_shader((IWineD3DDevice *)device, src_surface); - - ENTER_GL(); - - /* This is for color keying */ - if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) { - glEnable(GL_ALPHA_TEST); - checkGLcall("glEnable(GL_ALPHA_TEST)"); - - /* When the primary render target uses P8, the alpha component contains the palette index. - * Which means that the colorkey is one of the palette entries. In other cases pixels that - * should be masked away have alpha set to 0. */ - if (primary_render_target_is_p8(device)) - glAlphaFunc(GL_NOTEQUAL, (float)src_surface->SrcBltCKey.dwColorSpaceLowValue / 256.0f); - else - glAlphaFunc(GL_NOTEQUAL, 0.0f); - checkGLcall("glAlphaFunc"); - } else { - glDisable(GL_ALPHA_TEST); - checkGLcall("glDisable(GL_ALPHA_TEST)"); - } - - /* Draw a textured quad - */ - draw_textured_quad(src_surface, &src_rect, &dst_rect, Filter); - - if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) { - glDisable(GL_ALPHA_TEST); - checkGLcall("glDisable(GL_ALPHA_TEST)"); - } + surface_blt_to_drawable(device, Filter, flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE), + src_surface, &src_rect, dst_surface, &dst_rect); /* Restore the color key parameters */ src_surface->CKeyFlags = oldCKeyFlags; src_surface->SrcBltCKey = oldBltCKey; - LEAVE_GL(); - - /* Leave the opengl state valid for blitting */ - device->blitter->unset_shader((IWineD3DDevice *)device); - - if (wined3d_settings.strict_draw_ordering || (dstSwapchain - && (dst_surface == dstSwapchain->front_buffer - || dstSwapchain->num_contexts > 1))) - wglFlush(); /* Flush to ensure ordering across contexts. */ - - context_release(context); - - /* TODO: If the surface is locked often, perform the Blt in software on the memory instead */ - /* The surface is now in the drawable. On onscreen surfaces or without fbos the texture - * is outdated now - */ surface_modify_location(dst_surface, SFLAG_INDRAWABLE, TRUE); return WINED3D_OK; @@ -3747,7 +5533,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, else { /* Source-Less Blit to render target */ - if (Flags & WINEDDBLT_COLORFILL) + if (flags & WINEDDBLT_COLORFILL) { WINED3DCOLORVALUE color; @@ -3766,305 +5552,15 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface, return WINED3DERR_INVALIDCALL; } -static HRESULT IWineD3DSurfaceImpl_BltZ(IWineD3DSurfaceImpl *This, const RECT *DestRect, - IWineD3DSurface *src_surface, const RECT *src_rect, DWORD Flags, const WINEDDBLTFX *DDBltFx) -{ - IWineD3DDeviceImpl *device = This->resource.device; - float depth; - - if (Flags & WINEDDBLT_DEPTHFILL) - { - switch (This->resource.format->id) - { - case WINED3DFMT_D16_UNORM: - depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x0000ffff; - break; - case WINED3DFMT_S1_UINT_D15_UNORM: - depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x00007fff; - break; - case WINED3DFMT_D24_UNORM_S8_UINT: - case WINED3DFMT_X8D24_UNORM: - depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x00ffffff; - break; - case WINED3DFMT_D32_UNORM: - depth = (float) DDBltFx->u5.dwFillDepth / (float) 0xffffffff; - break; - default: - depth = 0.0f; - ERR("Unexpected format for depth fill: %s.\n", debug_d3dformat(This->resource.format->id)); - } - - return IWineD3DDevice_Clear((IWineD3DDevice *)device, DestRect ? 1 : 0, DestRect, - WINED3DCLEAR_ZBUFFER, 0x00000000, depth, 0x00000000); - } - - FIXME("(%p): Unsupp depthstencil blit\n", This); - return WINED3DERR_INVALIDCALL; -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *DestRect, - IWineD3DSurface *src_surface, const RECT *SrcRect, DWORD Flags, - const WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DSurfaceImpl *src = (IWineD3DSurfaceImpl *)src_surface; - IWineD3DDeviceImpl *device = This->resource.device; - - TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", - iface, wine_dbgstr_rect(DestRect), src_surface, wine_dbgstr_rect(SrcRect), - Flags, DDBltFx, debug_d3dtexturefiltertype(Filter)); - TRACE("Usage is %s.\n", debug_d3dusage(This->resource.usage)); - - if ((This->Flags & SFLAG_LOCKED) || (src && (src->Flags & SFLAG_LOCKED))) - { - WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); - return WINEDDERR_SURFACEBUSY; - } - - /* Accessing the depth stencil is supposed to fail between a BeginScene and EndScene pair, - * except depth blits, which seem to work - */ - if (This == device->depth_stencil || (src && src == device->depth_stencil)) - { - if (device->inScene && !(Flags & WINEDDBLT_DEPTHFILL)) - { - TRACE("Attempt to access the depth stencil surface in a BeginScene / EndScene pair, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; - } - else if (SUCCEEDED(IWineD3DSurfaceImpl_BltZ(This, DestRect, src_surface, SrcRect, Flags, DDBltFx))) - { - TRACE("Z Blit override handled the blit\n"); - return WINED3D_OK; - } - } - - /* Special cases for RenderTargets */ - if ((This->resource.usage & WINED3DUSAGE_RENDERTARGET) - || (src && (src->resource.usage & WINED3DUSAGE_RENDERTARGET))) - { - if (SUCCEEDED(IWineD3DSurfaceImpl_BltOverride(This, DestRect, src, SrcRect, Flags, DDBltFx, Filter))) - return WINED3D_OK; - } - - /* For the rest call the X11 surface implementation. - * For RenderTargets this should be implemented OpenGL accelerated in BltOverride, - * other Blts are rather rare. */ - return IWineD3DBaseSurfaceImpl_Blt(iface, DestRect, src_surface, SrcRect, Flags, DDBltFx, Filter); -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, - IWineD3DSurface *src_surface, const RECT *rsrc, DWORD trans) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DSurfaceImpl *src = (IWineD3DSurfaceImpl *)src_surface; - IWineD3DDeviceImpl *device = This->resource.device; - - TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", - iface, dstx, dsty, src_surface, wine_dbgstr_rect(rsrc), trans); - - if ((This->Flags & SFLAG_LOCKED) || (src->Flags & SFLAG_LOCKED)) - { - WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); - return WINEDDERR_SURFACEBUSY; - } - - if (device->inScene && (This == device->depth_stencil || src == device->depth_stencil)) - { - TRACE("Attempt to access the depth stencil surface in a BeginScene / EndScene pair, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; - } - - /* Special cases for RenderTargets */ - if ((This->resource.usage & WINED3DUSAGE_RENDERTARGET) - || (src->resource.usage & WINED3DUSAGE_RENDERTARGET)) - { - - RECT SrcRect, DstRect; - DWORD Flags=0; - - surface_get_rect(src, rsrc, &SrcRect); - - DstRect.left = dstx; - DstRect.top=dsty; - DstRect.right = dstx + SrcRect.right - SrcRect.left; - DstRect.bottom = dsty + SrcRect.bottom - SrcRect.top; - - /* Convert BltFast flags into Btl ones because it is called from SurfaceImpl_Blt as well */ - if(trans & WINEDDBLTFAST_SRCCOLORKEY) - Flags |= WINEDDBLT_KEYSRC; - if(trans & WINEDDBLTFAST_DESTCOLORKEY) - Flags |= WINEDDBLT_KEYDEST; - if(trans & WINEDDBLTFAST_WAIT) - Flags |= WINEDDBLT_WAIT; - if(trans & WINEDDBLTFAST_DONOTWAIT) - Flags |= WINEDDBLT_DONOTWAIT; - - if (SUCCEEDED(IWineD3DSurfaceImpl_BltOverride(This, - &DstRect, src, &SrcRect, Flags, NULL, WINED3DTEXF_POINT))) - return WINED3D_OK; - } - - return IWineD3DBaseSurfaceImpl_BltFast(iface, dstx, dsty, src_surface, rsrc, trans); -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - RGBQUAD col[256]; - IWineD3DPaletteImpl *pal = This->palette; - unsigned int n; - TRACE("(%p)\n", This); - - if (!pal) return WINED3D_OK; - - if (This->resource.format->id == WINED3DFMT_P8_UINT - || This->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) - { - if (This->resource.usage & WINED3DUSAGE_RENDERTARGET) - { - /* Make sure the texture is up to date. This call doesn't do - * anything if the texture is already up to date. */ - surface_load_location(This, SFLAG_INTEXTURE, NULL); - - /* We want to force a palette refresh, so mark the drawable as not being up to date */ - surface_modify_location(This, SFLAG_INDRAWABLE, FALSE); - } - else - { - if (!(This->Flags & SFLAG_INSYSMEM)) - { - TRACE("Palette changed with surface that does not have an up to date system memory copy.\n"); - surface_load_location(This, SFLAG_INSYSMEM, NULL); - } - TRACE("Dirtifying surface\n"); - surface_modify_location(This, SFLAG_INSYSMEM, TRUE); - } - } - - if(This->Flags & SFLAG_DIBSECTION) { - TRACE("(%p): Updating the hdc's palette\n", This); - for (n=0; n<256; n++) { - col[n].rgbRed = pal->palents[n].peRed; - col[n].rgbGreen = pal->palents[n].peGreen; - col[n].rgbBlue = pal->palents[n].peBlue; - col[n].rgbReserved = 0; - } - SetDIBColorTable(This->hDC, 0, 256, col); - } - - /* Propagate the changes to the drawable when we have a palette. */ - if (This->resource.usage & WINED3DUSAGE_RENDERTARGET) - surface_load_location(This, SFLAG_INDRAWABLE, NULL); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { - /** Check against the maximum texture sizes supported by the video card **/ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - const struct wined3d_gl_info *gl_info = &This->resource.device->adapter->gl_info; - unsigned int pow2Width, pow2Height; - - This->texture_name = 0; - This->texture_target = GL_TEXTURE_2D; - - /* Non-power2 support */ - if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]) - { - pow2Width = This->currentDesc.Width; - pow2Height = This->currentDesc.Height; - } - else - { - /* Find the nearest pow2 match */ - pow2Width = pow2Height = 1; - while (pow2Width < This->currentDesc.Width) pow2Width <<= 1; - while (pow2Height < This->currentDesc.Height) pow2Height <<= 1; - } - This->pow2Width = pow2Width; - This->pow2Height = pow2Height; - - if (pow2Width > This->currentDesc.Width || pow2Height > This->currentDesc.Height) - { - /* TODO: Add support for non power two compressed textures. */ - if (This->resource.format->Flags & WINED3DFMT_FLAG_COMPRESSED) - { - FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n", - This, This->currentDesc.Width, This->currentDesc.Height); - return WINED3DERR_NOTAVAILABLE; - } - } - - if(pow2Width != This->currentDesc.Width || - pow2Height != This->currentDesc.Height) { - This->Flags |= SFLAG_NONPOW2; - } - - TRACE("%p\n", This); - if ((This->pow2Width > gl_info->limits.texture_size || This->pow2Height > gl_info->limits.texture_size) - && !(This->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL))) - { - /* one of three options - 1: Do the same as we do with nonpow 2 and scale the texture, (any texture ops would require the texture to be scaled which is potentially slow) - 2: Set the texture to the maximum size (bad idea) - 3: WARN and return WINED3DERR_NOTAVAILABLE; - 4: Create the surface, but allow it to be used only for DirectDraw Blts. Some apps(e.g. Swat 3) create textures with a Height of 16 and a Width > 3000 and blt 16x16 letter areas from them to the render target. - */ - if(This->resource.pool == WINED3DPOOL_DEFAULT || This->resource.pool == WINED3DPOOL_MANAGED) - { - WARN("(%p) Unable to allocate a surface which exceeds the maximum OpenGL texture size\n", This); - return WINED3DERR_NOTAVAILABLE; - } - - /* We should never use this surface in combination with OpenGL! */ - TRACE("(%p) Creating an oversized surface: %ux%u\n", This, This->pow2Width, This->pow2Height); - } - else - { - /* Don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE - is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE - doesn't work in combination with ARB_TEXTURE_RECTANGLE. - */ - if (This->Flags & SFLAG_NONPOW2 && gl_info->supported[ARB_TEXTURE_RECTANGLE] - && !(This->resource.format->id == WINED3DFMT_P8_UINT - && gl_info->supported[EXT_PALETTED_TEXTURE] - && wined3d_settings.rendertargetlock_mode == RTL_READTEX)) - { - This->texture_target = GL_TEXTURE_RECTANGLE_ARB; - This->pow2Width = This->currentDesc.Width; - This->pow2Height = This->currentDesc.Height; - This->Flags &= ~(SFLAG_NONPOW2 | SFLAG_NORMCOORD); - } - } - - switch (wined3d_settings.offscreen_rendering_mode) - { - case ORM_FBO: - This->get_drawable_size = get_drawable_size_fbo; - break; - - case ORM_BACKBUFFER: - This->get_drawable_size = get_drawable_size_backbuffer; - break; - - default: - ERR("Unhandled offscreen rendering mode %#x.\n", wined3d_settings.offscreen_rendering_mode); - return WINED3DERR_INVALIDCALL; - } - - This->Flags |= SFLAG_INSYSMEM; - - return WINED3D_OK; -} - /* GL locking is done by the caller */ -static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info, +static void surface_depth_blt(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, GLuint texture, GLsizei w, GLsizei h, GLenum target) { - IWineD3DDeviceImpl *device = This->resource.device; + struct wined3d_device *device = surface->resource.device; GLint compare_mode = GL_NONE; struct blt_info info; GLint old_binding = 0; + RECT rect; glPushAttrib(GL_ENABLE_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_VIEWPORT_BIT); @@ -4077,9 +5573,10 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl glDepthFunc(GL_ALWAYS); glDepthMask(GL_TRUE); glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - glViewport(0, 0, w, h); + glViewport(0, surface->pow2Height - h, w, h); - surface_get_blt_info(target, NULL, w, h, &info); + SetRect(&rect, 0, h, w, 0); + surface_get_blt_info(target, &rect, surface->pow2Width, surface->pow2Height, &info); GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); glGetIntegerv(info.binding, &old_binding); glBindTexture(info.bind_target, texture); @@ -4089,8 +5586,8 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl if (compare_mode != GL_NONE) glTexParameteri(info.bind_target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); } - device->shader_backend->shader_select_depth_blt((IWineD3DDevice *)device, - info.tex_type, &This->ds_current_size); + device->shader_backend->shader_select_depth_blt(device->shader_priv, + gl_info, info.tex_type, &surface->ds_current_size); glBegin(GL_TRIANGLE_STRIP); glTexCoord3fv(info.coords[0]); @@ -4108,10 +5605,10 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl glPopAttrib(); - device->shader_backend->shader_deselect_depth_blt((IWineD3DDevice *)device); + device->shader_backend->shader_deselect_depth_blt(device->shader_priv, gl_info); } -void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, +void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) { TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h); @@ -4121,29 +5618,37 @@ void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, surface->ds_current_size.cx = w; surface->ds_current_size.cy = h; - surface->Flags &= ~SFLAG_DS_LOCATIONS; - surface->Flags |= location; + surface->flags &= ~SFLAG_DS_LOCATIONS; + surface->flags |= location; } /* Context activation is done by the caller. */ -void surface_load_ds_location(IWineD3DSurfaceImpl *surface, struct wined3d_context *context, DWORD location) +void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) { - IWineD3DDeviceImpl *device = surface->resource.device; + struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info = context->gl_info; + GLsizei w, h; TRACE("surface %p, new location %#x.\n", surface, location); /* TODO: Make this work for modes other than FBO */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return; - if (!(surface->Flags & location)) + if (!(surface->flags & location)) { + w = surface->ds_current_size.cx; + h = surface->ds_current_size.cy; surface->ds_current_size.cx = 0; surface->ds_current_size.cy = 0; } + else + { + w = surface->resource.width; + h = surface->resource.height; + } - if (surface->ds_current_size.cx == surface->currentDesc.Width - && surface->ds_current_size.cy == surface->currentDesc.Height) + if (surface->ds_current_size.cx == surface->resource.width + && surface->ds_current_size.cy == surface->resource.height) { TRACE("Location (%#x) is already up to date.\n", location); return; @@ -4155,10 +5660,17 @@ void surface_load_ds_location(IWineD3DSurfaceImpl *surface, struct wined3d_conte return; } - if (!(surface->Flags & SFLAG_LOCATIONS)) + if (!(surface->flags & SFLAG_DS_LOCATIONS)) { + /* This mostly happens when a depth / stencil is used without being + * cleared first. In principle we could upload from sysmem, or + * explicitly clear before first usage. For the moment there don't + * appear to be a lot of applications depending on this, so a FIXME + * should do. */ FIXME("No up to date depth stencil location.\n"); - surface->Flags |= location; + surface->flags |= location; + surface->ds_current_size.cx = surface->resource.width; + surface->ds_current_size.cy = surface->resource.height; return; } @@ -4166,14 +5678,13 @@ void surface_load_ds_location(IWineD3DSurfaceImpl *surface, struct wined3d_conte { GLint old_binding = 0; GLenum bind_target; - GLsizei w, h; /* The render target is allowed to be smaller than the depth/stencil * buffer, so the onscreen depth/stencil buffer is potentially smaller * than the offscreen surface. Don't overwrite the offscreen surface * with undefined data. */ - w = min(surface->currentDesc.Width, context->swapchain->presentParms.BackBufferWidth); - h = min(surface->currentDesc.Height, context->swapchain->presentParms.BackBufferHeight); + w = min(w, context->swapchain->presentParms.BackBufferWidth); + h = min(h, context->swapchain->presentParms.BackBufferHeight); TRACE("Copying onscreen depth buffer to depth texture.\n"); @@ -4248,7 +5759,7 @@ void surface_load_ds_location(IWineD3DSurfaceImpl *surface, struct wined3d_conte context_bind_fbo(context, GL_FRAMEBUFFER, NULL); surface_depth_blt(surface, gl_info, surface->texture_name, - surface->currentDesc.Width, surface->currentDesc.Height, surface->texture_target); + w, h, surface->texture_target); checkGLcall("depth_blt"); if (context->current_fbo) context_bind_fbo(context, GL_FRAMEBUFFER, &context->current_fbo->id); @@ -4262,14 +5773,15 @@ void surface_load_ds_location(IWineD3DSurfaceImpl *surface, struct wined3d_conte ERR("Invalid location (%#x) specified.\n", location); } - surface->Flags |= location; - surface->ds_current_size.cx = surface->currentDesc.Width; - surface->ds_current_size.cy = surface->currentDesc.Height; + surface->flags |= location; + surface->ds_current_size.cx = surface->resource.width; + surface->ds_current_size.cy = surface->resource.height; } -void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL persistent) +void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL persistent) { - IWineD3DSurfaceImpl *overlay; + const struct wined3d_gl_info *gl_info = &surface->resource.device->adapter->gl_info; + struct wined3d_surface *overlay; TRACE("surface %p, location %s, persistent %#x.\n", surface, debug_surflocation(flag), persistent); @@ -4287,93 +5799,75 @@ void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL pers } } + if (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX) + && gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + flag |= (SFLAG_INTEXTURE | SFLAG_INSRGBTEX); + } + if (persistent) { - if (((surface->Flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE)) - || ((surface->Flags & SFLAG_INSRGBTEX) && !(flag & SFLAG_INSRGBTEX))) + if (((surface->flags & SFLAG_INTEXTURE) && !(flag & SFLAG_INTEXTURE)) + || ((surface->flags & SFLAG_INSRGBTEX) && !(flag & SFLAG_INSRGBTEX))) { if (surface->container.type == WINED3D_CONTAINER_TEXTURE) { TRACE("Passing to container.\n"); - IWineD3DBaseTexture_SetDirty((IWineD3DBaseTexture *)surface->container.u.texture, TRUE); + wined3d_texture_set_dirty(surface->container.u.texture, TRUE); } } - surface->Flags &= ~SFLAG_LOCATIONS; - surface->Flags |= flag; + surface->flags &= ~SFLAG_LOCATIONS; + surface->flags |= flag; /* Redraw emulated overlays, if any */ if (flag & SFLAG_INDRAWABLE && !list_empty(&surface->overlays)) { - LIST_FOR_EACH_ENTRY(overlay, &surface->overlays, IWineD3DSurfaceImpl, overlay_entry) + LIST_FOR_EACH_ENTRY(overlay, &surface->overlays, struct wined3d_surface, overlay_entry) { - IWineD3DSurface_DrawOverlay((IWineD3DSurface *)overlay); + overlay->surface_ops->surface_draw_overlay(overlay); } } } else { - if ((surface->Flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX))) + if ((surface->flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (flag & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX))) { if (surface->container.type == WINED3D_CONTAINER_TEXTURE) { TRACE("Passing to container\n"); - IWineD3DBaseTexture_SetDirty((IWineD3DBaseTexture *)surface->container.u.texture, TRUE); + wined3d_texture_set_dirty(surface->container.u.texture, TRUE); } } - surface->Flags &= ~flag; + surface->flags &= ~flag; } - if (!(surface->Flags & SFLAG_LOCATIONS)) + if (!(surface->flags & SFLAG_LOCATIONS)) { ERR("Surface %p does not have any up to date location.\n", surface); } } -static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT *rect_in) +static DWORD resource_access_from_location(DWORD location) { - IWineD3DDeviceImpl *device = This->resource.device; - IWineD3DSwapChainImpl *swapchain; - struct wined3d_context *context; - RECT src_rect, dst_rect; - - surface_get_rect(This, rect_in, &src_rect); - - context = context_acquire(device, This); - context_apply_blit_state(context, device); - if (context->render_offscreen) + switch (location) { - dst_rect.left = src_rect.left; - dst_rect.right = src_rect.right; - dst_rect.top = src_rect.bottom; - dst_rect.bottom = src_rect.top; + case SFLAG_INSYSMEM: + return WINED3D_RESOURCE_ACCESS_CPU; + + case SFLAG_INDRAWABLE: + case SFLAG_INSRGBTEX: + case SFLAG_INTEXTURE: + return WINED3D_RESOURCE_ACCESS_GPU; + + default: + FIXME("Unhandled location %#x.\n", location); + return 0; } - else - { - dst_rect = src_rect; - } - - swapchain = This->container.type == WINED3D_CONTAINER_SWAPCHAIN ? This->container.u.swapchain : NULL; - if (swapchain && This == swapchain->front_buffer) - surface_translate_frontbuffer_coords(This, context->win_handle, &dst_rect); - - device->blitter->set_shader((IWineD3DDevice *) device, This); - - ENTER_GL(); - draw_textured_quad(This, &src_rect, &dst_rect, WINED3DTEXF_POINT); - LEAVE_GL(); - - device->blitter->unset_shader((IWineD3DDevice *) device); - - if (wined3d_settings.strict_draw_ordering || (swapchain - && (This == swapchain->front_buffer || swapchain->num_contexts > 1))) - wglFlush(); /* Flush to ensure ordering across contexts. */ - - context_release(context); } -HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RECT *rect) +HRESULT surface_load_location(struct wined3d_surface *surface, DWORD flag, const RECT *rect) { - IWineD3DDeviceImpl *device = surface->resource.device; + struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; BOOL drawable_read_ok = surface_is_offscreen(surface); struct wined3d_format format; @@ -4416,16 +5910,29 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE } } - if (surface->Flags & flag) + if (flag == SFLAG_INSRGBTEX && gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + flag = SFLAG_INTEXTURE; + } + + if (surface->flags & flag) { TRACE("Location already up to date\n"); return WINED3D_OK; } - if (!(surface->Flags & SFLAG_LOCATIONS)) + if (WARN_ON(d3d_surface)) + { + DWORD required_access = resource_access_from_location(flag); + if ((surface->resource.access_flags & required_access) != required_access) + WARN("Operation requires %#x access, but surface only has %#x.\n", + required_access, surface->resource.access_flags); + } + + if (!(surface->flags & SFLAG_LOCATIONS)) { ERR("Surface %p does not have any up to date location.\n", surface); - surface->Flags |= SFLAG_LOST; + surface->flags |= SFLAG_LOST; return WINED3DERR_DEVICELOST; } @@ -4434,13 +5941,13 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE surface_prepare_system_memory(surface); /* Download the surface to system memory */ - if (surface->Flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) + if (surface->flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) { struct wined3d_context *context = NULL; if (!device->isInDraw) context = context_acquire(device, NULL); - surface_bind_and_dirtify(surface, !(surface->Flags & SFLAG_INTEXTURE)); + surface_bind_and_dirtify(surface, gl_info, !(surface->flags & SFLAG_INTEXTURE)); surface_download_data(surface, gl_info); if (context) context_release(context); @@ -4449,19 +5956,25 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE { /* Note: It might be faster to download into a texture first. */ read_from_framebuffer(surface, rect, surface->resource.allocatedMemory, - IWineD3DSurface_GetPitch((IWineD3DSurface *)surface)); + wined3d_surface_get_pitch(surface)); } } else if (flag == SFLAG_INDRAWABLE) { - if (surface->Flags & SFLAG_INTEXTURE) + if (wined3d_settings.rendertargetlock_mode == RTL_READTEX) + surface_load_location(surface, SFLAG_INTEXTURE, NULL); + + if (surface->flags & SFLAG_INTEXTURE) { - surface_blt_to_drawable(surface, rect); + RECT r; + + surface_get_rect(surface, rect, &r); + surface_blt_to_drawable(device, WINED3DTEXF_POINT, FALSE, surface, &r, surface, &r); } else { int byte_count; - if ((surface->Flags & SFLAG_LOCATIONS) == SFLAG_INSRGBTEX) + if ((surface->flags & SFLAG_LOCATIONS) == SFLAG_INSRGBTEX) { /* This needs a shader to convert the srgb data sampled from the GL texture into RGB * values, otherwise we get incorrect values in the target. For now go the slow way @@ -4474,12 +5987,12 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE FALSE /* We won't use textures */, &format, &convert); /* The width is in 'length' not in bytes */ - width = surface->currentDesc.Width; - pitch = IWineD3DSurface_GetPitch((IWineD3DSurface *)surface); + width = surface->resource.width; + pitch = wined3d_surface_get_pitch(surface); /* Don't use PBOs for converted surfaces. During PBO conversion we look at SFLAG_CONVERTED * but it isn't set (yet) in all cases it is getting called. */ - if ((convert != NO_CONVERSION) && (surface->Flags & SFLAG_PBO)) + if ((convert != NO_CONVERSION) && (surface->flags & SFLAG_PBO)) { struct wined3d_context *context = NULL; @@ -4492,7 +6005,7 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE if ((convert != NO_CONVERSION) && surface->resource.allocatedMemory) { - int height = surface->currentDesc.Height; + int height = surface->resource.height; byte_count = format.conv_byte_count; /* Stick to the alignment for the converted surface too, makes it easier to load the surface */ @@ -4507,19 +6020,19 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE d3dfmt_convert_surface(surface->resource.allocatedMemory, mem, pitch, width, height, outpitch, convert, surface); - surface->Flags |= SFLAG_CONVERTED; + surface->flags |= SFLAG_CONVERTED; } else { - surface->Flags &= ~SFLAG_CONVERTED; + surface->flags &= ~SFLAG_CONVERTED; mem = surface->resource.allocatedMemory; byte_count = format.byte_count; } - flush_to_framebuffer_drawpixels(surface, format.glFormat, format.glType, byte_count, mem); + flush_to_framebuffer_drawpixels(surface, rect, format.glFormat, format.glType, byte_count, mem); /* Don't delete PBO memory */ - if ((mem != surface->resource.allocatedMemory) && !(surface->Flags & SFLAG_PBO)) + if ((mem != surface->resource.allocatedMemory) && !(surface->flags & SFLAG_PBO)) HeapFree(GetProcessHeap(), 0, mem); } } @@ -4527,18 +6040,18 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE { const DWORD attach_flags = WINED3DFMT_FLAG_FBO_ATTACHABLE | WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB; - if (drawable_read_ok && (surface->Flags & SFLAG_INDRAWABLE)) + if (drawable_read_ok && (surface->flags & SFLAG_INDRAWABLE)) { read_from_framebuffer_texture(surface, flag == SFLAG_INSRGBTEX); } - else if (surface->Flags & (SFLAG_INSRGBTEX | SFLAG_INTEXTURE) - && (surface->resource.format->Flags & attach_flags) == attach_flags - && fbo_blit_supported(gl_info, BLIT_OP_BLIT, + else if (surface->flags & (SFLAG_INSRGBTEX | SFLAG_INTEXTURE) + && (surface->resource.format->flags & attach_flags) == attach_flags + && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, NULL, surface->resource.usage, surface->resource.pool, surface->resource.format, NULL, surface->resource.usage, surface->resource.pool, surface->resource.format)) { DWORD src_location = flag == SFLAG_INSRGBTEX ? SFLAG_INTEXTURE : SFLAG_INSRGBTEX; - RECT rect = {0, 0, surface->currentDesc.Width, surface->currentDesc.Height}; + RECT rect = {0, 0, surface->resource.width, surface->resource.height}; surface_blt_fbo(surface->resource.device, WINED3DTEXF_POINT, surface, src_location, &rect, surface, flag, &rect); @@ -4554,7 +6067,7 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE if (srgb) { - if ((surface->Flags & (SFLAG_INTEXTURE | SFLAG_INSYSMEM)) == SFLAG_INTEXTURE) + if ((surface->flags & (SFLAG_INTEXTURE | SFLAG_INSYSMEM)) == SFLAG_INTEXTURE) { /* Performance warning... */ FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface); @@ -4563,14 +6076,14 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE } else { - if ((surface->Flags & (SFLAG_INSRGBTEX | SFLAG_INSYSMEM)) == SFLAG_INSRGBTEX) + if ((surface->flags & (SFLAG_INSRGBTEX | SFLAG_INSYSMEM)) == SFLAG_INSRGBTEX) { /* Performance warning... */ FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface); surface_load_location(surface, SFLAG_INSYSMEM, rect); } } - if (!(surface->Flags & SFLAG_INSYSMEM)) + if (!(surface->flags & SFLAG_INSYSMEM)) { WARN("Trying to load a texture from sysmem, but SFLAG_INSYSMEM is not set.\n"); /* Lets hope we get it from somewhere... */ @@ -4580,22 +6093,22 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE if (!device->isInDraw) context = context_acquire(device, NULL); surface_prepare_texture(surface, gl_info, srgb); - surface_bind_and_dirtify(surface, srgb); + surface_bind_and_dirtify(surface, gl_info, srgb); if (surface->CKeyFlags & WINEDDSD_CKSRCBLT) { - surface->Flags |= SFLAG_GLCKEY; + surface->flags |= SFLAG_GLCKEY; surface->glCKey = surface->SrcBltCKey; } - else surface->Flags &= ~SFLAG_GLCKEY; + else surface->flags &= ~SFLAG_GLCKEY; /* The width is in 'length' not in bytes */ - width = surface->currentDesc.Width; - pitch = IWineD3DSurface_GetPitch((IWineD3DSurface *)surface); + width = surface->resource.width; + pitch = wined3d_surface_get_pitch(surface); /* Don't use PBOs for converted surfaces. During PBO conversion we look at SFLAG_CONVERTED * but it isn't set (yet) in all cases it is getting called. */ - if ((convert != NO_CONVERSION || format.convert) && (surface->Flags & SFLAG_PBO)) + if ((convert != NO_CONVERSION || format.convert) && (surface->flags & SFLAG_PBO)) { TRACE("Removing the pbo attached to surface %p.\n", surface); surface_remove_pbo(surface, gl_info); @@ -4604,7 +6117,7 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE if (format.convert) { /* This code is entered for texture formats which need a fixup. */ - int height = surface->currentDesc.Height; + UINT height = surface->resource.height; /* Stick to the alignment for the converted surface too, makes it easier to load the surface */ outpitch = width * format.conv_byte_count; @@ -4621,7 +6134,7 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE else if (convert != NO_CONVERSION && surface->resource.allocatedMemory) { /* This code is only entered for color keying fixups */ - int height = surface->currentDesc.Height; + UINT height = surface->resource.height; /* Stick to the alignment for the converted surface too, makes it easier to load the surface */ outpitch = width * format.conv_byte_count; @@ -4646,7 +6159,7 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE glPixelStorei(GL_UNPACK_ROW_LENGTH, width); LEAVE_GL(); - if (mem || (surface->Flags & SFLAG_PBO)) + if (mem || (surface->flags & SFLAG_PBO)) surface_upload_data(surface, gl_info, &format, srgb, mem); /* Restore the default pitch */ @@ -4657,51 +6170,37 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE if (context) context_release(context); /* Don't delete PBO memory */ - if ((mem != surface->resource.allocatedMemory) && !(surface->Flags & SFLAG_PBO)) + if ((mem != surface->resource.allocatedMemory) && !(surface->flags & SFLAG_PBO)) HeapFree(GetProcessHeap(), 0, mem); } } - if (!rect) surface->Flags |= flag; + if (!rect) + { + surface->flags |= flag; - if (in_fbo && (surface->Flags & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE))) + if (flag != SFLAG_INSYSMEM && (surface->flags & SFLAG_INSYSMEM)) + surface_evict_sysmem(surface); + } + + if (in_fbo && (surface->flags & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE))) { /* With ORM_FBO, SFLAG_INTEXTURE and SFLAG_INDRAWABLE are the same for offscreen targets. */ - surface->Flags |= (SFLAG_INTEXTURE | SFLAG_INDRAWABLE); + surface->flags |= (SFLAG_INTEXTURE | SFLAG_INDRAWABLE); + } + + if (surface->flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX) + && gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + surface->flags |= (SFLAG_INTEXTURE | SFLAG_INSRGBTEX); } return WINED3D_OK; } -static WINED3DSURFTYPE WINAPI IWineD3DSurfaceImpl_GetImplType(IWineD3DSurface *iface) { - return SURFACE_OPENGL; -} - -static HRESULT WINAPI IWineD3DSurfaceImpl_DrawOverlay(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - HRESULT hr; - - /* If there's no destination surface there is nothing to do */ - if(!This->overlay_dest) return WINED3D_OK; - - /* Blt calls ModifyLocation on the dest surface, which in turn calls DrawOverlay to - * update the overlay. Prevent an endless recursion - */ - if(This->overlay_dest->Flags & SFLAG_INOVERLAYDRAW) { - return WINED3D_OK; - } - This->overlay_dest->Flags |= SFLAG_INOVERLAYDRAW; - hr = IWineD3DSurfaceImpl_Blt((IWineD3DSurface *) This->overlay_dest, &This->overlay_destrect, - iface, &This->overlay_srcrect, WINEDDBLT_WAIT, - NULL, WINED3DTEXF_LINEAR); - This->overlay_dest->Flags &= ~SFLAG_INOVERLAYDRAW; - - return hr; -} - -BOOL surface_is_offscreen(IWineD3DSurfaceImpl *surface) +BOOL surface_is_offscreen(struct wined3d_surface *surface) { - IWineD3DSwapChainImpl *swapchain = surface->container.u.swapchain; + struct wined3d_swapchain *swapchain = surface->container.u.swapchain; /* Not on a swapchain - must be offscreen */ if (surface->container.type != WINED3D_CONTAINER_SWAPCHAIN) return TRUE; @@ -4714,64 +6213,13 @@ BOOL surface_is_offscreen(IWineD3DSurfaceImpl *surface) return swapchain->render_to_fbo; } -const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = -{ - /* IUnknown */ - IWineD3DBaseSurfaceImpl_QueryInterface, - IWineD3DBaseSurfaceImpl_AddRef, - IWineD3DSurfaceImpl_Release, - /* IWineD3DResource */ - IWineD3DBaseSurfaceImpl_GetParent, - IWineD3DBaseSurfaceImpl_SetPrivateData, - IWineD3DBaseSurfaceImpl_GetPrivateData, - IWineD3DBaseSurfaceImpl_FreePrivateData, - IWineD3DBaseSurfaceImpl_SetPriority, - IWineD3DBaseSurfaceImpl_GetPriority, - IWineD3DSurfaceImpl_PreLoad, - IWineD3DSurfaceImpl_UnLoad, - IWineD3DBaseSurfaceImpl_GetType, - /* IWineD3DSurface */ - IWineD3DBaseSurfaceImpl_GetDesc, - IWineD3DSurfaceImpl_LockRect, - IWineD3DSurfaceImpl_UnlockRect, - IWineD3DSurfaceImpl_GetDC, - IWineD3DSurfaceImpl_ReleaseDC, - IWineD3DSurfaceImpl_Flip, - IWineD3DSurfaceImpl_Blt, - IWineD3DBaseSurfaceImpl_GetBltStatus, - IWineD3DBaseSurfaceImpl_GetFlipStatus, - IWineD3DBaseSurfaceImpl_IsLost, - IWineD3DBaseSurfaceImpl_Restore, - IWineD3DSurfaceImpl_BltFast, - IWineD3DBaseSurfaceImpl_GetPalette, - IWineD3DBaseSurfaceImpl_SetPalette, - IWineD3DSurfaceImpl_RealizePalette, - IWineD3DBaseSurfaceImpl_SetColorKey, - IWineD3DBaseSurfaceImpl_GetPitch, - IWineD3DSurfaceImpl_SetMem, - IWineD3DBaseSurfaceImpl_SetOverlayPosition, - IWineD3DBaseSurfaceImpl_GetOverlayPosition, - IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder, - IWineD3DBaseSurfaceImpl_UpdateOverlay, - IWineD3DBaseSurfaceImpl_SetClipper, - IWineD3DBaseSurfaceImpl_GetClipper, - /* Internal use: */ - IWineD3DSurfaceImpl_LoadTexture, - IWineD3DSurfaceImpl_BindTexture, - IWineD3DBaseSurfaceImpl_GetData, - IWineD3DSurfaceImpl_SetFormat, - IWineD3DSurfaceImpl_PrivateSetup, - IWineD3DSurfaceImpl_GetImplType, - IWineD3DSurfaceImpl_DrawOverlay -}; - -static HRESULT ffp_blit_alloc(IWineD3DDevice *iface) { return WINED3D_OK; } +static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; } /* Context activation is done by the caller. */ -static void ffp_blit_free(IWineD3DDevice *iface) { } +static void ffp_blit_free(struct wined3d_device *device) { } /* This function is used in case of 8bit paletted textures using GL_EXT_paletted_texture */ /* Context activation is done by the caller. */ -static void ffp_blit_p8_upload_palette(IWineD3DSurfaceImpl *surface, const struct wined3d_gl_info *gl_info) +static void ffp_blit_p8_upload_palette(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info) { BYTE table[256][4]; BOOL colorkey_active = (surface->CKeyFlags & WINEDDSD_CKSRCBLT) ? TRUE : FALSE; @@ -4785,10 +6233,8 @@ static void ffp_blit_p8_upload_palette(IWineD3DSurfaceImpl *surface, const struc } /* Context activation is done by the caller. */ -static HRESULT ffp_blit_set(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface) +static HRESULT ffp_blit_set(void *blit_priv, const struct wined3d_gl_info *gl_info, struct wined3d_surface *surface) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; enum complex_fixup fixup = get_complex_fixup(surface->resource.format->color_fixup); /* When EXT_PALETTED_TEXTURE is around, palette conversion is done by the GPU @@ -4805,11 +6251,8 @@ static HRESULT ffp_blit_set(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface) } /* Context activation is done by the caller. */ -static void ffp_blit_unset(IWineD3DDevice *iface) +static void ffp_blit_unset(const struct wined3d_gl_info *gl_info) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - ENTER_GL(); glDisable(GL_TEXTURE_2D); checkGLcall("glDisable(GL_TEXTURE_2D)"); @@ -4826,67 +6269,80 @@ static void ffp_blit_unset(IWineD3DDevice *iface) LEAVE_GL(); } -static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, +static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op, const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format) { enum complex_fixup src_fixup; - if (blit_op == BLIT_OP_COLOR_FILL) + switch (blit_op) { - if (!(dst_usage & WINED3DUSAGE_RENDERTARGET)) - { - TRACE("Color fill not supported\n"); + case WINED3D_BLIT_OP_COLOR_BLIT: + src_fixup = get_complex_fixup(src_format->color_fixup); + if (TRACE_ON(d3d_surface) && TRACE_ON(d3d)) + { + TRACE("Checking support for fixup:\n"); + dump_color_fixup_desc(src_format->color_fixup); + } + + if (!is_identity_fixup(dst_format->color_fixup)) + { + TRACE("Destination fixups are not supported\n"); + return FALSE; + } + + if (src_fixup == COMPLEX_FIXUP_P8 && gl_info->supported[EXT_PALETTED_TEXTURE]) + { + TRACE("P8 fixup supported\n"); + return TRUE; + } + + /* We only support identity conversions. */ + if (is_identity_fixup(src_format->color_fixup)) + { + TRACE("[OK]\n"); + return TRUE; + } + + TRACE("[FAILED]\n"); return FALSE; - } - return TRUE; + case WINED3D_BLIT_OP_COLOR_FILL: + if (!(dst_usage & WINED3DUSAGE_RENDERTARGET)) + { + TRACE("Color fill not supported\n"); + return FALSE; + } + + return TRUE; + + case WINED3D_BLIT_OP_DEPTH_FILL: + return TRUE; + + default: + TRACE("Unsupported blit_op=%d\n", blit_op); + return FALSE; } - - src_fixup = get_complex_fixup(src_format->color_fixup); - if (TRACE_ON(d3d_surface) && TRACE_ON(d3d)) - { - TRACE("Checking support for fixup:\n"); - dump_color_fixup_desc(src_format->color_fixup); - } - - if (blit_op != BLIT_OP_BLIT) - { - TRACE("Unsupported blit_op=%d\n", blit_op); - return FALSE; - } - - if (!is_identity_fixup(dst_format->color_fixup)) - { - TRACE("Destination fixups are not supported\n"); - return FALSE; - } - - if (src_fixup == COMPLEX_FIXUP_P8 && gl_info->supported[EXT_PALETTED_TEXTURE]) - { - TRACE("P8 fixup supported\n"); - return TRUE; - } - - /* We only support identity conversions. */ - if (is_identity_fixup(src_format->color_fixup)) - { - TRACE("[OK]\n"); - return TRUE; - } - - TRACE("[FAILED]\n"); - return FALSE; } /* Do not call while under the GL lock. */ -static HRESULT ffp_blit_color_fill(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *dst_surface, +static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface, const RECT *dst_rect, const WINED3DCOLORVALUE *color) { - const RECT draw_rect = {0, 0, dst_surface->currentDesc.Width, dst_surface->currentDesc.Height}; + const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height}; - return device_clear_render_targets(device, 1 /* rt_count */, &dst_surface, 1 /* rect_count */, - dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f /* depth */, 0 /* stencil */); + return device_clear_render_targets(device, 1, &dst_surface, NULL, + 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0); +} + +/* Do not call while under the GL lock. */ +static HRESULT ffp_blit_depth_fill(struct wined3d_device *device, + struct wined3d_surface *surface, const RECT *rect, float depth) +{ + const RECT draw_rect = {0, 0, surface->resource.width, surface->resource.height}; + + return device_clear_render_targets(device, 0, NULL, surface, + 1, rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0); } const struct blit_shader ffp_blit = { @@ -4895,35 +6351,36 @@ const struct blit_shader ffp_blit = { ffp_blit_set, ffp_blit_unset, ffp_blit_supported, - ffp_blit_color_fill + ffp_blit_color_fill, + ffp_blit_depth_fill, }; -static HRESULT cpu_blit_alloc(IWineD3DDevice *iface) +static HRESULT cpu_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; } /* Context activation is done by the caller. */ -static void cpu_blit_free(IWineD3DDevice *iface) +static void cpu_blit_free(struct wined3d_device *device) { } /* Context activation is done by the caller. */ -static HRESULT cpu_blit_set(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface) +static HRESULT cpu_blit_set(void *blit_priv, const struct wined3d_gl_info *gl_info, struct wined3d_surface *surface) { return WINED3D_OK; } /* Context activation is done by the caller. */ -static void cpu_blit_unset(IWineD3DDevice *iface) +static void cpu_blit_unset(const struct wined3d_gl_info *gl_info) { } -static BOOL cpu_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, +static BOOL cpu_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op, const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format) { - if (blit_op == BLIT_OP_COLOR_FILL) + if (blit_op == WINED3D_BLIT_OP_COLOR_FILL) { return TRUE; } @@ -4931,8 +6388,915 @@ static BOOL cpu_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_ return FALSE; } +static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, + const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter) +{ + int bpp, srcheight, srcwidth, dstheight, dstwidth, width; + const struct wined3d_format *src_format, *dst_format; + struct wined3d_surface *orig_src = src_surface; + WINED3DLOCKED_RECT dlock, slock; + HRESULT hr = WINED3D_OK; + const BYTE *sbuf; + RECT xdst,xsrc; + BYTE *dbuf; + int x, y; + + TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", + dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), + flags, fx, debug_d3dtexturefiltertype(filter)); + + if ((dst_surface->flags & SFLAG_LOCKED) || (src_surface && (src_surface->flags & SFLAG_LOCKED))) + { + WARN("Surface is busy, returning WINEDDERR_SURFACEBUSY\n"); + return WINEDDERR_SURFACEBUSY; + } + + /* First check for the validity of source / destination rectangles. + * This was verified using a test application and by MSDN. */ + if (src_rect) + { + if (src_surface) + { + if (src_rect->right < src_rect->left || src_rect->bottom < src_rect->top + || src_rect->left > src_surface->resource.width || src_rect->left < 0 + || src_rect->top > src_surface->resource.height || src_rect->top < 0 + || src_rect->right > src_surface->resource.width || src_rect->right < 0 + || src_rect->bottom > src_surface->resource.height || src_rect->bottom < 0) + { + WARN("Application gave us bad source rectangle for Blt.\n"); + return WINEDDERR_INVALIDRECT; + } + + if (!src_rect->right || !src_rect->bottom + || src_rect->left == (int)src_surface->resource.width + || src_rect->top == (int)src_surface->resource.height) + { + TRACE("Nothing to be done.\n"); + return WINED3D_OK; + } + } + + xsrc = *src_rect; + } + else if (src_surface) + { + xsrc.left = 0; + xsrc.top = 0; + xsrc.right = src_surface->resource.width; + xsrc.bottom = src_surface->resource.height; + } + else + { + memset(&xsrc, 0, sizeof(xsrc)); + } + + if (dst_rect) + { + /* For the Destination rect, it can be out of bounds on the condition + * that a clipper is set for the given surface. */ + if (!dst_surface->clipper && (dst_rect->right < dst_rect->left || dst_rect->bottom < dst_rect->top + || dst_rect->left > dst_surface->resource.width || dst_rect->left < 0 + || dst_rect->top > dst_surface->resource.height || dst_rect->top < 0 + || dst_rect->right > dst_surface->resource.width || dst_rect->right < 0 + || dst_rect->bottom > dst_surface->resource.height || dst_rect->bottom < 0)) + { + WARN("Application gave us bad destination rectangle for Blt without a clipper set.\n"); + return WINEDDERR_INVALIDRECT; + } + + if (dst_rect->right <= 0 || dst_rect->bottom <= 0 + || dst_rect->left >= (int)dst_surface->resource.width + || dst_rect->top >= (int)dst_surface->resource.height) + { + TRACE("Nothing to be done.\n"); + return WINED3D_OK; + } + + if (!src_surface) + { + RECT full_rect; + + full_rect.left = 0; + full_rect.top = 0; + full_rect.right = dst_surface->resource.width; + full_rect.bottom = dst_surface->resource.height; + IntersectRect(&xdst, &full_rect, dst_rect); + } + else + { + BOOL clip_horiz, clip_vert; + + xdst = *dst_rect; + clip_horiz = xdst.left < 0 || xdst.right > (int)dst_surface->resource.width; + clip_vert = xdst.top < 0 || xdst.bottom > (int)dst_surface->resource.height; + + if (clip_vert || clip_horiz) + { + /* Now check if this is a special case or not... */ + if ((flags & WINEDDBLT_DDFX) + || (clip_horiz && xdst.right - xdst.left != xsrc.right - xsrc.left) + || (clip_vert && xdst.bottom - xdst.top != xsrc.bottom - xsrc.top)) + { + WARN("Out of screen rectangle in special case. Not handled right now.\n"); + return WINED3D_OK; + } + + if (clip_horiz) + { + if (xdst.left < 0) + { + xsrc.left -= xdst.left; + xdst.left = 0; + } + if (xdst.right > dst_surface->resource.width) + { + xsrc.right -= (xdst.right - (int)dst_surface->resource.width); + xdst.right = (int)dst_surface->resource.width; + } + } + + if (clip_vert) + { + if (xdst.top < 0) + { + xsrc.top -= xdst.top; + xdst.top = 0; + } + if (xdst.bottom > dst_surface->resource.height) + { + xsrc.bottom -= (xdst.bottom - (int)dst_surface->resource.height); + xdst.bottom = (int)dst_surface->resource.height; + } + } + + /* And check if after clipping something is still to be done... */ + if ((xdst.right <= 0) || (xdst.bottom <= 0) + || (xdst.left >= (int)dst_surface->resource.width) + || (xdst.top >= (int)dst_surface->resource.height) + || (xsrc.right <= 0) || (xsrc.bottom <= 0) + || (xsrc.left >= (int)src_surface->resource.width) + || (xsrc.top >= (int)src_surface->resource.height)) + { + TRACE("Nothing to be done after clipping.\n"); + return WINED3D_OK; + } + } + } + } + else + { + xdst.left = 0; + xdst.top = 0; + xdst.right = dst_surface->resource.width; + xdst.bottom = dst_surface->resource.height; + } + + if (src_surface == dst_surface) + { + wined3d_surface_map(dst_surface, &dlock, NULL, 0); + slock = dlock; + src_format = dst_surface->resource.format; + dst_format = src_format; + } + else + { + dst_format = dst_surface->resource.format; + if (src_surface) + { + if (dst_surface->resource.format->id != src_surface->resource.format->id) + { + src_surface = surface_convert_format(src_surface, dst_format->id); + if (!src_surface) + { + /* The conv function writes a FIXME */ + WARN("Cannot convert source surface format to dest format.\n"); + goto release; + } + } + wined3d_surface_map(src_surface, &slock, NULL, WINED3DLOCK_READONLY); + src_format = src_surface->resource.format; + } + else + { + src_format = dst_format; + } + if (dst_rect) + wined3d_surface_map(dst_surface, &dlock, &xdst, 0); + else + wined3d_surface_map(dst_surface, &dlock, NULL, 0); + } + + if (!fx || !(fx->dwDDFX)) flags &= ~WINEDDBLT_DDFX; + + if (src_format->flags & dst_format->flags & WINED3DFMT_FLAG_FOURCC) + { + if (!dst_rect || src_surface == dst_surface) + { + memcpy(dlock.pBits, slock.pBits, dst_surface->resource.size); + goto release; + } + } + + bpp = dst_surface->resource.format->byte_count; + srcheight = xsrc.bottom - xsrc.top; + srcwidth = xsrc.right - xsrc.left; + dstheight = xdst.bottom - xdst.top; + dstwidth = xdst.right - xdst.left; + width = (xdst.right - xdst.left) * bpp; + + if (dst_rect && src_surface != dst_surface) + dbuf = dlock.pBits; + else + dbuf = (BYTE*)dlock.pBits+(xdst.top*dlock.Pitch)+(xdst.left*bpp); + + if (flags & WINEDDBLT_WAIT) + { + flags &= ~WINEDDBLT_WAIT; + } + if (flags & WINEDDBLT_ASYNC) + { + static BOOL displayed = FALSE; + if (!displayed) + FIXME("Can't handle WINEDDBLT_ASYNC flag right now.\n"); + displayed = TRUE; + flags &= ~WINEDDBLT_ASYNC; + } + if (flags & WINEDDBLT_DONOTWAIT) + { + /* WINEDDBLT_DONOTWAIT appeared in DX7 */ + static BOOL displayed = FALSE; + if (!displayed) + FIXME("Can't handle WINEDDBLT_DONOTWAIT flag right now.\n"); + displayed = TRUE; + flags &= ~WINEDDBLT_DONOTWAIT; + } + + /* First, all the 'source-less' blits */ + if (flags & WINEDDBLT_COLORFILL) + { + hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dlock.Pitch, fx->u5.dwFillColor); + flags &= ~WINEDDBLT_COLORFILL; + } + + if (flags & WINEDDBLT_DEPTHFILL) + { + FIXME("DDBLT_DEPTHFILL needs to be implemented!\n"); + } + if (flags & WINEDDBLT_ROP) + { + /* Catch some degenerate cases here. */ + switch (fx->dwROP) + { + case BLACKNESS: + hr = _Blt_ColorFill(dbuf,dstwidth,dstheight,bpp,dlock.Pitch,0); + break; + case 0xAA0029: /* No-op */ + break; + case WHITENESS: + hr = _Blt_ColorFill(dbuf,dstwidth,dstheight,bpp,dlock.Pitch,~0); + break; + case SRCCOPY: /* Well, we do that below? */ + break; + default: + FIXME("Unsupported raster op: %08x Pattern: %p\n", fx->dwROP, fx->u5.lpDDSPattern); + goto error; + } + flags &= ~WINEDDBLT_ROP; + } + if (flags & WINEDDBLT_DDROPS) + { + FIXME("\tDdraw Raster Ops: %08x Pattern: %p\n", fx->dwDDROP, fx->u5.lpDDSPattern); + } + /* Now the 'with source' blits. */ + if (src_surface) + { + const BYTE *sbase; + int sx, xinc, sy, yinc; + + if (!dstwidth || !dstheight) /* Hmm... stupid program? */ + goto release; + + if (filter != WINED3DTEXF_NONE && filter != WINED3DTEXF_POINT + && (srcwidth != dstwidth || srcheight != dstheight)) + { + /* Can happen when d3d9 apps do a StretchRect() call which isn't handled in GL. */ + FIXME("Filter %s not supported in software blit.\n", debug_d3dtexturefiltertype(filter)); + } + + sbase = (BYTE*)slock.pBits+(xsrc.top*slock.Pitch)+xsrc.left*bpp; + xinc = (srcwidth << 16) / dstwidth; + yinc = (srcheight << 16) / dstheight; + + if (!flags) + { + /* No effects, we can cheat here. */ + if (dstwidth == srcwidth) + { + if (dstheight == srcheight) + { + /* No stretching in either direction. This needs to be as + * fast as possible. */ + sbuf = sbase; + + /* Check for overlapping surfaces. */ + if (src_surface != dst_surface || xdst.top < xsrc.top + || xdst.right <= xsrc.left || xsrc.right <= xdst.left) + { + /* No overlap, or dst above src, so copy from top downwards. */ + for (y = 0; y < dstheight; ++y) + { + memcpy(dbuf, sbuf, width); + sbuf += slock.Pitch; + dbuf += dlock.Pitch; + } + } + else if (xdst.top > xsrc.top) + { + /* Copy from bottom upwards. */ + sbuf += (slock.Pitch*dstheight); + dbuf += (dlock.Pitch*dstheight); + for (y = 0; y < dstheight; ++y) + { + sbuf -= slock.Pitch; + dbuf -= dlock.Pitch; + memcpy(dbuf, sbuf, width); + } + } + else + { + /* Src and dst overlapping on the same line, use memmove. */ + for (y = 0; y < dstheight; ++y) + { + memmove(dbuf, sbuf, width); + sbuf += slock.Pitch; + dbuf += dlock.Pitch; + } + } + } + else + { + /* Stretching in y direction only. */ + for (y = sy = 0; y < dstheight; ++y, sy += yinc) + { + sbuf = sbase + (sy >> 16) * slock.Pitch; + memcpy(dbuf, sbuf, width); + dbuf += dlock.Pitch; + } + } + } + else + { + /* Stretching in X direction. */ + int last_sy = -1; + for (y = sy = 0; y < dstheight; ++y, sy += yinc) + { + sbuf = sbase + (sy >> 16) * slock.Pitch; + + if ((sy >> 16) == (last_sy >> 16)) + { + /* This source row is the same as last source row - + * Copy the already stretched row. */ + memcpy(dbuf, dbuf - dlock.Pitch, width); + } + else + { +#define STRETCH_ROW(type) \ +do { \ + const type *s = (const type *)sbuf; \ + type *d = (type *)dbuf; \ + for (x = sx = 0; x < dstwidth; ++x, sx += xinc) \ + d[x] = s[sx >> 16]; \ +} while(0) + + switch(bpp) + { + case 1: + STRETCH_ROW(BYTE); + break; + case 2: + STRETCH_ROW(WORD); + break; + case 4: + STRETCH_ROW(DWORD); + break; + case 3: + { + const BYTE *s; + BYTE *d = dbuf; + for (x = sx = 0; x < dstwidth; x++, sx+= xinc) + { + DWORD pixel; + + s = sbuf + 3 * (sx >> 16); + pixel = s[0] | (s[1] << 8) | (s[2] << 16); + d[0] = (pixel ) & 0xff; + d[1] = (pixel >> 8) & 0xff; + d[2] = (pixel >> 16) & 0xff; + d += 3; + } + break; + } + default: + FIXME("Stretched blit not implemented for bpp %u!\n", bpp * 8); + hr = WINED3DERR_NOTAVAILABLE; + goto error; + } +#undef STRETCH_ROW + } + dbuf += dlock.Pitch; + last_sy = sy; + } + } + } + else + { + LONG dstyinc = dlock.Pitch, dstxinc = bpp; + DWORD keylow = 0xFFFFFFFF, keyhigh = 0, keymask = 0xFFFFFFFF; + DWORD destkeylow = 0x0, destkeyhigh = 0xFFFFFFFF, destkeymask = 0xFFFFFFFF; + if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE)) + { + /* The color keying flags are checked for correctness in ddraw */ + if (flags & WINEDDBLT_KEYSRC) + { + keylow = src_surface->SrcBltCKey.dwColorSpaceLowValue; + keyhigh = src_surface->SrcBltCKey.dwColorSpaceHighValue; + } + else if (flags & WINEDDBLT_KEYSRCOVERRIDE) + { + keylow = fx->ddckSrcColorkey.dwColorSpaceLowValue; + keyhigh = fx->ddckSrcColorkey.dwColorSpaceHighValue; + } + + if (flags & WINEDDBLT_KEYDEST) + { + /* Destination color keys are taken from the source surface! */ + destkeylow = src_surface->DestBltCKey.dwColorSpaceLowValue; + destkeyhigh = src_surface->DestBltCKey.dwColorSpaceHighValue; + } + else if (flags & WINEDDBLT_KEYDESTOVERRIDE) + { + destkeylow = fx->ddckDestColorkey.dwColorSpaceLowValue; + destkeyhigh = fx->ddckDestColorkey.dwColorSpaceHighValue; + } + + if (bpp == 1) + { + keymask = 0xff; + } + else + { + keymask = src_format->red_mask + | src_format->green_mask + | src_format->blue_mask; + } + flags &= ~(WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE); + } + + if (flags & WINEDDBLT_DDFX) + { + BYTE *dTopLeft, *dTopRight, *dBottomLeft, *dBottomRight, *tmp; + LONG tmpxy; + dTopLeft = dbuf; + dTopRight = dbuf + ((dstwidth - 1) * bpp); + dBottomLeft = dTopLeft + ((dstheight - 1) * dlock.Pitch); + dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp); + + if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY) + { + /* I don't think we need to do anything about this flag */ + WARN("flags=DDBLT_DDFX nothing done for WINEDDBLTFX_ARITHSTRETCHY\n"); + } + if (fx->dwDDFX & WINEDDBLTFX_MIRRORLEFTRIGHT) + { + tmp = dTopRight; + dTopRight = dTopLeft; + dTopLeft = tmp; + tmp = dBottomRight; + dBottomRight = dBottomLeft; + dBottomLeft = tmp; + dstxinc = dstxinc * -1; + } + if (fx->dwDDFX & WINEDDBLTFX_MIRRORUPDOWN) + { + tmp = dTopLeft; + dTopLeft = dBottomLeft; + dBottomLeft = tmp; + tmp = dTopRight; + dTopRight = dBottomRight; + dBottomRight = tmp; + dstyinc = dstyinc * -1; + } + if (fx->dwDDFX & WINEDDBLTFX_NOTEARING) + { + /* I don't think we need to do anything about this flag */ + WARN("flags=DDBLT_DDFX nothing done for WINEDDBLTFX_NOTEARING\n"); + } + if (fx->dwDDFX & WINEDDBLTFX_ROTATE180) + { + tmp = dBottomRight; + dBottomRight = dTopLeft; + dTopLeft = tmp; + tmp = dBottomLeft; + dBottomLeft = dTopRight; + dTopRight = tmp; + dstxinc = dstxinc * -1; + dstyinc = dstyinc * -1; + } + if (fx->dwDDFX & WINEDDBLTFX_ROTATE270) + { + tmp = dTopLeft; + dTopLeft = dBottomLeft; + dBottomLeft = dBottomRight; + dBottomRight = dTopRight; + dTopRight = tmp; + tmpxy = dstxinc; + dstxinc = dstyinc; + dstyinc = tmpxy; + dstxinc = dstxinc * -1; + } + if (fx->dwDDFX & WINEDDBLTFX_ROTATE90) + { + tmp = dTopLeft; + dTopLeft = dTopRight; + dTopRight = dBottomRight; + dBottomRight = dBottomLeft; + dBottomLeft = tmp; + tmpxy = dstxinc; + dstxinc = dstyinc; + dstyinc = tmpxy; + dstyinc = dstyinc * -1; + } + if (fx->dwDDFX & WINEDDBLTFX_ZBUFFERBASEDEST) + { + /* I don't think we need to do anything about this flag */ + WARN("flags=WINEDDBLT_DDFX nothing done for WINEDDBLTFX_ZBUFFERBASEDEST\n"); + } + dbuf = dTopLeft; + flags &= ~(WINEDDBLT_DDFX); + } + +#define COPY_COLORKEY_FX(type) \ +do { \ + const type *s; \ + type *d = (type *)dbuf, *dx, tmp; \ + for (y = sy = 0; y < dstheight; ++y, sy += yinc) \ + { \ + s = (const type *)(sbase + (sy >> 16) * slock.Pitch); \ + dx = d; \ + for (x = sx = 0; x < dstwidth; ++x, sx += xinc) \ + { \ + tmp = s[sx >> 16]; \ + if (((tmp & keymask) < keylow || (tmp & keymask) > keyhigh) \ + && ((dx[0] & destkeymask) >= destkeylow && (dx[0] & destkeymask) <= destkeyhigh)) \ + { \ + dx[0] = tmp; \ + } \ + dx = (type *)(((BYTE *)dx) + dstxinc); \ + } \ + d = (type *)(((BYTE *)d) + dstyinc); \ + } \ +} while(0) + + switch (bpp) + { + case 1: + COPY_COLORKEY_FX(BYTE); + break; + case 2: + COPY_COLORKEY_FX(WORD); + break; + case 4: + COPY_COLORKEY_FX(DWORD); + break; + case 3: + { + const BYTE *s; + BYTE *d = dbuf, *dx; + for (y = sy = 0; y < dstheight; ++y, sy += yinc) + { + sbuf = sbase + (sy >> 16) * slock.Pitch; + dx = d; + for (x = sx = 0; x < dstwidth; ++x, sx+= xinc) + { + DWORD pixel, dpixel = 0; + s = sbuf + 3 * (sx>>16); + pixel = s[0] | (s[1] << 8) | (s[2] << 16); + dpixel = dx[0] | (dx[1] << 8 ) | (dx[2] << 16); + if (((pixel & keymask) < keylow || (pixel & keymask) > keyhigh) + && ((dpixel & keymask) >= destkeylow || (dpixel & keymask) <= keyhigh)) + { + dx[0] = (pixel ) & 0xff; + dx[1] = (pixel >> 8) & 0xff; + dx[2] = (pixel >> 16) & 0xff; + } + dx += dstxinc; + } + d += dstyinc; + } + break; + } + default: + FIXME("%s color-keyed blit not implemented for bpp %u!\n", + (flags & WINEDDBLT_KEYSRC) ? "Source" : "Destination", bpp * 8); + hr = WINED3DERR_NOTAVAILABLE; + goto error; +#undef COPY_COLORKEY_FX + } + } + } + +error: + if (flags && FIXME_ON(d3d_surface)) + { + FIXME("\tUnsupported flags: %#x.\n", flags); + } + +release: + wined3d_surface_unmap(dst_surface); + if (src_surface && src_surface != dst_surface) + wined3d_surface_unmap(src_surface); + /* Release the converted surface, if any. */ + if (src_surface && src_surface != orig_src) + wined3d_surface_decref(src_surface); + + return hr; +} + +static HRESULT surface_cpu_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD trans) +{ + const struct wined3d_format *src_format, *dst_format; + RECT lock_src, lock_dst, lock_union; + WINED3DLOCKED_RECT dlock, slock; + HRESULT hr = WINED3D_OK; + int bpp, w, h, x, y; + const BYTE *sbuf; + BYTE *dbuf; + RECT rsrc2; + + TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", + dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), trans); + + if ((dst_surface->flags & SFLAG_LOCKED) || (src_surface->flags & SFLAG_LOCKED)) + { + WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); + return WINEDDERR_SURFACEBUSY; + } + + if (!src_rect) + { + WARN("src_rect is NULL!\n"); + rsrc2.left = 0; + rsrc2.top = 0; + rsrc2.right = src_surface->resource.width; + rsrc2.bottom = src_surface->resource.height; + src_rect = &rsrc2; + } + + /* Check source rect for validity. Copied from normal Blt. Fixes Baldur's Gate. */ + if ((src_rect->bottom > src_surface->resource.height) || (src_rect->bottom < 0) + || (src_rect->top > src_surface->resource.height) || (src_rect->top < 0) + || (src_rect->left > src_surface->resource.width) || (src_rect->left < 0) + || (src_rect->right > src_surface->resource.width) || (src_rect->right < 0) + || (src_rect->right < src_rect->left) || (src_rect->bottom < src_rect->top)) + { + WARN("Application gave us bad source rectangle for BltFast.\n"); + return WINEDDERR_INVALIDRECT; + } + + h = src_rect->bottom - src_rect->top; + if (h > dst_surface->resource.height - dst_y) + h = dst_surface->resource.height - dst_y; + if (h > src_surface->resource.height - src_rect->top) + h = src_surface->resource.height - src_rect->top; + if (h <= 0) + return WINEDDERR_INVALIDRECT; + + w = src_rect->right - src_rect->left; + if (w > dst_surface->resource.width - dst_x) + w = dst_surface->resource.width - dst_x; + if (w > src_surface->resource.width - src_rect->left) + w = src_surface->resource.width - src_rect->left; + if (w <= 0) + return WINEDDERR_INVALIDRECT; + + /* Now compute the locking rectangle... */ + lock_src.left = src_rect->left; + lock_src.top = src_rect->top; + lock_src.right = lock_src.left + w; + lock_src.bottom = lock_src.top + h; + + lock_dst.left = dst_x; + lock_dst.top = dst_y; + lock_dst.right = dst_x + w; + lock_dst.bottom = dst_y + h; + + bpp = dst_surface->resource.format->byte_count; + + /* We need to lock the surfaces, or we won't get refreshes when done. */ + if (src_surface == dst_surface) + { + int pitch; + + UnionRect(&lock_union, &lock_src, &lock_dst); + + /* Lock the union of the two rectangles. */ + hr = wined3d_surface_map(dst_surface, &dlock, &lock_union, 0); + if (FAILED(hr)) + goto error; + + pitch = dlock.Pitch; + slock.Pitch = dlock.Pitch; + + /* Since slock was originally copied from this surface's description, we can just reuse it. */ + sbuf = dst_surface->resource.allocatedMemory + lock_src.top * pitch + lock_src.left * bpp; + dbuf = dst_surface->resource.allocatedMemory + lock_dst.top * pitch + lock_dst.left * bpp; + src_format = src_surface->resource.format; + dst_format = src_format; + } + else + { + hr = wined3d_surface_map(src_surface, &slock, &lock_src, WINED3DLOCK_READONLY); + if (FAILED(hr)) + goto error; + hr = wined3d_surface_map(dst_surface, &dlock, &lock_dst, 0); + if (FAILED(hr)) + goto error; + + sbuf = slock.pBits; + dbuf = dlock.pBits; + TRACE("Dst is at %p, Src is at %p.\n", dbuf, sbuf); + + src_format = src_surface->resource.format; + dst_format = dst_surface->resource.format; + } + + /* Handle compressed surfaces first... */ + if (src_format->flags & dst_format->flags & WINED3DFMT_FLAG_COMPRESSED) + { + UINT row_block_count; + + TRACE("compressed -> compressed copy\n"); + if (trans) + FIXME("trans arg not supported when a compressed surface is involved\n"); + if (dst_x || dst_y) + FIXME("offset for destination surface is not supported\n"); + if (src_surface->resource.format->id != dst_surface->resource.format->id) + { + FIXME("compressed -> compressed copy only supported for the same type of surface\n"); + hr = WINED3DERR_WRONGTEXTUREFORMAT; + goto error; + } + + row_block_count = (w + dst_format->block_width - 1) / dst_format->block_width; + for (y = 0; y < h; y += dst_format->block_height) + { + memcpy(dbuf, sbuf, row_block_count * dst_format->block_byte_count); + dbuf += dlock.Pitch; + sbuf += slock.Pitch; + } + + goto error; + } + if ((src_format->flags & WINED3DFMT_FLAG_COMPRESSED) && !(dst_format->flags & WINED3DFMT_FLAG_COMPRESSED)) + { + /* TODO: Use the libtxc_dxtn.so shared library to do software + * decompression. */ + ERR("Software decompression not supported.\n"); + goto error; + } + + if (trans & (WINEDDBLTFAST_SRCCOLORKEY | WINEDDBLTFAST_DESTCOLORKEY)) + { + DWORD keylow, keyhigh; + DWORD mask = src_surface->resource.format->red_mask + | src_surface->resource.format->green_mask + | src_surface->resource.format->blue_mask; + + /* For some 8-bit formats like L8 and P8 color masks don't make sense */ + if (!mask && bpp == 1) + mask = 0xff; + + TRACE("Color keyed copy.\n"); + if (trans & WINEDDBLTFAST_SRCCOLORKEY) + { + keylow = src_surface->SrcBltCKey.dwColorSpaceLowValue; + keyhigh = src_surface->SrcBltCKey.dwColorSpaceHighValue; + } + else + { + /* I'm not sure if this is correct. */ + FIXME("WINEDDBLTFAST_DESTCOLORKEY not fully supported yet.\n"); + keylow = dst_surface->DestBltCKey.dwColorSpaceLowValue; + keyhigh = dst_surface->DestBltCKey.dwColorSpaceHighValue; + } + +#define COPYBOX_COLORKEY(type) \ +do { \ + const type *s = (const type *)sbuf; \ + type *d = (type *)dbuf; \ + type tmp; \ + for (y = 0; y < h; y++) \ + { \ + for (x = 0; x < w; x++) \ + { \ + tmp = s[x]; \ + if ((tmp & mask) < keylow || (tmp & mask) > keyhigh) d[x] = tmp; \ + } \ + s = (const type *)((const BYTE *)s + slock.Pitch); \ + d = (type *)((BYTE *)d + dlock.Pitch); \ + } \ +} while(0) + + switch (bpp) + { + case 1: + COPYBOX_COLORKEY(BYTE); + break; + case 2: + COPYBOX_COLORKEY(WORD); + break; + case 4: + COPYBOX_COLORKEY(DWORD); + break; + case 3: + { + const BYTE *s; + DWORD tmp; + BYTE *d; + s = sbuf; + d = dbuf; + for (y = 0; y < h; ++y) + { + for (x = 0; x < w * 3; x += 3) + { + tmp = (DWORD)s[x] + ((DWORD)s[x + 1] << 8) + ((DWORD)s[x + 2] << 16); + if (tmp < keylow || tmp > keyhigh) + { + d[x + 0] = s[x + 0]; + d[x + 1] = s[x + 1]; + d[x + 2] = s[x + 2]; + } + } + s += slock.Pitch; + d += dlock.Pitch; + } + break; + } + default: + FIXME("Source color key blitting not supported for bpp %u.\n", bpp * 8); + hr = WINED3DERR_NOTAVAILABLE; + goto error; + } +#undef COPYBOX_COLORKEY + TRACE("Copy done.\n"); + } + else + { + int width = w * bpp; + INT sbufpitch, dbufpitch; + + TRACE("No color key copy.\n"); + /* Handle overlapping surfaces. */ + if (sbuf < dbuf) + { + sbuf += (h - 1) * slock.Pitch; + dbuf += (h - 1) * dlock.Pitch; + sbufpitch = -slock.Pitch; + dbufpitch = -dlock.Pitch; + } + else + { + sbufpitch = slock.Pitch; + dbufpitch = dlock.Pitch; + } + for (y = 0; y < h; ++y) + { + /* This is pretty easy, a line for line memcpy. */ + memmove(dbuf, sbuf, width); + sbuf += sbufpitch; + dbuf += dbufpitch; + } + TRACE("Copy done.\n"); + } + +error: + if (src_surface == dst_surface) + { + wined3d_surface_unmap(dst_surface); + } + else + { + wined3d_surface_unmap(dst_surface); + wined3d_surface_unmap(src_surface); + } + + return hr; +} + /* Do not call while under the GL lock. */ -static HRESULT cpu_blit_color_fill(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *dst_surface, +static HRESULT cpu_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface, const RECT *dst_rect, const WINED3DCOLORVALUE *color) { WINEDDBLTFX BltFx; @@ -4940,8 +7304,16 @@ static HRESULT cpu_blit_color_fill(IWineD3DDeviceImpl *device, IWineD3DSurfaceIm memset(&BltFx, 0, sizeof(BltFx)); BltFx.dwSize = sizeof(BltFx); BltFx.u5.dwFillColor = wined3d_format_convert_from_float(dst_surface->resource.format, color); - return IWineD3DBaseSurfaceImpl_Blt((IWineD3DSurface*)dst_surface, dst_rect, - NULL, NULL, WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_POINT); + return wined3d_surface_blt(dst_surface, dst_rect, NULL, NULL, + WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_POINT); +} + +/* Do not call while under the GL lock. */ +static HRESULT cpu_blit_depth_fill(struct wined3d_device *device, + struct wined3d_surface *surface, const RECT *rect, float depth) +{ + FIXME("Depth filling not implemented by cpu_blit.\n"); + return WINED3DERR_INVALIDCALL; } const struct blit_shader cpu_blit = { @@ -4950,38 +7322,175 @@ const struct blit_shader cpu_blit = { cpu_blit_set, cpu_blit_unset, cpu_blit_supported, - cpu_blit_color_fill + cpu_blit_color_fill, + cpu_blit_depth_fill, }; -static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, - const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, - const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format) +static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE surface_type, UINT alignment, + UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type, + UINT multisample_quality, struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, + WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) { - if ((wined3d_settings.offscreen_rendering_mode != ORM_FBO) || !gl_info->fbo_ops.glBlitFramebuffer) - return FALSE; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); + unsigned int resource_size; + HRESULT hr; - /* We only support blitting. Things like color keying / color fill should - * be handled by other blitters. - */ - if (blit_op != BLIT_OP_BLIT) - return FALSE; + if (multisample_quality > 0) + { + FIXME("multisample_quality set to %u, substituting 0.\n", multisample_quality); + multisample_quality = 0; + } - /* Source and/or destination need to be on the GL side */ - if (src_pool == WINED3DPOOL_SYSTEMMEM || dst_pool == WINED3DPOOL_SYSTEMMEM) - return FALSE; + /* Quick lockable sanity check. + * TODO: remove this after surfaces, usage and lockability have been debugged properly + * this function is too deep to need to care about things like this. + * Levels need to be checked too, since they all affect what can be done. */ + switch (pool) + { + case WINED3DPOOL_SCRATCH: + if (!lockable) + { + FIXME("Called with a pool of SCRATCH and a lockable of FALSE " + "which are mutually exclusive, setting lockable to TRUE.\n"); + lockable = TRUE; + } + break; - if (!((src_format->Flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (src_usage & WINED3DUSAGE_RENDERTARGET)) - && ((dst_format->Flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (dst_usage & WINED3DUSAGE_RENDERTARGET))) - return FALSE; + case WINED3DPOOL_SYSTEMMEM: + if (!lockable) + FIXME("Called with a pool of SYSTEMMEM and a lockable of FALSE, this is acceptable but unexpected.\n"); + break; - if (!is_identity_fixup(src_format->color_fixup) - || !is_identity_fixup(dst_format->color_fixup)) - return FALSE; + case WINED3DPOOL_MANAGED: + if (usage & WINED3DUSAGE_DYNAMIC) + FIXME("Called with a pool of MANAGED and a usage of DYNAMIC which are mutually exclusive.\n"); + break; - if (!(src_format->id == dst_format->id - || (is_identity_fixup(src_format->color_fixup) - && is_identity_fixup(dst_format->color_fixup)))) - return FALSE; + case WINED3DPOOL_DEFAULT: + if (lockable && !(usage & (WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL))) + WARN("Creating a lockable surface with a POOL of DEFAULT, that doesn't specify DYNAMIC usage.\n"); + break; - return TRUE; + default: + FIXME("Unknown pool %#x.\n", pool); + break; + }; + + if (usage & WINED3DUSAGE_RENDERTARGET && pool != WINED3DPOOL_DEFAULT) + FIXME("Trying to create a render target that isn't in the default pool.\n"); + + /* FIXME: Check that the format is supported by the device. */ + + resource_size = wined3d_format_calculate_size(format, alignment, width, height); + if (!resource_size) + return WINED3DERR_INVALIDCALL; + + surface->surface_type = surface_type; + + switch (surface_type) + { + case SURFACE_OPENGL: + surface->surface_ops = &surface_ops; + break; + + case SURFACE_GDI: + surface->surface_ops = &gdi_surface_ops; + break; + + default: + ERR("Requested unknown surface implementation %#x.\n", surface_type); + return WINED3DERR_INVALIDCALL; + } + + hr = resource_init(&surface->resource, device, WINED3DRTYPE_SURFACE, format, + multisample_type, multisample_quality, usage, pool, width, height, 1, + resource_size, parent, parent_ops, &surface_resource_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize resource, returning %#x.\n", hr); + return hr; + } + + /* "Standalone" surface. */ + surface_set_container(surface, WINED3D_CONTAINER_NONE, NULL); + + surface->texture_level = level; + list_init(&surface->overlays); + + /* Flags */ + surface->flags = SFLAG_NORMCOORD; /* Default to normalized coords. */ + if (discard) + surface->flags |= SFLAG_DISCARD; + if (lockable || format_id == WINED3DFMT_D16_LOCKABLE) + surface->flags |= SFLAG_LOCKABLE; + /* I'm not sure if this qualifies as a hack or as an optimization. It + * seems reasonable to assume that lockable render targets will get + * locked, so we might as well set SFLAG_DYNLOCK right at surface + * creation. However, the other reason we want to do this is that several + * ddraw applications access surface memory while the surface isn't + * mapped. The SFLAG_DYNLOCK behaviour of keeping SYSMEM around for + * future locks prevents these from crashing. */ + if (lockable && (usage & WINED3DUSAGE_RENDERTARGET)) + surface->flags |= SFLAG_DYNLOCK; + + /* Mark the texture as dirty so that it gets loaded first time around. */ + surface_add_dirty_rect(surface, NULL); + list_init(&surface->renderbuffers); + + TRACE("surface %p, memory %p, size %u\n", + surface, surface->resource.allocatedMemory, surface->resource.size); + + /* Call the private setup routine */ + hr = surface->surface_ops->surface_private_setup(surface); + if (FAILED(hr)) + { + ERR("Private setup failed, returning %#x\n", hr); + surface->surface_ops->surface_cleanup(surface); + return hr; + } + + return hr; +} + +HRESULT CDECL wined3d_surface_create(struct wined3d_device *device, UINT width, UINT height, + enum wined3d_format_id format_id, BOOL lockable, BOOL discard, UINT level, DWORD usage, WINED3DPOOL pool, + WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_surface **surface) +{ + struct wined3d_surface *object; + HRESULT hr; + + TRACE("device %p, width %u, height %u, format %s, lockable %#x, discard %#x, level %u\n", + device, width, height, debug_d3dformat(format_id), lockable, discard, level); + TRACE("surface %p, usage %s (%#x), pool %s, multisample_type %#x, multisample_quality %u\n", + surface, debug_d3dusage(usage), usage, debug_d3dpool(pool), multisample_type, multisample_quality); + TRACE("surface_type %#x, parent %p, parent_ops %p.\n", surface_type, parent, parent_ops); + + if (surface_type == SURFACE_OPENGL && !device->adapter) + { + ERR("OpenGL surfaces are not available without OpenGL.\n"); + return WINED3DERR_NOTAVAILABLE; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate surface memory.\n"); + return WINED3DERR_OUTOFVIDEOMEMORY; + } + + hr = surface_init(object, surface_type, device->surface_alignment, width, height, level, lockable, + discard, multisample_type, multisample_quality, device, usage, format_id, pool, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize surface, returning %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created surface %p.\n", object); + *surface = object; + + return hr; } diff --git a/dll/directx/wine/wined3d/surface_base.c b/dll/directx/wine/wined3d/surface_base.c deleted file mode 100644 index e4dd853b0b3..00000000000 --- a/dll/directx/wine/wined3d/surface_base.c +++ /dev/null @@ -1,1875 +0,0 @@ -/* - * IWineD3DSurface Implementation of management(non-rendering) functions - * - * Copyright 1998 Lionel Ulmer - * Copyright 2000-2001 TransGaming Technologies Inc. - * Copyright 2002-2005 Jason Edmeades - * Copyright 2002-2003 Raphael Junqueira - * Copyright 2004 Christian Costa - * Copyright 2005 Oliver Stieber - * Copyright 2006-2008 Stefan Dösinger for CodeWeavers - * Copyright 2007 Henri Verbeet - * Copyright 2006-2007 Roderick Colenbrander - * Copyright 2009 Henri Verbeet for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wine/port.h" -#include "wined3d_private.h" - -WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); - -/* See also float_16_to_32() in wined3d_private.h */ -static inline unsigned short float_32_to_16(const float *in) -{ - int exp = 0; - float tmp = fabs(*in); - unsigned int mantissa; - unsigned short ret; - - /* Deal with special numbers */ - if (*in == 0.0f) return 0x0000; - if(isnan(*in)) return 0x7C01; - if (isinf(*in)) return (*in < 0.0f ? 0xFC00 : 0x7c00); - - if(tmp < powf(2, 10)) { - do - { - tmp = tmp * 2.0f; - exp--; - }while(tmp < powf(2, 10)); - } else if(tmp >= powf(2, 11)) { - do - { - tmp /= 2.0f; - exp++; - }while(tmp >= powf(2, 11)); - } - - mantissa = (unsigned int) tmp; - if(tmp - mantissa >= 0.5f) mantissa++; /* round to nearest, away from zero */ - - exp += 10; /* Normalize the mantissa */ - exp += 15; /* Exponent is encoded with excess 15 */ - - if(exp > 30) { /* too big */ - ret = 0x7c00; /* INF */ - } else if(exp <= 0) { - /* exp == 0: Non-normalized mantissa. Returns 0x0000 (=0.0) for too small numbers */ - while(exp <= 0) { - mantissa = mantissa >> 1; - exp++; - } - ret = mantissa & 0x3ff; - } else { - ret = (exp << 10) | (mantissa & 0x3ff); - } - - ret |= ((*in < 0.0f ? 1 : 0) << 15); /* Add the sign */ - return ret; -} - -/* ******************************************* - IWineD3DSurface IUnknown parts follow - ******************************************* */ -HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface, REFIID riid, LPVOID *ppobj) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - /* Warn ,but be nice about things */ - TRACE("(%p)->(%s,%p)\n", This,debugstr_guid(riid),ppobj); - - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IWineD3DResource) - || IsEqualGUID(riid, &IID_IWineD3DSurface)) { - IUnknown_AddRef((IUnknown*)iface); - *ppobj = This; - return S_OK; - } - *ppobj = NULL; - return E_NOINTERFACE; -} - -ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - ULONG ref = InterlockedIncrement(&This->resource.ref); - TRACE("(%p) : AddRef increasing from %d\n", This,ref - 1); - return ref; -} - -/* **************************************************** - IWineD3DSurface IWineD3DResource parts follow - **************************************************** */ -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags); -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData); -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid) { - return resource_free_private_data((IWineD3DResource *)iface, refguid); -} - -DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); -} - -DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) { - return resource_get_priority((IWineD3DResource *)iface); -} - -WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface) { - TRACE("(%p) : calling resourceimpl_GetType\n", iface); - return resource_get_type((IWineD3DResource *)iface); -} - -void * WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface) -{ - TRACE("iface %p.\n", iface); - - return ((IWineD3DSurfaceImpl *)iface)->resource.parent; -} - -void WINAPI IWineD3DBaseSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFACE_DESC *desc) -{ - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)iface; - - TRACE("iface %p, desc %p.\n", iface, desc); - - desc->format = surface->resource.format->id; - desc->resource_type = surface->resource.resourceType; - desc->usage = surface->resource.usage; - desc->pool = surface->resource.pool; - desc->size = surface->resource.size; /* dx8 only */ - desc->multisample_type = surface->currentDesc.MultiSampleType; - desc->multisample_quality = surface->currentDesc.MultiSampleQuality; - desc->width = surface->currentDesc.Width; - desc->height = surface->currentDesc.Height; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Flags) -{ - TRACE("iface %p, flags %#x.\n", iface, Flags); - - switch (Flags) - { - case WINEDDGBS_CANBLT: - case WINEDDGBS_ISBLTDONE: - return WINED3D_OK; - - default: - return WINED3DERR_INVALIDCALL; - } -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD Flags) { - /* XXX: DDERR_INVALIDSURFACETYPE */ - - TRACE("(%p)->(%08x)\n",iface,Flags); - switch (Flags) { - case WINEDDGFS_CANFLIP: - case WINEDDGFS_ISFLIPDONE: - return WINED3D_OK; - - default: - return WINED3DERR_INVALIDCALL; - } -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_IsLost(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)\n", This); - - /* D3D8 and 9 loose full devices, ddraw only surfaces */ - return This->Flags & SFLAG_LOST ? WINED3DERR_DEVICELOST : WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_Restore(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)\n", This); - - /* So far we don't lose anything :) */ - This->Flags &= ~SFLAG_LOST; - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - IWineD3DPaletteImpl *PalImpl = (IWineD3DPaletteImpl *) Pal; - TRACE("(%p)->(%p)\n", This, Pal); - - if(This->palette == PalImpl) { - TRACE("Nop palette change\n"); - return WINED3D_OK; - } - - if (This->palette) - if (This->resource.usage & WINED3DUSAGE_RENDERTARGET) - This->palette->Flags &= ~WINEDDPCAPS_PRIMARYSURFACE; - - This->palette = PalImpl; - - if (PalImpl) - { - if (This->resource.usage & WINED3DUSAGE_RENDERTARGET) - PalImpl->Flags |= WINEDDPCAPS_PRIMARYSURFACE; - - return IWineD3DSurface_RealizePalette(iface); - } - else return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD Flags, const WINEDDCOLORKEY *CKey) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)->(%08x,%p)\n", This, Flags, CKey); - - if (Flags & WINEDDCKEY_COLORSPACE) - { - FIXME(" colorkey value not supported (%08x) !\n", Flags); - return WINED3DERR_INVALIDCALL; - } - - /* Dirtify the surface, but only if a key was changed */ - if(CKey) { - switch (Flags & ~WINEDDCKEY_COLORSPACE) { - case WINEDDCKEY_DESTBLT: - This->DestBltCKey = *CKey; - This->CKeyFlags |= WINEDDSD_CKDESTBLT; - break; - - case WINEDDCKEY_DESTOVERLAY: - This->DestOverlayCKey = *CKey; - This->CKeyFlags |= WINEDDSD_CKDESTOVERLAY; - break; - - case WINEDDCKEY_SRCOVERLAY: - This->SrcOverlayCKey = *CKey; - This->CKeyFlags |= WINEDDSD_CKSRCOVERLAY; - break; - - case WINEDDCKEY_SRCBLT: - This->SrcBltCKey = *CKey; - This->CKeyFlags |= WINEDDSD_CKSRCBLT; - break; - } - } - else { - switch (Flags & ~WINEDDCKEY_COLORSPACE) { - case WINEDDCKEY_DESTBLT: - This->CKeyFlags &= ~WINEDDSD_CKDESTBLT; - break; - - case WINEDDCKEY_DESTOVERLAY: - This->CKeyFlags &= ~WINEDDSD_CKDESTOVERLAY; - break; - - case WINEDDCKEY_SRCOVERLAY: - This->CKeyFlags &= ~WINEDDSD_CKSRCOVERLAY; - break; - - case WINEDDCKEY_SRCBLT: - This->CKeyFlags &= ~WINEDDSD_CKSRCBLT; - break; - } - } - - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD3DPalette **Pal) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)->(%p)\n", This, Pal); - - *Pal = (IWineD3DPalette *) This->palette; - return WINED3D_OK; -} - -DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - const struct wined3d_format *format = This->resource.format; - DWORD ret; - TRACE("(%p)\n", This); - - if ((format->Flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED) - { - /* Since compressed formats are block based, pitch means the amount of - * bytes to the next row of block rather than the next row of pixels. */ - UINT row_block_count = (This->currentDesc.Width + format->block_width - 1) / format->block_width; - ret = row_block_count * format->block_byte_count; - } - else - { - unsigned char alignment = This->resource.device->surface_alignment; - ret = This->resource.format->byte_count * This->currentDesc.Width; /* Bytes / row */ - ret = (ret + alignment - 1) & ~(alignment - 1); - } - TRACE("(%p) Returning %d\n", This, ret); - return ret; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - LONG w, h; - - TRACE("(%p)->(%d,%d) Stub!\n", This, X, Y); - - if(!(This->resource.usage & WINED3DUSAGE_OVERLAY)) - { - TRACE("(%p): Not an overlay surface\n", This); - return WINEDDERR_NOTAOVERLAYSURFACE; - } - - w = This->overlay_destrect.right - This->overlay_destrect.left; - h = This->overlay_destrect.bottom - This->overlay_destrect.top; - This->overlay_destrect.left = X; - This->overlay_destrect.top = Y; - This->overlay_destrect.right = X + w; - This->overlay_destrect.bottom = Y + h; - - IWineD3DSurface_DrawOverlay(iface); - - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetOverlayPosition(IWineD3DSurface *iface, LONG *X, LONG *Y) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - HRESULT hr; - - TRACE("(%p)->(%p,%p)\n", This, X, Y); - - if(!(This->resource.usage & WINED3DUSAGE_OVERLAY)) - { - TRACE("(%p): Not an overlay surface\n", This); - return WINEDDERR_NOTAOVERLAYSURFACE; - } - - if (!This->overlay_dest) - { - *X = 0; *Y = 0; - hr = WINEDDERR_OVERLAYNOTVISIBLE; - } else { - *X = This->overlay_destrect.left; - *Y = This->overlay_destrect.top; - hr = WINED3D_OK; - } - - TRACE("Returning 0x%08x, position %d, %d\n", hr, *X, *Y); - return hr; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *iface, DWORD Flags, IWineD3DSurface *Ref) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - - FIXME("iface %p, flags %#x, ref %p stub!\n", iface, Flags, Ref); - - if(!(This->resource.usage & WINED3DUSAGE_OVERLAY)) - { - TRACE("(%p): Not an overlay surface\n", This); - return WINEDDERR_NOTAOVERLAYSURFACE; - } - - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, const RECT *SrcRect, - IWineD3DSurface *DstSurface, const RECT *DstRect, DWORD Flags, const WINEDDOVERLAYFX *FX) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - IWineD3DSurfaceImpl *Dst = (IWineD3DSurfaceImpl *) DstSurface; - TRACE("(%p)->(%p, %p, %p, %08x, %p)\n", This, SrcRect, Dst, DstRect, Flags, FX); - - if(!(This->resource.usage & WINED3DUSAGE_OVERLAY)) - { - WARN("(%p): Not an overlay surface\n", This); - return WINEDDERR_NOTAOVERLAYSURFACE; - } else if(!DstSurface) { - WARN("(%p): Dest surface is NULL\n", This); - return WINED3DERR_INVALIDCALL; - } - - if(SrcRect) { - This->overlay_srcrect = *SrcRect; - } else { - This->overlay_srcrect.left = 0; - This->overlay_srcrect.top = 0; - This->overlay_srcrect.right = This->currentDesc.Width; - This->overlay_srcrect.bottom = This->currentDesc.Height; - } - - if(DstRect) { - This->overlay_destrect = *DstRect; - } else { - This->overlay_destrect.left = 0; - This->overlay_destrect.top = 0; - This->overlay_destrect.right = Dst ? Dst->currentDesc.Width : 0; - This->overlay_destrect.bottom = Dst ? Dst->currentDesc.Height : 0; - } - - if(This->overlay_dest && (This->overlay_dest != Dst || Flags & WINEDDOVER_HIDE)) { - list_remove(&This->overlay_entry); - } - - if(Flags & WINEDDOVER_SHOW) { - if(This->overlay_dest != Dst) { - This->overlay_dest = Dst; - list_add_tail(&Dst->overlays, &This->overlay_entry); - } - } else if(Flags & WINEDDOVER_HIDE) { - /* tests show that the rectangles are erased on hide */ - This->overlay_srcrect.left = 0; This->overlay_srcrect.top = 0; - This->overlay_srcrect.right = 0; This->overlay_srcrect.bottom = 0; - This->overlay_destrect.left = 0; This->overlay_destrect.top = 0; - This->overlay_destrect.right = 0; This->overlay_destrect.bottom = 0; - This->overlay_dest = NULL; - } - - IWineD3DSurface_DrawOverlay(iface); - - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)->(%p)\n", This, clipper); - - This->clipper = clipper; - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)->(%p)\n", This, clipper); - - *clipper = This->clipper; - if(*clipper) { - IWineD3DClipper_AddRef(*clipper); - } - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, enum wined3d_format_id format_id) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - const struct wined3d_format *format = wined3d_get_format(&This->resource.device->adapter->gl_info, format_id); - - if (This->resource.format->id != WINED3DFMT_UNKNOWN) - { - FIXME("(%p) : The format of the surface must be WINED3DFORMAT_UNKNOWN\n", This); - return WINED3DERR_INVALIDCALL; - } - - TRACE("(%p) : Setting texture format to %s (%#x).\n", This, debug_d3dformat(format_id), format_id); - - This->resource.size = wined3d_format_calculate_size(format, This->resource.device->surface_alignment, - This->pow2Width, This->pow2Height); - - This->Flags |= (WINED3DFMT_D16_LOCKABLE == format_id) ? SFLAG_LOCKABLE : 0; - - This->resource.format = format; - - TRACE("(%p) : Size %d, bytesPerPixel %d\n", This, This->resource.size, format->byte_count); - - return WINED3D_OK; -} - -HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - const struct wined3d_format *format = This->resource.format; - int extraline = 0; - SYSTEM_INFO sysInfo; - BITMAPINFO* b_info; - HDC ddc; - DWORD *masks; - UINT usage; - - if (!(format->Flags & WINED3DFMT_FLAG_GETDC)) - { - WARN("Cannot use GetDC on a %s surface\n", debug_d3dformat(format->id)); - return WINED3DERR_INVALIDCALL; - } - - switch (format->byte_count) - { - case 2: - case 4: - /* Allocate extra space to store the RGB bit masks. */ - b_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER) + 3 * sizeof(DWORD)); - break; - - case 3: - b_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER)); - break; - - default: - /* Allocate extra space for a palette. */ - b_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1 << (format->byte_count * 8))); - break; - } - - if (!b_info) - return E_OUTOFMEMORY; - - /* Some apps access the surface in via DWORDs, and do not take the necessary care at the end of the - * surface. So we need at least extra 4 bytes at the end of the surface. Check against the page size, - * if the last page used for the surface has at least 4 spare bytes we're safe, otherwise - * add an extra line to the dib section - */ - GetSystemInfo(&sysInfo); - if( ((This->resource.size + 3) % sysInfo.dwPageSize) < 4) { - extraline = 1; - TRACE("Adding an extra line to the dib section\n"); - } - - b_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - /* TODO: Is there a nicer way to force a specific alignment? (8 byte for ddraw) */ - b_info->bmiHeader.biWidth = IWineD3DSurface_GetPitch(iface) / format->byte_count; - b_info->bmiHeader.biHeight = -This->currentDesc.Height -extraline; - b_info->bmiHeader.biSizeImage = ( This->currentDesc.Height + extraline) * IWineD3DSurface_GetPitch(iface); - b_info->bmiHeader.biPlanes = 1; - b_info->bmiHeader.biBitCount = format->byte_count * 8; - - b_info->bmiHeader.biXPelsPerMeter = 0; - b_info->bmiHeader.biYPelsPerMeter = 0; - b_info->bmiHeader.biClrUsed = 0; - b_info->bmiHeader.biClrImportant = 0; - - /* Get the bit masks */ - masks = (DWORD *)b_info->bmiColors; - switch (This->resource.format->id) - { - case WINED3DFMT_B8G8R8_UNORM: - usage = DIB_RGB_COLORS; - b_info->bmiHeader.biCompression = BI_RGB; - break; - - case WINED3DFMT_B5G5R5X1_UNORM: - case WINED3DFMT_B5G5R5A1_UNORM: - case WINED3DFMT_B4G4R4A4_UNORM: - case WINED3DFMT_B4G4R4X4_UNORM: - case WINED3DFMT_B2G3R3_UNORM: - case WINED3DFMT_B2G3R3A8_UNORM: - case WINED3DFMT_R10G10B10A2_UNORM: - case WINED3DFMT_R8G8B8A8_UNORM: - case WINED3DFMT_R8G8B8X8_UNORM: - case WINED3DFMT_B10G10R10A2_UNORM: - case WINED3DFMT_B5G6R5_UNORM: - case WINED3DFMT_R16G16B16A16_UNORM: - usage = 0; - b_info->bmiHeader.biCompression = BI_BITFIELDS; - masks[0] = format->red_mask; - masks[1] = format->green_mask; - masks[2] = format->blue_mask; - break; - - default: - /* Don't know palette */ - b_info->bmiHeader.biCompression = BI_RGB; - usage = 0; - break; - } - - if (!(ddc = GetDC(0))) - { - HeapFree(GetProcessHeap(), 0, b_info); - return HRESULT_FROM_WIN32(GetLastError()); - } - - TRACE("Creating a DIB section with size %dx%dx%d, size=%d\n", b_info->bmiHeader.biWidth, b_info->bmiHeader.biHeight, b_info->bmiHeader.biBitCount, b_info->bmiHeader.biSizeImage); - This->dib.DIBsection = CreateDIBSection(ddc, b_info, usage, &This->dib.bitmap_data, 0 /* Handle */, 0 /* Offset */); - ReleaseDC(0, ddc); - - if (!This->dib.DIBsection) { - ERR("CreateDIBSection failed!\n"); - HeapFree(GetProcessHeap(), 0, b_info); - return HRESULT_FROM_WIN32(GetLastError()); - } - - TRACE("DIBSection at : %p\n", This->dib.bitmap_data); - /* copy the existing surface to the dib section */ - if(This->resource.allocatedMemory) { - memcpy(This->dib.bitmap_data, This->resource.allocatedMemory, This->currentDesc.Height * IWineD3DSurface_GetPitch(iface)); - } else { - /* This is to make LockRect read the gl Texture although memory is allocated */ - This->Flags &= ~SFLAG_INSYSMEM; - } - This->dib.bitmap_size = b_info->bmiHeader.biSizeImage; - - HeapFree(GetProcessHeap(), 0, b_info); - - /* Now allocate a HDC */ - This->hDC = CreateCompatibleDC(0); - This->dib.holdbitmap = SelectObject(This->hDC, This->dib.DIBsection); - TRACE("using wined3d palette %p\n", This->palette); - SelectPalette(This->hDC, - This->palette ? This->palette->hpal : 0, - FALSE); - - This->Flags |= SFLAG_DIBSECTION; - - HeapFree(GetProcessHeap(), 0, This->resource.heapMemory); - This->resource.heapMemory = NULL; - - return WINED3D_OK; -} - -static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, - unsigned int w, unsigned int h) -{ - unsigned int x, y; - const float *src_f; - unsigned short *dst_s; - - TRACE("Converting %dx%d pixels, pitches %d %d\n", w, h, pitch_in, pitch_out); - for(y = 0; y < h; y++) { - src_f = (const float *)(src + y * pitch_in); - dst_s = (unsigned short *) (dst + y * pitch_out); - for(x = 0; x < w; x++) { - dst_s[x] = float_32_to_16(src_f + x); - } - } -} - -static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst, - DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) -{ - static const unsigned char convert_5to8[] = - { - 0x00, 0x08, 0x10, 0x19, 0x21, 0x29, 0x31, 0x3a, - 0x42, 0x4a, 0x52, 0x5a, 0x63, 0x6b, 0x73, 0x7b, - 0x84, 0x8c, 0x94, 0x9c, 0xa5, 0xad, 0xb5, 0xbd, - 0xc5, 0xce, 0xd6, 0xde, 0xe6, 0xef, 0xf7, 0xff, - }; - static const unsigned char convert_6to8[] = - { - 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, 0x18, 0x1c, - 0x20, 0x24, 0x28, 0x2d, 0x31, 0x35, 0x39, 0x3d, - 0x41, 0x45, 0x49, 0x4d, 0x51, 0x55, 0x59, 0x5d, - 0x61, 0x65, 0x69, 0x6d, 0x71, 0x75, 0x79, 0x7d, - 0x82, 0x86, 0x8a, 0x8e, 0x92, 0x96, 0x9a, 0x9e, - 0xa2, 0xa6, 0xaa, 0xae, 0xb2, 0xb6, 0xba, 0xbe, - 0xc2, 0xc6, 0xca, 0xce, 0xd2, 0xd7, 0xdb, 0xdf, - 0xe3, 0xe7, 0xeb, 0xef, 0xf3, 0xf7, 0xfb, 0xff, - }; - unsigned int x, y; - - TRACE("Converting %ux%u pixels, pitches %u %u\n", w, h, pitch_in, pitch_out); - - for (y = 0; y < h; ++y) - { - const WORD *src_line = (const WORD *)(src + y * pitch_in); - DWORD *dst_line = (DWORD *)(dst + y * pitch_out); - for (x = 0; x < w; ++x) - { - WORD pixel = src_line[x]; - dst_line[x] = 0xff000000 - | convert_5to8[(pixel & 0xf800) >> 11] << 16 - | convert_6to8[(pixel & 0x07e0) >> 5] << 8 - | convert_5to8[(pixel & 0x001f)]; - } - } -} - -static void convert_a8r8g8b8_x8r8g8b8(const BYTE *src, BYTE *dst, - DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) -{ - unsigned int x, y; - - TRACE("Converting %ux%u pixels, pitches %u %u\n", w, h, pitch_in, pitch_out); - - for (y = 0; y < h; ++y) - { - const DWORD *src_line = (const DWORD *)(src + y * pitch_in); - DWORD *dst_line = (DWORD *)(dst + y * pitch_out); - - for (x = 0; x < w; ++x) - { - dst_line[x] = 0xff000000 | (src_line[x] & 0xffffff); - } - } -} - -static inline BYTE cliptobyte(int x) -{ - return (BYTE) ((x < 0) ? 0 : ((x > 255) ? 255 : x)); -} - -static void convert_yuy2_x8r8g8b8(const BYTE *src, BYTE *dst, - DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h) -{ - unsigned int x, y; - int c2, d, e, r2 = 0, g2 = 0, b2 = 0; - - TRACE("Converting %ux%u pixels, pitches %u %u\n", w, h, pitch_in, pitch_out); - - for (y = 0; y < h; ++y) - { - const BYTE *src_line = src + y * pitch_in; - DWORD *dst_line = (DWORD *)(dst + y * pitch_out); - for (x = 0; x < w; ++x) - { - /* YUV to RGB conversion formulas from http://en.wikipedia.org/wiki/YUV: - * C = Y - 16; D = U - 128; E = V - 128; - * R = cliptobyte((298 * C + 409 * E + 128) >> 8); - * G = cliptobyte((298 * C - 100 * D - 208 * E + 128) >> 8); - * B = cliptobyte((298 * C + 516 * D + 128) >> 8); - * Two adjacent YUY2 pixels are stored as four bytes: Y0 U Y1 V . - * U and V are shared between the pixels. - */ - if (!(x & 1)) /* for every even pixel, read new U and V */ - { - d = (int) src_line[1] - 128; - e = (int) src_line[3] - 128; - r2 = 409 * e + 128; - g2 = - 100 * d - 208 * e + 128; - b2 = 516 * d + 128; - } - c2 = 298 * ((int) src_line[0] - 16); - dst_line[x] = 0xff000000 - | cliptobyte((c2 + r2) >> 8) << 16 /* red */ - | cliptobyte((c2 + g2) >> 8) << 8 /* green */ - | cliptobyte((c2 + b2) >> 8); /* blue */ - /* Scale RGB values to 0..255 range, - * then clip them if still not in range (may be negative), - * then shift them within DWORD if necessary. - */ - src_line += 2; - } - } -} - -struct d3dfmt_convertor_desc -{ - enum wined3d_format_id from, to; - void (*convert)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h); -}; - -static const struct d3dfmt_convertor_desc convertors[] = -{ - {WINED3DFMT_R32_FLOAT, WINED3DFMT_R16_FLOAT, convert_r32_float_r16_float}, - {WINED3DFMT_B5G6R5_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_r5g6b5_x8r8g8b8}, - {WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_a8r8g8b8_x8r8g8b8}, - {WINED3DFMT_YUY2, WINED3DFMT_B8G8R8X8_UNORM, convert_yuy2_x8r8g8b8}, -}; - -static inline const struct d3dfmt_convertor_desc *find_convertor(enum wined3d_format_id from, enum wined3d_format_id to) -{ - unsigned int i; - for(i = 0; i < (sizeof(convertors) / sizeof(convertors[0])); i++) { - if(convertors[i].from == from && convertors[i].to == to) { - return &convertors[i]; - } - } - return NULL; -} - -/***************************************************************************** - * surface_convert_format - * - * Creates a duplicate of a surface in a different format. Is used by Blt to - * blit between surfaces with different formats - * - * Parameters - * source: Source surface - * fmt: Requested destination format - * - *****************************************************************************/ -static IWineD3DSurfaceImpl *surface_convert_format(IWineD3DSurfaceImpl *source, enum wined3d_format_id to_fmt) -{ - IWineD3DSurface *ret = NULL; - const struct d3dfmt_convertor_desc *conv; - WINED3DLOCKED_RECT lock_src, lock_dst; - HRESULT hr; - - conv = find_convertor(source->resource.format->id, to_fmt); - if (!conv) - { - FIXME("Cannot find a conversion function from format %s to %s.\n", - debug_d3dformat(source->resource.format->id), debug_d3dformat(to_fmt)); - return NULL; - } - - IWineD3DDevice_CreateSurface((IWineD3DDevice *)source->resource.device, source->currentDesc.Width, - source->currentDesc.Height, to_fmt, TRUE /* lockable */, TRUE /* discard */, 0 /* level */, - 0 /* usage */, WINED3DPOOL_SCRATCH, WINED3DMULTISAMPLE_NONE /* TODO: Multisampled conversion */, - 0 /* MultiSampleQuality */, IWineD3DSurface_GetImplType((IWineD3DSurface *) source), - NULL /* parent */, &wined3d_null_parent_ops, &ret); - if(!ret) { - ERR("Failed to create a destination surface for conversion\n"); - return NULL; - } - - memset(&lock_src, 0, sizeof(lock_src)); - memset(&lock_dst, 0, sizeof(lock_dst)); - - hr = IWineD3DSurface_LockRect((IWineD3DSurface *) source, &lock_src, NULL, WINED3DLOCK_READONLY); - if(FAILED(hr)) { - ERR("Failed to lock the source surface\n"); - IWineD3DSurface_Release(ret); - return NULL; - } - hr = IWineD3DSurface_LockRect(ret, &lock_dst, NULL, WINED3DLOCK_READONLY); - if(FAILED(hr)) { - ERR("Failed to lock the dest surface\n"); - IWineD3DSurface_UnlockRect((IWineD3DSurface *) source); - IWineD3DSurface_Release(ret); - return NULL; - } - - conv->convert(lock_src.pBits, lock_dst.pBits, lock_src.Pitch, lock_dst.Pitch, - source->currentDesc.Width, source->currentDesc.Height); - - IWineD3DSurface_UnlockRect(ret); - IWineD3DSurface_UnlockRect((IWineD3DSurface *) source); - - return (IWineD3DSurfaceImpl *) ret; -} - -/***************************************************************************** - * _Blt_ColorFill - * - * Helper function that fills a memory area with a specific color - * - * Params: - * buf: memory address to start filling at - * width, height: Dimensions of the area to fill - * bpp: Bit depth of the surface - * lPitch: pitch of the surface - * color: Color to fill with - * - *****************************************************************************/ -static HRESULT - _Blt_ColorFill(BYTE *buf, - int width, int height, - int bpp, LONG lPitch, - DWORD color) -{ - int x, y; - LPBYTE first; - - /* Do first row */ - -#define COLORFILL_ROW(type) \ - { \ - type *d = (type *) buf; \ - for (x = 0; x < width; x++) \ - d[x] = (type) color; \ - break; \ -} - switch(bpp) - { - case 1: COLORFILL_ROW(BYTE) - case 2: COLORFILL_ROW(WORD) - case 3: - { - BYTE *d = buf; - for (x = 0; x < width; x++,d+=3) - { - d[0] = (color ) & 0xFF; - d[1] = (color>> 8) & 0xFF; - d[2] = (color>>16) & 0xFF; - } - break; - } - case 4: COLORFILL_ROW(DWORD) - default: - FIXME("Color fill not implemented for bpp %d!\n", bpp*8); - return WINED3DERR_NOTAVAILABLE; - } - -#undef COLORFILL_ROW - - /* Now copy first row */ - first = buf; - for (y = 1; y < height; y++) - { - buf += lPitch; - memcpy(buf, first, width * bpp); - } - return WINED3D_OK; -} - -/***************************************************************************** - * IWineD3DSurface::Blt, SW emulation version - * - * Performs a blit to a surface, with or without a source surface. - * This is the main functionality of DirectDraw - * - * Params: - * DestRect: Destination rectangle to write to - * src_surface: Source surface, can be NULL - * SrcRect: Source rectangle - *****************************************************************************/ -HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *DestRect, IWineD3DSurface *src_surface, - const RECT *SrcRect, DWORD Flags, const WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DSurfaceImpl *src = (IWineD3DSurfaceImpl *)src_surface; - RECT xdst,xsrc; - HRESULT ret = WINED3D_OK; - WINED3DLOCKED_RECT dlock, slock; - int bpp, srcheight, srcwidth, dstheight, dstwidth, width; - const struct wined3d_format *sEntry, *dEntry; - int x, y; - const BYTE *sbuf; - BYTE *dbuf; - - TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", - iface, wine_dbgstr_rect(DestRect), src_surface, wine_dbgstr_rect(SrcRect), - Flags, DDBltFx, debug_d3dtexturefiltertype(Filter)); - - if ((This->Flags & SFLAG_LOCKED) || (src && (src->Flags & SFLAG_LOCKED))) - { - WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); - return WINEDDERR_SURFACEBUSY; - } - - if(Filter != WINED3DTEXF_NONE && Filter != WINED3DTEXF_POINT) { - /* Can happen when d3d9 apps do a StretchRect call which isn't handled in gl */ - FIXME("Filters not supported in software blit\n"); - } - - /* First check for the validity of source / destination rectangles. - * This was verified using a test application + by MSDN. */ - - if (SrcRect) - { - if (src) - { - if (SrcRect->right < SrcRect->left || SrcRect->bottom < SrcRect->top - || SrcRect->left > src->currentDesc.Width || SrcRect->left < 0 - || SrcRect->top > src->currentDesc.Height || SrcRect->top < 0 - || SrcRect->right > src->currentDesc.Width || SrcRect->right < 0 - || SrcRect->bottom > src->currentDesc.Height || SrcRect->bottom < 0) - { - WARN("Application gave us bad source rectangle for Blt.\n"); - return WINEDDERR_INVALIDRECT; - } - - if (!SrcRect->right || !SrcRect->bottom - || SrcRect->left == (int)src->currentDesc.Width - || SrcRect->top == (int)src->currentDesc.Height) - { - TRACE("Nothing to be done.\n"); - return WINED3D_OK; - } - } - - xsrc = *SrcRect; - } - else if (src) - { - xsrc.left = 0; - xsrc.top = 0; - xsrc.right = src->currentDesc.Width; - xsrc.bottom = src->currentDesc.Height; - } - else - { - memset(&xsrc, 0, sizeof(xsrc)); - } - - if (DestRect) - { - /* For the Destination rect, it can be out of bounds on the condition - * that a clipper is set for the given surface. */ - if (!This->clipper && (DestRect->right < DestRect->left || DestRect->bottom < DestRect->top - || DestRect->left > This->currentDesc.Width || DestRect->left < 0 - || DestRect->top > This->currentDesc.Height || DestRect->top < 0 - || DestRect->right > This->currentDesc.Width || DestRect->right < 0 - || DestRect->bottom > This->currentDesc.Height || DestRect->bottom < 0)) - { - WARN("Application gave us bad destination rectangle for Blt without a clipper set.\n"); - return WINEDDERR_INVALIDRECT; - } - - if (DestRect->right <= 0 || DestRect->bottom <= 0 - || DestRect->left >= (int)This->currentDesc.Width - || DestRect->top >= (int)This->currentDesc.Height) - { - TRACE("Nothing to be done.\n"); - return WINED3D_OK; - } - - if (!src) - { - RECT full_rect; - - full_rect.left = 0; - full_rect.top = 0; - full_rect.right = This->currentDesc.Width; - full_rect.bottom = This->currentDesc.Height; - IntersectRect(&xdst, &full_rect, DestRect); - } - else - { - BOOL clip_horiz, clip_vert; - - xdst = *DestRect; - clip_horiz = xdst.left < 0 || xdst.right > (int)This->currentDesc.Width; - clip_vert = xdst.top < 0 || xdst.bottom > (int)This->currentDesc.Height; - - if (clip_vert || clip_horiz) - { - /* Now check if this is a special case or not... */ - if ((Flags & WINEDDBLT_DDFX) - || (clip_horiz && xdst.right - xdst.left != xsrc.right - xsrc.left) - || (clip_vert && xdst.bottom - xdst.top != xsrc.bottom - xsrc.top)) - { - WARN("Out of screen rectangle in special case. Not handled right now.\n"); - return WINED3D_OK; - } - - if (clip_horiz) - { - if (xdst.left < 0) - { - xsrc.left -= xdst.left; - xdst.left = 0; - } - if (xdst.right > This->currentDesc.Width) - { - xsrc.right -= (xdst.right - (int)This->currentDesc.Width); - xdst.right = (int)This->currentDesc.Width; - } - } - - if (clip_vert) - { - if (xdst.top < 0) - { - xsrc.top -= xdst.top; - xdst.top = 0; - } - if (xdst.bottom > This->currentDesc.Height) - { - xsrc.bottom -= (xdst.bottom - (int)This->currentDesc.Height); - xdst.bottom = (int)This->currentDesc.Height; - } - } - - /* And check if after clipping something is still to be done... */ - if ((xdst.right <= 0) || (xdst.bottom <= 0) - || (xdst.left >= (int)This->currentDesc.Width) - || (xdst.top >= (int)This->currentDesc.Height) - || (xsrc.right <= 0) || (xsrc.bottom <= 0) - || (xsrc.left >= (int)src->currentDesc.Width) - || (xsrc.top >= (int)src->currentDesc.Height)) - { - TRACE("Nothing to be done after clipping.\n"); - return WINED3D_OK; - } - } - } - } - else - { - xdst.left = 0; - xdst.top = 0; - xdst.right = This->currentDesc.Width; - xdst.bottom = This->currentDesc.Height; - } - - if (src == This) - { - IWineD3DSurface_LockRect(iface, &dlock, NULL, 0); - slock = dlock; - sEntry = This->resource.format; - dEntry = sEntry; - } - else - { - dEntry = This->resource.format; - if (src) - { - if (This->resource.format->id != src->resource.format->id) - { - src = surface_convert_format(src, dEntry->id); - if (!src) - { - /* The conv function writes a FIXME */ - WARN("Cannot convert source surface format to dest format\n"); - goto release; - } - } - IWineD3DSurface_LockRect((IWineD3DSurface *)src, &slock, NULL, WINED3DLOCK_READONLY); - sEntry = src->resource.format; - } - else - { - sEntry = dEntry; - } - if (DestRect) - IWineD3DSurface_LockRect(iface, &dlock, &xdst, 0); - else - IWineD3DSurface_LockRect(iface, &dlock, NULL, 0); - } - - if (!DDBltFx || !(DDBltFx->dwDDFX)) Flags &= ~WINEDDBLT_DDFX; - - if (sEntry->Flags & dEntry->Flags & WINED3DFMT_FLAG_FOURCC) - { - if (!DestRect || src == This) - { - memcpy(dlock.pBits, slock.pBits, This->resource.size); - goto release; - } - } - - bpp = This->resource.format->byte_count; - srcheight = xsrc.bottom - xsrc.top; - srcwidth = xsrc.right - xsrc.left; - dstheight = xdst.bottom - xdst.top; - dstwidth = xdst.right - xdst.left; - width = (xdst.right - xdst.left) * bpp; - - if (DestRect && src != This) - dbuf = dlock.pBits; - else - dbuf = (BYTE*)dlock.pBits+(xdst.top*dlock.Pitch)+(xdst.left*bpp); - - if (Flags & WINEDDBLT_WAIT) - { - Flags &= ~WINEDDBLT_WAIT; - } - if (Flags & WINEDDBLT_ASYNC) - { - static BOOL displayed = FALSE; - if (!displayed) - FIXME("Can't handle WINEDDBLT_ASYNC flag right now.\n"); - displayed = TRUE; - Flags &= ~WINEDDBLT_ASYNC; - } - if (Flags & WINEDDBLT_DONOTWAIT) - { - /* WINEDDBLT_DONOTWAIT appeared in DX7 */ - static BOOL displayed = FALSE; - if (!displayed) - FIXME("Can't handle WINEDDBLT_DONOTWAIT flag right now.\n"); - displayed = TRUE; - Flags &= ~WINEDDBLT_DONOTWAIT; - } - - /* First, all the 'source-less' blits */ - if (Flags & WINEDDBLT_COLORFILL) - { - ret = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, - dlock.Pitch, DDBltFx->u5.dwFillColor); - Flags &= ~WINEDDBLT_COLORFILL; - } - - if (Flags & WINEDDBLT_DEPTHFILL) - { - FIXME("DDBLT_DEPTHFILL needs to be implemented!\n"); - } - if (Flags & WINEDDBLT_ROP) - { - /* Catch some degenerate cases here */ - switch(DDBltFx->dwROP) - { - case BLACKNESS: - ret = _Blt_ColorFill(dbuf,dstwidth,dstheight,bpp,dlock.Pitch,0); - break; - case 0xAA0029: /* No-op */ - break; - case WHITENESS: - ret = _Blt_ColorFill(dbuf,dstwidth,dstheight,bpp,dlock.Pitch,~0); - break; - case SRCCOPY: /* well, we do that below ? */ - break; - default: - FIXME("Unsupported raster op: %08x Pattern: %p\n", DDBltFx->dwROP, DDBltFx->u5.lpDDSPattern); - goto error; - } - Flags &= ~WINEDDBLT_ROP; - } - if (Flags & WINEDDBLT_DDROPS) - { - FIXME("\tDdraw Raster Ops: %08x Pattern: %p\n", DDBltFx->dwDDROP, DDBltFx->u5.lpDDSPattern); - } - /* Now the 'with source' blits */ - if (src) - { - const BYTE *sbase; - int sx, xinc, sy, yinc; - - if (!dstwidth || !dstheight) /* hmm... stupid program ? */ - goto release; - sbase = (BYTE*)slock.pBits+(xsrc.top*slock.Pitch)+xsrc.left*bpp; - xinc = (srcwidth << 16) / dstwidth; - yinc = (srcheight << 16) / dstheight; - - if (!Flags) - { - /* No effects, we can cheat here */ - if (dstwidth == srcwidth) - { - if (dstheight == srcheight) - { - /* No stretching in either direction. This needs to be as - * fast as possible */ - sbuf = sbase; - - /* check for overlapping surfaces */ - if (src != This || xdst.top < xsrc.top || - xdst.right <= xsrc.left || xsrc.right <= xdst.left) - { - /* no overlap, or dst above src, so copy from top downwards */ - for (y = 0; y < dstheight; y++) - { - memcpy(dbuf, sbuf, width); - sbuf += slock.Pitch; - dbuf += dlock.Pitch; - } - } - else if (xdst.top > xsrc.top) /* copy from bottom upwards */ - { - sbuf += (slock.Pitch*dstheight); - dbuf += (dlock.Pitch*dstheight); - for (y = 0; y < dstheight; y++) - { - sbuf -= slock.Pitch; - dbuf -= dlock.Pitch; - memcpy(dbuf, sbuf, width); - } - } - else /* src and dst overlapping on the same line, use memmove */ - { - for (y = 0; y < dstheight; y++) - { - memmove(dbuf, sbuf, width); - sbuf += slock.Pitch; - dbuf += dlock.Pitch; - } - } - } else { - /* Stretching in Y direction only */ - for (y = sy = 0; y < dstheight; y++, sy += yinc) { - sbuf = sbase + (sy >> 16) * slock.Pitch; - memcpy(dbuf, sbuf, width); - dbuf += dlock.Pitch; - } - } - } - else - { - /* Stretching in X direction */ - int last_sy = -1; - for (y = sy = 0; y < dstheight; y++, sy += yinc) - { - sbuf = sbase + (sy >> 16) * slock.Pitch; - - if ((sy >> 16) == (last_sy >> 16)) - { - /* this sourcerow is the same as last sourcerow - - * copy already stretched row - */ - memcpy(dbuf, dbuf - dlock.Pitch, width); - } - else - { -#define STRETCH_ROW(type) { \ - const type *s = (const type *)sbuf; \ - type *d = (type *)dbuf; \ - for (x = sx = 0; x < dstwidth; x++, sx += xinc) \ - d[x] = s[sx >> 16]; \ - break; } - - switch(bpp) - { - case 1: STRETCH_ROW(BYTE) - case 2: STRETCH_ROW(WORD) - case 4: STRETCH_ROW(DWORD) - case 3: - { - const BYTE *s; - BYTE *d = dbuf; - for (x = sx = 0; x < dstwidth; x++, sx+= xinc) - { - DWORD pixel; - - s = sbuf+3*(sx>>16); - pixel = s[0]|(s[1]<<8)|(s[2]<<16); - d[0] = (pixel )&0xff; - d[1] = (pixel>> 8)&0xff; - d[2] = (pixel>>16)&0xff; - d+=3; - } - break; - } - default: - FIXME("Stretched blit not implemented for bpp %d!\n", bpp*8); - ret = WINED3DERR_NOTAVAILABLE; - goto error; - } -#undef STRETCH_ROW - } - dbuf += dlock.Pitch; - last_sy = sy; - } - } - } - else - { - LONG dstyinc = dlock.Pitch, dstxinc = bpp; - DWORD keylow = 0xFFFFFFFF, keyhigh = 0, keymask = 0xFFFFFFFF; - DWORD destkeylow = 0x0, destkeyhigh = 0xFFFFFFFF, destkeymask = 0xFFFFFFFF; - if (Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE)) - { - /* The color keying flags are checked for correctness in ddraw */ - if (Flags & WINEDDBLT_KEYSRC) - { - keylow = src->SrcBltCKey.dwColorSpaceLowValue; - keyhigh = src->SrcBltCKey.dwColorSpaceHighValue; - } - else if (Flags & WINEDDBLT_KEYSRCOVERRIDE) - { - keylow = DDBltFx->ddckSrcColorkey.dwColorSpaceLowValue; - keyhigh = DDBltFx->ddckSrcColorkey.dwColorSpaceHighValue; - } - - if (Flags & WINEDDBLT_KEYDEST) - { - /* Destination color keys are taken from the source surface ! */ - destkeylow = src->DestBltCKey.dwColorSpaceLowValue; - destkeyhigh = src->DestBltCKey.dwColorSpaceHighValue; - } - else if (Flags & WINEDDBLT_KEYDESTOVERRIDE) - { - destkeylow = DDBltFx->ddckDestColorkey.dwColorSpaceLowValue; - destkeyhigh = DDBltFx->ddckDestColorkey.dwColorSpaceHighValue; - } - - if(bpp == 1) - { - keymask = 0xff; - } - else - { - keymask = sEntry->red_mask - | sEntry->green_mask - | sEntry->blue_mask; - } - Flags &= ~(WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE); - } - - if (Flags & WINEDDBLT_DDFX) - { - LPBYTE dTopLeft, dTopRight, dBottomLeft, dBottomRight, tmp; - LONG tmpxy; - dTopLeft = dbuf; - dTopRight = dbuf+((dstwidth-1)*bpp); - dBottomLeft = dTopLeft+((dstheight-1)*dlock.Pitch); - dBottomRight = dBottomLeft+((dstwidth-1)*bpp); - - if (DDBltFx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY) - { - /* I don't think we need to do anything about this flag */ - WARN("Flags=DDBLT_DDFX nothing done for WINEDDBLTFX_ARITHSTRETCHY\n"); - } - if (DDBltFx->dwDDFX & WINEDDBLTFX_MIRRORLEFTRIGHT) - { - tmp = dTopRight; - dTopRight = dTopLeft; - dTopLeft = tmp; - tmp = dBottomRight; - dBottomRight = dBottomLeft; - dBottomLeft = tmp; - dstxinc = dstxinc *-1; - } - if (DDBltFx->dwDDFX & WINEDDBLTFX_MIRRORUPDOWN) - { - tmp = dTopLeft; - dTopLeft = dBottomLeft; - dBottomLeft = tmp; - tmp = dTopRight; - dTopRight = dBottomRight; - dBottomRight = tmp; - dstyinc = dstyinc *-1; - } - if (DDBltFx->dwDDFX & WINEDDBLTFX_NOTEARING) - { - /* I don't think we need to do anything about this flag */ - WARN("Flags=DDBLT_DDFX nothing done for WINEDDBLTFX_NOTEARING\n"); - } - if (DDBltFx->dwDDFX & WINEDDBLTFX_ROTATE180) - { - tmp = dBottomRight; - dBottomRight = dTopLeft; - dTopLeft = tmp; - tmp = dBottomLeft; - dBottomLeft = dTopRight; - dTopRight = tmp; - dstxinc = dstxinc * -1; - dstyinc = dstyinc * -1; - } - if (DDBltFx->dwDDFX & WINEDDBLTFX_ROTATE270) - { - tmp = dTopLeft; - dTopLeft = dBottomLeft; - dBottomLeft = dBottomRight; - dBottomRight = dTopRight; - dTopRight = tmp; - tmpxy = dstxinc; - dstxinc = dstyinc; - dstyinc = tmpxy; - dstxinc = dstxinc * -1; - } - if (DDBltFx->dwDDFX & WINEDDBLTFX_ROTATE90) - { - tmp = dTopLeft; - dTopLeft = dTopRight; - dTopRight = dBottomRight; - dBottomRight = dBottomLeft; - dBottomLeft = tmp; - tmpxy = dstxinc; - dstxinc = dstyinc; - dstyinc = tmpxy; - dstyinc = dstyinc * -1; - } - if (DDBltFx->dwDDFX & WINEDDBLTFX_ZBUFFERBASEDEST) - { - /* I don't think we need to do anything about this flag */ - WARN("Flags=WINEDDBLT_DDFX nothing done for WINEDDBLTFX_ZBUFFERBASEDEST\n"); - } - dbuf = dTopLeft; - Flags &= ~(WINEDDBLT_DDFX); - } - -#define COPY_COLORKEY_FX(type) { \ - const type *s; \ - type *d = (type *)dbuf, *dx, tmp; \ - for (y = sy = 0; y < dstheight; y++, sy += yinc) { \ - s = (const type*)(sbase + (sy >> 16) * slock.Pitch); \ - dx = d; \ - for (x = sx = 0; x < dstwidth; x++, sx += xinc) { \ - tmp = s[sx >> 16]; \ - if (((tmp & keymask) < keylow || (tmp & keymask) > keyhigh) && \ - ((dx[0] & destkeymask) >= destkeylow && (dx[0] & destkeymask) <= destkeyhigh)) { \ - dx[0] = tmp; \ - } \ - dx = (type*)(((LPBYTE)dx)+dstxinc); \ - } \ - d = (type*)(((LPBYTE)d)+dstyinc); \ - } \ - break; } - - switch (bpp) { - case 1: COPY_COLORKEY_FX(BYTE) - case 2: COPY_COLORKEY_FX(WORD) - case 4: COPY_COLORKEY_FX(DWORD) - case 3: - { - const BYTE *s; - BYTE *d = dbuf, *dx; - for (y = sy = 0; y < dstheight; y++, sy += yinc) - { - sbuf = sbase + (sy >> 16) * slock.Pitch; - dx = d; - for (x = sx = 0; x < dstwidth; x++, sx+= xinc) - { - DWORD pixel, dpixel = 0; - s = sbuf+3*(sx>>16); - pixel = s[0]|(s[1]<<8)|(s[2]<<16); - dpixel = dx[0]|(dx[1]<<8)|(dx[2]<<16); - if (((pixel & keymask) < keylow || (pixel & keymask) > keyhigh) && - ((dpixel & keymask) >= destkeylow || (dpixel & keymask) <= keyhigh)) - { - dx[0] = (pixel )&0xff; - dx[1] = (pixel>> 8)&0xff; - dx[2] = (pixel>>16)&0xff; - } - dx+= dstxinc; - } - d += dstyinc; - } - break; - } - default: - FIXME("%s color-keyed blit not implemented for bpp %d!\n", - (Flags & WINEDDBLT_KEYSRC) ? "Source" : "Destination", bpp*8); - ret = WINED3DERR_NOTAVAILABLE; - goto error; -#undef COPY_COLORKEY_FX - } - } - } - -error: - if (Flags && FIXME_ON(d3d_surface)) - { - FIXME("\tUnsupported flags: %08x\n", Flags); - } - -release: - IWineD3DSurface_UnlockRect(iface); - if (src && src != This) IWineD3DSurface_UnlockRect((IWineD3DSurface *)src); - /* Release the converted surface if any */ - if (src && src_surface != (IWineD3DSurface *)src) IWineD3DSurface_Release((IWineD3DSurface *)src); - return ret; -} - -/***************************************************************************** - * IWineD3DSurface::BltFast, SW emulation version - * - * This is the software implementation of BltFast, as used by GDI surfaces - * and as a fallback for OpenGL surfaces. This code is taken from the old - * DirectDraw code, and was originally written by TransGaming. - * - * Params: - * dstx: - * dsty: - * src_surface: Source surface to copy from - * rsrc: Source rectangle - * trans: Some Flags - * - * Returns: - * WINED3D_OK on success - * - *****************************************************************************/ -HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, - IWineD3DSurface *src_surface, const RECT *rsrc, DWORD trans) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DSurfaceImpl *src = (IWineD3DSurfaceImpl *)src_surface; - - int bpp, w, h, x, y; - WINED3DLOCKED_RECT dlock,slock; - HRESULT ret = WINED3D_OK; - RECT rsrc2; - RECT lock_src, lock_dst, lock_union; - const BYTE *sbuf; - BYTE *dbuf; - const struct wined3d_format *sEntry, *dEntry; - - TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", - iface, dstx, dsty, src_surface, wine_dbgstr_rect(rsrc), trans); - - if ((This->Flags & SFLAG_LOCKED) || (src->Flags & SFLAG_LOCKED)) - { - WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); - return WINEDDERR_SURFACEBUSY; - } - - if (!rsrc) - { - WARN("rsrc is NULL!\n"); - rsrc2.left = 0; - rsrc2.top = 0; - rsrc2.right = src->currentDesc.Width; - rsrc2.bottom = src->currentDesc.Height; - rsrc = &rsrc2; - } - - /* Check source rect for validity. Copied from normal Blt. Fixes Baldur's Gate.*/ - if ((rsrc->bottom > src->currentDesc.Height) || (rsrc->bottom < 0) - || (rsrc->top > src->currentDesc.Height) || (rsrc->top < 0) - || (rsrc->left > src->currentDesc.Width) || (rsrc->left < 0) - || (rsrc->right > src->currentDesc.Width) || (rsrc->right < 0) - || (rsrc->right < rsrc->left) || (rsrc->bottom < rsrc->top)) - { - WARN("Application gave us bad source rectangle for BltFast.\n"); - return WINEDDERR_INVALIDRECT; - } - - h = rsrc->bottom - rsrc->top; - if (h > This->currentDesc.Height-dsty) h = This->currentDesc.Height-dsty; - if (h > src->currentDesc.Height-rsrc->top) h = src->currentDesc.Height-rsrc->top; - if (h <= 0) return WINEDDERR_INVALIDRECT; - - w = rsrc->right - rsrc->left; - if (w > This->currentDesc.Width-dstx) w = This->currentDesc.Width-dstx; - if (w > src->currentDesc.Width-rsrc->left) w = src->currentDesc.Width-rsrc->left; - if (w <= 0) return WINEDDERR_INVALIDRECT; - - /* Now compute the locking rectangle... */ - lock_src.left = rsrc->left; - lock_src.top = rsrc->top; - lock_src.right = lock_src.left + w; - lock_src.bottom = lock_src.top + h; - - lock_dst.left = dstx; - lock_dst.top = dsty; - lock_dst.right = dstx + w; - lock_dst.bottom = dsty + h; - - bpp = This->resource.format->byte_count; - - /* We need to lock the surfaces, or we won't get refreshes when done. */ - if (src == This) - { - int pitch; - - UnionRect(&lock_union, &lock_src, &lock_dst); - - /* Lock the union of the two rectangles */ - ret = IWineD3DSurface_LockRect(iface, &dlock, &lock_union, 0); - if(ret != WINED3D_OK) goto error; - - pitch = dlock.Pitch; - slock.Pitch = dlock.Pitch; - - /* Since slock was originally copied from this surface's description, we can just reuse it */ - sbuf = This->resource.allocatedMemory + lock_src.top * pitch + lock_src.left * bpp; - dbuf = This->resource.allocatedMemory + lock_dst.top * pitch + lock_dst.left * bpp; - sEntry = src->resource.format; - dEntry = sEntry; - } - else - { - ret = IWineD3DSurface_LockRect(src_surface, &slock, &lock_src, WINED3DLOCK_READONLY); - if(ret != WINED3D_OK) goto error; - ret = IWineD3DSurface_LockRect(iface, &dlock, &lock_dst, 0); - if(ret != WINED3D_OK) goto error; - - sbuf = slock.pBits; - dbuf = dlock.pBits; - TRACE("Dst is at %p, Src is at %p\n", dbuf, sbuf); - - sEntry = src->resource.format; - dEntry = This->resource.format; - } - - /* Handle compressed surfaces first... */ - if (sEntry->Flags & dEntry->Flags & WINED3DFMT_FLAG_COMPRESSED) - { - UINT row_block_count; - - TRACE("compressed -> compressed copy\n"); - if (trans) - FIXME("trans arg not supported when a compressed surface is involved\n"); - if (dstx || dsty) - FIXME("offset for destination surface is not supported\n"); - if (src->resource.format->id != This->resource.format->id) - { - FIXME("compressed -> compressed copy only supported for the same type of surface\n"); - ret = WINED3DERR_WRONGTEXTUREFORMAT; - goto error; - } - - row_block_count = (w + dEntry->block_width - 1) / dEntry->block_width; - for (y = 0; y < h; y += dEntry->block_height) - { - memcpy(dbuf, sbuf, row_block_count * dEntry->block_byte_count); - dbuf += dlock.Pitch; - sbuf += slock.Pitch; - } - - goto error; - } - if ((sEntry->Flags & WINED3DFMT_FLAG_COMPRESSED) && !(dEntry->Flags & WINED3DFMT_FLAG_COMPRESSED)) - { - /* TODO: Use the libtxc_dxtn.so shared library to do - * software decompression - */ - ERR("Software decompression not supported.\n"); - goto error; - } - - if (trans & (WINEDDBLTFAST_SRCCOLORKEY | WINEDDBLTFAST_DESTCOLORKEY)) - { - DWORD keylow, keyhigh; - DWORD mask = src->resource.format->red_mask - | src->resource.format->green_mask - | src->resource.format->blue_mask; - - /* For some 8-bit formats like L8 and P8 color masks don't make sense */ - if(!mask && bpp==1) - mask = 0xff; - - TRACE("Color keyed copy\n"); - if (trans & WINEDDBLTFAST_SRCCOLORKEY) - { - keylow = src->SrcBltCKey.dwColorSpaceLowValue; - keyhigh = src->SrcBltCKey.dwColorSpaceHighValue; - } - else - { - /* I'm not sure if this is correct */ - FIXME("WINEDDBLTFAST_DESTCOLORKEY not fully supported yet.\n"); - keylow = This->DestBltCKey.dwColorSpaceLowValue; - keyhigh = This->DestBltCKey.dwColorSpaceHighValue; - } - -#define COPYBOX_COLORKEY(type) { \ - const type *s = (const type *)sbuf; \ - type *d = (type *)dbuf; \ - type tmp; \ - for (y = 0; y < h; y++) { \ - for (x = 0; x < w; x++) { \ - tmp = s[x]; \ - if ((tmp & mask) < keylow || (tmp & mask) > keyhigh) d[x] = tmp; \ - } \ - s = (const type *)((const BYTE *)s + slock.Pitch); \ - d = (type *)((BYTE *)d + dlock.Pitch); \ - } \ - break; \ - } - - switch (bpp) { - case 1: COPYBOX_COLORKEY(BYTE) - case 2: COPYBOX_COLORKEY(WORD) - case 4: COPYBOX_COLORKEY(DWORD) - case 3: - { - const BYTE *s; - BYTE *d; - DWORD tmp; - s = sbuf; - d = dbuf; - for (y = 0; y < h; y++) - { - for (x = 0; x < w * 3; x += 3) - { - tmp = (DWORD)s[x] + ((DWORD)s[x + 1] << 8) + ((DWORD)s[x + 2] << 16); - if (tmp < keylow || tmp > keyhigh) - { - d[x + 0] = s[x + 0]; - d[x + 1] = s[x + 1]; - d[x + 2] = s[x + 2]; - } - } - s += slock.Pitch; - d += dlock.Pitch; - } - break; - } - default: - FIXME("Source color key blitting not supported for bpp %d\n",bpp*8); - ret = WINED3DERR_NOTAVAILABLE; - goto error; - } -#undef COPYBOX_COLORKEY - TRACE("Copy Done\n"); - } - else - { - int width = w * bpp; - INT sbufpitch, dbufpitch; - - TRACE("NO color key copy\n"); - /* Handle overlapping surfaces */ - if (sbuf < dbuf) - { - sbuf += (h - 1) * slock.Pitch; - dbuf += (h - 1) * dlock.Pitch; - sbufpitch = -slock.Pitch; - dbufpitch = -dlock.Pitch; - } - else - { - sbufpitch = slock.Pitch; - dbufpitch = dlock.Pitch; - } - for (y = 0; y < h; y++) - { - /* This is pretty easy, a line for line memcpy */ - memmove(dbuf, sbuf, width); - sbuf += sbufpitch; - dbuf += dbufpitch; - } - TRACE("Copy done\n"); - } - -error: - if (src == This) - { - IWineD3DSurface_UnlockRect(iface); - } - else - { - IWineD3DSurface_UnlockRect(iface); - IWineD3DSurface_UnlockRect(src_surface); - } - - return ret; -} - -HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - TRACE("(%p) : rect@%p flags(%08x), output lockedRect@%p, memory@%p\n", - This, pRect, Flags, pLockedRect, This->resource.allocatedMemory); - - pLockedRect->Pitch = IWineD3DSurface_GetPitch(iface); - - if (!pRect) - { - pLockedRect->pBits = This->resource.allocatedMemory; - This->lockedRect.left = 0; - This->lockedRect.top = 0; - This->lockedRect.right = This->currentDesc.Width; - This->lockedRect.bottom = This->currentDesc.Height; - - TRACE("Locked Rect (%p) = l %d, t %d, r %d, b %d\n", - &This->lockedRect, This->lockedRect.left, This->lockedRect.top, - This->lockedRect.right, This->lockedRect.bottom); - } - else - { - const struct wined3d_format *format = This->resource.format; - - TRACE("Lock Rect (%p) = l %d, t %d, r %d, b %d\n", - pRect, pRect->left, pRect->top, pRect->right, pRect->bottom); - - if ((format->Flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED) - { - /* Compressed textures are block based, so calculate the offset of - * the block that contains the top-left pixel of the locked rectangle. */ - pLockedRect->pBits = This->resource.allocatedMemory - + ((pRect->top / format->block_height) * pLockedRect->Pitch) - + ((pRect->left / format->block_width) * format->block_byte_count); - } - else - { - pLockedRect->pBits = This->resource.allocatedMemory + - (pLockedRect->Pitch * pRect->top) + - (pRect->left * format->byte_count); - } - This->lockedRect.left = pRect->left; - This->lockedRect.top = pRect->top; - This->lockedRect.right = pRect->right; - This->lockedRect.bottom = pRect->bottom; - } - - /* No dirtifying is needed for this surface implementation */ - TRACE("returning memory@%p, pitch(%d)\n", pLockedRect->pBits, pLockedRect->Pitch); - - return WINED3D_OK; -} - -/* TODO: think about moving this down to resource? */ -const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - /* This should only be called for sysmem textures, it may be a good idea - * to extend this to all pools at some point in the future */ - if (This->resource.pool != WINED3DPOOL_SYSTEMMEM) - { - FIXME("(%p) Attempting to get system memory for a non-system memory texture\n", iface); - } - return This->resource.allocatedMemory; -} diff --git a/dll/directx/wine/wined3d/surface_gdi.c b/dll/directx/wine/wined3d/surface_gdi.c deleted file mode 100644 index a640b794ee5..00000000000 --- a/dll/directx/wine/wined3d/surface_gdi.c +++ /dev/null @@ -1,538 +0,0 @@ -/* - * 2D Surface implementation without OpenGL - * - * Copyright 1997-2000 Marcus Meissner - * Copyright 1998-2000 Lionel Ulmer - * Copyright 2000-2001 TransGaming Technologies Inc. - * Copyright 2002-2005 Jason Edmeades - * Copyright 2002-2003 Raphael Junqueira - * Copyright 2004 Christian Costa - * Copyright 2005 Oliver Stieber - * Copyright 2006-2008 Stefan Dösinger - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wine/port.h" -#include "wined3d_private.h" - -#include - -/* Use the d3d_surface debug channel to have one channel for all surfaces */ -WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); - -void surface_gdi_cleanup(IWineD3DSurfaceImpl *This) -{ - TRACE("(%p) : Cleaning up.\n", This); - - if (This->Flags & SFLAG_DIBSECTION) - { - /* Release the DC. */ - SelectObject(This->hDC, This->dib.holdbitmap); - DeleteDC(This->hDC); - /* Release the DIB section. */ - DeleteObject(This->dib.DIBsection); - This->dib.bitmap_data = NULL; - This->resource.allocatedMemory = NULL; - } - - if (This->Flags & SFLAG_USERPTR) IWineD3DSurface_SetMem((IWineD3DSurface *)This, NULL); - if (This->overlay_dest) list_remove(&This->overlay_entry); - - HeapFree(GetProcessHeap(), 0, This->palette9); - - resource_cleanup((IWineD3DResource *)This); -} - -/***************************************************************************** - * IWineD3DSurface::Release, GDI version - * - * In general a normal COM Release method, but the GDI version doesn't have - * to destroy all the GL things. - * - *****************************************************************************/ -static ULONG WINAPI IWineGDISurfaceImpl_Release(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - ULONG ref = InterlockedDecrement(&This->resource.ref); - TRACE("(%p) : Releasing from %d\n", This, ref + 1); - - if (!ref) - { - surface_gdi_cleanup(This); - - TRACE("(%p) Released.\n", This); - HeapFree(GetProcessHeap(), 0, This); - } - - return ref; -} - -/***************************************************************************** - * IWineD3DSurface::PreLoad, GDI version - * - * This call is unsupported on GDI surfaces, if it's called something went - * wrong in the parent library. Write an informative warning - * - *****************************************************************************/ -static void WINAPI -IWineGDISurfaceImpl_PreLoad(IWineD3DSurface *iface) -{ - ERR("(%p): PreLoad is not supported on X11 surfaces!\n", iface); - ERR("(%p): Most likely the parent library did something wrong.\n", iface); - ERR("(%p): Please report to wine-devel\n", iface); -} - -/***************************************************************************** - * IWineD3DSurface::UnLoad, GDI version - * - * This call is unsupported on GDI surfaces, if it's called something went - * wrong in the parent library. Write an informative warning. - * - *****************************************************************************/ -static void WINAPI IWineGDISurfaceImpl_UnLoad(IWineD3DSurface *iface) -{ - ERR("(%p): UnLoad is not supported on X11 surfaces!\n", iface); - ERR("(%p): Most likely the parent library did something wrong.\n", iface); - ERR("(%p): Please report to wine-devel\n", iface); -} - -/***************************************************************************** - * IWineD3DSurface::LockRect, GDI version - * - * Locks the surface and returns a pointer to the surface memory - * - * Params: - * pLockedRect: Address to return the locking info at - * pRect: Rectangle to lock - * Flags: Some flags - * - * Returns: - * WINED3D_OK on success - * WINED3DERR_INVALIDCALL on errors - * - *****************************************************************************/ -static HRESULT WINAPI -IWineGDISurfaceImpl_LockRect(IWineD3DSurface *iface, - WINED3DLOCKED_RECT* pLockedRect, - CONST RECT* pRect, - DWORD Flags) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - /* Already locked? */ - if(This->Flags & SFLAG_LOCKED) - { - WARN("(%p) Surface already locked\n", This); - /* What should I return here? */ - return WINED3DERR_INVALIDCALL; - } - This->Flags |= SFLAG_LOCKED; - - if(!This->resource.allocatedMemory) { - /* This happens on gdi surfaces if the application set a user pointer and resets it. - * Recreate the DIB section - */ - IWineD3DBaseSurfaceImpl_CreateDIBSection(iface); - This->resource.allocatedMemory = This->dib.bitmap_data; - } - - return IWineD3DBaseSurfaceImpl_LockRect(iface, pLockedRect, pRect, Flags); -} - -/***************************************************************************** - * IWineD3DSurface::UnlockRect, GDI version - * - * Unlocks a surface. This implementation doesn't do much, except updating - * the window if the front buffer is unlocked - * - * Returns: - * WINED3D_OK on success - * WINED3DERR_INVALIDCALL on failure - * - *****************************************************************************/ -static HRESULT WINAPI -IWineGDISurfaceImpl_UnlockRect(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - TRACE("(%p)\n", This); - - if (!(This->Flags & SFLAG_LOCKED)) - { - WARN("trying to Unlock an unlocked surf@%p\n", This); - return WINEDDERR_NOTLOCKED; - } - - /* Tell the swapchain to update the screen */ - if (This->container.type == WINED3D_CONTAINER_SWAPCHAIN) - { - IWineD3DSwapChainImpl *swapchain = This->container.u.swapchain; - if (This == swapchain->front_buffer) - { - x11_copy_to_screen(swapchain, &This->lockedRect); - } - } - - This->Flags &= ~SFLAG_LOCKED; - memset(&This->lockedRect, 0, sizeof(RECT)); - return WINED3D_OK; -} - -/***************************************************************************** - * IWineD3DSurface::Flip, GDI version - * - * Flips 2 flipping enabled surfaces. Determining the 2 targets is done by - * the parent library. This implementation changes the data pointers of the - * surfaces and copies the new front buffer content to the screen - * - * Params: - * override: Flipping target(e.g. back buffer) - * - * Returns: - * WINED3D_OK on success - * - *****************************************************************************/ -static HRESULT WINAPI -IWineGDISurfaceImpl_Flip(IWineD3DSurface *iface, - IWineD3DSurface *override, - DWORD Flags) -{ - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)iface; - IWineD3DSwapChainImpl *swapchain; - HRESULT hr; - - if (surface->container.type != WINED3D_CONTAINER_SWAPCHAIN) - { - ERR("Flipped surface is not on a swapchain\n"); - return WINEDDERR_NOTFLIPPABLE; - } - - swapchain = surface->container.u.swapchain; - hr = IWineD3DSwapChain_Present((IWineD3DSwapChain *)swapchain, - NULL, NULL, swapchain->win_handle, NULL, 0); - - return hr; -} - -/***************************************************************************** - * IWineD3DSurface::LoadTexture, GDI version - * - * This is mutually unsupported by GDI surfaces - * - * Returns: - * D3DERR_INVALIDCALL - * - *****************************************************************************/ -static HRESULT WINAPI -IWineGDISurfaceImpl_LoadTexture(IWineD3DSurface *iface, BOOL srgb_mode) -{ - ERR("Unsupported on X11 surfaces\n"); - return WINED3DERR_INVALIDCALL; -} - -static void WINAPI IWineGDISurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) -{ - ERR("Not supported.\n"); -} - -static HRESULT WINAPI IWineGDISurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - WINED3DLOCKED_RECT lock; - HRESULT hr; - RGBQUAD col[256]; - - TRACE("(%p)->(%p)\n",This,pHDC); - - if(!(This->Flags & SFLAG_DIBSECTION)) - { - WARN("DC not supported on this surface\n"); - return WINED3DERR_INVALIDCALL; - } - - if(This->Flags & SFLAG_USERPTR) { - ERR("Not supported on surfaces with an application-provided surfaces\n"); - return WINEDDERR_NODC; - } - - /* Give more detailed info for ddraw */ - if (This->Flags & SFLAG_DCINUSE) - return WINEDDERR_DCALREADYCREATED; - - /* Can't GetDC if the surface is locked */ - if (This->Flags & SFLAG_LOCKED) - return WINED3DERR_INVALIDCALL; - - memset(&lock, 0, sizeof(lock)); /* To be sure */ - - /* Should have a DIB section already */ - - /* Lock the surface */ - hr = IWineD3DSurface_LockRect(iface, - &lock, - NULL, - 0); - if(FAILED(hr)) { - ERR("IWineD3DSurface_LockRect failed with hr = %08x\n", hr); - /* keep the dib section */ - return hr; - } - - if (This->resource.format->id == WINED3DFMT_P8_UINT - || This->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) - { - unsigned int n; - const PALETTEENTRY *pal = NULL; - - if(This->palette) { - pal = This->palette->palents; - } else { - IWineD3DSurfaceImpl *dds_primary; - IWineD3DSwapChainImpl *swapchain; - swapchain = (IWineD3DSwapChainImpl *)This->resource.device->swapchains[0]; - dds_primary = swapchain->front_buffer; - if (dds_primary && dds_primary->palette) - pal = dds_primary->palette->palents; - } - - if (pal) { - for (n=0; n<256; n++) { - col[n].rgbRed = pal[n].peRed; - col[n].rgbGreen = pal[n].peGreen; - col[n].rgbBlue = pal[n].peBlue; - col[n].rgbReserved = 0; - } - SetDIBColorTable(This->hDC, 0, 256, col); - } - } - - *pHDC = This->hDC; - TRACE("returning %p\n",*pHDC); - This->Flags |= SFLAG_DCINUSE; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineGDISurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - TRACE("(%p)->(%p)\n",This,hDC); - - if (!(This->Flags & SFLAG_DCINUSE)) - return WINEDDERR_NODC; - - if (This->hDC !=hDC) { - WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC); - return WINEDDERR_NODC; - } - - /* we locked first, so unlock now */ - IWineD3DSurface_UnlockRect(iface); - - This->Flags &= ~SFLAG_DCINUSE; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - RGBQUAD col[256]; - IWineD3DPaletteImpl *pal = This->palette; - unsigned int n; - TRACE("(%p)\n", This); - - if (!pal) return WINED3D_OK; - - if(This->Flags & SFLAG_DIBSECTION) { - TRACE("(%p): Updating the hdc's palette\n", This); - for (n=0; n<256; n++) { - col[n].rgbRed = pal->palents[n].peRed; - col[n].rgbGreen = pal->palents[n].peGreen; - col[n].rgbBlue = pal->palents[n].peBlue; - col[n].rgbReserved = 0; - } - SetDIBColorTable(This->hDC, 0, 256, col); - } - - /* Update the image because of the palette change. Some games like e.g Red Alert - call SetEntries a lot to implement fading. */ - /* Tell the swapchain to update the screen */ - if (This->container.type == WINED3D_CONTAINER_SWAPCHAIN) - { - IWineD3DSwapChainImpl *swapchain = This->container.u.swapchain; - if (This == swapchain->front_buffer) - { - x11_copy_to_screen(swapchain, NULL); - } - } - - return WINED3D_OK; -} - -/***************************************************************************** - * IWineD3DSurface::PrivateSetup, GDI version - * - * Initializes the GDI surface, aka creates the DIB section we render to - * The DIB section creation is done by calling GetDC, which will create the - * section and releasing the dc to allow the app to use it. The dib section - * will stay until the surface is released - * - * GDI surfaces do not need to be a power of 2 in size, so the pow2 sizes - * are set to the real sizes to save memory. The NONPOW2 flag is unset to - * avoid confusion in the shared surface code. - * - * Returns: - * WINED3D_OK on success - * The return values of called methods on failure - * - *****************************************************************************/ -static HRESULT WINAPI -IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - HRESULT hr; - - if(This->resource.usage & WINED3DUSAGE_OVERLAY) - { - ERR("(%p) Overlays not yet supported by GDI surfaces\n", This); - return WINED3DERR_INVALIDCALL; - } - - /* Sysmem textures have memory already allocated - - * release it, this avoids an unnecessary memcpy - */ - hr = IWineD3DBaseSurfaceImpl_CreateDIBSection(iface); - if(SUCCEEDED(hr)) - { - HeapFree(GetProcessHeap(), 0, This->resource.heapMemory); - This->resource.heapMemory = NULL; - This->resource.allocatedMemory = This->dib.bitmap_data; - } - - /* We don't mind the nonpow2 stuff in GDI */ - This->pow2Width = This->currentDesc.Width; - This->pow2Height = This->currentDesc.Height; - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineGDISurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - - /* Render targets depend on their hdc, and we can't create an hdc on a user pointer */ - if(This->resource.usage & WINED3DUSAGE_RENDERTARGET) { - ERR("Not supported on render targets\n"); - return WINED3DERR_INVALIDCALL; - } - - if(This->Flags & (SFLAG_LOCKED | SFLAG_DCINUSE)) { - WARN("Surface is locked or the HDC is in use\n"); - return WINED3DERR_INVALIDCALL; - } - - if(Mem && Mem != This->resource.allocatedMemory) { - void *release = NULL; - - /* Do I have to copy the old surface content? */ - if(This->Flags & SFLAG_DIBSECTION) { - /* Release the DC. No need to hold the critical section for the update - * Thread because this thread runs only on front buffers, but this method - * fails for render targets in the check above. - */ - SelectObject(This->hDC, This->dib.holdbitmap); - DeleteDC(This->hDC); - /* Release the DIB section */ - DeleteObject(This->dib.DIBsection); - This->dib.bitmap_data = NULL; - This->resource.allocatedMemory = NULL; - This->hDC = NULL; - This->Flags &= ~SFLAG_DIBSECTION; - } else if(!(This->Flags & SFLAG_USERPTR)) { - release = This->resource.allocatedMemory; - } - This->resource.allocatedMemory = Mem; - This->Flags |= SFLAG_USERPTR | SFLAG_INSYSMEM; - - /* Now free the old memory if any */ - HeapFree(GetProcessHeap(), 0, release); - } else if(This->Flags & SFLAG_USERPTR) { - /* LockRect and GetDC will re-create the dib section and allocated memory */ - This->resource.allocatedMemory = NULL; - This->Flags &= ~SFLAG_USERPTR; - } - return WINED3D_OK; -} - -static WINED3DSURFTYPE WINAPI IWineGDISurfaceImpl_GetImplType(IWineD3DSurface *iface) { - return SURFACE_GDI; -} - -static HRESULT WINAPI IWineGDISurfaceImpl_DrawOverlay(IWineD3DSurface *iface) { - FIXME("GDI surfaces can't draw overlays yet\n"); - return E_FAIL; -} - -/* FIXME: This vtable should not use any IWineD3DSurface* implementation functions, - * only IWineD3DBaseSurface and IWineGDISurface ones. - */ -const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = -{ - /* IUnknown */ - IWineD3DBaseSurfaceImpl_QueryInterface, - IWineD3DBaseSurfaceImpl_AddRef, - IWineGDISurfaceImpl_Release, - /* IWineD3DResource */ - IWineD3DBaseSurfaceImpl_GetParent, - IWineD3DBaseSurfaceImpl_SetPrivateData, - IWineD3DBaseSurfaceImpl_GetPrivateData, - IWineD3DBaseSurfaceImpl_FreePrivateData, - IWineD3DBaseSurfaceImpl_SetPriority, - IWineD3DBaseSurfaceImpl_GetPriority, - IWineGDISurfaceImpl_PreLoad, - IWineGDISurfaceImpl_UnLoad, - IWineD3DBaseSurfaceImpl_GetType, - /* IWineD3DSurface */ - IWineD3DBaseSurfaceImpl_GetDesc, - IWineGDISurfaceImpl_LockRect, - IWineGDISurfaceImpl_UnlockRect, - IWineGDISurfaceImpl_GetDC, - IWineGDISurfaceImpl_ReleaseDC, - IWineGDISurfaceImpl_Flip, - IWineD3DBaseSurfaceImpl_Blt, - IWineD3DBaseSurfaceImpl_GetBltStatus, - IWineD3DBaseSurfaceImpl_GetFlipStatus, - IWineD3DBaseSurfaceImpl_IsLost, - IWineD3DBaseSurfaceImpl_Restore, - IWineD3DBaseSurfaceImpl_BltFast, - IWineD3DBaseSurfaceImpl_GetPalette, - IWineD3DBaseSurfaceImpl_SetPalette, - IWineGDISurfaceImpl_RealizePalette, - IWineD3DBaseSurfaceImpl_SetColorKey, - IWineD3DBaseSurfaceImpl_GetPitch, - IWineGDISurfaceImpl_SetMem, - IWineD3DBaseSurfaceImpl_SetOverlayPosition, - IWineD3DBaseSurfaceImpl_GetOverlayPosition, - IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder, - IWineD3DBaseSurfaceImpl_UpdateOverlay, - IWineD3DBaseSurfaceImpl_SetClipper, - IWineD3DBaseSurfaceImpl_GetClipper, - /* Internal use: */ - IWineGDISurfaceImpl_LoadTexture, - IWineGDISurfaceImpl_BindTexture, - IWineD3DBaseSurfaceImpl_GetData, - IWineD3DBaseSurfaceImpl_SetFormat, - IWineGDISurfaceImpl_PrivateSetup, - IWineGDISurfaceImpl_GetImplType, - IWineGDISurfaceImpl_DrawOverlay -}; diff --git a/dll/directx/wine/wined3d/swapchain.c b/dll/directx/wine/wined3d/swapchain.c index 35558adadaa..0b32eca0a91 100644 --- a/dll/directx/wine/wined3d/swapchain.c +++ b/dll/directx/wine/wined3d/swapchain.c @@ -1,105 +1,287 @@ /* - *IDirect3DSwapChain9 implementation + * Copyright 2002-2003 Jason Edmeades + * Copyright 2002-2003 Raphael Junqueira + * Copyright 2005 Oliver Stieber + * Copyright 2007-2008 Stefan Dösinger for CodeWeavers + * Copyright 2011 Henri Verbeet for CodeWeavers * - *Copyright 2002-2003 Jason Edmeades - *Copyright 2002-2003 Raphael Junqueira - *Copyright 2005 Oliver Stieber - *Copyright 2007-2008 Stefan Dösinger for CodeWeavers + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - *This library is free software; you can redistribute it and/or - *modify it under the terms of the GNU Lesser General Public - *License as published by the Free Software Foundation; either - *version 2.1 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - *This library is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - *Lesser General Public License for more details. - * - *You should have received a copy of the GNU Lesser General Public - *License along with this library; if not, write to the Free Software - *Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "config.h" #include "wined3d_private.h" - -/*TODO: some of the additional parameters may be required to - set the gamma ramp (for some weird reason microsoft have left swap gammaramp in device - but it operates on a swapchain, it may be a good idea to move it to IWineD3DSwapChain for IWineD3D)*/ - - WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(fps); /* Do not call while under the GL lock. */ -static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface) +static void swapchain_cleanup(struct wined3d_swapchain *swapchain) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; WINED3DDISPLAYMODE mode; - unsigned int i; + UINT i; - TRACE("Destroying swapchain %p\n", iface); + TRACE("Destroying swapchain %p.\n", swapchain); - IWineD3DSwapChain_SetGammaRamp(iface, 0, &This->orig_gamma); + wined3d_swapchain_set_gamma_ramp(swapchain, 0, &swapchain->orig_gamma); - /* Release the swapchain's draw buffers. Make sure This->back_buffers[0] is - * the last buffer to be destroyed, FindContext() depends on that. */ - if (This->front_buffer) + /* Release the swapchain's draw buffers. Make sure swapchain->back_buffers[0] + * is the last buffer to be destroyed, FindContext() depends on that. */ + if (swapchain->front_buffer) { - surface_set_container(This->front_buffer, WINED3D_CONTAINER_NONE, NULL); - if (IWineD3DSurface_Release((IWineD3DSurface *)This->front_buffer)) - { - WARN("(%p) Something's still holding the front buffer (%p).\n", - This, This->front_buffer); - } - This->front_buffer = NULL; + surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_NONE, NULL); + if (wined3d_surface_decref(swapchain->front_buffer)) + WARN("Something's still holding the front buffer (%p).\n", swapchain->front_buffer); + swapchain->front_buffer = NULL; } - if (This->back_buffers) + if (swapchain->back_buffers) { - UINT i = This->presentParms.BackBufferCount; + i = swapchain->presentParms.BackBufferCount; while (i--) { - surface_set_container(This->back_buffers[i], WINED3D_CONTAINER_NONE, NULL); - if (IWineD3DSurface_Release((IWineD3DSurface *)This->back_buffers[i])) - WARN("(%p) Something's still holding back buffer %u (%p).\n", - This, i, This->back_buffers[i]); + surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_NONE, NULL); + if (wined3d_surface_decref(swapchain->back_buffers[i])) + WARN("Something's still holding back buffer %u (%p).\n", i, swapchain->back_buffers[i]); } - HeapFree(GetProcessHeap(), 0, This->back_buffers); - This->back_buffers = NULL; + HeapFree(GetProcessHeap(), 0, swapchain->back_buffers); + swapchain->back_buffers = NULL; } - for (i = 0; i < This->num_contexts; ++i) + for (i = 0; i < swapchain->num_contexts; ++i) { - context_destroy(This->device, This->context[i]); + context_destroy(swapchain->device, swapchain->context[i]); } - /* Restore the screen resolution if we rendered in fullscreen - * This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9 - * this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution - * before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params - */ - if (!This->presentParms.Windowed && This->presentParms.AutoRestoreDisplayMode) + HeapFree(GetProcessHeap(), 0, swapchain->context); + + /* Restore the screen resolution if we rendered in fullscreen. + * This will restore the screen resolution to what it was before creating + * the swapchain. In case of d3d8 and d3d9 this will be the original + * desktop resolution. In case of d3d7 this will be a NOP because ddraw + * sets the resolution before starting up Direct3D, thus orig_width and + * orig_height will be equal to the modes in the presentation params. */ + if (!swapchain->presentParms.Windowed && swapchain->presentParms.AutoRestoreDisplayMode) { - mode.Width = This->orig_width; - mode.Height = This->orig_height; + mode.Width = swapchain->orig_width; + mode.Height = swapchain->orig_height; mode.RefreshRate = 0; - mode.Format = This->orig_fmt; - IWineD3DDevice_SetDisplayMode((IWineD3DDevice *)This->device, 0, &mode); + mode.Format = swapchain->orig_fmt; + wined3d_device_set_display_mode(swapchain->device, 0, &mode); } - HeapFree(GetProcessHeap(), 0, This->context); - HeapFree(GetProcessHeap(), 0, This); + if (swapchain->backup_dc) + { + TRACE("Destroying backup wined3d window %p, dc %p.\n", swapchain->backup_wnd, swapchain->backup_dc); + + ReleaseDC(swapchain->backup_wnd, swapchain->backup_dc); + DestroyWindow(swapchain->backup_wnd); + } +} + +ULONG CDECL wined3d_swapchain_incref(struct wined3d_swapchain *swapchain) +{ + ULONG refcount = InterlockedIncrement(&swapchain->ref); + + TRACE("%p increasing refcount to %u.\n", swapchain, refcount); + + return refcount; +} + +/* Do not call while under the GL lock. */ +ULONG CDECL wined3d_swapchain_decref(struct wined3d_swapchain *swapchain) +{ + ULONG refcount = InterlockedDecrement(&swapchain->ref); + + TRACE("%p decreasing refcount to %u.\n", swapchain, refcount); + + if (!refcount) + { + swapchain_cleanup(swapchain); + swapchain->parent_ops->wined3d_object_destroyed(swapchain->parent); + HeapFree(GetProcessHeap(), 0, swapchain); + } + + return refcount; +} + +void * CDECL wined3d_swapchain_get_parent(const struct wined3d_swapchain *swapchain) +{ + TRACE("swapchain %p.\n", swapchain); + + return swapchain->parent; +} + +HRESULT CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window) +{ + if (!window) + window = swapchain->device_window; + if (window == swapchain->win_handle) + return WINED3D_OK; + + TRACE("Setting swapchain %p window from %p to %p.\n", + swapchain, swapchain->win_handle, window); + swapchain->win_handle = window; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain, + const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, + const RGNDATA *dirty_region, DWORD flags) +{ + TRACE("swapchain %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.\n", + swapchain, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), + dst_window_override, dirty_region, flags); + + wined3d_swapchain_set_window(swapchain, dst_window_override); + + return swapchain->swapchain_ops->swapchain_present(swapchain, + src_rect, dst_rect, dirty_region, flags); +} + +HRESULT CDECL wined3d_swapchain_get_front_buffer_data(const struct wined3d_swapchain *swapchain, + struct wined3d_surface *dst_surface) +{ + POINT offset = {0, 0}; + + TRACE("swapchain %p, dst_surface %p.\n", swapchain, dst_surface); + + if (swapchain->presentParms.Windowed) + MapWindowPoints(swapchain->win_handle, NULL, &offset, 1); + + wined3d_surface_bltfast(dst_surface, offset.x, offset.y, swapchain->front_buffer, NULL, 0); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain *swapchain, + UINT back_buffer_idx, WINED3DBACKBUFFER_TYPE type, struct wined3d_surface **back_buffer) +{ + TRACE("swapchain %p, back_buffer_idx %u, type %#x, back_buffer %p.\n", + swapchain, back_buffer_idx, type, back_buffer); + + /* Return invalid if there is no backbuffer array, otherwise it will + * crash when ddraw is used (there swapchain->back_buffers is always + * NULL). We need this because this function is called from + * stateblock_init_default_state() to get the default scissorrect + * dimensions. */ + if (!swapchain->back_buffers || back_buffer_idx >= swapchain->presentParms.BackBufferCount) + { + WARN("Invalid back buffer index.\n"); + /* Native d3d9 doesn't set NULL here, just as wine's d3d9. But set it + * here in wined3d to avoid problems in other libs. */ + *back_buffer = NULL; + return WINED3DERR_INVALIDCALL; + } + + *back_buffer = swapchain->back_buffers[back_buffer_idx]; + if (*back_buffer) + wined3d_surface_incref(*back_buffer); + + TRACE("Returning back buffer %p.\n", *back_buffer); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain *swapchain, + WINED3DRASTER_STATUS *raster_status) +{ + static BOOL warned; + /* No OpenGL equivalent */ + if (!warned) + { + FIXME("swapchain %p, raster_status %p stub!\n", swapchain, raster_status); + warned = TRUE; + } + + /* Obtaining the raster status is a widely implemented but optional + * feature. When this method returns OK StarCraft 2 expects the + * raster_status->InVBlank value to actually change over time. To prevent + * StarCraft 2 from running in an infinite loop at startup this method + * returns INVALIDCALL. */ + return WINED3DERR_INVALIDCALL; +} + +HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain, WINED3DDISPLAYMODE *mode) +{ + HRESULT hr; + + TRACE("swapchain %p, mode %p.\n", swapchain, mode); + + hr = wined3d_get_adapter_display_mode(swapchain->device->wined3d, swapchain->device->adapter->ordinal, mode); + + TRACE("Returning w %u, h %u, refresh rate %u, format %s.\n", + mode->Width, mode->Height, mode->RefreshRate, debug_d3dformat(mode->Format)); + + return hr; +} + +struct wined3d_device * CDECL wined3d_swapchain_get_device(const struct wined3d_swapchain *swapchain) +{ + TRACE("swapchain %p.\n", swapchain); + + return swapchain->device; +} + +HRESULT CDECL wined3d_swapchain_get_present_parameters(const struct wined3d_swapchain *swapchain, + WINED3DPRESENT_PARAMETERS *present_parameters) +{ + TRACE("swapchain %p, present_parameters %p.\n", swapchain, present_parameters); + + *present_parameters = swapchain->presentParms; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_swapchain_set_gamma_ramp(const struct wined3d_swapchain *swapchain, + DWORD flags, const WINED3DGAMMARAMP *ramp) +{ + HDC dc; + + TRACE("swapchain %p, flags %#x, ramp %p.\n", swapchain, flags, ramp); + + if (flags) + FIXME("Ignoring flags %#x.\n", flags); + + dc = GetDC(swapchain->device_window); + SetDeviceGammaRamp(dc, (void *)ramp); + ReleaseDC(swapchain->device_window, dc); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_swapchain_get_gamma_ramp(const struct wined3d_swapchain *swapchain, + WINED3DGAMMARAMP *ramp) +{ + HDC dc; + + TRACE("swapchain %p, ramp %p.\n", swapchain, ramp); + + dc = GetDC(swapchain->device_window); + GetDeviceGammaRamp(dc, ramp); + ReleaseDC(swapchain->device_window, dc); + + return WINED3D_OK; } /* A GL context is provided by the caller */ -static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *context, - const RECT *src_rect, const RECT *dst_rect) +static void swapchain_blit(struct wined3d_swapchain *swapchain, + struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect) { - IWineD3DDeviceImpl *device = This->device; - IWineD3DSurfaceImpl *backbuffer = This->back_buffers[0]; + struct wined3d_surface *backbuffer = swapchain->back_buffers[0]; + struct wined3d_device *device = swapchain->device; UINT src_w = src_rect->right - src_rect->left; UINT src_h = src_rect->bottom - src_rect->top; GLenum gl_filter; @@ -108,14 +290,14 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * UINT win_h; TRACE("swapchain %p, context %p, src_rect %s, dst_rect %s.\n", - This, context, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect)); + swapchain, context, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect)); if (src_w == dst_rect->right - dst_rect->left && src_h == dst_rect->bottom - dst_rect->top) gl_filter = GL_NEAREST; else gl_filter = GL_LINEAR; - GetClientRect(This->win_handle, &win_rect); + GetClientRect(swapchain->win_handle, &win_rect); win_h = win_rect.bottom - win_rect.top; if (gl_info->fbo_ops.glBlitFramebuffer && is_identity_fixup(backbuffer->resource.format->color_fixup)) @@ -123,6 +305,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * ENTER_GL(); context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, SFLAG_INTEXTURE); glReadBuffer(GL_COLOR_ATTACHMENT0); + context_check_fbo_status(context, GL_READ_FRAMEBUFFER); context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, NULL); context_set_draw_buffer(context, GL_BACK); @@ -134,7 +317,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE3)); glDisable(GL_SCISSOR_TEST); - IWineD3DDeviceImpl_MarkStateDirty(This->device, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); + IWineD3DDeviceImpl_MarkStateDirty(device, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); /* Note that the texture is upside down */ gl_info->fbo_ops.glBlitFramebuffer(src_rect->left, src_rect->top, src_rect->right, src_rect->bottom, @@ -151,10 +334,10 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * float tex_right = src_rect->right; float tex_bottom = src_rect->bottom; - context2 = context_acquire(This->device, This->back_buffers[0]); + context2 = context_acquire(device, swapchain->back_buffers[0]); context_apply_blit_state(context2, device); - if(backbuffer->Flags & SFLAG_NORMCOORD) + if (backbuffer->flags & SFLAG_NORMCOORD) { tex_left /= src_w; tex_right /= src_w; @@ -171,7 +354,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * /* Set up the texture. The surface is not in a IWineD3D*Texture container, * so there are no d3d texture settings to dirtify */ - device->blitter->set_shader((IWineD3DDevice *) device, backbuffer); + device->blitter->set_shader(device->blit_priv, context2->gl_info, backbuffer); glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MIN_FILTER, gl_filter); glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MAG_FILTER, gl_filter); @@ -212,7 +395,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * glPopMatrix(); glPopAttrib(); - device->blitter->unset_shader((IWineD3DDevice *) device); + device->blitter->unset_shader(context->gl_info); checkGLcall("Swapchain present blit(manual)\n"); LEAVE_GL(); @@ -220,18 +403,16 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context * } } -static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; +static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in, + const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags) +{ + const struct wined3d_fb_state *fb = &swapchain->device->fb; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; RECT src_rect, dst_rect; BOOL render_to_fbo; - unsigned int sync; - int retval; - IWineD3DSwapChain_SetDestWindowOverride(iface, hDestWindowOverride); - - context = context_acquire(This->device, This->back_buffers[0]); + context = context_acquire(swapchain->device, swapchain->back_buffers[0]); if (!context->valid) { context_release(context); @@ -242,15 +423,17 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO gl_info = context->gl_info; /* Render the cursor onto the back buffer, using our nifty directdraw blitting code :-) */ - if (This->device->bCursorVisible && This->device->cursorTexture) + if (swapchain->device->bCursorVisible && + swapchain->device->cursorTexture && + !swapchain->device->hardwareCursor) { - IWineD3DSurfaceImpl cursor; + struct wined3d_surface cursor; RECT destRect = { - This->device->xScreenSpace - This->device->xHotSpot, - This->device->yScreenSpace - This->device->yHotSpot, - This->device->xScreenSpace + This->device->cursorWidth - This->device->xHotSpot, - This->device->yScreenSpace + This->device->cursorHeight - This->device->yHotSpot, + swapchain->device->xScreenSpace - swapchain->device->xHotSpot, + swapchain->device->yScreenSpace - swapchain->device->yHotSpot, + swapchain->device->xScreenSpace + swapchain->device->cursorWidth - swapchain->device->xHotSpot, + swapchain->device->yScreenSpace + swapchain->device->cursorHeight - swapchain->device->yHotSpot, }; TRACE("Rendering the cursor. Creating fake surface at %p\n", &cursor); /* Build a fake surface to call the Blitting code. It is not possible to use the interface passed by @@ -258,49 +441,47 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO * allows to use the Blitting engine and avoid copying the whole texture -> render target blitting code. */ memset(&cursor, 0, sizeof(cursor)); - cursor.lpVtbl = &IWineD3DSurface_Vtbl; cursor.resource.ref = 1; - cursor.resource.device = This->device; + cursor.resource.device = swapchain->device; cursor.resource.pool = WINED3DPOOL_SCRATCH; cursor.resource.format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM); cursor.resource.resourceType = WINED3DRTYPE_SURFACE; - cursor.texture_name = This->device->cursorTexture; + cursor.texture_name = swapchain->device->cursorTexture; cursor.texture_target = GL_TEXTURE_2D; cursor.texture_level = 0; - cursor.currentDesc.Width = This->device->cursorWidth; - cursor.currentDesc.Height = This->device->cursorHeight; + cursor.resource.width = swapchain->device->cursorWidth; + cursor.resource.height = swapchain->device->cursorHeight; /* The cursor must have pow2 sizes */ - cursor.pow2Width = cursor.currentDesc.Width; - cursor.pow2Height = cursor.currentDesc.Height; + cursor.pow2Width = cursor.resource.width; + cursor.pow2Height = cursor.resource.height; /* The surface is in the texture */ - cursor.Flags |= SFLAG_INTEXTURE; + cursor.flags |= SFLAG_INTEXTURE; /* DDBLT_KEYSRC will cause BltOverride to enable the alpha test with GL_NOTEQUAL, 0.0, * which is exactly what we want :-) */ - if (This->presentParms.Windowed) { - MapWindowPoints(NULL, This->win_handle, (LPPOINT)&destRect, 2); - } - IWineD3DSurface_Blt((IWineD3DSurface *)This->back_buffers[0], &destRect, (IWineD3DSurface *)&cursor, - NULL, WINEDDBLT_KEYSRC, NULL, WINED3DTEXF_POINT); + if (swapchain->presentParms.Windowed) + MapWindowPoints(NULL, swapchain->win_handle, (LPPOINT)&destRect, 2); + wined3d_surface_blt(swapchain->back_buffers[0], &destRect, + &cursor, NULL, WINEDDBLT_KEYSRC, NULL, WINED3DTEXF_POINT); } - if (This->device->logo_surface) + if (swapchain->device->logo_surface) { /* Blit the logo into the upper left corner of the drawable. */ - IWineD3DSurface_BltFast((IWineD3DSurface *)This->back_buffers[0], 0, 0, - This->device->logo_surface, NULL, WINEDDBLTFAST_SRCCOLORKEY); + wined3d_surface_bltfast(swapchain->back_buffers[0], 0, 0, + swapchain->device->logo_surface, NULL, WINEDDBLTFAST_SRCCOLORKEY); } TRACE("Presenting HDC %p.\n", context->hdc); - render_to_fbo = This->render_to_fbo; + render_to_fbo = swapchain->render_to_fbo; - if (pSourceRect) + if (src_rect_in) { - src_rect = *pSourceRect; + src_rect = *src_rect_in; if (!render_to_fbo && (src_rect.left || src_rect.top - || src_rect.right != This->presentParms.BackBufferWidth - || src_rect.bottom != This->presentParms.BackBufferHeight)) + || src_rect.right != swapchain->presentParms.BackBufferWidth + || src_rect.bottom != swapchain->presentParms.BackBufferHeight)) { render_to_fbo = TRUE; } @@ -309,16 +490,18 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO { src_rect.left = 0; src_rect.top = 0; - src_rect.right = This->presentParms.BackBufferWidth; - src_rect.bottom = This->presentParms.BackBufferHeight; + src_rect.right = swapchain->presentParms.BackBufferWidth; + src_rect.bottom = swapchain->presentParms.BackBufferHeight; } - if (pDestRect) dst_rect = *pDestRect; - else GetClientRect(This->win_handle, &dst_rect); + if (dst_rect_in) + dst_rect = *dst_rect_in; + else + GetClientRect(swapchain->win_handle, &dst_rect); if (!render_to_fbo && (dst_rect.left || dst_rect.top - || dst_rect.right != This->presentParms.BackBufferWidth - || dst_rect.bottom != This->presentParms.BackBufferHeight)) + || dst_rect.right != swapchain->presentParms.BackBufferWidth + || dst_rect.bottom != swapchain->presentParms.BackBufferHeight)) { render_to_fbo = TRUE; } @@ -330,31 +513,29 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO * Note that FBO_blit from the backbuffer to the frontbuffer cannot solve * all these issues - this fails if the window is smaller than the backbuffer. */ - if (!This->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO) + if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - surface_load_location(This->back_buffers[0], SFLAG_INTEXTURE, NULL); - surface_modify_location(This->back_buffers[0], SFLAG_INDRAWABLE, FALSE); - This->render_to_fbo = TRUE; + surface_load_location(swapchain->back_buffers[0], SFLAG_INTEXTURE, NULL); + surface_modify_location(swapchain->back_buffers[0], SFLAG_INDRAWABLE, FALSE); + swapchain->render_to_fbo = TRUE; } - if(This->render_to_fbo) + if (swapchain->render_to_fbo) { /* This codepath should only be hit with the COPY swapeffect. Otherwise a backbuffer- * window size mismatch is impossible(fullscreen) and src and dst rectangles are * not allowed(they need the COPY swapeffect) * * The DISCARD swap effect is ok as well since any backbuffer content is allowed after - * the swap - */ - if(This->presentParms.SwapEffect == WINED3DSWAPEFFECT_FLIP ) - { + * the swap. */ + if (swapchain->presentParms.SwapEffect == WINED3DSWAPEFFECT_FLIP) FIXME("Render-to-fbo with WINED3DSWAPEFFECT_FLIP\n"); - } - swapchain_blit(This, context, &src_rect, &dst_rect); + swapchain_blit(swapchain, context, &src_rect, &dst_rect); } - if (This->num_contexts > 1) wglFinish(); + if (swapchain->num_contexts > 1) + wglFinish(); SwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */ TRACE("SwapBuffers called, Starting new frame\n"); @@ -362,12 +543,15 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO if (TRACE_ON(fps)) { DWORD time = GetTickCount(); - This->frames++; + ++swapchain->frames; + /* every 1.5 seconds */ - if (time - This->prev_time > 1500) { - TRACE_(fps)("%p @ approx %.2ffps\n", This, 1000.0*This->frames/(time - This->prev_time)); - This->prev_time = time; - This->frames = 0; + if (time - swapchain->prev_time > 1500) + { + TRACE_(fps)("%p @ approx %.2ffps\n", + swapchain, 1000.0 * swapchain->frames / (time - swapchain->prev_time)); + swapchain->prev_time = time; + swapchain->frames = 0; } } @@ -385,23 +569,23 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO * gets a dark background image. If we clear it with a bright ugly color, the game's * bug shows up much more than it does on Windows, and the players see single pixels * with wrong colors. - * (The Max Payne bug has been confirmed on Windows with the debug runtime) - */ - if (FALSE && This->presentParms.SwapEffect == WINED3DSWAPEFFECT_DISCARD) { + * (The Max Payne bug has been confirmed on Windows with the debug runtime) */ + if (FALSE && swapchain->presentParms.SwapEffect == WINED3DSWAPEFFECT_DISCARD) + { TRACE("Clearing the color buffer with cyan color\n"); - IWineD3DDevice_Clear((IWineD3DDevice *)This->device, 0, NULL, + wined3d_device_clear(swapchain->device, 0, NULL, WINED3DCLEAR_TARGET, 0xff00ffff, 1.0f, 0); } - if (!This->render_to_fbo && ((This->front_buffer->Flags & SFLAG_INSYSMEM) - || (This->back_buffers[0]->Flags & SFLAG_INSYSMEM))) + if (!swapchain->render_to_fbo && ((swapchain->front_buffer->flags & SFLAG_INSYSMEM) + || (swapchain->back_buffers[0]->flags & SFLAG_INSYSMEM))) { /* Both memory copies of the surfaces are ok, flip them around too instead of dirtifying * Doesn't work with render_to_fbo because we're not flipping */ - IWineD3DSurfaceImpl *front = This->front_buffer; - IWineD3DSurfaceImpl *back = This->back_buffers[0]; + struct wined3d_surface *front = swapchain->front_buffer; + struct wined3d_surface *back = swapchain->back_buffers[0]; if(front->resource.size == back->resource.size) { DWORD fbflags; @@ -409,11 +593,10 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO /* Tell the front buffer surface that is has been modified. However, * the other locations were preserved during that, so keep the flags. - * This serves to update the emulated overlay, if any - */ - fbflags = front->Flags; + * This serves to update the emulated overlay, if any. */ + fbflags = front->flags; surface_modify_location(front, SFLAG_INDRAWABLE, TRUE); - front->Flags = fbflags; + front->flags = fbflags; } else { @@ -423,206 +606,207 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO } else { - surface_modify_location(This->front_buffer, SFLAG_INDRAWABLE, TRUE); + surface_modify_location(swapchain->front_buffer, SFLAG_INDRAWABLE, TRUE); /* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM * and INTEXTURE copies can keep their old content if they have any defined content. * If the swapeffect is COPY, the content remains the same. If it is FLIP however, * the texture / sysmem copy needs to be reloaded from the drawable */ - if (This->presentParms.SwapEffect == WINED3DSWAPEFFECT_FLIP) - { - surface_modify_location(This->back_buffers[0], SFLAG_INDRAWABLE, TRUE); - } + if (swapchain->presentParms.SwapEffect == WINED3DSWAPEFFECT_FLIP) + surface_modify_location(swapchain->back_buffers[0], SFLAG_INDRAWABLE, TRUE); } - if (This->device->depth_stencil) + if (fb->depth_stencil) { - if (This->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL - || This->device->depth_stencil->Flags & SFLAG_DISCARD) + if (swapchain->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL + || fb->depth_stencil->flags & SFLAG_DISCARD) { - surface_modify_ds_location(This->device->depth_stencil, SFLAG_DS_DISCARDED, - This->device->depth_stencil->currentDesc.Width, - This->device->depth_stencil->currentDesc.Height); - if (This->device->depth_stencil == This->device->onscreen_depth_stencil) + surface_modify_ds_location(fb->depth_stencil, SFLAG_DS_DISCARDED, + fb->depth_stencil->resource.width, + fb->depth_stencil->resource.height); + if (fb->depth_stencil == swapchain->device->onscreen_depth_stencil) { - IWineD3DSurface_Release((IWineD3DSurface *)This->device->onscreen_depth_stencil); - This->device->onscreen_depth_stencil = NULL; + wined3d_surface_decref(swapchain->device->onscreen_depth_stencil); + swapchain->device->onscreen_depth_stencil = NULL; } } } - if (This->presentParms.PresentationInterval != WINED3DPRESENT_INTERVAL_IMMEDIATE - && gl_info->supported[SGI_VIDEO_SYNC]) - { - if ((retval = GL_EXTCALL(glXGetVideoSyncSGI(&sync)))) - ERR("glXGetVideoSyncSGI failed(retval = %d\n", retval); - - switch(This->presentParms.PresentationInterval) { - case WINED3DPRESENT_INTERVAL_DEFAULT: - case WINED3DPRESENT_INTERVAL_ONE: - if(sync <= This->vSyncCounter) { - retval = GL_EXTCALL(glXWaitVideoSyncSGI(1, 0, &This->vSyncCounter)); - } else { - This->vSyncCounter = sync; - } - break; - case WINED3DPRESENT_INTERVAL_TWO: - if(sync <= This->vSyncCounter + 1) { - retval = GL_EXTCALL(glXWaitVideoSyncSGI(2, This->vSyncCounter & 0x1, &This->vSyncCounter)); - } else { - This->vSyncCounter = sync; - } - break; - case WINED3DPRESENT_INTERVAL_THREE: - if(sync <= This->vSyncCounter + 2) { - retval = GL_EXTCALL(glXWaitVideoSyncSGI(3, This->vSyncCounter % 0x3, &This->vSyncCounter)); - } else { - This->vSyncCounter = sync; - } - break; - case WINED3DPRESENT_INTERVAL_FOUR: - if(sync <= This->vSyncCounter + 3) { - retval = GL_EXTCALL(glXWaitVideoSyncSGI(4, This->vSyncCounter & 0x3, &This->vSyncCounter)); - } else { - This->vSyncCounter = sync; - } - break; - default: - FIXME("Unknown presentation interval %08x\n", This->presentParms.PresentationInterval); - } - } - context_release(context); TRACE("returning\n"); return WINED3D_OK; } -static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapChain *iface, HWND window) +static const struct wined3d_swapchain_ops swapchain_gl_ops = { - IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *)iface; + swapchain_gl_present, +}; - if (!window) window = swapchain->device_window; - if (window == swapchain->win_handle) return WINED3D_OK; +/* Helper function that blits the front buffer contents to the target window. */ +void x11_copy_to_screen(struct wined3d_swapchain *swapchain, const RECT *rect) +{ + struct wined3d_surface *front; + POINT offset = {0, 0}; + HDC src_dc, dst_dc; + RECT draw_rect; + HWND window; - TRACE("Setting swapchain %p window from %p to %p\n", swapchain, swapchain->win_handle, window); - swapchain->win_handle = window; + TRACE("swapchain %p, rect %s.\n", swapchain, wine_dbgstr_rect(rect)); + + front = swapchain->front_buffer; + if (!(front->resource.usage & WINED3DUSAGE_RENDERTARGET)) + return; + + TRACE("Copying surface %p to screen.\n", front); + + src_dc = front->hDC; + window = swapchain->win_handle; + dst_dc = GetDCEx(window, 0, DCX_CLIPSIBLINGS | DCX_CACHE); + + /* Front buffer coordinates are screen coordinates. Map them to the + * destination window if not fullscreened. */ + if (swapchain->presentParms.Windowed) + ClientToScreen(window, &offset); + + TRACE("offset %s.\n", wine_dbgstr_point(&offset)); + +#if 0 + /* FIXME: This doesn't work... if users really want to run + * X in 8bpp, then we need to call directly into display.drv + * (or Wine's equivalent), and force a private colormap + * without default entries. */ + if (front->palette) + { + SelectPalette(dst_dc, front->palette->hpal, FALSE); + RealizePalette(dst_dc); /* sends messages => deadlocks */ + } +#endif + + draw_rect.left = 0; + draw_rect.right = front->resource.width; + draw_rect.top = 0; + draw_rect.bottom = front->resource.height; + +#if 0 + /* TODO: Support clippers. */ + if (front->clipper) + { + RECT xrc; + HWND hwnd = ((IWineD3DClipperImpl *)front->clipper)->hWnd; + if (hwnd && GetClientRect(hwnd,&xrc)) + { + OffsetRect(&xrc, offset.x, offset.y); + IntersectRect(&draw_rect, &draw_rect, &xrc); + } + } +#endif + + if (!rect) + { + /* Only use this if the caller did not pass a rectangle, since + * due to double locking this could be the wrong one... */ + if (front->lockedRect.left != front->lockedRect.right) + IntersectRect(&draw_rect, &draw_rect, &front->lockedRect); + } + else + { + IntersectRect(&draw_rect, &draw_rect, rect); + } + + BitBlt(dst_dc, draw_rect.left - offset.x, draw_rect.top - offset.y, + draw_rect.right - draw_rect.left, draw_rect.bottom - draw_rect.top, + src_dc, draw_rect.left, draw_rect.top, SRCCOPY); + ReleaseDC(window, dst_dc); +} + +static HRESULT swapchain_gdi_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in, + const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags) +{ + struct wined3d_surface *front, *back; + + if (!swapchain->back_buffers) + { + WARN("Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL\n"); + return WINED3DERR_INVALIDCALL; + } + front = swapchain->front_buffer; + back = swapchain->back_buffers[0]; + + /* Flip the DC. */ + { + HDC tmp; + tmp = front->hDC; + front->hDC = back->hDC; + back->hDC = tmp; + } + + /* Flip the DIBsection. */ + { + HBITMAP tmp; + tmp = front->dib.DIBsection; + front->dib.DIBsection = back->dib.DIBsection; + back->dib.DIBsection = tmp; + } + + /* Flip the surface data. */ + { + void *tmp; + + tmp = front->dib.bitmap_data; + front->dib.bitmap_data = back->dib.bitmap_data; + back->dib.bitmap_data = tmp; + + tmp = front->resource.allocatedMemory; + front->resource.allocatedMemory = back->resource.allocatedMemory; + back->resource.allocatedMemory = tmp; + + if (front->resource.heapMemory) + ERR("GDI Surface %p has heap memory allocated.\n", front); + + if (back->resource.heapMemory) + ERR("GDI Surface %p has heap memory allocated.\n", back); + } + + /* Client_memory should not be different, but just in case. */ + { + BOOL tmp; + tmp = front->dib.client_memory; + front->dib.client_memory = back->dib.client_memory; + back->dib.client_memory = tmp; + } + + /* FPS support */ + if (TRACE_ON(fps)) + { + static LONG prev_time, frames; + DWORD time = GetTickCount(); + + ++frames; + + /* every 1.5 seconds */ + if (time - prev_time > 1500) + { + TRACE_(fps)("@ approx %.2ffps\n", 1000.0 * frames / (time - prev_time)); + prev_time = time; + frames = 0; + } + } + + x11_copy_to_screen(swapchain, NULL); return WINED3D_OK; } -static const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl = +static const struct wined3d_swapchain_ops swapchain_gdi_ops = { - /* IUnknown */ - IWineD3DBaseSwapChainImpl_QueryInterface, - IWineD3DBaseSwapChainImpl_AddRef, - IWineD3DBaseSwapChainImpl_Release, - /* IWineD3DSwapChain */ - IWineD3DBaseSwapChainImpl_GetParent, - IWineD3DSwapChainImpl_Destroy, - IWineD3DBaseSwapChainImpl_GetDevice, - IWineD3DSwapChainImpl_Present, - IWineD3DSwapChainImpl_SetDestWindowOverride, - IWineD3DBaseSwapChainImpl_GetFrontBufferData, - IWineD3DBaseSwapChainImpl_GetBackBuffer, - IWineD3DBaseSwapChainImpl_GetRasterStatus, - IWineD3DBaseSwapChainImpl_GetDisplayMode, - IWineD3DBaseSwapChainImpl_GetPresentParameters, - IWineD3DBaseSwapChainImpl_SetGammaRamp, - IWineD3DBaseSwapChainImpl_GetGammaRamp + swapchain_gdi_present, }; -static LONG fullscreen_style(LONG style) -{ - /* Make sure the window is managed, otherwise we won't get keyboard input. */ - style |= WS_POPUP | WS_SYSMENU; - style &= ~(WS_CAPTION | WS_THICKFRAME); - - return style; -} - -static LONG fullscreen_exstyle(LONG exstyle) -{ - /* Filter out window decorations. */ - exstyle &= ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE); - - return exstyle; -} - -void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w, UINT h) -{ - IWineD3DDeviceImpl *device = swapchain->device; - HWND window = swapchain->device_window; - BOOL filter_messages; - LONG style, exstyle; - - TRACE("Setting up window %p for fullscreen mode.\n", window); - - if (device->style || device->exStyle) - { - ERR("Changing the window style for window %p, but another style (%08x, %08x) is already stored.\n", - window, device->style, device->exStyle); - } - - device->style = GetWindowLongW(window, GWL_STYLE); - device->exStyle = GetWindowLongW(window, GWL_EXSTYLE); - - style = fullscreen_style(device->style); - exstyle = fullscreen_exstyle(device->exStyle); - - TRACE("Old style was %08x, %08x, setting to %08x, %08x.\n", - device->style, device->exStyle, style, exstyle); - - filter_messages = device->filter_messages; - device->filter_messages = TRUE; - - SetWindowLongW(window, GWL_STYLE, style); - SetWindowLongW(window, GWL_EXSTYLE, exstyle); - SetWindowPos(window, HWND_TOP, 0, 0, w, h, SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE); - - device->filter_messages = filter_messages; -} - -void swapchain_restore_fullscreen_window(IWineD3DSwapChainImpl *swapchain) -{ - IWineD3DDeviceImpl *device = swapchain->device; - HWND window = swapchain->device_window; - BOOL filter_messages; - LONG style, exstyle; - - if (!device->style && !device->exStyle) return; - - TRACE("Restoring window style of window %p to %08x, %08x.\n", - window, device->style, device->exStyle); - - style = GetWindowLongW(window, GWL_STYLE); - exstyle = GetWindowLongW(window, GWL_EXSTYLE); - - filter_messages = device->filter_messages; - device->filter_messages = TRUE; - - /* Only restore the style if the application didn't modify it during the - * fullscreen phase. Some applications change it before calling Reset() - * when switching between windowed and fullscreen modes (HL2), some - * depend on the original style (Eve Online). */ - if (style == fullscreen_style(device->style) && exstyle == fullscreen_exstyle(device->exStyle)) - { - SetWindowLongW(window, GWL_STYLE, device->style); - SetWindowLongW(window, GWL_EXSTYLE, device->exStyle); - } - SetWindowPos(window, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); - - device->filter_messages = filter_messages; - - /* Delete the old values. */ - device->style = 0; - device->exStyle = 0; -} - - /* Do not call while under the GL lock. */ -HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface_type, - IWineD3DDeviceImpl *device, WINED3DPRESENT_PARAMETERS *present_parameters, void *parent) +static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTYPE surface_type, + struct wined3d_device *device, WINED3DPRESENT_PARAMETERS *present_parameters, + void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_adapter *adapter = device->adapter; const struct wined3d_format *format; @@ -649,11 +833,11 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface switch (surface_type) { case SURFACE_GDI: - swapchain->lpVtbl = &IWineGDISwapChain_Vtbl; + swapchain->swapchain_ops = &swapchain_gdi_ops; break; case SURFACE_OPENGL: - swapchain->lpVtbl = &IWineD3DSwapChain_Vtbl; + swapchain->swapchain_ops = &swapchain_gl_ops; break; case SURFACE_UNKNOWN: @@ -665,17 +849,12 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface swapchain->device = device; swapchain->parent = parent; + swapchain->parent_ops = parent_ops; swapchain->ref = 1; swapchain->win_handle = window; swapchain->device_window = window; - if (!present_parameters->Windowed && window) - { - swapchain_setup_fullscreen_window(swapchain, present_parameters->BackBufferWidth, - present_parameters->BackBufferHeight); - } - - IWineD3D_GetAdapterDisplayMode(device->wined3d, adapter->ordinal, &mode); + wined3d_get_adapter_display_mode(device->wined3d, adapter->ordinal, &mode); swapchain->orig_width = mode.Width; swapchain->orig_height = mode.Height; swapchain->orig_fmt = mode.Format; @@ -720,18 +899,18 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface } TRACE("Creating front buffer.\n"); - hr = IWineD3DDeviceParent_CreateRenderTarget(device->device_parent, parent, + hr = device->device_parent->ops->create_rendertarget(device->device_parent, parent, swapchain->presentParms.BackBufferWidth, swapchain->presentParms.BackBufferHeight, swapchain->presentParms.BackBufferFormat, swapchain->presentParms.MultiSampleType, swapchain->presentParms.MultiSampleQuality, TRUE /* Lockable */, - (IWineD3DSurface **)&swapchain->front_buffer); + &swapchain->front_buffer); if (FAILED(hr)) { WARN("Failed to create front buffer, hr %#x.\n", hr); goto err; } - surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_SWAPCHAIN, (IWineD3DBase *)swapchain); + surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_SWAPCHAIN, swapchain); if (surface_type == SURFACE_OPENGL) { surface_modify_location(swapchain->front_buffer, SFLAG_INDRAWABLE, TRUE); @@ -751,7 +930,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface mode.Format = present_parameters->BackBufferFormat; mode.RefreshRate = present_parameters->FullScreen_RefreshRateInHz; - hr = IWineD3DDevice_SetDisplayMode((IWineD3DDevice *)device, 0, &mode); + hr = wined3d_device_set_display_mode(device, 0, &mode); if (FAILED(hr)) { WARN("Failed to set display mode, hr %#x.\n", hr); @@ -760,15 +939,6 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface displaymode_set = TRUE; } - swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(swapchain->context)); - if (!swapchain->context) - { - ERR("Failed to create the context array.\n"); - hr = E_OUTOFMEMORY; - goto err; - } - swapchain->num_contexts = 1; - if (surface_type == SURFACE_OPENGL) { static const enum wined3d_format_id formats[] = @@ -782,6 +952,15 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(swapchain->context)); + if (!swapchain->context) + { + ERR("Failed to create the context array.\n"); + hr = E_OUTOFMEMORY; + goto err; + } + swapchain->num_contexts = 1; + /* In WGL both color, depth and stencil are features of a pixel format. In case of D3D they are separate. * You are able to add a depth + stencil surface at a later stage when you need it. * In order to support this properly in WineD3D we need the ability to recreate the opengl context and @@ -816,10 +995,6 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface } context_release(swapchain->context[0]); } - else - { - swapchain->context[0] = NULL; - } if (swapchain->presentParms.BackBufferCount > 0) { @@ -835,18 +1010,18 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface for (i = 0; i < swapchain->presentParms.BackBufferCount; ++i) { TRACE("Creating back buffer %u.\n", i); - hr = IWineD3DDeviceParent_CreateRenderTarget(device->device_parent, parent, + hr = device->device_parent->ops->create_rendertarget(device->device_parent, parent, swapchain->presentParms.BackBufferWidth, swapchain->presentParms.BackBufferHeight, swapchain->presentParms.BackBufferFormat, swapchain->presentParms.MultiSampleType, swapchain->presentParms.MultiSampleQuality, TRUE /* Lockable */, - (IWineD3DSurface **)&swapchain->back_buffers[i]); + &swapchain->back_buffers[i]); if (FAILED(hr)) { WARN("Failed to create back buffer %u, hr %#x.\n", i, hr); goto err; } - surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_SWAPCHAIN, (IWineD3DBase *)swapchain); + surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_SWAPCHAIN, swapchain); } } @@ -856,11 +1031,11 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface TRACE("Creating depth/stencil buffer.\n"); if (!device->auto_depth_stencil) { - hr = IWineD3DDeviceParent_CreateDepthStencilSurface(device->device_parent, + hr = device->device_parent->ops->create_depth_stencil(device->device_parent, swapchain->presentParms.BackBufferWidth, swapchain->presentParms.BackBufferHeight, swapchain->presentParms.AutoDepthStencilFormat, swapchain->presentParms.MultiSampleType, swapchain->presentParms.MultiSampleQuality, FALSE /* FIXME: Discard */, - (IWineD3DSurface **)&device->auto_depth_stencil); + &device->auto_depth_stencil); if (FAILED(hr)) { WARN("Failed to create the auto depth stencil, hr %#x.\n", hr); @@ -871,7 +1046,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface } } - IWineD3DSwapChain_GetGammaRamp((IWineD3DSwapChain *)swapchain, &swapchain->orig_gamma); + wined3d_swapchain_get_gamma_ramp(swapchain, &swapchain->orig_gamma); return WINED3D_OK; @@ -896,7 +1071,8 @@ err: { for (i = 0; i < swapchain->presentParms.BackBufferCount; ++i) { - if (swapchain->back_buffers[i]) IWineD3DSurface_Release((IWineD3DSurface *)swapchain->back_buffers[i]); + if (swapchain->back_buffers[i]) + wined3d_surface_decref(swapchain->back_buffers[i]); } HeapFree(GetProcessHeap(), 0, swapchain->back_buffers); } @@ -912,47 +1088,95 @@ err: HeapFree(GetProcessHeap(), 0, swapchain->context); } - if (swapchain->front_buffer) IWineD3DSurface_Release((IWineD3DSurface *)swapchain->front_buffer); + if (swapchain->front_buffer) + wined3d_surface_decref(swapchain->front_buffer); return hr; } /* Do not call while under the GL lock. */ -struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *iface) +HRESULT CDECL wined3d_swapchain_create(struct wined3d_device *device, + WINED3DPRESENT_PARAMETERS *present_parameters, WINED3DSURFTYPE surface_type, + void *parent, const struct wined3d_parent_ops *parent_ops, + struct wined3d_swapchain **swapchain) +{ + struct wined3d_swapchain *object; + HRESULT hr; + + TRACE("device %p, present_parameters %p, swapchain %p, parent %p, surface_type %#x.\n", + device, present_parameters, swapchain, parent, surface_type); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate swapchain memory.\n"); + return E_OUTOFMEMORY; + } + + hr = swapchain_init(object, surface_type, device, present_parameters, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize swapchain, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created swapchain %p.\n", object); + *swapchain = object; + + return WINED3D_OK; +} + +/* Do not call while under the GL lock. */ +static struct wined3d_context *swapchain_create_context(struct wined3d_swapchain *swapchain) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *) iface; struct wined3d_context **newArray; struct wined3d_context *ctx; - TRACE("Creating a new context for swapchain %p, thread %d\n", This, GetCurrentThreadId()); + TRACE("Creating a new context for swapchain %p, thread %u.\n", swapchain, GetCurrentThreadId()); - if (!(ctx = context_create(This, This->front_buffer, This->ds_format))) + if (!(ctx = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format))) { ERR("Failed to create a new context for the swapchain\n"); return NULL; } context_release(ctx); - newArray = HeapAlloc(GetProcessHeap(), 0, sizeof(*newArray) * (This->num_contexts + 1)); + newArray = HeapAlloc(GetProcessHeap(), 0, sizeof(*newArray) * (swapchain->num_contexts + 1)); if(!newArray) { ERR("Out of memory when trying to allocate a new context array\n"); - context_destroy(This->device, ctx); + context_destroy(swapchain->device, ctx); return NULL; } - memcpy(newArray, This->context, sizeof(*newArray) * This->num_contexts); - HeapFree(GetProcessHeap(), 0, This->context); - newArray[This->num_contexts] = ctx; - This->context = newArray; - This->num_contexts++; + memcpy(newArray, swapchain->context, sizeof(*newArray) * swapchain->num_contexts); + HeapFree(GetProcessHeap(), 0, swapchain->context); + newArray[swapchain->num_contexts] = ctx; + swapchain->context = newArray; + swapchain->num_contexts++; TRACE("Returning context %p\n", ctx); return ctx; } +struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) +{ + DWORD tid = GetCurrentThreadId(); + unsigned int i; + + for (i = 0; i < swapchain->num_contexts; ++i) + { + if (swapchain->context[i]->tid == tid) + return swapchain->context[i]; + } + + /* Create a new context for the thread */ + return swapchain_create_context(swapchain); +} + void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height) { /* The drawable size of an onscreen drawable is the surface size. * (Actually: The window size, but the surface is created in window size) */ - *width = context->current_rt->currentDesc.Width; - *height = context->current_rt->currentDesc.Height; + *width = context->current_rt->resource.width; + *height = context->current_rt->resource.height; } diff --git a/dll/directx/wine/wined3d/swapchain_base.c b/dll/directx/wine/wined3d/swapchain_base.c deleted file mode 100644 index 083585fbb56..00000000000 --- a/dll/directx/wine/wined3d/swapchain_base.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - *IDirect3DSwapChain9 implementation - * - *Copyright 2002-2003 Jason Edmeades - *Copyright 2002-2003 Raphael Junqueira - *Copyright 2005 Oliver Stieber - *Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * - *This library is free software; you can redistribute it and/or - *modify it under the terms of the GNU Lesser General Public - *License as published by the Free Software Foundation; either - *version 2.1 of the License, or (at your option) any later version. - * - *This library is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - *Lesser General Public License for more details. - * - *You should have received a copy of the GNU Lesser General Public - *License along with this library; if not, write to the Free Software - *Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wined3d_private.h" - -WINE_DEFAULT_DEBUG_CHANNEL(d3d); - -/* IDirect3DSwapChain IUnknown parts follow: */ -HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, REFIID riid, void **object) -{ - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); - - if (IsEqualGUID(riid, &IID_IWineD3DSwapChain) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; -} - -ULONG WINAPI IWineD3DBaseSwapChainImpl_AddRef(IWineD3DSwapChain *iface) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - DWORD refCount = InterlockedIncrement(&This->ref); - TRACE("(%p) : AddRef increasing from %d\n", This, refCount - 1); - return refCount; -} - -/* Do not call while under the GL lock. */ -ULONG WINAPI IWineD3DBaseSwapChainImpl_Release(IWineD3DSwapChain *iface) -{ - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - DWORD refCount; - refCount = InterlockedDecrement(&This->ref); - TRACE("(%p) : ReleaseRef to %d\n", This, refCount); - - if (!refCount) IWineD3DSwapChain_Destroy(iface); - - return refCount; -} - -void * WINAPI IWineD3DBaseSwapChainImpl_GetParent(IWineD3DSwapChain *iface) -{ - TRACE("iface %p.\n", iface); - - return ((IWineD3DSwapChainImpl *)iface)->parent; -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface, IWineD3DSurface *dst_surface) -{ - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - POINT start; - - TRACE("iface %p, dst_surface %p.\n", iface, dst_surface); - - start.x = 0; - start.y = 0; - - if (This->presentParms.Windowed) { - MapWindowPoints(This->win_handle, NULL, &start, 1); - } - - IWineD3DSurface_BltFast(dst_surface, start.x, start.y, (IWineD3DSurface *)This->front_buffer, NULL, 0); - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, - UINT back_buffer_idx, WINED3DBACKBUFFER_TYPE type, IWineD3DSurface **back_buffer) -{ - IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *)iface; - - TRACE("iface %p, back_buffer_idx %u, type %#x, back_buffer %p.\n", - iface, back_buffer_idx, type, back_buffer); - - /* Return invalid if there is no backbuffer array, otherwise it will - * crash when ddraw is used (there swapchain->back_buffers is always NULL). - * We need this because this function is called from - * IWineD3DStateBlockImpl_InitStartupStateBlock() to get the default - * scissorrect dimensions. */ - if (!swapchain->back_buffers || back_buffer_idx >= swapchain->presentParms.BackBufferCount) - { - WARN("Invalid back buffer index.\n"); - /* Native d3d9 doesn't set NULL here, just as wine's d3d9. But set it - * here in wined3d to avoid problems in other libs. */ - *back_buffer = NULL; - return WINED3DERR_INVALIDCALL; - } - - *back_buffer = (IWineD3DSurface *)swapchain->back_buffers[back_buffer_idx]; - if (*back_buffer) IWineD3DSurface_AddRef(*back_buffer); - - TRACE("Returning back buffer %p.\n", *back_buffer); - - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface, WINED3DRASTER_STATUS *pRasterStatus) { - static BOOL warned; - /* No OpenGL equivalent */ - if (!warned) - { - FIXME("iface %p, raster_status %p stub!\n", iface, pRasterStatus); - warned = TRUE; - } - /* Obtaining the raster status is a widely implemented but optional feature. - * When this method returns OK then the application Starcraft 2 expects that - * the pRasterStatus->InVBlank value differs over time. To prevent Starcraft 2 - * from running in an infinite loop at startup this method returns INVALIDCALL. - */ - return WINED3DERR_INVALIDCALL; -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WINED3DDISPLAYMODE*pMode) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(%p): Calling GetAdapterDisplayMode\n", This, pMode); - hr = IWineD3D_GetAdapterDisplayMode(This->device->wined3d, This->device->adapter->ordinal, pMode); - - TRACE("(%p) : returning w(%d) h(%d) rr(%d) fmt(%u,%s)\n", This, pMode->Width, pMode->Height, pMode->RefreshRate, - pMode->Format, debug_d3dformat(pMode->Format)); - return hr; -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3DDevice **device) -{ - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - - *device = (IWineD3DDevice *)This->device; - IWineD3DDevice_AddRef(*device); - - TRACE("(%p) : returning %p\n", This, *device); - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, WINED3DPRESENT_PARAMETERS *pPresentationParameters) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - TRACE("(%p)\n", This); - - *pPresentationParameters = This->presentParms; - - return WINED3D_OK; -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWORD Flags, CONST WINED3DGAMMARAMP *pRamp){ - - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - HDC hDC; - TRACE("(%p) : pRamp@%p flags(%d)\n", This, pRamp, Flags); - hDC = GetDC(This->device_window); - SetDeviceGammaRamp(hDC, (LPVOID)pRamp); - ReleaseDC(This->device_window, hDC); - return WINED3D_OK; - -} - -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, WINED3DGAMMARAMP *pRamp){ - - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - HDC hDC; - TRACE("(%p) : pRamp@%p\n", This, pRamp); - hDC = GetDC(This->device_window); - GetDeviceGammaRamp(hDC, pRamp); - ReleaseDC(This->device_window, hDC); - return WINED3D_OK; - -} diff --git a/dll/directx/wine/wined3d/swapchain_gdi.c b/dll/directx/wine/wined3d/swapchain_gdi.c deleted file mode 100644 index 8920caec85c..00000000000 --- a/dll/directx/wine/wined3d/swapchain_gdi.c +++ /dev/null @@ -1,270 +0,0 @@ -/* - *IDirect3DSwapChain9 implementation - * - *Copyright 2002-2003 Jason Edmeades - *Copyright 2002-2003 Raphael Junqueira - *Copyright 2005 Oliver Stieber - *Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * - *This library is free software; you can redistribute it and/or - *modify it under the terms of the GNU Lesser General Public - *License as published by the Free Software Foundation; either - *version 2.1 of the License, or (at your option) any later version. - * - *This library is distributed in the hope that it will be useful, - *but WITHOUT ANY WARRANTY; without even the implied warranty of - *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - *Lesser General Public License for more details. - * - *You should have received a copy of the GNU Lesser General Public - *License along with this library; if not, write to the Free Software - *Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wined3d_private.h" - -WINE_DEFAULT_DEBUG_CHANNEL(d3d); -WINE_DECLARE_DEBUG_CHANNEL(fps); - -static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface) -{ - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - WINED3DDISPLAYMODE mode; - - TRACE("Destroying swapchain %p\n", iface); - - IWineD3DSwapChain_SetGammaRamp(iface, 0, &This->orig_gamma); - - /* release the ref to the front and back buffer parents */ - if (This->front_buffer) - { - surface_set_container(This->front_buffer, WINED3D_CONTAINER_NONE, NULL); - if (IWineD3DSurface_Release((IWineD3DSurface *)This->front_buffer) > 0) - { - WARN("(%p) Something's still holding the front buffer\n",This); - } - } - - if (This->back_buffers) - { - UINT i; - for (i = 0; i < This->presentParms.BackBufferCount; ++i) - { - surface_set_container(This->back_buffers[i], WINED3D_CONTAINER_NONE, NULL); - if (IWineD3DSurface_Release((IWineD3DSurface *)This->back_buffers[i])) - { - WARN("(%p) Something's still holding the back buffer\n",This); - } - } - HeapFree(GetProcessHeap(), 0, This->back_buffers); - } - - /* Restore the screen resolution if we rendered in fullscreen - * This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9 - * this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution - * before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params - */ - if (!This->presentParms.Windowed && This->presentParms.AutoRestoreDisplayMode) - { - mode.Width = This->orig_width; - mode.Height = This->orig_height; - mode.RefreshRate = 0; - mode.Format = This->orig_fmt; - IWineD3DDevice_SetDisplayMode((IWineD3DDevice *)This->device, 0, &mode); - } - - HeapFree(GetProcessHeap(), 0, This->context); - HeapFree(GetProcessHeap(), 0, This); -} - -/***************************************************************************** - * x11_copy_to_screen - * - * Helper function that blts the front buffer contents to the target window - * - * Params: - * This: Surface to copy from - * rc: Rectangle to copy - * - *****************************************************************************/ -void x11_copy_to_screen(IWineD3DSwapChainImpl *This, const RECT *rc) -{ - IWineD3DSurfaceImpl *front = This->front_buffer; - - if(front->resource.usage & WINED3DUSAGE_RENDERTARGET) { - POINT offset = {0,0}; - HWND hDisplayWnd; - HDC hDisplayDC; - HDC hSurfaceDC = 0; - RECT drawrect; - TRACE("(%p)->(%p): Copying to screen\n", front, rc); - - hSurfaceDC = front->hDC; - - hDisplayWnd = This->win_handle; - hDisplayDC = GetDCEx(hDisplayWnd, 0, DCX_CLIPSIBLINGS|DCX_CACHE); - if(rc) { - TRACE(" copying rect (%d,%d)->(%d,%d), offset (%d,%d)\n", - rc->left, rc->top, rc->right, rc->bottom, offset.x, offset.y); - } - - /* Front buffer coordinates are screen coordinates. Map them to the destination - * window if not fullscreened - */ - if(This->presentParms.Windowed) { - ClientToScreen(hDisplayWnd, &offset); - } -#if 0 - /* FIXME: This doesn't work... if users really want to run - * X in 8bpp, then we need to call directly into display.drv - * (or Wine's equivalent), and force a private colormap - * without default entries. */ - if (front->palette) { - SelectPalette(hDisplayDC, front->palette->hpal, FALSE); - RealizePalette(hDisplayDC); /* sends messages => deadlocks */ - } -#endif - drawrect.left = 0; - drawrect.right = front->currentDesc.Width; - drawrect.top = 0; - drawrect.bottom = front->currentDesc.Height; - -#if 0 - /* TODO: Support clippers */ - if (front->clipper) - { - RECT xrc; - HWND hwnd = ((IWineD3DClipperImpl *) front->clipper)->hWnd; - if (hwnd && GetClientRect(hwnd,&xrc)) - { - OffsetRect(&xrc,offset.x,offset.y); - IntersectRect(&drawrect,&drawrect,&xrc); - } - } -#endif - if (rc) { - IntersectRect(&drawrect,&drawrect,rc); - } - else { - /* Only use this if the caller did not pass a rectangle, since - * due to double locking this could be the wrong one ... - */ - if (front->lockedRect.left != front->lockedRect.right) { - IntersectRect(&drawrect,&drawrect,&front->lockedRect); - } - } - - BitBlt(hDisplayDC, - drawrect.left-offset.x, drawrect.top-offset.y, - drawrect.right-drawrect.left, drawrect.bottom-drawrect.top, - hSurfaceDC, - drawrect.left, drawrect.top, - SRCCOPY); - ReleaseDC(hDisplayWnd, hDisplayDC); - } -} - -static HRESULT WINAPI IWineGDISwapChainImpl_SetDestWindowOverride(IWineD3DSwapChain *iface, HWND window) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - - This->win_handle = window; - return WINED3D_OK; -} - -static HRESULT WINAPI IWineGDISwapChainImpl_Present(IWineD3DSwapChain *iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) { - IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *) iface; - IWineD3DSurfaceImpl *front, *back; - - if (!This->back_buffers) - { - WARN("Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; - } - front = This->front_buffer; - back = This->back_buffers[0]; - - /* Flip the DC */ - { - HDC tmp; - tmp = front->hDC; - front->hDC = back->hDC; - back->hDC = tmp; - } - - /* Flip the DIBsection */ - { - HBITMAP tmp; - tmp = front->dib.DIBsection; - front->dib.DIBsection = back->dib.DIBsection; - back->dib.DIBsection = tmp; - } - - /* Flip the surface data */ - { - void* tmp; - - tmp = front->dib.bitmap_data; - front->dib.bitmap_data = back->dib.bitmap_data; - back->dib.bitmap_data = tmp; - - tmp = front->resource.allocatedMemory; - front->resource.allocatedMemory = back->resource.allocatedMemory; - back->resource.allocatedMemory = tmp; - - if(front->resource.heapMemory) { - ERR("GDI Surface %p has heap memory allocated\n", front); - } - if(back->resource.heapMemory) { - ERR("GDI Surface %p has heap memory allocated\n", back); - } - } - - /* client_memory should not be different, but just in case */ - { - BOOL tmp; - tmp = front->dib.client_memory; - front->dib.client_memory = back->dib.client_memory; - back->dib.client_memory = tmp; - } - - /* FPS support */ - if (TRACE_ON(fps)) - { - static LONG prev_time, frames; - - DWORD time = GetTickCount(); - frames++; - /* every 1.5 seconds */ - if (time - prev_time > 1500) { - TRACE_(fps)("@ approx %.2ffps\n", 1000.0*frames/(time - prev_time)); - prev_time = time; - frames = 0; - } - } - - x11_copy_to_screen(This, NULL); - - return WINED3D_OK; -} - -const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl = -{ - /* IUnknown */ - IWineD3DBaseSwapChainImpl_QueryInterface, - IWineD3DBaseSwapChainImpl_AddRef, - IWineD3DBaseSwapChainImpl_Release, - /* IWineD3DSwapChain */ - IWineD3DBaseSwapChainImpl_GetParent, - IWineGDISwapChainImpl_Destroy, - IWineD3DBaseSwapChainImpl_GetDevice, - IWineGDISwapChainImpl_Present, - IWineGDISwapChainImpl_SetDestWindowOverride, - IWineD3DBaseSwapChainImpl_GetFrontBufferData, - IWineD3DBaseSwapChainImpl_GetBackBuffer, - IWineD3DBaseSwapChainImpl_GetRasterStatus, - IWineD3DBaseSwapChainImpl_GetDisplayMode, - IWineD3DBaseSwapChainImpl_GetPresentParameters, - IWineD3DBaseSwapChainImpl_SetGammaRamp, - IWineD3DBaseSwapChainImpl_GetGammaRamp -}; diff --git a/dll/directx/wine/wined3d/texture.c b/dll/directx/wine/wined3d/texture.c index ce95567f547..34801b8e510 100644 --- a/dll/directx/wine/wined3d/texture.c +++ b/dll/directx/wine/wined3d/texture.c @@ -1,11 +1,9 @@ /* - * IWineD3DTexture implementation - * * Copyright 2002-2005 Jason Edmeades * Copyright 2002-2005 Raphael Junqueira * Copyright 2005 Oliver Stieber * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,270 +25,610 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); -/* Do not call while under the GL lock. */ -static void texture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb) +static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struct wined3d_texture_ops *texture_ops, + UINT layer_count, UINT level_count, WINED3DRESOURCETYPE resource_type, struct wined3d_device *device, + DWORD usage, const struct wined3d_format *format, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) { - /* Override the IWineD3DResource PreLoad method. */ - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - IWineD3DDeviceImpl *device = This->resource.device; - struct wined3d_context *context = NULL; - unsigned int i; - BOOL srgb_mode; - BOOL *dirty; + HRESULT hr; - TRACE("(%p) : About to load texture.\n", This); - - switch (srgb) + hr = resource_init(&texture->resource, device, resource_type, format, + WINED3DMULTISAMPLE_NONE, 0, usage, pool, 0, 0, 0, 0, + parent, parent_ops, resource_ops); + if (FAILED(hr)) { - case SRGB_RGB: - srgb_mode = FALSE; - break; - - case SRGB_BOTH: - texture_internal_preload(iface, SRGB_RGB); - /* Fallthrough */ - - case SRGB_SRGB: - srgb_mode = TRUE; - break; - - default: - srgb_mode = This->baseTexture.is_srgb; - break; + WARN("Failed to initialize resource, returning %#x\n", hr); + return hr; } - dirty = srgb_mode ? &This->baseTexture.texture_srgb.dirty : &This->baseTexture.texture_rgb.dirty; - if (!device->isInDraw) + texture->texture_ops = texture_ops; + texture->sub_resources = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + level_count * layer_count * sizeof(*texture->sub_resources)); + if (!texture->sub_resources) + { + ERR("Failed to allocate sub-resource array.\n"); + resource_cleanup(&texture->resource); + return E_OUTOFMEMORY; + } + + texture->layer_count = layer_count; + texture->level_count = level_count; + texture->filter_type = (usage & WINED3DUSAGE_AUTOGENMIPMAP) ? WINED3DTEXF_LINEAR : WINED3DTEXF_NONE; + texture->lod = 0; + texture->texture_rgb.dirty = TRUE; + texture->texture_srgb.dirty = TRUE; + texture->flags = WINED3D_TEXTURE_POW2_MAT_IDENT; + + if (texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING) + { + texture->min_mip_lookup = minMipLookup; + texture->mag_lookup = magLookup; + } + else + { + texture->min_mip_lookup = minMipLookup_noFilter; + texture->mag_lookup = magLookup_noFilter; + } + + return WINED3D_OK; +} + +/* A GL context is provided by the caller */ +static void gltexture_delete(struct gl_texture *tex) +{ + ENTER_GL(); + glDeleteTextures(1, &tex->name); + LEAVE_GL(); + tex->name = 0; +} + +static void wined3d_texture_unload(struct wined3d_texture *texture) +{ + struct wined3d_device *device = texture->resource.device; + struct wined3d_context *context = NULL; + + if (texture->texture_rgb.name || texture->texture_srgb.name) { - /* context_acquire() sets isInDraw to TRUE when loading a pbuffer into a texture, - * thus no danger of recursive calls. */ context = context_acquire(device, NULL); } - if (This->resource.format->id == WINED3DFMT_P8_UINT - || This->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) + if (texture->texture_rgb.name) + gltexture_delete(&texture->texture_rgb); + + if (texture->texture_srgb.name) + gltexture_delete(&texture->texture_srgb); + + if (context) context_release(context); + + wined3d_texture_set_dirty(texture, TRUE); + + resource_unload(&texture->resource); +} + +static void wined3d_texture_cleanup(struct wined3d_texture *texture) +{ + UINT sub_count = texture->level_count * texture->layer_count; + UINT i; + + TRACE("texture %p.\n", texture); + + for (i = 0; i < sub_count; ++i) { - for (i = 0; i < This->baseTexture.level_count; ++i) - { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - if (palette9_changed(surface)) - { - TRACE("Reloading surface because the d3d8/9 palette was changed.\n"); - /* TODO: This is not necessarily needed with hw palettized texture support. */ - surface_load_location(surface, SFLAG_INSYSMEM, NULL); - /* Make sure the texture is reloaded because of the palette change, this kills performance though :( */ - surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); - } - } + struct wined3d_resource *sub_resource = texture->sub_resources[i]; + + if (sub_resource) + texture->texture_ops->texture_sub_resource_cleanup(sub_resource); } - /* If the texture is marked dirty or the srgb sampler setting has changed - * since the last load then reload the surfaces. */ - if (*dirty) + wined3d_texture_unload(texture); + HeapFree(GetProcessHeap(), 0, texture->sub_resources); + resource_cleanup(&texture->resource); +} + +void wined3d_texture_set_dirty(struct wined3d_texture *texture, BOOL dirty) +{ + texture->texture_rgb.dirty = dirty; + texture->texture_srgb.dirty = dirty; +} + +/* Context activation is done by the caller. */ +static HRESULT wined3d_texture_bind(struct wined3d_texture *texture, + const struct wined3d_gl_info *gl_info, BOOL srgb, BOOL *set_surface_desc) +{ + struct gl_texture *gl_tex; + BOOL new_texture = FALSE; + HRESULT hr = WINED3D_OK; + GLenum target; + + TRACE("texture %p, srgb %#x, set_surface_desc %p.\n", texture, srgb, set_surface_desc); + + /* sRGB mode cache for preload() calls outside drawprim. */ + if (srgb) + texture->flags |= WINED3D_TEXTURE_IS_SRGB; + else + texture->flags &= ~WINED3D_TEXTURE_IS_SRGB; + + gl_tex = wined3d_texture_get_gl_texture(texture, gl_info, srgb); + target = texture->target; + + ENTER_GL(); + /* Generate a texture name if we don't already have one. */ + if (!gl_tex->name) { - for (i = 0; i < This->baseTexture.level_count; ++i) + *set_surface_desc = TRUE; + glGenTextures(1, &gl_tex->name); + checkGLcall("glGenTextures"); + TRACE("Generated texture %d.\n", gl_tex->name); + if (texture->resource.pool == WINED3DPOOL_DEFAULT) { - IWineD3DSurface_LoadTexture((IWineD3DSurface *)This->baseTexture.sub_resources[i], srgb_mode); + /* Tell OpenGL to try and keep this texture in video ram (well mostly). */ + GLclampf tmp = 0.9f; + glPrioritizeTextures(1, &gl_tex->name, &tmp); + } + /* Initialise the state of the texture object to the OpenGL defaults, + * not the D3D defaults. */ + gl_tex->states[WINED3DTEXSTA_ADDRESSU] = WINED3DTADDRESS_WRAP; + gl_tex->states[WINED3DTEXSTA_ADDRESSV] = WINED3DTADDRESS_WRAP; + gl_tex->states[WINED3DTEXSTA_ADDRESSW] = WINED3DTADDRESS_WRAP; + gl_tex->states[WINED3DTEXSTA_BORDERCOLOR] = 0; + gl_tex->states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_LINEAR; + gl_tex->states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; /* GL_NEAREST_MIPMAP_LINEAR */ + gl_tex->states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_LINEAR; /* GL_NEAREST_MIPMAP_LINEAR */ + gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] = 0; + gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] = 1; + if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE] = TRUE; + else + gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE] = srgb; + gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE; + wined3d_texture_set_dirty(texture, TRUE); + new_texture = TRUE; + + if (texture->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP) + { + /* This means double binding the texture at creation, but keeps + * the code simpler all in all, and the run-time path free from + * additional checks. */ + glBindTexture(target, gl_tex->name); + checkGLcall("glBindTexture"); + glTexParameteri(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); + checkGLcall("glTexParameteri(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE)"); } } else { - TRACE("(%p) Texture not dirty, nothing to do.\n", iface); + *set_surface_desc = FALSE; } - if (context) context_release(context); + if (gl_tex->name) + { + glBindTexture(target, gl_tex->name); + checkGLcall("glBindTexture"); + if (new_texture) + { + /* For a new texture we have to set the texture levels after + * binding the texture. Beware that texture rectangles do not + * support mipmapping, but set the maxmiplevel if we're relying + * on the partial GL_ARB_texture_non_power_of_two emulation with + * texture rectangles. (I.e., do not care about cond_np2 here, + * just look for GL_TEXTURE_RECTANGLE_ARB.) */ + if (target != GL_TEXTURE_RECTANGLE_ARB) + { + TRACE("Setting GL_TEXTURE_MAX_LEVEL to %u.\n", texture->level_count - 1); + glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, texture->level_count - 1); + checkGLcall("glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, texture->level_count)"); + } + if (target == GL_TEXTURE_CUBE_MAP_ARB) + { + /* Cubemaps are always set to clamp, regardless of the sampler state. */ + glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + } + } + } + else + { + ERR("This texture doesn't have an OpenGL texture assigned to it.\n"); + hr = WINED3DERR_INVALIDCALL; + } - /* No longer dirty. */ - *dirty = FALSE; + LEAVE_GL(); + return hr; } -static void texture_cleanup(IWineD3DTextureImpl *This) +/* GL locking is done by the caller */ +static void apply_wrap(const struct wined3d_gl_info *gl_info, GLenum target, + WINED3DTEXTUREADDRESS d3d_wrap, GLenum param, BOOL cond_np2) { - unsigned int i; + GLint gl_wrap; - TRACE("(%p) : Cleaning up\n", This); - - for (i = 0; i < This->baseTexture.level_count; ++i) + if (d3d_wrap < WINED3DTADDRESS_WRAP || d3d_wrap > WINED3DTADDRESS_MIRRORONCE) { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - if (surface) + FIXME("Unrecognized or unsupported WINED3DTEXTUREADDRESS %#x.\n", d3d_wrap); + return; + } + + /* Cubemaps are always set to clamp, regardless of the sampler state. */ + if (target == GL_TEXTURE_CUBE_MAP_ARB + || (cond_np2 && d3d_wrap == WINED3DTADDRESS_WRAP)) + gl_wrap = GL_CLAMP_TO_EDGE; + else + gl_wrap = gl_info->wrap_lookup[d3d_wrap - WINED3DTADDRESS_WRAP]; + + TRACE("Setting param %#x to %#x for target %#x.\n", param, gl_wrap, target); + glTexParameteri(target, param, gl_wrap); + checkGLcall("glTexParameteri(target, param, gl_wrap)"); +} + +/* GL locking is done by the caller (state handler) */ +void wined3d_texture_apply_state_changes(struct wined3d_texture *texture, + const DWORD sampler_states[WINED3D_HIGHEST_SAMPLER_STATE + 1], + const struct wined3d_gl_info *gl_info) +{ + BOOL cond_np2 = texture->flags & WINED3D_TEXTURE_COND_NP2; + GLenum target = texture->target; + struct gl_texture *gl_tex; + DWORD state; + DWORD aniso; + + TRACE("texture %p, sampler_states %p.\n", texture, sampler_states); + + gl_tex = wined3d_texture_get_gl_texture(texture, gl_info, + texture->flags & WINED3D_TEXTURE_IS_SRGB); + + /* This function relies on the correct texture being bound and loaded. */ + + if (sampler_states[WINED3DSAMP_ADDRESSU] != gl_tex->states[WINED3DTEXSTA_ADDRESSU]) + { + state = sampler_states[WINED3DSAMP_ADDRESSU]; + apply_wrap(gl_info, target, state, GL_TEXTURE_WRAP_S, cond_np2); + gl_tex->states[WINED3DTEXSTA_ADDRESSU] = state; + } + + if (sampler_states[WINED3DSAMP_ADDRESSV] != gl_tex->states[WINED3DTEXSTA_ADDRESSV]) + { + state = sampler_states[WINED3DSAMP_ADDRESSV]; + apply_wrap(gl_info, target, state, GL_TEXTURE_WRAP_T, cond_np2); + gl_tex->states[WINED3DTEXSTA_ADDRESSV] = state; + } + + if (sampler_states[WINED3DSAMP_ADDRESSW] != gl_tex->states[WINED3DTEXSTA_ADDRESSW]) + { + state = sampler_states[WINED3DSAMP_ADDRESSW]; + apply_wrap(gl_info, target, state, GL_TEXTURE_WRAP_R, cond_np2); + gl_tex->states[WINED3DTEXSTA_ADDRESSW] = state; + } + + if (sampler_states[WINED3DSAMP_BORDERCOLOR] != gl_tex->states[WINED3DTEXSTA_BORDERCOLOR]) + { + float col[4]; + + state = sampler_states[WINED3DSAMP_BORDERCOLOR]; + D3DCOLORTOGLFLOAT4(state, col); + TRACE("Setting border color for %#x to %#x.\n", target, state); + glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, &col[0]); + checkGLcall("glTexParameterfv(..., GL_TEXTURE_BORDER_COLOR, ...)"); + gl_tex->states[WINED3DTEXSTA_BORDERCOLOR] = state; + } + + if (sampler_states[WINED3DSAMP_MAGFILTER] != gl_tex->states[WINED3DTEXSTA_MAGFILTER]) + { + GLint gl_value; + + state = sampler_states[WINED3DSAMP_MAGFILTER]; + if (state > WINED3DTEXF_ANISOTROPIC) + FIXME("Unrecognized or unsupported MAGFILTER* value %d.\n", state); + + gl_value = wined3d_gl_mag_filter(texture->mag_lookup, + min(max(state, WINED3DTEXF_POINT), WINED3DTEXF_LINEAR)); + TRACE("ValueMAG=%#x setting MAGFILTER to %#x.\n", state, gl_value); + glTexParameteri(target, GL_TEXTURE_MAG_FILTER, gl_value); + + gl_tex->states[WINED3DTEXSTA_MAGFILTER] = state; + } + + if ((sampler_states[WINED3DSAMP_MINFILTER] != gl_tex->states[WINED3DTEXSTA_MINFILTER] + || sampler_states[WINED3DSAMP_MIPFILTER] != gl_tex->states[WINED3DTEXSTA_MIPFILTER] + || sampler_states[WINED3DSAMP_MAXMIPLEVEL] != gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL])) + { + GLint gl_value; + + gl_tex->states[WINED3DTEXSTA_MIPFILTER] = sampler_states[WINED3DSAMP_MIPFILTER]; + gl_tex->states[WINED3DTEXSTA_MINFILTER] = sampler_states[WINED3DSAMP_MINFILTER]; + gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] = sampler_states[WINED3DSAMP_MAXMIPLEVEL]; + + if (gl_tex->states[WINED3DTEXSTA_MINFILTER] > WINED3DTEXF_ANISOTROPIC + || gl_tex->states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_ANISOTROPIC) { - /* Clean out the texture name we gave to the surface so that the - * surface doesn't try and release it */ - surface_set_texture_name(surface, 0, TRUE); - surface_set_texture_name(surface, 0, FALSE); - surface_set_texture_target(surface, 0); - surface_set_container(surface, WINED3D_CONTAINER_NONE, NULL); - IWineD3DSurface_Release((IWineD3DSurface *)surface); + FIXME("Unrecognized or unsupported D3DSAMP_MINFILTER value %#x D3DSAMP_MIPFILTER value %#x.\n", + gl_tex->states[WINED3DTEXSTA_MINFILTER], + gl_tex->states[WINED3DTEXSTA_MIPFILTER]); + } + gl_value = wined3d_gl_min_mip_filter(texture->min_mip_lookup, + min(max(sampler_states[WINED3DSAMP_MINFILTER], WINED3DTEXF_POINT), WINED3DTEXF_LINEAR), + min(max(sampler_states[WINED3DSAMP_MIPFILTER], WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)); + + TRACE("ValueMIN=%#x, ValueMIP=%#x, setting MINFILTER to %#x.\n", + sampler_states[WINED3DSAMP_MINFILTER], + sampler_states[WINED3DSAMP_MIPFILTER], gl_value); + glTexParameteri(target, GL_TEXTURE_MIN_FILTER, gl_value); + checkGLcall("glTexParameter GL_TEXTURE_MIN_FILTER, ..."); + + if (!cond_np2) + { + if (gl_tex->states[WINED3DTEXSTA_MIPFILTER] == WINED3DTEXF_NONE) + gl_value = texture->lod; + else if (gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] >= texture->level_count) + gl_value = texture->level_count - 1; + else if (gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL] < texture->lod) + /* texture->lod is already clamped in the setter. */ + gl_value = texture->lod; + else + gl_value = gl_tex->states[WINED3DTEXSTA_MAXMIPLEVEL]; + + /* Note that WINED3DSAMP_MAXMIPLEVEL specifies the largest mipmap + * (default 0), while GL_TEXTURE_MAX_LEVEL specifies the smallest + * mimap used (default 1000). So WINED3DSAMP_MAXMIPLEVEL + * corresponds to GL_TEXTURE_BASE_LEVEL. */ + glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, gl_value); } } - TRACE("(%p) : Cleaning up base texture\n", This); - basetexture_cleanup((IWineD3DBaseTexture *)This); -} + if ((gl_tex->states[WINED3DTEXSTA_MAGFILTER] != WINED3DTEXF_ANISOTROPIC + && gl_tex->states[WINED3DTEXSTA_MINFILTER] != WINED3DTEXF_ANISOTROPIC + && gl_tex->states[WINED3DTEXSTA_MIPFILTER] != WINED3DTEXF_ANISOTROPIC) + || cond_np2) + aniso = 1; + else + aniso = sampler_states[WINED3DSAMP_MAXANISOTROPY]; -/* ******************************************* - IWineD3DTexture IUnknown parts follow - ******************************************* */ - -static HRESULT WINAPI IWineD3DTextureImpl_QueryInterface(IWineD3DTexture *iface, REFIID riid, LPVOID *ppobj) -{ - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IWineD3DResource) - || IsEqualGUID(riid, &IID_IWineD3DBaseTexture) - || IsEqualGUID(riid, &IID_IWineD3DTexture)){ - IUnknown_AddRef(iface); - *ppobj = This; - return WINED3D_OK; - } - *ppobj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI IWineD3DTextureImpl_AddRef(IWineD3DTexture *iface) { - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref); - return InterlockedIncrement(&This->resource.ref); -} - -/* Do not call while under the GL lock. */ -static ULONG WINAPI IWineD3DTextureImpl_Release(IWineD3DTexture *iface) { - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - ULONG ref; - TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); - ref = InterlockedDecrement(&This->resource.ref); - if (!ref) + if (gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] != aniso) { - texture_cleanup(This); - This->resource.parent_ops->wined3d_object_destroyed(This->resource.parent); - HeapFree(GetProcessHeap(), 0, This); + if (gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC]) + { + glTexParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso); + checkGLcall("glTexParameteri(GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso)"); + } + else + { + WARN("Anisotropic filtering not supported.\n"); + } + gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] = aniso; } - return ref; -} - -/* **************************************************** - IWineD3DTexture IWineD3DResource parts follow - **************************************************** */ -static HRESULT WINAPI IWineD3DTextureImpl_SetPrivateData(IWineD3DTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags); -} - -static HRESULT WINAPI IWineD3DTextureImpl_GetPrivateData(IWineD3DTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData); -} - -static HRESULT WINAPI IWineD3DTextureImpl_FreePrivateData(IWineD3DTexture *iface, REFGUID refguid) { - return resource_free_private_data((IWineD3DResource *)iface, refguid); -} - -static DWORD WINAPI IWineD3DTextureImpl_SetPriority(IWineD3DTexture *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); -} - -static DWORD WINAPI IWineD3DTextureImpl_GetPriority(IWineD3DTexture *iface) { - return resource_get_priority((IWineD3DResource *)iface); -} - -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DTexture *iface) { - texture_internal_preload((IWineD3DBaseTexture *) iface, SRGB_ANY); -} - -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DTextureImpl_UnLoad(IWineD3DTexture *iface) { - unsigned int i; - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - TRACE("(%p)\n", This); - - /* Unload all the surfaces and reset the texture name. If UnLoad was called on the - * surface before, this one will be a NOP and vice versa. Unloading an unloaded - * surface is fine - */ - for (i = 0; i < This->baseTexture.level_count; ++i) + /* These should always be the same unless EXT_texture_sRGB_decode is supported. */ + if (sampler_states[WINED3DSAMP_SRGBTEXTURE] != gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE]) { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - IWineD3DSurface_UnLoad((IWineD3DSurface *)surface); - surface_set_texture_name(surface, 0, FALSE); /* Delete rgb name */ - surface_set_texture_name(surface, 0, TRUE); /* delete srgb name */ + glTexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, + sampler_states[WINED3DSAMP_SRGBTEXTURE] ? GL_DECODE_EXT : GL_SKIP_DECODE_EXT); + checkGLcall("glTexParameteri(GL_TEXTURE_SRGB_DECODE_EXT)"); } - basetexture_unload((IWineD3DBaseTexture *)iface); + if (!(texture->resource.format->flags & WINED3DFMT_FLAG_SHADOW) + != !gl_tex->states[WINED3DTEXSTA_SHADOW]) + { + if (texture->resource.format->flags & WINED3DFMT_FLAG_SHADOW) + { + glTexParameteri(target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE); + glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB); + checkGLcall("glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB)"); + gl_tex->states[WINED3DTEXSTA_SHADOW] = TRUE; + } + else + { + glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE); + checkGLcall("glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE)"); + gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE; + } + } } -static WINED3DRESOURCETYPE WINAPI IWineD3DTextureImpl_GetType(IWineD3DTexture *iface) { - return resource_get_type((IWineD3DResource *)iface); -} - -static void * WINAPI IWineD3DTextureImpl_GetParent(IWineD3DTexture *iface) +ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture) { - TRACE("iface %p.\n", iface); + ULONG refcount = InterlockedIncrement(&texture->resource.ref); - return ((IWineD3DTextureImpl *)iface)->resource.parent; + TRACE("%p increasing refcount to %u.\n", texture, refcount); + + return refcount; } -/* ****************************************************** - IWineD3DTexture IWineD3DBaseTexture parts follow - ****************************************************** */ -static DWORD WINAPI IWineD3DTextureImpl_SetLOD(IWineD3DTexture *iface, DWORD LODNew) { - return basetexture_set_lod((IWineD3DBaseTexture *)iface, LODNew); +/* Do not call while under the GL lock. */ +ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture) +{ + ULONG refcount = InterlockedDecrement(&texture->resource.ref); + + TRACE("%p decreasing refcount to %u.\n", texture, refcount); + + if (!refcount) + { + wined3d_texture_cleanup(texture); + texture->resource.parent_ops->wined3d_object_destroyed(texture->resource.parent); + HeapFree(GetProcessHeap(), 0, texture); + } + + return refcount; } -static DWORD WINAPI IWineD3DTextureImpl_GetLOD(IWineD3DTexture *iface) { - return basetexture_get_lod((IWineD3DBaseTexture *)iface); +HRESULT CDECL wined3d_texture_set_private_data(struct wined3d_texture *texture, + REFGUID guid, const void *data, DWORD data_size, DWORD flags) +{ + return resource_set_private_data(&texture->resource, guid, data, data_size, flags); } -static DWORD WINAPI IWineD3DTextureImpl_GetLevelCount(IWineD3DTexture *iface) { - return basetexture_get_level_count((IWineD3DBaseTexture *)iface); +HRESULT CDECL wined3d_texture_get_private_data(const struct wined3d_texture *texture, + REFGUID guid, void *data, DWORD *data_size) +{ + return resource_get_private_data(&texture->resource, guid, data, data_size); } -static HRESULT WINAPI IWineD3DTextureImpl_SetAutoGenFilterType(IWineD3DTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { - return basetexture_set_autogen_filter_type((IWineD3DBaseTexture *)iface, FilterType); +HRESULT CDECL wined3d_texture_free_private_data(struct wined3d_texture *texture, REFGUID guid) +{ + return resource_free_private_data(&texture->resource, guid); } -static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DTextureImpl_GetAutoGenFilterType(IWineD3DTexture *iface) { - return basetexture_get_autogen_filter_type((IWineD3DBaseTexture *)iface); +DWORD CDECL wined3d_texture_set_priority(struct wined3d_texture *texture, DWORD priority) +{ + return resource_set_priority(&texture->resource, priority); } -static void WINAPI IWineD3DTextureImpl_GenerateMipSubLevels(IWineD3DTexture *iface) { - basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface); +DWORD CDECL wined3d_texture_get_priority(const struct wined3d_texture *texture) +{ + return resource_get_priority(&texture->resource); } -/* Internal function, No d3d mapping */ -static BOOL WINAPI IWineD3DTextureImpl_SetDirty(IWineD3DTexture *iface, BOOL dirty) { - return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty); +/* Do not call while under the GL lock. */ +void CDECL wined3d_texture_preload(struct wined3d_texture *texture) +{ + texture->texture_ops->texture_preload(texture, SRGB_ANY); } -static BOOL WINAPI IWineD3DTextureImpl_GetDirty(IWineD3DTexture *iface) { - return basetexture_get_dirty((IWineD3DBaseTexture *)iface); +WINED3DRESOURCETYPE CDECL wined3d_texture_get_type(const struct wined3d_texture *texture) +{ + TRACE("texture %p.\n", texture); + + return texture->resource.resourceType; +} + +void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture) +{ + TRACE("texture %p.\n", texture); + + return texture->resource.parent; +} + +DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod) +{ + DWORD old = texture->lod; + + TRACE("texture %p, lod %u.\n", texture, lod); + + /* The d3d9:texture test shows that SetLOD is ignored on non-managed + * textures. The call always returns 0, and GetLOD always returns 0. */ + if (texture->resource.pool != WINED3DPOOL_MANAGED) + { + TRACE("Ignoring SetLOD on %s texture, returning 0.\n", debug_d3dpool(texture->resource.pool)); + return 0; + } + + if (lod >= texture->level_count) + lod = texture->level_count - 1; + + if (texture->lod != lod) + { + texture->lod = lod; + + texture->texture_rgb.states[WINED3DTEXSTA_MAXMIPLEVEL] = ~0U; + texture->texture_srgb.states[WINED3DTEXSTA_MAXMIPLEVEL] = ~0U; + if (texture->bind_count) + IWineD3DDeviceImpl_MarkStateDirty(texture->resource.device, STATE_SAMPLER(texture->sampler)); + } + + return old; +} + +DWORD CDECL wined3d_texture_get_lod(const struct wined3d_texture *texture) +{ + TRACE("texture %p, returning %u.\n", texture, texture->lod); + + return texture->lod; +} + +DWORD CDECL wined3d_texture_get_level_count(const struct wined3d_texture *texture) +{ + TRACE("texture %p, returning %u.\n", texture, texture->level_count); + + return texture->level_count; +} + +HRESULT CDECL wined3d_texture_set_autogen_filter_type(struct wined3d_texture *texture, + WINED3DTEXTUREFILTERTYPE filter_type) +{ + FIXME("texture %p, filter_type %s stub!\n", texture, debug_d3dtexturefiltertype(filter_type)); + + if (!(texture->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) + { + WARN("Texture doesn't have AUTOGENMIPMAP usage.\n"); + return WINED3DERR_INVALIDCALL; + } + + texture->filter_type = filter_type; + + return WINED3D_OK; +} + +WINED3DTEXTUREFILTERTYPE CDECL wined3d_texture_get_autogen_filter_type(const struct wined3d_texture *texture) +{ + TRACE("texture %p.\n", texture); + + return texture->filter_type; +} + +void CDECL wined3d_texture_generate_mipmaps(struct wined3d_texture *texture) +{ + /* TODO: Implement filters using GL_SGI_generate_mipmaps. */ + FIXME("texture %p stub!\n", texture); +} + +struct wined3d_resource * CDECL wined3d_texture_get_sub_resource(struct wined3d_texture *texture, + UINT sub_resource_idx) +{ + UINT sub_count = texture->level_count * texture->layer_count; + + TRACE("texture %p, sub_resource_idx %u.\n", texture, sub_resource_idx); + + if (sub_resource_idx >= sub_count) + { + WARN("sub_resource_idx %u >= sub_count %u.\n", sub_resource_idx, sub_count); + return NULL; + } + + return texture->sub_resources[sub_resource_idx]; +} + +HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, + UINT layer, const WINED3DBOX *dirty_region) +{ + struct wined3d_resource *sub_resource; + + TRACE("texture %p, layer %u, dirty_region %p.\n", texture, layer, dirty_region); + + if (!(sub_resource = wined3d_texture_get_sub_resource(texture, layer * texture->level_count))) + { + WARN("Failed to get sub-resource.\n"); + return WINED3DERR_INVALIDCALL; + } + + wined3d_texture_set_dirty(texture, TRUE); + texture->texture_ops->texture_sub_resource_add_dirty_region(sub_resource, dirty_region); + + return WINED3D_OK; } /* Context activation is done by the caller. */ -static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface, BOOL srgb) { - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; +static HRESULT texture2d_bind(struct wined3d_texture *texture, + const struct wined3d_gl_info *gl_info, BOOL srgb) +{ BOOL set_gl_texture_desc; HRESULT hr; - TRACE("(%p) : relay to BaseTexture\n", This); + TRACE("texture %p, gl_info %p, srgb %#x.\n", texture, gl_info, srgb); - hr = basetexture_bind((IWineD3DBaseTexture *)iface, srgb, &set_gl_texture_desc); - if (set_gl_texture_desc && SUCCEEDED(hr)) { - UINT i; + hr = wined3d_texture_bind(texture, gl_info, srgb, &set_gl_texture_desc); + if (set_gl_texture_desc && SUCCEEDED(hr)) + { + UINT sub_count = texture->level_count * texture->layer_count; + BOOL srgb_tex = !gl_info->supported[EXT_TEXTURE_SRGB_DECODE] + && (texture->flags & WINED3D_TEXTURE_IS_SRGB); struct gl_texture *gl_tex; + UINT i; - if(This->baseTexture.is_srgb) { - gl_tex = &This->baseTexture.texture_srgb; - } else { - gl_tex = &This->baseTexture.texture_rgb; - } + gl_tex = wined3d_texture_get_gl_texture(texture, gl_info, srgb_tex); - for (i = 0; i < This->baseTexture.level_count; ++i) + for (i = 0; i < sub_count; ++i) { - IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)This->baseTexture.sub_resources[i]; - surface_set_texture_name(surface, gl_tex->name, This->baseTexture.is_srgb); + struct wined3d_surface *surface = surface_from_resource(texture->sub_resources[i]); + surface_set_texture_name(surface, gl_tex->name, srgb_tex); } /* Conditinal non power of two textures use a different clamping @@ -301,9 +639,9 @@ static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface, BO * state. The same applies to filtering. Even if the texture has only * one mip level, the default LINEAR_MIPMAP_LINEAR filter causes a SW * fallback on macos. */ - if (IWineD3DBaseTexture_IsCondNP2(iface)) + if (texture->flags & WINED3D_TEXTURE_COND_NP2) { - GLenum target = This->baseTexture.target; + GLenum target = texture->target; ENTER_GL(); glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); @@ -326,147 +664,257 @@ static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface, BO return hr; } -static BOOL WINAPI IWineD3DTextureImpl_IsCondNP2(IWineD3DTexture *iface) { - IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; - TRACE("(%p)\n", This); +static BOOL texture_srgb_mode(struct wined3d_texture *texture, enum WINED3DSRGB srgb) +{ + switch (srgb) + { + case SRGB_RGB: + return FALSE; - return This->cond_np2; + case SRGB_SRGB: + return TRUE; + + default: + return texture->flags & WINED3D_TEXTURE_IS_SRGB; + } } -/* ******************************************* - IWineD3DTexture IWineD3DTexture parts follow - ******************************************* */ -static HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, UINT level, WINED3DSURFACE_DESC *desc) +/* Do not call while under the GL lock. */ +static void texture2d_preload(struct wined3d_texture *texture, enum WINED3DSRGB srgb) { - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *surface; + UINT sub_count = texture->level_count * texture->layer_count; + struct wined3d_device *device = texture->resource.device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + struct wined3d_context *context = NULL; + struct gl_texture *gl_tex; + BOOL srgb_mode; + UINT i; - TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); + TRACE("texture %p, srgb %#x.\n", texture, srgb); - if (!(surface = (IWineD3DSurface *)basetexture_get_sub_resource(texture, 0, level))) + srgb_mode = texture_srgb_mode(texture, srgb); + gl_tex = wined3d_texture_get_gl_texture(texture, gl_info, srgb_mode); + + if (!device->isInDraw) { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; + /* No danger of recursive calls, context_acquire() sets isInDraw to TRUE + * when loading offscreen render targets into the texture. */ + context = context_acquire(device, NULL); } - IWineD3DSurface_GetDesc(surface, desc); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DTextureImpl_GetSurfaceLevel(IWineD3DTexture *iface, - UINT level, IWineD3DSurface **surface) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *s; - - TRACE("iface %p, level %u, surface %p.\n", iface, level, surface); - - if (!(s = (IWineD3DSurface *)basetexture_get_sub_resource(texture, 0, level))) + if (texture->resource.format->id == WINED3DFMT_P8_UINT + || texture->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; + for (i = 0; i < sub_count; ++i) + { + struct wined3d_surface *surface = surface_from_resource(texture->sub_resources[i]); + + if (palette9_changed(surface)) + { + TRACE("Reloading surface %p because the d3d8/9 palette was changed.\n", surface); + /* TODO: This is not necessarily needed with hw palettized texture support. */ + surface_load_location(surface, SFLAG_INSYSMEM, NULL); + /* Make sure the texture is reloaded because of the palette + * change, this kills performance though :( */ + surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); + } + } } - IWineD3DSurface_AddRef(s); - *surface = s; - - TRACE("Returning surface %p.\n", *surface); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DTextureImpl_LockRect(IWineD3DTexture *iface, - UINT level, WINED3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *surface; - - TRACE("iface %p, level %u, locked_rect %p, rect %s, flags %#x.\n", - iface, level, locked_rect, wine_dbgstr_rect(rect), flags); - - if (!(surface = (IWineD3DSurface *)basetexture_get_sub_resource(texture, 0, level))) + if (gl_tex->dirty) { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; + /* Reload the surfaces if the texture is marked dirty. */ + for (i = 0; i < sub_count; ++i) + { + surface_load(surface_from_resource(texture->sub_resources[i]), srgb_mode); + } + } + else + { + TRACE("Texture %p not dirty, nothing to do.\n", texture); } - return IWineD3DSurface_LockRect(surface, locked_rect, rect, flags); + /* No longer dirty. */ + gl_tex->dirty = FALSE; + + if (context) context_release(context); } -static HRESULT WINAPI IWineD3DTextureImpl_UnlockRect(IWineD3DTexture *iface, UINT level) +static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub_resource, + const WINED3DBOX *dirty_region) { - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurface *surface; + surface_add_dirty_rect(surface_from_resource(sub_resource), dirty_region); +} - TRACE("iface %p, level %u.\n", iface, level); +static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource) +{ + struct wined3d_surface *surface = surface_from_resource(sub_resource); - if (!(surface = (IWineD3DSurface *)basetexture_get_sub_resource(texture, 0, level))) + /* Clean out the texture name we gave to the surface so that the + * surface doesn't try and release it. */ + surface_set_texture_name(surface, 0, TRUE); + surface_set_texture_name(surface, 0, FALSE); + surface_set_texture_target(surface, 0); + surface_set_container(surface, WINED3D_CONTAINER_NONE, NULL); + wined3d_surface_decref(surface); +} + +/* Do not call while under the GL lock. */ +static void texture2d_unload(struct wined3d_resource *resource) +{ + struct wined3d_texture *texture = wined3d_texture_from_resource(resource); + UINT sub_count = texture->level_count * texture->layer_count; + UINT i; + + TRACE("texture %p.\n", texture); + + for (i = 0; i < sub_count; ++i) { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; + struct wined3d_resource *sub_resource = texture->sub_resources[i]; + struct wined3d_surface *surface = surface_from_resource(sub_resource); + + sub_resource->resource_ops->resource_unload(sub_resource); + surface_set_texture_name(surface, 0, FALSE); /* Delete RGB name */ + surface_set_texture_name(surface, 0, TRUE); /* Delete sRGB name */ } - return IWineD3DSurface_UnlockRect(surface); + wined3d_texture_unload(texture); } -static HRESULT WINAPI IWineD3DTextureImpl_AddDirtyRect(IWineD3DTexture *iface, const RECT *dirty_rect) +static const struct wined3d_texture_ops texture2d_ops = { - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DSurfaceImpl *surface; - - TRACE("iface %p, dirty_rect %s.\n", iface, wine_dbgstr_rect(dirty_rect)); - - if (!(surface = (IWineD3DSurfaceImpl *)basetexture_get_sub_resource(texture, 0, 0))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - texture->baseTexture.texture_rgb.dirty = TRUE; - texture->baseTexture.texture_srgb.dirty = TRUE; - surface_add_dirty_rect(surface, dirty_rect); - - return WINED3D_OK; -} - -static const IWineD3DTextureVtbl IWineD3DTexture_Vtbl = -{ - /* IUnknown */ - IWineD3DTextureImpl_QueryInterface, - IWineD3DTextureImpl_AddRef, - IWineD3DTextureImpl_Release, - /* IWineD3DResource */ - IWineD3DTextureImpl_GetParent, - IWineD3DTextureImpl_SetPrivateData, - IWineD3DTextureImpl_GetPrivateData, - IWineD3DTextureImpl_FreePrivateData, - IWineD3DTextureImpl_SetPriority, - IWineD3DTextureImpl_GetPriority, - IWineD3DTextureImpl_PreLoad, - IWineD3DTextureImpl_UnLoad, - IWineD3DTextureImpl_GetType, - /* IWineD3DBaseTexture */ - IWineD3DTextureImpl_SetLOD, - IWineD3DTextureImpl_GetLOD, - IWineD3DTextureImpl_GetLevelCount, - IWineD3DTextureImpl_SetAutoGenFilterType, - IWineD3DTextureImpl_GetAutoGenFilterType, - IWineD3DTextureImpl_GenerateMipSubLevels, - IWineD3DTextureImpl_SetDirty, - IWineD3DTextureImpl_GetDirty, - IWineD3DTextureImpl_BindTexture, - IWineD3DTextureImpl_IsCondNP2, - /* IWineD3DTexture */ - IWineD3DTextureImpl_GetLevelDesc, - IWineD3DTextureImpl_GetSurfaceLevel, - IWineD3DTextureImpl_LockRect, - IWineD3DTextureImpl_UnlockRect, - IWineD3DTextureImpl_AddDirtyRect + texture2d_bind, + texture2d_preload, + texture2d_sub_resource_add_dirty_region, + texture2d_sub_resource_cleanup, }; -HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels, - IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, +static const struct wined3d_resource_ops texture2d_resource_ops = +{ + texture2d_unload, +}; + +static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_length, UINT levels, + struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, + void *parent, const struct wined3d_parent_ops *parent_ops) +{ + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); + UINT pow2_edge_length; + unsigned int i, j; + UINT tmp_w; + HRESULT hr; + + /* TODO: It should only be possible to create textures for formats + * that are reported as supported. */ + if (WINED3DFMT_UNKNOWN >= format_id) + { + WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); + return WINED3DERR_INVALIDCALL; + } + + if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP] && pool != WINED3DPOOL_SCRATCH) + { + WARN("(%p) : Tried to create not supported cube texture.\n", texture); + return WINED3DERR_INVALIDCALL; + } + + /* Calculate levels for mip mapping */ + if (usage & WINED3DUSAGE_AUTOGENMIPMAP) + { + if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) + { + WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); + return WINED3DERR_INVALIDCALL; + } + + if (levels > 1) + { + WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL.\n"); + return WINED3DERR_INVALIDCALL; + } + + levels = 1; + } + else if (!levels) + { + levels = wined3d_log2i(edge_length) + 1; + TRACE("Calculated levels = %u.\n", levels); + } + + hr = wined3d_texture_init(texture, &texture2d_ops, 6, levels, + WINED3DRTYPE_CUBETEXTURE, device, usage, format, pool, + parent, parent_ops, &texture2d_resource_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize texture, returning %#x\n", hr); + return hr; + } + + /* Find the nearest pow2 match. */ + pow2_edge_length = 1; + while (pow2_edge_length < edge_length) pow2_edge_length <<= 1; + + if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || (edge_length == pow2_edge_length)) + { + /* Precalculated scaling for 'faked' non power of two texture coords. */ + texture->pow2_matrix[0] = 1.0f; + texture->pow2_matrix[5] = 1.0f; + texture->pow2_matrix[10] = 1.0f; + texture->pow2_matrix[15] = 1.0f; + } + else + { + /* Precalculated scaling for 'faked' non power of two texture coords. */ + texture->pow2_matrix[0] = ((float)edge_length) / ((float)pow2_edge_length); + texture->pow2_matrix[5] = ((float)edge_length) / ((float)pow2_edge_length); + texture->pow2_matrix[10] = ((float)edge_length) / ((float)pow2_edge_length); + texture->pow2_matrix[15] = 1.0f; + texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; + } + texture->target = GL_TEXTURE_CUBE_MAP_ARB; + + /* Generate all the surfaces. */ + tmp_w = edge_length; + for (i = 0; i < texture->level_count; ++i) + { + /* Create the 6 faces. */ + for (j = 0; j < 6; ++j) + { + static const GLenum cube_targets[6] = + { + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, + }; + UINT idx = j * texture->level_count + i; + struct wined3d_surface *surface; + + hr = device->device_parent->ops->create_surface(device->device_parent, parent, tmp_w, tmp_w, + format_id, usage, pool, i /* Level */, j, &surface); + if (FAILED(hr)) + { + FIXME("(%p) Failed to create surface, hr %#x.\n", texture, hr); + wined3d_texture_cleanup(texture); + return hr; + } + + surface_set_container(surface, WINED3D_CONTAINER_TEXTURE, texture); + surface_set_texture_target(surface, cube_targets[j]); + texture->sub_resources[idx] = &surface->resource; + TRACE("Created surface level %u @ %p.\n", i, surface); + } + tmp_w = max(1, tmp_w >> 1); + } + + return WINED3D_OK; +} + +static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT height, UINT levels, + struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; @@ -531,13 +979,12 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT TRACE("Calculated levels = %u.\n", levels); } - texture->lpVtbl = &IWineD3DTexture_Vtbl; - - hr = basetexture_init((IWineD3DBaseTextureImpl *)texture, 1, levels, - WINED3DRTYPE_TEXTURE, device, 0, usage, format, pool, parent, parent_ops); + hr = wined3d_texture_init(texture, &texture2d_ops, 1, levels, + WINED3DRTYPE_TEXTURE, device, usage, format, pool, + parent, parent_ops, &texture2d_resource_ops); if (FAILED(hr)) { - WARN("Failed to initialize basetexture, returning %#x.\n", hr); + WARN("Failed to initialize texture, returning %#x.\n", hr); return hr; } @@ -547,83 +994,395 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT * doesn't work in combination with ARB_TEXTURE_RECTANGLE. */ if (gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT] && (width != pow2_width || height != pow2_height)) { - texture->baseTexture.pow2Matrix[0] = 1.0f; - texture->baseTexture.pow2Matrix[5] = 1.0f; - texture->baseTexture.pow2Matrix[10] = 1.0f; - texture->baseTexture.pow2Matrix[15] = 1.0f; - texture->baseTexture.target = GL_TEXTURE_2D; - texture->cond_np2 = TRUE; - texture->baseTexture.minMipLookup = minMipLookup_noFilter; + texture->pow2_matrix[0] = 1.0f; + texture->pow2_matrix[5] = 1.0f; + texture->pow2_matrix[10] = 1.0f; + texture->pow2_matrix[15] = 1.0f; + texture->target = GL_TEXTURE_2D; + texture->flags |= WINED3D_TEXTURE_COND_NP2; + texture->min_mip_lookup = minMipLookup_noFilter; } else if (gl_info->supported[ARB_TEXTURE_RECTANGLE] && (width != pow2_width || height != pow2_height) && !(format->id == WINED3DFMT_P8_UINT && gl_info->supported[EXT_PALETTED_TEXTURE] && wined3d_settings.rendertargetlock_mode == RTL_READTEX)) { - if ((width != 1) || (height != 1)) texture->baseTexture.pow2Matrix_identity = FALSE; + if (width != 1 || height != 1) + texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; - texture->baseTexture.pow2Matrix[0] = (float)width; - texture->baseTexture.pow2Matrix[5] = (float)height; - texture->baseTexture.pow2Matrix[10] = 1.0f; - texture->baseTexture.pow2Matrix[15] = 1.0f; - texture->baseTexture.target = GL_TEXTURE_RECTANGLE_ARB; - texture->cond_np2 = TRUE; + texture->pow2_matrix[0] = (float)width; + texture->pow2_matrix[5] = (float)height; + texture->pow2_matrix[10] = 1.0f; + texture->pow2_matrix[15] = 1.0f; + texture->target = GL_TEXTURE_RECTANGLE_ARB; + texture->flags |= WINED3D_TEXTURE_COND_NP2; - if(texture->resource.format->Flags & WINED3DFMT_FLAG_FILTERING) - { - texture->baseTexture.minMipLookup = minMipLookup_noMip; - } + if (texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING) + texture->min_mip_lookup = minMipLookup_noMip; else - { - texture->baseTexture.minMipLookup = minMipLookup_noFilter; - } + texture->min_mip_lookup = minMipLookup_noFilter; } else { if ((width != pow2_width) || (height != pow2_height)) { - texture->baseTexture.pow2Matrix_identity = FALSE; - texture->baseTexture.pow2Matrix[0] = (((float)width) / ((float)pow2_width)); - texture->baseTexture.pow2Matrix[5] = (((float)height) / ((float)pow2_height)); + texture->pow2_matrix[0] = (((float)width) / ((float)pow2_width)); + texture->pow2_matrix[5] = (((float)height) / ((float)pow2_height)); + texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; } else { - texture->baseTexture.pow2Matrix[0] = 1.0f; - texture->baseTexture.pow2Matrix[5] = 1.0f; + texture->pow2_matrix[0] = 1.0f; + texture->pow2_matrix[5] = 1.0f; } - texture->baseTexture.pow2Matrix[10] = 1.0f; - texture->baseTexture.pow2Matrix[15] = 1.0f; - texture->baseTexture.target = GL_TEXTURE_2D; - texture->cond_np2 = FALSE; + texture->pow2_matrix[10] = 1.0f; + texture->pow2_matrix[15] = 1.0f; + texture->target = GL_TEXTURE_2D; } - TRACE("xf(%f) yf(%f)\n", texture->baseTexture.pow2Matrix[0], texture->baseTexture.pow2Matrix[5]); + TRACE("xf(%f) yf(%f)\n", texture->pow2_matrix[0], texture->pow2_matrix[5]); /* Generate all the surfaces. */ tmp_w = width; tmp_h = height; - for (i = 0; i < texture->baseTexture.level_count; ++i) + for (i = 0; i < texture->level_count; ++i) { - IWineD3DSurface *surface; + struct wined3d_surface *surface; /* Use the callback to create the texture surface. */ - hr = IWineD3DDeviceParent_CreateSurface(device->device_parent, parent, tmp_w, tmp_h, + hr = device->device_parent->ops->create_surface(device->device_parent, parent, tmp_w, tmp_h, format->id, usage, pool, i, 0, &surface); if (FAILED(hr)) { FIXME("Failed to create surface %p, hr %#x\n", texture, hr); - texture_cleanup(texture); + wined3d_texture_cleanup(texture); return hr; } - surface_set_container((IWineD3DSurfaceImpl *)surface, WINED3D_CONTAINER_TEXTURE, (IWineD3DBase *)texture); - surface_set_texture_target((IWineD3DSurfaceImpl *)surface, texture->baseTexture.target); - texture->baseTexture.sub_resources[i] = (IWineD3DResourceImpl *)surface; + surface_set_container(surface, WINED3D_CONTAINER_TEXTURE, texture); + surface_set_texture_target(surface, texture->target); + texture->sub_resources[i] = &surface->resource; TRACE("Created surface level %u @ %p.\n", i, surface); /* Calculate the next mipmap level. */ tmp_w = max(1, tmp_w >> 1); tmp_h = max(1, tmp_h >> 1); } - texture->baseTexture.internal_preload = texture_internal_preload; + + return WINED3D_OK; +} + +/* Context activation is done by the caller. */ +static HRESULT texture3d_bind(struct wined3d_texture *texture, + const struct wined3d_gl_info *gl_info, BOOL srgb) +{ + BOOL dummy; + + TRACE("texture %p, gl_info %p, srgb %#x.\n", texture, gl_info, srgb); + + return wined3d_texture_bind(texture, gl_info, srgb, &dummy); +} + +/* Do not call while under the GL lock. */ +static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB srgb) +{ + struct wined3d_device *device = texture->resource.device; + struct wined3d_context *context = NULL; + BOOL srgb_was_toggled = FALSE; + unsigned int i; + + TRACE("texture %p, srgb %#x.\n", texture, srgb); + + if (!device->isInDraw) + context = context_acquire(device, NULL); + else if (texture->bind_count > 0) + { + BOOL texture_srgb = texture->flags & WINED3D_TEXTURE_IS_SRGB; + BOOL sampler_srgb = texture_srgb_mode(texture, srgb); + srgb_was_toggled = !texture_srgb != !sampler_srgb; + + if (srgb_was_toggled) + { + if (sampler_srgb) + texture->flags |= WINED3D_TEXTURE_IS_SRGB; + else + texture->flags &= ~WINED3D_TEXTURE_IS_SRGB; + } + } + + /* If the texture is marked dirty or the sRGB sampler setting has changed + * since the last load then reload the volumes. */ + if (texture->texture_rgb.dirty) + { + for (i = 0; i < texture->level_count; ++i) + { + volume_load(volume_from_resource(texture->sub_resources[i]), i, + texture->flags & WINED3D_TEXTURE_IS_SRGB); + } + } + else if (srgb_was_toggled) + { + for (i = 0; i < texture->level_count; ++i) + { + struct wined3d_volume *volume = volume_from_resource(texture->sub_resources[i]); + volume_add_dirty_box(volume, NULL); + volume_load(volume, i, texture->flags & WINED3D_TEXTURE_IS_SRGB); + } + } + else + { + TRACE("Texture %p not dirty, nothing to do.\n", texture); + } + + if (context) + context_release(context); + + /* No longer dirty */ + texture->texture_rgb.dirty = FALSE; +} + +static void texture3d_sub_resource_add_dirty_region(struct wined3d_resource *sub_resource, + const WINED3DBOX *dirty_region) +{ + volume_add_dirty_box(volume_from_resource(sub_resource), dirty_region); +} + +static void texture3d_sub_resource_cleanup(struct wined3d_resource *sub_resource) +{ + struct wined3d_volume *volume = volume_from_resource(sub_resource); + + /* Cleanup the container. */ + volume_set_container(volume, NULL); + wined3d_volume_decref(volume); +} + +/* Do not call while under the GL lock. */ +static void texture3d_unload(struct wined3d_resource *resource) +{ + struct wined3d_texture *texture = wined3d_texture_from_resource(resource); + UINT i; + + TRACE("texture %p.\n", texture); + + for (i = 0; i < texture->level_count; ++i) + { + struct wined3d_resource *sub_resource = texture->sub_resources[i]; + sub_resource->resource_ops->resource_unload(sub_resource); + } + + wined3d_texture_unload(texture); +} + +static const struct wined3d_texture_ops texture3d_ops = +{ + texture3d_bind, + texture3d_preload, + texture3d_sub_resource_add_dirty_region, + texture3d_sub_resource_cleanup, +}; + +static const struct wined3d_resource_ops texture3d_resource_ops = +{ + texture3d_unload, +}; + +static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, UINT height, + UINT depth, UINT levels, struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, + WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) +{ + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); + UINT tmp_w, tmp_h, tmp_d; + unsigned int i; + HRESULT hr; + + /* TODO: It should only be possible to create textures for formats + * that are reported as supported. */ + if (WINED3DFMT_UNKNOWN >= format_id) + { + WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); + return WINED3DERR_INVALIDCALL; + } + + if (!gl_info->supported[EXT_TEXTURE3D]) + { + WARN("(%p) : Texture cannot be created - no volume texture support.\n", texture); + return WINED3DERR_INVALIDCALL; + } + + /* Calculate levels for mip mapping. */ + if (usage & WINED3DUSAGE_AUTOGENMIPMAP) + { + if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) + { + WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); + return WINED3DERR_INVALIDCALL; + } + + if (levels > 1) + { + WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL.\n"); + return WINED3DERR_INVALIDCALL; + } + + levels = 1; + } + else if (!levels) + { + levels = wined3d_log2i(max(max(width, height), depth)) + 1; + TRACE("Calculated levels = %u.\n", levels); + } + + hr = wined3d_texture_init(texture, &texture3d_ops, 1, levels, + WINED3DRTYPE_VOLUMETEXTURE, device, usage, format, pool, + parent, parent_ops, &texture3d_resource_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize texture, returning %#x.\n", hr); + return hr; + } + + /* Is NP2 support for volumes needed? */ + texture->pow2_matrix[0] = 1.0f; + texture->pow2_matrix[5] = 1.0f; + texture->pow2_matrix[10] = 1.0f; + texture->pow2_matrix[15] = 1.0f; + texture->target = GL_TEXTURE_3D; + + /* Generate all the surfaces. */ + tmp_w = width; + tmp_h = height; + tmp_d = depth; + + for (i = 0; i < texture->level_count; ++i) + { + struct wined3d_volume *volume; + + /* Create the volume. */ + hr = device->device_parent->ops->create_volume(device->device_parent, parent, + tmp_w, tmp_h, tmp_d, format_id, pool, usage, &volume); + if (FAILED(hr)) + { + ERR("Creating a volume for the volume texture failed, hr %#x.\n", hr); + wined3d_texture_cleanup(texture); + return hr; + } + + /* Set its container to this texture. */ + volume_set_container(volume, texture); + texture->sub_resources[i] = &volume->resource; + + /* Calculate the next mipmap level. */ + tmp_w = max(1, tmp_w >> 1); + tmp_h = max(1, tmp_h >> 1); + tmp_d = max(1, tmp_d >> 1); + } + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, UINT width, UINT height, + UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture) +{ + struct wined3d_texture *object; + HRESULT hr; + + TRACE("device %p, width %u, height %u, level_count %u, usage %#x\n", + device, width, height, level_count, usage); + TRACE("format %s, pool %#x, parent %p, parent_ops %p, texture %p.\n", + debug_d3dformat(format_id), pool, parent, parent_ops, texture); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Out of memory.\n"); + *texture = NULL; + return WINED3DERR_OUTOFVIDEOMEMORY; + } + + hr = texture_init(object, width, height, level_count, + device, usage, format_id, pool, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize texture, returning %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + *texture = NULL; + return hr; + } + + TRACE("Created texture %p.\n", object); + *texture = object; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, UINT width, UINT height, UINT depth, + UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture) +{ + struct wined3d_texture *object; + HRESULT hr; + + TRACE("device %p, width %u, height %u, depth %u, level_count %u, usage %#x\n", + device, width, height, depth, level_count, usage); + TRACE("format %s, pool %#x, parent %p, parent_ops %p, texture %p.\n", + debug_d3dformat(format_id), pool, parent, parent_ops, texture); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Out of memory\n"); + *texture = NULL; + return WINED3DERR_OUTOFVIDEOMEMORY; + } + + hr = volumetexture_init(object, width, height, depth, level_count, + device, usage, format_id, pool, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize volumetexture, returning %#x\n", hr); + HeapFree(GetProcessHeap(), 0, object); + *texture = NULL; + return hr; + } + + TRACE("Created texture %p.\n", object); + *texture = object; + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_texture_create_cube(struct wined3d_device *device, UINT edge_length, + UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture) +{ + struct wined3d_texture *object; + HRESULT hr; + + TRACE("device %p, edge_length %u, level_count %u, usage %#x\n", + device, edge_length, level_count, usage); + TRACE("format %s, pool %#x, parent %p, parent_ops %p, texture %p.\n", + debug_d3dformat(format_id), pool, parent, parent_ops, texture); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Out of memory\n"); + *texture = NULL; + return WINED3DERR_OUTOFVIDEOMEMORY; + } + + hr = cubetexture_init(object, edge_length, level_count, + device, usage, format_id, pool, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize cubetexture, returning %#x\n", hr); + HeapFree(GetProcessHeap(), 0, object); + *texture = NULL; + return hr; + } + + TRACE("Created texture %p.\n", object); + *texture = object; return WINED3D_OK; } diff --git a/dll/directx/wine/wined3d/utils.c b/dll/directx/wine/wined3d/utils.c index 2957c5a3e4e..25c0512ccc0 100644 --- a/dll/directx/wine/wined3d/utils.c +++ b/dll/directx/wine/wined3d/utils.c @@ -7,7 +7,7 @@ * Copyright 2005 Oliver Stieber * Copyright 2006-2008 Henri Verbeet * Copyright 2007-2008 Stefan Dösinger for CodeWeavers - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2010 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -34,7 +34,7 @@ struct StaticPixelFormatDesc enum wined3d_format_id id; DWORD alphaMask, redMask, greenMask, blueMask; UINT bpp; - short depthSize, stencilSize; + BYTE depthSize, stencilSize; }; /***************************************************************************** @@ -130,8 +130,10 @@ static const struct StaticPixelFormatDesc formats[] = /* Vendor-specific formats */ {WINED3DFMT_ATI2N, 0x0, 0x0, 0x0, 0x0, 1, 0, 0}, {WINED3DFMT_NVDB, 0x0, 0x0, 0x0, 0x0, 0, 0, 0}, + {WINED3DFMT_INTZ, 0x0, 0x0, 0x0, 0x0, 4, 24, 8}, {WINED3DFMT_NVHU, 0x0, 0x0, 0x0, 0x0, 2, 0, 0}, {WINED3DFMT_NVHS, 0x0, 0x0, 0x0, 0x0, 2, 0, 0}, + {WINED3DFMT_NULL, 0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0}, }; struct wined3d_format_base_flags @@ -156,6 +158,8 @@ static const struct wined3d_format_base_flags format_base_flags[] = {WINED3DFMT_MULTI2_ARGB8, WINED3DFMT_FLAG_FOURCC}, {WINED3DFMT_G8R8_G8B8, WINED3DFMT_FLAG_FOURCC}, {WINED3DFMT_R8G8_B8G8, WINED3DFMT_FLAG_FOURCC}, + {WINED3DFMT_INTZ, WINED3DFMT_FLAG_FOURCC}, + {WINED3DFMT_NULL, WINED3DFMT_FLAG_FOURCC}, {WINED3DFMT_P8_UINT, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_B8G8R8_UNORM, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_FLAG_GETDC}, @@ -342,10 +346,10 @@ static void convert_r8g8_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT widt Dest = dst + y * outpitch; for (x = 0; x < width; x++ ) { - LONG color = (*Source++); + const short color = (*Source++); /* B */ Dest[0] = 0xff; /* G */ Dest[1] = (color >> 8) + 128; /* V */ - /* R */ Dest[2] = (color) + 128; /* U */ + /* R */ Dest[2] = (color & 0xff) + 128; /* U */ Dest += 3; } } @@ -436,10 +440,10 @@ static void convert_r16g16_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT wi Dest = (unsigned short *) (dst + y * outpitch); for (x = 0; x < width; x++ ) { - DWORD color = (*Source++); + const DWORD color = (*Source++); /* B */ Dest[0] = 0xffff; /* G */ Dest[1] = (color >> 16) + 32768; /* V */ - /* R */ Dest[2] = (color ) + 32768; /* U */ + /* R */ Dest[2] = (color & 0xffff) + 32768; /* U */ Dest += 3; } } @@ -856,6 +860,20 @@ static const struct wined3d_format_texture_info format_texture_info[] = GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 0, WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, ARB_TEXTURE_COMPRESSION_RGTC, NULL}, + {WINED3DFMT_INTZ, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, + GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, + WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH + | WINED3DFMT_FLAG_STENCIL, + EXT_PACKED_DEPTH_STENCIL, NULL}, + {WINED3DFMT_INTZ, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, + GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0, + WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH + | WINED3DFMT_FLAG_STENCIL, + ARB_FRAMEBUFFER_OBJECT, NULL}, + {WINED3DFMT_NULL, GL_RGBA8, GL_RGBA8, 0, + GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0, + WINED3DFMT_FLAG_RENDERTARGET, + ARB_FRAMEBUFFER_OBJECT, NULL}, }; static inline int getFmtIdx(enum wined3d_format_id format_id) @@ -916,7 +934,7 @@ static BOOL init_format_base_info(struct wined3d_gl_info *gl_info) return FALSE; } - gl_info->formats[fmt_idx].Flags |= format_base_flags[i].flags; + gl_info->formats[fmt_idx].flags |= format_base_flags[i].flags; } return TRUE; @@ -942,7 +960,7 @@ static BOOL init_format_compression_info(struct wined3d_gl_info *gl_info) format->block_width = format_compression_info[i].block_width; format->block_height = format_compression_info[i].block_height; format->block_byte_count = format_compression_info[i].block_byte_count; - format->Flags |= WINED3DFMT_FLAG_COMPRESSED; + format->flags |= WINED3DFMT_FLAG_COMPRESSED; } return TRUE; @@ -978,18 +996,18 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined if (status == GL_FRAMEBUFFER_COMPLETE) { TRACE("Format %s is supported as FBO color attachment.\n", debug_d3dformat(format->id)); - format->Flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE; + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE; format->rtInternal = format->glInternal; } else { if (!format->rtInternal) { - if (format->Flags & WINED3DFMT_FLAG_RENDERTARGET) + if (format->flags & WINED3DFMT_FLAG_RENDERTARGET) { FIXME("Format %s with rendertarget flag is not supported as FBO color attachment," " and no fallback specified.\n", debug_d3dformat(format->id)); - format->Flags &= ~WINED3DFMT_FLAG_RENDERTARGET; + format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET; } else { @@ -1024,12 +1042,12 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined { FIXME("Format %s rtInternal format is not supported as FBO color attachment.\n", debug_d3dformat(format->id)); - format->Flags &= ~WINED3DFMT_FLAG_RENDERTARGET; + format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET; } } } - if (status == GL_FRAMEBUFFER_COMPLETE && format->Flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) + if (status == GL_FRAMEBUFFER_COMPLETE && format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) { GLuint rb; @@ -1050,7 +1068,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined { while(glGetError()); TRACE("Format doesn't support post-pixelshader blending.\n"); - format->Flags &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING; + format->flags &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING; } if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT] @@ -1074,7 +1092,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined if (status == GL_FRAMEBUFFER_COMPLETE) { TRACE("Format %s's sRGB format is FBO attachable.\n", debug_d3dformat(format->id)); - format->Flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB; + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB; } else { @@ -1109,14 +1127,14 @@ static void init_format_fbo_compat_info(struct wined3d_gl_info *gl_info) if (!format->glInternal) continue; - if (format->Flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) + if (format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) { TRACE("Skipping format %s because it's a depth/stencil format.\n", debug_d3dformat(format->id)); continue; } - if (format->Flags & WINED3DFMT_FLAG_COMPRESSED) + if (format->flags & WINED3DFMT_FLAG_COMPRESSED) { TRACE("Skipping format %s because it's a compressed format.\n", debug_d3dformat(format->id)); @@ -1163,15 +1181,36 @@ static BOOL init_format_texture_info(struct wined3d_gl_info *gl_info) if (!gl_info->supported[format_texture_info[i].extension]) continue; format = &gl_info->formats[fmt_idx]; + + /* ARB_texture_rg defines floating point formats, but only if + * ARB_texture_float is also supported. */ + if (!gl_info->supported[ARB_TEXTURE_FLOAT] + && (format->flags & WINED3DFMT_FLAG_FLOAT)) + continue; + format->glInternal = format_texture_info[i].gl_internal; format->glGammaInternal = format_texture_info[i].gl_srgb_internal; format->rtInternal = format_texture_info[i].gl_rt_internal; format->glFormat = format_texture_info[i].gl_format; format->glType = format_texture_info[i].gl_type; format->color_fixup = COLOR_FIXUP_IDENTITY; - format->Flags |= format_texture_info[i].flags; + format->flags |= format_texture_info[i].flags; format->heightscale = 1.0f; + if (format->glGammaInternal != format->glInternal) + { + /* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */ + if (!gl_info->supported[EXT_TEXTURE_SRGB]) + { + format->glGammaInternal = format->glInternal; + format->flags &= ~(WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE); + } + else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + format->glInternal = format->glGammaInternal; + } + } + /* Texture conversion stuff */ format->convert = format_texture_info[i].convert; format->conv_byte_count = format_texture_info[i].conv_byte_count; @@ -1326,7 +1365,7 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3 for(i = 0; i < (sizeof(fmts16) / sizeof(*fmts16)); i++) { fmt_idx = getFmtIdx(fmts16[i]); - gl_info->formats[fmt_idx].Flags |= WINED3DFMT_FLAG_FILTERING; + gl_info->formats[fmt_idx].flags |= WINED3DFMT_FLAG_FILTERING; } } return; @@ -1342,7 +1381,7 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3 if(filtered) { TRACE("Format %s supports filtering\n", debug_d3dformat(fmts16[i])); - format->Flags |= WINED3DFMT_FLAG_FILTERING; + format->flags |= WINED3DFMT_FLAG_FILTERING; } else { @@ -1565,7 +1604,7 @@ UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT ali { size = 0; } - else if (format->Flags & WINED3DFMT_FLAG_COMPRESSED) + else if (format->flags & WINED3DFMT_FLAG_COMPRESSED) { UINT row_block_count = (width + format->block_width - 1) / format->block_width; UINT row_count = (height + format->block_height - 1) / format->block_height; @@ -1576,7 +1615,11 @@ UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT ali size = height * (((width * format->byte_count) + alignment - 1) & ~(alignment - 1)); } - if (format->heightscale != 0.0f) size *= format->heightscale; + if (format->heightscale != 0.0f) + { + /* The D3D format requirements make sure that the resulting format is an integer again */ + size = (UINT) (size * format->heightscale); + } return size; } @@ -1720,6 +1763,8 @@ const char *debug_d3dformat(enum wined3d_format_id format_id) FMT_TO_STR(WINED3DFMT_B5G5R5A1_UNORM); FMT_TO_STR(WINED3DFMT_B8G8R8A8_UNORM); FMT_TO_STR(WINED3DFMT_B8G8R8X8_UNORM); + FMT_TO_STR(WINED3DFMT_INTZ); + FMT_TO_STR(WINED3DFMT_NULL); #undef FMT_TO_STR default: { @@ -1921,7 +1966,6 @@ const char *debug_d3drenderstate(WINED3DRENDERSTATETYPE state) D3DSTATE_TO_STR(WINED3DRS_EDGEANTIALIAS); D3DSTATE_TO_STR(WINED3DRS_COLORKEYENABLE); D3DSTATE_TO_STR(WINED3DRS_MIPMAPLODBIAS); - D3DSTATE_TO_STR(WINED3DRS_ZBIAS); D3DSTATE_TO_STR(WINED3DRS_RANGEFOGENABLE); D3DSTATE_TO_STR(WINED3DRS_ANISOTROPY); D3DSTATE_TO_STR(WINED3DRS_FLUSHBATCH); @@ -2193,6 +2237,8 @@ const char *debug_d3dstate(DWORD state) return "STATE_MATERIAL"; if (STATE_IS_FRONTFACE(state)) return "STATE_FRONTFACE"; + if (STATE_IS_POINTSPRITECOORDORIGIN(state)) + return "STATE_POINTSPRITECOORDORIGIN"; return wine_dbg_sprintf("UNKNOWN_STATE(%#x)", state); } @@ -2493,17 +2539,18 @@ unsigned int count_bits(unsigned int mask) /* Helper function for retrieving color info for ChoosePixelFormat and wglChoosePixelFormatARB. * The later function requires individual color components. */ BOOL getColorBits(const struct wined3d_format *format, - short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize) + BYTE *redSize, BYTE *greenSize, BYTE *blueSize, BYTE *alphaSize, BYTE *totalSize) { TRACE("format %s.\n", debug_d3dformat(format->id)); switch (format->id) { + case WINED3DFMT_B10G10R10A2_UNORM: + case WINED3DFMT_R10G10B10A2_UNORM: case WINED3DFMT_B8G8R8X8_UNORM: case WINED3DFMT_B8G8R8_UNORM: case WINED3DFMT_B8G8R8A8_UNORM: case WINED3DFMT_R8G8B8A8_UNORM: - case WINED3DFMT_B10G10R10A2_UNORM: case WINED3DFMT_B5G5R5X1_UNORM: case WINED3DFMT_B5G5R5A1_UNORM: case WINED3DFMT_B5G6R5_UNORM: @@ -2530,7 +2577,7 @@ BOOL getColorBits(const struct wined3d_format *format, } /* Helper function for retrieving depth/stencil info for ChoosePixelFormat and wglChoosePixelFormatARB */ -BOOL getDepthStencilBits(const struct wined3d_format *format, short *depthSize, short *stencilSize) +BOOL getDepthStencilBits(const struct wined3d_format *format, BYTE *depthSize, BYTE *stencilSize) { TRACE("format %s.\n", debug_d3dformat(format->id)); @@ -2545,6 +2592,7 @@ BOOL getDepthStencilBits(const struct wined3d_format *format, short *depthSize, case WINED3DFMT_S8_UINT_D24_FLOAT: case WINED3DFMT_D32_UNORM: case WINED3DFMT_D32_FLOAT: + case WINED3DFMT_INTZ: break; default: FIXME("Unsupported depth/stencil format %s.\n", debug_d3dformat(format->id)); @@ -2689,7 +2737,8 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) { return size; } -void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_settings *settings, BOOL ignore_textype) { +void gen_ffp_frag_op(struct wined3d_stateblock *stateblock, struct ffp_frag_settings *settings, BOOL ignore_textype) +{ #define ARG1 0x01 #define ARG2 0x02 #define ARG0 0x04 @@ -2725,13 +2774,14 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting unsigned int i; DWORD ttff; DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2; - IWineD3DDeviceImpl *device = stateblock->device; - IWineD3DSurfaceImpl *rt = device->render_targets[0]; + struct wined3d_device *device = stateblock->device; + struct wined3d_surface *rt = device->fb.render_targets[0]; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; for (i = 0; i < gl_info->limits.texture_stages; ++i) { - IWineD3DBaseTextureImpl *texture; + const struct wined3d_texture *texture; + settings->op[i].padding = 0; if (stateblock->state.texture_states[i][WINED3DTSS_COLOROP] == WINED3DTOP_DISABLE) { @@ -2756,7 +2806,7 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting } else { - switch (texture->baseTexture.target) + switch (texture->target) { case GL_TEXTURE_1D: settings->op[i].tex_type = tex_1d; @@ -2813,12 +2863,14 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting if (!i && stateblock->state.textures[0] && stateblock->state.render_states[WINED3DRS_COLORKEYENABLE]) { - IWineD3DBaseTextureImpl *texture = stateblock->state.textures[0]; - GLenum texture_dimensions = texture->baseTexture.target; + GLenum texture_dimensions; + + texture = stateblock->state.textures[0]; + texture_dimensions = texture->target; if (texture_dimensions == GL_TEXTURE_2D || texture_dimensions == GL_TEXTURE_RECTANGLE_ARB) { - IWineD3DSurfaceImpl *surf = (IWineD3DSurfaceImpl *)texture->baseTexture.sub_resources[0]; + struct wined3d_surface *surf = surface_from_resource(texture->sub_resources[0]); if (surf->CKeyFlags & WINEDDSD_CKSRCBLT && !surf->resource.format->alpha_mask) { @@ -2938,7 +2990,7 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting } } if (stateblock->state.render_states[WINED3DRS_SRGBWRITEENABLE] - && rt->resource.format->Flags & WINED3DFMT_FLAG_SRGB_WRITE) + && rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) { settings->sRGB_write = 1; } else { @@ -2979,11 +3031,11 @@ void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *des * Requires the caller to activate the correct unit before */ /* GL locking is done by the caller (state handler) */ -void texture_activate_dimensions(IWineD3DBaseTextureImpl *texture, const struct wined3d_gl_info *gl_info) +void texture_activate_dimensions(const struct wined3d_texture *texture, const struct wined3d_gl_info *gl_info) { if (texture) { - switch (texture->baseTexture.target) + switch (texture->target) { case GL_TEXTURE_2D: glDisable(GL_TEXTURE_3D); @@ -3064,7 +3116,7 @@ void texture_activate_dimensions(IWineD3DBaseTextureImpl *texture, const struct } /* GL locking is done by the caller (state handler) */ -void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +void sampler_texdim(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD sampler = state - STATE_SAMPLER(0); DWORD mapped_stage = stateblock->device->texUnitMap[sampler]; @@ -3162,7 +3214,7 @@ void select_shader_mode(const struct wined3d_gl_info *gl_info, int *ps_selected, else *ps_selected = SHADER_NONE; } -const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, +const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op, const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format) { diff --git a/dll/directx/wine/wined3d/vertexdeclaration.c b/dll/directx/wine/wined3d/vertexdeclaration.c index 59219f034c2..d5eae1604c0 100644 --- a/dll/directx/wine/wined3d/vertexdeclaration.c +++ b/dll/directx/wine/wined3d/vertexdeclaration.c @@ -37,53 +37,36 @@ static void dump_wined3dvertexelement(const WINED3DVERTEXELEMENT *element) { TRACE(" usage_idx: %u\n", element->usage_idx); } -/* ******************************************* - IWineD3DVertexDeclaration IUnknown parts follow - ******************************************* */ -static HRESULT WINAPI IWineD3DVertexDeclarationImpl_QueryInterface(IWineD3DVertexDeclaration *iface, REFIID riid, LPVOID *ppobj) +ULONG CDECL wined3d_vertex_declaration_incref(struct wined3d_vertex_declaration *declaration) { - IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; - TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IWineD3DVertexDeclaration)){ - IUnknown_AddRef(iface); - *ppobj = This; - return S_OK; - } - *ppobj = NULL; - return E_NOINTERFACE; + ULONG refcount = InterlockedIncrement(&declaration->ref); + + TRACE("%p increasing refcount to %u.\n", declaration, refcount); + + return refcount; } -static ULONG WINAPI IWineD3DVertexDeclarationImpl_AddRef(IWineD3DVertexDeclaration *iface) { - IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; - TRACE("(%p) : AddRef increasing from %d\n", This, This->ref); - return InterlockedIncrement(&This->ref); -} +ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration) +{ + ULONG refcount = InterlockedDecrement(&declaration->ref); -static ULONG WINAPI IWineD3DVertexDeclarationImpl_Release(IWineD3DVertexDeclaration *iface) { - IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; - ULONG ref; - TRACE("(%p) : Releasing from %d\n", This, This->ref); - ref = InterlockedDecrement(&This->ref); - if (!ref) + TRACE("%p decreasing refcount to %u.\n", declaration, refcount); + + if (!refcount) { - HeapFree(GetProcessHeap(), 0, This->elements); - This->parent_ops->wined3d_object_destroyed(This->parent); - HeapFree(GetProcessHeap(), 0, This); + HeapFree(GetProcessHeap(), 0, declaration->elements); + declaration->parent_ops->wined3d_object_destroyed(declaration->parent); + HeapFree(GetProcessHeap(), 0, declaration); } - return ref; + + return refcount; } -/* ******************************************* - IWineD3DVertexDeclaration parts follow - ******************************************* */ - -static void * WINAPI IWineD3DVertexDeclarationImpl_GetParent(IWineD3DVertexDeclaration *iface) +void * CDECL wined3d_vertex_declaration_get_parent(const struct wined3d_vertex_declaration *declaration) { - TRACE("iface %p.\n", iface); + TRACE("declaration %p.\n", declaration); - return ((IWineD3DVertexDeclarationImpl *)iface)->parent; + return declaration->parent; } static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element) @@ -174,18 +157,8 @@ static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element) } } -static const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl = -{ - /* IUnknown */ - IWineD3DVertexDeclarationImpl_QueryInterface, - IWineD3DVertexDeclarationImpl_AddRef, - IWineD3DVertexDeclarationImpl_Release, - /* IWineD3DVertexDeclaration */ - IWineD3DVertexDeclarationImpl_GetParent, -}; - -HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWineD3DDeviceImpl *device, - const WINED3DVERTEXELEMENT *elements, UINT element_count, +static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declaration, + struct wined3d_device *device, const WINED3DVERTEXELEMENT *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; @@ -200,7 +173,6 @@ HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWine } } - declaration->lpVtbl = &IWineD3DVertexDeclaration_Vtbl; declaration->ref = 1; declaration->parent = parent; declaration->parent_ops = parent_ops; @@ -264,3 +236,189 @@ HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWine return WINED3D_OK; } + +HRESULT CDECL wined3d_vertex_declaration_create(struct wined3d_device *device, + const WINED3DVERTEXELEMENT *elements, UINT element_count, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration) +{ + struct wined3d_vertex_declaration *object; + HRESULT hr; + + TRACE("device %p, elements %p, element_count %u, parent %p, parent_ops %p, declaration %p.\n", + device, elements, element_count, parent, parent_ops, declaration); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if(!object) + { + ERR("Failed to allocate vertex declaration memory.\n"); + return E_OUTOFMEMORY; + } + + hr = vertexdeclaration_init(object, device, elements, element_count, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize vertex declaration, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created vertex declaration %p.\n", object); + *declaration = object; + + return WINED3D_OK; +} + +struct wined3d_fvf_convert_state +{ + const struct wined3d_gl_info *gl_info; + WINED3DVERTEXELEMENT *elements; + UINT offset; + UINT idx; +}; + +static void append_decl_element(struct wined3d_fvf_convert_state *state, + enum wined3d_format_id format_id, WINED3DDECLUSAGE usage, UINT usage_idx) +{ + WINED3DVERTEXELEMENT *elements = state->elements; + const struct wined3d_format *format; + UINT offset = state->offset; + UINT idx = state->idx; + + elements[idx].format = format_id; + elements[idx].input_slot = 0; + elements[idx].offset = offset; + elements[idx].output_slot = 0; + elements[idx].method = WINED3DDECLMETHOD_DEFAULT; + elements[idx].usage = usage; + elements[idx].usage_idx = usage_idx; + + format = wined3d_get_format(state->gl_info, format_id); + state->offset += format->component_count * format->component_size; + ++state->idx; +} + +static unsigned int convert_fvf_to_declaration(const struct wined3d_gl_info *gl_info, + DWORD fvf, WINED3DVERTEXELEMENT **elements) +{ + BOOL has_pos = !!(fvf & WINED3DFVF_POSITION_MASK); + BOOL has_blend = (fvf & WINED3DFVF_XYZB5) > WINED3DFVF_XYZRHW; + BOOL has_blend_idx = has_blend && + (((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB5) || + (fvf & WINED3DFVF_LASTBETA_D3DCOLOR) || + (fvf & WINED3DFVF_LASTBETA_UBYTE4)); + BOOL has_normal = !!(fvf & WINED3DFVF_NORMAL); + BOOL has_psize = !!(fvf & WINED3DFVF_PSIZE); + BOOL has_diffuse = !!(fvf & WINED3DFVF_DIFFUSE); + BOOL has_specular = !!(fvf & WINED3DFVF_SPECULAR); + + DWORD num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT; + DWORD texcoords = (fvf & 0xFFFF0000) >> 16; + struct wined3d_fvf_convert_state state; + unsigned int size; + unsigned int idx; + DWORD num_blends = 1 + (((fvf & WINED3DFVF_XYZB5) - WINED3DFVF_XYZB1) >> 1); + if (has_blend_idx) num_blends--; + + /* Compute declaration size */ + size = has_pos + (has_blend && num_blends > 0) + has_blend_idx + has_normal + + has_psize + has_diffuse + has_specular + num_textures; + + state.gl_info = gl_info; + state.elements = HeapAlloc(GetProcessHeap(), 0, size * sizeof(*state.elements)); + if (!state.elements) return ~0U; + state.offset = 0; + state.idx = 0; + + if (has_pos) + { + if (!has_blend && (fvf & WINED3DFVF_XYZRHW)) + append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_POSITIONT, 0); + else if ((fvf & WINED3DFVF_XYZW) == WINED3DFVF_XYZW) + append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_POSITION, 0); + else + append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_POSITION, 0); + } + + if (has_blend && (num_blends > 0)) + { + if ((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2 && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR)) + append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_BLENDWEIGHT, 0); + else + { + switch (num_blends) + { + case 1: + append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); + break; + case 2: + append_decl_element(&state, WINED3DFMT_R32G32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); + break; + case 3: + append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); + break; + case 4: + append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_BLENDWEIGHT, 0); + break; + default: + ERR("Unexpected amount of blend values: %u\n", num_blends); + } + } + } + + if (has_blend_idx) + { + if ((fvf & WINED3DFVF_LASTBETA_UBYTE4) + || ((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2 && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR))) + append_decl_element(&state, WINED3DFMT_R8G8B8A8_UINT, WINED3DDECLUSAGE_BLENDINDICES, 0); + else if (fvf & WINED3DFVF_LASTBETA_D3DCOLOR) + append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_BLENDINDICES, 0); + else + append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_BLENDINDICES, 0); + } + + if (has_normal) append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_NORMAL, 0); + if (has_psize) append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_PSIZE, 0); + if (has_diffuse) append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_COLOR, 0); + if (has_specular) append_decl_element(&state, WINED3DFMT_B8G8R8A8_UNORM, WINED3DDECLUSAGE_COLOR, 1); + + for (idx = 0; idx < num_textures; ++idx) + { + switch ((texcoords >> (idx * 2)) & 0x03) + { + case WINED3DFVF_TEXTUREFORMAT1: + append_decl_element(&state, WINED3DFMT_R32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); + break; + case WINED3DFVF_TEXTUREFORMAT2: + append_decl_element(&state, WINED3DFMT_R32G32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); + break; + case WINED3DFVF_TEXTUREFORMAT3: + append_decl_element(&state, WINED3DFMT_R32G32B32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); + break; + case WINED3DFVF_TEXTUREFORMAT4: + append_decl_element(&state, WINED3DFMT_R32G32B32A32_FLOAT, WINED3DDECLUSAGE_TEXCOORD, idx); + break; + } + } + + *elements = state.elements; + return size; +} + +HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, + DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, + struct wined3d_vertex_declaration **declaration) +{ + WINED3DVERTEXELEMENT *elements; + unsigned int size; + DWORD hr; + + TRACE("device %p, fvf %#x, parent %p, parent_ops %p, declaration %p.\n", + device, fvf, parent, parent_ops, declaration); + + size = convert_fvf_to_declaration(&device->adapter->gl_info, fvf, &elements); + if (size == ~0U) return E_OUTOFMEMORY; + + hr = wined3d_vertex_declaration_create(device, elements, size, parent, parent_ops, declaration); + HeapFree(GetProcessHeap(), 0, elements); + return hr; +} diff --git a/dll/directx/wine/wined3d/view.c b/dll/directx/wine/wined3d/view.c index e4e40fc38bb..872335f2bd5 100644 --- a/dll/directx/wine/wined3d/view.c +++ b/dll/directx/wine/wined3d/view.c @@ -1,5 +1,5 @@ /* - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009, 2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,94 +24,68 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); -/* IUnknown methods */ - -static HRESULT STDMETHODCALLTYPE rendertarget_view_QueryInterface(IWineD3DRendertargetView *iface, - REFIID riid, void **object) +ULONG CDECL wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *view) { - TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + ULONG refcount = InterlockedIncrement(&view->refcount); - if (IsEqualGUID(riid, &IID_IWineD3DRendertargetView) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } - - WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); - - *object = NULL; - return E_NOINTERFACE; -} - -static ULONG STDMETHODCALLTYPE rendertarget_view_AddRef(IWineD3DRendertargetView *iface) -{ - struct wined3d_rendertarget_view *This = (struct wined3d_rendertarget_view *)iface; - ULONG refcount = InterlockedIncrement(&This->refcount); - - TRACE("%p increasing refcount to %u\n", This, refcount); + TRACE("%p increasing refcount to %u.\n", view, refcount); return refcount; } -static ULONG STDMETHODCALLTYPE rendertarget_view_Release(IWineD3DRendertargetView *iface) +ULONG CDECL wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *view) { - struct wined3d_rendertarget_view *This = (struct wined3d_rendertarget_view *)iface; - ULONG refcount = InterlockedDecrement(&This->refcount); + ULONG refcount = InterlockedDecrement(&view->refcount); - TRACE("%p decreasing refcount to %u\n", This, refcount); + TRACE("%p decreasing refcount to %u.\n", view, refcount); if (!refcount) - { - IWineD3DResource_Release(This->resource); - HeapFree(GetProcessHeap(), 0, This); - } + HeapFree(GetProcessHeap(), 0, view); return refcount; } -/* IWineD3DBase methods */ - -static void * STDMETHODCALLTYPE rendertarget_view_GetParent(IWineD3DRendertargetView *iface) +void * CDECL wined3d_rendertarget_view_get_parent(const struct wined3d_rendertarget_view *view) { - TRACE("iface %p.\n", iface); + TRACE("view %p.\n", view); - return ((struct wined3d_rendertarget_view *)iface)->parent; + return view->parent; } -/* IWineD3DRendertargetView methods */ - -static HRESULT STDMETHODCALLTYPE rendertarget_view_GetResource(IWineD3DRendertargetView *iface, - IWineD3DResource **resource) +struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const struct wined3d_rendertarget_view *view) { - struct wined3d_rendertarget_view *This = (struct wined3d_rendertarget_view *)iface; + TRACE("view %p.\n", view); - IWineD3DResource_AddRef(This->resource); - *resource = This->resource; - - return WINED3D_OK; + return view->resource; } -static const struct IWineD3DRendertargetViewVtbl wined3d_rendertarget_view_vtbl = +static void wined3d_rendertarget_view_init(struct wined3d_rendertarget_view *view, + struct wined3d_resource *resource, void *parent) { - /* IUnknown methods */ - rendertarget_view_QueryInterface, - rendertarget_view_AddRef, - rendertarget_view_Release, - /* IWineD3DBase methods */ - rendertarget_view_GetParent, - /* IWineD3DRendertargetView methods */ - rendertarget_view_GetResource, -}; - -void wined3d_rendertarget_view_init(struct wined3d_rendertarget_view *view, - IWineD3DResource *resource, void *parent) -{ - view->vtbl = &wined3d_rendertarget_view_vtbl; view->refcount = 1; - IWineD3DResource_AddRef(resource); view->resource = resource; view->parent = parent; } + +HRESULT CDECL wined3d_rendertarget_view_create(struct wined3d_resource *resource, + void *parent, struct wined3d_rendertarget_view **rendertarget_view) +{ + struct wined3d_rendertarget_view *object; + + TRACE("resource %p, parent %p, rendertarget_view %p.\n", + resource, parent, rendertarget_view); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate memory\n"); + return E_OUTOFMEMORY; + } + + wined3d_rendertarget_view_init(object, resource, parent); + + TRACE("Created render target view %p.\n", object); + *rendertarget_view = object; + + return WINED3D_OK; +} diff --git a/dll/directx/wine/wined3d/volume.c b/dll/directx/wine/wined3d/volume.c index 8d42d547329..e0f8ed6a4c6 100644 --- a/dll/directx/wine/wined3d/volume.c +++ b/dll/directx/wine/wined3d/volume.c @@ -1,10 +1,8 @@ /* - * IWineD3DVolume implementation - * * Copyright 2002-2005 Jason Edmeades * Copyright 2002-2005 Raphael Junqueira * Copyright 2005 Oliver Stieber - * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,9 +25,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); /* Context activation is done by the caller. */ -static void volume_bind_and_dirtify(IWineD3DVolume *iface) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->resource.device->adapter->gl_info; +static void volume_bind_and_dirtify(struct wined3d_volume *volume, const struct wined3d_gl_info *gl_info) +{ + struct wined3d_texture *container = volume->container; DWORD active_sampler; /* We don't need a specific texture unit, but after binding the texture the current unit is dirty. @@ -49,285 +47,256 @@ static void volume_bind_and_dirtify(IWineD3DVolume *iface) { ENTER_GL(); glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture); LEAVE_GL(); - active_sampler = This->resource.device->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB]; + active_sampler = volume->resource.device->rev_tex_unit_map[active_texture - GL_TEXTURE0_ARB]; } else { active_sampler = 0; } if (active_sampler != WINED3D_UNMAPPED_STAGE) { - IWineD3DDeviceImpl_MarkStateDirty(This->resource.device, STATE_SAMPLER(active_sampler)); + IWineD3DDeviceImpl_MarkStateDirty(volume->resource.device, STATE_SAMPLER(active_sampler)); } - IWineD3DVolumeTexture_BindTexture((IWineD3DVolumeTexture *)This->container, FALSE); + container->texture_ops->texture_bind(container, gl_info, FALSE); } -void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) +void volume_add_dirty_box(struct wined3d_volume *volume, const WINED3DBOX *dirty_box) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - - This->dirty = TRUE; + volume->dirty = TRUE; if (dirty_box) { - This->lockedBox.Left = min(This->lockedBox.Left, dirty_box->Left); - This->lockedBox.Top = min(This->lockedBox.Top, dirty_box->Top); - This->lockedBox.Front = min(This->lockedBox.Front, dirty_box->Front); - This->lockedBox.Right = max(This->lockedBox.Right, dirty_box->Right); - This->lockedBox.Bottom = max(This->lockedBox.Bottom, dirty_box->Bottom); - This->lockedBox.Back = max(This->lockedBox.Back, dirty_box->Back); + volume->lockedBox.Left = min(volume->lockedBox.Left, dirty_box->Left); + volume->lockedBox.Top = min(volume->lockedBox.Top, dirty_box->Top); + volume->lockedBox.Front = min(volume->lockedBox.Front, dirty_box->Front); + volume->lockedBox.Right = max(volume->lockedBox.Right, dirty_box->Right); + volume->lockedBox.Bottom = max(volume->lockedBox.Bottom, dirty_box->Bottom); + volume->lockedBox.Back = max(volume->lockedBox.Back, dirty_box->Back); } else { - This->lockedBox.Left = 0; - This->lockedBox.Top = 0; - This->lockedBox.Front = 0; - This->lockedBox.Right = This->currentDesc.Width; - This->lockedBox.Bottom = This->currentDesc.Height; - This->lockedBox.Back = This->currentDesc.Depth; + volume->lockedBox.Left = 0; + volume->lockedBox.Top = 0; + volume->lockedBox.Front = 0; + volume->lockedBox.Right = volume->resource.width; + volume->lockedBox.Bottom = volume->resource.height; + volume->lockedBox.Back = volume->resource.depth; } } -void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) +void volume_set_container(struct wined3d_volume *volume, struct wined3d_texture *container) { TRACE("volume %p, container %p.\n", volume, container); volume->container = container; } -/* ******************************************* - IWineD3DVolume IUnknown parts follow - ******************************************* */ -static HRESULT WINAPI IWineD3DVolumeImpl_QueryInterface(IWineD3DVolume *iface, REFIID riid, void **object) +/* Context activation is done by the caller. */ +void volume_load(struct wined3d_volume *volume, UINT level, BOOL srgb_mode) { - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); + const struct wined3d_gl_info *gl_info = &volume->resource.device->adapter->gl_info; + const struct wined3d_format *format = volume->resource.format; - if (IsEqualGUID(riid, &IID_IWineD3DVolume) - || IsEqualGUID(riid, &IID_IWineD3DResource) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *object = iface; - return S_OK; - } + TRACE("volume %p, level %u, srgb %#x, format %s (%#x).\n", + volume, level, srgb_mode, debug_d3dformat(format->id), format->id); - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + volume_bind_and_dirtify(volume, gl_info); - *object = NULL; - return E_NOINTERFACE; -} + ENTER_GL(); + GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D, level, format->glInternal, + volume->resource.width, volume->resource.height, volume->resource.depth, + 0, format->glFormat, format->glType, volume->resource.allocatedMemory)); + checkGLcall("glTexImage3D"); + LEAVE_GL(); -static ULONG WINAPI IWineD3DVolumeImpl_AddRef(IWineD3DVolume *iface) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref); - return InterlockedIncrement(&This->resource.ref); + /* When adding code releasing volume->resource.allocatedMemory to save + * data keep in mind that GL_UNPACK_CLIENT_STORAGE_APPLE is enabled by + * default if supported(GL_APPLE_client_storage). Thus do not release + * volume->resource.allocatedMemory if GL_APPLE_client_storage is + * supported. */ } /* Do not call while under the GL lock. */ -static ULONG WINAPI IWineD3DVolumeImpl_Release(IWineD3DVolume *iface) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - ULONG ref; - TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); - ref = InterlockedDecrement(&This->resource.ref); - - if (!ref) - { - resource_cleanup((IWineD3DResource *)iface); - This->resource.parent_ops->wined3d_object_destroyed(This->resource.parent); - HeapFree(GetProcessHeap(), 0, This); - } - return ref; -} - -/* **************************************************** - IWineD3DVolume IWineD3DResource parts follow - **************************************************** */ -static void * WINAPI IWineD3DVolumeImpl_GetParent(IWineD3DVolume *iface) +static void volume_unload(struct wined3d_resource *resource) { - TRACE("iface %p.\n", iface); - - return ((IWineD3DVolumeImpl *)iface)->resource.parent; -} - -static HRESULT WINAPI IWineD3DVolumeImpl_SetPrivateData(IWineD3DVolume *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags); -} - -static HRESULT WINAPI IWineD3DVolumeImpl_GetPrivateData(IWineD3DVolume *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData); -} - -static HRESULT WINAPI IWineD3DVolumeImpl_FreePrivateData(IWineD3DVolume *iface, REFGUID refguid) { - return resource_free_private_data((IWineD3DResource *)iface, refguid); -} - -static DWORD WINAPI IWineD3DVolumeImpl_SetPriority(IWineD3DVolume *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); -} - -static DWORD WINAPI IWineD3DVolumeImpl_GetPriority(IWineD3DVolume *iface) { - return resource_get_priority((IWineD3DResource *)iface); -} - -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DVolumeImpl_PreLoad(IWineD3DVolume *iface) { - FIXME("iface %p stub!\n", iface); -} - -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DVolumeImpl_UnLoad(IWineD3DVolume *iface) -{ - TRACE("iface %p.\n", iface); + TRACE("texture %p.\n", resource); /* The whole content is shadowed on This->resource.allocatedMemory, and * the texture name is managed by the VolumeTexture container. */ - resource_unload((IWineD3DResourceImpl *)iface); + resource_unload(resource); } -static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeImpl_GetType(IWineD3DVolume *iface) { - return resource_get_type((IWineD3DResource *)iface); -} - -static void WINAPI IWineD3DVolumeImpl_GetDesc(IWineD3DVolume *iface, WINED3DVOLUME_DESC *desc) +ULONG CDECL wined3d_volume_incref(struct wined3d_volume *volume) { - IWineD3DVolumeImpl *volume = (IWineD3DVolumeImpl *)iface; + ULONG refcount; - TRACE("iface %p, desc %p.\n", iface, desc); + if (volume->container) + { + TRACE("Forwarding to container %p.\n", volume->container); + return wined3d_texture_incref(volume->container); + } - desc->Format = volume->resource.format->id; - desc->Type = volume->resource.resourceType; - desc->Usage = volume->resource.usage; - desc->Pool = volume->resource.pool; - desc->Size = volume->resource.size; /* dx8 only */ - desc->Width = volume->currentDesc.Width; - desc->Height = volume->currentDesc.Height; - desc->Depth = volume->currentDesc.Depth; + refcount = InterlockedIncrement(&volume->resource.ref); + + TRACE("%p increasing refcount to %u.\n", volume, refcount); + + return refcount; } -static HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, WINED3DLOCKED_BOX* pLockedVolume, CONST WINED3DBOX* pBox, DWORD Flags) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - FIXME("(%p) : pBox=%p stub\n", This, pBox); +/* Do not call while under the GL lock. */ +ULONG CDECL wined3d_volume_decref(struct wined3d_volume *volume) +{ + ULONG refcount; - if(!This->resource.allocatedMemory) { - This->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->resource.size); + if (volume->container) + { + TRACE("Forwarding to container %p.\n", volume->container); + return wined3d_texture_decref(volume->container); } - /* fixme: should we really lock as such? */ - TRACE("(%p) : box=%p, output pbox=%p, allMem=%p\n", This, pBox, pLockedVolume, This->resource.allocatedMemory); + refcount = InterlockedDecrement(&volume->resource.ref); - pLockedVolume->RowPitch = This->resource.format->byte_count * This->currentDesc.Width; /* Bytes / row */ - pLockedVolume->SlicePitch = This->resource.format->byte_count - * This->currentDesc.Width * This->currentDesc.Height; /* Bytes / slice */ - if (!pBox) { + TRACE("%p decreasing refcount to %u.\n", volume, refcount); + + if (!refcount) + { + resource_cleanup(&volume->resource); + volume->resource.parent_ops->wined3d_object_destroyed(volume->resource.parent); + HeapFree(GetProcessHeap(), 0, volume); + } + + return refcount; +} + +void * CDECL wined3d_volume_get_parent(const struct wined3d_volume *volume) +{ + TRACE("volume %p.\n", volume); + + return volume->resource.parent; +} + +HRESULT CDECL wined3d_volume_set_private_data(struct wined3d_volume *volume, + REFGUID guid, const void *data, DWORD data_size, DWORD flags) +{ + return resource_set_private_data(&volume->resource, guid, data, data_size, flags); +} + +HRESULT CDECL wined3d_volume_get_private_data(const struct wined3d_volume *volume, + REFGUID guid, void *data, DWORD *data_size) +{ + return resource_get_private_data(&volume->resource, guid, data, data_size); +} + +HRESULT CDECL wined3d_volume_free_private_data(struct wined3d_volume *volume, REFGUID guid) +{ + return resource_free_private_data(&volume->resource, guid); +} + +DWORD CDECL wined3d_volume_set_priority(struct wined3d_volume *volume, DWORD priority) +{ + return resource_set_priority(&volume->resource, priority); +} + +DWORD CDECL wined3d_volume_get_priority(const struct wined3d_volume *volume) +{ + return resource_get_priority(&volume->resource); +} + +/* Do not call while under the GL lock. */ +void CDECL wined3d_volume_preload(struct wined3d_volume *volume) +{ + FIXME("volume %p stub!\n", volume); +} + +struct wined3d_resource * CDECL wined3d_volume_get_resource(struct wined3d_volume *volume) +{ + TRACE("volume %p.\n", volume); + + return &volume->resource; +} + +HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, + WINED3DLOCKED_BOX *locked_box, const WINED3DBOX *box, DWORD flags) +{ + TRACE("volume %p, locked_box %p, box %p, flags %#x.\n", + volume, locked_box, box, flags); + + if (!volume->resource.allocatedMemory) + volume->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, volume->resource.size); + + TRACE("allocatedMemory %p.\n", volume->resource.allocatedMemory); + + locked_box->RowPitch = volume->resource.format->byte_count * volume->resource.width; /* Bytes / row */ + locked_box->SlicePitch = volume->resource.format->byte_count + * volume->resource.width * volume->resource.height; /* Bytes / slice */ + if (!box) + { TRACE("No box supplied - all is ok\n"); - pLockedVolume->pBits = This->resource.allocatedMemory; - This->lockedBox.Left = 0; - This->lockedBox.Top = 0; - This->lockedBox.Front = 0; - This->lockedBox.Right = This->currentDesc.Width; - This->lockedBox.Bottom = This->currentDesc.Height; - This->lockedBox.Back = This->currentDesc.Depth; - } else { - TRACE("Lock Box (%p) = l %d, t %d, r %d, b %d, fr %d, ba %d\n", pBox, pBox->Left, pBox->Top, pBox->Right, pBox->Bottom, pBox->Front, pBox->Back); - pLockedVolume->pBits = This->resource.allocatedMemory - + (pLockedVolume->SlicePitch * pBox->Front) /* FIXME: is front < back or vica versa? */ - + (pLockedVolume->RowPitch * pBox->Top) - + (pBox->Left * This->resource.format->byte_count); - This->lockedBox.Left = pBox->Left; - This->lockedBox.Top = pBox->Top; - This->lockedBox.Front = pBox->Front; - This->lockedBox.Right = pBox->Right; - This->lockedBox.Bottom = pBox->Bottom; - This->lockedBox.Back = pBox->Back; - } - - if (Flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY)) { - /* Don't dirtify */ + locked_box->pBits = volume->resource.allocatedMemory; + volume->lockedBox.Left = 0; + volume->lockedBox.Top = 0; + volume->lockedBox.Front = 0; + volume->lockedBox.Right = volume->resource.width; + volume->lockedBox.Bottom = volume->resource.height; + volume->lockedBox.Back = volume->resource.depth; } else { - volume_add_dirty_box(iface, &This->lockedBox); - This->container->baseTexture.texture_rgb.dirty = TRUE; - This->container->baseTexture.texture_srgb.dirty = TRUE; + TRACE("Lock Box (%p) = l %d, t %d, r %d, b %d, fr %d, ba %d\n", + box, box->Left, box->Top, box->Right, box->Bottom, box->Front, box->Back); + locked_box->pBits = volume->resource.allocatedMemory + + (locked_box->SlicePitch * box->Front) /* FIXME: is front < back or vica versa? */ + + (locked_box->RowPitch * box->Top) + + (box->Left * volume->resource.format->byte_count); + volume->lockedBox.Left = box->Left; + volume->lockedBox.Top = box->Top; + volume->lockedBox.Front = box->Front; + volume->lockedBox.Right = box->Right; + volume->lockedBox.Bottom = box->Bottom; + volume->lockedBox.Back = box->Back; } - This->locked = TRUE; - TRACE("returning memory@%p rpitch(%d) spitch(%d)\n", pLockedVolume->pBits, pLockedVolume->RowPitch, pLockedVolume->SlicePitch); + if (!(flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY))) + { + volume_add_dirty_box(volume, &volume->lockedBox); + wined3d_texture_set_dirty(volume->container, TRUE); + } + + volume->locked = TRUE; + + TRACE("Returning memory %p, row pitch %d, slice pitch %d.\n", + locked_box->pBits, locked_box->RowPitch, locked_box->SlicePitch); + return WINED3D_OK; } -static HRESULT WINAPI IWineD3DVolumeImpl_UnlockBox(IWineD3DVolume *iface) { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - if (!This->locked) +struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resource *resource) +{ + return volume_from_resource(resource); +} + +HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) +{ + TRACE("volume %p.\n", volume); + + if (!volume->locked) { - WARN("Trying to unlock unlocked volume %p.\n", iface); + WARN("Trying to unlock unlocked volume %p.\n", volume); return WINED3DERR_INVALIDCALL; } - TRACE("(%p) : unlocking volume\n", This); - This->locked = FALSE; - memset(&This->lockedBox, 0, sizeof(RECT)); + + volume->locked = FALSE; + memset(&volume->lockedBox, 0, sizeof(volume->lockedBox)); + return WINED3D_OK; } -/* Internal use functions follow : */ - -/* Context activation is done by the caller. */ -static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, int gl_level, BOOL srgb_mode) +static const struct wined3d_resource_ops volume_resource_ops = { - IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; - const struct wined3d_gl_info *gl_info = &This->resource.device->adapter->gl_info; - const struct wined3d_format *format = This->resource.format; - - TRACE("iface %p, level %u, srgb %#x, format %s (%#x).\n", - iface, gl_level, srgb_mode, debug_d3dformat(format->id), format->id); - - volume_bind_and_dirtify(iface); - - TRACE("Calling glTexImage3D %x level=%d, intfmt=%x, w=%d, h=%d,d=%d, 0=%d, glFmt=%x, glType=%x, Mem=%p\n", - GL_TEXTURE_3D, gl_level, format->glInternal, This->currentDesc.Width, This->currentDesc.Height, - This->currentDesc.Depth, 0, format->glFormat, format->glType, This->resource.allocatedMemory); - - ENTER_GL(); - GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D, gl_level, format->glInternal, - This->currentDesc.Width, This->currentDesc.Height, This->currentDesc.Depth, - 0, format->glFormat, format->glType, This->resource.allocatedMemory)); - checkGLcall("glTexImage3D"); - LEAVE_GL(); - - /* When adding code releasing This->resource.allocatedMemory to save data keep in mind that - * GL_UNPACK_CLIENT_STORAGE_APPLE is enabled by default if supported(GL_APPLE_client_storage). - * Thus do not release This->resource.allocatedMemory if GL_APPLE_client_storage is supported. - */ - return WINED3D_OK; - -} - -static const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl = -{ - /* IUnknown */ - IWineD3DVolumeImpl_QueryInterface, - IWineD3DVolumeImpl_AddRef, - IWineD3DVolumeImpl_Release, - /* IWineD3DResource */ - IWineD3DVolumeImpl_GetParent, - IWineD3DVolumeImpl_SetPrivateData, - IWineD3DVolumeImpl_GetPrivateData, - IWineD3DVolumeImpl_FreePrivateData, - IWineD3DVolumeImpl_SetPriority, - IWineD3DVolumeImpl_GetPriority, - IWineD3DVolumeImpl_PreLoad, - IWineD3DVolumeImpl_UnLoad, - IWineD3DVolumeImpl_GetType, - /* IWineD3DVolume */ - IWineD3DVolumeImpl_GetDesc, - IWineD3DVolumeImpl_LockBox, - IWineD3DVolumeImpl_UnlockBox, - /* Internal interface */ - IWineD3DVolumeImpl_LoadTexture, + volume_unload, }; -HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width, +static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device *device, UINT width, UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) { @@ -341,25 +310,55 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT return WINED3DERR_INVALIDCALL; } - volume->lpVtbl = &IWineD3DVolume_Vtbl; - - hr = resource_init((IWineD3DResource *)volume, WINED3DRTYPE_VOLUME, device, - width * height * depth * format->byte_count, usage, format, pool, parent, parent_ops); + hr = resource_init(&volume->resource, device, WINED3DRTYPE_VOLUME, format, + WINED3DMULTISAMPLE_NONE, 0, usage, pool, width, height, depth, + width * height * depth * format->byte_count, parent, parent_ops, + &volume_resource_ops); if (FAILED(hr)) { WARN("Failed to initialize resource, returning %#x.\n", hr); return hr; } - volume->currentDesc.Width = width; - volume->currentDesc.Height = height; - volume->currentDesc.Depth = depth; volume->lockable = TRUE; volume->locked = FALSE; memset(&volume->lockedBox, 0, sizeof(volume->lockedBox)); volume->dirty = TRUE; - volume_add_dirty_box((IWineD3DVolume *)volume, NULL); + volume_add_dirty_box(volume, NULL); + + return WINED3D_OK; +} + +HRESULT CDECL wined3d_volume_create(struct wined3d_device *device, UINT width, UINT height, + UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_volume **volume) +{ + struct wined3d_volume *object; + HRESULT hr; + + TRACE("device %p, width %u, height %u, depth %u, usage %#x, format %s, pool %s\n", + device, width, height, depth, usage, debug_d3dformat(format_id), debug_d3dpool(pool)); + TRACE("parent %p, parent_ops %p, volume %p.\n", parent, parent_ops, volume); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Out of memory\n"); + *volume = NULL; + return WINED3DERR_OUTOFVIDEOMEMORY; + } + + hr = volume_init(object, device, width, height, depth, usage, format_id, pool, parent, parent_ops); + if (FAILED(hr)) + { + WARN("Failed to initialize volume, returning %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + TRACE("Created volume %p.\n", object); + *volume = object; return WINED3D_OK; } diff --git a/dll/directx/wine/wined3d/volumetexture.c b/dll/directx/wine/wined3d/volumetexture.c deleted file mode 100644 index a2c0c6d796a..00000000000 --- a/dll/directx/wine/wined3d/volumetexture.c +++ /dev/null @@ -1,481 +0,0 @@ -/* - * IWineD3DVolumeTexture implementation - * - * Copyright 2002-2005 Jason Edmeades - * Copyright 2002-2005 Raphael Junqueira - * Copyright 2005 Oliver Stieber - * Copyright 2009 Henri Verbeet for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" -#include "wined3d_private.h" - -WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); - -/* Do not call while under the GL lock. */ -static void volumetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb) -{ - /* Override the IWineD3DResource Preload method. */ - IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; - IWineD3DDeviceImpl *device = This->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - struct wined3d_context *context = NULL; - BOOL srgb_mode = This->baseTexture.is_srgb; - BOOL srgb_was_toggled = FALSE; - unsigned int i; - - TRACE("(%p) : About to load texture.\n", This); - - if (!device->isInDraw) context = context_acquire(device, NULL); - else if (gl_info->supported[EXT_TEXTURE_SRGB] && This->baseTexture.bindCount > 0) - { - srgb_mode = device->stateBlock->state.sampler_states[This->baseTexture.sampler][WINED3DSAMP_SRGBTEXTURE]; - srgb_was_toggled = This->baseTexture.is_srgb != srgb_mode; - This->baseTexture.is_srgb = srgb_mode; - } - - /* If the texture is marked dirty or the srgb sampler setting has changed - * since the last load then reload the volumes. */ - if (This->baseTexture.texture_rgb.dirty) - { - for (i = 0; i < This->baseTexture.level_count; ++i) - { - IWineD3DVolume *volume = (IWineD3DVolume *)This->baseTexture.sub_resources[i]; - IWineD3DVolume_LoadTexture(volume, i, srgb_mode); - } - } - else if (srgb_was_toggled) - { - for (i = 0; i < This->baseTexture.level_count; ++i) - { - IWineD3DVolume *volume = (IWineD3DVolume *)This->baseTexture.sub_resources[i]; - volume_add_dirty_box(volume, NULL); - IWineD3DVolume_LoadTexture(volume, i, srgb_mode); - } - } - else - { - TRACE("(%p) Texture not dirty, nothing to do.\n", iface); - } - - if (context) context_release(context); - - /* No longer dirty */ - This->baseTexture.texture_rgb.dirty = FALSE; -} - -static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This) -{ - unsigned int i; - - TRACE("(%p) : Cleaning up.\n", This); - - for (i = 0; i < This->baseTexture.level_count; ++i) - { - IWineD3DVolumeImpl *volume = (IWineD3DVolumeImpl *)This->baseTexture.sub_resources[i]; - - if (volume) - { - /* Cleanup the container. */ - volume_set_container(volume, NULL); - IWineD3DVolume_Release((IWineD3DVolume *)volume); - } - } - basetexture_cleanup((IWineD3DBaseTexture *)This); -} - -/* ******************************************* - IWineD3DTexture IUnknown parts follow - ******************************************* */ - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTexture *iface, REFIID riid, LPVOID *ppobj) -{ - IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; - TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IWineD3DBase) - || IsEqualGUID(riid, &IID_IWineD3DResource) - || IsEqualGUID(riid, &IID_IWineD3DBaseTexture) - || IsEqualGUID(riid, &IID_IWineD3DVolumeTexture)) { - IUnknown_AddRef(iface); - *ppobj = This; - return S_OK; - } - *ppobj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DVolumeTexture *iface) { - IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; - TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref); - return InterlockedIncrement(&This->resource.ref); -} - -/* Do not call while under the GL lock. */ -static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *iface) { - IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; - ULONG ref; - TRACE("(%p) : Releasing from %d\n", This, This->resource.ref); - ref = InterlockedDecrement(&This->resource.ref); - if (!ref) - { - volumetexture_cleanup(This); - This->resource.parent_ops->wined3d_object_destroyed(This->resource.parent); - HeapFree(GetProcessHeap(), 0, This); - } - return ref; -} - -/* **************************************************** - IWineD3DVolumeTexture IWineD3DResource parts follow - **************************************************** */ -static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) { - return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags); -} - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) { - return resource_get_private_data((IWineD3DResource *)iface, refguid, pData, pSizeOfData); -} - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid) { - return resource_free_private_data((IWineD3DResource *)iface, refguid); -} - -static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); -} - -static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DVolumeTexture *iface) { - return resource_get_priority((IWineD3DResource *)iface); -} - -static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *iface) { - volumetexture_internal_preload((IWineD3DBaseTexture *) iface, SRGB_ANY); -} - -/* Do not call while under the GL lock. */ -static void WINAPI IWineD3DVolumeTextureImpl_UnLoad(IWineD3DVolumeTexture *iface) { - unsigned int i; - IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; - TRACE("(%p)\n", This); - - /* Unload all the surfaces and reset the texture name. If UnLoad was called on the - * surface before, this one will be a NOP and vice versa. Unloading an unloaded - * surface is fine - */ - for (i = 0; i < This->baseTexture.level_count; ++i) - { - IWineD3DVolume_UnLoad((IWineD3DVolume *)This->baseTexture.sub_resources[i]); - } - - basetexture_unload((IWineD3DBaseTexture *)iface); -} - -static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface) { - return resource_get_type((IWineD3DResource *)iface); -} - -static void * WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DVolumeTexture *iface) -{ - TRACE("iface %p\n", iface); - - return ((IWineD3DVolumeTextureImpl *)iface)->resource.parent; -} - -/* ****************************************************** - IWineD3DVolumeTexture IWineD3DBaseTexture parts follow - ****************************************************** */ -static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DVolumeTexture *iface, DWORD LODNew) { - return basetexture_set_lod((IWineD3DBaseTexture *)iface, LODNew); -} - -static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLOD(IWineD3DVolumeTexture *iface) { - return basetexture_get_lod((IWineD3DBaseTexture *)iface); -} - -static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLevelCount(IWineD3DVolumeTexture *iface) { - return basetexture_get_level_count((IWineD3DBaseTexture *)iface); -} - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetAutoGenFilterType(IWineD3DVolumeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { - return basetexture_set_autogen_filter_type((IWineD3DBaseTexture *)iface, FilterType); -} - -static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DVolumeTextureImpl_GetAutoGenFilterType(IWineD3DVolumeTexture *iface) { - return basetexture_get_autogen_filter_type((IWineD3DBaseTexture *)iface); -} - -static void WINAPI IWineD3DVolumeTextureImpl_GenerateMipSubLevels(IWineD3DVolumeTexture *iface) { - basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface); -} - -/* Internal function, No d3d mapping */ -static BOOL WINAPI IWineD3DVolumeTextureImpl_SetDirty(IWineD3DVolumeTexture *iface, BOOL dirty) { - return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty); -} - -static BOOL WINAPI IWineD3DVolumeTextureImpl_GetDirty(IWineD3DVolumeTexture *iface) { - return basetexture_get_dirty((IWineD3DBaseTexture *)iface); -} - -/* Context activation is done by the caller. */ -static HRESULT WINAPI IWineD3DVolumeTextureImpl_BindTexture(IWineD3DVolumeTexture *iface, BOOL srgb) -{ - BOOL dummy; - - TRACE("iface %p, srgb %#x.\n", iface, srgb); - - return basetexture_bind((IWineD3DBaseTexture *)iface, srgb, &dummy); -} - -static BOOL WINAPI IWineD3DVolumeTextureImpl_IsCondNP2(IWineD3DVolumeTexture *iface) -{ - TRACE("iface %p.\n", iface); - - return FALSE; -} - -/* ******************************************* - IWineD3DVolumeTexture IWineD3DVolumeTexture parts follow - ******************************************* */ -static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTexture *iface, - UINT level, WINED3DVOLUME_DESC *desc) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DVolume *volume; - - TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); - - if (!(volume = (IWineD3DVolume *)basetexture_get_sub_resource(texture, 0, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - IWineD3DVolume_GetDesc(volume, desc); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTexture *iface, - UINT level, IWineD3DVolume **volume) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DVolume *v; - - TRACE("iface %p, level %u, volume %p.\n", iface, level, volume); - - if (!(v = (IWineD3DVolume *)basetexture_get_sub_resource(texture, 0, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - IWineD3DVolume_AddRef(v); - *volume = v; - - TRACE("Returning volume %p.\n", *volume); - - return WINED3D_OK; -} - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *iface, - UINT level, WINED3DLOCKED_BOX *locked_box, const WINED3DBOX *box, DWORD flags) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DVolume *volume; - - TRACE("iface %p, level %u, locked_box %p, box %p, flags %#x.\n", - iface, level, locked_box, box, flags); - - if (!(volume = (IWineD3DVolume *)basetexture_get_sub_resource(texture, 0, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - return IWineD3DVolume_LockBox(volume, locked_box, box, flags); -} - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_UnlockBox(IWineD3DVolumeTexture *iface, UINT level) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DVolume *volume; - - TRACE("iface %p, level %u.\n", iface, level); - - if (!(volume = (IWineD3DVolume *)basetexture_get_sub_resource(texture, 0, level))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - return IWineD3DVolume_UnlockBox(volume); -} - -static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyBox(IWineD3DVolumeTexture *iface, const WINED3DBOX *dirty_box) -{ - IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; - IWineD3DVolume *volume; - - TRACE("iface %p, dirty_box %p.\n", iface, dirty_box); - - if (!(volume = (IWineD3DVolume *)basetexture_get_sub_resource(texture, 0, 0))) - { - WARN("Failed to get sub-resource.\n"); - return WINED3DERR_INVALIDCALL; - } - - texture->baseTexture.texture_rgb.dirty = TRUE; - texture->baseTexture.texture_srgb.dirty = TRUE; - volume_add_dirty_box(volume, dirty_box); - - return WINED3D_OK; -} - -static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl = -{ - /* IUnknown */ - IWineD3DVolumeTextureImpl_QueryInterface, - IWineD3DVolumeTextureImpl_AddRef, - IWineD3DVolumeTextureImpl_Release, - /* resource */ - IWineD3DVolumeTextureImpl_GetParent, - IWineD3DVolumeTextureImpl_SetPrivateData, - IWineD3DVolumeTextureImpl_GetPrivateData, - IWineD3DVolumeTextureImpl_FreePrivateData, - IWineD3DVolumeTextureImpl_SetPriority, - IWineD3DVolumeTextureImpl_GetPriority, - IWineD3DVolumeTextureImpl_PreLoad, - IWineD3DVolumeTextureImpl_UnLoad, - IWineD3DVolumeTextureImpl_GetType, - /* BaseTexture */ - IWineD3DVolumeTextureImpl_SetLOD, - IWineD3DVolumeTextureImpl_GetLOD, - IWineD3DVolumeTextureImpl_GetLevelCount, - IWineD3DVolumeTextureImpl_SetAutoGenFilterType, - IWineD3DVolumeTextureImpl_GetAutoGenFilterType, - IWineD3DVolumeTextureImpl_GenerateMipSubLevels, - IWineD3DVolumeTextureImpl_SetDirty, - IWineD3DVolumeTextureImpl_GetDirty, - /* not in d3d */ - IWineD3DVolumeTextureImpl_BindTexture, - IWineD3DVolumeTextureImpl_IsCondNP2, - /* volume texture */ - IWineD3DVolumeTextureImpl_GetLevelDesc, - IWineD3DVolumeTextureImpl_GetVolumeLevel, - IWineD3DVolumeTextureImpl_LockBox, - IWineD3DVolumeTextureImpl_UnlockBox, - IWineD3DVolumeTextureImpl_AddDirtyBox -}; - -HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height, - UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, - WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) -{ - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); - UINT tmp_w, tmp_h, tmp_d; - unsigned int i; - HRESULT hr; - - /* TODO: It should only be possible to create textures for formats - * that are reported as supported. */ - if (WINED3DFMT_UNKNOWN >= format_id) - { - WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); - return WINED3DERR_INVALIDCALL; - } - - if (!gl_info->supported[EXT_TEXTURE3D]) - { - WARN("(%p) : Texture cannot be created - no volume texture support.\n", texture); - return WINED3DERR_INVALIDCALL; - } - - /* Calculate levels for mip mapping. */ - if (usage & WINED3DUSAGE_AUTOGENMIPMAP) - { - if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) - { - WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - - if (levels > 1) - { - WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - - levels = 1; - } - else if (!levels) - { - levels = wined3d_log2i(max(max(width, height), depth)) + 1; - TRACE("Calculated levels = %u.\n", levels); - } - - texture->lpVtbl = &IWineD3DVolumeTexture_Vtbl; - - hr = basetexture_init((IWineD3DBaseTextureImpl *)texture, 1, levels, - WINED3DRTYPE_VOLUMETEXTURE, device, 0, usage, format, pool, parent, parent_ops); - if (FAILED(hr)) - { - WARN("Failed to initialize basetexture, returning %#x.\n", hr); - return hr; - } - - /* Is NP2 support for volumes needed? */ - texture->baseTexture.pow2Matrix[0] = 1.0f; - texture->baseTexture.pow2Matrix[5] = 1.0f; - texture->baseTexture.pow2Matrix[10] = 1.0f; - texture->baseTexture.pow2Matrix[15] = 1.0f; - texture->baseTexture.target = GL_TEXTURE_3D; - - /* Generate all the surfaces. */ - tmp_w = width; - tmp_h = height; - tmp_d = depth; - - for (i = 0; i < texture->baseTexture.level_count; ++i) - { - IWineD3DVolume *volume; - - /* Create the volume. */ - hr = IWineD3DDeviceParent_CreateVolume(device->device_parent, parent, - tmp_w, tmp_h, tmp_d, format_id, pool, usage, &volume); - if (FAILED(hr)) - { - ERR("Creating a volume for the volume texture failed, hr %#x.\n", hr); - volumetexture_cleanup(texture); - return hr; - } - - /* Set its container to this texture. */ - volume_set_container((IWineD3DVolumeImpl *)volume, texture); - texture->baseTexture.sub_resources[i] = (IWineD3DResourceImpl *)volume; - - /* Calculate the next mipmap level. */ - tmp_w = max(1, tmp_w >> 1); - tmp_h = max(1, tmp_h >> 1); - tmp_d = max(1, tmp_d >> 1); - } - texture->baseTexture.internal_preload = volumetexture_internal_preload; - - return WINED3D_OK; -} diff --git a/dll/directx/wine/wined3d/wined3d.spec b/dll/directx/wine/wined3d/wined3d.spec index c375b385d49..fd8e8ea4293 100644 --- a/dll/directx/wine/wined3d/wined3d.spec +++ b/dll/directx/wine/wined3d/wined3d.spec @@ -1,4 +1,298 @@ -@ stdcall WineDirect3DCreate(long ptr) -@ stdcall WineDirect3DCreateClipper() @ stdcall wined3d_mutex_lock() @ stdcall wined3d_mutex_unlock() + +@ cdecl wined3d_check_depth_stencil_match(ptr long long long long long) +@ cdecl wined3d_check_device_format(ptr long long long long long long long) +@ cdecl wined3d_check_device_format_conversion(ptr long long long long) +@ cdecl wined3d_check_device_multisample_type(ptr long long long long long ptr) +@ cdecl wined3d_check_device_type(ptr long long long long long) +@ cdecl wined3d_create(long ptr) +@ cdecl wined3d_decref(ptr) +@ cdecl wined3d_enum_adapter_modes(ptr long long long ptr) +@ cdecl wined3d_get_adapter_count(ptr) +@ cdecl wined3d_get_adapter_display_mode(ptr long ptr) +@ cdecl wined3d_get_adapter_identifier(ptr long long ptr) +@ cdecl wined3d_get_adapter_mode_count(ptr long long) +@ cdecl wined3d_get_adapter_monitor(ptr long) +@ cdecl wined3d_get_device_caps(ptr long long ptr) +@ cdecl wined3d_get_parent(ptr) +@ cdecl wined3d_incref(ptr) +@ cdecl wined3d_register_software_device(ptr ptr) + +@ cdecl wined3d_buffer_create(ptr ptr ptr ptr ptr ptr) +@ cdecl wined3d_buffer_create_ib(ptr long long long ptr ptr ptr) +@ cdecl wined3d_buffer_create_vb(ptr long long long ptr ptr ptr) +@ cdecl wined3d_buffer_decref(ptr) +@ cdecl wined3d_buffer_free_private_data(ptr ptr) +@ cdecl wined3d_buffer_get_parent(ptr) +@ cdecl wined3d_buffer_get_priority(ptr) +@ cdecl wined3d_buffer_get_private_data(ptr ptr ptr ptr) +@ cdecl wined3d_buffer_get_resource(ptr) +@ cdecl wined3d_buffer_incref(ptr) +@ cdecl wined3d_buffer_map(ptr long long ptr long) +@ cdecl wined3d_buffer_preload(ptr) +@ cdecl wined3d_buffer_set_priority(ptr long) +@ cdecl wined3d_buffer_set_private_data(ptr ptr ptr long long) +@ cdecl wined3d_buffer_unmap(ptr) + +@ cdecl wined3d_clipper_create() +@ cdecl wined3d_clipper_decref(ptr) +@ cdecl wined3d_clipper_get_clip_list(ptr ptr ptr ptr) +@ cdecl wined3d_clipper_get_window(ptr ptr) +@ cdecl wined3d_clipper_incref(ptr) +@ cdecl wined3d_clipper_is_clip_list_changed(ptr ptr) +@ cdecl wined3d_clipper_set_clip_list(ptr ptr long) +@ cdecl wined3d_clipper_set_window(ptr long ptr) + +@ cdecl wined3d_device_acquire_focus_window(ptr ptr) +@ cdecl wined3d_device_begin_scene(ptr) +@ cdecl wined3d_device_begin_stateblock(ptr) +@ cdecl wined3d_device_clear(ptr long ptr long long long long) +@ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr) +@ cdecl wined3d_device_color_fill(ptr ptr ptr ptr) +@ cdecl wined3d_device_create(ptr long long ptr long ptr ptr) +@ cdecl wined3d_device_decref(ptr) +@ cdecl wined3d_device_delete_patch(ptr long) +@ cdecl wined3d_device_draw_indexed_primitive(ptr long long) +@ cdecl wined3d_device_draw_indexed_primitive_strided(ptr long ptr long ptr long) +@ cdecl wined3d_device_draw_indexed_primitive_up(ptr long ptr long ptr long) +@ cdecl wined3d_device_draw_primitive(ptr long long) +@ cdecl wined3d_device_draw_primitive_strided(ptr long ptr) +@ cdecl wined3d_device_draw_primitive_up(ptr long ptr long) +@ cdecl wined3d_device_draw_rect_patch(ptr long ptr ptr) +@ cdecl wined3d_device_draw_tri_patch(ptr long ptr ptr) +@ cdecl wined3d_device_end_scene(ptr) +@ cdecl wined3d_device_end_stateblock(ptr ptr) +@ cdecl wined3d_device_enum_resources(ptr ptr ptr) +@ cdecl wined3d_device_evict_managed_resources(ptr) +@ cdecl wined3d_device_get_available_texture_mem(ptr) +@ cdecl wined3d_device_get_back_buffer(ptr long long long ptr) +@ cdecl wined3d_device_get_base_vertex_index(ptr) +@ cdecl wined3d_device_get_clip_plane(ptr long ptr) +@ cdecl wined3d_device_get_clip_status(ptr ptr) +@ cdecl wined3d_device_get_creation_parameters(ptr ptr) +@ cdecl wined3d_device_get_current_texture_palette(ptr ptr) +@ cdecl wined3d_device_get_depth_stencil(ptr ptr) +@ cdecl wined3d_device_get_device_caps(ptr ptr) +@ cdecl wined3d_device_get_display_mode(ptr long ptr) +@ cdecl wined3d_device_get_front_buffer_data(ptr long ptr) +@ cdecl wined3d_device_get_gamma_ramp(ptr long ptr) +@ cdecl wined3d_device_get_index_buffer(ptr ptr) +@ cdecl wined3d_device_get_light(ptr long ptr) +@ cdecl wined3d_device_get_light_enable(ptr long ptr) +@ cdecl wined3d_device_get_material(ptr ptr) +@ cdecl wined3d_device_get_npatch_mode(ptr) +@ cdecl wined3d_device_get_palette_entries(ptr long ptr) +@ cdecl wined3d_device_get_pixel_shader(ptr) +@ cdecl wined3d_device_get_primitive_type(ptr ptr) +@ cdecl wined3d_device_get_ps_consts_b(ptr long ptr long) +@ cdecl wined3d_device_get_ps_consts_f(ptr long ptr long) +@ cdecl wined3d_device_get_ps_consts_i(ptr long ptr long) +@ cdecl wined3d_device_get_raster_status(ptr long ptr) +@ cdecl wined3d_device_get_render_state(ptr long ptr) +@ cdecl wined3d_device_get_render_target(ptr long ptr) +@ cdecl wined3d_device_get_sampler_state(ptr long long ptr) +@ cdecl wined3d_device_get_scissor_rect(ptr ptr) +@ cdecl wined3d_device_get_software_vertex_processing(ptr) +@ cdecl wined3d_device_get_stream_source(ptr long ptr ptr ptr) +@ cdecl wined3d_device_get_stream_source_freq(ptr long ptr) +@ cdecl wined3d_device_get_surface_from_dc(ptr ptr ptr) +@ cdecl wined3d_device_get_swapchain(ptr long ptr) +@ cdecl wined3d_device_get_swapchain_count(ptr) +@ cdecl wined3d_device_get_texture(ptr long ptr) +@ cdecl wined3d_device_get_texture_stage_state(ptr long long ptr) +@ cdecl wined3d_device_get_transform(ptr long ptr) +@ cdecl wined3d_device_get_vertex_declaration(ptr ptr) +@ cdecl wined3d_device_get_vertex_shader(ptr) +@ cdecl wined3d_device_get_viewport(ptr ptr) +@ cdecl wined3d_device_get_vs_consts_b(ptr long ptr long) +@ cdecl wined3d_device_get_vs_consts_f(ptr long ptr long) +@ cdecl wined3d_device_get_vs_consts_i(ptr long ptr long) +@ cdecl wined3d_device_get_wined3d(ptr ptr) +@ cdecl wined3d_device_incref(ptr) +@ cdecl wined3d_device_init_3d(ptr ptr) +@ cdecl wined3d_device_init_gdi(ptr ptr) +@ cdecl wined3d_device_multiply_transform(ptr long ptr) +@ cdecl wined3d_device_present(ptr ptr ptr ptr ptr) +@ cdecl wined3d_device_process_vertices(ptr long long long ptr ptr long long) +@ cdecl wined3d_device_release_focus_window(ptr) +@ cdecl wined3d_device_reset(ptr ptr) +@ cdecl wined3d_device_restore_fullscreen_window(ptr ptr) +@ cdecl wined3d_device_set_base_vertex_index(ptr long) +@ cdecl wined3d_device_set_clip_plane(ptr long ptr) +@ cdecl wined3d_device_set_clip_status(ptr ptr) +@ cdecl wined3d_device_set_current_texture_palette(ptr long) +@ cdecl wined3d_device_set_cursor_position(ptr long long long) +@ cdecl wined3d_device_set_cursor_properties(ptr long long ptr) +@ cdecl wined3d_device_set_depth_stencil(ptr ptr) +@ cdecl wined3d_device_set_dialog_box_mode(ptr long) +@ cdecl wined3d_device_set_display_mode(ptr long ptr) +@ cdecl wined3d_device_set_gamma_ramp(ptr long long ptr) +@ cdecl wined3d_device_set_index_buffer(ptr ptr long) +@ cdecl wined3d_device_set_light(ptr long ptr) +@ cdecl wined3d_device_set_light_enable(ptr long long) +@ cdecl wined3d_device_set_material(ptr ptr) +@ cdecl wined3d_device_set_multithreaded(ptr) +@ cdecl wined3d_device_set_npatch_mode(ptr long) +@ cdecl wined3d_device_set_palette_entries(ptr long ptr) +@ cdecl wined3d_device_set_pixel_shader(ptr ptr) +@ cdecl wined3d_device_set_primitive_type(ptr long) +@ cdecl wined3d_device_set_ps_consts_b(ptr long ptr long) +@ cdecl wined3d_device_set_ps_consts_f(ptr long ptr long) +@ cdecl wined3d_device_set_ps_consts_i(ptr long ptr long) +@ cdecl wined3d_device_set_render_state(ptr long long) +@ cdecl wined3d_device_set_render_target(ptr long ptr long) +@ cdecl wined3d_device_set_sampler_state(ptr long long long) +@ cdecl wined3d_device_set_scissor_rect(ptr ptr) +@ cdecl wined3d_device_set_software_vertex_processing(ptr long) +@ cdecl wined3d_device_set_stream_source(ptr long ptr long long) +@ cdecl wined3d_device_set_stream_source_freq(ptr long long) +@ cdecl wined3d_device_set_texture(ptr long ptr) +@ cdecl wined3d_device_set_texture_stage_state(ptr long long long) +@ cdecl wined3d_device_set_transform(ptr long ptr) +@ cdecl wined3d_device_set_vertex_declaration(ptr ptr) +@ cdecl wined3d_device_set_vertex_shader(ptr ptr) +@ cdecl wined3d_device_set_viewport(ptr ptr) +@ cdecl wined3d_device_set_vs_consts_b(ptr long ptr long) +@ cdecl wined3d_device_set_vs_consts_f(ptr long ptr long) +@ cdecl wined3d_device_set_vs_consts_i(ptr long ptr long) +@ cdecl wined3d_device_setup_fullscreen_window(ptr ptr long long) +@ cdecl wined3d_device_show_cursor(ptr long) +@ cdecl wined3d_device_uninit_3d(ptr) +@ cdecl wined3d_device_uninit_gdi(ptr) +@ cdecl wined3d_device_update_surface(ptr ptr ptr ptr ptr) +@ cdecl wined3d_device_update_texture(ptr ptr ptr) +@ cdecl wined3d_device_validate_device(ptr ptr) + +@ cdecl wined3d_palette_create(ptr long ptr ptr ptr) +@ cdecl wined3d_palette_decref(ptr) +@ cdecl wined3d_palette_get_entries(ptr long long long ptr) +@ cdecl wined3d_palette_get_flags(ptr) +@ cdecl wined3d_palette_get_parent(ptr) +@ cdecl wined3d_palette_incref(ptr) +@ cdecl wined3d_palette_set_entries(ptr long long long ptr) + +@ cdecl wined3d_query_create(ptr long ptr) +@ cdecl wined3d_query_decref(ptr) +@ cdecl wined3d_query_get_data(ptr ptr long long) +@ cdecl wined3d_query_get_data_size(ptr) +@ cdecl wined3d_query_get_type(ptr) +@ cdecl wined3d_query_incref(ptr) +@ cdecl wined3d_query_issue(ptr long) + +@ cdecl wined3d_resource_get_desc(ptr ptr) +@ cdecl wined3d_resource_get_parent(ptr) + +@ cdecl wined3d_rendertarget_view_create(ptr ptr ptr) +@ cdecl wined3d_rendertarget_view_decref(ptr) +@ cdecl wined3d_rendertarget_view_get_parent(ptr) +@ cdecl wined3d_rendertarget_view_get_resource(ptr) +@ cdecl wined3d_rendertarget_view_incref(ptr) + +@ cdecl wined3d_shader_create_gs(ptr ptr ptr ptr ptr ptr) +@ cdecl wined3d_shader_create_ps(ptr ptr ptr ptr ptr ptr) +@ cdecl wined3d_shader_create_vs(ptr ptr ptr ptr ptr ptr) +@ cdecl wined3d_shader_decref(ptr) +@ cdecl wined3d_shader_get_byte_code(ptr ptr ptr) +@ cdecl wined3d_shader_get_parent(ptr) +@ cdecl wined3d_shader_incref(ptr) +@ cdecl wined3d_shader_set_local_constants_float(ptr long ptr long) + +@ cdecl wined3d_stateblock_apply(ptr) +@ cdecl wined3d_stateblock_capture(ptr) +@ cdecl wined3d_stateblock_create(ptr long ptr) +@ cdecl wined3d_stateblock_decref(ptr) +@ cdecl wined3d_stateblock_incref(ptr) + +@ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long) +@ cdecl wined3d_surface_bltfast(ptr long long ptr ptr long) +@ cdecl wined3d_surface_create(ptr long long long long long long long long long long long ptr ptr ptr) +@ cdecl wined3d_surface_decref(ptr) +@ cdecl wined3d_surface_flip(ptr ptr long) +@ cdecl wined3d_surface_free_private_data(ptr ptr) +@ cdecl wined3d_surface_get_blt_status(ptr long) +@ cdecl wined3d_surface_get_clipper(ptr) +@ cdecl wined3d_surface_get_flip_status(ptr long) +@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr) +@ cdecl wined3d_surface_get_palette(ptr) +@ cdecl wined3d_surface_get_parent(ptr) +@ cdecl wined3d_surface_get_pitch(ptr) +@ cdecl wined3d_surface_get_priority(ptr) +@ cdecl wined3d_surface_get_private_data(ptr ptr ptr ptr) +@ cdecl wined3d_surface_get_resource(ptr) +@ cdecl wined3d_surface_getdc(ptr ptr) +@ cdecl wined3d_surface_incref(ptr) +@ cdecl wined3d_surface_is_lost(ptr) +@ cdecl wined3d_surface_map(ptr ptr ptr long) +@ cdecl wined3d_surface_preload(ptr) +@ cdecl wined3d_surface_releasedc(ptr ptr) +@ cdecl wined3d_surface_restore(ptr) +@ cdecl wined3d_surface_set_clipper(ptr ptr) +@ cdecl wined3d_surface_set_color_key(ptr long ptr) +@ cdecl wined3d_surface_set_format(ptr long) +@ cdecl wined3d_surface_set_mem(ptr ptr) +@ cdecl wined3d_surface_set_overlay_position(ptr long long) +@ cdecl wined3d_surface_set_palette(ptr ptr) +@ cdecl wined3d_surface_set_priority(ptr long) +@ cdecl wined3d_surface_set_private_data(ptr ptr ptr long long) +@ cdecl wined3d_surface_unmap(ptr) +@ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr) +@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr) + +@ cdecl wined3d_swapchain_create(ptr ptr long ptr ptr ptr) +@ cdecl wined3d_swapchain_decref(ptr) +@ cdecl wined3d_swapchain_get_back_buffer(ptr long long ptr) +@ cdecl wined3d_swapchain_get_device(ptr) +@ cdecl wined3d_swapchain_get_display_mode(ptr ptr) +@ cdecl wined3d_swapchain_get_front_buffer_data(ptr ptr) +@ cdecl wined3d_swapchain_get_gamma_ramp(ptr ptr) +@ cdecl wined3d_swapchain_get_parent(ptr) +@ cdecl wined3d_swapchain_get_present_parameters(ptr ptr) +@ cdecl wined3d_swapchain_get_raster_status(ptr ptr) +@ cdecl wined3d_swapchain_incref(ptr) +@ cdecl wined3d_swapchain_present(ptr ptr ptr ptr ptr long) +@ cdecl wined3d_swapchain_set_gamma_ramp(ptr long ptr) +@ cdecl wined3d_swapchain_set_window(ptr ptr) + +@ cdecl wined3d_texture_add_dirty_region(ptr long ptr) +@ cdecl wined3d_texture_create_2d(ptr long long long long long long ptr ptr ptr) +@ cdecl wined3d_texture_create_3d(ptr long long long long long long long ptr ptr ptr) +@ cdecl wined3d_texture_create_cube(ptr long long long long long ptr ptr ptr) +@ cdecl wined3d_texture_decref(ptr) +@ cdecl wined3d_texture_free_private_data(ptr ptr) +@ cdecl wined3d_texture_generate_mipmaps(ptr) +@ cdecl wined3d_texture_get_autogen_filter_type(ptr) +@ cdecl wined3d_texture_get_level_count(ptr) +@ cdecl wined3d_texture_get_lod(ptr) +@ cdecl wined3d_texture_get_parent(ptr) +@ cdecl wined3d_texture_get_priority(ptr) +@ cdecl wined3d_texture_get_private_data(ptr ptr ptr ptr) +@ cdecl wined3d_texture_get_sub_resource(ptr long) +@ cdecl wined3d_texture_get_type(ptr) +@ cdecl wined3d_texture_incref(ptr) +@ cdecl wined3d_texture_preload(ptr) +@ cdecl wined3d_texture_set_autogen_filter_type(ptr long) +@ cdecl wined3d_texture_set_lod(ptr long) +@ cdecl wined3d_texture_set_priority(ptr long) +@ cdecl wined3d_texture_set_private_data(ptr ptr ptr long long) + +@ cdecl wined3d_vertex_declaration_create(ptr ptr long ptr ptr ptr) +@ cdecl wined3d_vertex_declaration_create_from_fvf(ptr long ptr ptr ptr) +@ cdecl wined3d_vertex_declaration_decref(ptr) +@ cdecl wined3d_vertex_declaration_get_parent(ptr) +@ cdecl wined3d_vertex_declaration_incref(ptr) + +@ cdecl wined3d_volume_create(ptr long long long long long long ptr ptr ptr) +@ cdecl wined3d_volume_decref(ptr) +@ cdecl wined3d_volume_free_private_data(ptr ptr) +@ cdecl wined3d_volume_from_resource(ptr) +@ cdecl wined3d_volume_get_parent(ptr) +@ cdecl wined3d_volume_get_priority(ptr) +@ cdecl wined3d_volume_get_private_data(ptr ptr ptr ptr) +@ cdecl wined3d_volume_get_resource(ptr) +@ cdecl wined3d_volume_incref(ptr) +@ cdecl wined3d_volume_map(ptr ptr ptr long) +@ cdecl wined3d_volume_preload(ptr) +@ cdecl wined3d_volume_set_priority(ptr long) +@ cdecl wined3d_volume_set_private_data(ptr ptr ptr long long) +@ cdecl wined3d_volume_unmap(ptr) diff --git a/dll/directx/wine/wined3d/wined3d_gl.h b/dll/directx/wine/wined3d/wined3d_gl.h index 9c2c0c1594c..be50b2f672b 100644 --- a/dll/directx/wine/wined3d/wined3d_gl.h +++ b/dll/directx/wine/wined3d/wined3d_gl.h @@ -1744,7 +1744,6 @@ typedef enum wined3d_gl_extension ARB_GEOMETRY_SHADER4, ARB_HALF_FLOAT_PIXEL, ARB_HALF_FLOAT_VERTEX, - ARB_IMAGING, ARB_MAP_BUFFER_RANGE, ARB_MULTISAMPLE, ARB_MULTITEXTURE, @@ -1786,6 +1785,7 @@ typedef enum wined3d_gl_extension EXT_BLEND_EQUATION_SEPARATE, EXT_BLEND_FUNC_SEPARATE, EXT_BLEND_MINMAX, + EXT_BLEND_SUBTRACT, EXT_DRAW_BUFFERS2, EXT_DEPTH_BOUNDS_TEST, EXT_FOG_COORD, @@ -1810,6 +1810,7 @@ typedef enum wined3d_gl_extension EXT_TEXTURE_FILTER_ANISOTROPIC, EXT_TEXTURE_LOD_BIAS, EXT_TEXTURE_SRGB, + EXT_TEXTURE_SRGB_DECODE, EXT_VERTEX_ARRAY_BGRA, /* NVIDIA */ NV_DEPTH_CLAMP, @@ -1834,9 +1835,9 @@ typedef enum wined3d_gl_extension NV_VERTEX_PROGRAM3, /* SGI */ SGIS_GENERATE_MIPMAP, - SGI_VIDEO_SYNC, /* WGL extensions */ WGL_ARB_PIXEL_FORMAT, + WGL_EXT_SWAP_CONTROL, WGL_WINE_PIXEL_FORMAT_PASSTHROUGH, /* Internally used */ WINED3D_GL_NORMALIZED_TEXRECT, @@ -2146,88 +2147,6 @@ typedef void (WINE_GLAPI *PGLFNFRAMEBUFFERTEXTUREFACEARBPROC)(GLenum target, GLe #define GL_HALF_FLOAT 0x140b #endif -/* GL_ARB_imaging */ -#ifndef GL_ARB_imaging -#define GL_ARB_imaging 1 -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_FUNC_ADD 0x8006 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BLEND_EQUATION 0x8009 -#define GL_FUNC_SUBTRACT 0x800a -#define GL_FUNC_REVERSE_SUBTRACT 0x800b -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801a -#define GL_MAX_CONVOLUTION_HEIGHT 0x801b -#define GL_POST_CONVOLUTION_RED_SCALE 0x801d -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801f -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801e -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801f -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802a -#define GL_HISTOGRAM_ALPHA_SIZE 0x802b -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802c -#define GL_HISTOGRAM_SINK 0x802d -#define GL_MINMAX 0x802e -#define GL_MINMAX_FORMAT 0x802f -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_COLOR_MATRIX 0x80b1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80b2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80b3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80b4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80b5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80b6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80b7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80b8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80b9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80ba -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80bb -#define GL_COLOR_TABLE 0x80d0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80d1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80d2 -#define GL_PROXY_COLOR_TABLE 0x80d3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80d4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80d5 -#define GL_COLOR_TABLE_SCALE 0x80d6 -#define GL_COLOR_TABLE_BIAS 0x80d7 -#define GL_COLOR_TABLE_FORMAT 0x80d8 -#define GL_COLOR_TABLE_WIDTH 0x80d9 -#define GL_COLOR_TABLE_RED_SIZE 0x80da -#define GL_COLOR_TABLE_GREEN_SIZE 0x80db -#define GL_COLOR_TABLE_BLUE_SIZE 0x80dc -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80dd -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80de -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80df -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#endif -typedef void (WINE_GLAPI *PGLFNBLENDCOLORPROC)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONPROC)(GLenum mode); - /* GL_ARB_map_buffer_range */ #ifndef GL_ARB_map_buffer_range #define GL_ARB_map_buffer_range 1 @@ -2969,6 +2888,18 @@ typedef void (WINE_GLAPI *PGLFNSTENCILFUNCSEPARATEATIPROC)(GLenum, GLenum, GLint #define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 #endif +/* GL_EXT_blend_color */ +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +#endif +typedef GLvoid (WINE_GLAPI *PGLFNBLENDCOLOREXTPROC)(GLclampf red, + GLclampf green, GLclampf blue, GLclampf alpha); + /* GL_EXT_blend_equation_separate */ typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLenum modeAlpha); @@ -2983,6 +2914,23 @@ typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLe typedef void (WINE_GLAPI *PGLFNBLENDFUNCSEPARATEEXTPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +/* GL_EXT_blend_minmax */ +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_BLEND_EQUATION_EXT 0x8009 +#endif +typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONEXTPROC)(GLenum mode); + +/* GL_EXT_blend_subtract */ +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 +#define GL_FUNC_SUBTRACT_EXT 0x800a +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800b +#endif + /* GL_EXT_depth_bounds_test */ #ifndef GL_EXT_depth_bounds_test #define GL_EXT_depth_bounds_test 1 @@ -3412,6 +3360,14 @@ typedef void (WINE_GLAPI *PGLFNGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint l #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8c4f #endif +/* GL_EXT_texture_sRGB_decode */ +#ifndef GL_EXT_texture_sRGB_decode +#define GL_EXT_texture_sRGB_decode 1 +#define GL_TEXTURE_SRGB_DECODE_EXT 0x8a48 +#define GL_DECODE_EXT 0x8a49 +#define GL_SKIP_DECODE_EXT 0x8a4a +#endif + /* GL_NV_depth_clamp */ #ifndef GL_NV_depth_clamp #define GL_NV_depth_clamp 1 @@ -3711,16 +3667,12 @@ typedef void (WINE_GLAPI *PGLFNGETCOMBINERSTAGEPARAMETERFVNVPROC)(GLenum stage, #endif /* GL_SGIS_generate_mipmap */ -#ifndef GLX_SGIS_generate_mipmap -#define GLX_SGIS_generate_mipmap 1 +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 #define GL_GENERATE_MIPMAP_SGIS 0x8191 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 #endif -/* GLX_SGI_video_sync */ -typedef int (WINE_GLAPI *PGLXFNGETVIDEOSYNCSGIPROC)(unsigned int *); -typedef int (WINE_GLAPI *PGLXFNWAITVIDEOSYNCSGIPROC)(int, int, unsigned int *); - /* WGL_ARB_extensions_string */ typedef const char *(WINAPI *WINED3D_PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc); @@ -3801,6 +3753,8 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLCHOOSEPIXELFORMATARBPROC)(HDC hdc, const int typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd); +typedef BOOL (WINAPI *WINED3D_PFNWGLSWAPINTERVALEXTPROC)(int interval); + #define GL_EXT_FUNCS_GEN \ /* GL_APPLE_fence */ \ USE_GL_FUNC(PGLFNGENFENCESAPPLEPROC, \ @@ -3885,11 +3839,6 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma glFramebufferTextureLayerARB, ARB_GEOMETRY_SHADER4, NULL) \ USE_GL_FUNC(PGLFNFRAMEBUFFERTEXTUREFACEARBPROC, \ glFramebufferTextureFaceARB, ARB_GEOMETRY_SHADER4, NULL) \ - /* GL_ARB_imaging, GL_EXT_blend_minmax */ \ - USE_GL_FUNC(PGLFNBLENDCOLORPROC, \ - glBlendColorEXT, EXT_BLEND_COLOR, NULL) \ - USE_GL_FUNC(PGLFNBLENDEQUATIONPROC, \ - glBlendEquationEXT, EXT_BLEND_MINMAX, NULL) \ /* GL_ARB_map_buffer_range */ \ USE_GL_FUNC(PGLFNMAPBUFFERRANGEPROC, \ glMapBufferRange, ARB_MAP_BUFFER_RANGE, NULL) \ @@ -4224,12 +4173,18 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma glStencilOpSeparateATI, ATI_SEPARATE_STENCIL, NULL) \ USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEATIPROC, \ glStencilFuncSeparateATI, ATI_SEPARATE_STENCIL, NULL) \ + /* GL_EXT_blend_color */ \ + USE_GL_FUNC(PGLFNBLENDCOLOREXTPROC, \ + glBlendColorEXT, EXT_BLEND_COLOR, NULL) \ /* GL_EXT_blend_equation_separate */ \ USE_GL_FUNC(PGLFNBLENDFUNCSEPARATEEXTPROC, \ glBlendFuncSeparateEXT, EXT_BLEND_FUNC_SEPARATE, NULL) \ /* GL_EXT_blend_func_separate */ \ USE_GL_FUNC(PGLFNBLENDEQUATIONSEPARATEEXTPROC, \ glBlendEquationSeparateEXT, EXT_BLEND_EQUATION_SEPARATE, NULL) \ + /* GL_EXT_blend_minmax */ \ + USE_GL_FUNC(PGLFNBLENDEQUATIONEXTPROC, \ + glBlendEquationEXT, EXT_BLEND_MINMAX, NULL) \ /* GL_EXT_depth_bounds_test */ \ USE_GL_FUNC(PGLFNDEPTHBOUNDSEXTPROC, \ glDepthBoundsEXT, EXT_DEPTH_BOUNDS_TEST, NULL) \ @@ -4530,17 +4485,13 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma glCombinerParameterivNV, NV_REGISTER_COMBINERS, NULL) \ USE_GL_FUNC(PGLFNFINALCOMBINERINPUTNVPROC, \ glFinalCombinerInputNV, NV_REGISTER_COMBINERS, NULL) \ - /* GLX_SGI_video_sync */ \ - USE_GL_FUNC(PGLXFNGETVIDEOSYNCSGIPROC, \ - glXGetVideoSyncSGI, SGI_VIDEO_SYNC, NULL) \ - USE_GL_FUNC(PGLXFNWAITVIDEOSYNCSGIPROC, \ - glXWaitVideoSyncSGI, SGI_VIDEO_SYNC, NULL) #define WGL_EXT_FUNCS_GEN \ USE_GL_FUNC(WINED3D_PFNWGLGETEXTENSIONSSTRINGARBPROC, wglGetExtensionsStringARB, 0, NULL) \ USE_GL_FUNC(WINED3D_PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB, 0, NULL) \ USE_GL_FUNC(WINED3D_PFNWGLGETPIXELFORMATATTRIBFVARBPROC, wglGetPixelFormatAttribfvARB, 0, NULL) \ USE_GL_FUNC(WINED3D_PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB, 0, NULL) \ - USE_GL_FUNC(WINED3D_PFNWGLSETPIXELFORMATWINE, wglSetPixelFormatWINE, 0, NULL) + USE_GL_FUNC(WINED3D_PFNWGLSETPIXELFORMATWINE, wglSetPixelFormatWINE, 0, NULL) \ + USE_GL_FUNC(WINED3D_PFNWGLSWAPINTERVALEXTPROC, wglSwapIntervalEXT, 0, NULL) #endif /* __WINE_WINED3D_GL */ diff --git a/dll/directx/wine/wined3d/wined3d_main.c b/dll/directx/wine/wined3d/wined3d_main.c index 26945efb860..4f7b1cb03a1 100644 --- a/dll/directx/wine/wined3d/wined3d_main.c +++ b/dll/directx/wine/wined3d/wined3d_main.c @@ -32,8 +32,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); struct wined3d_wndproc { HWND window; + BOOL unicode; WNDPROC proc; - IWineD3DDeviceImpl *device; + struct wined3d_device *device; }; struct wined3d_wndproc_table @@ -61,7 +62,7 @@ static CRITICAL_SECTION wined3d_cs = {&wined3d_cs_debug, -1, 0, 0, 0, 0}; /* When updating default value here, make sure to update winecfg as well, * where appropriate. */ -wined3d_settings_t wined3d_settings = +struct wined3d_settings wined3d_settings = { VS_HW, /* Hardware by default */ PS_HW, /* Hardware by default */ @@ -77,9 +78,9 @@ wined3d_settings_t wined3d_settings = }; /* Do not call while under the GL lock. */ -IWineD3D * WINAPI WineDirect3DCreate(UINT version, void *parent) +struct wined3d * CDECL wined3d_create(UINT version, void *parent) { - IWineD3DImpl *object; + struct wined3d *object; HRESULT hr; object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); @@ -99,7 +100,7 @@ IWineD3D * WINAPI WineDirect3DCreate(UINT version, void *parent) TRACE("Created wined3d object %p for d3d%d support.\n", object, version); - return (IWineD3D *)object; + return object; } static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size) @@ -354,8 +355,13 @@ static BOOL wined3d_dll_destroy(HINSTANCE hInstDLL) for (i = 0; i < wndproc_table.count; ++i) { - struct wined3d_wndproc *entry = &wndproc_table.entries[i]; - SetWindowLongPtrW(entry->window, GWLP_WNDPROC, (LONG_PTR)entry->proc); + /* Trying to unregister these would be futile. These entries can only + * exist if either we skipped them in wined3d_unregister_window() due + * to the application replacing the wndproc after the entry was + * registered, or if the application still has an active wined3d + * device. In the latter case the application has bigger problems than + * these entries. */ + WARN("Leftover wndproc table entry %p.\n", &wndproc_table.entries[i]); } HeapFree(GetProcessHeap(), 0, wndproc_table.entries); @@ -393,7 +399,8 @@ static struct wined3d_wndproc *wined3d_find_wndproc(HWND window) static LRESULT CALLBACK wined3d_wndproc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) { struct wined3d_wndproc *entry; - IWineD3DDeviceImpl *device; + struct wined3d_device *device; + BOOL unicode; WNDPROC proc; wined3d_mutex_lock(); @@ -407,18 +414,26 @@ static LRESULT CALLBACK wined3d_wndproc(HWND window, UINT message, WPARAM wparam } device = entry->device; + unicode = entry->unicode; proc = entry->proc; wined3d_mutex_unlock(); - return device_process_message(device, window, message, wparam, lparam, proc); + return device_process_message(device, window, unicode, message, wparam, lparam, proc); } -BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device) +BOOL wined3d_register_window(HWND window, struct wined3d_device *device) { struct wined3d_wndproc *entry; wined3d_mutex_lock(); + if (wined3d_find_wndproc(window)) + { + wined3d_mutex_unlock(); + WARN("Window %p is already registered with wined3d.\n", window); + return TRUE; + } + if (wndproc_table.size == wndproc_table.count) { unsigned int new_size = max(1, wndproc_table.size * 2); @@ -440,7 +455,14 @@ BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device) entry = &wndproc_table.entries[wndproc_table.count++]; entry->window = window; - entry->proc = (WNDPROC)SetWindowLongPtrW(window, GWLP_WNDPROC, (LONG_PTR)wined3d_wndproc); + entry->unicode = IsWindowUnicode(window); + /* Set a window proc that matches the window. Some applications (e.g. NoX) + * replace the window proc after we've set ours, and expect to be able to + * call the previous one (ours) directly, without using CallWindowProc(). */ + if (entry->unicode) + entry->proc = (WNDPROC)SetWindowLongPtrW(window, GWLP_WNDPROC, (LONG_PTR)wined3d_wndproc); + else + entry->proc = (WNDPROC)SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)wined3d_wndproc); entry->device = device; wined3d_mutex_unlock(); @@ -450,27 +472,49 @@ BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device) void wined3d_unregister_window(HWND window) { - unsigned int i; + struct wined3d_wndproc *entry, *last; + LONG_PTR proc; wined3d_mutex_lock(); - for (i = 0; i < wndproc_table.count; ++i) + + if (!(entry = wined3d_find_wndproc(window))) { - if (wndproc_table.entries[i].window == window) + wined3d_mutex_unlock(); + ERR("Window %p is not registered with wined3d.\n", window); + return; + } + + if (entry->unicode) + { + proc = GetWindowLongPtrW(window, GWLP_WNDPROC); + if (proc != (LONG_PTR)wined3d_wndproc) { - struct wined3d_wndproc *entry = &wndproc_table.entries[i]; - struct wined3d_wndproc *last = &wndproc_table.entries[--wndproc_table.count]; - - if (GetWindowLongPtrW(window, GWLP_WNDPROC) == (LONG_PTR)wined3d_wndproc) - SetWindowLongPtrW(window, GWLP_WNDPROC, (LONG_PTR)entry->proc); - if (entry != last) *entry = *last; wined3d_mutex_unlock(); - + WARN("Not unregistering window %p, window proc %#lx doesn't match wined3d window proc %p.\n", + window, proc, wined3d_wndproc); return; } - } - wined3d_mutex_unlock(); - ERR("Window %p is not registered with wined3d.\n", window); + SetWindowLongPtrW(window, GWLP_WNDPROC, (LONG_PTR)entry->proc); + } + else + { + proc = GetWindowLongPtrA(window, GWLP_WNDPROC); + if (proc != (LONG_PTR)wined3d_wndproc) + { + wined3d_mutex_unlock(); + WARN("Not unregistering window %p, window proc %#lx doesn't match wined3d window proc %p.\n", + window, proc, wined3d_wndproc); + return; + } + + SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)entry->proc); + } + + last = &wndproc_table.entries[--wndproc_table.count]; + if (entry != last) *entry = *last; + + wined3d_mutex_unlock(); } /* At process attach */ diff --git a/dll/directx/wine/wined3d/wined3d_private.h b/dll/directx/wine/wined3d/wined3d_private.h index 1956825be8f..88c300d7ac1 100644 --- a/dll/directx/wine/wined3d/wined3d_private.h +++ b/dll/directx/wine/wined3d/wined3d_private.h @@ -252,26 +252,27 @@ static inline float float_24_to_32(DWORD in) /* NOTE: When adding fields to this structure, make sure to update the default * values in wined3d_main.c as well. */ -typedef struct wined3d_settings_s { -/* vertex and pixel shader modes */ - int vs_mode; - int ps_mode; -/* Ideally, we don't want the user to have to request GLSL. If the hardware supports GLSL, - we should use it. However, until it's fully implemented, we'll leave it as a registry - setting for developers. */ - BOOL glslRequested; - int offscreen_rendering_mode; - int rendertargetlock_mode; - unsigned short pci_vendor_id; - unsigned short pci_device_id; -/* Memory tracking and object counting */ - unsigned int emulated_textureram; - char *logo; - int allow_multisampling; - BOOL strict_draw_ordering; -} wined3d_settings_t; +struct wined3d_settings +{ + /* vertex and pixel shader modes */ + int vs_mode; + int ps_mode; + /* Ideally, we don't want the user to have to request GLSL. If the + * hardware supports GLSL, we should use it. However, until it's fully + * implemented, we'll leave it as a registry setting for developers. */ + BOOL glslRequested; + int offscreen_rendering_mode; + int rendertargetlock_mode; + unsigned short pci_vendor_id; + unsigned short pci_device_id; + /* Memory tracking and object counting. */ + unsigned int emulated_textureram; + char *logo; + int allow_multisampling; + BOOL strict_draw_ordering; +}; -extern wined3d_settings_t wined3d_settings DECLSPEC_HIDDEN; +extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; typedef enum _WINED3DSAMPLER_TEXTURE_TYPE { @@ -309,6 +310,7 @@ typedef enum _WINED3DSHADER_PARAM_REGISTER_TYPE WINED3DSPR_IMMCONST, WINED3DSPR_CONSTBUFFER, WINED3DSPR_NULL, + WINED3DSPR_RESOURCE, } WINED3DSHADER_PARAM_REGISTER_TYPE; enum wined3d_immconst_type @@ -420,6 +422,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_DEF, WINED3DSIH_DEFB, WINED3DSIH_DEFI, + WINED3DSIH_DIV, WINED3DSIH_DP2ADD, WINED3DSIH_DP3, WINED3DSIH_DP4, @@ -434,12 +437,16 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_EXP, WINED3DSIH_EXPP, WINED3DSIH_FRC, + WINED3DSIH_FTOI, WINED3DSIH_IADD, + WINED3DSIH_IEQ, WINED3DSIH_IF, WINED3DSIH_IFC, WINED3DSIH_IGE, WINED3DSIH_IMUL, + WINED3DSIH_ITOF, WINED3DSIH_LABEL, + WINED3DSIH_LD, WINED3DSIH_LIT, WINED3DSIH_LOG, WINED3DSIH_LOGP, @@ -466,11 +473,15 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_REP, WINED3DSIH_RET, WINED3DSIH_RSQ, + WINED3DSIH_SAMPLE, + WINED3DSIH_SAMPLE_GRAD, + WINED3DSIH_SAMPLE_LOD, WINED3DSIH_SETP, WINED3DSIH_SGE, WINED3DSIH_SGN, WINED3DSIH_SINCOS, WINED3DSIH_SLT, + WINED3DSIH_SQRT, WINED3DSIH_SUB, WINED3DSIH_TEX, WINED3DSIH_TEXBEM, @@ -494,6 +505,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_TEXREG2AR, WINED3DSIH_TEXREG2GB, WINED3DSIH_TEXREG2RGB, + WINED3DSIH_UTOF, WINED3DSIH_TABLE_SIZE }; @@ -513,7 +525,7 @@ struct wined3d_shader_version #define WINED3D_SHADER_VERSION(major, minor) (((major) << 8) | (minor)) -typedef struct shader_reg_maps +struct wined3d_shader_reg_maps { struct wined3d_shader_version shader_version; BYTE texcoord; /* MAX_REG_TEXCRD, 8 */ @@ -545,21 +557,38 @@ typedef struct shader_reg_maps WORD usestexldl : 1; WORD usesifc : 1; WORD usescall : 1; - WORD usesrcp : 1; + WORD usespow : 1; WORD padding : 3; + DWORD rt_mask; /* Used render targets, 32 max. */ + /* Whether or not loops are used in this shader, and nesting depth */ unsigned loop_depth; - unsigned highest_render_target; + UINT min_rel_offset, max_rel_offset; +}; -} shader_reg_maps; +/* Keeps track of details for TEX_M#x# instructions which need to maintain + * state information between multiple instructions. */ +struct wined3d_shader_tex_mx +{ + unsigned int current_row; + DWORD texcoord_w[2]; +}; + +struct wined3d_shader_loop_state +{ + UINT current_depth; + UINT current_reg; +}; struct wined3d_shader_context { - IWineD3DBaseShader *shader; + struct wined3d_shader *shader; const struct wined3d_gl_info *gl_info; - const struct shader_reg_maps *reg_maps; + const struct wined3d_shader_reg_maps *reg_maps; struct wined3d_shader_buffer *buffer; + struct wined3d_shader_tex_mx *tex_mx; + struct wined3d_shader_loop_state *loop_state; void *backend_data; }; @@ -712,28 +741,31 @@ struct vs_compile_args { }; struct wined3d_context; +struct wined3d_state; -typedef struct { +struct wined3d_shader_backend_ops +{ void (*shader_handle_instruction)(const struct wined3d_shader_instruction *); void (*shader_select)(const struct wined3d_context *context, BOOL usePS, BOOL useVS); - void (*shader_select_depth_blt)(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size); - void (*shader_deselect_depth_blt)(IWineD3DDevice *iface); - void (*shader_update_float_vertex_constants)(IWineD3DDevice *iface, UINT start, UINT count); - void (*shader_update_float_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count); + void (*shader_select_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info, + enum tex_types tex_type, const SIZE *ds_mask_size); + void (*shader_deselect_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info); + void (*shader_update_float_vertex_constants)(struct wined3d_device *device, UINT start, UINT count); + void (*shader_update_float_pixel_constants)(struct wined3d_device *device, UINT start, UINT count); void (*shader_load_constants)(const struct wined3d_context *context, char usePS, char useVS); - void (*shader_load_np2fixup_constants)(IWineD3DDevice *iface, char usePS, char useVS); - void (*shader_destroy)(IWineD3DBaseShader *iface); - HRESULT (*shader_alloc_private)(IWineD3DDevice *iface); - void (*shader_free_private)(IWineD3DDevice *iface); - BOOL (*shader_dirtifyable_constants)(IWineD3DDevice *iface); + void (*shader_load_np2fixup_constants)(void *shader_priv, const struct wined3d_gl_info *gl_info, + const struct wined3d_state *state); + void (*shader_destroy)(struct wined3d_shader *shader); + HRESULT (*shader_alloc_private)(struct wined3d_device *device); + void (*shader_free_private)(struct wined3d_device *device); + BOOL (*shader_dirtifyable_constants)(void); void (*shader_get_caps)(const struct wined3d_gl_info *gl_info, struct shader_caps *caps); BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup); - void (*shader_add_instruction_modifiers)(const struct wined3d_shader_instruction *ins); -} shader_backend_t; +}; -extern const shader_backend_t glsl_shader_backend DECLSPEC_HIDDEN; -extern const shader_backend_t arb_program_shader_backend DECLSPEC_HIDDEN; -extern const shader_backend_t none_shader_backend DECLSPEC_HIDDEN; +extern const struct wined3d_shader_backend_ops glsl_shader_backend DECLSPEC_HIDDEN; +extern const struct wined3d_shader_backend_ops arb_program_shader_backend DECLSPEC_HIDDEN; +extern const struct wined3d_shader_backend_ops none_shader_backend DECLSPEC_HIDDEN; /* X11 locking */ @@ -818,13 +850,6 @@ do { si->elements[name].data, si->elements[name].stride, si->elements[name].format->id, \ si->elements[name].buffer_object, si->elements[name].stream_idx); } while(0) -/* Advance declaration of structures to satisfy compiler */ -typedef struct IWineD3DStateBlockImpl IWineD3DStateBlockImpl; -typedef struct IWineD3DSurfaceImpl IWineD3DSurfaceImpl; -typedef struct IWineD3DPaletteImpl IWineD3DPaletteImpl; -typedef struct IWineD3DDeviceImpl IWineD3DDeviceImpl; -typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl; - /* Global variables */ extern const float identity[16] DECLSPEC_HIDDEN; @@ -891,7 +916,7 @@ struct wined3d_stream_info */ /* Routine common to the draw primitive and draw indexed primitive routines */ -void drawPrimitive(IWineD3DDevice *iface, UINT index_count, +void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT start_idx, UINT idxBytes, const void *idxData) DECLSPEC_HIDDEN; DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN; @@ -961,7 +986,10 @@ extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC #define STATE_FRONTFACE (STATE_MATERIAL + 1) #define STATE_IS_FRONTFACE(a) ((a) == STATE_FRONTFACE) -#define STATE_HIGHEST (STATE_FRONTFACE) +#define STATE_POINTSPRITECOORDORIGIN (STATE_FRONTFACE + 1) +#define STATE_IS_POINTSPRITECOORDORIGIN(a) ((a) == STATE_POINTSPRITECOORDORIGIN) + +#define STATE_HIGHEST (STATE_POINTSPRITECOORDORIGIN) enum fogsource { FOGSOURCE_FFP, @@ -1001,9 +1029,9 @@ enum wined3d_event_query_result }; void wined3d_event_query_destroy(struct wined3d_event_query *query) DECLSPEC_HIDDEN; -enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; -enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; -void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; +enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query, + struct wined3d_device *device) DECLSPEC_HIDDEN; +void wined3d_event_query_issue(struct wined3d_event_query *query, struct wined3d_device *device) DECLSPEC_HIDDEN; BOOL wined3d_event_query_supported(const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; struct wined3d_context @@ -1019,8 +1047,8 @@ struct wined3d_context DWORD numDirtyEntries; DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ - IWineD3DSwapChainImpl *swapchain; - IWineD3DSurfaceImpl *current_rt; + struct wined3d_swapchain *swapchain; + struct wined3d_surface *current_rt; DWORD tid; /* Thread ID which owns this context at the moment */ /* Stores some information about the context state for optimization */ @@ -1068,7 +1096,7 @@ struct wined3d_context GLuint fbo_read_binding; GLuint fbo_draw_binding; BOOL rebind_fbo; - IWineD3DSurfaceImpl **blit_targets; + struct wined3d_surface **blit_targets; GLenum *draw_buffers; /* Queries */ @@ -1089,7 +1117,7 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; -typedef void (*APPLYSTATEFUNC)(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *ctx); +typedef void (*APPLYSTATEFUNC)(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *ctx); struct StateEntry { @@ -1114,10 +1142,10 @@ struct fragment_caps struct fragment_pipeline { - void (*enable_extension)(IWineD3DDevice *iface, BOOL enable); + void (*enable_extension)(BOOL enable); void (*get_caps)(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps); - HRESULT (*alloc_private)(IWineD3DDevice *iface); - void (*free_private)(IWineD3DDevice *iface); + HRESULT (*alloc_private)(struct wined3d_device *device); + void (*free_private)(struct wined3d_device *device); BOOL (*color_fixup_supported)(struct color_fixup_desc fixup); const struct StateEntryTemplate *states; BOOL ffp_proj_control; @@ -1136,71 +1164,76 @@ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_ const struct wined3d_gl_info *gl_info, const struct StateEntryTemplate *vertex, const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc) DECLSPEC_HIDDEN; -enum blit_operation +enum wined3d_blit_op { - BLIT_OP_BLIT, - BLIT_OP_COLOR_FILL + WINED3D_BLIT_OP_COLOR_BLIT, + WINED3D_BLIT_OP_COLOR_FILL, + WINED3D_BLIT_OP_DEPTH_FILL, + WINED3D_BLIT_OP_DEPTH_BLIT, }; /* Shaders for color conversions in blits. Do not do blit operations while * already under the GL lock. */ struct blit_shader { - HRESULT (*alloc_private)(IWineD3DDevice *iface); - void (*free_private)(IWineD3DDevice *iface); - HRESULT (*set_shader)(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface); - void (*unset_shader)(IWineD3DDevice *iface); - BOOL (*blit_supported)(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, + HRESULT (*alloc_private)(struct wined3d_device *device); + void (*free_private)(struct wined3d_device *device); + HRESULT (*set_shader)(void *blit_priv, const struct wined3d_gl_info *gl_info, struct wined3d_surface *surface); + void (*unset_shader)(const struct wined3d_gl_info *gl_info); + BOOL (*blit_supported)(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op, const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format); - HRESULT (*color_fill)(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *dst_surface, + HRESULT (*color_fill)(struct wined3d_device *device, struct wined3d_surface *dst_surface, const RECT *dst_rect, const WINED3DCOLORVALUE *color); + HRESULT (*depth_fill)(struct wined3d_device *device, + struct wined3d_surface *surface, const RECT *rect, float depth); }; extern const struct blit_shader ffp_blit DECLSPEC_HIDDEN; extern const struct blit_shader arbfp_blit DECLSPEC_HIDDEN; extern const struct blit_shader cpu_blit DECLSPEC_HIDDEN; -const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *gl_info, enum blit_operation blit_op, +const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op, const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format, const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format) DECLSPEC_HIDDEN; /* Temporary blit_shader helper functions */ -HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_surface, const RECT *src_rect, - IWineD3DSurfaceImpl *dst_surface, const RECT *dst_rect_in, enum blit_operation blit_op, - DWORD Filter) DECLSPEC_HIDDEN; +HRESULT arbfp_blit_surface(struct wined3d_device *device, struct wined3d_surface *src_surface, + const RECT *src_rect, struct wined3d_surface *dst_surface, const RECT *dst_rect_in, + enum wined3d_blit_op blit_op, DWORD Filter) DECLSPEC_HIDDEN; -struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target) DECLSPEC_HIDDEN; +struct wined3d_context *context_acquire(struct wined3d_device *device, struct wined3d_surface *target) DECLSPEC_HIDDEN; void context_alloc_event_query(struct wined3d_context *context, struct wined3d_event_query *query) DECLSPEC_HIDDEN; void context_alloc_occlusion_query(struct wined3d_context *context, struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; -void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; -void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceImpl *device, - UINT rt_count, IWineD3DSurfaceImpl **rts, IWineD3DSurfaceImpl *depth_stencil) DECLSPEC_HIDDEN; -void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; +void context_apply_blit_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN; +BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_device *device, + UINT rt_count, struct wined3d_surface **rts, struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN; +BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN; void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, - IWineD3DSurfaceImpl *render_target, IWineD3DSurfaceImpl *depth_stencil, DWORD location) DECLSPEC_HIDDEN; + struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; void context_attach_depth_stencil_fbo(struct wined3d_context *context, - GLenum fbo_target, IWineD3DSurfaceImpl *depth_stencil, BOOL use_render_buffer) DECLSPEC_HIDDEN; + GLenum fbo_target, struct wined3d_surface *depth_stencil, BOOL use_render_buffer) DECLSPEC_HIDDEN; void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint *fbo) DECLSPEC_HIDDEN; -struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, IWineD3DSurfaceImpl *target, +void context_check_fbo_status(struct wined3d_context *context, GLenum target) DECLSPEC_HIDDEN; +struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, struct wined3d_surface *target, const struct wined3d_format *ds_format) DECLSPEC_HIDDEN; -void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN; +void context_destroy(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN; void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN; DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN; void context_release(struct wined3d_context *context) DECLSPEC_HIDDEN; -void context_resource_released(IWineD3DDeviceImpl *device, - IWineD3DResource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN; -void context_resource_unloaded(IWineD3DDeviceImpl *device, - IWineD3DResource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN; +void context_resource_released(struct wined3d_device *device, + struct wined3d_resource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN; +void context_resource_unloaded(struct wined3d_device *device, + struct wined3d_resource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN; BOOL context_set_current(struct wined3d_context *ctx) DECLSPEC_HIDDEN; void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) DECLSPEC_HIDDEN; void context_set_tls_idx(DWORD idx) DECLSPEC_HIDDEN; -void context_surface_update(struct wined3d_context *context, IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN; +void context_surface_update(struct wined3d_context *context, struct wined3d_surface *surface) DECLSPEC_HIDDEN; /* Macros for doing basic GPU detection based on opengl capabilities */ #define WINE_D3D6_CAPABLE(gl_info) (gl_info->supported[ARB_MULTITEXTURE]) @@ -1231,7 +1264,7 @@ struct wined3d_light_info /* The default light parameters */ extern const WINED3DLIGHT WINED3D_default_light DECLSPEC_HIDDEN; -typedef struct WineD3D_PixelFormat +struct wined3d_pixel_format { int iPixelFormat; /* WGL pixel format */ int iPixelType; /* WGL pixel type e.g. WGL_TYPE_RGBA_ARB, WGL_TYPE_RGBA_FLOAT_ARB or WGL_TYPE_COLORINDEX_ARB */ @@ -1241,17 +1274,17 @@ typedef struct WineD3D_PixelFormat BOOL doubleBuffer; int auxBuffers; int numSamples; -} WineD3D_PixelFormat; +}; /* The driver names reflect the lowest GPU supported - * by a certain driver, so DRIVER_ATI_R300 supports + * by a certain driver, so DRIVER_AMD_R300 supports * R3xx, R4xx and R5xx GPUs. */ enum wined3d_display_driver { - DRIVER_ATI_RAGE_128PRO, - DRIVER_ATI_R100, - DRIVER_ATI_R300, - DRIVER_ATI_R600, + DRIVER_AMD_RAGE_128PRO, + DRIVER_AMD_R100, + DRIVER_AMD_R300, + DRIVER_AMD_R600, DRIVER_INTEL_GMA800, DRIVER_INTEL_GMA900, DRIVER_INTEL_GMA950, @@ -1285,7 +1318,7 @@ enum wined3d_gl_vendor enum wined3d_pci_vendor { HW_VENDOR_SOFTWARE = 0x0000, - HW_VENDOR_ATI = 0x1002, + HW_VENDOR_AMD = 0x1002, HW_VENDOR_NVIDIA = 0x10de, HW_VENDOR_INTEL = 0x8086, }; @@ -1294,35 +1327,41 @@ enum wined3d_pci_device { CARD_WINE = 0x0000, - CARD_ATI_RAGE_128PRO = 0x5246, - CARD_ATI_RADEON_7200 = 0x5144, - CARD_ATI_RADEON_8500 = 0x514c, - CARD_ATI_RADEON_9500 = 0x4144, - CARD_ATI_RADEON_XPRESS_200M = 0x5955, - CARD_ATI_RADEON_X700 = 0x5e4c, - CARD_ATI_RADEON_X1600 = 0x71c2, - CARD_ATI_RADEON_HD2350 = 0x94c7, - CARD_ATI_RADEON_HD2600 = 0x9581, - CARD_ATI_RADEON_HD2900 = 0x9400, - CARD_ATI_RADEON_HD3200 = 0x9620, - CARD_ATI_RADEON_HD4350 = 0x954f, - CARD_ATI_RADEON_HD4550 = 0x9540, - CARD_ATI_RADEON_HD4600 = 0x9495, - CARD_ATI_RADEON_HD4650 = 0x9498, - CARD_ATI_RADEON_HD4670 = 0x9490, - CARD_ATI_RADEON_HD4700 = 0x944e, - CARD_ATI_RADEON_HD4770 = 0x94b3, - CARD_ATI_RADEON_HD4800 = 0x944c, /* Picked one value between 9440, 944c, 9442, 9460 */ - CARD_ATI_RADEON_HD4830 = 0x944c, - CARD_ATI_RADEON_HD4850 = 0x9442, - CARD_ATI_RADEON_HD4870 = 0x9440, - CARD_ATI_RADEON_HD4890 = 0x9460, - CARD_ATI_RADEON_HD5700 = 0x68BE, /* Picked HD5750 */ - CARD_ATI_RADEON_HD5750 = 0x68BE, - CARD_ATI_RADEON_HD5770 = 0x68B8, - CARD_ATI_RADEON_HD5800 = 0x6898, /* Picked HD5850 */ - CARD_ATI_RADEON_HD5850 = 0x6898, - CARD_ATI_RADEON_HD5870 = 0x6899, + CARD_AMD_RAGE_128PRO = 0x5246, + CARD_AMD_RADEON_7200 = 0x5144, + CARD_AMD_RADEON_8500 = 0x514c, + CARD_AMD_RADEON_9500 = 0x4144, + CARD_AMD_RADEON_XPRESS_200M = 0x5955, + CARD_AMD_RADEON_X700 = 0x5e4c, + CARD_AMD_RADEON_X1600 = 0x71c2, + CARD_AMD_RADEON_HD2350 = 0x94c7, + CARD_AMD_RADEON_HD2600 = 0x9581, + CARD_AMD_RADEON_HD2900 = 0x9400, + CARD_AMD_RADEON_HD3200 = 0x9620, + CARD_AMD_RADEON_HD4350 = 0x954f, + CARD_AMD_RADEON_HD4550 = 0x9540, + CARD_AMD_RADEON_HD4600 = 0x9495, + CARD_AMD_RADEON_HD4650 = 0x9498, + CARD_AMD_RADEON_HD4670 = 0x9490, + CARD_AMD_RADEON_HD4700 = 0x944e, + CARD_AMD_RADEON_HD4770 = 0x94b3, + CARD_AMD_RADEON_HD4800 = 0x944c, /* Picked one value between 9440, 944c, 9442, 9460 */ + CARD_AMD_RADEON_HD4830 = 0x944c, + CARD_AMD_RADEON_HD4850 = 0x9442, + CARD_AMD_RADEON_HD4870 = 0x9440, + CARD_AMD_RADEON_HD4890 = 0x9460, + CARD_AMD_RADEON_HD5400 = 0x68f9, + CARD_AMD_RADEON_HD5600 = 0x68d8, + CARD_AMD_RADEON_HD5700 = 0x68BE, /* Picked HD5750 */ + CARD_AMD_RADEON_HD5750 = 0x68BE, + CARD_AMD_RADEON_HD5770 = 0x68B8, + CARD_AMD_RADEON_HD5800 = 0x6898, /* Picked HD5850 */ + CARD_AMD_RADEON_HD5850 = 0x6898, + CARD_AMD_RADEON_HD5870 = 0x6899, + CARD_AMD_RADEON_HD5900 = 0x689c, + CARD_AMD_RADEON_HD6310 = 0x9803, + CARD_AMD_RADEON_HD6800 = 0x6739, + CARD_AMD_RADEON_HD6900 = 0x6719, CARD_NVIDIA_RIVA_128 = 0x0018, CARD_NVIDIA_RIVA_TNT = 0x0020, @@ -1363,12 +1402,21 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX260 = 0x05e2, CARD_NVIDIA_GEFORCE_GTX275 = 0x05e6, CARD_NVIDIA_GEFORCE_GTX280 = 0x05e1, + CARD_NVIDIA_GEFORCE_GT320M = 0x0a2d, CARD_NVIDIA_GEFORCE_GT325M = 0x0a35, + CARD_NVIDIA_GEFORCE_GT330 = 0x0ca0, CARD_NVIDIA_GEFORCE_GTS350M = 0x0cb0, + CARD_NVIDIA_GEFORCE_GT420 = 0x0de2, + CARD_NVIDIA_GEFORCE_GT430 = 0x0de1, + CARD_NVIDIA_GEFORCE_GT440 = 0x0de0, + CARD_NVIDIA_GEFORCE_GTS450 = 0x0dc4, CARD_NVIDIA_GEFORCE_GTX460 = 0x0e22, CARD_NVIDIA_GEFORCE_GTX465 = 0x06c4, CARD_NVIDIA_GEFORCE_GTX470 = 0x06cd, CARD_NVIDIA_GEFORCE_GTX480 = 0x06c0, + CARD_NVIDIA_GEFORCE_GTX560 = 0x1200, + CARD_NVIDIA_GEFORCE_GTX570 = 0x1081, + CARD_NVIDIA_GEFORCE_GTX580 = 0x1080, CARD_INTEL_845G = 0x2562, CARD_INTEL_I830G = 0x3577, @@ -1378,6 +1426,7 @@ enum wined3d_pci_device CARD_INTEL_I915GM = 0x2592, CARD_INTEL_I945GM = 0x27a2, /* Same as GMA 950? */ CARD_INTEL_X3100 = 0x2a02, /* Found in Macs. Same as GM965/GL960 */ + CARD_INTEL_GM45 = 0x2a42, }; struct wined3d_fbo_ops @@ -1480,20 +1529,20 @@ struct wined3d_adapter struct wined3d_driver_info driver_info; WCHAR DeviceName[CCHDEVICENAME]; /* DeviceName for use with e.g. ChangeDisplaySettings */ int nCfgs; - WineD3D_PixelFormat *cfgs; + struct wined3d_pixel_format *cfgs; BOOL brokenStencil; /* Set on cards which only offer mixed depth+stencil */ unsigned int TextureRam; /* Amount of texture memory both video ram + AGP/TurboCache/HyperMemory/.. */ unsigned int UsedTextureRam; LUID luid; const struct fragment_pipeline *fragment_pipe; - const shader_backend_t *shader_backend; + const struct wined3d_shader_backend_ops *shader_backend; const struct blit_shader *blitter; }; BOOL initPixelFormats(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor) DECLSPEC_HIDDEN; BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; -extern unsigned int WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, unsigned int glram) DECLSPEC_HIDDEN; +extern unsigned int WineD3DAdapterChangeGLRam(struct wined3d_device *device, int glram) DECLSPEC_HIDDEN; extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; /***************************************************************************** @@ -1510,7 +1559,7 @@ struct WineD3DRectPatch struct list entry; }; -HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, struct WineD3DRectPatch *patch) DECLSPEC_HIDDEN; +HRESULT tesselate_rectpatch(struct wined3d_device *device, struct WineD3DRectPatch *patch) DECLSPEC_HIDDEN; enum projection_types { @@ -1565,31 +1614,23 @@ struct ffp_frag_desc extern const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions DECLSPEC_HIDDEN; extern const struct wined3d_parent_ops wined3d_null_parent_ops DECLSPEC_HIDDEN; -void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_settings *settings, +void gen_ffp_frag_op(struct wined3d_stateblock *stateblock, struct ffp_frag_settings *settings, BOOL ignore_textype) DECLSPEC_HIDDEN; const struct ffp_frag_desc *find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders, const struct ffp_frag_settings *settings) DECLSPEC_HIDDEN; void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc) DECLSPEC_HIDDEN; -/***************************************************************************** - * IWineD3D implementation structure - */ -typedef struct IWineD3DImpl +struct wined3d { - /* IUnknown fields */ - const IWineD3DVtbl *lpVtbl; - LONG ref; /* Note: Ref counting not required */ - - /* WineD3D Information */ + LONG ref; void *parent; - UINT dxVersion; - + UINT dxVersion; UINT adapter_count; struct wined3d_adapter adapters[1]; -} IWineD3DImpl; +}; -HRESULT wined3d_init(IWineD3DImpl *wined3d, UINT version, void *parent) DECLSPEC_HIDDEN; -BOOL wined3d_register_window(HWND window, struct IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; +HRESULT wined3d_init(struct wined3d *wined3d, UINT version, void *parent) DECLSPEC_HIDDEN; +BOOL wined3d_register_window(HWND window, struct wined3d_device *device) DECLSPEC_HIDDEN; void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN; /***************************************************************************** @@ -1600,15 +1641,19 @@ void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN; /* Multithreaded flag. Removed from the public header to signal that IWineD3D::CreateDevice ignores it */ #define WINED3DCREATE_MULTITHREADED 0x00000004 -struct IWineD3DDeviceImpl +struct wined3d_fb_state { - /* IUnknown fields */ - const IWineD3DDeviceVtbl *lpVtbl; - LONG ref; /* Note: Ref counting not required */ + struct wined3d_surface **render_targets; + struct wined3d_surface *depth_stencil; +}; + +struct wined3d_device +{ + LONG ref; /* WineD3D Information */ - IWineD3DDeviceParent *device_parent; - IWineD3D *wined3d; + struct wined3d_device_parent *device_parent; + struct wined3d *wined3d; struct wined3d_adapter *adapter; /* Window styles to restore when switching fullscreen mode */ @@ -1616,13 +1661,12 @@ struct IWineD3DDeviceImpl LONG exStyle; /* X and GL Information */ - GLint maxConcurrentLights; GLenum offscreenBuffer; /* Selected capabilities */ int vs_selected_mode; int ps_selected_mode; - const shader_backend_t *shader_backend; + const struct wined3d_shader_backend_ops *shader_backend; void *shader_priv; void *fragment_priv; void *blit_priv; @@ -1642,14 +1686,13 @@ struct IWineD3DDeviceImpl WORD isRecordingState : 1; WORD isInDraw : 1; WORD bCursorVisible : 1; - WORD haveHardwareCursor : 1; WORD d3d_initialized : 1; WORD inScene : 1; /* A flag to check for proper BeginScene / EndScene call pairs */ WORD softwareVertexProcessing : 1; /* process vertex shaders using software or hardware */ WORD useDrawStridedSlow : 1; WORD instancedDraw : 1; WORD filter_messages : 1; - WORD padding : 3; + WORD padding : 4; BYTE fixed_function_usage_map; /* MAX_TEXTURES, 8 */ @@ -1658,31 +1701,31 @@ struct IWineD3DDeviceImpl unsigned char surface_alignment; /* Line Alignment of surfaces */ /* State block related */ - IWineD3DStateBlockImpl *stateBlock; - IWineD3DStateBlockImpl *updateStateBlock; + struct wined3d_stateblock *stateBlock; + struct wined3d_stateblock *updateStateBlock; /* Internal use fields */ WINED3DDEVICE_CREATION_PARAMETERS createParms; WINED3DDEVTYPE devType; HWND focus_window; - IWineD3DSwapChain **swapchains; - UINT NumberOfSwapChains; + struct wined3d_swapchain **swapchains; + UINT swapchain_count; struct list resources; /* a linked list to track resources created by the device */ struct list shaders; /* a linked list to track shaders (pixel and vertex) */ unsigned int highest_dirty_ps_const, highest_dirty_vs_const; /* Render Target Support */ - IWineD3DSurfaceImpl **render_targets; - IWineD3DSurfaceImpl *auto_depth_stencil; - IWineD3DSurfaceImpl *onscreen_depth_stencil; - IWineD3DSurfaceImpl *depth_stencil; + DWORD valid_rt_mask; + struct wined3d_fb_state fb; + struct wined3d_surface *onscreen_depth_stencil; + struct wined3d_surface *auto_depth_stencil; /* palettes texture management */ - UINT NumberOfPalettes; - PALETTEENTRY **palettes; - UINT currentPalette; + PALETTEENTRY **palettes; + UINT palette_count; + UINT currentPalette; /* For rendering to a texture using glCopyTexImage */ GLuint depth_blt_texture; @@ -1700,7 +1743,7 @@ struct IWineD3DDeviceImpl HCURSOR hardwareCursor; /* The Wine logo surface */ - IWineD3DSurface *logo_surface; + struct wined3d_surface *logo_surface; /* Textures for when no other textures are mapped */ UINT dummyTextureName[MAX_TEXTURES]; @@ -1709,9 +1752,6 @@ struct IWineD3DDeviceImpl DWORD ddraw_width, ddraw_height; enum wined3d_format_id ddraw_format; - /* Final position fixup constant */ - float posFixup[4]; - /* With register combiners we can skip junk texture stages */ DWORD texUnitMap[MAX_COMBINED_SAMPLERS]; DWORD rev_tex_unit_map[MAX_COMBINED_SAMPLERS]; @@ -1724,7 +1764,7 @@ struct IWineD3DDeviceImpl /* Context management */ struct wined3d_context **contexts; - UINT numContexts; + UINT context_count; /* High level patch management */ #define PATCHMAP_SIZE 43 @@ -1733,27 +1773,27 @@ struct IWineD3DDeviceImpl struct WineD3DRectPatch *currentPatch; }; -HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, IWineD3DSurfaceImpl **rts, - UINT rect_count, const RECT *rects, const RECT *draw_rect, DWORD flags, - const WINED3DCOLORVALUE *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; -BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; -void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; -void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) DECLSPEC_HIDDEN; -HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, +HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count, struct wined3d_surface **rts, + struct wined3d_surface *depth_stencil, UINT rect_count, const RECT *rects, const RECT *draw_rect, + DWORD flags, const WINED3DCOLORVALUE *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; +BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; +void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; +void device_get_draw_rect(struct wined3d_device *device, RECT *rect) DECLSPEC_HIDDEN; +HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags, - IWineD3DDeviceParent *device_parent) DECLSPEC_HIDDEN; -void device_preload_textures(IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; -LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, + struct wined3d_device_parent *device_parent) DECLSPEC_HIDDEN; +void device_preload_textures(struct wined3d_device *device) DECLSPEC_HIDDEN; +LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN; -void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN; -void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN; -void device_stream_info_from_declaration(IWineD3DDeviceImpl *This, +void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; +void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; +void device_stream_info_from_declaration(struct wined3d_device *device, BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup) DECLSPEC_HIDDEN; -void device_switch_onscreen_ds(IWineD3DDeviceImpl *device, struct wined3d_context *context, - IWineD3DSurfaceImpl *depth_stencil) DECLSPEC_HIDDEN; -void device_update_stream_info(IWineD3DDeviceImpl *device, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; -void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) DECLSPEC_HIDDEN; -void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) DECLSPEC_HIDDEN; +void device_switch_onscreen_ds(struct wined3d_device *device, struct wined3d_context *context, + struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN; +void device_update_stream_info(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; +void device_update_tex_unit_map(struct wined3d_device *device) DECLSPEC_HIDDEN; +void IWineD3DDeviceImpl_MarkStateDirty(struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN; static inline BOOL isStateDirty(struct wined3d_context *context, DWORD state) { @@ -1762,38 +1802,32 @@ static inline BOOL isStateDirty(struct wined3d_context *context, DWORD state) return context->isStateDirty[idx] & (1 << shift); } -/* Support for IWineD3DResource ::Set/Get/FreePrivateData. */ -typedef struct PrivateData +#define WINED3D_RESOURCE_ACCESS_GPU 0x1 +#define WINED3D_RESOURCE_ACCESS_CPU 0x2 +/* SCRATCH is mostly the same as CPU, but can't be used by the GPU at all, + * not even for resource uploads. */ +#define WINED3D_RESOURCE_ACCESS_SCRATCH 0x4 + +struct wined3d_resource_ops { - struct list entry; + void (*resource_unload)(struct wined3d_resource *resource); +}; - GUID tag; - DWORD flags; /* DDSPD_* */ - - union - { - LPVOID data; - LPUNKNOWN object; - } ptr; - - DWORD size; -} PrivateData; - -/***************************************************************************** - * IWineD3DResource implementation structure - */ -typedef struct IWineD3DResourceClass +struct wined3d_resource { - /* IUnknown fields */ - LONG ref; /* Note: Ref counting not required */ - - /* WineD3DResource Information */ + LONG ref; + struct wined3d_device *device; WINED3DRESOURCETYPE resourceType; - IWineD3DDeviceImpl *device; - WINED3DPOOL pool; - UINT size; - DWORD usage; const struct wined3d_format *format; + WINED3DMULTISAMPLE_TYPE multisample_type; + UINT multisample_quality; + DWORD usage; + WINED3DPOOL pool; + DWORD access_flags; + UINT width; + UINT height; + UINT depth; + UINT size; DWORD priority; BYTE *allocatedMemory; /* Pointer to the real data location */ BYTE *heapMemory; /* Pointer to the HeapAlloced block of memory */ @@ -1802,36 +1836,28 @@ typedef struct IWineD3DResourceClass void *parent; const struct wined3d_parent_ops *parent_ops; -} IWineD3DResourceClass; + const struct wined3d_resource_ops *resource_ops; +}; -typedef struct IWineD3DResourceImpl -{ - /* IUnknown & WineD3DResource Information */ - const IWineD3DResourceVtbl *lpVtbl; - IWineD3DResourceClass resource; -} IWineD3DResourceImpl; - -void resource_cleanup(IWineD3DResource *iface) DECLSPEC_HIDDEN; -HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID guid) DECLSPEC_HIDDEN; -DWORD resource_get_priority(IWineD3DResource *iface) DECLSPEC_HIDDEN; -HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID guid, +void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN; +HRESULT resource_free_private_data(struct wined3d_resource *resource, REFGUID guid) DECLSPEC_HIDDEN; +DWORD resource_get_priority(const struct wined3d_resource *resource) DECLSPEC_HIDDEN; +HRESULT resource_get_private_data(const struct wined3d_resource *resource, REFGUID guid, void *data, DWORD *data_size) DECLSPEC_HIDDEN; -HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type, - IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format *format, - WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN; -DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority) DECLSPEC_HIDDEN; -HRESULT resource_set_private_data(IWineD3DResource *iface, REFGUID guid, +HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device, + WINED3DRESOURCETYPE resource_type, const struct wined3d_format *format, + WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality, + DWORD usage, WINED3DPOOL pool, UINT width, UINT height, UINT depth, UINT size, + void *parent, const struct wined3d_parent_ops *parent_ops, + const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN; +DWORD resource_set_priority(struct wined3d_resource *resource, DWORD priority) DECLSPEC_HIDDEN; +HRESULT resource_set_private_data(struct wined3d_resource *resource, REFGUID guid, const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN; -void resource_unload(IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN; +void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; /* Tests show that the start address of resources is 32 byte aligned */ #define RESOURCE_ALIGNMENT 16 -/***************************************************************************** - * IWineD3DBaseTexture D3D- > openGL state map lookups - */ - typedef enum winetexturestates { WINED3DTEXSTA_ADDRESSU = 0, WINED3DTEXSTA_ADDRESSV = 1, @@ -1852,7 +1878,6 @@ enum WINED3DSRGB SRGB_ANY = 0, /* Uses the cached value(e.g. external calls) */ SRGB_RGB = 1, /* Loads the rgb texture */ SRGB_SRGB = 2, /* Loads the srgb texture */ - SRGB_BOTH = 3, /* Loads both textures */ }; struct gl_texture @@ -1862,148 +1887,75 @@ struct gl_texture GLuint name; }; -/***************************************************************************** - * IWineD3DBaseTexture implementation structure (extends IWineD3DResourceImpl) - */ -typedef struct IWineD3DBaseTextureClass +struct wined3d_texture_ops { - struct gl_texture texture_rgb, texture_srgb; - IWineD3DResourceImpl **sub_resources; + HRESULT (*texture_bind)(struct wined3d_texture *texture, + const struct wined3d_gl_info *gl_info, BOOL srgb); + void (*texture_preload)(struct wined3d_texture *texture, enum WINED3DSRGB srgb); + void (*texture_sub_resource_add_dirty_region)(struct wined3d_resource *sub_resource, + const WINED3DBOX *dirty_region); + void (*texture_sub_resource_cleanup)(struct wined3d_resource *sub_resource); +}; + +#define WINED3D_TEXTURE_COND_NP2 0x1 +#define WINED3D_TEXTURE_POW2_MAT_IDENT 0x2 +#define WINED3D_TEXTURE_IS_SRGB 0x4 + +struct wined3d_texture +{ + struct wined3d_resource resource; + const struct wined3d_texture_ops *texture_ops; + struct gl_texture texture_rgb, texture_srgb; + struct wined3d_resource **sub_resources; UINT layer_count; UINT level_count; - float pow2Matrix[16]; - UINT LOD; - WINED3DTEXTUREFILTERTYPE filterType; - LONG bindCount; - DWORD sampler; - BOOL is_srgb; - BOOL pow2Matrix_identity; - const struct min_lookup *minMipLookup; - const GLenum *magLookup; + float pow2_matrix[16]; + UINT lod; + WINED3DTEXTUREFILTERTYPE filter_type; + LONG bind_count; + DWORD sampler; + DWORD flags; + const struct min_lookup *min_mip_lookup; + const GLenum *mag_lookup; GLenum target; - void (*internal_preload)(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb); -} IWineD3DBaseTextureClass; +}; -typedef struct IWineD3DBaseTextureImpl +static inline struct wined3d_texture *wined3d_texture_from_resource(struct wined3d_resource *resource) { - /* IUnknown & WineD3DResource Information */ - const IWineD3DBaseTextureVtbl *lpVtbl; - IWineD3DResourceClass resource; - IWineD3DBaseTextureClass baseTexture; + return CONTAINING_RECORD(resource, struct wined3d_texture, resource); +} -} IWineD3DBaseTextureImpl; +static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_texture *texture, + const struct wined3d_gl_info *gl_info, BOOL srgb) +{ + return srgb && !gl_info->supported[EXT_TEXTURE_SRGB_DECODE] + ? &texture->texture_srgb : &texture->texture_rgb; +} -void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, - const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], +void wined3d_texture_apply_state_changes(struct wined3d_texture *texture, const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1], const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; -HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surface_desc) DECLSPEC_HIDDEN; -void basetexture_cleanup(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; -void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; -WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; -BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; -DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; -DWORD basetexture_get_lod(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; -IWineD3DResourceImpl *basetexture_get_sub_resource(IWineD3DBaseTextureImpl *texture, - UINT layer, UINT level) DECLSPEC_HIDDEN; -HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT layer_count, UINT level_count, - WINED3DRESOURCETYPE resource_type, IWineD3DDeviceImpl *device, UINT size, DWORD usage, - const struct wined3d_format *format, WINED3DPOOL pool, void *parent, - const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, - WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN; -BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty) DECLSPEC_HIDDEN; -DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD new_lod) DECLSPEC_HIDDEN; -void basetexture_unload(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; +void wined3d_texture_set_dirty(struct wined3d_texture *texture, BOOL dirty) DECLSPEC_HIDDEN; -/***************************************************************************** - * IWineD3DTexture implementation structure (extends IWineD3DBaseTextureImpl) - */ -typedef struct IWineD3DTextureImpl +struct wined3d_volume { - /* IUnknown & WineD3DResource/WineD3DBaseTexture Information */ - const IWineD3DTextureVtbl *lpVtbl; - IWineD3DResourceClass resource; - IWineD3DBaseTextureClass baseTexture; - - /* IWineD3DTexture */ - BOOL cond_np2; - -} IWineD3DTextureImpl; - -HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels, - IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - -/***************************************************************************** - * IWineD3DCubeTexture implementation structure (extends IWineD3DBaseTextureImpl) - */ -typedef struct IWineD3DCubeTextureImpl -{ - /* IUnknown & WineD3DResource/WineD3DBaseTexture Information */ - const IWineD3DCubeTextureVtbl *lpVtbl; - IWineD3DResourceClass resource; - IWineD3DBaseTextureClass baseTexture; -} IWineD3DCubeTextureImpl; - -HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UINT levels, - IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - -typedef struct _WINED3DVOLUMET_DESC -{ - UINT Width; - UINT Height; - UINT Depth; -} WINED3DVOLUMET_DESC; - -/***************************************************************************** - * IWineD3DVolume implementation structure (extends IUnknown) - */ -typedef struct IWineD3DVolumeImpl -{ - /* IUnknown & WineD3DResource fields */ - const IWineD3DVolumeVtbl *lpVtbl; - IWineD3DResourceClass resource; - - /* WineD3DVolume Information */ - WINED3DVOLUMET_DESC currentDesc; - struct IWineD3DVolumeTextureImpl *container; + struct wined3d_resource resource; + struct wined3d_texture *container; BOOL lockable; BOOL locked; WINED3DBOX lockedBox; WINED3DBOX dirtyBox; BOOL dirty; -} IWineD3DVolumeImpl; +}; -void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN; -HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width, - UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) DECLSPEC_HIDDEN; - -/***************************************************************************** - * IWineD3DVolumeTexture implementation structure (extends IWineD3DBaseTextureImpl) - */ -typedef struct IWineD3DVolumeTextureImpl +static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource) { - /* IUnknown & WineD3DResource/WineD3DBaseTexture Information */ - const IWineD3DVolumeTextureVtbl *lpVtbl; - IWineD3DResourceClass resource; - IWineD3DBaseTextureClass baseTexture; -} IWineD3DVolumeTextureImpl; + return CONTAINING_RECORD(resource, struct wined3d_volume, resource); +} -HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height, - UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, - WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - -typedef struct _WINED3DSURFACET_DESC -{ - WINED3DMULTISAMPLE_TYPE MultiSampleType; - DWORD MultiSampleQuality; - UINT Width; - UINT Height; -} WINED3DSURFACET_DESC; +void volume_add_dirty_box(struct wined3d_volume *volume, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN; +void volume_load(struct wined3d_volume *volume, UINT level, BOOL srgb_mode) DECLSPEC_HIDDEN; +void volume_set_container(struct wined3d_volume *volume, struct wined3d_texture *container) DECLSPEC_HIDDEN; /***************************************************************************** * Structure for DIB Surfaces (GetDC and GDI surfaces) @@ -2016,33 +1968,30 @@ typedef struct wineD3DSurface_DIB { BOOL client_memory; } wineD3DSurface_DIB; -typedef struct { +struct wined3d_renderbuffer_entry +{ struct list entry; GLuint id; UINT width; UINT height; -} renderbuffer_entry_t; +}; struct fbo_entry { struct list entry; - IWineD3DSurfaceImpl **render_targets; - IWineD3DSurfaceImpl *depth_stencil; + struct wined3d_surface **render_targets; + struct wined3d_surface *depth_stencil; DWORD location; BOOL attached; GLuint id; }; -/***************************************************************************** - * IWineD3DClipp implementation structure - */ -typedef struct IWineD3DClipperImpl +struct wined3d_clipper { - const IWineD3DClipperVtbl *lpVtbl; LONG ref; HWND hWnd; -} IWineD3DClipperImpl; +}; enum wined3d_container_type { @@ -2056,30 +2005,42 @@ struct wined3d_subresource_container enum wined3d_container_type type; union { - struct IWineD3DBase *base; - struct IWineD3DSwapChainImpl *swapchain; - struct IWineD3DBaseTextureImpl *texture; + struct wined3d_swapchain *swapchain; + struct wined3d_texture *texture; + void *base; } u; }; -/***************************************************************************** - * IWineD3DSurface implementation structure - */ -struct IWineD3DSurfaceImpl +struct wined3d_surface_ops { - /* IUnknown & IWineD3DResource Information */ - const IWineD3DSurfaceVtbl *lpVtbl; - IWineD3DResourceClass resource; + HRESULT (*surface_private_setup)(struct wined3d_surface *surface); + void (*surface_cleanup)(struct wined3d_surface *surface); + void (*surface_realize_palette)(struct wined3d_surface *surface); + HRESULT (*surface_draw_overlay)(struct wined3d_surface *surface); + void (*surface_preload)(struct wined3d_surface *surface); + void (*surface_map)(struct wined3d_surface *surface, const RECT *rect, DWORD flags); + void (*surface_unmap)(struct wined3d_surface *surface); + HRESULT (*surface_getdc)(struct wined3d_surface *surface); + HRESULT (*surface_flip)(struct wined3d_surface *surface, struct wined3d_surface *override); + HRESULT (*surface_blt)(struct wined3d_surface *dst_surface, const RECT *dst_rect, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, + const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter); + HRESULT (*surface_bltfast)(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD trans); + HRESULT (*surface_set_mem)(struct wined3d_surface *surface, void *mem); +}; - /* IWineD3DSurface fields */ +struct wined3d_surface +{ + struct wined3d_resource resource; + const struct wined3d_surface_ops *surface_ops; struct wined3d_subresource_container container; - WINED3DSURFACET_DESC currentDesc; - IWineD3DPaletteImpl *palette; /* D3D7 style palette handling */ + struct wined3d_palette *palette; /* D3D7 style palette handling */ PALETTEENTRY *palette9; /* D3D8/9 style palette handling */ - /* TODO: move this off into a management class(maybe!) */ - DWORD Flags; + DWORD flags; + WINED3DSURFTYPE surface_type; UINT pow2Width; UINT pow2Height; @@ -2112,98 +2073,61 @@ struct IWineD3DSurfaceImpl WINEDDCOLORKEY glCKey; struct list renderbuffers; - renderbuffer_entry_t *current_renderbuffer; + struct wined3d_renderbuffer_entry *current_renderbuffer; SIZE ds_current_size; /* DirectDraw clippers */ - IWineD3DClipper *clipper; + struct wined3d_clipper *clipper; /* DirectDraw Overlay handling */ RECT overlay_srcrect; RECT overlay_destrect; - IWineD3DSurfaceImpl *overlay_dest; + struct wined3d_surface *overlay_dest; struct list overlays; struct list overlay_entry; }; -extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl DECLSPEC_HIDDEN; -extern const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl DECLSPEC_HIDDEN; +static inline struct wined3d_surface *surface_from_resource(struct wined3d_resource *resource) +{ + return CONTAINING_RECORD(resource, struct wined3d_surface, resource); +} -void surface_add_dirty_rect(IWineD3DSurfaceImpl *surface, const RECT *dirty_rect) DECLSPEC_HIDDEN; -HRESULT surface_color_fill(IWineD3DSurfaceImpl *s, const RECT *rect, const WINED3DCOLORVALUE *color) DECLSPEC_HIDDEN; -void surface_gdi_cleanup(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN; -GLenum surface_get_gl_buffer(IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN; -HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, - UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type, - UINT multisample_quality, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, - WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -BOOL surface_init_sysmem(IWineD3DSurfaceImpl *surface) DECLSPEC_HIDDEN; -void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN; -BOOL surface_is_offscreen(IWineD3DSurfaceImpl *iface) DECLSPEC_HIDDEN; -void surface_load_ds_location(IWineD3DSurfaceImpl *surface, +static inline GLuint surface_get_texture_name(struct wined3d_surface *surface, + const struct wined3d_gl_info *gl_info, BOOL srgb) +{ + return srgb && !gl_info->supported[EXT_TEXTURE_SRGB_DECODE] + ? surface->texture_name_srgb : surface->texture_name; +} + +void surface_add_dirty_rect(struct wined3d_surface *surface, const WINED3DBOX *dirty_rect) DECLSPEC_HIDDEN; +void surface_bind(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) DECLSPEC_HIDDEN; +HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const WINED3DCOLORVALUE *color) DECLSPEC_HIDDEN; +GLenum surface_get_gl_buffer(struct wined3d_surface *surface) DECLSPEC_HIDDEN; +BOOL surface_init_sysmem(struct wined3d_surface *surface) DECLSPEC_HIDDEN; +void surface_internal_preload(struct wined3d_surface *surface, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN; +BOOL surface_is_offscreen(struct wined3d_surface *surface) DECLSPEC_HIDDEN; +HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN; +void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; -HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RECT *rect) DECLSPEC_HIDDEN; -void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; -void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL persistent) DECLSPEC_HIDDEN; -void surface_prepare_texture(IWineD3DSurfaceImpl *surface, +HRESULT surface_load_location(struct wined3d_surface *surface, DWORD flag, const RECT *rect) DECLSPEC_HIDDEN; +void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; +void surface_modify_location(struct wined3d_surface *surface, DWORD flag, BOOL persistent) DECLSPEC_HIDDEN; +void surface_prepare_texture(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL srgb) DECLSPEC_HIDDEN; -void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface, - unsigned int width, unsigned int height) DECLSPEC_HIDDEN; -void surface_set_container(IWineD3DSurfaceImpl *surface, - enum wined3d_container_type type, IWineD3DBase *container) DECLSPEC_HIDDEN; -void surface_set_texture_name(IWineD3DSurfaceImpl *surface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN; -void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target) DECLSPEC_HIDDEN; -void surface_translate_frontbuffer_coords(IWineD3DSurfaceImpl *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN; - -/* Predeclare the shared Surface functions */ -HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface, - REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; -ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -void * WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface, - REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface, - REFGUID refguid, void *pData, DWORD *pSizeOfData) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid) DECLSPEC_HIDDEN; -DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew) DECLSPEC_HIDDEN; -DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -void WINAPI IWineD3DBaseSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFACE_DESC *desc) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_IsLost(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_Restore(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD3DPalette **Pal) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetColorKey(IWineD3DSurface *iface, - DWORD Flags, const WINEDDCOLORKEY *CKey) DECLSPEC_HIDDEN; -DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetOverlayPosition(IWineD3DSurface *iface, LONG *X, LONG *Y) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *iface, - DWORD Flags, IWineD3DSurface *Ref) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, const RECT *SrcRect, - IWineD3DSurface *DstSurface, const RECT *DstRect, DWORD Flags, const WINEDDOVERLAYFX *FX) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, - enum wined3d_format_id format_id) DECLSPEC_HIDDEN; -HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *dst_rect, IWineD3DSurface *src_surface, - const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, - IWineD3DSurface *Source, const RECT *rsrc, DWORD trans) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT *pLockedRect, - const RECT *pRect, DWORD Flags) DECLSPEC_HIDDEN; -const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface) DECLSPEC_HIDDEN; +void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, struct wined3d_surface *rt) DECLSPEC_HIDDEN; +void surface_set_container(struct wined3d_surface *surface, + enum wined3d_container_type type, void *container) DECLSPEC_HIDDEN; +void surface_set_texture_name(struct wined3d_surface *surface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN; +void surface_set_texture_target(struct wined3d_surface *surface, GLenum target) DECLSPEC_HIDDEN; +void surface_translate_drawable_coords(struct wined3d_surface *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN; void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; -void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect, +void draw_textured_quad(struct wined3d_surface *src_surface, const RECT *src_rect, const RECT *dst_rect, WINED3DTEXTUREFILTERTYPE Filter) DECLSPEC_HIDDEN; -void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPEC_HIDDEN; +void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) DECLSPEC_HIDDEN; /* Surface flags: */ #define SFLAG_CONVERTED 0x00000002 /* Converted for color keying or Palettized */ @@ -2265,15 +2189,11 @@ typedef enum { CONVERT_RGB32_888 } CONVERT_TYPES; -HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *surface, BOOL need_alpha_ck, BOOL use_texturing, +HRESULT d3dfmt_get_conv(struct wined3d_surface *surface, BOOL need_alpha_ck, BOOL use_texturing, struct wined3d_format *format, CONVERT_TYPES *convert) DECLSPEC_HIDDEN; -void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *surface, BYTE table[256][4], BOOL colorkey) DECLSPEC_HIDDEN; +void d3dfmt_p8_init_palette(struct wined3d_surface *surface, BYTE table[256][4], BOOL colorkey) DECLSPEC_HIDDEN; -BOOL palette9_changed(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN; - -/***************************************************************************** - * IWineD3DVertexDeclaration implementation structure - */ +BOOL palette9_changed(struct wined3d_surface *surface) DECLSPEC_HIDDEN; struct wined3d_vertex_declaration_element { @@ -2287,14 +2207,12 @@ struct wined3d_vertex_declaration_element BYTE usage_idx; }; -typedef struct IWineD3DVertexDeclarationImpl { - /* IUnknown Information */ - const IWineD3DVertexDeclarationVtbl *lpVtbl; - LONG ref; - +struct wined3d_vertex_declaration +{ + LONG ref; void *parent; const struct wined3d_parent_ops *parent_ops; - IWineD3DDeviceImpl *device; + struct wined3d_device *device; struct wined3d_vertex_declaration_element *elements; UINT element_count; @@ -2303,15 +2221,7 @@ typedef struct IWineD3DVertexDeclarationImpl { UINT num_streams; BOOL position_transformed; BOOL half_float_conv_needed; -} IWineD3DVertexDeclarationImpl; - -HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWineD3DDeviceImpl *device, - const WINED3DVERTEXELEMENT *elements, UINT element_count, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - -/***************************************************************************** - * IWineD3DStateBlock implementation structure - */ +}; /* Internal state Block for Begin/End/Capture/Create/Apply info */ /* Note: Very long winded but gl Lists are not flexible enough */ @@ -2358,7 +2268,7 @@ struct wined3d_stream_state struct wined3d_state { - IWineD3DVertexDeclarationImpl *vertex_declaration; + struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_state streams[MAX_STREAMS + 1 /* tesselated pseudo-stream */]; BOOL user_stream; struct wined3d_buffer *index_buffer; @@ -2367,17 +2277,17 @@ struct wined3d_state INT load_base_vertex_index; /* Non-indexed drawing needs 0 here, indexed needs base_vertex_index. */ GLenum gl_primitive_type; - struct IWineD3DVertexShaderImpl *vertex_shader; + struct wined3d_shader *vertex_shader; BOOL vs_consts_b[MAX_CONST_B]; INT vs_consts_i[MAX_CONST_I * 4]; float *vs_consts_f; - struct IWineD3DPixelShaderImpl *pixel_shader; + struct wined3d_shader *pixel_shader; BOOL ps_consts_b[MAX_CONST_B]; INT ps_consts_i[MAX_CONST_I * 4]; float *ps_consts_f; - IWineD3DBaseTextureImpl *textures[MAX_COMBINED_SAMPLERS]; + struct wined3d_texture *textures[MAX_COMBINED_SAMPLERS]; DWORD sampler_states[MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1]; DWORD texture_states[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1]; DWORD lowest_disabled_stage; @@ -2398,14 +2308,10 @@ struct wined3d_state DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; }; -struct IWineD3DStateBlockImpl +struct wined3d_stateblock { - /* IUnknown fields */ - const IWineD3DStateBlockVtbl *lpVtbl; LONG ref; /* Note: Ref counting not required */ - - /* IWineD3DStateBlock information */ - IWineD3DDeviceImpl *device; + struct wined3d_device *device; WINED3DSTATEBLOCKTYPE blockType; /* Array indicating whether things have been set or changed */ @@ -2435,12 +2341,10 @@ struct IWineD3DStateBlockImpl unsigned int num_contained_sampler_states; }; -HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, - IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type) DECLSPEC_HIDDEN; -void stateblock_init_contained_states(IWineD3DStateBlockImpl *object) DECLSPEC_HIDDEN; -void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) DECLSPEC_HIDDEN; +void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; +void stateblock_init_default_state(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; -static inline void stateblock_apply_state(DWORD state, IWineD3DStateBlockImpl *stateblock, +static inline void stateblock_apply_state(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct StateEntry *statetable = stateblock->device->StateTable; @@ -2457,26 +2361,23 @@ enum query_state { QUERY_SIGNALLED, QUERY_BUILDING }; -/***************************************************************************** - * IWineD3DQueryImpl implementation structure (extends IUnknown) - */ -typedef struct IWineD3DQueryImpl + +struct wined3d_query_ops { - const IWineD3DQueryVtbl *lpVtbl; - LONG ref; /* Note: Ref counting not required */ + HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags); + HRESULT (*query_issue)(struct wined3d_query *query, DWORD flags); +}; - IWineD3DDeviceImpl *device; - - /* IWineD3DQuery fields */ +struct wined3d_query +{ + LONG ref; + const struct wined3d_query_ops *query_ops; + struct wined3d_device *device; enum query_state state; WINED3DQUERYTYPE type; - /* TODO: Think about using a IUnknown instead of a void* */ + DWORD data_size; void *extendedData; -} IWineD3DQueryImpl; - -HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, WINED3DQUERYTYPE type) DECLSPEC_HIDDEN; - -/* IWineD3DBuffer */ +}; /* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other * fixed function semantics as D3DCOLOR or FLOAT16 */ @@ -2485,7 +2386,6 @@ enum wined3d_buffer_conversion_type CONV_NONE, CONV_D3DCOLOR, CONV_POSITIONT, - CONV_FLOAT16_2, /* Also handles FLOAT16_4 */ }; struct wined3d_map_range @@ -2505,8 +2405,7 @@ struct wined3d_map_range struct wined3d_buffer { - const struct IWineD3DBufferVtbl *vtbl; - IWineD3DResourceClass resource; + struct wined3d_resource resource; struct wined3d_buffer_desc desc; @@ -2528,93 +2427,63 @@ struct wined3d_buffer UINT stride; /* 0 if no conversion */ UINT conversion_stride; /* 0 if no shifted conversion */ enum wined3d_buffer_conversion_type *conversion_map; /* NULL if no conversion */ - /* Extra load offsets, for FLOAT16 conversion */ - UINT *conversion_shift; /* NULL if no shifted conversion */ }; -const BYTE *buffer_get_memory(IWineD3DBuffer *iface, const struct wined3d_gl_info *gl_info, +static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resource *resource) +{ + return CONTAINING_RECORD(resource, struct wined3d_buffer, resource); +} + +const BYTE *buffer_get_memory(struct wined3d_buffer *buffer, const struct wined3d_gl_info *gl_info, GLuint *buffer_object) DECLSPEC_HIDDEN; BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; -HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device, - UINT size, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, GLenum bind_hint, - const char *data, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -/* IWineD3DRendertargetView */ struct wined3d_rendertarget_view { - const struct IWineD3DRendertargetViewVtbl *vtbl; LONG refcount; - IWineD3DResource *resource; + struct wined3d_resource *resource; void *parent; }; -void wined3d_rendertarget_view_init(struct wined3d_rendertarget_view *view, - IWineD3DResource *resource, void *parent) DECLSPEC_HIDDEN; - -/***************************************************************************** - * IWineD3DSwapChainImpl implementation structure (extends IUnknown) - */ - -struct IWineD3DSwapChainImpl +struct wined3d_swapchain_ops { - /*IUnknown part*/ - const IWineD3DSwapChainVtbl *lpVtbl; - LONG ref; /* Note: Ref counting not required */ + HRESULT (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, + const RECT *dst_rect, const RGNDATA *dirty_region, DWORD flags); +}; +struct wined3d_swapchain +{ + LONG ref; void *parent; - IWineD3DDeviceImpl *device; + const struct wined3d_parent_ops *parent_ops; + const struct wined3d_swapchain_ops *swapchain_ops; + struct wined3d_device *device; - /* IWineD3DSwapChain fields */ - IWineD3DSurfaceImpl **back_buffers; - IWineD3DSurfaceImpl *front_buffer; + struct wined3d_surface **back_buffers; + struct wined3d_surface *front_buffer; WINED3DPRESENT_PARAMETERS presentParms; - DWORD orig_width, orig_height; + DWORD orig_width, orig_height; enum wined3d_format_id orig_fmt; - WINED3DGAMMARAMP orig_gamma; - BOOL render_to_fbo; + WINED3DGAMMARAMP orig_gamma; + BOOL render_to_fbo; const struct wined3d_format *ds_format; LONG prev_time, frames; /* Performance tracking */ - unsigned int vSyncCounter; struct wined3d_context **context; - unsigned int num_contexts; + unsigned int num_contexts; - HWND win_handle; + HWND win_handle; HWND device_window; + + HDC backup_dc; + HWND backup_wnd; }; -extern const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl DECLSPEC_HIDDEN; -void x11_copy_to_screen(IWineD3DSwapChainImpl *This, const RECT *rc) DECLSPEC_HIDDEN; +void x11_copy_to_screen(struct wined3d_swapchain *swapchain, const RECT *rect) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, - REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; -ULONG WINAPI IWineD3DBaseSwapChainImpl_AddRef(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; -ULONG WINAPI IWineD3DBaseSwapChainImpl_Release(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; -void * WINAPI IWineD3DBaseSwapChainImpl_GetParent(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface, - IWineD3DSurface *dst_surface) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, - WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface, - WINED3DRASTER_STATUS *pRasterStatus) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, - WINED3DDISPLAYMODE *pMode) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, - IWineD3DDevice **device) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, - WINED3DPRESENT_PARAMETERS *pPresentationParameters) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, - DWORD Flags, const WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, - WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN; - -struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; -HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface_type, - IWineD3DDeviceImpl *device, WINED3DPRESENT_PARAMETERS *present_parameters, void *parent) DECLSPEC_HIDDEN; -void swapchain_restore_fullscreen_window(IWineD3DSwapChainImpl *swapchain) DECLSPEC_HIDDEN; -void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w, UINT h) DECLSPEC_HIDDEN; +struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; #define DEFAULT_REFRESH_RATE 0 @@ -2631,7 +2500,7 @@ const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN; const char *debug_d3ddeclmethod(WINED3DDECLMETHOD method) DECLSPEC_HIDDEN; const char *debug_d3ddeclusage(BYTE usage) DECLSPEC_HIDDEN; const char *debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType) DECLSPEC_HIDDEN; -const char *debug_d3drenderstate(WINED3DRENDERSTATETYPE state) DECLSPEC_HIDDEN; +const char *debug_d3drenderstate(DWORD state) DECLSPEC_HIDDEN; const char *debug_d3dsamplerstate(DWORD state) DECLSPEC_HIDDEN; const char *debug_d3dstate(DWORD state) DECLSPEC_HIDDEN; const char *debug_d3dtexturefiltertype(WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN; @@ -2656,27 +2525,27 @@ void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d INT texture_idx, DWORD dst) DECLSPEC_HIDDEN; void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed, enum wined3d_format_id coordtype, BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN; -void texture_activate_dimensions(IWineD3DBaseTextureImpl *texture, +void texture_activate_dimensions(const struct wined3d_texture *texture, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; -void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, +void sampler_texdim(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) DECLSPEC_HIDDEN; -void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, +void tex_alphaop(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) DECLSPEC_HIDDEN; -void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, +void apply_pixelshader(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) DECLSPEC_HIDDEN; -void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, +void state_fogcolor(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) DECLSPEC_HIDDEN; -void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, +void state_fogdensity(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) DECLSPEC_HIDDEN; -void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, +void state_fogstartend(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) DECLSPEC_HIDDEN; -void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock, +void state_fog_fragpart(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) DECLSPEC_HIDDEN; BOOL getColorBits(const struct wined3d_format *format, - short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize) DECLSPEC_HIDDEN; + BYTE *redSize, BYTE *greenSize, BYTE *blueSize, BYTE *alphaSize, BYTE *totalSize) DECLSPEC_HIDDEN; BOOL getDepthStencilBits(const struct wined3d_format *format, - short *depthSize, short *stencilSize) DECLSPEC_HIDDEN; + BYTE *depthSize, BYTE *stencilSize) DECLSPEC_HIDDEN; /* Math utils */ void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2) DECLSPEC_HIDDEN; @@ -2691,7 +2560,8 @@ typedef struct local_constant { DWORD value[4]; } local_constant; -typedef struct SHADER_LIMITS { +struct wined3d_shader_limits +{ unsigned int temporary; unsigned int texcoord; unsigned int sampler; @@ -2703,14 +2573,7 @@ typedef struct SHADER_LIMITS { unsigned int packed_input; unsigned int attributes; unsigned int label; -} SHADER_LIMITS; - -/* Keeps track of details for TEX_M#x# shader opcodes which need to - * maintain state information between multiple codes */ -typedef struct SHADER_PARSE_STATE { - unsigned int current_row; - DWORD texcoord_w[2]; -} SHADER_PARSE_STATE; +}; #ifdef __GNUC__ #define PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) @@ -2723,21 +2586,34 @@ int shader_addline(struct wined3d_shader_buffer *buffer, const char *fmt, ...) P int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *fmt, va_list args) DECLSPEC_HIDDEN; /* Vertex shader utility functions */ -extern BOOL vshader_get_input(struct IWineD3DVertexShaderImpl *shader, +extern BOOL vshader_get_input(struct wined3d_shader *shader, BYTE usage_req, BYTE usage_idx_req, unsigned int *regnum) DECLSPEC_HIDDEN; -/***************************************************************************** - * IDirect3DBaseShader implementation structure - */ -typedef struct IWineD3DBaseShaderClass +struct wined3d_vertex_shader { - LONG ref; - SHADER_LIMITS limits; - SHADER_PARSE_STATE parse_state; - DWORD *function; - UINT functionLength; - UINT cur_loop_depth, cur_loop_regno; - BOOL load_local_constsF; + struct wined3d_shader_attribute attributes[MAX_ATTRIBS]; +}; + +struct wined3d_pixel_shader +{ + /* Pixel shader input semantics */ + DWORD input_reg_map[MAX_REG_INPUT]; + BOOL input_reg_used[MAX_REG_INPUT]; + unsigned int declared_in_count; + + /* Some information about the shader behavior */ + char vpos_uniform; + BOOL color0_mov; + DWORD color0_reg; +}; + +struct wined3d_shader +{ + LONG ref; + struct wined3d_shader_limits limits; + DWORD *function; + UINT functionLength; + BOOL load_local_constsF; const struct wined3d_shader_frontend *frontend; void *frontend_data; void *backend_data; @@ -2752,24 +2628,29 @@ typedef struct IWineD3DBaseShaderClass struct list constantsB; struct list constantsF; struct list constantsI; - shader_reg_maps reg_maps; + struct wined3d_shader_reg_maps reg_maps; struct wined3d_shader_signature_element input_signature[max(MAX_ATTRIBS, MAX_REG_INPUT)]; struct wined3d_shader_signature_element output_signature[MAX_REG_OUTPUT]; /* Pointer to the parent device */ - IWineD3DDevice *device; - struct list shader_list_entry; + struct wined3d_device *device; + struct list shader_list_entry; -} IWineD3DBaseShaderClass; + union + { + struct wined3d_vertex_shader vs; + struct wined3d_pixel_shader ps; + } u; +}; -typedef struct IWineD3DBaseShaderImpl { - /* IUnknown */ - const IWineD3DBaseShaderVtbl *lpVtbl; +void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, + struct wined3d_texture * const *textures) DECLSPEC_HIDDEN; +void find_ps_compile_args(const struct wined3d_state *state, + const struct wined3d_shader *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN; - /* IWineD3DBaseShader */ - IWineD3DBaseShaderClass baseShader; -} IWineD3DBaseShaderImpl; +void find_vs_compile_args(const struct wined3d_state *state, + const struct wined3d_shader *shader, struct vs_compile_args *args) DECLSPEC_HIDDEN; void shader_buffer_clear(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN; BOOL shader_buffer_init(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN; @@ -2778,9 +2659,10 @@ void shader_dump_src_param(const struct wined3d_shader_src_param *param, const struct wined3d_shader_version *shader_version) DECLSPEC_HIDDEN; void shader_dump_dst_param(const struct wined3d_shader_dst_param *param, const struct wined3d_shader_version *shader_version) DECLSPEC_HIDDEN; -unsigned int shader_find_free_input_register(const struct shader_reg_maps *reg_maps, unsigned int max) DECLSPEC_HIDDEN; -void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffer *buffer, - const shader_reg_maps *reg_maps, const DWORD *pFunction, void *backend_ctx) DECLSPEC_HIDDEN; +unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_maps *reg_maps, + unsigned int max) DECLSPEC_HIDDEN; +void shader_generate_main(struct wined3d_shader *shader, struct wined3d_shader_buffer *buffer, + const struct wined3d_shader_reg_maps *reg_maps, const DWORD *pFunction, void *backend_ctx) DECLSPEC_HIDDEN; BOOL shader_match_semantic(const char *semantic_name, WINED3DDECLUSAGE usage) DECLSPEC_HIDDEN; static inline BOOL shader_is_pshader_version(enum wined3d_shader_type type) @@ -2828,53 +2710,36 @@ static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg) } } -static inline BOOL shader_constant_is_local(IWineD3DBaseShaderImpl* This, DWORD reg) { - local_constant* lconst; +static inline void shader_get_position_fixup(const struct wined3d_context *context, + const struct wined3d_state *state, float *position_fixup) +{ + position_fixup[0] = 1.0f; + position_fixup[1] = 1.0f; + position_fixup[2] = (63.0f / 64.0f) / state->viewport.Width; + position_fixup[3] = -(63.0f / 64.0f) / state->viewport.Height; - if(This->baseShader.load_local_constsF) return FALSE; - LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) { - if(lconst->idx == reg) return TRUE; + if (context->render_offscreen) + { + position_fixup[1] *= -1.0f; + position_fixup[3] *= -1.0f; } - return FALSE; - } -/***************************************************************************** - * IDirect3DVertexShader implementation structures - */ -typedef struct IWineD3DVertexShaderImpl { - /* IUnknown parts */ - const IWineD3DVertexShaderVtbl *lpVtbl; - - /* IWineD3DBaseShader */ - IWineD3DBaseShaderClass baseShader; - - /* Vertex shader attributes. */ - struct wined3d_shader_attribute attributes[MAX_ATTRIBS]; - - UINT min_rel_offset, max_rel_offset; - UINT rel_offset; -} IWineD3DVertexShaderImpl; - -void find_vs_compile_args(const struct wined3d_state *state, - IWineD3DVertexShaderImpl *shader, struct vs_compile_args *args) DECLSPEC_HIDDEN; -HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl *device, - const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - -struct wined3d_geometryshader +static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader, DWORD reg) { - const struct IWineD3DGeometryShaderVtbl *vtbl; - IWineD3DBaseShaderClass base_shader; -}; + struct local_constant *lconst; -HRESULT geometryshader_init(struct wined3d_geometryshader *shader, IWineD3DDeviceImpl *device, - const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; + if (shader->load_local_constsF) + return FALSE; -/***************************************************************************** - * IDirect3DPixelShader implementation structure - */ + LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, local_constant, entry) + { + if (lconst->idx == reg) + return TRUE; + } + + return FALSE; +} /* Using additional shader constants (uniforms in GLSL / program environment * or local parameters in ARB) is costly: @@ -2893,34 +2758,6 @@ struct ps_np2fixup_info { WORD num_consts; }; -typedef struct IWineD3DPixelShaderImpl { - /* IUnknown parts */ - const IWineD3DPixelShaderVtbl *lpVtbl; - - /* IWineD3DBaseShader */ - IWineD3DBaseShaderClass baseShader; - - /* Pixel shader input semantics */ - DWORD input_reg_map[MAX_REG_INPUT]; - BOOL input_reg_used[MAX_REG_INPUT]; - unsigned int declared_in_count; - - /* Some information about the shader behavior */ - char vpos_uniform; - - BOOL color0_mov; - DWORD color0_reg; - -} IWineD3DPixelShaderImpl; - -HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *device, - const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, - IWineD3DBaseTexture * const *textures) DECLSPEC_HIDDEN; -void find_ps_compile_args(const struct wined3d_state *state, - IWineD3DPixelShaderImpl *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN; - /* sRGB correction constants */ static const float srgb_cmp = 0.0031308f; static const float srgb_mul_low = 12.92f; @@ -2928,30 +2765,21 @@ static const float srgb_pow = 0.41666f; static const float srgb_mul_high = 1.055f; static const float srgb_sub_high = 0.055f; -/***************************************************************************** - * IWineD3DPalette implementation structure - */ -struct IWineD3DPaletteImpl { - /* IUnknown parts */ - const IWineD3DPaletteVtbl *lpVtbl; - LONG ref; - +struct wined3d_palette +{ + LONG ref; void *parent; - IWineD3DDeviceImpl *device; + struct wined3d_device *device; - /* IWineD3DPalette */ HPALETTE hpal; WORD palVersion; /*| */ WORD palNumEntries; /*| LOGPALETTE */ PALETTEENTRY palents[256]; /*| */ /* This is to store the palette in 'screen format' */ int screen_palents[256]; - DWORD Flags; + DWORD flags; }; -HRESULT wined3d_palette_init(IWineD3DPaletteImpl *palette, IWineD3DDeviceImpl *device, - DWORD flags, const PALETTEENTRY *entries, void *parent) DECLSPEC_HIDDEN; - /* DirectDraw utility functions */ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN; @@ -2987,8 +2815,8 @@ struct wined3d_format DWORD blue_mask; DWORD alpha_mask; UINT byte_count; - WORD depth_size; - WORD stencil_size; + BYTE depth_size; + BYTE stencil_size; UINT block_width; UINT block_height; @@ -3007,7 +2835,7 @@ struct wined3d_format GLint glFormat; GLint glType; UINT conv_byte_count; - unsigned int Flags; + unsigned int flags; float heightscale; struct color_fixup_desc color_fixup; void (*convert)(const BYTE *src, BYTE *dst, UINT pitch, UINT width, UINT height); @@ -3037,10 +2865,6 @@ static inline BOOL use_ps(const struct wined3d_state *state) /* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */ #define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL" -#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) - #define MAKEDWORD_VERSION(maj, min) (((maj & 0xffff) << 16) | (min & 0xffff)) #endif diff --git a/dll/nls/CMakeLists.txt b/dll/nls/CMakeLists.txt index fbc21b3dd20..be0dd91e913 100644 --- a/dll/nls/CMakeLists.txt +++ b/dll/nls/CMakeLists.txt @@ -1,3 +1,5 @@ -add_subdirectory(idndl) +if(NOT MSVC) + add_subdirectory(idndl) # FIXME: msvc build. +endif() add_subdirectory(normaliz) diff --git a/dll/ntdll/CMakeLists.txt b/dll/ntdll/CMakeLists.txt index 31090630436..a2b2c9da239 100644 --- a/dll/ntdll/CMakeLists.txt +++ b/dll/ntdll/CMakeLists.txt @@ -37,9 +37,7 @@ else() list(APPEND SOURCE dispatch/dispatch.c) endif(ARCH MATCHES i386) -add_library(ntdll SHARED - ${CMAKE_CURRENT_BINARY_DIR}/ntdll_ntdll.h.gch - ${SOURCE}) +add_library(ntdll SHARED ${SOURCE}) set_entrypoint(ntdll 0) @@ -55,7 +53,7 @@ target_link_libraries(ntdll ${PSEH_LIB}) set_image_base(ntdll ${baseaddress_ntdll}) -add_pch(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/include/ntdll.h ${SOURCE}) +add_pch(ntdll include/ntdll.h) add_dependencies(ntdll ntstatus asm) add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all) diff --git a/dll/ntdll/include/ntdllp.h b/dll/ntdll/include/ntdllp.h index a01a960cef2..dc4bf7593ba 100644 --- a/dll/ntdll/include/ntdllp.h +++ b/dll/ntdll/include/ntdllp.h @@ -10,6 +10,11 @@ #define LDR_HASH_TABLE_ENTRIES 32 +/* LdrpUpdateLoadCount2 flags */ +#define LDRP_UPDATE_REFCOUNT 0x01 +#define LDRP_UPDATE_DEREFCOUNT 0x02 +#define LDRP_UPDATE_PIN 0x03 + typedef struct _LDRP_TLS_DATA { LIST_ENTRY TlsLinks; @@ -27,10 +32,21 @@ extern BOOLEAN LdrpInLdrInit; extern LIST_ENTRY LdrpHashTable[LDR_HASH_TABLE_ENTRIES]; extern BOOLEAN ShowSnaps; extern UNICODE_STRING LdrpDefaultPath; +extern HANDLE LdrpKnownDllObjectDirectory; +extern ULONG LdrpNumberOfProcessors; +extern ULONG LdrpFatalHardErrorCount; +extern PUNICODE_STRING LdrpTopLevelDllBeingLoaded; +extern PLDR_DATA_TABLE_ENTRY LdrpCurrentDllInitializer; +extern UNICODE_STRING LdrApiDefaultExtension; +extern BOOLEAN LdrpLdrDatabaseIsSetup; +extern ULONG LdrpActiveUnloadCount; +extern BOOLEAN LdrpShutdownInProgress; +extern UNICODE_STRING LdrpKnownDllPath; +extern PLDR_DATA_TABLE_ENTRY LdrpGetModuleHandleCache; /* ldrinit.c */ NTSTATUS NTAPI LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL); -NTSTATUS NTAPI LdrpInitializeThread(IN PCONTEXT Context); +VOID NTAPI LdrpInitializeThread(IN PCONTEXT Context); NTSTATUS NTAPI LdrpInitializeTls(VOID); NTSTATUS NTAPI LdrpAllocateTls(VOID); VOID NTAPI LdrpFreeTls(VOID); @@ -38,7 +54,7 @@ VOID NTAPI LdrpTlsCallback(PVOID BaseAddress, ULONG Reason); BOOLEAN NTAPI LdrpCallDllEntry(PDLLMAIN_FUNC EntryPoint, PVOID BaseAddress, ULONG Reason, PVOID Context); NTSTATUS NTAPI LdrpInitializeProcess(PCONTEXT Context, PVOID SystemArgument1); VOID NTAPI LdrpInitFailure(NTSTATUS Status); - +VOID NTAPI LdrpValidateImageForMp(IN PLDR_DATA_TABLE_ENTRY LdrDataTableEntry); /* ldrpe.c */ NTSTATUS @@ -79,6 +95,10 @@ LdrpLoadDll(IN BOOLEAN Redirected, OUT PVOID *BaseAddress, IN BOOLEAN CallInit); +VOID NTAPI +LdrpUpdateLoadCount2(IN PLDR_DATA_TABLE_ENTRY LdrEntry, + IN ULONG Flags); + ULONG NTAPI LdrpClearLoadInProgress(); @@ -101,6 +121,9 @@ LdrpMapDll(IN PWSTR SearchPath OPTIONAL, PVOID NTAPI LdrpFetchAddressOfEntryPoint(PVOID ImageBase); +BOOLEAN NTAPI +LdrpFreeUnicodeString(PUNICODE_STRING String); + /* FIXME: Cleanup this mess */ typedef NTSTATUS (NTAPI *PEPFUNC)(PPEB); @@ -110,13 +133,8 @@ NTSTATUS LdrMapSections(HANDLE ProcessHandle, PIMAGE_NT_HEADERS NTHeaders); NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle, PHANDLE NTDllSectionHandle); -BOOLEAN LdrMappedAsDataFile(PVOID *BaseAddress); ULONG LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders); -PEPFUNC LdrPEStartup (PVOID ImageBase, - HANDLE SectionHandle, - PLDR_DATA_TABLE_ENTRY* Module, - PWSTR FullDosName); extern HANDLE WindowsApiPort; diff --git a/dll/ntdll/ldr/ldrapi.c b/dll/ntdll/ldr/ldrapi.c index e08f4ca5ec8..7ba87929ce4 100644 --- a/dll/ntdll/ldr/ldrapi.c +++ b/dll/ntdll/ldr/ldrapi.c @@ -16,6 +16,8 @@ /* GLOBALS *******************************************************************/ LONG LdrpLoaderLockAcquisitonCount; +BOOLEAN LdrpShowRecursiveLoads; +UNICODE_STRING LdrApiDefaultExtension = RTL_CONSTANT_STRING(L".DLL"); /* FUNCTIONS *****************************************************************/ @@ -242,6 +244,480 @@ Quickie: return Status; } +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrLoadDll(IN PWSTR SearchPath OPTIONAL, + IN PULONG DllCharacteristics OPTIONAL, + IN PUNICODE_STRING DllName, + OUT PVOID *BaseAddress) +{ + WCHAR StringBuffer[MAX_PATH]; + UNICODE_STRING DllString1, DllString2; + BOOLEAN RedirectedDll = FALSE; + NTSTATUS Status; + ULONG Cookie; + PUNICODE_STRING OldTldDll; + PTEB Teb = NtCurrentTeb(); + + /* Initialize the strings */ + RtlInitUnicodeString(&DllString2, NULL); + DllString1.Buffer = StringBuffer; + DllString1.Length = 0; + DllString1.MaximumLength = sizeof(StringBuffer); + + /* Check if the SxS Assemblies specify another file */ + Status = RtlDosApplyFileIsolationRedirection_Ustr(TRUE, + DllName, + &LdrApiDefaultExtension, + &DllString1, + &DllString2, + &DllName, + NULL, + NULL, + NULL); + + /* Check success */ + if (NT_SUCCESS(Status)) + { + /* Let Ldrp know */ + RedirectedDll = TRUE; + } + else if (Status != STATUS_SXS_KEY_NOT_FOUND) + { + /* Unrecoverable SxS failure; did we get a string? */ + if (DllString2.Buffer) + { + /* Free the string */ + RtlFreeUnicodeString(&DllString2); + } + return Status; + } + + /* Lock the loader lock */ + LdrLockLoaderLock(LDR_LOCK_LOADER_LOCK_FLAG_RAISE_ON_ERRORS, NULL, &Cookie); + + /* Check if there's a TLD DLL being loaded */ + if ((OldTldDll = LdrpTopLevelDllBeingLoaded)) + { + /* This is a recursive load, do something about it? */ + if (ShowSnaps || LdrpShowRecursiveLoads) + { + /* Print out debug messages */ + DPRINT1("[%lx, %lx] LDR: Recursive DLL Load\n", + Teb->RealClientId.UniqueProcess, + Teb->RealClientId.UniqueThread); + DPRINT1("[%lx, %lx] Previous DLL being loaded \"%wZ\"\n", + Teb->RealClientId.UniqueProcess, + Teb->RealClientId.UniqueThread, + OldTldDll); + DPRINT1("[%lx, %lx] DLL being requested \"%wZ\"\n", + Teb->RealClientId.UniqueProcess, + Teb->RealClientId.UniqueThread, + DllName); + + /* Was it initializing too? */ + if (!LdrpCurrentDllInitializer) + { + DPRINT1("[%lx, %lx] LDR: No DLL Initializer was running\n", + Teb->RealClientId.UniqueProcess, + Teb->RealClientId.UniqueThread); + } + else + { + DPRINT1("[%lx, %lx] DLL whose initializer was currently running \"%wZ\"\n", + Teb->ClientId.UniqueProcess, + Teb->ClientId.UniqueThread, + &LdrpCurrentDllInitializer->BaseDllName); + } + } + } + + /* Set this one as the TLD DLL being loaded*/ + LdrpTopLevelDllBeingLoaded = DllName; + + /* Load the DLL */ + Status = LdrpLoadDll(RedirectedDll, + SearchPath, + DllCharacteristics, + DllName, + BaseAddress, + TRUE); + + /* Restore the old TLD DLL */ + LdrpTopLevelDllBeingLoaded = OldTldDll; + + /* Release the lock */ + LdrUnlockLoaderLock(LDR_LOCK_LOADER_LOCK_FLAG_RAISE_ON_ERRORS, Cookie); + + /* Do we have a redirect string? */ + if (DllString2.Buffer) RtlFreeUnicodeString(&DllString2); + + /* Return */ + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrFindEntryForAddress(PVOID Address, + PLDR_DATA_TABLE_ENTRY *Module) +{ + PLIST_ENTRY ListHead, NextEntry; + PLDR_DATA_TABLE_ENTRY LdrEntry; + PIMAGE_NT_HEADERS NtHeader; + PPEB_LDR_DATA Ldr = NtCurrentPeb()->Ldr; + ULONG_PTR DllBase, DllEnd; + + DPRINT("LdrFindEntryForAddress(Address %p)\n", Address); + + /* Nothing to do */ + if (!Ldr) return STATUS_NO_MORE_ENTRIES; + + /* Loop the module list */ + ListHead = &Ldr->InMemoryOrderModuleList; + NextEntry = ListHead->Flink; + while (NextEntry != ListHead) + { + /* Get the entry and NT Headers */ + LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); + if ((NtHeader = RtlImageNtHeader(LdrEntry->DllBase))) + { + /* Get the Image Base */ + DllBase = (ULONG_PTR)LdrEntry->DllBase; + DllEnd = DllBase + NtHeader->OptionalHeader.SizeOfImage; + + /* Check if they match */ + if (((ULONG_PTR)Address >= DllBase) && + ((ULONG_PTR)Address < DllEnd)) + { + /* Return it */ + *Module = LdrEntry; + return STATUS_SUCCESS; + } + + /* Next Entry */ + NextEntry = NextEntry->Flink; + } + } + + /* Nothing found */ + return STATUS_NO_MORE_ENTRIES; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrGetDllHandleEx(IN ULONG Flags, + IN PWSTR DllPath OPTIONAL, + IN PULONG DllCharacteristics OPTIONAL, + IN PUNICODE_STRING DllName, + OUT PVOID *DllHandle OPTIONAL) +{ + NTSTATUS Status = STATUS_DLL_NOT_FOUND; + PLDR_DATA_TABLE_ENTRY LdrEntry; + UNICODE_STRING RedirectName, DllString1; + UNICODE_STRING RawDllName; + PUNICODE_STRING pRedirectName = &RedirectName; + PUNICODE_STRING CompareName; + PWCHAR p1, p2, p3; + BOOLEAN Locked = FALSE; + BOOLEAN RedirectedDll = FALSE; + ULONG Cookie; + ULONG LoadFlag; + + /* Initialize the strings */ + RtlInitUnicodeString(&DllString1, NULL); + RtlInitUnicodeString(&RawDllName, NULL); + RedirectName = *DllName; + + /* Clear the handle */ + if (DllHandle) *DllHandle = NULL; + + /* Check for a valid flag */ + if ((Flags & ~3) || (!DllHandle && !(Flags & 2))) + { + DPRINT1("Flags are invalid or no DllHandle given\n"); + return STATUS_INVALID_PARAMETER; + } + + /* If not initializing */ + if (!LdrpInLdrInit) + { + /* Acquire the lock */ + Status = LdrLockLoaderLock(0, NULL, &Cookie); + Locked = TRUE; + } + + /* Check if the SxS Assemblies specify another file */ + Status = RtlDosApplyFileIsolationRedirection_Ustr(TRUE, + pRedirectName, + &LdrApiDefaultExtension, + NULL, + &DllString1, + &pRedirectName, + NULL, + NULL, + NULL); + + /* Check success */ + if (NT_SUCCESS(Status)) + { + /* Let Ldrp know */ + RedirectedDll = TRUE; + } + else if (Status != STATUS_SXS_KEY_NOT_FOUND) + { + /* Unrecoverable SxS failure; */ + goto Quickie; + } + + /* Use the cache if we can */ + if (LdrpGetModuleHandleCache) + { + /* Check if we were redirected */ + if (RedirectedDll) + { + /* Check the flag */ + if (LdrpGetModuleHandleCache->Flags & LDRP_REDIRECTED) + { + /* Use the right name */ + CompareName = &LdrpGetModuleHandleCache->FullDllName; + } + else + { + goto DontCompare; + } + } + else + { + /* Check the flag */ + if (!(LdrpGetModuleHandleCache->Flags & LDRP_REDIRECTED)) + { + /* Use the right name */ + CompareName = &LdrpGetModuleHandleCache->BaseDllName; + } + else + { + goto DontCompare; + } + } + + /* Check if the name matches */ + if (RtlEqualUnicodeString(pRedirectName, + CompareName, + TRUE)) + { + /* Skip the rest */ + LdrEntry = LdrpGetModuleHandleCache; + + /* Return success */ + Status = STATUS_SUCCESS; + + goto FoundEntry; + } + } + +DontCompare: + /* Find the name without the extension */ + p1 = pRedirectName->Buffer; + p3 = &p1[pRedirectName->Length / sizeof(WCHAR)]; +StartLoop: + p2 = NULL; + while (p1 != p3) + { + if (*p1++ == L'.') + { + p2 = p1; + } + else if (*p1 == L'\\') + { + goto StartLoop; + } + } + + /* Check if no extension was found or if we got a slash */ + if (!p2 || *p2 == L'\\' || *p2 == L'/') + { + /* Check that we have space to add one */ + if (pRedirectName->Length + LdrApiDefaultExtension.Length >= MAXLONG) + { + /* No space to add the extension */ + return STATUS_NAME_TOO_LONG; + } + + /* Setup the string */ + RawDllName.MaximumLength = pRedirectName->Length + LdrApiDefaultExtension.Length + sizeof(UNICODE_NULL); + RawDllName.Length = RawDllName.MaximumLength - sizeof(UNICODE_NULL); + RawDllName.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + RawDllName.MaximumLength); + + /* Copy the buffer */ + RtlMoveMemory(RawDllName.Buffer, + pRedirectName->Buffer, + pRedirectName->Length); + + /* Add extension */ + RtlMoveMemory((PVOID)((ULONG_PTR)RawDllName.Buffer + pRedirectName->Length), + LdrApiDefaultExtension.Buffer, + LdrApiDefaultExtension.Length); + + /* Null terminate */ + RawDllName.Buffer[RawDllName.Length / sizeof(WCHAR)] = UNICODE_NULL; + } + else + { + /* Check if there's something in the name */ + if (pRedirectName->Length) + { + /* Check and remove trailing period */ + if (pRedirectName->Buffer[(pRedirectName->Length - 2) / + sizeof(WCHAR)] == '.') + { + /* Decrease the size */ + pRedirectName->Length -= sizeof(WCHAR); + } + } + + /* Setup the string */ + RawDllName.MaximumLength = pRedirectName->Length + sizeof(WCHAR); + RawDllName.Length = pRedirectName->Length; + RawDllName.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + RawDllName.MaximumLength); + + /* Copy the buffer */ + RtlMoveMemory(RawDllName.Buffer, + pRedirectName->Buffer, + pRedirectName->Length); + + /* Null terminate */ + RawDllName.Buffer[RawDllName.Length / sizeof(WCHAR)] = UNICODE_NULL; + } + + /* Display debug string */ + if (ShowSnaps) + { + DPRINT1("LDR: LdrGetDllHandle, searching for %wZ from %ws\n", + &RawDllName, + DllPath ? ((ULONG_PTR)DllPath == 1 ? L"" : DllPath) : L""); + } + + /* Do the lookup */ + if (LdrpCheckForLoadedDll(DllPath, + &RawDllName, + ((ULONG_PTR)DllPath == 1) ? TRUE : FALSE, + RedirectedDll, + &LdrEntry)) + { + /* Update cached entry */ + LdrpGetModuleHandleCache = LdrEntry; + + /* Return success */ + Status = STATUS_SUCCESS; + } + else + { + /* Make sure to NULL this */ + LdrEntry = NULL; + } +FoundEntry: + DPRINT("Got LdrEntry->BaseDllName %wZ\n", LdrEntry ? &LdrEntry->BaseDllName : NULL); + + /* Check if we got an entry */ + if (LdrEntry) + { + /* Check for success */ + if (NT_SUCCESS(Status)) + { + /* Check if the DLL is locked */ + if (LdrEntry->LoadCount != -1) + { + /* Check what flag we got */ + if (!(Flags & 1)) + { + /* Check what to do with the load count */ + if (Flags & 2) + { + /* Pin it */ + LdrEntry->LoadCount = -1; + LoadFlag = LDRP_UPDATE_PIN; + } + else + { + /* Increase the load count */ + LdrEntry->LoadCount++; + LoadFlag = LDRP_UPDATE_REFCOUNT; + } + + /* Update the load count now */ + LdrpUpdateLoadCount2(LdrEntry, LoadFlag); + LdrpClearLoadInProgress(); + } + } + + /* Check if the caller is requesting the handle */ + if (DllHandle) *DllHandle = LdrEntry->DllBase; + } + } +Quickie: + /* Free string if needed */ + if (DllString1.Buffer) RtlFreeUnicodeString(&DllString1); + + /* Free the raw DLL Name if needed */ + if (RawDllName.Buffer) + { + /* Free the heap-allocated buffer */ + RtlFreeHeap(RtlGetProcessHeap(), 0, RawDllName.Buffer); + RawDllName.Buffer = NULL; + } + + /* Release lock */ + if (Locked) LdrUnlockLoaderLock(LDR_LOCK_LOADER_LOCK_FLAG_RAISE_ON_ERRORS, Cookie); + + /* Return */ + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrGetDllHandle(IN PWSTR DllPath OPTIONAL, + IN PULONG DllCharacteristics OPTIONAL, + IN PUNICODE_STRING DllName, + OUT PVOID *DllHandle) +{ + /* Call the newer API */ + return LdrGetDllHandleEx(TRUE, + DllPath, + DllCharacteristics, + DllName, + DllHandle); +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrGetProcedureAddress(IN PVOID BaseAddress, + IN PANSI_STRING Name, + IN ULONG Ordinal, + OUT PVOID *ProcedureAddress) +{ + /* Call the internal routine and tell it to execute DllInit */ + return LdrpGetProcedureAddress(BaseAddress, Name, Ordinal, ProcedureAddress, TRUE); +} + /* * @implemented */ @@ -374,21 +850,6 @@ LdrVerifyImageMatchesChecksum(IN HANDLE FileHandle, return !Result ? STATUS_IMAGE_CHECKSUM_MISMATCH : Status; } -/* - * @implemented - */ -NTSTATUS -NTAPI -LdrGetProcedureAddress_(IN PVOID BaseAddress, - IN PANSI_STRING Name, - IN ULONG Ordinal, - OUT PVOID *ProcedureAddress) -{ - /* Call the internal routine and tell it to execute DllInit */ - return LdrpGetProcedureAddress(BaseAddress, Name, Ordinal, ProcedureAddress, TRUE); -} - - NTSTATUS NTAPI LdrQueryProcessModuleInformationEx(IN ULONG ProcessId, diff --git a/dll/ntdll/ldr/ldrinit.c b/dll/ntdll/ldr/ldrinit.c index a7a196fcaa3..fd0aa391f11 100644 --- a/dll/ntdll/ldr/ldrinit.c +++ b/dll/ntdll/ldr/ldrinit.c @@ -10,9 +10,12 @@ /* INCLUDES *****************************************************************/ #include +#include + #define NDEBUG #include + /* GLOBALS *******************************************************************/ HKEY ImageExecOptionsKey; @@ -25,11 +28,14 @@ BOOLEAN LdrpInLdrInit; LONG LdrpProcessInitialized; BOOLEAN LdrpLoaderLockInit; BOOLEAN LdrpLdrDatabaseIsSetup; +BOOLEAN LdrpShutdownInProgress; +HANDLE LdrpShutdownThreadId; BOOLEAN LdrpDllValidation; PLDR_DATA_TABLE_ENTRY LdrpImageEntry; PUNICODE_STRING LdrpTopLevelDllBeingLoaded; +WCHAR StringBuffer[156]; extern PTEB LdrpTopLevelDllBeingLoadedTeb; // defined in rtlsupp.c! PLDR_DATA_TABLE_ENTRY LdrpCurrentDllInitializer; PLDR_DATA_TABLE_ENTRY LdrpNtDllDataTableEntry; @@ -68,6 +74,7 @@ RTL_CRITICAL_SECTION FastPebLock; BOOLEAN ShowSnaps; ULONG LdrpFatalHardErrorCount; +ULONG LdrpActiveUnloadCount; //extern LIST_ENTRY RtlCriticalSectionList; @@ -78,10 +85,12 @@ extern BOOLEAN RtlpPageHeapEnabled; extern ULONG RtlpDphGlobalFlags; NTSTATUS LdrPerformRelocations(PIMAGE_NT_HEADERS NTHeaders, PVOID ImageBase); -NTSTATUS NTAPI -LdrpInitializeProcess_(PCONTEXT Context, - PVOID SystemArgument1); +#ifdef _WIN64 +#define DEFAULT_SECURITY_COOKIE 0x00002B992DDFA232ll +#else +#define DEFAULT_SECURITY_COOKIE 0xBB40E64E +#endif /* FUNCTIONS *****************************************************************/ @@ -414,8 +423,7 @@ LdrpFetchAddressOfSecurityCookie(PVOID BaseAddress, ULONG SizeOfImage) Cookie = (PVOID)ConfigDir->SecurityCookie; /* Check this cookie */ - if (Cookie == NULL || - (PCHAR)Cookie <= (PCHAR)BaseAddress || + if ((PCHAR)Cookie <= (PCHAR)BaseAddress || (PCHAR)Cookie >= (PCHAR)BaseAddress + SizeOfImage) { Cookie = NULL; @@ -429,20 +437,178 @@ PVOID NTAPI LdrpInitSecurityCookie(PLDR_DATA_TABLE_ENTRY LdrEntry) { - PVOID Cookie; + PULONG_PTR Cookie; + LARGE_INTEGER Counter; + //ULONG NewCookie; /* Fetch address of the cookie */ Cookie = LdrpFetchAddressOfSecurityCookie(LdrEntry->DllBase, LdrEntry->SizeOfImage); if (Cookie) { - UNIMPLEMENTED; - Cookie = NULL; + /* Check if it's a default one */ + if (*Cookie == DEFAULT_SECURITY_COOKIE || + *Cookie == 0xBB40) + { + /* We need to initialize it */ + + NtQueryPerformanceCounter(&Counter, NULL); +#if 0 + GetSystemTimeAsFileTime (&systime.ft_struct); +#ifdef _WIN64 + cookie = systime.ft_scalar; +#else + cookie = systime.ft_struct.dwLowDateTime; + cookie ^= systime.ft_struct.dwHighDateTime; +#endif + + cookie ^= GetCurrentProcessId (); + cookie ^= GetCurrentThreadId (); + cookie ^= GetTickCount (); + + QueryPerformanceCounter (&perfctr); +#ifdef _WIN64 + cookie ^= perfctr.QuadPart; +#else + cookie ^= perfctr.LowPart; + cookie ^= perfctr.HighPart; +#endif + +#ifdef _WIN64 + cookie &= 0x0000ffffffffffffll; +#endif +#endif + *Cookie = Counter.LowPart; + + //Cookie = NULL; + } } return Cookie; } +VOID +NTAPI +LdrpInitializeThread(IN PCONTEXT Context) +{ + PPEB Peb = NtCurrentPeb(); + PLDR_DATA_TABLE_ENTRY LdrEntry; + PLIST_ENTRY NextEntry, ListHead; + RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED ActCtx; + NTSTATUS Status; + PVOID EntryPoint; + + DPRINT("LdrpInitializeThread() called for %wZ\n", + &LdrpImageEntry->BaseDllName); + + /* Allocate an Activation Context Stack */ + /* FIXME: This is a hack for Wine's actctx stuff */ + DPRINT("ActivationContextStack %p\n", NtCurrentTeb()->ActivationContextStackPointer); + if (!(NtCurrentTeb()->ActivationContextStackPointer)) + { + Status = RtlAllocateActivationContextStack((PVOID*)&NtCurrentTeb()->ActivationContextStackPointer); + if (NT_SUCCESS(Status)) + { + DPRINT("ActivationContextStack %p\n", NtCurrentTeb()->ActivationContextStackPointer); + DPRINT("ActiveFrame %p\n", ((PACTIVATION_CONTEXT_STACK)NtCurrentTeb()->ActivationContextStackPointer)->ActiveFrame); + NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame = NULL; + } + else + DPRINT1("Warning: Unable to allocate ActivationContextStack\n"); + } + + /* Make sure we are not shutting down */ + if (LdrpShutdownInProgress) return; + + /* Allocate TLS */ + LdrpAllocateTls(); + + /* Start at the beginning */ + ListHead = &Peb->Ldr->InMemoryOrderModuleList; + NextEntry = ListHead->Flink; + while (NextEntry != ListHead) + { + /* Get the current entry */ + LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList); + + /* Make sure it's not ourselves */ + if (Peb->ImageBaseAddress != LdrEntry->DllBase) + { + /* Check if we should call */ + if (!(LdrEntry->Flags & LDRP_DONT_CALL_FOR_THREADS)) + { + /* Get the entrypoint */ + EntryPoint = LdrEntry->EntryPoint; + + /* Check if we are ready to call it */ + if ((EntryPoint) && + (LdrEntry->Flags & LDRP_PROCESS_ATTACH_CALLED) && + (LdrEntry->Flags & LDRP_IMAGE_DLL)) + { + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrEntry->EntryPointActivationContext); + + /* Check if it has TLS */ + if (LdrEntry->TlsIndex) + { + /* Make sure we're not shutting down */ + if (!LdrpShutdownInProgress) + { + /* Call TLS */ + LdrpTlsCallback(LdrEntry->DllBase, DLL_THREAD_ATTACH); + } + } + + /* Make sure we're not shutting down */ + if (!LdrpShutdownInProgress) + { + /* Call the Entrypoint */ + DPRINT("%wZ - Calling entry point at %x for thread attaching\n", + &LdrEntry->BaseDllName, LdrEntry->EntryPoint); + LdrpCallDllEntry(LdrEntry->EntryPoint, + LdrEntry->DllBase, + DLL_THREAD_ATTACH, + NULL); + } + + /* Deactivate the ActCtx */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + } + } + + /* Next entry */ + NextEntry = NextEntry->Flink; + } + + /* Check for TLS */ + if (LdrpImageHasTls && !LdrpShutdownInProgress) + { + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrpImageEntry->EntryPointActivationContext); + + /* Do TLS callbacks */ + LdrpTlsCallback(Peb->ImageBaseAddress, DLL_THREAD_ATTACH); + + /* Deactivate the ActCtx */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + + DPRINT("LdrpInitializeThread() done\n"); +} + NTSTATUS NTAPI LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL) @@ -591,6 +757,9 @@ LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL) sizeof(ULONG), NULL); if (!NT_SUCCESS(Status)) BreakOnDllLoad = 0; + + /* Reset status back to STATUS_SUCCESS */ + Status = STATUS_SUCCESS; } /* Break if aksed */ @@ -712,6 +881,267 @@ Quickie: return Status; } +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrShutdownProcess(VOID) +{ + PPEB Peb = NtCurrentPeb(); + PLDR_DATA_TABLE_ENTRY LdrEntry; + PLIST_ENTRY NextEntry, ListHead; + RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED ActCtx; + PVOID EntryPoint; + + DPRINT("LdrShutdownProcess() called for %wZ\n", &LdrpImageEntry->BaseDllName); + if (LdrpShutdownInProgress) return STATUS_SUCCESS; + + /* Tell the Shim Engine */ + //if (ShimsEnabled) + //{ + /* FIXME */ + //} + + /* Tell the world */ + if (ShowSnaps) + { + DPRINT1("\n"); + } + + /* Set the shutdown variables */ + LdrpShutdownThreadId = NtCurrentTeb()->RealClientId.UniqueThread; + LdrpShutdownInProgress = TRUE; + + /* Enter the Loader Lock */ + RtlEnterCriticalSection(&LdrpLoaderLock); + + /* Cleanup trace logging data (Etw) */ + if (SharedUserData->TraceLogging) + { + /* FIXME */ + DPRINT1("We don't support Etw yet.\n"); + } + + /* Start at the end */ + ListHead = &Peb->Ldr->InInitializationOrderModuleList; + NextEntry = ListHead->Blink; + while (NextEntry != ListHead) + { + /* Get the current entry */ + LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); + NextEntry = NextEntry->Blink; + + /* Make sure it's not ourselves */ + if (Peb->ImageBaseAddress != LdrEntry->DllBase) + { + /* Get the entrypoint */ + EntryPoint = LdrEntry->EntryPoint; + + /* Check if we are ready to call it */ + if (EntryPoint && + (LdrEntry->Flags & LDRP_PROCESS_ATTACH_CALLED) && + LdrEntry->Flags) + { + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrEntry->EntryPointActivationContext); + + /* Check if it has TLS */ + if (LdrEntry->TlsIndex) + { + /* Call TLS */ + LdrpTlsCallback(LdrEntry->DllBase, DLL_PROCESS_DETACH); + } + + /* Call the Entrypoint */ + DPRINT("%wZ - Calling entry point at %x for thread detaching\n", + &LdrEntry->BaseDllName, LdrEntry->EntryPoint); + LdrpCallDllEntry(EntryPoint, + LdrEntry->DllBase, + DLL_PROCESS_DETACH, + (PVOID)1); + + /* Deactivate the ActCtx */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + } + } + + /* Check for TLS */ + if (LdrpImageHasTls) + { + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrpImageEntry->EntryPointActivationContext); + + /* Do TLS callbacks */ + LdrpTlsCallback(Peb->ImageBaseAddress, DLL_PROCESS_DETACH); + + /* Deactivate the ActCtx */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + + /* FIXME: Do Heap detection and Etw final shutdown */ + + /* Release the lock */ + RtlLeaveCriticalSection(&LdrpLoaderLock); + DPRINT("LdrpShutdownProcess() done\n"); + + return STATUS_SUCCESS; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrShutdownThread(VOID) +{ + PPEB Peb = NtCurrentPeb(); + PTEB Teb = NtCurrentTeb(); + PLDR_DATA_TABLE_ENTRY LdrEntry; + PLIST_ENTRY NextEntry, ListHead; + RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED ActCtx; + PVOID EntryPoint; + + DPRINT("LdrShutdownThread() called for %wZ\n", + &LdrpImageEntry->BaseDllName); + + /* Cleanup trace logging data (Etw) */ + if (SharedUserData->TraceLogging) + { + /* FIXME */ + DPRINT1("We don't support Etw yet.\n"); + } + + /* Get the Ldr Lock */ + RtlEnterCriticalSection(&LdrpLoaderLock); + + /* Start at the end */ + ListHead = &Peb->Ldr->InInitializationOrderModuleList; + NextEntry = ListHead->Blink; + while (NextEntry != ListHead) + { + /* Get the current entry */ + LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); + NextEntry = NextEntry->Blink; + + /* Make sure it's not ourselves */ + if (Peb->ImageBaseAddress != LdrEntry->DllBase) + { + /* Check if we should call */ + if (!(LdrEntry->Flags & LDRP_DONT_CALL_FOR_THREADS) && + (LdrEntry->Flags & LDRP_PROCESS_ATTACH_CALLED) && + (LdrEntry->Flags & LDRP_IMAGE_DLL)) + { + /* Get the entrypoint */ + EntryPoint = LdrEntry->EntryPoint; + + /* Check if we are ready to call it */ + if (EntryPoint) + { + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrEntry->EntryPointActivationContext); + + /* Check if it has TLS */ + if (LdrEntry->TlsIndex) + { + /* Make sure we're not shutting down */ + if (!LdrpShutdownInProgress) + { + /* Call TLS */ + LdrpTlsCallback(LdrEntry->DllBase, DLL_THREAD_DETACH); + } + } + + /* Make sure we're not shutting down */ + if (!LdrpShutdownInProgress) + { + /* Call the Entrypoint */ + DPRINT("%wZ - Calling entry point at %x for thread detaching\n", + &LdrEntry->BaseDllName, LdrEntry->EntryPoint); + LdrpCallDllEntry(EntryPoint, + LdrEntry->DllBase, + DLL_THREAD_DETACH, + NULL); + } + + /* Deactivate the ActCtx */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + } + } + } + + /* Check for TLS */ + if (LdrpImageHasTls) + { + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrpImageEntry->EntryPointActivationContext); + + /* Do TLS callbacks */ + LdrpTlsCallback(Peb->ImageBaseAddress, DLL_THREAD_DETACH); + + /* Deactivate the ActCtx */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + + /* Free TLS */ + LdrpFreeTls(); + RtlLeaveCriticalSection(&LdrpLoaderLock); + + /* Check for expansion slots */ + if (Teb->TlsExpansionSlots) + { + /* Free expansion slots */ + RtlFreeHeap(RtlGetProcessHeap(), 0, Teb->TlsExpansionSlots); + } + + /* Check for FLS Data */ + if (Teb->FlsData) + { + /* FIXME */ + DPRINT1("We don't support FLS Data yet\n"); + } + + /* Check for Fiber data */ + if (Teb->HasFiberData) + { + /* Free Fiber data*/ + RtlFreeHeap(RtlGetProcessHeap(), 0, Teb->NtTib.FiberData); + Teb->NtTib.FiberData = NULL; + } + + /* Free the activation context stack */ + RtlFreeThreadActivationContextStack(); + DPRINT("LdrShutdownThread() done\n"); + + return STATUS_SUCCESS; +} + NTSTATUS NTAPI LdrpInitializeTls(VOID) @@ -876,10 +1306,10 @@ LdrpFreeTls(VOID) NTSTATUS NTAPI -LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PULONG Options) +LdrpInitializeExecutionOptions(PUNICODE_STRING ImagePathName, PPEB Peb, PHKEY OptionsKey) { UNIMPLEMENTED; - *Options = 0; + *OptionsKey = NULL; return STATUS_SUCCESS; } @@ -912,7 +1342,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, //LPWSTR ImagePathBuffer; ULONG ConfigSize; UNICODE_STRING CurrentDirectory; - ULONG ExecuteOptions; + HKEY OptionsKey; ULONG HeapFlags; PIMAGE_NT_HEADERS NtHeader; LPWSTR NtDllName = NULL; @@ -925,9 +1355,9 @@ LdrpInitializeProcess(IN PCONTEXT Context, ULONG i; PWSTR ImagePath; ULONG DebugProcessHeapOnly = 0; - WCHAR FullNtDllPath[MAX_PATH]; PLDR_DATA_TABLE_ENTRY NtLdrEntry; PWCHAR Current; + ULONG ExecuteOptions = 0; /* Set a NULL SEH Filter */ RtlSetUnhandledExceptionFilter(NULL); @@ -951,7 +1381,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, NtHeader = RtlImageNtHeader(Peb->ImageBaseAddress); /* Get the execution options */ - Status = LdrpInitializeExecutionOptions(&ImagePathName, Peb, &ExecuteOptions); + Status = LdrpInitializeExecutionOptions(&ImagePathName, Peb, &OptionsKey); /* Check if this is a .NET executable */ if (RtlImageDirectoryEntryToData(Peb->ImageBaseAddress, @@ -1037,7 +1467,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, } /* Check if verbose debugging (ShowSnaps) was requested */ - ShowSnaps = TRUE;//Peb->NtGlobalFlag & FLG_SHOW_LDR_SNAPS; + ShowSnaps = Peb->NtGlobalFlag & FLG_SHOW_LDR_SNAPS; /* Start verbose debugging messages right now if they were requested */ if (ShowSnaps) @@ -1088,9 +1518,11 @@ LdrpInitializeProcess(IN PCONTEXT Context, } /* Initialize the Loader Lock */ + // FIXME: What's the point of initing it manually, if two lines lower + // a call to RtlInitializeCriticalSection() is being made anyway? //InsertTailList(&RtlCriticalSectionList, &LdrpLoaderLock.DebugInfo->ProcessLocksList); //LdrpLoaderLock.DebugInfo->CriticalSection = &LdrpLoaderLock; - UNIMPLEMENTED; + RtlInitializeCriticalSection(&LdrpLoaderLock); LdrpLoaderLockInit = TRUE; /* Check if User Stack Trace Database support was requested */ @@ -1131,19 +1563,30 @@ LdrpInitializeProcess(IN PCONTEXT Context, return STATUS_NO_MEMORY; } + // FIXME: Is it located properly? + /* Initialize table of callbacks for the kernel. */ + Peb->KernelCallbackTable = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + sizeof(PVOID) * + (USER32_CALLBACK_MAXIMUM + 1)); + if (!Peb->KernelCallbackTable) + { + DPRINT1("Failed to create callback table\n"); + ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); + } + /* Allocate an Activation Context Stack */ Status = RtlAllocateActivationContextStack((PVOID *)&Teb->ActivationContextStackPointer); if (!NT_SUCCESS(Status)) return Status; // FIXME: Loader private heap is missing - DPRINT1("Loader private heap is missing\n"); + //DPRINT1("Loader private heap is missing\n"); /* Check for Debug Heap */ - DPRINT1("Check for a debug heap is missing\n"); - if (FALSE) + if (OptionsKey) { /* Query the setting */ - Status = LdrQueryImageFileKeyOption(NULL,//hKey + Status = LdrQueryImageFileKeyOption(OptionsKey, L"DebugProcessHeapOnly", REG_DWORD, &DebugProcessHeapOnly, @@ -1162,9 +1605,9 @@ LdrpInitializeProcess(IN PCONTEXT Context, } /* Build the NTDLL Path */ - FullPath.Buffer = FullNtDllPath; + FullPath.Buffer = StringBuffer; FullPath.Length = 0; - FullPath.MaximumLength = sizeof(FullNtDllPath); + FullPath.MaximumLength = sizeof(StringBuffer); RtlInitUnicodeString(&NtSystemRoot, SharedUserData->NtSystemRoot); RtlAppendUnicodeStringToString(&FullPath, &NtSystemRoot); RtlAppendUnicodeToString(&FullPath, L"\\System32\\"); @@ -1185,7 +1628,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, { /* It doesn't, so assume System32 */ LdrpKnownDllObjectDirectory = NULL; - RtlInitUnicodeString(&LdrpKnownDllPath, FullPath.Buffer); + RtlInitUnicodeString(&LdrpKnownDllPath, StringBuffer); LdrpKnownDllPath.Length -= sizeof(WCHAR); } else @@ -1227,6 +1670,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, else { /* We need a valid path */ + DPRINT1("No valid DllPath was given!\n"); LdrpInitFailure(STATUS_INVALID_PARAMETER); } @@ -1243,6 +1687,11 @@ LdrpInitializeProcess(IN PCONTEXT Context, 0, 3 * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + if (!CurrentDirectory.Buffer) + { + DPRINT1("LDR: LdrpInitializeProcess - unable to allocate current working directory buffer\n"); + // FIXME: And what? + } /* Copy the drive of the system root */ RtlMoveMemory(CurrentDirectory.Buffer, @@ -1253,12 +1702,12 @@ LdrpInitializeProcess(IN PCONTEXT Context, CurrentDirectory.MaximumLength = CurrentDirectory.Length + sizeof(WCHAR); FreeCurDir = TRUE; + DPRINT("Using dynamically allocd curdir\n"); } else { /* Use the local buffer */ - CurrentDirectory.Length = NtSystemRoot.Length; - CurrentDirectory.Buffer = NtSystemRoot.Buffer; + DPRINT("Using local system root\n"); } } @@ -1277,8 +1726,8 @@ LdrpInitializeProcess(IN PCONTEXT Context, NtLdrEntry->EntryPoint = LdrpFetchAddressOfEntryPoint(NtLdrEntry->DllBase); NtLdrEntry->LoadCount = -1; NtLdrEntry->EntryPointActivationContext = 0; - NtLdrEntry->FullDllName.Length = ImageFileName.Length; - NtLdrEntry->FullDllName.Buffer = ImageFileName.Buffer; + NtLdrEntry->FullDllName = ImageFileName; + if (IsDotNetImage) NtLdrEntry->Flags = LDRP_COR_IMAGE; else @@ -1288,7 +1737,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, if (!ImageFileName.Buffer[0]) { /* Use the same Base name */ - NtLdrEntry->BaseDllName = NtLdrEntry->BaseDllName; + NtLdrEntry->BaseDllName = NtLdrEntry->FullDllName; } else { @@ -1329,14 +1778,16 @@ LdrpInitializeProcess(IN PCONTEXT Context, NtLdrEntry->EntryPoint = LdrpFetchAddressOfEntryPoint(NtLdrEntry->DllBase); NtLdrEntry->LoadCount = -1; NtLdrEntry->EntryPointActivationContext = 0; - //NtLdrEntry->BaseDllName.Length = NtSystemRoot.Length; - //RtlAppendUnicodeStringToString(&NtSystemRoot, &NtDllString); + + NtLdrEntry->FullDllName.Length = FullPath.Length; + NtLdrEntry->FullDllName.MaximumLength = FullPath.MaximumLength; + NtLdrEntry->FullDllName.Buffer = StringBuffer; + RtlAppendUnicodeStringToString(&NtLdrEntry->FullDllName, &NtDllString); + NtLdrEntry->BaseDllName.Length = NtDllString.Length; NtLdrEntry->BaseDllName.MaximumLength = NtDllString.MaximumLength; NtLdrEntry->BaseDllName.Buffer = NtDllString.Buffer; - // FIXME: Full DLL name?! - /* Processing done, insert it */ LdrpNtDllDataTableEntry = NtLdrEntry; LdrpInsertMemoryTableEntry(NtLdrEntry); @@ -1507,7 +1958,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, ///* Close the key if we have one opened */ //if (hKey) NtClose(hKey); -DbgBreakPoint(); + /* Return status */ return Status; } @@ -1593,7 +2044,7 @@ LdrpInit(PCONTEXT Context, _SEH2_TRY { /* Initialize the Process */ - LoaderStatus = LdrpInitializeProcess_(Context, + LoaderStatus = LdrpInitializeProcess(Context, SystemArgument1); /* Check for success and if MinimumStackCommit was requested */ diff --git a/dll/ntdll/ldr/ldrpe.c b/dll/ntdll/ldr/ldrpe.c index 12e24fe547d..41694d37e96 100644 --- a/dll/ntdll/ldr/ldrpe.c +++ b/dll/ntdll/ldr/ldrpe.c @@ -100,9 +100,7 @@ LdrpSnapIAT(IN PLDR_DATA_TABLE_ENTRY ExportLdrEntry, /* Deal with Watcom and other retarded compilers */ if (!IatSize) - { IatSize = SectionHeader->SizeOfRawData; - } /* Found it, get out */ break; @@ -255,7 +253,7 @@ NTSTATUS NTAPI LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, IN PLDR_DATA_TABLE_ENTRY LdrEntry, - IN PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundEntry, + IN PIMAGE_BOUND_IMPORT_DESCRIPTOR *BoundEntryPtr, IN PIMAGE_BOUND_IMPORT_DESCRIPTOR FirstEntry) { LPSTR ImportName = NULL, BoundImportName, ForwarderName; @@ -264,11 +262,15 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, PIMAGE_IMPORT_DESCRIPTOR ImportEntry; PLDR_DATA_TABLE_ENTRY DllLdrEntry, ForwarderLdrEntry; PIMAGE_BOUND_FORWARDER_REF ForwarderEntry; + PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundEntry; PPEB Peb = NtCurrentPeb(); ULONG i, IatSize; + /* Get the pointer to the bound entry */ + BoundEntry = *BoundEntryPtr; + /* Get the name's VA */ - BoundImportName = (LPSTR)(BoundEntry + BoundEntry->OffsetModuleName); + BoundImportName = (LPSTR)FirstEntry + BoundEntry->OffsetModuleName; /* Show debug mesage */ if (ShowSnaps) @@ -311,7 +313,7 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, if (ShowSnaps) { DPRINT1("LDR: %wZ has stale binding to %s\n", - &DllLdrEntry->BaseDllName, + &LdrEntry->BaseDllName, BoundImportName); } @@ -324,7 +326,7 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, if (ShowSnaps) { DPRINT1("LDR: %wZ has correct binding to %s\n", - &DllLdrEntry->BaseDllName, + &LdrEntry->BaseDllName, BoundImportName); } @@ -339,7 +341,7 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, for (i = 0; i < BoundEntry->NumberOfModuleForwarderRefs; i++) { /* Get the name */ - ForwarderName = (LPSTR)(FirstEntry + ForwarderEntry->OffsetModuleName); + ForwarderName = (LPSTR)FirstEntry + ForwarderEntry->OffsetModuleName; /* Show debug message */ if (ShowSnaps) @@ -376,7 +378,7 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, if (ShowSnaps) { DPRINT1("LDR: %wZ has stale binding to %s\n", - &ForwarderLdrEntry->BaseDllName, + &LdrEntry->BaseDllName, ForwarderName); } @@ -389,7 +391,7 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, if (ShowSnaps) { DPRINT1("LDR: %wZ has correct binding to %s\n", - &ForwarderLdrEntry->BaseDllName, + &LdrEntry->BaseDllName, ForwarderName); } @@ -423,7 +425,7 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, if (!_stricmp(ImportName, BoundImportName)) break; /* Move to next entry */ - ImportEntry += 1; + ImportEntry++; } /* If we didn't find a name, fail */ @@ -477,7 +479,7 @@ LdrpHandleOneNewFormatImportDescriptor(IN LPWSTR DllPath OPTIONAL, Quickie: /* Write where we are now and return */ - *BoundEntry = *FirstEntry; + *BoundEntryPtr = FirstEntry; return Status; } @@ -496,7 +498,7 @@ LdrpHandleNewFormatImportDescriptors(IN LPWSTR DllPath OPTIONAL, /* Parse this descriptor */ Status = LdrpHandleOneNewFormatImportDescriptor(DllPath, LdrEntry, - BoundEntry, + &BoundEntry, FirstEntry); if (!NT_SUCCESS(Status)) return Status; } @@ -642,8 +644,35 @@ LdrpNameToOrdinal(LPSTR ImportName, PULONG NameTable, PUSHORT OrdinalTable) { - UNIMPLEMENTED; - return 0; + ULONG Start, End, Next; + LONG CmpResult; + + /* Use classical binary search to find the ordinal */ + Start = 0; + End = NumberOfNames - 1; + while (End >= Start) + { + /* Next will be exactly between Start and End */ + Next = (Start + End) >> 1; + + /* Compare this name with the one we need to find */ + CmpResult = strcmp(ImportName, (PCHAR)((ULONG_PTR)ExportBase + NameTable[Next])); + + /* We found our entry if result is 0 */ + if (!CmpResult) break; + + /* We didn't find, update our range then */ + if (CmpResult < 0) + End = Next - 1; + else if (CmpResult > 0) + Start = Next + 1; + } + + /* If end is before start, then the search failed */ + if (End < Start) return -1; + + /* Return found name */ + return OrdinalTable[Next]; } NTSTATUS @@ -657,10 +686,12 @@ LdrpWalkImportDescriptor(IN LPWSTR DllPath OPTIONAL, PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundEntry = NULL; PIMAGE_IMPORT_DESCRIPTOR ImportEntry; ULONG BoundSize, IatSize; -DPRINT1("LdrpWalkImportDescriptor('%S' %x)\n", DllPath, LdrEntry); + + DPRINT("LdrpWalkImportDescriptor('%S' %x)\n", DllPath, LdrEntry); + /* Set up the Act Ctx */ ActCtx.Size = sizeof(ActCtx); - ActCtx.Frame.Flags = 1; + ActCtx.Format = 1; RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); /* Check if we have a manifest prober routine */ @@ -680,7 +711,7 @@ DPRINT1("LdrpWalkImportDescriptor('%S' %x)\n", DllPath, LdrEntry); RtlActivateActivationContextUnsafeFast(&ActCtx, LdrEntry->EntryPointActivationContext); - /* Check if we were directed */ + /* Check if we were redirected */ if (!(LdrEntry->Flags & LDRP_REDIRECTED)) { /* Get the Bound IAT */ @@ -764,7 +795,9 @@ LdrpLoadImportModule(IN PWSTR DllPath OPTIONAL, NTSTATUS Status; PPEB Peb = RtlGetCurrentPeb(); PTEB Teb = NtCurrentTeb(); -DPRINT1("LdrpLoadImportModule('%S' '%s' %p %p %p)\n", DllPath, ImportName, DllBase, DataTableEntry, Existing); + + DPRINT("LdrpLoadImportModule('%S' '%s' %p %p %p)\n", DllPath, ImportName, DllBase, DataTableEntry, Existing); + /* Convert import descriptor name to unicode string */ ImpDescName = &Teb->StaticUnicodeString; RtlInitAnsiString(&AnsiString, ImportName); @@ -788,8 +821,8 @@ DPRINT1("LdrpLoadImportModule('%S' '%s' %p %p %p)\n", DllPath, ImportName, DllBa /* Map it */ Status = LdrpMapDll(DllPath, - ImpDescName->Buffer, NULL, + ImpDescName->Buffer, NULL, TRUE, FALSE, @@ -893,6 +926,12 @@ FailurePath: /* Is this a static snap? */ if (Static) { + /* Inform the debug log */ + if (IsOrdinal) + DPRINT1("Failed to snap ordinal 0x%x\n", OriginalOrdinal); + else + DPRINT1("Failed to snap %s\n", ImportName); + /* These are critical errors. Setup a string for the DLL name */ RtlInitAnsiString(&TempString, DllName ? DllName : "Unknown"); RtlAnsiStringToUnicodeString(&HardErrorDllName, &TempString, TRUE); @@ -944,6 +983,14 @@ FailurePath: /* Return ordinal error */ RtlRaiseStatus(STATUS_ORDINAL_NOT_FOUND); } + else + { + /* Inform the debug log */ + if (IsOrdinal) + DPRINT("Non-fatal: Failed to snap ordinal 0x%x\n", OriginalOrdinal); + else + DPRINT("Non-fatal: Failed to snap %s\n", ImportName); + } /* Set this as a bad DLL */ Thunk->u1.Function = (ULONG_PTR)0xffbadd11; diff --git a/dll/ntdll/ldr/ldrutils.c b/dll/ntdll/ldr/ldrutils.c index 8c2783755ae..b3c4dcebc1c 100644 --- a/dll/ntdll/ldr/ldrutils.c +++ b/dll/ntdll/ldr/ldrutils.c @@ -14,8 +14,11 @@ #include /* GLOBALS *******************************************************************/ +#define IMAGE_DLLCHARACTERISTICS_WX86_DLL 0x1000 +LIST_ENTRY LdrpUnloadHead; PLDR_DATA_TABLE_ENTRY LdrpLoadedDllHandleCache; +PLDR_DATA_TABLE_ENTRY LdrpGetModuleHandleCache; #define LDR_GET_HASH_ENTRY(x) (RtlUpcaseUnicodeChar((x)) & (LDR_HASH_TABLE_ENTRIES - 1)) @@ -32,6 +35,241 @@ LdrpCallDllEntry(PDLLMAIN_FUNC EntryPoint, return EntryPoint(BaseAddress, Reason, Context); } +VOID +NTAPI +LdrpUpdateLoadCount3(IN PLDR_DATA_TABLE_ENTRY LdrEntry, + IN ULONG Flags, + OUT PUNICODE_STRING UpdateString) +{ + PIMAGE_BOUND_FORWARDER_REF NewImportForwarder; + + + PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundEntry; + PIMAGE_IMPORT_DESCRIPTOR ImportEntry; + PIMAGE_THUNK_DATA FirstThunk; + PLDR_DATA_TABLE_ENTRY Entry; + PUNICODE_STRING ImportNameUnic; + ANSI_STRING ImportNameAnsi; + LPSTR ImportName; + ULONG ImportSize; + NTSTATUS Status; + ULONG i; + + /* Check the action we need to perform */ + if (Flags == LDRP_UPDATE_REFCOUNT) + { + /* Make sure entry is not being loaded already */ + if (LdrEntry->Flags & LDRP_LOAD_IN_PROGRESS) + return; + + LdrEntry->Flags |= LDRP_LOAD_IN_PROGRESS; + } + else if (Flags == LDRP_UPDATE_DEREFCOUNT) + { + /* Make sure the entry is not being unloaded already */ + if (LdrEntry->Flags & LDRP_UNLOAD_IN_PROGRESS) + return; + + LdrEntry->Flags |= LDRP_UNLOAD_IN_PROGRESS; + } + + /* Go through all bound DLLs and dereference them */ + ImportNameUnic = &NtCurrentTeb()->StaticUnicodeString; + + /* Try to get the new import entry */ + BoundEntry = (PIMAGE_BOUND_IMPORT_DESCRIPTOR)RtlImageDirectoryEntryToData(LdrEntry->DllBase, + TRUE, + IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT, + &ImportSize); + + if (BoundEntry) + { + /* Set entry flags if refing/derefing */ + if (Flags == LDRP_UPDATE_REFCOUNT) + LdrEntry->Flags |= LDRP_LOAD_IN_PROGRESS; + else if (Flags == LDRP_UPDATE_DEREFCOUNT) + LdrEntry->Flags |= LDRP_UNLOAD_IN_PROGRESS; + + while (BoundEntry->OffsetModuleName) + { + /* Get pointer to the current import name */ + ImportName = (PCHAR)BoundEntry + BoundEntry->OffsetModuleName; + + RtlInitAnsiString(&ImportNameAnsi, ImportName); + Status = RtlAnsiStringToUnicodeString(ImportNameUnic, &ImportNameAnsi, FALSE); + + if (NT_SUCCESS(Status)) + { + if (LdrpCheckForLoadedDll(NULL, + ImportNameUnic, + TRUE, + FALSE, + &Entry)) + { + if (Entry->LoadCount != -1) + { + /* Perform the required action */ + switch (Flags) + { + case LDRP_UPDATE_REFCOUNT: + Entry->LoadCount++; + break; + case LDRP_UPDATE_DEREFCOUNT: + Entry->LoadCount--; + break; + case LDRP_UPDATE_PIN: + Entry->LoadCount = -1; + break; + } + + /* Show snaps */ + if (ShowSnaps) + { + DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); + } + } + + /* Recurse into this entry */ + LdrpUpdateLoadCount3(Entry, Flags, UpdateString); + } + } + + /* Go through forwarders */ + NewImportForwarder = (PIMAGE_BOUND_FORWARDER_REF)(BoundEntry + 1); + for (i=0; iNumberOfModuleForwarderRefs; i++) + { + ImportName = (PCHAR)BoundEntry + NewImportForwarder->OffsetModuleName; + + RtlInitAnsiString(&ImportNameAnsi, ImportName); + Status = RtlAnsiStringToUnicodeString(ImportNameUnic, &ImportNameAnsi, FALSE); + if (NT_SUCCESS(Status)) + { + if (LdrpCheckForLoadedDll(NULL, + ImportNameUnic, + TRUE, + FALSE, + &Entry)) + { + if (Entry->LoadCount != -1) + { + /* Perform the required action */ + switch (Flags) + { + case LDRP_UPDATE_REFCOUNT: + Entry->LoadCount++; + break; + case LDRP_UPDATE_DEREFCOUNT: + Entry->LoadCount--; + break; + case LDRP_UPDATE_PIN: + Entry->LoadCount = -1; + break; + } + + /* Show snaps */ + if (ShowSnaps) + { + DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); + } + } + + /* Recurse into this entry */ + LdrpUpdateLoadCount3(Entry, Flags, UpdateString); + } + } + + NewImportForwarder++; + } + + BoundEntry = (PIMAGE_BOUND_IMPORT_DESCRIPTOR)NewImportForwarder; + } + + /* We're done */ + return; + } + + /* Check oldstyle import descriptor */ + ImportEntry = (PIMAGE_IMPORT_DESCRIPTOR)RtlImageDirectoryEntryToData(LdrEntry->DllBase, + TRUE, + IMAGE_DIRECTORY_ENTRY_IMPORT, + &ImportSize); + if (ImportEntry) + { + /* There is old one, so go through its entries */ + while (ImportEntry->Name && ImportEntry->FirstThunk) + { + FirstThunk = (PIMAGE_THUNK_DATA)((ULONG_PTR)LdrEntry->DllBase + ImportEntry->FirstThunk); + + /* Skip this entry if needed */ + if (!FirstThunk->u1.Function) + { + ImportEntry++; + continue; + } + + ImportName = (PSZ)((ULONG_PTR)LdrEntry->DllBase + ImportEntry->Name); + + RtlInitAnsiString(&ImportNameAnsi, ImportName); + Status = RtlAnsiStringToUnicodeString(ImportNameUnic, &ImportNameAnsi, FALSE); + if (NT_SUCCESS(Status)) + { + if (LdrpCheckForLoadedDll(NULL, + ImportNameUnic, + TRUE, + FALSE, + &Entry)) + { + if (Entry->LoadCount != -1) + { + /* Perform the required action */ + switch (Flags) + { + case LDRP_UPDATE_REFCOUNT: + Entry->LoadCount++; + break; + case LDRP_UPDATE_DEREFCOUNT: + Entry->LoadCount--; + break; + case LDRP_UPDATE_PIN: + Entry->LoadCount = -1; + break; + } + + /* Show snaps */ + if (ShowSnaps) + { + DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); + } + } + + /* Recurse */ + LdrpUpdateLoadCount3(Entry, Flags, UpdateString); + } + } + + /* Go to the next entry */ + ImportEntry++; + } + } +} + +VOID +NTAPI +LdrpUpdateLoadCount2(IN PLDR_DATA_TABLE_ENTRY LdrEntry, + IN ULONG Flags) +{ + WCHAR Buffer[MAX_PATH]; + UNICODE_STRING UpdateString; + + /* Setup the string */ + UpdateString.Buffer = Buffer; + UpdateString.Length = 0; + UpdateString.MaximumLength = sizeof(Buffer); + + /* Call the extended API */ + LdrpUpdateLoadCount3(LdrEntry, Flags, &UpdateString); +} + VOID NTAPI LdrpTlsCallback(PVOID BaseAddress, ULONG Reason) @@ -84,6 +322,259 @@ LdrpTlsCallback(PVOID BaseAddress, ULONG Reason) _SEH2_END; } +NTSTATUS +NTAPI +LdrpCodeAuthzCheckDllAllowed(PUNICODE_STRING FullName, + HANDLE DllHandle) +{ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +LdrpCreateDllSection(IN PUNICODE_STRING FullName, + IN HANDLE DllHandle, + IN PULONG DllCharacteristics OPTIONAL, + OUT PHANDLE SectionHandle) +{ + HANDLE FileHandle; + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + ULONG_PTR HardErrorParameters[1]; + ULONG Response; + SECTION_IMAGE_INFORMATION SectionImageInfo; + + /* Check if we don't already have a handle */ + if (!DllHandle) + { + /* Create the object attributes */ + InitializeObjectAttributes(&ObjectAttributes, + FullName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + /* Open the DLL */ + Status = NtOpenFile(&FileHandle, + SYNCHRONIZE | FILE_EXECUTE | FILE_READ_DATA, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_DELETE, + FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + + /* Check if we failed */ + if (!NT_SUCCESS(Status)) + { + /* Attempt to open for execute only */ + Status = NtOpenFile(&FileHandle, + SYNCHRONIZE | FILE_EXECUTE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_DELETE, + FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + + /* Check if this failed too */ + if (!NT_SUCCESS(Status)) + { + /* Show debug message */ + if (ShowSnaps) + { + DPRINT1("LDR: LdrpCreateDllSection - NtOpenFile failed; status = %x\n", + Status); + } + + /* Make sure to return an expected status code */ + if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + { + /* Callers expect this instead */ + Status = STATUS_DLL_NOT_FOUND; + } + + /* Return an empty section handle */ + *SectionHandle = NULL; + return Status; + } + } + } + else + { + /* Use the handle we already have */ + FileHandle = DllHandle; + } + + /* Create a section for the DLL */ + Status = NtCreateSection(SectionHandle, + SECTION_MAP_READ | SECTION_MAP_EXECUTE | + SECTION_MAP_WRITE | SECTION_QUERY, + NULL, + NULL, + PAGE_EXECUTE, + SEC_IMAGE, + FileHandle); + + /* If mapping failed, raise a hard error */ + if (!NT_SUCCESS(Status)) + { + /* Forget the handle */ + *SectionHandle = NULL; + + /* Give the DLL name */ + HardErrorParameters[0] = (ULONG_PTR)FullName; + + /* Raise the error */ + ZwRaiseHardError(STATUS_INVALID_IMAGE_FORMAT, + 1, + 1, + HardErrorParameters, + OptionOk, + &Response); + + /* Increment the error count */ + if (LdrpInLdrInit) LdrpFatalHardErrorCount++; + } + + /* Check for Safer restrictions */ + if (DllCharacteristics && + !(*DllCharacteristics & IMAGE_DLLCHARACTERISTICS_WX86_DLL)) + { + /* Make sure it's executable */ + Status = ZwQuerySection(*SectionHandle, + SectionImageInformation, + &SectionImageInfo, + sizeof(SECTION_IMAGE_INFORMATION), + NULL); + if (NT_SUCCESS(Status)) + { + /* Check if it's executable */ + if (SectionImageInfo.ImageContainsCode) + { + /* It is, check safer */ + Status = LdrpCodeAuthzCheckDllAllowed(FullName, DllHandle); + if (!NT_SUCCESS(Status) && (Status != STATUS_NOT_FOUND)) + { + /* Show debug message */ + if (ShowSnaps) + { + DPRINT1("LDR: Loading of (%wZ) blocked by Winsafer\n", + &FullName); + } + } + else + { + /* We're fine, return normally */ + goto Quickie; + } + } + } + + /* Failure case, close section handle */ + NtClose(*SectionHandle); + *SectionHandle = NULL; + } + +Quickie: + /* Close the file handle, we don't need it */ + NtClose(FileHandle); + + /* Return status */ + return Status; +} + +BOOLEAN +NTAPI +LdrpResolveDllName(PWSTR DllPath, + PWSTR DllName, + PUNICODE_STRING FullDllName, + PUNICODE_STRING BaseDllName) +{ + PWCHAR NameBuffer, p1, p2 = 0; + ULONG Length; + ULONG BufSize = 500; + + /* Allocate space for full DLL name */ + FullDllName->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufSize + sizeof(UNICODE_NULL)); + if (!FullDllName->Buffer) return FALSE; + + Length = RtlDosSearchPath_U(DllPath ? DllPath : LdrpDefaultPath.Buffer, + DllName, + NULL, + BufSize, + FullDllName->Buffer, + &BaseDllName->Buffer); + + if (!Length || Length > BufSize) + { + if (ShowSnaps) + { + DPRINT1("LDR: LdrResolveDllName - Unable to find "); + DPRINT1("%ws from %ws\n", DllName, DllPath ? DllPath : LdrpDefaultPath.Buffer); + } + + RtlFreeUnicodeString(FullDllName); + return FALSE; + } + + /* Construct full DLL name */ + FullDllName->Length = Length; + FullDllName->MaximumLength = FullDllName->Length + sizeof(UNICODE_NULL); + + /* Allocate a new buffer */ + NameBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, FullDllName->MaximumLength); + if (!NameBuffer) + { + RtlFreeHeap(RtlGetProcessHeap(), 0, FullDllName->Buffer); + return FALSE; + } + + /* Copy over the contents from the previous one and free it */ + RtlCopyMemory(NameBuffer, FullDllName->Buffer, FullDllName->MaximumLength); + RtlFreeHeap(RtlGetProcessHeap(), 0, FullDllName->Buffer); + FullDllName->Buffer = NameBuffer; + + /* Find last backslash */ + p1 = FullDllName->Buffer; + while (*p1) + { + if (*p1++ == L'\\') + { + p2 = p1; + } + } + + /* If found, set p1 to it, otherwise p1 points to the beginning of DllName */ + if (p2) + p1 = p2; + else + p1 = DllName; + + p2 = p1; + + /* Calculate remaining length */ + while (*p1) ++p1; + + /* Construct base DLL name */ + BaseDllName->Length = (ULONG_PTR)p1 - (ULONG_PTR)p2; + BaseDllName->MaximumLength = BaseDllName->Length + sizeof(UNICODE_NULL); + BaseDllName->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, BaseDllName->MaximumLength); + + if (!BaseDllName->Buffer) + { + RtlFreeHeap(RtlGetProcessHeap(), 0, NameBuffer); + return FALSE; + } + + /* Copy base dll name to the new buffer */ + RtlMoveMemory(BaseDllName->Buffer, + p2, + BaseDllName->Length); + + /* Null-terminate the string */ + BaseDllName->Buffer[BaseDllName->Length / sizeof(WCHAR)] = 0; + + return TRUE; +} + PVOID NTAPI LdrpFetchAddressOfEntryPoint(PVOID ImageBase) @@ -105,6 +596,170 @@ LdrpFetchAddressOfEntryPoint(PVOID ImageBase) return (PVOID)EntryPoint; } +HANDLE +NTAPI +LdrpCheckForKnownDll(PWSTR DllName, + PUNICODE_STRING FullDllName, + PUNICODE_STRING BaseDllName) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE Section = NULL; + UNICODE_STRING DllNameUnic; + NTSTATUS Status; + PCHAR p1; + PWCHAR p2; + + /* Upgrade DllName to a unicode string */ + RtlInitUnicodeString(&DllNameUnic, DllName); + + /* Get the activation context */ + Status = RtlFindActivationContextSectionString(0, + NULL, + ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, + &DllNameUnic, + NULL); + + /* Check if it's a SxS or not */ + if (Status == STATUS_SXS_SECTION_NOT_FOUND || + Status == STATUS_SXS_KEY_NOT_FOUND) + { + /* Set up BaseDllName */ + BaseDllName->Length = DllNameUnic.Length; + BaseDllName->MaximumLength = DllNameUnic.MaximumLength; + BaseDllName->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + DllNameUnic.MaximumLength); + if (!BaseDllName->Buffer) return NULL; + + /* Copy the contents there */ + RtlMoveMemory(BaseDllName->Buffer, DllNameUnic.Buffer, DllNameUnic.MaximumLength); + + /* Set up FullDllName */ + FullDllName->Length = LdrpKnownDllPath.Length + BaseDllName->Length + sizeof(WCHAR); + FullDllName->MaximumLength = FullDllName->Length + sizeof(UNICODE_NULL); + FullDllName->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, FullDllName->MaximumLength); + if (!FullDllName->Buffer) + { + /* Free base name and fail */ + RtlFreeHeap(RtlGetProcessHeap(), 0, BaseDllName->Buffer); + return NULL; + } + + RtlMoveMemory(FullDllName->Buffer, LdrpKnownDllPath.Buffer, LdrpKnownDllPath.Length); + + /* Put a slash there */ + p1 = (PCHAR)FullDllName->Buffer + LdrpKnownDllPath.Length; + p2 = (PWCHAR)p1; + *p2++ = (WCHAR)'\\'; + p1 = (PCHAR)p2; + + /* Set up DllNameUnic for a relative path */ + DllNameUnic.Buffer = (PWSTR)p1; + DllNameUnic.Length = BaseDllName->Length; + DllNameUnic.MaximumLength = DllNameUnic.Length + sizeof(UNICODE_NULL); + + /* Copy the contents */ + RtlMoveMemory(p1, BaseDllName->Buffer, BaseDllName->MaximumLength); + + /* There are all names, init attributes and open the section */ + InitializeObjectAttributes(&ObjectAttributes, + &DllNameUnic, + OBJ_CASE_INSENSITIVE, + LdrpKnownDllObjectDirectory, + NULL); + + Status = NtOpenSection(&Section, + SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_MAP_WRITE, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + /* Opening failed, free resources */ + Section = NULL; + RtlFreeHeap(RtlGetProcessHeap(), 0, BaseDllName->Buffer); + RtlFreeHeap(RtlGetProcessHeap(), 0, FullDllName->Buffer); + } + } + else + { + if (!NT_SUCCESS(Status)) Section = NULL; + } + + /* Return section handle */ + return Section; +} + +NTSTATUS +NTAPI +LdrpSetProtection(PVOID ViewBase, + BOOLEAN Restore) +{ + PIMAGE_NT_HEADERS NtHeaders; + PIMAGE_SECTION_HEADER Section; + NTSTATUS Status; + PVOID SectionBase; + SIZE_T SectionSize; + ULONG NewProtection, OldProtection, i; + + /* Get the NT headers */ + NtHeaders = RtlImageNtHeader(ViewBase); + + /* Compute address of the first section header */ + Section = (PIMAGE_SECTION_HEADER)( + (ULONG_PTR)NtHeaders + sizeof(ULONG) + sizeof(IMAGE_FILE_HEADER) + + NtHeaders->FileHeader.SizeOfOptionalHeader); + + /* Go through all sections */ + for (i = 0; i < NtHeaders->FileHeader.NumberOfSections; i++) + { + if (Section->SizeOfRawData && + !(Section->Characteristics & IMAGE_SCN_MEM_WRITE)) + { + /* This section is not writable and has some size, so we need to change + its protection */ + if (Restore) + { + /* Set it to either EXECUTE or READONLY */ + if (Section->Characteristics & IMAGE_SCN_MEM_EXECUTE) + NewProtection = PAGE_EXECUTE; + else + NewProtection = PAGE_READONLY; + + /* Add PAGE_NOCACHE if needed */ + if (Section->Characteristics & IMAGE_SCN_MEM_NOT_CACHED) + NewProtection |= PAGE_NOCACHE; + } + else + { + /* Enable write access */ + NewProtection = PAGE_READWRITE; + } + + SectionBase = (PVOID)((ULONG_PTR)ViewBase + Section->VirtualAddress); + SectionSize = Section->SizeOfRawData; + + if (SectionSize) + { + /* Set protection */ + Status = ZwProtectVirtualMemory(NtCurrentProcess(), + &SectionBase, + &SectionSize, + NewProtection, + &OldProtection); + + if (!NT_SUCCESS(Status)) return Status; + } + } + + /* Move to the next section */ + Section++; + } + + /* Flush instruction cache if necessary */ + if (Restore) ZwFlushInstructionCache(NtCurrentProcess(), NULL, 0); + + return STATUS_SUCCESS; +} + NTSTATUS NTAPI LdrpMapDll(IN PWSTR SearchPath OPTIONAL, @@ -115,8 +770,504 @@ LdrpMapDll(IN PWSTR SearchPath OPTIONAL, IN BOOLEAN Redirect, OUT PLDR_DATA_TABLE_ENTRY *DataTableEntry) { - UNIMPLEMENTED; - return STATUS_SUCCESS; + PTEB Teb = NtCurrentTeb(); + PPEB Peb = NtCurrentPeb(); + PWCHAR p1 = DllName; + WCHAR TempChar; + BOOLEAN KnownDll = FALSE; + UNICODE_STRING FullDllName, BaseDllName; + HANDLE SectionHandle = NULL, DllHandle = 0; + UNICODE_STRING NtPathDllName; + ULONG_PTR HardErrorParameters[2]; + UNICODE_STRING HardErrorDllName, HardErrorDllPath; + ULONG Response; + SIZE_T ViewSize = 0; + PVOID ViewBase = NULL; + PVOID ArbitraryUserPointer; + PIMAGE_NT_HEADERS NtHeaders; + NTSTATUS HardErrorStatus, Status; + BOOLEAN OverlapDllFound = FALSE; + ULONG_PTR ImageBase, ImageEnd; + PLIST_ENTRY ListHead, NextEntry; + PLDR_DATA_TABLE_ENTRY CandidateEntry, LdrEntry; + ULONG_PTR CandidateBase, CandidateEnd; + UNICODE_STRING OverlapDll; + BOOLEAN RelocatableDll = TRUE; + UNICODE_STRING IllegalDll; + PVOID RelocData; + ULONG RelocDataSize = 0; + + // FIXME: AppCompat stuff is missing + + if (ShowSnaps) + { + DPRINT1("LDR: LdrpMapDll: Image Name %ws, Search Path %ws\n", + DllName, + SearchPath ? SearchPath : L""); + } + + /* Check if we have a known dll directory */ + if (LdrpKnownDllObjectDirectory) + { + /* Check if the path is full */ + while (*p1) + { + TempChar = *p1++; + if (TempChar == '\\' || TempChar == '/' ) + { + /* Complete path, don't do Known Dll lookup */ + goto SkipCheck; + } + } + + /* Try to find a Known DLL */ + SectionHandle = LdrpCheckForKnownDll(DllName, + &FullDllName, + &BaseDllName); + } + +SkipCheck: + + /* Check if the Known DLL Check returned something */ + if (!SectionHandle) + { + /* It didn't, so try to resolve the name now */ + if (LdrpResolveDllName(SearchPath, + DllName, + &FullDllName, + &BaseDllName)) + { + /* Got a name, display a message */ + if (ShowSnaps) + { + DPRINT1("LDR: Loading (%s) %wZ\n", + Static ? "STATIC" : "DYNAMIC", + &FullDllName); + } + + /* Convert to NT Name */ + if (!RtlDosPathNameToNtPathName_U(FullDllName.Buffer, + &NtPathDllName, + NULL, + NULL)) + { + /* Path was invalid */ + return STATUS_OBJECT_PATH_SYNTAX_BAD; + } + + /* Create a section for this dLL */ + Status = LdrpCreateDllSection(&NtPathDllName, + DllHandle, + DllCharacteristics, + &SectionHandle); + + /* Free the NT Name */ + RtlFreeHeap(RtlGetProcessHeap(), 0, NtPathDllName.Buffer); + + /* If we failed */ + if (!NT_SUCCESS(Status)) + { + /* Free the name strings and return */ + RtlFreeUnicodeString(&FullDllName); + RtlFreeUnicodeString(&BaseDllName); + return Status; + } + } + else + { + /* We couldn't resolve the name, is this a static load? */ + if (Static) + { + /* + * This is BAD! Static loads are CRITICAL. Bugcheck! + * Initialize the strings for the error + */ + RtlInitUnicodeString(&HardErrorDllName, DllName); + RtlInitUnicodeString(&HardErrorDllPath, + DllPath2 ? DllPath2 : LdrpDefaultPath.Buffer); + + /* Set them as error parameters */ + HardErrorParameters[0] = (ULONG_PTR)&HardErrorDllName; + HardErrorParameters[1] = (ULONG_PTR)&HardErrorDllPath; + + /* Raise the hard error */ + NtRaiseHardError(STATUS_DLL_NOT_FOUND, + 2, + 0x00000003, + HardErrorParameters, + OptionOk, + &Response); + + /* We're back, where we initializing? */ + if (LdrpInLdrInit) LdrpFatalHardErrorCount++; + } + + /* Return failure */ + return STATUS_DLL_NOT_FOUND; + } + } + else + { + /* We have a section handle, so this is a known dll */ + KnownDll = TRUE; + } + + /* Stuff the image name in the TIB, for the debugger */ + ArbitraryUserPointer = Teb->NtTib.ArbitraryUserPointer; + Teb->NtTib.ArbitraryUserPointer = FullDllName.Buffer; + + /* Map the DLL */ + ViewBase = NULL; + ViewSize = 0; + Status = NtMapViewOfSection(SectionHandle, + NtCurrentProcess(), + &ViewBase, + 0, + 0, + NULL, + &ViewSize, + ViewShare, + 0, + PAGE_READWRITE); + + /* Restore */ + Teb->NtTib.ArbitraryUserPointer = ArbitraryUserPointer; + + /* Fail if we couldn't map it */ + if (!NT_SUCCESS(Status)) + { + /* Close and return */ + NtClose(SectionHandle); + return Status; + } + + /* Get the NT Header */ + if (!(NtHeaders = RtlImageNtHeader(ViewBase))) + { + /* Invalid image, unmap, close handle and fail */ + NtUnmapViewOfSection(NtCurrentProcess(), ViewBase); + NtClose(SectionHandle); + return STATUS_INVALID_IMAGE_FORMAT; + } + + // FIXME: .NET support is missing + + /* Allocate an entry */ + if (!(LdrEntry = LdrpAllocateDataTableEntry(ViewBase))) + { + /* Invalid image, unmap, close handle and fail */ + NtUnmapViewOfSection(NtCurrentProcess(), ViewBase); + NtClose(SectionHandle); + return STATUS_NO_MEMORY; + } + + /* Setup the entry */ + LdrEntry->Flags = Static ? LDRP_STATIC_LINK : 0; + if (Redirect) LdrEntry->Flags |= LDRP_REDIRECTED; + LdrEntry->LoadCount = 0; + LdrEntry->FullDllName = FullDllName; + LdrEntry->BaseDllName = BaseDllName; + LdrEntry->EntryPoint = LdrpFetchAddressOfEntryPoint(LdrEntry->DllBase); + + /* Show debug message */ + if (ShowSnaps) + { + DPRINT1("LDR: LdrpMapDll: Full Name %wZ, Base Name %wZ\n", + &FullDllName, + &BaseDllName); + } + + /* Insert this entry */ + LdrpInsertMemoryTableEntry(LdrEntry); + + // LdrpSendDllNotifications(LdrEntry, TRUE, Status == STATUS_IMAGE_NOT_AT_BASE) + + /* Check for invalid CPU Image */ + if (Status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) + { + /* Load our header */ + PIMAGE_NT_HEADERS ImageNtHeader = RtlImageNtHeader(Peb->ImageBaseAddress); + + /* Assume defaults if we don't have to run the Hard Error path */ + HardErrorStatus = STATUS_SUCCESS; + Response = ResponseCancel; + + /* Are we an NT 3.0 image? [Do these still exist? LOL -- IAI] */ + if (ImageNtHeader->OptionalHeader.MajorSubsystemVersion <= 3) + { + /* Reset the entrypoint, save our Dll Name */ + LdrEntry->EntryPoint = 0; + HardErrorParameters[0] = (ULONG_PTR)&FullDllName; + + /* Raise the error */ + HardErrorStatus = ZwRaiseHardError(STATUS_IMAGE_MACHINE_TYPE_MISMATCH, + 1, + 1, + HardErrorParameters, + OptionOkCancel, + &Response); + } + + /* Check if the user pressed cancel */ + if (NT_SUCCESS(HardErrorStatus) && Response == ResponseCancel) + { + /* Remove the DLL from the lists */ + RemoveEntryList(&LdrEntry->InLoadOrderLinks); + RemoveEntryList(&LdrEntry->InMemoryOrderModuleList); + RemoveEntryList(&LdrEntry->HashLinks); + + /* Remove the LDR Entry */ + RtlFreeHeap(RtlGetProcessHeap(), 0, LdrEntry ); + + /* Unmap and close section */ + NtUnmapViewOfSection(NtCurrentProcess(), ViewBase); + NtClose(SectionHandle); + + /* Did we do a hard error? */ + if (ImageNtHeader->OptionalHeader.MajorSubsystemVersion <= 3) + { + /* Yup, so increase fatal error count if we are initializing */ + if (LdrpInLdrInit) LdrpFatalHardErrorCount++; + } + + /* Return failure */ + return STATUS_INVALID_IMAGE_FORMAT; + } + } + else + { + /* The image was valid. Is it a DLL? */ + if (NtHeaders->FileHeader.Characteristics & IMAGE_FILE_DLL) + { + /* Set the DLL Flag */ + LdrEntry->Flags |= LDRP_IMAGE_DLL; + } + + /* If we're not a DLL, clear the entrypoint */ + if (!(LdrEntry->Flags & LDRP_IMAGE_DLL)) + { + LdrEntry->EntryPoint = 0; + } + } + + /* Return it for the caller */ + *DataTableEntry = LdrEntry; + + /* Check if we loaded somewhere else */ + if (Status == STATUS_IMAGE_NOT_AT_BASE) + { + /* Write the flag */ + LdrEntry->Flags |= LDRP_IMAGE_NOT_AT_BASE; + + /* Find our region */ + ImageBase = (ULONG_PTR)NtHeaders->OptionalHeader.ImageBase; + ImageEnd = ImageBase + ViewSize; + + DPRINT1("LDR: LdrpMapDll Relocating Image Name %ws (%p -> %p)\n", DllName, ImageBase, ViewBase); + + /* Scan all the modules */ + ListHead = &Peb->Ldr->InLoadOrderModuleList; + NextEntry = ListHead->Flink; + while (NextEntry != ListHead) + { + /* Get the entry */ + CandidateEntry = CONTAINING_RECORD(NextEntry, + LDR_DATA_TABLE_ENTRY, + InLoadOrderLinks); + NextEntry = NextEntry->Flink; + + /* Get the entry's bounds */ + CandidateBase = (ULONG_PTR)CandidateEntry->DllBase; + CandidateEnd = CandidateBase + CandidateEntry->SizeOfImage; + + /* Make sure this entry isn't unloading */ + if (!CandidateEntry->InMemoryOrderModuleList.Flink) continue; + + /* Check if our regions are colliding */ + if ((ImageBase >= CandidateBase && ImageBase <= CandidateEnd) || + (ImageEnd >= CandidateBase && ImageEnd <= CandidateEnd) || + (CandidateBase >= ImageBase && CandidateBase <= ImageEnd)) + { + /* Found who is overlapping */ + OverlapDllFound = TRUE; + OverlapDll = CandidateEntry->FullDllName; + break; + } + } + + /* Check if we found the DLL overlapping with us */ + if (!OverlapDllFound) + { + /* It's not another DLL, it's memory already here */ + RtlInitUnicodeString(&OverlapDll, L"Dynamically Allocated Memory"); + } + + DPRINT1("Overlapping DLL: %wZ\n", &OverlapDll); + + /* Are we dealing with a DLL? */ + if (LdrEntry->Flags & LDRP_IMAGE_DLL) + { + /* Check if relocs were stripped */ + if (!(NtHeaders->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)) + { + /* Get the relocation data */ + RelocData = RtlImageDirectoryEntryToData(ViewBase, + TRUE, + IMAGE_DIRECTORY_ENTRY_BASERELOC, + &RelocDataSize); + + /* Does the DLL not have any? */ + if (!RelocData && !RelocDataSize) + { + /* We'll allow this and simply continue */ + goto NoRelocNeeded; + } + } + + /* See if this is an Illegal DLL - IE: user32 and kernel32 */ + RtlInitUnicodeString(&IllegalDll,L"user32.dll"); + if (RtlEqualUnicodeString(&BaseDllName, &IllegalDll, TRUE)) + { + /* Can't relocate user32 */ + RelocatableDll = FALSE; + } + else + { + RtlInitUnicodeString(&IllegalDll, L"kernel32.dll"); + if (RtlEqualUnicodeString(&BaseDllName, &IllegalDll, TRUE)) + { + /* Can't relocate kernel32 */ + RelocatableDll = FALSE; + } + } + + /* Check if this was a non-relocatable DLL or a known dll */ + if (!RelocatableDll && KnownDll) + { + /* Setup for hard error */ + HardErrorParameters[0] = (ULONG_PTR)&IllegalDll; + HardErrorParameters[1] = (ULONG_PTR)&OverlapDll; + + /* Raise the error */ + ZwRaiseHardError(STATUS_ILLEGAL_DLL_RELOCATION, + 2, + 3, + HardErrorParameters, + OptionOk, + &Response); + + /* If initializing, increase the error count */ + if (LdrpInLdrInit) LdrpFatalHardErrorCount++; + + /* Don't do relocation */ + Status = STATUS_CONFLICTING_ADDRESSES; + goto NoRelocNeeded; + } + + /* Change the protection to prepare for relocation */ + Status = LdrpSetProtection(ViewBase, FALSE); + + /* Make sure we changed the protection */ + if (NT_SUCCESS(Status)) + { + /* Do the relocation */ + Status = LdrRelocateImageWithBias(ViewBase, 0LL, NULL, STATUS_SUCCESS, + STATUS_CONFLICTING_ADDRESSES, STATUS_INVALID_IMAGE_FORMAT); + + if (NT_SUCCESS(Status)) + { + /* Stuff the image name in the TIB, for the debugger */ + ArbitraryUserPointer = Teb->NtTib.ArbitraryUserPointer; + Teb->NtTib.ArbitraryUserPointer = FullDllName.Buffer; + + /* Map the DLL */ + Status = NtMapViewOfSection(SectionHandle, + NtCurrentProcess(), + &ViewBase, + 0, + 0, + NULL, + &ViewSize, + ViewShare, + 0, + PAGE_READWRITE); + + /* Restore */ + Teb->NtTib.ArbitraryUserPointer = ArbitraryUserPointer; + + /* Return the protection */ + Status = LdrpSetProtection(ViewBase, TRUE); + } + } +//FailRelocate: + /* Handle any kind of failure */ + if (!NT_SUCCESS(Status)) + { + /* Remove it from the lists */ + RemoveEntryList(&LdrEntry->InLoadOrderLinks); + RemoveEntryList(&LdrEntry->InMemoryOrderModuleList); + RemoveEntryList(&LdrEntry->HashLinks); + + /* Unmap it, clear the entry */ + NtUnmapViewOfSection(NtCurrentProcess(), ViewBase); + LdrEntry = NULL; + } + + /* Show debug message */ + if (ShowSnaps) + { + DPRINT1("LDR: Fixups %successfully re-applied @ %p\n", + NT_SUCCESS(Status) ? "s" : "uns", ViewBase); + } + } + else + { +NoRelocNeeded: + /* Not a DLL, or no relocation needed */ + Status = STATUS_SUCCESS; + + /* Stuff the image name in the TIB, for the debugger */ + ArbitraryUserPointer = Teb->NtTib.ArbitraryUserPointer; + Teb->NtTib.ArbitraryUserPointer = FullDllName.Buffer; + + /* Map the DLL */ + Status = NtMapViewOfSection(SectionHandle, + NtCurrentProcess(), + &ViewBase, + 0, + 0, + NULL, + &ViewSize, + ViewShare, + 0, + PAGE_READWRITE); + + /* Restore */ + Teb->NtTib.ArbitraryUserPointer = ArbitraryUserPointer; + + /* Show debug message */ + if (ShowSnaps) + { + DPRINT1("LDR: Fixups won't be re-applied to non-Dll @ %p\n", ViewBase); + } + } + } + + // FIXME: LdrpCheckCorImage() is missing + + /* Check if this is an SMP Machine and a DLL */ + if ((LdrpNumberOfProcessors > 1) && + (LdrEntry && (LdrEntry->Flags & LDRP_IMAGE_DLL))) + { + /* Validate the image for MP */ + LdrpValidateImageForMp(LdrEntry); + } + + // FIXME: LdrpCorUnloadImage() is missing + + /* Close section and return status */ + NtClose(SectionHandle); + return Status; } PLDR_DATA_TABLE_ENTRY @@ -126,6 +1277,8 @@ LdrpAllocateDataTableEntry(IN PVOID BaseAddress) PLDR_DATA_TABLE_ENTRY LdrEntry = NULL; PIMAGE_NT_HEADERS NtHeader = RtlImageNtHeader(BaseAddress); + DPRINT("LdrpAllocateDataTableEntry(%p), NtHeader %p\n", BaseAddress, NtHeader); + /* Make sure the header is valid */ if (NtHeader) { @@ -163,6 +1316,33 @@ LdrpInsertMemoryTableEntry(IN PLDR_DATA_TABLE_ENTRY LdrEntry) InsertTailList(&PebData->InMemoryOrderModuleList, &LdrEntry->InMemoryOrderModuleList); } +VOID +NTAPI +LdrpFinalizeAndDeallocateDataTableEntry(PLDR_DATA_TABLE_ENTRY Entry) +{ + ASSERT(Entry != NULL); + + /* Release the activation context if it exists */ + if (Entry->EntryPointActivationContext) + { + /* Check if it wasn't already released */ + if ((HANDLE)Entry->EntryPointActivationContext != INVALID_HANDLE_VALUE) + { + RtlReleaseActivationContext(Entry->EntryPointActivationContext); + + /* Mark it as invalid */ + Entry->EntryPointActivationContext = INVALID_HANDLE_VALUE; + } + } + + /* Release the full dll name string */ + if (Entry->FullDllName.Buffer) + LdrpFreeUnicodeString(&Entry->FullDllName); + + /* Finally free the entry's memory */ + RtlFreeHeap(RtlGetProcessHeap(), 0, Entry); +} + BOOLEAN NTAPI LdrpCheckForLoadedDllHandle(IN PVOID Base, @@ -231,7 +1411,9 @@ LdrpCheckForLoadedDll(IN PWSTR DllPath, PVOID ViewBase = NULL; SIZE_T ViewSize = 0; PIMAGE_NT_HEADERS NtHeader, NtHeader2; -DPRINT1("LdrpCheckForLoadedDll('%S' '%wZ' %d %d %p)\n", DllPath, DllName, Flag, RedirectedDll, LdrEntry); + + DPRINT("LdrpCheckForLoadedDll('%S' '%wZ' %d %d %p)\n", DllPath, DllName, Flag, RedirectedDll, LdrEntry); + /* Check if a dll name was provided */ if (!DllName->Buffer || !DllName->Buffer[0]) return FALSE; @@ -499,7 +1681,7 @@ LdrpGetProcedureAddress(IN PVOID BaseAddress, if (Name) { /* Show debug message */ - if (ShowSnaps) DPRINT1("NAME - %s\n", Name->Buffer); + if (ShowSnaps) DbgPrint("NAME - %s\n", Name->Buffer); /* Make sure it's not too long */ if ((Name->Length + sizeof(CHAR) + sizeof(USHORT)) > MAXLONG) @@ -527,8 +1709,8 @@ LdrpGetProcedureAddress(IN PVOID BaseAddress, ImportName->Hint = 0; /* Copy the name and null-terminate it */ - RtlMoveMemory(&ImportName->Name, Name->Buffer, Name->Length); - ImportName->Name[Name->Length + 1] = 0; + RtlMoveMemory(ImportName->Name, Name->Buffer, Name->Length); + ImportName->Name[Name->Length] = 0; /* Clear the high bit */ ImageBase = ImportName; @@ -540,7 +1722,7 @@ LdrpGetProcedureAddress(IN PVOID BaseAddress, ImageBase = NULL; /* Show debug message */ - if (ShowSnaps) DPRINT1("ORDINAL - %lx\n", Ordinal); + if (ShowSnaps) DbgPrint("ORDINAL - %lx\n", Ordinal); if (Ordinal) { @@ -563,7 +1745,7 @@ LdrpGetProcedureAddress(IN PVOID BaseAddress, if (!LdrpCheckForLoadedDllHandle(BaseAddress, &LdrEntry)) { /* Invalid base */ - DPRINT1("Invalid base address\n"); + DPRINT1("Invalid base address %p\n", BaseAddress); Status = STATUS_DLL_NOT_FOUND; _SEH2_YIELD(goto Quickie;) } @@ -576,7 +1758,7 @@ LdrpGetProcedureAddress(IN PVOID BaseAddress, if (!ExportDir) { - DPRINT1("Image has no exports\n"); + DPRINT1("Image %wZ has no exports, but were trying to get procedure %s. BaseAddress asked %p, got entry BA %p\n", &LdrEntry->BaseDllName, Name ? Name->Buffer : NULL, BaseAddress, LdrEntry->DllBase); Status = STATUS_PROCEDURE_NOT_FOUND; _SEH2_YIELD(goto Quickie;) } @@ -657,8 +1839,474 @@ LdrpLoadDll(IN BOOLEAN Redirected, OUT PVOID *BaseAddress, IN BOOLEAN CallInit) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + PPEB Peb = NtCurrentPeb(); + NTSTATUS Status = STATUS_SUCCESS; + PWCHAR p1, p2; + WCHAR NameBuffer[266]; + LPWSTR RawDllName; + UNICODE_STRING RawDllNameString; + PLDR_DATA_TABLE_ENTRY LdrEntry; + BOOLEAN InInit = LdrpInLdrInit; + + /* Find the name without the extension */ + p1 = DllName->Buffer; +StartLoop: + p2 = NULL; + while (*p1) + { + if (*p1++ == L'.') + { + p2 = p1; + } + else if (*p1 == L'\\') + { + goto StartLoop; + } + } + + /* Save the Raw DLL Name */ + RawDllName = NameBuffer; + if (DllName->Length >= sizeof(NameBuffer)) + { + /* The DLL's name is too long */ + return STATUS_NAME_TOO_LONG; + } + RtlMoveMemory(RawDllName, DllName->Buffer, DllName->Length); + + /* Check if no extension was found or if we got a slash */ + if (!p2 || *p2 == '\\') + { + /* Check that we have space to add one */ + if (DllName->Length + LdrApiDefaultExtension.Length >= sizeof(NameBuffer)) + { + /* No space to add the extension */ + return STATUS_NAME_TOO_LONG; + } + + /* Add it */ + RtlMoveMemory((PVOID)((ULONG_PTR)RawDllName + DllName->Length), + LdrApiDefaultExtension.Buffer, + LdrApiDefaultExtension.Length); + + /* Save the length to a unicode string */ + RawDllNameString.Length = DllName->Length + LdrApiDefaultExtension.Length; + + /* Null terminate it */ + RawDllName[RawDllNameString.Length / sizeof(WCHAR)] = 0; + } + else + { + /* Null terminate it */ + RawDllName[DllName->Length / sizeof(WCHAR)] = 0; + + /* Save the length to a unicode string */ + RawDllNameString.Length = DllName->Length; + } + + /* Now create a unicode string for the DLL's name */ + RawDllNameString.MaximumLength = sizeof(NameBuffer); + RawDllNameString.Buffer = NameBuffer; + + /* Check for init flag and acquire lock */ + if (!InInit) RtlEnterCriticalSection(&LdrpLoaderLock); + + /* Show debug message */ + if (ShowSnaps) + { + DPRINT1("LDR: LdrLoadDll, loading %ws from %ws\n", + RawDllName, + DllPath ? DllPath : L""); + } + + /* Check if the DLL is already loaded */ + if (!LdrpCheckForLoadedDll(DllPath, + &RawDllNameString, + FALSE, + Redirected, + &LdrEntry)) + { + /* Map it */ + Status = LdrpMapDll(DllPath, + DllPath, + NameBuffer, + DllCharacteristics, + FALSE, + Redirected, + &LdrEntry); + if (!NT_SUCCESS(Status)) goto Quickie; + + /* Check if IMAGE_FILE_EXECUTABLE_IMAGE was provided */ + if (DllCharacteristics && + (*DllCharacteristics & IMAGE_FILE_EXECUTABLE_IMAGE)) + { + LdrEntry->EntryPoint = NULL; + LdrEntry->Flags &= ~LDRP_IMAGE_DLL; + } + + /* FIXME Mark the DLL Ranges for Stack Traces later */ + + /* Make sure it's a DLL */ + if (LdrEntry->Flags & LDRP_IMAGE_DLL) + { + /* Check if this is a .NET Image */ + if (!(LdrEntry->Flags & LDRP_COR_IMAGE)) + { + /* Walk the Import Descriptor */ + Status = LdrpWalkImportDescriptor(DllPath, LdrEntry); + } + + /* Update load count, unless it's locked */ + if (LdrEntry->LoadCount != -1) LdrEntry->LoadCount++; + LdrpUpdateLoadCount2(LdrEntry, LDRP_UPDATE_REFCOUNT); + + /* Check if we failed */ + if (!NT_SUCCESS(Status)) + { + /* Clear entrypoint, and insert into list */ + LdrEntry->EntryPoint = NULL; + InsertTailList(&Peb->Ldr->InInitializationOrderModuleList, + &LdrEntry->InInitializationOrderModuleList); + + /* Cancel the load and unload the DLL */ + LdrpClearLoadInProgress(); + LdrUnloadDll(LdrEntry->DllBase); + + /* Return the error */ + goto Quickie; + } + } + else if (LdrEntry->LoadCount != -1) + { + /* Increase load count */ + LdrEntry->LoadCount++; + } + + /* Insert it into the list */ + InsertTailList(&Peb->Ldr->InInitializationOrderModuleList, + &LdrEntry->InInitializationOrderModuleList); + + /* If we have to run the entrypoint, make sure the DB is ready */ + if (CallInit && LdrpLdrDatabaseIsSetup) + { + /* FIXME: Notify Shim Engine */ + + /* Run the init routine */ + Status = LdrpRunInitializeRoutines(NULL); + if (!NT_SUCCESS(Status)) + { + /* Failed, unload the DLL */ + LdrUnloadDll(LdrEntry->DllBase); + } + } + else + { + /* The DB isn't ready, which means we were loaded because of a forwarder */ + Status = STATUS_SUCCESS; + } + } + else + { + /* We were already loaded. Are we a DLL? */ + if ((LdrEntry->Flags & LDRP_IMAGE_DLL) && (LdrEntry->LoadCount != -1)) + { + /* Increase load count */ + LdrEntry->LoadCount++; + LdrpUpdateLoadCount2(LdrEntry, LDRP_UPDATE_REFCOUNT); + + /* Clear the load in progress */ + LdrpClearLoadInProgress(); + } + else + { + /* Not a DLL, just increase the load count */ + if (LdrEntry->LoadCount != -1) LdrEntry->LoadCount++; + } + } + +Quickie: + /* Release the lock */ + if (!InInit) RtlLeaveCriticalSection(Peb->LoaderLock); + + /* Check for success */ + if (NT_SUCCESS(Status)) + { + /* Return the base address */ + *BaseAddress = LdrEntry->DllBase; + } + else + { + /* Nothing found */ + *BaseAddress = NULL; + } + + /* Return status */ + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrUnloadDll(IN PVOID BaseAddress) +{ + NTSTATUS Status = STATUS_SUCCESS; + PPEB Peb = NtCurrentPeb(); + PLDR_DATA_TABLE_ENTRY LdrEntry, CurrentEntry; + PVOID EntryPoint; + PLIST_ENTRY NextEntry; + LIST_ENTRY UnloadList; + RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED ActCtx; + PVOID CorImageData; + ULONG ComSectionSize; + + /* Get the LDR Lock */ + if (!LdrpInLdrInit) RtlEnterCriticalSection(Peb->LoaderLock); + + /* Increase the unload count */ + LdrpActiveUnloadCount++; + + /* Skip unload */ + if (LdrpShutdownInProgress) goto Quickie; + + /* Make sure the DLL is valid and get its entry */ + if (!LdrpCheckForLoadedDllHandle(BaseAddress, &LdrEntry)) + { + Status = STATUS_DLL_NOT_FOUND; + goto Quickie; + } + + /* Check the current Load Count */ + if (LdrEntry->LoadCount != -1) + { + /* Decrease it */ + LdrEntry->LoadCount--; + + /* If it's a dll */ + if (LdrEntry->Flags & LDRP_IMAGE_DLL) + { + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrEntry->EntryPointActivationContext); + + /* Update the load count */ + LdrpUpdateLoadCount2(LdrEntry, LDRP_UPDATE_DEREFCOUNT); + + /* Release the context */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + } + else + { + /* The DLL is locked */ + goto Quickie; + } + + /* Show debug message */ + if (ShowSnaps) DPRINT1("LDR: UNINIT LIST\n"); + + /* Check if this is our only unload */ + if (LdrpActiveUnloadCount == 1) + { + /* Initialize the unload list */ + InitializeListHead(&LdrpUnloadHead); + } + + /* Loop the modules to build the list */ + NextEntry = Peb->Ldr->InInitializationOrderModuleList.Blink; + while (NextEntry != &Peb->Ldr->InInitializationOrderModuleList) + { + /* Get the entry */ + LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); + NextEntry = NextEntry->Blink; + + /* Remove flag */ + LdrEntry->Flags &= ~LDRP_UNLOAD_IN_PROGRESS; + + /* If the load count is now 0 */ + if (!LdrEntry->LoadCount) + { + /* Show message */ + if (ShowSnaps) + { + DPRINT1("(%d) [%ws] %ws (%lx) deinit %lx\n", + LdrpActiveUnloadCount, + LdrEntry->BaseDllName.Buffer, + LdrEntry->FullDllName.Buffer, + (ULONG)LdrEntry->LoadCount, + LdrEntry->EntryPoint); + } + + /* FIXME: Call Shim Engine and notify */ + + /* Unlink it */ + CurrentEntry = LdrEntry; + RemoveEntryList(&CurrentEntry->InInitializationOrderModuleList); + RemoveEntryList(&CurrentEntry->InMemoryOrderModuleList); + RemoveEntryList(&CurrentEntry->HashLinks); + + /* If there's more then one active unload */ + if (LdrpActiveUnloadCount > 1) + { + /* Flush the cached DLL handle and clear the list */ + LdrpLoadedDllHandleCache = NULL; + CurrentEntry->InMemoryOrderModuleList.Flink = NULL; + } + + /* Add the entry on the unload list */ + InsertTailList(&LdrpUnloadHead, &CurrentEntry->HashLinks); + } + } + + /* Only call the entrypoints once */ + if (LdrpActiveUnloadCount > 1) goto Quickie; + + /* Now loop the unload list and create our own */ + InitializeListHead(&UnloadList); + CurrentEntry = NULL; + NextEntry = LdrpUnloadHead.Flink; + while (NextEntry != &LdrpUnloadHead) + { + /* If we have an active entry */ + if (CurrentEntry) + { + /* Remove it */ + RemoveEntryList(&CurrentEntry->InLoadOrderLinks); + CurrentEntry = NULL; + + /* Reset list pointers */ + NextEntry = LdrpUnloadHead.Flink; + if (NextEntry == &LdrpUnloadHead) break; + } + + /* Get the current entry */ + LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, HashLinks); + + /* Log the Unload Event */ + //LdrpRecordUnloadEvent(LdrEntry); + + /* Set the entry and clear it from the list */ + CurrentEntry = LdrEntry; + LdrpLoadedDllHandleCache = NULL; + CurrentEntry->InMemoryOrderModuleList.Flink = NULL; + + /* Move it from the global to the local list */ + RemoveEntryList(&CurrentEntry->HashLinks); + InsertTailList(&UnloadList, &CurrentEntry->HashLinks); + + /* Get the entrypoint */ + EntryPoint = LdrEntry->EntryPoint; + + /* Check if we should call it */ + if (EntryPoint && (LdrEntry->Flags & LDRP_PROCESS_ATTACH_CALLED)) + { + /* Show message */ + if (ShowSnaps) + { + DPRINT1("LDR: Calling deinit %lx\n", EntryPoint); + } + + /* Set up the Act Ctx */ + ActCtx.Size = sizeof(ActCtx); + ActCtx.Format = 1; + RtlZeroMemory(&ActCtx.Frame, sizeof(RTL_ACTIVATION_CONTEXT_STACK_FRAME)); + + /* Activate the ActCtx */ + RtlActivateActivationContextUnsafeFast(&ActCtx, + LdrEntry->EntryPointActivationContext); + + /* Call the entrypoint */ + LdrpCallDllEntry(LdrEntry->EntryPoint, + LdrEntry->DllBase, + DLL_PROCESS_DETACH, + NULL); + + /* Release the context */ + RtlDeactivateActivationContextUnsafeFast(&ActCtx); + } + + /* Remove it from the list */ + RemoveEntryList(&CurrentEntry->InLoadOrderLinks); + CurrentEntry = NULL; + NextEntry = LdrpUnloadHead.Flink; + } + + /* Now loop our local list */ + NextEntry = UnloadList.Flink; + while (NextEntry != &UnloadList) + { + /* Get the entry */ + LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, HashLinks); + NextEntry = NextEntry->Flink; + CurrentEntry = LdrEntry; + + /* Notify Application Verifier */ + if (Peb->NtGlobalFlag & FLG_HEAP_ENABLE_TAIL_CHECK) + { + DPRINT1("We don't support Application Verifier yet\n"); + } + + /* Show message */ + if (ShowSnaps) + { + DPRINT1("LDR: Unmapping [%ws]\n", LdrEntry->BaseDllName.Buffer); + } + + /* Check if this is a .NET executable */ + if ((CorImageData = RtlImageDirectoryEntryToData(LdrEntry->DllBase, + TRUE, + IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR, + &ComSectionSize))) + { + /* FIXME */ + DPRINT1(".NET Images are not supported yet\n"); + } + + /* Check if we should unmap*/ + if (!(CurrentEntry->Flags & LDR_COR_OWNS_UNMAP)) + { + /* Unmap the DLL */ + Status = NtUnmapViewOfSection(NtCurrentProcess(), + CurrentEntry->DllBase); + } + + /* Unload the alternate resource module, if any */ + LdrUnloadAlternateResourceModule(CurrentEntry->DllBase); + + /* Send shutdown notification */ + //LdrpSendDllNotifications(CurrentEntry, 2, LdrpShutdownInProgress); + + /* Check if a Hotpatch is active */ + if (LdrEntry->PatchInformation) + { + /* FIXME */ + DPRINT1("We don't support Hotpatching yet\n"); + } + + /* Deallocate the Entry */ + LdrpFinalizeAndDeallocateDataTableEntry(CurrentEntry); + + /* If this is the cached entry, invalide it */ + if (LdrpGetModuleHandleCache == CurrentEntry) + { + LdrpGetModuleHandleCache = NULL; + } + } + +Quickie: + /* Decrease unload count */ + LdrpActiveUnloadCount--; + if (!LdrpInLdrInit) RtlLeaveCriticalSection(Peb->LoaderLock); + + /* FIXME: Rundown the Hotpatch data, if present */ + + /* Return to caller */ + return Status; } ULONG @@ -692,4 +2340,110 @@ LdrpClearLoadInProgress() return ModulesCount; } +/* + * @implemented + */ +NTSTATUS NTAPI +LdrAddRefDll(IN ULONG Flags, + IN PVOID BaseAddress) +{ + PLDR_DATA_TABLE_ENTRY LdrEntry; + NTSTATUS Status = STATUS_SUCCESS; + ULONG Cookie; + BOOLEAN Locked = FALSE; + + /* Check for invalid flags */ + if (Flags & ~(LDR_PIN_MODULE)) + { + /* Fail with invalid parameter status if so */ + Status = STATUS_INVALID_PARAMETER; + goto quickie; + } + + /* Acquire the loader lock if not in init phase */ + if (!LdrpInLdrInit) + { + /* Acquire the lock */ + Status = LdrLockLoaderLock(0, NULL, &Cookie); + if (!NT_SUCCESS(Status)) goto quickie; + Locked = TRUE; + } + + /* Get this module's data table entry */ + if (LdrpCheckForLoadedDllHandle(BaseAddress, &LdrEntry)) + { + if (!LdrEntry) + { + /* Shouldn't happen */ + Status = STATUS_INTERNAL_ERROR; + goto quickie; + } + + /* If this is not a pinned module */ + if (LdrEntry->LoadCount != -1) + { + /* Update its load count */ + if (Flags & LDR_PIN_MODULE) + { + /* Pin it by setting load count to -1 */ + LdrEntry->LoadCount = -1; + LdrpUpdateLoadCount2(LdrEntry, LDRP_UPDATE_PIN); + } + else + { + /* Increase its load count by one */ + LdrEntry->LoadCount++; + LdrpUpdateLoadCount2(LdrEntry, LDRP_UPDATE_REFCOUNT); + } + + /* Clear load in progress */ + LdrpClearLoadInProgress(); + } + } + else + { + /* There was an error getting this module's handle, return invalid param status */ + Status = STATUS_INVALID_PARAMETER; + goto quickie; + } + +quickie: + if (!NT_SUCCESS(Status)) + { + if (ShowSnaps || + (Status != STATUS_NO_SUCH_FILE && + Status != STATUS_DLL_NOT_FOUND && + Status != STATUS_OBJECT_NAME_NOT_FOUND)) + { + DPRINT1("LDR: LdrAddRefDll(%p) 0x%08lx\n", BaseAddress); + } + } + + /* Release the lock if needed */ + if (Locked) LdrUnlockLoaderLock(LDR_LOCK_LOADER_LOCK_FLAG_RAISE_ON_ERRORS, Cookie); + + return Status; +} + + +BOOLEAN +NTAPI +LdrpFreeUnicodeString(PUNICODE_STRING String) +{ + BOOLEAN Result = FALSE; + + ASSERT(String != NULL); + + /* If Buffer is not NULL - free it */ + if (String->Buffer) + Result = RtlFreeHeap(RtlGetProcessHeap(), 0, String->Buffer); + + /* Zero it out */ + String->Length = 0; + String->MaximumLength = 0; + String->Buffer = NULL; + + return Result; +} + /* EOF */ diff --git a/dll/ntdll/ldr/startup.c b/dll/ntdll/ldr/startup.c index f063aefdc0d..90c2ca8b417 100644 --- a/dll/ntdll/ldr/startup.c +++ b/dll/ntdll/ldr/startup.c @@ -10,12 +10,11 @@ /* INCLUDES *****************************************************************/ #include -#define NDEBUG +//#define NDEBUG #include #include VOID RtlInitializeHeapManager(VOID); -VOID LdrpInitLoader(VOID); extern PTEB LdrpTopLevelDllBeingLoadedTeb; VOID NTAPI RtlpInitDeferedCriticalSection(VOID); VOID RtlpInitializeVectoredExceptionHandling(VOID); @@ -309,280 +308,4 @@ finish: return FALSE; } -NTSTATUS -NTAPI -LdrpInitializeProcess_(PCONTEXT Context, - PVOID SystemArgument1) -{ - PIMAGE_NT_HEADERS NTHeaders; - PEPFUNC EntryPoint; - PIMAGE_DOS_HEADER PEDosHeader; - PVOID ImageBase; - PPEB Peb = NtCurrentPeb(); - PLDR_DATA_TABLE_ENTRY NtModule; // ntdll - NLSTABLEINFO NlsTable; - WCHAR FullNtDllPath[MAX_PATH]; - SYSTEM_BASIC_INFORMATION SystemInformation; - NTSTATUS Status; - PVOID BaseAddress = SystemArgument1; - - DPRINT("LdrpInit()\n"); - DPRINT("Peb %p\n", Peb); - ImageBase = Peb->ImageBaseAddress; - DPRINT("ImageBase %p\n", ImageBase); - - if (ImageBase <= (PVOID) 0x1000) - { - DPRINT("ImageBase is null\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT); - } - - /* If MZ header exists */ - PEDosHeader = (PIMAGE_DOS_HEADER) ImageBase; - NTHeaders = (PIMAGE_NT_HEADERS)((ULONG_PTR)ImageBase + PEDosHeader->e_lfanew); - DPRINT("PEDosHeader %p\n", PEDosHeader); - - if (PEDosHeader->e_magic != IMAGE_DOS_SIGNATURE || - PEDosHeader->e_lfanew == 0L || - NTHeaders->Signature != IMAGE_NT_SIGNATURE) - { - DPRINT1("Image has bad header\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT); - } - - /* normalize process parameters */ - RtlNormalizeProcessParams(Peb->ProcessParameters); - - /* Initialize NLS data */ - RtlInitNlsTables(Peb->AnsiCodePageData, - Peb->OemCodePageData, - Peb->UnicodeCaseTableData, - &NlsTable); - RtlResetRtlTranslations(&NlsTable); - - /* Get number of processors */ - DPRINT("Here\n"); - Status = ZwQuerySystemInformation(SystemBasicInformation, - &SystemInformation, - sizeof(SYSTEM_BASIC_INFORMATION), - NULL); - DPRINT("Here2\n"); - if (!NT_SUCCESS(Status)) - { - ZwTerminateProcess(NtCurrentProcess(), Status); - } - - Peb->NumberOfProcessors = SystemInformation.NumberOfProcessors; - - /* Initialize Critical Section Data */ - RtlpInitDeferedCriticalSection(); - - /* Load execution options */ - LoadImageFileExecutionOptions(Peb); - - /* create process heap */ - RtlInitializeHeapManager(); - Peb->ProcessHeap = RtlCreateHeap(HEAP_GROWABLE, - NULL, - NTHeaders->OptionalHeader.SizeOfHeapReserve, - NTHeaders->OptionalHeader.SizeOfHeapCommit, - NULL, - NULL); - if (Peb->ProcessHeap == 0) - { - DPRINT1("Failed to create process heap\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); - } - - /* Check for correct machine type */ - if (NTHeaders->FileHeader.Machine != IMAGE_FILE_MACHINE_NATIVE) - { - ULONG_PTR HardErrorParameters[1]; - UNICODE_STRING ImageNameU; - ANSI_STRING ImageNameA; - WCHAR *Ptr; - ULONG ErrorResponse; - - DPRINT1("Image %wZ is for a foreign architecture (0x%x).\n", - &Peb->ProcessParameters->ImagePathName, NTHeaders->FileHeader.Machine); - - /* Get the full image path name */ - ImageNameU = Peb->ProcessParameters->ImagePathName; - - /* Get the file name */ - Ptr = Peb->ProcessParameters->ImagePathName.Buffer + - (Peb->ProcessParameters->ImagePathName.Length / sizeof(WCHAR)) -1; - while ((Ptr >= Peb->ProcessParameters->ImagePathName.Buffer) && - (*Ptr != L'\\')) Ptr--; - ImageNameU.Buffer = Ptr + 1; - ImageNameU.Length = Peb->ProcessParameters->ImagePathName.Length - - (ImageNameU.Buffer - Peb->ProcessParameters->ImagePathName.Buffer) * sizeof(WCHAR); - ImageNameU.MaximumLength = ImageNameU.Length; - - /*`Convert to ANSI, harderror message needs that */ - RtlUnicodeStringToAnsiString(&ImageNameA, &ImageNameU, TRUE); - - /* Raise harderror */ - HardErrorParameters[0] = (ULONG_PTR)&ImageNameA; - NtRaiseHardError(STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE, - 1, - 1, - HardErrorParameters, - OptionOk, - &ErrorResponse); - - RtlFreeAnsiString(&ImageNameA); - ZwTerminateProcess(NtCurrentProcess(), STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE); - } - - /* initialized vectored exception handling */ - RtlpInitializeVectoredExceptionHandling(); - - /* initalize peb lock support */ - RtlInitializeCriticalSection(&FastPebLock); - Peb->FastPebLock = &FastPebLock; - - /* initialize tls bitmaps */ - RtlInitializeBitMap(&TlsBitMap, Peb->TlsBitmapBits, TLS_MINIMUM_AVAILABLE); - RtlInitializeBitMap(&TlsExpansionBitMap, Peb->TlsExpansionBitmapBits, TLS_EXPANSION_SLOTS); - - Peb->TlsBitmap = &TlsBitMap; - Peb->TlsExpansionBitmap = &TlsExpansionBitMap; - Peb->TlsExpansionCounter = TLS_MINIMUM_AVAILABLE; - - /* Initialize table of callbacks for the kernel. */ - Peb->KernelCallbackTable = RtlAllocateHeap(RtlGetProcessHeap(), - 0, - sizeof(PVOID) * - (USER32_CALLBACK_MAXIMUM + 1)); - if (Peb->KernelCallbackTable == NULL) - { - DPRINT1("Failed to create callback table\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); - } - - /* initalize loader lock */ - RtlInitializeCriticalSection(&LdrpLoaderLock); - Peb->LoaderLock = &LdrpLoaderLock; - - /* create loader information */ - Peb->Ldr = (PPEB_LDR_DATA) RtlAllocateHeap(Peb->ProcessHeap, - 0, - sizeof(PEB_LDR_DATA)); - if (Peb->Ldr == NULL) - { - DPRINT1("Failed to create loader data\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); - } - - Peb->Ldr->Length = sizeof(PEB_LDR_DATA); - Peb->Ldr->Initialized = FALSE; - Peb->Ldr->SsHandle = NULL; - InitializeListHead(&Peb->Ldr->InLoadOrderModuleList); - InitializeListHead(&Peb->Ldr->InMemoryOrderModuleList); - InitializeListHead(&Peb->Ldr->InInitializationOrderModuleList); - - /* Load compatibility settings */ - LoadCompatibilitySettings(Peb); - - /* build full ntdll path */ - wcscpy(FullNtDllPath, SharedUserData->NtSystemRoot); - wcscat(FullNtDllPath, L"\\system32\\ntdll.dll"); - - /* add entry for ntdll */ - NtModule = (PLDR_DATA_TABLE_ENTRY) - RtlAllocateHeap(Peb->ProcessHeap, - 0, - sizeof(LDR_DATA_TABLE_ENTRY)); - if (NtModule == NULL) - { - DPRINT1("Failed to create loader module entry (NTDLL)\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); - } - memset(NtModule, 0, sizeof(LDR_DATA_TABLE_ENTRY)); - - NtModule->DllBase = BaseAddress; - NtModule->EntryPoint = 0; /* no entry point */ - RtlCreateUnicodeString(&NtModule->FullDllName, FullNtDllPath); - RtlCreateUnicodeString(&NtModule->BaseDllName, L"ntdll.dll"); - NtModule->Flags = LDRP_IMAGE_DLL | LDRP_ENTRY_PROCESSED; - - NtModule->LoadCount = -1; /* don't unload */ - NtModule->TlsIndex = -1; - NtModule->SectionPointer = NULL; - NtModule->CheckSum = 0; - - NTHeaders = RtlImageNtHeader(NtModule->DllBase); - NtModule->SizeOfImage = LdrpGetResidentSize(NTHeaders); - NtModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; - - InsertTailList(&Peb->Ldr->InLoadOrderModuleList, - &NtModule->InLoadOrderLinks); - InsertTailList(&Peb->Ldr->InInitializationOrderModuleList, - &NtModule->InInitializationOrderModuleList); - - /* add entry for executable (becomes first list entry) */ - LdrpImageEntry = (PLDR_DATA_TABLE_ENTRY) - RtlAllocateHeap(Peb->ProcessHeap, - HEAP_ZERO_MEMORY, - sizeof(LDR_DATA_TABLE_ENTRY)); - if (LdrpImageEntry == NULL) - { - DPRINT1("Failed to create loader module infomation\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); - } - - LdrpImageEntry->DllBase = Peb->ImageBaseAddress; - - if ((Peb->ProcessParameters == NULL) || - (Peb->ProcessParameters->ImagePathName.Length == 0)) - { - DPRINT1("Failed to access the process parameter block\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_UNSUCCESSFUL); - } - - RtlCreateUnicodeString(&LdrpImageEntry->FullDllName, - Peb->ProcessParameters->ImagePathName.Buffer); - RtlCreateUnicodeString(&LdrpImageEntry->BaseDllName, - wcsrchr(LdrpImageEntry->FullDllName.Buffer, L'\\') + 1); - - DPRINT("BaseDllName '%wZ' FullDllName '%wZ'\n", &LdrpImageEntry->BaseDllName, &LdrpImageEntry->FullDllName); - - LdrpImageEntry->Flags = LDRP_ENTRY_PROCESSED; - LdrpImageEntry->LoadCount = -1; /* don't unload */ - LdrpImageEntry->TlsIndex = -1; - LdrpImageEntry->SectionPointer = NULL; - LdrpImageEntry->CheckSum = 0; - - NTHeaders = RtlImageNtHeader(LdrpImageEntry->DllBase); - LdrpImageEntry->SizeOfImage = LdrpGetResidentSize(NTHeaders); - LdrpImageEntry->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; - - LdrpTopLevelDllBeingLoadedTeb = NtCurrentTeb(); - - InsertHeadList(&Peb->Ldr->InLoadOrderModuleList, - &LdrpImageEntry->InLoadOrderLinks); - - LdrpInitLoader(); - - EntryPoint = LdrPEStartup((PVOID)ImageBase, NULL, NULL, NULL); - LdrpImageEntry->EntryPoint = EntryPoint; - - /* all required dlls are loaded now */ - Peb->Ldr->Initialized = TRUE; - - /* Check before returning that we can run the image safely. */ - if (EntryPoint == NULL) - { - DPRINT1("Failed to initialize image\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT); - } - - /* Break into debugger */ - if (Peb->BeingDebugged) - DbgBreakPoint(); - - return STATUS_SUCCESS; -} - /* EOF */ diff --git a/dll/ntdll/ldr/utils.c b/dll/ntdll/ldr/utils.c index 9ce0cbb9feb..fe39e90053d 100644 --- a/dll/ntdll/ldr/utils.c +++ b/dll/ntdll/ldr/utils.c @@ -42,31 +42,12 @@ extern PLDR_DATA_TABLE_ENTRY LdrpImageEntry; static NTSTATUS LdrFindEntryForName(PUNICODE_STRING Name, PLDR_DATA_TABLE_ENTRY *Module, BOOLEAN Ref); static PVOID LdrFixupForward(PCHAR ForwardName); static PVOID LdrGetExportByName(PVOID BaseAddress, PUCHAR SymbolName, USHORT Hint); -static NTSTATUS LdrpLoadModule(IN PWSTR SearchPath OPTIONAL, - IN ULONG LoadFlags, - IN PUNICODE_STRING Name, - OUT PLDR_DATA_TABLE_ENTRY *Module, - OUT PVOID *BaseAddress OPTIONAL); -static VOID LdrpDetachProcess(BOOLEAN UnloadAll); -static NTSTATUS LdrpUnloadModule(PLDR_DATA_TABLE_ENTRY Module, BOOLEAN Unload); NTSTATUS find_actctx_dll( LPCWSTR libname, WCHAR *fulldosname ); NTSTATUS create_module_activation_context( LDR_DATA_TABLE_ENTRY *module ); /* FUNCTIONS *****************************************************************/ -BOOLEAN -LdrMappedAsDataFile(PVOID *BaseAddress) -{ - if (0 != ((DWORD_PTR) *BaseAddress & (PAGE_SIZE - 1))) - { - *BaseAddress = (PVOID)((DWORD_PTR)*BaseAddress & ~((DWORD_PTR) PAGE_SIZE - 1)); - return TRUE; - } - - return FALSE; -} - static __inline LONG LdrpDecrementLoadCount(PLDR_DATA_TABLE_ENTRY Module, BOOLEAN Locked) { LONG LoadCount; @@ -105,193 +86,6 @@ static __inline LONG LdrpIncrementLoadCount(PLDR_DATA_TABLE_ENTRY Module, BOOLEA return LoadCount; } -static PWSTR -LdrpQueryAppPaths(IN PCWSTR ImageName) -{ - PKEY_VALUE_PARTIAL_INFORMATION KeyInfo; - OBJECT_ATTRIBUTES ObjectAttributes; - WCHAR SearchPathBuffer[5*MAX_PATH]; - UNICODE_STRING ValueNameString; - UNICODE_STRING KeyName; - WCHAR NameBuffer[MAX_PATH]; - ULONG KeyInfoSize; - ULONG ResultSize; - PWCHAR Backslash; - HANDLE KeyHandle; - NTSTATUS Status; - PWSTR Path = NULL; - - _snwprintf(NameBuffer, - sizeof(NameBuffer) / sizeof(WCHAR), - L"\\Registry\\Machine\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s", - ImageName); - - RtlInitUnicodeString(&KeyName, NameBuffer); - - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - Status = NtOpenKey(&KeyHandle, - KEY_READ, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT ("NtOpenKey() failed (Status %lx)\n", Status); - return NULL; - } - - KeyInfoSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 256 * sizeof(WCHAR); - - KeyInfo = RtlAllocateHeap(RtlGetProcessHeap(), 0, KeyInfoSize); - if (KeyInfo == NULL) - { - DPRINT("RtlAllocateHeap() failed\n"); - NtClose(KeyHandle); - return NULL; - } - - RtlInitUnicodeString(&ValueNameString, - L"Path"); - - Status = NtQueryValueKey(KeyHandle, - &ValueNameString, - KeyValuePartialInformation, - KeyInfo, - KeyInfoSize, - &ResultSize); - - if (!NT_SUCCESS(Status)) - { - NtClose(KeyHandle); - RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo); - return NULL; - } - - RtlCopyMemory(SearchPathBuffer, - &KeyInfo->Data, - KeyInfo->DataLength); - - /* Free KeyInfo memory, we won't need it anymore */ - RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo); - - /* Close the key handle */ - NtClose(KeyHandle); - - /* get application running path */ - wcscat(SearchPathBuffer, L";"); - wcscat(SearchPathBuffer, NtCurrentPeb()->ProcessParameters->ImagePathName.Buffer); // FIXME: Don't rely on it being NULL-terminated!!! - - /* Remove trailing backslash */ - Backslash = wcsrchr(SearchPathBuffer, L'\\'); - if (Backslash) Backslash = L'\0'; - - wcscat(SearchPathBuffer, L";"); - - wcscat(SearchPathBuffer, SharedUserData->NtSystemRoot); - wcscat(SearchPathBuffer, L"\\system32;"); - wcscat(SearchPathBuffer, SharedUserData->NtSystemRoot); - wcscat(SearchPathBuffer, L";."); - - /* Copy it to the heap allocd memory */ - Path = RtlAllocateHeap(RtlGetProcessHeap(), - 0, - (wcslen(SearchPathBuffer) + 1) * sizeof(WCHAR)); - - if (!Path) - { - DPRINT1("RtlAllocateHeap() failed\n"); - return NULL; - } - - wcscpy(Path, SearchPathBuffer); - - return Path; -} - -VOID -LdrpInitLoader(VOID) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING LinkTarget; - UNICODE_STRING Name; - HANDLE LinkHandle; - ULONG Length; - NTSTATUS Status; - - DPRINT("LdrpInitLoader() called for %wZ\n", &LdrpImageEntry->BaseDllName); - - /* Get handle to the 'KnownDlls' directory */ - RtlInitUnicodeString(&Name, - L"\\KnownDlls"); - InitializeObjectAttributes(&ObjectAttributes, - &Name, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenDirectoryObject(&LdrpKnownDllObjectDirectory, - DIRECTORY_QUERY | DIRECTORY_TRAVERSE, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT("NtOpenDirectoryObject() failed (Status %lx)\n", Status); - LdrpKnownDllObjectDirectory = NULL; - return; - } - - /* Allocate target name string */ - LinkTarget.Length = 0; - LinkTarget.MaximumLength = MAX_PATH * sizeof(WCHAR); - LinkTarget.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - 0, - MAX_PATH * sizeof(WCHAR)); - if (LinkTarget.Buffer == NULL) - { - NtClose(LdrpKnownDllObjectDirectory); - LdrpKnownDllObjectDirectory = NULL; - return; - } - - RtlInitUnicodeString(&Name, - L"KnownDllPath"); - InitializeObjectAttributes(&ObjectAttributes, - &Name, - OBJ_CASE_INSENSITIVE, - LdrpKnownDllObjectDirectory, - NULL); - Status = NtOpenSymbolicLinkObject(&LinkHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - RtlFreeUnicodeString(&LinkTarget); - NtClose(LdrpKnownDllObjectDirectory); - LdrpKnownDllObjectDirectory = NULL; - return; - } - - Status = NtQuerySymbolicLinkObject(LinkHandle, - &LinkTarget, - &Length); - NtClose(LinkHandle); - if (!NT_SUCCESS(Status)) - { - RtlFreeUnicodeString(&LinkTarget); - NtClose(LdrpKnownDllObjectDirectory); - LdrpKnownDllObjectDirectory = NULL; - } - - RtlCreateUnicodeString(&LdrpKnownDllPath, - LinkTarget.Buffer); - - RtlFreeUnicodeString(&LinkTarget); - - DPRINT("LdrpInitLoader() done\n"); -} - - /*************************************************************************** * NAME LOCAL * LdrAdjustDllName @@ -328,6 +122,8 @@ LdrAdjustDllName (PUNICODE_STRING FullDllName, PWCHAR Extension; PWCHAR Pointer; + DPRINT1("\n"); + Length = DllName->Length / sizeof(WCHAR); if (BaseName) @@ -379,6 +175,8 @@ LdrAddModuleEntry(PVOID ImageBase, { PLDR_DATA_TABLE_ENTRY Module; + DPRINT1("\n"); + Module = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof (LDR_DATA_TABLE_ENTRY)); ASSERT(Module); memset(Module, 0, sizeof(LDR_DATA_TABLE_ENTRY)); @@ -420,407 +218,6 @@ LdrAddModuleEntry(PVOID ImageBase, return(Module); } - -static NTSTATUS -LdrpMapKnownDll(IN PUNICODE_STRING DllName, - OUT PUNICODE_STRING FullDosName, - OUT PHANDLE SectionHandle) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS Status; - - DPRINT("LdrpMapKnownDll() called\n"); - - if (LdrpKnownDllObjectDirectory == NULL) - { - DPRINT("Invalid 'KnownDlls' directory\n"); - return STATUS_UNSUCCESSFUL; - } - - DPRINT("LdrpKnownDllPath '%wZ'\n", &LdrpKnownDllPath); - - InitializeObjectAttributes(&ObjectAttributes, - DllName, - OBJ_CASE_INSENSITIVE, - LdrpKnownDllObjectDirectory, - NULL); - Status = NtOpenSection(SectionHandle, - SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT("NtOpenSection() failed for '%wZ' (Status 0x%08lx)\n", DllName, Status); - return Status; - } - - FullDosName->Length = LdrpKnownDllPath.Length + DllName->Length + sizeof(WCHAR); - FullDosName->MaximumLength = FullDosName->Length + sizeof(WCHAR); - FullDosName->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - 0, - FullDosName->MaximumLength); - if (FullDosName->Buffer == NULL) - { - FullDosName->Length = 0; - FullDosName->MaximumLength = 0; - return STATUS_SUCCESS; - } - - wcscpy(FullDosName->Buffer, LdrpKnownDllPath.Buffer); - wcscat(FullDosName->Buffer, L"\\"); - wcscat(FullDosName->Buffer, DllName->Buffer); - - DPRINT("FullDosName '%wZ'\n", FullDosName); - - DPRINT("LdrpMapKnownDll() done\n"); - - return STATUS_SUCCESS; -} - - -static NTSTATUS -LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL, - IN PUNICODE_STRING DllName, - OUT PUNICODE_STRING FullDosName, - IN BOOLEAN MapAsDataFile, - OUT PHANDLE SectionHandle) -{ - WCHAR *SearchPathBuffer = NULL; - WCHAR *ImagePathNameBufferPtr = NULL; - WCHAR DosName[MAX_PATH]; - UNICODE_STRING FullNtFileName; - UNICODE_STRING PathEnvironmentVar_U; - UNICODE_STRING PathName_U; - OBJECT_ATTRIBUTES FileObjectAttributes; - HANDLE FileHandle; - char BlockBuffer [1024]; - PIMAGE_DOS_HEADER DosHeader; - PIMAGE_NT_HEADERS NTHeaders; - IO_STATUS_BLOCK IoStatusBlock; - NTSTATUS Status; - ULONG len; - ULONG ImagePathLen; - - DPRINT("LdrpMapDllImageFile() called\n"); - - if (SearchPath == NULL) - { - /* get application running path */ - ImagePathNameBufferPtr = NtCurrentPeb()->ProcessParameters->ImagePathName.Buffer; - - /* Length of ImagePathName */ - ImagePathLen = wcslen(ImagePathNameBufferPtr); - - /* Subtract application name leaveing only the directory length */ - while (ImagePathLen && ImagePathNameBufferPtr[ImagePathLen - 1] != L'\\') - ImagePathLen--; - - /* Length of directory + semicolon */ - len = ImagePathLen + 1; - - /* Length of SystemRoot + "//system32" + semicolon*/ - len += wcslen(SharedUserData->NtSystemRoot) + 10; - /* Length of SystemRoot + semicolon */ - len += wcslen(SharedUserData->NtSystemRoot) + 1; - - RtlInitUnicodeString (&PathName_U, L"PATH"); - PathEnvironmentVar_U.Length = 0; - PathEnvironmentVar_U.MaximumLength = 0; - PathEnvironmentVar_U.Buffer = NULL; - - /* Get the path environment variable */ - Status = RtlQueryEnvironmentVariable_U(NULL, &PathName_U, &PathEnvironmentVar_U); - - /* Check that valid information was returned */ - if ((Status == STATUS_BUFFER_TOO_SMALL) && (PathEnvironmentVar_U.Length > 0)) - { - /* Allocate memory for the path env var */ - PathEnvironmentVar_U.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, PathEnvironmentVar_U.Length + sizeof(WCHAR)); - if (!PathEnvironmentVar_U.Buffer) - { - DPRINT1("Fatal! Out of Memory!!\n"); - return STATUS_NO_MEMORY; - } - PathEnvironmentVar_U.MaximumLength = PathEnvironmentVar_U.Length + sizeof(WCHAR); - - /* Retry */ - Status = RtlQueryEnvironmentVariable_U(NULL, &PathName_U, &PathEnvironmentVar_U); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("Unable to get path environment string!\n"); - ASSERT(FALSE); - } - /* Length of path evn var + semicolon */ - len += (PathEnvironmentVar_U.Length / sizeof(WCHAR)) + 1; - } - - /* Allocate the size needed to hold all the above paths + period */ - SearchPathBuffer = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, (len + 2) * sizeof(WCHAR)); - if (!SearchPathBuffer) - { - DPRINT1("Fatal! Out of Memory!!\n"); - return STATUS_NO_MEMORY; - } - - wcsncpy(SearchPathBuffer, ImagePathNameBufferPtr, ImagePathLen); - wcscat (SearchPathBuffer, L";"); - wcscat (SearchPathBuffer, SharedUserData->NtSystemRoot); - wcscat (SearchPathBuffer, L"\\system32;"); - wcscat (SearchPathBuffer, SharedUserData->NtSystemRoot); - wcscat (SearchPathBuffer, L";"); - - if (PathEnvironmentVar_U.Buffer) - { - wcscat (SearchPathBuffer, PathEnvironmentVar_U.Buffer); - wcscat (SearchPathBuffer, L";"); - RtlFreeHeap(RtlGetProcessHeap(), 0, PathEnvironmentVar_U.Buffer); - } - wcscat (SearchPathBuffer, L"."); - - SearchPath = SearchPathBuffer; - } - - if (RtlDosSearchPath_U (SearchPath, - DllName->Buffer, - NULL, - MAX_PATH, - DosName, - NULL) == 0) - { - /* try to find active context dll */ - Status = find_actctx_dll(DllName->Buffer, DosName); - if(Status == STATUS_SUCCESS) - DPRINT("found %S for %S\n", DosName,DllName->Buffer); - else - return STATUS_DLL_NOT_FOUND; - } - - if (!RtlDosPathNameToNtPathName_U (DosName, - &FullNtFileName, - NULL, - NULL)) - { - DPRINT("Dll %wZ not found!\n", DllName); - return STATUS_DLL_NOT_FOUND; - } - - DPRINT("FullNtFileName %wZ\n", &FullNtFileName); - - InitializeObjectAttributes(&FileObjectAttributes, - &FullNtFileName, - 0, - NULL, - NULL); - - DPRINT("Opening dll \"%wZ\"\n", &FullNtFileName); - - Status = NtOpenFile(&FileHandle, - GENERIC_READ|SYNCHRONIZE, - &FileObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ, - FILE_SYNCHRONOUS_IO_NONALERT); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Dll open of %wZ failed: Status = 0x%08lx\n", - &FullNtFileName, Status); - RtlFreeHeap (RtlGetProcessHeap (), - 0, - FullNtFileName.Buffer); - return Status; - } - RtlFreeHeap (RtlGetProcessHeap (), - 0, - FullNtFileName.Buffer); - - if (!MapAsDataFile) - { - - Status = NtReadFile(FileHandle, - NULL, - NULL, - NULL, - &IoStatusBlock, - BlockBuffer, - sizeof(BlockBuffer), - NULL, - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT("Dll header read failed: Status = 0x%08lx\n", Status); - NtClose(FileHandle); - return Status; - } - - /* - * Overlay DOS and NT headers structures to the - * buffer with DLL's header raw data. - */ - DosHeader = (PIMAGE_DOS_HEADER) BlockBuffer; - NTHeaders = (PIMAGE_NT_HEADERS) (BlockBuffer + DosHeader->e_lfanew); - /* - * Check it is a PE image file. - */ - if ((DosHeader->e_magic != IMAGE_DOS_SIGNATURE) - || (DosHeader->e_lfanew == 0L) - || (*(PULONG)(NTHeaders) != IMAGE_NT_SIGNATURE)) - { - DPRINT("NTDLL format invalid\n"); - NtClose(FileHandle); - - return STATUS_UNSUCCESSFUL; - } - } - - /* - * Create a section for dll. - */ - Status = NtCreateSection(SectionHandle, - SECTION_ALL_ACCESS, - NULL, - NULL, - PAGE_READONLY, - MapAsDataFile ? SEC_COMMIT : SEC_IMAGE, - FileHandle); - NtClose(FileHandle); - - if (!NT_SUCCESS(Status)) - { - DPRINT("NTDLL create section failed: Status = 0x%08lx\n", Status); - return Status; - } - - RtlCreateUnicodeString(FullDosName, - DosName); - - return Status; -} - - - -/*************************************************************************** - * NAME EXPORTED - * LdrLoadDll - * - * DESCRIPTION - * - * ARGUMENTS - * - * RETURN VALUE - * - * REVISIONS - * - * NOTE - * - * @implemented - */ -NTSTATUS NTAPI -LdrLoadDll (IN PWSTR SearchPath OPTIONAL, - IN PULONG LoadFlags OPTIONAL, - IN PUNICODE_STRING Name, - OUT PVOID *BaseAddress /* also known as HMODULE*, and PHANDLE 'DllHandle' */) -{ - NTSTATUS Status; - PLDR_DATA_TABLE_ENTRY Module; - ULONG_PTR cookie; - PPEB Peb = NtCurrentPeb(); - - TRACE_LDR("LdrLoadDll loading %wZ%S%S with flags %d\n", - Name, - SearchPath ? L" from " : L"", - SearchPath ? SearchPath : L"", - LoadFlags ? *LoadFlags : 0); - - Status = LdrpLoadModule(SearchPath, LoadFlags ? *LoadFlags : 0, Name, &Module, BaseAddress); - - if (NT_SUCCESS(Status) && - (!LoadFlags || 0 == (*LoadFlags & LOAD_LIBRARY_AS_DATAFILE))) - { - if (!create_module_activation_context( Module )) - { - RtlActivateActivationContext(0, Module->EntryPointActivationContext, &cookie); - } - - if (!(Module->Flags & LDRP_PROCESS_ATTACH_CALLED)) - { - RtlEnterCriticalSection(Peb->LoaderLock); - Status = LdrpRunInitializeRoutines(NULL); - RtlLeaveCriticalSection(Peb->LoaderLock); - } - if (Module->EntryPointActivationContext) RtlDeactivateActivationContext(0, cookie); - } - - if ((!Module) && (NT_SUCCESS(Status))) - return Status; - - *BaseAddress = NT_SUCCESS(Status) ? Module->DllBase : NULL; - - return Status; -} - - -/*************************************************************************** - * NAME EXPORTED - * LdrFindEntryForAddress - * - * DESCRIPTION - * - * ARGUMENTS - * - * RETURN VALUE - * - * REVISIONS - * - * NOTE - * - * @implemented - */ -NTSTATUS NTAPI -LdrFindEntryForAddress(PVOID Address, - PLDR_DATA_TABLE_ENTRY *Module) -{ - PLIST_ENTRY ModuleListHead; - PLIST_ENTRY Entry; - PLDR_DATA_TABLE_ENTRY ModulePtr; - - DPRINT("LdrFindEntryForAddress(Address %p)\n", Address); - - if (NtCurrentPeb()->Ldr == NULL) - return(STATUS_NO_MORE_ENTRIES); - - RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock); - ModuleListHead = &NtCurrentPeb()->Ldr->InLoadOrderModuleList; - Entry = ModuleListHead->Flink; - if (Entry == ModuleListHead) - { - RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock); - return(STATUS_NO_MORE_ENTRIES); - } - - while (Entry != ModuleListHead) - { - ModulePtr = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); - - DPRINT("Scanning %wZ at %p\n", &ModulePtr->BaseDllName, ModulePtr->DllBase); - - if ((Address >= ModulePtr->DllBase) && - ((ULONG_PTR)Address <= ((ULONG_PTR)ModulePtr->DllBase + ModulePtr->SizeOfImage))) - { - *Module = ModulePtr; - RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock); - return(STATUS_SUCCESS); - } - - Entry = Entry->Flink; - } - - DPRINT("Failed to find module entry.\n"); - - RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock); - return(STATUS_NO_MORE_ENTRIES); -} - - /*************************************************************************** * NAME LOCAL * LdrFindEntryForName @@ -944,6 +341,8 @@ LdrFixupForward(PCHAR ForwardName) PLDR_DATA_TABLE_ENTRY Module; PVOID BaseAddress; + DPRINT1("\n"); + strcpy(NameBuffer, ForwardName); p = strchr(NameBuffer, '.'); if (p != NULL) @@ -982,58 +381,6 @@ LdrFixupForward(PCHAR ForwardName) } -/********************************************************************** - * NAME LOCAL - * LdrGetExportByOrdinal - * - * DESCRIPTION - * - * ARGUMENTS - * - * RETURN VALUE - * - * REVISIONS - * - * NOTE - * - */ -static PVOID -LdrGetExportByOrdinal ( - PVOID BaseAddress, - ULONG Ordinal -) -{ - PIMAGE_EXPORT_DIRECTORY ExportDir; - ULONG ExportDirSize; - PDWORD * ExFunctions; - PVOID Function; - - ExportDir = (PIMAGE_EXPORT_DIRECTORY) - RtlImageDirectoryEntryToData (BaseAddress, - TRUE, - IMAGE_DIRECTORY_ENTRY_EXPORT, - &ExportDirSize); - - - ExFunctions = (PDWORD*)RVA(BaseAddress, ExportDir->AddressOfFunctions); - DPRINT("LdrGetExportByOrdinal(Ordinal %lu) = %p\n", - Ordinal, RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base])); - - Function = (0 != ExFunctions[Ordinal - ExportDir->Base] - ? RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] ) - : NULL); - - if (((ULONG)Function >= (ULONG)ExportDir) && - ((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize)) - { - DPRINT("Forward: %s\n", (PCHAR)Function); - Function = LdrFixupForward((PCHAR)Function); - } - - return Function; -} - - /********************************************************************** * NAME LOCAL * LdrGetExportByName @@ -1201,6 +548,8 @@ LdrPerformRelocations(PIMAGE_NT_HEADERS NTHeaders, LONG_PTR Delta; NTSTATUS Status; + DPRINT1("\n"); + if (NTHeaders->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED) { return STATUS_SUCCESS; @@ -1294,56 +643,6 @@ LdrPerformRelocations(PIMAGE_NT_HEADERS NTHeaders, return STATUS_SUCCESS; } -static NTSTATUS -LdrpGetOrLoadModule(PWCHAR SearchPath, - PCHAR Name, - PLDR_DATA_TABLE_ENTRY* Module, - BOOLEAN Load) -{ - ANSI_STRING AnsiDllName; - UNICODE_STRING DllName; - NTSTATUS Status; - - DPRINT("LdrpGetOrLoadModule() called for %s\n", Name); - - RtlInitAnsiString(&AnsiDllName, Name); - Status = RtlAnsiStringToUnicodeString(&DllName, &AnsiDllName, TRUE); - if (!NT_SUCCESS(Status)) - { - return Status; - } - - Status = LdrFindEntryForName (&DllName, Module, Load); - if (Load && !NT_SUCCESS(Status)) - { - Status = LdrpLoadModule(SearchPath, - 0, - &DllName, - Module, - NULL); - if (NT_SUCCESS(Status)) - { - Status = LdrFindEntryForName (&DllName, Module, FALSE); - } - if (!NT_SUCCESS(Status)) - { - ULONG ErrorResponse; - ULONG_PTR ErrorParameter = (ULONG_PTR)&AnsiDllName; - - DPRINT1("failed to load %wZ\n", &DllName); - - NtRaiseHardError(STATUS_DLL_NOT_FOUND, - 1, - 1, - &ErrorParameter, - OptionOk, - &ErrorResponse); - } - } - RtlFreeUnicodeString (&DllName); - return Status; -} - void RtlpRaiseImportNotFound(CHAR *FuncName, ULONG Ordinal, PUNICODE_STRING DllName) { @@ -1353,6 +652,8 @@ RtlpRaiseImportNotFound(CHAR *FuncName, ULONG Ordinal, PUNICODE_STRING DllName) ANSI_STRING DllNameAnsi; CHAR Buffer[8]; + DPRINT1("\n"); + if (!FuncName) { _snprintf(Buffer, 8, "# %ld", Ordinal); @@ -1372,993 +673,6 @@ RtlpRaiseImportNotFound(CHAR *FuncName, ULONG Ordinal, PUNICODE_STRING DllName) RtlFreeAnsiString(&DllNameAnsi); } -static NTSTATUS -LdrpProcessImportDirectoryEntry(PLDR_DATA_TABLE_ENTRY Module, - PLDR_DATA_TABLE_ENTRY ImportedModule, - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory) -{ - NTSTATUS Status; - PVOID* ImportAddressList; - PULONG FunctionNameList; - PVOID IATBase; - ULONG OldProtect; - ULONG Ordinal; - ULONG IATSize; - - if (ImportModuleDirectory == NULL || ImportModuleDirectory->Name == 0) - { - return STATUS_UNSUCCESSFUL; - } - - /* Get the import address list. */ - ImportAddressList = (PVOID *)((ULONG_PTR)Module->DllBase + - (ULONG_PTR)ImportModuleDirectory->FirstThunk); - - /* Get the list of functions to import. */ - if (ImportModuleDirectory->OriginalFirstThunk != 0) - { - FunctionNameList = (PULONG)((ULONG_PTR)Module->DllBase + - (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk); - } - else - { - FunctionNameList = (PULONG)((ULONG_PTR)Module->DllBase + - (ULONG_PTR)ImportModuleDirectory->FirstThunk); - } - - /* Get the size of IAT. */ - IATSize = 0; - while (FunctionNameList[IATSize] != 0L) - { - IATSize++; - } - - /* No need to fixup anything if IAT is empty */ - if (IATSize == 0) return STATUS_SUCCESS; - - /* Unprotect the region we are about to write into. */ - IATBase = (PVOID)ImportAddressList; - IATSize *= sizeof(PVOID*); - Status = NtProtectVirtualMemory(NtCurrentProcess(), - &IATBase, - &IATSize, - PAGE_READWRITE, - &OldProtect); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to unprotect IAT.\n"); - return(Status); - } - - /* Walk through function list and fixup addresses. */ - while (*FunctionNameList != 0L) - { - if ((*FunctionNameList) & 0x80000000) - { - Ordinal = (*FunctionNameList) & 0x7fffffff; - *ImportAddressList = LdrGetExportByOrdinal(ImportedModule->DllBase, - Ordinal); - if ((*ImportAddressList) == NULL) - { - DPRINT1("Failed to import #%ld from %wZ\n", - Ordinal, &ImportedModule->FullDllName); - RtlpRaiseImportNotFound(NULL, Ordinal, &ImportedModule->FullDllName); - return STATUS_ENTRYPOINT_NOT_FOUND; - } - } - else - { - IMAGE_IMPORT_BY_NAME *pe_name; - pe_name = RVA(Module->DllBase, *FunctionNameList); - *ImportAddressList = LdrGetExportByName(ImportedModule->DllBase, - pe_name->Name, - pe_name->Hint); - if ((*ImportAddressList) == NULL) - { - DPRINT1("Failed to import %s from %wZ\n", - pe_name->Name, &ImportedModule->FullDllName); - RtlpRaiseImportNotFound((CHAR*)pe_name->Name, - 0, - &ImportedModule->FullDllName); - return STATUS_ENTRYPOINT_NOT_FOUND; - } - } - ImportAddressList++; - FunctionNameList++; - } - - /* Protect the region we are about to write into. */ - Status = NtProtectVirtualMemory(NtCurrentProcess(), - &IATBase, - &IATSize, - OldProtect, - &OldProtect); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to protect IAT.\n"); - return(Status); - } - - return STATUS_SUCCESS; -} - -static NTSTATUS -LdrpProcessImportDirectory( - PLDR_DATA_TABLE_ENTRY Module, - PLDR_DATA_TABLE_ENTRY ImportedModule, - PCHAR ImportedName) -{ - NTSTATUS Status; - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; - PCHAR Name; - ULONG Size; - - DPRINT("LdrpProcessImportDirectory(%p '%wZ', '%s')\n", - Module, &Module->BaseDllName, ImportedName); - - - ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_IMPORT, - &Size); - if (ImportModuleDirectory == NULL) - { - return STATUS_UNSUCCESSFUL; - } - - while (ImportModuleDirectory->Name) - { - Name = (PCHAR)Module->DllBase + ImportModuleDirectory->Name; - if (0 == _stricmp(Name, ImportedName)) - { - Status = LdrpProcessImportDirectoryEntry(Module, - ImportedModule, - ImportModuleDirectory); - if (!NT_SUCCESS(Status)) - { - return Status; - } - } - ImportModuleDirectory++; - } - - - return STATUS_SUCCESS; -} - - -static NTSTATUS -LdrpAdjustImportDirectory(PLDR_DATA_TABLE_ENTRY Module, - PLDR_DATA_TABLE_ENTRY ImportedModule, - PCHAR ImportedName) -{ - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; - NTSTATUS Status; - PVOID* ImportAddressList; - PVOID Start; - PVOID End; - PULONG FunctionNameList; - PVOID IATBase; - ULONG OldProtect; - ULONG Offset; - ULONG IATSize; - PIMAGE_NT_HEADERS NTHeaders; - PCHAR Name; - ULONG Size; - - DPRINT("LdrpAdjustImportDirectory(Module %p '%wZ', %p '%wZ', '%s')\n", - Module, &Module->BaseDllName, ImportedModule, &ImportedModule->BaseDllName, ImportedName); - - ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_IMPORT, - &Size); - if (ImportModuleDirectory == NULL) - { - return STATUS_UNSUCCESSFUL; - } - - while (ImportModuleDirectory->Name) - { - Name = (PCHAR)Module->DllBase + ImportModuleDirectory->Name; - if (0 == _stricmp(Name, (PCHAR)ImportedName)) - { - - /* Get the import address list. */ - ImportAddressList = (PVOID *)((ULONG_PTR)Module->DllBase + - (ULONG_PTR)ImportModuleDirectory->FirstThunk); - - /* Get the list of functions to import. */ - if (ImportModuleDirectory->OriginalFirstThunk != 0) - { - FunctionNameList = (PULONG)((ULONG_PTR)Module->DllBase + - (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk); - } - else - { - FunctionNameList = (PULONG)((ULONG_PTR)Module->DllBase + - (ULONG_PTR)ImportModuleDirectory->FirstThunk); - } - - /* Get the size of IAT. */ - IATSize = 0; - while (FunctionNameList[IATSize] != 0L) - { - IATSize++; - } - - /* Unprotect the region we are about to write into. */ - IATBase = (PVOID)ImportAddressList; - IATSize *= sizeof(PVOID*); - Status = NtProtectVirtualMemory(NtCurrentProcess(), - &IATBase, - &IATSize, - PAGE_READWRITE, - &OldProtect); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to unprotect IAT.\n"); - return(Status); - } - - NTHeaders = RtlImageNtHeader (ImportedModule->DllBase); - Start = (PVOID)NTHeaders->OptionalHeader.ImageBase; - End = (PVOID)((ULONG_PTR)Start + ImportedModule->SizeOfImage); - Offset = (ULONG)((ULONG_PTR)ImportedModule->DllBase - (ULONG_PTR)Start); - - /* Walk through function list and fixup addresses. */ - while (*FunctionNameList != 0L) - { - if (*ImportAddressList >= Start && *ImportAddressList < End) - { - (*ImportAddressList) = (PVOID)((ULONG_PTR)(*ImportAddressList) + Offset); - } - ImportAddressList++; - FunctionNameList++; - } - - /* Protect the region we are about to write into. */ - Status = NtProtectVirtualMemory(NtCurrentProcess(), - &IATBase, - &IATSize, - OldProtect, - &OldProtect); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to protect IAT.\n"); - return(Status); - } - } - ImportModuleDirectory++; - } - return STATUS_SUCCESS; -} - - -/********************************************************************** - * NAME LOCAL - * LdrFixupImports - * - * DESCRIPTION - * Compute the entry point for every symbol the DLL imports - * from other modules. - * - * ARGUMENTS - * - * RETURN VALUE - * - * REVISIONS - * - * NOTE - * - */ -static NTSTATUS -LdrFixupImports(IN PWSTR SearchPath OPTIONAL, - IN PLDR_DATA_TABLE_ENTRY Module) -{ - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectoryCurrent; - PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundImportDescriptor; - PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundImportDescriptorCurrent; - PIMAGE_TLS_DIRECTORY TlsDirectory; - ULONG TlsSize = 0; - NTSTATUS Status = STATUS_SUCCESS; - PLDR_DATA_TABLE_ENTRY ImportedModule; - PCHAR ImportedName; - PWSTR ModulePath; - ULONG Size; - ULONG_PTR cookie; - - DPRINT("LdrFixupImports(SearchPath %S, Module %p)\n", SearchPath, Module); - - /* Check for tls data */ - TlsDirectory = (PIMAGE_TLS_DIRECTORY) - RtlImageDirectoryEntryToData(Module->DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_TLS, - &Size); - if (TlsDirectory) - { - TlsSize = TlsDirectory->EndAddressOfRawData - - TlsDirectory->StartAddressOfRawData - + TlsDirectory->SizeOfZeroFill; - - if (TlsSize > 0 && NtCurrentPeb()->Ldr->Initialized) - { - TRACE_LDR("Trying to dynamically load %wZ which contains a TLS directory\n", - &Module->BaseDllName); - TlsDirectory = NULL; - } - } - - if (!create_module_activation_context( Module )) - { - if (Module->EntryPointActivationContext == NULL) - { - DPRINT("EntryPointActivationContext has not be allocated\n"); - DPRINT("Module->DllBaseName %wZ\n", Module->BaseDllName); - } - RtlActivateActivationContext( 0, Module->EntryPointActivationContext, &cookie ); - } - - /* - * Process each import module. - */ - ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_IMPORT, - &Size); - - BoundImportDescriptor = (PIMAGE_BOUND_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT, - &Size); - - if (BoundImportDescriptor != NULL && ImportModuleDirectory == NULL) - { - DPRINT1("%wZ has only a bound import directory\n", &Module->BaseDllName); - return STATUS_UNSUCCESSFUL; - } - if (BoundImportDescriptor) - { - DPRINT("BoundImportDescriptor %p\n", BoundImportDescriptor); - - BoundImportDescriptorCurrent = BoundImportDescriptor; - while (BoundImportDescriptorCurrent->OffsetModuleName) - { - ImportedName = (PCHAR)BoundImportDescriptor + - BoundImportDescriptorCurrent->OffsetModuleName; - TRACE_LDR("%wZ bound to %s\n", &Module->BaseDllName, ImportedName); - Status = LdrpGetOrLoadModule(SearchPath, ImportedName, &ImportedModule, TRUE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("failed to load %s\n", ImportedName); - return Status; - } - if (Module == ImportedModule) - { - LdrpDecrementLoadCount(Module, FALSE); - } - if (ImportedModule->TimeDateStamp != BoundImportDescriptorCurrent->TimeDateStamp) - { - TRACE_LDR("%wZ has stale binding to %wZ\n", - &Module->BaseDllName, &ImportedModule->BaseDllName); - Status = LdrpProcessImportDirectory(Module, ImportedModule, ImportedName); - if (!NT_SUCCESS(Status)) - { - DPRINT1("failed to import %s\n", ImportedName); - return Status; - } - } - else - { - BOOLEAN WrongForwarder; - WrongForwarder = FALSE; - if (ImportedModule->Flags & LDRP_IMAGE_NOT_AT_BASE) - { - TRACE_LDR("%wZ has stale binding to %s\n", - &Module->BaseDllName, ImportedName); - } - else - { - TRACE_LDR("%wZ has correct binding to %wZ\n", - &Module->BaseDllName, &ImportedModule->BaseDllName); - } - if (BoundImportDescriptorCurrent->NumberOfModuleForwarderRefs) - { - PIMAGE_BOUND_FORWARDER_REF BoundForwarderRef; - ULONG i; - PLDR_DATA_TABLE_ENTRY ForwarderModule; - PCHAR ForwarderName; - - BoundForwarderRef = (PIMAGE_BOUND_FORWARDER_REF)(BoundImportDescriptorCurrent + 1); - for (i = 0; - i < BoundImportDescriptorCurrent->NumberOfModuleForwarderRefs; - i++, BoundForwarderRef++) - { - ForwarderName = (PCHAR)BoundImportDescriptor + - BoundForwarderRef->OffsetModuleName; - TRACE_LDR("%wZ bound to %s via forwardes from %s\n", - &Module->BaseDllName, ForwarderName, ImportedName); - Status = LdrpGetOrLoadModule(SearchPath, ForwarderName, &ForwarderModule, TRUE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("failed to load %s\n", ForwarderName); - return Status; - } - if (Module == ImportedModule) - { - LdrpDecrementLoadCount(Module, FALSE); - } - if (ForwarderModule->TimeDateStamp != BoundForwarderRef->TimeDateStamp || - ForwarderModule->Flags & LDRP_IMAGE_NOT_AT_BASE) - { - TRACE_LDR("%wZ has stale binding to %s\n", - &Module->BaseDllName, ForwarderName); - WrongForwarder = TRUE; - } - else - { - TRACE_LDR("%wZ has correct binding to %s\n", - &Module->BaseDllName, ForwarderName); - } - } - } - if (WrongForwarder || - ImportedModule->Flags & LDRP_IMAGE_NOT_AT_BASE) - { - Status = LdrpProcessImportDirectory(Module, ImportedModule, ImportedName); - if (!NT_SUCCESS(Status)) - { - DPRINT1("failed to import %s\n", ImportedName); - return Status; - } - } - else if (ImportedModule->Flags & LDRP_IMAGE_NOT_AT_BASE) - { - TRACE_LDR("Adjust imports for %s from %wZ\n", - ImportedName, &Module->BaseDllName); - Status = LdrpAdjustImportDirectory(Module, ImportedModule, ImportedName); - if (!NT_SUCCESS(Status)) - { - DPRINT1("failed to adjust import entries for %s\n", ImportedName); - return Status; - } - } - else if (WrongForwarder) - { - /* - * FIXME: - * Update only forwarders - */ - TRACE_LDR("Stale BIND %s from %wZ\n", - ImportedName, &Module->BaseDllName); - Status = LdrpProcessImportDirectory(Module, ImportedModule, ImportedName); - if (!NT_SUCCESS(Status)) - { - DPRINT1("faild to import %s\n", ImportedName); - return Status; - } - } - else - { - /* nothing to do */ - } - } - BoundImportDescriptorCurrent += BoundImportDescriptorCurrent->NumberOfModuleForwarderRefs + 1; - } - } - else if (ImportModuleDirectory) - { - DPRINT("ImportModuleDirectory %p\n", ImportModuleDirectory); - - ImportModuleDirectoryCurrent = ImportModuleDirectory; - while (ImportModuleDirectoryCurrent->Name) - { - ImportedName = (PCHAR)Module->DllBase + ImportModuleDirectoryCurrent->Name; - TRACE_LDR("%wZ imports functions from %s\n", &Module->BaseDllName, ImportedName); - - if (SearchPath == NULL) - { - ModulePath = LdrpQueryAppPaths(Module->BaseDllName.Buffer); - - Status = LdrpGetOrLoadModule(ModulePath, ImportedName, &ImportedModule, TRUE); - if (ModulePath != NULL) RtlFreeHeap(RtlGetProcessHeap(), 0, ModulePath); - if (NT_SUCCESS(Status)) goto Success; - } - - Status = LdrpGetOrLoadModule(SearchPath, ImportedName, &ImportedModule, TRUE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("failed to load %s\n", ImportedName); - break; - } -Success: - if (Module == ImportedModule) - { - LdrpDecrementLoadCount(Module, FALSE); - } - - TRACE_LDR("Initializing imports for %wZ from %s\n", - &Module->BaseDllName, ImportedName); - Status = LdrpProcessImportDirectoryEntry(Module, ImportedModule, ImportModuleDirectoryCurrent); - if (!NT_SUCCESS(Status)) - { - DPRINT1("failed to import %s\n", ImportedName); - break; - } - ImportModuleDirectoryCurrent++; - } - - if (!NT_SUCCESS(Status)) - { - NTSTATUS errorStatus = Status; - - while (ImportModuleDirectoryCurrent >= ImportModuleDirectory) - { - ImportedName = (PCHAR)Module->DllBase + ImportModuleDirectoryCurrent->Name; - - Status = LdrpGetOrLoadModule(NULL, ImportedName, &ImportedModule, FALSE); - if (NT_SUCCESS(Status) && Module != ImportedModule) - { - Status = LdrpUnloadModule(ImportedModule, FALSE); - if (!NT_SUCCESS(Status)) DPRINT1("unable to unload %s\n", ImportedName); - } - ImportModuleDirectoryCurrent--; - } - return errorStatus; - } - } - - if (Module->EntryPointActivationContext) RtlDeactivateActivationContext( 0, cookie ); - - return STATUS_SUCCESS; -} - - -/********************************************************************** - * NAME - * LdrPEStartup - * - * DESCRIPTION - * 1. Relocate, if needed the EXE. - * 2. Fixup any imported symbol. - * 3. Compute the EXE's entry point. - * - * ARGUMENTS - * ImageBase - * Address at which the EXE's image - * is loaded. - * - * SectionHandle - * Handle of the section that contains - * the EXE's image. - * - * RETURN VALUE - * NULL on error; otherwise the entry point - * to call for initializing the DLL. - * - * REVISIONS - * - * NOTE - * 04.01.2004 hb Previous this function was used for all images (dll + exe). - * Currently the function is only used for the exe. - */ -PEPFUNC LdrPEStartup (PVOID ImageBase, - HANDLE SectionHandle, - PLDR_DATA_TABLE_ENTRY* Module, - PWSTR FullDosName) -{ - NTSTATUS Status; - PEPFUNC EntryPoint = NULL; - PIMAGE_DOS_HEADER DosHeader; - PIMAGE_NT_HEADERS NTHeaders; - PLDR_DATA_TABLE_ENTRY tmpModule; - PVOID ActivationContextStack; - - DPRINT("LdrPEStartup(ImageBase %p SectionHandle %p)\n", - ImageBase, SectionHandle); - - /* - * Overlay DOS and WNT headers structures - * to the DLL's image. - */ - DosHeader = (PIMAGE_DOS_HEADER) ImageBase; - NTHeaders = (PIMAGE_NT_HEADERS) ((ULONG_PTR)ImageBase + DosHeader->e_lfanew); - - /* - * If the base address is different from the - * one the DLL is actually loaded, perform any - * relocation. - */ - if (ImageBase != (PVOID)NTHeaders->OptionalHeader.ImageBase) - { - DPRINT("LDR: Performing relocations\n"); - Status = LdrPerformRelocations(NTHeaders, ImageBase); - if (!NT_SUCCESS(Status)) - { - DPRINT1("LdrPerformRelocations() failed\n"); - return NULL; - } - } - - if (Module != NULL) - { - *Module = LdrAddModuleEntry(ImageBase, NTHeaders, FullDosName); - (*Module)->SectionPointer = SectionHandle; - } - else - { - Module = &tmpModule; - Status = LdrFindEntryForAddress(ImageBase, Module); - if (!NT_SUCCESS(Status)) - { - return NULL; - } - } - - if (ImageBase != (PVOID) NTHeaders->OptionalHeader.ImageBase) - { - (*Module)->Flags |= LDRP_IMAGE_NOT_AT_BASE; - } - - /* Allocate memory for the ActivationContextStack */ - /* FIXME: Verify RtlAllocateActivationContextStack behavior */ - Status = RtlAllocateActivationContextStack(&ActivationContextStack); - if (NT_SUCCESS(Status)) - { - DPRINT("ActivationContextStack %x\n",ActivationContextStack); - DPRINT("ActiveFrame %x\n", ((PACTIVATION_CONTEXT_STACK)ActivationContextStack)->ActiveFrame); - NtCurrentTeb()->ActivationContextStackPointer = ActivationContextStack; - NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame = NULL; - } - else - DPRINT1("Warning: Unable to allocate ActivationContextStack\n"); - - /* - * If the DLL's imports symbols from other - * modules, fixup the imported calls entry points. - */ - DPRINT("About to fixup imports\n"); - Status = LdrFixupImports(NULL, *Module); - if (!NT_SUCCESS(Status)) - { - DPRINT1("LdrFixupImports() failed for %wZ\n", &(*Module)->BaseDllName); - return NULL; - } - DPRINT("Fixup done\n"); - RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock); - Status = LdrpInitializeTls(); - if (NT_SUCCESS(Status)) - { - Status = LdrpRunInitializeRoutines(NULL); - } - if (NT_SUCCESS(Status)) - { - LdrpTlsCallback((*Module)->DllBase, DLL_PROCESS_ATTACH); - } - - - RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock); - if (!NT_SUCCESS(Status)) - { - return NULL; - } - - /* - * Compute the DLL's entry point's address. - */ - DPRINT("ImageBase = %p\n", ImageBase); - DPRINT("AddressOfEntryPoint = 0x%lx\n",(ULONG)NTHeaders->OptionalHeader.AddressOfEntryPoint); - if (NTHeaders->OptionalHeader.AddressOfEntryPoint != 0) - { - EntryPoint = (PEPFUNC) ((ULONG_PTR)ImageBase - + NTHeaders->OptionalHeader.AddressOfEntryPoint); - } - DPRINT("LdrPEStartup() = %p\n",EntryPoint); - return EntryPoint; -} - -static NTSTATUS -LdrpLoadModule(IN PWSTR SearchPath OPTIONAL, - IN ULONG LoadFlags, - IN PUNICODE_STRING Name, - PLDR_DATA_TABLE_ENTRY *Module, - PVOID *BaseAddress OPTIONAL) -{ - UNICODE_STRING AdjustedName; - UNICODE_STRING FullDosName; - NTSTATUS Status; - PLDR_DATA_TABLE_ENTRY tmpModule; - HANDLE SectionHandle; - SIZE_T ViewSize; - PVOID ImageBase; - PIMAGE_NT_HEADERS NtHeaders; - BOOLEAN MappedAsDataFile; - PVOID ArbitraryUserPointer; - - if (Module == NULL) - { - Module = &tmpModule; - } - /* adjust the full dll name */ - LdrAdjustDllName(&AdjustedName, Name, FALSE); - - DPRINT("%wZ\n", &AdjustedName); - - MappedAsDataFile = FALSE; - /* Test if dll is already loaded */ - Status = LdrFindEntryForName(&AdjustedName, Module, TRUE); - if (NT_SUCCESS(Status)) - { - RtlFreeUnicodeString(&AdjustedName); - if (NULL != BaseAddress) - { - *BaseAddress = (*Module)->DllBase; - } - } - else - { - /* Open or create dll image section */ - Status = LdrpMapKnownDll(&AdjustedName, &FullDosName, &SectionHandle); - if (!NT_SUCCESS(Status)) - { - MappedAsDataFile = (0 != (LoadFlags & LOAD_LIBRARY_AS_DATAFILE)); - Status = LdrpMapDllImageFile(SearchPath, &AdjustedName, &FullDosName, - MappedAsDataFile, &SectionHandle); - } - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to create or open dll section of '%wZ' (Status %lx)\n", - &AdjustedName, Status); - RtlFreeUnicodeString(&AdjustedName); - return Status; - } - RtlFreeUnicodeString(&AdjustedName); - /* Map the dll into the process */ - ViewSize = 0; - ImageBase = 0; - ArbitraryUserPointer = NtCurrentTeb()->NtTib.ArbitraryUserPointer; - NtCurrentTeb()->NtTib.ArbitraryUserPointer = FullDosName.Buffer; - Status = NtMapViewOfSection(SectionHandle, - NtCurrentProcess(), - &ImageBase, - 0, - 0, - NULL, - &ViewSize, - ViewShare, - 0, - PAGE_READONLY); - NtCurrentTeb()->NtTib.ArbitraryUserPointer = ArbitraryUserPointer; - if (!NT_SUCCESS(Status)) - { - DPRINT1("map view of section failed (Status 0x%08lx)\n", Status); - RtlFreeUnicodeString(&FullDosName); - NtClose(SectionHandle); - return(Status); - } - if (NULL != BaseAddress) - { - *BaseAddress = ImageBase; - } - if (!MappedAsDataFile) - { - /* Get and check the NT headers */ - NtHeaders = RtlImageNtHeader(ImageBase); - if (NtHeaders == NULL) - { - DPRINT1("RtlImageNtHeaders() failed\n"); - NtUnmapViewOfSection (NtCurrentProcess (), ImageBase); - NtClose (SectionHandle); - RtlFreeUnicodeString(&FullDosName); - return STATUS_UNSUCCESSFUL; - } - } - DPRINT("Mapped %wZ at %x\n", &FullDosName, ImageBase); - if (MappedAsDataFile) - { - ASSERT(NULL != BaseAddress); - if (NULL != BaseAddress) - { - *BaseAddress = (PVOID) ((char *) *BaseAddress + 1); - } - *Module = NULL; - RtlFreeUnicodeString(&FullDosName); - NtClose(SectionHandle); - return STATUS_SUCCESS; - } - /* If the base address is different from the - * one the DLL is actually loaded, perform any - * relocation. */ - if (ImageBase != (PVOID) NtHeaders->OptionalHeader.ImageBase) - { - DPRINT1("Relocating (%lx -> %p) %wZ\n", - NtHeaders->OptionalHeader.ImageBase, ImageBase, &FullDosName); - Status = LdrPerformRelocations(NtHeaders, ImageBase); - if (!NT_SUCCESS(Status)) - { - DPRINT1("LdrPerformRelocations() failed\n"); - NtUnmapViewOfSection (NtCurrentProcess (), ImageBase); - NtClose (SectionHandle); - RtlFreeUnicodeString(&FullDosName); - return STATUS_UNSUCCESSFUL; - } - } - *Module = LdrAddModuleEntry(ImageBase, NtHeaders, FullDosName.Buffer); - (*Module)->SectionPointer = SectionHandle; - if (ImageBase != (PVOID) NtHeaders->OptionalHeader.ImageBase) - { - (*Module)->Flags |= LDRP_IMAGE_NOT_AT_BASE; - } - if (NtHeaders->FileHeader.Characteristics & IMAGE_FILE_DLL) - { - (*Module)->Flags |= LDRP_IMAGE_DLL; - } - /* fixup the imported calls entry points */ - Status = LdrFixupImports(SearchPath, *Module); - if (!NT_SUCCESS(Status)) - { - DPRINT1("LdrFixupImports failed for %wZ, status=%x\n", &(*Module)->BaseDllName, Status); - NtUnmapViewOfSection (NtCurrentProcess (), ImageBase); - NtClose (SectionHandle); - RtlFreeUnicodeString (&FullDosName); - RtlFreeUnicodeString (&(*Module)->FullDllName); - RtlFreeUnicodeString (&(*Module)->BaseDllName); - RemoveEntryList (&(*Module)->InLoadOrderLinks); - return Status; - } - - RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock); - InsertTailList(&NtCurrentPeb()->Ldr->InInitializationOrderModuleList, - &(*Module)->InInitializationOrderModuleList); - RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock); - } - return STATUS_SUCCESS; -} - -static NTSTATUS -LdrpUnloadModule(PLDR_DATA_TABLE_ENTRY Module, - BOOLEAN Unload) -{ - PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory; - PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundImportDescriptor; - PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundImportDescriptorCurrent; - PCHAR ImportedName; - PLDR_DATA_TABLE_ENTRY ImportedModule; - NTSTATUS Status = 0; - LONG LoadCount; - ULONG Size; - - if (Unload) - { - RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock); - } - - LoadCount = LdrpDecrementLoadCount(Module, Unload); - - TRACE_LDR("Unload %wZ, LoadCount %d\n", &Module->BaseDllName, LoadCount); - - if (LoadCount == 0) - { - /* ?????????????????? */ - } - else if (!(Module->Flags & LDRP_STATIC_LINK) && LoadCount == 1) - { - BoundImportDescriptor = (PIMAGE_BOUND_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT, - &Size); - if (BoundImportDescriptor) - { - /* dereferencing all imported modules, use the bound import descriptor */ - BoundImportDescriptorCurrent = BoundImportDescriptor; - while (BoundImportDescriptorCurrent->OffsetModuleName) - { - ImportedName = (PCHAR)BoundImportDescriptor + BoundImportDescriptorCurrent->OffsetModuleName; - TRACE_LDR("%wZ trys to unload %s\n", &Module->BaseDllName, ImportedName); - Status = LdrpGetOrLoadModule(NULL, ImportedName, &ImportedModule, FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("unable to found imported modul %s\n", ImportedName); - } - else - { - if (Module != ImportedModule) - { - Status = LdrpUnloadModule(ImportedModule, FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("unable to unload %s\n", ImportedName); - } - } - } - BoundImportDescriptorCurrent++; - } - } - else - { - ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR) - RtlImageDirectoryEntryToData(Module->DllBase, - TRUE, - IMAGE_DIRECTORY_ENTRY_IMPORT, - &Size); - if (ImportModuleDirectory) - { - /* dereferencing all imported modules, use the import descriptor */ - while (ImportModuleDirectory->Name) - { - ImportedName = (PCHAR)Module->DllBase + ImportModuleDirectory->Name; - TRACE_LDR("%wZ trys to unload %s\n", &Module->BaseDllName, ImportedName); - Status = LdrpGetOrLoadModule(NULL, ImportedName, &ImportedModule, FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("unable to found imported modul %s\n", ImportedName); - } - else - { - if (Module != ImportedModule) - { - Status = LdrpUnloadModule(ImportedModule, FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("unable to unload %s\n", ImportedName); - } - } - } - ImportModuleDirectory++; - } - } - } - } - - if (Unload) - { - if (!(Module->Flags & LDRP_STATIC_LINK)) - { - LdrpDetachProcess(FALSE); - } - - RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock); - } - return STATUS_SUCCESS; - -} - -/* - * @implemented - */ -NTSTATUS NTAPI -LdrUnloadDll (IN PVOID BaseAddress) -{ - PLDR_DATA_TABLE_ENTRY Module; - NTSTATUS Status; - - if (BaseAddress == NULL) - return STATUS_SUCCESS; - - if (LdrMappedAsDataFile(&BaseAddress)) - { - Status = NtUnmapViewOfSection(NtCurrentProcess(), BaseAddress); - } - else - { - Status = LdrFindEntryForAddress(BaseAddress, &Module); - if (NT_SUCCESS(Status)) - { - TRACE_LDR("LdrUnloadDll, , unloading %wZ\n", &Module->BaseDllName); - Status = LdrpUnloadModule(Module, TRUE); - } - } - - return Status; -} - /* * @implemented */ @@ -2397,379 +711,16 @@ LdrDisableThreadCalloutsForDll(IN PVOID BaseAddress) return Status; } -/* - * @implemented - */ -NTSTATUS NTAPI -LdrGetDllHandle(IN PWSTR DllPath OPTIONAL, - IN PULONG DllCharacteristics, - IN PUNICODE_STRING DllName, - OUT PVOID *DllHandle) -{ - PLDR_DATA_TABLE_ENTRY Module; - NTSTATUS Status; - - TRACE_LDR("LdrGetDllHandle, searching for %wZ from %S\n", - DllName, DllPath ? DllPath : L""); - - /* NULL is the current executable */ - if (DllName == NULL) - { - *DllHandle = LdrpImageEntry->DllBase; - DPRINT("BaseAddress 0x%lx\n", *DllHandle); - return STATUS_SUCCESS; - } - - Status = LdrFindEntryForName(DllName, &Module, FALSE); - if (NT_SUCCESS(Status)) - { - *DllHandle = Module->DllBase; - return STATUS_SUCCESS; - } - - DPRINT("Failed to find dll %wZ\n", DllName); - *DllHandle = NULL; - return STATUS_DLL_NOT_FOUND; -} - -/* - * @implemented - */ -NTSTATUS NTAPI -LdrAddRefDll(IN ULONG Flags, - IN PVOID BaseAddress) -{ - PLIST_ENTRY ModuleListHead; - PLIST_ENTRY Entry; - PLDR_DATA_TABLE_ENTRY Module; - NTSTATUS Status; - - if (Flags & ~(LDR_PIN_MODULE)) - { - return STATUS_INVALID_PARAMETER; - } - - Status = STATUS_DLL_NOT_FOUND; - RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock); - ModuleListHead = &NtCurrentPeb()->Ldr->InLoadOrderModuleList; - Entry = ModuleListHead->Flink; - while (Entry != ModuleListHead) - { - Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); - - if (Module->DllBase == BaseAddress) - { - if (Flags & LDR_PIN_MODULE) - { - Module->Flags |= LDRP_STATIC_LINK; - } - else - { - LdrpIncrementLoadCount(Module, - FALSE); - } - Status = STATUS_SUCCESS; - break; - } - Entry = Entry->Flink; - } - RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock); - return Status; -} - -/* - * @implemented - */ -NTSTATUS NTAPI -LdrGetProcedureAddress (IN PVOID BaseAddress, - IN PANSI_STRING Name, - IN ULONG Ordinal, - OUT PVOID *ProcedureAddress) -{ - NTSTATUS Status = STATUS_PROCEDURE_NOT_FOUND; - if (Name && Name->Length) - { - TRACE_LDR("LdrGetProcedureAddress by NAME - %Z\n", Name); - } - else - { - TRACE_LDR("LdrGetProcedureAddress by ORDINAL - %d\n", Ordinal); - } - - DPRINT("LdrGetProcedureAddress (BaseAddress %p Name %Z Ordinal %lu ProcedureAddress %p)\n", - BaseAddress, Name, Ordinal, ProcedureAddress); - - _SEH2_TRY - { - if (Name && Name->Length) - { - /* by name */ - *ProcedureAddress = LdrGetExportByName(BaseAddress, (PUCHAR)Name->Buffer, 0xffff); - if (*ProcedureAddress != NULL) - { - Status = STATUS_SUCCESS; - } - DPRINT("LdrGetProcedureAddress: Can't resolve symbol '%Z'\n", Name); - } - else - { - /* by ordinal */ - Ordinal &= 0x0000FFFF; - *ProcedureAddress = LdrGetExportByOrdinal(BaseAddress, (WORD)Ordinal); - if (*ProcedureAddress) - { - Status = STATUS_SUCCESS; - } - DPRINT("LdrGetProcedureAddress: Can't resolve symbol @%lu\n", Ordinal); - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = STATUS_DLL_NOT_FOUND; - } - _SEH2_END; - - return Status; -} - -/********************************************************************** - * NAME LOCAL - * LdrpDetachProcess - * - * DESCRIPTION - * Unload dll's which are no longer referenced from others dll's - * - * ARGUMENTS - * none - * - * RETURN VALUE - * none - * - * REVISIONS - * - * NOTE - * The loader lock must be held on enty. - */ -static VOID -LdrpDetachProcess(BOOLEAN UnloadAll) -{ - PLIST_ENTRY ModuleListHead; - PLIST_ENTRY Entry; - PLDR_DATA_TABLE_ENTRY Module; - static ULONG CallingCount = 0; - - DPRINT("LdrpDetachProcess() called for %wZ\n", - &LdrpImageEntry->BaseDllName); - - if (UnloadAll) - LdrpDllShutdownInProgress = TRUE; - - CallingCount++; - - ModuleListHead = &NtCurrentPeb()->Ldr->InInitializationOrderModuleList; - Entry = ModuleListHead->Blink; - while (Entry != ModuleListHead) - { - Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); - if (((UnloadAll && Module->LoadCount == LDRP_PROCESS_CREATION_TIME) || Module->LoadCount == 0) && - Module->Flags & LDRP_ENTRY_PROCESSED && - !(Module->Flags & LDRP_UNLOAD_IN_PROGRESS)) - { - Module->Flags |= LDRP_UNLOAD_IN_PROGRESS; - if (Module == LdrpLastModule) - { - LdrpLastModule = NULL; - } - if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED) - { - TRACE_LDR("Unload %wZ - Calling entry point at %x\n", - &Module->BaseDllName, Module->EntryPoint); - - /* Check if it has TLS */ - if (Module->TlsIndex) - { - /* Call TLS */ - LdrpTlsCallback(Module->DllBase, DLL_PROCESS_ATTACH); - } - - if ((Module->Flags & LDRP_IMAGE_DLL) && Module->EntryPoint) - { - LdrpCallDllEntry(Module->EntryPoint, - Module->DllBase, - DLL_PROCESS_DETACH, - (PVOID)(Module->LoadCount == LDRP_PROCESS_CREATION_TIME ? 1 : 0)); - } - } - else - { - TRACE_LDR("Unload %wZ\n", &Module->BaseDllName); - } - Entry = ModuleListHead->Blink; - } - else - { - Entry = Entry->Blink; - } - } - - if (CallingCount == 1) - { - Entry = ModuleListHead->Blink; - while (Entry != ModuleListHead) - { - Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); - Entry = Entry->Blink; - if (Module->Flags & LDRP_UNLOAD_IN_PROGRESS && - ((UnloadAll && Module->LoadCount != LDRP_PROCESS_CREATION_TIME) || Module->LoadCount == 0)) - { - /* remove the module entry from the list */ - RemoveEntryList (&Module->InLoadOrderLinks); - RemoveEntryList (&Module->InInitializationOrderModuleList); - - NtUnmapViewOfSection (NtCurrentProcess (), Module->DllBase); - NtClose (Module->SectionPointer); - - TRACE_LDR("%wZ unloaded\n", &Module->BaseDllName); - - RtlFreeUnicodeString (&Module->FullDllName); - RtlFreeUnicodeString (&Module->BaseDllName); - - RtlFreeHeap (RtlGetProcessHeap (), 0, Module); - } - } - } - CallingCount--; - DPRINT("LdrpDetachProcess() done\n"); -} - /* * @implemented */ BOOLEAN NTAPI RtlDllShutdownInProgress (VOID) { + DPRINT1("\n"); return LdrpDllShutdownInProgress; } -/* - * @implemented - */ -NTSTATUS NTAPI -LdrShutdownProcess (VOID) -{ - LdrpDetachProcess(TRUE); - return STATUS_SUCCESS; -} - -/* - * @implemented - */ -NTSTATUS -NTAPI -LdrpInitializeThread(IN PCONTEXT Context) -{ - PLIST_ENTRY ModuleListHead; - PLIST_ENTRY Entry; - PLDR_DATA_TABLE_ENTRY Module; - NTSTATUS Status; - - DPRINT("LdrpAttachThread() called for %wZ\n", - &LdrpImageEntry->BaseDllName); - - RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock); - - Status = LdrpAllocateTls(); - - if (NT_SUCCESS(Status)) - { - ModuleListHead = &NtCurrentPeb()->Ldr->InInitializationOrderModuleList; - Entry = ModuleListHead->Flink; - - while (Entry != ModuleListHead) - { - Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); - if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED && - !(Module->Flags & LDRP_DONT_CALL_FOR_THREADS) && - !(Module->Flags & LDRP_UNLOAD_IN_PROGRESS)) - { - TRACE_LDR("%wZ - Calling entry point at %x for thread attaching\n", - &Module->BaseDllName, Module->EntryPoint); - - /* Check if it has TLS */ - if (Module->TlsIndex) - { - /* Call TLS */ - LdrpTlsCallback(Module->DllBase, DLL_THREAD_ATTACH); - } - - if ((Module->Flags & LDRP_IMAGE_DLL) && Module->EntryPoint) - LdrpCallDllEntry(Module->EntryPoint, Module->DllBase, DLL_THREAD_ATTACH, NULL); - } - Entry = Entry->Flink; - } - - Entry = NtCurrentPeb()->Ldr->InLoadOrderModuleList.Flink; - Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); - LdrpTlsCallback(Module->DllBase, DLL_THREAD_ATTACH); - } - - RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock); - - DPRINT("LdrpAttachThread() done\n"); - - return Status; -} - - -/* - * @implemented - */ -NTSTATUS NTAPI -LdrShutdownThread (VOID) -{ - PLIST_ENTRY ModuleListHead; - PLIST_ENTRY Entry; - PLDR_DATA_TABLE_ENTRY Module; - - DPRINT("LdrShutdownThread() called for %wZ\n", - &LdrpImageEntry->BaseDllName); - - RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock); - - ModuleListHead = &NtCurrentPeb()->Ldr->InInitializationOrderModuleList; - Entry = ModuleListHead->Blink; - while (Entry != ModuleListHead) - { - Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); - - if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED && - !(Module->Flags & LDRP_DONT_CALL_FOR_THREADS) && - !(Module->Flags & LDRP_UNLOAD_IN_PROGRESS)) - { - TRACE_LDR("%wZ - Calling entry point at %x for thread detaching\n", - &Module->BaseDllName, Module->EntryPoint); - /* Check if it has TLS */ - if (Module->TlsIndex) - { - /* Call TLS */ - LdrpTlsCallback(Module->DllBase, DLL_THREAD_DETACH); - } - - if ((Module->Flags & LDRP_IMAGE_DLL) && Module->EntryPoint) - LdrpCallDllEntry(Module->EntryPoint, Module->DllBase, DLL_THREAD_DETACH, NULL); - } - Entry = Entry->Blink; - } - - /* Free TLS */ - LdrpFreeTls(); - RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock); - - DPRINT("LdrShutdownThread() done\n"); - - return STATUS_SUCCESS; -} - /* * Compute size of an image as it is actually present in virt memory * (i.e. excluding NEVER_LOAD sections) @@ -2781,6 +732,8 @@ LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders) unsigned SectionIndex; ULONG ResidentSize; + DPRINT1("\n"); + SectionHeader = (PIMAGE_SECTION_HEADER)((char *) &NTHeaders->OptionalHeader + NTHeaders->FileHeader.SizeOfOptionalHeader); ResidentSize = 0; @@ -2807,6 +760,7 @@ LdrProcessRelocationBlock( IN PUSHORT TypeOffset, IN LONG_PTR Delta) { + DPRINT1("\n"); return LdrProcessRelocationBlockLongLong(Address, Count, TypeOffset, Delta); } @@ -2814,6 +768,7 @@ BOOLEAN NTAPI LdrUnloadAlternateResourceModule(IN PVOID BaseAddress) { - UNIMPLEMENTED; + //FIXME: We don't implement alternate resources anyway, don't spam the log + //UNIMPLEMENTED; return FALSE; } diff --git a/dll/shellext/deskadp/CMakeLists.txt b/dll/shellext/deskadp/CMakeLists.txt index 23306b9a197..05ec5af81bf 100644 --- a/dll/shellext/deskadp/CMakeLists.txt +++ b/dll/shellext/deskadp/CMakeLists.txt @@ -9,7 +9,7 @@ list(APPEND SOURCE deskadp.rc ${CMAKE_CURRENT_BINARY_DIR}/deskadp.def) -add_library(deskadp SHARED ${CMAKE_CURRENT_BINARY_DIR}/deskadp_precomp.h.gch ${SOURCE}) +add_library(deskadp SHARED ${SOURCE}) set_module_type(deskadp win32dll) @@ -24,6 +24,6 @@ add_importlibs(deskadp kernel32 ntdll) -add_pch(deskadp ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(deskadp precomp.h) add_cd_file(TARGET deskadp DESTINATION reactos/system32 FOR all) diff --git a/dll/shellext/deskadp/lang/pl-PL.rc b/dll/shellext/deskadp/lang/pl-PL.rc index 32f5bfc5efc..70cca9bf497 100644 --- a/dll/shellext/deskadp/lang/pl-PL.rc +++ b/dll/shellext/deskadp/lang/pl-PL.rc @@ -1,7 +1,9 @@ -/* translated by Caemyr - Olaf Siejka (Jan, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; +/* + * translated by Caemyr - Olaf Siejka (Jan, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -13,42 +15,41 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Typ karty", -1, 7, 3, 237, 50 LTEXT "", IDC_ADAPTERNAME, 40, 17, 190, 20, SS_NOPREFIX - PUSHBUTTON "&Waciwoci", IDC_ADAPTERPROPERTIES, 177, 33, 59, 14 + PUSHBUTTON "&Właściwości", IDC_ADAPTERPROPERTIES, 177, 33, 59, 14 GROUPBOX "Informacje o karcie", -1, 7, 56, 237, 75 LTEXT "Typ GPU:", -1, 13, 68, 58, 8 LTEXT "", IDC_CHIPTYPE, 71, 68, 160, 8, SS_NOPREFIX LTEXT "Typ DAC:", -1, 13, 80, 58, 8 LTEXT "", IDC_DACTYPE, 71, 80, 160, 8, SS_NOPREFIX - LTEXT "Rozmiar pamici:", -1, 13, 92, 58, 8 + LTEXT "Rozmiar pamięci:", -1, 13, 92, 58, 8 LTEXT "", IDC_MEMORYSIZE, 71, 92, 160, 8, SS_NOPREFIX - LTEXT "Cig nazwy:", -1, 13, 104, 58, 8 + LTEXT "Ciąg nazwy:", -1, 13, 104, 58, 8 LTEXT "", IDC_ADAPTERSTRING, 71, 104, 160, 8, SS_NOPREFIX LTEXT "Wersja BIOS:", -1, 13, 116, 58, 8 LTEXT "", IDC_BIOSINFORMATION, 71, 116, 160, 8, SS_NOPREFIX - PUSHBUTTON "&Wywietl wszystkie tryby...", IDC_LISTALLMODES, 7, 139, 75, 14 + PUSHBUTTON "&Wyświetl wszystkie tryby...", IDC_LISTALLMODES, 7, 139, 75, 14 END IDD_LISTALLMODES DIALOGEX 0, 0, 225, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME -CAPTION "Wywietlanie trybw" +CAPTION "Wyświetlanie trybów" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK", IDOK, 112, 115, 50, 15 PUSHBUTTON "Anuluj", IDCANCEL, 167, 115, 50, 15 - GROUPBOX "Wywietl tylko obsugiwane tryby", -1, 6, 7, 212, 98 + GROUPBOX "Wyświetl tylko obsługiwane tryby", -1, 6, 7, 212, 98 LISTBOX IDC_ALLVALIDMODES, 10, 20, 204, 87, LBS_NOTIFY | WS_VSCROLL END STRINGTABLE BEGIN IDS_MODEFMT "%d by %d, %s, %s" - IDS_DEFREFRESHRATE "Odwieanie domylne" - IDES_REFRESHRATEFMT "%d Hercw" - IDS_4BPP "16 kolorw" - IDS_8BPP "256 kolorw" - IDS_15BPP "32k kolorw (15 bitw)" - IDS_16BPP "64k kolorw (16 bitw)" - IDS_24BPP "16m kolorw (24 bity)" - IDS_32BPP "16m +kana alfa (32 bity)" + IDS_DEFREFRESHRATE "Odświeżanie domyślne" + IDES_REFRESHRATEFMT "%d Herców" + IDS_4BPP "16 kolorów" + IDS_8BPP "256 kolorów" + IDS_15BPP "32k kolorów (15 bitów)" + IDS_16BPP "64k kolorów (16 bitów)" + IDS_24BPP "16m kolorów (24 bity)" + IDS_32BPP "16m +kanał alfa (32 bity)" END - diff --git a/dll/shellext/deskadp/lang/ru-RU.rc b/dll/shellext/deskadp/lang/ru-RU.rc index 7b4e9e1ba90..f74bf012a2b 100644 --- a/dll/shellext/deskadp/lang/ru-RU.rc +++ b/dll/shellext/deskadp/lang/ru-RU.rc @@ -2,47 +2,47 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_DISPLAYADAPTER DIALOGEX 0, 0, 252, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Адаптер" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", -1, 7, 3, 237, 50 + GROUPBOX "Тип адаптера", -1, 7, 3, 237, 50 LTEXT "", IDC_ADAPTERNAME, 40, 17, 190, 20, SS_NOPREFIX - PUSHBUTTON "&", IDC_ADAPTERPROPERTIES, 177, 33, 59, 14 - GROUPBOX " ", -1, 7, 56, 237, 75 - LTEXT " :", -1, 13, 68, 58, 8 + PUSHBUTTON "&Свойства", IDC_ADAPTERPROPERTIES, 177, 33, 59, 14 + GROUPBOX "Сведения об адаптере", -1, 7, 56, 237, 75 + LTEXT "Тип микросхем:", -1, 13, 68, 58, 8 LTEXT "", IDC_CHIPTYPE, 90, 68, 150, 8, SS_NOPREFIX - LTEXT " DAC:", -1, 13, 80, 80, 8 + LTEXT "Тип конвертера DAC:", -1, 13, 80, 80, 8 LTEXT "", IDC_DACTYPE, 90, 80, 150, 8, SS_NOPREFIX - LTEXT " :", -1, 13, 92, 58, 8 + LTEXT "Объем памяти:", -1, 13, 92, 58, 8 LTEXT "", IDC_MEMORYSIZE, 90, 92, 150, 8, SS_NOPREFIX - LTEXT " :", -1, 13, 104, 80, 8 + LTEXT "Строка контроллера:", -1, 13, 104, 80, 8 LTEXT "", IDC_ADAPTERSTRING, 90, 104, 150, 8, SS_NOPREFIX - LTEXT " BIOS:", -1, 13, 116, 67, 8 + LTEXT "Сведения о BIOS:", -1, 13, 116, 67, 8 LTEXT "", IDC_BIOSINFORMATION, 90, 116, 150, 8, SS_NOPREFIX - PUSHBUTTON "& ...", IDC_LISTALLMODES, 7, 139, 95, 14 + PUSHBUTTON "&Список всех режимов...", IDC_LISTALLMODES, 7, 139, 95, 14 END IDD_LISTALLMODES DIALOGEX 0, 0, 225, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME -CAPTION " " +CAPTION "Список всех режимов" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK", IDOK, 112, 115, 50, 15 - PUSHBUTTON "", IDCANCEL, 167, 115, 50, 15 - GROUPBOX " ", -1, 6, 7, 212, 98 + PUSHBUTTON "Отмена", IDCANCEL, 167, 115, 50, 15 + GROUPBOX "Список допустимых режимов", -1, 6, 7, 212, 98 LISTBOX IDC_ALLVALIDMODES, 10, 20, 204, 87, LBS_NOTIFY | WS_VSCROLL END STRINGTABLE BEGIN - IDS_MODEFMT "%d %d, %s, %s" - IDS_DEFREFRESHRATE " " - IDES_REFRESHRATEFMT "%d " - IDS_4BPP "16 " - IDS_8BPP "256 " - IDS_15BPP " (15 )" - IDS_16BPP " (16 )" - IDS_24BPP " (24 )" - IDS_32BPP " (32 )" + IDS_MODEFMT "%d от %d, %s, %s" + IDS_DEFREFRESHRATE "частота по умолчанию" + IDES_REFRESHRATEFMT "%d Гц" + IDS_4BPP "16 цветов" + IDS_8BPP "256 цветов" + IDS_15BPP "Высокое (15 бит)" + IDS_16BPP "Высокое (16 бит)" + IDS_24BPP "Самое высокое (24 бита)" + IDS_32BPP "Самое высокое (32 бита)" END diff --git a/dll/shellext/deskadp/lang/uk-UA.rc b/dll/shellext/deskadp/lang/uk-UA.rc index 20138f29dbb..d3bcbb4d983 100644 --- a/dll/shellext/deskadp/lang/uk-UA.rc +++ b/dll/shellext/deskadp/lang/uk-UA.rc @@ -10,47 +10,47 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_DISPLAYADAPTER DIALOGEX 0, 0, 252, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Адаптер" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", -1, 7, 3, 237, 50 + GROUPBOX "Тип адаптера", -1, 7, 3, 237, 50 LTEXT "", IDC_ADAPTERNAME, 40, 17, 190, 20, SS_NOPREFIX - PUSHBUTTON "&", IDC_ADAPTERPROPERTIES, 177, 33, 59, 14 - GROUPBOX "³ ", -1, 7, 56, 237, 75 - LTEXT " :", -1, 13, 68, 58, 8 + PUSHBUTTON "В&ластивості", IDC_ADAPTERPROPERTIES, 177, 33, 59, 14 + GROUPBOX "Відомості про адаптер", -1, 7, 56, 237, 75 + LTEXT "Тип мікросхем:", -1, 13, 68, 58, 8 LTEXT "", IDC_CHIPTYPE, 78, 68, 160, 8, SS_NOPREFIX - LTEXT " :", -1, 13, 80, 58, 8 + LTEXT "Тип ЦАП:", -1, 13, 80, 58, 8 LTEXT "", IDC_DACTYPE, 78, 80, 160, 8, SS_NOPREFIX - LTEXT "' ':", -1, 13, 92, 58, 8 + LTEXT "Об'єм пам'яті:", -1, 13, 92, 58, 8 LTEXT "", IDC_MEMORYSIZE, 78, 92, 160, 8, SS_NOPREFIX - LTEXT " :", -1, 13, 104, 80, 8 + LTEXT "Рядок контролера:", -1, 13, 104, 80, 8 LTEXT "", IDC_ADAPTERSTRING, 78, 104, 160, 8, SS_NOPREFIX - LTEXT "³ BIOS:", -1, 13, 116, 80, 8 + LTEXT "Відомості про BIOS:", -1, 13, 116, 80, 8 LTEXT "", IDC_BIOSINFORMATION, 78, 116, 160, 8, SS_NOPREFIX - PUSHBUTTON "& ...", IDC_LISTALLMODES, 7, 139, 80, 14 + PUSHBUTTON "&Список усіх режимів...", IDC_LISTALLMODES, 7, 139, 80, 14 END IDD_LISTALLMODES DIALOGEX 0, 0, 225, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME -CAPTION " " +CAPTION "Список усіх режимів" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK", IDOK, 112, 115, 50, 15 - PUSHBUTTON "", IDCANCEL, 167, 115, 50, 15 - GROUPBOX " ", -1, 6, 7, 212, 98 + PUSHBUTTON "Скасувати", IDCANCEL, 167, 115, 50, 15 + GROUPBOX "Список припустимих режимів", -1, 6, 7, 212, 98 LISTBOX IDC_ALLVALIDMODES, 10, 20, 204, 87, LBS_NOTIFY | WS_VSCROLL END STRINGTABLE BEGIN - IDS_MODEFMT "%d %d, %s, %s" - IDS_DEFREFRESHRATE " " - IDES_REFRESHRATEFMT "%d " - IDS_4BPP "16 " - IDS_8BPP "256 " - IDS_15BPP "High Color (15 )" - IDS_16BPP "High Color (16 )" - IDS_24BPP "True Color (24 )" - IDS_32BPP "True Color (32 )" + IDS_MODEFMT "%d на %d, %s, %s" + IDS_DEFREFRESHRATE "частота за замовчуванням" + IDES_REFRESHRATEFMT "%d Гц" + IDS_4BPP "16 кольорів" + IDS_8BPP "256 кольорів" + IDS_15BPP "High Color (15 біт)" + IDS_16BPP "High Color (16 біт)" + IDS_24BPP "True Color (24 біти)" + IDS_32BPP "True Color (32 біти)" END diff --git a/dll/shellext/deskadp/rsrc.rc b/dll/shellext/deskadp/rsrc.rc index 29c114efc6a..d3ba25bf515 100644 --- a/dll/shellext/deskadp/rsrc.rc +++ b/dll/shellext/deskadp/rsrc.rc @@ -11,7 +11,10 @@ #include "lang/fr-FR.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/dll/shellext/deskmon/CMakeLists.txt b/dll/shellext/deskmon/CMakeLists.txt index c03afabbc07..9f358bc90f5 100644 --- a/dll/shellext/deskmon/CMakeLists.txt +++ b/dll/shellext/deskmon/CMakeLists.txt @@ -10,7 +10,7 @@ list(APPEND SOURCE deskmon.rc ${CMAKE_CURRENT_BINARY_DIR}/deskmon.def) -add_library(deskmon SHARED ${CMAKE_CURRENT_BINARY_DIR}/deskmon_precomp.h.gch ${SOURCE}) +add_library(deskmon SHARED ${SOURCE}) set_module_type(deskmon win32dll) @@ -25,6 +25,6 @@ add_importlibs(deskmon kernel32 ntdll) -add_pch(deskmon ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(deskmon precomp.h) add_cd_file(TARGET deskmon DESTINATION reactos/system32 FOR all) diff --git a/dll/shellext/deskmon/lang/pl-PL.rc b/dll/shellext/deskmon/lang/pl-PL.rc index e925622d4e1..8ddfc3a9f84 100644 --- a/dll/shellext/deskmon/lang/pl-PL.rc +++ b/dll/shellext/deskmon/lang/pl-PL.rc @@ -1,7 +1,9 @@ -/* translated by Caemyr - Olaf Siejka (Jan, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; +/* + * translated by Caemyr - Olaf Siejka (Jan, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -14,15 +16,15 @@ BEGIN GROUPBOX "Typ monitora", -1, 7, 3, 237, 52 LTEXT "", IDC_MONITORNAME, 40, 17, 190, 20, SS_NOPREFIX LISTBOX IDC_MONITORLIST, 40, 13, 196, 30, WS_VSCROLL - PUSHBUTTON "&Waciwoci", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED + PUSHBUTTON "&Właściwości", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED GROUPBOX "Ustawienia monitora", IDS_MONITORSETTINGSGROUP, 7, 58, 237, 63 - LTEXT "&Czstotliwoi odwieania ekranu:", IDS_REFRESHRATELABEL, 13, 73, 225, 8 + LTEXT "&Częstotliwośći odświeżania ekranu:", IDS_REFRESHRATELABEL, 13, 73, 225, 8 COMBOBOX IDC_REFRESHRATE, 13, 85, 225, 200, WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT - AUTOCHECKBOX "&Ukryj tryby ktrych monitor n ie moe wywietli", IDC_PRUNINGCHECK, 13, 106, 225, 10 + AUTOCHECKBOX "&Ukryj tryby których monitor nie może wyświetlić", IDC_PRUNINGCHECK, 13, 106, 225, 10 END STRINGTABLE BEGIN - IDS_USEDEFFRQUENCY "Uyj domylnych ustawie sprztu" - IDS_FREQFMT "%u Hercw" + IDS_USEDEFFRQUENCY "Użyj domyślnych ustawień sprzętu" + IDS_FREQFMT "%u Herców" END diff --git a/dll/shellext/deskmon/lang/ru-RU.rc b/dll/shellext/deskmon/lang/ru-RU.rc index aaa0232c24c..2eaf18f63d4 100644 --- a/dll/shellext/deskmon/lang/ru-RU.rc +++ b/dll/shellext/deskmon/lang/ru-RU.rc @@ -2,21 +2,21 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_MONITOR DIALOGEX 0, 0, 252, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Монитор" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", -1, 7, 3, 237, 52 + GROUPBOX "Тип монитора", -1, 7, 3, 237, 52 LTEXT "", IDC_MONITORNAME, 40, 17, 190, 20, SS_NOPREFIX LISTBOX IDC_MONITORLIST, 40, 13, 196, 30, WS_VSCROLL - PUSHBUTTON "&", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED - GROUPBOX " ", IDS_MONITORSETTINGSGROUP, 7, 58, 237, 63 - LTEXT "& :", IDS_REFRESHRATELABEL, 13, 73, 225, 8 + PUSHBUTTON "&Свойства", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED + GROUPBOX "Параметры монитора", IDS_MONITORSETTINGSGROUP, 7, 58, 237, 63 + LTEXT "&Частота обновления экрана:", IDS_REFRESHRATELABEL, 13, 73, 225, 8 COMBOBOX IDC_REFRESHRATE, 13, 85, 225, 200, WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT - AUTOCHECKBOX "& , ", IDC_PRUNINGCHECK, 13, 106, 225, 10 + AUTOCHECKBOX "&Скрыть режимы, которые монитор не может использовать", IDC_PRUNINGCHECK, 13, 106, 225, 10 END STRINGTABLE BEGIN - IDS_USEDEFFRQUENCY " " - IDS_FREQFMT "%u " + IDS_USEDEFFRQUENCY "Использовать параметры оборудования по умолчанию" + IDS_FREQFMT "%u Гц" END diff --git a/dll/shellext/deskmon/lang/uk-UA.rc b/dll/shellext/deskmon/lang/uk-UA.rc index 3d62771b8ff..868896c46db 100644 --- a/dll/shellext/deskmon/lang/uk-UA.rc +++ b/dll/shellext/deskmon/lang/uk-UA.rc @@ -10,21 +10,21 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_MONITOR DIALOGEX 0, 0, 252, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Монітор" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", -1, 7, 3, 237, 52 + GROUPBOX "Тип монітора", -1, 7, 3, 237, 52 LTEXT "", IDC_MONITORNAME, 40, 17, 190, 20, SS_NOPREFIX LISTBOX IDC_MONITORLIST, 40, 13, 196, 30, WS_VSCROLL - PUSHBUTTON "&", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED - GROUPBOX " ", IDS_MONITORSETTINGSGROUP, 7, 58, 237, 63 - LTEXT "& :", IDS_REFRESHRATELABEL, 13, 73, 225, 8 + PUSHBUTTON "В&ластивості", IDC_MONITORPROPERTIES, 177, 35, 59, 14, WS_DISABLED + GROUPBOX "Параметри монітора", IDS_MONITORSETTINGSGROUP, 7, 58, 237, 63 + LTEXT "&Частота оновлення екрана:", IDS_REFRESHRATELABEL, 13, 73, 225, 8 COMBOBOX IDC_REFRESHRATE, 13, 85, 225, 200, WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT - AUTOCHECKBOX "& , ", IDC_PRUNINGCHECK, 13, 106, 225, 10 + AUTOCHECKBOX "&Приховати режими, які монітор не може використовувати", IDC_PRUNINGCHECK, 13, 106, 225, 10 END STRINGTABLE BEGIN - IDS_USEDEFFRQUENCY " " - IDS_FREQFMT "%u " + IDS_USEDEFFRQUENCY "Значення за замовчуванням" + IDS_FREQFMT "%u Гц" END diff --git a/dll/shellext/deskmon/rsrc.rc b/dll/shellext/deskmon/rsrc.rc index 55f9f572f39..d3ba25bf515 100644 --- a/dll/shellext/deskmon/rsrc.rc +++ b/dll/shellext/deskmon/rsrc.rc @@ -12,6 +12,9 @@ #include "lang/it-IT.rc" #include "lang/no-NO.rc" #include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/shellext/slayer/CMakeLists.txt b/dll/shellext/slayer/CMakeLists.txt index 5830f4649a0..8c7d92a9d16 100644 --- a/dll/shellext/slayer/CMakeLists.txt +++ b/dll/shellext/slayer/CMakeLists.txt @@ -9,7 +9,7 @@ list(APPEND SOURCE slayer.rc ${CMAKE_CURRENT_BINARY_DIR}/slayer.def) -add_library(slayer SHARED ${CMAKE_CURRENT_BINARY_DIR}/slayer_precomp.h.gch ${SOURCE}) +add_library(slayer SHARED ${SOURCE}) set_module_type(slayer win32dll) @@ -25,6 +25,6 @@ add_importlibs(slayer kernel32 ntdll) -add_pch(slayer ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(slayer precomp.h) add_cd_file(TARGET slayer DESTINATION reactos/system32 FOR all) diff --git a/dll/shellext/slayer/lang/pl-PL.rc b/dll/shellext/slayer/lang/pl-PL.rc index 981f1212da6..7f8cde2ac42 100644 --- a/dll/shellext/slayer/lang/pl-PL.rc +++ b/dll/shellext/slayer/lang/pl-PL.rc @@ -1,33 +1,36 @@ -// Polish resources by Sebastian Gasiorek (2005-07-10) +/* + * translated by Sebastian Gasiorek + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_SLAYERSHEET DIALOGEX 0, 0, 224, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Zgodno" +CAPTION "Zgodność" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Jeeli masz problemy z uruchamianiem tego programu w ReactOS, wybierz system operacyjny, ktry ReactOS powinien zgasza aplikacji.", -1, 7,7,210,31 - GROUPBOX "Tryb zgodnoci", IDC_COMPATGROUP, 7,41,210,49 - CHECKBOX "Uruchom ten program w trybie zgodnoci z:", IDC_CHKRUNCOMPATIBILITY, 18,57,188,10, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "Jeżeli masz problemy z uruchamianiem tego programu w ReactOS, wybierz system operacyjny, który ReactOS powinien zgłaszać aplikacji.", -1, 7,7,210,31 + GROUPBOX "Tryb zgodności", IDC_COMPATGROUP, 7,41,210,49 + CHECKBOX "Uruchom ten program w trybie zgodności z:", IDC_CHKRUNCOMPATIBILITY, 18,57,188,10, BS_AUTOCHECKBOX | WS_TABSTOP COMBOBOX IDC_COMPATIBILITYMODE, 18,70,188,85, CBS_HASSTRINGS | CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED GROUPBOX "Ustawienia ekranu", -1, 7,99,210,61, BS_GROUPBOX | WS_DISABLED CHECKBOX "Uruchom w 256 kolorach", IDC_CHKRUNIN256COLORS, 18,114,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - CHECKBOX "Uruchom w rozdzielczoci ekranu 640x480", IDC_CHKRUNIN640480RES, 18,129,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - CHECKBOX "Wycz kompozycje wizualne", IDC_CHKDISABLEVISUALTHEMES, 18,144,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - PUSHBUTTON "E&dytuj tryby zgodnoci...", IDC_EDITCOMPATIBILITYMODES, 117,167,100,15 - /* CONTROL "Dowiedz si wicej o zgodnoci programw.", IDC_INFOLINK, "SysLink", WS_CHILD | WS_TABSTOP | WS_VISIBLE, 7,207,210,10, WS_EX_NOPARENTNOTIFY */ + CHECKBOX "Uruchom w rozdzielczości ekranu 640x480", IDC_CHKRUNIN640480RES, 18,129,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + CHECKBOX "Wyłącz kompozycje wizualne", IDC_CHKDISABLEVISUALTHEMES, 18,144,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + PUSHBUTTON "E&dytuj tryby zgodności...", IDC_EDITCOMPATIBILITYMODES, 117,167,100,15 + /* CONTROL "Dowiedz się więcej o zgodności programów.", IDC_INFOLINK, "SysLink", WS_CHILD | WS_TABSTOP | WS_VISIBLE, 7,207,210,10, WS_EX_NOPARENTNOTIFY */ END IDD_EDITCOMPATIBILITYMODES DIALOGEX 0, 0, 230, 139 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Edycja trybw zgodnoci" +CAPTION "Edycja trybów zgodności" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LISTBOX IDC_COMPATIBILITYMODE, 9,6,148,108, LBS_NOTIFY | LBS_WANTKEYBOARDINPUT | WS_BORDER PUSHBUTTON "&Dodaj...", IDC_ADD, 162,6,60,14, WS_DISABLED PUSHBUTTON "&Edytuj...", IDC_EDIT, 162,24,60,14, WS_DISABLED - PUSHBUTTON "&Usu", IDC_DELETE, 162,42,60,14, WS_DISABLED + PUSHBUTTON "&Usuń", IDC_DELETE, 162,42,60,14, WS_DISABLED PUSHBUTTON "&OK", IDOK, 95,116,60,14 PUSHBUTTON "&Anuluj", IDCANCEL, 162,116,60,14 END @@ -35,6 +38,6 @@ END STRINGTABLE BEGIN IDS_SLAYER "Slayer" - IDS_DESCRIPTION "Application Compatibility Layer Shell Extension" + IDS_DESCRIPTION "Warstwa kompatybilności programów w powłoce systemu ReactOS" END diff --git a/dll/shellext/slayer/lang/ru-RU.rc b/dll/shellext/slayer/lang/ru-RU.rc index a96818ffade..9218a96d3f9 100644 --- a/dll/shellext/slayer/lang/ru-RU.rc +++ b/dll/shellext/slayer/lang/ru-RU.rc @@ -9,32 +9,32 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_SLAYERSHEET DIALOGEX 0, 0, 224, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Совместимость" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " , ReactOS ", -1, 7,7,210,31 - GROUPBOX " ", IDC_COMPATGROUP, 7,41,210,49 - CHECKBOX " :", IDC_CHKRUNCOMPATIBILITY, 18,57,188,10, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "При возникновении проблем выберите, какую операционную систему должна имитировать ReactOS для этой программы", -1, 7,7,210,31 + GROUPBOX "Режим совместимости", IDC_COMPATGROUP, 7,41,210,49 + CHECKBOX "Запускать в режиме совместимости для:", IDC_CHKRUNCOMPATIBILITY, 18,57,188,10, BS_AUTOCHECKBOX | WS_TABSTOP COMBOBOX IDC_COMPATIBILITYMODE, 18,70,188,85, CBS_HASSTRINGS | CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED - GROUPBOX " ", -1, 7,99,210,61, BS_GROUPBOX | WS_DISABLED - CHECKBOX "256 ", IDC_CHKRUNIN256COLORS, 18,114,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - CHECKBOX " 640x480", IDC_CHKRUNIN640480RES, 18,129,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - CHECKBOX " ", IDC_CHKDISABLEVISUALTHEMES, 18,144,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - PUSHBUTTON "& ...", IDC_EDITCOMPATIBILITYMODES, 117,167,100,15 + GROUPBOX "Настройки экрана", -1, 7,99,210,61, BS_GROUPBOX | WS_DISABLED + CHECKBOX "256 цветов", IDC_CHKRUNIN256COLORS, 18,114,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + CHECKBOX "Разрешение 640x480", IDC_CHKRUNIN640480RES, 18,129,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + CHECKBOX "Запрещать визуальные темы", IDC_CHKDISABLEVISUALTHEMES, 18,144,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + PUSHBUTTON "&Режимы совместимости...", IDC_EDITCOMPATIBILITYMODES, 117,167,100,15 /* CONTROL "Learn more about program compatibility.", IDC_INFOLINK, "SysLink", WS_CHILD | WS_TABSTOP | WS_VISIBLE, 7,207,210,10, WS_EX_NOPARENTNOTIFY */ END IDD_EDITCOMPATIBILITYMODES DIALOGEX 0, 0, 230, 139 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Правка режимов совместимости" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LISTBOX IDC_COMPATIBILITYMODE, 9,6,148,108, LBS_NOTIFY | LBS_WANTKEYBOARDINPUT | WS_BORDER - PUSHBUTTON "&...", IDC_ADD, 162,6,60,14, WS_DISABLED - PUSHBUTTON "&...", IDC_EDIT, 162,24,60,14, WS_DISABLED - PUSHBUTTON "&", IDC_DELETE, 162,42,60,14, WS_DISABLED + PUSHBUTTON "&Добавить...", IDC_ADD, 162,6,60,14, WS_DISABLED + PUSHBUTTON "&Изменить...", IDC_EDIT, 162,24,60,14, WS_DISABLED + PUSHBUTTON "&Удалить", IDC_DELETE, 162,42,60,14, WS_DISABLED PUSHBUTTON "&OK", IDOK, 95,116,60,14 - PUSHBUTTON "&", IDCANCEL, 162,116,60,14 + PUSHBUTTON "&Отмена", IDCANCEL, 162,116,60,14 END STRINGTABLE diff --git a/dll/shellext/slayer/lang/uk-UA.rc b/dll/shellext/slayer/lang/uk-UA.rc index 69295b5da78..4dd2462ae59 100644 --- a/dll/shellext/slayer/lang/uk-UA.rc +++ b/dll/shellext/slayer/lang/uk-UA.rc @@ -10,37 +10,37 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_SLAYERSHEET DIALOGEX 0, 0, 224, 226 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Сумісність" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS, .", -1, 7,7,210,31 - GROUPBOX " ", IDC_COMPATGROUP, 7,41,210,49 - CHECKBOX " :", IDC_CHKRUNCOMPATIBILITY, 18,57,188,10, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "Якщо у Вас виникли проблеми із запуском цієї програми у ReactOS, виберіть режим сумісності з потрібною версією ОС.", -1, 7,7,210,31 + GROUPBOX "Режим сумісності", IDC_COMPATGROUP, 7,41,210,49 + CHECKBOX "Запускати програму в режимі сумісності для:", IDC_CHKRUNCOMPATIBILITY, 18,57,188,10, BS_AUTOCHECKBOX | WS_TABSTOP COMBOBOX IDC_COMPATIBILITYMODE, 18,70,188,85, CBS_HASSTRINGS | CBS_DROPDOWNLIST | WS_TABSTOP | WS_DISABLED - GROUPBOX " ", -1, 7,99,210,61, BS_GROUPBOX | WS_DISABLED - CHECKBOX "256 ", IDC_CHKRUNIN256COLORS, 18,114,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - CHECKBOX " 640x480", IDC_CHKRUNIN640480RES, 18,129,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - CHECKBOX " ", IDC_CHKDISABLEVISUALTHEMES, 18,144,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED - PUSHBUTTON "& ...", IDC_EDITCOMPATIBILITYMODES, 117,167,100,15 + GROUPBOX "Настройки екрану", -1, 7,99,210,61, BS_GROUPBOX | WS_DISABLED + CHECKBOX "256 кольорів", IDC_CHKRUNIN256COLORS, 18,114,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + CHECKBOX "Роздільна здатність 640x480", IDC_CHKRUNIN640480RES, 18,129,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + CHECKBOX "Вимикати візуальні теми", IDC_CHKDISABLEVISUALTHEMES, 18,144,188,10, BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED + PUSHBUTTON "&Режими сумісності...", IDC_EDITCOMPATIBILITYMODES, 117,167,100,15 /* CONTROL "Learn more about program compatibility.", IDC_INFOLINK, "SysLink", WS_CHILD | WS_TABSTOP | WS_VISIBLE, 7,207,210,10, WS_EX_NOPARENTNOTIFY */ END IDD_EDITCOMPATIBILITYMODES DIALOGEX 0, 0, 230, 139 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Редагування режимів сумісності" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN LISTBOX IDC_COMPATIBILITYMODE, 9,6,148,108, LBS_NOTIFY | LBS_WANTKEYBOARDINPUT | WS_BORDER - PUSHBUTTON "&...", IDC_ADD, 162,6,60,14, WS_DISABLED - PUSHBUTTON "&...", IDC_EDIT, 162,24,60,14, WS_DISABLED - PUSHBUTTON "&", IDC_DELETE, 162,42,60,14, WS_DISABLED + PUSHBUTTON "&Додати...", IDC_ADD, 162,6,60,14, WS_DISABLED + PUSHBUTTON "&Редагувати...", IDC_EDIT, 162,24,60,14, WS_DISABLED + PUSHBUTTON "В&идалити", IDC_DELETE, 162,42,60,14, WS_DISABLED PUSHBUTTON "&OK", IDOK, 95,116,60,14 - PUSHBUTTON "&", IDCANCEL, 162,116,60,14 + PUSHBUTTON "&Скасувати", IDCANCEL, 162,116,60,14 END STRINGTABLE BEGIN IDS_SLAYER "Slayer" - IDS_DESCRIPTION " " + IDS_DESCRIPTION "Розширеня оболонки для Прошарка сумісності програм" END diff --git a/dll/shellext/slayer/rsrc.rc b/dll/shellext/slayer/rsrc.rc index fb3c0393bdc..b46f9036867 100644 --- a/dll/shellext/slayer/rsrc.rc +++ b/dll/shellext/slayer/rsrc.rc @@ -13,8 +13,11 @@ #include "lang/it-IT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/CMakeLists.txt b/dll/win32/CMakeLists.txt index 42e04b54dcb..24b2783315c 100644 --- a/dll/win32/CMakeLists.txt +++ b/dll/win32/CMakeLists.txt @@ -43,7 +43,7 @@ add_subdirectory(getuname) add_subdirectory(glu32) add_subdirectory(hhctrl.ocx) add_subdirectory(hid) -add_subdirectory(hlink) +add_subdirectory(hlink) # FIXME: msvc build. add_subdirectory(hnetcfg) add_subdirectory(httpapi) add_subdirectory(iccvid) @@ -58,7 +58,9 @@ add_subdirectory(inseng) add_subdirectory(iphlpapi) #add_subdirectory(iprtprio) # not built in trunk add_subdirectory(itircl) -add_subdirectory(itss) +if(NOT MSVC) + add_subdirectory(itss) # FIXME: msvc build. +endif() add_subdirectory(jscript) add_subdirectory(kernel32) add_subdirectory(loadperf) @@ -90,15 +92,17 @@ add_subdirectory(msg711.acm) add_subdirectory(msgina) add_subdirectory(msgsm32.acm) if(NOT MSVC) -add_subdirectory(mshtml) -add_subdirectory(mshtml.tlb) + #FIXME: msvc build. + add_subdirectory(mshtml) endif() add_subdirectory(msi) +add_subdirectory(mshtml.tlb) add_subdirectory(msimg32) add_subdirectory(msimtf) add_subdirectory(msisip) add_subdirectory(msisys.ocx) #add_subdirectory(msnet32) #to be deleted in trunk. +add_subdirectory(msports) add_subdirectory(msrle32) add_subdirectory(mssign32) add_subdirectory(mssip32) @@ -109,7 +113,9 @@ add_subdirectory(msvcrt) add_subdirectory(msvfw32) add_subdirectory(msvidc32) add_subdirectory(mswsock) -add_subdirectory(msxml3) +if(NOT MSVC) + add_subdirectory(msxml3) # FIXME: msvc build. +endif() add_subdirectory(nddeapi) add_subdirectory(netapi32) add_subdirectory(netcfgx) @@ -139,7 +145,9 @@ add_subdirectory(powrprof) add_subdirectory(printui) add_subdirectory(psapi) add_subdirectory(pstorec) -add_subdirectory(qmgr) +if(NOT MSVC) + add_subdirectory(qmgr) # FIXME: msvc build. +endif() add_subdirectory(qmgrprxy) add_subdirectory(query) add_subdirectory(rasadhlp) @@ -177,7 +185,9 @@ add_subdirectory(softpub) add_subdirectory(spoolss) add_subdirectory(srclient) add_subdirectory(stdole2.tlb) -add_subdirectory(stdole32.tlb) +if(NOT MSVC) + add_subdirectory(stdole32.tlb) # FIXME: msvc build. +endif() add_subdirectory(sti) add_subdirectory(sxs) add_subdirectory(syssetup) diff --git a/dll/win32/aclui/CMakeLists.txt b/dll/win32/aclui/CMakeLists.txt index c41fcc3d89c..41f8009a3bb 100644 --- a/dll/win32/aclui/CMakeLists.txt +++ b/dll/win32/aclui/CMakeLists.txt @@ -14,9 +14,7 @@ list(APPEND SOURCE aclui.rc ${CMAKE_CURRENT_BINARY_DIR}/aclui.def) -add_library(aclui SHARED - ${CMAKE_CURRENT_BINARY_DIR}/aclui_precomp.h.gch - ${SOURCE}) +add_library(aclui SHARED ${SOURCE}) set_module_type(aclui win32dll) @@ -24,6 +22,6 @@ add_importlib_target(aclui.spec) add_importlibs(aclui user32 gdi32 comctl32 ole32 oleaut32 advapi32 uxtheme msvcrt kernel32 ntdll) -add_pch(aclui ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(aclui precomp.h) add_cd_file(TARGET aclui DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/aclui/aclui.rc b/dll/win32/aclui/aclui.rc index fee7b625fe2..c197805cf5c 100644 --- a/dll/win32/aclui/aclui.rc +++ b/dll/win32/aclui/aclui.rc @@ -23,7 +23,10 @@ IDB_USRGRPIMAGES BITMAP "res/usrgrp.bmp" #include "aclui_Nl.rc" #include "aclui_No.rc" #include "aclui_Pl.rc" -#include "aclui_Ru.rc" #include "aclui_Sv.rc" #include "aclui_Th.rc" + +// UTF-8 +#pragma code_page(65001) +#include "aclui_Ru.rc" #include "aclui_Uk.rc" diff --git a/dll/win32/aclui/aclui_Ru.rc b/dll/win32/aclui/aclui_Ru.rc index 3cebdcfeca6..318b1d9d82b 100644 --- a/dll/win32/aclui/aclui_Ru.rc +++ b/dll/win32/aclui/aclui_Ru.rc @@ -2,28 +2,28 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_SECPAGE DIALOGEX 0, 0, 227, 215 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Безопасность" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "& :", -1, 7, 7, 105, 8 + LTEXT "&Имя группы или пользователя:", -1, 7, 7, 105, 8 CONTROL "", IDC_PRINCIPALS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 17, 213, 66, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE - PUSHBUTTON "&...", IDC_ADD_PRINCIPAL, 116, 87, 50, 14 - PUSHBUTTON "&", IDC_REMOVE_PRINCIPAL, 170, 87, 50, 14 + PUSHBUTTON "До&бавить...", IDC_ADD_PRINCIPAL, 116, 87, 50, 14 + PUSHBUTTON "&Удалить", IDC_REMOVE_PRINCIPAL, 170, 87, 50, 14 LTEXT "", IDC_LABEL_PERMISSIONS_FOR, 7, 107, 105, 8, SS_LEFT | SS_NOPREFIX - LTEXT "", IDC_LABEL_ALLOW, 130, 107, 40, 8, SS_CENTER - LTEXT "", IDC_LABEL_DENY, 176, 107, 40, 8, SS_CENTER + LTEXT "Разрешить", IDC_LABEL_ALLOW, 130, 107, 40, 8, SS_CENTER + LTEXT "Запретить", IDC_LABEL_DENY, 176, 107, 40, 8, SS_CENTER CONTROL "", IDC_ACE_CHECKLIST, "CHECKLIST_ACLUI", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 117, 213, 72, WS_EX_CLIENTEDGE - LTEXT " , :", IDC_LABEL_ADVANCED, 7, 194, 153, 16, SS_LEFT - PUSHBUTTON "&", IDC_ADVANCED, 160, 194, 60, 14 + LTEXT "Чтобы задать особые разрешения или параметры, нажмите эту кнопку:", IDC_LABEL_ADVANCED, 7, 194, 153, 16, SS_LEFT + PUSHBUTTON "До&полнительно", IDC_ADVANCED, 160, 194, 60, 14 END STRINGTABLE DISCARDABLE { - IDS_PSP_TITLE " %1" - IDS_UNKNOWN "" - IDS_SPECIAL_PERMISSIONS " " - IDS_PERMISSIONS_FOR " %1" - IDS_PERMISSIONS "" + IDS_PSP_TITLE "Разрешения для %1" + IDS_UNKNOWN "Неизвестный" + IDS_SPECIAL_PERMISSIONS "Особые разрешения" + IDS_PERMISSIONS_FOR "Разрешения для %1" + IDS_PERMISSIONS "Разрешения" IDS_USERDOMAINFORMAT "%1 (%2\\%3)" IDS_USERFORMAT "%1" } diff --git a/dll/win32/aclui/aclui_Uk.rc b/dll/win32/aclui/aclui_Uk.rc index 9587545c7a8..7d94e81a7da 100644 --- a/dll/win32/aclui/aclui_Uk.rc +++ b/dll/win32/aclui/aclui_Uk.rc @@ -10,30 +10,30 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_SECPAGE DIALOGEX 0, 0, 227, 215 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Безпека" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "& :", -1, 7, 21, 105, 8 + LTEXT "&Групи або користувачі:", -1, 7, 21, 105, 8 CONTROL "", IDC_PRINCIPALS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 31, 213, 52, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE - LTEXT "&:", -1, 7, 7, 49, 8 + LTEXT "&Власник:", -1, 7, 7, 49, 8 EDITTEXT IDC_OWNER, 63, 4, 156, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY - PUSHBUTTON "&...", IDC_ADD_PRINCIPAL, 116, 87, 50, 14 - PUSHBUTTON "&", IDC_REMOVE_PRINCIPAL, 170, 87, 50, 14 + PUSHBUTTON "&Додати...", IDC_ADD_PRINCIPAL, 116, 87, 50, 14 + PUSHBUTTON "В&идалити", IDC_REMOVE_PRINCIPAL, 170, 87, 50, 14 LTEXT "", IDC_LABEL_PERMISSIONS_FOR, 7, 107, 105, 8, SS_LEFT | SS_NOPREFIX - LTEXT "", IDC_LABEL_ALLOW, 133, 107, 36, 8, SS_CENTER - LTEXT "", IDC_LABEL_DENY, 172, 107, 40, 8, SS_CENTER + LTEXT "Дозволити", IDC_LABEL_ALLOW, 133, 107, 36, 8, SS_CENTER + LTEXT "Заборонити", IDC_LABEL_DENY, 172, 107, 40, 8, SS_CENTER CONTROL "", IDC_ACE_CHECKLIST, "CHECKLIST_ACLUI", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 117, 213, 72, WS_EX_CLIENTEDGE - LTEXT " , .", IDC_LABEL_ADVANCED, 7, 194, 153, 16, SS_LEFT - PUSHBUTTON "&", IDC_ADVANCED, 165, 194, 55, 14 + LTEXT "Для задання особливих дозволів або параметрів, натисніть Додатково.", IDC_LABEL_ADVANCED, 7, 194, 153, 16, SS_LEFT + PUSHBUTTON "Дод&атково", IDC_ADVANCED, 165, 194, 55, 14 END STRINGTABLE DISCARDABLE { - IDS_PSP_TITLE " %1" - IDS_UNKNOWN "" - IDS_SPECIAL_PERMISSIONS " " - IDS_PERMISSIONS_FOR " %1" - IDS_PERMISSIONS "" + IDS_PSP_TITLE "Дозволи для %1" + IDS_UNKNOWN "Невідомий" + IDS_SPECIAL_PERMISSIONS "Особливі дозволи" + IDS_PERMISSIONS_FOR "Дозволи для %1" + IDS_PERMISSIONS "Дозволи" IDS_USERDOMAINFORMAT "%1 (%2\\%3)" IDS_USERFORMAT "%1" } diff --git a/dll/win32/actxprxy/CMakeLists.txt b/dll/win32/actxprxy/CMakeLists.txt index 41b0eb8b69d..9faeaf72240 100644 --- a/dll/win32/actxprxy/CMakeLists.txt +++ b/dll/win32/actxprxy/CMakeLists.txt @@ -44,6 +44,7 @@ add_importlibs(actxprxy rpcrt4 ole32 oleaut32 + msvcrt kernel32 ntdll) diff --git a/dll/win32/advapi32/CMakeLists.txt b/dll/win32/advapi32/CMakeLists.txt index 114b75f0b2f..d250c718559 100644 --- a/dll/win32/advapi32/CMakeLists.txt +++ b/dll/win32/advapi32/CMakeLists.txt @@ -45,9 +45,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/advapi32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/advapi32.def) -add_library(advapi32 SHARED - ${CMAKE_CURRENT_BINARY_DIR}/advapi32_advapi32.h.gch - ${SOURCE}) +add_library(advapi32 SHARED ${SOURCE}) set_module_type(advapi32 win32dll) @@ -60,6 +58,6 @@ target_link_libraries(advapi32 add_importlibs(advapi32 rpcrt4 kernel32 ntdll msvcrt) -add_pch(advapi32 ${CMAKE_CURRENT_SOURCE_DIR}/advapi32.h ${SOURCE}) +add_pch(advapi32 advapi32.h) add_cd_file(TARGET advapi32 DESTINATION reactos/system32 FOR all) add_importlib_target(advapi32.spec) diff --git a/dll/win32/authz/CMakeLists.txt b/dll/win32/authz/CMakeLists.txt index bb652abec05..3e5f6573b82 100644 --- a/dll/win32/authz/CMakeLists.txt +++ b/dll/win32/authz/CMakeLists.txt @@ -11,13 +11,11 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/authz_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/authz.def) -add_library(authz SHARED - ${CMAKE_CURRENT_BINARY_DIR}/authz_precomp.h.gch - ${SOURCE}) +add_library(authz SHARED ${SOURCE}) set_module_type(authz win32dll) -add_pch(authz ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) add_importlibs(authz advapi32 msvcrt kernel32 ntdll) +add_pch(authz precomp.h) add_cd_file(TARGET authz DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/avifil32/CMakeLists.txt b/dll/win32/avifil32/CMakeLists.txt index 6edb848c253..d1041cbc50b 100644 --- a/dll/win32/avifil32/CMakeLists.txt +++ b/dll/win32/avifil32/CMakeLists.txt @@ -1,7 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__WINESRC__) remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) diff --git a/dll/win32/avifil32/avifile_Uk.rc b/dll/win32/avifil32/avifile_Uk.rc index f70335e5a19..c66ead3a9ed 100644 --- a/dll/win32/avifil32/avifile_Uk.rc +++ b/dll/win32/avifil32/avifile_Uk.rc @@ -18,35 +18,38 @@ #include "avifile_private.h" +/* UTF-8 */ +#pragma code_page(65001) + LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_SAVEOPTIONS DIALOG 43, 37, 196, 82 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Параметри стиснення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :",-1,2,5,114,10 + LTEXT "&Оберіть потік:",-1,2,5,114,10 COMBOBOX IDC_STREAM,2,18,134,61,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&...",IDC_OPTIONS,145,17,45,14 - AUTOCHECKBOX "& ",IDC_INTERLEAVE,3,42,60,11,WS_TABSTOP + PUSHBUTTON "П&араметри...",IDC_OPTIONS,145,17,45,14 + AUTOCHECKBOX "&Інтервал чергування",IDC_INTERLEAVE,3,42,60,11,WS_TABSTOP EDITTEXT IDC_INTERLEAVEEVERY,66,41,32,12,ES_AUTOHSCROLL - LTEXT "",-1,104,43,36,9 - LTEXT " :",-1,3,56,53,9 - LTEXT " ",IDC_FORMATTEXT,55,56,90,26 + LTEXT "кадрів",-1,104,43,36,9 + LTEXT "Поточний формат:",-1,3,56,53,9 + LTEXT "Це місце здається в оренду",IDC_FORMATTEXT,55,56,90,26 DEFPUSHBUTTON "OK",IDOK,145,42,45,14 - PUSHBUTTON "",IDCANCEL,145,61,45,14 + PUSHBUTTON "Скасувати",IDCANCEL,145,61,45,14 END STRINGTABLE { - IDS_WAVESTREAMFORMAT " : %s" - IDS_WAVEFILETYPE " " - IDS_ALLMULTIMEDIA " " - IDS_ALLFILES " (*.*)@*.*" - IDS_VIDEO "" - IDS_AUDIO "" + IDS_WAVESTREAMFORMAT "Звуковий потік: %s" + IDS_WAVEFILETYPE "Звуковий потік" + IDS_ALLMULTIMEDIA "Усі мультимедійні файли" + IDS_ALLFILES "Усі файли (*.*)@*.*" + IDS_VIDEO "відео" + IDS_AUDIO "аудіо" IDS_AVISTREAMFORMAT "%s %s #%d" - IDS_AVIFILETYPE "Wine AVI- " - IDS_UNCOMPRESSED " " + IDS_AVIFILETYPE "Wine обробник AVI-файлів за замовчуванням" + IDS_UNCOMPRESSED "без стиснення" } diff --git a/dll/win32/avifil32/rsrc.rc b/dll/win32/avifil32/rsrc.rc index c768c84fa6e..09e3f8afa2f 100644 --- a/dll/win32/avifil32/rsrc.rc +++ b/dll/win32/avifil32/rsrc.rc @@ -45,7 +45,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "avifile_Pl.rc" #include "avifile_Sv.rc" #include "avifile_Tr.rc" -#include "avifile_Uk.rc" /* UTF-8 */ #include "avifile_Da.rc" @@ -58,5 +57,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "avifile_Ro.rc" #include "avifile_Ru.rc" #include "avifile_Si.rc" +#include "avifile_Uk.rc" #include "avifile_Zh.rc" #include "avifile_Bg.rc" diff --git a/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt index 7b146884c4d..ca4c40817d3 100644 --- a/dll/win32/browseui/CMakeLists.txt +++ b/dll/win32/browseui/CMakeLists.txt @@ -6,6 +6,10 @@ add_definitions( -D__WINESRC__ -DROS_Headers) +if (MSVC) + add_compiler_flags(/EHa-) +endif() + remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) diff --git a/dll/win32/browseui/browseui.rc b/dll/win32/browseui/browseui.rc index 1dfde6d4c0d..d4223bec0c4 100644 --- a/dll/win32/browseui/browseui.rc +++ b/dll/win32/browseui/browseui.rc @@ -63,7 +63,6 @@ IDR_REGTREEOPTIONS REGISTRY "res/regtreeoptions.rgs" //#include "lang/ko-KR.rc" //#include "lang/nl-NL.rc" //#include "lang/no-NO.rc" -//#include "lang/pl-PL.rc" //#include "lang/pt-BR.rc" //#include "lang/pt-PT.rc" //#include "lang/ro-RO.rc" @@ -72,9 +71,10 @@ IDR_REGTREEOPTIONS REGISTRY "res/regtreeoptions.rgs" //#include "lang/sk-SK.rc" //#include "lang/sv-SE.rc" //#include "lang/tr-TR.rc" -#include "lang/uk-UA.rc" //#include "lang/zh-CN.rc" //#include "lang/zh-TW.rc" /* UTF-8 */ #include "lang/bg-BG.rc" +#include "lang/pl-PL.rc" +#include "lang/uk-UA.rc" diff --git a/dll/win32/browseui/lang/bg-BG.rc b/dll/win32/browseui/lang/bg-BG.rc index ba762f9a089..7cab11cfb5e 100644 --- a/dll/win32/browseui/lang/bg-BG.rc +++ b/dll/win32/browseui/lang/bg-BG.rc @@ -16,9 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/* UTF-8 */ -#pragma code_page(65001) - LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT ///////////////////////////////////////////////////////////////////////////// @@ -26,14 +23,14 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT // Menus // -IDM_CABINET_CONTEXTMENU MENUEX +IDM_CABINET_CONTEXTMENU MENUEX BEGIN POPUP "", 264,MFT_STRING,MFS_ENABLED BEGIN MENUITEM "&Обичайни бутони", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED MENUITEM "&Адресна лента", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED MENUITEM "&Връзки", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED - MENUITEM SEPARATOR + MENUITEM "", -1, MFT_SEPARATOR MENUITEM "Заключване на лентите с &пособия", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED MENUITEM "&Нагласяване...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED MENUITEM "&Текстови етикети", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED @@ -123,7 +120,7 @@ END // Accelerator // -IDR_ACCELERATORS ACCELERATORS +IDR_ACCELERATORS ACCELERATORS BEGIN VK_F5, IDM_VIEW_REFRESH, VIRTKEY, NOINVERT VK_F5, IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT @@ -145,50 +142,50 @@ END // Strings // -STRINGTABLE +STRINGTABLE BEGIN 800 "Съдържа заповеди за обработка на избраните предмети." END -STRINGTABLE +STRINGTABLE BEGIN 864 "Съдържа заповеди за обработка." END -STRINGTABLE +STRINGTABLE BEGIN 928 "Съдържа заповеди за обработка на изгледа." END -STRINGTABLE +STRINGTABLE BEGIN 992 "Съдържа заповеди за пособията." END -STRINGTABLE +STRINGTABLE BEGIN 1056 "Съсържа заповеди за показване на помощ." END -STRINGTABLE +STRINGTABLE BEGIN 9025 "Затваря прозореца." 9026 "Отива равнище нагоре." END -STRINGTABLE +STRINGTABLE BEGIN 9121 "Свърване към мрежово устройство." 9122 "Разкачане от мрежово устройство." END -STRINGTABLE +STRINGTABLE BEGIN 9250 "Показва сведения за програмата, версия и възпроизводствени права." 9252 "Показва сведения за проследяване на недъзи." END -STRINGTABLE +STRINGTABLE BEGIN 9281 "Отива на предходната страница." 9282 "Отива на следващата страница." @@ -196,13 +193,13 @@ BEGIN 9285 "Отива в началната ви страница." END -STRINGTABLE +STRINGTABLE BEGIN 9362 "Отваря папката с любимките." 9363 "Добавя текущата страница към списъка с любимките." END -STRINGTABLE +STRINGTABLE BEGIN 9505 "Скрива или показва лентите с пособия." 9506 "Скрива или показва лентата на състоянието." @@ -212,12 +209,12 @@ BEGIN 9516 "Заключване на размерите и разположението на лентите с пособия." END -STRINGTABLE +STRINGTABLE BEGIN 9533 "Нагласяване на лентата с пособия." END -STRINGTABLE +STRINGTABLE BEGIN 9552 "Показване или скриване на лентата на изследователя." 9553 "Показване на лентата за търсене." @@ -227,50 +224,48 @@ BEGIN 9559 "Показване на медийната лента." END -STRINGTABLE +STRINGTABLE BEGIN IDS_SMALLICONS "Малки значета" IDS_LARGEICONS "Големи значета" IDS_SHOWTEXTLABELS "Показване на текстови етикети" END -STRINGTABLE +STRINGTABLE BEGIN IDS_NOTEXTLABELS "Липсват текстови етикети" IDS_SELECTIVETEXTONRIGHT "Selective text on right" END -STRINGTABLE +STRINGTABLE BEGIN IDS_GOBUTTONLABEL "|Отиване||" IDS_GOBUTTONTIPTEMPLATE "Отиване в""%s""" END -STRINGTABLE +STRINGTABLE BEGIN IDS_SEARCHLABEL "Търсене" IDS_ADDRESSBANDLABEL "&Адрес" END -STRINGTABLE +STRINGTABLE BEGIN IDS_FOLDERSLABEL "Папки" END -STRINGTABLE +STRINGTABLE BEGIN IDS_HISTORYTEXT "&Дневник\tCtrl+H" END -STRINGTABLE +STRINGTABLE BEGIN IDS_UP "Нагоре" END -STRINGTABLE +STRINGTABLE BEGIN IDS_BACK "Назад" IDS_FORWARD "Напред" END - - diff --git a/dll/win32/browseui/lang/en-US.rc b/dll/win32/browseui/lang/en-US.rc index 03696ad3656..edf5ca42bd7 100644 --- a/dll/win32/browseui/lang/en-US.rc +++ b/dll/win32/browseui/lang/en-US.rc @@ -23,14 +23,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Menus // -IDM_CABINET_CONTEXTMENU MENUEX +IDM_CABINET_CONTEXTMENU MENUEX BEGIN POPUP "", 264,MFT_STRING,MFS_ENABLED BEGIN MENUITEM "&Standard Buttons", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED MENUITEM "&Address Bar", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED MENUITEM "&Links", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED - MENUITEM SEPARATOR + MENUITEM "", -1, MFT_SEPARATOR MENUITEM "Lock the Tool&bars", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED MENUITEM "&Customize...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED MENUITEM "&Text Labels", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED @@ -120,7 +120,7 @@ END // Accelerator // -IDR_ACCELERATORS ACCELERATORS +IDR_ACCELERATORS ACCELERATORS BEGIN VK_F5, IDM_VIEW_REFRESH, VIRTKEY, NOINVERT VK_F5, IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT @@ -142,50 +142,50 @@ END // Strings // -STRINGTABLE +STRINGTABLE BEGIN 800 "Contains commands for manipulating the selected items." END -STRINGTABLE +STRINGTABLE BEGIN 864 "Contains edit commands." END -STRINGTABLE +STRINGTABLE BEGIN 928 "Contains commands for manipulating the view." END -STRINGTABLE +STRINGTABLE BEGIN 992 "Contains tools commands." END -STRINGTABLE +STRINGTABLE BEGIN 1056 "Contains commands for displaying Help." END -STRINGTABLE +STRINGTABLE BEGIN 9025 "Closes the window." 9026 "Goes up one level." END -STRINGTABLE +STRINGTABLE BEGIN 9121 "Connects to a network drive." 9122 "Disconnects from a network drive." END -STRINGTABLE +STRINGTABLE BEGIN 9250 "Displays program information, version number, and copyright." 9252 "Displays information for debugging." END -STRINGTABLE +STRINGTABLE BEGIN 9281 "Goes to the previous page." 9282 "Goes to the next page." @@ -193,13 +193,13 @@ BEGIN 9285 "Goes to your home page." END -STRINGTABLE +STRINGTABLE BEGIN 9362 "Opens the Favorites folder." 9363 "Adds the current page to your Favorites list." END -STRINGTABLE +STRINGTABLE BEGIN 9505 "Shows or hides toolbars." 9506 "Shows or hides the status bar." @@ -209,12 +209,12 @@ BEGIN 9516 "Locks the sizes and positions of the toolbars." END -STRINGTABLE +STRINGTABLE BEGIN 9533 "Customizes the toolbar." END -STRINGTABLE +STRINGTABLE BEGIN 9552 "Shows or hides an Explorer bar." 9553 "Shows the Search bar." @@ -224,47 +224,47 @@ BEGIN 9559 "Shows the Media Bar." END -STRINGTABLE +STRINGTABLE BEGIN IDS_SMALLICONS "Small icons" IDS_LARGEICONS "Large icons" IDS_SHOWTEXTLABELS "Show text labels" END -STRINGTABLE +STRINGTABLE BEGIN IDS_NOTEXTLABELS "No text labels" IDS_SELECTIVETEXTONRIGHT "Selective text on right" END -STRINGTABLE +STRINGTABLE BEGIN IDS_GOBUTTONLABEL "|Go||" IDS_GOBUTTONTIPTEMPLATE "Go to ""%s""" END -STRINGTABLE +STRINGTABLE BEGIN IDS_SEARCHLABEL "Search" IDS_ADDRESSBANDLABEL "A&ddress" END -STRINGTABLE +STRINGTABLE BEGIN IDS_FOLDERSLABEL "Folders" END -STRINGTABLE +STRINGTABLE BEGIN IDS_HISTORYTEXT "&History\tCtrl+H" END -STRINGTABLE +STRINGTABLE BEGIN IDS_UP "Up" END -STRINGTABLE +STRINGTABLE BEGIN IDS_BACK "Back" IDS_FORWARD "Forward" diff --git a/dll/win32/browseui/lang/es-ES.rc b/dll/win32/browseui/lang/es-ES.rc index 7071ef224d3..a989034ce61 100644 --- a/dll/win32/browseui/lang/es-ES.rc +++ b/dll/win32/browseui/lang/es-ES.rc @@ -23,14 +23,14 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL // Menus // -IDM_CABINET_CONTEXTMENU MENUEX +IDM_CABINET_CONTEXTMENU MENUEX BEGIN POPUP "", 264,MFT_STRING,MFS_ENABLED BEGIN MENUITEM "Botones e&stndar", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED MENUITEM "&Barra de direcciones", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED MENUITEM "&Vnculos", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED - MENUITEM SEPARATOR + MENUITEM "", -1, MFT_SEPARATOR MENUITEM "Bloquear las barras de &herramientas", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED MENUITEM "&Personalizar...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED MENUITEM "&Etiquetas", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED @@ -120,7 +120,7 @@ END // Accelerator // -IDR_ACCELERATORS ACCELERATORS +IDR_ACCELERATORS ACCELERATORS BEGIN VK_F5, IDM_VIEW_REFRESH, VIRTKEY, NOINVERT VK_F5, IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT @@ -142,50 +142,50 @@ END // Strings // -STRINGTABLE +STRINGTABLE BEGIN 800 "Contiene comandos para trabajar con los elementos seleccionados." END -STRINGTABLE +STRINGTABLE BEGIN 864 "Contiene comandos de edicin." END -STRINGTABLE +STRINGTABLE BEGIN 928 "Contiene comandos para manipular la vista." END -STRINGTABLE +STRINGTABLE BEGIN 992 "Contiene comandos de herramientas." END -STRINGTABLE +STRINGTABLE BEGIN 1056 "Contiene comandos para mostrar la Ayuda." END -STRINGTABLE +STRINGTABLE BEGIN 9025 "Cierra la ventana." 9026 "Sube un nivel." END -STRINGTABLE +STRINGTABLE BEGIN 9121 "Conecta a unidad de red." 9122 "Desconecta de unidad de red." END -STRINGTABLE +STRINGTABLE BEGIN 9250 "Muestra informacin sobre el programa, nmero de versin y copyright." 9252 "Muestra informacin para debugging." END -STRINGTABLE +STRINGTABLE BEGIN 9281 "Va a la pgina previa." 9282 "Va a la prxima pgina." @@ -193,13 +193,13 @@ BEGIN 9285 "Va a pgina de inicio." END -STRINGTABLE +STRINGTABLE BEGIN 9362 "Abre la carpeta Organizar Favoritos." 9363 "Aade la pgina actual a la lista de Favoritos." END -STRINGTABLE +STRINGTABLE BEGIN 9505 "Muestra u oculta las barras de herramientas." 9506 "Muestra u oculta la barra de estado." @@ -209,12 +209,12 @@ BEGIN 9516 "Bloquear el tamao y la posicin de las barras de herramientas." END -STRINGTABLE +STRINGTABLE BEGIN 9533 "Personalizar la barra de herramientas." END -STRINGTABLE +STRINGTABLE BEGIN 9552 "Muestra u oculta una de las barras del explorador." 9553 "Muestra la barra de bsqueda." @@ -224,47 +224,47 @@ BEGIN 9559 "Muestra la barra de media." END -STRINGTABLE +STRINGTABLE BEGIN IDS_SMALLICONS "Iconos pequeos" IDS_LARGEICONS "Iconos grandes" IDS_SHOWTEXTLABELS "Muestra etiquetas de texto" END -STRINGTABLE +STRINGTABLE BEGIN IDS_NOTEXTLABELS "Sin etiquetas de texto" IDS_SELECTIVETEXTONRIGHT "Selecciona el texto a la derecha" END -STRINGTABLE +STRINGTABLE BEGIN IDS_GOBUTTONLABEL "|Ir||" IDS_GOBUTTONTIPTEMPLATE "Ir a ""%s""" END -STRINGTABLE +STRINGTABLE BEGIN IDS_SEARCHLABEL "Bsqueda" IDS_ADDRESSBANDLABEL "Dire&ccin" END -STRINGTABLE +STRINGTABLE BEGIN IDS_FOLDERSLABEL "Carpetas" END -STRINGTABLE +STRINGTABLE BEGIN IDS_HISTORYTEXT "&Historial\tCtrl+H" END -STRINGTABLE +STRINGTABLE BEGIN IDS_UP "Arriba" END -STRINGTABLE +STRINGTABLE BEGIN IDS_BACK "Atrs" IDS_FORWARD "Adelante" diff --git a/dll/win32/browseui/lang/pl-PL.rc b/dll/win32/browseui/lang/pl-PL.rc new file mode 100644 index 00000000000..a732589e1a8 --- /dev/null +++ b/dll/win32/browseui/lang/pl-PL.rc @@ -0,0 +1,277 @@ +/* + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * translated by Caemyr - Olaf Siejka (May, 2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) + */ + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +///////////////////////////////////////////////////////////////////////////// +// +// Menus +// + +IDM_CABINET_CONTEXTMENU MENUEX +BEGIN + POPUP "", 264,MFT_STRING,MFS_ENABLED + BEGIN + MENUITEM "&Przyciski standardowe", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED + MENUITEM "Pasek &Adresu", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED + MENUITEM "&Odnośniki", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED + MENUITEM "", -1, MFT_SEPARATOR + MENUITEM "&Zablokuj paski narzędzi", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED + MENUITEM "&Dostosuj...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED + MENUITEM "&Etykiety", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED + MENUITEM "&Idź do", IDM_TOOLBARS_GOBUTTON,MFT_STRING,MFS_ENABLED + END +END + +IDM_CABINET_MAINMENU MENUEX +BEGIN + POPUP "&Plik", FCIDM_MENU_FILE + BEGIN + MENUITEM "", -1, MFT_SEPARATOR + MENUITEM "&Zamknij", IDM_FILE_CLOSE + END + POPUP "&Edytuj", FCIDM_MENU_EDIT + BEGIN + MENUITEM "", -1, MFT_SEPARATOR + END + POPUP "&Widok", FCIDM_MENU_VIEW + BEGIN + POPUP "Paski &Narzędzi", IDM_VIEW_TOOLBARS + BEGIN + MENUITEM "", -1, MFT_SEPARATOR + END + MENUITEM "Pasek &Stanu", IDM_VIEW_STATUSBAR + POPUP "Pasek &Exploratora", IDM_VIEW_EXPLORERBAR + BEGIN + MENUITEM "W&yszukaj\tCtrl+E", IDM_EXPLORERBAR_SEARCH + MENUITEM "&Ulubione\tCtrl+I", IDM_EXPLORERBAR_FAVORITES + MENUITEM "&Media", IDM_EXPLORERBAR_MEDIA + MENUITEM "&Historia\tCtrl+H", IDM_EXPLORERBAR_HISTORY + MENUITEM "&Katalogi", IDM_EXPLORERBAR_FOLDERS + MENUITEM "", IDM_EXPLORERBAR_SEPARATOR + END + MENUITEM "", FCIDM_MENU_VIEW_SEP_OPTIONS, MFT_SEPARATOR + POPUP "&Idź do", FCIDM_MENU_EXPLORE + BEGIN + MENUITEM "&Wstecz\tAlt+Left Arrow", IDM_GOTO_BACK + MENUITEM "&Naprzód\tAlt+Right Arrow", IDM_GOTO_FORWARD + MENUITEM "W &górę", IDM_GOTO_UPONELEVEL + MENUITEM "", -1, MFT_SEPARATOR + MENUITEM "&Strona Domowa\tAlt+Home", IDM_GOTO_HOMEPAGE + END + MENUITEM "&Odśwież", IDM_VIEW_REFRESH + END + POPUP "&Ulubione", FCIDM_MENU_FAVORITES + BEGIN + MENUITEM "&Dodaj do Ulubionych...", IDM_FAVORITES_ADDTOFAVORITES + MENUITEM "&Organizuj Ulubione...", IDM_FAVORITES_ORGANIZEFAVORITES + MENUITEM "", -1, MFT_SEPARATOR + MENUITEM "(Pusty)", IDM_FAVORITES_EMPTY + END + POPUP "&Narzędzia", FCIDM_MENU_TOOLS + BEGIN + MENUITEM "Mapuj &Dysk Sieciowy...", IDM_TOOLS_MAPNETWORKDRIVE + MENUITEM "&Odłącz Dysk Sieciowy...", IDM_TOOLS_DISCONNECTNETWORKDRIVE + MENUITEM "&Synchronizuj...", IDM_TOOLS_SYNCHRONIZE + MENUITEM "", -1, MFT_SEPARATOR + MENUITEM "&Opcje Katalogów...", IDM_TOOLS_FOLDEROPTIONS + END + POPUP "&Pomoc", FCIDM_MENU_HELP + BEGIN + MENUITEM "Czy ta kopia ReactOS jest &legalna?", IDM_HELP_ISTHISCOPYLEGAL + MENUITEM "&O ReactOS", IDM_HELP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialogs +// + +IDD_CUSTOMIZETOOLBAREX DIALOGEX 0, 0, 357, 33 +STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + LTEXT "Opcje Te&kstu:",-1,4,2,48,15 + COMBOBOX IDC_TEXTOPTIONS,52,0,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Opcje Iko&n:",-1,4,20,48,15 + COMBOBOX IDC_ICONOPTIONS,52,18,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_ACCELERATORS ACCELERATORS +BEGIN + VK_F5, IDM_VIEW_REFRESH, VIRTKEY, NOINVERT + VK_F5, IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT + "R", IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT + VK_HOME, IDM_GOTO_HOMEPAGE, VIRTKEY, ALT, NOINVERT + "D", IDM_FAVORITES_ADDTOFAVORITES, VIRTKEY, CONTROL, NOINVERT + "B", IDM_FAVORITES_ORGANIZEFAVORITES, VIRTKEY, CONTROL, NOINVERT + VK_LEFT, IDM_GOTO_BACK, VIRTKEY, ALT + VK_RIGHT, IDM_GOTO_FORWARD, VIRTKEY, ALT + "W", IDM_FILE_CLOSE, VIRTKEY, CONTROL, NOINVERT + "E", IDM_EXPLORERBAR_SEARCH, VIRTKEY, CONTROL, NOINVERT + "I", IDM_EXPLORERBAR_FAVORITES, VIRTKEY, CONTROL, NOINVERT + "H", IDM_EXPLORERBAR_HISTORY, VIRTKEY, CONTROL, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Strings +// + +STRINGTABLE +BEGIN + 800 "Zawiera polecenia do manipulowania wybranymi elementami." +END + +STRINGTABLE +BEGIN + 864 "Zawiera polecenia do edycji." +END + +STRINGTABLE +BEGIN + 928 "Zawiera polecenia do zmiany widoku." +END + +STRINGTABLE +BEGIN + 992 "Zawiera polecenia dla narzędzi." +END + +STRINGTABLE +BEGIN + 1056 "Zawiera polecenia do wyświetlania pomocy." +END + +STRINGTABLE +BEGIN + 9025 "Zamyka okno." + 9026 "Przechodzi o poziom wyżej." +END + +STRINGTABLE +BEGIN + 9121 "Podłącza dysk sieciowy." + 9122 "Odłącza dysk sieciowy." +END + +STRINGTABLE +BEGIN + 9250 "Wyświetla informacje o programie, jego wersję i licencję." + 9252 "Wyświetla informacje do debugowania." +END + +STRINGTABLE +BEGIN + 9281 "Przechodzi na poprzednią stronę." + 9282 "Przechodzi na następną stronę." + 9283 "Umożliwia zmianę ustawień." + 9285 "Przechodzi na stronę domową." +END + +STRINGTABLE +BEGIN + 9362 "Otwiera katalog Ulubionych." + 9363 "Dodaje bierzącą stronę do listy ulubionych." +END + +STRINGTABLE +BEGIN + 9505 "Pokazuje lub ukrywa paski narzędzi." + 9506 "Pokazuje lub ukrywa pasek stanu." + 9508 "Pokazuje pasek z Przyciskami Standardowymi." + 9509 "Pokazuje Pasek Adresu." + 9510 "Pokazuje pasek z Podręcznymi Odnośnikami." + 9516 "Blokuje położenie i rozmiar pasków." +END + +STRINGTABLE +BEGIN + 9533 "Dostosowuje wybrane paski." +END + +STRINGTABLE +BEGIN + 9552 "Pokazuje lub ukrywa Pasek Eksploratora." + 9553 "Pokazuje pasek Wyszukiwania." + 9554 "Pokazuje pasek Ulubionych." + 9555 "Pokazuje pasek Historii." + 9557 "Pokazuje pasek Katalogów." + 9559 "Pokazuje pasek Multimediów." +END + +STRINGTABLE +BEGIN + IDS_SMALLICONS "Małe ikony" + IDS_LARGEICONS "Duże ikony" + IDS_SHOWTEXTLABELS "Pokaż etykiety" +END + +STRINGTABLE +BEGIN + IDS_NOTEXTLABELS "Brak etykiet" + IDS_SELECTIVETEXTONRIGHT "Tekst do zaznaczenia po prawej" +END + +STRINGTABLE +BEGIN + IDS_GOBUTTONLABEL "|Idź||" + IDS_GOBUTTONTIPTEMPLATE "Idź do ""%s""" +END + +STRINGTABLE +BEGIN + IDS_SEARCHLABEL "Wyszukaj" + IDS_ADDRESSBANDLABEL "A&dres" +END + +STRINGTABLE +BEGIN + IDS_FOLDERSLABEL "Katalogi" +END + +STRINGTABLE +BEGIN + IDS_HISTORYTEXT "&Historia\tCtrl+H" +END + +STRINGTABLE +BEGIN + IDS_UP "W górę" +END + +STRINGTABLE +BEGIN + IDS_BACK "Wstecz" + IDS_FORWARD "Naprzód" +END diff --git a/dll/win32/browseui/lang/uk-UA.rc b/dll/win32/browseui/lang/uk-UA.rc index 42ad1d1cc9d..ba17373f80f 100644 --- a/dll/win32/browseui/lang/uk-UA.rc +++ b/dll/win32/browseui/lang/uk-UA.rc @@ -25,78 +25,78 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT // Menus // -IDM_CABINET_CONTEXTMENU MENUEX +IDM_CABINET_CONTEXTMENU MENUEX BEGIN POPUP "", 264,MFT_STRING,MFS_ENABLED BEGIN - MENUITEM "& ", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED - MENUITEM "& ", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED - MENUITEM "&", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED - MENUITEM SEPARATOR - MENUITEM " ", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED - MENUITEM "&...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED - MENUITEM "& ", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED - MENUITEM "& ", IDM_TOOLBARS_GOBUTTON,MFT_STRING,MFS_ENABLED + MENUITEM "&Стандартні Кнопки", IDM_TOOLBARS_STANDARDBUTTONS,MFT_STRING,MFS_ENABLED + MENUITEM "&Рядок Адреси", IDM_TOOLBARS_ADDRESSBAR,MFT_STRING,MFS_ENABLED + MENUITEM "&Посилання", IDM_TOOLBARS_LINKSBAR,MFT_STRING,MFS_ENABLED + MENUITEM "", -1, MFT_SEPARATOR + MENUITEM "Блокування панелей інструментів", IDM_TOOLBARS_LOCKTOOLBARS,MFT_STRING,MFS_ENABLED + MENUITEM "&Налаштувати...", IDM_TOOLBARS_CUSTOMIZE,MFT_STRING,MFS_ENABLED + MENUITEM "&Текстові мітки", IDM_TOOLBARS_TEXTLABELS,MFT_STRING,MFS_ENABLED + MENUITEM "&Кнопка Йти", IDM_TOOLBARS_GOBUTTON,MFT_STRING,MFS_ENABLED END END IDM_CABINET_MAINMENU MENUEX BEGIN - POPUP "&", FCIDM_MENU_FILE + POPUP "&Файл", FCIDM_MENU_FILE BEGIN MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "&", IDM_FILE_CLOSE + MENUITEM "&Закрити", IDM_FILE_CLOSE END - POPUP "&", FCIDM_MENU_EDIT + POPUP "&Редагувати", FCIDM_MENU_EDIT BEGIN MENUITEM "", -1, MFT_SEPARATOR END - POPUP "&", FCIDM_MENU_VIEW + POPUP "&Вигляд", FCIDM_MENU_VIEW BEGIN - POPUP "& ", IDM_VIEW_TOOLBARS + POPUP "&Панелі інструментів", IDM_VIEW_TOOLBARS BEGIN MENUITEM "", -1, MFT_SEPARATOR END - MENUITEM " &", IDM_VIEW_STATUSBAR - POPUP "& ", IDM_VIEW_EXPLORERBAR + MENUITEM "Рядок &Стану", IDM_VIEW_STATUSBAR + POPUP "&Панель Провідника", IDM_VIEW_EXPLORERBAR BEGIN - MENUITEM "&\tCtrl+E", IDM_EXPLORERBAR_SEARCH - MENUITEM "&\tCtrl+I", IDM_EXPLORERBAR_FAVORITES - MENUITEM "&", IDM_EXPLORERBAR_MEDIA - MENUITEM "&\tCtrl+H", IDM_EXPLORERBAR_HISTORY - MENUITEM "&", IDM_EXPLORERBAR_FOLDERS + MENUITEM "&Пошук\tCtrl+E", IDM_EXPLORERBAR_SEARCH + MENUITEM "&Обране\tCtrl+I", IDM_EXPLORERBAR_FAVORITES + MENUITEM "&Медіа", IDM_EXPLORERBAR_MEDIA + MENUITEM "&Історія\tCtrl+H", IDM_EXPLORERBAR_HISTORY + MENUITEM "П&апки", IDM_EXPLORERBAR_FOLDERS MENUITEM "", IDM_EXPLORERBAR_SEPARATOR END MENUITEM "", FCIDM_MENU_VIEW_SEP_OPTIONS, MFT_SEPARATOR - POPUP "& ", FCIDM_MENU_EXPLORE + POPUP "Й&ти До", FCIDM_MENU_EXPLORE BEGIN - MENUITEM "&\tAlt+˳ ", IDM_GOTO_BACK - MENUITEM "&\tAlt+ ", IDM_GOTO_FORWARD - MENUITEM "& ", IDM_GOTO_UPONELEVEL + MENUITEM "&Назад\tAlt+Ліва Стрілка", IDM_GOTO_BACK + MENUITEM "&Вперед\tAlt+Права Стрілка", IDM_GOTO_FORWARD + MENUITEM "Вве&рх на один рівень", IDM_GOTO_UPONELEVEL MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "& \tAlt+Home", IDM_GOTO_HOMEPAGE + MENUITEM "&Домашня Сторінка\tAlt+Home", IDM_GOTO_HOMEPAGE END - MENUITEM "&", IDM_VIEW_REFRESH + MENUITEM "&Оновити", IDM_VIEW_REFRESH END - POPUP "&", FCIDM_MENU_FAVORITES + POPUP "О&бране", FCIDM_MENU_FAVORITES BEGIN - MENUITEM "& ...", IDM_FAVORITES_ADDTOFAVORITES - MENUITEM "& ...", IDM_FAVORITES_ORGANIZEFAVORITES + MENUITEM "&Додати до Обраного...", IDM_FAVORITES_ADDTOFAVORITES + MENUITEM "&Організувати Обране...", IDM_FAVORITES_ORGANIZEFAVORITES MENUITEM "", -1, MFT_SEPARATOR MENUITEM "(Empty)", IDM_FAVORITES_EMPTY END - POPUP "&", FCIDM_MENU_TOOLS + POPUP "&Інструменти", FCIDM_MENU_TOOLS BEGIN - MENUITEM "ϳ' & ...", IDM_TOOLS_MAPNETWORKDRIVE - MENUITEM "&³' ...", IDM_TOOLS_DISCONNECTNETWORKDRIVE - MENUITEM "&...", IDM_TOOLS_SYNCHRONIZE + MENUITEM "Під'єднати &Мережевий Диск...", IDM_TOOLS_MAPNETWORKDRIVE + MENUITEM "&Від'єднати Мержевий Диск...", IDM_TOOLS_DISCONNECTNETWORKDRIVE + MENUITEM "&Синхронізувати...", IDM_TOOLS_SYNCHRONIZE MENUITEM "", -1, MFT_SEPARATOR - MENUITEM "& ...", IDM_TOOLS_FOLDEROPTIONS + MENUITEM "&Опції Папки...", IDM_TOOLS_FOLDEROPTIONS END - POPUP "&", FCIDM_MENU_HELP + POPUP "&Допомога", FCIDM_MENU_HELP BEGIN - MENUITEM " ReactOS &?", IDM_HELP_ISTHISCOPYLEGAL - MENUITEM "& ReactOS", IDM_HELP_ABOUT + MENUITEM "Ця копія ReactOS &законна?", IDM_HELP_ISTHISCOPYLEGAL + MENUITEM "&Про ReactOS", IDM_HELP_ABOUT END END @@ -110,9 +110,9 @@ IDD_CUSTOMIZETOOLBAREX DIALOGEX 0, 0, 357, 33 STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - LTEXT " &:",-1,4,2,48,15 + LTEXT "Опції &тексту:",-1,4,2,48,15 COMBOBOX IDC_TEXTOPTIONS,52,0,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT " &:",-1,4,20,48,15 + LTEXT "Опції &значків:",-1,4,20,48,15 COMBOBOX IDC_ICONOPTIONS,52,18,123,57,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END @@ -122,7 +122,7 @@ END // Accelerator // -IDR_ACCELERATORS ACCELERATORS +IDR_ACCELERATORS ACCELERATORS BEGIN VK_F5, IDM_VIEW_REFRESH, VIRTKEY, NOINVERT VK_F5, IDM_VIEW_REFRESH, VIRTKEY, CONTROL, NOINVERT @@ -144,132 +144,132 @@ END // Strings // -STRINGTABLE +STRINGTABLE BEGIN - 800 "̳ '." + 800 "Містить команди маніпулювання вибраними об'єктами." END -STRINGTABLE +STRINGTABLE BEGIN - 864 "̳ ." + 864 "Містить команди правки." END -STRINGTABLE +STRINGTABLE BEGIN - 928 "̳ ." + 928 "Містить команди маніпулювання виглядом." END -STRINGTABLE +STRINGTABLE BEGIN - 992 "̳ ." + 992 "Містить команди інструментів." END -STRINGTABLE +STRINGTABLE BEGIN - 1056 "̳ ." + 1056 "Містить команди для відображення Допомоги." END -STRINGTABLE +STRINGTABLE BEGIN - 9025 " ." - 9026 " ." + 9025 "Закриває вікно." + 9026 "Йде вверх на один рівень." END -STRINGTABLE +STRINGTABLE BEGIN - 9121 "ϳ' ." - 9122 "³' ." + 9121 "Під'єднує до мережевого диску." + 9122 "Від'єднує від мережевого диску." END -STRINGTABLE +STRINGTABLE BEGIN - 9250 "³ , , copyright." - 9252 "³ ." + 9250 "Відображає дані про програму, номер версії, та copyright." + 9252 "Відображає дані для налагодження." END -STRINGTABLE +STRINGTABLE BEGIN - 9281 " ." - 9282 " ." - 9283 " ." - 9285 " ." + 9281 "Йде до попередньої сторінки." + 9282 "Йде до наступної сторінки." + 9283 "Дозволяє вам змінити налаштування." + 9285 "Йде до вашої домашньої сторінки." END -STRINGTABLE +STRINGTABLE BEGIN - 9362 "³ ." - 9363 " ." + 9362 "Відкриває папку Обране." + 9363 "Додає поточну сторінку до списку Обраного." END -STRINGTABLE +STRINGTABLE BEGIN - 9505 " ." - 9506 " ." - 9508 " ." - 9509 " ." - 9510 " ." - 9516 " ." + 9505 "Показує чи приховує панелі інструментів." + 9506 "Показує чи приховує рядок стану." + 9508 "Показує панель стандартних кнопок." + 9509 "Показує рядок адреси." + 9510 "Показує панель швидких посилань." + 9516 "Блокує розміри та розташування панелей інструментів." END -STRINGTABLE +STRINGTABLE BEGIN - 9533 " ." + 9533 "Персоналізує панель інструментів." END -STRINGTABLE +STRINGTABLE BEGIN - 9552 " ." - 9553 " ." - 9554 " ." - 9555 " ." - 9557 " ." - 9559 " ." + 9552 "Показує чи приховує панель Провідника." + 9553 "Показує панель Пошуку." + 9554 "Показує панель Обраного." + 9555 "Показує панель Історії." + 9557 "Показує панель Тек." + 9559 "Показує панель Медіа." END -STRINGTABLE +STRINGTABLE BEGIN - IDS_SMALLICONS " " - IDS_LARGEICONS " " - IDS_SHOWTEXTLABELS " " + IDS_SMALLICONS "Малі значки" + IDS_LARGEICONS "Великі значки" + IDS_SHOWTEXTLABELS "Показати текстові мітки" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_NOTEXTLABELS " " - IDS_SELECTIVETEXTONRIGHT " " + IDS_NOTEXTLABELS "Без текстових міток" + IDS_SELECTIVETEXTONRIGHT "Частина тексту праворуч" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_GOBUTTONLABEL "|||" - IDS_GOBUTTONTIPTEMPLATE " ""%s""" + IDS_GOBUTTONLABEL "|Йти||" + IDS_GOBUTTONTIPTEMPLATE "Йти до ""%s""" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_SEARCHLABEL "" - IDS_ADDRESSBANDLABEL "&" + IDS_SEARCHLABEL "Пошук" + IDS_ADDRESSBANDLABEL "А&дреса" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_FOLDERSLABEL "" + IDS_FOLDERSLABEL "Папки" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_HISTORYTEXT "&\tCtrl+H" + IDS_HISTORYTEXT "&Історія\tCtrl+H" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_UP "" + IDS_UP "Вверх" END -STRINGTABLE +STRINGTABLE BEGIN - IDS_BACK "" - IDS_FORWARD "" + IDS_BACK "Назад" + IDS_FORWARD "Вперед" END diff --git a/dll/win32/browseui/res/addressband.rgs b/dll/win32/browseui/res/addressband.rgs index 1f206150a68..aab147b397a 100644 --- a/dll/win32/browseui/res/addressband.rgs +++ b/dll/win32/browseui/res/addressband.rgs @@ -2,9 +2,9 @@ HKCR { NoRemove CLSID { - val MenuTextPUI = s '@browseui.dll,-13137' ForceRemove {01E04581-4EEE-11d0-BFE9-00AA005B4383} = s '&Address' { + val MenuTextPUI = s '@browseui.dll,-13137' InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index 16bbaf9830d..758f2aa2dbd 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -124,8 +124,6 @@ TODO: "language='*'\"") #endif // __GNUC__ -#define SHANDLE_PTR LONG - struct categoryCacheHeader { long dwSize; // size of header only @@ -156,7 +154,6 @@ SHSTDAPI_(void *) SHAlloc(SIZE_T cb); extern HRESULT CreateInternetToolbar(REFIID riid, void **ppv); - #ifdef SetWindowLongPtr #undef SetWindowLongPtr inline LONG_PTR SetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR dwNewLong) @@ -556,19 +553,29 @@ public: virtual HRESULT STDMETHODCALLTYPE get_Document(IDispatch **ppDisp); virtual HRESULT STDMETHODCALLTYPE get_TopLevelContainer(VARIANT_BOOL *pBool); virtual HRESULT STDMETHODCALLTYPE get_Type(BSTR *Type); - virtual HRESULT STDMETHODCALLTYPE get_Left(LONG *pl); - virtual HRESULT STDMETHODCALLTYPE put_Left(LONG Left); - virtual HRESULT STDMETHODCALLTYPE get_Top(LONG *pl); - virtual HRESULT STDMETHODCALLTYPE put_Top(LONG Top); - virtual HRESULT STDMETHODCALLTYPE get_Width(LONG *pl); - virtual HRESULT STDMETHODCALLTYPE put_Width(LONG Width); - virtual HRESULT STDMETHODCALLTYPE get_Height(LONG *pl); - virtual HRESULT STDMETHODCALLTYPE put_Height(LONG Height); + +// WIDL temp hack : when the interface contains 'long' WIDL writes it out as a 'LONG' +// Setting the prototype to LONG in this class breaks building with MSVC so we use +// the correct 'long' type here and temp hack it for WIDL generated prototypes. +#ifdef __WIDL_EXDISP_H +#define long LONG +#endif + virtual HRESULT STDMETHODCALLTYPE get_Left(long *pl); + virtual HRESULT STDMETHODCALLTYPE put_Left(long Left); + virtual HRESULT STDMETHODCALLTYPE get_Top(long *pl); + virtual HRESULT STDMETHODCALLTYPE put_Top(long Top); + virtual HRESULT STDMETHODCALLTYPE get_Width(long *pl); + virtual HRESULT STDMETHODCALLTYPE put_Width(long Width); + virtual HRESULT STDMETHODCALLTYPE get_Height(long *pl); + virtual HRESULT STDMETHODCALLTYPE put_Height(long Height); +#ifdef __WIDL_EXDISP_H +#undef long +#endif virtual HRESULT STDMETHODCALLTYPE get_LocationName(BSTR *LocationName); virtual HRESULT STDMETHODCALLTYPE get_LocationURL(BSTR *LocationURL); virtual HRESULT STDMETHODCALLTYPE get_Busy(VARIANT_BOOL *pBool); - // *** IWebBrowser2 methods *** + // *** IWebBrowserApp methods *** virtual HRESULT STDMETHODCALLTYPE Quit(); virtual HRESULT STDMETHODCALLTYPE ClientToWindow(int *pcx, int *pcy); virtual HRESULT STDMETHODCALLTYPE PutProperty(BSTR Property, VARIANT vtValue); @@ -2546,47 +2553,51 @@ HRESULT STDMETHODCALLTYPE CShellBrowser::get_Type(BSTR *Type) { return E_NOTIMPL; } - -HRESULT STDMETHODCALLTYPE CShellBrowser::get_Left(LONG *pl) +#ifdef __WIDL_EXDISP_H +#define long LONG +#endif +HRESULT STDMETHODCALLTYPE CShellBrowser::get_Left(long *pl) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE CShellBrowser::put_Left(LONG Left) +HRESULT STDMETHODCALLTYPE CShellBrowser::put_Left(long Left) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE CShellBrowser::get_Top(LONG *pl) +HRESULT STDMETHODCALLTYPE CShellBrowser::get_Top(long *pl) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE CShellBrowser::put_Top(LONG Top) +HRESULT STDMETHODCALLTYPE CShellBrowser::put_Top(long Top) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE CShellBrowser::get_Width(LONG *pl) +HRESULT STDMETHODCALLTYPE CShellBrowser::get_Width(long *pl) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE CShellBrowser::put_Width(LONG Width) +HRESULT STDMETHODCALLTYPE CShellBrowser::put_Width(long Width) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE CShellBrowser::get_Height(LONG *pl) +HRESULT STDMETHODCALLTYPE CShellBrowser::get_Height(long *pl) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE CShellBrowser::put_Height(LONG Height) +HRESULT STDMETHODCALLTYPE CShellBrowser::put_Height(long Height) { return E_NOTIMPL; } - +#ifdef __WIDL_EXDISP_H +#undef long +#endif HRESULT STDMETHODCALLTYPE CShellBrowser::get_LocationName(BSTR *LocationName) { return E_NOTIMPL; diff --git a/dll/win32/cfgmgr32/cfgmgr32.spec b/dll/win32/cfgmgr32/cfgmgr32.spec index f3aab21514a..d5a0a28aa2b 100644 --- a/dll/win32/cfgmgr32/cfgmgr32.spec +++ b/dll/win32/cfgmgr32/cfgmgr32.spec @@ -59,8 +59,8 @@ @ stdcall CM_Get_Class_NameW(ptr wstr ptr long) setupapi.CM_Get_Class_NameW @ stdcall CM_Get_Class_Name_ExA(ptr str ptr long long) setupapi.CM_Get_Class_Name_ExA @ stdcall CM_Get_Class_Name_ExW(ptr wstr ptr long long) setupapi.CM_Get_Class_Name_ExW -@ stub CM_Get_Class_Registry_PropertyA # setupapi.CM_Get_Class_Registry_PropertyA -@ stub CM_Get_Class_Registry_PropertyW # setupapi.CM_Get_Class_Registry_PropertyW +@ stdcall CM_Get_Class_Registry_PropertyA(ptr long ptr ptr ptr long ptr) setupapi.CM_Get_Class_Registry_PropertyA +@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr ptr long ptr) setupapi.CM_Get_Class_Registry_PropertyW @ stdcall CM_Get_Depth(ptr long long) setupapi.CM_Get_Depth @ stdcall CM_Get_Depth_Ex(ptr long long long) setupapi.CM_Get_Depth_Ex @ stdcall CM_Get_DevNode_Registry_PropertyA(long long ptr ptr ptr long) setupapi.CM_Get_DevNode_Registry_PropertyA @@ -83,18 +83,18 @@ @ stdcall CM_Get_Device_ID_List_Size_ExW(ptr wstr long long) setupapi.CM_Get_Device_ID_List_Size_ExA @ stdcall CM_Get_Device_ID_Size(ptr long long) setupapi.CM_Get_Device_ID_Size @ stdcall CM_Get_Device_ID_Size_Ex(ptr long long long) setupapi.CM_Get_Device_ID_Size_Ex -@ stub CM_Get_Device_Interface_AliasA # setupapi.CM_Get_Device_Interface_AliasA -@ stub CM_Get_Device_Interface_AliasW # setupapi.CM_Get_Device_Interface_AliasW -@ stub CM_Get_Device_Interface_Alias_ExA # setupapi.CM_Get_Device_Interface_Alias_ExA -@ stub CM_Get_Device_Interface_Alias_ExW # setupapi.CM_Get_Device_Interface_Alias_ExW -@ stub CM_Get_Device_Interface_ListA # setupapi.CM_Get_Device_Interface_ListA -@ stub CM_Get_Device_Interface_ListW # setupapi.CM_Get_Device_Interface_ListW -@ stub CM_Get_Device_Interface_List_ExA # setupapi.CM_Get_Device_Interface_List_ExA -@ stub CM_Get_Device_Interface_List_ExW # setupapi.CM_Get_Device_Interface_List_ExW -@ stub CM_Get_Device_Interface_List_SizeA # setupapi.CM_Get_Device_Interface_List_SizeA -@ stub CM_Get_Device_Interface_List_SizeW # setupapi.CM_Get_Device_Interface_List_SizeW -@ stub CM_Get_Device_Interface_List_Size_ExA # setupapi.CM_Get_Device_Interface_List_Size_ExA -@ stub CM_Get_Device_Interface_List_Size_ExW # setupapi.CM_Get_Device_Interface_List_Size_ExW +@ stdcall CM_Get_Device_Interface_AliasA(str ptr str ptr long) setupapi.CM_Get_Device_Interface_AliasA +@ stdcall CM_Get_Device_Interface_AliasW(wstr ptr wstr ptr long) setupapi.CM_Get_Device_Interface_AliasW +@ stdcall CM_Get_Device_Interface_Alias_ExA(str ptr str ptr long long) setupapi.CM_Get_Device_Interface_Alias_ExA +@ stdcall CM_Get_Device_Interface_Alias_ExW(wstr ptr wstr ptr long long) setupapi.CM_Get_Device_Interface_Alias_ExW +@ stdcall CM_Get_Device_Interface_ListA(ptr str str long long) setupapi.CM_Get_Device_Interface_ListA +@ stdcall CM_Get_Device_Interface_ListW(ptr wstr wstr long long) setupapi.CM_Get_Device_Interface_ListW +@ stdcall CM_Get_Device_Interface_List_ExA(ptr str str long long ptr) setupapi.CM_Get_Device_Interface_List_ExA +@ stdcall CM_Get_Device_Interface_List_ExW(ptr wstr wstr long long ptr) setupapi.CM_Get_Device_Interface_List_ExW +@ stdcall CM_Get_Device_Interface_List_SizeA(ptr ptr str long) setupapi.CM_Get_Device_Interface_List_SizeA +@ stdcall CM_Get_Device_Interface_List_SizeW(ptr ptr wstr long) setupapi.CM_Get_Device_Interface_List_SizeW +@ stdcall CM_Get_Device_Interface_List_Size_ExA(ptr ptr str long ptr) setupapi.CM_Get_Device_Interface_List_Size_ExA +@ stdcall CM_Get_Device_Interface_List_Size_ExW(ptr ptr wstr long ptr) setupapi.CM_Get_Device_Interface_List_Size_ExW @ stdcall CM_Get_First_Log_Conf(ptr long long) setupapi.CM_Get_First_Log_Conf @ stdcall CM_Get_First_Log_Conf_Ex(ptr long long long) setupapi.CM_Get_First_Log_Conf_Ex @ stdcall CM_Get_Global_State(ptr long) setupapi.CM_Get_Global_State @@ -103,10 +103,10 @@ @ stdcall CM_Get_HW_Prof_FlagsW(wstr long ptr long) setupapi.CM_Get_HW_Prof_FlagsW @ stdcall CM_Get_HW_Prof_Flags_ExA(str long ptr long long) setupapi.CM_Get_HW_Prof_Flags_ExA @ stdcall CM_Get_HW_Prof_Flags_ExW(wstr long ptr long long) setupapi.CM_Get_HW_Prof_Flags_ExW -@ stub CM_Get_Hardware_Profile_InfoA # setupapi.CM_Get_Hardware_Profile_InfoA -@ stub CM_Get_Hardware_Profile_InfoW # setupapi.CM_Get_Hardware_Profile_InfoW -@ stub CM_Get_Hardware_Profile_Info_ExA # setupapi.CM_Get_Hardware_Profile_Info_ExA -@ stub CM_Get_Hardware_Profile_Info_ExW # setupapi.CM_Get_Hardware_Profile_Info_ExW +@ stdcall CM_Get_Hardware_Profile_InfoA(long ptr long) setupapi.CM_Get_Hardware_Profile_InfoA +@ stdcall CM_Get_Hardware_Profile_InfoW(long ptr long) setupapi.CM_Get_Hardware_Profile_InfoW +@ stdcall CM_Get_Hardware_Profile_Info_ExA(long ptr long long) setupapi.CM_Get_Hardware_Profile_Info_ExA +@ stdcall CM_Get_Hardware_Profile_Info_ExW(long ptr long long) setupapi.CM_Get_Hardware_Profile_Info_ExW @ stdcall CM_Get_Log_Conf_Priority(ptr ptr long) setupapi.CM_Get_Log_Conf_Priority @ stdcall CM_Get_Log_Conf_Priority_Ex(ptr ptr long long) setupapi.CM_Get_Log_Conf_Priority_Ex @ stdcall CM_Get_Next_Log_Conf(ptr ptr long) setupapi.CM_Get_Next_Log_Conf @@ -146,29 +146,27 @@ @ stdcall CM_Open_Class_Key_ExW(ptr wstr long long ptr long long) setupapi.CM_Open_Class_Key_ExW @ stdcall CM_Open_DevNode_Key(ptr long long long ptr long) setupapi.CM_Open_DevNode_Key @ stdcall CM_Open_DevNode_Key_Ex(ptr long long long ptr long long) setupapi.CM_Open_DevNode_Key_Ex -@ stub CM_Query_And_Remove_SubTreeA # setupapi.CM_Query_And_Remove_SubTreeA -@ stub CM_Query_And_Remove_SubTreeW # setupapi.CM_Query_And_Remove_SubTreeW -@ stub CM_Query_And_Remove_SubTree_ExA # setupapi.CM_Query_And_Remove_SubTree_ExA -@ stub CM_Query_And_Remove_SubTree_ExW # setupapi.CM_Query_And_Remove_SubTree_ExW -@ stub CM_Query_Arbitrator_Free_Data # setupapi.CM_Query_Arbitrator_Free_Data -@ stub CM_Query_Arbitrator_Free_Data_Ex # setupapi.CM_Query_Arbitrator_Free_Data_Ex -@ stub CM_Query_Arbitrator_Free_Size # setupapi.CM_Query_Arbitrator_Free_Size -@ stub CM_Query_Arbitrator_Free_Size_Ex # setupapi.CM_Query_Arbitrator_Free_Size_Ex -@ stub CM_Query_Remove_SubTree # setupapi.CM_Query_Remove_SubTree -@ stub CM_Query_Remove_SubTree_Ex # setupapi.CM_Query_Remove_SubTree_Ex +@ stdcall CM_Query_And_Remove_SubTreeA(long ptr str long long) setupapi.CM_Query_And_Remove_SubTreeA +@ stdcall CM_Query_And_Remove_SubTreeW(long ptr wstr long long) setupapi.CM_Query_And_Remove_SubTreeW +@ stdcall CM_Query_And_Remove_SubTree_ExA(long ptr str long long long) setupapi.CM_Query_And_Remove_SubTree_ExA +@ stdcall CM_Query_And_Remove_SubTree_ExW(long ptr wstr long long long) setupapi.CM_Query_And_Remove_SubTree_ExW +@ stdcall CM_Query_Arbitrator_Free_Data(ptr long long long long) setupapi.CM_Query_Arbitrator_Free_Data +@ stdcall CM_Query_Arbitrator_Free_Data_Ex(ptr long long long long ptr) setupapi.CM_Query_Arbitrator_Free_Data_Ex +@ stdcall CM_Query_Arbitrator_Free_Size(ptr long long long) setupapi.CM_Query_Arbitrator_Free_Size +@ stdcall CM_Query_Arbitrator_Free_Size_Ex(ptr long long long ptr) setupapi.CM_Query_Arbitrator_Free_Size_Ex +@ stdcall CM_Query_Remove_SubTree(long long) setupapi.CM_Query_Remove_SubTree +@ stdcall CM_Query_Remove_SubTree_Ex(long long long) setupapi.CM_Query_Remove_SubTree_Ex @ stub CM_Query_Resource_Conflict_List # setupapi.CM_Query_Resource_Conflict_List @ stdcall CM_Reenumerate_DevNode(long long) setupapi.CM_Reenumerate_DevNode @ stdcall CM_Reenumerate_DevNode_Ex(long long long) setuapi.CM_Reenumerate_DevNode_Ex -@ stub CM_Register_Device_Driver # setupapi.CM_Register_Device_Driver -@ stub CM_Register_Device_Driver_Ex # setupapi.CM_Register_Device_Driver_Ex -@ stub CM_Register_Device_InterfaceA # setupapi.CM_Register_Device_InterfaceA -@ stub CM_Register_Device_InterfaceW # setupapi.CM_Register_Device_InterfaceW -@ stub CM_Register_Device_Interface_ExA # setupapi.CM_Register_Device_Interface_ExA -@ stub CM_Register_Device_Interface_ExW # setupapi.CM_Register_Device_Interface_ExW -@ stub CM_Remove_SubTree # setupapi.CM_Remove_SubTree -@ stub CM_Remove_SubTree_Ex # setupapi.CM_Remove_SubTree_Ex -@ stub CM_Request_Device_EjectA # setupapi.CM_Request_Device_EjectA -@ stub CM_Request_Device_EjectW # setupapi.CM_Request_Device_EjectW +@ stdcall CM_Register_Device_Driver(long long) setupapi.CM_Register_Device_Driver +@ stdcall CM_Register_Device_Driver_Ex(long long ptr) setupapi.CM_Register_Device_Driver_Ex +@ stdcall CM_Register_Device_InterfaceA(long ptr str str ptr long) setupapi.CM_Register_Device_InterfaceA +@ stdcall CM_Register_Device_InterfaceW(long ptr wstr wstr ptr long) setupapi.CM_Register_Device_InterfaceW +@ stdcall CM_Register_Device_Interface_ExA(long ptr str str ptr long long) setupapi.CM_Register_Device_Interface_ExA +@ stdcall CM_Register_Device_Interface_ExW(long ptr wstr wstr ptr long long) setupapi.CM_Register_Device_Interface_ExW +@ stdcall CM_Remove_SubTree(long long) setupapi.CM_Remove_SubTree +@ stdcall CM_Remove_SubTree_Ex(long long long) setupapi.CM_Remove_SubTree_Ex @ stdcall CM_Request_Eject_PC() setupapi.CM_Request_Eject_PC @ stdcall CM_Request_Eject_PC_Ex(long) setupapi.CM_Request_Eject_PC_Ex @ stdcall CM_Run_Detection(long) setupapi.CM_Run_Detection @@ -181,8 +179,8 @@ @ stdcall CM_Set_DevNode_Registry_PropertyW(long long ptr long long) setupapi.CM_Set_DevNode_Registry_PropertyW @ stdcall CM_Set_DevNode_Registry_Property_ExA(long long ptr long long long) setupapi.CM_Set_DevNode_Registry_Property_ExA @ stdcall CM_Set_DevNode_Registry_Property_ExW(long long ptr long long long) setupapi.CM_Set_DevNode_Registry_Property_ExW -@ stub CM_Set_HW_Prof # setupapi.CM_Set_HW_Prof -@ stub CM_Set_HW_Prof_Ex # setupapi.CM_Set_HW_Prof_Ex +@ stdcall CM_Set_HW_Prof(long long) setupapi.CM_Set_HW_Prof +@ stdcall CM_Set_HW_Prof_Ex(long long long) setupapi.CM_Set_HW_Prof_Ex @ stdcall CM_Set_HW_Prof_FlagsA(str long long long) setupapi.CM_Set_HW_Prof_FlagsA @ stdcall CM_Set_HW_Prof_FlagsW(wstr long long long) setupapi.CM_Set_HW_Prof_FlagsW @ stdcall CM_Set_HW_Prof_Flags_ExA(str long long long long) setupapi.CM_Set_HW_Prof_Flags_ExA @@ -192,10 +190,10 @@ @ stub CM_Test_Range_Available # setupapi.CM_Test_Range_Available @ stdcall CM_Uninstall_DevNode(long long) setupapi.CM_Uninstall_DevNode @ stdcall CM_Uninstall_DevNode_Ex(long long long) setupapi.CM_Uninstall_DevNode_Ex -@ stub CM_Unregister_Device_InterfaceA # setupapi.CM_Unregister_Device_InterfaceA -@ stub CM_Unregister_Device_InterfaceW # setupapi.CM_Unregister_Device_InterfaceW -@ stub CM_Unregister_Device_Interface_ExA # setupapi.CM_Unregister_Device_Interface_ExA -@ stub CM_Unregister_Device_Interface_ExW # setupapi.CM_Unregister_Device_Interface_ExW +@ stdcall CM_Unregister_Device_InterfaceA(str long) setupapi.CM_Unregister_Device_InterfaceA +@ stdcall CM_Unregister_Device_InterfaceW(wstr long) setupapi.CM_Unregister_Device_InterfaceW +@ stdcall CM_Unregister_Device_Interface_ExA(str long long) setupapi.CM_Unregister_Device_Interface_ExA +@ stdcall CM_Unregister_Device_Interface_ExW(wstr long long) setupapi.CM_Unregister_Device_Interface_ExW # Deprecated functions, they are not present in Win2003 SP1 @ stub CM_Remove_Unmarked_Children # setupapi.CM_Remove_Unmarked_Children diff --git a/dll/win32/comctl32/comctl32_ros.diff b/dll/win32/comctl32/comctl32_ros.diff index d15da082250..58dca6ff2c7 100644 --- a/dll/win32/comctl32/comctl32_ros.diff +++ b/dll/win32/comctl32/comctl32_ros.diff @@ -247,3 +247,18 @@ Index: rebar.c return 0; /* case WM_VKEYTOITEM: supported according to ControlSpy */ +Index: monthcal.c +=================================================================== +--- monthcal.c (Revision 51719) ++++ monthcal.c (Arbeitskopie) +@@ -143,8 +143,8 @@ + /* empty SYSTEMTIME const */ + static const SYSTEMTIME st_null; + /* valid date limits */ +-static const SYSTEMTIME max_allowed_date = { .wYear = 9999, .wMonth = 12, .wDay = 31 }; +-static const SYSTEMTIME min_allowed_date = { .wYear = 1752, .wMonth = 9, .wDay = 14 }; ++static const SYSTEMTIME max_allowed_date = { 9999, 12, 0, 31, 0, 0, 0, 0 }; ++static const SYSTEMTIME min_allowed_date = { 1752, 9, 0, 14, 0, 0, 0, 0 }; + + /* Prev/Next buttons */ + enum nav_direction diff --git a/dll/win32/comctl32/comctl_Uk.rc b/dll/win32/comctl32/comctl_Uk.rc index dde83f41c8d..bd6eac29e39 100644 --- a/dll/win32/comctl32/comctl_Uk.rc +++ b/dll/win32/comctl32/comctl_Uk.rc @@ -22,31 +22,34 @@ #include "comctl32.h" +/* UTF-8 */ +#pragma code_page(65001) + LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPSHEET DIALOG 0, 0, 220, 140 STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE -CAPTION " %s" +CAPTION "Властивості для %s" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP - PUSHBUTTON "&", IDCANCEL,58,122,50,14 - PUSHBUTTON "&", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED - PUSHBUTTON "&", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP + PUSHBUTTON "&Скасувати", IDCANCEL,58,122,50,14 + PUSHBUTTON "&Застосувати", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED + PUSHBUTTON "&Довідка", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114 END IDD_WIZARD DIALOG 0, 0, 290, 159 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE -CAPTION "" +CAPTION "Майстер" FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "< &", IDC_BACK_BUTTON,71,138,50,14 - DEFPUSHBUTTON "& >", IDC_NEXT_BUTTON,121,138,50,14 - DEFPUSHBUTTON "&", IDC_FINISH_BUTTON,121,138,50,14 - PUSHBUTTON "&", IDCANCEL,178,138,50,14 - PUSHBUTTON "&", IDHELP,235,138,50,14,WS_GROUP + PUSHBUTTON "< &Назад", IDC_BACK_BUTTON,71,138,50,14 + DEFPUSHBUTTON "&Далі >", IDC_NEXT_BUTTON,121,138,50,14 + DEFPUSHBUTTON "&Завершити", IDC_FINISH_BUTTON,121,138,50,14 + PUSHBUTTON "&Скасувати", IDCANCEL,178,138,50,14 + PUSHBUTTON "&Довідка", IDHELP,235,138,50,14,WS_GROUP LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5 LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE @@ -55,18 +58,18 @@ END IDD_TBCUSTOMIZE DIALOG 10, 20, 357, 125 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка панелі інструментів" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", IDCANCEL,308,6,44,14 - PUSHBUTTON "&", IDC_RESET_BTN,308,23,44,14 - PUSHBUTTON "&", IDC_HELP_BTN,308,40,44,14 - PUSHBUTTON " &", IDC_MOVEUP_BTN,308,74,44,14 - PUSHBUTTON " &", IDC_MOVEDN_BTN,308,91,44,14 - LTEXT "& :", -1,4,5,84,10 + DEFPUSHBUTTON "&Закрити", IDCANCEL,308,6,44,14 + PUSHBUTTON "&Скинути", IDC_RESET_BTN,308,23,44,14 + PUSHBUTTON "&Довідка", IDC_HELP_BTN,308,40,44,14 + PUSHBUTTON "Пересунути в&гору", IDC_MOVEUP_BTN,308,74,44,14 + PUSHBUTTON "Пересунути до&низу", IDC_MOVEDN_BTN,308,91,44,14 + LTEXT "На&явні кнопки:", -1,4,5,84,10 LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP - PUSHBUTTON "& ->", IDOK, 131, 42, 44, 14 - PUSHBUTTON "<- &", IDC_REMOVE_BTN,131,62,44,14 - LTEXT "& :", -1,182,5,78,10 + PUSHBUTTON "&Додати ->", IDOK, 131, 42, 44, 14 + PUSHBUTTON "<- &Прибрати", IDC_REMOVE_BTN,131,62,44,14 + LTEXT "&Кнопки панелі інструментів:", -1,182,5,78,10 LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP END diff --git a/dll/win32/comctl32/rsrc.rc b/dll/win32/comctl32/rsrc.rc index 903c147bf55..c454ed3e6ef 100644 --- a/dll/win32/comctl32/rsrc.rc +++ b/dll/win32/comctl32/rsrc.rc @@ -104,7 +104,6 @@ IDI_TT_ERROR_SM ICON idi_tt_error_sm.ico #include "comctl_Sv.rc" #include "comctl_Th.rc" #include "comctl_Tr.rc" -#include "comctl_Uk.rc" /* UTF-8 */ #include "comctl_Da.rc" @@ -120,4 +119,5 @@ IDI_TT_ERROR_SM ICON idi_tt_error_sm.ico #include "comctl_Ru.rc" #include "comctl_Si.rc" #include "comctl_Sr.rc" +#include "comctl_Uk.rc" #include "comctl_Zh.rc" diff --git a/dll/win32/comdlg32/CMakeLists.txt b/dll/win32/comdlg32/CMakeLists.txt index 83f46ae9056..90918029bb6 100644 --- a/dll/win32/comdlg32/CMakeLists.txt +++ b/dll/win32/comdlg32/CMakeLists.txt @@ -1,8 +1,7 @@ add_definitions( -D__WINESRC__ - -D_WINE - -D_DLL -D__USE_CRTIMP) + -D_WINE) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) diff --git a/dll/win32/comdlg32/cdlg_Uk.rc b/dll/win32/comdlg32/cdlg_Uk.rc index a4b4ff5dc55..02859e920a3 100644 --- a/dll/win32/comdlg32/cdlg_Uk.rc +++ b/dll/win32/comdlg32/cdlg_Uk.rc @@ -25,96 +25,99 @@ * WARNING: DO NOT CHANGE THE SIZE OF THE STANDARD DIALOG TEMPLATES. */ +/* UTF-8 */ +#pragma code_page(65001) + LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT OPEN_FILE DIALOG 36, 24, 275, 134 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "³" +CAPTION "Відкрити" FONT 8, "MS Shell Dlg" { - LTEXT "&' :", 1090, 6, 6, 76, 9 + LTEXT "&Ім'я файлу:", 1090, 6, 6, 76, 9 EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP - LTEXT "&:", -1, 110, 6, 92, 9 + LTEXT "&Теки:", -1, 110, 6, 92, 9 LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP - LTEXT " &:", 1089, 6, 104, 90, 9 + LTEXT "Показувати файли &типу:", 1089, 6, 104, 90, 9 COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP - LTEXT "&:", 1091, 110, 104, 92, 9 + LTEXT "&Диски:", 1091, 110, 104, 92, 9 COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP - DEFPUSHBUTTON "³", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP - CHECKBOX "& ", 1040, 208, 68, 54, 24, BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "Відкрити", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Довідка", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP + CHECKBOX "&Лише для читання", 1040, 208, 68, 54, 24, BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP } SAVE_FILE DIALOG 36, 24, 275, 134 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " ..." +CAPTION "Зберегти як..." FONT 8, "MS Shell Dlg" { - LTEXT "&' :", 1090, 6, 6, 76, 9 + LTEXT "&Ім'я файлу:", 1090, 6, 6, 76, 9 EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP - LTEXT "&:", -1, 110, 6, 92, 9 + LTEXT "&Теки:", -1, 110, 6, 92, 9 LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP - LTEXT " &:", 1089, 6, 104, 90, 9 + LTEXT "Показувати файли &типу:", 1089, 6, 104, 90, 9 COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP - LTEXT "&:", 1091, 110, 104, 92, 9 + LTEXT "&Диски:", 1091, 110, 104, 92, 9 COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP - DEFPUSHBUTTON " ", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP - CHECKBOX "& ", 1040, 208, 68, 54, 24, BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "Зберегти як", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Довідка", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP + CHECKBOX "&Лише для читання", 1040, 208, 68, 54, 24, BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP } PRINT DIALOG 36, 24, 264, 134 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Друк" FONT 8, "MS Shell Dlg" { - LTEXT ":", 1088, 6, 6, 40, 9 + LTEXT "Принтер:", 1088, 6, 6, 40, 9 LTEXT "", 1089, 60, 6, 150, 9 - GROUPBOX "", 1072, 6, 30, 160, 65, BS_GROUPBOX - RADIOBUTTON "&", 1056, 16, 45, 60, 12 - RADIOBUTTON "& ", 1057, 16, 60, 60, 12 - RADIOBUTTON "&", 1058, 16, 75, 60, 12 - DEFPUSHBUTTON "", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP - LTEXT "&:", 1090, 60, 80, 30, 9 - LTEXT "&:", 1091, 120, 80, 30, 9 - LTEXT "& :", 1092, 6, 100, 76, 9 + GROUPBOX "Друкувати", 1072, 6, 30, 160, 65, BS_GROUPBOX + RADIOBUTTON "&Все", 1056, 16, 45, 60, 12 + RADIOBUTTON "В&иділенний фрагмент", 1057, 16, 60, 60, 12 + RADIOBUTTON "&Сторінки", 1058, 16, 75, 60, 12 + DEFPUSHBUTTON "Друк", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Властивості", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP + LTEXT "&з:", 1090, 60, 80, 30, 9 + LTEXT "&до:", 1091, 120, 80, 30, 9 + LTEXT "&Якість друку:", 1092, 6, 100, 76, 9 COMBOBOX 1136, 80, 100, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP - CHECKBOX " ", 1040, 20, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "", 1041, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "Друк до файлу", 1040, 20, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "Стисло", 1041, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP } PRINT_SETUP DIALOG 36, 24, 264, 134 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Настройка принтера" FONT 8, "MS Shell Dlg" { - GROUPBOX "", 1072, 6, 10, 180, 65, BS_GROUPBOX - RADIOBUTTON " &", 1056, 16, 20, 80, 12 - LTEXT "[]", 1088, 35, 35, 120, 9 - RADIOBUTTON "& ", 1057, 16, 50, 80, 12 + GROUPBOX "Принтер", 1072, 6, 10, 180, 65, BS_GROUPBOX + RADIOBUTTON "Принтер за &обумовленням", 1056, 16, 20, 80, 12 + LTEXT "[Нема]", 1088, 35, 35, 120, 9 + RADIOBUTTON "&Інший принтер", 1057, 16, 50, 80, 12 COMBOBOX 1136, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP - GROUPBOX "", 1073, 6, 85, 100, 50, BS_GROUPBOX - RADIOBUTTON "&", 1058, 50, 100, 40, 12 - RADIOBUTTON "&", 1059, 50, 115, 40, 12 + PUSHBUTTON "Скасувати", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Настройка", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP + GROUPBOX "Орієнтація", 1073, 6, 85, 100, 50, BS_GROUPBOX + RADIOBUTTON "&Книжна", 1058, 50, 100, 40, 12 + RADIOBUTTON "&Альбомна", 1059, 50, 115, 40, 12 ICON "LANDSCAP", 1097, 10, 95, 32, 32 ICON "PORTRAIT", 1098, 10, 95, 32, 32 - GROUPBOX "", 1074, 120, 85, 180, 50, BS_GROUPBOX - LTEXT "&", 1089, 130, 95, 30, 9 - LTEXT "&", 1090, 130, 110, 30, 9 + GROUPBOX "Папір", 1074, 120, 85, 180, 50, BS_GROUPBOX + LTEXT "Ро&змір", 1089, 130, 95, 30, 9 + LTEXT "&Джерело", 1090, 130, 110, 30, 9 COMBOBOX 1137, 155, 95, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP COMBOBOX 1138, 155, 110, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP } @@ -122,31 +125,31 @@ FONT 8, "MS Shell Dlg" CHOOSE_FONT DIALOG 13, 54, 264, 147 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Шрифт" FONT 8, "MS Shell Dlg" { - LTEXT "&:",1088 ,6,3,40,9 + LTEXT "&Шрифт:",1088 ,6,3,40,9 COMBOBOX 1136 ,6,13,94,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE - LTEXT "&:",1089 ,108,3,44,9 + LTEXT "&Стиль:",1089 ,108,3,44,9 COMBOBOX 1137,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE - LTEXT "&:",1090,179,3,30,9 + LTEXT "&Розмір:",1090,179,3,30,9 COMBOBOX 1138,179,13,32,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT DEFPUSHBUTTON "OK",IDOK,218,6,40,14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "",IDCANCEL,218,23,40,14,WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", 1026,218,40,40,14,WS_GROUP | WS_TABSTOP - PUSHBUTTON "&" , 1038,218,57,40,14,WS_GROUP | WS_TABSTOP - GROUPBOX "",1072,6,72,84,34,WS_GROUP - CHECKBOX "&", 1040, 10,82,75,10, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "&ϳ", 1041, 10,94,75,10, BS_AUTOCHECKBOX - LTEXT "&:", 1091 ,6,110,30,9 + PUSHBUTTON "Скасувати",IDCANCEL,218,23,40,14,WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Застосувати", 1026,218,40,40,14,WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Довідка" , 1038,218,57,40,14,WS_GROUP | WS_TABSTOP + GROUPBOX "Атрибути",1072,6,72,84,34,WS_GROUP + CHECKBOX "&Закреслений", 1040, 10,82,75,10, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Підкреслений", 1041, 10,94,75,10, BS_AUTOCHECKBOX + LTEXT "&Колір:", 1091 ,6,110,30,9 COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP - GROUPBOX "&",grp2,98,72,120,36,WS_GROUP - CTEXT "AaBb",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE - LTEXT ":",stc7 ,98,114,80,9 + GROUPBOX "&Зразок",grp2,98,72,120,36,WS_GROUP + CTEXT "АаБбAaBb",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE + LTEXT "Скрипт:",stc7 ,98,114,80,9 COMBOBOX cmb5,98,124,120,90,CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP } @@ -154,23 +157,23 @@ FONT 8, "MS Shell Dlg" CHOOSE_COLOR DIALOG 36, 24, 310, 185 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Зміна палітри" FONT 8, "MS Shell Dlg" { - LTEXT "& :", 1088, 4, 4, 140, 10 - LTEXT "& :", 1089, 4, 106, 140, 10 - LTEXT "|&", 1090, 150, 151, 48, 10 - LTEXT "&:", 726 /*1094*/,254,126,32,10 + LTEXT "&Базова палітра:", 1088, 4, 4, 140, 10 + LTEXT "Д&одаткові кольори:", 1089, 4, 106, 140, 10 + LTEXT "Колір|За&ливка", 1090, 150, 151, 48, 10 + LTEXT "&Червоний:", 726 /*1094*/,254,126,32,10 EDITTEXT 706, 288,124,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&:",727/*1095*/,254,140,32,10 + LTEXT "&Зелений:",727/*1095*/,254,140,32,10 EDITTEXT 707, 288,138,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&:",728 /*1096*/,264,154,24,10 + LTEXT "С&иній:",728 /*1096*/,264,154,24,10 EDITTEXT 708, 288,152,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "³&:" ,723 /*1091*/,202,126,30,10 + LTEXT "Від&тінок:" ,723 /*1091*/,202,126,30,10 EDITTEXT 703, 234,124,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&:" ,724 /*1092*/,199,140,34,10 + LTEXT "&Контраст:" ,724 /*1092*/,199,140,34,10 EDITTEXT 704, 234,138,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&:" ,725 /*1093*/,202,154,30,10 + LTEXT "&Яскравість:" ,725 /*1093*/,202,154,30,10 EDITTEXT 705, 234,152,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP CONTROL "" ,720,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,14,140,86 CONTROL "" ,721,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,116,140,28 @@ -178,308 +181,308 @@ FONT 8, "MS Shell Dlg" CONTROL "" ,702,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 278,4,8,116 CONTROL "" ,709,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 152,124,40,26 DEFPUSHBUTTON "OK", IDOK, 4, 166, 44, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 52, 166, 44, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "", 1038,100,166, 44, 14 - PUSHBUTTON "& ", 712/*1024*/, 152, 166, 142, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "& >>", 719/*1025*/, 4, 150, 142, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 52, 166, 44, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Довідка", 1038,100,166, 44, 14 + PUSHBUTTON "&Додати до набору", 712/*1024*/, 152, 166, 142, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Визначити колір >>", 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" */ } FINDDLGORD DIALOG 36, 24, 245, 62 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Пошук" FONT 8, "MS Shell Dlg" { - LTEXT "&:", -1, 4, 8, 42, 8 + LTEXT "&Зразок:", -1, 4, 8, 42, 8 EDITTEXT 1152, 47, 7, 138, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP - CHECKBOX "& ", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX " &崳", 1041, 4, 42, 100, 12, BS_AUTOCHECKBOX | WS_TABSTOP - GROUPBOX "", 1072, 107, 26, 78, 28 - CONTROL "&", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 40, 12 - CONTROL "&", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 152, 38, 30, 12 + CHECKBOX "&Лише слово цілком", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "Залік &реґістру", 1041, 4, 42, 100, 12, BS_AUTOCHECKBOX | WS_TABSTOP + GROUPBOX "Напрям", 1072, 107, 26, 78, 28 + CONTROL "&Вгору", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 40, 12 + CONTROL "В&низ", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 152, 38, 30, 12 - DEFPUSHBUTTON "& ", IDOK, 190, 5, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "", IDCANCEL , 190, 23, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", pshHelp , 190, 45, 50, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "З&найти далі", IDOK, 190, 5, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Скасувати", IDCANCEL , 190, 23, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Довідка", pshHelp , 190, 45, 50, 14, WS_GROUP | WS_TABSTOP } REPLACEDLGORD DIALOG 36, 24, 230, 94 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Заміна" FONT 8, "MS Shell Dlg" { - LTEXT "&:", -1, 4, 9, 48, 8 + LTEXT "&Зразок:", -1, 4, 9, 48, 8 EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "& :", -1, 4, 26, 48, 8 + LTEXT "З&амінити на:", -1, 4, 26, 48, 8 EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP - CHECKBOX "& ", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX " &崳", 1041, 5, 62, 104, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Лише слово цілком", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "Залік &реґістру", 1041, 5, 62, 104, 12, BS_AUTOCHECKBOX | WS_TABSTOP - DEFPUSHBUTTON "& ", IDOK, 174, 4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "&", psh1 , 174, 21, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON " &", psh2 , 174, 38, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL , 174, 55, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", pshHelp , 174, 75, 50, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "З&найти далі", IDOK, 174, 4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "&Замінити", psh1 , 174, 21, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Замінити &все", psh2 , 174, 38, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL , 174, 55, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Довідка", pshHelp , 174, 75, 50, 14, WS_GROUP | WS_TABSTOP } PRINT32 DIALOG 32, 32, 288, 186 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CONTEXTHELP | DS_3DLOOK -CAPTION "" +CAPTION "Друк" FONT 8, "MS Shell Dlg" { DEFPUSHBUTTON "OK", IDOK, 180,164, 48,14, WS_GROUP | BS_DEFPUSHBUTTON - PUSHBUTTON "", IDCANCEL, 232,164, 48,14, WS_GROUP - PUSHBUTTON "&", pshHelp, 50, 161, 48,14, WS_GROUP + PUSHBUTTON "Скасувати", IDCANCEL, 232,164, 48,14, WS_GROUP + PUSHBUTTON "&Довідка", pshHelp, 50, 161, 48,14, WS_GROUP - GROUPBOX "", grp4, 8, 4, 272,84, WS_GROUP - CONTROL " &", chx1, "Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,212,70,64,12 - PUSHBUTTON "&", psh2, 212, 17, 60,14, WS_GROUP - LTEXT "&':", stc6, 16, 20, 46,8 + GROUPBOX "Принтер", grp4, 8, 4, 272,84, WS_GROUP + CONTROL "Друк у фай&л", chx1, "Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,212,70,64,12 + PUSHBUTTON "&Властивості", psh2, 212, 17, 60,14, WS_GROUP + LTEXT "&Ім'я:", stc6, 16, 20, 46,8 COMBOBOX cmb4, 64, 18, 140,152,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP - LTEXT ":", stc8, 16, 36, 46,10, SS_NOPREFIX - LTEXT "", stc12, 64, 36, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT ":", stc7, 16, 48, 46,10, SS_NOPREFIX - LTEXT "", stc11, 64, 48, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT "̳:", stc10, 16, 60, 46,10, SS_NOPREFIX - LTEXT "", stc14, 64, 60, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT ":", stc9, 16, 72, 46,10, SS_NOPREFIX - LTEXT "", stc13, 64, 72, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Статус:", stc8, 16, 36, 46,10, SS_NOPREFIX + LTEXT "Емульовано", stc12, 64, 36, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Тип:", stc7, 16, 48, 46,10, SS_NOPREFIX + LTEXT "Емульовано", stc11, 64, 48, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Місце:", stc10, 16, 60, 46,10, SS_NOPREFIX + LTEXT "Емульовано", stc14, 64, 60, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Примітка:", stc9, 16, 72, 46,10, SS_NOPREFIX + LTEXT "Емульовано", stc13, 64, 72, 100,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - GROUPBOX "ﳿ", grp2, 160, 92, 120,64, WS_GROUP - LTEXT " &:",stc5,168,108,68,8 + GROUPBOX "Копії", grp2, 160, 92, 120,64, WS_GROUP + LTEXT "Число &копій:",stc5,168,108,68,8 ICON "", ico3, 162,124, 60,24, WS_GROUP | SS_CENTERIMAGE - CONTROL "&", chx2,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,230,130,42,12 + CONTROL "&Розбити", chx2,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,230,130,42,12 EDITTEXT edt3, 230,106, 42,12, WS_GROUP | ES_NUMBER - GROUPBOX "", grp1, 8,92, 144,64, WS_GROUP - CONTROL "&", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,106,64,12 - CONTROL "&", rad3,"Button",BS_AUTORADIOBUTTON,16,122,50,12 - CONTROL "&", rad2,"Button",BS_AUTORADIOBUTTON,16,138,64,12 + GROUPBOX "Друкувати", grp1, 8,92, 144,64, WS_GROUP + CONTROL "&Все", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,106,64,12 + CONTROL "&Сторінки", rad3,"Button",BS_AUTORADIOBUTTON,16,122,50,12 + CONTROL "&Виділення", rad2,"Button",BS_AUTORADIOBUTTON,16,138,64,12 EDITTEXT edt1, 85,122, 20,12, WS_GROUP | ES_NUMBER EDITTEXT edt2, 120,122, 20,12, WS_GROUP | ES_NUMBER - RTEXT "&:", stc2, 70,124, 12,8 - RTEXT "&:", stc3, 106,124, 10,8 + RTEXT "&від:", stc2, 70,124, 12,8 + RTEXT "&до:", stc3, 106,124, 10,8 } PRINT32_SETUP DIALOG 32, 32, 288, 178 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_CONTEXTHELP | DS_3DLOOK -CAPTION " " +CAPTION "Установки принтера" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK",IDOK,180,156,48,14,WS_GROUP - PUSHBUTTON "",IDCANCEL,232,156,48,14 -/* PUSHBUTTON "ѳ...", psh5, 284,156,48,14 */ + PUSHBUTTON "Скасувати",IDCANCEL,232,156,48,14 +/* PUSHBUTTON "Сітка...", psh5, 284,156,48,14 */ - GROUPBOX "", grp4, 8, 4, 272,84, WS_GROUP - PUSHBUTTON "&", psh2, 212, 17, 60,14, WS_GROUP - LTEXT "&':", stc6, 16, 20, 36,8 + GROUPBOX "Принтер", grp4, 8, 4, 272,84, WS_GROUP + PUSHBUTTON "&Властивості", psh2, 212, 17, 60,14, WS_GROUP + LTEXT "&Ім'я:", stc6, 16, 20, 36,8 COMBOBOX cmb1, 52, 18, 152,152,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP - LTEXT ":", stc8, 16, 36, 36,10, SS_NOPREFIX - LTEXT "", stc12, 52, 36, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT ":", stc7, 16, 48, 36,10, SS_NOPREFIX - LTEXT "", stc11, 52, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT "̳:", stc10, 16, 60, 36,10, SS_NOPREFIX - LTEXT "", stc14, 52, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT ":", stc9, 16, 72, 36,10, SS_NOPREFIX - LTEXT "", stc13, 52, 72, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Статус:", stc8, 16, 36, 36,10, SS_NOPREFIX + LTEXT "Емульовано", stc12, 52, 36, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Тип:", stc7, 16, 48, 36,10, SS_NOPREFIX + LTEXT "Емульовано", stc11, 52, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Місце:", stc10, 16, 60, 36,10, SS_NOPREFIX + LTEXT "Емульовано", stc14, 52, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP + LTEXT "Примітки:", stc9, 16, 72, 36,10, SS_NOPREFIX + LTEXT "Емульовані", stc13, 52, 72, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - GROUPBOX "", grp2, 8, 92, 164,56, WS_GROUP - LTEXT "&:", stc2, 16,108, 36, 8 + GROUPBOX "Папір", grp2, 8, 92, 164,56, WS_GROUP + LTEXT "Роз&мір:", stc2, 16,108, 36, 8 COMBOBOX cmb2, 52,106, 112,112,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP - LTEXT "&:", stc3, 16,128, 36, 8 + LTEXT "&Джерело:", stc3, 16,128, 36, 8 COMBOBOX cmb3, 52,126, 112,112,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP - GROUPBOX "", grp1, 180, 92, 100,56, WS_GROUP + GROUPBOX "Орієнтація", grp1, 180, 92, 100,56, WS_GROUP ICON "", ico1, 195,112, 18,20, WS_GROUP - CONTROL "&", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP |WS_TABSTOP,224,106,52,12 - CONTROL "&", rad2,"Button",BS_AUTORADIOBUTTON,224,126,52,12 + CONTROL "&Портрет", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP |WS_TABSTOP,224,106,52,12 + CONTROL "Л&андшафт", rad2,"Button",BS_AUTORADIOBUTTON,224,126,52,12 END PAGESETUPDLGORD DIALOG 32, 32, 240, 240 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Параметри сторінки" FONT 8, "MS Shell Dlg" BEGIN 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 + 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 - LTEXT "&:", stc3, 16, 132, 36, 8 + LTEXT "Пода&ча:", stc3, 16, 132, 36, 8 COMBOBOX cmb3, 64, 130, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL - GROUPBOX "", grp1, 8, 156, 64, 56, BS_GROUPBOX - AUTORADIOBUTTON "&", rad1, 16, 170, 52, 12, BS_AUTORADIOBUTTON - AUTORADIOBUTTON "&", rad2, 16, 190, 52, 12, BS_AUTORADIOBUTTON - GROUPBOX "", grp4, 80, 156, 152, 56, BS_GROUPBOX - LTEXT "&:", stc15, 88, 172, 21, 8 + GROUPBOX "Орієнтація", grp1, 8, 156, 64, 56, BS_GROUPBOX + AUTORADIOBUTTON "К&нижкова", rad1, 16, 170, 52, 12, BS_AUTORADIOBUTTON + AUTORADIOBUTTON "Аль&бомна", rad2, 16, 190, 52, 12, BS_AUTORADIOBUTTON + GROUPBOX "Поля", grp4, 80, 156, 152, 56, BS_GROUPBOX + LTEXT "З&ліва:", stc15, 88, 172, 21, 8 EDITTEXT edt4, 111, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER - LTEXT "&:", stc16, 159, 172, 27, 8 + LTEXT "С&права:", stc16, 159, 172, 27, 8 EDITTEXT edt6, 187, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER - LTEXT "&:", stc17, 88, 192, 21, 8 + LTEXT "З&верху:", stc17, 88, 192, 21, 8 EDITTEXT edt5, 111, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER - LTEXT "&:", stc18, 159, 192, 23, 8 + LTEXT "З&низу:", stc18, 159, 192, 23, 8 EDITTEXT edt7, 187, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER DEFPUSHBUTTON "OK", IDOK, 71, 220, 50, 14, BS_PUSHBUTTON - PUSHBUTTON "", IDCANCEL, 126, 220, 50, 14 - PUSHBUTTON "&...", psh3, 184, 220, 48, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 126, 220, 50, 14 + PUSHBUTTON "П&ринтер...", psh3, 184, 220, 48, 14 END NEWFILEOPENORD DIALOG 0, 0, 280, 164 STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN -CAPTION "³" +CAPTION "Відкрити" FONT 8, "MS Shell Dlg" { - LTEXT " &",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY + LTEXT "Шукати &в",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY COMBOBOX IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP LTEXT "" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | NOT WS_VISIBLE LISTBOX IDC_SHELLSTATIC,4,20,272,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE - LTEXT "' &:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY + LTEXT "Ім'я &файлу:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY EDITTEXT IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL - LTEXT " &",IDC_FILETYPESTATIC,5,128,42,8, SS_NOTIFY + LTEXT "Файли &типу",IDC_FILETYPESTATIC,5,128,42,8, SS_NOTIFY COMBOBOX IDC_FILETYPE,54,126,155,53,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL " &",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10 + CONTROL "Лише для &читання",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10 - DEFPUSHBUTTON "&³", IDOK,222,110,50,14 - PUSHBUTTON "", IDCANCEL,222,128,50,14 - PUSHBUTTON "&", pshHelp,222,145,50,14 + DEFPUSHBUTTON "&Відкрити", IDOK,222,110,50,14 + PUSHBUTTON "Скасувати", IDCANCEL,222,128,50,14 + PUSHBUTTON "&Довідка", pshHelp,222,145,50,14 } STRINGTABLE { - IDS_ABOUTBOX "& " - IDS_DOCUMENTFOLDERS " " - IDS_PERSONAL " " - IDS_FAVORITES "" - IDS_PATH " " - IDS_DESKTOP "" - IDS_FONTS "" - IDS_MYCOMPUTER "̳ '" + IDS_ABOUTBOX "&Про тест ВибірТеки" + IDS_DOCUMENTFOLDERS "Теки документів" + IDS_PERSONAL "Мої документи" + IDS_FAVORITES "Закладки" + IDS_PATH "Системний шлях" + IDS_DESKTOP "Стільниця" + IDS_FONTS "Шрифти" + IDS_MYCOMPUTER "Мій комп'ютер" } STRINGTABLE { - IDS_SYSTEMFOLDERS " " - IDS_LOCALHARDRIVES " " - IDS_FILENOTFOUND " " - IDS_VERIFYFILE ", ' " - IDS_CREATEFILE " \n ?" - IDS_OVERWRITEFILE " .\n ?" - IDS_INVALID_FILENAME_TITLE " " - IDS_INVALID_FILENAME "' :\n / : < > |" - IDS_PATHNOTEXISTING " " - IDS_FILENOTEXISTING " " + IDS_SYSTEMFOLDERS "Системні теки" + IDS_LOCALHARDRIVES "Локальні жорсткі диски" + IDS_FILENOTFOUND "Файл не знайдено" + IDS_VERIFYFILE "Перевірте, чи правильно вказано ім'я файлу" + IDS_CREATEFILE "Файл не існує\nЧи хочете Ви його створити?" + IDS_OVERWRITEFILE "Файл уже існує.\nЗамінити його?" + IDS_INVALID_FILENAME_TITLE "Невірний символ в запису шляху" + IDS_INVALID_FILENAME "Ім'я файлу не може містити наступні символи:\n / : < > |" + IDS_PATHNOTEXISTING "Шлях не існує" + IDS_FILENOTEXISTING "Файл не існує" } STRINGTABLE { - IDS_UPFOLDER " " - IDS_NEWFOLDER " " - IDS_LISTVIEW "" - IDS_REPORTVIEW "" - IDS_TODESKTOP " " + IDS_UPFOLDER "Вгору на один рівень" + IDS_NEWFOLDER "Створити нову теку" + IDS_LISTVIEW "Список" + IDS_REPORTVIEW "Подробиці" + IDS_TODESKTOP "Перехід на стільницю" } STRINGTABLE { - PD32_PRINT_TITLE "" + PD32_PRINT_TITLE "Друк" - PD32_VALUE_UREADABLE " " - PD32_INVALID_PAGE_RANGE " \n\ - %d %d" - PD32_FROM_NOT_ABOVE_TO " ² :" - PD32_MARGINS_OVERLAP " \ - .\n " - PD32_NR_OF_COPIES_EMPTY " \ -" - PD32_TOO_LARGE_COPIES " \ - .\n 1 %d" - PD32_PRINT_ERROR " " - PD32_NO_DEFAULT_PRINTER " , " - PD32_CANT_FIND_PRINTER " " - PD32_OUT_OF_MEMORY " '" - PD32_GENERIC_ERROR "() ()" - PD32_DRIVER_UNKNOWN " " - PD32_NO_DEVICES " \ - . \ - ." + PD32_VALUE_UREADABLE "Нечитаємий елемент" + PD32_INVALID_PAGE_RANGE "Це значення не лежить у діапазоні сторінок\n\ +Введіть значенне між %d та %d" + PD32_FROM_NOT_ABOVE_TO "Значення ВІД не повинно перевищувати ДО:" + PD32_MARGINS_OVERLAP "Межі перекривають чи перевищують \ +розміри паперу.\nВведіть їх наново" + PD32_NR_OF_COPIES_EMPTY "Значення Числа Копій не може бути \ +пустим" + PD32_TOO_LARGE_COPIES "Така велика кількість копій не \ +може бути надрукована Вашим принтером.\nВведіть значення між 1 та %d" + PD32_PRINT_ERROR "Виникла помилка принтера" + PD32_NO_DEFAULT_PRINTER "Немає принтера, поставленого за обумовленням" + PD32_CANT_FIND_PRINTER "Не вдалось знайти принтер" + PD32_OUT_OF_MEMORY "Мало пам'яті" + PD32_GENERIC_ERROR "Виникла(и) помилка(и)" + PD32_DRIVER_UNKNOWN "Невідомий драйвер принтера" + PD32_NO_DEVICES "Перед запуском таких дій як налаштування \ +сторінки чи друкування вам треба встановити принтер. \ +Встановіть принтер та спробуйте знов." - PD32_DEFAULT_PRINTER " ; " - PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d " - PD32_MARGINS_IN_INCHES " []" - PD32_MARGINS_IN_MILLIMETERS " []" - PD32_MILLIMETERS "" + PD32_DEFAULT_PRINTER "Принтер за обумовленням; " + PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d документів у черзі" + PD32_MARGINS_IN_INCHES "Межі [дюйми]" + PD32_MARGINS_IN_MILLIMETERS "Межі [мм]" + PD32_MILLIMETERS "мм" - PD32_PRINTER_STATUS_READY "" - PD32_PRINTER_STATUS_PAUSED "; " - PD32_PRINTER_STATUS_ERROR "; " - PD32_PRINTER_STATUS_PENDING_DELETION " ; " - PD32_PRINTER_STATUS_PAPER_JAM " ; " - PD32_PRINTER_STATUS_PAPER_OUT " ; " - PD32_PRINTER_STATUS_MANUAL_FEED " ; " - PD32_PRINTER_STATUS_PAPER_PROBLEM " ; " - PD32_PRINTER_STATUS_OFFLINE " offline; " - PD32_PRINTER_STATUS_IO_ACTIVE "/ ; " - PD32_PRINTER_STATUS_BUSY "; " - PD32_PRINTER_STATUS_PRINTING " ; " - PD32_PRINTER_STATUS_OUTPUT_BIN_FULL " ; " - PD32_PRINTER_STATUS_NOT_AVAILABLE " ; " - PD32_PRINTER_STATUS_WAITING "; " - PD32_PRINTER_STATUS_PROCESSING "; " - PD32_PRINTER_STATUS_INITIALIZING "; " - PD32_PRINTER_STATUS_WARMING_UP "; " - PD32_PRINTER_STATUS_TONER_LOW " ; " - PD32_PRINTER_STATUS_NO_TONER " ; " + PD32_PRINTER_STATUS_READY "Готово" + PD32_PRINTER_STATUS_PAUSED "Призупинено; " + PD32_PRINTER_STATUS_ERROR "Помилка; " + PD32_PRINTER_STATUS_PENDING_DELETION "Чекання видалення; " + PD32_PRINTER_STATUS_PAPER_JAM "Папір застряг; " + PD32_PRINTER_STATUS_PAPER_OUT "Не вистачає паперу; " + PD32_PRINTER_STATUS_MANUAL_FEED "Поставте папір вручну; " + PD32_PRINTER_STATUS_PAPER_PROBLEM "Проблема с папером; " + PD32_PRINTER_STATUS_OFFLINE "Принтер в режимі offline; " + PD32_PRINTER_STATUS_IO_ACTIVE "Ввід/Вивід активний; " + PD32_PRINTER_STATUS_BUSY "Зайнятий; " + PD32_PRINTER_STATUS_PRINTING "Йде друк; " + PD32_PRINTER_STATUS_OUTPUT_BIN_FULL "Лоток переповнений папером; " + PD32_PRINTER_STATUS_NOT_AVAILABLE "Не доступний; " + PD32_PRINTER_STATUS_WAITING "Чекання; " + PD32_PRINTER_STATUS_PROCESSING "Обробка; " + PD32_PRINTER_STATUS_INITIALIZING "Готування; " + PD32_PRINTER_STATUS_WARMING_UP "Прогрів; " + PD32_PRINTER_STATUS_TONER_LOW "Тонер при кінці; " + PD32_PRINTER_STATUS_NO_TONER "Нема тонера; " PD32_PRINTER_STATUS_PAGE_PUNT "Page punt; " - PD32_PRINTER_STATUS_USER_INTERVENTION " ; " - PD32_PRINTER_STATUS_OUT_OF_MEMORY " '; " - PD32_PRINTER_STATUS_DOOR_OPEN " ; " - PD32_PRINTER_STATUS_SERVER_UNKNOWN " ; " - PD32_PRINTER_STATUS_POWER_SAVE " ; " + PD32_PRINTER_STATUS_USER_INTERVENTION "Перервано користувачем; " + PD32_PRINTER_STATUS_OUT_OF_MEMORY "Мало пам'яті; " + PD32_PRINTER_STATUS_DOOR_OPEN "Кришка принтера відкрита; " + PD32_PRINTER_STATUS_SERVER_UNKNOWN "Невідомий сервер принтера; " + PD32_PRINTER_STATUS_POWER_SAVE "Живлення в безпечному режимі; " } STRINGTABLE /* Font styles */ { - IDS_FONT_REGULAR "" - IDS_FONT_BOLD "" - IDS_FONT_ITALIC "" - IDS_FONT_BOLD_ITALIC " " + IDS_FONT_REGULAR "Нормальний" + IDS_FONT_BOLD "Жирний" + IDS_FONT_ITALIC "Курсив" + IDS_FONT_BOLD_ITALIC "Жирний курсив" } STRINGTABLE /* Color names */ { - IDS_COLOR_BLACK "" - IDS_COLOR_MAROON "" - IDS_COLOR_GREEN "" - IDS_COLOR_OLIVE "" - IDS_COLOR_NAVY "-" - IDS_COLOR_PURPLE "" - IDS_COLOR_TEAL "-" - IDS_COLOR_GRAY "ѳ" - IDS_COLOR_SILVER "" - IDS_COLOR_RED "" - IDS_COLOR_LIME "" - IDS_COLOR_YELLOW "" - IDS_COLOR_BLUE "" - IDS_COLOR_FUCHSIA "" - IDS_COLOR_AQUA "" - IDS_COLOR_WHITE "" + IDS_COLOR_BLACK "Чорний" + IDS_COLOR_MAROON "Коричневий" + IDS_COLOR_GREEN "Зелений" + IDS_COLOR_OLIVE "Оливковий" + IDS_COLOR_NAVY "Темно-синій" + IDS_COLOR_PURPLE "Пурпуровий" + IDS_COLOR_TEAL "Синьо-зелений" + IDS_COLOR_GRAY "Сірий" + IDS_COLOR_SILVER "Сріблястий" + IDS_COLOR_RED "Червоний" + IDS_COLOR_LIME "Салатовий" + IDS_COLOR_YELLOW "Жовтий" + IDS_COLOR_BLUE "Синій" + IDS_COLOR_FUCHSIA "Малиновий" + IDS_COLOR_AQUA "Блакитний" + IDS_COLOR_WHITE "Білий" } STRINGTABLE { - IDS_FONT_SIZE " %d - %d ." - IDS_SAVE_BUTTON "&" - IDS_SAVE_IN " &:" - IDS_SAVE "" - IDS_SAVE_AS " " - IDS_OPEN_FILE "³ " + IDS_FONT_SIZE "Биберіть шрифт розміром %d - %d пунктів." + IDS_SAVE_BUTTON "&Зберегти" + IDS_SAVE_IN "Зберегти &в:" + IDS_SAVE "Зберегти" + IDS_SAVE_AS "Зберегти як" + IDS_OPEN_FILE "Відкрити файл" } diff --git a/dll/win32/comdlg32/rsrc.rc b/dll/win32/comdlg32/rsrc.rc index 0389e7ddb97..0c204beba0e 100644 --- a/dll/win32/comdlg32/rsrc.rc +++ b/dll/win32/comdlg32/rsrc.rc @@ -55,7 +55,6 @@ #include "cdlg_Sv.rc" #include "cdlg_Th.rc" #include "cdlg_Tr.rc" -#include "cdlg_Uk.rc" /* UTF-8 */ #include "cdlg_Da.rc" @@ -71,4 +70,5 @@ #include "cdlg_Ru.rc" #include "cdlg_Si.rc" #include "cdlg_Sr.rc" +#include "cdlg_Uk.rc" #include "cdlg_Zh.rc" diff --git a/dll/win32/crtdll/CMakeLists.txt b/dll/win32/crtdll/CMakeLists.txt index f81cb48dc2f..3bc01d6a721 100644 --- a/dll/win32/crtdll/CMakeLists.txt +++ b/dll/win32/crtdll/CMakeLists.txt @@ -17,19 +17,20 @@ list(APPEND SOURCE crtdll.rc ${CMAKE_CURRENT_BINARY_DIR}/crtdll.def) -add_library(crtdll SHARED - ${CMAKE_CURRENT_BINARY_DIR}/crtdll_precomp.h.gch - ${SOURCE}) +add_library(crtdll SHARED ${SOURCE}) set_module_type(crtdll win32dll) set_entrypoint(crtdll DllMain@12) -target_link_libraries(crtdll - wine - crt) +target_link_libraries(crtdll wine crt) + +if(MSVC) + add_importlibs(crtdll msvcrt) + target_link_libraries(crtdll oldnames) +endif() add_importlibs(crtdll kernel32 ntdll) -add_pch(crtdll ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(crtdll precomp.h) add_cd_file(TARGET crtdll DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/crtdll/crtdll.spec b/dll/win32/crtdll/crtdll.spec index 091a2c42562..38f2fb36b7b 100644 --- a/dll/win32/crtdll/crtdll.spec +++ b/dll/win32/crtdll/crtdll.spec @@ -1,5 +1,5 @@ # Old C runtime library. All functions provided by msvcrt - + @ cdecl ??2@YAPAXI@Z(long) msvcrt.??2@YAPAXI@Z @ cdecl ??3@YAXPAX@Z(ptr) msvcrt.??3@YAXPAX@Z @ cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) msvcrt.?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z @@ -94,7 +94,7 @@ @ cdecl _fgetchar() msvcrt._fgetchar @ cdecl _fgetwchar() msvcrt._fgetwchar @ cdecl _filbuf(ptr) msvcrt._filbuf - @ extern _fileinfo_dll msvcrt._fileinfo + @ extern _fileinfo_dll @ cdecl _filelength(long) msvcrt._filelength @ cdecl _fileno(ptr) msvcrt._fileno @ cdecl _findclose(long) msvcrt._findclose @@ -166,9 +166,9 @@ @ cdecl _isnan( double ) msvcrt._isnan @ cdecl _itoa(long ptr long) msvcrt._itoa @ cdecl _itow(long ptr long) msvcrt._itow - @ cdecl _j0(double) msvcrt._j0 - @ cdecl _j1(double) msvcrt._j1 - @ cdecl _jn(long double) msvcrt._jn +# @ cdecl _j0(double) msvcrt._j0 +# @ cdecl _j1(double) msvcrt._j1 +# @ cdecl _jn(long double) msvcrt._jn @ cdecl _kbhit() msvcrt._kbhit @ cdecl _lfind(ptr ptr ptr long ptr) msvcrt._lfind @ cdecl _loaddll(str) msvcrt._loaddll @@ -334,9 +334,9 @@ @ cdecl _write(long ptr long) msvcrt._write @ cdecl _wtoi(wstr) msvcrt._wtoi @ cdecl _wtol(wstr) msvcrt._wtol - @ cdecl _y0(double) msvcrt._y0 - @ cdecl _y1(double) msvcrt._y1 - @ cdecl _yn(long double ) msvcrt._yn +# @ cdecl _y0(double) msvcrt._y0 +# @ cdecl _y1(double) msvcrt._y1 +# @ cdecl _yn(long double ) msvcrt._yn @ cdecl abort() msvcrt.abort @ cdecl abs(long) msvcrt.abs @ cdecl acos(double) msvcrt.acos diff --git a/dll/win32/crtdll/dllmain.c b/dll/win32/crtdll/dllmain.c index 8af185b01c1..9565def92f4 100644 --- a/dll/win32/crtdll/dllmain.c +++ b/dll/win32/crtdll/dllmain.c @@ -46,6 +46,7 @@ unsigned int CRTDLL__osmajor_dll; unsigned int CRTDLL__osminor_dll; unsigned int CRTDLL__osmode_dll; unsigned int CRTDLL__osversion_dll; +int _fileinfo_dll; extern char* _acmdln; /* pointer to ascii command line */ extern wchar_t* _wcmdln; /* pointer to wide character command line */ diff --git a/dll/win32/crypt32/CMakeLists.txt b/dll/win32/crypt32/CMakeLists.txt index c4492e3019e..22e772dd876 100644 --- a/dll/win32/crypt32/CMakeLists.txt +++ b/dll/win32/crypt32/CMakeLists.txt @@ -1,8 +1,6 @@ add_definitions( -D__WINESRC__ - -D_DLL - -D__USE_CRTIMP -D_WINE) remove_definitions(-D_WIN32_WINNT=0x502) @@ -40,7 +38,6 @@ list(APPEND SOURCE store.c str.c crypt32.rc - version.rc ${CMAKE_CURRENT_BINARY_DIR}/crypt32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/crypt32.def) @@ -54,6 +51,5 @@ target_link_libraries(crypt32 oldnames) add_importlibs(crypt32 user32 advapi32 msvcrt kernel32 ntdll) - add_cd_file(TARGET crypt32 DESTINATION reactos/system32 FOR all) add_importlib_target(crypt32.spec) diff --git a/dll/win32/dbghelp/CMakeLists.txt b/dll/win32/dbghelp/CMakeLists.txt index 4b1c073b8a8..59eacd22aba 100644 --- a/dll/win32/dbghelp/CMakeLists.txt +++ b/dll/win32/dbghelp/CMakeLists.txt @@ -1,16 +1,14 @@ add_definitions( -D__WINESRC__ - -D_DLL - -D__USE_CRTIMP -D_WINE -DHAVE_REGEX_H -DHAVE_ALLOCA_H -D_IMAGEHLP_SOURCE_) if(ARCH MATCHES amd64) -add_definitions(-DUNW_FLAG_NHANDLER=0 -DUNW_FLAG_EHANDLER=1 -DUNW_FLAG_UHANDLER=2 -DUNW_FLAG_CHAININFO=3) -endif(ARCH MATCHES amd64) + add_definitions(-DUNW_FLAG_NHANDLER=0 -DUNW_FLAG_EHANDLER=1 -DUNW_FLAG_UHANDLER=2 -DUNW_FLAG_CHAININFO=3) +endif() include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -49,7 +47,6 @@ list(APPEND SOURCE add_library(dbghelp SHARED ${SOURCE}) set_module_type(dbghelp win32dll) - target_link_libraries(dbghelp wine ${PSEH_LIB} diff --git a/dll/win32/devmgr/CMakeLists.txt b/dll/win32/devmgr/CMakeLists.txt index 024f8df3f2a..07959c66ad5 100644 --- a/dll/win32/devmgr/CMakeLists.txt +++ b/dll/win32/devmgr/CMakeLists.txt @@ -14,7 +14,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/devmgr_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/devmgr.def) -add_library(devmgr SHARED ${CMAKE_CURRENT_BINARY_DIR}/devmgr_precomp.h.gch ${SOURCE}) +add_library(devmgr SHARED ${SOURCE}) set_module_type(devmgr win32dll) @@ -29,7 +29,7 @@ add_importlibs(devmgr kernel32 ntdll) -add_pch(devmgr ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(devmgr precomp.h) add_cd_file(TARGET devmgr DESTINATION reactos/system32 FOR all) add_importlib_target(devmgr.spec) diff --git a/dll/win32/devmgr/devmgr.rc b/dll/win32/devmgr/devmgr.rc index c5541488d6f..5843b121e96 100644 --- a/dll/win32/devmgr/devmgr.rc +++ b/dll/win32/devmgr/devmgr.rc @@ -24,9 +24,12 @@ IDI_DEVMGR ICON "resources/devmgr.ico" #include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" +#include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/devmgr/lang/pl-PL.rc b/dll/win32/devmgr/lang/pl-PL.rc index 3f71bb18ec4..adc739f30a9 100644 --- a/dll/win32/devmgr/lang/pl-PL.rc +++ b/dll/win32/devmgr/lang/pl-PL.rc @@ -1,11 +1,11 @@ -// Polish language resource file (Sebastian Gasiorek,Wiktor Maryniowski, 2005-12-12) /* -* update by xrogers (13.04.2007) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -* -* updates by Caemyr - Olaf Siejka (Jan 2008, Jan 2010) -*/ + * translated by (Sebastian Gasiorek,Wiktor Maryniowski, 2005-12-12) + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * updated by xrogers (13.04.2007) + * updated by Caemyr - Olaf Siejka (Jan 2008, Jan 2010) + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -15,114 +15,114 @@ BEGIN IDS_TYPE "Typ" IDS_MANUFACTURER "Producent: %1" IDS_LOCATION "Lokalizacja: %1" - IDS_STATUS "Stan urzdzenia: %1" - IDS_UNKNOWN "Niedostpne" + IDS_STATUS "Stan urządzenia: %1" + IDS_UNKNOWN "Niedostępne" IDS_LOCATIONSTR "Lokalizacja %1!u! (%2)" IDS_DEVCODE " (Kod %1!u!)" IDS_DEVCODE2 " (Kod %2!u!)" - IDS_ENABLEDEVICE "Uywaj tego urzdzenia (wczone)" - IDS_DISABLEDEVICE "Nie uywaj tego urzdzenia (wyczone)" - IDS_UNKNOWNDEVICE "Nieznane urzdzenie" - IDS_NODRIVERLOADED "Nie zainstalowano sterownika dla tego urzdzenia." - IDS_DEVONPARENT "wczone %1" + IDS_ENABLEDEVICE "Używaj tego urządzenia (włączone)" + IDS_DISABLEDEVICE "Nie używaj tego urządzenia (wyłączone)" + IDS_UNKNOWNDEVICE "Nieznane urządzenie" + IDS_NODRIVERLOADED "Nie zainstalowano sterownika dla tego urządzenia." + IDS_DEVONPARENT "włączone %1" IDS_TROUBLESHOOTDEV "&Konflikty..." - IDS_ENABLEDEV "&Wcz urzdzenie" + IDS_ENABLEDEV "&Włącz urządzenie" IDS_REINSTALLDRV "&Zainstaluj sterownik ponownie" - IDS_PROPERTIES "Waciwoc&i" + IDS_PROPERTIES "Właściwośc&i" IDS_UPDATEDRV "&Aktualizuj sterownik..." IDS_REBOOT "&Uruchom komputer ponownie..." - IDS_NOTAVAILABLE "Niedostpne" + IDS_NOTAVAILABLE "Niedostępne" IDS_NOTDIGITALLYSIGNED "Niepodpisany cyfrowo" - IDS_NODRIVERS "adne pliki sterownika nie s potrzebne albo nie zostay zaadowane dla tego urzdzenia." + IDS_NODRIVERS "Żadne pliki sterownika nie są potrzebne albo nie zostały załadowane dla tego urządzenia." END /* error messages, source: http://www.z123.org/techsupport/medm.htm */ STRINGTABLE BEGIN - IDS_DEV_NO_PROBLEM "To urzdzenie dziaa prawidowo." - IDS_DEV_NOT_CONFIGURED "To urzdzenie nie jest poprawnie skonfigurowane." - IDS_DEV_DEVLOADER_FAILED "ReactOS nie moe zaadowa sterownika dla tego urzdzenia, poniewa system raportuje dwa rodzaje magistrali typu $1." - IDS_DEV_DEVLOADER_FAILED2 "System adowania sprztu $1 nie mg zaadowa sterownika dla tego urzdzenia." - IDS_DEV_OUT_OF_MEMORY "Sterownik dla tego urzdzenia moe nie by prawidowy lub system moe nie pracowa poprawnie." - IDS_DEV_ENTRY_IS_WRONG_TYPE "Urzdzenie nie dziaa poprawnie, poniewa jeden ze sterownikw nie jest prawidowy lub jest le zarejestrowany." - IDS_DEV_LACKED_ARBITRATOR "Sterownik urzdzenia wymaga zasobw, ktrych ReactOS nie potrafi przydzieli." - IDS_DEV_BOOT_CONFIG_CONFLICT "Inne urzdzenie uywa danych zasobw." - IDS_DEV_FAILED_FILTER "Sterownik dla tego urzdzenia powinien by zainstalowany ponownie." - IDS_DEV_DEVLOADER_NOT_FOUND "Urzdzenie nie dziaa prawidowo, poniewa ReactOS nie mg zaadowa pliku $1, ktry aduje sterownik dla tego urzdzenia." - IDS_DEV_DEVLOADER_NOT_FOUND2 "Urzdzenie nie dziaa prawidowo, poniewa plik $1, ktry aduje sterownik dla tego urzdzenia jest bdny." - IDS_DEV_DEVLOADER_NOT_FOUND3 "Bd urzdzenia: Sprbuj zmieni sterownik tego urzdzenia. Jeli to nie pomoe, poszukaj rozwizania w dokumentacji sprztowej." - IDS_DEV_INVALID_DATA "Urzdzenie nie dziaa prawidowo, poniewa BIOS Twojego komputera raportuje, e zasoby dla urzdzenia nie s prawidowe." - IDS_DEV_INVALID_DATA2 "Urzdzenie nie dziaa prawidowo, poniewa BIOS urzdzenia raportuje, e zasoby dla urzdzenia nie s prawidowe. " - IDS_DEV_FAILED_START "Urzdzenie nie jest obecne, nie dziaa poprawnie lub nie wszystkie sterowniki urzdzenia zostay zainstalowane." - IDS_DEV_LIAR "ReactOS zosta zatrzymany podczs prby uruchomienia urzdzenia, dlatego nie bdzie prbowa uruchamia tego urzdzenia w przyszoci." - IDS_DEV_NORMAL_CONFLICT "Urzdzenie nie mogo odnale adnych wolnych zasobw $1." - IDS_DEV_NOT_VERIFIED "Urzdzenie nie jest obecne, nie dziaa poprawnie lub nie wszystkie sterowniki urzdzenia zostay zainstalowane." - IDS_DEV_NEED_RESTART "Urzdzenie nie bdzie dziaa prawidowo dopki nie uruchomisz ponownie komputera." - IDS_DEV_REENUMERATION "To urzdzenie powoduje konflikt zasobw." - IDS_DEV_PARTIAL_LOG_CONF "ReactOS nie mg zidentyfikowa wszystkich zasobw, ktrych uywa urzdzenie." - IDS_DEV_UNKNOWN_RESOURCE "Plik informacji sterownika $1 informuje, e urzdzenie podrzdne uywa zasobw, ktrych nie rozpoznaje urzdzenie nadrzdne." - IDS_DEV_REINSTALL "Sterownik dla tego urzdzenia powinien by zainstalowany ponownie." - IDS_DEV_REGISTRY "Wpis moe nie by prawidowy." - IDS_DEV_WILL_BE_REMOVED "ReactOS usuwa to urzdzenie." - IDS_DEV_DISABLED "Urzdzenie nie zostao uruchomione." - IDS_DEV_DISABLED2 "Urzdzenie jest Wyczone." - IDS_DEV_DEVLOADER_NOT_READY "Systemy adowania sprztu nie mgy zaadowa wymaganego sterownika." - IDS_DEV_DEVLOADER_NOT_READY2 "Karta graficzna dziaa prawidowo." - IDS_DEV_DEVLOADER_NOT_READY3 "Systemy adowania sprztu nie mgy zaadowa wymaganego sterownika." - IDS_DEV_DEVICE_NOT_THERE "Urzdzenie nie jest obecne, nie dziaa poprawnie lub nie wszystkie sterowniki urzdzenia zostay zainstalowane." - IDS_DEV_MOVED "ReactOS prbuje skonfigurowa to urzdzenie." - IDS_DEV_TOO_EARLY "ReactOS prbuje skonfigurowa to urzdzenie." - IDS_DEV_NO_VALID_LOG_CONF "ReactOS nie potrafi odnale zasobw dla tego urzdzenia." - IDS_DEV_FAILED_INSTALL "Nie zainstalowano sterownika dla tego urzdzenia." - IDS_DEV_HARDWARE_DISABLED "Urzdzenie jest wyczone, poniewa BIOS nie przydzieli adnych zasobw dla tego urzdzenia." - IDS_DEV_CANT_SHARE_IRQ "Urzdzenie da przerwa (IRQ), ktrych uywa inne urzdzenie i ktrych nie mona rozdzieli. Musisz zmieni konfliktowe ustawienia lub usun sterownik powodujcy konflikt." - IDS_DEV_FAILED_ADD "Urzdzenie nie dziaa prawidowo, poniewa $1 rwnie nie dziaa poprawnie." - IDS_DEV_DISABLED_SERVICE "ReactOS nie mg zainstalowa sterownika dla urzdzenia, poniewa nie mg uzyska dostpu do lokacji zawartej w pliku instalacyjnym." - IDS_DEV_TRANSLATION_FAILED "Sterownik nie jest przeznaczony dla tego urzdzenia." - IDS_DEV_NO_SOFTCONFIG "ReactOS nie mg okreli ustawie dla tego urzdzenia. Poszukaj rozwizania w dokumentacji urzdzenia i uyj palety ustawie zasobw, aby skonfigurowa je rcznie." - IDS_DEV_BIOS_TABLE "Firmware Twojego komputera zawiera zbyt mao informacji, aby skonfigurowa i uywa tego urzdzenia. Aby uruchomi urzdzenie, skontaktuj si z producentem w celu uaktualnienia firmware-u lub BIOS-u." - IDS_DEV_IRQ_TRANSLATION_FAILED "Urzdzenie da przerwa PCI, chocia znajduje si w ISA (lub na odwrt). Zmie ustawienia przerwa dla tego urzdzenia korzystajc z konfiguratora systemu." - IDS_DEV_FAILED_DRIVER_ENTRY "ReactOS nie mg uruchomi sterownika dla tego urzdzenia." - IDS_DEV_DRIVER_FAILED_PRIOR_UNLOAD "ReactOS nie mg uruchomi sterownika dla tego urzdzenia, poniewa poprzedni sterownik jest nadal w pamici." - IDS_DEV_DRIVER_FAILED_LOAD "ReactOS nie mg uruchomi sterownika dla tego urzdzenia. Brak sterownika lub sterownik moe by uszkodzony." - IDS_DEV_DRIVER_SERVICE_KEY_INVALID "ReactOS nie mg uzyska dostpu do sprztu, poniewa brakuje klucza w rejestrze lub klucz nie jest zapisany prawidowo." - IDS_DEV_LEGACY_SERVICE_NO_DEVICES "ReactOS pomylnie uruchomi sterownik urzdzenia, ale nie odnalaz go fizycznie." - IDS_DEV_DUPLICATE_DEVICE "ReactOS nie mg uruchomi sterownika dla tego urzdzenia, poniewa identyczne urzdzenie pracuje obecnie w systemie." - IDS_DEV_FAILED_POST_START "ReactOS przerwa prac urzdzenia, poniewa zostay zgoszone problemy." - IDS_DEV_HALTED "Program lub usuga przerwaa dziaanie urzdzenia." - IDS_DEV_PHANTOM "Obecnie urzdzenie nie jest podczone do komputera." - IDS_DEV_SYSTEM_SHUTDOWN "ReactOS nie moe uzyska dostpu do urzdzenia, poniewa trwa zamykanie systemu." - IDS_DEV_HELD_FOR_EJECT "ReactOS nie moe uzyska dostpu do urzdzenia, poniewa urzdzenie to byo przygotowane do ""bezpiecznego usunicia"", ale nie zostao odczone." - IDS_DEV_DRIVER_BLOCKED "Oprogramowanie urzdzenia zostao zablokowane przy starcie, poniewa nie wsppracuje poprawnie z systemem ReactOS. Sprbuj zainstalowa nowszy sterownik." - IDS_DEV_REGISTRY_TOO_LARGE "ReactOS nie moe uruchomi nowego urzdzenia, poniewa jdro systemu jest zbyt wielkie (przekracza limit rozmiaru rejestru)." - IDS_DEV_SETPROPERTIES_FAILED "ReactOS nie by w stanie zmieni parametrw instalacyjnych tego urzdzenia." + IDS_DEV_NO_PROBLEM "To urządzenie działa prawidłowo." + IDS_DEV_NOT_CONFIGURED "To urządzenie nie jest poprawnie skonfigurowane." + IDS_DEV_DEVLOADER_FAILED "ReactOS nie może załadować sterownika dla tego urządzenia, ponieważ system raportuje dwa rodzaje magistrali typu $1." + IDS_DEV_DEVLOADER_FAILED2 "System ładowania sprzętu $1 nie mógł załadować sterownika dla tego urządzenia." + IDS_DEV_OUT_OF_MEMORY "Sterownik dla tego urządzenia może nie być prawidłowy lub system może nie pracować poprawnie." + IDS_DEV_ENTRY_IS_WRONG_TYPE "Urządzenie nie działa poprawnie, ponieważ jeden ze sterowników nie jest prawidłowy lub jest źle zarejestrowany." + IDS_DEV_LACKED_ARBITRATOR "Sterownik urządzenia wymaga zasobów, których ReactOS nie potrafi przydzielić." + IDS_DEV_BOOT_CONFIG_CONFLICT "Inne urządzenie używa żądanych zasobów." + IDS_DEV_FAILED_FILTER "Sterownik dla tego urządzenia powinien być zainstalowany ponownie." + IDS_DEV_DEVLOADER_NOT_FOUND "Urządzenie nie działa prawidłowo, ponieważ ReactOS nie mógł załadować pliku $1, który ładuje sterownik dla tego urządzenia." + IDS_DEV_DEVLOADER_NOT_FOUND2 "Urządzenie nie działa prawidłowo, ponieważ plik $1, który ładuje sterownik dla tego urządzenia jest błędny." + IDS_DEV_DEVLOADER_NOT_FOUND3 "Błąd urządzenia: Spróbuj zmienić sterownik tego urządzenia. Jeśli to nie pomoże, poszukaj rozwiązania w dokumentacji sprzętu." + IDS_DEV_INVALID_DATA "Urządzenie nie działa prawidłowo, ponieważ BIOS Twojego komputera raportuje, że zasoby dla urządzenia nie są prawidłowe." + IDS_DEV_INVALID_DATA2 "Urządzenie nie działa prawidłowo, ponieważ BIOS urządzenia raportuje, że zasoby dla urządzenia nie są prawidłowe. " + IDS_DEV_FAILED_START "Urządzenie nie jest obecne, nie działa poprawnie lub nie wszystkie sterowniki urządzenia zostały zainstalowane." + IDS_DEV_LIAR "ReactOS został zatrzymany podczs próby uruchomienia urządzenia, dlatego nie będzie próbował uruchamiać tego urządzenia w przyszłości." + IDS_DEV_NORMAL_CONFLICT "Urządzenie nie mogło odnaleźć żadnych wolnych zasobów $1." + IDS_DEV_NOT_VERIFIED "Urządzenie nie jest obecne, nie działa poprawnie lub nie wszystkie sterowniki urządzenia zostały zainstalowane." + IDS_DEV_NEED_RESTART "Urządzenie nie będzie działać prawidłowo dopóki nie uruchomisz ponownie komputera." + IDS_DEV_REENUMERATION "To urządzenie powoduje konflikt zasobów." + IDS_DEV_PARTIAL_LOG_CONF "ReactOS nie mógł zidentyfikować wszystkich zasobów, których używa urządzenie." + IDS_DEV_UNKNOWN_RESOURCE "Plik informacji sterownika $1 informuje, że urządzenie podrzędne używa zasobów, których nie rozpoznaje urządzenie nadrzędne." + IDS_DEV_REINSTALL "Sterownik dla tego urządzenia powinien być zainstalowany ponownie." + IDS_DEV_REGISTRY "Wpis może nie być prawidłowy." + IDS_DEV_WILL_BE_REMOVED "ReactOS usuwa to urządzenie." + IDS_DEV_DISABLED "Urządzenie nie zostało uruchomione." + IDS_DEV_DISABLED2 "Urządzenie jest wyłączone." + IDS_DEV_DEVLOADER_NOT_READY "Systemy ładowania sprzętu nie mógły załadować wymaganego sterownika." + IDS_DEV_DEVLOADER_NOT_READY2 "Karta graficzna działa prawidłowo." + IDS_DEV_DEVLOADER_NOT_READY3 "Systemy ładowania sprzętu nie mógły załadować wymaganego sterownika." + IDS_DEV_DEVICE_NOT_THERE "Urządzenie nie jest obecne, nie działa poprawnie lub nie wszystkie sterowniki urządzenia zostały zainstalowane." + IDS_DEV_MOVED "ReactOS jest w trakcie konfigurowania tego urządzenia." + IDS_DEV_TOO_EARLY "ReactOS jest w trakcie konfigurowania tego urządzenia." + IDS_DEV_NO_VALID_LOG_CONF "ReactOS nie potrafił odnaleźć zasobów dla tego urządzenia." + IDS_DEV_FAILED_INSTALL "Nie zainstalowano sterownika dla tego urządzenia." + IDS_DEV_HARDWARE_DISABLED "Urządzenie jest wyłączone, ponieważ BIOS nie przydzielił żadnych zasobów dla tego urządzenia." + IDS_DEV_CANT_SHARE_IRQ "Urządzenie żąda przerwania (IRQ), którego używa inne urządzenia i którego nie można współdzielić. Musisz zmienić ustawienia lub usunąć sterownik powodujący konflikt." + IDS_DEV_FAILED_ADD "Urządzenie nie działa prawidłowo, ponieważ $1 również nie działa poprawnie." + IDS_DEV_DISABLED_SERVICE "ReactOS nie mógł zainstalować sterownika dla urządzenia, ponieważ nie mógł uzyskać dostępu do lokacji zawartej w pliku instalacyjnym." + IDS_DEV_TRANSLATION_FAILED "Sterownik nie jest przeznaczony dla tego urządzenia." + IDS_DEV_NO_SOFTCONFIG "ReactOS nie mógł określić ustawień dla tego urządzenia. Poszukaj rozwiązania w dokumentacji urządzenia i użyj ustawień zasobów, aby skonfigurować je ręcznie." + IDS_DEV_BIOS_TABLE "Firmware Twojego komputera zawiera zbyt mało informacji, aby skonfigurować i używać tego urządzenia. Aby uruchomić urządzenie, skontaktuj się z producentem w celu uaktualnienia firmware-u lub BIOS-u." + IDS_DEV_IRQ_TRANSLATION_FAILED "Urządzenie żąda przerwań PCI, chociaż znajduje się w slocie ISA (lub na odwrót). Zmień ustawienia przerwań dla tego urządzenia korzystając z konfiguratora systemu." + IDS_DEV_FAILED_DRIVER_ENTRY "ReactOS nie mógł uruchomić sterownika dla tego urządzenia." + IDS_DEV_DRIVER_FAILED_PRIOR_UNLOAD "ReactOS nie mógł uruchomić sterownika dla tego urządzenia, ponieważ poprzedni sterownik jest nadal w pamięci." + IDS_DEV_DRIVER_FAILED_LOAD "ReactOS nie mógł uruchomić sterownika dla tego urządzenia. Brak sterownika lub sterownik może być uszkodzony." + IDS_DEV_DRIVER_SERVICE_KEY_INVALID "ReactOS nie mógł uzyskać dostępu do sprzętu, ponieważ brakuje klucza w rejestrze lub klucz nie jest zapisany prawidłowo." + IDS_DEV_LEGACY_SERVICE_NO_DEVICES "ReactOS pomyślnie uruchomił sterownik urządzenia, ale nie odnalazł go fizycznie." + IDS_DEV_DUPLICATE_DEVICE "ReactOS nie mógł uruchomić sterownika dla tego urządzenia, ponieważ identyczne urządzenie pracuje obecnie w systemie." + IDS_DEV_FAILED_POST_START "ReactOS przerwał pracę urządzenia, ponieważ zostały zgłoszone problemy." + IDS_DEV_HALTED "Program lub usługa przerwała działanie urządzenia." + IDS_DEV_PHANTOM "Obecnie urządzenie nie jest podłączone do komputera." + IDS_DEV_SYSTEM_SHUTDOWN "ReactOS nie może uzyskać dostępu do urządzenia, ponieważ trwa zamykanie systemu." + IDS_DEV_HELD_FOR_EJECT "ReactOS nie może uzyskać dostępu do urządzenia, ponieważ urządzenie to było przygotowane do ""bezpiecznego usunięcia"", ale nie zostało odłączone." + IDS_DEV_DRIVER_BLOCKED "Oprogramowanie urządzenia zostało zablokowane przy starcie, ponieważ nie współpracuje poprawnie z systemem ReactOS. Spróbuj zainstalować nowszy sterownik." + IDS_DEV_REGISTRY_TOO_LARGE "ReactOS nie może uruchomić nowego urządzenia, ponieważ jądro systemu jest zbyt wielkie (przekracza limit rozmiaru rejestru)." + IDS_DEV_SETPROPERTIES_FAILED "ReactOS nie był w stanie zmienić parametrów instalacyjnych tego urządzenia." END STRINGTABLE BEGIN - IDS_PROP_DEVICEID "cieka urzdzenia" - IDS_PROP_HARDWAREIDS "Identyfikator urzdzenia" + IDS_PROP_DEVICEID "Ścieżka urządzenia" + IDS_PROP_HARDWAREIDS "Identyfikator urządzenia" IDS_PROP_COMPATIBLEIDS "Zgodne identyfikatory" - IDS_PROP_MATCHINGDEVICEID "Uyty identyfikator" - IDS_PROP_SERVICE "Usuga" - IDS_PROP_ENUMERATOR "Modu lokalizujcy" - IDS_PROP_CAPABILITIES "Moliwoci" - IDS_PROP_DEVNODEFLAGS "Konfiguracja wza Devnode" - IDS_PROP_CONFIGFLAGS "Stan wza Config" - IDS_PROP_CSCONFIGFLAGS "Stan wza CSCONFIG" + IDS_PROP_MATCHINGDEVICEID "Użyty identyfikator" + IDS_PROP_SERVICE "Usługa" + IDS_PROP_ENUMERATOR "Moduł lokalizujący" + IDS_PROP_CAPABILITIES "Możliwości" + IDS_PROP_DEVNODEFLAGS "Konfiguracja węzła Devnode" + IDS_PROP_CONFIGFLAGS "Stan węzła Config" + IDS_PROP_CSCONFIGFLAGS "Stan węzła CSCONFIG" IDS_PROP_EJECTIONRELATIONS "Relacje wysuwania" IDS_PROP_REMOVALRELATIONS "Relacje usuwania" IDS_PROP_BUSRELATIONS "Relacje magistrali" - IDS_PROP_DEVUPPERFILTERS "Wysze filtry urzdzenia" - IDS_PROP_DEVLOWERFILTERS "Nisze filtry urzdzenia" - IDS_PROP_CLASSUPPERFILTERS "Wysze filtry klasy" - IDS_PROP_CLASSLOWERFILTERS "Nisze filtry klasy" + IDS_PROP_DEVUPPERFILTERS "Wyższe filtry urządzenia" + IDS_PROP_DEVLOWERFILTERS "Niższe filtry urządzenia" + IDS_PROP_CLASSUPPERFILTERS "Wyższe filtry klasy" + IDS_PROP_CLASSLOWERFILTERS "Niższe filtry klasy" IDS_PROP_CLASSINSTALLER "Instalator klasy" IDS_PROP_CLASSCOINSTALLER "Dodatkowy instalator klasy" - IDS_PROP_DEVICECOINSTALLER "Dodatkowy instalator urzdzenia" + IDS_PROP_DEVICECOINSTALLER "Dodatkowy instalator urządzenia" IDS_PROP_FIRMWAREREVISION "Wersja Firmware" - IDS_PROP_CURRENTPOWERSTATE "Biecy stan zasilania" - IDS_PROP_POWERCAPABILITIES "Zdolnoci trybu zasilania" + IDS_PROP_CURRENTPOWERSTATE "Bieżący stan zasilania" + IDS_PROP_POWERCAPABILITIES "Zdolności trybu zasilania" IDS_PROP_POWERSTATEMAPPINGS "Mapowania stanu zasilania" END @@ -130,36 +130,36 @@ IDD_HARDWARE DIALOGEX DISCARDABLE 0, 0, 300, 400 STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION | DS_SHELLFONT FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Urzdzenia:",IDC_DEVICES,7,6,196,10 + LTEXT "&Urządzenia:",IDC_DEVICES,7,6,196,10 CONTROL "",IDC_LV_DEVICES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,16,196,50 - GROUPBOX "Waciwoci urzdzenia",IDC_PROPERTIESGROUP,7,76,196,105 + GROUPBOX "Właściwości urządzenia",IDC_PROPERTIESGROUP,7,76,196,105 LTEXT "",IDC_MANUFACTURER,14,88,183,10,SS_ENDELLIPSIS LTEXT "",IDC_LOCATION,14,100,183,10,SS_ENDELLIPSIS LTEXT "",IDC_STATUS,14,112,183,30 - PUSHBUTTON "&Rozwizywanie problemw...",IDC_TROUBLESHOOT,85,140,54,14, + PUSHBUTTON "&Rozwiązywanie problemów...",IDC_TROUBLESHOOT,85,140,54,14, BS_PUSHBUTTON | WS_CHILD | WS_DISABLED | WS_TABSTOP - PUSHBUTTON "Waciwoci",IDC_PROPERTIES,146,140,50,14 + PUSHBUTTON "Właściwości",IDC_PROPERTIES,146,140,50,14 END IDD_DEVICEGENERAL DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT "Typ urzdzenia:", -1, 37, 39, 60, 8, SS_NOPREFIX + LTEXT "Typ urządzenia:", -1, 37, 39, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVTYPE, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY LTEXT "Producent:", -1, 37, 53, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVMANUFACTURER, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY LTEXT "Lokalizacja:", -1, 37, 67, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVLOCATION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - GROUPBOX "Stan urzdzenia", IDC_DEVSTATUSGROUP, 7, 83, 238, 100 + GROUPBOX "Stan urządzenia", IDC_DEVSTATUSGROUP, 7, 83, 238, 100 EDITTEXT IDC_DEVSTATUS, 14, 96, 224, 61, NOT WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL - PUSHBUTTON "&Rozwizywanie problemw...", IDC_DEVPROBLEM, 148, 163, 90, 15 - LTEXT "&Uycie urzdzenia:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED + PUSHBUTTON "&Rozwiązywanie problemów...", IDC_DEVPROBLEM, 148, 163, 90, 15 + LTEXT "&Użycie urządzenia:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END @@ -178,8 +178,8 @@ BEGIN EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY LTEXT "Podpis cyfrowy:", -1, 37, 81, 60, 8, SS_NOPREFIX EDITTEXT IDC_DIGITALSIGNER, 100, 81, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - PUSHBUTTON "&Szczegy sterownika...", IDC_DRIVERDETAILS, 7, 106, 70, 15 - LTEXT "Wywietla informacje szczegowe.", -1, 91, 110, 154, 17, SS_NOPREFIX + PUSHBUTTON "&Szczegóły sterownika...", IDC_DRIVERDETAILS, 7, 106, 70, 15 + LTEXT "Wyświetla informacje szczegółowe.", -1, 91, 110, 154, 17, SS_NOPREFIX END IDD_DRIVERDETAILS DIALOGEX DISCARDABLE 0, 0, 224, 230 @@ -206,7 +206,7 @@ END IDD_DEVICEDETAILS DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Szczegy" +CAPTION "Szczegóły" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 diff --git a/dll/win32/devmgr/lang/ro-RO.rc b/dll/win32/devmgr/lang/ro-RO.rc index 7722df63d70..810b524493d 100644 --- a/dll/win32/devmgr/lang/ro-RO.rc +++ b/dll/win32/devmgr/lang/ro-RO.rc @@ -2,8 +2,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - STRINGTABLE BEGIN IDS_NAME "Nume" @@ -229,5 +227,3 @@ BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX END - -#pragma code_page(default) diff --git a/dll/win32/devmgr/lang/ru-RU.rc b/dll/win32/devmgr/lang/ru-RU.rc index 66f6861a550..7a6a4628534 100644 --- a/dll/win32/devmgr/lang/ru-RU.rc +++ b/dll/win32/devmgr/lang/ru-RU.rc @@ -2,43 +2,43 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_NAME "" - IDS_TYPE "" - IDS_MANUFACTURER ": %1" - IDS_LOCATION ": %1" - IDS_STATUS " : %1" - IDS_UNKNOWN "" - IDS_LOCATIONSTR " %1!u! (%2)" - IDS_DEVCODE " ( %1!u!)" - IDS_DEVCODE2 " ( %2!u!)" - IDS_ENABLEDEVICE " ()" - IDS_DISABLEDEVICE " ()" - IDS_UNKNOWNDEVICE " " - IDS_NODRIVERLOADED " ." - IDS_DEVONPARENT " %1" - IDS_TROUBLESHOOTDEV "&..." - IDS_ENABLEDEV "& " - IDS_REINSTALLDRV "& " - IDS_PROPERTIES "&" - IDS_UPDATEDRV "& ..." - IDS_REBOOT "& ..." - IDS_NOTAVAILABLE "" - IDS_NOTDIGITALLYSIGNED " " - IDS_NODRIVERS " ." + IDS_NAME "Имя" + IDS_TYPE "Тип" + IDS_MANUFACTURER "Изготовитель: %1" + IDS_LOCATION "Размещение: %1" + IDS_STATUS "Состояние устройства: %1" + IDS_UNKNOWN "Неизвестно" + IDS_LOCATIONSTR "Размещение %1!u! (%2)" + IDS_DEVCODE " (код %1!u!)" + IDS_DEVCODE2 " (код %2!u!)" + IDS_ENABLEDEVICE "Это устройство используется (включено)" + IDS_DISABLEDEVICE "Это устройство не используется (выключено)" + IDS_UNKNOWNDEVICE "Неизвестное устройство" + IDS_NODRIVERLOADED "Не установлены драйверы для этого устройства." + IDS_DEVONPARENT "на %1" + IDS_TROUBLESHOOTDEV "&Диагностика..." + IDS_ENABLEDEV "В&ключить устройство" + IDS_REINSTALLDRV "&Переустановить драйвер" + IDS_PROPERTIES "С&войства" + IDS_UPDATEDRV "О&бновить драйвер..." + IDS_REBOOT "Пер&езагрузить компьютер..." + IDS_NOTAVAILABLE "Недоступно" + IDS_NOTDIGITALLYSIGNED "Нет цифровой подписи" + IDS_NODRIVERS "Файлы драйверов для этого устройства не установлены или не были загружены." END /* error messages, source: http://www.z123.org/techsupport/medm.htm */ STRINGTABLE BEGIN - IDS_DEV_NO_PROBLEM " ." - IDS_DEV_NOT_CONFIGURED " ." + IDS_DEV_NO_PROBLEM "Устройство работает нормально." + IDS_DEV_NOT_CONFIGURED "Это устройство еще не настроено." IDS_DEV_DEVLOADER_FAILED "ReactOS could not load the driver for this device because the computer is reporting two $1 bus types." IDS_DEV_DEVLOADER_FAILED2 "The $1 device loader(s) for this device could not load the device driver." IDS_DEV_OUT_OF_MEMORY "The driver for this device may be bad, or your system may be running low on memory or other resources." IDS_DEV_ENTRY_IS_WRONG_TYPE "This device is not working properly because one of its drivers may be bad, or your registry may be bad." IDS_DEV_LACKED_ARBITRATOR "The driver for this device requested a resource that ReactOS does not know how to handle." IDS_DEV_BOOT_CONFIG_CONFLICT "Another device is using the resources this device needs." - IDS_DEV_FAILED_FILTER " ." + IDS_DEV_FAILED_FILTER "Драйверы для этого устройства должны быть переустановлены." IDS_DEV_DEVLOADER_NOT_FOUND "This device is not working properly because ReactOS cannot load the file $1 that loads the drivers for the device." IDS_DEV_DEVLOADER_NOT_FOUND2 "This device is not working properly because the file $1 that loads the drivers for this device is bad." IDS_DEV_DEVLOADER_NOT_FOUND3 "Device failure: Try changing the driver for this device. If that doesn't work, see your hardware documentation." @@ -47,24 +47,24 @@ BEGIN IDS_DEV_FAILED_START "This device is either not present, not working properly, or does not have all the drivers installed." IDS_DEV_LIAR "ReactOS stopped responding while attempting to start this device, and therefore will never attempt to start this device again." IDS_DEV_NORMAL_CONFLICT "This device cannot find any free $1 resources to use." - IDS_DEV_NOT_VERIFIED " , ." - IDS_DEV_NEED_RESTART " ." - IDS_DEV_REENUMERATION " ." - IDS_DEV_PARTIAL_LOG_CONF "ReactOS , ." + IDS_DEV_NOT_VERIFIED "Данное устройство является неизвестным, работает некорректно или не имеет установленных драйверов." + IDS_DEV_NEED_RESTART "Данное устройство не сможет корректно работать до выполнения перезагрузки." + IDS_DEV_REENUMERATION "Данное устройство вызвало конфликт ресурсов." + IDS_DEV_PARTIAL_LOG_CONF "ReactOS не может идентифицировать ресурсы, используемые устройством." IDS_DEV_UNKNOWN_RESOURCE "The driver information file $1 is telling this child device to use a resource that the parent device does not have or recognize." - IDS_DEV_REINSTALL " ." - IDS_DEV_REGISTRY " ." - IDS_DEV_WILL_BE_REMOVED "ReactOS ." - IDS_DEV_DISABLED " ." - IDS_DEV_DISABLED2 " ." - IDS_DEV_DEVLOADER_NOT_READY " ." - IDS_DEV_DEVLOADER_NOT_READY2 " ." - IDS_DEV_DEVLOADER_NOT_READY3 " ." - IDS_DEV_DEVICE_NOT_THERE " , ." - IDS_DEV_MOVED "ReactOS ." - IDS_DEV_TOO_EARLY "ReactOS ." - IDS_DEV_NO_VALID_LOG_CONF "ReactOS ." - IDS_DEV_FAILED_INSTALL " ." + IDS_DEV_REINSTALL "Драйверы этого устройства должны быть переустановлены." + IDS_DEV_REGISTRY "Ваш системный реестр поврежден." + IDS_DEV_WILL_BE_REMOVED "ReactOS удалит это устройство." + IDS_DEV_DISABLED "Это устройство не запущено." + IDS_DEV_DISABLED2 "Это устройство отключено." + IDS_DEV_DEVLOADER_NOT_READY "Загрузчик этого устройства не может загрузить необходимые драйверы." + IDS_DEV_DEVLOADER_NOT_READY2 "Этот адаптер экрана функционирует корректно." + IDS_DEV_DEVLOADER_NOT_READY3 "Загрузчик этого устройства не может загрузить необходимые драйверы." + IDS_DEV_DEVICE_NOT_THERE "Устройство отсутствует, работает неправильно или для него установлены не все драйверы." + IDS_DEV_MOVED "ReactOS настраивает это устройство." + IDS_DEV_TOO_EARLY "ReactOS настраивает это устройство." + IDS_DEV_NO_VALID_LOG_CONF "ReactOS не может указать ресурсы для этого устройства." + IDS_DEV_FAILED_INSTALL "Драйверы для этого устройства не установлены." IDS_DEV_HARDWARE_DISABLED "This device is disabled because the BIOS for the device did not give it any resources." IDS_DEV_CANT_SHARE_IRQ "This device is using an Interrupt Request (IRQ) resource that is in use by another device and cannot be shared.\nYou must change the conflicting setting or remove the real-mode driver causing the conflict." IDS_DEV_FAILED_ADD "This device is not working properly because $1 is not working properly." @@ -73,15 +73,15 @@ BEGIN IDS_DEV_NO_SOFTCONFIG "ReactOS cannot determine the settings for this device. Consult the documentation that came with this device and use the Resource tab to set the configuration." IDS_DEV_BIOS_TABLE "Your computer's system firmware does not include enough information to properly configure and use this device. \nTo use this device, contact your computer manufacturer to obtain a firmware or BIOS update." IDS_DEV_IRQ_TRANSLATION_FAILED "This device is requesting a PCI interrupt but is configured for an ISA interrupt (or vice versa). \nPlease use the computer's system setup program to reconfigure the interrupt for this device." - IDS_DEV_FAILED_DRIVER_ENTRY "ReactOS ." + IDS_DEV_FAILED_DRIVER_ENTRY "ReactOS не может инициализировать драйвер устройства для данного оборудования." IDS_DEV_DRIVER_FAILED_PRIOR_UNLOAD "ReactOS cannot load the device driver for this hardware because a previous instance of the device driver is still in memory." IDS_DEV_DRIVER_FAILED_LOAD "ReactOS cannot load the device driver for this hardware. The driver may be corrupted or missing." IDS_DEV_DRIVER_SERVICE_KEY_INVALID "ReactOS cannot access this hardware because its service key information in the registry is missing or recorded incorrectly." IDS_DEV_LEGACY_SERVICE_NO_DEVICES "ReactOS successfully loaded the device driver for this hardware but cannot find the hardware device." IDS_DEV_DUPLICATE_DEVICE "ReactOS cannot load the device driver for this hardware because there is a duplicate device already running in the system." - IDS_DEV_FAILED_POST_START "ReactOS , ." - IDS_DEV_HALTED " ." - IDS_DEV_PHANTOM " ." + IDS_DEV_FAILED_POST_START "ReactOS остановил данное устройство, так как в его работе обнаружились проблемы." + IDS_DEV_HALTED "Приложение или служба отключили данное устройство." + IDS_DEV_PHANTOM "В настоящее время данное устройство не подключено к компьютеру." IDS_DEV_SYSTEM_SHUTDOWN "ReactOS cannot gain access to this hardware device because the operating system is in the process of shutting down." IDS_DEV_HELD_FOR_EJECT "ReactOS cannot use this hardware device because it has been prepared for safe removal, but it has not been removed from the computer" IDS_DEV_DRIVER_BLOCKED "The software for this device has been blocked from starting because it is known to have problems with ReactOS. Contact the hardware vendor for a new driver." @@ -91,113 +91,113 @@ END STRINGTABLE BEGIN - IDS_PROP_DEVICEID " " - IDS_PROP_HARDWAREIDS " (ID) " - IDS_PROP_COMPATIBLEIDS " (ID)" - IDS_PROP_MATCHINGDEVICEID " (ID) " - IDS_PROP_SERVICE "" - IDS_PROP_ENUMERATOR "" - IDS_PROP_CAPABILITIES "" - IDS_PROP_DEVNODEFLAGS " Devnode" - IDS_PROP_CONFIGFLAGS " Config" - IDS_PROP_CSCONFIGFLAGS " CSConfig" - IDS_PROP_EJECTIONRELATIONS " " - IDS_PROP_REMOVALRELATIONS " " - IDS_PROP_BUSRELATIONS " " - IDS_PROP_DEVUPPERFILTERS " " - IDS_PROP_DEVLOWERFILTERS " " - IDS_PROP_CLASSUPPERFILTERS " " - IDS_PROP_CLASSLOWERFILTERS " " - IDS_PROP_CLASSINSTALLER " " - IDS_PROP_CLASSCOINSTALLER " " - IDS_PROP_DEVICECOINSTALLER " " - IDS_PROP_FIRMWAREREVISION "" - IDS_PROP_CURRENTPOWERSTATE " " - IDS_PROP_POWERCAPABILITIES " " - IDS_PROP_POWERSTATEMAPPINGS " " + IDS_PROP_DEVICEID "Код экземпляра устройства" + IDS_PROP_HARDWAREIDS "Коды (ID) оборудования" + IDS_PROP_COMPATIBLEIDS "Совместимые коды (ID)" + IDS_PROP_MATCHINGDEVICEID "Соответствующий код (ID) устройства" + IDS_PROP_SERVICE "Служба" + IDS_PROP_ENUMERATOR "Перечислитель" + IDS_PROP_CAPABILITIES "Характеристики" + IDS_PROP_DEVNODEFLAGS "Флаги Devnode" + IDS_PROP_CONFIGFLAGS "Флаги Config" + IDS_PROP_CSCONFIGFLAGS "Флаги CSConfig" + IDS_PROP_EJECTIONRELATIONS "Зависимости извлечения" + IDS_PROP_REMOVALRELATIONS "Зависимости удаления" + IDS_PROP_BUSRELATIONS "Зависимости шины" + IDS_PROP_DEVUPPERFILTERS "Верхние фильтры устройства" + IDS_PROP_DEVLOWERFILTERS "Нижние фильтры устройства" + IDS_PROP_CLASSUPPERFILTERS "Верхние фильтры класса" + IDS_PROP_CLASSLOWERFILTERS "Нижние фильтры класса" + IDS_PROP_CLASSINSTALLER "Установщик классов" + IDS_PROP_CLASSCOINSTALLER "Соустановщики классов" + IDS_PROP_DEVICECOINSTALLER "Соустановщики устройств" + IDS_PROP_FIRMWAREREVISION "Микропрограмма" + IDS_PROP_CURRENTPOWERSTATE "Текушее состояние электропитания" + IDS_PROP_POWERCAPABILITIES "Возможности электропитания" + IDS_PROP_POWERSTATEMAPPINGS "Сопоставления энергосбережения" END IDD_HARDWARE DIALOGEX DISCARDABLE 0, 0, 300, 400 STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION | DS_SHELLFONT FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:",IDC_DEVICES,7,6,196,10 + LTEXT "&Устройства:",IDC_DEVICES,7,6,196,10 CONTROL "",IDC_LV_DEVICES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,16,196,50 - GROUPBOX " ",IDC_PROPERTIESGROUP,7,76,196,105 + GROUPBOX "Свойства устройства",IDC_PROPERTIESGROUP,7,76,196,105 LTEXT "",IDC_MANUFACTURER,14,88,183,10,SS_ENDELLIPSIS LTEXT "",IDC_LOCATION,14,100,183,10,SS_ENDELLIPSIS LTEXT "",IDC_STATUS,14,112,183,30 - PUSHBUTTON "&...",IDC_TROUBLESHOOT,85,140,54,14, + PUSHBUTTON "&Диагностика...",IDC_TROUBLESHOOT,85,140,54,14, BS_PUSHBUTTON | WS_CHILD | WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&",IDC_PROPERTIES,146,140,50,14 + PUSHBUTTON "С&войства",IDC_PROPERTIES,146,140,50,14 END IDD_DEVICEGENERAL DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT " :", -1, 7, 39, 60, 8, SS_NOPREFIX + LTEXT "Тип устройства:", -1, 7, 39, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVTYPE, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT ":", -1, 7, 53, 60, 8, SS_NOPREFIX + LTEXT "Изготовитель:", -1, 7, 53, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVMANUFACTURER, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT ":", -1, 7, 67, 60, 8, SS_NOPREFIX + LTEXT "Размещение:", -1, 7, 67, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVLOCATION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - GROUPBOX " ", IDC_DEVSTATUSGROUP, 7, 83, 238, 100 + GROUPBOX "Состояние устройства", IDC_DEVSTATUSGROUP, 7, 83, 238, 100 EDITTEXT IDC_DEVSTATUS, 14, 96, 224, 61, NOT WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL - PUSHBUTTON "&...", IDC_DEVPROBLEM, 148, 163, 90, 15 - LTEXT "& :", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED + PUSHBUTTON "&Диагностика...", IDC_DEVPROBLEM, 148, 163, 90, 15 + LTEXT "&Применение устройства:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END IDD_DEVICEDRIVER DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Драйвер" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT " :", -1, 7, 39, 80, 8, SS_NOPREFIX + LTEXT "Поставщик драйвера:", -1, 7, 39, 80, 8, SS_NOPREFIX EDITTEXT IDC_DRVPROVIDER, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 7, 53, 80, 8, SS_NOPREFIX + LTEXT "Дата разработки:", -1, 7, 53, 80, 8, SS_NOPREFIX EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 7, 67, 80, 8, SS_NOPREFIX + LTEXT "Версия драйвера:", -1, 7, 67, 80, 8, SS_NOPREFIX EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 7, 81, 80, 8, SS_NOPREFIX + LTEXT "Цифровая подпись:", -1, 7, 81, 80, 8, SS_NOPREFIX EDITTEXT IDC_DIGITALSIGNER, 100, 81, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - PUSHBUTTON "&...", IDC_DRIVERDETAILS, 7, 106, 70, 15 - LTEXT " .", -1, 91, 110, 154, 17, SS_NOPREFIX + PUSHBUTTON "&Сведения...", IDC_DRIVERDETAILS, 7, 106, 70, 15 + LTEXT "Просмотр сведений о файлах драйверов.", -1, 91, 110, 154, 17, SS_NOPREFIX END IDD_DRIVERDETAILS DIALOGEX DISCARDABLE 0, 0, 224, 230 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME -CAPTION " " +CAPTION "Сведения о файлах драйверов" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT "& :", -1, 7, 36, 204, 8 + LTEXT "&Файлы драйверов:", -1, 7, 36, 204, 8 CONTROL "", IDC_DRIVERFILES, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 7, 46, 209, 80 - LTEXT ":", -1, 7, 134, 50, 8 + LTEXT "Поставщик:", -1, 7, 134, 50, 8 EDITTEXT IDC_FILEPROVIDER, 137, 134, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 7, 150, 80, 8 + LTEXT "Версия файла:", -1, 7, 150, 80, 8 EDITTEXT IDC_FILEVERSION, 137, 150, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 7, 166, 112, 8 + LTEXT "Авторские права:", -1, 7, 166, 112, 8 EDITTEXT IDC_FILECOPYRIGHT, 137, 166, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 7, 182, 125, 8 + LTEXT "Цифровая подпись:", -1, 7, 182, 125, 8 EDITTEXT IDC_DIGITALSIGNER, 137, 182, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY DEFPUSHBUTTON "OK", IDOK, 167, 208, 50, 14 END IDD_DEVICEDETAILS DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Сведения" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 @@ -210,7 +210,7 @@ END IDD_DEVICERESOURCES DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Ресурсы" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 @@ -219,7 +219,7 @@ END IDD_DEVICEPOWER DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Питание" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 diff --git a/dll/win32/devmgr/lang/uk-UA.rc b/dll/win32/devmgr/lang/uk-UA.rc index 48ef0c80441..97a914dac5a 100644 --- a/dll/win32/devmgr/lang/uk-UA.rc +++ b/dll/win32/devmgr/lang/uk-UA.rc @@ -10,202 +10,202 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_NAME "'" - IDS_TYPE "" - IDS_MANUFACTURER ": %1" - IDS_LOCATION ": %1" - IDS_STATUS " : %1" - IDS_UNKNOWN "" - IDS_LOCATIONSTR " %1!u! (%2)" - IDS_DEVCODE " ( %1!u!)" - IDS_DEVCODE2 " ( %2!u!)" - IDS_ENABLEDEVICE " ()" - IDS_DISABLEDEVICE " ()" - IDS_UNKNOWNDEVICE " " - IDS_NODRIVERLOADED " ." - IDS_DEVONPARENT " %1" - IDS_TROUBLESHOOTDEV "& ..." - IDS_ENABLEDEV "& " - IDS_REINSTALLDRV "& " - IDS_PROPERTIES "&" - IDS_UPDATEDRV "& ..." - IDS_REBOOT " &'..." - IDS_NOTAVAILABLE "" - IDS_NOTDIGITALLYSIGNED " " - IDS_NODRIVERS " ." + IDS_NAME "Ім'я" + IDS_TYPE "Тип" + IDS_MANUFACTURER "Виробник: %1" + IDS_LOCATION "Розміщення: %1" + IDS_STATUS "Стан пристрою: %1" + IDS_UNKNOWN "Невідомий" + IDS_LOCATIONSTR "Розміщення %1!u! (%2)" + IDS_DEVCODE " (Код %1!u!)" + IDS_DEVCODE2 " (Код %2!u!)" + IDS_ENABLEDEVICE "Цей пристрій використовується (увімкнений)" + IDS_DISABLEDEVICE "Цей пристрій не використовується (вимкнений)" + IDS_UNKNOWNDEVICE "Невідомий пристрій" + IDS_NODRIVERLOADED "Для цього пристрою не встановлені драйвери." + IDS_DEVONPARENT "на %1" + IDS_TROUBLESHOOTDEV "&Усунення несправностей..." + IDS_ENABLEDEV "Вв&імкнути пристрій" + IDS_REINSTALLDRV "&Перевстановити драйвер" + IDS_PROPERTIES "&Властивості" + IDS_UPDATEDRV "&Оновити драйвер..." + IDS_REBOOT "Перезавантажити &комп'ютер..." + IDS_NOTAVAILABLE "Недоступно" + IDS_NOTDIGITALLYSIGNED "Немає цифрового підпису" + IDS_NODRIVERS "Файли драйверів для цього пристрою не потрібні або не були завантажені." END /* error messages, source: http://www.z123.org/techsupport/medm.htm */ STRINGTABLE BEGIN - IDS_DEV_NO_PROBLEM " ." - IDS_DEV_NOT_CONFIGURED " ." - IDS_DEV_DEVLOADER_FAILED "ReactOS , $1." - IDS_DEV_DEVLOADER_FAILED2 " $1 ." - IDS_DEV_OUT_OF_MEMORY " ' ." - IDS_DEV_ENTRY_IS_WRONG_TYPE " , ." - IDS_DEV_LACKED_ARBITRATOR " , ReactOS 쳺 ." - IDS_DEV_BOOT_CONFIG_CONFLICT " , ." - IDS_DEV_FAILED_FILTER " ." - IDS_DEV_DEVLOADER_NOT_FOUND " , ReactOS $1 , ." - IDS_DEV_DEVLOADER_NOT_FOUND2 " , $1 , , ." - IDS_DEV_DEVLOADER_NOT_FOUND3 " : . , ." - IDS_DEV_INVALID_DATA " , BIOS ' ." - IDS_DEV_INVALID_DATA2 " , BIOS . " - IDS_DEV_FAILED_START " , ." - IDS_DEV_LIAR "ReactOS , ." - IDS_DEV_NORMAL_CONFLICT " $1 ." - IDS_DEV_NOT_VERIFIED " , ." - IDS_DEV_NEED_RESTART " , '." - IDS_DEV_REENUMERATION " ." - IDS_DEV_PARTIAL_LOG_CONF "ReactOS , ." - IDS_DEV_UNKNOWN_RESOURCE " $1 , ." - IDS_DEV_REINSTALL " ." - IDS_DEV_REGISTRY " ." - IDS_DEV_WILL_BE_REMOVED "ReactOS ." - IDS_DEV_DISABLED " ." - IDS_DEV_DISABLED2 " ." - IDS_DEV_DEVLOADER_NOT_READY " ." - IDS_DEV_DEVLOADER_NOT_READY2 " ." - IDS_DEV_DEVLOADER_NOT_READY3 " ." - IDS_DEV_DEVICE_NOT_THERE " , ." - IDS_DEV_MOVED "ReactOS ." - IDS_DEV_TOO_EARLY "ReactOS ." - IDS_DEV_NO_VALID_LOG_CONF "ReactOS ." - IDS_DEV_FAILED_INSTALL " ." - IDS_DEV_HARDWARE_DISABLED " , BIOS ." - IDS_DEV_CANT_SHARE_IRQ " (IRQ), .\n , ." - IDS_DEV_FAILED_ADD " , $1 is not working properly." - IDS_DEV_DISABLED_SERVICE "ReactOS , , ." - IDS_DEV_TRANSLATION_FAILED " ." - IDS_DEV_NO_SOFTCONFIG "ReactOS . , ." - IDS_DEV_BIOS_TABLE "̳ ' . \n , ' BIOS." - IDS_DEV_IRQ_TRANSLATION_FAILED " PCI, ISA ( ). \n ' ." - IDS_DEV_FAILED_DRIVER_ENTRY "ReactOS ." - IDS_DEV_DRIVER_FAILED_PRIOR_UNLOAD "ReactOS , '." - IDS_DEV_DRIVER_FAILED_LOAD "ReactOS . ." - IDS_DEV_DRIVER_SERVICE_KEY_INVALID "ReactOS , ." - IDS_DEV_LEGACY_SERVICE_NO_DEVICES "ReactOS ." - IDS_DEV_DUPLICATE_DEVICE "ReactOS , ." - IDS_DEV_FAILED_POST_START "ReactOS , ." - IDS_DEV_HALTED " ." - IDS_DEV_PHANTOM " ' '." - IDS_DEV_SYSTEM_SHUTDOWN "ReactOS , ." - IDS_DEV_HELD_FOR_EJECT "ReactOS , , '" - IDS_DEV_DRIVER_BLOCKED " , ReactOS. ." - IDS_DEV_REGISTRY_TOO_LARGE "ReactOS , ( )." - IDS_DEV_SETPROPERTIES_FAILED "ReactOS ." + IDS_DEV_NO_PROBLEM "Цей пристрій працює нормально." + IDS_DEV_NOT_CONFIGURED "Цей пристрій не налаштований правильно." + IDS_DEV_DEVLOADER_FAILED "ReactOS не може завантажити драйвер для цього пристрою, тому що система повідомляє про два види шин типу $1." + IDS_DEV_DEVLOADER_FAILED2 "Система завантаження обладнання $1 не може завантажити драйвер цього пристрою." + IDS_DEV_OUT_OF_MEMORY "Драйвер для цього пристрою є несправним або системі бракує пам'яті чи інших ресурсів." + IDS_DEV_ENTRY_IS_WRONG_TYPE "Цей пристрій працює неправильно, оскільки один з його драйверів або реєстр є несправними." + IDS_DEV_LACKED_ARBITRATOR "Драйвер для цього пристрою вимагає ресурсів, з якими ReactOS не вміє працювати." + IDS_DEV_BOOT_CONFIG_CONFLICT "Інший пристрій використовує ресурси, потрібні цьому пристрою." + IDS_DEV_FAILED_FILTER "Драйвери цього пристрою треба переустановити." + IDS_DEV_DEVLOADER_NOT_FOUND "Цей пристрій працює неправильно, оскільки ReactOS не може завантажити файл $1 , який завантажує драйвери пристрою." + IDS_DEV_DEVLOADER_NOT_FOUND2 "Цей пристрій працює неправильно, оскільки файл $1 , який завантажує драйвери пристрою, є несправним." + IDS_DEV_DEVLOADER_NOT_FOUND3 "Помилка пристрою: Спробуйте змінити драйвер цього пристрою. Якщо це не допомагає, дивіться документацію пристрою." + IDS_DEV_INVALID_DATA "Цей пристрій працює неправильно, оскільки BIOS комп'ютера невірно передає ресурси для пристрою." + IDS_DEV_INVALID_DATA2 "Цей пристрій працює неправильно, оскільки BIOS пристрою невірно передає ресурси для пристрою. " + IDS_DEV_FAILED_START "Цей пристрій відсутній, працює некоректно або не має всіх встановлених драйверів." + IDS_DEV_LIAR "ReactOS не відповідає на запити при спробі запуску цього пристрою, і тому ніколи не буде намагатися запустити цей пристрій знов." + IDS_DEV_NORMAL_CONFLICT "Цей пристрій не може знайти вільних $1 ресурсів для їх використання." + IDS_DEV_NOT_VERIFIED "Цей пристрій відсутній, працює некоректно або не має всіх встановлених драйверів." + IDS_DEV_NEED_RESTART "Цей пристрій не зможе коректно працювати, поки ви не перезавантажите комп'ютер." + IDS_DEV_REENUMERATION "Цей пристрій спричинив конфлікт ресурсів." + IDS_DEV_PARTIAL_LOG_CONF "ReactOS не може розпізнати всі ресурси, які використовуються пристроєм." + IDS_DEV_UNKNOWN_RESOURCE "Інформаційний файл пристрою $1 каже цьому похідному пристрою використати ресурс, якого батьківський пристрій не має чи не розпізнає." + IDS_DEV_REINSTALL "Драйвери цього пристрою треба переустановити." + IDS_DEV_REGISTRY "Ваш системний реєстр може бути пошкоджений." + IDS_DEV_WILL_BE_REMOVED "ReactOS видалить цей пристрій." + IDS_DEV_DISABLED "Цей пристрій не запущений." + IDS_DEV_DISABLED2 "Цей пристрій відключений." + IDS_DEV_DEVLOADER_NOT_READY "Завантажувачі цього пристрою на можуть завантажити необхідні драйвери." + IDS_DEV_DEVLOADER_NOT_READY2 "Цей адапртер дисплея функціонує коректно." + IDS_DEV_DEVLOADER_NOT_READY3 "Завантажувачі цього пристрою на можуть завантажити необхідні драйвери." + IDS_DEV_DEVICE_NOT_THERE "Цей пристрій відсутній, працює некоректно або не має всіх встановлених драйверів." + IDS_DEV_MOVED "ReactOS налаштовує цей пристрій." + IDS_DEV_TOO_EARLY "ReactOS налаштовує цей пристрій." + IDS_DEV_NO_VALID_LOG_CONF "ReactOS не може вказати ресурси для цього пристрою." + IDS_DEV_FAILED_INSTALL "Драйвери для цього пристрою не встановлені." + IDS_DEV_HARDWARE_DISABLED "Цей пристрій вимкнено, оскільки BIOS не виділив для пристрою ресурсів." + IDS_DEV_CANT_SHARE_IRQ "Цей пристрій використувує ресурс Запиту Переривань (IRQ), який використовується іншим пристроєм та не може бути спільним.\nВи повинні змінити конфліктуючі налаштування або видалити драйвер реального режиму, що спричинює конфлікт." + IDS_DEV_FAILED_ADD "Цей пристрій працює неправильно, оскільки $1 is not working properly." + IDS_DEV_DISABLED_SERVICE "ReactOS не може встановити драйвери для цього пристрою, оскільки не має доступу до диску чи мережного ресурсу, які містять файли установки." + IDS_DEV_TRANSLATION_FAILED "Цей пристрій не відповідає його драйверу." + IDS_DEV_NO_SOFTCONFIG "ReactOS не може визначити налаштуванн для цього пристрою. Зверніться до документації пристрою, і використовуйте вкладку Ресурси для налаштування конфігурації." + IDS_DEV_BIOS_TABLE "Мікропрограма вашого комп'ютера не містить досить інформації для коректних налаштування та використання цього пристрою. \nЩоб використовувати цей пристрій, зверніться до виробника комп'ютера для отримання оновлених мікропрограми чи BIOS." + IDS_DEV_IRQ_TRANSLATION_FAILED "Цей пристрій запитує переривання PCI, а він налаштований на переривання ISA (або навпаки). \nВикористайте програму налаштування комп'ютера для зміни параметрів переривань цього пристрою." + IDS_DEV_FAILED_DRIVER_ENTRY "ReactOS не може ініціалізувати драйвер пристрою для даного обладнання." + IDS_DEV_DRIVER_FAILED_PRIOR_UNLOAD "ReactOS не може завантажити драйвер цого пристрою, оскільки попередня версія драйвера пристрою все ще знаходиться в пам'яті." + IDS_DEV_DRIVER_FAILED_LOAD "ReactOS не може завантажити драйвер для цого пристрою. Драйвер зіпсований або відсутній." + IDS_DEV_DRIVER_SERVICE_KEY_INVALID "ReactOS не може отримати доступ до цього пристрою, оскільки дані сервісного ключа реєстру відсутні чи записані невірно." + IDS_DEV_LEGACY_SERVICE_NO_DEVICES "ReactOS успішно завантажив драйвер цього пристрою але не може знайти сам пристрій." + IDS_DEV_DUPLICATE_DEVICE "ReactOS не може завантажити драйвер для цого пристрою, оскільки в системі вже працює такий же пристрій." + IDS_DEV_FAILED_POST_START "ReactOS зупинив цей пристрій, оскільки в його роботі виявилися проблеми." + IDS_DEV_HALTED "Додаток або служба відключили цей апаратний пристрій." + IDS_DEV_PHANTOM "В даний момент цей пристрій не під'єднаний до комп'ютера." + IDS_DEV_SYSTEM_SHUTDOWN "ReactOS не може отримати доступ до цього пристрою, оскільки операційна система завершує свою роботу." + IDS_DEV_HELD_FOR_EJECT "ReactOS не може використовувати цей пристрій, оскільки він був підготовлений для безпечнрго видалення, але ще не був видалений з комп'ютера" + IDS_DEV_DRIVER_BLOCKED "Запуск програмного забезпечення для цього пристрою був заблокований, оскільки воно має відомі проблеми з ReactOS. Зверніться до постачальника за новим драйвером." + IDS_DEV_REGISTRY_TOO_LARGE "ReactOS не може запустити нові пристрої, оскільки системний кущ занадто великий (перевищує допустимий розмір реєстру)." + IDS_DEV_SETPROPERTIES_FAILED "ReactOS не зміг змінити параметри цього пристрою." END STRINGTABLE BEGIN - IDS_PROP_DEVICEID " " - IDS_PROP_HARDWAREIDS " (ID) " - IDS_PROP_COMPATIBLEIDS " (ID)" - IDS_PROP_MATCHINGDEVICEID "³ (ID) " - IDS_PROP_SERVICE "" - IDS_PROP_ENUMERATOR "˳" - IDS_PROP_CAPABILITIES "" - IDS_PROP_DEVNODEFLAGS " Devnode" - IDS_PROP_CONFIGFLAGS " Config" - IDS_PROP_CSCONFIGFLAGS " CSConfig" - IDS_PROP_EJECTIONRELATIONS " " - IDS_PROP_REMOVALRELATIONS " " - IDS_PROP_BUSRELATIONS " " - IDS_PROP_DEVUPPERFILTERS " " - IDS_PROP_DEVLOWERFILTERS " " - IDS_PROP_CLASSUPPERFILTERS " " - IDS_PROP_CLASSLOWERFILTERS " " - IDS_PROP_CLASSINSTALLER " " - IDS_PROP_CLASSCOINSTALLER " " - IDS_PROP_DEVICECOINSTALLER " " - IDS_PROP_FIRMWAREREVISION "̳" - IDS_PROP_CURRENTPOWERSTATE " " - IDS_PROP_POWERCAPABILITIES " " - IDS_PROP_POWERSTATEMAPPINGS " " + IDS_PROP_DEVICEID "Код екземпляру пристрою" + IDS_PROP_HARDWAREIDS "Коди (ID) обладнання" + IDS_PROP_COMPATIBLEIDS "Сумісні коди (ID)" + IDS_PROP_MATCHINGDEVICEID "Відповідний код (ID) пристрою" + IDS_PROP_SERVICE "Служба" + IDS_PROP_ENUMERATOR "Лічильник" + IDS_PROP_CAPABILITIES "Можливості" + IDS_PROP_DEVNODEFLAGS "Прапорці Devnode" + IDS_PROP_CONFIGFLAGS "Прапорці Config" + IDS_PROP_CSCONFIGFLAGS "Прапорці CSConfig" + IDS_PROP_EJECTIONRELATIONS "Залежності виймання" + IDS_PROP_REMOVALRELATIONS "Залежності видалення" + IDS_PROP_BUSRELATIONS "Залежності шини" + IDS_PROP_DEVUPPERFILTERS "Верхні фільтри пристрою" + IDS_PROP_DEVLOWERFILTERS "Нижні фільтри пристрою" + IDS_PROP_CLASSUPPERFILTERS "Верхні фільтри класу" + IDS_PROP_CLASSLOWERFILTERS "Нижні фільтри класу" + IDS_PROP_CLASSINSTALLER "Встановлювачі класів" + IDS_PROP_CLASSCOINSTALLER "Співвстановлювачі класів" + IDS_PROP_DEVICECOINSTALLER "Співвстановлювачі пристроїв" + IDS_PROP_FIRMWAREREVISION "Мікропрограма" + IDS_PROP_CURRENTPOWERSTATE "Поточний стан електроживлення" + IDS_PROP_POWERCAPABILITIES "Можливості електроживлення" + IDS_PROP_POWERSTATEMAPPINGS "Співставлення енергозбереження" END IDD_HARDWARE DIALOGEX DISCARDABLE 0, 0, 300, 400 STYLE DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CAPTION | DS_SHELLFONT FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:",IDC_DEVICES,7,6,196,10 + LTEXT "&Пристрої:",IDC_DEVICES,7,6,196,10 CONTROL "",IDC_LV_DEVICES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,16,196,50 - GROUPBOX " ",IDC_PROPERTIESGROUP,7,76,196,105 + GROUPBOX "Властивості пристрою",IDC_PROPERTIESGROUP,7,76,196,105 LTEXT "",IDC_MANUFACTURER,14,88,183,10,SS_ENDELLIPSIS LTEXT "",IDC_LOCATION,14,100,183,10,SS_ENDELLIPSIS LTEXT "",IDC_STATUS,14,112,183,30 - PUSHBUTTON "& ...",IDC_TROUBLESHOOT,85,140,54,14, + PUSHBUTTON "&Усунення несправностей...",IDC_TROUBLESHOOT,85,140,54,14, BS_PUSHBUTTON | WS_CHILD | WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&",IDC_PROPERTIES,146,140,50,14 + PUSHBUTTON "&Властивості",IDC_PROPERTIES,146,140,50,14 END IDD_DEVICEGENERAL DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT " :", -1, 37, 39, 60, 8, SS_NOPREFIX + LTEXT "Тип пристрою:", -1, 37, 39, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVTYPE, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT ":", -1, 37, 53, 60, 8, SS_NOPREFIX + LTEXT "Виробник:", -1, 37, 53, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVMANUFACTURER, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT ":", -1, 37, 67, 60, 8, SS_NOPREFIX + LTEXT "Розміщення:", -1, 37, 67, 60, 8, SS_NOPREFIX EDITTEXT IDC_DEVLOCATION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - GROUPBOX " ", IDC_DEVSTATUSGROUP, 7, 83, 238, 100 + GROUPBOX "Стан пристрою", IDC_DEVSTATUSGROUP, 7, 83, 238, 100 EDITTEXT IDC_DEVSTATUS, 14, 96, 224, 61, NOT WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL - PUSHBUTTON "& ...", IDC_DEVPROBLEM, 146, 163, 94, 15 - LTEXT "& :", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED + PUSHBUTTON "&Усунення несправностей...", IDC_DEVPROBLEM, 146, 163, 94, 15 + LTEXT "&Використання пристрою:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END IDD_DEVICEDRIVER DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Драйвер" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT " :", -1, 4, 39, 85, 8, SS_NOPREFIX + LTEXT "Постачальник драйвера:", -1, 4, 39, 85, 8, SS_NOPREFIX EDITTEXT IDC_DRVPROVIDER, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 4, 53, 60, 8, SS_NOPREFIX + LTEXT "Дата драйвера:", -1, 4, 53, 60, 8, SS_NOPREFIX EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 4, 67, 60, 8, SS_NOPREFIX + LTEXT "Версія драйвера:", -1, 4, 67, 60, 8, SS_NOPREFIX EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 4, 81, 65, 8, SS_NOPREFIX + LTEXT "Цифровий підпис:", -1, 4, 81, 65, 8, SS_NOPREFIX EDITTEXT IDC_DIGITALSIGNER, 100, 81, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - PUSHBUTTON "&³...", IDC_DRIVERDETAILS, 7, 106, 70, 15 - LTEXT " .", -1, 91, 110, 154, 17, SS_NOPREFIX + PUSHBUTTON "&Відомості...", IDC_DRIVERDETAILS, 7, 106, 70, 15 + LTEXT "Перегляд відомостей про файли драйвера.", -1, 91, 110, 154, 17, SS_NOPREFIX END IDD_DRIVERDETAILS DIALOGEX DISCARDABLE 0, 0, 224, 230 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_DLGFRAME -CAPTION "³ " +CAPTION "Відомості про файли драйвера" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX - LTEXT "& :", -1, 7, 36, 204, 8 + LTEXT "&Файли драйвера:", -1, 7, 36, 204, 8 CONTROL "", IDC_DRIVERFILES, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_SORTASCENDING | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 7, 46, 209, 80 - LTEXT ":", -1, 4, 134, 50, 8 + LTEXT "Постачальник:", -1, 4, 134, 50, 8 EDITTEXT IDC_FILEPROVIDER, 66, 134, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 4, 150, 50, 8 + LTEXT "Версія файлу:", -1, 4, 150, 50, 8 EDITTEXT IDC_FILEVERSION, 66, 150, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 4, 166, 65, 8 + LTEXT "Авторські права:", -1, 4, 166, 65, 8 EDITTEXT IDC_FILECOPYRIGHT, 66, 166, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY - LTEXT " :", -1, 4, 182, 65, 8 + LTEXT "Цифровий підпис:", -1, 4, 182, 65, 8 EDITTEXT IDC_DIGITALSIGNER, 66, 182, 155, 8, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY DEFPUSHBUTTON "OK", IDOK, 167, 208, 50, 14 END IDD_DEVICEDETAILS DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "³" +CAPTION "Відомості" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 @@ -218,7 +218,7 @@ END IDD_DEVICERESOURCES DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Ресурси" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 @@ -227,7 +227,7 @@ END IDD_DEVICEPOWER DIALOGEX DISCARDABLE 0, 0, 252, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Живлення" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_DEVICON, 7, 7, 20, 20 diff --git a/dll/win32/dhcpcsvc/CMakeLists.txt b/dll/win32/dhcpcsvc/CMakeLists.txt index 1d2323ab522..f82c89cdfc8 100644 --- a/dll/win32/dhcpcsvc/CMakeLists.txt +++ b/dll/win32/dhcpcsvc/CMakeLists.txt @@ -23,15 +23,13 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/dhcpcsvc_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/dhcpcsvc.def) -add_library(dhcpcsvc SHARED - ${CMAKE_CURRENT_BINARY_DIR}/dhcpcsvc_rosdhcp.h.gch - ${SOURCE}) +add_library(dhcpcsvc SHARED ${SOURCE}) set_module_type(dhcpcsvc win32dll) add_importlibs(dhcpcsvc ws2_32 iphlpapi advapi32 msvcrt kernel32 ntdll) add_importlib_target(dhcpcsvc.spec) -add_pch(dhcpcsvc ${CMAKE_CURRENT_SOURCE_DIR}/include/rosdhcp.h ${SOURCE}) +add_pch(dhcpcsvc include/rosdhcp.h) add_cd_file(TARGET dhcpcsvc DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/dnsapi/CMakeLists.txt b/dll/win32/dnsapi/CMakeLists.txt index fbd465929de..da10aab172c 100644 --- a/dll/win32/dnsapi/CMakeLists.txt +++ b/dll/win32/dnsapi/CMakeLists.txt @@ -4,9 +4,7 @@ include_directories( ${REACTOS_SOURCE_DIR}/lib/3rdparty/adns/src ${REACTOS_SOURCE_DIR}/lib/3rdparty/adns/adns_win32) -add_definitions( - -D_DLL -D__USE_CRTIMP - -DADNS_JGAA_WIN32) +add_definitions(-DADNS_JGAA_WIN32) spec2def(dnsapi.dll dnsapi.spec) @@ -21,19 +19,12 @@ list(APPEND SOURCE dnsapi.rc ${CMAKE_CURRENT_BINARY_DIR}/dnsapi.def) -add_library(dnsapi SHARED - ${CMAKE_CURRENT_BINARY_DIR}/dnsapi_precomp.h.gch - ${SOURCE}) +add_library(dnsapi SHARED ${SOURCE}) set_entrypoint(dnsapi 0) - target_link_libraries(dnsapi adns) -if(MSVC) - target_link_libraries(dnsapi msvcsup) -endif() - add_importlibs(dnsapi user32 ws2_32 iphlpapi msvcrt kernel32 ntdll) -add_pch(dnsapi ${CMAKE_CURRENT_SOURCE_DIR}/dnsapi/precomp.h ${SOURCE}) +add_pch(dnsapi dnsapi/precomp.h) add_dependencies(dnsapi psdk) add_cd_file(TARGET dnsapi DESTINATION reactos/system32 FOR all) add_importlib_target(dnsapi.spec) diff --git a/dll/win32/fmifs/CMakeLists.txt b/dll/win32/fmifs/CMakeLists.txt index 6595fcaf519..8773f74176b 100644 --- a/dll/win32/fmifs/CMakeLists.txt +++ b/dll/win32/fmifs/CMakeLists.txt @@ -14,8 +14,9 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/fmifs_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/fmifs.def) -add_pch(fmifs ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) -add_library(fmifs SHARED ${CMAKE_CURRENT_BINARY_DIR}/fmifs_precomp.h.gch ${SOURCE}) +add_library(fmifs SHARED ${SOURCE}) + +add_pch(fmifs precomp.h) set_entrypoint(fmifs InitializeFmIfs@12) diff --git a/dll/win32/gdi32/CMakeLists.txt b/dll/win32/gdi32/CMakeLists.txt index 3f679a14dfa..a3aaeb13479 100644 --- a/dll/win32/gdi32/CMakeLists.txt +++ b/dll/win32/gdi32/CMakeLists.txt @@ -1,17 +1,15 @@ set_unicode() -add_definitions( - -D_DLL -D__USE_CRTIMP - -DLANGPACK) +add_definitions(-DLANGPACK) include_directories(include) spec2def(gdi32.dll gdi32.spec) if(ARCH MATCHES i386) -list(APPEND SOURCE - objects/efloat.c) + list(APPEND SOURCE + objects/efloat.c) endif() list(APPEND SOURCE @@ -47,9 +45,7 @@ list(APPEND SOURCE gdi32.rc ${CMAKE_CURRENT_BINARY_DIR}/gdi32.def) -add_library(gdi32 SHARED - ${CMAKE_CURRENT_BINARY_DIR}/gdi32_precomp.h.gch - ${SOURCE}) +add_library(gdi32 SHARED ${SOURCE}) set_module_type(gdi32 win32dll) @@ -59,6 +55,6 @@ target_link_libraries(gdi32 ${PSEH_LIB}) add_importlibs(gdi32 user32 advapi32 msvcrt kernel32 ntdll) -add_pch(gdi32 ${CMAKE_CURRENT_SOURCE_DIR}/include/precomp.h ${SOURCE}) +add_pch(gdi32 include/precomp.h) add_cd_file(TARGET gdi32 DESTINATION reactos/system32 FOR all) add_importlib_target(gdi32.spec) diff --git a/dll/win32/gdi32/objects/bitmap.c b/dll/win32/gdi32/objects/bitmap.c index 9e5aaeb6477..b135d3ac338 100644 --- a/dll/win32/gdi32/objects/bitmap.c +++ b/dll/win32/gdi32/objects/bitmap.c @@ -679,31 +679,27 @@ SetDIBitsToDevice( #endif cjBmpScanSize = DIB_BitmapMaxBitsSize((LPBITMAPINFO)lpbmi, ScanLines); - if ( Bits ) - { - pvSafeBits = RtlAllocateHeap(GetProcessHeap(), 0, cjBmpScanSize); - if (pvSafeBits) - { - _SEH2_TRY - { - RtlCopyMemory( pvSafeBits, Bits, cjBmpScanSize); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Hit = TRUE; - } - _SEH2_END + pvSafeBits = RtlAllocateHeap(GetProcessHeap(), 0, cjBmpScanSize); + if (pvSafeBits) + { + _SEH2_TRY + { + RtlCopyMemory( pvSafeBits, Bits, cjBmpScanSize); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Hit = TRUE; + } + _SEH2_END - if (Hit) - { - // We don't die, we continue on with a allocated safe pointer to kernel - // space..... - DPRINT1("SetDIBitsToDevice fail to read BitMapInfo: %x or Bits: %x & Size: %d\n",pConvertedInfo,Bits,cjBmpScanSize); - } - DPRINT("SetDIBitsToDevice Allocate Bits %d!!!\n", cjBmpScanSize); - } - - } + if (Hit) + { + // We don't die, we continue on with a allocated safe pointer to kernel + // space..... + DPRINT1("SetDIBitsToDevice fail to read BitMapInfo: %x or Bits: %x & Size: %d\n",pConvertedInfo,Bits,cjBmpScanSize); + } + DPRINT("SetDIBitsToDevice Allocate Bits %d!!!\n", cjBmpScanSize); + } if (!GdiGetHandleUserData(hdc, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr)) { diff --git a/dll/win32/gdiplus/CMakeLists.txt b/dll/win32/gdiplus/CMakeLists.txt index 696628e6114..cf2e3742b0e 100644 --- a/dll/win32/gdiplus/CMakeLists.txt +++ b/dll/win32/gdiplus/CMakeLists.txt @@ -1,8 +1,7 @@ add_definitions( -D__WINESRC__ - -D_USE_MATH_DEFINES - -D_DLL -D__USE_CRTIMP) + -D_USE_MATH_DEFINES) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -24,14 +23,18 @@ list(APPEND SOURCE pen.c region.c stringformat.c - #${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c ${CMAKE_CURRENT_BINARY_DIR}/gdiplus_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/gdiplus.def) +if(MSVC) + set_source_files_properties(${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c PROPERTIES GENERATED TRUE) + list(APPEND SOURCE + ${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c) +endif() + add_library(gdiplus SHARED ${SOURCE}) set_module_type(gdiplus win32dll) - target_link_libraries(gdiplus uuid wine) add_importlibs(gdiplus @@ -46,9 +49,9 @@ add_importlibs(gdiplus ntdll) add_importlib_target(gdiplus.spec) - + if(ARCH MATCHES amd64) -target_link_libraries(gdiplus crt) -endif(ARCH MATCHES amd64) + target_link_libraries(gdiplus crt) +endif() add_cd_file(TARGET gdiplus DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/glu32/CMakeLists.txt b/dll/win32/glu32/CMakeLists.txt index 0013b2d1af0..24f98502940 100644 --- a/dll/win32/glu32/CMakeLists.txt +++ b/dll/win32/glu32/CMakeLists.txt @@ -2,8 +2,7 @@ add_definitions( -DRESOLVE_3D_TEXTURE_SUPPORT -DBUILD_GL32 - -DLIBRARYBUILD - -D_DLL -D__USE_CRTIMP) + -DLIBRARYBUILD) include_directories( include @@ -111,7 +110,9 @@ add_library(glu32 SHARED ${SOURCE}) set_entrypoint(glu32 0) -target_link_libraries(glu32 stlport -lsupc++ -lgcc -lmingw32 -lcoldname) +if(NOT MSVC) + target_link_libraries(glu32 stlport -lsupc++ -lgcc -lmingw32 oldnames) +endif() add_importlibs(glu32 opengl32 diff --git a/dll/win32/glu32/include/gluos.h b/dll/win32/glu32/include/gluos.h index ad15a840316..bc88a534f2a 100644 --- a/dll/win32/glu32/include/gluos.h +++ b/dll/win32/glu32/include/gluos.h @@ -108,9 +108,11 @@ #pragma warning(disable : 4761) #endif +/* #if defined(_MSC_VER) && _MSC_VER >= 1200 #pragma comment(linker, "/OPT:NOWIN98") #endif +*/ #ifndef GLAPIENTRY #define GLAPIENTRY APIENTRY diff --git a/dll/win32/glu32/libnurbs/internals/intersect.cc b/dll/win32/glu32/libnurbs/internals/intersect.cc index 204a8b3f0b7..9e412c4760d 100644 --- a/dll/win32/glu32/libnurbs/internals/intersect.cc +++ b/dll/win32/glu32/libnurbs/internals/intersect.cc @@ -178,13 +178,7 @@ Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir ) Arc_ptr jarc1; TrimVertex* v = jarc->pwlArc->pts; - int loc[3]; - -#if defined(__GNUC__) && \ - (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ == 40400) - /* Silence incorrect GCC 4.4.0 warnings */ - loc[0] = loc[1] = loc[2] = 0; -#endif + int loc[3] = {0,0,0}; switch( pwlarc_intersect( jarc->pwlArc, param, value, dir, loc ) ) { diff --git a/dll/win32/hid/CMakeLists.txt b/dll/win32/hid/CMakeLists.txt index 646fe86a22a..0a32561b58d 100644 --- a/dll/win32/hid/CMakeLists.txt +++ b/dll/win32/hid/CMakeLists.txt @@ -9,12 +9,10 @@ list(APPEND SOURCE spec2def(hid.dll hid.spec) -add_library(hid SHARED - ${CMAKE_CURRENT_BINARY_DIR}/hid_precomp.h.gch - ${SOURCE}) +add_library(hid SHARED ${SOURCE}) set_module_type(hid win32dll) add_importlibs(hid msvcrt kernel32 ntdll) -add_pch(hid ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(hid precomp.h) add_cd_file(TARGET hid DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/imaadp32.acm/CMakeLists.txt b/dll/win32/imaadp32.acm/CMakeLists.txt index 3693cd025ad..772071b846b 100644 --- a/dll/win32/imaadp32.acm/CMakeLists.txt +++ b/dll/win32/imaadp32.acm/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D_DLL -D__USE_CRTIMP - -D__WINESRC__) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(imaadp32.acm imaadp32.acm.spec) @@ -15,9 +12,7 @@ add_library(imaadp32.acm SHARED ${SOURCE}) set_entrypoint(imaadp32.acm 0) set_target_properties(imaadp32.acm PROPERTIES SUFFIX "") - target_link_libraries(imaadp32.acm wine) - add_importlibs(imaadp32.acm winmm user32 msvcrt kernel32 ntdll) add_dependencies(imaadp32.acm psdk) add_cd_file(TARGET imaadp32.acm DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/imagehlp/CMakeLists.txt b/dll/win32/imagehlp/CMakeLists.txt index d14eed603e5..573098c670e 100644 --- a/dll/win32/imagehlp/CMakeLists.txt +++ b/dll/win32/imagehlp/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D_DLL -D__USE_CRTIMP - -D_IMAGEHLP_SOURCE_) - +add_definitions(-D_IMAGEHLP_SOURCE_) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(imagehlp.dll imagehlp.spec) @@ -16,17 +13,11 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/imagehlp_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/imagehlp.def) -add_library(imagehlp SHARED - ${CMAKE_CURRENT_BINARY_DIR}/imagehlp_precomp.h.gch - ${SOURCE}) +add_library(imagehlp SHARED ${SOURCE}) set_module_type(imagehlp win32dll) - target_link_libraries(imagehlp wine) - add_importlibs(imagehlp dbghelp msvcrt kernel32 ntdll) add_importlib_target(imagehlp.spec) - -add_pch(imagehlp ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) - +add_pch(imagehlp precomp.h) add_cd_file(TARGET imagehlp DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/inetmib1/CMakeLists.txt b/dll/win32/inetmib1/CMakeLists.txt index ac98360c7ea..84b92fc5424 100644 --- a/dll/win32/inetmib1/CMakeLists.txt +++ b/dll/win32/inetmib1/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(inetmib1.dll inetmib1.spec) @@ -15,7 +12,6 @@ list(APPEND SOURCE add_library(inetmib1 SHARED ${SOURCE}) set_module_type(inetmib1 win32dll) - target_link_libraries(inetmib1 wine) add_importlibs(inetmib1 diff --git a/dll/win32/iologmsg/iologmsg.rbuild b/dll/win32/iologmsg/iologmsg.rbuild new file mode 100644 index 00000000000..3ecd68dc2a3 --- /dev/null +++ b/dll/win32/iologmsg/iologmsg.rbuild @@ -0,0 +1,6 @@ + + . + . + ntiologc + iologmsg.rc + diff --git a/dll/win32/iologmsg/iologmsg.rc b/dll/win32/iologmsg/iologmsg.rc new file mode 100644 index 00000000000..f0084f0eabe --- /dev/null +++ b/dll/win32/iologmsg/iologmsg.rc @@ -0,0 +1,9 @@ +#include + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "I/O Log Message Dll\0" +#define REACTOS_STR_INTERNAL_NAME "iologmsg\0" +#define REACTOS_STR_ORIGINAL_FILENAME "iologmsg.dll\0" +#include + +#include "ntiologc.rc" diff --git a/dll/win32/iphlpapi/CMakeLists.txt b/dll/win32/iphlpapi/CMakeLists.txt index 8bc6ca2132e..c8ae984d34a 100644 --- a/dll/win32/iphlpapi/CMakeLists.txt +++ b/dll/win32/iphlpapi/CMakeLists.txt @@ -1,8 +1,6 @@ set_unicode() -add_definitions(-D_DLL -D__USE_CRTIMP) - include_directories( ${REACTOS_SOURCE_DIR}/include/reactos/wine ${REACTOS_SOURCE_DIR}/dll/win32/dhcpcsvc/include diff --git a/dll/win32/itss/CMakeLists.txt b/dll/win32/itss/CMakeLists.txt index fd53de89a2b..188c2c37784 100644 --- a/dll/win32/itss/CMakeLists.txt +++ b/dll/win32/itss/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) set_rc_compiler() @@ -24,8 +21,10 @@ list(APPEND SOURCE add_library(itss SHARED ${SOURCE}) set_module_type(itss win32dll) - target_link_libraries(itss uuid wine) +if(MSVC) + target_link_libraries(itss itss_guid) +endif() add_importlibs(itss urlmon diff --git a/dll/win32/jscript/CMakeLists.txt b/dll/win32/jscript/CMakeLists.txt index 08d53fc21e4..27afb3d6f0c 100644 --- a/dll/win32/jscript/CMakeLists.txt +++ b/dll/win32/jscript/CMakeLists.txt @@ -1,5 +1,6 @@ add_typelib(jsglobal jsglobal.idl) + add_dependencies(jsglobal stdole2) remove_definitions(-D_WIN32_WINNT=0x502) @@ -8,8 +9,6 @@ add_definitions(-D_WIN32_WINNT=0x600) add_definitions( -D__WINESRC__ -D_USE_MATH_DEFINES - -D_DLL - -D__USE_CRTIMP -Disinf=!_finite -Disnan=_isnan) diff --git a/dll/win32/kernel32/CMakeLists.txt b/dll/win32/kernel32/CMakeLists.txt index e94f5134b7d..d60988f39c4 100644 --- a/dll/win32/kernel32/CMakeLists.txt +++ b/dll/win32/kernel32/CMakeLists.txt @@ -109,17 +109,15 @@ list(APPEND SOURCE thread/amd64/thread.S) endif(ARCH MATCHES i386) -add_library(kernel32 SHARED - ${CMAKE_CURRENT_BINARY_DIR}/kernel32_k32.h.gch - ${SOURCE}) +add_library(kernel32 SHARED ${SOURCE}) set_entrypoint(kernel32 DllMain@12) set_image_base(kernel32 ${baseaddress_kernel32}) -target_link_libraries(kernel32 ${PSEH_LIB}) +target_link_libraries(kernel32 chkstk ${PSEH_LIB}) add_importlibs(kernel32 ntdll) -add_pch(kernel32 ${CMAKE_CURRENT_SOURCE_DIR}/k32.h ${SOURCE}) +add_pch(kernel32 k32.h) add_dependencies(kernel32 psdk errcodes asm) add_cd_file(TARGET kernel32 DESTINATION reactos/system32 FOR all) add_importlib_target(kernel32.spec) diff --git a/dll/win32/kernel32/file/volume.c b/dll/win32/kernel32/file/volume.c index 1f64e0bbc79..0e336661a6b 100644 --- a/dll/win32/kernel32/file/volume.c +++ b/dll/win32/kernel32/file/volume.c @@ -29,41 +29,41 @@ DEBUG_CHANNEL(kernel32file); static HANDLE InternalOpenDirW(LPCWSTR DirName, - BOOLEAN Write) + BOOLEAN Write) { - UNICODE_STRING NtPathU; - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS errCode; - IO_STATUS_BLOCK IoStatusBlock; - HANDLE hFile; + UNICODE_STRING NtPathU; + OBJECT_ATTRIBUTES ObjectAttributes; + NTSTATUS errCode; + IO_STATUS_BLOCK IoStatusBlock; + HANDLE hFile; - if (!RtlDosPathNameToNtPathName_U(DirName, - &NtPathU, - NULL, - NULL)) + if (!RtlDosPathNameToNtPathName_U(DirName, + &NtPathU, + NULL, + NULL)) { - WARN("Invalid path\n"); - SetLastError(ERROR_BAD_PATHNAME); - return INVALID_HANDLE_VALUE; + WARN("Invalid path\n"); + SetLastError(ERROR_BAD_PATHNAME); + return INVALID_HANDLE_VALUE; } InitializeObjectAttributes(&ObjectAttributes, - &NtPathU, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); + &NtPathU, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); errCode = NtCreateFile (&hFile, - Write ? FILE_GENERIC_WRITE : FILE_GENERIC_READ, - &ObjectAttributes, - &IoStatusBlock, - NULL, - 0, - FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OPEN, - 0, - NULL, - 0); + Write ? FILE_GENERIC_WRITE : FILE_GENERIC_READ, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ|FILE_SHARE_WRITE, + FILE_OPEN, + 0, + NULL, + 0); RtlFreeHeap(RtlGetProcessHeap(), 0, @@ -71,8 +71,8 @@ InternalOpenDirW(LPCWSTR DirName, if (!NT_SUCCESS(errCode)) { - SetLastErrorByStatus (errCode); - return INVALID_HANDLE_VALUE; + SetLastErrorByStatus (errCode); + return INVALID_HANDLE_VALUE; } return hFile; } @@ -84,34 +84,34 @@ InternalOpenDirW(LPCWSTR DirName, /* Synced to Wine-2008/12/28 */ DWORD WINAPI GetLogicalDriveStringsA(DWORD nBufferLength, - LPSTR lpBuffer) + LPSTR lpBuffer) { - DWORD drive, count; - DWORD dwDriveMap; - LPSTR p; + DWORD drive, count; + DWORD dwDriveMap; + LPSTR p; - dwDriveMap = GetLogicalDrives(); + dwDriveMap = GetLogicalDrives(); - for (drive = count = 0; drive < MAX_DOS_DRIVES; drive++) - { - if (dwDriveMap & (1< nBufferLength) return ((count * 4) + 1); + if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1); - p = lpBuffer; + p = lpBuffer; - for (drive = 0; drive < MAX_DOS_DRIVES; drive++) - if (dwDriveMap & (1< nBufferLength) return ((count * 4) + 1); @@ -161,24 +161,24 @@ GetLogicalDriveStringsW(DWORD nBufferLength, DWORD WINAPI GetLogicalDrives(VOID) { - NTSTATUS Status; - PROCESS_DEVICEMAP_INFORMATION ProcessDeviceMapInfo; + NTSTATUS Status; + PROCESS_DEVICEMAP_INFORMATION ProcessDeviceMapInfo; - /* Get the Device Map for this Process */ - Status = NtQueryInformationProcess(NtCurrentProcess(), - ProcessDeviceMap, - &ProcessDeviceMapInfo, - sizeof(ProcessDeviceMapInfo), - NULL); + /* Get the Device Map for this Process */ + Status = NtQueryInformationProcess(NtCurrentProcess(), + ProcessDeviceMap, + &ProcessDeviceMapInfo, + sizeof(ProcessDeviceMapInfo), + NULL); - /* Return the Drive Map */ - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return 0; - } + /* Return the Drive Map */ + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return 0; + } - return ProcessDeviceMapInfo.Query.DriveMap; + return ProcessDeviceMapInfo.Query.DriveMap; } @@ -187,26 +187,26 @@ GetLogicalDrives(VOID) */ BOOL WINAPI GetDiskFreeSpaceA ( - LPCSTR lpRootPathName, - LPDWORD lpSectorsPerCluster, - LPDWORD lpBytesPerSector, - LPDWORD lpNumberOfFreeClusters, - LPDWORD lpTotalNumberOfClusters -) + LPCSTR lpRootPathName, + LPDWORD lpSectorsPerCluster, + LPDWORD lpBytesPerSector, + LPDWORD lpNumberOfFreeClusters, + LPDWORD lpTotalNumberOfClusters + ) { - PWCHAR RootPathNameW=NULL; + PWCHAR RootPathNameW=NULL; - if (lpRootPathName) - { - if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) - return FALSE; - } + if (lpRootPathName) + { + if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) + return FALSE; + } - return GetDiskFreeSpaceW (RootPathNameW, - lpSectorsPerCluster, - lpBytesPerSector, - lpNumberOfFreeClusters, - lpTotalNumberOfClusters); + return GetDiskFreeSpaceW (RootPathNameW, + lpSectorsPerCluster, + lpBytesPerSector, + lpNumberOfFreeClusters, + lpTotalNumberOfClusters); } @@ -220,7 +220,7 @@ GetDiskFreeSpaceW( LPDWORD lpBytesPerSector, LPDWORD lpNumberOfFreeClusters, LPDWORD lpTotalNumberOfClusters -) + ) { FILE_FS_SIZE_INFORMATION FileFsSize; IO_STATUS_BLOCK IoStatusBlock; @@ -238,11 +238,11 @@ GetDiskFreeSpaceW( } RootPathName[3] = 0; - hFile = InternalOpenDirW(RootPathName, FALSE); - if (INVALID_HANDLE_VALUE == hFile) + hFile = InternalOpenDirW(RootPathName, FALSE); + if (INVALID_HANDLE_VALUE == hFile) { - SetLastError(ERROR_PATH_NOT_FOUND); - return FALSE; + SetLastError(ERROR_PATH_NOT_FOUND); + return FALSE; } errCode = NtQueryVolumeInformationFile(hFile, @@ -276,24 +276,24 @@ GetDiskFreeSpaceW( */ BOOL WINAPI GetDiskFreeSpaceExA ( - LPCSTR lpDirectoryName OPTIONAL, - PULARGE_INTEGER lpFreeBytesAvailableToCaller, - PULARGE_INTEGER lpTotalNumberOfBytes, - PULARGE_INTEGER lpTotalNumberOfFreeBytes -) + LPCSTR lpDirectoryName OPTIONAL, + PULARGE_INTEGER lpFreeBytesAvailableToCaller, + PULARGE_INTEGER lpTotalNumberOfBytes, + PULARGE_INTEGER lpTotalNumberOfFreeBytes + ) { - PWCHAR DirectoryNameW=NULL; + PWCHAR DirectoryNameW=NULL; - if (lpDirectoryName) - { - if (!(DirectoryNameW = FilenameA2W(lpDirectoryName, FALSE))) - return FALSE; - } + if (lpDirectoryName) + { + if (!(DirectoryNameW = FilenameA2W(lpDirectoryName, FALSE))) + return FALSE; + } - return GetDiskFreeSpaceExW (DirectoryNameW , - lpFreeBytesAvailableToCaller, - lpTotalNumberOfBytes, - lpTotalNumberOfFreeBytes); + return GetDiskFreeSpaceExW (DirectoryNameW , + lpFreeBytesAvailableToCaller, + lpTotalNumberOfBytes, + lpTotalNumberOfFreeBytes); } @@ -306,7 +306,7 @@ GetDiskFreeSpaceExW( PULARGE_INTEGER lpFreeBytesAvailableToCaller, PULARGE_INTEGER lpTotalNumberOfBytes, PULARGE_INTEGER lpTotalNumberOfFreeBytes -) + ) { union { @@ -417,12 +417,12 @@ GetDiskFreeSpaceExW( UINT WINAPI GetDriveTypeA(LPCSTR lpRootPathName) { - PWCHAR RootPathNameW; + PWCHAR RootPathNameW; - if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) - return DRIVE_UNKNOWN; + if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) + return DRIVE_UNKNOWN; - return GetDriveTypeW(RootPathNameW); + return GetDriveTypeW(RootPathNameW); } @@ -432,105 +432,52 @@ GetDriveTypeA(LPCSTR lpRootPathName) UINT WINAPI GetDriveTypeW(LPCWSTR lpRootPathName) { - FILE_FS_DEVICE_INFORMATION FileFsDevice; - IO_STATUS_BLOCK IoStatusBlock; - HANDLE hFile; - NTSTATUS Status; - UNICODE_STRING NtPath; - OBJECT_ATTRIBUTES ObjectAttributes; - WCHAR Buffer[MAX_PATH+1]; + FILE_FS_DEVICE_INFORMATION FileFsDevice; + IO_STATUS_BLOCK IoStatusBlock; - if (!lpRootPathName) - { - DWORD cBytes; + HANDLE hFile; + NTSTATUS errCode; - /* Get current directory */ - cBytes = RtlGetCurrentDirectory_U(sizeof(Buffer), Buffer); - if(cBytes < sizeof(Buffer)) + hFile = InternalOpenDirW(lpRootPathName, FALSE); + if (hFile == INVALID_HANDLE_VALUE) + { + return DRIVE_NO_ROOT_DIR; /* According to WINE regression tests */ + } + + errCode = NtQueryVolumeInformationFile (hFile, + &IoStatusBlock, + &FileFsDevice, + sizeof(FILE_FS_DEVICE_INFORMATION), + FileFsDeviceInformation); + if (!NT_SUCCESS(errCode)) + { + CloseHandle(hFile); + SetLastErrorByStatus (errCode); + return 0; + } + CloseHandle(hFile); + + switch (FileFsDevice.DeviceType) { - ASSERT(cBytes < MAX_PATH*sizeof(WCHAR)); - Buffer[cBytes/sizeof(WCHAR)] = L'\\'; - Buffer[cBytes/sizeof(WCHAR)+1] = L'\0'; - lpRootPathName = Buffer; - } /* else fail... should we allow longer current dirs? */ - } + case FILE_DEVICE_CD_ROM: + case FILE_DEVICE_CD_ROM_FILE_SYSTEM: + return DRIVE_CDROM; + case FILE_DEVICE_VIRTUAL_DISK: + return DRIVE_RAMDISK; + case FILE_DEVICE_NETWORK_FILE_SYSTEM: + return DRIVE_REMOTE; + case FILE_DEVICE_DISK: + case FILE_DEVICE_DISK_FILE_SYSTEM: + if (FileFsDevice.Characteristics & FILE_REMOTE_DEVICE) + return DRIVE_REMOTE; + if (FileFsDevice.Characteristics & FILE_REMOVABLE_MEDIA) + return DRIVE_REMOVABLE; + return DRIVE_FIXED; + } - if (!RtlDosPathNameToNtPathName_U(lpRootPathName, &NtPath, NULL, NULL)) - { - WARN("Invalid path: %ls\n", lpRootPathName); - return DRIVE_NO_ROOT_DIR; - } + ERR("Returning DRIVE_UNKNOWN for device type %d\n", FileFsDevice.DeviceType); - /* Path from RtlDosPathNameToNtPathName_U does not contain '/' and multiple '\\' in a row */ - if(!NtPath.Length || NtPath.Buffer[NtPath.Length/sizeof(WCHAR)-1] != L'\\') - { - /* Path must be ended by slash */ - WARN("Invalid path: %ls\n", NtPath.Buffer); - return DRIVE_NO_ROOT_DIR; - } - - /* Remove ending slash */ - NtPath.Length -= sizeof(WCHAR); - - InitializeObjectAttributes(&ObjectAttributes, - &NtPath, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - Status = NtCreateFile(&hFile, - FILE_GENERIC_READ, - &ObjectAttributes, - &IoStatusBlock, - NULL, - 0, - FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OPEN, - 0, - NULL, - 0); - - RtlFreeUnicodeString(&NtPath); - - if (!NT_SUCCESS(Status)) - { - WARN("Invalid path: %ls\n", lpRootPathName); - return DRIVE_NO_ROOT_DIR; /* According to WINE regression tests */ - } - - Status = NtQueryVolumeInformationFile (hFile, - &IoStatusBlock, - &FileFsDevice, - sizeof(FILE_FS_DEVICE_INFORMATION), - FileFsDeviceInformation); - CloseHandle(hFile); - if (!NT_SUCCESS(Status)) - { - ERR("NtQueryVolumeInformationFile failed for %ls\n", lpRootPathName); - return DRIVE_UNKNOWN; - } - - switch (FileFsDevice.DeviceType) - { - case FILE_DEVICE_CD_ROM: - case FILE_DEVICE_CD_ROM_FILE_SYSTEM: - return DRIVE_CDROM; - case FILE_DEVICE_VIRTUAL_DISK: - return DRIVE_RAMDISK; - case FILE_DEVICE_NETWORK_FILE_SYSTEM: - return DRIVE_REMOTE; - case FILE_DEVICE_DISK: - case FILE_DEVICE_DISK_FILE_SYSTEM: - if (FileFsDevice.Characteristics & FILE_REMOTE_DEVICE) - return DRIVE_REMOTE; - if (FileFsDevice.Characteristics & FILE_REMOVABLE_MEDIA) - return DRIVE_REMOVABLE; - return DRIVE_FIXED; - } - - ERR("Returning DRIVE_UNKNOWN for device type %d\n", FileFsDevice.DeviceType); - - return DRIVE_UNKNOWN; + return DRIVE_UNKNOWN; } @@ -539,134 +486,134 @@ GetDriveTypeW(LPCWSTR lpRootPathName) */ BOOL WINAPI GetVolumeInformationA( - LPCSTR lpRootPathName, - LPSTR lpVolumeNameBuffer, - DWORD nVolumeNameSize, - LPDWORD lpVolumeSerialNumber, - LPDWORD lpMaximumComponentLength, - LPDWORD lpFileSystemFlags, - LPSTR lpFileSystemNameBuffer, - DWORD nFileSystemNameSize -) + LPCSTR lpRootPathName, + LPSTR lpVolumeNameBuffer, + DWORD nVolumeNameSize, + LPDWORD lpVolumeSerialNumber, + LPDWORD lpMaximumComponentLength, + LPDWORD lpFileSystemFlags, + LPSTR lpFileSystemNameBuffer, + DWORD nFileSystemNameSize + ) { - UNICODE_STRING FileSystemNameU; - UNICODE_STRING VolumeNameU = { 0, 0, NULL }; - ANSI_STRING VolumeName; - ANSI_STRING FileSystemName; - PWCHAR RootPathNameW; - BOOL Result; + UNICODE_STRING FileSystemNameU; + UNICODE_STRING VolumeNameU = { 0, 0, NULL }; + ANSI_STRING VolumeName; + ANSI_STRING FileSystemName; + PWCHAR RootPathNameW; + BOOL Result; - if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) - return FALSE; + if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) + return FALSE; - if (lpVolumeNameBuffer) + if (lpVolumeNameBuffer) { - VolumeNameU.MaximumLength = (USHORT)nVolumeNameSize * sizeof(WCHAR); - VolumeNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), - 0, - VolumeNameU.MaximumLength); - if (VolumeNameU.Buffer == NULL) - { - goto FailNoMem; - } + VolumeNameU.MaximumLength = (USHORT)nVolumeNameSize * sizeof(WCHAR); + VolumeNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), + 0, + VolumeNameU.MaximumLength); + if (VolumeNameU.Buffer == NULL) + { + goto FailNoMem; + } } - if (lpFileSystemNameBuffer) + if (lpFileSystemNameBuffer) { - FileSystemNameU.Length = 0; - FileSystemNameU.MaximumLength = (USHORT)nFileSystemNameSize * sizeof(WCHAR); - FileSystemNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), - 0, - FileSystemNameU.MaximumLength); - if (FileSystemNameU.Buffer == NULL) - { - if (VolumeNameU.Buffer != NULL) - { - RtlFreeHeap(RtlGetProcessHeap(), - 0, - VolumeNameU.Buffer); - } + FileSystemNameU.Length = 0; + FileSystemNameU.MaximumLength = (USHORT)nFileSystemNameSize * sizeof(WCHAR); + FileSystemNameU.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), + 0, + FileSystemNameU.MaximumLength); + if (FileSystemNameU.Buffer == NULL) + { + if (VolumeNameU.Buffer != NULL) + { + RtlFreeHeap(RtlGetProcessHeap(), + 0, + VolumeNameU.Buffer); + } FailNoMem: - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } } - Result = GetVolumeInformationW (RootPathNameW, - lpVolumeNameBuffer ? VolumeNameU.Buffer : NULL, - nVolumeNameSize, - lpVolumeSerialNumber, - lpMaximumComponentLength, - lpFileSystemFlags, - lpFileSystemNameBuffer ? FileSystemNameU.Buffer : NULL, - nFileSystemNameSize); + Result = GetVolumeInformationW (RootPathNameW, + lpVolumeNameBuffer ? VolumeNameU.Buffer : NULL, + nVolumeNameSize, + lpVolumeSerialNumber, + lpMaximumComponentLength, + lpFileSystemFlags, + lpFileSystemNameBuffer ? FileSystemNameU.Buffer : NULL, + nFileSystemNameSize); - if (Result) + if (Result) { - if (lpVolumeNameBuffer) + if (lpVolumeNameBuffer) { - VolumeNameU.Length = wcslen(VolumeNameU.Buffer) * sizeof(WCHAR); - VolumeName.Length = 0; - VolumeName.MaximumLength = (USHORT)nVolumeNameSize; - VolumeName.Buffer = lpVolumeNameBuffer; - } + VolumeNameU.Length = wcslen(VolumeNameU.Buffer) * sizeof(WCHAR); + VolumeName.Length = 0; + VolumeName.MaximumLength = (USHORT)nVolumeNameSize; + VolumeName.Buffer = lpVolumeNameBuffer; + } - if (lpFileSystemNameBuffer) - { - FileSystemNameU.Length = wcslen(FileSystemNameU.Buffer) * sizeof(WCHAR); - FileSystemName.Length = 0; - FileSystemName.MaximumLength = (USHORT)nFileSystemNameSize; - FileSystemName.Buffer = lpFileSystemNameBuffer; - } + if (lpFileSystemNameBuffer) + { + FileSystemNameU.Length = wcslen(FileSystemNameU.Buffer) * sizeof(WCHAR); + FileSystemName.Length = 0; + FileSystemName.MaximumLength = (USHORT)nFileSystemNameSize; + FileSystemName.Buffer = lpFileSystemNameBuffer; + } - /* convert unicode strings to ansi (or oem) */ - if (bIsFileApiAnsi) + /* convert unicode strings to ansi (or oem) */ + if (bIsFileApiAnsi) { - if (lpVolumeNameBuffer) - { - RtlUnicodeStringToAnsiString (&VolumeName, - &VolumeNameU, - FALSE); - } - if (lpFileSystemNameBuffer) - { - RtlUnicodeStringToAnsiString (&FileSystemName, - &FileSystemNameU, - FALSE); - } - } - else + if (lpVolumeNameBuffer) + { + RtlUnicodeStringToAnsiString (&VolumeName, + &VolumeNameU, + FALSE); + } + if (lpFileSystemNameBuffer) + { + RtlUnicodeStringToAnsiString (&FileSystemName, + &FileSystemNameU, + FALSE); + } + } + else { - if (lpVolumeNameBuffer) - { - RtlUnicodeStringToOemString (&VolumeName, - &VolumeNameU, - FALSE); - } - if (lpFileSystemNameBuffer) - { - RtlUnicodeStringToOemString (&FileSystemName, - &FileSystemNameU, - FALSE); - } - } + if (lpVolumeNameBuffer) + { + RtlUnicodeStringToOemString (&VolumeName, + &VolumeNameU, + FALSE); + } + if (lpFileSystemNameBuffer) + { + RtlUnicodeStringToOemString (&FileSystemName, + &FileSystemNameU, + FALSE); + } + } } - if (lpVolumeNameBuffer) + if (lpVolumeNameBuffer) { - RtlFreeHeap (RtlGetProcessHeap (), - 0, - VolumeNameU.Buffer); + RtlFreeHeap (RtlGetProcessHeap (), + 0, + VolumeNameU.Buffer); } - if (lpFileSystemNameBuffer) + if (lpFileSystemNameBuffer) { - RtlFreeHeap (RtlGetProcessHeap (), - 0, - FileSystemNameU.Buffer); + RtlFreeHeap (RtlGetProcessHeap (), + 0, + FileSystemNameU.Buffer); } - return Result; + return Result; } #define FS_VOLUME_BUFFER_SIZE (MAX_PATH * sizeof(WCHAR) + sizeof(FILE_FS_VOLUME_INFORMATION)) @@ -686,106 +633,106 @@ GetVolumeInformationW( LPDWORD lpFileSystemFlags, LPWSTR lpFileSystemNameBuffer, DWORD nFileSystemNameSize -) + ) { - PFILE_FS_VOLUME_INFORMATION FileFsVolume; - PFILE_FS_ATTRIBUTE_INFORMATION FileFsAttribute; - IO_STATUS_BLOCK IoStatusBlock; - WCHAR RootPathName[MAX_PATH]; - UCHAR Buffer[max(FS_VOLUME_BUFFER_SIZE, FS_ATTRIBUTE_BUFFER_SIZE)]; + PFILE_FS_VOLUME_INFORMATION FileFsVolume; + PFILE_FS_ATTRIBUTE_INFORMATION FileFsAttribute; + IO_STATUS_BLOCK IoStatusBlock; + WCHAR RootPathName[MAX_PATH]; + UCHAR Buffer[max(FS_VOLUME_BUFFER_SIZE, FS_ATTRIBUTE_BUFFER_SIZE)]; - HANDLE hFile; - NTSTATUS errCode; + HANDLE hFile; + NTSTATUS errCode; - FileFsVolume = (PFILE_FS_VOLUME_INFORMATION)Buffer; - FileFsAttribute = (PFILE_FS_ATTRIBUTE_INFORMATION)Buffer; + FileFsVolume = (PFILE_FS_VOLUME_INFORMATION)Buffer; + FileFsAttribute = (PFILE_FS_ATTRIBUTE_INFORMATION)Buffer; - TRACE("FileFsVolume %p\n", FileFsVolume); - TRACE("FileFsAttribute %p\n", FileFsAttribute); + TRACE("FileFsVolume %p\n", FileFsVolume); + TRACE("FileFsAttribute %p\n", FileFsAttribute); - if (!lpRootPathName || !wcscmp(lpRootPathName, L"")) + if (!lpRootPathName || !wcscmp(lpRootPathName, L"")) + { + GetCurrentDirectoryW (MAX_PATH, RootPathName); + } + else + { + wcsncpy (RootPathName, lpRootPathName, 3); + } + RootPathName[3] = 0; + + hFile = InternalOpenDirW(RootPathName, FALSE); + if (hFile == INVALID_HANDLE_VALUE) { - GetCurrentDirectoryW (MAX_PATH, RootPathName); - } - else - { - wcsncpy (RootPathName, lpRootPathName, 3); - } - RootPathName[3] = 0; - - hFile = InternalOpenDirW(RootPathName, FALSE); - if (hFile == INVALID_HANDLE_VALUE) - { - return FALSE; + return FALSE; } - TRACE("hFile: %x\n", hFile); - errCode = NtQueryVolumeInformationFile(hFile, - &IoStatusBlock, - FileFsVolume, - FS_VOLUME_BUFFER_SIZE, - FileFsVolumeInformation); - if ( !NT_SUCCESS(errCode) ) + TRACE("hFile: %x\n", hFile); + errCode = NtQueryVolumeInformationFile(hFile, + &IoStatusBlock, + FileFsVolume, + FS_VOLUME_BUFFER_SIZE, + FileFsVolumeInformation); + if ( !NT_SUCCESS(errCode) ) { - WARN("Status: %x\n", errCode); - CloseHandle(hFile); - SetLastErrorByStatus (errCode); - return FALSE; + WARN("Status: %x\n", errCode); + CloseHandle(hFile); + SetLastErrorByStatus (errCode); + return FALSE; } - if (lpVolumeSerialNumber) - *lpVolumeSerialNumber = FileFsVolume->VolumeSerialNumber; + if (lpVolumeSerialNumber) + *lpVolumeSerialNumber = FileFsVolume->VolumeSerialNumber; - if (lpVolumeNameBuffer) + if (lpVolumeNameBuffer) { - if (nVolumeNameSize * sizeof(WCHAR) >= FileFsVolume->VolumeLabelLength + sizeof(WCHAR)) + if (nVolumeNameSize * sizeof(WCHAR) >= FileFsVolume->VolumeLabelLength + sizeof(WCHAR)) { - memcpy(lpVolumeNameBuffer, - FileFsVolume->VolumeLabel, - FileFsVolume->VolumeLabelLength); - lpVolumeNameBuffer[FileFsVolume->VolumeLabelLength / sizeof(WCHAR)] = 0; - } - else + memcpy(lpVolumeNameBuffer, + FileFsVolume->VolumeLabel, + FileFsVolume->VolumeLabelLength); + lpVolumeNameBuffer[FileFsVolume->VolumeLabelLength / sizeof(WCHAR)] = 0; + } + else { - CloseHandle(hFile); - SetLastError(ERROR_MORE_DATA); - return FALSE; - } + CloseHandle(hFile); + SetLastError(ERROR_MORE_DATA); + return FALSE; + } } - errCode = NtQueryVolumeInformationFile (hFile, - &IoStatusBlock, - FileFsAttribute, - FS_ATTRIBUTE_BUFFER_SIZE, - FileFsAttributeInformation); - CloseHandle(hFile); - if (!NT_SUCCESS(errCode)) + errCode = NtQueryVolumeInformationFile (hFile, + &IoStatusBlock, + FileFsAttribute, + FS_ATTRIBUTE_BUFFER_SIZE, + FileFsAttributeInformation); + CloseHandle(hFile); + if (!NT_SUCCESS(errCode)) { - WARN("Status: %x\n", errCode); - SetLastErrorByStatus (errCode); - return FALSE; + WARN("Status: %x\n", errCode); + SetLastErrorByStatus (errCode); + return FALSE; } - if (lpFileSystemFlags) - *lpFileSystemFlags = FileFsAttribute->FileSystemAttributes; - if (lpMaximumComponentLength) - *lpMaximumComponentLength = FileFsAttribute->MaximumComponentNameLength; - if (lpFileSystemNameBuffer) + if (lpFileSystemFlags) + *lpFileSystemFlags = FileFsAttribute->FileSystemAttributes; + if (lpMaximumComponentLength) + *lpMaximumComponentLength = FileFsAttribute->MaximumComponentNameLength; + if (lpFileSystemNameBuffer) { - if (nFileSystemNameSize * sizeof(WCHAR) >= FileFsAttribute->FileSystemNameLength + sizeof(WCHAR)) + if (nFileSystemNameSize * sizeof(WCHAR) >= FileFsAttribute->FileSystemNameLength + sizeof(WCHAR)) { - memcpy(lpFileSystemNameBuffer, - FileFsAttribute->FileSystemName, - FileFsAttribute->FileSystemNameLength); - lpFileSystemNameBuffer[FileFsAttribute->FileSystemNameLength / sizeof(WCHAR)] = 0; - } - else + memcpy(lpFileSystemNameBuffer, + FileFsAttribute->FileSystemName, + FileFsAttribute->FileSystemNameLength); + lpFileSystemNameBuffer[FileFsAttribute->FileSystemNameLength / sizeof(WCHAR)] = 0; + } + else { - SetLastError(ERROR_MORE_DATA); - return FALSE; - } + SetLastError(ERROR_MORE_DATA); + return FALSE; + } } - return TRUE; + return TRUE; } @@ -795,34 +742,34 @@ GetVolumeInformationW( BOOL WINAPI SetVolumeLabelA ( - LPCSTR lpRootPathName, - LPCSTR lpVolumeName /* NULL if deleting label */ -) + LPCSTR lpRootPathName, + LPCSTR lpVolumeName /* NULL if deleting label */ + ) { - PWCHAR RootPathNameW; - PWCHAR VolumeNameW = NULL; - BOOL Result; + PWCHAR RootPathNameW; + PWCHAR VolumeNameW = NULL; + BOOL Result; - if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) - return FALSE; + if (!(RootPathNameW = FilenameA2W(lpRootPathName, FALSE))) + return FALSE; - if (lpVolumeName) - { - if (!(VolumeNameW = FilenameA2W(lpVolumeName, TRUE))) - return FALSE; - } + if (lpVolumeName) + { + if (!(VolumeNameW = FilenameA2W(lpVolumeName, TRUE))) + return FALSE; + } - Result = SetVolumeLabelW (RootPathNameW, - VolumeNameW); + Result = SetVolumeLabelW (RootPathNameW, + VolumeNameW); - if (VolumeNameW) - { - RtlFreeHeap (RtlGetProcessHeap (), - 0, - VolumeNameW ); - } + if (VolumeNameW) + { + RtlFreeHeap (RtlGetProcessHeap (), + 0, + VolumeNameW ); + } - return Result; + return Result; } @@ -831,61 +778,61 @@ SetVolumeLabelA ( */ BOOL WINAPI SetVolumeLabelW( - LPCWSTR lpRootPathName, - LPCWSTR lpVolumeName /* NULL if deleting label */ -) + LPCWSTR lpRootPathName, + LPCWSTR lpVolumeName /* NULL if deleting label */ + ) { - PFILE_FS_LABEL_INFORMATION LabelInfo; - IO_STATUS_BLOCK IoStatusBlock; - ULONG LabelLength; - HANDLE hFile; - NTSTATUS Status; + PFILE_FS_LABEL_INFORMATION LabelInfo; + IO_STATUS_BLOCK IoStatusBlock; + ULONG LabelLength; + HANDLE hFile; + NTSTATUS Status; - LabelLength = wcslen(lpVolumeName) * sizeof(WCHAR); - LabelInfo = RtlAllocateHeap(RtlGetProcessHeap(), - 0, - sizeof(FILE_FS_LABEL_INFORMATION) + - LabelLength); - if (LabelInfo == NULL) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - LabelInfo->VolumeLabelLength = LabelLength; - memcpy(LabelInfo->VolumeLabel, - lpVolumeName, - LabelLength); + LabelLength = wcslen(lpVolumeName) * sizeof(WCHAR); + LabelInfo = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + sizeof(FILE_FS_LABEL_INFORMATION) + + LabelLength); + if (LabelInfo == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + LabelInfo->VolumeLabelLength = LabelLength; + memcpy(LabelInfo->VolumeLabel, + lpVolumeName, + LabelLength); - hFile = InternalOpenDirW(lpRootPathName, TRUE); - if (INVALID_HANDLE_VALUE == hFile) - { + hFile = InternalOpenDirW(lpRootPathName, TRUE); + if (INVALID_HANDLE_VALUE == hFile) + { RtlFreeHeap(RtlGetProcessHeap(), - 0, - LabelInfo); + 0, + LabelInfo); return FALSE; - } + } - Status = NtSetVolumeInformationFile(hFile, - &IoStatusBlock, - LabelInfo, - sizeof(FILE_FS_LABEL_INFORMATION) + - LabelLength, - FileFsLabelInformation); + Status = NtSetVolumeInformationFile(hFile, + &IoStatusBlock, + LabelInfo, + sizeof(FILE_FS_LABEL_INFORMATION) + + LabelLength, + FileFsLabelInformation); - RtlFreeHeap(RtlGetProcessHeap(), - 0, - LabelInfo); + RtlFreeHeap(RtlGetProcessHeap(), + 0, + LabelInfo); - if (!NT_SUCCESS(Status)) - { - WARN("Status: %x\n", Status); - CloseHandle(hFile); - SetLastErrorByStatus(Status); - return FALSE; - } + if (!NT_SUCCESS(Status)) + { + WARN("Status: %x\n", Status); + CloseHandle(hFile); + SetLastErrorByStatus(Status); + return FALSE; + } - CloseHandle(hFile); - return TRUE; + CloseHandle(hFile); + return TRUE; } /** @@ -909,217 +856,217 @@ SetVolumeLabelW( BOOL WINAPI GetVolumeNameForVolumeMountPointW( - IN LPCWSTR VolumeMountPoint, - OUT LPWSTR VolumeName, - IN DWORD VolumeNameLength) + IN LPCWSTR VolumeMountPoint, + OUT LPWSTR VolumeName, + IN DWORD VolumeNameLength) { - UNICODE_STRING NtFileName; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE FileHandle; - IO_STATUS_BLOCK Iosb; - ULONG BufferLength; - PMOUNTDEV_NAME MountDevName; - PMOUNTMGR_MOUNT_POINT MountPoint; - ULONG MountPointSize; - PMOUNTMGR_MOUNT_POINTS MountPoints; - ULONG Index; - PUCHAR SymbolicLinkName; - BOOL Result; - NTSTATUS Status; + UNICODE_STRING NtFileName; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE FileHandle; + IO_STATUS_BLOCK Iosb; + ULONG BufferLength; + PMOUNTDEV_NAME MountDevName; + PMOUNTMGR_MOUNT_POINT MountPoint; + ULONG MountPointSize; + PMOUNTMGR_MOUNT_POINTS MountPoints; + ULONG Index; + PUCHAR SymbolicLinkName; + BOOL Result; + NTSTATUS Status; - if (!VolumeMountPoint || !VolumeMountPoint[0]) - { - SetLastError(ERROR_PATH_NOT_FOUND); - return FALSE; - } + if (!VolumeMountPoint || !VolumeMountPoint[0]) + { + SetLastError(ERROR_PATH_NOT_FOUND); + return FALSE; + } - /* - * First step is to convert the passed volume mount point name to - * an NT acceptable name. - */ + /* + * First step is to convert the passed volume mount point name to + * an NT acceptable name. + */ - if (!RtlDosPathNameToNtPathName_U(VolumeMountPoint, &NtFileName, NULL, NULL)) - { - SetLastError(ERROR_PATH_NOT_FOUND); - return FALSE; - } + if (!RtlDosPathNameToNtPathName_U(VolumeMountPoint, &NtFileName, NULL, NULL)) + { + SetLastError(ERROR_PATH_NOT_FOUND); + return FALSE; + } - if (NtFileName.Length > sizeof(WCHAR) && - NtFileName.Buffer[(NtFileName.Length / sizeof(WCHAR)) - 1] == '\\') - { - NtFileName.Length -= sizeof(WCHAR); - } + if (NtFileName.Length > sizeof(WCHAR) && + NtFileName.Buffer[(NtFileName.Length / sizeof(WCHAR)) - 1] == '\\') + { + NtFileName.Length -= sizeof(WCHAR); + } - /* - * Query mount point device name which we will later use for determining - * the volume name. - */ + /* + * Query mount point device name which we will later use for determining + * the volume name. + */ - InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL); - Status = NtOpenFile(&FileHandle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, - &ObjectAttributes, &Iosb, - FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_SYNCHRONOUS_IO_NONALERT); - RtlFreeUnicodeString(&NtFileName); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return FALSE; - } + InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL); + Status = NtOpenFile(&FileHandle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, + &ObjectAttributes, &Iosb, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_SYNCHRONOUS_IO_NONALERT); + RtlFreeUnicodeString(&NtFileName); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } - BufferLength = sizeof(MOUNTDEV_NAME) + 50 * sizeof(WCHAR); - do - { - MountDevName = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength); - if (MountDevName == NULL) - { + BufferLength = sizeof(MOUNTDEV_NAME) + 50 * sizeof(WCHAR); + do + { + MountDevName = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength); + if (MountDevName == NULL) + { + NtClose(FileHandle); + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb, + IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, + NULL, 0, MountDevName, BufferLength); + if (!NT_SUCCESS(Status)) + { + RtlFreeHeap(GetProcessHeap(), 0, MountDevName); + if (Status == STATUS_BUFFER_OVERFLOW) + { + BufferLength = sizeof(MOUNTDEV_NAME) + MountDevName->NameLength; + continue; + } + else + { NtClose(FileHandle); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); + SetLastErrorByStatus(Status); return FALSE; - } + } + } + } + while (!NT_SUCCESS(Status)); - Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb, - IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, - NULL, 0, MountDevName, BufferLength); - if (!NT_SUCCESS(Status)) - { - RtlFreeHeap(GetProcessHeap(), 0, MountDevName); - if (Status == STATUS_BUFFER_OVERFLOW) + NtClose(FileHandle); + + /* + * Get the mount point information from mount manager. + */ + + MountPointSize = MountDevName->NameLength + sizeof(MOUNTMGR_MOUNT_POINT); + MountPoint = RtlAllocateHeap(GetProcessHeap(), 0, MountPointSize); + if (MountPoint == NULL) + { + RtlFreeHeap(GetProcessHeap(), 0, MountDevName); + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + RtlZeroMemory(MountPoint, sizeof(MOUNTMGR_MOUNT_POINT)); + MountPoint->DeviceNameOffset = sizeof(MOUNTMGR_MOUNT_POINT); + MountPoint->DeviceNameLength = MountDevName->NameLength; + RtlCopyMemory(MountPoint + 1, MountDevName->Name, MountDevName->NameLength); + RtlFreeHeap(RtlGetProcessHeap(), 0, MountDevName); + + RtlInitUnicodeString(&NtFileName, L"\\??\\MountPointManager"); + InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL); + Status = NtOpenFile(&FileHandle, FILE_GENERIC_READ | SYNCHRONIZE, &ObjectAttributes, + &Iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_SYNCHRONOUS_IO_NONALERT); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); + return FALSE; + } + + BufferLength = sizeof(MOUNTMGR_MOUNT_POINTS); + do + { + MountPoints = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength); + if (MountPoints == NULL) + { + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); + NtClose(FileHandle); + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb, + IOCTL_MOUNTMGR_QUERY_POINTS, + MountPoint, MountPointSize, + MountPoints, BufferLength); + if (!NT_SUCCESS(Status)) + { + if (Status == STATUS_BUFFER_OVERFLOW) + { + BufferLength = MountPoints->Size; + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); + continue; + } + else if (!NT_SUCCESS(Status)) + { + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); + NtClose(FileHandle); + SetLastErrorByStatus(Status); + return FALSE; + } + } + } + while (!NT_SUCCESS(Status)); + + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); + NtClose(FileHandle); + + /* + * Now we've gathered info about all mount points mapped to our device, so + * select the correct one and copy it into the output buffer. + */ + + for (Index = 0; Index < MountPoints->NumberOfMountPoints; Index++) + { + MountPoint = MountPoints->MountPoints + Index; + SymbolicLinkName = (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset; + + /* + * Check for "\\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\" + * (with the last slash being optional) style symbolic links. + */ + + if (MountPoint->SymbolicLinkNameLength == 48 * sizeof(WCHAR) || + (MountPoint->SymbolicLinkNameLength == 49 * sizeof(WCHAR) && + SymbolicLinkName[48] == L'\\')) + { + if (RtlCompareMemory(SymbolicLinkName, L"\\??\\Volume{", + 11 * sizeof(WCHAR)) == 11 * sizeof(WCHAR) && + SymbolicLinkName[19] == L'-' && SymbolicLinkName[24] == L'-' && + SymbolicLinkName[29] == L'-' && SymbolicLinkName[34] == L'-' && + SymbolicLinkName[47] == L'}') + { + if (VolumeNameLength >= MountPoint->SymbolicLinkNameLength / sizeof(WCHAR)) { - BufferLength = sizeof(MOUNTDEV_NAME) + MountDevName->NameLength; - continue; + RtlCopyMemory(VolumeName, + (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset, + MountPoint->SymbolicLinkNameLength); + VolumeName[1] = L'\\'; + Result = TRUE; } else { - NtClose(FileHandle); - SetLastErrorByStatus(Status); - return FALSE; + SetLastError(ERROR_FILENAME_EXCED_RANGE); + Result = FALSE; } - } - } - while (!NT_SUCCESS(Status)); - NtClose(FileHandle); + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); - /* - * Get the mount point information from mount manager. - */ + return Result; + } + } + } - MountPointSize = MountDevName->NameLength + sizeof(MOUNTMGR_MOUNT_POINT); - MountPoint = RtlAllocateHeap(GetProcessHeap(), 0, MountPointSize); - if (MountPoint == NULL) - { - RtlFreeHeap(GetProcessHeap(), 0, MountDevName); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - RtlZeroMemory(MountPoint, sizeof(MOUNTMGR_MOUNT_POINT)); - MountPoint->DeviceNameOffset = sizeof(MOUNTMGR_MOUNT_POINT); - MountPoint->DeviceNameLength = MountDevName->NameLength; - RtlCopyMemory(MountPoint + 1, MountDevName->Name, MountDevName->NameLength); - RtlFreeHeap(RtlGetProcessHeap(), 0, MountDevName); + RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); + SetLastError(ERROR_INVALID_PARAMETER); - RtlInitUnicodeString(&NtFileName, L"\\??\\MountPointManager"); - InitializeObjectAttributes(&ObjectAttributes, &NtFileName, 0, NULL, NULL); - Status = NtOpenFile(&FileHandle, FILE_GENERIC_READ | SYNCHRONIZE, &ObjectAttributes, - &Iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_SYNCHRONOUS_IO_NONALERT); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); - return FALSE; - } - - BufferLength = sizeof(MOUNTMGR_MOUNT_POINTS); - do - { - MountPoints = RtlAllocateHeap(RtlGetProcessHeap(), 0, BufferLength); - if (MountPoints == NULL) - { - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); - NtClose(FileHandle); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - - Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, NULL, &Iosb, - IOCTL_MOUNTMGR_QUERY_POINTS, - MountPoint, MountPointSize, - MountPoints, BufferLength); - if (!NT_SUCCESS(Status)) - { - if (Status == STATUS_BUFFER_OVERFLOW) - { - BufferLength = MountPoints->Size; - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); - continue; - } - else if (!NT_SUCCESS(Status)) - { - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); - NtClose(FileHandle); - SetLastErrorByStatus(Status); - return FALSE; - } - } - } - while (!NT_SUCCESS(Status)); - - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoint); - NtClose(FileHandle); - - /* - * Now we've gathered info about all mount points mapped to our device, so - * select the correct one and copy it into the output buffer. - */ - - for (Index = 0; Index < MountPoints->NumberOfMountPoints; Index++) - { - MountPoint = MountPoints->MountPoints + Index; - SymbolicLinkName = (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset; - - /* - * Check for "\\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\" - * (with the last slash being optional) style symbolic links. - */ - - if (MountPoint->SymbolicLinkNameLength == 48 * sizeof(WCHAR) || - (MountPoint->SymbolicLinkNameLength == 49 * sizeof(WCHAR) && - SymbolicLinkName[48] == L'\\')) - { - if (RtlCompareMemory(SymbolicLinkName, L"\\??\\Volume{", - 11 * sizeof(WCHAR)) == 11 * sizeof(WCHAR) && - SymbolicLinkName[19] == L'-' && SymbolicLinkName[24] == L'-' && - SymbolicLinkName[29] == L'-' && SymbolicLinkName[34] == L'-' && - SymbolicLinkName[47] == L'}') - { - if (VolumeNameLength >= MountPoint->SymbolicLinkNameLength / sizeof(WCHAR)) - { - RtlCopyMemory(VolumeName, - (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset, - MountPoint->SymbolicLinkNameLength); - VolumeName[1] = L'\\'; - Result = TRUE; - } - else - { - SetLastError(ERROR_FILENAME_EXCED_RANGE); - Result = FALSE; - } - - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); - - return Result; - } - } - } - - RtlFreeHeap(RtlGetProcessHeap(), 0, MountPoints); - SetLastError(ERROR_INVALID_PARAMETER); - - return FALSE; + return FALSE; } /* @@ -1131,7 +1078,7 @@ GetVolumeNameForVolumeMountPointA( LPCSTR lpszVolumeMountPoint, LPSTR lpszVolumeName, DWORD cchBufferLength -) + ) { BOOL ret; WCHAR volumeW[50], *pathW = NULL; @@ -1155,9 +1102,9 @@ GetVolumeNameForVolumeMountPointA( HANDLE WINAPI FindFirstVolumeW( - LPWSTR volume, - DWORD len -) + LPWSTR volume, + DWORD len + ) { DWORD size = 1024; HANDLE mgr = CreateFileW( MOUNTMGR_DOS_DEVICE_NAME, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, @@ -1204,9 +1151,9 @@ FindFirstVolumeW( HANDLE WINAPI FindFirstVolumeA( - LPSTR volume, - DWORD len -) + LPSTR volume, + DWORD len + ) { WCHAR *buffer = NULL; HANDLE handle; @@ -1240,7 +1187,7 @@ BOOL WINAPI FindVolumeClose( HANDLE hFindVolume -) + ) { return RtlFreeHeap(RtlGetProcessHeap(), 0, hFindVolume); } @@ -1328,12 +1275,12 @@ GetVolumePathNameW(LPCWSTR lpszFileName, } while (!GetVolumeNameForVolumeMountPointW(UnicodeFilePath.Buffer, - VolumeName, - MAX_PATH)) + VolumeName, + MAX_PATH)) { if (((UnicodeFilePath.Length == 4) && (UnicodeFilePath.Buffer[0] == '\\') && - (UnicodeFilePath.Buffer[1] == '\\')) || ((UnicodeFilePath.Length == 6) && - (UnicodeFilePath.Buffer[1] == ':'))) + (UnicodeFilePath.Buffer[1] == '\\')) || ((UnicodeFilePath.Length == 6) && + (UnicodeFilePath.Buffer[1] == ':'))) { break; } diff --git a/dll/win32/kernel32/kernel32.rc b/dll/win32/kernel32/kernel32.rc index afc92ab5b84..319acb78e8f 100644 --- a/dll/win32/kernel32/kernel32.rc +++ b/dll/win32/kernel32/kernel32.rc @@ -12,5 +12,8 @@ #include "lang/en-US.rc" #include "lang/de-DE.rc" #include "lang/es-ES.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/kernel32/lang/ru-RU.rc b/dll/win32/kernel32/lang/ru-RU.rc index 5fb005a12b7..bc7ca864ce4 100644 --- a/dll/win32/kernel32/lang/ru-RU.rc +++ b/dll/win32/kernel32/lang/ru-RU.rc @@ -1,163 +1,161 @@ -#pragma code_page(1251) - LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN /* Names of code pages */ - 1250 "1250 (ANSI - -)" - 1251 "1251 (ANSI - )" - 1252 "1252 (ANSI - 1)" - 1253 "1253 (ANSI - )" - 1254 "1254 (ANSI - )" - 1255 "1255 (ANSI - )" - 1256 "1256 (ANSI - )" - 1257 "1257 (ANSI - )" - 1258 "1258 (ANSI/OEM - )" - 874 "874 (ANSI/OEM - )" - 932 "932 (ANSI/OEM - Shift-JIS)" - 936 "936 (ANSI/OEM - GBK)" - 949 "949 (ANSI/OEM - )" - 950 "950 (ANSI/OEM - Big5)" + 1250 "1250 (ANSI - центрально-европейская)" + 1251 "1251 (ANSI - кириллица)" + 1252 "1252 (ANSI - латиница 1)" + 1253 "1253 (ANSI - греческая)" + 1254 "1254 (ANSI - турецкая)" + 1255 "1255 (ANSI - иврит)" + 1256 "1256 (ANSI - арабская)" + 1257 "1257 (ANSI - балтийская)" + 1258 "1258 (ANSI/OEM - вьетнамская)" + 874 "874 (ANSI/OEM - тайская)" + 932 "932 (ANSI/OEM - японская Shift-JIS)" + 936 "936 (ANSI/OEM - китайская упрощенная GBK)" + 949 "949 (ANSI/OEM - корейская)" + 950 "950 (ANSI/OEM - китайская традиционная Big5)" - 437 "437 (OEM - )" - 737 "737 (OEM - 437G)" - 775 "775 (OEM - )" - 850 "850 (OEM - 1)" - 852 "852 (OEM - 2)" - 855 "855 (OEM - )" - 857 "857 (OEM - )" - 858 "858 (OEM - 1 + )" - 860 "860 (OEM - )" - 861 "861 (OEM - )" - 862 "862 (OEM - )" - 863 "863 (OEM - -)" - 864 "864 (OEM - )" - 865 "865 (OEM - )" - 866 "866 (OEM - )" - 869 "869 (OEM - )" + 437 "437 (OEM - США)" + 737 "737 (OEM - греческая 437G)" + 775 "775 (OEM - балтийская)" + 850 "850 (OEM - многоязычная латиница 1)" + 852 "852 (OEM - латиница 2)" + 855 "855 (OEM - кириллица традиционная)" + 857 "857 (OEM - турецкая)" + 858 "858 (OEM - многоязычная латиница 1 + Евро)" + 860 "860 (OEM - португальская)" + 861 "861 (OEM - исландская)" + 862 "862 (OEM - иврит)" + 863 "863 (OEM - франко-канадская)" + 864 "864 (OEM - арабская)" + 865 "865 (OEM - скандинавская)" + 866 "866 (OEM - русская)" + 869 "869 (OEM - греческая современная)" - 10000 "10000 (MAC - )" - 10001 "10001 (MAC - )" - 10002 "10002 (MAC - Big5)" - 10003 "10003 (MAC - )" - 10004 "10004 (MAC - )" - 10005 "10005 (MAC - )" - 10006 "10006 (MAC - 1)" - 10007 "10007 (MAC - )" - 10008 "10008 (MAC - GB 2312)" - 10010 "10010 (MAC - )" - 10017 "10017 (MAC - )" - 10021 "10021 (MAC - )" - 10029 "10029 (MAC - 2)" - 10079 "10079 (MAC - )" - 10081 "10081 (MAC - )" - 10082 "10082 (MAC - )" + 10000 "10000 (MAC - латиница)" + 10001 "10001 (MAC - японская)" + 10002 "10002 (MAC - китайская традиционная Big5)" + 10003 "10003 (MAC - корейская)" + 10004 "10004 (MAC - арабская)" + 10005 "10005 (MAC - иврит)" + 10006 "10006 (MAC - греческая 1)" + 10007 "10007 (MAC - кириллица)" + 10008 "10008 (MAC - китайская упрощенная GB 2312)" + 10010 "10010 (MAC - румынская)" + 10017 "10017 (MAC - украинская)" + 10021 "10021 (MAC - тайская)" + 10029 "10029 (MAC - латиница 2)" + 10079 "10079 (MAC - исландская)" + 10081 "10081 (MAC - турецкая)" + 10082 "10082 (MAC - хорватская)" 65000 "65000 (UTF-7)" 65001 "65001 (UTF-8)" - 3700 "37 (IBM EBCDIC - /)" /* FIXME */ - 1026 "1026 (IBM EBCDIC - (-5))" - 1047 "1047 (IBM EBCDIC - 1/Open System)" - 1140 "1140 (IBM EBCDIC - / (37 + ))" - 1141 "1141 (IBM EBCDIC - (20273 + ))" - 1142 "1142 (IBM EBCDIC - / (20277 + ))" - 1143 "1143 (IBM EBCDIC - / (20278 + ))" - 1144 "1144 (IBM EBCDIC - (20280 + ))" - 1145 "1145 (IBM EBCDIC - / (20284 + ))" - 1146 "1146 (IBM EBCDIC - (20285 + ))" - 1147 "1147 (IBM EBCDIC - (20297 + ))" - 1148 "1148 (IBM EBCDIC - (500 + ))" - 1149 "1149 (IBM EBCDIC - (20871 + ))" - 20273 "20273 (IBM EBCDIC - )" - 20277 "20277 (IBM EBCDIC - /)" - 20278 "20278 (IBM EBCDIC - /)" - 20280 "20280 (IBM EBCDIC - )" - 20284 "20284 (IBM EBCDIC - /)" - 20285 "20285 (IBM EBCDIC - )" - 20290 "20290 (IBM EBCDIC - )" - 20297 "20297 (IBM EBCDIC - )" - 20420 "20420 (IBM EBCDIC - )" - 20423 "20423 (IBM EBCDIC - )" - 20424 "20424 (IBM EBCDIC - )" - 20833 "20833 (IBM EBCDIC - )" - 20838 "20838 (IBM EBCDIC - )" - 20871 "20871 (IBM EBCDIC - )" - 20880 "20880 (IBM EBCDIC - ())" - 20905 "20905 (IBM EBCDIC - )" - 20924 "20924 (IBM EBCDIC - 1/Open System (1047 + ))" - 21025 "21025 (IBM EBCDIC - (, ))" - 500 "500 (IBM EBCDIC - )" - 870 "870 (IBM EBCDIC - /ROECE (-2))" - 875 "875 (IBM EBCDIC - )" + 3700 "37 (IBM EBCDIC - США/Канада)" /* FIXME */ + 1026 "1026 (IBM EBCDIC - турецкая (латиница-5))" + 1047 "1047 (IBM EBCDIC - латиница 1/Open System)" + 1140 "1140 (IBM EBCDIC - США/Канада (37 + евро))" + 1141 "1141 (IBM EBCDIC - немецкая (20273 + евро))" + 1142 "1142 (IBM EBCDIC - датская/норвежская (20277 + евро))" + 1143 "1143 (IBM EBCDIC - финская/шведская (20278 + евро))" + 1144 "1144 (IBM EBCDIC - итальянская (20280 + евро))" + 1145 "1145 (IBM EBCDIC - латиноамер/испанская (20284 + евро))" + 1146 "1146 (IBM EBCDIC - британская (20285 + евро))" + 1147 "1147 (IBM EBCDIC - французская (20297 + евро))" + 1148 "1148 (IBM EBCDIC - международная (500 + евро))" + 1149 "1149 (IBM EBCDIC - исландская (20871 + евро))" + 20273 "20273 (IBM EBCDIC - немецкая)" + 20277 "20277 (IBM EBCDIC - датская/норвежская)" + 20278 "20278 (IBM EBCDIC - финская/шведская)" + 20280 "20280 (IBM EBCDIC - итальянская)" + 20284 "20284 (IBM EBCDIC - латиноамериканская/испанская)" + 20285 "20285 (IBM EBCDIC - британская)" + 20290 "20290 (IBM EBCDIC - японская расширенная катакана)" + 20297 "20297 (IBM EBCDIC - французская)" + 20420 "20420 (IBM EBCDIC - арабская)" + 20423 "20423 (IBM EBCDIC - греческая)" + 20424 "20424 (IBM EBCDIC - иврит)" + 20833 "20833 (IBM EBCDIC - корейская расширенная)" + 20838 "20838 (IBM EBCDIC - тайская)" + 20871 "20871 (IBM EBCDIC - исландская)" + 20880 "20880 (IBM EBCDIC - кириллица (русская))" + 20905 "20905 (IBM EBCDIC - турецкая)" + 20924 "20924 (IBM EBCDIC - латиница 1/Open System (1047 + евро))" + 21025 "21025 (IBM EBCDIC - кириллица (сербская, болгарская))" + 500 "500 (IBM EBCDIC - международная)" + 870 "870 (IBM EBCDIC - многоязычная/ROECE (латиница-2))" + 875 "875 (IBM EBCDIC - современная греческая)" - 20269 "20269 (ISO 6937 )" - 28591 "28591 (ISO 8859-1 1)" - 28592 "28592 (ISO 8859-2 )" - 28593 "28593 (ISO 8859-3 3)" - 28594 "28594 (ISO 8859-4 )" - 28595 "28595 (ISO 8859-5 )" - 28596 "28596 (ISO 8859-6 )" - 28597 "28597 (ISO 8859-7 )" - 28598 "28598 (ISO 8859-8 : )" - 28599 "28599 (ISO 8859-9 5)" - 28605 "28605 (ISO 8859-15 9)" - 38598 "38598 (ISO 8859-8 : )" + 20269 "20269 (ISO 6937 диакритические знаки)" + 28591 "28591 (ISO 8859-1 латиница 1)" + 28592 "28592 (ISO 8859-2 центральноевропейская)" + 28593 "28593 (ISO 8859-3 латиница 3)" + 28594 "28594 (ISO 8859-4 балтийская)" + 28595 "28595 (ISO 8859-5 кириллица)" + 28596 "28596 (ISO 8859-6 арабская)" + 28597 "28597 (ISO 8859-7 греческая)" + 28598 "28598 (ISO 8859-8 иврит: визуальная сортировка)" + 28599 "28599 (ISO 8859-9 латиница 5)" + 28605 "28605 (ISO 8859-15 латиница 9)" + 38598 "38598 (ISO 8859-8 иврит: логическая сортировка)" - 20105 "20105 (IA5 IRV 5)" - 20106 "20106 (IA5 )" - 20107 "20107 (IA5 )" - 20108 "20108 (IA5 )" + 20105 "20105 (IA5 IRV международный алфавит №5)" + 20106 "20106 (IA5 немецкая)" + 20107 "20107 (IA5 шведская)" + 20108 "20108 (IA5 норвежская)" - 1361 "1361 ( - Johab)" - 20000 "20000 (CNS - )" - 20001 "20001 (TCA - )" - 20002 "20002 (Eten - )" - 20003 "20003 (IBM5550 - )" - 20004 "20004 (TeleText - )" - 20005 "20005 (Wang - )" - 20127 "20127 (-ASCII)" + 1361 "1361 (корейская - Johab)" + 20000 "20000 (CNS - тайваньская)" + 20001 "20001 (TCA - тайваньская)" + 20002 "20002 (Eten - тайваньская)" + 20003 "20003 (IBM5550 - тайваньская)" + 20004 "20004 (TeleText - тайваньская)" + 20005 "20005 (Wang - тайваньская)" + 20127 "20127 (США-ASCII)" 20261 "20261 (T.61)" - 20866 "20866 ( - 8)" - 21027 "21027 (. . )" - 21866 "21866 ( - 8-U)" - 708 "708 ( - ASMO)" - 720 "720 ( - ASMO)" + 20866 "20866 (русская - КОИ8)" + 21027 "21027 (расш. алф. нижний регистр)" + 21866 "21866 (украинская - КОИ8-U)" + 708 "708 (арабская - ASMO)" + 720 "720 (арабская - прозрачная ASMO)" 20932 "20932 (JIS X 0208-1990 & 0212-1990)" - 20936 "20936 (GB2312 )" + 20936 "20936 (GB2312 китайская упрощенная)" 20949 "20949 (Korean Wansung)" - 57002 "57002 (ISCII )" - 57003 "57003 (ISCII )" - 57004 "57004 (ISCII )" - 57005 "57005 (ISCII )" - 57006 "57006 (ISCII )" - 57007 "57007 (ISCII )" - 57008 "57008 (ISCII )" - 57009 "57009 (ISCII )" - 57010 "57010 (ISCII )" - 57011 "57011 (ISCII )" + 57002 "57002 (ISCII деванагари)" + 57003 "57003 (ISCII бенгальская)" + 57004 "57004 (ISCII тамильская)" + 57005 "57005 (ISCII телугу)" + 57006 "57006 (ISCII ассамская)" + 57007 "57007 (ISCII ория)" + 57008 "57008 (ISCII каннада)" + 57009 "57009 (ISCII малаялам)" + 57010 "57010 (ISCII гуджарати)" + 57011 "57011 (ISCII гурмухи)" - 50930 "50930 (IBM EBCDIC - ( ))" - 50931 "50931 (IBM EBCDIC - / )" - 50933 "50933 (IBM EBCDIC - )" - 50935 "50935 (IBM EBCDIC - )" - 50937 "50937 (IBM EBCDIC - / )" - 50939 "50939 (IBM EBCDIC - () )" + 50930 "50930 (IBM EBCDIC - японская (с катаканой))" + 50931 "50931 (IBM EBCDIC - США/Канада и японская)" + 50933 "50933 (IBM EBCDIC - корейская и расширенная корейская)" + 50935 "50935 (IBM EBCDIC - китайская упрощенная)" + 50937 "50937 (IBM EBCDIC - США/Канада и китайская традиционная)" + 50939 "50939 (IBM EBCDIC - японская (латиница) расширенная и японская)" - 50220 "50220 (ISO-2022 )" - 50221 "50221 (ISO-2022 )" - 50222 "50222 (ISO-2022 JIS X 0201-1989)" - 50225 "50225 (ISO-2022 )" - 50227 "50227 (ISO-2022 )" - 50229 "50229 (ISO-2022 )" + 50220 "50220 (ISO-2022 японская без полуширинной катаканы)" + 50221 "50221 (ISO-2022 японская с полуширинной катаканой)" + 50222 "50222 (ISO-2022 японская JIS X 0201-1989)" + 50225 "50225 (ISO-2022 корейская)" + 50227 "50227 (ISO-2022 китайская упрощенная)" + 50229 "50229 (ISO-2022 китайская традиционная)" - 51932 "51932 (EUC-)" - 51936 "51936 (EUC- )" - 51949 "51949 (EUC-)" - 51950 "51950 (EUC- )" + 51932 "51932 (EUC-японская)" + 51936 "51936 (EUC-китайская упрощенная)" + 51949 "51949 (EUC-корейская)" + 51950 "51950 (EUC-китайская традиционная)" - 52936 "52936 (HZ-GB2312 )" - 54936 "54936 (GB18030 )" + 52936 "52936 (HZ-GB2312 китайская упрощенная)" + 54936 "54936 (GB18030 китайская упрощенная)" END diff --git a/dll/win32/kernel32/lang/uk-UA.rc b/dll/win32/kernel32/lang/uk-UA.rc index 2a1b984c511..40638ae35a1 100644 --- a/dll/win32/kernel32/lang/uk-UA.rc +++ b/dll/win32/kernel32/lang/uk-UA.rc @@ -1,163 +1,161 @@ -#pragma code_page(1251) - LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN /* Names of code pages */ - 1250 "1250 (ANSI - )" - 1251 "1251 (ANSI - )" - 1252 "1252 (ANSI - I)" - 1253 "1253 (ANSI - )" - 1254 "1254 (ANSI - )" - 1255 "1255 (ANSI - )" - 1256 "1256 (ANSI - )" - 1257 "1257 (ANSI - )" - 1258 "1258 (ANSI/OEM - ')" - 874 "874 (ANSI/OEM - )" - 932 "932 (ANSI/OEM - Shift-JIS)" - 936 "936 (ANSI/OEM - GBK)" - 949 "949 (ANSI/OEM - )" - 950 "950 (ANSI/OEM - Big5)" + 1250 "1250 (ANSI - Центральна Європа)" + 1251 "1251 (ANSI - Кирилиця)" + 1252 "1252 (ANSI - Латиниця I)" + 1253 "1253 (ANSI - Грецька)" + 1254 "1254 (ANSI - Турецька)" + 1255 "1255 (ANSI - Іврит)" + 1256 "1256 (ANSI - Арабська)" + 1257 "1257 (ANSI - Балтійська)" + 1258 "1258 (ANSI/OEM - В'єтнамська)" + 874 "874 (ANSI/OEM - Тайська)" + 932 "932 (ANSI/OEM - Японська Shift-JIS)" + 936 "936 (ANSI/OEM - Китайська спрощена GBK)" + 949 "949 (ANSI/OEM - Корейська)" + 950 "950 (ANSI/OEM - Китайська традиційна Big5)" - 437 "437 (OEM - )" - 737 "737 (OEM - 437G)" - 775 "775 (OEM - )" - 850 "850 (OEM - I)" - 852 "852 (OEM - II)" - 855 "855 (OEM - )" - 857 "857 (OEM - )" - 858 "858 (OEM - I + )" - 860 "860 (OEM - )" - 861 "861 (OEM - )" - 862 "862 (OEM - )" - 863 "863 (OEM - )" - 864 "864 (OEM - )" - 865 "865 (OEM - )" - 866 "866 (OEM - )" - 869 "869 (OEM - )" + 437 "437 (OEM - США)" + 737 "737 (OEM - Грецька 437G)" + 775 "775 (OEM - Балтійська)" + 850 "850 (OEM - Багатомовна Латиниця I)" + 852 "852 (OEM - Латиниця II)" + 855 "855 (OEM - Кирилиця)" + 857 "857 (OEM - Турецька)" + 858 "858 (OEM - Багатомовна Латиниця I + Євро)" + 860 "860 (OEM - Португальська)" + 861 "861 (OEM - Ісландська)" + 862 "862 (OEM - Іврит)" + 863 "863 (OEM - Канадська французька)" + 864 "864 (OEM - Арабська)" + 865 "865 (OEM - Скандинавська)" + 866 "866 (OEM - Російська)" + 869 "869 (OEM - Грецька сучасна)" - 10000 "10000 (MAC - )" - 10001 "10001 (MAC - )" - 10002 "10002 (MAC - Big5)" - 10003 "10003 (MAC - )" - 10004 "10004 (MAC - )" - 10005 "10005 (MAC - )" - 10006 "10006 (MAC - I)" - 10007 "10007 (MAC - )" - 10008 "10008 (MAC - GB 2312)" - 10010 "10010 (MAC - )" - 10017 "10017 (MAC - )" - 10021 "10021 (MAC - )" - 10029 "10029 (MAC - II)" - 10079 "10079 (MAC - )" - 10081 "10081 (MAC - )" - 10082 "10082 (MAC - )" + 10000 "10000 (MAC - Латиниця)" + 10001 "10001 (MAC - Японська)" + 10002 "10002 (MAC - Китайська традиційна Big5)" + 10003 "10003 (MAC - Корейська)" + 10004 "10004 (MAC - Арабська)" + 10005 "10005 (MAC - Іврит)" + 10006 "10006 (MAC - Грецька I)" + 10007 "10007 (MAC - Кирилиця)" + 10008 "10008 (MAC - Китайська спрощена GB 2312)" + 10010 "10010 (MAC - Румунська)" + 10017 "10017 (MAC - Українська)" + 10021 "10021 (MAC - Тайська)" + 10029 "10029 (MAC - Латиниця II)" + 10079 "10079 (MAC - Ісландська)" + 10081 "10081 (MAC - Турецька)" + 10082 "10082 (MAC - Хорватська)" 65000 "65000 (UTF-7)" 65001 "65001 (UTF-8)" - 3700 "37 (IBM EBCDIC - /)" /* FIXME */ - 1026 "1026 (IBM EBCDIC - (-5))" - 1047 "1047 (IBM EBCDIC - -1/Open System)" - 1140 "1140 (IBM EBCDIC - / (37 + ))" - 1141 "1141 (IBM EBCDIC - ͳ (20273 + ))" - 1142 "1142 (IBM EBCDIC - / (20277 + ))" - 1143 "1143 (IBM EBCDIC - Գ/ (20278 + ))" - 1144 "1144 (IBM EBCDIC - (20280 + ))" - 1145 "1145 (IBM EBCDIC - ./ (20284 + ))" - 1146 "1146 (IBM EBCDIC - (20285 + ))" - 1147 "1147 (IBM EBCDIC - (20297 + ))" - 1148 "1148 (IBM EBCDIC - ̳ (500 + ))" - 1149 "1149 (IBM EBCDIC - (20871 + ))" - 20273 "20273 (IBM EBCDIC - ͳ)" - 20277 "20277 (IBM EBCDIC - /)" - 20278 "20278 (IBM EBCDIC - Գ/)" - 20280 "20280 (IBM EBCDIC - )" - 20284 "20284 (IBM EBCDIC - ./)" - 20285 "20285 (IBM EBCDIC - )" - 20290 "20290 (IBM EBCDIC - )" - 20297 "20297 (IBM EBCDIC - )" - 20420 "20420 (IBM EBCDIC - )" - 20423 "20423 (IBM EBCDIC - )" - 20424 "20424 (IBM EBCDIC - )" - 20833 "20833 (IBM EBCDIC - )" - 20838 "20838 (IBM EBCDIC - )" - 20871 "20871 (IBM EBCDIC - )" - 20880 "20880 (IBM EBCDIC - ())" - 20905 "20905 (IBM EBCDIC - )" - 20924 "20924 (IBM EBCDIC - -1/Open System (1047 + ))" - 21025 "21025 (IBM EBCDIC - (, ))" - 500 "500 (IBM EBCDIC - ̳)" - 870 "870 (IBM EBCDIC - /ROECE (-2))" - 875 "875 (IBM EBCDIC - )" + 3700 "37 (IBM EBCDIC - США/Канада)" /* FIXME */ + 1026 "1026 (IBM EBCDIC - Турецька (Латиниця-5))" + 1047 "1047 (IBM EBCDIC - Латиниця-1/Open System)" + 1140 "1140 (IBM EBCDIC - США/Канада (37 + Євро))" + 1141 "1141 (IBM EBCDIC - Німецька (20273 + Євро))" + 1142 "1142 (IBM EBCDIC - Датська/Норвезька (20277 + Євро))" + 1143 "1143 (IBM EBCDIC - Фінська/Шведська (20278 + Євро))" + 1144 "1144 (IBM EBCDIC - Італійська (20280 + Євро))" + 1145 "1145 (IBM EBCDIC - Латиноамер./Іспанська (20284 + Євро))" + 1146 "1146 (IBM EBCDIC - Британська (20285 + Євро))" + 1147 "1147 (IBM EBCDIC - Французька (20297 + Євро))" + 1148 "1148 (IBM EBCDIC - Міжнародна (500 + Євро))" + 1149 "1149 (IBM EBCDIC - Ісландська (20871 + Євро))" + 20273 "20273 (IBM EBCDIC - Німецька)" + 20277 "20277 (IBM EBCDIC - Датська/Норвезька)" + 20278 "20278 (IBM EBCDIC - Фінська/Шведська)" + 20280 "20280 (IBM EBCDIC - Італійська)" + 20284 "20284 (IBM EBCDIC - Латиноамер./Іспанська)" + 20285 "20285 (IBM EBCDIC - Британська)" + 20290 "20290 (IBM EBCDIC - Японська Катакана Розширена)" + 20297 "20297 (IBM EBCDIC - Французька)" + 20420 "20420 (IBM EBCDIC - Арабська)" + 20423 "20423 (IBM EBCDIC - Грецька)" + 20424 "20424 (IBM EBCDIC - Іврит)" + 20833 "20833 (IBM EBCDIC - Корейська Розширена)" + 20838 "20838 (IBM EBCDIC - Тайська)" + 20871 "20871 (IBM EBCDIC - Ісландська)" + 20880 "20880 (IBM EBCDIC - Кирилиця (Російська))" + 20905 "20905 (IBM EBCDIC - Турецька)" + 20924 "20924 (IBM EBCDIC - Латиниця-1/Open System (1047 + Євро))" + 21025 "21025 (IBM EBCDIC - Кирилиця (Сербська, Болгарська))" + 500 "500 (IBM EBCDIC - Міжнародна)" + 870 "870 (IBM EBCDIC - Багатомовна/ROECE (Латиниця-2))" + 875 "875 (IBM EBCDIC - Сучасна Грецька)" - 20269 "20269 (ISO 6937 ij )" - 28591 "28591 (ISO 8859-1 I)" - 28592 "28592 (ISO 8859-2 )" - 28593 "28593 (ISO 8859-3 3)" - 28594 "28594 (ISO 8859-4 )" - 28595 "28595 (ISO 8859-5 )" - 28596 "28596 (ISO 8859-6 )" - 28597 "28597 (ISO 8859-7 )" - 28598 "28598 (ISO 8859-8 : ³ )" - 28599 "28599 (ISO 8859-9 5)" - 28605 "28605 (ISO 8859-15 9)" - 38598 "38598 (ISO 8859-8 : )" + 20269 "20269 (ISO 6937 Діакритичні Знаки)" + 28591 "28591 (ISO 8859-1 Латиниця I)" + 28592 "28592 (ISO 8859-2 Центральноєвропейська)" + 28593 "28593 (ISO 8859-3 Латиниця 3)" + 28594 "28594 (ISO 8859-4 Балтійська)" + 28595 "28595 (ISO 8859-5 Кирилиця)" + 28596 "28596 (ISO 8859-6 Арабська)" + 28597 "28597 (ISO 8859-7 Грецька)" + 28598 "28598 (ISO 8859-8 Іврит: Візуальний Порядок)" + 28599 "28599 (ISO 8859-9 Латиниця 5)" + 28605 "28605 (ISO 8859-15 Латиниця 9)" + 38598 "38598 (ISO 8859-8 Іврит: Логічний Порядок)" - 20105 "20105 (IA5 IRV ̳ No.5)" - 20106 "20106 (IA5 ͳ)" - 20107 "20107 (IA5 )" - 20108 "20108 (IA5 )" + 20105 "20105 (IA5 IRV Міжнародний Алфавіт No.5)" + 20106 "20106 (IA5 Німецька)" + 20107 "20107 (IA5 Шведська)" + 20108 "20108 (IA5 Норвезька)" - 1361 "1361 ( - Johab)" - 20000 "20000 (CNS - )" - 20001 "20001 (TCA - )" - 20002 "20002 (Eten - )" - 20003 "20003 (IBM5550 - )" - 20004 "20004 (TeleText - )" - 20005 "20005 (Wang - )" - 20127 "20127 (-ASCII)" + 1361 "1361 (Корейська - Johab)" + 20000 "20000 (CNS - Тайванська)" + 20001 "20001 (TCA - Тайванська)" + 20002 "20002 (Eten - Тайванська)" + 20003 "20003 (IBM5550 - Тайванська)" + 20004 "20004 (TeleText - Тайванська)" + 20005 "20005 (Wang - Тайванська)" + 20127 "20127 (США-ASCII)" 20261 "20261 (T.61)" - 20866 "20866 ( - KOI8)" - 21027 "21027 (. . )" - 21866 "21866 ( - KOI8-U)" - 708 "708 ( - ASMO)" - 720 "720 ( - ASMO)" + 20866 "20866 (Російська - KOI8)" + 21027 "21027 (Розш. Алф. Нижній регістр)" + 21866 "21866 (Українська - KOI8-U)" + 708 "708 (Арабська - ASMO)" + 720 "720 (Арабська - Прозора ASMO)" 20932 "20932 (JIS X 0208-1990 & 0212-1990)" - 20936 "20936 ( GB2312)" - 20949 "20949 ( Wansung)" + 20936 "20936 (Китайська спрощена GB2312)" + 20949 "20949 (Корейська Wansung)" - 57002 "57002 (ISCII )" - 57003 "57003 (ISCII )" - 57004 "57004 (ISCII )" - 57005 "57005 (ISCII )" - 57006 "57006 (ISCII )" - 57007 "57007 (ISCII )" - 57008 "57008 (ISCII )" - 57009 "57009 (ISCII )" - 57010 "57010 (ISCII )" - 57011 "57011 (ISCII )" + 57002 "57002 (ISCII Деванагарі)" + 57003 "57003 (ISCII Бенгальська)" + 57004 "57004 (ISCII Тамільська)" + 57005 "57005 (ISCII Телугу)" + 57006 "57006 (ISCII Ассамська)" + 57007 "57007 (ISCII Орія)" + 57008 "57008 (ISCII Канада)" + 57009 "57009 (ISCII Малаялам)" + 57010 "57010 (ISCII Гуджараті)" + 57011 "57011 (ISCII Гурмукхі)" - 50930 "50930 (IBM EBCDIC - () )" - 50931 "50931 (IBM EBCDIC - / )" - 50933 "50933 (IBM EBCDIC - )" - 50935 "50935 (IBM EBCDIC - )" - 50937 "50937 (IBM EBCDIC - / )" - 50939 "50939 (IBM EBCDIC - () )" + 50930 "50930 (IBM EBCDIC - Японська (Катакана) Розширена та Японська)" + 50931 "50931 (IBM EBCDIC - США/Канада та Японська)" + 50933 "50933 (IBM EBCDIC - Корейська та Розширена Корейська)" + 50935 "50935 (IBM EBCDIC - Китайська спрощена)" + 50937 "50937 (IBM EBCDIC - США/Канада та Китайська традиційна)" + 50939 "50939 (IBM EBCDIC - Японська (Латиниця) Розширена та Японська)" - 50220 "50220 (ISO-2022 )" - 50221 "50221 (ISO-2022 )" - 50222 "50222 (ISO-2022 JIS X 0201-1989)" - 50225 "50225 (ISO-2022 )" - 50227 "50227 (ISO-2022 )" - 50229 "50229 (ISO-2022 )" + 50220 "50220 (ISO-2022 Японська без півширинної Катакани)" + 50221 "50221 (ISO-2022 Японська з півширинною Катаканою)" + 50222 "50222 (ISO-2022 Японська JIS X 0201-1989)" + 50225 "50225 (ISO-2022 Корейська)" + 50227 "50227 (ISO-2022 Китайська спрощена)" + 50229 "50229 (ISO-2022 Китайська традиційна)" - 51932 "51932 (EUC-)" - 51936 "51936 (EUC- )" - 51949 "51949 (EUC-)" - 51950 "51950 (EUC- )" + 51932 "51932 (EUC-Японська)" + 51936 "51936 (EUC-Китайська спрощена)" + 51949 "51949 (EUC-Корейська)" + 51950 "51950 (EUC-Китайська традиційна)" - 52936 "52936 (HZ-GB2312 )" - 54936 "54936 (GB18030 )" + 52936 "52936 (HZ-GB2312 Китайська спрощена)" + 54936 "54936 (GB18030 Китайська спрощена)" END diff --git a/dll/win32/kernel32/misc/ldr.c b/dll/win32/kernel32/misc/ldr.c index b383f1dd6a1..b2874cf3b73 100644 --- a/dll/win32/kernel32/misc/ldr.c +++ b/dll/win32/kernel32/misc/ldr.c @@ -443,20 +443,11 @@ LoadLibraryExW(LPCWSTR lpLibFileName, } } - /* HACK!!! FIXME */ - if (InWindows) - { - /* Call the API Properly */ - Status = LdrLoadDll(SearchPath, - &DllCharacteristics, - &DllName, - (PVOID*)&hInst); - } - else - { - /* Call the ROS API. NOTE: Don't fix this, I have a patch to merge later. */ - Status = LdrLoadDll(SearchPath, &dwFlags, &DllName, (PVOID*)&hInst); - } + /* Call the API Properly */ + Status = LdrLoadDll(SearchPath, + &DllCharacteristics, + &DllName, + (PVOID*)&hInst); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { diff --git a/dll/win32/kernel32/nls/afk.nls b/dll/win32/kernel32/nls/afk.nls index 32cb571a2a0..183f07bb24e 100644 --- a/dll/win32/kernel32/nls/afk.nls +++ b/dll/win32/kernel32/nls/afk.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_AFRIKAANS, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ara.nls b/dll/win32/kernel32/nls/ara.nls index 0f131cc8fb0..43cdcde7b06 100644 --- a/dll/win32/kernel32/nls/ara.nls +++ b/dll/win32/kernel32/nls/ara.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_SAUDI_ARABIA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/arb.nls b/dll/win32/kernel32/nls/arb.nls index 7a413a15ecd..2d86be70f10 100644 --- a/dll/win32/kernel32/nls/arb.nls +++ b/dll/win32/kernel32/nls/arb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_LEBANON LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/are.nls b/dll/win32/kernel32/nls/are.nls index 1678e93b0dc..55ac91502d9 100644 --- a/dll/win32/kernel32/nls/are.nls +++ b/dll/win32/kernel32/nls/are.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_EGYPT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/arg.nls b/dll/win32/kernel32/nls/arg.nls index c15a30ac766..cf3a7b00f2e 100644 --- a/dll/win32/kernel32/nls/arg.nls +++ b/dll/win32/kernel32/nls/arg.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_ALGERIA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/arh.nls b/dll/win32/kernel32/nls/arh.nls index 62ba4e4475d..bf857d00c80 100644 --- a/dll/win32/kernel32/nls/arh.nls +++ b/dll/win32/kernel32/nls/arh.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_BAHRAIN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ari.nls b/dll/win32/kernel32/nls/ari.nls index e1d47740c22..36ac2f20066 100644 --- a/dll/win32/kernel32/nls/ari.nls +++ b/dll/win32/kernel32/nls/ari.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_IRAQ LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/arj.nls b/dll/win32/kernel32/nls/arj.nls index 951d913c93d..2d5588c6918 100644 --- a/dll/win32/kernel32/nls/arj.nls +++ b/dll/win32/kernel32/nls/arj.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_JORDAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ark.nls b/dll/win32/kernel32/nls/ark.nls index aa2486d2ea1..7f02887c1ea 100644 --- a/dll/win32/kernel32/nls/ark.nls +++ b/dll/win32/kernel32/nls/ark.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_KUWAIT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/arl.nls b/dll/win32/kernel32/nls/arl.nls index cbafbe04aeb..99fc5c20ec8 100644 --- a/dll/win32/kernel32/nls/arl.nls +++ b/dll/win32/kernel32/nls/arl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_LIBYA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/arm.nls b/dll/win32/kernel32/nls/arm.nls index 1f7dfa7ccc9..f8314fed91a 100644 --- a/dll/win32/kernel32/nls/arm.nls +++ b/dll/win32/kernel32/nls/arm.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_MOROCCO LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/aro.nls b/dll/win32/kernel32/nls/aro.nls index 6a5f705092f..50825b6cc23 100644 --- a/dll/win32/kernel32/nls/aro.nls +++ b/dll/win32/kernel32/nls/aro.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_OMAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/arq.nls b/dll/win32/kernel32/nls/arq.nls index 328f8160b6e..9001939a0b4 100644 --- a/dll/win32/kernel32/nls/arq.nls +++ b/dll/win32/kernel32/nls/arq.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_QATAR LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ars.nls b/dll/win32/kernel32/nls/ars.nls index 5f4b57e116b..ef64dc4ace5 100644 --- a/dll/win32/kernel32/nls/ars.nls +++ b/dll/win32/kernel32/nls/ars.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_SYRIA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/art.nls b/dll/win32/kernel32/nls/art.nls index 8f400de15ae..2f1696160fc 100644 --- a/dll/win32/kernel32/nls/art.nls +++ b/dll/win32/kernel32/nls/art.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_TUNISIA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/aru.nls b/dll/win32/kernel32/nls/aru.nls index c058f1b8dee..5d05398e5d6 100644 --- a/dll/win32/kernel32/nls/aru.nls +++ b/dll/win32/kernel32/nls/aru.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_UAE LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ary.nls b/dll/win32/kernel32/nls/ary.nls index fbc3adfcb42..551e3e64cb7 100644 --- a/dll/win32/kernel32/nls/ary.nls +++ b/dll/win32/kernel32/nls/ary.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARABIC, SUBLANG_ARABIC_YEMEN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/aze.nls b/dll/win32/kernel32/nls/aze.nls index 8cd71fd5c9d..be5244247c3 100644 --- a/dll/win32/kernel32/nls/aze.nls +++ b/dll/win32/kernel32/nls/aze.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_AZERI, SUBLANG_AZERI_CYRILLIC LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/azl.nls b/dll/win32/kernel32/nls/azl.nls index 7c2f3df56a0..380b1faeb1c 100644 --- a/dll/win32/kernel32/nls/azl.nls +++ b/dll/win32/kernel32/nls/azl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_AZERI, SUBLANG_AZERI_LATIN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" @@ -64,11 +66,11 @@ STRINGTABLE LANGUAGE LANG_AZERI, SUBLANG_AZERI_LATIN LOCALE_S2359 "" LOCALE_SABBREVCTRYNAME "AZE" LOCALE_SABBREVDAYNAME1 "Be" - LOCALE_SABBREVDAYNAME2 "\x00c7a" - LOCALE_SABBREVDAYNAME3 "\x00c7" + LOCALE_SABBREVDAYNAME2 L"\x00c7a" + LOCALE_SABBREVDAYNAME3 L"\x00c7" LOCALE_SABBREVDAYNAME4 "Ca" LOCALE_SABBREVDAYNAME5 "C" - LOCALE_SABBREVDAYNAME6 "\x00de" + LOCALE_SABBREVDAYNAME6 L"\x015E" LOCALE_SABBREVDAYNAME7 "B" LOCALE_SABBREVLANGNAME "AZE" LOCALE_SABBREVMONTHNAME1 "Yan" @@ -76,8 +78,8 @@ STRINGTABLE LANGUAGE LANG_AZERI, SUBLANG_AZERI_LATIN LOCALE_SABBREVMONTHNAME3 "Mar" LOCALE_SABBREVMONTHNAME4 "Apr" LOCALE_SABBREVMONTHNAME5 "May" - LOCALE_SABBREVMONTHNAME6 "\x00DDyun" - LOCALE_SABBREVMONTHNAME7 "\x00DDyul" + LOCALE_SABBREVMONTHNAME6 L"\x0130yun" + LOCALE_SABBREVMONTHNAME7 L"\x0130yul" LOCALE_SABBREVMONTHNAME8 "Avg" LOCALE_SABBREVMONTHNAME9 "Sen" LOCALE_SABBREVMONTHNAME10 "Okt" @@ -112,8 +114,8 @@ STRINGTABLE LANGUAGE LANG_AZERI, SUBLANG_AZERI_LATIN LOCALE_SMONTHNAME3 "Mart" LOCALE_SMONTHNAME4 "Aprel" LOCALE_SMONTHNAME5 "May" - LOCALE_SMONTHNAME6 "\x00ddyun" - LOCALE_SMONTHNAME7 "\x00ddyul" + LOCALE_SMONTHNAME6 L"\x0130yun" + LOCALE_SMONTHNAME7 L"\x0130yul" LOCALE_SMONTHNAME8 "Avgust" LOCALE_SMONTHNAME9 "Sentyabr" LOCALE_SMONTHNAME10 "Oktyabr" diff --git a/dll/win32/kernel32/nls/bel.nls b/dll/win32/kernel32/nls/bel.nls index 5f39c9133ce..a10c75b5ce0 100644 --- a/dll/win32/kernel32/nls/bel.nls +++ b/dll/win32/kernel32/nls/bel.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_BELARUSIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/bgr.nls b/dll/win32/kernel32/nls/bgr.nls index 18a350a01d1..68eee438e88 100644 --- a/dll/win32/kernel32/nls/bgr.nls +++ b/dll/win32/kernel32/nls/bgr.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/brf.nls b/dll/win32/kernel32/nls/brf.nls index 7ac1e2e06dd..b565491ec6d 100644 --- a/dll/win32/kernel32/nls/brf.nls +++ b/dll/win32/kernel32/nls/brf.nls @@ -53,11 +53,13 @@ STRINGTABLE LANGUAGE LANG_BRETON, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/cat.nls b/dll/win32/kernel32/nls/cat.nls index 75cca9f4b5e..f08973e8e09 100644 --- a/dll/win32/kernel32/nls/cat.nls +++ b/dll/win32/kernel32/nls/cat.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/chs.nls b/dll/win32/kernel32/nls/chs.nls index c3e7bf8490c..fb45b54b44b 100644 --- a/dll/win32/kernel32/nls/chs.nls +++ b/dll/win32/kernel32/nls/chs.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "0" @@ -97,7 +99,7 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED LOCALE_SDECIMAL "." LOCALE_SENGCOUNTRY "People's Republic of China" LOCALE_SENGCURRNAME "PRC Yuan Renminbi" - LOCALE_SENGLANGUAGE "Chinese" + LOCALE_SENGLANGUAGE "Chinese (Simplified)" LOCALE_SGROUPING "3;0" LOCALE_SINTLSYMBOL "CNY" LOCALE_SISO3166CTRYNAME "CN" diff --git a/dll/win32/kernel32/nls/cht.nls b/dll/win32/kernel32/nls/cht.nls index 56ac5a1abea..11a42351cec 100644 --- a/dll/win32/kernel32/nls/cht.nls +++ b/dll/win32/kernel32/nls/cht.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "2" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" @@ -80,9 +82,9 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL LOCALE_SABBREVMONTHNAME7 "C" LOCALE_SABBREVMONTHNAME8 "K" LOCALE_SABBREVMONTHNAME9 "E" - LOCALE_SABBREVMONTHNAME10 "BROKEN PLEASE FIX" - LOCALE_SABBREVMONTHNAME11 "BROKEN PLEASE FIX" - LOCALE_SABBREVMONTHNAME12 "BROKEN PLEASE FIX" + LOCALE_SABBREVMONTHNAME10 "Q" + LOCALE_SABBREVMONTHNAME11 "Q@" + LOCALE_SABBREVMONTHNAME12 "QG" LOCALE_SABBREVMONTHNAME13 "" LOCALE_SCOUNTRY "Taiwan" LOCALE_SCURRENCY "NT$" @@ -97,7 +99,7 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL LOCALE_SDECIMAL "." LOCALE_SENGCOUNTRY "Taiwan" LOCALE_SENGCURRNAME "New Taiwan Dollar" - LOCALE_SENGLANGUAGE "Chinese" + LOCALE_SENGLANGUAGE "Chinese (Traditional)" LOCALE_SGROUPING "3;0" LOCALE_SINTLSYMBOL "TWD" LOCALE_SISO3166CTRYNAME "TW" @@ -116,9 +118,9 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL LOCALE_SMONTHNAME7 "C" LOCALE_SMONTHNAME8 "K" LOCALE_SMONTHNAME9 "E" - LOCALE_SMONTHNAME10 "BROKEN PLEASE FIX" - LOCALE_SMONTHNAME11 "BROKEN PLEASE FIX" - LOCALE_SMONTHNAME12 "BROKEN PLEASE FIX" + LOCALE_SMONTHNAME10 "Q" + LOCALE_SMONTHNAME11 "Q@" + LOCALE_SMONTHNAME12 "QG" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "," LOCALE_SNAME "zh-TW" diff --git a/dll/win32/kernel32/nls/csy.nls b/dll/win32/kernel32/nls/csy.nls index 03a0e61d206..7dd94671ccc 100644 --- a/dll/win32/kernel32/nls/csy.nls +++ b/dll/win32/kernel32/nls/csy.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_CZECH, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" @@ -64,10 +66,10 @@ STRINGTABLE LANGUAGE LANG_CZECH, SUBLANG_DEFAULT LOCALE_S2359 "odp." LOCALE_SABBREVCTRYNAME "CZE" LOCALE_SABBREVDAYNAME1 "po" - LOCALE_SABBREVDAYNAME2 "t" + LOCALE_SABBREVDAYNAME2 L"\x00FAt" LOCALE_SABBREVDAYNAME3 "st" - LOCALE_SABBREVDAYNAME4 "t" - LOCALE_SABBREVDAYNAME5 "p" + LOCALE_SABBREVDAYNAME4 L"\x010Dt" + LOCALE_SABBREVDAYNAME5 L"p\x00E1" LOCALE_SABBREVDAYNAME6 "so" LOCALE_SABBREVDAYNAME7 "ne" LOCALE_SABBREVLANGNAME "CSY" @@ -85,13 +87,13 @@ STRINGTABLE LANGUAGE LANG_CZECH, SUBLANG_DEFAULT LOCALE_SABBREVMONTHNAME12 "XII" LOCALE_SABBREVMONTHNAME13 "" LOCALE_SCOUNTRY "Czech Republic" - LOCALE_SCURRENCY "K" + LOCALE_SCURRENCY L"K\x010D" LOCALE_SDATE "." - LOCALE_SDAYNAME1 "pondl" - LOCALE_SDAYNAME2 "ter" - LOCALE_SDAYNAME3 "steda" - LOCALE_SDAYNAME4 "tvrtek" - LOCALE_SDAYNAME5 "ptek" + LOCALE_SDAYNAME1 L"pond\x011Bl\x00ED" + LOCALE_SDAYNAME2 L"\x00FAter\x00FD" + LOCALE_SDAYNAME3 L"st\x0159eda" + LOCALE_SDAYNAME4 L"\x010Dtvrtek" + LOCALE_SDAYNAME5 L"p\x00E1tek" LOCALE_SDAYNAME6 "sobota" LOCALE_SDAYNAME7 "nedle" LOCALE_SDECIMAL "," @@ -108,30 +110,30 @@ STRINGTABLE LANGUAGE LANG_CZECH, SUBLANG_DEFAULT LOCALE_SMONDECIMALSEP "," LOCALE_SMONGROUPING "3;0" LOCALE_SMONTHNAME1 "leden" - LOCALE_SMONTHNAME2 "nor" - LOCALE_SMONTHNAME3 "bezen" + LOCALE_SMONTHNAME2 L"\x00FAnor" + LOCALE_SMONTHNAME3 L"b\x0159ezen" LOCALE_SMONTHNAME4 "duben" LOCALE_SMONTHNAME5 "kvten" - LOCALE_SMONTHNAME6 "erven" - LOCALE_SMONTHNAME7 "ervenec" + LOCALE_SMONTHNAME6 L"\x010Derven" + LOCALE_SMONTHNAME7 L"\x010Dervenec" LOCALE_SMONTHNAME8 "srpen" - LOCALE_SMONTHNAME9 "z" - LOCALE_SMONTHNAME10 "jen" + LOCALE_SMONTHNAME9 L"z\x00E1\x0159\x00ED" + LOCALE_SMONTHNAME10 L"\x0159\x00EDjen" LOCALE_SMONTHNAME11 "listopad" LOCALE_SMONTHNAME12 "prosinec" LOCALE_SMONTHNAME13 "" - LOCALE_SMONTHOUSANDSEP "" + LOCALE_SMONTHOUSANDSEP " " LOCALE_SNAME "cs-CZ" - LOCALE_SNATIVECTRYNAME "eskrepublika" - LOCALE_SNATIVECURRNAME "Koruna esk" + LOCALE_SNATIVECTRYNAME L"\x010Cesk\x00E1 republika" + LOCALE_SNATIVECURRNAME L"Koruna \x010Cesk\x00E1" LOCALE_SNATIVEDIGITS "0123456789" - LOCALE_SNATIVELANGNAME "etina" + LOCALE_SNATIVELANGNAME L"\x010De\x0161tina" LOCALE_SNEGATIVESIGN "-" LOCALE_SPOSITIVESIGN "" LOCALE_SSCRIPTS "Latn;" LOCALE_SSHORTDATE "d.M.yyyy" LOCALE_SSORTNAME "Default" - LOCALE_STHOUSAND "" + LOCALE_STHOUSAND " " LOCALE_STIME ":" LOCALE_STIMEFORMAT "H:mm:ss" LOCALE_SYEARMONTH "MMMM yyyy" diff --git a/dll/win32/kernel32/nls/cym.nls b/dll/win32/kernel32/nls/cym.nls index 28df9b24621..5ab91d097e7 100644 --- a/dll/win32/kernel32/nls/cym.nls +++ b/dll/win32/kernel32/nls/cym.nls @@ -53,11 +53,13 @@ STRINGTABLE LANGUAGE LANG_WELSH, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/dan.nls b/dll/win32/kernel32/nls/dan.nls index 6f41a9e11be..5f31e5112fe 100644 --- a/dll/win32/kernel32/nls/dan.nls +++ b/dll/win32/kernel32/nls/dan.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_DANISH, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/dea.nls b/dll/win32/kernel32/nls/dea.nls index 777961dd3f7..abda02bbf5e 100644 --- a/dll/win32/kernel32/nls/dea.nls +++ b/dll/win32/kernel32/nls/dea.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/dec.nls b/dll/win32/kernel32/nls/dec.nls index a77cac021f8..bc3a80a566a 100644 --- a/dll/win32/kernel32/nls/dec.nls +++ b/dll/win32/kernel32/nls/dec.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_LIECHTENSTEIN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/del.nls b/dll/win32/kernel32/nls/del.nls index 396be9f85ec..bc97d93ad81 100644 --- a/dll/win32/kernel32/nls/del.nls +++ b/dll/win32/kernel32/nls/del.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_LUXEMBOURG LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/des.nls b/dll/win32/kernel32/nls/des.nls index acc470ae081..9e1ffbd6176 100644 --- a/dll/win32/kernel32/nls/des.nls +++ b/dll/win32/kernel32/nls/des.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_SWISS LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/deu.nls b/dll/win32/kernel32/nls/deu.nls index a4d39b472e5..a488b446762 100644 --- a/dll/win32/kernel32/nls/deu.nls +++ b/dll/win32/kernel32/nls/deu.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GERMAN, SUBLANG_GERMAN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/div.nls b/dll/win32/kernel32/nls/div.nls index 0d3886a1fff..08168b812d3 100644 --- a/dll/win32/kernel32/nls/div.nls +++ b/dll/win32/kernel32/nls/div.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_DIVEHI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "6" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ell.nls b/dll/win32/kernel32/nls/ell.nls index c1a4f1e5ba5..763150c1eb0 100644 --- a/dll/win32/kernel32/nls/ell.nls +++ b/dll/win32/kernel32/nls/ell.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GREEK, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/ena.nls b/dll/win32/kernel32/nls/ena.nls index a9d08c8b161..fd8a7a9c778 100644 --- a/dll/win32/kernel32/nls/ena.nls +++ b/dll/win32/kernel32/nls/ena.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/enb.nls b/dll/win32/kernel32/nls/enb.nls index dfb8be83591..f09eb938c7e 100644 --- a/dll/win32/kernel32/nls/enb.nls +++ b/dll/win32/kernel32/nls/enb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CARIBBEAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/enc.nls b/dll/win32/kernel32/nls/enc.nls index 09fee476fe8..437a364a6c7 100644 --- a/dll/win32/kernel32/nls/enc.nls +++ b/dll/win32/kernel32/nls/enc.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/eng.nls b/dll/win32/kernel32/nls/eng.nls index 0a8f26fd25c..2262fad5336 100644 --- a/dll/win32/kernel32/nls/eng.nls +++ b/dll/win32/kernel32/nls/eng.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/eni.nls b/dll/win32/kernel32/nls/eni.nls index d86e35c783c..27f76548d96 100644 --- a/dll/win32/kernel32/nls/eni.nls +++ b/dll/win32/kernel32/nls/eni.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_EIRE LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/enj.nls b/dll/win32/kernel32/nls/enj.nls index e1e82599bdd..1a1cdfbeb33 100644 --- a/dll/win32/kernel32/nls/enj.nls +++ b/dll/win32/kernel32/nls/enj.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_JAMAICA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/enl.nls b/dll/win32/kernel32/nls/enl.nls index c8c69a0b74a..fc15a42da8c 100644 --- a/dll/win32/kernel32/nls/enl.nls +++ b/dll/win32/kernel32/nls/enl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_BELIZE LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/enp.nls b/dll/win32/kernel32/nls/enp.nls index 46aa4a2df03..9e067955704 100644 --- a/dll/win32/kernel32/nls/enp.nls +++ b/dll/win32/kernel32/nls/enp.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_PHILIPPINES LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/ens.nls b/dll/win32/kernel32/nls/ens.nls index 76d02d796e9..ab27b470e45 100644 --- a/dll/win32/kernel32/nls/ens.nls +++ b/dll/win32/kernel32/nls/ens.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_SOUTH_AFRICA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ent.nls b/dll/win32/kernel32/nls/ent.nls index 1d1eff7bd5a..9eba8949e9c 100644 --- a/dll/win32/kernel32/nls/ent.nls +++ b/dll/win32/kernel32/nls/ent.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_TRINIDAD LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/enu.nls b/dll/win32/kernel32/nls/enu.nls index 06322c0f75b..e07a9e00436 100644 --- a/dll/win32/kernel32/nls/enu.nls +++ b/dll/win32/kernel32/nls/enu.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/enw.nls b/dll/win32/kernel32/nls/enw.nls index b554462f0fd..2533ff99811 100644 --- a/dll/win32/kernel32/nls/enw.nls +++ b/dll/win32/kernel32/nls/enw.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_ZIMBABWE LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/enz.nls b/dll/win32/kernel32/nls/enz.nls index 1d511437510..9c656bcb601 100644 --- a/dll/win32/kernel32/nls/enz.nls +++ b/dll/win32/kernel32/nls/enz.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_NZ LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/esa.nls b/dll/win32/kernel32/nls/esa.nls index b27bb4ee28e..f2803136996 100644 --- a/dll/win32/kernel32/nls/esa.nls +++ b/dll/win32/kernel32/nls/esa.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_PANAMA LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esb.nls b/dll/win32/kernel32/nls/esb.nls index 90e1a106e56..9aeec4368e4 100644 --- a/dll/win32/kernel32/nls/esb.nls +++ b/dll/win32/kernel32/nls/esb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_BOLIVIA LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esc.nls b/dll/win32/kernel32/nls/esc.nls index c26be6e0c93..102c9e8c86d 100644 --- a/dll/win32/kernel32/nls/esc.nls +++ b/dll/win32/kernel32/nls/esc.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_COSTA_RICA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esd.nls b/dll/win32/kernel32/nls/esd.nls index f424770356a..ac8dfae1886 100644 --- a/dll/win32/kernel32/nls/esd.nls +++ b/dll/win32/kernel32/nls/esd.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_DOMINICAN_REPUBLIC LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ese.nls b/dll/win32/kernel32/nls/ese.nls index d8296229221..6baaab2689e 100644 --- a/dll/win32/kernel32/nls/ese.nls +++ b/dll/win32/kernel32/nls/ese.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_EL_SALVADOR LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esf.nls b/dll/win32/kernel32/nls/esf.nls index c62cab4a138..c33bf2189a9 100644 --- a/dll/win32/kernel32/nls/esf.nls +++ b/dll/win32/kernel32/nls/esf.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_ECUADOR LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/esg.nls b/dll/win32/kernel32/nls/esg.nls index 2ebc5da9b31..914bb2fadaf 100644 --- a/dll/win32/kernel32/nls/esg.nls +++ b/dll/win32/kernel32/nls/esg.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_GUATEMALA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esh.nls b/dll/win32/kernel32/nls/esh.nls index 606626aa3f5..eabd9f67120 100644 --- a/dll/win32/kernel32/nls/esh.nls +++ b/dll/win32/kernel32/nls/esh.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_HONDURAS LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esi.nls b/dll/win32/kernel32/nls/esi.nls index e90db977b19..c5d02c13991 100644 --- a/dll/win32/kernel32/nls/esi.nls +++ b/dll/win32/kernel32/nls/esi.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_NICARAGUA LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esl.nls b/dll/win32/kernel32/nls/esl.nls index 869194a9887..6c25db1d47b 100644 --- a/dll/win32/kernel32/nls/esl.nls +++ b/dll/win32/kernel32/nls/esl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_CHILE LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/esm.nls b/dll/win32/kernel32/nls/esm.nls index dcfead8ff26..a36cf87fba9 100644 --- a/dll/win32/kernel32/nls/esm.nls +++ b/dll/win32/kernel32/nls/esm.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MEXICAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esn.nls b/dll/win32/kernel32/nls/esn.nls index 38885ee2cbc..1727882ecc0 100644 --- a/dll/win32/kernel32/nls/esn.nls +++ b/dll/win32/kernel32/nls/esn.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/eso.nls b/dll/win32/kernel32/nls/eso.nls index 6b0b54159bd..3847d12acea 100644 --- a/dll/win32/kernel32/nls/eso.nls +++ b/dll/win32/kernel32/nls/eso.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_COLOMBIA LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esp.nls b/dll/win32/kernel32/nls/esp.nls index 68aafc386b6..ba18a9972b5 100644 --- a/dll/win32/kernel32/nls/esp.nls +++ b/dll/win32/kernel32/nls/esp.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/esr.nls b/dll/win32/kernel32/nls/esr.nls index 06e431d0b0a..82c9918406b 100644 --- a/dll/win32/kernel32/nls/esr.nls +++ b/dll/win32/kernel32/nls/esr.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_PERU LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ess.nls b/dll/win32/kernel32/nls/ess.nls index 79e4d7fe0aa..aee9b625284 100644 --- a/dll/win32/kernel32/nls/ess.nls +++ b/dll/win32/kernel32/nls/ess.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_ARGENTINA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esu.nls b/dll/win32/kernel32/nls/esu.nls index 87f1de4a705..2ccabdf76eb 100644 --- a/dll/win32/kernel32/nls/esu.nls +++ b/dll/win32/kernel32/nls/esu.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_PUERTO_RICO LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esv.nls b/dll/win32/kernel32/nls/esv.nls index 09c77cab9ad..ac9fe68e0e3 100644 --- a/dll/win32/kernel32/nls/esv.nls +++ b/dll/win32/kernel32/nls/esv.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_VENEZUELA LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esy.nls b/dll/win32/kernel32/nls/esy.nls index b74495358b9..f50071f9f6d 100644 --- a/dll/win32/kernel32/nls/esy.nls +++ b/dll/win32/kernel32/nls/esy.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_URUGUAY LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/esz.nls b/dll/win32/kernel32/nls/esz.nls index 35755a38625..5d4bef29a78 100644 --- a/dll/win32/kernel32/nls/esz.nls +++ b/dll/win32/kernel32/nls/esz.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_PARAGUAY LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/eti.nls b/dll/win32/kernel32/nls/eti.nls index d6940abfdfd..c28b3e08381 100644 --- a/dll/win32/kernel32/nls/eti.nls +++ b/dll/win32/kernel32/nls/eti.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/euq.nls b/dll/win32/kernel32/nls/euq.nls index 05b42bfbd20..7210ecf9de5 100644 --- a/dll/win32/kernel32/nls/euq.nls +++ b/dll/win32/kernel32/nls/euq.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_BASQUE, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/far.nls b/dll/win32/kernel32/nls/far.nls index a158e4de3d2..745b6bcc4d7 100644 --- a/dll/win32/kernel32/nls/far.nls +++ b/dll/win32/kernel32/nls/far.nls @@ -52,48 +52,50 @@ STRINGTABLE LANGUAGE LANG_FARSI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "2" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" - LOCALE_S1159 "\x00DE.\x00D9" - LOCALE_S2359 "\x00C8.\x00D9" + LOCALE_S1159 L"\x0642.\x0638" + LOCALE_S2359 L"\x0628.\x0638" LOCALE_SABBREVCTRYNAME "IRN" - LOCALE_SABBREVDAYNAME1 "\x00CF\x00E6\x00D4\x00E4\x00C8\x00E5" - LOCALE_SABBREVDAYNAME2 "\x00D3\x00E5\x00A0\x00D4\x00E4\x00C8\x00E5" - LOCALE_SABBREVDAYNAME3 "\x008D\x00E5\x00C7\x00D1\x00D4\x00E4\x00C8\x00E5" - LOCALE_SABBREVDAYNAME4 "\x0081\x00E4\x00CC\x00D4\x00E4\x00C8\x00E5" - LOCALE_SABBREVDAYNAME5 "\x00CC\x00E3\x00DA\x00E5" - LOCALE_SABBREVDAYNAME6 "\x00D4\x00E4\x00C8\x00E5" - LOCALE_SABBREVDAYNAME7 "\x00ED\x00DF\x00D4\x00E4\x00C8\x00E5" + LOCALE_SABBREVDAYNAME1 L"\x062F\x0648\x0634\x0646\x0628\x0647" + LOCALE_SABBREVDAYNAME2 L"\x0633\x0647 \x0634\x0646\x0628\x0647" + LOCALE_SABBREVDAYNAME3 L"\x0686\x0647\x0627\x0631\x0634\x0646\x0628\x0647" + LOCALE_SABBREVDAYNAME4 L"\x067E\x0646\x062C\x0634\x0646\x0628\x0647" + LOCALE_SABBREVDAYNAME5 L"\x062C\x0645\x0639\x0647" + LOCALE_SABBREVDAYNAME6 L"\x0634\x0646\x0628\x0647" + LOCALE_SABBREVDAYNAME7 L"\x064A\x0643\x0634\x0646\x0628\x0647" LOCALE_SABBREVLANGNAME "FAR" - LOCALE_SABBREVMONTHNAME1 "\x017D\x00C7\x00E4\x00E6\x00ED\x00E5" - LOCALE_SABBREVMONTHNAME2 "\x00DD\x00E6\x00D1\x00ED\x00E5" - LOCALE_SABBREVMONTHNAME3 "\x00E3\x00C7\x00D1\x00D3" - LOCALE_SABBREVMONTHNAME4 "\x00C2\x00E6\x00D1\x00ED\x00E1" - LOCALE_SABBREVMONTHNAME5 "\x00E3\x00EC" - LOCALE_SABBREVMONTHNAME6 "\x017D\x00E6\x00C6\x00E4" - LOCALE_SABBREVMONTHNAME7 "\x017D\x00E6\x00C6\x00ED\x00E5" - LOCALE_SABBREVMONTHNAME8 "\x00C7\x00E6\x00CA" - LOCALE_SABBREVMONTHNAME9 "\x00D3\x0081\x00CA\x00C7\x00E3\x00C8\x00D1" - LOCALE_SABBREVMONTHNAME10 "\x00C7\x00F5\x00DF\x00CA\x00C8\x00D1" - LOCALE_SABBREVMONTHNAME11 "\x00E4\x00E6\x00C7\x00E3\x00C8\x00D1" - LOCALE_SABBREVMONTHNAME12 "\x00CF\x00D3\x00C7\x00E3\x00C8\x00D1" + LOCALE_SABBREVMONTHNAME1 L"\x0698\x0627\x0646\x0648\x064A\x0647" + LOCALE_SABBREVMONTHNAME2 L"\x0641\x0648\x0631\x064A\x0647" + LOCALE_SABBREVMONTHNAME3 L"\x0645\x0627\x0631\x0633" + LOCALE_SABBREVMONTHNAME4 L"\x0622\x0648\x0631\x064A\x0644" + LOCALE_SABBREVMONTHNAME5 L"\x0645\x0649" + LOCALE_SABBREVMONTHNAME6 L"\x0698\x0648\x0626\x0646" + LOCALE_SABBREVMONTHNAME7 L"\x0698\x0648\x0626\x064A\x0647" + LOCALE_SABBREVMONTHNAME8 L"\x0627\x0648\x062A" + LOCALE_SABBREVMONTHNAME9 L"\x0633\x067E\x062A\x0627\x0645\x0628\x0631" + LOCALE_SABBREVMONTHNAME10 L"\x0627\x064F\x0643\x062A\x0628\x0631" + LOCALE_SABBREVMONTHNAME11 L"\x0646\x0648\x0627\x0645\x0628\x0631" + LOCALE_SABBREVMONTHNAME12 L"\x062F\x0633\x0627\x0645\x0628\x0631" LOCALE_SABBREVMONTHNAME13 "" LOCALE_SCOUNTRY "Iran" - LOCALE_SCURRENCY "\x00D1\x00ED 00C7\x00E1" + LOCALE_SCURRENCY L"\x0631\x064A\x0627\x0644" LOCALE_SDATE "/" - LOCALE_SDAYNAME1 "\x00CF\x00E6\x00D4\x00E4\x00C8\x00E5" - LOCALE_SDAYNAME2 "\x00D3\x00E5\x00A0\x00D4\x00E4\x00C8\x00E5" - LOCALE_SDAYNAME3 "\x008D\x00E5\x00C7\x00D1\x00D4\x00E4\x00C8\x00E5" - LOCALE_SDAYNAME4 "\x0081\x00E4\x00CC\x00D4\x00E4\x00C8\x00E5" - LOCALE_SDAYNAME5 "\x00CC\x00E3\x00DA\x00E5" - LOCALE_SDAYNAME6 "\x00D4\x00E4\x00C8\x00E5" - LOCALE_SDAYNAME7 "\x00ED\x00DF\x00D4\x00E4\x00C8\x00E5" + LOCALE_SDAYNAME1 L"\x062F\x0648\x0634\x0646\x0628\x0647" + LOCALE_SDAYNAME2 L"\x0633\x0647 \x0634\x0646\x0628\x0647" + LOCALE_SDAYNAME3 L"\x0686\x0647\x0627\x0631\x0634\x0646\x0628\x0647" + LOCALE_SDAYNAME4 L"\x067E\x0646\x062C\x0634\x0646\x0628\x0647" + LOCALE_SDAYNAME5 L"\x062C\x0645\x0639\x0647" + LOCALE_SDAYNAME6 L"\x0634\x0646\x0628\x0647" + LOCALE_SDAYNAME7 L"\x064A\x0643\x0634\x0646\x0628\x0647" LOCALE_SDECIMAL "." LOCALE_SENGCOUNTRY "Iran" LOCALE_SENGCURRNAME "Iranian Rial" @@ -107,25 +109,25 @@ STRINGTABLE LANGUAGE LANG_FARSI, SUBLANG_DEFAULT LOCALE_SLONGDATE "yyyy/MM/dd" LOCALE_SMONDECIMALSEP "/" LOCALE_SMONGROUPING "3;0" - LOCALE_SMONTHNAME1 "\x017D\x00C7\x00E4\x00E6\x00ED\x00E5" - LOCALE_SMONTHNAME2 "\x00DD\x00E6\x00D1\x00ED\x00E5" - LOCALE_SMONTHNAME3 "\x00E3\x00C7\x00D1\x00D3" - LOCALE_SMONTHNAME4 "\x00C2\x00E6\x00D1\x00ED\x00E1" - LOCALE_SMONTHNAME5 "\x00E3\x00EC" - LOCALE_SMONTHNAME6 "\x017D\x00E6\x00C6\x00E4" - LOCALE_SMONTHNAME7 "\x017D\x00E6\x00C6\x00ED\x00E5" - LOCALE_SMONTHNAME8 "\x00C7\x00E6\x00CA" - LOCALE_SMONTHNAME9 "\x00D3\x0081\x00CA\x00C7\x00E3\x00C8\x00D1" - LOCALE_SMONTHNAME10 "\x00C7\x00F5\x00DF\x00CA\x00C8\x00D1" - LOCALE_SMONTHNAME11 "\x00E4\x00E6\x00C7\x00E3\x00C8\x00D1" - LOCALE_SMONTHNAME12 "\x00CF\x00D3\x00C7\x00E3\x00C8\x00D1" + LOCALE_SMONTHNAME1 L"\x0698\x0627\x0646\x0648\x064A\x0647" + LOCALE_SMONTHNAME2 L"\x0641\x0648\x0631\x064A\x0647" + LOCALE_SMONTHNAME3 L"\x0645\x0627\x0631\x0633" + LOCALE_SMONTHNAME4 L"\x0622\x0648\x0631\x064A\x0644" + LOCALE_SMONTHNAME5 L"\x0645\x0649" + LOCALE_SMONTHNAME6 L"\x0698\x0648\x0626\x0646" + LOCALE_SMONTHNAME7 L"\x0698\x0648\x0626\x064A\x0647" + LOCALE_SMONTHNAME8 L"\x0627\x0648\x062A" + LOCALE_SMONTHNAME9 L"\x0633\x067E\x062A\x0627\x0645\x0628\x0631" + LOCALE_SMONTHNAME10 L"\x0627\x064F\x0643\x062A\x0628\x0631" + LOCALE_SMONTHNAME11 L"\x0646\x0648\x0627\x0645\x0628\x0631" + LOCALE_SMONTHNAME12 L"\x062F\x0633\x0627\x0645\x0628\x0631" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "," LOCALE_SNAME "fa-IR" - LOCALE_SNATIVECTRYNAME "\x00C7\x00ED\x00D1\x00C7\x00E4" - LOCALE_SNATIVECURRNAME "\x00D1\x00EC\x00C7\x00E1" + LOCALE_SNATIVECTRYNAME L"\x0627\x064A\x0631\x0627\x0646" + LOCALE_SNATIVECURRNAME L"\x0631\x0649\x0627\x0644" LOCALE_SNATIVEDIGITS L"\x06f0\x06f1\x06f2\x06f3\x06f4\x06f5\x06f6\x06f7\x06f8\x06f9" - LOCALE_SNATIVELANGNAME "\x00DD\x00C7\x00D1\x00D3\x00EC" + LOCALE_SNATIVELANGNAME L"\x0641\x0627\x0631\x0633\x0649" LOCALE_SNEGATIVESIGN "-" LOCALE_SPOSITIVESIGN "" LOCALE_SSCRIPTS "Arab;" diff --git a/dll/win32/kernel32/nls/fin.nls b/dll/win32/kernel32/nls/fin.nls index 88725e89c3a..d7f4f2254c9 100644 --- a/dll/win32/kernel32/nls/fin.nls +++ b/dll/win32/kernel32/nls/fin.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/fos.nls b/dll/win32/kernel32/nls/fos.nls index 10eea99edf8..ac6075a9e99 100644 --- a/dll/win32/kernel32/nls/fos.nls +++ b/dll/win32/kernel32/nls/fos.nls @@ -52,22 +52,24 @@ STRINGTABLE LANGUAGE LANG_FAEROESE, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" LOCALE_S1159 "" LOCALE_S2359 "" LOCALE_SABBREVCTRYNAME "FRO" - LOCALE_SABBREVDAYNAME1 "m\x00E1n" - LOCALE_SABBREVDAYNAME2 "t\x00FDs" + LOCALE_SABBREVDAYNAME1 L"m\x00E1n" + LOCALE_SABBREVDAYNAME2 L"t\x00FDs" LOCALE_SABBREVDAYNAME3 "mik" - LOCALE_SABBREVDAYNAME4 "h\x00F3s" - LOCALE_SABBREVDAYNAME5 "fr\x00ED" + LOCALE_SABBREVDAYNAME4 L"h\x00F3s" + LOCALE_SABBREVDAYNAME5 L"fr\x00ED" LOCALE_SABBREVDAYNAME6 "leyg" LOCALE_SABBREVDAYNAME7 "sun" LOCALE_SABBREVLANGNAME "FOS" @@ -87,11 +89,11 @@ STRINGTABLE LANGUAGE LANG_FAEROESE, SUBLANG_DEFAULT LOCALE_SCOUNTRY "Faeroe Islands" LOCALE_SCURRENCY "kr" LOCALE_SDATE "-" - LOCALE_SDAYNAME1 "m\x00E1nadagur" - LOCALE_SDAYNAME2 "t\x00FDsdagur" + LOCALE_SDAYNAME1 L"m\x00E1nadagur" + LOCALE_SDAYNAME2 L"t\x00FDsdagur" LOCALE_SDAYNAME3 "mikudagur" - LOCALE_SDAYNAME4 "h\x00F3sdagur" - LOCALE_SDAYNAME5 "fr\x00EDggjadagur" + LOCALE_SDAYNAME4 L"h\x00F3sdagur" + LOCALE_SDAYNAME5 L"fr\x00EDggjadagur" LOCALE_SDAYNAME6 "leygardagur" LOCALE_SDAYNAME7 "sunnudagur" LOCALE_SDECIMAL "," @@ -110,7 +112,7 @@ STRINGTABLE LANGUAGE LANG_FAEROESE, SUBLANG_DEFAULT LOCALE_SMONTHNAME1 "januar" LOCALE_SMONTHNAME2 "februar" LOCALE_SMONTHNAME3 "mars" - LOCALE_SMONTHNAME4 "apr\x00EDl" + LOCALE_SMONTHNAME4 L"apr\x00EDl" LOCALE_SMONTHNAME5 "mai" LOCALE_SMONTHNAME6 "juni" LOCALE_SMONTHNAME7 "juli" @@ -122,10 +124,10 @@ STRINGTABLE LANGUAGE LANG_FAEROESE, SUBLANG_DEFAULT LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "." LOCALE_SNAME "fo-FO" - LOCALE_SNATIVECTRYNAME "F\x00F8royar" + LOCALE_SNATIVECTRYNAME L"F\x00F8royar" LOCALE_SNATIVECURRNAME "Dansk krone" LOCALE_SNATIVEDIGITS "0123456789" - LOCALE_SNATIVELANGNAME "f\x00F8royskt" + LOCALE_SNATIVELANGNAME L"f\x00F8royskt" LOCALE_SNEGATIVESIGN "-" LOCALE_SPOSITIVESIGN "" LOCALE_SSCRIPTS "Latn;" diff --git a/dll/win32/kernel32/nls/fra.nls b/dll/win32/kernel32/nls/fra.nls index 9ee0137f916..1d39d6942f9 100644 --- a/dll/win32/kernel32/nls/fra.nls +++ b/dll/win32/kernel32/nls/fra.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_FRENCH, SUBLANG_FRENCH LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/frb.nls b/dll/win32/kernel32/nls/frb.nls index 1a0480f1928..f420a8a3b50 100644 --- a/dll/win32/kernel32/nls/frb.nls +++ b/dll/win32/kernel32/nls/frb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_FRENCH, SUBLANG_FRENCH_BELGIAN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/frc.nls b/dll/win32/kernel32/nls/frc.nls index a8c07b9934a..4e640b3eec7 100644 --- a/dll/win32/kernel32/nls/frc.nls +++ b/dll/win32/kernel32/nls/frc.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_FRENCH, SUBLANG_FRENCH_CANADIAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/frl.nls b/dll/win32/kernel32/nls/frl.nls index bc5874cfd29..40b006680cf 100644 --- a/dll/win32/kernel32/nls/frl.nls +++ b/dll/win32/kernel32/nls/frl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_FRENCH, SUBLANG_FRENCH_LUXEMBOURG LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/frm.nls b/dll/win32/kernel32/nls/frm.nls index 0fc0b57546b..1e7e09ad0be 100644 --- a/dll/win32/kernel32/nls/frm.nls +++ b/dll/win32/kernel32/nls/frm.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_FRENCH, SUBLANG_FRENCH_MONACO LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/frs.nls b/dll/win32/kernel32/nls/frs.nls index 6613776bd86..e56b81f7857 100644 --- a/dll/win32/kernel32/nls/frs.nls +++ b/dll/win32/kernel32/nls/frs.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_FRENCH, SUBLANG_FRENCH_SWISS LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/glc.nls b/dll/win32/kernel32/nls/glc.nls index 16a845de46f..2cc861fd529 100644 --- a/dll/win32/kernel32/nls/glc.nls +++ b/dll/win32/kernel32/nls/glc.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GALICIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/guj.nls b/dll/win32/kernel32/nls/guj.nls index 0c757c3b86b..e85b2503fc9 100644 --- a/dll/win32/kernel32/nls/guj.nls +++ b/dll/win32/kernel32/nls/guj.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GUJARATI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/heb.nls b/dll/win32/kernel32/nls/heb.nls index 23cd711e1c0..b298b56ae25 100644 --- a/dll/win32/kernel32/nls/heb.nls +++ b/dll/win32/kernel32/nls/heb.nls @@ -53,11 +53,13 @@ STRINGTABLE LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "8" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "1" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" @@ -105,7 +107,7 @@ STRINGTABLE LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT LOCALE_SISO639LANGNAME "he" LOCALE_SLANGUAGE "Hebrew" LOCALE_SLIST "," - LOCALE_SLONGDATE "dddd dd MMMM yyyy" + LOCALE_SLONGDATE "dddd dd MMMM yyyy" LOCALE_SMONDECIMALSEP "." LOCALE_SMONGROUPING "3;0" LOCALE_SMONTHNAME1 "" @@ -137,21 +139,21 @@ STRINGTABLE LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT LOCALE_STIMEFORMAT "HH:mm:ss" LOCALE_SYEARMONTH "MMMM yyyy" - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE " " - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE " " - LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" - LGRPID_GREEK+LGRPID_RES_BASE "" - LGRPID_CYRILLIC+LGRPID_RES_BASE "" - LGRPID_TURKISH+LGRPID_RES_BASE "" - LGRPID_JAPANESE+LGRPID_RES_BASE "" - LGRPID_KOREAN+LGRPID_RES_BASE "" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE " " - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE " " - LGRPID_THAI+LGRPID_RES_BASE "" - LGRPID_HEBREW+LGRPID_RES_BASE "" - LGRPID_ARABIC+LGRPID_RES_BASE "" - LGRPID_VIETNAMESE+LGRPID_RES_BASE "" - LGRPID_INDIC+LGRPID_RES_BASE "Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE "" + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE " " + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE " " + LGRPID_BALTIC+LGRPID_RES_BASE "" + LGRPID_GREEK+LGRPID_RES_BASE "" + LGRPID_CYRILLIC+LGRPID_RES_BASE "" + LGRPID_TURKISH+LGRPID_RES_BASE "" + LGRPID_JAPANESE+LGRPID_RES_BASE "" + LGRPID_KOREAN+LGRPID_RES_BASE "" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE " " + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE " " + LGRPID_THAI+LGRPID_RES_BASE "" + LGRPID_HEBREW+LGRPID_RES_BASE "" + LGRPID_ARABIC+LGRPID_RES_BASE "" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "" + LGRPID_INDIC+LGRPID_RES_BASE "" + LGRPID_GEORGIAN+LGRPID_RES_BASE "" + LGRPID_ARMENIAN+LGRPID_RES_BASE "" } diff --git a/dll/win32/kernel32/nls/hin.nls b/dll/win32/kernel32/nls/hin.nls index b8893d2722c..22a7d5840b2 100644 --- a/dll/win32/kernel32/nls/hin.nls +++ b/dll/win32/kernel32/nls/hin.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_HINDI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/hrv.nls b/dll/win32/kernel32/nls/hrv.nls index 38d827bfb48..ea6cb260b03 100644 --- a/dll/win32/kernel32/nls/hrv.nls +++ b/dll/win32/kernel32/nls/hrv.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" @@ -66,14 +68,14 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_DEFAULT LOCALE_SABBREVDAYNAME1 "pon" LOCALE_SABBREVDAYNAME2 "uto" LOCALE_SABBREVDAYNAME3 "sri" - LOCALE_SABBREVDAYNAME4 "\x00E8et" + LOCALE_SABBREVDAYNAME4 L"\x010Det" LOCALE_SABBREVDAYNAME5 "pet" LOCALE_SABBREVDAYNAME6 "sub" LOCALE_SABBREVDAYNAME7 "ned" LOCALE_SABBREVLANGNAME "HRV" LOCALE_SABBREVMONTHNAME1 "sij" LOCALE_SABBREVMONTHNAME2 "vlj" - LOCALE_SABBREVMONTHNAME3 "o\x017Eu" + LOCALE_SABBREVMONTHNAME3 L"o\x017Eu" LOCALE_SABBREVMONTHNAME4 "tra" LOCALE_SABBREVMONTHNAME5 "svi" LOCALE_SABBREVMONTHNAME6 "lip" @@ -90,7 +92,7 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_DEFAULT LOCALE_SDAYNAME1 "ponedjeljak" LOCALE_SDAYNAME2 "utorak" LOCALE_SDAYNAME3 "srijeda" - LOCALE_SDAYNAME4 "\x00E8etvrtak" + LOCALE_SDAYNAME4 L"\x010Detvrtak" LOCALE_SDAYNAME5 "petak" LOCALE_SDAYNAME6 "subota" LOCALE_SDAYNAME7 "nedjelja" @@ -107,9 +109,9 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_DEFAULT LOCALE_SLONGDATE "d. MMMM yyyy" LOCALE_SMONDECIMALSEP "," LOCALE_SMONGROUPING "3;0" - LOCALE_SMONTHNAME1 "sije\x00E8anj" - LOCALE_SMONTHNAME2 "velja\x00E8a" - LOCALE_SMONTHNAME3 "o\x017Eujak" + LOCALE_SMONTHNAME1 L"sije\x010Danj" + LOCALE_SMONTHNAME2 L"velja\x010Da" + LOCALE_SMONTHNAME3 L"o\x017Eujak" LOCALE_SMONTHNAME4 "travanj" LOCALE_SMONTHNAME5 "svibanj" LOCALE_SMONTHNAME6 "lipanj" diff --git a/dll/win32/kernel32/nls/hun.nls b/dll/win32/kernel32/nls/hun.nls index f6a00c719d3..c1991d47da8 100644 --- a/dll/win32/kernel32/nls/hun.nls +++ b/dll/win32/kernel32/nls/hun.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/hye.nls b/dll/win32/kernel32/nls/hye.nls index fd10c7d6c62..a3ef4be563d 100644 --- a/dll/win32/kernel32/nls/hye.nls +++ b/dll/win32/kernel32/nls/hye.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ARMENIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/ind.nls b/dll/win32/kernel32/nls/ind.nls index f929e27c2b5..80991404819 100644 --- a/dll/win32/kernel32/nls/ind.nls +++ b/dll/win32/kernel32/nls/ind.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/isl.nls b/dll/win32/kernel32/nls/isl.nls index 055068ff3a6..1975d36246c 100644 --- a/dll/win32/kernel32/nls/isl.nls +++ b/dll/win32/kernel32/nls/isl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ICELANDIC, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ita.nls b/dll/win32/kernel32/nls/ita.nls index a74fe36bde5..46670cda8bd 100644 --- a/dll/win32/kernel32/nls/ita.nls +++ b/dll/win32/kernel32/nls/ita.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/its.nls b/dll/win32/kernel32/nls/its.nls index 0f6f3f142a4..3e83f42e151 100644 --- a/dll/win32/kernel32/nls/its.nls +++ b/dll/win32/kernel32/nls/its.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN_SWISS LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/jpn.nls b/dll/win32/kernel32/nls/jpn.nls index c2eb795a6e3..db6d489a7f2 100644 --- a/dll/win32/kernel32/nls/jpn.nls +++ b/dll/win32/kernel32/nls/jpn.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "3" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "2" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/kan.nls b/dll/win32/kernel32/nls/kan.nls index 725ba84e471..cf56381d654 100644 --- a/dll/win32/kernel32/nls/kan.nls +++ b/dll/win32/kernel32/nls/kan.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_KANNADA, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/kat.nls b/dll/win32/kernel32/nls/kat.nls index d9d1430bb45..c25b31aa167 100644 --- a/dll/win32/kernel32/nls/kat.nls +++ b/dll/win32/kernel32/nls/kat.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_GEORGIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/kkz.nls b/dll/win32/kernel32/nls/kkz.nls index 929ebfe91b3..8ec369ca90c 100644 --- a/dll/win32/kernel32/nls/kkz.nls +++ b/dll/win32/kernel32/nls/kkz.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_KAZAK, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/knk.nls b/dll/win32/kernel32/nls/knk.nls index 705398d26cb..7268731236f 100644 --- a/dll/win32/kernel32/nls/knk.nls +++ b/dll/win32/kernel32/nls/knk.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_KONKANI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/kor.nls b/dll/win32/kernel32/nls/kor.nls index c3ea67b6cd2..d2a65e96e4e 100644 --- a/dll/win32/kernel32/nls/kor.nls +++ b/dll/win32/kernel32/nls/kor.nls @@ -52,24 +52,26 @@ STRINGTABLE LANGUAGE LANG_KOREAN, SUBLANG_KOREAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "5" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "0" - LOCALE_S1159 "" - LOCALE_S2359 "" + LOCALE_S1159 L"\xC624\xC804" + LOCALE_S2359 L"\xC624\xD6C4" LOCALE_SABBREVCTRYNAME "KOR" - LOCALE_SABBREVDAYNAME1 "" - LOCALE_SABBREVDAYNAME2 "ȭ" - LOCALE_SABBREVDAYNAME3 "" - LOCALE_SABBREVDAYNAME4 "" - LOCALE_SABBREVDAYNAME5 "" - LOCALE_SABBREVDAYNAME6 "" - LOCALE_SABBREVDAYNAME7 "" + LOCALE_SABBREVDAYNAME1 L"\xC6D4" + LOCALE_SABBREVDAYNAME2 L"\xD654" + LOCALE_SABBREVDAYNAME3 L"\xC218" + LOCALE_SABBREVDAYNAME4 L"\xBAA9" + LOCALE_SABBREVDAYNAME5 L"\xAE08" + LOCALE_SABBREVDAYNAME6 L"\xD1A0" + LOCALE_SABBREVDAYNAME7 L"\xC77C" LOCALE_SABBREVLANGNAME "KOR" LOCALE_SABBREVMONTHNAME1 "1" LOCALE_SABBREVMONTHNAME2 "2" @@ -87,13 +89,13 @@ STRINGTABLE LANGUAGE LANG_KOREAN, SUBLANG_KOREAN LOCALE_SCOUNTRY "Korea" LOCALE_SCURRENCY L"\x20a9" LOCALE_SDATE "-" - LOCALE_SDAYNAME1 "" - LOCALE_SDAYNAME2 "ȭ" - LOCALE_SDAYNAME3 "" - LOCALE_SDAYNAME4 "" - LOCALE_SDAYNAME5 "ݿ" - LOCALE_SDAYNAME6 "" - LOCALE_SDAYNAME7 "Ͽ" + LOCALE_SDAYNAME1 L"\xC6D4\xC694\xC77C" + LOCALE_SDAYNAME2 L"\xD654\xC694\xC77C" + LOCALE_SDAYNAME3 L"\xC218\xC694\xC77C" + LOCALE_SDAYNAME4 L"\xBAA9\xC694\xC77C" + LOCALE_SDAYNAME5 L"\xAE08\xC694\xC77C" + LOCALE_SDAYNAME6 L"\xD1A0\xC694\xC77C" + LOCALE_SDAYNAME7 L"\xC77C\xC694\xC77C" LOCALE_SDECIMAL "." LOCALE_SENGCOUNTRY "Korea" LOCALE_SENGCURRNAME "Korean Won" @@ -104,28 +106,28 @@ STRINGTABLE LANGUAGE LANG_KOREAN, SUBLANG_KOREAN LOCALE_SISO639LANGNAME "ko" LOCALE_SLANGUAGE "Korean" LOCALE_SLIST "," - LOCALE_SLONGDATE "yyyy'' M'' d'' dddd" + LOCALE_SLONGDATE L"yyyy'\xB144' M'\xC6D4' d'\xC77C' dddd" LOCALE_SMONDECIMALSEP "." LOCALE_SMONGROUPING "3;0" - LOCALE_SMONTHNAME1 "1" - LOCALE_SMONTHNAME2 "2" - LOCALE_SMONTHNAME3 "3" - LOCALE_SMONTHNAME4 "4" - LOCALE_SMONTHNAME5 "5" - LOCALE_SMONTHNAME6 "6" - LOCALE_SMONTHNAME7 "7" - LOCALE_SMONTHNAME8 "8" - LOCALE_SMONTHNAME9 "9" - LOCALE_SMONTHNAME10 "10" - LOCALE_SMONTHNAME11 "11" - LOCALE_SMONTHNAME12 "12" + LOCALE_SMONTHNAME1 L"1\xC6D4" + LOCALE_SMONTHNAME2 L"2\xC6D4" + LOCALE_SMONTHNAME3 L"3\xC6D4" + LOCALE_SMONTHNAME4 L"4\xC6D4" + LOCALE_SMONTHNAME5 L"5\xC6D4" + LOCALE_SMONTHNAME6 L"6\xC6D4" + LOCALE_SMONTHNAME7 L"7\xC6D4" + LOCALE_SMONTHNAME8 L"8\xC6D4" + LOCALE_SMONTHNAME9 L"9\xC6D4" + LOCALE_SMONTHNAME10 L"10\xC6D4" + LOCALE_SMONTHNAME11 L"11\xC6D4" + LOCALE_SMONTHNAME12 L"12\xC6D4" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "," LOCALE_SNAME "ko-KR" - LOCALE_SNATIVECTRYNAME "ѹα" - LOCALE_SNATIVECURRNAME "" + LOCALE_SNATIVECTRYNAME L"\xB300\xD55C\xBBFC\xAD6D" + LOCALE_SNATIVECURRNAME L"\xC6D0" LOCALE_SNATIVEDIGITS "0123456789" - LOCALE_SNATIVELANGNAME "ѱ" + LOCALE_SNATIVELANGNAME L"\xD55C\xAD6D\xC5B4" LOCALE_SNEGATIVESIGN "-" LOCALE_SPOSITIVESIGN "" LOCALE_SSCRIPTS "Hang;Hani;" @@ -134,7 +136,7 @@ STRINGTABLE LANGUAGE LANG_KOREAN, SUBLANG_KOREAN LOCALE_STHOUSAND "," LOCALE_STIME ":" LOCALE_STIMEFORMAT "tt h:mm:ss" - LOCALE_SYEARMONTH "yyyy'' M''" + LOCALE_SYEARMONTH L"yyyy'\xB144' M'\xC6D4'" LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" diff --git a/dll/win32/kernel32/nls/kyr.nls b/dll/win32/kernel32/nls/kyr.nls index e720a886012..ff6dde31f73 100644 --- a/dll/win32/kernel32/nls/kyr.nls +++ b/dll/win32/kernel32/nls/kyr.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_KYRGYZ, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/lth.nls b/dll/win32/kernel32/nls/lth.nls index 40944c167e4..b92fc3fc241 100644 --- a/dll/win32/kernel32/nls/lth.nls +++ b/dll/win32/kernel32/nls/lth.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_LITHUANIAN, SUBLANG_LITHUANIAN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/lvi.nls b/dll/win32/kernel32/nls/lvi.nls index 99ee7f1f79b..f5dc90ffa6c 100644 --- a/dll/win32/kernel32/nls/lvi.nls +++ b/dll/win32/kernel32/nls/lvi.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_LATVIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/mar.nls b/dll/win32/kernel32/nls/mar.nls index 531819599a0..597a46224d5 100644 --- a/dll/win32/kernel32/nls/mar.nls +++ b/dll/win32/kernel32/nls/mar.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_MARATHI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/mki.nls b/dll/win32/kernel32/nls/mki.nls index 760967dcab1..c50010b1628 100644 --- a/dll/win32/kernel32/nls/mki.nls +++ b/dll/win32/kernel32/nls/mki.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_MACEDONIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/mon.nls b/dll/win32/kernel32/nls/mon.nls index 0dc4dea725d..845664fa780 100644 --- a/dll/win32/kernel32/nls/mon.nls +++ b/dll/win32/kernel32/nls/mon.nls @@ -52,24 +52,26 @@ STRINGTABLE LANGUAGE LANG_MONGOLIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "3" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" LOCALE_S1159 "" LOCALE_S2359 "" LOCALE_SABBREVCTRYNAME "MNG" - LOCALE_SABBREVDAYNAME1 "\x041f\x04af" - LOCALE_SABBREVDAYNAME2 "\x041f\x04af" - LOCALE_SABBREVDAYNAME3 "\x041f\x04af" - LOCALE_SABBREVDAYNAME4 "\x041f\x04af" - LOCALE_SABBREVDAYNAME5 "\x041f\x04af" - LOCALE_SABBREVDAYNAME6 "\x041f\x04af" - LOCALE_SABBREVDAYNAME7 "\x041f\x04af" + LOCALE_SABBREVDAYNAME1 L"\x0414\x0430" + LOCALE_SABBREVDAYNAME2 L"\x041C\x044F" + LOCALE_SABBREVDAYNAME3 L"\x041B\x0445" + LOCALE_SABBREVDAYNAME4 L"\x041f\x04af" + LOCALE_SABBREVDAYNAME5 L"\x0411\x0430" + LOCALE_SABBREVDAYNAME6 L"\x0411\x044F" + LOCALE_SABBREVDAYNAME7 L"\x041D\x044F" LOCALE_SABBREVLANGNAME "MON" LOCALE_SABBREVMONTHNAME1 "I" LOCALE_SABBREVMONTHNAME2 "II" @@ -78,7 +80,7 @@ STRINGTABLE LANGUAGE LANG_MONGOLIAN, SUBLANG_DEFAULT LOCALE_SABBREVMONTHNAME5 "V" LOCALE_SABBREVMONTHNAME6 "VI" LOCALE_SABBREVMONTHNAME7 "VII" - LOCALE_SABBREVMONTHNAME8 "V\x0000" + LOCALE_SABBREVMONTHNAME8 L"V\x0428" LOCALE_SABBREVMONTHNAME9 "IX" LOCALE_SABBREVMONTHNAME10 "X" LOCALE_SABBREVMONTHNAME11 "XI" @@ -87,13 +89,13 @@ STRINGTABLE LANGUAGE LANG_MONGOLIAN, SUBLANG_DEFAULT LOCALE_SCOUNTRY "Mongolia" LOCALE_SCURRENCY L"\x20ae" LOCALE_SDATE "." - LOCALE_SDAYNAME1 "\x0000\x0000\x0000\x0000\x0000" - LOCALE_SDAYNAME2 "\x0000\x0000\x0000\x0000\x0000\x0000" - LOCALE_SDAYNAME3 "\x0000\x0000\x0000\x0000\x0000\x0000" + LOCALE_SDAYNAME1 L"\x0414\x0430\x0432\x0430\x0430" + LOCALE_SDAYNAME2 L"\x041C\x044F\x0433\x043C\x0430\x0440" + LOCALE_SDAYNAME3 L"\x041B\x0445\x0430\x0433\x0432\x0430" LOCALE_SDAYNAME4 L"\x041f\x04af\x0440\x044d\x0432" - LOCALE_SDAYNAME5 "\x0000\x0000\x0000\x0000\x0000\x0000" - LOCALE_SDAYNAME6 "\x0000\x0000\x0000\x0000\x0000" - LOCALE_SDAYNAME7 "\x0000\x0000\x0000" + LOCALE_SDAYNAME5 L"\x0411\x0430\x0430\x0441\x0430\x043D" + LOCALE_SDAYNAME6 L"\x0411\x044F\x043C\x0431\x0430" + LOCALE_SDAYNAME7 L"\x041D\x044F\x043C" LOCALE_SDECIMAL "," LOCALE_SENGCOUNTRY "Mongolia" LOCALE_SENGCURRNAME "Tugrik" @@ -104,28 +106,28 @@ STRINGTABLE LANGUAGE LANG_MONGOLIAN, SUBLANG_DEFAULT LOCALE_SISO639LANGNAME "mn" LOCALE_SLANGUAGE "Mongolian (Cyrillic)" LOCALE_SLIST ";" - LOCALE_SLONGDATE "yyyy '\x0000\x0000\x0000' MMMM d" + LOCALE_SLONGDATE L"yyyy '\x043E\x043D\x044B' MMMM d" LOCALE_SMONDECIMALSEP "," LOCALE_SMONGROUPING "3;0" LOCALE_SMONTHNAME1 L"1\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME2 "2\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME3 "3\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME4 "4\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME5 "5\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME6 "6\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME7 "7\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME8 "8\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME9 "9\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME10 "10\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME11 "11\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" - LOCALE_SMONTHNAME12 "12\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" + LOCALE_SMONTHNAME2 L"2 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" + LOCALE_SMONTHNAME3 L"3 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" + LOCALE_SMONTHNAME4 L"4\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" + LOCALE_SMONTHNAME5 L"5 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" + LOCALE_SMONTHNAME6 L"6 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" + LOCALE_SMONTHNAME7 L"7 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" + LOCALE_SMONTHNAME8 L"8 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" + LOCALE_SMONTHNAME9 L"9\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" + LOCALE_SMONTHNAME10 L"10 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" + LOCALE_SMONTHNAME11 L"11\x00a0\x0434\x04af\x0433\x044d\x044d\x0440\x00a0\x0441\x0430\x0440" + LOCALE_SMONTHNAME12 L"12 \x0434\x0443\x0433\x0430\x0430\x0440 \x0441\x0430\x0440" LOCALE_SMONTHNAME13 "" - LOCALE_SMONTHOUSANDSEP "." + LOCALE_SMONTHOUSANDSEP " " LOCALE_SNAME "mn-MN" - LOCALE_SNATIVECTRYNAME "\x0000\x0000\x0000í\x0000ã\x0000\x0000 \x0000ó\x0000\x0441" + LOCALE_SNATIVECTRYNAME L"\x041C\x043E\x043D\x0433\x043E\x043B \x0443\x043B\x0441" LOCALE_SNATIVECURRNAME L"\x0422\x04e9\x0433\x0440\x04e9\x0433" LOCALE_SNATIVEDIGITS "0123456789" - LOCALE_SNATIVELANGNAME "\x0000\x0000\x0000\x0000\x0000\x0000 \x0000\x0000\x0000" + LOCALE_SNATIVELANGNAME L"\x041C\x043E\x043D\x0433\x043E\x043B \x0445\x044D\x043B" LOCALE_SNEGATIVESIGN "-" LOCALE_SPOSITIVESIGN "" LOCALE_SSCRIPTS "Cyrl;" @@ -134,7 +136,7 @@ STRINGTABLE LANGUAGE LANG_MONGOLIAN, SUBLANG_DEFAULT LOCALE_STHOUSAND " " LOCALE_STIME ":" LOCALE_STIMEFORMAT "H:mm:ss" - LOCALE_SYEARMONTH "yyyy '\x0000\x0000' MMMM" + LOCALE_SYEARMONTH "yyyy '\x043E\x043D' MMMM" LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" diff --git a/dll/win32/kernel32/nls/msb.nls b/dll/win32/kernel32/nls/msb.nls index 8e3a8cbabcf..20469d15f6e 100644 --- a/dll/win32/kernel32/nls/msb.nls +++ b/dll/win32/kernel32/nls/msb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_MALAY, SUBLANG_MALAY_BRUNEI_DARUSSALAM LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/msl.nls b/dll/win32/kernel32/nls/msl.nls index 4f9bacb7717..af08e550085 100644 --- a/dll/win32/kernel32/nls/msl.nls +++ b/dll/win32/kernel32/nls/msl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_MALAY, SUBLANG_MALAY_MALAYSIA LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/nlb.nls b/dll/win32/kernel32/nls/nlb.nls index e2c9ed11ab5..a901ecbc78e 100644 --- a/dll/win32/kernel32/nls/nlb.nls +++ b/dll/win32/kernel32/nls/nlb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_DUTCH, SUBLANG_DUTCH_BELGIAN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/nld.nls b/dll/win32/kernel32/nls/nld.nls index e5be60f0459..9b8975ece58 100644 --- a/dll/win32/kernel32/nls/nld.nls +++ b/dll/win32/kernel32/nls/nld.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_DUTCH, SUBLANG_DUTCH LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/non.nls b/dll/win32/kernel32/nls/non.nls index e33611b231a..1cdd102580b 100644 --- a/dll/win32/kernel32/nls/non.nls +++ b/dll/win32/kernel32/nls/non.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_NYNORSK LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/nor.nls b/dll/win32/kernel32/nls/nor.nls index f7340f34744..05ad6dc9098 100644 --- a/dll/win32/kernel32/nls/nor.nls +++ b/dll/win32/kernel32/nls/nor.nls @@ -53,11 +53,13 @@ STRINGTABLE LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/pan.nls b/dll/win32/kernel32/nls/pan.nls index febaa1d7f52..b52d8ea1a13 100644 --- a/dll/win32/kernel32/nls/pan.nls +++ b/dll/win32/kernel32/nls/pan.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_PUNJABI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/plk.nls b/dll/win32/kernel32/nls/plk.nls index 3a441ffd769..9bc7897c4c2 100644 --- a/dll/win32/kernel32/nls/plk.nls +++ b/dll/win32/kernel32/nls/plk.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_POLISH, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ptb.nls b/dll/win32/kernel32/nls/ptb.nls index 6ca15204d3d..e77ae3f8fc3 100644 --- a/dll/win32/kernel32/nls/ptb.nls +++ b/dll/win32/kernel32/nls/ptb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ptg.nls b/dll/win32/kernel32/nls/ptg.nls index 38a3e546c12..d27056c0547 100644 --- a/dll/win32/kernel32/nls/ptg.nls +++ b/dll/win32/kernel32/nls/ptg.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/rmc.nls b/dll/win32/kernel32/nls/rmc.nls index aff624e2062..d1e818f1ca1 100644 --- a/dll/win32/kernel32/nls/rmc.nls +++ b/dll/win32/kernel32/nls/rmc.nls @@ -63,11 +63,13 @@ STRINGTABLE LANGUAGE LANG_ROMANSH, SUBLANG_ROMANSH_SWITZERLAND LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/rom.nls b/dll/win32/kernel32/nls/rom.nls index f3837a55457..9c4d4ec224e 100644 --- a/dll/win32/kernel32/nls/rom.nls +++ b/dll/win32/kernel32/nls/rom.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/rus.nls b/dll/win32/kernel32/nls/rus.nls index 5cead8134a8..2d35a15e627 100644 --- a/dll/win32/kernel32/nls/rus.nls +++ b/dll/win32/kernel32/nls/rus.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/san.nls b/dll/win32/kernel32/nls/san.nls index d6f353f3858..fd1c2fd77ba 100644 --- a/dll/win32/kernel32/nls/san.nls +++ b/dll/win32/kernel32/nls/san.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SANSKRIT, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/sky.nls b/dll/win32/kernel32/nls/sky.nls index 7fe7ffa4c66..d631b1df445 100644 --- a/dll/win32/kernel32/nls/sky.nls +++ b/dll/win32/kernel32/nls/sky.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/slv.nls b/dll/win32/kernel32/nls/slv.nls index 58cfce93605..327df7e72d6 100644 --- a/dll/win32/kernel32/nls/slv.nls +++ b/dll/win32/kernel32/nls/slv.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/sqi.nls b/dll/win32/kernel32/nls/sqi.nls index 3a772071286..fd4641fd87c 100644 --- a/dll/win32/kernel32/nls/sqi.nls +++ b/dll/win32/kernel32/nls/sqi.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_ALBANIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/srb.nls b/dll/win32/kernel32/nls/srb.nls index 2f0423214e4..2d75eb20712 100644 --- a/dll/win32/kernel32/nls/srb.nls +++ b/dll/win32/kernel32/nls/srb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" @@ -96,11 +98,11 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC LOCALE_SDAYNAME7 "" LOCALE_SDECIMAL "," LOCALE_SENGCOUNTRY "Serbia" - LOCALE_SENGCURRNAME "Yugoslavian Dinar" + LOCALE_SENGCURRNAME "Serbian Dinar" LOCALE_SENGLANGUAGE "Serbian (Cyrillic)" LOCALE_SGROUPING "3;0" - LOCALE_SINTLSYMBOL "YUN" - LOCALE_SISO3166CTRYNAME "SP" + LOCALE_SINTLSYMBOL "RSD" + LOCALE_SISO3166CTRYNAME "RS" LOCALE_SISO639LANGNAME "sr" LOCALE_SLANGUAGE "Serbian (Cyrillic)" LOCALE_SLIST ";" @@ -121,7 +123,7 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC LOCALE_SMONTHNAME12 "" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "." - LOCALE_SNAME "sr-SP" + LOCALE_SNAME "sr-RS" LOCALE_SNATIVECTRYNAME "" LOCALE_SNATIVECURRNAME "" LOCALE_SNATIVEDIGITS "0123456789" diff --git a/dll/win32/kernel32/nls/srl.nls b/dll/win32/kernel32/nls/srl.nls index d334f702541..cc53cac151a 100644 --- a/dll/win32/kernel32/nls/srl.nls +++ b/dll/win32/kernel32/nls/srl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" @@ -96,11 +98,11 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN LOCALE_SDAYNAME7 "nedelja" LOCALE_SDECIMAL "," LOCALE_SENGCOUNTRY "Serbia" - LOCALE_SENGCURRNAME "Yugoslavian Dinar" + LOCALE_SENGCURRNAME "Serbian Dinar" LOCALE_SENGLANGUAGE "Serbian (Latin)" LOCALE_SGROUPING "3;0" - LOCALE_SINTLSYMBOL "YUN" - LOCALE_SISO3166CTRYNAME "SP" + LOCALE_SINTLSYMBOL "RSD" + LOCALE_SISO3166CTRYNAME "RS" LOCALE_SISO639LANGNAME "sr" LOCALE_SLANGUAGE "Serbian (Latin)" LOCALE_SLIST ";" @@ -121,7 +123,7 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN LOCALE_SMONTHNAME12 "decembar" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "." - LOCALE_SNAME "sr-Latn-SP" + LOCALE_SNAME "sr-Latn-RS" LOCALE_SNATIVECTRYNAME "Srbija" LOCALE_SNATIVECURRNAME "dinar" LOCALE_SNATIVEDIGITS "0123456789" diff --git a/dll/win32/kernel32/nls/sve.nls b/dll/win32/kernel32/nls/sve.nls index 14d8c058dbf..6ea19d022f3 100644 --- a/dll/win32/kernel32/nls/sve.nls +++ b/dll/win32/kernel32/nls/sve.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SWEDISH, SUBLANG_SWEDISH LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/svf.nls b/dll/win32/kernel32/nls/svf.nls index 4e217ab54c9..0dfece162ac 100644 --- a/dll/win32/kernel32/nls/svf.nls +++ b/dll/win32/kernel32/nls/svf.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SWEDISH, SUBLANG_SWEDISH_FINLAND LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/swk.nls b/dll/win32/kernel32/nls/swk.nls index 79d62c3186c..9291aba590f 100644 --- a/dll/win32/kernel32/nls/swk.nls +++ b/dll/win32/kernel32/nls/swk.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SWAHILI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/syr.nls b/dll/win32/kernel32/nls/syr.nls index 45bb96c25a0..49761edd76a 100644 --- a/dll/win32/kernel32/nls/syr.nls +++ b/dll/win32/kernel32/nls/syr.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_SYRIAC, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "1" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/tam.nls b/dll/win32/kernel32/nls/tam.nls index 9820517264b..190482b2841 100644 --- a/dll/win32/kernel32/nls/tam.nls +++ b/dll/win32/kernel32/nls/tam.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_TAMIL, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/tel.nls b/dll/win32/kernel32/nls/tel.nls index 370a6c96104..1f715863409 100644 --- a/dll/win32/kernel32/nls/tel.nls +++ b/dll/win32/kernel32/nls/tel.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_TELUGU, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "4" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "4" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/tha.nls b/dll/win32/kernel32/nls/tha.nls index 42f0a806ad3..85699e28050 100644 --- a/dll/win32/kernel32/nls/tha.nls +++ b/dll/win32/kernel32/nls/tha.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_THAI, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "3" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "7" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/trk.nls b/dll/win32/kernel32/nls/trk.nls index 7933d4f37b2..8a854e45bc7 100644 --- a/dll/win32/kernel32/nls/trk.nls +++ b/dll/win32/kernel32/nls/trk.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/ttt.nls b/dll/win32/kernel32/nls/ttt.nls index 9a21d710435..54a040e274b 100644 --- a/dll/win32/kernel32/nls/ttt.nls +++ b/dll/win32/kernel32/nls/ttt.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_TATAR, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/ukr.nls b/dll/win32/kernel32/nls/ukr.nls index 6620d0e3959..5df430813ec 100644 --- a/dll/win32/kernel32/nls/ukr.nls +++ b/dll/win32/kernel32/nls/ukr.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/urd.nls b/dll/win32/kernel32/nls/urd.nls index 26ea2edd466..e41e9b674ca 100644 --- a/dll/win32/kernel32/nls/urd.nls +++ b/dll/win32/kernel32/nls/urd.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_URDU, SUBLANG_URDU_PAKISTAN LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "2" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "1" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "2" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/uzb.nls b/dll/win32/kernel32/nls/uzb.nls index b6b0c7b4c86..4feff2ec921 100644 --- a/dll/win32/kernel32/nls/uzb.nls +++ b/dll/win32/kernel32/nls/uzb.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_UZBEK, SUBLANG_UZBEK_CYRILLIC LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/uzl.nls b/dll/win32/kernel32/nls/uzl.nls index c0778d44dd7..fbac8883aee 100644 --- a/dll/win32/kernel32/nls/uzl.nls +++ b/dll/win32/kernel32/nls/uzl.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_UZBEK, SUBLANG_UZBEK_LATIN LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "1" diff --git a/dll/win32/kernel32/nls/vit.nls b/dll/win32/kernel32/nls/vit.nls index e7236b54439..16126d8c33c 100644 --- a/dll/win32/kernel32/nls/vit.nls +++ b/dll/win32/kernel32/nls/vit.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_VIETNAMESE, SUBLANG_DEFAULT LOCALE_INEGSEPBYSPACE "1" LOCALE_INEGSIGNPOSN "1" LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "1" LOCALE_IPOSSIGNPOSN "1" LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/zhh.nls b/dll/win32/kernel32/nls/zhh.nls index d36ee68a097..0a0b6208a9a 100644 --- a/dll/win32/kernel32/nls/zhh.nls +++ b/dll/win32/kernel32/nls/zhh.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_HONGKONG LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/zhi.nls b/dll/win32/kernel32/nls/zhi.nls index 25ba406410f..9c192c7b502 100644 --- a/dll/win32/kernel32/nls/zhi.nls +++ b/dll/win32/kernel32/nls/zhi.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SINGAPORE LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "0" LOCALE_ITIMEMARKPOSN "1" LOCALE_ITLZERO "0" diff --git a/dll/win32/kernel32/nls/zhm.nls b/dll/win32/kernel32/nls/zhm.nls index 8e666d04c06..4cf3bfab1c7 100644 --- a/dll/win32/kernel32/nls/zhm.nls +++ b/dll/win32/kernel32/nls/zhm.nls @@ -52,11 +52,13 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_MACAU LOCALE_INEGSEPBYSPACE "0" LOCALE_INEGSIGNPOSN "0" LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" LOCALE_IOPTIONALCALENDAR "0" LOCALE_IPAPERSIZE "9" LOCALE_IPOSSEPBYSPACE "0" LOCALE_IPOSSIGNPOSN "3" LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" LOCALE_ITIME "1" LOCALE_ITIMEMARKPOSN "0" LOCALE_ITLZERO "0" @@ -80,9 +82,9 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_MACAU LOCALE_SABBREVMONTHNAME7 "C" LOCALE_SABBREVMONTHNAME8 "K" LOCALE_SABBREVMONTHNAME9 "E" - LOCALE_SABBREVMONTHNAME10 "BROKEN PLEASE FIX" - LOCALE_SABBREVMONTHNAME11 "BROKEN PLEASE FIX" - LOCALE_SABBREVMONTHNAME12 "BROKEN PLEASE FIX" + LOCALE_SABBREVMONTHNAME10 "Q" + LOCALE_SABBREVMONTHNAME11 "Q@" + LOCALE_SABBREVMONTHNAME12 "QG" LOCALE_SABBREVMONTHNAME13 "" LOCALE_SCOUNTRY "Macau S.A.R." LOCALE_SCURRENCY "P" @@ -116,9 +118,9 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_MACAU LOCALE_SMONTHNAME7 "C" LOCALE_SMONTHNAME8 "K" LOCALE_SMONTHNAME9 "E" - LOCALE_SMONTHNAME10 "BROKEN PLEASE FIX" - LOCALE_SMONTHNAME11 "BROKEN PLEASE FIX" - LOCALE_SMONTHNAME12 "BROKEN PLEASE FIX" + LOCALE_SMONTHNAME10 "Q" + LOCALE_SMONTHNAME11 "Q@" + LOCALE_SMONTHNAME12 "QG" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "," LOCALE_SNAME "zh-MO" diff --git a/dll/win32/lsasrv/CMakeLists.txt b/dll/win32/lsasrv/CMakeLists.txt index e5165d4f653..a25157761a8 100644 --- a/dll/win32/lsasrv/CMakeLists.txt +++ b/dll/win32/lsasrv/CMakeLists.txt @@ -28,7 +28,7 @@ target_link_libraries(lsasrv wine ${PSEH_LIB}) -add_importlibs(lsasrv rpcrt4 kernel32 ntdll) +add_importlibs(lsasrv rpcrt4 msvcrt kernel32 ntdll) add_dependencies(lsasrv psdk) add_cd_file(TARGET lsasrv DESTINATION reactos/system32 FOR all) add_importlib_target(lsasrv.spec) diff --git a/dll/win32/mciwave/CMakeLists.txt b/dll/win32/mciwave/CMakeLists.txt index d425aa422ab..48e6d5af48a 100644 --- a/dll/win32/mciwave/CMakeLists.txt +++ b/dll/win32/mciwave/CMakeLists.txt @@ -1,7 +1,6 @@ add_definitions( -D__WINESRC__ - -D_DLL -D__USE_CRTIMP -D_WINE) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) diff --git a/dll/win32/mlang/CMakeLists.txt b/dll/win32/mlang/CMakeLists.txt index 4808863868f..d30cbcc24de 100644 --- a/dll/win32/mlang/CMakeLists.txt +++ b/dll/win32/mlang/CMakeLists.txt @@ -1,7 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__WINESRC__) remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) @@ -19,7 +17,6 @@ list(APPEND SOURCE add_library(mlang SHARED ${SOURCE}) set_entrypoint(mlang 0) - target_link_libraries(mlang uuid wine) add_importlibs(mlang diff --git a/dll/win32/modemui/lang/pl-PL.rc b/dll/win32/modemui/lang/pl-PL.rc index b78e23f2ee7..633477f5bca 100644 --- a/dll/win32/modemui/lang/pl-PL.rc +++ b/dll/win32/modemui/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by Caemyr - Olaf Siejka (Jan, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -12,12 +13,12 @@ BEGIN POPUP "" BEGIN MENUITEM "&Kopiuj..", 0 - MENUITEM "&Usu", 1 + MENUITEM "&Usuń", 1 MENUITEM "&Zobacz logi", 2 MENUITEM SEPARATOR - MENUITEM "&Waciwoci", 3 - MENUITEM "K&opiuj waciwoci", 4 - MENUITEM "Za&stosuj waciwoci", 5 + MENUITEM "&Właściwości", 3 + MENUITEM "K&opiuj właściwości", 4 + MENUITEM "Za&stosuj właściwości", 5 END END @@ -29,31 +30,31 @@ BEGIN GROUPBOX "Ustawienia dodatkowe", 1018, 6, 6, 225, 70 LTEXT "&Dodatkowe komendy inicjalizacji:", 1011, 16, 20, 143, 8 EDITTEXT 1016, 16, 31, 205, 13, ES_AUTOHSCROLL - LTEXT "&Czekaj na sygna karty kredytowej:", 1007, 16, 55, 109, 8, NOT WS_VISIBLE + LTEXT "&Czekaj na sygnał karty kredytowej:", 1007, 16, 55, 109, 8, NOT WS_VISIBLE EDITTEXT 1008, 133, 52, 26, 12, ES_RIGHT | NOT WS_VISIBLE | WS_GROUP CONTROL "", 1009, "MSCTLS_UPDOWN32", NOT WS_VISIBLE | WS_BORDER | WS_GROUP | 0x00000036, 159, 52, 12, 12 LTEXT "sekund", 1010, 173, 54, 40, 8, NOT WS_VISIBLE - GROUPBOX "&Wybr Kraju/Regionu", 1012, 6, 80, 225, 75 + GROUPBOX "&Wybór Kraju/Regionu", 1012, 6, 80, 225, 75 COMBOBOX 1013, 18, 99, 203, 50, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP PUSHBUTTON "&Zaaw. ustawienia portu", 1100, 107, 170, 125, 14 - DEFPUSHBUTTON "Zmie &ustawienia domylne", 3, 107, 188, 125, 14 + DEFPUSHBUTTON "Zmień &ustawienia domyślne", 3, 107, 188, 125, 14 END IDD_GENERAL DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Port:", 1018, 9, 8, 32, 10 LTEXT "Port szeregowy", 1095, 48, 8, 181, 10 - GROUPBOX "&Gonoc", 1029, 10, 21, 218, 48 + GROUPBOX "&Głośnośc", 1029, 10, 21, 218, 48 CONTROL "", 1032, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000001, 84, 40, 66, 20 - RTEXT "Wyczona", 1045, 56, 40, 22, 8 + RTEXT "Wyłączona", 1045, 56, 40, 22, 8 LTEXT "Wysoka", 1001, 155, 40, 25, 11 - GROUPBOX "&Maksymalna prdko portu", 1031, 10, 78, 218, 46 + GROUPBOX "&Maksymalna prędkość portu", 1031, 10, 78, 218, 46 COMBOBOX 1036, 18, 100, 202, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP GROUPBOX "Kontrola wybierania", 1060, 10, 133, 218, 51 - AUTOCHECKBOX "&Czekaj na sygna przed rozpoczciem poczenia", 1003, 27, 157, 174, 10 + AUTOCHECKBOX "&Czekaj na sygnał przed rozpoczęciem połączenia", 1003, 27, 157, 174, 10 END IDD_DISTINCTIVE_RING DIALOGEX 0, 0, 238, 210 @@ -62,10 +63,10 @@ CAPTION "Linia wielonumerowa" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", 1068, 10, 7, 218, 145 - AUTOCHECKBOX "&Ta linia posiada usug wielu numerw", 1069, 20, 7, 184, 10 - CTEXT "Wzorzec sygnau", -1, 84, 21, 70, 8 - CTEXT "Typ poczenia", -1, 159, 21, 63, 8 - LTEXT "&Numer gwny:", 1070, 20, 41, 62, 8 + AUTOCHECKBOX "&Ta linia posiada usługę wielu numerów", 1069, 20, 7, 184, 10 + CTEXT "Wzorzec sygnału", -1, 84, 21, 70, 8 + CTEXT "Typ połączenia", -1, 159, 21, 63, 8 + LTEXT "&Numer główny:", 1070, 20, 41, 62, 8 COMBOBOX 1073, 84, 37, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1082, 160, 37, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP LTEXT "Numer &1:", 1071, 20, 59, 62, 8 @@ -91,14 +92,14 @@ CAPTION "Linia wielonumerowa" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", 1068, 10, 7, 218, 87 - AUTOCHECKBOX "&Ta linia posiada usug wielu numerw", 1069, 19, 7, 177, 10 - CTEXT "Wzorzec sygnau", -1, 20, 21, 74, 8 - CTEXT "Rodzaj poczenia", -1, 96, 21, 65, 8 + AUTOCHECKBOX "&Ta linia posiada usługę wielu numerów", 1069, 19, 7, 177, 10 + CTEXT "Wzorzec sygnału", -1, 20, 21, 74, 8 + CTEXT "Rodzaj połączenia", -1, 96, 21, 65, 8 LTEXT "&Pojedynczy:", 1088, 20, 37, 53, 8 COMBOBOX 1091, 96, 37, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "P&odwjny:", 1089, 20, 57, 53, 8 + LTEXT "P&odwójny:", 1089, 20, 57, 53, 8 COMBOBOX 1092, 96, 55, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "Po&trjny:", 1090, 20, 76, 53, 8 + LTEXT "Po&trójny:", 1090, 20, 76, 53, 8 COMBOBOX 1093, 96, 73, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END @@ -118,36 +119,36 @@ END IDD_PLEASE_WAIT DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "Prosz czeka..." +CAPTION "Proszę czekać..." FONT 8, "MS Shell Dlg" BEGIN ICON 5100, -1, 9, 7, 20, 20 - LTEXT "Prba komunikacji z modemem. To moe zaj wiele sekund.", -1, 42, 7, 146, 28 + LTEXT "Próba komunikacji z modemem. To może zająć wiele sekund.", -1, 42, 7, 146, 28 DEFPUSHBUTTON "Cancel", 2, 72, 52, 50, 14 END IDD_GENERAL_2 DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "&Wybieranie rczne", 1002, 19, 22, 150, 10 - AUTOCHECKBOX "&Rozcz jeli poczenie jest bezczynne powyej:", 1042, 19, 38, 143, 10 + AUTOCHECKBOX "&Wybieranie ręczne", 1002, 19, 22, 150, 10 + AUTOCHECKBOX "&Rozłącz jeśli połączenie jest bezczynne powyżej:", 1042, 19, 38, 143, 10 EDITTEXT 1043, 168, 35, 25, 13, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "&Anuluj poczenie jeli nie udao si poczy w cigu", -1, 19, 56, 147, 10 + LTEXT "&Anuluj połączenie jeśli nie udało się połączyć w ciągu", -1, 19, 56, 147, 10 EDITTEXT 1040, 168, 54, 25, 13, ES_AUTOHSCROLL | ES_NUMBER - RTEXT "&Szybko portu:", 1034, 16, 102, 93, 8 + RTEXT "&Szybkość portu:", 1034, 16, 102, 93, 8 COMBOBOX 1036, 114, 100, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&Protok danych:", 1032, 16, 122, 93, 8 + RTEXT "&Protokół danych:", 1032, 16, 122, 93, 8 COMBOBOX 1037, 114, 119, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP RTEXT "&Kompresja:", 1035, 16, 139, 93, 8 COMBOBOX 1099, 114, 137, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "K&ontrola przepywu:", 1027, 16, 157, 93, 8 + RTEXT "K&ontrola przepływu:", 1027, 16, 157, 93, 8 COMBOBOX 1031, 114, 155, 84, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX "Opcje poczenia", 1060, 11, 7, 217, 66 + GROUPBOX "Opcje połączenia", 1060, 11, 7, 217, 66 LTEXT "minut", 1044, 195, 38, 22, 8 LTEXT "sekund", 1041, 194, 56, 22, 8 - GROUPBOX "Opcje poczenia", -1, 11, 82, 217, 94 + GROUPBOX "Opcje połączenia", -1, 11, 82, 217, 94 END IDD_ADVANCED_2 DIALOGEX 17, 12, 238, 210 @@ -155,18 +156,18 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Zaawansowane" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "Przywoaj okno &terminala przed poczeniem", 1000, 20, 21, 200, 10 - AUTOCHECKBOX "Przywoaj okno t&erminala po poczeniu", 1001, 20, 38, 200, 10 + AUTOCHECKBOX "Przywołaj okno &terminala przed połączeniem", 1000, 20, 21, 200, 10 + AUTOCHECKBOX "Przywołaj okno t&erminala po połączeniu", 1001, 20, 38, 200, 10 RTEXT "&Bity danych:", 1024, 18, 79, 93, 8 COMBOBOX 1025, 114, 77, 106, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&Parzysto:", 1026, 18, 97, 93, 8 + RTEXT "&Parzystość:", 1026, 18, 97, 93, 8 COMBOBOX 1028, 114, 95, 106, 60, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP RTEXT "B&ity stopu:", 1029, 18, 115, 93, 8 COMBOBOX 1030, 114, 113, 106, 45, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP RTEXT "&Modulacja:", 1045, 18, 133, 93, 8 COMBOBOX 1038, 114, 131, 106, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP GROUPBOX "Okno terminala", 1004, 10, 7, 217, 49 - GROUPBOX "Ustawienia sprztowe", 1005, 10, 64, 217, 89 + GROUPBOX "Ustawienia sprzętowe", 1005, 10, 64, 217, 89 END IDD_ISDN DIALOGEX 0, 0, 238, 210 @@ -188,24 +189,24 @@ END IDD_PLEASE_WAIT_2 DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "Prosz czeka" +CAPTION "Proszę czekać" FONT 8, "MS Shell Dlg" BEGIN ICON 5100, -1, 9, 7, 20, 20 - LTEXT "Wysyanie informacji o kraju/regionie do Modemu.", -1, 42, 7, 146, 28 + LTEXT "Wysyłanie informacji o kraju/regionie do Modemu.", -1, 42, 7, 146, 28 END IDD_WARNING DIALOGEX 0, 0, 360, 105 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Ostrzeenie" +CAPTION "Ostrzeżenie" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "Nie pokazuj wicej tej wiadomoci", 1109, 17, 73, 118, 10 + AUTOCHECKBOX "Nie pokazuj więcej tej wiadomości", 1109, 17, 73, 118, 10 DEFPUSHBUTTON "OK", 1, 302, 84, 50, 14 - LTEXT "Niektre modemy nie obsuguj waciwie komendy inicjalizacji o tej wielkoci.", -1, 50, 27, 304, 8 - LTEXT "Informacje o tym ograniczeniu mog zosta uzyskane od producenta Modemu.", -1, 50, 41, 304, 8 + LTEXT "Niektóre modemy nie obsługują właściwie komendy inicjalizacji o tej wielkości.", -1, 50, 27, 304, 8 + LTEXT "Informacji o tym ograniczeniu można uzyskać od producenta Modemu.", -1, 50, 41, 304, 8 ICON 5100, -1, 15, 14, 20, 20 - LTEXT "Wprowadzie komend inicjalizacji dusz ni 57 znakw.", -1, 50, 14, 304, 8 + LTEXT "Wprowadziona komenda inicjalizacji jest dłuższa niż 57 znaków.", -1, 50, 14, 304, 8 END IDD_MODEMS DIALOGEX 0, 0, 252, 218 @@ -217,13 +218,13 @@ BEGIN LTEXT "Zainstalowane &modemy:", -1, 44, 12, 203, 9 CONTROL "", 113, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00000849, 7, 32, 238, 158, WS_EX_CLIENTEDGE PUSHBUTTON "&Dodaj...", 110, 56, 198, 60, 14 - PUSHBUTTON "&Usu....", 112, 121, 198, 60, 14 - PUSHBUTTON "&Waciwoci", 109, 185, 198, 60, 14 + PUSHBUTTON "&Usuń....", 112, 121, 198, 60, 14 + PUSHBUTTON "&Właściwości", 109, 185, 198, 60, 14 END IDD_PLEASE_WAIT_3 DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "Prosz czeka..." +CAPTION "Proszę czekać..." FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "&Stop", 2, 74, 53, 50, 14 @@ -235,11 +236,11 @@ END STRINGTABLE BEGIN 180 "Port szeregowy RS-232" - 181 "Modem Zewntrzny" - 182 "Modem Wewntrzny" + 181 "Modem Zewnętrzny" + 182 "Modem Wewnętrzny" 183 "Modem PCMCIA" - 184 "Modem Rwnolegy" - 185 "Port Rwnolegy" + 184 "Modem Równoległy" + 185 "Port Równoległy" 200 "110" 201 "1200" 202 "2400" @@ -267,35 +268,35 @@ BEGIN 256 "1.5" 257 "2" 260 "Xon / Xoff" - 261 "Sprztowa" + 261 "Sprzętowa" 262 "Brak" - 263 "Wczona" + 263 "Włączona" 264 "Niska" 265 "V.23 (Minitel)" 266 "Standardowy" 267 "Niestandardowy (Bell, HST)" - 270 "Docz do &logw" + 270 "Dołącz do &logów" 300 "Niesprecyzowana" 301 "Dane" 302 "Faks" - 303 "Gos" + 303 "Głos" 304 "Brak" 320 "Ustawienia kraju/regionu zaktualizowane" 340 "Modem" 341 "Ustawienia Modemu" 342 "Numer modemu" 400 "Ustawienia kraju/regionu niezaktualizowane" - 401 "Niektre modemy nie obsuguj waciwie komendy inicjalizacji duszej ni 57 znakw.\n\nInformacje o tym ograniczeniu mog zosta uzyskane od producenta Modemu." - 402 "Ostrzeenie" - 460 "Nie ma do pamici by otworzy okno Modem - Oglne.\nZamknij pliki bd programy i sprbuj ponownie." - 461 "Nie ma do pamici by otworzy okno ustawie Modemu.\nZamknij pliki bd programy i sprbuj ponownie." - 463 "Kady numer musi by ustawione na 'Automatycznie' albo na unikalny.\n\nZmie powtrzony wzorzec sygnau na nieuywany." + 401 "Niektóre modemy nie obsługują właściwie komendy inicjalizacji dłuższej niż 57 znaków.\n\nInformacje o tym ograniczeniu mogą zostaż uzyskane od producenta Modemu." + 402 "Ostrzeżenie" + 460 "Brak wystarczającej pamięci by otworzyć okno Modem - Ogólne.\nZamknij pliki bądź programy i spróbuj ponownie." + 461 "Brak wystarczającej pamięci by otworzyć okno ustawień Modemu.\nZamknij pliki bądź programy i spróbuj ponownie." + 463 "Każdy numer musi być ustawione na 'Automatycznie' albo na unikalny.\n\nZmień powtórzony wzorzec sygnału na nieużywany." 465 "Standardowy EC" 466 "Wymuszony EC" - 467 "Komrkowy" - 468 "Wyczony" - 469 "Wczony" - 470 "Wyczony" + 467 "Komórkowy" + 468 "Wyłączony" + 469 "Włączony" + 470 "Wyłączony" 480 "AUTO (1 Ch.)" 481 "AUTO (2 Ch.)" 482 "PPP (56K)" @@ -338,7 +339,7 @@ BEGIN 558 "Belgijski Krajowy" 559 "Australijski Krajowy" 560 "Nieznany switch" - 570 "Konfiguracja ISDN dla tego Modemu\\NIS nie zostaa ukoczona.\n\nProsz wypeni wszystkie pola w\nzakadce ISDN przed prb uycia modemu." + 570 "Konfiguracja ISDN dla tego Modemu\\NIS nie została ukończona.\n\nProszę wypełnić wszystkie pola w\nzakładce ISDN przed próbą użycia modemu." 600 "PPP (56K,GSM)" 601 "PPP (64K,GSM)" 602 "V.120 (64K,GSM)" @@ -355,61 +356,61 @@ BEGIN 614 "Analogowy RLP" 615 "Analogowy NRLP" 616 "GPRS" - 617 "PIAFS - przychodzce" - 618 "PIAFS - wychodzce" - 700 "Uyj obecnej lokalizacji TAPI" - 2006 "Doczony do" + 617 "PIAFS - przychodzące" + 618 "PIAFS - wychodzące" + 700 "Użyj obecnej lokalizacji TAPI" + 2006 "Dołączony do" 2007 "Nieobecny" 2008 "Nie funkcjonuje" 2009 "Wymaga restartu" - 2010 "#Aby zakoczy konfiguracj modemu, musisz zrestartowa komputer.\n\nCzy chcesz zrestartowa komputer w tej chwili?" - 2011 "Modem nie zosta zainstalowany poprawnie" + 2010 "#Aby zakończyć konfigurację modemu, musisz zrestartować komputer.\n\nCzy chcesz zrestartować komputer w tej chwili?" + 2011 "Modem nie został zainstalowany poprawnie" 2012 "Port nieznany" 3000 "Konfiguracja Modemu" 3018 "Modemy" - 3019 "Instalacja nowego Modemu albo zmiana jego waciwoci." - 3053 "Nie mona wywietli waciwoci Modemu, bo sam Modem nie jest dostpny.\n\nZrestartuj system i sprbuj ponownie." - 3054 "Waciwoci Modemw" - 3060 "Czy na pewno chcesz usun wybrany Modem z twojego systemu??" - 3061 "ReactOS nie mg usun Modemu '%1' z %2." + 3019 "Instalacja nowego Modemu albo zmiana jego właściwości." + 3053 "Nie można wyświetlić właściwości Modemu, bo sam Modem nie jest dostępny.\n\nZrestartuj system i spróbuj ponownie." + 3054 "Właściwości Modemów" + 3060 "Czy na pewno chcesz usunąć wybrany Modem z twojego systemu??" + 3061 "ReactOS nie mógł usunąć Modemu '%1' z %2." 3062 "Modem" - 3069 "Nie ma do pamici by otworzy panel kontrolny Modemu.\n\nZamknij kilka plikw lub programw i sprbuj ponownie." - 3073 "Musisz by Administratorem Systemu by zainstalowa Modem." - 3074 "Brak zainstalowanych Modemw. Musisz by Administratorem Systemu by zainstalowa Modem." - 3076 "Musisz zestartowa swj komputer zanim nowe zmiany zostan wprowadzone.\n\nCzy chcesz zrestartowa komputer w tej chwili?" - 3077 "Zmiana ustawie sieci." - 3200 "300 Baudw" - 3201 "1200 Baudw" - 3202 "2400 Baudw" - 3203 "9600 Baudw" - 3204 "19.2K Baudw" - 3205 "38.4K Baudw" - 3206 "57.6K Baudw" + 3069 "Brak wystarczającej ilości pamięci by otworzyć panel kontrolny Modemu.\n\nZamknij kilka plików lub programów i spróbuj ponownie." + 3073 "Musisz być Administratorem systemu by zainstalować Modem." + 3074 "Brak zainstalowanych Modemów. Musisz być Administratorem systemu by zainstalować Modem." + 3076 "Musisz zestartować swój komputer zanim nowe zmiany zostaną wprowadzone.\n\nCzy chcesz zrestartować komputer w tej chwili?" + 3077 "Zmiana ustawień sieci." + 3200 "300 Baudów" + 3201 "1200 Baudów" + 3202 "2400 Baudów" + 3203 "9600 Baudów" + 3204 "19.2K Baudów" + 3205 "38.4K Baudów" + 3206 "57.6K Baudów" 3207 "Brak odpowiedzi" 3212 "Komenda" - 3213 "Odpowied" - 3214 "Nie udao si otworzy portu, do ktrego podczony jest modem. To moe by efekt konfliktu sprztowego. Sprawd w menederze urzdze czy modem pracuje poprawnie." - 3215 "Port do ktrego podczony jest modem wykorzytuje w tej chwili inna aplikacja. Zamknij j by kontynuowa." + 3213 "Odpowiedź" + 3214 "Nie udało się otworzyć portu, do którego podłączony jest modem. To może być efekt konfliktu sprzętowego. Sprawdź w menedżerze urządzeń czy modem pracuje poprawnie." + 3215 "Port do którego podłączony jest modem wykorzytuje w tej chwili inna aplikacja. Zamknij ją, by kontynuować." 3218 "OpenComm" - 3221 "115K Baudw" + 3221 "115K Baudów" 3222 "Uaktualnianie" - 3223 "Bd" + 3223 "Błąd" 3233 "Powodzenie" - 3236 "Modem nie odpowiedzia. Upewnij si e jest poprawnie podczony i uruchomiony. Jeeli jest poprawnie podczony, albo to modem wewntrzny, sprawd czy dobrze ustawione jest przerwanie." - 3237 "KOMENDA NIEOBSUGIWANA" + 3236 "Modem nie odpowiedział. Upewnij się że jest poprawnie podłączony i uruchomiony. Jeżeli jest poprawnie podłączony, albo to modem wewnętrzny, sprawdź czy dobrze ustawione jest przerwanie." + 3237 "KOMENDA NIEOBSŁUGIWANA" 3238 "Pole" - 3239 "Warto" - 3240 " Ustawienia Domylne" - 3241 " Ustawienia Poczenia" + 3239 "Wartość" + 3240 " Ustawienia Domyślne" + 3241 " Ustawienia Połączenia" 6144 "Japonia" 6145 "Albania" 6146 "Algieria" - 6147 "Amerykaska Samoa" + 6147 "Amerykańska Samoa" 6148 "Niemcy (kod 04)" 6149 "Anguilla" 6150 "Antigua i Barbuda" 6151 "Argentyna" - 6152 "Wyspy Wniebowstpienia" + 6152 "Wyspy Wniebowstąpienia" 6153 "Australia" 6154 "Austria" 6155 "Bahamy" @@ -428,15 +429,15 @@ BEGIN 6168 "Brytyjskie terytorium oceanu Indyjskiego" 6169 "Brytyjskie Wyspy Dziewicze" 6170 "Brunei" - 6171 "Bugaria" + 6171 "Bułgaria" 6172 "Birma" 6173 "Burundi" - 6174 "Biaoru" + 6174 "Białoruś" 6175 "Kamerun" 6176 "Kanada" 6177 "Cape Verde" 6178 "Kajmany" - 6179 "Republika Afryki rodkowej" + 6179 "Republika Afryki Środkowej" 6180 "Czad" 6181 "Chile" 6182 "Chiny" @@ -448,16 +449,16 @@ BEGIN 6188 "Kuba" 6189 "Cypr" 6190 "Czechy" - 6191 "Kamboda" - 6192 "Korea Pnocna" + 6191 "Kambodża" + 6192 "Korea Północna" 6193 "Dania" - 6194 "Dibuti" + 6194 "Dżibuti" 6195 "Republika Domikinany" 6196 "Dominikana" 6197 "Ekwador" 6198 "Egipt" 6199 "San Salwador" - 6200 "Gwinea Rwnikowa" + 6200 "Gwinea Równikowa" 6201 "Etiopia" 6202 "Falklandy" 6203 "Wyspy Fiji" @@ -482,7 +483,7 @@ BEGIN 6222 "Haiti" 6223 "Honduras" 6224 "Hong Kong" - 6225 "Wgry" + 6225 "Węgry" 6226 "Islandia" 6227 "Indie" 6228 "Indonezja" @@ -490,8 +491,8 @@ BEGIN 6230 "Irak" 6231 "Irlandia" 6232 "Izrael" - 6233 "Wochy" - 6234 "Wybrzee Koci Soniowej" + 6233 "Włochy" + 6234 "Wybrzeże Kości Słoniowej" 6235 "Jamajka" 6236 "Afganistan" 6237 "Wyspa Jersey" @@ -547,12 +548,12 @@ BEGIN 6287 "Rwanda" 6288 "Wyspy St. Kitts i Nevis" 6289 "Kod kraju/regionu (145)" - 6290 "Wyspy w. Heleny" + 6290 "Wyspy Św. Heleny" 6291 "Wyspy St. Lucia" 6292 "San Marino" 6293 "Kod kraju/regionu (148)" 6294 "Sao Tome" - 6295 "Wyspy w. Wincenta" + 6295 "Wyspy Św. Wincenta" 6296 "Arabia Saudyjska" 6297 "Senegal" 6298 "Seszele" @@ -598,23 +599,23 @@ BEGIN 6338 "Kongo (DRk)" 6339 "Zambia" 6340 "Zimbabwe" - 6501 "Modawia" + 6501 "Mołdawia" 6502 "Estonia" 6503 "Litwa" 6504 "Armenia" 6505 "Gruzja" - 6506 "Azerbejdan" + 6506 "Azerbejdżan" 6507 "Turkmenistan" 6508 "Uzbekistan" 6509 "Kazachstan" - 6510 "Tadykistan" + 6510 "Tadżykistan" 6511 "Kirgyzstan" - 6512 "otwa" + 6512 "Łotwa" 6513 "Rosja" 6600 "Chorwacja" - 6601 "Sowenia" + 6601 "Słowenia" 6602 "Macedonia" 6603 "Bosnia and Hercegovina" - 6604 "Jugosawia" - 20013 "ID Sprztu" + 6604 "Jugosławia" + 20013 "ID Sprzętu" END diff --git a/dll/win32/modemui/lang/ro-RO.rc b/dll/win32/modemui/lang/ro-RO.rc index 8860e4c7f02..9dbbc243b1d 100644 --- a/dll/win32/modemui/lang/ro-RO.rc +++ b/dll/win32/modemui/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDM_MENU MENU BEGIN POPUP "" @@ -613,5 +611,3 @@ BEGIN 6604 "Iugoslavia" 20013 "ID dispozitiv" END - -#pragma code_page(default) diff --git a/dll/win32/modemui/lang/ru-RU.rc b/dll/win32/modemui/lang/ru-RU.rc index 7f10ed9de9c..2e2f37fe794 100644 --- a/dll/win32/modemui/lang/ru-RU.rc +++ b/dll/win32/modemui/lang/ru-RU.rc @@ -4,162 +4,162 @@ IDM_MENU MENU BEGIN POPUP "" BEGIN - MENUITEM "&...", 0 - MENUITEM "&", 1 - MENUITEM "& ", 2 + MENUITEM "&Дублировать...", 0 + MENUITEM "&Удалить", 1 + MENUITEM "&Просмотр журнала", 2 MENUITEM SEPARATOR - MENUITEM "&", 3 - MENUITEM "& ", 4 - MENUITEM "& ", 5 + MENUITEM "Сво&йства", 3 + MENUITEM "&Копировать свойства", 4 + MENUITEM "При&менить свойства", 5 END END IDD_ADVANCED DIALOGEX 17, 12, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1018, 6, 6, 225, 70 - LTEXT "& :", 1011, 16, 20, 143, 8 + GROUPBOX "Дополнительные параметры", 1018, 6, 6, 225, 70 + LTEXT "Д&ополнительные команды инициализации:", 1011, 16, 20, 143, 8 EDITTEXT 1016, 16, 31, 205, 13, ES_AUTOHSCROLL - LTEXT "& :", 1007, 16, 55, 109, 8, NOT WS_VISIBLE + LTEXT "&Ждать сигнала для телефонной карточки:", 1007, 16, 55, 109, 8, NOT WS_VISIBLE EDITTEXT 1008, 133, 52, 26, 12, ES_RIGHT | NOT WS_VISIBLE | WS_GROUP CONTROL "", 1009, "MSCTLS_UPDOWN32", NOT WS_VISIBLE | WS_BORDER | WS_GROUP | 0x00000036, 159, 52, 12, 12 - LTEXT ".", 1010, 173, 54, 40, 8, NOT WS_VISIBLE - GROUPBOX "& ", 1012, 6, 80, 225, 75 + LTEXT "сек.", 1010, 173, 54, 40, 8, NOT WS_VISIBLE + GROUPBOX "&Выбор страны или региона", 1012, 6, 80, 225, 75 COMBOBOX 1013, 18, 99, 203, 50, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "& ...", 1100, 107, 170, 125, 14 - DEFPUSHBUTTON "& ...", 3, 107, 188, 125, 14 + PUSHBUTTON "&Дополнительные параметры...", 1100, 107, 170, 125, 14 + DEFPUSHBUTTON "&Изменить умолчания...", 3, 107, 188, 125, 14 END IDD_GENERAL DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ":", 1018, 9, 8, 32, 10 - LTEXT " ", 1095, 48, 8, 181, 10 - GROUPBOX "& ", 1029, 10, 21, 218, 48 + LTEXT "Порт:", 1018, 9, 8, 32, 10 + LTEXT "Последовательный порт", 1095, 48, 8, 181, 10 + GROUPBOX "&Громкость динамика", 1029, 10, 21, 218, 48 CONTROL "", 1032, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000001, 84, 40, 66, 20 - RTEXT ".", 1045, 56, 40, 22, 8 - LTEXT "", 1001, 155, 40, 25, 11 - GROUPBOX "& ", 1031, 10, 78, 218, 46 + RTEXT "Выкл.", 1045, 56, 40, 22, 8 + LTEXT "Выше", 1001, 155, 40, 25, 11 + GROUPBOX "&Скорость порта для модема", 1031, 10, 78, 218, 46 COMBOBOX 1036, 18, 100, 202, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1060, 10, 133, 218, 51 - AUTOCHECKBOX "& "" """, 1003, 27, 157, 174, 10 + GROUPBOX "Управление набором номера", 1060, 10, 133, 218, 51 + AUTOCHECKBOX "&Дождаться сигнала ""Линия свободна""", 1003, 27, 157, 174, 10 END IDD_DISTINCTIVE_RING DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Различение звонков" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", 1068, 10, 7, 218, 145 - AUTOCHECKBOX "& ", 1069, 20, 7, 184, 10 - CTEXT " ", -1, 84, 21, 70, 8 - CTEXT " ", -1, 159, 21, 63, 8 - LTEXT "& :", 1070, 20, 41, 62, 8 + AUTOCHECKBOX "&Использовать службы различения звонков", 1069, 20, 7, 184, 10 + CTEXT "Вид звонка", -1, 84, 21, 70, 8 + CTEXT "Тип вызова", -1, 159, 21, 63, 8 + LTEXT "&Основной адрес:", 1070, 20, 41, 62, 8 COMBOBOX 1073, 84, 37, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1082, 160, 37, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &1:", 1071, 20, 59, 62, 8 + LTEXT "Адрес &1:", 1071, 20, 59, 62, 8 COMBOBOX 1074, 84, 55, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1083, 160, 55, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &2:", 1072, 20, 77, 62, 8 + LTEXT "Адрес &2:", 1072, 20, 77, 62, 8 COMBOBOX 1075, 84, 73, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1084, 160, 73, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &3:", 1076, 20, 95, 62, 8 + LTEXT "Адрес &3:", 1076, 20, 95, 62, 8 COMBOBOX 1077, 84, 91, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1085, 160, 91, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1078, 20, 112, 62, 8 + LTEXT "&Приоритетные вызовы:", 1078, 20, 112, 62, 8 COMBOBOX 1079, 84, 109, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1086, 160, 109, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1080, 20, 131, 62, 8 + LTEXT "О&тветный вызов:", 1080, 20, 131, 62, 8 COMBOBOX 1081, 84, 127, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1087, 160, 127, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END IDD_DISTINCTIVE_RING_2 DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Различение звонков" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", 1068, 10, 7, 218, 87 - AUTOCHECKBOX "& ", 1069, 19, 7, 177, 10 - CTEXT " ", -1, 20, 21, 74, 8 - CTEXT " ", -1, 96, 21, 65, 8 - LTEXT "& :", 1088, 20, 37, 53, 8 + AUTOCHECKBOX "&Использовать службы различения звонков", 1069, 19, 7, 177, 10 + CTEXT "Вид звонка", -1, 20, 21, 74, 8 + CTEXT "Тип вызова", -1, 96, 21, 65, 8 + LTEXT "&Одиночный звонок:", 1088, 20, 37, 53, 8 COMBOBOX 1091, 96, 37, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1089, 20, 57, 53, 8 + LTEXT "&Двойной звонок:", 1089, 20, 57, 53, 8 COMBOBOX 1092, 96, 55, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1090, 20, 76, 53, 8 + LTEXT "&Тройной звонок:", 1090, 20, 76, 53, 8 COMBOBOX 1093, 96, 73, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END IDD_DIAGNOSTICS DIALOGEX 0, 0, 238, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Диагностика" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", 1042, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000084D, 19, 18, 200, 58 CONTROL "", 1041, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000084D, 19, 84, 200, 58 - PUSHBUTTON "& ", 1096, 138, 149, 75, 14 - AUTOCHECKBOX " &", 1020, 18, 187, 98, 10 - PUSHBUTTON "& ", 1094, 138, 184, 75, 14, WS_DISABLED - GROUPBOX " ", 1047, 10, 6, 217, 164 - GROUPBOX " ", -1, 10, 173, 217, 32 + PUSHBUTTON "Опро&сить модем", 1096, 138, 149, 75, 14 + AUTOCHECKBOX "Вести &журнал", 1020, 18, 187, 98, 10 + PUSHBUTTON "&Просмотр журнала", 1094, 138, 184, 75, 14, WS_DISABLED + GROUPBOX "Сведения о модеме", 1047, 10, 6, 217, 164 + GROUPBOX "Ведение журнала", -1, 10, 173, 217, 32 END IDD_PLEASE_WAIT DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION ", ..." +CAPTION "Пожалуйста, подождите..." FONT 8, "MS Shell Dlg" BEGIN ICON 5100, -1, 9, 7, 20, 20 - LTEXT " . .", -1, 42, 7, 146, 28 - DEFPUSHBUTTON "", 2, 72, 52, 50, 14 + LTEXT "Идет обмен данными с модемом. Это может занять несколько секунд.", -1, 42, 7, 146, 28 + DEFPUSHBUTTON "Отмена", 2, 72, 52, 50, 14 END IDD_GENERAL_2 DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 1002, 19, 22, 180, 10 - AUTOCHECKBOX "& ", 1042, 19, 38, 143, 10 + AUTOCHECKBOX "&Ручной или полуавтоматический набор номера", 1002, 19, 22, 180, 10 + AUTOCHECKBOX "Откл&ючение при простое более", 1042, 19, 38, 143, 10 EDITTEXT 1043, 168, 35, 25, 13, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "& ", -1, 19, 56, 147, 10 + LTEXT "О&тмена вызова при отсутствии связи", -1, 19, 56, 147, 10 EDITTEXT 1040, 168, 54, 25, 13, ES_AUTOHSCROLL | ES_NUMBER - RTEXT "& :", 1034, 16, 102, 93, 8 + RTEXT "&Скорость порта:", 1034, 16, 102, 93, 8 COMBOBOX 1036, 114, 100, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1032, 16, 122, 93, 8 + RTEXT "&Протокол:", 1032, 16, 122, 93, 8 COMBOBOX 1037, 114, 119, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1035, 16, 139, 93, 8 + RTEXT "С&жатие:", 1035, 16, 139, 93, 8 COMBOBOX 1099, 114, 137, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "& :", 1027, 16, 157, 93, 8 + RTEXT "&Управление потоком:", 1027, 16, 157, 93, 8 COMBOBOX 1031, 114, 155, 84, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1060, 11, 7, 217, 66 - LTEXT ".", 1044, 195, 38, 22, 8 - LTEXT ".", 1041, 195, 56, 22, 8 - GROUPBOX " ", -1, 11, 82, 217, 94 + GROUPBOX "Параметры вызова", 1060, 11, 7, 217, 66 + LTEXT "мин.", 1044, 195, 38, 22, 8 + LTEXT "сек.", 1041, 195, 56, 22, 8 + GROUPBOX "Параметры подключения линии данных", -1, 11, 82, 217, 94 END IDD_ADVANCED_2 DIALOGEX 17, 12, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX " & ", 1000, 20, 21, 200, 10 - AUTOCHECKBOX " & ", 1001, 20, 38, 200, 10 - RTEXT "& :", 1024, 18, 79, 93, 8 + AUTOCHECKBOX "Открыть окно терминала &до набора номера", 1000, 20, 21, 200, 10 + AUTOCHECKBOX "Открыть окно терминала &после набора номера", 1001, 20, 38, 200, 10 + RTEXT "&Биты данных:", 1024, 18, 79, 93, 8 COMBOBOX 1025, 114, 77, 106, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1026, 18, 97, 93, 8 + RTEXT "&Четность:", 1026, 18, 97, 93, 8 COMBOBOX 1028, 114, 95, 106, 60, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "& :", 1029, 18, 115, 93, 8 + RTEXT "С&топовые биты:", 1029, 18, 115, 93, 8 COMBOBOX 1030, 114, 113, 106, 45, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1045, 18, 133, 93, 8 + RTEXT "&Модуляция:", 1045, 18, 133, 93, 8 COMBOBOX 1038, 114, 131, 106, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1004, 10, 7, 217, 49 - GROUPBOX " ", 1005, 10, 64, 217, 89 + GROUPBOX "Окно терминала", 1004, 10, 7, 217, 49 + GROUPBOX "Параметры настройки оборудования", 1005, 10, 64, 217, 89 END IDD_ISDN DIALOGEX 0, 0, 238, 210 @@ -167,13 +167,13 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "ISDN" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "& ", -1, 11, 6, 217, 39 + GROUPBOX "&Тип коммутатора", -1, 11, 6, 217, 39 COMBOBOX 1104, 17, 20, 204, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX "& ", -1, 11, 50, 217, 50 + GROUPBOX "&Первый номер", -1, 11, 50, 217, 50 EDITTEXT 1017, 33, 62, 188, 13, ES_AUTOHSCROLL | ES_NUMBER LTEXT "S&PID/EAZ:", 1027, 34, 83, 67, 8 EDITTEXT 1107, 104, 79, 117, 13, ES_AUTOHSCROLL | ES_NUMBER - GROUPBOX "& ", -1, 11, 105, 217, 49 + GROUPBOX "&Второй номер", -1, 11, 105, 217, 49 EDITTEXT 1018, 33, 114, 189, 13, ES_AUTOHSCROLL | ES_NUMBER LTEXT "SPI&D/EAZ:", 1028, 35, 135, 68, 8 EDITTEXT 1108, 105, 132, 117, 13, ES_AUTOHSCROLL | ES_NUMBER @@ -181,58 +181,58 @@ END IDD_PLEASE_WAIT_2 DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION ", " +CAPTION "Пожалуйста, подождите" FONT 8, "MS Shell Dlg" BEGIN ICON 5100, -1, 9, 7, 20, 20 - LTEXT " .", -1, 42, 7, 146, 28 + LTEXT "Отправка на модем сведений о стране или регионе.", -1, 42, 7, 146, 28 END IDD_WARNING DIALOGEX 0, 0, 360, 105 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Предупреждение" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX " ", 1109, 17, 73, 175, 10 + AUTOCHECKBOX "Не выводить это сообщение в дальнейшем", 1109, 17, 73, 175, 10 DEFPUSHBUTTON "OK", 1, 302, 84, 50, 14 - LTEXT " .", -1, 50, 27, 304, 8 - LTEXT " .", -1, 50, 41, 304, 8 + LTEXT "Некоторые модемы не умеют обрабатывать столь длинные строки инициализации.", -1, 50, 27, 304, 8 + LTEXT "Сведения об ограничениях вашего модема можно получить у изготовителя.", -1, 50, 41, 304, 8 ICON 5100, -1, 15, 14, 20, 20 - LTEXT " 57 .", -1, 50, 14, 304, 8 + LTEXT "Введенная строка инициализации модема длиннее 57 знаков.", -1, 50, 14, 304, 8 END IDD_MODEMS DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Модемы" FONT 8, "MS Shell Dlg" BEGIN ICON 5100, 1057, 6, 7, 20, 20 - LTEXT " &:", -1, 44, 12, 203, 9 + LTEXT "На компьютере установлены следующие мод&емы:", -1, 44, 12, 203, 9 CONTROL "", 113, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00000849, 7, 32, 238, 158, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 110, 56, 198, 60, 14 - PUSHBUTTON "&", 112, 121, 198, 60, 14 - PUSHBUTTON "&", 109, 185, 198, 60, 14 + PUSHBUTTON "&Добавить...", 110, 56, 198, 60, 14 + PUSHBUTTON "&Удалить", 112, 121, 198, 60, 14 + PUSHBUTTON "Сво&йства", 109, 185, 198, 60, 14 END IDD_PLEASE_WAIT_3 DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION ", ..." +CAPTION "Пожалуйста, подождите..." FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", 2, 74, 53, 50, 14 + DEFPUSHBUTTON "О&становить", 2, 74, 53, 50, 14 ICON 5100, -1, 9, 7, 20, 20 - LTEXT "", -1, 40, 8, 151, 8 - LTEXT "", 1005, 40, 16, 151, 25 + LTEXT "Удаление", -1, 40, 8, 151, 8 + LTEXT "Модем", 1005, 40, 16, 151, 25 END STRINGTABLE BEGIN - 180 " RS-232" - 181 " " - 182 " " - 183 " PCMCIA" - 184 " " - 185 " " + 180 "Последовательный порт RS-232" + 181 "Внешний модем" + 182 "Внутренний модем" + 183 "Модем PCMCIA" + 184 "Параллельный модем" + 185 "Параллельный порт" 200 "110" 201 "1200" 202 "2400" @@ -251,46 +251,46 @@ BEGIN 242 "6" 243 "7" 244 "8" - 250 "" - 251 "" - 252 " " - 253 " (1)" - 254 " (0)" + 250 "Чет" + 251 "Нечет" + 252 "Не проверяется" + 253 "Маркер (1)" + 254 "Пробел (0)" 255 "1" 256 "1,5" 257 "2" 260 "Xon/Xoff" - 261 "" - 262 "" - 263 "." - 264 "" + 261 "Аппаратное" + 262 "Отсутствует" + 263 "Вкл." + 264 "Ниже" 265 "V.23 (Minitel)" - 266 "" - 267 " (Bell, HST)" - 270 "& " - 300 " " - 301 "" - 302 "" - 303 "" - 304 "" - 320 " " - 340 "" - 341 " " - 342 " " - 400 " " - 401 " , 57 .\n\n ." - 402 "" - 460 " .\n ." - 461 " .\n ." - 463 " '' .\n\n ." - 465 " EC" - 466 " EC" - 467 "" - 468 "" - 469 "" - 470 "" - 480 " (1 .)" - 481 " (2 .)" + 266 "Стандартная" + 267 "Нестандартная (Bell, HST)" + 270 "Д&обавить в журнал" + 300 "Не определен" + 301 "Данные" + 302 "Факс" + 303 "Речь" + 304 "Нет" + 320 "Параметры страны или региона обновлены" + 340 "Модем" + 341 "Параметры модема" + 342 "Адрес модема" + 400 "Параметры страны или региона не обновлены" + 401 "Некоторые модемы не принимают команды инициализации, если строка команды длиннее 57 символов.\n\nСведения об ограничениях для вашего модема можно получить у изготовителя." + 402 "Предупреждение" + 460 "Недостаточно памяти для просмотра общих свойств.\nЗакройте часть программ и файлов и повторите попытку." + 461 "Недостаточно памяти для просмотра параметров модема.\nЗакройте часть программ и файлов и повторите попытку." + 463 "Каждый адрес вызова должен быть 'Автоматическим' или иметь уникальный вид звонка.\n\nИзмените повторяющийся вид звонка на другое значение." + 465 "Стандартный EC" + 466 "Форсированный EC" + 467 "Сотовый" + 468 "Отключен" + 469 "Включено" + 470 "Отключено" + 480 "АВТО (1 кан.)" + 481 "АВТО (2 кан.)" 482 "PPP (56K)" 483 "PPP (64K)" 484 "PPP (112K)" @@ -319,19 +319,19 @@ BEGIN 515 "V.110 (28.8K)" 516 "V.110 (38.4K)" 517 "V.110 (57.6K)" - 518 " (V.34/V.90)" - 550 "ESS5 (AT&T) ( )" - 551 " & - " + 518 "Аналоговый (V.34/V.90)" + 550 "ESS5 (AT&T) (Северная Америка)" + 551 "АТТ т&очка - многие точки" 552 "National ISDN 1 (NI-1)" 553 "Northern Telecom DMS 100 (NT1)" - 554 "NTT INS64 ()" - 555 "European ISDN (DSS1) ()" - 556 "German National (1TR6) ( )" - 557 "French National (VN3) ( )" - 558 "Belgium National ( )" - 559 "Australian National ( )" - 560 " " - 570 " ISDN \n .\n\n \nISDN ." + 554 "NTT INS64 (Япония)" + 555 "European ISDN (DSS1) (Европа)" + 556 "German National (1TR6) (редко используемый)" + 557 "French National (VN3) (редко используемый)" + 558 "Belgium National (редко используемый)" + 559 "Australian National (редко используемый)" + 560 "Неизвестный коммутатор" + 570 "Настройка ISDN для этого модема\n не завершена.\n\nЗаполните сведения на вкладке\nISDN перед использованием модема." 600 "PPP (56K,GSM)" 601 "PPP (64K,GSM)" 602 "V.120 (64K,GSM)" @@ -345,269 +345,269 @@ BEGIN 611 "V.110 (28.8K,GSM)" 612 "V.110 (38.4K,GSM)" 613 "V.110 (57.6K,GSM)" - 614 " RLP" - 615 " NRLP" + 614 "Аналоговый RLP" + 615 "Аналоговый NRLP" 616 "GPRS" - 617 "PIAFS - " - 618 "PIAFS - " - 700 " TAPI" - 2006 " " - 2007 "" - 2008 " " - 2009 " " - 2010 "# .\n\n ?" - 2011 " " - 2012 " " - 3000 " " - 3018 "" - 3019 " ." - 3053 " , .\n\n ." - 3054 ": " - 3060 " ?" - 3061 " '%1' ( %2)." - 3062 "" - 3069 " .\n\n ." - 3073 " ." - 3074 " . ." - 3076 " .\n\n ?" - 3077 " " - 3200 "300 " - 3201 "1200 " - 3202 "2400 " - 3203 "9600 " - 3204 "19,2K " - 3205 "38,4K " - 3206 "57,6K " - 3207 " " - 3212 "" - 3213 "" - 3214 " , . . , ." - 3215 ", . , ." + 617 "PIAFS - входящий" + 618 "PIAFS - исходящий" + 700 "Использовать текущее местоположения из TAPI" + 2006 "Подключен к" + 2007 "Отсутствует" + 2008 "Не работает" + 2009 "Требуется перезагрузка" + 2010 "#Для завершения установки модема требуется перезагрузить компьютер.\n\nПерезагрузить компьютер прямо сейчас?" + 2011 "Модем установлен неправильно" + 2012 "Неизвестный порт" + 3000 "Установка модема" + 3018 "Модемы" + 3019 "Установка нового модема и изменение его параметров." + 3053 "Отображение свойств модема невозможно, так как модем недоступен.\n\nПерезагрузите систему и повторите попытку." + 3054 "Свойства: Модемы" + 3060 "Удалить выбранные модемы из системы?" + 3061 "Не удалось удалить модем '%1' из системы (порт %2)." + 3062 "Модем" + 3069 "Недостаточно памяти для открытия программы настройки модемов панели управления.\n\nЗакройте ненужные программы и повторите попытку." + 3073 "Установка модемов разрешена только системным администраторам." + 3074 "Ни одного модема не установлено. Установка модемов разрешена только системным администраторам." + 3076 "Внесенные изменения вступят в силу только после перезагрузки компьютера.\n\nВыполнить перезагрузку сейчас?" + 3077 "Изменение параметров сети" + 3200 "300 бод" + 3201 "1200 бод" + 3202 "2400 бод" + 3203 "9600 бод" + 3204 "19,2K бод" + 3205 "38,4K бод" + 3206 "57,6K бод" + 3207 "Нет ответа" + 3212 "Команда" + 3213 "Ответ" + 3214 "Не удалось открыть порт, к которому подключен модем. Это может быть результатом конфликта оборудования. Проверьте с помощью диспетчера устройств, что все устройства работают нормально." + 3215 "Порт, используемый модемом в данный момент открыт другим приложением. Закройте все приложения, которые могут использовать этот порт." 3218 "OpenComm" - 3221 "115K " - 3222 "" - 3223 "" - 3233 "" - 3236 " . , . , , , ." - 3237 " " - 3238 "" - 3239 "" - 3240 " " - 3241 " " - 6144 "" - 6145 "" - 6146 "" - 6147 " " - 6148 " ( 04)" - 6149 "" - 6150 " " - 6151 "" - 6152 ". " - 6153 "" - 6154 "" - 6155 "" - 6156 "" - 6157 "" - 6158 "" - 6159 "" - 6160 "" - 6161 "" - 6162 " -" - 6163 "" - 6164 "" - 6165 "" - 6166 "" - 6167 " (23)" - 6168 " " - 6169 " -" - 6170 "" - 6171 "" - 6172 "" - 6173 "" - 6174 "" - 6175 "" - 6176 "" - 6177 "- " - 6178 " -" - 6179 "- " - 6180 "" - 6181 "" - 6182 "" - 6183 "" - 6184 " -" - 6185 "" - 6186 "- " - 6187 "-" - 6188 "" - 6189 "" - 6190 " " - 6191 "" - 6192 " - " - 6193 "" - 6194 "" - 6195 " " - 6196 "" - 6197 "" - 6198 "" - 6199 "" - 6200 " " - 6201 "" - 6202 " () -" - 6203 "- " - 6204 "" - 6205 "" - 6206 " " - 6207 " (63)" - 6208 "" - 6209 "" - 6210 " ( 66)" - 6211 "" - 6212 "" - 6213 "" - 6214 "" - 6215 "" - 6216 ". " - 6217 "" - 6218 "" - 6219 "" - 6220 "-" - 6221 "" - 6222 "" - 6223 "" - 6224 " (SAR) " - 6225 "" - 6226 "" - 6227 "" - 6228 "" - 6229 "" - 6230 "" - 6231 "" - 6232 "" - 6233 "" - 6234 " ' ( )" - 6235 "" - 6236 "" - 6237 "" - 6238 "" - 6239 "" - 6240 "" - 6241 " " - 6242 "" - 6243 "" - 6244 "" - 6245 "" - 6246 "" - 6247 "" - 6248 "" - 6249 "" - 6250 "" - 6251 "" - 6252 "" - 6253 "" - 6254 " -" - 6255 "" - 6256 "" - 6257 "" - 6258 "" - 6259 "" - 6260 "" - 6261 "" - 6262 "" - 6263 "" - 6264 "" - 6265 "" - 6266 "" - 6267 "" - 6268 " -" - 6269 " " - 6270 " " - 6271 "" - 6272 "" - 6273 "" - 6274 "" - 6275 "" - 6276 "" - 6277 "" - 6278 " - " - 6279 "" - 6280 "" - 6281 "" - 6282 "" - 6283 "" - 6284 "-" - 6285 "" - 6286 "" - 6287 "" - 6288 "- " - 6289 " (145)" - 6290 ". " - 6291 "-" - 6292 "-" - 6293 " (148)" - 6294 "- " - 6295 "- " - 6296 " " - 6297 "" - 6298 " -" - 6299 "-" - 6300 "" - 6301 " -" - 6302 "" - 6303 " " - 6304 "" - 6305 "-" - 6306 "" - 6307 "" - 6308 "" - 6309 "" - 6310 "" - 6311 "" - 6312 "" - 6313 "" - 6314 "" - 6315 "" - 6316 " " - 6317 "" - 6318 "" - 6319 "- " - 6320 "" - 6321 "" - 6322 "" - 6323 " " - 6324 "" - 6325 "" - 6326 "-" - 6327 "" - 6328 " (184)" - 6329 "" - 6330 "" - 6331 "" - 6332 "" - 6333 " " - 6334 "" - 6335 "" - 6336 "" - 6337 " (193)" - 6338 " " - 6339 "" - 6340 "" - 6501 "" - 6502 "" - 6503 "" - 6504 "" - 6505 "" - 6506 "" - 6507 "" - 6508 "" - 6509 "" - 6510 "" - 6511 "" - 6512 "" - 6513 "" - 6600 "" - 6601 "" - 6602 "" - 6603 " " - 6604 "" - 20013 "ID " + 3221 "115K бод" + 3222 "Обновление" + 3223 "Ошибка" + 3233 "Успешно" + 3236 "Этот модем не отвечает. Проверьте, что он правильно подключен и питание включено. Если это внутренний модем, или если он подключен правильно, проверьте, что для порта выбрано правильное прерывание." + 3237 "КОМАНДА НЕ ПОДДЕРЖИВАЕТСЯ" + 3238 "Поле" + 3239 "Значение" + 3240 " Предпочтения по умолчанию" + 3241 " Предпочтения подключения" + 6144 "Япония" + 6145 "Албания" + 6146 "Алжир" + 6147 "Американские Самоа" + 6148 "Германия (код страны или региона 04)" + 6149 "Ангилья" + 6150 "Антигуа и Барбуда" + 6151 "Аргентина" + 6152 "о. Вознесения" + 6153 "Австралия" + 6154 "Австрия" + 6155 "Багамы" + 6156 "Бахрейн" + 6157 "Бангладеш" + 6158 "Барбадос" + 6159 "Бельгия" + 6160 "Белиз" + 6161 "Бенин" + 6162 "Бермудские о-ва" + 6163 "Бутан" + 6164 "Боливия" + 6165 "Ботсвана" + 6166 "Бразилия" + 6167 "Код страны или региона (23)" + 6168 "Британская территория Индийского океана" + 6169 "Британские Виргинские о-ва" + 6170 "Бруней" + 6171 "Болгария" + 6172 "Мьянма" + 6173 "Бурунди" + 6174 "Беларусь" + 6175 "Камерун" + 6176 "Канада" + 6177 "о-ва Зеленого Мыса" + 6178 "Каймановы о-ва" + 6179 "Центрально-Африканская Республика" + 6180 "Чад" + 6181 "Чили" + 6182 "Китай" + 6183 "Колумбия" + 6184 "Коморские о-ва" + 6185 "Конго" + 6186 "о-ва Кука" + 6187 "Коста-Рика" + 6188 "Куба" + 6189 "Кипр" + 6190 "Чешская республика" + 6191 "Камбоджа" + 6192 "Корейская народно-демократическая республика" + 6193 "Дания" + 6194 "Джибути" + 6195 "Доминиканская Республика" + 6196 "Доминика" + 6197 "Эквадор" + 6198 "Египет" + 6199 "Сальвадор" + 6200 "Экваториальная Гвинея" + 6201 "Эфиопия" + 6202 "Фолклендские (Мальвинские) о-ва" + 6203 "о-ва Фиджи" + 6204 "Финляндия" + 6205 "Франция" + 6206 "Французская Полинезия" + 6207 "Код страны или региона (63)" + 6208 "Габон" + 6209 "Гамбия" + 6210 "Германия или региона (код страны 66)" + 6211 "Ангола" + 6212 "Гана" + 6213 "Гибралтар" + 6214 "Греция" + 6215 "Гренада" + 6216 "о. Гуам" + 6217 "Гватемала" + 6218 "Гернси" + 6219 "Гвинея" + 6220 "Гвинея-Бисау" + 6221 "Гайана" + 6222 "Гаити" + 6223 "Гондурас" + 6224 "Гонконг (SAR) " + 6225 "Венгрия" + 6226 "Исландия" + 6227 "Индия" + 6228 "Индонезия" + 6229 "Иран" + 6230 "Ирак" + 6231 "Ирландия" + 6232 "Израиль" + 6233 "Италия" + 6234 "Кот д'Ивуар (Берег Слоновой Кости)" + 6235 "Ямайка" + 6236 "Афганистан" + 6237 "Джерси" + 6238 "Иордания" + 6239 "Кения" + 6240 "Кирибати" + 6241 "Южная Корея" + 6242 "Кувейт" + 6243 "Лаос" + 6244 "Ливан" + 6245 "Лесото" + 6246 "Либерия" + 6247 "Ливия" + 6248 "Лихтенштейн" + 6249 "Люксембург" + 6250 "Макао" + 6251 "Мадагаскар" + 6252 "Малайзия" + 6253 "Малави" + 6254 "Мальдивские о-ва" + 6255 "Мали" + 6256 "Мальта" + 6257 "Мавритания" + 6258 "Маврикий" + 6259 "Мексика" + 6260 "Монако" + 6261 "Монголия" + 6262 "Монсеррат" + 6263 "Марокко" + 6264 "Мозамбик" + 6265 "Науру" + 6266 "Непал" + 6267 "Нидерланды" + 6268 "Нидерландские Антильские о-ва" + 6269 "Новая Каледония" + 6270 "Новая Зеландия" + 6271 "Никарагуа" + 6272 "Нигер" + 6273 "Нигерия" + 6274 "Норвегия" + 6275 "Оман" + 6276 "Пакистан" + 6277 "Панама" + 6278 "Папуа - Новая Гвинея" + 6279 "Парагвай" + 6280 "Перу" + 6281 "Филиппины" + 6282 "Польша" + 6283 "Португалия" + 6284 "Пуэрто-Рико" + 6285 "Катар" + 6286 "Румыния" + 6287 "Руанда" + 6288 "Сент-Китс и Невис" + 6289 "Код страны или региона (145)" + 6290 "о. Святой Елены" + 6291 "Санта-Лусия" + 6292 "Сан-Марино" + 6293 "Код страны или региона (148)" + 6294 "Сан-Томе и Принсипи" + 6295 "Сен-Винсент и Гренадины" + 6296 "Саудовская Аравия" + 6297 "Сенегал" + 6298 "Сейшельские о-ва" + 6299 "Сьерра-Леоне" + 6300 "Сингапур" + 6301 "Соломоновы о-ва" + 6302 "Сомали" + 6303 "Южная Африка" + 6304 "Испания" + 6305 "Шри-Ланка" + 6306 "Судан" + 6307 "Суринам" + 6308 "Свазиленд" + 6309 "Швеция" + 6310 "Швейцария" + 6311 "Сирия" + 6312 "Танзания" + 6313 "Таиланд" + 6314 "Того" + 6315 "Тонга" + 6316 "Тринидад и Тобаго" + 6317 "Тунис" + 6318 "Турция" + 6319 "о-ва Туркс и Кайкос" + 6320 "Тувалу" + 6321 "Уганда" + 6322 "Украина" + 6323 "Объединенные Арабские Эмираты" + 6324 "Великобритания" + 6325 "США" + 6326 "Буркина-Фасо" + 6327 "Уругвай" + 6328 "Код страны или региона (184)" + 6329 "Вануату" + 6330 "Ватикан" + 6331 "Венесуэла" + 6332 "Вьетнам" + 6333 "Уоллис и Футуна" + 6334 "Самоа" + 6335 "Йемен" + 6336 "Йемен" + 6337 "Код страны или региона (193)" + 6338 "Демократическая Республика Конго" + 6339 "Замбия" + 6340 "Зимбабве" + 6501 "Молдова" + 6502 "Эстония" + 6503 "Литва" + 6504 "Армения" + 6505 "Грузия" + 6506 "Азербайджан" + 6507 "Туркменистан" + 6508 "Узбекистан" + 6509 "Казахстан" + 6510 "Таджикистан" + 6511 "Киргизстан" + 6512 "Латвия" + 6513 "Россия" + 6600 "Хорватия" + 6601 "Словения" + 6602 "Македония" + 6603 "Босния и Герцеговина" + 6604 "Югославия" + 20013 "ID оборудования" END diff --git a/dll/win32/modemui/lang/uk-UA.rc b/dll/win32/modemui/lang/uk-UA.rc index 0308df73a40..efb6ae84505 100644 --- a/dll/win32/modemui/lang/uk-UA.rc +++ b/dll/win32/modemui/lang/uk-UA.rc @@ -12,162 +12,162 @@ IDM_MENU MENU BEGIN POPUP "" BEGIN - MENUITEM "&...", 0 - MENUITEM "&", 1 - MENUITEM " &", 2 + MENUITEM "Дубл&ювати...", 0 + MENUITEM "В&идалити", 1 + MENUITEM "Перегляд &журналу", 2 MENUITEM SEPARATOR - MENUITEM "&", 3 - MENUITEM "& ", 4 - MENUITEM "& ", 5 + MENUITEM "В&ластивості", 3 + MENUITEM "&Копіювати властивості", 4 + MENUITEM "&Застосувати властивості", 5 END END IDD_ADVANCED DIALOGEX 17, 12, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1018, 6, 6, 225, 70 - LTEXT "& :", 1011, 16, 20, 143, 8 + GROUPBOX "Додаткові параметри", 1018, 6, 6, 225, 70 + LTEXT "Додат&кові команди ініціалізації:", 1011, 16, 20, 143, 8 EDITTEXT 1016, 16, 31, 205, 13, ES_AUTOHSCROLL - LTEXT "& :", 1007, 16, 55, 109, 8, NOT WS_VISIBLE + LTEXT "&Чекати на сигнал для телефонної картки:", 1007, 16, 55, 109, 8, NOT WS_VISIBLE EDITTEXT 1008, 133, 52, 26, 12, ES_RIGHT | NOT WS_VISIBLE | WS_GROUP CONTROL "", 1009, "MSCTLS_UPDOWN32", NOT WS_VISIBLE | WS_BORDER | WS_GROUP | 0x00000036, 159, 52, 12, 12 - LTEXT "", 1010, 173, 54, 40, 8, NOT WS_VISIBLE - GROUPBOX "& ", 1012, 6, 80, 225, 75 + LTEXT "сек", 1010, 173, 54, 40, 8, NOT WS_VISIBLE + GROUPBOX "&Вибір країни або регіону", 1012, 6, 80, 225, 75 COMBOBOX 1013, 18, 99, 203, 50, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "& ...", 1100, 107, 170, 125, 14 - DEFPUSHBUTTON "& ...", 3, 107, 188, 125, 14 + PUSHBUTTON "&Додаткові параметри...", 1100, 107, 170, 125, 14 + DEFPUSHBUTTON "&Змінити замовчування...", 3, 107, 188, 125, 14 END IDD_GENERAL DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ":", 1018, 9, 8, 32, 10 - LTEXT " ", 1095, 48, 8, 181, 10 - GROUPBOX "& ", 1029, 10, 21, 218, 48 + LTEXT "Порт:", 1018, 9, 8, 32, 10 + LTEXT "Послідовний порт", 1095, 48, 8, 181, 10 + GROUPBOX "&Гучність динаміка", 1029, 10, 21, 218, 48 CONTROL "", 1032, "MSCTLS_TRACKBAR32", WS_GROUP | WS_TABSTOP | 0x00000001, 84, 40, 66, 20 - RTEXT ".", 1045, 56, 40, 22, 8 - LTEXT "", 1001, 155, 40, 25, 11 - GROUPBOX "& ", 1031, 10, 78, 218, 46 + RTEXT "Вимк.", 1045, 56, 40, 22, 8 + LTEXT "Вище", 1001, 155, 40, 25, 11 + GROUPBOX "&Швидкість порту для модема", 1031, 10, 78, 218, 46 COMBOBOX 1036, 18, 100, 202, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1060, 10, 133, 218, 51 - AUTOCHECKBOX "& ", 1003, 27, 157, 174, 10 + GROUPBOX "Керування набором номера", 1060, 10, 133, 218, 51 + AUTOCHECKBOX "&Чекати на гудок", 1003, 27, 157, 174, 10 END IDD_DISTINCTIVE_RING DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Розрізнення дзвінків" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", 1068, 10, 7, 218, 145 - AUTOCHECKBOX "& ", 1069, 20, 7, 184, 10 - CTEXT " ", -1, 84, 21, 70, 8 - CTEXT " ", -1, 159, 21, 63, 8 - LTEXT " &:", 1070, 20, 41, 62, 8 + AUTOCHECKBOX "В&икористовувати служби розрізнення дзвінків", 1069, 20, 7, 184, 10 + CTEXT "Вид дзвінка", -1, 84, 21, 70, 8 + CTEXT "Тип виклику", -1, 159, 21, 63, 8 + LTEXT "Основна адр&еса:", 1070, 20, 41, 62, 8 COMBOBOX 1073, 84, 37, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1082, 160, 37, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &1:", 1071, 20, 59, 62, 8 + LTEXT "Адреса &1:", 1071, 20, 59, 62, 8 COMBOBOX 1074, 84, 55, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1083, 160, 55, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &2:", 1072, 20, 77, 62, 8 + LTEXT "Адреса &2:", 1072, 20, 77, 62, 8 COMBOBOX 1075, 84, 73, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1084, 160, 73, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &3:", 1076, 20, 95, 62, 8 + LTEXT "Адреса &3:", 1076, 20, 95, 62, 8 COMBOBOX 1077, 84, 91, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1085, 160, 91, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1078, 20, 112, 62, 8 + LTEXT "&Пріоритетні виклики:", 1078, 20, 112, 62, 8 COMBOBOX 1079, 84, 109, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1086, 160, 109, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "&³ :", 1080, 20, 131, 62, 8 + LTEXT "&Відповідний виклик:", 1080, 20, 131, 62, 8 COMBOBOX 1081, 84, 127, 71, 61, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | NOT WS_TABSTOP COMBOBOX 1087, 160, 127, 62, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END IDD_DISTINCTIVE_RING_2 DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Розрізнення дзвінків" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "", 1068, 10, 7, 218, 87 - AUTOCHECKBOX "& ", 1069, 19, 7, 177, 10 - CTEXT " ", -1, 20, 21, 74, 8 - CTEXT " ", -1, 96, 21, 65, 8 - LTEXT " &:", 1088, 20, 37, 53, 8 + AUTOCHECKBOX "В&икористовувати служби розрізнення дзвінків", 1069, 19, 7, 177, 10 + CTEXT "Вид дзвінка", -1, 20, 21, 74, 8 + CTEXT "Тип виклику", -1, 96, 21, 65, 8 + LTEXT "Один дзвіно&к:", 1088, 20, 37, 53, 8 COMBOBOX 1091, 96, 37, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1089, 20, 57, 53, 8 + LTEXT "По&двійний дзвінок:", 1089, 20, 57, 53, 8 COMBOBOX 1092, 96, 55, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1090, 20, 76, 53, 8 + LTEXT "По&трійний дзвінок:", 1090, 20, 76, 53, 8 COMBOBOX 1093, 96, 73, 65, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP END IDD_DIAGNOSTICS DIALOGEX 0, 0, 238, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "ij" +CAPTION "Діагностика" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", 1042, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000084D, 19, 18, 200, 58 CONTROL "", 1041, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000084D, 19, 84, 200, 58 - PUSHBUTTON " &", 1096, 138, 149, 75, 14 - AUTOCHECKBOX "& ", 1020, 18, 187, 98, 10 - PUSHBUTTON " &", 1094, 138, 184, 75, 14, WS_DISABLED - GROUPBOX "³ ", 1047, 10, 6, 217, 164 - GROUPBOX " ", -1, 10, 173, 217, 32 + PUSHBUTTON "Опитати &модем", 1096, 138, 149, 75, 14 + AUTOCHECKBOX "&Вести журнал", 1020, 18, 187, 98, 10 + PUSHBUTTON "Перегляд &журналу", 1094, 138, 184, 75, 14, WS_DISABLED + GROUPBOX "Відомості про модем", 1047, 10, 6, 217, 164 + GROUPBOX "Ведення журналу", -1, 10, 173, 217, 32 END IDD_PLEASE_WAIT DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "..." +CAPTION "Зачекайте..." FONT 8, "MS Shell Dlg" BEGIN ICON 5100, -1, 9, 7, 20, 20 - LTEXT " ' . .", -1, 42, 7, 146, 28 - DEFPUSHBUTTON "", 2, 72, 52, 50, 14 + LTEXT "Триває зв'язок із модемом. Це може забрати декілька секунд.", -1, 42, 7, 146, 28 + DEFPUSHBUTTON "Скасувати", 2, 72, 52, 50, 14 END IDD_GENERAL_2 DIALOGEX 0, 0, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 1002, 19, 22, 150, 10 - AUTOCHECKBOX "³& ", 1042, 19, 38, 143, 10 + AUTOCHECKBOX "&Ручний або полуавтоматичний набір номера", 1002, 19, 22, 150, 10 + AUTOCHECKBOX "Відкл&ючення при простої більше", 1042, 19, 38, 143, 10 EDITTEXT 1043, 168, 35, 25, 13, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "& ", -1, 19, 56, 147, 10 + LTEXT "Скасува&ти виклик за відсутності відповіді протягом", -1, 19, 56, 147, 10 EDITTEXT 1040, 168, 54, 25, 13, ES_AUTOHSCROLL | ES_NUMBER - RTEXT "& :", 1034, 16, 102, 93, 8 + RTEXT "&Швидкість порту:", 1034, 16, 102, 93, 8 COMBOBOX 1036, 114, 100, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1032, 16, 122, 93, 8 + RTEXT "&Протокол:", 1032, 16, 122, 93, 8 COMBOBOX 1037, 114, 119, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1035, 16, 139, 93, 8 + RTEXT "&Стискання:", 1035, 16, 139, 93, 8 COMBOBOX 1099, 114, 137, 84, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "& :", 1027, 16, 157, 93, 8 + RTEXT "&Керування потоком:", 1027, 16, 157, 93, 8 COMBOBOX 1031, 114, 155, 84, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1060, 11, 7, 217, 66 - LTEXT "", 1044, 195, 38, 22, 8 - LTEXT "", 1041, 194, 56, 22, 8 - GROUPBOX " ", -1, 11, 82, 217, 94 + GROUPBOX "Параметри виклику", 1060, 11, 7, 217, 66 + LTEXT "хв", 1044, 195, 38, 22, 8 + LTEXT "сек", 1041, 194, 56, 22, 8 + GROUPBOX "Параметри підключення лінії даних", -1, 11, 82, 217, 94 END IDD_ADVANCED_2 DIALOGEX 17, 12, 238, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "&³ ", 1000, 20, 21, 200, 10 - AUTOCHECKBOX "& ", 1001, 20, 38, 200, 10 - RTEXT "& :", 1024, 18, 79, 93, 8 + AUTOCHECKBOX "&Відкрити вікно термінала до набору номера", 1000, 20, 21, 200, 10 + AUTOCHECKBOX "В&ідкрити вікно термінала після набору номера", 1001, 20, 38, 200, 10 + RTEXT "&Біти даних:", 1024, 18, 79, 93, 8 COMBOBOX 1025, 114, 77, 106, 61, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1026, 18, 97, 93, 8 + RTEXT "&Парність:", 1026, 18, 97, 93, 8 COMBOBOX 1028, 114, 95, 106, 60, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "& :", 1029, 18, 115, 93, 8 + RTEXT "С&топові біти:", 1029, 18, 115, 93, 8 COMBOBOX 1030, 114, 113, 106, 45, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - RTEXT "&:", 1045, 18, 133, 93, 8 + RTEXT "&Модулювання:", 1045, 18, 133, 93, 8 COMBOBOX 1038, 114, 131, 106, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX "³ ", 1004, 10, 7, 217, 49 - GROUPBOX " ", 1005, 10, 64, 217, 89 + GROUPBOX "Вікно термінала", 1004, 10, 7, 217, 49 + GROUPBOX "Параметри настройки устаткування", 1005, 10, 64, 217, 89 END IDD_ISDN DIALOGEX 0, 0, 238, 210 @@ -175,13 +175,13 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "ISDN" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "& ", -1, 11, 6, 217, 39 + GROUPBOX "&Тип комутатора", -1, 11, 6, 217, 39 COMBOBOX 1104, 17, 20, 204, 69, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX "& ", -1, 11, 50, 217, 50 + GROUPBOX "&Перший номер", -1, 11, 50, 217, 50 EDITTEXT 1017, 33, 62, 188, 13, ES_AUTOHSCROLL | ES_NUMBER LTEXT "S&PID/EAZ:", 1027, 34, 83, 67, 8 EDITTEXT 1107, 104, 79, 117, 13, ES_AUTOHSCROLL | ES_NUMBER - GROUPBOX "& ", -1, 11, 105, 217, 49 + GROUPBOX "&Другий номер", -1, 11, 105, 217, 49 EDITTEXT 1018, 33, 114, 189, 13, ES_AUTOHSCROLL | ES_NUMBER LTEXT "SPI&D/EAZ:", 1028, 35, 135, 68, 8 EDITTEXT 1108, 105, 132, 117, 13, ES_AUTOHSCROLL | ES_NUMBER @@ -189,58 +189,58 @@ END IDD_PLEASE_WAIT_2 DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Зачекайте" FONT 8, "MS Shell Dlg" BEGIN ICON 5100, -1, 9, 7, 20, 20 - LTEXT " / .", -1, 42, 7, 146, 28 + LTEXT "Надсилання відомостей про країну/регіон на модем.", -1, 42, 7, 146, 28 END IDD_WARNING DIALOGEX 0, 0, 360, 105 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Попередження" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX " ", 1109, 17, 73, 118, 10 + AUTOCHECKBOX "Більше не показувати це повідомлення", 1109, 17, 73, 118, 10 DEFPUSHBUTTON "OK", 1, 302, 84, 50, 14 - LTEXT " .", -1, 50, 27, 304, 8 - LTEXT "³ .", -1, 50, 41, 304, 8 + LTEXT "Деякі модеми неправильно обробляють такі довгі рядки ініціалізації.", -1, 50, 27, 304, 8 + LTEXT "Відомості про це обмеження можна отримати від виробника вашого модема.", -1, 50, 41, 304, 8 ICON 5100, -1, 15, 14, 20, 20 - LTEXT " , 57 .", -1, 50, 14, 304, 8 + LTEXT "Введено рядок ініціалізації модема, довший за 57 знаків.", -1, 50, 14, 304, 8 END IDD_MODEMS DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Модеми" FONT 8, "MS Shell Dlg" BEGIN ICON 5100, 1057, 6, 7, 20, 20 - LTEXT "& ' :", -1, 44, 12, 203, 9 + LTEXT "&На комп'ютері установлено такі модеми:", -1, 44, 12, 203, 9 CONTROL "", 113, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00000849, 7, 32, 238, 158, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 110, 56, 198, 60, 14 - PUSHBUTTON "&", 112, 121, 198, 60, 14 - PUSHBUTTON "&", 109, 185, 198, 60, 14 + PUSHBUTTON "&Додати...", 110, 56, 198, 60, 14 + PUSHBUTTON "В&идалити", 112, 121, 198, 60, 14 + PUSHBUTTON "Влас&тивості", 109, 185, 198, 60, 14 END IDD_PLEASE_WAIT_3 DIALOGEX 0, 0, 195, 72 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "..." +CAPTION "Зачекайте..." FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", 2, 74, 53, 50, 14 + DEFPUSHBUTTON "&Зупинити", 2, 74, 53, 50, 14 ICON 5100, -1, 9, 7, 20, 20 - LTEXT "", -1, 40, 8, 151, 8 - LTEXT "", 1005, 40, 16, 151, 25 + LTEXT "Видалення", -1, 40, 8, 151, 8 + LTEXT "Модем", 1005, 40, 16, 151, 25 END STRINGTABLE BEGIN - 180 " RS-232" - 181 " " - 182 " " - 183 " PCMCIA" - 184 " " - 185 " " + 180 "Послідовний порт RS-232" + 181 "Зовнішній модем" + 182 "Внутрішній модем" + 183 "Модем PCMCIA" + 184 "Паралельний модем" + 185 "Паралельний порт" 200 "110" 201 "1200" 202 "2400" @@ -259,46 +259,46 @@ BEGIN 242 "6" 243 "7" 244 "8" - 250 "" - 251 "" - 252 " " - 253 " (1)" - 254 " (0)" + 250 "Парна" + 251 "Непарна" + 252 "Без перевірки" + 253 "Маркер (1)" + 254 "Пробіл (0)" 255 "1" 256 "1,5" 257 "2" 260 "Xon/Xoff" - 261 "" - 262 "" - 263 "." - 264 "" + 261 "Апаратне" + 262 "Немає" + 263 "Увімк." + 264 "Нижче" 265 "V.23 (Minitel)" - 266 "" - 267 " (Bell, HST)" - 270 "& " - 300 " " - 301 "" - 302 "" - 303 "" - 304 "" - 320 " " - 340 "" - 341 " " - 342 " " - 400 " " - 401 " , 57 .\n\n³ " - 402 "" - 460 " ' .\n ." - 461 " ' .\n ." - 463 " """" .\n\n ." - 465 " EC" - 466 " EC" - 467 "" - 468 "" - 469 "" - 470 "" - 480 " (1 .)" - 481 " (2 .)" + 266 "Стандартна" + 267 "Нестандартна (Bell, HST)" + 270 "Д&одати до журналу" + 300 "Немає даних" + 301 "Дані" + 302 "Факс" + 303 "Голос" + 304 "Немає" + 320 "Параметри країни або регіону оновлено" + 340 "Модем" + 341 "Параметри модема" + 342 "Адреса модема" + 400 "Параметри країни або регіону не оновлено" + 401 "Деякі модеми не сприймають команд ініціалізації, якщо рядок команди довший за 57 знаків.\n\nВідомості про такі обмеження можна отримати від виробника вашого модема" + 402 "Попередження" + 460 "Недостатньо пам'яті для показу діалогового вікна загальних властивостей.\nЗакрийте декілька файлів або програм і повторіть спробу." + 461 "Недостатньо пам'яті для показу діалогового вікна параметрів модема.\nЗакрийте декілька файлів або програм і повторіть спробу." + 463 "Кожна адреса виклику має бути ""Автоматичною"" або мати унікальний вид дзвінка.\n\nЗмініть повторюваний вид дзвінка на інший." + 465 "Стандартний EC" + 466 "Форсований EC" + 467 "Мобільний" + 468 "Вимкнено" + 469 "Увімкнуто" + 470 "Вимкнено" + 480 "АВТО (1 кан.)" + 481 "АВТО (2 кан.)" 482 "PPP (56K)" 483 "PPP (64K)" 484 "PPP (112K)" @@ -327,19 +327,19 @@ BEGIN 515 "V.110 (28.8K)" 516 "V.110 (38.4K)" 517 "V.110 (57.6K)" - 518 " (V.34/V.90)" - 550 "ESS5 (AT&T) (ϳ )" - 551 " & - " + 518 "Аналоговий (V.34/V.90)" + 550 "ESS5 (AT&T) (Північна Америка)" + 551 "АТТ т&очка - декілька точок" 552 "National ISDN 1 (NI-1)" 553 "Northern Telecom DMS 100 (NT1)" - 554 "NTT INS64 ()" - 555 "European ISDN (DSS1) ()" - 556 "German National (1TR6) ( )" - 557 "French National (VN3) ( )" - 558 "Belgium National ( )" - 559 "Australian National ( )" - 560 " " - 570 " ISDN \n .\n\n \nISDN ." + 554 "NTT INS64 (Японія)" + 555 "European ISDN (DSS1) (Европа)" + 556 "German National (1TR6) (рідко використовується)" + 557 "French National (VN3) (рідко використовується)" + 558 "Belgium National (рідко використовується)" + 559 "Australian National (рідко використовується)" + 560 "Невідомий комутатор" + 570 "Настройку ISDN для цього модема\nне закінчено.\n\nЗаповніть відомості на вкладці\nISDN перед використанням цього модема." 600 "PPP (56K,GSM)" 601 "PPP (64K,GSM)" 602 "V.120 (64K,GSM)" @@ -353,269 +353,269 @@ BEGIN 611 "V.110 (28.8K,GSM)" 612 "V.110 (38.4K,GSM)" 613 "V.110 (57.6K,GSM)" - 614 " RLP" - 615 " NRLP" + 614 "Аналоговий RLP" + 615 "Аналоговий NRLP" 616 "GPRS" - 617 "PIAFS - " - 618 "PIAFS - " - 700 " TAPI" - 2006 "ϳ " - 2007 "" - 2008 " " - 2009 " " - 2010 "# , '.\n\n ' ?" - 2011 " " - 2012 " " - 3000 " " - 3018 "" - 3019 " ." - 3053 " , .\n\n ." - 3054 ": " - 3060 " ?" - 3061 " ""%1"" %2." - 3062 "" - 3069 " ', .\n\n ." - 3073 " ." - 3074 " . ." - 3076 " , '.\n\n ' ?" - 3077 " " - 3200 "300 " - 3201 "1200 " - 3202 "2400 " - 3203 "9600 " - 3204 "19,2K " - 3205 "38,4K " - 3206 "57,6K " - 3207 " " - 3212 "" - 3213 "³" - 3214 " , . . ." - 3215 ", , . , ." + 617 "PIAFS - вхідний" + 618 "PIAFS - вихідний" + 700 "Використовувати поточне розташування з TAPI" + 2006 "Підключений до" + 2007 "Немає" + 2008 "Не працює" + 2009 "Потрібне перезавантаження" + 2010 "#Щоб закінчити установку модема, слід перезапустити комп'ютер.\n\nПерезапустити комп'ютер зараз?" + 2011 "Модем установлено неправильно" + 2012 "Невідомий порт" + 3000 "Установка модема" + 3018 "Модеми" + 3019 "Установка нового модема та зміна його параметрів." + 3053 "Властивості модема неможливо показати, оскільки модем недоступний.\n\nПерезавантажте систему та повторіть спробу." + 3054 "Властивості: Модеми" + 3060 "Ви дійсно бажаєте видалити вибрані модеми із системи?" + 3061 "Не вдалося видалити модем ""%1"" із порту %2." + 3062 "Модем" + 3069 "Недостатньо пам'яті, щоб відкрити панель керування модемів.\n\nЗакрийте декілька програм і повторіть спробу." + 3073 "Установлювати модеми дозволено лише системним адміністраторам." + 3074 "Не установлено жодного модема. Установлювати модеми дозволено лише системним адміністраторам." + 3076 "Щоб нові параметри набрали сили, слід перезапустити комп'ютер.\n\nПерезапустити комп'ютер зараз?" + 3077 "Зміна параметрів мережі" + 3200 "300 бод" + 3201 "1200 бод" + 3202 "2400 бод" + 3203 "9600 бод" + 3204 "19,2K бод" + 3205 "38,4K бод" + 3206 "57,6K бод" + 3207 "Немає відповіді" + 3212 "Команда" + 3213 "Відповідь" + 3214 "Неможливо відкрити порт, до якого підключено модем. Це може бути викликано конфліктом устаткування. За допомогою диспетчера пристроїв перевірте роботоздатність всіх пристроїв." + 3215 "Порт, який використовується модемом, зараз відкритий іншим додатком. Закрийте всі програми, які можуть використовувати цей порт." 3218 "OpenComm" - 3221 "115K " - 3222 "" - 3223 "" - 3233 "" - 3236 " . , . , , ." - 3237 " ϲӪ" - 3238 "" - 3239 "" - 3240 " " - 3241 " " - 6144 "" - 6145 "" - 6146 "" - 6147 " " - 6148 "ͳ ( 04)" - 6149 "" - 6150 " " - 6151 "" - 6152 ". " - 6153 "" - 6154 "" - 6155 " -" - 6156 "" - 6157 "" - 6158 "" - 6159 "" - 6160 "" - 6161 "" - 6162 " -" - 6163 "" - 6164 "" - 6165 "" - 6166 "" - 6167 " (23)" - 6168 " " - 6169 "³ - ()" - 6170 "" - 6171 "" - 6172 "'" - 6173 "" - 6174 "" - 6175 "" - 6176 "" - 6177 "-" - 6178 " -" - 6179 " " - 6180 "" - 6181 "" - 6182 "" - 6183 "" - 6184 " -" - 6185 "" - 6186 "- " - 6187 "-г" - 6188 "" - 6189 "ʳ" - 6190 "" - 6191 "" - 6192 "ϳ " - 6193 "" - 6194 "" - 6195 " " - 6196 "" - 6197 "" - 6198 "" - 6199 "" - 6200 " " - 6201 "" - 6202 " () -" - 6203 "- Գ" - 6204 "Գ" - 6205 "" - 6206 " ()" - 6207 " (63)" - 6208 "" - 6209 "" - 6210 "ͳ ( 66)" - 6211 "" - 6212 "" - 6213 "ó" - 6214 "" - 6215 "" - 6216 "" - 6217 "" - 6218 "" - 6219 "" - 6220 "-" - 6221 "" - 6222 "" - 6223 "" - 6224 " ()" - 6225 "" - 6226 "" - 6227 "" - 6228 "" - 6229 "" - 6230 "" - 6231 "" - 6232 "" - 6233 "" - 6234 "-'" - 6235 "" - 6236 "" - 6237 "" - 6238 "" - 6239 "" - 6240 "ʳ" - 6241 "" - 6242 "" - 6243 "" - 6244 "˳" - 6245 "" - 6246 "˳" - 6247 "˳" - 6248 "˳" - 6249 "" - 6250 " ()" - 6251 "" - 6252 "" - 6253 "" - 6254 "" - 6255 "" - 6256 "" - 6257 "" - 6258 "" - 6259 "" - 6260 "" - 6261 "" - 6262 "" - 6263 "" - 6264 "" - 6265 "" - 6266 "" - 6267 "ͳ" - 6268 " - (ͳ)" - 6269 " " - 6270 " " - 6271 "ͳ" - 6272 "ͳ" - 6273 "ͳ" - 6274 "" - 6275 "" - 6276 "" - 6277 "" - 6278 "- " - 6279 "" - 6280 "" - 6281 "Գ" - 6282 "" - 6283 "" - 6284 "-" - 6285 "" - 6286 "" - 6287 "" - 6288 "-ʳ " - 6289 " (145)" - 6290 ". " - 6291 "-" - 6292 "-" - 6293 " (148)" - 6294 "- " - 6295 "-³ " - 6296 " " - 6297 "" - 6298 " -" - 6299 "-" - 6300 "ѳ" - 6301 " -" - 6302 "" - 6303 "ϳ- " - 6304 "" - 6305 "-" - 6306 "" - 6307 "" - 6308 "" - 6309 "" - 6310 "" - 6311 "" - 6312 "" - 6313 "" - 6314 "" - 6315 "" - 6316 " " - 6317 "" - 6318 "" - 6319 "- " - 6320 "" - 6321 "" - 6322 "" - 6323 "' " - 6324 "" - 6325 " " - 6326 "-" - 6327 "" - 6328 " (184)" - 6329 "" - 6330 "" - 6331 "" - 6332 "'" - 6333 "- " - 6334 "" - 6335 "" - 6336 "" - 6337 " (193)" - 6338 " ()" - 6339 "" - 6340 "dz" - 6501 "" - 6502 "" - 6503 "" - 6504 "³" - 6505 "" - 6506 "" - 6507 "" - 6508 "" - 6509 "" - 6510 "" - 6511 "" - 6512 "" - 6513 "" - 6600 "" - 6601 "" - 6602 ", " - 6603 " " - 6604 "" - 20013 " " + 3221 "115K бод" + 3222 "Оновлення" + 3223 "Помилка" + 3233 "Успішно" + 3236 "Модем не відповідає. Переконайтеся, що його належним чином підключено та ввімкнуто. Якщо це вбудований модем або він підключений правильно, перевірте, чи правильно переривання для порту." + 3237 "КОМАНДА НЕ ПІДТРИМУЄТЬСЯ" + 3238 "Поле" + 3239 "Значення" + 3240 " Переваги за замовчуванням" + 3241 " Переваги підключення" + 6144 "Японія" + 6145 "Албанія" + 6146 "Алжир" + 6147 "Східне Самоа" + 6148 "Німеччина (код країни або регіону 04)" + 6149 "Ангілья" + 6150 "Антигуа і Барбуда" + 6151 "Аргентина" + 6152 "о. Вознесіння" + 6153 "Австралія" + 6154 "Австрія" + 6155 "Багамські о-ви" + 6156 "Бахрейн" + 6157 "Бангладеш" + 6158 "Барбадос" + 6159 "Бельгія" + 6160 "Беліз" + 6161 "Бенін" + 6162 "Бермудські о-ви" + 6163 "Бутан" + 6164 "Болівія" + 6165 "Ботсвана" + 6166 "Бразилія" + 6167 "Код країни або регіону (23)" + 6168 "Британські території в Індійському океані" + 6169 "Віргінські о-ви (Британські)" + 6170 "Бруней" + 6171 "Болгарія" + 6172 "М'янма" + 6173 "Бурунді" + 6174 "Білорусь" + 6175 "Камерун" + 6176 "Канада" + 6177 "Кабо-Верде" + 6178 "Кайманові о-ви" + 6179 "Центральноафриканська Республіка" + 6180 "Чад" + 6181 "Чилі" + 6182 "Китай" + 6183 "Колумбія" + 6184 "Коморські о-ви" + 6185 "Конго" + 6186 "о-ви Кука" + 6187 "Коста-Ріка" + 6188 "Куба" + 6189 "Кіпр" + 6190 "Чехія" + 6191 "Камбоджа" + 6192 "Північна Корея" + 6193 "Данія" + 6194 "Джибуті" + 6195 "Домініканська Республіка" + 6196 "Домініка" + 6197 "Еквадор" + 6198 "Єгипет" + 6199 "Сальвадор" + 6200 "Екваторіальна Гвінея" + 6201 "Ефіопія" + 6202 "Фолклендські (Мальвінські) о-ви" + 6203 "о-ви Фіджі" + 6204 "Фінляндія" + 6205 "Франція" + 6206 "Полінезія (Французька)" + 6207 "Код країни або регіону (63)" + 6208 "Габон" + 6209 "Гамбія" + 6210 "Німеччина (код країни або регіону 66)" + 6211 "Ангола" + 6212 "Гана" + 6213 "Гібралтар" + 6214 "Греція" + 6215 "Гренада" + 6216 "Гуам" + 6217 "Гватемала" + 6218 "Гернсі" + 6219 "Гвінея" + 6220 "Гвінея-Бісау" + 6221 "Гайана" + 6222 "Гаїті" + 6223 "Гондурас" + 6224 "Гонконг (ОАР)" + 6225 "Угорщина" + 6226 "Ісландія" + 6227 "Індія" + 6228 "Індонезія" + 6229 "Іран" + 6230 "Ірак" + 6231 "Ірландія" + 6232 "Ізраїль" + 6233 "Італія" + 6234 "Кот-д'Івуар" + 6235 "Ямайка" + 6236 "Афганістан" + 6237 "Джерсі" + 6238 "Йорданія" + 6239 "Кенія" + 6240 "Кірібаті" + 6241 "Корея" + 6242 "Кувейт" + 6243 "Лаос" + 6244 "Ліван" + 6245 "Лесото" + 6246 "Ліберія" + 6247 "Лівія" + 6248 "Ліхтенштейн" + 6249 "Люксембург" + 6250 "Аоминь (ОАР)" + 6251 "Мадагаскар" + 6252 "Малайзія" + 6253 "Малаві" + 6254 "Мальдиви" + 6255 "Малі" + 6256 "Мальта" + 6257 "Мавританія" + 6258 "Маврикій" + 6259 "Мексика" + 6260 "Монако" + 6261 "Монголія" + 6262 "Монтсеррат" + 6263 "Марокко" + 6264 "Мозамбік" + 6265 "Науру" + 6266 "Непал" + 6267 "Нідерланди" + 6268 "Антильські о-ви (Нідерландські)" + 6269 "Нова Каледонія" + 6270 "Нова Зеландія" + 6271 "Нікарагуа" + 6272 "Нігер" + 6273 "Нігерія" + 6274 "Норвегія" + 6275 "Оман" + 6276 "Пакистан" + 6277 "Панама" + 6278 "Папуа-Нова Гвінея" + 6279 "Парагвай" + 6280 "Перу" + 6281 "Філіппіни" + 6282 "Польща" + 6283 "Португалія" + 6284 "Пуерто-Рико" + 6285 "Катар" + 6286 "Румунія" + 6287 "Руанда" + 6288 "Сент-Кітс і Невіс" + 6289 "Код країни або регіону (145)" + 6290 "о. Святої Єлени" + 6291 "Сент-Люсія" + 6292 "Сан-Марино" + 6293 "Код країни або регіону (148)" + 6294 "Сан-Томе і Прінсіпі" + 6295 "Сент-Вінсент і Гренадини" + 6296 "Саудівська Аравія" + 6297 "Сенегал" + 6298 "Сейшельські о-ви" + 6299 "Сьєрра-Леоне" + 6300 "Сінгапур" + 6301 "Соломонові о-ви" + 6302 "Сомалі" + 6303 "Південно-Африканська Республіка" + 6304 "Іспанія" + 6305 "Шрі-Ланка" + 6306 "Судан" + 6307 "Суринам" + 6308 "Свазіленд" + 6309 "Швеція" + 6310 "Швейцарія" + 6311 "Сирія" + 6312 "Танзанія" + 6313 "Таїланд" + 6314 "Того" + 6315 "Тонга" + 6316 "Тринідад і Тобаго" + 6317 "Туніс" + 6318 "Туреччина" + 6319 "о-ви Теркс і Кайкос" + 6320 "Тувалу" + 6321 "Уганда" + 6322 "Україна" + 6323 "Об'єднані Арабські Емірати" + 6324 "Великобританія" + 6325 "Сполучені Штати Америки" + 6326 "Буркіна-Фасо" + 6327 "Уругвай" + 6328 "Код країни або регіону (184)" + 6329 "Вануату" + 6330 "Ватикан" + 6331 "Венесуела" + 6332 "В'єтнам" + 6333 "о-ви Волліс і Футуна" + 6334 "Самоа" + 6335 "Ємен" + 6336 "Ємен" + 6337 "Код країни або регіону (193)" + 6338 "Конго (ДРК)" + 6339 "Замбія" + 6340 "Зімбабве" + 6501 "Молдавія" + 6502 "Естонія" + 6503 "Литва" + 6504 "Вірменія" + 6505 "Грузія" + 6506 "Азербайджан" + 6507 "Туркменістан" + 6508 "Узбекистан" + 6509 "Казахстан" + 6510 "Таджикистан" + 6511 "Киргизія" + 6512 "Латвія" + 6513 "Росія" + 6600 "Хорватія" + 6601 "Словенія" + 6602 "Македонія, Колишня Югославська Республіка" + 6603 "Боснія і Герцеговина" + 6604 "Югославія" + 20013 "Код устаткування" END diff --git a/dll/win32/modemui/modemui.rc b/dll/win32/modemui/modemui.rc index c9b2b34e3d0..7128220084c 100644 --- a/dll/win32/modemui/modemui.rc +++ b/dll/win32/modemui/modemui.rc @@ -17,6 +17,9 @@ IDI_703 ICON "res/703.ico" #include "lang/en-US.rc" #include "lang/es-ES.rc" #include "lang/no-NO.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" diff --git a/dll/win32/msacm32/CMakeLists.txt b/dll/win32/msacm32/CMakeLists.txt index c163adb51a2..8eb85ac3eb1 100644 --- a/dll/win32/msacm32/CMakeLists.txt +++ b/dll/win32/msacm32/CMakeLists.txt @@ -1,7 +1,6 @@ set_unicode() -add_definitions(-D_DLL -D__USE_CRTIMP) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) set_rc_compiler() diff --git a/dll/win32/msadp32.acm/CMakeLists.txt b/dll/win32/msadp32.acm/CMakeLists.txt index 1c73fd654b1..6a2f55874c3 100644 --- a/dll/win32/msadp32.acm/CMakeLists.txt +++ b/dll/win32/msadp32.acm/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D_DLL -D__USE_CRTIMP - -D__WINESRC__) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(msadp32.acm msadp32.acm.spec) diff --git a/dll/win32/msafd/CMakeLists.txt b/dll/win32/msafd/CMakeLists.txt index 7b87ac897a2..30b0544dc5b 100644 --- a/dll/win32/msafd/CMakeLists.txt +++ b/dll/win32/msafd/CMakeLists.txt @@ -16,13 +16,10 @@ list(APPEND SOURCE misc/stubs.c ${CMAKE_CURRENT_BINARY_DIR}/msafd.def) -add_library(msafd SHARED - ${CMAKE_CURRENT_BINARY_DIR}/msafd_msafd.h.gch - ${SOURCE}) +add_library(msafd SHARED ${SOURCE}) set_module_type(msafd win32dll) -add_pch(msafd ${CMAKE_CURRENT_SOURCE_DIR}/msafd.h ${SOURCE}) - add_importlibs(msafd advapi32 msvcrt kernel32 ntdll) +add_pch(msafd msafd.h) add_cd_file(TARGET msafd DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/msafd/misc/dllmain.c b/dll/win32/msafd/misc/dllmain.c index 7ce6976967a..4fa46d728c0 100644 --- a/dll/win32/msafd/misc/dllmain.c +++ b/dll/win32/msafd/misc/dllmain.c @@ -264,7 +264,7 @@ WSPSocket(int AddressFamily, /* Save Group Info */ if (g != 0) { - GetSocketInformation(Socket, AFD_INFO_GROUP_ID_TYPE, 0, &GroupData); + GetSocketInformation(Socket, AFD_INFO_GROUP_ID_TYPE, NULL, NULL, &GroupData); Socket->SharedData.GroupID = GroupData.u.LowPart; Socket->SharedData.GroupType = GroupData.u.HighPart; } @@ -272,11 +272,13 @@ WSPSocket(int AddressFamily, /* Get Window Sizes and Save them */ GetSocketInformation (Socket, AFD_INFO_SEND_WINDOW_SIZE, + NULL, &Socket->SharedData.SizeOfSendBuffer, NULL); GetSocketInformation (Socket, AFD_INFO_RECEIVE_WINDOW_SIZE, + NULL, &Socket->SharedData.SizeOfRecvBuffer, NULL); @@ -467,6 +469,7 @@ WSPCloseSocket(IN SOCKET Handle, /* Find out how many Sends are in Progress */ if (GetSocketInformation(Socket, AFD_INFO_SENDS_IN_PROGRESS, + NULL, &SendsInProgress, NULL)) { @@ -514,24 +517,28 @@ WSPCloseSocket(IN SOCKET Handle, { DisconnectInfo.Timeout = RtlConvertLongToLargeInteger(0); DisconnectInfo.DisconnectType = LingerWait < 0 ? AFD_DISCONNECT_SEND : AFD_DISCONNECT_ABORT; - - /* Send IOCTL */ - Status = NtDeviceIoControlFile((HANDLE)Handle, - SockEvent, - NULL, - NULL, - &IoStatusBlock, - IOCTL_AFD_DISCONNECT, - &DisconnectInfo, - sizeof(DisconnectInfo), - NULL, - 0); - - /* Wait for return */ - if (Status == STATUS_PENDING) + + if (((DisconnectInfo.DisconnectType & AFD_DISCONNECT_SEND) && (!Socket->SharedData.SendShutdown)) || + ((DisconnectInfo.DisconnectType & AFD_DISCONNECT_ABORT) && (!Socket->SharedData.ReceiveShutdown))) { - WaitForSingleObject(SockEvent, INFINITE); - Status = IoStatusBlock.Status; + /* Send IOCTL */ + Status = NtDeviceIoControlFile((HANDLE)Handle, + SockEvent, + NULL, + NULL, + &IoStatusBlock, + IOCTL_AFD_DISCONNECT, + &DisconnectInfo, + sizeof(DisconnectInfo), + NULL, + 0); + + /* Wait for return */ + if (Status == STATUS_PENDING) + { + WaitForSingleObject(SockEvent, INFINITE); + Status = IoStatusBlock.Status; + } } } } @@ -799,7 +806,8 @@ WSPSelect(IN int nfds, IO_STATUS_BLOCK IOSB; PAFD_POLL_INFO PollInfo; NTSTATUS Status; - LONG HandleCount, OutCount = 0; + ULONG HandleCount; + LONG OutCount = 0; ULONG PollBufferSize; PVOID PollBuffer; ULONG i, j = 0, x; @@ -816,7 +824,7 @@ WSPSelect(IN int nfds, if ( HandleCount == 0 ) { - AFD_DbgPrint(MAX_TRACE,("HandleCount: %d. Return SOCKET_ERROR\n", + AFD_DbgPrint(MAX_TRACE,("HandleCount: %u. Return SOCKET_ERROR\n", HandleCount)); if (lpErrno) *lpErrno = WSAEINVAL; return SOCKET_ERROR; @@ -824,7 +832,7 @@ WSPSelect(IN int nfds, PollBufferSize = sizeof(*PollInfo) + ((HandleCount - 1) * sizeof(AFD_HANDLE)); - AFD_DbgPrint(MID_TRACE,("HandleCount: %d BufferSize: %d\n", + AFD_DbgPrint(MID_TRACE,("HandleCount: %u BufferSize: %u\n", HandleCount, PollBufferSize)); /* Convert Timeout to NT Format */ @@ -1696,7 +1704,7 @@ WSPShutdown(SOCKET Handle, break; } - DisconnectInfo.Timeout = RtlConvertLongToLargeInteger(-1); + DisconnectInfo.Timeout = RtlConvertLongToLargeInteger(-1000000); /* Send IOCTL */ Status = NtDeviceIoControlFile((HANDLE)Handle, @@ -1947,6 +1955,7 @@ WSPIoctl(IN SOCKET Handle, { PSOCKET_INFORMATION Socket = NULL; BOOLEAN NeedsCompletion; + BOOLEAN NonBlocking; /* Get the Socket Structure associate to this Socket*/ Socket = GetSocketStructure(Handle); @@ -1966,8 +1975,9 @@ WSPIoctl(IN SOCKET Handle, *lpErrno = WSAEFAULT; return SOCKET_ERROR; } - Socket->SharedData.NonBlocking = *((PULONG)lpvInBuffer) ? 1 : 0; - *lpErrno = SetSocketInformation(Socket, AFD_INFO_BLOCKING_MODE, (PULONG)lpvInBuffer, NULL); + NonBlocking = *((PULONG)lpvInBuffer) ? TRUE : FALSE; + Socket->SharedData.NonBlocking = NonBlocking ? 1 : 0; + *lpErrno = SetSocketInformation(Socket, AFD_INFO_BLOCKING_MODE, &NonBlocking, NULL, NULL); if (*lpErrno != NO_ERROR) return SOCKET_ERROR; else @@ -1978,7 +1988,7 @@ WSPIoctl(IN SOCKET Handle, *lpErrno = WSAEFAULT; return SOCKET_ERROR; } - *lpErrno = GetSocketInformation(Socket, AFD_INFO_RECEIVE_CONTENT_SIZE, (PULONG)lpvOutBuffer, NULL); + *lpErrno = GetSocketInformation(Socket, AFD_INFO_RECEIVE_CONTENT_SIZE, NULL, (PULONG)lpvOutBuffer, NULL); if (*lpErrno != NO_ERROR) return SOCKET_ERROR; else @@ -2254,6 +2264,7 @@ WSPCleanup(OUT LPINT lpErrno) int GetSocketInformation(PSOCKET_INFORMATION Socket, ULONG AfdInformationClass, + PBOOLEAN Boolean OPTIONAL, PULONG Ulong OPTIONAL, PLARGE_INTEGER LargeInteger OPTIONAL) { @@ -2305,6 +2316,10 @@ GetSocketInformation(PSOCKET_INFORMATION Socket, { *LargeInteger = InfoData.Information.LargeInteger; } + if (Boolean != NULL) + { + *Boolean = InfoData.Information.Boolean; + } NtClose( SockEvent ); @@ -2315,7 +2330,8 @@ GetSocketInformation(PSOCKET_INFORMATION Socket, int SetSocketInformation(PSOCKET_INFORMATION Socket, - ULONG AfdInformationClass, + ULONG AfdInformationClass, + PBOOLEAN Boolean OPTIONAL, PULONG Ulong OPTIONAL, PLARGE_INTEGER LargeInteger OPTIONAL) { @@ -2345,6 +2361,10 @@ SetSocketInformation(PSOCKET_INFORMATION Socket, { InfoData.Information.LargeInteger = *LargeInteger; } + if (Boolean != NULL) + { + InfoData.Information.Boolean = *Boolean; + } AFD_DbgPrint(MID_TRACE,("XXX Info %x (Data %x)\n", AfdInformationClass, *Ulong)); diff --git a/dll/win32/msafd/misc/event.c b/dll/win32/msafd/misc/event.c index a1dc8766148..49ea595c6e0 100644 --- a/dll/win32/msafd/misc/event.c +++ b/dll/win32/msafd/misc/event.c @@ -26,7 +26,7 @@ WSPEventSelect( AFD_EVENT_SELECT_INFO EventSelectInfo; PSOCKET_INFORMATION Socket = NULL; NTSTATUS Status; - ULONG BlockMode; + BOOLEAN BlockMode; HANDLE SockEvent; Status = NtCreateEvent( &SockEvent, GENERIC_READ | GENERIC_WRITE, @@ -44,8 +44,8 @@ WSPEventSelect( } /* Set Socket to Non-Blocking */ - BlockMode = 1; - SetSocketInformation(Socket, AFD_INFO_BLOCKING_MODE, &BlockMode, NULL); + BlockMode = TRUE; + SetSocketInformation(Socket, AFD_INFO_BLOCKING_MODE, &BlockMode, NULL, NULL); Socket->SharedData.NonBlocking = TRUE; /* Deactivate Async Select if there is one */ diff --git a/dll/win32/msafd/misc/sndrcv.c b/dll/win32/msafd/misc/sndrcv.c index ab74479ff9f..f51c69c4707 100644 --- a/dll/win32/msafd/misc/sndrcv.c +++ b/dll/win32/msafd/misc/sndrcv.c @@ -25,7 +25,7 @@ WSPAsyncSelect(IN SOCKET Handle, PSOCKET_INFORMATION Socket = NULL; PASYNC_DATA AsyncData; NTSTATUS Status; - ULONG BlockMode; + BOOLEAN BlockMode; /* Get the Socket Structure associated to this Socket */ Socket = GetSocketStructure(Handle); @@ -44,8 +44,8 @@ WSPAsyncSelect(IN SOCKET Handle, } /* Change the Socket to Non Blocking */ - BlockMode = 1; - SetSocketInformation(Socket, AFD_INFO_BLOCKING_MODE, &BlockMode, NULL); + BlockMode = TRUE; + SetSocketInformation(Socket, AFD_INFO_BLOCKING_MODE, &BlockMode, NULL, NULL); Socket->SharedData.NonBlocking = TRUE; /* Deactive WSPEventSelect */ @@ -280,6 +280,20 @@ WSPRecvFrom(SOCKET Handle, *lpErrno = WSAENOTSOCK; return SOCKET_ERROR; } + + if (!(Socket->SharedData.ServiceFlags1 & XP1_CONNECTIONLESS)) + { + /* Call WSPRecv for a non-datagram socket */ + return WSPRecv(Handle, + lpBuffers, + dwBufferCount, + lpNumberOfBytesRead, + ReceiveFlags, + lpOverlapped, + lpCompletionRoutine, + lpThreadId, + lpErrno); + } Status = NtCreateEvent( &SockEvent, GENERIC_READ | GENERIC_WRITE, NULL, 1, FALSE ); @@ -559,6 +573,20 @@ WSPSendTo(SOCKET Handle, *lpErrno = WSAENOTSOCK; return SOCKET_ERROR; } + + if (!(Socket->SharedData.ServiceFlags1 & XP1_CONNECTIONLESS)) + { + /* Use WSPSend for connection-oriented sockets */ + return WSPSend(Handle, + lpBuffers, + dwBufferCount, + lpNumberOfBytesSent, + iFlags, + lpOverlapped, + lpCompletionRoutine, + lpThreadId, + lpErrno); + } /* Bind us First */ if (Socket->SharedData.State == SocketOpen) diff --git a/dll/win32/msafd/msafd.h b/dll/win32/msafd/msafd.h index 52027581d0b..7f0d7b7b22b 100644 --- a/dll/win32/msafd/msafd.h +++ b/dll/win32/msafd/msafd.h @@ -417,14 +417,16 @@ VOID DeleteSocketStructure( SOCKET Handle ); int GetSocketInformation( PSOCKET_INFORMATION Socket, ULONG AfdInformationClass, - PULONG Ulong OPTIONAL, + PBOOLEAN Boolean OPTIONAL, + PULONG Ulong OPTIONAL, PLARGE_INTEGER LargeInteger OPTIONAL ); int SetSocketInformation( PSOCKET_INFORMATION Socket, ULONG AfdInformationClass, - PULONG Ulong OPTIONAL, + PBOOLEAN Boolean OPTIONAL, + PULONG Ulong OPTIONAL, PLARGE_INTEGER LargeInteger OPTIONAL ); diff --git a/dll/win32/msctf/CMakeLists.txt b/dll/win32/msctf/CMakeLists.txt index 634e00dde1c..b4ec9dfdc3b 100644 --- a/dll/win32/msctf/CMakeLists.txt +++ b/dll/win32/msctf/CMakeLists.txt @@ -1,7 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__WINESRC__) remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) @@ -31,7 +29,6 @@ list(APPEND SOURCE add_library(msctf SHARED ${SOURCE}) set_module_type(msctf win32dll) - target_link_libraries(msctf uuid wine) add_importlibs(msctf ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET msctf DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/msg711.acm/CMakeLists.txt b/dll/win32/msg711.acm/CMakeLists.txt index 6f6deeb3192..4ffcd516a7c 100644 --- a/dll/win32/msg711.acm/CMakeLists.txt +++ b/dll/win32/msg711.acm/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D_DLL -D__USE_CRTIMP - -D__WINESRC__) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(msg711.acm msg711.acm.spec) @@ -15,7 +12,6 @@ add_library(msg711.acm SHARED ${SOURCE}) set_entrypoint(msg711.acm 0) set_target_properties(msg711.acm PROPERTIES SUFFIX "") - target_link_libraries(msg711.acm wine) add_importlibs(msg711.acm winmm user32 msvcrt kernel32 ntdll) add_dependencies(msg711.acm psdk) diff --git a/dll/win32/msgina/lang/pl-PL.rc b/dll/win32/msgina/lang/pl-PL.rc index 8c33319d571..e84685e5ce8 100644 --- a/dll/win32/msgina/lang/pl-PL.rc +++ b/dll/win32/msgina/lang/pl-PL.rc @@ -1,15 +1,16 @@ /* * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_STATUSWINDOW_DLG DIALOGEX 0,0,274,26 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION "Prosz czeka..." +CAPTION "Proszę czekać..." FONT 8,"MS Shell Dlg",400,0,1 BEGIN LTEXT "",IDC_STATUSLABEL,7,8,234,12,SS_WORDELLIPSIS @@ -21,7 +22,7 @@ CAPTION "Witamy w ReactOS" FONT 8,"MS Shell Dlg",400,0,1 BEGIN ICON IDI_LOCKICON, -1, 7, 5, 32, 32 - LTEXT "Prosz wcisn kombinacj klawiszy Ctrl-Alt-Del",IDC_STATIC, 37, 6, 144, 18 + LTEXT "Proszę wcisnąć kombinację klawiszy Ctrl-Alt-Del",IDC_STATIC, 37, 6, 144, 18 END IDD_LOGGEDOUT_DLG DIALOGEX 0,0,275,147 @@ -30,26 +31,26 @@ CAPTION "Logon" FONT 8,"MS Shell Dlg",400,0,1 BEGIN CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,275,59 - LTEXT "Nazwa uytkownika:",IDC_STATIC, 11, 75, 70, 8 + LTEXT "Nazwa użytkownika:",IDC_STATIC, 11, 75, 70, 8 EDITTEXT IDC_USERNAME,84,72,119,14,ES_AUTOHSCROLL - LTEXT "Haso:",IDC_STATIC, 56, 93, 27, 8 + LTEXT "Hasło:",IDC_STATIC, 56, 93, 27, 8 EDITTEXT IDC_PASSWORD,84,91,119,14,ES_AUTOHSCROLL | ES_PASSWORD PUSHBUTTON "OK",IDOK,51,122,50,14,BS_DEFPUSHBUTTON PUSHBUTTON "Anuluj",IDCANCEL,115,122,50,14 - PUSHBUTTON "Wycz",IDC_SHUTDOWN,179,122,50,14 + PUSHBUTTON "Wyłącz",IDC_SHUTDOWN,179,122,50,14 END IDD_LOGGEDON_DLG DIALOGEX 0,0,247,116 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU -CAPTION "Bezpieczestwo" +CAPTION "Bezpieczeństwo" FONT 8,"MS Shell Dlg",400,0,1 BEGIN CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,247,53 - LTEXT "Co chcesz teraz zrobi?",IDC_STATIC,86,60,87,8 + LTEXT "Co chcesz teraz zrobić?",IDC_STATIC,86,60,87,8 PUSHBUTTON "Blokada komputera",IDC_LOCK,10,76,70,14 PUSHBUTTON "Wyloguj",IDC_LOGOFF,90,76,70,14 - PUSHBUTTON "Wycz",IDC_SHUTDOWN,170,76,70,14 - PUSHBUTTON "Meneder zada",IDC_TASKMGR,90,95,70,14 + PUSHBUTTON "Wyłącz",IDC_SHUTDOWN,170,76,70,14 + PUSHBUTTON "Menedżer zadań",IDC_TASKMGR,90,95,70,14 PUSHBUTTON "Anuluj",IDCANCEL,170,95,70,14 END @@ -57,8 +58,8 @@ STRINGTABLE BEGIN IDS_LOGGEDOUTSAS "Witaj!" IDS_LOCKEDSAS "Aktualnie komputer jest zablokowany." - IDS_PRESSCTRLALTDELETE "Wcinij Control-Alt-Delete aby si zalogowa." - IDS_ASKFORUSER "Nazwa uytkownika: " - IDS_ASKFORPASSWORD "Haso: " - IDS_FORCELOGOFF "To wyloguje aktualnego uytkownika i straci on wszystkie niezapisane dane. Kontynuowa?" + IDS_PRESSCTRLALTDELETE "Wciśnij Control-Alt-Delete aby się zalogować." + IDS_ASKFORUSER "Nazwa użytkownika: " + IDS_ASKFORPASSWORD "Hasło: " + IDS_FORCELOGOFF "To wyloguje aktualnego użytkownika i straci on wszystkie niezapisane dane. Kontynuować?" END diff --git a/dll/win32/msgina/lang/ro-RO.rc b/dll/win32/msgina/lang/ro-RO.rc index 6eae821cfe9..78410fa4595 100644 --- a/dll/win32/msgina/lang/ro-RO.rc +++ b/dll/win32/msgina/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_STATUSWINDOW_DLG DIALOGEX 0,0,274,26 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP CAPTION "Va rugam a?tepta?i..." @@ -57,5 +55,3 @@ BEGIN IDS_ASKFORPASSWORD "Parola: " IDS_FORCELOGOFF "Aceasta ac?iune va închide sesiunea utilizatorului curent ?i va pierde datele nesalvate de acesta. Sigur continua?i?" END - -#pragma code_page(default) diff --git a/dll/win32/msgina/lang/ru-RU.rc b/dll/win32/msgina/lang/ru-RU.rc index d795535b54b..9c25b94d9fc 100644 --- a/dll/win32/msgina/lang/ru-RU.rc +++ b/dll/win32/msgina/lang/ru-RU.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_STATUSWINDOW_DLG DIALOGEX 0,0,274,26 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION " ..." +CAPTION "Пожалуйста подождите..." FONT 8,"MS Shell Dlg",400,0,1 BEGIN LTEXT "",IDC_STATUSLABEL,7,8,234,12,SS_WORDELLIPSIS @@ -12,48 +12,48 @@ END IDD_NOTICE_DLG DIALOGEX 0, 0, 186, 32 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION " ReactOS" +CAPTION "Добро пожаловать в ReactOS" FONT 8,"MS Shell Dlg",400,0,1 BEGIN ICON IDI_LOCKICON, -1, 7, 5, 32, 32 - LTEXT " Ctrl-Alt-Del.",IDC_STATIC, 38, 10, 144, 14 + LTEXT "Нажмите клавиши Ctrl-Alt-Del.",IDC_STATIC, 38, 10, 144, 14 END IDD_LOGGEDOUT_DLG DIALOGEX 0,0,275,147 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION "" +CAPTION "Вход" FONT 8,"MS Shell Dlg",400,0,1 BEGIN CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,275,59 - RTEXT " :", IDC_STATIC, 6, 75, 70, 8 + RTEXT "Имя пользователя:", IDC_STATIC, 6, 75, 70, 8 EDITTEXT IDC_USERNAME,84,72,119,14,ES_AUTOHSCROLL - RTEXT ":", IDC_STATIC, 6, 93, 70, 8 + RTEXT "Пароль:", IDC_STATIC, 6, 93, 70, 8 EDITTEXT IDC_PASSWORD,84,91,119,14,ES_AUTOHSCROLL | ES_PASSWORD PUSHBUTTON "OK", IDOK, 47, 122, 50, 14, BS_DEFPUSHBUTTON - PUSHBUTTON "", IDCANCEL, 109, 122, 50, 14 - PUSHBUTTON "", IDC_SHUTDOWN, 171, 122, 58, 14 + PUSHBUTTON "Отмена", IDCANCEL, 109, 122, 50, 14 + PUSHBUTTON "Выключение", IDC_SHUTDOWN, 171, 122, 58, 14 END IDD_LOGGEDON_DLG DIALOGEX 0, 0, 275, 116 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU -CAPTION "" +CAPTION "Безопасность" FONT 8,"MS Shell Dlg",400,0,1 BEGIN CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,247,53 - LTEXT " :", IDC_STATIC, 7, 60, 123, 8 - PUSHBUTTON "", IDC_LOCK, 7, 76, 86, 14 - PUSHBUTTON " ", IDC_LOGOFF, 102, 76, 86, 14 - PUSHBUTTON "",IDC_SHUTDOWN, 198, 76, 70, 14 - PUSHBUTTON " ",IDC_TASKMGR, 102, 95, 86, 14 - PUSHBUTTON "", IDCANCEL, 198, 95, 70, 14 + LTEXT "Выберите необходимое действие:", IDC_STATIC, 7, 60, 123, 8 + PUSHBUTTON "Заблокировать", IDC_LOCK, 7, 76, 86, 14 + PUSHBUTTON "Завершение сеанса", IDC_LOGOFF, 102, 76, 86, 14 + PUSHBUTTON "Выключение",IDC_SHUTDOWN, 198, 76, 70, 14 + PUSHBUTTON "Диспетчер задач",IDC_TASKMGR, 102, 95, 86, 14 + PUSHBUTTON "Отмена", IDCANCEL, 198, 95, 70, 14 END STRINGTABLE BEGIN - IDS_LOGGEDOUTSAS " !" - IDS_LOCKEDSAS " ." - IDS_PRESSCTRLALTDELETE " Control+Alt+Delete ." - IDS_ASKFORUSER " : " - IDS_ASKFORPASSWORD ": " - IDS_FORCELOGOFF " . ?" + IDS_LOGGEDOUTSAS "Добро пожаловать!" + IDS_LOCKEDSAS "Этот компьютер сейчас заблокирован." + IDS_PRESSCTRLALTDELETE "Нажмите клавиши Control+Alt+Delete для входа." + IDS_ASKFORUSER "Имя пользователя: " + IDS_ASKFORPASSWORD "Пароль: " + IDS_FORCELOGOFF "При регистрации нового пользователя все несохраненные данные будут утеряны. Продолжить?" END diff --git a/dll/win32/msgina/lang/uk-UA.rc b/dll/win32/msgina/lang/uk-UA.rc index 0fa79c3b624..ffffcb84511 100644 --- a/dll/win32/msgina/lang/uk-UA.rc +++ b/dll/win32/msgina/lang/uk-UA.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_STATUSWINDOW_DLG DIALOGEX 0,0,274,26 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION "..." +CAPTION "Зачекайте..." FONT 8,"MS Shell Dlg",400,0,1 BEGIN LTEXT "",IDC_STATUSLABEL,7,8,234,12,SS_WORDELLIPSIS @@ -18,48 +18,48 @@ END IDD_NOTICE_DLG DIALOGEX 0, 0, 186, 32 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION " ReactOS" +CAPTION "Ласкаво просимо до ReactOS" FONT 8,"MS Shell Dlg",400,0,1 BEGIN ICON IDI_LOCKICON, -1, 7, 5, 32, 32 - LTEXT " Ctrl+Alt+Del",IDC_STATIC, 38, 10, 144, 14 + LTEXT "Натисніть клавіші Ctrl+Alt+Del",IDC_STATIC, 38, 10, 144, 14 END IDD_LOGGEDOUT_DLG DIALOGEX 0,0,275,147 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION "" +CAPTION "Вхід" FONT 8,"MS Shell Dlg",400,0,1 BEGIN CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,275,59 - LTEXT ":",IDC_STATIC,33, 75, 48, 8 + LTEXT "Користувач:",IDC_STATIC,33, 75, 48, 8 EDITTEXT IDC_USERNAME,84,72,119,14,ES_AUTOHSCROLL - LTEXT ":",IDC_STATIC,48, 93, 34, 8 + LTEXT "Пароль:",IDC_STATIC,48, 93, 34, 8 EDITTEXT IDC_PASSWORD,84,91,119,14,ES_AUTOHSCROLL | ES_PASSWORD PUSHBUTTON "OK",IDOK,37, 122, 50, 14,BS_DEFPUSHBUTTON - PUSHBUTTON "",IDCANCEL,93, 122, 50, 14 - PUSHBUTTON " ...",IDC_SHUTDOWN,148, 122, 86, 14 + PUSHBUTTON "Скасувати",IDCANCEL,93, 122, 50, 14 + PUSHBUTTON "Завершення роботи...",IDC_SHUTDOWN,148, 122, 86, 14 END IDD_LOGGEDON_DLG DIALOGEX 0, 0, 257, 116 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU -CAPTION "" +CAPTION "Безпека" FONT 8,"MS Shell Dlg",400,0,1 BEGIN CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,247,53 - LTEXT " ?",IDC_STATIC, 86, 60, 87, 8 - PUSHBUTTON "",IDC_LOCK, 6, 76, 70, 14 - PUSHBUTTON " ...",IDC_LOGOFF, 80, 76, 80, 14 - PUSHBUTTON " ...",IDC_SHUTDOWN, 165, 76, 86, 14 - PUSHBUTTON " ",IDC_TASKMGR, 80, 95, 80, 14 - PUSHBUTTON "",IDCANCEL, 165, 95, 86, 14 + LTEXT "Що Ви хочете зробити?",IDC_STATIC, 86, 60, 87, 8 + PUSHBUTTON "Блокування",IDC_LOCK, 6, 76, 70, 14 + PUSHBUTTON "Вихід із системи...",IDC_LOGOFF, 80, 76, 80, 14 + PUSHBUTTON "Завершення роботи...",IDC_SHUTDOWN, 165, 76, 86, 14 + PUSHBUTTON "Диспетчер завдань",IDC_TASKMGR, 80, 95, 80, 14 + PUSHBUTTON "Скасувати",IDCANCEL, 165, 95, 86, 14 END STRINGTABLE BEGIN - IDS_LOGGEDOUTSAS " !" - IDS_LOCKEDSAS " ' ." - IDS_PRESSCTRLALTDELETE " Press Control+Alt+Delete ." - IDS_ASKFORUSER ": " - IDS_ASKFORPASSWORD ": " - IDS_FORCELOGOFF " . ?" + IDS_LOGGEDOUTSAS "Ласкаво просимо!" + IDS_LOCKEDSAS "Цей комп'ютер зараз заблокований." + IDS_PRESSCTRLALTDELETE "Натисніть клавіші Press Control+Alt+Delete для входу." + IDS_ASKFORUSER "Користувач: " + IDS_ASKFORPASSWORD "Пароль: " + IDS_FORCELOGOFF "Це завершить сеанс поточного користувача і всі незбережені дані будуть загублені. Продовжити?" END diff --git a/dll/win32/msgina/msgina.rc b/dll/win32/msgina/msgina.rc index 373041828ee..4e3a9510d8f 100644 --- a/dll/win32/msgina/msgina.rc +++ b/dll/win32/msgina/msgina.rc @@ -13,15 +13,18 @@ IDI_LOCKICON ICON "resources/21.ico" #include "lang/bg-BG.rc" #include "lang/cs-CZ.rc" #include "lang/en-US.rc" +#include "lang/es-ES.rc" #include "lang/de-DE.rc" #include "lang/fr-FR.rc" #include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" -#include "lang/es-ES.rc" diff --git a/dll/win32/msgsm32.acm/CMakeLists.txt b/dll/win32/msgsm32.acm/CMakeLists.txt index 1de7b02958c..d5fadf4b1c2 100644 --- a/dll/win32/msgsm32.acm/CMakeLists.txt +++ b/dll/win32/msgsm32.acm/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D_DLL -D__USE_CRTIMP - -D__WINESRC__) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(msgsm32.acm msgsm32.acm.spec) @@ -15,9 +12,7 @@ add_library(msgsm32.acm SHARED ${SOURCE}) set_entrypoint(msgsm32.acm 0) set_target_properties(msgsm32.acm PROPERTIES SUFFIX "") - target_link_libraries(msgsm32.acm wine) - add_importlibs(msgsm32.acm winmm user32 msvcrt kernel32 ntdll) add_dependencies(msgsm32.acm psdk) add_cd_file(TARGET msgsm32.acm DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/mshtml.tlb/CMakeLists.txt b/dll/win32/mshtml.tlb/CMakeLists.txt index 9645d148f3c..01e7364085c 100644 --- a/dll/win32/mshtml.tlb/CMakeLists.txt +++ b/dll/win32/mshtml.tlb/CMakeLists.txt @@ -1,6 +1,6 @@ -add_typelib(mshtml_tlb mshtml_tlb.idl) -add_dependencies(mshtml_tlb stdole2) +add_typelib(mshtml__tlb mshtml_tlb.idl) +add_dependencies(mshtml__tlb stdole2) add_definitions(-D__WINESRC__) @@ -10,5 +10,5 @@ add_library(mshtml.tlb SHARED rsrc.rc) set_entrypoint(mshtml.tlb 0) set_target_properties(mshtml.tlb PROPERTIES SUFFIX "") -add_dependencies(mshtml.tlb mshtml_tlb) +add_dependencies(mshtml.tlb mshtml__tlb) add_cd_file(TARGET mshtml.tlb DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/mshtml/CMakeLists.txt b/dll/win32/mshtml/CMakeLists.txt index 4f174ee0bca..d91ec8a769f 100644 --- a/dll/win32/mshtml/CMakeLists.txt +++ b/dll/win32/mshtml/CMakeLists.txt @@ -2,11 +2,7 @@ remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) -add_definitions( - -D__WINESRC__ - -D_DLL - -D__USE_CRTIMP) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) add_idl_Headers(mshtml_nsiface_header nsiface.idl) diff --git a/dll/win32/msi/CMakeLists.txt b/dll/win32/msi/CMakeLists.txt index c7d217c2906..ecd80871870 100644 --- a/dll/win32/msi/CMakeLists.txt +++ b/dll/win32/msi/CMakeLists.txt @@ -1,4 +1,6 @@ +if(NOT MSVC) + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) add_definitions(-D__WINESRC__ -DMSIRUNMODE=MSIRUNMODE_T) @@ -14,7 +16,7 @@ list(APPEND SOURCE action.c alter.c appsearch.c - assembly.c + assembly.c automation.c classes.c cond.tab.c @@ -68,13 +70,9 @@ endif() add_library(msi SHARED ${SOURCE}) add_idl_Headers(msi_idlheader msiserver.idl) - add_typelib(msi_tlb msiserver.idl) - set_module_type(msi win32dll) - target_link_libraries(msi uuid ${PSEH_LIB} wine) - add_dependencies(msi msi_idlheader msi_tlb) add_importlibs(msi @@ -96,4 +94,7 @@ add_importlibs(msi ntdll) add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all) + +endif(NOT MSVC) + add_importlib_target(msi.spec) diff --git a/dll/win32/msi/msi_ros.diff b/dll/win32/msi/msi_ros.diff new file mode 100644 index 00000000000..7198d57b507 --- /dev/null +++ b/dll/win32/msi/msi_ros.diff @@ -0,0 +1,1026 @@ +Index: D:/trunk/dll/win32/msi/msi_Es.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Es.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Es.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "No se ha podido abrir el paquete de instalacin especificado. Por favor, compruebe la ruta del archivo y vuelva a intentarlo." + 5 "ruta %s no encontrada" + 9 "inserte el disco %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "introduzca qu carpeta contiene %s" + 12 "instalar fuente para caracterstica ausente" + 13 "unidad de red para caracterstica ausente" +Index: D:/trunk/dll/win32/msi/msi_Ko.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Ko.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Ko.rc (revision 51711) +@@ -29,33 +29,7 @@ + 4 " ġ Ű ϴ. θ Ȯϰ ٽ õϽʽÿ." + 5 "%s θ ã ϴ" + 9 "ũ %s " +- 10 "Windows Installer %s\n\n" \ +- ":\n" \ +- "msiexec {ʼ Ű} [ Ű]\n\n" \ +- "ǰ ġ:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "ġ :\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "ǰ :\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "ǰ ˸:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "ġ ߰:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- " ɾ Log UI :\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "MSI :\n" \ +- "\t/y\n" \ +- "MSI :\n" \ +- "\t/z\n" \ +- " :\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\n:\nmsiexec {ʼ Ű} [ Ű]\n\nǰ ġ:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nġ :\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nǰ :\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nǰ ˸:\n\t/j[u|m] package [/t transform] [/g languageid]\nġ ߰:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\n ɾ Log UI :\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nMSI :\n\t/y\nMSI :\n\t/z\n :\n\t/help\n\t/?\n" + 11 "%s ϴ Էϼ" + 12 " κ(feature) ġ " + 13 " κ(feature) Ʈũ ̺" +Index: D:/trunk/dll/win32/msi/msi_No.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_No.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_No.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "Klarte ikke pne den oppgitte installasjonspakken. Kontroller filbanen og prv igjen." + 5 "Fant ikke stien '%s'." + 9 "Sett i disk '%s'" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "Oppgi katalogen som inneholder '%s'." + 12 "Egenskapens installasjonskilde mangler." + 13 "Egenskapens nettverksstasjon mangler." +Index: D:/trunk/dll/win32/msi/msi_Uk.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Uk.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Uk.rc (revision 51711) +@@ -32,33 +32,7 @@ + 4 "Не вдалося відкрити вказаний пакет інсталяції. Перевірте шлях до файлу та спробуйте знов." + 5 "шлях %s не знайдено" + 9 "вставте диск %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "вкажіть папку, що містить %s" + 12 "джерело встановлення даної можливості не вказане" + 13 "мережевий диск для даної можливості не вказаний" +Index: D:/trunk/dll/win32/msi/msi_Ro.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Ro.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Ro.rc (revision 51711) +@@ -28,33 +28,7 @@ + 4 "Pachetul de instalare menționat nu a putut fi deschis. Verificați calea și încercați din nou." + 5 "calea %s nu a fost găsită" + 9 "inserați discul %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "introduceți fișierul care conține %s" + 12 "lipsește sursa de instalare pentru această caracteristică" + 13 "lipsește unitatea de rețea pentru această caracteristică" +Index: D:/trunk/dll/win32/msi/msvchelper.h +=================================================================== +--- D:/trunk/dll/win32/msi/msvchelper.h (revision 0) ++++ D:/trunk/dll/win32/msi/msvchelper.h (revision 51711) +@@ -0,0 +1,13 @@ ++ ++#ifdef __i386__ ++#define __ASM_DEFINE_FUNC(name,suffix,code) ++ ++typedef unsigned int (__stdcall *__MSVC__MsiCustomActionEntryPoint)(unsigned int); ++ ++__inline unsigned int CUSTOMPROC_wrapper(__MSVC__MsiCustomActionEntryPoint proc, unsigned int handle) ++{ ++#pragma message("warning: CUSTOMPROC_wrapper might not be correct") ++ return proc(handle); ++} ++ ++#endif + +Property changes on: D:\trunk\dll\win32\msi\msvchelper.h +___________________________________________________________________ +Added: svn:eol-style + + native + +Index: D:/trunk/dll/win32/msi/msi_En.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_En.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_En.rc (revision 51711) +@@ -28,33 +28,7 @@ + 4 "The specified installation package could not be opened. Please check the file path and try again." + 5 "path %s not found" + 9 "insert disk %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parameter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parameter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "enter which folder contains %s" + 12 "install source for feature missing" + 13 "network drive for feature missing" +Index: D:/trunk/dll/win32/msi/msi_Fr.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Fr.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Fr.rc (revision 51711) +@@ -31,33 +31,7 @@ + 4 "Le paquet d'installation spécifié n'a pu être ouvert. Veuillez vérifier le chemin du fichier et réessayer." + 5 "Le chemin %s est introuvable" + 9 "insérez le disque %s" +- 10 "Programme d'installation Windows %s\n\n" \ +- "Usage :\n" \ +- "msiexec commande {paramètre obligatoire} [paramètre optionnel]\n\n" \ +- "Installer un produit :\n" \ +- "\t/i {paquet|code_produit} [propriété]\n" \ +- "\t/package {paquet|code_produit} [propriété]\n" \ +- "\t/a paquet [propriété]\n" \ +- "Réparer une installation :\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {paquet|code_produit}\n" \ +- "Désinstaller un produit :\n" \ +- "\t/uninstall {paquet|code_produit} [propriété]\n" \ +- "\t/x {paquet|code_produit} [propriété]\n" \ +- "Publier un produit :\n" \ +- "\t/j[u|m] paquet [/t transformation] [/g id_langue]\n" \ +- "Appliquer un patch :\n" \ +- "\t/p paquet_patch [propriété]\n" \ +- "\t/p paquet_patch /a paquet [propriété]\n" \ +- "Modificateurs de journalisation et d'interface utilisateur pour les commandes ci-dessus :\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] fichier_journal\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Enregistrer le service MSI :\n" \ +- "\t/y\n" \ +- "Annuler l'enregistrement du service MSI :\n" \ +- "\t/z\n" \ +- "Afficher cette aide :\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Programme d'installation Windows %s\n\nUsage :\nmsiexec commande {paramètre obligatoire} [paramètre optionnel]\n\nInstaller un produit :\n\t/i {paquet|code_produit} [propriété]\n\t/package {paquet|code_produit} [propriété]\n\t/a paquet [propriété]\nRéparer une installation :\n\t/f[p|o|e|d|c|a|u|m|s|v] {paquet|code_produit}\nDésinstaller un produit :\n\t/uninstall {paquet|code_produit} [propriété]\n\t/x {paquet|code_produit} [propriété]\nPublier un produit :\n\t/j[u|m] paquet [/t transformation] [/g id_langue]\nAppliquer un patch :\n\t/p paquet_patch [propriété]\n\t/p paquet_patch /a paquet [propriété]\nModificateurs de journalisation et d'interface utilisateur pour les commandes ci-dessus :\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] fichier_journal\n\t/q{|n|b|r|f|n+|b+|b-}\nEnregistrer le service MSI :\n\t/y\nAnnuler l'enregistrement du service MSI :\n\t/z\nAfficher cette aide :\n\t/help\n\t/?\n" + 11 "saisissez le nom du dossier contenant %s" + 12 "source d'installation pour la fonctionnalité manquante" + 13 "lecteur réseau pour la fonctionnalité manquante" +Index: D:/trunk/dll/win32/msi/msi_Da.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Da.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Da.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "Kunne ikke bne den specificerede installationspakke. Kontroller stien og prv igen." + 5 "kunne ikke finden stien '%s'." + 9 "indst disk '%s'" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "angiv kataloget som indeholder '%s'." + 12 "featurens installationskilde mangler." + 13 "featurens netvrksdrev mangler." +Index: D:/trunk/dll/win32/msi/msi_Sr.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Sr.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Sr.rc (revision 51711) +@@ -30,33 +30,7 @@ + 4 "Instalacija ne može biti otvorena. Molimo proverite destinaciju fajla i pokušajte ponovo." + 5 "putanja %s nije nađena" + 9 "Ubacite disk %s" +- 10 "Windows Instalacija programa %s\n\n" \ +- "Svrha:\n" \ +- "msiexec komanda {traženi parametar} [opcioni parametar]\n\n" \ +- "Instalacija proizvoda:\n" \ +- "\t/i {paket|kod} [svojina]\n" \ +- "\t/package {paket|kod} [svojina]\n" \ +- "\t/a paket [svojina]\n" \ +- "Popravak instalacije:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {paket|kod}\n" \ +- "Uninstal programa:\n" \ +- "\t/uninstall {paket|kod} [svojina]\n" \ +- "\t/x {paket|kod} [svojina]\n" \ +- "Reklama programa:\n" \ +- "\t/j[u|m] paket [/t pretvori] [/g id jezika]\n" \ +- "Primeni peč:\n" \ +- "\t/p pečpaket [svojina]\n" \ +- "\t/p pečpaket /a paket [svojina]\n" \ +- "Izveštalj i Izgled Modifikatori za komande iznad:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] izvestaj\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Registracija MSI Servisa:\n" \ +- "\t/y\n " \ +- "Uklanjanje MSI Servisa:\n" \ +- "\t/z\n" \ +- "Prikaži ovu Pomoć:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Instalacija programa %s\n\nSvrha:\nmsiexec komanda {traženi parametar} [opcioni parametar]\n\nInstalacija proizvoda:\n\t/i {paket|kod} [svojina]\n\t/package {paket|kod} [svojina]\n\t/a paket [svojina]\nPopravak instalacije:\n\t/f[p|o|e|d|c|a|u|m|s|v] {paket|kod}\nUninstal programa:\n\t/uninstall {paket|kod} [svojina]\n\t/x {paket|kod} [svojina]\nReklama programa:\n\t/j[u|m] paket [/t pretvori] [/g id jezika]\nPrimeni peč:\n\t/p pečpaket [svojina]\n\t/p pečpaket /a paket [svojina]\nIzveštalj i Izgled Modifikatori za komande iznad:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] izvestaj\n\t/q{|n|b|r|f|n+|b+|b-}\nRegistracija MSI Servisa:\n\t/y\n Uklanjanje MSI Servisa:\n\t/z\nPrikaži ovu Pomoć:\n\t/help\n\t/?\n" + 11 "unesite koji folder sadrži %s" + 12 "instalacija nedostaje" + 13 "mrežni drajv nedostaje" +@@ -71,33 +45,7 @@ + 4 "Инсталација не може бити отворена. Молимо проверите дестинацију фајла и покушајте поново." + 5 "путања %s није нађена" + 9 "Убаците диск %s" +- 10 "Виндовс Инсталација програма %s\n\n" \ +- "Сврха:\n" \ +- "msiexec команда {тражени параметар} [опциони параметар]\n\n" \ +- "Инсталација производа:\n" \ +- "\t/i {пакет|код} [својина]\n" \ +- "\t/package {пакет|код} [својина]\n" \ +- "\t/a пакет [svojina]\n" \ +- "Поправак инсталације:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {пакет|код}\n" \ +- "Брисање програма:\n" \ +- "\t/uninstall {пакет|код} [svojina]\n" \ +- "\t/x {пакет|код} [својина]\n" \ +- "Реклама програма:\n" \ +- "\t/j[u|m] пакет [/t transform] [/g languageid]\n" \ +- "Примени печ:\n" \ +- "\t/p печпакет [својина]\n" \ +- "\t/p печпакет /a пакет [својина]\n" \ +- "Известај и Изглед Модификатора за команде изнад:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] извештај\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Регистрација МСИ Сервиса:\n" \ +- "\t/y\n" \ +- "Уклањање МСИ Сервиса:\n" \ +- "\t/z\n" \ +- "Прикажи ову Помоћ:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Виндовс Инсталација програма %s\n\nСврха:\nmsiexec команда {тражени параметар} [опциони параметар]\n\nИнсталација производа:\n\t/i {пакет|код} [својина]\n\t/package {пакет|код} [својина]\n\t/a пакет [svojina]\nПоправак инсталације:\n\t/f[p|o|e|d|c|a|u|m|s|v] {пакет|код}\nБрисање програма:\n\t/uninstall {пакет|код} [svojina]\n\t/x {пакет|код} [својина]\nРеклама програма:\n\t/j[u|m] пакет [/t transform] [/g languageid]\nПримени печ:\n\t/p печпакет [својина]\n\t/p печпакет /a пакет [својина]\nИзвестај и Изглед Модификатора за команде изнад:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] извештај\n\t/q{|n|b|r|f|n+|b+|b-}\nРегистрација МСИ Сервиса:\n\t/y\nУклањање МСИ Сервиса:\n\t/z\nПрикажи ову Помоћ:\n\t/help\n\t/?\n" + 11 "Унесите који фолдер садржи %s" + 12 "Инсталација недостаје" + 13 "Мрежни драјв недостаје" +Index: D:/trunk/dll/win32/msi/msi_Tr.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Tr.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Tr.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "The specified installation package could not be opened. Please check the file path and try again." + 5 "%s yolu bulunamad" + 9 "%s nolu diski yerletirin" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "%s esini ieren dizini girin" + 12 "eksik zellik iin kurulum kayna" + 13 "eksik zellik iin a srcs" +Index: D:/trunk/dll/win32/msi/msi_De.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_De.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_De.rc (revision 51711) +@@ -30,33 +30,7 @@ + 4 "Das angegebene Installationspaket konnte nicht geöffnet werden. Bitte überprüfen Sie den Pfadnamen und versuchen Sie es noch einmal." + 5 "Der Pfad %s wurde nicht gefunden." + 9 "Bitte Disk %s einlegen." +- 10 "Windows Installer %s\n\n" \ +- "Benutzung:\n" \ +- "msiexec Befehl {Parameter} [Zusätzliche Parammeter]\n\n" \ +- "Produkt installieren:\n" \ +- "\t/i {Paket|Produktcode} [Eigenschaft]\n" \ +- "\t/package {Paket|Produktcode} [Eigenschaft]\n" \ +- "\t/a Paket [Eigenschaft]\n" \ +- "Installation reparieren:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {Paket|Produktcode}\n" \ +- "Produkt deinstallieren:\n" \ +- "\t/uninstall {Paket|Produktcode} [Eigenschaft]\n" \ +- "\t/x {Paket|Produktcode} [Eigenschaft]\n" \ +- "Produkt ankündigen:\n" \ +- "\t/j[u|m] Paket [/t Transformationspaket] [/g Sprachkennung]\n" \ +- "Patch integrieren:\n" \ +- "\t/p Patchpaket [Eigenschaft]\n" \ +- "\t/p Patchpaket /a Paket [Eigenschaft]\n" \ +- "Protokollierung und Benutzeroberfläche für die oberen Befehle anpassen:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] Protokolldatei\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "MSI Service registrieren:\n" \ +- "\t/y\n" \ +- "Registrierung des MSI Service aufheben:\n" \ +- "\t/z\n" \ +- "Hilfe anzeigen:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nBenutzung:\nmsiexec Befehl {Parameter} [Zusätzliche Parammeter]\n\nProdukt installieren:\n\t/i {Paket|Produktcode} [Eigenschaft]\n\t/package {Paket|Produktcode} [Eigenschaft]\n\t/a Paket [Eigenschaft]\nInstallation reparieren:\n\t/f[p|o|e|d|c|a|u|m|s|v] {Paket|Produktcode}\nProdukt deinstallieren:\n\t/uninstall {Paket|Produktcode} [Eigenschaft]\n\t/x {Paket|Produktcode} [Eigenschaft]\nProdukt ankündigen:\n\t/j[u|m] Paket [/t Transformationspaket] [/g Sprachkennung]\nPatch integrieren:\n\t/p Patchpaket [Eigenschaft]\n\t/p Patchpaket /a Paket [Eigenschaft]\nProtokollierung und Benutzeroberfläche für die oberen Befehle anpassen:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] Protokolldatei\n\t/q{|n|b|r|f|n+|b+|b-}\nMSI Service registrieren:\n\t/y\nRegistrierung des MSI Service aufheben:\n\t/z\nHilfe anzeigen:\n\t/help\n\t/?\n" + 11 "Geben Sie das Verzeichnis ein, dass %s enthält." + 12 "Die Installationsquelle für das Feature fehlt." + 13 "Das Netzwerklaufwerk für das Feature fehlt." +Index: D:/trunk/dll/win32/msi/msi_Sv.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Sv.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Sv.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "Det angivna installationspaketet kunde inte ppnas. Kontrollera filskvgen och frsk igen." + 5 "skvgen %s hittades inte" + 9 "mata in %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "ange vilken mapp som innehller %s" + 12 "installationsklla fr funktion saknar" + 13 "ntverksenhet fr funktion saknar" +Index: D:/trunk/dll/win32/msi/msi_Fi.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Fi.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Fi.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "Annettua asennuspakettia ei voitu avata. Tarkista tiedoston polku ja yrit uudelleen." + 5 "Polkua %s ei lydy." + 9 "Anna levy %s" +- 10 "Windows Installer %s\n\n" \ +- "Kytt:\n" \ +- "msiexec komento {pakollinen parametri} [valinnainen parametri]\n\n" \ +- "Asenna tuote:\n" \ +- "\t/i {paketti|tuotekoodi} [ominaisuus]\n" \ +- "\t/package {paketti|tuotekoodi} [ominaisuus]\n" \ +- "\t/a {paketti} [ominaisuus]\n" \ +- "Korjaa asennus:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {paketti|tuotekoodi}\n" \ +- "Poista tuote:\n" \ +- "\t/uninstall {paketti|tuotekoodi} [ominaisuus]\n" \ +- "\t/x {paketti|tuotekoodi} [ominaisuus]\n" \ +- "Mainosta (advertise) tuotetta:\n" \ +- "\t/j[u|m] paketti [/t muunnos] [/g kielitunnus]\n" \ +- "Asenna korjaus:\n" \ +- "\t/p korjauspaketti [ominaisuus]\n" \ +- "\t/p korjauspaketti /a paketti [ominaisuus]\n" \ +- "Loki- ja kyttliittymasetukset edellisille komennoille:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] lokitiedosto\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Rekisteri MSI-palvelu:\n" \ +- "\t/y\n" \ +- "Peru MSI-palvelun rekisterinti:\n" \ +- "\t/z\n" \ +- "Nyt tm ohje:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nKytt:\nmsiexec komento {pakollinen parametri} [valinnainen parametri]\n\nAsenna tuote:\n\t/i {paketti|tuotekoodi} [ominaisuus]\n\t/package {paketti|tuotekoodi} [ominaisuus]\n\t/a {paketti} [ominaisuus]\nKorjaa asennus:\n\t/f[p|o|e|d|c|a|u|m|s|v] {paketti|tuotekoodi}\nPoista tuote:\n\t/uninstall {paketti|tuotekoodi} [ominaisuus]\n\t/x {paketti|tuotekoodi} [ominaisuus]\nMainosta (advertise) tuotetta:\n\t/j[u|m] paketti [/t muunnos] [/g kielitunnus]\nAsenna korjaus:\n\t/p korjauspaketti [ominaisuus]\n\t/p korjauspaketti /a paketti [ominaisuus]\nLoki- ja kyttliittymasetukset edellisille komennoille:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] lokitiedosto\n\t/q{|n|b|r|f|n+|b+|b-}\nRekisteri MSI-palvelu:\n\t/y\nPeru MSI-palvelun rekisterinti:\n\t/z\nNyt tm ohje:\n\t/help\n\t/?\n" + 11 "Anna kansio, jossa on %s" + 12 "Ominaisuuden asennuslhde puuttuu." + 13 "Ominaisuuden verkkolevy puuttuu." +Index: D:/trunk/dll/win32/msi/msi_Si.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Si.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Si.rc (revision 51711) +@@ -29,33 +29,7 @@ + 4 "Navedenega namestitvenega paketa ni mogoče odpreti. Preverite ime datoteke in poskusite znova." + 5 "pot %s ne obstaja" + 9 "vnesite disk %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "vnesite ime mape, ki vsebuje %s" + 12 "manjkajoč namestitveni vir za namestitev funkcije" + 13 "manjkajoč omrežni pogon za namestitev funkcijo" +Index: D:/trunk/dll/win32/msi/msi_Hu.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Hu.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Hu.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "The specified installation package could not be opened. Please check the file path and try again." + 5 "%s tvonal nem tallhat" + 9 "helyezze be a lemezt: %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "adja meg melyik mappa tartalmazza ezt: %s" + 12 "hinyz tulajdonsg a teleptsi forrshoz" + 13 "hinyz tulajdonsg a hlzati meghajthoz" +Index: D:/trunk/dll/win32/msi/msi_Ru.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Ru.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Ru.rc (revision 51711) +@@ -30,33 +30,7 @@ + 4 "Указанный пакет не может быть открыт. Проверьте файл и повторите попытку." + 5 "путь %s не найден" + 9 "вставьте диск %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "укажите каталог, содержащий %s" + 12 "источник установки данной возможности не указан" + 13 "сетевой диск для данной возможности не указан" +Index: D:/trunk/dll/win32/msi/msi_Nl.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Nl.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Nl.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "Het opgegeven installatie pakket kon niet worden geopend. Verifieer het bestandspad en probeer opnieuw." + 5 "Pad %s niet gevonden" + 9 "Plaats disk %s" +- 10 "Windows Installer %s\n\n" \ +- "Gebruik:\n" \ +- "msiexec commando {vereiste parameter} [optionele parameter]\n\n" \ +- "Installeer een product:\n" \ +- "\t/i {pakket|productcode} [eigenschap]\n" \ +- "\t/package {pakket|productcode} [eigenschap]\n" \ +- "\t/a pakket [eigenschap]\n" \ +- "Herstel een installatie:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {pakket|productcode}\n" \ +- "Verwijder een product:\n" \ +- "\t/uninstall {pakket|productcode} [eigenschap]\n" \ +- "\t/x {pakket|productcode} [eigenschap]\n" \ +- "Adverteer een product:\n" \ +- "\t/j[u|m] pakket [/t transform] [/g languageid]\n" \ +- "Pas een patch toe:\n" \ +- "\t/p patchpakket [eigenschap]\n" \ +- "\t/p patchpakket /a pakket [eigenschap]\n" \ +- "Log en UI Modifiers voor bovenstaande commando's:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logbestand\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Registreer MSI Service:\n" \ +- "\t/y\n" \ +- "Maak registratie MSI Service ongedaan:\n" \ +- "\t/z\n" \ +- "Laat dit helpvenster zien:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nGebruik:\nmsiexec commando {vereiste parameter} [optionele parameter]\n\nInstalleer een product:\n\t/i {pakket|productcode} [eigenschap]\n\t/package {pakket|productcode} [eigenschap]\n\t/a pakket [eigenschap]\nHerstel een installatie:\n\t/f[p|o|e|d|c|a|u|m|s|v] {pakket|productcode}\nVerwijder een product:\n\t/uninstall {pakket|productcode} [eigenschap]\n\t/x {pakket|productcode} [eigenschap]\nAdverteer een product:\n\t/j[u|m] pakket [/t transform] [/g languageid]\nPas een patch toe:\n\t/p patchpakket [eigenschap]\n\t/p patchpakket /a pakket [eigenschap]\nLog en UI Modifiers voor bovenstaande commando's:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logbestand\n\t/q{|n|b|r|f|n+|b+|b-}\nRegistreer MSI Service:\n\t/y\nMaak registratie MSI Service ongedaan:\n\t/z\nLaat dit helpvenster zien:\n\t/help\n\t/?\n" + 11 "Voer de map in die %s bevat" + 12 "De installatiebron van de feature ontbreekt" + 13 "De netwerkschijf met de feature ontbreekt" +Index: D:/trunk/dll/win32/msi/msi_Pl.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Pl.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Pl.rc (revision 51711) +@@ -28,33 +28,7 @@ + 4 "Nie udao si otworzy wybranego pakietu instalacyjnego. Sprawd czy cieka jest poprawna i sprbuj ponownie." + 5 "cieka '%s' nie zostaa odnaleziona" + 9 "w dysk '%s'" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "wprowad sicek do folderu zawierajcego '%s'" + 12 "rdo danych zawierajce dan funkcj jest niedostpne" + 13 "dysk siecowy zawierajcy dan funckje jest niedostpny" +Index: D:/trunk/dll/win32/msi/msi_It.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_It.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_It.rc (revision 51711) +@@ -30,33 +30,7 @@ + 4 "Impossibile aprire il pacchetto di installazione specificato. Per favore controlla l'indirizzo del file e riprova." + 5 "percorso %s non trovato" + 9 "inserire disco %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "immettere il nome della cartella che contiene %s" + 12 "sorgente di installazione per la funzionalità mancante" + 13 "periferica di rete per la funzionalità mancante" +Index: D:/trunk/dll/win32/msi/msi_Lt.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Lt.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Lt.rc (revision 51711) +@@ -30,33 +30,7 @@ + 4 "Nepavyko atverti nurodyto diegimo paketo. Patikrinkite failo kelią ir mėginkite dar kartą." + 5 "kelias %s nerastas" + 9 "įdėkite diską %s" +- 10 "Windows diegimo programa %s\n\n" \ +- "Naudojimas:\n" \ +- "msiexec komanda {būtinas parametras} [nebūtinas parametras]\n\n" \ +- "Įdiegti produktą:\n" \ +- "\t/i {paketas|produkto_kodas} [savybė]\n" \ +- "\t/package {paketas|produkto_kodas} [savybė]\n" \ +- "\t/a paketas [savybė]\n" \ +- "Taisyti įdiegimą:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {paketas|produkto_kodas}\n" \ +- "Pašalinti produktą:\n" \ +- "\t/uninstall {paketas|produkto_kodas} [savybė]\n" \ +- "\t/x {paketas|produkto_kodas} [savybė]\n" \ +- "Skelbti produktą:\n" \ +- "\t/j[u|m] paketas [/t pakeitimas] [/g kalbos_identifikatorius]\n" \ +- "Pritaikyti pataisą:\n" \ +- "\t/p pataisos_paketas [savybė]\n" \ +- "\t/p pataisos_paketas /a paketas [savybė]\n" \ +- "Žurnalo ir sąsajos modifikatoriai aukščiau išvardintoms komandoms:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] žurnalo_failas\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Registruoti MSI tarnybą:\n" \ +- "\t/y\n" \ +- "Išregistruoti MSI tarnybą:\n" \ +- "\t/z\n" \ +- "Parodyti šią pagalbą:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows diegimo programa %s\n\nNaudojimas:\nmsiexec komanda {būtinas parametras} [nebūtinas parametras]\n\nĮdiegti produktą:\n\t/i {paketas|produkto_kodas} [savybė]\n\t/package {paketas|produkto_kodas} [savybė]\n\t/a paketas [savybė]\nTaisyti įdiegimą:\n\t/f[p|o|e|d|c|a|u|m|s|v] {paketas|produkto_kodas}\nPašalinti produktą:\n\t/uninstall {paketas|produkto_kodas} [savybė]\n\t/x {paketas|produkto_kodas} [savybė]\nSkelbti produktą:\n\t/j[u|m] paketas [/t pakeitimas] [/g kalbos_identifikatorius]\nPritaikyti pataisą:\n\t/p pataisos_paketas [savybė]\n\t/p pataisos_paketas /a paketas [savybė]\nŽurnalo ir sąsajos modifikatoriai aukščiau išvardintoms komandoms:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] žurnalo_failas\n\t/q{|n|b|r|f|n+|b+|b-}\nRegistruoti MSI tarnybą:\n\t/y\nIšregistruoti MSI tarnybą:\n\t/z\nParodyti šią pagalbą:\n\t/help\n\t/?\n" + 11 "įveskite aplanką, kuris turi %s" + 12 "trūksta diegimo šaltinio komponentui" + 13 "trūksta tinklo disko komponentui" +Index: D:/trunk/dll/win32/msi/msi_Zh.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Zh.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Zh.rc (revision 51711) +@@ -30,33 +30,7 @@ + 4 "不能打开所指定的安装软件包. 请检查文件路径后再试." + 5 "路径 %s 没找到" + 9 "插入软盘 %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "输入包含 %s 的文件夹" + 12 "本功能的安装源不存在" + 13 "本功能的网络驱动器不存在" +@@ -71,33 +45,7 @@ + 4 "不能開啟所指定的安裝軟件包. 請檢查檔案路徑後再試." + 5 "路徑 %s 沒找到" + 9 "插入軟碟 %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "輸入包含 %s 的檔案夾" + 12 "本功能的安裝源不存在" + 13 "本功能的網路儲存槽不存在" +Index: D:/trunk/dll/win32/msi/msi_Pt.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Pt.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Pt.rc (revision 51711) +@@ -31,33 +31,7 @@ + 4 "O pacote de instalação especificado não pôde ser aberto. Por favor, verifique o arquivo e tente novamente." + 5 "caminho %s não encontrado" + 9 "insira disco %s" +- 10 "Windows Installer %s\n\n" \ +- "Modo de usar:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Instalar um produto:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Reparar uma instalação:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Desinstalar um produto:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Anunciar um produto:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Aplicar um patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Modificadores Log e UI para os comandos acima:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Registrar Serviço MSI:\n" \ +- "\t/y\n" \ +- "Desregistrar Serviço MSI:\n" \ +- "\t/z\n" \ +- "Mostrar esta ajuda:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nModo de usar:\nmsiexec command {required parameter} [optional parammeter]\n\nInstalar um produto:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nReparar uma instalação:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nDesinstalar um produto:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAnunciar um produto:\n\t/j[u|m] package [/t transform] [/g languageid]\nAplicar um patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nModificadores Log e UI para os comandos acima:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegistrar Serviço MSI:\n\t/y\nDesregistrar Serviço MSI:\n\t/z\nMostrar esta ajuda:\n\t/help\n\t/?\n" + 11 "entre a pasta que contém %s" + 12 "faltando fonte de instalação para característica" + 13 "faltando drive de rede para característica" +@@ -72,33 +46,7 @@ + 4 "The specified installation package could not be opened. Please check the file path and try again." + 5 "localização %s não encontrada" + 9 "insira o disco %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 "indique que pasta contém %s" + 12 "instalar fonte para a opção em falta" + 13 "controlador de rede para a opção em falta" +Index: D:/trunk/dll/win32/msi/msi_Bg.rc +=================================================================== +--- D:/trunk/dll/win32/msi/msi_Bg.rc (revision 51710) ++++ D:/trunk/dll/win32/msi/msi_Bg.rc (revision 51711) +@@ -27,33 +27,7 @@ + 4 "The specified installation package could not be opened. Please check the file path and try again." + 5 " %s " + 9 " %s" +- 10 "Windows Installer %s\n\n" \ +- "Usage:\n" \ +- "msiexec command {required parameter} [optional parammeter]\n\n" \ +- "Install a product:\n" \ +- "\t/i {package|productcode} [property]\n" \ +- "\t/package {package|productcode} [property]\n" \ +- "\t/a package [property]\n" \ +- "Repair an installation:\n" \ +- "\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\n" \ +- "Uninstall a product:\n" \ +- "\t/uninstall {package|productcode} [property]\n" \ +- "\t/x {package|productcode} [property]\n" \ +- "Advertise a product:\n" \ +- "\t/j[u|m] package [/t transform] [/g languageid]\n" \ +- "Apply a patch:\n" \ +- "\t/p patchpackage [property]\n" \ +- "\t/p patchpackage /a package [property]\n" \ +- "Log and UI Modifiers for above commands:\n" \ +- "\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n" \ +- "\t/q{|n|b|r|f|n+|b+|b-}\n" \ +- "Register MSI Service:\n" \ +- "\t/y\n" \ +- "Unregister MSI Service:\n" \ +- "\t/z\n" \ +- "Display this help:\n" \ +- "\t/help\n" \ +- "\t/?\n" ++ 10 "Windows Installer %s\n\nUsage:\nmsiexec command {required parameter} [optional parammeter]\n\nInstall a product:\n\t/i {package|productcode} [property]\n\t/package {package|productcode} [property]\n\t/a package [property]\nRepair an installation:\n\t/f[p|o|e|d|c|a|u|m|s|v] {package|productcode}\nUninstall a product:\n\t/uninstall {package|productcode} [property]\n\t/x {package|productcode} [property]\nAdvertise a product:\n\t/j[u|m] package [/t transform] [/g languageid]\nApply a patch:\n\t/p patchpackage [property]\n\t/p patchpackage /a package [property]\nLog and UI Modifiers for above commands:\n\t/l[*][i|w|e|a|r|u|c|m|o|p|v|][+|!] logfile\n\t/q{|n|b|r|f|n+|b+|b-}\nRegister MSI Service:\n\t/y\nUnregister MSI Service:\n\t/z\nDisplay this help:\n\t/help\n\t/?\n" + 11 " , %s" + 12 " " + 13 " " diff --git a/dll/win32/msi/msiserver.idl b/dll/win32/msi/msiserver.idl index 58c5b3cf99f..262be4919bb 100644 --- a/dll/win32/msi/msiserver.idl +++ b/dll/win32/msi/msiserver.idl @@ -23,6 +23,12 @@ import "wtypes.idl"; import "objidl.idl"; import "oaidl.idl"; +#ifndef __WIDL__ +#define threading(model) +#define progid(str) +#define vi_progid(str) +#endif + cpp_quote("#if 0") typedef unsigned long MSIHANDLE; typedef int INSTALLMESSAGE; diff --git a/dll/win32/msports/CMakeLists.txt b/dll/win32/msports/CMakeLists.txt new file mode 100644 index 00000000000..e95a1eea379 --- /dev/null +++ b/dll/win32/msports/CMakeLists.txt @@ -0,0 +1,24 @@ + +set_unicode() + +spec2def(msports.dll msports.spec) + +list(APPEND SOURCE + classinst.c + comdb.c + msports.c + serial.c + msports.rc + ${CMAKE_CURRENT_BINARY_DIR}/msports_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/msports.def) + +add_library(msports SHARED ${SOURCE}) + +set_module_type(msports win32dll) + +target_link_libraries(msports wine) + +add_importlibs(msports setupapi comctl32 user32 advapi32 msvcrt kernel32 ntdll) + +add_cd_file(TARGET msports DESTINATION reactos/system32 FOR all) +add_importlib_target(msports.spec) diff --git a/dll/win32/msports/classinst.c b/dll/win32/msports/classinst.c new file mode 100644 index 00000000000..0b082b5cca3 --- /dev/null +++ b/dll/win32/msports/classinst.c @@ -0,0 +1,695 @@ +/* + * PROJECT: ReactOS system libraries + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dlls\win32\msports\classinst.c + * PURPOSE: Ports class installer + * PROGRAMMERS: Copyright 2011 Eric Kohl + */ + +#define WIN32_NO_STATUS +#include +#include +#include +#include +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(msports); + + +typedef enum _PORT_TYPE +{ + UnknownPort, + ParallelPort, + SerialPort +} PORT_TYPE; + +LPWSTR pszCom = L"COM"; +LPWSTR pszLpt = L"LPT"; + + +BOOL +GetBootResourceList(HDEVINFO DeviceInfoSet, + PSP_DEVINFO_DATA DeviceInfoData, + PCM_RESOURCE_LIST *ppResourceList) +{ + HKEY hDeviceKey = NULL; + HKEY hConfigKey = NULL; + LPBYTE lpBuffer = NULL; + DWORD dwDataSize; + LONG lError; + BOOL ret = FALSE; + + *ppResourceList = NULL; + + hDeviceKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DEV, + NULL, + NULL); + if (!hDeviceKey) + return FALSE; + + lError = RegOpenKeyExW(hDeviceKey, + L"LogConf", + 0, + KEY_QUERY_VALUE, + &hConfigKey); + if (lError != ERROR_SUCCESS) + goto done; + + /* Get the configuration data size */ + lError = RegQueryValueExW(hConfigKey, + L"BootConfig", + NULL, + NULL, + NULL, + &dwDataSize); + if (lError != ERROR_SUCCESS) + goto done; + + /* Allocate the buffer */ + lpBuffer = HeapAlloc(GetProcessHeap(), 0, dwDataSize); + if (lpBuffer == NULL) + goto done; + + /* Retrieve the configuration data */ + lError = RegQueryValueExW(hConfigKey, + L"BootConfig", + NULL, + NULL, + (LPBYTE)lpBuffer, + &dwDataSize); + if (lError == ERROR_SUCCESS) + ret = TRUE; + +done: + if (ret == FALSE && lpBuffer != NULL) + HeapFree(GetProcessHeap(), 0, lpBuffer); + + if (hConfigKey) + RegCloseKey(hConfigKey); + + if (hDeviceKey) + RegCloseKey(hDeviceKey); + + if (ret == TRUE) + *ppResourceList = (PCM_RESOURCE_LIST)lpBuffer; + + return ret; +} + + +DWORD +GetSerialPortNumber(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + PCM_RESOURCE_LIST lpResourceList = NULL; + PCM_PARTIAL_RESOURCE_DESCRIPTOR lpResDes; + ULONG i; + DWORD dwBaseAddress = 0; + DWORD dwPortNumber = 0; + + TRACE("GetSerialPortNumber(%p, %p)\n", + DeviceInfoSet, DeviceInfoData); + + if (GetBootResourceList(DeviceInfoSet, + DeviceInfoData, + &lpResourceList)) + { + TRACE("Full resource descriptors: %ul\n", lpResourceList->Count); + if (lpResourceList->Count > 0) + { + TRACE("Partial resource descriptors: %ul\n", lpResourceList->List[0].PartialResourceList.Count); + + for (i = 0; i < lpResourceList->List[0].PartialResourceList.Count; i++) + { + lpResDes = &lpResourceList->List[0].PartialResourceList.PartialDescriptors[i]; + TRACE("Type: %u\n", lpResDes->Type); + + switch (lpResDes->Type) + { + case CmResourceTypePort: + TRACE("Port: Start: %I64x Length: %lu\n", + lpResDes->u.Port.Start.QuadPart, + lpResDes->u.Port.Length); + if (lpResDes->u.Port.Start.HighPart == 0) + dwBaseAddress = (DWORD)lpResDes->u.Port.Start.LowPart; + break; + + case CmResourceTypeInterrupt: + TRACE("Interrupt: Level: %lu Vector: %lu\n", + lpResDes->u.Interrupt.Level, + lpResDes->u.Interrupt.Vector); + break; + } + } + } + + HeapFree(GetProcessHeap(), 0, lpResourceList); + } + + switch (dwBaseAddress) + { + case 0x3f8: + dwPortNumber = 1; + break; + + case 0x2f8: + dwPortNumber = 2; + break; + + case 0x3e8: + dwPortNumber = 3; + break; + + case 0x2e8: + dwPortNumber = 4; + break; + } + + return dwPortNumber; +} + + +DWORD +GetParallelPortNumber(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + PCM_RESOURCE_LIST lpResourceList = NULL; + PCM_PARTIAL_RESOURCE_DESCRIPTOR lpResDes; + ULONG i; + DWORD dwBaseAddress = 0; + DWORD dwPortNumber = 0; + + TRACE("GetParallelPortNumber(%p, %p)\n", + DeviceInfoSet, DeviceInfoData); + + if (GetBootResourceList(DeviceInfoSet, + DeviceInfoData, + &lpResourceList)) + { + TRACE("Full resource descriptors: %ul\n", lpResourceList->Count); + if (lpResourceList->Count > 0) + { + TRACE("Partial resource descriptors: %ul\n", lpResourceList->List[0].PartialResourceList.Count); + + for (i = 0; i < lpResourceList->List[0].PartialResourceList.Count; i++) + { + lpResDes = &lpResourceList->List[0].PartialResourceList.PartialDescriptors[i]; + TRACE("Type: %u\n", lpResDes->Type); + + switch (lpResDes->Type) + { + case CmResourceTypePort: + TRACE("Port: Start: %I64x Length: %lu\n", + lpResDes->u.Port.Start.QuadPart, + lpResDes->u.Port.Length); + if (lpResDes->u.Port.Start.HighPart == 0) + dwBaseAddress = (DWORD)lpResDes->u.Port.Start.LowPart; + break; + + case CmResourceTypeInterrupt: + TRACE("Interrupt: Level: %lu Vector: %lu\n", + lpResDes->u.Interrupt.Level, + lpResDes->u.Interrupt.Vector); + break; + } + + } + + } + + HeapFree(GetProcessHeap(), 0, lpResourceList); + } + + switch (dwBaseAddress) + { + case 0x378: + dwPortNumber = 1; + break; + + case 0x278: + dwPortNumber = 2; + break; + } + + return dwPortNumber; +} + + +static DWORD +InstallSerialPort(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + WCHAR szDeviceDescription[256]; + WCHAR szFriendlyName[256]; + WCHAR szPortName[8]; + DWORD dwPortNumber = 0; + DWORD dwSize; + HCOMDB hComDB = HCOMDB_INVALID_HANDLE_VALUE; + HKEY hKey; + LONG lError; + + TRACE("InstallSerialPort(%p, %p)\n", + DeviceInfoSet, DeviceInfoData); + + /* Open the com port database */ + ComDBOpen(&hComDB); + + /* Try to read the 'PortName' value and determine the port number */ + hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DEV, + NULL, + NULL); + if (hKey != INVALID_HANDLE_VALUE) + { + dwSize = sizeof(szPortName); + lError = RegQueryValueEx(hKey, + L"PortName", + NULL, + NULL, + (PBYTE)szPortName, + &dwSize); + if (lError == ERROR_SUCCESS) + { + if (_wcsnicmp(szPortName, pszCom, wcslen(pszCom)) == 0) + { + dwPortNumber = _wtoi(szPortName + wcslen(pszCom)); + TRACE("COM port number found: %lu\n", dwPortNumber); + } + } + + RegCloseKey(hKey); + } + + /* Determine the port number from its resources ... */ + if (dwPortNumber == 0) + dwPortNumber = GetSerialPortNumber(DeviceInfoSet, + DeviceInfoData); + + if (dwPortNumber != 0) + { + /* ... and claim the port number in the database */ + ComDBClaimPort(hComDB, + dwPortNumber, + FALSE, + NULL); + } + else + { + /* ... or claim the next free port number */ + ComDBClaimNextFreePort(hComDB, + &dwPortNumber); + } + + /* Build the name of the port device */ + swprintf(szPortName, L"%s%u", pszCom, dwPortNumber); + + /* Close the com port database */ + if (hComDB != HCOMDB_INVALID_HANDLE_VALUE) + ComDBClose(hComDB); + + /* Set the 'PortName' value */ + hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DEV, + NULL, + NULL); + if (hKey != INVALID_HANDLE_VALUE) + { + RegSetValueExW(hKey, + L"PortName", + 0, + REG_SZ, + (LPBYTE)szPortName, + (wcslen(szPortName) + 1) * sizeof(WCHAR)); + + RegCloseKey(hKey); + } + + /* Install the device */ + if (!SetupDiInstallDevice(DeviceInfoSet, + DeviceInfoData)) + { + return GetLastError(); + } + + /* Get the device description... */ + if (SetupDiGetDeviceRegistryPropertyW(DeviceInfoSet, + DeviceInfoData, + SPDRP_DEVICEDESC, + NULL, + (LPBYTE)szDeviceDescription, + 256 * sizeof(WCHAR), + NULL)) + { + /* ... and use it to build a new friendly name */ + swprintf(szFriendlyName, + L"%s (%s)", + szDeviceDescription, + szPortName); + } + else + { + /* ... or build a generic friendly name */ + swprintf(szFriendlyName, + L"Serial Port (%s)", + szPortName); + } + + /* Set the friendly name for the device */ + SetupDiSetDeviceRegistryPropertyW(DeviceInfoSet, + DeviceInfoData, + SPDRP_FRIENDLYNAME, + (LPBYTE)szFriendlyName, + (wcslen(szFriendlyName) + 1) * sizeof(WCHAR)); + + return ERROR_SUCCESS; +} + + +static DWORD +InstallParallelPort(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + WCHAR szDeviceDescription[256]; + WCHAR szFriendlyName[256]; + WCHAR szPortName[8]; + DWORD dwPortNumber = 0; + DWORD dwSize; + LONG lError; + HKEY hKey; + + TRACE("InstallParallelPort(%p, %p)\n", + DeviceInfoSet, DeviceInfoData); + + /* Try to read the 'PortName' value and determine the port number */ + hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DEV, + NULL, + NULL); + if (hKey != INVALID_HANDLE_VALUE) + { + dwSize = sizeof(szPortName); + lError = RegQueryValueEx(hKey, + L"PortName", + NULL, + NULL, + (PBYTE)szPortName, + &dwSize); + if (lError == ERROR_SUCCESS) + { + if (_wcsnicmp(szPortName, pszLpt, wcslen(pszLpt)) == 0) + { + dwPortNumber = _wtoi(szPortName + wcslen(pszLpt)); + TRACE("LPT port number found: %lu\n", dwPortNumber); + } + } + + RegCloseKey(hKey); + } + + /* ... try to determine the port number from its resources */ + if (dwPortNumber == 0) + dwPortNumber = GetParallelPortNumber(DeviceInfoSet, + DeviceInfoData); + + if (dwPortNumber == 0) + { + /* FIXME */ + } + + if (dwPortNumber != 0) + { + swprintf(szPortName, L"%s%u", pszLpt, dwPortNumber); + } + else + { + wcscpy(szPortName, L"LPTx"); + } + + if (dwPortNumber != 0) + { + /* Set the 'PortName' value */ + hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DEV, + NULL, + NULL); + if (hKey != INVALID_HANDLE_VALUE) + { + RegSetValueExW(hKey, + L"PortName", + 0, + REG_SZ, + (LPBYTE)szPortName, + (wcslen(szPortName) + 1) * sizeof(WCHAR)); + + RegCloseKey(hKey); + } + } + + /* Install the device */ + if (!SetupDiInstallDevice(DeviceInfoSet, + DeviceInfoData)) + { + return GetLastError(); + } + + /* Get the device description... */ + if (SetupDiGetDeviceRegistryPropertyW(DeviceInfoSet, + DeviceInfoData, + SPDRP_DEVICEDESC, + NULL, + (LPBYTE)szDeviceDescription, + 256 * sizeof(WCHAR), + NULL)) + { + /* ... and use it to build a new friendly name */ + swprintf(szFriendlyName, + L"%s (%s)", + szDeviceDescription, + szPortName); + } + else + { + /* ... or build a generic friendly name */ + swprintf(szFriendlyName, + L"Parallel Port (%s)", + szPortName); + } + + /* Set the friendly name for the device */ + SetupDiSetDeviceRegistryPropertyW(DeviceInfoSet, + DeviceInfoData, + SPDRP_FRIENDLYNAME, + (LPBYTE)szFriendlyName, + (wcslen(szFriendlyName) + 1) * sizeof(WCHAR)); + + return ERROR_SUCCESS; +} + + +VOID +InstallDeviceData(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL) +{ + HKEY hKey = NULL; + HINF hInf = INVALID_HANDLE_VALUE; + SP_DRVINFO_DATA DriverInfoData; + PSP_DRVINFO_DETAIL_DATA DriverInfoDetailData; + WCHAR InfSectionWithExt[256]; + BYTE buffer[2048]; + DWORD dwRequired; + + TRACE("InstallDeviceData()\n"); + + hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DRV, + NULL, + NULL); + if (hKey == NULL) + goto done; + + DriverInfoData.cbSize = sizeof(SP_DRVINFO_DATA); + if (!SetupDiGetSelectedDriverW(DeviceInfoSet, + DeviceInfoData, + &DriverInfoData)) + { + goto done; + } + + DriverInfoDetailData = (PSP_DRVINFO_DETAIL_DATA)buffer; + DriverInfoDetailData->cbSize = sizeof(SP_DRVINFO_DETAIL_DATA); + if (!SetupDiGetDriverInfoDetailW(DeviceInfoSet, + DeviceInfoData, + &DriverInfoData, + DriverInfoDetailData, + 2048, + &dwRequired)) + { + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + goto done; + } + + TRACE("Inf file name: %S\n", DriverInfoDetailData->InfFileName); + + hInf = SetupOpenInfFileW(DriverInfoDetailData->InfFileName, + NULL, + INF_STYLE_WIN4, + NULL); + if (hInf == INVALID_HANDLE_VALUE) + goto done; + + TRACE("Section name: %S\n", DriverInfoDetailData->SectionName); + + SetupDiGetActualSectionToInstallW(hInf, + DriverInfoDetailData->SectionName, + InfSectionWithExt, + 256, + NULL, + NULL); + + TRACE("InfSectionWithExt: %S\n", InfSectionWithExt); + + SetupInstallFromInfSectionW(NULL, + hInf, + InfSectionWithExt, + SPINST_REGISTRY, + hKey, + NULL, + 0, + NULL, + NULL, + NULL, + NULL); + + TRACE("Done\n"); + +done:; + if (hKey != NULL) + RegCloseKey(hKey); + + if (hInf != INVALID_HANDLE_VALUE) + SetupCloseInfFile(hInf); +} + + + +PORT_TYPE +GetPortType(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + HKEY hKey = NULL; + DWORD dwSize; + DWORD dwType = 0; + BYTE bData = 0; + PORT_TYPE PortType = UnknownPort; + LONG lError; + + TRACE("GetPortType()\n"); + + hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + DICS_FLAG_GLOBAL, + 0, + DIREG_DRV, + NULL, + NULL); + if (hKey == NULL) + { + goto done; + } + + dwSize = sizeof(BYTE); + lError = RegQueryValueExW(hKey, + L"PortSubClass", + NULL, + &dwType, + &bData, + &dwSize); + + TRACE("lError: %ld\n", lError); + TRACE("dwSize: %lu\n", dwSize); + TRACE("dwType: %lu\n", dwType); + + if (lError == ERROR_SUCCESS && + dwSize == sizeof(BYTE) && + dwType == REG_BINARY) + { + if (bData == 0) + PortType = ParallelPort; + else + PortType = SerialPort; + } + +done:; + if (hKey != NULL) + RegCloseKey(hKey); + + TRACE("GetPortType() returns %u \n", PortType); + + return PortType; +} + + +static DWORD +InstallPort(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData) +{ + PORT_TYPE PortType; + + InstallDeviceData(DeviceInfoSet, DeviceInfoData); + + PortType = GetPortType(DeviceInfoSet, DeviceInfoData); + switch (PortType) + { + case ParallelPort: + return InstallParallelPort(DeviceInfoSet, DeviceInfoData); + + case SerialPort: + return InstallSerialPort(DeviceInfoSet, DeviceInfoData); + + default: + return ERROR_DI_DO_DEFAULT; + } +} + + +DWORD +WINAPI +PortsClassInstaller(IN DI_FUNCTION InstallFunction, + IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL) +{ + TRACE("PortsClassInstaller(%lu, %p, %p)\n", + InstallFunction, DeviceInfoSet, DeviceInfoData); + + switch (InstallFunction) + { + case DIF_INSTALLDEVICE: + return InstallPort(DeviceInfoSet, DeviceInfoData); + + default: + TRACE("Install function %u ignored\n", InstallFunction); + return ERROR_DI_DO_DEFAULT; + } +} + +/* EOF */ diff --git a/dll/win32/msports/comdb.c b/dll/win32/msports/comdb.c new file mode 100644 index 00000000000..30b851b5a39 --- /dev/null +++ b/dll/win32/msports/comdb.c @@ -0,0 +1,591 @@ +/* + * PROJECT: Ports installer library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll\win32\msports\comdb.c + * PURPOSE: COM port database + * COPYRIGHT: Copyright 2011 Eric Kohl + */ + +#include +#include + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(msports); + +#define BITS_PER_BYTE 8 + +typedef struct _COMDB +{ + HANDLE hMutex; + HKEY hKey; +} COMDB, *PCOMDB; + + +LONG +WINAPI +ComDBClaimNextFreePort(IN HCOMDB hComDB, + OUT LPDWORD ComNumber) +{ + PCOMDB pComDB; + DWORD dwBitIndex; + DWORD dwByteIndex; + DWORD dwSize; + DWORD dwType; + PBYTE pBitmap = NULL; + BYTE cMask; + LONG lError; + + TRACE("ComDBClaimNextFreePort(%p %p)\n", hComDB, ComNumber); + + if (hComDB == INVALID_HANDLE_VALUE || + hComDB == NULL || + ComNumber == NULL) + return ERROR_INVALID_PARAMETER; + + pComDB = (PCOMDB)hComDB; + + /* Wait for the mutex */ + WaitForSingleObject(pComDB->hMutex, INFINITE); + + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError != ERROR_SUCCESS) + { + ERR("Failed to query the bitmap size!\n"); + goto done; + } + + /* Allocate the bitmap */ + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + lError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + /* Read the bitmap */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + pBitmap, + &dwSize); + if (lError != ERROR_SUCCESS) + goto done; + + lError = ERROR_INVALID_PARAMETER; + for (dwBitIndex = 0; dwBitIndex < (dwSize * BITS_PER_BYTE); dwBitIndex++) + { + /* Calculate the byte index and a mask for the affected bit */ + dwByteIndex = dwBitIndex / BITS_PER_BYTE; + cMask = 1 << (dwBitIndex % BITS_PER_BYTE); + + if ((pBitmap[dwByteIndex] & cMask) == 0) + { + pBitmap[dwByteIndex] |= cMask; + *ComNumber = dwBitIndex + 1; + lError = ERROR_SUCCESS; + break; + } + } + + /* Save the bitmap if it was modified */ + if (lError == ERROR_SUCCESS) + { + lError = RegSetValueExW(pComDB->hKey, + L"ComDB", + 0, + REG_BINARY, + pBitmap, + dwSize); + } + +done:; + /* Release the mutex */ + ReleaseMutex(pComDB->hMutex); + + /* Release the bitmap */ + if (pBitmap != NULL) + HeapFree(GetProcessHeap(), 0, pBitmap); + + return lError; +} + + +LONG +WINAPI +ComDBClaimPort(IN HCOMDB hComDB, + IN DWORD ComNumber, + IN BOOL ForceClaim, + OUT PBOOL Forced) +{ + PCOMDB pComDB; + DWORD dwBitIndex; + DWORD dwByteIndex; + DWORD dwType; + DWORD dwSize; + PBYTE pBitmap = NULL; + BYTE cMask; + LONG lError; + + TRACE("ComDBClaimPort(%p %lu)\n", hComDB, ComNumber); + + if (hComDB == INVALID_HANDLE_VALUE || + hComDB == NULL || + ComNumber == 0 || + ComNumber > COMDB_MAX_PORTS_ARBITRATED) + return ERROR_INVALID_PARAMETER; + + pComDB = (PCOMDB)hComDB; + + /* Wait for the mutex */ + WaitForSingleObject(pComDB->hMutex, INFINITE); + + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError != ERROR_SUCCESS) + { + ERR("Failed to query the bitmap size!\n"); + goto done; + } + + /* Allocate the bitmap */ + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + lError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + /* Read the bitmap */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + pBitmap, + &dwSize); + if (lError != ERROR_SUCCESS) + goto done; + + /* Get the bit index */ + dwBitIndex = ComNumber - 1; + + /* Check if the bit to set fits into the bitmap */ + if (dwBitIndex >= (dwSize * BITS_PER_BYTE)) + { + FIXME("Resize the bitmap\n"); + + lError = ERROR_INVALID_PARAMETER; + goto done; + } + + /* Calculate the byte index and a mask for the affected bit */ + dwByteIndex = dwBitIndex / BITS_PER_BYTE; + cMask = 1 << (dwBitIndex % BITS_PER_BYTE); + + lError = ERROR_SHARING_VIOLATION; + + /* Check if the bit is not set */ + if ((pBitmap[dwByteIndex] & cMask) == 0) + { + /* Set the bit */ + pBitmap[dwByteIndex] |= cMask; + lError = ERROR_SUCCESS; + } + + /* Save the bitmap if it was modified */ + if (lError == ERROR_SUCCESS) + { + lError = RegSetValueExW(pComDB->hKey, + L"ComDB", + 0, + REG_BINARY, + pBitmap, + dwSize); + } + +done: + /* Release the mutex */ + ReleaseMutex(pComDB->hMutex); + + /* Release the bitmap */ + if (pBitmap != NULL) + HeapFree(GetProcessHeap(), 0, pBitmap); + + return lError; +} + + +LONG +WINAPI +ComDBClose(IN HCOMDB hComDB) +{ + PCOMDB pComDB; + + TRACE("ComDBClose(%p)\n", hComDB); + + if (hComDB == HCOMDB_INVALID_HANDLE_VALUE || + hComDB == NULL) + return ERROR_INVALID_PARAMETER; + + pComDB = (PCOMDB)hComDB; + + /* Close the registry key */ + if (pComDB->hKey != NULL) + RegCloseKey(pComDB->hKey); + + /* Close the mutex */ + if (pComDB->hMutex != NULL) + CloseHandle(pComDB->hMutex); + + /* Release the database */ + HeapFree(GetProcessHeap(), 0, pComDB); + + return ERROR_SUCCESS; +} + + +LONG +WINAPI +ComDBGetCurrentPortUsage(IN HCOMDB hComDB, + OUT PBYTE Buffer, + IN DWORD BufferSize, + IN DWORD ReportType, + OUT LPDWORD MaxPortsReported) +{ + PCOMDB pComDB; + DWORD dwBitIndex; + DWORD dwByteIndex; + DWORD dwType; + DWORD dwSize; + PBYTE pBitmap = NULL; + BYTE cMask; + LONG lError = ERROR_SUCCESS; + + if (hComDB == INVALID_HANDLE_VALUE || + hComDB == NULL || + (Buffer == NULL && MaxPortsReported == NULL) || + (ReportType != CDB_REPORT_BITS && ReportType != CDB_REPORT_BYTES)) + return ERROR_INVALID_PARAMETER; + + pComDB = (PCOMDB)hComDB; + + /* Wait for the mutex */ + WaitForSingleObject(pComDB->hMutex, INFINITE); + + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError != ERROR_SUCCESS) + { + ERR("Failed to query the bitmap size!\n"); + goto done; + } + + /* Allocate the bitmap */ + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + lError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + /* Read the bitmap */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + pBitmap, + &dwSize); + if (lError != ERROR_SUCCESS) + goto done; + + if (Buffer == NULL) + { + *MaxPortsReported = dwSize * BITS_PER_BYTE; + } + else + { + if (ReportType == CDB_REPORT_BITS) + { + /* Clear the buffer */ + memset(Buffer, 0, BufferSize); + + memcpy(Buffer, + pBitmap, + min(dwSize, BufferSize)); + + if (MaxPortsReported != NULL) + *MaxPortsReported = min(dwSize, BufferSize) * BITS_PER_BYTE; + } + else if (ReportType == CDB_REPORT_BYTES) + { + /* Clear the buffer */ + memset(Buffer, 0, BufferSize); + + for (dwBitIndex = 0; dwBitIndex < min(dwSize * BITS_PER_BYTE, BufferSize); dwBitIndex++) + { + /* Calculate the byte index and a mask for the affected bit */ + dwByteIndex = dwBitIndex / BITS_PER_BYTE; + cMask = 1 << (dwBitIndex % BITS_PER_BYTE); + + if ((pBitmap[dwByteIndex] & cMask) != 0) + Buffer[dwBitIndex] = 1; + } + } + } + +done:; + /* Release the mutex */ + ReleaseMutex(pComDB->hMutex); + + /* Release the bitmap */ + HeapFree(GetProcessHeap(), 0, pBitmap); + + return lError; +} + + +LONG +WINAPI +ComDBOpen(OUT HCOMDB *phComDB) +{ + PCOMDB pComDB; + DWORD dwDisposition; + DWORD dwType; + DWORD dwSize; + PBYTE pBitmap; + LONG lError; + + TRACE("ComDBOpen(%p)\n", phComDB); + + /* Allocate a new database */ + pComDB = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(COMDB)); + if (pComDB == NULL) + { + ERR("Failed to allocate the database!\n"); + *phComDB = HCOMDB_INVALID_HANDLE_VALUE; + return ERROR_ACCESS_DENIED; + } + + /* Create a mutex to protect the database */ + pComDB->hMutex = CreateMutexW(NULL, + FALSE, + L"ComDBMutex"); + if (pComDB->hMutex == NULL) + { + ERR("Failed to create the mutex!\n"); + HeapFree(GetProcessHeap(), 0, pComDB); + *phComDB = HCOMDB_INVALID_HANDLE_VALUE; + return ERROR_ACCESS_DENIED; + } + + /* Wait for the mutex */ + WaitForSingleObject(pComDB->hMutex, INFINITE); + + /* Create or open the database key */ + lError = RegCreateKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Control\\COM Name Arbiter", + 0, + NULL, + 0, + KEY_ALL_ACCESS, + NULL, + &pComDB->hKey, + &dwDisposition); + if (lError != ERROR_SUCCESS) + goto done; + + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError == ERROR_FILE_NOT_FOUND) + { + /* Allocate a new bitmap */ + dwSize = COMDB_MIN_PORTS_ARBITRATED / BITS_PER_BYTE; + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + lError = ERROR_ACCESS_DENIED; + goto done; + } + + /* Write the bitmap to the registry */ + lError = RegSetValueExW(pComDB->hKey, + L"ComDB", + 0, + REG_BINARY, + pBitmap, + dwSize); + + HeapFree(GetProcessHeap(), 0, pBitmap); + } + +done:; + /* Release the mutex */ + ReleaseMutex(pComDB->hMutex); + + if (lError != ERROR_SUCCESS) + { + /* Clean up in case of failure */ + if (pComDB->hKey != NULL) + RegCloseKey(pComDB->hKey); + + if (pComDB->hMutex != NULL) + CloseHandle(pComDB->hMutex); + + HeapFree(GetProcessHeap(), 0, pComDB); + + *phComDB = HCOMDB_INVALID_HANDLE_VALUE; + } + else + { + /* Return the database handle */ + *phComDB = (HCOMDB)pComDB; + } + + TRACE("done (Error %lu)\n", lError); + + return lError; +} + + +LONG +WINAPI +ComDBReleasePort(IN HCOMDB hComDB, + IN DWORD ComNumber) +{ + PCOMDB pComDB; + DWORD dwByteIndex; + DWORD dwBitIndex; + DWORD dwType; + DWORD dwSize; + PBYTE pBitmap = NULL; + BYTE cMask; + LONG lError; + + TRACE("ComDBReleasePort(%p %lu)\n", hComDB, ComNumber); + + if (hComDB == INVALID_HANDLE_VALUE || + ComNumber == 0 || + ComNumber > COMDB_MAX_PORTS_ARBITRATED) + return ERROR_INVALID_PARAMETER; + + pComDB = (PCOMDB)hComDB; + + /* Wait for the mutex */ + WaitForSingleObject(pComDB->hMutex, INFINITE); + + /* Get the required bitmap size */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + NULL, + &dwSize); + if (lError != ERROR_SUCCESS) + { + ERR("Failed to query the bitmap size!\n"); + goto done; + } + + /* Allocate the bitmap */ + pBitmap = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize); + if (pBitmap == NULL) + { + ERR("Failed to allocate the bitmap!\n"); + lError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + /* Read the bitmap */ + lError = RegQueryValueExW(pComDB->hKey, + L"ComDB", + NULL, + &dwType, + pBitmap, + &dwSize); + if (lError != ERROR_SUCCESS) + goto done; + + /* Get the bit index */ + dwBitIndex = ComNumber - 1; + + /* Check if the bit to set fits into the bitmap */ + if (dwBitIndex >= (dwSize * BITS_PER_BYTE)) + { + lError = ERROR_INVALID_PARAMETER; + goto done; + } + + /* Calculate the byte index and a mask for the affected bit */ + dwByteIndex = dwBitIndex / BITS_PER_BYTE; + cMask = 1 << (dwBitIndex % BITS_PER_BYTE); + + /* Release the port */ + pBitmap[dwByteIndex] &= ~cMask; + + lError = RegSetValueExW(pComDB->hKey, + L"ComDB", + 0, + REG_BINARY, + pBitmap, + dwSize); + +done:; + /* Release the mutex */ + ReleaseMutex(pComDB->hMutex); + + /* Release the bitmap */ + if (pBitmap != NULL) + HeapFree(GetProcessHeap(), 0, pBitmap); + + return lError; +} + + +LONG +WINAPI +ComDBResizeDatabase(IN HCOMDB hComDB, + IN DWORD NewSize) +{ + FIXME("ComDBResizeDatabase(%p %lu)\n", hComDB, NewSize); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/* EOF */ diff --git a/dll/win32/msports/internal.h b/dll/win32/msports/internal.h new file mode 100644 index 00000000000..8f67052f938 --- /dev/null +++ b/dll/win32/msports/internal.h @@ -0,0 +1,9 @@ +/* + * PROJECT: Ports installer library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll\win32\msports\internal.h + * PURPOSE: Global declarations + * COPYRIGHT: Copyright 2011 Eric Kohl + */ + +extern HINSTANCE hInstance; \ No newline at end of file diff --git a/dll/win32/msports/lang/de-DE.rc b/dll/win32/msports/lang/de-DE.rc new file mode 100644 index 00000000000..6450c6b627b --- /dev/null +++ b/dll/win32/msports/lang/de-DE.rc @@ -0,0 +1,21 @@ + +LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL + +IDD_SERIALSETTINGS DIALOGEX DISCARDABLE 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Port Einstellungen" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "B&its pro Sekunde:", -1, 74, 19, 62, 8, WS_GROUP + COMBOBOX IDC_SERIAL_BITSPERSECOND, 139, 17, 106, 90, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Datenbits:", -1, 74, 40, 62, 8 + COMBOBOX IDC_SERIAL_DATABITS, 139, 38, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Paritt:", -1, 74, 61, 62, 8 + COMBOBOX IDC_SERIAL_PARITY, 139, 59, 106, 62, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Stoppbits:", -1, 74, 82, 62, 8 + COMBOBOX IDC_SERIAL_STOPBITS, 139, 80, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Flusssteuerung:", - 1, 74, 102, 62, 8 + COMBOBOX IDC_SERIAL_FLOWCONTROL, 139, 100, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + PUSHBUTTON "&Erweitert...",IDC_SERIAL_ADVANCED, 111, 130, 65, 14,WS_GROUP + PUSHBUTTON "Wieder&herstellen",IDC_SERIAL_RESTORE, 180, 130, 65, 14, WS_GROUP +END diff --git a/dll/win32/msports/lang/en-US.rc b/dll/win32/msports/lang/en-US.rc new file mode 100644 index 00000000000..5ea9aa24d5a --- /dev/null +++ b/dll/win32/msports/lang/en-US.rc @@ -0,0 +1,21 @@ + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +IDD_SERIALSETTINGS DIALOGEX DISCARDABLE 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Port Settings" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "B&its per second:", -1, 74, 19, 62, 8, WS_GROUP + COMBOBOX IDC_SERIAL_BITSPERSECOND, 139, 17, 106, 90, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Data bits:", -1, 74, 40, 62, 8 + COMBOBOX IDC_SERIAL_DATABITS, 139, 38, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Parity:", -1, 74, 61, 62, 8 + COMBOBOX IDC_SERIAL_PARITY, 139, 59, 106, 62, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Stop bits:", -1, 74, 82, 62, 8 + COMBOBOX IDC_SERIAL_STOPBITS, 139, 80, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Flow control:", - 1, 74, 102, 62, 8 + COMBOBOX IDC_SERIAL_FLOWCONTROL, 139, 100, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + PUSHBUTTON "&Advanced...",IDC_SERIAL_ADVANCED, 111, 130, 65, 14,WS_GROUP + PUSHBUTTON "&Restore Defaults",IDC_SERIAL_RESTORE, 180, 130, 65, 14, WS_GROUP +END diff --git a/dll/win32/msports/lang/pl-PL.rc b/dll/win32/msports/lang/pl-PL.rc new file mode 100644 index 00000000000..ff9e22c25c4 --- /dev/null +++ b/dll/win32/msports/lang/pl-PL.rc @@ -0,0 +1,28 @@ +/* + * translated by Caemyr - Olaf Siejka (May 2011) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) + */ + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +IDD_SERIALSETTINGS DIALOGEX DISCARDABLE 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ustawienia portu" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "B&itów na sekundę:", -1, 74, 19, 62, 8, WS_GROUP + COMBOBOX IDC_SERIAL_BITSPERSECOND, 139, 17, 106, 90, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Bity danych:", -1, 74, 40, 62, 8 + COMBOBOX IDC_SERIAL_DATABITS, 139, 38, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Parzystość:", -1, 74, 61, 62, 8 + COMBOBOX IDC_SERIAL_PARITY, 139, 59, 106, 62, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "Bi&ty stopu:", -1, 74, 82, 62, 8 + COMBOBOX IDC_SERIAL_STOPBITS, 139, 80, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Kontrola przepływu:", - 1, 74, 102, 62, 8 + COMBOBOX IDC_SERIAL_FLOWCONTROL, 139, 100, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + PUSHBUTTON "&Zaawansowane...",IDC_SERIAL_ADVANCED, 111, 130, 65, 14,WS_GROUP + PUSHBUTTON "P&rzywróć domyślne",IDC_SERIAL_RESTORE, 180, 130, 65, 14, WS_GROUP +END diff --git a/dll/win32/msports/lang/uk-UA.rc b/dll/win32/msports/lang/uk-UA.rc new file mode 100644 index 00000000000..a5ac1f08739 --- /dev/null +++ b/dll/win32/msports/lang/uk-UA.rc @@ -0,0 +1,28 @@ +/* + * PROJECT: ReactOS msports + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/win32/msports/lang/uk-UA.rc + * PURPOSE: Ukraianian Language File for msports + * TRANSLATOR: Igor Paliychuk + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +IDD_SERIALSETTINGS DIALOGEX DISCARDABLE 0, 0, 252, 218 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Параметри порту" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "Бі&тів на секунду:", -1, 74, 19, 62, 8, WS_GROUP + COMBOBOX IDC_SERIAL_BITSPERSECOND, 139, 17, 106, 90, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Біти даних:", -1, 74, 40, 62, 8 + COMBOBOX IDC_SERIAL_DATABITS, 139, 38, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Паритет:", -1, 74, 61, 62, 8 + COMBOBOX IDC_SERIAL_PARITY, 139, 59, 106, 62, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Стопові біти:", -1, 74, 82, 62, 8 + COMBOBOX IDC_SERIAL_STOPBITS, 139, 80, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + RTEXT "&Керування потоком:", - 1, 74, 102, 62, 8 + COMBOBOX IDC_SERIAL_FLOWCONTROL, 139, 100, 106, 54, WS_TABSTOP | CBS_DROPDOWNLIST + PUSHBUTTON "&Розширені...",IDC_SERIAL_ADVANCED, 111, 130, 65, 14,WS_GROUP + PUSHBUTTON "&За замовчуванням",IDC_SERIAL_RESTORE, 180, 130, 65, 14, WS_GROUP +END diff --git a/dll/win32/msports/msports.c b/dll/win32/msports/msports.c new file mode 100644 index 00000000000..587c01ea372 --- /dev/null +++ b/dll/win32/msports/msports.c @@ -0,0 +1,35 @@ +/* + * PROJECT: Ports installer library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll\win32\msports\msports.c + * PURPOSE: Library main function + * COPYRIGHT: Copyright 2011 Eric Kohl + */ + +#include +#include + + +WINE_DEFAULT_DEBUG_CHANNEL(msports); + +HINSTANCE hInstance; + +BOOL +WINAPI +DllMain(HINSTANCE hinstDll, + DWORD dwReason, + LPVOID reserved) +{ + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + TRACE("DLL_PROCESS_ATTACH\n"); + hInstance = hinstDll; + DisableThreadLibraryCalls(hinstDll); + break; + } + + return TRUE; +} + +/* EOF */ diff --git a/dll/win32/msports/msports.rbuild b/dll/win32/msports/msports.rbuild new file mode 100644 index 00000000000..cf67dfd6954 --- /dev/null +++ b/dll/win32/msports/msports.rbuild @@ -0,0 +1,15 @@ + + . + + wine + kernel32 + advapi32 + comctl32 + user32 + setupapi + classinst.c + comdb.c + msports.c + serial.c + msports.rc + diff --git a/dll/win32/msports/msports.rc b/dll/win32/msports/msports.rc new file mode 100644 index 00000000000..7b6ec241d2c --- /dev/null +++ b/dll/win32/msports/msports.rc @@ -0,0 +1,16 @@ +#include +#include "resource.h" + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "Ports Class Installer\0" +#define REACTOS_STR_INTERNAL_NAME "msports\0" +#define REACTOS_STR_ORIGINAL_FILENAME "msports.dll\0" +#include + +#include "lang/de-DE.rc" +#include "lang/en-US.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/uk-UA.rc" diff --git a/dll/win32/msports/msports.spec b/dll/win32/msports/msports.spec new file mode 100644 index 00000000000..3be8a92914e --- /dev/null +++ b/dll/win32/msports/msports.spec @@ -0,0 +1,12 @@ +@ stdcall ComDBClaimNextFreePort(ptr ptr) +@ stdcall ComDBClaimPort(ptr long long ptr) +@ stdcall ComDBClose(ptr) +@ stdcall ComDBGetCurrentPortUsage(ptr ptr long long ptr) +@ stdcall ComDBOpen(ptr) +@ stdcall ComDBReleasePort(ptr long) +@ stdcall ComDBResizeDatabase(ptr long) +@ stdcall LibMain(ptr long ptr) DllMain +@ stub ParallelPortPropPageProvider +@ stdcall PortsClassInstaller(long ptr ptr) +@ stub SerialDisplayAdvancedSettings +@ stdcall SerialPortPropPageProvider(ptr ptr long) diff --git a/dll/win32/msports/resource.h b/dll/win32/msports/resource.h new file mode 100644 index 00000000000..de46f09ff7f --- /dev/null +++ b/dll/win32/msports/resource.h @@ -0,0 +1,9 @@ + +#define IDD_SERIALSETTINGS 200 +#define IDC_SERIAL_BITSPERSECOND 201 +#define IDC_SERIAL_DATABITS 202 +#define IDC_SERIAL_PARITY 203 +#define IDC_SERIAL_STOPBITS 204 +#define IDC_SERIAL_FLOWCONTROL 205 +#define IDC_SERIAL_ADVANCED 206 +#define IDC_SERIAL_RESTORE 207 diff --git a/dll/win32/msports/serial.c b/dll/win32/msports/serial.c new file mode 100644 index 00000000000..d172bee63ce --- /dev/null +++ b/dll/win32/msports/serial.c @@ -0,0 +1,97 @@ +/* + * PROJECT: Ports installer library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll\win32\msports\serial.c + * PURPOSE: Serial Port property functions + * COPYRIGHT: Copyright 2011 Eric Kohl + */ + +#include +#include +#include +#include + +#include + +#include "internal.h" +#include "resource.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msports); + + +static +BOOL +OnInitDialog(HWND hwnd, + WPARAM wParam, + LPARAM lParam) +{ + FIXME("Port_OnInit()\n"); + return TRUE; +} + + +static +INT_PTR +CALLBACK +SerialSettingsDlgProc(HWND hwnd, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + FIXME("SerialSettingsDlgProc()\n"); + + switch (uMsg) + { + case WM_INITDIALOG: + return OnInitDialog(hwnd, wParam, lParam); + } + + return FALSE; +} + + +BOOL +WINAPI +SerialPortPropPageProvider(PSP_PROPSHEETPAGE_REQUEST lpPropSheetPageRequest, + LPFNADDPROPSHEETPAGE lpfnAddPropSheetPageProc, + LPARAM lParam) +{ + PROPSHEETPAGEW PropSheetPage; + HPROPSHEETPAGE hPropSheetPage; + + FIXME("SerialPortPropPageProvider(%p %p %lx)\n", + lpPropSheetPageRequest, lpfnAddPropSheetPageProc, lParam); + + if (lpPropSheetPageRequest->PageRequested == SPPSR_ENUM_ADV_DEVICE_PROPERTIES) + { + FIXME("SPPSR_ENUM_ADV_DEVICE_PROPERTIES\n"); + + PropSheetPage.dwSize = sizeof(PROPSHEETPAGEW); + PropSheetPage.dwFlags = 0; + PropSheetPage.hInstance = hInstance; + PropSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_SERIALSETTINGS); + PropSheetPage.pfnDlgProc = SerialSettingsDlgProc; + PropSheetPage.lParam = 0; + PropSheetPage.pfnCallback = NULL; + + hPropSheetPage = CreatePropertySheetPageW(&PropSheetPage); + if (hPropSheetPage == NULL) + { + FIXME("CreatePropertySheetPageW() failed!\n"); + return FALSE; + } + + if (!(*lpfnAddPropSheetPageProc)(hPropSheetPage, lParam)) + { + FIXME("lpfnAddPropSheetPageProc() failed!\n"); + DestroyPropertySheetPage(hPropSheetPage); + return FALSE; + } + } + + FIXME("Done!\n"); + + return TRUE; +} + +/* EOF */ \ No newline at end of file diff --git a/dll/win32/msrle32/CMakeLists.txt b/dll/win32/msrle32/CMakeLists.txt index 9aedf677b8f..b79aa8bd5f8 100644 --- a/dll/win32/msrle32/CMakeLists.txt +++ b/dll/win32/msrle32/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) set_rc_compiler() diff --git a/dll/win32/msvcrt/CMakeLists.txt b/dll/win32/msvcrt/CMakeLists.txt index 3cf63aa2234..6e614730c78 100644 --- a/dll/win32/msvcrt/CMakeLists.txt +++ b/dll/win32/msvcrt/CMakeLists.txt @@ -21,9 +21,7 @@ list(APPEND SOURCE msvcrt.rc ${CMAKE_CURRENT_BINARY_DIR}/msvcrt.def) -add_library(msvcrt SHARED - ${CMAKE_CURRENT_BINARY_DIR}/msvcrt_precomp.h.gch - ${SOURCE}) +add_library(msvcrt SHARED ${SOURCE}) if (NOT MSVC) set_target_properties(msvcrt PROPERTIES LINK_FLAGS "-u __seh_longjmp_unwind@4") @@ -38,7 +36,7 @@ target_link_libraries(msvcrt wine ${PSEH_LIB}) -add_pch(msvcrt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(msvcrt precomp.h) add_importlibs(msvcrt kernel32 ntdll) add_cd_file(TARGET msvcrt DESTINATION reactos/system32 FOR all) add_importlib_target(msvcrt.spec) diff --git a/dll/win32/msxml3/CMakeLists.txt b/dll/win32/msxml3/CMakeLists.txt index 40052a11d9e..bfa9239cd82 100644 --- a/dll/win32/msxml3/CMakeLists.txt +++ b/dll/win32/msxml3/CMakeLists.txt @@ -8,17 +8,16 @@ add_definitions(-D_WIN32_WINNT=0x601) add_definitions( -D__WINESRC__ -D_WINE - -DLIBXML_STATIC - -D_DLL - -D__USE_CRTIMP) + -DLIBXML_STATIC) if(MSVC) -add_definitions(/FIwine/typeof.h) + add_compiler_flags(/FIwine/typeof.h /FImsvc.h) endif(MSVC) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) set_rc_compiler() + spec2def(msxml3.dll msxml3.spec) list(APPEND SOURCE @@ -52,6 +51,10 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/msxml3_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/msxml3.def) +if(MSVC) + list(APPEND SOURCE msvc_uuid.c) +endif() + add_library(msxml3 SHARED ${SOURCE}) set_module_type(msxml3 win32dll) @@ -62,6 +65,10 @@ target_link_libraries(msxml3 wine wineldr) +if(MSVC) + target_link_libraries(msxml3 xml_uuids) +endif() + add_importlibs(msxml3 msvcrt urlmon diff --git a/dll/win32/msxml3/msvc.h b/dll/win32/msxml3/msvc.h new file mode 100644 index 00000000000..275df16088a --- /dev/null +++ b/dll/win32/msxml3/msvc.h @@ -0,0 +1,6 @@ + +extern const struct _GUID CLSID_DOMDocument; +extern const struct _GUID CLSID_XMLDocument; +extern const struct _GUID CLSID_DOMFreeThreadedDocument; +extern const struct _GUID CLSID_XMLHTTPRequest; +extern const struct _GUID CLSID_XMLDSOControl; diff --git a/dll/win32/msxml3/msvc_uuid.c b/dll/win32/msxml3/msvc_uuid.c new file mode 100644 index 00000000000..b2c502719b7 --- /dev/null +++ b/dll/win32/msxml3/msvc_uuid.c @@ -0,0 +1,7 @@ + +#define INITGUID +#include + +// This is actually CLSID_DOMDocument, but on gcc builds its defined to be like this +DEFINE_GUID(CLSID_DOMDocument2, 0x2933bf90, 0x7b36, 0x11d2, 0xb2,0x0e, 0x00,0xc0,0x4f,0x98,0x3e,0x60); + diff --git a/dll/win32/netcfgx/lang/pl-PL.rc b/dll/win32/netcfgx/lang/pl-PL.rc index c01995ac2af..88a1c6b8526 100644 --- a/dll/win32/netcfgx/lang/pl-PL.rc +++ b/dll/win32/netcfgx/lang/pl-PL.rc @@ -1,23 +1,30 @@ +/* + * translated by Polish Translation Team (Apr, 2007) + * Updated by Caemyr and Maciej Biaas (2008) + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_TCPIP_BASIC_DLG DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Moesz automatycznie pobra ustawienia sieciowe protokou IP, jeeli Twoja sie obsuguje te funkcje. W innym przypadku musisz skontaktowa si z administratorem w celu zdobycia odpowiednich ustawie.", -1, 9, 9, 228, 27 + LTEXT "Możesz automatycznie pobrać ustawienia sieciowe protokołu IP, jeżeli Twoja sieć obsługuje te funkcje. W innym przypadku musisz skontaktować się z administratorem sieci w celu zdobycia odpowiednich ustawień.", -1, 9, 9, 228, 27 CONTROL "Pobierz adres IP automatycznie", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12 GROUPBOX "", -1, 9, 61, 228, 70, BS_GROUPBOX - CONTROL "&Uyj nastpujcego adresu IP:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 105, 12 + CONTROL "&Użyj następującego adresu IP:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 105, 12 LTEXT "Adres IP:", -1, 14, 75, 135, 8 CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP,150,75-2,80,12 LTEXT "Maska podsieci:", -1, 14, 90, 135, 8 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32",WS_TABSTOP,150,90-2,80,12 - LTEXT "Domylna brama:", -1, 14, 105, 135, 8 + LTEXT "Brama domyślna:", -1, 14, 105, 135, 8 CONTROL "",IDC_DEFGATEWAY,"SysIPAddress32",WS_TABSTOP,150,105-2,80,12 - CONTROL "Pobierz adresy serwerw DNS automatycznie", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 + CONTROL "Pobierz adresy serwerów DNS automatycznie", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 GROUPBOX "", -1, 9, 157, 228, 47, BS_GROUPBOX - CONTROL "&Uyj poniszych adresw serwerw DNS", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 142, 12 + CONTROL "&Użyj poniższych adresów serwera DNS", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 142, 12 LTEXT "Pierwszy serwer DNS:", -1, 14, 171, 135, 8 CONTROL "",IDC_DNS1,"SysIPAddress32",WS_TABSTOP,150,171-2,80,12 LTEXT "Alternatywny serwer DNS:", -1, 14, 186, 135, 8 @@ -30,15 +37,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "Konfiguracja alternatywna" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Jeli ten komputer jest uywany w wicej ni jednej sieci, wprowad poniej alternatywne ustawienia protokou IP", -1, 9, 9, 220, 20 + LTEXT "Jeśli ten komputer jest używany w więcej niż jednej sieci, wprowadź poniżej alternatywne ustawienia protokołu IP", -1, 9, 9, 220, 20 CONTROL "Au&tomatyczny prywatny adres IP", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12 GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX - CONTROL "&Ustawienia konfigurowane przez uytkownika", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12 + CONTROL "&Ustawienia konfigurowane przez użytkownika", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12 LTEXT "Adres &IP:", -1, 14, 75, 135, 8 CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 150, 75, 80, 12 LTEXT "&Maska podsieci:", -1, 14, 95, 135, 8 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32",WS_TABSTOP, 150, 95, 80, 12 - LTEXT "&Brama domylna:", -1, 14, 115, 135, 8 + LTEXT "&Brama domyślna:", -1, 14, 115, 135, 8 CONTROL "",IDC_DEFGATEWAY,"SysIPAddress32",WS_TABSTOP, 150, 115, 80, 12 LTEXT "&Preferowany serwer DNS:", -1, 14, 150, 135, 8 CONTROL "",IDC_DNS1,"SysIPAddress32",WS_TABSTOP, 150, 150, 80, 12 @@ -48,19 +55,19 @@ END IDD_TCPIP_ADVIP_DLG DIALOGEX DISCARDABLE 0, 0, 247, 247 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Ustawienia protokou IP" +CAPTION "Ustawienia protokołu IP" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Adresy IP", -1, 5, 5, 240, 90 CONTROL "", IDC_IPLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 15, 210, 55 PUSHBUTTON "Dodaj...", IDC_IPADD, 60, 75, 50, 14, WS_TABSTOP PUSHBUTTON "Edytuj...", IDC_IPMOD, 120, 75, 50, 14, WS_TABSTOP - PUSHBUTTON "Usu", IDC_IPDEL, 180, 75, 50, 14, WS_TABSTOP - GROUPBOX "Domylne bramy:", -1, 5, 100, 240, 90 + PUSHBUTTON "Usuń", IDC_IPDEL, 180, 75, 50, 14, WS_TABSTOP + GROUPBOX "Bramy domyślne:", -1, 5, 100, 240, 90 CONTROL "", IDC_GWLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 110, 210, 55 PUSHBUTTON "Dodaj...", IDC_GWADD, 60, 170, 50, 14, WS_TABSTOP PUSHBUTTON "Edytuj...", IDC_GWMOD, 120, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "Usu", IDC_GWDEL, 180, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Usuń", IDC_GWDEL, 180, 170, 50, 14, WS_TABSTOP GROUPBOX "", -1, 5, 200, 240, 30 CHECKBOX "Metryka automatyczna", IDC_AUTOMETRIC, 9, 200, 90, 12, BS_AUTOCHECKBOX | WS_TABSTOP LTEXT "Metryka interfejsu:", -1, 15, 215, 90, 12 @@ -73,26 +80,26 @@ CAPTION "DNS" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_DNSADDRLIST, 5, 15, 180, 60, LBS_NOTIFY - LTEXT "Adresy serwerw D&NS wedug kolejnoci uywania:", -1, 5, 5, 180, 12 - PUSHBUTTON "W gr", IDC_DNSADDRUP, 190, 30, 50, 14, WS_TABSTOP - PUSHBUTTON "W d", IDC_DNSADDRDOWN, 190, 50, 50, 14, WS_TABSTOP + LTEXT "Adresy serwerów D&NS według kolejności używania:", -1, 5, 5, 180, 12 + PUSHBUTTON "W górę", IDC_DNSADDRUP, 190, 30, 50, 14, WS_TABSTOP + PUSHBUTTON "W dół", IDC_DNSADDRDOWN, 190, 50, 50, 14, WS_TABSTOP PUSHBUTTON "&Dodaj...", IDC_DNSADDRADD, 30, 70, 50, 14, WS_TABSTOP PUSHBUTTON "&Edytuj...", IDC_DNSADDRMOD, 100, 70, 50, 14, WS_TABSTOP - PUSHBUTTON "&Usu", IDC_DNSADDRDEL, 170, 70, 50, 14, WS_TABSTOP - LTEXT "Trzy ponisze ustawienia dotycz wszystkich pocze o wczonym protokole TCP/IP. W celu rozpoznawania nazw niekwalifikowanych:", -1, 5, 90, 220, 24 - CONTROL "D&ocz sufiksy DNS: podstawowy i konkretnego poczenia", IDC_PRIMSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 110, 160, 12 - CHECKBOX "Docz su&fiksy nadrzdne podstawowego sufiksu DNS", IDC_TOPPRIMSUFFIX, 15, 125, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CONTROL "Do&cz ponisze sufiksy DNS (w podanej kolejnoci):", IDC_SELSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 140, 190, 12 + PUSHBUTTON "&Usuń", IDC_DNSADDRDEL, 170, 70, 50, 14, WS_TABSTOP + LTEXT "Trzy poniższe ustawienia dotyczą wszystkich połączeń o włączonym protokole TCP/IP. W celu rozpoznawania nazw niekwalifikowanych:", -1, 5, 90, 220, 24 + CONTROL "D&ołącz sufiksy DNS: podstawowy i konkretnego połączenia", IDC_PRIMSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 110, 160, 12 + CHECKBOX "Dołącz su&fiksy nadrzędne podstawowego sufiksu DNS", IDC_TOPPRIMSUFFIX, 15, 125, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CONTROL "Dołą&cz poniższe sufiksy DNS (w podanej kolejności):", IDC_SELSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 140, 190, 12 LISTBOX IDC_DNSSUFFIXLIST, 5, 155, 180, 60, LBS_NOTIFY - PUSHBUTTON "W gr", IDC_DNSSUFFIXUP, 190, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "W d", IDC_DNSSUFFIXDOWN, 190, 190, 50, 14, WS_TABSTOP + PUSHBUTTON "W górę", IDC_DNSSUFFIXUP, 190, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "W dół", IDC_DNSSUFFIXDOWN, 190, 190, 50, 14, WS_TABSTOP PUSHBUTTON "Dod&aj...", IDC_DNSSUFFIXADD, 30, 210, 50, 14, WS_TABSTOP PUSHBUTTON "Ed&ytuj...", IDC_DNSSUFFIXMOD, 100, 210, 50, 14, WS_TABSTOP - PUSHBUTTON "U&su", IDC_DNSSUFFIXDEL, 170, 210, 50, 14, WS_TABSTOP - LTEXT "Sufiks DNS dla &tego poczenia:", -1, 5, 225, 110, 14 + PUSHBUTTON "U&suń", IDC_DNSSUFFIXDEL, 170, 210, 50, 14, WS_TABSTOP + LTEXT "Sufiks DNS dla &tego połączenia:", -1, 5, 225, 110, 14 EDITTEXT IDC_SUFFIX, 120, 225, 100, 12, WS_TABSTOP - CHECKBOX "&Zarejestruj adresy tego poczenia w DNS", IDC_REGSUFFIX, 15, 240, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "Uy&j sufiksu DNS tego poczenia do rejestracji w DNS", IDC_USESUFFIX, 15, 255, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Zarejestruj adresy tego połączenia w DNS", IDC_REGSUFFIX, 15, 240, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Uży&j sufiksu DNS tego połączenia do rejestracji w DNS", IDC_USESUFFIX, 15, 255, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP END @@ -103,7 +110,7 @@ FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_OPTLIST, 5, 30, 230, 70 LTEXT "&Ustawienia opcjonalne", -1, 5, 15, 130, 12 - PUSHBUTTON "&Waciwoci", IDC_OPTPROP, 160, 100, 70, 14, WS_TABSTOP + PUSHBUTTON "&Właściwości", IDC_OPTPROP, 160, 100, 70, 14, WS_TABSTOP GROUPBOX "Opis:", -1, 5, 120, 240, 70 LTEXT "", IDC_OPTDESC, 15, 130, 220, 33 END @@ -162,25 +169,25 @@ STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Filtrowanie TCP/IP" FONT 8, "MS Shell Dlg" BEGIN - CHECKBOX "Wcz filtrowanie TCP/IP (wszystkie karty)", IDC_USE_FILTER, 15, 5, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Włącz filtrowanie TCP/IP (wszystkie karty)", IDC_USE_FILTER, 15, 5, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP GROUPBOX "", -1, 5, 30, 90, 150 CONTROL "Pozwalaj wszystkim", IDC_TCP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 30, 70, 12 CONTROL "Pozwalaj tylko", IDC_TCP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 44, 70, 12 CONTROL "", IDC_TCP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 11, 62, 72, 75 PUSHBUTTON "Dodaj", IDC_TCP_ADD, 15, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "Usu", IDC_TCP_DEL, 15, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Usuń", IDC_TCP_DEL, 15, 161, 50, 14, WS_TABSTOP GROUPBOX "", -1, 105, 30, 90, 150 CONTROL "Pozwalaj wszystkim", IDC_UDP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 30, 70, 12 CONTROL "Pozwalaj tylko", IDC_UDP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 44, 70, 12 CONTROL "", IDC_UDP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 111, 62, 72, 75 PUSHBUTTON "Dodaj", IDC_UDP_ADD, 115, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "Usu", IDC_UDP_DEL, 115, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Usuń", IDC_UDP_DEL, 115, 161, 50, 14, WS_TABSTOP GROUPBOX "", -1, 205, 30, 90, 150 CONTROL "Pozwalaj wszystkim", IDC_IP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 30, 70, 12 CONTROL "Pozwalaj tylko", IDC_IP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 44, 70, 12 CONTROL "", IDC_IP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 211, 62, 72, 75 PUSHBUTTON "Dodaj", IDC_IP_ADD, 215, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "Usu", IDC_IP_DEL, 215, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Usuń", IDC_IP_DEL, 215, 161, 50, 14, WS_TABSTOP PUSHBUTTON "OK", IDC_OK, 150, 190, 50, 14, WS_TABSTOP PUSHBUTTON "Anuluj", IDCANCEL, 210, 190, 50, 14, WS_TABSTOP END @@ -198,32 +205,32 @@ END STRINGTABLE BEGIN - IDS_NET_CONNECT "Poczenie sieciowe" - IDS_NO_IPADDR_SET "Ta karta wymaga co najmniej jednego adresu IP. Wprowad adres IP." - IDS_NO_SUBMASK_SET "Wprowadzono adres, w ktrym brakuje maski podsieci. Wprowad mask podsieci." - IDS_TCPFILTERDESC "Filtrowanie pakietw TCP/IP pozwala na kontrolowanie w sieci tego typu ruchu TCP/IP, ktry dociera do danego komputera." - IDS_TCPFILTER "Filtrowanie protokou TCP/IP" + IDS_NET_CONNECT "Połączenie sieciowe" + IDS_NO_IPADDR_SET "Ta karta wymaga co najmniej jednego adresu IP. Wprowadź adres IP." + IDS_NO_SUBMASK_SET "Wprowadzono adres, w którym brakuje maski podsieci. Wprowadź maskę podsieci." + IDS_TCPFILTERDESC "Filtrowanie pakietów TCP/IP pozwala na kontrolowanie w sieci tego typu ruchu TCP/IP, który dociera do danego komputera." + IDS_TCPFILTER "Filtrowanie protokołu TCP/IP" IDS_IPADDR "Adres IP" IDS_SUBMASK "Maska podsieci" IDS_GATEWAY "Brama" IDS_METRIC "Metryka" - IDS_DHCPACTIVE "DHCP wczone" + IDS_DHCPACTIVE "DHCP włączone" IDS_AUTOMATIC "Automatyczna" - IDS_NOITEMSEL "Nie wybrano adnego elementu. Najpierw wybierz element." + IDS_NOITEMSEL "Nie wybrano żadnego elementu. Najpierw wybierz element." IDS_TCPIP "ReactOS-TCP/IP" IDS_ADD "Dodaj" IDS_MOD "OK" IDS_TCP_PORTS "Porty TCP" IDS_UDP_PORTS "Porty UDP" - IDS_IP_PROTO "Protokoy IP" - IDS_PORT_RANGE "Numery portw musz by wiksze od 0 i mniejsze od 65536. Wprowad liczb z tego zakresu." - IDS_PROT_RANGE "Numery protokow musz by wiksze od 0 i mniejsze od 256. Wprowad liczb z tego zakresu." - IDS_DUP_NUMBER "Podana liczba znajduje si ju na licie. Wprowad inn liczb." - IDS_DISABLE_FILTER "Wyczenie tego globalnego ustawienia protokou TCP/IP bdzie miao wpyw na wszystkie karty." - IDS_NO_SUFFIX "Aktualne ustawienie przeszukiwania wymaga podania przynajmniej jednego sufiksu DNS. Wprowad sufiks DNS lub zmie ustawienia." - IDS_DOMAIN_SUFFIX "Podany sufiks domeny jest nieprawidowy." - IDS_DNS_SUFFIX "Nazwa domeny DNS ""%s"" jest nieprawidowa." - IDS_DUP_SUFFIX "Sufiks DNS znajduje si ju na licie." - IDS_DUP_IPADDR "Adres IP znajduje si ju na licie." - IDS_DUP_GW "Domylna brama znajduje si ju na licie." + IDS_IP_PROTO "Protokoły IP" + IDS_PORT_RANGE "Numery portów muszą być większe od 0 i mniejsze od 65536. Wprowadź liczbę z tego zakresu." + IDS_PROT_RANGE "Numery protokołów muszą być większe od 0 i mniejsze od 256. Wprowadź liczbę z tego zakresu." + IDS_DUP_NUMBER "Podana liczba znajduje się już na liście. Wprowadź inną liczbę." + IDS_DISABLE_FILTER "Wyłączenie tego globalnego ustawienia protokołu TCP/IP będzie miało wpływ na wszystkie karty." + IDS_NO_SUFFIX "Aktualne ustawienie przeszukiwania wymaga podania przynajmniej jednego sufiksu DNS. Wprowadź sufiks DNS lub zmień ustawienia." + IDS_DOMAIN_SUFFIX "Podany sufiks domeny jest nieprawidłowy." + IDS_DNS_SUFFIX "Nazwa domeny DNS ""%s"" jest nieprawidłowa." + IDS_DUP_SUFFIX "Sufiks DNS znajduje się już na liście." + IDS_DUP_IPADDR "Adres IP znajduje się już na liście." + IDS_DUP_GW "Domyślna brama znajduje się już na liście." END diff --git a/dll/win32/netcfgx/lang/ru-RU.rc b/dll/win32/netcfgx/lang/ru-RU.rc index fb2eba038f3..f4ad74e3069 100644 --- a/dll/win32/netcfgx/lang/ru-RU.rc +++ b/dll/win32/netcfgx/lang/ru-RU.rc @@ -2,68 +2,68 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_TCPIP_BASIC_DLG DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Основные" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP , . .", -1, 9, 9, 228, 27 - CONTROL " IP- ", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12 + LTEXT "Параметры протокола IP могут назначаться автоматически, если сеть поддерживает такую возможность. В противном случае эти параметры можно получить у сетевого администратора.", -1, 9, 9, 228, 27 + CONTROL "Получать IP-адрес автоматически", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12 GROUPBOX "", -1, 9, 61, 228, 70, BS_GROUPBOX - CONTROL "& IP-:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 140, 12 - LTEXT "IP-:", -1, 14, 75, 135, 8 + CONTROL "&Использовать указанный IP-адрес:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 140, 12 + LTEXT "IP-адрес:", -1, 14, 75, 135, 8 CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP,150,75-2,80,12 - LTEXT " :", -1, 14, 90, 135, 8 + LTEXT "Маска подсети:", -1, 14, 90, 135, 8 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32",WS_TABSTOP,150,90-2,80,12 - LTEXT " :", -1, 14, 105, 135, 8 + LTEXT "Шлюз по умолчанию:", -1, 14, 105, 135, 8 CONTROL "",IDC_DEFGATEWAY,"SysIPAddress32",WS_TABSTOP,150,105-2,80,12 - CONTROL " DNS- ", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 + CONTROL "Получать адрес DNS-сервера автоматически", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 GROUPBOX "", -1, 9, 157, 228, 47, BS_GROUPBOX - CONTROL "& DNS-", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 185, 12 - LTEXT " DNS-:", -1, 14, 171, 135, 8 + CONTROL "&Использовать следующие адреса DNS-серверов", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 185, 12 + LTEXT "Предпочитаемый DNS-сервер:", -1, 14, 171, 135, 8 CONTROL "",IDC_DNS1,"SysIPAddress32",WS_TABSTOP,150,171-2,80,12 - LTEXT " DNS-:", -1, 14, 186, 135, 8 + LTEXT "Альтернативный DNS-сервер:", -1, 14, 186, 135, 8 CONTROL "",IDC_DNS2,"SysIPAddress32",WS_TABSTOP,150,186-2,80,12 - PUSHBUTTON "&", IDC_ADVANCED, 162, 209, 74, 14, WS_TABSTOP + PUSHBUTTON "&Дополнительно", IDC_ADVANCED, 162, 209, 74, 14, WS_TABSTOP END IDD_TCPIP_ALTCF_DLG DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " " +CAPTION "Альтернативная конфигурация" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , IP:", -1, 9, 9, 230, 20 - CONTROL "& IP-", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12 + LTEXT "Если этот компьютер используется в нескольких сетях, введите параметры альтернативной конфигурации протокола IP:", -1, 9, 9, 230, 20 + CONTROL "А&втоматический частный IP-адрес", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12 GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX - CONTROL "& ", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 130, 12 - LTEXT "IP-&:", -1, 14, 75, 135, 8 + CONTROL "Настраиваем&ый пользователем", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 130, 12 + LTEXT "IP-&адрес:", -1, 14, 75, 135, 8 CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 150, 75, 80, 12 - LTEXT "& :", -1, 14, 95, 135, 8 + LTEXT "Ма&ска подсети:", -1, 14, 95, 135, 8 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32",WS_TABSTOP, 150, 95, 80, 12 - LTEXT "& :", -1, 14, 115, 135, 8 + LTEXT "&Основной шлюз:", -1, 14, 115, 135, 8 CONTROL "",IDC_DEFGATEWAY,"SysIPAddress32",WS_TABSTOP, 150, 115, 80, 12 - LTEXT "& DNS-:", -1, 14, 150, 135, 8 + LTEXT "Пр&едпочитаемый DNS-сервер:", -1, 14, 150, 135, 8 CONTROL "",IDC_DNS1,"SysIPAddress32",WS_TABSTOP, 150, 150, 80, 12 - LTEXT "& DNS-:", -1, 14, 165, 180, 8 + LTEXT "Ал&ьтернативный DNS-сервер:", -1, 14, 165, 180, 8 CONTROL "",IDC_DNS2,"SysIPAddress32",WS_TABSTOP, 150, 165, 80, 12 END IDD_TCPIP_ADVIP_DLG DIALOGEX DISCARDABLE 0, 0, 247, 247 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " IP" +CAPTION "Параметры IP" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "IP-&", -1, 5, 5, 240, 90 + GROUPBOX "IP-&адреса", -1, 5, 5, 240, 90 CONTROL "", IDC_IPLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 15, 210, 55 - PUSHBUTTON "&...", IDC_IPADD, 60, 75, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_IPMOD, 120, 75, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_IPDEL, 180, 75, 50, 14, WS_TABSTOP - GROUPBOX "& :", -1, 5, 100, 240, 90 + PUSHBUTTON "&Добавить...", IDC_IPADD, 60, 75, 50, 14, WS_TABSTOP + PUSHBUTTON "&Изменить...", IDC_IPMOD, 120, 75, 50, 14, WS_TABSTOP + PUSHBUTTON "&Удалить", IDC_IPDEL, 180, 75, 50, 14, WS_TABSTOP + GROUPBOX "&Основные шлюзы:", -1, 5, 100, 240, 90 CONTROL "", IDC_GWLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 110, 210, 55 - PUSHBUTTON "&...", IDC_GWADD, 60, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_GWMOD, 120, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_GWDEL, 180, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "До&бавить...", IDC_GWADD, 60, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "И&зменить...", IDC_GWMOD, 120, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Уда&лить", IDC_GWDEL, 180, 170, 50, 14, WS_TABSTOP GROUPBOX "", -1, 5, 200, 240, 30 - CHECKBOX "& ", IDC_AUTOMETRIC, 9, 200, 146, 12, BS_AUTOCHECKBOX | WS_TABSTOP - LTEXT " &:", -1, 15, 215, 90, 12 + CHECKBOX "А&втоматическое назначение метрики", IDC_AUTOMETRIC, 9, 200, 146, 12, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "Метрика ин&терфейса:", -1, 15, 215, 90, 12 EDITTEXT IDC_METRIC, 110, 212, 50, 12, WS_TABSTOP | ES_NUMBER END @@ -73,157 +73,157 @@ CAPTION "DNS" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_DNSADDRLIST, 5, 15, 180, 60, LBS_NOTIFY - LTEXT "& DNS-, :", -1, 5, 5, 180, 10 - PUSHBUTTON "", IDC_DNSADDRUP, 190, 30, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_DNSADDRDOWN, 190, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSADDRADD, 30, 70, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSADDRMOD, 100, 70, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_DNSADDRDEL, 170, 70, 50, 14, WS_TABSTOP - LTEXT " , TCP/IP. :", -1, 5, 90, 238, 20 - CONTROL " & DNS- ", IDC_PRIMSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 110, 234, 12 - CHECKBOX " & . DNS-", IDC_TOPPRIMSUFFIX, 15, 125, 220, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CONTROL " & DNS- ( ):", IDC_SELSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 140, 206, 12 + LTEXT "&Адреса DNS-серверов, в порядке использования:", -1, 5, 5, 180, 10 + PUSHBUTTON "Вверх", IDC_DNSADDRUP, 190, 30, 50, 14, WS_TABSTOP + PUSHBUTTON "Вниз", IDC_DNSADDRDOWN, 190, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "&Добавить...", IDC_DNSADDRADD, 30, 70, 50, 14, WS_TABSTOP + PUSHBUTTON "И&зменить...", IDC_DNSADDRMOD, 100, 70, 50, 14, WS_TABSTOP + PUSHBUTTON "&Удалить", IDC_DNSADDRDEL, 170, 70, 50, 14, WS_TABSTOP + LTEXT "Следующие три параметра применяются для всех подключений, использующих TCP/IP. Для разрешения неизвестных имен:", -1, 5, 90, 238, 20 + CONTROL "Дописывать &основной DNS-суффикс и суффикс подключения", IDC_PRIMSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 110, 234, 12 + CHECKBOX "Дописывать роди&тельские суффиксы осн. DNS-суффикса", IDC_TOPPRIMSUFFIX, 15, 125, 220, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CONTROL "Дописывать сл&едующие DNS-суффиксы (по порядку):", IDC_SELSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 140, 206, 12 LISTBOX IDC_DNSSUFFIXLIST, 5, 155, 180, 60, LBS_NOTIFY - PUSHBUTTON "", IDC_DNSSUFFIXUP, 190, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_DNSSUFFIXDOWN, 190, 190, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSSUFFIXADD, 30, 210, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSSUFFIXMOD, 100, 210, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_DNSSUFFIXDEL, 170, 210, 50, 14, WS_TABSTOP - LTEXT "DNS-& :", -1, 5, 225, 110, 14 + PUSHBUTTON "Вверх", IDC_DNSSUFFIXUP, 190, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Вниз", IDC_DNSSUFFIXDOWN, 190, 190, 50, 14, WS_TABSTOP + PUSHBUTTON "До&бавить...", IDC_DNSSUFFIXADD, 30, 210, 50, 14, WS_TABSTOP + PUSHBUTTON "Из&менить...", IDC_DNSSUFFIXMOD, 100, 210, 50, 14, WS_TABSTOP + PUSHBUTTON "Уда&лить", IDC_DNSSUFFIXDEL, 170, 210, 50, 14, WS_TABSTOP + LTEXT "DNS-&суффикс подключения:", -1, 5, 225, 110, 14 EDITTEXT IDC_SUFFIX, 120, 225, 100, 12, WS_TABSTOP - CHECKBOX "& DNS", IDC_REGSUFFIX, 8, 240, 204, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "& DNS- DNS", IDC_USESUFFIX, 8, 255, 270, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Заре&гистрировать адреса этого подключения в DNS", IDC_REGSUFFIX, 8, 240, 204, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Использовать DNS-суффикс подключения при регистрации в DNS", IDC_USESUFFIX, 8, 255, 270, 12, BS_AUTOCHECKBOX | WS_TABSTOP END IDD_TCPIP_ADVOPT_DLG DIALOGEX DISCARDABLE 0, 0, 247, 247 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_OPTLIST, 5, 30, 230, 70 - LTEXT "& ", -1, 5, 15, 130, 12 - PUSHBUTTON "&", IDC_OPTPROP, 160, 100, 70, 14, WS_TABSTOP - GROUPBOX ":", -1, 5, 120, 240, 70 + LTEXT "&Дополнительные параметры", -1, 5, 15, 130, 12 + PUSHBUTTON "&Свойства", IDC_OPTPROP, 160, 100, 70, 14, WS_TABSTOP + GROUPBOX "Описание:", -1, 5, 120, 240, 70 LTEXT "", IDC_OPTDESC, 15, 130, 220, 33 END IDD_TCPIPADDIP_DLG DIALOGEX DISCARDABLE 0, 0, 200, 70 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "TCP/IP " +CAPTION "TCP/IP адрес" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 100, 15, 80, 12 - LTEXT "IP :", -1, 5, 15, 70, 12 - LTEXT " :", -1, 5, 30, 70, 12 + LTEXT "IP адрес:", -1, 5, 15, 70, 12 + LTEXT "Маска подсети:", -1, 5, 30, 70, 12 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32", WS_TABSTOP, 100, 30, 80, 12 PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP END IDD_TCPIPGW_DLG DIALOGEX DISCARDABLE 0, 0, 200, 80 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " TCP/IP " +CAPTION "Адрес TCP/IP шлюза" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 100, 15, 80, 12 - LTEXT ":", -1, 5, 15, 70, 12 - CHECKBOX " ", IDC_USEMETRIC, 15, 30, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP - LTEXT "&:", IDC_METRICTXT, 5, 45, 45, 12, WS_DISABLED + LTEXT "Шлюз:", -1, 5, 15, 70, 12 + CHECKBOX "Автоматическая метрика", IDC_USEMETRIC, 15, 30, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "&Метрика:", IDC_METRICTXT, 5, 45, 45, 12, WS_DISABLED EDITTEXT IDC_METRIC, 100, 45, 50, 12, WS_TABSTOP | ES_NUMBER | WS_DISABLED PUSHBUTTON "", IDC_OK, 50, 60, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 60, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 110, 60, 50, 14, WS_TABSTOP END IDD_TCPIPDNS_DLG DIALOGEX DISCARDABLE 0, 0, 200, 80 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "TCP/IP DNS " +CAPTION "TCP/IP DNS сервер" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 5, 25, 80, 12 - LTEXT "DNS :", -1, 5, 10, 120, 12 + LTEXT "DNS сервер:", -1, 5, 10, 120, 12 PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP END IDD_TCPIPSUFFIX_DLG DIALOGEX DISCARDABLE 0, 0, 200, 80 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " TCP/IP" +CAPTION "Доменный суффикс TCP/IP" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_SUFFIX, 5, 25, 190, 12, WS_TABSTOP - LTEXT "& :", -1, 5, 10, 120, 12 + LTEXT "&Доменный суффикс:", -1, 5, 10, 120, 12 PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP END IDD_TCPIP_FILTER_DLG DIALOGEX DISCARDABLE 0, 0, 305, 220 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " TCP/IP" +CAPTION "Фильтрация TCP/IP" FONT 8, "MS Shell Dlg" BEGIN - CHECKBOX "& TCP/IP ( )", IDC_USE_FILTER, 15, 5, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Задействовать фильтрацию TCP/IP (все адаптеры)", IDC_USE_FILTER, 15, 5, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP GROUPBOX "", -1, 5, 30, 90, 150 - CONTROL "& ", IDC_TCP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 30, 70, 12 - CONTROL "&", IDC_TCP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 44, 70, 12 + CONTROL "&Можно все", IDC_TCP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 30, 70, 12 + CONTROL "&Только", IDC_TCP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 44, 70, 12 CONTROL "", IDC_TCP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 11, 62, 72, 75 - PUSHBUTTON "...", IDC_TCP_ADD, 15, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_TCP_DEL, 15, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Добавить...", IDC_TCP_ADD, 15, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "&Удалить", IDC_TCP_DEL, 15, 161, 50, 14, WS_TABSTOP GROUPBOX "", -1, 105, 30, 90, 150 - CONTROL "& ", IDC_UDP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 30, 70, 12 - CONTROL "&", IDC_UDP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 44, 70, 12 + CONTROL "Мо&жно все", IDC_UDP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 30, 70, 12 + CONTROL "То&лько", IDC_UDP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 44, 70, 12 CONTROL "", IDC_UDP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 111, 62, 72, 75 - PUSHBUTTON "...", IDC_UDP_ADD, 115, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_UDP_DEL, 115, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Добавить...", IDC_UDP_ADD, 115, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Уд&алить", IDC_UDP_DEL, 115, 161, 50, 14, WS_TABSTOP GROUPBOX "", -1, 205, 30, 90, 150 - CONTROL " &", IDC_IP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 30, 70, 12 - CONTROL "&", IDC_IP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 44, 70, 12 + CONTROL "Можно &все", IDC_IP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 30, 70, 12 + CONTROL "Тол&ько", IDC_IP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 44, 70, 12 CONTROL "", IDC_IP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 211, 62, 72, 75 - PUSHBUTTON "...", IDC_IP_ADD, 215, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_IP_DEL, 215, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Добавить...", IDC_IP_ADD, 215, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Удал&ить", IDC_IP_DEL, 215, 161, 50, 14, WS_TABSTOP PUSHBUTTON "OK", IDC_OK, 150, 190, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 210, 190, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 210, 190, 50, 14, WS_TABSTOP END IDD_TCPIP_PORT_DLG DIALOGEX DISCARDABLE 0, 0, 200, 60 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Добавление фильтра" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_PORT_VAL, 5, 30, 70, 12, WS_TABSTOP | ES_NUMBER LTEXT "", IDC_PORT_DESC, 5, 15, 40, 12 PUSHBUTTON "OK", IDC_OK, 120, 15, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP END STRINGTABLE BEGIN - IDS_NET_CONNECT " " - IDS_NO_IPADDR_SET " IP-. ." - IDS_NO_SUBMASK_SET " . ." - IDS_TCPFILTERDESC " TCP/IP TCP/IP, ." - IDS_TCPFILTER " TCP/IP" - IDS_IPADDR "IP-" - IDS_SUBMASK " " - IDS_GATEWAY "" - IDS_METRIC "" - IDS_DHCPACTIVE "DHCP " - IDS_AUTOMATIC "" - IDS_NOITEMSEL " . ." + IDS_NET_CONNECT "Сетевые подключения" + IDS_NO_IPADDR_SET "Этот адаптер требует ввода хотя бы одного IP-адреса. Введите адрес." + IDS_NO_SUBMASK_SET "Введен адрес без указания маски подсети. Введите маску подсети." + IDS_TCPFILTERDESC "Фильтрация TCP/IP позволяет контролировать сетевой трафик TCP/IP, поступающий на данный компьютер." + IDS_TCPFILTER "Фильтрация TCP/IP" + IDS_IPADDR "IP-адрес" + IDS_SUBMASK "Маска подсети" + IDS_GATEWAY "Шлюз" + IDS_METRIC "Метрика" + IDS_DHCPACTIVE "DHCP включен" + IDS_AUTOMATIC "Автоматически" + IDS_NOITEMSEL "Не выбрано ни одного элемента. Следует выбрать хоты бы один элемент." IDS_TCPIP "ReactOS-TCP/IP" - IDS_ADD "" + IDS_ADD "Добавить" IDS_MOD "OK" - IDS_TCP_PORTS "TCP-" - IDS_UDP_PORTS "UDP-" - IDS_IP_PROTO "IP-" - IDS_PORT_RANGE " 0 65536. ." - IDS_PROT_RANGE " 0 256. ." - IDS_DUP_NUMBER ", , . ." - IDS_DISABLE_FILTER " TCP/IP ." - IDS_NO_SUFFIX " DNS. ." - IDS_DOMAIN_SUFFIX " ." - IDS_DNS_SUFFIX "DNS- ""%s"" DNS-." - IDS_DUP_SUFFIX "DNS- ." - IDS_DUP_IPADDR "IP- ." - IDS_DUP_GW " ." + IDS_TCP_PORTS "TCP-проты" + IDS_UDP_PORTS "UDP-проты" + IDS_IP_PROTO "IP-протоколы" + IDS_PORT_RANGE "Номера портов должны быть больше 0 и меньше 65536. Введите номер в этом диапазоне." + IDS_PROT_RANGE "Номера протоколов должны быть больше 0 и меньше 256. Введите номер в этом диапазоне." + IDS_DUP_NUMBER "Номер, который вы хотите добавить, уже имеется в списке. Введите другой номер." + IDS_DISABLE_FILTER "Запрещение этого глобального параметра TCP/IP повлияет на все адаптеры." + IDS_NO_SUFFIX "Текущие установки метода поиска требуют указания по меньшей мере одного суффикса DNS. Введите суффикс или измените установки." + IDS_DOMAIN_SUFFIX "Неправильный суффикс домена." + IDS_DNS_SUFFIX "DNS-имя домена ""%s"" не является допустимым DNS-именем." + IDS_DUP_SUFFIX "DNS-суфикс уже имеется в списке." + IDS_DUP_IPADDR "IP-адрес уже имеется в списке." + IDS_DUP_GW "Шлюз по умолчанию уже в списке." END diff --git a/dll/win32/netcfgx/lang/uk-UA.rc b/dll/win32/netcfgx/lang/uk-UA.rc index 7a3622cf843..b4cb469537d 100644 --- a/dll/win32/netcfgx/lang/uk-UA.rc +++ b/dll/win32/netcfgx/lang/uk-UA.rc @@ -2,68 +2,68 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_TCPIP_BASIC_DLG DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP , . .", -1, 9, 9, 228, 27 - CONTROL " IP- ", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12 + LTEXT "Параметри протоколу IP можуть призначатися автоматично, якщо мережа підтримує таку можливість. Інакше вам потрібно отримати ці параметри у адміністратора мережі.", -1, 9, 9, 228, 27 + CONTROL "Отримувати IP-адресу автоматично", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12 GROUPBOX "", -1, 9, 61, 228, 70, BS_GROUPBOX - CONTROL "& IP-:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 105, 12 - LTEXT "IP-:", -1, 14, 75, 135, 8 + CONTROL "&Використовувати наступну IP-адресу:", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON, 14, 59, 105, 12 + LTEXT "IP-адреса:", -1, 14, 75, 135, 8 CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP,150,75-2,80,12 - LTEXT " :", -1, 14, 90, 135, 8 + LTEXT "Маска підмережі:", -1, 14, 90, 135, 8 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32",WS_TABSTOP,150,90-2,80,12 - LTEXT " :", -1, 14, 105, 135, 8 + LTEXT "Шлюз за замовчуванням:", -1, 14, 105, 135, 8 CONTROL "",IDC_DEFGATEWAY,"SysIPAddress32",WS_TABSTOP,150,105-2,80,12 - CONTROL " DNS- ", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 + CONTROL "Отримувати адресу DNS-сервера автоматично", IDC_AUTODNS, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 139, 210, 12 GROUPBOX "", -1, 9, 157, 228, 47, BS_GROUPBOX - CONTROL "& DNS-", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 142, 12 - LTEXT " DNS-:", -1, 14, 171, 135, 8 + CONTROL "В&икористовувати наступні адреси DNS-серверів", IDC_FIXEDDNS, "BUTTON", BS_AUTORADIOBUTTON, 14, 155, 142, 12 + LTEXT "Основний DNS-сервер:", -1, 14, 171, 135, 8 CONTROL "",IDC_DNS1,"SysIPAddress32",WS_TABSTOP,150,171-2,80,12 - LTEXT " DNS-:", -1, 14, 186, 135, 8 + LTEXT "Альтернативний DNS-сервер:", -1, 14, 186, 135, 8 CONTROL "",IDC_DNS2,"SysIPAddress32",WS_TABSTOP,150,186-2,80,12 - PUSHBUTTON "&", IDC_ADVANCED, 186, 209, 50, 14, WS_TABSTOP + PUSHBUTTON "&Додатково", IDC_ADVANCED, 186, 209, 50, 14, WS_TABSTOP END IDD_TCPIP_ALTCF_DLG DIALOGEX DISCARDABLE 0, 0, 246, 228 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " " +CAPTION "Альтернативна конфігурація" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' , IP", -1, 9, 9, 220, 20 - CONTROL "& IP-", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12 + LTEXT "Якщо цей комп'ютер використовується в декількох мережах, введіть параметри альтернативної конфігурації IP", -1, 9, 9, 220, 20 + CONTROL "А&втоматична приватна IP-адреса", IDC_USEDHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12 GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX - CONTROL "& ", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 120, 12 - LTEXT "&IP-:", -1, 14, 75, 135, 8 + CONTROL "Н&алаштована користувачем", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 120, 12 + LTEXT "&IP-адреса:", -1, 14, 75, 135, 8 CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 150, 75, 80, 12 - LTEXT "& :", -1, 14, 95, 135, 8 + LTEXT "Ма&ска підмережі:", -1, 14, 95, 135, 8 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32",WS_TABSTOP, 150, 95, 80, 12 - LTEXT "& :", -1, 14, 115, 135, 8 + LTEXT "&Шлюз за замовчуванням:", -1, 14, 115, 135, 8 CONTROL "",IDC_DEFGATEWAY,"SysIPAddress32",WS_TABSTOP, 150, 115, 80, 12 - LTEXT "& DNS-:", -1, 14, 150, 135, 8 + LTEXT "&Основний DNS-сервер:", -1, 14, 150, 135, 8 CONTROL "",IDC_DNS1,"SysIPAddress32",WS_TABSTOP, 150, 150, 80, 12 - LTEXT "& DNS-:", -1, 14, 165, 180, 8 + LTEXT "&Альтернативний DNS-сервер:", -1, 14, 165, 180, 8 CONTROL "",IDC_DNS2,"SysIPAddress32",WS_TABSTOP, 150, 165, 80, 12 END IDD_TCPIP_ADVIP_DLG DIALOGEX DISCARDABLE 0, 0, 247, 247 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION " IP" +CAPTION "Параметри IP" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "IP-", -1, 5, 5, 240, 90 + GROUPBOX "IP-адреси", -1, 5, 5, 240, 90 CONTROL "", IDC_IPLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 15, 210, 55 - PUSHBUTTON "...", IDC_IPADD, 60, 75, 50, 14, WS_TABSTOP - PUSHBUTTON "...", IDC_IPMOD, 120, 75, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_IPDEL, 180, 75, 50, 14, WS_TABSTOP - GROUPBOX " :", -1, 5, 100, 240, 90 + PUSHBUTTON "Додати...", IDC_IPADD, 60, 75, 50, 14, WS_TABSTOP + PUSHBUTTON "Редагувати...", IDC_IPMOD, 120, 75, 50, 14, WS_TABSTOP + PUSHBUTTON "Видалити", IDC_IPDEL, 180, 75, 50, 14, WS_TABSTOP + GROUPBOX "Основні шлюзи:", -1, 5, 100, 240, 90 CONTROL "", IDC_GWLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 110, 210, 55 - PUSHBUTTON "...", IDC_GWADD, 60, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "...", IDC_GWMOD, 120, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_GWDEL, 180, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Додати...", IDC_GWADD, 60, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Редагувати...", IDC_GWMOD, 120, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Видалити", IDC_GWDEL, 180, 170, 50, 14, WS_TABSTOP GROUPBOX "", -1, 5, 200, 240, 30 - CHECKBOX " ", IDC_AUTOMETRIC, 9, 200, 90, 12, BS_AUTOCHECKBOX | WS_TABSTOP - LTEXT " :", -1, 15, 215, 90, 12 + CHECKBOX "Автоматична метрика", IDC_AUTOMETRIC, 9, 200, 90, 12, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "Метрика інтерфейсу:", -1, 15, 215, 90, 12 EDITTEXT IDC_METRIC, 110, 212, 50, 12, WS_TABSTOP | ES_NUMBER END @@ -73,157 +73,157 @@ CAPTION "DNS" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_DNSADDRLIST, 5, 15, 180, 60, LBS_NOTIFY - LTEXT " D&NS :", -1, 5, 5, 180, 12 - PUSHBUTTON "", IDC_DNSADDRUP, 190, 30, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_DNSADDRDOWN, 190, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSADDRADD, 30, 70, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSADDRMOD, 100, 70, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_DNSADDRDEL, 170, 70, 50, 14, WS_TABSTOP - LTEXT " , TCP/IP. :", -1, 5, 90, 220, 24 - CONTROL " & DNS- ", IDC_PRIMSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 110, 190, 12 - CHECKBOX " & DNS-", IDC_TOPPRIMSUFFIX, 15, 125, 194, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CONTROL " & DNS- ( ):", IDC_SELSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 140, 190, 12 + LTEXT "Адреси D&NS серверів в порядку використання:", -1, 5, 5, 180, 12 + PUSHBUTTON "Вверх", IDC_DNSADDRUP, 190, 30, 50, 14, WS_TABSTOP + PUSHBUTTON "Вниз", IDC_DNSADDRDOWN, 190, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "&Додати...", IDC_DNSADDRADD, 30, 70, 50, 14, WS_TABSTOP + PUSHBUTTON "&Редагувати...", IDC_DNSADDRMOD, 100, 70, 50, 14, WS_TABSTOP + PUSHBUTTON "&Видалити", IDC_DNSADDRDEL, 170, 70, 50, 14, WS_TABSTOP + LTEXT "Наступні три параметри застосовуються для всіх підключень, що використовують TCP/IP. Для дозволу невідомих імен:", -1, 5, 90, 220, 24 + CONTROL "Додавати &основний DNS-суфікс і суфікс підключення", IDC_PRIMSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 110, 190, 12 + CHECKBOX "Додавати &батьківські суфікси основного DNS-суфікса", IDC_TOPPRIMSUFFIX, 15, 125, 194, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CONTROL "Додавати &наступні DNS-суфікси (по порядку):", IDC_SELSUFFIX, "BUTTON", BS_AUTORADIOBUTTON, 5, 140, 190, 12 LISTBOX IDC_DNSSUFFIXLIST, 5, 155, 180, 60, LBS_NOTIFY - PUSHBUTTON "", IDC_DNSSUFFIXUP, 190, 170, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_DNSSUFFIXDOWN, 190, 190, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSSUFFIXADD, 30, 210, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", IDC_DNSSUFFIXMOD, 100, 210, 50, 14, WS_TABSTOP - PUSHBUTTON "&", IDC_DNSSUFFIXDEL, 170, 210, 50, 14, WS_TABSTOP - LTEXT "DNS-& :", -1, 5, 228, 110, 14 + PUSHBUTTON "Вверх", IDC_DNSSUFFIXUP, 190, 170, 50, 14, WS_TABSTOP + PUSHBUTTON "Вниз", IDC_DNSSUFFIXDOWN, 190, 190, 50, 14, WS_TABSTOP + PUSHBUTTON "&Додати...", IDC_DNSSUFFIXADD, 30, 210, 50, 14, WS_TABSTOP + PUSHBUTTON "&Редагувати...", IDC_DNSSUFFIXMOD, 100, 210, 50, 14, WS_TABSTOP + PUSHBUTTON "&Видалити", IDC_DNSSUFFIXDEL, 170, 210, 50, 14, WS_TABSTOP + LTEXT "DNS-&суфікс цього підключення:", -1, 5, 228, 110, 14 EDITTEXT IDC_SUFFIX, 120, 225, 100, 12, WS_TABSTOP - CHECKBOX "& DNS", IDC_REGSUFFIX, 15, 240, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "& DNS- DNS", IDC_USESUFFIX, 15, 255, 227, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Зареєструвати адреси цього підключення в DNS", IDC_REGSUFFIX, 15, 240, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Вик&ористовувати DNS-суфікс підключення при реєстрації в DNS", IDC_USESUFFIX, 15, 255, 227, 12, BS_AUTOCHECKBOX | WS_TABSTOP END IDD_TCPIP_ADVOPT_DLG DIALOGEX DISCARDABLE 0, 0, 247, 247 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_OPTLIST, 5, 30, 230, 70 - LTEXT "& ", -1, 5, 15, 130, 12 - PUSHBUTTON "&", IDC_OPTPROP, 160, 100, 70, 14, WS_TABSTOP - GROUPBOX ":", -1, 5, 120, 240, 70 + LTEXT "&Додаткові параметри", -1, 5, 15, 130, 12 + PUSHBUTTON "&Властивості", IDC_OPTPROP, 160, 100, 70, 14, WS_TABSTOP + GROUPBOX "Опис:", -1, 5, 120, 240, 70 LTEXT "", IDC_OPTDESC, 15, 130, 220, 33 END IDD_TCPIPADDIP_DLG DIALOGEX DISCARDABLE 0, 0, 200, 70 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "TCP/IP " +CAPTION "TCP/IP Адреса" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 100, 15, 80, 12 - LTEXT "IP-:", -1, 5, 15, 70, 12 - LTEXT " :", -1, 5, 30, 70, 12 + LTEXT "IP-адреса:", -1, 5, 15, 70, 12 + LTEXT "Маска підмережі:", -1, 5, 30, 70, 12 CONTROL "",IDC_SUBNETMASK,"SysIPAddress32", WS_TABSTOP, 100, 30, 80, 12 PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP END IDD_TCPIPGW_DLG DIALOGEX DISCARDABLE 0, 0, 200, 80 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " TCP/IP " +CAPTION "Адреса TCP/IP шлюза" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 100, 15, 80, 12 - LTEXT ":", -1, 5, 15, 70, 12 - CHECKBOX " ", IDC_USEMETRIC, 15, 30, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP - LTEXT "&:", IDC_METRICTXT, 5, 45, 45, 12, WS_DISABLED + LTEXT "Шлюз:", -1, 5, 15, 70, 12 + CHECKBOX "Автоматична метрика", IDC_USEMETRIC, 15, 30, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "&Метрика:", IDC_METRICTXT, 5, 45, 45, 12, WS_DISABLED EDITTEXT IDC_METRIC, 100, 45, 50, 12, WS_TABSTOP | ES_NUMBER | WS_DISABLED PUSHBUTTON "", IDC_OK, 50, 60, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 60, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 110, 60, 50, 14, WS_TABSTOP END IDD_TCPIPDNS_DLG DIALOGEX DISCARDABLE 0, 0, 200, 80 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "TCP/IP DNS " +CAPTION "TCP/IP DNS Сервер" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_IPADDR,"SysIPAddress32",WS_TABSTOP, 5, 25, 80, 12 - LTEXT "DNS :", -1, 5, 10, 120, 12 + LTEXT "DNS сервер:", -1, 5, 10, 120, 12 PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP END IDD_TCPIPSUFFIX_DLG DIALOGEX DISCARDABLE 0, 0, 200, 80 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " TCP/IP" +CAPTION "Доменний суфікс TCP/IP" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_SUFFIX, 5, 25, 190, 12, WS_TABSTOP - LTEXT " :", -1, 5, 10, 120, 12 + LTEXT "Доменний суфікс:", -1, 5, 10, 120, 12 PUSHBUTTON "", IDC_OK, 50, 50, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 110, 50, 50, 14, WS_TABSTOP END IDD_TCPIP_FILTER_DLG DIALOGEX DISCARDABLE 0, 0, 305, 220 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Գ TCP/IP" +CAPTION "Фільтрування TCP/IP" FONT 8, "MS Shell Dlg" BEGIN - CHECKBOX " TCP/IP ( )", IDC_USE_FILTER, 15, 5, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Ввімкнути фільтрування TCP/IP (всі адаптери)", IDC_USE_FILTER, 15, 5, 190, 12, BS_AUTOCHECKBOX | WS_TABSTOP GROUPBOX "", -1, 5, 30, 90, 150 - CONTROL " ", IDC_TCP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 30, 70, 12 - CONTROL " ", IDC_TCP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 44, 70, 12 + CONTROL "Можна все", IDC_TCP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 30, 70, 12 + CONTROL "Можна лише", IDC_TCP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 15, 44, 70, 12 CONTROL "", IDC_TCP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 11, 62, 72, 75 - PUSHBUTTON "", IDC_TCP_ADD, 15, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_TCP_DEL, 15, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Додати", IDC_TCP_ADD, 15, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Видалити", IDC_TCP_DEL, 15, 161, 50, 14, WS_TABSTOP GROUPBOX "", -1, 105, 30, 90, 150 - CONTROL " ", IDC_UDP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 30, 70, 12 - CONTROL " ", IDC_UDP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 44, 70, 12 + CONTROL "Можна все", IDC_UDP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 30, 70, 12 + CONTROL "Можна лише", IDC_UDP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 115, 44, 70, 12 CONTROL "", IDC_UDP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 111, 62, 72, 75 - PUSHBUTTON "", IDC_UDP_ADD, 115, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_UDP_DEL, 115, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Додати", IDC_UDP_ADD, 115, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Видалити", IDC_UDP_DEL, 115, 161, 50, 14, WS_TABSTOP GROUPBOX "", -1, 205, 30, 90, 150 - CONTROL " ", IDC_IP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 30, 70, 12 - CONTROL " ", IDC_IP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 44, 70, 12 + CONTROL "Можна все", IDC_IP_ALLOW_ALL, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 30, 70, 12 + CONTROL "Можна лише", IDC_IP_RESTRICT, "BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 215, 44, 70, 12 CONTROL "", IDC_IP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 211, 62, 72, 75 - PUSHBUTTON "", IDC_IP_ADD, 215, 141, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDC_IP_DEL, 215, 161, 50, 14, WS_TABSTOP + PUSHBUTTON "Додати", IDC_IP_ADD, 215, 141, 50, 14, WS_TABSTOP + PUSHBUTTON "Видалити", IDC_IP_DEL, 215, 161, 50, 14, WS_TABSTOP PUSHBUTTON "OK", IDC_OK, 150, 190, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 210, 190, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 210, 190, 50, 14, WS_TABSTOP END IDD_TCPIP_PORT_DLG DIALOGEX DISCARDABLE 0, 0, 200, 60 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Додати фільтр" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_PORT_VAL, 5, 30, 70, 12, WS_TABSTOP | ES_NUMBER LTEXT "", IDC_PORT_DESC, 5, 15, 40, 12 PUSHBUTTON "OK", IDC_OK, 120, 15, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP END STRINGTABLE BEGIN - IDS_NET_CONNECT " " - IDS_NO_IPADDR_SET " IP-. -, ." - IDS_NO_SUBMASK_SET " . ." - IDS_TCPFILTERDESC "Գ TCP/IP TCP/IP, '." - IDS_TCPFILTER "Գ TCP/IP" - IDS_IPADDR "IP-" - IDS_SUBMASK " " - IDS_GATEWAY "" - IDS_METRIC "" - IDS_DHCPACTIVE "DHCP " - IDS_AUTOMATIC "" - IDS_NOITEMSEL " . ." + IDS_NET_CONNECT "Мережне підключення" + IDS_NO_IPADDR_SET "Адаптеру потрібна хоча б одна IP-адреса. Будь-ласка, введіть її." + IDS_NO_SUBMASK_SET "Введено адресу без вказання маски підмережі. Додайте маску підмережі." + IDS_TCPFILTERDESC "Фільтрування TCP/IP дозволяє контролювати мережний трафік TCP/IP, що надходить на ваш комп'ютер." + IDS_TCPFILTER "Фільтрування TCP/IP" + IDS_IPADDR "IP-адреса" + IDS_SUBMASK "Маска підмережі" + IDS_GATEWAY "Шлюз" + IDS_METRIC "Метрика" + IDS_DHCPACTIVE "DHCP включено" + IDS_AUTOMATIC "Автоматично" + IDS_NOITEMSEL "Не вибрано ні одного елементу. Виберіть хоча б один." IDS_TCPIP "ReactOS-TCP/IP" - IDS_ADD "" + IDS_ADD "Додати" IDS_MOD "OK" - IDS_TCP_PORTS "TCP-" - IDS_UDP_PORTS "UDP-" - IDS_IP_PROTO "IP-" - IDS_PORT_RANGE " 0 65536. ." - IDS_PROT_RANGE " 0 256. ." - IDS_DUP_NUMBER ", , . ." - IDS_DISABLE_FILTER " TCP/IP ." - IDS_NO_SUFFIX " DNS. ." - IDS_DOMAIN_SUFFIX " ." - IDS_DNS_SUFFIX "DNS-' ""%s"" DNS-." - IDS_DUP_SUFFIX "DNS- ." - IDS_DUP_IPADDR "IP- ." - IDS_DUP_GW " ." + IDS_TCP_PORTS "TCP-порти" + IDS_UDP_PORTS "UDP-порти" + IDS_IP_PROTO "IP-протоколи" + IDS_PORT_RANGE "Номери портів повинні бути більші від 0 та менші від 65536. Введіть номер з цього діапазону." + IDS_PROT_RANGE "Номери протоколу повинні бути більші від 0 та менші від 256. Введіть номер з цього діапазону." + IDS_DUP_NUMBER "Номер, який ви хочете додати, вже є в списку. Введіть інший номер." + IDS_DISABLE_FILTER "Заборона цього глобального параметра TCP/IP вплине на всі адаптери." + IDS_NO_SUFFIX "Поточні параметри методу пошуку вимагають вказання хоча б одного суфіксу DNS. Введіть суфікс або змініть налаштування." + IDS_DOMAIN_SUFFIX "Невірний суфікс домена." + IDS_DNS_SUFFIX "DNS-ім'я домену ""%s"" не є допустимим DNS-іменем." + IDS_DUP_SUFFIX "DNS-суфікс вже присутній в списку." + IDS_DUP_IPADDR "IP-адреса вже є всписку." + IDS_DUP_GW "Шлюз по замовчуванню вже є в списку." END diff --git a/dll/win32/netcfgx/netcfgx.c b/dll/win32/netcfgx/netcfgx.c index 1fb9fc1ae34..eb59418ba88 100644 --- a/dll/win32/netcfgx/netcfgx.c +++ b/dll/win32/netcfgx/netcfgx.c @@ -337,6 +337,7 @@ InstallNetDevice( HKEY hLinkageKey = NULL; HKEY hConnectionKey = NULL; DWORD dwShowIcon, dwLength, dwValue; + WCHAR szBuffer[300]; /* Get Instance ID */ if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, &dwLength)) @@ -514,7 +515,11 @@ InstallNetDevice( DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } - rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)L"Network connection", (wcslen(L"Network connection") + 1) * sizeof(WCHAR)); + if (!LoadStringW(netcfgx_hInstance, IDS_NET_CONNECT, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + wcscpy(szBuffer,L"Network connection"); + } + rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); diff --git a/dll/win32/netcfgx/netcfgx.rc b/dll/win32/netcfgx/netcfgx.rc index 3f0747836ae..de8b5014a92 100644 --- a/dll/win32/netcfgx/netcfgx.rc +++ b/dll/win32/netcfgx/netcfgx.rc @@ -28,9 +28,12 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/ja-JP.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/dll/win32/netevent/CMakeLists.txt b/dll/win32/netevent/CMakeLists.txt index f0f4e5c8dff..3a38213bc25 100644 --- a/dll/win32/netevent/CMakeLists.txt +++ b/dll/win32/netevent/CMakeLists.txt @@ -1,13 +1,8 @@ set_unicode() - include_directories(${REACTOS_BINARY_DIR}/include/reactos) - add_library(netevent SHARED netevt.rc) - -set_module_type(netevent win32dll) - -add_importlibs(netevent msvcrt kernel32) - +set_entrypoint(netevent 0) +set_image_base(netevent ${baseaddress_netevent}) add_dependencies(netevent neteventmsg) add_cd_file(TARGET netevent DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/netid/lang/pl-PL.rc b/dll/win32/netid/lang/pl-PL.rc index 30bf2adc226..12691f61999 100644 --- a/dll/win32/netid/lang/pl-PL.rc +++ b/dll/win32/netid/lang/pl-PL.rc @@ -1,11 +1,11 @@ /* -* translation by xrogers -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -* -* translation update by Caemyr (Olaf Siejka) -* April, 2008 -*/ + * translation by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * translation update by Caemyr - Olaf Siejka (Apr, 2008) + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, 256, 218 @@ -14,18 +14,18 @@ CAPTION "Nazwa komputera" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_COMPNAME, IDC_STATIC, 4, 3, 26, 24, SS_ICON - LTEXT "ReactOS uywa nastpujcych informacji doidentyfikacji komputera w sieci", IDC_STATIC, 40, 5, 204, 20 + LTEXT "ReactOS używa następujących informacji do identyfikacji komputera w sieci", IDC_STATIC, 40, 5, 204, 20 LTEXT "Opis komputera:", IDC_STATIC, 6, 40, 70, 9 EDITTEXT IDC_COMPDESC, 98, 38, 146, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT "Pena nazwa komputera:", IDC_STATIC, 6, 68, 64, 9 + LTEXT "Pełna nazwa komputera:", IDC_STATIC, 6, 68, 64, 9 EDITTEXT IDC_COMPUTERNAME, 98, 68, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP LTEXT "Grupa robocza:", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 EDITTEXT IDC_WORKGROUPDOMAIN_NAME, 98, 84, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT "Aby uy Kreatora identyfikacji sieciowej do doczenia do domeny i stworzy lokalnego uytkownika, wcinij ID sieciowe.", IDC_STATIC, 6, 108, 172, 24 + LTEXT "Aby użyć Kreatora identyfikacji sieciowej do dołączenia do domeny i stworzyć lokalnego użytkownika, wciśnij ID sieciowe.", IDC_STATIC, 6, 108, 172, 24 PUSHBUTTON "&ID sieciowe...", IDC_NETWORK_ID, 190, 114, 58, 15 - LTEXT "Aby zmieni nazw tego komputera lub przyczy si do grupy roboczej, kliknij przycisk Zmie.", IDC_STATIC, 6, 149, 170, 17 - PUSHBUTTON "Z&mie...",IDC_NETWORK_PROPERTY, 190, 149, 58, 15 - LTEXT "Uwaga: Tylko administratorzy mog zmieni identyfikator tego komputera.", IDC_STATIC, 6, 179, 300, 9 + LTEXT "Aby zmienić nazwę tego komputera lub przyłączyć się do grupy roboczej, kliknij przycisk Zmień.", IDC_STATIC, 6, 149, 170, 17 + PUSHBUTTON "Z&mień...",IDC_NETWORK_PROPERTY, 190, 149, 58, 15 + LTEXT "Uwaga: Tylko administratorzy mogą zmienić identyfikator tego komputera.", IDC_STATIC, 6, 179, 300, 9 END IDD_PROPPAGECOMPNAMECHENGE DIALOGEX 0, 0, 232, 222 @@ -36,14 +36,14 @@ BEGIN LTEXT "(message goes here)", 1017, 7, 5, 218, 30 LTEXT "&Nazwa komputera:", -1, 7, 41, 219, 8 EDITTEXT 1002, 7, 53, 218, 14, ES_AUTOHSCROLL | ES_OEMCONVERT - LTEXT "Pena nazwa komputera:", 1016, 7, 72, 218, 10 + LTEXT "Pełna nazwa komputera:", 1016, 7, 72, 218, 10 EDITTEXT 1001, 7, 82, 219, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - PUSHBUTTON "&Wicej...", 1003, 150, 102, 75, 14 - GROUPBOX "Naley do", 1018, 7, 119, 219, 73 + PUSHBUTTON "&Więcej...", 1003, 150, 102, 75, 14 + GROUPBOX "Należy do", 1018, 7, 119, 219, 73 AUTORADIOBUTTON "&Domeny:", 1008, 17, 132, 192, 10, WS_GROUP AUTORADIOBUTTON "&Grupy roboczej:", 1004, 17, 161, 191, 10 EDITTEXT 116, 28, 144, 181, 14, ES_AUTOHSCROLL | WS_GROUP - PUSHBUTTON "Wy&szukaj moj domen", 1010, 7, 203, 109, 14, NOT WS_VISIBLE | WS_DISABLED + PUSHBUTTON "Wy&szukaj moją domenę", 1010, 7, 203, 109, 14, NOT WS_VISIBLE | WS_DISABLED EDITTEXT 1007, 28, 172, 181, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_OEMCONVERT DEFPUSHBUTTON "OK", 1, 121, 203, 50, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 176, 203, 50, 14 @@ -56,31 +56,31 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "&Podstawowy sufiks DNS tego komputera:", -1, 7, 5, 253, 8 EDITTEXT 1011, 7, 17, 252, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "&Zmie podstawowy sufiks DNS przy zmianie czonkostwa domeny", 115, 11, 39, 250, 10 + AUTOCHECKBOX "&Zmień podstawowy sufiks DNS przy zmianie członkostwa domeny", 115, 11, 39, 250, 10 LTEXT "&Nazwa komputera NetBIOS:", -1, 7, 57, 148, 8 EDITTEXT 1013, 7, 69, 150, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_READONLY DEFPUSHBUTTON "OK", 1, 153, 104, 50, 14 PUSHBUTTON "Anuluj", 2, 209, 104, 50, 14 - LTEXT "Nazwa ta jest niezbdna przy pracy ze starszymi serwerami i usugami.", 13, 7, 88, 253, 8 + LTEXT "Nazwa ta jest niezbędna przy pracy ze starszymi serwerami i usługami.", 13, 7, 88, 253, 8 END STRINGTABLE BEGIN 1 "* Nieznane *" 2 "GRUPA ROBOCZA" - 3 "Podczas odczytywania informacji o czonkowstwie w domenie, wystpi bd:" + 3 "Podczas odczytywania informacji o członkowstwie w domenie, wystąpił błąd:" 4 "Zmiana nazwy komputera" 5 "Grupa Robocza:" 6 "Domena:" 22 "Witamy w grupie roboczej %1." 23 "Witamy w domenie %1." - 24 "Musisz zrestartowa komputer aby zmiany odniosy skutek." - 25 "Moesz zmieni nazw i czonkostwo tego komputera. Zmiany mog mie wpyw na dostp do zasobw sieciowych." - 1021 "Uwaga: Tylko Administratorzy mog zmienia identyfikator tego komputera." - 1022 "Uwaga: Identyfikator tego komputera nie zosta zmieniony, powd:" - 1030 "Nowa nazwa komputera ""%s"" zawiera niedozwolone znaki. Do niedozwolonych znakw nale ` ~ ! @ # $ %% ^ & * ( ) = + _ [ ] { } \\ | ; : ' "" , . < > / oraz ?" - 3210 "&Szczegy >>" - 3220 "<< &Szczegy" + 24 "Musisz zrestartować komputer aby zmiany odniosły skutek." + 25 "Możesz zmienić nazwę i członkostwo tego komputera. Zmiany mogą mieć wpływ na dostęp do zasobów sieciowych." + 1021 "Uwaga: Tylko Administratorzy mogą zmieniać identyfikator tego komputera." + 1022 "Uwaga: Identyfikator tego komputera nie został zmieniony, powód:" + 1030 "Nowa nazwa komputera ""%s"" zawiera niedozwolone znaki. Do niedozwolonych znaków należą ` ~ ! @ # $ %% ^ & * ( ) = + _ [ ] { } \\ | ; : ' "" , . < > / oraz ?" + 3210 "&Szczegóły >>" + 3220 "<< &Szczegóły" 4000 "Informacja" - 4001 "Nie mona zmieni nazwy komputera!" + 4001 "Nie można zmienić nazwy komputera!" END diff --git a/dll/win32/netid/lang/ru-RU.rc b/dll/win32/netid/lang/ru-RU.rc index df4d340d2b4..9dbb387ff72 100644 --- a/dll/win32/netid/lang/ru-RU.rc +++ b/dll/win32/netid/lang/ru-RU.rc @@ -2,77 +2,77 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Имя компьютера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_COMPNAME, IDC_STATIC, 4, 3, 26, 24, SS_ICON - LTEXT "ReactOS .", IDC_STATIC, 40, 5, 204, 20 - LTEXT ":", IDC_STATIC, 6, 40, 70, 9 + LTEXT "ReactOS использует указанные ниже сведения для идентификации компьютера в сети.", IDC_STATIC, 40, 5, 204, 20 + LTEXT "Описание:", IDC_STATIC, 6, 40, 70, 9 EDITTEXT IDC_COMPDESC, 98, 38, 146, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT " :", IDC_STATIC, 6, 68, 64, 9 + LTEXT "Полное имя:", IDC_STATIC, 6, 68, 64, 9 EDITTEXT IDC_COMPUTERNAME, 98, 68, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT " :", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 + LTEXT "Рабочая группа:", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 EDITTEXT IDC_WORKGROUPDOMAIN_NAME, 98, 84, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT " , """".", IDC_STATIC, 6, 113, 172, 24 - PUSHBUTTON "&...", IDC_NETWORK_ID, 180, 114, 72, 15 - LTEXT " """".", IDC_STATIC, 6, 149, 170, 17 - PUSHBUTTON "&...",IDC_NETWORK_PROPERTY, 180, 149, 72, 15 - LTEXT ": .", IDC_STATIC, 6, 179, 245, 9 + LTEXT "Чтобы вызвать мастер сетевой идентификации для присоединения компьютера к домену, нажмите кнопку ""Идентификация"".", IDC_STATIC, 6, 113, 172, 24 + PUSHBUTTON "&Идентификация...", IDC_NETWORK_ID, 180, 114, 72, 15 + LTEXT "Чтобы изменить имя компьютера или домена нажмите ""Изменить"".", IDC_STATIC, 6, 149, 170, 17 + PUSHBUTTON "И&зменить...",IDC_NETWORK_PROPERTY, 180, 149, 72, 15 + LTEXT "Примечание: Только администраторы могут изменять эти параметры.", IDC_STATIC, 6, 179, 245, 9 END IDD_PROPPAGECOMPNAMECHENGE DIALOGEX 0, 0, 232, 222 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Изменение имени компьютера" FONT 8, "MS Shell Dlg" BEGIN LTEXT "(message goes here)", 1017, 7, 5, 218, 30 - LTEXT "& :", -1, 7, 41, 219, 8 + LTEXT "&Имя компьютера:", -1, 7, 41, 219, 8 EDITTEXT 1002, 7, 53, 218, 14, ES_AUTOHSCROLL | ES_OEMCONVERT - LTEXT " :", 1016, 7, 72, 218, 10 + LTEXT "Полное имя компьютера:", 1016, 7, 72, 218, 10 EDITTEXT 1001, 7, 82, 219, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - PUSHBUTTON "&...", 1003, 150, 102, 75, 14 - GROUPBOX " ", 1018, 7, 119, 219, 73 - AUTORADIOBUTTON "&:", 1008, 17, 132, 192, 10, WS_GROUP - AUTORADIOBUTTON " &:", 1004, 17, 161, 191, 10 + PUSHBUTTON "&Дополнительно...", 1003, 150, 102, 75, 14 + GROUPBOX "Является членом", 1018, 7, 119, 219, 73 + AUTORADIOBUTTON "до&мена:", 1008, 17, 132, 192, 10, WS_GROUP + AUTORADIOBUTTON "рабочей &группы:", 1004, 17, 161, 191, 10 EDITTEXT 116, 28, 144, 181, 14, ES_AUTOHSCROLL | WS_GROUP - PUSHBUTTON "& ", 1010, 7, 203, 109, 14, NOT WS_VISIBLE | WS_DISABLED + PUSHBUTTON "&Поиск домена", 1010, 7, 203, 109, 14, NOT WS_VISIBLE | WS_DISABLED EDITTEXT 1007, 28, 172, 181, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_OEMCONVERT DEFPUSHBUTTON "OK", 1, 121, 203, 50, 14, WS_GROUP - PUSHBUTTON "", 2, 176, 203, 50, 14 + PUSHBUTTON "Отмена", 2, 176, 203, 50, 14 END IDD_PROPPAGEDNSANDNETBIOS DIALOGEX 0, 0, 266, 125 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "DNS- NetBIOS- " +CAPTION "DNS-суффикс и NetBIOS-имя компьютера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& DNS- :", -1, 7, 5, 253, 8 + LTEXT "&Основной DNS-суффикс этого компьютера:", -1, 7, 5, 253, 8 EDITTEXT 1011, 7, 17, 252, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "& DNS- ", 115, 11, 39, 250, 10 - LTEXT "NetBIOS- &:", -1, 7, 57, 148, 8 + AUTOCHECKBOX "&Сменить основной DNS-суффикс при смене членства в домене", 115, 11, 39, 250, 10 + LTEXT "NetBIOS-имя &компьютера:", -1, 7, 57, 148, 8 EDITTEXT 1013, 7, 69, 150, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_READONLY DEFPUSHBUTTON "OK", 1, 153, 104, 50, 14 - PUSHBUTTON "", 2, 209, 104, 50, 14 - LTEXT " .", 13, 7, 86, 253, 17 + PUSHBUTTON "Отмена", 2, 209, 104, 50, 14 + LTEXT "Это имя используется для взаимодействия со старыми компьютерами и службами.", 13, 7, 86, 253, 17 END STRINGTABLE BEGIN - 1 "* *" + 1 "* нет данных *" 2 "WORKGROUP" - 3 " :" - 4 " " - 5 " :" - 6 ":" - 22 " %1." - 23 " %1." - 24 " , ." - 25 " . ." - 1021 ": ." - 1022 ": , :" + 3 "При попытке чтения данных о членстве в домене произошла следующая ошибка:" + 4 "Изменение имени компьютера" + 5 "Рабочая группа:" + 6 "Домен:" + 22 "Добро пожаловать в рабочую группу %1." + 23 "Добро пожаловать в домен %1." + 24 "Необходимо перезапустить компьютер для того, чтобы эти изменения вступили в силу." + 25 "Можно изменить имя и принадлежность этого компьютера. Изменения могут повлиять на доступ к сетевым ресурсам." + 1021 "Примечание: только администраторы могут изменить идентификацию этого компьютера." + 1022 "Примечание: идентификация этого компьютера не может быть изменена, потому что:" 1030 "The new computer name ""%s"" contains characters which are not allowed. Characters which are not allowed include ` ~ ! @ # $ %% ^ & * ( ) = + _ [ ] { } \\ | ; : ' "" , . < > / and ?" - 3210 "& >>" - 3220 "<< &" - 4000 "" - 4001 " !" + 3210 "&Подробно >>" + 3220 "<< &Подробно" + 4000 "Информация" + 4001 "Не удалось установить новое имя компьютера!" END diff --git a/dll/win32/netid/lang/uk-UA.rc b/dll/win32/netid/lang/uk-UA.rc index 72dbe3a7465..349ac311397 100644 --- a/dll/win32/netid/lang/uk-UA.rc +++ b/dll/win32/netid/lang/uk-UA.rc @@ -10,77 +10,77 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, 256, 218 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "' '" +CAPTION "Ім'я комп'ютера" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_COMPNAME, IDC_STATIC, 4, 3, 26, 24, SS_ICON - LTEXT "ReactOS ' .", IDC_STATIC, 40, 5, 204, 20 - LTEXT ":", IDC_STATIC, 6, 40, 70, 9 + LTEXT "ReactOS використовує наступну інформацію для ідентифікації комп'ютера в мережі.", IDC_STATIC, 40, 5, 204, 20 + LTEXT "Опис:", IDC_STATIC, 6, 40, 70, 9 EDITTEXT IDC_COMPDESC, 98, 38, 146, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT " ':", IDC_STATIC, 6, 68, 64, 9 + LTEXT "Повне ім'я:", IDC_STATIC, 6, 68, 64, 9 EDITTEXT IDC_COMPUTERNAME, 98, 68, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT " :", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 + LTEXT "Робоча група:", IDC_WORKGROUPDOMAIN, 6, 84, 64, 9 EDITTEXT IDC_WORKGROUPDOMAIN_NAME, 98, 84, 144, 12, ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT " , """".", IDC_STATIC, 6, 108, 172, 32 - PUSHBUTTON "&...", IDC_NETWORK_ID, 190, 114, 60, 15 - LTEXT " ' , """".", IDC_STATIC, 6, 149, 170, 17 - PUSHBUTTON "&...",IDC_NETWORK_PROPERTY, 190, 149, 60, 15 - LTEXT ": ' .", IDC_STATIC, 6, 179, 230, 18 + LTEXT "Щоб запустити майстер мережної ідентифікації для приєднання до домену та створення облікового запису локального користувача, натисніть кнопку ""Ідентифікація"".", IDC_STATIC, 6, 108, 172, 32 + PUSHBUTTON "Іденти&фікація...", IDC_NETWORK_ID, 190, 114, 60, 15 + LTEXT "Щоб перейменувати цей комп'ютер або приєднати його до домену, натисніть кнопку ""Змінити"".", IDC_STATIC, 6, 149, 170, 17 + PUSHBUTTON "&Змінити...",IDC_NETWORK_PROPERTY, 190, 149, 60, 15 + LTEXT "Примітка: змінити ідентифікацію цього комп'ютера можуть лише адміністратори.", IDC_STATIC, 6, 179, 230, 18 END IDD_PROPPAGECOMPNAMECHENGE DIALOGEX 0, 0, 232, 222 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " '" +CAPTION "Зміна імені комп'ютера" FONT 8, "MS Shell Dlg" BEGIN LTEXT "(message goes here)", 1017, 7, 5, 218, 30 - LTEXT "&' ':", -1, 7, 41, 219, 8 + LTEXT "&Ім'я комп'ютера:", -1, 7, 41, 219, 8 EDITTEXT 1002, 7, 53, 218, 14, ES_AUTOHSCROLL | ES_OEMCONVERT - LTEXT " ' ':", 1016, 7, 72, 218, 10 + LTEXT "Повне ім'я комп'ютера:", 1016, 7, 72, 218, 10 EDITTEXT 1001, 7, 82, 219, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - PUSHBUTTON "&...", 1003, 150, 102, 75, 14 - GROUPBOX " ", 1018, 7, 119, 219, 73 - AUTORADIOBUTTON "&:", 1008, 17, 132, 192, 10, WS_GROUP - AUTORADIOBUTTON " &:", 1004, 17, 161, 191, 10 + PUSHBUTTON "&Додатково...", 1003, 150, 102, 75, 14 + GROUPBOX "Є членом", 1018, 7, 119, 219, 73 + AUTORADIOBUTTON "до&мену:", 1008, 17, 132, 192, 10, WS_GROUP + AUTORADIOBUTTON "робочої &групи:", 1004, 17, 161, 191, 10 EDITTEXT 116, 28, 144, 181, 14, ES_AUTOHSCROLL | WS_GROUP - PUSHBUTTON "& ", 1010, 7, 203, 109, 14, NOT WS_VISIBLE | WS_DISABLED + PUSHBUTTON "&Пошук домену", 1010, 7, 203, 109, 14, NOT WS_VISIBLE | WS_DISABLED EDITTEXT 1007, 28, 172, 181, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_OEMCONVERT DEFPUSHBUTTON "OK", 1, 121, 203, 50, 14, WS_GROUP - PUSHBUTTON "", 2, 176, 203, 50, 14 + PUSHBUTTON "Скасувати", 2, 176, 203, 50, 14 END IDD_PROPPAGEDNSANDNETBIOS DIALOGEX 0, 0, 266, 125 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "DNS- NetBIOS-' '" +CAPTION "DNS-суфікс і NetBIOS-ім'я комп'ютера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& DNS- ':", -1, 7, 5, 253, 8 + LTEXT "&Основний DNS-суфікс цього комп'ютера:", -1, 7, 5, 253, 8 EDITTEXT 1011, 7, 17, 252, 14, ES_AUTOHSCROLL - AUTOCHECKBOX " & DNS-, ", 115, 11, 39, 250, 10 - LTEXT "NetBIOS-' &':", -1, 7, 57, 148, 8 + AUTOCHECKBOX "Змінювати о&сновний DNS-суфікс, коли змінюється членство в домені", 115, 11, 39, 250, 10 + LTEXT "NetBIOS-ім'я &комп'ютера:", -1, 7, 57, 148, 8 EDITTEXT 1013, 7, 69, 150, 14, ES_UPPERCASE | ES_AUTOHSCROLL | ES_READONLY DEFPUSHBUTTON "OK", 1, 153, 104, 50, 14 - PUSHBUTTON "", 2, 209, 104, 50, 14 - LTEXT " ' 䳿 ' .", 13, 7, 88, 253, 16 + PUSHBUTTON "Скасувати", 2, 209, 104, 50, 14 + LTEXT "Це ім'я використовується для можливості взаємодії зі старими комп'ютерами та службами.", 13, 7, 88, 253, 16 END STRINGTABLE BEGIN - 1 "* *" + 1 "* немає даних *" 2 "WORKGROUP" - 3 " :" - 4 " '" - 5 " :" - 6 ":" - 22 " %1." - 23 " %1." - 24 " ', ." - 25 " ' '. ." - 1021 ": ' ." - 1022 ": ' , :" - 1030 " ' ' ""%s"" . ` ~ ! @ # $ %% ^ & * ( ) = + _ [ ] { } \\ | ; : ' "" , . < > / ?" - 3210 "& >>" - 3220 "<< &" - 4000 "" - 4001 " ' '!" + 3 "При спробі прочитати дані про членство в домені сталася така помилка:" + 4 "Зміна імені комп'ютера" + 5 "Робоча група:" + 6 "Домен:" + 22 "Вас вітає робоча група %1." + 23 "Вас вітає домен %1." + 24 "Слід перезапустити комп'ютер, щоб ці зміни набрали сили." + 25 "Можна знінити ім'я і членство цього комп'ютера. Зміни можуть вплинути на доступ до мережних ресурсів." + 1021 "Примітка: змінити ідентифікацію цього комп'ютера можуть лише адміністратори." + 1022 "Примітка: змінити ідентифікацію цього комп'ютера неможливо, оскільки:" + 1030 "Нове ім'я комп'ютера ""%s"" містить недопустимі символи. До недопустимих символів належать ` ~ ! @ # $ %% ^ & * ( ) = + _ [ ] { } \\ | ; : ' "" , . < > / та ?" + 3210 "&Подробиці >>" + 3220 "<< &Подробиці" + 4000 "Інформація" + 4001 "Не вдалось встановити нове ім'я комп'ютера!" END diff --git a/dll/win32/netid/rsrc.rc b/dll/win32/netid/rsrc.rc index 0d8989e0327..dfd11fa8955 100644 --- a/dll/win32/netid/rsrc.rc +++ b/dll/win32/netid/rsrc.rc @@ -13,7 +13,10 @@ #include "lang/it-IT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" +#include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/netshell/CMakeLists.txt b/dll/win32/netshell/CMakeLists.txt index 5e2890505bd..9dc74cc503f 100644 --- a/dll/win32/netshell/CMakeLists.txt +++ b/dll/win32/netshell/CMakeLists.txt @@ -17,9 +17,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/netshell_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/netshell.def) -add_library(netshell SHARED - ${CMAKE_CURRENT_BINARY_DIR}/netshell_precomp.h.gch - ${SOURCE}) +add_library(netshell SHARED ${SOURCE}) set_module_type(netshell win32dll) @@ -42,6 +40,6 @@ add_importlibs(netshell kernel32 ntdll) -add_pch(netshell ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(netshell precomp.h) add_cd_file(TARGET netshell DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/netshell/lang/de-DE.rc b/dll/win32/netshell/lang/de-DE.rc index de2c06bb65b..d4665c4d8ca 100644 --- a/dll/win32/netshell/lang/de-DE.rc +++ b/dll/win32/netshell/lang/de-DE.rc @@ -75,7 +75,7 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "Netzwerkverbindungs&details:", -1, 15, 9, 170, 12 CONTROL "", IDC_DETAILS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 25, 170, 130 - PUSHBUTTON "&Close", IDC_CLOSE, 125, 165, 62, 14 + PUSHBUTTON "&Schlieen", IDC_CLOSE, 125, 165, 62, 14 END STRINGTABLE DISCARDABLE diff --git a/dll/win32/netshell/lang/pl-PL.rc b/dll/win32/netshell/lang/pl-PL.rc index 38ff75b21b2..23559d43c1e 100644 --- a/dll/win32/netshell/lang/pl-PL.rc +++ b/dll/win32/netshell/lang/pl-PL.rc @@ -1,49 +1,54 @@ +/* + * translated by Maciej Białas(Aug, 2008) + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_LIST | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 - LTEXT "Pocz uywajc:", -1, 9,9,217,8 + LTEXT "Połącz używając:", -1, 9,9,217,8 EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Konfiguruj", IDC_CONFIGURE, 189, 38, 50, 14 - LTEXT "To poczenie wykorzystuje nastpujce skadniki:", -1, 9, 59, 217, 8 + LTEXT "To połączenie wykorzystuje następujące składniki:", -1, 9, 59, 217, 8 PUSHBUTTON "&Zainstaluj", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Odinstaluj", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&Waciwoci", IDC_PROPERTIES, 174, 130, 65, 14 + PUSHBUTTON "&Właściwości", IDC_PROPERTIES, 174, 130, 65, 14 GROUPBOX "Opis", -1, 9, 153, 230, 46, BS_GROUPBOX - LTEXT "Tutaj pojawi si opis skadnika...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP - CHECKBOX "Pokazuj ikon w obszarze powiadomie podczas poczenia", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "Powiadom mnie, gdy to poczenie ma ograniczon czno lub brak cznoci", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + LTEXT "Tutaj pojawi się opis składnika...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "Pokazuj ikonę w obszarze powiadomień podczas połączenia", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Powiadom mnie, gdy to połączenie ma ograniczoną łączność lub brak łączności", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP END IDD_STATUS DIALOGEX DISCARDABLE 0, 0, 200, 280 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Waciwoci" +CAPTION "Właściwości" FONT 8, "MS Shell Dlg" BEGIN END IDD_LAN_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200,180 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Poczenie", -1, 9, 8, 182, 58, BS_GROUPBOX + GROUPBOX "Połączenie", -1, 9, 8, 182, 58, BS_GROUPBOX LTEXT "Status:", -1, 19, 20, 60, 8 LTEXT "Czas trwania:", -1, 19, 34, 60, 8 - LTEXT "Szybko:", -1, 19, 48, 60, 8 - GROUPBOX "Aktywno", -1, 9, 74, 182, 70, BS_GROUPBOX - RTEXT "Wysano", -1, 26, 90, 60, 8 + LTEXT "Szybkość:", -1, 19, 48, 60, 8 + GROUPBOX "Aktywność", -1, 9, 74, 182, 70, BS_GROUPBOX + RTEXT "Wysłano", -1, 26, 90, 60, 8 ICON "", IDC_NETSTAT, 110, 85, 32, 32 LTEXT "Odebrano", -1, 149, 90, 37, 8 - LTEXT "bajtw:", -1, 17, 115, 32, 8 + LTEXT "bajtów:", -1, 17, 115, 32, 8 RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 - PUSHBUTTON "&Waciwoci", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 - PUSHBUTTON "W&ycz", IDC_ENDISABLE, 66, 150, 50, 14 + PUSHBUTTON "&Właściwości", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "W&yłącz", IDC_ENDISABLE, 66, 150, 50, 14 RTEXT "",IDC_STATUS,83,20,98,8 RTEXT "",IDC_DURATION,83,34,98,8 RTEXT "",IDC_SPEED,83,48,98,8 @@ -51,29 +56,29 @@ END IDD_LAN_NETSTATUSADVANCED DIALOGEX DISCARDABLE 0, 0, 200,180 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Szczegy" +CAPTION "Szczegóły" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Status poczenia", -1, 9, 8, 200, 88, BS_GROUPBOX + GROUPBOX "Status połączenia", -1, 9, 8, 200, 88, BS_GROUPBOX LTEXT "Typ adresu:", -1, 22, 20, 80, 8 LTEXT "Adres IP:", -1, 22, 34, 80, 8 LTEXT "Maska podsieci:", -1, 22, 48, 80, 8 - LTEXT "Domylna brama:", -1, 22, 62, 80, 8 + LTEXT "Brama domyślna:", -1, 22, 62, 80, 8 RTEXT "n/d", IDC_DETAILSTYPE, 122, 20, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSIP, 122, 34, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSSUBNET, 122, 48, 80, 8 RTEXT "", IDC_DETAILSGATEWAY, 122, 62, 80, 8 - PUSHBUTTON "&Szczegy...", IDC_DETAILS, 22, 76, 62, 14 + PUSHBUTTON "&Szczegóły...", IDC_DETAILS, 22, 76, 62, 14 END IDD_LAN_NETSTATUSDETAILS DIALOGEX DISCARDABLE 0, 0, 200,200 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "Szczegy poczenia sieciowego" +CAPTION "Szczegóły połączenia sieciowego" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Szczegy poczenia sieciowego:", -1, 15, 9, 170, 12 + LTEXT "&Szczegóły połączenia sieciowego:", -1, 15, 9, 170, 12 CONTROL "", IDC_DETAILS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 25, 170, 130 PUSHBUTTON "&Zamknij", IDC_CLOSE, 125, 165, 62, 14 END @@ -83,44 +88,44 @@ BEGIN IDS_PHYSICAL_ADDRESS "Adres fizyczny" IDS_IP_ADDRESS "Adres IP" IDS_SUBNET_MASK "Maska podsieci" - IDS_DEF_GATEWAY "Brama domylna" + IDS_DEF_GATEWAY "Brama domyślna" IDS_DHCP_SERVER "Serwer DHCP" - IDS_LEASE_OBTAINED "Dzierawa uzyskana" - IDS_LEASE_EXPIRES "Dzierawa wygasa" + IDS_LEASE_OBTAINED "Dzierżawa uzyskana" + IDS_LEASE_EXPIRES "Dzierżawa wygasa" IDS_DNS_SERVERS "Serwery DNS" IDS_WINS_SERVERS "Serwery WINS" - IDS_PROPERTY "Waciwoci" - IDS_VALUE "Warto" - IDS_NETWORKCONNECTION "Poczenie sieciowe" + IDS_PROPERTY "Właściwości" + IDS_VALUE "Wartość" + IDS_NETWORKCONNECTION "Połączenie sieciowe" IDS_SHV_COLUMN_NAME "Nazwa" IDS_SHV_COLUMN_TYPE "Typ" IDS_SHV_COLUMN_STATE "Status" - IDS_SHV_COLUMN_DEVNAME "Nazwa urzdzenia" + IDS_SHV_COLUMN_DEVNAME "Nazwa urządzenia" IDS_SHV_COLUMN_PHONE "Numer telefonu lub adres hosta" - IDS_SHV_COLUMN_OWNER "Waciciel" - IDS_TYPE_ETHERNET "Sie LAN lub szerokopasmowy Internet" - IDS_STATUS_NON_OPERATIONAL "Wyczony" - IDS_STATUS_UNREACHABLE "Niepoczony" - IDS_STATUS_DISCONNECTED "Kabel sieciowy odczony" + IDS_SHV_COLUMN_OWNER "Właściciel" + IDS_TYPE_ETHERNET "Sieć LAN lub szerokopasmowy Internet" + IDS_STATUS_NON_OPERATIONAL "Wyłączony" + IDS_STATUS_UNREACHABLE "Niepołączony" + IDS_STATUS_DISCONNECTED "Kabel sieciowy odłączony" IDS_STATUS_CONNECTING "Pobieranie adresu sieciowego" - IDS_STATUS_CONNECTED "Poczony" - IDS_STATUS_OPERATIONAL "Poczony" + IDS_STATUS_CONNECTED "Połączony" + IDS_STATUS_OPERATIONAL "Połączony" - IDS_NET_ACTIVATE "Wcz" - IDS_NET_DEACTIVATE "Wycz" + IDS_NET_ACTIVATE "Włącz" + IDS_NET_DEACTIVATE "Wyłącz" IDS_NET_STATUS "Status" IDS_NET_REPAIR "Napraw" - IDS_NET_CREATELINK "Utwrz skrt" - IDS_NET_DELETE "Usu" - IDS_NET_PROPERTIES "Waciwoci" + IDS_NET_CREATELINK "Utwórz skrót" + IDS_NET_DELETE "Usuń" + IDS_NET_PROPERTIES "Właściwości" IDS_FORMAT_BIT "%u Bit/s" IDS_FORMAT_KBIT "%u KBit/s" IDS_FORMAT_MBIT "%u MBit/s" IDS_FORMAT_GBIT "%u GBit/s" - IDS_DURATION_DAY "%d Dzie %s" + IDS_DURATION_DAY "%d Dzień %s" IDS_DURATION_DAYS "%d Dni %s" IDS_ASSIGNED_DHCP "Przydzielony przez DHCP" - IDS_ASSIGNED_MANUAL "Ustawiony rcznie" + IDS_ASSIGNED_MANUAL "Ustawiony ręcznie" END diff --git a/dll/win32/netshell/lang/ru-RU.rc b/dll/win32/netshell/lang/ru-RU.rc index 91daab64e12..f07d2d4581e 100644 --- a/dll/win32/netshell/lang/ru-RU.rc +++ b/dll/win32/netshell/lang/ru-RU.rc @@ -2,48 +2,48 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 - LTEXT " :", -1, 9, 9, 217, 8 + LTEXT "Подключение через:", -1, 9, 9, 217, 8 EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&...", IDC_CONFIGURE, 174, 38, 65, 14 - LTEXT " :", -1, 9, 59, 217, 8 - PUSHBUTTON "&...", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&", IDC_PROPERTIES, 174, 130, 65, 14 - GROUPBOX "", -1, 9, 153, 230, 46, BS_GROUPBOX - LTEXT " ...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP - CHECKBOX " ", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX " ", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + PUSHBUTTON "&Настроить...", IDC_CONFIGURE, 174, 38, 65, 14 + LTEXT "Отмеченые компоненты используются этим подключением:", -1, 9, 59, 217, 8 + PUSHBUTTON "&Установить...", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Удалить", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Свойства", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Описание", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Свойства компонента перечислены ниже...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "Отображать значек в трее при установленом соединении", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Оповещать в случае разрыва соединения", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP END IDD_STATUS DIALOGEX DISCARDABLE 0, 0, 200, 280 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Свойства" FONT 8, "MS Shell Dlg" BEGIN END IDD_LAN_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 216, 180 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "", -1, 9, 8, 198, 58, BS_GROUPBOX - LTEXT ":", -1, 19, 20, 60, 8 - LTEXT ":", -1, 19, 34, 60, 8 - LTEXT ":", -1, 19, 48, 60, 8 - GROUPBOX "", -1, 9, 74, 198, 70, BS_GROUPBOX - RTEXT "", -1, 20, 90, 60, 8 + GROUPBOX "Подключение", -1, 9, 8, 198, 58, BS_GROUPBOX + LTEXT "Состояние:", -1, 19, 20, 60, 8 + LTEXT "Длительность:", -1, 19, 34, 60, 8 + LTEXT "Скорость:", -1, 19, 48, 60, 8 + GROUPBOX "Активность", -1, 9, 74, 198, 70, BS_GROUPBOX + RTEXT "Отправлено", -1, 20, 90, 60, 8 ICON "", IDC_NETSTAT, 110, 85, 32, 32 - LTEXT "", -1, 158, 90, 37, 8 - LTEXT ":", -1, 17, 115, 32, 8 + LTEXT "Принято", -1, 158, 90, 37, 8 + LTEXT "Байт:", -1, 17, 115, 32, 8 RTEXT "000.000.000", IDC_SEND, 54, 115, 44, 8 RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 46, 8 - PUSHBUTTON "&", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 - PUSHBUTTON "&", IDC_ENDISABLE, 66, 150, 50, 14 + PUSHBUTTON "&Свойства", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "&Отключить", IDC_ENDISABLE, 66, 150, 50, 14 RTEXT "", IDC_STATUS, 100, 20, 98, 8 RTEXT "", IDC_DURATION, 100, 34, 98, 8 RTEXT "", IDC_SPEED, 100, 48, 98, 8 @@ -51,75 +51,75 @@ END IDD_LAN_NETSTATUSADVANCED DIALOGEX DISCARDABLE 0, 0, 200,180 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Поддежка" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 9, 8, 200, 88, BS_GROUPBOX - LTEXT " :", -1, 22, 20, 80, 8 - LTEXT "IP :", -1, 22, 34, 80, 8 - LTEXT " :", -1, 22, 48, 80, 8 - LTEXT " :", -1, 22, 62, 80, 8 + GROUPBOX "Статус подключения", -1, 9, 8, 200, 88, BS_GROUPBOX + LTEXT "Тип адреса:", -1, 22, 20, 80, 8 + LTEXT "IP адрес:", -1, 22, 34, 80, 8 + LTEXT "Маска подсети:", -1, 22, 48, 80, 8 + LTEXT "Шлюз по умолчанию:", -1, 22, 62, 80, 8 - RTEXT "/", IDC_DETAILSTYPE, 122, 20, 80, 8 + RTEXT "н/а", IDC_DETAILSTYPE, 122, 20, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSIP, 122, 34, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSSUBNET, 122, 48, 80, 8 RTEXT "", IDC_DETAILSGATEWAY, 122, 62, 80, 8 - PUSHBUTTON "&...", IDC_DETAILS, 22, 76, 62, 14 + PUSHBUTTON "&Подробности...", IDC_DETAILS, 22, 76, 62, 14 END IDD_LAN_NETSTATUSDETAILS DIALOGEX DISCARDABLE 0, 0, 200, 172 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Детали сетевого подключения" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 5, 4, 170, 12 + LTEXT "&Дополнительные сведения о сети:", -1, 5, 4, 170, 12 CONTROL "", IDC_DETAILS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 5, 17, 190, 130 - PUSHBUTTON "&", IDC_CLOSE, 132, 153, 62, 14 + PUSHBUTTON "&Закрыть", IDC_CLOSE, 132, 153, 62, 14 END STRINGTABLE DISCARDABLE BEGIN - IDS_PHYSICAL_ADDRESS " " - IDS_IP_ADDRESS "IP-" - IDS_SUBNET_MASK " " - IDS_DEF_GATEWAY " " - IDS_DHCP_SERVER "DHCP-" - IDS_LEASE_OBTAINED " " - IDS_LEASE_EXPIRES " " - IDS_DNS_SERVERS "DNS-" - IDS_WINS_SERVERS "WINS-" - IDS_PROPERTY "" - IDS_VALUE "" - IDS_NETWORKCONNECTION " " - IDS_SHV_COLUMN_NAME "" - IDS_SHV_COLUMN_TYPE "" - IDS_SHV_COLUMN_STATE "" - IDS_SHV_COLUMN_DEVNAME " " - IDS_SHV_COLUMN_PHONE " " - IDS_SHV_COLUMN_OWNER "" - IDS_TYPE_ETHERNET " " - IDS_STATUS_NON_OPERATIONAL "" - IDS_STATUS_UNREACHABLE "" - IDS_STATUS_DISCONNECTED " " - IDS_STATUS_CONNECTING " " - IDS_STATUS_CONNECTED "" - IDS_STATUS_OPERATIONAL "" + IDS_PHYSICAL_ADDRESS "Физический адрес" + IDS_IP_ADDRESS "IP-адрес" + IDS_SUBNET_MASK "Маска подсети" + IDS_DEF_GATEWAY "Основной шлюз" + IDS_DHCP_SERVER "DHCP-сервер" + IDS_LEASE_OBTAINED "Аренда получена" + IDS_LEASE_EXPIRES "Аренда истекает" + IDS_DNS_SERVERS "DNS-серверы" + IDS_WINS_SERVERS "WINS-сервер" + IDS_PROPERTY "Свойство" + IDS_VALUE "Значение" + IDS_NETWORKCONNECTION "Сетевые подключения" + IDS_SHV_COLUMN_NAME "Имя" + IDS_SHV_COLUMN_TYPE "Тип" + IDS_SHV_COLUMN_STATE "Состояние" + IDS_SHV_COLUMN_DEVNAME "Имя устройства" + IDS_SHV_COLUMN_PHONE "Номер телефона или адрес узла" + IDS_SHV_COLUMN_OWNER "Владелец" + IDS_TYPE_ETHERNET "ЛВС или высокоскоростной Интернет" + IDS_STATUS_NON_OPERATIONAL "Отключено" + IDS_STATUS_UNREACHABLE "Отключено" + IDS_STATUS_DISCONNECTED "Сетевой кабель не подключен" + IDS_STATUS_CONNECTING "Получение сетевого адреса" + IDS_STATUS_CONNECTED "Подключено" + IDS_STATUS_OPERATIONAL "Подключено" - IDS_NET_ACTIVATE "" - IDS_NET_DEACTIVATE "" - IDS_NET_STATUS "" - IDS_NET_REPAIR "" - IDS_NET_CREATELINK " " - IDS_NET_DELETE "" - IDS_NET_PROPERTIES "" + IDS_NET_ACTIVATE "Включить" + IDS_NET_DEACTIVATE "Отключить" + IDS_NET_STATUS "Состояние" + IDS_NET_REPAIR "Исправить" + IDS_NET_CREATELINK "Создать ярлык" + IDS_NET_DELETE "Удалить" + IDS_NET_PROPERTIES "Свойства" - IDS_FORMAT_BIT "%u /" - IDS_FORMAT_KBIT "%u /" - IDS_FORMAT_MBIT "%u /" - IDS_FORMAT_GBIT "%u /" - IDS_DURATION_DAY "%d %s" - IDS_DURATION_DAYS "%d %s" - IDS_ASSIGNED_DHCP " DHCP" - IDS_ASSIGNED_MANUAL " " + IDS_FORMAT_BIT "%u бит/с" + IDS_FORMAT_KBIT "%u Кбит/с" + IDS_FORMAT_MBIT "%u Мбит/с" + IDS_FORMAT_GBIT "%u Гбит/с" + IDS_DURATION_DAY "%d день %s" + IDS_DURATION_DAYS "%d дней %s" + IDS_ASSIGNED_DHCP "Присвоен DHCP" + IDS_ASSIGNED_MANUAL "Настроен вручную" END diff --git a/dll/win32/netshell/lang/uk-UA.rc b/dll/win32/netshell/lang/uk-UA.rc index b47da206b09..4e6148fca9f 100644 --- a/dll/win32/netshell/lang/uk-UA.rc +++ b/dll/win32/netshell/lang/uk-UA.rc @@ -10,48 +10,48 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 - LTEXT "ϳ :", -1, 9,9,217,8 + LTEXT "Підключення через:", -1, 9,9,217,8 EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&", IDC_CONFIGURE, 189, 38, 50, 14 - LTEXT "³ :", -1, 9, 59, 217, 8 - PUSHBUTTON "&", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&", IDC_PROPERTIES, 174, 130, 65, 14 - GROUPBOX "", -1, 9, 153, 230, 46, BS_GROUPBOX - LTEXT " ...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP - CHECKBOX " ", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX " , ", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + PUSHBUTTON "&Налаштувати", IDC_CONFIGURE, 189, 38, 50, 14 + LTEXT "Відмічені компоненти використовуються цим підключенням:", -1, 9, 59, 217, 8 + PUSHBUTTON "Вст&ановити", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "В&идалити", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Властивості", IDC_PROPERTIES, 174, 130, 65, 14 + GROUPBOX "Опис", -1, 9, 153, 230, 46, BS_GROUPBOX + LTEXT "Опис компонентів...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP + CHECKBOX "Вивести значок підключення на панель завдань", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Сповіщати мене, якщо це підключення обмежене чи відсутнє", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP END IDD_STATUS DIALOGEX DISCARDABLE 0, 0, 200, 280 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN END IDD_LAN_NETSTATUS DIALOGEX DISCARDABLE 0, 0, 200,180 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "ϳ", -1, 9, 8, 182, 58, BS_GROUPBOX - LTEXT ":", -1, 19, 20, 60, 8 - LTEXT ":", -1, 19, 34, 60, 8 - LTEXT ":", -1, 19, 48, 60, 8 - GROUPBOX "", -1, 9, 74, 182, 70, BS_GROUPBOX - RTEXT "", -1, 26, 90, 60, 8 + GROUPBOX "Підключення", -1, 9, 8, 182, 58, BS_GROUPBOX + LTEXT "Стан:", -1, 19, 20, 60, 8 + LTEXT "Тривалість:", -1, 19, 34, 60, 8 + LTEXT "Швидкість:", -1, 19, 48, 60, 8 + GROUPBOX "Активність", -1, 9, 74, 182, 70, BS_GROUPBOX + RTEXT "Надіслано", -1, 26, 90, 60, 8 ICON "", IDC_NETSTAT, 110, 85, 32, 32 - LTEXT "", -1, 149, 90, 37, 8 - LTEXT ":", -1, 17, 115, 32, 8 + LTEXT "Отримано", -1, 149, 90, 37, 8 + LTEXT "Байтів:", -1, 17, 115, 32, 8 RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 - PUSHBUTTON "&", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 - PUSHBUTTON "&", IDC_ENDISABLE, 66, 150, 50, 14 + PUSHBUTTON "Влас&тивості", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "Ви&мкнути", IDC_ENDISABLE, 66, 150, 50, 14 RTEXT "",IDC_STATUS,83,20,98,8 RTEXT "",IDC_DURATION,83,34,98,8 RTEXT "",IDC_SPEED,83,48,98,8 @@ -59,76 +59,76 @@ END IDD_LAN_NETSTATUSADVANCED DIALOGEX DISCARDABLE 0, 0, 200,180 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "ϳ" +CAPTION "Підтримка" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 9, 8, 189, 88, BS_GROUPBOX - LTEXT " :", -1, 22, 20, 80, 8 - LTEXT "IP-:", -1, 22, 34, 80, 8 - LTEXT " :", -1, 22, 48, 80, 8 - LTEXT " :", -1, 22, 62, 80, 8 + GROUPBOX "Стан підключення", -1, 9, 8, 189, 88, BS_GROUPBOX + LTEXT "Тип адреси:", -1, 22, 20, 80, 8 + LTEXT "IP-адреса:", -1, 22, 34, 80, 8 + LTEXT "Маска підмережі:", -1, 22, 48, 80, 8 + LTEXT "Основний шлюз:", -1, 22, 62, 80, 8 RTEXT "N/A", IDC_DETAILSTYPE, 115, 20, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSIP, 115, 34, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSSUBNET, 115, 48, 80, 8 RTEXT "", IDC_DETAILSGATEWAY, 115, 62, 80, 8 - PUSHBUTTON "&...", IDC_DETAILS, 22, 76, 62, 14 + PUSHBUTTON "&Склад...", IDC_DETAILS, 22, 76, 62, 14 END IDD_LAN_NETSTATUSDETAILS DIALOGEX DISCARDABLE 0, 0, 200,200 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "³ " +CAPTION "Відомості про мережне підключення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&³ :", -1, 15, 9, 170, 12 + LTEXT "&Відомості про мережне підключення:", -1, 15, 9, 170, 12 CONTROL "", IDC_DETAILS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 15, 25, 170, 130 - PUSHBUTTON "&", IDC_CLOSE, 125, 165, 62, 14 + PUSHBUTTON "&Закрити", IDC_CLOSE, 125, 165, 62, 14 END STRINGTABLE DISCARDABLE BEGIN - IDS_PHYSICAL_ADDRESS "Գ " - IDS_IP_ADDRESS "IP-" - IDS_SUBNET_MASK " " - IDS_DEF_GATEWAY " " - IDS_DHCP_SERVER "DHCP-" - IDS_LEASE_OBTAINED " " - IDS_LEASE_EXPIRES " " - IDS_DNS_SERVERS "DNS-" - IDS_WINS_SERVERS "WINS-" - IDS_PROPERTY "" - IDS_VALUE "" - IDS_NETWORKCONNECTION " " - IDS_SHV_COLUMN_NAME "'" - IDS_SHV_COLUMN_TYPE "" - IDS_SHV_COLUMN_STATE "" - IDS_SHV_COLUMN_DEVNAME "' " - IDS_SHV_COLUMN_PHONE " " - IDS_SHV_COLUMN_OWNER "" - IDS_TYPE_ETHERNET " " - IDS_STATUS_NON_OPERATIONAL "" - IDS_STATUS_UNREACHABLE " " - IDS_STATUS_DISCONNECTED " " - IDS_STATUS_CONNECTING " " - IDS_STATUS_CONNECTED "ϳ" - IDS_STATUS_OPERATIONAL "ϳ" + IDS_PHYSICAL_ADDRESS "Фізична адреса" + IDS_IP_ADDRESS "IP-адреса" + IDS_SUBNET_MASK "Маска підмережі" + IDS_DEF_GATEWAY "Основний шлюз" + IDS_DHCP_SERVER "DHCP-сервер" + IDS_LEASE_OBTAINED "Оренду отримано" + IDS_LEASE_EXPIRES "Оренда закінчується" + IDS_DNS_SERVERS "DNS-сервери" + IDS_WINS_SERVERS "WINS-сервери" + IDS_PROPERTY "Властивість" + IDS_VALUE "Значення" + IDS_NETWORKCONNECTION "Мережне підключення" + IDS_SHV_COLUMN_NAME "Ім'я" + IDS_SHV_COLUMN_TYPE "Тип" + IDS_SHV_COLUMN_STATE "Стан" + IDS_SHV_COLUMN_DEVNAME "Ім'я пристрою" + IDS_SHV_COLUMN_PHONE "Номер телефону або адреса вузла" + IDS_SHV_COLUMN_OWNER "Власник" + IDS_TYPE_ETHERNET "ЛОМ або високошвидкісний Інтернет" + IDS_STATUS_NON_OPERATIONAL "Вимкнуто" + IDS_STATUS_UNREACHABLE "Не підключено" + IDS_STATUS_DISCONNECTED "Мережний кабель не підключено" + IDS_STATUS_CONNECTING "Отримання мережної адреси" + IDS_STATUS_CONNECTED "Підключено" + IDS_STATUS_OPERATIONAL "Підключено" - IDS_NET_ACTIVATE "" - IDS_NET_DEACTIVATE "" - IDS_NET_STATUS "" - IDS_NET_REPAIR "" - IDS_NET_CREATELINK " " - IDS_NET_DELETE "" - IDS_NET_PROPERTIES "" + IDS_NET_ACTIVATE "Увімкнути" + IDS_NET_DEACTIVATE "Вимкнути" + IDS_NET_STATUS "Стан" + IDS_NET_REPAIR "Виправити" + IDS_NET_CREATELINK "Створити ярлик" + IDS_NET_DELETE "Видалити" + IDS_NET_PROPERTIES "Властивості" - IDS_FORMAT_BIT "%u /" - IDS_FORMAT_KBIT "%u /" - IDS_FORMAT_MBIT "%u /" - IDS_FORMAT_GBIT "%u /" - IDS_DURATION_DAY "%d %s" - IDS_DURATION_DAYS "%d %s" - IDS_ASSIGNED_DHCP " DHCP" - IDS_ASSIGNED_MANUAL " " + IDS_FORMAT_BIT "%u біт/с" + IDS_FORMAT_KBIT "%u Кбіт/с" + IDS_FORMAT_MBIT "%u Мбіт/с" + IDS_FORMAT_GBIT "%u Гбіт/с" + IDS_DURATION_DAY "%d День %s" + IDS_DURATION_DAYS "%d Днів %s" + IDS_ASSIGNED_DHCP "Надано DHCP" + IDS_ASSIGNED_MANUAL "Налаштовано вручну" END diff --git a/dll/win32/netshell/netshell.rc b/dll/win32/netshell/netshell.rc index 47f67ab2301..c7baccaead4 100644 --- a/dll/win32/netshell/netshell.rc +++ b/dll/win32/netshell/netshell.rc @@ -36,10 +36,13 @@ IDI_NET_TRANSREC ICON "res/nettrrec.ico" #include "lang/ja-JP.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/dll/win32/newdev/lang/pl-PL.rc b/dll/win32/newdev/lang/pl-PL.rc index 6a56e9928c2..7fe93169cef 100644 --- a/dll/win32/newdev/lang/pl-PL.rc +++ b/dll/win32/newdev/lang/pl-PL.rc @@ -1,8 +1,9 @@ /* - * translated by TestamenT - * testament@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * corrected by Caemyr - Olaf Siejka + * translated by TestamenT + * testament@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * corrected by Caemyr - Olaf Siejka (May, 2007; Jan, 2008) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -10,107 +11,106 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Witamy",IDC_WELCOMETITLE,120,8,195,24 - LTEXT "Ten kreator zainstaluje nowe sterowniki dla urzdzenia:", + LTEXT "Ten kreator zainstaluje nowe sterowniki dla urządzenia:", IDC_STATIC,120,21,195,16 - LTEXT "Nacinij Dalej, aby kontynuowa.",IDC_STATIC,120,169,195,17 - LTEXT "NIEZNANE URZDZENIE",IDC_DEVICE,134,36,164,11 - LTEXT "UWAGA! NIEODPOWIEDNI STEROWNIK MOE ZDESTABILIZOWA LUB NAWET ZAWIESI SYSTEM!",IDC_STATIC,120,59,195,16 + LTEXT "Naciśnij Dalej, aby kontynuować.",IDC_STATIC,120,169,195,17 + LTEXT "NIEZNANE URZĄDZENIE",IDC_DEVICE,134,36,164,11 + LTEXT "UWAGA! NIEODPOWIEDNI STEROWNIK MOŻE ZDESTABILIZOWAĆ LUB NAWET ZAWIESIĆ SYSTEM!",IDC_STATIC,120,59,195,16 CONTROL "Zainstaluj sterownik automatycznie",IDC_RADIO_AUTO,"Button", BS_AUTORADIOBUTTON,120,112,178,13 - CONTROL "Zainstaluj sterownik z okrelonej lokalizacji",IDC_RADIO_MANUAL, + CONTROL "Zainstaluj sterownik z określonej lokalizacji",IDC_RADIO_MANUAL, "Button",BS_AUTORADIOBUTTON,120,133,164,14 END IDD_NODRIVER DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Instalacja nieudana",IDC_FINISHTITLE,120,8,195,24 - LTEXT "Instalacja zakoczona niepowodzeniem, sterownik dla tego urzdzenia nie zosta znaleziony.", + LTEXT "Instalacja zakończona niepowodzeniem, sterownik dla tego urządzenia nie został znaleziony.", IDC_STATIC,120,40,195,19 - LTEXT "Nacinij Wstecz, jeeli chcesz poda ciek do sterownika.", + LTEXT "Naciśnij Wstecz, jeżeli chcesz podać ścieżkę do sterownika.", IDC_STATIC,120,98,181,24 - CONTROL "Nie pokazuj wicej tej wiadomoci",IDC_DONOTSHOWDLG,"Button", + CONTROL "Nie pokazuj więcej tej wiadomości",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 END IDD_INSTALLFAILED DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Instalacja nieudana",IDC_FINISHTITLE,120,8,195,24 - LTEXT "Instalacja zakoczona niepowodzeniem, z powodu wystpienia nieoczekiwanego bdu.", + LTEXT "Instalacja zakończona niepowodzeniem, z powodu wystąpienia nieoczekiwanego błędu.", IDC_STATIC,120,40,195,19 - LTEXT "NIEZNANE URZDZENIE",IDC_DEVICE,134,55,164,11 + LTEXT "NIEZNANE URZĄDZENIE",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Szukanie w wybranej lokalizacji",IDC_RADIO_SEARCHHERE,"Button", BS_AUTORADIOBUTTON,27,11,239,13 - CONTROL "Wybierz sterownik rcznie",IDC_RADIO_CHOOSE,"Button", + CONTROL "Wybierz sterownik ręcznie",IDC_RADIO_CHOOSE,"Button", BS_AUTORADIOBUTTON,27,98,171,12 - CONTROL "Szukaj w nonikach wymiennych",IDC_CHECK_MEDIA,"Button", + CONTROL "Szukaj w nośnikach wymiennych",IDC_CHECK_MEDIA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9 - CONTROL "Uwzgldnij podan ciek",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | + CONTROL "Uwzględnij podaną ścieżkę",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,47,54,162,10 - PUSHBUTTON "Przegldaj",IDC_BROWSE,248,69,50,14 + PUSHBUTTON "Przeglądaj",IDC_BROWSE,248,69,50,14 COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL END IDD_SEARCHDRV DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "NIEZNANE URZDZENIE",IDC_DEVICE,51,20,169,16 + LTEXT "NIEZNANE URZĄDZENIE",IDC_DEVICE,51,20,169,16 END IDD_INSTALLDRV DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "NIEZNANE URZDZENIE",IDC_DEVICE,51,20,169,16 + LTEXT "NIEZNANE URZĄDZENIE",IDC_DEVICE,51,20,169,16 END IDD_NEEDREBOOT DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Instalacja zakoczona",IDC_FINISHTITLE,120,8,195,11 - LTEXT "Naley zrestartowa komputer, zakaczanie instalacji:", + LTEXT "Instalacja zakończona",IDC_FINISHTITLE,120,8,195,11 + LTEXT "Należy zrestartować komputer, zakańczanie instalacji:", IDC_STATIC,120,32,195,19 - LTEXT "Nacinij Zakocz, aby zamkn kreator.",IDC_STATIC,120,174, + LTEXT "Naciśnij Zakończ, aby zamknąć kreator.",IDC_STATIC,120,174, 179,11 - LTEXT "NIEZNANE URZDZENIE",IDC_DEVICE,148,53,147,12 + LTEXT "NIEZNANE URZĄDZENIE",IDC_DEVICE,148,53,147,12 END IDD_FINISHPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Instalacja urzdzenia" +CAPTION "Instalacja urządzenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Instalacja zakoczona",IDC_FINISHTITLE,120,8,195,11 - LTEXT "Kreator zakoczy instalacj sterownika dla:", + LTEXT "Instalacja zakończona",IDC_FINISHTITLE,120,8,195,11 + LTEXT "Kreator zakończył instalację sterownika dla:", IDC_STATIC,120,32,195,19 - LTEXT "Nacinij Zakocz, aby zamkn kreator.",IDC_STATIC,120,174, + LTEXT "Naciśnij Zakończ, aby zamknąć kreator.",IDC_STATIC,120,174, 179,11 - LTEXT "NIEZNANE URZDZENIE",IDC_DEVICE,148,53,147,12 + LTEXT "NIEZNANE URZĄDZENIE",IDC_DEVICE,148,53,147,12 END - diff --git a/dll/win32/newdev/lang/ro-RO.rc b/dll/win32/newdev/lang/ro-RO.rc index 0489abfdce5..754701b55d6 100644 --- a/dll/win32/newdev/lang/ro-RO.rc +++ b/dll/win32/newdev/lang/ro-RO.rc @@ -1,7 +1,5 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_WELCOMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU @@ -108,5 +106,3 @@ BEGIN 179,11 LTEXT "DISPOZITIV NECUNOSCUT",IDC_DEVICE,148,53,147,12 END - -#pragma code_page(default) diff --git a/dll/win32/newdev/lang/ru-RU.rc b/dll/win32/newdev/lang/ru-RU.rc index 6fe3ba96f4f..8ff6798c4a2 100644 --- a/dll/win32/newdev/lang/ru-RU.rc +++ b/dll/win32/newdev/lang/ru-RU.rc @@ -3,106 +3,106 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_WELCOMETITLE,120,8,210,24 - LTEXT " :", + LTEXT "Установка нового оборудования",IDC_WELCOMETITLE,120,8,210,24 + LTEXT "Этот мастер устанавливает драйвер для:", IDC_STATIC,120,21,195,16 - LTEXT " """".",IDC_STATIC,120,169,195,17 - LTEXT " ",IDC_DEVICE,134,36,164,11 - LTEXT "! !",IDC_STATIC,120,59,195,25 - CONTROL " ",IDC_RADIO_AUTO,"Button", + LTEXT "Для продолжения нажмите кнопку ""Далее"".",IDC_STATIC,120,169,195,17 + LTEXT "Неизвестное устройство",IDC_DEVICE,134,36,164,11 + LTEXT "ВНИМАНИЕ! Установка нового оборудования может закончиться зависанием компьютера или невозможностью загрузить его!",IDC_STATIC,120,59,195,25 + CONTROL "Установить драйвер автоматически",IDC_RADIO_AUTO,"Button", BS_AUTORADIOBUTTON,120,112,178,13 - CONTROL " ",IDC_RADIO_MANUAL, + CONTROL "Установить драйвер из указанного места",IDC_RADIO_MANUAL, "Button",BS_AUTORADIOBUTTON,120,133,164,14 END IDD_NODRIVER DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,24 - LTEXT " , .", + LTEXT "Это оборудование установить не удалось",IDC_FINISHTITLE,120,8,195,24 + LTEXT "Оборудование не установлено, поскольку мастер не смог найти нужного программного обеспечения.", IDC_STATIC,120,40,195,19 - LTEXT " , """".", + LTEXT "Если имеются установочные диски или известно расположение нужного программного обеспечения, нажмите кнопку ""Назад"".", IDC_STATIC,120,125,181,24 - CONTROL " .",IDC_DONOTSHOWDLG,"Button", + CONTROL "Больше не напоминать об установке этого драйвера.",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,190,11 END IDD_INSTALLFAILED DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,24 - LTEXT " . .", + LTEXT "Это оборудование установить не удалось",IDC_FINISHTITLE,120,8,195,24 + LTEXT "Неизвестная ошибка. Не удалось установить устройство.", IDC_STATIC,120,40,195,19 - LTEXT " ",IDC_DEVICE,134,55,164,11 + LTEXT "Неизвестное устройство",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ",IDC_RADIO_SEARCHHERE,"Button", + CONTROL "Искать по этим путям",IDC_RADIO_SEARCHHERE,"Button", BS_AUTORADIOBUTTON,27,11,239,13 - CONTROL " ",IDC_RADIO_CHOOSE,"Button", + CONTROL "Выбор драйвера вручную",IDC_RADIO_CHOOSE,"Button", BS_AUTORADIOBUTTON,27,98,171,12 - CONTROL " ",IDC_CHECK_MEDIA,"Button", + CONTROL "Поиск на сменных носителях",IDC_CHECK_MEDIA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9 - CONTROL " ",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | + CONTROL "Включить это место поиска",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,47,54,162,10 - PUSHBUTTON "",IDC_BROWSE,248,69,50,14 + PUSHBUTTON "Обзор",IDC_BROWSE,248,69,50,14 COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL END IDD_SEARCHDRV DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_DEVICE,51,20,169,16 + LTEXT "Неизвестное устройство",IDC_DEVICE,51,20,169,16 END IDD_INSTALLDRV DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_DEVICE,51,20,169,16 + LTEXT "Неизвестное устройство",IDC_DEVICE,51,20,169,16 END IDD_NEEDREBOOT DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,11 - LTEXT " , :", + LTEXT "Установка оборудования завершена",IDC_FINISHTITLE,120,8,195,11 + LTEXT "Вы должны выполнить перезагрузку, чтобы закончить установку:", IDC_STATIC,120,32,195,19 - LTEXT " """" .",IDC_STATIC,120,174,179,11 - LTEXT " ",IDC_DEVICE,148,53,147,12 + LTEXT "Нажмите ""Готово"" для завершения мастера.",IDC_STATIC,120,174,179,11 + LTEXT "Неизвестное устройство",IDC_DEVICE,148,53,147,12 END IDD_FINISHPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Мастер нового оборудования" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,11 - LTEXT " :", + LTEXT "Установка завершена",IDC_FINISHTITLE,120,8,195,11 + LTEXT "Мастер закончил установку драйвера для:", IDC_STATIC,120,32,195,19 - LTEXT " """" .",IDC_STATIC,120,174, + LTEXT "Нажмите ""Готово"" для завершения мастера.",IDC_STATIC,120,174, 179,11 - LTEXT " ",IDC_DEVICE,148,53,147,12 + LTEXT "Неизвестное устройство",IDC_DEVICE,148,53,147,12 END diff --git a/dll/win32/newdev/lang/uk-UA.rc b/dll/win32/newdev/lang/uk-UA.rc index 707dcca0896..fb9872b83d5 100644 --- a/dll/win32/newdev/lang/uk-UA.rc +++ b/dll/win32/newdev/lang/uk-UA.rc @@ -11,108 +11,108 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_WELCOMETITLE,120,8,195,24 - LTEXT " :", + LTEXT "Ласкаво просимо",IDC_WELCOMETITLE,120,8,195,24 + LTEXT "Цей майстер встановлює новий драйвер пристрою для:", IDC_STATIC,120,21,195,16 - LTEXT " """" .",IDC_STATIC,120,169,195,17 - LTEXT "² в",IDC_DEVICE,134,36,164,11 - LTEXT "! ' !",IDC_STATIC,120,59,195,24 - CONTROL " ",IDC_RADIO_AUTO,"Button", + LTEXT "Натисніть ""Далі"" для продовження.",IDC_STATIC,120,169,195,17 + LTEXT "НЕВІДОМИЙ ПРИСТРІЙ",IDC_DEVICE,134,36,164,11 + LTEXT "ПОПЕРЕДЖЕННЯ! ВСТАНОВЛЕННЯ ПРИСТРОЮ МОЖЕ ЗАМОРОЗИТИ ВАШ КОМП'ЮТЕР АБО ЗРОБИТИ ЙОГО НЕЗДАТНИМ ДО ЗАВАНТАЖЕННЯ!",IDC_STATIC,120,59,195,24 + CONTROL "Встановити драйвер автоматично",IDC_RADIO_AUTO,"Button", BS_AUTORADIOBUTTON,120,112,178,13 - CONTROL " ",IDC_RADIO_MANUAL, + CONTROL "Встановити драйвер з вказаного місця",IDC_RADIO_MANUAL, "Button",BS_AUTORADIOBUTTON,120,133,164,14 END IDD_NODRIVER DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,24 - LTEXT " , .", + LTEXT "Встановлення не вдалося",IDC_FINISHTITLE,120,8,195,24 + LTEXT "Пристрій не встановлено, тому що драйвер не знайдено.", IDC_STATIC,120,40,195,19 - LTEXT " """", .", + LTEXT "Натисніть ""Назад"", якщо у Вас є диск з драйвером або Ви знаєте шлях до драйвера.", IDC_STATIC,120,98,181,24 - CONTROL " ",IDC_DONOTSHOWDLG,"Button", + CONTROL "Більше не показувати цей діалог",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 END IDD_INSTALLFAILED DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,24 - LTEXT " .", + LTEXT "Встановлення не вдалося",IDC_FINISHTITLE,120,8,195,24 + LTEXT "Пристрій не встановлено тому що сталася несподівана помилка.", IDC_STATIC,120,40,195,19 - LTEXT "² в",IDC_DEVICE,134,55,164,11 + LTEXT "НЕВІДОМИЙ ПРИСТРІЙ",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - CONTROL " ",IDC_RADIO_SEARCHHERE,"Button", + CONTROL "Пошук по цих шляхах",IDC_RADIO_SEARCHHERE,"Button", BS_AUTORADIOBUTTON,27,11,239,13 - CONTROL " ",IDC_RADIO_CHOOSE,"Button", + CONTROL "Вибрати драйвер вручну",IDC_RADIO_CHOOSE,"Button", BS_AUTORADIOBUTTON,27,98,171,12 - CONTROL " ",IDC_CHECK_MEDIA,"Button", + CONTROL "Шукати на змінних носіях",IDC_CHECK_MEDIA,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9 - CONTROL " ",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | + CONTROL "Включити цей шлях",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,47,54,162,10 - PUSHBUTTON "",IDC_BROWSE,248,69,50,14 + PUSHBUTTON "Огляд",IDC_BROWSE,248,69,50,14 COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL END IDD_SEARCHDRV DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "² в",IDC_DEVICE,51,20,169,16 + LTEXT "НЕВІДОМИЙ ПРИСТРІЙ",IDC_DEVICE,51,20,169,16 END IDD_INSTALLDRV DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "² в",IDC_DEVICE,51,20,169,16 + LTEXT "НЕВІДОМИЙ ПРИСТРІЙ",IDC_DEVICE,51,20,169,16 END IDD_NEEDREBOOT DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,11 - LTEXT " , :", + LTEXT "Встановлення завершене",IDC_FINISHTITLE,120,8,195,11 + LTEXT "Ви маєте перезапустити комп’ютер, щоб закінчити встановлення:", IDC_STATIC,120,32,195,19 - LTEXT " """" .",IDC_STATIC,120,174, + LTEXT "Натисніть ""Завершити"" для виходу з майстра.",IDC_STATIC,120,174, 179,11 - LTEXT "² в",IDC_DEVICE,148,53,147,12 + LTEXT "НЕВІДОМИЙ ПРИСТРІЙ",IDC_DEVICE,148,53,147,12 END IDD_FINISHPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Встановлення пристрою" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ",IDC_FINISHTITLE,120,8,195,11 - LTEXT " :", + LTEXT "Встановлення завершене",IDC_FINISHTITLE,120,8,195,11 + LTEXT "Майстер закінчив встановлення драйвера для:", IDC_STATIC,120,32,195,19 - LTEXT " """" .",IDC_STATIC,120,174, + LTEXT "Натисніть ""Завершити"" для виходу з майстра.",IDC_STATIC,120,174, 179,11 - LTEXT "² в",IDC_DEVICE,148,53,147,12 + LTEXT "НЕВІДОМИЙ ПРИСТРІЙ",IDC_DEVICE,148,53,147,12 END diff --git a/dll/win32/newdev/rsrc.rc b/dll/win32/newdev/rsrc.rc index 8e7d4e205f6..1e2449c77c4 100644 --- a/dll/win32/newdev/rsrc.rc +++ b/dll/win32/newdev/rsrc.rc @@ -19,9 +19,12 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/ja-JP.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" +#include "lang/sk-SK.rc" +#include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" -#include "lang/th-TH.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/odbc32/CMakeLists.txt b/dll/win32/odbc32/CMakeLists.txt index 84aeb39ce6d..da84e343c27 100644 --- a/dll/win32/odbc32/CMakeLists.txt +++ b/dll/win32/odbc32/CMakeLists.txt @@ -1,6 +1,5 @@ add_definitions(-D__WINESRC__) -add_definitions(-D_DLL -D__USE_CRTIMP) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -23,5 +22,4 @@ add_importlibs(odbc32 kernel32 ntdll) - add_cd_file(TARGET odbc32 DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/odbccp32/CMakeLists.txt b/dll/win32/odbccp32/CMakeLists.txt index 3eb259b7afe..16e60613f59 100644 --- a/dll/win32/odbccp32/CMakeLists.txt +++ b/dll/win32/odbccp32/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(odbccp32.dll odbccp32.spec) @@ -13,8 +10,8 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/odbccp32.def) add_library(odbccp32 SHARED ${SOURCE}) -set_entrypoint(odbccp32 0) +set_entrypoint(odbccp32 0) target_link_libraries(odbccp32 uuid wine) add_importlibs(odbccp32 diff --git a/dll/win32/oleaut32/CMakeLists.txt b/dll/win32/oleaut32/CMakeLists.txt index 1a27084c2cb..bc1c63005ef 100644 --- a/dll/win32/oleaut32/CMakeLists.txt +++ b/dll/win32/oleaut32/CMakeLists.txt @@ -1,4 +1,25 @@ +remove_definitions(-D_WIN32_WINNT=0x502) +add_definitions(-D_WIN32_WINNT=0x600) + +add_definitions(-DPROXY_CLSID_IS="{0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}") + +add_definitions( + -D__WINESRC__ + -DCOM_NO_WINDOWS_H + -D_OLEAUT32_ + -DPROXY_DELEGATION + -DREGISTER_PROXY_DLL + -DENTRY_PREFIX=OLEAUTPS_) + +include_directories( + ${REACTOS_SOURCE_DIR}/include/reactos/libs/libjpeg + ${REACTOS_SOURCE_DIR}/include/reactos/wine) + +spec2def(oleaut32.dll oleaut32.spec) + +add_rpcproxy_files(oleaut32_oaidl.idl oleaut32_ocidl.idl) + list(APPEND SOURCE connpt.c dispatch.c @@ -25,32 +46,12 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_ocidl_p.c ${CMAKE_CURRENT_BINARY_DIR}/oleaut32.def) -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - -add_definitions(-DPROXY_CLSID_IS="{0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}") - -add_definitions( - -D__WINESRC__ - -DCOM_NO_WINDOWS_H - -D_OLEAUT32_ - -DPROXY_DELEGATION - -DREGISTER_PROXY_DLL - -DENTRY_PREFIX=OLEAUTPS_) - -if(MSC) -# seems to work, but is this correct ? -# /FIwine/typeof.h -add_definitions(/FIwine/typeof.h) -endif(MSC) - -include_directories( - ${REACTOS_SOURCE_DIR}/include/reactos/libs/libjpeg - ${REACTOS_SOURCE_DIR}/include/reactos/wine) - -spec2def(oleaut32.dll oleaut32.spec) - -add_rpcproxy_files(oleaut32_oaidl.idl oleaut32_ocidl.idl) +if(MSVC) + set_source_files_properties(${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c PROPERTIES GENERATED TRUE) + list(APPEND SOURCE + ${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c + msvc.S) +endif() add_library(oleaut32 SHARED ${SOURCE}) diff --git a/dll/win32/oleaut32/msvc.S b/dll/win32/oleaut32/msvc.S new file mode 100644 index 00000000000..df7f68ea00c --- /dev/null +++ b/dll/win32/oleaut32/msvc.S @@ -0,0 +1,30 @@ + +#include + +.code32 + +PUBLIC _call_method +_call_method: + push ebp + mov ebp, esp + push esi + push edi + mov edx, dword ptr ds:[ebp + 12] + shl edx, 2 + jz cm1 + sub esp, edx + and esp, HEX(0FFFFFFF0) + mov ecx, dword ptr ds:[ebp + 12] + mov esi, dword ptr ds:[ebp + 16] + mov edi, esp + cld + rep movsd +cm1: + call dword ptr ds:[ebp + 8] + lea esp, [ebp - 8] + pop edi + pop esi + pop ebp + ret + +END diff --git a/dll/win32/oleaut32/typelib2.c b/dll/win32/oleaut32/typelib2.c index 92d4ab036d6..1333b68eaad 100644 --- a/dll/win32/oleaut32/typelib2.c +++ b/dll/win32/oleaut32/typelib2.c @@ -1780,7 +1780,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( insert = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); if(!insert) return E_OUTOFMEMORY; - insert->u.data = HeapAlloc(GetProcessHeap(), 0, sizeof(int[6])+sizeof(int[(num_defaults?4:3)])*pFuncDesc->cParams); + insert->u.data = HeapAlloc(GetProcessHeap(), 0, sizeof(int)*6+sizeof(int)*(num_defaults?4:3)*pFuncDesc->cParams); if(!insert->u.data) { HeapFree(GetProcessHeap(), 0, insert); return E_OUTOFMEMORY; diff --git a/dll/win32/olesvr32/CMakeLists.txt b/dll/win32/olesvr32/CMakeLists.txt index a50cfd70edc..dbfc68a3ef4 100644 --- a/dll/win32/olesvr32/CMakeLists.txt +++ b/dll/win32/olesvr32/CMakeLists.txt @@ -13,9 +13,7 @@ add_library(olesvr32 SHARED ${SOURCE}) set_entrypoint(olesvr32 0) -target_link_libraries(olesvr32 - wine - mingw_common) +target_link_libraries(olesvr32 wine) add_importlibs(olesvr32 kernel32 ntdll) add_dependencies(olesvr32 psdk) diff --git a/dll/win32/opengl32/CMakeLists.txt b/dll/win32/opengl32/CMakeLists.txt index a395c5afd7d..bdf1e4f1ec2 100644 --- a/dll/win32/opengl32/CMakeLists.txt +++ b/dll/win32/opengl32/CMakeLists.txt @@ -1,8 +1,6 @@ set_unicode() -add_definitions(-D_DLL -D__USE_CRTIMP) - spec2def(opengl32.dll opengl32.spec) list(APPEND SOURCE @@ -13,9 +11,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/opengl32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/opengl32.def) -add_library(opengl32 SHARED - ${CMAKE_CURRENT_BINARY_DIR}/opengl32_opengl32.h.gch - ${SOURCE}) +add_library(opengl32 SHARED ${SOURCE}) set_module_type(opengl32 win32dll) @@ -28,7 +24,7 @@ add_importlibs(opengl32 kernel32 ntdll) -add_pch(opengl32 ${CMAKE_CURRENT_SOURCE_DIR}/opengl32.h ${SOURCE}) +add_pch(opengl32 opengl32.h) add_cd_file(TARGET opengl32 DESTINATION reactos/system32 FOR all) add_importlib_target(opengl32.spec) diff --git a/dll/win32/psapi/CMakeLists.txt b/dll/win32/psapi/CMakeLists.txt index f0666f0210f..dda730acbd0 100644 --- a/dll/win32/psapi/CMakeLists.txt +++ b/dll/win32/psapi/CMakeLists.txt @@ -7,13 +7,11 @@ list(APPEND SOURCE psapi.rc ${CMAKE_CURRENT_BINARY_DIR}/psapi.def) -add_library(psapi SHARED - ${CMAKE_CURRENT_BINARY_DIR}/psapi_precomp.h.gch - ${SOURCE}) +add_library(psapi SHARED ${SOURCE}) set_module_type(psapi win32dll) target_link_libraries(psapi epsapi ${PSEH_LIB}) add_importlibs(psapi msvcrt kernel32 ntdll) add_importlib_target(psapi.spec) -add_pch(psapi ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(psapi precomp.h) add_cd_file(TARGET psapi DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/rasdlg/lang/pl-PL.rc b/dll/win32/rasdlg/lang/pl-PL.rc index 988944f35ee..97ea93aab19 100644 --- a/dll/win32/rasdlg/lang/pl-PL.rc +++ b/dll/win32/rasdlg/lang/pl-PL.rc @@ -3,6 +3,7 @@ * Use ReactOS forum PM or IRC to contact me * http://www.reactos.org * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -12,69 +13,69 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Dodatkowe Numery Telefoniczne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Podaj dodatkowe numery telefoniczne, ktrych chcesz uywa w tym poczeniu.", 1018, 7, 5, 243, 16 + LTEXT "Podaj dodatkowe numery telefoniczne, których chcesz używać w tym połączeniu.", 1018, 7, 5, 243, 16 LTEXT "&Numery telefoniczne:", 1019, 7, 27, 238, 8 CONTROL "", 1012, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000848D, 7, 38, 217, 144 - PUSHBUTTON "W &gr", 1017, 230, 40, 18, 16, BS_ICON - PUSHBUTTON "W &d", 1015, 230, 61, 18, 16, BS_ICON + PUSHBUTTON "W &górę", 1017, 230, 40, 18, 16, BS_ICON + PUSHBUTTON "W &dół", 1015, 230, 61, 18, 16, BS_ICON PUSHBUTTON "D&odaj", 1013, 7, 187, 70, 14 PUSHBUTTON "&Edytuj", 1016, 81, 187, 70, 14 - PUSHBUTTON "&Usu", 1014, 154, 187, 70, 14 - AUTOCHECKBOX "&Jeeli numer nie dziaa, uyj kolejego", 1011, 8, 210, 243, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Move successful number to top of list", 1010, 8, 228, 243, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Usuń", 1014, 154, 187, 70, 14 + AUTOCHECKBOX "&Jeżeli numer nie działa, użyj kolejego", 1011, 8, 210, 243, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Przenieś sprawdzony numer na początek listy", 1010, 8, 228, 243, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 122, 245, 60, 14 PUSHBUTTON "Anuluj", 2, 188, 245, 60, 14 END 103 DIALOGEX 6, 18, 250, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "Poczenia Sieciowe" +CAPTION "Połączenia Sieciowe" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", 1029, 5, 5, 241, 35, NOT WS_GROUP - LTEXT "&Poczenia:", -1, 5, 46, 238, 10 + LTEXT "&Połączenia:", -1, 5, 46, 238, 10 CONTROL "List1", 1677, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 5, 57, 240, 57 AUTOCHECKBOX "&Nie pytaj mnie ponownie, do czasu kolejnego logowania", 1022, 8, 125, 235, 10 PUSHBUTTON "&Ustawienia", 1026, 7, 149, 60, 14 - DEFPUSHBUTTON "P&ocz...", 1024, 117, 149, 60, 14 + DEFPUSHBUTTON "P&ołącz...", 1024, 117, 149, 60, 14 PUSHBUTTON "Anuluj", 1025, 183, 149, 60, 14 END 104 DIALOGEX 6, 18, 269, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Bdy grupowania linii" +CAPTION "Błędy grupowania linii" FONT 8, "MS Shell Dlg" BEGIN ICON 32516, 1031, 7, 7, 20, 20 - LTEXT "Jedna lub wicej dodatkowych linii nie zostaa poczona. ", 1033, 37, 8, 216, 20 + LTEXT "Jedna lub więcej dodatkowych linii nie została połączona. ", 1033, 37, 8, 216, 20 CONTROL "", 1032, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00008401, 37, 83, 224, 136 - AUTOCHECKBOX "&Nie uywaj tej/tych linii w przyszoci", 1030, 38, 226, 222, 10 + AUTOCHECKBOX "&Nie używaj tej/tych linii w przyszłości", 1030, 38, 226, 222, 10 DEFPUSHBUTTON "&Akceptuj", 1, 135, 242, 60, 14 - PUSHBUTTON "&Rozcz", 2, 201, 242, 60, 14 - LTEXT "Jeli czy si tylko jedna linia, serwer moe nie by skonfigurowany do obsugi poczenia wieloliniowego. Zaznacz opcj 'Nie uywaj tej/tych linii' by unikn niepotrzebnych opad za poczenie.", -1, 37, 36, 224, 44 + PUSHBUTTON "&Rozłącz", 2, 201, 242, 60, 14 + LTEXT "Jeśli łączy się tylko jedna linia, serwer może nie być skonfigurowany do obsługi połączenia wieloliniowego. Zaznacz opcję 'Nie używaj tej/tych linii' by uniknąć niepotrzebnych opład za połączenie.", -1, 37, 36, 224, 44 END 105 DIALOGEX 0, 0, 261, 253 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Zaawansowane ustawienia bezpieczestwa" +CAPTION "Zaawansowane ustawienia bezpieczeństwa" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Bezpieczestwo logowania", 1547, 7, 33, 246, 191 + GROUPBOX "Bezpieczeństwo logowania", 1547, 7, 33, 246, 191 LTEXT "&Szyfrowanie danych:", 1546, 7, 5, 247, 10 COMBOBOX 1495, 7, 17, 247, 76, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTORADIOBUTTON "Uyj protokou &EAP", 1544, 17, 47, 226, 8, WS_GROUP - LTEXT "Rodzaj protokou EAP", -1, 18, 64, 35, 8, NOT WS_VISIBLE | NOT WS_GROUP + AUTORADIOBUTTON "Użyj protokołu &EAP", 1544, 17, 47, 226, 8, WS_GROUP + LTEXT "Rodzaj protokołu EAP", -1, 18, 64, 35, 8, NOT WS_VISIBLE | NOT WS_GROUP COMBOBOX 1034, 53, 62, 191, 42, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "W&aciwoci", 1035, 184, 77, 60, 14 - AUTORADIOBUTTON "Zezwl na ponisze &protokoy", 1545, 17, 92, 224, 10 - AUTOCHECKBOX "&Nieszyfrowane haso (PAP)", 1491, 28, 105, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + PUSHBUTTON "Wł&aściwości", 1035, 184, 77, 60, 14 + AUTORADIOBUTTON "Zezwól na poniższe &protokoły", 1545, 17, 92, 224, 10 + AUTOCHECKBOX "&Nieszyfrowane hasło (PAP)", 1491, 28, 105, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP AUTOCHECKBOX "Shiva &PAP (SPAP)", 1496, 28, 119, 214, 10, BS_TOP | BS_MULTILINE AUTOCHECKBOX "&Challenge Handshake Authentication Protocol (CHAP)", 1494, 28, 133, 215, 10, BS_TOP | BS_MULTILINE AUTOCHECKBOX "&MS CHAP (MS-CHAP)", 1493, 28, 148, 212, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "Zezwl na starsz wersj MS-CHAP dla serwerw &Win 95", 200, 46, 162, 198, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Zezwól na starszą wersję MS-CHAP dla serwerów &Win 95", 200, 46, 162, 198, 10, BS_TOP | BS_MULTILINE AUTOCHECKBOX "M&icrosoft CHAP Wersja 2 (MS-CHAP v2)", 1492, 28, 176, 200, 10, BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 28, 189, 208, 1 - AUTOCHECKBOX "&Dla protokow z rodziny MS-CHAP, automatycznie uyj mojej nazwy uytkownika i hasa z systemu ReactOS (take domeny jeli wystpuje)", 1549, 28, 195, 213, 24, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Dla protokołów z rodziny MS-CHAP, automatycznie użyj mojej nazwy użytkownika i hasła z systemu ReactOS (także domeny jeśli występuje)", 1549, 28, 195, 213, 24, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 127, 232, 60, 14 PUSHBUTTON "Anuluj", 2, 192, 232, 60, 14 END @@ -86,9 +87,9 @@ FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 97, 91, 60, 14 ICON 563, 1046, 7, 7, 20, 20 - LTEXT "Poczenie aktywne.", 1047, 40, 7, 212, 16 - LTEXT "Aby sprawdzi stan tego poczenia, albo je odczy, kliknij prawym przyciskiem myszki na jego ikon w katalogu Poczenia Sieciowe, or albo kliknij na ikon w zasobniku systemowym.", -1, 40, 30, 212, 34 - AUTOCHECKBOX "&Nie wywietlaj wicej tej wiadomoci", 1045, 40, 69, 212, 10, BS_TOP | BS_MULTILINE + LTEXT "Połączenie aktywne.", 1047, 40, 7, 212, 16 + LTEXT "Aby sprawdzić stan tego połączenia, albo je odłączyć, kliknij prawym przyciskiem myszki na jego ikonę w katalogu Połączenia Sieciowe, or albo kliknij na ikonę w zasobniku systemowym.", -1, 40, 30, 212, 34 + AUTOCHECKBOX "&Nie wyświetlaj więcej tej wiadomości", 1045, 40, 69, 212, 10, BS_TOP | BS_MULTILINE END 107 DIALOGEX 0, 0, 258, 167 @@ -102,7 +103,7 @@ BEGIN EDITTEXT 1051, 77, 30, 163, 14, ES_AUTOHSCROLL LTEXT "K&od krajowy:", 1056, 18, 48, 221, 8, NOT WS_GROUP COMBOBOX 1054, 17, 61, 224, 93, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "&Uyj regu wybierania", 1048, 20, 81, 219, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Użyj reguł wybierania", 1048, 20, 81, 219, 10, BS_TOP | BS_MULTILINE GROUPBOX "Ko&mentarz", 1052, 7, 102, 243, 36 EDITTEXT 1050, 17, 115, 224, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 127, 147, 60, 14 @@ -111,13 +112,13 @@ END 108 DIALOGEX 6, 18, 222, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Zmiana hasa" +CAPTION "Zmiana hasła" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wano twojego hasa w zdalnej sieci wygasa. Wprowad nowe haso i nacinij OK.", 1062, 7, 5, 210, 24 - LTEXT "&Nowe haso:", 1064, 8, 43, 108, 8 + LTEXT "Ważność twojego hasła w zdalnej sieci wygasła. Wprowadź nowe hasło i naciśnij OK.", 1062, 7, 5, 210, 24 + LTEXT "&Nowe hasło:", 1064, 8, 43, 108, 8 EDITTEXT 1060, 118, 38, 98, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&Potwierd nowe haso:", 1061, 8, 61, 102, 8 + LTEXT "&Potwierdź nowe hasło:", 1061, 8, 61, 102, 8 EDITTEXT 1058, 118, 57, 98, 14, ES_PASSWORD | ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 90, 84, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 154, 84, 60, 14 @@ -125,15 +126,15 @@ END 109 DIALOGEX 6, 18, 223, 122 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Zmiana hasa" +CAPTION "Zmiana hasła" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wano twojego hasa w zdalnej sieci wygasa. Wprowad nowe haso i nacinij OK.", 1062, 7, 5, 212, 29 - LTEXT "&Stare haso:", 1063, 7, 42, 108, 8 + LTEXT "Ważność twojego hasła w zdalnej sieci wygasła. Wprowadź nowe hasło i naciśnij OK.", 1062, 7, 5, 212, 29 + LTEXT "&Stare hasło:", 1063, 7, 42, 108, 8 EDITTEXT 1059, 116, 38, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&Nowe haso:", 1064, 7, 60, 108, 8 + LTEXT "&Nowe hasło:", 1064, 7, 60, 108, 8 EDITTEXT 1060, 116, 56, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&Potwierd nowe haso:", 1061, 7, 78, 108, 8 + LTEXT "&Potwierdź nowe hasło:", 1061, 7, 78, 108, 8 EDITTEXT 1058, 116, 74, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 92, 101, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 156, 101, 60, 14 @@ -144,8 +145,8 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Oddzwanianie" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Masz ustawiony przywilej oddzwaniania na serwerze. Nacinij OK by serwer oddzwoni na twj, podany poniej numer. Nacinij Anuluj by pomin oddzwanianie.", 1066, 5, 5, 221, 39, SS_NOPREFIX - LTEXT "&Wprowad numer telefoniczny modemu:", 1067, 5, 46, 222, 8, NOT WS_GROUP + LTEXT "Masz ustawiony przywilej oddzwaniania na serwerze. Naciśnij OK by serwer oddzwonił na twój, podany poniżej numer. Naciśnij Anuluj by pominąć oddzwanianie.", 1066, 5, 5, 221, 39, SS_NOPREFIX + LTEXT "&Wprowadź numer telefoniczny modemu:", 1067, 5, 46, 222, 8, NOT WS_GROUP EDITTEXT 1065, 5, 57, 221, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 100, 85, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 164, 85, 60, 14 @@ -153,31 +154,31 @@ END 111 DIALOGEX 6, 19, 265, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Bd poczenia z %1" +CAPTION "Błąd połączenia z %1" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, 1068, 7, 7, 20, 20, WS_GROUP LTEXT "", 1070, 34, 7, 226, 105 DEFPUSHBUTTON "Nie wybieraj=88", 1, 4, 117, 128, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 136, 117, 60, 14 - PUSHBUTTON "&Wicej informacji", 1069, 200, 117, 60, 14 + PUSHBUTTON "&Więcej informacji", 1069, 200, 117, 60, 14 END 112 DIALOGEX 6, 18, 263, 219 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Automatyczne wybieranie i zawieszanie pocze" +CAPTION "Automatyczne wybieranie i zawieszanie połączeń" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS moe automatycznie wybiera i zawiesza poczenie, w zalenoci od tego ile danych jest wysyane i odbierane.", 1085, 9, 7, 253, 30 + LTEXT "ReactOS może automatycznie wybierać i zawieszać połączenie, w zależności od tego ile danych jest wysyłane i odbierane.", 1085, 9, 7, 253, 30 GROUPBOX "Wybieranie automatyczne", -1, 6, 38, 249, 71 - LTEXT "Uyj dodatkowej linii, kiedy to poczenie spenia oba ponisze kryteria:", 1083, 16, 51, 237, 16, NOT WS_GROUP - LTEXT "Aktywno co &najmniej:", -1, 16, 73, 100, 8 + LTEXT "Użyj dodatkowej linii, kiedy to połączenie spełnia oba poniższe kryteria:", 1083, 16, 51, 237, 16, NOT WS_GROUP + LTEXT "Aktywność co &najmniej:", -1, 16, 73, 100, 8 COMBOBOX 1079, 117, 70, 60, 100, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP LTEXT "&Czas trwania co najmniej:", 1084, 16, 92, 99, 8, NOT WS_GROUP COMBOBOX 1080, 117, 89, 90, 162, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP GROUPBOX "Automatyczne zawieszanie", -1, 6, 113, 248, 81 - LTEXT "Zawie poczenie z tym urzdzeniem:", 1086, 16, 127, 230, 18, NOT WS_GROUP - LTEXT "Aktywno nie wicej &ni:", -1, 16, 150, 92, 8 + LTEXT "Zawieś połączenie z tym urządzeniem:", 1086, 16, 127, 230, 18, NOT WS_GROUP + LTEXT "Aktywność nie więcej &niż:", -1, 16, 150, 92, 8 COMBOBOX 1081, 115, 146, 60, 100, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP LTEXT "Czas &trwania co najmniej:", 1087, 16, 168, 92, 8, NOT WS_GROUP COMBOBOX 1082, 115, 166, 90, 151, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP @@ -187,7 +188,7 @@ END 113 DIALOGEX 21, 46, 225, 65 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "Poczenie z %1..." +CAPTION "Połączenie z %1..." FONT 8, "MS Shell Dlg" BEGIN ICON 563, 1417, 7, 7, 20, 20 @@ -197,18 +198,18 @@ END 114 DIALOGEX 6, 18, 225, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Poczenie Dial-Up" +CAPTION "Połączenie Dial-Up" FONT 8, "MS Shell Dlg" BEGIN ICON 563, 1098, 7, 6, 20, 20, WS_GROUP - LTEXT "Prba poczenia automatycznego zakoczona niepowodzeniem. Czy chcesz wyczy automatyczne poczenia z tej lokalizacji?", 1099, 40, 6, 181, 34, NOT WS_GROUP + LTEXT "Próba połączenia automatycznego zakończona niepowodzeniem. Czy chcesz wyłączyć automatyczne połączenia z tej lokalizacji?", 1099, 40, 6, 181, 34, NOT WS_GROUP PUSHBUTTON "&Tak", 1, 60, 42, 50, 14 DEFPUSHBUTTON "&Nie", 2, 115, 42, 50, 14 END 115 DIALOGEX 0, 0, 263, 124 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Poczenie z %1" +CAPTION "Połączenie z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 263, 50 @@ -216,105 +217,105 @@ BEGIN COMBOBOX 1416, 88, 56, 165, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP LTEXT "Wy&bieranie z:", 1415, 9, 77, 71, 8 COMBOBOX 1414, 88, 75, 89, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&Reguy wybierania", 1108, 181, 75, 72, 14 + PUSHBUTTON "&Reguły wybierania", 1108, 181, 75, 72, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 8, 96, 245, 1 - DEFPUSHBUTTON "&Dzwo", 1590, 8, 103, 61, 14 + DEFPUSHBUTTON "&Dzwoń", 1590, 8, 103, 61, 14 PUSHBUTTON "Anuluj", 1591, 70, 103, 60, 14 - PUSHBUTTON "W&aciwoci", 1107, 132, 103, 60, 14 + PUSHBUTTON "Wł&aściwości", 1107, 132, 103, 60, 14 PUSHBUTTON "&Pomoc", 1592, 194, 103, 60, 14 END 116 DIALOGEX 0, 0, 265, 176 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Poczenie z %1" +CAPTION "Połączenie z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 8, 60, 88, 8 + LTEXT "&Nazwa użytkownika:", 1413, 8, 60, 88, 8 EDITTEXT 1104, 103, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1112, 8, 79, 88, 8 + LTEXT "&Hasło:", 1112, 8, 79, 88, 8 EDITTEXT 1103, 103, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 8, 97, 248, 1 - AUTOCHECKBOX "&Zapisz t nazw uytkownika i haso dla nastpujcych uytkownikw:", 1101, 14, 105, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Zapisz tą nazwę użytkownika i hasło dla następujących użytkowników:", 1101, 14, 105, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "Tylko &ja", 1622, 26, 120, 226, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Kady kto uywa tego komputera", 1623, 26, 134, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Każdy kto używa tego komputera", 1623, 26, 134, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 8, 149, 248, 1 - DEFPUSHBUTTON "&Dzwo", 1590, 8, 156, 60, 14, WS_GROUP + DEFPUSHBUTTON "&Dzwoń", 1590, 8, 156, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 1591, 71, 156, 60, 14 - PUSHBUTTON "W&aciwoci", 1107, 133, 156, 60, 14 + PUSHBUTTON "Wł&aściwości", 1107, 133, 156, 60, 14 PUSHBUTTON "&Pomoc", 1592, 195, 156, 60, 14 END 117 DIALOGEX 0, 0, 263, 192 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Poczenie z %1" +CAPTION "Połączenie z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 9, 61, 92, 8 + LTEXT "&Nazwa użytkownika:", 1413, 9, 61, 92, 8 EDITTEXT 1104, 102, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1112, 9, 80, 92, 8 + LTEXT "&Hasło:", 1112, 9, 80, 92, 8 EDITTEXT 1103, 102, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL LTEXT "&Domena:", 1110, 9, 99, 91, 8 EDITTEXT 1102, 102, 95, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 9, 116, 247, 1 - AUTOCHECKBOX "&Zapisz t nazw uytkownika i haso dla nastpujcych uytkownikw:", 1101, 12, 123, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Zapisz tą nazwę użytkownika i hasło dla następujących użytkowników:", 1101, 12, 123, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "Tylko &ja", 1622, 25, 137, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Kady kto uywa tego komputera", 1623, 25, 151, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Każdy kto używa tego komputera", 1623, 25, 151, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 167, 247, 1 - DEFPUSHBUTTON "Dz&wo", 1590, 8, 173, 60, 14, WS_GROUP + DEFPUSHBUTTON "Dz&woń", 1590, 8, 173, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 1591, 71, 173, 60, 14 - PUSHBUTTON "W&aciwoci", 1107, 133, 173, 60, 14 + PUSHBUTTON "Wł&aściwości", 1107, 133, 173, 60, 14 PUSHBUTTON "&Pomoc", 1592, 195, 173, 60, 14 END 118 DIALOGEX 0, 0, 265, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Poczenie z %1" +CAPTION "Połączenie z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 10, 61, 92, 8 + LTEXT "&Nazwa użytkownika:", 1413, 10, 61, 92, 8 EDITTEXT 1104, 104, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1112, 10, 80, 92, 8 + LTEXT "&Hasło:", 1112, 10, 80, 92, 8 EDITTEXT 1103, 104, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL LTEXT "&Domena:", 1110, 10, 100, 92, 8 EDITTEXT 1102, 104, 95, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 11, 116, 247, 1 - AUTOCHECKBOX "&Zapisz t nazw uytkownika i haso dla nastpujcych uytkownikw:", 1101, 16, 124, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Zapisz tą nazwę użytkownika i hasło dla następujących użytkowników:", 1101, 16, 124, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "Tylko &ja", 1622, 29, 139, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Kady kto uywa tego komputera", 1623, 29, 152, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Każdy kto używa tego komputera", 1623, 29, 152, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 167, 247, 1 - LTEXT "P&oczenie:", 1412, 10, 177, 90, 8 + LTEXT "P&ołączenie:", 1412, 10, 177, 90, 8 COMBOBOX 1416, 102, 173, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 192, 247, 1 - DEFPUSHBUTTON "Dz&wo", 1590, 10, 199, 60, 14, WS_GROUP + DEFPUSHBUTTON "Dz&woń", 1590, 10, 199, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 1591, 72, 199, 60, 14 - PUSHBUTTON "W&aciwoci", 1107, 134, 199, 60, 14 + PUSHBUTTON "Wł&aściwości", 1107, 134, 199, 60, 14 PUSHBUTTON "&Pomoc", 1592, 196, 199, 60, 14 END 119 DIALOGEX 0, 0, 265, 200 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Poczenie z %1" +CAPTION "Połączenie z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 10, 62, 91, 8 + LTEXT "&Nazwa użytkownika:", 1413, 10, 62, 91, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1112, 10, 81, 92, 8 + LTEXT "&Hasło:", 1112, 10, 81, 92, 8 EDITTEXT 1103, 104, 77, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 97, 247, 1 - AUTOCHECKBOX "&Zapisz t nazw uytkownika i haso dla nastpujcych uytkownikw:", 1101, 12, 103, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Zapisz tą nazwę użytkownika i hasło dla następujących użytkowników:", 1101, 12, 103, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "Tylko &ja", 1622, 24, 117, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Kady kto uywa tego komputera", 1623, 24, 132, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Każdy kto używa tego komputera", 1623, 24, 132, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 147, 247, 1 - LTEXT "P&oczenie:", 1412, 13, 157, 88, 8 + LTEXT "P&ołączenie:", 1412, 13, 157, 88, 8 COMBOBOX 1416, 103, 154, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 173, 247, 1 - DEFPUSHBUTTON "&Dzwo", 1590, 10, 180, 60, 14, WS_GROUP + DEFPUSHBUTTON "&Dzwoń", 1590, 10, 180, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 1591, 72, 180, 60, 14 - PUSHBUTTON "W&aciwoci", 1107, 134, 180, 60, 14 + PUSHBUTTON "Wł&aściwości", 1107, 134, 180, 60, 14 PUSHBUTTON "&Help", 1592, 197, 180, 60, 14 END @@ -327,10 +328,10 @@ BEGIN COMBOBOX 1153, 76, 7, 148, 42, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP AUTOCHECKBOX "&Negocjacja typu linii", 1150, 23, 26, 199, 10, BS_TOP | BS_MULTILINE | WS_GROUP GROUPBOX " ", 1152, 8, 48, 214, 51, WS_GROUP - AUTOCHECKBOX "&Uyj starego, zastrzeonego protokou", 1149, 17, 48, 102, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Użyj starego, zastrzeżonego protokołu", 1149, 17, 48, 102, 10, BS_TOP | BS_MULTILINE LTEXT "&Channels to use:", 1154, 16, 65, 100, 8, NOT WS_GROUP EDITTEXT 1151, 119, 61, 94, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "&Wcz kompresj sprztow", 1148, 16, 82, 198, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Włącz kompresję sprzętową", 1148, 16, 82, 198, 10, BS_TOP | BS_MULTILINE PUSHBUTTON "OK", 1, 99, 109, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 163, 109, 60, 14 END @@ -377,26 +378,26 @@ BEGIN ICON 15102, 1238, 7, 7, 20, 20 LTEXT "Modem", -1, 25, 27, 24, 8, NOT WS_VISIBLE | NOT WS_GROUP EDITTEXT 1235, 40, 7, 214, 16, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER - LTEXT "&Prdkoc transmisji (bps):", 1243, 7, 36, 110, 8 + LTEXT "&Prędkośc transmisji (bps):", 1243, 7, 36, 110, 8 COMBOBOX 1239, 119, 34, 136, 186, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "Protok &Modemu", 1244, 7, 52, 111, 8 + LTEXT "Protokół &Modemu", 1244, 7, 52, 111, 8 COMBOBOX 1245, 119, 50, 136, 186, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX "Waciwoci sprztu", 1237, 6, 70, 248, 61, WS_GROUP - AUTOCHECKBOX "W&cz sprztow kontrol przepywu", 1232, 19, 82, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "Wc&z sprztow kontrol bdw", 1231, 19, 98, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "Wcz komp&resj sprztow", 1229, 19, 115, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "Po&ka okno terminala", 1234, 8, 136, 246, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "Wcz &gonik modemu", 1230, 8, 151, 247, 10, BS_TOP | BS_MULTILINE | WS_GROUP + GROUPBOX "Właściwości sprzętu", 1237, 6, 70, 248, 61, WS_GROUP + AUTOCHECKBOX "Włą&cz sprzętową kontrolę przepływu", 1232, 19, 82, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Włąc&z sprzętową kontrolę błędów", 1231, 19, 98, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Włącz komp&resję sprzętową", 1229, 19, 115, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Po&każ okno terminala", 1234, 8, 136, 246, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Włącz &głośnik modemu", 1230, 8, 151, 247, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 129, 171, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 194, 171, 60, 14 END 126 DIALOGEX 0, 0, 270, 117 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Wybr skadnikw sieci" +CAPTION "Wybór składników sieci" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Kliknij na rodzaj skadnika sieci, ktry chcesz zainstalowa:", -1, 8, 7, 258, 8 + LTEXT "Kliknij na rodzaj składnika sieci, który chcesz zainstalować:", -1, 8, 7, 258, 8 CONTROL "", 1251, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 8, 20, 188, 58 GROUPBOX "", -1, 8, 81, 188, 30 LTEXT "", 1250, 12, 90, 177, 17 @@ -406,23 +407,23 @@ END 127 DIALOGEX 16, 20, 260, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Poczenia z NetWare albo kompatybilne" +CAPTION "Połączenia z NetWare albo kompatybilne" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, 1278, 7, 7, 21, 20, WS_GROUP - LTEXT "Masz aktywne poczenie z sieci kompatybiln z NetWare. Te poczenia zostan zamknite, przy ustanawianiu poczenia PPP IPX.", 1279, 42, 7, 215, 37 - LTEXT "Przed poczeniem, aby unikn utraty danch, albo zamknij wszystkie pliki, ktre korzystaj z tych pocze albo odznacz IPX z listy Protokow Sieciowych tego poczenia.", 1280, 42, 46, 215, 38, NOT WS_GROUP - AUTOCHECKBOX "&Nie wywietlaj wicej tej wiadomoci", 1277, 42, 86, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + LTEXT "Masz aktywne połączenie z siecią kompatybilną z NetWare. Te połączenia zostaną zamknięte, przy ustanawianiu połączenia PPP IPX.", 1279, 42, 7, 215, 37 + LTEXT "Przed połączeniem, aby uniknąć utraty danch, albo zamknij wszystkie pliki, które korzystają z tych połączeń albo odznacz IPX z listy Protokołów Sieciowych tego połączenia.", 1280, 42, 46, 215, 38, NOT WS_GROUP + AUTOCHECKBOX "&Nie wyświetlaj więcej tej wiadomości", 1277, 42, 86, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 65, 112, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 134, 112, 60, 14 END 128 DIALOGEX 7, 22, 236, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Rczne wybieranie" +CAPTION "Ręczne wybieranie" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Podnie suchawk i wybierz numer (albo popro operatora o wybranie). Po zakoczeniu wybierania, nacinij OK. Poczekaj, a suchawka ucichnie i wtedy si rozcz.", 1281, 8, 8, 219, 32 + LTEXT "Podnieś słuchawkę i wybierz numer (albo poproś operatora o wybranie). Po zakończeniu wybierania, naciśnij OK. Poczekaj, aż słuchawka ucichnie i wtedy się rozłącz.", 1281, 8, 8, 219, 32 LTEXT "Numer:", 1282, 8, 46, 91, 8 LTEXT "", 1283, 103, 46, 126, 8, NOT WS_GROUP DEFPUSHBUTTON "OK", 1, 104, 70, 60, 14, WS_GROUP @@ -431,14 +432,14 @@ END 129 DIALOGEX 6, 20, 260, 85 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Efekt poczenia Protokou Sieciowego" +CAPTION "Efekt połączenia Protokołu Sieciowego" FONT 8, "MS Shell Dlg" BEGIN ICON 32516, 1328, 7, 7, 21, 20, WS_GROUP LTEXT "", 1329, 38, 7, 216, 24, NOT WS_GROUP - AUTOCHECKBOX "&Nie korzystaj nastpnym razem z niedziaajcych protokow", 1327, 40, 44, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Nie korzystaj następnym razem z niedziałających protokołów", 1327, 40, 44, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP PUSHBUTTON "&Akceptuj", 1, 129, 64, 60, 14 - PUSHBUTTON "&Rozcz si", 2, 193, 64, 60, 14 + PUSHBUTTON "&Rozłącz się", 2, 193, 64, 60, 14 END 133 DIALOGEX 6, 18, 231, 211 @@ -446,13 +447,13 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Ustawienia logowania X.25" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz swojego providera sieci X.25 i wprowad adres serwera zdalnego X.121:", 1408, 7, 4, 220, 27 - LTEXT "&Sie:", 1410, 9, 35, 213, 8, NOT WS_GROUP + LTEXT "Wybierz swojego providera sieci X.25 i wprowadź adres serwera zdalnego X.121:", 1408, 7, 4, 220, 27 + LTEXT "&Sieć:", 1410, 9, 35, 213, 8, NOT WS_GROUP COMBOBOX 1406, 9, 46, 215, 125, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP LTEXT "&Adres X.121:", 1407, 9, 66, 213, 8, NOT WS_GROUP EDITTEXT 1402, 8, 77, 215, 14, ES_AUTOHSCROLL GROUPBOX "Opcjonalne", 1405, 8, 95, 215, 79 - LTEXT "&Dane uytkownika:", 1411, 19, 109, 182, 8, NOT WS_GROUP + LTEXT "&Dane użytkownika:", 1411, 19, 109, 182, 8, NOT WS_GROUP EDITTEXT 1404, 19, 120, 193, 14, ES_AUTOHSCROLL LTEXT "&Udogodnienia:", 1409, 19, 138, 182, 8, NOT WS_GROUP EDITTEXT 1403, 19, 149, 193, 14, ES_AUTOHSCROLL @@ -465,11 +466,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION CAPTION "Autowybieranie" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Jeeli zostaniesz rozczony z sieci, Autowybieranie sprbuje podczy si ponownie, w chwili gdy bdziesz potrzebowa dostpu do danej sieci.", -1, 7, 4, 219, 32 - LTEXT "&Wcz Autowybieranie:", 1006, 8, 42, 213, 8 + LTEXT "Jeżeli zostaniesz rozłączony z sieci, Autowybieranie spróbuje podłączyć się ponownie, w chwili gdy będziesz potrzebować dostępu do danej sieci.", -1, 7, 4, 219, 32 + LTEXT "&Włącz Autowybieranie:", 1006, 8, 42, 213, 8 CONTROL "", 1004, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000C401, 7, 53, 216, 109 - AUTOCHECKBOX "&Zawsze pytaj mnie przed prb Autowybierania", 1496, 8, 170, 218, 9, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Wycz Autowybieranie, gdy jestem zalogowany", 1550, 8, 185, 217, 9, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Zawsze pytaj mnie przed próbą Autowybierania", 1496, 8, 170, 218, 9, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Wyłącz Autowybieranie, gdy jestem zalogowany", 1550, 8, 185, 217, 9, BS_TOP | BS_MULTILINE END 147 DIALOGEX 6, 18, 230, 215 @@ -477,12 +478,12 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION CAPTION "Wybieranie" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Te ustawienia odnosz si do 'Zaloguj przy pomocy sieci Dial-Up' po nacisniciu Ctrl-Alt-Del podczas logowania. Tylko Administratorzy maj dostp do tych ustawie.", 1007, 7, 4, 221, 40, NOT WS_GROUP - LTEXT "&Ilo prb poczenia:", 1005, 7, 55, 154, 8 + LTEXT "Te ustawienia odnoszą się do 'Zaloguj przy pomocy sieci Dial-Up' po nacisnięciu Ctrl-Alt-Del podczas logowania. Tylko Administratorzy mają dostęp do tych ustawień.", 1007, 7, 4, 221, 40, NOT WS_GROUP + LTEXT "&Ilość prób połączenia:", 1005, 7, 55, 154, 8 EDITTEXT 1001, 164, 52, 60, 14, ES_AUTOHSCROLL - LTEXT "&Sekund przerwy pomidzy prbami poczenia:", 1009, 7, 73, 156, 8, NOT WS_GROUP + LTEXT "&Sekund przerwy pomiędzy próbami połączenia:", 1009, 7, 73, 156, 8, NOT WS_GROUP EDITTEXT 1003, 164, 70, 60, 14, ES_AUTOHSCROLL - LTEXT "Sekund &bezczynnoci przed rozczeniem:", 1008, 7, 91, 154, 8, NOT WS_GROUP + LTEXT "Sekund &bezczynności przed rozłączeniem:", 1008, 7, 91, 154, 8, NOT WS_GROUP EDITTEXT 1002, 164, 88, 60, 14, ES_AUTOHSCROLL END @@ -491,25 +492,25 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION CAPTION "Oddzwanianie" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Niektre serwery oferuj moliwo oddzwonienia do ciebie, w celu redukcji twoich opat za poczenie. Okrel czy chcesz skorzysta z Oddzwaniania. (Oddzwanianie nie dziaa w przypadku pocze z Wirtualnymi Sieciami Prywatnymi (VPN).)", 1043, 8, 4, 219, 43 + LTEXT "Niektóre serwery oferują możliwość oddzwonienia do ciebie, w celu redukcji twoich opłat za połączenie. Określ czy chcesz skorzystać z Oddzwaniania. (Oddzwanianie nie działa w przypadku połączeń z Wirtualnymi Sieciami Prywatnymi (VPN).)", 1043, 8, 4, 219, 43 AUTORADIOBUTTON "&Bez Oddzwaniania", 1041, 7, 48, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Pytaj mnie podczas prby poczenia, gdy serwer oferuje odddzwanianie", 1040, 7, 61, 219, 10, BS_TOP | BS_MULTILINE - AUTORADIOBUTTON "&Oddzwanianie zawsze wczone, w przypadku pocze z numerami z listy:", 1042, 7, 74, 219, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Pytaj mnie podczas próby połączenia, gdy serwer oferuje odddzwanianie", 1040, 7, 61, 219, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Oddzwanianie zawsze włączone, w przypadku połączeń z numerami z listy:", 1042, 7, 74, 219, 10, BS_TOP | BS_MULTILINE CONTROL "", 1037, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00008401, 16, 88, 204, 94 PUSHBUTTON "&Edytuj", 1039, 96, 190, 60, 14 - PUSHBUTTON "&Usu..", 1038, 159, 190, 60, 14 + PUSHBUTTON "&Usuń..", 1038, 159, 190, 60, 14 END 149 DIALOGEX 6, 18, 317, 142 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Musisz ustawi dane uytkownika, ktrych bd uywa routery zdalne, podczas czenia si z tym interface. Konto uytkownika zostanie utworzone na routerze zdalnym, z informacj o twoim poczeniu.", 1094, 8, 5, 307, 35 - LTEXT "&Nazwa uytkownika:", 1078, 8, 47, 124, 8, NOT WS_GROUP + LTEXT "Musisz ustawić dane użytkownika, których będą używaź routery zdalne, podczas łączenia się z tym interface. Konto użytkownika zostanie utworzone na routerze zdalnym, z informacją o twoim połączeniu.", 1094, 8, 5, 307, 35 + LTEXT "&Nazwa użytkownika:", 1078, 8, 47, 124, 8, NOT WS_GROUP EDITTEXT 1074, 135, 45, 175, 12, ES_AUTOHSCROLL | WS_DISABLED - LTEXT "&Haso:", 1077, 8, 68, 124, 8, NOT WS_GROUP + LTEXT "&Hasło:", 1077, 8, 68, 124, 8, NOT WS_GROUP EDITTEXT 1073, 135, 66, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&Potwierdzenie hasa:", 1075, 8, 90, 124, 8, NOT WS_GROUP + LTEXT "&Potwierdzenie hasła:", 1075, 8, 90, 124, 8, NOT WS_GROUP EDITTEXT 1071, 135, 87, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL END @@ -517,14 +518,14 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Musisz ustawi dane uytkownika, ktrych bd uywa routery zdalne, podczas czenia si z tym interface. Konto uytkownika zostanie utworzone na routerze zdalnym, z informacj o twoim poczeniu.", 1094, 8, 5, 308, 33 - LTEXT "&Nazwa uytkownika:", 1096, 8, 43, 130, 8, NOT WS_GROUP + LTEXT "Musisz ustawić dane użytkownika, których będą używaź routery zdalne, podczas łączenia się z tym interface. Konto użytkownika zostanie utworzone na routerze zdalnym, z informacją o twoim połączeniu.", 1094, 8, 5, 308, 33 + LTEXT "&Nazwa użytkownika:", 1096, 8, 43, 130, 8, NOT WS_GROUP EDITTEXT 1091, 140, 40, 175, 12, ES_AUTOHSCROLL LTEXT "&Domena:", 1093, 8, 63, 130, 8, NOT WS_GROUP EDITTEXT 1089, 140, 60, 175, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT "&Haso:", 1095, 8, 81, 130, 8, NOT WS_GROUP + LTEXT "&Hasło:", 1095, 8, 81, 130, 8, NOT WS_GROUP EDITTEXT 1090, 140, 78, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&Potwierdzenie hasa:", 1092, 8, 99, 130, 8, NOT WS_GROUP + LTEXT "&Potwierdzenie hasła:", 1092, 8, 99, 130, 8, NOT WS_GROUP EDITTEXT 1088, 140, 96, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL END @@ -532,54 +533,54 @@ END STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad nazw dla tego poczenia:", -1, 8, 4, 190, 8 + LTEXT "Wprowadź nazwę dla tego połączenia:", -1, 8, 4, 190, 8 EDITTEXT 1114, 8, 17, 190, 12, ES_AUTOHSCROLL - LTEXT "Nacinij Zakocz by zapisa je w katalogu Poczenia Sieciowe.", -1, 8, 38, 193, 8 - LTEXT "Aby wyedytowa pniej to poczenie, zaznacz je, kliknij na menu Plik, a nastpnie na Waciwoci.", -1, 8, 58, 193, 16 + LTEXT "Naciśnij Zakończ by zapisać je w katalogu Połączenia Sieciowe.", -1, 8, 38, 193, 8 + LTEXT "Aby wyedytować później to połączenie, zaznacz je, kliknij na menu Plik, a następnie na Właściwości.", -1, 8, 58, 193, 16 END 155 DIALOGEX 0, 0, 231, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "P&ocz za pomoc:", 1124, 7, 5, 219, 8 + LTEXT "P&ołącz za pomocą:", 1124, 7, 5, 219, 8 CONTROL "", 1128, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00004C0D, 7, 17, 198, 44, WS_EX_CLIENTEDGE - PUSHBUTTON "&Gra", 1132, 210, 18, 16, 14, BS_ICON - PUSHBUTTON "&D", 1131, 210, 36, 16, 14, BS_ICON - AUTOCHECKBOX "&Wszystkie urzdzenia wybieraj te same numery", 1119, 9, 66, 133, 14, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Góra", 1132, 210, 18, 16, 14, BS_ICON + PUSHBUTTON "&Dół", 1131, 210, 36, 16, 14, BS_ICON + AUTOCHECKBOX "&Wszystkie urządzenia wybierają te same numery", 1119, 9, 66, 133, 14, BS_TOP | BS_MULTILINE PUSHBUTTON "&Konfiguruj", 1130, 144, 66, 60, 14 - GROUPBOX "Przykad", 1125, 8, 84, 215, 100, WS_GROUP + GROUPBOX "Przykład", 1125, 8, 84, 215, 100, WS_GROUP LTEXT "&Numer kierunkowy:", 1133, 17, 102, 52, 8 COMBOBOX 1122, 17, 112, 52, 110, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP LTEXT "Nu&mer telefoniczny:", 1135, 71, 102, 139, 8 EDITTEXT 1123, 73, 112, 79, 14, ES_AUTOHSCROLL PUSHBUTTON "&Inne", 1129, 154, 112, 60, 14 - LTEXT "Num&er midzynarodowy:", 1134, 17, 132, 197, 8 + LTEXT "Num&er międzynarodowy:", 1134, 17, 132, 197, 8 COMBOBOX 1126, 17, 143, 193, 130, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "&Uyj regu wybierania", 1121, 17, 163, 132, 14, BS_TOP | BS_MULTILINE - PUSHBUTTON "&Reguy wybierania", 1136, 151, 161, 60, 14 - AUTOCHECKBOX "P&oka ikon w zasobniku systemowym podczas trwania poczenia", 1120, 10, 192, 214, 19, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Użyj reguł wybierania", 1121, 17, 163, 132, 14, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Reguły wybierania", 1136, 151, 161, 60, 14 + AUTOCHECKBOX "P&okaż ikonę w zasobniku systemowym podczas trwania połączenia", 1120, 10, 192, 214, 19, BS_TOP | BS_MULTILINE END 156 DIALOGEX 0, 0, 231, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN PUSHBUTTON "K&onfiguruj", 1130, 164, 38, 60, 14 - GROUPBOX "Przykad", 1125, 8, 55, 217, 100, WS_GROUP + GROUPBOX "Przykład", 1125, 8, 55, 217, 100, WS_GROUP LTEXT "&Numer kierunkowy:", 1133, 17, 72, 48, 8 COMBOBOX 1122, 17, 83, 48, 119, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP LTEXT "Nu&mer telefoniczny:", 1135, 71, 72, 146, 8 EDITTEXT 1123, 71, 83, 81, 14, ES_AUTOHSCROLL PUSHBUTTON "&Inne", 1129, 155, 83, 63, 14 - LTEXT "Num&er midzynarodowy:", 1134, 17, 103, 193, 8 + LTEXT "Num&er międzynarodowy:", 1134, 17, 103, 193, 8 COMBOBOX 1126, 17, 114, 201, 130, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "&Uyj regu wybierania", 1121, 19, 134, 136, 12, BS_TOP | BS_MULTILINE - PUSHBUTTON "&Reguy wybierania", 1136, 157, 132, 60, 14 - AUTOCHECKBOX "P&oka ikon w zasobniku systemowym podczas trwania poczenia", 1120, 12, 164, 209, 18, BS_TOP | BS_MULTILINE - LTEXT "Pocz za pomoc:", 1124, 8, 5, 217, 8 + AUTOCHECKBOX "&Użyj reguł wybierania", 1121, 19, 134, 136, 12, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Reguły wybierania", 1136, 157, 132, 60, 14 + AUTOCHECKBOX "P&okaż ikonę w zasobniku systemowym podczas trwania połączenia", 1120, 12, 164, 209, 18, BS_TOP | BS_MULTILINE + LTEXT "Połącz za pomocą:", 1124, 8, 5, 217, 8 CONTROL "", 1127, "SYSLISTVIEW32", WS_DISABLED | WS_BORDER | 0x0000EC0D, 7, 18, 217, 15 END @@ -588,13 +589,13 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Widok" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "&Poka numer telefoniczny przed wybieraniem", 1142, 8, 10, 224, 10, WS_GROUP - AUTOCHECKBOX "Poka ustawienia &lokalizacji przed wybieraniem", 1139, 8, 27, 224, 10 - AUTOCHECKBOX "&Zezwl na edycj lokalizacji podczas logowania", 1140, 21, 43, 212, 10 - AUTOCHECKBOX "Poka p&ostp poczenia podczas wybierania", 1143, 8, 59, 224, 10 + AUTOCHECKBOX "&Pokaż numer telefoniczny przed wybieraniem", 1142, 8, 10, 224, 10, WS_GROUP + AUTOCHECKBOX "Pokaż ustawienia &lokalizacji przed wybieraniem", 1139, 8, 27, 224, 10 + AUTOCHECKBOX "&Zezwól na edycję lokalizacji podczas logowania", 1140, 21, 43, 212, 10 + AUTOCHECKBOX "Pokaż p&ostęp połączenia podczas wybierania", 1143, 8, 59, 224, 10 AUTOCHECKBOX "Z&amknij po wybraniu numeru", 1137, 8, 76, 224, 10 - AUTOCHECKBOX "Zez&wl na edycj ksiki telefonicznej podczas logowania", 1141, 8, 94, 224, 10 - AUTOCHECKBOX "&Uyj kreatora konfiguracji do tworzenia nowych wpisw do ksiki telefonicznej", 1144, 22, 111, 210, 10 + AUTOCHECKBOX "Zez&wól na edycję książki telefonicznej podczas logowania", 1141, 8, 94, 224, 10 + AUTOCHECKBOX "&Użyj kreatora konfiguracji do tworzenia nowych wpisów do książki telefonicznej", 1144, 22, 111, 210, 10 END 158 DIALOGEX 6, 18, 235, 160 @@ -602,12 +603,12 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION CAPTION "Widok" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "&Poka numer telefoniczny przed wybieraniem", 1142, 8, 10, 223, 10, WS_GROUP - AUTOCHECKBOX "Poka ustawienia &lokalizacji przed wybieraniem", 1139, 8, 27, 206, 10 - AUTOCHECKBOX "Uruchom &monitor pocze dial-up przed wybieraniem", 1138, 8, 44, 226, 10 - AUTOCHECKBOX "Poka p&ostp poczenia podczas wybierania", 1143, 8, 61, 224, 10 + AUTOCHECKBOX "&Pokaż numer telefoniczny przed wybieraniem", 1142, 8, 10, 223, 10, WS_GROUP + AUTOCHECKBOX "Pokaż ustawienia &lokalizacji przed wybieraniem", 1139, 8, 27, 206, 10 + AUTOCHECKBOX "Uruchom &monitor połączeń dial-up przed wybieraniem", 1138, 8, 44, 226, 10 + AUTOCHECKBOX "Pokaż p&ostęp połączenia podczas wybierania", 1143, 8, 61, 224, 10 AUTOCHECKBOX "Z&amknij po wybraniu numeru", 1137, 8, 79, 220, 10 - AUTOCHECKBOX "&Uyj kreatora konfiguracji do tworzenia nowych wpisw do ksiki telefonicznej", 1144, 8, 97, 220, 10 + AUTOCHECKBOX "&Użyj kreatora konfiguracji do tworzenia nowych wpisów do książki telefonicznej", 1144, 8, 97, 220, 10 AUTOCHECKBOX "Always prompt &before auto-dialing", 1136, 8, 114, 220, 10 END @@ -615,40 +616,40 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz nazw dla tego interface pocze typu dial-up. Zwykle wybiera si nazw sieci lub routera z ktrymi bdzie si czy.", 1158, 7, 5, 309, 29 + LTEXT "Wybierz nazwę dla tego interface połączeń typu dial-up. Zwykle wybiera się nazwę sieci lub routera z którymi będzie się łączyć.", 1158, 7, 5, 309, 29 LTEXT "&Nazwa Interface:", 1159, 17, 41, 285, 8, NOT WS_GROUP EDITTEXT 1157, 17, 53, 284, 12, ES_AUTOHSCROLL - AUTOCHECKBOX "Znam si na interface pocze typu dial-up i chc samodzielnie ustawi waciwoci", 1156, 24, 100, 258, 31, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "Znam się na interface połączeń typu dial-up i chcę samodzielnie ustawić właściwości", 1156, 24, 100, 258, 31, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED END 162 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Bezpieczestwo" +CAPTION "Bezpieczeństwo" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Ustawienia bezpieczestwa", 1580, 8, 3, 215, 139 + GROUPBOX "Ustawienia bezpieczeństwa", 1580, 8, 3, 215, 139 AUTORADIOBUTTON "&Typowe (ustawienia zalecane)", 1540, 14, 16, 201, 9, BS_NOTIFY | WS_GROUP - AUTORADIOBUTTON "&Zaawansowane (ustawienia wasne)", 1541, 14, 102, 198, 8, BS_NOTIFY - LTEXT "&Uwiarygodnij moj tosamo za pomoc:", 1537, 26, 29, 187, 8, NOT WS_GROUP + AUTORADIOBUTTON "&Zaawansowane (ustawienia własne)", 1541, 14, 102, 198, 8, BS_NOTIFY + LTEXT "&Uwiarygodnij moją tożsamość za pomocą:", 1537, 26, 29, 187, 8, NOT WS_GROUP COMBOBOX 1178, 26, 40, 184, 78, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "&Automagicznie uyj mojej nazwy uytkownika i hasa z ReactOS (domeny te o ile istniej)", 1174, 26, 58, 184, 20, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Wymagaj szyfrowania danych (rozcz si w razie braku)", 1169, 26, 82, 183, 10, BS_TOP | BS_MULTILINE - LTEXT "Zmiana tych ustawie wymaga wiedzy o protokoach bezpieczestwa.", 1539, 15, 114, 134, 20 + AUTOCHECKBOX "&Automagicznie użyj mojej nazwy użytkownika i hasła z ReactOS (domeny też o ile istniej)", 1174, 26, 58, 184, 20, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Wymagaj szyfrowania danych (rozłącz się w razie braku)", 1169, 26, 82, 183, 10, BS_TOP | BS_MULTILINE + LTEXT "Zmiana tych ustawień wymaga wiedzy o protokołach bezpieczeństwa.", 1539, 15, 114, 134, 20 PUSHBUTTON "&Ustawienia", 1180, 151, 115, 60, 14 GROUPBOX "Skrypty i logowanie interaktywne", 1177, 8, 146, 215, 62, WS_GROUP - AUTOCHECKBOX "&Poka okno terminala", 1173, 14, 159, 198, 11, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Pokaż okno terminala", 1173, 14, 159, 198, 11, BS_TOP | BS_MULTILINE AUTOCHECKBOX "Uruchom &skrypt:", 1172, 14, 172, 57, 10, BS_TOP | BS_MULTILINE COMBOBOX 1179, 72, 171, 140, 104, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP PUSHBUTTON "&Edytuj....", 1182, 87, 187, 60, 14 - PUSHBUTTON "&Przegldaj", 1181, 151, 187, 60, 14 + PUSHBUTTON "&Przeglądaj", 1181, 151, 187, 60, 14 END 163 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Masz wicej ni jedno urzdzenie dial-up na tym komputerze.", -1, 6, 3, 307, 13 - LTEXT "&Wybierz urzdzenie ktrym chcesz si poczy:", -1, 6, 15, 307, 11 + LTEXT "Masz więcej niż jedno urządzenie dial-up na tym komputerze.", -1, 6, 3, 307, 13 + LTEXT "&Wybierz urządzenie którym chcesz się połączyć:", -1, 6, 15, 307, 11 CONTROL "", 1228, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C415, 7, 28, 304, 77 END @@ -657,14 +658,14 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Sieci" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Rodzaj serwera dial-up do ktrego si cz:", 1583, 7, 4, 219, 8 + LTEXT "&Rodzaj serwera dial-up do którego się łączę:", 1583, 7, 4, 219, 8 COMBOBOX 1418, 7, 17, 215, 46, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP PUSHBUTTON "&Ustawienia", 1419, 160, 35, 60, 14 - LTEXT "To &poczenie korzysta z nastpujcych skadnikw:", 1684, 8, 64, 219, 10 + LTEXT "To &połączenie korzysta z następujących składników:", 1684, 8, 64, 219, 10 CONTROL "", 1251, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C40D, 7, 75, 216, 53 PUSHBUTTON "&Instaluj..", 1252, 7, 133, 67, 14 PUSHBUTTON "&Odinstaluj", 1254, 80, 133, 67, 14 - PUSHBUTTON "&Waciwoci", 1253, 153, 133, 67, 14 + PUSHBUTTON "&Właściwości", 1253, 153, 133, 67, 14 GROUPBOX "Opis", 1585, 9, 158, 213, 43 LTEXT "", 1250, 18, 167, 195, 25 END @@ -673,7 +674,7 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad adres IP serwera DNS lub WINS w sieci zdalnej, albo pozostaw 0.0.0.0 jeli oczekujesz, e router ustawi go za ciebie, bd jeli nie go znasz.", 1275, 7, 2, 311, 25 + LTEXT "Wprowadź adres IP serwera DNS lub WINS w sieci zdalnej, albo pozostaw 0.0.0.0 jeśli oczekujesz, że router ustawi go za ciebie, bądź jeśli nie go znasz.", 1275, 7, 2, 311, 25 LTEXT "Serwer &DNS:", 1274, 7, 29, 160, 8, NOT WS_GROUP CONTROL "", 1272, "RASIPADDRESS", WS_TABSTOP, 21, 41, 85, 12 LTEXT "Serwer &WINS:", 1276, 7, 65, 166, 8, NOT WS_GROUP @@ -686,81 +687,81 @@ CAPTION "Opcje" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Opcje wybierania", 1289, 7, 2, 213, 64 - AUTOCHECKBOX "&Wywietlaj przebieg poczenia", 1284, 16, 14, 201, 10 - AUTOCHECKBOX "&Zapytaj o nazw uytkownika, haso, certyfikat itd.", 1554, 16, 27, 201, 10 - AUTOCHECKBOX "Docz domen logowania z &ReactOS", 1555, 16, 39, 201, 10 + AUTOCHECKBOX "&Wyświetlaj przebieg połączenia", 1284, 16, 14, 201, 10 + AUTOCHECKBOX "&Zapytaj o nazwę użytkownika, hasło, certyfikat itd.", 1554, 16, 27, 201, 10 + AUTOCHECKBOX "Dołącz domenę logowania z &ReactOS", 1555, 16, 39, 201, 10 AUTOCHECKBOX "Zapytaj o &numer telefoniczny", 1285, 16, 52, 200, 10, BS_TOP | BS_MULTILINE GROUPBOX "Wybieranie ponowne", 1290, 6, 72, 213, 79 - LTEXT "&Ilo prb wybierania:", 1300, 16, 87, 123, 8 + LTEXT "&Ilość prób wybierania:", 1300, 16, 87, 123, 8 EDITTEXT 1287, 141, 84, 69, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "&Sekund pomidzy prbami wybierania:", 1301, 16, 103, 123, 8 + LTEXT "&Sekund pomiędzy próbami wybierania:", 1301, 16, 103, 123, 8 COMBOBOX 1292, 141, 101, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "Sekund &bezczynnoci przed zawieszeniem poczenia:", 1299, 16, 120, 123, 8 + LTEXT "Sekund &bezczynności przed zawieszeniem połączenia:", 1299, 16, 120, 123, 8 COMBOBOX 1291, 141, 116, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "Wybieraj &ponownie przy zerwaniu poczenia", 1286, 16, 136, 199, 10, BS_TOP | BS_MULTILINE - GROUPBOX "Wiele urzdze", 1288, 7, 156, 213, 32 + AUTOCHECKBOX "Wybieraj &ponownie przy zerwaniu połączenia", 1286, 16, 136, 199, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Wiele urządzeń", 1288, 7, 156, 213, 32 COMBOBOX 1551, 16, 169, 128, 45, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP PUSHBUTTON "&Konfiguruj", 1293, 150, 168, 60, 14 PUSHBUTTON "&X.25", 1295, 7, 194, 50, 14 - PUSHBUTTON "P&oczenie ""tunel"" wirtualne", 1294, 62, 194, 120, 14, NOT WS_VISIBLE | WS_DISABLED + PUSHBUTTON "P&ołączenie wirtualne ""tunel""", 1294, 62, 194, 120, 14, NOT WS_VISIBLE | WS_DISABLED END 168 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poaczenia" +CAPTION "Kreator konfiguracji połaczenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wpisz numer telefoniczny poniej. ", -1, 7, 4, 306, 14 + LTEXT "Wpisz numer telefoniczny poniżej. ", -1, 7, 4, 306, 14 LTEXT "&Numer telefoniczny:", 1308, 7, 19, 130, 8 EDITTEXT 1304, 7, 30, 304, 14, ES_AUTOHSCROLL - LTEXT "Prawdopodobnie bdzie trzeba uy cyfry ""1"", numeru kierunkowego, albo obydwu. Jeli nie jeste pewien, wyprbuj dany numer na swoim telefonie. Jeli usyszysz sygna modemu, numer jest poprawny.", -1, 20, 50, 291, 53 + LTEXT "Prawdopodobnie będzie trzeba użyć cyfry ""1"", numeru kierunkowego, albo obydwu. Jeśli nie jesteś pewien, wypróbuj żądany numer na swoim telefonie. Jeśli usłyszysz sygnał modemu, numer jest poprawny.", -1, 20, 50, 291, 53 END 169 DIALOGEX 6, 18, 235, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Ksika telefoniczna" +CAPTION "Książka telefoniczna" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Uyj poniszej ksizki telefonicznej:", 1326, 8, 8, 222, 8 - AUTORADIOBUTTON "&Systemowa ksika telefoniczna", 1325, 14, 22, 216, 10, WS_GROUP - AUTORADIOBUTTON "&Osobista ksizka telefoniczna", 1324, 14, 34, 216, 10 - AUTORADIOBUTTON "&Wybrana ksika telefoniczna:", 1323, 14, 46, 217, 10 + LTEXT "Użyj poniższej ksiązki telefonicznej:", 1326, 8, 8, 222, 8 + AUTORADIOBUTTON "&Systemowa książka telefoniczna", 1325, 14, 22, 216, 10, WS_GROUP + AUTORADIOBUTTON "&Osobista ksiązka telefoniczna", 1324, 14, 34, 216, 10 + AUTORADIOBUTTON "&Wybrana książka telefoniczna:", 1323, 14, 46, 217, 10 COMBOBOX 1321, 26, 61, 201, 77, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&Przegldaj", 1322, 167, 81, 60, 14 + PUSHBUTTON "&Przeglądaj", 1322, 167, 81, 60, 14 END 170 DIALOGEX 6, 18, 235, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Ksika telefoniczna" +CAPTION "Książka telefoniczna" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Uyj poniszej ksizki telefonicznej:", 1326, 8, 8, 223, 8 - AUTORADIOBUTTON "&Systemowa ksika telefoniczna", 1325, 14, 22, 217, 10, WS_GROUP - AUTORADIOBUTTON "&Wybrana ksika telefoniczna:", 1323, 14, 36, 216, 10 + LTEXT "Użyj poniższej ksiązki telefonicznej:", 1326, 8, 8, 223, 8 + AUTORADIOBUTTON "&Systemowa książka telefoniczna", 1325, 14, 22, 217, 10, WS_GROUP + AUTORADIOBUTTON "&Wybrana książka telefoniczna:", 1323, 14, 36, 216, 10 COMBOBOX 1321, 26, 51, 203, 77, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&Przegldaj", 1322, 169, 69, 60, 14 + PUSHBUTTON "&Przeglądaj", 1322, 169, 69, 60, 14 END 171 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad swj adres IP w sieci zdalnej, albo zostaw 0.0.0.0 jeli oczekujesz, e router zdalny ustawi to automagicznie. Zwykle routery operatora ustawiaj ten adres automagicznie.", 1331, 5, 4, 308, 35 - LTEXT "Mj adres &IP:", 1332, 4, 51, 100, 8, NOT WS_GROUP + LTEXT "Wprowadź swój adres IP w sieci zdalnej, albo zostaw 0.0.0.0 jeśli oczekujesz, że router zdalny ustawi to automagicznie. Zwykle routery operatora ustawiają ten adres automagicznie.", 1331, 5, 4, 308, 35 + LTEXT "Mój adres &IP:", 1332, 4, 51, 100, 8, NOT WS_GROUP CONTROL "", 1330, "RASIPADDRESS", WS_TABSTOP, 21, 62, 104, 12 - LTEXT "Uwaga: Jeli masz zainstalowany take adapter sieciowy, musisz wybra inny adres IP ni adres adaptera.", 1333, 5, 94, 306, 36, NOT WS_GROUP + LTEXT "Uwaga: Jeśli masz zainstalowany także adapter sieciowy, musisz wybrać inny adres IP niż adres adaptera.", 1333, 5, 94, 306, 36, NOT WS_GROUP END 172 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Niektre serwery i routery dial-up wymagaj logowania interaktywnego po poczeniu. Moesz uy skryptu by odpowiada za ciebie automagicznie.", 1339, 5, 3, 309, 27 - AUTOCHECKBOX "Poka okno &terminala", 1462, 15, 31, 162, 10 + LTEXT "Niektóre serwery i routery dial-up wymagają logowania interaktywnego po połączeniu. Możesz użyć skryptu by odpowiadał za ciebie automagicznie.", 1339, 5, 3, 309, 27 + AUTOCHECKBOX "Pokaż okno &terminala", 1462, 15, 31, 162, 10 AUTOCHECKBOX "Uruchom &skrypt:", 1463, 15, 45, 58, 10 COMBOBOX 1334, 30, 60, 275, 88, CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP PUSHBUTTON "&Edytuj....", 1335, 180, 77, 60, 14 - PUSHBUTTON "&Przegldaj", 1465, 244, 77, 60, 14 + PUSHBUTTON "&Przeglądaj", 1465, 244, 77, 60, 14 END 173 DIALOGEX 6, 18, 230, 215 @@ -769,14 +770,14 @@ CAPTION "Wybieranie" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Ustawienia wybierania", 1344, 9, 4, 213, 53, WS_GROUP - LTEXT "&Ilo prb wybierania:", 1349, 16, 22, 140, 8, NOT WS_GROUP + LTEXT "&Ilość prób wybierania:", 1349, 16, 22, 140, 8, NOT WS_GROUP EDITTEXT 1340, 158, 19, 56, 14, ES_AUTOHSCROLL - LTEXT "&Sekund pomidzy prbami wybierania:", 1351, 16, 38, 140, 8, NOT WS_GROUP + LTEXT "&Sekund pomiędzy próbami wybierania:", 1351, 16, 38, 140, 8, NOT WS_GROUP EDITTEXT 1342, 158, 36, 56, 14, ES_AUTOHSCROLL - GROUPBOX "Rodzaj poczenia", 1343, 9, 63, 213, 56, WS_GROUP - LTEXT "Sekund &bezczynnoci przed zawieszeniem poczenia:", 1350, 28, 88, 124, 8, NOT WS_GROUP - AUTORADIOBUTTON "&Poczenie Demand Dial", 1347, 16, 78, 135, 10, WS_GROUP - AUTORADIOBUTTON "Poczenie tr&wae", 1348, 16, 103, 199, 10, NOT WS_TABSTOP, WS_EX_TRANSPARENT + GROUPBOX "Rodzaj połączenia", 1343, 9, 63, 213, 56, WS_GROUP + LTEXT "Sekund &bezczynności przed zawieszeniem połączenia:", 1350, 28, 88, 124, 8, NOT WS_GROUP + AUTORADIOBUTTON "&Połączenie Demand Dial", 1347, 16, 78, 135, 10, WS_GROUP + AUTORADIOBUTTON "Połączenie tr&wałe", 1348, 16, 103, 199, 10, NOT WS_TABSTOP, WS_EX_TRANSPARENT EDITTEXT 1341, 159, 85, 56, 14, ES_AUTOHSCROLL PUSHBUTTON "&Oddzwanianie...", 1345, 150, 125, 70, 14, WS_GROUP PUSHBUTTON "Wie&le linii...", 1346, 74, 125, 70, 14 @@ -794,25 +795,25 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Zakaczanie kreatora konfiguracji interface dial-up.", 1352, 122, 5, 192, 32 - LTEXT "Aby utworzy ten interface i uruchomi go, nacinij Finish.", 1354, 122, 41, 192, 26, NOT WS_GROUP - LTEXT "Aby zmieni ten interface, w Menederze Routingu i Dostpu Zdalnego, wybierz go w Interface'y Routingu i nacinij Waciwoci .", 1355, 122, 68, 190, 39, NOT WS_GROUP + LTEXT "Zakańczanie kreatora konfiguracji interface dial-up.", 1352, 122, 5, 192, 32 + LTEXT "Aby utworzyć ten interface i uruchomić go, naciśnij Finish.", 1354, 122, 41, 192, 26, NOT WS_GROUP + LTEXT "Aby zmienić ten interface, w Menedżerze Routingu i Dostępu Zdalnego, wybierz go w Interface'y Routingu i naciśnij Właściwości .", 1355, 122, 68, 190, 39, NOT WS_GROUP END 179 DIALOGEX 6, 18, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz &modem lub adapter, jaki ma ten interface uywa.", 1356, 7, 4, 306, 11 + LTEXT "Wybierz &modem lub adapter, jaki ma ten interface używać.", 1356, 7, 4, 306, 11 CONTROL "", 1355, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C415, 6, 15, 305, 80 - LTEXT "Lista pokazuje urzdzenia ustawione do routingu.", 1357, 15, 98, 288, 37, NOT WS_GROUP + LTEXT "Lista pokazuje urządzenia ustawione do routingu.", 1357, 15, 98, 288, 37, NOT WS_GROUP END 180 DIALOGEX 6, 18, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad numer telefoniczny serwera dial-up albo routera z ktrym si czysz. Inne numery telefocznicze, jeli istniej, s wybierane automagicznie, kiedy podstawowy numer jest zajty.", 1360, 7, 4, 305, 42 + LTEXT "Wprowadź numer telefoniczny serwera dial-up albo routera z którym się łączysz. Inne numery telefocznicze, jeśli istnieją, są wybierane automagicznie, kiedy podstawowy numer jest zajęty.", 1360, 7, 4, 305, 42 LTEXT "&Numer telefoniczny lub adres:", 1361, 7, 50, 275, 8, NOT WS_GROUP EDITTEXT 1358, 7, 62, 304, 14, ES_AUTOHSCROLL PUSHBUTTON "Inne...", 1359, 250, 80, 60, 14 @@ -820,36 +821,36 @@ END 181 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION "Bezpieczestwo" +CAPTION "Bezpieczeństwo" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Ustawienia uwierzytelniania i szyfrowania", 1367, 6, 8, 216, 103, WS_GROUP - AUTORADIOBUTTON "&Akceptuj kad metod uwierzytelniania (take otwartym tekstem)", 1370, 16, 20, 195, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Akceptuj każdą metodę uwierzytelniania (także otwartym tekstem)", 1370, 16, 20, 195, 10, BS_TOP | BS_MULTILINE AUTORADIOBUTTON "A&kceptuj tylko uwierzytelnianie szyfrowane", 1373, 16, 36, 195, 10, BS_TOP | BS_MULTILINE AUTORADIOBUTTON "Ak&ceptuj tylko uwierzytelnianie szyfrowane Microsoftu", 1374, 16, 52, 195, 10, BS_TOP | BS_MULTILINE AUTOCHECKBOX "&Wymagaj szyfrowania danych", 1363, 27, 65, 184, 10, BS_TOP | BS_MULTILINE | WS_GROUP AUTOCHECKBOX "Wymagaj &mocnego szyfrowania danych", 1364, 41, 80, 172, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Uywaj uwierzytelniania dwustronnego", 1362, 17, 95, 194, 10, BS_TOP | BS_MULTILINE - PUSHBUTTON "&Nie zapisuj hasa", 1369, 59, 117, 80, 14, WS_GROUP + AUTOCHECKBOX "&Używaj uwierzytelniania dwustronnego", 1362, 17, 95, 194, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Nie zapisuj hasła", 1369, 59, 117, 80, 14, WS_GROUP PUSHBUTTON "&Zaawansowane", 1368, 142, 117, 80, 14, NOT WS_VISIBLE | WS_DISABLED - AUTOCHECKBOX "Wyk&ryj udostpnianie plikw i drukarek przed wybieraniem", 1365, 7, 198, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "Wyk&ryj udostępnianie plików i drukarek przed wybieraniem", 1365, 7, 198, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED END 182 DIALOGEX 6, 18, 248, 148 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Bezpieczestwo" +CAPTION "Bezpieczeństwo" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Ustawienia uwierzytelniania i szyfrowania", 1367, 7, 8, 200, 98, WS_GROUP - AUTORADIOBUTTON "&Akceptuj kad metod uwierzytelniania (take otwartym tekstem)", 1370, 14, 24, 183, 10 + AUTORADIOBUTTON "&Akceptuj każdą metodę uwierzytelniania (także otwartym tekstem)", 1370, 14, 24, 183, 10 AUTORADIOBUTTON "A&kceptuj tylko uwierzytelnianie szyfrowane", 1373, 14, 39, 183, 10 AUTORADIOBUTTON "Ak&ceptuj tylko uwierzytelnianie szyfrowane Microsoftu", 1374, 14, 53, 184, 10 AUTOCHECKBOX "&Wymagaj szyfrowania danych", 1363, 33, 67, 165, 10, WS_GROUP AUTOCHECKBOX "Wymagaj &mocnego szyfrowania danych", 1364, 48, 79, 152, 10 - AUTOCHECKBOX "&Uyj obecnej nazwy uytkownika i hasa ", 1366, 31, 91, 165, 10 - PUSHBUTTON "Nie zapisuj hasa", 1369, 6, 114, 100, 14, WS_GROUP + AUTOCHECKBOX "&Użyj obecnej nazwy użytkownika i hasła ", 1366, 31, 91, 165, 10 + PUSHBUTTON "Nie zapisuj hasła", 1369, 6, 114, 100, 14, WS_GROUP PUSHBUTTON "&Zaawansowane", 1368, 109, 114, 60, 14, NOT WS_VISIBLE | WS_DISABLED - AUTOCHECKBOX "Wyk&ryj udostpnianie plikw i drukarek przed wybieraniem", 1365, 14, 134, 193, 10, NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "Wyk&ryj udostępnianie plików i drukarek przed wybieraniem", 1365, 14, 134, 193, 10, NOT WS_VISIBLE | WS_DISABLED END 183 DIALOGEX 6, 18, 317, 144 @@ -859,9 +860,9 @@ BEGIN LTEXT "Zaznacz odpowiednie opcje:", 1388, 7, 4, 296, 9 AUTOCHECKBOX "Routuj pakiety &IP na tym interface.", 1386, 20, 19, 285, 11, BS_LEFT | BS_TOP | BS_MULTILINE AUTOCHECKBOX "Routuj pakiety IP&X na tym interface.", 1387, 20, 35, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Dodaj konto uytkownika by umoliwi dostp zdalny.", 1382, 20, 52, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "Wysyaj haso &otwartym tekstem jeli nie ma innej metody.", 1385, 20, 70, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Uyj skryptw do poczenia si z routerem zdalnym.", 1384, 20, 87, 289, 22, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Dodaj konto użytkownika by umożliwić dostęp zdalny.", 1382, 20, 52, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Wysyłaj hasło &otwartym tekstem jeśli nie ma innej metody.", 1385, 20, 70, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Użyj skryptów do połączenia się z routerem zdalnym.", 1384, 20, 87, 289, 22, BS_LEFT | BS_TOP | BS_MULTILINE END 184 DIALOGEX 0, 0, 317, 143 @@ -872,26 +873,26 @@ END 186 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Poczenie, stworzone tylko dla ciebie, jest zapisane w twoim osobistym katalogu i jest dostpne wycznie dla twojego konta.", -1, 7, 4, 306, 23 - LTEXT "Utwrz to poczenie dla:", -1, 14, 27, 288, 12 - AUTORADIOBUTTON "&Kadego uytkownika", 1400, 26, 40, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Połączenie, stworzone tylko dla ciebie, jest zapisane w twoim osobistym katalogu i jest dostępne wyłącznie dla twojego konta.", -1, 7, 4, 306, 23 + LTEXT "Utwórz to połączenie dla:", -1, 14, 27, 288, 12 + AUTORADIOBUTTON "&Każdego użytkownika", 1400, 26, 40, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP AUTORADIOBUTTON "&Tylko dla mnie", 1401, 26, 55, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 498 DIALOGEX 12, 16, 215, 126 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS nie mg poczy si z sieci za pomoc podanej nazwy uytkownika i hasa. Prosz ponownie wprowadzi nazw uytkownika i haso.", 1396, 7, 6, 206, 36 - LTEXT "&Nazwa uytkownika:", 1399, 8, 51, 49, 8 + LTEXT "ReactOS nie mógł połączyć się z siecią za pomocą podanej nazwy użytkownika i hasła. Proszę ponownie wprowadziź nazwę użytkownika i hasło.", 1396, 7, 6, 206, 36 + LTEXT "&Nazwa użytkownika:", 1399, 8, 51, 49, 8 EDITTEXT 1394, 66, 46, 143, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1397, 8, 70, 49, 8, NOT WS_GROUP + LTEXT "&Hasło:", 1397, 8, 70, 49, 8, NOT WS_GROUP EDITTEXT 1393, 66, 64, 143, 14, ES_PASSWORD | ES_AUTOHSCROLL - AUTOCHECKBOX "&Zapisz haso", 1391, 66, 84, 143, 10 + AUTOCHECKBOX "&Zapisz hasło", 1391, 66, 84, 143, 10 CONTROL "", 1398, "STATIC", SS_ETCHEDHORZ | WS_GROUP, 7, 98, 200, 1 DEFPUSHBUTTON "OK", 1, 81, 104, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 145, 104, 60, 14 @@ -899,21 +900,21 @@ END 500 DIALOGEX 12, 16, 215, 173 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS nie mg poczy si z sieci za pomoc podanej nazwy uytkownika i hasa. Prosz ponownie wprowadzi nazw uytkownika i haso.", 1396, 7, 6, 209, 26 - LTEXT "&Nazwa uytkownika:", 1399, 7, 72, 44, 8 + LTEXT "ReactOS nie mógł połączyć się z siecią za pomocą podanej nazwy użytkownika i hasła. Proszę ponownie wprowadziź nazwę użytkownika i hasło.", 1396, 7, 6, 209, 26 + LTEXT "&Nazwa użytkownika:", 1399, 7, 72, 44, 8 EDITTEXT 1394, 97, 69, 115, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1397, 7, 90, 45, 8, NOT WS_GROUP + LTEXT "&Hasło:", 1397, 7, 90, 45, 8, NOT WS_GROUP EDITTEXT 1393, 97, 87, 115, 14, ES_PASSWORD | ES_AUTOHSCROLL LTEXT "&Domena:", 1395, 7, 108, 53, 8, NOT WS_GROUP EDITTEXT 1392, 97, 105, 115, 14, ES_UPPERCASE | ES_AUTOHSCROLL - AUTOCHECKBOX "&&Zapisz nazw uytkownika i haso", 1391, 85, 125, 123, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&&Zapisz nazwę użytkownika i hasło", 1391, 85, 125, 123, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 87, 146, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 151, 146, 60, 14 CONTROL "", 1398, "STATIC", SS_ETCHEDHORZ | WS_GROUP, 7, 140, 205, 1 - LTEXT "Moesz wprowadzi nazw domeny albo pozostawi to pole puste.\n(Nazwa domeny nie jest konieczna w przypadku czenia z Internetem)", -1, 8, 38, 209, 26 + LTEXT "Możesz wprowadzić nazwę domeny albo pozostawić to pole puste.\n(Nazwa domeny nie jest konieczna w przypadku łączenia z Internetem)", -1, 8, 38, 209, 26 END 502 DIALOGEX 20, 60, 215, 73 @@ -921,41 +922,41 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Ustawienia PPP" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "&Wcz rozszerzenia LCP", 1423, 9, 7, 200, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "W&cz kompresj programow", 1424, 9, 22, 201, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "Ustalaj poczenie &multi-link dla pocze pojedynczych", 1557, 9, 37, 202, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Włącz rozszerzenia LCP", 1423, 9, 7, 200, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Włą&cz kompresję programową", 1424, 9, 22, 201, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Ustalaj połączenie &multi-link dla połączeń pojedynczych", 1557, 9, 37, 202, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 82, 53, 60, 14 PUSHBUTTON "Anuluj", 2, 148, 53, 60, 14 END 509 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz rol dla tego komputera:", -1, 10, 5, 275, 9 + LTEXT "Wybierz rolę dla tego komputera:", -1, 10, 5, 275, 9 AUTORADIOBUTTON "&Host", 1483, 31, 20, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Go", 1484, 31, 44, 265, 10, BS_TOP | BS_MULTILINE - LTEXT "Ten komputer zawiera informacje po ktre inne komputery si cz.", -1, 45, 31, 253, 13, NOT WS_GROUP | WS_TABSTOP - LTEXT "Ten komputer jest uywany do pobierania informacji z komputera hosta.", -1, 43, 56, 253, 23, NOT WS_GROUP + AUTORADIOBUTTON "&Gość", 1484, 31, 44, 265, 10, BS_TOP | BS_MULTILINE + LTEXT "Ten komputer zawiera informacje po które inne komputery się łączą.", -1, 45, 31, 253, 13, NOT WS_GROUP | WS_TABSTOP + LTEXT "Ten komputer jest używany do pobierania informacji z komputera hosta.", -1, 43, 56, 253, 23, NOT WS_GROUP END 511 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Wybierz urzdzenie:", -1, 8, 5, 261, 8 + LTEXT "&Wybierz urządzenie:", -1, 8, 5, 261, 8 COMBOBOX 1485, 9, 18, 302, 62, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END 528 DIALOGEX 0, 0, 227, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Poczenia" +CAPTION "Połączenia" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Przywileje logowania", 1582, 8, 10, 213, 63 - LTEXT "Nie-Administratorzy mog uzyska pozwolenie na tworzenie i modyfikowanie pocze przed logowaniem .", 1581, 16, 21, 194, 30 - AUTOCHECKBOX "&Zezwl na tworzenie i modyfikacj pocze przed logowaniem", 1497, 16, 56, 195, 10, BS_TOP | BS_MULTILINE + LTEXT "Nie-Administratorzy mogą uzyskać pozwolenie na tworzenie i modyfikowanie połączeń przed logowaniem .", 1581, 16, 21, 194, 30 + AUTOCHECKBOX "&Zezwól na tworzenie i modyfikację połączeń przed logowaniem", 1497, 16, 56, 195, 10, BS_TOP | BS_MULTILINE END 532 DIALOGEX 0, 0, 263, 263 @@ -963,9 +964,9 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Oddzwanianie z routera" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Niektre routery oferuj opcj oddzwaniania, co moe zmniejszy twj rachunek telefoniczny a take zwikszy bezpieczestwo. Zadecyduj czy chcesz korzysta z tej opcji.", 1043, 7, 5, 253, 24 + LTEXT "Niektóre routery oferują opcję oddzwaniania, co może zmniejszyć twój rachunek telefoniczny a także zwiększyć bezpieczeństwo. Zadecyduj czy chcesz korzystać z tej opcji.", 1043, 7, 5, 253, 24 AUTORADIOBUTTON "&Bez oddzwaniania", 1501, 9, 36, 252, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Zawsze oddzwaniaj na numery z listy poniej:", 1502, 9, 48, 252, 10, BS_TOP | BS_MULTILINE, WS_EX_TRANSPARENT + AUTORADIOBUTTON "&Zawsze oddzwaniaj na numery z listy poniżej:", 1502, 9, 48, 252, 10, BS_TOP | BS_MULTILINE, WS_EX_TRANSPARENT CONTROL "", 1503, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00008401, 15, 63, 240, 143 PUSHBUTTON "&Edytuj", 1504, 131, 213, 60, 14 PUSHBUTTON "&Skasuj", 1505, 194, 213, 60, 14 @@ -979,17 +980,17 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "Opcje" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Rodzaj poczenia", 1289, 7, 7, 215, 55 - AUTORADIOBUTTON "&czenie automatyczne", 1506, 16, 20, 199, 9, BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - LTEXT "&Czas bezczynnoci przed rozczeniem:", 1299, 27, 33, 99, 8, NOT WS_GROUP + GROUPBOX "Rodzaj połączenia", 1289, 7, 7, 215, 55 + AUTORADIOBUTTON "&Łączenie automatyczne", 1506, 16, 20, 199, 9, BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + LTEXT "&Czas bezczynności przed rozłączeniem:", 1299, 27, 33, 99, 8, NOT WS_GROUP COMBOBOX 1291, 144, 30, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTORADIOBUTTON "&Poczenie trwae", 1507, 16, 47, 197, 9, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - GROUPBOX "Ustawienia pocze", 1290, 7, 66, 215, 48 - LTEXT "P&rb czenia:", 1300, 14, 79, 123, 8 + AUTORADIOBUTTON "&Połączenie trwałe", 1507, 16, 47, 197, 9, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + GROUPBOX "Ustawienia połączeń", 1290, 7, 66, 215, 48 + LTEXT "P&rób łączenia:", 1300, 14, 79, 123, 8 EDITTEXT 1287, 143, 76, 70, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "rednie przer&wy pomidzy poczeniami:", 1301, 14, 96, 123, 8 + LTEXT "Średnie przer&wy pomiędzy połączeniami:", 1301, 14, 96, 123, 8 COMBOBOX 1292, 143, 94, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX "Kilka modemw", 1288, 7, 116, 215, 35 + GROUPBOX "Kilka modemów", 1288, 7, 116, 215, 35 COMBOBOX 1551, 16, 130, 128, 41, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP PUSHBUTTON "&Konfiguruj...", 1293, 150, 129, 65, 14 PUSHBUTTON "&Oddzwanianie", 1302, 8, 195, 60, 14 @@ -998,76 +999,76 @@ END 539 DIALOGEX 0, 0, 265, 110 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 14, 64, 84, 8 + LTEXT "&Nazwa użytkownika:", 1413, 14, 64, 84, 8 EDITTEXT 1104, 102, 62, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 82, 247, 1 - DEFPUSHBUTTON "&Dzwo", 1590, 8, 89, 60, 14 + DEFPUSHBUTTON "&Dzwoń", 1590, 8, 89, 60, 14 PUSHBUTTON "Anuluj", 1591, 71, 89, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 133, 89, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 133, 89, 60, 14 PUSHBUTTON "&Pomoc", 1592, 195, 89, 60, 14 END 540 DIALOGEX 0, 0, 265, 133 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 10, 64, 90, 8 + LTEXT "&Nazwa użytkownika:", 1413, 10, 64, 90, 8 EDITTEXT 1104, 105, 60, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 80, 252, 1 - LTEXT "&czenie:", 1412, 10, 91, 92, 10 + LTEXT "Łą&czenie:", 1412, 10, 91, 92, 10 COMBOBOX 1416, 105, 88, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 107, 251, 1 - DEFPUSHBUTTON "&Dzwo", 1590, 8, 113, 60, 14 + DEFPUSHBUTTON "&Dzwoń", 1590, 8, 113, 60, 14 PUSHBUTTON "Anuluj", 1591, 71, 113, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 134, 113, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 134, 113, 60, 14 PUSHBUTTON "&Pomoc", 1592, 197, 113, 60, 14 END 541 DIALOGEX 0, 0, 265, 157 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "N&azwa uytkownika:", 1413, 12, 67, 87, 8 + LTEXT "N&azwa użytkownika:", 1413, 12, 67, 87, 8 EDITTEXT 1104, 103, 63, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 84, 248, 1 - LTEXT "&czenie:", 1412, 11, 96, 48, 8 + LTEXT "Łą&czenie:", 1412, 11, 96, 48, 8 COMBOBOX 1416, 103, 92, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "cze&nie za pomoc:", 1415, 10, 114, 46, 8 + LTEXT "Łącze&nie za pomocą:", 1415, 10, 114, 46, 8 COMBOBOX 1414, 102, 110, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&Ustawienia pocze", 1108, 193, 110, 64, 14 + PUSHBUTTON "&Ustawienia połączeń", 1108, 193, 110, 64, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 130, 250, 1 - DEFPUSHBUTTON "c&z", 1590, 6, 136, 60, 14 + DEFPUSHBUTTON "Łąc&z", 1590, 6, 136, 60, 14 PUSHBUTTON "Anuluj", 1591, 69, 136, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 132, 136, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 132, 136, 60, 14 PUSHBUTTON "&Pomoc", 1592, 196, 136, 60, 14 END 544 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wspdzielenie cza Internetowego umoliwia innym komputerom w twojej sieci lokalnej na korzystanie z zasobw zdalnych za pomoc tego poczenia.", -1, 10, 5, 300, 22 - AUTOCHECKBOX "&Wcz Wspdzielenie cza Internetowego dla tego poczenia", 1512, 21, 31, 272, 10 - LTEXT "Aby automatycznie nawiza poczenie, gdy komputer w twojej sieci lokalnej sprbuje uzyska dostp do zasobw zdalnych, zaznacz opcj Poczenia Automatyczne.", 1514, 10, 56, 294, 22 - AUTOCHECKBOX "W&cz Poczenia Automatyczne", 1513, 21, 86, 260, 10 + LTEXT "Współdzielenie Łącza Internetowego umożliwia innym komputerom w twojej sieci lokalnej na korzystanie z zasobów zdalnych za pomocą tego połączenia.", -1, 10, 5, 300, 22 + AUTOCHECKBOX "&Włącz Współdzielenie Łącza Internetowego dla tego połączenia", 1512, 21, 31, 272, 10 + LTEXT "Aby automatycznie nawiązać połączenie, gdy komputer w twojej sieci lokalnej spróbuje uzyskać dostęp do zasobów zdalnych, zaznacz opcję Połączenia Automatyczne.", 1514, 10, 56, 294, 22 + AUTOCHECKBOX "Włą&cz Połączenia Automatyczne", 1513, 21, 86, 260, 10 END 545 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Dostp Wspdzielony umoliwia komputerom w twojej sieci lokalnej na korzystanie z zasobw zdalnych za pomoc tego poczenia dial-up. Moesz wczy Dostp Wspdzielony dla jednego poczenia i jednej sieci w tym samym czasie.", -1, 10, 5, 300, 25 - LTEXT "&Wybierz sie lokaln, ktra uzyska dostp do zasobw zdalnych za pomoc tego poczenia:", -1, 21, 35, 285, 8 + LTEXT "Dostęp Współdzielony umożliwia komputerom w twojej sieci lokalnej na korzystanie z zasobów zdalnych za pomocą tego połączenia dial-up. Możesz włączyć Dostęp Współdzielony dla jednego połączenia i jednej sieci w tym samym czasie.", -1, 10, 5, 300, 25 + LTEXT "&Wybierz sieć lokalną, która uzyska dostęp do zasobów zdalnych za pomocą tego połączenia:", -1, 21, 35, 285, 8 COMBOBOX 1522, 21, 48, 231, 56, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END @@ -1075,128 +1076,128 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Moesz skonfigurowa to poczenie tak, by korzystao ze smart card przy logowaniu do sieci zdalnej. Wybierz czy chcesz korzysta ze smart card z tym poczeniem.", -1, 10, 5, 303, 22 - AUTORADIOBUTTON "&Uyj smart card ", 1524, 26, 29, 264, 12, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "&Nie uywaj smart card ", 1525, 26, 44, 261, 16, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Możesz skonfigurować to połączenie tak, by korzystało ze smart card przy logowaniu do sieci zdalnej. Wybierz czy chcesz korzystać ze smart card z tym połączeniem.", -1, 10, 5, 303, 22 + AUTORADIOBUTTON "&Użyj smart card ", 1524, 26, 29, 264, 12, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Nie używaj smart card ", 1525, 26, 44, 261, 16, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 547 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Kreator Pocze Automatycznych" +CAPTION "Kreator Połączeń Automatycznych" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Witamy w Kreatorze Pocze Automatycznych.", 1530, 122, 8, 192, 32 - LTEXT "Za pomoc tego Kreatora moesz stworzy interface Pocze Automatycznych, w celu poczenia tego routera z innymi.", 1531, 122, 43, 192, 37 - LTEXT "Nacinij Dalej aby kontynuowa.", 1532, 122, 85, 191, 29 + LTEXT "Witamy w Kreatorze Połączeń Automatycznych.", 1530, 122, 8, 192, 32 + LTEXT "Za pomocą tego Kreatora możesz stworzyć interface Połączeń Automatycznych, w celu połączenia tego routera z innymi.", 1531, 122, 43, 192, 37 + LTEXT "Naciśnij Dalej aby kontynuować.", 1532, 122, 85, 191, 29 END 548 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "Pocz za pomoc &modemu, adaptera ISDN, lub innego urzdzenia.", 1531, 21, 17, 290, 15, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "Pocz za pomoc &Wirtualnych Sieci Prywatnych (VPN)", 1532, 21, 38, 291, 15, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "Pocz za pomoc PPP over Ethernet (PPPoE)", 1688, 21, 58, 290, 12, NOT WS_TABSTOP + AUTORADIOBUTTON "Połącz za pomocą &modemu, adaptera ISDN, lub innego urządzenia.", 1531, 21, 17, 290, 15, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "Połącz za pomocą &Wirtualnych Sieci Prywatnych (VPN)", 1532, 21, 38, 291, 15, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Połącz za pomocą PPP over Ethernet (PPPoE)", 1688, 21, 58, 290, 12, NOT WS_TABSTOP END 550 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad nazw albo adres IP routera, z ktrym si chcesz poczy.", 1535, 10, 8, 289, 18 - LTEXT "&Nazwa hosta albo adres IP (na przykad: reactos.org albo 145.52.0.1):", 1537, 21, 35, 285, 8 + LTEXT "Wprowadź nazwę albo adres IP routera, z którym się chcesz połączyć.", 1535, 10, 8, 289, 18 + LTEXT "&Nazwa hosta albo adres IP (na przykład: reactos.org albo 145.52.0.1):", 1537, 21, 35, 285, 8 EDITTEXT 1536, 21, 47, 285, 14, ES_AUTOHSCROLL END 551 DIALOGEX 0, 0, 265, 127 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 12, 62, 89, 8 + LTEXT "&Nazwa użytkownika:", 1413, 12, 62, 89, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL LTEXT "&Domena:", 1110, 12, 82, 90, 8 EDITTEXT 1102, 104, 79, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 99, 248, 1 - DEFPUSHBUTTON "D&zwo", 1590, 9, 106, 61, 14 + DEFPUSHBUTTON "D&zwoń", 1590, 9, 106, 61, 14 PUSHBUTTON "Anuluj", 1591, 72, 106, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 135, 106, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 135, 106, 60, 14 PUSHBUTTON "&Pomoc", 1592, 198, 106, 60, 14 END 552 DIALOGEX 0, 0, 265, 159 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 10, 67, 91, 10 + LTEXT "&Nazwa użytkownika:", 1413, 10, 67, 91, 10 EDITTEXT 1104, 104, 64, 154, 14, ES_AUTOHSCROLL LTEXT "&Domena:", 1110, 11, 86, 91, 8 EDITTEXT 1102, 104, 83, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 103, 248, 1 - LTEXT "P&oczenie", 1412, 10, 115, 91, 8 + LTEXT "P&ołączenie", 1412, 10, 115, 91, 8 COMBOBOX 1416, 104, 111, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 132, 248, 1 - DEFPUSHBUTTON "D&zwo", 1590, 8, 139, 60, 14 + DEFPUSHBUTTON "D&zwoń", 1590, 8, 139, 60, 14 PUSHBUTTON "Anuluj", 1591, 71, 139, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 134, 139, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 134, 139, 60, 14 PUSHBUTTON "&Pomoc", 1592, 198, 139, 60, 14 END 553 DIALOGEX 0, 0, 265, 183 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "N&azwa uytkownika:", 1413, 10, 68, 92, 10 + LTEXT "N&azwa użytkownika:", 1413, 10, 68, 92, 10 EDITTEXT 1104, 104, 65, 154, 14, ES_AUTOHSCROLL LTEXT "&Domena:", 1110, 10, 90, 91, 8 EDITTEXT 1102, 104, 86, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 106, 248, 1 - LTEXT "P&oczenie:", 1412, 10, 118, 92, 8 + LTEXT "P&ołączenie:", 1412, 10, 118, 92, 8 COMBOBOX 1416, 104, 114, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "cze&nie za pomoc:", 1415, 10, 137, 91, 8 + LTEXT "Łącze&nie za pomocą:", 1415, 10, 137, 91, 8 COMBOBOX 1414, 104, 134, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&Ustawienia pocze", 1108, 194, 134, 65, 14 + PUSHBUTTON "&Ustawienia połączeń", 1108, 194, 134, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 154, 248, 1 - DEFPUSHBUTTON "&cz", 1590, 8, 162, 60, 14 + DEFPUSHBUTTON "Łą&cz", 1590, 8, 162, 60, 14 PUSHBUTTON "Anuluj", 1591, 71, 162, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 134, 162, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 134, 162, 60, 14 PUSHBUTTON "&Pomoc", 1592, 198, 162, 60, 14 END 554 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Pocz za pomoc:", 1124, 7, 4, 193, 8 + LTEXT "&Połącz za pomocą:", 1124, 7, 4, 193, 8 CONTROL "", 1128, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00004C0D, 7, 17, 195, 44, WS_EX_CLIENTEDGE - PUSHBUTTON "&Gra", 1132, 208, 18, 16, 14, BS_ICON - PUSHBUTTON "&D", 1131, 208, 36, 16, 14, BS_ICON - AUTOCHECKBOX "&Wszystkie urzdzenia wybieraj te same numery", 1119, 7, 65, 131, 21, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Góra", 1132, 208, 18, 16, 14, BS_ICON + PUSHBUTTON "&Dół", 1131, 208, 36, 16, 14, BS_ICON + AUTOCHECKBOX "&Wszystkie urządzenia wybierają te same numery", 1119, 7, 65, 131, 21, BS_TOP | BS_MULTILINE PUSHBUTTON "&Konfiguruj", 1130, 140, 66, 60, 14 - GROUPBOX "Przykad", 1125, 7, 87, 213, 56, WS_GROUP + GROUPBOX "Przykład", 1125, 7, 87, 213, 56, WS_GROUP LTEXT "&Numer telefonu:", 1135, 19, 102, 191, 8 EDITTEXT 1123, 17, 112, 138, 14, ES_AUTOHSCROLL - PUSHBUTTON "P&ozostae", 1129, 161, 112, 50, 14 - AUTOCHECKBOX "Po&ka ikon w zasobniku systemowym podczas trwania poczenia", 1120, 11, 194, 212, 20, BS_TOP | BS_MULTILINE + PUSHBUTTON "P&ozostałe", 1129, 161, 112, 50, 14 + AUTOCHECKBOX "Po&każ ikonę w zasobniku systemowym podczas trwania połączenia", 1120, 11, 194, 212, 20, BS_TOP | BS_MULTILINE END 555 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN PUSHBUTTON "&Konfiguruj", 1130, 160, 38, 60, 14 LTEXT "&Numer telefonu:", 1135, 8, 72, 194, 8 EDITTEXT 1123, 8, 83, 148, 14, ES_AUTOHSCROLL - PUSHBUTTON "P&ozostae", 1129, 160, 83, 60, 14 - AUTOCHECKBOX "Po&ka ikon w zasobniku systemowym podczas trwania poczenia", 1120, 11, 194, 213, 10, BS_TOP | BS_MULTILINE - LTEXT "&Pocz za pomoc:", 1124, 8, 5, 214, 8 + PUSHBUTTON "P&ozostałe", 1129, 160, 83, 60, 14 + AUTOCHECKBOX "Po&każ ikonę w zasobniku systemowym podczas trwania połączenia", 1120, 11, 194, 213, 10, BS_TOP | BS_MULTILINE + LTEXT "&Połącz za pomocą:", 1124, 8, 5, 214, 8 CONTROL "", 1127, "SYSLISTVIEW32", WS_DISABLED | WS_BORDER | 0x0000EC0D, 7, 18, 214, 15 END @@ -1205,13 +1206,13 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Ustawienia Aplikacji" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Opis aplikacji dziaajcej w twojej sieci lokalnej:", -1, 7, 5, 203, 8 + LTEXT "&Opis aplikacji działającej w twojej sieci lokalnej:", -1, 7, 5, 203, 8 EDITTEXT 1565, 7, 17, 206, 14, ES_AUTOHSCROLL LTEXT "&Numer portu serwera:", -1, 7, 35, 202, 8 EDITTEXT 1566, 7, 47, 113, 14, ES_AUTOHSCROLL | ES_NUMBER AUTORADIOBUTTON "&TCP", 1548, 128, 49, 30, 10, NOT WS_TABSTOP AUTORADIOBUTTON "&UDP", 1567, 166, 49, 31, 10, NOT WS_TABSTOP - LTEXT "&Nasuchuj na odpowiedzi serwera na porcie lub przedziale portw:\n(na przykad: 1024-1209, 1300-1310, 1450)", -1, 7, 70, 207, 22 + LTEXT "&Nasłuchuj na odpowiedzi serwera na porcie lub przedziale portów:\n(na przykład: 1024-1209, 1300-1310, 1450)", -1, 7, 70, 207, 22 LTEXT "T&CP:", -1, 7, 100, 28, 8 EDITTEXT 1569, 50, 97, 162, 14, ES_AUTOHSCROLL LTEXT "UD&P:", -1, 7, 121, 30, 8 @@ -1222,14 +1223,14 @@ END 557 DIALOGEX 0, 0, 217, 164 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Ustawienia Usug" +CAPTION "Ustawienia Usług" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Opis usugi:", -1, 7, 5, 203, 8 + LTEXT "&Opis usługi:", -1, 7, 5, 203, 8 EDITTEXT 1552, 7, 18, 205, 14, ES_AUTOHSCROLL - LTEXT "&Nazwa hosta albo adres IP (na przykad 192.168.0.12) komputera, na ktrym usuga jest uruchomiona:", -1, 7, 37, 208, 16 + LTEXT "&Nazwa hosta albo adres IP (na przykład 192.168.0.12) komputera, na którym usługa jest uruchomiona:", -1, 7, 37, 208, 16 EDITTEXT 1556, 7, 57, 203, 14, ES_AUTOHSCROLL - LTEXT "&Numer portu przydzielony tej usudze:", -1, 7, 85, 203, 8 + LTEXT "&Numer portu przydzielony tej usłudze:", -1, 7, 85, 203, 8 EDITTEXT 1553, 7, 97, 113, 14, ES_AUTOHSCROLL | ES_NUMBER AUTORADIOBUTTON "&TCP", 1554, 128, 99, 30, 10, NOT WS_TABSTOP AUTORADIOBUTTON "&UDP", 1555, 166, 99, 31, 10, NOT WS_TABSTOP @@ -1242,7 +1243,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Programy" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Poczenie internetowe na tym komputerze zostao ustawione tak, by umoliwi nastpujcym programom dostp do sieci:", -1, 7, 7, 218, 28 + LTEXT "Połączenie internetowe na tym komputerze zostało ustawione tak, by umożliwić następującym programom dostęp do sieci:", -1, 7, 7, 218, 28 CONTROL "List1", 1558, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000441D, 7, 37, 215, 155, WS_EX_CLIENTEDGE PUSHBUTTON "&Dodaj", 1538, 7, 197, 67, 14 PUSHBUTTON "&Edytuj", 1559, 80, 197, 67, 14 @@ -1251,11 +1252,11 @@ END 559 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Usugi" +CAPTION "Usługi" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Wybierz usugi, dziaajce w twojej sieci, ktre chcesz udostpni uytkownikom przez Internet.", -1, 7, 5, 216, 22 - LTEXT "Usugi:", -1, 7, 27, 143, 8 + LTEXT "&Wybierz usługi, działające w twojej sieci, które chcesz udostępnić użytkownikom przez Internet.", -1, 7, 5, 216, 22 + LTEXT "Usługi:", -1, 7, 27, 143, 8 CONTROL "List1", 1560, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000441D, 7, 37, 215, 155, WS_EX_CLIENTEDGE PUSHBUTTON "&Dodaj", 1561, 7, 197, 67, 14 PUSHBUTTON "&Edytuj", 1563, 80, 197, 67, 14 @@ -1264,49 +1265,49 @@ END 560 DIALOGEX 6, 18, 240, 88 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Poczenie Wstpne" +CAPTION "Połączenie Wstępne" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "&Tak", 6, 68, 68, 50, 14 PUSHBUTTON "&Nie", 7, 125, 68, 50, 14 ICON 32516, 1575, 7, 7, 20, 20 LTEXT "", 1576, 40, 7, 190, 33 - AUTOCHECKBOX "&Nie wywietlaj wicej tego komunikatu", 1579, 40, 48, 192, 11, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Nie wyświetlaj więcej tego komunikatu", 1579, 40, 48, 192, 11, BS_TOP | BS_MULTILINE END 567 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad nazw usugi w pole poniej. Jeli zostawisz je puste, ReactOS automagicznie wykryje i skonfiguruje t usug podczas czenia.", -1, 10, 7, 301, 25 - LTEXT "&Nazwa Usugi (opcjonalnie):", -1, 22, 32, 229, 8 + LTEXT "Wprowadź nazwę usługi w pole poniżej. Jeśli zostawisz je puste, ReactOS automagicznie wykryje i skonfiguruje tą usługę podczas łączenia.", -1, 10, 7, 301, 25 + LTEXT "&Nazwa Usługi (opcjonalnie):", -1, 22, 32, 229, 8 EDITTEXT 1593, 22, 44, 275, 14, ES_AUTOHSCROLL END 568 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "General" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Service name:", 1686, 7, 5, 217, 10 + LTEXT "Nazwa &Usługi:", 1686, 7, 5, 217, 10 EDITTEXT 1594, 7, 17, 217, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "Sho&w icon in notification area when connected", 1120, 9, 196, 215, 8 + AUTOCHECKBOX "Pok&aż ikonę w obszarze powiadamiania podczas połączenia", 1120, 9, 196, 215, 8 END 569 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "Bezpieczestwo" +CAPTION "Bezpieczeństwo" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Ustawienia bezpieczestwa", 1580, 8, 4, 213, 151 + GROUPBOX "Ustawienia bezpieczeństwa", 1580, 8, 4, 213, 151 AUTORADIOBUTTON "&Typowe (ustawienia zalecane)", 1540, 14, 16, 197, 9, BS_NOTIFY | WS_GROUP - AUTORADIOBUTTON "&Zaawansowane (ustawienia wasne)", 1541, 14, 100, 197, 8, BS_NOTIFY - LTEXT "&Uwiarygodnij moj tosamo za pomoc:", 1537, 26, 29, 183, 8, NOT WS_GROUP + AUTORADIOBUTTON "&Zaawansowane (ustawienia własne)", 1541, 14, 100, 197, 8, BS_NOTIFY + LTEXT "&Uwiarygodnij moją tożsamość za pomocą:", 1537, 26, 29, 183, 8, NOT WS_GROUP COMBOBOX 1178, 26, 40, 184, 78, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "&Automagicznie uyj mojej nazwy uytkownika i hasa z ReactOS (domeny te o ile istniej)", 1174, 26, 59, 182, 20, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Wymagaj szyfrowania danych (rozcz si w razie braku)", 1169, 26, 83, 182, 10, BS_TOP | BS_MULTILINE - LTEXT "Zmiana tych ustawie wymaga wiedzy o protokoach bezpieczestwa.", 1539, 26, 111, 136, 20 + AUTOCHECKBOX "&Automagicznie użyj mojej nazwy użytkownika i hasła z ReactOS (domeny też o ile istniej)", 1174, 26, 59, 182, 20, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Wymagaj szyfrowania danych (rozłącz się w razie braku)", 1169, 26, 83, 182, 10, BS_TOP | BS_MULTILINE + LTEXT "Zmiana tych ustawień wymaga wiedzy o protokołach bezpieczeństwa.", 1539, 26, 111, 136, 20 PUSHBUTTON "&Ustawienia", 1180, 151, 134, 60, 14 PUSHBUTTON "Ustawienia &IPSec", 1598, 126, 163, 85, 14 END @@ -1318,31 +1319,31 @@ FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 151, 104, 50, 14 PUSHBUTTON "Anuluj", 2, 207, 104, 50, 14 - AUTOCHECKBOX "&Uyj klucza pre-shared do uwierzytelniania", 1604, 21, 15, 217, 10 + AUTOCHECKBOX "&Użyj klucza pre-shared do uwierzytelniania", 1604, 21, 15, 217, 10 LTEXT "&Klucz:", 1602, 20, 31, 44, 12 EDITTEXT 1605, 66, 30, 172, 12, ES_AUTOHSCROLL - AUTOCHECKBOX "Zezwl na certyfikaty z mojego magazynu uytkownika oprcz certifikatw systemowych", 1606, 20, 50, 242, 13, WS_DISABLED - AUTOCHECKBOX "Uyj wybranego certyfikatu", 1607, 20, 67, 239, 10, WS_DISABLED + AUTOCHECKBOX "Zezwól na certyfikaty z mojego magazynu użytkownika oprócz certifikatów systemowych", 1606, 20, 50, 242, 13, WS_DISABLED + AUTOCHECKBOX "Użyj wybranego certyfikatu", 1607, 20, 67, 239, 10, WS_DISABLED PUSHBUTTON "Wybierz", 1608, 31, 84, 50, 14, WS_DISABLED COMBOBOX 1610, 91, 84, 135, 30, CBS_DROPDOWN | CBS_SORT | WS_DISABLED | WS_VSCROLL | NOT WS_TABSTOP END 571 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Logowanie komunikatw bezpieczestwa" +CAPTION "Logowanie komunikatów bezpieczeństwa" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Opcje logowania:", -1, 6, 8, 216, 47 - AUTOCHECKBOX "Loguj &nieudane prby pocze przychodzcych", 1642, 14, 22, 201, 10 - AUTOCHECKBOX "Loguj &udane poczenia wychodzce", 1641, 14, 37, 200, 10 - GROUPBOX "Opcje pliku logw:", -1, 7, 64, 215, 91 + AUTOCHECKBOX "Loguj &nieudane próby połączeń przychodzących", 1642, 14, 22, 201, 10 + AUTOCHECKBOX "Loguj &udane połączenia wychodzące", 1641, 14, 37, 200, 10 + GROUPBOX "Opcje pliku logów:", -1, 7, 64, 215, 91 LTEXT "&Nazwa:", -1, 14, 78, 199, 8 EDITTEXT 1674, 14, 90, 199, 14, ES_READONLY - PUSHBUTTON "&Przegldaj", 1639, 153, 108, 60, 14 - LTEXT "&Limit wielkoci:", -1, 14, 133, 67, 8 + PUSHBUTTON "&Przeglądaj", 1639, 153, 108, 60, 14 + LTEXT "&Limit wielkości:", -1, 14, 133, 67, 8 EDITTEXT 1640, 86, 130, 50, 14, ES_AUTOHSCROLL | ES_NUMBER LTEXT "KB", -1, 140, 133, 20, 8 - PUSHBUTTON "&Ustawienia Domylne", 1643, 135, 197, 85, 14 + PUSHBUTTON "&Ustawienia Domyślne", 1643, 135, 197, 85, 14 END 572 DIALOGEX 0, 0, 230, 215 @@ -1350,7 +1351,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "ICMP" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Internet Control Message Protocol (ICMP) pozwala komputerom w sieci na przesyanie informacji o bdach i o stanie wasnym. Wybierz zapytania ICMP na ktre ten komputer bdzie mg odpowiedzie:", -1, 7, 5, 215, 37 + LTEXT "&Internet Control Message Protocol (ICMP) pozwala komputerom w sieci na przesyłanie informacji o błędach i o stanie własnym. Wybierz zapytania ICMP na które ten komputer będzie mógł odpowiedzieć:", -1, 7, 5, 215, 37 CONTROL "IList1", 1644, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 7, 45, 215, 100, WS_EX_CLIENTEDGE GROUPBOX "Opis:", -1, 7, 153, 215, 55 LTEXT "", 1645, 14, 171, 199, 32 @@ -1366,107 +1367,107 @@ END 577 DIALOGEX 0, 0, 312, 144 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wpisz nazw ISP w pole poniej.", 1681, 10, 3, 296, 11 + LTEXT "Wpisz nazwę ISP w pole poniżej.", 1681, 10, 3, 296, 11 LTEXT "N&azwa:", 1690, 18, 20, 127, 10 EDITTEXT 1680, 17, 32, 222, 14, ES_AUTOHSCROLL - LTEXT "Nazwa wpisana tutaj bdzie domyln nazw utworzonego poczenia internetowego.", 1683, 17, 52, 282, 42 + LTEXT "Nazwa wpisana tutaj będzie domyślną nazwą utworzonego połączenia internetowego.", 1683, 17, 52, 282, 42 END 580 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "&Wybr automatyczny", 1534, 21, 20, 288, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Wybór automatyczny", 1534, 21, 20, 288, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP AUTORADIOBUTTON "&Point to Point Tunneling Protocol (PPTP)", 1532, 21, 39, 290, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP AUTORADIOBUTTON "&Layer 2 Tunneling Protocol (L2TP)", 1533, 21, 56, 286, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 1420 DIALOGEX 0, 0, 265, 108 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&czenie:", 1412, 14, 63, 86, 8 + LTEXT "Łą&czenie:", 1412, 14, 63, 86, 8 COMBOBOX 1416, 104, 60, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 80, 248, 1 - DEFPUSHBUTTON "P&ocz", 1590, 9, 87, 60, 14 + DEFPUSHBUTTON "P&ołącz", 1590, 9, 87, 60, 14 PUSHBUTTON "Anuluj", 1591, 72, 87, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 135, 87, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 135, 87, 60, 14 PUSHBUTTON "&Pomoc", 1592, 198, 87, 60, 14 END 1421 DIALOGEX 0, 0, 265, 223 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 10, 61, 90, 8 + LTEXT "&Nazwa użytkownika:", 1413, 10, 61, 90, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1112, 11, 81, 90, 8 + LTEXT "&Hasło:", 1112, 11, 81, 90, 8 EDITTEXT 1103, 104, 77, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 98, 248, 1 - AUTOCHECKBOX "&Zapisz t nazw uytkownika i haso dla nastpujcych uytkownikw:", 1101, 14, 105, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Zapisz tą nazwę użytkownika i hasło dla następujących użytkowników:", 1101, 14, 105, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "Tylko &ja", 1622, 26, 119, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Kady kto uywa tego komputera", 1623, 26, 133, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Każdy kto używa tego komputera", 1623, 26, 133, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 149, 248, 1 - LTEXT "P&oczenie:", 1412, 14, 161, 87, 8 + LTEXT "P&ołączenie:", 1412, 14, 161, 87, 8 COMBOBOX 1416, 104, 157, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP LTEXT "Wy&bieranie z:", 1415, 14, 178, 88, 8 COMBOBOX 1414, 104, 175, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&Reguy wybierania", 1108, 193, 175, 65, 14 + PUSHBUTTON "&Reguły wybierania", 1108, 193, 175, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 196, 248, 1 - DEFPUSHBUTTON "&Dzwo", 1590, 9, 202, 60, 14, WS_GROUP + DEFPUSHBUTTON "&Dzwoń", 1590, 9, 202, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 1591, 72, 202, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 135, 202, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 135, 202, 60, 14 PUSHBUTTON "&Pomoc", 1592, 198, 202, 60, 14 END 1422 DIALOGEX 0, 0, 265, 242 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Pocz z %1" +CAPTION "Połącz z %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&Nazwa uytkownika:", 1413, 10, 67, 91, 8 + LTEXT "&Nazwa użytkownika:", 1413, 10, 67, 91, 8 EDITTEXT 1104, 104, 63, 154, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", 1112, 10, 85, 92, 8 + LTEXT "&Hasło:", 1112, 10, 85, 92, 8 EDITTEXT 1103, 104, 82, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL LTEXT "&Domena:", 1110, 10, 104, 92, 8 EDITTEXT 1102, 104, 101, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 121, 248, 1 - AUTOCHECKBOX "&Zapisz t nazw uytkownika i haso dla nastpujcych uytkownikw:", 1101, 12, 127, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Zapisz tą nazwę użytkownika i hasło dla następujących użytkowników:", 1101, 12, 127, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "Tylko &ja", 1622, 24, 141, 227, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Kady kto uywa tego komputera", 1623, 24, 155, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Każdy kto używa tego komputera", 1623, 24, 155, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 170, 248, 1 - LTEXT "P&oczenie:", 1412, 14, 182, 87, 8 + LTEXT "P&ołączenie:", 1412, 14, 182, 87, 8 COMBOBOX 1416, 104, 178, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP LTEXT "Wy&bieranie z:", 1415, 14, 198, 87, 8 COMBOBOX 1414, 104, 195, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&Reguy wybierania", 1108, 193, 195, 65, 14 + PUSHBUTTON "&Reguły wybierania", 1108, 193, 195, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 215, 248, 1 - DEFPUSHBUTTON "&Dzwo", 1590, 8, 221, 60, 14, WS_GROUP + DEFPUSHBUTTON "&Dzwoń", 1590, 8, 221, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 1591, 71, 221, 60, 14 - PUSHBUTTON "&Waciwoci", 1107, 134, 221, 60, 14 + PUSHBUTTON "&Właściwości", 1107, 134, 221, 60, 14 PUSHBUTTON "&Pomoc", 1592, 198, 221, 60, 14 END 1425 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad &nazw hosta albo adres IP celu (na przykad reactos.org albo 145.52.0.1):", 1430, 7, 5, 217, 18 + LTEXT "Wprowadź &nazwę hosta albo adres IP celu (na przykład reactos.org albo 145.52.0.1):", 1430, 7, 5, 217, 18 EDITTEXT 1427, 7, 25, 215, 14, ES_AUTOHSCROLL - GROUPBOX "Poczenie wstpne", 1431, 9, 48, 213, 78 - LTEXT "ReactOS moe wpierw poczy si z sieci publiczn, np z Internetem, przed prb ustanowienia tego poczenia z VPN.", 1432, 17, 63, 199, 24 - AUTOCHECKBOX "&Wybierz najpierw inne poczenie:", 1428, 19, 89, 183, 10 + GROUPBOX "Połączenie wstępne", 1431, 9, 48, 213, 78 + LTEXT "ReactOS może wpierw połączyć się z siecią publiczną, np z Internetem, przed próbą ustanowienia tego połączenia z VPN.", 1432, 17, 63, 199, 24 + AUTOCHECKBOX "&Wybierz najpierw inne połączenie:", 1428, 19, 89, 183, 10 COMBOBOX 1429, 29, 103, 182, 87, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "Po&ka ikon w zasobniku systemowym podczas trwania poczenia", 1120, 10, 192, 213, 13 + AUTOCHECKBOX "Po&każ ikonę w zasobniku systemowym podczas trwania połączenia", 1120, 10, 192, 213, 13 END 1426 DIALOGEX 0, 0, 230, 215 @@ -1475,75 +1476,75 @@ CAPTION "Opcje" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Opcje wybierania", 1289, 8, 7, 214, 56 - AUTOCHECKBOX "&Wywietlaj przebieg poczenia", 1284, 16, 17, 199, 10 - AUTOCHECKBOX "&Zapytaj o nazw uytkownika, haso, certyfikat itd.", 1554, 16, 32, 199, 10 - AUTOCHECKBOX "Docz domen logowania z &ReactOS", 1555, 16, 47, 178, 10 + AUTOCHECKBOX "&Wyświetlaj przebieg połączenia", 1284, 16, 17, 199, 10 + AUTOCHECKBOX "&Zapytaj o nazwę użytkownika, hasło, certyfikat itd.", 1554, 16, 32, 199, 10 + AUTOCHECKBOX "Dołącz domenę logowania z &ReactOS", 1555, 16, 47, 178, 10 GROUPBOX "Wybieranie ponowne", 1290, 8, 68, 214, 89 - LTEXT "&Ilo prb wybierania:", 1300, 16, 81, 121, 8 + LTEXT "&Ilość prób wybierania:", 1300, 16, 81, 121, 8 EDITTEXT 1287, 140, 77, 70, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "&Czas pomidzy prbami wybierania:", 1301, 16, 99, 121, 8 + LTEXT "&Czas pomiędzy próbami wybierania:", 1301, 16, 99, 121, 8 COMBOBOX 1292, 141, 95, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "Czas &bezczynnoci przed zawieszeniem poczenia:", 1299, 16, 117, 121, 8 + LTEXT "Czas &bezczynności przed zawieszeniem połączenia:", 1299, 16, 117, 121, 8 COMBOBOX 1291, 141, 113, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "Wybieraj &ponownie przy zerwaniu poczenia", 1286, 16, 138, 199, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Wybieraj &ponownie przy zerwaniu połączenia", 1286, 16, 138, 199, 10, BS_TOP | BS_MULTILINE END 1427 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad nazw hosta albo adres IP komputera z ktrym chcesz si poczy.", -1, 10, 6, 275, 16 - LTEXT "&Nazwa hosta albo adres IP (na przykad, reactos.org or 145.52.0.1 ):", -1, 21, 28, 277, 11 + LTEXT "Wprowadź nazwę hosta albo adres IP komputera z którym chcesz się połączyć.", -1, 10, 6, 275, 16 + LTEXT "&Nazwa hosta albo adres IP (na przykład, reactos.org or 145.52.0.1 ):", -1, 21, 28, 277, 11 EDITTEXT 1433, 21, 42, 275, 14, ES_AUTOHSCROLL END 1428 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS moe wpierw poczy si z sieci publiczn, np z Internetem, przed prb ustanowienia tego poczenia z VPN.", -1, 10, 6, 275, 24 - AUTORADIOBUTTON "&Nie wykonuj poczenia wstpnego.", 1509, 32, 31, 271, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "&Automagicznie wykonaj poczenie wstpne:", 1510, 32, 45, 269, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "ReactOS może wpierw połączyć się z siecią publiczną, np z Internetem, przed próbą ustanowienia tego połączenia z VPN.", -1, 10, 6, 275, 24 + AUTORADIOBUTTON "&Nie wykonuj połączenia wstępnego.", 1509, 32, 31, 271, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Automagicznie wykonaj połączenie wstępne:", 1510, 32, 45, 269, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP COMBOBOX 1435, 43, 62, 253, 87, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END 1436 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Wybierz urzdzenie:", 1597, 8, 5, 213, 8 + LTEXT "&Wybierz urządzenie:", 1597, 8, 5, 213, 8 COMBOBOX 1437, 7, 17, 217, 166, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "P&oka ikon w zasobniku systemowym podczas trwania poczenia", 1120, 11, 195, 213, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "P&okaż ikonę w zasobniku systemowym podczas trwania połączenia", 1120, 11, 195, 213, 10, BS_TOP | BS_MULTILINE PUSHBUTTON "&Konfiguruj", 1130, 160, 34, 60, 14 END 1448 DIALOGEX 10, 20, 265, 71 STYLE DS_SHELLFONT | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Poczenia sieciowe" +CAPTION "Połączenia sieciowe" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Wybierz poczenie sieciowe:", 1456, 7, 7, 251, 10 + LTEXT "&Wybierz połączenie sieciowe:", 1456, 7, 7, 251, 10 COMBOBOX 1457, 8, 18, 250, 140, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - DEFPUSHBUTTON "&Pocz...", 1449, 7, 50, 60, 14 + DEFPUSHBUTTON "&Połącz...", 1449, 7, 50, 60, 14 PUSHBUTTON "Anuluj", 1455, 70, 50, 60, 14 PUSHBUTTON "&Nowe...", 1459, 134, 50, 60, 14 - PUSHBUTTON "W&aciwoci", 1460, 198, 50, 60, 14 + PUSHBUTTON "Wł&aściwości", 1460, 198, 50, 60, 14 END 1466 DIALOGEX 6, 18, 265, 262 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Przykadowy tekst", 1469, 7, 7, 251, 8 + LTEXT "Przykładowy tekst", 1469, 7, 7, 251, 8 EDITTEXT 1470, 7, 17, 193, 14, ES_AUTOHSCROLL PUSHBUTTON "&Dodaj", 1471, 77, 36, 60, 14 - PUSHBUTTON "&Zamie", 1472, 141, 36, 60, 14 - LTEXT "Przykadowy tekst", 1473, 7, 57, 193, 8 + PUSHBUTTON "&Zamień", 1472, 141, 36, 60, 14 + LTEXT "Przykładowy tekst", 1473, 7, 57, 193, 8 LISTBOX 1474, 7, 68, 193, 145, WS_VSCROLL | WS_TABSTOP PUSHBUTTON "", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP - PUSHBUTTON "&D", 1476, 206, 86, 51, 14, BS_BITMAP + PUSHBUTTON "&Dół", 1476, 206, 86, 51, 14, BS_BITMAP PUSHBUTTON "&Skasuj", 1477, 141, 215, 60, 14 CONTROL "", 1479, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP @@ -1554,16 +1555,16 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Przykadowy tekst", 1469, 7, 7, 197, 8 + LTEXT "Przykładowy tekst", 1469, 7, 7, 197, 8 EDITTEXT 1470, 7, 17, 193, 14, ES_AUTOHSCROLL PUSHBUTTON "&Dodaj", 1471, 76, 36, 60, 14 - PUSHBUTTON "&Zamie", 1472, 141, 36, 60, 14 - LTEXT "Przykadowy tekst", 1473, 7, 57, 193, 8 + PUSHBUTTON "&Zamień", 1472, 141, 36, 60, 14 + LTEXT "Przykładowy tekst", 1473, 7, 57, 193, 8 LISTBOX 1474, 7, 68, 193, 135, WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Gra", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP - PUSHBUTTON "&D", 1476, 206, 86, 51, 14, BS_BITMAP + PUSHBUTTON "&Góra", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP + PUSHBUTTON "&Dół", 1476, 206, 86, 51, 14, BS_BITMAP PUSHBUTTON "&Skasuj", 1477, 141, 204, 60, 14 - AUTOCHECKBOX "Przykadowy tekst", 1478, 7, 225, 249, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Przykładowy tekst", 1478, 7, 225, 249, 10, BS_TOP | BS_MULTILINE PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 196, 242, 60, 14 END @@ -1572,11 +1573,11 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Przykadowy tekst", 1469, 7, 5, 249, 8 + LTEXT "Przykładowy tekst", 1469, 7, 5, 249, 8 EDITTEXT 1470, 7, 17, 249, 14, ES_AUTOHSCROLL PUSHBUTTON "&Dodaj", 1471, 132, 36, 60, 14 - PUSHBUTTON "&Zamie", 1472, 196, 36, 60, 14 - LTEXT "Przykadowy tekst", 1473, 7, 55, 251, 8 + PUSHBUTTON "&Zamień", 1472, 196, 36, 60, 14 + LTEXT "Przykładowy tekst", 1473, 7, 55, 251, 8 LISTBOX 1474, 7, 68, 249, 140, LBS_STANDARD | WS_TABSTOP PUSHBUTTON "&Skasuj", 1477, 196, 214, 60, 14, WS_GROUP CONTROL "", 1479, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 @@ -1586,25 +1587,25 @@ END 1469 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "Poczenie &Dial-up do sieci prywatnej.", 1488, 24, 9, 116, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "Pocz si z sieci prywatn za porednictwem &Internetu.", 1489, 24, 34, 206, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "&Bezporednie poczenie z innym komputerem.", 1490, 24, 59, 157, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "Poczenie z sieci poprzez cze &stae", 1491, 24, 83, 273, 10, NOT WS_TABSTOP - LTEXT "Pocz za pomoc linii telefonicznej (modem albo ISDN).", -1, 45, 21, 156, 8 - LTEXT "Stwrz poczenie VPN albo poczenie tunelowe poprzez internet.", -1, 45, 46, 266, 8 - LTEXT "Pocz za pomoc portu szeregowego, rwnolegego albo podczerwieni.", -1, 45, 71, 266, 8 - LTEXT "Connect through my broadband connection.", -1, 45, 95, 266, 8 + AUTORADIOBUTTON "Połączenie &Dial-up do sieci prywatnej.", 1488, 24, 9, 116, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Połącz się z siecią prywatną za pośrednictwem &Internetu.", 1489, 24, 34, 206, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "&Bezpośrednie połączenie z innym komputerem.", 1490, 24, 59, 157, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Połączenie z siecią poprzez łącze &stałe", 1491, 24, 83, 273, 10, NOT WS_TABSTOP + LTEXT "Połącz za pomocą linii telefonicznej (modem albo ISDN).", -1, 45, 21, 156, 8 + LTEXT "Stwórz połączenie VPN albo połączenie tunelowe poprzez internet.", -1, 45, 46, 266, 8 + LTEXT "Połącz za pomocą portu szeregowego, równoległego albo podczerwieni.", -1, 45, 71, 266, 8 + LTEXT "Połącz za pomocą łącza szerokopasmowego.", -1, 45, 95, 266, 8 END 1480 DIALOGEX 0, 0, 230, 61 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Edytor numerw telefonicznych" +CAPTION "Edytor numerów telefonicznych" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Prosz wprowadzi nowy numer:", 1481, 7, 7, 218, 8 + LTEXT "&Proszę wprowadzić nowy numer:", 1481, 7, 7, 218, 8 EDITTEXT 1482, 7, 17, 217, 15, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 99, 40, 60, 14 PUSHBUTTON "Anuluj", 2, 163, 40, 60, 14 @@ -1612,19 +1613,19 @@ END 1481 DIALOGEX 0, 0, 321, 157 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Kreator konfiguracji poczenia" +CAPTION "Kreator konfiguracji połączenia" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wprowad nazw konta i haso u ISP, nastpnie zapisz te informacje i przechowaj w bezpiecznym miejscu. (Jeeli mimo to zapomniae nazwy konta albo hasa, skontaktuj si ze swoim ISP.)", 1689, 10, 4, 308, 25 + LTEXT "Wprowadź nazwę konta i hasło u ISP, następnie zapisz te informacje i przechowaj w bezpiecznym miejscu. (Jeżeli mimo to zapomniałeś nazwy konta albo hasła, skontaktuj się ze swoim ISP.)", 1689, 10, 4, 308, 25 LTEXT "&Nazwa konta:", 1636, 23, 35, 89, 15 EDITTEXT 1614, 115, 34, 190, 15, ES_AUTOHSCROLL - LTEXT "&Haso:", 1637, 23, 55, 90, 13 + LTEXT "&Hasło:", 1637, 23, 55, 90, 13 EDITTEXT 1615, 115, 54, 190, 15, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&Potwierd haso:", 1638, 23, 74, 88, 13 + LTEXT "&Potwierdź hasło:", 1638, 23, 74, 88, 13 EDITTEXT 1616, 115, 73, 190, 15, ES_PASSWORD | ES_AUTOHSCROLL - AUTOCHECKBOX "U&yj tej nazwy konta i hasa gdy ktrykolwiek uytkownik bdzie czy si z Internetem, z tego komputera", 1596, 23, 91, 291, 17, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Ustaw to poczenie sieciowe jako domylne", 1595, 23, 112, 288, 14 - AUTOCHECKBOX "&Wcz Firewall Systemowy dla tego poczenia", 1682, 23, 133, 290, 14 + AUTOCHECKBOX "Uż&yj tej nazwy konta i hasła gdy którykolwiek użytkownik będzie łączył się z Internetem, z tego komputera", 1596, 23, 91, 291, 17, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Ustaw to połączenie sieciowe jako domyślne", 1595, 23, 112, 288, 14 + AUTOCHECKBOX "&Włącz Firewall Systemowy dla tego połączenia", 1682, 23, 133, 290, 14 END 1660 DIALOGEX 0, 0, 258, 78 @@ -1633,24 +1634,24 @@ CAPTION "Internet Connection Firewall" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, -1, 7, 7, 20, 20 - LTEXT "Wyczenie Firewalla Systemowego moe narazi twj komputer na nieautoryzowane wtargnicie z Internetu. Czy na pewno chcesz go wyczy?", -1, 44, 5, 212, 24 - AUTOCHECKBOX "&Nie pokazuj wicej tej wiadomoci", 1662, 42, 40, 210, 10 + LTEXT "Wyłączenie Firewalla Systemowego może narazić twój komputer na nieautoryzowane wtargnięcie z Internetu. Czy na pewno chcesz go wyłączyć?", -1, 44, 5, 212, 24 + AUTOCHECKBOX "&Nie pokazuj więcej tej wiadomości", 1662, 42, 40, 210, 10 DEFPUSHBUTTON "&Tak", 6, 74, 60, 50, 14 PUSHBUTTON "&Nie", 7, 128, 60, 50, 14 END 7000 DIALOGEX 0, 0, 215, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Nazwa uytkownika:", -1, 7, 8, 90, 12, SS_CENTERIMAGE + LTEXT "&Nazwa użytkownika:", -1, 7, 8, 90, 12, SS_CENTERIMAGE EDITTEXT 7001, 101, 7, 108, 14, ES_AUTOHSCROLL LTEXT "&Imie i nazwisko:", -1, 7, 26, 90, 12 EDITTEXT 7002, 101, 25, 108, 14, ES_AUTOHSCROLL - LTEXT "&Haso:", -1, 7, 44, 90, 12 + LTEXT "&Hasło:", -1, 7, 44, 90, 12 EDITTEXT 7003, 101, 43, 108, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&Potwierd haso:", -1, 7, 62, 91, 12 + LTEXT "&Potwierdź hasło:", -1, 7, 62, 91, 12 EDITTEXT 7004, 101, 61, 108, 14, ES_PASSWORD | ES_AUTOHSCROLL PUSHBUTTON "OK", 1, 84, 82, 60, 14 PUSHBUTTON "Anuluj", 2, 149, 82, 60, 14 @@ -1662,68 +1663,68 @@ CAPTION "Oddzwanianie" FONT 8, "MS Shell Dlg" BEGIN AUTORADIOBUTTON "&Nie zezwalaj na oddzwanianie", 7009, 9, 7, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Zezwl na wybr numeru przez oddzwaniajcego", 7006, 9, 20, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "&Uywaj wycznie podanych numerw do oddzwaniania:", 7007, 9, 34, 217, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Zezwól na wybór numeru przez oddzwaniającego", 7006, 9, 20, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Używaj wyłącznie podanych numerów do oddzwaniania:", 7007, 9, 34, 217, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP EDITTEXT 7008, 19, 49, 204, 14, ES_AUTOHSCROLL | WS_GROUP END 7010 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Poczenia przychodzce", -1, 7, 4, 214, 110, WS_GROUP - LTEXT "Zezwalaj na poczenia przychodzce do tych urzdze.", -1, 17, 17, 195, 8 - LTEXT "&Urzdzenia:", -1, 17, 29, 29, 8 + GROUPBOX "Połączenia przychodzące", -1, 7, 4, 214, 110, WS_GROUP + LTEXT "Zezwalaj na połączenia przychodzące do tych urządzeń.", -1, 17, 17, 195, 8 + LTEXT "&Urządzenia:", -1, 17, 29, 29, 8 CONTROL "", 7011, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00004405, 17, 41, 193, 47, WS_EX_CLIENTEDGE - AUTOCHECKBOX "&Wcz multipoczenia", 7012, 17, 96, 121, 10, BS_TOP | BS_MULTILINE | WS_GROUP - PUSHBUTTON "W&aciwoci", 7013, 145, 94, 65, 14, WS_GROUP + AUTOCHECKBOX "&Włącz multipołączenia", 7012, 17, 96, 121, 10, BS_TOP | BS_MULTILINE | WS_GROUP + PUSHBUTTON "Wł&aściwości", 7013, 145, 94, 65, 14, WS_GROUP GROUPBOX "Wirtualne sieci prywatne", -1, 6, 122, 214, 49, WS_GROUP - AUTOCHECKBOX "&Zezwl innym na ustanawianie pocze z moim komputerem poprzez tunelowanie przez Internet lub inn sie", 7014, 17, 137, 195, 27, BS_TOP | BS_MULTILINE | WS_GROUP - AUTOCHECKBOX "&Poka ikon w zasobniku systemowym podczas trwania poczenia", 7015, 12, 184, 209, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Zezwól innym na ustanawianie połączeń z moim komputerem poprzez tunelowanie przez Internet lub inną sieć", 7014, 17, 137, 195, 27, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Pokaż ikonę w zasobniku systemowym podczas trwania połączenia", 7015, 12, 184, 209, 10, BS_TOP | BS_MULTILINE | WS_GROUP END 7016 DIALOGEX 0, 0, 265, 190 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Waciwoci przychodzcych pocze TCP/IP" +CAPTION "Właściwości przychodzących połączeń TCP/IP" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Dostp sieciowy", -1, 6, 5, 252, 32 - AUTOCHECKBOX "&Zezwl dzwonicym na dostp do mojej sieci lokalnej", 7017, 20, 20, 228, 9, BS_LEFT | BS_TOP | BS_MULTILINE - GROUPBOX "Przydzia adresw TCP/IP", -1, 6, 42, 250, 122 - AUTORADIOBUTTON "&Przydziel adresy TCP/IP automagicznie, za pomoc DHCP", 7019, 20, 54, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP + GROUPBOX "Dostęp sieciowy", -1, 6, 5, 252, 32 + AUTOCHECKBOX "&Zezwól dzwoniącym na dostęp do mojej sieci lokalnej", 7017, 20, 20, 228, 9, BS_LEFT | BS_TOP | BS_MULTILINE + GROUPBOX "Przydział adresów TCP/IP", -1, 6, 42, 250, 122 + AUTORADIOBUTTON "&Przydziel adresy TCP/IP automagicznie, za pomocą DHCP", 7019, 20, 54, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "&Wyznacz adresy TCP/IP", 7020, 20, 71, 231, 10, BS_TOP | BS_MULTILINE LTEXT "&Od:", -1, 29, 88, 53, 8 CONTROL "", 7018, "RASIPADDRESS", WS_GROUP | WS_TABSTOP, 90, 85, 103, 13 LTEXT "&Do:", -1, 29, 105, 53, 8 CONTROL "", 7021, "RASIPADDRESS", WS_GROUP | WS_TABSTOP, 90, 102, 103, 13 - LTEXT "Oglnie:", -1, 29, 124, 53, 10 + LTEXT "Ogólnie:", -1, 29, 124, 53, 10 LTEXT "", 7024, 90, 121, 150, 14, 0, WS_EX_STATICEDGE - AUTOCHECKBOX "Zezwl dz&wonicym komputerom na ustawienie wasnych adresw IP", 7022, 20, 144, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Zezwól dz&woniącym komputerom na ustawienie własnych adresów IP", 7022, 20, 144, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 133, 169, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 197, 169, 60, 14 END 7025 DIALOGEX 0, 0, 250, 157 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Waciwoci przychodzcych pocze IPX" +CAPTION "Właściwości przychodzących połączeń IPX" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Dostp sieciowy", -1, 8, 6, 234, 32 - AUTOCHECKBOX "A&Zezwl dzwonicym na dostp do mojej sieci lokalnej", 7032, 18, 19, 194, 12, BS_LEFT | BS_TOP | BS_MULTILINE - GROUPBOX "Przydzia adresw sieciowych", -1, 8, 43, 234, 87 + GROUPBOX "Dostęp sieciowy", -1, 8, 6, 234, 32 + AUTOCHECKBOX "A&Zezwól dzwoniącym na dostęp do mojej sieci lokalnej", 7032, 18, 19, 194, 12, BS_LEFT | BS_TOP | BS_MULTILINE + GROUPBOX "Przydział adresów sieciowych", -1, 8, 43, 234, 87 AUTOCHECKBOX "&Przydziel ten sam adres sieciowy wszystkim komputerom", 7028, 17, 56, 203, 10, BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "P&rzydziel adres sieciowy automagicznie", 7026, 28, 68, 191, 10, BS_TOP | BS_MULTILINE | WS_GROUP AUTORADIOBUTTON "&Wyznacz adresy sieciowe:", 7027, 28, 81, 189, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP EDITTEXT 7029, 40, 92, 154, 14, ES_UPPERCASE | WS_GROUP - AUTOCHECKBOX "Zezwl &dzwonicym na ustawienie wasnych numerw wza", 7031, 17, 113, 208, 11, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Zezwól &dzwoniącym na ustawienie własnych numerów węzła", 7031, 17, 113, 208, 11, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 116, 136, 60, 14, WS_GROUP PUSHBUTTON "Anuluj", 2, 181, 136, 60, 14 END 7033 DIALOGEX 0, 0, 220, 50 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Wa" +CAPTION "Wła" FONT 8, "MS Shell Dlg" BEGIN AUTOCHECKBOX "Allow &callers to access my local area network", 7034, 7, 7, 208, 18, BS_LEFT | BS_TOP | BS_MULTILINE @@ -1733,65 +1734,65 @@ END 7035 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Sie" +CAPTION "Sieć" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Skadniki sieci:", -1, 7, 7, 217, 9 + LTEXT "&Składniki sieci:", -1, 7, 7, 217, 9 CONTROL "", 7036, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 7, 17, 215, 89, WS_EX_CLIENTEDGE PUSHBUTTON "&Instaluj..", 7037, 9, 110, 67, 14, WS_GROUP PUSHBUTTON "&Odinstaluj", 7038, 80, 110, 67, 14, WS_GROUP - PUSHBUTTON "&Waciwoci", 7039, 153, 110, 67, 14, WS_GROUP + PUSHBUTTON "&Właściwości", 7039, 153, 110, 67, 14, WS_GROUP GROUPBOX "Opis", -1, 7, 138, 213, 69 - LTEXT "", 7040, 17, 150, 193, 48 + LTEXT "", 7040, 17, 150, 193, 48 END 7042 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION "Uytkownicy" +CAPTION "Użytkownicy" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Uytkownicy ktrzy mog si poczy:", -1, 7, 5, 213, 8 + LTEXT "&Użytkownicy którzy mogą się połączyć:", -1, 7, 5, 213, 8 CONTROL "", 7043, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 7, 19, 214, 83, WS_EX_CLIENTEDGE PUSHBUTTON "&Nowy.....", 7044, 7, 107, 67, 14, WS_GROUP - PUSHBUTTON "&Usu.....", 7045, 80, 107, 67, 14, WS_GROUP - PUSHBUTTON "&Waciwoci", 7046, 153, 107, 67, 14, WS_GROUP - AUTOCHECKBOX "Wy&magaj zabezpieczenia danych i hase od wszystkich uytkownikw.", 7048, 8, 151, 217, 12, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&Zawsze zezwalaj urzdzeniom bezporednio poczonym z komputerem do poczenia si bez podawania hasa.", 7049, 8, 169, 217, 23, BS_TOP | BS_MULTILINE - LTEXT "Zauwa e inne ustawienia, takie jak wyczone konto uytkownika, mog mie wpyw na moliwo poczenia si uytkownika.", -1, 9, 126, 212, 23 + PUSHBUTTON "&Usuń.....", 7045, 80, 107, 67, 14, WS_GROUP + PUSHBUTTON "&Właściwości", 7046, 153, 107, 67, 14, WS_GROUP + AUTOCHECKBOX "Wy&magaj zabezpieczenia danych i haseł od wszystkich użytkowników.", 7048, 8, 151, 217, 12, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Zawsze zezwalaj urządzeniom bezpośrednio połączonym z komputerem do połączenia się bez podawania hasła.", 7049, 8, 169, 217, 23, BS_TOP | BS_MULTILINE + LTEXT "Zauważ że inne ustawienia, takie jak wyłączone konto użytkownika, mogą mieć wpływ na możliwość połączenia się użytkownika.", -1, 9, 126, 212, 23 END 7049 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz uytkownikw, ktrym chcesz zezwoli na czenie si z tym komputerem. Note that other factors, such as a disabled user account, may affect a user's ability to connect.", -1, 10, 1, 275, 27 - LTEXT "&Uytkownicy, ktrzy mog si poczy:", -1, 10, 28, 275, 8 + LTEXT "Wybierz użytkowników, którym chcesz zezwolić na łączenie się z tym komputerem. Note that other factors, such as a disabled user account, may affect a user's ability to connect.", -1, 10, 1, 275, 27 + LTEXT "&Użytkownicy, którzy mogą się połączyć:", -1, 10, 28, 275, 8 CONTROL "", 7043, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 10, 42, 275, 73 PUSHBUTTON "&Dodaj", 7044, 10, 122, 65, 14, WS_GROUP - PUSHBUTTON "&Usu", 7045, 79, 122, 65, 14, WS_GROUP - PUSHBUTTON "&Waciwoci", 7046, 147, 122, 65, 14, WS_GROUP + PUSHBUTTON "&Usuń", 7045, 79, 122, 65, 14, WS_GROUP + PUSHBUTTON "&Właściwości", 7046, 147, 122, 65, 14, WS_GROUP END 7050 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz urzdzenie, ktre chcesz uy do odbierania pocze przychodzcych.", -1, 10, 4, 299, 10 - LTEXT "&Urzdzenia:", -1, 10, 16, 275, 8 + LTEXT "Wybierz urządzenie, które chcesz użyć do odbierania połączeń przychodzących.", -1, 10, 4, 299, 10 + LTEXT "&Urządzenia:", -1, 10, 16, 275, 8 CONTROL "", 7011, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 10, 26, 297, 87 - PUSHBUTTON "&Waciwoci", 7013, 243, 120, 65, 14, WS_GROUP + PUSHBUTTON "&Właściwości", 7013, 243, 120, 65, 14, WS_GROUP END 7051 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz usugi sieciowe, ktre maj by uyte do obsugi pocze przychodzcych.", -1, 10, 1, 288, 20 - LTEXT "&Usugi sieciowe:", -1, 10, 24, 274, 8 + LTEXT "Wybierz usługi sieciowe, które mają być użyte do obsługi połączeń przychodzących.", -1, 10, 1, 288, 20 + LTEXT "&Usługi sieciowe:", -1, 10, 24, 274, 8 CONTROL "", 7036, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 10, 34, 286, 33 PUSHBUTTON "&Instaluj...", 7037, 108, 71, 60, 14, WS_GROUP PUSHBUTTON "&Odinstaluj", 7038, 172, 71, 60, 14, WS_GROUP - PUSHBUTTON "&Waciwoci", 7039, 236, 71, 60, 14, WS_GROUP + PUSHBUTTON "&Właściwości", 7039, 236, 71, 60, 14, WS_GROUP LTEXT "", 7040, 21, 105, 273, 38 LTEXT "Opis:", -1, 21, 95, 275, 8 END @@ -1800,21 +1801,21 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wirtualne Poczenia Prywatne do twojego komputera poprzez Internet s moliwe wycznie gdy komputer ogasza swoj nazw albo adres IP.", -1, 10, 4, 290, 20 - AUTORADIOBUTTON "&Zezwalaj na Wirtualne Poczenia Prywatne", 7053, 29, 63, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&Nie zezwalaj na Wirtualne Poczenia Prywatne", 7054, 29, 78, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - LTEXT "Czy chcesz zezwoli na Wirtualne Poczenia Prywatne z tym komputerem?", -1, 17, 49, 275, 8 - LTEXT " Jeli tak, ReactOS zmodyfikuje Firewall Systemowy aby przepuszcza on pakiety VPN.", -1, 10, 25, 293, 25 + LTEXT "Wirtualne Połączenia Prywatne do twojego komputera poprzez Internet są możliwe wyłącznie gdy komputer ogłasza swoją nazwę albo adres IP.", -1, 10, 4, 290, 20 + AUTORADIOBUTTON "&Zezwalaj na Wirtualne Połączenia Prywatne", 7053, 29, 63, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Nie zezwalaj na Wirtualne Połączenia Prywatne", 7054, 29, 78, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Czy chcesz zezwolić na Wirtualne Połączenia Prywatne z tym komputerem?", -1, 17, 49, 275, 8 + LTEXT " Jeśli tak, ReactOS zmodyfikuje Firewall Systemowy aby przepuszczał on pakiety VPN.", -1, 10, 25, 293, 25 END 7055 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&Urzdzenie dla tego pozenia:", -1, 23, 24, 275, 8 + LTEXT "&Urządzenie dla tego połąćzenia:", -1, 23, 24, 275, 8 COMBOBOX 7056, 22, 36, 275, 125, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "Urzdzenia inne ni wybrane nie zostan zajte i bd mogy by wykorzystane do innych celw.", -1, 10, 4, 275, 17 - PUSHBUTTON "&Waciwoci", 7061, 232, 53, 65, 14, WS_GROUP + LTEXT "Urządzenia inne niż wybrane nie zostaną zajęte i będą mogły być wykorzystane do innych celów.", -1, 10, 4, 275, 17 + PUSHBUTTON "&Właściwości", 7061, 232, 53, 65, 14, WS_GROUP END 7379 DIALOGEX 0, 0, 317, 143 @@ -1825,264 +1826,264 @@ END 19900 DIALOGEX 0, 0, 156, 44 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "Poczenia Dial-Up" +CAPTION "Połączenia Dial-Up" FONT 8, "MS Shell Dlg" BEGIN ICON 563, 19901, 10, 10, 18, 20 - LTEXT "Oczekiwanie na start usugi...", 19902, 34, 16, 120, 8 + LTEXT "Oczekiwanie na start usługi...", 19902, 34, 16, 120, 8 END STRINGTABLE BEGIN 187 "&Nie wybieraj\0" - 188 "Uytkownik (lub program) zarzda informacji z %1. Ktrego poczenia chcesz uy?\0" + 188 "Użytkownik (lub program) zarządał informacji z %1. Którego połączenia chcesz użyć?\0" 189 "Dodaj kolejne numery telefoniczne\0" - 190 "Wybieraj tylko na pierwszym dostpnym urzdzeniu\0" - 191 "Wybieraj na wszystkich urzdzeniach\0" - 192 "Wybieraj na urzdzeniach wedug potrzeb\0" - 193 "Wprowad nazw uytkownika i haso z dostpem do zdalnej domeny sieciowej.\0" - 194 "Translacja Adresw w Sieci (NAT) jest obecnie zainstalowana jako protok routujcy,\ni musi zosta usunita przed wczeniem Udostpniania Poczenia Internetowego.\nAby usun NAT, otwrz Menedera Routingu i Dostpu Zdalnego\nsnapin i rozwi opcje routera w panelu po lewej.\nSkasuj protok Translacji Adresw w Sieci z listy\nprotokow routingu IP.\0" - 195 "Numer kierunkowy moe zawiera jedynie cyfry od 0 do 9.\0" - 196 "Wprowadzona nazwa musi zawiera co najmniej jeden znak rny od spacji i nie moe zaczyna si od kropki. Prosz wybra inn nazw.\0" - 197 "Musisz wybra warto od %1 do %2 dla tego pola.\0" - 198 "Biblioteka DLL konfiugracji wasnego uwierzytelniania nie zostaa zaadowana. Upewnij si, e pakiet wasnego uwierzytelniania si zosta poprawnie zainstalowany.\0" - 199 "Wybrane poczenie zostao utworzone przez router wieloprotokoowy.\nProsz uy narzdzia 'Routing i Admin RAS' do zawieszenia tego poczenia.\0" + 190 "Wybieraj tylko na pierwszym dostępnym urządzeniu\0" + 191 "Wybieraj na wszystkich urządzeniach\0" + 192 "Wybieraj na urządzeniach według potrzeb\0" + 193 "Wprowadź nazwę użytkownika i hasło z dostępem do zdalnej domeny sieciowej.\0" + 194 "Translacja Adresów w Sieci (NAT) jest obecnie zainstalowana jako protokół routujący,\ni musi zostać usunięta przed włączeniem Udostępniania Połączenia Internetowego.\nAby usunąć NAT, otwórz Menedżera Routingu i Dostępu Zdalnego\nsnapin i rozwiń opcje routera w panelu po lewej.\nSkasuj protokół Translacji Adresów w Sieci z listy\nprotokołów routingu IP.\0" + 195 "Numer kierunkowy może zawierać jedynie cyfry od 0 do 9.\0" + 196 "Wprowadzona nazwa musi zawierać co najmniej jeden znak różny od spacji i nie może zaczynać się od kropki. Proszę wybrać inną nazwę.\0" + 197 "Musisz wybrać wartość od %1 do %2 dla tego pola.\0" + 198 "Biblioteka DLL konfiugracji własnego uwierzytelniania nie została załadowana. Upewnij się, że pakiet własnego uwierzytelniania się został poprawnie zainstalowany.\0" + 199 "Wybrane połączenie zostało utworzone przez router wieloprotokołowy.\nProszę użyć narzędzia 'Routing i Admin RAS' do zawieszenia tego połączenia.\0" 200 "Komentarz\0" - 201 "Konfiguracja pakietu wasnego uwierzytelniania zakoczone niepowodzeniem.\0" - 202 "TCP/IP nie zosta zainstalowanay albo jest wyczony dla Routingu i Dostpu Zdalnego. W Panelu Sterowania, wybierz Sieci, przejd na Usugi, wybierz Waciwoci usugi 'Routing i Dostp Zdalny', i nacinij przycisk Sie.\0" - 203 "IPX nie zosta zainstalowanay albo jest wyczony dla Routingu i Dostpu Zdalnego. Moesz zainstalowa/wczy IPX przegldajc Waciwoci dowolnego poczenia.\0" - 204 "Czy usun wybrane urzdzenia z listy?\0" - 205 "Skasowa %1 z Ksiki Telefonicznej?\0" - 206 "Rozczy si z %1?\0" - 207 "Plik o nazwie %1 ju istnieje. Czy chcesz go nadpisa?\0" - 208 "W skrypcie znajduj si bdy skadni. Czy chcesz przejrze komunikaty o bdach?\0" - 209 "'%1' jest teraz poczony. \0" - 210 "Nacinij prawy przycisk myszki na Monitorze Sieci Dial-Up w zasobniku systemowym, aby rozczy si lub sprawdzi stan twojego poczenia.\0" - 212 "Poczenie udane.\0" - 213 "Wybrana metoda uwierzytelniania wasnego musi zosta uaktywniona we Waciwociach.\0" + 201 "Konfiguracja pakietu własnego uwierzytelniania zakończone niepowodzeniem.\0" + 202 "TCP/IP nie został zainstalowanay albo jest wyłączony dla Routingu i Dostępu Zdalnego. W Panelu Sterowania, wybierz Sieci, przejdź na Usługi, wybierz Właściwości usługi 'Routing i Dostęp Zdalny', i naciśnij przycisk Sieć.\0" + 203 "IPX nie został zainstalowanay albo jest wyłączony dla Routingu i Dostępu Zdalnego. Możesz zainstalować/włączyć IPX przeglądając Właściwości dowolnego połączenia.\0" + 204 "Czy usunąć wybrane urządzenia z listy?\0" + 205 "Skasować %1 z Książki Telefonicznej?\0" + 206 "Rozłączyć się z %1?\0" + 207 "Plik o nazwie %1 już istnieje. Czy chcesz go nadpisać?\0" + 208 "W skrypcie znajdują się błędy składni. Czy chcesz przejrzeć komunikaty o błędach?\0" + 209 "'%1' jest teraz połączony. \0" + 210 "Naciśnij prawy przycisk myszki na Monitorze Sieci Dial-Up w zasobniku systemowym, aby rozłączyć się lub sprawdzić stan twojego połączenia.\0" + 212 "Połączenie udane.\0" + 213 "Wybrana metoda uwierzytelniania własnego musi zostać uaktywniona we Właściwościach.\0" 214 "lnk\0" - 215 "Skrt poczenia Dial-up(*.rnk)\0" + 215 "Skrót połączenia Dial-up(*.rnk)\0" 216 "*.rnk\0" - 217 "Utwrz skrt poczenia Dial-Up\0" - 218 "Poczenie z %1 nieudane. Ponowne poczenie w toku...\0" - 219 "Nie mona uzyska informacji o ramce.\0" - 220 "Nie mona uzyska informacji o.\0" + 217 "Utwórz skrót połączenia Dial-Up\0" + 218 "Połączenie z %1 nieudane. Ponowne połączenie w toku...\0" + 219 "Nie można uzyskać informacji o ramce.\0" + 220 "Nie można uzyskać informacji o.\0" 221 "Cannot retrieve projection information.\0" - 222 "Nie mona zadowa listy pocze.\0" + 222 "Nie można załądować listy połączeń.\0" 223 "Klienci:\0" - 224 "Szczegy\0" - 225 "Urzdzenia:\0" - 226 "Sie:\0" - 227 "(niepoczony)\0" - 228 "&Pocz...\0" - 229 "Zawie &poczenie\0" - 230 "Poczenie Dial-up\0" - 231 "Konfiguracja Modemu ustawiona na domylne\0" + 224 "Szczegóły\0" + 225 "Urządzenia:\0" + 226 "Sieć:\0" + 227 "(niepołączony)\0" + 228 "&Połącz...\0" + 229 "Zawieś &połączenie\0" + 230 "Połączenie Dial-up\0" + 231 "Konfiguracja Modemu ustawiona na domyślne\0" 232 "COM1\0" 233 "Router Zdalny\0" - 234 "Modem albo urzdzenie\0" - 235 "Prosz wprowadzi nazw uytkownika dla konta tego interface na routerze zdalnym.\0" - 236 "Nazwa %1 ju istnieje. Prosz wprowadzi inn nazw.\0" - 237 "Moesz zezwoli na wysyanie twojego hasa bez szyfrowania.\0" - 238 "Szyfrowanie Hasa\0" - 239 "Kreator konfiguracji moe ju utworzy poczenie.\0" + 234 "Modem albo urządzenie\0" + 235 "Proszę wprowadzić nazwę użytkownika dla konta tego interface na routerze zdalnym.\0" + 236 "Nazwa %1 już istnieje. Proszę wprowadzić inną nazwę.\0" + 237 "Możesz zezwolić na wysyłanie twojego hasła bez szyfrowania.\0" + 238 "Szyfrowanie Hasła\0" + 239 "Kreator konfiguracji może już utworzyć połączenie.\0" 240 "Gotowe\0" 241 "Numer &telefoniczny:\0" - 242 "Oddzwo na numer\0" - 243 "Edycja dodatkowych numerw \0" - 244 "Jako, e to poczenie jest obecnie aktywne, niektre ustawienia zostan uwzgldnione dopiero po rozczeniu.\0" - 245 "Nie ma adnych pocze dostpnych dla dowolnego uytkownika. Musisz zalogowa si przed poczeniem.\0" - 246 "Ksika telefoniczna jest pusta.\n\nNacinij OK by doda now pozycj.\0" - 247 "Ze wzgldu na ograniczenia w imporcie/eksporcie, szyfrowanie danych nie jest dostpne w tej wersji ReactOS.\0" - 248 "Prosz wprowadzi adres X.25 na nastpnym ekranie.\0" - 249 "Bd %1: %2\0" - 250 "%1\n\nBd %2: %3\0" - 251 "%1\n\nBd %2: %3\nDiagnostyka: %4\0" - 252 "%1\n\nBd %2: %3\nKod bdu: %4\0" - 253 "%1\n\nBd %2: %3\n\nNacinij F1 aby zobaczy wicej informacji.\0" - 254 "%1\n\nBd %2: %3\nNazwa: %4\0" + 242 "Oddzwoń na numer\0" + 243 "Edycja dodatkowych numerów \0" + 244 "Jako, że to połączenie jest obecnie aktywne, niektóre ustawienia zostaną uwzględnione dopiero po rozłączeniu.\0" + 245 "Nie ma żadnych połączeń dostępnych dla dowolnego użytkownika. Musisz zalogować się przed połączeniem.\0" + 246 "Książka telefoniczna jest pusta.\n\nNaciśnij OK by dodać nową pozycję.\0" + 247 "Ze względu na ograniczenia w imporcie/eksporcie, szyfrowanie danych nie jest dostępne w tej wersji ReactOS.\0" + 248 "Proszę wprowadzić adres X.25 na następnym ekranie.\0" + 249 "Błąd %1: %2\0" + 250 "%1\n\nBłąd %2: %3\0" + 251 "%1\n\nBłąd %2: %3\nDiagnostyka: %4\0" + 252 "%1\n\nBłąd %2: %3\nKod błędu: %4\0" + 253 "%1\n\nBłąd %2: %3\n\nNaciśnij F1 aby zobaczyć więcej informacji.\0" + 254 "%1\n\nBłąd %2: %3\nNazwa: %4\0" 255 "%1\n\n%4\0" - 256 "%1\n\nBd %2: %3\nOdpowied: %4\0" - 257 "Kod bdu: 0x%1\n\0" + 256 "%1\n\nBłąd %2: %3\nOdpowiedź: %4\0" + 257 "Kod błędu: 0x%1\n\0" 258 "Nazwa: %1\n\0" - 259 "%1 CP zgosi bd %2: %3\n\0" - 260 "%1 CP poczy si.\n\0" - 261 "Moesz wybra protok dial-up ktrego chcesz uywa.\0" - 262 "Wybierz protok Dial-up\0" - 263 "Nacinij Zakocz by zapisa '%1'.\0" + 259 "%1 CP zgłosił błąd %2: %3\n\0" + 260 "%1 CP połączył się.\n\0" + 261 "Możesz wybrać protokół dial-up którego chcesz używać.\0" + 262 "Wybierz protokół Dial-up\0" + 263 "Naciśnij Zakończ by zapisać '%1'.\0" 264 "netcfg.hlp\0" - 265 "&Przenie dziaajcy numer na pocztek listy przy poczeniu\0" + 265 "&Przenieś działający numer na początek listy przy połączeniu\0" 266 "&Nowy numer telefoniczny:\0" 267 "N&umery telefoniczne:\0" 268 "Numery telefoniczne\0" - 269 "Moesz wprowadzi stay adres IP.\0" + 269 "Możesz wprowadzić stały adres IP.\0" 270 "Adres IP\0" - 271 "Protok TCP/IP, nie zosta zainstalowanay albo jest wyczony dla Dostpu Zdalnego. W Panelu Sterowania, wybierz Sieci, przejd na Usugi, wybierz Waciwoci usugi 'Dostp Zdalny', i nacinij przycisk Sie.\0" + 271 "Protokół TCP/IP, nie został zainstalowanay albo jest wyłączony dla Dostępu Zdalnego. W Panelu Sterowania, wybierz Sieci, przejdź na Usługi, wybierz Właściwości usługi 'Dostęp Zdalny', i naciśnij przycisk Sieć.\0" 272 "TCP/IP\0" - 273 "IPSec, ustawienia domylne\0" + 273 "IPSec, ustawienia domyślne\0" 274 "IPX/SPX lub kompatybilne\0" 275 " (obecna lokalizacja)\0" 276 "ISDN\0" - 277 "Wszystkie dostpne linie ISDN poczone\0" + 277 "Wszystkie dostępne linie ISDN połączone\0" 278 "64K Cyfrowy\0" 279 "56K Cyfrowy\0" 280 "56K Analogowy\0" - 281 "Moesz potrzebowa specjalnej procedury przed poczeniem.\0" + 281 "Możesz potrzebować specjalnej procedury przed połączeniem.\0" 282 "Wybierz Opcje Logowania\0" 283 "%d%%\0" 284 "Numer telefoniczny dla %s\0" 285 "&Nowa lokalizacja:\0" 286 "&Lokalizacje:\0" 287 "Lokalizacje\0" - 288 "To urzdzenie bdzie uyte do nawizania poczenia.\0" - 289 "Wybierz urzdzenie\0" + 288 "To urządzenie będzie użyte do nawiązania połączenia.\0" + 289 "Wybierz urządzenie\0" 290 "Multiple Lines cannot be bundled unless you are calling a PPP server.\0" 291 "Modem\0" 292 "Modem nie jest zainstalowany.\0" 293 "Szyfrowanie MS Point-to-Point, 128 bit RSA/RC4\0" 294 "Szyfrowanie MS Point-to-Point, 40 bit RSA/RC4\0" 295 "Multiple Lines\0" - 296 "(Nacinij Konfiguruj aby ustawi)\0" - 297 "Moesz wprowadzi stae adresy serwerw DNS i WINS.\0" + 296 "(Naciśnij Konfiguruj aby ustawić)\0" + 297 "Możesz wprowadzić stałe adresy serwerów DNS i WINS.\0" 298 "Adres DNS\0" 299 "Down-level RAS\0" 300 "PPP\0" 301 "PPP multi-link\0" 302 "SLIP\0" 303 "NetBEUI\0" - 304 "Osobista Ksika Telefoniczna zostaa stworzona i uzupeniona zawartoci Systemowej Ksiki Telefonicznej.\0" - 305 "Brak Dodatkowej Ksiki Telefonicznej.\0" - 306 "To urzdzenie nie moe by skonfigurowane dynamicznie.\0" - 307 "Ten wpis nie moe zosta skasowany podczas trwania poczenia.\0" - 308 "Nie wybrano adnego wpisu. Nacinij przycisk Nowy aby utworzy wpis.\0" - 309 "Niezerowy adres IP musi zosta podany, gdy zaznaczona jest opcja 'wyznacz adres IP'.\0" - 310 "Aby uywa interface sieciowego X.25 dial-up albo urzdzenia X.25, wymagany jest Adres X.25.\0" + 304 "Osobista Książka Telefoniczna została stworzona i uzupełniona zawartością Systemowej Książki Telefonicznej.\0" + 305 "Brak Dodatkowej Książki Telefonicznej.\0" + 306 "To urządzenie nie może być skonfigurowane dynamicznie.\0" + 307 "Ten wpis nie może zostać skasowany podczas trwania połączenia.\0" + 308 "Nie wybrano żadnego wpisu. Naciśnij przycisk Nowy aby utworzyć wpis.\0" + 309 "Niezerowy adres IP musi zostać podany, gdy zaznaczona jest opcja 'wyznacz adres IP'.\0" + 310 "Aby używać interface sieciowego X.25 dial-up albo urządzenia X.25, wymagany jest Adres X.25.\0" 311 "(brak)\0" - 312 "'%1' jest ju na licie.\0" - 313 "Zaszyfruj moje haso i dane\0" - 314 "Protok %1 nie moe zosta wybrany, gdy nie jest zainstalowany albo jest wyczony dla Dostpu Zdalnego. Aby to zmieni, wPanelu Sterowania, wybierz Sieci, przejd na Usugi, wybierz Waciwoci usugi 'Dostp Zdalny', i nacinij przycisk Sie.\0" - 315 "Nie mona zapisa hasa.\0" - 316 "Nie mona wywietli danych.\0" - 317 "Nie mona pobra informacji o autowybieraniu.\0" - 318 "Nie mona zaadowa dialogu.\0" - 319 "Nie mona wyczy dostpu wspdzielonego.\0" - 320 "Nie mona zaadowa waciwoci.\0" - 321 "Nie mona zaadowa Ksiki Telefonicznej.\0" - 322 "Nie mona zaadowa informacji o porcie z RAS Managera.\0" - 323 "Nie mona odczyta ustawie z rejestru.\0" - 324 "Nie mona zaadowa informacji o skrypcie.\0" - 325 "Nie mona obejrze script.log za pomoc notepad.exe\0" - 326 "Nie mona edytowa switch.inf za pomoc notepad.exe\0" - 327 "Nie mona zaadowa informacji TAPI.\0" - 328 "Nie mona zaadowa informacji o X.25.\0" - 329 "Nie mona utworzy nowej Ksiki Telefonicznej.\0" - 330 "Nie mona wczy dostpu wspdzielonego.\0" - 331 "Nie mona poczy si z numerem pod tym wpisie w Ksizce Telefonicznej.\0" - 332 "Nie mona otworzy bufora odbierania/wysyania.\0" - 333 "Nie mona uzyska informacji o stanie z portu.\0" - 334 "Nie mona uzyska informacji o protokole.\0" - 335 "Nie mona otworzy bufora w urzdzeniu.\0" - 336 "Nie mona wysa danych do bufora w urzdzeniu.\0" - 337 "Nie mona odebra danych.\0" - 338 "Nie mona zapisa informacji TAPI.\0" - 339 "Nie mona zapisa danych.\0" - 340 "Skrypt zosta zatrzymany.\0" - 341 "Skrypt zosta zatrzymany z powodu bdu. Czy chcesz przejrze logi z bdami?\0" - 342 "Nie mona ustawi danych do autowybierania.\0" - 343 "Nie mona skasowa zapisanego hasa.\0" - 344 "Nie mona zapisa Ksiki Telefonicznej.\0" - 345 "Zapisywanie ustawie do rejestru\0" - 346 "Nie mona zapisa skrtu.\0" + 312 "'%1' jest już na liście.\0" + 313 "Zaszyfruj moje hasło i dane\0" + 314 "Protokół %1 nie może zostać wybrany, gdyż nie jest zainstalowany albo jest wyłączony dla Dostępu Zdalnego. Aby to zmienić, wPanelu Sterowania, wybierz Sieci, przejdź na Usługi, wybierz Właściwości usługi 'Dostęp Zdalny', i naciśnij przycisk Sieć.\0" + 315 "Nie można zapisać hasła.\0" + 316 "Nie można wyświetlić danych.\0" + 317 "Nie można pobrać informacji o autowybieraniu.\0" + 318 "Nie można załadować dialogu.\0" + 319 "Nie można wyłączyć dostępu współdzielonego.\0" + 320 "Nie można załadować właściwości.\0" + 321 "Nie można załadować Książki Telefonicznej.\0" + 322 "Nie można załadować informacji o porcie z RAS Managera.\0" + 323 "Nie można odczytać ustawień z rejestru.\0" + 324 "Nie można załadować informacji o skrypcie.\0" + 325 "Nie można obejrzeć script.log za pomocą notepad.exe\0" + 326 "Nie można edytować switch.inf za pomocą notepad.exe\0" + 327 "Nie można załadować informacji TAPI.\0" + 328 "Nie można załadować informacji o X.25.\0" + 329 "Nie można utworzyć nowej Książki Telefonicznej.\0" + 330 "Nie można włączyć dostępu współdzielonego.\0" + 331 "Nie można połączyć się z numerem pod tym wpisie w Ksiązce Telefonicznej.\0" + 332 "Nie można otworzyć bufora odbierania/wysyłania.\0" + 333 "Nie można uzyskać informacji o stanie z portu.\0" + 334 "Nie można uzyskać informacji o protokole.\0" + 335 "Nie można otworzyć bufora w urządzeniu.\0" + 336 "Nie można wysłać danych do bufora w urządzeniu.\0" + 337 "Nie można odebrać danych.\0" + 338 "Nie można zapisać informacji TAPI.\0" + 339 "Nie można zapisać danych.\0" + 340 "Skrypt został zatrzymany.\0" + 341 "Skrypt został zatrzymany z powodu błędu. Czy chcesz przejrzeć logi z błędami?\0" + 342 "Nie można ustawić danych do autowybierania.\0" + 343 "Nie można skasować zapisanego hasła.\0" + 344 "Nie można zapisać Książki Telefonicznej.\0" + 345 "Zapisywanie ustawień do rejestru\0" + 346 "Nie można zapisać skrótu.\0" 347 "OK\0" 348 "Jaki jest numer telefoniczny twojego ISP?\0" 349 "Numer telefoniczny do wybierania\0" - 350 "Pola Haso i Potwierd haso nie zgadzaj si ze sob.\0" - 351 "Pola Nowe Haso i Potwierd Nowe haso nie zgadzaj si ze sob.\0" + 350 "Pola Hasło i Potwierdź hasło nie zgadzają się ze sobą.\0" + 351 "Pola Nowe Hasło i Potwierdź Nowe hasło nie zgadzają się ze sobą.\0" 352 "pbk\0" - 353 "Pliki Ksiki Telefonicznej (*.pbk)\0" + 353 "Pliki Książki Telefonicznej (*.pbk)\0" 354 "*.pbk\0" - 355 "Otwrz Ksik Telefoniczn\0" - 356 "Skopiuj Wpis w Ksice Telefonicznej\0" - 357 "Edytuj Wpis w Ksice Telefonicznej\0" - 358 "Nowy Wpis w Ksice Telefonicznej\0" + 355 "Otwórz Książkę Telefoniczną\0" + 356 "Skopiuj Wpis w Książce Telefonicznej\0" + 357 "Edytuj Wpis w Książce Telefonicznej\0" + 358 "Nowy Wpis w Książce Telefonicznej\0" 359 "Numer Telefoniczny\0" 360 "Numery Telefoniczne\0" - 361 "Poczenia sieciowe\0" - 362 "Musisz wybra przynajmniej jeden protok sieciowy.\0" - 363 "Zanim poczysz si z ktrym z serwerw PPP musisz zainstalowa protok sieciowy za pomoc apletu Control Network.\0" + 361 "Połączenia sieciowe\0" + 362 "Musisz wybrać przynajmniej jeden protokół sieciowy.\0" + 363 "Zanim połączysz się z którymś z serwerów PPP musisz zainstalować protokół sieciowy za pomocą apletu Control Network.\0" 364 "&Nowy prefiks:\0" 365 "&Prefiksy:\0" 366 "Prefiksy Numeru Telefonicznego\0" - 367 "Jeden lub wicej wymaganych protokow nie ustanowio prawidowego poczenia.\n\n\0" - 368 "Nacinij Akceptuj aby uy poczenia w obecnym stanie, albo Zawie aby si rozczy.\0" - 369 "Protok Point-to-point (PPP) ustawiony do uycia gdy %1 zainicjuje poczenie dial-up na interface %2:\0" - 370 "[Aby zmieni zapisane haso, nacinij tutaj]\0" - 405 "Protok NetBEUI jest wymagany do poczenia ze starszymi serwerami RAS.\0" - 406 "Zanim bdziesz w stanie poczy si ze starszymi serwerami RAS, musisz zainstalowa protok NetBEUI. NetBEUI z apletu Sieci w Panelu Sterowania.\0" + 367 "Jeden lub więcej wymaganych protokołów nie ustanowiło prawidłowego połączenia.\n\n\0" + 368 "Naciśnij Akceptuj aby użyć połączenia w obecnym stanie, albo Zawieś aby się rozłączyć.\0" + 369 "Protokół Point-to-point (PPP) ustawiony do użycia gdy %1 zainicjuje połączenie dial-up na interface %2:\0" + 370 "[Aby zmienić zapisane hasło, naciśnij tutaj]\0" + 405 "Protokół NetBEUI jest wymagany do połączenia ze starszymi serwerami RAS.\0" + 406 "Zanim będziesz w stanie połączyć się ze starszymi serwerami RAS, musisz zainstalować protokół NetBEUI. NetBEUI z apletu Sieci w Panelu Sterowania.\0" 407 "&Ponowne Wybieranie\0" - 408 "Zdecydowae si na wyczenie jednego lub wicej transportw. Wymaga to usunicia menederw i protokow routowania wyczonych transportw z tego interface demand-dial.\nNacinij Tak jeli chcesz konty \n \n\n\n\n\n\nnuowa, lub Nie, jeli chcesz ponownie wczy te transporty.\0" - 409 "Wspdzielenie cza Internetowego\0" + 408 "Zdecydowałeś się na wyłączenie jednego lub więcej transportów. Wymaga to usunięcia menedżerów i protokołów routowania wyłączonych transportów z tego interface demand-dial.\nNaciśnij Tak jeśli chcesz konty \n \n\n\n\n\n\nnuować, lub Nie, jeśli chcesz ponownie włączyć te transporty.\0" + 409 "Współdzielenie Łącza Internetowego\0" 410 "Konto dial-in interface Demand-dial.\0" - 411 "Musisz teraz ustawi informacje dial-out ktre interface '%1' wykorzysta w poczeniu z routerem zdalnym. Te dane musz zgadza si z informacjami ktre zostay wprowadzone do routera zdalnego. Podczas poczenia z \n \n\n\n\n\n\n routerem Win NT4/2000 nazwa uytkownika musi rownie zgadza si z nazw interface routera zdalnego.\0" + 411 "Musisz teraz ustawić informacje dial-out które interface '%1' wykorzysta w połączeniu z routerem zdalnym. Te dane muszą zgadzać się z informacjami które zostały wprowadzone do routera zdalnego. Podczas połączenia z \n \n\n\n\n\n\n routerem Win NT4/2000 nazwa użytkownika musi rownież zgadzać się z nazwą interface routera zdalnego.\0" 412 "mpradmin.hlp\0" - 413 "&Podczas prby poczeia, przenie dziaajcy numer lub adres na pocztek listy\0" + 413 "&Podczas próby połączeia, przenieś działający numer lub adres na początek listy\0" 414 "&Nowe numery telefoniczne albo adresy:\0" 415 "&Numery telefoniczne lub adresy:\0" 416 "Numery i Adresy\0" 417 "PPP: Win 95/98/NT4/2000, Internet\0" 418 "Brak\0" - 419 "SLIP: Poczenie z Unix \0" - 420 "Wszystkie urzdzenia podczone.\0" - 421 "Odbir rezultatu rejestracji...\0" - 422 "Przesyanie informacji o oddzwanianiu...\0" - 423 "Wysyanie nowego hasa...\0" - 424 "Szacowanie przepustowoci cza...\0" + 419 "SLIP: Połączenie z Unix \0" + 420 "Wszystkie urządzenia podłączone.\0" + 421 "Odbiór rezultatu rejestracji...\0" + 422 "Przesyłanie informacji o oddzwanianiu...\0" + 423 "Wysyłanie nowego hasła...\0" + 424 "Szacowanie przepustowości łącza...\0" 425 "Sprawdzanie stanu uwierzytelniania...\0" 426 "Rejestrowanie twojego komputera w sieci..\0" 427 "Powtarzanie uwierzytelniania...\0" - 428 "Weryfikacja nazwy uytkownika i hasa...\0" + 428 "Weryfikacja nazwy użytkownika i hasła...\0" 429 "Uwierzytelniono.\0" - 430 "czenie za pomoc %1...\0" + 430 "Łączenie za pomocą %1...\0" 431 "Wybieranie...\0" - 432 "Poczenie modemw...\0" - 433 "Poczenie poprzez kabel...\0" + 432 "Połączenie modemów...\0" + 433 "Połączenie poprzez kabel...\0" 434 "Wybieranie %1...\0" - 435 "Poczenie przez X.25 do %1...\0" + 435 "Połączenie przez X.25 do %1...\0" 436 "Postconnecting through %1...\0" 437 "Preconnecting through %1...\0" - 438 "Poczono.\0" - 439 "Urzdzenie podczone.\0" - 440 "Rozczono.\0" - 441 "Modem poczony.\0" - 442 "Kabel poczony.\0" + 438 "Połączono.\0" + 439 "Urządzenie podłączone.\0" + 440 "Rozłączono.\0" + 441 "Modem połączony.\0" + 442 "Kabel połączony.\0" 443 "Otwieranie portu...\0" - 444 "X.25 poczony.\0" + 444 "X.25 połączony.\0" 445 "Port otwarty.\0" 446 "Postconnect complete.\0" 447 "Preconnect complete.\0" 448 "Przygotowywanie oddzwaniania...\0" - 449 "Sprawdzanie poczenia protokow sieciowych...\0" - 450 "Weryfikacja nazwy uytkownika i hasa...\0" - 451 "Poczono, dodawanie kolejnych linii\0" + 449 "Sprawdzanie połączenia protokołów sieciowych...\0" + 450 "Weryfikacja nazwy użytkownika i hasła...\0" + 451 "Połączono, dodawanie kolejnych linii\0" 452 "Stan nieznany.\0" 453 "Oczekiwanie na oddzwonienie...\0" 454 "Oczekiwanie na reset modemu...\0" - 455 "Czy zmieni numer telefoniczny modemu na stae?\0" + 455 "Czy zmienić numer telefoniczny modemu na stałe?\0" 456 "scp\0" 457 "*.scp\0" - 458 "Pliku skryptw Dial-up (*.scp)\0" - 459 "Przegldaj skrypty Dial-Up\0" - 460 "Musisz zaznaczy przynajmniej jeden modem lub adapter.\0" + 458 "Pliku skryptów Dial-up (*.scp)\0" + 459 "Przeglądaj skrypty Dial-Up\0" + 460 "Musisz zaznaczyć przynajmniej jeden modem lub adapter.\0" 461 "Numer telefoniczny\0" - 462 "Protok TCP/IP jest niezbdny do poczenia z serwerami SLIP.\0" - 463 "Przed poczeniem z serwerami SLIP musisz zainstalowa protok TCP/IP, za pomoc apletu Sieci w Panelu Sterowania.\0" + 462 "Protokół TCP/IP jest niezbędny do połączenia z serwerami SLIP.\0" + 463 "Przed połączeniem z serwerami SLIP musisz zainstalować protokół TCP/IP, za pomocą apletu Sieci w Panelu Sterowania.\0" 464 "Stan\0" 465 "&Nowy sufiks:\0" 466 "&Sufiksy:\0" 467 "Sufiks numeru telefonicznego\0" - 468 "Moesz dostosowa ustawienia specjalne, w razie potrzeby.\0" + 468 "Możesz dostosować ustawienia specjalne, w razie potrzeby.\0" 469 "Ustawienia specjalne\0" - 470 "Terminal wasnych komend Modemu\0" + 470 "Terminal własnych komend Modemu\0" 471 "Terminal po wybraniu\0" 472 "Terminal przed wybraniem\0" 473 "Terminal logowania do SLIP\0" @@ -2102,279 +2103,279 @@ BEGIN 487 "5 sekund\0" 488 "8 godzin\0" 489 "nigdy\0" - 490 "Moesz ustawi to poczenia dla wszystkich uytkownikw albo tylko dla siebie.\0" - 491 "Dostpno poczenia\0" + 490 "Możesz ustawić to połączenia dla wszystkich użytkowników albo tylko dla siebie.\0" + 491 "Dostępność połączenia\0" 492 "Discard multiple line settings for the entry?\0" - 493 "Urzdzenie niedostpne\0" + 493 "Urządzenie niedostępne\0" 494 "Preferencje logowania\0" 495 "Preferencje Dial-up\0" 496 "X.25\0" 497 "X.25 PAD\0" - 498 "Moesz zezwoli innym komputerom na dostp do zasobw poprzez to poczenie dial-up.\0" - 499 "Wybr serwera VPN\0" + 498 "Możesz zezwolić innym komputerom na dostęp do zasobów poprzez to połączenie dial-up.\0" + 499 "Wybór serwera VPN\0" 500 "Cannot enable on-demand dialing.\0" 501 "Jaka jest nazwa albo adres serwera VPN?\0" 502 "Cannot disable on-demand dialing.\0" - 503 "Sie publiczna\0" - 504 "ReactOS moe upewni si, e najpierw poczono si z sieci publiczn.\0" + 503 "Sieć publiczna\0" + 504 "ReactOS może upewnić się, że najpierw połączono się z siecią publiczną.\0" 505 "VPN1\0" 506 "Wsp\0" 507 "You can let a local network access resources through this dial-up connection.\0" 508 "Host or Guest?\0" - 509 "Wspdzielenie cza Internetowego byo do tej pory ustawione na poczenie '%1'.\n\nBdzie teraz ustawione na poczenie '%2'.\0" - 510 "Aby poczy dwa komputery, twj komputer musi by ustawiony jako host albo jako go.\0" - 511 "Z wczonym Wspdzieleniem cza Internetowego, twj adapter LAN adapter zostanie ustawiony na adres IP 192.168.0.1. Twj komputer moe straci poczenie z innymi komputerami w sieci lokalnej. Jeli te komputery maj adresy IP ustawione statycznie, powiniene je ustawi na otrzymywanie adresw IP automatycznie. Czy na pewno chcesz wczy Wspdzielenie cza Internetowego?\0" - 512 "Wybierz urzdzenie\0" - 513 "To urzdzenie zostanie uyte do ustanownienia poczenia.\0" - 514 "&Pocz\0" - 515 "Pozwl by serwer wybra metod szyfrowania\0" + 509 "Współdzielenie Łącza Internetowego było do tej pory ustawione na połączenie '%1'.\n\nBędzie teraz ustawione na połączenie '%2'.\0" + 510 "Aby połączyć dwa komputery, twój komputer musi być ustawiony jako host albo jako gość.\0" + 511 "Z włączonym Współdzieleniem Łącza Internetowego, twój adapter LAN adapter zostanie ustawiony na adres IP 192.168.0.1. Twój komputer może stracić połączenie z innymi komputerami w sieci lokalnej. Jeśli te komputery mają adresy IP ustawione statycznie, powinieneś je ustawić na otrzymywanie adresów IP automatycznie. Czy na pewno chcesz włączyć Współdzielenie Łącza Internetowego?\0" + 512 "Wybierz urządzenie\0" + 513 "To urządzenie zostanie użyte do ustanownienia połączenia.\0" + 514 "&Połącz\0" + 515 "Pozwól by serwer wybrał metodę szyfrowania\0" 516 "Zawsze szyfruj moje dane\0" - 517 "Uyj szyfrowania danych MPPE-40\0" - 518 "Uyj szyfrowania danychMPPE-128\0" - 519 "Bierzce ustawienie szyfrowania wymaga uwierzytelnienia MS-CHAP lub EAP.\0" + 517 "Użyj szyfrowania danych MPPE-40\0" + 518 "Użyj szyfrowania danychMPPE-128\0" + 519 "Bierzące ustawienie szyfrowania wymaga uwierzytelnienia MS-CHAP lub EAP.\0" 520 "Custom Authentication Message\0" - 521 "czenie z %1...\0" - 522 "Nazwa poczenia\0" + 521 "Łączenie z %1...\0" + 522 "Nazwa połączenia\0" 523 "Automagicznie\0" 524 "PPTP VPN\0" 525 "L2TP IPSec VPN\0" - 526 "Wybierz rodzaj poczenia.\0" - 527 "Rodzaj poczenia\0" + 526 "Wybierz rodzaj połączenia.\0" + 527 "Rodzaj połączenia\0" 528 "hh.exe netcfg.chm::/trouble_all.htm\0" - 529 "Wirtualne poczenie prywatne\0" - 530 "Uyj dowolnej metody uwierzytelniania wczajc otwarty tekst. Nie szyfruj danych.\0" - 531 "Uyj dowolnej metody uwierzytelniania, ktra wymaga szyfrowania hasa. Nie szyfruj danych.\0" - 532 "Prosz poda nazw tego wpisu.\0" - 533 "Szyfruj haso i dane.\0" - 534 "Prosz poda numer portu, pomidzy 1 a 65535.\0" - 535 "Ustaw wasne uwierzytelnianie i szyfrowanie danych przyciskiem Ustawienia.\0" - 536 "Uyj dowolnej metody uwierzytelniania, ktra wymaga szyfrowania hasa. Nie szyfruj danych.\0" - 537 "Szyfruj haso i dane.\0" - 538 "Ustaw wasne uwierzytelnianie i szyfrowanie danych przyciskiem Ustawienia.\0" - 539 "Ten numer portu jest ju zajty przez inny wpis.\nProsz uy unikalnego numeru portu.\0" - 540 "Prosz wprowadzi jeden lub wicej numerw portu na odpowiedzi przychodzce.\0" - 541 "Prosz wybra wpis do skasowania.\0" + 529 "Wirtualne połączenie prywatne\0" + 530 "Użyj dowolnej metody uwierzytelniania włączając otwarty tekst. Nie szyfruj danych.\0" + 531 "Użyj dowolnej metody uwierzytelniania, która wymaga szyfrowania hasła. Nie szyfruj danych.\0" + 532 "Proszę podać nazwę tego wpisu.\0" + 533 "Szyfruj hasło i dane.\0" + 534 "Proszę podać numer portu, pomiędzy 1 a 65535.\0" + 535 "Ustaw własne uwierzytelnianie i szyfrowanie danych przyciskiem Ustawienia.\0" + 536 "Użyj dowolnej metody uwierzytelniania, która wymaga szyfrowania hasła. Nie szyfruj danych.\0" + 537 "Szyfruj hasło i dane.\0" + 538 "Ustaw własne uwierzytelnianie i szyfrowanie danych przyciskiem Ustawienia.\0" + 539 "Ten numer portu jest już zajęty przez inny wpis.\nProszę użyć unikalnego numeru portu.\0" + 540 "Proszę wprowadzić jeden lub więcej numerów portu na odpowiedzi przychodzące.\0" + 541 "Proszę wybrać wpis do skasowania.\0" 542 "1 sekunda\0" - 543 "Prosz wybra wpis do edycji.\0" - 549 "Jak si znazywa komputer z ktrym si czysz?\0" + 543 "Proszę wybrać wpis do edycji.\0" + 549 "Jak się znazywa komputer z którym się łączysz?\0" 576 "20 minut\0" - 579 "Wprowad nazw dla poczenia z twoim miejscem pracy.\0" + 579 "Wprowadź nazwę dla połączenia z twoim miejscem pracy.\0" 581 "Ustawienia aplikacji sieciowych\0" - 582 "Wpisz nazw dla tego poczenia w polu poniej.\0" - 583 "Wpisz nazw drugiego komputera w polu poniej.\0" - 584 "Wpisz nazw swojego ISP w polu poniej.\0" - 585 "Jak si nazywa usuga za porednictwem ktrej czysz si z Internetem?\0" - 586 "Prosz wprowadzi adres IP serwera w sieci prywatnej.\0" + 582 "Wpisz nazwę dla tego połączenia w polu poniżej.\0" + 583 "Wpisz nazwę drugiego komputera w polu poniżej.\0" + 584 "Wpisz nazwę swojego ISP w polu poniżej.\0" + 585 "Jak się nazywa usługa za pośrednictwem której łączysz się z Internetem?\0" + 586 "Proszę wprowadzić adres IP serwera w sieci prywatnej.\0" 587 "Ustawienia Zaawansowane\0" - 588 "Nazwa wpisu zaczyna si od kropki albo zawiera niedozwolone znaku. \nWybierz inn nazw.\0" - 589 "Waciwoci\0" + 588 "Nazwa wpisu zaczyna się od kropki albo zawiera niedozwolone znaku. \nWybierz inną nazwę.\0" + 589 "Właściwości\0" 1512 "Port komunikacyjny\0" - 1523 " kana\0" + 1523 " kanał\0" 1526 "Smart Cards\0" - 1527 "Moesz uy swoich smart card z tym poczeniem.\0" - 1528 "Poczenie bezporednie\0" - 1529 "Prosz wybra urzdzenie dla tego poczenia.\0" + 1527 "Możesz użyć swoich smart card z tym połączeniem.\0" + 1528 "Połączenie bezpośrednie\0" + 1529 "Proszę wybrać urządzenie dla tego połączenia.\0" 1530 "Verdana Bold\0" 1531 "12\0" - 1532 "Typ poczenia\0" - 1533 "Wybierz typ interface demand dial, ktry chcesz utworzy.\0" - 1534 "Wybierz urzdzenie\0" - 1535 "To urzdznie bdzie uyte w tym poczeniu.\0" + 1532 "Typ połączenia\0" + 1533 "Wybierz typ interface demand dial, który chcesz utworzyć.\0" + 1534 "Wybierz urządzenie\0" + 1535 "To urządznie będzie użyte w tym połączeniu.\0" 1536 "Numer telefoniczny\0" - 1537 "Wprowad numer telefoniczny serwera zdalnego albo routera z ktrym si czysz.\0" + 1537 "Wprowadź numer telefoniczny serwera zdalnego albo routera z którym się łączysz.\0" 1538 "Rodzaj VPN\0" - 1539 "Wybierz rodzaj inferface VPN, ktry chcesz stworzy.\0" + 1539 "Wybierz rodzaj inferface VPN, który chcesz stworzyć.\0" 1540 "Adres docelowy\0" - 1541 "Jaka jest nazwa bd adres routera zdalnego?\0" + 1541 "Jaka jest nazwa bądź adres routera zdalnego?\0" 1544 "Adres IP\0" 1545 "Ustaw adres IP routera dla tego interface.\0" 1546 "Adres serwera nazw\0" 1547 "Ustaw adres serwera DNS lub WINS dla tego interface.\0" 1548 "Skrypty Routera\0" - 1549 "Moesz ustawi skrypty poczenia z routerem zdalnym.\0" + 1549 "Możesz ustawić skrypty połączenia z routerem zdalnym.\0" 1550 "Dial In Credentials\0" - 1551 "Ustaw nazw uytkownika i haso ktre router zdalny wykorzysta podcza poczenia z tym serwerem.\0" + 1551 "Ustaw nazwę użytkownika i hasło które router zdalny wykorzysta podcza połączenia z tym serwerem.\0" 1552 "Dial Out Credentials\0" - 1553 "Ustaw nazw uytkownika i haso ktre bd wykorzystane podczas poczenia z routerem zdalnym.\0" + 1553 "Ustaw nazwę użytkownika i hasło które będą wykorzystane podczas połączenia z routerem zdalnym.\0" 1554 "Nazwa Interface\0" - 1555 "Wybierz nazw pod ktr bdzie opisany ten interface.\0" - 1556 "Brak dostpnych urzdze\0" - 1557 "Konto uytkownika %1 ju istnieje na tym komputerze. Czy interface Demand Dial powinien zosta skonfigurowany tak by je uywac?\0" - 1558 "Nie ma ustawie protokow bezpieczestwa dla pocze z serwerem SLIP.\0" - 1559 "Zezwl na niezabezpieczone haso\0" - 1560 "Wymagaj zabezpieczonego hasa\0" - 1561 "Uyj smart card\0" - 1562 "Musisz wybra co najmniej jeden protok uwierzytelniania hasa.\0" - 1563 "Nie uywaj szyfrowania (serwer zostanie rozczony, jeli bdzie wymaga szyforwania)\0" - 1564 "Szyfrowanie opcjonalne (pocz take gdy nie ma szyfrowania)\0" - 1565 "Wymagaj szyfrowania (rozcz si jeli serwer nie zapewnia)\0" - 1566 "Wymagaj silnego szyfrowania (rozcz si jeli serwer nie zapewnia)\0" - 1567 " (szyfrowanie wczone)\0" + 1555 "Wybierz nazwę pod którą będzie opisany ten interface.\0" + 1556 "Brak dostępnych urządzeń\0" + 1557 "Konto użytkownika %1 już istnieje na tym komputerze. Czy interface Demand Dial powinien zostać skonfigurowany tak by je używac?\0" + 1558 "Nie ma ustawień protokołów bezpieczeństwa dla połączeń z serwerem SLIP.\0" + 1559 "Zezwól na niezabezpieczone hasło\0" + 1560 "Wymagaj zabezpieczonego hasła\0" + 1561 "Użyj smart card\0" + 1562 "Musisz wybrać co najmniej jeden protokół uwierzytelniania hasła.\0" + 1563 "Nie używaj szyfrowania (serwer zostanie rozłączony, jeśli będzie wymagał szyforwania)\0" + 1564 "Szyfrowanie opcjonalne (połącz także gdy nie ma szyfrowania)\0" + 1565 "Wymagaj szyfrowania (rozłącz się jeśli serwer nie zapewnia)\0" + 1566 "Wymagaj silnego szyfrowania (rozłącz się jeśli serwer nie zapewnia)\0" + 1567 " (szyfrowanie włączone)\0" 1568 "Informacje Konta Internetowego\0" - 1569 "Potrzebujesz nazwy uytkownika i hasa by skorzysta ze swojego Konta Internetowego.\0" - 1570 "Wybrany pakiet EAP nie zawiera kluczy szyfrowania. Wybierz pakiet EAP ktry zawiera klucze szyfrowania albo wycz szyfrowanie.\0" + 1569 "Potrzebujesz nazwy użytkownika i hasła by skorzystać ze swojego Konta Internetowego.\0" + 1570 "Wybrany pakiet EAP nie zawiera kluczy szyfrowania. Wybierz pakiet EAP który zawiera klucze szyfrowania albo wyłącz szyfrowanie.\0" 1571 "Wybrana metoda szyfrowania wymaga szyfrowania logowania EAP albo MS-CHAP.\0" - 1572 "Protokoy i Bezpieczestwo\0" - 1573 "Wybierz transporty i opcje bezpieczestwa dla tego poczenia.\0" - 1574 "Wybrane przez ciebie protokoy zawieraj PAP, SPAP, i/lub CHAP. Jeli ktrykolwiek z nich zostanie uyty, poczenie nie bdzie szyfrowane. Czy chcesz zachowa te ustawienia?\0" - 1575 "Aby poczy si z '%1', najpierw musisz by poczony z '%2'. Czy chcesz si poczy z '%2' w tej chwili?\0" - 1576 "czenie poprzez kabel rwnolegy...\0" - 1577 "czenie poprzez podczerwie...\0" - 1578 "Kabel rwnolegy podczony.\0" - 1579 "Podczerwie podczona.\0" - 1580 "To poczeni zostao skonfigurowane do uycia szyfrowania danych o sile, ktra nie jest obsugiwana przez zainstalowane oprogramowanie. Waciwoci bezpieczestwa zostay zmodyfikowanie do obsugiwanych wartoci siy szyfrowania.\0" + 1572 "Protokoły i Bezpieczeństwo\0" + 1573 "Wybierz transporty i opcje bezpieczeństwa dla tego połączenia.\0" + 1574 "Wybrane przez ciebie protokoły zawierają PAP, SPAP, i/lub CHAP. Jeśli którykolwiek z nich zostanie użyty, połączenie nie będzie szyfrowane. Czy chcesz zachować te ustawienia?\0" + 1575 "Aby połączyć się z '%1', najpierw musisz być połączony z '%2'. Czy chcesz się połączyć z '%2' w tej chwili?\0" + 1576 "Łączenie poprzez kabel równoległy...\0" + 1577 "Łączenie poprzez podczerwień...\0" + 1578 "Kabel równoległy podłączony.\0" + 1579 "Podczerwień podłączona.\0" + 1580 "To połączeni zostało skonfigurowane do użycia szyfrowania danych o sile, która nie jest obsługiwana przez zainstalowane oprogramowanie. Właściwości bezpieczeństwa zostały zmodyfikowanie do obsługiwanych wartości siły szyfrowania.\0" 1581 "R&odzaje VPN:\0" - 1582 "Prosz wprowadzzi nazw uytkownika.\0" - 1583 "Ta nazwa uykownika i haso zostan zapisane dla twojego uytku. Istnieje ju zapisana nazwa uytkownika i haso dla kadego uytkownika do uycia w tym poczeniu. Czy chcesz skasowa nazw uytkownika i haso, przeznaczon dla wszystkich uytkownikw?\0" - 1584 "Na przykad, mgby poda nazw twojego miejsca pracy albo nazw serwera z ktrym si czysz.\0" + 1582 "Proszę wprowadzzić nazwę użytkownika.\0" + 1583 "Ta nazwa użykownika i hasło zostaną zapisane dla twojego użytku. Istnieje już zapisana nazwa użytkownika i hasło dla każdego użytkownika do użycia w tym połączeniu. Czy chcesz skasować nazwę użytkownika i hasło, przeznaczoną dla wszystkich użytkowników?\0" + 1584 "Na przykład, mógłbyć podać nazwę twojego miejsca pracy albo nazwę serwera z którym się łączysz.\0" 1585 "Informacje o koncie\0" - 1586 "Ustawienia w tym oknie waciwoci s niedostpne, jako, e wpierw trzeba zrestartowa system zanim bdzie mona wprowadzi jakiekolwiek zmiany w konfiguracji.\0" - 1587 "Ustawienia w tym oknie waciwoci s niedostpne, jako, e jedno lub wicej innych okien waciwoci Sieci jest ju otwarte. Aby zmieni ustawienia, zamknij wszystkie otwarte okna waciwoci i ponownie otwrz te.\0" - 1588 "Niektre z ustawie w tym oknie waciwoci s niedostpne, gdy nie masz wystarczajcych uprawnie na dostp do nich.\0" - 1589 "Otrzymano nastpujc wiadomo od twojego ISP:\r\n\r\n%1\0" - 1590 "Pocz ponownie z %1\0" - 1591 "Nazwa usugi\0" - 1592 "Jak sie nazywa usuga, dostarczajca twoje cze internetowe?\0" - 1593 "Do zalogowania na twoje konto bdziesz potrzebowa nazwy konta i hasa\0" + 1586 "Ustawienia w tym oknie właściwości są niedostępne, jako, że wpierw trzeba zrestartować system zanim będzie można wprowadzić jakiekolwiek zmiany w konfiguracji.\0" + 1587 "Ustawienia w tym oknie właściwości są niedostępne, jako, że jedno lub więcej innych okien właściwości Sieci jest już otwarte. Aby zmienić ustawienia, zamknij wszystkie otwarte okna właściwości i ponownie otwórz te.\0" + 1588 "Niektóre z ustawień w tym oknie właściwości są niedostępne, gdyż nie masz wystarczających uprawnień na dostęp do nich.\0" + 1589 "Otrzymano następującą wiadomość od twojego ISP:\r\n\r\n%1\0" + 1590 "Połącz ponownie z %1\0" + 1591 "Nazwa usługi\0" + 1592 "Jak sie nazywa usługa, dostarczająca twoje łącze internetowe?\0" + 1593 "Do zalogowania na twoje konto będziesz potrzebować nazwy konta i hasła\0" 1594 "PPPOE1-0\0" 1595 "Point-to-Point Protocol over Ethernet (PPPoE)\0" - 1596 "Rodzaj cza &szerokopasmowego, ktre uywasz:\0" - 1611 "cze szerokopasmowe\0" - 1612 "Wybrae uycie klucza preshared ale nie wprowadzie adnego. \nProsz wprowadzi klucz preshared.\0" - 1613 "Nie mona wysa danych do uwierzytelnienia\0" - 1634 "Z powodu wyczenia usugi Instrumentacji Zarzdzania Windows (WMI), nie moe wywietli waciwoci tego poczenia albo sieci lokalnej.\n\nAby uzyska dostp do waciwoci, musisz wpierw uruchomi usug WMI.\0" - 1635 "ReactOS nie moe wywietli waciwoci tego poczenia. Informacja w Instrumentacji Zarzdzania Windows (WMI) moe by uszkodzona. Aby to poprawi, uyj Odtwarzania Systemu, by odtworzy ReactOS z wczeniejszego momentu (punktu odtwarzania).\0" - 1646 "Zezwl na przychodzce zapytania ECHO\0" - 1647 "Zezwl na przychodzce zapytania timestamp\0" - 1648 "Zezwl na przychodzce zapytania mask\0" - 1649 "Zezwl na przychodzce zapytania o router\0" - 1650 "Zezwl na wychodzce destination unreachable\0" - 1651 "Zezwl na wychodzce source quench\0" - 1652 "Zezwl na wychodzce parameter problem\0" - 1653 "Zezwl na wychodzce time exceeded\0" - 1654 "Zezwl na przekierowanie\0" + 1596 "Rodzaj łącza &szerokopasmowego, które używasz:\0" + 1611 "Łącze szerokopasmowe\0" + 1612 "Wybrałeś użycie klucza preshared ale nie wprowadziłeś żadnego. \nProszę wprowadzić klucz preshared.\0" + 1613 "Nie można wysłać danych do uwierzytelnienia\0" + 1634 "Z powodu wyłączenia usługi Instrumentacji Zarządzania Windows (WMI), nie może wyświetlić właściwości tego połączenia albo sieci lokalnej.\n\nAby uzyskać dostęp do właściwości, musisz wpierw uruchomić usługę WMI.\0" + 1635 "ReactOS nie może wyświetlić właściwości tego połączenia. Informacja w Instrumentacji Zarządzania Windows (WMI) może być uszkodzona. Aby to poprawić, użyj Odtwarzania Systemu, by odtworzyć ReactOS z wcześniejszego momentu (punktu odtwarzania).\0" + 1646 "Zezwól na przychodzące zapytania ECHO\0" + 1647 "Zezwól na przychodzące zapytania timestamp\0" + 1648 "Zezwól na przychodzące zapytania mask\0" + 1649 "Zezwól na przychodzące zapytania o router\0" + 1650 "Zezwól na wychodzące destination unreachable\0" + 1651 "Zezwól na wychodzące source quench\0" + 1652 "Zezwól na wychodzące parameter problem\0" + 1653 "Zezwól na wychodzące time exceeded\0" + 1654 "Zezwól na przekierowanie\0" 1655 "log\0" 1656 "*.log\0" - 1657 "Pliki logw Firewalla (*.log)\0" - 1658 "Przegldaj\0" - 1663 "Wybierz poczenie z sieci lokaln\0" - 1664 "Aby wczy Wspdzielenie cza Internetowego, musisz wybra poczenie dla sieci lokalnej. Prosz je wybra z listy dostpnych pocze.\0" - 1665 "Wiadomoci wysane do tego komputera bd jednoczenie odsyane do nadawcw. Jest to zwykle uywane do rozwizywania problemw z poczeniem.\0" - 1666 "Dane wysane do tego komputera mog by potwierdzane w specjalnej wiadomoci, zawierajcej czas dostarczenia tych danych.\0" - 1667 "Ten komputer bdzie nasuchiwa i odpowiada na dania informacji o sieci publicznej, do ktrej jest podczony.\0" - 1668 "Ten komputer bdzie odpowiada na dania informacji dotyczcych znanych mu tras.\0" - 1669 "Dane, wysane przez Internet, ktre nie dotr do tego komputera z powodu bdw zostan odrzucone z odesaniem komunikatu ""destination unreachable"" o przyczynach bdw.\0" - 1670 "Kiedy zdolno tego komputera do przetwarzania napywajcych danych nie bdzie w stanie nady za prdkoci transmisji, dane zostan odrzucone a wysyajcy dostanie wiadomo z prob o zmniejszenie prdkoci.\0" - 1671 "Kiedy ten komputer odrzuca otrzymane dane z powodu bdnego nagwka, wyle on do nadawcy wiadomo o bdzie ""bad header"".\0" - 1672 "Kiedy ten komputer odrzuca niekompletne dane z poczenia, jako, e caa transmisja danych wymagaa wicej czasu ni byo przeznaczone, wyle on do nadawcy wiadomo o bdzie ""time expired"".\0" - 1673 "Dane wysane z tego komputera bd przekierowane, gdy zmieni si domylna trasa.\0" - 1675 "Warto podana jako rozmiar pliku logw. Podaj warto od 1 and 32767 k.\0" - 1685 "Twoje konto uytkownika nie ma dostatecznych uprawnie by uywa tego poczenia. Zwykle dzieje sie tak gdy jeste zalogowany jako Go.\0" - 1686 "Wprowad nazw uytkownika i haso. (Jeli zapomniae nazwy uytkownika lub hasa, skontaktuj si z twoim administratorem sieci.)\0" + 1657 "Pliki logów Firewalla (*.log)\0" + 1658 "Przeglądaj\0" + 1663 "Wybierz połączenie z siecią lokalną\0" + 1664 "Aby włączyć Współdzielenie Łącza Internetowego, musisz wybrać połączenie dla sieci lokalnej. Proszę je wybrać z listy dostępnych połączeń.\0" + 1665 "Wiadomości wysłane do tego komputera będą jednocześnie odsyłane do nadawców. Jest to zwykle używane do rozwiązywania problemów z połączeniem.\0" + 1666 "Dane wysłane do tego komputera mogą być potwierdzane w specjalnej wiadomości, zawierającej czas dostarczenia tych danych.\0" + 1667 "Ten komputer będzie nasłuchiwał i odpowiadał na żądania informacji o sieci publicznej, do której jest podłączony.\0" + 1668 "Ten komputer będzie odpowiadał na żądania informacji dotyczących znanych mu tras.\0" + 1669 "Dane, wysłane przez Internet, które nie dotrą do tego komputera z powodu błędów zostaną odrzucone z odesłaniem komunikatu ""destination unreachable"" o przyczynach błędów.\0" + 1670 "Kiedy zdolność tego komputera do przetwarzania napływających danych nie będzie w stanie nadążyć za prędkością transmisji, dane zostaną odrzucone a wysyłający dostanie wiadomość z prośbą o zmniejszenie prędkości.\0" + 1671 "Kiedy ten komputer odrzuca otrzymane dane z powodu błędnego nagłówka, wyśle on do nadawcy wiadomość o błędzie ""bad header"".\0" + 1672 "Kiedy ten komputer odrzuca niekompletne dane z połączenia, jako, że cała transmisja danych wymagała więcej czasu niż było przeznaczone, wyśle on do nadawcy wiadomość o błędzie ""time expired"".\0" + 1673 "Dane wysłane z tego komputera będą przekierowane, gdy zmieni się domyślna trasa.\0" + 1675 "Wartość podana jako rozmiar pliku logów. Podaj wartość od 1 and 32767 k.\0" + 1685 "Twoje konto użytkownika nie ma dostatecznych uprawnień by używać tego połączenia. Zwykle dzieje sie tak gdy jesteś zalogowany jako Gość.\0" + 1686 "Wprowadź nazwę użytkownika i hasło. (Jeśli zapomniałeś nazwy użytkownika lub hasła, skontaktuj się z twoim administratorem sieci.)\0" 1687 "&Nazwa komputera\0" 1688 "Nazwa &ISP\0" 1689 "Nazwa &firmy\0" - 1690 "Jaki jest numer telefoniczny, za pomoc ktrego si czysz?\n\0" - 7301 "Waciwoci przychodzcych pocze TCP/IP\0" - 7302 "Musisz wybra warto pomidzy %1 a %2 dla tego pola.\0" - 7306 "Bd Pocze Przychodzcych\0" - 7307 "Oglny bd Pocze Przychodzcych\0" - 7308 "Pocze Przychodzcych\0" - 7309 "Bd sieciowy Pocze Przychodzcych\0" - 7310 "Bd stanu Multilik Pocze Przychodzcych\0" - 7311 "Bd Pocze Przychodzcych\0" - 7312 "Bd inicjalizacji Pocze Przychodzcych\0" - 7313 "Bd waciwoci TCP/IP Pocze Przychodzcych\0" - 7314 "Bd waciwoci IPX Pocze Przychodzcych\0" - 7315 "Bd Pocze Przychodzcych\0" - 7316 "Domylne\0" - 7317 "Urzdzenie\0" + 1690 "Jaki jest numer telefoniczny, za pomocą którego się łączysz?\n\0" + 7301 "Właściwości przychodzących połączeń TCP/IP\0" + 7302 "Musisz wybrać wartość pomiędzy %1 a %2 dla tego pola.\0" + 7306 "Błąd Połączeń Przychodzących\0" + 7307 "Ogólny błąd Połączeń Przychodzących\0" + 7308 "Połączeń Przychodzących\0" + 7309 "Błąd sieciowy Połączeń Przychodzących\0" + 7310 "Błąd stanu Multilik Połączeń Przychodzących\0" + 7311 "Błąd Połączeń Przychodzących\0" + 7312 "Błąd inicjalizacji Połączeń Przychodzących\0" + 7313 "Błąd właściwości TCP/IP Połączeń Przychodzących\0" + 7314 "Błąd właściwości IPX Połączeń Przychodzących\0" + 7315 "Błąd Połączeń Przychodzących\0" + 7316 "Domyślne\0" + 7317 "Urządzenie\0" 7318 "Pomocnicza baza danych\0" - 7319 "Baza danych Uytkownikw\0" - 7320 "Baza danych Protokow\0" - 7321 "Musisz wprowadzi nazw logowania nowego uytkownika albo nacisn Anuluj.\0" - 7322 "Wprowadzone haso jest zbyt krtkie.\0" - 7323 "Oba wprowadzone hasa nie s identyczne. Prosz je poprawi.\0" - 7324 "Wystpi bd wewntrzny. \0" + 7319 "Baza danych Użytkowników\0" + 7320 "Baza danych Protokołów\0" + 7321 "Musisz wprowadzić nazwę logowania nowego użytkownika albo nacisnąć Anuluj.\0" + 7322 "Wprowadzone hasło jest zbyt krótkie.\0" + 7323 "Oba wprowadzone hasła nie są identyczne. Proszę je poprawić.\0" + 7324 "Wystąpił błąd wewnętrzny. \0" 7325 "Listview\0" - 7326 "Wystpi bd podczas przesyania wprowadzonych zmian do bazy danych uytkownika lokalnego. \0" - 7327 "Nie masz dostatecznych przywilejw by doda uytkownika do lokalnej systemowej bazy danych. \0" - 7328 "Uytkownik, ktrego chcesz stworzy, ju istnieje w lokalnej bazie danych uytkownikw.\0" - 7329 "Uytkownik nie zosta dodany do lokalnej bazy danych uytkownikw, dlatego, e jego haso zostao odrzucone.\0" - 7330 "Nie mona przeadowa systemowej bazy danych uytkownikw z powodu bdu wewntrznego.\0" - 7331 "Wystpi bd wewntrzny: Handle lokalnej bazy danych uytkownikw jest uszkodzony.\0" - 7332 "Nie udao si zaadowa zasobw, niezbdnych do wywietlenia zakadki Uytkownicy.\0" - 7333 "Wystpi bd wewnytrzny podczas odwracania zmian, uczynionych w lokalnej bazie danych uytkownikw. \0" - 7334 "Handle bazy danych urzdze jest uszkodzony.\0" - 7335 "Nie udao si zaadowa zasobw, niezbdnych do wywietlenia zakadki Oglne.\0" - 7336 "Nastpi bd podczas zapisywania zmian jakie dokonane zostay w Urzdzeniach/VPN. \0" - 7337 "Wystpi bd wewntrzny.\0" - 7338 "Wystpi bd wewntrzny: Handle bazy danych komponentw sieci jest uszkodzony.\0" - 7339 "Wystpi bd wewntrzny. \0" - 7340 "Wystpi bd pocdczas zapisywania zmian, uczynionych w komponentach sieci.\0" - 7341 "Wystpi bd wewntrzny.\0" - 7342 "Nie mona zapisa zmian dokonanych w protokole TCP/IP. \0" - 7343 "Nie mona zapisa zmian dokonanych w protokole IPX. \0" - 7344 "Nie mona wywietli waciwoci TCP/IP.\0" - 7345 "Nie mona wywietli waciwoci IPX.\0" - 7346 "Nie mona zaadowa waciwoci TCP/IP. \0" - 7347 "Nie mona zaadowa waciwoci IPX. \0" - 7348 "Poczenia przychodzce zale od usugi Routingu i Dostpu Zdalnego, ktrej to nie dao si uruchomi. Wicej informacji znajdziesz w logach Zdarze Systemowych.\0" - 7349 "Nie mona zezwoli na edycj komponentw sieci w danej chwili, gdy wanie s modyfikowane przez kogo innego.\0" - 7350 "Nowoutworzony uytkownik nie zosta dodany do lokalnej bazy danych uytkownikw dlatego, e jego nazwa albo haso nie byo zgodne z wymaganiami systemu (byo zbyt due, za mae, albo le sformuowane). \0" - 7351 "System nie moe usun wybranego uytkownika. \0" - 7352 "Nie mona usun wybranego komponentu sieci, poniewa jest on obecnie uywany.\0" - 7353 "Ostrzeenie o poczeniu przychodzcym\0" - 7354 "Kady skasowany uytkownik zostanie trwale usunity z systemu, nawet jeli naciniesz pniej Anuluj. Czy na pewno chcesz trwale usun %s? \0" - 7355 "Masz zamiar si przeczy na konsol zarzdzania systemem. Te okno waciwoci Pocze przychodzcych zostanie zamknite a wszystkie dokonane zmiany - zapisane w systemie. Czy kontynuowa?\0" - 7356 "Twoja Maska Podsieci ulega zmianie. Po bicie zerowym w Masce mog nastpi wycznie bity zerowe. Na przykad, Maska, wyraona w zapisie dziesitnym jako 255.255.0.0, jest prawidowa, ale 255.0.255.0 ju nie. \n\0" - 7357 "Dopuszczenie Uytkownikw\0" - 7358 "Moesz wyznaczy uytkownikw, ktrzy bd mogli si poczy z tym komputerem.\0" - 7359 "Urzdzenia dla pocze przychodzcych\0" - 7360 "Moesz wybra urzdzenia jakich komputer uyje do obsugi pocze przychodzcych.\0" - 7361 "Przychodzce poczenie Wirtualnych Sieci Prywatnych (VPN)\0" - 7362 "Inny komputer moe poczy si z twoim za porednictwem poczenia VPN\0" + 7326 "Wystąpił błąd podczas przesyłania wprowadzonych zmian do bazy danych użytkownika lokalnego. \0" + 7327 "Nie masz dostatecznych przywilejów by dodać użytkownika do lokalnej systemowej bazy danych. \0" + 7328 "Użytkownik, którego chcesz stworzyć, już istnieje w lokalnej bazie danych użytkowników.\0" + 7329 "Użytkownik nie został dodany do lokalnej bazy danych użytkowników, dlatego, że jego hasło zostało odrzucone.\0" + 7330 "Nie można przeładować systemowej bazy danych użytkowników z powodu błędu wewnętrznego.\0" + 7331 "Wystąpił błąd wewnętrzny: Handle lokalnej bazy danych użytkowników jest uszkodzony.\0" + 7332 "Nie udało się załadować zasobów, niezbędnych do wyświetlenia zakładki Użytkownicy.\0" + 7333 "Wystąpił błąd wewnęytrzny podczas odwracania zmian, uczynionych w lokalnej bazie danych użytkowników. \0" + 7334 "Handle bazy danych urządzeń jest uszkodzony.\0" + 7335 "Nie udało się załadować zasobów, niezbędnych do wyświetlenia zakładki Ogólne.\0" + 7336 "Nastąpił błąd podczas zapisywania zmian jakie dokonane zostały w Urządzeniach/VPN. \0" + 7337 "Wystąpił błąd wewnętrzny.\0" + 7338 "Wystąpił błąd wewnętrzny: Handle bazy danych komponentów sieci jest uszkodzony.\0" + 7339 "Wystąpił błąd wewnętrzny. \0" + 7340 "Wystąpił błąd pocdczas zapisywania zmian, uczynionych w komponentach sieci.\0" + 7341 "Wystąpił błąd wewnętrzny.\0" + 7342 "Nie można zapisać zmian dokonanych w protokole TCP/IP. \0" + 7343 "Nie można zapisać zmian dokonanych w protokole IPX. \0" + 7344 "Nie można wyświetlić właściwości TCP/IP.\0" + 7345 "Nie można wyświetlić właściwości IPX.\0" + 7346 "Nie można załadować właściwości TCP/IP. \0" + 7347 "Nie można załadować właściwości IPX. \0" + 7348 "Połączenia przychodzące zależą od usługi Routingu i Dostępu Zdalnego, której to nie dało się uruchomić. Więcej informacji znajdziesz w logach Zdarzeń Systemowych.\0" + 7349 "Nie można zezwolić na edycję komponentów sieci w danej chwili, gdyż właśnie są modyfikowane przez kogoś innego.\0" + 7350 "Nowoutworzony użytkownik nie został dodany do lokalnej bazy danych użytkowników dlatego, że jego nazwa albo hasło nie było zgodne z wymaganiami systemu (było zbyt duże, za małe, albo źle sformułowane). \0" + 7351 "System nie może usunąć wybranego użytkownika. \0" + 7352 "Nie można usunąć wybranego komponentu sieci, ponieważ jest on obecnie używany.\0" + 7353 "Ostrzeżenie o połączeniu przychodzącym\0" + 7354 "Każdy skasowany użytkownik zostanie trwale usunięty z systemu, nawet jeśli naciśniesz później Anuluj. Czy na pewno chcesz trwale usunąć %s? \0" + 7355 "Masz zamiar się przełączyć na konsolę zarządzania systemem. Te okno właściwości Połączeń przychodzących zostanie zamknięte a wszystkie dokonane zmiany - zapisane w systemie. Czy kontynuować?\0" + 7356 "Twoja Maska Podsieci uległa zmianie. Po bicie zerowym w Masce mogą nastąpić wyłącznie bity zerowe. Na przykład, Maska, wyrażona w zapisie dziesiętnym jako 255.255.0.0, jest prawidłowa, ale 255.0.255.0 już nie. \n\0" + 7357 "Dopuszczenie Użytkowników\0" + 7358 "Możesz wyznaczyć użytkowników, którzy będą mogli się połączyć z tym komputerem.\0" + 7359 "Urządzenia dla połączeń przychodzących\0" + 7360 "Możesz wybrać urządzenia jakich komputer użyje do obsługi połączeń przychodzących.\0" + 7361 "Przychodzące połączenie Wirtualnych Sieci Prywatnych (VPN)\0" + 7362 "Inny komputer może połączyć się z twoim za pośrednictwem połączenia VPN\0" 7363 "Aplikacje sieciowe\0" - 7364 "Aplikacje sieciowe pozwala temu komputerowi na odbir pocze z innych komputerw.\0" - 7365 "Zakaczanie Kreatora konfiguracji poczenia\0" + 7364 "Aplikacje sieciowe pozwalaą temu komputerowi na odbiór połączeń z innych komputerów.\0" + 7365 "Zakańczanie Kreatora konfiguracji połączenia\0" 7366 " \0" - 7367 "Poczenia przychodzce\0" - 7371 "Nie zainstalowano adnego urzdzenia, zdolnego do odbioru pocze.\0" + 7367 "Połączenia przychodzące\0" + 7371 "Nie zainstalowano żadnego urządzenia, zdolnego do odbioru połączeń.\0" 7372 " \0" 7373 "Przydziel &ustalony numer adresu sieciowego:\0" - 7374 "Przydziel &numery adresw sieciowych sekwencyjnie od:\0" - 7375 "Nowy uytkownik\0" - 7376 "Urzdzenie sieciowe\0" - 7377 "Ktrego urzdzenia chcesz uy w tym poczeniu?\0" - 7378 "Nie ma obecnie adnych urzdze zainstalowanych, ktre byyby w stanie przyj poczenia przychodzce.\0" - 7379 "Ostrzeenie o nowym poczeniu przychodzcym\0" - 7380 "Poniewa ten Serwer Win 2000 naley do, albo kontroluje domen, musisz uy konsoli Routingu i Dostpu Zdalnego by skonfigurowa t maszyn tak by akceptowaa poczenia przychodzce. Anulowa zmiany i wczy t konsol?\n\0" + 7374 "Przydziel &numery adresów sieciowych sekwencyjnie od:\0" + 7375 "Nowy użytkownik\0" + 7376 "Urządzenie sieciowe\0" + 7377 "Którego urządzenia chcesz użyć w tym połączeniu?\0" + 7378 "Nie ma obecnie żadnych urządzeń zainstalowanych, które byłyby w stanie przyjąć połączenia przychodzące.\0" + 7379 "Ostrzeżenie o nowym połączeniu przychodzącym\0" + 7380 "Ponieważ ten Serwer Win 2000 należy do, albo kontroluje domenę, musisz użyć konsoli Routingu i Dostępu Zdalnego by skonfigurować tą maszynę tak by akceptowała połączenia przychodzące. Anulować zmiany i włączyć tą konsolę?\n\0" 7381 "Przydziel &numer adresu automagicznie\0" 7382 "Przydziel n&umer adresu automagicznie\0" - 7383 "Poczenia przychodzce nie mog uywa adresw IPX o numerach 00000000 lub FFFFFFFF. Prosz zmieni przydzielone numery adresw albo ustawi automagiczne przydzielanie numerw.\0" + 7383 "Połączenia przychodzące nie mogą używać adresów IPX o numerach 00000000 lub FFFFFFFF. Proszę zmienić przydzielone numery adresów albo ustawić automagiczne przydzielanie numerów.\0" 7384 "do\0" 7385 "Port Komunikacyjny (%s)\0" - 7386 "Poczenia Sieciowe nie wywietlaj niektrych zaawansowanych opcji dla pocze przychodzcych, ktre mona ustawi za pomc konsol Menedera Uytkownika Lokalnego albo Zdalnego Dostpu do Ustawie Remote. Aby uzyska aktualne i szczegowe informacje o poczeniach przychodzcych, bdziesz musia uy tych konsol.\0" - 7387 "Wasny tryb oddzwaniania, ktry wybrae, wymaga wprowadzenia waciwego numeru oddzwaniania.\0" - 7388 "ReactOS musi zrestartowa system by dokoczy konfiguracj. Czy mona zrestartowa w tej cwili?\0" - 7389 "Obecnie wybrane urzdzenie nie posiada adnych opcji konfiguracji.\0" - 7390 "Nieprawidowy zasig\0" - 7391 "Chcesz wyczy '%1' dla Pocze Przychodzcych.W tym celu musisz wpierw zatrzyma usug 'Serwer'. Po zatrzymaniu, aden z udostpnionych katalogw czy drukarek na tym komputerze nie bdzie dostpny dla innych komputerw. Czy chcesz wywoa konsol systemow ktra pozwoli ci zatrzyma usug 'Serwer'?\r\n\nW Zarzdzanie Komputerem kliknij na Narzdzia Systemowe a nastpnie na Usugi. W prawym panelu kliknij prawym przyciskiem na usug 'Serwer' a nastpnie na 'Zatrzymaj'.\0" - 7392 "Ten port szeregowy nie zosta ustawiony do uycia w bezporednim pozeniu z innym komputerem. Zostanie on ustawiony za pomoc kreatora konfiguracji. Aby uruchomi kreatora, nacinij prawym przyciskiem na ikon poczenia i wybierz Waciwoci.\n\0" - 7393 "Poczenia Przychodzce\0" - 7394 "Wprowadzona pula adresw IP jest nieprawidowa.\0" - 7395 "Podana maska podsieci jest nieprawidowa.\0" - 7396 "Adres startowy wprowadzonej puli TCP/IP jest nieprawidowy. Musi on znajdowa si pomidzy 1.0.0.0 a 224.0.0.0 i nie moe mie postaci 127.x.x.x.\0" - 7397 "Wprowadzona pula adresw TCP/IP jest nieprawidowa, gdy jest dokadniejsza ni maska podsieci.\0" - 7398 "Adres startowy musi by mniejszy ni kocowy\0" - 7399 "Usuga Routingu i Dostpu Zdalnego jest wanie zatrzymywana. Do czasu jej zatrzymania, Poczenia Przychodzce nie s dostpne. Prosz sprbowa ponownie za kilka chwil.\0" + 7386 "Połączenia Sieciowe nie wyświetlają niektórych zaawansowanych opcji dla połączeń przychodzących, które można ustawić za pomcą konsol Menedźera Użytkownika Lokalnego albo Zdalnego Dostępu do Ustawień Remote. Aby uzyskać aktualne i szczegółowe informacje o połączeniach przychodzących, będziesz musiał użyć tych konsol.\0" + 7387 "Własny tryb oddzwaniania, który wybrałeś, wymaga wprowadzenia właściwego numeru oddzwaniania.\0" + 7388 "ReactOS musi zrestartować system by dokończyć konfigurację. Czy można zrestartować w tej cwili?\0" + 7389 "Obecnie wybrane urządzenie nie posiada żadnych opcji konfiguracji.\0" + 7390 "Nieprawidłowy zasięg\0" + 7391 "Chcesz wyłączyć '%1' dla Połączeń Przychodzących.W tym celu musisz wpierw zatrzymać usługę 'Serwer'. Po zatrzymaniu, żaden z udostępnionych katalogów czy drukarek na tym komputerze nie będzie dostępny dla innych komputerów. Czy chcesz wywołać konsolę systemową która pozwoli ci zatrzymać usługę 'Serwer'?\r\n\nW Zarządzanie Komputerem kliknij na Narzędzia Systemowe a następnie na Usługi. W prawym panelu kliknij prawym przyciskiem na usługę 'Serwer' a następnie na 'Zatrzymaj'.\0" + 7392 "Ten port szeregowy nie został ustawiony do użycia w bezpośrednim połąćzeniu z innym komputerem. Zostanie on ustawiony za pomocą kreatora konfiguracji. Aby uruchomić kreatora, naciśnij prawym przyciskiem na ikonę połączenia i wybierz Właściwości.\n\0" + 7393 "Połączenia Przychodzące\0" + 7394 "Wprowadzona pula adresów IP jest nieprawidłowa.\0" + 7395 "Podana maska podsieci jest nieprawidłowa.\0" + 7396 "Adres startowy wprowadzonej puli TCP/IP jest nieprawidłowy. Musi on znajdować się pomiędzy 1.0.0.0 a 224.0.0.0 i nie może mieć postaci 127.x.x.x.\0" + 7397 "Wprowadzona pula adresów TCP/IP jest nieprawidłowa, gdyż jest dokładniejsza niż maska podsieci.\0" + 7398 "Adres startowy musi być mniejszy niż końcowy\0" + 7399 "Usługa Routingu i Dostępu Zdalnego jest właśnie zatrzymywana. Do czasu jej zatrzymania, Połączenia Przychodzące nie są dostępne. Proszę spróbować ponownie za kilka chwil.\0" 7400 "%s (%s)\0" - 7401 "%s (%d kanaw)\0" - 7402 "Poczenia Przychodzce VPN (PPTP)\0" - 7403 "Poczenia Przychodzce VPN (L2TP)\0" - 7404 "Bezpieczestwo IP(IKE)\0" + 7401 "%s (%d kanałów)\0" + 7402 "Połączenia Przychodzące VPN (PPTP)\0" + 7403 "Połączenia Przychodzące VPN (L2TP)\0" + 7404 "Bezpieczeństwo IP(IKE)\0" 7405 "127.0.0.1\0" - 7406 "Nie masz wystarczajcych przywilejw by ustawic Poczenia Przychodzce\0" - 29900 "Nie mona zaadowa usugi Menedera Dostpu Zdalnego.\0" - 29901 "Nie mona zaadowa pliku MPRAPI.DLL z katalogu system32.\0" + 7406 "Nie masz wystarczających przywilejów by ustawic Połączenia Przychodzące\0" + 29900 "Nie można załadować usługi Menedżera Dostępu Zdalnego.\0" + 29901 "Nie można załadować pliku MPRAPI.DLL z katalogu system32.\0" END diff --git a/dll/win32/rasdlg/lang/ru-RU.rc b/dll/win32/rasdlg/lang/ru-RU.rc index c20351d5e04..4d828d26a5c 100644 --- a/dll/win32/rasdlg/lang/ru-RU.rc +++ b/dll/win32/rasdlg/lang/ru-RU.rc @@ -2,342 +2,342 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 102 DIALOGEX 0, 0, 255, 265 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Дополнительные номера телефонов" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , .", 1018, 7, 5, 243, 16 - LTEXT " &:", 1019, 7, 27, 238, 8 + LTEXT "Укажите дополнительные номера телефонов, которые вы хотели бы использовать для установления этого подключения.", 1018, 7, 5, 243, 16 + LTEXT "Номера &телефонов:", 1019, 7, 27, 238, 8 CONTROL "", 1012, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000848D, 7, 38, 217, 144 - PUSHBUTTON "&", 1017, 230, 40, 18, 16, BS_ICON - PUSHBUTTON "&", 1015, 230, 61, 18, 16, BS_ICON - PUSHBUTTON "&...", 1013, 7, 187, 70, 14 - PUSHBUTTON "&...", 1016, 81, 187, 70, 14 - PUSHBUTTON "&", 1014, 154, 187, 70, 14 - AUTOCHECKBOX "& ", 1011, 8, 210, 243, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1010, 8, 228, 243, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Вверх", 1017, 230, 40, 18, 16, BS_ICON + PUSHBUTTON "Вни&з", 1015, 230, 61, 18, 16, BS_ICON + PUSHBUTTON "&Добавить...", 1013, 7, 187, 70, 14 + PUSHBUTTON "&Изменить...", 1016, 81, 187, 70, 14 + PUSHBUTTON "&Удалить", 1014, 154, 187, 70, 14 + AUTOCHECKBOX "&При сбое пытаться соединиться по следующему номеру", 1011, 8, 210, 243, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "П&ереносить успешно набранный номер в начало списка", 1010, 8, 228, 243, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 122, 245, 60, 14 - PUSHBUTTON "", 2, 188, 245, 60, 14 + PUSHBUTTON "Отмена", 2, 188, 245, 60, 14 END 103 DIALOGEX 6, 18, 250, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Сетевые подключения" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", 1029, 5, 5, 241, 35, NOT WS_GROUP - LTEXT "&:", -1, 5, 46, 238, 10 + LTEXT "&Подключения:", -1, 5, 46, 238, 10 CONTROL "List1", 1677, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 5, 57, 240, 57 - AUTOCHECKBOX "& ", 1022, 8, 125, 235, 10 - PUSHBUTTON "&", 1026, 7, 149, 60, 14 - DEFPUSHBUTTON "&...", 1024, 117, 149, 60, 14 - PUSHBUTTON "", 1025, 183, 149, 60, 14 + AUTOCHECKBOX "&Не спрашивать до следующей загрузки", 1022, 8, 125, 235, 10 + PUSHBUTTON "П&араметры", 1026, 7, 149, 60, 14 + DEFPUSHBUTTON "Под&ключить...", 1024, 117, 149, 60, 14 + PUSHBUTTON "Отмена", 1025, 183, 149, 60, 14 END 104 DIALOGEX 6, 18, 269, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Ошибки группы линий" FONT 8, "MS Shell Dlg" BEGIN ICON 32516, 1031, 7, 7, 20, 20 - LTEXT " . ", 1033, 37, 8, 216, 20 + LTEXT "Некоторые из дополнительных линий не подключены. ", 1033, 37, 8, 216, 20 CONTROL "", 1032, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00008401, 37, 83, 224, 136 - AUTOCHECKBOX "& ", 1030, 38, 226, 222, 10 - DEFPUSHBUTTON "&", 1, 135, 242, 60, 14 - PUSHBUTTON "&", 2, 201, 242, 60, 14 - LTEXT " , , , . "" "".", -1, 37, 36, 224, 44 + AUTOCHECKBOX "Н&е использовать отказавшие линии", 1030, 38, 226, 222, 10 + DEFPUSHBUTTON "&Принять", 1, 135, 242, 60, 14 + PUSHBUTTON "&Завершить", 2, 201, 242, 60, 14 + LTEXT "Если связь установлена только по одной линии, то сервер, вероятно, не поддерживает связь по нескольким каналам. В этом случае установите флажок ""Не использовать отказавшие линии"".", -1, 37, 36, 224, 44 END 105 DIALOGEX 0, 0, 261, 253 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Дополнительные параметры безопасности" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1547, 7, 33, 246, 191 - LTEXT "& :", 1546, 7, 5, 247, 10 + GROUPBOX "Безопасный вход", 1547, 7, 33, 246, 191 + LTEXT "&Шифрование данных:", 1546, 7, 5, 247, 10 COMBOBOX 1495, 7, 17, 247, 76, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTORADIOBUTTON "& (EAP)", 1544, 17, 47, 226, 8, WS_GROUP - LTEXT " EAP", -1, 18, 64, 35, 8, NOT WS_VISIBLE | NOT WS_GROUP + AUTORADIOBUTTON "П&ротокол расширенной проверки подлинности (EAP)", 1544, 17, 47, 226, 8, WS_GROUP + LTEXT "Тип EAP", -1, 18, 64, 35, 8, NOT WS_VISIBLE | NOT WS_GROUP COMBOBOX 1034, 53, 62, 191, 42, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1035, 184, 77, 60, 14 - AUTORADIOBUTTON " & ", 1545, 17, 92, 224, 10 - AUTOCHECKBOX "& ()", 1491, 28, 105, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTOCHECKBOX "& Shiva (SPAP)", 1496, 28, 119, 214, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& (CHAP)", 1494, 28, 133, 215, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& MS (MS-CHAP)", 1493, 28, 148, 212, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& MS-CHAP Win 95", 200, 46, 162, 198, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& MS (MS-CHAP v2)", 1492, 28, 176, 200, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "Сво&йств", 1035, 184, 77, 60, 14 + AUTORADIOBUTTON "Разрешить сле&дующие протоколы", 1545, 17, 92, 224, 10 + AUTOCHECKBOX "&Незашифрованный пароль (РАР)", 1491, 28, 105, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Про&токол проверки пароля Shiva (SPAP)", 1496, 28, 119, 214, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Пр&отокол проверки пароля (CHAP)", 1494, 28, 133, 215, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Протокол проверки пароля MS (MS-CHAP)", 1493, 28, 148, 212, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Ра&зрешить старый протокол MS-CHAP для Win 95", 200, 46, 162, 198, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Прото&кол проверки пароля MS (MS-CHAP v2)", 1492, 28, 176, 200, 10, BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 28, 189, 208, 1 - AUTOCHECKBOX "& MS-CHAP ReactOS ( , )", 1549, 28, 195, 213, 24, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Д&ля протоколов на основе MS-CHAP автоматически использовать имя входа и пароль ReactOS (и имя домена, если существует)", 1549, 28, 195, 213, 24, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 127, 232, 60, 14 - PUSHBUTTON "", 2, 192, 232, 60, 14 + PUSHBUTTON "Отмена", 2, 192, 232, 60, 14 END 106 DIALOGEX 6, 18, 255, 109 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Завершение подключения" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 97, 91, 60, 14 ICON 563, 1046, 7, 7, 20, 20 - LTEXT " .", 1047, 40, 7, 212, 16 - LTEXT " "" "" ( ).", -1, 40, 30, 212, 34 - AUTOCHECKBOX "& ", 1045, 40, 69, 212, 10, BS_TOP | BS_MULTILINE + LTEXT "Подключение установлено.", 1047, 40, 7, 212, 16 + LTEXT "Для проверки наличия подключения щелкните правой кнопкой мыши по папке ""Сетевые подключения"" или щелкните по значку на панели задач (если он есть).", -1, 40, 30, 212, 34 + AUTOCHECKBOX "&Не выводить это сообщение в дальнейшем", 1045, 40, 69, 212, 10, BS_TOP | BS_MULTILINE END 107 DIALOGEX 0, 0, 258, 167 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1053, 7, 5, 243, 92 - LTEXT "& :", 1055, 18, 17, 54, 8 + GROUPBOX "Номер телефона", 1053, 7, 5, 243, 92 + LTEXT "&Код города:", 1055, 18, 17, 54, 8 COMBOBOX 1049, 17, 30, 55, 129, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1057, 77, 17, 166, 8, NOT WS_GROUP + LTEXT "&Номер телефона:", 1057, 77, 17, 166, 8, NOT WS_GROUP EDITTEXT 1051, 77, 30, 163, 14, ES_AUTOHSCROLL - LTEXT "& :", 1056, 18, 48, 221, 8, NOT WS_GROUP + LTEXT "К&од страны или региона:", 1056, 18, 48, 221, 8, NOT WS_GROUP COMBOBOX 1054, 17, 61, 224, 93, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1048, 20, 81, 219, 10, BS_TOP | BS_MULTILINE - GROUPBOX "&", 1052, 7, 102, 243, 36 + AUTOCHECKBOX "&Использовать правила набора номера", 1048, 20, 81, 219, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Комм&ентарий", 1052, 7, 102, 243, 36 EDITTEXT 1050, 17, 115, 224, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 127, 147, 60, 14 - PUSHBUTTON "", 2, 191, 147, 60, 14 + PUSHBUTTON "Отмена", 2, 191, 147, 60, 14 END 108 DIALOGEX 6, 18, 222, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Смена пароля" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . """".", 1062, 7, 5, 210, 24 - LTEXT "& :", 1064, 8, 43, 108, 8 + LTEXT "Срок действия пароля в удаленной сети истек. Введите новый пароль и нажмите кнопку ""ОК"".", 1062, 7, 5, 210, 24 + LTEXT "&Новый пароль:", 1064, 8, 43, 108, 8 EDITTEXT 1060, 118, 38, 98, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1061, 8, 61, 102, 8 + LTEXT "&Подтверждение:", 1061, 8, 61, 102, 8 EDITTEXT 1058, 118, 57, 98, 14, ES_PASSWORD | ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 90, 84, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 154, 84, 60, 14 + PUSHBUTTON "Отмена", 2, 154, 84, 60, 14 END 109 DIALOGEX 6, 18, 223, 122 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Смена пароля" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . """".", 1062, 7, 5, 212, 29 - LTEXT "& :", 1063, 7, 42, 108, 8 + LTEXT "Срок действия пароля в удаленной сети истек. Введите новый пароль и нажмите кнопку ""ОК"".", 1062, 7, 5, 212, 29 + LTEXT "&Старый пароль:", 1063, 7, 42, 108, 8 EDITTEXT 1059, 116, 38, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "& :", 1064, 7, 60, 108, 8 + LTEXT "&Новый пароль:", 1064, 7, 60, 108, 8 EDITTEXT 1060, 116, 56, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1061, 7, 78, 108, 8 + LTEXT "&Подтверждение:", 1061, 7, 78, 108, 8 EDITTEXT 1058, 116, 74, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 92, 101, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 156, 101, 60, 14 + PUSHBUTTON "Отмена", 2, 156, 101, 60, 14 END 110 DIALOGEX 12, 16, 230, 105 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Ответный вызов сервера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . """" . """" .", 1066, 5, 5, 221, 39, SS_NOPREFIX - LTEXT "& :", 1067, 5, 46, 222, 8, NOT WS_GROUP + LTEXT "Вы имеете право на ответный вызов со стороны сервера. После нажатия кнопки ""ОК"" сервер выполнит ответный вызов по указанному ниже телефону. Кнопка ""Отмена"" служит для отказа от ответного вызова.", 1066, 5, 5, 221, 39, SS_NOPREFIX + LTEXT "&Введите номер телефона вашего модема:", 1067, 5, 46, 222, 8, NOT WS_GROUP EDITTEXT 1065, 5, 57, 221, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 100, 85, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 164, 85, 60, 14 + PUSHBUTTON "Отмена", 2, 164, 85, 60, 14 END 111 DIALOGEX 6, 19, 265, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " : %1" +CAPTION "Ошибка подключения: %1" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, 1068, 7, 7, 20, 20, WS_GROUP LTEXT "", 1070, 34, 7, 226, 105 - DEFPUSHBUTTON " =88", 1, 4, 117, 128, 14, WS_GROUP - PUSHBUTTON "", 2, 136, 117, 60, 14 - PUSHBUTTON "&", 1069, 200, 117, 60, 14 + DEFPUSHBUTTON "Не звонить=88", 1, 4, 117, 128, 14, WS_GROUP + PUSHBUTTON "Отмена", 2, 136, 117, 60, 14 + PUSHBUTTON "По&дробнее", 1069, 200, 117, 60, 14 END 112 DIALOGEX 6, 18, 263, 219 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Автоматическое выполнение звонков" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS .", 1085, 9, 7, 253, 30 - GROUPBOX " ", -1, 6, 38, 249, 71 - LTEXT " , :", 1083, 16, 51, 237, 16, NOT WS_GROUP - LTEXT " &:", -1, 16, 73, 100, 8 + LTEXT "ReactOS может автоматически подключаться и завершать связь с коммутируемыми устройствами в зависимости от интенсивности обмена данными.", 1085, 9, 7, 253, 30 + GROUPBOX "Автоматическое подключение", -1, 6, 38, 249, 71 + LTEXT "Позвонить по другой линии, когда подключение удовлетворяет двум условиям одновременно:", 1083, 16, 51, 237, 16, NOT WS_GROUP + LTEXT "Активно не ме&нее:", -1, 16, 73, 100, 8 COMBOBOX 1079, 117, 70, 60, 100, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &:", 1084, 16, 87, 99, 17, NOT WS_GROUP + LTEXT "Продолжительность не &менее:", 1084, 16, 87, 99, 17, NOT WS_GROUP COMBOBOX 1080, 117, 89, 90, 162, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", -1, 6, 113, 248, 81 - LTEXT " , :", 1086, 16, 127, 230, 18, NOT WS_GROUP - LTEXT " &:", -1, 16, 150, 92, 8 + GROUPBOX "Автоматический разрыв соединения", -1, 6, 113, 248, 81 + LTEXT "Завершить связь, когда подключение удовлетворяет двум условиям одновременно:", 1086, 16, 127, 230, 18, NOT WS_GROUP + LTEXT "Активно не &более:", -1, 16, 150, 92, 8 COMBOBOX 1081, 115, 146, 60, 100, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1087, 16, 164, 92, 17, NOT WS_GROUP + LTEXT "Продолжит&ельность не менее:", 1087, 16, 164, 92, 17, NOT WS_GROUP COMBOBOX 1082, 115, 166, 90, 151, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP DEFPUSHBUTTON "OK", 1, 131, 199, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 194, 199, 60, 14 + PUSHBUTTON "Отмена", 2, 194, 199, 60, 14 END 113 DIALOGEX 21, 46, 225, 65 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION " %1..." +CAPTION "Установка связи с %1..." FONT 8, "MS Shell Dlg" BEGIN ICON 563, 1417, 7, 7, 20, 20 LTEXT "", 1097, 36, 7, 185, 35, SS_NOPREFIX - PUSHBUTTON "", 2, 83, 47, 60, 14 + PUSHBUTTON "Отмена", 2, 83, 47, 60, 14 END 114 DIALOGEX 6, 18, 225, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Удаленный доступ к сети" FONT 8, "MS Shell Dlg" BEGIN ICON 563, 1098, 7, 6, 20, 20, WS_GROUP - LTEXT " . ?", 1099, 40, 6, 181, 34, NOT WS_GROUP - PUSHBUTTON "&", 1, 60, 42, 50, 14 - DEFPUSHBUTTON "&", 2, 115, 42, 50, 14 + LTEXT "Сбой при автоматическом наборе номера. Отключить автонабор номера для данного места вызова?", 1099, 40, 6, 181, 34, NOT WS_GROUP + PUSHBUTTON "&Да", 1, 60, 42, 50, 14 + DEFPUSHBUTTON "&Нет", 2, 115, 42, 50, 14 END 115 DIALOGEX 0, 0, 263, 124 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 263, 50 - LTEXT "&:", 1412, 9, 60, 68, 8 + LTEXT "&Набрать:", 1412, 9, 60, 68, 8 COMBOBOX 1416, 88, 56, 165, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1415, 9, 77, 71, 8 + LTEXT "&Место вызова:", 1415, 9, 77, 71, 8 COMBOBOX 1414, 88, 75, 89, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 181, 75, 72, 14 + PUSHBUTTON "&Правила", 1108, 181, 75, 72, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 8, 96, 245, 1 - DEFPUSHBUTTON "&", 1590, 8, 103, 61, 14 - PUSHBUTTON "", 1591, 70, 103, 60, 14 - PUSHBUTTON "&", 1107, 132, 103, 60, 14 - PUSHBUTTON "&", 1592, 194, 103, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 103, 61, 14 + PUSHBUTTON "Отмена", 1591, 70, 103, 60, 14 + PUSHBUTTON "С&войства", 1107, 132, 103, 60, 14 + PUSHBUTTON "&Справка", 1592, 194, 103, 60, 14 END 116 DIALOGEX 0, 0, 265, 176 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 8, 60, 88, 8 + LTEXT "По&льзователь:", 1413, 8, 60, 88, 8 EDITTEXT 1104, 103, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 8, 79, 88, 8 + LTEXT "П&ароль:", 1112, 8, 79, 88, 8 EDITTEXT 1103, 103, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 8, 97, 248, 1 - AUTOCHECKBOX "& :", 1101, 14, 105, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 26, 120, 226, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1623, 26, 134, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&охранять имя пользователя и пароль:", 1101, 14, 105, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "только дл&я меня", 1622, 26, 120, 226, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для л&юбого пользователя", 1623, 26, 134, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 8, 149, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 156, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 71, 156, 60, 14 - PUSHBUTTON "&", 1107, 133, 156, 60, 14 - PUSHBUTTON "&", 1592, 195, 156, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 156, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 1591, 71, 156, 60, 14 + PUSHBUTTON "С&войства", 1107, 133, 156, 60, 14 + PUSHBUTTON "&Справка", 1592, 195, 156, 60, 14 END 117 DIALOGEX 0, 0, 263, 192 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 9, 61, 92, 8 + LTEXT "По&льзователь:", 1413, 9, 61, 92, 8 EDITTEXT 1104, 102, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 9, 80, 92, 8 + LTEXT "&Пароль:", 1112, 9, 80, 92, 8 EDITTEXT 1103, 102, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1110, 9, 99, 91, 8 + LTEXT "&Домен:", 1110, 9, 99, 91, 8 EDITTEXT 1102, 102, 95, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 9, 116, 247, 1 - AUTOCHECKBOX "& :", 1101, 12, 123, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 25, 137, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1623, 25, 151, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&охранять имя пользователя и пароль:", 1101, 12, 123, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "только дл&я меня", 1622, 25, 137, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для л&юбого пользователя", 1623, 25, 151, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 167, 247, 1 - DEFPUSHBUTTON "&", 1590, 8, 173, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 71, 173, 60, 14 - PUSHBUTTON "&", 1107, 133, 173, 60, 14 - PUSHBUTTON "&", 1592, 195, 173, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 173, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 1591, 71, 173, 60, 14 + PUSHBUTTON "С&войства", 1107, 133, 173, 60, 14 + PUSHBUTTON "&Справка", 1592, 195, 173, 60, 14 END 118 DIALOGEX 0, 0, 265, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 61, 92, 8 + LTEXT "По&льзователь:", 1413, 10, 61, 92, 8 EDITTEXT 1104, 104, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 10, 80, 92, 8 + LTEXT "&Пароль:", 1112, 10, 80, 92, 8 EDITTEXT 1103, 104, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1110, 10, 100, 92, 8 + LTEXT "&Домен:", 1110, 10, 100, 92, 8 EDITTEXT 1102, 104, 95, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 11, 116, 247, 1 - AUTOCHECKBOX "& :", 1101, 16, 124, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 29, 139, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1623, 29, 152, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&охранять имя пользователя и пароль:", 1101, 16, 124, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "только дл&я меня", 1622, 29, 139, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для л&юбого пользователя", 1623, 29, 152, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 167, 247, 1 - LTEXT "&:", 1412, 10, 177, 90, 8 + LTEXT "&Набрать:", 1412, 10, 177, 90, 8 COMBOBOX 1416, 102, 173, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 192, 247, 1 - DEFPUSHBUTTON "&", 1590, 10, 199, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 72, 199, 60, 14 - PUSHBUTTON "&", 1107, 134, 199, 60, 14 - PUSHBUTTON "&", 1592, 196, 199, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 10, 199, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 1591, 72, 199, 60, 14 + PUSHBUTTON "С&войства", 1107, 134, 199, 60, 14 + PUSHBUTTON "&Справка", 1592, 196, 199, 60, 14 END 119 DIALOGEX 0, 0, 265, 200 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 62, 91, 8 + LTEXT "По&льзователь:", 1413, 10, 62, 91, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 10, 81, 92, 8 + LTEXT "&Пароль:", 1112, 10, 81, 92, 8 EDITTEXT 1103, 104, 77, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 97, 247, 1 - AUTOCHECKBOX "& :", 1101, 12, 103, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 24, 117, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1623, 24, 132, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&охранять имя пользователя и пароль:", 1101, 12, 103, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "только дл&я меня", 1622, 24, 117, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для л&юбого пользователя", 1623, 24, 132, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 147, 247, 1 - LTEXT "&:", 1412, 13, 157, 88, 8 + LTEXT "&Набрать:", 1412, 13, 157, 88, 8 COMBOBOX 1416, 103, 154, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 173, 247, 1 - DEFPUSHBUTTON "&", 1590, 10, 180, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 72, 180, 60, 14 - PUSHBUTTON "&", 1107, 134, 180, 60, 14 - PUSHBUTTON "&", 1592, 197, 180, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 10, 180, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 1591, 72, 180, 60, 14 + PUSHBUTTON "С&войства", 1107, 134, 180, 60, 14 + PUSHBUTTON "&Справка", 1592, 197, 180, 60, 14 END 121 DIALOGEX 6, 18, 230, 131 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " ISDN" +CAPTION "Настройка ISDN" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1155, 9, 9, 65, 8 + LTEXT "&Тип линии:", 1155, 9, 9, 65, 8 COMBOBOX 1153, 76, 7, 148, 42, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - AUTOCHECKBOX "& ", 1150, 23, 26, 199, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "С&огласование типа линии", 1150, 23, 26, 199, 10, BS_TOP | BS_MULTILINE | WS_GROUP GROUPBOX " ", 1152, 8, 48, 214, 51, WS_GROUP - AUTOCHECKBOX "& ", 1149, 17, 48, 102, 10, BS_TOP | BS_MULTILINE - LTEXT "& :", 1154, 16, 65, 100, 8, NOT WS_GROUP + AUTOCHECKBOX "&Использовать старый протокол", 1149, 17, 48, 102, 10, BS_TOP | BS_MULTILINE + LTEXT "И&спользовать каналы:", 1154, 16, 65, 100, 8, NOT WS_GROUP EDITTEXT 1151, 119, 61, 94, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1148, 16, 82, 198, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Включить аппаратное сжатие", 1148, 16, 82, 198, 10, BS_TOP | BS_MULTILINE PUSHBUTTON "OK", 1, 99, 109, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 163, 109, 60, 14 + PUSHBUTTON "Отмена", 2, 163, 109, 60, 14 END 122 DIALOGEX 6, 18, 220, 68 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " ISDN" +CAPTION "Настройка ISDN" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1155, 9, 11, 55, 8 + LTEXT "&Тип линии:", 1155, 9, 11, 55, 8 COMBOBOX 1153, 67, 7, 148, 43, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - AUTOCHECKBOX "& ", 1150, 21, 28, 194, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "С&огласование типа линии", 1150, 21, 28, 194, 10, BS_TOP | BS_MULTILINE | WS_GROUP PUSHBUTTON "OK", 1, 90, 49, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 154, 49, 60, 14 + PUSHBUTTON "Отмена", 2, 154, 49, 60, 14 END 123 DIALOGEX 11, 20, 350, 275 @@ -345,11 +345,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN EDITTEXT 1161, 5, 5, 338, 236, ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL | WS_GROUP - LTEXT "IP-&:", 1163, 7, 253, 68, 8 + LTEXT "IP-&адрес:", 1163, 7, 253, 68, 8 CONTROL "", 1160, "RASIPADDRESS", WS_TABSTOP, 76, 250, 117, 14 DEFPUSHBUTTON "", 1162, 197, 252, 16, 13, NOT WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&", 1, 219, 252, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 283, 252, 60, 14 + PUSHBUTTON "&Готово", 1, 219, 252, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 2, 283, 252, 60, 14 END 124 DIALOGEX 6, 17, 350, 266 @@ -358,151 +358,151 @@ FONT 8, "MS Shell Dlg" BEGIN EDITTEXT 1161, 5, 4, 340, 236, ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL | WS_GROUP DEFPUSHBUTTON "", 1162, 7, 247, 50, 14, NOT WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&", 1, 222, 247, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 286, 247, 60, 14 + PUSHBUTTON "&Готово", 1, 222, 247, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 2, 286, 247, 60, 14 END 125 DIALOGEX 12, 16, 261, 190 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Конфигурация модема" FONT 8, "MS Shell Dlg" BEGIN ICON 15102, 1238, 7, 7, 20, 20 - LTEXT "", -1, 25, 27, 24, 8, NOT WS_VISIBLE | NOT WS_GROUP + LTEXT "Модем", -1, 25, 27, 24, 8, NOT WS_VISIBLE | NOT WS_GROUP EDITTEXT 1235, 40, 7, 214, 16, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER - LTEXT "& (/):", 1243, 7, 36, 110, 8 + LTEXT "&Наибольшая скорость (бит/с):", 1243, 7, 36, 110, 8 COMBOBOX 1239, 119, 34, 136, 186, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& ", 1244, 7, 52, 111, 8 + LTEXT "&Протокол модема", 1244, 7, 52, 111, 8 COMBOBOX 1245, 119, 50, 136, 186, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1237, 6, 70, 248, 61, WS_GROUP - AUTOCHECKBOX "& ", 1232, 19, 82, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1231, 19, 98, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1229, 19, 115, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1234, 8, 136, 246, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX " & ", 1230, 8, 151, 247, 10, BS_TOP | BS_MULTILINE | WS_GROUP + GROUPBOX "Параметры оборудования", 1237, 6, 70, 248, 61, WS_GROUP + AUTOCHECKBOX "&Аппаратное управление потоком", 1232, 19, 82, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "О&бработка ошибок модемом", 1231, 19, 98, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&жатие данных модемом", 1229, 19, 115, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Вывести окно терминала", 1234, 8, 136, 246, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Включить &динамик модема", 1230, 8, 151, 247, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 129, 171, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 194, 171, 60, 14 + PUSHBUTTON "Отмена", 2, 194, 171, 60, 14 END 126 DIALOGEX 0, 0, 270, 117 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Выбор типа сетевого компонента" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 8, 7, 258, 8 + LTEXT "Выберите тип устанавливаемого сетевого компонента:", -1, 8, 7, 258, 8 CONTROL "", 1251, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 8, 20, 188, 58 GROUPBOX "", -1, 8, 81, 188, 30 LTEXT "", 1250, 12, 90, 177, 17 - DEFPUSHBUTTON "&...", 1252, 205, 20, 60, 14 - PUSHBUTTON "", 2, 205, 38, 60, 14 + DEFPUSHBUTTON "&Добавить...", 1252, 205, 20, 60, 14 + PUSHBUTTON "Отмена", 2, 205, 38, 60, 14 END 127 DIALOGEX 16, 20, 260, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " NetWare " +CAPTION "Подключения к NetWare или совместимой сети" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, 1278, 7, 7, 21, 20, WS_GROUP - LTEXT " NetWare- PPP IPX.", 1279, 42, 7, 215, 37 - LTEXT " , , , IPX .", 1280, 42, 46, 215, 38, NOT WS_GROUP - AUTOCHECKBOX "& ", 1277, 42, 86, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + LTEXT "Открытые подключения к NetWare-совместимой сети будут закрыты при установке связи PPP IPX.", 1279, 42, 7, 215, 37 + LTEXT "Чтобы избежать потери данных, закройте перед вызовом все файлы, использующие эти подключения, либо снимите флажок IPX в окне настройки сетевого протокола для этого элемента.", 1280, 42, 46, 215, 38, NOT WS_GROUP + AUTOCHECKBOX "&Не выводить более это сообщение", 1277, 42, 86, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 65, 112, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 134, 112, 60, 14 + PUSHBUTTON "Отмена", 2, 134, 112, 60, 14 END 128 DIALOGEX 7, 22, 236, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Набор номера вручную" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ( ). """". , .", 1281, 8, 8, 219, 32 - LTEXT " :", 1282, 8, 46, 91, 8 + LTEXT "Снимите трубку и наберите номер (или попросите это сделать оператора). После набора сразу же нажмите кнопку ""ОК"". Подождите отключения сигнала в трубке, затем положите ее на рычаг.", 1281, 8, 8, 219, 32 + LTEXT "Номер телефона:", 1282, 8, 46, 91, 8 LTEXT "", 1283, 103, 46, 126, 8, NOT WS_GROUP DEFPUSHBUTTON "OK", 1, 104, 70, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 168, 70, 60, 14 + PUSHBUTTON "Отмена", 2, 168, 70, 60, 14 END 129 DIALOGEX 6, 20, 260, 85 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Результат подключения сетевых протоколов" FONT 8, "MS Shell Dlg" BEGIN ICON 32516, 1328, 7, 7, 21, 20, WS_GROUP LTEXT "", 1329, 38, 7, 216, 24, NOT WS_GROUP - AUTOCHECKBOX "& ", 1327, 40, 44, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP - PUSHBUTTON "&", 1, 129, 64, 60, 14 - PUSHBUTTON "&", 2, 193, 64, 60, 14 + AUTOCHECKBOX "&Не запрашивать более протоколы с ошибками", 1327, 40, 44, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + PUSHBUTTON "&Принять", 1, 129, 64, 60, 14 + PUSHBUTTON "&Завершить", 2, 193, 64, 60, 14 END 133 DIALOGEX 6, 18, 231, 211 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " X.25" +CAPTION "Параметры входа в сеть X.25" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " X.25 X.121 :", 1408, 7, 4, 220, 27 - LTEXT "&:", 1410, 9, 35, 213, 8, NOT WS_GROUP + LTEXT "Выберите службу доступа к сети по протоколу X.25 и введите адрес X.121 удаленного сервера:", 1408, 7, 4, 220, 27 + LTEXT "&Сеть:", 1410, 9, 35, 213, 8, NOT WS_GROUP COMBOBOX 1406, 9, 46, 215, 125, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& X.121:", 1407, 9, 66, 213, 8, NOT WS_GROUP + LTEXT "&Адрес X.121:", 1407, 9, 66, 213, 8, NOT WS_GROUP EDITTEXT 1402, 8, 77, 215, 14, ES_AUTOHSCROLL - GROUPBOX "", 1405, 8, 95, 215, 79 - LTEXT "& :", 1411, 19, 109, 182, 8, NOT WS_GROUP + GROUPBOX "Дополнительно", 1405, 8, 95, 215, 79 + LTEXT "&Данные пользователя:", 1411, 19, 109, 182, 8, NOT WS_GROUP EDITTEXT 1404, 19, 120, 193, 14, ES_AUTOHSCROLL - LTEXT "&:", 1409, 19, 138, 182, 8, NOT WS_GROUP + LTEXT "&Услуги:", 1409, 19, 138, 182, 8, NOT WS_GROUP EDITTEXT 1403, 19, 149, 193, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 100, 189, 60, 14 - PUSHBUTTON "", 2, 164, 189, 60, 14 + PUSHBUTTON "Отмена", 2, 164, 189, 60, 14 END 146 DIALOGEX 6, 18, 230, 210 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Автонабор номера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , .", -1, 7, 4, 219, 32 - LTEXT "& :", 1006, 8, 42, 213, 8 + LTEXT "Если подключение к сети окажется разорванным, то будет произведен автонабор номера при любой попытке доступа к сетевым данным.", -1, 7, 4, 219, 32 + LTEXT "В&ключить автонабор номера для:", 1006, 8, 42, 213, 8 CONTROL "", 1004, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000C401, 7, 53, 216, 109 - AUTOCHECKBOX "& ", 1496, 8, 170, 218, 9, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ReactOS", 1550, 8, 185, 217, 9, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Запрашивать подтверждение на автонабор номера", 1496, 8, 170, 218, 9, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Отключить автонабор до моего выхода из ReactOS", 1550, 8, 185, 217, 9, BS_TOP | BS_MULTILINE END 147 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Набор номера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " Ctrl+Alt+Delete. .", 1007, 7, 4, 221, 40, NOT WS_GROUP - LTEXT "& :", 1005, 7, 55, 154, 8 + LTEXT "Параметры входа в систему через телефонное подключение после нажатия клавиш Ctrl+Alt+Delete. Доступ к этой вкладке предоставлен вам как администратору.", 1007, 7, 4, 221, 40, NOT WS_GROUP + LTEXT "&Число повторений набора номера:", 1005, 7, 55, 154, 8 EDITTEXT 1001, 164, 52, 60, 14, ES_AUTOHSCROLL - LTEXT "& ():", 1009, 7, 73, 156, 8, NOT WS_GROUP + LTEXT "&Интервал между повторениями (с):", 1009, 7, 73, 156, 8, NOT WS_GROUP EDITTEXT 1003, 164, 70, 60, 14, ES_AUTOHSCROLL - LTEXT "& ():", 1008, 7, 91, 154, 8, NOT WS_GROUP + LTEXT "&Время простоя до разъединения (с):", 1008, 7, 91, 154, 8, NOT WS_GROUP EDITTEXT 1002, 164, 88, 60, 14, ES_AUTOHSCROLL END 148 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Ответный вызов сервера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . ? ( VPN-)", 1043, 8, 4, 219, 43 - AUTORADIOBUTTON "& ", 1041, 7, 48, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&. ", 1040, 7, 61, 219, 10, BS_TOP | BS_MULTILINE - AUTORADIOBUTTON "& :", 1042, 7, 74, 219, 10, BS_TOP | BS_MULTILINE + LTEXT "При коммутируемом подключении к серверу он может сделать ответный вызов для сокращения ваших телефонных расходов. Использовать ответный вызов? (Ответный вызов не поддерживается для VPN-подключений)", 1043, 8, 4, 219, 43 + AUTORADIOBUTTON "Ответ&ный вызов не выполняется", 1041, 7, 48, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Иногда. Выдавать запрос при подключении к серверу", 1040, 7, 61, 219, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "&Всегда выполнять ответный вызов по указанным номерам:", 1042, 7, 74, 219, 10, BS_TOP | BS_MULTILINE CONTROL "", 1037, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00008401, 16, 88, 204, 94 - PUSHBUTTON "&...", 1039, 96, 190, 60, 14 - PUSHBUTTON "&", 1038, 159, 190, 60, 14 + PUSHBUTTON "И&зменить...", 1039, 96, 190, 60, 14 + PUSHBUTTON "&Удалить", 1038, 159, 190, 60, 14 END 149 DIALOGEX 6, 18, 317, 142 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , . .", 1094, 8, 5, 307, 35 - LTEXT "& :", 1078, 8, 47, 124, 8, NOT WS_GROUP + LTEXT "Необходимо задать учетные данные входящего подключения, которые будут использоваться удаленными маршрутизаторами для подключения к этому интерфейсу. На этом маршрутизаторе будет создана учетная запись с введенными данными.", 1094, 8, 5, 307, 35 + LTEXT "&Имя пользователя:", 1078, 8, 47, 124, 8, NOT WS_GROUP EDITTEXT 1074, 135, 45, 175, 12, ES_AUTOHSCROLL | WS_DISABLED - LTEXT "&:", 1077, 8, 68, 124, 8, NOT WS_GROUP + LTEXT "П&ароль:", 1077, 8, 68, 124, 8, NOT WS_GROUP EDITTEXT 1073, 135, 66, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1075, 8, 90, 124, 8, NOT WS_GROUP + LTEXT "П&одтверждение:", 1075, 8, 90, 124, 8, NOT WS_GROUP EDITTEXT 1071, 135, 87, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL END @@ -510,14 +510,14 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , . .", 1094, 8, 5, 308, 33 - LTEXT "& :", 1096, 8, 43, 130, 8, NOT WS_GROUP + LTEXT "Необходимо задать учетные данные исходящего подключения, которые будут использоваться интерфейсом для подключения к удаленному маршрутизатору. Эти учетные данные должны соответствовать учетным данным входящего подключения на этом удаленном маршрутизаторе.", 1094, 8, 5, 308, 33 + LTEXT "&Имя пользователя:", 1096, 8, 43, 130, 8, NOT WS_GROUP EDITTEXT 1091, 140, 40, 175, 12, ES_AUTOHSCROLL - LTEXT "&:", 1093, 8, 63, 130, 8, NOT WS_GROUP + LTEXT "&Домен:", 1093, 8, 63, 130, 8, NOT WS_GROUP EDITTEXT 1089, 140, 60, 175, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT "&:", 1095, 8, 81, 130, 8, NOT WS_GROUP + LTEXT "П&ароль:", 1095, 8, 81, 130, 8, NOT WS_GROUP EDITTEXT 1090, 140, 78, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1092, 8, 99, 130, 8, NOT WS_GROUP + LTEXT "П&одтверждение:", 1092, 8, 99, 130, 8, NOT WS_GROUP EDITTEXT 1088, 140, 96, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL END @@ -525,140 +525,140 @@ END STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 8, 4, 190, 8 + LTEXT "Введите название для этого подключения:", -1, 8, 4, 190, 8 EDITTEXT 1114, 8, 17, 190, 12, ES_AUTOHSCROLL - LTEXT " """" .", -1, 8, 38, 193, 20 - LTEXT " """" """".", -1, 8, 58, 193, 16 + LTEXT "Нажмите кнопку ""Готово"" для сохранения значка подключения в папке сетевых подключений.", -1, 8, 38, 193, 20 + LTEXT "Для изменения свойств подключения выберите в меню ""Файл"" команду ""Свойства"".", -1, 8, 58, 193, 16 END 155 DIALOGEX 0, 0, 231, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1124, 7, 5, 219, 8 + LTEXT "Подкл&ючаться через:", 1124, 7, 5, 219, 8 CONTROL "", 1128, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00004C0D, 7, 17, 198, 44, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1132, 210, 18, 16, 14, BS_ICON - PUSHBUTTON "&", 1131, 210, 36, 16, 14, BS_ICON - AUTOCHECKBOX "& ", 1119, 9, 66, 133, 18, BS_TOP | BS_MULTILINE - PUSHBUTTON "&...", 1130, 144, 66, 60, 14 - GROUPBOX "", 1125, 8, 84, 215, 100, WS_GROUP - LTEXT "& :", 1133, 17, 102, 52, 8 + PUSHBUTTON "&Вверх", 1132, 210, 18, 16, 14, BS_ICON + PUSHBUTTON "В&низ", 1131, 210, 36, 16, 14, BS_ICON + AUTOCHECKBOX "О&бщие номера для подключения всех устройств", 1119, 9, 66, 133, 18, BS_TOP | BS_MULTILINE + PUSHBUTTON "Н&астроить...", 1130, 144, 66, 60, 14 + GROUPBOX "Образец", 1125, 8, 84, 215, 100, WS_GROUP + LTEXT "&Код города:", 1133, 17, 102, 52, 8 COMBOBOX 1122, 17, 112, 52, 110, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &:", 1135, 71, 102, 139, 8 + LTEXT "Номер &телефона:", 1135, 71, 102, 139, 8 EDITTEXT 1123, 73, 112, 79, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 154, 112, 60, 14 - LTEXT "& :", 1134, 17, 132, 197, 8 + PUSHBUTTON "&Другие", 1129, 154, 112, 60, 14 + LTEXT "К&од страны или региона:", 1134, 17, 132, 197, 8 COMBOBOX 1126, 17, 143, 193, 130, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1121, 17, 163, 132, 17, BS_TOP | BS_MULTILINE - PUSHBUTTON "&", 1136, 151, 161, 60, 14 - AUTOCHECKBOX " & ", 1120, 10, 192, 214, 19, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Использовать правила набора номера", 1121, 17, 163, 132, 17, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Правила", 1136, 151, 161, 60, 14 + AUTOCHECKBOX "При подключении в&ывести значок в области уведомлений", 1120, 10, 192, 214, 19, BS_TOP | BS_MULTILINE END 156 DIALOGEX 0, 0, 231, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "&...", 1130, 164, 38, 60, 14 - GROUPBOX "", 1125, 8, 55, 217, 100, WS_GROUP - LTEXT "& :", 1133, 17, 72, 48, 8 + PUSHBUTTON "Н&астроить...", 1130, 164, 38, 60, 14 + GROUPBOX "Образец", 1125, 8, 55, 217, 100, WS_GROUP + LTEXT "&Код города:", 1133, 17, 72, 48, 8 COMBOBOX 1122, 17, 83, 48, 119, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1135, 71, 72, 146, 8 + LTEXT "&Номер телефона:", 1135, 71, 72, 146, 8 EDITTEXT 1123, 71, 83, 81, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 155, 83, 63, 14 - LTEXT "& :", 1134, 17, 103, 193, 8 + PUSHBUTTON "&Другие", 1129, 155, 83, 63, 14 + LTEXT "К&од страны или региона:", 1134, 17, 103, 193, 8 COMBOBOX 1126, 17, 114, 201, 130, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1121, 19, 134, 136, 17, BS_TOP | BS_MULTILINE - PUSHBUTTON "&", 1136, 157, 132, 60, 14 - AUTOCHECKBOX " & ", 1120, 12, 164, 209, 18, BS_TOP | BS_MULTILINE - LTEXT " :", 1124, 8, 5, 217, 8 + AUTOCHECKBOX "&Использовать правила набора номера", 1121, 19, 134, 136, 17, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Правила", 1136, 157, 132, 60, 14 + AUTOCHECKBOX "При подключении в&ывести значок в области уведомлений", 1120, 12, 164, 209, 18, BS_TOP | BS_MULTILINE + LTEXT "Подключаться через:", 1124, 8, 5, 217, 8 CONTROL "", 1127, "SYSLISTVIEW32", WS_DISABLED | WS_BORDER | 0x0000EC0D, 7, 18, 217, 15 END 157 DIALOGEX 6, 18, 268, 160 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Оформление" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 1142, 8, 10, 256, 10, WS_GROUP - AUTOCHECKBOX "& ", 1139, 8, 27, 256, 10 - AUTOCHECKBOX "& ", 1140, 21, 43, 245, 10 - AUTOCHECKBOX "& ", 1143, 8, 59, 256, 10 - AUTOCHECKBOX "& ", 1137, 8, 76, 256, 10 - AUTOCHECKBOX "& ", 1141, 8, 94, 256, 10 - AUTOCHECKBOX "& ", 1144, 22, 111, 245, 10 + AUTOCHECKBOX "&Просматривать телефонные номера перед набором номера", 1142, 8, 10, 256, 10, WS_GROUP + AUTOCHECKBOX "&Отображать сведения о месте вызова перед набором номера", 1139, 8, 27, 256, 10 + AUTOCHECKBOX "&Разрешить изменения места вызова во время входа в систему", 1140, 21, 43, 245, 10 + AUTOCHECKBOX "О&тображать состояние подключения при установке связи", 1143, 8, 59, 256, 10 + AUTOCHECKBOX "&Закрыть после установки связи", 1137, 8, 76, 256, 10 + AUTOCHECKBOX "Р&азрешить изменения телефонной книги во время входа в систему", 1141, 8, 94, 256, 10 + AUTOCHECKBOX "&Использовать мастера для создания записей в телефонной книге", 1144, 22, 111, 245, 10 END 158 DIALOGEX 6, 18, 268, 160 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Оформление" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 1142, 8, 10, 256, 10, WS_GROUP - AUTOCHECKBOX "& ", 1139, 8, 27, 256, 10 - AUTOCHECKBOX "& ", 1138, 8, 44, 256, 10 - AUTOCHECKBOX "& ", 1143, 8, 61, 256, 10 - AUTOCHECKBOX "& ", 1137, 8, 79, 256, 10 - AUTOCHECKBOX "& ", 1144, 8, 97, 256, 10 - AUTOCHECKBOX "& ", 1136, 8, 114, 256, 10 + AUTOCHECKBOX "&Просматривать телефонные номера перед набором номера", 1142, 8, 10, 256, 10, WS_GROUP + AUTOCHECKBOX "&Отображать сведения о месте вызова перед набором номера", 1139, 8, 27, 256, 10 + AUTOCHECKBOX "&Запускать монитор удаленного доступа к сети перед набором номера", 1138, 8, 44, 256, 10 + AUTOCHECKBOX "О&тображать состояние подключения при установке связи", 1143, 8, 61, 256, 10 + AUTOCHECKBOX "З&акрыть после установки связи", 1137, 8, 79, 256, 10 + AUTOCHECKBOX "&Использовать мастера для создания записей в телефонной книге", 1144, 8, 97, 256, 10 + AUTOCHECKBOX "&Всегда выводить приглашение перед автонабором номера", 1136, 8, 114, 256, 10 END 160 DIALOGEX 6, 18, 320, 145 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . , .", 1158, 7, 5, 309, 29 - LTEXT "& :", 1159, 17, 41, 285, 8, NOT WS_GROUP + LTEXT "Выберите имя для интерфейса вызова по требованию. Общепринятой практикой является присвоение имен интерфейсам после имен сети или маршрутизатора, к которым они подключены.", 1158, 7, 5, 309, 29 + LTEXT "&Имя интерфейса:", 1159, 17, 41, 285, 8, NOT WS_GROUP EDITTEXT 1157, 17, 53, 284, 12, ES_AUTOHSCROLL - AUTOCHECKBOX " , & ", 1156, 24, 100, 258, 31, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "Мне хорошо знакомы интерфейсы вызова по требованию, &я хочу перейти к настройке параметров вручную", 1156, 24, 100, 258, 31, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED END 162 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Безопасность" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1580, 8, 3, 215, 139 - AUTORADIOBUTTON "& ( )", 1540, 14, 16, 201, 9, BS_NOTIFY | WS_GROUP - AUTORADIOBUTTON "& ( )", 1541, 14, 102, 198, 8, BS_NOTIFY - LTEXT "& :", 1537, 26, 29, 187, 8, NOT WS_GROUP + GROUPBOX "Параметры безопасности", 1580, 8, 3, 215, 139 + AUTORADIOBUTTON "Об&ычные (рекомендуемые параметры)", 1540, 14, 16, 201, 9, BS_NOTIFY | WS_GROUP + AUTORADIOBUTTON "&Дополнительные (выборочные параметры)", 1541, 14, 102, 198, 8, BS_NOTIFY + LTEXT "&При проверке используется:", 1537, 26, 29, 187, 8, NOT WS_GROUP COMBOBOX 1178, 26, 40, 184, 78, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ReactOS ( , )", 1174, 26, 58, 184, 20, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ( )", 1169, 26, 82, 191, 10, BS_TOP | BS_MULTILINE - LTEXT " .", 1539, 15, 114, 134, 25 - PUSHBUTTON "&...", 1180, 151, 115, 60, 14 - GROUPBOX " ", 1177, 8, 146, 215, 62, WS_GROUP - AUTOCHECKBOX "& ", 1173, 14, 159, 198, 11, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&:", 1172, 14, 172, 57, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Использовать автоматически имя входа и пароль из ReactOS (и имя домена, если существует)", 1174, 26, 58, 184, 20, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Тре&буется шифрование данных (иначе отключаться)", 1169, 26, 82, 191, 10, BS_TOP | BS_MULTILINE + LTEXT "Применение этих параметров требует знания протоколов обеспечения безопасности.", 1539, 15, 114, 134, 25 + PUSHBUTTON "Парам&етры...", 1180, 151, 115, 60, 14 + GROUPBOX "Интерактивная регистрация и сценарий", 1177, 8, 146, 215, 62, WS_GROUP + AUTOCHECKBOX "&Вывести окно терминала", 1173, 14, 159, 198, 11, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Сценарий:", 1172, 14, 172, 57, 10, BS_TOP | BS_MULTILINE COMBOBOX 1179, 72, 171, 140, 104, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1182, 87, 187, 60, 14 - PUSHBUTTON "&...", 1181, 151, 187, 60, 14 + PUSHBUTTON "И&зменить...", 1182, 87, 187, 60, 14 + PUSHBUTTON "&Обзор...", 1181, 151, 187, 60, 14 END 163 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", -1, 6, 3, 307, 13 - LTEXT "& :", -1, 6, 15, 307, 11 + LTEXT "На этом компьютере имеется более одного устройства удаленного доступа к сети.", -1, 6, 3, 307, 13 + LTEXT "&Выберите устройства для данного подключения:", -1, 6, 15, 307, 11 CONTROL "", 1228, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C415, 7, 28, 304, 77 END 165 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Сеть" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1583, 7, 4, 219, 8 + LTEXT "&Тип подключаемого сервера удаленного доступа:", 1583, 7, 4, 219, 8 COMBOBOX 1418, 7, 17, 215, 46, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1419, 160, 35, 60, 14 - LTEXT ", & :", 1684, 8, 64, 219, 10 + PUSHBUTTON "&Параметры", 1419, 160, 35, 60, 14 + LTEXT "Компоненты, &используемые этим подключением:", 1684, 8, 64, 219, 10 CONTROL "", 1251, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C40D, 7, 75, 216, 53 - PUSHBUTTON "&...", 1252, 7, 133, 67, 14 - PUSHBUTTON "&", 1254, 80, 133, 67, 14 - PUSHBUTTON "&", 1253, 153, 133, 67, 14 - GROUPBOX "", 1585, 9, 158, 213, 43 + PUSHBUTTON "&Установить...", 1252, 7, 133, 67, 14 + PUSHBUTTON "Уда&лить", 1254, 80, 133, 67, 14 + PUSHBUTTON "Сво&йства", 1253, 153, 133, 67, 14 + GROUPBOX "Описание", 1585, 9, 158, 213, 43 LTEXT "", 1250, 18, 167, 195, 25 END @@ -666,118 +666,118 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP- DNS WINS (0.0.0.0), , .", 1275, 7, 2, 311, 25 - LTEXT "DNS-&:", 1274, 7, 29, 160, 8, NOT WS_GROUP + LTEXT "Введите IP-адреса серверов DNS и WINS удаленной сети или оставьте их нулевыми (0.0.0.0), если ожидается, что их предоставит удаленный маршрутизатор или если вы не знаете этих адресов.", 1275, 7, 2, 311, 25 + LTEXT "DNS-с&ервер:", 1274, 7, 29, 160, 8, NOT WS_GROUP CONTROL "", 1272, "RASIPADDRESS", WS_TABSTOP, 21, 41, 85, 12 - LTEXT "WINS-&:", 1276, 7, 65, 166, 8, NOT WS_GROUP + LTEXT "WINS-&сервер:", 1276, 7, 65, 166, 8, NOT WS_GROUP CONTROL "", 1273, "RASIPADDRESS", WS_TABSTOP, 21, 77, 85, 12 END 167 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1289, 7, 2, 213, 64 - AUTOCHECKBOX "& ", 1284, 16, 14, 201, 10 - AUTOCHECKBOX "& , , ..", 1554, 16, 27, 201, 10 - AUTOCHECKBOX "& ReactOS", 1555, 16, 39, 201, 10 - AUTOCHECKBOX "& ", 1285, 16, 52, 200, 10, BS_TOP | BS_MULTILINE - GROUPBOX " ", 1290, 6, 72, 213, 79 - LTEXT "& :", 1300, 16, 87, 123, 8 + GROUPBOX "Параметры набора номера", 1289, 7, 2, 213, 64 + AUTOCHECKBOX "&Отображать ход подключения", 1284, 16, 14, 201, 10 + AUTOCHECKBOX "&Запрашивать имя, пароль, сертификат и т.д.", 1554, 16, 27, 201, 10 + AUTOCHECKBOX "Вкл&ючать домен входа в ReactOS", 1555, 16, 39, 201, 10 + AUTOCHECKBOX "Запр&ашивать номер телефона", 1285, 16, 52, 200, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Параметры повторного звонка", 1290, 6, 72, 213, 79 + LTEXT "&Число повторений набора номера:", 1300, 16, 87, 123, 8 EDITTEXT 1287, 141, 84, 69, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT " & :", 1301, 16, 103, 123, 8 + LTEXT "Интервал ме&жду повторениями:", 1301, 16, 103, 123, 8 COMBOBOX 1292, 141, 101, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1299, 16, 120, 123, 8 + LTEXT "&Время простоя до разъединения:", 1299, 16, 120, 123, 8 COMBOBOX 1291, 141, 116, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1286, 16, 136, 199, 10, BS_TOP | BS_MULTILINE - GROUPBOX " ", 1288, 7, 156, 213, 32 + AUTOCHECKBOX "П&ерезвонить при разрыве связи", 1286, 16, 136, 199, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Использование нескольких устройств", 1288, 7, 156, 213, 32 COMBOBOX 1551, 16, 169, 128, 45, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1293, 150, 168, 60, 14 + PUSHBUTTON "&Настроить...", 1293, 150, 168, 60, 14 PUSHBUTTON "&X.25", 1295, 7, 194, 50, 14 - PUSHBUTTON "& ", 1294, 62, 194, 150, 14, NOT WS_VISIBLE | WS_DISABLED + PUSHBUTTON "В&иртуальное туннельное подключение", 1294, 62, 194, 150, 14, NOT WS_VISIBLE | WS_DISABLED END 168 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . ", -1, 7, 4, 306, 14 - LTEXT " &:", 1308, 7, 19, 130, 8 + LTEXT "Введите номер телефона. ", -1, 7, 4, 306, 14 + LTEXT "Номер &телефона:", 1308, 7, 19, 130, 8 EDITTEXT 1304, 7, 30, 304, 14, ES_AUTOHSCROLL - LTEXT " ""1"", . . , .", -1, 20, 50, 291, 53 + LTEXT "Возможно потребуется добавить ""1"", код региона или оба числа вместе. Для проверки наберите комбинацию номера и кода на своем телефоне. Комбинация подобрана правильно, если слышен звук модема.", -1, 20, 50, 291, 53 END 169 DIALOGEX 6, 18, 235, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Телефонная книга" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", 1326, 8, 8, 222, 8 - AUTORADIOBUTTON "& ", 1325, 14, 22, 216, 10, WS_GROUP - AUTORADIOBUTTON "& ", 1324, 14, 34, 216, 10 - AUTORADIOBUTTON "& :", 1323, 14, 46, 217, 10 + LTEXT "Для хранения записей используется:", 1326, 8, 8, 222, 8 + AUTORADIOBUTTON "&Телефонная книга системы", 1325, 14, 22, 216, 10, WS_GROUP + AUTORADIOBUTTON "&Личная телефонная книга", 1324, 14, 34, 216, 10 + AUTORADIOBUTTON "&Дополнительная телефонная книга:", 1323, 14, 46, 217, 10 COMBOBOX 1321, 26, 61, 201, 77, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&...", 1322, 167, 81, 60, 14 + PUSHBUTTON "&Обзор...", 1322, 167, 81, 60, 14 END 170 DIALOGEX 6, 18, 235, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Телефонная книга" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", 1326, 8, 8, 223, 8 - AUTORADIOBUTTON "& ", 1325, 14, 22, 217, 10, WS_GROUP - AUTORADIOBUTTON "& :", 1323, 14, 36, 216, 10 + LTEXT "Для хранения записей используется:", 1326, 8, 8, 223, 8 + AUTORADIOBUTTON "&телефонная книга системы", 1325, 14, 22, 217, 10, WS_GROUP + AUTORADIOBUTTON "&дополнительная телефонная книга:", 1323, 14, 36, 216, 10 COMBOBOX 1321, 26, 51, 203, 77, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&...", 1322, 169, 69, 60, 14 + PUSHBUTTON "&Обзор...", 1322, 169, 69, 60, 14 END 171 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP- (0.0.0.0), , . .", 1331, 5, 4, 308, 35 - LTEXT "& IP-:", 1332, 4, 51, 100, 8, NOT WS_GROUP + LTEXT "Введите IP-адрес этого маршрутизатора в удаленной сети или оставьте его нулевым (0.0.0.0), если ожидается, что этот адрес предоставит удаленный маршрутизатор. Обратитесь к оператору удаленной сети или маршрутизатора за необходимыми сведениями.", 1331, 5, 4, 308, 35 + LTEXT "&Мой IP-адрес:", 1332, 4, 51, 100, 8, NOT WS_GROUP CONTROL "", 1330, "RASIPADDRESS", WS_TABSTOP, 21, 62, 104, 12 - LTEXT ": , .", 1333, 5, 94, 306, 36, NOT WS_GROUP + LTEXT "Примечание: при наличии установленного сетевого адаптера НЕ СЛЕДУЕТ использовать тот же адрес, что у сетевого адаптера.", 1333, 5, 94, 306, 36, NOT WS_GROUP END 172 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . - .", 1339, 5, 3, 309, 27 - AUTOCHECKBOX "& ", 1462, 15, 31, 162, 10 - AUTOCHECKBOX "&:", 1463, 15, 45, 58, 10 + LTEXT "Некоторые серверы удаленного доступа и маршрутизаторы при регистрации требуют ввода информации от пользователя. Вы можете использовать файлы-сценарии для автоматического ввода информации о вашей учетной записи.", 1339, 5, 3, 309, 27 + AUTOCHECKBOX "&Вывести окно терминала", 1462, 15, 31, 162, 10 + AUTOCHECKBOX "&Сценарий:", 1463, 15, 45, 58, 10 COMBOBOX 1334, 30, 60, 275, 88, CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1335, 180, 77, 60, 14 - PUSHBUTTON "&...", 1465, 244, 77, 60, 14 + PUSHBUTTON "&Изменить...", 1335, 180, 77, 60, 14 + PUSHBUTTON "&Обзор...", 1465, 244, 77, 60, 14 END 173 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Набор номера" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1344, 9, 4, 213, 53, WS_GROUP - LTEXT "& :", 1349, 16, 22, 140, 8, NOT WS_GROUP + GROUPBOX "Политика набора номера", 1344, 9, 4, 213, 53, WS_GROUP + LTEXT "&Число повторений набора номера:", 1349, 16, 22, 140, 8, NOT WS_GROUP EDITTEXT 1340, 158, 19, 56, 14, ES_AUTOHSCROLL - LTEXT "& ():", 1351, 16, 38, 140, 8, NOT WS_GROUP + LTEXT "&Интервал между повторениями (с):", 1351, 16, 38, 140, 8, NOT WS_GROUP EDITTEXT 1342, 158, 36, 56, 14, ES_AUTOHSCROLL - GROUPBOX " ", 1343, 9, 63, 213, 56, WS_GROUP - LTEXT "& ():", 1350, 28, 88, 124, 8, NOT WS_GROUP - AUTORADIOBUTTON "& ", 1347, 16, 78, 135, 10, WS_GROUP - AUTORADIOBUTTON "& ", 1348, 16, 103, 199, 10, NOT WS_TABSTOP, WS_EX_TRANSPARENT + GROUPBOX "Тип подключения", 1343, 9, 63, 213, 56, WS_GROUP + LTEXT "&Время простоя до разъединения (с):", 1350, 28, 88, 124, 8, NOT WS_GROUP + AUTORADIOBUTTON "Под&ключение по требованию", 1347, 16, 78, 135, 10, WS_GROUP + AUTORADIOBUTTON "&Постоянное подключение", 1348, 16, 103, 199, 10, NOT WS_TABSTOP, WS_EX_TRANSPARENT EDITTEXT 1341, 159, 85, 56, 14, ES_AUTOHSCROLL - PUSHBUTTON "& ...", 1345, 140, 125, 80, 14, WS_GROUP - PUSHBUTTON "& ...", 1346, 55, 125, 80, 14 + PUSHBUTTON "&Ответный вызов...", 1345, 140, 125, 80, 14, WS_GROUP + PUSHBUTTON "&Несколько линий...", 1346, 55, 125, 80, 14 END 174 DIALOGEX 0, 0, 215, 226 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Маршрутизатор" FONT 8, "MS Shell Dlg" BEGIN CTEXT "NYI...need spec from KCrocker", -1, 57, 86, 106, 28 @@ -787,74 +787,74 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 1352, 122, 5, 192, 32 - LTEXT " """".", 1354, 122, 41, 192, 26, NOT WS_GROUP - LTEXT " , """".", 1355, 122, 68, 190, 39, NOT WS_GROUP + LTEXT "Работа мастера интерфейса вызова по требованию успешно завершена.", 1352, 122, 5, 192, 32 + LTEXT "Для создания этого интерфейса и подключения его к маршрутизатору нажмите кнопку ""Готово"".", 1354, 122, 41, 192, 26, NOT WS_GROUP + LTEXT "Чтобы изменить этот интерфейс, с помощью диспетчера маршрутизации и удаленного доступа выберите его среди интерфейсов маршрутизатора и нажмите кнопку ""Свойства"".", 1355, 122, 68, 190, 39, NOT WS_GROUP END 179 DIALOGEX 6, 18, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& .", 1356, 7, 4, 306, 11 + LTEXT "&Выберите используемый модем или адаптер.", 1356, 7, 4, 306, 11 CONTROL "", 1355, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C415, 6, 15, 305, 80 - LTEXT " , .", 1357, 15, 98, 288, 37, NOT WS_GROUP + LTEXT "В этом списке перечислены устройства, выбранные для маршрутизации.", 1357, 15, 98, 288, 37, NOT WS_GROUP END 180 DIALOGEX 6, 18, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . , , .", 1360, 7, 4, 305, 42 - LTEXT "& :", 1361, 7, 50, 275, 8, NOT WS_GROUP + LTEXT "Введите номер телефона сервера удаленного доступа или маршрутизатора. Если этот номер окажется недоступен, то будут сделаны попытки доступа по дополнительным номерам, если таковые существуют.", 1360, 7, 4, 305, 42 + LTEXT "&Номер телефона или адрес:", 1361, 7, 50, 275, 8, NOT WS_GROUP EDITTEXT 1358, 7, 62, 304, 14, ES_AUTOHSCROLL - PUSHBUTTON "...", 1359, 240, 80, 70, 14 + PUSHBUTTON "Дополнительно...", 1359, 240, 80, 70, 14 END 181 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Безопасность" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1367, 6, 8, 216, 103, WS_GROUP - AUTORADIOBUTTON "& ( )", 1370, 16, 20, 204, 10, BS_TOP | BS_MULTILINE - AUTORADIOBUTTON "& ", 1373, 16, 36, 195, 10, BS_TOP | BS_MULTILINE - AUTORADIOBUTTON "& MS ", 1374, 16, 52, 195, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1363, 27, 65, 184, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTOCHECKBOX "& ", 1364, 41, 80, 172, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1362, 17, 95, 194, 10, BS_TOP | BS_MULTILINE - PUSHBUTTON "& ", 1369, 19, 117, 120, 14, WS_GROUP - PUSHBUTTON "&...", 1368, 142, 117, 80, 14, NOT WS_VISIBLE | WS_DISABLED - AUTOCHECKBOX "& ", 1365, 7, 198, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED + GROUPBOX "Политика проверки подлинности и шифрования", 1367, 6, 8, 216, 103, WS_GROUP + AUTORADIOBUTTON "До&пустимы незашифрованные пароли (обычный текст)", 1370, 16, 20, 204, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "Тре&бовать шифрование паролей", 1373, 16, 36, 195, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "Тр&ебовать шифрование MS для паролей", 1374, 16, 52, 195, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Требовать шифрование данных", 1363, 27, 65, 184, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Требоват&ь стойкое шифрование данных", 1364, 41, 80, 172, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Д&вусторонняя проверка подлинности", 1362, 17, 95, 194, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Стереть сохраненный пароль", 1369, 19, 117, 120, 14, WS_GROUP + PUSHBUTTON "&Дополнительно...", 1368, 142, 117, 80, 14, NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "&Определять общие файлы и принтеры до установки связи", 1365, 7, 198, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED END 182 DIALOGEX 6, 18, 248, 148 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Безопасность" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1367, 7, 8, 216, 98, WS_GROUP - AUTORADIOBUTTON "& ( )", 1370, 14, 24, 206, 10 - AUTORADIOBUTTON "& ", 1373, 14, 39, 183, 10 - AUTORADIOBUTTON "& MS ", 1374, 14, 53, 184, 10 - AUTOCHECKBOX "& ", 1363, 33, 67, 165, 10, WS_GROUP - AUTOCHECKBOX "& ", 1364, 48, 79, 152, 10 - AUTOCHECKBOX "& ", 1366, 31, 91, 165, 10 - PUSHBUTTON "& ", 1369, 6, 114, 120, 14, WS_GROUP - PUSHBUTTON "&...", 1368, 129, 114, 78, 14, NOT WS_VISIBLE | WS_DISABLED - AUTOCHECKBOX "& ", 1365, 14, 134, 225, 10, NOT WS_VISIBLE | WS_DISABLED + GROUPBOX "Политика проверки подлинности и шифрования", 1367, 7, 8, 216, 98, WS_GROUP + AUTORADIOBUTTON "До&пустимы незашифрованные пароли (обычный текст)", 1370, 14, 24, 206, 10 + AUTORADIOBUTTON "Тре&бовать шифрование паролей", 1373, 14, 39, 183, 10 + AUTORADIOBUTTON "Тр&ебовать шифрование MS для паролей", 1374, 14, 53, 184, 10 + AUTOCHECKBOX "&Требовать шифрования данных", 1363, 33, 67, 165, 10, WS_GROUP + AUTOCHECKBOX "Требоват&ь стойкое шифрование данных", 1364, 48, 79, 152, 10 + AUTOCHECKBOX "&Использовать текущие имя и пароль", 1366, 31, 91, 165, 10 + PUSHBUTTON "&Стереть сохраненный пароль", 1369, 6, 114, 120, 14, WS_GROUP + PUSHBUTTON "&Дополнительно...", 1368, 129, 114, 78, 14, NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "&Определять общие файлы и принтеры до установки связи", 1365, 14, 134, 225, 10, NOT WS_VISIBLE | WS_DISABLED END 183 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", 1388, 7, 4, 296, 9 - AUTOCHECKBOX " & IP .", 1386, 20, 19, 285, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX " & IPX .", 1387, 20, 35, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& .", 1382, 20, 52, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& , .", 1385, 20, 70, 287, 18, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& .", 1384, 20, 87, 289, 22, BS_LEFT | BS_TOP | BS_MULTILINE + LTEXT "Отметьте все применимые параметры:", 1388, 7, 4, 296, 9 + AUTOCHECKBOX "Перенаправлять &пакеты IP на этот интерфейс.", 1386, 20, 19, 285, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Перенаправлять п&акеты IPX на этот интерфейс.", 1387, 20, 35, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "До&бавить учетную запись для входящих звонков удаленного маршрутизатора.", 1382, 20, 52, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Использовать незашифрованный пароль, если это единственный способ подключения.", 1385, 20, 70, 287, 18, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "И&спользовать сценарий для завершения подключения к удаленному маршрутизатору.", 1384, 20, 87, 289, 22, BS_LEFT | BS_TOP | BS_MULTILINE END 184 DIALOGEX 0, 0, 317, 143 @@ -865,202 +865,202 @@ END 186 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ", , , , .", -1, 7, 4, 306, 26 - LTEXT " :", -1, 14, 29, 288, 12 - AUTORADIOBUTTON " & ", 1400, 26, 40, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON " &", 1401, 26, 55, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Подключение, которое создается только для вашего использования, сохраняется в профиле вашей учетной записи, и оно недоступно до тех пор, пока вы не выполнили вход в систему.", -1, 7, 4, 306, 26 + LTEXT "Создать это подключение:", -1, 14, 29, 288, 12 + AUTORADIOBUTTON "для в&сех пользователей", 1400, 26, 40, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "только для мен&я", 1401, 26, 55, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 498 DIALOGEX 12, 16, 215, 126 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS , . .", 1396, 7, 6, 206, 36 - LTEXT "& :", 1399, 8, 51, 74, 8 + LTEXT "Системе ReactOS не удалось подключиться к сети, используя предоставленные пароль и имя пользователя. Повторите ввод пароля и имени пользователя.", 1396, 7, 6, 206, 36 + LTEXT "&Имя пользователя:", 1399, 8, 51, 74, 8 EDITTEXT 1394, 85, 46, 124, 14, ES_AUTOHSCROLL - LTEXT "&:", 1397, 8, 70, 74, 8, NOT WS_GROUP + LTEXT "П&ароль:", 1397, 8, 70, 74, 8, NOT WS_GROUP EDITTEXT 1393, 85, 64, 124, 14, ES_PASSWORD | ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1391, 66, 84, 143, 10 + AUTOCHECKBOX "С&охранить пароль", 1391, 66, 84, 143, 10 CONTROL "", 1398, "STATIC", SS_ETCHEDHORZ | WS_GROUP, 7, 98, 200, 1 DEFPUSHBUTTON "OK", 1, 81, 104, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 145, 104, 60, 14 + PUSHBUTTON "Отмена", 2, 145, 104, 60, 14 END 500 DIALOGEX 12, 16, 215, 173 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS , . .", 1396, 7, 6, 209, 26 - LTEXT "& :", 1399, 7, 72, 80, 8 + LTEXT "Системе ReactOS не удалось подключиться к сети, используя предоставленные пароль и имя пользователя. Повторите ввод пароля и имени пользователя.", 1396, 7, 6, 209, 26 + LTEXT "&Имя пользователя:", 1399, 7, 72, 80, 8 EDITTEXT 1394, 97, 69, 115, 14, ES_AUTOHSCROLL - LTEXT "&:", 1397, 7, 90, 45, 8, NOT WS_GROUP + LTEXT "П&ароль:", 1397, 7, 90, 45, 8, NOT WS_GROUP EDITTEXT 1393, 97, 87, 115, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1395, 7, 108, 53, 8, NOT WS_GROUP + LTEXT "&Домен:", 1395, 7, 108, 53, 8, NOT WS_GROUP EDITTEXT 1392, 97, 105, 115, 14, ES_UPPERCASE | ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1391, 85, 125, 123, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&охранить пароль", 1391, 85, 125, 123, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 87, 146, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 151, 146, 60, 14 + PUSHBUTTON "Отмена", 2, 151, 146, 60, 14 CONTROL "", 1398, "STATIC", SS_ETCHEDHORZ | WS_GROUP, 7, 140, 205, 1 - LTEXT " .\n( )", -1, 8, 38, 209, 26 + LTEXT "Поле имени домена можно заполнить или оставить пустым.\n(Имя домена не является необходимым для подключения к Интернет)", -1, 8, 38, 209, 26 END 502 DIALOGEX 20, 60, 215, 79 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " PPP" +CAPTION "Параметры PPP" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& LCP", 1423, 9, 7, 200, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1424, 9, 22, 201, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX " & ", 1557, 9, 37, 202, 21, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Включить расширения LCP", 1423, 9, 7, 200, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Использовать программное сжатие данных", 1424, 9, 22, 201, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Согласовывать &многоканальное подключение для одноканальных подключений", 1557, 9, 37, 202, 21, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 82, 60, 60, 14 - PUSHBUTTON "", 2, 148, 60, 60, 14 + PUSHBUTTON "Отмена", 2, 148, 60, 60, 14 END 509 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ", :", -1, 10, 5, 275, 9 - AUTORADIOBUTTON "& ", 1483, 31, 20, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& ", 1484, 31, 50, 265, 10, BS_TOP | BS_MULTILINE - LTEXT " , .", -1, 45, 31, 253, 19, NOT WS_GROUP | WS_TABSTOP - LTEXT " , .", -1, 45, 61, 253, 23, NOT WS_GROUP + LTEXT "Выберите, в какой роли будет обычно выступать этот компьютер:", -1, 10, 5, 275, 9 + AUTORADIOBUTTON "&Ведомый компьютер", 1483, 31, 20, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "В&едущий компьютер", 1484, 31, 50, 265, 10, BS_TOP | BS_MULTILINE + LTEXT "На этом компьютере хранится информация, к которой вы хотите получить доступ.", -1, 45, 31, 253, 19, NOT WS_GROUP | WS_TABSTOP + LTEXT "Этот компьютер используется для получения доступа к информации, хранящейся на ведомом компьютере.", -1, 45, 61, 253, 23, NOT WS_GROUP END 511 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " &:", -1, 8, 5, 261, 8 + LTEXT "Выберите у&стройство:", -1, 8, 5, 261, 8 COMBOBOX 1485, 9, 18, 302, 62, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END 528 DIALOGEX 0, 0, 227, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Подключения" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1582, 8, 10, 213, 63 - LTEXT " , .", 1581, 16, 21, 194, 30 - AUTOCHECKBOX "& ", 1497, 16, 56, 195, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Привилегии входа", 1582, 8, 10, 213, 63 + LTEXT "Можно разрешить создавать и изменять подключения перед входом в сеть для пользователей, не являющихся администраторами.", 1581, 16, 21, 194, 30 + AUTOCHECKBOX "&Разрешить создание и изменение подключений перед входом в сеть", 1497, 16, 56, 195, 10, BS_TOP | BS_MULTILINE END 532 DIALOGEX 0, 0, 263, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Ответный вызов маршрутизатора" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . , .", 1043, 7, 3, 253, 33 - AUTORADIOBUTTON "& ", 1501, 9, 36, 252, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& :", 1502, 9, 48, 252, 10, BS_TOP | BS_MULTILINE, WS_EX_TRANSPARENT + LTEXT "При звонке на маршрутизатор вам может быть предложено принять ответный вызов для уменьшения ваших расходов на связь и повышения безопасности соединения. Укажите, нужна ли вам возможность ответного вызова.", 1043, 7, 3, 253, 33 + AUTORADIOBUTTON "&Ответный вызов не выполняется", 1501, 9, 36, 252, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Всегда выполнять ответный вызов по указанным номерам:", 1502, 9, 48, 252, 10, BS_TOP | BS_MULTILINE, WS_EX_TRANSPARENT CONTROL "", 1503, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00008401, 15, 63, 240, 143 - PUSHBUTTON "&...", 1504, 131, 213, 60, 14 - PUSHBUTTON "&", 1505, 194, 213, 60, 14 + PUSHBUTTON "&Изменить...", 1504, 131, 213, 60, 14 + PUSHBUTTON "&Удалить", 1505, 194, 213, 60, 14 CONTROL "", -1, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 DEFPUSHBUTTON "OK", 1, 132, 242, 60, 14 - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Отмена", 2, 196, 242, 60, 14 END 534 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1289, 7, 7, 215, 55 - AUTORADIOBUTTON "& ", 1506, 16, 20, 199, 9, BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - LTEXT "& :", 1299, 27, 33, 117, 8, NOT WS_GROUP + GROUPBOX "Тип подключения", 1289, 7, 7, 215, 55 + AUTORADIOBUTTON "Вы&зов по требованию", 1506, 16, 20, 199, 9, BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + LTEXT "&Время простоя до разъединения:", 1299, 27, 33, 117, 8, NOT WS_GROUP COMBOBOX 1291, 144, 30, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTORADIOBUTTON "& ", 1507, 16, 47, 197, 9, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - GROUPBOX " ", 1290, 7, 66, 215, 48 - LTEXT "& :", 1300, 14, 79, 123, 8 + AUTORADIOBUTTON "Посто&янное подключение", 1507, 16, 47, 197, 9, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + GROUPBOX "Политика набора номера", 1290, 7, 66, 215, 48 + LTEXT "&Число повторений набора номера:", 1300, 14, 79, 123, 8 EDITTEXT 1287, 143, 76, 70, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "& :", 1301, 14, 96, 123, 8 + LTEXT "&Среднее время между попытками:", 1301, 14, 96, 123, 8 COMBOBOX 1292, 143, 94, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1288, 7, 116, 215, 35 + GROUPBOX "Использование нескольких устройств", 1288, 7, 116, 215, 35 COMBOBOX 1551, 16, 130, 128, 41, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1293, 150, 129, 65, 14 - PUSHBUTTON "& ", 1302, 8, 195, 80, 14 + PUSHBUTTON "&Настроить...", 1293, 150, 129, 65, 14 + PUSHBUTTON "&Ответный вызов", 1302, 8, 195, 80, 14 PUSHBUTTON "&X.25", 1295, 93, 195, 50, 14 END 539 DIALOGEX 0, 0, 265, 110 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 14, 64, 84, 8 + LTEXT "&Пользователь:", 1413, 14, 64, 84, 8 EDITTEXT 1104, 102, 62, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 82, 247, 1 - DEFPUSHBUTTON "&", 1590, 8, 89, 60, 14 - PUSHBUTTON "", 1591, 71, 89, 60, 14 - PUSHBUTTON "&", 1107, 133, 89, 60, 14 - PUSHBUTTON "&", 1592, 195, 89, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 89, 60, 14 + PUSHBUTTON "Отмена", 1591, 71, 89, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 133, 89, 60, 14 + PUSHBUTTON "&Справка", 1592, 195, 89, 60, 14 END 540 DIALOGEX 0, 0, 265, 133 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 64, 90, 8 + LTEXT "&Пользователь:", 1413, 10, 64, 90, 8 EDITTEXT 1104, 105, 60, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 80, 252, 1 - LTEXT "&:", 1412, 10, 91, 92, 10 + LTEXT "&Набрать:", 1412, 10, 91, 92, 10 COMBOBOX 1416, 105, 88, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 107, 251, 1 - DEFPUSHBUTTON "&", 1590, 8, 113, 60, 14 - PUSHBUTTON "", 1591, 71, 113, 60, 14 - PUSHBUTTON "&", 1107, 134, 113, 60, 14 - PUSHBUTTON "&", 1592, 197, 113, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 113, 60, 14 + PUSHBUTTON "Отмена", 1591, 71, 113, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 134, 113, 60, 14 + PUSHBUTTON "&Справка", 1592, 197, 113, 60, 14 END 541 DIALOGEX 0, 0, 265, 157 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 12, 67, 87, 8 + LTEXT "&Пользователь:", 1413, 12, 67, 87, 8 EDITTEXT 1104, 103, 63, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 84, 248, 1 - LTEXT "&:", 1412, 11, 96, 48, 8 + LTEXT "&Набрать:", 1412, 11, 96, 48, 8 COMBOBOX 1416, 103, 92, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1415, 10, 114, 46, 8 + LTEXT "&Место вызова:", 1415, 10, 114, 46, 8 COMBOBOX 1414, 102, 110, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 193, 110, 64, 14 + PUSHBUTTON "Прави&ла", 1108, 193, 110, 64, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 130, 250, 1 - DEFPUSHBUTTON "&", 1590, 6, 136, 60, 14 - PUSHBUTTON "", 1591, 69, 136, 60, 14 - PUSHBUTTON "&", 1107, 132, 136, 60, 14 - PUSHBUTTON "&", 1592, 196, 136, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 6, 136, 60, 14 + PUSHBUTTON "Отмена", 1591, 69, 136, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 132, 136, 60, 14 + PUSHBUTTON "&Справка", 1592, 196, 136, 60, 14 END 544 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", -1, 10, 5, 300, 22 - AUTOCHECKBOX "& ", 1512, 21, 31, 272, 10 - LTEXT " , , .", 1514, 10, 56, 294, 27 - AUTOCHECKBOX "& ", 1513, 21, 86, 260, 10 + LTEXT "Общий доступ к подключению Интернета позволят компьютерам в локальной сети получить доступ к внешним ресурсам через это подключение.", -1, 10, 5, 300, 22 + AUTOCHECKBOX "&Разрешить общий доступ для этого подключения", 1512, 21, 31, 272, 10 + LTEXT "Чтобы устанавливать данное подключение автоматически, когда другой компьютер в вашей локальной сети пытается получить доступ к внешним ресурсам, установить флажок ниже.", 1514, 10, 56, 294, 27 + AUTOCHECKBOX "Ра&зрешить вызов по требованию", 1513, 21, 86, 260, 10 END 545 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . .", -1, 10, 5, 300, 37 - LTEXT "& , :", -1, 21, 43, 285, 8 + LTEXT "Общий доступ позволят другим компьютерам в локальной сети получить доступ к внешним ресурсам через это удаленное подключение. В каждый момент времени разрешение на общий доступ можно выдать только для одного подключения и одной сети.", -1, 10, 5, 300, 37 + LTEXT "&Выберите локальную сеть, которая получит доступ через это подключение:", -1, 21, 43, 285, 8 COMBOBOX 1522, 21, 55, 231, 56, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END @@ -1068,274 +1068,274 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " - . , - .", -1, 10, 5, 303, 27 - AUTORADIOBUTTON "& - ", 1524, 26, 36, 264, 12, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& - ", 1525, 26, 52, 261, 16, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Вы можете настроить это подключение для использования смарт-карты для входа в удаленную сеть. Укажите, следует ли использовать смарт-карту для этого подключения.", -1, 10, 5, 303, 27 + AUTORADIOBUTTON "&Использовать мою смарт-карту ", 1524, 26, 36, 264, 12, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Не использовать мою смарт-карту ", 1525, 26, 52, 261, 16, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 547 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Мастер интерфейса вызова по требованию" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 1530, 122, 8, 192, 32 - LTEXT " .", 1531, 122, 43, 192, 37 - LTEXT " """".", 1532, 122, 85, 191, 29 + LTEXT "Мастер интерфейса вызова по требованию.", 1530, 122, 8, 192, 32 + LTEXT "Используя этот мастер можно создать интерфейс вызова по требованию для подключения этого маршрутизатора к другим маршрутизаторам.", 1531, 122, 43, 192, 37 + LTEXT "Для продолжения нажмите кнопку ""Далее"".", 1532, 122, 85, 191, 29 END 548 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON " &, ISDN .", 1531, 21, 17, 290, 15, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON " & (VPN)", 1532, 21, 38, 291, 15, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON " Ethernet (PPPoE) PPP", 1688, 21, 58, 290, 12, NOT WS_TABSTOP + AUTORADIOBUTTON "Подключаться используя &модем, адаптер ISDN или другое устройство.", 1531, 21, 17, 290, 15, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "Подключаться с использованием &виртуальной частной сети (VPN)", 1532, 21, 38, 291, 15, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Подключаться через Ethernet (PPPoE) с использованием PPP", 1688, 21, 58, 290, 12, NOT WS_TABSTOP END 550 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP- .", 1535, 10, 8, 289, 18 - LTEXT "& IP- (, reactos.org 145.52.0.1):", 1537, 21, 35, 285, 8 + LTEXT "Введите имя или IP-адрес маршрутизатора к которому производится подключение.", 1535, 10, 8, 289, 18 + LTEXT "&Имя компьютера или IP-адрес (например, reactos.org или 145.52.0.1):", 1537, 21, 35, 285, 8 EDITTEXT 1536, 21, 47, 285, 14, ES_AUTOHSCROLL END 551 DIALOGEX 0, 0, 265, 127 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 12, 62, 89, 8 + LTEXT "&Пользователь:", 1413, 12, 62, 89, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1110, 12, 82, 90, 8 + LTEXT "&Домен:", 1110, 12, 82, 90, 8 EDITTEXT 1102, 104, 79, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 99, 248, 1 - DEFPUSHBUTTON "&", 1590, 9, 106, 61, 14 - PUSHBUTTON "", 1591, 72, 106, 60, 14 - PUSHBUTTON "&", 1107, 135, 106, 60, 14 - PUSHBUTTON "&", 1592, 198, 106, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 9, 106, 61, 14 + PUSHBUTTON "Отмена", 1591, 72, 106, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 135, 106, 60, 14 + PUSHBUTTON "&Справка", 1592, 198, 106, 60, 14 END 552 DIALOGEX 0, 0, 265, 159 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 67, 91, 10 + LTEXT "&Пользователь:", 1413, 10, 67, 91, 10 EDITTEXT 1104, 104, 64, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1110, 11, 86, 91, 8 + LTEXT "&Домен:", 1110, 11, 86, 91, 8 EDITTEXT 1102, 104, 83, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 103, 248, 1 - LTEXT "&:", 1412, 10, 115, 91, 8 + LTEXT "&Набрать:", 1412, 10, 115, 91, 8 COMBOBOX 1416, 104, 111, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 132, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 139, 60, 14 - PUSHBUTTON "", 1591, 71, 139, 60, 14 - PUSHBUTTON "&", 1107, 134, 139, 60, 14 - PUSHBUTTON "&", 1592, 198, 139, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 139, 60, 14 + PUSHBUTTON "Отмена", 1591, 71, 139, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 134, 139, 60, 14 + PUSHBUTTON "&Справка", 1592, 198, 139, 60, 14 END 553 DIALOGEX 0, 0, 265, 183 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 68, 92, 10 + LTEXT "&Пользователь:", 1413, 10, 68, 92, 10 EDITTEXT 1104, 104, 65, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1110, 10, 90, 91, 8 + LTEXT "&Домен:", 1110, 10, 90, 91, 8 EDITTEXT 1102, 104, 86, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 106, 248, 1 - LTEXT "&:", 1412, 10, 118, 92, 8 + LTEXT "&Набрать:", 1412, 10, 118, 92, 8 COMBOBOX 1416, 104, 114, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1415, 10, 137, 91, 8 + LTEXT "&Место вызова:", 1415, 10, 137, 91, 8 COMBOBOX 1414, 104, 134, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 194, 134, 65, 14 + PUSHBUTTON "Прави&ла", 1108, 194, 134, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 154, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 162, 60, 14 - PUSHBUTTON "", 1591, 71, 162, 60, 14 - PUSHBUTTON "&", 1107, 134, 162, 60, 14 - PUSHBUTTON "&", 1592, 198, 162, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 162, 60, 14 + PUSHBUTTON "Отмена", 1591, 71, 162, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 134, 162, 60, 14 + PUSHBUTTON "&Справка", 1592, 198, 162, 60, 14 END 554 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1124, 7, 4, 193, 8 + LTEXT "&Подключаться через:", 1124, 7, 4, 193, 8 CONTROL "", 1128, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00004C0D, 7, 17, 195, 44, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1132, 208, 18, 16, 14, BS_ICON - PUSHBUTTON "&", 1131, 208, 36, 16, 14, BS_ICON - AUTOCHECKBOX "& ", 1119, 7, 65, 131, 21, BS_TOP | BS_MULTILINE - PUSHBUTTON "&...", 1130, 140, 66, 60, 14 - GROUPBOX "", 1125, 7, 87, 213, 56, WS_GROUP - LTEXT "& :", 1135, 19, 102, 191, 8 + PUSHBUTTON "&Вверх", 1132, 208, 18, 16, 14, BS_ICON + PUSHBUTTON "В&низ", 1131, 208, 36, 16, 14, BS_ICON + AUTOCHECKBOX "О&бщие номера для подключения всех устройств", 1119, 7, 65, 131, 21, BS_TOP | BS_MULTILINE + PUSHBUTTON "На&строить...", 1130, 140, 66, 60, 14 + GROUPBOX "Образец", 1125, 7, 87, 213, 56, WS_GROUP + LTEXT "Но&мер телефона:", 1135, 19, 102, 191, 8 EDITTEXT 1123, 17, 112, 138, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 161, 112, 50, 14 - AUTOCHECKBOX " & ", 1120, 11, 194, 212, 20, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Другие", 1129, 161, 112, 50, 14 + AUTOCHECKBOX "При подключении в&ывести значок в области уведомлений", 1120, 11, 194, 212, 20, BS_TOP | BS_MULTILINE END 555 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "&...", 1130, 160, 38, 60, 14 - LTEXT "& :", 1135, 8, 72, 194, 8 + PUSHBUTTON "&Настроить...", 1130, 160, 38, 60, 14 + LTEXT "Но&мер телефона:", 1135, 8, 72, 194, 8 EDITTEXT 1123, 8, 83, 148, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 160, 83, 60, 14 - AUTOCHECKBOX " & ", 1120, 11, 194, 213, 10, BS_TOP | BS_MULTILINE - LTEXT "& :", 1124, 8, 5, 214, 8 + PUSHBUTTON "&Другие", 1129, 160, 83, 60, 14 + AUTOCHECKBOX "При подключении в&ывести значок в области уведомлений", 1120, 11, 194, 213, 10, BS_TOP | BS_MULTILINE + LTEXT "&Подключаться через:", 1124, 8, 5, 214, 8 CONTROL "", 1127, "SYSLISTVIEW32", WS_DISABLED | WS_BORDER | 0x0000EC0D, 7, 18, 214, 15 END 556 DIALOGEX 0, 0, 220, 165 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Параметры программ" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& , :", -1, 7, 5, 203, 8 + LTEXT "Опис&ание программы, работающей в вашей сети:", -1, 7, 5, 203, 8 EDITTEXT 1565, 7, 17, 206, 14, ES_AUTOHSCROLL - LTEXT "& -:", -1, 7, 35, 202, 8 + LTEXT "Ном&ер порта Интернет-сервера:", -1, 7, 35, 202, 8 EDITTEXT 1566, 7, 47, 113, 14, ES_AUTOHSCROLL | ES_NUMBER - AUTORADIOBUTTON "& TCP", 1548, 125, 50, 45, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "& UDP", 1567, 172, 50, 47, 10, NOT WS_TABSTOP - LTEXT "& -:\n(: 1024-1209, 1300-1310, 1450)", -1, 7, 70, 207, 27 - LTEXT "& TCP:", -1, 7, 100, 40, 8 + AUTORADIOBUTTON "дл&я TCP", 1548, 125, 50, 45, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "д&ля UDP", 1567, 172, 50, 47, 10, NOT WS_TABSTOP + LTEXT "&Порт или диапазон портов для прослушивания ответных сообщений от Интернет-серверов:\n(например: 1024-1209, 1300-1310, 1450)", -1, 7, 70, 207, 27 + LTEXT "п&орт TCP:", -1, 7, 100, 40, 8 EDITTEXT 1569, 50, 97, 162, 14, ES_AUTOHSCROLL - LTEXT "& UDP:", -1, 7, 121, 40, 8 + LTEXT "пор&т UDP:", -1, 7, 121, 40, 8 EDITTEXT 1551, 50, 117, 162, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 90, 144, 60, 14 - PUSHBUTTON "", 2, 154, 144, 60, 14 + PUSHBUTTON "Отмена", 2, 154, 144, 60, 14 END 557 DIALOGEX 0, 0, 217, 164 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Параметры службы" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 5, 203, 8 + LTEXT "&Описание службы:", -1, 7, 5, 203, 8 EDITTEXT 1552, 7, 18, 205, 14, ES_AUTOHSCROLL - LTEXT "& IP- , (, 192.168.0.12):", -1, 7, 37, 208, 16 + LTEXT "&Имя или IP-адрес компьютера вашей сети, на котором располагается эта служба (например, 192.168.0.12):", -1, 7, 37, 208, 16 EDITTEXT 1556, 7, 57, 203, 14, ES_AUTOHSCROLL - LTEXT " &, :", -1, 7, 85, 203, 8 + LTEXT "Номер порт&а, на котором располагается эта служба:", -1, 7, 85, 203, 8 EDITTEXT 1553, 7, 97, 113, 14, ES_AUTOHSCROLL | ES_NUMBER - AUTORADIOBUTTON "& TCP", 1554, 126, 100, 44, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "& UDP", 1555, 170, 100, 47, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "дл&я TCP", 1554, 126, 100, 44, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "д&ля UDP", 1555, 170, 100, 47, 10, NOT WS_TABSTOP DEFPUSHBUTTON "OK", 1, 86, 143, 60, 14 - PUSHBUTTON "", 2, 150, 143, 60, 14 + PUSHBUTTON "Отмена", 2, 150, 143, 60, 14 END 558 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Программы" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , :", -1, 7, 7, 218, 28 + LTEXT "Подключение к Интернету на этом компьютере было настроено таким образом, чтобы разрешить запускаться в вашей сети следующим программам:", -1, 7, 7, 218, 28 CONTROL "List1", 1558, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000441D, 7, 37, 215, 155, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1538, 7, 197, 67, 14 - PUSHBUTTON "&...", 1559, 80, 197, 67, 14 - PUSHBUTTON "&", 1568, 153, 197, 67, 14 + PUSHBUTTON "&Добавить...", 1538, 7, 197, 67, 14 + PUSHBUTTON "&Изменить...", 1559, 80, 197, 67, 14 + PUSHBUTTON "&Удалить", 1568, 153, 197, 67, 14 END 559 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Службы" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& , , .", -1, 7, 5, 216, 22 - LTEXT ":", -1, 7, 27, 143, 8 + LTEXT "&Выберите службы, работающие в вашей сети, к которым могут получать доступ пользователи Интернета.", -1, 7, 5, 216, 22 + LTEXT "Службы:", -1, 7, 27, 143, 8 CONTROL "List1", 1560, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000441D, 7, 37, 215, 155, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1561, 7, 197, 67, 14 - PUSHBUTTON "&...", 1563, 80, 197, 67, 14 - PUSHBUTTON "&", 1562, 153, 197, 67, 14 + PUSHBUTTON "&Добавить...", 1561, 7, 197, 67, 14 + PUSHBUTTON "&Изменить...", 1563, 80, 197, 67, 14 + PUSHBUTTON "&Удалить", 1562, 153, 197, 67, 14 END 560 DIALOGEX 6, 18, 240, 88 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Начальное подключение" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", 6, 68, 68, 50, 14 - PUSHBUTTON "&", 7, 125, 68, 50, 14 + DEFPUSHBUTTON "&Да", 6, 68, 68, 50, 14 + PUSHBUTTON "&Нет", 7, 125, 68, 50, 14 ICON 32516, 1575, 7, 7, 20, 20 LTEXT "", 1576, 40, 7, 190, 33 - AUTOCHECKBOX " & ", 1579, 40, 48, 192, 11, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Не &выводить более это напоминание", 1579, 40, 48, 192, 11, BS_TOP | BS_MULTILINE END 567 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . , ReactOS .", -1, 10, 7, 301, 25 - LTEXT "& ( ):", -1, 22, 32, 229, 8 + LTEXT "Введите имя службы в указанном текстовом поле. Если оставить это поле пустым, ReactOS автоматически обнаружит и настроит службу при подключении.", -1, 10, 7, 301, 25 + LTEXT "&Имя службы (не обязательно):", -1, 22, 32, 229, 8 EDITTEXT 1593, 22, 44, 275, 14, ES_AUTOHSCROLL END 568 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1686, 7, 5, 217, 10 + LTEXT "&Имя службы:", 1686, 7, 5, 217, 10 EDITTEXT 1594, 7, 17, 217, 14, ES_AUTOHSCROLL - AUTOCHECKBOX " & ", 1120, 9, 196, 215, 8 + AUTOCHECKBOX "При подключении в&ывести значок в области уведомлений", 1120, 9, 196, 215, 8 END 569 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Безопасность" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1580, 8, 4, 213, 151 - AUTORADIOBUTTON "& ( )", 1540, 14, 16, 197, 9, BS_NOTIFY | WS_GROUP - AUTORADIOBUTTON "& ( )", 1541, 14, 100, 197, 8, BS_NOTIFY - LTEXT "& :", 1537, 26, 29, 183, 8, NOT WS_GROUP + GROUPBOX "Параметры безопасности", 1580, 8, 4, 213, 151 + AUTORADIOBUTTON "Об&ычные (рекомендуемые параметры)", 1540, 14, 16, 197, 9, BS_NOTIFY | WS_GROUP + AUTORADIOBUTTON "&Дополнительные (выборочные параметры)", 1541, 14, 100, 197, 8, BS_NOTIFY + LTEXT "&При проверке используется:", 1537, 26, 29, 183, 8, NOT WS_GROUP COMBOBOX 1178, 26, 40, 184, 78, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ReactOS ( , )", 1174, 26, 59, 186, 20, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ( )", 1169, 26, 79, 185, 18, BS_TOP | BS_MULTILINE - LTEXT " .", 1539, 26, 111, 184, 20 - PUSHBUTTON "&...", 1180, 151, 134, 60, 14 - PUSHBUTTON " I&PSec...", 1598, 126, 163, 85, 14 + AUTOCHECKBOX "&Использовать автоматически имя входа и пароль из ReactOS (и имя домена, если существует)", 1174, 26, 59, 186, 20, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Тре&буется шифрование данных (иначе отключаться)", 1169, 26, 79, 185, 18, BS_TOP | BS_MULTILINE + LTEXT "Применение этих параметров требует знания протоколов обеспечения безопасности.", 1539, 26, 111, 184, 20 + PUSHBUTTON "&Параметры...", 1180, 151, 134, 60, 14 + PUSHBUTTON "Параметры I&PSec...", 1598, 126, 163, 85, 14 END 570 DIALOGEX 0, 0, 265, 126 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " IPSec" +CAPTION "Параметры IPSec" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 151, 104, 50, 14 - PUSHBUTTON "", 2, 207, 104, 50, 14 - AUTOCHECKBOX " & ", 1604, 21, 15, 217, 10 - LTEXT "&:", 1602, 20, 31, 44, 12 + PUSHBUTTON "Отмена", 2, 207, 104, 50, 14 + AUTOCHECKBOX "Для проверки подлинности &использовать предварительный ключ", 1604, 21, 15, 217, 10 + LTEXT "&Ключ:", 1602, 20, 31, 44, 12 EDITTEXT 1605, 66, 30, 172, 12, ES_AUTOHSCROLL - AUTOCHECKBOX " ", 1606, 20, 50, 242, 13, WS_DISABLED - AUTOCHECKBOX " ", 1607, 20, 67, 239, 10, WS_DISABLED - PUSHBUTTON "", 1608, 31, 84, 50, 14, WS_DISABLED + AUTOCHECKBOX "Разрешить сертификаты из моего хранилища сертификатов", 1606, 20, 50, 242, 13, WS_DISABLED + AUTOCHECKBOX "Использовать особый сертификат", 1607, 20, 67, 239, 10, WS_DISABLED + PUSHBUTTON "Выбрать", 1608, 31, 84, 50, 14, WS_DISABLED COMBOBOX 1610, 91, 84, 135, 30, CBS_DROPDOWN | CBS_SORT | WS_DISABLED | WS_VSCROLL | NOT WS_TABSTOP END 571 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Ведение журнала безопасности" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " :", -1, 6, 8, 216, 47 - AUTOCHECKBOX "& ", 1642, 14, 22, 201, 10 - AUTOCHECKBOX " & ", 1641, 14, 37, 200, 10 - GROUPBOX " :", -1, 7, 64, 215, 91 - LTEXT "&:", -1, 14, 78, 199, 8 + GROUPBOX "Параметры ведения журнала:", -1, 6, 8, 216, 47 + AUTOCHECKBOX "Записы&вать неудавшиеся входящие подключения", 1642, 14, 22, 201, 10 + AUTOCHECKBOX "Записывать успешные &исходящие подключения", 1641, 14, 37, 200, 10 + GROUPBOX "Параметры файла журнала:", -1, 7, 64, 215, 91 + LTEXT "&Имя:", -1, 14, 78, 199, 8 EDITTEXT 1674, 14, 90, 199, 14, ES_READONLY - PUSHBUTTON "&...", 1639, 153, 108, 60, 14 - LTEXT "& :", -1, 14, 133, 90, 8 + PUSHBUTTON "Об&зор...", 1639, 153, 108, 60, 14 + LTEXT "М&аксимальный размер:", -1, 14, 133, 90, 8 EDITTEXT 1640, 112, 130, 50, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "", -1, 170, 133, 20, 8 - PUSHBUTTON "& ", 1643, 115, 197, 105, 14 + LTEXT "КБ", -1, 170, 133, 20, 8 + PUSHBUTTON "&Восстановить умолчания", 1643, 115, 197, 105, 14 END 572 DIALOGEX 0, 0, 230, 215 @@ -1343,15 +1343,15 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "ICMP" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " & (ICMP) . -, :", -1, 7, 5, 215, 37 + LTEXT "Протокол упр&авляющих сообщений Интернета (ICMP) позволяет компьютерам в сети обмениваться информацией об ошибках и своем состоянии. Выберите Интернет-запросы, на которые будет отвечать этот компьютер:", -1, 7, 5, 215, 37 CONTROL "IList1", 1644, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 7, 45, 215, 100, WS_EX_CLIENTEDGE - GROUPBOX ":", -1, 7, 153, 215, 55 + GROUPBOX "Описание:", -1, 7, 153, 215, 55 LTEXT "", 1645, 14, 171, 199, 32 END 574 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", 575, 7, 60, 213, 100 @@ -1359,455 +1359,455 @@ END 577 DIALOGEX 0, 0, 312, 144 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 1681, 10, 3, 296, 11 - LTEXT "&:", 1690, 18, 20, 127, 10 + LTEXT "Введите имя поставщика услуг Интернета.", 1681, 10, 3, 296, 11 + LTEXT "&Имя:", 1690, 18, 20, 127, 10 EDITTEXT 1680, 17, 32, 222, 14, ES_AUTOHSCROLL - LTEXT " .", 1683, 17, 52, 282, 42 + LTEXT "Введенное имя будет именем создаваемого соединения.", 1683, 17, 52, 282, 42 END 580 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "& ", 1534, 21, 20, 288, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& - (PPTP)", 1532, 21, 39, 290, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "& (L2TP)", 1533, 21, 56, 286, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Автоматический выбор", 1534, 21, 20, 288, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Туннельный протокол точка-точка (PPTP)", 1532, 21, 39, 290, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Туннельный протокол второго уровня (L2TP)", 1533, 21, 56, 286, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 1420 DIALOGEX 0, 0, 265, 108 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1412, 14, 63, 86, 8 + LTEXT "&Набрать:", 1412, 14, 63, 86, 8 COMBOBOX 1416, 104, 60, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 80, 248, 1 - DEFPUSHBUTTON "&", 1590, 9, 87, 60, 14 - PUSHBUTTON "", 1591, 72, 87, 60, 14 - PUSHBUTTON "&", 1107, 135, 87, 60, 14 - PUSHBUTTON "&", 1592, 198, 87, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 9, 87, 60, 14 + PUSHBUTTON "Отмена", 1591, 72, 87, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 135, 87, 60, 14 + PUSHBUTTON "&Справка", 1592, 198, 87, 60, 14 END 1421 DIALOGEX 0, 0, 265, 223 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 61, 90, 8 + LTEXT "&Пользователь:", 1413, 10, 61, 90, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 11, 81, 90, 8 + LTEXT "П&ароль:", 1112, 11, 81, 90, 8 EDITTEXT 1103, 104, 77, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 98, 248, 1 - AUTOCHECKBOX "& :", 1101, 14, 105, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 26, 119, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1623, 26, 133, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&охранять имя пользователя и пароль:", 1101, 14, 105, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "только дл&я меня", 1622, 26, 119, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для л&юбого пользователя", 1623, 26, 133, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 149, 248, 1 - LTEXT "&:", 1412, 14, 161, 87, 8 + LTEXT "&Набрать:", 1412, 14, 161, 87, 8 COMBOBOX 1416, 104, 157, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1415, 14, 178, 88, 8 + LTEXT "&Место вызова:", 1415, 14, 178, 88, 8 COMBOBOX 1414, 104, 175, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 193, 175, 65, 14 + PUSHBUTTON "Прави&ла", 1108, 193, 175, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 196, 248, 1 - DEFPUSHBUTTON "&", 1590, 9, 202, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 72, 202, 60, 14 - PUSHBUTTON "&", 1107, 135, 202, 60, 14 - PUSHBUTTON "&", 1592, 198, 202, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 9, 202, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 1591, 72, 202, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 135, 202, 60, 14 + PUSHBUTTON "&Справка", 1592, 198, 202, 60, 14 END 1422 DIALOGEX 0, 0, 265, 242 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " %1" +CAPTION "Подключение к %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 67, 91, 8 + LTEXT "&Пользователь:", 1413, 10, 67, 91, 8 EDITTEXT 1104, 104, 63, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 10, 85, 92, 8 + LTEXT "П&ароль:", 1112, 10, 85, 92, 8 EDITTEXT 1103, 104, 82, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1110, 10, 104, 92, 8 + LTEXT "&Домен:", 1110, 10, 104, 92, 8 EDITTEXT 1102, 104, 101, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 121, 248, 1 - AUTOCHECKBOX "& :", 1101, 12, 127, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 24, 141, 227, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1623, 24, 155, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "С&охранять имя пользователя и пароль:", 1101, 12, 127, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "только дл&я меня", 1622, 24, 141, 227, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для л&юбого пользователя", 1623, 24, 155, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 170, 248, 1 - LTEXT "&:", 1412, 14, 182, 87, 8 + LTEXT "&Набрать:", 1412, 14, 182, 87, 8 COMBOBOX 1416, 104, 178, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1415, 14, 198, 87, 8 + LTEXT "&Место вызова:", 1415, 14, 198, 87, 8 COMBOBOX 1414, 104, 195, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 193, 195, 65, 14 + PUSHBUTTON "Прави&ла", 1108, 193, 195, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 215, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 221, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 71, 221, 60, 14 - PUSHBUTTON "&", 1107, 134, 221, 60, 14 - PUSHBUTTON "&", 1592, 198, 221, 60, 14 + DEFPUSHBUTTON "В&ызов", 1590, 8, 221, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", 1591, 71, 221, 60, 14 + PUSHBUTTON "Сво&йства", 1107, 134, 221, 60, 14 + PUSHBUTTON "&Справка", 1592, 198, 221, 60, 14 END 1425 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& IP- (, reactos.org 145.52.0.1):", 1430, 7, 5, 217, 18 + LTEXT "&Имя компьютера или IP-адрес назначения (например, reactos.org или 145.52.0.1):", 1430, 7, 5, 217, 18 EDITTEXT 1427, 7, 25, 215, 14, ES_AUTOHSCROLL - GROUPBOX " ", 1431, 9, 48, 213, 78 - LTEXT " , , , .", 1432, 17, 63, 199, 24 - AUTOCHECKBOX "& :", 1428, 19, 89, 183, 10 + GROUPBOX "Очередность установления подключения", 1431, 9, 48, 213, 78 + LTEXT "Перед тем как установить виртуальное подключение, можно сначала подключиться к общедоступной сети, например, к Интернет.", 1432, 17, 63, 199, 24 + AUTOCHECKBOX "&Сначала набрать номер для этого подключения:", 1428, 19, 89, 183, 10 COMBOBOX 1429, 29, 103, 182, 87, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX " & ", 1120, 10, 192, 213, 13 + AUTOCHECKBOX "При подключении в&ывести значок в области уведомлений", 1120, 10, 192, 213, 13 END 1426 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметры" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1289, 8, 7, 214, 56 - AUTOCHECKBOX "& ", 1284, 16, 17, 199, 10 - AUTOCHECKBOX "& , , ..", 1554, 16, 32, 199, 10 - AUTOCHECKBOX "& ReactOS", 1555, 16, 47, 178, 10 - GROUPBOX " ", 1290, 8, 68, 214, 89 - LTEXT "& :", 1300, 16, 81, 121, 8 + GROUPBOX "Параметры набора номера", 1289, 8, 7, 214, 56 + AUTOCHECKBOX "&Отображать ход подключения", 1284, 16, 17, 199, 10 + AUTOCHECKBOX "&Запрашивать имя, пароль, сертификат и т.д.", 1554, 16, 32, 199, 10 + AUTOCHECKBOX "Вкл&ючать домен входа в ReactOS", 1555, 16, 47, 178, 10 + GROUPBOX "Параметры повторного звонка", 1290, 8, 68, 214, 89 + LTEXT "&Число повторений набора номера:", 1300, 16, 81, 121, 8 EDITTEXT 1287, 140, 77, 70, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT " & :", 1301, 16, 99, 121, 8 + LTEXT "Интервал ме&жду повторениями:", 1301, 16, 99, 121, 8 COMBOBOX 1292, 141, 95, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1299, 16, 117, 121, 8 + LTEXT "Вре&мя простоя до разъединения:", 1299, 16, 117, 121, 8 COMBOBOX 1291, 141, 113, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1286, 16, 138, 199, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "П&ерезвонить при разрыве связи", 1286, 16, 138, 199, 10, BS_TOP | BS_MULTILINE END 1427 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP- , .", -1, 10, 6, 275, 16 - LTEXT "& IP- (, reactos.org 145.52.0.1):", -1, 21, 28, 277, 11 + LTEXT "Введите имя узла или IP-адрес компьютера, к которому осуществляется подключение.", -1, 10, 6, 275, 16 + LTEXT "&Имя компьютера или IP-адрес (например, reactos.org или 145.52.0.1):", -1, 21, 28, 277, 11 EDITTEXT 1433, 21, 42, 275, 14, ES_AUTOHSCROLL END 1428 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ", .", -1, 10, 6, 275, 24 - AUTORADIOBUTTON "& .", 1509, 32, 31, 271, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "& :", 1510, 32, 45, 269, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Выберите, надо ли автоматически подключаться к Интернету или иной общей сети перед установлением виртуального подключения.", -1, 10, 6, 275, 24 + AUTORADIOBUTTON "Н&е набирать номер для предварительного подключения.", 1509, 32, 31, 271, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Н&абрать номер для следующего предварительного подключения:", 1510, 32, 45, 269, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP COMBOBOX 1435, 43, 62, 253, 87, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END 1436 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1597, 8, 5, 213, 8 + LTEXT "&Выберите устройство:", 1597, 8, 5, 213, 8 COMBOBOX 1437, 7, 17, 217, 166, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX " & ", 1120, 11, 195, 213, 10, BS_TOP | BS_MULTILINE - PUSHBUTTON "&...", 1130, 160, 34, 60, 14 + AUTOCHECKBOX "При подключении в&ывести значок в области уведомлений", 1120, 11, 195, 213, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Настроить...", 1130, 160, 34, 60, 14 END 1448 DIALOGEX 10, 20, 265, 71 STYLE DS_SHELLFONT | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Сетевые подключения" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1456, 7, 7, 251, 10 + LTEXT "&Выберите сетевое подключение:", 1456, 7, 7, 251, 10 COMBOBOX 1457, 8, 18, 250, 140, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - DEFPUSHBUTTON "&...", 1449, 7, 50, 60, 14 - PUSHBUTTON "", 1455, 70, 50, 60, 14 - PUSHBUTTON "&...", 1459, 134, 50, 60, 14 - PUSHBUTTON "&", 1460, 198, 50, 60, 14 + DEFPUSHBUTTON "&Подключить...", 1449, 7, 50, 60, 14 + PUSHBUTTON "Отмена", 1455, 70, 50, 60, 14 + PUSHBUTTON "Созда&ть...", 1459, 134, 50, 60, 14 + PUSHBUTTON "&Свойства", 1460, 198, 50, 60, 14 END 1466 DIALOGEX 6, 18, 265, 262 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", 1469, 7, 7, 251, 8 + LTEXT "Образец", 1469, 7, 7, 251, 8 EDITTEXT 1470, 7, 17, 193, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1471, 77, 36, 60, 14 - PUSHBUTTON "&", 1472, 141, 36, 60, 14 - LTEXT "", 1473, 7, 57, 193, 8 + PUSHBUTTON "&Добавить", 1471, 77, 36, 60, 14 + PUSHBUTTON "&Заменить", 1472, 141, 36, 60, 14 + LTEXT "Образец", 1473, 7, 57, 193, 8 LISTBOX 1474, 7, 68, 193, 145, WS_VSCROLL | WS_TABSTOP PUSHBUTTON "", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP - PUSHBUTTON "&", 1476, 206, 86, 51, 14, BS_BITMAP - PUSHBUTTON "&", 1477, 141, 215, 60, 14 + PUSHBUTTON "В&низ", 1476, 206, 86, 51, 14, BS_BITMAP + PUSHBUTTON "&Удалить", 1477, 141, 215, 60, 14 CONTROL "", 1479, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Отмена", 2, 196, 242, 60, 14 END 1467 DIALOGEX 6, 18, 263, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", 1469, 7, 7, 197, 8 + LTEXT "Образец", 1469, 7, 7, 197, 8 EDITTEXT 1470, 7, 17, 193, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1471, 76, 36, 60, 14 - PUSHBUTTON "&", 1472, 141, 36, 60, 14 - LTEXT "", 1473, 7, 57, 193, 8 + PUSHBUTTON "&Добавить", 1471, 76, 36, 60, 14 + PUSHBUTTON "&Заменить", 1472, 141, 36, 60, 14 + LTEXT "Образец", 1473, 7, 57, 193, 8 LISTBOX 1474, 7, 68, 193, 135, WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP - PUSHBUTTON "&", 1476, 206, 86, 51, 14, BS_BITMAP - PUSHBUTTON "&", 1477, 141, 204, 60, 14 - AUTOCHECKBOX "", 1478, 7, 225, 249, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Вверх", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP + PUSHBUTTON "В&низ", 1476, 206, 86, 51, 14, BS_BITMAP + PUSHBUTTON "&Удалить", 1477, 141, 204, 60, 14 + AUTOCHECKBOX "Образец", 1478, 7, 225, 249, 10, BS_TOP | BS_MULTILINE PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Отмена", 2, 196, 242, 60, 14 END 1468 DIALOGEX 6, 18, 263, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", 1469, 7, 5, 249, 8 + LTEXT "Образец", 1469, 7, 5, 249, 8 EDITTEXT 1470, 7, 17, 249, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1471, 132, 36, 60, 14 - PUSHBUTTON "&", 1472, 196, 36, 60, 14 - LTEXT "", 1473, 7, 55, 251, 8 + PUSHBUTTON "&Добавить", 1471, 132, 36, 60, 14 + PUSHBUTTON "&Заменить", 1472, 196, 36, 60, 14 + LTEXT "Образец", 1473, 7, 55, 251, 8 LISTBOX 1474, 7, 68, 249, 140, LBS_STANDARD | WS_TABSTOP - PUSHBUTTON "&", 1477, 196, 214, 60, 14, WS_GROUP + PUSHBUTTON "&Удалить", 1477, 196, 214, 60, 14, WS_GROUP CONTROL "", 1479, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Отмена", 2, 196, 242, 60, 14 END 1469 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "& .", 1488, 24, 9, 250, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "& .", 1489, 24, 34, 250, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "& .", 1490, 24, 64, 250, 10, NOT WS_TABSTOP - AUTORADIOBUTTON " & ", 1491, 24, 94, 275, 10, NOT WS_TABSTOP - LTEXT " ISDN.", -1, 45, 21, 250, 8 - LTEXT " (VPN) .", -1, 45, 46, 260, 18 - LTEXT " , .", -1, 44, 76, 264, 18 - LTEXT " .", -1, 43, 105, 266, 14 + AUTORADIOBUTTON "&Телефонное подключение к частной сети.", 1488, 24, 9, 250, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Подключ&ение к виртуальной частной сети через Интернет.", 1489, 24, 34, 250, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "&Прямое подключение к другому компьютеру.", 1490, 24, 64, 250, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Подключение к сети через &высокоскоростное соединение", 1491, 24, 94, 275, 10, NOT WS_TABSTOP + LTEXT "Подключение через модем или адаптер ISDN.", -1, 45, 21, 250, 8 + LTEXT "Подключение через виртуальную частную сеть (VPN) или туннель через Интернет.", -1, 45, 46, 260, 18 + LTEXT "Подключение через последовательный, параллельный или инфракрасный порт.", -1, 44, 76, 264, 18 + LTEXT "Подключение через ваше высокоскоростное соединение.", -1, 43, 105, 266, 14 END 1480 DIALOGEX 0, 0, 230, 61 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Редактор номера телефона" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1481, 7, 7, 218, 8 + LTEXT "&Введите новый номер телефона:", 1481, 7, 7, 218, 8 EDITTEXT 1482, 7, 17, 217, 15, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 99, 40, 60, 14 - PUSHBUTTON "", 2, 163, 40, 60, 14 + PUSHBUTTON "Отмена", 2, 163, 40, 60, 14 END 1481 DIALOGEX 0, 0, 321, 157 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Мастер новых подключений" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , . ( , .)", 1689, 10, 4, 308, 25 - LTEXT "&:", 1636, 23, 35, 89, 15 + LTEXT "Введите имя и пароль для учетной записи поставщика услуг Интернета, запишите и храните в безопасном месте. (Обратитесь к поставщику, если забыли эти сведения.)", 1689, 10, 4, 308, 25 + LTEXT "&Пользователь:", 1636, 23, 35, 89, 15 EDITTEXT 1614, 115, 34, 190, 15, ES_AUTOHSCROLL - LTEXT "&:", 1637, 23, 55, 90, 13 + LTEXT "П&ароль:", 1637, 23, 55, 90, 13 EDITTEXT 1615, 115, 54, 190, 15, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1638, 23, 74, 88, 13 + LTEXT "Под&тверждение:", 1638, 23, 74, 88, 13 EDITTEXT 1616, 115, 73, 190, 15, ES_PASSWORD | ES_AUTOHSCROLL - AUTOCHECKBOX "& :", 1596, 23, 91, 291, 17, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX " & ", 1595, 23, 112, 288, 14 - AUTOCHECKBOX "& ", 1682, 23, 133, 290, 14 + AUTOCHECKBOX "И&спользовать следующие имя пользователя и пароль при подключении любого пользователя:", 1596, 23, 91, 291, 17, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Сделать &это подключение подключением к Интернет по умолчанию", 1595, 23, 112, 288, 14 + AUTOCHECKBOX "&Включить брандмауэр для подключения к Интернет", 1682, 23, 133, 290, 14 END 1660 DIALOGEX 0, 0, 258, 78 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Брандмауэр подключения к Интернет" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, -1, 7, 7, 20, 20 - LTEXT " . ?", -1, 44, 5, 212, 35 - AUTOCHECKBOX " & ", 1662, 42, 42, 210, 10 - DEFPUSHBUTTON "&", 6, 74, 60, 50, 14 - PUSHBUTTON "&", 7, 128, 60, 50, 14 + LTEXT "Отключение брандмауэра подключения к Интернет может привести к неавторизованному доступу через Интернет к вашему компьютеру. Вы действительно хотите отключить защиту?", -1, 44, 5, 212, 35 + AUTOCHECKBOX "Не в&ыводить это окно в дальнейшем", 1662, 42, 42, 210, 10 + DEFPUSHBUTTON "Д&а", 6, 74, 60, 50, 14 + PUSHBUTTON "Н&ет", 7, 128, 60, 50, 14 END 7000 DIALOGEX 0, 0, 215, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:", -1, 7, 8, 90, 12, SS_CENTERIMAGE + LTEXT "&Пользователь:", -1, 7, 8, 90, 12, SS_CENTERIMAGE EDITTEXT 7001, 101, 7, 108, 14, ES_AUTOHSCROLL - LTEXT "& :", -1, 7, 26, 90, 12 + LTEXT "П&олное имя:", -1, 7, 26, 90, 12 EDITTEXT 7002, 101, 25, 108, 14, ES_AUTOHSCROLL - LTEXT "&:", -1, 7, 44, 90, 12 + LTEXT "П&ароль:", -1, 7, 44, 90, 12 EDITTEXT 7003, 101, 43, 108, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", -1, 7, 62, 91, 12 + LTEXT "По&дтверждение:", -1, 7, 62, 91, 12 EDITTEXT 7004, 101, 61, 108, 14, ES_PASSWORD | ES_AUTOHSCROLL PUSHBUTTON "OK", 1, 84, 82, 60, 14 - PUSHBUTTON "", 2, 149, 82, 60, 14 + PUSHBUTTON "Отмена", 2, 149, 82, 60, 14 END 7005 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION " " +CAPTION "Ответный вызов сервера" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "& ", 7009, 9, 7, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& ", 7006, 9, 20, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "& :", 7007, 9, 34, 217, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Запретить ответный вызов", 7009, 9, 7, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "З&вонящий может выбрать номер ответного вызова", 7006, 9, 20, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Только этот номер для ответного вызова:", 7007, 9, 34, 217, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP EDITTEXT 7008, 19, 49, 204, 14, ES_AUTOHSCROLL | WS_GROUP END 7010 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 7, 4, 214, 110, WS_GROUP - LTEXT " :", -1, 17, 17, 195, 8 - LTEXT "&:", -1, 17, 29, 60, 8 + GROUPBOX "Входящие подключения", -1, 7, 4, 214, 110, WS_GROUP + LTEXT "Входящие подключения будут разрешены для устройств:", -1, 17, 17, 195, 8 + LTEXT "&Устройства:", -1, 17, 29, 60, 8 CONTROL "", 7011, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00004405, 17, 41, 193, 47, WS_EX_CLIENTEDGE - AUTOCHECKBOX "& ", 7012, 17, 96, 121, 10, BS_TOP | BS_MULTILINE | WS_GROUP - PUSHBUTTON "&", 7013, 145, 94, 65, 14, WS_GROUP - GROUPBOX " (VPN)", -1, 6, 122, 214, 49, WS_GROUP - AUTOCHECKBOX "& ", 7014, 17, 137, 195, 27, BS_TOP | BS_MULTILINE | WS_GROUP - AUTOCHECKBOX " & ", 7015, 12, 184, 209, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "М&ногоканальное подключение", 7012, 17, 96, 121, 10, BS_TOP | BS_MULTILINE | WS_GROUP + PUSHBUTTON "&Свойства", 7013, 145, 94, 65, 14, WS_GROUP + GROUPBOX "Виртуальная частная сеть (VPN)", -1, 6, 122, 214, 49, WS_GROUP + AUTOCHECKBOX "&Разрешить другим пользователям устанавливать частное подключение к моему компьютеру с помощью туннеля в Интернете или в другой сети", 7014, 17, 137, 195, 27, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "При подключении &вывести значок в области уведомлений", 7015, 12, 184, 209, 10, BS_TOP | BS_MULTILINE | WS_GROUP END 7016 DIALOGEX 0, 0, 265, 190 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " TCP/IP" +CAPTION "Свойства входящих вызовов TCP/IP" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 6, 5, 252, 32 - AUTOCHECKBOX "& ", 7017, 20, 20, 228, 9, BS_LEFT | BS_TOP | BS_MULTILINE - GROUPBOX " TCP/IP", -1, 6, 42, 250, 122 - AUTORADIOBUTTON "& TCP/IP DHCP", 7019, 20, 54, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& TCP/IP ", 7020, 20, 71, 231, 10, BS_TOP | BS_MULTILINE - LTEXT "&:", -1, 29, 88, 53, 8 + GROUPBOX "Доступ к сети", -1, 6, 5, 252, 32 + AUTOCHECKBOX "&Разрешить звонящим доступ к локальной сети", 7017, 20, 20, 228, 9, BS_LEFT | BS_TOP | BS_MULTILINE + GROUPBOX "Назначение адресов TCP/IP", -1, 6, 42, 250, 122 + AUTORADIOBUTTON "&Назначить адреса TCP/IP автоматически по DHCP", 7019, 20, 54, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Указать адреса TCP/IP явным образом", 7020, 20, 71, 231, 10, BS_TOP | BS_MULTILINE + LTEXT "&С:", -1, 29, 88, 53, 8 CONTROL "", 7018, "RASIPADDRESS", WS_GROUP | WS_TABSTOP, 90, 85, 103, 13 - LTEXT "&:", -1, 29, 105, 53, 8 + LTEXT "&По:", -1, 29, 105, 53, 8 CONTROL "", 7021, "RASIPADDRESS", WS_GROUP | WS_TABSTOP, 90, 102, 103, 13 - LTEXT ":", -1, 29, 124, 53, 10 + LTEXT "Всего:", -1, 29, 124, 53, 10 LTEXT "", 7024, 90, 121, 150, 14, 0, WS_EX_STATICEDGE - AUTOCHECKBOX "& IP", 7022, 20, 144, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Разре&шить звонящему указать свой адрес IP", 7022, 20, 144, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 133, 169, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 197, 169, 60, 14 + PUSHBUTTON "Отмена", 2, 197, 169, 60, 14 END 7025 DIALOGEX 0, 0, 250, 157 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " IPX" +CAPTION "Свойства входящих вызовов IPX" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 8, 6, 234, 32 - AUTOCHECKBOX "& ", 7032, 18, 19, 194, 12, BS_LEFT | BS_TOP | BS_MULTILINE - GROUPBOX " ", -1, 8, 43, 234, 87 - AUTOCHECKBOX "& ", 7028, 17, 56, 203, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& ", 7026, 28, 68, 191, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& :", 7027, 28, 81, 189, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + GROUPBOX "Доступ к сети", -1, 8, 6, 234, 32 + AUTOCHECKBOX "&Разрешить звонящим доступ к локальной сети", 7032, 18, 19, 194, 12, BS_LEFT | BS_TOP | BS_MULTILINE + GROUPBOX "Назначение номера сети", -1, 8, 43, 234, 87 + AUTOCHECKBOX "&Присвоить единый номер сети всем компьютерам", 7028, 17, 56, 203, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Назначать номера сети автоматически", 7026, 28, 68, 191, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Указать номер сети явным образом:", 7027, 28, 81, 189, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP EDITTEXT 7029, 40, 92, 154, 14, ES_UPPERCASE | WS_GROUP - AUTOCHECKBOX "& ", 7031, 17, 113, 208, 11, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Р&азрешить звонящим указать их собственные номера узлов", 7031, 17, 113, 208, 11, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 116, 136, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 181, 136, 60, 14 + PUSHBUTTON "Отмена", 2, 181, 136, 60, 14 END 7033 DIALOGEX 0, 0, 220, 50 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Свойства протоколов" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 7034, 7, 7, 208, 18, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Разрешить звонящим доступ к локальной сети", 7034, 7, 7, 208, 18, BS_LEFT | BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 86, 30, 60, 14 - PUSHBUTTON "", 2, 151, 30, 60, 14 + PUSHBUTTON "Отмена", 2, 151, 30, 60, 14 END 7035 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Сеть" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 217, 9 + LTEXT "&Сетевые компоненты:", -1, 7, 7, 217, 9 CONTROL "", 7036, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 7, 17, 215, 89, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 7037, 9, 110, 67, 14, WS_GROUP - PUSHBUTTON "&", 7038, 80, 110, 67, 14, WS_GROUP - PUSHBUTTON "&", 7039, 153, 110, 67, 14, WS_GROUP - GROUPBOX "", -1, 7, 138, 213, 69 + PUSHBUTTON "Ус&тановить...", 7037, 9, 110, 67, 14, WS_GROUP + PUSHBUTTON "&Удалить", 7038, 80, 110, 67, 14, WS_GROUP + PUSHBUTTON "С&войства", 7039, 153, 110, 67, 14, WS_GROUP + GROUPBOX "Описание", -1, 7, 138, 213, 69 LTEXT "", 7040, 17, 150, 193, 48 END 7042 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Пользователи" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&, :", -1, 7, 5, 213, 8 + LTEXT "&Пользователи, которым разрешено подключение:", -1, 7, 5, 213, 8 CONTROL "", 7043, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 7, 19, 214, 83, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 7044, 7, 107, 67, 14, WS_GROUP - PUSHBUTTON "&", 7045, 80, 107, 67, 14, WS_GROUP - PUSHBUTTON "&", 7046, 153, 107, 67, 14, WS_GROUP - AUTOCHECKBOX "& .", 7048, 8, 151, 217, 18, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& , (palmtop PC).", 7049, 8, 169, 217, 28, BS_TOP | BS_MULTILINE - LTEXT " , , .", -1, 9, 126, 212, 23 + PUSHBUTTON "&Новый...", 7044, 7, 107, 67, 14, WS_GROUP + PUSHBUTTON "&Удалить", 7045, 80, 107, 67, 14, WS_GROUP + PUSHBUTTON "&Свойства", 7046, 153, 107, 67, 14, WS_GROUP + AUTOCHECKBOX "&Все пользователи должны держать в секрете свои пароли и данные.", 7048, 8, 151, 217, 18, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Вс&егда разрешать подключение без пароля устройствам с прямым соединением, таким как карманные компьютеры (palmtop PC).", 7049, 8, 169, 217, 28, BS_TOP | BS_MULTILINE + LTEXT "Другие факторы, такие как отключенная учетная запись пользователя, могут препятствовать подключению пользователя.", -1, 9, 126, 212, 23 END 7049 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , . , , .", -1, 10, 1, 300, 27 - LTEXT "&, :", -1, 10, 28, 275, 8 + LTEXT "Установите флажки рядом с пользователями, которым разрешено подключаться к этому компьютеру. Другие факторы, такие как отключенная учетная запись пользователя, могут препятствовать подключению пользователя.", -1, 10, 1, 300, 27 + LTEXT "&Пользователи, которым разрешено подключение:", -1, 10, 28, 275, 8 CONTROL "", 7043, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 10, 42, 275, 73 - PUSHBUTTON "&...", 7044, 10, 122, 65, 14, WS_GROUP - PUSHBUTTON "&", 7045, 79, 122, 65, 14, WS_GROUP - PUSHBUTTON "&", 7046, 147, 122, 65, 14, WS_GROUP + PUSHBUTTON "Д&обавить...", 7044, 10, 122, 65, 14, WS_GROUP + PUSHBUTTON "&Удалить", 7045, 79, 122, 65, 14, WS_GROUP + PUSHBUTTON "&Свойства", 7046, 147, 122, 65, 14, WS_GROUP END 7050 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , .", -1, 10, 4, 299, 10 - LTEXT "& :", -1, 10, 16, 275, 8 + LTEXT "Установите флажки рядом с устройствами, используемыми для входящих подключений.", -1, 10, 4, 299, 10 + LTEXT "&Устройства для подключения:", -1, 10, 16, 275, 8 CONTROL "", 7011, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 10, 26, 297, 87 - PUSHBUTTON "&", 7013, 243, 120, 65, 14, WS_GROUP + PUSHBUTTON "Сво&йства", 7013, 243, 120, 65, 14, WS_GROUP END 7051 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , .", -1, 10, 1, 288, 20 - LTEXT " &:", -1, 10, 24, 274, 8 + LTEXT "Установите флажки рядом с именами всех программ для работы с сетью, которые должны быть разрешены для входящих подключений.", -1, 10, 1, 288, 20 + LTEXT "Программы для работы с &сетью:", -1, 10, 24, 274, 8 CONTROL "", 7036, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 10, 34, 286, 33 - PUSHBUTTON "&...", 7037, 108, 71, 60, 14, WS_GROUP - PUSHBUTTON "&", 7038, 172, 71, 60, 14, WS_GROUP - PUSHBUTTON "&", 7039, 236, 71, 60, 14, WS_GROUP + PUSHBUTTON "Ус&тановить...", 7037, 108, 71, 60, 14, WS_GROUP + PUSHBUTTON "&Удалить", 7038, 172, 71, 60, 14, WS_GROUP + PUSHBUTTON "&Свойства", 7039, 236, 71, 60, 14, WS_GROUP LTEXT "", 7040, 21, 105, 273, 38 - LTEXT ":", -1, 21, 95, 275, 8 + LTEXT "Описание:", -1, 21, 95, 275, 8 END 7052 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , IP- .", -1, 10, 4, 290, 20 - AUTORADIOBUTTON "& ", 7053, 29, 63, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& ", 7054, 29, 78, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - LTEXT " ?", -1, 17, 49, 275, 8 - LTEXT " VPN-, ReactOS , VPN-.", -1, 10, 25, 293, 25 + LTEXT "Виртуальные частные подключения через Интернет возможны только в случае, если компьютер имеет постоянный IP-адрес или имя в Интернете.", -1, 10, 4, 290, 20 + AUTORADIOBUTTON "&Разрешить виртуальные частные подключения", 7053, 29, 63, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Запретить виртуальные частные подключения", 7054, 29, 78, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Разрешить виртуальные частные подключения к этому компьютеру?", -1, 17, 49, 275, 8 + LTEXT " Если вы разрешите VPN-подключения, ReactOS изменит брандмауэр подключения к Интернет, что позволит вашему компьютеру отправлять и получать VPN-пакеты.", -1, 10, 25, 293, 25 END 7055 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 23, 24, 275, 8 + LTEXT "&Устройство для этого подключения:", -1, 23, 24, 275, 8 COMBOBOX 7056, 22, 36, 275, 125, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " .", -1, 10, 4, 275, 17 - PUSHBUTTON "&", 7061, 232, 53, 65, 14, WS_GROUP + LTEXT "Невыбранные устройства не будут задействованы и могут использоваться для других целей.", -1, 10, 4, 275, 17 + PUSHBUTTON "Сво&йства", 7061, 232, 53, 65, 14, WS_GROUP END 7379 DIALOGEX 0, 0, 317, 143 @@ -1818,556 +1818,556 @@ END 19900 DIALOGEX 0, 0, 156, 44 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Удаленный доступ к сети" FONT 8, "MS Shell Dlg" BEGIN ICON 563, 19901, 10, 10, 18, 20 - LTEXT " ...", 19902, 34, 16, 120, 8 + LTEXT "Ожидается запуск служб...", 19902, 34, 16, 120, 8 END STRINGTABLE BEGIN - 187 "&, " - 188 " ( ) %1. ?" - 189 " " - 190 " " - 191 " " - 192 " " - 193 " ." - 194 " \n (NAT), \n .\n \n .\n IP-." - 195 " 0 9." - 196 " . ." - 197 " %1 %2." - 198 " DLL . , ." - 199 " .\n "" "" ." - 200 "" - 201 " ." - 202 " TCP/IP . "" "", """", """", , """"." - 203 " IPX . IPX """"." - 204 " ?" - 205 " %1 ?" - 206 " %1?" - 207 " ""%1"" . ?" - 208 " . ?" - 209 " %1. " - 210 " "" "" ." - 212 " ." - 213 " , """"." + 187 "&Нет, не набирать номер" + 188 "Вы (или программа) запросили информацию с %1. Какое подключение выбрать?" + 189 "Добавить дополнительный номер телефона" + 190 "Задействовать первое из доступных устройств" + 191 "Задействовать все устройства" + 192 "Лишь необходимые устройства" + 193 "Введите имя и пароль пользователя для удаленного доступа к сетевому домену." + 194 "В настоящий момент в качестве протокола маршрутизации используется\nпреобразование сетевых адресов (NAT), которое требуется удалить перед\nиспользованием общего доступа к подключению к Интернету.\nДля удаления преобразования сетевых адресов откройте оснастку диспетчера\nмаршрутизации и удаленного доступа и выберите в левой панели маршрутизатор.\nУдалите протокол преобразования адресов из списка протоколов IP-маршрутизации." + 195 "Междугородный код должен состоять только из цифр от 0 до 9." + 196 "Имя элемента должно содержать хотя бы один непустой знак и не может начинаться с точки. Укажите правильное имя." + 197 "Для этого поля необходимо выбрать значение от %1 до %2." + 198 "Не удалось загрузить библиотеку DLL специальной проверки. Проверьте, правильно ли установлен пакет специальной проверки." + 199 "Выбранное подключение было установлено многопротокольным маршрутизатором.\nИспользуйте ""Администратор маршрутизации и удаленного доступа"" для завершения связи." + 200 "Комментарий" + 201 "Не удалось настроить специальный пакет проверки." + 202 "Протокол TCP/IP не установлен или отключен для маршрутизации и удаленного доступа. Откройте ""Панель управления"", затем ""Сеть"", страницу ""Службы"", откройте свойства службы маршрутизации и удаленного доступа, нажмите кнопку ""Сеть""." + 203 "Протокол IPX не установлен или отключен для маршрутизации и удаленного доступа. Для установки и применения IPX обратитесь к свойствам соединений в папке ""Подключения""." + 204 "Удалить выбранные устройства из этого списка?" + 205 "Удалить %1 из телефонной книги?" + 206 "Отключиться от %1?" + 207 "Файл ""%1"" уже существует. Перезаписать этот файл?" + 208 "В сценарии обнаружены синтаксические ошибки. Вывести на экран журнал ошибок?" + 209 "Установлено соединение с %1. " + 210 "Сделайте правый щелчок по значку ""Монитора удаленного доступа"" для завершения связи или проверки состояния текущего подключения." + 212 "Успешное подключение." + 213 "Выбранный специальный метод проверки должен быть инициализирован, нажмите кнопку ""Свойства""." 214 "lnk" - 215 " (*.rnk)" + 215 "Ярлыки удаленного доступа (*.rnk)" 216 "*.rnk" - 217 " " - 218 " %1. ..." - 219 " ." - 220 " ." - 221 " ." - 222 " ." - 223 ":" - 224 "" - 225 ":" - 226 ":" - 227 "( )" - 228 "&..." - 229 "&" - 230 " " - 231 " " + 217 "Создать ярлык удаленного доступа" + 218 "Не удалось связаться с %1. Ожидается повторное подключение..." + 219 "Не удалось получить данные о формировании пакетов." + 220 "Не удалось получить данные о портах." + 221 "Не удалось получить данные о проекции." + 222 "Не удалось загрузить список подключений." + 223 "Клиент:" + 224 "Сведения" + 225 "Устройство:" + 226 "Сеть:" + 227 "(нет подключения)" + 228 "&Подключить..." + 229 "Завер&шить" + 230 "Подключение удаленного доступа" + 231 "Параметры модема установлены по умолчанию" 232 "COM1" - 233 " " - 234 " " - 235 " ." - 236 " %1 . ." - 237 " ." - 238 " " - 239 " ." - 240 "" - 241 "& :" - 242 " " - 243 " " - 244 " , ." - 245 " , . ." - 246 " .\n\n ." - 247 "- ReactOS." - 248 " X.25 ." - 249 " %1: %2" - 250 "%1\n\n: %2: %3" - 251 "%1\n\n %2: %3\n: %4" - 252 "%1\n\n %2: %3\n : %4" - 253 "%1\n\n %2: %3\n\n F1 ." - 254 "%1\n\n %2: %3\n: %4" + 233 "Удаленный маршрутизатор" + 234 "Модем или иное устройство" + 235 "Укажите имя учетной записи для этого интерфейса на удаленном маршрутизаторе." + 236 "Элемент с именем %1 уже существует. Выберите другое имя." + 237 "Вы можете разрешить пересылку вашего пароля без шифрования." + 238 "Шифрование пароля" + 239 "Мастер готов к созданию нового подключения." + 240 "Завершено" + 241 "&Номер телефона:" + 242 "Сервер сделает ответный звонок" + 243 "Изменение дополнительного номера телефона" + 244 "Поскольку это подключение в данный момент используется, изменения ряда параметров будут применены при следующем наборе номера." + 245 "Отсутствуют подключения, доступные всем пользователям. Необходимо выполнить вход в систему." + 246 "Телефонная книга пуста.\n\nНажмите кнопку ОК для добавления элемента." + 247 "Из-за экспортных ограничений шифрование данных не поддерживается этой версией ReactOS." + 248 "Введите адрес X.25 на следующем экране." + 249 "Ошибка %1: %2" + 250 "%1\n\nОшибка: %2: %3" + 251 "%1\n\nОшибка %2: %3\nДиагностика: %4" + 252 "%1\n\nОшибка %2: %3\nКод ошибки: %4" + 253 "%1\n\nОшибка %2: %3\n\nНажмите F1 для получения дополнительных сведений." + 254 "%1\n\nОшибка %2: %3\nИмя: %4" 255 "%1\n\n%4" - 256 "%1\n\n %2: %3\n: %4" - 257 " : 0x%1\n" - 258 ": %1\n" - 259 "%1 %2: %3\n" - 260 "%1 .\n" - 261 " ." - 262 " " - 263 " """" ""%1""." + 256 "%1\n\nОшибка %2: %3\nОтвет: %4" + 257 "Код ошибки: 0x%1\n" + 258 "Имя: %1\n" + 259 "%1 протокол сообщает об ошибке %2: %3\n" + 260 "%1 протокол успешно подключен.\n" + 261 "Можно выбрать используемый протокол удаленного доступа." + 262 "Выберите протокол удаленного доступа" + 263 "Нажмите кнопку ""Готово"" для сохранения ""%1""." 264 "netcfg.hlp" - 265 "& " - 266 "& :" - 267 "& :" - 268 " " - 269 " IP-." - 270 "IP-" - 271 " TCP/IP . "" "", """", """", , """"." + 265 "&Переместить удачный номер в начало списка при подключении" + 266 "&Новый номер телефона:" + 267 "&Номера телефонов:" + 268 "Номера телефонов" + 269 "Можно ввести фиксированный IP-адрес." + 270 "IP-адрес" + 271 "Протоколы TCP/IP не установлены или отключены для удаленного доступа. Откройте ""Панель управления"", затем ""Сеть"", страницу ""Службы"", откройте свойства службы удаленного доступа, нажмите кнопку ""Сеть""." 272 "TCP/IP" - 273 "IPSec, " - 274 "IPX/SPX " - 275 " ( )" + 273 "IPSec, политика по умолчанию" + 274 "IPX/SPX или совместимый" + 275 " (текущее место)" 276 "ISDN" - 277 " ISDN " - 278 "64K " - 279 "56K " - 280 "56K " - 281 " ." - 282 " " + 277 "Все доступные линии ISDN многосвязаны" + 278 "64K цифровой" + 279 "56K цифровой" + 280 "56K голосовой" + 281 "Может потребоваться дополнительная процедура перед подключением." + 282 "Выберите параметры входа в систему" 283 "%d%%" - 284 " %s" - 285 "& :" - 286 "&:" - 287 "" - 288 " ." - 289 " " - 290 " PPP." - 291 "" - 292 " ." - 293 " Point-to-Point MS, 128 RSA/RC4" - 294 " Point-to-Point MS, 40 RSA/RC4" - 295 " " - 296 "( """")" - 297 " DNS WINS." - 298 " " - 299 " RAS" + 284 "Номер телефона для %s" + 285 "&Новое место:" + 286 "&Размещение:" + 287 "Размещение" + 288 "Это устройство будет использовано для подключения." + 289 "Выберите устройство" + 290 "Несколько линий могут быть объединены в пучок только при подключении к серверу PPP." + 291 "Модем" + 292 "Этот модем не установлен." + 293 "Шифрование Point-to-Point MS, 128 бит RSA/RC4" + 294 "Шифрование Point-to-Point MS, 40 бит RSA/RC4" + 295 "Несколько линий" + 296 "(нажмите кнопку ""Настроить"")" + 297 "Можно указать фиксированные адреса DNS и WINS." + 298 "Адреса серверов имен" + 299 "Ранняя версия RAS" 300 "PPP" - 301 " PPP" + 301 "Многоканальный PPP" 302 "SLIP" 303 "NetBEUI" - 304 " , ." - 305 " ." - 306 " ." - 307 " , ." - 308 " . """" , ." - 309 " IP-, "" IP-""." - 310 " X.25-, X.25 X.25." - 311 "()" - 312 """%1"" ." - 313 " " - 314 " %1 , . "" "", """", """", """"." - 315 " ." - 316 " ." - 317 " ." - 318 " ." - 319 " ." - 320 " ." - 321 " ." - 322 " RAS." - 323 " ." - 324 " ." - 325 " script.log notepad.exe" - 326 " switch.inf notepad.exe" - 327 " TAPI." - 328 " X.25." - 329 " ." - 330 " ." - 331 " ." - 332 " /." - 333 " ." - 334 " ." - 335 " ." - 336 " ." - 337 " ." - 338 " TAPI." - 339 " ." - 340 " ." - 341 " - . ?" - 342 " ." - 343 " ." - 344 " ." - 345 " " - 346 " ." - 347 "" - 348 " ISP ." - 349 " " - 350 " ." - 351 " ." + 304 "Была создана личная телефонная книга, в нее скопировано содержимое системной телефонной книги." + 305 "Никакая другая телефонная книга не выбрана." + 306 "Это устройство не может быть настроено динамически." + 307 "Этот элемент не может быть удален, поскольку в данный момент используется для подключения." + 308 "Ни один элемент не выбран. Нажмите кнопку ""Создать"" для того, чтобы создать новый элемент." + 309 "Следует указать ненулевой IP-адрес, если выбран параметр ""укажите IP-адрес""." + 310 "Требуется указать X.25-адрес, когда выбрано удаленное подключение к сети X.25 или к устройству X.25." + 311 "(нет)" + 312 """%1"" уже присутствует в списке." + 313 "Защищать пароль и данные при пересылке" + 314 "Протокол %1 нельзя использовать, поскольку он не установлен или запрещен для удаленного доступа. Для изменения откройте ""Панель управления"", ""Сеть"", страницу ""Службы"", свойства удаленного доступа и нажмите кнопку ""Сеть""." + 315 "Не удалось сохранить пароль." + 316 "Не удалось отобразить данные." + 317 "Не удалось получить данные об автоматической коммутации." + 318 "Не удается загрузить диалоговое окно." + 319 "Не удается запретить общий доступ." + 320 "Не удалось загрузить страницу свойств." + 321 "Не удалось загрузить телефонную книгу." + 322 "Не удалось загрузить данные о порте Диспетчера RAS." + 323 "Не удалось прочесть предпочтительную настройку параметров пользователя из реестра." + 324 "Не удалось загрузить данные о сценарии." + 325 "Не удалось просмотреть script.log с помощью notepad.exe" + 326 "Не удалось изменить switch.inf с помощью notepad.exe" + 327 "Не удалось загрузить данные о TAPI." + 328 "Не удалось загрузить данные о X.25." + 329 "Не удалось создать новую телефонную книгу." + 330 "Не удается разрешить общий доступ." + 331 "Не удалось подключиться с помощью этого элемента телефонной книги." + 332 "Не удалось получить буфер приема/передачи." + 333 "Не удалось получить данные о состоянии порта." + 334 "Не удалось получить данные о протоколе." + 335 "Не удалось получить буфер от устройства." + 336 "Не удалось отправить буфер на устройство." + 337 "Не удалось получить данные." + 338 "Не удалось сохранить данные о TAPI." + 339 "Не удалось сохранить данные." + 340 "Произошла остановка сценария." + 341 "Произошла остановка сценария из-за ошибки. Вывести журнал ошибок?" + 342 "Не удалось установить данные об автоматической коммутации." + 343 "Не удалось удалить сохраненный пароль." + 344 "Не удалось сделать запись в телефонную книгу." + 345 "Права на запись в реестр" + 346 "Не удалось записать файл ярлыка." + 347 "ОК" + 348 "Укажите телефонный ISP номер." + 349 "Введите телефонный номер" + 350 "Пароль и подтверждение пароля не совпадают." + 351 "Новый пароль и подтверждение нового пароля не совпадают." 352 "pbk" - 353 " (*.pbk)" + 353 "Файлы телефонной книги (*.pbk)" 354 "*.pbk" - 355 " " - 356 " " - 357 " " - 358 " " - 359 " " - 360 " " - 361 " " - 362 " ." - 363 ", PPP, "" ""." - 364 "& :" - 365 "&:" - 366 " " - 367 " .\n\n" - 368 " """" , """" ." - 369 " %1 %2, -:" - 370 "[ , ]" - 405 " NetBEUI RAS-." - 406 ", RAS-, NetBEUI. "" ""." - 407 "& " - 408 " . .\n """" , """"\n \n\n\n\n\n\n ." - 409 " " - 410 " ." - 411 " , ""%1"" . . \n \n\n\n\n\n\n Win NT/2000, ." + 355 "Открыть телефонную книгу" + 356 "Копировать элемент телефонной книги" + 357 "Изменить элемент телефонной книги" + 358 "Создать элемент телефонной книги" + 359 "Номер телефона" + 360 "Номера телефонов" + 361 "Сетевые подключения" + 362 "Необходимо выбрать хотя бы один протокол." + 363 "Прежде, чем подключаться к серверам PPP, следует установить сетевой протокол с приложением ""Управление сетью""." + 364 "&Новый префикс:" + 365 "&Префиксы:" + 366 "Префиксы телефонных номеров" + 367 "Один или несколько сетевых протоколов не были успешно подключены.\n\n" + 368 "Нажмите кнопку ""Связь"" чтобы использовать текущее подключение как есть, или кнопку ""Завершить"" для отключения." + 369 "Когда %1 устанавливает подключение по требованию через интерфейс %2, использовать следующие параметры протокола точка-точка:" + 370 "[Чтобы изменить сохраненный пароль, щелкните здесь]" + 405 "Протокол NetBEUI требуется для вызова старых RAS-серверов." + 406 "Прежде, чем подключаться к старым RAS-серверам, следует установить протокол NetBEUI. Он может быть установлен с приложением ""Управление сетью""." + 407 "&Повторный звонок" + 408 "Было задано запрещение одного или нескольких транспортов. При этом диспетчеры маршрутизации и протоколы маршрутизации для запрещаемых транспортов будут удалены из этого интерфейса коммутации.\nНажмите кнопку ""Да"" для подтверждения, или кнопку ""Нет""\n \n\n\n\n\n\n для разрешения транспортов." + 409 "Общий доступ к подключению Интернета" + 410 "Учетная запись интерфейса коммутации." + 411 "Необходимо задать учетные данные исходящего подключения, которые будут использоваться интерфейсом ""%1"" для подключения к удаленному маршрутизатору. Эти учетные данные должны соответствовать учетным данным входящего подключения на этом удаленном маршрутизаторе. При подключении к\n \n\n\n\n\n\nмаршрутизатору Win NT/2000, имя пользователя должно также соответствовать имени интерфейса удаленного маршрутизатора." 412 "mpradmin.hlp" - 413 "& " - 414 "& :" - 415 "& :" - 416 " " + 413 "&При подключении переместить удачный номер или адрес в начало" + 414 "&Новый номер телефона или адрес:" + 415 "&Номер телефона или адрес:" + 416 "Номера телефонов и адреса" 417 "PPP: Win 95/98/NT4/2000, Internet" - 418 "" - 419 "SLIP: Unix" - 420 " ." - 421 " ..." - 422 " ..." - 423 " ..." - 424 " ..." - 425 " ..." - 426 " ..." - 427 " ..." - 428 " ..." - 429 " ." - 430 " %1..." - 431 " ..." - 432 " ..." - 433 " ..." - 434 " %1..." - 435 " X.25 %1..." - 436 "- %1..." - 437 " %1..." - 438 " ." - 439 " ." - 440 "." - 441 " ." - 442 " ." - 443 " ..." - 444 " X.25 ." - 445 " ." - 446 "- ." - 447 " ." - 448 " ..." - 449 " ..." - 450 " ..." - 451 ", " - 452 " ." - 453 " ..." - 454 " ..." - 455 " ?" + 418 "Нет" + 419 "SLIP: подключение Unix" + 420 "Все устройства подключены." + 421 "Получение результатов регистрации..." + 422 "Отправлены сведения об ответном вызове..." + 423 "Отправлен новый пароль..." + 424 "Определение скорости связи..." + 425 "Проверка личных данных..." + 426 "Регистрация компьютера в сети..." + 427 "Повторная проверка подлинности..." + 428 "Проверка имени и пароля..." + 429 "Проверка выполнена." + 430 "Подключение через %1..." + 431 "Набор номера..." + 432 "Подключение модемов..." + 433 "Подключение через кабель..." + 434 "Набор номера %1..." + 435 "Подключение через X.25 к %1..." + 436 "Пост-подключение через %1..." + 437 "Предподключение через %1..." + 438 "Подключение выполнено." + 439 "Устройство подключено." + 440 "Отключено." + 441 "Подключение через модем выполнено." + 442 "Подключение через кабель выполнено." + 443 "Открытие порта..." + 444 "Подключение X.25 выполнено." + 445 "Порт открыт." + 446 "Пост-подключение выполнено." + 447 "Предподключение выполнено." + 448 "Подготовка к ответному вызову..." + 449 "Проверка подключений сетевых протоколов..." + 450 "Проверка имени и пароля..." + 451 "Подключено, создание пучка дополнительных линий" + 452 "Неизвестное состояние." + 453 "Ожидание ответного вызова сервера..." + 454 "Ожидание сброса модема..." + 455 "Сохранить это изменение номера телефона?" 456 "scp" 457 "*.scp" - 458 " (*.scp)" - 459 " " - 460 " ." - 461 " " - 462 " SLIP TCP/IP." - 463 ", SLIP, TCP/IP. "" ""." - 464 "" - 465 "& :" - 466 "&:" - 467 " " - 468 " , ." - 469 "" - 470 " " - 471 " " - 472 " " - 473 " SLIP" - 474 "10 " - 475 "10 " - 476 "1 " - 477 "1 " - 478 "24 " - 479 "2 " - 480 "2 " - 481 "30 " - 482 "30 " - 483 "3 " - 484 "4 " - 485 "4 " - 486 "5 " - 487 "5 " - 488 "8 " - 489 "" - 490 " ." - 491 " " - 492 " ?" - 493 " " - 494 " " - 495 " " + 458 "Файлы сценария коммутации (*.scp)" + 459 "Обзор сценариев коммутации" + 460 "Необходимо отметить хотя бы один модем или адаптер." + 461 "Номер телефона" + 462 "Для подключения к серверу SLIP требуется протокол TCP/IP." + 463 "Прежде, чем подключаться к серверам SLIP, следует установить протокол TCP/IP. Он может быть установлен с приложением ""Управление сетью""." + 464 "Состояние" + 465 "&Новый суффикс:" + 466 "&Суффиксы:" + 467 "Суффиксы телефонных номеров" + 468 "Если необходимо, можно выполнить особую настройку." + 469 "Настроить" + 470 "Терминал ввода команд модема" + 471 "Терминал после набора номера" + 472 "Терминал до набора номера" + 473 "Терминал для входа SLIP" + 474 "10 минут" + 475 "10 секунд" + 476 "1 час" + 477 "1 минута" + 478 "24 часа" + 479 "2 часа" + 480 "2 минуты" + 481 "30 минут" + 482 "30 секунд" + 483 "3 секунд" + 484 "4 часа" + 485 "4 минут" + 486 "5 минут" + 487 "5 секунд" + 488 "8 часов" + 489 "никогда" + 490 "Новое подключение можно сделать доступным для всех пользователей или только для вас." + 491 "Доступность подключения" + 492 "Отбросить параметры многоканальной связи для этого элемента?" + 493 "Недоступное устройство" + 494 "Параметры входа" + 495 "Параметры телефонного соединения" 496 "X.25" 497 "X.25 PAD" - 498 " ." - 499 " VPN-" - 500 " ." - 501 " VPN-" - 502 " ." - 503 " " - 504 "ReactOS ." + 498 "Можно предоставить доступ к ресурсам компьютера другим компьютерам в сети с использованием этого подключения." + 499 "Выбор VPN-сервера" + 500 "Не удалось разрешить вызов по требованию." + 501 "Укажите имя или адрес VPN-сервера" + 502 "Не удалось запретить вызов по требованию." + 503 "Публичная сеть" + 504 "ReactOS может сначала установить подключение к публичной сети." 505 "VPN1" - 506 " " - 507 " ." - 508 " ?" - 509 " ""%1"".\n\n ""%2""." - 510 " , , ." - 511 " , IP- 192.168.0.1. . IP-, . ?" - 512 " " - 513 " ." - 514 "&" - 515 " " - 516 " " - 517 " MPPE-40" - 518 " MPPE-128" - 519 " MS-CHAP EAP." - 520 " " - 521 " %1..." - 522 " " - 523 "" + 506 "Общий доступ к подключению Интернета" + 507 "Можно предоставить доступ внешним ресурсам компьютерам в локальной сети с использованием этого подключения." + 508 "Ведомый или ведущий?" + 509 "Был разрешен общий доступ к подключению Интернета для ""%1"".\n\nВместо этого будет разрешен общий доступ для подключения Интернета ""%2""." + 510 "Чтобы подключить два компьютера, ваш компьютер должен быть либо ведомым, либо ведущим." + 511 "Когда общий доступ к подключению к Интернету будет разрешен, сетевой плате локальной сети будет назначен IP-адрес 192.168.0.1. При этом связь с компьютерами сети может быть потеряна. Если другие компьютеры используют статические IP-адреса, следует настроить их на использование динамических адресов. Разрешить общий доступ к подключению Интернета?" + 512 "Выберите устройство" + 513 "Это устройство будет использовано для подключения." + 514 "&Подключение" + 515 "Параметры шифрования определяются сервером" + 516 "Всегда шифровать мои данные" + 517 "Использовать шифрование данных MPPE-40" + 518 "Использовать шифрование данных MPPE-128" + 519 "Выбранное шифрование требует проверки MS-CHAP или EAP." + 520 "Специальное сообщение проверки" + 521 "Установка связи с %1..." + 522 "Имя подключения" + 523 "Автоматически" 524 "PPTP VPN" 525 "L2TP IPSec VPN" - 526 " ." - 527 " " + 526 "Выберите тип подключения." + 527 "Тип подключения" 528 "hh.exe netcfg.chm::/trouble_all.htm" - 529 " " - 530 " , . ." - 531 " , . ." - 532 " ." - 533 " ." - 534 " 1 65535." - 535 " , """"." - 536 " , . ." - 537 " ." - 538 " , """"." - 539 " .\n ." - 540 " ." - 541 " ." - 542 "1 " - 543 " ." - 549 " , ?" - 576 "20 " - 579 " ." - 581 " " - 582 " ." - 583 " ." - 584 " ." - 585 " , ." - 586 " IP- ." - 587 " " - 588 " . \n ." - 589 "" - 1512 " " - 1523 " " - 1526 "-" - 1527 " - ." - 1528 " " - 1529 " ." + 529 "Виртуальное частное подключение" + 530 "Использовать любой способ проверки подлинности, включая незашифрованные пароли. Данные не шифруются." + 531 "Использовать любой способ проверки подлинности, требующий зашифрованный пароль. Данные не шифруются." + 532 "Введите имя этой записи." + 533 "Шифровать пароли и данные." + 534 "Введите номер порта в диапазоне от 1 до 65535." + 535 "Укажите особый способ проверки подлинности, нажав кнопку ""Параметры""." + 536 "Использовать любой способ проверки подлинности, требующий зашифрованный пароль. Данные не шифруются." + 537 "Шифровать пароли и данные." + 538 "Укажите особый способ проверки подлинности, нажав кнопку ""Параметры""." + 539 "Этот номер порта уже используется в другой записи.\nВведите другой номер порта." + 540 "Введите один или несколько портов для входящих ответов." + 541 "Выберите удаляемые записи." + 542 "1 секунда" + 543 "Выберите изменяемый элемент." + 549 "Какое имя у компьютера, к которому выполняется подключение?" + 576 "20 минут" + 579 "Укажите имя для этого подключения к рабочему месту." + 581 "Параметры сетевого приложения" + 582 "Введите в следующем поле имя для этого подключения." + 583 "Введите в следующем поле имя другого компьютера." + 584 "Введите в следующем поле имя поставщика услуг Интернета." + 585 "Введите имя службы, выполняющей подключение к Интернету." + 586 "Введите IP-адрес сервера в частной сети." + 587 "Дополнительные параметры" + 588 "Имя элемента начинается с точки или содержит некоторые недопустимые знаки. \nВыберите другое имя." + 589 "Свойства" + 1512 "Последовательный порт" + 1523 " канал" + 1526 "Смарт-карты" + 1527 "Можно использовать вашу смарт-карту при этом подключении." + 1528 "Прямое подключение" + 1529 "Выберите устройство для этого подключения." 1530 "Verdana Bold" 1531 "12" - 1532 " " - 1533 " ." - 1534 " " - 1535 " ." - 1536 " " - 1537 " ." - 1538 " VPN" - 1539 " ." - 1540 " " - 1541 " " - 1544 "IP-" - 1545 "IP- ." - 1546 " " - 1547 " DNS WINS ." - 1548 " " - 1549 " ." - 1550 " " - 1551 " , ." - 1552 " " - 1553 " , ." - 1554 " " - 1555 " ." - 1556 " " - 1557 " %1 . ?" - 1558 " SLIP ." - 1559 " " - 1560 " " - 1561 "-" - 1562 " ." - 1563 " ( )" - 1564 " ( )" - 1565 " ( )" - 1566 " ( )" - 1567 " ( )" - 1568 " " - 1569 " ." - 1570 " EAP . EAP, ." - 1571 " EAP - MS-CHAP." - 1572 " " - 1573 " ." - 1574 " PAP, SPAP, CHAP. , . ?" - 1575 " '%1', '%2'. '%2' ?" - 1576 " ..." - 1577 " -..." - 1578 " ." - 1579 " -." - 1580 " , . ." - 1581 "& VPN:" - 1582 " ." - 1583 " . . , ?" - 1584 ", , ." - 1585 " " - 1586 " , , ." - 1587 " , . , ." - 1588 " , ." - 1589 " :\r\n\r\n%1" - 1590 " %1" - 1591 " " - 1592 " , ." - 1593 " ." + 1532 "Тип подключения" + 1533 "Выберите тип создаваемого интерфейса вызова по требованию." + 1534 "Выберите устройство" + 1535 "Это устройство будет использовано для подключения." + 1536 "Номер телефона" + 1537 "Выберите номер телефона удаленного сервера или маршрутизатор по которому производится вызов." + 1538 "Тип сети VPN" + 1539 "Выберите тип создаваемого интерфейса виртуальной частной сети." + 1540 "Адрес назначения" + 1541 "Укажите имя или адрес удаленного маршрутизатора" + 1544 "IP-адрес" + 1545 "IP-адрес маршрутизатора для этого интерфейса." + 1546 "Адреса серверов имен" + 1547 "Адреса DNS и WINS для этого интерфейса." + 1548 "Сценарии маршрутизатора" + 1549 "Можно задать сценарии для подключения к удаленному маршрутизатору." + 1550 "Учетные данные входящего подключения" + 1551 "Имя пользователя и пароль, используемые удаленным маршрутизатором при наборе номера этого сервера." + 1552 "Учетные данные исходящего подключения" + 1553 "Имя пользователя и пароль, используемые при подключении к удаленному маршрутизатору." + 1554 "Имя интерфейса" + 1555 "Выберите имя для этого нового интерфейса." + 1556 "Нет доступных устройств" + 1557 "Учетная запись пользователя %1 уже существует на локальном компьютере. Должен ли интерфейс вызова по требованию использовать эту учетную запись?" + 1558 "Параметры безопасности для подключений к серверам SLIP отсутствуют." + 1559 "Небезопасный пароль" + 1560 "Безопасный пароль" + 1561 "Смарт-карта" + 1562 "Необходимо выбрать хотя бы один протокол проверки пароля." + 1563 "не разрешено (отключиться если требуется шифрование)" + 1564 "необязательное (подключиться даже без шифрования)" + 1565 "обязательное (отключиться если нет шифрования)" + 1566 "самое стойкое (отключиться если нет шифрования)" + 1567 " (шифрование включено)" + 1568 "Детали учетной записи в Интернете" + 1569 "Для учетной записи Интернета потребуется имя учетной записи и пароль." + 1570 "Выбранные пакет EAP не предоставляет ключи шифрования. Выберите пакет EAP, обеспечивающий ключи или не используйте шифрование вообще." + 1571 "Выбранное шифрование требует методов проверки EAP или какой-либо версии MS-CHAP." + 1572 "Протоколы и безопасность" + 1573 "Выберите транспортные протоколы и параметры безопасности для этого подключения." + 1574 "Выбранные протоколы включают PAP, SPAP, и CHAP. Если будет произведено согласование одного из них, шифрование данных использоваться не будет. Использовать эти параметры?" + 1575 "Для подключения '%1', требуется сначала подключиться к '%2'. Произвести подключение к '%2' сейчас?" + 1576 "Подключение через параллельный кабель..." + 1577 "Подключение через ИК-связь..." + 1578 "Подключено через параллельный кабель." + 1579 "Подключено через ИК-связь." + 1580 "Это подключение было настроено на использование шифрования данных, не поддерживаемого установленным программным обеспечением. Параметры безопасности этого подключения будут изменены на использование наиболее сильного из поддерживаемых методов шифрования." + 1581 "Т&ип VPN:" + 1582 "Введите имя пользователя." + 1583 "Это имя и пароль будут сохранены для вас. Уже существуют сохраненные имя и пароль для всех других пользователей этого подключения. Удалить имя и пароль, сохраненные для всех других пользователей подключения?" + 1584 "Например, можно ввести имя рабочего места или имя сервера, к которому будет выполняться подключение." + 1585 "Сведения об учетной записи" + 1586 "Элементы управления на этой странице свойств отключены, поскольку надо выполнить перезагрузку системы, прежде чем изменять параметры настройки." + 1587 "Элементы управления на этой странице свойств отключены, поскольку уже открыты один или несколько других страниц свойств сети. Чтобы воспользоваться элементами управления, закройте все страницы свойств и заново откройте эту страницу." + 1588 "Некоторые элементы управления на этой странице свойств отключены, поскольку вы не имеете достаточных привилегий для доступа к ним." + 1589 "От поставщика службы доступа получено следующее сообщение:\r\n\r\n%1" + 1590 "Переподключение %1" + 1591 "Имя службы" + 1592 "Укажите имя службы, обеспечивающей высокоскоростное подключение." + 1593 "Для вашей учетной записи потребуется имя учетной записи и пароль." 1594 "PPPOE1-0" - 1595 " - Ethernet(PPPoE)" - 1596 " & :" - 1611 " " - 1612 " , . \n ." - 1613 " " - 1634 " ReactOS (WMI) , ReactOS .\n\n , WMI. """" """", "" ReactOS"" """"." - 1635 "ReactOS . , ReactOS (WMI) . , "" "" ReactOS ( ). "" "" "" "" ( """")." - 1646 " " - 1647 " " - 1648 " " - 1649 " " - 1650 " " - 1651 " " - 1652 " " - 1653 " " - 1654 " " + 1595 "Протокол точка-точка по Ethernet(PPPoE)" + 1596 "Тип создаваемого в&ысокоскоростного подключения:" + 1611 "Высокоскоростное подключение" + 1612 "Предварительный ключ выбран для использования, но не был введен. \nВведите предварительный ключ." + 1613 "Не удается отправить учетные данные" + 1634 "Поскольку служба инструментария управления ReactOS (WMI) была выключена, ReactOS не может вывести свойства этого подключения или домашней сети.\n\nЧтобы настроить свойства подключения или домашней сети, необходимо включить службу WMI. Для этого на панели управления ""Администрирование"" дважды щелкните значок ""Службы"", щелкните правой кнопкой службу ""Инструментарий управления ReactOS"" и выберите пункт ""Запустить""." + 1635 "ReactOS не удается вывести свойства этого подключения. Возможно, данные инструментария управления ReactOS (WMI) повреждены. Чтобы исправить это, воспользуйтесь средством ""Восстановление системы"" для восстановления предыдущего состояния ReactOS (возврата к точке восстановления). Средство ""Восстановление системы"" находится в папке ""Служебные программы"" (меню ""Стандартные"")." + 1646 "Разрешить входящий запрос эха" + 1647 "Разрешить входящий запрос штампа времени" + 1648 "Разрешить входящий запрос маски" + 1649 "Разрешить входящий запрос маршрутизатора" + 1650 "Разрешать присваивать исходящему назначению недоступное значение" + 1651 "Разрешать снижать скорость источнику исходящих сообщений" + 1652 "Разрешать любые параметры исходящих сообщений" + 1653 "Разрешить превышение исходящего времени" + 1654 "Разрешать перенаправление" 1655 "log" 1656 "*.log" - 1657 " (*.log)" - 1658 "" - 1663 " " - 1664 " , . ." - 1665 ", , . , , ." - 1666 " , , ." - 1667 " , , , ." - 1668 " ." - 1669 ", - , "" ""." - 1670 " , , ." - 1671 " - , "" "" (bad header)." - 1672 " - , , , "" "" (time expired)." - 1673 ", , ." - 1675 " . 1 32767KB." - 1685 " . (Guest)." - 1686 " . ( , .)" - 1687 "& " - 1688 "& " - 1689 "&" - 1690 " ?\n" - 7301 " TCP/IP" - 7302 " %1 %2." - 7306 " " - 7307 " " - 7308 " " - 7309 " " - 7310 " " - 7311 " " - 7312 " " - 7313 " TCP/IP " - 7314 " IPX " - 7315 " " - 7316 "" - 7317 "" - 7318 " " - 7319 " " - 7320 " " - 7321 " """"." - 7322 " ." - 7323 " . ." - 7324 " ." - 7325 " " - 7326 " ." - 7327 " ." - 7328 " ." - 7329 " . " - 7330 " - ." - 7331 " : ." - 7332 " , ." - 7333 " , ." - 7334 " ." - 7335 " , """"." - 7336 " VPN ( )." - 7337 " ." - 7338 " : ." - 7339 " ." - 7340 " ." - 7341 " ." - 7342 " , TCP/IP." - 7343 " , IPX." - 7344 " TCP/IP." - 7345 " IPX." - 7346 " TCP/IP ." - 7347 " IPX ." - 7348 " , . ." - 7349 " , ." - 7350 " , ( )." - 7351 " ." - 7352 " , ." - 7353 " " - 7354 ", , , """". %s? " - 7355 " . . ?" - 7356 " . . , , 255.255.0.0, , 255.0.255.0 - . \n" - 7357 " " - 7358 " , ." - 7359 " " - 7360 " ." - 7361 " (VPN)" - 7362 " VPN-." - 7363 " " - 7364 " ." - 7365 " " + 1657 "Файлы журнала брандмауэра (*.log)" + 1658 "Обзор" + 1663 "Выберите подключение к частной сети" + 1664 "Чтобы разрешить общий доступ к подключению к Интернету, необходимо выбрать подключение для частной сети. Выберите подключение из списка доступных подключений." + 1665 "Сообщения, отправленные на этот компьютер, будут переданы обратно отправителю. Такой режим обычно используется для устранения неполадок, например, при проверке связи с компьютером." + 1666 "Получение данных, отправленных на данный компьютер, может быть подтверждено сообщением с указанием времени получения." + 1667 "Этот компьютер будет прослушивать сообщения, содержащие дополнительные сведения об общедоступной сети, к которой он подключен, а также отвечать на них." + 1668 "Этот компьютер будет отвечать на запросы о распознанных им маршрутах." + 1669 "Данные, отправленные через Интернет и не дошедшие до данного компьютера из-за ошибки, будут отброшены с уведомлением ""точка назначения недоступна""." + 1670 "Когда возможности компьютера по обработке входящих данных будут недостаточны для текущей скорости передачи, данные будут отброшены, а отправителю будет направлен запрос на уменьшение скорости." + 1671 "Когда этот компьютер отбросит полученные данные из-за неправильных заголовков, он ответит отправителю сообщением об ошибке ""неверный заголовок"" (bad header)." + 1672 "Когда этот компьютер прервет передачу неполного набора данных из-за того, что передача полного набора потребует время, превышающее допустимое, он ответит отправителю сообщением об ошибке ""время истекло"" (time expired)." + 1673 "Данные, отправленные с этого компьютера, будут отправлены по другому маршруту в соответствии с изменениями пути по умолчанию." + 1675 "Введено недопустимое значение размера файла журнала. Введите значение от 1 до 32767KB." + 1685 "В вашей учетной записи отсутствует разрешение на использование этого подключения. Обычно причиной этого является вход с учетной записью гостя (Guest)." + 1686 "Введите имя учетной записи и пароль. (Если вы забыли имя существующей учетной записи или пароль, обратитесь к администратору сети.)" + 1687 "&Имя компьютера" + 1688 "Им&я поставщика услуг" + 1689 "&Организация" + 1690 "Какой номер телефона будет использоваться для этого подключения?\n" + 7301 "Свойства входящих вызовов TCP/IP" + 7302 "Для этого поля необходимо выбрать значение от %1 до %2." + 7306 "Ошибка входящих подключений" + 7307 "Общая ошибка входящих подключений" + 7308 "Входящие подключения" + 7309 "Ошибка сетевых входящих подключений" + 7310 "Многоканальная ошибка входящих подключений" + 7311 "Ошибка входящих подключений" + 7312 "Ошибка инициализации входящих подключений" + 7313 "Ошибка свойств TCP/IP входящих подключений" + 7314 "Ошибка свойств IPX входящих подключений" + 7315 "Ошибка входящих подключений" + 7316 "Универсальный" + 7317 "Устройство" + 7318 "Различные базы данных" + 7319 "База данных пользователей" + 7320 "База данных протоколов" + 7321 "Необходимо ввести имя входа нового пользователя или нажать кнопку ""Отмена""." + 7322 "Длина введенного пароля слишком мала." + 7323 "Введенные пароли не совпадают. Повторите ввод паролей." + 7324 "Произошла внутренняя ошибка." + 7325 "Просмотр списка" + 7326 "Произошла ошибка при внесении изменений в локальную базу данных пользователей." + 7327 "У вас нет прав на добавление пользователей в локальную базу данных." + 7328 "Такой пользователь уже существует в локальной базе данных пользователей." + 7329 "Введенный пароль отвергнут системой и пользователь не был добавлен в локальную базу. " + 7330 "Не удалось перезагрузить локальную базу пользователей из-за внутренней ошибки." + 7331 "Произошла внутренняя ошибка: испорченный дескриптор локальной базы данных пользователей." + 7332 "Не удалось загрузить ресурсы, необходимые для отображения вкладки пользователей." + 7333 "Произошла ошибка при попытке отката изменений, внесенных вами в локальную базу данных пользователей." + 7334 "Дескриптор базы данных устройств испорчена." + 7335 "Не удалось загрузить ресурсы, необходимые для отображения вкладки ""Общие""." + 7336 "Произошла ошибка при попытке применить сделанные вами изменения настройки устройств или VPN (виртуальной частной сети)." + 7337 "Произошла внутренняя ошибка." + 7338 "Произошла внутренняя ошибка: дескриптор базы данных сетевых компонентов поврежден." + 7339 "Произошла внутренняя ошибка." + 7340 "Произошла ошибка при попытке применить сделанные вами изменения для указанных выше сетевых компонентов." + 7341 "Произошла внутренняя ошибка." + 7342 "Не удалось внести изменения, сделанные для протокола TCP/IP." + 7343 "Не удалось внести изменения, сделанные для протокола IPX." + 7344 "Не удалось отобразить диалог свойств TCP/IP." + 7345 "Не удалось отобразить диалог свойств IPX." + 7346 "Не удалось загрузить свойства TCP/IP с этой системы." + 7347 "Не удалось загрузить свойства IPX с этой системы." + 7348 "Входящие подключения зависят от служб маршрутизации и удаленного доступа, запуск которых не удался. Дополнительные сведения содержатся в журнале событий." + 7349 "Не удается разрешить изменение компонентов сети в настоящее время, поскольку их изменение уже производится." + 7350 "Введенные вами данные о новом пользователе не были добавлены в локальную базу данных пользователей, поскольку указанные имя или пароль не соответствуют системной политике (неправильная длина или формат)." + 7351 "Не удалось удалить указанного пользователя." + 7352 "Не удалось удалить указанный сетевой компонент, поскольку он используется в данный момент." + 7353 "Предупреждение входящих подключений" + 7354 "Пользователи, которых вы удалите, будут удалены окончательно, даже если затем будет нажата кнопка ""Отмена"". Подтверждаете окончательное удаление %s? " + 7355 "Вы собираетесь переключиться на работу с системной консолью управления. Страница свойств входящих подключений будет закрыта и сделанные изменения вступят в силу. Подтверждаете продолжение?" + 7356 "Было изменено значение сетевой маски. За первым же нулевым битом маски могут следовать только нулевые биты. Например, значение сетевой маски, записанное в десятичной нотации как 255.255.0.0, допустимо, а 255.0.255.0 - нет. \n" + 7357 "Разрешения пользователей" + 7358 "Можно указать пользователей, которым разрешается подключаться к этому компьютеру." + 7359 "Устройства для входящих подключений" + 7360 "Можно выбрать устройства используемые для приема входящих подключений." + 7361 "Входящее подключение к виртуальной частной сети (VPN)" + 7362 "Другой компьютер подключиться к вашему через VPN-подключение." + 7363 "Программы работы с сетью" + 7364 "Программы работы с сетью позволяют этому компьютеру принимать подключения от других типов компьютеров." + 7365 "Завершение работы мастера новых подключений" 7366 " " - 7367 " " - 7371 ", , ." + 7367 "Входящие подключения" + 7371 "Оборудование, способное принимать входящие звонки, не установлено." 7372 " " - 7373 " &:" - 7374 " & :" - 7375 " " - 7376 " " - 7377 " ?" - 7378 ", , ." - 7379 " " - 7380 " , "" "" . ?\n" - 7381 "& " - 7382 "& " - 7383 " IPX 00000000 FFFFFFFF. , ." - 7384 "" - 7385 " (%s)" - 7386 " "" "" , . ." - 7387 " ." - 7388 " ReactOS. ?" - 7389 " ." - 7390 " " - 7391 " ""%1"". """". . , """"?\r\n\n "" "", """", """". """" ." - 7392 " . . , """".\n" - 7393 " " - 7394 " IP-." - 7395 " ." - 7396 " TCP/IP. 1.0.0.0 224.0.0.0 127.x.x.x." - 7397 " TCP/IP, ." - 7398 " ." - 7399 " . "" "" , . ." + 7373 "Назначить указанный номер &сети:" + 7374 "Назначать номера &сети последовательно из:" + 7375 "Новый пользователь" + 7376 "Устройство подключения" + 7377 "Какое устройство будет использовано для подключения?" + 7378 "Оборудование, способное принимать прямые подключения, не установлено." + 7379 "Предупреждение нового входящего подключения" + 7380 "Поскольку этот сервер принадлежит домену, необходимо использовать консоль ""Маршрутизация и удаленный доступ"" для настройки этого компьютера на прием входящих подключений. Отменить изменения и переключиться на эту консоль?\n" + 7381 "&Назначить номер сети автоматически" + 7382 "&Назначать номера сети автоматически" + 7383 "Входящие подключения не могут использовать номера сетей IPX 00000000 или FFFFFFFF. Либо измените назначенный номер сети, либо используйте автоматическое назначение номеров сетей." + 7384 "на" + 7385 "Последовательный порт (%s)" + 7386 "В окне ""Сетевые подключения"" не отображаются некоторые параметры входящих подключений, установленные с использованием консолей диспетчера локальных пользователей или политики удаленного доступа. Для получения полных сведений о входящих подключениях необходимо воспользоваться этими консолями." + 7387 "Выбранный режим ответного вызова требует ввода правильного номера для ответного вызова." + 7388 "Для завершения операции необходимо перезагрузить ReactOS. Произвести перезагрузку сейчас?" + 7389 "Выбранное устройство не имеет настраиваемых параметров." + 7390 "Неправильный диапазон" + 7391 "Произведен запрос на запрет входящих подключений для ""%1"". Для выполнения этого необходимо остановить службу ""Сервер"". После ее остановки доступ к общим папкам и принтерам этого компьютера будет невозможен. Вызвать системную консоль, которая позволяет остановить службу ""Сервер""?\r\n\nВыберите ""Управление компьютером"", ""Служебные"", ""Службы"". В правой панели щелкните правой кнопкой мыши по значку ""Сервер"" и выберите команду остановки." + 7392 "Использование последовательного порта для прямого подключения к другому компьютеру запрещено. Оно будет разрешено после завершения работы мастера. Затем можно будет произвести настройку скорости и других параметров порта, нажав правой кнопкой мыши на значке этого подключения и выбрав пункт ""Свойства"".\n" + 7393 "Входящие подключения" + 7394 "Указан неправильный пул IP-адресов." + 7395 "Указана неправильная маска подсети." + 7396 "Указан неправильный начальный адрес пула адресов TCP/IP. Адреса должны находиться в переделах от 1.0.0.0 до 224.0.0.0 за исключением диапазона 127.x.x.x." + 7397 "Указан неправильный пул адресов TCP/IP, поскольку введенный адрес выходит за рамки маски." + 7398 "Начальный адрес должен быть меньше конечного адреса." + 7399 "Производится остановка службы маршрутизации и удаленного доступа. Параметр ""Входящие подключения"" не будет доступен до тех пор, пока остановка не будет полностью произведена. Подождите немного и повторите попытку." 7400 "%s (%s)" - 7401 "%s (: %d)" - 7402 " VPN- (PPTP)" - 7403 " VPN- (L2TP)" - 7404 "IP- (IKE)" + 7401 "%s (каналов: %d)" + 7402 "Входящее VPN-подключение (PPTP)" + 7403 "Входящее VPN-подключение (L2TP)" + 7404 "IP-безопасность (IKE)" 7405 "127.0.0.1" - 7406 " " - 29900 " ." - 29901 " MPRAPI.DLL SYSTEM32." + 7406 "У вас недостаточно полномочий для настройки входящих подключений" + 29900 "Не удается загрузить службу диспетчера подключений удаленного доступа." + 29901 "Не удалось загрузить файл MPRAPI.DLL из папки SYSTEM32." END diff --git a/dll/win32/rasdlg/lang/uk-UA.rc b/dll/win32/rasdlg/lang/uk-UA.rc index be47f0fdc29..f956dc1d8d5 100644 --- a/dll/win32/rasdlg/lang/uk-UA.rc +++ b/dll/win32/rasdlg/lang/uk-UA.rc @@ -10,342 +10,342 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT 102 DIALOGEX 0, 0, 255, 265 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Додаткові номери телефонів" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , .", 1018, 7, 5, 243, 16 - LTEXT " &:", 1019, 7, 27, 238, 8 + LTEXT "Укажіть додаткові номери телефону, які слід використовувати для цього підключення.", 1018, 7, 5, 243, 16 + LTEXT "Номери &телефонів:", 1019, 7, 27, 238, 8 CONTROL "", 1012, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000848D, 7, 38, 217, 144 - PUSHBUTTON "&", 1017, 230, 40, 18, 16, BS_ICON - PUSHBUTTON "&", 1015, 230, 61, 18, 16, BS_ICON - PUSHBUTTON "&...", 1013, 7, 187, 70, 14 - PUSHBUTTON "&...", 1016, 81, 187, 70, 14 - PUSHBUTTON "&", 1014, 154, 187, 70, 14 - AUTOCHECKBOX "& ' ", 1011, 8, 210, 243, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1010, 8, 228, 243, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "В&гору", 1017, 230, 40, 18, 16, BS_ICON + PUSHBUTTON "В&низ", 1015, 230, 61, 18, 16, BS_ICON + PUSHBUTTON "&Додати...", 1013, 7, 187, 70, 14 + PUSHBUTTON "З&мінити...", 1016, 81, 187, 70, 14 + PUSHBUTTON "В&идалити", 1014, 154, 187, 70, 14 + AUTOCHECKBOX "&У разі невдачі спробувати з'єднатися за наступним номером", 1011, 8, 210, 243, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "П&еремістити вдалий номер на початок списку", 1010, 8, 228, 243, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 122, 245, 60, 14 - PUSHBUTTON "", 2, 188, 245, 60, 14 + PUSHBUTTON "Скасувати", 2, 188, 245, 60, 14 END 103 DIALOGEX 6, 18, 250, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Мережні підключення" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", 1029, 5, 5, 241, 35, NOT WS_GROUP - LTEXT "&ϳ:", -1, 5, 46, 238, 10 + LTEXT "&Підключення:", -1, 5, 46, 238, 10 CONTROL "List1", 1677, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 5, 57, 240, 57 - AUTOCHECKBOX "& ", 1022, 8, 125, 235, 10 - PUSHBUTTON "&", 1026, 7, 149, 60, 14 - DEFPUSHBUTTON "ϳ&...", 1024, 117, 149, 60, 14 - PUSHBUTTON "", 1025, 183, 149, 60, 14 + AUTOCHECKBOX "&Не питати до наступного входу до системи", 1022, 8, 125, 235, 10 + PUSHBUTTON "П&араметри", 1026, 7, 149, 60, 14 + DEFPUSHBUTTON "Підкл&ючити...", 1024, 117, 149, 60, 14 + PUSHBUTTON "Скасувати", 1025, 183, 149, 60, 14 END 104 DIALOGEX 6, 18, 269, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Помилки групи ліній" FONT 8, "MS Shell Dlg" BEGIN ICON 32516, 1031, 7, 7, 20, 20 - LTEXT " . ", 1033, 37, 8, 216, 20 + LTEXT "Деякі додаткові лінії не підключені. ", 1033, 37, 8, 216, 20 CONTROL "", 1032, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00008401, 37, 83, 224, 136 - AUTOCHECKBOX "& ", 1030, 38, 226, 222, 10 - DEFPUSHBUTTON "&", 1, 135, 242, 60, 14 - PUSHBUTTON "&", 2, 201, 242, 60, 14 - LTEXT " ' , , '. "" "".", -1, 37, 36, 224, 44 + AUTOCHECKBOX "Більш&е не використовувати невдалі лінії", 1030, 38, 226, 222, 10 + DEFPUSHBUTTON "Прий&мати", 1, 135, 242, 60, 14 + PUSHBUTTON "&Завершити", 2, 201, 242, 60, 14 + LTEXT "Якщо вдалося з'єднатися лише по одній лінії, можливо, сервер не налаштовано на багатоканальний зв'язок. У такому разі установіть прапорець ""Більше не використовувати невдалі лінії"".", -1, 37, 36, 224, 44 END 105 DIALOGEX 0, 0, 261, 253 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Додаткові параметри безпеки" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1547, 7, 33, 246, 191 - LTEXT "& :", 1546, 7, 5, 247, 10 + GROUPBOX "Безпечний вхід", 1547, 7, 33, 246, 191 + LTEXT "&Шифрування даних:", 1546, 7, 5, 247, 10 COMBOBOX 1495, 7, 17, 247, 76, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTORADIOBUTTON "& (EAP)", 1544, 17, 47, 226, 8, WS_GROUP - LTEXT " EAP", -1, 18, 64, 35, 8, NOT WS_VISIBLE | NOT WS_GROUP + AUTORADIOBUTTON "П&ротокол розширеної перевірки автентичності (EAP)", 1544, 17, 47, 226, 8, WS_GROUP + LTEXT "Тип EAP", -1, 18, 64, 35, 8, NOT WS_VISIBLE | NOT WS_GROUP COMBOBOX 1034, 53, 62, 191, 42, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1035, 184, 77, 60, 14 - AUTORADIOBUTTON "& ", 1545, 17, 92, 224, 10 - AUTOCHECKBOX "& (PAP)", 1491, 28, 105, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTOCHECKBOX "& Shiva (SPAP)", 1496, 28, 119, 214, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& (CHAP)", 1494, 28, 133, 215, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& MS CHAP (MS-CHAP)", 1493, 28, 148, 212, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& MS-CHAP Win 95", 200, 46, 162, 198, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& Microsoft (MS-CHAP v2)", 1492, 28, 176, 200, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "В&ластивості", 1035, 184, 77, 60, 14 + AUTORADIOBUTTON "&Дозволити такі протоколи", 1545, 17, 92, 224, 10 + AUTOCHECKBOX "&Незашифрований пароль (PAP)", 1491, 28, 105, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Про&токол перевірки пароля Shiva (SPAP)", 1496, 28, 119, 214, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Пр&отокол перевірки пароля (CHAP)", 1494, 28, 133, 215, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Протокол перевірки пароля MS CHAP (MS-CHAP)", 1493, 28, 148, 212, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "До&зволити старий протокол MS-CHAP для Win 95", 200, 46, 162, 198, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Прото&кол перевірки пароля Microsoft (MS-CHAP v2)", 1492, 28, 176, 200, 10, BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 28, 189, 208, 1 - AUTOCHECKBOX "& MS-CHAP ' ReactOS ( ' , )", 1549, 28, 195, 213, 24, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Дл&я протоколів на основі MS-CHAP автоматично використовувати ім'я для входу та пароль ReactOS (а також ім'я домену, якщо воно є)", 1549, 28, 195, 213, 24, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 127, 232, 60, 14 - PUSHBUTTON "", 2, 192, 232, 60, 14 + PUSHBUTTON "Скасувати", 2, 192, 232, 60, 14 END 106 DIALOGEX 6, 18, 255, 109 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Завершення підключення" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 97, 91, 60, 14 ICON 563, 1046, 7, 7, 20, 20 - LTEXT "ϳ .", 1047, 40, 7, 212, 16 - LTEXT " , "" "" ( ).", -1, 40, 30, 212, 34 - AUTOCHECKBOX "& ", 1045, 40, 69, 212, 10, BS_TOP | BS_MULTILINE + LTEXT "Підключення установлено.", 1047, 40, 7, 212, 16 + LTEXT "Щоб перевірити стан цього підключення, клацніть правою кнопкою миші його значок у папці ""Мережні підключення"" або на панелі завдань (якщо він там є).", -1, 40, 30, 212, 34 + AUTOCHECKBOX "&Більше не показувати це повідомлення", 1045, 40, 69, 212, 10, BS_TOP | BS_MULTILINE END 107 DIALOGEX 0, 0, 258, 167 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1053, 7, 5, 243, 92 - LTEXT "& :", 1055, 18, 17, 54, 8 + GROUPBOX "Номер телефону", 1053, 7, 5, 243, 92 + LTEXT "&Код міста:", 1055, 18, 17, 54, 8 COMBOBOX 1049, 17, 30, 55, 129, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", 1057, 77, 17, 166, 8, NOT WS_GROUP + LTEXT "&Номер телефону:", 1057, 77, 17, 166, 8, NOT WS_GROUP EDITTEXT 1051, 77, 30, 163, 14, ES_AUTOHSCROLL - LTEXT " &:", 1056, 18, 48, 221, 8, NOT WS_GROUP + LTEXT "Код країни або ре&гіону:", 1056, 18, 48, 221, 8, NOT WS_GROUP COMBOBOX 1054, 17, 61, 224, 93, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1048, 20, 81, 219, 10, BS_TOP | BS_MULTILINE - GROUPBOX "&", 1052, 7, 102, 243, 36 + AUTOCHECKBOX "&Використовувати правила набору номера", 1048, 20, 81, 219, 10, BS_TOP | BS_MULTILINE + GROUPBOX "&Примітка", 1052, 7, 102, 243, 36 EDITTEXT 1050, 17, 115, 224, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 127, 147, 60, 14 - PUSHBUTTON "", 2, 191, 147, 60, 14 + PUSHBUTTON "Скасувати", 2, 191, 147, 60, 14 END 108 DIALOGEX 6, 18, 222, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Зміна пароля" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " 䳿 . ""OK"".", 1062, 7, 5, 210, 24 - LTEXT "& :", 1064, 8, 43, 108, 8 + LTEXT "Термін дії пароля у віддаленій мережі минув. Введіть пароль і натисніть кнопку ""OK"".", 1062, 7, 5, 210, 24 + LTEXT "&Новий пароль:", 1064, 8, 43, 108, 8 EDITTEXT 1060, 118, 38, 98, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&ϳ:", 1061, 8, 61, 102, 8 + LTEXT "&Підтвердження:", 1061, 8, 61, 102, 8 EDITTEXT 1058, 118, 57, 98, 14, ES_PASSWORD | ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 90, 84, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 154, 84, 60, 14 + PUSHBUTTON "Скасувати", 2, 154, 84, 60, 14 END 109 DIALOGEX 6, 18, 223, 122 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Зміна пароля" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " 䳿 . ""OK"".", 1062, 7, 5, 212, 29 - LTEXT "& :", 1063, 7, 42, 108, 8 + LTEXT "Термін дії пароля у віддаленій мережі минув. Введіть пароль і натисніть кнопку ""OK"".", 1062, 7, 5, 212, 29 + LTEXT "&Старий пароль:", 1063, 7, 42, 108, 8 EDITTEXT 1059, 116, 38, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "& :", 1064, 7, 60, 108, 8 + LTEXT "&Новий пароль:", 1064, 7, 60, 108, 8 EDITTEXT 1060, 116, 56, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&ϳ:", 1061, 7, 78, 108, 8 + LTEXT "&Підтвердження:", 1061, 7, 78, 108, 8 EDITTEXT 1058, 116, 74, 100, 14, ES_PASSWORD | ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 92, 101, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 156, 101, 60, 14 + PUSHBUTTON "Скасувати", 2, 156, 101, 60, 14 END 110 DIALOGEX 12, 16, 230, 105 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "³ " +CAPTION "Відповідний виклик" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . ""OK"", . , """".", 1066, 5, 5, 221, 39, SS_NOPREFIX - LTEXT "& :", 1067, 5, 46, 222, 8, NOT WS_GROUP + LTEXT "Ви маєте право на зворотний виклик із боку сервера. Якщо натиснути кнопку ""OK"", сервер зробить зворотний виклик за вказаним нижче номером. Щоб відмовитися від зворотного виклику, натисніть кнопку ""Скасувати"".", 1066, 5, 5, 221, 39, SS_NOPREFIX + LTEXT "&Введіть номер телефону вашого модема:", 1067, 5, 46, 222, 8, NOT WS_GROUP EDITTEXT 1065, 5, 57, 221, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 100, 85, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 164, 85, 60, 14 + PUSHBUTTON "Скасувати", 2, 164, 85, 60, 14 END 111 DIALOGEX 6, 19, 265, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " : %1" +CAPTION "Помилка підключення: %1" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, 1068, 7, 7, 20, 20, WS_GROUP LTEXT "", 1070, 34, 7, 226, 105 - DEFPUSHBUTTON " =88", 1, 4, 117, 128, 14, WS_GROUP - PUSHBUTTON "", 2, 136, 117, 60, 14 - PUSHBUTTON "&", 1069, 200, 117, 60, 14 + DEFPUSHBUTTON "Не набирати номер=88", 1, 4, 117, 128, 14, WS_GROUP + PUSHBUTTON "Скасувати", 2, 136, 117, 60, 14 + PUSHBUTTON "&Подробиці", 1069, 200, 117, 60, 14 END 112 DIALOGEX 6, 18, 263, 219 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Автоматичне виконання дзвінків" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS ' .", 1085, 9, 7, 253, 30 - GROUPBOX " ", -1, 6, 38, 249, 71 - LTEXT " , :", 1083, 16, 51, 237, 16, NOT WS_GROUP - LTEXT " &:", -1, 16, 73, 100, 8 + LTEXT "ReactOS може автоматично установлювати й завершувати зв'язок через пристрої залежно від інтенсивності обміну даними.", 1085, 9, 7, 253, 30 + GROUPBOX "Автоматичне підключення", -1, 6, 38, 249, 71 + LTEXT "Зателефонувати по іншій лінії, коли підключення відповідає обом таким умовам:", 1083, 16, 51, 237, 16, NOT WS_GROUP + LTEXT "Активно не ме&нше:", -1, 16, 73, 100, 8 COMBOBOX 1079, 117, 70, 60, 100, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &:", 1084, 16, 92, 99, 8, NOT WS_GROUP + LTEXT "Тривалість не &менше:", 1084, 16, 92, 99, 8, NOT WS_GROUP COMBOBOX 1080, 117, 89, 90, 162, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " '", -1, 6, 113, 248, 81 - LTEXT " ', :", 1086, 16, 127, 230, 18, NOT WS_GROUP - LTEXT " &:", -1, 16, 150, 92, 8 + GROUPBOX "Автоматичний розрив з'єднання", -1, 6, 113, 248, 81 + LTEXT "Завершити зв'язок, коли підключення відповідає обом таким умовам:", 1086, 16, 127, 230, 18, NOT WS_GROUP + LTEXT "Активно не &більше:", -1, 16, 150, 92, 8 COMBOBOX 1081, 115, 146, 60, 100, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &:", 1087, 16, 168, 92, 8, NOT WS_GROUP + LTEXT "Тривалість не м&енше:", 1087, 16, 168, 92, 8, NOT WS_GROUP COMBOBOX 1082, 115, 166, 90, 151, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP DEFPUSHBUTTON "OK", 1, 131, 199, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 194, 199, 60, 14 + PUSHBUTTON "Скасувати", 2, 194, 199, 60, 14 END 113 DIALOGEX 21, 46, 225, 65 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "ϳ %1..." +CAPTION "Підключення до %1..." FONT 8, "MS Shell Dlg" BEGIN ICON 563, 1417, 7, 7, 20, 20 LTEXT "", 1097, 36, 7, 185, 35, SS_NOPREFIX - PUSHBUTTON "", 2, 83, 47, 60, 14 + PUSHBUTTON "Скасувати", 2, 83, 47, 60, 14 END 114 DIALOGEX 6, 18, 225, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "³ " +CAPTION "Віддалений доступ до мережі" FONT 8, "MS Shell Dlg" BEGIN ICON 563, 1098, 7, 6, 20, 20, WS_GROUP - LTEXT " . ?", 1099, 40, 6, 181, 34, NOT WS_GROUP - PUSHBUTTON "&", 1, 60, 42, 50, 14 - DEFPUSHBUTTON "&ͳ", 2, 115, 42, 50, 14 + LTEXT "Спроба автоматичного набору номера не вдалася. Вимкнути автоматичний набір номера для цього розташування?", 1099, 40, 6, 181, 34, NOT WS_GROUP + PUSHBUTTON "&Так", 1, 60, 42, 50, 14 + DEFPUSHBUTTON "&Ні", 2, 115, 42, 50, 14 END 115 DIALOGEX 0, 0, 263, 124 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 263, 50 - LTEXT "&:", 1412, 9, 60, 68, 8 + LTEXT "Н&абрати:", 1412, 9, 60, 68, 8 COMBOBOX 1416, 88, 56, 165, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "&̳ :", 1415, 9, 77, 71, 8 + LTEXT "&Місце виклику:", 1415, 9, 77, 71, 8 COMBOBOX 1414, 88, 75, 89, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 181, 75, 72, 14 + PUSHBUTTON "&Правила", 1108, 181, 75, 72, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 8, 96, 245, 1 - DEFPUSHBUTTON "&", 1590, 8, 103, 61, 14 - PUSHBUTTON "", 1591, 70, 103, 60, 14 - PUSHBUTTON "&", 1107, 132, 103, 60, 14 - PUSHBUTTON "&", 1592, 194, 103, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 103, 61, 14 + PUSHBUTTON "Скасувати", 1591, 70, 103, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 132, 103, 60, 14 + PUSHBUTTON "&Довідка", 1592, 194, 103, 60, 14 END 116 DIALOGEX 0, 0, 265, 176 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 8, 60, 88, 8 + LTEXT "&Користувач:", 1413, 8, 60, 88, 8 EDITTEXT 1104, 103, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 8, 79, 88, 8 + LTEXT "Парол&ь:", 1112, 8, 79, 88, 8 EDITTEXT 1103, 103, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 8, 97, 248, 1 - AUTOCHECKBOX "& ' :", 1101, 14, 105, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 26, 120, 226, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " &- ", 1623, 26, 134, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Зберігати ім'я користувача та пароль:", 1101, 14, 105, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "лише дл&я мене", 1622, 26, 120, 226, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для &будь-якого користувача", 1623, 26, 134, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 8, 149, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 156, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 71, 156, 60, 14 - PUSHBUTTON "&", 1107, 133, 156, 60, 14 - PUSHBUTTON "&", 1592, 195, 156, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 156, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 1591, 71, 156, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 133, 156, 60, 14 + PUSHBUTTON "&Довідка", 1592, 195, 156, 60, 14 END 117 DIALOGEX 0, 0, 263, 192 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 9, 61, 92, 8 + LTEXT "&Користувач:", 1413, 9, 61, 92, 8 EDITTEXT 1104, 102, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 9, 80, 92, 8 + LTEXT "Парол&ь:", 1112, 9, 80, 92, 8 EDITTEXT 1103, 102, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1110, 9, 99, 91, 8 + LTEXT "До&мен:", 1110, 9, 99, 91, 8 EDITTEXT 1102, 102, 95, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 9, 116, 247, 1 - AUTOCHECKBOX "& ' :", 1101, 12, 123, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 25, 137, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " &- ", 1623, 25, 151, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Зберігати ім'я користувача та пароль:", 1101, 12, 123, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "лише дл&я мене", 1622, 25, 137, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для &будь-якого користувача", 1623, 25, 151, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 167, 247, 1 - DEFPUSHBUTTON "&", 1590, 8, 173, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 71, 173, 60, 14 - PUSHBUTTON "&", 1107, 133, 173, 60, 14 - PUSHBUTTON "&", 1592, 195, 173, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 173, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 1591, 71, 173, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 133, 173, 60, 14 + PUSHBUTTON "&Довідка", 1592, 195, 173, 60, 14 END 118 DIALOGEX 0, 0, 265, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 61, 92, 8 + LTEXT "&Користувач:", 1413, 10, 61, 92, 8 EDITTEXT 1104, 104, 57, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 10, 80, 92, 8 + LTEXT "Парол&ь:", 1112, 10, 80, 92, 8 EDITTEXT 1103, 104, 76, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1110, 10, 100, 92, 8 + LTEXT "До&мен:", 1110, 10, 100, 92, 8 EDITTEXT 1102, 104, 95, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 11, 116, 247, 1 - AUTOCHECKBOX "& ' :", 1101, 16, 124, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 29, 139, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " &- ", 1623, 29, 152, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Зберігати ім'я користувача та пароль:", 1101, 16, 124, 239, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "лише дл&я мене", 1622, 29, 139, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для &будь-якого користувача", 1623, 29, 152, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 167, 247, 1 - LTEXT "&:", 1412, 10, 177, 90, 8 + LTEXT "Н&абрати:", 1412, 10, 177, 90, 8 COMBOBOX 1416, 102, 173, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 192, 247, 1 - DEFPUSHBUTTON "&", 1590, 10, 199, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 72, 199, 60, 14 - PUSHBUTTON "&", 1107, 134, 199, 60, 14 - PUSHBUTTON "&", 1592, 196, 199, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 10, 199, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 1591, 72, 199, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 134, 199, 60, 14 + PUSHBUTTON "&Довідка", 1592, 196, 199, 60, 14 END 119 DIALOGEX 0, 0, 265, 200 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 62, 91, 8 + LTEXT "&Користувач:", 1413, 10, 62, 91, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 10, 81, 92, 8 + LTEXT "Парол&ь:", 1112, 10, 81, 92, 8 EDITTEXT 1103, 104, 77, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 97, 247, 1 - AUTOCHECKBOX "& ' :", 1101, 12, 103, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 24, 117, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " &- ", 1623, 24, 132, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Зберігати ім'я користувача та пароль:", 1101, 12, 103, 243, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "лише дл&я мене", 1622, 24, 117, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для &будь-якого користувача", 1623, 24, 132, 229, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 147, 247, 1 - LTEXT "&:", 1412, 13, 157, 88, 8 + LTEXT "Н&абрати:", 1412, 13, 157, 88, 8 COMBOBOX 1416, 103, 154, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 173, 247, 1 - DEFPUSHBUTTON "&", 1590, 10, 180, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 72, 180, 60, 14 - PUSHBUTTON "&", 1107, 134, 180, 60, 14 - PUSHBUTTON "&", 1592, 197, 180, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 10, 180, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 1591, 72, 180, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 134, 180, 60, 14 + PUSHBUTTON "&Довідка", 1592, 197, 180, 60, 14 END 121 DIALOGEX 6, 18, 230, 131 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " ISDN" +CAPTION "Настройка ISDN" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1155, 9, 9, 65, 8 + LTEXT "&Тип лінії:", 1155, 9, 9, 65, 8 COMBOBOX 1153, 76, 7, 148, 42, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - AUTOCHECKBOX "& ", 1150, 23, 26, 199, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "У&згодження типу лінії", 1150, 23, 26, 199, 10, BS_TOP | BS_MULTILINE | WS_GROUP GROUPBOX " ", 1152, 8, 48, 214, 51, WS_GROUP - AUTOCHECKBOX "& ", 1149, 17, 48, 102, 10, BS_TOP | BS_MULTILINE - LTEXT "& :", 1154, 16, 65, 100, 8, NOT WS_GROUP + AUTOCHECKBOX "&Використовувати старий протокол", 1149, 17, 48, 102, 10, BS_TOP | BS_MULTILINE + LTEXT "Викори&стовувати канали:", 1154, 16, 65, 100, 8, NOT WS_GROUP EDITTEXT 1151, 119, 61, 94, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1148, 16, 82, 198, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Увімкнути апаратне стискання", 1148, 16, 82, 198, 10, BS_TOP | BS_MULTILINE PUSHBUTTON "OK", 1, 99, 109, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 163, 109, 60, 14 + PUSHBUTTON "Скасувати", 2, 163, 109, 60, 14 END 122 DIALOGEX 6, 18, 220, 68 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " ISDN" +CAPTION "Настройка ISDN" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1155, 9, 11, 55, 8 + LTEXT "&Тип лінії:", 1155, 9, 11, 55, 8 COMBOBOX 1153, 67, 7, 148, 43, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - AUTOCHECKBOX "& ", 1150, 21, 28, 194, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "У&згодження типу лінії", 1150, 21, 28, 194, 10, BS_TOP | BS_MULTILINE | WS_GROUP PUSHBUTTON "OK", 1, 90, 49, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 154, 49, 60, 14 + PUSHBUTTON "Скасувати", 2, 154, 49, 60, 14 END 123 DIALOGEX 11, 20, 350, 275 @@ -353,11 +353,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN EDITTEXT 1161, 5, 5, 338, 236, ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL | WS_GROUP - LTEXT "IP-&:", 1163, 7, 253, 68, 8 + LTEXT "IP-&адреса:", 1163, 7, 253, 68, 8 CONTROL "", 1160, "RASIPADDRESS", WS_TABSTOP, 76, 250, 117, 14 DEFPUSHBUTTON "", 1162, 197, 252, 16, 13, NOT WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&", 1, 219, 252, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 283, 252, 60, 14 + PUSHBUTTON "&Готово", 1, 219, 252, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 2, 283, 252, 60, 14 END 124 DIALOGEX 6, 17, 350, 266 @@ -366,151 +366,151 @@ FONT 8, "MS Shell Dlg" BEGIN EDITTEXT 1161, 5, 4, 340, 236, ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL | WS_GROUP DEFPUSHBUTTON "", 1162, 7, 247, 50, 14, NOT WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&", 1, 222, 247, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 286, 247, 60, 14 + PUSHBUTTON "&Готово", 1, 222, 247, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 2, 286, 247, 60, 14 END 125 DIALOGEX 12, 16, 261, 190 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Настройка модема" FONT 8, "MS Shell Dlg" BEGIN ICON 15102, 1238, 7, 7, 20, 20 - LTEXT "", -1, 25, 27, 24, 8, NOT WS_VISIBLE | NOT WS_GROUP + LTEXT "Модем", -1, 25, 27, 24, 8, NOT WS_VISIBLE | NOT WS_GROUP EDITTEXT 1235, 40, 7, 214, 16, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER - LTEXT "& (/):", 1243, 7, 36, 110, 8 + LTEXT "&Найбільша швидкість (біт/с):", 1243, 7, 36, 110, 8 COMBOBOX 1239, 119, 34, 136, 186, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &", 1244, 7, 52, 111, 8 + LTEXT "Протокол &модема", 1244, 7, 52, 111, 8 COMBOBOX 1245, 119, 50, 136, 186, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1237, 6, 70, 248, 61, WS_GROUP - AUTOCHECKBOX "& ", 1232, 19, 82, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1231, 19, 98, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1229, 19, 115, 217, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1234, 8, 136, 246, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX " & ", 1230, 8, 151, 247, 10, BS_TOP | BS_MULTILINE | WS_GROUP + GROUPBOX "Параметри устаткування", 1237, 6, 70, 248, 61, WS_GROUP + AUTOCHECKBOX "&Апаратне керування потоком", 1232, 19, 82, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "О&бробка помилок модемом", 1231, 19, 98, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Стискання даних модемом", 1229, 19, 115, 217, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Показати вікно термінала", 1234, 8, 136, 246, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Увімкнути &динамік модема", 1230, 8, 151, 247, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 129, 171, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 194, 171, 60, 14 + PUSHBUTTON "Скасувати", 2, 194, 171, 60, 14 END 126 DIALOGEX 0, 0, 270, 117 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Вибір типу мережного компонента" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 8, 7, 258, 8 + LTEXT "Виберіть тип установлюваного мережного компонента:", -1, 8, 7, 258, 8 CONTROL "", 1251, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 8, 20, 188, 58 GROUPBOX "", -1, 8, 81, 188, 30 LTEXT "", 1250, 12, 90, 177, 17 - DEFPUSHBUTTON "&...", 1252, 205, 20, 60, 14 - PUSHBUTTON "", 2, 205, 38, 60, 14 + DEFPUSHBUTTON "&Додати...", 1252, 205, 20, 60, 14 + PUSHBUTTON "Скасувати", 2, 205, 38, 60, 14 END 127 DIALOGEX 16, 20, 260, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "ϳ NetWare " +CAPTION "Підключення до NetWare або сумісної мережі" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, 1278, 7, 7, 21, 20, WS_GROUP - LTEXT " NetWare- PPP IPX.", 1279, 42, 7, 215, 37 - LTEXT " , , , IPX .", 1280, 42, 46, 215, 38, NOT WS_GROUP - AUTOCHECKBOX "& ", 1277, 42, 86, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + LTEXT "Наявні підключення до NetWare-сумісної мережі будуть закриті під час установки підключення PPP IPX.", 1279, 42, 7, 215, 37 + LTEXT "Щоб запобігти втраті даних, перед набором номера закрийте всі файли, які використовують ці підключення, або зніміть прапорець IPX у вікні параметрів мережного протоколу для цього елемента.", 1280, 42, 46, 215, 38, NOT WS_GROUP + AUTOCHECKBOX "&Більше не показувати це повідомлення", 1277, 42, 86, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 65, 112, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 134, 112, 60, 14 + PUSHBUTTON "Скасувати", 2, 134, 112, 60, 14 END 128 DIALOGEX 7, 22, 236, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Набір номера вручну" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ( ). ϳ ""OK"". , , .", 1281, 8, 8, 219, 32 - LTEXT " :", 1282, 8, 46, 91, 8 + LTEXT "Зніміть слухавку і наберіть номер (або попросіть оператора зробити цю дію). Після закінчення набору натисніть кнопку ""OK"". Почекайте, поки сигнал у слухавці не зникне, а потім покладіть її.", 1281, 8, 8, 219, 32 + LTEXT "Номер телефону:", 1282, 8, 46, 91, 8 LTEXT "", 1283, 103, 46, 126, 8, NOT WS_GROUP DEFPUSHBUTTON "OK", 1, 104, 70, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 168, 70, 60, 14 + PUSHBUTTON "Скасувати", 2, 168, 70, 60, 14 END 129 DIALOGEX 6, 20, 260, 85 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Результат підключення мережних протоколів" FONT 8, "MS Shell Dlg" BEGIN ICON 32516, 1328, 7, 7, 21, 20, WS_GROUP LTEXT "", 1329, 38, 7, 216, 24, NOT WS_GROUP - AUTOCHECKBOX " & ", 1327, 40, 44, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP - PUSHBUTTON "&", 1, 129, 64, 60, 14 - PUSHBUTTON "&", 2, 193, 64, 60, 14 + AUTOCHECKBOX "Більше &не запитувати невдалі протоколи", 1327, 40, 44, 215, 10, BS_TOP | BS_MULTILINE | WS_GROUP + PUSHBUTTON "Прий&мати", 1, 129, 64, 60, 14 + PUSHBUTTON "&Завершити", 2, 193, 64, 60, 14 END 133 DIALOGEX 6, 18, 231, 211 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " X.25" +CAPTION "Параметри входу до мережі X.25" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " X.25 X.121 :", 1408, 7, 4, 220, 27 - LTEXT "&:", 1410, 9, 35, 213, 8, NOT WS_GROUP + LTEXT "Виберіть службу доступу до мережі X.25 і введіть адресу X.121 віддаленого сервера:", 1408, 7, 4, 220, 27 + LTEXT "Мере&жа:", 1410, 9, 35, 213, 8, NOT WS_GROUP COMBOBOX 1406, 9, 46, 215, 125, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& X.121:", 1407, 9, 66, 213, 8, NOT WS_GROUP + LTEXT "&Адреса X.121:", 1407, 9, 66, 213, 8, NOT WS_GROUP EDITTEXT 1402, 8, 77, 215, 14, ES_AUTOHSCROLL - GROUPBOX "", 1405, 8, 95, 215, 79 - LTEXT "& :", 1411, 19, 109, 182, 8, NOT WS_GROUP + GROUPBOX "Додатково", 1405, 8, 95, 215, 79 + LTEXT "&Дані користувача:", 1411, 19, 109, 182, 8, NOT WS_GROUP EDITTEXT 1404, 19, 120, 193, 14, ES_AUTOHSCROLL - LTEXT "&:", 1409, 19, 138, 182, 8, NOT WS_GROUP + LTEXT "&Послуги:", 1409, 19, 138, 182, 8, NOT WS_GROUP EDITTEXT 1403, 19, 149, 193, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 100, 189, 60, 14 - PUSHBUTTON "", 2, 164, 189, 60, 14 + PUSHBUTTON "Скасувати", 2, 164, 189, 60, 14 END 146 DIALOGEX 6, 18, 230, 210 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Автонабір номера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", -1, 7, 4, 219, 32 - LTEXT "& :", 1006, 8, 42, 213, 8 + LTEXT "У разі розриву підключення до мережі автонабір номера виконуватиметься за кожної спроби отримати доступ до віддаленої інформації.", -1, 7, 4, 219, 32 + LTEXT "Увім&кнути автонабір номера для:", 1006, 8, 42, 213, 8 CONTROL "", 1004, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000C401, 7, 53, 216, 109 - AUTOCHECKBOX "& ", 1496, 8, 170, 218, 9, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1550, 8, 185, 217, 9, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Завжди запитувати перед автонабором номера", 1496, 8, 170, 218, 9, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Вимкнути автонабір до мого виходу із системи", 1550, 8, 185, 217, 9, BS_TOP | BS_MULTILINE END 147 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Набір номера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " Ctrl-Alt-Delete. , , .", 1007, 7, 4, 221, 40, NOT WS_GROUP - LTEXT "&ʳ :", 1005, 7, 55, 154, 8 + LTEXT "Параметри входу до системи через віддалений доступ після натиснення клавіш Ctrl-Alt-Delete. Ви, як адміністратор, маєте доступ до цієї вкладки.", 1007, 7, 4, 221, 40, NOT WS_GROUP + LTEXT "&Кількість спроб повторного набору:", 1005, 7, 55, 154, 8 EDITTEXT 1001, 164, 52, 60, 14, ES_AUTOHSCROLL - LTEXT " & ():", 1009, 7, 73, 156, 8, NOT WS_GROUP + LTEXT "Інтервал між спробам&и набору (с):", 1009, 7, 73, 156, 8, NOT WS_GROUP EDITTEXT 1003, 164, 70, 60, 14, ES_AUTOHSCROLL - LTEXT "& ' ():", 1008, 7, 91, 154, 8, NOT WS_GROUP + LTEXT "&Час простою до роз'єднання (с):", 1008, 7, 91, 154, 8, NOT WS_GROUP EDITTEXT 1002, 164, 88, 60, 14, ES_AUTOHSCROLL END 148 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION "³ " +CAPTION "Відповідний виклик" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ϳ ' , . ? ( VPN-.)", 1043, 8, 4, 219, 43 - AUTORADIOBUTTON "&³ ", 1041, 7, 48, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "&, ", 1040, 7, 61, 219, 10, BS_TOP | BS_MULTILINE - AUTORADIOBUTTON "& :", 1042, 7, 74, 219, 10, BS_TOP | BS_MULTILINE + LTEXT "Після установки зв'язку із сервером він може зробити виклик у відповідь, що зменшить ваші витрати на телефонування. Використовувати зворотний виклик? (Зворотний виклик не підтримується для VPN-підключень.)", 1043, 8, 4, 219, 43 + AUTORADIOBUTTON "&Відповідний виклик не виконується", 1041, 7, 48, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Запитувати, коли це пропонує сервер", 1040, 7, 61, 219, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "Зав&жди робити зворотний виклик за вказаними номерами:", 1042, 7, 74, 219, 10, BS_TOP | BS_MULTILINE CONTROL "", 1037, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00008401, 16, 88, 204, 94 - PUSHBUTTON "&...", 1039, 96, 190, 60, 14 - PUSHBUTTON "&", 1038, 159, 190, 60, 14 + PUSHBUTTON "З&мінити...", 1039, 96, 190, 60, 14 + PUSHBUTTON "В&идалити", 1038, 159, 190, 60, 14 END 149 DIALOGEX 6, 18, 317, 142 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , . .", 1094, 8, 5, 307, 35 - LTEXT "&:", 1078, 8, 47, 124, 8, NOT WS_GROUP + LTEXT "Слід указати облікові дані вихідного підключення, які використовуватимуться віддаленими маршрутизаторами для підключення до цього інтерфейсу. На цьому маршрутизаторі буде створено обліковий запис користувача із введеними зараз даними.", 1094, 8, 5, 307, 35 + LTEXT "&Користувач:", 1078, 8, 47, 124, 8, NOT WS_GROUP EDITTEXT 1074, 135, 45, 175, 12, ES_AUTOHSCROLL | WS_DISABLED - LTEXT "&:", 1077, 8, 68, 124, 8, NOT WS_GROUP + LTEXT "Парол&ь:", 1077, 8, 68, 124, 8, NOT WS_GROUP EDITTEXT 1073, 135, 66, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&ϳ:", 1075, 8, 90, 124, 8, NOT WS_GROUP + LTEXT "&Підтвердження:", 1075, 8, 90, 124, 8, NOT WS_GROUP EDITTEXT 1071, 135, 87, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL END @@ -518,14 +518,14 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , . ֳ .", 1094, 8, 5, 308, 33 - LTEXT "&:", 1096, 8, 43, 130, 8, NOT WS_GROUP + LTEXT "Слід указати облікові дані вихідного підключення, які використовуватимуться цим інтерфейсом для підключення до віддаленого маршрутизатора. Ці облікові дані мусять співпадати з обліковими даними вхідного підключення на цьому віддаленому маршрутизаторі.", 1094, 8, 5, 308, 33 + LTEXT "&Користувач:", 1096, 8, 43, 130, 8, NOT WS_GROUP EDITTEXT 1091, 140, 40, 175, 12, ES_AUTOHSCROLL - LTEXT "&:", 1093, 8, 63, 130, 8, NOT WS_GROUP + LTEXT "До&мен:", 1093, 8, 63, 130, 8, NOT WS_GROUP EDITTEXT 1089, 140, 60, 175, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT "&:", 1095, 8, 81, 130, 8, NOT WS_GROUP + LTEXT "Парол&ь:", 1095, 8, 81, 130, 8, NOT WS_GROUP EDITTEXT 1090, 140, 78, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&ϳ:", 1092, 8, 99, 130, 8, NOT WS_GROUP + LTEXT "&Підтвердження:", 1092, 8, 99, 130, 8, NOT WS_GROUP EDITTEXT 1088, 140, 96, 175, 12, ES_PASSWORD | ES_AUTOHSCROLL END @@ -533,140 +533,140 @@ END STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", -1, 8, 4, 190, 8 + LTEXT "Введіть назву для цього підключення:", -1, 8, 4, 190, 8 EDITTEXT 1114, 8, 17, 190, 12, ES_AUTOHSCROLL - LTEXT " "" "", """".", -1, 8, 38, 193, 8 - LTEXT " , """" """".", -1, 8, 58, 193, 16 + LTEXT "Щоб зберегти значок підключення до папці ""Мережні підключення"", натисніть кнопку ""Готово"".", -1, 8, 38, 193, 8 + LTEXT "Щоб змінити властивості цього підключення, виділіть його та виберіть із меню ""Файл"" команду ""Властивості"".", -1, 8, 58, 193, 16 END 155 DIALOGEX 0, 0, 231, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ϳ& :", 1124, 7, 5, 219, 8 + LTEXT "Підкл&ючення через:", 1124, 7, 5, 219, 8 CONTROL "", 1128, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00004C0D, 7, 17, 198, 44, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1132, 210, 18, 16, 14, BS_ICON - PUSHBUTTON "&", 1131, 210, 36, 16, 14, BS_ICON - AUTOCHECKBOX "& ", 1119, 9, 66, 133, 14, BS_TOP | BS_MULTILINE - PUSHBUTTON "&...", 1130, 144, 66, 60, 14 - GROUPBOX "", 1125, 8, 84, 215, 100, WS_GROUP - LTEXT " &:", 1133, 17, 102, 52, 8 + PUSHBUTTON "В&гору", 1132, 210, 18, 16, 14, BS_ICON + PUSHBUTTON "В&низ", 1131, 210, 36, 16, 14, BS_ICON + AUTOCHECKBOX "На&бирати однакові номери для підключення всіх пристроїв", 1119, 9, 66, 133, 14, BS_TOP | BS_MULTILINE + PUSHBUTTON "Нала&штувати...", 1130, 144, 66, 60, 14 + GROUPBOX "Зразок", 1125, 8, 84, 215, 100, WS_GROUP + LTEXT "Код &міста:", 1133, 17, 102, 52, 8 COMBOBOX 1122, 17, 112, 52, 110, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &:", 1135, 71, 102, 139, 8 + LTEXT "Номер &телефону:", 1135, 71, 102, 139, 8 EDITTEXT 1123, 73, 112, 79, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 154, 112, 60, 14 - LTEXT "& :", 1134, 17, 132, 197, 8 + PUSHBUTTON "&Інші", 1129, 154, 112, 60, 14 + LTEXT "&Код країни або регіону:", 1134, 17, 132, 197, 8 COMBOBOX 1126, 17, 143, 193, 130, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1121, 17, 163, 132, 14, BS_TOP | BS_MULTILINE - PUSHBUTTON "&", 1136, 151, 161, 60, 14 - AUTOCHECKBOX "ϳ& ", 1120, 10, 192, 214, 19, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Використовувати правила набору номера", 1121, 17, 163, 132, 14, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Правила", 1136, 151, 161, 60, 14 + AUTOCHECKBOX "Післ&я підключення показати значок в області сповіщень", 1120, 10, 192, 214, 19, BS_TOP | BS_MULTILINE END 156 DIALOGEX 0, 0, 231, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "&...", 1130, 164, 38, 60, 14 - GROUPBOX "", 1125, 8, 55, 217, 100, WS_GROUP - LTEXT " &:", 1133, 17, 72, 48, 8 + PUSHBUTTON "Нала&штувати...", 1130, 164, 38, 60, 14 + GROUPBOX "Зразок", 1125, 8, 55, 217, 100, WS_GROUP + LTEXT "Код &міста:", 1133, 17, 72, 48, 8 COMBOBOX 1122, 17, 83, 48, 119, CBS_DROPDOWN | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " &:", 1135, 71, 72, 146, 8 + LTEXT "Номер &телефону:", 1135, 71, 72, 146, 8 EDITTEXT 1123, 71, 83, 81, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 155, 83, 63, 14 - LTEXT "& :", 1134, 17, 103, 193, 8 + PUSHBUTTON "&Інші", 1129, 155, 83, 63, 14 + LTEXT "&Код країни або регіону:", 1134, 17, 103, 193, 8 COMBOBOX 1126, 17, 114, 201, 130, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ", 1121, 19, 134, 136, 12, BS_TOP | BS_MULTILINE - PUSHBUTTON "&", 1136, 157, 132, 60, 14 - AUTOCHECKBOX "ϳ& ", 1120, 12, 164, 209, 18, BS_TOP | BS_MULTILINE - LTEXT "ϳ :", 1124, 8, 5, 217, 8 + AUTOCHECKBOX "&Використовувати правила набору номера", 1121, 19, 134, 136, 12, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Правила", 1136, 157, 132, 60, 14 + AUTOCHECKBOX "Післ&я підключення показати значок в області сповіщень", 1120, 12, 164, 209, 18, BS_TOP | BS_MULTILINE + LTEXT "Підключення через:", 1124, 8, 5, 217, 8 CONTROL "", 1127, "SYSLISTVIEW32", WS_DISABLED | WS_BORDER | 0x0000EC0D, 7, 18, 217, 15 END 157 DIALOGEX 6, 18, 235, 160 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Оформлення" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 1142, 8, 10, 224, 10, WS_GROUP - AUTOCHECKBOX "& ", 1139, 8, 27, 224, 10 - AUTOCHECKBOX " & ", 1140, 21, 43, 212, 10 - AUTOCHECKBOX "& ", 1143, 8, 59, 224, 10 - AUTOCHECKBOX "& '", 1137, 8, 76, 224, 10 - AUTOCHECKBOX " & ", 1141, 8, 94, 224, 10 - AUTOCHECKBOX "& ", 1144, 22, 111, 210, 10 + AUTOCHECKBOX "&Переглядати номери телефону перед набором номера", 1142, 8, 10, 224, 10, WS_GROUP + AUTOCHECKBOX "По&казувати відомості про розташування перед набором номера", 1139, 8, 27, 224, 10 + AUTOCHECKBOX "Дозволити змінювати &розташування під час входу до системи", 1140, 21, 43, 212, 10 + AUTOCHECKBOX "Показува&ти перебіг підключення під час набору номера", 1143, 8, 59, 224, 10 + AUTOCHECKBOX "&Закрити після установки зв'язку", 1137, 8, 76, 224, 10 + AUTOCHECKBOX "Дозволити вносити зміни до телефонної книги під час в&ходу до системи", 1141, 8, 94, 224, 10 + AUTOCHECKBOX "В&икористовувати майстер для створення записів у телефонній книзі", 1144, 22, 111, 210, 10 END 158 DIALOGEX 6, 18, 235, 160 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Оформлення" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 1142, 8, 10, 223, 10, WS_GROUP - AUTOCHECKBOX " & ", 1139, 8, 27, 206, 10 - AUTOCHECKBOX "& ", 1138, 8, 44, 226, 10 - AUTOCHECKBOX "& ", 1143, 8, 61, 224, 10 - AUTOCHECKBOX "& '", 1137, 8, 79, 220, 10 - AUTOCHECKBOX "& ", 1144, 8, 97, 220, 10 - AUTOCHECKBOX "& ", 1136, 8, 114, 220, 10 + AUTOCHECKBOX "&Переглядати номери телефону перед набором номера", 1142, 8, 10, 223, 10, WS_GROUP + AUTOCHECKBOX "Показувати відо&мості про розташування перед набором номера", 1139, 8, 27, 206, 10 + AUTOCHECKBOX "&Запускати монітор віддаленого доступу перед набором номера", 1138, 8, 44, 226, 10 + AUTOCHECKBOX "Показува&ти перебіг підключення під час набору номера", 1143, 8, 61, 224, 10 + AUTOCHECKBOX "За&крити після установки зв'язку", 1137, 8, 79, 220, 10 + AUTOCHECKBOX "В&икористовувати майстер для створення записів у телефонній книзі", 1144, 8, 97, 220, 10 + AUTOCHECKBOX "За&вжди запитувати перед автонабором номера", 1136, 8, 114, 220, 10 END 160 DIALOGEX 6, 18, 320, 145 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' . , .", 1158, 7, 5, 309, 29 - LTEXT "&' :", 1159, 17, 41, 285, 8, NOT WS_GROUP + LTEXT "Виберіть ім'я для інтерфейсу виклику на вимогу. Звичайно інтерфейсам призначаються імена мережі або інтерфейсу, до якого вони підключені.", 1158, 7, 5, 309, 29 + LTEXT "&Ім'я інтерфейсу:", 1159, 17, 41, 285, 8, NOT WS_GROUP EDITTEXT 1157, 17, 53, 284, 12, ES_AUTOHSCROLL - AUTOCHECKBOX " , & ", 1156, 24, 100, 258, 31, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "Мені добре відомі інтерфейси виклику на вимогу, &я хочу налаштувати властивості вручну", 1156, 24, 100, 258, 31, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED END 162 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Безпека" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1580, 8, 3, 215, 139 - AUTORADIOBUTTON "& ( )", 1540, 14, 16, 201, 9, BS_NOTIFY | WS_GROUP - AUTORADIOBUTTON "& ( )", 1541, 14, 102, 198, 8, BS_NOTIFY - LTEXT "& :", 1537, 26, 29, 187, 8, NOT WS_GROUP + GROUPBOX "Параметри безпеки", 1580, 8, 3, 215, 139 + AUTORADIOBUTTON "&Звичайні (рекомендовані параметри)", 1540, 14, 16, 201, 9, BS_NOTIFY | WS_GROUP + AUTORADIOBUTTON "&Додаткові (вибіркові параметри)", 1541, 14, 102, 198, 8, BS_NOTIFY + LTEXT "П&еревіряти користувача таким чином:", 1537, 26, 29, 187, 8, NOT WS_GROUP COMBOBOX 1178, 26, 40, 184, 78, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ' ReactOS ( ' , )", 1174, 26, 58, 184, 20, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ( , ')", 1169, 26, 82, 183, 10, BS_TOP | BS_MULTILINE - LTEXT " .", 1539, 15, 114, 134, 20 - PUSHBUTTON "&...", 1180, 151, 115, 60, 14 - GROUPBOX " ", 1177, 8, 146, 215, 62, WS_GROUP - AUTOCHECKBOX "& ", 1173, 14, 159, 198, 11, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "&:", 1172, 14, 172, 57, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Автомат&ично використовувати ім'я для входу та пароль ReactOS (а також ім'я домену, якщо воно є)", 1174, 26, 58, 184, 20, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Потрі&бне шифрування даних (якщо ні, роз'єднуватися)", 1169, 26, 82, 183, 10, BS_TOP | BS_MULTILINE + LTEXT "Використання цих параметрів потребує знання протоколів безпеки.", 1539, 15, 114, 134, 20 + PUSHBUTTON "Параме&три...", 1180, 151, 115, 60, 14 + GROUPBOX "Інтерактивна реєстрація й сценарій", 1177, 8, 146, 215, 62, WS_GROUP + AUTOCHECKBOX "&Показати вікно термінала", 1173, 14, 159, 198, 11, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Сценарій:", 1172, 14, 172, 57, 10, BS_TOP | BS_MULTILINE COMBOBOX 1179, 72, 171, 140, 104, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1182, 87, 187, 60, 14 - PUSHBUTTON "&...", 1181, 151, 187, 60, 14 + PUSHBUTTON "З&мінити...", 1182, 87, 187, 60, 14 + PUSHBUTTON "О&гляд...", 1181, 151, 187, 60, 14 END 163 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' .", -1, 6, 3, 307, 13 - LTEXT "& :", -1, 6, 15, 307, 11 + LTEXT "На цьому комп'ютері є більше одного пристрою віддаленого доступу.", -1, 6, 3, 307, 13 + LTEXT "&Виберіть пристрої для цього підключення:", -1, 6, 15, 307, 11 CONTROL "", 1228, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C415, 7, 28, 304, 77 END 165 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Мережа" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& , :", 1583, 7, 4, 219, 8 + LTEXT "&Тип сервера віддаленого доступу, який викликають:", 1583, 7, 4, 219, 8 COMBOBOX 1418, 7, 17, 215, 46, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1419, 160, 35, 60, 14 - LTEXT "&, :", 1684, 8, 64, 219, 10 + PUSHBUTTON "Парам&етри", 1419, 160, 35, 60, 14 + LTEXT "&Компоненти, які використовуються цим підключенням:", 1684, 8, 64, 219, 10 CONTROL "", 1251, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C40D, 7, 75, 216, 53 - PUSHBUTTON "&...", 1252, 7, 133, 67, 14 - PUSHBUTTON "&", 1254, 80, 133, 67, 14 - PUSHBUTTON "&", 1253, 153, 133, 67, 14 - GROUPBOX "", 1585, 9, 158, 213, 43 + PUSHBUTTON "&Установити...", 1252, 7, 133, 67, 14 + PUSHBUTTON "&Видалити", 1254, 80, 133, 67, 14 + PUSHBUTTON "Власт&ивості", 1253, 153, 133, 67, 14 + GROUPBOX "Опис", 1585, 9, 158, 213, 43 LTEXT "", 1250, 18, 167, 195, 25 END @@ -674,118 +674,118 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP- DNS WINS (0.0.0.0), .", 1275, 7, 2, 311, 25 - LTEXT "DNS-&:", 1274, 7, 29, 160, 8, NOT WS_GROUP + LTEXT "Введіть IP-адресу сервера DNS або WINS у віддаленій мережі або залиште нульову адресу (0.0.0.0), якщо її повинен надати віддалений маршрутизатор або якщо вона невідома.", 1275, 7, 2, 311, 25 + LTEXT "DNS-&сервер:", 1274, 7, 29, 160, 8, NOT WS_GROUP CONTROL "", 1272, "RASIPADDRESS", WS_TABSTOP, 21, 41, 85, 12 - LTEXT "WINS-&:", 1276, 7, 65, 166, 8, NOT WS_GROUP + LTEXT "WINS-с&ервер:", 1276, 7, 65, 166, 8, NOT WS_GROUP CONTROL "", 1273, "RASIPADDRESS", WS_TABSTOP, 21, 77, 85, 12 END 167 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1289, 7, 2, 213, 64 - AUTOCHECKBOX "& ", 1284, 16, 14, 201, 10 - AUTOCHECKBOX "& ', , ", 1554, 16, 27, 201, 10 - AUTOCHECKBOX "& ReactOS", 1555, 16, 39, 201, 10 - AUTOCHECKBOX " & ", 1285, 16, 52, 200, 10, BS_TOP | BS_MULTILINE - GROUPBOX " ", 1290, 6, 72, 213, 79 - LTEXT "&ʳ :", 1300, 16, 87, 123, 8 + GROUPBOX "Параметри набору номера", 1289, 7, 2, 213, 64 + AUTOCHECKBOX "&Показувати перебіг підключення", 1284, 16, 14, 201, 10 + AUTOCHECKBOX "&Запитувати ім'я, пароль, сертифікат тощо", 1554, 16, 27, 201, 10 + AUTOCHECKBOX "&Включати домен входу до ReactOS", 1555, 16, 39, 201, 10 + AUTOCHECKBOX "Запитувати но&мер телефону", 1285, 16, 52, 200, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Параметри повторного дзвінка", 1290, 6, 72, 213, 79 + LTEXT "&Кількість спроб повторного набору:", 1300, 16, 87, 123, 8 EDITTEXT 1287, 141, 84, 69, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT " & :", 1301, 16, 103, 123, 8 + LTEXT "Інтервал мі&ж спробами набору:", 1301, 16, 103, 123, 8 COMBOBOX 1292, 141, 101, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& ':", 1299, 16, 120, 123, 8 + LTEXT "&Час простою до роз'єднання:", 1299, 16, 120, 123, 8 COMBOBOX 1291, 141, 116, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX " '&", 1286, 16, 136, 199, 10, BS_TOP | BS_MULTILINE - GROUPBOX " ", 1288, 7, 156, 213, 32 + AUTOCHECKBOX "Повторити в разі роз'&єднання", 1286, 16, 136, 199, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Використання декількох пристроїв", 1288, 7, 156, 213, 32 COMBOBOX 1551, 16, 169, 128, 45, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1293, 150, 168, 60, 14 + PUSHBUTTON "&Налаштувати...", 1293, 150, 168, 60, 14 PUSHBUTTON "&X.25", 1295, 7, 194, 50, 14 - PUSHBUTTON "& ", 1294, 62, 194, 120, 14, NOT WS_VISIBLE | WS_DISABLED + PUSHBUTTON "В&іртуальне тунельне підключення", 1294, 62, 194, 120, 14, NOT WS_VISIBLE | WS_DISABLED END 168 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . ", -1, 7, 4, 306, 14 - LTEXT " &:", 1308, 7, 19, 130, 8 + LTEXT "Введіть номер телефону. ", -1, 7, 4, 306, 14 + LTEXT "Номер &телефону:", 1308, 7, 19, 130, 8 EDITTEXT 1304, 7, 30, 304, 14, ES_AUTOHSCROLL - LTEXT ", ""1"", . , , . , .", -1, 20, 50, 291, 53 + LTEXT "Можливо, знадобиться додати ""1"", код міста або обидва значення. Щоб визначити, чи це потрібно, наберіть комбінацію номера й коду на своєму телефоні. Якщо чутно звук модема, комбінацію вибрано правильно.", -1, 20, 50, 291, 53 END 169 DIALOGEX 6, 18, 235, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Телефонна книга" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ":", 1326, 8, 8, 222, 8 - AUTORADIOBUTTON "& ", 1325, 14, 22, 216, 10, WS_GROUP - AUTORADIOBUTTON "& ", 1324, 14, 34, 216, 10 - AUTORADIOBUTTON "& :", 1323, 14, 46, 217, 10 + LTEXT "Використовувати:", 1326, 8, 8, 222, 8 + AUTORADIOBUTTON "&телефонну книгу системи", 1325, 14, 22, 216, 10, WS_GROUP + AUTORADIOBUTTON "&мою особисту телефонну книгу", 1324, 14, 34, 216, 10 + AUTORADIOBUTTON "&цю додаткову телефонну книгу:", 1323, 14, 46, 217, 10 COMBOBOX 1321, 26, 61, 201, 77, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&...", 1322, 167, 81, 60, 14 + PUSHBUTTON "О&гляд...", 1322, 167, 81, 60, 14 END 170 DIALOGEX 6, 18, 235, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Телефонна книга" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ":", 1326, 8, 8, 223, 8 - AUTORADIOBUTTON "& ", 1325, 14, 22, 217, 10, WS_GROUP - AUTORADIOBUTTON "& :", 1323, 14, 36, 216, 10 + LTEXT "Використовувати:", 1326, 8, 8, 223, 8 + AUTORADIOBUTTON "&телефонну книгу системи", 1325, 14, 22, 217, 10, WS_GROUP + AUTORADIOBUTTON "&цю додаткову телефонну книгу:", 1323, 14, 36, 216, 10 COMBOBOX 1321, 26, 51, 203, 77, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | NOT WS_TABSTOP - PUSHBUTTON "&...", 1322, 169, 69, 60, 14 + PUSHBUTTON "О&гляд...", 1322, 169, 69, 60, 14 END 171 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " IP- (0.0.0.0), . .", 1331, 5, 4, 308, 35 - LTEXT "& IP-:", 1332, 4, 51, 100, 8, NOT WS_GROUP + LTEXT "Введіть IP-адресу цього маршрутизатора в віддаленій мережі або залиште нульову адресу (0.0.0.0), якщо її повинен надати віддалений маршрутизатор. Необхідні відомості можна отримати від оператора віддаленої мережі або маршрутизатора.", 1331, 5, 4, 308, 35 + LTEXT "&Моя IP-адреса:", 1332, 4, 51, 100, 8, NOT WS_GROUP CONTROL "", 1330, "RASIPADDRESS", WS_TABSTOP, 21, 62, 104, 12 - LTEXT ": , ˲ , .", 1333, 5, 94, 306, 36, NOT WS_GROUP + LTEXT "Примітка: якщо установлено мережну плату, НЕ СЛІД використовувати ту саму адресу, що й у вашої мережної плати.", 1333, 5, 94, 306, 36, NOT WS_GROUP END 172 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' . .", 1339, 5, 3, 309, 27 - AUTOCHECKBOX "& ", 1462, 15, 31, 162, 10 - AUTOCHECKBOX "&:", 1463, 15, 45, 58, 10 + LTEXT "Деякі сервери й маршрутизатори віддаленого доступу після з'єднання потребують від користувача ввійти до них. Для автоматичного вводу інформації можна використовувати сценарії.", 1339, 5, 3, 309, 27 + AUTOCHECKBOX "&Показати вікно термінала", 1462, 15, 31, 162, 10 + AUTOCHECKBOX "&Сценарій:", 1463, 15, 45, 58, 10 COMBOBOX 1334, 30, 60, 275, 88, CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1335, 180, 77, 60, 14 - PUSHBUTTON "&...", 1465, 244, 77, 60, 14 + PUSHBUTTON "З&мінити...", 1335, 180, 77, 60, 14 + PUSHBUTTON "О&гляд...", 1465, 244, 77, 60, 14 END 173 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Набір номера" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1344, 9, 4, 213, 53, WS_GROUP - LTEXT "&ʳ :", 1349, 16, 22, 140, 8, NOT WS_GROUP + GROUPBOX "Політика набору номера", 1344, 9, 4, 213, 53, WS_GROUP + LTEXT "&Кількість спроб повторного набору:", 1349, 16, 22, 140, 8, NOT WS_GROUP EDITTEXT 1340, 158, 19, 56, 14, ES_AUTOHSCROLL - LTEXT " & ():", 1351, 16, 38, 140, 8, NOT WS_GROUP + LTEXT "Інтервал між спробам&и набору (с):", 1351, 16, 38, 140, 8, NOT WS_GROUP EDITTEXT 1342, 158, 36, 56, 14, ES_AUTOHSCROLL - GROUPBOX " ", 1343, 9, 63, 213, 56, WS_GROUP - LTEXT "& ' ():", 1350, 28, 88, 124, 8, NOT WS_GROUP - AUTORADIOBUTTON "ϳ& ", 1347, 16, 78, 135, 10, WS_GROUP - AUTORADIOBUTTON "& ", 1348, 16, 103, 199, 10, NOT WS_TABSTOP, WS_EX_TRANSPARENT + GROUPBOX "Тип підключення", 1343, 9, 63, 213, 56, WS_GROUP + LTEXT "&Час простою до роз'єднання (с):", 1350, 28, 88, 124, 8, NOT WS_GROUP + AUTORADIOBUTTON "Підкл&ючення на вимогу", 1347, 16, 78, 135, 10, WS_GROUP + AUTORADIOBUTTON "&Постійне підключення", 1348, 16, 103, 199, 10, NOT WS_TABSTOP, WS_EX_TRANSPARENT EDITTEXT 1341, 159, 85, 56, 14, ES_AUTOHSCROLL - PUSHBUTTON "&³ ...", 1345, 150, 125, 70, 14, WS_GROUP - PUSHBUTTON "& ...", 1346, 74, 125, 70, 14 + PUSHBUTTON "&Відповідний виклик...", 1345, 150, 125, 70, 14, WS_GROUP + PUSHBUTTON "&Декілька ліній...", 1346, 74, 125, 70, 14 END 174 DIALOGEX 0, 0, 215, 226 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Маршрутизатор" FONT 8, "MS Shell Dlg" BEGIN CTEXT "NYI...need spec from KCrocker", -1, 57, 86, 106, 28 @@ -795,74 +795,74 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 1352, 122, 5, 192, 32 - LTEXT " , """".", 1354, 122, 41, 192, 26, NOT WS_GROUP - LTEXT " , """".", 1355, 122, 68, 190, 39, NOT WS_GROUP + LTEXT "Завершення роботи майстра інтерфейсу виклику на вимогу.", 1352, 122, 5, 192, 32 + LTEXT "Щоб створити цей інтерфейс і підключити його до маршрутизатора, натисніть кнопку ""Готово"".", 1354, 122, 41, 192, 26, NOT WS_GROUP + LTEXT "Щоб змінити цей інтерфейс за допомогою диспетчера маршрутизації та віддаленого доступу, виберіть його серед інтерфейсів маршрутизатора й натисніть кнопку ""Властивості"".", 1355, 122, 68, 190, 39, NOT WS_GROUP END 179 DIALOGEX 6, 18, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& , .", 1356, 7, 4, 306, 11 + LTEXT "&Виберіть модем або адаптер, який використовуватиметься цим інтерфейсом.", 1356, 7, 4, 306, 11 CONTROL "", 1355, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C415, 6, 15, 305, 80 - LTEXT " , .", 1357, 15, 98, 288, 37, NOT WS_GROUP + LTEXT "У цьому списку наведені пристрої, вибрані для маршрутизації.", 1357, 15, 98, 288, 37, NOT WS_GROUP END 180 DIALOGEX 6, 18, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , . , , .", 1360, 7, 4, 305, 42 - LTEXT "& :", 1361, 7, 50, 275, 8, NOT WS_GROUP + LTEXT "Введіть номер телефону сервера або маршрутизатора віддаленого доступу, який слід викликати. Якщо перший номер виявиться недоступним, буде автоматично продовжено набір додаткових номерів, якщо вони є.", 1360, 7, 4, 305, 42 + LTEXT "&Номер телефону або адреса:", 1361, 7, 50, 275, 8, NOT WS_GROUP EDITTEXT 1358, 7, 62, 304, 14, ES_AUTOHSCROLL - PUSHBUTTON "...", 1359, 250, 80, 60, 14 + PUSHBUTTON "Інші...", 1359, 250, 80, 60, 14 END 181 DIALOGEX 6, 18, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Безпека" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1367, 6, 8, 216, 103, WS_GROUP - AUTORADIOBUTTON " - & , ", 1370, 16, 20, 195, 10, BS_TOP | BS_MULTILINE - AUTORADIOBUTTON "& ", 1373, 16, 36, 195, 10, BS_TOP | BS_MULTILINE - AUTORADIOBUTTON " & MS", 1374, 16, 52, 195, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1363, 27, 65, 184, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTOCHECKBOX "& ", 1364, 41, 80, 172, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1362, 17, 95, 194, 10, BS_TOP | BS_MULTILINE - PUSHBUTTON "& ", 1369, 59, 117, 80, 14, WS_GROUP - PUSHBUTTON "&...", 1368, 142, 117, 80, 14, NOT WS_VISIBLE | WS_DISABLED - AUTOCHECKBOX " & '", 1365, 7, 198, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED + GROUPBOX "Політика перевірки автентичності й шифрування", 1367, 6, 8, 216, 103, WS_GROUP + AUTORADIOBUTTON "Дозволити будь-яку &перевірку автентичності, включаючи відкритий текст", 1370, 16, 20, 195, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "До&зволити лише шифровану перевірку автентичності", 1373, 16, 36, 195, 10, BS_TOP | BS_MULTILINE + AUTORADIOBUTTON "Дозволити лиш&е перевірку автентичності з шифруванням MS", 1374, 16, 52, 195, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Вимага&ти шифрування даних", 1363, 27, 65, 184, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Вимагати стійкого шифрування даних", 1364, 41, 80, 172, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Дво&бічна перевірка автентичності", 1362, 17, 95, 194, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "В&идалити збережений пароль", 1369, 59, 117, 80, 14, WS_GROUP + PUSHBUTTON "&Додатково...", 1368, 142, 117, 80, 14, NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "Виявляти спільні файли й при&нтери до установки зв'язку", 1365, 7, 198, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_VISIBLE | WS_DISABLED END 182 DIALOGEX 6, 18, 248, 148 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Безпека" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1367, 7, 8, 200, 98, WS_GROUP - AUTORADIOBUTTON " - & , ", 1370, 14, 24, 183, 10 - AUTORADIOBUTTON " & ", 1373, 14, 39, 183, 10 - AUTORADIOBUTTON " & MS", 1374, 14, 53, 184, 10 - AUTOCHECKBOX "& ", 1363, 33, 67, 165, 10, WS_GROUP - AUTOCHECKBOX "& ", 1364, 48, 79, 152, 10 - AUTOCHECKBOX "& ' ", 1366, 31, 91, 165, 10 - PUSHBUTTON " & ", 1369, 6, 114, 100, 14, WS_GROUP - PUSHBUTTON "&...", 1368, 109, 114, 60, 14, NOT WS_VISIBLE | WS_DISABLED - AUTOCHECKBOX " & '", 1365, 14, 134, 193, 10, NOT WS_VISIBLE | WS_DISABLED + GROUPBOX "Політика перевірки автентичності й шифрування", 1367, 7, 8, 200, 98, WS_GROUP + AUTORADIOBUTTON "Дозволити будь-яку &перевірку автентичності, включаючи відкритий текст", 1370, 14, 24, 183, 10 + AUTORADIOBUTTON "Дозволити лише &шифровану перевірку автентичності", 1373, 14, 39, 183, 10 + AUTORADIOBUTTON "Дозволити лиш&е перевірку автентичності з шифруванням MS", 1374, 14, 53, 184, 10 + AUTOCHECKBOX "Вимага&ти шифрування даних", 1363, 33, 67, 165, 10, WS_GROUP + AUTOCHECKBOX "&Вимагати стійкого шифрування даних", 1364, 48, 79, 152, 10 + AUTOCHECKBOX "В&икористовувати поточні ім'я й пароль ", 1366, 31, 91, 165, 10 + PUSHBUTTON "Видалити &збережений пароль", 1369, 6, 114, 100, 14, WS_GROUP + PUSHBUTTON "&Додатково...", 1368, 109, 114, 60, 14, NOT WS_VISIBLE | WS_DISABLED + AUTOCHECKBOX "Виявляти спільні файли й при&нтери до установки зв'язку", 1365, 14, 134, 193, 10, NOT WS_VISIBLE | WS_DISABLED END 183 DIALOGEX 6, 18, 317, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " :", 1388, 7, 4, 296, 9 - AUTOCHECKBOX "& IP .", 1386, 20, 19, 285, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& IPX .", 1387, 20, 35, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX " & .", 1382, 20, 52, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& , .", 1385, 20, 70, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& .", 1384, 20, 87, 289, 22, BS_LEFT | BS_TOP | BS_MULTILINE + LTEXT "Позначте всі застосовні параметри:", 1388, 7, 4, 296, 9 + AUTOCHECKBOX "&Переспрямовувати пакети IP на цей інтерфейс.", 1386, 20, 19, 285, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "П&ереспрямовувати пакети IPX на цей інтерфейс.", 1387, 20, 35, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Додати о&бліковий запис для вхідних дзвінків віддаленого маршрутизатора.", 1382, 20, 52, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Надс&илати незашифрований пароль, якщо це єдиний спосіб підключення.", 1385, 20, 70, 287, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Викори&стовувати сценарій для завершення підключення до віддаленого маршрутизатора.", 1384, 20, 87, 289, 22, BS_LEFT | BS_TOP | BS_MULTILINE END 184 DIALOGEX 0, 0, 317, 143 @@ -873,202 +873,202 @@ END 186 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ϳ, , , .", -1, 7, 4, 306, 23 - LTEXT " :", -1, 14, 27, 288, 12 - AUTORADIOBUTTON " & ", 1400, 26, 40, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON " & ", 1401, 26, 55, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Підключення, створене лише для вашого використання, зберігається в профілі вашого облікового запису й недоступне, поки ви не ввійдете до системи.", -1, 7, 4, 306, 23 + LTEXT "Створити це підключення:", -1, 14, 27, 288, 12 + AUTORADIOBUTTON "для в&сіх користувачів", 1400, 26, 40, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "лише дл&я мене", 1401, 26, 55, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 498 DIALOGEX 12, 16, 215, 126 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS . ' .", 1396, 7, 6, 206, 36 - LTEXT "&:", 1399, 8, 51, 49, 8 + LTEXT "ReactOS не вдалося підключитися до мережі з використанням наданих імені користувача й пароля. Введіть ім'я користувача й пароль заново.", 1396, 7, 6, 206, 36 + LTEXT "&Користувач:", 1399, 8, 51, 49, 8 EDITTEXT 1394, 66, 46, 143, 14, ES_AUTOHSCROLL - LTEXT "&:", 1397, 8, 70, 49, 8, NOT WS_GROUP + LTEXT "Парол&ь:", 1397, 8, 70, 49, 8, NOT WS_GROUP EDITTEXT 1393, 66, 64, 143, 14, ES_PASSWORD | ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1391, 66, 84, 143, 10 + AUTOCHECKBOX "&Зберегти пароль", 1391, 66, 84, 143, 10 CONTROL "", 1398, "STATIC", SS_ETCHEDHORZ | WS_GROUP, 7, 98, 200, 1 DEFPUSHBUTTON "OK", 1, 81, 104, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 145, 104, 60, 14 + PUSHBUTTON "Скасувати", 2, 145, 104, 60, 14 END 500 DIALOGEX 12, 16, 215, 173 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS . ' .", 1396, 7, 6, 209, 26 - LTEXT "&:", 1399, 7, 72, 44, 8 + LTEXT "ReactOS не вдалося підключитися до мережі з використанням наданих імені користувача й пароля. Введіть ім'я користувача й пароль заново.", 1396, 7, 6, 209, 26 + LTEXT "&Користувач:", 1399, 7, 72, 44, 8 EDITTEXT 1394, 97, 69, 115, 14, ES_AUTOHSCROLL - LTEXT "&:", 1397, 7, 90, 45, 8, NOT WS_GROUP + LTEXT "Парол&ь:", 1397, 7, 90, 45, 8, NOT WS_GROUP EDITTEXT 1393, 97, 87, 115, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1395, 7, 108, 53, 8, NOT WS_GROUP + LTEXT "&Домен:", 1395, 7, 108, 53, 8, NOT WS_GROUP EDITTEXT 1392, 97, 105, 115, 14, ES_UPPERCASE | ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1391, 85, 125, 123, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Зберегти пароль", 1391, 85, 125, 123, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 87, 146, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 151, 146, 60, 14 + PUSHBUTTON "Скасувати", 2, 151, 146, 60, 14 CONTROL "", 1398, "STATIC", SS_ETCHEDHORZ | WS_GROUP, 7, 140, 205, 1 - LTEXT " \n. ( ' ')", -1, 8, 38, 209, 26 + LTEXT "Поле імені домену можна заповнити або залишити \nпустим. (Для підключення до Інтернету ім'я домену не є обов'язковим)", -1, 8, 38, 209, 26 END 502 DIALOGEX 20, 60, 215, 73 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " PPP" +CAPTION "Параметри PPP" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& LCP", 1423, 9, 7, 200, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1424, 9, 22, 201, 10, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1557, 9, 37, 202, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Увімкнути розширення LCP", 1423, 9, 7, 200, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Використовувати програмне стискання даних", 1424, 9, 22, 201, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "У&згоджувати багатоканальність для одноканальних підключень", 1557, 9, 37, 202, 10, BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 82, 53, 60, 14 - PUSHBUTTON "", 2, 148, 53, 60, 14 + PUSHBUTTON "Скасувати", 2, 148, 53, 60, 14 END 509 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ':", -1, 10, 5, 275, 9 - AUTORADIOBUTTON "& '", 1483, 31, 20, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& '", 1484, 31, 44, 265, 10, BS_TOP | BS_MULTILINE - LTEXT " ' , .", -1, 45, 31, 253, 13, NOT WS_GROUP | WS_TABSTOP - LTEXT " ' '.", -1, 43, 56, 253, 23, NOT WS_GROUP + LTEXT "Виберіть роль для цього комп'ютера:", -1, 10, 5, 275, 9 + AUTORADIOBUTTON "&Ведений комп'ютер", 1483, 31, 20, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Провідний комп'ютер", 1484, 31, 44, 265, 10, BS_TOP | BS_MULTILINE + LTEXT "Цей комп'ютер містить інформацію, до якої потрібно отримати доступ.", -1, 45, 31, 253, 13, NOT WS_GROUP | WS_TABSTOP + LTEXT "Цей комп'ютер використовується для доступу до інформації на веденому комп'ютері.", -1, 43, 56, 253, 23, NOT WS_GROUP END 511 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 8, 5, 261, 8 + LTEXT "&Виберіть пристрій:", -1, 8, 5, 261, 8 COMBOBOX 1485, 9, 18, 302, 62, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END 528 DIALOGEX 0, 0, 227, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "ϳ" +CAPTION "Підключення" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1582, 8, 10, 213, 63 - LTEXT ", , .", 1581, 16, 21, 194, 30 - AUTOCHECKBOX " & ", 1497, 16, 56, 195, 10, BS_TOP | BS_MULTILINE + GROUPBOX "Привілеї входу", 1582, 8, 10, 213, 63 + LTEXT "Користувачам, які не є адміністраторами, може бути дозволено створювати або змінювати підключення перед входом до мережі.", 1581, 16, 21, 194, 30 + AUTOCHECKBOX "Дозволити ство&рення й зміну підключень перед входом до мережі", 1497, 16, 56, 195, 10, BS_TOP | BS_MULTILINE END 532 DIALOGEX 0, 0, 263, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "³ " +CAPTION "Відповідний виклик маршрутизатора" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ϳ ' , '. ?", 1043, 7, 5, 253, 24 - AUTORADIOBUTTON "&³ ", 1501, 9, 36, 252, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& :", 1502, 9, 48, 252, 10, BS_TOP | BS_MULTILINE, WS_EX_TRANSPARENT + LTEXT "Після установки зв'язку з маршрутизатором він може зробити виклик у відповідь, що зменшить ваші витрати на телефонування та підвищить безпеку з'єднання. Використовувати зворотний виклик?", 1043, 7, 5, 253, 24 + AUTORADIOBUTTON "&Відповідний виклик не виконується", 1501, 9, 36, 252, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "Зав&жди робити зворотний виклик за вказаними номерами:", 1502, 9, 48, 252, 10, BS_TOP | BS_MULTILINE, WS_EX_TRANSPARENT CONTROL "", 1503, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00008401, 15, 63, 240, 143 - PUSHBUTTON "&...", 1504, 131, 213, 60, 14 - PUSHBUTTON "&", 1505, 194, 213, 60, 14 + PUSHBUTTON "З&мінити...", 1504, 131, 213, 60, 14 + PUSHBUTTON "В&идалити", 1505, 194, 213, 60, 14 CONTROL "", -1, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 DEFPUSHBUTTON "OK", 1, 132, 242, 60, 14 - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Скасувати", 2, 196, 242, 60, 14 END 534 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1289, 7, 7, 215, 55 - AUTORADIOBUTTON "& ", 1506, 16, 20, 199, 9, BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - LTEXT "& ':", 1299, 27, 33, 99, 8, NOT WS_GROUP + GROUPBOX "Тип підключення", 1289, 7, 7, 215, 55 + AUTORADIOBUTTON "В&иклик на вимогу", 1506, 16, 20, 199, 9, BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + LTEXT "&Час простою до роз'єднання:", 1299, 27, 33, 99, 8, NOT WS_GROUP COMBOBOX 1291, 144, 30, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTORADIOBUTTON "& ", 1507, 16, 47, 197, 9, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - GROUPBOX " ", 1290, 7, 66, 215, 48 - LTEXT "&ʳ :", 1300, 14, 79, 123, 8 + AUTORADIOBUTTON "&Постійне підключення", 1507, 16, 47, 197, 9, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + GROUPBOX "Політика набору номера", 1290, 7, 66, 215, 48 + LTEXT "&Кількість спроб повторного набору:", 1300, 14, 79, 123, 8 EDITTEXT 1287, 143, 76, 70, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "& :", 1301, 14, 96, 123, 8 + LTEXT "&Середній інтервал між спробами:", 1301, 14, 96, 123, 8 COMBOBOX 1292, 143, 94, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - GROUPBOX " ", 1288, 7, 116, 215, 35 + GROUPBOX "Використання декількох пристроїв", 1288, 7, 116, 215, 35 COMBOBOX 1551, 16, 130, 128, 41, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&...", 1293, 150, 129, 65, 14 - PUSHBUTTON "&³ ", 1302, 8, 195, 60, 14 + PUSHBUTTON "&Налаштувати...", 1293, 150, 129, 65, 14 + PUSHBUTTON "&Відповідний виклик", 1302, 8, 195, 60, 14 PUSHBUTTON "&X.25", 1295, 73, 195, 50, 14 END 539 DIALOGEX 0, 0, 265, 110 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 14, 64, 84, 8 + LTEXT "&Користувач:", 1413, 14, 64, 84, 8 EDITTEXT 1104, 102, 62, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 82, 247, 1 - DEFPUSHBUTTON "&", 1590, 8, 89, 60, 14 - PUSHBUTTON "", 1591, 71, 89, 60, 14 - PUSHBUTTON "&", 1107, 133, 89, 60, 14 - PUSHBUTTON "&", 1592, 195, 89, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 89, 60, 14 + PUSHBUTTON "Скасувати", 1591, 71, 89, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 133, 89, 60, 14 + PUSHBUTTON "&Довідка", 1592, 195, 89, 60, 14 END 540 DIALOGEX 0, 0, 265, 133 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 64, 90, 8 + LTEXT "&Користувач:", 1413, 10, 64, 90, 8 EDITTEXT 1104, 105, 60, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 80, 252, 1 - LTEXT "&:", 1412, 10, 91, 92, 10 + LTEXT "Н&абрати:", 1412, 10, 91, 92, 10 COMBOBOX 1416, 105, 88, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 107, 251, 1 - DEFPUSHBUTTON "&", 1590, 8, 113, 60, 14 - PUSHBUTTON "", 1591, 71, 113, 60, 14 - PUSHBUTTON "&", 1107, 134, 113, 60, 14 - PUSHBUTTON "&", 1592, 197, 113, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 113, 60, 14 + PUSHBUTTON "Скасувати", 1591, 71, 113, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 134, 113, 60, 14 + PUSHBUTTON "&Довідка", 1592, 197, 113, 60, 14 END 541 DIALOGEX 0, 0, 265, 157 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 12, 67, 87, 8 + LTEXT "&Користувач:", 1413, 12, 67, 87, 8 EDITTEXT 1104, 103, 63, 154, 14, ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 9, 84, 248, 1 - LTEXT "&:", 1412, 11, 96, 48, 8 + LTEXT "Н&абрати:", 1412, 11, 96, 48, 8 COMBOBOX 1416, 103, 92, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "&̳ :", 1415, 10, 114, 46, 8 + LTEXT "&Місце виклику:", 1415, 10, 114, 46, 8 COMBOBOX 1414, 102, 110, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 193, 110, 64, 14 + PUSHBUTTON "&Правила", 1108, 193, 110, 64, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 7, 130, 250, 1 - DEFPUSHBUTTON "&", 1590, 6, 136, 60, 14 - PUSHBUTTON "", 1591, 69, 136, 60, 14 - PUSHBUTTON "&", 1107, 132, 136, 60, 14 - PUSHBUTTON "&", 1592, 196, 136, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 6, 136, 60, 14 + PUSHBUTTON "Скасувати", 1591, 69, 136, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 132, 136, 60, 14 + PUSHBUTTON "&Довідка", 1592, 196, 136, 60, 14 END 544 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' .", -1, 10, 5, 300, 22 - AUTOCHECKBOX "& ", 1512, 21, 31, 272, 10 - LTEXT " , - ' , .", 1514, 10, 56, 294, 22 - AUTOCHECKBOX "& ", 1513, 21, 86, 260, 10 + LTEXT "Спільний доступ до підключення до Інтернету дає змогу іншим комп'ютерам у вашій локальній мережі отримувати доступ до зовнішніх ресурсів через це підключення.", -1, 10, 5, 300, 22 + AUTOCHECKBOX "&Дозволити спільний доступ для цього підключення", 1512, 21, 31, 272, 10 + LTEXT "Щоб установлювати це підключення автоматично, коли будь-який комп'ютер у вашій локальній мережі намагатиметься отримати доступ до зовнішніх ресурсів, установіть цей прапорець.", 1514, 10, 56, 294, 22 + AUTOCHECKBOX "До&зволити виклик на вимогу", 1513, 21, 86, 260, 10 END 545 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' . .", -1, 10, 5, 300, 25 - LTEXT "& , :", -1, 21, 35, 285, 8 + LTEXT "Спільний доступ дає змогу іншим комп'ютерам у вашій локальній мережі отримувати доступ до зовнішніх ресурсів через це підключення віддаленого доступу. Одночасно можна дозволяти спільний доступ лише для одного підключення й одної локальної мережі.", -1, 10, 5, 300, 25 + LTEXT "&Виберіть локальну мережу, яка отримає доступ до ресурсів через це підключення:", -1, 21, 35, 285, 8 COMBOBOX 1522, 21, 48, 231, 56, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END @@ -1076,274 +1076,274 @@ END STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " - . - ?", -1, 10, 5, 303, 22 - AUTORADIOBUTTON "& - ", 1524, 26, 29, 264, 12, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& - ", 1525, 26, 44, 261, 16, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Можна налаштувати це підключення для використання смарт-картки для входу до віддаленої мережі. Використовувати смарт-картку для цього підключення?", -1, 10, 5, 303, 22 + AUTORADIOBUTTON "&Використовувати мою смарт-картку ", 1524, 26, 29, 264, 12, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Не використовувати мою смарт-картку ", 1525, 26, 44, 261, 16, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 547 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Майстер інтерфейсу виклику на вимогу" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 1530, 122, 8, 192, 32 - LTEXT " .", 1531, 122, 43, 192, 37 - LTEXT " , """".", 1532, 122, 85, 191, 29 + LTEXT "Майстер інтерфейсу виклику на вимогу.", 1530, 122, 8, 192, 32 + LTEXT "За допомогою цього майстра можна створити інтерфейс виклику на вимогу для підключення цього маршрутизатора до інших маршрутизаторів.", 1531, 122, 43, 192, 37 + LTEXT "Щоб продовжити, натисніть кнопку ""Далі"".", 1532, 122, 85, 191, 29 END 548 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "ϳ & , ISDN .", 1531, 21, 17, 290, 15, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "ϳ & (VPN)", 1532, 21, 38, 291, 15, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "ϳ PPP Ethernet (PPPoE)", 1688, 21, 58, 290, 12, NOT WS_TABSTOP + AUTORADIOBUTTON "Підключатися за допо&могою модема, адаптера ISDN або іншого фізичного пристрою.", 1531, 21, 17, 290, 15, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "Підключатися за допомогою &віртуальної приватної мережі (VPN)", 1532, 21, 38, 291, 15, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Підключатися за допомогою PPP через Ethernet (PPPoE)", 1688, 21, 58, 290, 12, NOT WS_TABSTOP END 550 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' IP- , .", 1535, 10, 8, 289, 18 - LTEXT "' ' IP- (&, reactos.org 145.52.0.1):", 1537, 21, 35, 285, 8 + LTEXT "Введіть ім'я або IP-адресу маршрутизатора, до якого ви підключаєтеся.", 1535, 10, 8, 289, 18 + LTEXT "Ім'я комп'ютера або IP-адреса (напр&иклад, reactos.org або 145.52.0.1):", 1537, 21, 35, 285, 8 EDITTEXT 1536, 21, 47, 285, 14, ES_AUTOHSCROLL END 551 DIALOGEX 0, 0, 265, 127 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 12, 62, 89, 8 + LTEXT "&Користувач:", 1413, 12, 62, 89, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1110, 12, 82, 90, 8 + LTEXT "До&мен:", 1110, 12, 82, 90, 8 EDITTEXT 1102, 104, 79, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 99, 248, 1 - DEFPUSHBUTTON "&", 1590, 9, 106, 61, 14 - PUSHBUTTON "", 1591, 72, 106, 60, 14 - PUSHBUTTON "&", 1107, 135, 106, 60, 14 - PUSHBUTTON "&", 1592, 198, 106, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 9, 106, 61, 14 + PUSHBUTTON "Скасувати", 1591, 72, 106, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 135, 106, 60, 14 + PUSHBUTTON "&Довідка", 1592, 198, 106, 60, 14 END 552 DIALOGEX 0, 0, 265, 159 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 67, 91, 10 + LTEXT "&Користувач:", 1413, 10, 67, 91, 10 EDITTEXT 1104, 104, 64, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1110, 11, 86, 91, 8 + LTEXT "До&мен:", 1110, 11, 86, 91, 8 EDITTEXT 1102, 104, 83, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 103, 248, 1 - LTEXT "&:", 1412, 10, 115, 91, 8 + LTEXT "Н&абрати:", 1412, 10, 115, 91, 8 COMBOBOX 1416, 104, 111, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 132, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 139, 60, 14 - PUSHBUTTON "", 1591, 71, 139, 60, 14 - PUSHBUTTON "&", 1107, 134, 139, 60, 14 - PUSHBUTTON "&", 1592, 198, 139, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 139, 60, 14 + PUSHBUTTON "Скасувати", 1591, 71, 139, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 134, 139, 60, 14 + PUSHBUTTON "&Довідка", 1592, 198, 139, 60, 14 END 553 DIALOGEX 0, 0, 265, 183 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 68, 92, 10 + LTEXT "&Користувач:", 1413, 10, 68, 92, 10 EDITTEXT 1104, 104, 65, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1110, 10, 90, 91, 8 + LTEXT "До&мен:", 1110, 10, 90, 91, 8 EDITTEXT 1102, 104, 86, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 106, 248, 1 - LTEXT "&:", 1412, 10, 118, 92, 8 + LTEXT "Н&абрати:", 1412, 10, 118, 92, 8 COMBOBOX 1416, 104, 114, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "̳& :", 1415, 10, 137, 91, 8 + LTEXT "Міс&це виклику:", 1415, 10, 137, 91, 8 COMBOBOX 1414, 104, 134, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 194, 134, 65, 14 + PUSHBUTTON "&Правила", 1108, 194, 134, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 154, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 162, 60, 14 - PUSHBUTTON "", 1591, 71, 162, 60, 14 - PUSHBUTTON "&", 1107, 134, 162, 60, 14 - PUSHBUTTON "&", 1592, 198, 162, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 162, 60, 14 + PUSHBUTTON "Скасувати", 1591, 71, 162, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 134, 162, 60, 14 + PUSHBUTTON "&Довідка", 1592, 198, 162, 60, 14 END 554 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ϳ& :", 1124, 7, 4, 193, 8 + LTEXT "Підкл&ючення через:", 1124, 7, 4, 193, 8 CONTROL "", 1128, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x00004C0D, 7, 17, 195, 44, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1132, 208, 18, 16, 14, BS_ICON - PUSHBUTTON "&", 1131, 208, 36, 16, 14, BS_ICON - AUTOCHECKBOX "& ", 1119, 7, 65, 131, 21, BS_TOP | BS_MULTILINE - PUSHBUTTON "&...", 1130, 140, 66, 60, 14 - GROUPBOX "", 1125, 7, 87, 213, 56, WS_GROUP - LTEXT " &:", 1135, 19, 102, 191, 8 + PUSHBUTTON "В&гору", 1132, 208, 18, 16, 14, BS_ICON + PUSHBUTTON "В&низ", 1131, 208, 36, 16, 14, BS_ICON + AUTOCHECKBOX "На&бирати однакові номери для підключення всіх пристроїв", 1119, 7, 65, 131, 21, BS_TOP | BS_MULTILINE + PUSHBUTTON "Нала&штувати...", 1130, 140, 66, 60, 14 + GROUPBOX "Зразок", 1125, 7, 87, 213, 56, WS_GROUP + LTEXT "Номер &телефону:", 1135, 19, 102, 191, 8 EDITTEXT 1123, 17, 112, 138, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 161, 112, 50, 14 - AUTOCHECKBOX "&ϳ ", 1120, 11, 194, 212, 20, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Інші", 1129, 161, 112, 50, 14 + AUTOCHECKBOX "&Після підключення показати значок в області сповіщень", 1120, 11, 194, 212, 20, BS_TOP | BS_MULTILINE END 555 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "&...", 1130, 160, 38, 60, 14 - LTEXT " &:", 1135, 8, 72, 194, 8 + PUSHBUTTON "Нала&штувати...", 1130, 160, 38, 60, 14 + LTEXT "Номер &телефону:", 1135, 8, 72, 194, 8 EDITTEXT 1123, 8, 83, 148, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1129, 160, 83, 60, 14 - AUTOCHECKBOX "&ϳ ", 1120, 11, 194, 213, 10, BS_TOP | BS_MULTILINE - LTEXT "ϳ& :", 1124, 8, 5, 214, 8 + PUSHBUTTON "&Інші", 1129, 160, 83, 60, 14 + AUTOCHECKBOX "&Після підключення показати значок в області сповіщень", 1120, 11, 194, 213, 10, BS_TOP | BS_MULTILINE + LTEXT "Підкл&ючення через:", 1124, 8, 5, 214, 8 CONTROL "", 1127, "SYSLISTVIEW32", WS_DISABLED | WS_BORDER | 0x0000EC0D, 7, 18, 214, 15 END 556 DIALOGEX 0, 0, 220, 165 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Параметри програм" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " &, :", -1, 7, 5, 203, 8 + LTEXT "Опис прогр&ами, яка працює у вашій мережі:", -1, 7, 5, 203, 8 EDITTEXT 1565, 7, 17, 206, 14, ES_AUTOHSCROLL - LTEXT "& -:", -1, 7, 35, 202, 8 + LTEXT "Ном&ер порту Інтернет-сервера:", -1, 7, 35, 202, 8 EDITTEXT 1566, 7, 47, 113, 14, ES_AUTOHSCROLL | ES_NUMBER - AUTORADIOBUTTON "& TCP", 1548, 128, 49, 30, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "& UDP", 1567, 166, 49, 31, 10, NOT WS_TABSTOP - LTEXT "& :\n(: 1024-1209, 1300-1310, 1450)", -1, 7, 70, 207, 22 - LTEXT "& TCP:", -1, 7, 100, 28, 8 + AUTORADIOBUTTON "дл&я TCP", 1548, 128, 49, 30, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "д&ля UDP", 1567, 166, 49, 31, 10, NOT WS_TABSTOP + LTEXT "&Порт або діапазон портів для прослухування відповідей від серверів Інтернету:\n(наприклад: 1024-1209, 1300-1310, 1450)", -1, 7, 70, 207, 22 + LTEXT "п&орт TCP:", -1, 7, 100, 28, 8 EDITTEXT 1569, 50, 97, 162, 14, ES_AUTOHSCROLL - LTEXT "& UDP:", -1, 7, 121, 30, 8 + LTEXT "пор&т UDP:", -1, 7, 121, 30, 8 EDITTEXT 1551, 51, 117, 162, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 90, 144, 60, 14 - PUSHBUTTON "", 2, 154, 144, 60, 14 + PUSHBUTTON "Скасувати", 2, 154, 144, 60, 14 END 557 DIALOGEX 0, 0, 217, 164 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Параметри служби" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 5, 203, 8 + LTEXT "&Опис служби:", -1, 7, 5, 203, 8 EDITTEXT 1552, 7, 18, 205, 14, ES_AUTOHSCROLL - LTEXT "&' IP- (, 192.168.0.12) ' , :", -1, 7, 37, 208, 16 + LTEXT "&Ім'я або IP-адреса (наприклад, 192.168.0.12) комп'ютера мережі, на якому розташована ця служба:", -1, 7, 37, 208, 16 EDITTEXT 1556, 7, 57, 203, 14, ES_AUTOHSCROLL - LTEXT " , & :", -1, 7, 85, 203, 8 + LTEXT "Номер порту, н&а якому розташована ця служба:", -1, 7, 85, 203, 8 EDITTEXT 1553, 7, 97, 113, 14, ES_AUTOHSCROLL | ES_NUMBER - AUTORADIOBUTTON "& TCP", 1554, 128, 99, 30, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "& UDP", 1555, 166, 99, 31, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "дл&я TCP", 1554, 128, 99, 30, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "д&ля UDP", 1555, 166, 99, 31, 10, NOT WS_TABSTOP DEFPUSHBUTTON "OK", 1, 86, 143, 60, 14 - PUSHBUTTON "", 2, 150, 143, 60, 14 + PUSHBUTTON "Скасувати", 2, 150, 143, 60, 14 END 558 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Програми" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ϳ ' , :", -1, 7, 7, 218, 28 + LTEXT "Підключення до Інтернету на цьому комп'ютері було налаштовано таким чином, щоб дозволити запуск через мережу таких програм:", -1, 7, 7, 218, 28 CONTROL "List1", 1558, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000441D, 7, 37, 215, 155, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1538, 7, 197, 67, 14 - PUSHBUTTON "&...", 1559, 80, 197, 67, 14 - PUSHBUTTON "&", 1568, 153, 197, 67, 14 + PUSHBUTTON "&Додати...", 1538, 7, 197, 67, 14 + PUSHBUTTON "З&мінити...", 1559, 80, 197, 67, 14 + PUSHBUTTON "В&идалити", 1568, 153, 197, 67, 14 END 559 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Служби" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& , .", -1, 7, 5, 216, 22 - LTEXT ":", -1, 7, 27, 143, 8 + LTEXT "&Виберіть служби вашої мережі, до яких можуть отримувати доступ користувачі Інтернету.", -1, 7, 5, 216, 22 + LTEXT "Служби:", -1, 7, 27, 143, 8 CONTROL "List1", 1560, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000441D, 7, 37, 215, 155, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1561, 7, 197, 67, 14 - PUSHBUTTON "&...", 1563, 80, 197, 67, 14 - PUSHBUTTON "&", 1562, 153, 197, 67, 14 + PUSHBUTTON "&Додати...", 1561, 7, 197, 67, 14 + PUSHBUTTON "З&мінити...", 1563, 80, 197, 67, 14 + PUSHBUTTON "В&идалити", 1562, 153, 197, 67, 14 END 560 DIALOGEX 6, 18, 240, 88 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Початкове підключення" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", 6, 68, 68, 50, 14 - PUSHBUTTON "&ͳ", 7, 125, 68, 50, 14 + DEFPUSHBUTTON "&Так", 6, 68, 68, 50, 14 + PUSHBUTTON "&Ні", 7, 125, 68, 50, 14 ICON 32516, 1575, 7, 7, 20, 20 LTEXT "", 1576, 40, 7, 190, 33 - AUTOCHECKBOX "& ", 1579, 40, 48, 192, 11, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Більше не показувати це нагадування", 1579, 40, 48, 192, 11, BS_TOP | BS_MULTILINE END 567 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' . , ReactOS .", -1, 10, 7, 301, 25 - LTEXT "&' ('):", -1, 22, 32, 229, 8 + LTEXT "Введіть ім'я служби в цьому текстовому полі. Якщо залишити поле пустим, ReactOS автоматично виявить і налаштує службу при підключенні.", -1, 10, 7, 301, 25 + LTEXT "&Ім'я служби (необов'язкове):", -1, 22, 32, 229, 8 EDITTEXT 1593, 22, 44, 275, 14, ES_AUTOHSCROLL END 568 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&' :", 1686, 7, 5, 217, 10 + LTEXT "&Ім'я служби:", 1686, 7, 5, 217, 10 EDITTEXT 1594, 7, 17, 217, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "&ϳ ", 1120, 9, 196, 215, 8 + AUTOCHECKBOX "&Після підключення показати значок в області сповіщень", 1120, 9, 196, 215, 8 END 569 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Безпека" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1580, 8, 4, 213, 151 - AUTORADIOBUTTON "& ( )", 1540, 14, 16, 197, 9, BS_NOTIFY | WS_GROUP - AUTORADIOBUTTON "& ( )", 1541, 14, 100, 197, 8, BS_NOTIFY - LTEXT "& :", 1537, 26, 29, 183, 8, NOT WS_GROUP + GROUPBOX "Параметри безпеки", 1580, 8, 4, 213, 151 + AUTORADIOBUTTON "&Звичайні (рекомендовані параметри)", 1540, 14, 16, 197, 9, BS_NOTIFY | WS_GROUP + AUTORADIOBUTTON "&Додаткові (вибіркові параметри)", 1541, 14, 100, 197, 8, BS_NOTIFY + LTEXT "П&еревіряти користувача таким чином:", 1537, 26, 29, 183, 8, NOT WS_GROUP COMBOBOX 1178, 26, 40, 184, 78, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& ' ReactOS ( ' , )", 1174, 26, 59, 182, 20, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ( , ')", 1169, 26, 83, 182, 10, BS_TOP | BS_MULTILINE - LTEXT " .", 1539, 26, 111, 136, 20 - PUSHBUTTON "&...", 1180, 151, 134, 60, 14 - PUSHBUTTON "& IPSec...", 1598, 126, 163, 85, 14 + AUTOCHECKBOX "Автомат&ично використовувати ім'я для входу та пароль ReactOS (а також ім'я домену, якщо воно є)", 1174, 26, 59, 182, 20, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "Потрі&бне шифрування даних (якщо ні, роз'єднуватися)", 1169, 26, 83, 182, 10, BS_TOP | BS_MULTILINE + LTEXT "Використання цих параметрів потребує знання протоколів безпеки.", 1539, 26, 111, 136, 20 + PUSHBUTTON "&Параметри...", 1180, 151, 134, 60, 14 + PUSHBUTTON "Пара&метри IPSec...", 1598, 126, 163, 85, 14 END 570 DIALOGEX 0, 0, 265, 126 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " IPSec" +CAPTION "Параметри IPSec" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 151, 104, 50, 14 - PUSHBUTTON "", 2, 207, 104, 50, 14 - AUTOCHECKBOX "& ", 1604, 21, 15, 217, 10 - LTEXT "&:", 1602, 20, 31, 44, 12 + PUSHBUTTON "Скасувати", 2, 207, 104, 50, 14 + AUTOCHECKBOX "В&икористовувати попередній спільний ключ для перевірки автентичності", 1604, 21, 15, 217, 10 + LTEXT "&Ключ:", 1602, 20, 31, 44, 12 EDITTEXT 1605, 66, 30, 172, 12, ES_AUTOHSCROLL - AUTOCHECKBOX " , ", 1606, 20, 50, 242, 13, WS_DISABLED - AUTOCHECKBOX " ", 1607, 20, 67, 239, 10, WS_DISABLED - PUSHBUTTON "", 1608, 31, 84, 50, 14, WS_DISABLED + AUTOCHECKBOX "Дозволити сертифікати з мого сховища, на додаток до системних сертифікатів", 1606, 20, 50, 242, 13, WS_DISABLED + AUTOCHECKBOX "Використовувати особливий сертифікат", 1607, 20, 67, 239, 10, WS_DISABLED + PUSHBUTTON "Вибрати", 1608, 31, 84, 50, 14, WS_DISABLED COMBOBOX 1610, 91, 84, 135, 30, CBS_DROPDOWN | CBS_SORT | WS_DISABLED | WS_VSCROLL | NOT WS_TABSTOP END 571 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Ведення журналу безпеки" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " :", -1, 6, 8, 216, 47 - AUTOCHECKBOX "& ", 1642, 14, 22, 201, 10 - AUTOCHECKBOX "& ", 1641, 14, 37, 200, 10 - GROUPBOX " :", -1, 7, 64, 215, 91 - LTEXT "&':", -1, 14, 78, 199, 8 + GROUPBOX "Параметри ведення журналу:", -1, 6, 8, 216, 47 + AUTOCHECKBOX "&Реєструвати невдалі спроби вхідних підключень", 1642, 14, 22, 201, 10 + AUTOCHECKBOX "Ре&єструвати успішні вихідні підключення", 1641, 14, 37, 200, 10 + GROUPBOX "Параметри файлу журналу:", -1, 7, 64, 215, 91 + LTEXT "&Ім'я:", -1, 14, 78, 199, 8 EDITTEXT 1674, 14, 90, 199, 14, ES_READONLY - PUSHBUTTON "&...", 1639, 153, 108, 60, 14 - LTEXT "& :", -1, 14, 133, 67, 8 + PUSHBUTTON "О&гляд...", 1639, 153, 108, 60, 14 + LTEXT "Гра&ничний розмір файлу журналу:", -1, 14, 133, 67, 8 EDITTEXT 1640, 86, 130, 50, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT "", -1, 140, 133, 20, 8 - PUSHBUTTON "&³", 1643, 135, 197, 85, 14 + LTEXT "КБ", -1, 140, 133, 20, 8 + PUSHBUTTON "&Відновити", 1643, 135, 197, 85, 14 END 572 DIALOGEX 0, 0, 230, 215 @@ -1351,15 +1351,15 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "ICMP" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& (ICMP) ' . , ':", -1, 7, 5, 215, 37 + LTEXT "&Протокол керівних повідомлень Інтернету (ICMP) дає комп'ютерам у мережі змогу обмінюватися відомостями про помилки та свій стан. Виберіть запити з Інтернету, на які відповідатиме цей комп'ютер:", -1, 7, 5, 215, 37 CONTROL "IList1", 1644, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 7, 45, 215, 100, WS_EX_CLIENTEDGE - GROUPBOX ":", -1, 7, 153, 215, 55 + GROUPBOX "Опис:", -1, 7, 153, 215, 55 LTEXT "", 1645, 14, 171, 199, 32 END 574 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", 575, 7, 60, 213, 100 @@ -1367,455 +1367,455 @@ END 577 DIALOGEX 0, 0, 312, 144 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' .", 1681, 10, 3, 296, 11 - LTEXT "&':", 1690, 18, 20, 127, 10 + LTEXT "Введіть ім'я постачальника послуг Інтернету.", 1681, 10, 3, 296, 11 + LTEXT "&Ім'я:", 1690, 18, 20, 127, 10 EDITTEXT 1680, 17, 32, 222, 14, ES_AUTOHSCROLL - LTEXT " ' ' .", 1683, 17, 52, 282, 42 + LTEXT "Введене тут ім'я буде ім'ям нового підключення.", 1683, 17, 52, 282, 42 END 580 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "& ", 1534, 21, 20, 288, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& PPP (PPTP)", 1532, 21, 39, 290, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON " & (L2TP)", 1533, 21, 56, 286, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Авто&матичний вибір", 1534, 21, 20, 288, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&Тунельний протокол PPP (PPTP)", 1532, 21, 39, 290, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Тунельний &протокол другого рівня (L2TP)", 1533, 21, 56, 286, 11, BS_LEFT | BS_TOP | BS_MULTILINE | NOT WS_TABSTOP END 1420 DIALOGEX 0, 0, 265, 108 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1412, 14, 63, 86, 8 + LTEXT "Н&абрати:", 1412, 14, 63, 86, 8 COMBOBOX 1416, 104, 60, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 80, 248, 1 - DEFPUSHBUTTON "&", 1590, 9, 87, 60, 14 - PUSHBUTTON "", 1591, 72, 87, 60, 14 - PUSHBUTTON "&", 1107, 135, 87, 60, 14 - PUSHBUTTON "&", 1592, 198, 87, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 9, 87, 60, 14 + PUSHBUTTON "Скасувати", 1591, 72, 87, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 135, 87, 60, 14 + PUSHBUTTON "&Довідка", 1592, 198, 87, 60, 14 END 1421 DIALOGEX 0, 0, 265, 223 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 61, 90, 8 + LTEXT "&Користувач:", 1413, 10, 61, 90, 8 EDITTEXT 1104, 104, 58, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 11, 81, 90, 8 + LTEXT "Парол&ь:", 1112, 11, 81, 90, 8 EDITTEXT 1103, 104, 77, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 98, 248, 1 - AUTOCHECKBOX "& ' :", 1101, 14, 105, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 26, 119, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " &- ", 1623, 26, 133, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Зберігати ім'я користувача та пароль:", 1101, 14, 105, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "лише дл&я мене", 1622, 26, 119, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для &будь-якого користувача", 1623, 26, 133, 225, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 149, 248, 1 - LTEXT "&:", 1412, 14, 161, 87, 8 + LTEXT "Н&абрати:", 1412, 14, 161, 87, 8 COMBOBOX 1416, 104, 157, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "&̳ :", 1415, 14, 178, 88, 8 + LTEXT "&Місце виклику:", 1415, 14, 178, 88, 8 COMBOBOX 1414, 104, 175, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 193, 175, 65, 14 + PUSHBUTTON "&Правила", 1108, 193, 175, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 196, 248, 1 - DEFPUSHBUTTON "&", 1590, 9, 202, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 72, 202, 60, 14 - PUSHBUTTON "&", 1107, 135, 202, 60, 14 - PUSHBUTTON "&", 1592, 198, 202, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 9, 202, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 1591, 72, 202, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 135, 202, 60, 14 + PUSHBUTTON "&Довідка", 1592, 198, 202, 60, 14 END 1422 DIALOGEX 0, 0, 265, 242 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "ϳ %1" +CAPTION "Підключення до %1" FONT 8, "MS Shell Dlg" BEGIN CONTROL 1678, 1100, "STATIC", SS_BITMAP, 0, 0, 265, 50 - LTEXT "&:", 1413, 10, 67, 91, 8 + LTEXT "&Користувач:", 1413, 10, 67, 91, 8 EDITTEXT 1104, 104, 63, 154, 14, ES_AUTOHSCROLL - LTEXT "&:", 1112, 10, 85, 92, 8 + LTEXT "Парол&ь:", 1112, 10, 85, 92, 8 EDITTEXT 1103, 104, 82, 154, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&:", 1110, 10, 104, 92, 8 + LTEXT "До&мен:", 1110, 10, 104, 92, 8 EDITTEXT 1102, 104, 101, 154, 14, ES_UPPERCASE | ES_AUTOHSCROLL CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN, 10, 121, 248, 1 - AUTOCHECKBOX "& ' :", 1101, 12, 127, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " & ", 1622, 24, 141, 227, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON " &- ", 1623, 24, 155, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Зберігати ім'я користувача та пароль:", 1101, 12, 127, 242, 13, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "лише дл&я мене", 1622, 24, 141, 227, 11, BS_LEFT | BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "для &будь-якого користувача", 1623, 24, 155, 230, 11, BS_LEFT | BS_TOP | BS_MULTILINE CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 170, 248, 1 - LTEXT "&:", 1412, 14, 182, 87, 8 + LTEXT "Н&абрати:", 1412, 14, 182, 87, 8 COMBOBOX 1416, 104, 178, 154, 112, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "̳& :", 1415, 14, 198, 87, 8 + LTEXT "Міс&це виклику:", 1415, 14, 198, 87, 8 COMBOBOX 1414, 104, 195, 87, 112, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - PUSHBUTTON "&", 1108, 193, 195, 65, 14 + PUSHBUTTON "&Правила", 1108, 193, 195, 65, 14 CONTROL "", -1, "STATIC", SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP, 10, 215, 248, 1 - DEFPUSHBUTTON "&", 1590, 8, 221, 60, 14, WS_GROUP - PUSHBUTTON "", 1591, 71, 221, 60, 14 - PUSHBUTTON "&", 1107, 134, 221, 60, 14 - PUSHBUTTON "&", 1592, 198, 221, 60, 14 + DEFPUSHBUTTON "&Виклик", 1590, 8, 221, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", 1591, 71, 221, 60, 14 + PUSHBUTTON "В&ластивості", 1107, 134, 221, 60, 14 + PUSHBUTTON "&Довідка", 1592, 198, 221, 60, 14 END 1425 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "' ' IP- & (, reactos.org 145.52.0.1):", 1430, 7, 5, 217, 18 + LTEXT "Ім'я комп'ютера або IP-адреса пр&изначення (наприклад, reactos.org або 145.52.0.1):", 1430, 7, 5, 217, 18 EDITTEXT 1427, 7, 25, 215, 14, ES_AUTOHSCROLL - GROUPBOX " ", 1431, 9, 48, 213, 78 - LTEXT " , , , .", 1432, 17, 63, 199, 24 - AUTOCHECKBOX "& :", 1428, 19, 89, 183, 10 + GROUPBOX "Спочатку установлювати підключення", 1431, 9, 48, 213, 78 + LTEXT "Можна спочатку підключитися до публічної мережі, наприклад, до Інтернету, а вже потім намагатися установити це віртуальне підключення.", 1432, 17, 63, 199, 24 + AUTOCHECKBOX "&Спочатку набирати номер для іншого підключення:", 1428, 19, 89, 183, 10 COMBOBOX 1429, 29, 103, 182, 87, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "&ϳ ", 1120, 10, 192, 213, 13 + AUTOCHECKBOX "&Після підключення показати значок в області сповіщень", 1120, 10, 192, 213, 13 END 1426 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Параметри" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", 1289, 8, 7, 214, 56 - AUTOCHECKBOX " & ", 1284, 16, 17, 199, 10 - AUTOCHECKBOX "& ', , ", 1554, 16, 32, 199, 10 - AUTOCHECKBOX "& ReactOS", 1555, 16, 47, 178, 10 - GROUPBOX " ", 1290, 8, 68, 214, 89 - LTEXT "&ʳ :", 1300, 16, 81, 121, 8 + GROUPBOX "Параметри набору номера", 1289, 8, 7, 214, 56 + AUTOCHECKBOX "Показувати п&еребіг підключення", 1284, 16, 17, 199, 10 + AUTOCHECKBOX "&Запитувати ім'я, пароль, сертифікат тощо", 1554, 16, 32, 199, 10 + AUTOCHECKBOX "Вкл&ючати домен входу до ReactOS", 1555, 16, 47, 178, 10 + GROUPBOX "Параметри повторного дзвінка", 1290, 8, 68, 214, 89 + LTEXT "&Кількість спроб повторного набору:", 1300, 16, 81, 121, 8 EDITTEXT 1287, 140, 77, 70, 14, ES_AUTOHSCROLL | ES_NUMBER - LTEXT " & :", 1301, 16, 99, 121, 8 + LTEXT "Інтервал мі&ж спробами набору:", 1301, 16, 99, 121, 8 COMBOBOX 1292, 141, 95, 70, 123, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& ':", 1299, 16, 117, 121, 8 + LTEXT "&Час простою до роз'єднання:", 1299, 16, 117, 121, 8 COMBOBOX 1291, 141, 113, 70, 108, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "& '", 1286, 16, 138, 199, 10, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Повторити в разі роз'єднання", 1286, 16, 138, 199, 10, BS_TOP | BS_MULTILINE END 1427 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' IP- ', .", -1, 10, 6, 275, 16 - LTEXT "&' ' IP- (, reactos.org 145.52.0.1 ):", -1, 21, 28, 277, 11 + LTEXT "Введіть ім'я вузла або IP-адресу комп'ютера, до якого підключаєтеся.", -1, 10, 6, 275, 16 + LTEXT "&Ім'я комп'ютера або IP-адреса (наприклад, reactos.org або 145.52.0.1 ):", -1, 21, 28, 277, 11 EDITTEXT 1433, 21, 42, 275, 14, ES_AUTOHSCROLL END 1428 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS .", -1, 10, 6, 275, 24 - AUTORADIOBUTTON "& .", 1509, 32, 31, 271, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON "& :", 1510, 32, 45, 269, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "ReactOS може автоматично установлювати початкове підключення до Інтернету або до іншої публічної мережі перед установкою віртуального підключення.", -1, 10, 6, 275, 24 + AUTORADIOBUTTON "Н&е набирати номер для початкового підключення.", 1509, 32, 31, 271, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Авто&матично набирати номер для цього початкового підключення:", 1510, 32, 45, 269, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP COMBOBOX 1435, 43, 62, 253, 87, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP END 1436 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1597, 8, 5, 213, 8 + LTEXT "&Виберіть пристрій:", 1597, 8, 5, 213, 8 COMBOBOX 1437, 7, 17, 217, 166, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | NOT WS_TABSTOP - AUTOCHECKBOX "&ϳ ", 1120, 11, 195, 213, 10, BS_TOP | BS_MULTILINE - PUSHBUTTON "&...", 1130, 160, 34, 60, 14 + AUTOCHECKBOX "&Після підключення показати значок в області сповіщень", 1120, 11, 195, 213, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "&Налаштувати...", 1130, 160, 34, 60, 14 END 1448 DIALOGEX 10, 20, 265, 71 STYLE DS_SHELLFONT | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Мережні підключення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1456, 7, 7, 251, 10 + LTEXT "&Виберіть мережне підключення:", 1456, 7, 7, 251, 10 COMBOBOX 1457, 8, 18, 250, 140, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | NOT WS_TABSTOP - DEFPUSHBUTTON "ϳ&...", 1449, 7, 50, 60, 14 - PUSHBUTTON "", 1455, 70, 50, 60, 14 - PUSHBUTTON "&...", 1459, 134, 50, 60, 14 - PUSHBUTTON "&", 1460, 198, 50, 60, 14 + DEFPUSHBUTTON "Підкл&ючити...", 1449, 7, 50, 60, 14 + PUSHBUTTON "Скасувати", 1455, 70, 50, 60, 14 + PUSHBUTTON "&Створити...", 1459, 134, 50, 60, 14 + PUSHBUTTON "В&ластивості", 1460, 198, 50, 60, 14 END 1466 DIALOGEX 6, 18, 265, 262 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", 1469, 7, 7, 251, 8 + LTEXT "Зразок", 1469, 7, 7, 251, 8 EDITTEXT 1470, 7, 17, 193, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1471, 77, 36, 60, 14 - PUSHBUTTON "&", 1472, 141, 36, 60, 14 - LTEXT "", 1473, 7, 57, 193, 8 + PUSHBUTTON "&Додати", 1471, 77, 36, 60, 14 + PUSHBUTTON "&Замінити", 1472, 141, 36, 60, 14 + LTEXT "Зразок", 1473, 7, 57, 193, 8 LISTBOX 1474, 7, 68, 193, 145, WS_VSCROLL | WS_TABSTOP PUSHBUTTON "", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP - PUSHBUTTON "&", 1476, 206, 86, 51, 14, BS_BITMAP - PUSHBUTTON "&", 1477, 141, 215, 60, 14 + PUSHBUTTON "В&низ", 1476, 206, 86, 51, 14, BS_BITMAP + PUSHBUTTON "В&идалити", 1477, 141, 215, 60, 14 CONTROL "", 1479, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Скасувати", 2, 196, 242, 60, 14 END 1467 DIALOGEX 6, 18, 263, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", 1469, 7, 7, 197, 8 + LTEXT "Зразок", 1469, 7, 7, 197, 8 EDITTEXT 1470, 7, 17, 193, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1471, 76, 36, 60, 14 - PUSHBUTTON "&", 1472, 141, 36, 60, 14 - LTEXT "", 1473, 7, 57, 193, 8 + PUSHBUTTON "&Додати", 1471, 76, 36, 60, 14 + PUSHBUTTON "&Замінити", 1472, 141, 36, 60, 14 + LTEXT "Зразок", 1473, 7, 57, 193, 8 LISTBOX 1474, 7, 68, 193, 135, WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP - PUSHBUTTON "&", 1476, 206, 86, 51, 14, BS_BITMAP - PUSHBUTTON "&", 1477, 141, 204, 60, 14 - AUTOCHECKBOX "", 1478, 7, 225, 249, 10, BS_TOP | BS_MULTILINE + PUSHBUTTON "В&гору", 1475, 206, 68, 51, 14, BS_BITMAP | WS_GROUP + PUSHBUTTON "В&низ", 1476, 206, 86, 51, 14, BS_BITMAP + PUSHBUTTON "В&идалити", 1477, 141, 204, 60, 14 + AUTOCHECKBOX "Зразок", 1478, 7, 225, 249, 10, BS_TOP | BS_MULTILINE PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Скасувати", 2, 196, 242, 60, 14 END 1468 DIALOGEX 6, 18, 263, 263 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "", 1469, 7, 5, 249, 8 + LTEXT "Зразок", 1469, 7, 5, 249, 8 EDITTEXT 1470, 7, 17, 249, 14, ES_AUTOHSCROLL - PUSHBUTTON "&", 1471, 132, 36, 60, 14 - PUSHBUTTON "&", 1472, 196, 36, 60, 14 - LTEXT "", 1473, 7, 55, 251, 8 + PUSHBUTTON "&Додати", 1471, 132, 36, 60, 14 + PUSHBUTTON "&Замінити", 1472, 196, 36, 60, 14 + LTEXT "Зразок", 1473, 7, 55, 251, 8 LISTBOX 1474, 7, 68, 249, 140, LBS_STANDARD | WS_TABSTOP - PUSHBUTTON "&", 1477, 196, 214, 60, 14, WS_GROUP + PUSHBUTTON "В&идалити", 1477, 196, 214, 60, 14, WS_GROUP CONTROL "", 1479, "STATIC", SS_ETCHEDHORZ, 7, 233, 249, 1 PUSHBUTTON "OK", 1, 132, 242, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 196, 242, 60, 14 + PUSHBUTTON "Скасувати", 2, 196, 242, 60, 14 END 1469 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "& .", 1488, 24, 9, 116, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "ϳ & .", 1489, 24, 34, 206, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "& '.", 1490, 24, 59, 157, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "ϳ & '", 1491, 24, 83, 273, 10, NOT WS_TABSTOP - LTEXT "ϳ ISDN.", -1, 45, 21, 156, 8 - LTEXT "ϳ (VPN) .", -1, 45, 46, 266, 8 - LTEXT "ϳ , .", -1, 45, 71, 266, 8 - LTEXT "ϳ '.", -1, 45, 95, 266, 8 + AUTORADIOBUTTON "&Телефонне підключення до приватної мережі.", 1488, 24, 9, 116, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Підключення до віртуальної приватної мережі &через Інтернет.", 1489, 24, 34, 206, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "&Пряме підключення до іншого комп'ютера.", 1490, 24, 59, 157, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Підключення до мережі через &високошвидкісне з'єднання", 1491, 24, 83, 273, 10, NOT WS_TABSTOP + LTEXT "Підключення через модем або адаптер ISDN.", -1, 45, 21, 156, 8 + LTEXT "Підключення через віртуальну приватну мережу (VPN) або тунель через Інтернет.", -1, 45, 46, 266, 8 + LTEXT "Підключення через послідовний, паралельний або інфрачервоний порт.", -1, 45, 71, 266, 8 + LTEXT "Підключення через високошвидкісне з'єднання.", -1, 45, 95, 266, 8 END 1480 DIALOGEX 0, 0, 230, 61 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Редактор номера телефону" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", 1481, 7, 7, 218, 8 + LTEXT "&Введіть новий номер телефону:", 1481, 7, 7, 218, 8 EDITTEXT 1482, 7, 17, 217, 15, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 99, 40, 60, 14 - PUSHBUTTON "", 2, 163, 40, 60, 14 + PUSHBUTTON "Скасувати", 2, 163, 40, 60, 14 END 1481 DIALOGEX 0, 0, 321, 157 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Майстер нових підключень" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ' , . ( ' , .)", 1689, 10, 4, 308, 25 - LTEXT "&:", 1636, 23, 35, 89, 15 + LTEXT "Введіть ім'я й пароль для облікового запису постачальника послуг Інтернету, запишіть їх і зберігайте в безпечному місці. (Якщо ви забули існуючі ім'я облікового запису або пароль, зверніться до постачальника.)", 1689, 10, 4, 308, 25 + LTEXT "&Користувач:", 1636, 23, 35, 89, 15 EDITTEXT 1614, 115, 34, 190, 15, ES_AUTOHSCROLL - LTEXT "&:", 1637, 23, 55, 90, 13 + LTEXT "Парол&ь:", 1637, 23, 55, 90, 13 EDITTEXT 1615, 115, 54, 190, 15, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&ϳ:", 1638, 23, 74, 88, 13 + LTEXT "&Підтвердження:", 1638, 23, 74, 88, 13 EDITTEXT 1616, 115, 73, 190, 15, ES_PASSWORD | ES_AUTOHSCROLL - AUTOCHECKBOX "& ' - '", 1596, 23, 91, 291, 17, BS_LEFT | BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ", 1595, 23, 112, 288, 14 - AUTOCHECKBOX "& ", 1682, 23, 133, 290, 14 + AUTOCHECKBOX "Викори&стовувати такі ім'я користувача й пароль при підключенні будь-кого з цього комп'ютера", 1596, 23, 91, 291, 17, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Використовувати це підключення до Інтернету за замовчуванням", 1595, 23, 112, 288, 14 + AUTOCHECKBOX "&Увімкнути брандмауер для цього підключення", 1682, 23, 133, 290, 14 END 1660 DIALOGEX 0, 0, 258, 78 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Брандмауер підключення до Інтернету" FONT 8, "MS Shell Dlg" BEGIN ICON 32515, -1, 7, 7, 20, 20 - LTEXT " ' . ?", -1, 44, 5, 212, 24 - AUTOCHECKBOX "& ", 1662, 42, 40, 210, 10 - DEFPUSHBUTTON "&", 6, 74, 60, 50, 14 - PUSHBUTTON "&ͳ", 7, 128, 60, 50, 14 + LTEXT "Вимкнення брандмауера підключення до Інтернету може відкрити ваш комп'ютер для несанкціонованого доступу через Інтернет. Ви дійсно бажаєте вимкнути захист?", -1, 44, 5, 212, 24 + AUTOCHECKBOX "&Більше не показувати це вікно", 1662, 42, 40, 210, 10 + DEFPUSHBUTTON "&Так", 6, 74, 60, 50, 14 + PUSHBUTTON "&Ні", 7, 128, 60, 50, 14 END 7000 DIALOGEX 0, 0, 215, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "&:", -1, 7, 8, 90, 12, SS_CENTERIMAGE + LTEXT "&Користувач:", -1, 7, 8, 90, 12, SS_CENTERIMAGE EDITTEXT 7001, 101, 7, 108, 14, ES_AUTOHSCROLL - LTEXT "& ':", -1, 7, 26, 90, 12 + LTEXT "П&овне ім'я:", -1, 7, 26, 90, 12 EDITTEXT 7002, 101, 25, 108, 14, ES_AUTOHSCROLL - LTEXT "&:", -1, 7, 44, 90, 12 + LTEXT "Парол&ь:", -1, 7, 44, 90, 12 EDITTEXT 7003, 101, 43, 108, 14, ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "&ϳ:", -1, 7, 62, 91, 12 + LTEXT "&Підтвердження:", -1, 7, 62, 91, 12 EDITTEXT 7004, 101, 61, 108, 14, ES_PASSWORD | ES_AUTOHSCROLL PUSHBUTTON "OK", 1, 84, 82, 60, 14 - PUSHBUTTON "", 2, 149, 82, 60, 14 + PUSHBUTTON "Скасувати", 2, 149, 82, 60, 14 END 7005 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION "³ " +CAPTION "Відповідний виклик" FONT 8, "MS Shell Dlg" BEGIN - AUTORADIOBUTTON "& ", 7009, 9, 7, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& ", 7006, 9, 20, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - AUTORADIOBUTTON " & :", 7007, 9, 34, 217, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "&Заборонити зворотний виклик", 7009, 9, 7, 219, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "Доз&волити абонентові визначати номер зворотного виклику", 7006, 9, 20, 218, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + AUTORADIOBUTTON "Завжди викорис&товувати для зворотного виклику цей номер:", 7007, 9, 34, 217, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP EDITTEXT 7008, 19, 49, 204, 14, ES_AUTOHSCROLL | WS_GROUP END 7010 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 7, 4, 214, 110, WS_GROUP - LTEXT " :", -1, 17, 17, 195, 8 - LTEXT "&:", -1, 17, 29, 29, 8 + GROUPBOX "Вхідні підключення", -1, 7, 4, 214, 110, WS_GROUP + LTEXT "Дозволити вхідні підключення для таких пристроїв:", -1, 17, 17, 195, 8 + LTEXT "&Пристрої:", -1, 17, 29, 29, 8 CONTROL "", 7011, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x00004405, 17, 41, 193, 47, WS_EX_CLIENTEDGE - AUTOCHECKBOX "& ", 7012, 17, 96, 121, 10, BS_TOP | BS_MULTILINE | WS_GROUP - PUSHBUTTON "&", 7013, 145, 94, 65, 14, WS_GROUP - GROUPBOX "³ (VPN)", -1, 6, 122, 214, 49, WS_GROUP - AUTOCHECKBOX " & ' ", 7014, 17, 137, 195, 27, BS_TOP | BS_MULTILINE | WS_GROUP - AUTOCHECKBOX "ϳ & ", 7015, 12, 184, 209, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Багатоканальне підключення", 7012, 17, 96, 121, 10, BS_TOP | BS_MULTILINE | WS_GROUP + PUSHBUTTON "Влас&тивості", 7013, 145, 94, 65, 14, WS_GROUP + GROUPBOX "Віртуальна приватна мережа (VPN)", -1, 6, 122, 214, 49, WS_GROUP + AUTOCHECKBOX "Дозволити іншим ко&ристувачам робити приватні підключення до мого комп'ютера через тунель в Інтернеті або іншій мережі", 7014, 17, 137, 195, 27, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Після підключення показати значок &в області сповіщень", 7015, 12, 184, 209, 10, BS_TOP | BS_MULTILINE | WS_GROUP END 7016 DIALOGEX 0, 0, 265, 190 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " TCP/IP" +CAPTION "Властивості вхідних викликів TCP/IP" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 6, 5, 252, 32 - AUTOCHECKBOX " &", 7017, 20, 20, 228, 9, BS_LEFT | BS_TOP | BS_MULTILINE - GROUPBOX " TCP/IP", -1, 6, 42, 250, 122 - AUTORADIOBUTTON "& TCP/IP DHCP", 7019, 20, 54, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& TCP/IP", 7020, 20, 71, 231, 10, BS_TOP | BS_MULTILINE - LTEXT "&:", -1, 29, 88, 53, 8 + GROUPBOX "Доступ до мережі", -1, 6, 5, 252, 32 + AUTOCHECKBOX "Дозволити абонентам доступ до локальної ме&режі", 7017, 20, 20, 228, 9, BS_LEFT | BS_TOP | BS_MULTILINE + GROUPBOX "Призначення адрес TCP/IP", -1, 6, 42, 250, 122 + AUTORADIOBUTTON "Приз&начити адреси TCP/IP автоматично за допомогою DHCP", 7019, 20, 54, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Указати адреси TCP/IP", 7020, 20, 71, 231, 10, BS_TOP | BS_MULTILINE + LTEXT "&З:", -1, 29, 88, 53, 8 CONTROL "", 7018, "RASIPADDRESS", WS_GROUP | WS_TABSTOP, 90, 85, 103, 13 - LTEXT "&:", -1, 29, 105, 53, 8 + LTEXT "&По:", -1, 29, 105, 53, 8 CONTROL "", 7021, "RASIPADDRESS", WS_GROUP | WS_TABSTOP, 90, 102, 103, 13 - LTEXT ":", -1, 29, 124, 53, 10 + LTEXT "Усього:", -1, 29, 124, 53, 10 LTEXT "", 7024, 90, 121, 150, 14, 0, WS_EX_STATICEDGE - AUTOCHECKBOX "& IP-", 7022, 20, 144, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "&Дозволити абоненту вказати свою IP-адресу", 7022, 20, 144, 231, 10, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 133, 169, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 197, 169, 60, 14 + PUSHBUTTON "Скасувати", 2, 197, 169, 60, 14 END 7025 DIALOGEX 0, 0, 250, 157 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " IPX" +CAPTION "Властивості вхідних викликів IPX" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ", -1, 8, 6, 234, 32 - AUTOCHECKBOX " &", 7032, 18, 19, 194, 12, BS_LEFT | BS_TOP | BS_MULTILINE - GROUPBOX " ", -1, 8, 43, 234, 87 - AUTOCHECKBOX "& '", 7028, 17, 56, 203, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& ", 7026, 28, 68, 191, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& :", 7027, 28, 81, 189, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + GROUPBOX "Доступ до мережі", -1, 8, 6, 234, 32 + AUTOCHECKBOX "Дозволити абонентам доступ до локальної ме&режі", 7032, 18, 19, 194, 12, BS_LEFT | BS_TOP | BS_MULTILINE + GROUPBOX "Призначення номера мережі", -1, 8, 43, 234, 87 + AUTOCHECKBOX "&Призначити один номер мережі всім комп'ютерам", 7028, 17, 56, 203, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "Приз&начати номери мереж автоматично", 7026, 28, 68, 191, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Указати номери мереж:", 7027, 28, 81, 189, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP EDITTEXT 7029, 40, 92, 154, 14, ES_UPPERCASE | WS_GROUP - AUTOCHECKBOX " & ", 7031, 17, 113, 208, 11, BS_TOP | BS_MULTILINE | WS_GROUP + AUTOCHECKBOX "Дозволити &абонентам указувати свої номери вузлів", 7031, 17, 113, 208, 11, BS_TOP | BS_MULTILINE | WS_GROUP DEFPUSHBUTTON "OK", 1, 116, 136, 60, 14, WS_GROUP - PUSHBUTTON "", 2, 181, 136, 60, 14 + PUSHBUTTON "Скасувати", 2, 181, 136, 60, 14 END 7033 DIALOGEX 0, 0, 220, 50 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Властивості протоколів" FONT 8, "MS Shell Dlg" BEGIN - AUTOCHECKBOX "& ", 7034, 7, 7, 208, 18, BS_LEFT | BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Дозволити абонентам доступ до локальної мережі", 7034, 7, 7, 208, 18, BS_LEFT | BS_TOP | BS_MULTILINE DEFPUSHBUTTON "OK", 1, 86, 30, 60, 14 - PUSHBUTTON "", 2, 151, 30, 60, 14 + PUSHBUTTON "Скасувати", 2, 151, 30, 60, 14 END 7035 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Мережа" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 217, 9 + LTEXT "&Мережні компоненти:", -1, 7, 7, 217, 9 CONTROL "", 7036, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 7, 17, 215, 89, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 7037, 9, 110, 67, 14, WS_GROUP - PUSHBUTTON "&", 7038, 80, 110, 67, 14, WS_GROUP - PUSHBUTTON "&", 7039, 153, 110, 67, 14, WS_GROUP - GROUPBOX "", -1, 7, 138, 213, 69 + PUSHBUTTON "&Установити...", 7037, 9, 110, 67, 14, WS_GROUP + PUSHBUTTON "&Видалити", 7038, 80, 110, 67, 14, WS_GROUP + PUSHBUTTON "Влас&тивості", 7039, 153, 110, 67, 14, WS_GROUP + GROUPBOX "Опис", -1, 7, 138, 213, 69 LTEXT "", 7040, 17, 150, 193, 48 END 7042 DIALOGEX 0, 0, 230, 215 STYLE DS_SHELLFONT | DS_CONTEXTHELP | WS_CHILD | WS_CAPTION -CAPTION "" +CAPTION "Користувачі" FONT 8, "MS Shell Dlg" BEGIN - LTEXT ", &:", -1, 7, 5, 213, 8 + LTEXT "Користувачі, яким дозволено &підключатися:", -1, 7, 5, 213, 8 CONTROL "", 7043, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 7, 19, 214, 83, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 7044, 7, 107, 67, 14, WS_GROUP - PUSHBUTTON "&", 7045, 80, 107, 67, 14, WS_GROUP - PUSHBUTTON "&", 7046, 153, 107, 67, 14, WS_GROUP - AUTOCHECKBOX "& .", 7048, 8, 151, 217, 12, BS_TOP | BS_MULTILINE - AUTOCHECKBOX "& ', , ', .", 7049, 8, 169, 217, 23, BS_TOP | BS_MULTILINE - LTEXT " , , .", -1, 9, 126, 212, 23 + PUSHBUTTON "&Новий...", 7044, 7, 107, 67, 14, WS_GROUP + PUSHBUTTON "В&идалити", 7045, 80, 107, 67, 14, WS_GROUP + PUSHBUTTON "Влас&тивості", 7046, 153, 107, 67, 14, WS_GROUP + AUTOCHECKBOX "&Усі користувачі повинні тримати в секреті свої паролі й дані.", 7048, 8, 151, 217, 12, BS_TOP | BS_MULTILINE + AUTOCHECKBOX "&Завжди дозволяти пристроям із прямим з'єднанням, наприклад, кишеньковим комп'ютерам, підключення без пароля.", 7049, 8, 169, 217, 23, BS_TOP | BS_MULTILINE + LTEXT "Інші фактори, такі як вимкнення облікового запису, можуть перешкодити підключенню користувача.", -1, 9, 126, 212, 23 END 7049 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , '. , , .", -1, 10, 1, 275, 27 - LTEXT ", &:", -1, 10, 28, 275, 8 + LTEXT "Установіть прапорці поруч із користувачами, яким слід дозволити підключатися до цього комп'ютера. Інші фактори, такі як вимкнення облікового запису, можуть перешкодити підключенню користувача.", -1, 10, 1, 275, 27 + LTEXT "Користувачі, яким дозволено &підключатися:", -1, 10, 28, 275, 8 CONTROL "", 7043, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 10, 42, 275, 73 - PUSHBUTTON "&...", 7044, 10, 122, 65, 14, WS_GROUP - PUSHBUTTON "&", 7045, 79, 122, 65, 14, WS_GROUP - PUSHBUTTON "&", 7046, 147, 122, 65, 14, WS_GROUP + PUSHBUTTON "&Додати...", 7044, 10, 122, 65, 14, WS_GROUP + PUSHBUTTON "В&идалити", 7045, 79, 122, 65, 14, WS_GROUP + PUSHBUTTON "Влас&тивості", 7046, 147, 122, 65, 14, WS_GROUP END 7050 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , .", -1, 10, 4, 299, 10 - LTEXT "& :", -1, 10, 16, 275, 8 + LTEXT "Установіть прапорці поруч із пристроями, які потрібно використовувати для вхідних підключень.", -1, 10, 4, 299, 10 + LTEXT "&Пристрої для підключення:", -1, 10, 16, 275, 8 CONTROL "", 7011, "SYSLISTVIEW32", WS_BORDER | WS_GROUP | WS_TABSTOP | 0x0000440D, 10, 26, 297, 87 - PUSHBUTTON "&", 7013, 243, 120, 65, 14, WS_GROUP + PUSHBUTTON "Влас&тивості", 7013, 243, 120, 65, 14, WS_GROUP END 7051 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , .", -1, 10, 1, 288, 20 - LTEXT "& :", -1, 10, 24, 274, 8 + LTEXT "Установіть прапорці поруч із назвами мережних програм, які слід дозволити для вхідних підключень.", -1, 10, 1, 288, 20 + LTEXT "&Мережне програмне забезпечення:", -1, 10, 24, 274, 8 CONTROL "", 7036, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000440D, 10, 34, 286, 33 - PUSHBUTTON "&...", 7037, 108, 71, 60, 14, WS_GROUP - PUSHBUTTON "&", 7038, 172, 71, 60, 14, WS_GROUP - PUSHBUTTON "&", 7039, 236, 71, 60, 14, WS_GROUP + PUSHBUTTON "&Установити...", 7037, 108, 71, 60, 14, WS_GROUP + PUSHBUTTON "В&идалити", 7038, 172, 71, 60, 14, WS_GROUP + PUSHBUTTON "Влас&тивості", 7039, 236, 71, 60, 14, WS_GROUP LTEXT "", 7040, 21, 105, 273, 38 - LTEXT ":", -1, 21, 95, 275, 8 + LTEXT "Опис:", -1, 21, 95, 275, 8 END 7052 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "³ , ' ' IP- .", -1, 10, 4, 290, 20 - AUTORADIOBUTTON "& ", 7053, 29, 63, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP - AUTORADIOBUTTON "& ", 7054, 29, 78, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP - LTEXT " '?", -1, 17, 49, 275, 8 - LTEXT " VPN-, Windows , ' VPN-.", -1, 10, 25, 293, 25 + LTEXT "Віртуальні приватні підключення через Інтернет можливі, лише якщо ваш комп'ютер має відоме ім'я або IP-адресу в Інтернеті.", -1, 10, 4, 290, 20 + AUTORADIOBUTTON "Дозвол&ити віртуальні приватні підключення", 7053, 29, 63, 265, 10, BS_TOP | BS_MULTILINE | WS_GROUP + AUTORADIOBUTTON "&Заборонити віртуальні приватні підключення", 7054, 29, 78, 265, 10, BS_TOP | BS_MULTILINE | NOT WS_TABSTOP + LTEXT "Дозволити віртуальні приватні підключення до цього комп'ютера?", -1, 17, 49, 275, 8 + LTEXT " Якщо дозволити VPN-підключення, Windows змінить брандмауер підключення до Інтернету таким чином, що вашому комп'ютеру буде дозволено надсилати й отримувати VPN-пакети.", -1, 10, 25, 293, 25 END 7055 DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 23, 24, 275, 8 + LTEXT "&Пристрій для цього підключення:", -1, 23, 24, 275, 8 COMBOBOX 7056, 22, 36, 275, 125, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT " , , .", -1, 10, 4, 275, 17 - PUSHBUTTON "&", 7061, 232, 53, 65, 14, WS_GROUP + LTEXT "Усі пристрої, окрім вибраних, не будуть задіяні й можуть використовуватися для інших потреб.", -1, 10, 4, 275, 17 + PUSHBUTTON "Влас&тивості", 7061, 232, 53, 65, 14, WS_GROUP END 7379 DIALOGEX 0, 0, 317, 143 @@ -1826,556 +1826,556 @@ END 19900 DIALOGEX 0, 0, 156, 44 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "³ " +CAPTION "Віддалений доступ до мережі" FONT 8, "MS Shell Dlg" BEGIN ICON 563, 19901, 10, 10, 18, 20 - LTEXT " ...", 19902, 34, 16, 120, 8 + LTEXT "Очікується запуск служби...", 19902, 34, 16, 120, 8 END STRINGTABLE BEGIN - 187 "&ͳ, \0" - 188 " ( ) %1. ?\0" - 189 " \0" - 190 " \0" - 191 " \0" - 192 " \0" - 193 " ' .\0" - 194 " \n (NAT). \n . , \n \n . \n IP-.\0" - 195 " 0 9.\0" - 196 "' . '.\0" - 197 " %1 %2.\0" - 198 " DLL . , .\0" - 199 " .\n , '.\0" - 200 "\0" - 201 " .\0" - 202 " TCP/IP . ³ """", """", """".\0" - 203 " IPX . IPX, - ""ϳ"".\0" - 204 " ?\0" - 205 " %1 ?\0" - 206 "³ %1?\0" - 207 " ""%1"" . ?\0" - 208 " . ?\0" - 209 " ' ""%1"". \0" - 210 " ' , "" "" .\0" - 212 " .\0" - 213 " , """".\0" + 187 "&Ні, не набирати номер\0" + 188 "Ви (або програма) замовили відомості від %1. Яке підключення використати?\0" + 189 "Додати додатковий номер телефону\0" + 190 "Задіяти лише перший наявний пристрій\0" + 191 "Задіяти всі пристрої\0" + 192 "Задіяти лише необхідні пристрої\0" + 193 "Введіть ім'я користувача й пароль для віддаленого доступу до мережного домену.\0" + 194 "На цей час як протокол маршрутизації установлено протокол перетворення\nмережних адрес (NAT). Його слід вимкнути перед увімкненням спільного доступу\nдо підключення до Інтернету. Щоб видалити перетворення мережних адрес, відкрийте\nоснащення диспетчера маршрутизації й віддаленого доступу та виберіть\nмаршрутизатор у лівій області. Видаліть протокол перетворення мережних адрес\nзі списку протоколів IP-маршрутизації.\0" + 195 "Код міста повинен складатися лише з цифр від 0 до 9.\0" + 196 "Ім'я елемента повинно містити принаймні один непустий знак і не може починатися із крапки. Виберіть інше ім'я.\0" + 197 "Для цього поля слід вибрати значення в межах від %1 до %2.\0" + 198 "Не вдалося завантажити бібліотеку DLL спеціальної перевірки. Перевірте, чи правильно установлено пакет спеціальної перевірки.\0" + 199 "Вибране підключення було установлено багатопротокольним маршрутизатором.\nСкористайтеся засобом адміністрування маршрутизації та віддаленого доступу, щоб завершити зв'язок.\0" + 200 "Примітка\0" + 201 "Не вдалося налаштувати пакет спеціальної перевірки.\0" + 202 "Протокол TCP/IP не установлено або вимкнуто для маршрутизації та віддаленого доступу. Відкрийте на панелі керування значок ""Мережа"", перейдіть на сторінку ""Служби"", виберіть властивості служби маршрутизації та віддаленого доступу й натисніть кнопку ""Мережа"".\0" + 203 "Протокол IPX не установлено або вимкнуто для маршрутизації та віддаленого доступу. Щоб установити або ввімкнути IPX, відкрийте сторінку властивостей будь-якого підключення в папці ""Підключення"".\0" + 204 "Видалити вибрані пристрої з цього списку?\0" + 205 "Видалити %1 із телефонної книги?\0" + 206 "Відключитися від %1?\0" + 207 "Файл ""%1"" уже існує. Перезаписати його?\0" + 208 "У сценарії знайдено синтаксичні помилки. Показати журнал помилок?\0" + 209 "Установлено з'єднання з ""%1"". \0" + 210 "Щоб завершити зв'язок або перевірити стан поточного підключення, клацніть правою кнопкою миші значок ""Монітор віддаленого доступу"" на панелі завдань.\0" + 212 "Успішне підключення.\0" + 213 "Вибраний метод спеціальної перевірки слід ініціалізувати, натиснувши кнопку ""Властивості"".\0" 214 "lnk\0" - 215 " (*.rnk)\0" + 215 "Ярлики віддаленого доступу (*.rnk)\0" 216 "*.rnk\0" - 217 " \0" - 218 " ' %1. ...\0" - 219 " .\0" - 220 " .\0" - 221 " .\0" - 222 " .\0" - 223 "볺:\0" - 224 "\0" - 225 ":\0" - 226 ":\0" - 227 "( )\0" - 228 "ϳ&...\0" - 229 "&\0" - 230 "ϳ \0" - 231 " \0" + 217 "Створити ярлик віддаленого доступу\0" + 218 "Не вдалося зв'язатися з %1. Очікується повторне підключення...\0" + 219 "Не вдалося отримати дані про формування пакетів.\0" + 220 "Не вдалося отримати дані про порти.\0" + 221 "Не вдалося отримати дані про проекцію.\0" + 222 "Не вдалося завантажити список підключень.\0" + 223 "Клієнт:\0" + 224 "Подробиці\0" + 225 "Пристрій:\0" + 226 "Мережа:\0" + 227 "(немає підключення)\0" + 228 "Підкл&ючити...\0" + 229 "&Завершити\0" + 230 "Підключення віддаленого доступу\0" + 231 "Параметри модема установлені за замовчуванням\0" 232 "COM1\0" - 233 "³ \0" - 234 " \0" - 235 " ' .\0" - 236 " ' %1 . '.\0" - 237 " .\0" - 238 " \0" - 239 " .\0" - 240 "\0" - 241 "& :\0" - 242 " \0" - 243 " \0" - 244 " , .\0" - 245 " , . .\0" - 246 " .\n\n ""OK"", .\0" - 247 " / ReactOS .\0" - 248 " X.25 .\0" - 249 " %1: %2\0" - 250 "%1\n\n %2: %3\0" - 251 "%1\n\n %2: %3\nij: %4\0" - 252 "%1\n\n %2: %3\n : %4\0" - 253 "%1\n\n %2: %3\n\n F1.\0" - 254 "%1\n\n %2: %3\n': %4\0" + 233 "Віддалений маршрутизатор\0" + 234 "Модем або інший пристрій\0" + 235 "Введіть ім'я облікового запису для цього інтерфейсу на віддаленому маршрутизаторі.\0" + 236 "Елемент з ім'ям %1 уже існує. Виберіть інше ім'я.\0" + 237 "Ви можете дозволити надсилання вашого пароля без шифрування.\0" + 238 "Шифрування пароля\0" + 239 "Майстер готовий створити нове підключення.\0" + 240 "Завершено\0" + 241 "&Номер телефону:\0" + 242 "Час зворотного виклику\0" + 243 "Змінити додатковий номер телефону\0" + 244 "Оскільки це підключення зараз активне, зміни деяких параметрів наберуть сили лише за наступного набору номера.\0" + 245 "Немає підключень, доступних для всіх користувачів. Перед набором номера слід ввійти до системи.\0" + 246 "Телефонна книга пуста.\n\nНатисніть кнопку ""OK"", щоб додати елемент.\0" + 247 "Внаслідок обмежень на імпорт/експорт шифрування даних у цій версії ReactOS не підтримується.\0" + 248 "Введіть адресу X.25 на наступному екрані.\0" + 249 "Помилка %1: %2\0" + 250 "%1\n\nПомилка %2: %3\0" + 251 "%1\n\nПомилка %2: %3\nДіагностика: %4\0" + 252 "%1\n\nПомилка %2: %3\nКод помилки: %4\0" + 253 "%1\n\nПомилка %2: %3\n\nДля отримання додаткових відомостей натисніть клавішу F1.\0" + 254 "%1\n\nПомилка %2: %3\nІм'я: %4\0" 255 "%1\n\n%4\0" - 256 "%1\n\n %2: %3\n³: %4\0" - 257 " : 0x%1\n\0" - 258 "': %1\n\0" - 259 "%1 %2: %3\n\0" - 260 "%1 .\n\0" - 261 " , .\0" - 262 " \0" - 263 " ""%1"", """".\0" + 256 "%1\n\nПомилка %2: %3\nВідповідь: %4\0" + 257 "Код помилки: 0x%1\n\0" + 258 "Ім'я: %1\n\0" + 259 "%1 протокол повідомляє про помилку %2: %3\n\0" + 260 "%1 протокол успішно підключено.\n\0" + 261 "Можна вибрати, який протокол віддаленого доступу слід використовувати.\0" + 262 "Виберіть протокол віддаленого доступу\0" + 263 "Щоб зберегти ""%1"", натисніть кнопку ""Готово"".\0" 264 "netcfg.hlp\0" - 265 "& \0" - 266 "& :\0" - 267 " &:\0" - 268 " \0" - 269 " IP-.\0" - 270 "IP-\0" - 271 " TCP/IP . ³ """", """", """".\0" + 265 "&Перемістити вдалий номер на початок списку при підключенні\0" + 266 "&Новий номер телефону:\0" + 267 "Номери &телефонів:\0" + 268 "Номери телефонів\0" + 269 "Можна ввести фіксовану IP-адресу.\0" + 270 "IP-адреса\0" + 271 "Протоколи TCP/IP не установлені або вимкнуті для віддаленого доступу. Відкрийте на панелі керування значок ""Мережа"", перейдіть на сторінку ""Служби"", виберіть властивості служби віддаленого доступу й натисніть кнопку ""Мережа"".\0" 272 "TCP/IP\0" - 273 "IPSec, \0" - 274 "IPX/SPX \0" - 275 " ( )\0" + 273 "IPSec, політика за замовчуванням\0" + 274 "IPX/SPX або сумісний\0" + 275 " (поточне розташування)\0" 276 "ISDN\0" - 277 " ISDN \0" - 278 "64 ()\0" - 279 "56 ()\0" - 280 "56 ()\0" - 281 " .\0" - 282 " \0" + 277 "Усі доступні лінії ISDN багатоканальні\0" + 278 "64К (цифровий)\0" + 279 "56К (цифровий)\0" + 280 "56К (голосовий)\0" + 281 "Може знадобитися особлива процедура перед підключенням.\0" + 282 "Виберіть параметри входу до системи\0" 283 "%d%%\0" - 284 " %s\0" - 285 "& :\0" - 286 "&:\0" - 287 "\0" - 288 " .\0" - 289 " \0" - 290 "' ' PPP.\0" - 291 "\0" - 292 " .\0" - 293 " MS Point-to-Point, RSA/RC4, 128 \0" - 294 " MS Point-to-Point, RSA/RC4, 40 \0" - 295 " \0" - 296 "( """")\0" - 297 " DNS WINS.\0" - 298 " \0" - 299 " RAS\0" + 284 "Номер телефону для %s\0" + 285 "&Нове розташування:\0" + 286 "&Розташування:\0" + 287 "Розташування\0" + 288 "Цей пристрій буде використано для підключення.\0" + 289 "Виберіть пристрій\0" + 290 "Об'єднання ліній у в'язку можливе лише за підключення до сервера PPP.\0" + 291 "Модем\0" + 292 "Цей модем не установлено.\0" + 293 "Шифрування MS Point-to-Point, RSA/RC4, 128 біт\0" + 294 "Шифрування MS Point-to-Point, RSA/RC4, 40 біт\0" + 295 "Декілька ліній\0" + 296 "(натисніть кнопку ""Налаштувати"")\0" + 297 "Можна ввести фіксовані адреси DNS і WINS.\0" + 298 "Адреси серверів імен\0" + 299 "Рання версія RAS\0" 300 "PPP\0" - 301 " PPP\0" + 301 "Багатоканальний PPP\0" 302 "SLIP\0" 303 "NetBEUI\0" - 304 " , .\0" - 305 " .\0" - 306 " .\0" - 307 " , .\0" - 308 " . """", .\0" - 309 " "" IP-"", IP-.\0" - 310 " X.25 X.25, X.25.\0" - 311 "()\0" - 312 "%1 .\0" - 313 " \0" - 314 " %1 , . ³ """", """", """".\0" - 315 " .\0" - 316 " .\0" - 317 " .\0" - 318 " .\0" - 319 " .\0" - 320 " .\0" - 321 " .\0" - 322 " RAS.\0" - 323 " .\0" - 324 " .\0" - 325 " script.log notepad.exe\0" - 326 " switch.inf notepad.exe\0" - 327 " TAPI.\0" - 328 " X.25.\0" - 329 " .\0" - 330 " .\0" - 331 " ' .\0" - 332 " /.\0" - 333 " .\0" - 334 " .\0" - 335 " .\0" - 336 " .\0" - 337 " .\0" - 338 " TAPI.\0" - 339 " .\0" - 340 " .\0" - 341 " . ?\0" - 342 " .\0" - 343 " .\0" - 344 " .\0" - 345 " \0" - 346 " .\0" - 347 "\0" - 348 " .\0" - 349 " \0" - 350 " .\0" - 351 " .\0" + 304 "Було створено особисту телефонну книгу, до якої скопійовано вміст системної телефонної книги.\0" + 305 "Не вибрано жодної іншої телефонної книги.\0" + 306 "Цей пристрій неможливо налаштувати динамічно.\0" + 307 "Цей елемент неможливо видалити, оскільки він зараз підключений.\0" + 308 "Не вибрано жодного елемента. Натисніть кнопку ""Створити"", щоб створити новий елемент.\0" + 309 "Якщо вибрано параметр ""укажіть IP-адресу"", слід указати ненульову IP-адресу.\0" + 310 "Якщо вибрано віддалене підключення до мережі X.25 або до пристрою X.25, слід указати адресу X.25.\0" + 311 "(немає)\0" + 312 "%1 уже є в списку.\0" + 313 "Захищати мої пароль і дані\0" + 314 "Протокол %1 неможливо вибрати, оскільки він не установлений або вимкнутий для віддаленого доступу. Відкрийте на панелі керування значок ""Мережа"", перейдіть на сторінку ""Служби"", виберіть властивості служби віддаленого доступу й натисніть кнопку ""Мережа"".\0" + 315 "Не вдалося зберегти пароль.\0" + 316 "Не вдалося показати дані.\0" + 317 "Не вдалося отримати дані про автоматичний набір номера.\0" + 318 "Не вдається завантажити діалогове вікно.\0" + 319 "Не вдається відключити спільний доступ.\0" + 320 "Не вдалося завантажити сторінку властивостей.\0" + 321 "Не вдалося завантажити телефонну книгу.\0" + 322 "Не вдалося завантажити дані про порт диспетчера RAS.\0" + 323 "Не вдалося прочитати настройки користувача з реєстру.\0" + 324 "Не вдалося завантажити дані про сценарій.\0" + 325 "Неможливо переглянути script.log за допомогою notepad.exe\0" + 326 "Неможливо змінити switch.inf за допомогою notepad.exe\0" + 327 "Не вдалося завантажити дані про TAPI.\0" + 328 "Не вдалося завантажити дані про X.25.\0" + 329 "Не вдалося створити нову телефонну книгу.\0" + 330 "Неможливо ввімкнути спільний доступ.\0" + 331 "Не вдалося з'єднатися з цим елементом телефонної книги.\0" + 332 "Не вдалося отримати буфер прийому/передачі.\0" + 333 "Не вдалося отримати дані про стан порту.\0" + 334 "Не вдалося отримати дані про протокол.\0" + 335 "Не вдалося отримати буфер від пристрою.\0" + 336 "Не вдалося надіслати буфер до пристрою.\0" + 337 "Не вдалося отримати дані.\0" + 338 "Не вдалося зберегти дані про TAPI.\0" + 339 "Не вдалося зберегти дані.\0" + 340 "Сценарій припинено.\0" + 341 "Сценарій припинено через помилку. Показати журнал помилок?\0" + 342 "Не вдалося установити дані про автоматичний набір номера.\0" + 343 "Не вдалося видалити збережений пароль.\0" + 344 "Не вдалося записати до телефонної книги.\0" + 345 "Записування параметрів до реєстру\0" + 346 "Не вдалося записати файл ярлика.\0" + 347 "ОК\0" + 348 "Укажіть номер телефону постачальника послуг Інтернету.\0" + 349 "Введіть номер телефону\0" + 350 "Пароль і підтвердження пароля не співпадають.\0" + 351 "Новий пароль і підтвердження нового пароля не співпадають.\0" 352 "pbk\0" - 353 " (*.pbk)\0" + 353 "Файли телефонної книги (*.pbk)\0" 354 "*.pbk\0" - 355 "³ \0" - 356 " \0" - 357 " \0" - 358 " \0" - 359 " \0" - 360 " \0" - 361 " \0" - 362 " .\0" - 363 " PPP, """" .\0" - 364 "& :\0" - 365 "&:\0" - 366 " \0" - 367 " .\n\n\0" - 368 " """", , """", '.\0" - 369 " %1 %2, PPP:\0" - 370 "[ , ]\0" - 405 " RAS NetBEUI.\0" - 406 " RAS, NetBEUI. """" .\0" - 407 "& \0" - 408 " . , .\n """", , ""ͳ"",\n . \n\n\n\n\n\n\0" - 409 " \0" - 410 " .\0" - 411 " , ""%1"" . ֳ . \n Win NT4/2000 ' ' . \n\n\n\n\n\n\0" + 355 "Відкрити телефонну книгу\0" + 356 "Скопіювати елемент телефонної книги\0" + 357 "Змінити елемент телефонної книги\0" + 358 "Створити елемент телефонної книги\0" + 359 "Номер телефону\0" + 360 "Номери телефонів\0" + 361 "Сетевые подключения\0" + 362 "Слід вибрати принаймні один мережний протокол.\0" + 363 "Щоб мати змогу підключатися до серверів PPP, слід установити мережний протокол за допомогою значка ""Мережа"" на панелі керування.\0" + 364 "&Новий префікс:\0" + 365 "&Префікси:\0" + 366 "Префікси номерів телефонів\0" + 367 "Один або декілька потрібних мережних протоколів не було успішно підключено.\n\n\0" + 368 "Натисніть кнопку ""Приймати"", щоб використовувати підключення як є, або кнопку ""Завершити"", щоб завершити зв'язок.\0" + 369 "Коли %1 установлює підключення на вимогу через інтерфейс %2, використовувати такі параметри протоколу PPP:\0" + 370 "[Щоб змінити збережений пароль, клацніть тут]\0" + 405 "Для виклику старих серверів RAS потрібен протокол NetBEUI.\0" + 406 "Щоб мати змогу підключатися до старих серверів RAS, слід установити протокол NetBEUI. Цей протокол можна установити за допомогою значка ""Мережа"" на панелі керування.\0" + 407 "&Повторний дзвінок\0" + 408 "Ви заборонили використання одного або декількох транспортних протоколів. Таким чином, диспетчери маршрутизації та протоколи маршрутизації для заборонених транспортних протоколів будуть видалені із цього інтерфейсу виклику на вимогу.\nНатисніть кнопку ""Так"", щоб підтвердити видалення, або кнопку ""Ні"",\nщоб дозволити транспорти. \n\n\n\n\n\n\0" + 409 "Спільний доступ до підключення до Інтернету\0" + 410 "Обліковий запис інтерфейсу виклику на вимогу.\0" + 411 "Слід указати облікові дані вихідного підключення, які використовуватимуться інтерфейсом ""%1"" для підключення до віддаленого маршрутизатора. Ці облікові дані мусять співпадати з обліковими даними вхідного підключення на цьому віддаленому маршрутизаторі. В разі підключення до \nмаршрутизатора Win NT4/2000 ім'я користувача також мусить співпадати з ім'ям інтерфейсу віддаленого маршрутизатора. \n\n\n\n\n\n\0" 412 "mpradmin.hlp\0" - 413 "& \0" - 414 "& :\0" - 415 "& :\0" - 416 " \0" + 413 "&Перемістити вдалий номер або адресу на початок списку при підключенні\0" + 414 "&Новий номер телефону або адреса:\0" + 415 "&Номери телефонів або адреси:\0" + 416 "Номери телефонів і адреси\0" 417 "PPP: Win 95/98/NT4/2000, Internet\0" - 418 "\0" - 419 "SLIP: Unix\0" - 420 " .\0" - 421 " ...\0" - 422 " ...\0" - 423 " ...\0" - 424 " '...\0" - 425 " ...\0" - 426 " ' ...\0" - 427 " ...\0" - 428 " ...\0" - 429 " .\0" - 430 "ϳ %1...\0" - 431 " ...\0" - 432 "ϳ ...\0" - 433 "ϳ ...\0" - 434 " %1...\0" - 435 "ϳ X.25 %1...\0" - 436 "ϳ %1...\0" - 437 " %1...\0" - 438 "ϳ .\0" - 439 " .\0" - 440 ".\0" - 441 "ϳ .\0" - 442 "ϳ .\0" - 443 "³ ...\0" - 444 "ϳ X.25 .\0" - 445 " .\0" - 446 "ϳ .\0" - 447 " .\0" - 448 "ϳ ...\0" - 449 " ...\0" - 450 " ...\0" - 451 "ϳ, ' \0" - 452 " .\0" - 453 " ...\0" - 454 " ...\0" - 455 " ?\0" + 418 "Немає\0" + 419 "SLIP: підключення Unix\0" + 420 "Усі пристрої підключено.\0" + 421 "Отримання результатів реєстрації...\0" + 422 "Надсилання відомостей зворотного виклику...\0" + 423 "Надсилання нового пароля...\0" + 424 "Обчислення швидкості зв'язку...\0" + 425 "Перевірка стану автентичності...\0" + 426 "Реєстрація комп'ютера в мережі...\0" + 427 "Повторна перевірка автентичності...\0" + 428 "Перевірка імені користувача й пароля...\0" + 429 "Перевірку виконано.\0" + 430 "Підключення через %1...\0" + 431 "Набір номера...\0" + 432 "Підключення модемів...\0" + 433 "Підключення через кабель...\0" + 434 "Набір номера %1...\0" + 435 "Підключення через X.25 до %1...\0" + 436 "Післяпідключення через %1...\0" + 437 "Передпідключення через %1...\0" + 438 "Підключення виконано.\0" + 439 "Пристрій підключений.\0" + 440 "Вимкнено.\0" + 441 "Підключення через модем виконано.\0" + 442 "Підключення через кабель виконано.\0" + 443 "Відкриття порту...\0" + 444 "Підключення через X.25 виконано.\0" + 445 "Порт відкритий.\0" + 446 "Післяпідключення закінчено.\0" + 447 "Передпідключення закінчено.\0" + 448 "Підготовка до зворотного виклику...\0" + 449 "Перевірка підключень мережних протоколів...\0" + 450 "Перевірка імені та пароля...\0" + 451 "Підключено, створення в'язки додаткових ліній\0" + 452 "Невідомий стан.\0" + 453 "Очікування зворотного виклику...\0" + 454 "Очікування скидання модема...\0" + 455 "Зберегти цю зміну номера телефону?\0" 456 "scp\0" 457 "*.scp\0" - 458 " (*.scp)\0" - 459 " \0" - 460 " .\0" - 461 " \0" - 462 " SLIP TCP/IP.\0" - 463 " SLIP, TCP/IP. """" .\0" - 464 "\0" - 465 "& :\0" - 466 "&:\0" - 467 " \0" - 468 " .\0" - 469 " \0" - 470 " \0" - 471 " \0" - 472 " \0" - 473 " SLIP\0" - 474 "10 \0" - 475 "10 \0" - 476 "1 \0" - 477 "1 \0" - 478 "24 \0" - 479 "2 \0" - 480 "2 \0" - 481 "30 \0" - 482 "30 \0" - 483 "3 \0" - 484 "4 \0" - 485 "4 \0" - 486 "5 \0" - 487 "5 \0" - 488 "8 \0" - 489 "\0" - 490 " .\0" - 491 " \0" - 492 "³ ' ?\0" - 493 " \0" - 494 " \0" - 495 " \0" + 458 "Файли сценарію комутації (*.scp)\0" + 459 "Огляд сценаріїв комутації\0" + 460 "Слід позначити принаймні один модем або адаптер.\0" + 461 "Номер телефону\0" + 462 "Для виклику старих серверів SLIP потрібен протокол TCP/IP.\0" + 463 "Щоб мати змогу підключатися до старих серверів SLIP, слід установити протокол TCP/IP. Цей протокол можна установити за допомогою значка ""Мережа"" на панелі керування.\0" + 464 "Стан\0" + 465 "&Новий суфікс:\0" + 466 "&Суфікси:\0" + 467 "Суфікси номерів телефонів\0" + 468 "При потребі можна виконати особливу настройку.\0" + 469 "Особливі параметри\0" + 470 "Термінал вводу команд модема\0" + 471 "Термінал після набору номера\0" + 472 "Термінал до набору номера\0" + 473 "Термінал для входу SLIP\0" + 474 "10 хвилин\0" + 475 "10 секунд\0" + 476 "1 година\0" + 477 "1 хвилина\0" + 478 "24 години\0" + 479 "2 години\0" + 480 "2 хвилини\0" + 481 "30 хвилин\0" + 482 "30 секунд\0" + 483 "3 секунди\0" + 484 "4 години\0" + 485 "4 хвилини\0" + 486 "5 хвилин\0" + 487 "5 секунд\0" + 488 "8 годин\0" + 489 "ніколи\0" + 490 "Нове підключення можна зробити доступним для всіх користувачів або лише для вас.\0" + 491 "Доступність підключення\0" + 492 "Відмовитися від параметрів багатоканального зв'язку для цього елемента?\0" + 493 "Недоступний пристрій\0" + 494 "Параметри входу\0" + 495 "Параметри віддаленого доступу\0" 496 "X.25\0" 497 "X.25 PAD\0" - 498 " ' ' .\0" - 499 " VPN-\0" - 500 " .\0" - 501 " ' VPN-.\0" - 502 " .\0" - 503 " \0" - 504 "ReactOS .\0" + 498 "Можна надати доступ до ресурсів комп'ютера іншим комп'ютерам за допомогою цього підключення віддаленого доступу.\0" + 499 "Вибір VPN-сервера\0" + 500 "Неможливо дозволити виклик на вимогу.\0" + 501 "Укажіть ім'я або адресу VPN-сервера.\0" + 502 "Неможливо заборонити виклик на вимогу.\0" + 503 "Публічна мережа\0" + 504 "ReactOS може спочатку підключати публічну мережу.\0" 505 "VPN1\0" - 506 " \0" - 507 " ' .\0" - 508 " ?\0" - 509 " ""%1"".\n\n ""%2"".\0" - 510 " ' ' ' .\0" - 511 " , IP- 192.168.0.1. ' ' ' . ' IP-, . ?\0" - 512 " \0" - 513 " .\0" - 514 "ϳ&\0" - 515 " \0" - 516 " \0" - 517 " MPPE-40\0" - 518 " MPPE-128\0" - 519 " MS-CHAP EAP.\0" - 520 " \0" - 521 "ϳ %1...\0" - 522 "' \0" - 523 "\0" + 506 "Спільний доступ до підключення до Інтернету\0" + 507 "Можна надати доступ до ресурсів іншим комп'ютерам у локальній мережі за допомогою цього підключення віддаленого доступу.\0" + 508 "Ведений або провідний?\0" + 509 "Спільний доступ до підключення до Інтернету вже дозволено для підключення ""%1"".\n\nНатомість буде дозволено спільний доступ для підключення ""%2"".\0" + 510 "Для з'єднання двох комп'ютерів слід визначити ваш комп'ютер як ведений або як провідний.\0" + 511 "Коли спільний доступ до підключення до Інтернету буде дозволено, мережній платі локальної мережі буде призначено IP-адресу 192.168.0.1. Через це ваш комп'ютер може втратити зв'язок з іншими комп'ютерами в мережі. Якщо ці комп'ютери мають статичні IP-адреси, слід налаштувати їх на використання динамічних адрес. Ви дійсно бажаєте дозволити спільний доступ до підключення до Інтернету?\0" + 512 "Виберіть пристрій\0" + 513 "Цей пристрій буде використано для підключення.\0" + 514 "Підкл&ючити\0" + 515 "Параметри шифрування визначаються сервером\0" + 516 "Завжди шифрувати мої дані\0" + 517 "Використовувати шифрування даних MPPE-40\0" + 518 "Використовувати шифрування даних MPPE-128\0" + 519 "Вибране шифрування потребує перевірки MS-CHAP або EAP.\0" + 520 "Особливе повідомлення перевірки\0" + 521 "Підключення до %1...\0" + 522 "Ім'я підключення\0" + 523 "Автоматичне\0" 524 "PPTP VPN\0" 525 "L2TP IPSec VPN\0" - 526 " .\0" - 527 " \0" + 526 "Виберіть тип підключення.\0" + 527 "Тип підключення\0" 528 "hh.exe netcfg.chm::/trouble_all.htm\0" - 529 "³ \0" - 530 " - , . .\0" - 531 " - . .\0" - 532 " ' .\0" - 533 " .\0" - 534 " 1 65535.\0" - 535 " , """".\0" - 536 " - . .\0" - 537 " .\0" - 538 " , """".\0" - 539 " .\n .\0" - 540 " .\0" - 541 " , .\0" - 542 "1 \0" - 543 " , .\0" - 549 " ' ', ?\0" - 576 "20 \0" - 579 " ' .\0" - 581 " \0" - 582 " ' .\0" - 583 " ' ' .\0" - 584 " ' .\0" - 585 " ' , .\0" - 586 " IP- .\0" - 587 " \0" - 588 "' . \n '.\0" - 589 "\0" - 1512 " \0" - 1523 " \0" - 1526 "-\0" - 1527 " - .\0" - 1528 " \0" - 1529 " .\0" + 529 "Віртуальне приватне підключення\0" + 530 "Використовувати будь-яку форму перевірки автентичності, включаючи незашифровані паролі. Не шифрувати дані.\0" + 531 "Використовувати будь-яку форму перевірки автентичності з шифруванням пароля. Не шифрувати дані.\0" + 532 "Введіть ім'я цього запису.\0" + 533 "Шифрувати паролі й дані.\0" + 534 "Введіть номер порту в межах від 1 до 65535.\0" + 535 "Укажіть спосіб спеціальної перевірки та шифрування даних, натиснувши кнопку ""Параметри"".\0" + 536 "Використовувати будь-яку форму перевірки автентичності з шифруванням пароля. Не шифрувати дані.\0" + 537 "Шифрувати паролі й дані.\0" + 538 "Укажіть спосіб спеціальної перевірки та шифрування даних, натиснувши кнопку ""Параметри"".\0" + 539 "Цей номер порту вже використовується іншим записом.\nВведіть інший номер порту.\0" + 540 "Введіть один або декілька портів для вхідних відповідей.\0" + 541 "Виберіть записи, які слід видалити.\0" + 542 "1 секунда\0" + 543 "Виберіть запис, який слід змінити.\0" + 549 "Яке ім'я комп'ютера, до якого ви підключаєтеся?\0" + 576 "20 хвилин\0" + 579 "Укажіть ім'я для цього підключення до робочого місця.\0" + 581 "Параметри мережного додатка\0" + 582 "Введіть ім'я для підключення в цьому полі.\0" + 583 "Введіть ім'я іншого комп'ютера в цьому полі.\0" + 584 "Введіть ім'я постачальника послуг Інтернету в цьому полі.\0" + 585 "Введіть ім'я служби, яка надає доступ до Інтернету.\0" + 586 "Введіть IP-адресу сервера у приватній мережі.\0" + 587 "Додаткові параметри\0" + 588 "Ім'я елемента починається із крапки або містить деякі неприпустимі знаки. \nВиберіть інше ім'я.\0" + 589 "Властивості\0" + 1512 "Послідовний порт\0" + 1523 " канал\0" + 1526 "Смарт-картки\0" + 1527 "Можна використовувати вашу смарт-картку для цього підключення.\0" + 1528 "Пряме підключення\0" + 1529 "Виберіть пристрій для цього підключення.\0" 1530 "Verdana Bold\0" 1531 "12\0" - 1532 " \0" - 1533 " , .\0" - 1534 " \0" - 1535 " .\0" - 1536 " \0" - 1537 " , .\0" - 1538 " \0" - 1539 " , .\0" - 1540 " \0" - 1541 " ' .\0" - 1544 "IP-\0" - 1545 "IP- .\0" - 1546 " \0" - 1547 " DNS WINS .\0" - 1548 " \0" - 1549 " .\0" - 1550 " \0" - 1551 "' , , .\0" - 1552 " \0" - 1553 "' , .\0" - 1554 "' \0" - 1555 " ' .\0" - 1556 " \0" - 1557 " %1 '. ?\0" - 1558 " SLIP.\0" - 1559 " \0" - 1560 " \0" - 1561 "-\0" - 1562 " .\0" - 1563 " ( ', )\0" - 1564 "' ( )\0" - 1565 "' ( ', )\0" - 1566 " ( ', )\0" - 1567 " ( )\0" - 1568 "³ \0" - 1569 " ' .\0" - 1570 " EAP . EAP, , .\0" - 1571 " EAP - MS-CHAP.\0" - 1572 " \0" - 1573 " .\0" - 1574 " PAP, SPAP / CHAP. , . ?\0" - 1575 " ""%1"", ""%2"". ϳ ""%2"" ?\0" - 1576 "ϳ ...\0" - 1577 "ϳ ...\0" - 1578 "ϳ .\0" - 1579 "ϳ .\0" - 1580 " , . .\0" - 1581 "& :\0" - 1582 " ' .\0" - 1583 "ֳ ' . ' , . ' , ?\0" - 1584 ", ' ' , .\0" - 1585 "³ \0" - 1586 " , , - .\0" - 1587 " , . , .\0" - 1588 " , .\0" - 1589 "³ :\r\n\r\n%1\0" - 1590 " %1\0" - 1591 "' \0" - 1592 " ' , .\0" - 1593 " ' .\0" + 1532 "Тип підключення\0" + 1533 "Виберіть тип інтерфейсу виклику на вимогу, який бажаєте створити.\0" + 1534 "Виберіть пристрій\0" + 1535 "Цей пристрій буде використано для підключення.\0" + 1536 "Номер телефону\0" + 1537 "Введіть номер телефону віддаленого сервера або маршрутизатора, який слід викликати.\0" + 1538 "Тип віртуальної приватної мережі\0" + 1539 "Виберіть тип інтерфейсу віртуальної приватної мережі, який бажаєте створити.\0" + 1540 "Адреса призначення\0" + 1541 "Укажіть ім'я або адресу віддаленого маршрутизатора.\0" + 1544 "IP-адреса\0" + 1545 "IP-адресу маршрутизатора для цього інтерфейсу.\0" + 1546 "Адреси серверів імен\0" + 1547 "Адреси DNS і WINS для цього інтерфейсу.\0" + 1548 "Сценарії маршрутизатора\0" + 1549 "Можна налаштовувати сценарії для підключення до віддаленого маршрутизатора.\0" + 1550 "Облікові дані вхідного підключення\0" + 1551 "Ім'я користувача й пароль, які використовуватиме віддалений маршрутизатор, підключаючись до цього сервера.\0" + 1552 "Облікові дані вихідного підключення\0" + 1553 "Ім'я користувача й пароль, які слід використовувати при підключенні до віддаленого маршрутизатора.\0" + 1554 "Ім'я інтерфейсу\0" + 1555 "Виберіть ім'я для цього нового інтерфейсу.\0" + 1556 "Немає доступних пристроїв\0" + 1557 "Обліковий запис користувача %1 уже існує на локальному комп'ютері. Чи повинен інтерфейс виклику на вимогу використовувати цей обліковий запис?\0" + 1558 "Параметри безпеки для підключень до серверів SLIP.\0" + 1559 "Незахищений пароль\0" + 1560 "Безпечний пароль\0" + 1561 "Смарт-картка\0" + 1562 "Слід вибрати принаймні один протокол перевірки пароля.\0" + 1563 "не дозволене (сервер розриватиме зв'язок, якщо потрібне шифрування)\0" + 1564 "необов'язкове (підключатися навіть без шифрування)\0" + 1565 "обов'язкове (розірвати зв'язок, якщо сервер працює без шифрування)\0" + 1566 "найстійкіше (розірвати зв'язок, якщо сервер працює без шифрування)\0" + 1567 " (шифрування ввімкнуто)\0" + 1568 "Відомості про обліковий запис Інтернету\0" + 1569 "Для облікового запису Інтернету буде потрібне ім'я облікового запису та пароль.\0" + 1570 "Вибраний пакет EAP не надає ключів шифрування. Виберіть пакет EAP, який надає ключі, або взагалі відмовтеся від шифрування.\0" + 1571 "Вибране шифрування потребує методів перевірки EAP або будь-якої версії MS-CHAP.\0" + 1572 "Протоколи та безпека\0" + 1573 "Виберіть транспортні протоколи та параметри безпеки для цього підключення.\0" + 1574 "Вибрані протоколи включають PAP, SPAP та/або CHAP. Якщо буде узгоджено використання одного з них, шифрування даних не виконуватиметься. Залишити ці параметри?\0" + 1575 "Щоб підключитися до ""%1"", спочатку слід підключитися до ""%2"". Підключитися до ""%2"" зараз?\0" + 1576 "Підключення через паралельний кабель...\0" + 1577 "Підключення через інфрачервоний канал...\0" + 1578 "Підключено через паралельний кабель.\0" + 1579 "Підключено через інфрачервоний канал.\0" + 1580 "Це підключення було налаштовано на використання шифрування даних зі стійкістю, яка не підтримується установленим програмним забезпеченням. Параметри безпеки цього підключення змінено на використання шифрування з доступним ступенем стійкості.\0" + 1581 "&Тип віртуальної приватної мережі:\0" + 1582 "Введіть ім'я користувача.\0" + 1583 "Ці ім'я та пароль будуть збережені для вас. Уже існують ім'я та пароль, збережені для всіх інших користувачів цього підключення. Видалити ім'я та пароль, збережені для всіх інших користувачів?\0" + 1584 "Наприклад, можна ввести ім'я робочого місця або ім'я сервера, до якого ви будете підключатися.\0" + 1585 "Відомості про обліковий запис\0" + 1586 "Елементи керування в цьому вікні властивостей вимкнуті, оскільки слід перезавантажити систему, перед тим як вносити будь-які зміни до настройки.\0" + 1587 "Елементи керування в цьому вікні властивостей вимкнуті, оскільки вже відкрито одне або декілька інших вікон властивостей мережі. Щоб скористатися цими елементами, закрийте всі вікна властивостей і відкрийте це вікно знову.\0" + 1588 "Деякі елементи керування в цьому вікні властивостей вимкнуті, оскільки ви не маєте достатніх прав на доступ до них.\0" + 1589 "Від постачальника служби доступу отримано таке повідомлення:\r\n\r\n%1\0" + 1590 "Перепідключення %1\0" + 1591 "Ім'я служби\0" + 1592 "Укажіть ім'я служби, яка забезпечує високошвидкісне підключення.\0" + 1593 "Для вашого облікового запису буде потрібно ім'я облікового запису та пароль.\0" 1594 "PPPOE1-0\0" - 1595 " PPP Ethernet (PPPoE)\0" - 1596 "& :\0" - 1611 " \0" - 1612 " , . \n .\0" - 1613 " \0" - 1634 " Windows (WMI) , ReactOS .\n\n , WMI. """" """", "" Windows"" """".\0" - 1635 "ReactOS . , Windows (WMI) . , ""³ "" ReactOS ( ). ""³ "" """" ( """").\0" - 1646 " \0" - 1647 " \0" - 1648 " \0" - 1649 " \0" - 1650 " \0" - 1651 " \0" - 1652 " \0" - 1653 " \0" - 1654 " \0" + 1595 "Протокол PPP через Ethernet (PPPoE)\0" + 1596 "&Тип створюваного високошвидкісного підключення:\0" + 1611 "Високошвидкісне підключення\0" + 1612 "Попередній спільний ключ вибрано для використання, але не введено. \nВведіть попередній ключ.\0" + 1613 "Не вдається надіслати облікові дані\0" + 1634 "Оскільки службу інструментарію керування Windows (WMI) було вимкнуто, ReactOS не може показати властивості цього підключення або домашньої мережі.\n\nЩоб налаштувати властивості підключення або домашньої мережі, слід спочатку ввімкнути службу WMI. Для цього на панелі керування ""Адміністрування"" двічі клацніть значок ""Служби"", клацніть правою кнопкою миші службу ""Інструментарій керування Windows"" і виберіть пункт ""Запустити"".\0" + 1635 "ReactOS не може показати властивості цього підключення. Можливо, дані інструментарію керування Windows (WMI) пошкоджені. Щоб виправити це, за допомогою засобу ""Відновлення системи"" відновіть попередній стан ReactOS (тобто поверніться до контрольної точки відновлення). Засіб ""Відновлення системи"" міститься в папці ""Службові"" (меню ""Стандартні"").\0" + 1646 "Дозволити вхідний запит луни\0" + 1647 "Дозволити вхідний запит мітки часу\0" + 1648 "Дозволити вхідний запит маски\0" + 1649 "Дозволити вхідний запит маршрутизатора\0" + 1650 "Дозволити недоступне вихідне місце призначення\0" + 1651 "Дозволити вимкнення вихідного джерела\0" + 1652 "Дозволити помилки у вихідних параметрах\0" + 1653 "Дозволити перевищення вихідного часу\0" + 1654 "Дозволити переспрямування\0" 1655 "log\0" 1656 "*.log\0" - 1657 " (*.log)\0" - 1658 "\0" - 1663 " \0" - 1664 " , . .\0" - 1665 ", ', . , , ' '.\0" - 1666 " , ', , .\0" - 1667 " ' , .\0" - 1668 " ' .\0" - 1669 ", ' , "" "".\0" - 1670 " ' , , .\0" - 1671 " ' , , "" "".\0" - 1672 " ' , "" "".\0" - 1673 ", ', , .\0" - 1675 " . 1 32767 .\0" - 1685 " . .\0" - 1686 " ' . ( ' , .)\0" - 1687 "&' '\0" - 1688 "& \0" - 1689 "&\0" - 1690 " ?\n\0" - 7301 " TCP/IP\0" - 7302 " %1 %2.\0" - 7306 " \0" - 7307 " \0" - 7308 " \0" - 7309 " \0" - 7310 " \0" - 7311 " \0" - 7312 " \0" - 7313 " TCP/IP \0" - 7314 " IPX \0" - 7315 " \0" - 7316 "\0" - 7317 "\0" - 7318 " \0" - 7319 " \0" - 7320 " \0" - 7321 " ' """".\0" - 7322 " .\0" - 7323 " . .\0" - 7324 " . \0" - 7325 " \0" - 7326 " . \0" - 7327 " . \0" - 7328 " .\0" - 7329 " , .\0" - 7330 " .\0" - 7331 " : .\0" - 7332 " , .\0" - 7333 " . \0" - 7334 " .\0" - 7335 " , """".\0" - 7336 " . \0" - 7337 " .\0" - 7338 " : .\0" - 7339 " . \0" - 7340 " .\0" - 7341 " .\0" - 7342 " TCP/IP. \0" - 7343 " IPX. \0" - 7344 " TCP/IP.\0" - 7345 " IPX.\0" - 7346 " TCP/IP . \0" - 7347 " IPX . \0" - 7348 " , . .\0" - 7349 " , .\0" - 7350 " , ' ( ). \0" - 7351 " . \0" - 7352 " , .\0" - 7353 " \0" - 7354 ", , , """". %s? \0" - 7355 " . ³ , . ?\0" - 7356 " . ϳ . , 255.255.0.0 ( ) , 255.0.255.0 - . \n\0" - 7357 " \0" - 7358 " , '.\0" - 7359 " \0" - 7360 " , ' .\0" - 7361 " (VPN)\0" - 7362 " ' ' ' VPN-\0" - 7363 " \0" - 7364 " ' ' .\0" - 7365 " \0" + 1657 "Файли журналу брандмауера (*.log)\0" + 1658 "Огляд\0" + 1663 "Виберіть підключення до приватної мережі\0" + 1664 "Щоб дозволити спільний доступ до підключення до Інтернету, слід вибрати підключення для приватної мережі. Виберіть підключення зі списку наявних підключень.\0" + 1665 "Повідомлення, надіслані на цей комп'ютер, будуть повернуті відправникові. Це звичайно використовується для пошуку несправностей, наприклад, для перевірки зв'язку з комп'ютером.\0" + 1666 "Отримання даних, надісланих на цей комп'ютер, може бути підтверджено повідомленням, в якому буде вказано дату та час прийому.\0" + 1667 "Цей комп'ютер отримуватиме та відповідатиме на запити про додаткову інформацію щодо мережі, до якої його підключено.\0" + 1668 "Цей комп'ютер відповідатиме на запити про інформацію щодо розпізнаних маршрутизаторів.\0" + 1669 "Дані, які були надіслані через Інтернет і не досягли цього комп'ютера помилково, будуть відкинуті з повідомленням ""місце призначення недоступне"".\0" + 1670 "Коли інтенсивність вхідного потоку перевищить можливості цього комп'ютера з обробки вхідних даних, дані будуть пропущені, а відправника попросять зменшити темп передачі.\0" + 1671 "Коли цей комп'ютер відкине дані, отримані з помилковим заголовком, він відповість відправникові повідомленням про помилку ""неправильний заголовок"".\0" + 1672 "Коли цей комп'ютер відкине незакінчену передачу даних через перевищення дозволеного часу передачі, він відповість відправникові повідомленням про помилку ""час минув"".\0" + 1673 "Дані, надіслані з цього комп'ютера, будуть переспрямовані, якщо маршрут за замовчуванням зміниться.\0" + 1675 "Введене значення розміру файлу журналу неприпустиме. Укажіть значення від 1 до 32767 КБ.\0" + 1685 "Ваш обліковий запис не має дозволу на використання цього підключення. Звичайно причиною цього буває вхід з обліковим записом гостя.\0" + 1686 "Введіть ім'я облікового запису й пароль. (Якщо ви забули існуючі ім'я облікового запису або пароль, зверніться до адміністратора мережі.)\0" + 1687 "&Ім'я комп'ютера\0" + 1688 "Ім&я постачальника послуг Інтернету\0" + 1689 "&Організація\0" + 1690 "Який номер телефону слід використовувати для цього підключення?\n\0" + 7301 "Властивості вхідних викликів TCP/IP\0" + 7302 "Для цього поля слід вибрати значення в межах від %1 до %2.\0" + 7306 "Помилка вхідних підключень\0" + 7307 "Загальна помилка вхідних підключень\0" + 7308 "Вхідні підключення\0" + 7309 "Мережна помилка вхідних підключень\0" + 7310 "Помилка багатоканального стану вхідних підключень\0" + 7311 "Помилка вхідних підключень\0" + 7312 "Помилка ініціалізації вхідних підключень\0" + 7313 "Помилка властивостей TCP/IP вхідних підключень\0" + 7314 "Помилка властивостей IPX вхідних підключень\0" + 7315 "Помилка вхідних підключень\0" + 7316 "Універсальний\0" + 7317 "Пристрій\0" + 7318 "Інші бази даних\0" + 7319 "База даних користувачів\0" + 7320 "База даних протоколів\0" + 7321 "Слід ввести ім'я входу до системи для нового користувача або натиснути кнопку ""Скасувати"".\0" + 7322 "Введений пароль занадто короткий.\0" + 7323 "Введені паролі неоднакові. Введіть їх знову.\0" + 7324 "Сталася внутрішня помилка. \0" + 7325 "Просмотр списка\0" + 7326 "Сталася помилка при спробі зафіксувати внесені зміни в базі даних локальних користувачів. \0" + 7327 "Ви не маєте достатніх прав на додання користувачів до бази даних локальної системи. \0" + 7328 "Такий користувач уже існує в базі даних локальних користувачів.\0" + 7329 "Користувача не додано до бази даних локальних користувачів, оскільки система відкинула введений пароль.\0" + 7330 "Не вдалося перезавантажити базу даних користувачів через внутрішню помилку.\0" + 7331 "Сталася внутрішня помилка: пошкоджено дескриптор бази даних локальних користувачів.\0" + 7332 "Неможливо завантажити ресурси, потрібні для показу вкладки користувачів.\0" + 7333 "Сталася внутрішня помилка при спробі відкоту внесених змін в базі даних локальних користувачів. \0" + 7334 "Дескриптор бази даних пристроїв пошкоджено.\0" + 7335 "Неможливо завантажити ресурси, потрібні для показу вкладки ""Загальні"".\0" + 7336 "Сталася помилка при спробі зафіксувати деякі внесені зміни настройки пристроїв або віртуальної приватної мережі. \0" + 7337 "Сталася внутрішня помилка.\0" + 7338 "Сталася внутрішня помилка: пошкоджено дескриптор бази даних мережних компонентів.\0" + 7339 "Сталася внутрішня помилка. \0" + 7340 "Сталася помилка при спробі зафіксувати внесені зміни настройки мережних компонентів.\0" + 7341 "Сталася внутрішня помилка.\0" + 7342 "Не вдалося зафіксувати внесені зміни настройки протоколу TCP/IP. \0" + 7343 "Не вдалося зафіксувати внесені зміни настройки протоколу IPX. \0" + 7344 "Неможливо показати вікно властивостей TCP/IP.\0" + 7345 "Неможливо показати вікно властивостей IPX.\0" + 7346 "Неможливо завантажити властивості TCP/IP із цієї системи. \0" + 7347 "Неможливо завантажити властивості IPX із цієї системи. \0" + 7348 "Вхідні підключення залежать від служби маршрутизації та віддаленого доступу, яку не вдалося запустити. Додаткові відомості містяться в журналі системних подій.\0" + 7349 "Зараз неможливо дозволити редагування мережних компонентів, оскільки вони вже змінюються ще кимсь.\0" + 7350 "Указаного нового користувача не додано до бази даних локальних користувачів, оскільки введені ім'я або пароль порушують системну політику (неправильний розмір або формат). \0" + 7351 "Неможливо видалити вказаного користувача. \0" + 7352 "Неможливо видалити вибраний мережний компонент, оскільки він зараз використовується.\0" + 7353 "Попередження вхідних підключень\0" + 7354 "Користувачі, яких ви видалите, будуть необоротно видалені із системи, навіть якщо потім натиснути кнопку ""Скасувати"". Ви дійсно бажаєте остаточно видалити %s? \0" + 7355 "Ви збираєтеся переключитися на консоль керування системою. Вікно властивостей вхідних підключень буде закрито, і усі внесені зміни наберуть сили. Продовжити?\0" + 7356 "Значення мережної маски було змінено. Після нульового біта в масці можуть стояти лише інші нульові біти. Наприклад, значення нульової маски 255.255.0.0 (у десятковій нотації) є припустимим, а значення 255.0.255.0 - ні. \n\0" + 7357 "Дозволи користувачів\0" + 7358 "Можна вказати користувачів, яким дозволено підключатися до цього комп'ютера.\0" + 7359 "Пристрої для вхідних підключень\0" + 7360 "Можна вибрати пристрої, які комп'ютер використовуватиме для приймання вхідних підключень.\0" + 7361 "Вхідне підключення до віртуальної приватної мережі (VPN)\0" + 7362 "Інший комп'ютер може з'єднатися з вашим комп'ютером через VPN-підключення\0" + 7363 "Мережне програмне забезпечення\0" + 7364 "Мережне програмне забезпечення дає змогу цьому комп'ютеру приймати підключення від комп'ютерів інших типів.\0" + 7365 "Завершення роботи майстра нових підключень\0" 7366 " \0" - 7367 " \0" - 7371 " , .\0" + 7367 "Вхідні підключення\0" + 7371 "Не установлено устаткування, здатного приймати вхідні дзвінки.\0" 7372 " \0" - 7373 "& :\0" - 7374 " & :\0" - 7375 " \0" - 7376 " \0" - 7377 " ?\0" - 7378 " , .\0" - 7379 " \0" - 7380 " Win 2000 Server , ' "" "". ?\n\0" - 7381 "& \0" - 7382 "& \0" - 7383 " IPX 00000000 FFFFFFFF. .\0" - 7384 "\0" - 7385 " (%s)\0" - 7386 " "" "" , . , .\0" - 7387 " .\0" - 7388 " ReactOS. ?\0" - 7389 " .\0" - 7390 " \0" - 7391 " ""%1"". """". , ' - '. , """"?\r\n\n "" '"", """" """". """" """".\0" - 7392 " '. . , """".\n\0" - 7393 " \0" - 7394 " IP- .\0" - 7395 " .\0" - 7396 " . 1.0.0.0 224.0.0.0 127.x.x.x.\0" - 7397 " TCP/IP , .\0" - 7398 " .\0" - 7399 " "" "". , "" "" . .\0" + 7373 "&Призначити вказаний номер мережі:\0" + 7374 "Призначати номери мереж по&слідовно з:\0" + 7375 "Новий користувач\0" + 7376 "Пристрій підключення\0" + 7377 "Який пристрій слід використовувати для цього підключення?\0" + 7378 "Не установлено устаткування, здатного приймати прямі підключення.\0" + 7379 "Попередження нового вхідного підключення\0" + 7380 "Оскільки цей сервер Win 2000 Server належить до домену або керує ним, слід налаштувати цей комп'ютер на приймання вхідних підключень за допомогою консолі ""Маршрутизація та віддалений доступ"". Скасувати зміни та перейти до цієї консолі?\n\0" + 7381 "Приз&начити номер мережі автоматично\0" + 7382 "Приз&начати номери мереж автоматично\0" + 7383 "Вхідні підключення не можуть видавати номери мереж IPX 00000000 або FFFFFFFF. Змініть призначений номер мережі або застосуйте автоматичне призначення номерів.\0" + 7384 "на\0" + 7385 "Послідовний порт (%s)\0" + 7386 "У вікні ""Мережні підключення"" не показані деякі спеціальні параметри вхідних підключень, установлені за допомогою консолей диспетчера локальних користувачів або політики віддаленого доступу. Щоб отримати вичерпні та правильні відомості про вхідні підключення, скористайтеся цими консолями.\0" + 7387 "Вибраний режим зворотного виклику користувача потребує введення правильного номера для зворотного виклику.\0" + 7388 "Для завершення операції необхідно перезавантажити ReactOS. Перезавантажити зараз?\0" + 7389 "Вибраний пристрій не має параметрів для настройки.\0" + 7390 "Неприпустимий діапазон\0" + 7391 "Ви вимагаєте заборонити вхідні підключення для ""%1"". Для цього слід зупинити службу ""Сервер"". Коли її буде зупинено, спільні папки або принтери цього комп'ютера будуть недоступні з будь-якого іншого комп'ютера. Викликати системну консоль, яка дає змогу зупинити службу ""Сервер""?\r\n\nВиберіть меню ""Керування комп'ютером"", потім ""Службові"" та ""Служби"". У правій області клацніть правою кнопкою миші значок ""Сервер"" і виберіть пункт ""Зупинити"".\0" + 7392 "Цей послідовний порт заборонено використовувати для прямого підключення до іншого комп'ютера. Його можна буде використовувати після завершення цього майстра. Потім можна буде налаштувати швидкість та інші параметри порту, клацнувши правою кнопкою миші значок цього підключення й вибравши пункт ""Властивості"".\n\0" + 7393 "Вхідні підключення\0" + 7394 "Указаний пул IP-адрес неправильний.\0" + 7395 "Указана маска підмережі неправильна.\0" + 7396 "Указана початкова адреса пула адрес неправильна. Вона повинна лежати в межах від 1.0.0.0 до 224.0.0.0 за винятком діапазону 127.x.x.x.\0" + 7397 "Указаний пул адрес TCP/IP неправильний, оскільки адреса виходить за межі маски.\0" + 7398 "Початкова адреса повинна бути меншою за кінцеву адресу.\0" + 7399 "Триває зупинення служби ""Маршрутизація та віддалений доступ"". Поки зупинення не буде остаточно виконане, параметр ""Вхідні підключення"" буде недоступним. Трохи зачекайте й повторіть спробу.\0" 7400 "%s (%s)\0" - 7401 "%s (: %d)\0" - 7402 " VPN- (PPTP)\0" - 7403 " VPN- (L2TP)\0" - 7404 "IP- (IKE)\0" + 7401 "%s (каналів: %d)\0" + 7402 "Вхідне VPN-підключення (PPTP)\0" + 7403 "Вхідне VPN-підключення (L2TP)\0" + 7404 "IP-безпека (IKE)\0" 7405 "127.0.0.1\0" - 7406 " \0" -29900 " .\0" -29901 " MPRAPI.DLL system32.\0" + 7406 "Ви не маєте достатніх прав на настройку вхідних підключень\0" +29900 "Неможливо завантажити службу диспетчера підключень віддаленого доступу.\0" +29901 "Не вдалося завантажити файл MPRAPI.DLL з папки system32.\0" END diff --git a/dll/win32/rasdlg/rasdlg.rc b/dll/win32/rasdlg/rasdlg.rc index 1af7f8e15b9..e01737eaaaa 100644 --- a/dll/win32/rasdlg/rasdlg.rc +++ b/dll/win32/rasdlg/rasdlg.rc @@ -37,6 +37,9 @@ #include "lang/de-DE.rc" #include "lang/en-US.rc" #include "lang/no-NO.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/riched20/CMakeLists.txt b/dll/win32/riched20/CMakeLists.txt index 60362843d05..cf636b6f0c7 100644 --- a/dll/win32/riched20/CMakeLists.txt +++ b/dll/win32/riched20/CMakeLists.txt @@ -1,11 +1,9 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(riched20.dll riched20.spec) + set_rc_compiler() list(APPEND SOURCE @@ -51,5 +49,4 @@ add_importlibs(riched20 ntdll) add_importlib_target(riched20.spec) - add_cd_file(TARGET riched20 DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/rpcrt4/CMakeLists.txt b/dll/win32/rpcrt4/CMakeLists.txt index e54607353f2..c2d585f166a 100644 --- a/dll/win32/rpcrt4/CMakeLists.txt +++ b/dll/win32/rpcrt4/CMakeLists.txt @@ -23,6 +23,10 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4.def) +if(MSVC) + list(APPEND SOURCE msvc.S) +endif() + remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) diff --git a/dll/win32/rpcrt4/msvc.S b/dll/win32/rpcrt4/msvc.S new file mode 100644 index 00000000000..b3d655c3a92 --- /dev/null +++ b/dll/win32/rpcrt4/msvc.S @@ -0,0 +1,18 @@ + +#include + +.code32 + +EXTERN _ObjectStubless@4:PROC + +PUBLIC _call_stubless_func +_call_stubless_func: + + push esp /* pointer to index */ + call _ObjectStubless@4 + pop edx /* args size */ + mov ecx, [esp] /* return address */ + add esp, edx + jmp ecx + +END diff --git a/dll/win32/rpcrt4/ndr_stubless.c b/dll/win32/rpcrt4/ndr_stubless.c index d6b9c5f90c2..fcd3fe50724 100644 --- a/dll/win32/rpcrt4/ndr_stubless.c +++ b/dll/win32/rpcrt4/ndr_stubless.c @@ -841,11 +841,12 @@ __declspec(naked) LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigne __asm { push ebp + mov ebp, esp push edi ; Save registers push esi - mov ebp, esp mov eax, [ebp+16] ; Get stack size sub esp, eax ; Make room in stack for arguments + and esp, 0xFFFFFFF0 mov edi, esp mov ecx, eax mov esi, [ebp+12] diff --git a/dll/win32/rpcrt4/rpc_epmap.c b/dll/win32/rpcrt4/rpc_epmap.c index 286ffbf9973..bf4b1baa43f 100644 --- a/dll/win32/rpcrt4/rpc_epmap.c +++ b/dll/win32/rpcrt4/rpc_epmap.c @@ -171,7 +171,7 @@ static RPC_STATUS get_epm_handle_server(RPC_BINDING_HANDLE *epm_handle) static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr) { - switch (GetExceptionCode()) + switch (__eptr->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_ILLEGAL_INSTRUCTION: @@ -396,7 +396,7 @@ RPC_STATUS WINAPI RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE status = get_epm_handle_client(Binding, &handle); if (status != RPC_S_OK) return status; - + status = TowerConstruct(&If->InterfaceId, &If->TransferSyntax, bind->Protseq, ((RpcBinding *)handle)->Endpoint, bind->NetworkAddr, &tower); diff --git a/dll/win32/rpcrt4/rpcrt4.spec b/dll/win32/rpcrt4/rpcrt4.spec index 4550889f62a..f724a44df07 100644 --- a/dll/win32/rpcrt4/rpcrt4.spec +++ b/dll/win32/rpcrt4/rpcrt4.spec @@ -53,7 +53,7 @@ @ stub I_RpcIfInqTransferSyntaxes @ stub I_RpcLogEvent @ stdcall I_RpcMapWin32Status(long) -@ stub I_RpcNegotiateTransferSyntax # wxp +@ stdcall I_RpcNegotiateTransferSyntax(ptr) # wxp @ stub I_RpcNsBindingSetEntryName @ stub I_RpcNsBindingSetEntryNameA @ stub I_RpcNsBindingSetEntryNameW @@ -194,7 +194,7 @@ @ stdcall NdrFullPointerQueryPointer(ptr ptr long ptr) @ stdcall NdrFullPointerQueryRefId(ptr long long ptr) @ stdcall NdrFullPointerXlatFree(ptr) -@ stdcall NdrFullPointerXlatInit(long long) +@ stdcall NdrFullPointerXlatInit(long long) @ stdcall NdrGetBuffer(ptr long ptr) @ stub NdrGetDcomProtocolVersion @ stub NdrGetPartialBuffer @@ -265,7 +265,7 @@ @ stdcall NdrRangeUnmarshall(ptr ptr ptr long) @ stub NdrRpcSmClientAllocate @ stub NdrRpcSmClientFree -@ stub NdrRpcSmSetClientToOsf +@ stdcall NdrRpcSmSetClientToOsf(ptr) @ stub NdrRpcSsDefaultAllocate @ stub NdrRpcSsDefaultFree @ stub NdrRpcSsDisableAllocate diff --git a/dll/win32/rsaenh/CMakeLists.txt b/dll/win32/rsaenh/CMakeLists.txt index 50904526195..49434499d74 100644 --- a/dll/win32/rsaenh/CMakeLists.txt +++ b/dll/win32/rsaenh/CMakeLists.txt @@ -1,8 +1,5 @@ -add_definitions( - -D__WINESRC__ - -D_DLL -D__USE_CRTIMP) - +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(rsaenh.dll rsaenh.spec) diff --git a/dll/win32/rsaenh/rsaenh.spec b/dll/win32/rsaenh/rsaenh.spec index e3ceb02bc0d..becbbd4058f 100644 --- a/dll/win32/rsaenh/rsaenh.spec +++ b/dll/win32/rsaenh/rsaenh.spec @@ -23,5 +23,5 @@ @ stdcall CPSetProvParam(long long ptr long) RSAENH_CPSetProvParam @ stdcall CPSignHash(long long long wstr long ptr ptr) RSAENH_CPSignHash @ stdcall CPVerifySignature(long long ptr long long wstr long) RSAENH_CPVerifySignature -@ stdcall -private DllRegisterServer() -@ stdcall -private DllUnregisterServer() +@ stdcall DllRegisterServer() +@ stdcall DllUnregisterServer() diff --git a/dll/win32/secur32/CMakeLists.txt b/dll/win32/secur32/CMakeLists.txt index 04ca218a1c6..a460f046863 100644 --- a/dll/win32/secur32/CMakeLists.txt +++ b/dll/win32/secur32/CMakeLists.txt @@ -14,16 +14,14 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/secur32.def ) -add_library(secur32 SHARED - ${CMAKE_CURRENT_BINARY_DIR}/secur32_precomp.h.gch - ${SOURCE}) +add_library(secur32 SHARED ${SOURCE}) set_module_type(secur32 win32dll) target_link_libraries(secur32 lsalib) add_importlibs(secur32 advapi32 msvcrt kernel32 ntdll) -add_pch(secur32 ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(secur32 precomp.h) add_cd_file(TARGET secur32 DESTINATION reactos/system32 FOR all) add_importlib_target(secur32.spec) diff --git a/dll/win32/serialui/lang/pl-PL.rc b/dll/win32/serialui/lang/pl-PL.rc index 7962c89d09a..25674707a02 100644 --- a/dll/win32/serialui/lang/pl-PL.rc +++ b/dll/win32/serialui/lang/pl-PL.rc @@ -1,8 +1,10 @@ -/** -* translated by Caemyr - Olaf Siejka -* caemyr@gmail.com -* https://sourceforge.net/projects/reactospl -*/ +/* + * translated by Caemyr - Olaf Siejka + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -22,7 +24,7 @@ BEGIN IDS_FC_CTSRTS, "CTS/RTS" IDS_FC_XONXOFF, "XON/XOFF" - IDS_TITLE, "Waciwoci dla: %s" + IDS_TITLE, "Właściwości dla: %s" END IDD_COMMDLG DIALOGEX 6,5,222,175 @@ -33,15 +35,14 @@ BEGIN CONTROL "",IDC_GRP1,"Button",0x50000007,6,5,210,146,0x00000000 CONTROL "Tak",IDC_OKBTN,"Button",0x50010000,98,156,56,13,0x00000000 CONTROL "Anuluj",IDC_CANCELBTN,"Button",0x50010000,158,156,56,13,0x00000000 - CONTROL "Prdko w bodach:",IDC_STC1,"Static",0x50000000,24,31,42,9,0x00000000 + CONTROL "Prędkość w bodach:",IDC_STC1,"Static",0x50000000,24,31,42,9,0x00000000 CONTROL "Bity danych:",IDC_STC2,"Static",0x50000000,24,53,42,9,0x00000000 - CONTROL "Kontrola parzystoci:",IDC_STC3,"Static",0x50000000,24,73,42,9,0x00000000 - CONTROL "Ilo bitw stopu:",IDC_STC4,"Static",0x50000000,24,96,42,9,0x00000000 - CONTROL "Kontrola przepywu:",IDC_STC5,"Static",0x50000000,24,120,42,9,0x00000000 + CONTROL "Kontrola parzystości:",IDC_STC3,"Static",0x50000000,24,73,42,9,0x00000000 + CONTROL "Ilość bitów stopu:",IDC_STC4,"Static",0x50000000,24,96,42,9,0x00000000 + CONTROL "Kontrola przepływu:",IDC_STC5,"Static",0x50000000,24,120,42,9,0x00000000 CONTROL "",IDC_BAUDRATE,"ComboBox",0x50210003,98,29,100,50,0x00000000 CONTROL "",IDC_BYTESIZE,"ComboBox",0x50210003,98,49,100,50,0x00000000 CONTROL "",IDC_PARITY,"ComboBox",0x50210003,98,72,100,50,0x00000000 CONTROL "",IDC_STOPBITS,"ComboBox",0x50210003,98,94,100,50,0x00000000 CONTROL "",IDC_FLOW,"ComboBox",0x50210003,98,116,100,50,0x00000000 END - diff --git a/dll/win32/serialui/lang/ru-RU.rc b/dll/win32/serialui/lang/ru-RU.rc index ace7b3db8e8..5be3eedfd18 100644 --- a/dll/win32/serialui/lang/ru-RU.rc +++ b/dll/win32/serialui/lang/ru-RU.rc @@ -2,21 +2,21 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE LOADONCALL DISCARDABLE BEGIN - IDS_EVENPARITY, "" - IDS_MARKPARITY, " (1)" + IDS_EVENPARITY, "Чет" + IDS_MARKPARITY, "Маркер (1)" IDS_NOPARITY, "No parity" - IDS_ODDPARITY, "" - IDS_SPACEPARITY, " (0)" + IDS_ODDPARITY, "Нечет" + IDS_SPACEPARITY, "Пробел (0)" IDS_ONESTOPBIT, "1 stop bit" IDS_ONE5STOPBITS, "1.5 stop bits" IDS_TWOSTOPBITS, "2 stop bits" - IDS_FC_NO, "" + IDS_FC_NO, "Нет" IDS_FC_CTSRTS, "CTS/RTS" IDS_FC_XONXOFF, "XON/XOFF" - IDS_TITLE, ": %s" + IDS_TITLE, "Свойства: %s" END IDD_COMMDLG DIALOGEX 6,5,222,175 @@ -26,12 +26,12 @@ EXSTYLE 0x00000001 BEGIN CONTROL "",IDC_GRP1,"Button",0x50000007,6,5,210,146,0x00000000 CONTROL "OK",IDC_OKBTN,"Button",0x50010000,98,156,56,14,0x00000000 - CONTROL "",IDC_CANCELBTN,"Button",0x50010000,158,156,56,14,0x00000000 - CONTROL "& (/):",IDC_STC1,"Static",0x50000000,16,31,80,9,0x00000000 - CONTROL "& :",IDC_STC2,"Static",0x50000000,16,53,80,9,0x00000000 - CONTROL "&:",IDC_STC3,"Static",0x50000000,16,73,80,9,0x00000000 - CONTROL "& :",IDC_STC4,"Static",0x50000000,16,96,80,9,0x00000000 - CONTROL "& :",IDC_STC5,"Static",0x50000000,16,120,80,9,0x00000000 + CONTROL "Отмена",IDC_CANCELBTN,"Button",0x50010000,158,156,56,14,0x00000000 + CONTROL "&Скорость (бит/с):",IDC_STC1,"Static",0x50000000,16,31,80,9,0x00000000 + CONTROL "&Биты данных:",IDC_STC2,"Static",0x50000000,16,53,80,9,0x00000000 + CONTROL "&Четность:",IDC_STC3,"Static",0x50000000,16,73,80,9,0x00000000 + CONTROL "С&топовые биты:",IDC_STC4,"Static",0x50000000,16,96,80,9,0x00000000 + CONTROL "&Управление потоком:",IDC_STC5,"Static",0x50000000,16,120,80,9,0x00000000 CONTROL "",IDC_BAUDRATE,"ComboBox",0x50210003,98,29,100,50,0x00000000 CONTROL "",IDC_BYTESIZE,"ComboBox",0x50210003,98,49,100,50,0x00000000 CONTROL "",IDC_PARITY,"ComboBox",0x50210003,98,72,100,50,0x00000000 diff --git a/dll/win32/serialui/lang/uk-UA.rc b/dll/win32/serialui/lang/uk-UA.rc index 3ee6f0904e0..b1048a95012 100644 --- a/dll/win32/serialui/lang/uk-UA.rc +++ b/dll/win32/serialui/lang/uk-UA.rc @@ -10,21 +10,21 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE LOADONCALL DISCARDABLE BEGIN - IDS_EVENPARITY, "" - IDS_MARKPARITY, "" - IDS_NOPARITY, " " - IDS_ODDPARITY, "" - IDS_SPACEPARITY, "" + IDS_EVENPARITY, "Парна" + IDS_MARKPARITY, "Маркер" + IDS_NOPARITY, "Без перевірки" + IDS_ODDPARITY, "Непарна" + IDS_SPACEPARITY, "Пробіл" - IDS_ONESTOPBIT, "1 " - IDS_ONE5STOPBITS, "1,5 " - IDS_TWOSTOPBITS, "2 " + IDS_ONESTOPBIT, "1 стоповий біт" + IDS_ONE5STOPBITS, "1,5 стопових біта" + IDS_TWOSTOPBITS, "2 стопових біта" - IDS_FC_NO, "" - IDS_FC_CTSRTS, " (CTS/RTS)" + IDS_FC_NO, "Немає" + IDS_FC_CTSRTS, "Апаратне (CTS/RTS)" IDS_FC_XONXOFF, "XON/XOFF" - IDS_TITLE, ": %s" + IDS_TITLE, "Властивості: %s" END IDD_COMMDLG DIALOGEX 6,5,222,175 @@ -34,12 +34,12 @@ EXSTYLE 0x00000001 BEGIN CONTROL "",IDC_GRP1,"Button",0x50000007,6,5,210,146,0x00000000 CONTROL "OK",IDC_OKBTN,"Button",0x50010000,98,156,56,13,0x00000000 - CONTROL "",IDC_CANCELBTN,"Button",0x50010000,158,156,56,13,0x00000000 - CONTROL " (/):",IDC_STC1,"Static",0x50000000,24,31,42,9,0x00000000 - CONTROL " :",IDC_STC2,"Static",0x50000000,24,53,42,9,0x00000000 - CONTROL ":",IDC_STC3,"Static",0x50000000,24,73,42,9,0x00000000 - CONTROL " :",IDC_STC4,"Static",0x50000000,24,96,42,9,0x00000000 - CONTROL " :",IDC_STC5,"Static",0x50000000,24,120,42,9,0x00000000 + CONTROL "Скасувати",IDC_CANCELBTN,"Button",0x50010000,158,156,56,13,0x00000000 + CONTROL "Швидкість (біт/с):",IDC_STC1,"Static",0x50000000,24,31,42,9,0x00000000 + CONTROL "Біти даних:",IDC_STC2,"Static",0x50000000,24,53,42,9,0x00000000 + CONTROL "Парність:",IDC_STC3,"Static",0x50000000,24,73,42,9,0x00000000 + CONTROL "Стопові біти:",IDC_STC4,"Static",0x50000000,24,96,42,9,0x00000000 + CONTROL "Керування потоком:",IDC_STC5,"Static",0x50000000,24,120,42,9,0x00000000 CONTROL "",IDC_BAUDRATE,"ComboBox",0x50210003,98,29,100,50,0x00000000 CONTROL "",IDC_BYTESIZE,"ComboBox",0x50210003,98,49,100,50,0x00000000 CONTROL "",IDC_PARITY,"ComboBox",0x50210003,98,72,100,50,0x00000000 diff --git a/dll/win32/serialui/serialui.rc b/dll/win32/serialui/serialui.rc index b015c0af101..da29ed52b85 100644 --- a/dll/win32/serialui/serialui.rc +++ b/dll/win32/serialui/serialui.rc @@ -18,6 +18,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/id-ID.rc" #include "lang/it-IT.rc" #include "lang/no-NO.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/setupapi/CMakeLists.txt b/dll/win32/setupapi/CMakeLists.txt index 0858278e369..4cd101c30ec 100644 --- a/dll/win32/setupapi/CMakeLists.txt +++ b/dll/win32/setupapi/CMakeLists.txt @@ -2,8 +2,6 @@ set_unicode() add_definitions( - -D_DLL - -D__USE_CRTIMP -D_SETUPAPI_ -D_CFGMGR32_ -Dwcsnicmp=_wcsnicmp) @@ -13,6 +11,7 @@ include_directories( ${REACTOS_BINARY_DIR}/include/reactos/idl) set_rc_compiler() + spec2def(setupapi.dll setupapi.spec) list(APPEND SOURCE @@ -58,6 +57,5 @@ add_importlibs(setupapi kernel32 ntdll) - add_cd_file(TARGET setupapi DESTINATION reactos/system32 FOR all) add_importlib_target(setupapi.spec) diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index 78709d3532c..482d711458e 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -83,25 +83,6 @@ RpcStatusToCmStatus(RPC_STATUS Status) } -/*********************************************************************** - * CMP_WaitNoPendingInstallEvents [SETUPAPI.@] - */ -DWORD WINAPI CMP_WaitNoPendingInstallEvents( - DWORD dwTimeout) -{ - HANDLE hEvent; - DWORD ret; - - hEvent = OpenEventW(SYNCHRONIZE, FALSE, L"Global\\PnP_No_Pending_Install_Events"); - if (hEvent == NULL) - return WAIT_FAILED; - - ret = WaitForSingleObject(hEvent, dwTimeout); - CloseHandle(hEvent); - return ret; -} - - /*********************************************************************** * CMP_Init_Detection [SETUPAPI.@] */ @@ -133,6 +114,22 @@ CONFIGRET WINAPI CMP_Init_Detection( } +/*********************************************************************** + * CMP_RegisterNotification [SETUPAPI.@] + */ +CONFIGRET +WINAPI +CMP_RegisterNotification(IN HANDLE hRecipient, + IN LPVOID lpvNotificationFilter, + IN DWORD dwFlags, + OUT PULONG pluhDevNotify) +{ + FIXME("Stub %p %p %lu %p\n", hRecipient, lpvNotificationFilter, dwFlags, pluhDevNotify); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return CR_FAILURE; +} + + /*********************************************************************** * CMP_Report_LogOn [SETUPAPI.@] */ @@ -179,6 +176,37 @@ CONFIGRET WINAPI CMP_Report_LogOn( } +/*********************************************************************** + * CMP_UnregisterNotification [SETUPAPI.@] + */ +CONFIGRET +WINAPI +CMP_UnregisterNotification(IN HDEVNOTIFY handle) +{ + FIXME("Stub %p\n", handle); + return CR_SUCCESS; +} + + +/*********************************************************************** + * CMP_WaitNoPendingInstallEvents [SETUPAPI.@] + */ +DWORD WINAPI CMP_WaitNoPendingInstallEvents( + DWORD dwTimeout) +{ + HANDLE hEvent; + DWORD ret; + + hEvent = OpenEventW(SYNCHRONIZE, FALSE, L"Global\\PnP_No_Pending_Install_Events"); + if (hEvent == NULL) + return WAIT_FAILED; + + ret = WaitForSingleObject(hEvent, dwTimeout); + CloseHandle(hEvent); + return ret; +} + + /*********************************************************************** * CMP_WaitServicesAvailable [SETUPAPI.@] */ @@ -595,8 +623,9 @@ CONFIGRET WINAPI CM_Create_DevNode_ExW( HSTRING_TABLE StringTable = NULL; LPWSTR lpParentDevInst; CONFIGRET ret = CR_SUCCESS; + WCHAR szLocalDeviceID[MAX_DEVICE_ID_LEN]; - FIXME("%p %s %p %lx %p\n", + TRACE("%p %s %p %lx %p\n", pdnDevInst, debugstr_w(pDeviceID), dnParent, ulFlags, hMachine); if (!pSetupIsUserAdmin()) @@ -605,7 +634,7 @@ CONFIGRET WINAPI CM_Create_DevNode_ExW( if (pdnDevInst == NULL) return CR_INVALID_POINTER; - if (pDeviceID == NULL || wcslen(pDeviceID) == 0) + if (pDeviceID == NULL || wcslen(pDeviceID) == 0 || wcslen(pDeviceID) >= MAX_DEVICE_ID_LEN) return CR_INVALID_DEVICE_ID; if (dnParent == 0) @@ -634,10 +663,12 @@ CONFIGRET WINAPI CM_Create_DevNode_ExW( if (lpParentDevInst == NULL) return CR_INVALID_DEVNODE; + wcscpy(szLocalDeviceID, pDeviceID); + RpcTryExcept { ret = PNP_CreateDevInst(BindingHandle, - pDeviceID, + szLocalDeviceID, lpParentDevInst, MAX_DEVICE_ID_LEN, ulFlags); @@ -1546,6 +1577,92 @@ CM_Get_Class_Name_ExW( } +/*********************************************************************** + * CM_Get_Class_Registry_PropertyA [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Class_Registry_PropertyA( + LPGUID ClassGuid, ULONG ulProperty, PULONG pulRegDataType, + PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +{ + FIXME("%p %lu %p %p %p %lx %lx\n", + ClassGuid, ulProperty, pulRegDataType, Buffer, pulLength, + ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; +} + + +/*********************************************************************** + * CM_Get_Class_Registry_PropertyW [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Class_Registry_PropertyW( + LPGUID ClassGuid, ULONG ulProperty, PULONG pulRegDataType, + PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + WCHAR szGuidString[PNP_MAX_GUID_STRING_LEN + 1]; + ULONG ulType = 0; + ULONG ulTransferLength = 0; + CONFIGRET ret; + + TRACE("%p %lu %p %p %p %lx %lx\n", + ClassGuid, ulProperty, pulRegDataType, Buffer, pulLength, + ulFlags, hMachine); + + if (ClassGuid == NULL || pulLength == NULL) + return CR_INVALID_POINTER; + + if (ulFlags != 0) + return CR_INVALID_FLAG; + + if (pSetupStringFromGuid(ClassGuid, + szGuidString, + PNP_MAX_GUID_STRING_LEN) != 0) + return CR_INVALID_DATA; + + if (ulProperty < CM_CRP_MIN || ulProperty > CM_CRP_MAX) + return CR_INVALID_PROPERTY; + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, NULL)) + return CR_FAILURE; + } + + ulTransferLength = *pulLength; + + RpcTryExcept + { + ret = PNP_GetClassRegProp(BindingHandle, + szGuidString, + ulProperty, + &ulType, + Buffer, + &ulTransferLength, + pulLength, + ulFlags); + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + ret = RpcStatusToCmStatus(RpcExceptionCode()); + } + RpcEndExcept; + + if (ret == CR_SUCCESS) + { + if (pulRegDataType != NULL) + *pulRegDataType = ulType; + } + + return ret; +} + + /*********************************************************************** * CM_Get_Depth [SETUPAPI.@] */ @@ -4883,6 +5000,32 @@ CONFIGRET WINAPI CM_Run_Detection_Ex( } +/*********************************************************************** + * CM_Set_Class_Registry_PropertyA [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA( + LPGUID ClassGuid, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, + ULONG ulFlags, HMACHINE hMachine) +{ + FIXME("%p %lx %p %lu %lx %p\n", + ClassGuid, ulProperty, Buffer, ulLength, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; +} + + +/*********************************************************************** + * CM_Set_Class_Registry_PropertyW [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Set_Class_Registry_PropertyW( + LPGUID ClassGuid, ULONG ulProperty, PCVOID Buffer, ULONG ulLength, + ULONG ulFlags, HMACHINE hMachine) +{ + FIXME("%p %lx %p %lu %lx %p\n", + ClassGuid, ulProperty, Buffer, ulLength, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; +} + + /*********************************************************************** * CM_Set_DevNode_Problem [SETUPAPI.@] */ @@ -5063,6 +5206,30 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExA( ulType = REG_MULTI_SZ; break; + case CM_DRP_SECURITY: + ulType = REG_BINARY; + break; + + case CM_DRP_DEVTYPE: + ulType = REG_DWORD; + break; + + case CM_DRP_EXCLUSIVE: + ulType = REG_DWORD; + break; + + case CM_DRP_CHARACTERISTICS: + ulType = REG_DWORD; + break; + + case CM_DRP_UI_NUMBER_DESC_FORMAT: + ulType = REG_SZ; + break; + + case CM_DRP_REMOVAL_POLICY_OVERRIDE: + ulType = REG_DWORD; + break; + default: return CR_INVALID_PROPERTY; } @@ -5215,6 +5382,30 @@ CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( ulType = REG_MULTI_SZ; break; + case CM_DRP_SECURITY: + ulType = REG_BINARY; + break; + + case CM_DRP_DEVTYPE: + ulType = REG_DWORD; + break; + + case CM_DRP_EXCLUSIVE: + ulType = REG_DWORD; + break; + + case CM_DRP_CHARACTERISTICS: + ulType = REG_DWORD; + break; + + case CM_DRP_UI_NUMBER_DESC_FORMAT: + ulType = REG_SZ; + break; + + case CM_DRP_REMOVAL_POLICY_OVERRIDE: + ulType = REG_DWORD; + break; + default: return CR_INVALID_PROPERTY; } diff --git a/dll/win32/setupapi/devclass.c b/dll/win32/setupapi/devclass.c index 61a9be49276..f694e4d6e73 100644 --- a/dll/win32/setupapi/devclass.c +++ b/dll/win32/setupapi/devclass.c @@ -1135,9 +1135,10 @@ SetupDiGetClassDevPropertySheetsA( struct ClassDevPropertySheetsData { - HPROPSHEETPAGE *PropertySheetPages; - DWORD MaximumNumberOfPages; + LPPROPSHEETHEADERW PropertySheetHeader; + DWORD PropertySheetHeaderPageListSize; DWORD NumberOfPages; + BOOL DontCancel; }; static BOOL WINAPI @@ -1149,14 +1150,16 @@ SETUP_GetClassDevPropertySheetsCallback( PropPageData = (struct ClassDevPropertySheetsData *)lParam; - if (PropPageData->NumberOfPages < PropPageData->MaximumNumberOfPages) + PropPageData->NumberOfPages++; + + if (PropPageData->PropertySheetHeader->nPages < PropPageData->PropertySheetHeaderPageListSize) { - *PropPageData->PropertySheetPages = hPropSheetPage; - PropPageData->PropertySheetPages++; + PropPageData->PropertySheetHeader->phpage[PropPageData->PropertySheetHeader->nPages] = hPropSheetPage; + PropPageData->PropertySheetHeader->nPages++; + return TRUE; } - PropPageData->NumberOfPages++; - return TRUE; + return PropPageData->DontCancel; } /*********************************************************************** @@ -1208,6 +1211,7 @@ SetupDiGetClassDevPropertySheetsW( PROPERTY_PAGE_PROVIDER pPropPageProvider = NULL; struct ClassDevPropertySheetsData PropPageData; DWORD dwLength, dwRegType; + DWORD InitialNumberOfPages; DWORD rc; if (DeviceInfoData) @@ -1256,27 +1260,29 @@ SetupDiGetClassDevPropertySheetsW( goto cleanup; } + InitialNumberOfPages = PropertySheetHeader->nPages; + Request.cbSize = sizeof(SP_PROPSHEETPAGE_REQUEST); Request.PageRequested = SPPSR_ENUM_ADV_DEVICE_PROPERTIES; Request.DeviceInfoSet = DeviceInfoSet; Request.DeviceInfoData = DeviceInfoData; - PropPageData.PropertySheetPages = &PropertySheetHeader->phpage[PropertySheetHeader->nPages]; - PropPageData.MaximumNumberOfPages = PropertySheetHeaderPageListSize - PropertySheetHeader->nPages; + + PropPageData.PropertySheetHeader = PropertySheetHeader; + PropPageData.PropertySheetHeaderPageListSize = PropertySheetHeaderPageListSize; PropPageData.NumberOfPages = 0; - ret = pPropPageProvider(&Request, SETUP_GetClassDevPropertySheetsCallback, (LPARAM)&PropPageData); - if (!ret) - goto cleanup; + PropPageData.DontCancel = (RequiredSize != NULL) ? TRUE : FALSE; + + pPropPageProvider(&Request, SETUP_GetClassDevPropertySheetsCallback, (LPARAM)&PropPageData); if (RequiredSize) - *RequiredSize = PropPageData.NumberOfPages + PropertySheetHeader->nPages; - if (PropPageData.NumberOfPages <= PropPageData.MaximumNumberOfPages) + *RequiredSize = PropPageData.NumberOfPages; + + if (InitialNumberOfPages + PropPageData.NumberOfPages <= PropertySheetHeaderPageListSize) { - PropertySheetHeader->nPages += PropPageData.NumberOfPages; ret = TRUE; } else { - PropertySheetHeader->nPages += PropPageData.MaximumNumberOfPages; SetLastError(ERROR_INSUFFICIENT_BUFFER); } diff --git a/dll/win32/setupapi/devinst.c b/dll/win32/setupapi/devinst.c index c87811f669f..53f472c2b36 100644 --- a/dll/win32/setupapi/devinst.c +++ b/dll/win32/setupapi/devinst.c @@ -1415,6 +1415,8 @@ HKEY WINAPI SetupDiCreateDevRegKeyW( LPWSTR DriverKey = NULL; /* {GUID}\Index */ LPWSTR pDeviceInstance; /* Points into DriverKey, on the Index field */ DWORD Index; /* Index used in the DriverKey name */ + DWORD dwSize; + DWORD Disposition; DWORD rc; HKEY hHWProfileKey = INVALID_HANDLE_VALUE; HKEY hEnumKey = NULL; @@ -1514,37 +1516,104 @@ HKEY WINAPI SetupDiCreateDevRegKeyW( } else /* KeyType == DIREG_DRV */ { - if (UuidToStringW((UUID*)&DeviceInfoData->ClassGuid, &lpGuidString) != RPC_S_OK) + /* Open device key, to read Driver value */ + hDeviceKey = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, Scope, HwProfile, DIREG_DEV, KEY_QUERY_VALUE | KEY_SET_VALUE); + if (hDeviceKey == INVALID_HANDLE_VALUE) goto cleanup; - /* The driver key is in \System\CurrentControlSet\Control\Class\{GUID}\Index */ - DriverKey = HeapAlloc(GetProcessHeap(), 0, (strlenW(lpGuidString) + 7) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); - if (!DriverKey) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - goto cleanup; - } - DriverKey[0] = '{'; - strcpyW(&DriverKey[1], lpGuidString); - pDeviceInstance = &DriverKey[strlenW(DriverKey)]; - *pDeviceInstance++ = '}'; - *pDeviceInstance++ = '\\'; - rc = RegOpenKeyExW(RootKey, - REGSTR_PATH_CLASS_NT, - 0, - KEY_CREATE_SUB_KEY, - &hClassKey); + + rc = RegOpenKeyExW(RootKey, REGSTR_PATH_CLASS_NT, 0, KEY_CREATE_SUB_KEY, &hClassKey); if (rc != ERROR_SUCCESS) { SetLastError(rc); goto cleanup; } - /* Try all values for Index between 0 and 9999 */ - Index = 0; - while (Index <= 9999) + rc = RegQueryValueExW(hDeviceKey, REGSTR_VAL_DRIVER, NULL, NULL, NULL, &dwSize); + if (rc != ERROR_SUCCESS) { - DWORD Disposition; - sprintfW(pDeviceInstance, InstanceKeyFormat, Index); + /* Create a new driver key */ + + if (UuidToStringW((UUID*)&DeviceInfoData->ClassGuid, &lpGuidString) != RPC_S_OK) + goto cleanup; + + /* The driver key is in \System\CurrentControlSet\Control\Class\{GUID}\Index */ + DriverKey = HeapAlloc(GetProcessHeap(), 0, (strlenW(lpGuidString) + 7) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); + if (!DriverKey) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + + DriverKey[0] = '{'; + strcpyW(&DriverKey[1], lpGuidString); + pDeviceInstance = &DriverKey[strlenW(DriverKey)]; + *pDeviceInstance++ = '}'; + *pDeviceInstance++ = '\\'; + + /* Try all values for Index between 0 and 9999 */ + Index = 0; + while (Index <= 9999) + { + sprintfW(pDeviceInstance, InstanceKeyFormat, Index); + rc = RegCreateKeyExW(hClassKey, + DriverKey, + 0, + NULL, + REG_OPTION_NON_VOLATILE, +#if _WIN32_WINNT >= 0x502 + KEY_READ | KEY_WRITE, +#else + KEY_ALL_ACCESS, +#endif + NULL, + &hKey, + &Disposition); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + if (Disposition == REG_CREATED_NEW_KEY) + break; + RegCloseKey(hKey); + hKey = NULL; + Index++; + } + + if (Index > 9999) + { + /* Unable to create more than 9999 devices within the same class */ + SetLastError(ERROR_GEN_FAILURE); + goto cleanup; + } + + /* Write the new Driver value */ + rc = RegSetValueExW(hDeviceKey, REGSTR_VAL_DRIVER, 0, REG_SZ, (const BYTE *)DriverKey, (strlenW(DriverKey) + 1) * sizeof(WCHAR)); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + + } + else + { + /* Open the existing driver key */ + + DriverKey = HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!DriverKey) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + + rc = RegQueryValueExW(hDeviceKey, REGSTR_VAL_DRIVER, NULL, NULL, (LPBYTE)DriverKey, &dwSize); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + rc = RegCreateKeyExW(hClassKey, DriverKey, 0, @@ -1563,28 +1632,6 @@ HKEY WINAPI SetupDiCreateDevRegKeyW( SetLastError(rc); goto cleanup; } - if (Disposition == REG_CREATED_NEW_KEY) - break; - RegCloseKey(hKey); - hKey = NULL; - Index++; - } - if (Index > 9999) - { - /* Unable to create more than 9999 devices within the same class */ - SetLastError(ERROR_GEN_FAILURE); - goto cleanup; - } - - /* Open device key, to write Driver value */ - hDeviceKey = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, Scope, HwProfile, DIREG_DEV, KEY_SET_VALUE); - if (hDeviceKey == INVALID_HANDLE_VALUE) - goto cleanup; - rc = RegSetValueExW(hDeviceKey, REGSTR_VAL_DRIVER, 0, REG_SZ, (const BYTE *)DriverKey, (strlenW(DriverKey) + 1) * sizeof(WCHAR)); - if (rc != ERROR_SUCCESS) - { - SetLastError(rc); - goto cleanup; } } @@ -1670,8 +1717,11 @@ BOOL WINAPI SetupDiCreateDeviceInfoW( PSP_DEVINFO_DATA DeviceInfoData) { struct DeviceInfoSet *set = (struct DeviceInfoSet *)DeviceInfoSet; + struct DeviceInfo *deviceInfo = NULL; BOOL ret = FALSE; - SP_DEVINFO_DATA DevInfo; + CONFIGRET cr; + DEVINST RootDevInst; + DEVINST DevInst; TRACE("%p %s %s %s %p %x %p\n", DeviceInfoSet, debugstr_w(DeviceName), debugstr_guid(ClassGuid), debugstr_w(DeviceDescription), @@ -1710,59 +1760,62 @@ BOOL WINAPI SetupDiCreateDeviceInfoW( return FALSE; } - if (CreationFlags & DICD_GENERATE_ID) - { - /* Generate a new unique ID for this device */ - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - FIXME("not implemented\n"); - } + /* Get the root device instance */ + cr = CM_Locate_DevInst_ExW(&RootDevInst, + NULL, + CM_LOCATE_DEVINST_NORMAL, + set->hMachine); + if (cr != CR_SUCCESS) + { + SetLastError(ERROR_INVALID_DATA); + return FALSE; + } + + /* Create the new device instance */ + cr = CM_Create_DevInst_ExW(&DevInst, + (DEVINSTID)DeviceName, + RootDevInst, + 0, + set->hMachine); + if (cr != CR_SUCCESS) + { + SetLastError(ERROR_INVALID_DATA); + return FALSE; + } + + if (CreateDeviceInfo(set, DeviceName, ClassGuid, &deviceInfo)) + { + InsertTailList(&set->ListHead, &deviceInfo->ListEntry); + + if (!DeviceInfoData) + ret = TRUE; else { - /* Device name is fully qualified. Try to open it */ - BOOL rc; - - DevInfo.cbSize = sizeof(SP_DEVINFO_DATA); - rc = SetupDiOpenDeviceInfoW( - DeviceInfoSet, - DeviceName, - NULL, /* hwndParent */ - CreationFlags & DICD_INHERIT_CLASSDRVS ? DIOD_INHERIT_CLASSDRVS : 0, - &DevInfo); - - if (rc) + if (DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA)) { - /* SetupDiOpenDeviceInfoW has already added - * the device info to the device info set - */ - SetLastError(ERROR_DEVINST_ALREADY_EXISTS); + SetLastError(ERROR_INVALID_USER_BUFFER); } - else if (GetLastError() == ERROR_NO_SUCH_DEVINST) + else { - struct DeviceInfo *deviceInfo; - - if (CreateDeviceInfo(set, DeviceName, ClassGuid, &deviceInfo)) - { - InsertTailList(&set->ListHead, &deviceInfo->ListEntry); - - if (!DeviceInfoData) - ret = TRUE; - else - { - if (DeviceInfoData->cbSize != sizeof(PSP_DEVINFO_DATA)) - { - SetLastError(ERROR_INVALID_USER_BUFFER); - } - else - { - memcpy(&DeviceInfoData->ClassGuid, ClassGuid, sizeof(GUID)); - DeviceInfoData->DevInst = deviceInfo->dnDevInst; - DeviceInfoData->Reserved = (ULONG_PTR)deviceInfo; - ret = TRUE; - } - } - } + memcpy(&DeviceInfoData->ClassGuid, ClassGuid, sizeof(GUID)); + DeviceInfoData->DevInst = deviceInfo->dnDevInst; + DeviceInfoData->Reserved = (ULONG_PTR)deviceInfo; + ret = TRUE; } } + } + + if (ret == FALSE) + { + if (deviceInfo != NULL) + { + /* Remove deviceInfo from List */ + RemoveEntryList(&deviceInfo->ListEntry); + + /* Destroy deviceInfo */ + DestroyDeviceInfo(deviceInfo); + } + } TRACE("Returning %d\n", ret); return ret; @@ -4542,10 +4595,14 @@ SetupDiSetDeviceInstallParamsW( return ret; } -BOOL WINAPI SetupDiSetDeviceInstallParamsA( - HDEVINFO DeviceInfoSet, - PSP_DEVINFO_DATA DeviceInfoData, - PSP_DEVINSTALL_PARAMS_A DeviceInstallParams) +/*********************************************************************** + * SetupDiSetDeviceInstallParamsW (SETUPAPI.@) + */ +BOOL WINAPI +SetupDiSetDeviceInstallParamsA( + HDEVINFO DeviceInfoSet, + PSP_DEVINFO_DATA DeviceInfoData, + PSP_DEVINSTALL_PARAMS_A DeviceInstallParams) { SP_DEVINSTALL_PARAMS_W deviceInstallParamsW; int len = 0; @@ -4635,6 +4692,25 @@ cleanup: return ret; } +static BOOL +IsDeviceInfoInDeviceInfoSet( + struct DeviceInfoSet *deviceInfoSet, + struct DeviceInfo *deviceInfo) +{ + PLIST_ENTRY ListEntry; + + ListEntry = deviceInfoSet->ListHead.Flink; + while (ListEntry != &deviceInfoSet->ListHead) + { + if (deviceInfo == CONTAINING_RECORD(ListEntry, struct DeviceInfo, ListEntry)) + return TRUE; + + ListEntry = ListEntry->Flink; + } + + return FALSE; +} + /*********************************************************************** * SetupDiDeleteDeviceInfo (SETUPAPI.@) */ @@ -4643,11 +4719,28 @@ SetupDiDeleteDeviceInfo( IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData) { + struct DeviceInfoSet *deviceInfoSet; + struct DeviceInfo *deviceInfo = (struct DeviceInfo *)DeviceInfoData; + BOOL ret = FALSE; + TRACE("%p %p\n", DeviceInfoSet, DeviceInfoData); - FIXME("not implemented\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + if (!DeviceInfoSet) + SetLastError(ERROR_INVALID_HANDLE); + else if ((deviceInfoSet = (struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEVICE_INFO_SET_MAGIC) + SetLastError(ERROR_INVALID_HANDLE); + else if (DeviceInfoData && DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA)) + SetLastError(ERROR_INVALID_USER_BUFFER); + else if (!IsDeviceInfoInDeviceInfoSet(deviceInfoSet, deviceInfo)) + SetLastError(ERROR_INVALID_PARAMETER); + else + { + RemoveEntryList(&deviceInfo->ListEntry); + DestroyDeviceInfo(deviceInfo); + ret = TRUE; + } + + return ret; } diff --git a/dll/win32/setupapi/lang/pl-PL.rc b/dll/win32/setupapi/lang/pl-PL.rc index 7e14ecb5670..d6c269dce5a 100644 --- a/dll/win32/setupapi/lang/pl-PL.rc +++ b/dll/win32/setupapi/lang/pl-PL.rc @@ -1,11 +1,5 @@ /* * Polish resources for SETUPAPI - * - * Copyright 2005 Sebastian Gasiorek - * - * Translation update by Caemyr (Olaf Siejka) - * April, 2008 - * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either @@ -19,13 +13,18 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * Copyright 2005 Sebastian Gasiorek + * + * Translation update by Caemyr -Olaf Siejka (April, 2008) + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT COPYFILEDLGORD DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "Kopiowanie plikw..." +CAPTION "Kopiowanie plików..." FONT 8, "MS Shell Dlg" BEGIN PUSHBUTTON "Anuluj", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP @@ -38,7 +37,7 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_QUERY_REBOOT_TEXT "Twj komputer musi zosta zrestartowany, by ukoczy instalacj. Czy chcesz kontynuowa?" + IDS_QUERY_REBOOT_TEXT "Twój komputer musi zostać zrestartowany, by ukończyć instalację. Czy chcesz kontynuować?" IDS_QUERY_REBOOT_CAPTION "Restart" IDS_INF_FILE "Plik Instalatora" END diff --git a/dll/win32/setupapi/lang/ru-RU.rc b/dll/win32/setupapi/lang/ru-RU.rc index 111fae95b47..80ad343b14c 100644 --- a/dll/win32/setupapi/lang/ru-RU.rc +++ b/dll/win32/setupapi/lang/ru-RU.rc @@ -22,20 +22,20 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION " ..." +CAPTION "Копирование файлов..." FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT ":", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + PUSHBUTTON "Отмена", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Откуда:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT ":", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Куда:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP END STRINGTABLE DISCARDABLE BEGIN - IDS_QUERY_REBOOT_TEXT " , . ?" - IDS_QUERY_REBOOT_CAPTION "" - IDS_INF_FILE " " + IDS_QUERY_REBOOT_TEXT "Ваш компьютер должен быть перезагружен, чтобы завершить установку. Продолжить?" + IDS_QUERY_REBOOT_CAPTION "Перезагрузка" + IDS_INF_FILE "Информация для установки" END diff --git a/dll/win32/setupapi/lang/uk-UA.rc b/dll/win32/setupapi/lang/uk-UA.rc index 74114f10545..0dbf4ea82a3 100644 --- a/dll/win32/setupapi/lang/uk-UA.rc +++ b/dll/win32/setupapi/lang/uk-UA.rc @@ -10,20 +10,20 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION " ..." +CAPTION "Копіювання Файлів..." FONT 8, "MS Shell Dlg" BEGIN - PUSHBUTTON "", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - LTEXT ":", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + PUSHBUTTON "Скасувати", IDCANCEL, 79, 84, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + LTEXT "Джерело:", -1, 7, 7, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP LTEXT "", SOURCESTRORD, 7, 18, 194, 11, WS_CHILD | WS_VISIBLE | WS_GROUP - LTEXT ":", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Призначення:", -1, 7, 30, 77, 11, WS_CHILD | WS_VISIBLE | WS_GROUP LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP END STRINGTABLE DISCARDABLE BEGIN - IDS_QUERY_REBOOT_TEXT " '. ?" - IDS_QUERY_REBOOT_CAPTION "" - IDS_INF_FILE "³ " + IDS_QUERY_REBOOT_TEXT "Для закінчення установки необхідно перезапустити Ваш комп'ютер. Продовжити?" + IDS_QUERY_REBOOT_CAPTION "Перезапустити" + IDS_INF_FILE "Відомості для установки" END diff --git a/dll/win32/setupapi/setupapi.rc b/dll/win32/setupapi/setupapi.rc index f6328364f8a..4f0c1c3f50c 100644 --- a/dll/win32/setupapi/setupapi.rc +++ b/dll/win32/setupapi/setupapi.rc @@ -38,11 +38,14 @@ #include "lang/ko-KR.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" #include "lang/tr-TR.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/setupapi/setupapi.spec b/dll/win32/setupapi/setupapi.spec index 0a64df095b8..e76d8720dec 100644 --- a/dll/win32/setupapi/setupapi.spec +++ b/dll/win32/setupapi/setupapi.spec @@ -62,8 +62,8 @@ @ stdcall CM_Get_Class_NameW(ptr wstr ptr long) @ stdcall CM_Get_Class_Name_ExA(ptr str ptr long long) @ stdcall CM_Get_Class_Name_ExW(ptr wstr ptr long long) -@ stub CM_Get_Class_Registry_PropertyA -@ stub CM_Get_Class_Registry_PropertyW +@ stdcall CM_Get_Class_Registry_PropertyA(ptr long ptr ptr ptr long ptr) +@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr ptr long ptr) @ stdcall CM_Get_Depth(ptr long long) @ stdcall CM_Get_Depth_Ex(ptr long long long) @ stub CM_Get_DevNode_Custom_PropertyA @@ -184,8 +184,8 @@ @ stdcall CM_Request_Eject_PC_Ex(long) @ stdcall CM_Run_Detection(long) @ stdcall CM_Run_Detection_Ex(long long) -@ stub CM_Set_Class_Registry_PropertyA -@ stub CM_Set_Class_Registry_PropertyW +@ stdcall CM_Set_Class_Registry_PropertyA(ptr long ptr long long ptr) +@ stdcall CM_Set_Class_Registry_PropertyW(ptr long ptr long long ptr) @ stdcall CM_Set_DevNode_Problem(long long long) @ stdcall CM_Set_DevNode_Problem_Ex(long long long long) @ stdcall CM_Set_DevNode_Registry_PropertyA(long long ptr long long) diff --git a/dll/win32/setupapi/stubs.c b/dll/win32/setupapi/stubs.c index e4003a6eacf..61599e6a5ca 100644 --- a/dll/win32/setupapi/stubs.c +++ b/dll/win32/setupapi/stubs.c @@ -22,25 +22,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(setupapi); -/*********************************************************************** - * TPWriteProfileString (SETUPX.62) - */ -BOOL WINAPI TPWriteProfileString16( LPCSTR section, LPCSTR entry, LPCSTR string ) -{ - FIXME( "%s %s %s: stub\n", debugstr_a(section), debugstr_a(entry), debugstr_a(string) ); - return TRUE; -} - - -/*********************************************************************** - * suErrorToIds (SETUPX.61) - */ -DWORD WINAPI suErrorToIds16( WORD w1, WORD w2 ) -{ - FIXME( "%x %x: stub\n", w1, w2 ); - return 0; -} - /*********************************************************************** * pSetupRegistryDelnode(SETUPAPI.@) */ @@ -159,35 +140,6 @@ SetupDiUnremoveDevice( } -/*********************************************************************** - * CMP_RegisterNotification(SETUPAPI.@) - */ -CONFIGRET -WINAPI -CMP_RegisterNotification( - IN HANDLE hRecipient, - IN LPVOID lpvNotificationFilter, - IN DWORD dwFlags, - OUT PULONG pluhDevNotify) -{ - FIXME ("Stub %p %p %lu %p\n", hRecipient, lpvNotificationFilter, dwFlags, pluhDevNotify); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return CR_FAILURE; -} - - -/*********************************************************************** - * CMP_UnregisterNotification(SETUPAPI.@) - */ -CONFIGRET -WINAPI -CMP_UnregisterNotification(IN HDEVNOTIFY handle) -{ - FIXME ("Stub %p\n", handle); - return CR_SUCCESS; -} - - WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInterfaceAlias(IN HDEVINFO DeviceInfoSet, IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData, IN CONST GUID *AliasInterfaceClassGuid, OUT PSP_DEVICE_INTERFACE_DATA AliasDeviceInterfaceData) { FIXME("%p %p %p %p %p stub\n", DeviceInfoSet, DeviceInterfaceData, AliasInterfaceClassGuid, AliasDeviceInterfaceData); diff --git a/dll/win32/sfc/CMakeLists.txt b/dll/win32/sfc/CMakeLists.txt index b01fe34b46c..9be0fb71fbc 100644 --- a/dll/win32/sfc/CMakeLists.txt +++ b/dll/win32/sfc/CMakeLists.txt @@ -6,13 +6,11 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/sfc_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/sfc.def) -add_library(sfc SHARED - ${CMAKE_CURRENT_BINARY_DIR}/sfc_precomp.h.gch - ${SOURCE}) +add_library(sfc SHARED ${SOURCE}) set_module_type(sfc win32dll) -add_importlibs(sfc msvcrt kernel32 ntdll) -add_pch(sfc ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_importlibs(sfc sfc_os msvcrt kernel32 ntdll) +add_pch(sfc precomp.h) add_cd_file(TARGET sfc DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/sfc_os/CMakeLists.txt b/dll/win32/sfc_os/CMakeLists.txt index c50b8f26494..0ffd0e7d5ca 100644 --- a/dll/win32/sfc_os/CMakeLists.txt +++ b/dll/win32/sfc_os/CMakeLists.txt @@ -6,13 +6,10 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/sfc_os_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/sfc_os.def) -add_library(sfc_os SHARED - ${CMAKE_CURRENT_BINARY_DIR}/sfc_os_precomp.h.gch - ${SOURCE}) +add_library(sfc_os SHARED ${SOURCE}) set_module_type(sfc_os win32dll) - add_importlibs(sfc_os msvcrt kernel32 ntdll) -add_pch(sfc_os ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) - +add_importlib_target(sfc_os.spec) +add_pch(sfc_os precomp.h) add_cd_file(TARGET sfc_os DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index 9bdd9f16463..3180e9f745c 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -12,8 +12,6 @@ include_directories( ${REACTOS_SOURCE_DIR}/lib/recyclebin ${REACTOS_SOURCE_DIR}) -generate_idl_iids(shobjidl_local.idl) - spec2def(shell32.dll shell32.spec) list(APPEND SOURCE @@ -71,13 +69,10 @@ list(APPEND SOURCE shv_item_new.c folder_options.c shell32.rc - ${CMAKE_CURRENT_BINARY_DIR}/shobjidl_local_i.c ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/shell32.def) -add_pch(shell32 ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) - -add_library(shell32 SHARED ${CMAKE_CURRENT_BINARY_DIR}/shell32_precomp.h.gch ${SOURCE}) +add_library(shell32 SHARED ${SOURCE}) set_module_type(shell32 win32dll) @@ -102,5 +97,7 @@ add_importlibs(shell32 msvcrt ntdll) +add_pch(shell32 precomp.h) + add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all) add_importlib_target(shell32.spec) diff --git a/dll/win32/shell32/authors.c b/dll/win32/shell32/authors.c index f3b1f97df18..3101d764863 100644 --- a/dll/win32/shell32/authors.c +++ b/dll/win32/shell32/authors.c @@ -1 +1,3 @@ -const char * const SHELL_Authors[] = { "Copyright 1993-2009 WINE team", "Copyright 1998-2009 ReactOS Team", 0 }; +#include + +const char * const SHELL_Authors[] = { "Copyright 1993-" COPYRIGHT_YEAR " WINE team", "Copyright 1998-" COPYRIGHT_YEAR " ReactOS Team", 0 }; diff --git a/dll/win32/shell32/drive.c b/dll/win32/shell32/drive.c index 8f70e74cc7f..240739c6c73 100644 --- a/dll/win32/shell32/drive.c +++ b/dll/win32/shell32/drive.c @@ -18,20 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define MAX_PROPERTY_SHEET_PAGE 32 - -#define WIN32_NO_STATUS -#define NTOS_MODE_USER -#define UNICODE -#define _UNICODE -#define COBJMACROS -#include -#include -#include -#include - #include +#define MAX_PROPERTY_SHEET_PAGE 32 + WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef enum @@ -668,7 +658,7 @@ AddPropSheetPageProc(HPROPSHEETPAGE hpage, LPARAM lParam) PROPSHEETHEADER *ppsh = (PROPSHEETHEADER *)lParam; if (ppsh != NULL && ppsh->nPages < MAX_PROPERTY_SHEET_PAGE) { - ppsh->phpage[ppsh->nPages++] = hpage; + ppsh->u3.phpage[ppsh->nPages++] = hpage; return TRUE; } return FALSE; @@ -691,8 +681,8 @@ SH_ShowDriveProperties(WCHAR * drive, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * psh.dwSize = sizeof(PROPSHEETHEADERW); //psh.dwFlags = PSH_USECALLBACK | PSH_PROPTITLE; psh.hwndParent = NULL; - psh.nStartPage = 0; - psh.phpage = hpsp; + psh.u2.nStartPage = 0; + psh.u3.phpage = hpsp; if (GetVolumeInformationW(drive, szName, sizeof(szName)/sizeof(WCHAR), NULL, &dwMaxComponent, &dwFileSysFlags, NULL, 0)) diff --git a/dll/win32/shell32/folder_options.c b/dll/win32/shell32/folder_options.c index 0e8ccbfe93d..3d72018dbd3 100644 --- a/dll/win32/shell32/folder_options.c +++ b/dll/win32/shell32/folder_options.c @@ -399,7 +399,7 @@ FolderOptionsFileTypesDlg( { LPNMLISTVIEW lppl; LVITEMW lvItem; - WCHAR Buffer[200], FormatBuffer[100]; + WCHAR Buffer[255], FormatBuffer[255]; PFOLDER_FILE_TYPE_ENTRY pItem; OPENASINFO Info; @@ -451,6 +451,16 @@ FolderOptionsFileTypesDlg( swprintf(Buffer, FormatBuffer, &pItem->FileExtension[1]); /* update dialog */ SendDlgItemMessageW(hwndDlg, 14003, WM_SETTEXT, 0, (LPARAM)Buffer); + + if (!LoadStringW(shell32_hInstance, IDS_FILE_DETAILSADV, FormatBuffer, sizeof(FormatBuffer) / sizeof(WCHAR))) + { + /* use default english format string */ + wcscpy(FormatBuffer, L"Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced."); + } + /* format buffer */ + swprintf(Buffer, FormatBuffer, &pItem->FileExtension[1], &pItem->FileDescription[0], &pItem->FileDescription[0]); + /* update dialog */ + SendDlgItemMessageW(hwndDlg, 14007, WM_SETTEXT, 0, (LPARAM)Buffer); } } break; diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index 4f199976db9..3176ae676b9 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT " " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT " "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT " :", IDC_STATIC, 35, 115, 180, 10 @@ -423,7 +423,7 @@ LTEXT " //ICON LTEXT " ", 14005, 100, 140, 40, 10 PUSHBUTTON "&...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT " '%s' '%s'.\n , '%s'\n, .", 14007, 12, 155, 160, 32 +LTEXT "", 14007, 12, 155, 160, 32 PUSHBUTTON "&", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -656,10 +656,7 @@ BEGIN IDS_CANTTRASH_TEXT " '%1' . ?" IDS_OVERWRITEFILE_TEXT " '%1'.\n\n ?" IDS_OVERWRITEFILE_CAPTION " " - IDS_OVERWRITEFOLDER_TEXT " '%1'.\n\n"\ - " \n"\ - " , . \n"\ - " ?" + IDS_OVERWRITEFOLDER_TEXT " '%1'.\n\n \n , . \n ?" // message box strings IDS_RESTART_TITLE "" @@ -759,6 +756,11 @@ BEGIN IDS_COPY_OF " " IDS_SHLEXEC_NOASSOC " , ." + + IDS_FILE_DETAILS " '%s" + IDS_FILE_DETAILSADV " '%s' '%s'. , '%s' , ." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc index bf4f9402ae4..9ccb77133a1 100644 --- a/dll/win32/shell32/lang/ca-ES.rc +++ b/dll/win32/shell32/lang/ca-ES.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index c160a1c26d4..14d4f3a8c92 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -113,7 +113,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Verze " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Verze "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Tato verze ReactOS je zaregistrovna na:", IDC_STATIC, 35, 115, 180, 10 @@ -412,7 +412,7 @@ LTEXT "Otev //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Zmnit...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Soubory s pponou '%s' jsou typu '%s'. Kliknutm\nna tlatko Pokroil lze zmnit nastaven pro vechny\nsoubory '%s'.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "&Pokroil", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -643,9 +643,7 @@ BEGIN IDS_CANTTRASH_TEXT "Poloka '%1' neme bt pesunuta do Koe. Chcete ji msto toho smazat?" IDS_OVERWRITEFILE_TEXT "Tato sloka ji obsahuje soubor s nzvem '%1'.\n\nChcete jej pepsat?" IDS_OVERWRITEFILE_CAPTION "Potvrdit pepsn souboru" - IDS_OVERWRITEFOLDER_TEXT "Tato sloka ji obsahuje sloku s nzvem '%1'.\n\n"\ - "Pokud maj soubory v clov sloce stejn nzvy jako soubory ve zvolen\n"\ - "sloce, budou pepsny. Opravdu chcete pesunout nebo zkoprovat tuto sloku?" + IDS_OVERWRITEFOLDER_TEXT "Tato sloka ji obsahuje sloku s nzvem '%1'.\n\nPokud maj soubory v clov sloce stejn nzvy jako soubory ve zvolen\nsloce, budou pepsny. Opravdu chcete pesunout nebo zkoprovat tuto sloku?" /* message box strings */ IDS_RESTART_TITLE "Restartovat" @@ -745,4 +743,9 @@ BEGIN IDS_COPY_OF "Kopie " IDS_SHLEXEC_NOASSOC "Pro oteven tohoto souboru nen nakonfigurovn dn program." + + IDS_FILE_DETAILS "Podrobnosti pro typ soubor '%s'" + IDS_FILE_DETAILSADV "Soubory s pponou '%s' jsou typu '%s'. Kliknutm na tlatko Pokroil lze zmnit nastaven pro vechny soubory '%s'." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index 0e0616499b5..65a866f1d15 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -113,7 +113,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -413,7 +413,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -644,10 +644,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "Overskriv fil %1?" IDS_OVERWRITEFILE_CAPTION "Bekrft overskrivelse af fil" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Genstart" @@ -747,4 +744,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc index bf4ccfa66f2..cbb3d03c78b 100644 --- a/dll/win32/shell32/lang/de-DE.rc +++ b/dll/win32/shell32/lang/de-DE.rc @@ -55,7 +55,7 @@ BEGIN MENUITEM "Aktualisieren", FCIDM_SHVIEW_REFRESH MENUITEM SEPARATOR MENUITEM "Einfgen", FCIDM_SHVIEW_INSERT - MENUITEM "Einfgen als Verweis", FCIDM_SHVIEW_INSERTLINK + MENUITEM "Verknpfung einfgen", FCIDM_SHVIEW_INSERTLINK MENUITEM SEPARATOR MENUITEM "&Eigenschaften", FCIDM_SHVIEW_PROPERTIES END @@ -127,7 +127,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Diese ReactOS-Version wurde registriert auf:", IDC_STATIC, 35, 115, 180, 10 @@ -427,7 +427,7 @@ BEGIN //ICON LTEXT "Anwendungsname", 14005, 100, 140, 40, 10 PUSHBUTTON "n&dern...", 14006, 180, 140, 50, 14, WS_TABSTOP - LTEXT "Um\ndie Einstellungen, die alle Dateien des Typs '%s' betreffen zu ndern, klicken Sie auf Erweitert.", 14007, 12, 155, 160, 30 + LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "&Erweitert", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -660,9 +660,7 @@ BEGIN IDS_CANTTRASH_TEXT "Das Objekt '%1' kann nicht in den Papierkorb verschoben werden. Mchten Sie es stattdessen lschen?" IDS_OVERWRITEFILE_TEXT "Dieser Ordner enthlt bereits eine Datei namens '%1'.\n\nWollen Sie diese berschreiben?" IDS_OVERWRITEFILE_CAPTION "Besttigung: Datei berschreiben" - IDS_OVERWRITEFOLDER_TEXT "Dieser Ordner enthlt bereits einen Ordner namens '%1'.\n\n"\ - "Wenn Dateien im Zielordner die gleichen Namen haben, wie Dateien\n"\ - "im gewhlten Ordner, werden diese ersetzt. Soll der Vorgang fortgesetzt werden?" + IDS_OVERWRITEFOLDER_TEXT "Dieser Ordner enthlt bereits einen Ordner namens '%1'.\n\nWenn Dateien im Zielordner die gleichen Namen haben, wie Dateien\nim gewhlten Ordner, werden diese ersetzt. Soll der Vorgang fortgesetzt werden?" /* message box strings */ IDS_RESTART_TITLE "Neu starten" @@ -721,7 +719,7 @@ BEGIN IDS_SHELL_ABOUT_BACK "< &Zurck" FCIDM_SHVIEW_NEW "Neu" FCIDM_SHVIEW_NEWFOLDER "Neues Ver&zeichnis" - FCIDM_SHVIEW_NEWLINK "Neuer Ver&weis" + FCIDM_SHVIEW_NEWLINK "Neue &Verknpfung" IDS_FOLDER_OPTIONS "Ordneroptionen" IDS_RECYCLEBIN_LOCATION "Papierkorbpfad" IDS_RECYCLEBIN_DISKSPACE "freier Speicher" @@ -762,4 +760,9 @@ BEGIN IDS_COPY_OF "Kopie von" IDS_SHLEXEC_NOASSOC "Es ist kein Programm mit diesem Dateityp verknpft." + + IDS_FILE_DETAILS "Details zum Dateityp '%s'" + IDS_FILE_DETAILSADV "Um die Einstellungen, die alle Dateien des Typs '%s' betreffen zu ndern, klicken Sie auf Erweitert." + IDS_FILE_TYPES "Dateitypen" + IDS_COLUMN_EXTENSION "Erweiterungen" END diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc index f47854c8841..773da617bc3 100644 --- a/dll/win32/shell32/lang/el-GR.rc +++ b/dll/win32/shell32/lang/el-GR.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT " " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT " "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT " ReactOS :", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -656,10 +656,7 @@ BEGIN IDS_CANTTRASH_TEXT " '%1' . ;" IDS_OVERWRITEFILE_TEXT " '%1'.\n\n ;" IDS_OVERWRITEFILE_CAPTION " " - IDS_OVERWRITEFOLDER_TEXT " ed '%1'.\n\n"\ - " \n"\ - " . ;\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT " ed '%1'.\n\n \n . ;\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "" @@ -759,4 +756,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc index 5e693394fc5..777cde9ca43 100644 --- a/dll/win32/shell32/lang/en-GB.rc +++ b/dll/win32/shell32/lang/en-GB.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Recycle Bin. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc index 946a4ebcdcb..edca6e8bf23 100644 --- a/dll/win32/shell32/lang/en-US.rc +++ b/dll/win32/shell32/lang/en-US.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -435,7 +435,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -666,10 +666,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -769,4 +766,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index 95dd072026a..faba57de667 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -128,7 +128,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Versin " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Versin "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Esta versin de ReactOS est registrada a:", IDC_STATIC, 35, 115, 180, 10 @@ -437,7 +437,7 @@ LTEXT "Se abre con:", -1, 12, 140, 50, 10 //ICON LTEXT "Aplicacin", 14005, 100, 140, 40, 10 PUSHBUTTON "Cam&biar...", 14006, 230, 140, 50, 14, WS_TABSTOP -LTEXT "Archivos con extensin '%s' son del tipo '%s'. Para cambiar la configuracin de los archivos '%s', haga clic en Opciones avanzadas.", 14007, 12, 165, 220, 30 +LTEXT "", 14007, 12, 165, 220, 30 PUSHBUTTON "Opciones avanza&das", 14008, 190, 213, 90, 14, WS_TABSTOP END @@ -668,10 +668,7 @@ BEGIN IDS_CANTTRASH_TEXT "El elemento '%1' no puede ser enviado a la Papelera de reciclaje. En vez de ello Desea borrarlo?" IDS_OVERWRITEFILE_TEXT "Esta carpeta ya contiene un archivo con el nombre '%1'.\n\nDesea reemplazar el archivo existente?" IDS_OVERWRITEFILE_CAPTION "Confirmar el reemplazo de archivo" - IDS_OVERWRITEFOLDER_TEXT "Esta carpeta ya contiene una carpeta con el nombre '%1'.\n\n"\ - "Si los archivos de la carpeta existente tienen el mismo nombre que los\n"\ - "archivos de la carpeta que est moviendo o copiando, sern\n"\ - "reemplazados. Desea mover o copiar la carpeta de todas formas?" + IDS_OVERWRITEFOLDER_TEXT "Esta carpeta ya contiene una carpeta con el nombre '%1'.\n\nSi los archivos de la carpeta existente tienen el mismo nombre que los\narchivos de la carpeta que est moviendo o copiando, sern\nreemplazados. Desea mover o copiar la carpeta de todas formas?" /* message box strings */ IDS_RESTART_TITLE "Reiniciar" @@ -771,4 +768,9 @@ BEGIN IDS_COPY_OF "Copia de" IDS_SHLEXEC_NOASSOC "No hay ningn programa configurado en ReactOS para abrir este tipo de archivo." + + IDS_FILE_DETAILS "Detalles para el tipo de archivo '%s'" + IDS_FILE_DETAILSADV "Los archivos con extensin '%s' son del tipo '%s'. Para cambiar la configuracin de los archivos '%s', haga clic en Opciones avanzadas." + IDS_FILE_TYPES "Tipos de archivos" + IDS_COLUMN_EXTENSION "Extensiones" END diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc index f8958cfa903..036208b542a 100644 --- a/dll/win32/shell32/lang/fi-FI.rc +++ b/dll/win32/shell32/lang/fi-FI.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Vahvista Tiedoston Ylikirjoitus" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Kynnist uudestaan" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index 3b2c1fdba51..4ba19d8c85a 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -129,7 +129,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Cette version de ReactOS est enregistre :", IDC_STATIC, 35, 115, 180, 10 @@ -428,7 +428,7 @@ LTEXT "Ouvrir avec :", -1, 12, 140, 40, 10 //ICON LTEXT "Nom de l'application", 14005, 100, 140, 40, 10 PUSHBUTTON "&Modifier...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Les fichiers avec l'extension '%s' sont de type '%s'. Pour\nmodifier les paramtres qui concernent tous les fichiers '%s', cliquez\nsur Avanc.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "A&vanc", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -659,10 +659,7 @@ BEGIN IDS_CANTTRASH_TEXT "L'lment '%1' ne peut tre envoy la Corbeille. Voulez-vous le supprimer ?" IDS_OVERWRITEFILE_TEXT "Ce dossier contient dj un fichier nomm '%1'.\n\nVoulez-vous le remplacer ?" IDS_OVERWRITEFILE_CAPTION "Confirmer l'crasement du fichier" - IDS_OVERWRITEFOLDER_TEXT "Ce dossier contient dj un dossier nomm '%1'.\n\n"\ - "Si les fichiers dans le dossier de destination ont les mmes noms que ceux dans le\n"\ - "dossier slectionn, ils seront remplacs. Voulez-vous toujours dplacer ou copier\n"\ - "le dossier?" + IDS_OVERWRITEFOLDER_TEXT "Ce dossier contient dj un dossier nomm '%1'.\n\nSi les fichiers dans le dossier de destination ont les mmes noms que ceux dans le\ndossier slectionn, ils seront remplacs. Voulez-vous toujours dplacer ou copier\nle dossier?" /* message box strings */ IDS_RESTART_TITLE "Redmarrer" @@ -762,4 +759,9 @@ BEGIN IDS_COPY_OF "Copie de" IDS_SHLEXEC_NOASSOC "Aucun programme Windows n'est configur pour ouvrir ce type de fichier." + + IDS_FILE_DETAILS "Dtails concernant l'extension '%s'" + IDS_FILE_DETAILSADV "Les fichiers avec l'extension '%s' sont de type '%s'. Pour modifier les paramtres qui concernent tous les fichiers '%s', cliquez sur Avanc." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc index e9f12f71ed3..03ee27ee56b 100644 --- a/dll/win32/shell32/lang/hu-HU.rc +++ b/dll/win32/shell32/lang/hu-HU.rc @@ -128,7 +128,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -427,7 +427,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -658,10 +658,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "llomny fellrsa" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "jraindts" @@ -761,4 +758,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc index 134c6979aa5..3ee1aa38dea 100644 --- a/dll/win32/shell32/lang/it-IT.rc +++ b/dll/win32/shell32/lang/it-IT.rc @@ -126,10 +126,10 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Versione " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Versione "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 - LTEXT "Questa versione di ReactOS registrata da:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "Questa versione di ReactOS registrata a nome di:", IDC_STATIC, 35, 115, 180, 10 LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ @@ -435,7 +435,7 @@ LTEXT "Si apre con:", -1, 12, 140, 40, 10 //ICON LTEXT "Nome", 14005, 100, 140, 40, 10 PUSHBUTTON "&Cambia...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "I files con estensione '%s' sono di tipo '%s'.\nPer cambiare le impostazioni che influenzano tutti i file '%s', cliccare\nAvanzate.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "A&vanzate", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -666,10 +666,7 @@ BEGIN IDS_CANTTRASH_TEXT "L'elemento '%1' non pu essere spostato nel cestino. Volete cancellarlo?" IDS_OVERWRITEFILE_TEXT "Questa cartella contiene gi un file con nome '%1'.\n\nVolete sostituirlo?" IDS_OVERWRITEFILE_CAPTION "Confermare la sovrascrittura del File" - IDS_OVERWRITEFOLDER_TEXT "Questa cartella contiene gi una cartella con nome '%1'.\n\n"\ - "Se i file nella cartella di destinazione hanno gli stessi nomi di quelli della \n"\ - "cartella selezionata saranno sovrascritti. Volete procedere comunque?\n"\ - "" + IDS_OVERWRITEFOLDER_TEXT "Questa cartella contiene gi una cartella con nome '%1'.\n\nSe i file nella cartella di destinazione hanno gli stessi nomi di quelli della \ncartella selezionata saranno sovrascritti. Volete procedere comunque?\n" /* message box strings */ IDS_RESTART_TITLE "Riavvia" @@ -769,4 +766,9 @@ BEGIN IDS_COPY_OF "Copia di" IDS_SHLEXEC_NOASSOC "Non c' un programma configurato per aprire questo tipo di file." + + IDS_FILE_DETAILS "Dettagli per l'estensione '%s'" + IDS_FILE_DETAILSADV "I files con estensione '%s' sono di tipo '%s'. Per modificare le impostazioni per tutti i file '%s', cliccare su Avanzate." + IDS_FILE_TYPES "Tipi di file" + IDS_COLUMN_EXTENSION "Estensioni" END diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc index 9545f6c9c67..ec1189689e2 100644 --- a/dll/win32/shell32/lang/ja-JP.rc +++ b/dll/win32/shell32/lang/ja-JP.rc @@ -125,7 +125,7 @@ FONT 9, "MS UI Gothic" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "o[W " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "o[W "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "ReactOS̃o[W͎̕ɓo^Ă܂:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT " //ICON LTEXT "Av", 14005, 100, 140, 40, 10 PUSHBUTTON "ύX(&C)...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "gq '%s' ̃t@C̎ނ'%s'łB\n'%s' ̃t@CׂĂɑ΂ݒύXɂ\nڍאݒNbNĂB", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "ڍאݒ(&V)", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT " '%1' ͂ݔɑ܂B ɍ폜Ă낵ł?" IDS_OVERWRITEFILE_TEXT "̃tH_ɂ͊Ƀt@C'%1'܂܂Ă܂B\n\nuĂ낵ł?" IDS_OVERWRITEFILE_CAPTION "t@C㏑̊mF" - IDS_OVERWRITEFOLDER_TEXT "̃tH_ɂ͊ɃtH_'%1'܂܂Ă܂B\n\n"\ - "fBNgtH_̃t@CIꂽtH_̃t@C\n"\ - "Ɠ͒u܂BłAtH_ړ܂\n"\ - "Rs[܂?" + IDS_OVERWRITEFOLDER_TEXT "̃tH_ɂ͊ɃtH_'%1'܂܂Ă܂B\n\nfBNgtH_̃t@CIꂽtH_̃t@C\nƓ͒u܂BłAtH_ړ܂\nRs[܂?" /* message box strings */ IDS_RESTART_TITLE "ċN" @@ -757,4 +754,10 @@ BEGIN IDS_DEFAULT_CLUSTER_SIZE "ftHg AP[V TCY" IDS_COPY_OF "Rs[ `" + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "gq '%s' ̏ڍ" + IDS_FILE_DETAILSADV "gq '%s' ̃t@C̎ނ'%s'łB '%s' ̃t@CׂĂɑ΂ݒύXɂ ڍאݒNbNĂB" + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc index 37565bd4f39..3ac3b8db34c 100644 --- a/dll/win32/shell32/lang/ko-KR.rc +++ b/dll/win32/shell32/lang/ko-KR.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc index 5e957b7485a..c1bac043c4d 100644 --- a/dll/win32/shell32/lang/nl-NL.rc +++ b/dll/win32/shell32/lang/nl-NL.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "Er is geen Windows-programma geconfigureerd om dit soort bestanden te openen." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc index e204a77d957..adbe3b20f04 100644 --- a/dll/win32/shell32/lang/no-NO.rc +++ b/dll/win32/shell32/lang/no-NO.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Versjon " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Versjon "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Denne ReactOS versjonen er registert til:", IDC_STATIC, 35, 115, 180, 10 @@ -425,7 +425,7 @@ LTEXT " //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Endre...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Filer med utvidelser '%s' er av typen '%s'. For \nendre innstillingene som er av filen '%s', trykk p\navansert.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Av&ansert", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -658,10 +658,7 @@ BEGIN IDS_CANTTRASH_TEXT "Elementet %1 kan ikke legges i papirkurven. Vil du slette det i stedet?" IDS_OVERWRITEFILE_TEXT "Denne mapppen innholder allerede en fil som heter '%1'.\n\nVil du overskrive denne?" IDS_OVERWRITEFILE_CAPTION "Bekreft overskriving av fil" - IDS_OVERWRITEFOLDER_TEXT "Denne mappen inneholder allerede en mappe som heter '%1'.\n\n"\ - "Hvis filene i destinasjon mappen har samme navn filer i \n"\ - "valgte mapper her vil bli overskrevet. nsker du fortsatt flytte eller kopiere \n"\ - "denne mappen?" + IDS_OVERWRITEFOLDER_TEXT "Denne mappen inneholder allerede en mappe som heter '%1'.\n\nHvis filene i destinasjon mappen har samme navn filer i \nvalgte mapper her vil bli overskrevet. nsker du fortsatt flytte eller kopiere \ndenne mappen?" /* message box strings */ IDS_RESTART_TITLE "Starte p nytt" @@ -761,4 +758,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "Intet Windows-program er satt opp til pne denne filtypen." + + IDS_FILE_DETAILS "Detailjer for '%s' utvidelser" + IDS_FILE_DETAILSADV "Filer med utvidelser '%s' er av typen '%s'. For endre innstillingene som er av filen '%s', trykk p avansert." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index 65e85133323..709bbb66335 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * ReactOS shell32 fork translation updated by Caemyr - - * - Olaf Siejka (Jan,Mar,Apr,Jul, Aug 2008; Apr, 2010) + * - Olaf Siejka (Jan,Mar,Apr,Jul, Aug 2008; Apr, 2010, May 2011) * Use ReactOS forum PM or IRC to contact me * http://www.reactos.org * IRC: irc.freenode.net #reactos-pl; @@ -133,7 +133,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Wersja " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Wersja "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Ta kopia ReactOS jest zarejestrowna na:", IDC_STATIC, 35, 115, 180, 10 @@ -432,7 +432,7 @@ LTEXT "Otwiera z:", -1, 12, 140, 40, 10 //ICON LTEXT "Nazwa Aplikacji", 14005, 100, 140, 40, 10 PUSHBUTTON "Z&mie", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Pliki z rozszerzeniem '%s' nale do typu: '%s'. Aby\nzmieni ustawienia dotyczce wszystkich plikw '%s', wybierz\nZaawansowane.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Zaawa&nsowane", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -663,10 +663,7 @@ BEGIN IDS_CANTTRASH_TEXT "Nie mog przenie elementu '%1' do Kosza. Czy chcesz go zamiast tego usun?" IDS_OVERWRITEFILE_TEXT "Ten folder zawiera ju plik o nazwie '%1'.\n\nCzy chcesz go zastpi?" IDS_OVERWRITEFILE_CAPTION "Potwierd zastpienie pliku" - IDS_OVERWRITEFOLDER_TEXT "Ten folder zawiera ju katalog o nazwie '%1'.\n\n"\ - "Jeeli w docelowym folderze wystpi pliki o takich samych nazwach jak\n"\ - "w wybranym folderze, to zostan one zastpione. Czy chcesz mimo to przenie\n"\ - "lub skopiowa folder?" + IDS_OVERWRITEFOLDER_TEXT "Ten folder zawiera ju katalog o nazwie '%1'.\n\nJeeli w docelowym folderze wystpi pliki o takich samych nazwach jak\nw wybranym folderze, to zostan one zastpione. Czy chcesz mimo to przenie\nlub skopiowa folder?" /* message box strings */ IDS_RESTART_TITLE "Uruchom ponownie" @@ -766,4 +763,9 @@ BEGIN IDS_COPY_OF "Kopia" IDS_SHLEXEC_NOASSOC "aden program nie jest skonfigurowany, by otwiera pliki tego typu." + + IDS_FILE_DETAILS "Szczegy dla rozszerzenia '%s'" + IDS_FILE_DETAILSADV "Pliki z rozszerzeniem '%s' s typu '%s'. Aby zmieni ustawienia, ktre dotycz wszystkich plikw '%s', kliknij przycisk Zaawansowane." + IDS_FILE_TYPES "Typy plikw" + IDS_COLUMN_EXTENSION "Rozszerzenia" END diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc index c06bf15c70c..a5ccf333d5f 100644 --- a/dll/win32/shell32/lang/pt-BR.rc +++ b/dll/win32/shell32/lang/pt-BR.rc @@ -127,7 +127,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -426,7 +426,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -657,10 +657,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescrever arquivo" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Reiniciar" @@ -760,4 +757,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "Nici un program Windows nu este configurat sa deschida fi?iere de acest tip." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc index e34e5567909..005f63cfbe2 100644 --- a/dll/win32/shell32/lang/pt-PT.rc +++ b/dll/win32/shell32/lang/pt-PT.rc @@ -128,7 +128,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Verso " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Verso "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Esta verso do ReactOS registado a:", IDC_STATIC, 35, 115, 180, 10 @@ -427,7 +427,7 @@ LTEXT "Abre com:", -1, 12, 140, 40, 10 //ICON LTEXT "Appnome", 14005, 100, 140, 40, 10 PUSHBUTTON "&Mudar...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Ficheiros com extenso '%s' so do tipo '%s'. Para\nmudar definies que afectam todos '%s' ficheiros, click\nAvanado.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "A&vanado", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -658,10 +658,7 @@ BEGIN IDS_CANTTRASH_TEXT "O item '%1' no pode ser enviado para a reciclagem. Em vez disso pretende elimin-lo?" IDS_OVERWRITEFILE_TEXT "Esta pasta j contm um ficheiro com o nome '%1'.\n\npretende substitu-lo?" IDS_OVERWRITEFILE_CAPTION "Confirmar substituio de ficheiro" - IDS_OVERWRITEFOLDER_TEXT "Esta pasta j contm uma pasta com o nome '%1'.\n\n"\ - "Se os ficheiros na pasta de destino tiverem o mesmo nome dos ficheiros na\n"\ - "pasta seleccionada, sero substitudos. Ainda assim pretende mover ou copiar\n"\ - "a pasta?" + IDS_OVERWRITEFOLDER_TEXT "Esta pasta j contm uma pasta com o nome '%1'.\n\nSe os ficheiros na pasta de destino tiverem o mesmo nome dos ficheiros na\npasta seleccionada, sero substitudos. Ainda assim pretende mover ou copiar\na pasta?" /* message box strings */ IDS_RESTART_TITLE "Reiniciar" @@ -761,4 +758,9 @@ BEGIN IDS_COPY_OF "Cpia de" IDS_SHLEXEC_NOASSOC "No existe um programa Windows configurado para abrir este tipo de ficheiro." + + IDS_FILE_DETAILS "Detalhes para '%s' extenso" + IDS_FILE_DETAILSADV "Ficheiros com extenso '%s' so do tipo '%s'. Para mudar definies que afectam todos '%s' ficheiros, click Avanado." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index ef9e21361f0..a0979c8acf3 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -127,7 +127,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Versiune " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Versiune "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Versiune de ReactOS înregistrată pentru:", IDC_STATIC, 35, 115, 180, 10 @@ -427,7 +427,7 @@ LTEXT "Deschidere cu:", -1, 12, 140, 40, 10 //ICON LTEXT "Nume ap.", 14005, 100, 140, 40, 10 PUSHBUTTON "&Schimbare", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Fișierele cu extensia '%s' sunt de tipul '%s'. \nPentru a schimbat setări care vor afecta\ntoate fișierele '%s', clic pe Avansat.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "A&vansat", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -658,10 +658,7 @@ BEGIN IDS_CANTTRASH_TEXT "Elementul '%1' nu poate fi trimit la gunoi. Vreți să îl ștergeți definitiv în schimb?" IDS_OVERWRITEFILE_TEXT "Acest dosar deja conține un fișier numit '%1'.\n\nVreți să îl înlocuiți" IDS_OVERWRITEFILE_CAPTION "Confirmare înlocuire fișier" - IDS_OVERWRITEFOLDER_TEXT "Acest dosar deja conține un sub-dosar cu numele '%1'.\n\n"\ - "Dacă fișierele din dosarul de destinație au același nume ca cele din\n"\ - "dosarul selectat, ele vor fi înlocuite. Sigur vreți să copiați sau\n"\ - "mutați dosarul?" + IDS_OVERWRITEFOLDER_TEXT "Acest dosar deja conține un sub-dosar cu numele '%1'.\n\nDacă fișierele din dosarul de destinație au același nume ca cele din\ndosarul selectat, ele vor fi înlocuite. Sigur vreți să copiați sau\nmutați dosarul?" /* message box strings */ IDS_RESTART_TITLE "Repornire" @@ -760,6 +757,11 @@ BEGIN IDS_DEFAULT_CLUSTER_SIZE "Mărime de alocare implicită" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Detalii pentru extensia '%s'" + IDS_FILE_DETAILSADV "Fișierele cu extensia '%s' sunt de tipul '%s'. Pentru a schimbat setări care vor afecta toate fișierele '%s', clic pe Avansat." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END #pragma code_page(default) diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index 62a4167f921..28f8f7a7cd1 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -21,10 +21,10 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT MENU_001 MENU DISCARDABLE BEGIN - MENUITEM "& ", FCIDM_SHVIEW_BIGICON - MENUITEM "& ", FCIDM_SHVIEW_SMALLICON - MENUITEM "&", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW + MENUITEM "&Большие значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Мелкие значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Список", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробно", FCIDM_SHVIEW_REPORTVIEW END /* shellview background menu */ @@ -32,31 +32,31 @@ MENU_002 MENU DISCARDABLE BEGIN POPUP "" BEGIN - POPUP "&" + POPUP "&Просмотр" BEGIN - MENUITEM "& ", FCIDM_SHVIEW_BIGICON - MENUITEM "& ", FCIDM_SHVIEW_SMALLICON - MENUITEM "&", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW + MENUITEM "&Большие значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Мелкие значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Список", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробно", FCIDM_SHVIEW_REPORTVIEW END MENUITEM SEPARATOR - POPUP " &" + POPUP "Упорядочить &значки" BEGIN - MENUITEM " &", 0x30 /* column 0 */ - MENUITEM " &", 0x32 /* column 2 */ - MENUITEM " &", 0x31 /* ... */ - MENUITEM " &", 0x33 + MENUITEM "По &имени", 0x30 /* column 0 */ + MENUITEM "По &типу", 0x32 /* column 2 */ + MENUITEM "По &размеру", 0x31 /* ... */ + MENUITEM "По &дате", 0x33 MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_AUTOARRANGE + MENUITEM "&Автоматически", FCIDM_SHVIEW_AUTOARRANGE END - MENUITEM "& ", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM "В&ыровнять значки", FCIDM_SHVIEW_SNAPTOGRID MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_REFRESH + MENUITEM "О&бновить", FCIDM_SHVIEW_REFRESH MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_INSERT - MENUITEM " &", FCIDM_SHVIEW_INSERTLINK + MENUITEM "&Вставить", FCIDM_SHVIEW_INSERT + MENUITEM "Вставить &ярлык", FCIDM_SHVIEW_INSERTLINK MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_PROPERTIES + MENUITEM "Сво&йства", FCIDM_SHVIEW_PROPERTIES END END @@ -65,27 +65,27 @@ MENU_SHV_FILE MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&", FCIDM_SHVIEW_EXPLORE - MENUITEM "&", FCIDM_SHVIEW_OPEN + MENUITEM "&Проводник", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Открыть", FCIDM_SHVIEW_OPEN MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_CUT - MENUITEM "&", FCIDM_SHVIEW_COPY + MENUITEM "&Вырезать", FCIDM_SHVIEW_CUT + MENUITEM "&Копировать", FCIDM_SHVIEW_COPY MENUITEM SEPARATOR - MENUITEM " &", FCIDM_SHVIEW_CREATELINK - MENUITEM "&", FCIDM_SHVIEW_DELETE - MENUITEM "&", FCIDM_SHVIEW_RENAME + MENUITEM "Создать &ярлык", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Удалить", FCIDM_SHVIEW_DELETE + MENUITEM "Переи&меновать", FCIDM_SHVIEW_RENAME MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_PROPERTIES + MENUITEM "Сво&йства", FCIDM_SHVIEW_PROPERTIES END END SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Обзор" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 80, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", 2, 134, 174, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Отмена", 2, 134, 174, 50, 14, WS_GROUP | WS_TABSTOP LTEXT "", IDD_TITLE, 4, 4, 180, 12 LTEXT "", IDD_STATUS, 4, 25, 180, 12 CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 @@ -93,47 +93,47 @@ END SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Обзор" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDD_TITLE, 10, 8, 198, 24 LTEXT "", IDD_STATUS, 10, 25, 198, 12 - LTEXT ":", IDD_FOLDER, 10, 152, 40, 12 + LTEXT "Папка:", IDD_FOLDER, 10, 152, 40, 12 CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP - PUSHBUTTON "& ", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Создать папку", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Отменить", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP END SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Уведомление" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "& ", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "&Да", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Д&а для всех", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Нет", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Отмена", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP ICON "", IDD_ICON, 10, 10, 16, 16 LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 END IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " %s" +CAPTION "О %s" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT " " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Версия "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 - LTEXT " ReactOS :", IDC_STATIC, 35, 115, 180, 10 + LTEXT "Данная версия ReactOS зарегистрирована на:", IDC_STATIC, 35, 115, 180, 10 LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ - LTEXT " :", IDC_STATIC, 35, 152, 130, 10 + LTEXT "Доступная физическая память:", IDC_STATIC, 35, 152, 130, 10 LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 @@ -144,7 +144,7 @@ IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS:", IDC_STATIC, 0, 0, 180, 10 + LTEXT "Разработчики ReactOS:", IDC_STATIC, 0, 0, 180, 10 LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 END @@ -154,607 +154,610 @@ CAPTION "" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT " , , , ReactOS .", 12289, 36, 11, 182, 18 - LTEXT "&:", 12305, 5, 39, 34, 10 + LTEXT "Введите имя программы, папки, документа или ресурс Интернета, и ReactOS откроет их.", 12289, 36, 11, 182, 18 + LTEXT "&Открыть:", 12305, 5, 39, 34, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 40, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", 12288, 170, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Об&зор...", 12288, 170, 63, 50, 14, WS_TABSTOP END SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Ярлык" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE - LTEXT " :", 14004, 8, 38, 64, 10 + LTEXT "Тип объекта:", 14004, 8, 38, 64, 10 LTEXT "", 14005, 78, 38, 142, 10 - LTEXT ":", 14006, 8, 58, 64, 10 + LTEXT "Размещение:", 14006, 8, 58, 64, 10 EDITTEXT 14007, 79, 58, 141, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14008, 8, 77, 45, 10 + LTEXT "Объект:", 14008, 8, 77, 45, 10 EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL - LTEXT "& :", 14010, 8, 96, 57, 10 + LTEXT "&Рабочая папка:", 14010, 8, 96, 57, 10 EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL - LTEXT "& :", 14014, 8, 115, 57, 10 + LTEXT "Б&ыстрый вызов:", 14014, 8, 115, 57, 10 EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT - LTEXT ":", 14016, 8, 134, 57, 10 + LTEXT "Окно:", 14016, 8, 134, 57, 10 EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL - LTEXT "&:", 14018, 8, 152, 57, 10 + LTEXT "&Коментарий:", 14018, 8, 152, 57, 10 EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL - PUSHBUTTON "& ...", 14020, 9, 172, 70, 14, ES_LEFT - PUSHBUTTON "& ...", 14021, 84, 172, 70, 14, ES_LEFT - PUSHBUTTON "&...", 14022, 159, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Найти объект...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "См&енить значок...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Дополнительно...", 14022, 159, 172, 70, 14, ES_LEFT END SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Дополнительные свойства" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " .", -1, 5, 30, 210, 10 - CHECKBOX " ", 14000, 25, 50, 150, 10 - LTEXT " & , , .", -1, 50, 60, 175, 40 - CHECKBOX "& ", 14001, 25, 104, 160, 10, WS_DISABLED + LTEXT "Установите нужные свойства для этого ярлыка.", -1, 5, 30, 210, 10 + CHECKBOX "Запускать с другими учетными данными", 14000, 25, 50, 150, 10 + LTEXT "Позволяет использовать этот ярлык для запуска программы от &имени администратора, в то же время продолжая работу от своего имени, что защищает компьютер от несанкционированных действий других программ.", -1, 50, 60, 175, 40 + CHECKBOX "Запус&кать в отдельной области памяти", 14001, 25, 104, 160, 10, WS_DISABLED PUSHBUTTON "OK", IDOK, 54, 123, 50, 14, WS_VISIBLE - PUSHBUTTON "", IDCANCEL, 120, 123, 50, 14, WS_VISIBLE + PUSHBUTTON "Отмена", IDCANCEL, 120, 123, 50, 14, WS_VISIBLE END SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY - LTEXT " :", 14004, 8, 35, 50, 10 - LTEXT "", 14005, 68, 35, 160, 10 - LTEXT ":", 14006, 8, 53, 50, 10 + LTEXT "Тип файла:", 14004, 8, 35, 50, 10 + LTEXT "Папка", 14005, 68, 35, 160, 10 + LTEXT "Расположение:", 14006, 8, 53, 50, 10 EDITTEXT 14007, 68, 53, 315, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14008, 8, 72, 45, 10 + LTEXT "Размер:", 14008, 8, 72, 45, 10 EDITTEXT 14009, 68, 72, 315, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14010, 8, 93, 45, 10 + LTEXT "Содержит:", 14010, 8, 93, 45, 10 EDITTEXT 14011, 68, 93, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14014, 8, 118, 45, 10 + LTEXT "Создано:", 14014, 8, 118, 45, 10 EDITTEXT 14015, 68, 118, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - AUTOCHECKBOX "& ", 14021, 45, 150, 67, 10 - AUTOCHECKBOX "&", 14022, 126, 150, 50, 10 + AUTOCHECKBOX "&Только чтение", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Скрыто", 14022, 126, 150, 50, 10 END SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY - LTEXT " :", 14004, 8, 35, 50, 10 - LTEXT "", 14005, 68, 35, 160, 10 - LTEXT ":", 14006, 8, 53, 50, 10 + LTEXT "Тип файла:", 14004, 8, 35, 50, 10 + LTEXT "файл", 14005, 68, 35, 160, 10 + LTEXT "Приложение:", 14006, 8, 53, 50, 10 EDITTEXT 14007, 68, 53, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14008, 8, 72, 45, 10 + LTEXT "Размещение:", 14008, 8, 72, 45, 10 EDITTEXT 14009, 68, 72, 315, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14010, 8, 93, 45, 10 + LTEXT "Размер:", 14010, 8, 93, 45, 10 EDITTEXT 14011, 68, 93, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14014, 8, 118, 45, 10 + LTEXT "Создан:", 14014, 8, 118, 45, 10 EDITTEXT 14015, 68, 118, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14016, 8, 140, 45, 10 + LTEXT "Изменен:", 14016, 8, 140, 45, 10 EDITTEXT 14017, 68, 140, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14018, 8, 160, 45, 10 + LTEXT "Открыт:", 14018, 8, 160, 45, 10 EDITTEXT 14019, 68, 160, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14020, 8, 189, 45, 10 - CHECKBOX " &", 14021, 58, 189, 67, 10 - CHECKBOX "&", 14022, 126, 189, 50, 10 - CHECKBOX "&", 14023, 181, 189, 49, 10 + LTEXT "Атрибуты:", 14020, 8, 189, 45, 10 + CHECKBOX "Только &чтение", 14021, 58, 189, 67, 10 + CHECKBOX "Скр&ытый", 14022, 126, 189, 50, 10 + CHECKBOX "&Архивный", 14023, 181, 189, 49, 10 END SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Версия" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " : ", 14000, 10, 10, 55, 10 + LTEXT "Версия файла: ", 14000, 10, 10, 55, 10 EDITTEXT 14001, 77, 10, 152, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ": ", 14002, 10, 27, 45, 10 + LTEXT "Описание: ", 14002, 10, 27, 45, 10 EDITTEXT 14003, 77, 27, 152, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT " : ", 14004, 10, 46, 66, 10 + LTEXT "Авторские права: ", 14004, 10, 46, 66, 10 EDITTEXT 14005, 77, 46, 152, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - GROUPBOX " : ", 14006, 6, 70, 222, 115 - LTEXT " : ", 14007, 13, 82, 63, 10 - LTEXT ": ", 14008, 112, 82, 45, 10 + GROUPBOX "Дополнительные сведения: ", 14006, 6, 70, 222, 115 + LTEXT "Имя элемента: ", 14007, 13, 82, 63, 10 + LTEXT "Значение: ", 14008, 112, 82, 45, 10 LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY END DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP - LTEXT ":", -1, 15, 49, 40, 10 + LTEXT "Тип:", -1, 15, 49, 40, 10 EDITTEXT 14001, 110, 49, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT " :", -1, 15, 68, 86, 10 + LTEXT "Файловая система:", -1, 15, 68, 86, 10 EDITTEXT 14002, 110, 68, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER CONTROL "", 14013, "STATIC", SS_OWNERDRAW | SS_NOTIFY | SS_SUNKEN, 5, 90, 10, 10 - LTEXT ":", -1, 25, 90, 78, 10 + LTEXT "Занято:", -1, 25, 90, 78, 10 EDITTEXT 14003, 110, 90, 85, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER EDITTEXT 14004, 200, 90, 40, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER CONTROL "", 14014, "STATIC", SS_OWNERDRAW | SS_NOTIFY | SS_SUNKEN, 5, 105, 10, 10 - LTEXT ":", -1, 25, 105, 70, 10 + LTEXT "Свободно:", -1, 25, 105, 70, 10 EDITTEXT 14005, 110, 105, 85, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER EDITTEXT 14006, 200, 105, 40, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", -1, 25, 125, 80, 10 + LTEXT "Емкость:", -1, 25, 125, 80, 10 EDITTEXT 14007, 110, 125, 85, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER EDITTEXT 14008, 200, 125, 40, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER CONTROL "", 14015, "STATIC", SS_OWNERDRAW | SS_NOTIFY | SS_SUNKEN, 20, 140, 200, 20 - LTEXT " %s", 14009, 100, 170, 52, 10 - PUSHBUTTON " ", 14010, 166, 175, 64, 15, WS_TABSTOP - CHECKBOX "& ", 14011, 15, 205, 180, 10, WS_DISABLED - CHECKBOX " & ", 14012, 15, 220, 216, 10, WS_DISABLED + LTEXT "Диск %s", 14009, 100, 170, 52, 10 + PUSHBUTTON "Очистка диска", 14010, 166, 175, 64, 15, WS_TABSTOP + CHECKBOX "&Сжимать для экономии места", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Разрешить &индексирование диска для быстрого поиска", 14012, 15, 220, 216, 10, WS_DISABLED END DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Сервис" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", -1, 5, 5, 230, 60 - LTEXT " .", -1, 40, 25, 160, 20 - PUSHBUTTON " &...", 14000, 116, 45, 112, 15, WS_TABSTOP - GROUPBOX " ", -1, 5, 65, 230, 60 - LTEXT " , .", -1, 40, 85, 160, 20 - PUSHBUTTON " &...", 14001, 116, 105, 112, 15, WS_TABSTOP - GROUPBOX "", -1, 5, 130, 230, 60 - LTEXT " , .", -1, 40, 150, 160, 20 - PUSHBUTTON " &...", 14002, 116, 170, 112, 15, WS_TABSTOP + GROUPBOX "Проверка диска", -1, 5, 5, 230, 60 + LTEXT "Проверка тома на наличие ошибок.", -1, 40, 25, 160, 20 + PUSHBUTTON "Выполнить &проверку...", 14000, 116, 45, 112, 15, WS_TABSTOP + GROUPBOX "Дефрагментация диска", -1, 5, 65, 230, 60 + LTEXT "Дефрагментация файлов, хранящихся на этом томе.", -1, 40, 85, 160, 20 + PUSHBUTTON "Выполнить д&ефрагментацию...", 14001, 116, 105, 112, 15, WS_TABSTOP + GROUPBOX "Архивация", -1, 5, 130, 230, 60 + LTEXT "Архивация файлов, хранящихся на этом томе.", -1, 40, 150, 160, 20 + PUSHBUTTON "Выполнить &архивацию...", 14002, 116, 170, 112, 15, WS_TABSTOP END DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Оборудование" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN END RUN_AS_DIALOG DIALOGEX 0, 0, 252, 190 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Запуск от другого имени" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ?", -1, 10, 19, 230, 20 - CHECKBOX " %s", 14000, 10, 42, 210, 10 - LTEXT " .", -1, 21, 57, 225, 20, WS_DISABLED - CHECKBOX " , ", 14001, 25, 79, 221, 24, BS_MULTILINE | WS_DISABLED - CHECKBOX " :", 14002, 10, 110, 187, 10 - LTEXT " :", -1, 16, 133, 54, 10 + LTEXT "От имени какого пользователя вы хотите запустить программу?", -1, 10, 19, 230, 20 + CHECKBOX "Текущий пользователь %s", 14000, 10, 42, 210, 10 + LTEXT "Защитить мой компьютер и мои данные от несанкционированной деятельности программ.", -1, 21, 57, 225, 20, WS_DISABLED + CHECKBOX "Данная опция может защитить ваш компьютер и данные от вирусов, но программа может работать неправильно", 14001, 25, 79, 221, 24, BS_MULTILINE | WS_DISABLED + CHECKBOX "Запустить от имени следующего пользователя:", 14002, 10, 110, 187, 10 + LTEXT "Имя пользователя:", -1, 16, 133, 54, 10 COMBOBOX 14003, 76, 130, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "...", 14004, 180, 130, 30, 14, WS_TABSTOP - LTEXT ":", -1, 16, 152, 60, 10 + LTEXT "Пароль:", -1, 16, 152, 60, 10 EDITTEXT 14005, 76, 148, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP PUSHBUTTON "...", 14006, 180, 148, 30, 14, WS_TABSTOP PUSHBUTTON "OK", 14007, 59, 170, 60, 14, WS_TABSTOP - PUSHBUTTON "", 14008, 125, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Отмена", 14008, 125, 170, 60, 14, WS_TABSTOP END BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION ": " +CAPTION "Свойства: Корзина" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 - GROUPBOX " ", -1, 10, 66, 220, 73 - RADIOBUTTON "& :", 14001, 17, 80, 80, 10, NOT WS_TABSTOP + GROUPBOX "Установки для выбранного расположения", -1, 10, 66, 220, 73 + RADIOBUTTON "&Другой размер:", 14001, 17, 80, 80, 10, NOT WS_TABSTOP EDITTEXT 14002, 100, 78, 65, 14, WS_TABSTOP | ES_NUMBER - LTEXT "& ():", -1, 17, 95, 102, 10 - RADIOBUTTON "& , .", 14003, 17, 108, 206, 20, BS_MULTILINE | WS_TABSTOP - AUTOCHECKBOX "& ", 14004, 20, 145, 176, 10, WS_TABSTOP + LTEXT "&Максимальный размер(Мб):", -1, 17, 95, 102, 10 + RADIOBUTTON "&Уничтожать файлы сразу после удаления, не помещая их в корзину.", 14003, 17, 108, 206, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Запрашивать подтверждение на удаление", 14004, 20, 145, 176, 10, WS_TABSTOP END OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Выбор программы" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 - LTEXT " .", -1, 44, 12, 211, 10 - LTEXT ": ", 14001, 44, 25, 188, 10 - GROUPBOX "", -1, 7, 42, 249, 187 + LTEXT "Выберите программу для открытия этого файла.", -1, 44, 12, 211, 10 + LTEXT "Файл: ", 14001, 44, 25, 188, 10 + GROUPBOX "Программы", -1, 7, 42, 249, 187 LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE - AUTOCHECKBOX "& ", 14003, 20, 193, 225, 10 - PUSHBUTTON "&...", 14004, 198, 207, 50, 14 + AUTOCHECKBOX "&Использовать ее для всех файлов такого типа", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Обзор...", 14004, 198, 207, 50, 14 PUSHBUTTON "OK", 14005, 150, 236, 50, 14 - PUSHBUTTON "", 14006, 206, 236, 50, 14 + PUSHBUTTON "Отмена", 14006, 206, 236, 50, 14 END FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 238 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "", -1, 7, 10, 249, 45 + GROUPBOX "Задачи", -1, 7, 10, 249, 45 ICON "", 30109, 14, 24, 21, 20, SS_REALSIZECONTROL - AUTORADIOBUTTON "& ", 14001, 40, 24, 185, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON " & ReactOS", 14002, 40, 36, 185, 10, WS_TABSTOP | WS_GROUP - GROUPBOX " ", -1, 7, 60, 249, 45, WS_TABSTOP + AUTORADIOBUTTON "Отобра&жение списка типичных задач в папках", 14001, 40, 24, 185, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Использовать обы&чные папки ReactOS", 14002, 40, 36, 185, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Обзор папок", -1, 7, 60, 249, 45, WS_TABSTOP ICON "", 30110, 14, 75, 21, 20, SS_REALSIZECONTROL - AUTORADIOBUTTON "& ", 14004, 40, 75, 185, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "& ", 14005, 40, 87, 185, 10, WS_TABSTOP | WS_GROUP - GROUPBOX " ", -1, 7, 110, 249, 60 + AUTORADIOBUTTON "&Открывать папки в одном и том же окне", 14004, 40, 75, 185, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "О&ткрывать каждую папку в отдельном окне", 14005, 40, 87, 185, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Щелчки мышью", -1, 7, 110, 249, 60 ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL - AUTORADIOBUTTON "& , ", 14007, 40, 120, 200, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "& ", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON " & ", 14009, 50, 144, 185, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "& , ", 14010, 40, 156, 195, 10, WS_TABSTOP | WS_GROUP - PUSHBUTTON "& ", 14011, 148, 180, 104, 14, WS_TABSTOP + AUTORADIOBUTTON "От&крывать одним щелчком, выделять указателем", 14007, 40, 120, 200, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Подчеркив&ать подписи значков", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Подчеркивать подписи з&начков при наведении", 14009, 50, 144, 185, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Откр&ывать двойным, а выделять одним щелчком", 14010, 40, 156, 195, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Восстановить умолчания", 14011, 148, 180, 104, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 238 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Вид" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN -GROUPBOX " ", -1, 7, 10, 249, 60 +GROUPBOX "Представление папок", -1, 7, 10, 249, 60 //ICON -LTEXT " , , , """" """", .", -1, 60, 24, 180, 20 -PUSHBUTTON "& ", 14001, 60, 50, 100, 14, WS_TABSTOP -PUSHBUTTON "& ", 14002, 164, 50, 80, 14, WS_TABSTOP -LTEXT " :", -1, 9, 78, 120, 10 +LTEXT "Можно применить вид, выбранный для этой папки, например, ""Таблица"" или ""Плитка"", ко всем папкам.", -1, 60, 24, 180, 20 +PUSHBUTTON "&Применить ко всем папкам", 14001, 60, 50, 100, 14, WS_TABSTOP +PUSHBUTTON "&Сброс для всех папок", 14002, 164, 50, 80, 14, WS_TABSTOP +LTEXT "Дополнительные параметры:", -1, 9, 78, 120, 10 CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 -PUSHBUTTON "& ", 14004, 156, 216, 101, 14, WS_TABSTOP +PUSHBUTTON "&Восстановить умолчания", 14004, 156, 216, 101, 14, WS_TABSTOP END FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 238 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Типы файлов" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN -LTEXT "& :", -1, 9, 7, 133, 10 +LTEXT "&Зарегистрированные типы файлов:", -1, 9, 7, 133, 10 CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 -PUSHBUTTON "&", 14001, 147, 110, 50, 14, WS_TABSTOP -PUSHBUTTON "&", 14002, 202, 110, 50, 14, WS_TABSTOP -GROUPBOX " '%s'", 14003, 7, 130, 249, 70 -LTEXT " :", -1, 12, 142, 54, 10 +PUSHBUTTON "&Создать", 14001, 147, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Удалить", 14002, 202, 110, 50, 14, WS_TABSTOP +GROUPBOX "Описание расширения '%s'", 14003, 7, 130, 249, 70 +LTEXT "Открывать в:", -1, 12, 142, 54, 10 //ICON -LTEXT ":", 14005, 100, 142, 54, 10 -PUSHBUTTON "&...", 14006, 180, 140, 63, 14, WS_TABSTOP -LTEXT " '%s' '%s'. '%s', """".", 14007, 12, 155, 162, 36 -PUSHBUTTON "&", 14008, 180, 175, 63, 14, WS_TABSTOP +LTEXT "Приложение:", 14005, 100, 142, 54, 10 +PUSHBUTTON "&Изменить...", 14006, 180, 140, 63, 14, WS_TABSTOP +LTEXT "", 14007, 12, 155, 162, 36 +PUSHBUTTON "До&полнительно", 14008, 180, 175, 63, 14, WS_TABSTOP END CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Подтверждение замены файла" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", IDYES, 20, 122, 60, 14 - PUSHBUTTON " - &", 12807, 85, 122, 60, 14 - PUSHBUTTON "&", IDNO, 150, 122, 60, 14 - PUSHBUTTON "", IDCANCEL, 215, 122, 60, 14 + DEFPUSHBUTTON "&Да", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Да - для &всех", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Нет", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 215, 122, 60, 14 ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL - LTEXT " ""%2"".", 12291, 44, 10, 231, 22, SS_NOPREFIX - LTEXT " ""%2"".", 12292, 41, 10, 222, 22, SS_NOPREFIX - LTEXT " ""%2"".", 12293, 41, 10, 222, 22, SS_NOPREFIX - LTEXT " ", -1, 44, 35, 228, 10, SS_NOPREFIX - LTEXT "( )", 12302, 79, 51, 198, 20, SS_NOPREFIX + LTEXT "Папка уже содержит файл ""%2"".", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Папка уже содержит доступный только для чтения файл ""%2"".", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Папка уже содержит системный файл ""%2"".", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Заменить имеющийся файл", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(дата и размер неизвестны)", 12302, 79, 51, 198, 20, SS_NOPREFIX ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL - LTEXT " ?", -1, 44, 75, 228, 10, SS_NOPREFIX - LTEXT "( )", 12303, 79, 91, 198, 20, SS_NOPREFIX + LTEXT "следующим файлом?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(дата и размер неизвестны)", 12303, 79, 91, 198, 20, SS_NOPREFIX ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END LOGOFF_DLG DIALOGEX 0, 0, 190, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Выход из ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL - LTEXT " ?", -1, 43, 11, 140, 22 - DEFPUSHBUTTON "&", IDOK, 57, 40, 60, 14 - PUSHBUTTON "", IDCANCEL, 122, 40, 60, 14 + LTEXT "Вы действительно хотите выйти из системы?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "В&ыход", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 122, 40, 60, 14 END DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Отключение ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL - LTEXT " ?", -1, 49, 12, 137, 23 - DEFPUSHBUTTON "&", IDOK, 57, 40, 60, 14 - PUSHBUTTON "", IDCANCEL, 123, 40, 60, 14 + LTEXT "Вы действительно хотите выполнить отключение?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "Отклю&чение", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 123, 40, 60, 14 END AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "" +CAPTION "Автозапуск" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " & , , :", 1000, 7, 7, 215, 20 + LTEXT "Выберите &тип содержимого, а затем действие, автоматически выполняемое при его обнаружении в этом устройстве:", 1000, 7, 7, 215, 20 CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 - GROUPBOX "", -1, 7, 45, 212, 146 - AUTORADIOBUTTON "& :", 1005, 14, 54, 202, 10, WS_GROUP + GROUPBOX "Действия", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "&Выберите выполняемое действие:", 1005, 14, 54, 202, 10, WS_GROUP CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 - AUTORADIOBUTTON " & ", 1006, 14, 177, 202, 10 - PUSHBUTTON " &", 1008, 108, 197, 110, 14, WS_DISABLED + AUTORADIOBUTTON "Выдавать &запрос на выбор выполняемого действия", 1006, 14, 177, 202, 10 + PUSHBUTTON "Восстановить умол&чания", 1008, 108, 197, 110, 14, WS_DISABLED END MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION " " +CAPTION "Смешанное содержимое" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT " .", 1001, 32, 7, 191, 20 - LTEXT " ReactOS?", 1002, 32, 31, 188, 8 + LTEXT "На этом диске или устройстве хранится содержимое различных типов.", 1001, 32, 7, 191, 20 + LTEXT "Какое действие следует выполнять ReactOS?", 1002, 32, 31, 188, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 - PUSHBUTTON "", IDCANCEL, 160, 186, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 160, 186, 60, 14 END MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION " " +CAPTION "Смешанное содержимое" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "ReactOS , :", 1001, 30, 7, 193, 20 + LTEXT "ReactOS может всегда выполнять одно и то же действие, когда вы вставляете диск или подключаете устройство с файлами следующего типа:", 1001, 30, 7, 193, 20 ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT " ReactOS?", 1002, 32, 41, 190, 8 + LTEXT "Какое действие следует выполнять ReactOS?", 1002, 32, 41, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 - AUTOCHECKBOX " .", 1004, 32, 171, 190, 10 + AUTOCHECKBOX "Всегда выполнять выбранное действие.", 1004, 32, 171, 190, 10 DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 - PUSHBUTTON "", IDCANCEL, 160, 185, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 160, 185, 60, 14 END AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "" +CAPTION "Автозапуск" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "ReactOS .", 1001, 32, 7, 190, 22 - LTEXT "& ReactOS?", 1002, 32, 31, 190, 8 + LTEXT "ReactOS может выполнять одно и то же действие при каждом подключении этого устройства.", 1001, 32, 7, 190, 22 + LTEXT "&Какое действие следует выполнять ReactOS?", 1002, 32, 31, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 - AUTOCHECKBOX "& ", 1004, 32, 143, 190, 8 + AUTOCHECKBOX "&Всегда выполнять выбранное действие", 1004, 32, 143, 190, 8 DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 - PUSHBUTTON "", IDCANCEL, 159, 160, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 159, 160, 60, 14 END SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Завершение работы ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP - LTEXT " .", -1, 39, 7, 167, 10 + LTEXT "Выберите желаемое действие.", -1, 39, 7, 167, 10 COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL - LTEXT " , . .", 8225, 39, 40, 167, 37 + LTEXT "Сохранить сеанс, обеспечивая работу компьютера в спящем режиме и данными в памяти. При нажатии на любую клавишу или передвижении мыши компьютер возвратится в обычный режим.", 8225, 39, 40, 167, 37 DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP - PUSHBUTTON "", IDCANCEL, 75, 82, 60, 14 - PUSHBUTTON "&", IDHELP, 144, 82, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Справка", IDHELP, 144, 82, 60, 14 END FORMAT_DLG DIALOGEX 50, 50, 184, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Форматирование" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", IDOK, 53, 198, 60, 14 - PUSHBUTTON "&", IDCANCEL, 118, 198, 60, 14 - LTEXT "&:", -1, 7, 6, 169, 9 + DEFPUSHBUTTON "&Начать", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Закрыть", IDCANCEL, 118, 198, 60, 14 + LTEXT "&Емкость:", -1, 7, 6, 169, 9 COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", -1, 7, 35, 170, 9 + LTEXT "&Файловая система:", -1, 7, 35, 170, 9 COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 - LTEXT "& :", -1, 7, 64, 170, 9 + LTEXT "&Размер кластера:", -1, 7, 64, 170, 9 COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& :", -1, 7, 93, 170, 9 + LTEXT "&Метка тома:", -1, 7, 93, 170, 9 EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL - GROUPBOX "& :", 4610, 7, 121, 170, 49 - AUTOCHECKBOX "& ( )", 28674, 16, 135, 155, 10 - AUTOCHECKBOX "& ", 28675, 16, 152, 155, 10 + GROUPBOX "&Способы форматирования:", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Быстрое (очистка оглавления)", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Использовать сжатие", 28675, 16, 152, 155, 10 END CHKDSK_DLG DIALOGEX 50, 50, 232, 111 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Проверка диска" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "", IDOK, 101, 91, 60, 14 - GROUPBOX " ", -1, 7, 5, 218, 50 - PUSHBUTTON "", IDCANCEL, 165, 91, 60, 14 - AUTOCHECKBOX "& ", 14000, 16, 19, 178, 10 - AUTOCHECKBOX "& ", 14001, 16, 35, 200, 10 + DEFPUSHBUTTON "Запуск", IDOK, 101, 91, 60, 14 + GROUPBOX "Параметры проверки диска", -1, 7, 5, 218, 50 + PUSHBUTTON "Отмена", IDCANCEL, 165, 91, 60, 14 + AUTOCHECKBOX "&Автоматически исправлять системные ошибки", 14000, 16, 19, 178, 10 + AUTOCHECKBOX "&Проверять и востанавливать поврежденные сектора", 14001, 16, 35, 200, 10 CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 218, 8 LTEXT "", 14003, 7, 75, 218, 10 END IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Изменение значка" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT " :", -1, 7, 14, 208, 10 - PUSHBUTTON "...",IDC_BUTTON_PATH, 148, 24,67,14 + LTEXT "Имя файла:", -1, 7, 14, 208, 10 + PUSHBUTTON "Обзор...",IDC_BUTTON_PATH, 148, 24,67,14 EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL - LTEXT ":", -1, 7, 47, 208, 10 + LTEXT "Значки:", -1, 7, 47, 208, 10 LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 - PUSHBUTTON "",IDCANCEL, 167, 181, 50, 14 + PUSHBUTTON "Отмена",IDCANCEL, 167, 181, 50, 14 END STRINGTABLE DISCARDABLE BEGIN /* columns in the shellview */ - IDS_SHV_COLUMN1 "" - IDS_SHV_COLUMN2 "" - IDS_SHV_COLUMN3 "" - IDS_SHV_COLUMN4 "" - IDS_SHV_COLUMN5 "" - IDS_SHV_COLUMN6 " " - IDS_SHV_COLUMN7 "" - IDS_SHV_COLUMN8 "" - IDS_SHV_COLUMN9 "" - IDS_SHV_COLUMN10 "" - IDS_SHV_COLUMN11 "" - IDS_SHV_COLUMN12 " " - IDS_SHV_COLUMN13 "" - IDS_SHV_COLUMN_DELFROM " " - IDS_SHV_COLUMN_DELDATE " " - IDS_SHV_COLUMN_FONTTYPE " " - IDS_SHV_COLUMN_WORKGROUP " " - IDS_SHV_NETWORKLOCATION " " - IDS_SHV_COLUMN_DOCUMENTS "" - IDS_SHV_COLUMN_STATUS "" - IDS_SHV_COLUMN_COMMENTS "" - IDS_SHV_COLUMN_LOCATION "" - IDS_SHV_COLUMN_MODEL "" + IDS_SHV_COLUMN1 "Имя" + IDS_SHV_COLUMN2 "Размер" + IDS_SHV_COLUMN3 "Тип" + IDS_SHV_COLUMN4 "Изменён" + IDS_SHV_COLUMN5 "Атрибуты" + IDS_SHV_COLUMN6 "Полный объём" + IDS_SHV_COLUMN7 "Свободно" + IDS_SHV_COLUMN8 "Имя" + IDS_SHV_COLUMN9 "Комментарий" + IDS_SHV_COLUMN10 "Владелец" + IDS_SHV_COLUMN11 "Группа" + IDS_SHV_COLUMN12 "Имя файла" + IDS_SHV_COLUMN13 "Категория" + IDS_SHV_COLUMN_DELFROM "Изначальное расположение" + IDS_SHV_COLUMN_DELDATE "Дата удаления" + IDS_SHV_COLUMN_FONTTYPE "Тип шрифта" + IDS_SHV_COLUMN_WORKGROUP "Рабочая группа" + IDS_SHV_NETWORKLOCATION "Сетевое расположение" + IDS_SHV_COLUMN_DOCUMENTS "Документы" + IDS_SHV_COLUMN_STATUS "Состояние" + IDS_SHV_COLUMN_COMMENTS "Коментарии" + IDS_SHV_COLUMN_LOCATION "Расположение" + IDS_SHV_COLUMN_MODEL "Модель" /* special folders */ - IDS_DESKTOP " " - IDS_MYCOMPUTER " " - IDS_RECYCLEBIN_FOLDER_NAME "" - IDS_CONTROLPANEL " " - IDS_ADMINISTRATIVETOOLS "" + IDS_DESKTOP "Рабочий стол" + IDS_MYCOMPUTER "Мой компьютер" + IDS_RECYCLEBIN_FOLDER_NAME "Корзина" + IDS_CONTROLPANEL "Панель управления" + IDS_ADMINISTRATIVETOOLS "Администрирование" /* context menus */ - IDS_VIEW_LARGE "& " - IDS_VIEW_SMALL "& " - IDS_VIEW_LIST "&" - IDS_VIEW_DETAILS "&" - IDS_SELECT "&" - IDS_OPEN "&" - IDS_CREATELINK " &" - IDS_COPY "" - IDS_DELETE "" - IDS_PROPERTIES "" - IDS_CUT "" - IDS_RESTORE "" - IDS_FORMATDRIVE "..." - IDS_RENAME "" - IDS_INSERT "" + IDS_VIEW_LARGE "&Большие значки" + IDS_VIEW_SMALL "&Мелкие значки" + IDS_VIEW_LIST "&Список" + IDS_VIEW_DETAILS "&Подробно" + IDS_SELECT "&Выбрать" + IDS_OPEN "&Открыть" + IDS_CREATELINK "Создать &ярлык" + IDS_COPY "Копировать" + IDS_DELETE "Удалить" + IDS_PROPERTIES "Свойства" + IDS_CUT "Вырезать" + IDS_RESTORE "Востановить" + IDS_FORMATDRIVE "Форматировать..." + IDS_RENAME "Переименовать" + IDS_INSERT "Вставить" - IDS_CREATEFOLDER_DENIED " - ." - IDS_CREATEFOLDER_CAPTION " " - IDS_DELETEITEM_CAPTION " " - IDS_DELETEFOLDER_CAPTION " " - IDS_DELETEITEM_TEXT " '%1'?" - IDS_DELETEMULTIPLE_TEXT " (%1?" - IDS_DELETESELECTED_TEXT " ()?" - IDS_TRASHITEM_TEXT " '%1' ?" - IDS_TRASHFOLDER_TEXT " '%1' ?" - IDS_TRASHMULTIPLE_TEXT " %1 ?" - IDS_CANTTRASH_TEXT " '%1' . ?" - IDS_OVERWRITEFILE_TEXT " '%1'.\n\n ?" - IDS_OVERWRITEFILE_CAPTION " " - IDS_OVERWRITEFOLDER_TEXT " '%1'.\n\n"\ - " , \n"\ - ". ?" + IDS_CREATEFOLDER_DENIED "Невозможно создать папку - нет полномочий." + IDS_CREATEFOLDER_CAPTION "Ошибка во время создания папки" + IDS_DELETEITEM_CAPTION "Подтверждение удаления файла" + IDS_DELETEFOLDER_CAPTION "Подтверждение удаления папки" + IDS_DELETEITEM_TEXT "Удалить '%1'?" + IDS_DELETEMULTIPLE_TEXT "Удалить эти обьекты (%1?" + IDS_DELETESELECTED_TEXT "Вы действительно хотите удалить выбранный элементы(ы)?" + IDS_TRASHITEM_TEXT "Вы действильно хотите поместить '%1' в Корзину?" + IDS_TRASHFOLDER_TEXT "Вы действительно хотите поместить '%1' и все содержащиеся файлы в Корзину?" + IDS_TRASHMULTIPLE_TEXT "Вы действительно хотите переместить элементы %1 в Корзину?" + IDS_CANTTRASH_TEXT "Файл '%1' не может быть помещен в Корзину. Удалить безвозвратно?" + IDS_OVERWRITEFILE_TEXT "В этой папке уже имеется элемент '%1'.\n\nЗаменить его?" + IDS_OVERWRITEFILE_CAPTION "Подтверждение замены файла" + IDS_OVERWRITEFOLDER_TEXT "Эта папка уже содержит папку с именем '%1'.\n\nЕсли в папке содержатся файлы с одинаковыми именами, то они так же будут\nземенены. Продолжить?" /* message box strings */ - IDS_RESTART_TITLE "" - IDS_RESTART_PROMPT " ReactOS?" - IDS_SHUTDOWN_TITLE " " - IDS_SHUTDOWN_PROMPT " ReactOS?" + IDS_RESTART_TITLE "Перезагрузить" + IDS_RESTART_PROMPT "Вы действительно хотите перезагрузить ReactOS?" + IDS_SHUTDOWN_TITLE "Выключить питание" + IDS_SHUTDOWN_PROMPT "Закончить работу с ReactOS?" IDS_LOGOFF_TITLE "Log Off" IDS_LOGOFF_PROMPT "Do you want to log off?" /* Run File dialog */ - IDS_RUNDLG_ERROR " ( )" - IDS_RUNDLG_BROWSE_ERROR " ( )" - IDS_RUNDLG_BROWSE_CAPTION "" - IDS_RUNDLG_BROWSE_FILTER " (*.exe)\0*.exe\0 (*.*)\0*.*\0" + IDS_RUNDLG_ERROR "Невозможно отобразить Диалог Выполнить Файл (внутренняя ошибка)" + IDS_RUNDLG_BROWSE_ERROR "Невозможно отобразить Диалог Обзор (внутренняя ошибка)" + IDS_RUNDLG_BROWSE_CAPTION "Обзор" + IDS_RUNDLG_BROWSE_FILTER "Исполняемые файлы (*.exe)\0*.exe\0Все файлы (*.*)\0*.*\0" /* shell folder path default values */ - IDS_PROGRAMS " \\" - IDS_PERSONAL " " - IDS_FAVORITES "" - IDS_STARTUP " \\\\" - IDS_RECENT "" - IDS_SENDTO "" - IDS_STARTMENU " " - IDS_MYMUSIC " " - IDS_MYVIDEO " " - IDS_DESKTOPDIRECTORY " " - IDS_NETHOOD " " - IDS_TEMPLATES "" + IDS_PROGRAMS "Главное меню\\Программы" + IDS_PERSONAL "Мои документы" + IDS_FAVORITES "Избранное" + IDS_STARTUP "Главное меню\\Программы\\Автозагрузка" + IDS_RECENT "Недавнее" + IDS_SENDTO "Отправить" + IDS_STARTMENU "Главное меню" + IDS_MYMUSIC "Моя музыка" + IDS_MYVIDEO "Мои фильмы" + IDS_DESKTOPDIRECTORY "Рабочий стол" + IDS_NETHOOD "Сетевое окружение" + IDS_TEMPLATES "Шаблоны" IDS_APPDATA "Application Data" - IDS_PRINTHOOD "" + IDS_PRINTHOOD "Принтеры" IDS_LOCAL_APPDATA "Local Settings\\Application Data" IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" IDS_COOKIES "Cookies" IDS_HISTORY "Local Settings\\History" IDS_PROGRAM_FILES "Program Files" - IDS_MYPICTURES " " + IDS_MYPICTURES "Мои рисунки" IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" - IDS_COMMON_DOCUMENTS " " - IDS_ADMINTOOLS " \\\\" - IDS_COMMON_MUSIC " \\ " - IDS_COMMON_PICTURES " \\ " - IDS_COMMON_VIDEO " \\ " + IDS_COMMON_DOCUMENTS "Общие документы" + IDS_ADMINTOOLS "Главное меню\\Программы\\Администрирование" + IDS_COMMON_MUSIC "Общие документы\\Моя музыка" + IDS_COMMON_PICTURES "Общие документы\\Мои рисунки" + IDS_COMMON_VIDEO "Общие документы\\Мои фильмы" IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" - IDS_NETWORKPLACE " " + IDS_NETWORKPLACE "Сетевое окружение" - IDS_NEWFOLDER " " + IDS_NEWFOLDER "Новая папка" - IDS_DRIVE_FIXED " " + IDS_DRIVE_FIXED "Локальный диск" IDS_DRIVE_CDROM "CDROM" - IDS_DRIVE_NETWORK " " + IDS_DRIVE_NETWORK "Сетевой диск" - IDS_OPEN_WITH " " - IDS_OPEN_WITH_CHOOSE " ..." + IDS_OPEN_WITH "Открыть с помощью" + IDS_OPEN_WITH_CHOOSE "Выбрать программу..." - IDS_SHELL_ABOUT_AUTHORS "&" - IDS_SHELL_ABOUT_BACK "< &" - FCIDM_SHVIEW_NEW "" - FCIDM_SHVIEW_NEWFOLDER "&" - FCIDM_SHVIEW_NEWLINK "&" - IDS_FOLDER_OPTIONS " " - IDS_RECYCLEBIN_LOCATION " " - IDS_RECYCLEBIN_DISKSPACE " " - IDS_EMPTY_BITBUCKET " " - IDS_PICK_ICON_TITLE " " - IDS_PICK_ICON_FILTER " (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0 (*.*)\0*.*\0" - IDS_OPEN_WITH_FILTER " (*.exe)\0*.exe\0 (*.*)\0*.*\0" - IDS_DIRECTORY "" - IDS_VIRTUAL_DRIVER " " - IDS_BAT_FILE " ReactOS" - IDS_CMD_FILE " ReactOS" - IDS_COM_FILE " Dos" - IDS_CPL_FILE " " - IDS_CUR_FILE "" - IDS_DLL_FILE " " - IDS_DRV_FILE " " - IDS_EXE_FILE "" - IDS_FON_FILE " " - IDS_TTF_FILE " TrueType" - IDS_HLP_FILE " " - IDS_INI_FILE " " - IDS_LNK_FILE "" - IDS_SYS_FILE " " + IDS_SHELL_ABOUT_AUTHORS "&Авторы" + IDS_SHELL_ABOUT_BACK "< &Назад" + FCIDM_SHVIEW_NEW "Создать" + FCIDM_SHVIEW_NEWFOLDER "&Папка" + FCIDM_SHVIEW_NEWLINK "&Ярлык" + IDS_FOLDER_OPTIONS "Свойства папки" + IDS_RECYCLEBIN_LOCATION "Расположение Корзины" + IDS_RECYCLEBIN_DISKSPACE "Доступное пространство" + IDS_EMPTY_BITBUCKET "Очистить корзину" + IDS_PICK_ICON_TITLE "Выбрать значок" + IDS_PICK_ICON_FILTER "Файлы значков (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0Все файлы (*.*)\0*.*\0" + IDS_OPEN_WITH_FILTER "Исполняемые файлы (*.exe)\0*.exe\0Все файлы (*.*)\0*.*\0" + IDS_DIRECTORY "Папка" + IDS_VIRTUAL_DRIVER "Драйвер виртуального устройства" + IDS_BAT_FILE "Пакетный файл ReactOS" + IDS_CMD_FILE "Командный скрипт ReactOS" + IDS_COM_FILE "Приложение Dos" + IDS_CPL_FILE "Аплет панели управления" + IDS_CUR_FILE "Курсор" + IDS_DLL_FILE "Расширение приложения" + IDS_DRV_FILE "Драйвер устройства" + IDS_EXE_FILE "Приложение" + IDS_FON_FILE "Файл шрифта" + IDS_TTF_FILE "Файл шрифта TrueType" + IDS_HLP_FILE "Файл справки" + IDS_INI_FILE "Файл конфигурации" + IDS_LNK_FILE "Ярлык" + IDS_SYS_FILE "Системный файл" - IDS_OPEN_VERB "" - IDS_EXPLORE_VERB " " - IDS_RUNAS_VERB " " - IDS_EDIT_VERB "" - IDS_FIND_VERB "" - IDS_PRINT_VERB "" + IDS_OPEN_VERB "Открыть" + IDS_EXPLORE_VERB "Открыть в дереве" + IDS_RUNAS_VERB "Запустить как " + IDS_EDIT_VERB "Изменить" + IDS_FIND_VERB "Поиск" + IDS_PRINT_VERB "Печать" - IDS_FILE_FOLDER "%u , %u " - IDS_PRINTERS "" - IDS_FONTS "" - IDS_INSTALLNEWFONT " ..." + IDS_FILE_FOLDER "%u файлов, %u папок" + IDS_PRINTERS "Принтеры" + IDS_FONTS "Шрифты" + IDS_INSTALLNEWFONT "Установить новый шрифт..." - IDS_DEFAULT_CLUSTER_SIZE " " + IDS_DEFAULT_CLUSTER_SIZE "Выделяемый по умолчанию размер" IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Описание расширения '%s'" + IDS_FILE_DETAILSADV "Файлы с расширением '%s' имеют тип '%s'. Для изменения параметров всех файлов '%s', нажмите 'Дополнительно'." + IDS_FILE_TYPES "Типы файлов" + IDS_COLUMN_EXTENSION "Расширения" END diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc index dde08bb84d5..59a5cfede43 100644 --- a/dll/win32/shell32/lang/sk-SK.rc +++ b/dll/win32/shell32/lang/sk-SK.rc @@ -131,7 +131,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Verzia " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Verzia "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "Tto verzia systmu ReactOS je registrovan pre:", IDC_STATIC, 35, 115, 180, 10 @@ -430,7 +430,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Zmeni...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -661,10 +661,7 @@ BEGIN IDS_CANTTRASH_TEXT "Poloka '%1' neme by odoslan do koa. Chcete ju namiesto toho vymaza?" IDS_OVERWRITEFILE_TEXT "Tento prieinok u obsahuje sbor s nzvom '%1'.\n\nChcete ho nahradi?" IDS_OVERWRITEFILE_CAPTION "Potvrdenie prepsania sboru" - IDS_OVERWRITEFOLDER_TEXT "Tento prieinok u obsahuje prieinok s nzvom '%1'.\n\n"\ - "Ak bud ma sbory v cieovom prieinku rovnak nzvy ako sbory\n"\ - "vo vybranom prieinku, tak bud nahraden. Stle chcete presun\n"\ - "alebo skoprova prieinok?" + IDS_OVERWRITEFOLDER_TEXT "Tento prieinok u obsahuje prieinok s nzvom '%1'.\n\nAk bud ma sbory v cieovom prieinku rovnak nzvy ako sbory\nvo vybranom prieinku, tak bud nahraden. Stle chcete presun\nalebo skoprova prieinok?" /* message box strings */ IDS_RESTART_TITLE "Retartova" @@ -766,4 +763,9 @@ BEGIN // There is no Windows program configured to open this type of file. IDS_SHLEXEC_NOASSOC "Neexistuje iadny program nakonfigurovan tak, aby otvral tento typ sborov." // Na otvranie tohto typu sboru nie je nakonfigurovan iadny program systmu Windows. + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc index 79bd536fe1b..50e42afd81c 100644 --- a/dll/win32/shell32/lang/sl-SI.rc +++ b/dll/win32/shell32/lang/sl-SI.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "Noben Okenski program ni nastavljen, da bi odpiral ta tip datotek." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc index 6bfcf61da75..1ab43f1c1b9 100644 --- a/dll/win32/shell32/lang/sv-SE.rc +++ b/dll/win32/shell32/lang/sv-SE.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index b5f8e6258e3..cc0d4ed0ad7 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -125,7 +125,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -424,7 +424,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -655,10 +655,7 @@ BEGIN IDS_CANTTRASH_TEXT "'%1' adl e pe gnderilemiyor. Tamamen silmek ister misiniz?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Dosya zerine Yazmay Onayla" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Yeniden Balat" @@ -758,4 +755,9 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc index 181df04df91..8f2a3ebcf90 100644 --- a/dll/win32/shell32/lang/uk-UA.rc +++ b/dll/win32/shell32/lang/uk-UA.rc @@ -22,10 +22,10 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT MENU_001 MENU DISCARDABLE BEGIN - MENUITEM "& ", FCIDM_SHVIEW_BIGICON - MENUITEM "& ", FCIDM_SHVIEW_SMALLICON - MENUITEM "&", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW + MENUITEM "&Великі значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Дрібні значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "Спис&ок", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробиці", FCIDM_SHVIEW_REPORTVIEW END /* shellview background menu */ @@ -33,31 +33,31 @@ MENU_002 MENU DISCARDABLE BEGIN POPUP "" BEGIN - POPUP "&" + POPUP "&Вигляд" BEGIN - MENUITEM "& ", FCIDM_SHVIEW_BIGICON - MENUITEM "& ", FCIDM_SHVIEW_SMALLICON - MENUITEM "&", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW + MENUITEM "&Великі значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Дрібні значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "Спис&ок", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробиці", FCIDM_SHVIEW_REPORTVIEW END MENUITEM SEPARATOR - POPUP "& " + POPUP "&Упорядкувати значки" BEGIN - MENUITEM " &'", 0x30 /* column 0 */ - MENUITEM " &", 0x32 /* column 2 */ - MENUITEM " &", 0x31 /* ... */ - MENUITEM " &", 0x33 + MENUITEM "за &ім'ям", 0x30 /* column 0 */ + MENUITEM "за &типом", 0x32 /* column 2 */ + MENUITEM "за &розміром", 0x31 /* ... */ + MENUITEM "за &датою", 0x33 MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_AUTOARRANGE + MENUITEM "&автоматично", FCIDM_SHVIEW_AUTOARRANGE END - MENUITEM " ", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM "Вирівняти значки", FCIDM_SHVIEW_SNAPTOGRID MENUITEM SEPARATOR - MENUITEM "", FCIDM_SHVIEW_REFRESH + MENUITEM "Оновити", FCIDM_SHVIEW_REFRESH MENUITEM SEPARATOR - MENUITEM "", FCIDM_SHVIEW_INSERT - MENUITEM " ", FCIDM_SHVIEW_INSERTLINK + MENUITEM "Вставити", FCIDM_SHVIEW_INSERT + MENUITEM "Вставити ярлик", FCIDM_SHVIEW_INSERTLINK MENUITEM SEPARATOR - MENUITEM "", FCIDM_SHVIEW_PROPERTIES + MENUITEM "Властивості", FCIDM_SHVIEW_PROPERTIES END END @@ -66,27 +66,27 @@ MENU_SHV_FILE MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&", FCIDM_SHVIEW_EXPLORE - MENUITEM "&", FCIDM_SHVIEW_OPEN + MENUITEM "&Провідник", FCIDM_SHVIEW_EXPLORE + MENUITEM "В&ідкрити", FCIDM_SHVIEW_OPEN MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_CUT - MENUITEM "&", FCIDM_SHVIEW_COPY + MENUITEM "&Вирізати", FCIDM_SHVIEW_CUT + MENUITEM "&Копіювати", FCIDM_SHVIEW_COPY MENUITEM SEPARATOR - MENUITEM " &", FCIDM_SHVIEW_CREATELINK - MENUITEM "&", FCIDM_SHVIEW_DELETE - MENUITEM "&", FCIDM_SHVIEW_RENAME + MENUITEM "Створити &ярлик", FCIDM_SHVIEW_CREATELINK + MENUITEM "В&идалити", FCIDM_SHVIEW_DELETE + MENUITEM "Перей&менувати", FCIDM_SHVIEW_RENAME MENUITEM SEPARATOR - MENUITEM "&", FCIDM_SHVIEW_PROPERTIES + MENUITEM "В&ластивості", FCIDM_SHVIEW_PROPERTIES END END SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Огляд тек" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP LTEXT "", IDD_TITLE, 4, 4, 180, 12 LTEXT "", IDD_STATUS, 4, 25, 180, 12 CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 @@ -94,47 +94,47 @@ END SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Огляд тек" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDD_TITLE, 10, 8, 198, 24 LTEXT "", IDD_STATUS, 10, 25, 198, 12 - LTEXT ":", IDD_FOLDER, 10, 152, 40, 12 + LTEXT "Тека:", IDD_FOLDER, 10, 152, 40, 12 CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP - PUSHBUTTON " &", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Створити &теку", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP END SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Повідомлення" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON " &", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&ͳ", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "&Так", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Так для &всіх", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ні", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Скасувати", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP ICON "", IDD_ICON, 10, 10, 16, 16 LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 END IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " %s" +CAPTION "Про %s" FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT " " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Версія "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 - LTEXT " ReactOS :", IDC_STATIC, 35, 115, 180, 10 + LTEXT "Ця версія ReactOS зареєстрована на:", IDC_STATIC, 35, 115, 180, 10 LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ - LTEXT " ':", IDC_STATIC, 35, 152, 130, 10 + LTEXT "Доступна фізична пам'ять:", IDC_STATIC, 35, 152, 130, 10 LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 @@ -145,630 +145,632 @@ IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 STYLE DS_SHELLFONT | WS_CHILD FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS:", IDC_STATIC, 0, 0, 180, 10 + LTEXT "Розробники ReactOS:", IDC_STATIC, 0, 0, 180, 10 LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 END SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" +CAPTION "Виконати" FONT 8, "MS Shell Dlg" BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT " ' , , , ReactOS .", 12289, 36, 11, 182, 18 - LTEXT "&³:", 12305, 3, 39, 32, 10 + LTEXT "Введіть ім'я програми, теки, документа або ресурсу Інтернету, і ReactOS відкриє їх.", 12289, 36, 11, 182, 18 + LTEXT "&Відкрити:", 12305, 3, 39, 32, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&...", 12288, 170, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "О&гляд...", 12288, 170, 63, 50, 14, WS_TABSTOP END SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Ярлик" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE - LTEXT " ':", 14004, 8, 38, 64, 10 + LTEXT "Тип об'єкта:", 14004, 8, 38, 64, 10 LTEXT "", 14005, 78, 38, 142, 10 - LTEXT ":", 14006, 8, 58, 64, 10 + LTEXT "Розташування:", 14006, 8, 58, 64, 10 EDITTEXT 14007, 79, 58, 141, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT "&':", 14008, 8, 77, 45, 10 + LTEXT "О&б'єкт:", 14008, 8, 77, 45, 10 EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL - LTEXT "& :", 14010, 8, 96, 57, 10 + LTEXT "&Робоча папка:", 14010, 8, 96, 57, 10 EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL - LTEXT "& :", 14014, 8, 115, 57, 10 + LTEXT "&Швидкий виклик:", 14014, 8, 115, 57, 10 EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT - LTEXT "&³:", 14016, 8, 134, 57, 10 + LTEXT "&Вікно:", 14016, 8, 134, 57, 10 EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL - LTEXT "&:", 14018, 8, 152, 57, 10 + LTEXT "&Примітка:", 14018, 8, 152, 57, 10 EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL - PUSHBUTTON "& '...", 14020, 9, 172, 70, 14, ES_LEFT - PUSHBUTTON "& ...", 14021, 84, 172, 70, 14, ES_LEFT - PUSHBUTTON "&...", 14022, 159, 172, 70, 14, ES_LEFT + PUSHBUTTON "З&найти об'єкт...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Змінити значок...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Додатково...", 14022, 159, 172, 70, 14, ES_LEFT END SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Додаткові властивості" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " .", -1, 5, 30, 210, 10 - CHECKBOX " ", 14000, 25, 50, 150, 10 - LTEXT " , ' .", -1, 50, 60, 175, 40 - CHECKBOX " '", 14001, 25, 100, 90, 10, WS_DISABLED + LTEXT "Виберіть потрібні властивості для цього ярлика.", -1, 5, 30, 210, 10 + CHECKBOX "Запускати з іншими обліковими даними", 14000, 25, 50, 150, 10 + LTEXT "Цей параметр дозволяє використовувати цей ярлик від імені іншого користувача або продовжувати роботу від свого імені, що захищає комп'ютер й дані від несанкціонованих дій програми.", -1, 50, 60, 175, 40 + CHECKBOX "Запускати в окремій області пам'яті", 14001, 25, 100, 90, 10, WS_DISABLED PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE - PUSHBUTTON "", 2, 120, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Скасувати", 2, 120, 124, 50, 15, WS_VISIBLE END SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY - LTEXT " :", 14004, 8, 35, 50, 10 - LTEXT "", 14005, 68, 35, 160, 10 - LTEXT ":", 14006, 8, 53, 50, 10 + LTEXT "Тип файлу:", 14004, 8, 35, 50, 10 + LTEXT "Тека", 14005, 68, 35, 160, 10 + LTEXT "Розташування:", 14006, 8, 53, 50, 10 EDITTEXT 14007, 68, 53, 315, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14008, 8, 72, 45, 10 + LTEXT "Розмір:", 14008, 8, 72, 45, 10 EDITTEXT 14009, 68, 72, 315, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT "̳:", 14010, 8, 93, 45, 10 + LTEXT "Містить:", 14010, 8, 93, 45, 10 EDITTEXT 14011, 68, 93, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14014, 8, 118, 45, 10 + LTEXT "Створено:", 14014, 8, 118, 45, 10 EDITTEXT 14015, 68, 118, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - AUTOCHECKBOX " &", 14021, 45, 150, 67, 10 - AUTOCHECKBOX "&", 14022, 126, 150, 50, 10 + AUTOCHECKBOX "Лише &читання", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "При&хована", 14022, 126, 150, 50, 10 END SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY - LTEXT " :", 14004, 8, 35, 50, 10 - LTEXT "", 14005, 68, 35, 160, 10 - LTEXT ":", 14006, 8, 53, 50, 10 + LTEXT "Тип файлу:", 14004, 8, 35, 50, 10 + LTEXT "Файл", 14005, 68, 35, 160, 10 + LTEXT "Додаток:", 14006, 8, 53, 50, 10 EDITTEXT 14007, 68, 53, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14008, 8, 72, 50, 10 + LTEXT "Розташування:", 14008, 8, 72, 50, 10 EDITTEXT 14009, 68, 72, 315, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14010, 8, 93, 45, 10 + LTEXT "Розмір:", 14010, 8, 93, 45, 10 EDITTEXT 14011, 68, 93, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14014, 8, 118, 45, 10 + LTEXT "Створено:", 14014, 8, 118, 45, 10 EDITTEXT 14015, 68, 118, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14016, 8, 140, 45, 10 + LTEXT "Змінено:", 14016, 8, 140, 45, 10 EDITTEXT 14017, 68, 140, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT "³:", 14018, 8, 160, 45, 10 + LTEXT "Відкрито:", 14018, 8, 160, 45, 10 EDITTEXT 14019, 68, 160, 160, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ":", 14020, 8, 189, 45, 10 - CHECKBOX " &", 14021, 58, 189, 67, 10 - CHECKBOX "&", 14022, 126, 189, 50, 10 - CHECKBOX "&", 14023, 181, 189, 49, 10 + LTEXT "Атрибути:", 14020, 8, 189, 45, 10 + CHECKBOX "Лише &читання", 14021, 58, 189, 67, 10 + CHECKBOX "При&хований", 14022, 126, 189, 50, 10 + CHECKBOX "&Архівний", 14023, 181, 189, 49, 10 END SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Версія" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " : ", 14000, 10, 10, 55, 10 + LTEXT "Версія файлу: ", 14000, 10, 10, 55, 10 EDITTEXT 14001, 77, 10, 152, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT ": ", 14002, 10, 27, 45, 10 + LTEXT "Опис: ", 14002, 10, 27, 45, 10 EDITTEXT 14003, 77, 27, 152, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT " : ", 14004, 10, 46, 66, 10 + LTEXT "Авторські права: ", 14004, 10, 46, 66, 10 EDITTEXT 14005, 77, 46, 152, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - GROUPBOX " : ", 14006, 6, 70, 222, 115 - LTEXT "' : ", 14007, 13, 82, 50, 10 - LTEXT ": ", 14008, 112, 82, 45, 10 + GROUPBOX "Додаткові відомості: ", 14006, 6, 70, 222, 115 + LTEXT "Ім'я елемента: ", 14007, 13, 82, 50, 10 + LTEXT "Значення: ", 14008, 112, 82, 45, 10 LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY END DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP - LTEXT ":", -1, 15, 55, 40, 10 + LTEXT "Тип:", -1, 15, 55, 40, 10 EDITTEXT 14001, 110, 55, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT " :", -1, 15, 70, 100, 10 + LTEXT "Файлова система:", -1, 15, 70, 100, 10 EDITTEXT 14002, 110, 70, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 - LTEXT ":", -1, 25, 90, 120, 10 + LTEXT "Зайнято:", -1, 25, 90, 120, 10 EDITTEXT 14003, 110, 90, 85, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER EDITTEXT 14004, 200, 90, 40, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 - LTEXT ":", -1, 25, 105, 70, 10 + LTEXT "Доступно:", -1, 25, 105, 70, 10 EDITTEXT 14005, 110, 105, 85, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER EDITTEXT 14006, 200, 105, 40, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER - LTEXT "̳:", -1, 25, 125, 80, 10 + LTEXT "Місткість:", -1, 25, 125, 80, 10 EDITTEXT 14007, 110, 125, 85, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER EDITTEXT 14008, 200, 125, 40, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 - LTEXT " %s", 14009, 100, 170, 40, 10 - PUSHBUTTON " ", 14010, 178, 175, 60, 15, WS_TABSTOP - CHECKBOX " ", 14011, 15, 205, 180, 10, WS_DISABLED - CHECKBOX " ", 14012, 15, 220, 200, 10, WS_DISABLED + LTEXT "Диск %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Очищення диску", 14010, 178, 175, 60, 15, WS_TABSTOP + CHECKBOX "Стискати диск для заощадження місця", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Дозволити індексування диску для прискорення пошуку", 14012, 15, 220, 200, 10, WS_DISABLED END DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Сервіс" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX " ", -1, 5, 5, 230, 60 - LTEXT " .", -1, 40, 25, 160, 20 - PUSHBUTTON " ...", 14000, 125, 45, 100, 15, WS_TABSTOP - GROUPBOX " ", -1, 5, 65, 230, 60 - LTEXT " ", -1, 40, 85, 160, 20 - PUSHBUTTON " ...", 14001, 125, 105, 100, 15, WS_TABSTOP - GROUPBOX "", -1, 5, 130, 230, 60 - LTEXT " .", -1, 40, 150, 160, 20 - PUSHBUTTON " ...", 14002, 125, 170, 100, 15, WS_TABSTOP + GROUPBOX "Перевірка диску", -1, 5, 5, 230, 60 + LTEXT "Перевірка тому на наявність помилок.", -1, 40, 25, 160, 20 + PUSHBUTTON "Виконати перевірку...", 14000, 125, 45, 100, 15, WS_TABSTOP + GROUPBOX "Дефрагментація диску", -1, 5, 65, 230, 60 + LTEXT "Дефрагментація файлів на цьому томі", -1, 40, 85, 160, 20 + PUSHBUTTON "Виконати дефрагментацію...", 14001, 125, 105, 100, 15, WS_TABSTOP + GROUPBOX "Архівація", -1, 5, 130, 230, 60 + LTEXT "Резервне копіювання файлів на цьому томі.", -1, 40, 150, 160, 20 + PUSHBUTTON "Виконати архівацію...", 14002, 125, 170, 100, 15, WS_TABSTOP END DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "" +CAPTION "Обладнання" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN END RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Запуск від імені іншого користувача" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ?", -1, 10, 20, 220, 20 - CHECKBOX " %s", 14000, 10, 45, 150, 10 - LTEXT " ' ", -1, 25, 57, 200, 10, WS_DISABLED - CHECKBOX " ' , .", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE - CHECKBOX " :", 14002, 10, 100, 90, 10 - LTEXT "' :", -1, 20, 118, 54, 10 + LTEXT "Чий обліковий запис використовувати для запуску цієї програми?", -1, 10, 20, 220, 20 + CHECKBOX "Поточний користувач %s", 14000, 10, 45, 150, 10 + LTEXT "Захистити мій комп'ютер і мої дані від несанкціонованої діяльності програм", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Цей режим може захистити ваш комп'ютер і дані від вірусів, але програма може працювати неправильно.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Указаний користувач:", 14002, 10, 100, 90, 10 + LTEXT "Ім'я користувача:", -1, 20, 118, 54, 10 COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP - LTEXT ":", -1, 20, 143, 53, 10 + LTEXT "Пароль:", -1, 20, 143, 53, 10 EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP - PUSHBUTTON "", 14008, 122, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", 14008, 122, 170, 60, 14, WS_TABSTOP END BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION " " +CAPTION "Властивості Кошика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 - GROUPBOX " ", -1, 10, 72, 220, 70 - RADIOBUTTON "& :", 14001, 20, 90, 92, 10, WS_TABSTOP + GROUPBOX "Налаштування для вибраного розташування", -1, 10, 72, 220, 70 + RADIOBUTTON "&Особливий розмір:", 14001, 20, 90, 92, 10, WS_TABSTOP EDITTEXT 14002, 120, 100, 50, 14, WS_TABSTOP | ES_NUMBER - LTEXT "& ():", -1, 20, 105, 100, 10 - RADIOBUTTON " & , ", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP - AUTOCHECKBOX "& ", 14004, 20, 155, 165, 10, WS_TABSTOP + LTEXT "&Максимальний розмір(Мб):", -1, 20, 105, 100, 10 + RADIOBUTTON "Не переміщ&увати файли до кошика, а видаляти їх остаточно відразу", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "Пока&зувати діалог підтвердження видалення", 14004, 20, 155, 165, 10, WS_TABSTOP END OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Вибір програми" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 - LTEXT " , .", -1, 44, 12, 234, 10 - LTEXT ": ", 14001, 44, 25, 188, 10 - GROUPBOX "&", -1, 7, 42, 249, 187 + LTEXT "Виберіть програму, за допомогою якої слід відкрити цей файл.", -1, 44, 12, 234, 10 + LTEXT "Файл: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Програми", -1, 7, 42, 249, 187 LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE - AUTOCHECKBOX "& ", 14003, 20, 193, 225, 10 - PUSHBUTTON "&...", 14004, 198, 207, 50, 14 + AUTOCHECKBOX "Завжд&и використовувати цю програму для файлів цього типу", 14003, 20, 193, 225, 10 + PUSHBUTTON "О&гляд...", 14004, 198, 207, 50, 14 PUSHBUTTON "OK", 14005, 150, 236, 50, 14 - PUSHBUTTON "", 14006, 206, 236, 50, 14 + PUSHBUTTON "Скасувати", 14006, 206, 236, 50, 14 END IDD_SH_FILE_COPY DIALOGEX 0, 0, 264, 45 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "..." +CAPTION "Копіювання..." FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - PUSHBUTTON "", 14002, 195, 14, 60, 16 + PUSHBUTTON "Скасувати", 14002, 195, 14, 60, 16 CONTROL "", 14000, "MSCTLS_PROGRESS32", 0, 8, 20, 170, 10 - LTEXT "", 14001, 8, 6, 169, 10 + LTEXT "Файл", 14001, 8, 6, 169, 10 END FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "", -1, 7, 10, 249, 45 + GROUPBOX "Завдання", -1, 7, 10, 249, 45 ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL - AUTORADIOBUTTON "& ", 14001, 40, 25, 170, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON " & ReactOS", 14002, 40, 37, 149, 10, WS_TABSTOP | WS_GROUP - GROUPBOX " ", -1, 7, 60, 249, 45, WS_TABSTOP + AUTORADIOBUTTON "&Показувати список типових завдань у теках", 14001, 40, 25, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Використовувати зви&чайні теки ReactOS", 14002, 40, 37, 149, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Огляд тек", -1, 7, 60, 249, 45, WS_TABSTOP ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL - AUTORADIOBUTTON "³ & ", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "³& ", 14005, 40, 82, 155, 10, WS_TABSTOP | WS_GROUP - GROUPBOX " ", -1, 7, 110, 249, 60 + AUTORADIOBUTTON "Відкривати папки в то&му самому вікні", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Відкрива&ти кожну папку в окремому вікні", 14005, 40, 82, 155, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Клацання мишею", -1, 7, 110, 249, 60 ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL - AUTORADIOBUTTON "³& , ", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "ϳ& ", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "ϳ& ", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "³& , ", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP - PUSHBUTTON "&", 14011, 180, 180, 60, 14, WS_TABSTOP + AUTORADIOBUTTON "Від&кривати одиночним, виділяти вказівником", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Підкресл&ювати підписи значків", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Підкр&еслювати лише при наведенні", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Відкрив&ати подвійним, виділяти одиночним", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Стандартно", 14011, 180, 180, 60, 14, WS_TABSTOP END FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION "" +CAPTION "Вигляд" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN -GROUPBOX " ", -1, 7, 10, 249, 60 +GROUPBOX "Вигляд тек", -1, 7, 10, 249, 60 //ICON -LTEXT " , (, """" """"), .", -1, 60, 20, 180, 23 -PUSHBUTTON "& ", 14001, 58, 50, 84, 14, WS_TABSTOP -PUSHBUTTON "& ", 14002, 150, 50, 80, 14, WS_TABSTOP -LTEXT " :", -1, 7, 80, 100, 10 +LTEXT "Можна застосувати вигляд, який використовується для цієї теки (наприклад, ""Таблиця"" або ""Плитка""), до всіх тек.", -1, 60, 20, 180, 23 +PUSHBUTTON "&Застосувати до всіх тек", 14001, 58, 50, 84, 14, WS_TABSTOP +PUSHBUTTON "&Скид для всіх тек", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Додаткові параметри:", -1, 7, 80, 100, 10 CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 -PUSHBUTTON "&", 14004, 180, 210, 80, 14, WS_TABSTOP +PUSHBUTTON "&Стандартно", 14004, 180, 210, 80, 14, WS_TABSTOP END FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION -CAPTION " " +CAPTION "Типи файлів" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN -LTEXT " & :", -1, 7, 10, 70, 10 +LTEXT "Зареєстровані &типи файлів:", -1, 7, 10, 70, 10 CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 -PUSHBUTTON "&", 14001, 120, 110, 50, 14, WS_TABSTOP -PUSHBUTTON "&", 14002, 180, 110, 50, 14, WS_TABSTOP -GROUPBOX " '%s'", 14003, 7, 130, 249, 70 -LTEXT "³ :", -1, 12, 140, 48, 10 +PUSHBUTTON "&Створити", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "В&идалити", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Подробиці для розширення '%s'", 14003, 7, 130, 249, 70 +LTEXT "Відкривати у:", -1, 12, 140, 48, 10 //ICON -LTEXT "", 14005, 100, 140, 40, 10 -PUSHBUTTON "&...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT " '%s' '%s'.\n , \n '%s', """".", 14007, 12, 155, 160, 30 -PUSHBUTTON "&", 14008, 180, 175, 50, 14, WS_TABSTOP +LTEXT "Додаток", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Змінити...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "", 14007, 12, 155, 160, 40 +PUSHBUTTON "&Додатково", 14008, 180, 175, 50, 14, WS_TABSTOP END CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "ϳ " +CAPTION "Підтвердження заміни файлу" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", IDYES, 20, 122, 60, 14 - PUSHBUTTON " &", 12807, 85, 122, 60, 14 - PUSHBUTTON "&ͳ", IDNO, 150, 122, 60, 14 - PUSHBUTTON "", IDCANCEL, 215, 122, 60, 14 + DEFPUSHBUTTON "&Так", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Так для &всіх", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Ні", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 215, 122, 60, 14 ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL - LTEXT " ' '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX - LTEXT " ' '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX - LTEXT " ' '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX - LTEXT " ", -1, 44, 35, 228, 10, SS_NOPREFIX - LTEXT "( )", 12302, 79, 51, 198, 20, SS_NOPREFIX + LTEXT "Ця папка вже містить файл з ім'ям '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Ця папка вже містить доступний лише для читання файл з ім'ям '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Ця папка вже містить системний файл з ім'ям '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Замінити наявний файл", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(дата й розмір невідомі)", 12302, 79, 51, 198, 20, SS_NOPREFIX ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL - LTEXT " ?", -1, 44, 75, 228, 10, SS_NOPREFIX - LTEXT "( )", 12303, 79, 91, 198, 20, SS_NOPREFIX + LTEXT "на цей файл?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(дата й розмір невідомі)", 12303, 79, 91, 198, 20, SS_NOPREFIX ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL END LOGOFF_DLG DIALOGEX 0, 0, 190, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Вихід із ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL - LTEXT " ?", -1, 43, 11, 140, 22 - DEFPUSHBUTTON "&", IDOK, 57, 40, 60, 14 - PUSHBUTTON "", IDCANCEL, 122, 40, 60, 14 + LTEXT "Ви дійсно бажаєте вийти із системи?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "В&ихід", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 122, 40, 60, 14 END DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Вимкнення ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL - LTEXT " ?", -1, 49, 12, 137, 23 - DEFPUSHBUTTON "&", IDOK, 57, 40, 60, 14 - PUSHBUTTON "", IDCANCEL, 123, 40, 60, 14 + LTEXT "Ви дійсно бажаєте відключитися?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Вимкнення", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 123, 40, 60, 14 END AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "" +CAPTION "Автозапуск" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& , , :", 1000, 7, 7, 215, 20 + LTEXT "Вибері&ть тип вмісту, а потім дію, яка автоматично виконуватиметься в разі використання такого вмісту в цьому пристрої:", 1000, 7, 7, 215, 20 CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 - GROUPBOX "ij", -1, 7, 45, 212, 146 - AUTORADIOBUTTON " &:", 1005, 14, 54, 202, 10, WS_GROUP + GROUPBOX "Дії", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Виберіть виконувану &дію:", 1005, 14, 54, 202, 10, WS_GROUP CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 - AUTORADIOBUTTON " & 䳿", 1006, 14, 177, 202, 10 - PUSHBUTTON "&³", 1008, 108, 197, 110, 14, WS_DISABLED + AUTORADIOBUTTON "Кожного ра&зу пропонувати вибір дії", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Відновити", 1008, 108, 197, 110, 14, WS_DISABLED END MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "̳ " +CAPTION "Мішаний вміст" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT " .", 1001, 32, 7, 191, 20 - LTEXT " ReactOS?", 1002, 32, 31, 188, 8 + LTEXT "На цьому диску або пристрої зберігається вміст декількох типів.", 1001, 32, 7, 191, 20 + LTEXT "Яку дію слід виконувати ReactOS?", 1002, 32, 31, 188, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 - PUSHBUTTON "", IDCANCEL, 160, 186, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 160, 186, 60, 14 END MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "̳ " +CAPTION "Мішаний вміст" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "ReactOS , ' :", 1001, 30, 7, 193, 20 + LTEXT "ReactOS може виконувати одну й ту саму дію кожного разу, коли ви вставляєте диск або під'єднуєте пристрій із файлами цього типу:", 1001, 30, 7, 193, 20 ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP - LTEXT " ReactOS?", 1002, 32, 41, 190, 8 + LTEXT "Яку дію слід виконувати ReactOS?", 1002, 32, 41, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 - AUTOCHECKBOX " .", 1004, 32, 171, 190, 10 + AUTOCHECKBOX "Завжди виконувати вибрану дію.", 1004, 32, 171, 190, 10 DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 - PUSHBUTTON "", IDCANCEL, 160, 185, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 160, 185, 60, 14 END AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION -CAPTION "" +CAPTION "Автозапуск" FONT 8, "MS Shell Dlg" BEGIN ICON "", 1000, 5, 7, 21, 20 - LTEXT "ReactOS , ' .", 1001, 32, 7, 190, 22 - LTEXT "& ReactOS?", 1002, 32, 31, 190, 8 + LTEXT "ReactOS може виконувати одну й ту саму дію кожного разу, коли ви під'єднуєте цей пристрій.", 1001, 32, 7, 190, 22 + LTEXT "&Яку дію слід виконувати ReactOS?", 1002, 32, 31, 190, 8 CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 - AUTOCHECKBOX "& ", 1004, 32, 143, 190, 8 + AUTOCHECKBOX "&Завжди виконувати вибрану дію", 1004, 32, 143, 190, 8 DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 - PUSHBUTTON "", IDCANCEL, 159, 160, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 159, 160, 60, 14 END SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Завершення роботи ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP - LTEXT " ?", -1, 39, 7, 167, 10 + LTEXT "Виберіть одну з таких можливостей?", -1, 39, 7, 167, 10 COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL - LTEXT " ' '. - , ' .", 8225, 39, 40, 167, 37 + LTEXT "Збереження сеансу з переведенням комп'ютера до режиму низького енергоспоживання зі збереженням даних у пам'яті. Якщо натиснути будь-яку клавішу або пересунути мишу, комп'ютер повернеться до звичайного режиму.", 8225, 39, 40, 167, 37 DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP - PUSHBUTTON "", IDCANCEL, 75, 82, 60, 14 - PUSHBUTTON "&", IDHELP, 144, 82, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Довідка", IDHELP, 144, 82, 60, 14 END FORMAT_DLG DIALOGEX 50, 50, 184, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "" +CAPTION "Форматування" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "&", IDOK, 53, 198, 60, 14 - PUSHBUTTON "&", IDCANCEL, 118, 198, 60, 14 - LTEXT "&̳:", -1, 7, 6, 169, 9 + DEFPUSHBUTTON "&Почати", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Закрити", IDCANCEL, 118, 198, 60, 14 + LTEXT "&Місткість:", -1, 7, 6, 169, 9 COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "& ", -1, 7, 35, 170, 9 + LTEXT "&Файлова система", -1, 7, 35, 170, 9 COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 - LTEXT "& ", -1, 7, 64, 170, 9 + LTEXT "&Розмір кластера", -1, 7, 64, 170, 9 COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP - LTEXT "̳& ", -1, 7, 93, 170, 9 + LTEXT "Мі&тка тому", -1, 7, 93, 170, 9 EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL - GROUPBOX "& ", 4610, 7, 121, 170, 49 - AUTOCHECKBOX "& ( )", 28674, 16, 135, 155, 10 - AUTOCHECKBOX "& ", 28675, 16, 152, 155, 10 + GROUPBOX "&Способи форматування", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Швидке (очищення змісту)", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Використовувати стискання", 28675, 16, 152, 155, 10 END CHKDSK_DLG DIALOGEX 50, 50, 194, 120 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Перевірка диску" FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "", IDOK, 53, 100, 60, 14 - GROUPBOX " ", -1, 7, 6, 179, 50 - PUSHBUTTON "", IDCANCEL, 118, 100, 60, 14 - AUTOCHECKBOX " ", 14000, 16, 15, 165, 10 - AUTOCHECKBOX "& ", 14001, 16, 30, 165, 10 + DEFPUSHBUTTON "Почати", IDOK, 53, 100, 60, 14 + GROUPBOX "Опції перевірки диску", -1, 7, 6, 179, 50 + PUSHBUTTON "Скасувати", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Виправити помилки файлової системи", 14000, 16, 15, 165, 10 + AUTOCHECKBOX "&Спробувати відновити погані сектори", 14001, 16, 30, 165, 10 CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 LTEXT "", 14003, 60, 80, 170, 10 END IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Зміна значка" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "' :", -1, 7, 14, 208, 10 - PUSHBUTTON "&...",IDC_BUTTON_PATH, 148, 24,67,14 + LTEXT "Ім'я файла:", -1, 7, 14, 208, 10 + PUSHBUTTON "О&гляд...",IDC_BUTTON_PATH, 148, 24,67,14 EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL - LTEXT ":", -1, 7, 47, 208, 10 + LTEXT "Значки:", -1, 7, 47, 208, 10 LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 - PUSHBUTTON "",IDCANCEL, 167, 181, 50, 14 + PUSHBUTTON "Скасувати",IDCANCEL, 167, 181, 50, 14 END STRINGTABLE DISCARDABLE BEGIN /* columns in the shellview */ - IDS_SHV_COLUMN1 "" - IDS_SHV_COLUMN2 "" - IDS_SHV_COLUMN3 "" - IDS_SHV_COLUMN4 "" - IDS_SHV_COLUMN5 "" - IDS_SHV_COLUMN6 "" - IDS_SHV_COLUMN7 "³ " - IDS_SHV_COLUMN8 "'" - IDS_SHV_COLUMN9 "" - IDS_SHV_COLUMN10 "" - IDS_SHV_COLUMN11 "" - IDS_SHV_COLUMN12 "' " - IDS_SHV_COLUMN13 "" - IDS_SHV_COLUMN_DELFROM " " - IDS_SHV_COLUMN_DELDATE " " - IDS_SHV_COLUMN_FONTTYPE " " - IDS_SHV_COLUMN_WORKGROUP " " - IDS_SHV_NETWORKLOCATION " " - IDS_SHV_COLUMN_DOCUMENTS "" - IDS_SHV_COLUMN_STATUS "" - IDS_SHV_COLUMN_COMMENTS "" - IDS_SHV_COLUMN_LOCATION "" - IDS_SHV_COLUMN_MODEL "" + IDS_SHV_COLUMN1 "Файл" + IDS_SHV_COLUMN2 "Розмір" + IDS_SHV_COLUMN3 "Тип" + IDS_SHV_COLUMN4 "Змінено" + IDS_SHV_COLUMN5 "Атрибути" + IDS_SHV_COLUMN6 "Розмір" + IDS_SHV_COLUMN7 "Вільний Розмір" + IDS_SHV_COLUMN8 "Ім'я" + IDS_SHV_COLUMN9 "Примітка" + IDS_SHV_COLUMN10 "Власник" + IDS_SHV_COLUMN11 "Група" + IDS_SHV_COLUMN12 "Ім'я файла" + IDS_SHV_COLUMN13 "Категорія" + IDS_SHV_COLUMN_DELFROM "Вихідне розташування" + IDS_SHV_COLUMN_DELDATE "Дата видалення" + IDS_SHV_COLUMN_FONTTYPE "Тип шрифту" + IDS_SHV_COLUMN_WORKGROUP "Робоча група" + IDS_SHV_NETWORKLOCATION "Мережне розташування" + IDS_SHV_COLUMN_DOCUMENTS "Документи" + IDS_SHV_COLUMN_STATUS "Стан" + IDS_SHV_COLUMN_COMMENTS "Примітки" + IDS_SHV_COLUMN_LOCATION "Розташування" + IDS_SHV_COLUMN_MODEL "Модель" /* special folders */ - IDS_DESKTOP " " - IDS_MYCOMPUTER "̳ '" - IDS_RECYCLEBIN_FOLDER_NAME "" - IDS_CONTROLPANEL " " - IDS_ADMINISTRATIVETOOLS "" + IDS_DESKTOP "Робочий стіл" + IDS_MYCOMPUTER "Мій Комп'ютер" + IDS_RECYCLEBIN_FOLDER_NAME "Кошик" + IDS_CONTROLPANEL "Панель керування" + IDS_ADMINISTRATIVETOOLS "Адміністрування" /* context menus */ - IDS_VIEW_LARGE "& " - IDS_VIEW_SMALL "& " - IDS_VIEW_LIST "&" - IDS_VIEW_DETAILS "&" - IDS_SELECT "&" - IDS_OPEN "³&" - IDS_CREATELINK " &" - IDS_COPY "&" - IDS_DELETE "&" - IDS_PROPERTIES "&" - IDS_CUT "&" - IDS_RESTORE "³" - IDS_FORMATDRIVE "..." - IDS_RENAME "" - IDS_INSERT "" + IDS_VIEW_LARGE "&Великі значки" + IDS_VIEW_SMALL "&Дрібні значки" + IDS_VIEW_LIST "Спис&ок" + IDS_VIEW_DETAILS "&Подробиці" + IDS_SELECT "Ви&брати" + IDS_OPEN "Ві&дкрити" + IDS_CREATELINK "Створити &ярлик" + IDS_COPY "&Копіювати" + IDS_DELETE "В&идалити" + IDS_PROPERTIES "В&ластивості" + IDS_CUT "&Вирізати" + IDS_RESTORE "Відновити" + IDS_FORMATDRIVE "Форматувати..." + IDS_RENAME "Перейменувати" + IDS_INSERT "Вставити" - IDS_CREATEFOLDER_DENIED " : ³ ." - IDS_CREATEFOLDER_CAPTION " " - IDS_DELETEITEM_CAPTION "ϳ " - IDS_DELETEFOLDER_CAPTION "ϳ " - IDS_DELETEITEM_TEXT " '%1'?" - IDS_DELETEMULTIPLE_TEXT " %1 '()?" - IDS_DELETESELECTED_TEXT " '?" - IDS_TRASHITEM_TEXT " '%1' ?" - IDS_TRASHFOLDER_TEXT " '%1' ?" - IDS_TRASHMULTIPLE_TEXT " ' (%1 .) ?" - IDS_CANTTRASH_TEXT "' '%1' . ?" - IDS_OVERWRITEFILE_TEXT " ' '%1'.\n\n ?" - IDS_OVERWRITEFILE_CAPTION "ϳ " - IDS_OVERWRITEFOLDER_TEXT " ' '%1'.\n\n"\ - " , ,\n"\ - " . \n"\ - " ?" + IDS_CREATEFOLDER_DENIED "Не вдалося створити нову папку: Відмова у доступі." + IDS_CREATEFOLDER_CAPTION "Помилка при створенні нової папки" + IDS_DELETEITEM_CAPTION "Підтвердження вилучення файлу" + IDS_DELETEFOLDER_CAPTION "Підтвердження вилучення папки" + IDS_DELETEITEM_TEXT "Ви дійсно бажаєте видалити '%1'?" + IDS_DELETEMULTIPLE_TEXT "Ви дійсно бажаєте видалити ці %1 об'єкти(ів)?" + IDS_DELETESELECTED_TEXT "Ви дійсно бажаєте видалити ці об'єкти?" + IDS_TRASHITEM_TEXT "Ви дійсно бажаєте перемістити '%1' до кошика?" + IDS_TRASHFOLDER_TEXT "Ви дійсно бажаєте перемістити '%1' і весь її вміст до кошика?" + IDS_TRASHMULTIPLE_TEXT "Ви дійсно бажаєте перемістити ці об'єкти (%1 шт.) до кошика?" + IDS_CANTTRASH_TEXT "Об'єкт '%1' не можна перемістити до кошика. Бажаєте видалити його?" + IDS_OVERWRITEFILE_TEXT "Ця папка вже містить файл з ім'ям '%1'.\n\nБажаєте замінити його?" + IDS_OVERWRITEFILE_CAPTION "Підтвердження Перезапису Файлу" + IDS_OVERWRITEFOLDER_TEXT "Ця папка вже містить папку з ім'ям '%1'.\n\nЯкщо файли в папці призначення мають ті ж імена, що файли у вибраній папці,\nвони будуть замінені. Ви все ще бажаєте перемістити або\nскопіювати папку?" /* message box strings */ - IDS_RESTART_TITLE "" - IDS_RESTART_PROMPT " ?" - IDS_SHUTDOWN_TITLE "" - IDS_SHUTDOWN_PROMPT " '?" - IDS_LOGOFF_TITLE " " - IDS_LOGOFF_PROMPT " ?" + IDS_RESTART_TITLE "Перезавантажити" + IDS_RESTART_PROMPT "Ви хочете перезавантажити систему?" + IDS_SHUTDOWN_TITLE "Вимкнути" + IDS_SHUTDOWN_PROMPT "Ви хочете вимкнути комп'ютер?" + IDS_LOGOFF_TITLE "Вихід з системи" + IDS_LOGOFF_PROMPT "Ви хочете вийти з системи?" /* Run File dialog */ - IDS_RUNDLG_ERROR " ij ( )" - IDS_RUNDLG_BROWSE_ERROR " ij ( )" - IDS_RUNDLG_BROWSE_CAPTION "" - IDS_RUNDLG_BROWSE_FILTER " (*.exe)\0*.exe\0 (*.*)\0*.*\0" + IDS_RUNDLG_ERROR "Неможливо відобразити Діалог Запуску Файлу (внутрішня помилка)" + IDS_RUNDLG_BROWSE_ERROR "Неможливо відобразити Діалог Огляду (внутрішня помилка)" + IDS_RUNDLG_BROWSE_CAPTION "Огляд" + IDS_RUNDLG_BROWSE_FILTER "Виконувані Файли (*.exe)\0*.exe\0Всі Файли (*.*)\0*.*\0" /* shell folder path default values */ IDS_PROGRAMS "Start Menu\\Programs" - IDS_PERSONAL " " - IDS_FAVORITES "" + IDS_PERSONAL "Мої документи" + IDS_FAVORITES "Обране" IDS_STARTUP "Start Menu\\Programs\\StartUp" IDS_RECENT "Recent" - IDS_SENDTO "" - IDS_STARTMENU " " - IDS_MYMUSIC " " - IDS_MYVIDEO " " - IDS_DESKTOPDIRECTORY " " - IDS_NETHOOD " " - IDS_TEMPLATES "" + IDS_SENDTO "Надіслати" + IDS_STARTMENU "Головне меню" + IDS_MYMUSIC "Моя музика" + IDS_MYVIDEO "Мої відеозаписи" + IDS_DESKTOPDIRECTORY "Робочий стіл" + IDS_NETHOOD "Мережне оточення" + IDS_TEMPLATES "Шаблони" IDS_APPDATA "Application Data" - IDS_PRINTHOOD "" + IDS_PRINTHOOD "Принтери" IDS_LOCAL_APPDATA "Local Settings\\Application Data" IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" IDS_COOKIES "Cookies" IDS_HISTORY "Local Settings\\History" IDS_PROGRAM_FILES "Program Files" - IDS_MYPICTURES " " + IDS_MYPICTURES "Мої малюнки" IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" - IDS_COMMON_DOCUMENTS " " + IDS_COMMON_DOCUMENTS "Загальні документи" IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" - IDS_COMMON_MUSIC " \\ " - IDS_COMMON_PICTURES " \\ " - IDS_COMMON_VIDEO " \\ " + IDS_COMMON_MUSIC "Загальні документи\\Моя музика" + IDS_COMMON_PICTURES "Загальні документи\\Мої малюнки" + IDS_COMMON_VIDEO "Загальні документи\\Мої відеозаписи" IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" - IDS_NETWORKPLACE " " + IDS_NETWORKPLACE "Мережне оточення" - IDS_NEWFOLDER " " + IDS_NEWFOLDER "Нова папка" - IDS_DRIVE_FIXED " " + IDS_DRIVE_FIXED "Локальний диск" IDS_DRIVE_CDROM "CDROM" - IDS_DRIVE_NETWORK " " + IDS_DRIVE_NETWORK "Мережний диск" - IDS_OPEN_WITH "³ " - IDS_OPEN_WITH_CHOOSE " ..." + IDS_OPEN_WITH "Відкрити за допомогою" + IDS_OPEN_WITH_CHOOSE "Вибрати програму..." - IDS_SHELL_ABOUT_AUTHORS "&" - IDS_SHELL_ABOUT_BACK "< &" - FCIDM_SHVIEW_NEW "" - FCIDM_SHVIEW_NEWFOLDER "&" - FCIDM_SHVIEW_NEWLINK "&" - IDS_FOLDER_OPTIONS " " - IDS_RECYCLEBIN_LOCATION " " - IDS_RECYCLEBIN_DISKSPACE " " - IDS_EMPTY_BITBUCKET " " - IDS_PICK_ICON_TITLE " " - IDS_PICK_ICON_FILTER " (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0 (*.*)\0*.*\0" - IDS_OPEN_WITH_FILTER " (*.exe)\0*.exe\0 (*.*)\0*.*\0" - IDS_DIRECTORY "" - IDS_VIRTUAL_DRIVER " " - IDS_BAT_FILE " ReactOS" - IDS_CMD_FILE " ReactOS" - IDS_COM_FILE " Dos" - IDS_CPL_FILE " " - IDS_CUR_FILE "" - IDS_DLL_FILE " " - IDS_DRV_FILE " " - IDS_EXE_FILE "" - IDS_FON_FILE " " - IDS_TTF_FILE " TrueType" - IDS_HLP_FILE " " - IDS_INI_FILE " " - IDS_LNK_FILE "" - IDS_SYS_FILE " " + IDS_SHELL_ABOUT_AUTHORS "&Автори" + IDS_SHELL_ABOUT_BACK "< &Назад" + FCIDM_SHVIEW_NEW "Створити" + FCIDM_SHVIEW_NEWFOLDER "&Папку" + FCIDM_SHVIEW_NEWLINK "&Ярлик" + IDS_FOLDER_OPTIONS "Властивості теки" + IDS_RECYCLEBIN_LOCATION "Розташування Кошика" + IDS_RECYCLEBIN_DISKSPACE "Доступний простір" + IDS_EMPTY_BITBUCKET "Очистити Кошик" + IDS_PICK_ICON_TITLE "Вибрати значок" + IDS_PICK_ICON_FILTER "Файли значків (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0Всі Файли (*.*)\0*.*\0" + IDS_OPEN_WITH_FILTER "Виконувані файли (*.exe)\0*.exe\0Всі Файли (*.*)\0*.*\0" + IDS_DIRECTORY "Папка" + IDS_VIRTUAL_DRIVER "Драйвер віртуального пристрою" + IDS_BAT_FILE "Пакетний файл ReactOS" + IDS_CMD_FILE "Командний скрипт ReactOS" + IDS_COM_FILE "Додаток Dos" + IDS_CPL_FILE "Елемент панелі керування" + IDS_CUR_FILE "Курсор" + IDS_DLL_FILE "Розширення додатку" + IDS_DRV_FILE "Драйвер пристрою" + IDS_EXE_FILE "Додаток" + IDS_FON_FILE "Файл шрифту" + IDS_TTF_FILE "Файл шрифту TrueType" + IDS_HLP_FILE "Файл довідки" + IDS_INI_FILE "Файл налаштувань" + IDS_LNK_FILE "Ярлик" + IDS_SYS_FILE "Системний файл" - IDS_OPEN_VERB "³" - IDS_EXPLORE_VERB "³ " - IDS_RUNAS_VERB " " - IDS_EDIT_VERB "" - IDS_FIND_VERB "" - IDS_PRINT_VERB "" + IDS_OPEN_VERB "Відкрити" + IDS_EXPLORE_VERB "Відкрити в дереві" + IDS_RUNAS_VERB "Запустити як " + IDS_EDIT_VERB "Змінити" + IDS_FIND_VERB "Пошук" + IDS_PRINT_VERB "Друк" - IDS_FILE_FOLDER "%u , %u " - IDS_PRINTERS "" - IDS_FONTS "" - IDS_INSTALLNEWFONT " ..." + IDS_FILE_FOLDER "%u файлів, %u папок" + IDS_PRINTERS "Принтери" + IDS_FONTS "Шрифти" + IDS_INSTALLNEWFONT "Інсталювати новий шрифт..." - IDS_DEFAULT_CLUSTER_SIZE " " - IDS_COPY_OF "" + IDS_DEFAULT_CLUSTER_SIZE "Розмір кластера за замовчуванням" + IDS_COPY_OF "Копія" - IDS_SHLEXEC_NOASSOC " Windows, ." + IDS_SHLEXEC_NOASSOC "Немає програми Windows, сконфігурованої для відкриття цього типу файлів." + + IDS_FILE_DETAILS "Подробиці для розширення '%s'" + IDS_FILE_DETAILSADV "Файли з розширенням '%s' мають тип '%s'. Щоб змінити параметри, які впливатимуть на всі файли '%s', натисніть кнопку 'Додатково'." + IDS_FILE_TYPES "Типи Файлів" + IDS_COLUMN_EXTENSION "Розширення" END diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index ba4d7c8de10..9ee6d341b93 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -114,7 +114,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -413,7 +413,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -644,10 +644,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "" @@ -746,5 +743,10 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 22dd7afc4d2..28cc99410f7 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -126,7 +126,7 @@ FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 - LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT "Version "KERNEL_VERSION_STR" ("KERNEL_VERSION_BUILD_STR")", IDC_STATIC, 35, 65, 235, 10 LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 @@ -425,7 +425,7 @@ LTEXT "Opens with:", -1, 12, 140, 40, 10 //ICON LTEXT "Appname", 14005, 100, 140, 40, 10 PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP -LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +LTEXT "", 14007, 12, 155, 160, 30 PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP END @@ -656,10 +656,7 @@ BEGIN IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" - IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ - "If the files in the destination folder have the same names as files in the\n"\ - "selected folder they will be replaced. Do you still want to move or copy\n"\ - "the folder?" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\nIf the files in the destination folder have the same names as files in the\nselected folder they will be replaced. Do you still want to move or copy\nthe folder?" /* message box strings */ IDS_RESTART_TITLE "Restart" @@ -759,6 +756,11 @@ BEGIN IDS_COPY_OF "Copy of" IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." + + IDS_FILE_DETAILS "Details for '%s' extension" + IDS_FILE_DETAILSADV "Files with extension '%s' are of type '%s'. To change settings that affect all '%s' files, click Advanced." + IDS_FILE_TYPES "FileTypes" + IDS_COLUMN_EXTENSION "Extensions" END #pragma code_page(default) diff --git a/dll/win32/shell32/regsvr.c b/dll/win32/shell32/regsvr.c index 7e230a1b8bb..5ba35f562b4 100644 --- a/dll/win32/shell32/regsvr.c +++ b/dll/win32/shell32/regsvr.c @@ -29,6 +29,10 @@ const GUID CLSID_FontsFolderShortcut = {0xD20EA4E1, 0x3957, 0x11D2, {0xA4, 0 const GUID SHELL32_AdvtShortcutProduct = {0x9db1186f, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; const GUID SHELL32_AdvtShortcutComponent = {0x9db1186e, 0x40df, 0x11d1, {0xaa, 0x8c, 0x00, 0xc0, 0x4f, 0xb6, 0x78, 0x63}}; +#ifdef _MSC_VER +extern const GUID CLSID_ShellFolderViewOC; +#endif + WINE_DEFAULT_DEBUG_CHANNEL(shell); diff --git a/dll/win32/shell32/shell32.rc b/dll/win32/shell32/shell32.rc index 1a93be1865c..ec4a8c0f6cd 100644 --- a/dll/win32/shell32/shell32.rc +++ b/dll/win32/shell32/shell32.rc @@ -68,11 +68,14 @@ END #include "lang/pt-BR.rc" #include "lang/pt-PT.rc" #include "lang/ro-RO.rc" -#include "lang/ru-RU.rc" #include "lang/sl-SI.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/tr-TR.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" #include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/dll/win32/shell32/shellord.c b/dll/win32/shell32/shellord.c index 2559cb6db14..b1f5aed4dba 100644 --- a/dll/win32/shell32/shellord.c +++ b/dll/win32/shell32/shellord.c @@ -47,6 +47,7 @@ #include "shlwapi.h" #include "commdlg.h" #include "recyclebin.h" +#include "commoncontrols.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); WINE_DECLARE_DEBUG_CHANNEL(pidl); @@ -2247,10 +2248,40 @@ void WINAPI SHFlushSFCache(void) { } +/************************************************************************* + * SHGetImageList (SHELL32.727) + * + * Returns a copy of a shell image list. + * + * NOTES + * Windows XP features 4 sizes of image list, and Vista 5. Wine currently + * only supports the traditional small and large image lists, so requests + * for the others will currently fail. + */ HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) { - FIXME("STUB: %i %s\n",iImageList,debugstr_guid(riid)); - return E_NOINTERFACE; + HIMAGELIST hLarge, hSmall; + HIMAGELIST hNew; + HRESULT ret = E_FAIL; + + /* Wine currently only maintains large and small image lists */ + if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL)) + { + FIXME("Unsupported image list %i requested\n", iImageList); + return E_FAIL; + } + + Shell_GetImageLists(&hLarge, &hSmall); + hNew = ImageList_Duplicate(iImageList == SHIL_LARGE ? hLarge : hSmall); + + /* Get the interface for the new image list */ + if (hNew) + { + ret = HIMAGELIST_QueryInterface(hNew, riid, ppv); + ImageList_Destroy(hNew); + } + + return ret; } /************************************************************************* diff --git a/dll/win32/shell32/shlview.c b/dll/win32/shell32/shlview.c index 2218504735d..f731b0b535b 100644 --- a/dll/win32/shell32/shlview.c +++ b/dll/win32/shell32/shlview.c @@ -2115,7 +2115,7 @@ static HRESULT WINAPI IShellView_fnCreateViewWindow( if(!GetClassInfoW(shell32_hInstance, SV_CLASS_NAME, &wc)) { ZeroMemory(&wc, sizeof(wc)); - wc.style = CS_HREDRAW | CS_VREDRAW; + wc.style = 0; wc.lpfnWndProc = ShellView_WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index 1cb3903ee85..507d26b11ee 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -141,6 +141,7 @@ #define IDS_SHLEXEC_NOASSOC 173 #define IDS_FILE_TYPES 174 #define IDS_FILE_DETAILS 175 +#define IDS_FILE_DETAILSADV 176 #define IDS_RUNDLG_ERROR 180 #define IDS_RUNDLG_BROWSE_ERROR 181 diff --git a/dll/win32/shell32/shv_item_new.c b/dll/win32/shell32/shv_item_new.c index b35d4a09c27..228efd27316 100644 --- a/dll/win32/shell32/shv_item_new.c +++ b/dll/win32/shell32/shv_item_new.c @@ -387,7 +387,7 @@ DoShellNewCmd(INewMenuImpl * This, LPCMINVOKECOMMANDINFO lpcmi) } ZeroMemory(&sInfo, sizeof(sInfo)); - sInfo.cb = sizeof(sizeof(sInfo)); + sInfo.cb = sizeof(sInfo); szCmd = _wcsdup(ptr); if (!szCmd) break; diff --git a/dll/win32/shell32_new/GlueCode.cpp b/dll/win32/shell32_new/GlueCode.cpp new file mode 100644 index 00000000000..055ca4775af --- /dev/null +++ b/dll/win32/shell32_new/GlueCode.cpp @@ -0,0 +1,336 @@ + +LONG WINAPI RegCopyTreeX(HKEY, LPCWSTR, HKEY) +{ + DebugBreak(); + return 0; +} + +static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars) +{ + HGLOBAL hMemory; + HRSRC hResource; + WCHAR *pString; + int idxString; + + /* Negative values have to be inverted. */ + if (HIWORD(resId) == 0xffff) + resId = (UINT)(-((INT)resId)); + + /* Load the resource into memory and get a pointer to it. */ + hResource = FindResourceW(hModule, MAKEINTRESOURCEW(LOWORD(resId >> 4) + 1), (LPWSTR)RT_STRING); + if (!hResource) return 0; + hMemory = LoadResource(hModule, hResource); + if (!hMemory) return 0; + pString = (WCHAR *)LockResource(hMemory); + + /* Strings are length-prefixed. Lowest nibble of resId is an index. */ + idxString = resId & 0xf; + while (idxString--) pString += *pString + 1; + + /* If no buffer is given, return length of the string. */ + if (!pwszBuffer) return *pString; + + /* Else copy over the string, respecting the buffer size. */ + cMaxChars = (*pString < cMaxChars) ? *pString : (cMaxChars - 1); + if (cMaxChars >= 0) + { + memcpy(pwszBuffer, pString+1, cMaxChars * sizeof(WCHAR)); + pwszBuffer[cMaxChars] = L'\0'; + } + + return cMaxChars; +} + +LONG WINAPI +RegLoadMUIStringWX(IN HKEY hKey, + IN LPCWSTR pszValue OPTIONAL, + OUT LPWSTR pszOutBuf, + IN DWORD cbOutBuf, + OUT LPDWORD pcbData OPTIONAL, + IN DWORD Flags, + IN LPCWSTR pszDirectory OPTIONAL) +{ + DWORD dwValueType, cbData; + LPWSTR pwszTempBuffer = NULL, pwszExpandedBuffer = NULL; + LONG result; + + /* Parameter sanity checks. */ + if (!hKey || !pszOutBuf) + return ERROR_INVALID_PARAMETER; + + if (pszDirectory && *pszDirectory) + { + return ERROR_INVALID_PARAMETER; + } + + /* Check for value existence and correctness of it's type, allocate a buffer and load it. */ + result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, NULL, &cbData); + if (result != ERROR_SUCCESS) goto cleanup; + if (!(dwValueType == REG_SZ || dwValueType == REG_EXPAND_SZ) || !cbData) + { + result = ERROR_FILE_NOT_FOUND; + goto cleanup; + } + pwszTempBuffer = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, cbData); + if (!pwszTempBuffer) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, (LPBYTE)pwszTempBuffer, &cbData); + if (result != ERROR_SUCCESS) goto cleanup; + + /* Expand environment variables, if appropriate, or copy the original string over. */ + if (dwValueType == REG_EXPAND_SZ) + { + cbData = ExpandEnvironmentStringsW(pwszTempBuffer, NULL, 0) * sizeof(WCHAR); + if (!cbData) goto cleanup; + pwszExpandedBuffer = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, cbData); + if (!pwszExpandedBuffer) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + ExpandEnvironmentStringsW(pwszTempBuffer, pwszExpandedBuffer, cbData); + } + else + { + pwszExpandedBuffer = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, cbData); + memcpy(pwszExpandedBuffer, pwszTempBuffer, cbData); + } + + /* If the value references a resource based string, parse the value and load the string. + * Else just copy over the original value. */ + result = ERROR_SUCCESS; + if (*pwszExpandedBuffer != L'@') /* '@' is the prefix for resource based string entries. */ + { + lstrcpynW(pszOutBuf, pwszExpandedBuffer, cbOutBuf / sizeof(WCHAR)); + } + else + { + WCHAR *pComma = wcsrchr(pwszExpandedBuffer, L','); + UINT uiStringId; + HMODULE hModule; + + /* Format of the expanded value is 'path_to_dll,-resId' */ + if (!pComma || pComma[1] != L'-') + { + result = ERROR_BADKEY; + goto cleanup; + } + + uiStringId = _wtoi(pComma+2); + *pComma = L'\0'; + + hModule = LoadLibraryExW(pwszExpandedBuffer + 1, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (!hModule || !load_string(hModule, uiStringId, pszOutBuf, cbOutBuf / sizeof(WCHAR))) + result = ERROR_BADKEY; + FreeLibrary(hModule); + } + +cleanup: + HeapFree(GetProcessHeap(), 0, pwszTempBuffer); + HeapFree(GetProcessHeap(), 0, pwszExpandedBuffer); + return result; +} + +#if 0 +VOID WINAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString); +#else +typedef VOID (WINAPI *PRtlFreeUnicodeString)(PUNICODE_STRING UnicodeString); +static VOID WINAPI +RtlFreeUnicodeStringx(PUNICODE_STRING UnicodeString) +{ + static PRtlFreeUnicodeString Func = NULL; + + if (Func == NULL) + { + HMODULE hShlwapi; + hShlwapi = LoadLibrary(TEXT("ntdll.DLL")); + if (hShlwapi != NULL) + { + Func = (PRtlFreeUnicodeString)GetProcAddress(hShlwapi, "RtlFreeUnicodeString"); + } + } + + if (Func != NULL) + { + Func(UnicodeString); + return; + } + + MessageBox(NULL, TEXT("RtlFreeUnicodeString not available"), NULL, 0); +} +#endif + +LONG WINAPI +RegLoadMUIStringAX(IN HKEY hKey, + IN LPCSTR pszValue OPTIONAL, + OUT LPSTR pszOutBuf, + IN DWORD cbOutBuf, + OUT LPDWORD pcbData OPTIONAL, + IN DWORD Flags, + IN LPCSTR pszDirectory OPTIONAL) +{ + UNICODE_STRING valueW, baseDirW; + WCHAR *pwszBuffer; + DWORD cbData = cbOutBuf * sizeof(WCHAR); + LONG result; + + valueW.Buffer = baseDirW.Buffer = pwszBuffer = NULL; + if (!RtlCreateUnicodeStringFromAsciiz(&valueW, pszValue) || + !RtlCreateUnicodeStringFromAsciiz(&baseDirW, pszDirectory) || + !(pwszBuffer = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, cbData))) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + + result = RegLoadMUIStringWX(hKey, valueW.Buffer, pwszBuffer, cbData, NULL, Flags, + baseDirW.Buffer); + + if (result == ERROR_SUCCESS) + { + cbData = WideCharToMultiByte(CP_ACP, 0, pwszBuffer, -1, pszOutBuf, cbOutBuf, NULL, NULL); + if (pcbData) + *pcbData = cbData; + } + +cleanup: + HeapFree(GetProcessHeap(), 0, pwszBuffer); + RtlFreeUnicodeStringx(&baseDirW); + RtlFreeUnicodeStringx(&valueW); + + return result; +} + +static VOID +RegpApplyRestrictions(DWORD dwFlags, + DWORD dwType, + DWORD cbData, + PLONG ret) +{ + /* Check if the type is restricted by the passed flags */ + if (*ret == ERROR_SUCCESS || *ret == ERROR_MORE_DATA) + { + DWORD dwMask = 0; + + switch (dwType) + { + case REG_NONE: dwMask = RRF_RT_REG_NONE; break; + case REG_SZ: dwMask = RRF_RT_REG_SZ; break; + case REG_EXPAND_SZ: dwMask = RRF_RT_REG_EXPAND_SZ; break; + case REG_MULTI_SZ: dwMask = RRF_RT_REG_MULTI_SZ; break; + case REG_BINARY: dwMask = RRF_RT_REG_BINARY; break; + case REG_DWORD: dwMask = RRF_RT_REG_DWORD; break; + case REG_QWORD: dwMask = RRF_RT_REG_QWORD; break; + } + + if (dwFlags & dwMask) + { + /* Type is not restricted, check for size mismatch */ + if (dwType == REG_BINARY) + { + DWORD cbExpect = 0; + + if ((dwFlags & RRF_RT_DWORD) == RRF_RT_DWORD) + cbExpect = 4; + else if ((dwFlags & RRF_RT_QWORD) == RRF_RT_QWORD) + cbExpect = 8; + + if (cbExpect && cbData != cbExpect) + *ret = ERROR_DATATYPE_MISMATCH; + } + } + else *ret = ERROR_UNSUPPORTED_TYPE; + } +} + +LONG WINAPI RegGetValueX(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData) +{ + DWORD dwType, cbData = pcbData ? *pcbData : 0; + PVOID pvBuf = NULL; + LONG ret; + + if (pvData && !pcbData) + return ERROR_INVALID_PARAMETER; + if ((dwFlags & RRF_RT_REG_EXPAND_SZ) && !(dwFlags & RRF_NOEXPAND) && + ((dwFlags & RRF_RT_ANY) != RRF_RT_ANY)) + return ERROR_INVALID_PARAMETER; + + if (pszSubKey && pszSubKey[0]) + { + ret = RegOpenKeyExW(hKey, pszSubKey, 0, KEY_QUERY_VALUE, &hKey); + if (ret != ERROR_SUCCESS) return ret; + } + + ret = RegQueryValueExW(hKey, pszValue, NULL, &dwType, (LPBYTE)pvData, &cbData); + + /* If we are going to expand we need to read in the whole the value even + * if the passed buffer was too small as the expanded string might be + * smaller than the unexpanded one and could fit into cbData bytes. */ + if ((ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && + dwType == REG_EXPAND_SZ && !(dwFlags & RRF_NOEXPAND)) + { + do + { + HeapFree(GetProcessHeap(), 0, pvBuf); + + pvBuf = HeapAlloc(GetProcessHeap(), 0, cbData); + if (!pvBuf) + { + ret = ERROR_NOT_ENOUGH_MEMORY; + break; + } + + if (ret == ERROR_MORE_DATA || !pvData) + ret = RegQueryValueExW(hKey, pszValue, NULL, + &dwType, (LPBYTE)pvBuf, &cbData); + else + { + /* Even if cbData was large enough we have to copy the + * string since ExpandEnvironmentStrings can't handle + * overlapping buffers. */ + CopyMemory(pvBuf, pvData, cbData); + } + + /* Both the type or the value itself could have been modified in + * between so we have to keep retrying until the buffer is large + * enough or we no longer have to expand the value. */ + } + while (dwType == REG_EXPAND_SZ && ret == ERROR_MORE_DATA); + + if (ret == ERROR_SUCCESS) + { + /* Recheck dwType in case it changed since the first call */ + if (dwType == REG_EXPAND_SZ) + { + cbData = ExpandEnvironmentStringsW((LPCWSTR)pvBuf, (LPWSTR)pvData, + pcbData ? *pcbData : 0) * sizeof(WCHAR); + dwType = REG_SZ; + if (pvData && pcbData && cbData > *pcbData) + ret = ERROR_MORE_DATA; + } + else if (pvData) + CopyMemory(pvData, pvBuf, *pcbData); + } + + HeapFree(GetProcessHeap(), 0, pvBuf); + } + + if (pszSubKey && pszSubKey[0]) + RegCloseKey(hKey); + + RegpApplyRestrictions(dwFlags, dwType, cbData, &ret); + + if (pvData && ret != ERROR_SUCCESS && (dwFlags & RRF_ZEROONFAILURE)) + ZeroMemory(pvData, *pcbData); + + if (pdwType) + *pdwType = dwType; + + if (pcbData) + *pcbData = cbData; + + return ret; +} diff --git a/dll/win32/shell32_new/GlueCode.h b/dll/win32/shell32_new/GlueCode.h new file mode 100644 index 00000000000..4803de2cd08 --- /dev/null +++ b/dll/win32/shell32_new/GlueCode.h @@ -0,0 +1,11 @@ + +#ifndef _GLUE_CODE_H_ +#define _GLUE_CODE_H_ + +LONG WINAPI RegCopyTreeX(HKEY, LPCWSTR, HKEY); +LONG WINAPI RegGetValueX(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData); +LONG WINAPI RegLoadMUIStringWX(IN HKEY hKey, IN LPCWSTR pszValue OPTIONAL, OUT LPWSTR pszOutBuf, IN DWORD cbOutBuf, OUT LPDWORD pcbData OPTIONAL, IN DWORD Flags, IN LPCWSTR pszDirectory OPTIONAL); +LONG WINAPI RegLoadMUIStringAX(IN HKEY hKey, IN LPCSTR pszValue OPTIONAL, OUT LPSTR pszOutBuf, IN DWORD cbOutBuf, OUT LPDWORD pcbData OPTIONAL, IN DWORD Flags, IN LPCSTR pszDirectory OPTIONAL); + +#endif + diff --git a/dll/win32/shell32_new/authors.cpp b/dll/win32/shell32_new/authors.cpp new file mode 100644 index 00000000000..adf252d56c9 --- /dev/null +++ b/dll/win32/shell32_new/authors.cpp @@ -0,0 +1,2 @@ + +const char * const SHELL_Authors[] = { "Copyright 1993-2009 WINE team", "Copyright 1998-2011 ReactOS Team", 0 }; diff --git a/dll/win32/shell32_new/autocomplete.cpp b/dll/win32/shell32_new/autocomplete.cpp new file mode 100644 index 00000000000..da141540441 --- /dev/null +++ b/dll/win32/shell32_new/autocomplete.cpp @@ -0,0 +1,400 @@ +/* + * AutoComplete interfaces implementation. + * + * Copyright 2004 Maxime Belleng + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* + Implemented: + - ACO_AUTOAPPEND style + - ACO_AUTOSUGGEST style + - ACO_UPDOWNKEYDROPSLIST style + + - Handle pwzsRegKeyPath and pwszQuickComplete in Init + + TODO: + - implement ACO_SEARCH style + - implement ACO_FILTERPREFIXES style + - implement ACO_USETAB style + - implement ACO_RTLREADING style + + */ + +#include +#include +#include +#include +#include +#include "autocomplete.h" + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************************************************************** + * IAutoComplete_Constructor + */ +CAutoComplete::CAutoComplete() +{ + enabled = TRUE; + options = ACO_AUTOAPPEND; + wpOrigEditProc = NULL; + hwndListBox = NULL; + txtbackup = NULL; + quickComplete = NULL; +} + +/************************************************************************** + * IAutoComplete_Destructor + */ +CAutoComplete::~CAutoComplete() +{ + TRACE(" destroying IAutoComplete(%p)\n", this); + HeapFree(GetProcessHeap(), 0, quickComplete); + HeapFree(GetProcessHeap(), 0, txtbackup); + if (hwndListBox) + DestroyWindow(hwndListBox); +} + +/****************************************************************************** + * IAutoComplete_fnEnable + */ +HRESULT WINAPI CAutoComplete::Enable(BOOL fEnable) +{ + HRESULT hr = S_OK; + + TRACE("(%p)->(%s)\n", this, (fEnable) ? "true" : "false"); + + enabled = fEnable; + + return hr; +} + +/****************************************************************************** + * IAutoComplete_fnInit + */ +HRESULT WINAPI CAutoComplete::Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwszQuickComplete) +{ + static const WCHAR lbName[] = {'L','i','s','t','B','o','x',0}; + + TRACE("(%p)->(0x%08lx, %p, %s, %s)\n", + this, hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete)); + + if (options & ACO_AUTOSUGGEST) TRACE(" ACO_AUTOSUGGEST\n"); + if (options & ACO_AUTOAPPEND) TRACE(" ACO_AUTOAPPEND\n"); + if (options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n"); + if (options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n"); + if (options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n"); + if (options & ACO_UPDOWNKEYDROPSLIST) TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); + if (options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n"); + + hwndEdit = hwndEdit; + + if (!SUCCEEDED (punkACL->QueryInterface(IID_IEnumString, (LPVOID *)&enumstr))) { + TRACE("No IEnumString interface\n"); + return E_NOINTERFACE; + } + + wpOrigEditProc = (WNDPROC)SetWindowLongPtrW(hwndEdit, GWLP_WNDPROC, (LONG_PTR) ACEditSubclassProc); + SetWindowLongPtrW(hwndEdit, GWLP_USERDATA, (LONG_PTR)this); + + if (options & ACO_AUTOSUGGEST) { + HWND hwndParent; + + hwndParent = GetParent(hwndEdit); + + /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks ugly */ + hwndListBox = CreateWindowExW(0, lbName, NULL, + WS_BORDER | WS_CHILD | WS_VSCROLL | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + hwndParent, NULL, + (HINSTANCE)GetWindowLongPtrW(hwndParent, GWLP_HINSTANCE), NULL); + + if (hwndListBox) { + wpOrigLBoxProc = (WNDPROC)SetWindowLongPtrW(hwndListBox, GWLP_WNDPROC, (LONG_PTR)ACLBoxSubclassProc); + SetWindowLongPtrW(hwndListBox, GWLP_USERDATA, (LONG_PTR)this); + } + } + + if (pwzsRegKeyPath) { + WCHAR *key; + WCHAR result[MAX_PATH]; + WCHAR *value; + HKEY hKey = 0; + LONG res; + LONG len; + + /* pwszRegKeyPath contains the key as well as the value, so we split */ + key = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwzsRegKeyPath) + 1) * sizeof(WCHAR)); + wcscpy(key, pwzsRegKeyPath); + value = const_cast(strrchrW(key, '\\')); + *value = 0; + value++; + /* Now value contains the value and buffer the key */ + res = RegOpenKeyExW(HKEY_CURRENT_USER, key, 0, KEY_READ, &hKey); + if (res != ERROR_SUCCESS) { + /* if the key is not found, MSDN states we must seek in HKEY_LOCAL_MACHINE */ + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hKey); + } + if (res == ERROR_SUCCESS) { + res = RegQueryValueW(hKey, value, result, &len); + if (res == ERROR_SUCCESS) { + quickComplete = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR)); + wcscpy(quickComplete, result); + } + RegCloseKey(hKey); + } + HeapFree(GetProcessHeap(), 0, key); + } + + if ((pwszQuickComplete) && (!quickComplete)) { + quickComplete = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwszQuickComplete) + 1) * sizeof(WCHAR)); + wcscpy(quickComplete, pwszQuickComplete); + } + + return S_OK; +} + +/************************************************************************** + * IAutoComplete_fnGetOptions + */ +HRESULT WINAPI CAutoComplete::GetOptions(DWORD *pdwFlag) +{ + HRESULT hr = S_OK; + + TRACE("(%p) -> (%p)\n", this, pdwFlag); + + *pdwFlag = options; + + return hr; +} + +/************************************************************************** + * IAutoComplete_fnSetOptions + */ +HRESULT WINAPI CAutoComplete::SetOptions(DWORD dwFlag) +{ + HRESULT hr = S_OK; + + TRACE("(%p) -> (0x%x)\n", this, dwFlag); + + options = (AUTOCOMPLETEOPTIONS)dwFlag; + + return hr; +} + +/* + Window procedure for autocompletion + */ +LRESULT APIENTRY CAutoComplete::ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + CAutoComplete *pThis = (CAutoComplete *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + LPOLESTR strs; + HRESULT hr; + WCHAR hwndText[255]; + WCHAR *hwndQCText; + RECT r; + BOOL control, filled, displayall = FALSE; + int cpt, height, sel; + + if (!pThis->enabled) return CallWindowProcW(pThis->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + + switch (uMsg) + { + case CB_SHOWDROPDOWN: + ShowWindow(pThis->hwndListBox, SW_HIDE); + break; + case WM_KILLFOCUS: + if ((pThis->options & ACO_AUTOSUGGEST) && + ((HWND)wParam != pThis->hwndListBox)) + { + ShowWindow(pThis->hwndListBox, SW_HIDE); + } + break; + case WM_KEYUP: + + GetWindowTextW(hwnd, (LPWSTR)hwndText, 255); + + switch(wParam) { + case VK_RETURN: + /* If quickComplete is set and control is pressed, replace the string */ + control = GetKeyState(VK_CONTROL) & 0x8000; + if (control && pThis->quickComplete) { + hwndQCText = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + (wcslen(pThis->quickComplete)+wcslen(hwndText))*sizeof(WCHAR)); + sel = swprintf(hwndQCText, pThis->quickComplete, hwndText); + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); + SendMessageW(hwnd, EM_SETSEL, 0, sel); + HeapFree(GetProcessHeap(), 0, hwndQCText); + } + + ShowWindow(pThis->hwndListBox, SW_HIDE); + return 0; + case VK_LEFT: + case VK_RIGHT: + return 0; + case VK_UP: + case VK_DOWN: + /* Two cases here : + - if the listbox is not visible, displays it + with all the entries if the style ACO_UPDOWNKEYDROPSLIST + is present but does not select anything. + - if the listbox is visible, change the selection + */ + if ( (pThis->options & (ACO_AUTOSUGGEST | ACO_UPDOWNKEYDROPSLIST)) + && (!IsWindowVisible(pThis->hwndListBox) && (! *hwndText)) ) + { + /* We must display all the entries */ + displayall = TRUE; + } else { + if (IsWindowVisible(pThis->hwndListBox)) { + int count; + + count = SendMessageW(pThis->hwndListBox, LB_GETCOUNT, 0, 0); + /* Change the selection */ + sel = SendMessageW(pThis->hwndListBox, LB_GETCURSEL, 0, 0); + if (wParam == VK_UP) + sel = ((sel-1)<0)?count-1:sel-1; + else + sel = ((sel+1)>= count)?-1:sel+1; + SendMessageW(pThis->hwndListBox, LB_SETCURSEL, sel, 0); + if (sel != -1) { + WCHAR *msg; + int len; + + len = SendMessageW(pThis->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); + msg = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len + 1) * sizeof(WCHAR)); + SendMessageW(pThis->hwndListBox, LB_GETTEXT, sel, (LPARAM)msg); + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)msg); + SendMessageW(hwnd, EM_SETSEL, wcslen(msg), wcslen(msg)); + HeapFree(GetProcessHeap(), 0, msg); + } else { + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)pThis->txtbackup); + SendMessageW(hwnd, EM_SETSEL, wcslen(pThis->txtbackup), wcslen(pThis->txtbackup)); + } + } + return 0; + } + break; + case VK_BACK: + case VK_DELETE: + if ((! *hwndText) && (pThis->options & ACO_AUTOSUGGEST)) { + ShowWindow(pThis->hwndListBox, SW_HIDE); + return CallWindowProcW(pThis->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + } + if (pThis->options & ACO_AUTOAPPEND) { + DWORD b; + SendMessageW(hwnd, EM_GETSEL, (WPARAM)&b, (LPARAM)NULL); + if (b>1) { + hwndText[b-1] = '\0'; + } else { + hwndText[0] = '\0'; + SetWindowTextW(hwnd, hwndText); + } + } + break; + default: + ; + } + + SendMessageW(pThis->hwndListBox, LB_RESETCONTENT, 0, 0); + + HeapFree(GetProcessHeap(), 0, pThis->txtbackup); + pThis->txtbackup = (WCHAR *)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, (wcslen(hwndText)+1)*sizeof(WCHAR)); + wcscpy(pThis->txtbackup, hwndText); + + /* Returns if there is no text to search and we doesn't want to display all the entries */ + if ((!displayall) && (! *hwndText) ) + break; + + pThis->enumstr->Reset(); + filled = FALSE; + for(cpt = 0;;) { + hr = pThis->enumstr->Next(1, &strs, NULL); + if (hr != S_OK) + break; + + if ((LPWSTR)strstrW(strs, hwndText) == strs) { + + if (pThis->options & ACO_AUTOAPPEND) { + SetWindowTextW(hwnd, strs); + SendMessageW(hwnd, EM_SETSEL, wcslen(hwndText), wcslen(strs)); + break; + } + + if (pThis->options & ACO_AUTOSUGGEST) { + SendMessageW(pThis->hwndListBox, LB_ADDSTRING, 0, (LPARAM)strs); + filled = TRUE; + cpt++; + } + } + } + + if (pThis->options & ACO_AUTOSUGGEST) { + if (filled) { + height = SendMessageW(pThis->hwndListBox, LB_GETITEMHEIGHT, 0, 0); + SendMessageW(pThis->hwndListBox, LB_CARETOFF, 0, 0); + GetWindowRect(hwnd, &r); + SetParent(pThis->hwndListBox, HWND_DESKTOP); + /* It seems that Windows XP displays 7 lines at most + and otherwise displays a vertical scroll bar */ + SetWindowPos(pThis->hwndListBox, HWND_TOP, + r.left, r.bottom + 1, r.right - r.left, min(height * 7, height * (cpt + 1)), + SWP_SHOWWINDOW ); + } else { + ShowWindow(pThis->hwndListBox, SW_HIDE); + } + } + + break; + default: + return CallWindowProcW(pThis->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + + } + + return 0; +} + +LRESULT APIENTRY CAutoComplete::ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + CAutoComplete *pThis = (CAutoComplete *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + WCHAR *msg; + int sel, len; + + switch (uMsg) { + case WM_MOUSEMOVE: + sel = SendMessageW(hwnd, LB_ITEMFROMPOINT, 0, lParam); + SendMessageW(hwnd, LB_SETCURSEL, (WPARAM)sel, (LPARAM)0); + break; + case WM_LBUTTONDOWN: + sel = SendMessageW(hwnd, LB_GETCURSEL, 0, 0); + if (sel < 0) + break; + len = SendMessageW(pThis->hwndListBox, LB_GETTEXTLEN, sel, 0); + msg = (WCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len + 1) * sizeof(WCHAR)); + SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); + SendMessageW(pThis->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); + SendMessageW(pThis->hwndEdit, EM_SETSEL, 0, wcslen(msg)); + ShowWindow(hwnd, SW_HIDE); + HeapFree(GetProcessHeap(), 0, msg); + break; + default: + return CallWindowProcW(pThis->wpOrigLBoxProc, hwnd, uMsg, wParam, lParam); + } + return 0; +} diff --git a/dll/win32/shell32_new/autocomplete.h b/dll/win32/shell32_new/autocomplete.h new file mode 100644 index 00000000000..d50fe4c1e62 --- /dev/null +++ b/dll/win32/shell32_new/autocomplete.h @@ -0,0 +1,65 @@ +/* + * AutoComplete interfaces implementation. + * + * Copyright 2004 Maxime Belleng + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _AUTOCOMPLETE_H_ +#define _AUTOCOMPLETE_H_ + +class CAutoComplete : + public CComCoClass, + public CComObjectRootEx, + public IAutoComplete2 +{ +private: + BOOL enabled; + HWND hwndEdit; + HWND hwndListBox; + WNDPROC wpOrigEditProc; + WNDPROC wpOrigLBoxProc; + WCHAR *txtbackup; + WCHAR *quickComplete; + CComPtr enumstr; + AUTOCOMPLETEOPTIONS options; +public: + + CAutoComplete(); + ~CAutoComplete(); + + static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + + // IAutoComplete2 + virtual HRESULT WINAPI Enable(BOOL fEnable); + virtual HRESULT WINAPI Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwszQuickComplete); + virtual HRESULT WINAPI GetOptions(DWORD *pdwFlag); + virtual HRESULT WINAPI SetOptions(DWORD dwFlag); + +DECLARE_REGISTRY_RESOURCEID(IDR_AUTOCOMPLETE) +DECLARE_NOT_AGGREGATABLE(CAutoComplete) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CAutoComplete) + COM_INTERFACE_ENTRY_IID(IID_IAutoComplete, IAutoComplete) + COM_INTERFACE_ENTRY_IID(IID_IAutoComplete2, IAutoComplete2) +END_COM_MAP() +}; + +#endif // _AUTOCOMPLETE_H_ diff --git a/dll/win32/shell32_new/avi_res.rc b/dll/win32/shell32_new/avi_res.rc new file mode 100644 index 00000000000..fec00e0c594 --- /dev/null +++ b/dll/win32/shell32_new/avi_res.rc @@ -0,0 +1,9 @@ +IDA_SHELL_COPY AVI "res/avis/160+161+167+168.avi" +IDA_SHELL_COPY1 AVI "res/avis/160+161+167+168.avi" +IDA_SHELL_COPY2 AVI "res/avis/160+161+167+168.avi" +IDA_SHELL_COPY3 AVI "res/avis/160+161+167+168.avi" +IDA_SHELL_RECYCLE AVI "res/avis/162.avi" +IDA_SHELL_EMPTY_RECYCLE AVI "res/avis/163.avi" +IDA_SHELL_DELETE AVI "res/avis/164+169.avi" +IDA_SHELL_DELETE1 AVI "res/avis/164+169.avi" +IDA_SHELL_DOWNLOAD AVI "res/avis/170.avi" diff --git a/dll/win32/shell32_new/basebar.cpp b/dll/win32/shell32_new/basebar.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/basebar.h b/dll/win32/shell32_new/basebar.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/bitmap_res.rc b/dll/win32/shell32_new/bitmap_res.rc new file mode 100644 index 00000000000..0a5787c1a52 --- /dev/null +++ b/dll/win32/shell32_new/bitmap_res.rc @@ -0,0 +1,13 @@ +IDB_SHELL_ABOUT_LOGO_24BPP BITMAP "res/bitmaps/shell_about_logo_24bpp.bmp" + +/*IDB_SHELL_IEXPLORE_LG BITMAP "res/bitmaps/204+205.bmp" +IDB_SHELL_IEXPLORE_SM BITMAP "res/bitmaps/206+207.bmp" +IDB_SHELL_EXPLORER_LG BITMAP "res/bitmaps/214+215.bmp" +IDB_SHELL_EXPLORER_SM BITMAP "res/bitmaps/216+217.bmp" +IDB_SHELL_UNKNOWN1 BITMAP "res/bitmaps/225.bmp" +IDB_SHELL_UNKNOWN2 BITMAP "res/bitmaps/226.bmp" +IDB_SHELL_UNKNOWN3 BITMAP "res/bitmaps/227.bmp" +IDB_SHELL_UNKNOWN4 BITMAP "res/bitmaps/228.bmp" +IDB_SHELL_UNKNOWN5 BITMAP "res/bitmaps/230.bmp" +IDB_SHELL_UNKNOWN6 BITMAP "res/bitmaps/231.bmp" +IDB_SHELL_UNKNOWN7 BITMAP "res/bitmaps/245.bmp"*/ diff --git a/dll/win32/shell32_new/brsfolder.cpp b/dll/win32/shell32_new/brsfolder.cpp new file mode 100644 index 00000000000..f4bf88c3f38 --- /dev/null +++ b/dll/win32/shell32_new/brsfolder.cpp @@ -0,0 +1,816 @@ +/* + * Copyright 1999 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * FIXME: + * - many memory leaks + * - many flags unimplemented + * - implement new dialog style "make new folder" button + * - implement editbox + * - implement new dialog style resizing + */ + +#include + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct tagbrowse_info +{ + HWND hWnd; + HWND hwndTreeView; + LPBROWSEINFOW lpBrowseInfo; + LPITEMIDLIST pidlRet; +} browse_info; + +typedef struct tagTV_ITEMDATA +{ + LPSHELLFOLDER lpsfParent; /* IShellFolder of the parent */ + LPITEMIDLIST lpi; /* PIDL relative to parent */ + LPITEMIDLIST lpifq; /* Fully qualified PIDL */ + IEnumIDList* pEnumIL; /* Children iterator */ +} TV_ITEMDATA, *LPTV_ITEMDATA; + +#define SUPPORTEDFLAGS (BIF_STATUSTEXT | \ + BIF_BROWSEFORCOMPUTER | \ + BIF_RETURNFSANCESTORS | \ + BIF_RETURNONLYFSDIRS | \ + BIF_NONEWFOLDERBUTTON | \ + BIF_NEWDIALOGSTYLE | \ + BIF_BROWSEINCLUDEFILES) + +static void FillTreeView(browse_info*, LPSHELLFOLDER, + LPITEMIDLIST, HTREEITEM, IEnumIDList*); +static HTREEITEM InsertTreeViewItem( browse_info*, IShellFolder *, + LPCITEMIDLIST, LPCITEMIDLIST, IEnumIDList*, HTREEITEM); + +static const WCHAR szBrowseFolderInfo[] = { + '_','_','W','I','N','E','_', + 'B','R','S','F','O','L','D','E','R','D','L','G','_', + 'I','N','F','O',0 +}; + +static DWORD __inline BrowseFlagsToSHCONTF(UINT ulFlags) +{ + return SHCONTF_FOLDERS | (ulFlags & BIF_BROWSEINCLUDEFILES ? SHCONTF_NONFOLDERS : 0); +} + +static void browsefolder_callback( LPBROWSEINFOW lpBrowseInfo, HWND hWnd, + UINT msg, LPARAM param ) +{ + if (!lpBrowseInfo->lpfn) + return; + lpBrowseInfo->lpfn( hWnd, msg, param, lpBrowseInfo->lParam ); +} + +/****************************************************************************** + * InitializeTreeView [Internal] + * + * Called from WM_INITDIALOG handler. + * + * PARAMS + * hwndParent [I] The BrowseForFolder dialog + * root [I] ITEMIDLIST of the root shell folder + */ +static void InitializeTreeView( browse_info *info ) +{ + LPITEMIDLIST pidlParent, pidlChild; + HIMAGELIST hImageList; + HRESULT hr; + IShellFolder *lpsfParent, *lpsfRoot; + IEnumIDList * pEnumChildren = NULL; + HTREEITEM item; + DWORD flags; + LPCITEMIDLIST root = info->lpBrowseInfo->pidlRoot; + + TRACE("%p\n", info ); + + Shell_GetImageLists(NULL, &hImageList); + + if (hImageList) + SendMessageW( info->hwndTreeView, TVM_SETIMAGELIST, 0, (LPARAM)hImageList ); + + /* We want to call InsertTreeViewItem down the code, in order to insert + * the root item of the treeview. Due to InsertTreeViewItem's signature, + * we need the following to do this: + * + * + An ITEMIDLIST corresponding to _the parent_ of root. + * + An ITEMIDLIST, which is a relative path from root's parent to root + * (containing a single SHITEMID). + * + An IShellFolder interface pointer of root's parent folder. + * + * If root is 'Desktop', then root's parent is also 'Desktop'. + */ + + pidlParent = ILClone(root); + ILRemoveLastID(pidlParent); + pidlChild = ILClone(ILFindLastID(root)); + + if (_ILIsDesktop(pidlParent)) { + hr = SHGetDesktopFolder(&lpsfParent); + } else { + IShellFolder *lpsfDesktop; + hr = SHGetDesktopFolder(&lpsfDesktop); + if (!SUCCEEDED(hr)) { + WARN("SHGetDesktopFolder failed! hr = %08x\n", hr); + return; + } + hr = lpsfDesktop->BindToObject(pidlParent, 0, IID_IShellFolder, (LPVOID *)&lpsfParent); + lpsfDesktop->Release(); + } + + if (!SUCCEEDED(hr)) { + WARN("Could not bind to parent shell folder! hr = %08x\n", hr); + return; + } + + if (pidlChild && pidlChild->mkid.cb) { + hr = lpsfParent->BindToObject(pidlChild, 0, IID_IShellFolder, (LPVOID *)&lpsfRoot); + } else { + lpsfRoot = lpsfParent; + hr = lpsfParent->AddRef(); + } + + if (!SUCCEEDED(hr)) { + WARN("Could not bind to root shell folder! hr = %08x\n", hr); + lpsfParent->Release(); + return; + } + + flags = BrowseFlagsToSHCONTF( info->lpBrowseInfo->ulFlags ); + hr = lpsfRoot->EnumObjects(info->hWnd, flags, &pEnumChildren ); + if (!SUCCEEDED(hr)) { + WARN("Could not get child iterator! hr = %08x\n", hr); + lpsfParent->Release(); + lpsfRoot->Release(); + return; + } + + SendMessageW( info->hwndTreeView, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT ); + item = InsertTreeViewItem( info, lpsfParent, pidlChild, + pidlParent, pEnumChildren, TVI_ROOT ); + SendMessageW( info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item ); + + lpsfRoot->Release(); + lpsfParent->Release(); +} + +static int GetIcon(LPCITEMIDLIST lpi, UINT uFlags) +{ + SHFILEINFOW sfi; + SHGetFileInfoW((LPCWSTR)lpi, 0 ,&sfi, sizeof(SHFILEINFOW), uFlags); + return sfi.iIcon; +} + +static void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq, LPTVITEMW lpTV_ITEM) +{ + LPITEMIDLIST pidlDesktop = NULL; + DWORD flags; + + TRACE("%p %p\n",lpifq, lpTV_ITEM); + + if (!lpifq) + { + pidlDesktop = _ILCreateDesktop(); + lpifq = pidlDesktop; + } + + flags = SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON; + lpTV_ITEM->iImage = GetIcon( lpifq, flags ); + + flags = SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_OPENICON; + lpTV_ITEM->iSelectedImage = GetIcon( lpifq, flags ); + + if (pidlDesktop) + ILFree( pidlDesktop ); +} + +/****************************************************************************** + * GetName [Internal] + * + * Query a shell folder for the display name of one of it's children + * + * PARAMS + * lpsf [I] IShellFolder interface of the folder to be queried. + * lpi [I] ITEMIDLIST of the child, relative to parent + * dwFlags [I] as in IShellFolder::GetDisplayNameOf + * lpFriendlyName [O] The desired display name in unicode + * + * RETURNS + * Success: TRUE + * Failure: FALSE + */ +static BOOL GetName(LPSHELLFOLDER lpsf, LPCITEMIDLIST lpi, DWORD dwFlags, LPWSTR lpFriendlyName) +{ + BOOL bSuccess=TRUE; + STRRET str; + + TRACE("%p %p %x %p\n", lpsf, lpi, dwFlags, lpFriendlyName); + if (SUCCEEDED(lpsf->GetDisplayNameOf(lpi, dwFlags, &str))) + bSuccess = StrRetToStrNW(lpFriendlyName, MAX_PATH, &str, lpi); + else + bSuccess = FALSE; + + TRACE("-- %s\n", debugstr_w(lpFriendlyName)); + return bSuccess; +} + +/****************************************************************************** + * InsertTreeViewItem [Internal] + * + * PARAMS + * info [I] data for the dialog + * lpsf [I] IShellFolder interface of the item's parent shell folder + * pidl [I] ITEMIDLIST of the child to insert, relative to parent + * pidlParent [I] ITEMIDLIST of the parent shell folder + * pEnumIL [I] Iterator for the children of the item to be inserted + * hParent [I] The treeview-item that represents the parent shell folder + * + * RETURNS + * Success: Handle to the created and inserted treeview-item + * Failure: NULL + */ +static HTREEITEM InsertTreeViewItem( browse_info *info, IShellFolder * lpsf, + LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, + HTREEITEM hParent) +{ + TVITEMW tvi; + TVINSERTSTRUCTW tvins; + WCHAR szBuff[MAX_PATH]; + LPTV_ITEMDATA lptvid=0; + + tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; + + tvi.cChildren= pEnumIL ? 1 : 0; + tvi.mask |= TVIF_CHILDREN; + + lptvid = (TV_ITEMDATA *)SHAlloc( sizeof(TV_ITEMDATA) ); + if (!lptvid) + return NULL; + + if (!GetName(lpsf, pidl, SHGDN_NORMAL, szBuff)) + return NULL; + + tvi.pszText = szBuff; + tvi.cchTextMax = MAX_PATH; + tvi.lParam = (LPARAM)lptvid; + + lpsf->AddRef(); + lptvid->lpsfParent = lpsf; + lptvid->lpi = ILClone(pidl); + lptvid->lpifq = pidlParent ? ILCombine(pidlParent, pidl) : ILClone(pidl); + lptvid->pEnumIL = pEnumIL; + GetNormalAndSelectedIcons(lptvid->lpifq, &tvi); + + tvins.item = tvi; + tvins.hInsertAfter = NULL; + tvins.hParent = hParent; + + return (HTREEITEM)SendMessageW(info->hwndTreeView, TVM_INSERTITEM, 0, (LPARAM)&tvins ); +} + +/****************************************************************************** + * FillTreeView [Internal] + * + * For each child (given by lpe) of the parent shell folder, which is given by + * lpsf and whose PIDL is pidl, insert a treeview-item right under hParent + * + * PARAMS + * info [I] data for the dialog + * lpsf [I] IShellFolder interface of the parent shell folder + * pidl [I] ITEMIDLIST of the parent shell folder + * hParent [I] The treeview item that represents the parent shell folder + * lpe [I] An iterator for the children of the parent shell folder + */ +static void FillTreeView( browse_info *info, IShellFolder * lpsf, + LPITEMIDLIST pidl, HTREEITEM hParent, IEnumIDList* lpe) +{ + HTREEITEM hPrev = 0; + LPITEMIDLIST pidlTemp = 0; + ULONG ulFetched; + HRESULT hr; + HWND hwnd = GetParent( info->hwndTreeView ); + + TRACE("%p %p %p %p\n",lpsf, pidl, hParent, lpe); + + /* No IEnumIDList -> No children */ + if (!lpe) return; + + SetCapture( hwnd ); + SetCursor( LoadCursorA( 0, (LPSTR)IDC_WAIT ) ); + + while (NOERROR == lpe->Next(1,&pidlTemp,&ulFetched)) + { + ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER; + IEnumIDList* pEnumIL = NULL; + IShellFolder* pSFChild = NULL; + lpsf->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs); + if (ulAttrs & SFGAO_FOLDER) + { + hr = lpsf->BindToObject(pidlTemp, NULL, IID_IShellFolder, (LPVOID *)&pSFChild); + if (SUCCEEDED(hr)) + { + DWORD flags = BrowseFlagsToSHCONTF(info->lpBrowseInfo->ulFlags); + hr = pSFChild->EnumObjects(hwnd, flags, &pEnumIL); + if (hr == S_OK) + { + if ((pEnumIL->Skip(1) != S_OK) || + FAILED(pEnumIL->Reset())) + { + pEnumIL->Release(); + pEnumIL = NULL; + } + } + pSFChild->Release(); + } + } + + if (!(hPrev = InsertTreeViewItem(info, lpsf, pidlTemp, pidl, pEnumIL, hParent))) + goto done; + SHFree(pidlTemp); /* Finally, free the pidl that the shell gave us... */ + pidlTemp=NULL; + } + +done: + ReleaseCapture(); + SetCursor(LoadCursorW(0, (LPWSTR)IDC_ARROW)); + SHFree(pidlTemp); +} + +static BOOL __inline PIDLIsType(LPCITEMIDLIST pidl, PIDLTYPE type) +{ + LPPIDLDATA data = _ILGetDataPointer(pidl); + if (!data) + return FALSE; + return (data->type == type); +} + +static void BrsFolder_CheckValidSelection( browse_info *info, LPTV_ITEMDATA lptvid ) +{ + LPBROWSEINFOW lpBrowseInfo = info->lpBrowseInfo; + LPCITEMIDLIST pidl = lptvid->lpi; + BOOL bEnabled = TRUE; + DWORD dwAttributes; + HRESULT r; + + if ((lpBrowseInfo->ulFlags & BIF_BROWSEFORCOMPUTER) && + !PIDLIsType(pidl, PT_COMP)) + bEnabled = FALSE; + if (lpBrowseInfo->ulFlags & BIF_RETURNFSANCESTORS) + { + dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM; + r = lptvid->lpsfParent->GetAttributesOf(1, + (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes); + if (FAILED(r) || !(dwAttributes & (SFGAO_FILESYSANCESTOR|SFGAO_FILESYSTEM))) + bEnabled = FALSE; + } + if (lpBrowseInfo->ulFlags & BIF_RETURNONLYFSDIRS) + { + dwAttributes = SFGAO_FOLDER | SFGAO_FILESYSTEM; + r = lptvid->lpsfParent->GetAttributesOf(1, + (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes); + if (FAILED(r) || + ((dwAttributes & (SFGAO_FOLDER|SFGAO_FILESYSTEM)) != (SFGAO_FOLDER|SFGAO_FILESYSTEM))) + { + bEnabled = FALSE; + } + } + SendMessageW(info->hWnd, BFFM_ENABLEOK, 0, (LPARAM)bEnabled); +} + +static LRESULT BrsFolder_Treeview_Delete( browse_info *info, NMTREEVIEWW *pnmtv ) +{ + LPTV_ITEMDATA lptvid = (LPTV_ITEMDATA)pnmtv->itemOld.lParam; + + TRACE("TVN_DELETEITEMA/W %p\n", lptvid); + + lptvid->lpsfParent->Release(); + if (lptvid->pEnumIL) + lptvid->pEnumIL->Release(); + SHFree(lptvid->lpi); + SHFree(lptvid->lpifq); + SHFree(lptvid); + return 0; +} + +static LRESULT BrsFolder_Treeview_Expand( browse_info *info, NMTREEVIEWW *pnmtv ) +{ + IShellFolder *lpsf2 = NULL; + LPTV_ITEMDATA lptvid = (LPTV_ITEMDATA) pnmtv->itemNew.lParam; + HRESULT r; + + TRACE("TVN_ITEMEXPANDINGA/W\n"); + + if ((pnmtv->itemNew.state & TVIS_EXPANDEDONCE)) + return 0; + + if (lptvid->lpi && lptvid->lpi->mkid.cb) { + r = lptvid->lpsfParent->BindToObject(lptvid->lpi, 0, + IID_IShellFolder, (LPVOID *)&lpsf2 ); + } else { + lpsf2 = lptvid->lpsfParent; + r = lpsf2->AddRef(); + } + + if (SUCCEEDED(r)) + FillTreeView( info, lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem, lptvid->pEnumIL); + + /* My Computer is already sorted and trying to do a simple text + * sort will only mess things up */ + if (!_ILIsMyComputer(lptvid->lpi)) + SendMessageW( info->hwndTreeView, TVM_SORTCHILDREN, + FALSE, (LPARAM)pnmtv->itemNew.hItem ); + + return 0; +} + +static HRESULT BrsFolder_Treeview_Changed( browse_info *info, NMTREEVIEWW *pnmtv ) +{ + LPTV_ITEMDATA lptvid = (LPTV_ITEMDATA) pnmtv->itemNew.lParam; + + lptvid = (LPTV_ITEMDATA) pnmtv->itemNew.lParam; + info->pidlRet = lptvid->lpifq; + browsefolder_callback( info->lpBrowseInfo, info->hWnd, BFFM_SELCHANGED, + (LPARAM)info->pidlRet ); + BrsFolder_CheckValidSelection( info, lptvid ); + return 0; +} + +static LRESULT BrsFolder_OnNotify( browse_info *info, UINT CtlID, LPNMHDR lpnmh ) +{ + NMTREEVIEWW *pnmtv = (NMTREEVIEWW *)lpnmh; + + TRACE("%p %x %p msg=%x\n", info, CtlID, lpnmh, pnmtv->hdr.code); + + if (pnmtv->hdr.idFrom != IDD_TREEVIEW) + return 0; + + switch (pnmtv->hdr.code) + { + case TVN_DELETEITEMA: + case TVN_DELETEITEMW: + return BrsFolder_Treeview_Delete( info, pnmtv ); + + case TVN_ITEMEXPANDINGA: + case TVN_ITEMEXPANDINGW: + return BrsFolder_Treeview_Expand( info, pnmtv ); + + case TVN_SELCHANGEDA: + case TVN_SELCHANGEDW: + return BrsFolder_Treeview_Changed( info, pnmtv ); + + default: + WARN("unhandled (%d)\n", pnmtv->hdr.code); + break; + } + + return 0; +} + + +static BOOL BrsFolder_OnCreate( HWND hWnd, browse_info *info ) +{ + LPBROWSEINFOW lpBrowseInfo = info->lpBrowseInfo; + + info->hWnd = hWnd; + SetPropW( hWnd, szBrowseFolderInfo, info ); + + if (lpBrowseInfo->ulFlags & BIF_NEWDIALOGSTYLE) + FIXME("flags BIF_NEWDIALOGSTYLE partially implemented\n"); + if (lpBrowseInfo->ulFlags & ~SUPPORTEDFLAGS) + FIXME("flags %x not implemented\n", lpBrowseInfo->ulFlags & ~SUPPORTEDFLAGS); + + if (lpBrowseInfo->lpszTitle) + SetWindowTextW( GetDlgItem(hWnd, IDD_TITLE), lpBrowseInfo->lpszTitle ); + else + ShowWindow( GetDlgItem(hWnd, IDD_TITLE), SW_HIDE ); + + if (!(lpBrowseInfo->ulFlags & BIF_STATUSTEXT) + || (lpBrowseInfo->ulFlags & BIF_NEWDIALOGSTYLE)) + ShowWindow( GetDlgItem(hWnd, IDD_STATUS), SW_HIDE ); + + /* Hide "Make New Folder" Button? */ + if ((lpBrowseInfo->ulFlags & BIF_NONEWFOLDERBUTTON) + || !(lpBrowseInfo->ulFlags & BIF_NEWDIALOGSTYLE)) + ShowWindow( GetDlgItem(hWnd, IDD_MAKENEWFOLDER), SW_HIDE ); + + /* Hide the editbox? */ + if (!(lpBrowseInfo->ulFlags & BIF_EDITBOX)) + { + ShowWindow( GetDlgItem(hWnd, IDD_FOLDER), SW_HIDE ); + ShowWindow( GetDlgItem(hWnd, IDD_FOLDERTEXT), SW_HIDE ); + } + + info->hwndTreeView = GetDlgItem( hWnd, IDD_TREEVIEW ); + if (info->hwndTreeView) + { + InitializeTreeView( info ); + + /* Resize the treeview if there's not editbox */ + if ((lpBrowseInfo->ulFlags & BIF_NEWDIALOGSTYLE) + && !(lpBrowseInfo->ulFlags & BIF_EDITBOX)) + { + RECT rc; + GetClientRect(info->hwndTreeView, &rc); + SetWindowPos(info->hwndTreeView, HWND_TOP, 0, 0, + rc.right, rc.bottom + 40, SWP_NOMOVE); + } + } + else + ERR("treeview control missing!\n"); + + browsefolder_callback( info->lpBrowseInfo, hWnd, BFFM_INITIALIZED, 0 ); + + return TRUE; +} + +static BOOL BrsFolder_OnCommand( browse_info *info, UINT id ) +{ + LPBROWSEINFOW lpBrowseInfo = info->lpBrowseInfo; + + switch (id) + { + case IDOK: + /* The original pidl is owned by the treeview and will be free'd. */ + info->pidlRet = ILClone(info->pidlRet); + if (info->pidlRet == NULL) /* A null pidl would mean a cancel */ + info->pidlRet = _ILCreateDesktop(); + pdump( info->pidlRet ); + if (lpBrowseInfo->pszDisplayName) + SHGetPathFromIDListW( info->pidlRet, lpBrowseInfo->pszDisplayName ); + EndDialog( info->hWnd, 1 ); + return TRUE; + + case IDCANCEL: + EndDialog( info->hWnd, 0 ); + return TRUE; + + case IDD_MAKENEWFOLDER: + FIXME("make new folder not implemented\n"); + return TRUE; + } + return FALSE; +} + +static BOOL BrsFolder_OnSetExpanded(browse_info *info, LPVOID selection, + BOOL is_str, HTREEITEM *pItem) +{ + LPITEMIDLIST pidlSelection = (LPITEMIDLIST)selection; + LPCITEMIDLIST pidlCurrent, pidlRoot; + TVITEMEXW item; + BOOL bResult = FALSE; + + /* If 'selection' is a string, convert to a Shell ID List. */ + if (is_str) { + IShellFolder *psfDesktop; + HRESULT hr; + + hr = SHGetDesktopFolder(&psfDesktop); + if (FAILED(hr)) + goto done; + + hr = psfDesktop->ParseDisplayName(NULL, NULL, + (LPOLESTR)selection, NULL, &pidlSelection, NULL); + psfDesktop->Release(); + if (FAILED(hr)) + goto done; + } + + /* Move pidlCurrent behind the SHITEMIDs in pidlSelection, which are the root of + * the sub-tree currently displayed. */ + pidlRoot = info->lpBrowseInfo->pidlRoot; + pidlCurrent = pidlSelection; + while (!_ILIsEmpty(pidlRoot) && _ILIsEqualSimple(pidlRoot, pidlCurrent)) { + pidlRoot = ILGetNext(pidlRoot); + pidlCurrent = ILGetNext(pidlCurrent); + } + + /* The given ID List is not part of the SHBrowseForFolder's current sub-tree. */ + if (!_ILIsEmpty(pidlRoot)) + goto done; + + /* Initialize item to point to the first child of the root folder. */ + memset(&item, 0, sizeof(item)); + item.mask = TVIF_PARAM; + item.hItem = TreeView_GetRoot(info->hwndTreeView); + if (item.hItem) + item.hItem = TreeView_GetChild(info->hwndTreeView, item.hItem); + + /* Walk the tree along the nodes corresponding to the remaining ITEMIDLIST */ + while (item.hItem && !_ILIsEmpty(pidlCurrent)) { + LPTV_ITEMDATA pItemData; + + SendMessageW(info->hwndTreeView, TVM_GETITEMW, 0, (LPARAM)&item); + pItemData = (LPTV_ITEMDATA)item.lParam; + + if (_ILIsEqualSimple(pItemData->lpi, pidlCurrent)) { + pidlCurrent = ILGetNext(pidlCurrent); + if (!_ILIsEmpty(pidlCurrent)) { + /* Only expand current node and move on to it's first child, + * if we didn't already reach the last SHITEMID */ + SendMessageW(info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item.hItem); + item.hItem = TreeView_GetChild(info->hwndTreeView, item.hItem); + } + } else { + item.hItem = TreeView_GetNextSibling(info->hwndTreeView, item.hItem); + } + } + + if (_ILIsEmpty(pidlCurrent) && item.hItem) + bResult = TRUE; + +done: + if (pidlSelection && pidlSelection != (LPITEMIDLIST)selection) + ILFree(pidlSelection); + + if (pItem) + *pItem = item.hItem; + + return bResult; +} + +static BOOL BrsFolder_OnSetSelectionW(browse_info *info, LPVOID selection, BOOL is_str) { + HTREEITEM hItem; + BOOL bResult; + + bResult = BrsFolder_OnSetExpanded(info, selection, is_str, &hItem); + if (bResult) + SendMessageW(info->hwndTreeView, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hItem ); + return bResult; +} + +static BOOL BrsFolder_OnSetSelectionA(browse_info *info, LPVOID selection, BOOL is_str) { + LPWSTR selectionW = NULL; + BOOL result = FALSE; + int length; + + if (!is_str) + return BrsFolder_OnSetSelectionW(info, selection, is_str); + + if ((length = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, NULL, 0)) && + (selectionW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR))) && + MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, selectionW, length)) + { + result = BrsFolder_OnSetSelectionW(info, selectionW, is_str); + } + + HeapFree(GetProcessHeap(), 0, selectionW); + return result; +} + +/************************************************************************* + * BrsFolderDlgProc32 (not an exported API function) + */ +static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam, + LPARAM lParam ) +{ + browse_info *info; + + TRACE("hwnd=%p msg=%04x 0x%08lx 0x%08lx\n", hWnd, msg, wParam, lParam ); + + if (msg == WM_INITDIALOG) + return BrsFolder_OnCreate( hWnd, (browse_info*) lParam ); + + info = (browse_info*) GetPropW( hWnd, szBrowseFolderInfo ); + + switch (msg) + { + case WM_NOTIFY: + return BrsFolder_OnNotify( info, (UINT)wParam, (LPNMHDR)lParam); + + case WM_COMMAND: + return BrsFolder_OnCommand( info, wParam ); + + case BFFM_SETSTATUSTEXTA: + TRACE("Set status %s\n", debugstr_a((LPSTR)lParam)); + SetWindowTextA(GetDlgItem(hWnd, IDD_STATUS), (LPSTR)lParam); + break; + + case BFFM_SETSTATUSTEXTW: + TRACE("Set status %s\n", debugstr_w((LPWSTR)lParam)); + SetWindowTextW(GetDlgItem(hWnd, IDD_STATUS), (LPWSTR)lParam); + break; + + case BFFM_ENABLEOK: + TRACE("Enable %ld\n", lParam); + EnableWindow(GetDlgItem(hWnd, 1), (lParam)?TRUE:FALSE); + break; + + case BFFM_SETOKTEXT: /* unicode only */ + TRACE("Set OK text %s\n", debugstr_w((LPWSTR)wParam)); + SetWindowTextW(GetDlgItem(hWnd, 1), (LPWSTR)wParam); + break; + + case BFFM_SETSELECTIONA: + return BrsFolder_OnSetSelectionA(info, (LPVOID)lParam, (BOOL)wParam); + + case BFFM_SETSELECTIONW: + return BrsFolder_OnSetSelectionW(info, (LPVOID)lParam, (BOOL)wParam); + + case BFFM_SETEXPANDED: /* unicode only */ + return BrsFolder_OnSetExpanded(info, (LPVOID)lParam, (BOOL)wParam, NULL); + } + return FALSE; +} + +static const WCHAR swBrowseTemplateName[] = { + 'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0}; +static const WCHAR swNewBrowseTemplateName[] = { + 'S','H','N','E','W','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0}; + +/************************************************************************* + * SHBrowseForFolderA [SHELL32.@] + * SHBrowseForFolder [SHELL32.@] + */ +LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi) +{ + BROWSEINFOW bi; + LPITEMIDLIST lpid; + INT len; + LPWSTR title; + + TRACE("%p\n", lpbi); + + bi.hwndOwner = lpbi->hwndOwner; + bi.pidlRoot = lpbi->pidlRoot; + if (lpbi->pszDisplayName) + { + bi.pszDisplayName = (WCHAR *)HeapAlloc( GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, lpbi->pszDisplayName, -1, bi.pszDisplayName, MAX_PATH ); + } + else + bi.pszDisplayName = NULL; + + if (lpbi->lpszTitle) + { + len = MultiByteToWideChar( CP_ACP, 0, lpbi->lpszTitle, -1, NULL, 0 ); + title = (WCHAR *)HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, lpbi->lpszTitle, -1, title, len ); + } + else + title = NULL; + + bi.lpszTitle = title; + bi.ulFlags = lpbi->ulFlags; + bi.lpfn = lpbi->lpfn; + bi.lParam = lpbi->lParam; + bi.iImage = lpbi->iImage; + lpid = SHBrowseForFolderW( &bi ); + if (bi.pszDisplayName) + { + WideCharToMultiByte( CP_ACP, 0, bi.pszDisplayName, -1, + lpbi->pszDisplayName, MAX_PATH, 0, NULL); + HeapFree( GetProcessHeap(), 0, bi.pszDisplayName ); + } + HeapFree(GetProcessHeap(), 0, title); + lpbi->iImage = bi.iImage; + return lpid; +} + + +/************************************************************************* + * SHBrowseForFolderW [SHELL32.@] + * + * NOTES + * crashes when passed a null pointer + */ +LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi) +{ + browse_info info; + DWORD r; + HRESULT hr; + const WCHAR * templateName; + + info.hWnd = 0; + info.pidlRet = NULL; + info.lpBrowseInfo = lpbi; + info.hwndTreeView = NULL; + + hr = OleInitialize(NULL); + + if (lpbi->ulFlags & BIF_NEWDIALOGSTYLE) + templateName = swNewBrowseTemplateName; + else + templateName = swBrowseTemplateName; + r = DialogBoxParamW( shell32_hInstance, templateName, lpbi->hwndOwner, + BrsFolderDlgProc, (LPARAM)&info ); + if (SUCCEEDED(hr)) + OleUninitialize(); + if (!r) + return NULL; + + return info.pidlRet; +} diff --git a/dll/win32/shell32_new/changenotify.cpp b/dll/win32/shell32_new/changenotify.cpp new file mode 100644 index 00000000000..5328daec2a5 --- /dev/null +++ b/dll/win32/shell32_new/changenotify.cpp @@ -0,0 +1,476 @@ +/* + * shell change notification + * + * Copyright 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +namespace +{ + extern CRITICAL_SECTION SHELL32_ChangenotifyCS; + CRITICAL_SECTION_DEBUG critsect_debug = + { + 0, 0, &SHELL32_ChangenotifyCS, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_ChangenotifyCS") } + }; + CRITICAL_SECTION SHELL32_ChangenotifyCS = { &critsect_debug, -1, 0, 0, 0, 0 }; +} + +typedef SHChangeNotifyEntry *LPNOTIFYREGISTER; + +/* internal list of notification clients (internal) */ +typedef struct _NOTIFICATIONLIST +{ + struct _NOTIFICATIONLIST *next; + struct _NOTIFICATIONLIST *prev; + HWND hwnd; /* window to notify */ + DWORD uMsg; /* message to send */ + LPNOTIFYREGISTER apidl; /* array of entries to watch*/ + UINT cidl; /* number of pidls in array */ + LONG wEventMask; /* subscribed events */ + LONG wSignalledEvent; /* event that occurred */ + DWORD dwFlags; /* client flags */ + LPCITEMIDLIST pidlSignaled; /*pidl of the path that caused the signal*/ + +} NOTIFICATIONLIST, *LPNOTIFICATIONLIST; + +static NOTIFICATIONLIST *head, *tail; + +#define SHCNE_NOITEMEVENTS ( \ + SHCNE_ASSOCCHANGED ) + +#define SHCNE_ONEITEMEVENTS ( \ + SHCNE_ATTRIBUTES | SHCNE_CREATE | SHCNE_DELETE | SHCNE_DRIVEADD | \ + SHCNE_DRIVEADDGUI | SHCNE_DRIVEREMOVED | SHCNE_FREESPACE | \ + SHCNE_MEDIAINSERTED | SHCNE_MEDIAREMOVED | SHCNE_MKDIR | \ + SHCNE_NETSHARE | SHCNE_NETUNSHARE | SHCNE_RMDIR | \ + SHCNE_SERVERDISCONNECT | SHCNE_UPDATEDIR | SHCNE_UPDATEIMAGE ) + +#define SHCNE_TWOITEMEVENTS ( \ + SHCNE_RENAMEFOLDER | SHCNE_RENAMEITEM | SHCNE_UPDATEITEM ) + +/* for dumping events */ +static const char * DumpEvent( LONG event ) +{ + if( event == SHCNE_ALLEVENTS ) + return "SHCNE_ALLEVENTS"; +#define DUMPEV(x) ,( event & SHCNE_##x )? #x " " : "" + return wine_dbg_sprintf( "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" + DUMPEV(RENAMEITEM) + DUMPEV(CREATE) + DUMPEV(DELETE) + DUMPEV(MKDIR) + DUMPEV(RMDIR) + DUMPEV(MEDIAINSERTED) + DUMPEV(MEDIAREMOVED) + DUMPEV(DRIVEREMOVED) + DUMPEV(DRIVEADD) + DUMPEV(NETSHARE) + DUMPEV(NETUNSHARE) + DUMPEV(ATTRIBUTES) + DUMPEV(UPDATEDIR) + DUMPEV(UPDATEITEM) + DUMPEV(SERVERDISCONNECT) + DUMPEV(UPDATEIMAGE) + DUMPEV(DRIVEADDGUI) + DUMPEV(RENAMEFOLDER) + DUMPEV(FREESPACE) + DUMPEV(EXTENDED_EVENT) + DUMPEV(ASSOCCHANGED) + DUMPEV(INTERRUPT) + ); +#undef DUMPEV +} + +static const char * NodeName(const NOTIFICATIONLIST *item) +{ + const char *str; + WCHAR path[MAX_PATH]; + + if(SHGetPathFromIDListW(item->apidl[0].pidl, path )) + str = wine_dbg_sprintf("%s", debugstr_w(path)); + else + str = wine_dbg_sprintf("" ); + return str; +} + +static void AddNode(LPNOTIFICATIONLIST item) +{ + TRACE("item %p\n", item ); + + /* link items */ + item->prev = tail; + item->next = NULL; + if( tail ) + tail->next = item; + else + head = item; + tail = item; +} + +static LPNOTIFICATIONLIST FindNode( HANDLE hitem ) +{ + LPNOTIFICATIONLIST ptr; + for( ptr = head; ptr; ptr = ptr->next ) + if( ptr == (LPNOTIFICATIONLIST) hitem ) + return ptr; + return NULL; +} + +static void DeleteNode(LPNOTIFICATIONLIST item) +{ + UINT i; + + TRACE("item=%p prev=%p next=%p\n", item, item->prev, item->next); + + /* remove item from list */ + if( item->prev ) + item->prev->next = item->next; + else + head = item->next; + if( item->next ) + item->next->prev = item->prev; + else + tail = item->prev; + + /* free the item */ + for (i=0; icidl; i++) + SHFree((LPITEMIDLIST)item->apidl[i].pidl); + SHFree(item->apidl); + SHFree(item); +} + +void InitChangeNotifications(void) +{ +} + +void FreeChangeNotifications(void) +{ + TRACE("\n"); + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + while( head ) + DeleteNode( head ); + + LeaveCriticalSection(&SHELL32_ChangenotifyCS); + + // DeleteCriticalSection(&SHELL32_ChangenotifyCS); // static +} + +/************************************************************************* + * SHChangeNotifyRegister [SHELL32.2] + * + */ +ULONG WINAPI +SHChangeNotifyRegister( + HWND hwnd, + int fSources, + LONG wEventMask, + UINT uMsg, + int cItems, + SHChangeNotifyEntry *lpItems) +{ + LPNOTIFICATIONLIST item; + int i; + + item = (NOTIFICATIONLIST *)SHAlloc(sizeof(NOTIFICATIONLIST)); + + TRACE("(%p,0x%08x,0x%08x,0x%08x,%d,%p) item=%p\n", + hwnd, fSources, wEventMask, uMsg, cItems, lpItems, item); + + item->next = NULL; + item->prev = NULL; + item->cidl = cItems; + item->apidl = (SHChangeNotifyEntry *)SHAlloc(sizeof(SHChangeNotifyEntry) * cItems); + for(i=0;iapidl[i].pidl = ILClone(lpItems[i].pidl); + item->apidl[i].fRecursive = lpItems[i].fRecursive; + } + item->hwnd = hwnd; + item->uMsg = uMsg; + item->wEventMask = wEventMask; + item->wSignalledEvent = 0; + item->dwFlags = fSources; + + TRACE("new node: %s\n", NodeName( item )); + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + AddNode(item); + + LeaveCriticalSection(&SHELL32_ChangenotifyCS); + + return (ULONG)item; +} + +/************************************************************************* + * SHChangeNotifyDeregister [SHELL32.4] + */ +BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify) +{ + LPNOTIFICATIONLIST node; + + TRACE("(0x%08x)\n", hNotify); + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + node = FindNode((HANDLE)hNotify); + if( node ) + DeleteNode(node); + + LeaveCriticalSection(&SHELL32_ChangenotifyCS); + + return node?TRUE:FALSE; +} + +/************************************************************************* + * SHChangeNotifyUpdateEntryList [SHELL32.5] + */ +EXTERN_C BOOL WINAPI SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2, + DWORD unknown3, DWORD unknown4) +{ + FIXME("(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n", + unknown1, unknown2, unknown3, unknown4); + + return -1; +} + +static BOOL should_notify( LPCITEMIDLIST changed, LPCITEMIDLIST watched, BOOL sub ) +{ + TRACE("%p %p %d\n", changed, watched, sub ); + if ( !watched ) + return FALSE; + if (ILIsEqual( watched, changed ) ) + return TRUE; + if( sub && ILIsParent( watched, changed, TRUE ) ) + return TRUE; + return FALSE; +} + +/************************************************************************* + * SHChangeNotify [SHELL32.@] + */ +void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2) +{ + LPCITEMIDLIST Pidls[2]; + LPNOTIFICATIONLIST ptr; + UINT typeFlag = uFlags & SHCNF_TYPE; + + Pidls[0] = NULL; + Pidls[1] = NULL; + + TRACE("(0x%08x,0x%08x,%p,%p):stub.\n", wEventId, uFlags, dwItem1, dwItem2); + + if( ( wEventId & SHCNE_NOITEMEVENTS ) && ( dwItem1 || dwItem2 ) ) + { + TRACE("dwItem1 and dwItem2 are not zero, but should be\n"); + dwItem1 = 0; + dwItem2 = 0; + return; + } + else if( ( wEventId & SHCNE_ONEITEMEVENTS ) && dwItem2 ) + { + TRACE("dwItem2 is not zero, but should be\n"); + dwItem2 = 0; + return; + } + + if( ( ( wEventId & SHCNE_NOITEMEVENTS ) && + ( wEventId & ~SHCNE_NOITEMEVENTS ) ) || + ( ( wEventId & SHCNE_ONEITEMEVENTS ) && + ( wEventId & ~SHCNE_ONEITEMEVENTS ) ) || + ( ( wEventId & SHCNE_TWOITEMEVENTS ) && + ( wEventId & ~SHCNE_TWOITEMEVENTS ) ) ) + { + WARN("mutually incompatible events listed\n"); + return; + } + + /* convert paths in IDLists*/ + switch (typeFlag) + { + case SHCNF_PATHA: + if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1); //FIXME + if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2); //FIXME + break; + case SHCNF_PATHW: + if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1); + if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW((LPCWSTR)dwItem2); + break; + case SHCNF_IDLIST: + Pidls[0] = (LPCITEMIDLIST)dwItem1; + Pidls[1] = (LPCITEMIDLIST)dwItem2; + break; + case SHCNF_PRINTERA: + case SHCNF_PRINTERW: + FIXME("SHChangeNotify with (uFlags & SHCNF_PRINTER)\n"); + return; + case SHCNF_DWORD: + default: + FIXME("unknown type %08x\n",typeFlag); + return; + } + + { + WCHAR path[MAX_PATH]; + + if( Pidls[0] && SHGetPathFromIDListW(Pidls[0], path )) + TRACE("notify %08x on item1 = %s\n", wEventId, debugstr_w(path)); + + if( Pidls[1] && SHGetPathFromIDListW(Pidls[1], path )) + TRACE("notify %08x on item2 = %s\n", wEventId, debugstr_w(path)); + } + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + /* loop through the list */ + for( ptr = head; ptr; ptr = ptr->next ) + { + BOOL notify; + DWORD i; + + notify = FALSE; + + TRACE("trying %p\n", ptr); + + for( i=0; (icidl) && !notify ; i++ ) + { + LPCITEMIDLIST pidl = ptr->apidl[i].pidl; + BOOL subtree = ptr->apidl[i].fRecursive; + + if (wEventId & ptr->wEventMask) + { + if( !pidl ) /* all ? */ + notify = TRUE; + else if( wEventId & SHCNE_NOITEMEVENTS ) + notify = TRUE; + else if( wEventId & ( SHCNE_ONEITEMEVENTS | SHCNE_TWOITEMEVENTS ) ) + notify = should_notify( Pidls[0], pidl, subtree ); + else if( wEventId & SHCNE_TWOITEMEVENTS ) + notify = should_notify( Pidls[1], pidl, subtree ); + } + } + + if( !notify ) + continue; + + ptr->pidlSignaled = ILClone(Pidls[0]); + + TRACE("notifying %s, event %s(%x) before\n", NodeName( ptr ), DumpEvent( + wEventId ),wEventId ); + + ptr->wSignalledEvent |= wEventId; + + if (ptr->dwFlags & SHCNRF_NewDelivery) + SendMessageW(ptr->hwnd, ptr->uMsg, (WPARAM) ptr, (LPARAM) GetCurrentProcessId()); + else + SendMessageW(ptr->hwnd, ptr->uMsg, (WPARAM)Pidls, wEventId); + + TRACE("notifying %s, event %s(%x) after\n", NodeName( ptr ), DumpEvent( + wEventId ),wEventId ); + + } + TRACE("notify Done\n"); + LeaveCriticalSection(&SHELL32_ChangenotifyCS); + + /* if we allocated it, free it. The ANSI flag is also set in its Unicode sibling. */ + if ((typeFlag & SHCNF_PATHA) || (typeFlag & SHCNF_PRINTERA)) + { + SHFree((LPITEMIDLIST)Pidls[0]); + SHFree((LPITEMIDLIST)Pidls[1]); + } +} + +/************************************************************************* + * NTSHChangeNotifyRegister [SHELL32.640] + * NOTES + * Idlist is an array of structures and Count specifies how many items in the array. + * count should always be one when calling SHChangeNotifyRegister, or + * SHChangeNotifyDeregister will not work properly. + */ +EXTERN_C ULONG WINAPI NTSHChangeNotifyRegister( + HWND hwnd, + int fSources, + LONG fEvents, + UINT msg, + int count, + SHChangeNotifyEntry *idlist) +{ + return SHChangeNotifyRegister(hwnd, fSources | SHCNRF_NewDelivery, + fEvents, msg, count, idlist); +} + +/************************************************************************* + * SHChangeNotification_Lock [SHELL32.644] + */ +HANDLE WINAPI SHChangeNotification_Lock( + HANDLE hChange, + DWORD dwProcessId, + LPITEMIDLIST **lppidls, + LPLONG lpwEventId) +{ + DWORD i; + LPNOTIFICATIONLIST node; + LPCITEMIDLIST *idlist; + + TRACE("%p %08x %p %p\n", hChange, dwProcessId, lppidls, lpwEventId); + + /* EnterCriticalSection(&SHELL32_ChangenotifyCS); */ + + node = FindNode( hChange ); + if( node ) + { + idlist = (LPCITEMIDLIST *)SHAlloc( sizeof(LPCITEMIDLIST *) * node->cidl ); + for(i=0; icidl; i++) + idlist[i] = (LPCITEMIDLIST)node->pidlSignaled; + *lpwEventId = node->wSignalledEvent; + *lppidls = (LPITEMIDLIST*)idlist; + node->wSignalledEvent = 0; + } + else + ERR("Couldn't find %p\n", hChange ); + + /* LeaveCriticalSection(&SHELL32_ChangenotifyCS); */ + + return (HANDLE) node; +} + +/************************************************************************* + * SHChangeNotification_Unlock [SHELL32.645] + */ +BOOL WINAPI SHChangeNotification_Unlock ( HANDLE hLock) +{ + TRACE("\n"); + return 1; +} + +/************************************************************************* + * NTSHChangeNotifyDeregister [SHELL32.641] + */ +EXTERN_C DWORD WINAPI NTSHChangeNotifyDeregister(ULONG x1) +{ + FIXME("(0x%08x):semi stub.\n",x1); + + return SHChangeNotifyDeregister( x1 ); +} diff --git a/dll/win32/shell32_new/classes.cpp b/dll/win32/shell32_new/classes.cpp new file mode 100644 index 00000000000..f07d9af5a99 --- /dev/null +++ b/dll/win32/shell32_new/classes.cpp @@ -0,0 +1,506 @@ +/* + * file type mapping + * (HKEY_CLASSES_ROOT - Stuff) + * + * Copyright 1998, 1999, 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define MAX_EXTENSION_LENGTH 20 + +BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot) +{ + HKEY hkey; + WCHAR szTemp[MAX_EXTENSION_LENGTH + 2]; + + TRACE("%s %p\n", debugstr_w(szExtension), debugstr_w(szFileType)); + + /* added because we do not want to have double dots */ + if (szExtension[0] == '.') + bPrependDot = 0; + + if (bPrependDot) + szTemp[0] = '.'; + + lstrcpynW(szTemp + (bPrependDot?1:0), szExtension, MAX_EXTENSION_LENGTH); + + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szTemp, 0, KEY_READ, &hkey)) + { + return FALSE; + } + + if (RegQueryValueW(hkey, NULL, szFileType, &len)) + { + RegCloseKey(hkey); + return FALSE; + } + + RegCloseKey(hkey); + + TRACE("--UE;\n} %s\n", debugstr_w(szFileType)); + + return TRUE; +} + +BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot) +{ + HKEY hkey; + char szTemp[MAX_EXTENSION_LENGTH + 2]; + + TRACE("%s %p\n", szExtension, szFileType); + + /* added because we do not want to have double dots */ + if (szExtension[0] == '.') + bPrependDot = 0; + + if (bPrependDot) + szTemp[0] = '.'; + + lstrcpynA(szTemp + (bPrependDot?1:0), szExtension, MAX_EXTENSION_LENGTH); + + if (RegOpenKeyExA(HKEY_CLASSES_ROOT, szTemp, 0, KEY_READ, &hkey)) + { + return FALSE; + } + + if (RegLoadMUIStringA(hkey, "FriendlyTypeName", szFileType, len, NULL, 0, NULL) == ERROR_SUCCESS) + { + RegCloseKey(hkey); + return TRUE; + } + + if (RegQueryValueA(hkey, NULL, szFileType, &len)) + { + RegCloseKey(hkey); + return FALSE; + } + + RegCloseKey(hkey); + + TRACE("--UE;\n} %s\n", szFileType); + + return TRUE; +} + +static const WCHAR swShell[] = {'s','h','e','l','l','\\',0}; +static const WCHAR swOpen[] = {'o','p','e','n',0}; +static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0}; + +BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ) +{ + WCHAR sTemp[MAX_PATH]; + LONG size; + HKEY hkey; + + TRACE("%p %s %p\n", hkeyClass, debugstr_w(szVerb), szDest); + + if (szVerb) + { + lstrcpynW(szDest, szVerb, len); + return TRUE; + } + + size=len; + *szDest='\0'; + if (!RegQueryValueW(hkeyClass, L"shell", szDest, &size) && *szDest) + { + /* The MSDN says to first try the default verb */ + wcscpy(sTemp, swShell); + wcscat(sTemp, szDest); + wcscat(sTemp, swCommand); + if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) + { + RegCloseKey(hkey); + TRACE("default verb=%s\n", debugstr_w(szDest)); + return TRUE; + } + } + + /* then fallback to 'open' */ + wcscpy(sTemp, swShell); + wcscat(sTemp, swOpen); + wcscat(sTemp, swCommand); + if (!RegOpenKeyExW(hkeyClass, sTemp, 0, KEY_READ, &hkey)) + { + RegCloseKey(hkey); + lstrcpynW(szDest, swOpen, len); + TRACE("default verb=open\n"); + return TRUE; + } + + /* and then just use the first verb on Windows >= 2000 */ + if (!RegOpenKeyExW(hkeyClass, L"shell", 0, KEY_READ, &hkey)) + { + if (!RegEnumKeyW(hkey, 0, szDest, len) && *szDest) + { + TRACE("default verb=first verb=%s\n", debugstr_w(szDest)); + RegCloseKey(hkey); + return TRUE; + } + RegCloseKey(hkey); + } + + + TRACE("no default verb!\n"); + return FALSE; +} + +BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ) +{ + WCHAR sTempVerb[MAX_PATH]; + BOOL ret; + + TRACE("%p %s %s %p\n", hkeyClass, debugstr_w(szClass), debugstr_w(szVerb), szDest); + + if (szClass) + RegOpenKeyExW(HKEY_CLASSES_ROOT, szClass, 0, KEY_READ, &hkeyClass); + if (!hkeyClass) + return FALSE; + ret = FALSE; + + if (HCR_GetDefaultVerbW(hkeyClass, szVerb, sTempVerb, sizeof(sTempVerb))) + { + WCHAR sTemp[MAX_PATH]; + wcscpy(sTemp, swShell); + wcscat(sTemp, sTempVerb); + wcscat(sTemp, swCommand); + ret = (ERROR_SUCCESS == SHGetValueW(hkeyClass, sTemp, NULL, NULL, szDest, &len)); + } + if (szClass) + RegCloseKey(hkeyClass); + + TRACE("-- %s\n", debugstr_w(szDest) ); + return ret; +} + +/*************************************************************************************** +* HCR_GetDefaultIcon [internal] +* +* Gets the icon for a filetype +*/ +static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey) +{ + WCHAR xriid[50]; + swprintf( xriid, L"CLSID\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + riid.Data1, riid.Data2, riid.Data3, + riid.Data4[0], riid.Data4[1], riid.Data4[2], riid.Data4[3], + riid.Data4[4], riid.Data4[5], riid.Data4[6], riid.Data4[7] ); + + TRACE("%S\n",xriid ); + + return !RegOpenKeyExW(HKEY_CLASSES_ROOT, xriid, 0, KEY_READ, hkey); +} + +static BOOL HCR_RegGetDefaultIconW(HKEY hkey, LPWSTR szDest, DWORD len, int* picon_idx) +{ + DWORD dwType; + WCHAR sTemp[MAX_PATH]; + WCHAR sNum[7]; + + if (!RegQueryValueExW(hkey, NULL, 0, &dwType, (LPBYTE)szDest, &len)) + { + if (dwType == REG_EXPAND_SZ) + { + ExpandEnvironmentStringsW(szDest, sTemp, MAX_PATH); + lstrcpynW(szDest, sTemp, len); + } + if (ParseFieldW (szDest, 2, sNum, _countof(sNum))) + *picon_idx = atoiW(sNum); + else + *picon_idx=0; /* sometimes the icon number is missing */ + ParseFieldW (szDest, 1, szDest, len); + PathUnquoteSpacesW(szDest); + return TRUE; + } + return FALSE; +} + +static BOOL HCR_RegGetDefaultIconA(HKEY hkey, LPSTR szDest, DWORD len, int* picon_idx) +{ + DWORD dwType; + char sTemp[MAX_PATH]; + char sNum[5]; + + if (!RegQueryValueExA(hkey, NULL, 0, &dwType, (LPBYTE)szDest, &len)) + { + if (dwType == REG_EXPAND_SZ) + { + ExpandEnvironmentStringsA(szDest, sTemp, MAX_PATH); + lstrcpynA(szDest, sTemp, len); + } + if (ParseFieldA (szDest, 2, sNum, 5)) + *picon_idx=atoi(sNum); + else + *picon_idx=0; /* sometimes the icon number is missing */ + ParseFieldA (szDest, 1, szDest, len); + PathUnquoteSpacesA(szDest); + return TRUE; + } + return FALSE; +} + +BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, int* picon_idx) +{ + static const WCHAR swDefaultIcon[] = {'\\','D','e','f','a','u','l','t','I','c','o','n',0}; + HKEY hkey; + WCHAR sTemp[MAX_PATH]; + BOOL ret = FALSE; + + TRACE("%s\n",debugstr_w(szClass) ); + + lstrcpynW(sTemp, szClass, MAX_PATH); + wcscat(sTemp, swDefaultIcon); + + if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, sTemp, 0, KEY_READ, &hkey)) + { + ret = HCR_RegGetDefaultIconW(hkey, szDest, len, picon_idx); + RegCloseKey(hkey); + } + + if(ret) + TRACE("-- %s %i\n", debugstr_w(szDest), *picon_idx); + else + TRACE("-- not found\n"); + + return ret; +} + +BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, int* picon_idx) +{ + HKEY hkey; + char sTemp[MAX_PATH]; + BOOL ret = FALSE; + + TRACE("%s\n",szClass ); + + sprintf(sTemp, "%s\\DefaultIcon",szClass); + + if (!RegOpenKeyExA(HKEY_CLASSES_ROOT, sTemp, 0, KEY_READ, &hkey)) + { + ret = HCR_RegGetDefaultIconA(hkey, szDest, len, picon_idx); + RegCloseKey(hkey); + } + TRACE("-- %s %i\n", szDest, *picon_idx); + return ret; +} + +BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, int* picon_idx) +{ + HKEY hkey; + BOOL ret = FALSE; + + if (HCR_RegOpenClassIDKey(riid, &hkey)) + { + ret = HCR_RegGetDefaultIconW(hkey, szDest, len, picon_idx); + RegCloseKey(hkey); + } + TRACE("-- %s %i\n", debugstr_w(szDest), *picon_idx); + return ret; +} + +/*************************************************************************************** +* HCR_GetClassName [internal] +* +* Gets the name of a registered class +*/ +static const WCHAR swEmpty[] = {0}; + +BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len) +{ + HKEY hkey; + BOOL ret = FALSE; + DWORD buflen = len; + WCHAR szName[100]; + LPOLESTR pStr; + + szDest[0] = 0; + + if (StringFromCLSID(riid, &pStr) == S_OK) + { + DWORD dwLen = buflen * sizeof(WCHAR); + swprintf(szName, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\%s", pStr); + if (RegGetValueW(HKEY_CURRENT_USER, szName, NULL, RRF_RT_REG_SZ, NULL, (PVOID)szDest, &dwLen) == ERROR_SUCCESS) + { + ret = TRUE; + } + CoTaskMemFree(pStr); + } + if (!ret && HCR_RegOpenClassIDKey(riid, &hkey)) + { + static const WCHAR wszLocalizedString[] = + { 'L','o','c','a','l','i','z','e','d','S','t','r','i','n','g', 0 }; + if (!RegLoadMUIStringW(hkey, wszLocalizedString, szDest, len, NULL, 0, NULL) || + !RegQueryValueExW(hkey, swEmpty, 0, NULL, (LPBYTE)szDest, &len)) + { + ret = TRUE; + } + RegCloseKey(hkey); + } + + if (!ret || !szDest[0]) + { + if(IsEqualIID(riid, CLSID_ShellDesktop)) + { + if (LoadStringW(shell32_hInstance, IDS_DESKTOP, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, CLSID_MyComputer)) + { + if(LoadStringW(shell32_hInstance, IDS_MYCOMPUTER, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, CLSID_MyDocuments)) + { + if(LoadStringW(shell32_hInstance, IDS_PERSONAL, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, CLSID_RecycleBin)) + { + if(LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_FOLDER_NAME, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, CLSID_ControlPanel)) + { + if(LoadStringW(shell32_hInstance, IDS_CONTROLPANEL, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, CLSID_AdminFolderShortcut)) + { + if(LoadStringW(shell32_hInstance, IDS_ADMINISTRATIVETOOLS, szDest, buflen)) + ret = TRUE; + } + + } + TRACE("-- %s\n", debugstr_w(szDest)); + return ret; +} + +BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len) +{ HKEY hkey; + BOOL ret = FALSE; + DWORD buflen = len; + + szDest[0] = 0; + if (HCR_RegOpenClassIDKey(riid, &hkey)) + { + if (!RegLoadMUIStringA(hkey,"LocalizedString",szDest,len,NULL,0,NULL) || + !RegQueryValueExA(hkey,"",0,NULL,(LPBYTE)szDest,&len)) + { + ret = TRUE; + } + RegCloseKey(hkey); + } + + if (!ret || !szDest[0]) + { + if(IsEqualIID(riid, CLSID_ShellDesktop)) + { + if (LoadStringA(shell32_hInstance, IDS_DESKTOP, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, CLSID_MyComputer)) + { + if(LoadStringA(shell32_hInstance, IDS_MYCOMPUTER, szDest, buflen)) + ret = TRUE; + } + } + + TRACE("-- %s\n", szDest); + + return ret; +} + +/****************************************************************************** + * HCR_GetFolderAttributes [Internal] + * + * Query the registry for a shell folders' attributes + * + * PARAMS + * pidlFolder [I] A simple pidl of type PT_GUID. + * pdwAttributes [IO] In: Attributes to be queried, OUT: Resulting attributes. + * + * RETURNS + * TRUE: Found information for the attributes in the registry + * FALSE: No attribute information found + * + * NOTES + * If queried for an attribute, which is set in the CallForAttributes registry + * value, the function binds to the shellfolder objects and queries it. + */ +BOOL HCR_GetFolderAttributes(LPCITEMIDLIST pidlFolder, LPDWORD pdwAttributes) +{ + HKEY hSFKey; + LPOLESTR pwszCLSID; + LONG lResult; + DWORD dwTemp, dwLen; + static const WCHAR wszAttributes[] = { 'A','t','t','r','i','b','u','t','e','s',0 }; + static const WCHAR wszCallForAttributes[] = { + 'C','a','l','l','F','o','r','A','t','t','r','i','b','u','t','e','s',0 }; + WCHAR wszShellFolderKey[] = { 'C','L','S','I','D','\\','{','0','0','0','2','1','4','0','0','-', + '0','0','0','0','-','0','0','0','0','-','C','0','0','0','-','0','0','0','0','0','0','0', + '0','0','0','4','6','}','\\','S','h','e','l','l','F','o','l','d','e','r',0 }; + + TRACE("(pidlFolder=%p, pdwAttributes=%p)\n", pidlFolder, pdwAttributes); + + if (!_ILIsPidlSimple(pidlFolder)) { + ERR("should be called for simple PIDL's only!\n"); + return FALSE; + } + + if (!_ILIsDesktop(pidlFolder)) { + if (FAILED(StringFromCLSID(*_ILGetGUIDPointer(pidlFolder), &pwszCLSID))) return FALSE; + memcpy(&wszShellFolderKey[6], pwszCLSID, 38 * sizeof(WCHAR)); + CoTaskMemFree(pwszCLSID); + } + + lResult = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszShellFolderKey, 0, KEY_READ, &hSFKey); + if (lResult != ERROR_SUCCESS) return FALSE; + + dwLen = sizeof(DWORD); + lResult = RegQueryValueExW(hSFKey, wszCallForAttributes, 0, NULL, (LPBYTE)&dwTemp, &dwLen); + if ((lResult == ERROR_SUCCESS) && (dwTemp & *pdwAttributes)) { + CComPtr psfDesktop; + CComPtr psfFolder; + HRESULT hr; + + RegCloseKey(hSFKey); + hr = SHGetDesktopFolder(&psfDesktop); + if (SUCCEEDED(hr)) { + hr = psfDesktop->BindToObject(pidlFolder, NULL, IID_IShellFolder, + (LPVOID*)&psfFolder); + if (SUCCEEDED(hr)) { + hr = psfFolder->GetAttributesOf(0, NULL, pdwAttributes); + } + } + if (FAILED(hr)) return FALSE; + } else { + lResult = RegQueryValueExW(hSFKey, wszAttributes, 0, NULL, (LPBYTE)&dwTemp, &dwLen); + RegCloseKey(hSFKey); + if (lResult == ERROR_SUCCESS) { + *pdwAttributes &= dwTemp; + } else { + return FALSE; + } + } + + TRACE("-- *pdwAttributes == 0x%08x\n", *pdwAttributes); + + return TRUE; +} diff --git a/dll/win32/shell32_new/clipboard.cpp b/dll/win32/shell32_new/clipboard.cpp new file mode 100644 index 00000000000..b9b2846c29e --- /dev/null +++ b/dll/win32/shell32_new/clipboard.cpp @@ -0,0 +1,236 @@ +/* + * clipboard helper functions + * + * Copyright 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES: + * + * For copy & paste functions within contextmenus does the shell use + * the OLE clipboard functions in combination with dataobjects. + * The OLE32.DLL gets loaded with LoadLibrary + * + * - a right mousebutton-copy sets the following formats: + * classic: + * Shell IDList Array + * Preferred Drop Effect + * Shell Object Offsets + * HDROP + * FileName + * ole: + * OlePrivateData (ClipboardDataObjectInterface) + * + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************************************************************** + * RenderHDROP + * + * creates a CF_HDROP structure + */ +HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + UINT i; + int rootlen = 0,size = 0; + WCHAR wszRootPath[MAX_PATH]; + WCHAR wszFileName[MAX_PATH]; + HGLOBAL hGlobal; + DROPFILES *pDropFiles; + int offset; + + TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); + + /* get the size needed */ + size = sizeof(DROPFILES); + + SHGetPathFromIDListW(pidlRoot, wszRootPath); + PathAddBackslashW(wszRootPath); + rootlen = wcslen(wszRootPath); + + for (i=0; ipFiles = offset * sizeof(WCHAR); + pDropFiles->fWide = TRUE; + + wcscpy(wszFileName, wszRootPath); + + for (i=0; icidl = cidl; + + /* root pidl */ + offset = sizeof(CIDA) + sizeof (UINT)*(cidl); + pcida->aoffset[0] = offset; /* first element */ + sizePidl = ILGetSize (pidlRoot); + memcpy(((LPBYTE)pcida)+offset, pidlRoot, sizePidl); + offset += sizePidl; + + for(i=0; iaoffset[i+1] = offset; + sizePidl = ILGetSize(apidl[i]); + memcpy(((LPBYTE)pcida)+offset, apidl[i], sizePidl); + offset += sizePidl; + } + + GlobalUnlock(hGlobal); + return hGlobal; +} + +HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + FIXME("\n"); + return 0; +} + +HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + FIXME("\n"); + return 0; +} + +HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + FIXME("\n"); + return 0; +} + +HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + int size = 0; + char szTemp[MAX_PATH], *szFileName; + LPITEMIDLIST pidl; + HGLOBAL hGlobal; + BOOL bSuccess; + + TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); + + /* get path of combined pidl */ + pidl = ILCombine(pidlRoot, apidl[0]); + if (!pidl) + return 0; + + bSuccess = SHGetPathFromIDListA(pidl, szTemp); + SHFree(pidl); + if (!bSuccess) + return 0; + + size = strlen(szTemp) + 1; + + /* fill the structure */ + hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size); + if(!hGlobal) return hGlobal; + szFileName = (char *)GlobalLock(hGlobal); + memcpy(szFileName, szTemp, size); + GlobalUnlock(hGlobal); + + return hGlobal; +} + +HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + int size = 0; + WCHAR szTemp[MAX_PATH], *szFileName; + LPITEMIDLIST pidl; + HGLOBAL hGlobal; + BOOL bSuccess; + + TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); + + /* get path of combined pidl */ + pidl = ILCombine(pidlRoot, apidl[0]); + if (!pidl) + return 0; + + bSuccess = SHGetPathFromIDListW(pidl, szTemp); + SHFree(pidl); + if (!bSuccess) + return 0; + + size = (wcslen(szTemp)+1) * sizeof(WCHAR); + + /* fill the structure */ + hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size); + if(!hGlobal) return hGlobal; + szFileName = (WCHAR *)GlobalLock(hGlobal); + memcpy(szFileName, szTemp, size); + GlobalUnlock(hGlobal); + + return hGlobal; +} + +HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags) +{ + DWORD * pdwFlag; + HGLOBAL hGlobal; + + TRACE("(0x%08x)\n", dwFlags); + + hGlobal = GlobalAlloc(GHND|GMEM_SHARE, sizeof(DWORD)); + if(!hGlobal) return hGlobal; + pdwFlag = (DWORD*)GlobalLock(hGlobal); + *pdwFlag = dwFlags; + GlobalUnlock(hGlobal); + return hGlobal; +} diff --git a/dll/win32/shell32_new/control.cpp b/dll/win32/shell32_new/control.cpp new file mode 100644 index 00000000000..9b4b74a868b --- /dev/null +++ b/dll/win32/shell32_new/control.cpp @@ -0,0 +1,524 @@ +/* Control Panel management + * + * Copyright 2001 Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shlctrl); + +CPlApplet* Control_UnloadApplet(CPlApplet* applet) +{ + unsigned i; + CPlApplet* next; + + for (i = 0; i < applet->count; i++) { + if (!applet->info[i].dwSize) continue; + applet->proc(applet->hWnd, CPL_STOP, i, applet->info[i].lData); + } + if (applet->proc) applet->proc(applet->hWnd, CPL_EXIT, 0L, 0L); + FreeLibrary(applet->hModule); + next = applet->next; + HeapFree(GetProcessHeap(), 0, applet); + return next; +} + +CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel) +{ + CPlApplet* applet; + unsigned i; + CPLINFO info; + NEWCPLINFOW newinfo; + + if (!(applet = (CPlApplet *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet)))) + return applet; + + applet->hWnd = hWnd; + + if (!(applet->hModule = LoadLibraryW(cmd))) { + WARN("Cannot load control panel applet %s\n", debugstr_w(cmd)); + goto theError; + } + if (!(applet->proc = (APPLET_PROC)GetProcAddress(applet->hModule, "CPlApplet"))) { + WARN("Not a valid control panel applet %s\n", debugstr_w(cmd)); + goto theError; + } + if (!applet->proc(hWnd, CPL_INIT, 0L, 0L)) { + WARN("Init of applet has failed\n"); + goto theError; + } + if ((applet->count = applet->proc(hWnd, CPL_GETCOUNT, 0L, 0L)) == 0) { + WARN("No subprogram in applet\n"); + goto theError; + } + + applet = (CPlApplet *)HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, applet, + sizeof(*applet) + (applet->count - 1) * sizeof(NEWCPLINFOW)); + + for (i = 0; i < applet->count; i++) { + ZeroMemory(&newinfo, sizeof(newinfo)); + newinfo.dwSize = sizeof(NEWCPLINFOW); + applet->info[i].dwSize = sizeof(NEWCPLINFOW); + /* proc is supposed to return a null value upon success for + * CPL_INQUIRE and CPL_NEWINQUIRE + * However, real drivers don't seem to behave like this + * So, use introspection rather than return value + */ + applet->proc(hWnd, CPL_NEWINQUIRE, i, (LPARAM)&newinfo); + if (newinfo.hIcon == 0) { + applet->proc(hWnd, CPL_INQUIRE, i, (LPARAM)&info); + if (info.idIcon == 0 || info.idName == 0) { + WARN("Couldn't get info from sp %u\n", i); + applet->info[i].dwSize = 0; + } else { + /* convert the old data into the new structure */ + applet->info[i].dwFlags = 0; + applet->info[i].dwHelpContext = 0; + applet->info[i].lData = info.lData; + applet->info[i].hIcon = LoadIconW(applet->hModule, + MAKEINTRESOURCEW(info.idIcon)); + LoadStringW(applet->hModule, info.idName, + applet->info[i].szName, sizeof(applet->info[i].szName) / sizeof(WCHAR)); + LoadStringW(applet->hModule, info.idInfo, + applet->info[i].szInfo, sizeof(applet->info[i].szInfo) / sizeof(WCHAR)); + applet->info[i].szHelpFile[0] = '\0'; + } + } + else + { + CopyMemory(&applet->info[i], &newinfo, newinfo.dwSize); + if (newinfo.dwSize != sizeof(NEWCPLINFOW)) + { + applet->info[i].dwSize = sizeof(NEWCPLINFOW); + lstrcpyW(applet->info[i].szName, newinfo.szName); + lstrcpyW(applet->info[i].szInfo, newinfo.szInfo); + lstrcpyW(applet->info[i].szHelpFile, newinfo.szHelpFile); + } + } + } + + applet->next = panel->first; + panel->first = applet; + + return applet; + + theError: + Control_UnloadApplet(applet); + return NULL; +} + +static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW* cs) +{ + CPanel* panel = (CPanel*)cs->lpCreateParams; + + SetWindowLongPtrW(hWnd, 0, (LONG_PTR)panel); + panel->status = 0; + panel->hWnd = hWnd; +} + +#define XICON 32 +#define XSTEP 128 +#define YICON 32 +#define YSTEP 64 + +static BOOL Control_Localize(const CPanel* panel, int cx, int cy, + CPlApplet** papplet, unsigned* psp) +{ + unsigned int i; + int x = (XSTEP-XICON)/2, y = 0; + CPlApplet* applet; + RECT rc; + + GetClientRect(panel->hWnd, &rc); + for (applet = panel->first; applet; applet = applet->next) { + for (i = 0; i < applet->count; i++) { + if (!applet->info[i].dwSize) continue; + if (x + XSTEP >= rc.right - rc.left) { + x = (XSTEP-XICON)/2; + y += YSTEP; + } + if (cx >= x && cx < x + XICON && cy >= y && cy < y + YSTEP) { + *papplet = applet; + *psp = i; + return TRUE; + } + x += XSTEP; + } + } + return FALSE; +} + +static LRESULT Control_WndProc_Paint(const CPanel* panel, WPARAM wParam) +{ + HDC hdc; + PAINTSTRUCT ps; + RECT rc, txtRect; + unsigned int i; + int x = 0, y = 0; + CPlApplet* applet; + HGDIOBJ hOldFont; + + hdc = (wParam) ? (HDC)wParam : BeginPaint(panel->hWnd, &ps); + hOldFont = SelectObject(hdc, GetStockObject(ANSI_VAR_FONT)); + GetClientRect(panel->hWnd, &rc); + for (applet = panel->first; applet; applet = applet->next) { + for (i = 0; i < applet->count; i++) { + if (x + XSTEP >= rc.right - rc.left) { + x = 0; + y += YSTEP; + } + if (!applet->info[i].dwSize) continue; + DrawIcon(hdc, x + (XSTEP-XICON)/2, y, applet->info[i].hIcon); + txtRect.left = x; + txtRect.right = x + XSTEP; + txtRect.top = y + YICON; + txtRect.bottom = y + YSTEP; + DrawTextW(hdc, applet->info[i].szName, -1, &txtRect, + DT_CENTER | DT_VCENTER); + x += XSTEP; + } + } + SelectObject(hdc, hOldFont); + if (!wParam) EndPaint(panel->hWnd, &ps); + return 0; +} + +static LRESULT Control_WndProc_LButton(CPanel* panel, LPARAM lParam, BOOL up) +{ + unsigned i; + CPlApplet* applet; + + if (Control_Localize(panel, (short)LOWORD(lParam), (short)HIWORD(lParam), &applet, &i)) { + if (up) { + if (panel->clkApplet == applet && panel->clkSP == i) { + applet->proc(applet->hWnd, CPL_DBLCLK, i, applet->info[i].lData); + } + } else { + panel->clkApplet = applet; + panel->clkSP = i; + } + } + return 0; +} + +static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg, + WPARAM lParam1, LPARAM lParam2) +{ + CPanel* panel = (CPanel*)GetWindowLongPtrW(hWnd, 0); + + if (panel || wMsg == WM_CREATE) { + switch (wMsg) { + case WM_CREATE: + Control_WndProc_Create(hWnd, (CREATESTRUCTW*)lParam2); + return 0; + case WM_DESTROY: + { + CPlApplet* applet = panel->first; + while (applet) + applet = Control_UnloadApplet(applet); + } + PostQuitMessage(0); + break; + case WM_PAINT: + return Control_WndProc_Paint(panel, lParam1); + case WM_LBUTTONUP: + return Control_WndProc_LButton(panel, lParam2, TRUE); + case WM_LBUTTONDOWN: + return Control_WndProc_LButton(panel, lParam2, FALSE); +/* EPP case WM_COMMAND: */ +/* EPP return Control_WndProc_Command(mwi, lParam1, lParam2); */ + } + } + + return DefWindowProcW(hWnd, wMsg, lParam1, lParam2); +} + +static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst) +{ + WNDCLASSW wc; + MSG msg; + const WCHAR* appName = L"ReactOS Control Panel"; + wc.style = CS_HREDRAW|CS_VREDRAW; + wc.lpfnWndProc = Control_WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = sizeof(CPlApplet*); + wc.hInstance = hInst; + wc.hIcon = 0; + wc.hCursor = 0; + wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); + wc.lpszMenuName = NULL; + wc.lpszClassName = L"Shell_Control_WndClass"; + + if (!RegisterClassW(&wc)) return; + + CreateWindowExW(0, wc.lpszClassName, appName, + WS_OVERLAPPEDWINDOW | WS_VISIBLE, + CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, CW_USEDEFAULT, + hWnd, NULL, hInst, panel); + if (!panel->hWnd) return; + + if (!panel->first) { + /* FIXME appName & message should be localized */ + MessageBoxW(panel->hWnd, L"Cannot load any applets", appName, MB_OK); + return; + } + + while (GetMessageW(&msg, panel->hWnd, 0, 0)) { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } +} + +static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst) +{ + HANDLE h; + WIN32_FIND_DATAW fd; + WCHAR buffer[MAX_PATH]; + static const WCHAR wszAllCpl[] = {'*','.','c','p','l',0}; + WCHAR *p; + + GetSystemDirectoryW( buffer, MAX_PATH ); + p = buffer + wcslen(buffer); + *p++ = '\\'; + wcscpy(p, wszAllCpl); + + if ((h = FindFirstFileW(buffer, &fd)) != INVALID_HANDLE_VALUE) { + do { + wcscpy(p, fd.cFileName); + Control_LoadApplet(hWnd, buffer, panel); + } while (FindNextFileW(h, &fd)); + FindClose(h); + } + + Control_DoInterface(panel, hWnd, hInst); +} + +static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) + /* forms to parse: + * foo.cpl,@sp,str + * foo.cpl,@sp + * foo.cpl,,str + * foo.cpl @sp + * foo.cpl str + * "a path\foo.cpl" + */ +{ + LPWSTR buffer; + LPWSTR beg = NULL; + LPWSTR end; + WCHAR ch; + LPCWSTR ptr, ptr2; + WCHAR szName[MAX_PATH]; + unsigned sp = 0; + LPWSTR extraPmts = NULL; + int quoted = 0; + BOOL spSet = FALSE; + HANDLE hMutex; + UINT Length; + + ptr = wcsrchr(wszCmd, L'\\'); + ptr2 = wcsrchr(wszCmd, L','); + if (!ptr2) + { + ptr2 = wszCmd + wcslen(wszCmd) + 1; + } + + if (ptr) + ptr++; + else + ptr = wszCmd; + + Length = (ptr2 - ptr); + if (Length >= MAX_PATH) + return; + + memcpy(szName, (LPVOID)ptr, Length * sizeof(WCHAR)); + szName[Length] = L'\0'; + hMutex = CreateMutexW(NULL, TRUE, szName); + + if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS)) + return; + buffer = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(wszCmd) + 1) * sizeof(*wszCmd)); + if (!buffer) + { + CloseHandle(hMutex); + return; + } + end = wcscpy(buffer, wszCmd); + for (;;) { + ch = *end; + if (ch == '"') quoted = !quoted; + if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) { + *end = '\0'; + if (beg) { + if (*beg == '@') { + sp = atoiW(beg + 1); + spSet = TRUE; + } else if (*beg == '\0') { + sp = 0; + spSet = TRUE; + } else { + extraPmts = beg; + } + } + if (ch == '\0') break; + beg = end + 1; + if (ch == ' ') while (end[1] == ' ') end++; + } + end++; + } + while ((ptr = StrChrW(buffer, '"'))) + memmove((LPVOID)ptr, ptr+1, wcslen(ptr)*sizeof(WCHAR)); + + while ((ptr = StrChrW(extraPmts, '"'))) + memmove((LPVOID)ptr, ptr+1, wcslen(ptr)*sizeof(WCHAR)); + + TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer), debugstr_w(extraPmts), sp); + + Control_LoadApplet(hWnd, buffer, panel); + + if (panel->first) { + CPlApplet* applet = panel->first; + + assert(applet && applet->next == NULL); + if (sp >= applet->count) { + WARN("Out of bounds (%u >= %u), setting to 0\n", sp, applet->count); + sp = 0; + } + + if ((extraPmts) && extraPmts[0] &&(!spSet)) + { + while ((lstrcmpiW(extraPmts, applet->info[sp].szName)) && (sp < applet->count)) + sp++; + + if (sp >= applet->count) + { + ReleaseMutex(hMutex); + CloseHandle(hMutex); + Control_UnloadApplet(applet); + HeapFree(GetProcessHeap(), 0, buffer); + return; + } + } + if (applet->info[sp].dwSize) { + if (!applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData)) + applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp, (LPARAM)extraPmts); + } + Control_UnloadApplet(applet); + } + ReleaseMutex(hMutex); + CloseHandle(hMutex); + HeapFree(GetProcessHeap(), 0, buffer); +} + +/************************************************************************* + * Control_RunDLLW [SHELL32.@] + * + */ +EXTERN_C void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow) +{ + CPanel panel; + + TRACE("(%p, %p, %s, 0x%08x)\n", + hWnd, hInst, debugstr_w(cmd), nCmdShow); + + memset(&panel, 0, sizeof(panel)); + + if (!cmd || !*cmd) { + Control_DoWindow(&panel, hWnd, hInst); + } else { + Control_DoLaunch(&panel, hWnd, cmd); + } +} + +/************************************************************************* + * Control_RunDLLA [SHELL32.@] + * + */ +EXTERN_C void WINAPI Control_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) +{ + DWORD len = MultiByteToWideChar(CP_ACP, 0, cmd, -1, NULL, 0 ); + LPWSTR wszCmd = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (wszCmd && MultiByteToWideChar(CP_ACP, 0, cmd, -1, wszCmd, len )) + { + Control_RunDLLW(hWnd, hInst, wszCmd, nCmdShow); + } + HeapFree(GetProcessHeap(), 0, wszCmd); +} + +/************************************************************************* + * Control_FillCache_RunDLLW [SHELL32.@] + * + */ +EXTERN_C HRESULT WINAPI Control_FillCache_RunDLLW(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) +{ + FIXME("%p %p 0x%08x 0x%08x stub\n", hWnd, hModule, w, x); + return 0; +} + +/************************************************************************* + * Control_FillCache_RunDLLA [SHELL32.@] + * + */ +EXTERN_C HRESULT WINAPI Control_FillCache_RunDLLA(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) +{ + return Control_FillCache_RunDLLW(hWnd, hModule, w, x); +} + + +/************************************************************************* + * RunDLL_CallEntry16 [SHELL32.122] + * the name is probably wrong + */ +EXTERN_C void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, + LPCSTR cmdline, INT cmdshow ) +{ +#if !defined(__CYGWIN__) && !defined (__MINGW32__) && !defined(_MSC_VER) + WORD args[5]; + SEGPTR cmdline_seg; + + TRACE( "proc %x hwnd %p inst %p cmdline %s cmdshow %d\n", + proc, hwnd, inst, debugstr_a(cmdline), cmdshow ); + + cmdline_seg = MapLS( cmdline ); + args[4] = HWND_16(hwnd); + args[3] = MapHModuleLS(inst); + args[2] = SELECTOROF(cmdline_seg); + args[1] = OFFSETOF(cmdline_seg); + args[0] = cmdshow; + WOWCallback16Ex( proc, WCB16_PASCAL, sizeof(args), args, NULL ); + UnMapLS( cmdline_seg ); +#else + FIXME( "proc %lx hwnd %p inst %p cmdline %s cmdshow %d\n", + proc, hwnd, inst, debugstr_a(cmdline), cmdshow ); +#endif +} + +/************************************************************************* + * CallCPLEntry16 [SHELL32.166] + * + * called by desk.cpl on "Advanced" with: + * hMod("DeskCp16.Dll"), pFunc("CplApplet"), 0, 1, 0xc, 0 + * + */ +LRESULT WINAPI CallCPLEntry16(HINSTANCE hMod, FARPROC pFunc, HWND dw3, UINT dw4, LPARAM dw5, LPARAM dw6) +{ + FIXME("(%p, %p, %08x, %08x, %08x, %08x): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6); + return 0x0deadbee; +} diff --git a/dll/win32/shell32_new/cpanel.h b/dll/win32/shell32_new/cpanel.h new file mode 100644 index 00000000000..05923f1bdbe --- /dev/null +++ b/dll/win32/shell32_new/cpanel.h @@ -0,0 +1,47 @@ +/* Control Panel management + * + * Copyright 2001 Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_SHELL_CPANEL_H +#define __WINE_SHELL_CPANEL_H + +#include "cpl.h" + +typedef struct CPlApplet { + struct CPlApplet* next; /* linked list */ + HWND hWnd; + unsigned count; /* number of subprograms */ + HMODULE hModule; /* module of loaded applet */ + APPLET_PROC proc; /* entry point address */ + NEWCPLINFOW info[1]; /* array of count information. + * dwSize field is 0 if entry is invalid */ +} CPlApplet; + +typedef struct CPanel { + CPlApplet* first; /* linked list */ + HWND hWnd; + unsigned status; + CPlApplet* clkApplet; + unsigned clkSP; +} CPanel; + + +CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel); +CPlApplet* Control_UnloadApplet(CPlApplet* applet); + +#endif /* __WINE_SHELL_CPANEL_H */ diff --git a/dll/win32/shell32_new/dataobject.cpp b/dll/win32/shell32_new/dataobject.cpp new file mode 100644 index 00000000000..2cb86034ae5 --- /dev/null +++ b/dll/win32/shell32_new/dataobject.cpp @@ -0,0 +1,395 @@ +/* + * IEnumFORMATETC, IDataObject + * + * selecting and droping objects within the shell and/or common dialogs + * + * Copyright 1998, 1999 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/*********************************************************************** +* IEnumFORMATETC implementation +*/ + +class IEnumFORMATETCImpl : + public CComObjectRootEx, + public IEnumFORMATETC +{ +private: + UINT posFmt; + UINT countFmt; + LPFORMATETC pFmt; +public: + IEnumFORMATETCImpl(); + ~IEnumFORMATETCImpl(); + HRESULT WINAPI Initialize(UINT cfmt, const FORMATETC afmt[]); + + // ***************** + virtual HRESULT WINAPI Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed); + virtual HRESULT WINAPI Skip(ULONG celt); + virtual HRESULT WINAPI Reset(); + virtual HRESULT WINAPI Clone(LPENUMFORMATETC* ppenum); + +BEGIN_COM_MAP(IEnumFORMATETCImpl) + COM_INTERFACE_ENTRY_IID(IID_IEnumFORMATETC, IEnumFORMATETC) +END_COM_MAP() +}; + +IEnumFORMATETCImpl::IEnumFORMATETCImpl() +{ + posFmt = 0; + countFmt = 0; + pFmt = NULL; +} + +IEnumFORMATETCImpl::~IEnumFORMATETCImpl() +{ +} + +HRESULT WINAPI IEnumFORMATETCImpl::Initialize(UINT cfmt, const FORMATETC afmt[]) +{ + DWORD size; + + size = cfmt * sizeof(FORMATETC); + countFmt = cfmt; + pFmt = (LPFORMATETC)SHAlloc(size); + if (pFmt == NULL) + return E_OUTOFMEMORY; + + memcpy(pFmt, afmt, size); + return S_OK; +} + +HRESULT WINAPI IEnumFORMATETCImpl::Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed) +{ + UINT i; + + TRACE("(%p)->(%u,%p)\n", this, celt, rgelt); + + if(!pFmt)return S_FALSE; + if(!rgelt) return E_INVALIDARG; + if (pceltFethed) *pceltFethed = 0; + + for(i = 0; posFmt < countFmt && celt > i; i++) + { + *rgelt++ = pFmt[posFmt++]; + } + + if (pceltFethed) *pceltFethed = i; + + return ((i == celt) ? S_OK : S_FALSE); +} + +HRESULT WINAPI IEnumFORMATETCImpl::Skip(ULONG celt) +{ + TRACE("(%p)->(num=%u)\n", this, celt); + + if (posFmt + celt >= countFmt) return S_FALSE; + posFmt += celt; + return S_OK; +} + +HRESULT WINAPI IEnumFORMATETCImpl::Reset() +{ + TRACE("(%p)->()\n", this); + + posFmt = 0; + return S_OK; +} + +HRESULT WINAPI IEnumFORMATETCImpl::Clone(LPENUMFORMATETC* ppenum) +{ + HRESULT hResult; + + TRACE("(%p)->(ppenum=%p)\n", this, ppenum); + + if (!ppenum) return E_INVALIDARG; + hResult = IEnumFORMATETC_Constructor(countFmt, pFmt, ppenum); + if (FAILED (hResult)) + return hResult; + return (*ppenum)->Skip(posFmt); +} + +HRESULT IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[], IEnumFORMATETC **enumerator) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + if (enumerator == NULL) + return E_POINTER; + *enumerator = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumFORMATETC, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (cfmt, afmt); + if (FAILED (hResult)) + return hResult; + *enumerator = result.Detach (); + TRACE("(%p)->(%u,%p)\n", *enumerator, cfmt, afmt); + return S_OK; +} + + +/*********************************************************************** +* IDataObject implementation +*/ + +/* number of supported formats */ +#define MAX_FORMATS 4 + +class IDataObjectImpl : + public CComObjectRootEx, + public IDataObject +{ +private: + LPITEMIDLIST pidl; + LPITEMIDLIST * apidl; + UINT cidl; + + FORMATETC pFormatEtc[MAX_FORMATS]; + UINT cfShellIDList; + UINT cfFileNameA; + UINT cfFileNameW; +public: + IDataObjectImpl(); + ~IDataObjectImpl(); + HRESULT WINAPI Initialize(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidlx, UINT cidlx); + + /////////// + virtual HRESULT WINAPI GetData(LPFORMATETC pformatetcIn, STGMEDIUM *pmedium); + virtual HRESULT WINAPI GetDataHere(LPFORMATETC pformatetc, STGMEDIUM *pmedium); + virtual HRESULT WINAPI QueryGetData(LPFORMATETC pformatetc); + virtual HRESULT WINAPI GetCanonicalFormatEtc(LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut); + virtual HRESULT WINAPI SetData(LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease); + virtual HRESULT WINAPI EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc); + virtual HRESULT WINAPI DAdvise(FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection); + virtual HRESULT WINAPI DUnadvise(DWORD dwConnection); + virtual HRESULT WINAPI EnumDAdvise(IEnumSTATDATA **ppenumAdvise); + +BEGIN_COM_MAP(IDataObjectImpl) + COM_INTERFACE_ENTRY_IID(IID_IDataObject, IDataObject) +END_COM_MAP() +}; + +IDataObjectImpl::IDataObjectImpl() +{ + pidl = NULL; + apidl = NULL; + cidl = 0; + cfShellIDList = 0; + cfFileNameA = 0; + cfFileNameW = 0; +} + +IDataObjectImpl::~IDataObjectImpl() +{ + TRACE(" destroying IDataObject(%p)\n",this); + _ILFreeaPidl(apidl, cidl); + ILFree(pidl); +} + +HRESULT WINAPI IDataObjectImpl::Initialize(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidlx, UINT cidlx) +{ + pidl = ILClone(pMyPidl); + apidl = _ILCopyaPidl(apidlx, cidlx); + if (pidl == NULL || apidl == NULL) + return E_OUTOFMEMORY; + cidl = cidlx; + + cfShellIDList = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); + cfFileNameA = RegisterClipboardFormatA(CFSTR_FILENAMEA); + cfFileNameW = RegisterClipboardFormatW(CFSTR_FILENAMEW); + InitFormatEtc(pFormatEtc[0], cfShellIDList, TYMED_HGLOBAL); + InitFormatEtc(pFormatEtc[1], CF_HDROP, TYMED_HGLOBAL); + InitFormatEtc(pFormatEtc[2], cfFileNameA, TYMED_HGLOBAL); + InitFormatEtc(pFormatEtc[3], cfFileNameW, TYMED_HGLOBAL); + return S_OK; +} + +/************************************************************************** +* IDataObject_fnGetData +*/ +HRESULT WINAPI IDataObjectImpl::GetData(LPFORMATETC pformatetcIn, STGMEDIUM *pmedium) +{ + char szTemp[256]; + + szTemp[0] = 0; + GetClipboardFormatNameA (pformatetcIn->cfFormat, szTemp, 256); + TRACE("(%p)->(%p %p format=%s)\n", this, pformatetcIn, pmedium, szTemp); + + if (pformatetcIn->cfFormat == cfShellIDList) + { + if (cidl < 1) return(E_UNEXPECTED); + pmedium->hGlobal = RenderSHELLIDLIST(pidl, apidl, cidl); + } + else if (pformatetcIn->cfFormat == CF_HDROP) + { + if (cidl < 1) return(E_UNEXPECTED); + pmedium->hGlobal = RenderHDROP(pidl, apidl, cidl); + } + else if (pformatetcIn->cfFormat == cfFileNameA) + { + if (cidl < 1) return(E_UNEXPECTED); + pmedium->hGlobal = RenderFILENAMEA(pidl, apidl, cidl); + } + else if (pformatetcIn->cfFormat == cfFileNameW) + { + if (cidl < 1) return(E_UNEXPECTED); + pmedium->hGlobal = RenderFILENAMEW(pidl, apidl, cidl); + } + else + { + FIXME("-- expected clipformat not implemented\n"); + return (E_INVALIDARG); + } + if (pmedium->hGlobal) + { + pmedium->tymed = TYMED_HGLOBAL; + pmedium->pUnkForRelease = NULL; + return S_OK; + } + return E_OUTOFMEMORY; +} + +HRESULT WINAPI IDataObjectImpl::GetDataHere(LPFORMATETC pformatetc, STGMEDIUM *pmedium) +{ + FIXME("(%p)->()\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI IDataObjectImpl::QueryGetData(LPFORMATETC pformatetc) +{ + UINT i; + + TRACE("(%p)->(fmt=0x%08x tym=0x%08x)\n", this, pformatetc->cfFormat, pformatetc->tymed); + + if(!(DVASPECT_CONTENT & pformatetc->dwAspect)) + return DV_E_DVASPECT; + + /* check our formats table what we have */ + for (i=0; icfFormat) + && (pFormatEtc[i].tymed == pformatetc->tymed)) + { + return S_OK; + } + } + + return DV_E_TYMED; +} + +HRESULT WINAPI IDataObjectImpl::GetCanonicalFormatEtc(LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut) +{ + FIXME("(%p)->()\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI IDataObjectImpl::SetData(LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease) +{ + FIXME("(%p)->()\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI IDataObjectImpl::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) +{ + TRACE("(%p)->()\n", this); + *ppenumFormatEtc = NULL; + + /* only get data */ + if (DATADIR_GET == dwDirection) + { + return IEnumFORMATETC_Constructor(MAX_FORMATS, pFormatEtc, ppenumFormatEtc); + } + + return E_NOTIMPL; +} + +HRESULT WINAPI IDataObjectImpl::DAdvise(FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) +{ + FIXME("(%p)->()\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI IDataObjectImpl::DUnadvise(DWORD dwConnection) +{ + FIXME("(%p)->()\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI IDataObjectImpl::EnumDAdvise(IEnumSTATDATA **ppenumAdvise) +{ + FIXME("(%p)->()\n", this); + return E_NOTIMPL; +} + +/************************************************************************** +* IDataObject_Constructor +*/ +HRESULT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl, IDataObject **dataObject) +{ + CComObject *theDataObject; + CComPtr result; + HRESULT hResult; + + if (dataObject == NULL) + return E_POINTER; + *dataObject = NULL; + ATLTRY (theDataObject = new CComObject); + if (theDataObject == NULL) + return E_OUTOFMEMORY; + hResult = theDataObject->QueryInterface (IID_IDataObject, (void **)&result); + if (FAILED (hResult)) + { + delete theDataObject; + return hResult; + } + hResult = theDataObject->Initialize (hwndOwner, pMyPidl, apidl, cidl); + if (FAILED (hResult)) + return hResult; + *dataObject = result.Detach (); + TRACE("(%p)->(apidl=%p cidl=%u)\n", *dataObject, apidl, cidl); + return S_OK; +} + +/************************************************************************* + * SHCreateDataObject [SHELL32.@] + * + */ + +HRESULT WINAPI SHCreateDataObject(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST* apidl, IDataObject *pdtInner, REFIID riid, void **ppv) +{ + if (IsEqualIID(riid, IID_IDataObject)) + { + return CIDLData_CreateFromIDArray(pidlFolder, cidl, apidl, (IDataObject **)ppv); + } + return E_FAIL; +} diff --git a/dll/win32/shell32_new/dde.cpp b/dll/win32/shell32_new/dde.cpp new file mode 100644 index 00000000000..96139bbdb7a --- /dev/null +++ b/dll/win32/shell32_new/dde.cpp @@ -0,0 +1,170 @@ +/* + * Shell DDE Handling + * + * Copyright 2004 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/* String handles */ +static HSZ hszProgmanTopic; +static HSZ hszProgmanService; +static HSZ hszAsterisk; +static HSZ hszShell; +static HSZ hszAppProperties; +static HSZ hszFolders; +/* DDE Instance ID */ +static DWORD dwDDEInst; + + +static BOOL __inline Dde_OnConnect(HSZ hszTopic, HSZ hszService) +{ + if ((hszTopic == hszProgmanTopic) && (hszService == hszProgmanService)) + return TRUE; + if ((hszTopic == hszProgmanTopic) && (hszService == hszAppProperties)) + return TRUE; + if ((hszTopic == hszShell) && (hszService == hszFolders)) + return TRUE; + if ((hszTopic == hszShell) && (hszService == hszAppProperties)) + return TRUE; + return FALSE; +} + +static void __inline Dde_OnConnectConfirm(HCONV hconv, HSZ hszTopic, HSZ hszService) +{ + FIXME("stub\n"); +} + +static BOOL __inline Dde_OnWildConnect(HSZ hszTopic, HSZ hszService) +{ + FIXME("stub\n"); + return FALSE; +} + +static HDDEDATA __inline Dde_OnRequest(UINT uFmt, HCONV hconv, HSZ hszTopic, + HSZ hszItem) +{ + FIXME("stub\n"); + return NULL; +} + +static DWORD __inline Dde_OnExecute(HCONV hconv, HSZ hszTopic, HDDEDATA hdata) +{ + BYTE * pszCommand; + + pszCommand = DdeAccessData(hdata, NULL); + if (!pszCommand) + return DDE_FNOTPROCESSED; + + FIXME("stub: %s\n", pszCommand); + + DdeUnaccessData(hdata); + + return DDE_FNOTPROCESSED; +} + +static void __inline Dde_OnDisconnect(HCONV hconv) +{ + FIXME("stub\n"); +} + +static HDDEDATA CALLBACK DdeCallback( + UINT uType, + UINT uFmt, + HCONV hconv, + HSZ hsz1, + HSZ hsz2, + HDDEDATA hdata, + ULONG_PTR dwData1, + ULONG_PTR dwData2) +{ + switch (uType) + { + case XTYP_CONNECT: + return (HDDEDATA)(DWORD_PTR)Dde_OnConnect(hsz1, hsz2); + case XTYP_CONNECT_CONFIRM: + Dde_OnConnectConfirm(hconv, hsz1, hsz2); + return NULL; + case XTYP_WILDCONNECT: + return (HDDEDATA)(DWORD_PTR)Dde_OnWildConnect(hsz1, hsz2); + case XTYP_REQUEST: + return Dde_OnRequest(uFmt, hconv, hsz1, hsz2); + case XTYP_EXECUTE: + return (HDDEDATA)(DWORD_PTR)Dde_OnExecute(hconv, hsz1, hdata); + case XTYP_DISCONNECT: + Dde_OnDisconnect(hconv); + return NULL; + default: + return NULL; + } +} + +/************************************************************************* + * ShellDDEInit (SHELL32.@) + * + * Registers the Shell DDE services with the system so that applications + * can use them. + * + * PARAMS + * bInit [I] TRUE to initialize the services, FALSE to uninitalize. + * + * RETURNS + * Nothing. + */ +EXTERN_C void WINAPI ShellDDEInit(BOOL bInit) +{ + TRACE("bInit = %s\n", bInit ? "TRUE" : "FALSE"); + + if (bInit) + { + static const WCHAR wszProgman[] = {'P','r','o','g','m','a','n',0}; + static const WCHAR wszAsterisk[] = {'*',0}; + static const WCHAR wszShell[] = {'S','h','e','l','l',0}; + static const WCHAR wszAppProperties[] = + {'A','p','p','P','r','o','p','e','r','t','i','e','s',0}; + static const WCHAR wszFolders[] = {'F','o','l','d','e','r','s',0}; + + DdeInitializeW(&dwDDEInst, DdeCallback, CBF_FAIL_ADVISES | CBF_FAIL_POKES, 0); + + hszProgmanTopic = DdeCreateStringHandleW(dwDDEInst, wszProgman, CP_WINUNICODE); + hszProgmanService = DdeCreateStringHandleW(dwDDEInst, wszProgman, CP_WINUNICODE); + hszAsterisk = DdeCreateStringHandleW(dwDDEInst, wszAsterisk, CP_WINUNICODE); + hszShell = DdeCreateStringHandleW(dwDDEInst, wszShell, CP_WINUNICODE); + hszAppProperties = DdeCreateStringHandleW(dwDDEInst, wszAppProperties, CP_WINUNICODE); + hszFolders = DdeCreateStringHandleW(dwDDEInst, wszFolders, CP_WINUNICODE); + + DdeNameService(dwDDEInst, hszFolders, 0, DNS_REGISTER); + DdeNameService(dwDDEInst, hszProgmanService, 0, DNS_REGISTER); + DdeNameService(dwDDEInst, hszShell, 0, DNS_REGISTER); + } + else + { + /* unregister all services */ + DdeNameService(dwDDEInst, 0, 0, DNS_UNREGISTER); + + DdeFreeStringHandle(dwDDEInst, hszFolders); + DdeFreeStringHandle(dwDDEInst, hszAppProperties); + DdeFreeStringHandle(dwDDEInst, hszShell); + DdeFreeStringHandle(dwDDEInst, hszAsterisk); + DdeFreeStringHandle(dwDDEInst, hszProgmanService); + DdeFreeStringHandle(dwDDEInst, hszProgmanTopic); + + DdeUninitialize(dwDDEInst); + } +} diff --git a/dll/win32/shell32_new/debughlp.cpp b/dll/win32/shell32_new/debughlp.cpp new file mode 100644 index 00000000000..fde3b30f892 --- /dev/null +++ b/dll/win32/shell32_new/debughlp.cpp @@ -0,0 +1,425 @@ +/* + * Helper functions for debugging + * + * Copyright 1998, 2002 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(pidl); + +static +LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl) +{ + WORD len; + + if(pidl) + { + len = pidl->mkid.cb; + if (len) + { + return (LPITEMIDLIST) (((LPBYTE)pidl)+len); + } + } + return NULL; +} + +static +BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl) +{ + return ( !pidl || (pidl && pidl->mkid.cb == 0x00) ); +} + +static +LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl) +{ + if(pidl && pidl->mkid.cb != 0x00) + return (LPPIDLDATA) &(pidl->mkid.abID); + return NULL; +} + +static +LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_GUID: + case PT_SHELLEXT: + case PT_YAGUID: + return NULL; + + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + return (LPSTR)&(pdata->u.drive.szDriveName); + + case PT_FOLDER: + case PT_FOLDER1: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return (LPSTR)&(pdata->u.file.szNames); + + case PT_WORKGRP: + case PT_COMP: + case PT_NETWORK: + case PT_NETPROVIDER: + case PT_SHARE: + return (LPSTR)&(pdata->u.network.szNames); + } + } + return NULL; +} + +static +LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_GUID: + case PT_SHELLEXT: + case PT_YAGUID: + return NULL; + + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + /* return (LPSTR)&(pdata->u.drive.szDriveName);*/ + return NULL; + + case PT_FOLDER: + case PT_FOLDER1: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + /* return (LPSTR)&(pdata->u.file.szNames); */ + return NULL; + + case PT_WORKGRP: + case PT_COMP: + case PT_NETWORK: + case PT_NETPROVIDER: + case PT_SHARE: + /* return (LPSTR)&(pdata->u.network.szNames); */ + return NULL; + + case PT_VALUEW: + return (LPWSTR)&(pdata->u.file.szNames); + } + } + return NULL; +} + + +static +LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_FOLDER: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); + + case PT_WORKGRP: + return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1); + } + } + return NULL; +} + +static +LPWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_FOLDER: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + /*return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); */ + return NULL; + + case PT_WORKGRP: + /* return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1); */ + return NULL; + + case PT_VALUEW: + return (LPWSTR)(pdata->u.file.szNames + wcslen ((LPWSTR)pdata->u.file.szNames) + 1); + } + } + return NULL; +} + + +static +IID* _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_SHELLEXT: + case PT_GUID: + case PT_YAGUID: + return &(pdata->u.guid.guid); + } + } + return NULL; +} + +static +void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) +{ + LPSTR szSrc; + LPWSTR szSrcW; + GUID const * riid; + + if (!pidl) return; + + if (szOut) + *szOut = 0; + + if (_dbg_ILIsDesktop(pidl)) + { + /* desktop */ + if (szOut) lstrcpynA(szOut, "Desktop", uOutSize); + } + else if (( szSrc = _dbg_ILGetTextPointer(pidl) )) + { + /* filesystem */ + if (szOut) lstrcpynA(szOut, szSrc, uOutSize); + } + else if (( szSrcW = _dbg_ILGetTextPointerW(pidl) )) + { + CHAR tmp[MAX_PATH]; + /* unicode filesystem */ + WideCharToMultiByte(CP_ACP,0,szSrcW, -1, tmp, MAX_PATH, NULL, NULL); + if (szOut) lstrcpynA(szOut, tmp, uOutSize); + } + else if (( riid = _dbg_ILGetGUIDPointer(pidl) )) + { + if (szOut) + sprintf( szOut, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + riid->Data1, riid->Data2, riid->Data3, + riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], + riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); + } +} + + + + +void pdump (LPCITEMIDLIST pidl) +{ + LPCITEMIDLIST pidltemp = pidl; + + if (!TRACE_ON(pidl)) return; + + if (! pidltemp) + { + MESSAGE ("-------- pidl=NULL (Desktop)\n"); + } + else + { + MESSAGE ("-------- pidl=%p\n", pidl); + if (pidltemp->mkid.cb) + { + do + { + if (_ILIsUnicode(pidltemp)) + { + DWORD dwAttrib = 0; + LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp); + DWORD type = pData ? pData->type : 0; + LPWSTR szLongName = _dbg_ILGetTextPointerW(pidltemp); + LPWSTR szShortName = _dbg_ILGetSTextPointerW(pidltemp); + char szName[MAX_PATH]; + + _dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH); + if ( pData && (PT_FOLDER == type || PT_VALUE == type) ) + dwAttrib = pData->u.file.uFileAttribs; + + MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n", + pidltemp, pidltemp->mkid.cb, type, dwAttrib, + debugstr_a(szName), debugstr_w(szLongName), debugstr_w(szShortName)); + } + else + { + DWORD dwAttrib = 0; + LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp); + DWORD type = pData ? pData->type : 0; + LPSTR szLongName = _dbg_ILGetTextPointer(pidltemp); + LPSTR szShortName = _dbg_ILGetSTextPointer(pidltemp); + char szName[MAX_PATH]; + + _dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH); + if ( pData && (PT_FOLDER == type || PT_VALUE == type) ) + dwAttrib = pData->u.file.uFileAttribs; + + MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n", + pidltemp, pidltemp->mkid.cb, type, dwAttrib, + debugstr_a(szName), debugstr_a(szLongName), debugstr_a(szShortName)); + } + + pidltemp = _dbg_ILGetNext(pidltemp); + + } while (pidltemp && pidltemp->mkid.cb); + } + else + { + MESSAGE ("empty pidl (Desktop)\n"); + } + pcheck(pidl); + } +} + +static void dump_pidl_hex( LPCITEMIDLIST pidl ) +{ + const unsigned char *p = (const unsigned char *)pidl; + const int max_bytes = 0x80; +#define max_line 0x10 + char szHex[max_line*3+1], szAscii[max_line+1]; + int i, n; + + n = pidl->mkid.cb; + if( n>max_bytes ) + n = max_bytes; + for( i=0; imkid.cb ) + { + type = _dbg_ILGetDataPointer(pidltemp)->type; + switch( type ) + { + case PT_CPLAPPLET: + case PT_GUID: + case PT_SHELLEXT: + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + case PT_FOLDER: + case PT_VALUE: + case PT_VALUEW: + case PT_FOLDER1: + case PT_WORKGRP: + case PT_COMP: + case PT_NETPROVIDER: + case PT_NETWORK: + case PT_IESPECIAL1: + case PT_YAGUID: + case PT_IESPECIAL2: + case PT_SHARE: + break; + default: + ERR("unknown IDLIST %p [%p] size=%u type=%x\n", + pidl, pidltemp, pidltemp->mkid.cb,type ); + dump_pidl_hex( pidltemp ); + return FALSE; + } + pidltemp = _dbg_ILGetNext(pidltemp); + } + return TRUE; +} + +static const struct { + REFIID riid; + const char *name; +} InterfaceDesc[] = { + {IID_IUnknown, "IID_IUnknown"}, + {IID_IClassFactory, "IID_IClassFactory"}, + {IID_IShellView, "IID_IShellView"}, + {IID_IOleCommandTarget, "IID_IOleCommandTarget"}, + {IID_IDropTarget, "IID_IDropTarget"}, + {IID_IDropSource, "IID_IDropSource"}, + {IID_IViewObject, "IID_IViewObject"}, + {IID_IContextMenu, "IID_IContextMenu"}, + {IID_IShellExtInit, "IID_IShellExtInit"}, + {IID_IShellFolder, "IID_IShellFolder"}, + {IID_IShellFolder2, "IID_IShellFolder2"}, + {IID_IPersist, "IID_IPersist"}, + {IID_IPersistFolder, "IID_IPersistFolder"}, + {IID_IPersistFolder2, "IID_IPersistFolder2"}, + {IID_IPersistFolder3, "IID_IPersistFolder3"}, + {IID_IExtractIconA, "IID_IExtractIconA"}, + {IID_IExtractIconW, "IID_IExtractIconW"}, + {IID_IDataObject, "IID_IDataObject"}, + {IID_IAutoComplete, "IID_IAutoComplete"}, + {IID_IAutoComplete2, "IID_IAutoComplete2"}, + {IID_IShellLinkA, "IID_IShellLinkA"}, + {IID_IShellLinkW, "IID_IShellLinkW"}, + }; + +const char * shdebugstr_guid( const struct _GUID *id ) +{ + unsigned int i; + const char* name = NULL; + char clsidbuf[100]; + + if (!id) return "(null)"; + + for (i=0; i < sizeof(InterfaceDesc) / sizeof(InterfaceDesc[0]); i++) { + if (IsEqualIID(InterfaceDesc[i].riid, *id)) name = InterfaceDesc[i].name; + } + if (!name) { + if (HCR_GetClassNameA(*id, clsidbuf, 100)) + name = clsidbuf; + } + + return wine_dbg_sprintf( "\n\t{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x} (%s)", + id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7], name ? name : "unknown" ); +} diff --git a/dll/win32/shell32_new/debughlp.h b/dll/win32/shell32_new/debughlp.h new file mode 100644 index 00000000000..62fb5bf1a55 --- /dev/null +++ b/dll/win32/shell32_new/debughlp.h @@ -0,0 +1,35 @@ +/* + * Definitions for debugging + * + * Copyright 1998, 2002 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_SHELL32_DEBUGHLP_H +#define __WINE_SHELL32_DEBUGHLP_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "shlobj.h" + +extern void pdump (LPCITEMIDLIST pidl); +extern BOOL pcheck (LPCITEMIDLIST pidl); +extern const char * shdebugstr_guid( const struct _GUID *id ); + +#endif /* __WINE_SHELL32_DEBUGHLP_H */ diff --git a/dll/win32/shell32_new/desktop.cpp b/dll/win32/shell32_new/desktop.cpp new file mode 100644 index 00000000000..bd0e75ba591 --- /dev/null +++ b/dll/win32/shell32_new/desktop.cpp @@ -0,0 +1,566 @@ +/* + * Shell Desktop + * + * Copyright 2008 Thomas Bluemel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(desktop); + +BOOL WINAPI SetShellWindowEx(HWND, HWND); + +#define SHDESK_TAG 0x4b534544 + +static const WCHAR szProgmanClassName[] = {'P','r','o','g','m','a','n'}; +static const WCHAR szProgmanWindowName[] = { + 'P','r','o','g','r','a','m',' ','M','a','n','a','g','e','r' +}; + +class CDesktopBrowser : + public CComObjectRootEx, + public IShellBrowser, + public ICommDlgBrowser, + public IServiceProvider +{ +public: + DWORD Tag; +private: + HWND hWnd; + HWND hWndShellView; + HWND hWndDesktopListView; + CComPtr ShellDesk; + CComPtr DesktopView; + IShellBrowser *DefaultShellBrowser; + LPITEMIDLIST pidlDesktopDirectory; + LPITEMIDLIST pidlDesktop; +public: + CDesktopBrowser(); + ~CDesktopBrowser(); + HRESULT Initialize(HWND hWndx, IShellDesktopTray *ShellDeskx); + HWND FindDesktopListView (); + BOOL CreateDeskWnd(); + HWND DesktopGetWindowControl(IN UINT id); + static LRESULT CALLBACK ProgmanWindowProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam); + static BOOL MessageLoop(); + + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + + // *** IShellBrowser methods *** + virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths); + virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject); + virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared); + virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText); + virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable); + virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID); + virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags); + virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm); + virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd); + virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret); + virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(struct IShellView **ppshv); + virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(struct IShellView *ppshv); + virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags); + + // *** ICommDlgBrowser methods *** + virtual HRESULT STDMETHODCALLTYPE OnDefaultCommand (struct IShellView *ppshv); + virtual HRESULT STDMETHODCALLTYPE OnStateChange (struct IShellView *ppshv, ULONG uChange); + virtual HRESULT STDMETHODCALLTYPE IncludeObject (struct IShellView *ppshv, LPCITEMIDLIST pidl); + + // *** IServiceProvider methods *** + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + +BEGIN_COM_MAP(CDesktopBrowser) + COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) + COM_INTERFACE_ENTRY_IID(IID_IShellBrowser, IShellBrowser) + COM_INTERFACE_ENTRY_IID(IID_ICommDlgBrowser, ICommDlgBrowser) + COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) +END_COM_MAP() +}; + +CDesktopBrowser::CDesktopBrowser() +{ + Tag = SHDESK_TAG; + hWnd = NULL; + hWndShellView = NULL; + hWndDesktopListView = NULL; + DefaultShellBrowser = NULL; + pidlDesktopDirectory = NULL; + pidlDesktop = NULL; +} + +CDesktopBrowser::~CDesktopBrowser() +{ + if (DesktopView.p != NULL) + { + if (hWndShellView != NULL) + DesktopView->DestroyViewWindow(); + + hWndShellView = NULL; + hWndDesktopListView = NULL; + } + + if (pidlDesktopDirectory != NULL) + { + ILFree(pidlDesktopDirectory); + pidlDesktopDirectory = NULL; + } + + if (pidlDesktop != NULL) + { + ILFree(pidlDesktop); + pidlDesktop = NULL; + } +} + +HRESULT CDesktopBrowser::Initialize(HWND hWndx, IShellDesktopTray *ShellDeskx) +{ + CComPtr psfDesktopFolder; + CSFV csfv; + HRESULT hRet; + + hWnd = hWndx; + ShellDesk = ShellDeskx; + ShellDesk->AddRef(); + + pidlDesktopDirectory = SHCloneSpecialIDList(hWnd, CSIDL_DESKTOPDIRECTORY, FALSE); + hRet = SHGetSpecialFolderLocation(hWnd, CSIDL_DESKTOP, &pidlDesktop); + if (FAILED(hRet)) + return hRet; + + hRet = SHGetDesktopFolder(&psfDesktopFolder); + if (FAILED(hRet)) + return hRet; + + ZeroMemory(&csfv, sizeof(csfv)); + csfv.cbSize = sizeof(csfv); + csfv.pshf = psfDesktopFolder; + csfv.psvOuter = NULL; + + hRet = SHCreateShellFolderViewEx(&csfv, &DesktopView); + + return hRet; +} + +static CDesktopBrowser *SHDESK_Create(HWND hWnd, LPCREATESTRUCT lpCreateStruct) +{ + IShellDesktopTray *ShellDesk; + CComObject *pThis; + HRESULT hRet; + + ShellDesk = (IShellDesktopTray *)lpCreateStruct->lpCreateParams; + if (ShellDesk == NULL) + { + WARN("No IShellDesk interface provided!"); + return NULL; + } + + pThis = new CComObject; + if (pThis == NULL) + return NULL; + pThis->AddRef(); + + hRet = pThis->Initialize(hWnd, ShellDesk); + if (FAILED(hRet)) + { + pThis->Release(); + return NULL; + } + + return pThis; +} + +HWND CDesktopBrowser::FindDesktopListView () +{ + return FindWindowExW(hWndShellView, NULL, WC_LISTVIEW, NULL); +} + +BOOL CDesktopBrowser::CreateDeskWnd() +{ + FOLDERSETTINGS fs; + RECT rcClient; + HRESULT hRet; + + if (!GetClientRect(hWnd, &rcClient)) + { + return FALSE; + } + + fs.ViewMode = FVM_ICON; + fs.fFlags = FWF_DESKTOP | FWF_NOCLIENTEDGE | FWF_NOSCROLL | FWF_TRANSPARENT; + hRet = DesktopView->CreateViewWindow(NULL, &fs, (IShellBrowser *)this, &rcClient, &hWndShellView); + if (!SUCCEEDED(hRet)) + return FALSE; + + SetShellWindowEx(hWnd, FindDesktopListView()); + + return TRUE; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetWindow(HWND *phwnd) +{ + if (hWnd != NULL) + { + *phwnd = hWnd; + return S_OK; + } + + *phwnd = NULL; + return E_UNEXPECTED; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::ContextSensitiveHelp(BOOL fEnterMode) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::RemoveMenusSB(HMENU hmenuShared) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetStatusTextSB(LPCOLESTR lpszStatusText) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::EnableModelessSB(BOOL fEnable) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::TranslateAcceleratorSB(LPMSG lpmsg, WORD wID) +{ + return S_FALSE; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream(DWORD grfMode, IStream **ppStrm) +{ + return E_NOTIMPL; +} + +HWND CDesktopBrowser::DesktopGetWindowControl(IN UINT id) +{ + switch (id) + { + case FCW_TOOLBAR: + case FCW_STATUS: + case FCW_TREE: + case FCW_PROGRESS: + return NULL; + + default: + return NULL; + } + +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetControlWindow(UINT id, HWND *lphwnd) +{ + HWND hWnd; + + hWnd = DesktopGetWindowControl(id); + if (hWnd != NULL) + { + *lphwnd = hWnd; + return S_OK; + } + + *lphwnd = NULL; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret) +{ + HWND hWnd; + + if (pret == NULL) + return E_POINTER; + + hWnd = DesktopGetWindowControl(id); + if (hWnd != NULL) + { + *pret = SendMessageW(hWnd, + uMsg, + wParam, + lParam); + return S_OK; + } + + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::QueryActiveShellView(IShellView **ppshv) +{ + *ppshv = DesktopView; + if (DesktopView != NULL) + DesktopView->AddRef(); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::OnViewWindowActive(IShellView *ppshv) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::OnDefaultCommand(IShellView *ppshv) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::OnStateChange(IShellView *ppshv, ULONG uChange) +{ + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::IncludeObject(IShellView *ppshv, LPCITEMIDLIST pidl) +{ + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CDesktopBrowser::QueryService(REFGUID guidService, REFIID riid, PVOID *ppv) +{ + /* FIXME - handle guidService */ + return QueryInterface(riid, ppv); +} + +BOOL CDesktopBrowser::MessageLoop() +{ + MSG Msg; + BOOL bRet; + + while ((bRet = GetMessageW(&Msg, NULL, 0, 0)) != 0) + { + if (bRet != -1) + { + TranslateMessage(&Msg); + DispatchMessageW(&Msg); + } + } + + return TRUE; +} + +LRESULT CALLBACK CDesktopBrowser::ProgmanWindowProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam) +{ + CDesktopBrowser *pThis = NULL; + LRESULT Ret = FALSE; + + if (uMsg != WM_NCCREATE) + { + pThis = (CDesktopBrowser*)GetWindowLongPtrW(hwnd, + 0); + if (pThis == NULL) + goto DefMsgHandler; + } + + if (pThis != NULL || uMsg == WM_NCCREATE) + { + switch (uMsg) + { + case WM_ERASEBKGND: + PaintDesktop((HDC)wParam); + break; + + case WM_GETISHELLBROWSER: + Ret = (LRESULT)((IShellBrowser *)pThis); + break; + + case WM_SIZE: + if (wParam == SIZE_MINIMIZED) + { + /* Hey, we're the desktop!!! */ + ShowWindow(hwnd, + SW_RESTORE); + } + else + { + RECT rcDesktop; + + rcDesktop.left = GetSystemMetrics(SM_XVIRTUALSCREEN); + rcDesktop.top = GetSystemMetrics(SM_YVIRTUALSCREEN); + rcDesktop.right = GetSystemMetrics(SM_CXVIRTUALSCREEN); + rcDesktop.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN); + + /* FIXME: Update work area */ + } + break; + + case WM_SYSCOLORCHANGE: + { + InvalidateRect(pThis->hWnd, + NULL, + TRUE); + + if (pThis->hWndShellView != NULL) + { + /* Forward the message */ + SendMessageW(pThis->hWndShellView, + WM_SYSCOLORCHANGE, + wParam, + lParam); + } + break; + } + + case WM_CREATE: + { + pThis->ShellDesk->RegisterDesktopWindow(pThis->hWnd); + + if (!pThis->CreateDeskWnd()) + WARN("Could not create the desktop view control!\n"); + break; + } + + case WM_NCCREATE: + { + LPCREATESTRUCT CreateStruct = (LPCREATESTRUCT)lParam; + pThis = SHDESK_Create(hwnd, CreateStruct); + if (pThis == NULL) + { + WARN("Failed to create desktop structure\n"); + break; + } + + SetWindowLongPtrW(hwnd, + 0, + (LONG_PTR)pThis); + Ret = TRUE; + break; + } + + case WM_NCDESTROY: + { + pThis->Release(); + break; + } + + default: +DefMsgHandler: + Ret = DefWindowProcW(hwnd, uMsg, wParam, lParam); + break; + } + } + + return Ret; +} + +static BOOL +RegisterProgmanWindowClass(VOID) +{ + WNDCLASSW wcProgman; + + wcProgman.style = CS_DBLCLKS; + wcProgman.lpfnWndProc = CDesktopBrowser::ProgmanWindowProc; + wcProgman.cbClsExtra = 0; + wcProgman.cbWndExtra = sizeof(CDesktopBrowser *); + wcProgman.hInstance = shell32_hInstance; + wcProgman.hIcon = NULL; + wcProgman.hCursor = LoadCursorW(NULL, IDC_ARROW); + wcProgman.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1); + wcProgman.lpszMenuName = NULL; + wcProgman.lpszClassName = szProgmanClassName; + + return RegisterClassW(&wcProgman) != 0; +} + + +/************************************************************************* + * SHCreateDesktop [SHELL32.200] + * + */ +HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *ShellDesk) +{ + HWND hWndDesk; + RECT rcDesk; + + if (ShellDesk == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return NULL; + } + + if (RegisterProgmanWindowClass() == 0) + { + WARN("Failed to register the Progman window class!\n"); + return NULL; + } + + rcDesk.left = GetSystemMetrics(SM_XVIRTUALSCREEN); + rcDesk.top = GetSystemMetrics(SM_YVIRTUALSCREEN); + rcDesk.right = rcDesk.left + GetSystemMetrics(SM_CXVIRTUALSCREEN); + rcDesk.bottom = rcDesk.top + GetSystemMetrics(SM_CYVIRTUALSCREEN); + + if (IsRectEmpty(&rcDesk)) + { + rcDesk.left = rcDesk.top = 0; + rcDesk.right = GetSystemMetrics(SM_CXSCREEN); + rcDesk.bottom = GetSystemMetrics(SM_CYSCREEN); + } + + hWndDesk = CreateWindowExW(0, szProgmanClassName, szProgmanWindowName, + WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, + rcDesk.left, rcDesk.top, rcDesk.right, rcDesk.bottom, + NULL, NULL, shell32_hInstance, (LPVOID)ShellDesk); + if (hWndDesk != NULL) + return (HANDLE)GetWindowLongPtrW(hWndDesk, 0); + + return NULL; +} + +/************************************************************************* + * SHCreateDesktop [SHELL32.201] + * + */ +BOOL WINAPI SHDesktopMessageLoop(HANDLE hDesktop) +{ + CDesktopBrowser *Desk = (CDesktopBrowser *)hDesktop; + + if (Desk == NULL || Desk->Tag != SHDESK_TAG) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + return Desk->MessageLoop(); +} diff --git a/dll/win32/shell32_new/dialogs.cpp b/dll/win32/shell32_new/dialogs.cpp new file mode 100644 index 00000000000..b42d490288e --- /dev/null +++ b/dll/win32/shell32_new/dialogs.cpp @@ -0,0 +1,657 @@ +/* + * common shell dialogs + * + * Copyright 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + + +typedef struct + { + HWND hwndOwner ; + HICON hIcon ; + LPCSTR lpstrDirectory ; + LPCSTR lpstrTitle ; + LPCSTR lpstrDescription ; + UINT uFlags ; + } RUNFILEDLGPARAMS ; + +typedef BOOL (*LPFNOFN) (OPENFILENAMEA *) ; + +WINE_DEFAULT_DEBUG_CHANNEL(shell); +static INT_PTR CALLBACK RunDlgProc (HWND, UINT, WPARAM, LPARAM) ; +static void FillList (HWND, char *) ; + + +/************************************************************************* + * PickIconDlg [SHELL32.62] + * + */ + +typedef struct +{ + HMODULE hLibrary; + HWND hDlgCtrl; + WCHAR szName[MAX_PATH]; + INT Index; +}PICK_ICON_CONTEXT, *PPICK_ICON_CONTEXT; + +BOOL CALLBACK EnumPickIconResourceProc(HMODULE hModule, + LPCWSTR lpszType, + LPWSTR lpszName, + LONG_PTR lParam +) +{ + WCHAR szName[100]; + int index; + HICON hIcon; + PPICK_ICON_CONTEXT pIconContext = (PPICK_ICON_CONTEXT)lParam; + + if (IS_INTRESOURCE(lpszName)) + swprintf(szName, L"%u\n", lpszName); + else + wcscpy(szName, (WCHAR*)lpszName); + + + hIcon = LoadIconW(pIconContext->hLibrary, (LPCWSTR)lpszName); + if (hIcon == NULL) + return TRUE; + + index = SendMessageW(pIconContext->hDlgCtrl, LB_ADDSTRING, 0, (LPARAM)szName); + if (index != LB_ERR) + SendMessageW(pIconContext->hDlgCtrl, LB_SETITEMDATA, index, (LPARAM)hIcon); + + return TRUE; +} + +void +DestroyIconList(HWND hDlgCtrl) +{ + int count; + int index; + + count = SendMessage(hDlgCtrl, LB_GETCOUNT, 0, 0); + if (count == LB_ERR) + return; + + for(index = 0; index < count; index++) + { + HICON hIcon = (HICON)SendMessageW(hDlgCtrl, LB_GETITEMDATA, index, 0); + DestroyIcon(hIcon); + } +} + +INT_PTR CALLBACK PickIconProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + LPMEASUREITEMSTRUCT lpmis; + LPDRAWITEMSTRUCT lpdis; + HICON hIcon; + INT index; + WCHAR szText[MAX_PATH], szTitle[100], szFilter[100]; + OPENFILENAMEW ofn = {0}; + + PPICK_ICON_CONTEXT pIconContext = (PPICK_ICON_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER); + + switch(uMsg) + { + case WM_INITDIALOG: + pIconContext = (PPICK_ICON_CONTEXT)lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)pIconContext); + pIconContext->hDlgCtrl = GetDlgItem(hwndDlg, IDC_PICKICON_LIST); + EnumResourceNamesW(pIconContext->hLibrary, RT_ICON, EnumPickIconResourceProc, (LPARAM)pIconContext); + if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH)) + SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0, (LPARAM)szText); + else + SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0, (LPARAM)pIconContext->szName); + + swprintf(szText, L"%u", pIconContext->Index); + index = SendMessageW(pIconContext->hDlgCtrl, LB_FINDSTRING, -1, (LPARAM)szText); + if (index != LB_ERR) + SendMessageW(pIconContext->hDlgCtrl, LB_SETCURSEL, index, 0); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case IDOK: + index = SendMessageW(pIconContext->hDlgCtrl, LB_GETCURSEL, 0, 0); + SendMessageW(pIconContext->hDlgCtrl, LB_GETTEXT, index, (LPARAM)szText); + pIconContext->Index = _wtoi(szText); + SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_GETTEXT, MAX_PATH, (LPARAM)pIconContext->szName); + DestroyIconList(pIconContext->hDlgCtrl); + EndDialog(hwndDlg, 1); + break; + case IDCANCEL: + DestroyIconList(pIconContext->hDlgCtrl); + EndDialog(hwndDlg, 0); + break; + case IDC_PICKICON_LIST: + if (HIWORD(wParam) == LBN_SELCHANGE) + InvalidateRect((HWND)lParam, NULL, TRUE); // FIXME USE UPDATE RECT + break; + case IDC_BUTTON_PATH: + szText[0] = 0; + szTitle[0] = 0; + szFilter[0] = 0; + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hwndDlg; + ofn.lpstrFile = szText; + ofn.nMaxFile = MAX_PATH; + LoadStringW(shell32_hInstance, IDS_PICK_ICON_TITLE, szTitle, sizeof(szTitle) / sizeof(WCHAR)); + ofn.lpstrTitle = szTitle; + LoadStringW(shell32_hInstance, IDS_PICK_ICON_FILTER, szFilter, sizeof(szFilter) / sizeof(WCHAR)); + ofn.lpstrFilter = szFilter; + if (GetOpenFileNameW(&ofn)) + { + HMODULE hLibrary; + + if (!wcsicmp(pIconContext->szName, szText)) + break; + + DestroyIconList(pIconContext->hDlgCtrl); + + hLibrary = LoadLibraryExW(szText, NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE); + if (hLibrary == NULL) + break; + FreeLibrary(pIconContext->hLibrary); + pIconContext->hLibrary = hLibrary; + wcscpy(pIconContext->szName, szText); + EnumResourceNamesW(pIconContext->hLibrary, RT_ICON, EnumPickIconResourceProc, (LPARAM)pIconContext); + if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH)) + SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0, (LPARAM)szText); + else + SendDlgItemMessageW(hwndDlg, IDC_EDIT_PATH, WM_SETTEXT, 0, (LPARAM)pIconContext->szName); + + SendMessageW(pIconContext->hDlgCtrl, LB_SETCURSEL, 0, 0); + } + break; + } + break; + case WM_MEASUREITEM: + lpmis = (LPMEASUREITEMSTRUCT) lParam; + lpmis->itemHeight = 32; + lpmis->itemWidth = 64; + return TRUE; + case WM_DRAWITEM: + lpdis = (LPDRAWITEMSTRUCT) lParam; + if (lpdis->itemID == (UINT)-1) + { + break; + } + switch (lpdis->itemAction) + { + case ODA_SELECT: + case ODA_DRAWENTIRE: + index = SendMessageW(pIconContext->hDlgCtrl, LB_GETCURSEL, 0, 0); + hIcon =(HICON)SendMessage(lpdis->hwndItem, LB_GETITEMDATA, lpdis->itemID, (LPARAM) 0); + + if (lpdis->itemID == (UINT)index) + { + HBRUSH hBrush; + hBrush = CreateSolidBrush(RGB(0, 0, 255)); + FillRect(lpdis->hDC, &lpdis->rcItem, hBrush); + DeleteObject(hBrush); + } + else + { + HBRUSH hBrush; + hBrush = CreateSolidBrush(RGB(255, 255, 255)); + FillRect(lpdis->hDC, &lpdis->rcItem, hBrush); + DeleteObject(hBrush); + } + DrawIconEx(lpdis->hDC, lpdis->rcItem.left,lpdis->rcItem.top, hIcon, + 0, + 0, + 0, + NULL, + DI_NORMAL); + break; + } + break; + } + + return FALSE; +} + +BOOL WINAPI PickIconDlg( + HWND hwndOwner, + LPWSTR lpstrFile, + UINT nMaxFile, + INT* lpdwIconIndex) +{ + HMODULE hLibrary; + int res; + PICK_ICON_CONTEXT IconContext; + + hLibrary = LoadLibraryExW(lpstrFile, NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE); + IconContext.hLibrary = hLibrary; + IconContext.Index = *lpdwIconIndex; + wcscpy(IconContext.szName, lpstrFile); + + res = DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(IDD_PICK_ICON_DIALOG), hwndOwner, PickIconProc, (LPARAM)&IconContext); + if (res) + { + wcscpy(lpstrFile, IconContext.szName); + *lpdwIconIndex = IconContext.Index; + } + + FreeLibrary(hLibrary); + return res; +} + +/************************************************************************* + * RunFileDlg [SHELL32.61] + * + * NOTES + * Original name: RunFileDlg (exported by ordinal) + */ +void WINAPI RunFileDlg( + HWND hwndOwner, + HICON hIcon, + LPCSTR lpstrDirectory, + LPCSTR lpstrTitle, + LPCSTR lpstrDescription, + UINT uFlags) +{ + + RUNFILEDLGPARAMS rfdp; + HRSRC hRes; + DLGTEMPLATE *templatex; + TRACE("\n"); + + rfdp.hwndOwner = hwndOwner; + rfdp.hIcon = hIcon; + rfdp.lpstrDirectory = lpstrDirectory; + rfdp.lpstrTitle = lpstrTitle; + rfdp.lpstrDescription = lpstrDescription; + rfdp.uFlags = uFlags; + + if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_RUN_DLG", (LPSTR)RT_DIALOG))) + { + MessageBoxA (hwndOwner, "Couldn't find dialog.", "Nix", MB_OK) ; + return; + } + if(!(templatex = (DLGTEMPLATE *)LoadResource(shell32_hInstance, hRes))) + { + MessageBoxA (hwndOwner, "Couldn't load dialog.", "Nix", MB_OK) ; + return; + } + + DialogBoxIndirectParamA((HINSTANCE)GetWindowLongPtrW( hwndOwner, + GWLP_HINSTANCE ), + templatex, hwndOwner, RunDlgProc, (LPARAM)&rfdp); + +} + +/* Dialog procedure for RunFileDlg */ +static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) + { + int ic ; + char *psz, *pdir, szMsg[256]; + static RUNFILEDLGPARAMS *prfdp = NULL ; + + switch (message) + { + case WM_INITDIALOG : + prfdp = (RUNFILEDLGPARAMS *)lParam ; + + if (prfdp->lpstrTitle) + SetWindowTextA (hwnd, prfdp->lpstrTitle) ; + + SetClassLongPtrW (hwnd, GCLP_HICON, (LPARAM)prfdp->hIcon) ; + SendMessageW (GetDlgItem (hwnd, 12297), STM_SETICON, + (WPARAM)LoadIconW (NULL, (LPCWSTR)IDI_WINLOGO), 0); + FillList (GetDlgItem (hwnd, 12298), NULL) ; + SetFocus (GetDlgItem (hwnd, 12298)) ; + return TRUE ; + + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDOK : + { + HWND htxt = NULL ; + if ((ic = GetWindowTextLengthA (htxt = GetDlgItem (hwnd, 12298)))) + { + psz = (char *)HeapAlloc( GetProcessHeap(), 0, (ic + 2) ); + GetWindowTextA (htxt, psz, ic + 1) ; + pdir = (char *)HeapAlloc( GetProcessHeap(), 0, (ic + 2) ); + if (pdir) + { + char * ptr; + strcpy(pdir, psz); + ptr = strrchr(pdir + 4, '\\'); + if(ptr) + ptr[0] = '\0'; + else + pdir[3] = '\0'; + } + if (ShellExecuteA(NULL, NULL, psz, NULL, pdir, SW_SHOWNORMAL) < (HINSTANCE)33) + { + char *pszSysMsg = NULL ; + FormatMessageA ( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, GetLastError (), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&pszSysMsg, 0, NULL + ) ; + sprintf (szMsg, "Error: %s", pszSysMsg) ; + LocalFree ((HLOCAL)pszSysMsg) ; + MessageBoxA (hwnd, szMsg, NULL, MB_OK | MB_ICONEXCLAMATION) ; + + HeapFree(GetProcessHeap(), 0, psz); + HeapFree(GetProcessHeap(), 0, pdir); + SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + return TRUE ; + } + FillList (htxt, psz) ; + HeapFree(GetProcessHeap(), 0, psz); + HeapFree(GetProcessHeap(), 0, pdir); + EndDialog (hwnd, 0) ; + } + } + + case IDCANCEL : + EndDialog (hwnd, 0) ; + return TRUE ; + + case 12288 : + { + HMODULE hComdlg = NULL ; + LPFNOFN ofnProc = NULL ; + static char szFName[1024] = "", szFileTitle[256] = "", szInitDir[768] = "" ; + static OPENFILENAMEA ofn = + { + sizeof (OPENFILENAMEA), + NULL, + NULL, + "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0", + NULL, + 0, + 0, + szFName, + 1023, + szFileTitle, + 255, + (LPCSTR)szInitDir, + "Browse", + OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, + 0, + 0, + NULL, + 0, + (LPOFNHOOKPROC)NULL, + NULL + } ; + + ofn.hwndOwner = hwnd ; + + if (NULL == (hComdlg = LoadLibraryExA ("comdlg32", NULL, 0))) + { + MessageBoxA (hwnd, "Unable to display dialog box (LoadLibraryEx) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; + return TRUE ; + } + + if ((LPFNOFN)NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameA"))) + { + MessageBoxA (hwnd, "Unable to display dialog box (GetProcAddress) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; + return TRUE ; + } + + ofnProc (&ofn) ; + + SetFocus (GetDlgItem (hwnd, IDOK)) ; + SetWindowTextA (GetDlgItem (hwnd, 12298), szFName) ; + SendMessageA (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + SetFocus (GetDlgItem (hwnd, IDOK)) ; + + FreeLibrary (hComdlg) ; + + return TRUE ; + } + } + return TRUE ; + } + return FALSE ; + } + +/* This grabs the MRU list from the registry and fills the combo for the "Run" dialog above */ +static void FillList (HWND hCb, char *pszLatest) + { + HKEY hkey ; +/* char szDbgMsg[256] = "" ; */ + char *pszList = NULL, *pszCmd = NULL, cMatch = 0, cMax = 0x60, szIndex[2] = "-" ; + DWORD icList = 0, icCmd = 0 ; + UINT Nix ; + + SendMessageA (hCb, CB_RESETCONTENT, 0, 0) ; + + if (ERROR_SUCCESS != RegCreateKeyExA ( + HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU", + 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL)) + MessageBoxA (hCb, "Unable to open registry key !", "Nix", MB_OK) ; + + RegQueryValueExA (hkey, "MRUList", NULL, NULL, NULL, &icList) ; + + if (icList > 0) + { + pszList = (char *)HeapAlloc( GetProcessHeap(), 0, icList) ; + if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, (LPBYTE)pszList, &icList)) + MessageBoxA (hCb, "Unable to grab MRUList !", "Nix", MB_OK) ; + } + else + { + icList = 1 ; + pszList = (char *)HeapAlloc( GetProcessHeap(), 0, icList) ; + pszList[0] = 0 ; + } + + for (Nix = 0 ; Nix < icList - 1 ; Nix++) + { + if (pszList[Nix] > cMax) + cMax = pszList[Nix] ; + + szIndex[0] = pszList[Nix] ; + + if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, NULL, &icCmd)) + MessageBoxA (hCb, "Unable to grab size of index", "Nix", MB_OK) ; + if( pszCmd ) + pszCmd = (char *)HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ; + else + pszCmd = (char *)HeapAlloc(GetProcessHeap(), 0, icCmd) ; + if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, (LPBYTE)pszCmd, &icCmd)) + MessageBoxA (hCb, "Unable to grab index", "Nix", MB_OK) ; + + if (NULL != pszLatest) + { + if (!lstrcmpiA(pszCmd, pszLatest)) + { + /* + sprintf (szDbgMsg, "Found existing (%d).\n", Nix) ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszCmd) ; + SetWindowTextA (hCb, pszCmd) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + + cMatch = pszList[Nix] ; + memmove (&pszList[1], pszList, Nix) ; + pszList[0] = cMatch ; + continue ; + } + } + + if (26 != icList - 1 || icList - 2 != Nix || cMatch || NULL == pszLatest) + { + /* + sprintf (szDbgMsg, "Happily appending (%d).\n", Nix) ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_ADDSTRING, 0, (LPARAM)pszCmd) ; + if (!Nix) + { + SetWindowTextA (hCb, pszCmd) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + } + + } + else + { + /* + sprintf (szDbgMsg, "Doing loop thing.\n") ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszLatest) ; + SetWindowTextA (hCb, pszLatest) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + + cMatch = pszList[Nix] ; + memmove (&pszList[1], pszList, Nix) ; + pszList[0] = cMatch ; + szIndex[0] = cMatch ; + RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ; + } + } + + if (!cMatch && NULL != pszLatest) + { + /* + sprintf (szDbgMsg, "Simply inserting (increasing list).\n") ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszLatest) ; + SetWindowTextA (hCb, pszLatest) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + + cMatch = ++cMax ; + if( pszList ) + pszList = (char *)HeapReAlloc(GetProcessHeap(), 0, pszList, ++icList) ; + else + pszList = (char *)HeapAlloc(GetProcessHeap(), 0, ++icList) ; + memmove (&pszList[1], pszList, icList - 1) ; + pszList[0] = cMatch ; + szIndex[0] = cMatch ; + RegSetValueExA (hkey, szIndex, 0, REG_SZ, (LPBYTE)pszLatest, strlen (pszLatest) + 1) ; + } + + RegSetValueExA (hkey, "MRUList", 0, REG_SZ, (LPBYTE)pszList, strlen (pszList) + 1) ; + + HeapFree( GetProcessHeap(), 0, pszCmd) ; + HeapFree( GetProcessHeap(), 0, pszList) ; + } + + +/************************************************************************* + * ConfirmDialog [internal] + * + * Put up a confirm box, return TRUE if the user confirmed + */ +static BOOL ConfirmDialog(HWND hWndOwner, UINT PromptId, UINT TitleId) +{ + WCHAR Prompt[256]; + WCHAR Title[256]; + + LoadStringW(shell32_hInstance, PromptId, Prompt, sizeof(Prompt) / sizeof(WCHAR)); + LoadStringW(shell32_hInstance, TitleId, Title, sizeof(Title) / sizeof(WCHAR)); + return MessageBoxW(hWndOwner, Prompt, Title, MB_YESNO|MB_ICONQUESTION) == IDYES; +} + + +/************************************************************************* + * RestartDialogEx [SHELL32.730] + */ + +int WINAPI RestartDialogEx(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason) +{ + TRACE("(%p)\n", hWndOwner); + + /* FIXME: use lpwstrReason */ + if (ConfirmDialog(hWndOwner, IDS_RESTART_PROMPT, IDS_RESTART_TITLE)) + { + HANDLE hToken; + TOKEN_PRIVILEGES npr; + + /* enable the shutdown privilege for the current process */ + if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) + { + LookupPrivilegeValueA(0, "SeShutdownPrivilege", &npr.Privileges[0].Luid); + npr.PrivilegeCount = 1; + npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0); + CloseHandle(hToken); + } + ExitWindowsEx(EWX_REBOOT, uReason); + } + + return 0; +} + +/************************************************************************* + * LogoffWindowsDialog [SHELL32.54] + */ + +EXTERN_C int WINAPI LogoffWindowsDialog(HWND hWndOwner) +{ + if (ConfirmDialog(hWndOwner, IDS_LOGOFF_PROMPT, IDS_LOGOFF_TITLE)) + { + ExitWindowsEx(EWX_LOGOFF, 0); + } + return 0;} + +/************************************************************************* + * RestartDialog [SHELL32.59] + */ + +int WINAPI RestartDialog(HWND hWndOwner, LPCWSTR lpstrReason, DWORD uFlags) +{ + return RestartDialogEx(hWndOwner, lpstrReason, uFlags, 0); +} + + +/************************************************************************* + * ExitWindowsDialog [SHELL32.60] + * + * NOTES + * exported by ordinal + */ +void WINAPI ExitWindowsDialog (HWND hWndOwner) +{ + TRACE("(%p)\n", hWndOwner); + + if (ConfirmDialog(hWndOwner, IDS_SHUTDOWN_PROMPT, IDS_SHUTDOWN_TITLE)) + { + HANDLE hToken; + TOKEN_PRIVILEGES npr; + + /* enable shutdown privilege for current process */ + if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) + { + LookupPrivilegeValueA(0, "SeShutdownPrivilege", &npr.Privileges[0].Luid); + npr.PrivilegeCount = 1; + npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0); + CloseHandle(hToken); + } + ExitWindowsEx(EWX_SHUTDOWN, 0); + } +} diff --git a/dll/win32/shell32_new/dragdrophelper.cpp b/dll/win32/shell32_new/dragdrophelper.cpp new file mode 100644 index 00000000000..0b87d31819e --- /dev/null +++ b/dll/win32/shell32_new/dragdrophelper.cpp @@ -0,0 +1,72 @@ +/* + * file system folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "dragdrophelper.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IDropTargetHelper implementation +*/ + +IDropTargetHelperImpl::IDropTargetHelperImpl() +{ +} + +IDropTargetHelperImpl::~IDropTargetHelperImpl() +{ +} + +HRESULT WINAPI IDropTargetHelperImpl::DragEnter (HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) +{ + FIXME ("(%p)->(%p %p %p 0x%08x)\n", this, hwndTarget, pDataObject, ppt, dwEffect); + return E_NOTIMPL; +} + +HRESULT WINAPI IDropTargetHelperImpl::DragLeave() +{ + FIXME ("(%p)->()\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI IDropTargetHelperImpl::DragOver(POINT *ppt, DWORD dwEffect) +{ + FIXME ("(%p)->(%p 0x%08x)\n", this, ppt, dwEffect); + return E_NOTIMPL; +} + +HRESULT WINAPI IDropTargetHelperImpl::Drop(IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) +{ + FIXME ("(%p)->(%p %p 0x%08x)\n", this, pDataObject, ppt, dwEffect); + return E_NOTIMPL; +} + +HRESULT WINAPI IDropTargetHelperImpl::Show(BOOL fShow) +{ + FIXME ("(%p)->(%u)\n", this, fShow); + return E_NOTIMPL; +} diff --git a/dll/win32/shell32_new/dragdrophelper.h b/dll/win32/shell32_new/dragdrophelper.h new file mode 100644 index 00000000000..c850bf69d14 --- /dev/null +++ b/dll/win32/shell32_new/dragdrophelper.h @@ -0,0 +1,53 @@ +/* + * file system folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _DRAGDROPHELPER_H_ +#define _DRAGDROPHELPER_H_ + +class IDropTargetHelperImpl : + public CComCoClass, + public CComObjectRootEx, + public IDropTargetHelper +{ +private: +public: + IDropTargetHelperImpl(); + ~IDropTargetHelperImpl(); + + //////// + virtual HRESULT WINAPI DragEnter (HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect); + virtual HRESULT WINAPI DragLeave(); + virtual HRESULT WINAPI DragOver(POINT *ppt, DWORD dwEffect); + virtual HRESULT WINAPI Drop(IDataObject* pDataObject, POINT* ppt, DWORD dwEffect); + virtual HRESULT WINAPI Show(BOOL fShow); + +DECLARE_REGISTRY_RESOURCEID(IDR_DRAGDROPHELPER) +DECLARE_NOT_AGGREGATABLE(IDropTargetHelperImpl) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(IDropTargetHelperImpl) + COM_INTERFACE_ENTRY_IID(IID_IDropTargetHelper, IDropTargetHelper) +END_COM_MAP() +}; + +#endif // _DRAGDROPHELPER_H_ diff --git a/dll/win32/shell32_new/drive.cpp b/dll/win32/shell32_new/drive.cpp new file mode 100644 index 00000000000..86039e05331 --- /dev/null +++ b/dll/win32/shell32_new/drive.cpp @@ -0,0 +1,1292 @@ +/* + * Shell Library Functions + * + * Copyright 2005 Johannes Anderwald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +#define MAX_PROPERTY_SHEET_PAGE 32 + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef enum +{ + HWPD_STANDARDLIST = 0, + HWPD_LARGELIST, + HWPD_MAX = HWPD_LARGELIST +} HWPAGE_DISPLAYMODE, *PHWPAGE_DISPLAYMODE; + +typedef +BOOLEAN +(NTAPI *INITIALIZE_FMIFS)( + IN PVOID hinstDll, + IN DWORD dwReason, + IN PVOID reserved +); +typedef +BOOLEAN +(NTAPI *QUERY_AVAILABLEFSFORMAT)( + IN DWORD Index, + IN OUT PWCHAR FileSystem, + OUT UCHAR* Major, + OUT UCHAR* Minor, + OUT BOOLEAN* LastestVersion +); +typedef +BOOLEAN +(NTAPI *ENABLEVOLUMECOMPRESSION)( + IN PWCHAR DriveRoot, + IN USHORT Compression +); + +typedef +VOID +(NTAPI *FORMAT_EX)( + IN PWCHAR DriveRoot, + IN FMIFS_MEDIA_FLAG MediaFlag, + IN PWCHAR Format, + IN PWCHAR Label, + IN BOOLEAN QuickFormat, + IN ULONG ClusterSize, + IN PFMIFSCALLBACK Callback +); + +typedef +VOID +(NTAPI *CHKDSK)( + IN PWCHAR DriveRoot, + IN PWCHAR Format, + IN BOOLEAN CorrectErrors, + IN BOOLEAN Verbose, + IN BOOLEAN CheckOnlyIfDirty, + IN BOOLEAN ScanDrive, + IN PVOID Unused2, + IN PVOID Unused3, + IN PFMIFSCALLBACK Callback +); + + +typedef struct +{ + WCHAR Drive; + UINT Options; + HMODULE hLibrary; + QUERY_AVAILABLEFSFORMAT QueryAvailableFileSystemFormat; + FORMAT_EX FormatEx; + ENABLEVOLUMECOMPRESSION EnableVolumeCompression; + CHKDSK Chkdsk; + UINT Result; +}FORMAT_DRIVE_CONTEXT, *PFORMAT_DRIVE_CONTEXT; + +BOOL InitializeFmifsLibrary(PFORMAT_DRIVE_CONTEXT pContext); +BOOL GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNumberOfBytes); +EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj); +EXTERN_C HWND WINAPI +DeviceCreateHardwarePageEx(HWND hWndParent, + LPGUID lpGuids, + UINT uNumberOfGuids, + HWPAGE_DISPLAYMODE DisplayMode); + +HPROPSHEETPAGE SH_CreatePropertySheetPage(LPCSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle); + +#define DRIVE_PROPERTY_PAGES (3) + +static const GUID GUID_DEVCLASS_DISKDRIVE = {0x4d36e967L, 0xe325, 0x11ce, {0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}}; + + +VOID +GetDriveNameWithLetter(LPWSTR szText, UINT Length, WCHAR Drive) +{ + WCHAR szDrive[] = {'C',':','\\', 0}; + DWORD dwMaxComp, dwFileSys, TempLength = 0; + + szDrive[0] = Drive; + if (GetVolumeInformationW(szDrive, szText, Length, NULL, &dwMaxComp, &dwFileSys, NULL, 0)) + { + szText[Length-1] = L'\0'; + TempLength = wcslen(szText); + if (!TempLength) + { + /* load default volume label */ + TempLength = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, &szText[Length+1], (sizeof(szText)/sizeof(WCHAR))- Length - 2); + } + } + if (TempLength + 4 < Length) + { + szText[TempLength] = L' '; + szText[TempLength+1] = L'('; + szText[TempLength+2] = szDrive[0]; + szText[TempLength+3] = L')'; + TempLength +=4; + } + + if (TempLength < Length) + szText[TempLength] = L'\0'; + else + szText[Length-1] = L'\0'; +} + + +VOID +InitializeChkDskDialog(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) +{ + WCHAR szText[100]; + UINT Length; + SetWindowLongPtr(hwndDlg, DWLP_USER, (INT_PTR)pContext); + + Length = GetWindowTextW(hwndDlg, szText, sizeof(szText)/sizeof(WCHAR)); + + GetDriveNameWithLetter(&szText[Length +1], (sizeof(szText)/sizeof(WCHAR))-Length-1, pContext->Drive); + szText[Length] = L' '; + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + SetWindowText(hwndDlg, szText); +} + +HWND ChkdskDrvDialog = NULL; +BOOLEAN bChkdskSuccess = FALSE; + +BOOLEAN +NTAPI +ChkdskCallback( + IN CALLBACKCOMMAND Command, + IN ULONG SubAction, + IN PVOID ActionInfo) +{ + PDWORD Progress; + PBOOLEAN pSuccess; + switch(Command) + { + case PROGRESS: + Progress = (PDWORD)ActionInfo; + SendDlgItemMessageW(ChkdskDrvDialog, 14002, PBM_SETPOS, (WPARAM)*Progress, 0); + break; + case DONE: + pSuccess = (PBOOLEAN)ActionInfo; + bChkdskSuccess = (*pSuccess); + break; + + case VOLUMEINUSE: + case INSUFFICIENTRIGHTS: + case FSNOTSUPPORTED: + case CLUSTERSIZETOOSMALL: + bChkdskSuccess = FALSE; + FIXME("\n"); + break; + + default: + break; + } + + return TRUE; +} + +VOID +ChkDskNow(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) +{ + DWORD ClusterSize = 0, dwMaxComponentLength, FileSystemFlags; + WCHAR szFs[30]; + WCHAR szDrive[] = {'C',':','\\', 0}; + WCHAR szVolumeLabel[40]; + ULARGE_INTEGER TotalNumberOfFreeBytes, FreeBytesAvailableUser; + BOOLEAN bCorrectErrors = FALSE, bScanDrive = FALSE; + + szDrive[0] = pContext->Drive; + if(!GetVolumeInformationW(szDrive, szVolumeLabel, sizeof(szVolumeLabel)/sizeof(WCHAR), NULL, &dwMaxComponentLength, &FileSystemFlags, szFs, sizeof(szFs)/sizeof(WCHAR))) + { + FIXME("failed to get drive fs type\n"); + return; + } + + if (!GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailableUser, &TotalNumberOfFreeBytes, NULL)) + { + FIXME("failed to get drive space type\n"); + return; + } + + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfFreeBytes)) + { + FIXME("invalid cluster size\n"); + return; + } + + if (SendDlgItemMessageW(hwndDlg, 14000, BM_GETCHECK, 0, 0) == BST_CHECKED) + bCorrectErrors = TRUE; + + if (SendDlgItemMessageW(hwndDlg, 14001, BM_GETCHECK, 0, 0) == BST_CHECKED) + bScanDrive = TRUE; + + ChkdskDrvDialog = hwndDlg; + bChkdskSuccess = FALSE; + SendDlgItemMessageW(hwndDlg, 14002, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); + pContext->Chkdsk(szDrive, szFs, bCorrectErrors, TRUE, FALSE, bScanDrive, NULL, NULL, ChkdskCallback); + + ChkdskDrvDialog = NULL; + pContext->Result = bChkdskSuccess; + bChkdskSuccess = FALSE; + +} + +INT_PTR +CALLBACK +ChkDskDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + PFORMAT_DRIVE_CONTEXT pContext; + switch(uMsg) + { + case WM_INITDIALOG: + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)lParam); + InitializeChkDskDialog(hwndDlg, (PFORMAT_DRIVE_CONTEXT)lParam); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case IDCANCEL: + EndDialog(hwndDlg, 0); + break; + case IDOK: + pContext = (PFORMAT_DRIVE_CONTEXT) GetWindowLongPtr(hwndDlg, DWLP_USER); + ChkDskNow(hwndDlg, pContext); + break; + } + break; + } + + return FALSE; +} + + +static +ULONGLONG +GetFreeBytesShare(ULONGLONG TotalNumberOfFreeBytes, ULONGLONG TotalNumberOfBytes) +{ + ULONGLONG Temp; + + if (TotalNumberOfFreeBytes == 0LL) + { + return 0; + } + + Temp = TotalNumberOfBytes / 100; + if (Temp >= TotalNumberOfFreeBytes) + { + return 1; + } + else + { + return TotalNumberOfFreeBytes / Temp; + } +} + +static +void +PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT drawItem) +{ + HBRUSH hBrush; + + if (drawItem->CtlID == 14013) + { + hBrush = CreateSolidBrush(RGB(0, 0, 255)); + if (hBrush) + { + FillRect(drawItem->hDC, &drawItem->rcItem, hBrush); + DeleteObject((HGDIOBJ)hBrush); + } + } + else if (drawItem->CtlID == 14014) + { + hBrush = CreateSolidBrush(RGB(255, 0, 255)); + if (hBrush) + { + FillRect(drawItem->hDC, &drawItem->rcItem, hBrush); + DeleteObject((HGDIOBJ)hBrush); + } + } + else if (drawItem->CtlID == 14015) + { + HBRUSH hBlueBrush; + HBRUSH hMagBrush; + RECT rect; + LONG horzsize; + LONGLONG Result; + WCHAR szBuffer[20]; + + hBlueBrush = CreateSolidBrush(RGB(0, 0, 255)); + hMagBrush = CreateSolidBrush(RGB(255, 0, 255)); + + SendDlgItemMessageW(hwndDlg, 14006, WM_GETTEXT, 20, (LPARAM)szBuffer); + Result = _wtoi(szBuffer); + + CopyRect(&rect, &drawItem->rcItem); + horzsize = rect.right - rect.left; + Result = (Result * horzsize) / 100; + + rect.right = drawItem->rcItem.right - Result; + FillRect(drawItem->hDC, &rect, hBlueBrush); + rect.left = rect.right; + rect.right = drawItem->rcItem.right; + FillRect(drawItem->hDC, &rect, hMagBrush); + DeleteObject(hBlueBrush); + DeleteObject(hMagBrush); + } +} + +static +void +InitializeGeneralDriveDialog(HWND hwndDlg, WCHAR * szDrive) +{ + WCHAR szVolumeName[MAX_PATH+1] = {0}; + DWORD MaxComponentLength = 0; + DWORD FileSystemFlags = 0; + WCHAR FileSystemName[MAX_PATH+1] = {0}; + WCHAR szFormat[50]; + WCHAR szBuffer[128]; + BOOL ret; + UINT DriveType; + ULARGE_INTEGER FreeBytesAvailable; + LARGE_INTEGER TotalNumberOfFreeBytes; + LARGE_INTEGER TotalNumberOfBytes; + + ret = GetVolumeInformationW(szDrive, szVolumeName, MAX_PATH+1, NULL, &MaxComponentLength, &FileSystemFlags, FileSystemName, MAX_PATH+1); + if (ret) + { + /* set volume label */ + SendDlgItemMessageW(hwndDlg, 14000, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szVolumeName); + + /* set filesystem type */ + SendDlgItemMessageW(hwndDlg, 14002, WM_SETTEXT, (WPARAM)NULL, (LPARAM)FileSystemName); + + } + + DriveType = GetDriveTypeW(szDrive); + if (DriveType == DRIVE_FIXED || DriveType == DRIVE_CDROM) + { + + if(GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable, (PULARGE_INTEGER)&TotalNumberOfBytes, (PULARGE_INTEGER)&TotalNumberOfFreeBytes)) + { + WCHAR szResult[128]; + LONGLONG Result; +#ifdef IOCTL_DISK_GET_LENGTH_INFO_IMPLEMENTED + HANDLE hVolume; + DWORD BytesReturned = 0; + + swprintf(szResult, L"\\\\.\\%c:", towupper(szDrive[0])); + hVolume = CreateFileW(szResult, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); + if (hVolume != INVALID_HANDLE_VALUE) + { + ret = DeviceIoControl(hVolume, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, (LPVOID)&TotalNumberOfBytes, sizeof(ULARGE_INTEGER), &BytesReturned, NULL); + if (ret && StrFormatByteSizeW(LengthInformation.Length.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) + SendDlgItemMessageW(hwndDlg, 14007, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szResult); + + CloseHandle(hVolume); + } + TRACE("szResult %s hVOlume %p ret %d LengthInformation %ul Bytesreturned %d\n", debugstr_w(szResult), hVolume, ret, LengthInformation.Length.QuadPart, BytesReturned); +#else + if (ret && StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) + SendDlgItemMessageW(hwndDlg, 14007, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szResult); +#endif + + if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart - FreeBytesAvailable.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) + SendDlgItemMessageW(hwndDlg, 14003, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szResult); + + if (StrFormatByteSizeW(FreeBytesAvailable.QuadPart, szResult, sizeof(szResult) / sizeof(WCHAR))) + SendDlgItemMessageW(hwndDlg, 14005, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szResult); + + Result = GetFreeBytesShare(TotalNumberOfFreeBytes.QuadPart, TotalNumberOfBytes.QuadPart); + /* set free bytes percentage */ + swprintf(szResult, L"%02d%%", Result); + SendDlgItemMessageW(hwndDlg, 14006, WM_SETTEXT, (WPARAM)0, (LPARAM)szResult); + /* store used share amount */ + Result = 100 - Result; + swprintf(szResult, L"%02d%%", Result); + SendDlgItemMessageW(hwndDlg, 14004, WM_SETTEXT, (WPARAM)0, (LPARAM)szResult); + if (DriveType == DRIVE_FIXED) + { + if (LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + SendDlgItemMessageW(hwndDlg, 14001, WM_SETTEXT, (WPARAM)0, (LPARAM)szBuffer); + } + else /* DriveType == DRIVE_CDROM) */ + { + if (LoadStringW(shell32_hInstance, IDS_DRIVE_CDROM, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + SendDlgItemMessageW(hwndDlg, 14001, WM_SETTEXT, (WPARAM)0, (LPARAM)szBuffer); + } + } + } + /* set drive description */ + SendDlgItemMessageW(hwndDlg, 14009, WM_GETTEXT, (WPARAM)50, (LPARAM)szFormat); + swprintf(szBuffer, szFormat, szDrive); + SendDlgItemMessageW(hwndDlg, 14009, WM_SETTEXT, (WPARAM)NULL, (LPARAM)szBuffer); +} + + +INT_PTR +CALLBACK +DriveGeneralDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + LPPROPSHEETPAGEW ppsp; + LPDRAWITEMSTRUCT drawItem; + STARTUPINFOW si; + PROCESS_INFORMATION pi; + WCHAR * lpstr; + WCHAR szPath[MAX_PATH]; + UINT length; + LPPSHNOTIFY lppsn; + + switch(uMsg) + { + case WM_INITDIALOG: + ppsp = (LPPROPSHEETPAGEW)lParam; + if (ppsp == NULL) + break; + lpstr = (WCHAR *)ppsp->lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)lpstr); + InitializeGeneralDriveDialog(hwndDlg, lpstr); + return TRUE; + case WM_DRAWITEM: + drawItem = (LPDRAWITEMSTRUCT)lParam; + if (drawItem->CtlID >= 14013 && drawItem->CtlID <= 14015) + { + PaintStaticControls(hwndDlg, drawItem); + return TRUE; + } + break; + case WM_COMMAND: + if (LOWORD(wParam) == 14010) /* Disk Cleanup */ + { + lpstr = (WCHAR*)GetWindowLongPtr(hwndDlg, DWLP_USER); + ZeroMemory( &si, sizeof(si) ); + si.cb = sizeof(si); + ZeroMemory( &pi, sizeof(pi) ); + if (!GetSystemDirectoryW(szPath, MAX_PATH)) + break; + wcscat(szPath, L"\\cleanmgr.exe /D "); + length = wcslen(szPath); + szPath[length] = lpstr[0]; + szPath[length+1] = L'\0'; + if (CreateProcessW(NULL, szPath, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + } + break; + } + case WM_NOTIFY: + lppsn = (LPPSHNOTIFY) lParam; + if (LOWORD(wParam) == 14000) + { + if (HIWORD(wParam) == EN_CHANGE) + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; + } + if (lppsn->hdr.code == PSN_APPLY) + { + lpstr = (LPWSTR)GetWindowLongPtr(hwndDlg, DWLP_USER); + if (lpstr && SendDlgItemMessageW(hwndDlg, 14000, WM_GETTEXT, sizeof(szPath)/sizeof(WCHAR), (LPARAM)szPath)) + { + szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0'; + SetVolumeLabelW(lpstr, szPath); + } + SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR ); + return TRUE; + } + break; + + default: + break; + } + + + return FALSE; +} + +INT_PTR +CALLBACK +DriveExtraDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + STARTUPINFOW si; + PROCESS_INFORMATION pi; + WCHAR szPath[MAX_PATH + 10]; + WCHAR szArg[MAX_PATH]; + WCHAR * szDrive; + LPPROPSHEETPAGEW ppsp; + DWORD dwSize; + FORMAT_DRIVE_CONTEXT Context; + + switch (uMsg) + { + case WM_INITDIALOG: + ppsp = (LPPROPSHEETPAGEW)lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)ppsp->lParam); + return TRUE; + case WM_COMMAND: + ZeroMemory( &si, sizeof(si) ); + si.cb = sizeof(si); + ZeroMemory( &pi, sizeof(pi) ); + + szDrive = (WCHAR*)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch(LOWORD(wParam)) + { + case 14000: + if (InitializeFmifsLibrary(&Context)) + { + Context.Drive = szDrive[0]; + DialogBoxParamW(shell32_hInstance, L"CHKDSK_DLG", hwndDlg, ChkDskDlg, (LPARAM)&Context); + FreeLibrary(Context.hLibrary); + } + break; + case 14001: + dwSize = sizeof(szPath); + if (RegGetValueW(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\DefragPath", + NULL, + RRF_RT_REG_EXPAND_SZ, + NULL, + (PVOID)szPath, + &dwSize) == S_OK) + { + swprintf(szArg, szPath, szDrive[0]); + if (!GetSystemDirectoryW(szPath, MAX_PATH)) + break; + szDrive = PathAddBackslashW(szPath); + if (!szDrive) + break; + + wcscat(szDrive, L"mmc.exe"); + if (CreateProcessW(szPath, szArg, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + } + } + break; + case 14002: + dwSize = sizeof(szPath); + if (RegGetValueW(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\BackupPath", + NULL, + RRF_RT_REG_EXPAND_SZ, + NULL, + (PVOID)szPath, + &dwSize) == S_OK) + { + if (CreateProcessW(szPath, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + } + } + } + break; + } + return FALSE; +} + +INT_PTR +CALLBACK +DriveHardwareDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + GUID Guids[1]; + Guids[0] = GUID_DEVCLASS_DISKDRIVE; + + UNREFERENCED_PARAMETER(lParam); + UNREFERENCED_PARAMETER(wParam); + + switch(uMsg) + { + case WM_INITDIALOG: + /* create the hardware page */ + DeviceCreateHardwarePageEx(hwndDlg, + Guids, + sizeof(Guids) / sizeof(Guids[0]), + HWPD_STANDARDLIST); + break; + } + + return FALSE; +} + +static +const +struct +{ + LPCSTR resname; + DLGPROC dlgproc; + UINT DriveType; +} PropPages[] = +{ + { "DRIVE_GENERAL_DLG", DriveGeneralDlg, -1}, + { "DRIVE_EXTRA_DLG", DriveExtraDlg, DRIVE_FIXED}, + { "DRIVE_HARDWARE_DLG", DriveHardwareDlg, -1}, +}; + +HRESULT +CALLBACK +AddPropSheetPageProc(HPROPSHEETPAGE hpage, LPARAM lParam) +{ + PROPSHEETHEADER *ppsh = (PROPSHEETHEADER *)lParam; + if (ppsh != NULL && ppsh->nPages < MAX_PROPERTY_SHEET_PAGE) + { + ppsh->phpage[ppsh->nPages++] = hpage; + return TRUE; + } + return FALSE; +} + +BOOL +SH_ShowDriveProperties(WCHAR * drive, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl) +{ + HPSXA hpsx = NULL; + HPROPSHEETPAGE hpsp[MAX_PROPERTY_SHEET_PAGE]; + PROPSHEETHEADERW psh; + BOOL ret; + UINT i; + WCHAR szName[MAX_PATH+6]; + DWORD dwMaxComponent, dwFileSysFlags; + CComPtr pDataObj; + UINT DriveType; + + ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); + psh.dwSize = sizeof(PROPSHEETHEADERW); + //psh.dwFlags = PSH_USECALLBACK | PSH_PROPTITLE; + psh.hwndParent = NULL; + psh.nStartPage = 0; + psh.phpage = hpsp; + + if (GetVolumeInformationW(drive, szName, sizeof(szName)/sizeof(WCHAR), NULL, &dwMaxComponent, + &dwFileSysFlags, NULL, 0)) + { + psh.pszCaption = szName; + psh.dwFlags |= PSH_PROPTITLE; + if (!wcslen(szName)) + { + /* FIXME + * check if disk is a really a local hdd + */ + i = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, szName, sizeof(szName)/sizeof(WCHAR)-6); + if (i > 0 && i < (sizeof(szName)/sizeof(WCHAR)) - 6) + { + szName[i] = L' '; + szName[i+1] = L'('; + wcscpy(&szName[i+2], drive); + szName[i+4] = L')'; + szName[i+5] = L'\0'; + } + } + } + + DriveType = GetDriveTypeW(drive); + for (i = 0; i < DRIVE_PROPERTY_PAGES; i++) + { + if (PropPages[i].DriveType == (UINT)-1 || (PropPages[i].DriveType != (UINT)-1 && PropPages[i].DriveType == DriveType)) + { + HPROPSHEETPAGE hprop = SH_CreatePropertySheetPage(PropPages[i].resname, PropPages[i].dlgproc, (LPARAM)drive, NULL); + if (hprop) + { + hpsp[psh.nPages] = hprop; + psh.nPages++; + } + } + } + + if (SHCreateDataObject(pidlFolder, 1, apidl, NULL, IID_IDataObject, (void **)&pDataObj) == S_OK) + { + hpsx = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, L"Drive", MAX_PROPERTY_SHEET_PAGE-DRIVE_PROPERTY_PAGES, pDataObj); + if (hpsx) + { + SHAddFromPropSheetExtArray(hpsx, (LPFNADDPROPSHEETPAGE)AddPropSheetPageProc, (LPARAM)&psh); + } + } + + ret = PropertySheetW(&psh); + + if (hpsx) + SHDestroyPropSheetExtArray(hpsx); + + if (ret < 0) + return FALSE; + else + return TRUE; +} + +BOOL +GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNumberOfBytes) +{ + DWORD ClusterSize; + + if (!wcsicmp(szFs, L"FAT16") || + !wcsicmp(szFs, L"FAT")) //REACTOS HACK + { + if (TotalNumberOfBytes->QuadPart <= (16 * 1024 * 1024)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (32 * 1024 * 1024)) + ClusterSize = 512; + else if (TotalNumberOfBytes->QuadPart <= (64 * 1024 * 1024)) + ClusterSize = 1024; + else if (TotalNumberOfBytes->QuadPart <= (128 * 1024 * 1024)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (256 * 1024 * 1024)) + ClusterSize = 4096; + else if (TotalNumberOfBytes->QuadPart <= (512 * 1024 * 1024)) + ClusterSize = 8192; + else if (TotalNumberOfBytes->QuadPart <= (1024 * 1024 * 1024)) + ClusterSize = 16384; + else if (TotalNumberOfBytes->QuadPart <= (2048LL * 1024LL * 1024LL)) + ClusterSize = 32768; + else if (TotalNumberOfBytes->QuadPart <= (4096LL * 1024LL * 1024LL)) + ClusterSize = 8192; + else + return FALSE; + } + else if (!wcsicmp(szFs, L"FAT32")) + { + if (TotalNumberOfBytes->QuadPart <=(64 * 1024 * 1024)) + ClusterSize = 512; + else if (TotalNumberOfBytes->QuadPart <= (128 * 1024 * 1024)) + ClusterSize = 1024; + else if (TotalNumberOfBytes->QuadPart <= (256 * 1024 * 1024)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (8192LL * 1024LL * 1024LL)) + ClusterSize = 2048; + else if (TotalNumberOfBytes->QuadPart <= (16384LL * 1024LL * 1024LL)) + ClusterSize = 8192; + else if (TotalNumberOfBytes->QuadPart <= (32768LL * 1024LL * 1024LL)) + ClusterSize = 16384; + else + return FALSE; + } + else if (!wcsicmp(szFs, L"NTFS")) + { + if (TotalNumberOfBytes->QuadPart <=(512 * 1024 * 1024)) + ClusterSize = 512; + else if (TotalNumberOfBytes->QuadPart <= (1024 * 1024 * 1024)) + ClusterSize = 1024; + else if (TotalNumberOfBytes->QuadPart <= (2048LL * 1024LL * 1024LL)) + ClusterSize = 2048; + else + ClusterSize = 2048; + } + else + return FALSE; + + *pClusterSize = ClusterSize; + return TRUE; +} + + +VOID +InsertDefaultClusterSizeForFs(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) +{ + WCHAR szFs[100] = {0}; + WCHAR szDrive[4] = { L'C', ':', '\\', 0 }; + INT iSelIndex; + ULARGE_INTEGER FreeBytesAvailableUser, TotalNumberOfBytes; + DWORD ClusterSize; + LRESULT lIndex; + HWND hDlgCtrl; + + hDlgCtrl = GetDlgItem(hwndDlg, 28677); + iSelIndex = SendMessage(hDlgCtrl, CB_GETCURSEL, 0, 0); + if (iSelIndex == CB_ERR) + return; + + if (SendMessageW(hDlgCtrl, CB_GETLBTEXT, iSelIndex, (LPARAM)szFs) == CB_ERR) + return; + + szFs[(sizeof(szFs)/sizeof(WCHAR))-1] = L'\0'; + szDrive[0] = pContext->Drive + 'A'; + + if (!GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailableUser, &TotalNumberOfBytes, NULL)) + return; + + if (!wcsicmp(szFs, L"FAT16") || + !wcsicmp(szFs, L"FAT")) //REACTOS HACK + { + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfBytes)) + { + TRACE("FAT16 is not supported on hdd larger than 4G current %lu\n", TotalNumberOfBytes.QuadPart); + SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); + return; + } + + if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, szFs, sizeof(szFs)/sizeof(WCHAR))) + { + hDlgCtrl = GetDlgItem(hwndDlg, 28680); + szFs[(sizeof(szFs)/sizeof(WCHAR))-1] = L'\0'; + SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); + lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szFs); + if (lIndex != CB_ERR) + SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); + SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); + } + } + else if (!wcsicmp(szFs, L"FAT32")) + { + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfBytes)) + { + TRACE("FAT32 is not supported on hdd larger than 32G current %lu\n", TotalNumberOfBytes.QuadPart); + SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); + return; + } + + if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, szFs, sizeof(szFs)/sizeof(WCHAR))) + { + hDlgCtrl = GetDlgItem(hwndDlg, 28680); + szFs[(sizeof(szFs)/sizeof(WCHAR))-1] = L'\0'; + SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); + lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szFs); + if (lIndex != CB_ERR) + SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); + SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); + } + } + else if (!wcsicmp(szFs, L"NTFS")) + { + if (!GetDefaultClusterSize(szFs, &ClusterSize, &TotalNumberOfBytes)) + { + TRACE("NTFS is not supported on hdd larger than 2TB current %lu\n", TotalNumberOfBytes.QuadPart); + SendMessageW(hDlgCtrl, CB_DELETESTRING, iSelIndex, 0); + return; + } + + hDlgCtrl = GetDlgItem(hwndDlg, 28680); + if (LoadStringW(shell32_hInstance, IDS_DEFAULT_CLUSTER_SIZE, szFs, sizeof(szFs)/sizeof(WCHAR))) + { + szFs[(sizeof(szFs)/sizeof(WCHAR))-1] = L'\0'; + SendMessageW(hDlgCtrl, CB_RESETCONTENT, 0, 0); + lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szFs); + if (lIndex != CB_ERR) + SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); + SendMessageW(hDlgCtrl, CB_SETCURSEL, 0, 0); + } + ClusterSize = 512; + for (lIndex = 0; lIndex < 4; lIndex++) + { + TotalNumberOfBytes.QuadPart = ClusterSize; + if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, szFs, sizeof(szFs)/sizeof(WCHAR))) + { + lIndex = SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szFs); + if (lIndex != CB_ERR) + SendMessageW(hDlgCtrl, CB_SETITEMDATA, lIndex, (LPARAM)ClusterSize); + } + ClusterSize *= 2; + } + } + else + { + FIXME("unknown fs\n"); + SendDlgItemMessageW(hwndDlg, 28680, CB_RESETCONTENT, iSelIndex, 0); + return; + } +} + +VOID +InitializeFormatDriveDlg(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) +{ + WCHAR szText[120]; + WCHAR szDrive[4] = { L'C', ':', '\\', 0 }; + WCHAR szFs[30] = {0}; + INT Length, TempLength; + DWORD dwSerial, dwMaxComp, dwFileSys; + ULARGE_INTEGER FreeBytesAvailableUser, TotalNumberOfBytes; + DWORD dwIndex, dwDefault; + UCHAR uMinor, uMajor; + BOOLEAN Latest; + HWND hDlgCtrl; + + Length = GetWindowTextW(hwndDlg, szText, sizeof(szText)/sizeof(WCHAR)); + if (Length < 0) + Length = 0; + szDrive[0] = pContext->Drive + L'A'; + if (GetVolumeInformationW(szDrive, &szText[Length+1], (sizeof(szText)/sizeof(WCHAR))- Length - 2, &dwSerial, &dwMaxComp, &dwFileSys, szFs, sizeof(szFs)/sizeof(WCHAR))) + { + szText[Length] = L' '; + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + TempLength = wcslen(&szText[Length+1]); + if (!TempLength) + { + /* load default volume label */ + TempLength = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, &szText[Length+1], (sizeof(szText)/sizeof(WCHAR))- Length - 2); + } + else + { + /* set volume label */ + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + SendDlgItemMessageW(hwndDlg, 28679, WM_SETTEXT, 0, (LPARAM)&szText[Length+1]); + } + Length += TempLength + 1; + } + + if ((DWORD)Length + 4 < (sizeof(szText)/sizeof(WCHAR))) + { + szText[Length] = L' '; + szText[Length+1] = L'('; + szText[Length+2] = szDrive[0]; + szText[Length+3] = L')'; + Length +=4; + } + + if ((DWORD)Length < (sizeof(szText)/sizeof(WCHAR))) + szText[Length] = L'\0'; + else + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + + /* set window text */ + SetWindowTextW(hwndDlg, szText); + + if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailableUser, &TotalNumberOfBytes, NULL)) + { + if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, szText, sizeof(szText)/sizeof(WCHAR))) + { + /* add drive capacity */ + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + SendDlgItemMessageW(hwndDlg, 28673, CB_ADDSTRING, 0, (LPARAM)szText); + SendDlgItemMessageW(hwndDlg, 28673, CB_SETCURSEL, 0, (LPARAM)0); + } + } + + if (pContext->Options & SHFMT_OPT_FULL) + { + /* check quick format button */ + SendDlgItemMessageW(hwndDlg, 28674, BM_SETCHECK, BST_CHECKED, 0); + } + + /* enumerate all available filesystems */ + dwIndex = 0; + dwDefault = 0; + hDlgCtrl = GetDlgItem(hwndDlg, 28677); + + while(pContext->QueryAvailableFileSystemFormat(dwIndex, szText, &uMajor, &uMinor, &Latest)) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = L'\0'; + if (!wcsicmp(szText, szFs)) + dwDefault = dwIndex; + + SendMessageW(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szText); + dwIndex++; + } + + if (!dwIndex) + { + ERR("no filesystem providers\n"); + return; + } + + /* select default filesys */ + SendMessageW(hDlgCtrl, CB_SETCURSEL, dwDefault, 0); + /* setup cluster combo */ + InsertDefaultClusterSizeForFs(hwndDlg, pContext); + /* hide progress control */ + ShowWindow(GetDlgItem(hwndDlg, 28678), SW_HIDE); +} + +HWND FormatDrvDialog = NULL; +BOOLEAN bSuccess = FALSE; + + +BOOLEAN +NTAPI +FormatExCB( + IN CALLBACKCOMMAND Command, + IN ULONG SubAction, + IN PVOID ActionInfo) +{ + PDWORD Progress; + PBOOLEAN pSuccess; + switch(Command) + { + case PROGRESS: + Progress = (PDWORD)ActionInfo; + SendDlgItemMessageW(FormatDrvDialog, 28678, PBM_SETPOS, (WPARAM)*Progress, 0); + break; + case DONE: + pSuccess = (PBOOLEAN)ActionInfo; + bSuccess = (*pSuccess); + break; + + case VOLUMEINUSE: + case INSUFFICIENTRIGHTS: + case FSNOTSUPPORTED: + case CLUSTERSIZETOOSMALL: + bSuccess = FALSE; + FIXME("\n"); + break; + + default: + break; + } + + return TRUE; +} + + + + + +VOID +FormatDrive(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) +{ + WCHAR szDrive[4] = { L'C', ':', '\\', 0 }; + WCHAR szFileSys[40] = {0}; + WCHAR szLabel[40] = {0}; + INT iSelIndex; + UINT Length; + HWND hDlgCtrl; + BOOL QuickFormat; + DWORD ClusterSize; + + /* set volume path */ + szDrive[0] = pContext->Drive; + + /* get filesystem */ + hDlgCtrl = GetDlgItem(hwndDlg, 28677); + iSelIndex = SendMessageW(hDlgCtrl, CB_GETCURSEL, 0, 0); + if (iSelIndex == CB_ERR) + { + FIXME("\n"); + return; + } + Length = SendMessageW(hDlgCtrl, CB_GETLBTEXTLEN, iSelIndex, 0); + if ((int)Length == CB_ERR || Length + 1> sizeof(szFileSys)/sizeof(WCHAR)) + { + FIXME("\n"); + return; + } + + /* retrieve the file system */ + SendMessageW(hDlgCtrl, CB_GETLBTEXT, iSelIndex, (LPARAM)szFileSys); + szFileSys[(sizeof(szFileSys)/sizeof(WCHAR))-1] = L'\0'; + + /* retrieve the volume label */ + hDlgCtrl = GetWindow(hwndDlg, 28679); + Length = SendMessageW(hDlgCtrl, WM_GETTEXTLENGTH, 0, 0); + if (Length + 1 > sizeof(szLabel)/sizeof(WCHAR)) + { + FIXME("\n"); + return; + } + SendMessageW(hDlgCtrl, WM_GETTEXT, sizeof(szLabel)/sizeof(WCHAR), (LPARAM)szLabel); + szLabel[(sizeof(szLabel)/sizeof(WCHAR))-1] = L'\0'; + + /* check for quickformat */ + if (SendDlgItemMessageW(hwndDlg, 28674, BM_GETCHECK, 0, 0) == BST_CHECKED) + QuickFormat = TRUE; + else + QuickFormat = FALSE; + + /* get the cluster size */ + hDlgCtrl = GetDlgItem(hwndDlg, 28680); + iSelIndex = SendMessageW(hDlgCtrl, CB_GETCURSEL, 0, 0); + if (iSelIndex == CB_ERR) + { + FIXME("\n"); + return; + } + ClusterSize = SendMessageW(hDlgCtrl, CB_GETITEMDATA, iSelIndex, 0); + if ((int)ClusterSize == CB_ERR) + { + FIXME("\n"); + return; + } + + hDlgCtrl = GetDlgItem(hwndDlg, 28680); + ShowWindow(hDlgCtrl, SW_SHOW); + SendMessageW(hDlgCtrl, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); + bSuccess = FALSE; + + /* FIXME + * will cause display problems + * when performing more than one format + */ + FormatDrvDialog = hwndDlg; + + pContext->FormatEx(szDrive, + FMIFS_HARDDISK, /* FIXME */ + szFileSys, + szLabel, + QuickFormat, + ClusterSize, + FormatExCB); + + ShowWindow(hDlgCtrl, SW_HIDE); + FormatDrvDialog = NULL; + if (!bSuccess) + { + pContext->Result = SHFMT_ERROR; + } + else if (QuickFormat) + { + pContext->Result = SHFMT_OPT_FULL; + } + else + { + pContext->Result = FALSE; + } +} + + +BOOL +CALLBACK +FormatDriveDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + PFORMAT_DRIVE_CONTEXT pContext; + + switch(uMsg) + { + case WM_INITDIALOG: + InitializeFormatDriveDlg(hwndDlg, (PFORMAT_DRIVE_CONTEXT)lParam); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)lParam); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case IDOK: + pContext = (PFORMAT_DRIVE_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER); + FormatDrive(hwndDlg, pContext); + break; + case IDCANCEL: + pContext = (PFORMAT_DRIVE_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER); + EndDialog(hwndDlg, pContext->Result); + break; + case 28677: // filesystem combo + if (HIWORD(wParam) == CBN_SELENDOK) + { + pContext = (PFORMAT_DRIVE_CONTEXT)GetWindowLongPtr(hwndDlg, DWLP_USER); + InsertDefaultClusterSizeForFs(hwndDlg, pContext); + } + break; + } + } + return FALSE; +} + + +BOOL +InitializeFmifsLibrary(PFORMAT_DRIVE_CONTEXT pContext) +{ + INITIALIZE_FMIFS InitFmifs; + BOOLEAN ret; + HMODULE hLibrary; + + hLibrary = pContext->hLibrary = LoadLibraryW(L"fmifs.dll"); + if(!hLibrary) + { + ERR("failed to load fmifs.dll\n"); + return FALSE; + } + + InitFmifs = (INITIALIZE_FMIFS)GetProcAddress(hLibrary, "InitializeFmIfs"); + if (!InitFmifs) + { + ERR("InitializeFmIfs export is missing\n"); + FreeLibrary(hLibrary); + return FALSE; + } + + ret = (*InitFmifs)(NULL, DLL_PROCESS_ATTACH, NULL); + if (!ret) + { + ERR("fmifs failed to initialize\n"); + FreeLibrary(hLibrary); + return FALSE; + } + + pContext->QueryAvailableFileSystemFormat = (QUERY_AVAILABLEFSFORMAT)GetProcAddress(hLibrary, "QueryAvailableFileSystemFormat"); + if (!pContext->QueryAvailableFileSystemFormat) + { + ERR("QueryAvailableFileSystemFormat export is missing\n"); + FreeLibrary(hLibrary); + return FALSE; + } + + pContext->FormatEx = (FORMAT_EX) GetProcAddress(hLibrary, "FormatEx"); + if (!pContext->FormatEx) + { + ERR("FormatEx export is missing\n"); + FreeLibrary(hLibrary); + return FALSE; + } + + pContext->EnableVolumeCompression = (ENABLEVOLUMECOMPRESSION) GetProcAddress(hLibrary, "EnableVolumeCompression"); + if (!pContext->FormatEx) + { + ERR("EnableVolumeCompression export is missing\n"); + FreeLibrary(hLibrary); + return FALSE; + } + + pContext->Chkdsk = (CHKDSK) GetProcAddress(hLibrary, "Chkdsk"); + if (!pContext->Chkdsk) + { + ERR("Chkdsk export is missing\n"); + FreeLibrary(hLibrary); + return FALSE; + } + + return TRUE; +} + +/************************************************************************* + * SHFormatDrive (SHELL32.@) + */ + +DWORD +WINAPI +SHFormatDrive(HWND hwnd, UINT drive, UINT fmtID, UINT options) +{ + FORMAT_DRIVE_CONTEXT Context; + int result; + + TRACE("%p, 0x%08x, 0x%08x, 0x%08x - stub\n", hwnd, drive, fmtID, options); + + if (!InitializeFmifsLibrary(&Context)) + { + ERR("failed to initialize fmifs\n"); + return SHFMT_NOFORMAT; + } + + Context.Drive = drive; + Context.Options = options; + + result = DialogBoxParamW(shell32_hInstance, L"FORMAT_DLG", hwnd, FormatDriveDlg, (LPARAM)&Context); + + FreeLibrary(Context.hLibrary); + return result; +} + + diff --git a/dll/win32/shell32_new/enumidlist.cpp b/dll/win32/shell32_new/enumidlist.cpp new file mode 100644 index 00000000000..abe2e02a0d3 --- /dev/null +++ b/dll/win32/shell32_new/enumidlist.cpp @@ -0,0 +1,299 @@ +/* + * IEnumIDList + * + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +IEnumIDListImpl::IEnumIDListImpl() +{ + mpFirst = NULL; + mpLast = NULL; + mpCurrent = NULL; +} + +IEnumIDListImpl::~IEnumIDListImpl() +{ +} + +/************************************************************************** + * AddToEnumList() + */ +BOOL IEnumIDListImpl::AddToEnumList(LPITEMIDLIST pidl) +{ + ENUMLIST *pNew; + + TRACE("(%p)->(pidl=%p)\n", this, pidl); + + if (!pidl) + return FALSE; + + pNew = (ENUMLIST *)SHAlloc(sizeof(ENUMLIST)); + if (pNew) + { + /*set the next pointer */ + pNew->pNext = NULL; + pNew->pidl = pidl; + + /*is This the first item in the list? */ + if (!mpFirst) + { + mpFirst = pNew; + mpCurrent = pNew; + } + + if (mpLast) + { + /*add the new item to the end of the list */ + mpLast->pNext = pNew; + } + + /*update the last item pointer */ + mpLast = pNew; + TRACE("-- (%p)->(first=%p, last=%p)\n", this, mpFirst, mpLast); + return TRUE; + } + return FALSE; +} + +/************************************************************************** +* DeleteList() +*/ +BOOL IEnumIDListImpl::DeleteList() +{ + ENUMLIST *pDelete; + + TRACE("(%p)->()\n", this); + + while (mpFirst) + { + pDelete = mpFirst; + mpFirst = pDelete->pNext; + SHFree(pDelete->pidl); + SHFree(pDelete); + } + mpFirst = NULL; + mpLast = NULL; + mpCurrent = NULL; + return TRUE; +} + +/************************************************************************** + * HasItemWithCLSID() + */ +BOOL IEnumIDListImpl::HasItemWithCLSID(LPITEMIDLIST pidl) +{ + ENUMLIST *pCur; + REFIID refid = *_ILGetGUIDPointer(pidl); + + pCur = mpFirst; + + while(pCur) + { + LPGUID curid = _ILGetGUIDPointer(pCur->pidl); + if (curid && IsEqualGUID(*curid, refid)) + { + return TRUE; + } + pCur = pCur->pNext; + } + return FALSE; +} + + +/************************************************************************** + * CreateFolderEnumList() + */ +BOOL IEnumIDListImpl::CreateFolderEnumList( + LPCWSTR lpszPath, + DWORD dwFlags) +{ + LPITEMIDLIST pidl=NULL; + WIN32_FIND_DATAW stffile; + HANDLE hFile; + WCHAR szPath[MAX_PATH]; + BOOL succeeded = TRUE; + static const WCHAR stars[] = { '*','.','*',0 }; + static const WCHAR dot[] = { '.',0 }; + static const WCHAR dotdot[] = { '.','.',0 }; + + TRACE("(%p)->(path=%s flags=0x%08x)\n", this, debugstr_w(lpszPath), dwFlags); + + if(!lpszPath || !lpszPath[0]) return FALSE; + + wcscpy(szPath, lpszPath); + PathAddBackslashW(szPath); + wcscat(szPath,stars); + + hFile = FindFirstFileW(szPath,&stffile); + if ( hFile != INVALID_HANDLE_VALUE ) + { + BOOL findFinished = FALSE; + + do + { + if ( !(stffile.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) + || (dwFlags & SHCONTF_INCLUDEHIDDEN) ) + { + if ( (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && + dwFlags & SHCONTF_FOLDERS && + strcmpW(stffile.cFileName, dot) && strcmpW(stffile.cFileName, dotdot)) + { + pidl = _ILCreateFromFindDataW(&stffile); + succeeded = succeeded && AddToEnumList(pidl); + } + else if (!(stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + && dwFlags & SHCONTF_NONFOLDERS) + { + pidl = _ILCreateFromFindDataW(&stffile); + succeeded = succeeded && AddToEnumList(pidl); + } + } + if (succeeded) + { + if (!FindNextFileW(hFile, &stffile)) + { + if (GetLastError() == ERROR_NO_MORE_FILES) + findFinished = TRUE; + else + succeeded = FALSE; + } + } + } while (succeeded && !findFinished); + FindClose(hFile); + } + return succeeded; +} + +/************************************************************************** + * IEnumIDList_fnNext + */ + +HRESULT WINAPI IEnumIDListImpl::Next( + ULONG celt, + LPITEMIDLIST * rgelt, + ULONG *pceltFetched) +{ + ULONG i; + HRESULT hr = S_OK; + LPITEMIDLIST temp; + + TRACE("(%p)->(%d,%p, %p)\n", this, celt, rgelt, pceltFetched); + +/* It is valid to leave pceltFetched NULL when celt is 1. Some of explorer's + * subsystems actually use it (and so may a third party browser) + */ + if(pceltFetched) + *pceltFetched = 0; + + *rgelt=0; + + if(celt > 1 && !pceltFetched) + { return E_INVALIDARG; + } + + if(celt > 0 && !mpCurrent) + { return S_FALSE; + } + + for(i = 0; i < celt; i++) + { if(!mpCurrent) + break; + + temp = ILClone(mpCurrent->pidl); + rgelt[i] = temp; + mpCurrent = mpCurrent->pNext; + } + if(pceltFetched) + { *pceltFetched = i; + } + + return hr; +} + +/************************************************************************** +* IEnumIDList_fnSkip +*/ +HRESULT WINAPI IEnumIDListImpl::Skip( + ULONG celt) +{ + DWORD dwIndex; + HRESULT hr = S_OK; + + TRACE("(%p)->(%u)\n", this, celt); + + for(dwIndex = 0; dwIndex < celt; dwIndex++) + { if(!mpCurrent) + { hr = S_FALSE; + break; + } + mpCurrent = mpCurrent->pNext; + } + return hr; +} + +/************************************************************************** +* IEnumIDList_fnReset +*/ +HRESULT WINAPI IEnumIDListImpl::Reset() +{ + TRACE("(%p)\n", this); + mpCurrent = mpFirst; + return S_OK; +} + +/************************************************************************** +* IEnumIDList_fnClone +*/ +HRESULT WINAPI IEnumIDListImpl::Clone(LPENUMIDLIST *ppenum) +{ + TRACE("(%p)->() to (%p)->() E_NOTIMPL\n", this, ppenum); + return E_NOTIMPL; +} + +/************************************************************************** + * IEnumIDList_Folder_Constructor + * + */ +HRESULT IEnumIDList_Constructor(IEnumIDList **enumerator) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + if (enumerator == NULL) + return E_POINTER; + *enumerator = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + *enumerator = result.Detach (); + return S_OK; +} diff --git a/dll/win32/shell32_new/enumidlist.h b/dll/win32/shell32_new/enumidlist.h new file mode 100644 index 00000000000..b68265acd29 --- /dev/null +++ b/dll/win32/shell32_new/enumidlist.h @@ -0,0 +1,54 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#ifndef __ENUMIDLIST_H__ +#define __ENUMIDLIST_H__ + +#include "shlobj.h" + +struct ENUMLIST +{ + ENUMLIST *pNext; + LPITEMIDLIST pidl; +}; + +class IEnumIDListImpl : + public CComObjectRootEx, + public IEnumIDList +{ +private: + ENUMLIST *mpFirst; + ENUMLIST *mpLast; + ENUMLIST *mpCurrent; +public: + IEnumIDListImpl(); + ~IEnumIDListImpl(); + BOOL AddToEnumList(LPITEMIDLIST pidl); + BOOL DeleteList(); + BOOL HasItemWithCLSID(LPITEMIDLIST pidl); + BOOL CreateFolderEnumList(LPCWSTR lpszPath, DWORD dwFlags); + + // *** IEnumIDList methods *** + virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched); + virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt); + virtual HRESULT STDMETHODCALLTYPE Reset(); + virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum); + +BEGIN_COM_MAP(IEnumIDListImpl) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +#endif /* ndef __ENUMIDLIST_H__ */ diff --git a/dll/win32/shell32_new/extracticon.cpp b/dll/win32/shell32_new/extracticon.cpp new file mode 100644 index 00000000000..7f2daa09686 --- /dev/null +++ b/dll/win32/shell32_new/extracticon.cpp @@ -0,0 +1,362 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Registry namespace extension + * FILE: dll/win32/shell32/extracticon.c + * PURPOSE: Icon extraction + * + * PROGRAMMERS: Herv Poussineau (hpoussin@reactos.org) + */ + +#include +#include +#include +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +struct IconLocation +{ + LPWSTR file; + UINT index; +}; + +class IconExtraction : + public CComObjectRootEx, + public IDefaultExtractIconInit, + public IExtractIconW, + public IExtractIconA, + public IPersistFile +{ +private: + UINT flags; + struct IconLocation defaultIcon; + struct IconLocation normalIcon; + struct IconLocation openIcon; + struct IconLocation shortcutIcon; +public: + IconExtraction(); + ~IconExtraction(); + + // IDefaultExtractIconInit + virtual HRESULT STDMETHODCALLTYPE SetDefaultIcon(LPCWSTR pszFile, int iIcon); + virtual HRESULT STDMETHODCALLTYPE SetFlags(UINT uFlags); + virtual HRESULT STDMETHODCALLTYPE SetKey(HKEY hkey); + virtual HRESULT STDMETHODCALLTYPE SetNormalIcon(LPCWSTR pszFile, int iIcon); + virtual HRESULT STDMETHODCALLTYPE SetOpenIcon(LPCWSTR pszFile, int iIcon); + virtual HRESULT STDMETHODCALLTYPE SetShortcutIcon(LPCWSTR pszFile, int iIcon); + + // IExtractIconW + virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); + virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + + // IExtractIconA + virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); + virtual HRESULT STDMETHODCALLTYPE Extract(LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + + // IPersist + virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + virtual HRESULT STDMETHODCALLTYPE IsDirty(); + + // IPersistFile + virtual HRESULT STDMETHODCALLTYPE Load(LPCOLESTR pszFileName, DWORD dwMode); + virtual HRESULT STDMETHODCALLTYPE Save(LPCOLESTR pszFileName, BOOL fRemember); + virtual HRESULT STDMETHODCALLTYPE SaveCompleted(LPCOLESTR pszFileName); + virtual HRESULT STDMETHODCALLTYPE GetCurFile(LPOLESTR *ppszFileName); + +BEGIN_COM_MAP(IconExtraction) + COM_INTERFACE_ENTRY_IID(IID_IDefaultExtractIconInit, IDefaultExtractIconInit) + COM_INTERFACE_ENTRY_IID(IID_IExtractIconW, IExtractIconW) + COM_INTERFACE_ENTRY_IID(IID_IExtractIconA, IExtractIconA) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_IPersistFile, IPersistFile) +END_COM_MAP() +}; + +VOID DuplicateString( + LPCWSTR Source, + LPWSTR *Destination) +{ + SIZE_T cb; + + if (*Destination) + CoTaskMemFree(*Destination); + + cb = (wcslen(Source) + 1) * sizeof(WCHAR); + *Destination = (LPWSTR)CoTaskMemAlloc(cb); + if (!*Destination) + return; + CopyMemory(*Destination, Source, cb); +} + +IconExtraction::IconExtraction() +{ + flags = 0; + memset(&defaultIcon, 0, sizeof(defaultIcon)); + memset(&normalIcon, 0, sizeof(normalIcon)); + memset(&openIcon, 0, sizeof(openIcon)); + memset(&shortcutIcon, 0, sizeof(shortcutIcon)); +} + +IconExtraction::~IconExtraction() +{ + if (defaultIcon.file) CoTaskMemFree(defaultIcon.file); + if (normalIcon.file) CoTaskMemFree(normalIcon.file); + if (openIcon.file) CoTaskMemFree(openIcon.file); + if (shortcutIcon.file) CoTaskMemFree(shortcutIcon.file); +} + +HRESULT STDMETHODCALLTYPE IconExtraction::SetDefaultIcon( + LPCWSTR pszFile, + int iIcon) +{ + TRACE("(%p, %s, %d)\n", this, debugstr_w(pszFile), iIcon); + + DuplicateString(pszFile, &defaultIcon.file); + if (!defaultIcon.file) + return E_OUTOFMEMORY; + defaultIcon.index = iIcon; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::SetFlags( + UINT uFlags) +{ + TRACE("(%p, 0x%x)\n", this, uFlags); + + flags = uFlags; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::SetKey( + HKEY hkey) +{ + FIXME("(%p, %p)\n", this, hkey); + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::SetNormalIcon( + LPCWSTR pszFile, + int iIcon) +{ + TRACE("(%p, %s, %d)\n", this, debugstr_w(pszFile), iIcon); + + DuplicateString(pszFile, &normalIcon.file); + if (!normalIcon.file) + return E_OUTOFMEMORY; + normalIcon.index = iIcon; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::SetOpenIcon( + LPCWSTR pszFile, + int iIcon) +{ + TRACE("(%p, %s, %d)\n", this, debugstr_w(pszFile), iIcon); + + DuplicateString(pszFile, &openIcon.file); + if (!openIcon.file) + return E_OUTOFMEMORY; + openIcon.index = iIcon; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::SetShortcutIcon( + LPCWSTR pszFile, + int iIcon) +{ + TRACE("(%p, %s, %d)\n", this, debugstr_w(pszFile), iIcon); + + DuplicateString(pszFile, &shortcutIcon.file); + if (!shortcutIcon.file) + return E_OUTOFMEMORY; + shortcutIcon.index = iIcon; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::GetIconLocation( + UINT uFlags, + LPWSTR szIconFile, + UINT cchMax, + int *piIndex, + UINT *pwFlags) +{ + const struct IconLocation *icon = NULL; + SIZE_T cb; + + TRACE("(%p, 0x%x, %s, 0x%x, %p, %p)\n", this, uFlags, debugstr_w(szIconFile), cchMax, piIndex, pwFlags); + + if (!piIndex || !pwFlags) + return E_POINTER; + + if (uFlags & GIL_DEFAULTICON) + icon = defaultIcon.file ? &defaultIcon : &normalIcon; + else if (uFlags & GIL_FORSHORTCUT) + icon = shortcutIcon.file ? &shortcutIcon : &normalIcon; + else if (uFlags & GIL_OPENICON) + icon = openIcon.file ? &openIcon : &normalIcon; + else + icon = &normalIcon; + + if (!icon->file) + return E_FAIL; + + cb = wcslen(icon->file) + 1; + if (cchMax < (UINT)cb) + return E_FAIL; + CopyMemory(szIconFile, icon->file, cb * sizeof(WCHAR)); + *piIndex = icon->index; + *pwFlags = flags; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::Extract( + LPCWSTR pszFile, + UINT nIconIndex, + HICON *phiconLarge, + HICON *phiconSmall, + UINT nIconSize) +{ + TRACE("(%p, %s, %u, %p, %p, %u)\n", this, debugstr_w(pszFile), nIconIndex, phiconLarge, phiconSmall, nIconSize); + + /* Nothing to do, ExtractIconW::GetIconLocation should be enough */ + return S_FALSE; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::GetIconLocation( + UINT uFlags, + LPSTR szIconFile, + UINT cchMax, + int *piIndex, + UINT *pwFlags) +{ + LPWSTR szIconFileW = NULL; + HRESULT hr; + + if (cchMax > 0) + { + szIconFileW = (LPWSTR)CoTaskMemAlloc(cchMax * sizeof(WCHAR)); + if (!szIconFileW) + return E_OUTOFMEMORY; + } + + hr = GetIconLocation( + uFlags, szIconFileW, cchMax, piIndex, pwFlags); + if (SUCCEEDED(hr) && cchMax > 0) + if (0 == WideCharToMultiByte(CP_ACP, 0, szIconFileW, cchMax, szIconFile, cchMax, NULL, NULL)) + hr = E_FAIL; + + if (szIconFileW) + CoTaskMemFree(szIconFileW); + return hr; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::Extract( + LPCSTR pszFile, + UINT nIconIndex, + HICON *phiconLarge, + HICON *phiconSmall, + UINT nIconSize) +{ + LPWSTR pszFileW = NULL; + int nLength; + HRESULT hr; + + if (pszFile) + { + nLength = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0); + if (nLength == 0) + return E_FAIL; + pszFileW = (LPWSTR)CoTaskMemAlloc(nLength * sizeof(WCHAR)); + if (!pszFileW) + return E_OUTOFMEMORY; + if (!MultiByteToWideChar(CP_ACP, 0, pszFile, nLength, pszFileW, nLength)) + { + CoTaskMemFree(pszFileW); + return E_FAIL; + } + } + + hr = Extract( + pszFileW, nIconIndex, phiconLarge, phiconSmall, nIconSize); + + if (pszFileW) + CoTaskMemFree(pszFileW); + return hr; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::GetClassID( + CLSID *pClassID) +{ + TRACE("(%p, %p)\n", this, pClassID); + + if (!pClassID) + return E_POINTER; + + *pClassID = GUID_NULL; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::IsDirty() +{ + FIXME("(%p)\n", this); + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::Load( + LPCOLESTR pszFileName, + DWORD dwMode) +{ + FIXME("(%p, %s, %u)\n", this, debugstr_w(pszFileName), dwMode); + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::Save( + LPCOLESTR pszFileName, + BOOL fRemember) +{ + FIXME("(%p, %s, %d)\n", this, debugstr_w(pszFileName), fRemember); + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::SaveCompleted( + LPCOLESTR pszFileName) +{ + FIXME("(%p, %s)\n", this, debugstr_w(pszFileName)); + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE IconExtraction::GetCurFile( + LPOLESTR *ppszFileName) +{ + FIXME("(%p, %p)\n", this, ppszFileName); + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI SHCreateDefaultExtractIcon(REFIID riid, void **ppv) +{ + CComObject *theExtractor; + CComPtr result; + HRESULT hResult; + + if (ppv == NULL) + return E_POINTER; + *ppv = NULL; + ATLTRY (theExtractor = new CComObject); + if (theExtractor == NULL) + return E_OUTOFMEMORY; + hResult = theExtractor->QueryInterface (riid, (void **)&result); + if (FAILED (hResult)) + { + delete theExtractor; + return hResult; + } + *ppv = result.Detach (); + return S_OK; +} diff --git a/dll/win32/shell32_new/folder_options.cpp b/dll/win32/shell32_new/folder_options.cpp new file mode 100644 index 00000000000..b5d2ad47aa0 --- /dev/null +++ b/dll/win32/shell32_new/folder_options.cpp @@ -0,0 +1,817 @@ +/* + * Open With Context Menu extension + * + * Copyright 2007 Johannes Anderwald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + + +WINE_DEFAULT_DEBUG_CHANNEL (fprop); +#define MAX_PROPERTY_SHEET_PAGE (32) + +/// Folder Options: +/// CLASSKEY = HKEY_CLASSES_ROOT\CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF} +/// DefaultIcon = %SystemRoot%\system32\SHELL32.dll,-210 +/// Verbs: Open / RunAs +/// Cmd: rundll32.exe shell32.dll,Options_RunDLL 0 + +/// ShellFolder Attributes: 0x0 + +typedef struct +{ + DWORD cFiles; + DWORD cFolder; + LARGE_INTEGER bSize; + HWND hwndDlg; + WCHAR szFolderPath[MAX_PATH]; +}FOLDER_PROPERTIES_CONTEXT, *PFOLDER_PROPERTIES_CONTEXT; + +typedef struct +{ + WCHAR FileExtension[30]; + WCHAR FileDescription[100]; + WCHAR ClassKey[MAX_PATH]; +}FOLDER_FILE_TYPE_ENTRY, *PFOLDER_FILE_TYPE_ENTRY; + +typedef struct +{ + LPCWSTR szKeyName; + UINT ResourceID; +}FOLDER_VIEW_ENTRY, PFOLDER_VIEW_ENTRY; +/* +static FOLDER_VIEW_ENTRY s_Options[] = +{ + { L"AlwaysShowMenus", IDS_ALWAYSSHOWMENUS }, + { L"AutoCheckSelect", -1 }, + { L"ClassicViewState", -1 }, + { L"DontPrettyPath", -1 }, + { L"Filter", -1 }, + { L"FolderContentsInfoTip", IDS_FOLDERCONTENTSTIP }, + { L"FriendlyTree", -1 }, + { L"Hidden", -1, }, + { L"HideFileExt", IDS_HIDEFILEEXT }, + { L"HideIcons", -1}, + { L"IconsOnly", -1}, + { L"ListviewAlphaSelect", -1}, + { L"ListviewShadow", -1}, + { L"ListviewWatermark", -1}, + { L"MapNetDrvBtn", -1}, + { L"PersistBrowsers", -1}, + { L"SeperateProcess", IDS_SEPERATEPROCESS}, + { L"ServerAdminUI", -1}, + { L"SharingWizardOn", IDS_USESHAREWIZARD}, + { L"ShowCompColor", IDS_COMPCOLOR}, + { L"ShowInfoTip", IDS_SHOWINFOTIP}, + { L"ShowPreviewHandlers", -1}, + { L"ShowSuperHidden", IDS_HIDEOSFILES}, + { L"ShowTypeOverlay", -1}, + { L"Start_ShowMyGames", -1}, + { L"StartMenuInit", -1}, + { L"SuperHidden", -1}, + { L"TypeAhead", -1}, + { L"Webview", -1}, + { NULL, -1} + +}; +*/ + +EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj); + +INT_PTR +CALLBACK +FolderOptionsGeneralDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + + + + return FALSE; +} + +static +VOID +InitializeFolderOptionsListCtrl(HWND hwndDlg) +{ + RECT clientRect; + LVCOLUMNW col; + WCHAR szName[50]; + HWND hDlgCtrl; + + hDlgCtrl = GetDlgItem(hwndDlg, 14003); + + if (!LoadStringW(shell32_hInstance, IDS_COLUMN_EXTENSION, szName, sizeof(szName) / sizeof(WCHAR))) + szName[0] = 0; + szName[(sizeof(szName)/sizeof(WCHAR))-1] = 0; + + GetClientRect(hDlgCtrl, &clientRect); + ZeroMemory(&col, sizeof(LV_COLUMN)); + col.mask = LVCF_SUBITEM | LVCF_WIDTH | LVCF_FMT; + col.iSubItem = 0; + col.pszText = szName; + col.fmt = LVCFMT_LEFT; + col.cx = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL); + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMN, 0, (LPARAM)&col); + + + +} + + +INT_PTR +CALLBACK +FolderOptionsViewDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + switch(uMsg) + { + case WM_INITDIALOG: + InitializeFolderOptionsListCtrl(hwndDlg); + return TRUE; + } + + return FALSE; + +} + +VOID +InitializeFileTypesListCtrlColumns(HWND hDlgCtrl) +{ + RECT clientRect; + LVCOLUMNW col; + WCHAR szName[50]; + DWORD dwStyle; + int columnSize = 140; + + + if (!LoadStringW(shell32_hInstance, IDS_COLUMN_EXTENSION, szName, sizeof(szName) / sizeof(WCHAR))) + { + /* default to english */ + wcscpy(szName, L"Extensions"); + } + + /* make sure its null terminated */ + szName[(sizeof(szName)/sizeof(WCHAR))-1] = 0; + + GetClientRect(hDlgCtrl, &clientRect); + ZeroMemory(&col, sizeof(LV_COLUMN)); + columnSize = 140; //FIXME + col.iSubItem = 0; + col.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT; + col.fmt = LVCFMT_FIXED_WIDTH; + col.cx = columnSize | LVCFMT_LEFT; + col.cchTextMax = wcslen(szName); + col.pszText = szName; + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&col); + + if (!LoadStringW(shell32_hInstance, IDS_FILE_TYPES, szName, sizeof(szName) / sizeof(WCHAR))) + { + /* default to english */ + wcscpy(szName, L"FileTypes"); + } + + col.iSubItem = 1; + col.cx = clientRect.right - clientRect.left - columnSize; + col.cchTextMax = wcslen(szName); + col.pszText = szName; + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 1, (LPARAM)&col); + + /* set full select style */ + dwStyle = (DWORD) SendMessage(hDlgCtrl, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); + dwStyle = dwStyle | LVS_EX_FULLROWSELECT; + SendMessage(hDlgCtrl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); +} + +INT +FindItem(HWND hDlgCtrl, WCHAR * ItemName) +{ + LVFINDINFOW findInfo; + ZeroMemory(&findInfo, sizeof(LVFINDINFOW)); + + findInfo.flags = LVFI_STRING; + findInfo.psz = ItemName; + return ListView_FindItem(hDlgCtrl, 0, &findInfo); +} + +VOID +InsertFileType(HWND hDlgCtrl, WCHAR * szName, PINT iItem, WCHAR * szFile) +{ + PFOLDER_FILE_TYPE_ENTRY Entry; + HKEY hKey; + LVITEMW lvItem; + DWORD dwSize; + + if (szName[0] != L'.') + { + /* FIXME handle URL protocol handlers */ + return; + } + + /* allocate file type entry */ + Entry = (PFOLDER_FILE_TYPE_ENTRY)HeapAlloc(GetProcessHeap(), 0, sizeof(FOLDER_FILE_TYPE_ENTRY)); + + if (!Entry) + return; + + /* open key */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szName, 0, KEY_READ, &hKey) != ERROR_SUCCESS) + return; + + /* FIXME check for duplicates */ + + /* query for the default key */ + dwSize = sizeof(Entry->ClassKey); + if (RegQueryValueExW(hKey, NULL, NULL, NULL, (LPBYTE)Entry->ClassKey, &dwSize) != ERROR_SUCCESS) + { + /* no link available */ + Entry->ClassKey[0] = 0; + } + + if (Entry->ClassKey[0]) + { + HKEY hTemp; + /* try open linked key */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, Entry->ClassKey, 0, KEY_READ, &hTemp) == ERROR_SUCCESS) + { + /* use linked key */ + RegCloseKey(hKey); + hKey = hTemp; + } + } + + /* read friendly type name */ + if (RegLoadMUIStringW(hKey, L"FriendlyTypeName", Entry->FileDescription, sizeof(Entry->FileDescription), NULL, 0, NULL) != ERROR_SUCCESS) + { + /* read file description */ + dwSize = sizeof(Entry->FileDescription); + Entry->FileDescription[0] = 0; + + /* read default key */ + RegQueryValueExW(hKey, NULL, NULL, NULL, (LPBYTE)Entry->FileDescription, &dwSize); + } + + /* close key */ + RegCloseKey(hKey); + + /* convert extension to upper case */ + wcscpy(Entry->FileExtension, szName); + _wcsupr(Entry->FileExtension); + + if (!Entry->FileDescription[0]) + { + /* construct default 'FileExtensionFile' */ + wcscpy(Entry->FileDescription, &Entry->FileExtension[1]); + wcscat(Entry->FileDescription, L" "); + wcscat(Entry->FileDescription, szFile); + } + + ZeroMemory(&lvItem, sizeof(LVITEMW)); + lvItem.mask = LVIF_TEXT | LVIF_PARAM; + lvItem.iSubItem = 0; + lvItem.pszText = &Entry->FileExtension[1]; + lvItem.iItem = *iItem; + lvItem.lParam = (LPARAM)Entry; + (void)SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&lvItem); + + ZeroMemory(&lvItem, sizeof(LVITEMW)); + lvItem.mask = LVIF_TEXT; + lvItem.pszText = Entry->FileDescription; + lvItem.iItem = *iItem; + lvItem.iSubItem = 1; + + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&lvItem); + (*iItem)++; +} + +int +CALLBACK +ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) +{ + PFOLDER_FILE_TYPE_ENTRY Entry1, Entry2; + + Entry1 = (PFOLDER_FILE_TYPE_ENTRY)lParam1; + Entry2 = (PFOLDER_FILE_TYPE_ENTRY)lParam2; + + return wcsicmp(Entry1->FileExtension, Entry2->FileExtension); +} + +BOOL +InitializeFileTypesListCtrl(HWND hwndDlg) +{ + HWND hDlgCtrl; + DWORD dwIndex = 0; + WCHAR szName[50]; + WCHAR szFile[100]; + DWORD dwName; + LVITEMW lvItem; + INT iItem = 0; + + hDlgCtrl = GetDlgItem(hwndDlg, 14000); + InitializeFileTypesListCtrlColumns(hDlgCtrl); + + szFile[0] = 0; + if (!LoadStringW(shell32_hInstance, IDS_SHV_COLUMN1, szFile, sizeof(szFile) / sizeof(WCHAR))) + { + /* default to english */ + wcscpy(szFile, L"File"); + } + szFile[(sizeof(szFile)/sizeof(WCHAR))-1] = 0; + + dwName = sizeof(szName) / sizeof(WCHAR); + + while(RegEnumKeyExW(HKEY_CLASSES_ROOT, dwIndex++, szName, &dwName, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + { + InsertFileType(hDlgCtrl, szName, &iItem, szFile); + dwName = sizeof(szName) / sizeof(WCHAR); + } + + /* sort list */ + ListView_SortItems(hDlgCtrl, ListViewCompareProc, NULL); + + /* select first item */ + ZeroMemory(&lvItem, sizeof(LVITEMW)); + lvItem.mask = LVIF_STATE; + lvItem.stateMask = (UINT)-1; + lvItem.state = LVIS_FOCUSED|LVIS_SELECTED; + lvItem.iItem = 0; + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&lvItem); + + return TRUE; +} + +PFOLDER_FILE_TYPE_ENTRY +FindSelectedItem( + HWND hDlgCtrl) +{ + UINT Count, Index; + LVITEMW lvItem; + + Count = ListView_GetItemCount(hDlgCtrl); + + for (Index = 0; Index < Count; Index++) + { + ZeroMemory(&lvItem, sizeof(LVITEM)); + lvItem.mask = LVIF_PARAM | LVIF_STATE; + lvItem.iItem = Index; + lvItem.stateMask = (UINT)-1; + + if (ListView_GetItem(hDlgCtrl, &lvItem)) + { + if (lvItem.state & LVIS_SELECTED) + return (PFOLDER_FILE_TYPE_ENTRY)lvItem.lParam; + } + } + + return NULL; +} + +INT_PTR +CALLBACK +FolderOptionsFileTypesDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + LPNMLISTVIEW lppl; + LVITEMW lvItem; + WCHAR Buffer[200], FormatBuffer[100]; + PFOLDER_FILE_TYPE_ENTRY pItem; + OPENASINFO Info; + + switch(uMsg) + { + case WM_INITDIALOG: + InitializeFileTypesListCtrl(hwndDlg); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case 14006: + pItem = FindSelectedItem(GetDlgItem(hwndDlg, 14000)); + if (pItem) + { + Info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT; + Info.pcszClass = pItem->FileExtension; + SHOpenWithDialog(hwndDlg, &Info); + } + break; + } + + break; + case WM_NOTIFY: + lppl = (LPNMLISTVIEW) lParam; + + if (lppl->hdr.code == LVN_ITEMCHANGING) + { + ZeroMemory(&lvItem, sizeof(LVITEM)); + lvItem.mask = LVIF_PARAM; + lvItem.iItem = lppl->iItem; + if (!SendMessageW(lppl->hdr.hwndFrom, LVM_GETITEMW, 0, (LPARAM)&lvItem)) + return TRUE; + + pItem = (PFOLDER_FILE_TYPE_ENTRY)lvItem.lParam; + if (!pItem) + return TRUE; + + if (!(lppl->uOldState & LVIS_FOCUSED) && (lppl->uNewState & LVIS_FOCUSED)) + { + /* new focused item */ + if (!LoadStringW(shell32_hInstance, IDS_FILE_DETAILS, FormatBuffer, sizeof(FormatBuffer) / sizeof(WCHAR))) + { + /* use default english format string */ + wcscpy(FormatBuffer, L"Details for '%s' extension"); + } + + /* format buffer */ + swprintf(Buffer, FormatBuffer, &pItem->FileExtension[1]); + /* update dialog */ + SendDlgItemMessageW(hwndDlg, 14003, WM_SETTEXT, 0, (LPARAM)Buffer); + } + } + break; + } + + return FALSE; +} + + +VOID +ShowFolderOptionsDialog(HWND hWnd, HINSTANCE hInst) +{ + PROPSHEETHEADERW pinfo; + HPROPSHEETPAGE hppages[3]; + HPROPSHEETPAGE hpage; + UINT num_pages = 0; + WCHAR szOptions[100]; + + hpage = SH_CreatePropertySheetPage("FOLDER_OPTIONS_GENERAL_DLG", FolderOptionsGeneralDlg, 0, NULL); + if (hpage) + hppages[num_pages++] = hpage; + + hpage = SH_CreatePropertySheetPage("FOLDER_OPTIONS_VIEW_DLG", FolderOptionsViewDlg, 0, NULL); + if (hpage) + hppages[num_pages++] = hpage; + + hpage = SH_CreatePropertySheetPage("FOLDER_OPTIONS_FILETYPES_DLG", FolderOptionsFileTypesDlg, 0, NULL); + if (hpage) + hppages[num_pages++] = hpage; + + szOptions[0] = L'\0'; + LoadStringW(shell32_hInstance, IDS_FOLDER_OPTIONS, szOptions, sizeof(szOptions) / sizeof(WCHAR)); + szOptions[(sizeof(szOptions)/sizeof(WCHAR))-1] = L'\0'; + + memset(&pinfo, 0x0, sizeof(PROPSHEETHEADERW)); + pinfo.dwSize = sizeof(PROPSHEETHEADERW); + pinfo.dwFlags = PSH_NOCONTEXTHELP; + pinfo.nPages = num_pages; + pinfo.phpage = hppages; + pinfo.pszCaption = szOptions; + + PropertySheetW(&pinfo); +} + +VOID +Options_RunDLLCommon(HWND hWnd, HINSTANCE hInst, int fOptions, DWORD nCmdShow) +{ + switch(fOptions) + { + case 0: + ShowFolderOptionsDialog(hWnd, hInst); + break; + case 1: + // show taskbar options dialog + FIXME("notify explorer to show taskbar options dialog"); + //PostMessage(GetShellWindow(), WM_USER+22, fOptions, 0); + break; + default: + FIXME("unrecognized options id %d\n", fOptions); + } +} + +/************************************************************************* + * Options_RunDLL (SHELL32.@) + */ +EXTERN_C VOID WINAPI Options_RunDLL(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) +{ + Options_RunDLLCommon(hWnd, hInst, StrToIntA(cmd), nCmdShow); +} + +/************************************************************************* + * Options_RunDLLA (SHELL32.@) + */ +EXTERN_C VOID WINAPI Options_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) +{ + Options_RunDLLCommon(hWnd, hInst, StrToIntA(cmd), nCmdShow); +} + +/************************************************************************* + * Options_RunDLLW (SHELL32.@) + */ +EXTERN_C VOID WINAPI Options_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow) +{ + Options_RunDLLCommon(hWnd, hInst, StrToIntW(cmd), nCmdShow); +} + +static +DWORD WINAPI +CountFolderAndFiles(LPVOID lParam) +{ + WIN32_FIND_DATAW FindData; + HANDLE hFile; + UINT Length; + LPWSTR pOffset; + BOOL ret; + PFOLDER_PROPERTIES_CONTEXT pContext = (PFOLDER_PROPERTIES_CONTEXT) lParam; + + pOffset = PathAddBackslashW(pContext->szFolderPath); + if (!pOffset) + return 0; + + Length = pOffset - pContext->szFolderPath; + + wcscpy(pOffset, L"*.*"); + hFile = FindFirstFileW(pContext->szFolderPath, &FindData); + if (hFile == INVALID_HANDLE_VALUE) + return 0; + + do + { + ret = FindNextFileW(hFile, &FindData); + if (ret) + { + if (FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + if (FindData.cFileName[0] == L'.' && FindData.cFileName[1] == L'.' && + FindData.cFileName[2] == L'\0') + continue; + + pContext->cFolder++; + wcscpy(pOffset, FindData.cFileName); + CountFolderAndFiles((LPVOID)pContext); + pOffset[0] = L'\0'; + } + else + { + pContext->cFiles++; + pContext->bSize.u.LowPart += FindData.nFileSizeLow; + pContext->bSize.u.HighPart += FindData.nFileSizeHigh; + } + } + else if (GetLastError() == ERROR_NO_MORE_FILES) + { + break; + } + }while(1); + + FindClose(hFile); + return 1; +} + +static +VOID +InitializeFolderGeneralDlg(PFOLDER_PROPERTIES_CONTEXT pContext) +{ + LPWSTR pFolderName; + WIN32_FILE_ATTRIBUTE_DATA FolderAttribute; + FILETIME ft; + SYSTEMTIME dt; + WCHAR szBuffer[MAX_PATH+5]; + WCHAR szFormat[30] = {0}; + + static const WCHAR wFormat[] = {'%','0','2','d','/','%','0','2','d','/','%','0','4','d',' ',' ','%','0','2','d',':','%','0','2','u',0}; + + pFolderName = wcsrchr(pContext->szFolderPath, L'\\'); + if (!pFolderName) + return; + + /* set folder name */ + SendDlgItemMessageW(pContext->hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM) (pFolderName + 1)); + /* set folder location */ + pFolderName[0] = L'\0'; + if (wcslen(pContext->szFolderPath) == 2) + { + /* folder is located at root */ + WCHAR szDrive[4] = {L'C',L':',L'\\',L'\0'}; + szDrive[0] = pContext->szFolderPath[0]; + SendDlgItemMessageW(pContext->hwndDlg, 14007, WM_SETTEXT, 0, (LPARAM) szDrive); + } + else + { + SendDlgItemMessageW(pContext->hwndDlg, 14007, WM_SETTEXT, 0, (LPARAM) pContext->szFolderPath); + } + pFolderName[0] = L'\\'; + /* get folder properties */ + if (GetFileAttributesExW(pContext->szFolderPath, GetFileExInfoStandard, (LPVOID)&FolderAttribute)) + { + if (FolderAttribute.dwFileAttributes & FILE_ATTRIBUTE_READONLY) + { + /* check readonly button */ + SendDlgItemMessage(pContext->hwndDlg, 14021, BM_SETCHECK, BST_CHECKED, 0); + } + + if (FolderAttribute.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) + { + /* check hidden button */ + SendDlgItemMessage(pContext->hwndDlg, 14022, BM_SETCHECK, BST_CHECKED, 0); + } + + if (FileTimeToLocalFileTime(&FolderAttribute.ftCreationTime, &ft)) + { + FileTimeToSystemTime(&ft, &dt); + swprintf (szBuffer, wFormat, dt.wDay, dt.wMonth, dt.wYear, dt.wHour, dt.wMinute); + SendDlgItemMessageW(pContext->hwndDlg, 14015, WM_SETTEXT, 0, (LPARAM) szBuffer); + } + } + /* now enumerate enumerate contents */ + wcscpy(szBuffer, pContext->szFolderPath); + CountFolderAndFiles((LPVOID)pContext); + wcscpy(pContext->szFolderPath, szBuffer); + /* set folder details */ + LoadStringW(shell32_hInstance, IDS_FILE_FOLDER, szFormat, sizeof(szFormat)/sizeof(WCHAR)); + szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0'; + swprintf(szBuffer, szFormat, pContext->cFiles, pContext->cFolder); + SendDlgItemMessageW(pContext->hwndDlg, 14011, WM_SETTEXT, 0, (LPARAM) szBuffer); + + if (StrFormatByteSizeW(pContext->bSize.QuadPart, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + /* store folder size */ + SendDlgItemMessageW(pContext->hwndDlg, 14009, WM_SETTEXT, 0, (LPARAM) szBuffer); + } +} + + +INT_PTR +CALLBACK +FolderPropertiesGeneralDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + LPPROPSHEETPAGEW ppsp; + PFOLDER_PROPERTIES_CONTEXT pContext; + HICON hIcon; + WIN32_FILE_ATTRIBUTE_DATA FolderAttribute; + LONG res; + LPPSHNOTIFY lppsn; + DWORD Attribute; + + switch(uMsg) + { + case WM_INITDIALOG: + ppsp = (LPPROPSHEETPAGEW)lParam; + if (ppsp == NULL) + break; + hIcon = LoadIconW(shell32_hInstance, MAKEINTRESOURCEW(IDI_SHELL_FOLDER_OPEN)); + if (hIcon) + SendDlgItemMessageW(hwndDlg, 14000, STM_SETICON, (WPARAM)hIcon, 0); + + pContext = (FOLDER_PROPERTIES_CONTEXT *)SHAlloc(sizeof(FOLDER_PROPERTIES_CONTEXT)); + if (pContext) + { + ZeroMemory(pContext, sizeof(FOLDER_PROPERTIES_CONTEXT)); + pContext->hwndDlg = hwndDlg; + wcscpy(pContext->szFolderPath, (LPWSTR)ppsp->lParam); + SetWindowLongPtr(hwndDlg, DWL_USER, (LONG_PTR)pContext); + InitializeFolderGeneralDlg(pContext); + } + return TRUE; + case WM_COMMAND: + if (HIWORD(wParam) == BN_CLICKED) + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; + case WM_DESTROY: + pContext = (PFOLDER_PROPERTIES_CONTEXT)GetWindowLongPtr(hwndDlg, DWL_USER); + SHFree((LPVOID)pContext); + break; + case WM_NOTIFY: + pContext = (PFOLDER_PROPERTIES_CONTEXT)GetWindowLongPtr(hwndDlg, DWL_USER); + lppsn = (LPPSHNOTIFY) lParam; + if (lppsn->hdr.code == PSN_APPLY) + { + if (GetFileAttributesExW(pContext->szFolderPath, GetFileExInfoStandard, (LPVOID)&FolderAttribute)) + { + res = SendDlgItemMessageW(hwndDlg, 14021, BM_GETCHECK, 0, 0); + if (res == BST_CHECKED) + FolderAttribute.dwFileAttributes |= FILE_ATTRIBUTE_READONLY; + else + FolderAttribute.dwFileAttributes &= (~FILE_ATTRIBUTE_READONLY); + + res = SendDlgItemMessageW(hwndDlg, 14022, BM_GETCHECK, 0, 0); + if (res == BST_CHECKED) + FolderAttribute.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN; + else + FolderAttribute.dwFileAttributes &= (~FILE_ATTRIBUTE_HIDDEN); + + Attribute = FolderAttribute.dwFileAttributes & +(FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY); + + SetFileAttributesW(pContext->szFolderPath, Attribute); + } + SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR ); + return TRUE; + } + break; + } + return FALSE; +} + +static +BOOL +CALLBACK +FolderAddPropSheetPageProc(HPROPSHEETPAGE hpage, LPARAM lParam) +{ + PROPSHEETHEADERW *ppsh = (PROPSHEETHEADERW *)lParam; + if (ppsh != NULL && ppsh->nPages < MAX_PROPERTY_SHEET_PAGE) + { + ppsh->phpage[ppsh->nPages++] = hpage; + return TRUE; + } + return FALSE; +} + +BOOL +SH_ShowFolderProperties(LPWSTR pwszFolder, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl) +{ + HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; + HPROPSHEETPAGE hpage; + PROPSHEETHEADERW psh; + BOOL ret; + WCHAR szName[MAX_PATH] = {0}; + HPSXA hpsx = NULL; + LPWSTR pFolderName; + CComPtr pDataObj; + + if (!PathIsDirectoryW(pwszFolder)) + return FALSE; + + pFolderName = wcsrchr(pwszFolder, L'\\'); + if (!pFolderName) + return FALSE; + + wcscpy(szName, pFolderName + 1); + + hpage = SH_CreatePropertySheetPage("SHELL_FOLDER_GENERAL_DLG", FolderPropertiesGeneralDlg, (LPARAM)pwszFolder, NULL); + if (!hpage) + return FALSE; + + ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); + hppages[psh.nPages] = hpage; + psh.nPages++; + psh.dwSize = sizeof(PROPSHEETHEADERW); + psh.dwFlags = PSH_PROPTITLE; + psh.hwndParent = NULL; + psh.phpage = hppages; + psh.pszCaption = szName; + + + if (SHCreateDataObject(pidlFolder, 1, apidl, NULL, IID_IDataObject, (void**)&pDataObj) == S_OK) + { + hpsx = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, L"Directory", MAX_PROPERTY_SHEET_PAGE-1, pDataObj); + if (hpsx) + { + SHAddFromPropSheetExtArray(hpsx, + (LPFNADDPROPSHEETPAGE)FolderAddPropSheetPageProc, + (LPARAM)&psh); + } + } + + ret = PropertySheetW(&psh); + + if (hpsx) + SHDestroyPropSheetExtArray(hpsx); + + if (ret < 0) + return FALSE; + else + return TRUE; +} + + diff --git a/dll/win32/shell32_new/folders.cpp b/dll/win32/shell32_new/folders.cpp new file mode 100644 index 00000000000..3783fe7c505 --- /dev/null +++ b/dll/win32/shell32_new/folders.cpp @@ -0,0 +1,380 @@ +/* + * Copyright 1997 Marcus Meissner + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +WCHAR swShell32Name[MAX_PATH]; + +DWORD NumIconOverlayHandlers = 0; +IShellIconOverlayIdentifier ** Handlers = NULL; + +static HRESULT getIconLocationForFolder(LPCITEMIDLIST pidl, UINT uFlags, + LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) +{ + int icon_idx; + WCHAR wszPath[MAX_PATH]; + WCHAR wszCLSIDValue[CHARS_IN_GUID]; + static const WCHAR shellClassInfo[] = { '.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0 }; + static const WCHAR iconFile[] = { 'I','c','o','n','F','i','l','e',0 }; + static const WCHAR clsid[] = { 'C','L','S','I','D',0 }; + static const WCHAR clsid2[] = { 'C','L','S','I','D','2',0 }; + static const WCHAR iconIndex[] = { 'I','c','o','n','I','n','d','e','x',0 }; + + if (SHELL32_GetCustomFolderAttribute(pidl, shellClassInfo, iconFile, + wszPath, MAX_PATH)) + { + WCHAR wszIconIndex[10]; + SHELL32_GetCustomFolderAttribute(pidl, shellClassInfo, iconIndex, + wszIconIndex, 10); + *piIndex = _wtoi(wszIconIndex); + } + else if (SHELL32_GetCustomFolderAttribute(pidl, shellClassInfo, clsid, + wszCLSIDValue, CHARS_IN_GUID) && + HCR_GetDefaultIconW(wszCLSIDValue, szIconFile, cchMax, &icon_idx)) + { + *piIndex = icon_idx; + } + else if (SHELL32_GetCustomFolderAttribute(pidl, shellClassInfo, clsid2, + wszCLSIDValue, CHARS_IN_GUID) && + HCR_GetDefaultIconW(wszCLSIDValue, szIconFile, cchMax, &icon_idx)) + { + *piIndex = icon_idx; + } + else + { + static const WCHAR folder[] = { 'F','o','l','d','e','r',0 }; + + if (!HCR_GetDefaultIconW(folder, szIconFile, cchMax, &icon_idx)) + { + lstrcpynW(szIconFile, swShell32Name, cchMax); + icon_idx = -IDI_SHELL_FOLDER; + } + + if (uFlags & GIL_OPENICON) + *piIndex = icon_idx<0? icon_idx-1: icon_idx+1; + else + *piIndex = icon_idx; + } + + return S_OK; +} + +void InitIconOverlays(void) +{ + HKEY hKey; + DWORD dwIndex, dwResult, dwSize; + WCHAR szName[MAX_PATH]; + WCHAR szValue[100]; + CLSID clsid; + IShellIconOverlayIdentifier * Overlay; + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers",0, KEY_READ, &hKey) != ERROR_SUCCESS) + return; + + if (RegQueryInfoKeyW(hKey, NULL, NULL, NULL, &dwResult, NULL, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + + Handlers = (IShellIconOverlayIdentifier **)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwResult * sizeof(IShellIconOverlayIdentifier*)); + if (!Handlers) + { + RegCloseKey(hKey); + return; + } + + dwIndex = 0; + + CoInitialize(0); + + do + { + dwSize = sizeof(szName) / sizeof(WCHAR); + dwResult = RegEnumKeyExW(hKey, dwIndex, szName, &dwSize, NULL, NULL, NULL, NULL); + + if (dwResult == ERROR_NO_MORE_ITEMS) + break; + + if (dwResult == ERROR_SUCCESS) + { + dwSize = sizeof(szValue) / sizeof(WCHAR); + if (RegGetValueW(hKey, szName, NULL, RRF_RT_REG_SZ, NULL, szValue, &dwSize) == ERROR_SUCCESS) + { + + CLSIDFromString(szValue, &clsid); + dwResult = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (LPVOID*)&Overlay); + if (dwResult == S_OK) + { + Handlers[NumIconOverlayHandlers] = Overlay; + NumIconOverlayHandlers++; + } + } + } + + dwIndex++; + + }while(1); + + RegCloseKey(hKey); +} + +BOOL +GetIconOverlay(LPCITEMIDLIST pidl, WCHAR * wTemp, int* pIndex) +{ + DWORD Index; + HRESULT hResult; + int Priority; + int HighestPriority; + ULONG IconIndex; + ULONG Flags; + WCHAR szPath[MAX_PATH]; + + if(!SHGetPathFromIDListW(pidl, szPath)) + return FALSE; + + + HighestPriority = 101; + IconIndex = NumIconOverlayHandlers; + for(Index = 0; Index < NumIconOverlayHandlers; Index++) + { + hResult = Handlers[Index]->IsMemberOf(szPath, SFGAO_FILESYSTEM); + if (hResult == S_OK) + { + hResult = Handlers[Index]->GetPriority(&Priority); + if (hResult == S_OK) + { + if (Priority < HighestPriority) + { + HighestPriority = Priority; + IconIndex = Index; + } + } + } + } + + if (IconIndex == NumIconOverlayHandlers) + return FALSE; + + hResult = Handlers[IconIndex]->GetOverlayInfo(wTemp, MAX_PATH, pIndex, &Flags); + + if (hResult == S_OK) + return TRUE; + else + return FALSE; +} + +/************************************************************************** +* IExtractIconW_Constructor +*/ +IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) +{ + CComPtr initIcon; + IExtractIconW *extractIcon; + GUID const * riid; + int icon_idx; + UINT flags; + CHAR sTemp[MAX_PATH]; + WCHAR wTemp[MAX_PATH]; + LPITEMIDLIST pSimplePidl = ILFindLastID(pidl); + HRESULT hr; + + hr = SHCreateDefaultExtractIcon(IID_IDefaultExtractIconInit, (void **)&initIcon); + if (FAILED(hr)) + return NULL; + + hr = initIcon->QueryInterface(IID_IExtractIconW, (void **)&extractIcon); + if (FAILED(hr)) + return NULL; + + if (_ILIsDesktop(pSimplePidl)) + { + initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_DESKTOP); + } + else if ((riid = _ILGetGUIDPointer(pSimplePidl))) + { + /* my computer and other shell extensions */ + static const WCHAR fmt[] = { 'C','L','S','I','D','\\', + '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-', + '%','0','2','x','%','0','2','x','-','%','0','2','x', '%','0','2','x', + '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','}',0 }; + WCHAR xriid[50]; + + swprintf(xriid, fmt, + riid->Data1, riid->Data2, riid->Data3, + riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], + riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7]); + + if (HCR_GetDefaultIconW(xriid, wTemp, MAX_PATH, &icon_idx)) + { + initIcon->SetNormalIcon(wTemp, icon_idx); + } + else + { + if (IsEqualGUID(*riid, CLSID_MyComputer)) + initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_MY_COMPUTER); + else if (IsEqualGUID(*riid, CLSID_MyDocuments)) + initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_MY_DOCUMENTS); + else if (IsEqualGUID(*riid, CLSID_NetworkPlaces)) + initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_MY_NETWORK_PLACES); + else + initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_FOLDER); + } + } + + else if (_ILIsDrive (pSimplePidl)) + { + static const WCHAR drive[] = { 'D','r','i','v','e',0 }; + int icon_idx = -1; + + if (_ILGetDrive(pSimplePidl, sTemp, MAX_PATH)) + { + switch(GetDriveTypeA(sTemp)) + { + case DRIVE_REMOVABLE: icon_idx = IDI_SHELL_FLOPPY; break; + case DRIVE_CDROM: icon_idx = IDI_SHELL_CDROM; break; + case DRIVE_REMOTE: icon_idx = IDI_SHELL_NETDRIVE; break; + case DRIVE_RAMDISK: icon_idx = IDI_SHELL_RAMDISK; break; + case DRIVE_NO_ROOT_DIR: icon_idx = IDI_SHELL_CDROM; break; + } + } + + if (icon_idx != -1) + { + initIcon->SetNormalIcon(swShell32Name, -icon_idx); + } + else + { + if (HCR_GetDefaultIconW(drive, wTemp, MAX_PATH, &icon_idx)) + initIcon->SetNormalIcon(wTemp, icon_idx); + else + initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_DRIVE); + } + } + + else if (_ILIsFolder (pSimplePidl)) + { + if (SUCCEEDED(getIconLocationForFolder( + pidl, 0, wTemp, MAX_PATH, + &icon_idx, + &flags))) + { + initIcon->SetNormalIcon(wTemp, icon_idx); + } + if (SUCCEEDED(getIconLocationForFolder( + pidl, GIL_DEFAULTICON, wTemp, MAX_PATH, + &icon_idx, + &flags))) + { + initIcon->SetDefaultIcon(wTemp, icon_idx); + } + if (SUCCEEDED(getIconLocationForFolder( + pidl, GIL_FORSHORTCUT, wTemp, MAX_PATH, + &icon_idx, + &flags))) + { + initIcon->SetShortcutIcon(wTemp, icon_idx); + } + if (SUCCEEDED(getIconLocationForFolder( + pidl, GIL_OPENICON, wTemp, MAX_PATH, + &icon_idx, + &flags))) + { + initIcon->SetOpenIcon(wTemp, icon_idx); + } + } + else + { + BOOL found = FALSE; + + if (_ILIsCPanelStruct(pSimplePidl)) + { + if (SUCCEEDED(CPanel_GetIconLocationW(pSimplePidl, wTemp, MAX_PATH, &icon_idx))) + found = TRUE; + } + else if (_ILGetExtension(pSimplePidl, sTemp, MAX_PATH)) + { + if (HCR_MapTypeToValueA(sTemp, sTemp, MAX_PATH, TRUE) + && HCR_GetDefaultIconA(sTemp, sTemp, MAX_PATH, &icon_idx)) + { + if (!lstrcmpA("%1", sTemp)) /* icon is in the file */ + { + SHGetPathFromIDListW(pidl, wTemp); + icon_idx = 0; + } + else + { + MultiByteToWideChar(CP_ACP, 0, sTemp, -1, wTemp, MAX_PATH); + } + + found = TRUE; + } + else if (!lstrcmpiA(sTemp, "lnkfile")) + { + /* extract icon from shell shortcut */ + CComPtr dsf; + CComPtr psl; + + if (SUCCEEDED(SHGetDesktopFolder(&dsf))) + { + HRESULT hr = dsf->GetUIObjectOf(NULL, 1, (LPCITEMIDLIST*)&pidl, IID_IShellLinkW, NULL, (LPVOID *)&psl); + + if (SUCCEEDED(hr)) + { + hr = psl->GetIconLocation(wTemp, MAX_PATH, &icon_idx); + + if (SUCCEEDED(hr) && *sTemp) + found = TRUE; + + } + } + } + } + + if (!found) + /* default icon */ + initIcon->SetNormalIcon(swShell32Name, 0); + else + initIcon->SetNormalIcon(wTemp, icon_idx); + } + + return extractIcon; +} + +/************************************************************************** +* IExtractIconA_Constructor +*/ +IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl) +{ + IExtractIconW *extractIconW; + IExtractIconA *extractIconA; + HRESULT hr; + + extractIconW = IExtractIconW_Constructor(pidl); + if (!extractIconW) + return NULL; + + hr = extractIconW->QueryInterface(IID_IExtractIconA, (void **)&extractIconA); + extractIconW->Release(); + if (FAILED(hr)) + return NULL; + return extractIconA; +} diff --git a/dll/win32/shell32_new/fprop.cpp b/dll/win32/shell32_new/fprop.cpp new file mode 100644 index 00000000000..15c2c6fbef6 --- /dev/null +++ b/dll/win32/shell32_new/fprop.cpp @@ -0,0 +1,878 @@ +/* + * Shell Library Functions + * + * Copyright 2005 Johannes Anderwald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define MAX_PROPERTY_SHEET_PAGE 32 + +typedef struct _LANGANDCODEPAGE_ +{ + WORD lang; + WORD code; +} LANGANDCODEPAGE, *LPLANGANDCODEPAGE; + +EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj); + +/************************************************************************* + * + * SH_CreatePropertySheetPage [Internal] + * + * creates a property sheet page from an resource name + * + */ + +HPROPSHEETPAGE +SH_CreatePropertySheetPage(LPCSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle) +{ + HRSRC hRes; + LPVOID lpsztemplate; + PROPSHEETPAGEW ppage; + + if (resname == NULL) + return (HPROPSHEETPAGE)0; + + hRes = FindResourceA(shell32_hInstance, resname, (LPSTR)RT_DIALOG); + + if (hRes == NULL) + { + ERR("failed to find resource name\n"); + return (HPROPSHEETPAGE)0; + } + + lpsztemplate = LoadResource(shell32_hInstance, hRes); + + if (lpsztemplate == NULL) + return (HPROPSHEETPAGE)0; + + memset(&ppage, 0x0, sizeof(PROPSHEETPAGEW)); + ppage.dwSize = sizeof(PROPSHEETPAGEW); + ppage.dwFlags = PSP_DLGINDIRECT; + ppage.pResource = (DLGTEMPLATE *)lpsztemplate; + ppage.pfnDlgProc = dlgproc; + ppage.lParam = lParam; + ppage.pszTitle = szTitle; + + if (szTitle) + { + ppage.dwFlags |= PSP_USETITLE; + } + + return CreatePropertySheetPageW(&ppage); +} + +/************************************************************************* + * + * SH_FileGeneralFileType [Internal] + * + * retrieves file extension description from registry and sets it in dialog + * + * TODO: retrieve file extension default icon and load it + * find executable name from registry, retrieve description from executable + */ + +BOOL +SH_FileGeneralSetFileType(HWND hwndDlg, WCHAR *filext) +{ + WCHAR name[MAX_PATH]; + WCHAR value[MAX_PATH]; + DWORD lname = MAX_PATH; + DWORD lvalue = MAX_PATH; + HKEY hKey; + LONG result; + HWND hDlgCtrl; + + TRACE("fileext %s\n", debugstr_w(filext)); + + if (filext == NULL) + return FALSE; + + hDlgCtrl = GetDlgItem(hwndDlg, 14005); + + if (hDlgCtrl == NULL) + return FALSE; + + if (RegOpenKeyW(HKEY_CLASSES_ROOT, filext, &hKey) != ERROR_SUCCESS) + { + /* the file extension is unknown, so default to string "FileExtension File" */ + SendMessageW(hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)value); + swprintf(name, L"%s %s", &filext[1], value); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)name); + return TRUE; + } + + result = RegEnumValueW(hKey, 0, name, &lname, NULL, NULL, (LPBYTE)value, &lvalue); + RegCloseKey(hKey); + + if (result != ERROR_SUCCESS) + return FALSE; + + if (RegOpenKeyW(HKEY_CLASSES_ROOT, value, &hKey) == ERROR_SUCCESS) + { + if (RegLoadMUIStringW(hKey, L"FriendlyTypeName", value, MAX_PATH, NULL, 0, NULL) != ERROR_SUCCESS) + { + lvalue = lname = MAX_PATH; + result = RegEnumValueW(hKey, 0, name, &lname, NULL, NULL, (LPBYTE)value, &lvalue); + } + + lname = MAX_PATH; + + if (RegGetValueW(hKey, L"DefaultIcon", NULL, RRF_RT_REG_SZ, NULL, name, &lname) == ERROR_SUCCESS) + { + UINT IconIndex; + WCHAR szBuffer[MAX_PATH]; + WCHAR *Offset; + HICON hIcon = 0; + HRSRC hResource; + LPVOID pResource = NULL; + HGLOBAL hGlobal; + HINSTANCE hLibrary; + Offset = wcsrchr(name, L','); + + if (Offset) + { + IconIndex = _wtoi(Offset + 2); + *Offset = L'\0'; + name[MAX_PATH - 1] = L'\0'; + + if (ExpandEnvironmentStringsW(name, szBuffer, MAX_PATH)) + { + szBuffer[MAX_PATH - 1] = L'\0'; + hLibrary = LoadLibraryExW(szBuffer, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (hLibrary) + { + hResource = FindResourceW(hLibrary, MAKEINTRESOURCEW(IconIndex), (LPCWSTR)RT_ICON); + if (hResource) + { + hGlobal = LoadResource(shell32_hInstance, hResource); + if (hGlobal) + { + pResource = LockResource(hGlobal); + if (pResource != NULL) + { + hIcon = CreateIconFromResource((LPBYTE)pResource, SizeofResource(shell32_hInstance, hResource), TRUE, 0x00030000); + TRACE("hIcon %p,- szBuffer %s IconIndex %u error %u icon %p hResource %p pResource %p\n", + hIcon, + debugstr_w(szBuffer), + IconIndex, + MAKEINTRESOURCEW(IconIndex), + hResource, + pResource); + SendDlgItemMessageW(hwndDlg, 14000, STM_SETICON, (WPARAM)hIcon, 0); + } + } + } + FreeLibrary(hLibrary); + } + } + } + } + RegCloseKey(hKey); + } + + /* file extension type */ + value[MAX_PATH - 1] = L'\0'; + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)value); + + return TRUE; +} + +/************************************************************************* + * + * SHFileGeneralGetFileTimeString [Internal] + * + * formats a given LPFILETIME struct into readable user format + */ + +BOOL +SHFileGeneralGetFileTimeString(LPFILETIME lpFileTime, WCHAR *lpResult) +{ + FILETIME ft; + SYSTEMTIME dt; + WORD wYear; + static const WCHAR wFormat[] = { + '%', '0', '2', 'd', '/', '%', '0', '2', 'd', '/', '%', '0', '4', 'd', + ' ', ' ', '%', '0', '2', 'd', ':', '%', '0', '2', 'u', 0 }; + + if (lpFileTime == NULL || lpResult == NULL) + return FALSE; + + if (!FileTimeToLocalFileTime(lpFileTime, &ft)) + return FALSE; + + FileTimeToSystemTime(&ft, &dt); + + wYear = dt.wYear; + + /* ddmmyy */ + swprintf(lpResult, wFormat, dt.wDay, dt.wMonth, wYear, dt.wHour, dt.wMinute); + + TRACE("result %s\n", debugstr_w(lpResult)); + return TRUE; +} + +/************************************************************************* + * + * SH_FileGeneralSetText [Internal] + * + * sets file path string and filename string + * + */ + +BOOL +SH_FileGeneralSetText(HWND hwndDlg, WCHAR *lpstr) +{ + int flength; + int plength; + WCHAR *lpdir; + WCHAR buff[MAX_PATH]; + HWND hDlgCtrl; + + if (lpstr == NULL) + return FALSE; + + lpdir = wcsrchr(lpstr, '\\'); /* find the last occurence of '\\' */ + + plength = wcslen(lpstr); + flength = wcslen(lpdir); + + if (lpdir) + { + /* location text field */ + wcsncpy(buff, lpstr, plength - flength); + buff[plength - flength] = UNICODE_NULL; + hDlgCtrl = GetDlgItem(hwndDlg, 14009); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff); + } + + if (flength > 1) + { + /* text filename field */ + wcsncpy(buff, &lpdir[1], flength); + hDlgCtrl = GetDlgItem(hwndDlg, 14001); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff); + } + + return TRUE; +} + +/************************************************************************* + * + * SH_FileGeneralSetFileSizeTime [Internal] + * + * retrieves file information from file and sets in dialog + * + */ + +BOOL +SH_FileGeneralSetFileSizeTime(HWND hwndDlg, WCHAR *lpfilename, PULARGE_INTEGER lpfilesize) +{ + BOOL result; + HANDLE hFile; + FILETIME create_time; + FILETIME accessed_time; + FILETIME write_time; + WCHAR resultstr[MAX_PATH]; + HWND hDlgCtrl; + LARGE_INTEGER file_size; + + if (lpfilename == NULL) + return FALSE; + + hFile = CreateFileW(lpfilename, + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + + if (hFile == INVALID_HANDLE_VALUE) + { + WARN("failed to open file %s\n", debugstr_w(lpfilename)); + return FALSE; + } + + result = GetFileTime(hFile, &create_time, &accessed_time, &write_time); + + if (!result) + { + WARN("GetFileTime failed\n"); + return FALSE; + } + + if (SHFileGeneralGetFileTimeString(&create_time, resultstr)) + { + hDlgCtrl = GetDlgItem(hwndDlg, 14015); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr); + } + + if (SHFileGeneralGetFileTimeString(&accessed_time, resultstr)) + { + hDlgCtrl = GetDlgItem(hwndDlg, 14019); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr); + } + + if (SHFileGeneralGetFileTimeString(&write_time, resultstr)) + { + hDlgCtrl = GetDlgItem(hwndDlg, 14017); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr); + } + + if (!GetFileSizeEx(hFile, &file_size)) + { + WARN("GetFileSize failed\n"); + CloseHandle(hFile); + return FALSE; + } + + CloseHandle(hFile); + + if (!StrFormatByteSizeW(file_size.QuadPart, + resultstr, + sizeof(resultstr) / sizeof(WCHAR))) + return FALSE; + + hDlgCtrl = GetDlgItem(hwndDlg, 14011); + + TRACE("result size %u resultstr %s\n", file_size.QuadPart, debugstr_w(resultstr)); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)resultstr); + + if (lpfilesize) + lpfilesize->QuadPart = (ULONGLONG)file_size.QuadPart; + + return TRUE; +} + +/************************************************************************* + * + * SH_SetFileVersionText [Internal] + * + * + */ + +BOOL +SH_FileVersionQuerySetText(HWND hwndDlg, DWORD dlgId, LPVOID pInfo, WCHAR *text, WCHAR **resptr) +{ + UINT reslen; + HWND hDlgCtrl; + + if (hwndDlg == NULL || resptr == NULL || text == NULL) + return FALSE; + + if (VerQueryValueW(pInfo, text, (LPVOID *)resptr, &reslen)) + { + /* file description property */ + hDlgCtrl = GetDlgItem(hwndDlg, dlgId); + TRACE("%s :: %s\n", debugstr_w(text), debugstr_w(*resptr)); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)0, (LPARAM)*resptr); + return TRUE; + } + + return FALSE; +} + +/************************************************************************* + * + * SH_FileVersionQuerySetListText [Internal] + * + * retrieves a version string and adds it to listbox + * + */ + +BOOL +SH_FileVersionQuerySetListText(HWND hwndDlg, LPVOID pInfo, const WCHAR *text, WCHAR **resptr, WORD lang, WORD code) +{ + UINT reslen; + HWND hDlgCtrl; + UINT index; + static const WCHAR wFormat[] = { + '\\', 'S', 't', 'r', 'i', 'n', 'g', 'F', 'i', 'l', 'e', 'I', 'n', 'f', 'o', + '\\', '%', '0', '4', 'x', '%', '0', '4', 'x', '\\', '%', 's', 0 }; + WCHAR buff[256]; + + TRACE("text %s, resptr %p hwndDlg %p\n", debugstr_w(text), resptr, hwndDlg); + + if (hwndDlg == NULL || resptr == NULL || text == NULL) + return FALSE; + + swprintf(buff, wFormat, lang, code, text); + + if (VerQueryValueW(pInfo, buff, (LPVOID *)resptr, &reslen)) + { + /* listbox name property */ + hDlgCtrl = GetDlgItem(hwndDlg, 14009); + TRACE("%s :: %s\n", debugstr_w(text), debugstr_w(*resptr)); + index = SendMessageW(hDlgCtrl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)text); + SendMessageW(hDlgCtrl, LB_SETITEMDATA, (WPARAM)index, (LPARAM)(WCHAR *)*resptr); + return TRUE; + } + + return FALSE; +} + +/************************************************************************* + * + * SH_FileVersionInitialize [Internal] + * + * sets all file version properties in dialog + */ + +BOOL +SH_FileVersionInitialize(HWND hwndDlg, WCHAR *lpfilename) +{ + LPVOID pBuf; + DWORD versize; + DWORD handle; + LPVOID info = NULL; + UINT infolen; + WCHAR buff[256]; + HWND hDlgCtrl; + WORD lang = 0; + WORD code = 0; + LPLANGANDCODEPAGE lplangcode; + WCHAR *str; + static const WCHAR wVersionFormat[] = { + '%', 'd', '.', '%', 'd', '.', '%', 'd', '.', '%', 'd', 0 }; + static const WCHAR wFileDescriptionFormat[] = { + '\\', 'S', 't', 'r', 'i', 'n', 'g', 'F', 'i', 'l', 'e', 'I', 'n', 'f', 'o', + '\\', '%', '0', '4', 'x', '%', '0', '4', 'x', + '\\', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', 0 }; + static const WCHAR wLegalCopyrightFormat[] = { + '\\', 'S', 't', 'r', 'i', 'n', 'g', 'F', 'i', 'l', 'e', 'I', 'n', 'f', 'o', + '\\', '%', '0', '4', 'x', '%', '0', '4', 'x', + '\\', 'L', 'e', 'g', 'a', 'l', 'C', 'o', 'p', 'y', 'r', 'i', 'g', 'h', 't', 0 }; + static const WCHAR wTranslation[] = { + 'V', 'a', 'r', 'F', 'i', 'l', 'e', 'I', 'n', 'f', 'o', + '\\', 'T', 'r', 'a', 'n', 's', 'l', 'a', 't', 'i', 'o', 'n', 0 }; + static const WCHAR wCompanyName[] = { + 'C', 'o', 'm', 'p', 'a', 'n', 'y', 'N', 'a', 'm', 'e', 0 }; + static const WCHAR wFileVersion[] = { + 'F', 'i', 'l', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 0 }; + static const WCHAR wInternalName[] = { + 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'N', 'a', 'm', 'e', 0 }; + static const WCHAR wOriginalFilename[] = { + 'O', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'F', 'i', 'l', 'e', 'n', 'a', 'm', 'e', 0 }; + static const WCHAR wProductName[] = { + 'P', 'r', 'o', 'd', 'u', 'c', 't', 'N', 'a', 'm', 'e', 0 }; + static const WCHAR wProductVersion[] = { + 'P', 'r', 'o', 'd', 'u', 'c', 't', 'V', 'e', 'r', 's', 'i', 'o', 'n', 0 }; + static const WCHAR wSlash[] = { '\\', 0 }; + + if (lpfilename == 0) + return FALSE; + + if (!(versize = GetFileVersionInfoSizeW(lpfilename, &handle))) + { + WARN("GetFileVersionInfoSize failed\n"); + return FALSE; + } + + if (!(pBuf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, versize))) + { + WARN("HeapAlloc failed bytes %x\n", versize); + return FALSE; + } + + if (!GetFileVersionInfoW(lpfilename, handle, versize, pBuf)) + { + HeapFree(GetProcessHeap(), 0, pBuf); + return FALSE; + } + + if (VerQueryValueW(pBuf, const_cast(wSlash), &info, &infolen)) + { + VS_FIXEDFILEINFO *inf = (VS_FIXEDFILEINFO *)info; + swprintf(buff, wVersionFormat, HIWORD(inf->dwFileVersionMS), + LOWORD(inf->dwFileVersionMS), + HIWORD(inf->dwFileVersionLS), + LOWORD(inf->dwFileVersionLS)); + hDlgCtrl = GetDlgItem(hwndDlg, 14001); + TRACE("MS %x LS %x res %s \n", inf->dwFileVersionMS, inf->dwFileVersionLS, debugstr_w(buff)); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)buff); + } + + if (VerQueryValueW(pBuf, const_cast(wTranslation), (LPVOID *)&lplangcode, &infolen)) + { + /* FIXME find language from current locale / if not available, + * default to english + * for now default to first available language + */ + lang = lplangcode->lang; + code = lplangcode->code; + } + + swprintf(buff, wFileDescriptionFormat, lang, code); + SH_FileVersionQuerySetText(hwndDlg, 14003, pBuf, buff, &str); + + swprintf(buff, wLegalCopyrightFormat, lang, code); + SH_FileVersionQuerySetText(hwndDlg, 14005, pBuf, buff, &str); + + /* listbox properties */ + SH_FileVersionQuerySetListText(hwndDlg, pBuf, wCompanyName, &str, lang, code); + SH_FileVersionQuerySetListText(hwndDlg, pBuf, wFileVersion, &str, lang, code); + SH_FileVersionQuerySetListText(hwndDlg, pBuf, wInternalName, &str, lang, code); + + /* FIXME insert language identifier */ + + SH_FileVersionQuerySetListText(hwndDlg, pBuf, wOriginalFilename, &str, lang, code); + SH_FileVersionQuerySetListText(hwndDlg, pBuf, wProductName, &str, lang, code); + SH_FileVersionQuerySetListText(hwndDlg, pBuf, wProductVersion, &str, lang, code); + SetWindowLongPtr(hwndDlg, DWL_USER, (LONG_PTR)pBuf); + + /* select first item */ + hDlgCtrl = GetDlgItem(hwndDlg, 14009); + SendMessageW(hDlgCtrl, LB_SETCURSEL, 0, 0); + str = (WCHAR *) SendMessageW(hDlgCtrl, LB_GETITEMDATA, (WPARAM)0, (LPARAM)NULL); + hDlgCtrl = GetDlgItem(hwndDlg, 14010); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)str); + + return TRUE; +} + +/************************************************************************* + * + * SH_FileVersionDlgProc + * + * wnd proc of 'Version' property sheet page + */ + +INT_PTR +CALLBACK +SH_FileVersionDlgProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + LPPROPSHEETPAGE ppsp; + WCHAR *lpstr; + LPVOID buf; + + switch (uMsg) + { + case WM_INITDIALOG: + ppsp = (LPPROPSHEETPAGE)lParam; + + if (ppsp == NULL) + break; + + TRACE("WM_INITDIALOG hwnd %p lParam %p ppsplParam %x\n", hwndDlg, lParam, ppsp->lParam); + + lpstr = (WCHAR *)ppsp->lParam; + + if (lpstr == NULL) + break; + + return SH_FileVersionInitialize(hwndDlg, lpstr); + + case WM_COMMAND: + if (LOWORD(wParam) == 14009 && HIWORD(wParam) == LBN_DBLCLK) + { + HWND hDlgCtrl; + LRESULT lresult; + WCHAR *str; + + hDlgCtrl = GetDlgItem(hwndDlg, 14009); + lresult = SendMessageW(hDlgCtrl, LB_GETCURSEL, (WPARAM)NULL, (LPARAM)NULL); + + if (lresult == LB_ERR) + break; + + str = (WCHAR *) SendMessageW(hDlgCtrl, LB_GETITEMDATA, (WPARAM)lresult, (LPARAM)NULL); + + if (str == NULL) + break; + + hDlgCtrl = GetDlgItem(hwndDlg, 14010); + TRACE("hDlgCtrl %x string %s \n", hDlgCtrl, debugstr_w(str)); + SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)str); + + return TRUE; + } + break; + + case WM_DESTROY: + buf = (LPVOID) GetWindowLongPtr(hwndDlg, DWL_USER); + HeapFree(GetProcessHeap(), 0, buf); + break; + + default: + break; + } + + return FALSE; +} + +/************************************************************************* + * + * SH_FileGeneralDlgProc + * + * wnd proc of 'General' property sheet page + * + */ + +INT_PTR +CALLBACK +SH_FileGeneralDlgProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + LPPROPSHEETPAGEW ppsp; + WCHAR *lpstr; + + switch (uMsg) + { + case WM_INITDIALOG: + ppsp = (LPPROPSHEETPAGEW)lParam; + + if (ppsp == NULL) + break; + + TRACE("WM_INITDIALOG hwnd %p lParam %p ppsplParam %S\n", hwndDlg, lParam, ppsp->lParam); + + lpstr = (WCHAR *)ppsp->lParam; + + if (lpstr == NULL) + { + ERR("no filename\n"); + break; + } + + /* set general text properties filename filelocation and icon */ + SH_FileGeneralSetText(hwndDlg, lpstr); + + /* enumerate file extension from registry and application which opens it */ + SH_FileGeneralSetFileType(hwndDlg, wcsrchr(lpstr, '.')); + + /* set file time create/modfied/accessed */ + SH_FileGeneralSetFileSizeTime(hwndDlg, lpstr, NULL); + + return TRUE; + + default: + break; + } + + return FALSE; +} + +BOOL +CALLBACK +AddShellPropSheetExCallback(HPROPSHEETPAGE hPage, + LPARAM lParam) +{ + PROPSHEETHEADERW *pinfo = (PROPSHEETHEADERW *)lParam; + + if (pinfo->nPages < MAX_PROPERTY_SHEET_PAGE) + { + pinfo->phpage[pinfo->nPages++] = hPage; + return TRUE; + } + + return FALSE; +} + +int +EnumPropSheetExt(LPWSTR wFileName, PROPSHEETHEADERW *pinfo, int NumPages, HPSXA *hpsxa, IDataObject *pDataObj) +{ + WCHAR szName[MAX_PATH] = { 0 }; + WCHAR *pOffset; + UINT Length; + DWORD dwName; + int Pages; + CLSID clsid; + + pOffset = wcsrchr(wFileName, L'.'); + + if (!pOffset) + { + Length = wcslen(szName); + + if (Length + 6 > sizeof(szName) / sizeof(szName[0])) + return 0; + + if (CLSIDFromString(wFileName, &clsid) == NOERROR) + { + wcscpy(szName, L"CLSID\\"); + wcscpy(&szName[6], wFileName); + } + else + { + wcscpy(szName, wFileName); + } + } + else + { + Length = wcslen(pOffset); + + if (Length >= sizeof(szName) / sizeof(szName[0])) + return 0; + + wcscpy(szName, pOffset); + } + + TRACE("EnumPropSheetExt szName %s\n", debugstr_w(szName)); + + hpsxa[0] = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, szName, NumPages, pDataObj); + Pages = SHAddFromPropSheetExtArray(hpsxa[0], AddShellPropSheetExCallback, (LPARAM)pinfo); + + hpsxa[1] = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, L"*", NumPages-Pages, pDataObj); + Pages += SHAddFromPropSheetExtArray(hpsxa[1], AddShellPropSheetExCallback, (LPARAM)pinfo); + + hpsxa[2] = NULL; + + if (pOffset) + { + /* try to load property sheet handlers from prog id key */ + dwName = sizeof(szName); + + if (RegGetValueW(HKEY_CLASSES_ROOT, pOffset, NULL, RRF_RT_REG_SZ, NULL, szName, &dwName) == ERROR_SUCCESS) + { + TRACE("EnumPropSheetExt szName %s, pOffset %s\n", debugstr_w(szName), debugstr_w(pOffset)); + szName[(sizeof(szName) / sizeof(WCHAR)) - 1] = L'\0'; + hpsxa[2] = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, szName, NumPages - Pages, pDataObj); + Pages += SHAddFromPropSheetExtArray(hpsxa[2], AddShellPropSheetExCallback, (LPARAM)pinfo); + } + } + + return Pages; +} + +/************************************************************************* + * + * SH_ShowPropertiesDialog + * + * called from ShellExecuteExW32 + * + * lpf contains (quoted) path of folder/file + * + * TODO: provide button change application type if file has registered type + * make filename field editable and apply changes to filename on close + */ + +BOOL +SH_ShowPropertiesDialog(WCHAR *lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST *apidl) +{ + PROPSHEETHEADERW pinfo; + HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; + WCHAR wFileName[MAX_PATH]; + DWORD dwHandle = 0; + WCHAR *pFileName; + HPSXA hpsxa[3]; + INT_PTR res; + CComPtr pDataObj; + HRESULT hResult; + + TRACE("SH_ShowPropertiesDialog entered filename %s\n", debugstr_w(lpf)); + + if (lpf == NULL) + return FALSE; + + if (!wcslen(lpf)) + return FALSE; + + memset(hppages, 0x0, sizeof(HPROPSHEETPAGE) * MAX_PROPERTY_SHEET_PAGE); + + if (lpf[0] == '"') + { + /* remove quotes from lpf */ + LPCWSTR src = lpf + 1; + LPWSTR dst = wFileName; + + while (*src && *src != '"') + *dst++ = *src++; + + *dst = '\0'; + } + else + { + wcscpy(wFileName, lpf); + } + + if (PathIsDirectoryW(wFileName)) + { + return SH_ShowFolderProperties(wFileName, pidlFolder, apidl); + } + + if (wcslen(wFileName) == 3) + { + return SH_ShowDriveProperties(wFileName, pidlFolder, apidl); + } + + pFileName = wcsrchr(wFileName, '\\'); + + if (!pFileName) + pFileName = wFileName; + else + pFileName++; + + memset(&pinfo, 0x0, sizeof(PROPSHEETHEADERW)); + pinfo.dwSize = sizeof(PROPSHEETHEADERW); + pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE; + pinfo.phpage = hppages; + pinfo.pszCaption = pFileName; + + hppages[pinfo.nPages] = + SH_CreatePropertySheetPage("SHELL_FILE_GENERAL_DLG", + SH_FileGeneralDlgProc, + (LPARAM)wFileName, + NULL); + + if (hppages[pinfo.nPages]) + pinfo.nPages++; + + hResult = SHCreateDataObject(pidlFolder, 1, apidl, NULL, IID_IDataObject, (LPVOID *)&pDataObj); + + if (hResult == S_OK) + { + if (!EnumPropSheetExt(wFileName, &pinfo, MAX_PROPERTY_SHEET_PAGE - 1, hpsxa, pDataObj)) + { + hpsxa[0] = NULL; + hpsxa[1] = NULL; + hpsxa[2] = NULL; + } + } + + if (GetFileVersionInfoSizeW(lpf, &dwHandle)) + { + hppages[pinfo.nPages] = + SH_CreatePropertySheetPage("SHELL_FILE_VERSION_DLG", + SH_FileVersionDlgProc, + (LPARAM)wFileName, + NULL); + if (hppages[pinfo.nPages]) + pinfo.nPages++; + } + + res = PropertySheetW(&pinfo); + + if (hResult == S_OK) + { + SHDestroyPropSheetExtArray(hpsxa[0]); + SHDestroyPropSheetExtArray(hpsxa[1]); + SHDestroyPropSheetExtArray(hpsxa[2]); + } + + return (res != -1); +} + +/*EOF */ diff --git a/dll/win32/shell32_new/icon_res.rc b/dll/win32/shell32_new/icon_res.rc new file mode 100644 index 00000000000..1f644ae6cf8 --- /dev/null +++ b/dll/win32/shell32_new/icon_res.rc @@ -0,0 +1,166 @@ +IDI_SHELL_DOCUMENT ICON "res/icons/1.ico" +IDI_SHELL_RICH_TEXT ICON "res/icons/2.ico" +IDI_SHELL_EXE ICON "res/icons/3.ico" +IDI_SHELL_FOLDER ICON "res/icons/4.ico" +IDI_SHELL_FOLDER_OPEN ICON "res/icons/5.ico" +IDI_SHELL_5_12_FLOPPY ICON "res/icons/6.ico" +IDI_SHELL_3_14_FLOPPY ICON "res/icons/7.ico" +IDI_SHELL_FLOPPY ICON "res/icons/8.ico" +IDI_SHELL_DRIVE ICON "res/icons/9.ico" +IDI_SHELL_NETDRIVE ICON "res/icons/10.ico" +IDI_SHELL_NETDRIVE2 ICON "res/icons/11.ico" //THIS SHOULD BE IDI_SHELL_NETDRIVE_OFF +IDI_SHELL_CDROM ICON "res/icons/12.ico" +IDI_SHELL_RAMDISK ICON "res/icons/13.ico" +IDI_SHELL_ENTIRE_NETWORK ICON "res/icons/14.ico" +IDI_SHELL_NETWORK ICON "res/icons/15.ico" +IDI_SHELL_MY_COMPUTER ICON "res/icons/16.ico" +IDI_SHELL_PRINTER ICON "res/icons/17.ico" +IDI_SHELL_MY_NETWORK_PLACES ICON "res/icons/18.ico" +IDI_SHELL_COMPUTERS_NEAR_ME ICON "res/icons/19.ico" +IDI_SHELL_PROGRAMS_FOLDER ICON "res/icons/20.ico" +IDI_SHELL_RECENT_DOCUMENTS ICON "res/icons/21.ico" +IDI_SHELL_CONTROL_PANEL ICON "res/icons/22.ico" +IDI_SHELL_SEARCH ICON "res/icons/23.ico" +IDI_SHELL_HELP ICON "res/icons/24.ico" +IDI_SHELL_RUN ICON "res/icons/25.ico" +IDI_SHELL_SHUTDOWN ICON "res/icons/28.ico" +IDI_SHELL_SHARE ICON "res/icons/29.ico" +IDI_SHELL_SHORTCUT ICON "res/icons/30.ico" +IDI_SHELL_EMPTY_RECYCLE_BIN ICON "res/icons/32.ico" +IDI_SHELL_FULL_RECYCLE_BIN ICON "res/icons/33.ico" +IDI_SHELL_DESKTOP ICON "res/icons/35.ico" +IDI_SHELL_CONTROL_PANEL2 ICON "res/icons/36.ico" +IDI_SHELL_PROGRAMS_FOLDER2 ICON "res/icons/37.ico" +IDI_SHELL_PRINTERS_FOLDER ICON "res/icons/38.ico" +IDI_SHELL_FONTS_FOLDER ICON "res/icons/39.ico" +IDI_SHELL_TSKBAR_STARTMENU ICON "res/icons/40.ico" +IDI_SHELL_CD_MUSIC ICON "res/icons/41.ico" +IDI_SHELL_FAVORITES ICON "res/icons/44.ico" +IDI_SHELL_LOGOFF ICON "res/icons/45.ico" +IDI_SHELL_EXPLORER ICON "res/icons/46.ico" +IDI_SHELL_UPDATE ICON "res/icons/47.ico" +IDI_SHELL_LOCKED ICON "res/icons/48.ico" +IDI_SHELL_NOT_CONNECTED_HDD ICON "res/icons/54.ico" +IDI_SHELL_FIND_IN_FILE ICON "res/icons/134.ico" +IDI_SHELL_OPEN_WITH ICON "res/icons/135.ico" +IDI_SHELL_CONTROL_PANEL3 ICON "res/icons/137.ico" +IDI_SHELL_PRINTER2 ICON "res/icons/138.ico" +/* TODO: 139.ico, 140.ico, 141.ico, 142.ico, 143.ico, 144,ico, 145.ico, 146.ico, 147.ico, 148.ico */ +IDI_SHELL_INF_FILE ICON "res/icons/151.ico" +IDI_SHELL_TEXT_FILE ICON "res/icons/152.ico" +IDI_SHELL_BAT_FILE ICON "res/icons/153.ico" +IDI_SHELL_SYSTEM_FILE ICON "res/icons/154.ico" +IDI_SHELL_FONT_FILE ICON "res/icons/155.ico" +IDI_SHELL_TT_FONT_FILE ICON "res/icons/156.ico" +IDI_SHELL_FONT_FILE2 ICON "res/icons/157.ico" +IDI_SHELL_RUN2 ICON "res/icons/160.ico" +IDI_SHELL_CONFIRM_DELETE ICON "res/icons/161.ico" +/* TODO: 165.ico, 166.ico, 167.ico, 168.ico, 169.ico, 170.ico, 171.ico */ +IDI_SHELL_NETWORK_FOLDER ICON "res/icons/172.ico" +IDI_SHELL_FAVORITES2 ICON "res/icons/173.ico" +/* TODO: 174.ico, 175.ico, 176.ico, 177.ico, 178.ico, 179.ico, 180.ico, 181.ico */ + +// Folder Options, General dialog +IDI_SHELL_SHOW_COMMON_TASKS ICON "res/icons/182.ico" +IDI_SHELL_CLASSIC_FOLDERS ICON "res/icons/183.ico" +IDI_SHELL_OPEN_IN_SOME_WINDOW ICON "res/icons/184.ico" +IDI_SHELL_OPEN_IN_NEW_WINDOW ICON "res/icons/185.ico" +IDI_SHELL_SINGLE_CLICK_TO_OPEN ICON "res/icons/186.ico" +IDI_SHELL_DOUBLE_CLICK_TO_OPEN ICON "res/icons/187.ico" + +/* TODO: 174.ico, 175.ico, 176.ico, 177.ico, 178.ico, 179.ico, 180.ico, 181.ico */ +IDI_SHELL_EMPTY_RECYCLE_BIN1 ICON "res/icons/191.ico" +IDI_SHELL_FULL_RECYCLE_BIN1 ICON "res/icons/192.ico" +/* TODO: 193.ico, 194.ico, 196.ico, 197.ico, 198.ico, 199.ico, 200.ico */ +IDI_SHELL_FOLDER_OPTIONS ICON "res/icons/210.ico" +IDI_SHELL_USERS2 ICON "res/icons/220.ico" +IDI_SHELL_TURN_OFF ICON "res/icons/221.ico" +/* TODO: 223.ico */ +IDI_SHELL_DVD_ROM ICON "res/icons/222.ico" +IDI_SHELL_MOVIE_FILE ICON "res/icons/224.ico" +IDI_SHELL_MUSIC_FILE ICON "res/icons/225.ico" +IDI_SHELL_PICTURE_FILE ICON "res/icons/226.ico" +/* TODO: 227.ico */ +IDI_SHELL_CD_MUSIC2 ICON "res/icons/228.ico" +/* TODO: 229.ico, 230.ico, 231.ico, 232.ico */ +IDI_SHELL_FDD ICON "res/icons/233.ico" +/* TODO: 234.ico */ +IDI_SHELL_MY_DOCUMENTS ICON "res/icons/235.ico" +IDI_SHELL_MY_PICTURES ICON "res/icons/236.ico" +IDI_SHELL_MY_MUSIC ICON "res/icons/237.ico" +IDI_SHELL_MY_MOVIES ICON "res/icons/238.ico" +/* TODO: 239.ico */ +IDI_SHELL_FULL_RECYCLE_BIN2 ICON "res/icons/240.ico" +/* TODO: 241.ico, 242.ico, 243.ico, 244.ico */ +IDI_SHELL_PRINTER3 ICON "res/icons/245.ico" +IDI_SHELL_ICON_246 ICON "res/icons/246.ico" +/* TODO: 247.ico */ +IDI_SHELL_CAMERA ICON "res/icons/248.ico" +IDI_SHELL_SLIDE_SHOW ICON "res/icons/249.ico" +IDI_SHELL_DISPLAY ICON "res/icons/250.ico" +/* TODO: 251.ico */ +IDI_SHELL_PRINT_PICS ICON "res/icons/252.ico" +/* TODO: 253.ico */ +IDI_SHELL_EMPTY_RECYCLE_BIN3 ICON "res/icons/254.ico" +IDI_SHELL_ICON_255 ICON "res/icons/255.ico" +/* TODO: 256.ico, 257.ico, 258.ico, 259.ico, 260.ico, 261.ico, 262.ico */ +IDI_SHELL_HELP1 ICON "res/icons/263.ico" +/* TODO: 264.ico */ +IDI_SHELL_SENDMAIL ICON "res/icons/265.ico" +/* TODO: 266.ico, 267.ico */ +IDI_SHELL_ACCESSABILITY ICON "res/icons/268.ico" +IDI_SHELL_USERS ICON "res/icons/269.ico" +IDI_SHELL_SCREEN_COLORS ICON "res/icons/270.ico" +IDI_SHELL_ADD_REM_PROGRAMS ICON "res/icons/271.ico" +/* TODO: 272.ico, 273.ico, 274.ico, 275.ico, 276.ico */ +IDI_SHELL_TUNES ICON "res/icons/277.ico" +/* TODO: 278.ico */ +IDI_SHELL_USER_ACCOUNTS ICON "res/icons/279.ico" +/* TODO: 281.ico, 282.ico, 283.ico, 284.ico */ +IDI_SHELL_HELP_FILE ICON "res/icons/289.ico" +IDI_SHELL_GO ICON "res/icons/290.ico" +IDI_SHELL_DVD_DRIVE ICON "res/icons/291.ico" +IDI_SHELL_CD_ADD_MUSIC ICON "res/icons/292.ico" +IDI_SHELL_CD ICON "res/icons/293.ico" +IDI_SHELL_CD_ROM ICON "res/icons/294.ico" +IDI_SHELL_CDR ICON "res/icons/295.ico" +IDI_SHELL_CDRW ICON "res/icons/296.ico" +IDI_SHELL_DVD_RAM ICON "res/icons/297.ico" +IDI_SHELL_DVDR_ROM ICON "res/icons/298.ico" +IDI_SHELL_MP3_PLAYER ICON "res/icons/299.ico" +/* TODO: 300.ico, 301.ico */ +IDI_SHELL_CD_ROM1 ICON "res/icons/302.ico" +/* TODO: 303.ico */ +IDI_SHELL_DVD_ROM1 ICON "res/icons/304.ico" +IDI_SHELL_FDD2 ICON "res/icons/305.ico" +/* TODO: 306.ico, 307.ico, 308.ico */ +IDI_SHELL_CAMERA1 ICON "res/icons/309.ico" +/* TODO: 310.ico, 311.ico, 312.ico, 313.ico, 314.ico */ +IDI_SHELL_SCANNER ICON "res/icons/315.ico" +/* TODO: 316.ico */ +IDI_SHELL_CAMCORDER ICON "res/icons/317.ico" +IDI_SHELL_DVDRW_ROM ICON "res/icons/318.ico" +IDI_SHELL_NEW_FOLDER ICON "res/icons/319.ico" +/* TODO: 320.ico, 321.ico */ +IDI_SHELL_FAVOTITES ICON "res/icons/322.ico" +IDI_SHELL_SEARCH1 ICON "res/icons/323.ico" +IDI_SHELL_HELP2 ICON "res/icons/324.ico" +IDI_SHELL_LOGOFF1 ICON "res/icons/325.ico" +IDI_SHELL_PROGRAMS_FOLDER1 ICON "res/icons/326.ico" +IDI_SHELL_RECENT_DOCUMENTS1 ICON "res/icons/327.ico" +IDI_SHELL_RUN1 ICON "res/icons/328.ico" +IDI_SHELL_SHUTDOWN1 ICON "res/icons/329.ico" +IDI_SHELL_CONTROL_PANEL1 ICON "res/icons/330.ico" +/* TODO: 331.ico, 337.ico, 338.ico, 512.ico */ +IDI_SHELL_IDEA ICON "res/icons/1001.ico" +/* TODO: 1002.ico, 1003.ico */ +IDI_SHELL_HELP_FILE1 ICON "res/icons/1004.ico" +/* TODO: 1005.ico, 1006.ico, 1007.ico, 1008.ico, 1009.ico, 1010.ico, 1011.ico */ +IDI_SHELL_SHUTDOWN2 ICON "res/icons/8240.ico" +IDI_SHELL_DELETE1 ICON "res/icons/16710.ico" +IDI_SHELL_DELETE2 ICON "res/icons/16715.ico" +IDI_SHELL_DELETE3 ICON "res/icons/16717.ico" +IDI_SHELL_DELETE4 ICON "res/icons/16718.ico" +IDI_SHELL_DELETE5 ICON "res/icons/16721.ico" + +IDI_SHELL_ADMINTOOLS ICON "res/icons/1700.ico" /* FIXME */ diff --git a/dll/win32/shell32_new/iconcache.cpp b/dll/win32/shell32_new/iconcache.cpp new file mode 100644 index 00000000000..1d7de4f59ec --- /dev/null +++ b/dll/win32/shell32_new/iconcache.cpp @@ -0,0 +1,936 @@ +/* + * shell icon cache (SIC) + * + * Copyright 1998, 1999 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/********************** THE ICON CACHE ********************************/ + +#define INVALID_INDEX -1 + +typedef struct +{ + LPWSTR sSourceFile; /* file (not path!) containing the icon */ + DWORD dwSourceIndex; /* index within the file, if it is a resoure ID it will be negated */ + DWORD dwListIndex; /* index within the iconlist */ + DWORD dwFlags; /* GIL_* flags */ + DWORD dwAccessTime; +} SIC_ENTRY, * LPSIC_ENTRY; + +static HDPA sic_hdpa = 0; + +namespace +{ +extern CRITICAL_SECTION SHELL32_SicCS; +CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &SHELL32_SicCS, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_SicCS") } +}; +CRITICAL_SECTION SHELL32_SicCS = { &critsect_debug, -1, 0, 0, 0, 0 }; +} + +/***************************************************************************** + * SIC_CompareEntries + * + * NOTES + * Callback for DPA_Search + */ +static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam) +{ LPSIC_ENTRY e1 = (LPSIC_ENTRY)p1, e2 = (LPSIC_ENTRY)p2; + + TRACE("%p %p %8lx\n", p1, p2, lparam); + + /* Icons in the cache are keyed by the name of the file they are + * loaded from, their resource index and the fact if they have a shortcut + * icon overlay or not. + */ + if (e1->dwSourceIndex != e2->dwSourceIndex || /* first the faster one */ + (e1->dwFlags & GIL_FORSHORTCUT) != (e2->dwFlags & GIL_FORSHORTCUT)) + return 1; + + if (wcsicmp(e1->sSourceFile,e2->sSourceFile)) + return 1; + + return 0; +} + +/* declare SIC_LoadOverlayIcon() */ +static int SIC_LoadOverlayIcon(int icon_idx); + +/***************************************************************************** + * SIC_OverlayShortcutImage [internal] + * + * NOTES + * Creates a new icon as a copy of the passed-in icon, overlayed with a + * shortcut image. + */ +static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large) +{ ICONINFO SourceIconInfo, ShortcutIconInfo, TargetIconInfo; + HICON ShortcutIcon, TargetIcon; + BITMAP SourceBitmapInfo, ShortcutBitmapInfo; + HDC SourceDC = NULL, + ShortcutDC = NULL, + TargetDC = NULL, + ScreenDC = NULL; + HBITMAP OldSourceBitmap = NULL, + OldShortcutBitmap = NULL, + OldTargetBitmap = NULL; + + static int s_imgListIdx = -1; + + /* Get information about the source icon and shortcut overlay */ + if (! GetIconInfo(SourceIcon, &SourceIconInfo) + || 0 == GetObjectW(SourceIconInfo.hbmColor, sizeof(BITMAP), &SourceBitmapInfo)) + { + return NULL; + } + + /* search for the shortcut icon only once */ + if (s_imgListIdx == -1) + s_imgListIdx = SIC_LoadOverlayIcon(- IDI_SHELL_SHORTCUT); + /* FIXME should use icon index 29 instead of the + resource id, but not all icons are present yet + so we can't use icon indices */ + + if (s_imgListIdx != -1) + { + if (large) + ShortcutIcon = ImageList_GetIcon(ShellBigIconList, s_imgListIdx, ILD_TRANSPARENT); + else + ShortcutIcon = ImageList_GetIcon(ShellSmallIconList, s_imgListIdx, ILD_TRANSPARENT); + } else + ShortcutIcon = NULL; + + if (NULL == ShortcutIcon + || ! GetIconInfo(ShortcutIcon, &ShortcutIconInfo) + || 0 == GetObjectW(ShortcutIconInfo.hbmColor, sizeof(BITMAP), &ShortcutBitmapInfo)) + { + return NULL; + } + + TargetIconInfo = SourceIconInfo; + TargetIconInfo.hbmMask = NULL; + TargetIconInfo.hbmColor = NULL; + + /* Setup the source, shortcut and target masks */ + SourceDC = CreateCompatibleDC(NULL); + if (NULL == SourceDC) goto fail; + OldSourceBitmap = (HBITMAP)SelectObject(SourceDC, SourceIconInfo.hbmMask); + if (NULL == OldSourceBitmap) goto fail; + + ShortcutDC = CreateCompatibleDC(NULL); + if (NULL == ShortcutDC) goto fail; + OldShortcutBitmap = (HBITMAP)SelectObject(ShortcutDC, ShortcutIconInfo.hbmMask); + if (NULL == OldShortcutBitmap) goto fail; + + TargetDC = CreateCompatibleDC(NULL); + if (NULL == TargetDC) goto fail; + TargetIconInfo.hbmMask = CreateCompatibleBitmap(TargetDC, SourceBitmapInfo.bmWidth, + SourceBitmapInfo.bmHeight); + if (NULL == TargetIconInfo.hbmMask) goto fail; + ScreenDC = GetDC(NULL); + if (NULL == ScreenDC) goto fail; + TargetIconInfo.hbmColor = CreateCompatibleBitmap(ScreenDC, SourceBitmapInfo.bmWidth, + SourceBitmapInfo.bmHeight); + ReleaseDC(NULL, ScreenDC); + if (NULL == TargetIconInfo.hbmColor) goto fail; + OldTargetBitmap = (HBITMAP)SelectObject(TargetDC, TargetIconInfo.hbmMask); + if (NULL == OldTargetBitmap) goto fail; + + /* Create the target mask by ANDing the source and shortcut masks */ + if (! BitBlt(TargetDC, 0, 0, SourceBitmapInfo.bmWidth, SourceBitmapInfo.bmHeight, + SourceDC, 0, 0, SRCCOPY) || + ! BitBlt(TargetDC, 0, SourceBitmapInfo.bmHeight - ShortcutBitmapInfo.bmHeight, + ShortcutBitmapInfo.bmWidth, ShortcutBitmapInfo.bmHeight, + ShortcutDC, 0, 0, SRCAND)) + { + goto fail; + } + + /* Setup the source and target xor bitmap */ + if (NULL == SelectObject(SourceDC, SourceIconInfo.hbmColor) || + NULL == SelectObject(TargetDC, TargetIconInfo.hbmColor)) + { + goto fail; + } + + /* Copy the source color bitmap to the target */ + if (! BitBlt(TargetDC, 0, 0, SourceBitmapInfo.bmWidth, SourceBitmapInfo.bmHeight, + SourceDC, 0, 0, SRCCOPY)) goto fail; + + /* Copy the source xor bitmap to the target and clear out part of it by using + the shortcut mask */ + if (NULL == SelectObject(ShortcutDC, ShortcutIconInfo.hbmColor)) goto fail; + if (!MaskBlt(TargetDC, 0, SourceBitmapInfo.bmHeight - ShortcutBitmapInfo.bmHeight, + ShortcutBitmapInfo.bmWidth, ShortcutBitmapInfo.bmHeight, + ShortcutDC, 0, 0, ShortcutIconInfo.hbmMask, 0, 0, + MAKEROP4(SRCCOPY, 0xAA0000))) + { + goto fail; + } + + /* Clean up, we're not goto'ing to 'fail' after this so we can be lazy and not set + handles to NULL */ + SelectObject(TargetDC, OldTargetBitmap); + DeleteObject(TargetDC); + SelectObject(ShortcutDC, OldShortcutBitmap); + DeleteObject(ShortcutDC); + SelectObject(SourceDC, OldSourceBitmap); + DeleteObject(SourceDC); + + /* Create the icon using the bitmaps prepared earlier */ + TargetIcon = CreateIconIndirect(&TargetIconInfo); + + /* CreateIconIndirect copies the bitmaps, so we can release our bitmaps now */ + DeleteObject(TargetIconInfo.hbmColor); + DeleteObject(TargetIconInfo.hbmMask); + + return TargetIcon; + +fail: + /* Clean up scratch resources we created */ + if (NULL != OldTargetBitmap) SelectObject(TargetDC, OldTargetBitmap); + if (NULL != TargetIconInfo.hbmColor) DeleteObject(TargetIconInfo.hbmColor); + if (NULL != TargetIconInfo.hbmMask) DeleteObject(TargetIconInfo.hbmMask); + if (NULL != TargetDC) DeleteObject(TargetDC); + if (NULL != OldShortcutBitmap) SelectObject(ShortcutDC, OldShortcutBitmap); + if (NULL != ShortcutDC) DeleteObject(ShortcutDC); + if (NULL != OldSourceBitmap) SelectObject(SourceDC, OldSourceBitmap); + if (NULL != SourceDC) DeleteObject(SourceDC); + + return NULL; +} + +/***************************************************************************** + * SIC_IconAppend [internal] + * + * NOTES + * appends an icon pair to the end of the cache + */ +static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon, DWORD dwFlags) +{ LPSIC_ENTRY lpsice; + INT ret, index, index1; + WCHAR path[MAX_PATH]; + TRACE("%s %i %p %p\n", debugstr_w(sSourceFile), dwSourceIndex, hSmallIcon ,hBigIcon); + + lpsice = (LPSIC_ENTRY) SHAlloc (sizeof (SIC_ENTRY)); + + GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); + lpsice->sSourceFile = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, (wcslen(path)+1)*sizeof(WCHAR) ); + wcscpy( lpsice->sSourceFile, path ); + + lpsice->dwSourceIndex = dwSourceIndex; + lpsice->dwFlags = dwFlags; + + EnterCriticalSection(&SHELL32_SicCS); + + index = DPA_InsertPtr(sic_hdpa, 0x7fff, lpsice); + if ( INVALID_INDEX == index ) + { + HeapFree(GetProcessHeap(), 0, lpsice->sSourceFile); + SHFree(lpsice); + ret = INVALID_INDEX; + } + else + { + index = ImageList_AddIcon (ShellSmallIconList, hSmallIcon); + index1= ImageList_AddIcon (ShellBigIconList, hBigIcon); + + if (index!=index1) + { + FIXME("iconlists out of sync 0x%x 0x%x\n", index, index1); + } + lpsice->dwListIndex = index; + ret = lpsice->dwListIndex; + } + + LeaveCriticalSection(&SHELL32_SicCS); + return ret; +} +/**************************************************************************** + * SIC_LoadIcon [internal] + * + * NOTES + * gets small/big icon by number from a file + */ +static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags) +{ HICON hiconLarge=0; + HICON hiconSmall=0; + HICON hiconLargeShortcut; + HICON hiconSmallShortcut; + +#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) + static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; + + if (!PrivateExtractIconExW) { + HMODULE hUser32 = GetModuleHandleA("user32"); + PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); + } + + if (PrivateExtractIconExW) + PrivateExtractIconExW(sSourceFile, dwSourceIndex, &hiconLarge, &hiconSmall, 1); + else +#endif + { + PrivateExtractIconsW(sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, NULL, 1, 0); + PrivateExtractIconsW(sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, NULL, 1, 0); + } + + if ( !hiconLarge || !hiconSmall) + { + WARN("failure loading icon %i from %s (%p %p)\n", dwSourceIndex, debugstr_w(sSourceFile), hiconLarge, hiconSmall); + return -1; + } + + if (0 != (dwFlags & GIL_FORSHORTCUT)) + { + hiconLargeShortcut = SIC_OverlayShortcutImage(hiconLarge, TRUE); + hiconSmallShortcut = SIC_OverlayShortcutImage(hiconSmall, FALSE); + if (NULL != hiconLargeShortcut && NULL != hiconSmallShortcut) + { + hiconLarge = hiconLargeShortcut; + hiconSmall = hiconSmallShortcut; + } + else + { + WARN("Failed to create shortcut overlayed icons\n"); + if (NULL != hiconLargeShortcut) DestroyIcon(hiconLargeShortcut); + if (NULL != hiconSmallShortcut) DestroyIcon(hiconSmallShortcut); + dwFlags &= ~ GIL_FORSHORTCUT; + } + } + + return SIC_IconAppend (sSourceFile, dwSourceIndex, hiconSmall, hiconLarge, dwFlags); +} +/***************************************************************************** + * SIC_GetIconIndex [internal] + * + * Parameters + * sSourceFile [IN] filename of file containing the icon + * index [IN] index/resID (negated) in this file + * + * NOTES + * look in the cache for a proper icon. if not available the icon is taken + * from the file and cached + */ +INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags ) +{ + SIC_ENTRY sice; + INT ret, index = INVALID_INDEX; + WCHAR path[MAX_PATH]; + + TRACE("%s %i\n", debugstr_w(sSourceFile), dwSourceIndex); + + GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); + sice.sSourceFile = path; + sice.dwSourceIndex = dwSourceIndex; + sice.dwFlags = dwFlags; + + EnterCriticalSection(&SHELL32_SicCS); + + if (NULL != DPA_GetPtr (sic_hdpa, 0)) + { + /* search linear from position 0*/ + index = DPA_Search (sic_hdpa, &sice, 0, SIC_CompareEntries, 0, 0); + } + + if ( INVALID_INDEX == index ) + { + ret = SIC_LoadIcon (sSourceFile, dwSourceIndex, dwFlags); + } + else + { + TRACE("-- found\n"); + ret = ((LPSIC_ENTRY)DPA_GetPtr(sic_hdpa, index))->dwListIndex; + } + + LeaveCriticalSection(&SHELL32_SicCS); + return ret; +} +/***************************************************************************** + * SIC_Initialize [internal] + */ +BOOL SIC_Initialize(void) +{ + HICON hSm = NULL, hLg = NULL; + INT cx_small, cy_small; + INT cx_large, cy_large; + HDC hDC; + INT bpp; + DWORD ilMask; + + TRACE("Entered SIC_Initialize\n"); + + if (sic_hdpa) + { + TRACE("Icon cache already initialized\n"); + return TRUE; + } + + sic_hdpa = DPA_Create(16); + if (!sic_hdpa) + { + return FALSE; + } + + hDC = CreateICW(L"DISPLAY", NULL, NULL, NULL); + if (!hDC) + { + ERR("Failed to create information context (error %d)\n", GetLastError()); + return FALSE; + } + + bpp = GetDeviceCaps(hDC, BITSPIXEL); + ReleaseDC(NULL, hDC); + + if (bpp <= 4) + ilMask = ILC_COLOR4; + else if (bpp <= 8) + ilMask = ILC_COLOR8; + else if (bpp <= 16) + ilMask = ILC_COLOR16; + else if (bpp <= 24) + ilMask = ILC_COLOR24; + else if (bpp <= 32) + ilMask = ILC_COLOR32; + else + ilMask = ILC_COLOR; + + ilMask |= ILC_MASK; + + cx_small = GetSystemMetrics(SM_CXSMICON); + cy_small = GetSystemMetrics(SM_CYSMICON); + cx_large = GetSystemMetrics(SM_CXICON); + cy_large = GetSystemMetrics(SM_CYICON); + + ShellSmallIconList = ImageList_Create(cx_small, + cy_small, + ilMask, + 100, + 100); + + ShellBigIconList = ImageList_Create(cx_large, + cy_large, + ilMask, + 100, + 100); + if (ShellSmallIconList) + { + /* Load the document icon, which is used as the default if an icon isn't found. */ + hSm = (HICON)LoadImageW(shell32_hInstance, + MAKEINTRESOURCEW(IDI_SHELL_DOCUMENT), + IMAGE_ICON, + cx_small, + cy_small, + LR_SHARED | LR_DEFAULTCOLOR); + if (!hSm) + { + ERR("Failed to load IDI_SHELL_DOCUMENT icon1!\n"); + return FALSE; + } + } + else + { + ERR("Failed to load ShellSmallIconList\n"); + return FALSE; + } + + if (ShellBigIconList) + { + hLg = (HICON)LoadImageW(shell32_hInstance, + MAKEINTRESOURCEW(IDI_SHELL_DOCUMENT), + IMAGE_ICON, + cx_large, + cy_large, + LR_SHARED | LR_DEFAULTCOLOR); + if (!hLg) + { + ERR("Failed to load IDI_SHELL_DOCUMENT icon2!\n"); + DestroyIcon(hSm); + return FALSE; + } + } + else + { + ERR("Failed to load ShellBigIconList\n"); + return FALSE; + } + + SIC_IconAppend(swShell32Name, IDI_SHELL_DOCUMENT-1, hSm, hLg, 0); + SIC_IconAppend(swShell32Name, -IDI_SHELL_DOCUMENT, hSm, hLg, 0); + + TRACE("hIconSmall=%p hIconBig=%p\n",ShellSmallIconList, ShellBigIconList); + + return TRUE; +} +/************************************************************************* + * SIC_Destroy + * + * frees the cache + */ +static INT CALLBACK sic_free( LPVOID ptr, LPVOID lparam ) +{ + HeapFree(GetProcessHeap(), 0, ((LPSIC_ENTRY)ptr)->sSourceFile); + SHFree(ptr); + return TRUE; +} + +void SIC_Destroy(void) +{ + TRACE("\n"); + + EnterCriticalSection(&SHELL32_SicCS); + + if (sic_hdpa) DPA_DestroyCallback(sic_hdpa, sic_free, NULL ); + + sic_hdpa = NULL; + ImageList_Destroy(ShellSmallIconList); + ShellSmallIconList = 0; + ImageList_Destroy(ShellBigIconList); + ShellBigIconList = 0; + + LeaveCriticalSection(&SHELL32_SicCS); + //DeleteCriticalSection(&SHELL32_SicCS); //static +} + +/***************************************************************************** + * SIC_LoadOverlayIcon [internal] + * + * Load a shell overlay icon and return its icon cache index. + */ +static int SIC_LoadOverlayIcon(int icon_idx) +{ + WCHAR buffer[1024], wszIdx[8]; + HKEY hKeyShellIcons; + LPCWSTR iconPath; + int iconIdx; + + static const WCHAR wszShellIcons[] = { + 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'E','x','p','l','o','r','e','r','\\','S','h','e','l','l',' ','I','c','o','n','s',0 + }; + static const WCHAR wszNumFmt[] = {'%','d',0}; + + iconPath = swShell32Name; /* default: load icon from shell32.dll */ + iconIdx = icon_idx; + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszShellIcons, 0, KEY_READ, &hKeyShellIcons) == ERROR_SUCCESS) + { + DWORD count = sizeof(buffer); + + swprintf(wszIdx, wszNumFmt, icon_idx); + + /* read icon path and index */ + if (RegQueryValueExW(hKeyShellIcons, wszIdx, NULL, NULL, (LPBYTE)buffer, &count) == ERROR_SUCCESS) + { + LPWSTR p = wcschr(buffer, ','); + + if (p) + *p++ = 0; + + iconPath = buffer; + iconIdx = _wtoi(p); + } + + RegCloseKey(hKeyShellIcons); + } + + return SIC_LoadIcon(iconPath, iconIdx, 0); +} + +/************************************************************************* + * Shell_GetImageLists [SHELL32.71] + * + * PARAMETERS + * imglist[1|2] [OUT] pointer which receives imagelist handles + * + */ +BOOL WINAPI Shell_GetImageLists(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList) +{ TRACE("(%p,%p)\n",lpBigList,lpSmallList); + if (lpBigList) + { *lpBigList = ShellBigIconList; + } + if (lpSmallList) + { *lpSmallList = ShellSmallIconList; + } + + return TRUE; +} +/************************************************************************* + * PidlToSicIndex [INTERNAL] + * + * PARAMETERS + * sh [IN] IShellFolder + * pidl [IN] + * bBigIcon [IN] + * uFlags [IN] GIL_* + * pIndex [OUT] index within the SIC + * + */ +BOOL PidlToSicIndex ( + IShellFolder * sh, + LPCITEMIDLIST pidl, + BOOL bBigIcon, + UINT uFlags, + int * pIndex) +{ + CComPtr ei; + WCHAR szIconFile[MAX_PATH]; /* file containing the icon */ + INT iSourceIndex; /* index or resID(negated) in this file */ + BOOL ret = FALSE; + UINT dwFlags = 0; + int iShortcutDefaultIndex = INVALID_INDEX; + + TRACE("sf=%p pidl=%p %s\n", sh, pidl, bBigIcon?"Big":"Small"); + + if (SUCCEEDED (sh->GetUIObjectOf(0, 1, &pidl, IID_IExtractIconW, 0, (void **)&ei))) + { + if (SUCCEEDED(ei->GetIconLocation(uFlags, szIconFile, MAX_PATH, &iSourceIndex, &dwFlags))) + { + *pIndex = SIC_GetIconIndex(szIconFile, iSourceIndex, uFlags); + ret = TRUE; + } + } + + if (INVALID_INDEX == *pIndex) /* default icon when failed */ + { + if (0 == (uFlags & GIL_FORSHORTCUT)) + { + *pIndex = 0; + } + else + { + if (INVALID_INDEX == iShortcutDefaultIndex) + { + iShortcutDefaultIndex = SIC_LoadIcon(swShell32Name, 0, GIL_FORSHORTCUT); + } + *pIndex = (INVALID_INDEX != iShortcutDefaultIndex ? iShortcutDefaultIndex : 0); + } + } + + return ret; + +} + +/************************************************************************* + * SHMapPIDLToSystemImageListIndex [SHELL32.77] + * + * PARAMETERS + * sh [IN] pointer to an instance of IShellFolder + * pidl [IN] + * pIndex [OUT][OPTIONAL] SIC index for big icon + * + */ +int WINAPI SHMapPIDLToSystemImageListIndex( + IShellFolder *sh, + LPCITEMIDLIST pidl, + int *pIndex) +{ + int Index; + UINT uGilFlags = 0; + + TRACE("(SF=%p,pidl=%p,%p)\n",sh,pidl,pIndex); + pdump(pidl); + + if (SHELL_IsShortcut(pidl)) + uGilFlags |= GIL_FORSHORTCUT; + + if (pIndex) + if (!PidlToSicIndex ( sh, pidl, 1, uGilFlags, pIndex)) + *pIndex = -1; + + if (!PidlToSicIndex ( sh, pidl, 0, uGilFlags, &Index)) + return -1; + + return Index; +} + +/************************************************************************* + * SHMapIDListToImageListIndexAsync [SHELL32.148] + */ +EXTERN_C HRESULT WINAPI SHMapIDListToImageListIndexAsync(IShellTaskScheduler *pts, IShellFolder *psf, + LPCITEMIDLIST pidl, UINT flags, + PFNASYNCICONTASKBALLBACK pfn, void *pvData, void *pvHint, + int *piIndex, int *piIndexSel) +{ + FIXME("(%p, %p, %p, 0x%08x, %p, %p, %p, %p, %p)\n", + pts, psf, pidl, flags, pfn, pvData, pvHint, piIndex, piIndexSel); + return E_FAIL; +} + +/************************************************************************* + * Shell_GetCachedImageIndex [SHELL32.72] + * + */ +INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, UINT bSimulateDoc) +{ + INT ret, len; + LPWSTR szTemp; + + WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_a(szPath), nIndex, bSimulateDoc); + + len = MultiByteToWideChar( CP_ACP, 0, szPath, -1, NULL, 0 ); + szTemp = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, szPath, -1, szTemp, len ); + + ret = SIC_GetIconIndex( szTemp, nIndex, 0 ); + + HeapFree( GetProcessHeap(), 0, szTemp ); + + return ret; +} + +INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc) +{ + WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_w(szPath), nIndex, bSimulateDoc); + + return SIC_GetIconIndex(szPath, nIndex, 0); +} + +EXTERN_C INT WINAPI Shell_GetCachedImageIndexAW(LPCVOID szPath, INT nIndex, BOOL bSimulateDoc) +{ if( SHELL_OsIsUnicode()) + return Shell_GetCachedImageIndexW((LPCWSTR)szPath, nIndex, bSimulateDoc); + return Shell_GetCachedImageIndexA((LPCSTR)szPath, nIndex, bSimulateDoc); +} + +/************************************************************************* + * ExtractIconExW [SHELL32.@] + * RETURNS + * 0 no icon found + * -1 file is not valid + * or number of icons extracted + */ +UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) +{ + /* get entry point of undocumented function PrivateExtractIconExW() in user32 */ +#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) + static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; + + if (!PrivateExtractIconExW) { + HMODULE hUser32 = GetModuleHandleA("user32"); + PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); + + if (!PrivateExtractIconExW) + return 0; + } +#endif + + TRACE("%s %i %p %p %i\n", debugstr_w(lpszFile), nIconIndex, phiconLarge, phiconSmall, nIcons); + + return PrivateExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); +} + +/************************************************************************* + * ExtractIconExA [SHELL32.@] + */ +UINT WINAPI ExtractIconExA(LPCSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) +{ + UINT ret = 0; + INT len = MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, NULL, 0); + LPWSTR lpwstrFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("%s %i %p %p %i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); + + if (lpwstrFile) + { + MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); + ret = ExtractIconExW(lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIcons); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + } + return ret; +} + +/************************************************************************* + * ExtractAssociatedIconA (SHELL32.@) + * + * Return icon for given file (either from file itself or from associated + * executable) and patch parameters if needed. + */ +HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon) +{ + HICON hIcon = NULL; + INT len = MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, NULL, 0); + /* Note that we need to allocate MAX_PATH, since we are supposed to fill + * the correct executable if there is no icon in lpIconPath directly. + * lpIconPath itself is supposed to be large enough, so make sure lpIconPathW + * is large enough too. Yes, I am puking too. + */ + LPWSTR lpIconPathW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); + + TRACE("%p %s %p\n", hInst, debugstr_a(lpIconPath), lpiIcon); + + if (lpIconPathW) + { + MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, lpIconPathW, len); + hIcon = ExtractAssociatedIconW(hInst, lpIconPathW, lpiIcon); + WideCharToMultiByte(CP_ACP, 0, lpIconPathW, -1, lpIconPath, MAX_PATH , NULL, NULL); + HeapFree(GetProcessHeap(), 0, lpIconPathW); + } + return hIcon; +} + +/************************************************************************* + * ExtractAssociatedIconW (SHELL32.@) + * + * Return icon for given file (either from file itself or from associated + * executable) and patch parameters if needed. + */ +HICON WINAPI ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon) +{ + HICON hIcon = NULL; + WORD wDummyIcon = 0; + + TRACE("%p %s %p\n", hInst, debugstr_w(lpIconPath), lpiIcon); + + if(lpiIcon == NULL) + lpiIcon = &wDummyIcon; + + hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); + + if( hIcon < (HICON)2 ) + { if( hIcon == (HICON)1 ) /* no icons found in given file */ + { WCHAR tempPath[MAX_PATH]; + HINSTANCE uRet = FindExecutableW(lpIconPath,NULL,tempPath); + + if( uRet > (HINSTANCE)32 && tempPath[0] ) + { wcscpy(lpIconPath,tempPath); + hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); + if( hIcon > (HICON)2 ) + return hIcon; + } + } + + if( hIcon == (HICON)1 ) + *lpiIcon = 2; /* MSDOS icon - we found .exe but no icons in it */ + else + *lpiIcon = 6; /* generic icon - found nothing */ + + if (GetModuleFileNameW(hInst, lpIconPath, MAX_PATH)) + hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(*lpiIcon)); + } + return hIcon; +} + +/************************************************************************* + * ExtractAssociatedIconExW (SHELL32.@) + * + * Return icon for given file (either from file itself or from associated + * executable) and patch parameters if needed. + */ +EXTERN_C HICON WINAPI ExtractAssociatedIconExW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIconIdx, LPWORD lpiIconId) +{ + FIXME("%p %s %p %p): stub\n", hInst, debugstr_w(lpIconPath), lpiIconIdx, lpiIconId); + return 0; +} + +/************************************************************************* + * ExtractAssociatedIconExA (SHELL32.@) + * + * Return icon for given file (either from file itself or from associated + * executable) and patch parameters if needed. + */ +EXTERN_C HICON WINAPI ExtractAssociatedIconExA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIconIdx, LPWORD lpiIconId) +{ + HICON ret; + INT len = MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, NULL, 0 ); + LPWSTR lpwstrFile = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + + TRACE("%p %s %p %p)\n", hInst, lpIconPath, lpiIconIdx, lpiIconId); + + MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, lpwstrFile, len ); + ret = ExtractAssociatedIconExW(hInst, lpwstrFile, lpiIconIdx, lpiIconId); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + return ret; +} + + +/**************************************************************************** + * SHDefExtractIconW [SHELL32.@] + */ +HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, + HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize) +{ + UINT ret; + HICON hIcons[2]; + WARN("%s %d 0x%08x %p %p %d, semi-stub\n", debugstr_w(pszIconFile), iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); + + ret = PrivateExtractIconsW(pszIconFile, iIndex, nIconSize, nIconSize, hIcons, NULL, 2, LR_DEFAULTCOLOR); + /* FIXME: deal with uFlags parameter which contains GIL_ flags */ + if (ret == 0xFFFFFFFF) + return E_FAIL; + if (ret > 0) { + if (phiconLarge) + *phiconLarge = hIcons[0]; + else + DestroyIcon(hIcons[0]); + if (phiconSmall) + *phiconSmall = hIcons[1]; + else + DestroyIcon(hIcons[1]); + return S_OK; + } + return S_FALSE; +} + +/**************************************************************************** + * SHDefExtractIconA [SHELL32.@] + */ +HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags, + HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize) +{ + HRESULT ret; + INT len = MultiByteToWideChar(CP_ACP, 0, pszIconFile, -1, NULL, 0); + LPWSTR lpwstrFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("%s %d 0x%08x %p %p %d\n", pszIconFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); + + MultiByteToWideChar(CP_ACP, 0, pszIconFile, -1, lpwstrFile, len); + ret = SHDefExtractIconW(lpwstrFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + return ret; +} + +/**************************************************************************** + * SHGetIconOverlayIndexA [SHELL32.@] + * + * Returns the index of the overlay icon in the system image list. + */ +EXTERN_C INT WINAPI SHGetIconOverlayIndexA(LPCSTR pszIconPath, INT iIconIndex) +{ + FIXME("%s, %d\n", debugstr_a(pszIconPath), iIconIndex); + + return -1; +} + +/**************************************************************************** + * SHGetIconOverlayIndexW [SHELL32.@] + * + * Returns the index of the overlay icon in the system image list. + */ +EXTERN_C INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex) +{ + FIXME("%s, %d\n", debugstr_w(pszIconPath), iIconIndex); + + return -1; +} diff --git a/dll/win32/shell32_new/lang/bg-BG.rc b/dll/win32/shell32_new/lang/bg-BG.rc new file mode 100644 index 00000000000..13a9bdb9f44 --- /dev/null +++ b/dll/win32/shell32_new/lang/bg-BG.rc @@ -0,0 +1,761 @@ +/* Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "& ", FCIDM_SHVIEW_BIGICON + MENUITEM "& ", FCIDM_SHVIEW_SMALLICON + MENUITEM "&", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW +END + +// shellview background menu +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&" + BEGIN + MENUITEM "& ", FCIDM_SHVIEW_BIGICON + MENUITEM "& ", FCIDM_SHVIEW_SMALLICON + MENUITEM "&", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP " &" + BEGIN + MENUITEM " &", 0x30 // column 0 + MENUITEM " &", 0x32 // column 2 + MENUITEM " &", 0x31 // ... + MENUITEM " &", 0x33 + MENUITEM SEPARATOR + MENUITEM "&", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM " ", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "", FCIDM_SHVIEW_INSERT + MENUITEM " ", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "", FCIDM_SHVIEW_PROPERTIES + END +END + +// shellview item menu +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&", FCIDM_SHVIEW_EXPLORE + MENUITEM "&", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&", FCIDM_SHVIEW_CUT + MENUITEM "&", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM " &", FCIDM_SHVIEW_CREATELINK + MENUITEM "&", FCIDM_SHVIEW_DELETE + MENUITEM "&", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT ":", IDD_FOLDER, 10, 156, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "& ", IDD_MAKENEWFOLDER, 10, 174, 92, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON " &", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&" , IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION " %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT " " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT " :", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT " :", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT " , :", IDC_STATIC, 0, 0, 250, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT " , , .", 12289, 36, 11, 182, 18 + LTEXT "&:", 12305, 7, 39, 40, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 46, 37, 180, 100 + DEFPUSHBUTTON "", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 5, 30, 30, WS_VISIBLE + LTEXT " :", 14004, 10, 30, 60, 10 + LTEXT "", 14005, 70, 30, 150, 10 + LTEXT " :", 14006, 10, 40, 60, 10 + LTEXT "", 14007, 70, 40, 150, 10 + LTEXT ":", 14008, 10, 55, 55, 10 + EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT | ES_AUTOHSCROLL + LTEXT " :",14010, 10, 65, 55, 10 + EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT | ES_AUTOHSCROLL + LTEXT " &:", 14014, 10, 80, 55, 10 + EDITTEXT 14015, 70, 80, 150, 10, ES_LEFT + LTEXT ":", 14016, 10, 90, 55, 10 + EDITTEXT 14017, 70, 90, 150, 10, ES_AUTOHSCROLL + LTEXT ":", 14018, 10, 100, 55, 10 + EDITTEXT 14019, 70, 100, 150, 10, ES_LEFT | ES_AUTOHSCROLL + PUSHBUTTON "& ...", 14020, 10, 115, 75, 14, ES_LEFT + PUSHBUTTON "& ...", 14021, 86, 115, 72, 14, ES_LEFT + PUSHBUTTON "&...", 14022, 160, 115, 60, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 260, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT " .", -1, 5, 30, 246, 10 + CHECKBOX " ", 14000, 30, 50, 150, 10 + LTEXT " , .", -1, 50, 60, 200, 40 + CHECKBOX " ", 14001, 30, 100, 170, 10, WS_DISABLED + PUSHBUTTON "", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT " :", 14004, 8, 35, 50, 10 + LTEXT "", 14005, 68, 35, 160, 10 + LTEXT ":", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT ":", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT ":", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT ":", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "& ", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT " :", 14004, 8, 35, 50, 10 + LTEXT "", 14005, 68, 35, 160, 10 + LTEXT " :", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT ":", 14008, 8, 72, 61, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT ":", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT ":", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT ":", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT ":", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "", 14020, 8, 189, 60, 10 + CHECKBOX " &", 14021, 61, 189, 67, 10 + CHECKBOX "&", 14022, 129, 189, 50, 10 + CHECKBOX "&", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT " : ", 14000, 10, 10, 67, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT ": ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT " : ", 14004, 10, 46, 68, 16 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX " ", 14006, 6, 70, 222, 115 + LTEXT " : ", 14007, 13, 82, 90, 10 + LTEXT ": ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT ":", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT " :", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT " :", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT " :", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT ":", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT " %s", 14009, 100, 170, 40, 10 + PUSHBUTTON " ", 14010, 150, 175, 80, 15, WS_TABSTOP + CHECKBOX " ", 14011, 1, 205, 238, 10, WS_DISABLED + CHECKBOX " - ", 14012, 1, 220, 238, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX " ", -1, 5, 5, 230, 60 + LTEXT " .", -1, 40, 25, 160, 20 + PUSHBUTTON " ...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "", -1, 5, 65, 230, 60 + LTEXT " () ", -1, 40, 85, 160, 20 + PUSHBUTTON " ...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "", -1, 5, 130, 230, 60 + LTEXT " .", -1, 40, 150, 160, 20 + PUSHBUTTON " ", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 130 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT " ?", -1, 10, 20, 220, 20 + CHECKBOX " %s", 14000, 10, 45, 150, 10 + LTEXT " ", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX " , .", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX " :", 14002, 10, 100, 90, 10 + LTEXT ":", -1, 20, 115, 60, 10 + COMBOBOX 14003, 70, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT ":", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX " ", -1, 10, 72, 220, 70 + RADIOBUTTON "& :", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT " ():", -1, 20, 105, 70, 10 + RADIOBUTTON " , .", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "& ", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT " , :", -1, 44, 12, 211, 10 + LTEXT ": ", 14001, 44, 25, 188, 10 + GROUPBOX "&", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "& .", 14003, 20, 193, 225, 10 + PUSHBUTTON "&...", 14004, 198, 207, 50, 14 + PUSHBUTTON "", 14005, 150, 236, 50, 14 + PUSHBUTTON "", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON " ", 14001, 20, 25, 210, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON " Windows", 14002, 20, 37, 210, 10, WS_TABSTOP | WS_GROUP + GROUPBOX " ", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON " & ", 14004, 20, 70, 210, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON " & ", 14005, 20, 82, 210, 10, WS_TABSTOP | WS_GROUP + GROUPBOX " :", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "& ( )", 14007, 20, 120, 210, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON " & ", 14008, 30, 220, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON " &", 14009, 30, 144, 220, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "& ( )", 14010, 20, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON " &", 14011, 160, 180, 75, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX " ", -1, 7, 10, 249, 60 +//ICON +LTEXT " ( \n ) .", -1, 60, 20, 190, 20 +PUSHBUTTON " & ", 14001, 20, 50, 115, 14, WS_TABSTOP +PUSHBUTTON "& ", 14002, 140, 50, 115, 14, WS_TABSTOP +LTEXT " ", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON " &", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT " & :", -1, 7, 10, 170, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX " '%s'", 14003, 7, 130, 249, 70 +LTEXT " :", -1, 12, 140, 40, 10 +//ICON +LTEXT " ", 14005, 100, 140, 40, 10 +PUSHBUTTON "&...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT " '%s' '%s'.\n , '%s'\n, .", 14007, 12, 155, 160, 32 +PUSHBUTTON "&", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&", IDYES, 20, 122, 60, 14 + PUSHBUTTON " &", 12807, 85, 122, 60, 14 + PUSHBUTTON "&", IDNO, 150, 122, 60, 14 + PUSHBUTTON "", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT " '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT " '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT " '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT " ", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "( )", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT " ?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "( )", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT " , ?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&", IDOK, 57, 40, 60, 14 + PUSHBUTTON "", IDCANCEL, 122, 40, 60, 14 +END + + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT " , ?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&", IDOK, 57, 40, 60, 14 + PUSHBUTTON "", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "& , , , :", 1000, 7, 2, 215, 24 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "", -1, 7, 45, 212, 146 + AUTORADIOBUTTON " &:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON " & ", 1006, 14, 177, 202, 10 + PUSHBUTTON "& &", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT " .", 1001, 32, 7, 191, 20 + LTEXT " ?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "", IDOK, 96, 186, 60, 14 + PUSHBUTTON "", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 2, 21, 24 + LTEXT " :", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT " ?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX " .", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "", IDOK, 96, 185, 60, 14 + PUSHBUTTON "", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT " .", 1001, 32, 7, 190, 22 + LTEXT "& ?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX " & ", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "", IDOK, 94, 160, 60, 14 + PUSHBUTTON "", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT " ?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT " , . ", 8225, 37, 40, 167, 40 + DEFPUSHBUTTON "", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION " ()" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&", IDCANCEL, 118, 198, 60, 14 + LTEXT "&:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "& ", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "& ", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT " & :", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "& ", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "& ", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "& ", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 244, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "", IDOK, 53, 100, 60, 14 + GROUPBOX " ", -1, 7, 6, 229, 50 + PUSHBUTTON "", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX " ", 14000, 16, 15, 210, 10 + AUTOCHECKBOX "& ", 14001, 16, 30, 210, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 42, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT " :", -1, 7, 14, 208, 10 + PUSHBUTTON "...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT ":", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "",IDOK, 107, 181,50, 14 + PUSHBUTTON "",IDCANCEL, 167, 181, 50, 14 +END + + +STRINGTABLE DISCARDABLE +BEGIN + // columns in the shellview + IDS_SHV_COLUMN1 "" + IDS_SHV_COLUMN2 "" + IDS_SHV_COLUMN3 "" + IDS_SHV_COLUMN4 "" + IDS_SHV_COLUMN5 "" + IDS_SHV_COLUMN6 "" + IDS_SHV_COLUMN7 " " + IDS_SHV_COLUMN8 "" + IDS_SHV_COLUMN9 "" + IDS_SHV_COLUMN10 "" + IDS_SHV_COLUMN11 "" + IDS_SHV_COLUMN12 " " + IDS_SHV_COLUMN13 "" + IDS_SHV_COLUMN_DELFROM " " + IDS_SHV_COLUMN_DELDATE " " + IDS_SHV_COLUMN_FONTTYPE " " + IDS_SHV_COLUMN_WORKGROUP " " + IDS_SHV_NETWORKLOCATION " " + IDS_SHV_COLUMN_DOCUMENTS "" + IDS_SHV_COLUMN_STATUS "" + IDS_SHV_COLUMN_COMMENTS "" + IDS_SHV_COLUMN_LOCATION "" + IDS_SHV_COLUMN_MODEL "" + + // special folders + IDS_DESKTOP " " + IDS_MYCOMPUTER " " + IDS_RECYCLEBIN_FOLDER_NAME "" + IDS_CONTROLPANEL " " + IDS_ADMINISTRATIVETOOLS " " + + // context menus + IDS_VIEW_LARGE "& " + IDS_VIEW_SMALL "& " + IDS_VIEW_LIST "&" + IDS_VIEW_DETAILS "&" + IDS_SELECT "" + IDS_OPEN "" + IDS_CREATELINK " &" + IDS_COPY "&" + IDS_DELETE "&" + IDS_PROPERTIES "&" + IDS_CUT "&" + IDS_RESTORE "" + IDS_FORMATDRIVE "..." + IDS_RENAME "" + IDS_INSERT "" + + IDS_CREATEFOLDER_DENIED " : ." + IDS_CREATEFOLDER_CAPTION " " + IDS_DELETEITEM_CAPTION " " + IDS_DELETEFOLDER_CAPTION " " + IDS_DELETEITEM_TEXT " , '%1'?" + IDS_DELETEMULTIPLE_TEXT " , %1 ?" + IDS_DELETESELECTED_TEXT " ?" + IDS_TRASHITEM_TEXT " '%1' ?" + IDS_TRASHFOLDER_TEXT " '%1' ?" + IDS_TRASHMULTIPLE_TEXT " %1 ?" + IDS_CANTTRASH_TEXT " '%1' . ?" + IDS_OVERWRITEFILE_TEXT " '%1'.\n\n ?" + IDS_OVERWRITEFILE_CAPTION " " + IDS_OVERWRITEFOLDER_TEXT " '%1'.\n\n"\ + " \n"\ + " , . \n"\ + " ?" + + // message box strings + IDS_RESTART_TITLE "" + IDS_RESTART_PROMPT " ?" + IDS_SHUTDOWN_TITLE "" + IDS_SHUTDOWN_PROMPT " ?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + // shell folder path default values + IDS_PROGRAMS " \\" + IDS_PERSONAL "" + IDS_FAVORITES "" + IDS_STARTUP " \\\\" + IDS_RECENT "" + IDS_SENDTO "" + IDS_STARTMENU " " + IDS_MYMUSIC " " + IDS_MYVIDEO " " + IDS_DESKTOPDIRECTORY " " + IDS_NETHOOD " " + IDS_TEMPLATES "" + IDS_APPDATA " " + IDS_PRINTHOOD " " + IDS_LOCAL_APPDATA " \\ " + IDS_INTERNET_CACHE " \\Temporary Internet Files" + IDS_COOKIES "" + IDS_HISTORY " \\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES " " + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "" + IDS_ADMINTOOLS " \\\\ " + IDS_COMMON_MUSIC "\\ " + IDS_COMMON_PICTURES "\\ " + IDS_COMMON_VIDEO "\\ " + IDS_CDBURN_AREA " \\ \\Microsoft\\CD Burning" + IDS_NETWORKPLACE " " + + IDS_NEWFOLDER " " + + IDS_DRIVE_FIXED " " + IDS_DRIVE_CDROM " " + IDS_DRIVE_NETWORK " " + + IDS_OPEN_WITH " " + IDS_OPEN_WITH_CHOOSE " ..." + + IDS_SHELL_ABOUT_AUTHORS "&" + IDS_SHELL_ABOUT_BACK "< &" + FCIDM_SHVIEW_NEW "" + FCIDM_SHVIEW_NEWFOLDER " &" + FCIDM_SHVIEW_NEWLINK " &" + IDS_FOLDER_OPTIONS " " + IDS_RECYCLEBIN_LOCATION " " + IDS_RECYCLEBIN_DISKSPACE " " + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE " " + IDS_PICK_ICON_FILTER " (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER " \0*.exe\0" + IDS_DIRECTORY "" + IDS_VIRTUAL_DRIVER " " + IDS_BAT_FILE " " + IDS_CMD_FILE " " + IDS_COM_FILE " " + IDS_CPL_FILE " " + IDS_CUR_FILE "" + IDS_DLL_FILE " " + IDS_DRV_FILE " " + IDS_EXE_FILE "" + IDS_FON_FILE " " + IDS_TTF_FILE " TrueType " + IDS_HLP_FILE " " + IDS_INI_FILE " " + IDS_LNK_FILE "" + IDS_SYS_FILE " " + + IDS_OPEN_VERB "" + IDS_RUNAS_VERB " " + IDS_EDIT_VERB "" + IDS_FIND_VERB "" + IDS_PRINT_VERB "" + IDS_PLAY_VERB "" + IDS_PREVIEW_VERB "" + + IDS_FILE_FOLDER "%u , %u " + IDS_PRINTERS "" + IDS_FONTS "" + IDS_INSTALLNEWFONT " ..." + + IDS_DEFAULT_CLUSTER_SIZE " " + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END + + + + diff --git a/dll/win32/shell32_new/lang/ca-ES.rc b/dll/win32/shell32_new/lang/ca-ES.rc new file mode 100644 index 00000000000..214028e7d8e --- /dev/null +++ b/dll/win32/shell32_new/lang/ca-ES.rc @@ -0,0 +1,756 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Quant a %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "D'Acord", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS ha estat construit per:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Size" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modified" + IDS_SHV_COLUMN5 "Attributes" + IDS_SHV_COLUMN6 "Size" + IDS_SHV_COLUMN7 "Size available" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "Cut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/cs-CZ.rc b/dll/win32/shell32_new/lang/cs-CZ.rc new file mode 100644 index 00000000000..dff2e85bff0 --- /dev/null +++ b/dll/win32/shell32_new/lang/cs-CZ.rc @@ -0,0 +1,743 @@ +/* FILE: dll/win32/shell32/lang/cs-CZ.rc + * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) + * UPDATED: 2010-05-25 + * THANKS TO: navaraf, who translated major part of this file + */ + +LANGUAGE LANG_CZECH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Vedle sebe", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Seznam", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "Z&obrazit" + BEGIN + MENUITEM "&Vedle sebe", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Seznam", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Seadit &ikony" + BEGIN + MENUITEM "Podle &Nzvu", 0x30 /* column 0 */ + MENUITEM "Podle &Typu", 0x32 /* column 2 */ + MENUITEM "Podle &Velikosti", 0x31 /* ... */ + MENUITEM "Podle &Data", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Rovnat automaticky", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Zarovnat ikony", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "A&ktualizovat", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "V&loit", FCIDM_SHVIEW_INSERT + MENUITEM "Vloit zst&upce", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "&Vlastnosti", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "P&rozkoumat", FCIDM_SHVIEW_EXPLORE + MENUITEM "O&tevt", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "Vyj&mout", FCIDM_SHVIEW_CUT + MENUITEM "&Koprovat", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Vytvoit zstupc&e", FCIDM_SHVIEW_CREATELINK + MENUITEM "O&dstranit", FCIDM_SHVIEW_DELETE + MENUITEM "&Pejmenovat", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Vlastnosti", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Prochzet..." +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Storno", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Prochzet pro sloku" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Sloka:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Vytvoit novou sloku", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Storno", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Zprva" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Ano", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Ano &vem", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ne", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Storno", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "O aplikaci %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Verze " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Tato verze ReactOS je zaregistrovna na:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Instalovan fyzick pam:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS je dlem:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Zadejte nzev programu, sloky, dokumentu, nebo zdroje v sti Internet a ReactOS jej pro vs oteve.", 12289, 36, 11, 182, 18 + LTEXT "&Otevt:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Storno", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Prochzet...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Zstupce" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Typ cle:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Umstn cle:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "&Cl:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Spustit v:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Klvesov zk&ratka:", 14014, 8, 115, 57, 10 //FIXME: momentalne se zalamuje a druhe slovo neni videt + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Spustit:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "&Koment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Najt cl...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Zmnit ikonu...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "R&ozen...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Rozen vlastnosti" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Zvolte rozen vlastnosti, kter poadujtete pro tohoto zstupce.", -1, 5, 30, 210, 10 + CHECKBOX "Spustit s jinmi povenmi", 14000, 25, 50, 150, 10 + LTEXT "Tato monost umon spustit tohoto zstupce jako jin uivatel nebo pi sputn se souasnm uivatelem chrnit pota ped nepovolenou aktivitou programu.", -1, 50, 60, 175, 40 + CHECKBOX "Spustit v oddlenm pamovm prostoru", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Storno", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Obecn" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Typ souboru:", 14004, 8, 35, 50, 10 + LTEXT "Sloka", 14005, 68, 35, 160, 10 + LTEXT "Umstn:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Velikost:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Obsahuje:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Vytvoeno:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Jen pro ten", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Skryt", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Obecn" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Typ souboru:", 14004, 8, 35, 50, 10 + LTEXT "Soubor", 14005, 68, 35, 160, 10 + LTEXT "Otevrat v:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Umstn:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Velikost:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Vytvoeno:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Zmnno:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Oteveno:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Atributy:", 14020, 8, 189, 45, 10 + CHECKBOX "&Jen pro ten", 14021, 58, 189, 67, 10 + CHECKBOX "&Skryt", 14022, 126, 189, 50, 10 + CHECKBOX "&Archivovat", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Verze" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Verze souboru: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Popis: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Dal informace o verzi: ", 14006, 6, 70, 222, 115 + LTEXT "Nzev poloky: ", 14007, 13, 82, 50, 10 + LTEXT "Hodnota: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Obecn" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Typ:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Souborov systm:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Vyuit msto:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Voln msto:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Kapacita:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Disk %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Vyitn disku", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "etit msto na disku jeho kompres", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Povolit indexovn disku pro rychlej vyhledvn", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Nstroje" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Kontrola chyb", -1, 5, 5, 230, 60 + LTEXT "Tento nstroj otestuje svazek na chyby.", -1, 40, 25, 160, 20 + PUSHBUTTON "Zkontrolovat...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentace", -1, 5, 65, 230, 60 + LTEXT "Tento nstroj zdefragmentuje soubory na svazku", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragmentovat...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Zloha", -1, 5, 130, 230, 60 + LTEXT "Tmto nstrojem zazlohuje soubory na svazku.", -1, 40, 150, 160, 20 + PUSHBUTTON "Zlohovat...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Spustit jako" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Jak uivatelsk et chcete pout ke sputn tohoto programu?", -1, 10, 20, 220, 20 + CHECKBOX "Souasn uivatel: %s", 14000, 10, 45, 150, 10 + LTEXT "Chrnit pota a data ped nedovolenou aktivitou programu", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Tato volba me zabrnit potaovm virm v pokozen vaeho potae nebo osobnch dat, ale jej vybrn me zpsobit nesprvn fungovn programu.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Nsledujc uivatel:", 14002, 10, 100, 90, 10 + LTEXT "Uivatelsk jmno:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Heslo:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Storno", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Vlastnosti Koe" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Nastaven pro vybran umstn", -1, 10, 72, 220, 70 + RADIOBUTTON "&Zvolen velikost:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximln velikost (MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "&Nepesouvat soubory do Koe, odstraovat okamit pi smazn.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "Pi mazn soubor &dat potvrzen", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Otevt v..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Vyberte program, ve kterm chcete otevt tento soubor: ", -1, 44, 12, 211, 10 + LTEXT "Soubor: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programy", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Vdy pout vybran program k oteven tohoto typu souboru", 14003, 20, 193, 225, 10 + PUSHBUTTON "P&rochzet...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Storno", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Obecn" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "koly", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Zobrazit bn operace ve slokch", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Pout klas&ick sloky ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Prochzen sloek", -1, 7, 60, 249, 45, WS_TABSTOP | WS_GROUP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Otevrat kadou sloku ve stejn&m okn", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Ote&vrat kadou sloku ve svm vlastnm okn", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Klikn na poloky", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Jedno kliknut k &oteven poloky (vybrat ukznm)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Podtrhvat nzvy ikon podle &nastaven prohlee", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Podtrhvat nzvy ikon jen &pi ukzn na n", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Dvojkliknut k oteven poloky (vybrat kliknutm)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "O&bnovit vchoz", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Zobrazen" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Zobrazen sloky", -1, 7, 10, 249, 60 +//ICON +LTEXT "Zobrazen pouit pro tuto sloku (jako teba Podrobnosti nebo Miniatury)\n lze pout pro vechny sloky.", -1, 60, 20, 180, 20 +PUSHBUTTON "&Pout pro vechny sloky", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "Ob&novit vechny sloky", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Pokroil nastaven:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Obnovit vchoz", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Typy soubor" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registrovan &typy soubor:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Nov", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "O&dstranit", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Podrobnosti pro typ soubor '%s'", 14003, 7, 130, 249, 70 +LTEXT "Otevrat v:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Zmnit...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Soubory s pponou '%s' jsou typu '%s'. Kliknutm\nna tlatko Pokroil lze zmnit nastaven pro vechny\nsoubory '%s'.", 14007, 12, 155, 160, 30 +PUSHBUTTON "&Pokroil", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Potvrdit nahrazen souboru" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Ano", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Ano v&em", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Ne", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Storno", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Tato sloka ji obsahuje soubor s nzvem '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Tato sloka ji obsahuje soubor pouze pro ten s nzvem '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Tato sloka ji obsahuje systmov soubor s nzvem '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Chcete nahradit existujc soubor", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(neznm datum a velikost)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "tmto?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(neznm datum a velikost)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Odhlsit se ze systmu ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Opravdu se chcete odhlsit?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Odhlsit", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Storno", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Odpojit se od systmu ReactOS" //jak to prelozit, kde to v realu uvidim? +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Opravdu se chcete odpojit?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Odpojit", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Storno", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autopehrvn" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Vyberte &typ obsahu a akci, kterou systm ReactOS automaticky provede kdy se v tomto zazen objev tento typ obsahu:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Akce", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Zvolte akci, kter bude &provedena:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "&Vdy se zeptat se na vbr akce", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Obnovit vchoz", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Smen obsah" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Tento disk nebo zazen obsahuje vc ne jeden typ obsahu.", 1001, 32, 7, 191, 20 + LTEXT "Co m systm ReactOS provst?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Storno", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Smen obsah" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS me provst stejnou akci vdy, kdy vlote disk i pipojte zazen s tmto druhem souboru:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Co m systm ReactOS provst?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Zvolenou akci provst vdy.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Storno", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autopehrvn" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS me provst stejnou akci vdy, kdy pipojte toto zazen.", 1001, 32, 7, 190, 22 + LTEXT "&Co m systm ReactOS provst?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "Zvolenou akci provst &vdy", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Storno", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Vypnout ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Co m pota provst?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Uchov toto sezen, pota pob se snenou spotebou s daty stle v pamti. Probud se pi stisknut klvesu nebo pohybu myi.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Storno", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Npovda", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formtovn" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Spustit", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Zavt", IDCANCEL, 118, 198, 60, 14 + LTEXT "&Kapacita:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Souborov systm", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Velikost alokan jednotky", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Jmenovka svazku", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Monosti &formtovn", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Rychl formtovn", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Aktivovat kompresi", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Zkontrolovat disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Monosti kontroly disku", -1, 7, 6, 179, 50 + PUSHBUTTON "Storno", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automaticky opravovat chyby souborovho systmu", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Vyhledat a pokusit se obnovit vadn sektory", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Zmnit ikonu" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Nzev souboru:", -1, 7, 14, 208, 10 + PUSHBUTTON "Prochzet...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Ikony:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Storno",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Nzev" + IDS_SHV_COLUMN2 "Velikost" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Zmnno" + IDS_SHV_COLUMN5 "Atributy" + IDS_SHV_COLUMN6 "Velikost" + IDS_SHV_COLUMN7 "Voln msto" + IDS_SHV_COLUMN8 "Jmno" + IDS_SHV_COLUMN9 "Koment" + IDS_SHV_COLUMN10 "Vlastnk" + IDS_SHV_COLUMN11 "Skupina" + IDS_SHV_COLUMN12 "Nzev souboru" + IDS_SHV_COLUMN13 "Kategorie" + IDS_SHV_COLUMN_DELFROM "Pvodn umstn" + IDS_SHV_COLUMN_DELDATE "Odstranno" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Pracovn skupina" + IDS_SHV_NETWORKLOCATION "Sov umstn" + IDS_SHV_COLUMN_DOCUMENTS "Dokumenty" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Komente" + IDS_SHV_COLUMN_LOCATION "Umstn" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Plocha" + IDS_MYCOMPUTER "Tento pota" + IDS_RECYCLEBIN_FOLDER_NAME "Ko" + IDS_CONTROLPANEL "Ovldac panely" + IDS_ADMINISTRATIVETOOLS "Nstroje sprvy" + + /* context menus */ + IDS_VIEW_LARGE "&Vedle sebe" + IDS_VIEW_SMALL "&Ikony" + IDS_VIEW_LIST "&Seznam" + IDS_VIEW_DETAILS "&Podrobnosti" + IDS_SELECT "Vybrat" + IDS_OPEN "Otevt" + IDS_CREATELINK "Vytvoit zstupc&e" + IDS_COPY "&Koprovat" + IDS_DELETE "O&dstranit" + IDS_PROPERTIES "&Vlastnosti" + IDS_CUT "Vyj&mout" + IDS_RESTORE "Obnovit" + IDS_FORMATDRIVE "Formtovat..." + IDS_RENAME "Pejmenovat" + IDS_INSERT "Vloit" + + IDS_CREATEFOLDER_DENIED "Nelze vytvoit novou sloku, protoe pstup byl odepen." + IDS_CREATEFOLDER_CAPTION "Chyba pi pokusu vytvoit nov adres" + IDS_DELETEITEM_CAPTION "Potvrdit odstrann souboru" + IDS_DELETEFOLDER_CAPTION "Potvrdit odstrann adrese" + IDS_DELETEITEM_TEXT "Opravdu chcete odstranit '%1'?" + IDS_DELETEMULTIPLE_TEXT "Opravdu chcete odstranit tchto %1 poloek?" + IDS_DELETESELECTED_TEXT "Opravdu chcete odstranit zvolen poloky?" + IDS_TRASHITEM_TEXT "Opravdu chcete pesunout '%1' do Koe?" + IDS_TRASHFOLDER_TEXT "Opravdu chcete pesunout sloku '%1' a vechen jej obsah do Koe?" + IDS_TRASHMULTIPLE_TEXT "Opravdu chcete pesunout tchto %1 poloek do Koe?" + IDS_CANTTRASH_TEXT "Poloka '%1' neme bt pesunuta do Koe. Chcete ji msto toho smazat?" + IDS_OVERWRITEFILE_TEXT "Tato sloka ji obsahuje soubor s nzvem '%1'.\n\nChcete jej pepsat?" + IDS_OVERWRITEFILE_CAPTION "Potvrdit pepsn souboru" + IDS_OVERWRITEFOLDER_TEXT "Tato sloka ji obsahuje sloku s nzvem '%1'.\n\n"\ + "Pokud maj soubory v clov sloce stejn nzvy jako soubory ve zvolen\n"\ + "sloce, budou pepsny. Opravdu chcete pesunout nebo zkoprovat tuto sloku?" + + /* message box strings */ + IDS_RESTART_TITLE "Restartovat" + IDS_RESTART_PROMPT "Opravdu chcete restartovat systm?" + IDS_SHUTDOWN_TITLE "Vypnout" + IDS_SHUTDOWN_PROMPT "Opravdu chcete vypnout pota?" + IDS_LOGOFF_TITLE "Odhlsit se" + IDS_LOGOFF_PROMPT "Opravdu se chcete odhlsit?" + + /* shell folder path default values */ + IDS_PROGRAMS "Nabdka Start\\Programy" + IDS_PERSONAL "Dokumenty" + IDS_FAVORITES "Oblben" + IDS_STARTUP "Nabdka Start\\Programy\\Po sputn" + IDS_RECENT "Posledn dokumenty" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Nabdka Start" + IDS_MYMUSIC "Hudba" + IDS_MYVIDEO "Filmy" + IDS_DESKTOPDIRECTORY "Plocha" + IDS_NETHOOD "Okoln s" + IDS_TEMPLATES "ablony" + IDS_APPDATA "Data aplikac" + IDS_PRINTHOOD "Okoln tiskrny" + IDS_LOCAL_APPDATA "Local Settings\\Data aplikac" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Obrzky" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Dokumenty" + IDS_ADMINTOOLS "Nabdka Start\\Programy\\Nstroje pro sprvu" + IDS_COMMON_MUSIC "Documents\\Hudba" + IDS_COMMON_PICTURES "Documents\\Obrzky" + IDS_COMMON_VIDEO "Documents\\Filmy" + IDS_CDBURN_AREA "Local Settings\\Data aplikac\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Msta v sti" + + IDS_NEWFOLDER "Nov sloka" + + IDS_DRIVE_FIXED "Mstn disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Sov Disk" + + IDS_OPEN_WITH "Otevt v" + IDS_OPEN_WITH_CHOOSE "Zvolit program..." + + IDS_SHELL_ABOUT_AUTHORS "&Autoi" + IDS_SHELL_ABOUT_BACK "< &Zpt" + FCIDM_SHVIEW_NEW "&Nov" + FCIDM_SHVIEW_NEWFOLDER "Nov &sloka" + FCIDM_SHVIEW_NEWLINK "Nov &zstupce" + IDS_FOLDER_OPTIONS "Monosti sloky" + IDS_RECYCLEBIN_LOCATION "Umstn koe" + IDS_RECYCLEBIN_DISKSPACE "Dostupn msto" + IDS_EMPTY_BITBUCKET "Vysypat ko" + IDS_PICK_ICON_TITLE "Zvolit ikonu" + IDS_PICK_ICON_FILTER "Soubory ikon (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Spustiteln soubory\0*.exe\0" + IDS_DIRECTORY "Sloka" + IDS_VIRTUAL_DRIVER "Virtuln ovlada zazen" + IDS_BAT_FILE "ReactOS dvkov soubor" + IDS_CMD_FILE "ReactOS pkazov skript" + IDS_COM_FILE "DOSov aplikace" + IDS_CPL_FILE "Poloka Ovldacch panel" + IDS_CUR_FILE "Kurzor" + IDS_DLL_FILE "Rozen aplikace" + IDS_DRV_FILE "Ovlada zazen" + IDS_EXE_FILE "Aplikace" + IDS_FON_FILE "Soubor psma" + IDS_TTF_FILE "Soubor psma TrueType" + IDS_HLP_FILE "Soubor npovdy" + IDS_INI_FILE "Konfiguran nastaven" + IDS_LNK_FILE "Zstupce" + IDS_SYS_FILE "Systmov soubor" + + IDS_OPEN_VERB "Otevt" + IDS_RUNAS_VERB "Spustit jako " + IDS_EDIT_VERB "Upravit" + IDS_FIND_VERB "Najt" + IDS_PRINT_VERB "Tisknout" + IDS_PLAY_VERB "Pehrt" + IDS_PREVIEW_VERB "Nhled" + + IDS_FILE_FOLDER "%u soubor, %u sloek" + IDS_PRINTERS "Tiskrny" + IDS_FONTS "Fonty" + IDS_INSTALLNEWFONT "Nainstalovat nov font..." + + IDS_DEFAULT_CLUSTER_SIZE "Vchoz alokan velikost" + IDS_COPY_OF "Kopie " + + IDS_SHLEXEC_NOASSOC "Pro oteven tohoto souboru nen nakonfigurovn dn program." +END diff --git a/dll/win32/shell32_new/lang/da-DK.rc b/dll/win32/shell32_new/lang/da-DK.rc new file mode 100644 index 00000000000..9ad423c95e4 --- /dev/null +++ b/dll/win32/shell32_new/lang/da-DK.rc @@ -0,0 +1,745 @@ +/* PROJECT: ReactOS Shell Library + * FILE: dll/win32/shell32/lang/da-DK.rc + * PURPOSE: Danish resource file + * UPDATED: 01 May 2009 + */ + +LANGUAGE LANG_DANISH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Sto&re Ikoner", FCIDM_SHVIEW_BIGICON + MENUITEM "S&m Ikoner", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detaljer", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Visning" + BEGIN + MENUITEM "Sto&re Ikoner", FCIDM_SHVIEW_BIGICON + MENUITEM "S&m Ikoner", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detaljer", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrangere &Ikoner" + BEGIN + MENUITEM "Efter &Navn", 0x30 /* column 0 */ + MENUITEM "Efter &Type", 0x32 /* column 2 */ + MENUITEM "Efter &Strrelse", 0x31 /* ... */ + MENUITEM "Efter &Dato", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Arrangere Automatisk", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Ikoner", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Opfrisk", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Indst", FCIDM_SHVIEW_INSERT + MENUITEM "Indst som Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Egenskaber", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&bn", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "K&lip", FCIDM_SHVIEW_CUT + MENUITEM "&Kopiere", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Opret &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Slet", FCIDM_SHVIEW_DELETE + MENUITEM "&Omdb", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Egenskabe", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Sg efter Mappe" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Fortryd", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Om %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS havde ikke vret mulig uden hjlp fra disse personer:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Run" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Indtast navnet p det program, mappe, dokument, eller Internet Ressourcer, du vil have at ReactOS skal bne for dig.", 12289, 36, 11, 182, 18 + LTEXT "&bn:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Fortryd", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Gennemse...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Ny", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Fil" + IDS_SHV_COLUMN2 "Strrelse" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "ndret" + IDS_SHV_COLUMN5 "Attributer" + IDS_SHV_COLUMN6 "Strrelse" + IDS_SHV_COLUMN7 "Strrelse tilgngelig" + IDS_SHV_COLUMN8 "Navn" + IDS_SHV_COLUMN9 "Kommentar" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Skrivebord" + IDS_MYCOMPUTER "Min Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Sto&re Ikoner" + IDS_VIEW_SMALL "S&m Ikoner" + IDS_VIEW_LIST "&Liste" + IDS_VIEW_DETAILS "&Detaljer" + IDS_SELECT "Vlg" + IDS_OPEN "bn" + IDS_CREATELINK "Create &Link" + IDS_COPY "Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "Cut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Kan ikke oprette ny mappe: Tilladelse Afvist." + IDS_CREATEFOLDER_CAPTION "Fejl ved oprettelse ad ny mappe" + IDS_DELETEITEM_CAPTION "Bekrft sletning af fil" + IDS_DELETEFOLDER_CAPTION "Bekrft sletning af mappe" + IDS_DELETEITEM_TEXT "Er du sikker p du vil slette '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "Overskriv fil %1?" + IDS_OVERWRITEFILE_CAPTION "Bekrft overskrivelse af fil" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Genstart" + IDS_RESTART_PROMPT "nsker du at Genstarte Systemet?" + IDS_SHUTDOWN_TITLE "Luk Ned" + IDS_SHUTDOWN_PROMPT "nsker du at Lukke Ned?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programmer" + IDS_PERSONAL "Mine Dokumenter" + IDS_FAVORITES "Favoritter" + IDS_STARTUP "Start Menu\\Programer\\Opstart" + IDS_RECENT "Midlertidige" + IDS_SENDTO "Send Til" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "Mine Dokumenter\\Min Musik" + IDS_MYVIDEO "Mine Dokumenter\\Mine Videoer" + IDS_DESKTOPDIRECTORY "Skrivebord" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Skabeloner" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Lokale Indstillinger\\Application Data" + IDS_INTERNET_CACHE "Midlertidige Internet Filer" + IDS_COOKIES "Cookies" + IDS_HISTORY "Historie" + IDS_PROGRAM_FILES "Programmer" + IDS_MYPICTURES "Mine Dokumenter\\Mine Billeder" + IDS_PROGRAM_FILES_COMMON "Programmer\\Flles Filer" + IDS_COMMON_DOCUMENTS "Dokumenter" + IDS_ADMINTOOLS "Start Menu\\Programmer\\Administrative Vrktjer" + IDS_COMMON_MUSIC "Dokumenter\\Min Musik" + IDS_COMMON_PICTURES "Dokumenter\\Mine Billeder" + IDS_COMMON_VIDEO "Dokumenter\\Mine Videoer" + IDS_CDBURN_AREA "Lokale Indstillinger\\Application Data\\Microsoft\\CD Brnding" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "Ny Mappe" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "Ny" + FCIDM_SHVIEW_NEWFOLDER "Ny &Mappe" + FCIDM_SHVIEW_NEWLINK "Nyt &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/de-DE.rc b/dll/win32/shell32_new/lang/de-DE.rc new file mode 100644 index 00000000000..28d3c52f829 --- /dev/null +++ b/dll/win32/shell32_new/lang/de-DE.rc @@ -0,0 +1,760 @@ +/* + * Copyright 1998 Juergen Schmied + * Copyright 2004 Henning Gerhardt + * Copyright 2007 Daniel Reimer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Groe Symbole", FCIDM_SHVIEW_BIGICON + MENUITEM "&Kleine Symbole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Ansicht" + BEGIN + MENUITEM "&Groe Symbole", FCIDM_SHVIEW_BIGICON + MENUITEM "&Kleine Symbole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Symbole anordnen" + BEGIN + MENUITEM "Nach &Name", 0x30 /* column 0 */ + MENUITEM "Nach &Typ", 0x32 /* column 2 */ + MENUITEM "Nach &Gre", 0x31 /* ... */ + MENUITEM "Nach &Datum", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Automatisch anordnen", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Icons anordnen", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Aktualisieren", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Einfgen", FCIDM_SHVIEW_INSERT + MENUITEM "Verknpfung einfgen", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "&Eigenschaften", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplorer", FCIDM_SHVIEW_EXPLORE + MENUITEM "&ffnen", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Ausschneiden", FCIDM_SHVIEW_CUT + MENUITEM "&Kopieren", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "&Verknpfung erstellen", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Lschen", FCIDM_SHVIEW_DELETE + MENUITEM "&Umbenennen", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Eigenschaften", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Verzeichnis auswhlen" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Abbrechen", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Verzeichnis auswhlen" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Ordner:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Neuen Ordner erstellen", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Abbrechen", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Meldung" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Ja", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Ja zu &allen", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nein", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Abbrechen", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Informationen ber %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Diese ReactOS-Version wurde registriert auf:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installierter physikalischer Speicher:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS wurde Ihnen zur Verfgung gestellt von:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Ausfhren" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Geben Sie den Namen eines Programms, eines Ordners, eines Dokuments oder einer Internetressource an.", 12289, 36, 11, 182, 18 + LTEXT "&ffnen:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Abbrechen", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Durchsuchen...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Verknpfung" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Zieltyp:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Zielpfad:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Ziel:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Starten in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "&Kurztasten:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Ausfhren:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "K&ommentar:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Ziel finden...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "S&ymbol wechseln...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "Er&weitert...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Erweiterte Einstellungen" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Whlen Sie die erweiterten Einstellungen fr diese Verknpfung.", -1, 5, 30, 210, 10 + CHECKBOX "Als anderer Benutzer ausfhren", 14000, 25, 50, 150, 10 + LTEXT "Diese Einstellung ermglicht es, diese Verknpfung unter einem anderen oder Ihrem eingenen Bentzerkonto auszufhren whrend der Computer und Ihre Daten vor unauthorisierten Programmaktivitten geschtzt werden knnen.", -1, 50, 60, 175, 40 + CHECKBOX "In getrenntem Speicherbereich ausfhren", 14001, 25, 100, 150, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abbrechen", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Allgemein" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Typ:", 14004, 8, 35, 50, 10 + LTEXT "Dateiordner", 14005, 68, 35, 160, 10 + LTEXT "Ort:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Gre:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Inhalt:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Erstellt:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Schreibgeschtzt", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Versteckt", 14022, 126, 150, 50, 10 +END + + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Allgemein" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Dateityp:", 14004, 8, 35, 50, 10 + LTEXT "Datei", 14005, 68, 35, 160, 10 + LTEXT "ffnen mit:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Pfad:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Gre:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Erstellt:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Gendert:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Zugegriffen:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attribute:", 14020, 8, 189, 45, 10 + CHECKBOX "&Schreibgeschtzt", 14021, 45, 189, 67, 10 + CHECKBOX "&Versteckt", 14022, 126, 189, 50, 10 + CHECKBOX "&Archiv", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Dateiversion: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Beschreibung: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Weitere Versionsinformationen: ", 14006, 6, 70, 222, 115 + LTEXT "Elementname: ", 14007, 13, 82, 50, 10 + LTEXT "Wert: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Allgemein" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Typ:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Dateisystem:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Belegter Speicher:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Freier Speicher:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Speicherkapazitt:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Laufwerk %s", 14009, 100, 170, 50, 10 + PUSHBUTTON "Bereinigen", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Laufwerk komprimieren, um Speicherplatz zu sparen", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Laufwerk fr schnelle Dateisuche indizieren", 14012, 15, 220, 165, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Extras" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Fehlerberprfung", -1, 5, 5, 230, 60 + LTEXT "Bei Wahl dieser Option wird das Volume\nauf Fehler berprft.", -1, 40, 25, 160, 20 + PUSHBUTTON "Jetzt &prfen...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentierung", -1, 5, 65, 230, 60 + LTEXT "Bei Wahl dieser Option werden die Dateien auf\ndem Volume defragmentiert.", -1, 40, 85, 160, 20 + PUSHBUTTON "Jetzt &defragmentieren...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Sicherung", -1, 5, 130, 230, 60 + LTEXT "Bei Wahl dieser Option werden die auf dem\nVolume gespeicherten Dateien gesichert.", -1, 40, 150, 160, 20 + PUSHBUTTON "Jetzt &sichern...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ausfhren als" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Welches Benutzerkonto wollen Sie zum Starten dieser Anwendung verwenden?", -1, 10, 20, 220, 20 + CHECKBOX "Aktueller Benutzer %s", 14000, 10, 45, 150, 10 + LTEXT "Computer vor unauthorisierten Programmaktiviten schtzen", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Diese Einstellung kann Computerviren daran hindern, ihrem Computer oder Ihren persnlichen Daten zu schaden, aber es kann auch Programme daran hindern, ordnungsgem zu arbeiten.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Folgender Benutzer:", 14002, 10, 100, 90, 10 + LTEXT "Benutzername:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Passwort:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Abbrechen", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Papierkorb-Einstellungen" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Einstellungen fr gewhlten Ort", -1, 10, 72, 220, 70 + RADIOBUTTON "&Definierte Gre:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximale Gre (MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Dateien nicht in den Papie&rkorb verschieben, sondern sofort lschen", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "Besttigungs&dialog nach erfolgreichem Lschvorgang anzeigen", 14004, 20, 155, 215, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "ffnen mit" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Whlen Sie das Programm, das zum ffnen dieser Datei verwendet werden soll:", -1, 44, 12, 211, 18 + LTEXT "Datei: ", 14001, 44, 30, 188, 10 + GROUPBOX "&Programme", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Dateityp &immer mit dem ausgewhlten Programm ffnen", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Durchsuchen...", 14004, 188, 207, 60, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Abbrechen", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Allgemein" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Aufgaben", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Allgemeine Aufgaben in Ordnern anzeigen", 14001, 40, 25, 150, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "ReactOS Klassisc&he Ansicht verwenden", 14002, 40, 37, 150, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Ordner durchsuchen", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Jeden Ordner im &selben Fenster ffnen", 14004, 40, 70, 150, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Jeden Ordner im eigenen Fenster ffnen", 14005, 40, 82, 150, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Markieren von Elementen", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&ffnen durch &einfachen Klick (Markieren durch zeigen)", 14007, 40, 120, 210, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Symbolunerschriften wie im Br&owser unterstreichen", 14008, 50, 132, 210, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Symbolunerschriften nur beim Zeigen &unterstreichen", 14009, 50, 144, 210, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&ffnen durch &Doppelklick (Markieren durch einfachen Klick)", 14010, 40, 156, 210, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Wiederherstellen", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Ansicht" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Ordneransicht", -1, 7, 10, 249, 60 + //ICON + LTEXT "Sie knnen die Ansicht (Details oder Kacheln), die Sie fr\ndiesen Ordner verwenden, auf alle Ordner anwenden.", -1, 60, 20, 180, 20 + PUSHBUTTON "Auf a&lle Ordner anwenden", 14001, 60, 50, 90, 14, WS_TABSTOP + PUSHBUTTON "&Alle Ordner zurcksetzen", 14002, 160, 50, 90, 14, WS_TABSTOP + LTEXT "Erweiterte Einstellungen:", -1, 7, 80, 100, 10 + CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 + PUSHBUTTON "&Wiederherstellen", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Dateitypen" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "&Registrierte Dateitypen:", -1, 7, 10, 80, 10 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 + PUSHBUTTON "&Neu", 14001, 120, 110, 50, 14, WS_TABSTOP + PUSHBUTTON "&Lschen", 14002, 180, 110, 50, 14, WS_TABSTOP + GROUPBOX "Details zum Dateityp '%s'", 14003, 7, 130, 249, 70 + LTEXT "ffnen mit:", -1, 12, 140, 40, 10 + //ICON + LTEXT "Anwendungsname", 14005, 100, 140, 40, 10 + PUSHBUTTON "n&dern...", 14006, 180, 140, 50, 14, WS_TABSTOP + LTEXT "Um\ndie Einstellungen, die alle Dateien des Typs '%s' betreffen zu ndern, klicken Sie auf Erweitert.", 14007, 12, 155, 160, 30 + PUSHBUTTON "&Erweitert", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Besttige berschreiben der Datei(en)" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Ja", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Ja fr &alle", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Nein", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Abbrechen", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Dieser Ordner enthlt bereits eine Datei namens '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Dieser Ordner enthlt bereits eine schreibgeschtzte Datei namens '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Dieser Ordner enthlt bereits eine Systemdatei namens '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Wollen Sie die existierende Datei", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(Unbekanntes Datum und Gre)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "durch diese ersetzen?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(Unbekanntes Datum und Gre)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Abmelden" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Sind Sie sicher, dass sie sich abmelden wollen?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Abmelden", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Abbrechen", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "ReactOS trennen" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Sind Sie sicher dass Sie die Verbindung trennen wollen?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Trennen", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Abbrechen", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "W&hlen Sie einen Inhaltstyp und eine Aktion, die durchgefhrt werden soll, wenn dieser Typ in dem Gert verwendet wird:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Aktionen", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "&Durchzufhrende Aktion auswhlen:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "&Eingabeaufforderung, um Aktion auszuwhlen", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Wiederherstellen", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Gemischter Inhalt" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Dieser Datentrger bzw. das Gert enthlt Inhalte verschiedener Typen.", 1001, 32, 7, 191, 20 + LTEXT "&Welche Aktion soll ReactOS durchfhren?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Abbrechen", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Gemischter Inhalt" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS kann immer dieselbe Aktion durchfhren, wenn ein Datentrger eingelegt wird / ein Gert angeschlossen wird:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "&Welche Aktion soll ReactOS durchfhren?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "&Ausgewhlte Aktion immer durchfhren", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Abbrechen", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Bei jeder Verbindungsherstellung mit dem Gert kann ReactOS dieselbe Aktion durchfhren.", 1001, 32, 7, 190, 22 + LTEXT "&Welche Aktion soll ReactOS durchfhren?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Ausgewhlte Aktion immer durchfhren", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Abbrechen", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "ReactOS herunterfahren" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Welcher Vorgang soll durchgefhrt werden?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Behlt die Sitzung bei, speichert die Daten im Arbeitsspeicher und schaltet den Computer in den Energiesparmodus. Der Computer wird reaktiviert, sobald die Tastatur bzw. die Maus bettigt wird.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Abbrechen", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Hilfe", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formatieren von" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Starten", IDOK, 53, 198, 60, 14 + PUSHBUTTON "S&chlieen", IDCANCEL, 118, 198, 60, 14 + LTEXT "S&peicherkapazitt:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Dateisystem", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Gre der Zuordnungseinheiten", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume&bezeichnung", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "&Formatierungsoptionen", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "Sch&nellformatierung", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Komprimierung aktivieren", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "berprfen des Datentrgers" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Starten", IDOK, 53, 100, 60, 14 + GROUPBOX "Optionen fr die Datentrgerprfung", -1, 7, 6, 179, 50 + PUSHBUTTON "S&chlieen", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "&Dateisystemfehler automatisch korrigieren", 14000, 16, 15, 165, 10 + AUTOCHECKBOX "&Fehlerhafte Sektoren suchen/wiederherstellen", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 0, 7, 60, 179, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Anderes Symbol" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Dateiname:", -1, 7, 14, 208, 10 + PUSHBUTTON "Durchsuchen...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Symbole:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Abbrechen",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Datei" + IDS_SHV_COLUMN2 "Gre" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Gendert" + IDS_SHV_COLUMN5 "Attribute" + IDS_SHV_COLUMN6 "Gesamtgre" + IDS_SHV_COLUMN7 "Freier Speicher" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Kommentar" + IDS_SHV_COLUMN10 "Besitzer" + IDS_SHV_COLUMN11 "Gruppe" + IDS_SHV_COLUMN12 "Dateinamen" + IDS_SHV_COLUMN13 "Kategorie" + IDS_SHV_COLUMN_DELFROM "Ursprung" + IDS_SHV_COLUMN_DELDATE "Gelscht am" + IDS_SHV_COLUMN_FONTTYPE "Schriftartentyp" + IDS_SHV_COLUMN_WORKGROUP "Arbeitsgruppe" + IDS_SHV_NETWORKLOCATION "Netzwerkstandort" + IDS_SHV_COLUMN_DOCUMENTS "Dokumente" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Kommentare" + IDS_SHV_COLUMN_LOCATION "Ort" + IDS_SHV_COLUMN_MODEL "Model" + + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "Arbeitsplatz" + IDS_RECYCLEBIN_FOLDER_NAME "Papierkorb" + IDS_CONTROLPANEL "Systemsteuerung" + IDS_ADMINISTRATIVETOOLS "Verwaltung" + + /* context menus */ + IDS_VIEW_LARGE "&Groe Symbole" + IDS_VIEW_SMALL "&Kleine Symbole" + IDS_VIEW_LIST "&Liste" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Auswhlen" + IDS_OPEN "ffnen" + IDS_CREATELINK "&Verknpfung erstellen" + IDS_COPY "Kopieren" + IDS_DELETE "Lschen" + IDS_PROPERTIES "Eigenschaften" + IDS_CUT "Ausschneiden" + IDS_RESTORE "Wiederherstellen" + IDS_FORMATDRIVE "Formatieren..." + IDS_RENAME "Umbenennen" + IDS_INSERT "Einfgen" + + IDS_CREATEFOLDER_DENIED "Es konnte kein neues Verzeichnis erstellt werden: Zugriff verweigert." + IDS_CREATEFOLDER_CAPTION "Es trat ein Fehler beim Erstellen eines neuen Verzeichnisses auf." + IDS_DELETEITEM_CAPTION "Besttigung: Objekt lschen" + IDS_DELETEFOLDER_CAPTION "Besttigung: Verzeichnis lschen" + IDS_DELETEITEM_TEXT "Sind Sie sich sicher, dass Sie '%1' lschen mchten?" + IDS_DELETEMULTIPLE_TEXT "Sind Sie sich sicher, dass Sie diese %1 Objekte lschen mchten?" + IDS_DELETESELECTED_TEXT "Sind Sie sich sicher, dass Sie die ausgewhlten Objekte lschen mchten?" + IDS_TRASHITEM_TEXT "Sind Sie sich sicher, dass Sie '%1' in den Papierkorb verschieben mchten?" + IDS_TRASHFOLDER_TEXT "Sind Sie sich sicher, dass Sie '%1' und seinen Inhalt in den Papierkorb verschieben mchten?" + IDS_TRASHMULTIPLE_TEXT "Sind Sie sich sicher, dass Sie diese %1 Dateien in den Papierkorb verschieben mchten?" + IDS_CANTTRASH_TEXT "Das Objekt '%1' kann nicht in den Papierkorb verschoben werden. Mchten Sie es stattdessen lschen?" + IDS_OVERWRITEFILE_TEXT "Dieser Ordner enthlt bereits eine Datei namens '%1'.\n\nWollen Sie diese berschreiben?" + IDS_OVERWRITEFILE_CAPTION "Besttigung: Datei berschreiben" + IDS_OVERWRITEFOLDER_TEXT "Dieser Ordner enthlt bereits einen Ordner namens '%1'.\n\n"\ + "Wenn Dateien im Zielordner die gleichen Namen haben, wie Dateien\n"\ + "im gewhlten Ordner, werden diese ersetzt. Soll der Vorgang fortgesetzt werden?" + + /* message box strings */ + IDS_RESTART_TITLE "Neu starten" + IDS_RESTART_PROMPT "Mchten Sie das System neu starten?" + IDS_SHUTDOWN_TITLE "Herunterfahren" + IDS_SHUTDOWN_PROMPT "Mchten Sie das System herunterfahren?" + IDS_LOGOFF_TITLE "Ausloggen" + IDS_LOGOFF_PROMPT "Mchten Sie sich ausloggen?" + + /* shell folder path default values */ + IDS_PROGRAMS "Startmen\\Programme" + IDS_PERSONAL "Eigene Dateien" + IDS_FAVORITES "Favoriten" + IDS_STARTUP "Startmen\\Programme\\Autostart" + IDS_RECENT "Dokumente" + IDS_SENDTO "Senden an" + IDS_STARTMENU "Startmen" + IDS_MYMUSIC "Meine Musik" + IDS_MYVIDEO "Meine Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "Netzwerkumgebung" + IDS_TEMPLATES "Vorlagen" + IDS_APPDATA "Anwendungsdaten" + IDS_PRINTHOOD "Druckumgebung" + IDS_LOCAL_APPDATA "Lokale Einstellungen\\Anwendungsdaten" + IDS_INTERNET_CACHE "Lokale Einstellungen\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Lokale Einstellungen\\Verlauf" + IDS_PROGRAM_FILES "Programme" + IDS_MYPICTURES "Eigene Bilder" + IDS_PROGRAM_FILES_COMMON "Programme\\Gemeinsame Dateien" + IDS_COMMON_DOCUMENTS "Dokumente" + IDS_ADMINTOOLS "Startmen\\Programme\\Verwaltung" + IDS_COMMON_MUSIC "Dokumente\\Eigene Musik" + IDS_COMMON_PICTURES "Dokumente\\Eigene Bilder" + IDS_COMMON_VIDEO "Dokumente\\Eigene Videos" + IDS_CDBURN_AREA "Lokale Einstellungen\\Anwendungsdaten\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Netzwerkumgebung" + + IDS_NEWFOLDER "Neuer Ordner" + + IDS_DRIVE_FIXED "Lokaler Datentrger" + IDS_DRIVE_CDROM "CD-Laufwerk" + IDS_DRIVE_NETWORK "Netzlaufwerk" + + IDS_OPEN_WITH "ffnen &mit..." + IDS_OPEN_WITH_CHOOSE "Programm whlen..." + + IDS_SHELL_ABOUT_AUTHORS "&Autoren" + IDS_SHELL_ABOUT_BACK "< &Zurck" + FCIDM_SHVIEW_NEW "Neu" + FCIDM_SHVIEW_NEWFOLDER "Neues Ver&zeichnis" + FCIDM_SHVIEW_NEWLINK "Neue &Verknpfung" + IDS_FOLDER_OPTIONS "Ordneroptionen" + IDS_RECYCLEBIN_LOCATION "Papierkorbpfad" + IDS_RECYCLEBIN_DISKSPACE "freier Speicher" + IDS_EMPTY_BITBUCKET "Papierkorb leeren" + IDS_PICK_ICON_TITLE "Symbol auswhlen" + IDS_PICK_ICON_FILTER "Symboldateien(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Programme\0*.exe\0" + IDS_DIRECTORY "Dateiordner" + IDS_VIRTUAL_DRIVER "Virtueller Gertetreiber" + IDS_BAT_FILE "ReactOS-Stapelverarbeitungsdatei" + IDS_CMD_FILE "ReactOS-Befehlsskript" + IDS_COM_FILE "Dos Anwendung" + IDS_CPL_FILE "Systemsteuerungselement" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Programmbibliothek" + IDS_DRV_FILE "Gertetreiber" + IDS_EXE_FILE "Anwendung" + IDS_FON_FILE "Schriftartendatei" + IDS_TTF_FILE "TrueType-Schriftartendatei" + IDS_HLP_FILE "Hilfedatei" + IDS_INI_FILE "Konfigurationseinstellungen" + IDS_LNK_FILE "Verknpfung" + IDS_SYS_FILE "Systemdatei" + + IDS_OPEN_VERB "ffnen" + IDS_RUNAS_VERB "Ausfhren als " + IDS_EDIT_VERB "Bearbeiten" + IDS_FIND_VERB "Finden" + IDS_PRINT_VERB "Drucken" + IDS_PLAY_VERB "Abspielen" + IDS_PREVIEW_VERB "Vorschau" + + IDS_FILE_FOLDER "%u Dateien, %u Ordner" + IDS_PRINTERS "Drucker" + IDS_FONTS "Schriftarten" + IDS_INSTALLNEWFONT "Neue Schriftart installieren..." + + IDS_DEFAULT_CLUSTER_SIZE "Standardgre" + IDS_COPY_OF "Kopie von" + + IDS_SHLEXEC_NOASSOC "Es ist kein Programm mit diesem Dateityp verknpft." +END diff --git a/dll/win32/shell32_new/lang/el-GR.rc b/dll/win32/shell32_new/lang/el-GR.rc new file mode 100644 index 00000000000..a269d68ed2f --- /dev/null +++ b/dll/win32/shell32_new/lang/el-GR.rc @@ -0,0 +1,757 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_GREEK, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "& ", FCIDM_SHVIEW_BIGICON + MENUITEM "& ", FCIDM_SHVIEW_SMALLICON + MENUITEM "&", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&" + BEGIN + MENUITEM "& ", FCIDM_SHVIEW_BIGICON + MENUITEM "& ", FCIDM_SHVIEW_SMALLICON + MENUITEM "&", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "& " + BEGIN + MENUITEM " &", 0x30 /* column 0 */ + MENUITEM " &", 0x32 /* column 2 */ + MENUITEM " &", 0x31 /* ... */ + MENUITEM " &", 0x33 + MENUITEM SEPARATOR + MENUITEM " ", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM " ", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "", FCIDM_SHVIEW_INSERT + MENUITEM " ", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&", FCIDM_SHVIEW_EXPLORE + MENUITEM "&", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&", FCIDM_SHVIEW_CUT + MENUITEM "&", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM " &", FCIDM_SHVIEW_CREATELINK + MENUITEM "&", FCIDM_SHVIEW_DELETE + MENUITEM "&", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION " " +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT ":", IDD_FOLDER, 10, 156, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "& ", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON " &", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +SHELL_ABOUT_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION ": %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT " " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT " ReactOS :", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT " :", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT " ReactOS :", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT " , , , , ReactOS .", 12289, 36, 4, 182, 25 + LTEXT "&:", 12305, 5, 39, 31, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 240, 130 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 5, 30, 30, WS_VISIBLE + LTEXT " :", 14004, 10, 25, 50, 15 + LTEXT "", 14005, 70, 30, 150, 10 + LTEXT " :", 14006, 10, 40, 70, 10 + LTEXT "", 14007, 70, 40, 150, 10 + LTEXT ":", 14008, 10, 55, 45, 10 + EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT | ES_AUTOHSCROLL + LTEXT "& :",14010, 10, 65, 57, 10 + EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT | ES_AUTOHSCROLL + LTEXT " :", 14014, 10, 75, 60, 15 + EDITTEXT 14015, 70, 80, 150, 10, ES_LEFT + LTEXT ":", 14016, 10, 90, 57, 10 + EDITTEXT 14017, 70, 90, 150, 10, ES_AUTOHSCROLL + LTEXT "&:", 14018, 10, 100, 57, 10 + EDITTEXT 14019, 70, 100, 150, 10, ES_LEFT | ES_AUTOHSCROLL + PUSHBUTTON "& ...", 14020, 10, 115, 71, 14, ES_LEFT + PUSHBUTTON "& ...", 14021, 83, 115, 71, 14, ES_LEFT + PUSHBUTTON "& ...", 14022, 156, 115, 71, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT " .", -1, 5, 30, 210, 20 + CHECKBOX " ", 14000, 25, 50, 150, 10 + LTEXT " .", -1, 50, 60, 175, 40 + CHECKBOX " ", 14001, 25, 100, 150, 10, WS_DISABLED + PUSHBUTTON "OK", IDOK, 25, 120, 50, 15, WS_VISIBLE + PUSHBUTTON "", IDCANCEL, 120, 120, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 130 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 5, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 5, 100, 10, ES_LEFT | ES_READONLY + LTEXT " :", 14004, 10, 30, 50, 10 + LTEXT "", 14005, 70, 30, 150, 10 + LTEXT " :", 14006, 10, 40, 50, 10 + LTEXT "", 14007, 70, 40, 150, 10 + LTEXT ":", 14008, 10, 55, 45, 10 + LTEXT "", 14009, 70, 55, 200, 10 + LTEXT ":",14010, 10, 65, 45, 10 + LTEXT "", 14011, 70, 65, 150, 10 + LTEXT ":", 14014, 10, 80, 65, 10 + LTEXT "", 14015, 70, 80, 150, 10 + LTEXT ":", 14016, 10, 90, 65, 10 + LTEXT "", 14017, 70, 90, 150, 10 + LTEXT ":", 14018, 10, 100, 65, 10 + LTEXT "", 14019, 70, 100, 150, 10 + LTEXT ":", 14020, 10, 115, 70, 10 + CHECKBOX "& ", 14021, 70, 115, 75, 10 + CHECKBOX "&", 14022, 150, 115, 50, 10 + CHECKBOX "&Archive", 14023, 190, 115, 45, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 240, 130 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT " : ", 14000, 10, 10, 60, 10 + LTEXT "", 14001, 80, 10, 160, 10 + LTEXT ": ", 14002, 10, 20, 60, 10 + LTEXT "", 14003, 80, 20, 160, 10 + LTEXT " : ", 14004, 10, 30, 70, 10 + LTEXT "", 14005, 80, 30, 160, 10 + GROUPBOX " : ", 14006, 10, 45, 220, 90 + LTEXT " : ", 14007, 20, 55, 60, 10 + LTEXT ": ", 14008, 130, 55, 45, 10 + LISTBOX 14009,20,65,95,60, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 130, 65, 95, 60, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 10, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT ":", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT " :", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT " :", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT " :", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT ":", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT " %s", 14009, 100, 170, 40, 10 + PUSHBUTTON " ", 14010, 160, 175, 70, 15, WS_TABSTOP + CHECKBOX " ", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX " ", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX " ", -1, 5, 5, 230, 60 + LTEXT " \n .", -1, 40, 25, 160, 20 + PUSHBUTTON "&...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "", -1, 5, 65, 230, 60 + LTEXT " \n ", -1, 40, 85, 160, 20 + PUSHBUTTON "&...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX " ", -1, 5, 130, 230, 60 + LTEXT " \n .", -1, 40, 150, 160, 20 + PUSHBUTTON " ...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT " ", -1, 10, 20, 220, 20 + CHECKBOX " %s", 14000, 10, 45, 150, 10 + LTEXT " ", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX " .", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX " :", 14002, 10, 100, 90, 10 + LTEXT " :", -1, 20, 115, 60, 10 + COMBOBOX 14003, 70, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 10, WS_TABSTOP + LTEXT " :", -1, 20, 140, 60, 10 + EDITTEXT 14005, 70, 140, 100, 10, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 10, WS_TABSTOP + PUSHBUTTON "OK", 14007, 70, 170, 60, 15, WS_TABSTOP + PUSHBUTTON "", 14008, 140, 170, 60, 15, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX " ", -1, 10, 80, 220, 70 + RADIOBUTTON "& :", 14001, 20, 90, 90, 10 + EDITTEXT 14002, 110, 90, 50, 10, WS_TABSTOP | ES_NUMBER + LTEXT " (MB):", -1, 20, 100, 100, 10 + RADIOBUTTON " . .", 14003, 20, 115, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "& ", 14004, 20, 155, 155, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION " " +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT " :", -1, 44, 12, 211, 10 + LTEXT ": %s", 14001, 44, 25, 188, 10 + GROUPBOX "", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + CHECKBOX "& , ", 14003, 20, 193, 225, 10 + PUSHBUTTON "&...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "" + IDS_SHV_COLUMN2 "" + IDS_SHV_COLUMN3 "" + IDS_SHV_COLUMN4 "" + IDS_SHV_COLUMN5 "" + IDS_SHV_COLUMN6 "" + IDS_SHV_COLUMN7 " " + IDS_SHV_COLUMN8 "" + IDS_SHV_COLUMN9 "" + IDS_SHV_COLUMN10 "" + IDS_SHV_COLUMN11 "" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM " " + IDS_SHV_COLUMN_DELDATE " " + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP " " + IDS_MYCOMPUTER " " + IDS_RECYCLEBIN_FOLDER_NAME " " + IDS_CONTROLPANEL " " + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "& " + IDS_VIEW_SMALL "& " + IDS_VIEW_LIST "&" + IDS_VIEW_DETAILS "&" + IDS_SELECT "" + IDS_OPEN "" + IDS_CREATELINK " &" + IDS_COPY "&" + IDS_DELETE "&" + IDS_PROPERTIES "&" + IDS_CUT "&" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED " : ." + IDS_CREATEFOLDER_CAPTION " " + IDS_DELETEITEM_CAPTION " " + IDS_DELETEFOLDER_CAPTION " " + IDS_DELETEITEM_TEXT " '%1';" + IDS_DELETEMULTIPLE_TEXT " %1 ߴ;" + IDS_DELETESELECTED_TEXT " ;" + IDS_TRASHITEM_TEXT " '%1' ;" + IDS_TRASHFOLDER_TEXT " '%1' ;" + IDS_TRASHMULTIPLE_TEXT " %1 ;" + IDS_CANTTRASH_TEXT " '%1' . ;" + IDS_OVERWRITEFILE_TEXT " '%1'.\n\n ;" + IDS_OVERWRITEFILE_CAPTION " " + IDS_OVERWRITEFOLDER_TEXT " ed '%1'.\n\n"\ + " \n"\ + " . ;\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "" + IDS_RESTART_PROMPT " ;" + IDS_SHUTDOWN_TITLE "" + IDS_SHUTDOWN_PROMPT " ;" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL " " + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED " " + IDS_DRIVE_CDROM " CD" + IDS_DRIVE_NETWORK " " + + IDS_OPEN_WITH " " + IDS_OPEN_WITH_CHOOSE " ..." + + IDS_SHELL_ABOUT_AUTHORS "&" + IDS_SHELL_ABOUT_BACK "< &" + FCIDM_SHVIEW_NEW "" + FCIDM_SHVIEW_NEWFOLDER " &" + FCIDM_SHVIEW_NEWLINK " &" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/en-GB.rc b/dll/win32/shell32_new/lang/en-GB.rc new file mode 100644 index 00000000000..5d8f02c9a47 --- /dev/null +++ b/dll/win32/shell32_new/lang/en-GB.rc @@ -0,0 +1,756 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS was brought to you by:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Run" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Size" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modified" + IDS_SHV_COLUMN5 "Attributes" + IDS_SHV_COLUMN6 "Size" + IDS_SHV_COLUMN7 "Size available" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Recycle Bin" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "&Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "C&ut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Recycle Bin?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Recycle Bin?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Recycle Bin?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Recycle Bin. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/en-US.rc b/dll/win32/shell32_new/lang/en-US.rc new file mode 100644 index 00000000000..04df98d1e60 --- /dev/null +++ b/dll/win32/shell32_new/lang/en-US.rc @@ -0,0 +1,767 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS was brought to you by:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Run" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +IDD_SH_FILE_COPY DIALOGEX 0, 0, 264, 45 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Copying..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Cancel", 14002, 195, 14, 60, 16 + CONTROL "", 14000, "MSCTLS_PROGRESS32", 0, 8, 20, 170, 10 + LTEXT "File", 14001, 8, 6, 169, 10 +END + + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Size" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modified" + IDS_SHV_COLUMN5 "Attributes" + IDS_SHV_COLUMN6 "Size" + IDS_SHV_COLUMN7 "Size available" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "&Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "C&ut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/es-ES.rc b/dll/win32/shell32_new/lang/es-ES.rc new file mode 100644 index 00000000000..c619493d3f2 --- /dev/null +++ b/dll/win32/shell32_new/lang/es-ES.rc @@ -0,0 +1,769 @@ +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003,2004 Jos Manuel Ferrer Ortiz + * Actualizado Victor Martinez 2008 + * Actualizado Javier Remacha 2009 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Iconos &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "Iconos &pequeos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalles", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Ver" + BEGIN + MENUITEM "Iconos &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "Iconos &pequeos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalles", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Ordenar &iconos" + BEGIN + MENUITEM "Por &nombre", 0x30 /* column 0 */ + MENUITEM "Por &tipo", 0x32 /* column 2 */ + MENUITEM "Por t&amao", 0x31 /* ... */ + MENUITEM "Por &fecha", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Ordenar automticamente", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Alinear iconos", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Actualizar", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Pegar", FCIDM_SHVIEW_INSERT + MENUITEM "Pegar acceso directo", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Propiedades", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplorar", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Abrir", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ortar", FCIDM_SHVIEW_CUT + MENUITEM "&Copiar", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "C&rear acceso directo", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Eliminar", FCIDM_SHVIEW_DELETE + MENUITEM "Re&nombrar", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Propiedades", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Explorar carpeta" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Aceptar", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancelar", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Buscar carpeta" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Carpeta:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Crear nueva carpeta", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "Aceptar", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Mensaje" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Si", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Si &a todo", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancelar", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Acerca de %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Versin " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Esta versin de ReactOS est registrada a:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Memoria fsica instalada:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "Aceptar", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS est disponible gracias a:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Ejecutar" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Introduzca el nombre de un programa, carpeta, documento o recurso de Internet, y ReactOS lo abrir para usted.", 12289, 36, 11, 182, 24 + LTEXT "&Abrir:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "Aceptar", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Examinar...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Acceso directo" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Tipo de destino:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Ubicacin de destino:", 14006, 8, 54, 64, 14 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "&Destino:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "I&niciar en:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "&Tecla de mtodo abreviado:", 14014, 8, 111, 57, 14 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "&Ejecutar:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omentario:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Buscar destino...", 14020, 9, 172, 62, 14, ES_LEFT + PUSHBUTTON "Cambiar &icono...", 14021, 76, 172, 62, 14, ES_LEFT + PUSHBUTTON "Propiedades avan&zadas...", 14022, 144, 172, 85, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Propiedades avanzadas" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Elija las propiedades avanzadas que desee para este acceso directo.", -1, 5, 25, 210, 14 + CHECKBOX "Ejecutar con credenciales diferentes", 14000, 25, 50, 150, 10 + LTEXT "Esta opcin puede permitirle ejecutar este acceso directo como otro usuario, o continuar como usted mismo mientras protege su equipo y datos de una actividad de programa no autorizada.", -1, 50, 60, 175, 40 + CHECKBOX "Ejecutar en otro espacio de memoria", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "Aceptar", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Cancelar", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tipo:", 14004, 8, 35, 50, 10 + LTEXT "Carpeta de archivos", 14005, 68, 35, 160, 10 + LTEXT "Ubicacin:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Tamao:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contiene:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Creado:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Slo lectura", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Oculto", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tipo de archivo:", 14004, 8, 35, 55, 10 + LTEXT "Archivo", 14005, 68, 35, 160, 10 + LTEXT "Se abre con:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Ubicacin:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Tamao:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Creado:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modificado:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "ltimo acceso:", 14018, 8, 160, 55, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Atributos:", 14020, 8, 189, 45, 10 + CHECKBOX "&Slo lectura", 14021, 58, 189, 67, 10 + CHECKBOX "&Oculto", 14022, 126, 189, 50, 10 + CHECKBOX "&Archivo", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Versin" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Versin del archivo: ", 14000, 10, 10, 62, 14 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Descripcin: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Ms informacin de la versin: ", 14006, 6, 70, 222, 115 + LTEXT "Nombre del elemento:", 14007, 13, 82, 65, 10 + LTEXT "Valor: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Tipo:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Sistema de archivos:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Espacio ocupado:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Espacio libre:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacidad:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Unidad %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Liberar espacio en disco", 14010, 160, 175, 80, 15, WS_TABSTOP + CHECKBOX "Comprimir contenido para ahorrar espacio en disco", 14011, 5, 205, 180, 10, WS_DISABLED + CHECKBOX "Permitir a Index Server indizar el disco para acelerar la bsqueda", 14012, 5, 220, 220, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Herramientas" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Comprobacin de errores ", -1, 5, 5, 230, 60 + LTEXT "Esta opcin comprobar los errores en la\nunidad.", -1, 40, 25, 160, 20 + PUSHBUTTON "Comprobar ahora...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Desfragmentacin ", -1, 5, 65, 230, 60 + LTEXT "Esta opcin desfragmentar los archivos en esta\nunidad.", -1, 40, 85, 160, 20 + PUSHBUTTON "Desfragmentar ahora...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Copia de seguridad ", -1, 5, 130, 230, 60 + LTEXT "Esta opcin realizar una copia de seguridad de\nlos archivos almacenados en la unidad.", -1, 40, 150, 160, 20 + PUSHBUTTON "Realizar copia de seguridad ahora...", 14002, 90, 170, 130, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ejecutar como" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Qu cuenta de usuario desea usar para ejecutar este programa?", -1, 10, 20, 220, 20 + CHECKBOX "Usuario actual %s", 14000, 10, 45, 150, 10 + LTEXT "Protejer mi equipo y mis datos contra la actividad de programas sin autorizacin", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Esta opcin puede impedir que virus informticos daen su equipo o sus datos personales, pero si la selecciona es posible que el programa no funcione correctamente.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "El siguiente usuario:", 14002, 10, 100, 90, 10 + LTEXT "Usuario:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Contrasea:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "Aceptar", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancelar", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Propiedades de Papelera de reciclaje" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Configuracin para la unidad seleccionada ", -1, 10, 72, 220, 70 + RADIOBUTTON "Tamao &Personalizado:", 14001, 20, 90, 88, 10, WS_TABSTOP + EDITTEXT 14002, 120, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "&Tamao mximo(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "&No mover archivos a la Papelera de reciclaje. Quitar los archivos inmediatamente al eliminarlos.", 14003, 20, 117, 185, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Mostrar cuadro de dilogo para confirmar la eliminacin", 14004, 20, 155, 200, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 284, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Abrir con" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Elija el programa que desea usar para abrir el siguiente archivo:", -1, 44, 12, 211, 10 + LTEXT "Archivo: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programas ", -1, 7, 42, 269, 187 + LISTBOX 14002, 16 ,57, 250, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "Utilizar &siempre el programa seleccionado para abrir este tipo de archivos", 14003, 15, 193, 250, 10 + PUSHBUTTON "&Examinar...", 14004, 218, 207, 50, 14 + PUSHBUTTON "Aceptar", 14005, 170, 236, 50, 14 + PUSHBUTTON "Cancelar", 14006, 226, 236, 50, 14 +END + +IDD_SH_FILE_COPY DIALOGEX 0, 0, 264, 45 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Copiando..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Cancelar", 14002, 195, 14, 60, 16 + CONTROL "", 14000, "MSCTLS_PROGRESS32", 0, 8, 20, 170, 10 + LTEXT "Archivo", 14001, 8, 6, 169, 10 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 294, 240 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tareas", -1, 7, 10, 279, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "M&ostrar tareas comunes en las carpetas", 14001, 40, 25, 160, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Utilizar las carpetas cl&sicas de ReactOS", 14002, 40, 37, 160, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Examinar carpetas ", -1, 7, 60, 279, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Abrir todas las carpetas en la &misma ventana", 14004, 40, 75, 160, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Abrir cada carpeta ventanas di&ferentes", 14005, 40, 87, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Hacer clic en los elementos como se indica ", -1, 7, 110, 279, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Un solo clic para abrir elemento (seleccionar al sealar)", 14007, 40, 120, 190, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Subrayar los ttulos de iconos que coincidan con el e&xplorador", 14008, 50, 132, 220, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Subrayar &los ttulos de iconos cuando yo los seale", 14009, 50, 144, 190, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Doble clic para abrir elemento (seleccionar con un clic)", 14010, 40, 156, 190, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restaurar valores predeterminados", 14011, 146, 180, 140, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 294, 240 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Ver" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Vistas de carpeta", -1, 7, 10, 279, 60 +//ICON +LTEXT "Puede aplicar la vista que est usando con esta carpeta para el resto (como Detalles o Mosaicos).", -1, 60, 20, 200, 20 +PUSHBUTTON "A&plicar a todas las carpetas", 14001, 60, 50, 100, 14, WS_TABSTOP +PUSHBUTTON "R&estaurar todas las carpetas", 14002, 165, 50, 100, 14, WS_TABSTOP +LTEXT "Configuracin avanzada:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 279, 120 +PUSHBUTTON "&Restaurar valores predeterminados", 14004, 156, 220, 130, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 294, 240 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Tipos de Archivo" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "&Tipos de archivo registrados:", -1, 7, 10, 120, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 279, 80 +PUSHBUTTON "&Nueva", 14001, 170, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "Eli&minar", 14002, 230, 110, 50, 14, WS_TABSTOP +GROUPBOX "Detalles para el tipo de archivo '%s'", 14003, 7, 130, 279, 100 +LTEXT "Se abre con:", -1, 12, 140, 50, 10 +//ICON +LTEXT "Aplicacin", 14005, 100, 140, 40, 10 +PUSHBUTTON "Cam&biar...", 14006, 230, 140, 50, 14, WS_TABSTOP +LTEXT "Archivos con extensin '%s' son del tipo '%s'. Para cambiar la configuracin de los archivos '%s', haga clic en Opciones avanzadas.", 14007, 12, 165, 220, 30 +PUSHBUTTON "Opciones avanza&das", 14008, 190, 213, 90, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirmar el reemplazo de archivo" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&S", IDYES, 20, 122, 60, 14 + PUSHBUTTON "S a &todo", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Esta carpeta ya contiene un archivo con el nombre '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Esta carpeta ya contiene un archivo de slo lectura con el nombre '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Esta carpeta ya contiene un archivo de sistema con el nombre '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Desea reemplazar el archivo existente", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(tamao y fecha desconocidos)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "por este otro?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(tamao y fecha desconocidos)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Cerrar sesin ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Esta seguro de que quiere cerrar la sesin?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Cerrar sesin", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Desconectar ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Est seguro que desea desconectar?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Desconectar", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Reproduccin automtica" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Seleccione un tipo de contenido y elija una accin para que ReactOS la realice automticamente cuando ese tipo se use en este dispositivo:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Acciones ", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Seleccionar la &accin que desea ejecutar:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "&Preguntarme siempre que elija una accin", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restaurar valores predeterminados", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contenido mixto" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Este disco o dispositivo contiene ms de un tipo de contenido.", 1001, 32, 7, 191, 20 + LTEXT "Qu desea que haga ReactOS?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "Aceptar", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contenido mixto" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS puede realizar la misma accin cada vez que inserte un disco o conecte un dispositivo con este tipo de archivos:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Qu desea que haga ReactOS?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Realizar siempre la accin seleccionada.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "Aceptar", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Reproduccin automtica" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS puede realizar la misma accin cada vez que conecte este dispositivo.", 1001, 32, 7, 190, 22 + LTEXT "&Qu desea que haga ReactOS?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Realizar siempre la accin seleccionada", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "Aceptar", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Apagar ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Que quieres que haga el equipo?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Mantener su sesin, manteniendo el equipo en bajo consumo con los datos an en memoria. El equipo se restaura cuando presione una tecla o mueva el ratn.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "Aceptar", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancelar", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Ayuda", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formatear" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Iniciar", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Cerrar", IDCANCEL, 118, 198, 60, 14 + LTEXT "C&apacidad:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Sistema de archivos", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Tamao de unidad de asignacin", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Etiqueta del volumen", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "&Opciones de formato ", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "Formato &rpido", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Habilitar compresin", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 240, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Comprobar disco" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Iniciar", IDOK, 53, 100, 60, 14 + GROUPBOX "Opciones de comprobacin de disco ", -1, 7, 6, 225, 50 + PUSHBUTTON "Cancelar", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Reparar &automticamente errores en el sistema de archivos", 14000, 16, 15, 200, 10 + AUTOCHECKBOX "&Examinar e intentar recuperar los sectores defectuosos", 14001, 16, 30, 200, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 225, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Cambiar Icono" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Archivo:", -1, 7, 14, 208, 10 + PUSHBUTTON "Examinar...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Iconos:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "Aceptar",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancelar",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Archivo" + IDS_SHV_COLUMN2 "Tamao" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificado" + IDS_SHV_COLUMN5 "Atributos" + IDS_SHV_COLUMN6 "Tamao" + IDS_SHV_COLUMN7 "Tamao disponible" + IDS_SHV_COLUMN8 "Nombre" + IDS_SHV_COLUMN9 "Comentarios" + IDS_SHV_COLUMN10 "Propietario" + IDS_SHV_COLUMN11 "Grupo" + IDS_SHV_COLUMN12 "Nombre del archivo" + IDS_SHV_COLUMN13 "Categora" + IDS_SHV_COLUMN_DELFROM "Ubicacin original" + IDS_SHV_COLUMN_DELDATE "Fecha de eliminacin" + IDS_SHV_COLUMN_FONTTYPE "Tipo de fuente" + IDS_SHV_COLUMN_WORKGROUP "Grupo de trabajo" + IDS_SHV_NETWORKLOCATION "Ubicacin en red" + IDS_SHV_COLUMN_DOCUMENTS "Documentos" + IDS_SHV_COLUMN_STATUS "Estado" + IDS_SHV_COLUMN_COMMENTS "Comentarios" + IDS_SHV_COLUMN_LOCATION "Ubicacin" + IDS_SHV_COLUMN_MODEL "Modelo" + + /* special folders */ + IDS_DESKTOP "Escritorio" + IDS_MYCOMPUTER "Mi PC" + IDS_RECYCLEBIN_FOLDER_NAME "Papelera de reciclaje" + IDS_CONTROLPANEL "Panel de control" + IDS_ADMINISTRATIVETOOLS "Herramientas Administrativas" + + /* context menus */ + IDS_VIEW_LARGE "Iconos &grandes" + IDS_VIEW_SMALL "Iconos &pequeos" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Detalles" + IDS_SELECT "Seleccionar" + IDS_OPEN "Abrir" + IDS_CREATELINK "C&rear acceso directo" + IDS_COPY "&Copiar" + IDS_DELETE "&Eliminar" + IDS_PROPERTIES "&Propiedades" + IDS_CUT "C&ortar" + IDS_RESTORE "Restaurar" + IDS_FORMATDRIVE "Formatear..." + IDS_RENAME "Renombrar" + IDS_INSERT "Insertar" + + IDS_CREATEFOLDER_DENIED "No se puede crear una nueva carpeta: Permiso denegado." + IDS_CREATEFOLDER_CAPTION "Error durante la creacin de una nueva carpeta" + IDS_DELETEITEM_CAPTION "Confirmar eliminacin de archivos" + IDS_DELETEFOLDER_CAPTION "Confirmar eliminacin de carpetas" + IDS_DELETEITEM_TEXT "Seguro que desea eliminar '%1'?" + IDS_DELETEMULTIPLE_TEXT "Seguro que desea eliminar estos %1 elementos?" + IDS_DELETESELECTED_TEXT "Confirma que desea borrar el elemento(s) seleccionado(s)?" + IDS_TRASHITEM_TEXT "Confirma que desea enviar '%1' a la Papelera de reciclaje?" + IDS_TRASHFOLDER_TEXT "Confirma que desea enviar '%1' y todo su contenido a la Papelera de reciclaje?" + IDS_TRASHMULTIPLE_TEXT "Confirma que desea enviar %1 elementos a la Papelera de reciclaje?" + IDS_CANTTRASH_TEXT "El elemento '%1' no puede ser enviado a la Papelera de reciclaje. En vez de ello Desea borrarlo?" + IDS_OVERWRITEFILE_TEXT "Esta carpeta ya contiene un archivo con el nombre '%1'.\n\nDesea reemplazar el archivo existente?" + IDS_OVERWRITEFILE_CAPTION "Confirmar el reemplazo de archivo" + IDS_OVERWRITEFOLDER_TEXT "Esta carpeta ya contiene una carpeta con el nombre '%1'.\n\n"\ + "Si los archivos de la carpeta existente tienen el mismo nombre que los\n"\ + "archivos de la carpeta que est moviendo o copiando, sern\n"\ + "reemplazados. Desea mover o copiar la carpeta de todas formas?" + + /* message box strings */ + IDS_RESTART_TITLE "Reiniciar" + IDS_RESTART_PROMPT "Desea reiniciar el equipo?" + IDS_SHUTDOWN_TITLE "Apagar" + IDS_SHUTDOWN_PROMPT "Desea apagar el equipo?" + IDS_LOGOFF_TITLE "Cerrar sesin" + IDS_LOGOFF_PROMPT "Desea cerrar la sesin?" + + /* shell folder path default values */ + IDS_PROGRAMS "Men Inicio\\Programas" + IDS_PERSONAL "Mis documentos" + IDS_FAVORITES "Favoritos" + IDS_STARTUP "Men Inicio\\Programas\\Inicio" + IDS_RECENT "Reciente" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Men Inicio" + IDS_MYMUSIC "Mis documentos\\Mi msica" + IDS_MYVIDEO "Mis documentos\\Mis vdeos" + IDS_DESKTOPDIRECTORY "Escritorio" + IDS_NETHOOD "Entorno de red" + IDS_TEMPLATES "Plantillas" + IDS_APPDATA "Datos de Programa" + IDS_PRINTHOOD "Impresoras" + IDS_LOCAL_APPDATA "Configuracin local\\Datos de programa" + IDS_INTERNET_CACHE "Configuracin local\\Archivos temporales de Internet" + IDS_COOKIES "Cookies" + IDS_HISTORY "Configuracin local\\Historial" + IDS_PROGRAM_FILES "Archivos de programa" + IDS_MYPICTURES "Mis imgenes" + IDS_PROGRAM_FILES_COMMON "Archivos de programa\\Archivos comunes" + IDS_COMMON_DOCUMENTS "Documentos" + IDS_ADMINTOOLS "Men Inicio\\Programas\\Accesorios\\Herramientas del sistema" + IDS_COMMON_MUSIC "Documentos\\Mi msica" + IDS_COMMON_PICTURES "Documentos\\Mis imgenes" + IDS_COMMON_VIDEO "Documentos\\Mis vdeos" + IDS_CDBURN_AREA "Configuracin local\\Datos de programa\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Mis sitios de red" + + IDS_NEWFOLDER "Nueva carpeta" + + IDS_DRIVE_FIXED "Disco Local" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Unidad de red" + + IDS_OPEN_WITH "Abrir con" + IDS_OPEN_WITH_CHOOSE "Elegir programa..." + + IDS_SHELL_ABOUT_AUTHORS "&Autores" + IDS_SHELL_ABOUT_BACK "< A&trs" + FCIDM_SHVIEW_NEW "Nuevo" + FCIDM_SHVIEW_NEWFOLDER "Nueva &carpeta" + FCIDM_SHVIEW_NEWLINK "Nuevo &acceso directo" + IDS_FOLDER_OPTIONS "Opciones de carpetas" + IDS_RECYCLEBIN_LOCATION "Ubicacin de la Papelera de reciclaje" + IDS_RECYCLEBIN_DISKSPACE "Espacio disponible" + IDS_EMPTY_BITBUCKET "Vaciar Papelera de reciclaje" + IDS_PICK_ICON_TITLE "Seleccione un icono" + IDS_PICK_ICON_FILTER "Archivos de iconos(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Programas\0*.exe\0" + IDS_DIRECTORY "Directorio" + IDS_VIRTUAL_DRIVER "Controlador de dispositivo virtual" + IDS_BAT_FILE "Archivo por lotes ReactOS" + IDS_CMD_FILE "Script de comandos ReactOS" + IDS_COM_FILE "Aplicacin DOS" + IDS_CPL_FILE "Elemento del Panel de Control" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Extensin de la aplicacin" + IDS_DRV_FILE "Controlador de dispositivo" + IDS_EXE_FILE "Aplicacin" + IDS_FON_FILE "Archivo de fuente" + IDS_TTF_FILE "Archivo de fuente TrueType" + IDS_HLP_FILE "Archivo de ayuda" + IDS_INI_FILE "Opciones de configuracin" + IDS_LNK_FILE "Acceso directo" + IDS_SYS_FILE "Archivo del sistema" + + IDS_OPEN_VERB "Abrir" + IDS_RUNAS_VERB "Ejecutar como ..." + IDS_EDIT_VERB "Editar" + IDS_FIND_VERB "Buscar" + IDS_PRINT_VERB "Imprimir" + IDS_PLAY_VERB "Reproducir" + IDS_PREVIEW_VERB "Vista previa" + + IDS_FILE_FOLDER "%u Archivos, %u Carpetas" + IDS_PRINTERS "Impresoras" + IDS_FONTS "Fuentes" + IDS_INSTALLNEWFONT "Instalar Nueva Fuente..." + + IDS_DEFAULT_CLUSTER_SIZE "Tamao asignado por defecto" + IDS_COPY_OF "Copia de" + + IDS_SHLEXEC_NOASSOC "No hay ningn programa configurado en ReactOS para abrir este tipo de archivo." +END diff --git a/dll/win32/shell32_new/lang/fi-FI.rc b/dll/win32/shell32_new/lang/fi-FI.rc new file mode 100644 index 00000000000..6469ce1b7b5 --- /dev/null +++ b/dll/win32/shell32_new/lang/fi-FI.rc @@ -0,0 +1,756 @@ +/* + * Copyright 2005 Kimmo Myllyvirta + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Suuret Kuvakkeet", FCIDM_SHVIEW_BIGICON + MENUITEM "&Pienet Kuvakkeet", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Tiedot", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Nkym" + BEGIN + MENUITEM "&Pienet Kuvakkeet", FCIDM_SHVIEW_BIGICON + MENUITEM "&Suuret Kuvakkeet", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Tiedot", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "&Jrjest Kuvakkeet" + BEGIN + MENUITEM "&Nimen mukaan", 0x30 /* column 0 */ + MENUITEM "&Tyypin mukaan", 0x32 /* column 2 */ + MENUITEM "&Koon mukaan", 0x31 /* ... */ + MENUITEM "&Pivmrn mukaan", 0x33 + MENUITEM SEPARATOR + MENUITEM "Jrjest &Automaattisesti", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Jrjest kuvakkeet riviin", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Pivit", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Liit", FCIDM_SHVIEW_INSERT + MENUITEM "Liit Linkiksi", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Ominaisuudet", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Selaa", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Avaa", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Leikkaa", FCIDM_SHVIEW_CUT + MENUITEM "&Kopioi", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Lu&o Linkki", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Poista", FCIDM_SHVIEW_DELETE + MENUITEM "&Nime Uudelleen", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Ominaisuudet", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Valitse Kansio" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Peruuta", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Tietoja %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS:n toi Sinulle:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Anna ohjelma, dokumentti, tai Internet -ressurssi, ja ReactOS avaa sen Sinulle.", 12289, 36, 11, 182, 18 + LTEXT "&Avaa:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Peruuta", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Selaa...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Tiedosto" + IDS_SHV_COLUMN2 "Koko" + IDS_SHV_COLUMN3 "Tyyppi" + IDS_SHV_COLUMN4 "Muokattu" + IDS_SHV_COLUMN5 "Ominaisuudet" + IDS_SHV_COLUMN6 "Koko" + IDS_SHV_COLUMN7 "Tilaa jljell" + IDS_SHV_COLUMN8 "Nimi" + IDS_SHV_COLUMN9 "Kommentit" + IDS_SHV_COLUMN10 "Omistaja" + IDS_SHV_COLUMN11 "Ryhm" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Typyt" + IDS_MYCOMPUTER "Oma Tietokone" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "&Suuret Kuvakkeet" + IDS_VIEW_SMALL "&Pienet Kuvakkeet" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Tiedot" + IDS_SELECT "Valitse" + IDS_OPEN "Avaa" + IDS_CREATELINK "Lu&o Linkki" + IDS_COPY "&Kopioi" + IDS_DELETE "&Poista" + IDS_PROPERTIES "&Ominaisuudet" + IDS_CUT "&Leikkaa" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Uutta kansiota ei voitu luoda: Oikeudet eivt riit." + IDS_CREATEFOLDER_CAPTION "Virhe luotaessa uutta kansiota" + IDS_DELETEITEM_CAPTION "Vahvista tiedoston tuhoaminen" + IDS_DELETEFOLDER_CAPTION "Vahvista kansion tuhoaminen" + IDS_DELETEITEM_TEXT "Haluatko varmasti tuhota '%1':n?" + IDS_DELETEMULTIPLE_TEXT "Haluatko varmasti tuhota nm %1?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Vahvista Tiedoston Ylikirjoitus" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Kynnist uudestaan" + IDS_RESTART_PROMPT "Haluatko simuloida Windows:n uudelleenkynnistmist?" + IDS_SHUTDOWN_TITLE "Sammuta" + IDS_SHUTDOWN_PROMPT "Haluatko lopettaa Wine:n istunnon?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Kynnist\\Ohjelmat" + IDS_PERSONAL "Omat tiedostot" + IDS_FAVORITES "Suosikit" + IDS_STARTUP "Kynnist\\Ohjelmat\\Kynnistys" + IDS_RECENT "skettin kytetyt" + IDS_SENDTO "Lhet" + IDS_STARTMENU "Kynnist" + IDS_MYMUSIC "Omat musiikkitiedostot" + IDS_MYVIDEO "Omat videotiedostot" + IDS_DESKTOPDIRECTORY "Typyt" + IDS_NETHOOD "Verkkoymprist" + IDS_TEMPLATES "Mallit" + IDS_APPDATA "Ohjelmien Tiedot" + IDS_PRINTHOOD "Tulostinymprist" + IDS_LOCAL_APPDATA "Paikalliset Asetukset\\Ohjelmien Tiedot" + IDS_INTERNET_CACHE "Paikalliset Asetukset\\Vliaikaiset Internet-tiedostot" + IDS_COOKIES "Evsteet" + IDS_HISTORY "Paikalliset Asetukset\\Historia" + IDS_PROGRAM_FILES "Ohjelmat" + IDS_MYPICTURES "Omat kuvatiedostot" + IDS_PROGRAM_FILES_COMMON "Ohjelmat\\Yhteiset Tiedostot" + IDS_COMMON_DOCUMENTS "Dokumentit" + IDS_ADMINTOOLS "Kynnistys\\Ohjauspaneeli\\Administrative Tools" + IDS_COMMON_MUSIC "Dokumentit\\Omat musiikkitiedostot" + IDS_COMMON_PICTURES "Dokumentit\\Omat kuvatiedostot" + IDS_COMMON_VIDEO "Dokumentit\\Omat videotiedostot" + IDS_CDBURN_AREA "Paikalliset Asetukset\\Ohjelmien Tiedot\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "Uusi" + FCIDM_SHVIEW_NEWFOLDER "Uusi &Kansio" + FCIDM_SHVIEW_NEWLINK "Uusi &Linkki" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/fr-FR.rc b/dll/win32/shell32_new/lang/fr-FR.rc new file mode 100644 index 00000000000..0ba3b4473f2 --- /dev/null +++ b/dll/win32/shell32_new/lang/fr-FR.rc @@ -0,0 +1,760 @@ +/* + * Shell32 + * French language support + * + * Copyright 1998 Juergen Schmied + * 2007-2008 Pierre Schweitzer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Grandes icnes", FCIDM_SHVIEW_BIGICON + MENUITEM "&Petites icnes", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Dtails", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Affichage" + BEGIN + MENUITEM "&Grandes icnes", FCIDM_SHVIEW_BIGICON + MENUITEM "&Petites icnes", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Dtails", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Trier les &icnes" + BEGIN + MENUITEM "Par &nom", 0x30 /* column 0 */ + MENUITEM "Par &type", 0x32 /* column 2 */ + MENUITEM "Par t&aille", 0x31 /* ... */ + MENUITEM "Par &date", 0x33 + MENUITEM SEPARATOR + MENUITEM "T&ri automatique", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Aligner les icnes", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Rafrachir", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Coller", FCIDM_SHVIEW_INSERT + MENUITEM "Coller comme un lien", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Proprits", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplorer", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Ouvrir", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ouper", FCIDM_SHVIEW_CUT + MENUITEM "&Copier", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Crer un &lien", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Supprimer", FCIDM_SHVIEW_DELETE + MENUITEM "&Renommer", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Proprits", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Parcourir" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annuler", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Rechercher un dossier" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Dossier :", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Crer un nouveau dossier", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annuler", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Oui", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Oui pour tous", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Non", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annuler", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION " propos de %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Cette version de ReactOS est enregistre :", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Mmoire physique installe:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS est une ralisation de:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Entrez le nom d'un programme, d'un dossier, d'un document ou d'une ressource Internet, et ReactOS l'ouvrira pour vous.", 12289, 36, 11, 182, 18 + LTEXT "&Ouvrir :", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Annuler", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Parcourir...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Raccourci" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Type de la cible :", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Localisation de la cible :", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Cible :", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "Dmarrer dans :", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Touche de raccourci :", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Excuter :", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&ommentaire :", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "Trouver la cible...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Changer d'icne...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&vanc...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Proprits tendues" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choisissez la proprit tendue que vous voulez pour ce raccourci.", -1, 5, 30, 210, 10 + CHECKBOX "Excuter avec des droits diffrents", 14000, 25, 50, 150, 10 + LTEXT "Cette option peut vous permettre d'utiliser ce raccourci en tant qu'autre utilisateur ou de continuer vous-mme en protgeant votre ordinateur et vos donnes des activs de programme non autorises.", -1, 50, 60, 175, 40 + CHECKBOX "Lancer dans un espace mmoire spar", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Annuler", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Gnral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type de fichier :", 14004, 8, 35, 50, 10 + LTEXT "Dossier", 14005, 68, 35, 160, 10 + LTEXT "Localisation :", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Taille :", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contient :", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Cr :", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "Lectu&re-seule", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "Cac&h", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Gnral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type de fichier :", 14004, 8, 35, 50, 10 + LTEXT "Fichier", 14005, 68, 35, 160, 10 + LTEXT "Ouvrir avec :", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Localisation :", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Taille :", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Cr :", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modifi :", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accd :", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributs :", 14020, 8, 189, 45, 10 + CHECKBOX "Lectu&re-seule", 14021, 58, 189, 67, 10 + CHECKBOX "Cac&h", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Version du fichier : ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description : ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright : ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Autres informations de version : ", 14006, 6, 70, 222, 115 + LTEXT "Nom de l'lment : ", 14007, 13, 82, 50, 10 + LTEXT "Valeur : ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Gnral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type :", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Systme de fichiers :", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Espace utilis :", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Espace libre :", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacit :", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Lecteur %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Nettoyage de disque", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compresser le lecteur pour gagner de l'espace disque", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Autoriser le service d'indexation indexer ce disque pour une recherche rapide de fichiers", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Outils" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Vrification d'erreurs", -1, 5, 5, 230, 60 + LTEXT "Cette option vrifiera le volume pour viter les\nerreurs.", -1, 40, 25, 160, 20 + PUSHBUTTON "Vrifier maintenant...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Dfragmentation", -1, 5, 65, 230, 60 + LTEXT "Cette option va dfragmenter les fichiers sur ce volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Dfragmenter maintenant...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Sauvegarde", -1, 5, 130, 230, 60 + LTEXT "Cette option va sauvegarder les fichiers sur le volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Sauvegarder maintenant...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Matriel" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Lancer en tant que" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Quel compte d'utilisateur dsirez-vous utiliser pour lancer ce programme?", -1, 10, 20, 220, 20 + CHECKBOX "Utilisateur actuel %s", 14000, 10, 45, 150, 10 + LTEXT "Protger mon ordinateur et mes donnes des activits des programmes non autoriss", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Cette option peut empcher les virus d'ordinateur d'endommager votre ordinateur ou vos donnes personnelles, nanmoins slectionner cette option pourrait empcher le programme de fonctionner correctement.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "L'utilisateur suivant :", 14002, 10, 100, 90, 10 + LTEXT "Nom d'utilisateur :", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Mot de passe :", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Annuler", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Proprits de la corbeille" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Paramtres pour la localisation slectionne", -1, 10, 72, 220, 70 + RADIOBUTTON "Taille personnalise :", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "T&aille maximale (MO) :", -1, 20, 105, 70, 10 + RADIOBUTTON "Ne pas dplacer les fichie&rs vers la Corbeille. Effacer les fichiers immdiatement lors de la suppression.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "Afficher une fentre de confirmation d'effacement", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Ouvrir avec" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choisissez le programme que vous dsirez utiliser pour ouvrir ce fichier :", -1, 44, 12, 211, 10 + LTEXT "Fichier : ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programmes", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "Toujours utiliser le progr&amme slectionn pour ouvrir ce type de fichier", 14003, 20, 193, 225, 10 + PUSHBUTTON "Parcourir...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Annuler", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Gnral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tches", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Afficher les tches habituelles dans les dossiers", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Utiliser les dossiers ReactOS class&iques", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Parcourir les dossiers", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Ouvrir tous les dossiers dans la &mme fentre", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Ouvrir chaque dossier dans sa propre fentre", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Cliquer sur les lments de la faon suivante", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Clic unique pour ouvrir un lment (pointer pour slectionner)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Toujours souligner les titres des icnes comme dans le navigateur", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Souligner les titres des icnes seulement quand je les &pointe", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-cliquer pour ouvrir un lment (clic unique pour le slectionner)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "Pa&ramtres par dfaut", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Affichage" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Affichage des dossiers", -1, 7, 10, 249, 60 +//ICON +LTEXT "Vous pouvez appliquer l'affichage (tel que Dtails ou Miniatures) que\nvous utilisez pour ce dossier tous les dossiers.", -1, 60, 20, 180, 20 +PUSHBUTTON "Appliquer tous les dossiers", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Rinitialiser tous les dossiers", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Paramtres avancs :", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Paramtres par &dfaut", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Types de fichiers" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "&Types de fichiers enregistrs :", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Nouveau", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "Supprimer", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Dtails concernant l'extension '%s'", 14003, 7, 130, 249, 70 +LTEXT "Ouvrir avec :", -1, 12, 140, 40, 10 +//ICON +LTEXT "Nom de l'application", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Modifier...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Les fichiers avec l'extension '%s' sont de type '%s'. Pour\nmodifier les paramtres qui concernent tous les fichiers '%s', cliquez\nsur Avanc.", 14007, 12, 155, 160, 30 +PUSHBUTTON "A&vanc", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirmer le remplacement de fichier" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Oui", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Oui pour tous", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Non", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Annuler", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Ce dossier contient dj un fichier nomm '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Ce dossier contient dj un fichier en lecture-seule nomm '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Ce dossier contient dj un fichier systme nomm '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Dsirez-vous remplacer le fichier existant", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(date et taille inconnues)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "par celui-ci ?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(date et taille inconnues)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Fermer ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "tes-vous sr de vouloir fermer ReactOS ?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "Fermer", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Annuler", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Dconnecter ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "tes-vous sr de vouloir vous dconnecter ?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Dconnecter", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Annuler", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Excution automatique" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Slectionnez un type de contenu, puis choisissez une action que ReactOS ralisera automatiquement quand ce type sera utilis dans ce priphrique :", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Slectionnez une action raliser :", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "M'interroger chaque fois pour &choisir une action", 1006, 14, 177, 202, 10 + PUSHBUTTON "Pa&ramtres par dfaut", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contenu mixte" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Ce disque ou dispositif contient plus d'un type de fichiers.", 1001, 32, 7, 191, 20 + LTEXT "Que voulez-vous que ReactOS fasse ?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Annuler", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contenu mixte" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS peut raliser la mme action chaque fois que vous insrez un disque ou connectez un dispositif avec ce type de fichiers :", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Que voulez-vous que ReactOS fasse ?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Toujours raliser l'action slectionne.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Annuler", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Excution automatique" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS peut raliser la mme action chaque fois que vous connectez ce dispositif.", 1001, 32, 7, 190, 22 + LTEXT "Que voulez-vous que ReactOS fasse ?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "Toujours raliser l'action slectionne", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Annuler", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Fermer ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Que voulez-vous que l'ordinateur fasse ?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintenir votre session, garder votre ordinateur lanc avec peu d'nergie et les donnes toujours en mmoire. L'ordinateur se rveille lorsque vous pressez une touche ou que vous bougez la souris.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Annuler", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "Aide", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formater" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Dmarrer", IDOK, 53, 198, 60, 14 + PUSHBUTTON "Fermer", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacit :", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Systme de fichiers", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "Taille d'unit d'&allocation", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Nom du volume", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "&Options de formatage", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "Formatage rapide", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "Activer la compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Vrifier le disque" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Dmarrer", IDOK, 53, 100, 60, 14 + GROUPBOX "Options de vrification", -1, 7, 6, 179, 50 + PUSHBUTTON "Annuler", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Rparer automatiquement les erreurs du systme de fichiers", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scanner pour rechercher et rparer les secteurs dfectueux", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Changer l'icne" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Nom de fichier :", -1, 7, 14, 208, 10 + PUSHBUTTON "Parcourir...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icnes :", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Annuler",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Fichier" + IDS_SHV_COLUMN2 "Taille" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modifi" + IDS_SHV_COLUMN5 "Attributs" + IDS_SHV_COLUMN6 "Capacit" + IDS_SHV_COLUMN7 "Espace disponible" + IDS_SHV_COLUMN8 "Nom" + IDS_SHV_COLUMN9 "Commentaires" + IDS_SHV_COLUMN10 "Propritaire" + IDS_SHV_COLUMN11 "Groupe" + IDS_SHV_COLUMN12 "Nom de fichier" + IDS_SHV_COLUMN13 "Catgorie" + IDS_SHV_COLUMN_DELFROM "Localisation d'origine" + IDS_SHV_COLUMN_DELDATE "Date de suppression" + IDS_SHV_COLUMN_FONTTYPE "Type de police" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Emplacement rseau" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "tat" + IDS_SHV_COLUMN_COMMENTS "Commentaires" + IDS_SHV_COLUMN_LOCATION "Emplacement" + IDS_SHV_COLUMN_MODEL "Modle" + + /* special folders */ + IDS_DESKTOP "Bureau" + IDS_MYCOMPUTER "Poste de travail" + IDS_RECYCLEBIN_FOLDER_NAME "Corbeille" + IDS_CONTROLPANEL "Panneau de configuration" + IDS_ADMINISTRATIVETOOLS "Outils d'administration" + + /* context menus */ + IDS_VIEW_LARGE "&Grandes icnes" + IDS_VIEW_SMALL "&Petites icnes" + IDS_VIEW_LIST "&Liste" + IDS_VIEW_DETAILS "&Dtails" + IDS_SELECT "Slectionner" + IDS_OPEN "Ouvrir" + IDS_CREATELINK "Crer un &lien" + IDS_COPY "&Copier" + IDS_DELETE "&Supprimer" + IDS_PROPERTIES "&Proprits" + IDS_CUT "C&ouper" + IDS_RESTORE "Res&taurer" + IDS_FORMATDRIVE "Formater..." + IDS_RENAME "Renommer" + IDS_INSERT "Insrer" + + IDS_CREATEFOLDER_DENIED "Impossible de crer le nouveau dossier : permission refuse." + IDS_CREATEFOLDER_CAPTION "Erreur lors de la cration du nouveau dossier" + IDS_DELETEITEM_CAPTION "Confirmer la suppression du fichier" + IDS_DELETEFOLDER_CAPTION "Confirmer la suppression du dossier" + IDS_DELETEITEM_TEXT "tes-vous sr de vouloir supprimer '%1' ?" + IDS_DELETEMULTIPLE_TEXT "tes-vous sr de vouloir supprimer ces %1 lments ?" + IDS_DELETESELECTED_TEXT "tes-vous sr de vouloir supprimer l(es) lement(s) slectionn(s) ?" + IDS_TRASHITEM_TEXT "tes-vous sr de vouloir envoyer '%1' la Corbeille ?" + IDS_TRASHFOLDER_TEXT "tes-vous sr de vouloir envoyer '%1' et tout ce qu'il contient la Corbeille ?" + IDS_TRASHMULTIPLE_TEXT "tes-vous sr de vouloir envoyer ces %1 lments la Corbeille ?" + IDS_CANTTRASH_TEXT "L'lment '%1' ne peut tre envoy la Corbeille. Voulez-vous le supprimer ?" + IDS_OVERWRITEFILE_TEXT "Ce dossier contient dj un fichier nomm '%1'.\n\nVoulez-vous le remplacer ?" + IDS_OVERWRITEFILE_CAPTION "Confirmer l'crasement du fichier" + IDS_OVERWRITEFOLDER_TEXT "Ce dossier contient dj un dossier nomm '%1'.\n\n"\ + "Si les fichiers dans le dossier de destination ont les mmes noms que ceux dans le\n"\ + "dossier slectionn, ils seront remplacs. Voulez-vous toujours dplacer ou copier\n"\ + "le dossier?" + + /* message box strings */ + IDS_RESTART_TITLE "Redmarrer" + IDS_RESTART_PROMPT "Voulez-vous redmarrer votre ordinateur ?" + IDS_SHUTDOWN_TITLE "Arrter" + IDS_SHUTDOWN_PROMPT "Voulez-vous fermer la session ReactOS ?" + IDS_LOGOFF_TITLE "Se dconnecter" + IDS_LOGOFF_PROMPT "Voulez-vous vous dconnecter ?" + + /* shell folder path default values */ + IDS_PROGRAMS "Menu Dmarrer\\Programmes" + IDS_PERSONAL "Mes documents" + IDS_FAVORITES "Favoris" + IDS_STARTUP "Menu Dmarrer\\Programmes\\Dmarrage" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Menu Dmarrer" + IDS_MYMUSIC "Ma musique" + IDS_MYVIDEO "Mes vidos" + IDS_DESKTOPDIRECTORY "Bureau" + IDS_NETHOOD "Voisinage Rseau" + IDS_TEMPLATES "Modles" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "Voisinage d'impression" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\Historique" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Mes images" + IDS_PROGRAM_FILES_COMMON "Program Files\\Fichiers communs" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Menu Dmarrer\\Programmes\\Outils d'administration" + IDS_COMMON_MUSIC "Documents\\Ma musique" + IDS_COMMON_PICTURES "Documents\\Mes images" + IDS_COMMON_VIDEO "Documents\\Mes vidos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Mes emplacements rseau" + + IDS_NEWFOLDER "Nouveau dossier" + + IDS_DRIVE_FIXED "Disque local" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Disque rseau" + + IDS_OPEN_WITH "Ouvrir avec" + IDS_OPEN_WITH_CHOOSE "Choisir le programme..." + + IDS_SHELL_ABOUT_AUTHORS "&Auteurs" + IDS_SHELL_ABOUT_BACK "< Prcdent" + FCIDM_SHVIEW_NEW "Nouveau" + FCIDM_SHVIEW_NEWFOLDER "Nouveau d&ossier" + FCIDM_SHVIEW_NEWLINK "Nouveau &lien" + IDS_FOLDER_OPTIONS "Options du dossier" + IDS_RECYCLEBIN_LOCATION "Emplacement de la corbeille" + IDS_RECYCLEBIN_DISKSPACE "Espace disponible" + IDS_EMPTY_BITBUCKET "Vider la Corbeille" + IDS_PICK_ICON_TITLE "Choisir une icne" + IDS_PICK_ICON_FILTER "Fichiers d'icnes (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Fichiers excutables\0*.exe\0" + IDS_DIRECTORY "Dossier" + IDS_VIRTUAL_DRIVER "Pilote de priphrique virtuel" + IDS_BAT_FILE "Fichier Batch ReactOS" + IDS_CMD_FILE "Script de commandes ReactOS" + IDS_COM_FILE "Application DOS" + IDS_CPL_FILE "Elment du panneau de contrle" + IDS_CUR_FILE "Curseur" + IDS_DLL_FILE "Extension d'application" + IDS_DRV_FILE "Pilote de priphrique" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Fichier police" + IDS_TTF_FILE "Fichier police TrueType" + IDS_HLP_FILE "Fichier d'aide" + IDS_INI_FILE "Fichier de configuration" + IDS_LNK_FILE "Raccourci" + IDS_SYS_FILE "Fichier systme" + + IDS_OPEN_VERB "Ouvrir" + IDS_RUNAS_VERB "Lancer en tant que " + IDS_EDIT_VERB "diter" + IDS_FIND_VERB "Chercher" + IDS_PRINT_VERB "Imprimer" + IDS_PLAY_VERB "Lire" + IDS_PREVIEW_VERB "Apercevoir" + + IDS_FILE_FOLDER "%u fichiers, %u rpertoires" + IDS_PRINTERS "Imprimantes" + IDS_FONTS "Polices" + IDS_INSTALLNEWFONT "Installer une nouvelle police..." + + IDS_DEFAULT_CLUSTER_SIZE "Taille d'allocation par dfaut" + IDS_COPY_OF "Copie de" + + IDS_SHLEXEC_NOASSOC "Aucun programme Windows n'est configur pour ouvrir ce type de fichier." +END diff --git a/dll/win32/shell32_new/lang/hu-HU.rc b/dll/win32/shell32_new/lang/hu-HU.rc new file mode 100644 index 00000000000..e45819a2d47 --- /dev/null +++ b/dll/win32/shell32_new/lang/hu-HU.rc @@ -0,0 +1,759 @@ +/* + * Hungarian resources for shell32 + * + * Copyright 1998 Juergen Schmied + * Copyright 2005 Robert Horvath - Hungarian translation - talley at cubeclub.hu + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Nagy kpek", FCIDM_SHVIEW_BIGICON + MENUITEM "Kis kpek", FCIDM_SHVIEW_SMALLICON + MENUITEM "Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "Rszletek", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Nzet" + BEGIN + MENUITEM "Nagy kpek", FCIDM_SHVIEW_BIGICON + MENUITEM "Kis kpek", FCIDM_SHVIEW_SMALLICON + MENUITEM "Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "Rszletek", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Ikonok rendezse" + BEGIN + MENUITEM "&Nv szerint", 0x30 /* column 0 */ + MENUITEM "&Tpus szerint", 0x32 /* column 2 */ + MENUITEM "&Mret szerint", 0x31 /* ... */ + MENUITEM "&Ltrehozs ideje szerint", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Automatikus elrendezs", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Ikonok igazitsa", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Frissts", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Beilleszts", FCIDM_SHVIEW_INSERT + MENUITEM "Parancsikon beillesztse", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Belltsok", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "B&ngsz", FCIDM_SHVIEW_EXPLORE + MENUITEM "Megnyit", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "Kivgs", FCIDM_SHVIEW_CUT + MENUITEM "Msols", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Parancsikon ltrehozsa", FCIDM_SHVIEW_CREATELINK + MENUITEM "Trls", FCIDM_SHVIEW_DELETE + MENUITEM "tnevezs", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "Tulajdonsgok", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Mappk bngszse" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Mgse", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "A ReactOS kszti:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "rd be a program nevt, egy mappt, dokumentumt, vagy egy Internet cmet, s a ReactOS megnyitja.", 12289, 36, 11, 182, 18 + LTEXT "&Megnyits:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Mgse", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Bngszs...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "llomny" + IDS_SHV_COLUMN2 "Mret" + IDS_SHV_COLUMN3 "Tpus" + IDS_SHV_COLUMN4 "Mdostva" + IDS_SHV_COLUMN5 "Attribtumok" + IDS_SHV_COLUMN6 "Mret" + IDS_SHV_COLUMN7 "Rendelkezsre ll hely" + IDS_SHV_COLUMN8 "Nv" + IDS_SHV_COLUMN9 "Megjegyzsek" + IDS_SHV_COLUMN10 "Tulajdonos" + IDS_SHV_COLUMN11 "Csoport" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Asztal" + IDS_MYCOMPUTER "Szmtgp" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Nagy kpek" + IDS_VIEW_SMALL "Kis kpek" + IDS_VIEW_LIST "Lista" + IDS_VIEW_DETAILS "Rszletek" + IDS_SELECT "Kivlaszt" + IDS_OPEN "Megnyit" + IDS_CREATELINK "Parancsikon ltrehozsa" + IDS_COPY "Msols" + IDS_DELETE "Trls" + IDS_PROPERTIES "Tulajdonsgok" + IDS_CUT "Kivgs" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Nem hozhat ltre j mappa: Nincs hozz engedlyed." + IDS_CREATEFOLDER_CAPTION "Hiba a mappa ltrehozsakor" + IDS_DELETEITEM_CAPTION "llomny trlse" + IDS_DELETEFOLDER_CAPTION "Mappa trlse" + IDS_DELETEITEM_TEXT "Biztosan trlni szeretnd?: '%1'?" + IDS_DELETEMULTIPLE_TEXT "Biztosan trlni szeretnd ezt a(z) %1 elemet?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "llomny fellrsa" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "jraindts" + IDS_RESTART_PROMPT "jra szeretnd indtani a rendszert?" + IDS_SHUTDOWN_TITLE "Kikapcsols" + IDS_SHUTDOWN_PROMPT "Kiakarod kapcsolni szmtgpt?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "Dokumentumok" + IDS_FAVORITES "Kedvencek" + IDS_STARTUP "Start Menu\\Programs\\Automatikus indts" /* MS style: Indtpult */ + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Asztal" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Kpek" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Dokumentumok" + IDS_ADMINTOOLS "Start Menu\\Programs\\Felgyeleti eszkzk" + IDS_COMMON_MUSIC "Dokumentumok\\My Music" + IDS_COMMON_PICTURES "Dokumentumok\\Kpek" + IDS_COMMON_VIDEO "Dokumentumok\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "&j" + FCIDM_SHVIEW_NEWFOLDER "&Mappa" + FCIDM_SHVIEW_NEWLINK "&Parancsikon" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/it-IT.rc b/dll/win32/shell32_new/lang/it-IT.rc new file mode 100644 index 00000000000..824eb22a88e --- /dev/null +++ b/dll/win32/shell32_new/lang/it-IT.rc @@ -0,0 +1,767 @@ +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003-2004 Puoti + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Icone Grandi", FCIDM_SHVIEW_BIGICON + MENUITEM "&Icone Piccole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Dettagli", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Visualizza" + BEGIN + MENUITEM "&Icone Grandi", FCIDM_SHVIEW_BIGICON + MENUITEM "&Icone Piccole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Dettagli", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Disponi &Icone" + BEGIN + MENUITEM "Per &Nome", 0x30 /* column 0 */ + MENUITEM "Per &Tipo", 0x32 /* column 2 */ + MENUITEM "Per &Dimensione", 0x31 /* ... */ + MENUITEM "Per &Data", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Disponi Automaticamente", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Allinea Icone", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Aggiorna", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Incolla", FCIDM_SHVIEW_INSERT + MENUITEM "Crea Collegamento", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Propriet", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&splora", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Apri", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Taglia", FCIDM_SHVIEW_CUT + MENUITEM "&Copia", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "&Crea Collegamento", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Cancella", FCIDM_SHVIEW_DELETE + MENUITEM "&Rinomina", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Propriet", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Sfoglia Cartella" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annulla", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Selezione cartella" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Cartella:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Crea una nuova cartella", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annulla", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Messaggi" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Si", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Si a &tutti", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Annulla", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Informazioni su %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Versione " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Questa versione di ReactOS registrata da:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Memoria fisica installata:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS disponibile grazie a:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Digitare il nome del programma, della cartella, del documento o della risorsa internet, e ReactOS la aprir.", 12289, 36, 11, 182, 18 + LTEXT "&Apri:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Annulla", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Esplora...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Collegamento" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Tipo:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Posizione:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Nome:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Eseguito in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "&Tasto per il collegamento:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Esecuzione:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&ommento:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Trova...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Cambia icona...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&vanzate...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Propriet avanzate" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Scegliere le impostazioni avanzate per questo collegamento.", -1, 5, 30, 210, 10 + CHECKBOX "Eseguire con credenziali diverse", 14000, 25, 50, 150, 10 + LTEXT "Questa opzione permette l'esecuzione del collegamento come se si fosse un altro utente o di proteggere il computer e i dati da attivit non autorizzate del programma.", -1, 50, 60, 175, 40 + CHECKBOX "Eseguire in uno spazio di memoria separato", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Annulla", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Generale" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tipo del file:", 14004, 8, 35, 50, 10 + LTEXT "Cartella", 14005, 68, 35, 160, 10 + LTEXT "Posizione:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Dimensione:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contenente:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Creato:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Sola lettura", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Nascosto", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Generale" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tipo del file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Si apre con:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Posizione:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Dimensione:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Creato:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modificato:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Letto:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributi:", 14020, 8, 189, 45, 10 + CHECKBOX "&Sola lettura", 14021, 58, 189, 67, 10 + CHECKBOX "&Nascosto", 14022, 126, 189, 50, 10 + CHECKBOX "&Archivio", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Versione" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Versione: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Descrizione: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Altre informazioni sulla versione: ", 14006, 6, 70, 222, 115 + LTEXT "Nome dell'elemento: ", 14007, 13, 82, 50, 10 + LTEXT "Valore: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Generale" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Tipo:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Spazio usato:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Spazio libero:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacit:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Disco %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Pulitura disco", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Comprimere il disco per recuperare dello spazio", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Permettere di indicizzare questo disco al servizio di indicizzazione per avere ricerche dei file pi rapide", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Strumenti" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Controllo errori", -1, 5, 5, 230, 60 + LTEXT "Questa opzione controller questo volume\nper verificare l'assenza di errori.", -1, 40, 25, 160, 20 + PUSHBUTTON "Controlla...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Deframmentazione", -1, 5, 65, 230, 60 + LTEXT "Questa opzione deframmenter i file di questo volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Deframmenta...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Salvataggio", -1, 5, 130, 230, 60 + LTEXT "Questa opzione effettuer un salvataggio dei file del volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Salvataggio...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Esegui come" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Quale utente volete utilizzare per l'esecuzione di questo programma?", -1, 10, 20, 220, 20 + CHECKBOX "Utente attuale %s", 14000, 10, 45, 150, 10 + LTEXT "Proteggere il computer e i dati da attivit del programma non autorizzate", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Questa opzione pu prevenire i danni causati da virus del computer ma potrebbe impedire il corretto funzionamento del programma.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "L'utente seguente:", 14002, 10, 100, 90, 10 + LTEXT "Utente:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Annulla", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Propriet del cestino" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Impostazioni per la posizione indicata", -1, 10, 72, 220, 70 + RADIOBUTTON "&Dimensione personalizzata:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "Dimensione &massima(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "&Non spostare i file nel cestino. I file verranno rimossi immediatamente.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Visualizzare un messaggio di richiesta di conferma della cancellazione", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Apri con" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Scegliere il programma che volete usare per aprire questo file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programmi", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Usare sempre il programma selezionato per aprire questo tipo di file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Sfoglia...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Annulla", 14006, 206, 236, 50, 14 +END + +IDD_SH_FILE_COPY DIALOGEX 0, 0, 264, 45 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Copia in corso..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Annulla", 14002, 195, 14, 60, 16 + CONTROL "", 14000, "MSCTLS_PROGRESS32", 0, 8, 20, 170, 10 + LTEXT "File", 14001, 8, 6, 169, 10 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Generale" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Attivit", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Mostrare le attivit comuni nelle cartelle", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Utilizzare le cartelle nella forma 'ReactOS class&ic' ", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Sfoglia cartelle", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Aprire ogni cartella nella stessa finestra", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Aprire ogni cartella in una nuova finestra", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click sugli elementi come segue", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Click singolo per aprire un elemento (seleziona ed apre)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Sottolinea i titoli delle icone in modo coerente con il &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Sottolinea i titoli delle icone solo se &selezionate", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Doppio click per aprire un elemento (click singolo per selezionare)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Ripristina le impostazioni predefinite", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Visualizzazione" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Vista delle cartelle", -1, 7, 10, 249, 60 +//ICON +LTEXT "Potete applicare la modalit di visualizzazione attuale\na tutte le cartelle.", -1, 60, 20, 180, 20 +PUSHBUTTON "Applicare a &tutte le cartelle", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Ripristina tutte le cartelle", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Impostazioni avanzate:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Ripristina come predefinite", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Tipi dei File" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "&Tipi di file Registrati:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Nuovo", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Cancella", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Dettagli per l'estensione '%s'", 14003, 7, 130, 249, 70 +LTEXT "Si apre con:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Nome", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Cambia...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "I files con estensione '%s' sono di tipo '%s'.\nPer cambiare le impostazioni che influenzano tutti i file '%s', cliccare\nAvanzate.", 14007, 12, 155, 160, 30 +PUSHBUTTON "A&vanzate", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Conferma della sovrascrittura dei file" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&S", IDYES, 20, 122, 60, 14 + PUSHBUTTON "S &tutti", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Annulla", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Questa cartella contiene gi un file con nome '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Questa cartella contiene un file a solo lettura con nome '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Questa cartella contiene un file di sistema con nome '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Volete sostituire il file esistente", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(data e dimensione sconosciuti)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "con questo?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(data e dimensione sconosciuti)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Chiudi sessione di ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Siete sicuro di voler Chiudere la sessione?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Chiudi sessione", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Annulla", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Scollega ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Siete sicuro di volervi scollegare?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Scollega", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Annulla", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Partenza automatica" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Selezionate un tipo di contenuto e poi un tipo di azione che ReactOS deve eseguire automaticamente quando quel tipo usato in questo dispositivo:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Azioni", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Selezionare una azione da &eseguire:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "&Chiedere ogni volta quale azione eseguire", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Ripristina le impostazioni predefinite", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contenuti misti" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Questo disco o dispositivo contiene pi di un tipo di contenuto.", 1001, 32, 7, 191, 20 + LTEXT "Cosa volete che faccia ReactOS?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Annulla", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contenuti misti" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS pu eseguire la stessa azione ogni volta che viene inserito un disco o connesso un dispositivo con questo tipo di file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Cosa volete che faccia ReactOS?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Esegui sempre l'azione selezionata.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Annulla", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Esecuzione automatica" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS pu eseguire la stessa azione ogni volta che collegate questo dispositivo.", 1001, 32, 7, 190, 22 + LTEXT "&Cosa volete che faccia ReactOS?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Esegui sempre l'azione selezionata", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Annulla", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Spegnimento di ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Cosa volete che faccia ReactOS?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Mantenere la vostra sessione, il computer acceso a bassa potenza con i dati in memoria. Il computer si riattiver quando premuto un taso o mosso il mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Annulla", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Aiuto", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formattazione" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Inizia", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Chiudi", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacit:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "Dimensione dell'unit di &allocazione", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Etichetta del Volume", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Opzioni di &formattazione", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "Formattazione &rapida", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "Abilita la &compressione", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Inizia", IDOK, 53, 100, 60, 14 + GROUPBOX "Opzioni per la verifica del disco", -1, 7, 6, 179, 50 + PUSHBUTTON "Annulla", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Correggi automaticamente gli errori", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Ricerca dei settori difettosi e tentativo di correzione", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Cambia icona" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Nome del file:", -1, 7, 14, 208, 10 + PUSHBUTTON "Sfoglia...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icone:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Annulla",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Dimensione" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificato" + IDS_SHV_COLUMN5 "Attributi" + IDS_SHV_COLUMN6 "Dimensione" + IDS_SHV_COLUMN7 "Dimensione disponibile" + IDS_SHV_COLUMN8 "Nome" + IDS_SHV_COLUMN9 "Commenti" + IDS_SHV_COLUMN10 "Proprietario" + IDS_SHV_COLUMN11 "Gruppo" + IDS_SHV_COLUMN12 "Nome file" + IDS_SHV_COLUMN13 "Categoria" + IDS_SHV_COLUMN_DELFROM "Posizione originale" + IDS_SHV_COLUMN_DELDATE "Data di cancellazione" + IDS_SHV_COLUMN_FONTTYPE "Tipo di font" + IDS_SHV_COLUMN_WORKGROUP "Gruppo di lavoro" + IDS_SHV_NETWORKLOCATION "Posizione in rete" + IDS_SHV_COLUMN_DOCUMENTS "Documenti" + IDS_SHV_COLUMN_STATUS "Stato" + IDS_SHV_COLUMN_COMMENTS "Commenti" + IDS_SHV_COLUMN_LOCATION "Posizione" + IDS_SHV_COLUMN_MODEL "Modello" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "Risorse del Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Cestino" + IDS_CONTROLPANEL "Pannello di controllo" + IDS_ADMINISTRATIVETOOLS "Strumenti di amministrazione" + + /* context menus */ + IDS_VIEW_LARGE "&Icone Grandi" + IDS_VIEW_SMALL "I&cone Piccole" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Dettagli" + IDS_SELECT "Selezione" + IDS_OPEN "Apri" + IDS_CREATELINK "&Crea Collegamento" + IDS_COPY "&Copia" + IDS_DELETE "&Cancella" + IDS_PROPERTIES "&Propriet" + IDS_CUT "&Taglia" + IDS_RESTORE "Ripristina" + IDS_FORMATDRIVE "Formatta..." + IDS_RENAME "Rinomina" + IDS_INSERT "Inserisci" + + IDS_CREATEFOLDER_DENIED "Impossibile creare la cartella: Accesso negato." + IDS_CREATEFOLDER_CAPTION "Errore durante la creazione della cartella" + IDS_DELETEITEM_CAPTION "Confermare la cancellazione del file" + IDS_DELETEFOLDER_CAPTION "Confermare la cancellazione della cartella" + IDS_DELETEITEM_TEXT "Sei sicuro di voler cancellare '%1'?" + IDS_DELETEMULTIPLE_TEXT "Sei sicuro di voler cancellare questi %1 elementi?" + IDS_DELETESELECTED_TEXT "Sei sicuro di voler cancellare gli elementi selezionati?" + IDS_TRASHITEM_TEXT "Sei sicuro di voler spostare '%1' Nel cestino?" + IDS_TRASHFOLDER_TEXT "Sei sicuro di voler spostare '%1' e tutto il suo contenuto nel cestino?" + IDS_TRASHMULTIPLE_TEXT "Sei sicuro di voler spostare %1 elementi nel cestino?" + IDS_CANTTRASH_TEXT "L'elemento '%1' non pu essere spostato nel cestino. Volete cancellarlo?" + IDS_OVERWRITEFILE_TEXT "Questa cartella contiene gi un file con nome '%1'.\n\nVolete sostituirlo?" + IDS_OVERWRITEFILE_CAPTION "Confermare la sovrascrittura del File" + IDS_OVERWRITEFOLDER_TEXT "Questa cartella contiene gi una cartella con nome '%1'.\n\n"\ + "Se i file nella cartella di destinazione hanno gli stessi nomi di quelli della \n"\ + "cartella selezionata saranno sovrascritti. Volete procedere comunque?\n"\ + "" + + /* message box strings */ + IDS_RESTART_TITLE "Riavvia" + IDS_RESTART_PROMPT "Volete riavviare il sistema?" + IDS_SHUTDOWN_TITLE "Arresta sistema" + IDS_SHUTDOWN_PROMPT "Volete arrestare il sistema?" + IDS_LOGOFF_TITLE "Disconnetti" + IDS_LOGOFF_PROMPT "Volete disconnettervi?" + + /* shell folder path default values */ + IDS_PROGRAMS "Menu Avvio\\Programmi" + IDS_PERSONAL "Documenti Personali" + IDS_FAVORITES "Preferiti" + IDS_STARTUP "Menu Avvio\\Programmi\\AvvioAutomatico" + IDS_RECENT "Recenti" + IDS_SENDTO "Invia A" + IDS_STARTMENU "Menu Avvio" + IDS_MYMUSIC "Musica" + IDS_MYVIDEO "Video" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "Rete" + IDS_TEMPLATES "Modelli" + IDS_APPDATA "DatiApplicazioni" + IDS_PRINTHOOD "Stampanti" + IDS_LOCAL_APPDATA "Impostazioni locali\\Dati Applicazioni" + IDS_INTERNET_CACHE "Impostazioni locali\\File Temporanei di Internet" + IDS_COOKIES "Cookies" + IDS_HISTORY "Impostazioni locali\\Storia" + IDS_PROGRAM_FILES "Programmi" + IDS_MYPICTURES "Foto" + IDS_PROGRAM_FILES_COMMON "Programmi\\File Comuni" + IDS_COMMON_DOCUMENTS "Documenti" + IDS_ADMINTOOLS "Menu Avvio\\Programmi\\Strumenti di Amministrazione" + IDS_COMMON_MUSIC "Documenti\\Musica" + IDS_COMMON_PICTURES "Documenti\\Foto" + IDS_COMMON_VIDEO "Documenti\\Video" + IDS_CDBURN_AREA "Impostazioni Locali\\Dati Applicazioni\\Microsoft\\Masterizza CD" + IDS_NETWORKPLACE "Risorse di rete" + + IDS_NEWFOLDER "Nuova cartella" + + IDS_DRIVE_FIXED "Disco locale" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Disco di Rete" + + IDS_OPEN_WITH "Apri con" + IDS_OPEN_WITH_CHOOSE "Scegliere un programma..." + + IDS_SHELL_ABOUT_AUTHORS "&Autori" + IDS_SHELL_ABOUT_BACK "< &Indietro" + FCIDM_SHVIEW_NEW "Nuovo" + FCIDM_SHVIEW_NEWFOLDER "Nuova &Cartella" + FCIDM_SHVIEW_NEWLINK "Nuovo &Collegamento" + IDS_FOLDER_OPTIONS "Opzioni della cartella" + IDS_RECYCLEBIN_LOCATION "Posizione del Cestino" + IDS_RECYCLEBIN_DISKSPACE "Spazio disponibile" + IDS_EMPTY_BITBUCKET "Svuota cestino" + IDS_PICK_ICON_TITLE "Scegliere un icona" + IDS_PICK_ICON_FILTER "Icone(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "File eseguibili\0*.exe\0" + IDS_DIRECTORY "Cartella" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Applicazione Dos" + IDS_CPL_FILE "Elemento del pannello di controllo" + IDS_CUR_FILE "Cursore" + IDS_DLL_FILE "Estensione di applicazione" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Applicazione" + IDS_FON_FILE "Font" + IDS_TTF_FILE "TrueType Font" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Impostazioni di configurazione" + IDS_LNK_FILE "Collegamento" + IDS_SYS_FILE "File di sistema" + + IDS_OPEN_VERB "Apri" + IDS_RUNAS_VERB "Eseguire come " + IDS_EDIT_VERB "Modifica" + IDS_FIND_VERB "Cerca" + IDS_PRINT_VERB "Stampa" + IDS_PLAY_VERB "Mostra" + IDS_PREVIEW_VERB "Anteprima" + + IDS_FILE_FOLDER "%u File, %u Cartelle" + IDS_PRINTERS "Stampanti" + IDS_FONTS "Font" + IDS_INSTALLNEWFONT "Installazione nuovi Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Dimensione predefinita di allocazione" + IDS_COPY_OF "Copia di" + + IDS_SHLEXEC_NOASSOC "Non c' un programma configurato per aprire questo tipo di file." +END diff --git a/dll/win32/shell32_new/lang/ja-JP.rc b/dll/win32/shell32_new/lang/ja-JP.rc new file mode 100644 index 00000000000..c09ba106660 --- /dev/null +++ b/dll/win32/shell32_new/lang/ja-JP.rc @@ -0,0 +1,755 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "傫ACR(&G)", FCIDM_SHVIEW_BIGICON + MENUITEM "ACR(&M)", FCIDM_SHVIEW_SMALLICON + MENUITEM "ꗗ(&L)", FCIDM_SHVIEW_LISTVIEW + MENUITEM "ڍ(&D)", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "\\(&V)" + BEGIN + MENUITEM "傫ACR(&G)", FCIDM_SHVIEW_BIGICON + MENUITEM "ACR(&M)", FCIDM_SHVIEW_SMALLICON + MENUITEM "ꗗ(&L)", FCIDM_SHVIEW_LISTVIEW + MENUITEM "ڍ(&D)", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "ACR̐(&I)" + BEGIN + MENUITEM "O(&N)", 0x30 /* column 0 */ + MENUITEM "ޏ(&T)", 0x32 /* column 2 */ + MENUITEM "TCY(&S)", 0x31 /* ... */ + MENUITEM "t(&D)", 0x33 + MENUITEM SEPARATOR + MENUITEM "ACR̎(&A)", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Ԋuɐ", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "ŐV̏ɍXV", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "\\t", FCIDM_SHVIEW_INSERT + MENUITEM "V[gJbg̓\\t", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "vpeB", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "GNXv[(&X)", FCIDM_SHVIEW_EXPLORE + MENUITEM "J(&O)", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "؂(&U)", FCIDM_SHVIEW_CUT + MENUITEM "Rs[(&C)", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "V[gJbg̍쐬(&L)", FCIDM_SHVIEW_CREATELINK + MENUITEM "폜(&D)", FCIDM_SHVIEW_DELETE + MENUITEM "O̕ύX(&R)", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "vpeB(&P)", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "tH_̎Q" +FONT 9, "MS UI Gothic" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "LZ", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "tH_̎Q" +FONT 9, "MS UI Gothic" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "tH_:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "VtH_̍쐬(&M)", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "LZ", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "bZ[W" +FONT 9, "MS UI Gothic" +BEGIN + DEFPUSHBUTTON "͂(&Y)", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "ׂĂ͂(&A)", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "(&N)", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "LZ(&C)", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "%s ɂ‚" +FONT 9, "MS UI Gothic" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "o[W " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "ReactOS̃o[W͎̕ɓo^Ă܂:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "ڂĂ镨e:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 9, "MS UI Gothic" +BEGIN + LTEXT "ReactOS͎̕XɂĒ񋟂Ă܂:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 9, "MS UI Gothic" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "svOA܂͊JtH_╶AC^[lbg \\[X͂ĂB", 12289, 36, 11, 182, 18 + LTEXT "O(&O):", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "LZ", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Q(&B)...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "V[gJbg" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Ώۂ̎:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Ώۂ̏ꏊ:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Ώ:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "s(&S):", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "V[gJbgL[(&K):", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "s:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "Rg(&O):", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "Ώۂ̌(&F)...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "ACR̕ύX(&C)...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "ڍאݒ(&D)...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "gvpeB" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + LTEXT "̃V[gJbgɎgpgvpeBIĂB", -1, 5, 30, 210, 10 + CHECKBOX "قȂlؖŎs", 14000, 25, 50, 150, 10 + LTEXT "̃IvVgpƂ̃V[gJbgʂ̃[U[ƂĎsł܂B܂AgŎsꍇA‚ĂȂvO̊Rs[^ƃf[^یł܂B", -1, 50, 60, 175, 40 + CHECKBOX "ʂ̃̈Ŏs", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "~", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "S" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "t@C̎:", 14004, 8, 35, 50, 10 + LTEXT "tH_", 14005, 68, 35, 160, 10 + LTEXT "ꏊ:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "TCY:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "eTCY:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "쐬:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "ǂݎp(&R)", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "Bt@C(&H)", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "S" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "t@C̎:", 14004, 8, 35, 50, 10 + LTEXT "t@C", 14005, 68, 35, 160, 10 + LTEXT "svO:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "ꏊ:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "TCY:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "쐬:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "ύX:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "ANZX:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT ":", 14020, 8, 189, 45, 10 + CHECKBOX "ǂݎp(&R)", 14021, 58, 189, 67, 10 + CHECKBOX "Bt@C(&H)", 14022, 126, 189, 50, 10 + CHECKBOX "A[JCu(&A)", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "o[W" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + LTEXT "t@Co[W: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT ": ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "쌠: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "̑̃o[W: ", 14006, 6, 70, 222, 115 + LTEXT "ږ: ", 14007, 13, 82, 50, 10 + LTEXT "l: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "S" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT ":", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "t@CVXe:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "gp̈:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "󂫗̈:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "e:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "hCu %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "fBXÑN[Abv", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "hCukăfBXN̈mۂ", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "̃fBXNɃCfbNXtăt@C𑬂B", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "c[" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + GROUPBOX "G[`FbN", -1, 5, 5, 230, 60 + LTEXT "̃IvV̓{[G[`FbN܂B", -1, 40, 25, 160, 20 + PUSHBUTTON "Ƀ`FbN...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "œK", -1, 5, 65, 230, 60 + LTEXT "̃IvV͂̃{[̃t@CœK܂", -1, 40, 85, 160, 20 + PUSHBUTTON "ɍœK...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "obNAbv", -1, 5, 130, 230, 60 + LTEXT "̃IvV͂̃{[̃t@CobNAbv܂B", -1, 40, 150, 160, 20 + PUSHBUTTON "ɃobNAbv...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "n[hEFA" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "ʂ̃[U[ƂĎs" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + LTEXT "̃vOs郆[U[AJEgIĂ", -1, 10, 20, 220, 20 + CHECKBOX "݂̃[U[ (%s)", 14000, 10, 45, 150, 10 + LTEXT "‚ĂȂvO̊Rs[^ƃf[^ی삷", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "̃IvV̓Rs[^lf[^ɊQ炷Rs[^ECX𖢑Rɖh~邱Ƃł܂BÃIvVIƃvOɋ@\\ȂȂ”\\܂B", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "̃[U[:", 14002, 10, 100, 90, 10 + LTEXT "[U[:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "pX[h:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "LZ", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "ݔ̃vpeB" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Iꂽꏊ̐ݒ", -1, 10, 72, 220, 70 + RADIOBUTTON "JX^TCY(&C):", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "őTCY(MB)(&A):", -1, 20, 105, 70, 10 + RADIOBUTTON "t@CݔɈړɂɍ폜B(&R)", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "폜̊mF_CAO\\(&D)", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "JvO" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "̃t@CJ߂ɎgpvOIĂ:", -1, 44, 12, 211, 10 + LTEXT "t@C: ", 14001, 44, 25, 188, 10 + GROUPBOX "vÖꗗ(&P)", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "̎ނ̃t@CJƂ́AɑIvOgp(&A)", 14003, 20, 193, 225, 10 + PUSHBUTTON "Q(&B)...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "LZ", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "S" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN + GROUPBOX "^XN", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "tH_ɋʂ̃^XN\\(&F)", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "ReactOS NVbN tH_gp(&I)", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "tH_̎Q", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "EBhEŃtH_J(&M)", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "tH_ƂɈقȂEBhEŊJ(&W)", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "ڂ̃NbN@", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "VONbNōڂJ(|CgőI) (&S)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "uEUɍ킹ăACR^Cgɉ(&B)", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "|CgƂ̂݃ACR^Cgɉ(&P)", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "_uNbNōڂJ(VONbNőI)(&D)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "ftHgɖ߂(&R)", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "\\" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN +GROUPBOX "tH_̕\\@", -1, 7, 10, 249, 60 +//ICON +LTEXT "̃tH_ɎgpĂ\\@(ڍו\\ׂĕ\\Ȃ)\nׂẴtH_ɓKpł܂B", -1, 60, 20, 180, 20 +PUSHBUTTON "ׂẴtH_ɓKp(&L)", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "ׂẴtH_Zbg(&R)", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "ڍאݒ:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "ftHgɖ߂(&D)", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "t@C̎" +FONT 9, "MS UI Gothic", 0, 0, 0x0 +BEGIN +LTEXT "o^Ăt@C̎(&T):", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "VK(&N)", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "폜(&D)", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "gq '%s' ̏ڍ", 14003, 7, 130, 249, 70 +LTEXT "JvO:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Av", 14005, 100, 140, 40, 10 +PUSHBUTTON "ύX(&C)...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "gq '%s' ̃t@C̎ނ'%s'łB\n'%s' ̃t@CׂĂɑ΂ݒύXɂ\nڍאݒNbNĂB", 14007, 12, 155, 160, 30 +PUSHBUTTON "ڍאݒ(&V)", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "t@C̒ůmF" +FONT 9, "MS UI Gothic" +BEGIN + DEFPUSHBUTTON "͂(&Y)", IDYES, 20, 122, 60, 14 + PUSHBUTTON "ׂĂ͂(&A)", 12807, 85, 122, 60, 14 + PUSHBUTTON "(&N)", IDNO, 150, 122, 60, 14 + PUSHBUTTON "LZ", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "̃tH_ɂ͊Ƀt@C'%2'݂܂B", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "̃tH_ɂ͊ɓǂݎpt@C'%2'݂܂B", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "̃tH_ɂ͊ɃVXet@C'%2'݂܂B", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "̃t@C", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(tƃTCYs)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "Ƃ̃t@CuĂ낵ł?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(tƃTCYs)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "ReactOS̃OIt" +FONT 9, "MS UI Gothic" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "OItĂ낵ł?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "OIt(&L)", IDOK, 57, 40, 60, 14 + PUSHBUTTON "LZ", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "ReactOS̐ؒf" +FONT 9, "MS UI Gothic" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "ؒfĂ낵ł?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "ؒf(&D)", IDOK, 57, 40, 60, 14 + PUSHBUTTON "LZ", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Đ" +FONT 9, "MS UI Gothic" +BEGIN + LTEXT "Rec̎ނIŁA̎ނ̃foCXŎgpƂReactOSIɎs铮IĂ(&S):", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "s铮I(&P):", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "𖈉I悤ɑ(&C)", 1006, 14, 177, 202, 10 + PUSHBUTTON "ftHgɖ߂(&R)", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "݂Rec" +FONT 9, "MS UI Gothic" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "̃fBXN̓foCXɂ͕̎ނ̃Rec܂܂Ă܂B", 1001, 32, 7, 191, 20 + LTEXT "ReactOS s铮IĂ", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "LZ", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "݂Rec" +FONT 9, "MS UI Gothic" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS ̓fBXN}A͂̃t@C̎ނ̃foCXڑꂽƂ񓯂삪”\\ł:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "ReactOS s铮IĂ", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "ɑIsB", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "LZ", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Đ" +FONT 9, "MS UI Gothic" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS ͂̃foCXڑꂽƂ񓯂삪”\\łB", 1001, 32, 7, 190, 22 + LTEXT "ReactOS s铮IĂ(&W)", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "ɑIs(&A)", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "LZ", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "ReactOS̃Vbg_E" +FONT 9, "MS UI Gothic" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Rs[^̓IĂ", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Ƀf[^ԂŃZbVێAd͂ŃRs[^s܂BL[A}EX𓮂肷ƁARs[^͓o܂B", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "LZ", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "wv(&H)", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "tH[}bg" +FONT 9, "MS UI Gothic" +BEGIN + DEFPUSHBUTTON "Jn(&S)", IDOK, 53, 198, 60, 14 + PUSHBUTTON "‚(&C)", IDCANCEL, 118, 198, 60, 14 + LTEXT "e(&P):", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "t@CVXe(&F)", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "AP[VjbgTCY(&A)", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "{[x(&L)", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "tH[}bg IvV(&O)", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "NCbN tH[}bg(&Q)", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "kLɂ(&E)", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "`FbNfBXN" +FONT 9, "MS UI Gothic" +BEGIN + DEFPUSHBUTTON "Jn", IDOK, 53, 100, 60, 14 + GROUPBOX "`FbNfBXNIvV", -1, 7, 6, 179, 50 + PUSHBUTTON "LZ", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "IɃt@CVXẽG[C", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "obhZN^XL񕜂݂(&S)", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "ACR̕ύX" +FONT 9, "MS UI Gothic", 400, 0, 0x1 +BEGIN + LTEXT "t@C:", -1, 7, 14, 208, 10 + PUSHBUTTON "Q...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "ACR:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "LZ",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "O" + IDS_SHV_COLUMN2 "TCY" + IDS_SHV_COLUMN3 "" + IDS_SHV_COLUMN4 "XV" + IDS_SHV_COLUMN5 "" + IDS_SHV_COLUMN6 "vTCY" + IDS_SHV_COLUMN7 "󂫗e" + IDS_SHV_COLUMN8 "쐬" + IDS_SHV_COLUMN9 "Rg" + IDS_SHV_COLUMN10 "L" + IDS_SHV_COLUMN11 "O[v" + IDS_SHV_COLUMN12 "t@C" + IDS_SHV_COLUMN13 "JeS" + IDS_SHV_COLUMN_DELFROM "̏ꏊ" + IDS_SHV_COLUMN_DELDATE "폜" + IDS_SHV_COLUMN_FONTTYPE "tHg̎" + IDS_SHV_COLUMN_WORKGROUP "[NO[v" + IDS_SHV_NETWORKLOCATION "lbg[N̏ꏊ" + IDS_SHV_COLUMN_DOCUMENTS "hLg" + IDS_SHV_COLUMN_STATUS "" + IDS_SHV_COLUMN_COMMENTS "Rg" + IDS_SHV_COLUMN_LOCATION "ꏊ" + IDS_SHV_COLUMN_MODEL "f" + + /* special folders */ + IDS_DESKTOP "fXNgbv" + IDS_MYCOMPUTER "}C Rs[^" + IDS_RECYCLEBIN_FOLDER_NAME "ݔ" + IDS_CONTROLPANEL "Rg[ pl" + IDS_ADMINISTRATIVETOOLS "Ǘc[" + + /* context menus */ + IDS_VIEW_LARGE "傫ACR(&G)" + IDS_VIEW_SMALL "ACR(&M)" + IDS_VIEW_LIST "ꗗ(&L)" + IDS_VIEW_DETAILS "ڍ(&D)" + IDS_SELECT "I" + IDS_OPEN "J" + IDS_CREATELINK "V[gJbg̍쐬(&L)" + IDS_COPY "Rs[(&C)" + IDS_DELETE "폜" + IDS_PROPERTIES "vpeB" + IDS_CUT "؂(&U)" + IDS_RESTORE "ɖ߂" + IDS_FORMATDRIVE "tH[}bg..." + IDS_RENAME "O̕ύX" + IDS_INSERT "}" + + IDS_CREATEFOLDER_DENIED "VtH_쐬ł܂ł: ANZX܂B" + IDS_CREATEFOLDER_CAPTION "VtH_̍쐬ɃG[܂" + IDS_DELETEITEM_CAPTION "t@C폜̊mF" + IDS_DELETEFOLDER_CAPTION "tH_폜̊mF" + IDS_DELETEITEM_TEXT "'%1' 폜Ă낵ł?" + IDS_DELETEMULTIPLE_TEXT " %1 ‚̍ڂ폜Ă낵ł?" + IDS_DELETESELECTED_TEXT "Iꂽڂ폜Ă낵ł?" + IDS_TRASHITEM_TEXT "'%1' ݔɑĂ낵ł?" + IDS_TRASHFOLDER_TEXT "'%1'ƂɊ܂܂ׂ̂ĂݔɑĂ낵ł?" + IDS_TRASHMULTIPLE_TEXT "%1 ‚̍ڂݔɑĂ낵ł?" + IDS_CANTTRASH_TEXT " '%1' ͂ݔɑ܂B ɍ폜Ă낵ł?" + IDS_OVERWRITEFILE_TEXT "̃tH_ɂ͊Ƀt@C'%1'܂܂Ă܂B\n\nuĂ낵ł?" + IDS_OVERWRITEFILE_CAPTION "t@C㏑̊mF" + IDS_OVERWRITEFOLDER_TEXT "̃tH_ɂ͊ɃtH_'%1'܂܂Ă܂B\n\n"\ + "fBNgtH_̃t@CIꂽtH_̃t@C\n"\ + "Ɠ͒u܂BłAtH_ړ܂\n"\ + "Rs[܂?" + + /* message box strings */ + IDS_RESTART_TITLE "ċN" + IDS_RESTART_PROMPT "VXeċN܂?" + IDS_SHUTDOWN_TITLE "Vbg_E" + IDS_SHUTDOWN_PROMPT "Vbg_E܂?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "X^[g j[\\vO" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "X^[g j[\\vO\\X^[gAbv" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "X^[g j[" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "fXNgbv" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "X^[g j[\\vO\\Ǘc[" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "}C lbg[N" + + IDS_NEWFOLDER "VtH_" + + IDS_DRIVE_FIXED "[J fBXN" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "lbg[N fBXN" + + IDS_OPEN_WITH "vOJ" + IDS_OPEN_WITH_CHOOSE "vȎI..." + + IDS_SHELL_ABOUT_AUTHORS "(&A)" + IDS_SHELL_ABOUT_BACK "< ߂(&B)" + FCIDM_SHVIEW_NEW "VK쐬" + FCIDM_SHVIEW_NEWFOLDER "tH_(&F)" + FCIDM_SHVIEW_NEWLINK "V[gJbg(&L)" + IDS_FOLDER_OPTIONS "tH_ IvV" + IDS_RECYCLEBIN_LOCATION "ݔ̏ꏊ" + IDS_RECYCLEBIN_DISKSPACE "pł̈" + IDS_EMPTY_BITBUCKET "ݔɂ" + IDS_PICK_ICON_TITLE "ACȒI" + IDS_PICK_ICON_FILTER "ACRt@C(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "s”\\ t@C\0*.exe\0" + IDS_DIRECTORY "tH_" + IDS_VIRTUAL_DRIVER "z foCX hCo" + IDS_BAT_FILE "ReactOS ob` t@C" + IDS_CMD_FILE "ReactOS R}h XNvg" + IDS_COM_FILE "Dos AvP[V" + IDS_CPL_FILE "Rg[ pl̍" + IDS_CUR_FILE "J[\\" + IDS_DLL_FILE "AvP[V g" + IDS_DRV_FILE "foCX hCo" + IDS_EXE_FILE "AvP[V" + IDS_FON_FILE "tHg t@C" + IDS_TTF_FILE "TrueType tHg t@C" + IDS_HLP_FILE "wv t@C" + IDS_INI_FILE "\\ݒ" + IDS_LNK_FILE "V[gJbg" + IDS_SYS_FILE "VXe t@C" + + IDS_OPEN_VERB "J" + IDS_RUNAS_VERB "ʂ̃[U[ƂĎs " + IDS_EDIT_VERB "ҏW" + IDS_FIND_VERB "" + IDS_PRINT_VERB "" + IDS_PLAY_VERB "Đ" + IDS_PREVIEW_VERB "vr[" + + IDS_FILE_FOLDER "%u ‚̃t@CA %u ‚̃tH_" + IDS_PRINTERS "v^" + IDS_FONTS "tHg" + IDS_INSTALLNEWFONT "VtHg̃CXg[..." + + IDS_DEFAULT_CLUSTER_SIZE "ftHg AP[V TCY" + IDS_COPY_OF "Rs[ `" + +END diff --git a/dll/win32/shell32_new/lang/ko-KR.rc b/dll/win32/shell32_new/lang/ko-KR.rc new file mode 100644 index 00000000000..98981f74213 --- /dev/null +++ b/dll/win32/shell32_new/lang/ko-KR.rc @@ -0,0 +1,756 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ޜ" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "(&Y)", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON " (&A)", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON " ƎϿ(&N)", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "(&C)", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "%s Ͽ" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "Ȯ", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS was brought to you by:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Size" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modified" + IDS_SHV_COLUMN5 "Attributes" + IDS_SHV_COLUMN6 "Size" + IDS_SHV_COLUMN7 "Size available" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "Cut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/nl-NL.rc b/dll/win32/shell32_new/lang/nl-NL.rc new file mode 100644 index 00000000000..1689e2a3bae --- /dev/null +++ b/dll/win32/shell32_new/lang/nl-NL.rc @@ -0,0 +1,756 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Info %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS is geschreven door:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Geef de naam van een programma, map, document, of Internet-adres op. Wine zal het vervolgens openen.", 12289, 36, 11, 182, 18 + LTEXT "&Openen:", 12305, 7, 39, 28, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Annuleren", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Bladeren...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Size" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modified" + IDS_SHV_COLUMN5 "Attributes" + IDS_SHV_COLUMN6 "Size" + IDS_SHV_COLUMN7 "Size available" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "Cut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "Er is geen Windows-programma geconfigureerd om dit soort bestanden te openen." +END diff --git a/dll/win32/shell32_new/lang/no-NO.rc b/dll/win32/shell32_new/lang/no-NO.rc new file mode 100644 index 00000000000..f02aa64fecd --- /dev/null +++ b/dll/win32/shell32_new/lang/no-NO.rc @@ -0,0 +1,759 @@ +/* + * Copyright 2005-2007 Alexander N. Srnes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Store ikoner", FCIDM_SHVIEW_BIGICON + MENUITEM "&Sm ikoner", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detaljer", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Vis" + BEGIN + MENUITEM "&Store ikoner", FCIDM_SHVIEW_BIGICON + MENUITEM "S&m ikoner", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detaljer", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Ordne &ikoner" + BEGIN + MENUITEM "Etter &navn", 0x30 /* column 0 */ + MENUITEM "Etter &type", 0x32 /* column 2 */ + MENUITEM "Etter &strrelse", 0x31 /* ... */ + MENUITEM "Etter &dato", 0x33 + MENUITEM SEPARATOR + MENUITEM "Ordne &automatisk", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Still opp ikoner", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Oppdater", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Lim inn", FCIDM_SHVIEW_INSERT + MENUITEM "Lim inn som snarvei", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Egenskaper", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Utforsk", FCIDM_SHVIEW_EXPLORE + MENUITEM "&pne", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "Klipp &ut", FCIDM_SHVIEW_CUT + MENUITEM "&Kopier", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "&Opprett snarvei", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Slett", FCIDM_SHVIEW_DELETE + MENUITEM "&Gi nytt navn", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "Egenska&per", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Bla etter mappe" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Avbryt", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Bla etter mappe" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Mappe:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Lag en ny mappe", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Avbryt", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Meldings" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Ja", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Ja til &alt", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nei", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Avbry&t", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Om %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Versjon " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Denne ReactOS versjonen er registert til:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Fysisk minne tilgjengelig:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS ble laget av:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Kjr" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Skriv inn navnet p programmet, mappen, dokumentet etter Internett-ressursen du nsker pne.", 12289, 36, 11, 182, 18 + LTEXT "&pne:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Avbryt", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Bla gjennom .", 12288, 170, 63, 54, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 240, 130 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Snarvei" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 5, 30, 30, WS_VISIBLE + LTEXT "Plasseringstype:", 14004, 10, 30, 50, 10 + LTEXT "", 14005, 70, 30, 150, 10 + LTEXT "Plasseringssted:", 14006, 10, 40, 70, 10 + LTEXT "", 14007, 70, 40, 150, 10 + LTEXT "Plassering:", 14008, 10, 55, 45, 10 + EDITTEXT 14009, 70, 55, 150, 10, ES_LEFT | ES_AUTOHSCROLL + LTEXT "&Start i:",14010, 10, 65, 57, 10 + EDITTEXT 14011, 70, 65, 150, 10, ES_LEFT | ES_AUTOHSCROLL + LTEXT "Snarvei &nkkel:", 14014, 10, 80, 57, 10 + EDITTEXT 14015, 70, 80, 150, 10, ES_LEFT + LTEXT "Kjr:", 14016, 10, 90, 57, 10 + EDITTEXT 14017, 70, 90, 150, 10, ES_AUTOHSCROLL + LTEXT "K&ommentar:", 14018, 10, 100, 57, 10 + EDITTEXT 14019, 70, 100, 150, 10, ES_LEFT | ES_AUTOHSCROLL + PUSHBUTTON "&Finn ml...", 14020, 10, 115, 63, 14, ES_LEFT + PUSHBUTTON "&Endre ikon...", 14021, 83, 115, 63, 14, ES_LEFT + PUSHBUTTON "A&vansert...", 14022, 156, 115, 63, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Avanserte egenskaper" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Velg avansert egenskaper som du vil for denne snarveien.", -1, 5, 30, 210, 10 + CHECKBOX "Kjr som administrator", 14000, 25, 50, 150, 10 + LTEXT "Med dette valget kan du kjre denne snarveien med som en administrator, mens du beskytter din datamaskin og data fra uautorisert program aktivitet.", -1, 50, 60, 175, 40 + CHECKBOX "Kjr i seperat minneplass", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", IDOK, 25, 120, 50, 15, WS_VISIBLE + PUSHBUTTON "Avbryt", IDCANCEL, 120, 120, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Generielt" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Filtype:", 14004, 8, 35, 50, 10 + LTEXT "Mappe", 14005, 68, 35, 160, 10 + LTEXT "Lokalisjon:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Strrelse:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Inneholder:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Opprettet:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Bare-lesbar", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Skjult", 14022, 126, 150, 50, 10 +END + + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Generielt" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Filtype:", 14004, 8, 35, 50, 10 + LTEXT "Fil", 14005, 68, 35, 160, 10 + LTEXT "pne med:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Lokalisjon:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Strrelse:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Opprettet:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modifisert:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "pnet:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Rettigheter:", 14020, 8, 189, 45, 10 + CHECKBOX "&Bare-lesbar", 14021, 58, 189, 67, 10 + CHECKBOX "&Skjult", 14022, 126, 189, 50, 10 + CHECKBOX "&Arkiv", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Versjon" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Filversjon: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Beskrivelse: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Enerett: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Annet versjon informasjon: ", 14006, 6, 70, 222, 115 + LTEXT "Enhetsnavn: ", 14007, 13, 82, 50, 10 + LTEXT "Verdi: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Generielt" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Filsystem:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Brukt plass:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Ledig plass:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Kapasitet:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Stasjon %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Diskoppryding", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Komprimer denne stasjonen for frigjre diskplass", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Indekser denne stasjonen for raskere sking", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Verkty" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Feilsking", -1, 5, 5, 230, 60 + LTEXT "Dette alternativet vil kontrollere volumet for \nfeil.", -1, 40, 25, 160, 20 + PUSHBUTTON "Kontroller n...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentering", -1, 5, 65, 230, 60 + LTEXT "Dette alternativet defragmenterer filene p volumet.", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragmenter n...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Sikkerhetskopi", -1, 5, 130, 230, 60 + LTEXT "Dette alternativet tar sikkerhetskopi av filene p volumet.", -1, 40, 150, 160, 20 + PUSHBUTTON "Ta sikkerhetskopi...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Maskinvare" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Kjr som" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Hvilken brukerkonto vil du bruke for kjre dette programmet?", -1, 10, 20, 220, 20 + CHECKBOX "Flgende bruker %s", 14000, 10, 45, 150, 10 + LTEXT "Beskytt min datamaskin og data fra uautorisert program aktivitet", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Dette valget kan forebygge data virus fra uskadeliggjre din datamaskin eller personlige data, men utvelging det skulle kanskje forrsake program til funksjon formatfeil.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Flgende bruker:", 14002, 10, 100, 90, 10 + LTEXT "Brukernavn:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Passord:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Avbryt", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Papirkurv egenskaper" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Innstilling for valgte sted", -1, 10, 72, 220, 70 + RADIOBUTTON "&Tilpasse strrelse:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aksimalt strrelse (MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Ikke flytt filer til &Papirkurven. Slett filene umiddelbart nr de slettes.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Vis slettet bekreftelse dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "pne med" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Velg programmet du vil bruke for pne denne filen:", -1, 44, 12, 211, 10 + LTEXT "Fil: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Program", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Alltid bruk valgte program for pne denne filtypen", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Utforsk...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Avbryt", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Generielt" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Oppgaver", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Vis felles oppgaver i &mapper", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Bruk ReactOS klass&isk mapper", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Utforsk mapper", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "pne hver mapper i sa&mme vindu", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "pne hver mapper i sitt egen &vindu", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Klikk enheter som flgende", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Enkelt-klikk for pne en enhet (peker for velge)", 14007, 40, 120, 190, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Understrek ikon titteler konsekvent med min &utforsker", 14008, 50, 132, 190, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Understrek ikon titteler bare mens jeg &peker p dem", 14009, 50, 144, 190, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Dobbelt klikk for pne enheten (Enkelt-klikk for velge)", 14010, 40, 156, 194, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Bruk standard", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Vis" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Mappe visning", -1, 7, 10, 249, 60 +//ICON +LTEXT "Du kan bruke visning (slik som detalj eller Tiles) som\ndu bruker for denne mappen til alle mappene.", -1, 60, 20, 180, 20 +PUSHBUTTON "Bruk til a&lle mappene", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Gjenopprett alle mapper", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Avanserte innstillinger:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Gjenopprett &standard", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Filtyper" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registerert fil&typer:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Ny", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Slett", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Detailjer for '%s' utvidelser", 14003, 7, 130, 249, 70 +LTEXT "pne med:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Endre...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Filer med utvidelser '%s' er av typen '%s'. For \nendre innstillingene som er av filen '%s', trykk p\navansert.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Av&ansert", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Bekrefte fil erstattning" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Ja", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Ja for &Alt", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Nei", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Avbryt", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Denne mappen inneholder allerede en fil som heter '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Denne mappen inneholder allerede en bare-lesbar fil som heter '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Denne mappen inneholder allerede en systemfil som heter '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Vil du overskrive eksisterende fil", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(ukjent dato og strrelse)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "med denne ene?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(ukjent dato og strrelse)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Logg av ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Er du sikker p at du vil logge av?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Logg av", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Avbryt", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Koble fra ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Er du sikker p du vil koble fra?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Koble fra", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Avbryt", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autostart" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Velg en innhold type, ogs velg en handling for ReactOS for gjennomfre automatisk nr denne type er brukt til denne enheten:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Handlinger", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Velg en handling for &utfre:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Velg denne handlingen hver gang jeg &utfrer denne handlingen", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Gjenopprett standard", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mikset innhold" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Denne disken eller enheten inneholder mere enn en type med innhold.", 1001, 32, 7, 191, 20 + LTEXT "Hva vil du at ReactOS skal gjre?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Avbryt", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mikset innhold" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS kan gjre den samme handlingen hver gang du setter inn en disk eller kobler til en enhet med denne filtypen:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Hva vil du at ReactOS skal gjre?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Gjr alltid den valgte handlingen.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Avbryt", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autostart" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS kan gjre den samme handlingen hver gang du kobler til en enhet.", 1001, 32, 7, 190, 22 + LTEXT "&Hva vil du at ReactOS skal gjre?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Alltid utfr den valgte handlingen", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Avbryt", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Sl av ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Hva vil du at datamaskinen skal gjre?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Behandle din sesjon, din datamaskin bruker lite strm nr data er i minnet. Datamaskinen vil vkne hvis du trykker p en tast eller beveger p musen.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Avbryt", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Hjelp", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Lukk", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ka&pasitet:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Filsystem", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Strrelse p tildelingsenheten", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volum&navn", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Formatterings &valg", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Rask formattering", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Utfr komprimering", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Kontroller disken" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Alternativer for diskkontroll", -1, 7, 6, 179, 50 + PUSHBUTTON "Avbryt", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Reparer feil i filsysten automatisk", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Sk etter og forsk reparere skadet sektorer", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Endre ikon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filnavn:", -1, 7, 14, 208, 10 + PUSHBUTTON "Utforsk...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Avbryt",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Fil" + IDS_SHV_COLUMN2 "Strrelse" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Endret" + IDS_SHV_COLUMN5 "Egenskaper" + IDS_SHV_COLUMN6 "Strrelse" + IDS_SHV_COLUMN7 "Ledig plass" + IDS_SHV_COLUMN8 "Navn" + IDS_SHV_COLUMN9 "Kommentarer" + IDS_SHV_COLUMN10 "Eier" + IDS_SHV_COLUMN11 "Gruppe" + IDS_SHV_COLUMN12 "Filnavn" + IDS_SHV_COLUMN13 "Kategori" + IDS_SHV_COLUMN_DELFROM "Opprinnelig plassering" + IDS_SHV_COLUMN_DELDATE "Dato slettet" + IDS_SHV_COLUMN_FONTTYPE "Skrifttype" + IDS_SHV_COLUMN_WORKGROUP "Arbeidsgruppe" + IDS_SHV_NETWORKLOCATION "Nettverksplassering" + IDS_SHV_COLUMN_DOCUMENTS "Dokumenter" + + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Kommentarer" + IDS_SHV_COLUMN_LOCATION "Plassering" + IDS_SHV_COLUMN_MODEL "Modell" + + /* special folders */ + IDS_DESKTOP "Skrivebord" + IDS_MYCOMPUTER "Min datamaskin" + IDS_RECYCLEBIN_FOLDER_NAME "Papirkurv" + IDS_CONTROLPANEL "Kontrollpanel" + IDS_ADMINISTRATIVETOOLS "Administrative verkty" + + /* context menus */ + IDS_VIEW_LARGE "&Store ikoner" + IDS_VIEW_SMALL "S&m ikoner" + IDS_VIEW_LIST "&Liste" + IDS_VIEW_DETAILS "&Detaljer" + IDS_SELECT "Velg" + IDS_OPEN "pne" + IDS_CREATELINK "&Opprett snarvei" + IDS_COPY "Kopier" + IDS_DELETE "Slett" + IDS_PROPERTIES "Egenskaper" + IDS_CUT "Klipp ut" + IDS_RESTORE "Gjenopprett" + IDS_FORMATDRIVE "Formatering..." + IDS_RENAME "Endre navn" + IDS_INSERT "Sett inn" + + IDS_CREATEFOLDER_DENIED "Kunne ikke opprette ny mappe: tilgang nektet." + IDS_CREATEFOLDER_CAPTION "Klarte ikke opprette ny mappe" + IDS_DELETEITEM_CAPTION "Bekreft filsletting" + IDS_DELETEFOLDER_CAPTION "Bekreft sletting av mappe" + IDS_DELETEITEM_TEXT "Virkelig slette %1?" + IDS_DELETEMULTIPLE_TEXT "Virkelig slette disse %1 elementene?" + IDS_DELETESELECTED_TEXT "Virkelig slette valgte element(er)??" + IDS_TRASHITEM_TEXT "Virkelig legge %1 i papirkurven?" + IDS_TRASHFOLDER_TEXT "Virkelig legge %1 og alt innholdet i papirkurven?" + IDS_TRASHMULTIPLE_TEXT "Virkelig legge disse %1 valgte elementene i papirkurven?" + IDS_CANTTRASH_TEXT "Elementet %1 kan ikke legges i papirkurven. Vil du slette det i stedet?" + IDS_OVERWRITEFILE_TEXT "Denne mapppen innholder allerede en fil som heter '%1'.\n\nVil du overskrive denne?" + IDS_OVERWRITEFILE_CAPTION "Bekreft overskriving av fil" + IDS_OVERWRITEFOLDER_TEXT "Denne mappen inneholder allerede en mappe som heter '%1'.\n\n"\ + "Hvis filene i destinasjon mappen har samme navn filer i \n"\ + "valgte mapper her vil bli overskrevet. nsker du fortsatt flytte eller kopiere \n"\ + "denne mappen?" + + /* message box strings */ + IDS_RESTART_TITLE "Starte p nytt" + IDS_RESTART_PROMPT "Vil du starte datamaskinen p nytt?" + IDS_SHUTDOWN_TITLE "Avslutt" + IDS_SHUTDOWN_PROMPT "Vil du sl av datamaskinen?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start-meny\\Programmer" + IDS_PERSONAL "Mine dokumenter" + IDS_FAVORITES "Favoritter" + IDS_STARTUP "Start-meny\\Programmer\\Oppstart" + IDS_RECENT "Siste" + IDS_SENDTO "Sendtil" + IDS_STARTMENU "Start-meny" + IDS_MYMUSIC "Min musikk" + IDS_MYVIDEO "Mine videoklipp" + IDS_DESKTOPDIRECTORY "Skrivebord" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Maler" + IDS_APPDATA "Programdata" + IDS_PRINTHOOD "Skrivere" + IDS_LOCAL_APPDATA "Lokale innstillinger\\Programdata" + IDS_INTERNET_CACHE "Lokale innstillinger\\Midligtidig internett filer" + IDS_COOKIES "Informasjonskapsel" + IDS_HISTORY "Lokale innstillinger\\Logg" + IDS_PROGRAM_FILES "Programfiler" + IDS_MYPICTURES "Mine bilder" + IDS_PROGRAM_FILES_COMMON "Programfiler\\Fellesfiler" + IDS_COMMON_DOCUMENTS "Dokumenter" + IDS_ADMINTOOLS "Start-meny\\Programmer\\Administrative verkty" + IDS_COMMON_MUSIC "Dokumenter\\Min musikk" + IDS_COMMON_PICTURES "Dokumenter\\Mine bilder" + IDS_COMMON_VIDEO "Dokumenter\\Mine videoklipp" + IDS_CDBURN_AREA "Lokale innstillinger\\Programdata\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Mine nettverkssteder" + + IDS_NEWFOLDER "Ny mappe" + + IDS_DRIVE_FIXED "Lokal Disk" + IDS_DRIVE_CDROM "CD stasjon" + IDS_DRIVE_NETWORK "Nettverk disk" + + IDS_OPEN_WITH "pne med" + IDS_OPEN_WITH_CHOOSE "Velg program..." + + IDS_SHELL_ABOUT_AUTHORS "&Forfatter" + IDS_SHELL_ABOUT_BACK "< &Tilbake" + FCIDM_SHVIEW_NEW "Ny" + FCIDM_SHVIEW_NEWFOLDER "Ny &mappe" + FCIDM_SHVIEW_NEWLINK "Ny &snarvei" + IDS_FOLDER_OPTIONS "Mappe valg" + IDS_RECYCLEBIN_LOCATION "Papirkurv plassering" + IDS_RECYCLEBIN_DISKSPACE "Ledig plass" + IDS_EMPTY_BITBUCKET "Tm papirkurven" + IDS_PICK_ICON_TITLE "Velg Ikon" + IDS_PICK_ICON_FILTER "Ikon Fil(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Kjrbare filer\0*.exe\0" + IDS_DIRECTORY "Mappe" + IDS_VIRTUAL_DRIVER "Virtuell enhetdriver" + IDS_BAT_FILE "ReactOS Batch fil" + IDS_CMD_FILE "ReactOS Kommando skript" + IDS_COM_FILE "Dos applikasjon" + IDS_CPL_FILE "Kontrollpanel enhet" + IDS_CUR_FILE "Markr" + IDS_DLL_FILE "Applikasjon utvidelse" + IDS_DRV_FILE "Enhet driver" + IDS_EXE_FILE "Applikasjon" + IDS_FON_FILE "Skrift fil" + IDS_TTF_FILE "TrueType skrift fil" + IDS_HLP_FILE "Hjelp fil" + IDS_INI_FILE "Konfigurasjon innstilling" + IDS_LNK_FILE "Snarvei" + IDS_SYS_FILE "Systemfil" + + IDS_OPEN_VERB "pne" + IDS_RUNAS_VERB "Kjr som" + IDS_EDIT_VERB "Rediger" + IDS_FIND_VERB "Finn" + IDS_PRINT_VERB "Skriv ut" + IDS_PLAY_VERB "Spill" + IDS_PREVIEW_VERB "Forhndsvis" + + IDS_FILE_FOLDER "%u filer, %u mapper" + IDS_PRINTERS "Skrivere" + IDS_FONTS "Skrifttyper" + IDS_INSTALLNEWFONT "Installere nye skrifttyper..." + + IDS_DEFAULT_CLUSTER_SIZE "Standard tildelingsstrrelse" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "Intet Windows-program er satt opp til pne denne filtypen." +END diff --git a/dll/win32/shell32_new/lang/pl-PL.rc b/dll/win32/shell32_new/lang/pl-PL.rc new file mode 100644 index 00000000000..c9a4d40a48b --- /dev/null +++ b/dll/win32/shell32_new/lang/pl-PL.rc @@ -0,0 +1,763 @@ +/* + * Copyright 1998 Juergen Schmied + * Copyright 2004 Piotr Caban + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * ReactOS shell32 fork translation updated by Caemyr - + * - Olaf Siejka (Jan,Mar,Apr,Jul, Aug 2008; Apr, 2010) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + */ + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Due Ikony", FCIDM_SHVIEW_BIGICON + MENUITEM "&Mae Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Szczegy", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Widok" + BEGIN + MENUITEM "&Due Ikony", FCIDM_SHVIEW_BIGICON + MENUITEM "&Mae Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Szczegy", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Rozmie &ikony wedug" + BEGIN + MENUITEM "&Nazwy", 0x30 /* column 0 */ + MENUITEM "&Typu", 0x32 /* column 2 */ + MENUITEM "&Wielkoci", 0x31 /* ... */ + MENUITEM "&Daty", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Autorozmieszczanie", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "&Wyrwnaj ikony", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "&Odwie", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "W&klej", FCIDM_SHVIEW_INSERT + MENUITEM "Wklej s&krt", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Waciwoci", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Eksploruj", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Otwrz", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Wytnij", FCIDM_SHVIEW_CUT + MENUITEM "&Kopiuj", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Utwrz &Skrt", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Usu", FCIDM_SHVIEW_DELETE + MENUITEM "&Zmie nazw", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "W&aciwoci", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Wybierz folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Anuluj", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Wybierz katalog" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Katalog:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Utwrz katalog", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Anuluj", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Komunikat" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Tak", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Tak na &wszystkie", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nie", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Anuluj", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "O %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Wersja " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Ta kopia ReactOS jest zarejestrowna na:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Zainstalowana pami fizyczna:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS powsta dziki:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Wpisz nazw programu, katalogu, dokumentu, a ReactOS otworzy go dla ciebie.", 12289, 36, 11, 182, 18 + LTEXT "&Otwrz:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Anuluj", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Przegldaj...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Skrt" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Typ docelowy:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Lokalizacja:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Element docelowy:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Uruchom w:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Skrt &klawiszowy:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Uruchom:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "K&omentarz:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Znajd element docelowy", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "Zmie &ikon", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "Z&aawansowane", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Waciwoci zaawansowane" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Wybierz waciwoci zaawansowane dla tego skrtu.", -1, 5, 30, 210, 10 + CHECKBOX "Uruchom z innym Uytkownikiem", 14000, 25, 50, 150, 10 + LTEXT "Ta opcja pozwoli ci na uruchomienie skrtu jako inny uytkownik, do ochrony twoich danych przed niepowoanym dostpem.", -1, 50, 60, 175, 40 + CHECKBOX "Uruchom w osobnym przedziale pamici", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Przerwij", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Oglne" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Rozszerzenie:", 14004, 8, 35, 50, 10 + LTEXT "Katalog", 14005, 68, 35, 160, 10 + LTEXT "Lokalizacja:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Rozmiar:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Zawiera:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Utworzony:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Tylko-do-odczytu", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Ukryty", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Oglne" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Typ pliku:", 14004, 8, 35, 50, 10 + LTEXT "Plik", 14005, 68, 35, 160, 10 + LTEXT "Otwierany za pomoc:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Lokalizacja:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Rozmiar:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Utworzony:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Zmodyfikowany:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Ostatnio uyty:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Atrybuty:", 14020, 8, 189, 45, 10 + CHECKBOX "&Tylko do odczytu", 14021, 58, 189, 67, 10 + CHECKBOX "&Ukryty", 14022, 126, 189, 50, 10 + CHECKBOX "&Archiwum", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Wersja" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Wersja pliku: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Opis: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Prawa autorskie: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Pozostae informacje o wersji: ", 14006, 6, 70, 222, 115 + LTEXT "Nazwa: ", 14007, 13, 82, 50, 10 + LTEXT "Warto: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Oglne" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Typ:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "System plikw:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Zajte miejsce:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Wolne miejsce:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Pojemno:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Napd %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Czyszczenie dysku", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Kompresja danych na dysku", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Zezwl Usudze Indeksowania na zaindeksowanie tego dysku (szybkie przeszukiwanie plikw)", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Narzdzia" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Sprawdzanie bdw", -1, 5, 5, 230, 60 + LTEXT "Ta opcja sprawdzi wolumin w poszukiwaniu bdw.", -1, 40, 25, 160, 20 + PUSHBUTTON "Sprawd", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentacja", -1, 5, 65, 230, 60 + LTEXT "Ta opcja zdefragmentuje pliki na woluminie", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragmentuj", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Kopia zapasowa", -1, 5, 130, 230, 60 + LTEXT "Ta opcja wykona kopi zapasow plikw na woluminie.", -1, 40, 150, 160, 20 + PUSHBUTTON "Stwrz kopi", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Sprzt" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Uruchom jako" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Ktre konto uytkownika chcesz uy do uruchomienia tego programu?", -1, 10, 20, 220, 20 + CHECKBOX "Biecy uytkownik %s", 14000, 10, 45, 150, 10 + LTEXT "Zabezpiecz mj komputer i dane przed nieautoryzowanym dziaaniem programw", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Ta opcja moe zabezpieczy twj komputer lub dane na nim przed szkodliwymi programami, ale uycie jej moe spowodowa nieprawidowe dziaanie programw.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Nastpujcy uytkownik:", 14002, 10, 100, 90, 10 + LTEXT "Nazwa uytkownika:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Haso:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Anuluj", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Waciwoci Kosza" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Ustawienia wybranej lokalizacji", -1, 10, 72, 220, 70 + RADIOBUTTON "&Wasny rozmiar:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "&Maksymalny rozmiar(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Nie przeno plikw do &Kosza, tylko od razu usuwaj.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Wywietl dialog z potwierdzeniem usuwania", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Otwrz za pomoc" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Wybierz program, ktrego chcesz uy do otwarcia tego pliku:", -1, 44, 12, 211, 10 + LTEXT "Plik: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programy", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Zawsze uywaj danego programu do otwierania tego typu plikw", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Przegldaj", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Anuluj", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Oglne" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Zadania", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Poka podstawowe zadania w &katalogach", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Uyj klasycznych katalogw &ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Przegldaj katalogi", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Otwrz kady katalog w tym &samym oknie", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Otwrz kady katalog w &osobnym oknie", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Dziaanie przyciskw myszki", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Pojedyncze kliknicie by otworzy cel (najechanie by wskaza)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Podkre&laj tytuy ikon tak jak w przegldarce", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Podkrelaj &tytuy ikon tylko po najechaniu na nie kursorem", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Po&dwjne kliknicie by otworzy (pojedyncze kliknicie by wskaza)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Ustawienia domylne", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Podgld" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Podgld folderw", -1, 7, 10, 249, 60 +//ICON +LTEXT "Moesz uy podgldw (takich jak Detale lub Tytuy) ktre\ns ustawione dla tego katalogu, dla pozostaych.", -1, 60, 20, 180, 20 +PUSHBUTTON "Zastosuj do w&szystkich Katalogw", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "Z&resetuj ustawienia", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Zaawansowane:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Odtwrz &domylne", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Typy plikw" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Zarejestruj &typy plikw:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Nowy", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Skasuj", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Szczegy dla rozszerzenia '%s'", 14003, 7, 130, 249, 70 +LTEXT "Otwiera z:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Nazwa Aplikacji", 14005, 100, 140, 40, 10 +PUSHBUTTON "Z&mie", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Pliki z rozszerzeniem '%s' nale do typu: '%s'. Aby\nzmieni ustawienia dotyczce wszystkich plikw '%s', wybierz\nZaawansowane.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Zaawa&nsowane", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Potwierd zastpienie pliku" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Tak", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Tak na &Wszystkie", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Nie", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Anuluj", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Ten katalog ju zawiera plik o nazwie '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Ten katalog ju zawiera plik tylko do odczytu, o nazwie '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Ten katalog ju zawiera plik systemowy o nazwie '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Czy chciaby zastpi istniejcy plik?", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(data i rozmiar nieznane)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "nowym plikiem?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(data i rozmiar nieznane)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Wyloguj si z ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Czy na pewno chcesz si wylogowa?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Wyloguj", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Anuluj", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Rozczenie z ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Czy na pewno chcesz si rozczy?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Rozcz", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Anuluj", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoodtwarzanie" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Wybierz rodzaj danych, a nastpnie czynno, ktr ReactOS ma wykona automagicznie, gdy ten rodzaj danych pojawia si w urzdzeniu:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Akcje", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Wybierz akcj do &wykonania:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Zapytaj mnie kadorazowo o w&ybr akcji", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Odtwrz Domylne", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Dane mieszane" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Ten dysk albo urzdzenie zawiera dane wicej ni jednego rodzaju.", 1001, 32, 7, 191, 20 + LTEXT "Co chcesz by ReactOS zrobi?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Anuluj", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Dane mieszane" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS moe wykona t sam czynno za kadym razem kiedy odczytujesz dysk albo podczasz urzdzenie z tymi rodzajami plikw:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Co chcesz by ReactOS zrobi?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Zawsze wykonuj wybran czynno.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoodtwarzanie" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS moe wykona t sam czynno za kadym razem kiedy podczasz to urzdzenie.", 1001, 32, 7, 190, 22 + LTEXT "&Co chcesz by ReactOS zrobi?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Zawsze wykonuj wybran czynno", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Anuluj", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Zamknij ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Co chcesz by komputer zrobi?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Zachowuje sesje, utrzymujc komputer w ruchu na maym stopniu zasilania, z danymi wci w pamici. Komputer wrci do normalnego trybu pracy przy poruszeniu myszki albo naciniciu klawisza.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Anuluj", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Pomoc", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formatowanie" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Rozpocznij", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Zamknij", IDCANCEL, 118, 198, 60, 14 + LTEXT "&Pojemno:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&System plikw", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "R&ozmiar jednostki alokacji", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Etykieta woluminu", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "&Opcje", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "Szy&bkie formatowanie", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Wcz kompresj", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Sprawdzanie dyskw" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Opcje sprawdzania dyskw", -1, 7, 6, 179, 50 + PUSHBUTTON "Anuluj", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatycznie naprawiaj bdy systemu plikw", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Szukaj i prbuj odzyska uszkodzone sektory", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Zmiana Ikony" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Plik:", -1, 7, 14, 208, 10 + PUSHBUTTON "Przegldaj...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Ikony:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Anuluj",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Plik" + IDS_SHV_COLUMN2 "Wielko" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Modyfikacja" + IDS_SHV_COLUMN5 "Atrybuty" + IDS_SHV_COLUMN6 "Wielko" + IDS_SHV_COLUMN7 "Dostpna wielko" + IDS_SHV_COLUMN8 "Nazwa" + IDS_SHV_COLUMN9 "Komentarz" + IDS_SHV_COLUMN10 "Waciciel" + IDS_SHV_COLUMN11 "Grupa" + IDS_SHV_COLUMN12 "Nazwa pliku" + IDS_SHV_COLUMN13 "Kategoria" + IDS_SHV_COLUMN_DELFROM "Lokalizacja oryginalna" + IDS_SHV_COLUMN_DELDATE "Data usunicia" + IDS_SHV_COLUMN_FONTTYPE "Czcionka" + IDS_SHV_COLUMN_WORKGROUP "Grupa Robocza" + IDS_SHV_NETWORKLOCATION "Lokalizacja Sieciowa" + IDS_SHV_COLUMN_DOCUMENTS "Dokumenty" + IDS_SHV_COLUMN_STATUS "Stan" + IDS_SHV_COLUMN_COMMENTS "Komentarze" + IDS_SHV_COLUMN_LOCATION "Lokalizacja" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Pulpit" + IDS_MYCOMPUTER "Mj komputer" + IDS_RECYCLEBIN_FOLDER_NAME "Kosz" + IDS_CONTROLPANEL "Panel Sterowania" + IDS_ADMINISTRATIVETOOLS "Narzdzia Administracyjne" + + /* context menus */ + IDS_VIEW_LARGE "&Due Ikony" + IDS_VIEW_SMALL "&Mae Ikony" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Szczegy" + IDS_SELECT "Zaznacz" + IDS_OPEN "Otwrz" + IDS_CREATELINK "Utwrz &Skrt" + IDS_COPY "Kopiuj" + IDS_DELETE "Usu" + IDS_PROPERTIES "Waciwoci" + IDS_CUT "Wytnij" + IDS_RESTORE "Przywr" + IDS_FORMATDRIVE "Formatuj..." + IDS_RENAME "Zmie nazw" + IDS_INSERT "W" + + IDS_CREATEFOLDER_DENIED "Nie mog utworzy nowego katalogu: Brak dostpu." + IDS_CREATEFOLDER_CAPTION "Bd przy tworzeniu nowego katalogu." + IDS_DELETEITEM_CAPTION "Potwierd usunicia pliku" + IDS_DELETEFOLDER_CAPTION "Potwierd usunicie katalogu" + IDS_DELETEITEM_TEXT "Czy jeste pewien, e chcesz usun '%1'?" + IDS_DELETEMULTIPLE_TEXT "Czy jeste pewien, e chcesz usun te %1 pliki?" + IDS_DELETESELECTED_TEXT "Czy jeste pewien, e chcesz usun wybrane elementy?" + IDS_TRASHITEM_TEXT "Czy jeste pewien, e chcesz umieci plik '%1' w Koszu?" + IDS_TRASHFOLDER_TEXT "Czy jeste pewien, e chcesz umieci folder '%1' i ca jego zawarto w koszu" + IDS_TRASHMULTIPLE_TEXT "Elementw: %1 - czy na pewno chcesz je umieci w Koszu?" + IDS_CANTTRASH_TEXT "Nie mog przenie elementu '%1' do Kosza. Czy chcesz go zamiast tego usun?" + IDS_OVERWRITEFILE_TEXT "Ten folder ju zawiera plik o nazwie '%1'.\n\nCzy chcesz go zastpi?" + IDS_OVERWRITEFILE_CAPTION "Potwierd zastpienie pliku" + IDS_OVERWRITEFOLDER_TEXT "Ten folder ju zawiera folder o nazwie '%1'.\n\n"\ + "Jeeli w docelowym folderze wystpi pliki o takich samych nazwach jak\n"\ + "w wybranym folderze, to zostan one zastpione. Czy chcesz mimo to przenie\n"\ + "lub skopiowa folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Uruchom ponownie" + IDS_RESTART_PROMPT "Czy chcesz zrestartowa system?" + IDS_SHUTDOWN_TITLE "Wycz" + IDS_SHUTDOWN_PROMPT "Czy chcesz wyczy system?" + IDS_LOGOFF_TITLE "Wyloguj" + IDS_LOGOFF_PROMPT "Czy chcesz si wylogowa z systemu?" + + /* shell folder path default values */ + IDS_PROGRAMS "Menu Start\\Programy" + IDS_PERSONAL "Moje dokumenty" + IDS_FAVORITES "Ulubione" + IDS_STARTUP "Menu Start\\Programy\\AutoStart" + IDS_RECENT "Ostatnie" + IDS_SENDTO "Wylij do" + IDS_STARTMENU "Menu" + IDS_MYMUSIC "Moja muzyka" + IDS_MYVIDEO "Moje wideo" + IDS_DESKTOPDIRECTORY "Pulpit" + IDS_NETHOOD "Sieci" + IDS_TEMPLATES "Szablony" + IDS_APPDATA "Dane aplikacji" + IDS_PRINTHOOD "Drukarki" + IDS_LOCAL_APPDATA "Ustawienia lokalne\\Dane aplikacji" + IDS_INTERNET_CACHE "Ustawienia lokalne\\Temporary Internet Files" + IDS_COOKIES "Ciasteczka" + IDS_HISTORY "Ustawienia Lokalne\\Historia" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Moje obrazy" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Dokumenty" + IDS_ADMINTOOLS "Menu Start\\Programy\\Narzdzia administracyjne" + IDS_COMMON_MUSIC "Dokumenty\\Moja muzyka" + IDS_COMMON_PICTURES "Dokumenty\\Moje obrazy" + IDS_COMMON_VIDEO "Dokumenty\\Moje wideo" + IDS_CDBURN_AREA "Ustawienia lokalne\\Dane aplikacji\\Microsoft\\Nagrywanie dyskw CD" + IDS_NETWORKPLACE "Moja sie" + + IDS_NEWFOLDER "Nowy katalog" + + IDS_DRIVE_FIXED "Dysk lokalny" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Dysk sieciowy" + + IDS_OPEN_WITH "Otwrz z" + IDS_OPEN_WITH_CHOOSE "Wybierz program..." + + IDS_SHELL_ABOUT_AUTHORS "&Autorzy" + IDS_SHELL_ABOUT_BACK "< &Wstecz" + FCIDM_SHVIEW_NEW "&Nowy" + FCIDM_SHVIEW_NEWFOLDER "&Folder" + FCIDM_SHVIEW_NEWLINK "&Skrt" + IDS_FOLDER_OPTIONS "Opcje katalogw" + IDS_RECYCLEBIN_LOCATION "Lokalizacja kosza" + IDS_RECYCLEBIN_DISKSPACE "Pozostao wolnego miejsca" + IDS_EMPTY_BITBUCKET "Oprnij Kosz" + IDS_PICK_ICON_TITLE "Wybierz ikon" + IDS_PICK_ICON_FILTER "Pliki ikon(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Programy\0*.exe\0" + IDS_DIRECTORY "Katalog" + IDS_VIRTUAL_DRIVER "Sterownik urzdzenia wirtualnego" + IDS_BAT_FILE "Plik wsadowy ReactOS" + IDS_CMD_FILE "Skrypt konsoli ReactOS" + IDS_COM_FILE "Aplikacja DOS" + IDS_CPL_FILE "Element Panelu sterowania" + IDS_CUR_FILE "Kursor" + IDS_DLL_FILE "Rozszerzenie aplikacji" + IDS_DRV_FILE "Sterownik urzdzenia" + IDS_EXE_FILE "Program" + IDS_FON_FILE "Plik czcionki" + IDS_TTF_FILE "Plik czcionki TrueType" + IDS_HLP_FILE "Plik pomocy" + IDS_INI_FILE "Ustawienia konfiguracji" + IDS_LNK_FILE "Skrt" + IDS_SYS_FILE "Plik systemowy" + + IDS_OPEN_VERB "Otwrz" + IDS_RUNAS_VERB "Uruchom jako " + IDS_EDIT_VERB "Edytuj" + IDS_FIND_VERB "Wyszukaj" + IDS_PRINT_VERB "Drukuj" + IDS_PLAY_VERB "Odtwrz" + IDS_PREVIEW_VERB "Podgld" + + IDS_FILE_FOLDER "%u Plikw, %u Katalogw" + IDS_PRINTERS "Drukarki" + IDS_FONTS "Czcionki" + IDS_INSTALLNEWFONT "Zainstaluj Now Czcionk..." + + IDS_DEFAULT_CLUSTER_SIZE "Domylny rozmiar jednostki alokacji" + IDS_COPY_OF "Kopia" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/pt-BR.rc b/dll/win32/shell32_new/lang/pt-BR.rc new file mode 100644 index 00000000000..7679014ff37 --- /dev/null +++ b/dll/win32/shell32_new/lang/pt-BR.rc @@ -0,0 +1,758 @@ +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003 Marcelo Duarte + * Copyright 2006-2007 Amrico Jos Melo + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "cones &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "cones &pequenos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Exibir" + BEGIN + MENUITEM "cones &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "cones &pequenos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "O&rganizar cones" + BEGIN + MENUITEM "Por &nome", 0x30 /* column 0 */ + MENUITEM "Por &tipo", 0x32 /* column 2 */ + MENUITEM "Por ta&manho", 0x31 /* ... */ + MENUITEM "Por &data", 0x33 + MENUITEM SEPARATOR + MENUITEM "Auto organi&zar", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Alin&har cones", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "&Atualizar", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Co&lar", FCIDM_SHVIEW_INSERT + MENUITEM "Colar a&talho", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Propriedades", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Explorar", FCIDM_SHVIEW_EXPLORE + MENUITEM "A&brir", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ortar", FCIDM_SHVIEW_CUT + MENUITEM "&Copiar", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Criar a&talho", FCIDM_SHVIEW_CREATELINK + MENUITEM "E&xcluir", FCIDM_SHVIEW_DELETE + MENUITEM "&Renomear", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Propriedades", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Procurar pasta" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancelar", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Sobre %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS foi disponibilizado por:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Digite o nome do programa, pasta, documento, ou endereo Internet, que o Wine ir abr-lo para voc.", 12289, 36, 11, 182, 18 + LTEXT "&Abrir:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Procurar...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Arquivo" + IDS_SHV_COLUMN2 "Tamanho" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificado" + IDS_SHV_COLUMN5 "Atributos" + IDS_SHV_COLUMN6 "Tamanho" + IDS_SHV_COLUMN7 "Disponvel" + IDS_SHV_COLUMN8 "Nome" + IDS_SHV_COLUMN9 "Comentrios" + IDS_SHV_COLUMN10 "Dono" + IDS_SHV_COLUMN11 "Grupo" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "rea de trabalho" + IDS_MYCOMPUTER "Meu computador" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "cones &grandes" + IDS_VIEW_SMALL "cones &pequenos" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Detalhes" + IDS_SELECT "Selecionar" + IDS_OPEN "Abrir" + IDS_CREATELINK "Criar a&talho" + IDS_COPY "&Copiar" + IDS_DELETE "E&xcluir" + IDS_PROPERTIES "Propriedades" + IDS_CUT "C&ortar" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "No pode criar nova pasta: Permisso negada." + IDS_CREATEFOLDER_CAPTION "Erro durante a criao da nova pasta" + IDS_DELETEITEM_CAPTION "Confirmar excluso de arquivo" + IDS_DELETEFOLDER_CAPTION "Confirmar excluso de pasta" + IDS_DELETEITEM_TEXT "Voc tem certeza que deseja excluir '%1'?" + IDS_DELETEMULTIPLE_TEXT "Voc tem certeza que deseja excluir estes %1 itens?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescrever arquivo" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Reiniciar" + IDS_RESTART_PROMPT "Voc quer simular a reinicializao do Windows?" + IDS_SHUTDOWN_TITLE "Desligar" + IDS_SHUTDOWN_PROMPT "Voc quer finalizar a sesso no Wine?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Menu Iniciar\\Programas" + IDS_PERSONAL "Meus Documentos" + IDS_FAVORITES "Favoritos" + IDS_STARTUP "Menu Iniciar\\Programas\\Iniciar" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Menu Iniciar" + IDS_MYMUSIC "Minhas Msicas" + IDS_MYVIDEO "Meus Vdeos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Configuraes locais\\Dados de aplicativos" + IDS_INTERNET_CACHE "Configuraes locais\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Configuraes locais\\Histrico" + IDS_PROGRAM_FILES "Arquivos de programas" + IDS_MYPICTURES "Minhas Imagens" + IDS_PROGRAM_FILES_COMMON "Arquivos de programas\\Arquivos comuns" + IDS_COMMON_DOCUMENTS "Documentos" + IDS_ADMINTOOLS "Menu Iniciar\\Programas\\Ferramentas Administrativas" + IDS_COMMON_MUSIC "Documentos\\Minhas Msicas" + IDS_COMMON_PICTURES "Documentos\\Minhas Imagens" + IDS_COMMON_VIDEO "Documentos\\Meus Vdeos" + IDS_CDBURN_AREA "Configuraes locais\\Dados de aplicativos\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Choose Program..." + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "Novo" + FCIDM_SHVIEW_NEWFOLDER "&Pasta" + FCIDM_SHVIEW_NEWLINK "&Atalho" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "Nici un program Windows nu este configurat sa deschida fi?iere de acest tip." +END diff --git a/dll/win32/shell32_new/lang/pt-PT.rc b/dll/win32/shell32_new/lang/pt-PT.rc new file mode 100644 index 00000000000..2d99ca47e97 --- /dev/null +++ b/dll/win32/shell32_new/lang/pt-PT.rc @@ -0,0 +1,759 @@ +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003 Marcelo Duarte + * Copyright 2006-2007 Amrico Jos Melo + * Copyright 2010 Manuel D V Silva + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "cones &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "cones &pequenos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Mostrar" + BEGIN + MENUITEM "cones &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "cones &pequenos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "O&rganizar cones" + BEGIN + MENUITEM "Por &nome", 0x30 /* column 0 */ + MENUITEM "Por &tipo", 0x32 /* column 2 */ + MENUITEM "Por ta&manho", 0x31 /* ... */ + MENUITEM "Por &data", 0x33 + MENUITEM SEPARATOR + MENUITEM "Auto organi&zar", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Alin&har cones", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "&Actualizar", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Co&lar", FCIDM_SHVIEW_INSERT + MENUITEM "Colar a&talho", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Propriedades", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplorador", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Abrir", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ortar", FCIDM_SHVIEW_CUT + MENUITEM "&Copiar", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Criar &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Apagar", FCIDM_SHVIEW_DELETE + MENUITEM "&Renomear", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Propriadades", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Procurar Pastas" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancelar", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Procurar Pastas" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Pasta:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Criar Nova Pasta", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Mensagem" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Sim", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Sim para &todos", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancelar", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Acerca do %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Verso " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Esta verso do ReactOS registado a:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Memria fsica instalada:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS disponibilizado por:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Digite o nome do programa, pasta, documento, ou endereo Internet, que o ReactOS ir abr-lo.", 12289, 36, 11, 182, 18 + LTEXT "&Abrir:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Procurar...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Atalho" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Tipo de destino:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Localizao do destino:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Destino:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Iniciar em:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "&Tecla de Atalho:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Executar:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omemntrio:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Localizar Destino...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Trocar Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&vanado...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Propriedades Avanadas" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Escolha as propriedades avanadas que quer para este atalho.", -1, 5, 30, 210, 10 + CHECKBOX "Executar com diferentes credenciais", 14000, 25, 50, 150, 10 + LTEXT "Esta opo permite executar este atalho como outro utilizador, ou continue com a sua conta enquanto protege o seu computador e dados contra actividade de programas no autorizados.", -1, 50, 60, 175, 40 + CHECKBOX "Executar num espao de memria separada", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abortar", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Geral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tipo de ficheiro:", 14004, 8, 35, 50, 10 + LTEXT "Pasta", 14005, 68, 35, 160, 10 + LTEXT "Localizao:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Tamanho:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contm:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Criado:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Smente de Leitura", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Escondido", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "geral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tipo de Ficheiro:", 14004, 8, 35, 50, 10 + LTEXT "Ficheiro", 14005, 68, 35, 160, 10 + LTEXT "Abre com::", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Localizao:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Tamanho:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Criado:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modificado:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Acedido:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "propriedades:", 14020, 8, 189, 45, 10 + CHECKBOX "&Somente de Leitura", 14021, 58, 189, 67, 10 + CHECKBOX "&Oculto", 14022, 126, 189, 50, 10 + CHECKBOX "&Arquivo", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Verso" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Verso do Ficheiro: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Descrio: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Outras informaes da verso: ", 14006, 6, 70, 222, 115 + LTEXT "Nome do Item: ", 14007, 13, 82, 50, 10 + LTEXT "Valor: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Geral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Tipo:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Sistema de Ficheiros:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Espao utilizado:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Espao livre:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacidade:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Disco %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Limpeza do Disco", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Comprimir unidade para libertar espao no disco", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "permitir indexar este disco para acelerar a procura de ficheiros", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ferramentas" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Verificar por erros...", -1, 5, 5, 230, 60 + LTEXT "Esta opo vai verificar o volume por erros.", -1, 40, 25, 160, 20 + PUSHBUTTON "Verificar agora...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Desfragmentao", -1, 5, 65, 230, 60 + LTEXT "Esta opo vai desfragmentar os ficheiros no volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragmentar Agora...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Cpia de segurana", -1, 5, 130, 230, 60 + LTEXT "Esta opo vai criar os ficheiros do volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Executar Cpia de Segurana...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Executar Como..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Que conta de utilizador quer utilizar para executar este programa?", -1, 10, 20, 220, 20 + CHECKBOX "Utilizador actual %s", 14000, 10, 45, 150, 10 + LTEXT "Proteger o meu computador e dados de actividade de programas no autoridados.", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Esta opo pode prevenir a aco de virus no computador,mas seleccionando-a pode levar a que alguns programas funcionem incorrectamente.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "O seguinte utilizador:", 14002, 10, 100, 90, 10 + LTEXT "Nome do utilizador:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Palavra-passe:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancelar", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "propriedades da Reciclagem" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "propriedades para as localizaes seleccionadas", -1, 10, 72, 220, 70 + RADIOBUTTON "&Tamanho personalizado:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "Tamanho M&ximo(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "No mover os ficheiros para a &Reciclagem. Apag-los definitivamente.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Mostrar ecrn de confirmao de eliminao", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Abre com..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Escolha o programa que quer utilizar para abrir este ficheiro:", -1, 44, 12, 211, 10 + LTEXT "Ficheiro: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programas", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Utilizar sempre o programa seleccionado para abrir este tipo de ficheiros", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Seleccione...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancelar", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Geral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tarefas", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Mostrar tarefas comuns nas &pastas", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Utilizar pastas class&icas ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Procurar pastas", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Abrir cada pasta na &mesma janela", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Abrir cada pasta na sua &janela", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Seleccione a seguinte opo", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Click simples para abrir um item", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Sublinhar os ttulos dos cones mantendo o aspecto do &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Sublinhar os ttulos dos cones apenas quando &aponto para eles", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Duplo-click para abrir um item (um click para seleccionar)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restaurar valores por defeito", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Ver" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Vistas das Pastas", -1, 7, 10, 249, 60 +//ICON +LTEXT "Pode aplicar a vista (como detalhes ou ttulos) que\nest a usar para esta pasta para todas as pastas.", -1, 60, 20, 180, 20 +PUSHBUTTON "Applicar a T&odas as Pastas", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reiniciar todas as Pastas", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Definies avanadas:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restaurar valores por &Defeito", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Tipos de Ficheiros" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "&Tipos de ficheiros registados:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Novo", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Apagar", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Detalhes para '%s' extenso", 14003, 7, 130, 249, 70 +LTEXT "Abre com:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appnome", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Mudar...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Ficheiros com extenso '%s' so do tipo '%s'. Para\nmudar definies que afectam todos '%s' ficheiros, click\nAvanado.", 14007, 12, 155, 160, 30 +PUSHBUTTON "A&vanado", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirmar Substituio de Ficheiros" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Sim", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Sim para &Todos", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Esta pasta j contm um ficheiro com o nome '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Esta pasta j contm um ficheiro smente de leitura com o nome '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Esta pasta j contm um ficheiro de sistema com o nome '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "pretende substituir o ficheiro existente", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(data e tamanho desconhecido)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "por este?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(data e tamanho desconhecido)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Terminar sesso ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Tem a certeza que quer terminar a sesso?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Terminar a sesso", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Encerrar ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Tem a certeza que quer encerrar?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Encerrar", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Seleccione o tipo de contedo, depois escolha uma aco para o RactOS executar automticamente quando este tipo for usado neste dispositivo:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Aces", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Seleccione uma aco para &executar:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "pergunte-me sempre para escolher uma &aco", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restaurar valores por defeito", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contedos mistos" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Este disco ou dispositivo contm mais de um tipo de contedo.", 1001, 32, 7, 191, 20 + LTEXT "O que pretende que o ReactOS faa?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Contedo misto" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS pode executar a mesma aco de cada vez que inserir um disco ou um dispositivo com este tipo de ficheiro:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "O que pretende que o ReactOS faa?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Executar sempre a aco seleccionada.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS pode executar sempre mesma aco de cada vez que inserir um disco ou um dispositivo.", 1001, 32, 7, 190, 22 + LTEXT "&O que pretende que o ReactOS faa?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Executar sempre a aco seleccionada", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancelar", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Encerrar ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "O que pretende aue o computador faa?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Manter a sesso, deixando o computador a correr em baixa energia. O computador arranca quando tocar numa tecla ou mover o rato.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancelar", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Ajuda", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formatar" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Iniciar", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Fechar", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacidade:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Sistema de Ficheiros", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Tamanho da unidade de alocao", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Nome do Volume ", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "&Opes", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "Formatao &Rpida", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Permitir Compresso", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Verificar Disco" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Iniciar", IDOK, 53, 100, 60, 14 + GROUPBOX "Opes verificao do disco", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancelar", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Reparar automticamente erros nos ficheiros do sistema", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Procurar e tentar reparar sectores danificados", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Trocar Icone" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Nome do ficheiro:", -1, 7, 14, 208, 10 + PUSHBUTTON "procurar...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancelar",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Ficheiro" + IDS_SHV_COLUMN2 "Tamanho" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificado" + IDS_SHV_COLUMN5 "propriedades" + IDS_SHV_COLUMN6 "Tamanho" + IDS_SHV_COLUMN7 "Disponvel" + IDS_SHV_COLUMN8 "Nome" + IDS_SHV_COLUMN9 "Comentrios" + IDS_SHV_COLUMN10 "Dono" + IDS_SHV_COLUMN11 "Grupo" + IDS_SHV_COLUMN12 "Nome do ficheiro" + IDS_SHV_COLUMN13 "Categoria" + IDS_SHV_COLUMN_DELFROM "Localizao original" + IDS_SHV_COLUMN_DELDATE "Data da eliminao" + IDS_SHV_COLUMN_FONTTYPE "Tipo de letra" + IDS_SHV_COLUMN_WORKGROUP "Grupo de trabalho" + IDS_SHV_NETWORKLOCATION "localizaes na rede" + IDS_SHV_COLUMN_DOCUMENTS "Documentos" + IDS_SHV_COLUMN_STATUS "Estado" + IDS_SHV_COLUMN_COMMENTS "Commentrios" + IDS_SHV_COLUMN_LOCATION "Localizao" + IDS_SHV_COLUMN_MODEL "Modelo" + + /* special folders */ + IDS_DESKTOP "Ambiente de trabalho" + IDS_MYCOMPUTER "O Meu Computador" + IDS_RECYCLEBIN_FOLDER_NAME "Reciclagem" + IDS_CONTROLPANEL "Painel de Controlo" + IDS_ADMINISTRATIVETOOLS "Ferramentas Administrativas" + + /* context menus */ + IDS_VIEW_LARGE "cones &grandes" + IDS_VIEW_SMALL "cones &pequenos" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Detalhes" + IDS_SELECT "Seleccionar" + IDS_OPEN "Abrir" + IDS_CREATELINK "Criar &Atalho" + IDS_COPY "Copiar" + IDS_DELETE "Apagar" + IDS_PROPERTIES "Propriedades" + IDS_CUT "Cortar" + IDS_RESTORE "Restaurar" + IDS_FORMATDRIVE "Formatar..." + IDS_RENAME "Renaomear" + IDS_INSERT "Inserir" + + IDS_CREATEFOLDER_DENIED "No possvel criar nova pasta: Permisso negada." + IDS_CREATEFOLDER_CAPTION "Erro durante a criao da nova pasta" + IDS_DELETEITEM_CAPTION "Confirmar excluso do ficheiro" + IDS_DELETEFOLDER_CAPTION "Confirmar excluso da pasta" + IDS_DELETEITEM_TEXT "Tem certeza que deseja excluir '%1'?" + IDS_DELETEMULTIPLE_TEXT "Tem certeza que deseja excluir estes %1 itens?" + IDS_DELETESELECTED_TEXT "Tem a certeza que quer eliminar os item(s) seleccionado(s)?" + IDS_TRASHITEM_TEXT "Tem a certeza que quer enviar '%1' para a reciclagem?" + IDS_TRASHFOLDER_TEXT "Tem a certeza que quer enviar '%1' e todo o seu contedo para a reciclagem?" + IDS_TRASHMULTIPLE_TEXT "Tem a certeza que quer enviar este '%1' item para a reciclagem?" + IDS_CANTTRASH_TEXT "O item '%1' no pode ser enviado para a reciclagem. Em vez disso pretende elimin-lo?" + IDS_OVERWRITEFILE_TEXT "Esta pasta j contm um ficheiro com o nome '%1'.\n\npretende substitu-lo?" + IDS_OVERWRITEFILE_CAPTION "Confirmar substituio de ficheiro" + IDS_OVERWRITEFOLDER_TEXT "Esta pasta j contm uma pasta com o nome '%1'.\n\n"\ + "Se os ficheiros na pasta de destino tiverem o mesmo nome dos ficheiros na\n"\ + "pasta seleccionada, sero substitudos. Ainda assim pretende mover ou copiar\n"\ + "a pasta?" + + /* message box strings */ + IDS_RESTART_TITLE "Reiniciar" + IDS_RESTART_PROMPT "Deseja simular a reinicializao do Windows?" + IDS_SHUTDOWN_TITLE "Desligar" + IDS_SHUTDOWN_PROMPT "Deseja finalizar esta sesso do ReactOS?" + IDS_LOGOFF_TITLE "Terminar a sesso" + IDS_LOGOFF_PROMPT "Pretende terminar a sesso?" + + /* shell folder path default values */ + IDS_PROGRAMS "Menu Iniciar\\Programas" + IDS_PERSONAL "OS Meus Documentos" + IDS_FAVORITES "Favoritos" + IDS_STARTUP "Menu Iniciar\\Programas\\Iniciar" + IDS_RECENT "Recentes" + IDS_SENDTO "Enviar Para" + IDS_STARTMENU "Menu Iniciar" + IDS_MYMUSIC "As Minhas Msicas" + IDS_MYVIDEO "Os Meus Vdeos" + IDS_DESKTOPDIRECTORY "Ambiente de Trabalho" + IDS_NETHOOD "Visinhana na rede" + IDS_TEMPLATES "Modelos" + IDS_APPDATA "Dados de Aplicao" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Definies locais\\Dados de Aplicao" + IDS_INTERNET_CACHE "Definies locais\\Ficheiros Temporrios da Internet" + IDS_COOKIES "Cookies" + IDS_HISTORY "Definies locais\\Histrico" + IDS_PROGRAM_FILES "Programas" + IDS_MYPICTURES "As Minhas Imagens" + IDS_PROGRAM_FILES_COMMON "Programas\\Ficheiros comuns" + IDS_COMMON_DOCUMENTS "Os Meus Documentos" + IDS_ADMINTOOLS "Menu Iniciar\\Programas\\Ferramentas Administrativas" + IDS_COMMON_MUSIC "Os Meus Documentos\\As Minhas Msicas" + IDS_COMMON_PICTURES "Os Meus Documentos\\As Minhas Imagens" + IDS_COMMON_VIDEO "Os Meus Documentos\\Os Meus Vdeos" + IDS_CDBURN_AREA "Definies locais\\Dados de Aplicao\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Os Meus Locais da Rede" + + IDS_NEWFOLDER "Nova Pasta" + + IDS_DRIVE_FIXED "Disco Local" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Disco de Rede" + + IDS_OPEN_WITH "Abre com..." + IDS_OPEN_WITH_CHOOSE "Escolha Programa..." + + IDS_SHELL_ABOUT_AUTHORS "&Autores" + IDS_SHELL_ABOUT_BACK "< &Trs" + FCIDM_SHVIEW_NEW "Novo" + FCIDM_SHVIEW_NEWFOLDER "&Pasta" + FCIDM_SHVIEW_NEWLINK "&Atalho" + IDS_FOLDER_OPTIONS "Opes das Pastas" + IDS_RECYCLEBIN_LOCATION "Localizao da Reciclagem" + IDS_RECYCLEBIN_DISKSPACE "Espao Disponvel" + IDS_EMPTY_BITBUCKET "Esvaziar Reciclagem" + IDS_PICK_ICON_TITLE "Escolha cone" + IDS_PICK_ICON_FILTER "Ficheiros de cones(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Ficheiros Executveis\0*.exe\0" + IDS_DIRECTORY "Pasta" + IDS_VIRTUAL_DRIVER "Driver de Dispositivo Virtual" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Aplicao Dos" + IDS_CPL_FILE "Item do Painel de Controle" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Extenso da Aplicao" + IDS_DRV_FILE "Driver do Dispositivo" + IDS_EXE_FILE "Aplicao" + IDS_FON_FILE "Ficheiro de tipo de letra" + IDS_TTF_FILE "Tipo de letra TrueType" + IDS_HLP_FILE "Ficheiro de Ajuda" + IDS_INI_FILE "Definies" + IDS_LNK_FILE "Atalho" + IDS_SYS_FILE "Ficheiro de Sistema" + + IDS_OPEN_VERB "Abrir" + IDS_RUNAS_VERB "Executar como " + IDS_EDIT_VERB "Editar" + IDS_FIND_VERB "Procurar" + IDS_PRINT_VERB "Imprimir" + IDS_PLAY_VERB "Reproduzir" + IDS_PREVIEW_VERB "Previzualizar" + + IDS_FILE_FOLDER "%u Ficheiros, %u Pastas" + IDS_PRINTERS "Impressoras" + IDS_FONTS "Tipos de Letras" + IDS_INSTALLNEWFONT "Instalar novo tipo de letra..." + + IDS_DEFAULT_CLUSTER_SIZE "Tamanho da unidade de atribuio" + IDS_COPY_OF "Cpia de" + + IDS_SHLEXEC_NOASSOC "No existe um programa Windows configurado para abrir este tipo de ficheiro." +END diff --git a/dll/win32/shell32_new/lang/ro-RO.rc b/dll/win32/shell32_new/lang/ro-RO.rc new file mode 100644 index 00000000000..fb24c2ba437 --- /dev/null +++ b/dll/win32/shell32_new/lang/ro-RO.rc @@ -0,0 +1,760 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +#pragma code_page(65001) + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Pictograme& mari", FCIDM_SHVIEW_BIGICON + MENUITEM "Pictograme &mici", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Listă", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalii", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Vizualizare" + BEGIN + MENUITEM "Pictograme& mari", FCIDM_SHVIEW_BIGICON + MENUITEM "Pictograme &mici", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Listă", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detailii", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Aranjare &pictograme" + BEGIN + MENUITEM "După &nume", 0x30 /* column 0 */ + MENUITEM "După &tip", 0x32 /* column 2 */ + MENUITEM "După &mărime", 0x31 /* ... */ + MENUITEM "După &dată", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Aranjare automată", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Aranjare în grilă", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Reîmprospătare", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Lipire", FCIDM_SHVIEW_INSERT + MENUITEM "Lipire ca scurtătură", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Proprietăți", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplorare", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Deschidere", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "D&ecupare", FCIDM_SHVIEW_CUT + MENUITEM "&Copiere", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Creare scurtătură", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Ștergere", FCIDM_SHVIEW_DELETE + MENUITEM "&Redenumire", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Proprietăți", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Răsfoire după dosar" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Anulare", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Răsfoire după dosar" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Dosar:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Creare dosar nou", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Anulare", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Mesaj" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Da", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Da pentru &toate", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nu", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Anulare", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Despre %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Versiune " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Versiune de ReactOS înregistrată pentru:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Memorie fizică instalată:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS v-a fost adus de:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Rulare" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Scrieți numele unui program, dosar, document sau a unei resurse de Internet iar ReactOS le va deschide imediat.", 12289, 36, 11, 182, 18 + LTEXT "&Deschidere:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Anulare", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Răsfoire...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Scurtătură" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Tip țintă:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Locație țintă:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Țintă:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Pornire în:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Taste rapide:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Executare:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omentariu:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Găsire țintă...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Pictogramă...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&vansat...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Proprietăți extinse" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Alegeți proprietăți avansate pentru această scurtătură.", -1, 5, 30, 210, 10 + CHECKBOX "Rulare ca alt utilizator", 14000, 25, 50, 150, 10 + LTEXT "Această opțiune vă permite să rulați scurtătura ca alt utilizator sau să continuați să folosiți scurtătura dvs protejând computerul de activități neautorizate.", -1, 50, 60, 175, 40 + CHECKBOX "Rulare în spațiu de memorie separat", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Anulare", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tip fișier:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Locație:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Mărime:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Conține:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Creat:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Doar-în-citire", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Ascuns", 14022, 126, 150, 50, 10 +END + + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Tip fișier:", 14004, 8, 35, 50, 10 + LTEXT "Fișier", 14005, 68, 35, 160, 10 + LTEXT "Se deschide cu:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Locație:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Mărime:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Creat:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modificat:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accesat:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Atribute:", 14020, 8, 189, 45, 10 + CHECKBOX "&Doar-în-citire", 14021, 58, 189, 67, 10 + CHECKBOX "&Ascuns", 14022, 126, 189, 50, 10 + CHECKBOX "&Arhivă", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Versiune" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Versiune fișier: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Descriere: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Drept de autor: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Alte informații versiune", 14006, 6, 70, 222, 115 + LTEXT "Nume element: ", 14007, 13, 82, 50, 10 + LTEXT "Valoare: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Tip:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Sistem de fișiere:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Spațiu folosit:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Spațiu liber:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacitate:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Partiție %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Curățire disc", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Comprimare pentru a salva spațiu", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Permitere Serviciu de Indexare pentru căutare rapidă", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Unelte" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Verificare pentru erori", -1, 5, 5, 230, 60 + LTEXT "Această opțiune va verifica\npartiția pentru erori.", -1, 40, 25, 160, 20 + PUSHBUTTON "Verificare acum...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentare", -1, 5, 65, 230, 60 + LTEXT "Această opțiune va defragmenta fișierele de pe partiție.", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragmentare acum...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Copie de siguranță", -1, 5, 130, 230, 60 + LTEXT "Această opțiune va crea o copie de siguranță a fișierelor.", -1, 40, 150, 160, 20 + PUSHBUTTON "Creare copie de siguranță...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Rulare ca" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Ce cont vreți să folosiți pentru a rula acest program?", -1, 10, 20, 220, 20 + CHECKBOX "Utilizator curent: %s", 14000, 10, 45, 150, 10 + LTEXT "Protejare computer de activiăți neautorizate", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Această opțiune vă poate proteja computerul de activități care pot fi dăunătoare dar pot duce la funcționarea incorectă a programului.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Utilizator curent:", 14002, 10, 100, 90, 10 + LTEXT "Nume utilizator:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Parolă:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Anulare", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Proprietăți pentru Coșul de gunoi" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Setări pentru locația aleasă", -1, 10, 72, 220, 70 + RADIOBUTTON "&Mărime particul.:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&ărime maximă(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Nu se vor muta fișierele în &Coșul de gunoi, ci se vor elimina direct.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Afișare dialog de confirmare ștergere", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Alegeți programul pe care vreți să îl folosiți la deschiderea acestui fișier:", -1, 44, 12, 211, 10 + LTEXT "Fișier: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programe", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + AUTOCHECKBOX "&Folosire mereu această aplicație", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Răsfoire...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Anulare", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Activități", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Afișare activiăți comune în &dosare", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Folosire dosare &clasice ReactOS", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Răsfoire dosare", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Deschidere &dosare în fereastră comună", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Deschidere dosare în &fereastră proprie", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Selectare elemente astfel", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Clic pentru deschidere (cursor deasupra pt. a selecta)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Subliniere titluri pictograme precum în navigatorul meu", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Subliniere titluri când țin cursorul deasupra", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Dublu-clic pentru a deschide (clic pt. a selecta)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restabilire implicite", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Vizualizare" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Vizualizări dosar", -1, 7, 10, 249, 60 +//ICON +LTEXT "Puteți aplica vizualizarea (precum Detalii sau Pictogramem mari)\npe care o folosiți la acest dosar pt. toate dosarele.", -1, 60, 20, 180, 20 +PUSHBUTTON "Aplicare la &Toate", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Resetare &Toate", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Setări avansate:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restabilire &implicite", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Tipuri fișier" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Tipuri fișier înregistrate:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Nou", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Eliminare", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Detalii pentru extensia '%s'", 14003, 7, 130, 249, 70 +LTEXT "Deschidere cu:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Nume ap.", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Schimbare", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Fișierele cu extensia '%s' sunt de tipul '%s'. \nPentru a schimbat setări care vor afecta\ntoate fișierele '%s', clic pe Avansat.", 14007, 12, 155, 160, 30 +PUSHBUTTON "A&vansat", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirmare înlocuire fișier" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Da", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Da la &Toate", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Nu", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Anulare", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Dosarul curent deja conține un fișier cu numele '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Dosarul curent deja conține un fișier doar-în-citire cu numele '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Dosarul curent deja conține un fișier de sistem cu numele '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Doriți să înlocuiți fișierul acesta", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(mărime/dată necunoscută)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "cu acesta?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(mărime/dată necunoscută)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log off din ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Sigur vreți să ieșiți din ReactOS ?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Anulare", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Deconectare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Sigur vreți să vă deconectați?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Deconectare", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Anulare", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoRulare" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Alegeți un tip de conținut și acțiunea pe care ReactOS să o îndeplinească:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Acțiuni", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Alegeți o acțiune:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Vreau să fiu întrebat mereu", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restabilire implicite", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Conținut mixt" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Acest disc sau dispozitiv conține mai mult de un tip de conținut.", 1001, 32, 7, 191, 20 + LTEXT "Ce vreți să facă ReactOS?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Anulare", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Conținut mixt" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS poate executa aceeași acțiune de fiecare dată când introduceți un disc sau conectați un dispozitiv cu acest conținut pe el:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Ce vreți să facă ReactOS?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Efectuare mereu aceeși acțiune", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Anulare", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autorulare" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS poate executa aceeași acțiune de fiecare dată când conectați acest dispozitiv.", 1001, 32, 7, 190, 22 + LTEXT "&Ce vreți să facă ReactOS?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Efectuare mereu aceeași acțiune", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Anulare", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Închidere ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Ce vreți să facă computerul?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Menține sesiunea de lucru, lasă computerul pe consum redus dar menține toate datele în memorie. Computerul își va reveni când apăsați o tastă sau mișcați mausul.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Anulare", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Ajutor", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formatare" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Începere", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Închidere", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacitate:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Sistem de fișiere", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Mărime unități de alocare", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Nume &volum", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Opțiuni &formatare", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "Formatare r&apidă", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Compresie", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Verificare disc" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Începere", IDOK, 53, 100, 60, 14 + GROUPBOX "Verificare opțiuni disc", -1, 7, 6, 179, 50 + PUSHBUTTON "Anulare", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Reparare automată erori", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scanare și reparare înregistrări eronate", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Schimbare pictogramă" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Nume fișier:", -1, 7, 14, 208, 10 + PUSHBUTTON "Răsfoire...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Anulare",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Fișier" + IDS_SHV_COLUMN2 "Mărime" + IDS_SHV_COLUMN3 "Tip" + IDS_SHV_COLUMN4 "Modificat" + IDS_SHV_COLUMN5 "Atribute" + IDS_SHV_COLUMN6 "Mărime" + IDS_SHV_COLUMN7 "Mărime disponibilă" + IDS_SHV_COLUMN8 "Nume" + IDS_SHV_COLUMN9 "Comentarii" + IDS_SHV_COLUMN10 "Posesor" + IDS_SHV_COLUMN11 "Grup" + IDS_SHV_COLUMN12 "Nume fișier" + IDS_SHV_COLUMN13 "Categorie" + IDS_SHV_COLUMN_DELFROM "Locație originală" + IDS_SHV_COLUMN_DELDATE "Data ștergerii" + IDS_SHV_COLUMN_FONTTYPE "Tip font" + IDS_SHV_COLUMN_WORKGROUP "Grup de lucru" + IDS_SHV_NETWORKLOCATION "Locație rețea" + IDS_SHV_COLUMN_DOCUMENTS "Documente" + IDS_SHV_COLUMN_STATUS "Stare" + IDS_SHV_COLUMN_COMMENTS "Comentarii" + IDS_SHV_COLUMN_LOCATION "Locație" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Spațiu de lucru" + IDS_MYCOMPUTER "Computerul meu" + IDS_RECYCLEBIN_FOLDER_NAME "Coș de gunoi" + IDS_CONTROLPANEL "Panou de control" + IDS_ADMINISTRATIVETOOLS "Unelte administrative" + + /* context menus */ + IDS_VIEW_LARGE "Pictograme &mari" + IDS_VIEW_SMALL "Pictograme m&ici" + IDS_VIEW_LIST "&Listă" + IDS_VIEW_DETAILS "&Detalii" + IDS_SELECT "Selectare" + IDS_OPEN "Deschidere" + IDS_CREATELINK "Creare &scurtătură" + IDS_COPY "Copiere" + IDS_DELETE "Ștergere" + IDS_PROPERTIES "Proprietăți" + IDS_CUT "Decupare" + IDS_RESTORE "Restabilire" + IDS_FORMATDRIVE "Formatare..." + IDS_RENAME "Redenumire" + IDS_INSERT "Inserare" + + IDS_CREATEFOLDER_DENIED "Nu s-a putut crea dosar nou: Eroare de permisiune." + IDS_CREATEFOLDER_CAPTION "Eroare în timpul creării unui nou dosar" + IDS_DELETEITEM_CAPTION "Confirmare ștergere fișier" + IDS_DELETEFOLDER_CAPTION "Confirmare ștergere dosar" + IDS_DELETEITEM_TEXT "Sigur vreți să ștergeți '%1'?" + IDS_DELETEMULTIPLE_TEXT "Sigur vreți să ștergeți aceste %1 elemente?" + IDS_DELETESELECTED_TEXT "Sigur vreți să ștergeți elementul/elementele selectat(e)?" + IDS_TRASHITEM_TEXT "Sigur vreți să trimiteți '%1' în Coșul de gunoi?" + IDS_TRASHFOLDER_TEXT "Sigur vreți să trimiteți dosarul '%1' și tot conținutul său în Coșul de gunoi?" + IDS_TRASHMULTIPLE_TEXT "Sigur vreți să trimiteți aceste %1 elemente la Coșul de gunoi?" + IDS_CANTTRASH_TEXT "Elementul '%1' nu poate fi trimit la gunoi. Vreți să îl ștergeți definitiv în schimb?" + IDS_OVERWRITEFILE_TEXT "Acest dosar deja conține un fișier numit '%1'.\n\nVreți să îl înlocuiți" + IDS_OVERWRITEFILE_CAPTION "Confirmare înlocuire fișier" + IDS_OVERWRITEFOLDER_TEXT "Acest dosar deja conține un sub-dosar cu numele '%1'.\n\n"\ + "Dacă fișierele din dosarul de destinație au același nume ca cele din\n"\ + "dosarul selectat, ele vor fi înlocuite. Sigur vreți să copiați sau\n"\ + "mutați dosarul?" + + /* message box strings */ + IDS_RESTART_TITLE "Repornire" + IDS_RESTART_PROMPT "Vreți să reporniți sistemul?" + IDS_SHUTDOWN_TITLE "Închidere" + IDS_SHUTDOWN_PROMPT "Vreți să închideți computerul?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Meniu Start\\Programe" + IDS_PERSONAL "Documentele mele" + IDS_FAVORITES "Favorite" + IDS_STARTUP "Meniu Start\\Programe\\StartUp" + IDS_RECENT "Recente" + IDS_SENDTO "TrimitereLa" + IDS_STARTMENU "Meniu Start" + IDS_MYMUSIC "Muzica mea" + IDS_MYVIDEO "Filmele Mele" + IDS_DESKTOPDIRECTORY "Spațiu de lucru" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Modele" + IDS_APPDATA "Date Aplicații" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Setări locale\\Date Aplicații" + IDS_INTERNET_CACHE "Setări locale\\Fișiere internet temporare" + IDS_COOKIES "Cookie-uri" + IDS_HISTORY "Setări locale\\Istoric" + IDS_PROGRAM_FILES "Fișiere Program" + IDS_MYPICTURES "Fotografiile mele" + IDS_PROGRAM_FILES_COMMON "Fișiere Program\\Fișiere Comune" + IDS_COMMON_DOCUMENTS "Documente" + IDS_ADMINTOOLS "Meniu Start\\Programe\\Unelte administrative" + IDS_COMMON_MUSIC "Documente\\Muzica mea" + IDS_COMMON_PICTURES "Documente\\Fotografiile mele" + IDS_COMMON_VIDEO "Documente\\Filmele mele" + IDS_CDBURN_AREA "Setări locale\\Date Aplicații\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Locațiile mele în rețea" + + IDS_NEWFOLDER "Dosar nou" + + IDS_DRIVE_FIXED "Disc local" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Disc de rețea" + + IDS_OPEN_WITH "Deschidere cu" + IDS_OPEN_WITH_CHOOSE "Alegere program..." + + IDS_SHELL_ABOUT_AUTHORS "&Autori" + IDS_SHELL_ABOUT_BACK "< &Înapoi" + FCIDM_SHVIEW_NEW "Nou" + FCIDM_SHVIEW_NEWFOLDER "Dosar" + FCIDM_SHVIEW_NEWLINK "Scurtătur&ă" + IDS_FOLDER_OPTIONS "Opțiuni dosar" + IDS_RECYCLEBIN_LOCATION "Locație Coș de gunoi" + IDS_RECYCLEBIN_DISKSPACE "Spațiu disponibil" + IDS_EMPTY_BITBUCKET "Golire Coș de gunoi" + IDS_PICK_ICON_TITLE "Alegere pictogramă" + IDS_PICK_ICON_FILTER "Fișiere pictogramă (*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Fișiere executabile\0*.exe\0" + IDS_DIRECTORY "Dosar" + IDS_VIRTUAL_DRIVER "Driver dispozitiv virtual" + IDS_BAT_FILE "Fișier serie de comenzi ReactOS" + IDS_CMD_FILE "Scriptură de comenzi ReactOS" + IDS_COM_FILE "Aplicație DOS" + IDS_CPL_FILE "Element Panou de Control" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Extensie aplicație" + IDS_DRV_FILE "Driver dispozitiv" + IDS_EXE_FILE "Aplicație" + IDS_FON_FILE "Fișier font" + IDS_TTF_FILE "Fișier font TrueType" + IDS_HLP_FILE "Fișier ajutor" + IDS_INI_FILE "Fișier setări" + IDS_LNK_FILE "Scurtătură" + IDS_SYS_FILE "Fișier de sistem" + + IDS_OPEN_VERB "Deschidere" + IDS_RUNAS_VERB "Rulare ca " + IDS_EDIT_VERB "Editare" + IDS_FIND_VERB "Căutare" + IDS_PRINT_VERB "Imprimare" + IDS_PLAY_VERB "Redare" + IDS_PREVIEW_VERB "Previzualizare" + + IDS_FILE_FOLDER "%u fișiere, %u dosare" + IDS_PRINTERS "Imprimante" + IDS_FONTS "Fonturi" + IDS_INSTALLNEWFONT "Instalare font nou..." + + IDS_DEFAULT_CLUSTER_SIZE "Mărime de alocare implicită" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END + +#pragma code_page(default) diff --git a/dll/win32/shell32_new/lang/ru-RU.rc b/dll/win32/shell32_new/lang/ru-RU.rc new file mode 100644 index 00000000000..afc3b6fabc7 --- /dev/null +++ b/dll/win32/shell32_new/lang/ru-RU.rc @@ -0,0 +1,755 @@ +/* + * Copyright 1998 Juergen Schmied + * Copyright 2006 Vitaliy Margolen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Большие значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Мелкие значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Список", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробно", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Просмотр" + BEGIN + MENUITEM "&Большие значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Мелкие значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Список", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробно", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Упорядочить &значки" + BEGIN + MENUITEM "По &имени", 0x30 /* column 0 */ + MENUITEM "По &типу", 0x32 /* column 2 */ + MENUITEM "По &размеру", 0x31 /* ... */ + MENUITEM "По &дате", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Автоматически", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "В&ыровнять значки", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "О&бновить", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "&Вставить", FCIDM_SHVIEW_INSERT + MENUITEM "Вставить &ярлык", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Сво&йства", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Проводник", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Открыть", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Вырезать", FCIDM_SHVIEW_CUT + MENUITEM "&Копировать", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Создать &ярлык", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Удалить", FCIDM_SHVIEW_DELETE + MENUITEM "Переи&меновать", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "Сво&йства", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Обзор" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Отмена", 2, 134, 174, 50, 14, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Обзор" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Папка:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Создать папку", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Отменить", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Уведомление" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Да", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Д&а для всех", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Нет", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Отмена", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "О %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Версия " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Данная версия ReactOS зарегистрирована на:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Доступная физическая память:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Разработчики ReactOS:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Введите имя программы, папки, документа или ресурс Интернета, и ReactOS откроет их.", 12289, 36, 11, 182, 18 + LTEXT "&Открыть:", 12305, 5, 39, 34, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 40, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Отмена", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Об&зор...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ярлык" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Тип объекта:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Размещение:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Объект:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Рабочая папка:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Б&ыстрый вызов:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Окно:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "&Коментарий:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Найти объект...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "См&енить значок...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Дополнительно...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Дополнительные свойства" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Установите нужные свойства для этого ярлыка.", -1, 5, 30, 210, 10 + CHECKBOX "Запускать с другими учетными данными", 14000, 25, 50, 150, 10 + LTEXT "Позволяет использовать этот ярлык для запуска программы от &имени администратора, в то же время продолжая работу от своего имени, что защищает компьютер от несанкционированных действий других программ.", -1, 50, 60, 175, 40 + CHECKBOX "Запус&кать в отдельной области памяти", 14001, 25, 104, 160, 10, WS_DISABLED + PUSHBUTTON "OK", IDOK, 54, 123, 50, 14, WS_VISIBLE + PUSHBUTTON "Отмена", IDCANCEL, 120, 123, 50, 14, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Общие" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Тип файла:", 14004, 8, 35, 50, 10 + LTEXT "Папка", 14005, 68, 35, 160, 10 + LTEXT "Расположение:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Размер:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Содержит:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Создано:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Только чтение", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Скрыто", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Общие" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Тип файла:", 14004, 8, 35, 50, 10 + LTEXT "файл", 14005, 68, 35, 160, 10 + LTEXT "Приложение:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Размещение:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Размер:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Создан:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Изменен:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Открыт:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Атрибуты:", 14020, 8, 189, 45, 10 + CHECKBOX "Только &чтение", 14021, 58, 189, 67, 10 + CHECKBOX "Скр&ытый", 14022, 126, 189, 50, 10 + CHECKBOX "&Архивный", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Версия" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Версия файла: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Описание: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Авторские права: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Дополнительные сведения: ", 14006, 6, 70, 222, 115 + LTEXT "Имя элемента: ", 14007, 13, 82, 63, 10 + LTEXT "Значение: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Общие" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Тип:", -1, 15, 49, 40, 10 + LTEXT "", 14001, 110, 49, 100, 10 + + LTEXT "Файловая система:", -1, 15, 68, 86, 10 + LTEXT "", 14002, 110, 68, 100, 10 + + CONTROL "", 14013, "STATIC", SS_OWNERDRAW | SS_NOTIFY | SS_SUNKEN, 5, 90, 10, 10 + LTEXT "Занято:", -1, 25, 90, 78, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "STATIC", SS_OWNERDRAW | SS_NOTIFY | SS_SUNKEN, 5, 105, 10, 10 + LTEXT "Свободно:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Емкость:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "STATIC", SS_OWNERDRAW | SS_NOTIFY | SS_SUNKEN, 20, 140, 200, 20 + + LTEXT "Диск %s", 14009, 100, 170, 52, 10 + PUSHBUTTON "Очистка диска", 14010, 166, 175, 64, 15, WS_TABSTOP + CHECKBOX "&Сжимать для экономии места", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Разрешить &индексирование диска для быстрого поиска", 14012, 15, 220, 216, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Сервис" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Проверка диска", -1, 5, 5, 230, 60 + LTEXT "Проверка тома на наличие ошибок.", -1, 40, 25, 160, 20 + PUSHBUTTON "Выполнить &проверку...", 14000, 116, 45, 112, 15, WS_TABSTOP + GROUPBOX "Дефрагментация диска", -1, 5, 65, 230, 60 + LTEXT "Дефрагментация файлов, хранящихся на этом томе.", -1, 40, 85, 160, 20 + PUSHBUTTON "Выполнить д&ефрагментацию...", 14001, 116, 105, 112, 15, WS_TABSTOP + GROUPBOX "Архивация", -1, 5, 130, 230, 60 + LTEXT "Архивация файлов, хранящихся на этом томе.", -1, 40, 150, 160, 20 + PUSHBUTTON "Выполнить &архивацию...", 14002, 116, 170, 112, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Оборудование" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 252, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Запуск от другого имени" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "От имени какого пользователя вы хотите запустить программу?", -1, 10, 19, 230, 20 + CHECKBOX "Текущий пользователь %s", 14000, 10, 42, 210, 10 + LTEXT "Защитить мой компьютер и мои данные от несанкционированной деятельности программ.", -1, 21, 57, 225, 20, WS_DISABLED + CHECKBOX "Данная опция может защитить ваш компьютер и данные от вирусов, но программа может работать неправильно", 14001, 25, 79, 221, 24, BS_MULTILINE | WS_DISABLED + CHECKBOX "Запустить от имени следующего пользователя:", 14002, 10, 110, 187, 10 + LTEXT "Имя пользователя:", -1, 16, 133, 54, 10 + COMBOBOX 14003, 76, 130, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "...", 14004, 180, 130, 30, 14, WS_TABSTOP + LTEXT "Пароль:", -1, 16, 152, 60, 10 + EDITTEXT 14005, 76, 148, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 148, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 59, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Отмена", 14008, 125, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Свойства: Корзина" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Установки для выбранного расположения", -1, 10, 66, 220, 73 + RADIOBUTTON "&Другой размер:", 14001, 17, 80, 80, 10, NOT WS_TABSTOP + EDITTEXT 14002, 100, 78, 65, 14, WS_TABSTOP | ES_NUMBER + LTEXT "&Максимальный размер(Мб):", -1, 17, 95, 102, 10 + RADIOBUTTON "&Уничтожать файлы сразу после удаления, не помещая их в корзину.", 14003, 17, 108, 206, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Запрашивать подтверждение на удаление", 14004, 20, 145, 176, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Выбор программы" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Выберите программу для открытия этого файла.", -1, 44, 12, 211, 10 + LTEXT "Файл: ", 14001, 44, 25, 188, 10 + GROUPBOX "Программы", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Использовать ее для всех файлов такого типа", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Обзор...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Отмена", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 238 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Общие" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Задачи", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 24, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Отобра&жение списка типичных задач в папках", 14001, 40, 24, 185, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Использовать обы&чные папки ReactOS", 14002, 40, 36, 185, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Обзор папок", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 75, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Открывать папки в одном и том же окне", 14004, 40, 75, 185, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "О&ткрывать каждую папку в отдельном окне", 14005, 40, 87, 185, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Щелчки мышью", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "От&крывать одним щелчком, выделять указателем", 14007, 40, 120, 200, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Подчеркив&ать подписи значков", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Подчеркивать подписи з&начков при наведении", 14009, 50, 144, 185, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Откр&ывать двойным, а выделять одним щелчком", 14010, 40, 156, 195, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Восстановить умолчания", 14011, 148, 180, 104, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 238 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Вид" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Представление папок", -1, 7, 10, 249, 60 +//ICON +LTEXT "Можно применить вид, выбранный для этой папки, например, ""Таблица"" или ""Плитка"", ко всем папкам.", -1, 60, 24, 180, 20 +PUSHBUTTON "&Применить ко всем папкам", 14001, 60, 50, 100, 14, WS_TABSTOP +PUSHBUTTON "&Сброс для всех папок", 14002, 164, 50, 80, 14, WS_TABSTOP +LTEXT "Дополнительные параметры:", -1, 9, 78, 120, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "&Восстановить умолчания", 14004, 156, 216, 101, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 238 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Типы файлов" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "&Зарегистрированные типы файлов:", -1, 9, 7, 133, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Создать", 14001, 147, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Удалить", 14002, 202, 110, 50, 14, WS_TABSTOP +GROUPBOX "Описание расширения '%s'", 14003, 7, 130, 249, 70 +LTEXT "Открывать в:", -1, 12, 142, 54, 10 +//ICON +LTEXT "Приложение:", 14005, 100, 142, 54, 10 +PUSHBUTTON "&Изменить...", 14006, 180, 140, 63, 14, WS_TABSTOP +LTEXT "Файлы с расширением '%s' имеют тип '%s'. Для изменения параметров всех файлов '%s', нажмите ""Дополнительно"".", 14007, 12, 155, 162, 36 +PUSHBUTTON "До&полнительно", 14008, 180, 175, 63, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Подтверждение замены файла" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Да", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Да - для &всех", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Нет", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Папка уже содержит файл ""%2"".", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Папка уже содержит доступный только для чтения файл ""%2"".", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Папка уже содержит системный файл ""%2"".", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Заменить имеющийся файл", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(дата и размер неизвестны)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "следующим файлом?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(дата и размер неизвестны)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Выход из ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Вы действительно хотите выйти из системы?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "В&ыход", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Отключение ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Вы действительно хотите выполнить отключение?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "Отклю&чение", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Автозапуск" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Выберите &тип содержимого, а затем действие, автоматически выполняемое при его обнаружении в этом устройстве:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Действия", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "&Выберите выполняемое действие:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Выдавать &запрос на выбор выполняемого действия", 1006, 14, 177, 202, 10 + PUSHBUTTON "Восстановить умол&чания", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Смешанное содержимое" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "На этом диске или устройстве хранится содержимое различных типов.", 1001, 32, 7, 191, 20 + LTEXT "Какое действие следует выполнять ReactOS?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Смешанное содержимое" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS может всегда выполнять одно и то же действие, когда вы вставляете диск или подключаете устройство с файлами следующего типа:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Какое действие следует выполнять ReactOS?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Всегда выполнять выбранное действие.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Автозапуск" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS может выполнять одно и то же действие при каждом подключении этого устройства.", 1001, 32, 7, 190, 22 + LTEXT "&Какое действие следует выполнять ReactOS?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Всегда выполнять выбранное действие", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Отмена", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Завершение работы ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Выберите желаемое действие.", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Сохранить сеанс, обеспечивая работу компьютера в спящем режиме и данными в памяти. При нажатии на любую клавишу или передвижении мыши компьютер возвратится в обычный режим.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Отмена", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Справка", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Форматирование" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Начать", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Закрыть", IDCANCEL, 118, 198, 60, 14 + LTEXT "&Емкость:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Файловая система:", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Размер кластера:", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Метка тома:", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "&Способы форматирования:", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Быстрое (очистка оглавления)", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Использовать сжатие", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 232, 111 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Проверка диска" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Запуск", IDOK, 101, 91, 60, 14 + GROUPBOX "Параметры проверки диска", -1, 7, 5, 218, 50 + PUSHBUTTON "Отмена", IDCANCEL, 165, 91, 60, 14 + AUTOCHECKBOX "&Автоматически исправлять системные ошибки", 14000, 16, 19, 178, 10 + AUTOCHECKBOX "&Проверять и востанавливать поврежденные сектора", 14001, 16, 35, 200, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 218, 8 + LTEXT "", 14003, 7, 75, 218, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Изменение значка" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Имя файла:", -1, 7, 14, 208, 10 + PUSHBUTTON "Обзор...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Значки:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Отмена",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Имя" + IDS_SHV_COLUMN2 "Размер" + IDS_SHV_COLUMN3 "Тип" + IDS_SHV_COLUMN4 "Изменён" + IDS_SHV_COLUMN5 "Атрибуты" + IDS_SHV_COLUMN6 "Полный объём" + IDS_SHV_COLUMN7 "Свободно" + IDS_SHV_COLUMN8 "Имя" + IDS_SHV_COLUMN9 "Комментарий" + IDS_SHV_COLUMN10 "Владелец" + IDS_SHV_COLUMN11 "Группа" + IDS_SHV_COLUMN12 "Имя файла" + IDS_SHV_COLUMN13 "Категория" + IDS_SHV_COLUMN_DELFROM "Изначальное расположение" + IDS_SHV_COLUMN_DELDATE "Дата удаления" + IDS_SHV_COLUMN_FONTTYPE "Тип шрифта" + IDS_SHV_COLUMN_WORKGROUP "Рабочая группа" + IDS_SHV_NETWORKLOCATION "Сетевое расположение" + IDS_SHV_COLUMN_DOCUMENTS "Документы" + IDS_SHV_COLUMN_STATUS "Состояние" + IDS_SHV_COLUMN_COMMENTS "Коментарии" + IDS_SHV_COLUMN_LOCATION "Расположение" + IDS_SHV_COLUMN_MODEL "Модель" + + /* special folders */ + IDS_DESKTOP "Рабочий стол" + IDS_MYCOMPUTER "Мой компьютер" + IDS_RECYCLEBIN_FOLDER_NAME "Корзина" + IDS_CONTROLPANEL "Панель управления" + IDS_ADMINISTRATIVETOOLS "Администрирование" + + /* context menus */ + IDS_VIEW_LARGE "&Большие значки" + IDS_VIEW_SMALL "&Мелкие значки" + IDS_VIEW_LIST "&Список" + IDS_VIEW_DETAILS "&Подробно" + IDS_SELECT "&Выбрать" + IDS_OPEN "&Открыть" + IDS_CREATELINK "Создать &ярлык" + IDS_COPY "Копировать" + IDS_DELETE "Удалить" + IDS_PROPERTIES "Свойства" + IDS_CUT "Вырезать" + IDS_RESTORE "Востановить" + IDS_FORMATDRIVE "Форматировать..." + IDS_RENAME "Переименовать" + IDS_INSERT "Вставить" + + IDS_CREATEFOLDER_DENIED "Невозможно создать папку - нет полномочий." + IDS_CREATEFOLDER_CAPTION "Ошибка во время создания папки" + IDS_DELETEITEM_CAPTION "Подтверждение удаления файла" + IDS_DELETEFOLDER_CAPTION "Подтверждение удаления папки" + IDS_DELETEITEM_TEXT "Удалить '%1'?" + IDS_DELETEMULTIPLE_TEXT "Удалить эти обьекты (%1?" + IDS_DELETESELECTED_TEXT "Вы действительно хотите удалить выбранный элементы(ы)?" + IDS_TRASHITEM_TEXT "Вы действильно хотите поместить '%1' в Корзину?" + IDS_TRASHFOLDER_TEXT "Вы действительно хотите поместить '%1' и все содержащиеся файлы в Корзину?" + IDS_TRASHMULTIPLE_TEXT "Вы действительно хотите переместить элементы %1 в Корзину?" + IDS_CANTTRASH_TEXT "Файл '%1' не может быть помещен в Корзину. Удалить безвозвратно?" + IDS_OVERWRITEFILE_TEXT "В этой папке уже имеется элемент '%1'.\n\nЗаменить его?" + IDS_OVERWRITEFILE_CAPTION "Подтверждение замены файла" + IDS_OVERWRITEFOLDER_TEXT "Эта папка уже содержит папку с именем '%1'.\n\n"\ + "Если в папке содержатся файлы с одинаковыми именами, то они так же будут\n"\ + "земенены. Продолжить?" + + /* message box strings */ + IDS_RESTART_TITLE "Перезагрузить" + IDS_RESTART_PROMPT "Вы действительно хотите перезагрузить ReactOS?" + IDS_SHUTDOWN_TITLE "Выключить питание" + IDS_SHUTDOWN_PROMPT "Закончить работу с ReactOS?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Главное меню\\Программы" + IDS_PERSONAL "Мои документы" + IDS_FAVORITES "Избранное" + IDS_STARTUP "Главное меню\\Программы\\Автозагрузка" + IDS_RECENT "Недавнее" + IDS_SENDTO "Отправить" + IDS_STARTMENU "Главное меню" + IDS_MYMUSIC "Моя музыка" + IDS_MYVIDEO "Мои фильмы" + IDS_DESKTOPDIRECTORY "Рабочий стол" + IDS_NETHOOD "Сетевое окружение" + IDS_TEMPLATES "Шаблоны" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "Принтеры" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Мои рисунки" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Общие документы" + IDS_ADMINTOOLS "Главное меню\\Программы\\Администрирование" + IDS_COMMON_MUSIC "Общие документы\\Моя музыка" + IDS_COMMON_PICTURES "Общие документы\\Мои рисунки" + IDS_COMMON_VIDEO "Общие документы\\Мои фильмы" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Сетевое окружение" + + IDS_NEWFOLDER "Новая папка" + + IDS_DRIVE_FIXED "Локальный диск" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Сетевой диск" + + IDS_OPEN_WITH "Открыть с помощью" + IDS_OPEN_WITH_CHOOSE "Выбрать программу..." + + IDS_SHELL_ABOUT_AUTHORS "&Авторы" + IDS_SHELL_ABOUT_BACK "< &Назад" + FCIDM_SHVIEW_NEW "Создать" + FCIDM_SHVIEW_NEWFOLDER "&Папка" + FCIDM_SHVIEW_NEWLINK "&Ярлык" + IDS_FOLDER_OPTIONS "Свойства папки" + IDS_RECYCLEBIN_LOCATION "Расположение Корзины" + IDS_RECYCLEBIN_DISKSPACE "Доступное пространство" + IDS_EMPTY_BITBUCKET "Очистить корзину" + IDS_PICK_ICON_TITLE "Выбрать значок" + IDS_PICK_ICON_FILTER "Файлы значков(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Исполняемые файлы\0*.exe\0" + IDS_DIRECTORY "Папка" + IDS_VIRTUAL_DRIVER "Драйвер виртуального устройства" + IDS_BAT_FILE "Пакетный файл ReactOS" + IDS_CMD_FILE "Командный скрипт ReactOS" + IDS_COM_FILE "Приложение Dos" + IDS_CPL_FILE "Аплет панели управления" + IDS_CUR_FILE "Курсор" + IDS_DLL_FILE "Расширение приложения" + IDS_DRV_FILE "Драйвер устройства" + IDS_EXE_FILE "Приложение" + IDS_FON_FILE "Файл шрифта" + IDS_TTF_FILE "Файл шрифта TrueType" + IDS_HLP_FILE "Файл справки" + IDS_INI_FILE "Файл конфигурации" + IDS_LNK_FILE "Ярлык" + IDS_SYS_FILE "Системный файл" + + IDS_OPEN_VERB "Открыть" + IDS_RUNAS_VERB "Запустить как " + IDS_EDIT_VERB "Изменить" + IDS_FIND_VERB "Поиск" + IDS_PRINT_VERB "Печать" + IDS_PLAY_VERB "Воспроизвести" + IDS_PREVIEW_VERB "Предпросмотр" + + IDS_FILE_FOLDER "%u файлов, %u папок" + IDS_PRINTERS "Принтеры" + IDS_FONTS "Шрифты" + IDS_INSTALLNEWFONT "Установить новый шрифт..." + + IDS_DEFAULT_CLUSTER_SIZE "Выделяемый по умолчанию размер" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/sk-SK.rc b/dll/win32/shell32_new/lang/sk-SK.rc new file mode 100644 index 00000000000..848d343ecdd --- /dev/null +++ b/dll/win32/shell32_new/lang/sk-SK.rc @@ -0,0 +1,764 @@ +/* TRANSLATOR : Mrio Kamr /Mario Kacmar/ aka Kario (kario@szm.sk) + * NOTE : partially translated + * TRANSLATED : 26-12-2007 + * LAST CHANGE: 31-05-2010 + */ + +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Vek ikony", FCIDM_SHVIEW_BIGICON + MENUITEM "&Mal ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Zoznam", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Zobrazi" + BEGIN + MENUITEM "&Vek ikony", FCIDM_SHVIEW_BIGICON + MENUITEM "&Mal ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Zoznam", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "&Usporiada ikony" + BEGIN + MENUITEM "&Nzov", 0x30 /* column 0 */ + MENUITEM "&Typ", 0x32 /* column 2 */ + MENUITEM "&Vekos", 0x31 /* ... */ + MENUITEM "&Zmenen", 0x33 + MENUITEM SEPARATOR + MENUITEM "Usporiada &automaticky", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Zarovna ikony", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "&Obnovi", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "&Prilepi", FCIDM_SHVIEW_INSERT + MENUITEM "Prilepi od&kaz", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Vl&astnosti", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Preskma", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Otvori", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Vystrihn", FCIDM_SHVIEW_CUT + MENUITEM "&Koprova", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Vytvori o&dkaz", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Odstrni", FCIDM_SHVIEW_DELETE + MENUITEM "Pre&menova", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "Vl&astnosti", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Vyhada prieinok" //Browse for Folder +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Zrui", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Vyhada prieinok" //Browse for Folder +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Prieinok:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Vytvori nov prieinok", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Zrui", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Sprva" //Message +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "n&o", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "no pre &vetky", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nie", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Zrui", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "o je %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Verzia " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Tto verzia systmu ReactOS je registrovan pre:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Naintalovan fyzick pam:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Systm ReactOS pre Vm pripravili:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Spustenie" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Zadajte nzov programu, prieinka, dokumentu alebo internetovho zdroja a systm ReactOS ho otvor.", 12289, 36, 11, 182, 18 + LTEXT "&Otvori:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Zrui", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Prehadva...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Odkaz" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Typ ciea:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Umiestnenie ciea:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "&Cie:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "Z&aa v prieinku:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "&Klvesov skratka:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Sp&usti:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "Pozn&mka:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Hada cie...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Zmeni ikonu...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Spresni...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Rozren vlastnosti" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Vyberte rozren vlastnosti uren pre tento odkaz.", -1, 5, 30, 210, 10 + CHECKBOX "&Spusti s inmi povereniami", 14000, 25, 50, 150, 10 + LTEXT "Tto monos umouje spusti tento odkaz ako in pouvate, alebo pokraova so svojm pouvateskm oprvnenm, ale s ochranou potaa a dajov pred neoprvnenmi aktivitami programu.", -1, 50, 60, 170, 40 + CHECKBOX "Spusti v oddelenom pa&movom priestore", 14001, 25, 100, 190, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Prerui", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Veobecn" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Typ:", 14004, 8, 35, 50, 10 + LTEXT "Prieinok", 14005, 68, 35, 160, 10 + LTEXT "Umiestnenie:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Vekos:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Obsahuje:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Vytvoren:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Iba na tanie", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Skryt", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Veobecn" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Typ sboru:", 14004, 8, 35, 50, 10 + LTEXT "Sbor", 14005, 68, 35, 160, 10 + LTEXT "Otvori programom:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Umiestnenie:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Vekos:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Vytvoren:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Zmenen:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Otvoren:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Atribty:", 14020, 8, 189, 45, 10 + CHECKBOX "&Iba na tanie", 14021, 58, 189, 67, 10 + CHECKBOX "&Skryt", 14022, 126, 189, 50, 10 + CHECKBOX "&Archvny", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Verzia" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Verzia sboru: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Popis: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Autorsk prva: ", 14004, 10, 46, 66, 10 //Copyright + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "In informcie o verzii: ", 14006, 6, 70, 222, 115 + LTEXT "Nzov poloky: ", 14007, 13, 82, 50, 10 + LTEXT "Hodnota: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Veobecn" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Typ:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Systm sborov:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Vyuit miesto:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Von miesto:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Kapacita:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Jednotka %s", 14009, 100, 170, 45, 10 + PUSHBUTTON "&istenie disku", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Uetri miesto na disku &kompresiou jednotky", 14011, 10, 205, 180, 10, WS_DISABLED + CHECKBOX "&Povoli indexovanie pre tento disk, a zrchli tak hadanie sborov", 14012, 10, 220, 225, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Nstroje" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Kontrola chb", -1, 5, 5, 230, 60 + LTEXT "Umouje njs chyby na zvzku.", -1, 40, 25, 160, 20 + PUSHBUTTON "&Skontrolova...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentcia", -1, 5, 65, 230, 60 + LTEXT "Defragmentuje sbory na zvzku.", -1, 40, 85, 160, 20 + PUSHBUTTON "&Defragmentova...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Zlohovanie", -1, 5, 130, 230, 60 + LTEXT "Zlohuje sbory na zvzku.", -1, 40, 150, 160, 20 + PUSHBUTTON "&Zlohova...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardvr" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Spusti ako" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Ktor pouvatesk konto chcete poui k spusteniu tohto programu?", -1, 10, 20, 220, 20 + CHECKBOX "Aktulny pouvate %s", 14000, 10, 45, 150, 10 + LTEXT "Chrni pota a daje pred neoprvnenmi aktivitami programu", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Nasledujci pouvate:", 14002, 10, 100, 90, 10 + LTEXT "Meno pouvatea:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Heslo:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Zrui", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "K - vlastnosti" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Nastavenia pre zvolen umiestnenie", -1, 10, 72, 220, 70 + RADIOBUTTON "&Vlastn vekos:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "&Maximlna vekos (MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Sbory nepremiestova do &koa. Zmazan sbory hne odstrni.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "Zobrazova &dialgov okno potvrdenia odstrnenia", 14004, 20, 155, 196, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Otvori v programe" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Vyberte program, v ktorom sa m otvori tento sbor:", -1, 44, 12, 211, 10 + LTEXT "Sbor: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programy", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "N&a otvorenie tchto sborov vdy poui vybrat program", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Prehadva...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Zrui", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Veobecn" //General +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "lohy", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Zobrazi" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Typy sborov" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registrovan &typy sborov:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Nov", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "O&dstrni", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Podrobnosti o prpone '%s'", 14003, 7, 130, 249, 70 //Details for '%s' extension +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Zmeni...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Potvrdenie nahradenia sboru" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "n&o", IDYES, 20, 122, 60, 14 + PUSHBUTTON "no pre &vetky", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Nie", IDNO, 150, 122, 60, 14 + PUSHBUTTON "&Zrui", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Tento prieinok u obsahuje sbor s nzvom '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Tento prieinok u obsahuje sbor s nzvom '%2', ktor je uren iba na tanie.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Tento prieinok u obsahuje systmov sbor s nzvom '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Chcete nahradi existujci sbor", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(neznmy dtum a vekos)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "tmto sborom?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(neznmy dtum a vekos)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Odhlsi ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Ste si ist, e sa chcete odhlsi?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "O&dhlsi", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Zrui", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Odpoji ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Urite chcete odpoji?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Odpoji", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Zrui", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Zmiean obsah" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "Tento disk alebo zariadenie obsahuje viac ako len jeden typ obsahu.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Zrui", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Zmiean obsah" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "o m systm ReactOS urobi?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Vdy vykona zvolen akciu.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Zrui", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Automatick prehrvanie" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "o m systm ReactOS &urobi?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Vdy vykona zvolen akciu.", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Zrui", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Vypnutie systmu ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "o chcete aby pota urobil?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Zrui", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Pomocnk", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Formt" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Spusti", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Zavrie", IDCANCEL, 118, 198, 60, 14 + LTEXT "&Kapacita:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Sborov syst&m:", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Vekos alokanej jednotky:", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Nzov zvzku", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Monosti &formtovania", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Rchle formtovanie", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "Z&apn kompresiu", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Kontrola disku" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Spusti", IDOK, 53, 100, 60, 14 + GROUPBOX "Monosti kontroly disku", -1, 7, 6, 179, 50 + PUSHBUTTON "Zrui", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "&Automaticky opravi chyby v systme sborov", 14000, 16, 15, 165, 10 + AUTOCHECKBOX "Vy&hada a poksi sa obnovi chybn sektory", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Zmena ikony" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Nzov sboru:", -1, 7, 14, 208, 10 + PUSHBUTTON "&Prehadva...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Ikony:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Zrui",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Sbor" + IDS_SHV_COLUMN2 "Vekos" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Modifikovan" + IDS_SHV_COLUMN5 "Atribty" + IDS_SHV_COLUMN6 "Vekos" + IDS_SHV_COLUMN7 "Vekos k dispozcii" + IDS_SHV_COLUMN8 "Nzov" //Name + IDS_SHV_COLUMN9 "Poznmky" //Comments + IDS_SHV_COLUMN10 "Vlastnk" + IDS_SHV_COLUMN11 "Skupina" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Kategria" + IDS_SHV_COLUMN_DELFROM "Pvod" //Pvodn umiestnenie + IDS_SHV_COLUMN_DELDATE "Odstrnen" //Dtum zmazania + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Dokumenty" + IDS_SHV_COLUMN_STATUS "Stav" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Pracovn plocha" + IDS_MYCOMPUTER "Tento pota" + IDS_RECYCLEBIN_FOLDER_NAME "K" + IDS_CONTROLPANEL "Ovldac panel" + IDS_ADMINISTRATIVETOOLS "Nstroje na sprvu" + + /* context menus */ + IDS_VIEW_LARGE "&Vek ikony" + IDS_VIEW_SMALL "&Mal ikony" + IDS_VIEW_LIST "&Zoznam" + IDS_VIEW_DETAILS "&Podrobnosti" + IDS_SELECT "Vybra" + IDS_OPEN "&Otvori" + IDS_CREATELINK "Vytvori o&dkaz" + IDS_COPY "&Koprova" + IDS_DELETE "Odstrni" + IDS_PROPERTIES "Vl&astnosti" + IDS_CUT "&Vystrihn" + IDS_RESTORE "&Obnovi" + IDS_FORMATDRIVE "Formtova..." + IDS_RENAME "Premenova" + IDS_INSERT "Vloi" + + IDS_CREATEFOLDER_DENIED "Nie je mon vytvori nov prieinok: Prstup zamietnut." + IDS_CREATEFOLDER_CAPTION "Chyba poas vytvrania novho prieinka" + IDS_DELETEITEM_CAPTION "Potvrdenie odstrnenia sboru" + IDS_DELETEFOLDER_CAPTION "Potvrdenie odstrnenia prieinka" + IDS_DELETEITEM_TEXT "Naozaj chcete vymaza '%1'?" + IDS_DELETEMULTIPLE_TEXT "Naozaj chcete vymaza tieto %1 poloky?" + IDS_DELETESELECTED_TEXT "Naozaj chcete vymaza vybran/ poloku/y?" + IDS_TRASHITEM_TEXT "Naozaj chcete odosla '%1' do koa?" + IDS_TRASHFOLDER_TEXT "Naozaj chcete odosla '%1' a vetko o obsahuje do koa?" + IDS_TRASHMULTIPLE_TEXT "Naozaj chcete odosla tieto %1 poloky do koa?" + IDS_CANTTRASH_TEXT "Poloka '%1' neme by odoslan do koa. Chcete ju namiesto toho vymaza?" + IDS_OVERWRITEFILE_TEXT "Tento prieinok u obsahuje sbor s nzvom '%1'.\n\nChcete ho nahradi?" + IDS_OVERWRITEFILE_CAPTION "Potvrdenie prepsania sboru" + IDS_OVERWRITEFOLDER_TEXT "Tento prieinok u obsahuje prieinok s nzvom '%1'.\n\n"\ + "Ak bud ma sbory v cieovom prieinku rovnak nzvy ako sbory\n"\ + "vo vybranom prieinku, tak bud nahraden. Stle chcete presun\n"\ + "alebo skoprova prieinok?" + + /* message box strings */ + IDS_RESTART_TITLE "Retartova" + IDS_RESTART_PROMPT "Naozaj chcete retartova systm?" + IDS_SHUTDOWN_TITLE "Vypn" + IDS_SHUTDOWN_PROMPT "Naozaj chcete vypn pota?" + IDS_LOGOFF_TITLE "Odhlsi" + IDS_LOGOFF_PROMPT "Naozaj sa chcete odhlsi?" + + /* shell folder path default values */ + IDS_PROGRAMS "Ponuka tart\\Programy" + IDS_PERSONAL "Moje dokumenty" + IDS_FAVORITES "Obben poloky" + IDS_STARTUP "Ponuka tart\\Programy\\Po spusten" + IDS_RECENT "Recent" + IDS_SENDTO "Odosla do" + IDS_STARTMENU "Ponuka tart" + IDS_MYMUSIC "Hudba" + IDS_MYVIDEO "Vide" + IDS_DESKTOPDIRECTORY "Pracovn plocha" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Obrzky" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Ponuka tart\\Programy\\Nstroje na sprvu" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Miesta v sieti" + + IDS_NEWFOLDER "Nov prieinok" + + IDS_DRIVE_FIXED "Loklny disk" + IDS_DRIVE_CDROM "Jednotka CD" + IDS_DRIVE_NETWORK "Sieov disk" + + IDS_OPEN_WITH "Otvori v progra&me" + IDS_OPEN_WITH_CHOOSE "&Vybra program..." + + IDS_SHELL_ABOUT_AUTHORS "&Autori" + IDS_SHELL_ABOUT_BACK "< &Sp" + FCIDM_SHVIEW_NEW "&Nov" + FCIDM_SHVIEW_NEWFOLDER "&Prieinok" + FCIDM_SHVIEW_NEWLINK "&Odkaz" + IDS_FOLDER_OPTIONS "Monosti prieinka" + IDS_RECYCLEBIN_LOCATION "Umiestnenia Koa" //Recycle Bin Location + IDS_RECYCLEBIN_DISKSPACE "Dostupn miesto" + IDS_EMPTY_BITBUCKET "Vyprzdni K" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Sbory ikon(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Spustiten sbory\0*.exe\0" + IDS_DIRECTORY "Prieinok" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "Dvkov sbor systmu ReactOS" + IDS_CMD_FILE "Prkazov skript systmu ReactOS" + IDS_COM_FILE "DOS aplikcia" + IDS_CPL_FILE "Poloka ovldacieho panela" + IDS_CUR_FILE "Kurzor" + IDS_DLL_FILE "Rozrenie aplikcie" + IDS_DRV_FILE "Ovlda zariadenia" + IDS_EXE_FILE "Aplikcia" + IDS_FON_FILE "Sbor psma" + IDS_TTF_FILE "Sbor psma TrueType" + IDS_HLP_FILE "Sbor pomocnka" + IDS_INI_FILE "Konfiguran nastavenia" + IDS_LNK_FILE "Odkaz" + IDS_SYS_FILE "Systmov sbor" + + IDS_OPEN_VERB "Otvori" + IDS_RUNAS_VERB "Spusti ako " + IDS_EDIT_VERB "Upravi" + IDS_FIND_VERB "Find" //Njs, Hada, Vyhada ??? + IDS_PRINT_VERB "Tlai" + IDS_PLAY_VERB "Prehra" + IDS_PREVIEW_VERB "Preview" //Nhad, Ukka, Prezrie ??? + + IDS_FILE_FOLDER "sbory: %u, prieinky: %u" + IDS_PRINTERS "Tlaiarne" + IDS_FONTS "Psma" + IDS_INSTALLNEWFONT "&Naintalova nov psmo..." + + IDS_DEFAULT_CLUSTER_SIZE "Predvolen alokan vekos" //Default allocation size + IDS_COPY_OF "Kpia" //Copy of + + // There is no Windows program configured to open this type of file. + IDS_SHLEXEC_NOASSOC "Neexistuje iadny program nakonfigurovan tak, aby otvral tento typ sborov." + // Na otvranie tohto typu sboru nie je nakonfigurovan iadny program systmu Windows. +END diff --git a/dll/win32/shell32_new/lang/sl-SI.rc b/dll/win32/shell32_new/lang/sl-SI.rc new file mode 100644 index 00000000000..9789ec3841c --- /dev/null +++ b/dll/win32/shell32_new/lang/sl-SI.rc @@ -0,0 +1,756 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "O %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "V redu", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS so ustvarili:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Vnesite ime programa, mape, dokumenta ali spletne strani, in Wine ga (jo) bo odprl.", 12289, 36, 11, 182, 18 + LTEXT "&Odpri:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "V redu", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Preklii", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Pre&brskaj", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Datoteka" + IDS_SHV_COLUMN2 "Velikost" + IDS_SHV_COLUMN3 "Vrsta" + IDS_SHV_COLUMN4 "Spremenjena" + IDS_SHV_COLUMN5 "Atributi" + IDS_SHV_COLUMN6 "Tona velikost" + IDS_SHV_COLUMN7 "Prosto" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "Cut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Select Program" + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "Noben Okenski program ni nastavljen, da bi odpiral ta tip datotek." +END diff --git a/dll/win32/shell32_new/lang/sv-SE.rc b/dll/win32/shell32_new/lang/sv-SE.rc new file mode 100644 index 00000000000..4ddd5c36520 --- /dev/null +++ b/dll/win32/shell32_new/lang/sv-SE.rc @@ -0,0 +1,756 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Om %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS hade inte varit mjligt utan dessa personer:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Skriv namnet p ett program, en mapp eller ett dokument och wine kommer att ppna det fr dig.", 12289, 36, 11, 182, 18 + LTEXT "&ppna:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Avbryt", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Blddra...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Size" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modified" + IDS_SHV_COLUMN5 "Attributes" + IDS_SHV_COLUMN6 "Size" + IDS_SHV_COLUMN7 "Size available" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "Cut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Select Program" + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/tr-TR.rc b/dll/win32/shell32_new/lang/tr-TR.rc new file mode 100644 index 00000000000..633936f625a --- /dev/null +++ b/dll/win32/shell32_new/lang/tr-TR.rc @@ -0,0 +1,756 @@ +/* + * Copyright 2006 Fatih Ac + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "B&yk Simgeler", FCIDM_SHVIEW_BIGICON + MENUITEM "K&k Simgeler", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Ayrntl", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Grnm" + BEGIN + MENUITEM "B&yk Simgeler", FCIDM_SHVIEW_BIGICON + MENUITEM "K&k Simgeler", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Ayrntl", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "&Simgeleri Dzenle" + BEGIN + MENUITEM "&Ada Gre", 0x30 /* column 0 */ + MENUITEM "&Tre Gre", 0x32 /* column 2 */ + MENUITEM "&Boyuta Gre", 0x31 /* ... */ + MENUITEM "&Zamana Gre", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Otomatik Dzenle", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Izgaraya Uydur", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Yenile", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Yaptr", FCIDM_SHVIEW_INSERT + MENUITEM "Ksayol Yaptr", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "zellikler", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "A&ratr", FCIDM_SHVIEW_EXPLORE + MENUITEM "&A", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Kes", FCIDM_SHVIEW_CUT + MENUITEM "K&opyala", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Ksayol O&lutur", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Sil", FCIDM_SHVIEW_DELETE + MENUITEM "&Yeniden Adlandr", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&zellikler", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Dizine Gzat" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Tamam", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "ptal", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Dizine Gzat" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "Tamam", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "ptal", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "%s Hakknda" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "Tamam", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS' size sunan gelitiriciler:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Herhangi bir program, dizin, belge veya Internet kayna sein ve Wine sizin iin asn.", 12289, 36, 11, 182, 18 + LTEXT "&A:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "Tamam", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "ptal", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Gzat...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Dosya" + IDS_SHV_COLUMN2 "Boyut" + IDS_SHV_COLUMN3 "Tr" + IDS_SHV_COLUMN4 "Dzenlenme" + IDS_SHV_COLUMN5 "znitelikler" + IDS_SHV_COLUMN6 "Boyut" + IDS_SHV_COLUMN7 "Kullanlabilir Alan" + IDS_SHV_COLUMN8 "Ad" + IDS_SHV_COLUMN9 "Aklamalar" + IDS_SHV_COLUMN10 "Sahip" + IDS_SHV_COLUMN11 "Grup" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "zgn konum" + IDS_SHV_COLUMN_DELDATE "Silinme tarihi" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Masast" + IDS_MYCOMPUTER "Bilgisayarm" + IDS_RECYCLEBIN_FOLDER_NAME "p" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "B&yk Simgeler" + IDS_VIEW_SMALL "K&k Simgeler" + IDS_VIEW_LIST "&Liste" + IDS_VIEW_DETAILS "&Ayrntl" + IDS_SELECT "Se" + IDS_OPEN "A" + IDS_CREATELINK "Ksayol O&lutur" + IDS_COPY "K&opyala" + IDS_DELETE "&Sil" + IDS_PROPERTIES "&zellikler" + IDS_CUT "&Kes" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Yeni dizin oluturulamyor: Eriim engellendi." + IDS_CREATEFOLDER_CAPTION "Dizin oluturma srasnda hata" + IDS_DELETEITEM_CAPTION "Dosya silmeyi onayla" + IDS_DELETEFOLDER_CAPTION "Dizin silmeyi onayla" + IDS_DELETEITEM_TEXT "'%1' esini silmek istediinizden emin misiniz?" + IDS_DELETEMULTIPLE_TEXT "Bu %1 eyi silmek istediinizden emin misiniz?" + IDS_DELETESELECTED_TEXT "Seili eleri silmek istediinizden emin misiniz?" + IDS_TRASHITEM_TEXT "'%1' adl eyi pe gndermek istediinizden emin misiniz?" + IDS_TRASHFOLDER_TEXT "'%1' adl eyi ve tm ieriini pe gndermek istediinizden emin misiniz?" + IDS_TRASHMULTIPLE_TEXT "Bu %1 eyi pe gndermek istediinizden emin misiniz?" + IDS_CANTTRASH_TEXT "'%1' adl e pe gnderilemiyor. Tamamen silmek ister misiniz?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Dosya zerine Yazmay Onayla" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Yeniden Balat" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Oturumu Kapat" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programlar" + IDS_PERSONAL "Belgelerim" + IDS_FAVORITES "Sk Kullanlanlar" + IDS_STARTUP "Start Menu\\Programlar\\Balang" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "Belgelerim\\Mziim" + IDS_MYVIDEO "Belgelerim\\Vidyolarm" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Belgelerim\\Resimlerim" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Belgeler" + IDS_ADMINTOOLS "Start Menu\\Programlar\\Ynetimsel Aralar" + IDS_COMMON_MUSIC "Belgeler\\Mziim" + IDS_COMMON_PICTURES "Belgeler\\Resimlerim" + IDS_COMMON_VIDEO "Belgeler\\Videolarm" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Select Program" + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "Yeni" + FCIDM_SHVIEW_NEWFOLDER "Yeni &Dizin" + FCIDM_SHVIEW_NEWLINK "Yeni &Ksayol" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END diff --git a/dll/win32/shell32_new/lang/uk-UA.rc b/dll/win32/shell32_new/lang/uk-UA.rc new file mode 100644 index 00000000000..8cac82f07f1 --- /dev/null +++ b/dll/win32/shell32_new/lang/uk-UA.rc @@ -0,0 +1,769 @@ +/* + * Copyright 2004 Ilya Korniyko + * 2007-2008 Artem Reznikov + * 2010 Igor Paliychuk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Великі значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Дрібні значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "Спис&ок", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробиці", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Вигляд" + BEGIN + MENUITEM "&Великі значки", FCIDM_SHVIEW_BIGICON + MENUITEM "&Дрібні значки", FCIDM_SHVIEW_SMALLICON + MENUITEM "Спис&ок", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Подробиці", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "&Упорядкувати значки" + BEGIN + MENUITEM "за &ім'ям", 0x30 /* column 0 */ + MENUITEM "за &типом", 0x32 /* column 2 */ + MENUITEM "за &розміром", 0x31 /* ... */ + MENUITEM "за &датою", 0x33 + MENUITEM SEPARATOR + MENUITEM "&автоматично", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Вирівняти значки", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Оновити", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Вставити", FCIDM_SHVIEW_INSERT + MENUITEM "Вставити ярлик", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Властивості", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Провідник", FCIDM_SHVIEW_EXPLORE + MENUITEM "В&ідкрити", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Вирізати", FCIDM_SHVIEW_CUT + MENUITEM "&Копіювати", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Створити &ярлик", FCIDM_SHVIEW_CREATELINK + MENUITEM "В&идалити", FCIDM_SHVIEW_DELETE + MENUITEM "Перей&менувати", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "В&ластивості", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Огляд тек" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Огляд тек" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Тека:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Створити &теку", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Повідомлення" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Так", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Так для &всіх", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ні", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Скасувати", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Про %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Версія " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "Ця версія ReactOS зареєстрована на:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Доступна фізична пам'ять:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "OK", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Розробники ReactOS:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Виконати" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Введіть ім'я програми, теки, документа або ресурсу Інтернету, і ReactOS відкриє їх.", 12289, 36, 11, 182, 18 + LTEXT "&Відкрити:", 12305, 3, 39, 32, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "О&гляд...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ярлик" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Тип об'єкта:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Розташування:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "О&б'єкт:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Робоча папка:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "&Швидкий виклик:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "&Вікно:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "&Примітка:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "З&найти об'єкт...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Змінити значок...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Додатково...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Додаткові властивості" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Виберіть потрібні властивості для цього ярлика.", -1, 5, 30, 210, 10 + CHECKBOX "Запускати з іншими обліковими даними", 14000, 25, 50, 150, 10 + LTEXT "Цей параметр дозволяє використовувати цей ярлик від імені іншого користувача або продовжувати роботу від свого імені, що захищає комп'ютер й дані від несанкціонованих дій програми.", -1, 50, 60, 175, 40 + CHECKBOX "Запускати в окремій області пам'яті", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Скасувати", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Загальні" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Тип файлу:", 14004, 8, 35, 50, 10 + LTEXT "Тека", 14005, 68, 35, 160, 10 + LTEXT "Розташування:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Розмір:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Містить:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Створено:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "Лише &читання", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "При&хована", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Загальні" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Тип файлу:", 14004, 8, 35, 50, 10 + LTEXT "Файл", 14005, 68, 35, 160, 10 + LTEXT "Додаток:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Розташування:", 14008, 8, 72, 50, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Розмір:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Створено:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Змінено:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Відкрито:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Атрибути:", 14020, 8, 189, 45, 10 + CHECKBOX "Лише &читання", 14021, 58, 189, 67, 10 + CHECKBOX "При&хований", 14022, 126, 189, 50, 10 + CHECKBOX "&Архівний", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Версія" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Версія файлу: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Опис: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Авторські права: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Додаткові відомості: ", 14006, 6, 70, 222, 115 + LTEXT "Ім'я елемента: ", 14007, 13, 82, 50, 10 + LTEXT "Значення: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Загальні" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Тип:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "Файлова система:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Зайнято:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Доступно:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Місткість:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Диск %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Очищення диску", 14010, 178, 175, 60, 15, WS_TABSTOP + CHECKBOX "Стискати диск для заощадження місця", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Дозволити індексування диску для прискорення пошуку", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Сервіс" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Перевірка диску", -1, 5, 5, 230, 60 + LTEXT "Перевірка тому на наявність помилок.", -1, 40, 25, 160, 20 + PUSHBUTTON "Виконати перевірку...", 14000, 125, 45, 100, 15, WS_TABSTOP + GROUPBOX "Дефрагментація диску", -1, 5, 65, 230, 60 + LTEXT "Дефрагментація файлів на цьому томі", -1, 40, 85, 160, 20 + PUSHBUTTON "Виконати дефрагментацію...", 14001, 125, 105, 100, 15, WS_TABSTOP + GROUPBOX "Архівація", -1, 5, 130, 230, 60 + LTEXT "Резервне копіювання файлів на цьому томі.", -1, 40, 150, 160, 20 + PUSHBUTTON "Виконати архівацію...", 14002, 125, 170, 100, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Обладнання" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Запуск від імені іншого користувача" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Чий обліковий запис використовувати для запуску цієї програми?", -1, 10, 20, 220, 20 + CHECKBOX "Поточний користувач %s", 14000, 10, 45, 150, 10 + LTEXT "Захистити мій комп'ютер і мої дані від несанкціонованої діяльності програм", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "Цей режим може захистити ваш комп'ютер і дані від вірусів, але програма може працювати неправильно.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "Указаний користувач:", 14002, 10, 100, 90, 10 + LTEXT "Ім'я користувача:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Пароль:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Скасувати", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Властивості Кошика" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Налаштування для вибраного розташування", -1, 10, 72, 220, 70 + RADIOBUTTON "&Особливий розмір:", 14001, 20, 90, 92, 10, WS_TABSTOP + EDITTEXT 14002, 120, 100, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "&Максимальний розмір(Мб):", -1, 20, 105, 100, 10 + RADIOBUTTON "Не переміщ&увати файли до кошика, а видаляти їх остаточно відразу", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "Пока&зувати діалог підтвердження видалення", 14004, 20, 155, 165, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Вибір програми" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Виберіть програму, за допомогою якої слід відкрити цей файл.", -1, 44, 12, 234, 10 + LTEXT "Файл: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Програми", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "Завжд&и використовувати цю програму для файлів цього типу", 14003, 20, 193, 225, 10 + PUSHBUTTON "О&гляд...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Скасувати", 14006, 206, 236, 50, 14 +END + +IDD_SH_FILE_COPY DIALOGEX 0, 0, 264, 45 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Копіювання..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + PUSHBUTTON "Скасувати", 14002, 195, 14, 60, 16 + CONTROL "", 14000, "MSCTLS_PROGRESS32", 0, 8, 20, 170, 10 + LTEXT "Файл", 14001, 8, 6, 169, 10 +END + + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Загальні" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Завдання", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Показувати список типових завдань у теках", 14001, 40, 25, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Використовувати зви&чайні теки ReactOS", 14002, 40, 37, 149, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Огляд тек", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Відкривати папки в то&му самому вікні", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Відкрива&ти кожну папку в окремому вікні", 14005, 40, 82, 155, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Клацання мишею", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Від&кривати одиночним, виділяти вказівником", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Підкресл&ювати підписи значків", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Підкр&еслювати лише при наведенні", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Відкрив&ати подвійним, виділяти одиночним", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Стандартно", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Вигляд" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Вигляд тек", -1, 7, 10, 249, 60 +//ICON +LTEXT "Можна застосувати вигляд, який використовується для цієї теки (наприклад, ""Таблиця"" або ""Плитка""), до всіх тек.", -1, 60, 20, 180, 23 +PUSHBUTTON "&Застосувати до всіх тек", 14001, 58, 50, 84, 14, WS_TABSTOP +PUSHBUTTON "&Скид для всіх тек", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Додаткові параметри:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "&Стандартно", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Типи файлів" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Зареєстровані &типи файлів:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&Створити", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "В&идалити", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Подробиці для розширення '%s'", 14003, 7, 130, 249, 70 +LTEXT "Відкривати у:", -1, 12, 140, 48, 10 +//ICON +LTEXT "Додаток", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Змінити...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Файли з розширенням '%s' мають тип '%s'.\nЩоб змінити параметри, які впливатимуть\nна всі файли '%s', натисніть кнопку ""Додатково"".", 14007, 12, 155, 160, 30 +PUSHBUTTON "&Додатково", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Підтвердження заміни файлу" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Так", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Так для &всіх", 12807, 85, 122, 60, 14 + PUSHBUTTON "&Ні", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Ця папка вже містить файл з ім'ям '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "Ця папка вже містить доступний лише для читання файл з ім'ям '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Ця папка вже містить системний файл з ім'ям '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Замінити наявний файл", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(дата й розмір невідомі)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "на цей файл?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(дата й розмір невідомі)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Вихід із ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Ви дійсно бажаєте вийти із системи?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "В&ихід", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Вимкнення ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Ви дійсно бажаєте відключитися?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Вимкнення", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Автозапуск" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Вибері&ть тип вмісту, а потім дію, яка автоматично виконуватиметься в разі використання такого вмісту в цьому пристрої:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Дії", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Виберіть виконувану &дію:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Кожного ра&зу пропонувати вибір дії", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Відновити", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Мішаний вміст" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "На цьому диску або пристрої зберігається вміст декількох типів.", 1001, 32, 7, 191, 20 + LTEXT "Яку дію слід виконувати ReactOS?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Мішаний вміст" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS може виконувати одну й ту саму дію кожного разу, коли ви вставляєте диск або під'єднуєте пристрій із файлами цього типу:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "Яку дію слід виконувати ReactOS?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Завжди виконувати вибрану дію.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Автозапуск" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS може виконувати одну й ту саму дію кожного разу, коли ви під'єднуєте цей пристрій.", 1001, 32, 7, 190, 22 + LTEXT "&Яку дію слід виконувати ReactOS?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Завжди виконувати вибрану дію", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Скасувати", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Завершення роботи ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "Виберіть одну з таких можливостей?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Збереження сеансу з переведенням комп'ютера до режиму низького енергоспоживання зі збереженням даних у пам'яті. Якщо натиснути будь-яку клавішу або пересунути мишу, комп'ютер повернеться до звичайного режиму.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Скасувати", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Довідка", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Форматування" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Почати", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Закрити", IDCANCEL, 118, 198, 60, 14 + LTEXT "&Місткість:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&Файлова система", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Розмір кластера", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Мі&тка тому", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "&Способи форматування", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Швидке (очищення змісту)", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Використовувати стискання", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Перевірка диску" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Почати", IDOK, 53, 100, 60, 14 + GROUPBOX "Опції перевірки диску", -1, 7, 6, 179, 50 + PUSHBUTTON "Скасувати", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Виправити помилки файлової системи", 14000, 16, 15, 165, 10 + AUTOCHECKBOX "&Спробувати відновити погані сектори", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Зміна значка" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Ім'я файла:", -1, 7, 14, 208, 10 + PUSHBUTTON "О&гляд...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Значки:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Скасувати",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "Файл" + IDS_SHV_COLUMN2 "Розмір" + IDS_SHV_COLUMN3 "Тип" + IDS_SHV_COLUMN4 "Змінено" + IDS_SHV_COLUMN5 "Атрибути" + IDS_SHV_COLUMN6 "Розмір" + IDS_SHV_COLUMN7 "Вільний Розмір" + IDS_SHV_COLUMN8 "Ім'я" + IDS_SHV_COLUMN9 "Примітка" + IDS_SHV_COLUMN10 "Власник" + IDS_SHV_COLUMN11 "Група" + IDS_SHV_COLUMN12 "Ім'я файла" + IDS_SHV_COLUMN13 "Категорія" + IDS_SHV_COLUMN_DELFROM "Вихідне розташування" + IDS_SHV_COLUMN_DELDATE "Дата видалення" + IDS_SHV_COLUMN_FONTTYPE "Тип шрифту" + IDS_SHV_COLUMN_WORKGROUP "Робоча група" + IDS_SHV_NETWORKLOCATION "Мережне розташування" + IDS_SHV_COLUMN_DOCUMENTS "Документи" + IDS_SHV_COLUMN_STATUS "Стан" + IDS_SHV_COLUMN_COMMENTS "Примітки" + IDS_SHV_COLUMN_LOCATION "Розташування" + IDS_SHV_COLUMN_MODEL "Модель" + + /* special folders */ + IDS_DESKTOP "Робочий стіл" + IDS_MYCOMPUTER "Мій Комп'ютер" + IDS_RECYCLEBIN_FOLDER_NAME "Кошик" + IDS_CONTROLPANEL "Панель керування" + IDS_ADMINISTRATIVETOOLS "Адміністрування" + + /* context menus */ + IDS_VIEW_LARGE "&Великі значки" + IDS_VIEW_SMALL "&Дрібні значки" + IDS_VIEW_LIST "Спис&ок" + IDS_VIEW_DETAILS "&Подробиці" + IDS_SELECT "Ви&брати" + IDS_OPEN "Ві&дкрити" + IDS_CREATELINK "Створити &ярлик" + IDS_COPY "&Копіювати" + IDS_DELETE "В&идалити" + IDS_PROPERTIES "В&ластивості" + IDS_CUT "&Вирізати" + IDS_RESTORE "Відновити" + IDS_FORMATDRIVE "Форматувати..." + IDS_RENAME "Перейменувати" + IDS_INSERT "Вставити" + + IDS_CREATEFOLDER_DENIED "Не вдалося створити нову папку: Відмова у доступі." + IDS_CREATEFOLDER_CAPTION "Помилка при створенні нової папки" + IDS_DELETEITEM_CAPTION "Підтвердження вилучення файлу" + IDS_DELETEFOLDER_CAPTION "Підтвердження вилучення папки" + IDS_DELETEITEM_TEXT "Ви дійсно бажаєте видалити '%1'?" + IDS_DELETEMULTIPLE_TEXT "Ви дійсно бажаєте видалити ці %1 об'єкти(ів)?" + IDS_DELETESELECTED_TEXT "Ви дійсно бажаєте видалити ці об'єкти?" + IDS_TRASHITEM_TEXT "Ви дійсно бажаєте перемістити '%1' до кошика?" + IDS_TRASHFOLDER_TEXT "Ви дійсно бажаєте перемістити '%1' і весь її вміст до кошика?" + IDS_TRASHMULTIPLE_TEXT "Ви дійсно бажаєте перемістити ці об'єкти (%1 шт.) до кошика?" + IDS_CANTTRASH_TEXT "Об'єкт '%1' не можна перемістити до кошика. Бажаєте видалити його?" + IDS_OVERWRITEFILE_TEXT "Ця папка вже містить файл з ім'ям '%1'.\n\nБажаєте замінити його?" + IDS_OVERWRITEFILE_CAPTION "Підтвердження Перезапису Файлу" + IDS_OVERWRITEFOLDER_TEXT "Ця папка вже містить папку з ім'ям '%1'.\n\n"\ + "Якщо файли в папці призначення мають ті ж імена, що файли у вибраній папці,\n"\ + "вони будуть замінені. Ви все ще бажаєте перемістити або\n"\ + "скопіювати папку?" + + /* message box strings */ + IDS_RESTART_TITLE "Перезавантажити" + IDS_RESTART_PROMPT "Ви хочете перезавантажити систему?" + IDS_SHUTDOWN_TITLE "Вимкнути" + IDS_SHUTDOWN_PROMPT "Ви хочете вимкнути комп'ютер?" + IDS_LOGOFF_TITLE "Вихід з системи" + IDS_LOGOFF_PROMPT "Ви хочете вийти з системи?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "Мої документи" + IDS_FAVORITES "Обране" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "Надіслати" + IDS_STARTMENU "Головне меню" + IDS_MYMUSIC "Моя музика" + IDS_MYVIDEO "Мої відеозаписи" + IDS_DESKTOPDIRECTORY "Робочий стіл" + IDS_NETHOOD "Мережне оточення" + IDS_TEMPLATES "Шаблони" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "Принтери" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Мої малюнки" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Загальні документи" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Загальні документи\\Моя музика" + IDS_COMMON_PICTURES "Загальні документи\\Мої малюнки" + IDS_COMMON_VIDEO "Загальні документи\\Мої відеозаписи" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "Мережне оточення" + + IDS_NEWFOLDER "Нова папка" + + IDS_DRIVE_FIXED "Локальний диск" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Мережний диск" + + IDS_OPEN_WITH "Відкрити за допомогою" + IDS_OPEN_WITH_CHOOSE "Вибрати програму..." + + IDS_SHELL_ABOUT_AUTHORS "&Автори" + IDS_SHELL_ABOUT_BACK "< &Назад" + FCIDM_SHVIEW_NEW "Створити" + FCIDM_SHVIEW_NEWFOLDER "&Папку" + FCIDM_SHVIEW_NEWLINK "&Ярлик" + IDS_FOLDER_OPTIONS "Властивості теки" + IDS_RECYCLEBIN_LOCATION "Розташування Кошика" + IDS_RECYCLEBIN_DISKSPACE "Доступний простір" + IDS_EMPTY_BITBUCKET "Очистити Кошик" + IDS_PICK_ICON_TITLE "Вибрати значок" + IDS_PICK_ICON_FILTER "Файли значків(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Виконувані файли\0*.exe\0" + IDS_DIRECTORY "Папка" + IDS_VIRTUAL_DRIVER "Драйвер віртуального пристрою" + IDS_BAT_FILE "Пакетний файл ReactOS" + IDS_CMD_FILE "Командний скрипт ReactOS" + IDS_COM_FILE "Додаток Dos" + IDS_CPL_FILE "Елемент панелі керування" + IDS_CUR_FILE "Курсор" + IDS_DLL_FILE "Розширення додатку" + IDS_DRV_FILE "Драйвер пристрою" + IDS_EXE_FILE "Додаток" + IDS_FON_FILE "Файл шрифту" + IDS_TTF_FILE "Файл шрифту TrueType" + IDS_HLP_FILE "Файл довідки" + IDS_INI_FILE "Файл налаштувань" + IDS_LNK_FILE "Ярлик" + IDS_SYS_FILE "Системний файл" + + IDS_OPEN_VERB "Відкрити" + IDS_RUNAS_VERB "Запустити як " + IDS_EDIT_VERB "Змінити" + IDS_FIND_VERB "Пошук" + IDS_PRINT_VERB "Друк" + IDS_PLAY_VERB "Відтворити" + IDS_PREVIEW_VERB "Перегляд" + + IDS_FILE_FOLDER "%u файлів, %u папок" + IDS_PRINTERS "Принтери" + IDS_FONTS "Шрифти" + IDS_INSTALLNEWFONT "Інсталювати новий шрифт..." + + IDS_DEFAULT_CLUSTER_SIZE "Розмір кластера за замовчуванням" + IDS_COPY_OF "Копія" + + IDS_SHLEXEC_NOASSOC "Немає програми Windows, сконфігурованої для відкриття цього типу файлів." +END diff --git a/dll/win32/shell32_new/lang/zh-CN.rc b/dll/win32/shell32_new/lang/zh-CN.rc new file mode 100644 index 00000000000..aa54e3eecb6 --- /dev/null +++ b/dll/win32/shell32_new/lang/zh-CN.rc @@ -0,0 +1,745 @@ +/* + * (Simplified Chinese resources) + * (Դ) + * by zhangbing 2008 + */ + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED + + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "ͼ(&G)", FCIDM_SHVIEW_BIGICON + MENUITEM "Сͼ(&M)", FCIDM_SHVIEW_SMALLICON + MENUITEM "б(&L)", FCIDM_SHVIEW_LISTVIEW + MENUITEM "ϸϢ(&D)", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "鿴(&V)" + BEGIN + MENUITEM "ͼ(&G)", FCIDM_SHVIEW_BIGICON + MENUITEM "Сͼ(&M)", FCIDM_SHVIEW_SMALLICON + MENUITEM "б(&L)", FCIDM_SHVIEW_LISTVIEW + MENUITEM "ϸϢ(&D)", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "ͼ(&I)" + BEGIN + MENUITEM "(&N)", 0x30 /* column 0 */ + MENUITEM "(&T)", 0x32 /* column 2 */ + MENUITEM "С(&S)", 0x31 /* ... */ + MENUITEM "޸ʱ(&D)", 0x33 + MENUITEM SEPARATOR + MENUITEM "Զ(&D)", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "ͼ", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "ˢ", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "ճ", FCIDM_SHVIEW_INSERT + MENUITEM "ճݷʽ", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "(&O)", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "(&U)", FCIDM_SHVIEW_CUT + MENUITEM "(&C)", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "ݷʽ(&L)", FCIDM_SHVIEW_CREATELINK + MENUITEM "ɾ(&D)", FCIDM_SHVIEW_DELETE + MENUITEM "(&R)", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "(&P)", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "ȷ", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "ȡ", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "ȷ", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "ȡ", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION " %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "ȷ", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS was brought to you by:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Ŀ¼ļInternetԴReactOSΪ", 12289, 36, 11, 182, 18 + LTEXT "(&O):", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "ȷ", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "ȡ", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "(&B)...", 12288, 170, 63, 50, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "ȷ", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "ȷ", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "ȡ", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "ȷ", 14005, 150, 236, 50, 14 + PUSHBUTTON "ȡ", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "ȡ", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "ȡ", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "ȡ", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "ȷ", IDOK, 96, 186, 60, 14 + PUSHBUTTON "ȡ", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "ȷ", IDOK, 96, 185, 60, 14 + PUSHBUTTON "ȡ", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "ȷ", IDOK, 94, 160, 60, 14 + PUSHBUTTON "ȡ", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "ȷ", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "ȡ", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "ʽ" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "ʼ(&S)", IDOK, 53, 198, 60, 14 + PUSHBUTTON "ر(&C)", IDCANCEL, 118, 198, 60, 14 + LTEXT "(&P):", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "ļϵͳ(&F)", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "䵥ԪС(&A)", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "(&L)", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "ʽѡ(&O)", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "ٸʽ(&Q)", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "ѹ(&E)", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "ͼ" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "ļ:", -1, 7, 14, 208, 10 + PUSHBUTTON "...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "ȷ",IDOK, 107, 181,50, 14 + PUSHBUTTON "ȡ",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE DISCARDABLE +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "ļ" + IDS_SHV_COLUMN2 "С" + IDS_SHV_COLUMN3 "" + IDS_SHV_COLUMN4 "޸" + IDS_SHV_COLUMN5 "" + IDS_SHV_COLUMN6 "ʹÿռ" + IDS_SHV_COLUMN7 "ʣռ" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "" + IDS_MYCOMPUTER "ҵĵ" + IDS_RECYCLEBIN_FOLDER_NAME "վ" + IDS_CONTROLPANEL "" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "ͼ(&G)" + IDS_VIEW_SMALL "Сͼ(&M)" + IDS_VIEW_LIST "б(&L)" + IDS_VIEW_DETAILS "ϸϢ(&D)" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "ݷʽ(&L)" + IDS_COPY "(&C)" + IDS_DELETE "ɾ(&D)" + IDS_PROPERTIES "(&P)" + IDS_CUT "(&U)" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "" + IDS_RESTART_PROMPT "Ƿϵͳ?" + IDS_SHUTDOWN_TITLE "ػ" + IDS_SHUTDOWN_PROMPT "Ƿرϵͳ?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "ҵĵ" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "ھ" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "򿪷ʽ" + IDS_OPEN_WITH_CHOOSE "ѡ" + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "½" + FCIDM_SHVIEW_NEWFOLDER "ļ(&F)" + FCIDM_SHVIEW_NEWLINK "ݷʽ(&L)" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END + diff --git a/dll/win32/shell32_new/lang/zh-TW.rc b/dll/win32/shell32_new/lang/zh-TW.rc new file mode 100644 index 00000000000..fcf7abf9f7b --- /dev/null +++ b/dll/win32/shell32_new/lang/zh-TW.rc @@ -0,0 +1,759 @@ +/* + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL +#pragma code_page(936) /* FIXME: default for CHINESE_TRADITIONAL is 950 */ + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* shellview background menu */ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* shellview item menu */ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", 1, 60, 175, 60, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 125, 175, 60, 15, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 4, 40, 180, 120 +END + +SHNEWBRSFORFOLDER_MSGBOX DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 15, 40, 218, 196 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "", IDD_TITLE, 10, 8, 198, 24 + LTEXT "", IDD_STATUS, 10, 25, 198, 12 + LTEXT "Folder:", IDD_FOLDER, 10, 152, 40, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP, 12, 38, 194, 105 + EDITTEXT IDD_FOLDERTEXT, 46, 150, 160, 14, WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Make New Folder", IDD_MAKENEWFOLDER, 12, 174, 77, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 102, 174, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 156, 174, 50, 14, WS_GROUP | WS_TABSTOP +END + +SHELL_YESTOALL_MSGBOX DIALOGEX 200, 100, 280, 90 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Message" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 34, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Yes to &all", IDD_YESTOALL, 92, 69, 65, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 162, 69, 53, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Cancel", IDCANCEL, 220, 69, 53, 14, WS_GROUP | WS_TABSTOP + ICON "", IDD_ICON, 10, 10, 16, 16 + LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 +END + +IDD_SHELL_ABOUT DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 275, 198 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "P %s" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_SHELL_ABOUT_ICON, 7, 55, 21, 20 + LTEXT "", IDC_SHELL_ABOUT_APPNAME, 35, 55, 200, 10 + LTEXT "Version " KERNEL_VERSION_STR " (" KERNEL_VERSION_BUILD_STR ")", IDC_STATIC, 35, 65, 235, 10 + LTEXT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT, IDC_STATIC, 35, 75, 210, 10 + LTEXT "", IDC_SHELL_ABOUT_OTHERSTUFF, 35, 90, 180, 20 + LTEXT "This ReactOS version is registered to:", IDC_STATIC, 35, 115, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_USERNAME, 45, 125, 180, 10 + LTEXT "", IDC_SHELL_ABOUT_REG_ORGNAME, 45, 135, 180, 10 + LTEXT "", IDC_STATIC, 35, 147, 235, 1, SS_ETCHEDHORZ + LTEXT "Installed physical memory:", IDC_STATIC, 35, 152, 130, 10 + LTEXT "", IDC_SHELL_ABOUT_PHYSMEM, 167, 152, 88, 10 + DEFPUSHBUTTON "_", IDOK, 220, 178, 50, 14 + + PUSHBUTTON "", IDC_SHELL_ABOUT_AUTHORS, 5, 178, 70, 14 +END + +IDD_SHELL_ABOUT_AUTHORS DIALOGEX MOVEABLE DISCARDABLE 35, 90, 235, 85 +STYLE DS_SHELLFONT | WS_CHILD +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS was brought to you by:", IDC_STATIC, 0, 0, 180, 10 + LISTBOX IDC_SHELL_ABOUT_AUTHORS_LISTBOX, 0, 10, 165, 75 +END + +SHELL_RUN_DLG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 36, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 98, 63, 59, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 160, 63, 59, 14, WS_TABSTOP +END + +SHELL_GENERAL_SHORTCUT_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Shortcut" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 4, 30, 30, WS_VISIBLE + LTEXT "Target type:", 14004, 8, 38, 64, 10 + LTEXT "", 14005, 78, 38, 142, 10 + LTEXT "Target location:", 14006, 8, 58, 64, 10 + LTEXT "", 14007, 79, 58, 141, 10 + LTEXT "Target:", 14008, 8, 77, 45, 10 + EDITTEXT 14009, 79, 75, 150, 14, ES_AUTOHSCROLL + LTEXT "&Start in:", 14010, 8, 96, 57, 10 + EDITTEXT 14011, 79, 94, 150, 14, ES_AUTOHSCROLL + LTEXT "Shortcut &key:", 14014, 8, 115, 57, 10 + EDITTEXT 14015, 79, 112, 150, 14, ES_LEFT + LTEXT "Run:", 14016, 8, 134, 57, 10 + EDITTEXT 14017, 79, 131, 150, 14, ES_AUTOHSCROLL + LTEXT "C&omment:", 14018, 8, 152, 57, 10 + EDITTEXT 14019, 79, 149, 150, 14, ES_AUTOHSCROLL + PUSHBUTTON "&Find Target...", 14020, 9, 172, 70, 14, ES_LEFT + PUSHBUTTON "&Change Icon...", 14021, 84, 172, 70, 14, ES_LEFT + PUSHBUTTON "A&dvanced...", 14022, 159, 172, 70, 14, ES_LEFT +END + +SHELL_EXTENDED_SHORTCUT_DLG DIALOGEX 0, 0, 230, 150 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Extended Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Choose the advanced properties you want for this shortcut.", -1, 5, 30, 210, 10 + CHECKBOX "Run with different credentials", 14000, 25, 50, 150, 10 + LTEXT "This option can allow you to run the this shortcut as another user, or continue as yourself while protecting your computer and data from unauthorized program activity.", -1, 50, 60, 175, 40 + CHECKBOX "Run in seperate memory space", 14001, 25, 100, 90, 10, WS_DISABLED + PUSHBUTTON "OK", 1, 63, 124, 50, 15, WS_VISIBLE + PUSHBUTTON "Abort", 2, 120, 124, 50, 15, WS_VISIBLE +END + +SHELL_FOLDER_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "Folder", 14005, 68, 35, 160, 10 + LTEXT "Location:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 315, 10 + LTEXT "Size:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Contains:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + AUTOCHECKBOX "&Read-only", 14021, 45, 150, 67, 10 + AUTOCHECKBOX "&Hidden", 14022, 126, 150, 50, 10 +END + +SHELL_FILE_GENERAL_DLG DIALOGEX 0, 0, 240, 205 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON "", 14000, 10, 3, 30, 30, WS_VISIBLE + EDITTEXT 14001, 70, 9, 158, 14, ES_LEFT | ES_READONLY + LTEXT "Type of file:", 14004, 8, 35, 50, 10 + LTEXT "File", 14005, 68, 35, 160, 10 + LTEXT "Opens with:", 14006, 8, 53, 50, 10 + LTEXT "", 14007, 68, 53, 160, 10 + LTEXT "Location:", 14008, 8, 72, 45, 10 + LTEXT "", 14009, 68, 72, 315, 10 + LTEXT "Size:", 14010, 8, 93, 45, 10 + LTEXT "", 14011, 68, 93, 160, 10 + LTEXT "Created:", 14014, 8, 118, 45, 10 + LTEXT "", 14015, 68, 118, 160, 10 + LTEXT "Modified:", 14016, 8, 140, 45, 10 + LTEXT "", 14017, 68, 140, 160, 10 + LTEXT "Accessed:", 14018, 8, 160, 45, 10 + LTEXT "", 14019, 68, 160, 160, 10 + LTEXT "Attributes:", 14020, 8, 189, 45, 10 + CHECKBOX "&Read-only", 14021, 58, 189, 67, 10 + CHECKBOX "&Hidden", 14022, 126, 189, 50, 10 + CHECKBOX "&Archive", 14023, 181, 189, 49, 10 +END + +SHELL_FILE_VERSION_DLG DIALOGEX 0, 0, 235, 215 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Version" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "File version: ", 14000, 10, 10, 55, 10 + LTEXT "", 14001, 77, 10, 152, 10 + LTEXT "Description: ", 14002, 10, 27, 45, 10 + LTEXT "", 14003, 77, 27, 152, 10 + LTEXT "Copyright: ", 14004, 10, 46, 66, 10 + LTEXT "", 14005, 77, 46, 152, 10 + GROUPBOX "Other version information: ", 14006, 6, 70, 222, 115 + LTEXT "Item name: ", 14007, 13, 82, 50, 10 + LTEXT "Value: ", 14008, 112, 82, 45, 10 + LISTBOX 14009, 12, 94, 94, 83, LBS_STANDARD | WS_TABSTOP | LBS_NOTIFY + EDITTEXT 14010, 112, 93, 109, 83, ES_LEFT | WS_BORDER | WS_VSCROLL | WS_GROUP | ES_MULTILINE | ES_READONLY +END + +DRIVE_GENERAL_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + EDITTEXT 14000, 40, 20, 190, 14, ES_LEFT|WS_BORDER|WS_GROUP + LTEXT "Type:", -1, 15, 55, 40, 10 + LTEXT "", 14001, 110, 55, 100, 10 + + LTEXT "File system:", -1, 15, 70, 100, 10 + LTEXT "", 14002, 110, 70, 100, 10 + + CONTROL "", 14013, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 90, 10, 10 + LTEXT "Used space:", -1, 25, 90, 120, 10 + LTEXT "", 14003, 110, 90, 120, 10 + LTEXT "", 14004, 200, 90, 40, 10 + + CONTROL "", 14014, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 5, 105, 10, 10 + LTEXT "Free space:", -1, 25, 105, 70, 10 + LTEXT "", 14005, 110, 105, 120, 10 + LTEXT "", 14006, 200, 105, 40, 10 + + LTEXT "Capacity:", -1, 25, 125, 80, 10 + LTEXT "", 14007, 110, 125, 120, 10 + LTEXT "", 14008, 200, 125, 40, 10 + + CONTROL "", 14015, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 20, 140, 200, 20 + + LTEXT "Drive %s", 14009, 100, 170, 40, 10 + PUSHBUTTON "Disk Cleanup", 14010, 180, 175, 50, 15, WS_TABSTOP + CHECKBOX "Compress drive to save disk space", 14011, 15, 205, 180, 10, WS_DISABLED + CHECKBOX "Allow Indexing Service to index this disk for fast file searching", 14012, 15, 220, 200, 10, WS_DISABLED +END + +DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Tools" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Error-checking", -1, 5, 5, 230, 60 + LTEXT "This option will check the volume for\nerrors.", -1, 40, 25, 160, 20 + PUSHBUTTON "Check Now...", 14000, 130, 45, 90, 15, WS_TABSTOP + GROUPBOX "Defragmentation", -1, 5, 65, 230, 60 + LTEXT "This option will defragment files on the volume", -1, 40, 85, 160, 20 + PUSHBUTTON "Defragment Now...", 14001, 130, 105, 90, 15, WS_TABSTOP + GROUPBOX "Backup", -1, 5, 130, 230, 60 + LTEXT "This option will back up files on the volume.", -1, 40, 150, 160, 20 + PUSHBUTTON "Backup Now...", 14002, 130, 170, 90, 15, WS_TABSTOP +END + +DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Hardware" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +END + +RUN_AS_DIALOG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Run As" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Which user account do you want to use to run this program?", -1, 10, 20, 220, 20 + CHECKBOX "Current User %s", 14000, 10, 45, 150, 10 + LTEXT "Protect my computer and data from unauthorized program activity", -1, 25, 57, 200, 10, WS_DISABLED + CHECKBOX "This option can prevent computer viruses from harming your computer or personal data, but selecting it might cause the program to function improperly.", 14001, 25, 68, 200, 30, WS_DISABLED | BS_MULTILINE + CHECKBOX "The following user:", 14002, 10, 100, 90, 10 + LTEXT "User name:", -1, 20, 118, 54, 10 + COMBOBOX 14003, 75, 115, 100, 15, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + + PUSHBUTTON "...", 14004, 180, 115, 30, 14, WS_TABSTOP + LTEXT "Password:", -1, 20, 143, 53, 10 + EDITTEXT 14005, 74, 140, 100, 14, ES_LEFT | WS_BORDER | WS_GROUP + PUSHBUTTON "...", 14006, 180, 140, 30, 14, WS_TABSTOP + PUSHBUTTON "OK", 14007, 57, 170, 60, 14, WS_TABSTOP + PUSHBUTTON "Cancel", 14008, 122, 170, 60, 14, WS_TABSTOP +END + +BITBUCKET_PROPERTIES_DLG DIALOGEX 0, 0, 240, 190 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Recycle Bin Properties" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 + RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP + EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER + LTEXT "M&aximum size(MB):", -1, 20, 105, 70, 10 + RADIOBUTTON "Do not move files to the &Recycle Bin. Remove files immediately when deleted.", 14003, 20, 117, 170, 20, BS_MULTILINE | WS_TABSTOP + AUTOCHECKBOX "&Display delete confirmation dialog", 14004, 20, 155, 140, 10, WS_TABSTOP +END + +OPEN_WITH_PROGRAMM_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Open With" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + ICON IDI_SHELL_OPEN_WITH, -1, 8, 12, 21, 20 + LTEXT "Choose the program you want to use to open this file:", -1, 44, 12, 211, 10 + LTEXT "File: ", 14001, 44, 25, 188, 10 + GROUPBOX "&Programs", -1, 7, 42, 249, 187 + LISTBOX 14002, 16 ,57, 230, 130, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, WS_EX_STATICEDGE + AUTOCHECKBOX "&Always use the selected program to open this kind of file", 14003, 20, 193, 225, 10 + PUSHBUTTON "&Browse...", 14004, 198, 207, 50, 14 + PUSHBUTTON "OK", 14005, 150, 236, 50, 14 + PUSHBUTTON "Cancel", 14006, 206, 236, 50, 14 +END + +FOLDER_OPTIONS_GENERAL_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Tasks", -1, 7, 10, 249, 45 + ICON "", 30109, 14, 25, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Show common tasks in &folders", 14001, 40, 25, 120, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Use ReactOS class&ic folders", 14002, 40, 37, 120, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Browse folders", -1, 7, 60, 249, 45, WS_TABSTOP + ICON "", 30110, 14, 70, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "Open each folder in the sa&me window", 14004, 40, 70, 140, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Open each folder in its own &window", 14005, 40, 82, 140, 10, WS_TABSTOP | WS_GROUP + GROUPBOX "Click items as follows", -1, 7, 110, 249, 60 + ICON "", 30111, 14, 120, 21, 20, SS_REALSIZECONTROL + AUTORADIOBUTTON "&Single-click to open an item (point to select)", 14007, 40, 120, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles consistent with my &browser", 14008, 50, 132, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Underline icon titles only when I &point at them", 14009, 50, 144, 170, 10, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "&Double-click to open an item (single-click to select)", 14010, 40, 156, 170, 10, WS_TABSTOP | WS_GROUP + PUSHBUTTON "&Restore Defaults", 14011, 180, 180, 60, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_VIEW_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "View" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +GROUPBOX "Folder views", -1, 7, 10, 249, 60 +//ICON +LTEXT "You can apply the view(such as Details or Tiles) that\nyou are using for this folder to all folders.", -1, 60, 20, 180, 20 +PUSHBUTTON "Apply to A&ll Folders", 14001, 60, 50, 80, 14, WS_TABSTOP +PUSHBUTTON "&Reset All Folders", 14002, 150, 50, 80, 14, WS_TABSTOP +LTEXT "Advanced settings:", -1, 7, 80, 100, 10 +CONTROL "", 14003, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 90, 249, 120 +PUSHBUTTON "Restore &Defaults", 14004, 180, 210, 80, 14, WS_TABSTOP +END + +FOLDER_OPTIONS_FILETYPES_DLG DIALOGEX 0, 0, 264, 256 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "File Types" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN +LTEXT "Registered file &types:", -1, 7, 10, 70, 10 +CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 7, 20, 249, 80 +PUSHBUTTON "&New", 14001, 120, 110, 50, 14, WS_TABSTOP +PUSHBUTTON "&Delete", 14002, 180, 110, 50, 14, WS_TABSTOP +GROUPBOX "Details for '%s' extension", 14003, 7, 130, 249, 70 +LTEXT "Opens with:", -1, 12, 140, 40, 10 +//ICON +LTEXT "Appname", 14005, 100, 140, 40, 10 +PUSHBUTTON "&Change...", 14006, 180, 140, 50, 14, WS_TABSTOP +LTEXT "Files with extension '%s' are of type '%s'. To\nchange settings that affect all '%s' files, click\nAdvanced.", 14007, 12, 155, 160, 30 +PUSHBUTTON "Ad&vanced", 14008, 180, 175, 50, 14, WS_TABSTOP +END + +CONFIRM_FILE_REPLACE_DLG DIALOGEX 0, 0, 282, 143 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Confirm File Replace" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Yes", IDYES, 20, 122, 60, 14 + PUSHBUTTON "Yes to &All", 12807, 85, 122, 60, 14 + PUSHBUTTON "&No", IDNO, 150, 122, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 215, 122, 60, 14 + ICON 146, -1, 11, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "This folder already contains a file named '%2'.", 12291, 44, 10, 231, 22, SS_NOPREFIX + LTEXT "This folder already contains a read-only file named '%2'.", 12292, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "This folder already contains a system file named '%2'.", 12293, 41, 10, 222, 22, SS_NOPREFIX + LTEXT "Would you like to replace the existing file", -1, 44, 35, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12302, 79, 51, 198, 20, SS_NOPREFIX + ICON "", 12300, 50, 49, 21, 20, SS_REALSIZECONTROL + LTEXT "with this one?", -1, 44, 75, 228, 10, SS_NOPREFIX + LTEXT "(unknown date and size)", 12303, 79, 91, 198, 20, SS_NOPREFIX + ICON "", 12301, 50, 89, 21, 20, SS_REALSIZECONTROL +END + +LOGOFF_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Log Off ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 45, 14344, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to log off?", -1, 43, 11, 140, 22 + DEFPUSHBUTTON "&Log Off", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 122, 40, 60, 14 +END + +DISCONNECT_DLG DIALOGEX 0, 0, 190, 60 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Disconnect ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 49, 14346, 10, 10, 21, 20, SS_REALSIZECONTROL + LTEXT "Are you sure you want to disconnect?", -1, 49, 12, 137, 23 + DEFPUSHBUTTON "&Disconnect", IDOK, 57, 40, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 123, 40, 60, 14 +END + +AUTOPLAY1_DLG DIALOGEX 0, 0, 227, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "AutoPlay" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "&Select a content type, then choose an action for ReactOS to perform automatically when that type is used in this device:", 1000, 7, 7, 215, 20 + CONTROL "", 1001, "COMBOBOXEX32", WS_TABSTOP | 0x00000043, 7, 27, 212, 200 + GROUPBOX "Actions", -1, 7, 45, 212, 146 + AUTORADIOBUTTON "Select an action to &perform:", 1005, 14, 54, 202, 10, WS_GROUP + CONTROL "LIST2", 1002, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 22, 66, 192, 107 + AUTORADIOBUTTON "Prompt me each time to &choose an action", 1006, 14, 177, 202, 10 + PUSHBUTTON "&Restore Defaults", 1008, 108, 197, 110, 14, WS_DISABLED +END + +MIXED_CONTENT1_DLG DIALOGEX 0, 0, 227, 207 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "This disk or device contains more than one type of content.", 1001, 32, 7, 191, 20 + LTEXT "What do you want ReactOS to do?", 1002, 32, 31, 188, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 188, 139 + DEFPUSHBUTTON "OK", IDOK, 96, 186, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 186, 60, 14 +END + +MIXED_CONTENT2_DLG DIALOGEX 0, 0, 227, 206 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Mixed Content" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you insert a disk or connect a device with this kind of file:", 1001, 30, 7, 193, 20 + ICON "", 1005, 32, 27, 11, 10, SS_REALSIZECONTROL + EDITTEXT 1006, 49, 28, 177, 14, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP + LTEXT "What do you want ReactOS to do?", 1002, 32, 41, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 55, 188, 112 + AUTOCHECKBOX "Always do the selected action.", 1004, 32, 171, 190, 10 + DEFPUSHBUTTON "OK", IDOK, 96, 185, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 160, 185, 60, 14 +END + +AUTOPLAY2_DLG DIALOGEX 0, 0, 227, 181 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION +CAPTION "Autoplay" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", 1000, 5, 7, 21, 20 + LTEXT "ReactOS can perform the same action each time you connect this device.", 1001, 32, 7, 190, 22 + LTEXT "&What do you want ReactOS to do?", 1002, 32, 31, 190, 8 + CONTROL "", 1003, "SYSLISTVIEW32", WS_BORDER | WS_TABSTOP | 0x0000C04D, 32, 43, 187, 96 + AUTOCHECKBOX "&Always perform the selected action", 1004, 32, 143, 190, 8 + DEFPUSHBUTTON "OK", IDOK, 94, 160, 60, 14 + PUSHBUTTON "Cancel", IDCANCEL, 159, 160, 60, 14 +END + +SHUTDOWN_DLG DIALOGEX 0, 0, 211, 103 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION +CAPTION "Shut Down ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + ICON 8240, -1, 6, 6, 21, 20, SS_REALSIZECONTROL | WS_GROUP + LTEXT "What do you want the computer to do?", -1, 39, 7, 167, 10 + COMBOBOX 8224, 39, 20, 165, 200, CBS_DROPDOWNLIST | WS_VSCROLL + LTEXT "Maintains your session, keeping the computer running on low power with data still in memory. The computer wakes up when you press a key or move the mouse.", 8225, 39, 40, 167, 37 + DEFPUSHBUTTON "OK", 1, 7, 82, 60, 14, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, 75, 82, 60, 14 + PUSHBUTTON "&Help", IDHELP, 144, 82, 60, 14 +END + +FORMAT_DLG DIALOGEX 50, 50, 184, 218 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Format" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&Start", IDOK, 53, 198, 60, 14 + PUSHBUTTON "&Close", IDCANCEL, 118, 198, 60, 14 + LTEXT "Ca&pacity:", -1, 7, 6, 169, 9 + COMBOBOX 28673, 7, 17, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "&File system", -1, 7, 35, 170, 9 + COMBOBOX 28677, 7, 46, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + CONTROL "", 28678, "MSCTLS_PROGRESS32", 0, 7, 181, 170, 8 + LTEXT "&Allocation unit size", -1, 7, 64, 170, 9 + COMBOBOX 28680, 7, 75, 170, 200, CBS_DROPDOWNLIST | WS_VSCROLL | NOT WS_TABSTOP + LTEXT "Volume &label", -1, 7, 93, 170, 9 + EDITTEXT 28679, 7, 103, 170, 13, ES_AUTOHSCROLL + GROUPBOX "Format &options", 4610, 7, 121, 170, 49 + AUTOCHECKBOX "&Quick Format", 28674, 16, 135, 155, 10 + AUTOCHECKBOX "&Enable Compression", 28675, 16, 152, 155, 10 +END + +CHKDSK_DLG DIALOGEX 50, 50, 194, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Check Disk" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Start", IDOK, 53, 100, 60, 14 + GROUPBOX "Check disk options", -1, 7, 6, 179, 50 + PUSHBUTTON "Cancel", IDCANCEL, 118, 100, 60, 14 + AUTOCHECKBOX "Automatically fix file system errors", 14000, 16, 15, 155, 10 + AUTOCHECKBOX "&Scan for and attempt recovery of bad sectors", 14001, 16, 30, 165, 10 + CONTROL "", 14002, "MSCTLS_PROGRESS32", 16, 7, 60, 170, 8 + LTEXT "", 14003, 60, 80, 170, 10 +END + +IDD_PICK_ICON_DIALOG DIALOGEX 0, 0, 237, 204 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION +CAPTION "Change Icon" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Filename:", -1, 7, 14, 208, 10 + PUSHBUTTON "Browse...",IDC_BUTTON_PATH, 148, 24,67,14 + EDITTEXT IDC_EDIT_PATH, 6, 24, 135, 15, ES_AUTOHSCROLL + LTEXT "Icons:", -1, 7, 47, 208, 10 + LISTBOX IDC_PICKICON_LIST,7,57,208,119,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE + DEFPUSHBUTTON "OK",IDOK, 107, 181,50, 14 + PUSHBUTTON "Cancel",IDCANCEL, 167, 181, 50, 14 +END + +STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL +BEGIN + /* columns in the shellview */ + IDS_SHV_COLUMN1 "n" + IDS_SHV_COLUMN2 "С" + IDS_SHV_COLUMN3 "" + IDS_SHV_COLUMN4 "޸" + IDS_SHV_COLUMN5 "" + IDS_SHV_COLUMN6 "ʹÿg" + IDS_SHV_COLUMN7 "ʣNg" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" + IDS_SHV_COLUMN10 "Owner" + IDS_SHV_COLUMN11 "Group" + IDS_SHV_COLUMN12 "Filename" + IDS_SHV_COLUMN13 "Category" + IDS_SHV_COLUMN_DELFROM "Original location" + IDS_SHV_COLUMN_DELDATE "Date deleted" + IDS_SHV_COLUMN_FONTTYPE "Fonttype" + IDS_SHV_COLUMN_WORKGROUP "Workgroup" + IDS_SHV_NETWORKLOCATION "Network Location" + IDS_SHV_COLUMN_DOCUMENTS "Documents" + IDS_SHV_COLUMN_STATUS "Status" + IDS_SHV_COLUMN_COMMENTS "Comments" + IDS_SHV_COLUMN_LOCATION "Location" + IDS_SHV_COLUMN_MODEL "Model" + + /* special folders */ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" + IDS_RECYCLEBIN_FOLDER_NAME "Trash" + IDS_CONTROLPANEL "Control Panel" + IDS_ADMINISTRATIVETOOLS "Administrative Tools" + + /* context menus */ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" + IDS_CREATELINK "Create &Link" + IDS_COPY "Copy" + IDS_DELETE "Delete" + IDS_PROPERTIES "Properties" + IDS_CUT "Cut" + IDS_RESTORE "Restore" + IDS_FORMATDRIVE "Format..." + IDS_RENAME "Rename" + IDS_INSERT "Insert" + + IDS_CREATEFOLDER_DENIED "Unable to create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file deletion" + IDS_DELETEFOLDER_CAPTION "Confirm folder deletion" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?" + IDS_TRASHITEM_TEXT "Are you sure that you want to send '%1' to the Trash?" + IDS_TRASHFOLDER_TEXT "Are you sure that you want to send '%1' and all its content to the Trash?" + IDS_TRASHMULTIPLE_TEXT "Are you sure that you want to send these %1 items to the Trash?" + IDS_CANTTRASH_TEXT "The item '%1' can't be sent to Trash. Do you want to delete it instead?" + IDS_OVERWRITEFILE_TEXT "This folder already contains a file called '%1'.\n\nDo you want to replace it?" + IDS_OVERWRITEFILE_CAPTION "Confirm file overwrite" + IDS_OVERWRITEFOLDER_TEXT "This folder already contains a folder named '%1'.\n\n"\ + "If the files in the destination folder have the same names as files in the\n"\ + "selected folder they will be replaced. Do you still want to move or copy\n"\ + "the folder?" + + /* message box strings */ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" + IDS_LOGOFF_TITLE "Log Off" + IDS_LOGOFF_PROMPT "Do you want to log off?" + + /* shell folder path default values */ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Music" + IDS_MYVIDEO "My Videos" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Local Settings\\Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Local Settings\\History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Videos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" + IDS_NETWORKPLACE "My Network Places" + + IDS_NEWFOLDER "New Folder" + + IDS_DRIVE_FIXED "Local Disk" + IDS_DRIVE_CDROM "CDROM" + IDS_DRIVE_NETWORK "Network Disk" + + IDS_OPEN_WITH "Open With" + IDS_OPEN_WITH_CHOOSE "Select Program" + + IDS_SHELL_ABOUT_AUTHORS "&Authors" + IDS_SHELL_ABOUT_BACK "< &Back" + FCIDM_SHVIEW_NEW "New" + FCIDM_SHVIEW_NEWFOLDER "New &Folder" + FCIDM_SHVIEW_NEWLINK "New &Link" + IDS_FOLDER_OPTIONS "Folder Options" + IDS_RECYCLEBIN_LOCATION "Recycle Bin Location" + IDS_RECYCLEBIN_DISKSPACE "Space Available" + IDS_EMPTY_BITBUCKET "Empty Recycle Bin" + IDS_PICK_ICON_TITLE "Choose Icon" + IDS_PICK_ICON_FILTER "Icon Files(*.ico, *.icl, *.exe, *.dll)\0*.ico;*.icl;*.exe;*.dll\0" + IDS_OPEN_WITH_FILTER "Executable Files\0*.exe\0" + IDS_DIRECTORY "Folder" + IDS_VIRTUAL_DRIVER "Virtual Device Driver" + IDS_BAT_FILE "ReactOS Batch File" + IDS_CMD_FILE "ReactOS Command Script" + IDS_COM_FILE "Dos Application" + IDS_CPL_FILE "Control Panel Item" + IDS_CUR_FILE "Cursor" + IDS_DLL_FILE "Application Extension" + IDS_DRV_FILE "Device Driver" + IDS_EXE_FILE "Application" + IDS_FON_FILE "Font file" + IDS_TTF_FILE "TrueType Font file" + IDS_HLP_FILE "Help File" + IDS_INI_FILE "Configuration Settings" + IDS_LNK_FILE "Shortcut" + IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + + IDS_FILE_FOLDER "%u Files, %u Folders" + IDS_PRINTERS "Printers" + IDS_FONTS "Fonts" + IDS_INSTALLNEWFONT "Install New Font..." + + IDS_DEFAULT_CLUSTER_SIZE "Default allocation size" + IDS_COPY_OF "Copy of" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." +END + +#pragma code_page(default) diff --git a/dll/win32/shell32_new/menuband.cpp b/dll/win32/shell32_new/menuband.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/menuband.h b/dll/win32/shell32_new/menuband.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/menubandsite.cpp b/dll/win32/shell32_new/menubandsite.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/menubandsite.h b/dll/win32/shell32_new/menubandsite.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/menudeskbar.cpp b/dll/win32/shell32_new/menudeskbar.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/menudeskbar.h b/dll/win32/shell32_new/menudeskbar.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/pidl.cpp b/dll/win32/shell32_new/pidl.cpp new file mode 100644 index 00000000000..c034f13ac3a --- /dev/null +++ b/dll/win32/shell32_new/pidl.cpp @@ -0,0 +1,2411 @@ +/* + * pidl Handling + * + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES + * a pidl == NULL means desktop and is legal + * + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(pidl); +WINE_DECLARE_DEBUG_CHANNEL(shell); + +/* from comctl32.dll */ +EXTERN_C LPVOID WINAPI Alloc(INT); +EXTERN_C BOOL WINAPI Free(LPVOID); + +static LPSTR _ILGetSTextPointer(LPCITEMIDLIST pidl); +static LPWSTR _ILGetTextPointerW(LPCITEMIDLIST pidl); + +/************************************************************************* + * ILGetDisplayNameExA [SHELL32.186] + * + * Retrieves the display name of an ItemIDList + * + * PARAMS + * psf [I] Shell Folder to start with, if NULL the desktop is used + * pidl [I] ItemIDList relative to the psf to get the display name for + * path [O] Filled in with the display name, assumed to be at least MAX_PATH long + * type [I] Type of display name to retrieve + * 0 = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR uses always the desktop as root + * 1 = SHGDN_NORMAL relative to the root folder + * 2 = SHGDN_INFOLDER relative to the root folder, only the last name + * + * RETURNS + * True if the display name could be retrieved successfully, False otherwise + */ +static BOOL ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type) +{ + BOOL ret = FALSE; + WCHAR wPath[MAX_PATH]; + + TRACE("%p %p %p %d\n", psf, pidl, path, type); + + if (!pidl || !path) + return FALSE; + + ret = ILGetDisplayNameExW(psf, pidl, wPath, type); + WideCharToMultiByte(CP_ACP, 0, wPath, -1, path, MAX_PATH, NULL, NULL); + TRACE("%p %p %s\n", psf, pidl, debugstr_a(path)); + + return ret; +} + +BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type) +{ + CComPtr psfParent; + LPSHELLFOLDER lsf = psf; + HRESULT ret = NO_ERROR; + LPCITEMIDLIST pidllast; + STRRET strret; + DWORD flag; + + TRACE("%p %p %p %d\n", psf, pidl, path, type); + + if (!pidl || !path) + return FALSE; + + if (!lsf) + { + ret = SHGetDesktopFolder(&lsf); + if (FAILED(ret)) + return FALSE; + } + + if (type <= 2) + { + switch (type) + { + case ILGDN_FORPARSING: + flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR; + break; + case ILGDN_NORMAL: + flag = SHGDN_NORMAL; + break; + case ILGDN_INFOLDER: + flag = SHGDN_INFOLDER; + break; + default: + FIXME("Unknown type parameter = %x\n", type); + flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR; + break; + } + if (!*(const WORD*)pidl || type == ILGDN_FORPARSING) + { + ret = lsf->GetDisplayNameOf(pidl, flag, &strret); + if (SUCCEEDED(ret)) + { + if(!StrRetToStrNW(path, MAX_PATH, &strret, pidl)) + ret = E_FAIL; + } + } + else + { + ret = SHBindToParent(pidl, IID_IShellFolder, (LPVOID*)&psfParent, &pidllast); + if (SUCCEEDED(ret)) + { + ret = psfParent->GetDisplayNameOf(pidllast, flag, &strret); + if (SUCCEEDED(ret)) + { + if(!StrRetToStrNW(path, MAX_PATH, &strret, pidllast)) + ret = E_FAIL; + } + } + } + } + + TRACE("%p %p %s\n", psf, pidl, debugstr_w(path)); + + if (!psf) + lsf->Release(); + return SUCCEEDED(ret); +} + +/************************************************************************* + * ILGetDisplayNameEx [SHELL32.186] + */ +BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type) +{ + TRACE_(shell)("%p %p %p %d\n", psf, pidl, path, type); + + if (SHELL_OsIsUnicode()) + return ILGetDisplayNameExW(psf, pidl, (LPWSTR)path, type); + return ILGetDisplayNameExA(psf, pidl, (LPSTR)path, type); +} + +/************************************************************************* + * ILGetDisplayName [SHELL32.15] + */ +BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path) +{ + TRACE_(shell)("%p %p\n", pidl, path); + + if (SHELL_OsIsUnicode()) + return ILGetDisplayNameExW(NULL, pidl, (LPWSTR)path, ILGDN_FORPARSING); + return ILGetDisplayNameExA(NULL, pidl, (LPSTR)path, ILGDN_FORPARSING); +} + +/************************************************************************* + * ILFindLastID [SHELL32.16] + * + * NOTES + * observed: pidl=Desktop return=pidl + */ +LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl) +{ + LPCITEMIDLIST pidlLast = pidl; + + TRACE("(pidl=%p)\n",pidl); + + if (!pidl) + return NULL; + + while (pidl->mkid.cb) + { + pidlLast = pidl; + pidl = ILGetNext(pidl); + } + return (LPITEMIDLIST)pidlLast; +} + +/************************************************************************* + * ILRemoveLastID [SHELL32.17] + * + * NOTES + * when pidl=Desktop return=FALSE + */ +BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl) +{ + TRACE_(shell)("pidl=%p\n",pidl); + + if (!pidl || !pidl->mkid.cb) + return 0; + ILFindLastID(pidl)->mkid.cb = 0; + return 1; +} + +/************************************************************************* + * ILClone [SHELL32.18] + * + * NOTES + * duplicate an idlist + */ +LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl) +{ + DWORD len; + LPITEMIDLIST newpidl; + + if (!pidl) + return NULL; + + len = ILGetSize(pidl); + newpidl = (LPITEMIDLIST)SHAlloc(len); + if (newpidl) + memcpy(newpidl,pidl,len); + + TRACE("pidl=%p newpidl=%p\n",pidl, newpidl); + pdump(pidl); + + return newpidl; +} + +/************************************************************************* + * ILCloneFirst [SHELL32.19] + * + * NOTES + * duplicates the first idlist of a complex pidl + */ +LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl) +{ + DWORD len; + LPITEMIDLIST pidlNew = NULL; + + TRACE("pidl=%p\n", pidl); + pdump(pidl); + + if (pidl) + { + len = pidl->mkid.cb; + pidlNew = (LPITEMIDLIST)SHAlloc(len+2); + if (pidlNew) + { + memcpy(pidlNew,pidl,len+2); /* 2 -> mind a desktop pidl */ + + if (len) + ILGetNext(pidlNew)->mkid.cb = 0x00; + } + } + TRACE("-- newpidl=%p\n",pidlNew); + + return pidlNew; +} + +/************************************************************************* + * ILLoadFromStream (SHELL32.26) + * + * NOTES + * the first two bytes are the len, the pidl is following then + */ +HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl) +{ + WORD wLen = 0; + DWORD dwBytesRead; + HRESULT ret = E_FAIL; + + + TRACE_(shell)("%p %p\n", pStream , ppPidl); + + SHFree(*ppPidl); + *ppPidl = NULL; + + pStream->AddRef (); + + if (SUCCEEDED(pStream->Read(&wLen, 2, &dwBytesRead))) + { + TRACE("PIDL length is %d\n", wLen); + if (wLen != 0) + { + *ppPidl = (LPITEMIDLIST)SHAlloc(wLen); + if (SUCCEEDED(pStream->Read(*ppPidl , wLen, &dwBytesRead))) + { + TRACE("Stream read OK\n"); + ret = S_OK; + } + else + { + WARN("reading pidl failed\n"); + SHFree(*ppPidl); + *ppPidl = NULL; + } + } + else + { + *ppPidl = NULL; + ret = S_OK; + } + } + + /* we are not yet fully compatible */ + if (*ppPidl && !pcheck(*ppPidl)) + { + WARN("Check failed\n"); + SHFree(*ppPidl); + *ppPidl = NULL; + } + + pStream->Release (); + TRACE("done\n"); + return ret; +} + +/************************************************************************* + * ILSaveToStream (SHELL32.27) + * + * NOTES + * the first two bytes are the len, the pidl is following then + */ +HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl) +{ + WORD wLen = 0; + HRESULT ret = E_FAIL; + + TRACE_(shell)("%p %p\n", pStream, pPidl); + + pStream->AddRef (); + + wLen = ILGetSize(pPidl); + + if (SUCCEEDED(pStream->Write(&wLen, 2, NULL))) + { + if (SUCCEEDED(pStream->Write(pPidl, wLen, NULL))) + ret = S_OK; + } + pStream->Release (); + + return ret; +} + +/************************************************************************* + * SHILCreateFromPath [SHELL32.28] + * + * Create an ItemIDList from a path + * + * PARAMS + * path [I] + * ppidl [O] + * attributes [I/O] requested attributes on call and actual attributes when + * the function returns + * + * RETURNS + * NO_ERROR if successful, or an OLE errer code otherwise + * + * NOTES + * Wrapper for IShellFolder_ParseDisplayName(). + */ +HRESULT WINAPI SHILCreateFromPathA(LPCSTR path, LPITEMIDLIST * ppidl, DWORD * attributes) +{ + WCHAR lpszDisplayName[MAX_PATH]; + + TRACE_(shell)("%s %p 0x%08x\n", path, ppidl, attributes ? *attributes : 0); + + if (!MultiByteToWideChar(CP_ACP, 0, path, -1, lpszDisplayName, MAX_PATH)) + lpszDisplayName[MAX_PATH-1] = 0; + + return SHILCreateFromPathW(lpszDisplayName, ppidl, attributes); +} + +HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST * ppidl, DWORD * attributes) +{ + CComPtr sf; + DWORD pchEaten; + HRESULT ret = E_FAIL; + + TRACE_(shell)("%s %p 0x%08x\n", debugstr_w(path), ppidl, attributes ? *attributes : 0); + + if (SUCCEEDED (SHGetDesktopFolder(&sf))) + ret = sf->ParseDisplayName(0, NULL, (LPWSTR)path, &pchEaten, ppidl, attributes); + return ret; +} + +EXTERN_C HRESULT WINAPI SHILCreateFromPathAW (LPCVOID path, LPITEMIDLIST * ppidl, DWORD * attributes) +{ + if ( SHELL_OsIsUnicode()) + return SHILCreateFromPathW ((LPCWSTR)path, ppidl, attributes); + return SHILCreateFromPathA ((LPCSTR)path, ppidl, attributes); +} + +/************************************************************************* + * SHCloneSpecialIDList [SHELL32.89] + * + * Create an ItemIDList to one of the special folders. + + * PARAMS + * hwndOwner [in] + * nFolder [in] CSIDL_xxxxx + * fCreate [in] Create folder if it does not exist + * + * RETURNS + * Success: The newly created pidl + * Failure: NULL, if inputs are invalid. + * + * NOTES + * exported by ordinal. + * Caller is responsible for deallocating the returned ItemIDList with the + * shells IMalloc interface, aka ILFree. + */ +LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner, int nFolder, BOOL fCreate) +{ + LPITEMIDLIST ppidl; + TRACE_(shell)("(hwnd=%p,csidl=0x%x,%s).\n", hwndOwner, nFolder, fCreate ? "T" : "F"); + + if (fCreate) + nFolder |= CSIDL_FLAG_CREATE; + + SHGetSpecialFolderLocation(hwndOwner, nFolder, &ppidl); + return ppidl; +} + +/************************************************************************* + * ILGlobalClone [SHELL32.20] + * + * Clones an ItemIDList using Alloc. + * + * PARAMS + * pidl [I] ItemIDList to clone + * + * RETURNS + * Newly allocated ItemIDList. + * + * NOTES + * exported by ordinal. + */ +LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl) +{ + DWORD len; + LPITEMIDLIST newpidl; + + if (!pidl) + return NULL; + + len = ILGetSize(pidl); + newpidl = (LPITEMIDLIST)Alloc(len); + if (newpidl) + memcpy(newpidl,pidl,len); + + TRACE("pidl=%p newpidl=%p\n",pidl, newpidl); + pdump(pidl); + + return newpidl; +} + +/************************************************************************* + * ILIsEqual [SHELL32.21] + * + */ +BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + char szData1[MAX_PATH]; + char szData2[MAX_PATH]; + + LPCITEMIDLIST pidltemp1 = pidl1; + LPCITEMIDLIST pidltemp2 = pidl2; + + TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); + + /* + * Explorer reads from registry directly (StreamMRU), + * so we can only check here + */ + if (!pcheck(pidl1) || !pcheck (pidl2)) + return FALSE; + + pdump (pidl1); + pdump (pidl2); + + if (!pidl1 || !pidl2) + return FALSE; + + while (pidltemp1->mkid.cb && pidltemp2->mkid.cb) + { + _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); + _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); + + if (strcmp( szData1, szData2 )) + return FALSE; + + pidltemp1 = ILGetNext(pidltemp1); + pidltemp2 = ILGetNext(pidltemp2); + } + + if (!pidltemp1->mkid.cb && !pidltemp2->mkid.cb) + return TRUE; + + return FALSE; +} + +/************************************************************************* + * ILIsParent [SHELL32.23] + * + * Verifies that pidlParent is indeed the (immediate) parent of pidlChild. + * + * PARAMS + * pidlParent [I] + * pidlChild [I] + * bImmediate [I] only return true if the parent is the direct parent + * of the child + * + * RETURNS + * True if the parent ItemIDlist is a complete part of the child ItemIdList, + * False otherwise. + * + * NOTES + * parent = a/b, child = a/b/c -> true, c is in folder a/b + * child = a/b/c/d -> false if bImmediate is true, d is not in folder a/b + * child = a/b/c/d -> true if bImmediate is false, d is in a subfolder of a/b + */ +BOOL WINAPI ILIsParent(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL bImmediate) +{ + char szData1[MAX_PATH]; + char szData2[MAX_PATH]; + LPCITEMIDLIST pParent = pidlParent; + LPCITEMIDLIST pChild = pidlChild; + + TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate); + + if (!pParent || !pChild) + return FALSE; + + while (pParent->mkid.cb && pChild->mkid.cb) + { + _ILSimpleGetText(pParent, szData1, MAX_PATH); + _ILSimpleGetText(pChild, szData2, MAX_PATH); + + if (strcmp( szData1, szData2 )) + return FALSE; + + pParent = ILGetNext(pParent); + pChild = ILGetNext(pChild); + } + + /* child shorter or has equal length to parent */ + if (pParent->mkid.cb || !pChild->mkid.cb) + return FALSE; + + /* not immediate descent */ + if ( ILGetNext(pChild)->mkid.cb && bImmediate) + return FALSE; + + return TRUE; +} + +/************************************************************************* + * ILFindChild [SHELL32.24] + * + * Compares elements from pidl1 and pidl2. + * + * PARAMS + * pidl1 [I] + * pidl2 [I] + * + * RETURNS + * pidl1 is desktop pidl2 + * pidl1 shorter pidl2 pointer to first different element of pidl2 + * if there was at least one equal element + * pidl2 shorter pidl1 0 + * pidl2 equal pidl1 pointer to last 0x00-element of pidl2 + * + * NOTES + * exported by ordinal. + */ +LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + char szData1[MAX_PATH]; + char szData2[MAX_PATH]; + + LPCITEMIDLIST pidltemp1 = pidl1; + LPCITEMIDLIST pidltemp2 = pidl2; + LPCITEMIDLIST ret=NULL; + + TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); + + /* explorer reads from registry directly (StreamMRU), + so we can only check here */ + if ((!pcheck (pidl1)) || (!pcheck (pidl2))) + return FALSE; + + pdump (pidl1); + pdump (pidl2); + + if (_ILIsDesktop(pidl1)) + { + ret = pidl2; + } + else + { + while (pidltemp1->mkid.cb && pidltemp2->mkid.cb) + { + _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); + _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); + + if (strcmp(szData1,szData2)) + break; + + pidltemp1 = ILGetNext(pidltemp1); + pidltemp2 = ILGetNext(pidltemp2); + ret = pidltemp2; + } + + if (pidltemp1->mkid.cb) + ret = NULL; /* elements of pidl1 left*/ + } + TRACE_(shell)("--- %p\n", ret); + return (LPITEMIDLIST)ret; /* pidl 1 is shorter */ +} + +/************************************************************************* + * ILCombine [SHELL32.25] + * + * Concatenates two complex ItemIDLists. + * + * PARAMS + * pidl1 [I] first complex ItemIDLists + * pidl2 [I] complex ItemIDLists to append + * + * RETURNS + * if both pidl's == NULL NULL + * if pidl1 == NULL cloned pidl2 + * if pidl2 == NULL cloned pidl1 + * otherwise new pidl with pidl2 appended to pidl1 + * + * NOTES + * exported by ordinal. + * Does not destroy the passed in ItemIDLists! + */ +LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + DWORD len1,len2; + LPITEMIDLIST pidlNew; + + TRACE("pidl=%p pidl=%p\n",pidl1,pidl2); + + if (!pidl1 && !pidl2) return NULL; + + pdump (pidl1); + pdump (pidl2); + + if (!pidl1) + { + pidlNew = ILClone(pidl2); + return pidlNew; + } + + if (!pidl2) + { + pidlNew = ILClone(pidl1); + return pidlNew; + } + + len1 = ILGetSize(pidl1)-2; + len2 = ILGetSize(pidl2); + pidlNew = (LPITEMIDLIST)SHAlloc(len1+len2); + + if (pidlNew) + { + memcpy(pidlNew,pidl1,len1); + memcpy(((BYTE *)pidlNew)+len1,pidl2,len2); + } + + /* TRACE(pidl,"--new pidl=%p\n",pidlNew);*/ + return pidlNew; +} + +/************************************************************************* + * SHGetRealIDL [SHELL32.98] + * + * NOTES + */ +HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST *pidlReal) +{ + CComPtr pDataObj; + HRESULT hr; + + hr = lpsf->GetUIObjectOf(0, 1, &pidlSimple, + IID_IDataObject, 0, (LPVOID*)&pDataObj); + if (SUCCEEDED(hr)) + { + STGMEDIUM medium; + FORMATETC fmt; + + fmt.cfFormat = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); + fmt.ptd = NULL; + fmt.dwAspect = DVASPECT_CONTENT; + fmt.lindex = -1; + fmt.tymed = TYMED_HGLOBAL; + + hr = pDataObj->GetData(&fmt, &medium); + + if (SUCCEEDED(hr)) + { + /*assert(pida->cidl==1);*/ + LPIDA pida = (LPIDA)GlobalLock(medium.hGlobal); + + LPCITEMIDLIST pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]); + LPCITEMIDLIST pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[1]); + + *pidlReal = ILCombine(pidl_folder, pidl_child); + + if (!*pidlReal) + hr = E_OUTOFMEMORY; + + GlobalUnlock(medium.hGlobal); + GlobalFree(medium.hGlobal); + } + } + + return hr; +} + +/************************************************************************* + * SHLogILFromFSIL [SHELL32.95] + * + * NOTES + * pild = CSIDL_DESKTOP ret = 0 + * pild = CSIDL_DRIVES ret = 0 + */ +EXTERN_C LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl) +{ + FIXME("(pidl=%p)\n",pidl); + + pdump(pidl); + + return 0; +} + +/************************************************************************* + * ILGetSize [SHELL32.152] + * + * Gets the byte size of an ItemIDList including zero terminator + * + * PARAMS + * pidl [I] ItemIDList + * + * RETURNS + * size of pidl in bytes + * + * NOTES + * exported by ordinal + */ +UINT WINAPI ILGetSize(LPCITEMIDLIST pidl) +{ + LPCSHITEMID si = &(pidl->mkid); + UINT len=0; + + if (pidl) + { + while (si->cb) + { + len += si->cb; + si = (LPCSHITEMID)(((const BYTE*)si)+si->cb); + } + len += 2; + } + TRACE("pidl=%p size=%u\n",pidl, len); + return len; +} + +/************************************************************************* + * ILGetNext [SHELL32.153] + * + * Gets the next ItemID of an ItemIDList + * + * PARAMS + * pidl [I] ItemIDList + * + * RETURNS + * null -> null + * desktop -> null + * simple pidl -> pointer to 0x0000 element + * + * NOTES + * exported by ordinal. + */ +LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl) +{ + WORD len; + + TRACE("%p\n", pidl); + + if (pidl) + { + len = pidl->mkid.cb; + if (len) + { + pidl = (LPCITEMIDLIST) (((const BYTE*)pidl)+len); + TRACE("-- %p\n", pidl); + return (LPITEMIDLIST)pidl; + } + } + return NULL; +} + +/************************************************************************* + * ILAppend [SHELL32.154] + * + * Adds the single ItemID item to the ItemIDList indicated by pidl. + * If bEnd is FALSE, inserts the item in the front of the list, + * otherwise it adds the item to the end. (???) + * + * PARAMS + * pidl [I] ItemIDList to extend + * item [I] ItemID to prepend/append + * bEnd [I] Indicates if the item should be appended + * + * NOTES + * Destroys the passed in idlist! (???) + */ +EXTERN_C LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd) +{ + LPITEMIDLIST idlRet; + + WARN("(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd); + + pdump (pidl); + pdump (item); + + if (_ILIsDesktop(pidl)) + { + idlRet = ILClone(item); + SHFree (pidl); + return idlRet; + } + + if (bEnd) + idlRet = ILCombine(pidl, item); + else + idlRet = ILCombine(item, pidl); + + SHFree(pidl); + return idlRet; +} + +/************************************************************************* + * ILFree [SHELL32.155] + * + * Frees memory (if not NULL) allocated by SHMalloc allocator + * + * PARAMS + * pidl [I] + * + * RETURNS + * Nothing + * + * NOTES + * exported by ordinal + */ +void WINAPI ILFree(LPITEMIDLIST pidl) +{ + TRACE("(pidl=%p)\n",pidl); + SHFree(pidl); +} + +/************************************************************************* + * ILGlobalFree [SHELL32.156] + * + * Frees memory (if not NULL) allocated by Alloc allocator + * + * PARAMS + * pidl [I] + * + * RETURNS + * Nothing + * + * NOTES + * exported by ordinal. + */ +void WINAPI ILGlobalFree( LPITEMIDLIST pidl) +{ + TRACE("%p\n", pidl); + + Free(pidl); +} + +/************************************************************************* + * ILCreateFromPathA [SHELL32.189] + * + * Creates a complex ItemIDList from a path and returns it. + * + * PARAMS + * path [I] + * + * RETURNS + * the newly created complex ItemIDList or NULL if failed + * + * NOTES + * exported by ordinal. + */ +LPITEMIDLIST WINAPI ILCreateFromPathA (LPCSTR path) +{ + LPITEMIDLIST pidlnew = NULL; + + TRACE_(shell)("%s\n", debugstr_a(path)); + + if (SUCCEEDED(SHILCreateFromPathA(path, &pidlnew, NULL))) + return pidlnew; + return NULL; +} + +/************************************************************************* + * ILCreateFromPathW [SHELL32.190] + * + * See ILCreateFromPathA. + */ +LPITEMIDLIST WINAPI ILCreateFromPathW (LPCWSTR path) +{ + LPITEMIDLIST pidlnew = NULL; + + TRACE_(shell)("%s\n", debugstr_w(path)); + + if (SUCCEEDED(SHILCreateFromPathW(path, &pidlnew, NULL))) + return pidlnew; + return NULL; +} + +/************************************************************************* + * ILCreateFromPath [SHELL32.157] + */ +EXTERN_C LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path) +{ + if ( SHELL_OsIsUnicode()) + return ILCreateFromPathW ((LPCWSTR)path); + return ILCreateFromPathA ((LPCSTR)path); +} + +/************************************************************************* + * _ILParsePathW [internal] + * + * Creates an ItemIDList from a path and returns it. + * + * PARAMS + * path [I] path to parse and convert into an ItemIDList + * lpFindFile [I] pointer to buffer to initialize the FileSystem + * Bind Data object with + * bBindCtx [I] indicates to create a BindContext and assign a + * FileSystem Bind Data object + * ppidl [O] the newly create ItemIDList + * prgfInOut [I/O] requested attributes on input and actual + * attributes on return + * + * RETURNS + * NO_ERROR on success or an OLE error code + * + * NOTES + * If either lpFindFile is non-NULL or bBindCtx is TRUE, this function + * creates a BindContext object and assigns a FileSystem Bind Data object + * to it, passing the BindContext to IShellFolder_ParseDisplayName. Each + * IShellFolder uses that FileSystem Bind Data object of the BindContext + * to pass data about the current path element to the next object. This + * is used to avoid having to verify the current path element on disk, so + * that creating an ItemIDList from a nonexistent path still can work. + */ +static HRESULT _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile, + BOOL bBindCtx, LPITEMIDLIST *ppidl, LPDWORD prgfInOut) +{ + CComPtr pSF; + CComPtr pBC; + HRESULT ret; + + TRACE("%s %p %d (%p)->%p (%p)->0x%x\n", debugstr_w(path), lpFindFile, bBindCtx, + ppidl, ppidl ? *ppidl : NULL, + prgfInOut, prgfInOut ? *prgfInOut : 0); + + ret = SHGetDesktopFolder(&pSF); + if (FAILED(ret)) + return ret; + + if (lpFindFile || bBindCtx) + ret = IFileSystemBindData_Constructor(lpFindFile, &pBC); + + if (SUCCEEDED(ret)) + { + ret = pSF->ParseDisplayName(0, pBC, (LPOLESTR)path, NULL, ppidl, prgfInOut); + } + + if (FAILED(ret) && ppidl) + *ppidl = NULL; + + TRACE("%s %p 0x%x\n", debugstr_w(path), ppidl ? *ppidl : NULL, prgfInOut ? *prgfInOut : 0); + + return ret; +} + +/************************************************************************* + * SHSimpleIDListFromPath [SHELL32.162] + * + * Creates a simple ItemIDList from a path and returns it. This function + * does not fail on nonexistent paths. + * + * PARAMS + * path [I] path to parse and convert into an ItemIDList + * + * RETURNS + * the newly created simple ItemIDList + * + * NOTES + * Simple in the name does not mean a relative ItemIDList but rather a + * fully qualified list, where only the file name is filled in and the + * directory flag for those ItemID elements this is known about, eg. + * it is not the last element in the ItemIDList or the actual directory + * exists on disk. + * exported by ordinal. + */ +LPITEMIDLIST WINAPI SHSimpleIDListFromPathA(LPCSTR lpszPath) +{ + LPITEMIDLIST pidl = NULL; + LPWSTR wPath = NULL; + int len; + + TRACE("%s\n", debugstr_a(lpszPath)); + + if (lpszPath) + { + len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0); + wPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len); + } + + _ILParsePathW(wPath, NULL, TRUE, &pidl, NULL); + + HeapFree(GetProcessHeap(), 0, wPath); + TRACE("%s %p\n", debugstr_a(lpszPath), pidl); + return pidl; +} + +LPITEMIDLIST WINAPI SHSimpleIDListFromPathW(LPCWSTR lpszPath) +{ + LPITEMIDLIST pidl = NULL; + + TRACE("%s\n", debugstr_w(lpszPath)); + + _ILParsePathW(lpszPath, NULL, TRUE, &pidl, NULL); + TRACE("%s %p\n", debugstr_w(lpszPath), pidl); + return pidl; +} + +EXTERN_C LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW(LPCVOID lpszPath) +{ + if ( SHELL_OsIsUnicode()) + return SHSimpleIDListFromPathW ((LPCWSTR)lpszPath); + return SHSimpleIDListFromPathA ((LPCSTR)lpszPath); +} + +/************************************************************************* + * SHGetDataFromIDListA [SHELL32.247] + * + * NOTES + * the pidl can be a simple one. since we can't get the path out of the pidl + * we have to take all data from the pidl + */ +HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, + int nFormat, LPVOID dest, int len) +{ + LPSTR filename, shortname; + WIN32_FIND_DATAA * pfd; + + TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); + + pdump(pidl); + if (!psf || !dest) + return E_INVALIDARG; + + switch (nFormat) + { + case SHGDFIL_FINDDATA: + pfd = (WIN32_FIND_DATAA *)dest; + + if (_ILIsDrive(pidl) || _ILIsSpecialFolder(pidl)) + return E_INVALIDARG; + + if (len < (int)sizeof(WIN32_FIND_DATAA)) + return E_INVALIDARG; + + ZeroMemory(pfd, sizeof (WIN32_FIND_DATAA)); + _ILGetFileDateTime( pidl, &(pfd->ftLastWriteTime)); + pfd->dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); + pfd->nFileSizeLow = _ILGetFileSize ( pidl, NULL, 0); + + filename = _ILGetTextPointer(pidl); + shortname = _ILGetSTextPointer(pidl); + + if (filename) + lstrcpynA(pfd->cFileName, filename, sizeof(pfd->cFileName)); + else + pfd->cFileName[0] = '\0'; + + if (shortname) + lstrcpynA(pfd->cAlternateFileName, shortname, sizeof(pfd->cAlternateFileName)); + else + pfd->cAlternateFileName[0] = '\0'; + return NOERROR; + + case SHGDFIL_NETRESOURCE: + case SHGDFIL_DESCRIPTIONID: + FIXME_(shell)("SHGDFIL %i stub\n", nFormat); + break; + + default: + ERR_(shell)("Unknown SHGDFIL %i, please report\n", nFormat); + } + + return E_INVALIDARG; +} + +/************************************************************************* + * SHGetDataFromIDListW [SHELL32.248] + * + */ +HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, + int nFormat, LPVOID dest, int len) +{ + LPSTR filename, shortname; + WIN32_FIND_DATAW * pfd = (WIN32_FIND_DATAW *)dest; + + TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); + + pdump(pidl); + + if (!psf || !dest) + return E_INVALIDARG; + + switch (nFormat) + { + case SHGDFIL_FINDDATA: + pfd = (WIN32_FIND_DATAW *)dest; + + if (_ILIsDrive(pidl)) + return E_INVALIDARG; + + if (len < (int)sizeof(WIN32_FIND_DATAW)) + return E_INVALIDARG; + + ZeroMemory(pfd, sizeof (WIN32_FIND_DATAA)); + _ILGetFileDateTime( pidl, &(pfd->ftLastWriteTime)); + pfd->dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); + pfd->nFileSizeLow = _ILGetFileSize ( pidl, NULL, 0); + + filename = _ILGetTextPointer(pidl); + shortname = _ILGetSTextPointer(pidl); + + if (!filename) + pfd->cFileName[0] = '\0'; + else if (!MultiByteToWideChar(CP_ACP, 0, filename, -1, pfd->cFileName, MAX_PATH)) + pfd->cFileName[MAX_PATH-1] = 0; + + if (!shortname) + pfd->cAlternateFileName[0] = '\0'; + else if (!MultiByteToWideChar(CP_ACP, 0, shortname, -1, pfd->cAlternateFileName, 14)) + pfd->cAlternateFileName[13] = 0; + return NOERROR; + + case SHGDFIL_NETRESOURCE: + case SHGDFIL_DESCRIPTIONID: + FIXME_(shell)("SHGDFIL %i stub\n", nFormat); + break; + + default: + ERR_(shell)("Unknown SHGDFIL %i, please report\n", nFormat); + } + + return E_INVALIDARG; +} + +/************************************************************************* + * SHGetPathFromIDListA [SHELL32.@][NT 4.0: SHELL32.220] + * + * PARAMETERS + * pidl, [IN] pidl + * pszPath [OUT] path + * + * RETURNS + * path from a passed PIDL. + * + * NOTES + * NULL returns FALSE + * desktop pidl gives path to desktop directory back + * special pidls returning FALSE + */ +BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath) +{ + WCHAR wszPath[MAX_PATH]; + BOOL bSuccess; + + bSuccess = SHGetPathFromIDListW(pidl, wszPath); + WideCharToMultiByte(CP_ACP, 0, wszPath, -1, pszPath, MAX_PATH, NULL, NULL); + + return bSuccess; +} + +/************************************************************************* + * SHGetPathFromIDListW [SHELL32.@] + * + * See SHGetPathFromIDListA. + */ +BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath) +{ + HRESULT hr; + LPCITEMIDLIST pidlLast; + CComPtr psfFolder; + DWORD dwAttributes; + STRRET strret; + + TRACE_(shell)("(pidl=%p,%p)\n", pidl, pszPath); + pdump(pidl); + + *pszPath = '\0'; + if (!pidl) + return FALSE; + + hr = SHBindToParent(pidl, IID_IShellFolder, (VOID**)&psfFolder, &pidlLast); + if (FAILED(hr)) return FALSE; + + dwAttributes = SFGAO_FILESYSTEM; + hr = psfFolder->GetAttributesOf(1, &pidlLast, &dwAttributes); + if (FAILED(hr) || !(dwAttributes & SFGAO_FILESYSTEM)) { + return FALSE; + } + + hr = psfFolder->GetDisplayNameOf(pidlLast, SHGDN_FORPARSING, &strret); + if (FAILED(hr)) return FALSE; + + hr = StrRetToBufW(&strret, pidlLast, pszPath, MAX_PATH); + + TRACE_(shell)("-- %s, 0x%08x\n",debugstr_w(pszPath), hr); + return SUCCEEDED(hr); +} + +/************************************************************************* + * SHBindToParent [shell version 5.0] + */ +HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast) +{ + CComPtr psfDesktop; + HRESULT hr=E_FAIL; + + TRACE_(shell)("pidl=%p\n", pidl); + pdump(pidl); + + if (!pidl || !ppv) + return E_INVALIDARG; + + *ppv = NULL; + if (ppidlLast) + *ppidlLast = NULL; + + hr = SHGetDesktopFolder(&psfDesktop); + if (FAILED(hr)) + return hr; + + if (_ILIsPidlSimple(pidl)) + { + /* we are on desktop level */ + hr = psfDesktop->QueryInterface(riid, ppv); + } + else + { + LPITEMIDLIST pidlParent = ILClone(pidl); + ILRemoveLastID(pidlParent); + hr = psfDesktop->BindToObject(pidlParent, NULL, riid, ppv); + SHFree (pidlParent); + } + + if (SUCCEEDED(hr) && ppidlLast) + *ppidlLast = ILFindLastID(pidl); + + TRACE_(shell)("-- psf=%p pidl=%p ret=0x%08x\n", *ppv, (ppidlLast)?*ppidlLast:NULL, hr); + return hr; +} + +/************************************************************************** + * + * internal functions + * + * ### 1. section creating pidls ### + * + ************************************************************************* + */ + +/* Basic PIDL constructor. Allocates size + 5 bytes, where: + * - two bytes are SHITEMID.cb + * - one byte is PIDLDATA.type + * - two bytes are the NULL PIDL terminator + * Sets type of the returned PIDL to type. + */ +static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size) +{ + LPITEMIDLIST pidlOut = NULL; + + pidlOut = (LPITEMIDLIST)SHAlloc(size + 5); + if(pidlOut) + { + LPPIDLDATA pData; + LPITEMIDLIST pidlNext; + + ZeroMemory(pidlOut, size + 5); + pidlOut->mkid.cb = size + 3; + + pData = _ILGetDataPointer(pidlOut); + if (pData) + pData->type = type; + + pidlNext = ILGetNext(pidlOut); + if (pidlNext) + pidlNext->mkid.cb = 0x00; + TRACE("-- (pidl=%p, size=%u)\n", pidlOut, size); + } + + return pidlOut; +} + +LPITEMIDLIST _ILCreateDesktop(void) +{ + LPITEMIDLIST ret; + + TRACE("()\n"); + ret = (LPITEMIDLIST)SHAlloc(2); + if (ret) + ret->mkid.cb = 0; + return ret; +} + +LPITEMIDLIST _ILCreateMyComputer(void) +{ + TRACE("()\n"); + return _ILCreateGuid(PT_GUID, CLSID_MyComputer); +} + +LPITEMIDLIST _ILCreateMyDocuments(void) +{ + TRACE("()\n"); + return _ILCreateGuid(PT_GUID, CLSID_MyDocuments); +} + +LPITEMIDLIST _ILCreateIExplore(void) +{ + TRACE("()\n"); + return _ILCreateGuid(PT_GUID, CLSID_Internet); +} + +LPITEMIDLIST _ILCreateControlPanel(void) +{ + LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, CLSID_MyComputer), ret = NULL; + + TRACE("()\n"); + if (parent) + { + LPITEMIDLIST cpl = _ILCreateGuid(PT_SHELLEXT, CLSID_ControlPanel); + + if (cpl) + { + ret = ILCombine(parent, cpl); + SHFree(cpl); + } + SHFree(parent); + } + return ret; +} + +LPITEMIDLIST _ILCreatePrinters(void) +{ + LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, CLSID_MyComputer), ret = NULL; + + TRACE("()\n"); + if (parent) + { + LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, CLSID_Printers); + + if (printers) + { + ret = ILCombine(parent, printers); + SHFree(printers); + } + SHFree(parent); + } + return ret; +} + +LPITEMIDLIST _ILCreateNetwork(void) +{ + TRACE("()\n"); + return _ILCreateGuid(PT_GUID, CLSID_NetworkPlaces); +} + +LPITEMIDLIST _ILCreateBitBucket(void) +{ + TRACE("()\n"); + return _ILCreateGuid(PT_GUID, CLSID_RecycleBin); +} + +LPITEMIDLIST _ILCreateAdminTools(void) +{ + TRACE("()\n"); + return _ILCreateGuid(PT_GUID, CLSID_AdminFolderShortcut); //FIXME +} + +LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid) +{ + LPITEMIDLIST pidlOut; + + if (type == PT_SHELLEXT || type == PT_GUID || type == PT_YAGUID) + { + pidlOut = _ILAlloc(type, sizeof(GUIDStruct)); + if (pidlOut) + { + LPPIDLDATA pData = _ILGetDataPointer(pidlOut); + + pData->u.guid.guid = guid; + TRACE("-- create GUID-pidl %s\n", + debugstr_guid(&(pData->u.guid.guid))); + } + } + else + { + WARN("%d: invalid type for GUID\n", type); + pidlOut = NULL; + } + return pidlOut; +} + +LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID) +{ + IID iid; + + if (FAILED(SHCLSIDFromStringA(szGUID, &iid))) + { + ERR("%s is not a GUID\n", szGUID); + return NULL; + } + return _ILCreateGuid(PT_GUID, iid); +} + +LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID) +{ + IID iid; + + if (FAILED(CLSIDFromString((LPOLESTR)szGUID, &iid))) + { + ERR("%s is not a GUID\n", debugstr_w(szGUID)); + return NULL; + } + return _ILCreateGuid(PT_GUID, iid); +} + +LPITEMIDLIST _ILCreateFromFindDataW( const WIN32_FIND_DATAW *wfd ) +{ + char buff[MAX_PATH + 14 +1]; /* see WIN32_FIND_DATA */ + DWORD len, len1, wlen, alen; + LPITEMIDLIST pidl; + PIDLTYPE type; + + if (!wfd) + return NULL; + + TRACE("(%s, %s)\n",debugstr_w(wfd->cAlternateFileName), debugstr_w(wfd->cFileName)); + + /* prepare buffer with both names */ + len = WideCharToMultiByte(CP_ACP,0,wfd->cFileName,-1,buff,MAX_PATH,NULL,NULL); + len1 = WideCharToMultiByte(CP_ACP,0,wfd->cAlternateFileName,-1, buff+len, sizeof(buff)-len, NULL, NULL); + alen = len + len1; + + type = (wfd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? PT_FOLDER : PT_VALUE; + + wlen = wcslen(wfd->cFileName) + 1; + pidl = _ILAlloc(type, sizeof(FileStruct) + (alen + (alen & 1)) + + sizeof(FileStructW) + wlen * sizeof(WCHAR) + sizeof(WORD)); + if (pidl) + { + LPPIDLDATA pData = _ILGetDataPointer(pidl); + FileStruct *fs = &pData->u.file; + FileStructW *fsw; + WORD *pOffsetW; + + FileTimeToDosDateTime( &wfd->ftLastWriteTime, &fs->uFileDate, &fs->uFileTime); + fs->dwFileSize = wfd->nFileSizeLow; + fs->uFileAttribs = wfd->dwFileAttributes; + memcpy(fs->szNames, buff, alen); + + fsw = (FileStructW*)(pData->u.file.szNames + alen + (alen & 0x1)); + fsw->cbLen = sizeof(FileStructW) + wlen * sizeof(WCHAR) + sizeof(WORD); + FileTimeToDosDateTime( &wfd->ftCreationTime, &fsw->uCreationDate, &fsw->uCreationTime); + FileTimeToDosDateTime( &wfd->ftLastAccessTime, &fsw->uLastAccessDate, &fsw->uLastAccessTime); + memcpy(fsw->wszName, wfd->cFileName, wlen * sizeof(WCHAR)); + + pOffsetW = (WORD*)((LPBYTE)pidl + pidl->mkid.cb - sizeof(WORD)); + *pOffsetW = (LPBYTE)fsw - (LPBYTE)pidl; + TRACE("-- Set Value: %s\n",debugstr_w(fsw->wszName)); + } + return pidl; + +} + +HRESULT _ILCreateFromPathW(LPCWSTR szPath, LPITEMIDLIST* ppidl) +{ + HANDLE hFile; + WIN32_FIND_DATAW stffile; + + if (!ppidl) + return E_INVALIDARG; + + hFile = FindFirstFileW(szPath, &stffile); + if (hFile == INVALID_HANDLE_VALUE) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + + FindClose(hFile); + + *ppidl = _ILCreateFromFindDataW(&stffile); + + return *ppidl ? S_OK : E_OUTOFMEMORY; +} + +LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew) +{ + LPITEMIDLIST pidlOut; + + TRACE("(%s)\n",debugstr_w(lpszNew)); + + pidlOut = _ILAlloc(PT_DRIVE, sizeof(DriveStruct)); + if (pidlOut) + { + LPSTR pszDest; + + pszDest = _ILGetTextPointer(pidlOut); + if (pszDest) + { + strcpy(pszDest, "x:\\"); + pszDest[0]=towupper(lpszNew[0]); + TRACE("-- create Drive: %s\n", debugstr_a(pszDest)); + } + } + return pidlOut; +} + +/************************************************************************** + * _ILGetDrive() + * + * Gets the text for the drive eg. 'c:\' + * + * RETURNS + * strlen (lpszText) + */ +DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT uSize) +{ + TRACE("(%p,%p,%u)\n",pidl,pOut,uSize); + + if(_ILIsMyComputer(pidl)) + pidl = ILGetNext(pidl); + + if (pidl && _ILIsDrive(pidl)) + return _ILSimpleGetText(pidl, pOut, uSize); + + return 0; +} + +/************************************************************************** + * + * ### 2. section testing pidls ### + * + ************************************************************************** + * _ILIsUnicode() + * _ILIsDesktop() + * _ILIsMyComputer() + * _ILIsSpecialFolder() + * _ILIsDrive() + * _ILIsFolder() + * _ILIsValue() + * _ILIsPidlSimple() + */ +BOOL _ILIsUnicode(LPCITEMIDLIST pidl) +{ + LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + + TRACE("(%p)\n",pidl); + + return (pidl && lpPData && PT_VALUEW == lpPData->type); +} + +BOOL _ILIsDesktop(LPCITEMIDLIST pidl) +{ + TRACE("(%p)\n",pidl); + + return pidl && pidl->mkid.cb ? 0 : 1; +} + +BOOL _ILIsMyDocuments(LPCITEMIDLIST pidl) +{ + IID *iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(*iid, CLSID_MyDocuments); + return FALSE; +} + +BOOL _ILIsControlPanel(LPCITEMIDLIST pidl) +{ + IID *iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(*iid, CLSID_ControlPanel); + return FALSE; +} + +BOOL _ILIsNetHood(LPCITEMIDLIST pidl) +{ + IID *iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(*iid, CLSID_NetworkPlaces); + return FALSE; +} + + +LPITEMIDLIST _ILCreateNetHood(void) +{ + return _ILCreateGuid(PT_GUID, CLSID_NetworkPlaces); +} + +LPITEMIDLIST _ILCreateFont(void) +{ + return _ILCreateGuid(PT_GUID, CLSID_FontsFolderShortcut); +} + +BOOL _ILIsMyComputer(LPCITEMIDLIST pidl) +{ + IID *iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(*iid, CLSID_MyComputer); + return FALSE; +} + +BOOL _ILIsPrinter(LPCITEMIDLIST pidl) +{ + IID *iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(*iid, CLSID_Printers); + return FALSE; +} + +BOOL _ILIsBitBucket(LPCITEMIDLIST pidl) +{ + IID *iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(*iid, CLSID_RecycleBin); + return FALSE; +} + +BOOL _ILIsAdminTools(LPCITEMIDLIST pidl) +{ + IID *iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(*iid, CLSID_AdminFolderShortcut); + else + return FALSE; +} + +BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl) +{ + LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + + TRACE("(%p)\n",pidl); + + return (pidl && ( (lpPData && (PT_GUID== lpPData->type || PT_SHELLEXT== lpPData->type || PT_YAGUID == lpPData->type)) || + (pidl && pidl->mkid.cb == 0x00) + )); +} + +BOOL _ILIsDrive(LPCITEMIDLIST pidl) +{ + LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + + TRACE("(%p)\n",pidl); + + return (pidl && lpPData && (PT_DRIVE == lpPData->type || + PT_DRIVE1 == lpPData->type || + PT_DRIVE2 == lpPData->type || + PT_DRIVE3 == lpPData->type)); +} + +BOOL _ILIsFolder(LPCITEMIDLIST pidl) +{ + LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + + TRACE("(%p)\n",pidl); + + return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type)); +} + +BOOL _ILIsValue(LPCITEMIDLIST pidl) +{ + LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + + TRACE("(%p)\n",pidl); + + return (pidl && lpPData && PT_VALUE == lpPData->type); +} + +BOOL _ILIsCPanelStruct(LPCITEMIDLIST pidl) +{ + LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + + TRACE("(%p)\n",pidl); + + return (pidl && lpPData && (lpPData->type == 0)); +} + +/************************************************************************** + * _ILIsPidlSimple + */ +BOOL _ILIsPidlSimple(LPCITEMIDLIST pidl) +{ + BOOL ret = TRUE; + + if(! _ILIsDesktop(pidl)) /* pidl=NULL or mkid.cb=0 */ + { + WORD len = pidl->mkid.cb; + LPCITEMIDLIST pidlnext = (LPCITEMIDLIST) (((const BYTE*)pidl) + len ); + + if (pidlnext->mkid.cb) + ret = FALSE; + } + + TRACE("%s\n", ret ? "Yes" : "No"); + return ret; +} + +/************************************************************************** + * + * ### 3. section getting values from pidls ### + */ + + /************************************************************************** + * _ILSimpleGetText + * + * gets the text for the first item in the pidl (eg. simple pidl) + * + * returns the length of the string + */ +DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) +{ + DWORD dwReturn=0; + LPSTR szSrc; + LPWSTR szSrcW; + GUID const * riid; + char szTemp[MAX_PATH]; + + TRACE("(%p %p %x)\n",pidl,szOut,uOutSize); + + if (!pidl) + return 0; + + if (szOut) + *szOut = 0; + + if (_ILIsDesktop(pidl)) + { + /* desktop */ + if (HCR_GetClassNameA(CLSID_ShellDesktop, szTemp, MAX_PATH)) + { + if (szOut) + lstrcpynA(szOut, szTemp, uOutSize); + + dwReturn = strlen (szTemp); + } + } + else if (( szSrc = _ILGetTextPointer(pidl) )) + { + /* filesystem */ + if (szOut) + lstrcpynA(szOut, szSrc, uOutSize); + + dwReturn = strlen(szSrc); + } + else if (( szSrcW = _ILGetTextPointerW(pidl) )) + { + /* unicode filesystem */ + WideCharToMultiByte(CP_ACP,0,szSrcW, -1, szTemp, MAX_PATH, NULL, NULL); + + if (szOut) + lstrcpynA(szOut, szTemp, uOutSize); + + dwReturn = strlen (szTemp); + } + else if (( riid = _ILGetGUIDPointer(pidl) )) + { + /* special folder */ + if (HCR_GetClassNameA(*riid, szTemp, MAX_PATH) ) + { + if (szOut) + lstrcpynA(szOut, szTemp, uOutSize); + + dwReturn = strlen (szTemp); + } + } + else + { + ERR("-- no text\n"); + } + + TRACE("-- (%p=%s 0x%08x)\n",szOut,debugstr_a(szOut),dwReturn); + return dwReturn; +} + + /************************************************************************** + * _ILSimpleGetTextW + * + * gets the text for the first item in the pidl (eg. simple pidl) + * + * returns the length of the string + */ +DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) +{ + DWORD dwReturn; + FileStructW *pFileStructW = _ILGetFileStructW(pidl); + + TRACE("(%p %p %x)\n",pidl,szOut,uOutSize); + + if (pFileStructW) { + lstrcpynW(szOut, pFileStructW->wszName, uOutSize); + dwReturn = wcslen(pFileStructW->wszName); + } else { + GUID const * riid; + WCHAR szTemp[MAX_PATH]; + LPSTR szSrc; + LPWSTR szSrcW; + dwReturn=0; + + if (!pidl) + return 0; + + if (szOut) + *szOut = 0; + + if (_ILIsDesktop(pidl)) + { + /* desktop */ + if (HCR_GetClassNameW(CLSID_ShellDesktop, szTemp, MAX_PATH)) + { + if (szOut) + lstrcpynW(szOut, szTemp, uOutSize); + + dwReturn = wcslen (szTemp); + } + } + else if (( szSrcW = _ILGetTextPointerW(pidl) )) + { + /* unicode filesystem */ + if (szOut) + lstrcpynW(szOut, szSrcW, uOutSize); + + dwReturn = wcslen(szSrcW); + } + else if (( szSrc = _ILGetTextPointer(pidl) )) + { + /* filesystem */ + MultiByteToWideChar(CP_ACP, 0, szSrc, -1, szTemp, MAX_PATH); + + if (szOut) + lstrcpynW(szOut, szTemp, uOutSize); + + dwReturn = wcslen (szTemp); + } + else if (( riid = _ILGetGUIDPointer(pidl) )) + { + /* special folder */ + if ( HCR_GetClassNameW(*riid, szTemp, MAX_PATH) ) + { + if (szOut) + lstrcpynW(szOut, szTemp, uOutSize); + + dwReturn = wcslen (szTemp); + } + } + else + { + ERR("-- no text\n"); + } + } + + TRACE("-- (%p=%s 0x%08x)\n",szOut,debugstr_w(szOut),dwReturn); + return dwReturn; +} + +/************************************************************************** + * + * ### 4. getting pointers to parts of pidls ### + * + ************************************************************************** + * _ILGetDataPointer() + */ +LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl) +{ + if(pidl && pidl->mkid.cb != 0x00) + return (LPPIDLDATA)pidl->mkid.abID; + return NULL; +} + +/************************************************************************** + * _ILGetTextPointerW() + * gets a pointer to the unicode long filename string stored in the pidl + */ +static LPWSTR _ILGetTextPointerW(LPCITEMIDLIST pidl) +{ + /* TRACE(pidl,"(pidl%p)\n", pidl);*/ + + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (!pdata) + return NULL; + + switch (pdata->type) + { + case PT_GUID: + case PT_SHELLEXT: + case PT_YAGUID: + return NULL; + + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + /*return (LPSTR)&(pdata->u.drive.szDriveName);*/ + return NULL; + + case PT_FOLDER: + case PT_FOLDER1: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + /*return (LPSTR)&(pdata->u.file.szNames);*/ + return NULL; + + case PT_WORKGRP: + case PT_COMP: + case PT_NETWORK: + case PT_NETPROVIDER: + case PT_SHARE: + /*return (LPSTR)&(pdata->u.network.szNames);*/ + return NULL; + + case PT_VALUEW: + return (LPWSTR)pdata->u.file.szNames; + } + return NULL; +} + + +/************************************************************************** + * _ILGetTextPointer() + * gets a pointer to the long filename string stored in the pidl + */ +LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl) +{ + /* TRACE(pidl,"(pidl%p)\n", pidl);*/ + + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (!pdata) + return NULL; + + switch (pdata->type) + { + case PT_GUID: + case PT_SHELLEXT: + case PT_YAGUID: + return NULL; + + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + return pdata->u.drive.szDriveName; + + case PT_FOLDER: + case PT_FOLDER1: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return pdata->u.file.szNames; + + case PT_WORKGRP: + case PT_COMP: + case PT_NETWORK: + case PT_NETPROVIDER: + case PT_SHARE: + return pdata->u.network.szNames; + } + return NULL; +} + +/************************************************************************** + * _ILGetSTextPointer() + * gets a pointer to the short filename string stored in the pidl + */ +static LPSTR _ILGetSTextPointer(LPCITEMIDLIST pidl) +{ + /* TRACE(pidl,"(pidl%p)\n", pidl); */ + + LPPIDLDATA pdata =_ILGetDataPointer(pidl); + + if (!pdata) + return NULL; + + switch (pdata->type) + { + case PT_FOLDER: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1; + + case PT_WORKGRP: + return pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1; + } + return NULL; +} + +/************************************************************************** + * _ILGetGUIDPointer() + * + * returns reference to guid stored in some pidls + */ +IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_ILGetDataPointer(pidl); + + TRACE("%p\n", pidl); + + if (!pdata) + return NULL; + + TRACE("pdata->type 0x%04x\n", pdata->type); + switch (pdata->type) + { + case PT_SHELLEXT: + case PT_GUID: + case PT_YAGUID: + return &(pdata->u.guid.guid); + + default: + TRACE("Unknown pidl type 0x%04x\n", pdata->type); + break; + } + return NULL; +} + +/****************************************************************************** + * _ILGetFileStructW [Internal] + * + * Get pointer the a SHITEMID's FileStructW field if present + * + * PARAMS + * pidl [I] The SHITEMID + * + * RETURNS + * Success: Pointer to pidl's FileStructW field. + * Failure: NULL + */ +FileStructW* _ILGetFileStructW(LPCITEMIDLIST pidl) { + FileStructW *pFileStructW; + WORD cbOffset; + + if (!(_ILIsValue(pidl) || _ILIsFolder(pidl))) + return NULL; + + cbOffset = *(const WORD *)((const BYTE *)pidl + pidl->mkid.cb - sizeof(WORD)); + pFileStructW = (FileStructW*)((LPBYTE)pidl + cbOffset); + + /* Currently I don't see a fool prove way to figure out if a pidl is for sure of WinXP + * style with a FileStructW member. If we switch all our shellfolder-implementations to + * the new format, this won't be a problem. For now, we do as many sanity checks as possible. */ + if (cbOffset & 0x1 || /* FileStructW member is word aligned in the pidl */ + /* FileStructW is positioned after FileStruct */ + cbOffset < sizeof(pidl->mkid.cb) + sizeof(PIDLTYPE) + sizeof(FileStruct) || + /* There has to be enough space at cbOffset in the pidl to hold FileStructW and cbOffset */ + cbOffset > pidl->mkid.cb - sizeof(cbOffset) - sizeof(FileStructW) || + pidl->mkid.cb != cbOffset + pFileStructW->cbLen) + { + WARN("Invalid pidl format (cbOffset = %d)!\n", cbOffset); + return NULL; + } + + return pFileStructW; +} + +/************************************************************************* + * _ILGetFileDateTime + * + * Given the ItemIdList, get the FileTime + * + * PARAMS + * pidl [I] The ItemIDList + * pFt [I] the resulted FILETIME of the file + * + * RETURNS + * True if Successful + * + * NOTES + * + */ +BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (!pdata) + return FALSE; + + switch (pdata->type) + { + case PT_FOLDER: + case PT_VALUE: + DosDateTimeToFileTime(pdata->u.file.uFileDate, pdata->u.file.uFileTime, pFt); + break; + default: + return FALSE; + } + return TRUE; +} + +BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + FILETIME ft,lft; + SYSTEMTIME time; + BOOL ret; + + if (_ILGetFileDateTime( pidl, &ft )) + { + FileTimeToLocalFileTime(&ft, &lft); + FileTimeToSystemTime (&lft, &time); + + ret = GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, pOut, uOutSize); + if (ret) + { + /* Append space + time without seconds */ + pOut[ret-1] = ' '; + GetTimeFormatA(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &time, NULL, &pOut[ret], uOutSize - ret); + } + } + else + { + pOut[0] = '\0'; + ret = FALSE; + } + return ret; +} + +/************************************************************************* + * _ILGetFileSize + * + * Given the ItemIdList, get the FileSize + * + * PARAMS + * pidl [I] The ItemIDList + * pOut [I] The buffer to save the result + * uOutsize [I] The size of the buffer + * + * RETURNS + * The FileSize + * + * NOTES + * pOut can be null when no string is needed + * + */ +DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + DWORD dwSize; + + if (!pdata) + return 0; + + switch (pdata->type) + { + case PT_VALUE: + dwSize = pdata->u.file.dwFileSize; + if (pOut) + StrFormatKBSizeA(dwSize, pOut, uOutSize); + return dwSize; + } + if (pOut) + *pOut = 0x00; + return 0; +} + +BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + char szTemp[MAX_PATH]; + const char * pPoint; + LPCITEMIDLIST pidlTemp=pidl; + + TRACE("pidl=%p\n",pidl); + + if (!pidl) + return FALSE; + + pidlTemp = ILFindLastID(pidl); + + if (!_ILIsValue(pidlTemp)) + return FALSE; + if (!_ILSimpleGetText(pidlTemp, szTemp, MAX_PATH)) + return FALSE; + + pPoint = PathFindExtensionA(szTemp); + + if (!*pPoint) + return FALSE; + + pPoint++; + lstrcpynA(pOut, pPoint, uOutSize); + TRACE("%s\n",pOut); + + return TRUE; +} + +/************************************************************************* + * _ILGetFileType + * + * Given the ItemIdList, get the file type description + * + * PARAMS + * pidl [I] The ItemIDList (simple) + * pOut [I] The buffer to save the result + * uOutsize [I] The size of the buffer + * + * RETURNS + * nothing + * + * NOTES + * This function copies as much as possible into the buffer. + */ +void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + char sType[64]; + + if(_ILIsValue(pidl)) + { + char sTemp[64]; + + if(uOutSize > 0) + pOut[0] = 0; + if (_ILGetExtension (pidl, sType, 64)) + { + if (HCR_MapTypeToValueA(sType, sTemp, 64, TRUE)) + { + /* retrieve description */ + if(HCR_MapTypeToValueA(sTemp, pOut, uOutSize, FALSE )) + return; + } + /* display Ext-file as description */ + strcpy(pOut, sType); + _strupr(pOut); + /* load localized file string */ + sTemp[0] = '\0'; + if(LoadStringA(shell32_hInstance, IDS_SHV_COLUMN1, sTemp, 64)) + { + sTemp[63] = '\0'; + strcat(pOut, "-"); + strcat(pOut, sTemp); + } + } + } + else + { + pOut[0] = '\0'; + LoadStringA(shell32_hInstance, IDS_DIRECTORY, pOut, uOutSize); + /* make sure its null terminated */ + pOut[uOutSize-1] = '\0'; + } +} + +/************************************************************************* + * _ILGetFileAttributes + * + * Given the ItemIdList, get the Attrib string format + * + * PARAMS + * pidl [I] The ItemIDList + * pOut [I] The buffer to save the result + * uOutsize [I] The size of the Buffer + * + * RETURNS + * Attributes + * + * FIXME + * return value 0 in case of error is a valid return value + * + */ +DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + LPPIDLDATA pData = _ILGetDataPointer(pidl); + WORD wAttrib = 0; + int i; + + if (!pData) + return 0; + + switch(pData->type) + { + case PT_FOLDER: + case PT_VALUE: + wAttrib = pData->u.file.uFileAttribs; + break; + } + + if(uOutSize >= 6) + { + i=0; + if(wAttrib & FILE_ATTRIBUTE_READONLY) + pOut[i++] = 'R'; + if(wAttrib & FILE_ATTRIBUTE_HIDDEN) + pOut[i++] = 'H'; + if(wAttrib & FILE_ATTRIBUTE_SYSTEM) + pOut[i++] = 'S'; + if(wAttrib & FILE_ATTRIBUTE_ARCHIVE) + pOut[i++] = 'A'; + if(wAttrib & FILE_ATTRIBUTE_COMPRESSED) + pOut[i++] = 'C'; + pOut[i] = 0x00; + } + return wAttrib; +} + +/************************************************************************* + * ILFreeaPidl + * + * free a aPidl struct + */ +void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl) +{ + UINT i; + + if (apidl) + { + for (i = 0; i < cidl; i++) + SHFree(apidl[i]); + SHFree(apidl); + } +} + +/************************************************************************* + * ILCopyaPidl + * + * copies an aPidl struct + */ +LPITEMIDLIST* _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl) +{ + UINT i; + LPITEMIDLIST *apidldest; + + apidldest = (LPITEMIDLIST *)SHAlloc(cidl * sizeof(LPITEMIDLIST)); + if (!apidlsrc) + return NULL; + + for (i = 0; i < cidl; i++) + apidldest[i] = ILClone(apidlsrc[i]); + + return apidldest; +} + +/************************************************************************* + * _ILCopyCidaToaPidl + * + * creates aPidl from CIDA + */ +LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida) +{ + UINT i; + LPITEMIDLIST *dst; + + dst = (LPITEMIDLIST *)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST)); + if (!dst) + return NULL; + + if (pidl) + *pidl = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[0]])); + + for (i = 0; i < cida->cidl; i++) + dst[i] = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[i + 1]])); + + return dst; +} diff --git a/dll/win32/shell32_new/pidl.h b/dll/win32/shell32_new/pidl.h new file mode 100644 index 00000000000..2ba343c5da6 --- /dev/null +++ b/dll/win32/shell32_new/pidl.h @@ -0,0 +1,309 @@ +/* + * internal pidl functions + * + * Copyright 1998 Juergen Schmied + * Copyright 2004 Juan Lang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES: + * + * DO NOT use this definitions outside the shell32.dll ! + * + * The contents of a pidl should never used from a application + * directly. + * + * Undocumented: + * MS says: the abID of SHITEMID should be treated as binary data and not + * be interpreted by applications. Applies to everyone but MS itself. + * Word95 interprets the contents of abID (Filesize/Date) so we have to go + * for binary compatibility here. + */ + +#ifndef __WINE_PIDL_H +#define __WINE_PIDL_H + +#include + +#include +#include +#include +#include + +/* +* the pidl does cache fileattributes to speed up SHGetAttributes when +* displaying a big number of files. +* +* a pidl of NULL means the desktop +* +* The structure of the pidl seems to be a union. The first byte of the +* PIDLDATA describes the type of pidl. +* +* object ! first byte / ! format ! living space +* ! size +* ---------------------------------------------------------------- +* my computer 0x1F/20 guid (2) (usual) +* network 0x1F guid +* bitbucket 0x1F guid +* drive 0x23/25 drive (usual) +* drive 0x25/25 drive (lnk/persistent) +* drive 0x29/25 drive +* shell extension 0x2E guid +* drive 0x2F drive (lnk/persistent) +* folder/file 0x30 folder/file (1) (lnk/persistent) +* folder 0x31 folder (usual) +* valueA 0x32 file (ANSI file name) +* valueW 0x34 file (Unicode file name) +* workgroup 0x41 network (3) +* computer 0x42 network (4) +* net provider 0x46 network +* whole network 0x47 network (5) +* MSITStore 0x61 htmlhlp (7) +* printers/ras connections 0x70 guid +* history/favorites 0xb1 file +* share 0xc3 network (6) +* +* guess: the persistent elements are non tracking +* +* (1) dummy byte is used, attributes are empty +* (2) IID_MyComputer = 20D04FE0L-3AEA-1069-A2D8-08002B30309D +* (3) two strings "workgroup" "Microsoft Network" +* (4) two strings "\\sirius" "Microsoft Network" +* (5) one string "Entire Network" +* (6) two strings "\\sirius\c" "Microsoft Network" +* (7) contains string "mk:@MSITStore:C:\path\file.chm::/path/filename.htm" +* GUID 871C5380-42A0-1069-A2EA-08002B30309D +*/ + +#define PT_CPLAPPLET 0x00 +#define PT_GUID 0x1F +#define PT_DRIVE 0x23 +#define PT_DRIVE2 0x25 +#define PT_DRIVE3 0x29 +#define PT_SHELLEXT 0x2E +#define PT_DRIVE1 0x2F +#define PT_FOLDER1 0x30 +#define PT_FOLDER 0x31 +#define PT_VALUE 0x32 +#define PT_VALUEW 0x34 +#define PT_WORKGRP 0x41 +#define PT_COMP 0x42 +#define PT_NETPROVIDER 0x46 +#define PT_NETWORK 0x47 +#define PT_IESPECIAL1 0x61 +#define PT_YAGUID 0x70 /* yet another guid.. */ +#define PT_IESPECIAL2 0xb1 +#define PT_SHARE 0xc3 + +#include "pshpack1.h" +typedef BYTE PIDLTYPE; + +typedef struct tagPIDLCPanelStruct +{ + BYTE dummy; /*01 is 0x00 */ + DWORD iconIdx; /*02 negative icon ID */ + WORD offsDispName; /*06*/ + WORD offsComment; /*08*/ + CHAR szName[1]; /*10*/ /* terminated by 0x00, followed by display name and comment string */ +} PIDLCPanelStruct; + +typedef struct tagPIDLFontStruct +{ + BYTE dummy; + WORD offsFile; + WCHAR szName[1]; +} PIDLFontStruct; + +typedef struct tagPIDLPrinterStruct +{ + BYTE dummy; + DWORD Attributes; + WORD offsServer; + WCHAR szName[1]; +}PIDLPrinterStruct; + +typedef struct tagPIDLRecycleStruct +{ + FILETIME LastModification; + FILETIME DeletionTime; + ULARGE_INTEGER FileSize; + ULARGE_INTEGER PhysicalFileSize; + DWORD Attributes; + WCHAR szName[1]; +}PIDLRecycleStruct; + +typedef struct tagGUIDStruct +{ + BYTE dummy; /* offset 01 is unknown */ + GUID guid; /* offset 02 */ +} GUIDStruct; + +typedef struct tagDriveStruct +{ + CHAR szDriveName[20]; /*01*/ + WORD unknown; /*21*/ +} DriveStruct; + +typedef struct tagFileStruct +{ + BYTE dummy; /*01 is 0x00 for files or dirs */ + DWORD dwFileSize; /*02*/ + WORD uFileDate; /*06*/ + WORD uFileTime; /*08*/ + WORD uFileAttribs; /*10*/ + CHAR szNames[0]; /*12*/ + /* Here are coming two strings. The first is the long name. + The second the dos name when needed or just 0x00 */ +} FileStruct; + +/* At least on WinXP, this struct is appended with 2-byte-alignment to FileStruct. There follows + * a WORD member after the wszName string, which gives the offset from the beginning of the PIDL + * to the FileStructW member. */ +typedef struct tagFileStructW { + WORD cbLen; + BYTE dummy1[6]; + WORD uCreationDate; + WORD uCreationTime; + WORD uLastAccessDate; + WORD uLastAccessTime; + BYTE dummy2[4]; + WCHAR wszName[0]; +} FileStructW; + +typedef struct tagValueW +{ + WCHAR name[1]; +} ValueWStruct; + +typedef struct tagPIDLDATA +{ PIDLTYPE type; /*00*/ + union + { + struct tagGUIDStruct guid; + struct tagDriveStruct drive; + struct tagFileStruct file; + struct + { WORD dummy; /*01*/ + CHAR szNames[1]; /*03*/ + } network; + struct + { WORD dummy; /*01*/ + DWORD dummy1; /*02*/ + CHAR szName[1]; /*06*/ /* terminated by 0x00 0x00 */ + } htmlhelp; + struct tagPIDLCPanelStruct cpanel; + struct tagValueW valueW; + struct tagPIDLFontStruct cfont; + struct tagPIDLPrinterStruct cprinter; + struct tagPIDLRecycleStruct crecycle; + }u; +} PIDLDATA, *LPPIDLDATA; +#include "poppack.h" + +/* + * getting special values from simple pidls + */ +DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize); +BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +void _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +DWORD _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); + +BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft); +DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT); + +/* + * testing simple pidls + */ +BOOL _ILIsUnicode (LPCITEMIDLIST pidl); +BOOL _ILIsDesktop (LPCITEMIDLIST pidl); +BOOL _ILIsMyComputer (LPCITEMIDLIST pidl); +BOOL _ILIsPrinter (LPCITEMIDLIST pidl); +BOOL _ILIsMyDocuments (LPCITEMIDLIST pidl); +BOOL _ILIsControlPanel (LPCITEMIDLIST pidl); +BOOL _ILIsBitBucket (LPCITEMIDLIST pidl); +BOOL _ILIsAdminTools (LPCITEMIDLIST pidl); +BOOL _ILIsNetHood (LPCITEMIDLIST pidl); +BOOL _ILIsDrive (LPCITEMIDLIST pidl); +BOOL _ILIsFolder (LPCITEMIDLIST pidl); +BOOL _ILIsValue (LPCITEMIDLIST pidl); +BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl); +BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl); +BOOL _ILIsCPanelStruct (LPCITEMIDLIST pidl); +static BOOL __inline _ILIsEqualSimple (LPCITEMIDLIST pidlA, LPCITEMIDLIST pidlB) +{ + return (pidlA->mkid.cb > 0 && !memcmp(pidlA, pidlB, pidlA->mkid.cb)) || + (!pidlA->mkid.cb && !pidlB->mkid.cb); +} +static +BOOL __inline _ILIsEmpty (LPCITEMIDLIST pidl) { return _ILIsDesktop(pidl); } + +/* + * simple pidls + */ + +/* Creates a PIDL with guid format and type type, which must be one of PT_GUID, + * PT_SHELLEXT, or PT_YAGUID. + */ +LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid); + +/* Like _ILCreateGuid, but using the string szGUID. */ +LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID); +LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID); + +/* Commonly used PIDLs representing file system objects. */ +LPITEMIDLIST _ILCreateDesktop (void); +LPITEMIDLIST _ILCreateFromFindDataW(const WIN32_FIND_DATAW *stffile); +HRESULT _ILCreateFromPathW (LPCWSTR szPath, LPITEMIDLIST* ppidl); + +/* Other helpers */ +LPITEMIDLIST _ILCreateMyComputer (void); +LPITEMIDLIST _ILCreateMyDocuments (void); +LPITEMIDLIST _ILCreateIExplore (void); +LPITEMIDLIST _ILCreateControlPanel (void); +LPITEMIDLIST _ILCreatePrinters (void); +LPITEMIDLIST _ILCreateNetwork (void); +LPITEMIDLIST _ILCreateNetHood (void); +LPITEMIDLIST _ILCreateAdminTools (void); +LPITEMIDLIST _ILCreateFont (void); +LPITEMIDLIST _ILCreateBitBucket (void); +LPITEMIDLIST _ILCreateDrive (LPCWSTR); + +/* + * helper functions (getting struct-pointer) + */ +LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST); +LPSTR _ILGetTextPointer (LPCITEMIDLIST); +IID *_ILGetGUIDPointer (LPCITEMIDLIST pidl); +FileStructW *_ILGetFileStructW (LPCITEMIDLIST pidl); + +/* + * debug helper + */ +void pdump (LPCITEMIDLIST pidl); +BOOL pcheck (LPCITEMIDLIST pidl); + +/* + * aPidl helper + */ +void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl); +LPITEMIDLIST * _ILCopyaPidl(const LPCITEMIDLIST * apidlsrc, UINT cidl); +LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, const CIDA * cida); + +BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type); + +#endif diff --git a/dll/win32/shell32_new/precomp.h b/dll/win32/shell32_new/precomp.h new file mode 100644 index 00000000000..a9bc7a39af3 --- /dev/null +++ b/dll/win32/shell32_new/precomp.h @@ -0,0 +1,67 @@ +#ifndef _PRECOMP_H__ +#define _PRECOMP_H__ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +#define WIN32_NO_STATUS +#define NTOS_MODE_USER +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/shell/explorer-new/todo.h" +#include "dlgs.h" +#include "pidl.h" +#include "debughlp.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "cpanel.h" +#include "enumidlist.h" +#include "shfldr.h" +#include "version.h" +#include "shellfolder.h" +#include "xdg.h" +#include "shellapi.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +#endif diff --git a/dll/win32/shell32_new/regsvr.cpp b/dll/win32/shell32_new/regsvr.cpp new file mode 100644 index 00000000000..4567aff5d2f --- /dev/null +++ b/dll/win32/shell32_new/regsvr.cpp @@ -0,0 +1,798 @@ +/* + * self-registerable dll functions for shell32.dll +* + * Copyright (C) 2003 John K. Hohm + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/* + * Near the bottom of this file are the exported DllRegisterServer and + * DllUnregisterServer, which make all this worthwhile. + */ + +/*********************************************************************** + * interface for self-registering + */ +struct regsvr_interface +{ + IID const *iid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + IID const *base_iid; /* can be NULL to omit */ + int num_methods; /* can be <0 to omit */ + CLSID const *ps_clsid; /* can be NULL to omit */ + CLSID const *ps_clsid32; /* can be NULL to omit */ +}; + +static HRESULT register_interfaces(struct regsvr_interface const *list); +static HRESULT unregister_interfaces(struct regsvr_interface const *list); + +struct regsvr_coclass +{ + CLSID const *clsid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + UINT idName; /* can be 0 to omit */ + LPCSTR ips; /* can be NULL to omit */ + LPCSTR ips32; /* can be NULL to omit */ + LPCSTR ips32_tmodel; /* can be NULL to omit */ + DWORD flags; + DWORD dwAttributes; + DWORD dwCallForAttributes; + LPCSTR clsid_str; /* can be NULL to omit */ + LPCSTR progid; /* can be NULL to omit */ + UINT idDefaultIcon; /* can be 0 to omit */ +// CLSID const *clsid_menu; /* can be NULL to omit */ +}; + +/* flags for regsvr_coclass.flags */ +#define SHELLEX_MAYCHANGEDEFAULTMENU 0x00000001 +#define SHELLFOLDER_WANTSFORPARSING 0x00000002 +#define SHELLFOLDER_ATTRIBUTES 0x00000004 +#define SHELLFOLDER_CALLFORATTRIBUTES 0x00000008 +#define SHELLFOLDER_WANTSFORDISPLAY 0x00000010 +#define SHELLFOLDER_HIDEASDELETEPERUSER 0x00000020 + +static HRESULT register_coclasses(struct regsvr_coclass const *list); +static HRESULT unregister_coclasses(struct regsvr_coclass const *list); + +struct regsvr_namespace +{ + CLSID const *clsid; /* CLSID of the namespace extension. NULL for end of list */ + LPCWSTR parent; /* Mount point (MyComputer, Desktop, ..). */ + LPCWSTR value; /* Display name of the extension. */ +}; + +static HRESULT register_namespace_extensions(struct regsvr_namespace const *list); +static HRESULT unregister_namespace_extensions(struct regsvr_namespace const *list); + +/*********************************************************************** + * static helper functions + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); +static LONG register_key_defvalueW(HKEY base, WCHAR const *name, + WCHAR const *value); +static LONG register_key_defvalueA(HKEY base, WCHAR const *name, + char const *value); + +/*********************************************************************** + * register_interfaces + */ +static HRESULT register_interfaces(struct regsvr_interface const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, L"Interface", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + HKEY iid_key; + + StringFromGUID2(*list->iid, buf, 39); + res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_interface_key; + + if (list->name) { + res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->base_iid) { + res = register_key_guid(iid_key, L"BaseInterface", list->base_iid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (0 <= list->num_methods) { + static WCHAR const fmt[3] = { '%', 'd', 0 }; + HKEY key; + + res = RegCreateKeyExW(iid_key, L"NumMethods", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + + swprintf(buf, fmt, list->num_methods); + res = RegSetValueExW(key, NULL, 0, REG_SZ, + (CONST BYTE*)buf, + (wcslen(buf) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid) { + res = register_key_guid(iid_key, L"ProxyStubClsid", list->ps_clsid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid32) { + res = register_key_guid(iid_key, L"ProxyStubClsid32", list->ps_clsid32); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + error_close_iid_key: + RegCloseKey(iid_key); + } + +error_close_interface_key: + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * unregister_interfaces + */ +static HRESULT unregister_interfaces(struct regsvr_interface const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Interface", 0, + KEY_READ | KEY_WRITE, &interface_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(*list->iid, buf, 39); + res = RegDeleteTreeW(interface_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; + } + + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * register_coclasses + */ +static HRESULT register_coclasses(struct regsvr_coclass const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + HKEY clsid_key; + + StringFromGUID2(*list->clsid, buf, 39); + res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->name) { + res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->idName) { + char buffer[64]; + sprintf(buffer, "@shell32.dll,-%u", list->idName); + res = RegSetValueExA(clsid_key, "LocalizedString", 0, REG_SZ, + (CONST BYTE*)(buffer), strlen(buffer)+1); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->idDefaultIcon) { + HKEY icon_key; + char buffer[64]; + + res = RegCreateKeyExW(clsid_key, L"DefaultIcon", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &icon_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + sprintf(buffer, "shell32.dll,-%u", list->idDefaultIcon); + res = RegSetValueExA(icon_key, NULL, 0, REG_SZ, + (CONST BYTE*)(buffer), strlen(buffer)+1); + RegCloseKey(icon_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips) { + res = register_key_defvalueA(clsid_key, L"InProcServer", list->ips); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips32) { + HKEY ips32_key; + + res = RegCreateKeyExW(clsid_key, L"InProcServer32", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &ips32_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, + (CONST BYTE*)list->ips32, + lstrlenA(list->ips32) + 1); + if (res == ERROR_SUCCESS && list->ips32_tmodel) + res = RegSetValueExA(ips32_key, "ThreadingModel", 0, REG_SZ, + (CONST BYTE*)list->ips32_tmodel, + strlen(list->ips32_tmodel) + 1); + RegCloseKey(ips32_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->flags & SHELLEX_MAYCHANGEDEFAULTMENU) { + HKEY shellex_key, mcdm_key; + + res = RegCreateKeyExW(clsid_key, L"shellex", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &shellex_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + res = RegCreateKeyExW(shellex_key, L"MayChangeDefaultMenu", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &mcdm_key, NULL); + RegCloseKey(shellex_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + RegCloseKey(mcdm_key); + } + + if (list->flags & + (SHELLFOLDER_WANTSFORPARSING|SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES|SHELLFOLDER_WANTSFORDISPLAY|SHELLFOLDER_HIDEASDELETEPERUSER)) + { + HKEY shellfolder_key; + + res = RegCreateKeyExW(clsid_key, L"ShellFolder", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &shellfolder_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + if (list->flags & SHELLFOLDER_WANTSFORPARSING) + res = RegSetValueExA(shellfolder_key, "WantsFORPARSING", 0, REG_SZ, (const BYTE *)"", 1); + if (list->flags & SHELLFOLDER_ATTRIBUTES) + res = RegSetValueExA(shellfolder_key, "Attributes", 0, REG_DWORD, + (const BYTE *)&list->dwAttributes, sizeof(DWORD)); + if (list->flags & SHELLFOLDER_CALLFORATTRIBUTES) + res = RegSetValueExA(shellfolder_key, "CallForAttributes", 0, REG_DWORD, + (const BYTE *)&list->dwCallForAttributes, sizeof(DWORD)); + if (list->flags & SHELLFOLDER_WANTSFORDISPLAY) + res = RegSetValueExA(shellfolder_key, "WantsFORDISPLAY", 0, REG_SZ, (const BYTE *)"", 1); + if (list->flags & SHELLFOLDER_HIDEASDELETEPERUSER) + res = RegSetValueExA(shellfolder_key, "HideAsDeletePerUser", 0, REG_SZ, (const BYTE *)"", 1); + RegCloseKey(shellfolder_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->clsid_str) { + res = register_key_defvalueA(clsid_key, L"CLSID", + list->clsid_str); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->progid) { + HKEY progid_key; + + res = register_key_defvalueA(clsid_key, L"ProgID", + list->progid); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegCreateKeyExA(HKEY_CLASSES_ROOT, list->progid, 0, + NULL, 0, KEY_READ | KEY_WRITE, NULL, + &progid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = register_key_defvalueW(progid_key, L"CLSID", buf); + RegCloseKey(progid_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + if (IsEqualIID(list->clsid, CLSID_RecycleBin)) {//if (list->clsid_menu) { + HKEY shellex_key, cmenu_key, menuhandler_key; + res = RegCreateKeyExW(clsid_key, L"shellex", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &shellex_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + res = RegCreateKeyExW(shellex_key, L"ContextMenuHandlers", 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &cmenu_key, NULL); + if (res != ERROR_SUCCESS) { + RegCloseKey(shellex_key); + goto error_close_clsid_key; + } + + StringFromGUID2(*list->clsid, buf, 39); //clsid_menu + res = RegCreateKeyExW(cmenu_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &menuhandler_key, NULL); + RegCloseKey(menuhandler_key); + RegCloseKey(cmenu_key); + RegCloseKey(shellex_key); + } + + error_close_clsid_key: + RegCloseKey(clsid_key); + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * unregister_coclasses + */ +static HRESULT unregister_coclasses(struct regsvr_coclass const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, + KEY_READ | KEY_WRITE, &coclass_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(*list->clsid, buf, 39); + res = RegDeleteTreeW(coclass_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->progid) { + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + } + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/********************************************************************** + * register_namespace_extensions + */ +static WCHAR *get_namespace_key(struct regsvr_namespace const *list) { + static const WCHAR wszExplorerKey[] = { + 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'E','x','p','l','o','r','e','r','\\',0 }; + static const WCHAR wszNamespace[] = { '\\','N','a','m','e','s','p','a','c','e','\\',0 }; + WCHAR *pwszKey, *pwszCLSID; + + pwszKey = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, sizeof(wszExplorerKey)+sizeof(wszNamespace)+ + sizeof(WCHAR)*(wcslen(list->parent)+CHARS_IN_GUID)); + if (!pwszKey) + return NULL; + + wcscpy(pwszKey, wszExplorerKey); + wcscat(pwszKey, list->parent); + wcscat(pwszKey, wszNamespace); + if (FAILED(StringFromCLSID(*list->clsid, &pwszCLSID))) { + HeapFree(GetProcessHeap(), 0, pwszKey); + return NULL; + } + wcscat(pwszKey, pwszCLSID); + CoTaskMemFree(pwszCLSID); + + return pwszKey; +} + +static HRESULT register_namespace_extensions(struct regsvr_namespace const *list) { + WCHAR *pwszKey; + HKEY hKey; + + for (; list->clsid; list++) { + pwszKey = get_namespace_key(list); + + /* Create the key and set the value. */ + if (pwszKey && ERROR_SUCCESS == + RegCreateKeyExW(HKEY_LOCAL_MACHINE, pwszKey, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL)) + { + RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE *)list->value, sizeof(WCHAR)*(wcslen(list->value)+1)); + RegCloseKey(hKey); + } + + HeapFree(GetProcessHeap(), 0, pwszKey); + } + return S_OK; +} + +static HRESULT unregister_namespace_extensions(struct regsvr_namespace const *list) { + WCHAR *pwszKey; + + for (; list->clsid; list++) { + pwszKey = get_namespace_key(list); + RegDeleteKeyW(HKEY_LOCAL_MACHINE, pwszKey); + HeapFree(GetProcessHeap(), 0, pwszKey); + } + return S_OK; +} + +/*********************************************************************** + * regsvr_key_guid + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) +{ + WCHAR buf[39]; + + StringFromGUID2(*guid, buf, 39); + return register_key_defvalueW(base, name, buf); +} + +/*********************************************************************** + * regsvr_key_defvalueW + */ +static LONG register_key_defvalueW( + HKEY base, + WCHAR const *name, + WCHAR const *value) +{ + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + (wcslen(value) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * regsvr_key_defvalueA + */ +static LONG register_key_defvalueA( + HKEY base, + WCHAR const *name, + char const *value) +{ + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + lstrlenA(value) + 1); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * coclass list + */ +static GUID const CLSID_Desktop = { + 0x00021400, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; + +static GUID const CLSID_Shortcut = { + 0x00021401, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; + +static struct regsvr_coclass const coclass_list[] = { + { + &CLSID_Desktop, + "Desktop", + IDS_DESKTOP, + NULL, + "shell32.dll", + "Apartment" + }, + { + &CLSID_ControlPanel, + "Shell Control Panel Folder", + IDS_CONTROLPANEL, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_WANTSFORDISPLAY|SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_HIDEASDELETEPERUSER, + SFGAO_FOLDER|SFGAO_HASSUBFOLDER, + 0, + NULL, + NULL, + IDI_SHELL_CONTROL_PANEL1 + }, + { + &CLSID_DragDropHelper, + "Shell Drag and Drop Helper", + 0, + NULL, + "shell32.dll", + "Apartment" + }, + { + &CLSID_Printers, + "Printers & Fax", + IDS_PRINTERS, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_ATTRIBUTES, + SFGAO_FOLDER, + 0, + NULL, + NULL, + IDI_SHELL_PRINTERS_FOLDER + }, + { + &CLSID_MyComputer, + "My Computer", + IDS_MYCOMPUTER, + NULL, + "shell32.dll", + "Apartment" + }, + { + &CLSID_NetworkPlaces, + "My Network Places", + IDS_NETWORKPLACE, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, + SFGAO_FOLDER|SFGAO_HASPROPSHEET, + 0, + NULL, + NULL, + IDI_SHELL_MY_NETWORK_PLACES + }, + { + &CLSID_FontsFolderShortcut, + "Fonts", + IDS_FONTS, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_ATTRIBUTES, + SFGAO_FOLDER, + 0, + NULL, + NULL, + IDI_SHELL_FONTS_FOLDER + }, + { + &CLSID_AdminFolderShortcut, + "Administrative Tools", + IDS_ADMINISTRATIVETOOLS, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_ATTRIBUTES, + SFGAO_FOLDER, + 0, + NULL, + NULL, + IDI_SHELL_ADMINTOOLS //FIXME + }, + { + &CLSID_Shortcut, + "Shortcut", + 0, + NULL, + "shell32.dll", + "Apartment", + SHELLEX_MAYCHANGEDEFAULTMENU + }, + { + &CLSID_AutoComplete, + "AutoComplete", + 0, + NULL, + "shell32.dll", + "Apartment", + }, + { + &CLSID_FolderShortcut, + "Foldershortcut", + 0, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, + SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_LINK, + SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR + }, + { + &CLSID_MyDocuments, + "My Documents", + IDS_PERSONAL, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_WANTSFORPARSING|SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, + SFGAO_FILESYSANCESTOR|SFGAO_FOLDER|SFGAO_HASSUBFOLDER, + SFGAO_FILESYSTEM + }, + { + &CLSID_RecycleBin, + "Trash", + IDS_RECYCLEBIN_FOLDER_NAME, + NULL, + "shell32.dll", + "Apartment", + SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES, + SFGAO_FOLDER|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET, + 0, + NULL, + NULL, + IDI_SHELL_FULL_RECYCLE_BIN +// &CLSID_RecycleBin + }, + { + &CLSID_ShellFSFolder, + "Shell File System Folder", + 0, + NULL, + "shell32.dll", + "Apartment" + }, + { + &CLSID_ShellFolderViewOC, + "Microsoft Shell Folder View Router", + 0, + NULL, + "shell32.dll", + "Apartment" + }, + { + &CLSID_StartMenu, + "Start Menu", + 0, + NULL, + "shell32.dll", + "Apartment" + }, + { + &CLSID_MenuBandSite, + "Menu Site", + 0, + NULL, + "shell32.dll", + "Apartment" + }, + { NULL } /* list terminator */ +}; + +/*********************************************************************** + * interface list + */ + +static struct regsvr_interface const interface_list[] = { + { NULL } /* list terminator */ +}; + +/*********************************************************************** + * namespace extensions list + */ +static const WCHAR wszDesktop[] = { 'D','e','s','k','t','o','p',0 }; +static const WCHAR wszSlash[] = { '/', 0 }; +static const WCHAR wszMyDocuments[] = { 'M','y',' ','D','o','c','u','m','e','n','t','s', 0 }; +static const WCHAR wszRecycleBin[] = { 'T','r','a','s','h', 0 }; +static const WCHAR wszMyComputer[] = { 'M','y','C','o','m','p','u','t','e','r',0 }; +static const WCHAR wszControlPanel[] = { 'C','o','n','t','r','o','l','P','a','n','e','l',0 }; +static const WCHAR wszFolderOptions[] = { 'F','o','l','d','e','r',' ','O','p','t','i','o','n','s',0 }; +static const WCHAR wszNethoodFolder[] = { 'N','e','t','h','o','o','d',' ','f','o','l','d','e','r',0}; +static const WCHAR wszPrinters[] = { 'P','r','i','n','t','e','r','s',0 }; +static const WCHAR wszFonts[] = { 'F','o','n','t','s',0 }; +static const WCHAR wszAdminTools[] = { 'A','d','m','i','n','T','o','o','l','s',0 }; + +static struct regsvr_namespace const namespace_extensions_list[] = { + { + &CLSID_MyDocuments, + L"Desktop", + L"My Documents" + }, + { + &CLSID_NetworkPlaces, + L"Desktop", + L"Nethood folder" + }, + { + &CLSID_RecycleBin, + L"Desktop", + L"Trash" + }, + { + &CLSID_ControlPanel, + L"MyComputer", + L"ControlPanel" + }, + { + &CLSID_FolderOptions, + L"ControlPanel" + L"Folder Options" + }, + { + &CLSID_FontsFolderShortcut, + L"ControlPanel" + L"Fonts" + }, + { + &CLSID_Printers, + L"ControlPanel" + L"Printers" + }, + { + &CLSID_AdminFolderShortcut, + L"ControlPanel" + L"AdminTools" + }, + { NULL } +}; + +/*********************************************************************** + * DllRegisterServer (SHELL32.@) + */ +EXTERN_C HRESULT WINAPI DllRegisterServer(void) +{ + HRESULT hr; + + TRACE("\n"); + + hr = register_coclasses(coclass_list); + if (SUCCEEDED(hr)) + hr = register_interfaces(interface_list); + if (SUCCEEDED(hr)) + hr = SHELL_RegisterShellFolders(); + if (SUCCEEDED(hr)) + hr = register_namespace_extensions(namespace_extensions_list); + return hr; +} + +/*********************************************************************** + * DllUnregisterServer (SHELL32.@) + */ +EXTERN_C HRESULT WINAPI DllUnregisterServer(void) +{ + HRESULT hr; + + TRACE("\n"); + + hr = unregister_coclasses(coclass_list); + if (SUCCEEDED(hr)) + hr = unregister_interfaces(interface_list); + if (SUCCEEDED(hr)) + hr = unregister_namespace_extensions(namespace_extensions_list); + return hr; +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/adminfoldershortcut.rgs b/dll/win32/shell32_new/res/Copy of rgs/adminfoldershortcut.rgs new file mode 100644 index 00000000000..5b031a8692b --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/adminfoldershortcut.rgs @@ -0,0 +1,56 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {D20EA4E1-3957-11d2-A40B-0C5020524153} = s 'Administrative Tools' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '5' + val InfoTip = s '@%SystemRoot%\system32\SHELL32.dll,-22921' + val LocalizedString = s '@%SystemRoot%\system32\SHELL32.dll,-22982' + DefaultIcon = s '%SystemRoot%\system32\main.cpl,10' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + Instance + { + val CLSID = s '{0AFACED1-E828-11D1-9187-B532F1E9575D}' + InitPropertyBag + { + val Attributes = s '0x00000011' + val TargetSpecialFolder = s '0x002f' + } + } + 'ShellFolder' + { + val Attributes = d '&H60000100' + val WantsFORPARSING = s '' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + ControlPanel + { + NameSpace + { + '{D20EA4E1-3957-11d2-A40B-0C5020524153}' = s 'Administrative Tools' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/autocomplete.rgs b/dll/win32/shell32_new/res/Copy of rgs/autocomplete.rgs new file mode 100644 index 00000000000..9afd9d5cb86 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/autocomplete.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {00BB2763-6A77-11D0-A535-00C04FD7D062} = s 'Shell ReactOS AutoComplete' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/controlpanel.rgs b/dll/win32/shell32_new/res/Copy of rgs/controlpanel.rgs new file mode 100644 index 00000000000..5164a1e3dea --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/controlpanel.rgs @@ -0,0 +1,52 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {21EC2020-3AEA-1069-A2DD-08002B30309D} + { + val InfoTip = s '@%SystemRoot%\system32\SHELL32.dll,-31361' + DefaultIcon = s '%SystemRoot%\System32\shell32.dll,-137' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + ShellFolder + { + val Attributes = d '0' + val HideAsDeletePerUser = s '' + val WantsFORDISPLAY = s '' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + ControlPanel + { + NameSpace + { + } + } + MyComputer + { + NameSpace + { + Controls = s '{21EC2020-3AEA-1069-A2DD-08002B30309D}' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/dragdrophelper.rgs b/dll/win32/shell32_new/res/Copy of rgs/dragdrophelper.rgs new file mode 100644 index 00000000000..25d710d188c --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/dragdrophelper.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {4657278A-411B-11d2-839A-00C04FD918D0} = s 'Shell Drag and Drop helper' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/folderoptions.rgs b/dll/win32/shell32_new/res/Copy of rgs/folderoptions.rgs new file mode 100644 index 00000000000..51010436450 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/folderoptions.rgs @@ -0,0 +1,56 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {6DFD7C5C-2451-11d3-A299-00C04F8EF6AF} = s 'Folder Options' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '1' + val InfoTip = s '@%SystemRoot%\system32\SHELL32.dll,-22924' + val LocalizedString = s '@%SystemRoot%\system32\SHELL32.dll,-22985' + DefaultIcon = s '%SystemRoot%\system32\SHELL32.dll,-210' + Shell + { + Open + { + Command = s 'rundll32.exe shell32.dll,Options_RunDLL 0' + } + RunAs + { + Command = s 'rundll32.exe shell32.dll,Options_RunDLL 0' + { + val Extended = s '' + } + } + } + ShellFolder + { + val Attributes = d '0' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + Desktop + { + NameSpace + { + '{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}' = s 'Folder Options' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/foldershortcut.rgs b/dll/win32/shell32_new/res/Copy of rgs/foldershortcut.rgs new file mode 100644 index 00000000000..9df72086aed --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/foldershortcut.rgs @@ -0,0 +1,23 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {0AFACED1-E828-11D1-9187-B532F1E9575D} = s 'Folder Shortcut' + { + val Details = s 'prop:Name;LinkTarget' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'shellex' + { + IconHandler = s '{0AFACED1-E828-11D1-9187-B532F1E9575D}' + } + 'ShellFolder' + { + val Attributes = d '&H60410137' + val CallForAttributes = d '&Hf0000000' + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/fontsfoldershortcut.rgs b/dll/win32/shell32_new/res/Copy of rgs/fontsfoldershortcut.rgs new file mode 100644 index 00000000000..bc13f13c548 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/fontsfoldershortcut.rgs @@ -0,0 +1,56 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {D20EA4E1-3957-11d2-A40B-0C5020524152} = s 'Fonts' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '&Hffffffff' + val InfoTip = s '@%SystemRoot%\system32\SHELL32.dll,-22920' + val LocalizedString = s '@%SystemRoot%\system32\SHELL32.dll,-22981' + DefaultIcon = s '%SystemRoot%\system32\main.cpl,9' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + Instance + { + val CLSID = s '{0AFACED1-E828-11D1-9187-B532F1E9575D}' + InitPropertyBag + { + val Attributes = s '0x00000015' + val TargetSpecialFolder = s '0x0014' + } + } + 'ShellFolder' + { + val Attributes = d '&H60000100' + val WantsFORPARSING = s '' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + ControlPanel + { + NameSpace + { + '{D20EA4E1-3957-11d2-A40B-0C5020524152}' = s 'Fonts' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/menubandsite.rgs b/dll/win32/shell32_new/res/Copy of rgs/menubandsite.rgs new file mode 100644 index 00000000000..c597e873135 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/menubandsite.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {E13EF4E4-D2F2-11d0-9816-00C04FD91972} = s 'Menu Site' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/mycomputer.rgs b/dll/win32/shell32_new/res/Copy of rgs/mycomputer.rgs new file mode 100644 index 00000000000..6b60091ef8f --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/mycomputer.rgs @@ -0,0 +1,63 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {20D04FE0-3AEA-1069-A2D8-08002B30309D} = s 'My Computer' + { + val 'InfoTip' = s '@%SystemRoot%\system32\SHELL32.dll,-22913' + val 'IntroText' = s '@%SystemRoot%\system32\SHELL32.dll,-31751' + val 'LocalizedString' = s '@%SystemRoot%\system32\SHELL32.dll,-9216' + DefaultIcon = s '%SystemRoot%\Explorer.exe,0' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'HideOnDesktopPerUser' = s '' + } + 'shell' + { + 'find' = s '@%SystemRoot%\system32\SHELL32.dll,-8503' + { + val 'SuppressionPolicy' = d '&H00000080' + 'command' = s '%SystemRoot%\Explorer.exe' + 'ddeexec' = s '[FindFolder("%l", %I)]' + { + 'application' = s 'Folders' + 'topic' = s 'AppProperties' + } + } + 'Manage' + { + 'command' = s '%windir%\system32\mmc.exe /s %windir%\system32\compmgmt.msc' + val 'SuppressionPolicy' = d '&H4000003c' + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + MyComputer + { + NameSpace + { + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/mydocuments.rgs b/dll/win32/shell32_new/res/Copy of rgs/mydocuments.rgs new file mode 100644 index 00000000000..8b57afe0d85 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/mydocuments.rgs @@ -0,0 +1,67 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {450D8FBA-AD25-11D0-98A8-0800361B1103} + { + val 'InfoTip' = s '@%SystemRoot%\system32\SHELL32.dll,-22914' + val 'SortOrderIndex' = d '&H00000048' + val 'LocalizedString' = s '@%SystemRoot%\system32\SHELL32.dll,-9227' + DefaultIcon = s '%SystemRoot%\system32\SHELL32.dll,-235' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + val LoadWithoutCOM = s '' + } + 'ShellFolder' + { + val 'Attributes' = d '&Hf080013d' + val 'CallForAttributes' = d '&H00020040' + val 'HideOnDesktopPerUser' = s '' + val 'QueryForOverlay' = s '' + val 'WantsFORPARSING' = s '' + } + 'shell' + { + 'find' = s '@%SystemRoot%\system32\SHELL32.dll,-29188' + { + val 'SuppressionPolicy' = d '&H00000080' + 'command' = s '%SystemRoot%\Explorer.exe' + 'ddeexec' = s '[FindFolder("%l", %I)]' + { + 'application' = s 'Folders' + 'topic' = s 'AppProperties' + } + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + Desktop + { + NameSpace + { + '{450D8FBA-AD25-11D0-98A8-0800361B1103}' + { + val 'Removal Message' = s '@mydocs.dll,-900' + } + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/networkplaces.rgs b/dll/win32/shell32_new/res/Copy of rgs/networkplaces.rgs new file mode 100644 index 00000000000..8ca1c84e583 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/networkplaces.rgs @@ -0,0 +1,58 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {208D2C60-3AEA-1069-A2D7-08002B30309D} = s 'My Network Places' + { + val 'InfoTip' = s '@%SystemRoot%\system32\SHELL32.dll,-22912' + val 'IntroText' = s '@%SystemRoot%\system32\SHELL32.dll,-31749' + val 'LocalizedString' = s '@%SystemRoot%\system32\SHELL32.dll,-9217' + DefaultIcon = s '%SystemRoot%\system32\SHELL32.dll,17' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'HideOnDesktopPerUser' = s '' + } + 'shell' + { + 'find' = s '@%SystemRoot%\system32\SHELL32.dll,-29188' + { + val 'SuppressionPolicy' = d '&H00000080' + 'command' = s '%SystemRoot%\Explorer.exe' + 'ddeexec' = s '[FindFolder("%l", %I)]' + { + 'application' = s 'Folders' + 'topic' = s 'AppProperties' + } + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NetworkNeighborhood + { + NameSpace + { + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/newmenu.rgs b/dll/win32/shell32_new/res/Copy of rgs/newmenu.rgs new file mode 100644 index 00000000000..b3a6cab8f49 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/newmenu.rgs @@ -0,0 +1,14 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {D969A300-E7FF-11d0-A93B-00A0C90F2719} = s 'ReactOS New Object Service' + { + val flags = d '0' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/printers.rgs b/dll/win32/shell32_new/res/Copy of rgs/printers.rgs new file mode 100644 index 00000000000..722170a8c71 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/printers.rgs @@ -0,0 +1,53 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {2227A280-3AEA-1069-A2DE-08002B30309D} = s 'Printers and Faxes' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '2' + val 'InfoTip' = s '@%SystemRoot%\system32\SHELL32.dll,-12696' + val 'IntroText' = s '@%SystemRoot%\system32\SHELL32.dll,-31757' + val 'LocalizedString' = s '@%SystemRoot%\system32\SHELL32.dll,-9319' + DefaultIcon = s '%SystemRoot%\System32\shell32.dll,-138' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'Attributes' = d '&H20000004' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + Desktop + { + NameSpace + { + Printers = s '{2227A280-3AEA-1069-A2DE-08002B30309D}' + { + val 'IconIndex' = d '&H0000012C' + val 'Info' = s 'Adds, removes and changes settings for printers.' + val 'Module' = s '%SystemRoot%\system32\main.cpl' + val 'Name' = s 'Printers and Faxes' + } + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/recyclebin.rgs b/dll/win32/shell32_new/res/Copy of rgs/recyclebin.rgs new file mode 100644 index 00000000000..dff8257e045 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/recyclebin.rgs @@ -0,0 +1,59 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {645FF040-5081-101B-9F08-00AA002F954E} + { + val 'InfoTip' = s '@%SystemRoot%\system32\SHELL32.dll,-22915' + val 'IntroText' = d '@%SystemRoot%\system32\SHELL32.dll,-31748' + val 'LocalizedString' = s '@%SystemRoot%\system32\SHELL32.dll,-8964' + DefaultIcon = s '%SystemRoot%\System32\shell32.dll,31' + { + val Empty = s '%SystemRoot%\System32\shell32.dll,31' + val Full = s '%SystemRoot%\System32\shell32.dll,32' + } + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'Attributes' = b '&H40 &H01 &H00 &H20' + val 'CallForAttributes' = d '&H00000040' + } + 'shellex' + { + 'find' = s '@%SystemRoot%\system32\SHELL32.dll,-29188' + { + 'ContextMenuHandlers' + 'PropertySheetHandlers' + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + Desktop + { + NameSpace + { + '{645FF040-5081-101B-9F08-00AA002F954E}' = s 'Recycle Bin' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/shelldesktop.rgs b/dll/win32/shell32_new/res/Copy of rgs/shelldesktop.rgs new file mode 100644 index 00000000000..f421c430cc2 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/shelldesktop.rgs @@ -0,0 +1,45 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {00021400-0000-0000-C000-000000000046} = s 'Desktop' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + shellex + { + ExtShellFolderViews + { + {5984FFE0-28D4-11CF-AE66-08002B2E1262} + val PersistMoniker = s 'file://%userappdata%\Microsoft\Internet Explorer\Desktop.htt' + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + Desktop + { + NameSpace + { + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/shellfsfolder.rgs b/dll/win32/shell32_new/res/Copy of rgs/shellfsfolder.rgs new file mode 100644 index 00000000000..00d9daee97b --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/shellfsfolder.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {F3364BA0-65B9-11CE-A9BA-00AA004AE837} = s 'Shell File System Folder' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/shelllink.rgs b/dll/win32/shell32_new/res/Copy of rgs/shelllink.rgs new file mode 100644 index 00000000000..a5972a70f9f --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/shelllink.rgs @@ -0,0 +1,23 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {00021401-0000-0000-C000-000000000046} = s 'Shortcut' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + PersistentAddinsRegistered + { + {89BCB740-6119-101A-BCB7-00DD010655AF} = s '{00021401-0000-0000-C000-000000000046}' + } + PersistentHandler = s '{00021401-0000-0000-C000-000000000046}' + ProgID = s 'lnkfile' + shellex + { + MayChangeDefaultMenu = s '' + } + } + } +} diff --git a/dll/win32/shell32_new/res/Copy of rgs/startmenu.rgs b/dll/win32/shell32_new/res/Copy of rgs/startmenu.rgs new file mode 100644 index 00000000000..a91a3464ec2 --- /dev/null +++ b/dll/win32/shell32_new/res/Copy of rgs/startmenu.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {4622AD11-FF23-11d0-8D34-00A0C90F2719} = s 'Start Menu' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/avis/160+161+167+168.avi b/dll/win32/shell32_new/res/avis/160+161+167+168.avi new file mode 100644 index 00000000000..a3c995a1397 Binary files /dev/null and b/dll/win32/shell32_new/res/avis/160+161+167+168.avi differ diff --git a/dll/win32/shell32_new/res/avis/162.avi b/dll/win32/shell32_new/res/avis/162.avi new file mode 100644 index 00000000000..847b9e6a5bc Binary files /dev/null and b/dll/win32/shell32_new/res/avis/162.avi differ diff --git a/dll/win32/shell32_new/res/avis/163.avi b/dll/win32/shell32_new/res/avis/163.avi new file mode 100644 index 00000000000..feff442394f Binary files /dev/null and b/dll/win32/shell32_new/res/avis/163.avi differ diff --git a/dll/win32/shell32_new/res/avis/164+169.avi b/dll/win32/shell32_new/res/avis/164+169.avi new file mode 100644 index 00000000000..f1f781bd85e Binary files /dev/null and b/dll/win32/shell32_new/res/avis/164+169.avi differ diff --git a/dll/win32/shell32_new/res/avis/170.avi b/dll/win32/shell32_new/res/avis/170.avi new file mode 100644 index 00000000000..3fd91c87b6a Binary files /dev/null and b/dll/win32/shell32_new/res/avis/170.avi differ diff --git a/dll/win32/shell32_new/res/avis/Licence/COPYING b/dll/win32/shell32_new/res/avis/Licence/COPYING new file mode 100644 index 00000000000..e709d0c050b --- /dev/null +++ b/dll/win32/shell32_new/res/avis/Licence/COPYING @@ -0,0 +1,67 @@ +Creative Commons Attribution-ShareAlike 2.5 License Agreement + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. + 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. + 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. + 4. "Original Author" means the individual or entity who created the Work. + 5. "Work" means the copyrightable work of authorship offered under the terms of this License. + 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 7. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + 2. to create and reproduce Derivative Works; + 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + 5. + + For the avoidance of doubt, where the work is a musical composition: + 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. + 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). + 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested. + 2. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. + 3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at http://creativecommons.org/. diff --git a/dll/win32/shell32_new/res/avis/Licence/Tango.txt b/dll/win32/shell32_new/res/avis/Licence/Tango.txt new file mode 100644 index 00000000000..642b2937a84 --- /dev/null +++ b/dll/win32/shell32_new/res/avis/Licence/Tango.txt @@ -0,0 +1,10 @@ +The following avi's use icons from the Tango project and are +released under Creative Commons Attribution-ShareAlike 2.5 License. +Please see COPYING for details + +160+161+167+168.avi +162.avi +163.avi +164+169.avi +170.avi + diff --git a/dll/win32/shell32_new/res/bitmaps/204.bmp b/dll/win32/shell32_new/res/bitmaps/204.bmp new file mode 100644 index 00000000000..f6647a5e4bd Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/204.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/205.bmp b/dll/win32/shell32_new/res/bitmaps/205.bmp new file mode 100644 index 00000000000..445357ddf02 Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/205.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/206.bmp b/dll/win32/shell32_new/res/bitmaps/206.bmp new file mode 100644 index 00000000000..32b385dcef4 Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/206.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/207.bmp b/dll/win32/shell32_new/res/bitmaps/207.bmp new file mode 100644 index 00000000000..b401b0c9340 Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/207.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/225.bmp b/dll/win32/shell32_new/res/bitmaps/225.bmp new file mode 100644 index 00000000000..17bb5271d71 Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/225.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/226.bmp b/dll/win32/shell32_new/res/bitmaps/226.bmp new file mode 100644 index 00000000000..d067e61e41b Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/226.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/227.bmp b/dll/win32/shell32_new/res/bitmaps/227.bmp new file mode 100644 index 00000000000..031b38ed775 Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/227.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/228.bmp b/dll/win32/shell32_new/res/bitmaps/228.bmp new file mode 100644 index 00000000000..5a10acb43e8 Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/228.bmp differ diff --git a/dll/win32/shell32_new/res/bitmaps/shell_about_logo_24bpp.bmp b/dll/win32/shell32_new/res/bitmaps/shell_about_logo_24bpp.bmp new file mode 100644 index 00000000000..335383f3f1d Binary files /dev/null and b/dll/win32/shell32_new/res/bitmaps/shell_about_logo_24bpp.bmp differ diff --git a/dll/win32/shell32_new/res/icons/1.ico b/dll/win32/shell32_new/res/icons/1.ico new file mode 100644 index 00000000000..baae0b125b3 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/1.ico differ diff --git a/dll/win32/shell32_new/res/icons/10.ico b/dll/win32/shell32_new/res/icons/10.ico new file mode 100644 index 00000000000..3e74ff6db78 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/10.ico differ diff --git a/dll/win32/shell32_new/res/icons/1001.ico b/dll/win32/shell32_new/res/icons/1001.ico new file mode 100644 index 00000000000..e7b9f8c1f33 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/1001.ico differ diff --git a/dll/win32/shell32_new/res/icons/1004.ico b/dll/win32/shell32_new/res/icons/1004.ico new file mode 100644 index 00000000000..6008790389d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/1004.ico differ diff --git a/dll/win32/shell32_new/res/icons/11.ico b/dll/win32/shell32_new/res/icons/11.ico new file mode 100644 index 00000000000..34dfaadec3a Binary files /dev/null and b/dll/win32/shell32_new/res/icons/11.ico differ diff --git a/dll/win32/shell32_new/res/icons/12.ico b/dll/win32/shell32_new/res/icons/12.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/12.ico differ diff --git a/dll/win32/shell32_new/res/icons/13.ico b/dll/win32/shell32_new/res/icons/13.ico new file mode 100644 index 00000000000..bcafb16a18c Binary files /dev/null and b/dll/win32/shell32_new/res/icons/13.ico differ diff --git a/dll/win32/shell32_new/res/icons/134.ico b/dll/win32/shell32_new/res/icons/134.ico new file mode 100644 index 00000000000..a35009600a0 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/134.ico differ diff --git a/dll/win32/shell32_new/res/icons/135.ico b/dll/win32/shell32_new/res/icons/135.ico new file mode 100644 index 00000000000..a35009600a0 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/135.ico differ diff --git a/dll/win32/shell32_new/res/icons/137.ico b/dll/win32/shell32_new/res/icons/137.ico new file mode 100644 index 00000000000..634e6d877ba Binary files /dev/null and b/dll/win32/shell32_new/res/icons/137.ico differ diff --git a/dll/win32/shell32_new/res/icons/138.ico b/dll/win32/shell32_new/res/icons/138.ico new file mode 100644 index 00000000000..c4fbdb0502c Binary files /dev/null and b/dll/win32/shell32_new/res/icons/138.ico differ diff --git a/dll/win32/shell32_new/res/icons/14.ico b/dll/win32/shell32_new/res/icons/14.ico new file mode 100644 index 00000000000..558df85c00e Binary files /dev/null and b/dll/win32/shell32_new/res/icons/14.ico differ diff --git a/dll/win32/shell32_new/res/icons/15.ico b/dll/win32/shell32_new/res/icons/15.ico new file mode 100644 index 00000000000..ebc40a9a86c Binary files /dev/null and b/dll/win32/shell32_new/res/icons/15.ico differ diff --git a/dll/win32/shell32_new/res/icons/151.ico b/dll/win32/shell32_new/res/icons/151.ico new file mode 100644 index 00000000000..5d68e40db91 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/151.ico differ diff --git a/dll/win32/shell32_new/res/icons/152.ico b/dll/win32/shell32_new/res/icons/152.ico new file mode 100644 index 00000000000..82ac3f48df4 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/152.ico differ diff --git a/dll/win32/shell32_new/res/icons/153.ico b/dll/win32/shell32_new/res/icons/153.ico new file mode 100644 index 00000000000..93ebc0c6687 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/153.ico differ diff --git a/dll/win32/shell32_new/res/icons/154.ico b/dll/win32/shell32_new/res/icons/154.ico new file mode 100644 index 00000000000..9ac408daeb2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/154.ico differ diff --git a/dll/win32/shell32_new/res/icons/155.ico b/dll/win32/shell32_new/res/icons/155.ico new file mode 100644 index 00000000000..c0b4b751e82 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/155.ico differ diff --git a/dll/win32/shell32_new/res/icons/156.ico b/dll/win32/shell32_new/res/icons/156.ico new file mode 100644 index 00000000000..c0b4b751e82 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/156.ico differ diff --git a/dll/win32/shell32_new/res/icons/157.ico b/dll/win32/shell32_new/res/icons/157.ico new file mode 100644 index 00000000000..c0b4b751e82 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/157.ico differ diff --git a/dll/win32/shell32_new/res/icons/16.ico b/dll/win32/shell32_new/res/icons/16.ico new file mode 100644 index 00000000000..56edfcbb2af Binary files /dev/null and b/dll/win32/shell32_new/res/icons/16.ico differ diff --git a/dll/win32/shell32_new/res/icons/160.ico b/dll/win32/shell32_new/res/icons/160.ico new file mode 100644 index 00000000000..5120bcfe6ff Binary files /dev/null and b/dll/win32/shell32_new/res/icons/160.ico differ diff --git a/dll/win32/shell32_new/res/icons/161.ico b/dll/win32/shell32_new/res/icons/161.ico new file mode 100644 index 00000000000..706daeffdab Binary files /dev/null and b/dll/win32/shell32_new/res/icons/161.ico differ diff --git a/dll/win32/shell32_new/res/icons/16710.ico b/dll/win32/shell32_new/res/icons/16710.ico new file mode 100644 index 00000000000..706daeffdab Binary files /dev/null and b/dll/win32/shell32_new/res/icons/16710.ico differ diff --git a/dll/win32/shell32_new/res/icons/16715.ico b/dll/win32/shell32_new/res/icons/16715.ico new file mode 100644 index 00000000000..706daeffdab Binary files /dev/null and b/dll/win32/shell32_new/res/icons/16715.ico differ diff --git a/dll/win32/shell32_new/res/icons/16717.ico b/dll/win32/shell32_new/res/icons/16717.ico new file mode 100644 index 00000000000..706daeffdab Binary files /dev/null and b/dll/win32/shell32_new/res/icons/16717.ico differ diff --git a/dll/win32/shell32_new/res/icons/16718.ico b/dll/win32/shell32_new/res/icons/16718.ico new file mode 100644 index 00000000000..706daeffdab Binary files /dev/null and b/dll/win32/shell32_new/res/icons/16718.ico differ diff --git a/dll/win32/shell32_new/res/icons/16721.ico b/dll/win32/shell32_new/res/icons/16721.ico new file mode 100644 index 00000000000..706daeffdab Binary files /dev/null and b/dll/win32/shell32_new/res/icons/16721.ico differ diff --git a/dll/win32/shell32_new/res/icons/17.ico b/dll/win32/shell32_new/res/icons/17.ico new file mode 100644 index 00000000000..af2d0a6eecf Binary files /dev/null and b/dll/win32/shell32_new/res/icons/17.ico differ diff --git a/dll/win32/shell32_new/res/icons/1700.ico b/dll/win32/shell32_new/res/icons/1700.ico new file mode 100644 index 00000000000..4f8775c069a Binary files /dev/null and b/dll/win32/shell32_new/res/icons/1700.ico differ diff --git a/dll/win32/shell32_new/res/icons/172.ico b/dll/win32/shell32_new/res/icons/172.ico new file mode 100644 index 00000000000..cf3a1413d1d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/172.ico differ diff --git a/dll/win32/shell32_new/res/icons/173.ico b/dll/win32/shell32_new/res/icons/173.ico new file mode 100644 index 00000000000..b905ef563b6 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/173.ico differ diff --git a/dll/win32/shell32_new/res/icons/18.ico b/dll/win32/shell32_new/res/icons/18.ico new file mode 100644 index 00000000000..7b760add407 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/18.ico differ diff --git a/dll/win32/shell32_new/res/icons/182.ico b/dll/win32/shell32_new/res/icons/182.ico new file mode 100644 index 00000000000..56c8f24b994 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/182.ico differ diff --git a/dll/win32/shell32_new/res/icons/183.ico b/dll/win32/shell32_new/res/icons/183.ico new file mode 100644 index 00000000000..5f3251917ba Binary files /dev/null and b/dll/win32/shell32_new/res/icons/183.ico differ diff --git a/dll/win32/shell32_new/res/icons/184.ico b/dll/win32/shell32_new/res/icons/184.ico new file mode 100644 index 00000000000..5eee0af44ec Binary files /dev/null and b/dll/win32/shell32_new/res/icons/184.ico differ diff --git a/dll/win32/shell32_new/res/icons/185.ico b/dll/win32/shell32_new/res/icons/185.ico new file mode 100644 index 00000000000..6b4dc9303e5 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/185.ico differ diff --git a/dll/win32/shell32_new/res/icons/186.ico b/dll/win32/shell32_new/res/icons/186.ico new file mode 100644 index 00000000000..d09411113a0 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/186.ico differ diff --git a/dll/win32/shell32_new/res/icons/187.ico b/dll/win32/shell32_new/res/icons/187.ico new file mode 100644 index 00000000000..38b924da89a Binary files /dev/null and b/dll/win32/shell32_new/res/icons/187.ico differ diff --git a/dll/win32/shell32_new/res/icons/19.ico b/dll/win32/shell32_new/res/icons/19.ico new file mode 100644 index 00000000000..7b760add407 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/19.ico differ diff --git a/dll/win32/shell32_new/res/icons/191.ico b/dll/win32/shell32_new/res/icons/191.ico new file mode 100644 index 00000000000..2a5bf8d0004 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/191.ico differ diff --git a/dll/win32/shell32_new/res/icons/192.ico b/dll/win32/shell32_new/res/icons/192.ico new file mode 100644 index 00000000000..5276b06bd97 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/192.ico differ diff --git a/dll/win32/shell32_new/res/icons/2.ico b/dll/win32/shell32_new/res/icons/2.ico new file mode 100644 index 00000000000..55a02a01558 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/2.ico differ diff --git a/dll/win32/shell32_new/res/icons/20.ico b/dll/win32/shell32_new/res/icons/20.ico new file mode 100644 index 00000000000..4174b5fb88f Binary files /dev/null and b/dll/win32/shell32_new/res/icons/20.ico differ diff --git a/dll/win32/shell32_new/res/icons/21.ico b/dll/win32/shell32_new/res/icons/21.ico new file mode 100644 index 00000000000..7b94e13a1ed Binary files /dev/null and b/dll/win32/shell32_new/res/icons/21.ico differ diff --git a/dll/win32/shell32_new/res/icons/210.ico b/dll/win32/shell32_new/res/icons/210.ico new file mode 100644 index 00000000000..76edaedc60a Binary files /dev/null and b/dll/win32/shell32_new/res/icons/210.ico differ diff --git a/dll/win32/shell32_new/res/icons/22.ico b/dll/win32/shell32_new/res/icons/22.ico new file mode 100644 index 00000000000..634e6d877ba Binary files /dev/null and b/dll/win32/shell32_new/res/icons/22.ico differ diff --git a/dll/win32/shell32_new/res/icons/220.ico b/dll/win32/shell32_new/res/icons/220.ico new file mode 100644 index 00000000000..7135f45b32f Binary files /dev/null and b/dll/win32/shell32_new/res/icons/220.ico differ diff --git a/dll/win32/shell32_new/res/icons/221.ico b/dll/win32/shell32_new/res/icons/221.ico new file mode 100644 index 00000000000..d67ed7a6909 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/221.ico differ diff --git a/dll/win32/shell32_new/res/icons/222.ico b/dll/win32/shell32_new/res/icons/222.ico new file mode 100644 index 00000000000..06c5be54099 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/222.ico differ diff --git a/dll/win32/shell32_new/res/icons/224.ico b/dll/win32/shell32_new/res/icons/224.ico new file mode 100644 index 00000000000..65f1ab9c47f Binary files /dev/null and b/dll/win32/shell32_new/res/icons/224.ico differ diff --git a/dll/win32/shell32_new/res/icons/225.ico b/dll/win32/shell32_new/res/icons/225.ico new file mode 100644 index 00000000000..cbf02e26652 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/225.ico differ diff --git a/dll/win32/shell32_new/res/icons/226.ico b/dll/win32/shell32_new/res/icons/226.ico new file mode 100644 index 00000000000..4045c348bc4 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/226.ico differ diff --git a/dll/win32/shell32_new/res/icons/228.ico b/dll/win32/shell32_new/res/icons/228.ico new file mode 100644 index 00000000000..879feb09624 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/228.ico differ diff --git a/dll/win32/shell32_new/res/icons/23.ico b/dll/win32/shell32_new/res/icons/23.ico new file mode 100644 index 00000000000..5048fa745de Binary files /dev/null and b/dll/win32/shell32_new/res/icons/23.ico differ diff --git a/dll/win32/shell32_new/res/icons/233.ico b/dll/win32/shell32_new/res/icons/233.ico new file mode 100644 index 00000000000..25869af9b88 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/233.ico differ diff --git a/dll/win32/shell32_new/res/icons/235.ico b/dll/win32/shell32_new/res/icons/235.ico new file mode 100644 index 00000000000..e2e6a9b6bcf Binary files /dev/null and b/dll/win32/shell32_new/res/icons/235.ico differ diff --git a/dll/win32/shell32_new/res/icons/236.ico b/dll/win32/shell32_new/res/icons/236.ico new file mode 100644 index 00000000000..59b8aef43ab Binary files /dev/null and b/dll/win32/shell32_new/res/icons/236.ico differ diff --git a/dll/win32/shell32_new/res/icons/237.ico b/dll/win32/shell32_new/res/icons/237.ico new file mode 100644 index 00000000000..38f4843bc95 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/237.ico differ diff --git a/dll/win32/shell32_new/res/icons/238.ico b/dll/win32/shell32_new/res/icons/238.ico new file mode 100644 index 00000000000..6acb384ab57 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/238.ico differ diff --git a/dll/win32/shell32_new/res/icons/24.ico b/dll/win32/shell32_new/res/icons/24.ico new file mode 100644 index 00000000000..6008790389d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/24.ico differ diff --git a/dll/win32/shell32_new/res/icons/240.ico b/dll/win32/shell32_new/res/icons/240.ico new file mode 100644 index 00000000000..5276b06bd97 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/240.ico differ diff --git a/dll/win32/shell32_new/res/icons/245.ico b/dll/win32/shell32_new/res/icons/245.ico new file mode 100644 index 00000000000..af2d0a6eecf Binary files /dev/null and b/dll/win32/shell32_new/res/icons/245.ico differ diff --git a/dll/win32/shell32_new/res/icons/246.ico b/dll/win32/shell32_new/res/icons/246.ico new file mode 100644 index 00000000000..9293575f57b Binary files /dev/null and b/dll/win32/shell32_new/res/icons/246.ico differ diff --git a/dll/win32/shell32_new/res/icons/248.ico b/dll/win32/shell32_new/res/icons/248.ico new file mode 100644 index 00000000000..edfdd35a26d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/248.ico differ diff --git a/dll/win32/shell32_new/res/icons/249.ico b/dll/win32/shell32_new/res/icons/249.ico new file mode 100644 index 00000000000..9aecb582b81 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/249.ico differ diff --git a/dll/win32/shell32_new/res/icons/25.ico b/dll/win32/shell32_new/res/icons/25.ico new file mode 100644 index 00000000000..fe9d4a9e052 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/25.ico differ diff --git a/dll/win32/shell32_new/res/icons/250.ico b/dll/win32/shell32_new/res/icons/250.ico new file mode 100644 index 00000000000..82a414dba52 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/250.ico differ diff --git a/dll/win32/shell32_new/res/icons/252.ico b/dll/win32/shell32_new/res/icons/252.ico new file mode 100644 index 00000000000..af2d0a6eecf Binary files /dev/null and b/dll/win32/shell32_new/res/icons/252.ico differ diff --git a/dll/win32/shell32_new/res/icons/254.ico b/dll/win32/shell32_new/res/icons/254.ico new file mode 100644 index 00000000000..92a024a5319 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/254.ico differ diff --git a/dll/win32/shell32_new/res/icons/255.ico b/dll/win32/shell32_new/res/icons/255.ico new file mode 100644 index 00000000000..70cff6abd09 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/255.ico differ diff --git a/dll/win32/shell32_new/res/icons/263.ico b/dll/win32/shell32_new/res/icons/263.ico new file mode 100644 index 00000000000..6008790389d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/263.ico differ diff --git a/dll/win32/shell32_new/res/icons/265.ico b/dll/win32/shell32_new/res/icons/265.ico new file mode 100644 index 00000000000..f4eb7b9cad8 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/265.ico differ diff --git a/dll/win32/shell32_new/res/icons/268.ico b/dll/win32/shell32_new/res/icons/268.ico new file mode 100644 index 00000000000..b0565ca436b Binary files /dev/null and b/dll/win32/shell32_new/res/icons/268.ico differ diff --git a/dll/win32/shell32_new/res/icons/269.ico b/dll/win32/shell32_new/res/icons/269.ico new file mode 100644 index 00000000000..7135f45b32f Binary files /dev/null and b/dll/win32/shell32_new/res/icons/269.ico differ diff --git a/dll/win32/shell32_new/res/icons/270.ico b/dll/win32/shell32_new/res/icons/270.ico new file mode 100644 index 00000000000..e62cf47237d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/270.ico differ diff --git a/dll/win32/shell32_new/res/icons/271.ico b/dll/win32/shell32_new/res/icons/271.ico new file mode 100644 index 00000000000..350486328aa Binary files /dev/null and b/dll/win32/shell32_new/res/icons/271.ico differ diff --git a/dll/win32/shell32_new/res/icons/277.ico b/dll/win32/shell32_new/res/icons/277.ico new file mode 100644 index 00000000000..5cda537e17a Binary files /dev/null and b/dll/win32/shell32_new/res/icons/277.ico differ diff --git a/dll/win32/shell32_new/res/icons/279.ico b/dll/win32/shell32_new/res/icons/279.ico new file mode 100644 index 00000000000..7135f45b32f Binary files /dev/null and b/dll/win32/shell32_new/res/icons/279.ico differ diff --git a/dll/win32/shell32_new/res/icons/28.ico b/dll/win32/shell32_new/res/icons/28.ico new file mode 100644 index 00000000000..d67ed7a6909 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/28.ico differ diff --git a/dll/win32/shell32_new/res/icons/289.ico b/dll/win32/shell32_new/res/icons/289.ico new file mode 100644 index 00000000000..6008790389d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/289.ico differ diff --git a/dll/win32/shell32_new/res/icons/29.ico b/dll/win32/shell32_new/res/icons/29.ico new file mode 100644 index 00000000000..f33ac25e692 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/29.ico differ diff --git a/dll/win32/shell32_new/res/icons/290.ico b/dll/win32/shell32_new/res/icons/290.ico new file mode 100644 index 00000000000..5aa5db9b758 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/290.ico differ diff --git a/dll/win32/shell32_new/res/icons/291.ico b/dll/win32/shell32_new/res/icons/291.ico new file mode 100644 index 00000000000..06c5be54099 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/291.ico differ diff --git a/dll/win32/shell32_new/res/icons/292.ico b/dll/win32/shell32_new/res/icons/292.ico new file mode 100644 index 00000000000..879feb09624 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/292.ico differ diff --git a/dll/win32/shell32_new/res/icons/293.ico b/dll/win32/shell32_new/res/icons/293.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/293.ico differ diff --git a/dll/win32/shell32_new/res/icons/294.ico b/dll/win32/shell32_new/res/icons/294.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/294.ico differ diff --git a/dll/win32/shell32_new/res/icons/295.ico b/dll/win32/shell32_new/res/icons/295.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/295.ico differ diff --git a/dll/win32/shell32_new/res/icons/296.ico b/dll/win32/shell32_new/res/icons/296.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/296.ico differ diff --git a/dll/win32/shell32_new/res/icons/297.ico b/dll/win32/shell32_new/res/icons/297.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/297.ico differ diff --git a/dll/win32/shell32_new/res/icons/298.ico b/dll/win32/shell32_new/res/icons/298.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/298.ico differ diff --git a/dll/win32/shell32_new/res/icons/299.ico b/dll/win32/shell32_new/res/icons/299.ico new file mode 100644 index 00000000000..7d431941278 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/299.ico differ diff --git a/dll/win32/shell32_new/res/icons/3.ico b/dll/win32/shell32_new/res/icons/3.ico new file mode 100644 index 00000000000..5e86a5895dd Binary files /dev/null and b/dll/win32/shell32_new/res/icons/3.ico differ diff --git a/dll/win32/shell32_new/res/icons/30.ico b/dll/win32/shell32_new/res/icons/30.ico new file mode 100644 index 00000000000..3a8081fdb37 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/30.ico differ diff --git a/dll/win32/shell32_new/res/icons/302.ico b/dll/win32/shell32_new/res/icons/302.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/302.ico differ diff --git a/dll/win32/shell32_new/res/icons/304.ico b/dll/win32/shell32_new/res/icons/304.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/304.ico differ diff --git a/dll/win32/shell32_new/res/icons/305.ico b/dll/win32/shell32_new/res/icons/305.ico new file mode 100644 index 00000000000..25869af9b88 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/305.ico differ diff --git a/dll/win32/shell32_new/res/icons/309.ico b/dll/win32/shell32_new/res/icons/309.ico new file mode 100644 index 00000000000..edfdd35a26d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/309.ico differ diff --git a/dll/win32/shell32_new/res/icons/315.ico b/dll/win32/shell32_new/res/icons/315.ico new file mode 100644 index 00000000000..631a88c90cf Binary files /dev/null and b/dll/win32/shell32_new/res/icons/315.ico differ diff --git a/dll/win32/shell32_new/res/icons/317.ico b/dll/win32/shell32_new/res/icons/317.ico new file mode 100644 index 00000000000..6dbf966031f Binary files /dev/null and b/dll/win32/shell32_new/res/icons/317.ico differ diff --git a/dll/win32/shell32_new/res/icons/318.ico b/dll/win32/shell32_new/res/icons/318.ico new file mode 100644 index 00000000000..94a2e1e67b2 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/318.ico differ diff --git a/dll/win32/shell32_new/res/icons/319.ico b/dll/win32/shell32_new/res/icons/319.ico new file mode 100644 index 00000000000..a3324fe62e1 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/319.ico differ diff --git a/dll/win32/shell32_new/res/icons/32.ico b/dll/win32/shell32_new/res/icons/32.ico new file mode 100644 index 00000000000..578ab0123af Binary files /dev/null and b/dll/win32/shell32_new/res/icons/32.ico differ diff --git a/dll/win32/shell32_new/res/icons/322.ico b/dll/win32/shell32_new/res/icons/322.ico new file mode 100644 index 00000000000..b905ef563b6 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/322.ico differ diff --git a/dll/win32/shell32_new/res/icons/323.ico b/dll/win32/shell32_new/res/icons/323.ico new file mode 100644 index 00000000000..5048fa745de Binary files /dev/null and b/dll/win32/shell32_new/res/icons/323.ico differ diff --git a/dll/win32/shell32_new/res/icons/324.ico b/dll/win32/shell32_new/res/icons/324.ico new file mode 100644 index 00000000000..6008790389d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/324.ico differ diff --git a/dll/win32/shell32_new/res/icons/325.ico b/dll/win32/shell32_new/res/icons/325.ico new file mode 100644 index 00000000000..e9fb7ce061d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/325.ico differ diff --git a/dll/win32/shell32_new/res/icons/326.ico b/dll/win32/shell32_new/res/icons/326.ico new file mode 100644 index 00000000000..0d901c550d4 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/326.ico differ diff --git a/dll/win32/shell32_new/res/icons/327.ico b/dll/win32/shell32_new/res/icons/327.ico new file mode 100644 index 00000000000..4dbf5fbe83e Binary files /dev/null and b/dll/win32/shell32_new/res/icons/327.ico differ diff --git a/dll/win32/shell32_new/res/icons/328.ico b/dll/win32/shell32_new/res/icons/328.ico new file mode 100644 index 00000000000..fe9d4a9e052 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/328.ico differ diff --git a/dll/win32/shell32_new/res/icons/329.ico b/dll/win32/shell32_new/res/icons/329.ico new file mode 100644 index 00000000000..d67ed7a6909 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/329.ico differ diff --git a/dll/win32/shell32_new/res/icons/33.ico b/dll/win32/shell32_new/res/icons/33.ico new file mode 100644 index 00000000000..df31dc28d1b Binary files /dev/null and b/dll/win32/shell32_new/res/icons/33.ico differ diff --git a/dll/win32/shell32_new/res/icons/330.ico b/dll/win32/shell32_new/res/icons/330.ico new file mode 100644 index 00000000000..634e6d877ba Binary files /dev/null and b/dll/win32/shell32_new/res/icons/330.ico differ diff --git a/dll/win32/shell32_new/res/icons/35.ico b/dll/win32/shell32_new/res/icons/35.ico new file mode 100644 index 00000000000..bea093df6f6 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/35.ico differ diff --git a/dll/win32/shell32_new/res/icons/36.ico b/dll/win32/shell32_new/res/icons/36.ico new file mode 100644 index 00000000000..634e6d877ba Binary files /dev/null and b/dll/win32/shell32_new/res/icons/36.ico differ diff --git a/dll/win32/shell32_new/res/icons/37.ico b/dll/win32/shell32_new/res/icons/37.ico new file mode 100644 index 00000000000..f5953fe9a32 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/37.ico differ diff --git a/dll/win32/shell32_new/res/icons/38.ico b/dll/win32/shell32_new/res/icons/38.ico new file mode 100644 index 00000000000..c4fbdb0502c Binary files /dev/null and b/dll/win32/shell32_new/res/icons/38.ico differ diff --git a/dll/win32/shell32_new/res/icons/39.ico b/dll/win32/shell32_new/res/icons/39.ico new file mode 100644 index 00000000000..ca7cee5d158 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/39.ico differ diff --git a/dll/win32/shell32_new/res/icons/4.ico b/dll/win32/shell32_new/res/icons/4.ico new file mode 100644 index 00000000000..429df441149 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/4.ico differ diff --git a/dll/win32/shell32_new/res/icons/40.ico b/dll/win32/shell32_new/res/icons/40.ico new file mode 100644 index 00000000000..cee50eed7e8 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/40.ico differ diff --git a/dll/win32/shell32_new/res/icons/41.ico b/dll/win32/shell32_new/res/icons/41.ico new file mode 100644 index 00000000000..879feb09624 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/41.ico differ diff --git a/dll/win32/shell32_new/res/icons/44.ico b/dll/win32/shell32_new/res/icons/44.ico new file mode 100644 index 00000000000..b905ef563b6 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/44.ico differ diff --git a/dll/win32/shell32_new/res/icons/45.ico b/dll/win32/shell32_new/res/icons/45.ico new file mode 100644 index 00000000000..e9fb7ce061d Binary files /dev/null and b/dll/win32/shell32_new/res/icons/45.ico differ diff --git a/dll/win32/shell32_new/res/icons/46.ico b/dll/win32/shell32_new/res/icons/46.ico new file mode 100644 index 00000000000..bc5711c71a0 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/46.ico differ diff --git a/dll/win32/shell32_new/res/icons/47.ico b/dll/win32/shell32_new/res/icons/47.ico new file mode 100644 index 00000000000..10cea4e3f84 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/47.ico differ diff --git a/dll/win32/shell32_new/res/icons/48.ico b/dll/win32/shell32_new/res/icons/48.ico new file mode 100644 index 00000000000..f1f858eb2c0 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/48.ico differ diff --git a/dll/win32/shell32_new/res/icons/5.ico b/dll/win32/shell32_new/res/icons/5.ico new file mode 100644 index 00000000000..7fd4302eb78 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/5.ico differ diff --git a/dll/win32/shell32_new/res/icons/54.ico b/dll/win32/shell32_new/res/icons/54.ico new file mode 100644 index 00000000000..edc0315f3fd Binary files /dev/null and b/dll/win32/shell32_new/res/icons/54.ico differ diff --git a/dll/win32/shell32_new/res/icons/6.ico b/dll/win32/shell32_new/res/icons/6.ico new file mode 100644 index 00000000000..25869af9b88 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/6.ico differ diff --git a/dll/win32/shell32_new/res/icons/7.ico b/dll/win32/shell32_new/res/icons/7.ico new file mode 100644 index 00000000000..25869af9b88 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/7.ico differ diff --git a/dll/win32/shell32_new/res/icons/8.ico b/dll/win32/shell32_new/res/icons/8.ico new file mode 100644 index 00000000000..25869af9b88 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/8.ico differ diff --git a/dll/win32/shell32_new/res/icons/8240.ico b/dll/win32/shell32_new/res/icons/8240.ico new file mode 100644 index 00000000000..d67ed7a6909 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/8240.ico differ diff --git a/dll/win32/shell32_new/res/icons/9.ico b/dll/win32/shell32_new/res/icons/9.ico new file mode 100644 index 00000000000..a7aa955e875 Binary files /dev/null and b/dll/win32/shell32_new/res/icons/9.ico differ diff --git a/dll/win32/shell32_new/res/icons/Icon_Licence/COPYING b/dll/win32/shell32_new/res/icons/Icon_Licence/COPYING new file mode 100644 index 00000000000..e709d0c050b --- /dev/null +++ b/dll/win32/shell32_new/res/icons/Icon_Licence/COPYING @@ -0,0 +1,67 @@ +Creative Commons Attribution-ShareAlike 2.5 License Agreement + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. + 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. + 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. + 4. "Original Author" means the individual or entity who created the Work. + 5. "Work" means the copyrightable work of authorship offered under the terms of this License. + 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 7. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + 2. to create and reproduce Derivative Works; + 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + 5. + + For the avoidance of doubt, where the work is a musical composition: + 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. + 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). + 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested. + 2. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. + 3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at http://creativecommons.org/. diff --git a/dll/win32/shell32_new/res/icons/Icon_Licence/Tango.txt b/dll/win32/shell32_new/res/icons/Icon_Licence/Tango.txt new file mode 100644 index 00000000000..796417a0820 --- /dev/null +++ b/dll/win32/shell32_new/res/icons/Icon_Licence/Tango.txt @@ -0,0 +1,127 @@ +The following icons are the property of the Tango project and are +released under Creative Commons Attribution-ShareAlike 2.5 License. +Please see COPYING for details + +1.ico +2.ico +3.ico +4.ico +5.ico +6.ico +7.ico +8.ico +9.ico +10.ico +11.ico +12.ico +13.ico +14.ico +15.ico +16.ico +17.ico +18.ico +19.ico +20.ico +21.ico +22.ico +23.ico +24.ico +25.ico +28.ico +29.ico +30.ico +32.ico +33.ico +35.ico +36.ico +37.ico +38.ico +39.ico +41.ico +44.ico +45.ico +46.ico +47.ico +48.ico +54.ico +137.ico +138.ico +151.ico +152.ico +153.ico +154.ico +155.ico +156.ico +157.ico +160.ico +161.ico +172.ico +173.ico +191.ico +192.ico +210.ico +220.ico +221.ico +222.ico +224.ico +225.ico +226.ico +228.ico +233.ico +235.ico +236.ico +237.ico +238.ico +240.ico +245.ico +246.ico +248.ico +249.ico +250.ico +252.ico +254.ico +255.ico +263.ico +265.ico +268.ico +269.ico +270.ico +271.ico +277.ico +279.ico +289.ico +290.ico +291.ico +292.ico +293.ico +294.ico +295.ico +296.ico +297.ico +298.ico +299.ico +302.ico +304.ico +305.ico +309.ico +315.ico +317.ico +318.ico +319.ico +322.ico +323.ico +324.ico +325.ico +326.ico +327.ico +328.ico +329.ico +330.ico +1001.ico +1004.ico +8240.ico +16710.ico +16715.ico +16717.ico +16718.ico +16721.ico \ No newline at end of file diff --git a/dll/win32/shell32_new/res/rgs/adminfoldershortcut.rgs b/dll/win32/shell32_new/res/rgs/adminfoldershortcut.rgs new file mode 100644 index 00000000000..bc66450a2af --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/adminfoldershortcut.rgs @@ -0,0 +1,56 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {D20EA4E1-3957-11d2-A40B-0C5020524153} = s 'Administrative Tools' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '5' + val InfoTip = e '@%%SystemRoot%%\system32\SHELL32.dll,-22921' + val LocalizedString = e '@%%SystemRoot%%\system32\SHELL32.dll,-22982' + DefaultIcon = e '%%SystemRoot%%\system32\main.cpl,10' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + Instance + { + val CLSID = s '{0AFACED1-E828-11D1-9187-B532F1E9575D}' + InitPropertyBag + { + val Attributes = s '0x00000011' + val TargetSpecialFolder = s '0x002f' + } + } + 'ShellFolder' + { + val Attributes = d '&H60000100' + val WantsFORPARSING = s '' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NoRemove ControlPanel + { + NoRemove NameSpace + { + '{D20EA4E1-3957-11d2-A40B-0C5020524153}' = s 'Administrative Tools' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/autocomplete.rgs b/dll/win32/shell32_new/res/rgs/autocomplete.rgs new file mode 100644 index 00000000000..9afd9d5cb86 --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/autocomplete.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {00BB2763-6A77-11D0-A535-00C04FD7D062} = s 'Shell ReactOS AutoComplete' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/controlpanel.rgs b/dll/win32/shell32_new/res/rgs/controlpanel.rgs new file mode 100644 index 00000000000..298ff87c917 --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/controlpanel.rgs @@ -0,0 +1,52 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {21EC2020-3AEA-1069-A2DD-08002B30309D} + { + val InfoTip = e '@%%SystemRoot%%\system32\SHELL32.dll,-31361' + DefaultIcon = e '%%SystemRoot%%\System32\shell32.dll,-137' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + ShellFolder + { + val Attributes = d '0' + val HideAsDeletePerUser = s '' + val WantsFORDISPLAY = s '' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + ControlPanel + { + NameSpace + { + } + } + NoRemove MyComputer + { + NoRemove NameSpace + { + Controls = s '{21EC2020-3AEA-1069-A2DD-08002B30309D}' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/dragdrophelper.rgs b/dll/win32/shell32_new/res/rgs/dragdrophelper.rgs new file mode 100644 index 00000000000..25d710d188c --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/dragdrophelper.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {4657278A-411B-11d2-839A-00C04FD918D0} = s 'Shell Drag and Drop helper' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/folderoptions.rgs b/dll/win32/shell32_new/res/rgs/folderoptions.rgs new file mode 100644 index 00000000000..eead3b603a6 --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/folderoptions.rgs @@ -0,0 +1,56 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {6DFD7C5C-2451-11d3-A299-00C04F8EF6AF} = s 'Folder Options' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '1' + val InfoTip = e '@%%SystemRoot%%\system32\SHELL32.dll,-22924' + val LocalizedString = e '@%%SystemRoot%%\system32\SHELL32.dll,-22985' + DefaultIcon = e '%%SystemRoot%%\system32\SHELL32.dll,-210' + Shell + { + Open + { + Command = s 'rundll32.exe shell32.dll,Options_RunDLL 0' + } + RunAs + { + Command = s 'rundll32.exe shell32.dll,Options_RunDLL 0' + { + val Extended = s '' + } + } + } + ShellFolder + { + val Attributes = d '0' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NoRemove ControlPanel + { + NoRemove NameSpace + { + '{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}' = s 'Folder Options' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/foldershortcut.rgs b/dll/win32/shell32_new/res/rgs/foldershortcut.rgs new file mode 100644 index 00000000000..9df72086aed --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/foldershortcut.rgs @@ -0,0 +1,23 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {0AFACED1-E828-11D1-9187-B532F1E9575D} = s 'Folder Shortcut' + { + val Details = s 'prop:Name;LinkTarget' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'shellex' + { + IconHandler = s '{0AFACED1-E828-11D1-9187-B532F1E9575D}' + } + 'ShellFolder' + { + val Attributes = d '&H60410137' + val CallForAttributes = d '&Hf0000000' + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/fontsfoldershortcut.rgs b/dll/win32/shell32_new/res/rgs/fontsfoldershortcut.rgs new file mode 100644 index 00000000000..69591c6644f --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/fontsfoldershortcut.rgs @@ -0,0 +1,56 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {D20EA4E1-3957-11d2-A40B-0C5020524152} = s 'Fonts' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '&Hffffffff' + val InfoTip = e '@%%SystemRoot%%\system32\SHELL32.dll,-22920' + val LocalizedString = e '@%%SystemRoot%%\system32\SHELL32.dll,-22981' + DefaultIcon = e '%%SystemRoot%%\system32\main.cpl,9' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + Instance + { + val CLSID = s '{0AFACED1-E828-11D1-9187-B532F1E9575D}' + InitPropertyBag + { + val Attributes = s '0x00000015' + val TargetSpecialFolder = s '0x0014' + } + } + 'ShellFolder' + { + val Attributes = d '&H60000100' + val WantsFORPARSING = s '' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NoRemove ControlPanel + { + NoRemove NameSpace + { + '{D20EA4E1-3957-11d2-A40B-0C5020524152}' = s 'Fonts' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/menubandsite.rgs b/dll/win32/shell32_new/res/rgs/menubandsite.rgs new file mode 100644 index 00000000000..c597e873135 --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/menubandsite.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {E13EF4E4-D2F2-11d0-9816-00C04FD91972} = s 'Menu Site' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/mycomputer.rgs b/dll/win32/shell32_new/res/rgs/mycomputer.rgs new file mode 100644 index 00000000000..85aa1496c1f --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/mycomputer.rgs @@ -0,0 +1,63 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {20D04FE0-3AEA-1069-A2D8-08002B30309D} = s 'My Computer' + { + val 'InfoTip' = e '@%%SystemRoot%%\system32\SHELL32.dll,-22913' + val 'IntroText' = e '@%%SystemRoot%%\system32\SHELL32.dll,-31751' + val 'LocalizedString' = e '@%%SystemRoot%%\system32\SHELL32.dll,-9216' + DefaultIcon = e '%%SystemRoot%%\Explorer.exe,0' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'HideOnDesktopPerUser' = s '' + } + 'shell' + { + 'find' = e '@%%SystemRoot%%\system32\SHELL32.dll,-8503' + { + val 'SuppressionPolicy' = d '&H00000080' + 'command' = e '%%SystemRoot%%\Explorer.exe' + 'ddeexec' = s '[FindFolder("%%l", %%I)]' + { + 'application' = s 'Folders' + 'topic' = s 'AppProperties' + } + } + 'Manage' + { + 'command' = e '%%windir%%\system32\mmc.exe /s %%windir%%\system32\compmgmt.msc' + val 'SuppressionPolicy' = d '&H4000003c' + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + MyComputer + { + NameSpace + { + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/mydocuments.rgs b/dll/win32/shell32_new/res/rgs/mydocuments.rgs new file mode 100644 index 00000000000..9b65a9ad09e --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/mydocuments.rgs @@ -0,0 +1,67 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {450D8FBA-AD25-11D0-98A8-0800361B1103} + { + val 'InfoTip' = e '@%%SystemRoot%%\system32\SHELL32.dll,-22914' + val 'SortOrderIndex' = d '&H00000048' + val 'LocalizedString' = e '@%%SystemRoot%%\system32\SHELL32.dll,-9227' + DefaultIcon = e '%%SystemRoot%%\system32\SHELL32.dll,-235' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + val LoadWithoutCOM = s '' + } + 'ShellFolder' + { + val 'Attributes' = d '&Hf080013d' + val 'CallForAttributes' = d '&H00020040' + val 'HideOnDesktopPerUser' = s '' + val 'QueryForOverlay' = s '' + val 'WantsFORPARSING' = s '' + } + 'shell' + { + 'find' = e '@%%SystemRoot%%\system32\SHELL32.dll,-29188' + { + val 'SuppressionPolicy' = d '&H00000080' + 'command' = e '%%SystemRoot%%\Explorer.exe' + 'ddeexec' = s '[FindFolder("%%l", %%I)]' + { + 'application' = s 'Folders' + 'topic' = s 'AppProperties' + } + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NoRemove Desktop + { + NoRemove NameSpace + { + '{450D8FBA-AD25-11D0-98A8-0800361B1103}' + { + val 'Removal Message' = s '@mydocs.dll,-900' + } + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/networkplaces.rgs b/dll/win32/shell32_new/res/rgs/networkplaces.rgs new file mode 100644 index 00000000000..da25a52dc2b --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/networkplaces.rgs @@ -0,0 +1,58 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {208D2C60-3AEA-1069-A2D7-08002B30309D} = s 'My Network Places' + { + val 'InfoTip' = e '@%%SystemRoot%%\system32\SHELL32.dll,-22912' + val 'IntroText' = e '@%%SystemRoot%%\system32\SHELL32.dll,-31749' + val 'LocalizedString' = e '@%%SystemRoot%%\system32\SHELL32.dll,-9217' + DefaultIcon = e '%%SystemRoot%%\system32\SHELL32.dll,17' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'HideOnDesktopPerUser' = s '' + } + 'shell' + { + 'find' = e '@%%SystemRoot%%\system32\SHELL32.dll,-29188' + { + val 'SuppressionPolicy' = d '&H00000080' + 'command' = e '%%SystemRoot%%\Explorer.exe' + 'ddeexec' = s '[FindFolder("%%l", %%I)]' + { + 'application' = s 'Folders' + 'topic' = s 'AppProperties' + } + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NetworkNeighborhood + { + NameSpace + { + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/newmenu.rgs b/dll/win32/shell32_new/res/rgs/newmenu.rgs new file mode 100644 index 00000000000..b3a6cab8f49 --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/newmenu.rgs @@ -0,0 +1,14 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {D969A300-E7FF-11d0-A93B-00A0C90F2719} = s 'ReactOS New Object Service' + { + val flags = d '0' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/printers.rgs b/dll/win32/shell32_new/res/rgs/printers.rgs new file mode 100644 index 00000000000..9277ae3b128 --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/printers.rgs @@ -0,0 +1,53 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {2227A280-3AEA-1069-A2DE-08002B30309D} = s 'Printers and Faxes' + { + val '{305CA226-D286-468e-B848-2B2E8E697B74} 2' = d '2' + val 'InfoTip' = e '@%%SystemRoot%%\system32\SHELL32.dll,-12696' + val 'IntroText' = e '@%%SystemRoot%%\system32\SHELL32.dll,-31757' + val 'LocalizedString' = e '@%%SystemRoot%%\system32\SHELL32.dll,-9319' + DefaultIcon = e '%%SystemRoot%%\System32\shell32.dll,-138' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'Attributes' = d '&H20000004' + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NoRemove Desktop + { + NoRemove NameSpace + { + Printers = s '{2227A280-3AEA-1069-A2DE-08002B30309D}' + { + val 'IconIndex' = d '&H0000012C' + val 'Info' = s 'Adds, removes and changes settings for printers.' + val 'Module' = e '%%SystemRoot%%\system32\main.cpl' + val 'Name' = s 'Printers and Faxes' + } + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/recyclebin.rgs b/dll/win32/shell32_new/res/rgs/recyclebin.rgs new file mode 100644 index 00000000000..b84d0db826c --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/recyclebin.rgs @@ -0,0 +1,59 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {645FF040-5081-101B-9F08-00AA002F954E} + { + val 'InfoTip' = e '@%%SystemRoot%%\system32\SHELL32.dll,-22915' + val 'IntroText' = e '@%%SystemRoot%%\system32\SHELL32.dll,-31748' + val 'LocalizedString' = e '@%%SystemRoot%%\system32\SHELL32.dll,-8964' + DefaultIcon = e '%%SystemRoot%%\System32\shell32.dll,31' + { + val Empty = e '%%SystemRoot%%\System32\shell32.dll,31' + val Full = e '%%SystemRoot%%\System32\shell32.dll,32' + } + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'ShellFolder' + { + val 'Attributes' = b '40010020' + val 'CallForAttributes' = d '&H00000040' + } + 'shellex' + { + 'find' = e '@%%SystemRoot%%\system32\SHELL32.dll,-29188' + { + 'ContextMenuHandlers' + 'PropertySheetHandlers' + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + NoRemove Desktop + { + NoRemove NameSpace + { + '{645FF040-5081-101B-9F08-00AA002F954E}' = s 'Recycle Bin' + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/shelldesktop.rgs b/dll/win32/shell32_new/res/rgs/shelldesktop.rgs new file mode 100644 index 00000000000..476fecab80f --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/shelldesktop.rgs @@ -0,0 +1,45 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {00021400-0000-0000-C000-000000000046} = s 'Desktop' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + shellex + { + ExtShellFolderViews + { + {5984FFE0-28D4-11CF-AE66-08002B2E1262} + val PersistMoniker = s 'file://%%userappdata%%\Microsoft\Internet Explorer\Desktop.htt' + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove Explorer + { + Desktop + { + NameSpace + { + } + } + } + } + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/shellfsfolder.rgs b/dll/win32/shell32_new/res/rgs/shellfsfolder.rgs new file mode 100644 index 00000000000..00d9daee97b --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/shellfsfolder.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {F3364BA0-65B9-11CE-A9BA-00AA004AE837} = s 'Shell File System Folder' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/shelllink.rgs b/dll/win32/shell32_new/res/rgs/shelllink.rgs new file mode 100644 index 00000000000..a5972a70f9f --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/shelllink.rgs @@ -0,0 +1,23 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {00021401-0000-0000-C000-000000000046} = s 'Shortcut' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + PersistentAddinsRegistered + { + {89BCB740-6119-101A-BCB7-00DD010655AF} = s '{00021401-0000-0000-C000-000000000046}' + } + PersistentHandler = s '{00021401-0000-0000-C000-000000000046}' + ProgID = s 'lnkfile' + shellex + { + MayChangeDefaultMenu = s '' + } + } + } +} diff --git a/dll/win32/shell32_new/res/rgs/startmenu.rgs b/dll/win32/shell32_new/res/rgs/startmenu.rgs new file mode 100644 index 00000000000..a91a3464ec2 --- /dev/null +++ b/dll/win32/shell32_new/res/rgs/startmenu.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {4622AD11-FF23-11d0-8D34-00A0C90F2719} = s 'Start Menu' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32_new/rgs_res.rc b/dll/win32/shell32_new/rgs_res.rc new file mode 100644 index 00000000000..6a37542b463 --- /dev/null +++ b/dll/win32/shell32_new/rgs_res.rc @@ -0,0 +1,22 @@ +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// +IDR_ADMINFOLDERSHORTCUT REGISTRY "res\\rgs\\adminfoldershortcut.rgs" +IDR_AUTOCOMPLETE REGISTRY "res\\rgs\\autocomplete.rgs" +IDR_CONTROLPANEL REGISTRY "res\\rgs\\controlpanel.rgs" +IDR_DRAGDROPHELPER REGISTRY "res\\rgs\\dragdrophelper.rgs" +IDR_FOLDEROPTIONS REGISTRY "res\\rgs\\folderoptions.rgs" +IDR_FOLDERSHORTCUT REGISTRY "res\\rgs\\foldershortcut.rgs" +IDR_FONTSFOLDERSHORTCUT REGISTRY "res\\rgs\\fontsfoldershortcut.rgs" +IDR_MENUBANDSITE REGISTRY "res\\rgs\\menubandsite.rgs" +IDR_MYCOMPUTER REGISTRY "res\\rgs\\mycomputer.rgs" +IDR_MYDOCUMENTS REGISTRY "res\\rgs\\mydocuments.rgs" +IDR_NETWORKPLACES REGISTRY "res\\rgs\\networkplaces.rgs" +IDR_NEWMENU REGISTRY "res\\rgs\\newmenu.rgs" +IDR_PRINTERS REGISTRY "res\\rgs\\printers.rgs" +IDR_RECYCLEBIN REGISTRY "res\\rgs\\recyclebin.rgs" +IDR_SHELLDESKTOP REGISTRY "res\\rgs\\shelldesktop.rgs" +IDR_SHELLFSFOLDER REGISTRY "res\\rgs\\shellfsfolder.rgs" +IDR_SHELLLINK REGISTRY "res\\rgs\\shelllink.rgs" +IDR_STARTMENU REGISTRY "res\\rgs\\startmenu.rgs" diff --git a/dll/win32/shell32_new/ros-systray.cpp b/dll/win32/shell32_new/ros-systray.cpp new file mode 100644 index 00000000000..f560b498e03 --- /dev/null +++ b/dll/win32/shell32_new/ros-systray.cpp @@ -0,0 +1,73 @@ +/* + * Copyright 2004 Martin Fuchs + * + * Pass on icon notification messages to the systray implementation + * in the currently running shell. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include + + /* copy data structure for tray notifications */ +typedef struct TrayNotifyCDS_Dummy { + DWORD cookie; + DWORD notify_code; + DWORD nicon_data[1]; // placeholder for NOTIFYICONDATA structure +} TrayNotifyCDS_Dummy; + + /* The only difference between Shell_NotifyIconA and Shell_NotifyIconW is the call to SendMessageA/W. */ +static BOOL SHELL_NotifyIcon(DWORD dwMessage, void* pnid, HWND nid_hwnd, int nid_size, BOOL unicode) +{ + HWND hwnd; + COPYDATASTRUCT data; + + BOOL ret = FALSE; + int len = sizeof(TrayNotifyCDS_Dummy)-sizeof(DWORD)+nid_size; + + TrayNotifyCDS_Dummy* pnotify_data = (TrayNotifyCDS_Dummy*) alloca(len); + + pnotify_data->cookie = 1; + pnotify_data->notify_code = dwMessage; + memcpy(&pnotify_data->nicon_data, pnid, nid_size); + + data.dwData = 1; + data.cbData = len; + data.lpData = pnotify_data; + + for(hwnd=0; (hwnd=FindWindowExW(0, hwnd, L"Shell_TrayWnd", NULL)); ) + if ((unicode?SendMessageW:SendMessageA)(hwnd, WM_COPYDATA, (WPARAM)nid_hwnd, (LPARAM)&data)) + ret = TRUE; + + return ret; +} + + +/************************************************************************* + * Shell_NotifyIcon [SHELL32.296] + * Shell_NotifyIconA [SHELL32.297] + */ +BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) +{ + return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, FALSE); +} + +/************************************************************************* + * Shell_NotifyIconW [SHELL32.298] + */ +BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW pnid) +{ + return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, TRUE); +} diff --git a/dll/win32/shell32_new/she_ocmenu.cpp b/dll/win32/shell32_new/she_ocmenu.cpp new file mode 100644 index 00000000000..2cf5ec99def --- /dev/null +++ b/dll/win32/shell32_new/she_ocmenu.cpp @@ -0,0 +1,1139 @@ +/* + * Open With Context Menu extension + * + * Copyright 2007 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "she_ocmenu.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/// +/// [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system] +/// "NoInternetOpenWith"=dword:00000001 +/// + +// TODO +// implement duplicate checks in list box +// implement duplicate checks for MRU! +// implement owner drawn menu + +typedef struct +{ + BOOL bMenu; + HMENU hMenu; + HWND hDlgCtrl; + UINT Count; + BOOL NoOpen; + UINT idCmdFirst; +}OPEN_WITH_CONTEXT, *POPEN_WITH_CONTEXT; + +#define MANUFACTURER_NAME_SIZE 100 + +typedef struct +{ + HICON hIcon; + WCHAR szAppName[MAX_PATH]; + WCHAR szManufacturer[MANUFACTURER_NAME_SIZE]; +}OPEN_ITEM_CONTEXT, *POPEN_ITEM_CONTEXT; + + +typedef struct _LANGANDCODEPAGE_ + { + WORD lang; + WORD code; +} LANGANDCODEPAGE, *LPLANGANDCODEPAGE; + +HANDLE OpenMRUList(HKEY hKey); + +void LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt); +void LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt); +void InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName); + +COpenWithMenu::COpenWithMenu() +{ +} + +COpenWithMenu::~COpenWithMenu() +{ + TRACE(" destroying IContextMenu(%p)\n", this); +} + +VOID +AddItem(HMENU hMenu, UINT idCmdFirst) +{ + MENUITEMINFOW mii; + WCHAR szBuffer[MAX_PATH]; + static const WCHAR szChoose[] = { 'C','h','o','o','s','e',' ','P','r','o','g','r','a','m','.','.','.',0 }; + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_ID; + mii.fType = MFT_SEPARATOR; + mii.wID = -1; + InsertMenuItemW(hMenu, -1, TRUE, &mii); + + if (!LoadStringW(shell32_hInstance, IDS_OPEN_WITH_CHOOSE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + wcscpy(szBuffer, szChoose); + + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + mii.wID = idCmdFirst; + mii.dwTypeData = (LPWSTR)szBuffer; + mii.cch = wcslen(szBuffer); + + InsertMenuItemW(hMenu, -1, TRUE, &mii); +} + +static +void +LoadOWItems(POPEN_WITH_CONTEXT pContext, LPCWSTR szName) +{ + const WCHAR * szExt; + WCHAR szPath[100]; + DWORD dwPath; + + szExt = wcsrchr(szName, '.'); + if (!szExt) + { + /* FIXME + * show default list of available programs + */ + return; + } + + /* load programs directly associated from HKCU */ + LoadItemFromHKCU(pContext, szExt); + + /* load programs associated from HKCR\Extension */ + LoadItemFromHKCR(pContext, szExt); + + /* load programs referenced from HKCR\ProgId */ + dwPath = sizeof(szPath); + szPath[0] = 0; + if (RegGetValueW(HKEY_CLASSES_ROOT, szExt, NULL, RRF_RT_REG_SZ, NULL, szPath, &dwPath) == ERROR_SUCCESS) + { + szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0'; + LoadItemFromHKCR(pContext, szPath); + } +} + + + +HRESULT WINAPI COpenWithMenu::QueryContextMenu( + HMENU hmenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + MENUITEMINFOW mii; + WCHAR szBuffer[100] = {0}; + INT pos; + HMENU hSubMenu = NULL; + OPEN_WITH_CONTEXT Context; + + if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)) < 0) + { + TRACE("failed to load string\n"); + return E_FAIL; + } + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + + hSubMenu = CreatePopupMenu(); + + /* set up context */ + ZeroMemory(&Context, sizeof(OPEN_WITH_CONTEXT)); + Context.bMenu = TRUE; + Context.Count = 0; + Context.hMenu = hSubMenu; + Context.idCmdFirst = idCmdFirst; + /* load items */ + LoadOWItems(&Context, szPath); + if (!Context.Count) + { + DestroyMenu(hSubMenu); + hSubMenu = NULL; + wId = 0; + count = 0; + } + else + { + AddItem(hSubMenu, Context.idCmdFirst++); + count = Context.idCmdFirst - idCmdFirst; + /* verb start at index zero */ + wId = count -1; + hSubMenu = hSubMenu; + } + + pos = GetMenuDefaultItem(hmenu, TRUE, 0) + 1; + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + if (hSubMenu) + { + mii.fMask |= MIIM_SUBMENU; + mii.hSubMenu = hSubMenu; + } + mii.dwTypeData = (LPWSTR) szBuffer; + mii.fState = MFS_ENABLED; + if (!pos) + { + mii.fState |= MFS_DEFAULT; + } + + mii.wID = Context.idCmdFirst; + mii.fType = MFT_STRING; + if (InsertMenuItemW( hmenu, pos, TRUE, &mii)) + Context.Count++; + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Context.Count); +} + +void +FreeListItems(HWND hwndDlg) +{ + HWND hList; + LRESULT iIndex, iCount; + POPEN_ITEM_CONTEXT pContext; + + hList = GetDlgItem(hwndDlg, 14002); + iCount = SendMessageW(hList, LB_GETCOUNT, 0, 0); + if (iCount == LB_ERR) + return; + + for (iIndex = 0; iIndex < iCount; iIndex++) + { + pContext = (POPEN_ITEM_CONTEXT)SendMessageW(hList, LB_GETITEMDATA, iIndex, 0); + if (pContext) + { + DestroyIcon(pContext->hIcon); + SendMessageW(hList, LB_SETITEMDATA, iIndex, (LPARAM)0); + HeapFree(GetProcessHeap(), 0, pContext); + } + } +} + +BOOL HideApplicationFromList(WCHAR * pFileName) +{ + WCHAR szBuffer[100] = {'A','p','p','l','i','c','a','t','i','o','n','s','\\',0}; + DWORD dwSize = 0; + LONG result; + + if (wcslen(pFileName) > (sizeof(szBuffer)/sizeof(WCHAR)) - 14) + { + ERR("insufficient buffer\n"); + return FALSE; + } + wcscpy(&szBuffer[13], pFileName); + + result = RegGetValueW(HKEY_CLASSES_ROOT, szBuffer, L"NoOpenWith", RRF_RT_REG_SZ, NULL, NULL, &dwSize); + + TRACE("result %d szBuffer %s\n", result, debugstr_w(szBuffer)); + + if (result == ERROR_SUCCESS) + return TRUE; + else + return FALSE; +} + +VOID +WriteStaticShellExtensionKey(HKEY hRootKey, const WCHAR * pVerb, WCHAR *pFullPath) +{ + HKEY hShell; + LONG result; + WCHAR szBuffer[MAX_PATH+10] = {'s','h','e','l','l','\\', 0 }; + + if (wcslen(pVerb) > (sizeof(szBuffer)/sizeof(WCHAR)) - 15 || + wcslen(pFullPath) > (sizeof(szBuffer)/sizeof(WCHAR)) - 4) + { + ERR("insufficient buffer\n"); + return; + } + + /* construct verb reg path */ + wcscpy(&szBuffer[6], pVerb); + wcscat(szBuffer, L"\\command"); + + /* create verb reg key */ + if (RegCreateKeyExW(hRootKey, szBuffer, 0, NULL, 0, KEY_WRITE, NULL, &hShell, NULL) != ERROR_SUCCESS) + return; + + /* build command buffer */ + wcscpy(szBuffer, pFullPath); + wcscat(szBuffer, L" %1"); + + result = RegSetValueExW(hShell, NULL, 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer)+1)* sizeof(WCHAR)); + RegCloseKey(hShell); +} + +VOID +StoreNewSettings(LPCWSTR szFileName, WCHAR *szAppName) +{ + WCHAR szBuffer[100] = { L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\"}; + const WCHAR * pFileExt; + HKEY hKey; + LONG result; + HANDLE hList; + + /* get file extension */ + pFileExt = wcsrchr(szFileName, L'.'); + if (wcslen(pFileExt) > (sizeof(szBuffer)/sizeof(WCHAR)) - 60) + { + ERR("insufficient buffer\n"); + return; + } + wcscpy(&szBuffer[60], pFileExt); + /* open base key for this file extension */ + if (RegCreateKeyExW(HKEY_CURRENT_USER, szBuffer, 0, NULL, 0, KEY_WRITE | KEY_READ, NULL, &hKey, NULL) != ERROR_SUCCESS) + return; + + /* open mru list */ + hList = OpenMRUList(hKey); + + if (!hList) + { + RegCloseKey(hKey); + return; + } + + /* insert the entry */ + result = AddMRUStringW(hList, szAppName); + + /* close mru list */ + FreeMRUList(hList); + /* create mru list key */ + RegCloseKey(hKey); +} + +VOID +SetProgrammAsDefaultHandler(LPCWSTR szFileName, WCHAR * szAppName) +{ + HKEY hKey; + HKEY hAppKey; + DWORD dwDisposition; + WCHAR szBuffer[100]; + DWORD dwSize; + BOOL result; + const WCHAR * pFileExt; + WCHAR * pFileName; + + /* extract file extension */ + pFileExt = wcsrchr(szFileName, L'.'); + if (!pFileExt) + return; + + /* create file extension key */ + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, pFileExt, 0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition) != ERROR_SUCCESS) + return; + + if (dwDisposition & REG_CREATED_NEW_KEY) + { + /* a new entry was created create the prog key id */ + wcscpy(szBuffer, &pFileExt[1]); + wcscat(szBuffer, L"_auto_file"); + if (RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer)+1) * sizeof(WCHAR)) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + } + else + { + /* entry already exists fetch prog key id */ + dwSize = sizeof(szBuffer); + if (RegGetValueW(hKey, NULL, NULL, RRF_RT_REG_SZ, NULL, szBuffer, &dwSize) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + } + /* close file extension key */ + RegCloseKey(hKey); + + /* create prog id key */ + if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition) != ERROR_SUCCESS) + return; + + + /* check if there already verbs existing for that app */ + pFileName = wcsrchr(szAppName, L'\\'); + wcscpy(szBuffer, L"Classes\\Applications\\"); + wcscat(szBuffer, pFileName); + wcscat(szBuffer, L"\\shell"); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ, &hAppKey) == ERROR_SUCCESS) + { + /* copy static verbs from Classes\Applications key */ + HKEY hTemp; + if (RegCreateKeyExW(hKey, L"shell", 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &hTemp, &dwDisposition) == ERROR_SUCCESS) + { + result = RegCopyTreeW(hAppKey, NULL, hTemp); + RegCloseKey(hTemp); + if (result == ERROR_SUCCESS) + { + /* copied all subkeys, we are done */ + RegCloseKey(hKey); + RegCloseKey(hAppKey); + return; + } + } + RegCloseKey(hAppKey); + } + /* write standard static shell extension */ + WriteStaticShellExtensionKey(hKey, L"open", szAppName); + RegCloseKey(hKey); +} + +void +BrowseForApplication(HWND hwndDlg) +{ + WCHAR szBuffer[30] = {0}; + WCHAR szFilter[30] = {0}; + WCHAR szPath[MAX_PATH]; + OPENFILENAMEW ofn; + OPEN_WITH_CONTEXT Context; + INT count; + + /* load resource open with */ + if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + ofn.lpstrTitle = szBuffer; + ofn.nMaxFileTitle = wcslen(szBuffer); + } + + ZeroMemory(&ofn, sizeof(OPENFILENAMEW)); + ofn.lStructSize = sizeof(OPENFILENAMEW); + ofn.hInstance = shell32_hInstance; + ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; + ofn.nMaxFile = (sizeof(szPath) / sizeof(WCHAR)); + ofn.lpstrFile = szPath; + + /* load the filter resource string */ + if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH_FILTER, szFilter, sizeof(szFilter) / sizeof(WCHAR))) + { + szFilter[(sizeof(szFilter)/sizeof(WCHAR))-1] = 0; + ofn.lpstrFilter = szFilter; + } + ZeroMemory(szPath, sizeof(szPath)); + + /* call openfilename */ + if (!GetOpenFileNameW(&ofn)) + return; + + /* setup context for insert proc */ + ZeroMemory(&Context, sizeof(OPEN_WITH_CONTEXT)); + Context.hDlgCtrl = GetDlgItem(hwndDlg, 14002); + count = SendMessage(Context.hDlgCtrl, LB_GETCOUNT, 0, 0); + InsertOpenWithItem(&Context, szPath); + /* select new item */ + SendMessage(Context.hDlgCtrl, LB_SETCURSEL, count, 0); +} + +POPEN_ITEM_CONTEXT +GetCurrentOpenItemContext(HWND hwndDlg) +{ + LRESULT result; + + /* get current item */ + result = SendDlgItemMessage(hwndDlg, 14002, LB_GETCURSEL, 0, 0); + if(result == LB_ERR) + return NULL; + + /* get item context */ + result = SendDlgItemMessage(hwndDlg, 14002, LB_GETITEMDATA, result, 0); + if (result == LB_ERR) + return NULL; + + return (POPEN_ITEM_CONTEXT)result; +} + +void +ExecuteOpenItem(POPEN_ITEM_CONTEXT pItemContext, LPCWSTR FileName) +{ + STARTUPINFOW si; + PROCESS_INFORMATION pi; + WCHAR szPath[(MAX_PATH * 2)]; + + /* setup path with argument */ + ZeroMemory(&si, sizeof(STARTUPINFOW)); + si.cb = sizeof(STARTUPINFOW); + wcscpy(szPath, pItemContext->szAppName); + wcscat(szPath, L" "); + wcscat(szPath, FileName); + + ERR("path %s\n", debugstr_w(szPath)); + + if (CreateProcessW(NULL, szPath, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + { + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); + SHAddToRecentDocs(SHARD_PATHW, FileName); + } +} + + +static INT_PTR CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + LPMEASUREITEMSTRUCT lpmis; + LPDRAWITEMSTRUCT lpdis; + INT index; + WCHAR szBuffer[MAX_PATH + 30] = { 0 }; + OPENASINFO *poainfo; + TEXTMETRIC mt; + COLORREF preColor, preBkColor; + POPEN_ITEM_CONTEXT pItemContext; + LONG YOffset; + OPEN_WITH_CONTEXT Context; + + poainfo = (OPENASINFO*) GetWindowLongPtr(hwndDlg, DWLP_USER); + + switch(uMsg) + { + case WM_INITDIALOG: + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)lParam); + poainfo = (OPENASINFO*)lParam; + if (!(poainfo->oaifInFlags & OAIF_ALLOW_REGISTRATION)) + EnableWindow(GetDlgItem(hwndDlg, 14003), FALSE); + if (poainfo->oaifInFlags & OAIF_FORCE_REGISTRATION) + SendDlgItemMessage(hwndDlg, 14003, BM_SETCHECK, BST_CHECKED, 0); + if (poainfo->oaifInFlags & OAIF_HIDE_REGISTRATION) + ShowWindow(GetDlgItem(hwndDlg, 14003), SW_HIDE); + if (poainfo->pcszFile) + { + szBuffer[0] = L'\0'; + SendDlgItemMessageW(hwndDlg, 14001, WM_GETTEXT, sizeof(szBuffer), (LPARAM)szBuffer); + index = wcslen(szBuffer); + if (index + wcslen(poainfo->pcszFile) + 1 < sizeof(szBuffer)/sizeof(szBuffer[0])) + wcscat(szBuffer, poainfo->pcszFile); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + SendDlgItemMessageW(hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM)szBuffer); + ZeroMemory(&Context, sizeof(OPEN_WITH_CONTEXT)); + Context.hDlgCtrl = GetDlgItem(hwndDlg, 14002); + LoadOWItems(&Context, poainfo->pcszFile); + SendMessage(Context.hDlgCtrl, LB_SETCURSEL, 0, 0); + } + return TRUE; + case WM_MEASUREITEM: + lpmis = (LPMEASUREITEMSTRUCT) lParam; + lpmis->itemHeight = 64; + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case 14004: /* browse */ + BrowseForApplication(hwndDlg); + return TRUE; + case 14002: + if (HIWORD(wParam) == LBN_SELCHANGE) + InvalidateRect((HWND)lParam, NULL, TRUE); // FIXME USE UPDATE RECT + break; + case 14005: /* ok */ + pItemContext = GetCurrentOpenItemContext(hwndDlg); + if (pItemContext) + { + /* store settings in HKCU path */ + StoreNewSettings(poainfo->pcszFile, pItemContext->szAppName); + + if (SendDlgItemMessage(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) + { + /* set programm as default handler */ + SetProgrammAsDefaultHandler(poainfo->pcszFile, pItemContext->szAppName); + } + + if (poainfo->oaifInFlags & OAIF_EXEC) + ExecuteOpenItem(pItemContext, poainfo->pcszFile); + } + FreeListItems(hwndDlg); + EndDialog(hwndDlg, 1); + return TRUE; + case 14006: /* cancel */ + FreeListItems(hwndDlg); + EndDialog(hwndDlg, 0); + return TRUE; + default: + break; + } + break; + case WM_DRAWITEM: + lpdis = (LPDRAWITEMSTRUCT) lParam; + if ((int)lpdis->itemID == -1) + break; + + switch (lpdis->itemAction) + { + case ODA_SELECT: + case ODA_DRAWENTIRE: + index = SendMessageW(lpdis->hwndItem, LB_GETCURSEL, 0, 0); + pItemContext =(POPEN_ITEM_CONTEXT)SendMessage(lpdis->hwndItem, LB_GETITEMDATA, lpdis->itemID, (LPARAM) 0); + + if ((int)lpdis->itemID == index) + { + /* paint focused item with standard background colour */ + HBRUSH hBrush; + hBrush = CreateSolidBrush(RGB(46, 104, 160)); + FillRect(lpdis->hDC, &lpdis->rcItem, hBrush); + DeleteObject(hBrush); + preBkColor = SetBkColor(lpdis->hDC, RGB(46, 104, 160)); + } + else + { + /* paint non focused item with white background */ + HBRUSH hBrush; + hBrush = CreateSolidBrush(RGB(255, 255, 255)); + FillRect(lpdis->hDC, &lpdis->rcItem, hBrush); + DeleteObject(hBrush); + preBkColor = SetBkColor(lpdis->hDC, RGB(255, 255, 255)); + } + + SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, (LPARAM) szBuffer); + /* paint the icon */ + DrawIconEx(lpdis->hDC, lpdis->rcItem.left,lpdis->rcItem.top, pItemContext->hIcon, 0, 0, 0, NULL, DI_NORMAL); + /* get text size */ + GetTextMetrics(lpdis->hDC, &mt); + /* paint app name */ + YOffset = lpdis->rcItem.top + mt.tmHeight/2; + TextOutW(lpdis->hDC, 45, YOffset, szBuffer, wcslen(szBuffer)); + /* paint manufacturer description */ + YOffset += mt.tmHeight + 2; + preColor = SetTextColor(lpdis->hDC, RGB(192, 192, 192)); + if (pItemContext->szManufacturer[0]) + TextOutW(lpdis->hDC, 45, YOffset, pItemContext->szManufacturer, wcslen(pItemContext->szManufacturer)); + else + TextOutW(lpdis->hDC, 45, YOffset, pItemContext->szAppName, wcslen(pItemContext->szAppName)); + SetTextColor(lpdis->hDC, preColor); + SetBkColor(lpdis->hDC, preBkColor); + break; + } + break; + case WM_CLOSE: + FreeListItems(hwndDlg); + EndDialog(hwndDlg, 0); + return TRUE; + default: + break; + } + return FALSE; +} + +void +FreeMenuItemContext(HMENU hMenu) +{ + INT Count; + INT Index; + MENUITEMINFOW mii; + + /* get item count */ + Count = GetMenuItemCount(hMenu); + if (Count == -1) + return; + + /* setup menuitem info */ + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_DATA | MIIM_FTYPE; + + for(Index = 0; Index < Count; Index++) + { + if (GetMenuItemInfoW(hMenu, Index, TRUE, &mii)) + { + if ((mii.fType & MFT_SEPARATOR) || mii.dwItemData == 0) + continue; + HeapFree(GetProcessHeap(), 0, (LPVOID)mii.dwItemData); + } + } +} + + +HRESULT WINAPI +COpenWithMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici ) +{ + MENUITEMINFOW mii; + + ERR("This %p wId %x count %u verb %x\n", this, wId, count, LOWORD(lpici->lpVerb)); + + if (wId < LOWORD(lpici->lpVerb)) + return E_FAIL; + + if (wId == LOWORD(lpici->lpVerb)) + { + OPENASINFO info; + + info.pcszFile = szPath; + info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT | OAIF_EXEC; + info.pcszClass = NULL; + FreeMenuItemContext(hSubMenu); + return SHOpenWithDialog(lpici->hwnd, &info); + } + + /* retrieve menu item info */ + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_DATA | MIIM_FTYPE; + + if (GetMenuItemInfoW(hSubMenu, LOWORD(lpici->lpVerb), TRUE, &mii)) + { + POPEN_ITEM_CONTEXT pItemContext = (POPEN_ITEM_CONTEXT)mii.dwItemData; + if (pItemContext) + { + /* launch item with specified app */ + ExecuteOpenItem(pItemContext, szPath); + } + } + /* free menu item context */ + FreeMenuItemContext(hSubMenu); + return S_OK; +} + +HRESULT WINAPI +COpenWithMenu::GetCommandString(UINT_PTR idCmd, UINT uType, + UINT* pwReserved, LPSTR pszName, UINT cchMax ) +{ + FIXME("%p %lu %u %p %p %u\n", this, + idCmd, uType, pwReserved, pszName, cchMax ); + + return E_NOTIMPL; +} + +HRESULT WINAPI COpenWithMenu::HandleMenuMsg( + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + TRACE("This %p uMsg %x\n",this, uMsg); + + return E_NOTIMPL; +} + +VOID +GetManufacturer(WCHAR * szAppName, POPEN_ITEM_CONTEXT pContext) +{ + UINT VerSize; + DWORD DummyHandle; + LPVOID pBuf; + WORD lang = 0; + WORD code = 0; + LPLANGANDCODEPAGE lplangcode; + WCHAR szBuffer[100]; + WCHAR * pResult; + BOOL bResult; + + static const WCHAR wFormat[] = L"\\StringFileInfo\\%04x%04x\\CompanyName"; + static const WCHAR wTranslation[] = L"VarFileInfo\\Translation"; + + /* query version info size */ + VerSize = GetFileVersionInfoSizeW(szAppName, &DummyHandle); + if (!VerSize) + { + pContext->szManufacturer[0] = 0; + return; + } + + /* allocate buffer */ + pBuf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, VerSize); + if (!pBuf) + { + pContext->szManufacturer[0] = 0; + return; + } + + /* query version info */ + if(!GetFileVersionInfoW(szAppName, 0, VerSize, pBuf)) + { + pContext->szManufacturer[0] = 0; + HeapFree(GetProcessHeap(), 0, pBuf); + return; + } + + /* query lang code */ + if(VerQueryValueW(pBuf, const_cast(wTranslation), (LPVOID *)&lplangcode, &VerSize)) + { + /* FIXME find language from current locale / if not available, + * default to english + * for now default to first available language + */ + lang = lplangcode->lang; + code = lplangcode->code; + } + /* set up format */ + swprintf(szBuffer, wFormat, lang, code); + /* query manufacturer */ + pResult = NULL; + bResult = VerQueryValueW(pBuf, szBuffer, (LPVOID *)&pResult, &VerSize); + + if (VerSize && bResult && pResult) + wcscpy(pContext->szManufacturer, pResult); + else + pContext->szManufacturer[0] = 0; + HeapFree(GetProcessHeap(), 0, pBuf); +} + + + + +void +InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName) +{ + MENUITEMINFOW mii; + POPEN_ITEM_CONTEXT pItemContext; + LRESULT index; + WCHAR * Offset; + WCHAR Buffer[_MAX_FNAME]; + + pItemContext = (OPEN_ITEM_CONTEXT *)HeapAlloc(GetProcessHeap(), 0, sizeof(OPEN_ITEM_CONTEXT)); + if (!pItemContext) + return; + + /* store app path */ + wcscpy(pItemContext->szAppName, szAppName); + /* null terminate it */ + pItemContext->szAppName[MAX_PATH-1] = 0; + /* extract path name */ + _wsplitpath(szAppName, NULL, NULL, Buffer, NULL); + Offset = wcsrchr(Buffer, '.'); + if (Offset) + Offset[0] = L'\0'; + Buffer[0] = towupper(Buffer[0]); + + if (pContext->bMenu) + { + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; + mii.fType = MFT_STRING; //MFT_OWNERDRAW; + mii.fState = MFS_ENABLED; + mii.wID = pContext->idCmdFirst; + mii.dwTypeData = Buffer; + mii.cch = wcslen(Buffer); + mii.dwItemData = (ULONG_PTR)pItemContext; + wcscpy(pItemContext->szManufacturer, Buffer); + if (InsertMenuItemW(pContext->hMenu, -1, TRUE, &mii)) + { + pContext->idCmdFirst++; + pContext->Count++; + } + } + else + { + /* get default icon */ + pItemContext->hIcon = ExtractIconW(shell32_hInstance, szAppName, 0); + /* get manufacturer */ + GetManufacturer(pItemContext->szAppName, pItemContext); + index = SendMessageW(pContext->hDlgCtrl, LB_ADDSTRING, 0, (LPARAM)Buffer); + if (index != LB_ERR) + SendMessageW(pContext->hDlgCtrl, LB_SETITEMDATA, index, (LPARAM)pItemContext); + } +} + +void +AddItemFromProgIDList(POPEN_WITH_CONTEXT pContext, HKEY hKey) +{ + FIXME("implement me :)))\n"); +} + +HANDLE +OpenMRUList(HKEY hKey) +{ + CREATEMRULISTW info; + + /* initialize mru list info */ + info.cbSize = sizeof(info); + info.nMaxItems = 32; + info.dwFlags = MRU_STRING; + info.hKey = hKey; + info.lpszSubKey = L"OpenWithList"; + info.lpfnCompare = NULL; + + /* load list */ + return CreateMRUListW(&info); +} + +void +AddItemFromMRUList(POPEN_WITH_CONTEXT pContext, HKEY hKey) +{ + HANDLE hList; + int nItem, nCount, nResult; + WCHAR szBuffer[MAX_PATH]; + + /* open mru list */ + hList = OpenMRUList(hKey); + if (!hList) + return; + + /* get list count */ + nCount = EnumMRUListW(hList, -1, NULL, 0); + + for(nItem = 0; nItem < nCount; nItem++) + { + nResult = EnumMRUListW(hList, nItem, szBuffer, MAX_PATH); + if (nResult <= 0) + continue; + /* make sure its zero terminated */ + szBuffer[min(MAX_PATH-1, nResult)] = '\0'; + /* insert item */ + if (!HideApplicationFromList(szBuffer)) + InsertOpenWithItem(pContext, szBuffer); + } + + /* free the mru list */ + FreeMRUList(hList); +} + + + +void +LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt) +{ + HKEY hKey; + HKEY hSubKey; + WCHAR szBuffer[MAX_PATH+10]; + WCHAR szResult[100]; + DWORD dwSize; + + static const WCHAR szOpenWithList[] = L"OpenWithList"; + static const WCHAR szOpenWithProgIds[] = L"OpenWithProgIDs"; + static const WCHAR szPerceivedType[] = L"PerceivedType"; + static const WCHAR szSysFileAssoc[] = L"SystemFileAssociations\\%s"; + + /* check if extension exists */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szExt, 0, KEY_READ | KEY_WRITE, &hKey) != ERROR_SUCCESS) + return; + + if (RegGetValueW(hKey, NULL, L"NoOpen", RRF_RT_REG_SZ, NULL, NULL, &dwSize) == ERROR_SUCCESS) + { + /* display warning dialog */ + pContext->NoOpen = TRUE; + } + + /* check if there is a directly available execute key */ + if (RegOpenKeyExW(hKey, L"shell\\open\\command", 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { + DWORD dwBuffer = sizeof(szBuffer); + + if (RegGetValueW(hSubKey, NULL, NULL, RRF_RT_REG_SZ, NULL, (PVOID)szBuffer, &dwBuffer) == ERROR_SUCCESS) + { + WCHAR * Ext = wcsrchr(szBuffer, ' '); + if (Ext) + { + /* erase %1 or extra arguments */ + Ext[0] = 0; + } + if(!HideApplicationFromList(szBuffer)) + InsertOpenWithItem(pContext, szBuffer); + } + RegCloseKey(hSubKey); + } + + /* load items from HKCR\Ext\OpenWithList */ + if (RegOpenKeyExW(hKey, szOpenWithList, 0, KEY_READ | KEY_QUERY_VALUE, &hSubKey) == ERROR_SUCCESS) + { + AddItemFromMRUList(pContext, hKey); + RegCloseKey(hSubKey); + } + + /* load items from HKCR\Ext\OpenWithProgIDs */ + if (RegOpenKeyExW(hKey, szOpenWithProgIds, 0, KEY_READ | KEY_QUERY_VALUE, &hSubKey) == ERROR_SUCCESS) + { + AddItemFromProgIDList(pContext, hSubKey); + RegCloseKey(hSubKey); + } + + /* load items from SystemFileAssociations\Ext key */ + swprintf(szResult, szSysFileAssoc, szExt); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szResult, 0, KEY_READ | KEY_WRITE, &hSubKey) == ERROR_SUCCESS) + { + AddItemFromMRUList(pContext, hSubKey); + RegCloseKey(hSubKey); + } + + /* load additional items from referenced PerceivedType*/ + dwSize = sizeof(szBuffer); + if (RegGetValueW(hKey, NULL, szPerceivedType, RRF_RT_REG_SZ, NULL, szBuffer, &dwSize) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + RegCloseKey(hKey); + + /* terminate it explictely */ + szBuffer[29] = 0; + swprintf(szResult, szSysFileAssoc, szBuffer); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szResult, 0, KEY_READ | KEY_WRITE, &hSubKey) == ERROR_SUCCESS) + { + AddItemFromMRUList(pContext, hSubKey); + RegCloseKey(hSubKey); + } +} + +void +LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, const WCHAR * szExt) +{ + WCHAR szBuffer[MAX_PATH]; + HKEY hKey; + + static const WCHAR szOpenWithProgIDs[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\%s\\OpenWithProgIDs"; + static const WCHAR szOpenWithList[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\%s"; + + /* handle first progid lists */ + swprintf(szBuffer, szOpenWithProgIDs, szExt); + if (RegOpenKeyExW(HKEY_CURRENT_USER, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) + { + AddItemFromProgIDList(pContext, hKey); + RegCloseKey(hKey); + } + + /* now handle mru lists */ + swprintf(szBuffer, szOpenWithList, szExt); + if (RegOpenKeyExW(HKEY_CURRENT_USER, szBuffer, 0, KEY_READ | KEY_WRITE, &hKey) == ERROR_SUCCESS) + { + AddItemFromMRUList(pContext, hKey); + RegCloseKey(hKey); + } +} + +HRESULT +COpenWithMenu::SHEOW_LoadOpenWithItems(IDataObject *pdtobj) +{ + STGMEDIUM medium; + FORMATETC fmt; + HRESULT hr; + LPIDA pida; + LPCITEMIDLIST pidl_folder; + LPCITEMIDLIST pidl_child; + LPCITEMIDLIST pidl; + DWORD dwPath; + LPWSTR szPtr; + static const WCHAR szShortCut[] = { '.','l','n','k', 0 }; + + fmt.cfFormat = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); + fmt.ptd = NULL; + fmt.dwAspect = DVASPECT_CONTENT; + fmt.lindex = -1; + fmt.tymed = TYMED_HGLOBAL; + + hr = pdtobj->GetData(&fmt, &medium); + + if (FAILED(hr)) + { + ERR("IDataObject_GetData failed with 0x%x\n", hr); + return hr; + } + + /*assert(pida->cidl==1);*/ + pida = (LPIDA)GlobalLock(medium.hGlobal); + + pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]); + pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[1]); + + pidl = ILCombine(pidl_folder, pidl_child); + + GlobalUnlock(medium.hGlobal); + GlobalFree(medium.hGlobal); + + if (!pidl) + { + ERR("no mem\n"); + return E_OUTOFMEMORY; + } + if (_ILIsDesktop(pidl_child) || _ILIsMyDocuments(pidl_child) || _ILIsControlPanel(pidl_child) || _ILIsNetHood(pidl_child) || + _ILIsBitBucket(pidl_child) || _ILIsDrive(pidl_child) || _ILIsCPanelStruct(pidl_child) || _ILIsFolder(pidl_child) || _ILIsControlPanel(pidl_folder)) + { + TRACE("pidl is a folder\n"); + SHFree((void*)pidl); + return E_FAIL; + } + + if (!SHGetPathFromIDListW(pidl, szPath)) + { + SHFree((void*)pidl); + ERR("SHGetPathFromIDListW failed\n"); + return E_FAIL; + } + + SHFree((void*)pidl); + TRACE("szPath %s\n", debugstr_w(szPath)); + + if (GetBinaryTypeW(szPath, &dwPath)) + { + TRACE("path is a executable %x\n", dwPath); + return E_FAIL; + } + + szPtr = wcsrchr(szPath, '.'); + if (szPtr) + { + if (!_wcsicmp(szPtr, szShortCut)) + { + FIXME("pidl is a shortcut\n"); + return E_FAIL; + } + } + return S_OK; +} + +HRESULT WINAPI +COpenWithMenu::Initialize(LPCITEMIDLIST pidlFolder, + IDataObject *pdtobj, HKEY hkeyProgID ) +{ + TRACE("This %p\n", this); + + if (pdtobj == NULL) + return E_INVALIDARG; + return SHEOW_LoadOpenWithItems(pdtobj); +} + +HRESULT WINAPI SHOpenWithDialog( + HWND hwndParent, + const OPENASINFO *poainfo +) +{ + MSG msg; + BOOL bRet; + HWND hwnd; + + if (poainfo->pcszClass == NULL && poainfo->pcszFile == NULL) + return E_FAIL; + + + hwnd = CreateDialogParam(shell32_hInstance, MAKEINTRESOURCE(OPEN_WITH_PROGRAMM_DLG), hwndParent, OpenWithProgrammDlg, (LPARAM)poainfo); + if (hwnd == NULL) + { + ERR("Failed to create dialog\n"); + return E_FAIL; + } + ShowWindow(hwnd, SW_SHOWNORMAL); + + while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0) + { + if (!IsWindow(hwnd) || !IsDialogMessage(hwnd, &msg)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + return S_OK; +} diff --git a/dll/win32/shell32_new/she_ocmenu.h b/dll/win32/shell32_new/she_ocmenu.h new file mode 100644 index 00000000000..f4cf23b3b7a --- /dev/null +++ b/dll/win32/shell32_new/she_ocmenu.h @@ -0,0 +1,65 @@ +/* + * Open With Context Menu extension + * + * Copyright 2007 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHE_OCMENU_H_ +#define _SHE_OCMENU_H_ + +class COpenWithMenu : + public CComCoClass, + public CComObjectRootEx, + public IContextMenu2, + public IShellExtInit +{ +private: + LONG wId; + BOOL NoOpen; + UINT count; + WCHAR szPath[MAX_PATH]; + HMENU hSubMenu; +public: + COpenWithMenu(); + ~COpenWithMenu(); + HRESULT SHEOW_LoadOpenWithItems(IDataObject *pdtobj); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + + // IShellExtInit + virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + +DECLARE_NO_REGISTRY() +DECLARE_NOT_AGGREGATABLE(COpenWithMenu) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(COpenWithMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) +END_COM_MAP() +}; + +#endif // _SHE_OCMENU_H_ diff --git a/dll/win32/shell32_new/shell.cpp b/dll/win32/shell32_new/shell.cpp new file mode 100644 index 00000000000..71761fc49ad --- /dev/null +++ b/dll/win32/shell32_new/shell.cpp @@ -0,0 +1,33 @@ +/* + * Shell Library Functions + * + * Copyright 1998 Marcus Meissner + * Copyright 2000 Juergen Schmied + * Copyright 2002 Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include +#include + + + + diff --git a/dll/win32/shell32_new/shell32.rbuild b/dll/win32/shell32_new/shell32.rbuild new file mode 100644 index 00000000000..45057fe08f7 --- /dev/null +++ b/dll/win32/shell32_new/shell32.rbuild @@ -0,0 +1,90 @@ + + + + + . + . + include/reactos/wine + . + + + + + + 0x600 + wine + uuid + recyclebin + ntdll + advapi32 + gdi32 + user32 + comctl32 + comdlg32 + shlwapi + ole32 + version + devmgr + winspool + winmm + msvcrt + atlnew + precomp.h + authors.cpp + autocomplete.cpp + brsfolder.cpp + changenotify.cpp + classes.cpp + clipboard.cpp + control.cpp + dataobject.cpp + dde.cpp + debughlp.cpp + desktop.cpp + dialogs.cpp + dragdrophelper.cpp + enumidlist.cpp + extracticon.cpp + folders.cpp + iconcache.cpp + pidl.cpp + shell32_main.cpp + shellitem.cpp + shelllink.cpp + shellole.cpp + shellord.cpp + shellpath.cpp + shellreg.cpp + shellstring.cpp + shfldr_desktop.cpp + shfldr_fs.cpp + shfldr_mycomp.cpp + shfldr_mydocuments.cpp + shfldr_printers.cpp + shfldr_admintools.cpp + shfldr_netplaces.cpp + shfldr_fonts.cpp + shfldr_cpanel.cpp + shfldr_recyclebin.cpp + shlexec.cpp + shlfileop.cpp + shlfolder.cpp + shlfsbind.cpp + shlmenu.cpp + shlview.cpp + shpolicy.cpp + shv_def_cmenu.cpp + startmenu.cpp + stubs.cpp + ros-systray.cpp + fprop.cpp + drive.cpp + she_ocmenu.cpp + shv_item_new.cpp + folder_options.cpp + shell32.rc + + + shobjidl_local.idl + + diff --git a/dll/win32/shell32_new/shell32.rbuild.bak b/dll/win32/shell32_new/shell32.rbuild.bak new file mode 100644 index 00000000000..d871af6daab --- /dev/null +++ b/dll/win32/shell32_new/shell32.rbuild.bak @@ -0,0 +1,90 @@ + + + + + . + . + include/reactos/wine + . + + + + + + 0x600 + wine + uuid + recyclebin + ntdll + advapi32 + gdi32 + user32 + comctl32 + comdlg32 + shlwapi + ole32 + version + devmgr + winspool + winmm + msvcrt + atlnew + precomp.h + authors.cpp + autocomplete.cpp + brsfolder.cpp + changenotify.cpp + classes.cpp + clipboard.cpp + control.cpp + dataobject.cpp + dde.cpp + debughlp.cpp + desktop.cpp + dialogs.cpp + dragdrophelper.cpp + enumidlist.cpp + extracticon.cpp + folders.cpp + iconcache.cpp + pidl.cpp + shell32_main.cpp + shellitem.cpp + shelllink.cpp + shellole.cpp + shellord.cpp + shellpath.cpp + shellreg.cpp + shellstring.cpp + shfldr_desktop.cpp + shfldr_fs.cpp + shfldr_mycomp.cpp + shfldr_mydocuments.cpp + shfldr_printers.cpp + shfldr_admintools.cpp + shfldr_netplaces.cpp + shfldr_fonts.cpp + shfldr_cpanel.cpp + shfldr_recyclebin.cpp + shlexec.cpp + shlfileop.cpp + shlfolder.cpp + shlfsbind.cpp + shlmenu.cpp + shlview.cpp + shpolicy.cpp + shv_def_cmenu.cpp + startmenu.cpp + stubs.cpp + ros-systray.cpp + fprop.cpp + drive.cpp + she_ocmenu.cpp + shv_item_new.cpp + folder_options.cpp + shell32.rc + + + shobjidl_local.idl + + diff --git a/dll/win32/shell32_new/shell32.rc b/dll/win32/shell32_new/shell32.rc new file mode 100644 index 00000000000..88169ea741b --- /dev/null +++ b/dll/win32/shell32_new/shell32.rc @@ -0,0 +1,82 @@ +/* + * Top level resource file for shell stuff + * + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include "shlobj.h" +#include "shresdef.h" + +#include "version.rc" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +shv_accel ACCELERATORS +BEGIN + VK_F5, FCIDM_SHVIEW_REFRESH, VIRTKEY +END + +/* + * This include a set of Shell32 icons, + * bitmaps and avi files. Licence's can be + * found in the corresponding directorys + */ +#include "icon_res.rc" +#include "bitmap_res.rc" +#include "avi_res.rc" +#include "rgs_res.rc" + +/* + * Everything specific to any language goes + * in one of the specific files. + * Note that you can and may override resources + * which also have a neutral version. This is to + * get localized bitmaps for example. + */ +#include "lang/bg-BG.rc" +#include "lang/ca-ES.rc" +#include "lang/cs-CZ.rc" +#include "lang/da-DK.rc" +#include "lang/de-DE.rc" +#include "lang/el-GR.rc" +#include "lang/en-GB.rc" +#include "lang/en-US.rc" +#include "lang/es-ES.rc" +#include "lang/fi-FI.rc" +#include "lang/fr-FR.rc" +#include "lang/hu-HU.rc" +#include "lang/it-IT.rc" +#include "lang/ja-JP.rc" +#include "lang/ko-KR.rc" +#include "lang/nl-NL.rc" +#include "lang/no-NO.rc" +#include "lang/pl-PL.rc" +#include "lang/pt-BR.rc" +#include "lang/pt-PT.rc" +#include "lang/ro-RO.rc" +#include "lang/sl-SI.rc" +#include "lang/sk-SK.rc" +#include "lang/sv-SE.rc" +#include "lang/tr-TR.rc" +#include "lang/zh-CN.rc" +#include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/dll/win32/shell32_new/shell32.spec b/dll/win32/shell32_new/shell32.spec new file mode 100644 index 00000000000..e8d0064e182 --- /dev/null +++ b/dll/win32/shell32_new/shell32.spec @@ -0,0 +1,505 @@ +# Functions exported by the WinXP SP3 shell32.dll (6.0.2900.5686) +2 stdcall SHChangeNotifyRegister(long long long long long ptr) +3 stdcall SHDefExtractIconA(str long long ptr ptr long) +4 stdcall SHChangeNotifyDeregister(long) +5 stdcall -noname SHChangeNotifyUpdateEntryList(long long long long) +6 stdcall SHDefExtractIconW(wstr long long ptr ptr long) +7 stdcall -noname SHLookupIconIndexA(str long long) +8 stdcall -noname SHLookupIconIndexW(wstr long long) +9 stdcall PifMgr_OpenProperties(wstr wstr long long) +10 stdcall PifMgr_GetProperties(ptr wstr ptr long long) +11 stdcall PifMgr_SetProperties(ptr wstr ptr long long) +12 stdcall -noname SHStartNetConnectionDialogA(ptr str long) +13 stdcall PifMgr_CloseProperties(ptr long) +14 stdcall SHStartNetConnectionDialogW(ptr wstr long) +15 stdcall -noname ILGetDisplayName(ptr ptr) +16 stdcall ILFindLastID(ptr) +17 stdcall ILRemoveLastID(ptr) +18 stdcall ILClone(ptr) +19 stdcall ILCloneFirst(ptr) +20 stdcall -noname ILGlobalClone(ptr) +21 stdcall ILIsEqual(ptr ptr) +22 stdcall DAD_DragEnterEx2(ptr long long ptr) +23 stdcall ILIsParent(ptr ptr long) +24 stdcall ILFindChild(ptr ptr) +25 stdcall ILCombine(ptr ptr) +26 stdcall ILLoadFromStream(ptr ptr) +27 stdcall ILSaveToStream(ptr ptr) +28 stdcall SHILCreateFromPath(ptr ptr ptr) SHILCreateFromPathAW +29 stdcall -noname PathIsRoot(ptr) PathIsRootAW +30 stdcall -noname PathBuildRoot(ptr long) PathBuildRootAW +31 stdcall -noname PathFindExtension(wstr) PathFindExtensionW +32 stdcall -noname PathAddBackslash(wstr) PathAddBackslashW +33 stdcall -noname PathRemoveBlanks(wstr) PathRemoveBlanksW +34 stdcall -noname PathFindFileName(wstr) PathFindFileNameW +35 stdcall -noname PathRemoveFileSpec(ptr) PathRemoveFileSpecAW # Fixme +36 stdcall -noname PathAppend(ptr ptr) PathAppendAW # Fixme +37 stdcall -noname PathCombine(wstr wstr wstr) PathCombineW +38 stdcall -noname PathStripPath(wstr) PathStripPathW +39 stdcall -noname PathIsUNC(wstr) PathIsUNCW +40 stdcall -noname PathIsRelative(wstr) PathIsRelativeW +41 stdcall IsLFNDriveA(str) +42 stdcall IsLFNDriveW(wstr) +43 stdcall PathIsExe(ptr) PathIsExeAW +44 stdcall OpenAs_RunDLL(long long str long) OpenAs_RunDLLA +45 stdcall -noname PathFileExists(ptr) PathFileExistsAW # Fixme +46 stdcall -noname PathMatchSpec(wstr wstr) PathMatchSpecW +47 stdcall PathMakeUniqueName(ptr long ptr ptr ptr) PathMakeUniqueNameAW +48 stdcall -noname PathSetDlgItemPath(long long wstr) PathSetDlgItemPathW +49 stdcall PathQualify(ptr) PathQualifyAW +50 stdcall -noname PathStripToRoot(wstr) PathStripToRootW +51 stdcall PathResolve(str long long) PathResolveAW +52 stdcall -noname PathGetArgs(wstr) PathGetArgsW +53 stdcall -noname IsSuspendAllowed() +54 stdcall -noname LogoffWindowsDialog(ptr) +55 stdcall -noname PathQuoteSpaces(wstr) PathQuoteSpacesW +56 stdcall -noname PathUnquoteSpaces(wstr) PathUnquoteSpacesW +57 stdcall -noname PathGetDriveNumber(wstr) PathGetDriveNumberW +58 stdcall -noname ParseField(str long ptr long) ParseFieldAW # Fixme +59 stdcall RestartDialog(long wstr long) +60 stdcall -noname ExitWindowsDialog(long) # Fixme +61 stdcall -noname RunFileDlg(long long long str str long) RunFileDlg # Fixme +62 stdcall PickIconDlg(long long long long) +63 stdcall GetFileNameFromBrowse(long long long long str str str) +64 stdcall DriveType(long) +65 stdcall -noname InvalidateDriveType(long) +66 stdcall IsNetDrive(long) +67 stdcall Shell_MergeMenus(long long long long long long) +68 stdcall SHGetSetSettings(ptr long long) +69 stdcall -noname SHGetNetResource(ptr long ptr long) +70 stdcall -noname SHCreateDefClassObject(long long long long long) +71 stdcall -noname Shell_GetImageLists(ptr ptr) +72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexAW +73 stdcall SHShellFolderView_Message(long long long) +74 stdcall SHCreateStdEnumFmtEtc(long ptr ptr) +75 stdcall PathYetAnotherMakeUniqueName(ptr wstr wstr wstr) +76 stdcall DragQueryInfo(ptr ptr) +77 stdcall SHMapPIDLToSystemImageListIndex(ptr ptr ptr) +78 stdcall -noname OleStrToStrN(str long wstr long) OleStrToStrNAW # Fixme +79 stdcall -noname StrToOleStrN(wstr long str long) StrToOleStrNAW # Fixme +80 stdcall SHOpenPropSheetW(wstr ptr long ptr ptr ptr wstr) +81 stdcall OpenAs_RunDLLA(long long str long) +82 stdcall -noname DDECreatePostNotify(ptr) +83 stdcall -noname CIDLData_CreateFromIDArray(ptr long ptr ptr) +84 stdcall SHIsBadInterfacePtr(ptr long) # Fixme +85 stdcall OpenRegStream(long str str long) shlwapi.SHOpenRegStreamA +86 stdcall -noname SHRegisterDragDrop(long ptr) +87 stdcall -noname SHRevokeDragDrop(long) +88 stdcall SHDoDragDrop(long ptr ptr long ptr) +89 stdcall SHCloneSpecialIDList(long long long) +90 stdcall SHFindFiles(ptr ptr) +91 stdcall SHFindComputer(ptr ptr) +92 stdcall PathGetShortPath(ptr) PathGetShortPathAW +93 stdcall -noname Win32CreateDirectory(wstr ptr) Win32CreateDirectoryW +94 stdcall -noname Win32RemoveDirectory(wstr) Win32RemoveDirectoryW +95 stdcall -noname SHLogILFromFSIL(ptr) +96 stdcall -noname StrRetToStrN(ptr long ptr ptr) StrRetToStrNAW # Fixme +97 stdcall -noname SHWaitForFileToOpen(long long long) +98 stdcall SHGetRealIDL(ptr ptr ptr) +99 stdcall -noname SetAppStartingCursor(long long) # Fixme +100 stdcall SHRestricted(long) +101 stdcall OpenAs_RunDLLW(long long wstr long) +102 stdcall SHCoCreateInstance(wstr ptr long ptr ptr) +103 stdcall SignalFileOpen(long) +104 stdcall Activate_RunDLL(long ptr ptr ptr) +105 stdcall AppCompat_RunDLLW(ptr ptr wstr long) +106 stdcall CheckEscapesA(str long) +107 stdcall CheckEscapesW(wstr long) +108 stdcall CommandLineToArgvW(wstr ptr) +109 stdcall Control_FillCache_RunDLL(long long long long) Control_FillCache_RunDLLA +110 stdcall Control_FillCache_RunDLLA(long long long long) +111 stdcall Control_FillCache_RunDLLW(long long long long) +112 stdcall Control_RunDLL(ptr ptr str long) Control_RunDLLA +113 stdcall Control_RunDLLA(ptr ptr str long) +114 stdcall Control_RunDLLAsUserW(ptr ptr wstr long) +115 stdcall Control_RunDLLW(ptr ptr wstr long) +116 stdcall DllCanUnloadNow() +117 stdcall DllGetClassObject(ptr ptr ptr) +118 stdcall DllGetVersion(ptr) +119 stdcall IsLFNDrive(ptr) IsLFNDriveAW +120 stdcall DllInstall(long wstr) +121 stdcall SHFlushClipboard() +122 stdcall -noname RunDLL_CallEntry16(long long long str long) # Fixme #name wrong? +123 stdcall -noname SHFreeUnusedLibraries() +124 stdcall DllRegisterServer() +125 stdcall DllUnregisterServer() +126 stdcall -noname SHOutOfMemoryMessageBox(long long long) # Fixme +127 stdcall -noname SHWinHelp(long long long long) +128 stdcall -noname SHDllGetClassObject(ptr ptr ptr) DllGetClassObject +129 stdcall DAD_AutoScroll(long ptr ptr) +130 stdcall -noname DAD_DragEnter(long) +131 stdcall DAD_DragEnterEx(long double) +132 stdcall DAD_DragLeave() +133 stdcall DoEnvironmentSubstA(str str) +134 stdcall DAD_DragMove(double) +135 stdcall DoEnvironmentSubstW(wstr wstr) +136 stdcall DAD_SetDragImage(long long) +137 stdcall DAD_ShowDragImage(long) +138 stdcall DragAcceptFiles(long long) +139 stdcall DragFinish(long) +140 stdcall DragQueryFile(long long ptr long) DragQueryFileA +141 stdcall DragQueryFileA(long long ptr long) +142 stdcall DragQueryFileAorW(ptr long wstr long long long) +143 stdcall DragQueryFileW(long long ptr long) +144 stdcall DragQueryPoint(long ptr) +145 stdcall -noname PathFindOnPath(wstr wstr) PathFindOnPathW +146 stdcall -noname RLBuildListOfPaths() +147 stdcall SHCLSIDFromString(long long) SHCLSIDFromStringAW +148 stdcall SHMapIDListToImageListIndexAsync(ptr ptr ptr long ptr ptr ptr ptr ptr) +149 stdcall SHFind_InitMenuPopup(long long long long) +150 stdcall DuplicateIcon(long long) +151 stdcall SHLoadOLE(long) +152 stdcall ILGetSize(ptr) +153 stdcall ILGetNext(ptr) +154 stdcall ILAppendID(long long long) ILAppend +155 stdcall ILFree(ptr) +156 stdcall -noname ILGlobalFree(ptr) +157 stdcall ILCreateFromPath(ptr) ILCreateFromPathAW +158 stdcall -noname PathGetExtension(wstr long long) SHPathGetExtensionW +159 stdcall -noname PathIsDirectory(wstr) PathIsDirectoryW +160 stdcall SHNetConnectionDialog(ptr wstr long) # Fixme +161 stdcall SHRunControlPanel(long long) +162 stdcall SHSimpleIDListFromPath(ptr) SHSimpleIDListFromPathAW # Fixme +163 stdcall -noname StrToOleStr(wstr str) StrToOleStrAW # Fixme +164 stdcall Win32DeleteFile(wstr) Win32DeleteFileW +165 stdcall SHCreateDirectory(long ptr) +166 stdcall CallCPLEntry16(long long long long long long) +167 stdcall SHAddFromPropSheetExtArray(long long long) +168 stdcall SHCreatePropSheetExtArray(long wstr long) +169 stdcall SHDestroyPropSheetExtArray(long) +170 stdcall SHReplaceFromPropSheetExtArray(long long long long) +171 stdcall PathCleanupSpec(ptr ptr) +172 stdcall -noname SHCreateLinks(long str ptr long ptr) +173 stdcall SHValidateUNC(long long long) +174 stdcall SHCreateShellFolderViewEx(ptr ptr) +175 stdcall -noname SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathW +176 stdcall SHSetInstanceExplorer(long) +177 stdcall DAD_SetDragImageFromListView(ptr long long) +178 stdcall SHObjectProperties(long long wstr wstr) +179 stdcall SHGetNewLinkInfoA(str str ptr long long) +180 stdcall SHGetNewLinkInfoW(wstr wstr ptr long long) +181 stdcall -noname RegisterShellHook(long long) +182 varargs ShellMessageBoxA(long long str str long) +183 varargs ShellMessageBoxW(long long wstr wstr long) +184 stdcall -noname ArrangeWindows(long long long long long) +185 stdcall -noname SHHandleDiskFull(ptr long) # Fixme +186 stdcall -noname ILGetDisplayNameEx(ptr ptr ptr long) +187 stdcall -noname ILGetPseudoNameW(ptr ptr wstr long) +188 stdcall -noname ShellDDEInit(long) +189 stdcall ILCreateFromPathA(str) +190 stdcall ILCreateFromPathW(wstr) +191 stdcall SHUpdateImageA(str long long long) +192 stdcall SHUpdateImageW(wstr long long long) +193 stdcall SHHandleUpdateImage(ptr) +194 stdcall -noname SHCreatePropSheetExtArrayEx(long wstr long ptr) +195 stdcall SHFree(ptr) +196 stdcall SHAlloc(long) +197 stdcall -noname SHGlobalDefect(long) +198 stdcall -noname SHAbortInvokeCommand() +199 stdcall ExtractAssociatedIconA(long str ptr) +200 stdcall -noname SHCreateDesktop(ptr) +201 stdcall -noname SHDesktopMessageLoop(ptr) +202 stub -noname DDEHandleViewFolderNotify +203 stdcall -noname AddCommasW(long wstr) +204 stdcall -noname ShortSizeFormatW(double) +205 stdcall Printer_LoadIconsW(wstr ptr ptr) +206 stdcall ExtractAssociatedIconExA(long str long long) +207 stdcall ExtractAssociatedIconExW(long wstr long long) +208 stdcall ExtractAssociatedIconW(long wstr ptr) +209 stdcall -noname Int64ToString(double wstr long long ptr long) # Fixme +210 stdcall -noname LargeIntegerToString(ptr wstr long long ptr long) # Fixme +211 stdcall -noname Printers_GetPidl(ptr str) # Fixme +212 stdcall -noname Printers_AddPrinterPropPages(ptr ptr) +213 stdcall -noname Printers_RegisterWindowW(wstr long ptr ptr) +214 stdcall -noname Printers_UnregisterWindow(long long) +215 stdcall -noname SHStartNetConnectionDialog(long str long) +216 stdcall ExtractIconA(long str long) +217 stdcall ExtractIconEx(ptr long ptr ptr long) ExtractIconExA +218 stdcall ExtractIconExA(str long ptr ptr long) +219 stdcall ExtractIconExW(wstr long ptr ptr long) +220 stdcall ExtractIconResInfoA(ptr str long ptr ptr) +221 stdcall ExtractIconResInfoW(ptr wstr long ptr ptr) +222 stdcall ExtractIconW(long wstr long) +223 stdcall ExtractVersionResource16W(wstr ptr) +224 stdcall FindExeDlgProc(ptr long ptr ptr) +225 stdcall FindExecutableA(str str ptr) +226 stdcall FindExecutableW(wstr wstr ptr) +227 stdcall FreeIconList(long) +228 stdcall InternalExtractIconListA(ptr str ptr) +229 stdcall InternalExtractIconListW(ptr wstr ptr) +230 stdcall -noname FirstUserLogon(wstr wstr) +231 stdcall -noname SHSetFolderPathA(long ptr long str) +232 stdcall -noname SHSetFolderPathW(long ptr long wstr) +233 stdcall -noname SHGetUserPicturePathW(wstr long ptr) +234 stdcall -noname SHSetUserPicturePathW(wstr long ptr) +235 stdcall -noname SHOpenEffectiveToken(ptr) +236 stdcall -noname SHTestTokenPrivilegeW(ptr ptr) +237 stdcall -noname SHShouldShowWizards(ptr) +238 stdcall Options_RunDLL(ptr ptr str long) +239 stdcall PathIsSlowW(wstr long) +240 stdcall PathIsSlowA(str long) +241 stdcall -noname SHGetUserDisplayName(wstr ptr) +242 stdcall -noname SHGetProcessDword(long long) +243 stdcall -noname SHSetShellWindowEx(ptr ptr) user32.SetShellWindowEx +244 stdcall -noname SHInitRestricted(ptr ptr) +245 stdcall SHTestTokenMembership(ptr ptr) +246 stub -noname SHInvokePrivilegedFunctionW +247 stub -noname SHGetActiveConsoleSessionId +248 stdcall -noname SHGetUserSessionId(ptr) # Fixme +249 stdcall -noname PathParseIconLocation(wstr) PathParseIconLocationW +250 stdcall -noname PathRemoveExtension(wstr) PathRemoveExtensionW +251 stdcall -noname PathRemoveArgs(wstr) PathRemoveArgsW +252 stdcall -noname PathIsURL(wstr) shlwapi.PathIsURLW +253 stub -noname SHIsCurrentProcessConsoleSession +254 stub -noname DisconnectWindowsDialog +255 stdcall Options_RunDLLA(ptr ptr str long) +256 stdcall SHCreateShellFolderView(ptr ptr) +257 stdcall -noname SHGetShellFolderViewCB(ptr) +258 stdcall -noname LinkWindow_RegisterClass() +259 stdcall -noname LinkWindow_UnregisterClass() +260 stdcall Options_RunDLLW(ptr ptr wstr long) +261 stdcall PrintersGetCommand_RunDLL(ptr ptr wstr long) +262 stdcall PrintersGetCommand_RunDLLA(ptr ptr str long) +263 stdcall PrintersGetCommand_RunDLLW(ptr ptr wstr long) +264 stdcall RealShellExecuteA(ptr str str str str str str str long ptr) +265 stdcall RealShellExecuteExA(ptr str str str str str str str long ptr long) +266 stdcall RealShellExecuteExW(ptr str str str str str str str long ptr long) +267 stdcall RealShellExecuteW(ptr wstr wstr wstr wstr wstr wstr wstr long ptr) +268 stdcall RegenerateUserEnvironment(ptr long) +269 stdcall SHAddToRecentDocs(long ptr) +270 stdcall SHAppBarMessage(long ptr) +271 stdcall SHBindToParent(ptr ptr ptr ptr) +272 stdcall SHBrowseForFolder(ptr) SHBrowseForFolderA +273 stdcall SHBrowseForFolderA(ptr) +274 stdcall SHBrowseForFolderW(ptr) +275 stdcall SHChangeNotify(long long ptr ptr) +276 stdcall SHChangeNotifySuspendResume(long ptr long long) +277 stdcall SHCreateDirectoryExA(long str ptr) +278 stdcall SHCreateDirectoryExW(long wstr ptr) +279 stub SHCreateLocalServerRunDll +280 stdcall SHCreateProcessAsUserW(ptr) +281 stdcall SHCreateQueryCancelAutoPlayMoniker(ptr) +282 stdcall SHCreateShellItem(ptr ptr ptr ptr) +283 stdcall SHEmptyRecycleBinA(long str long) +284 stdcall SHEmptyRecycleBinW(long wstr long) +285 stub SHEnableServiceObject +286 stub SHEnumerateUnreadMailAccountsW +287 stdcall SHExtractIconsW(wstr long long long ptr ptr long long) user32.PrivateExtractIconsW +288 stdcall SHFileOperation(ptr) SHFileOperationA +289 stdcall SHFileOperationA(ptr) +290 stdcall SHFileOperationW(ptr) +291 stdcall SHFormatDrive(long long long long) +292 stdcall SHFreeNameMappings(ptr) +293 stdcall SHGetDataFromIDListA(ptr ptr long ptr long) +294 stdcall SHGetDataFromIDListW(ptr ptr long ptr long) +295 stdcall SHGetDesktopFolder(ptr) +296 stdcall SHGetDiskFreeSpaceA(str ptr ptr ptr) kernel32.GetDiskFreeSpaceExA +297 stdcall SHGetDiskFreeSpaceExA(str ptr ptr ptr) kernel32.GetDiskFreeSpaceExA +298 stdcall SHGetDiskFreeSpaceExW(wstr ptr ptr ptr) kernel32.GetDiskFreeSpaceExW +299 stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfoA +300 stdcall SHGetFileInfoA(ptr long ptr long long) +301 stdcall SHGetFileInfoW(ptr long ptr long long) +302 stdcall SHGetFolderLocation(long long long long ptr) +303 stdcall SHGetFolderPathA(long long long long ptr) +304 stdcall SHGetFolderPathAndSubDirA(long long long long str ptr) +305 stdcall SHGetFolderPathAndSubDirW(long long long long wstr ptr) +306 stdcall SHGetFolderPathW(long long long long ptr) +307 stdcall SHGetIconOverlayIndexA(str long) +308 stdcall SHGetIconOverlayIndexW(wstr long) +309 stdcall SHGetInstanceExplorer(long) +310 stdcall SHGetMalloc(ptr) +311 stdcall SHGetNewLinkInfo(str str ptr long long) SHGetNewLinkInfoA +312 stdcall SHGetPathFromIDList(ptr ptr) SHGetPathFromIDListA +313 stdcall SHGetPathFromIDListA(ptr ptr) +314 stdcall SHGetPathFromIDListW(ptr ptr) +315 stdcall SHGetSettings(ptr long) +316 stdcall SHGetSpecialFolderLocation(long long ptr) +317 stdcall SHGetSpecialFolderPathA(long ptr long long) +318 stdcall SHGetSpecialFolderPathW(long ptr long long) +319 stdcall SHGetUnreadMailCountW(long wstr long ptr wstr long) +320 stdcall SHHelpShortcuts_RunDLL(long long long long) SHHelpShortcuts_RunDLLA +321 stdcall SHHelpShortcuts_RunDLLA(long long long long) +322 stdcall SHHelpShortcuts_RunDLLW(long long long long) +323 stdcall SHInvokePrinterCommandA(ptr long str str long) +324 stdcall SHInvokePrinterCommandW(ptr long wstr wstr long) +325 stdcall SHIsFileAvailableOffline(wstr ptr) +326 stdcall SHLoadInProc(long) +327 stdcall SHLoadNonloadedIconOverlayIdentifiers() +328 stdcall SHOpenFolderAndSelectItems(ptr long ptr long) +329 stdcall SHParseDisplayName(wstr ptr ptr long ptr) +330 stdcall SHPathPrepareForWriteA(long ptr str long) +331 stdcall SHPathPrepareForWriteW(long ptr wstr long) +332 stdcall SHQueryRecycleBinA(str ptr) +333 stdcall SHQueryRecycleBinW(wstr ptr) +334 stdcall SHSetLocalizedName(wstr wstr long) +335 stdcall SHSetUnreadMailCountW(wstr long wstr) +336 stdcall SHUpdateRecycleBinIcon() +337 stdcall SheChangeDirA(str) +338 stdcall SheChangeDirExA(str) +339 stdcall SheChangeDirExW(wstr) +340 stdcall SheChangeDirW(wstr) +341 stdcall SheConvertPathW(wstr wstr long) +342 stdcall SheFullPathA(str long str) +343 stdcall SheFullPathW(wstr long wstr) +344 stdcall SheGetCurDrive() +345 stdcall SheGetDirA(long long) +346 stdcall SheGetDirExW(wstr ptr wstr) +347 stdcall SheGetDirW(long long) +348 stdcall SheGetPathOffsetW(wstr) +349 stdcall SheRemoveQuotesA(str) +350 stdcall SheRemoveQuotesW(wstr) +351 stdcall SheSetCurDrive(long) +352 stdcall SheShortenPathA(str long) +353 stdcall SheShortenPathW(wstr long) +354 stdcall ShellAboutA(long str str long) +355 stdcall ShellAboutW(long wstr wstr long) +356 stdcall ShellExec_RunDLL(ptr ptr wstr long) +357 stdcall ShellExec_RunDLLA(ptr ptr str long) +358 stdcall ShellExec_RunDLLW(ptr ptr wstr long) +359 stdcall ShellExecuteA(long str str str str long) +360 stdcall ShellExecuteEx(long) ShellExecuteExA +361 stdcall ShellExecuteExA (long) +362 stdcall ShellExecuteExW (long) +363 stdcall ShellExecuteW(long wstr wstr wstr wstr long) +364 stdcall ShellHookProc(long ptr ptr) +365 stdcall Shell_NotifyIcon(long ptr) Shell_NotifyIconA +366 stdcall Shell_NotifyIconA(long ptr) +367 stdcall Shell_NotifyIconW(long ptr) +368 stdcall StrChrA(str long) shlwapi.StrChrA +369 stdcall StrChrIA(str long) shlwapi.StrChrIA +370 stdcall StrChrIW(wstr long) shlwapi.StrChrIW +371 stdcall StrChrW(wstr long) shlwapi.StrChrW +372 stdcall StrCmpNA(str str long) shlwapi.StrCmpNA +373 stdcall StrCmpNIA(str str long) shlwapi.StrCmpNIA +374 stdcall StrCmpNIW(wstr wstr long) shlwapi.StrCmpNIW +375 stdcall StrCmpNW(wstr wstr long) shlwapi.StrCmpNW +376 stdcall StrCpyNA (ptr str long) kernel32.lstrcpynA +377 stdcall StrCpyNW(wstr wstr long) shlwapi.StrCpyNW +378 stdcall StrNCmpA(str str long) shlwapi.StrCmpNA +379 stdcall StrNCmpIA(str str long) shlwapi.StrCmpNIA +380 stdcall StrNCmpIW(wstr wstr long) shlwapi.StrCmpNIW +381 stdcall StrNCmpW(wstr wstr long) shlwapi.StrCmpNW +382 stdcall StrNCpyA (ptr str long) kernel32.lstrcpynA +383 stdcall StrNCpyW(wstr wstr long) shlwapi.StrCpyNW +384 stdcall StrRChrA(str str long) shlwapi.StrRChrA +385 stdcall StrRChrIA(str str long) shlwapi.StrRChrIA +386 stdcall StrRChrIW(str str long) shlwapi.StrRChrIW +387 stdcall StrRChrW(wstr wstr long) shlwapi.StrRChrW +388 stdcall StrRStrA(str str str) +389 stdcall StrRStrIA(str str str) shlwapi.StrRStrIA +390 stdcall StrRStrIW(wstr wstr wstr) shlwapi.StrRStrIW +391 stdcall StrRStrW(wstr wstr wstr) +392 stdcall StrStrA(str str) shlwapi.StrStrA +393 stdcall StrStrIA(str str) shlwapi.StrStrIA +394 stdcall StrStrIW(wstr wstr) shlwapi.StrStrIW +395 stdcall StrStrW(wstr wstr) shlwapi.StrStrW +396 stdcall WOWShellExecute(ptr wstr wstr wstr wstr long ptr) +520 stdcall SHAllocShared(ptr long long) +521 stdcall SHLockShared(long long) +522 stdcall SHUnlockShared(ptr) +523 stdcall SHFreeShared(long long) +524 stdcall RealDriveType(long long) +525 stdcall -noname RealDriveTypeFlags(long long) +526 stdcall SHFlushSFCache() +640 stdcall -noname NTSHChangeNotifyRegister(long long long long long long) +641 stdcall -noname NTSHChangeNotifyDeregister(long) +643 stdcall -noname SHChangeNotifyReceive(long long ptr ptr) +644 stdcall SHChangeNotification_Lock(long long ptr ptr) +645 stdcall SHChangeNotification_Unlock(long) +646 stdcall -noname SHChangeRegistrationReceive(ptr long) +648 stdcall -noname SHWaitOp_Operate(ptr long) +650 stdcall -noname PathIsSameRoot(ptr ptr) PathIsSameRootAW # Fixme +651 stdcall -noname OldReadCabinetState(long long) ReadCabinetState +652 stdcall WriteCabinetState(long) +653 stdcall PathProcessCommand(long long long long) PathProcessCommandAW +654 stdcall ReadCabinetState(long long) +660 stdcall -noname FileIconInit(long) +680 stdcall IsUserAnAdmin() +681 stdcall -noname SHGetAppCompatFlags(long) shlwapi.SHGetAppCompatFlags +683 stub -noname SHStgOpenStorageW +684 stub -noname SHStgOpenStorageA +685 stub SHPropStgCreate +688 stub SHPropStgReadMultiple +689 stub SHPropStgWriteMultiple +690 stub -noname SHIsLegacyAnsiProperty +691 stub -noname SHFileSysBindToStorage +700 stdcall CDefFolderMenu_Create(ptr ptr long ptr ptr ptr ptr ptr ptr) +701 stdcall CDefFolderMenu_Create2(ptr ptr long ptr ptr ptr long ptr ptr) +702 stdcall -noname CDefFolderMenu_MergeMenu(ptr long long ptr) +703 stdcall -noname GUIDFromStringA(str ptr) +704 stdcall -noname GUIDFromStringW(wstr ptr) +707 stdcall -noname SHOpenPropSheetA(str ptr long ptr ptr ptr str) +708 stdcall -noname SHGetSetFolderCustomSettingsA(ptr str long) +709 stdcall SHGetSetFolderCustomSettingsW(ptr wstr long) +711 stdcall -noname CheckWinIniForAssocs() +712 stdcall -noname SHCopyMonikerToTemp(ptr wstr wstr long) +713 stdcall -noname PathIsTemporaryA(str) +714 stdcall -noname PathIsTemporaryW(wstr) +715 stdcall -noname SHCreatePropertyBag(ptr ptr) +716 stdcall SHMultiFileProperties(ptr long) +719 stdcall -noname SHParseDarwinIDFromCacheW(wstr wstr) +720 stdcall -noname MakeShellURLFromPathA(str str long) +721 stdcall -noname MakeShellURLFromPathW(wstr wstr long) +722 stub -noname SHCreateInstance +723 stdcall -noname SHCreateSessionKey(long ptr) +724 stdcall -noname SHIsTempDisplayMode() +725 stdcall -noname GetFileDescriptor(ptr long long wstr) +726 stdcall -noname CopyStreamUI(ptr ptr ptr) +727 stdcall SHGetImageList(long ptr ptr) +730 stdcall RestartDialogEx(long wstr long long) +731 stub -noname SHRegisterDarwinLink +732 stdcall -noname SHReValidateDarwinCache() +733 stdcall -noname CheckDiskSpace() +740 stub -noname SHCreateFileDataObject +743 stdcall SHCreateFileExtractIconW(wstr long ptr ptr) +744 stub -noname Create_IEnumUICommand +745 stub -noname Create_IUIElement +747 stdcall SHLimitInputEdit(ptr ptr) +748 stdcall -noname SHLimitInputCombo(ptr ptr) +749 stub SHGetShellStyleHInstance +750 stub SHGetAttributesFromDataObject +751 stub -noname SHSimulateDropOnClsid +752 stub -noname SHGetComputerDisplayNameW +753 stub -noname CheckStagingArea +754 stub -noname SHLimitInputEditWithFlags +755 stdcall -noname PathIsEqualOrSubFolder(wstr wstr) +756 stub -noname DeleteFileThumbnail + +# Functions exported by the WinVista shell32.dll +@ stdcall SHCreateDefaultContextMenu(ptr ptr ptr) +@ stdcall SHCreateDefaultExtractIcon(ptr ptr) + +# Discontinued in version 6.0. Until retired in WinVista and higher +@ stdcall FileMenu_DeleteAllItems(long) +@ stdcall FileMenu_DrawItem(long ptr) +@ stdcall FileMenu_FindSubMenuByPidl(long ptr) +@ stdcall FileMenu_GetLastSelectedItemPidls(long ptr ptr) +@ stdcall FileMenu_HandleMenuChar(long long) +@ stdcall FileMenu_InitMenuPopup(long) +@ stdcall FileMenu_InsertUsingPidl (long long ptr long long ptr) +@ stdcall FileMenu_Invalidate(long) +@ stdcall FileMenu_MeasureItem(long ptr) +@ stdcall FileMenu_ReplaceUsingPidl(long long ptr long ptr) +@ stdcall FileMenu_Create(long long long long long) +@ stdcall FileMenu_AppendItem(long ptr long long long long) FileMenu_AppendItemAW +@ stdcall FileMenu_TrackPopupMenuEx(long long long long long long) +@ stdcall FileMenu_DeleteItemByCmd(long long) +@ stdcall FileMenu_Destroy(long) +@ stdcall FileMenu_AbortInitMenu() +@ stdcall FileMenu_AppendFilesForPidl(long ptr long) +@ stdcall FileMenu_AddFilesForPidl(long long long ptr long long ptr) +@ stdcall FileMenu_DeleteItemByIndex(long long) +@ stdcall FileMenu_DeleteItemByFirstID(long long) +@ stdcall FileMenu_DeleteSeparator(long) +@ stdcall FileMenu_EnableItemByCmd(long long long) +@ stdcall FileMenu_GetItemExtent(long long) + +# 4.0 (NT) and higher. Until discontinued in 5.0 +@ stdcall SHRegCloseKey(long) +@ stdcall SHRegOpenKeyA(long str long) +@ stdcall SHRegOpenKeyW(long wstr long) +@ stdcall SHRegQueryValueA(long str ptr ptr) +@ stdcall SHRegQueryValueExA(long str ptr ptr ptr ptr) +@ stdcall SHRegQueryValueW (long long long long) +@ stdcall SHRegQueryValueExW (long wstr ptr ptr ptr ptr) +@ stdcall SHRegDeleteKeyW(long wstr) diff --git a/dll/win32/shell32_new/shell32_main.cpp b/dll/win32/shell32_new/shell32_main.cpp new file mode 100644 index 00000000000..631ef229a0c --- /dev/null +++ b/dll/win32/shell32_new/shell32_main.cpp @@ -0,0 +1,1478 @@ +/* + * Shell basics + * + * Copyright 1998 Marcus Meissner + * Copyright 1998 Juergen Schmied (jsch) * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include "shfldr_fs.h" +#include "shfldr_mycomp.h" +#include "shfldr_desktop.h" +#include "shellitem.h" +#include "shelllink.h" +#include "dragdrophelper.h" +#include "shfldr_cpanel.h" +#include "autocomplete.h" +#include "shfldr_mydocuments.h" +#include "shfldr_netplaces.h" +#include "shfldr_fonts.h" +#include "shfldr_printers.h" +#include "shfldr_admintools.h" +#include "shfldr_recyclebin.h" +#include "she_ocmenu.h" +#include "shv_item_new.h" +#include "startmenu.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +const char * const SHELL_Authors[] = { "Copyright 1993-2009 WINE team", "Copyright 1998-2009 ReactOS Team", 0 }; + +#define MORE_DEBUG 1 +/************************************************************************* + * CommandLineToArgvW [SHELL32.@] + * + * We must interpret the quotes in the command line to rebuild the argv + * array correctly: + * - arguments are separated by spaces or tabs + * - quotes serve as optional argument delimiters + * '"a b"' -> 'a b' + * - escaped quotes must be converted back to '"' + * '\"' -> '"' + * - an odd number of '\'s followed by '"' correspond to half that number + * of '\' followed by a '"' (extension of the above) + * '\\\"' -> '\"' + * '\\\\\"' -> '\\"' + * - an even number of '\'s followed by a '"' correspond to half that number + * of '\', plus a regular quote serving as an argument delimiter (which + * means it does not appear in the result) + * 'a\\"b c"' -> 'a\b c' + * 'a\\\\"b c"' -> 'a\\b c' + * - '\' that are not followed by a '"' are copied literally + * 'a\b' -> 'a\b' + * 'a\\b' -> 'a\\b' + * + * Note: + * '\t' == 0x0009 + * ' ' == 0x0020 + * '"' == 0x0022 + * '\\' == 0x005c + */ +LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs) +{ + DWORD argc; + LPWSTR *argv; + LPCWSTR cs; + LPWSTR arg,s,d; + LPWSTR cmdline; + int in_quotes,bcount; + + if (*lpCmdline==0) + { + /* Return the path to the executable */ + DWORD len, size=16; + + argv = (LPWSTR *)LocalAlloc(LMEM_FIXED, size); + for (;;) + { + len = GetModuleFileNameW(0, (LPWSTR)(argv+1), (size-sizeof(LPWSTR))/sizeof(WCHAR)); + if (!len) + { + LocalFree(argv); + return NULL; + } + if (len < size) break; + size*=2; + argv = (LPWSTR *)LocalReAlloc(argv, size, 0); + } + argv[0]=(LPWSTR)(argv+1); + if (numargs) + *numargs=1; + + return argv; + } + + /* to get a writable copy */ + argc=0; + bcount=0; + in_quotes=0; + cs=lpCmdline; + while (1) + { + if (*cs==0 || ((*cs==0x0009 || *cs==0x0020) && !in_quotes)) + { + /* space */ + argc++; + /* skip the remaining spaces */ + while (*cs==0x0009 || *cs==0x0020) { + cs++; + } + if (*cs==0) + break; + bcount=0; + continue; + } + else if (*cs==0x005c) + { + /* '\', count them */ + bcount++; + } + else if ((*cs==0x0022) && ((bcount & 1)==0)) + { + /* unescaped '"' */ + in_quotes=!in_quotes; + bcount=0; + } + else + { + /* a regular character */ + bcount=0; + } + cs++; + } + /* Allocate in a single lump, the string array, and the strings that go with it. + * This way the caller can make a single GlobalFree call to free both, as per MSDN. + */ + argv = (LPWSTR *)LocalAlloc(LMEM_FIXED, argc*sizeof(LPWSTR)+(wcslen(lpCmdline)+1)*sizeof(WCHAR)); + if (!argv) + return NULL; + cmdline=(LPWSTR)(argv+argc); + wcscpy(cmdline, lpCmdline); + + argc=0; + bcount=0; + in_quotes=0; + arg=d=s=cmdline; + while (*s) + { + if ((*s==0x0009 || *s==0x0020) && !in_quotes) + { + /* Close the argument and copy it */ + *d=0; + argv[argc++]=arg; + + /* skip the remaining spaces */ + do { + s++; + } while (*s==0x0009 || *s==0x0020); + + /* Start with a new argument */ + arg=d=s; + bcount=0; + } + else if (*s==0x005c) + { + /* '\\' */ + *d++=*s++; + bcount++; + } + else if (*s==0x0022) + { + /* '"' */ + if ((bcount & 1)==0) + { + /* Preceded by an even number of '\', this is half that + * number of '\', plus a quote which we erase. + */ + d-=bcount/2; + in_quotes=!in_quotes; + s++; + } + else + { + /* Preceded by an odd number of '\', this is half that + * number of '\' followed by a '"' + */ + d=d-bcount/2-1; + *d++='"'; + s++; + } + bcount=0; + } + else + { + /* a regular character */ + *d++=*s++; + bcount=0; + } + } + if (*arg) + { + *d='\0'; + argv[argc++]=arg; + } + if (numargs) + *numargs=argc; + + return argv; +} + +static DWORD shgfi_get_exe_type(LPCWSTR szFullPath) +{ + BOOL status = FALSE; + HANDLE hfile; + DWORD BinaryType; + IMAGE_DOS_HEADER mz_header; + IMAGE_NT_HEADERS nt; + DWORD len; + char magic[4]; + + status = GetBinaryTypeW (szFullPath, &BinaryType); + if (!status) + return 0; + if (BinaryType == SCS_DOS_BINARY || BinaryType == SCS_PIF_BINARY) + return 0x4d5a; + + hfile = CreateFileW( szFullPath, GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, 0, 0 ); + if ( hfile == INVALID_HANDLE_VALUE ) + return 0; + + /* + * The next section is adapted from MODULE_GetBinaryType, as we need + * to examine the image header to get OS and version information. We + * know from calling GetBinaryTypeA that the image is valid and either + * an NE or PE, so much error handling can be omitted. + * Seek to the start of the file and read the header information. + */ + + SetFilePointer( hfile, 0, NULL, SEEK_SET ); + ReadFile( hfile, &mz_header, sizeof(mz_header), &len, NULL ); + + SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + ReadFile( hfile, magic, sizeof(magic), &len, NULL ); + if ( *(DWORD*)magic == IMAGE_NT_SIGNATURE ) + { + SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + ReadFile( hfile, &nt, sizeof(nt), &len, NULL ); + CloseHandle( hfile ); + /* DLL files are not executable and should return 0 */ + if (nt.FileHeader.Characteristics & IMAGE_FILE_DLL) + return 0; + if (nt.OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI) + { + return IMAGE_NT_SIGNATURE | + (nt.OptionalHeader.MajorSubsystemVersion << 24) | + (nt.OptionalHeader.MinorSubsystemVersion << 16); + } + return IMAGE_NT_SIGNATURE; + } + else if ( *(WORD*)magic == IMAGE_OS2_SIGNATURE ) + { + IMAGE_OS2_HEADER ne; + SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + ReadFile( hfile, &ne, sizeof(ne), &len, NULL ); + CloseHandle( hfile ); + if (ne.ne_exetyp == 2) + return IMAGE_OS2_SIGNATURE | (ne.ne_expver << 16); + return 0; + } + CloseHandle( hfile ); + return 0; +} + +/************************************************************************* + * SHELL_IsShortcut [internal] + * + * Decide if an item id list points to a shell shortcut + */ +BOOL SHELL_IsShortcut(LPCITEMIDLIST pidlLast) +{ + char szTemp[MAX_PATH]; + HKEY keyCls; + BOOL ret = FALSE; + + if (_ILGetExtension(pidlLast, szTemp, MAX_PATH) && + HCR_MapTypeToValueA(szTemp, szTemp, MAX_PATH, TRUE)) + { + if (ERROR_SUCCESS == RegOpenKeyExA(HKEY_CLASSES_ROOT, szTemp, 0, KEY_QUERY_VALUE, &keyCls)) + { + if (ERROR_SUCCESS == RegQueryValueExA(keyCls, "IsShortcut", NULL, NULL, NULL, NULL)) + ret = TRUE; + + RegCloseKey(keyCls); + } + } + + return ret; +} + +#define SHGFI_KNOWN_FLAGS \ + (SHGFI_SMALLICON | SHGFI_OPENICON | SHGFI_SHELLICONSIZE | SHGFI_PIDL | \ + SHGFI_USEFILEATTRIBUTES | SHGFI_ADDOVERLAYS | SHGFI_OVERLAYINDEX | \ + SHGFI_ICON | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES | \ + SHGFI_ICONLOCATION | SHGFI_EXETYPE | SHGFI_SYSICONINDEX | \ + SHGFI_LINKOVERLAY | SHGFI_SELECTED | SHGFI_ATTR_SPECIFIED) + +/************************************************************************* + * SHGetFileInfoW [SHELL32.@] + * + */ +DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, + SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags ) +{ + WCHAR szLocation[MAX_PATH], szFullPath[MAX_PATH]; + int iIndex; + DWORD_PTR ret = TRUE; + DWORD dwAttributes = 0; + CComPtr psfParent; + CComPtr pei; + LPITEMIDLIST pidlLast = NULL, pidl = NULL; + HRESULT hr = S_OK; + BOOL IconNotYetLoaded=TRUE; + UINT uGilFlags = 0; + + TRACE("%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n", + (flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes, + psfi, psfi->dwAttributes, sizeofpsfi, flags); + + if ( (flags & SHGFI_USEFILEATTRIBUTES) && + (flags & (SHGFI_ATTRIBUTES|SHGFI_EXETYPE|SHGFI_PIDL))) + return FALSE; + if (!path) + return FALSE; + + /* windows initializes these values regardless of the flags */ + if (psfi != NULL) + { + psfi->szDisplayName[0] = '\0'; + psfi->szTypeName[0] = '\0'; + psfi->iIcon = 0; + } + + if (!(flags & SHGFI_PIDL)) + { + /* SHGetFileInfo should work with absolute and relative paths */ + if (PathIsRelativeW(path)) + { + GetCurrentDirectoryW(MAX_PATH, szLocation); + PathCombineW(szFullPath, szLocation, path); + } + else + { + lstrcpynW(szFullPath, path, MAX_PATH); + } + } + + if (flags & SHGFI_EXETYPE) + { + if (flags != SHGFI_EXETYPE) + return 0; + return shgfi_get_exe_type(szFullPath); + } + + /* + * psfi is NULL normally to query EXE type. If it is NULL, none of the + * below makes sense anyway. Windows allows this and just returns FALSE + */ + if (psfi == NULL) + return FALSE; + + /* + * translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES + * is not specified. + * The pidl functions fail on not existing file names + */ + + if (flags & SHGFI_PIDL) + { + pidl = ILClone((LPCITEMIDLIST)path); + } + else if (!(flags & SHGFI_USEFILEATTRIBUTES)) + { + hr = SHILCreateFromPathW(szFullPath, &pidl, &dwAttributes); + } + + if ((flags & SHGFI_PIDL) || !(flags & SHGFI_USEFILEATTRIBUTES)) + { + /* get the parent shellfolder */ + if (pidl) + { + hr = SHBindToParent( pidl, IID_IShellFolder, (LPVOID*)&psfParent, + (LPCITEMIDLIST*)&pidlLast ); + if (SUCCEEDED(hr)) + pidlLast = ILClone(pidlLast); + ILFree(pidl); + } + else + { + ERR("pidl is null!\n"); + return FALSE; + } + } + + /* get the attributes of the child */ + if (SUCCEEDED(hr) && (flags & SHGFI_ATTRIBUTES)) + { + if (!(flags & SHGFI_ATTR_SPECIFIED)) + { + psfi->dwAttributes = 0xffffffff; + } + if (psfParent != NULL) + psfParent->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlLast, + &(psfi->dwAttributes) ); + } + + /* get the displayname */ + if (SUCCEEDED(hr) && (flags & SHGFI_DISPLAYNAME)) + { + if (flags & SHGFI_USEFILEATTRIBUTES) + { + wcscpy (psfi->szDisplayName, PathFindFileNameW(szFullPath)); + } + else + { + STRRET str; + hr = psfParent->GetDisplayNameOf(pidlLast, + SHGDN_INFOLDER, &str); + StrRetToStrNW (psfi->szDisplayName, MAX_PATH, &str, pidlLast); + } + } + + /* get the type name */ + if (SUCCEEDED(hr) && (flags & SHGFI_TYPENAME)) + { + static const WCHAR szFile[] = { 'F','i','l','e',0 }; + static const WCHAR szDashFile[] = { '-','f','i','l','e',0 }; + + if (!(flags & SHGFI_USEFILEATTRIBUTES)) + { + char ftype[80]; + + _ILGetFileType(pidlLast, ftype, 80); + MultiByteToWideChar(CP_ACP, 0, ftype, -1, psfi->szTypeName, 80 ); + } + else + { + if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + wcscat (psfi->szTypeName, szFile); + else + { + WCHAR sTemp[64]; + + wcscpy(sTemp,PathFindExtensionW(szFullPath)); + if (!( HCR_MapTypeToValueW(sTemp, sTemp, 64, TRUE) && + HCR_MapTypeToValueW(sTemp, psfi->szTypeName, 80, FALSE ))) + { + lstrcpynW (psfi->szTypeName, sTemp, 64); + wcscat (psfi->szTypeName, szDashFile); + } + } + } + } + + /* ### icons ###*/ + if (flags & SHGFI_OPENICON) + uGilFlags |= GIL_OPENICON; + + if (flags & SHGFI_LINKOVERLAY) + uGilFlags |= GIL_FORSHORTCUT; + else if ((flags&SHGFI_ADDOVERLAYS) || + (flags&(SHGFI_ICON|SHGFI_SMALLICON))==SHGFI_ICON) + { + if (SHELL_IsShortcut(pidlLast)) + uGilFlags |= GIL_FORSHORTCUT; + } + + if (flags & SHGFI_OVERLAYINDEX) + FIXME("SHGFI_OVERLAYINDEX unhandled\n"); + + if (flags & SHGFI_SELECTED) + FIXME("set icon to selected, stub\n"); + + if (flags & SHGFI_SHELLICONSIZE) + FIXME("set icon to shell size, stub\n"); + + /* get the iconlocation */ + if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION )) + { + UINT uDummy,uFlags; + + if (flags & SHGFI_USEFILEATTRIBUTES) + { + if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + wcscpy(psfi->szDisplayName, swShell32Name); + psfi->iIcon = -IDI_SHELL_FOLDER; + } + else + { + WCHAR* szExt; + static const WCHAR p1W[] = {'%','1',0}; + WCHAR sTemp [MAX_PATH]; + + szExt = PathFindExtensionW(szFullPath); + TRACE("szExt=%s\n", debugstr_w(szExt)); + if ( szExt && + HCR_MapTypeToValueW(szExt, sTemp, MAX_PATH, TRUE) && + HCR_GetDefaultIconW(sTemp, sTemp, MAX_PATH, &psfi->iIcon)) + { + if (lstrcmpW(p1W, sTemp)) + wcscpy(psfi->szDisplayName, sTemp); + else + { + /* the icon is in the file */ + wcscpy(psfi->szDisplayName, szFullPath); + } + } + else + ret = FALSE; + } + } + else + { + hr = psfParent->GetUIObjectOf(0, 1, + (LPCITEMIDLIST*)&pidlLast, IID_IExtractIconW, + &uDummy, (LPVOID*)&pei); + if (SUCCEEDED(hr)) + { + hr = pei->GetIconLocation(uGilFlags, + szLocation, MAX_PATH, &iIndex, &uFlags); + + if (uFlags & GIL_NOTFILENAME) + ret = FALSE; + else + { + wcscpy (psfi->szDisplayName, szLocation); + psfi->iIcon = iIndex; + } + } + } + } + + /* get icon index (or load icon)*/ + if (SUCCEEDED(hr) && (flags & (SHGFI_ICON | SHGFI_SYSICONINDEX))) + { + if (flags & SHGFI_USEFILEATTRIBUTES && !(flags & SHGFI_PIDL)) + { + WCHAR sTemp [MAX_PATH]; + WCHAR * szExt; + int icon_idx=0; + + lstrcpynW(sTemp, szFullPath, MAX_PATH); + + if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + psfi->iIcon = SIC_GetIconIndex(swShell32Name, -IDI_SHELL_FOLDER, 0); + else + { + static const WCHAR p1W[] = {'%','1',0}; + + psfi->iIcon = 0; + szExt = PathFindExtensionW(sTemp); + if ( szExt && + HCR_MapTypeToValueW(szExt, sTemp, MAX_PATH, TRUE) && + HCR_GetDefaultIconW(sTemp, sTemp, MAX_PATH, &icon_idx)) + { + if (!lstrcmpW(p1W,sTemp)) /* icon is in the file */ + wcscpy(sTemp, szFullPath); + + if (flags & SHGFI_SYSICONINDEX) + { + psfi->iIcon = SIC_GetIconIndex(sTemp,icon_idx,0); + if (psfi->iIcon == -1) + psfi->iIcon = 0; + } + else + { + UINT ret; + if (flags & SHGFI_SMALLICON) + ret = PrivateExtractIconsW( sTemp,icon_idx, + GetSystemMetrics( SM_CXSMICON ), + GetSystemMetrics( SM_CYSMICON ), + &psfi->hIcon, 0, 1, 0); + else + ret = PrivateExtractIconsW( sTemp, icon_idx, + GetSystemMetrics( SM_CXICON), + GetSystemMetrics( SM_CYICON), + &psfi->hIcon, 0, 1, 0); + if (ret != 0 && ret != 0xFFFFFFFF) + { + IconNotYetLoaded=FALSE; + psfi->iIcon = icon_idx; + } + } + } + } + } + else + { + if (!(PidlToSicIndex(psfParent, pidlLast, !(flags & SHGFI_SMALLICON), + uGilFlags, &(psfi->iIcon)))) + { + ret = FALSE; + } + } + if (ret && (flags & SHGFI_SYSICONINDEX)) + { + if (flags & SHGFI_SMALLICON) + ret = (DWORD_PTR) ShellSmallIconList; + else + ret = (DWORD_PTR) ShellBigIconList; + } + } + + /* icon handle */ + if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded) + { + if (flags & SHGFI_SMALLICON) + psfi->hIcon = ImageList_GetIcon( ShellSmallIconList, psfi->iIcon, ILD_NORMAL); + else + psfi->hIcon = ImageList_GetIcon( ShellBigIconList, psfi->iIcon, ILD_NORMAL); + } + + if (flags & ~SHGFI_KNOWN_FLAGS) + FIXME("unknown flags %08x\n", flags & ~SHGFI_KNOWN_FLAGS); + + if (hr != S_OK) + ret = FALSE; + + SHFree(pidlLast); + +#ifdef MORE_DEBUG + TRACE ("icon=%p index=0x%08x attr=0x%08x name=%s type=%s ret=0x%08lx\n", + psfi->hIcon, psfi->iIcon, psfi->dwAttributes, + debugstr_w(psfi->szDisplayName), debugstr_w(psfi->szTypeName), ret); +#endif + + return ret; +} + +/************************************************************************* + * SHGetFileInfoA [SHELL32.@] + * + * Note: + * MSVBVM60.__vbaNew2 expects this function to return a value in range + * 1 .. 0x7fff when the function succeeds and flags does not contain + * SHGFI_EXETYPE or SHGFI_SYSICONINDEX (see bug 7701) + */ +DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, + SHFILEINFOA *psfi, UINT sizeofpsfi, + UINT flags ) +{ + INT len; + LPWSTR temppath = NULL; + LPCWSTR pathW; + DWORD ret; + SHFILEINFOW temppsfi; + + if (flags & SHGFI_PIDL) + { + /* path contains a pidl */ + pathW = (LPCWSTR)path; + } + else + { + len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0); + temppath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, path, -1, temppath, len); + pathW = temppath; + } + + if (psfi && (flags & SHGFI_ATTR_SPECIFIED)) + temppsfi.dwAttributes=psfi->dwAttributes; + + if (psfi == NULL) + ret = SHGetFileInfoW(pathW, dwFileAttributes, NULL, sizeof(temppsfi), flags); + else + ret = SHGetFileInfoW(pathW, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags); + + if (psfi) + { + if(flags & SHGFI_ICON) + psfi->hIcon=temppsfi.hIcon; + if(flags & (SHGFI_SYSICONINDEX|SHGFI_ICON|SHGFI_ICONLOCATION)) + psfi->iIcon=temppsfi.iIcon; + if(flags & SHGFI_ATTRIBUTES) + psfi->dwAttributes=temppsfi.dwAttributes; + if(flags & (SHGFI_DISPLAYNAME|SHGFI_ICONLOCATION)) + { + WideCharToMultiByte(CP_ACP, 0, temppsfi.szDisplayName, -1, + psfi->szDisplayName, sizeof(psfi->szDisplayName), NULL, NULL); + } + if(flags & SHGFI_TYPENAME) + { + WideCharToMultiByte(CP_ACP, 0, temppsfi.szTypeName, -1, + psfi->szTypeName, sizeof(psfi->szTypeName), NULL, NULL); + } + } + + HeapFree(GetProcessHeap(), 0, temppath); + + return ret; +} + +/************************************************************************* + * DuplicateIcon [SHELL32.@] + */ +EXTERN_C HICON WINAPI DuplicateIcon( HINSTANCE hInstance, HICON hIcon) +{ + ICONINFO IconInfo; + HICON hDupIcon = 0; + + TRACE("%p %p\n", hInstance, hIcon); + + if (GetIconInfo(hIcon, &IconInfo)) + { + hDupIcon = CreateIconIndirect(&IconInfo); + + /* clean up hbmMask and hbmColor */ + DeleteObject(IconInfo.hbmMask); + DeleteObject(IconInfo.hbmColor); + } + + return hDupIcon; +} + +/************************************************************************* + * ExtractIconA [SHELL32.@] + */ +HICON WINAPI ExtractIconA(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex) +{ + HICON ret; + INT len = MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, NULL, 0); + LPWSTR lpwstrFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("%p %s %d\n", hInstance, lpszFile, nIconIndex); + + MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); + ret = ExtractIconW(hInstance, lpwstrFile, nIconIndex); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + + return ret; +} + +/************************************************************************* + * ExtractIconW [SHELL32.@] + */ +HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex) +{ + HICON hIcon = NULL; + UINT ret; + UINT cx = GetSystemMetrics(SM_CXICON), cy = GetSystemMetrics(SM_CYICON); + + TRACE("%p %s %d\n", hInstance, debugstr_w(lpszFile), nIconIndex); + + if (nIconIndex == 0xFFFFFFFF) + { + ret = PrivateExtractIconsW(lpszFile, 0, cx, cy, NULL, NULL, 0, LR_DEFAULTCOLOR); + if (ret != 0xFFFFFFFF && ret) + return (HICON)(UINT_PTR)ret; + return NULL; + } + else + ret = PrivateExtractIconsW(lpszFile, nIconIndex, cx, cy, &hIcon, NULL, 1, LR_DEFAULTCOLOR); + + if (ret == 0xFFFFFFFF) + return (HICON)1; + else if (ret > 0 && hIcon) + return hIcon; + + return NULL; +} + +/************************************************************************* + * Printer_LoadIconsW [SHELL32.205] + */ +EXTERN_C VOID WINAPI Printer_LoadIconsW(LPCWSTR wsPrinterName, HICON * pLargeIcon, HICON * pSmallIcon) +{ + INT iconindex=IDI_SHELL_PRINTERS_FOLDER; + + TRACE("(%s, %p, %p)\n", debugstr_w(wsPrinterName), pLargeIcon, pSmallIcon); + + /* We should check if wsPrinterName is + 1. the Default Printer or not + 2. connected or not + 3. a Local Printer or a Network-Printer + and use different Icons + */ + if((wsPrinterName != NULL) && (wsPrinterName[0] != 0)) + { + FIXME("(select Icon by PrinterName %s not implemented)\n", debugstr_w(wsPrinterName)); + } + + if(pLargeIcon != NULL) + *pLargeIcon = (HICON)LoadImageW(shell32_hInstance, + (LPCWSTR) MAKEINTRESOURCE(iconindex), IMAGE_ICON, + 0, 0, LR_DEFAULTCOLOR|LR_DEFAULTSIZE); + + if(pSmallIcon != NULL) + *pSmallIcon = (HICON)LoadImageW(shell32_hInstance, + (LPCWSTR) MAKEINTRESOURCE(iconindex), IMAGE_ICON, + 16, 16, LR_DEFAULTCOLOR); +} + +/************************************************************************* + * Printers_RegisterWindowW [SHELL32.213] + * used by "printui.dll": + * find the Window of the given Type for the specific Printer and + * return the already existent hwnd or open a new window + */ +EXTERN_C BOOL WINAPI Printers_RegisterWindowW(LPCWSTR wsPrinter, DWORD dwType, + HANDLE * phClassPidl, HWND * phwnd) +{ + FIXME("(%s, %x, %p (%p), %p (%p)) stub!\n", debugstr_w(wsPrinter), dwType, + phClassPidl, (phClassPidl != NULL) ? *(phClassPidl) : NULL, + phwnd, (phwnd != NULL) ? *(phwnd) : NULL); + + return FALSE; +} + +/************************************************************************* + * Printers_UnregisterWindow [SHELL32.214] + */ +EXTERN_C VOID WINAPI Printers_UnregisterWindow(HANDLE hClassPidl, HWND hwnd) +{ + FIXME("(%p, %p) stub!\n", hClassPidl, hwnd); +} + +/*************************************************************************/ + +typedef struct +{ + LPCWSTR szApp; + LPCWSTR szOtherStuff; + HICON hIcon; +} ABOUT_INFO; + +#define DROP_FIELD_TOP (-15) +#define DROP_FIELD_HEIGHT 15 + +/************************************************************************* + * SHAppBarMessage [SHELL32.@] + */ +UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) +{ + int width=data->rc.right - data->rc.left; + int height=data->rc.bottom - data->rc.top; + RECT rec=data->rc; + + TRACE("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n", + msg, data->cbSize, data->hWnd, data->uCallbackMessage, data->uEdge, + wine_dbgstr_rect(&data->rc), data->lParam); + + switch (msg) + { + case ABM_GETSTATE: + return ABS_ALWAYSONTOP | ABS_AUTOHIDE; + case ABM_GETTASKBARPOS: + GetWindowRect(data->hWnd, &rec); + data->rc=rec; + return TRUE; + case ABM_ACTIVATE: + SetActiveWindow(data->hWnd); + return TRUE; + case ABM_GETAUTOHIDEBAR: + return 0; /* pretend there is no autohide bar */ + case ABM_NEW: + /* cbSize, hWnd, and uCallbackMessage are used. All other ignored */ + SetWindowPos(data->hWnd,HWND_TOP,0,0,0,0,SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE); + return TRUE; + case ABM_QUERYPOS: + GetWindowRect(data->hWnd, &(data->rc)); + return TRUE; + case ABM_REMOVE: + FIXME("ABM_REMOVE broken\n"); + /* FIXME: this is wrong; should it be DestroyWindow instead? */ + /*CloseHandle(data->hWnd);*/ + return TRUE; + case ABM_SETAUTOHIDEBAR: + SetWindowPos(data->hWnd,HWND_TOP,rec.left+1000,rec.top, + width,height,SWP_SHOWWINDOW); + return TRUE; + case ABM_SETPOS: + data->uEdge=(ABE_RIGHT | ABE_LEFT); + SetWindowPos(data->hWnd,HWND_TOP,data->rc.left,data->rc.top, + width,height,SWP_SHOWWINDOW); + return TRUE; + case ABM_WINDOWPOSCHANGED: + return TRUE; + } + return FALSE; +} + +/************************************************************************* + * SHHelpShortcuts_RunDLLA [SHELL32.@] + * + */ +EXTERN_C DWORD WINAPI SHHelpShortcuts_RunDLLA(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) +{ + FIXME("(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4); + return 0; +} + +/************************************************************************* + * SHHelpShortcuts_RunDLLA [SHELL32.@] + * + */ +EXTERN_C DWORD WINAPI SHHelpShortcuts_RunDLLW(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) +{ + FIXME("(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4); + return 0; +} + +/************************************************************************* + * SHLoadInProc [SHELL32.@] + * Create an instance of specified object class from within + * the shell process and release it immediately + */ +EXTERN_C HRESULT WINAPI SHLoadInProc (REFCLSID rclsid) +{ + CComPtr ptr; + + TRACE("%s\n", debugstr_guid(&rclsid)); + + CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&ptr); + if (ptr) + return NOERROR; + return DISP_E_MEMBERNOTFOUND; +} + +static VOID SetRegTextData(HWND hWnd, HKEY hKey, LPCWSTR Value, UINT uID) +{ + DWORD dwBufferSize; + DWORD dwType; + LPWSTR lpBuffer; + + if( RegQueryValueExW(hKey, Value, NULL, &dwType, NULL, &dwBufferSize) == ERROR_SUCCESS ) + { + if(dwType == REG_SZ) + { + lpBuffer = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwBufferSize); + + if(lpBuffer) + { + if( RegQueryValueExW(hKey, Value, NULL, &dwType, (LPBYTE)lpBuffer, &dwBufferSize) == ERROR_SUCCESS ) + { + SetDlgItemTextW(hWnd, uID, lpBuffer); + } + + HeapFree(GetProcessHeap(), 0, lpBuffer); + } + } + } +} + +INT_PTR CALLBACK AboutAuthorsDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + switch(msg) + { + case WM_INITDIALOG: + { + const char* const *pstr = SHELL_Authors; + + // Add the authors to the list + SendDlgItemMessageW( hWnd, IDC_SHELL_ABOUT_AUTHORS_LISTBOX, WM_SETREDRAW, FALSE, 0 ); + + while (*pstr) + { + WCHAR name[64]; + + /* authors list is in utf-8 format */ + MultiByteToWideChar( CP_UTF8, 0, *pstr, -1, name, sizeof(name)/sizeof(WCHAR) ); + SendDlgItemMessageW( hWnd, IDC_SHELL_ABOUT_AUTHORS_LISTBOX, LB_ADDSTRING, (WPARAM)-1, (LPARAM)name ); + pstr++; + } + + SendDlgItemMessageW( hWnd, IDC_SHELL_ABOUT_AUTHORS_LISTBOX, WM_SETREDRAW, TRUE, 0 ); + + return TRUE; + } + } + + return FALSE; +} +/************************************************************************* + * AboutDlgProc (internal) + */ +INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + static DWORD cxLogoBmp; + static DWORD cyLogoBmp; + static HBITMAP hLogoBmp; + static HWND hWndAuthors; + + switch(msg) + { + case WM_INITDIALOG: + { + ABOUT_INFO *info = (ABOUT_INFO *)lParam; + + if (info) + { + const WCHAR szRegKey[] = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"; + HKEY hRegKey; + MEMORYSTATUSEX MemStat; + WCHAR szAppTitle[512]; + WCHAR szAppTitleTemplate[512]; + WCHAR szAuthorsText[20]; + + // Preload the ROS bitmap + hLogoBmp = (HBITMAP)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDB_SHELL_ABOUT_LOGO_24BPP), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); + + if(hLogoBmp) + { + BITMAP bmpLogo; + + GetObject( hLogoBmp, sizeof(BITMAP), &bmpLogo ); + + cxLogoBmp = bmpLogo.bmWidth; + cyLogoBmp = bmpLogo.bmHeight; + } + + // Set App-specific stuff (icon, app name, szOtherStuff string) + SendDlgItemMessageW(hWnd, IDC_SHELL_ABOUT_ICON, STM_SETICON, (WPARAM)info->hIcon, 0); + + GetWindowTextW( hWnd, szAppTitleTemplate, sizeof(szAppTitleTemplate) / sizeof(WCHAR) ); + swprintf( szAppTitle, szAppTitleTemplate, info->szApp ); + SetWindowTextW( hWnd, szAppTitle ); + + SetDlgItemTextW( hWnd, IDC_SHELL_ABOUT_APPNAME, info->szApp ); + SetDlgItemTextW( hWnd, IDC_SHELL_ABOUT_OTHERSTUFF, info->szOtherStuff ); + + // Set the registered user and organization name + if(RegOpenKeyExW( HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_QUERY_VALUE, &hRegKey ) == ERROR_SUCCESS) + { + SetRegTextData( hWnd, hRegKey, L"RegisteredOwner", IDC_SHELL_ABOUT_REG_USERNAME ); + SetRegTextData( hWnd, hRegKey, L"RegisteredOrganization", IDC_SHELL_ABOUT_REG_ORGNAME ); + + RegCloseKey( hRegKey ); + } + + // Set the value for the installed physical memory + MemStat.dwLength = sizeof(MemStat); + if( GlobalMemoryStatusEx(&MemStat) ) + { + WCHAR szBuf[12]; + + if (MemStat.ullTotalPhys > 1024 * 1024 * 1024) + { + double dTotalPhys; + WCHAR szDecimalSeparator[4]; + WCHAR szUnits[3]; + + // We're dealing with GBs or more + MemStat.ullTotalPhys /= 1024 * 1024; + + if (MemStat.ullTotalPhys > 1024 * 1024) + { + // We're dealing with TBs or more + MemStat.ullTotalPhys /= 1024; + + if (MemStat.ullTotalPhys > 1024 * 1024) + { + // We're dealing with PBs or more + MemStat.ullTotalPhys /= 1024; + + dTotalPhys = (double)MemStat.ullTotalPhys / 1024; + wcscpy( szUnits, L"PB" ); + } + else + { + dTotalPhys = (double)MemStat.ullTotalPhys / 1024; + wcscpy( szUnits, L"TB" ); + } + } + else + { + dTotalPhys = (double)MemStat.ullTotalPhys / 1024; + wcscpy( szUnits, L"GB" ); + } + + // We need the decimal point of the current locale to display the RAM size correctly + if( GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, szDecimalSeparator, sizeof(szDecimalSeparator) / sizeof(WCHAR)) > 0) + { + UCHAR uDecimals; + UINT uIntegral; + + uIntegral = (UINT)dTotalPhys; + uDecimals = (UCHAR)((UINT)(dTotalPhys * 100) - uIntegral * 100); + + // Display the RAM size with 2 decimals + swprintf(szBuf, L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits); + } + } + else + { + // We're dealing with MBs, don't show any decimals + swprintf( szBuf, L"%u MB", (UINT)MemStat.ullTotalPhys / 1024 / 1024 ); + } + + SetDlgItemTextW( hWnd, IDC_SHELL_ABOUT_PHYSMEM, szBuf); + } + + // Add the Authors dialog + hWndAuthors = CreateDialogW( shell32_hInstance, MAKEINTRESOURCEW(IDD_SHELL_ABOUT_AUTHORS), hWnd, AboutAuthorsDlgProc ); + LoadStringW( shell32_hInstance, IDS_SHELL_ABOUT_AUTHORS, szAuthorsText, sizeof(szAuthorsText) / sizeof(WCHAR) ); + SetDlgItemTextW( hWnd, IDC_SHELL_ABOUT_AUTHORS, szAuthorsText ); + } + + return TRUE; + } + + case WM_PAINT: + { + if(hLogoBmp) + { + PAINTSTRUCT ps; + HDC hdc; + HDC hdcMem; + + hdc = BeginPaint(hWnd, &ps); + hdcMem = CreateCompatibleDC(hdc); + + if(hdcMem) + { + SelectObject(hdcMem, hLogoBmp); + BitBlt(hdc, 0, 0, cxLogoBmp, cyLogoBmp, hdcMem, 0, 0, SRCCOPY); + + DeleteDC(hdcMem); + } + + EndPaint(hWnd, &ps); + } + + break; + } + + case WM_COMMAND: + switch(wParam) + { + case IDOK: + case IDCANCEL: + EndDialog(hWnd, TRUE); + return TRUE; + + case IDC_SHELL_ABOUT_AUTHORS: + { + static BOOL bShowingAuthors = FALSE; + WCHAR szAuthorsText[20]; + + if(bShowingAuthors) + { + LoadStringW( shell32_hInstance, IDS_SHELL_ABOUT_AUTHORS, szAuthorsText, sizeof(szAuthorsText) / sizeof(WCHAR) ); + ShowWindow( hWndAuthors, SW_HIDE ); + } + else + { + LoadStringW( shell32_hInstance, IDS_SHELL_ABOUT_BACK, szAuthorsText, sizeof(szAuthorsText) / sizeof(WCHAR) ); + ShowWindow( hWndAuthors, SW_SHOW ); + } + + SetDlgItemTextW( hWnd, IDC_SHELL_ABOUT_AUTHORS, szAuthorsText ); + bShowingAuthors = !bShowingAuthors; + return TRUE; + } + } + break; + + case WM_CLOSE: + EndDialog(hWnd, TRUE); + break; + } + + return FALSE; +} + + +/************************************************************************* + * ShellAboutA [SHELL32.288] + */ +BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon ) +{ + BOOL ret; + LPWSTR appW = NULL, otherW = NULL; + int len; + + if (szApp) + { + len = MultiByteToWideChar(CP_ACP, 0, szApp, -1, NULL, 0); + appW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, szApp, -1, appW, len); + } + if (szOtherStuff) + { + len = MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, NULL, 0); + otherW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, otherW, len); + } + + ret = ShellAboutW(hWnd, appW, otherW, hIcon); + + HeapFree(GetProcessHeap(), 0, otherW); + HeapFree(GetProcessHeap(), 0, appW); + return ret; +} + + +/************************************************************************* + * ShellAboutW [SHELL32.289] + */ +BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, + HICON hIcon ) +{ + ABOUT_INFO info; + HRSRC hRes; + DLGTEMPLATE *DlgTemplate; + BOOL bRet; + + TRACE("\n"); + + // DialogBoxIndirectParamW will be called with the hInstance of the calling application, so we have to preload the dialog template + if(!(hRes = FindResourceW(shell32_hInstance, MAKEINTRESOURCEW(IDD_SHELL_ABOUT), (LPWSTR)RT_DIALOG))) + return FALSE; + if(!(DlgTemplate = (DLGTEMPLATE *)LoadResource(shell32_hInstance, hRes))) + return FALSE; + + info.szApp = szApp; + info.szOtherStuff = szOtherStuff; + info.hIcon = hIcon ? hIcon : LoadIconW( 0, (LPWSTR)IDI_WINLOGO ); + + bRet = DialogBoxIndirectParamW((HINSTANCE)GetWindowLongPtrW( hWnd, GWLP_HINSTANCE ), + DlgTemplate, hWnd, AboutDlgProc, (LPARAM)&info ); + return bRet; +} + +/************************************************************************* + * FreeIconList (SHELL32.@) + */ +EXTERN_C void WINAPI FreeIconList( DWORD dw ) +{ + FIXME("%x: stub\n",dw); +} + +/************************************************************************* + * SHLoadNonloadedIconOverlayIdentifiers (SHELL32.@) + */ +EXTERN_C HRESULT WINAPI SHLoadNonloadedIconOverlayIdentifiers( VOID ) +{ + FIXME("stub\n"); + return S_OK; +} + +class CShell32Module : public CComModule +{ +public: +}; + + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_ShellFSFolder, CFSFolder) +OBJECT_ENTRY(CLSID_MyComputer, CDrivesFolder) +OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder) +OBJECT_ENTRY(CLSID_ShellItem, ShellItem) +OBJECT_ENTRY(CLSID_ShellLink, ShellLink) +OBJECT_ENTRY(CLSID_DragDropHelper, IDropTargetHelperImpl) +OBJECT_ENTRY(CLSID_ControlPanel, CControlPanelFolder) +OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete) +OBJECT_ENTRY(CLSID_MyDocuments, CMyDocsFolder) +OBJECT_ENTRY(CLSID_NetworkPlaces, CNetFolder) +OBJECT_ENTRY(CLSID_FontsFolderShortcut, CFontsFolder) +OBJECT_ENTRY(CLSID_Printers, CPrinterFolder) +OBJECT_ENTRY(CLSID_AdminFolderShortcut, CAdminToolsFolder) +OBJECT_ENTRY(CLSID_RecycleBin, CBitBucket) +OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu) +OBJECT_ENTRY(CLSID_NewMenu, CNewMenu) +OBJECT_ENTRY(CLSID_StartMenu, CStartMenuCallback) +OBJECT_ENTRY(CLSID_MenuBandSite, CMenuBandSite) +END_OBJECT_MAP() + +CShell32Module gModule; + + +/* +static const struct { + REFIID riid; + LPFNCREATEINSTANCE lpfnCI; +} InterfaceTable[] = { + {CLSID_ShellFSFolder, &IFSFolder_Constructor}, + {CLSID_MyComputer, &ISF_MyComputer_Constructor}, + {CLSID_ShellDesktop, &ISF_Desktop_Constructor}, + {CLSID_ShellItem, &IShellItem_Constructor}, + {CLSID_ShellLink, &IShellLink_Constructor}, + {CLSID_DragDropHelper, &IDropTargetHelper_Constructor}, + {CLSID_ControlPanel, &IControlPanel_Constructor}, + {CLSID_AutoComplete, &IAutoComplete_Constructor}, + {CLSID_MyDocuments, &ISF_MyDocuments_Constructor}, + {CLSID_NetworkPlaces, &ISF_NetworkPlaces_Constructor}, + {CLSID_FontsFolderShortcut, &ISF_Fonts_Constructor}, + {CLSID_Printers, &ISF_Printers_Constructor}, + {CLSID_AdminFolderShortcut, &ISF_AdminTools_Constructor}, + {CLSID_RecycleBin, &RecycleBin_Constructor}, + {CLSID_OpenWithMenu, &SHEOW_Constructor}, + {CLSID_NewMenu, &INewItem_Constructor}, + {CLSID_StartMenu, &StartMenu_Constructor}, + {CLSID_MenuBandSite, &MenuBandSite_Constructor}, +}; +*/ + +/*********************************************************************** + * DllGetVersion [SHELL32.@] + * + * Retrieves version information of the 'SHELL32.DLL' + * + * PARAMS + * pdvi [O] pointer to version information structure. + * + * RETURNS + * Success: S_OK + * Failure: E_INVALIDARG + * + * NOTES + * Returns version of a shell32.dll from IE4.01 SP1. + */ + +STDAPI DllGetVersion(DLLVERSIONINFO *pdvi) +{ + /* FIXME: shouldn't these values come from the version resource? */ + if (pdvi->cbSize == sizeof(DLLVERSIONINFO) || + pdvi->cbSize == sizeof(DLLVERSIONINFO2)) + { + pdvi->dwMajorVersion = WINE_FILEVERSION_MAJOR; + pdvi->dwMinorVersion = WINE_FILEVERSION_MINOR; + pdvi->dwBuildNumber = WINE_FILEVERSION_BUILD; + pdvi->dwPlatformID = WINE_FILEVERSION_PLATFORMID; + if (pdvi->cbSize == sizeof(DLLVERSIONINFO2)) + { + DLLVERSIONINFO2 *pdvi2 = (DLLVERSIONINFO2 *)pdvi; + + pdvi2->dwFlags = 0; + pdvi2->ullVersion = MAKEDLLVERULL(WINE_FILEVERSION_MAJOR, + WINE_FILEVERSION_MINOR, + WINE_FILEVERSION_BUILD, + WINE_FILEVERSION_PLATFORMID); + } + TRACE("%u.%u.%u.%u\n", + pdvi->dwMajorVersion, pdvi->dwMinorVersion, + pdvi->dwBuildNumber, pdvi->dwPlatformID); + return S_OK; + } + else + { + WARN("wrong DLLVERSIONINFO size from app\n"); + return E_INVALIDARG; + } +} + +/************************************************************************* + * global variables of the shell32.dll + * all are once per process + * + */ +HINSTANCE shell32_hInstance; +HIMAGELIST ShellSmallIconList = 0; +HIMAGELIST ShellBigIconList = 0; + +void *operator new (size_t, void *buf) +{ + return buf; +} + +/************************************************************************* + * SHELL32 DllMain + * + * NOTES + * calling oleinitialize here breaks sone apps. + */ +STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad) +{ + TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad); + if (dwReason == DLL_PROCESS_ATTACH) + { + /* HACK - the global constructors don't run, so I placement new them here */ + new (&gModule) CShell32Module; + new (&_AtlWinModule) CAtlWinModule; + new (&_AtlBaseModule) CAtlBaseModule; + new (&_AtlComModule) CAtlComModule; + + shell32_hInstance = hInstance; + gModule.Init(ObjectMap, hInstance, NULL); + + DisableThreadLibraryCalls (hInstance); + + /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */ + GetModuleFileNameW(hInstance, swShell32Name, MAX_PATH); + swShell32Name[MAX_PATH - 1] = '\0'; + + InitCommonControlsEx(NULL); + + SIC_Initialize(); + InitChangeNotifications(); + InitIconOverlays(); + } + else if (dwReason == DLL_PROCESS_DETACH) + { + shell32_hInstance = NULL; + SIC_Destroy(); + FreeChangeNotifications(); + gModule.Term(); + } + return TRUE; +} + +/*********************************************************************** + * DllCanUnloadNow (SHELL32.@) + */ +STDAPI DllCanUnloadNow() +{ + return gModule.DllCanUnloadNow(); +} + +/************************************************************************* + * DllGetClassObject [SHELL32.@] + * SHDllGetClassObject [SHELL32.128] + */ +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) +{ + HRESULT hResult; + + TRACE("CLSID:%s,IID:%s\n", shdebugstr_guid(&rclsid), shdebugstr_guid(&riid)); + + hResult = gModule.DllGetClassObject(rclsid, riid, ppv); + TRACE("-- pointer to class factory: %p\n", *ppv); + return hResult; +} + +/*********************************************************************** + * DllRegisterServer (BROWSEUI.@) + */ +STDAPI DllRegisterServer() +{ + return gModule.DllRegisterServer(FALSE); +} + +/*********************************************************************** + * DllUnregisterServer (BROWSEUI.@) + */ +STDAPI DllUnregisterServer() +{ + return gModule.DllUnregisterServer(FALSE); +} + +/************************************************************************* + * DllInstall [SHELL32.@] + * + * PARAMETERS + * + * BOOL bInstall - TRUE for install, FALSE for uninstall + * LPCWSTR pszCmdLine - command line (unused by shell32?) + */ + +HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline) +{ + FIXME("%s %s: stub\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline)); + return S_OK; /* indicate success */ +} diff --git a/dll/win32/shell32_new/shell32_main.h b/dll/win32/shell32_new/shell32_main.h new file mode 100644 index 00000000000..729e4423a8c --- /dev/null +++ b/dll/win32/shell32_new/shell32_main.h @@ -0,0 +1,220 @@ +/* + * internal Shell32 Library definitions + * + * Copyright 1998 Marcus Meissner + * Copyright 1998 Juergen Schmied (jsch) * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_SHELL_MAIN_H +#define __WINE_SHELL_MAIN_H + +#include +#include + +/* +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winnls.h" +#include "commctrl.h" +#include "objbase.h" +#include "docobj.h" +#include "undocshell.h" +#include "shlobj.h" +#include "shellapi.h" +#include "wine/windef16.h" +*/ +#include "wine/unicode.h" + + +/******************************************* +* global SHELL32.DLL variables +*/ +extern HMODULE huser32; +extern HINSTANCE shell32_hInstance; +extern HIMAGELIST ShellSmallIconList; +extern HIMAGELIST ShellBigIconList; + +extern "C" BOOL WINAPI Shell_GetImageLists(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList); + +/* Iconcache */ +#define INVALID_INDEX -1 +BOOL SIC_Initialize(void); +void SIC_Destroy(void); +BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int * pIndex); +INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags ); + +/* Classes Root */ +BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot); +BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ); +BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ); +BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, int* picon_idx); +BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, int* picon_idx); +BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len); + +/* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */ +BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot); +BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, int* picon_idx); +BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len); + +BOOL HCR_GetFolderAttributes(LPCITEMIDLIST pidlFolder, LPDWORD dwAttributes); + +INT_PTR CALLBACK AboutDlgProc(HWND,UINT,WPARAM,LPARAM); +DWORD WINAPI ParseFieldA(LPCSTR src, DWORD nField, LPSTR dst, DWORD len); +DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len); + +/**************************************************************************** + * Class constructors + */ +HRESULT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl, IDataObject **dataObject); +HRESULT IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[], IEnumFORMATETC **enumerator); + +LPCLASSFACTORY IClassFactory_Constructor(REFCLSID); +IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, const LPCITEMIDLIST *aPidls, UINT uItemCount); +HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv); +IContextMenu2 * ISvStaticItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *apidl, UINT cidl, HKEY hKey); +IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop); +HRESULT WINAPI IShellView_Constructor(IShellFolder *pFolder, IShellView **newView); + +HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, LPVOID * ppv); +HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV); +extern HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST, LPWSTR, UINT, int*); +HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); +HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + +LPEXTRACTICONA IExtractIconA_Constructor(LPCITEMIDLIST); +LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST); + +/* initialisation for FORMATETC */ +#define InitFormatEtc(fe, cf, med) \ + {\ + (fe).cfFormat=cf;\ + (fe).dwAspect=DVASPECT_CONTENT;\ + (fe).ptd=NULL;\ + (fe).tymed=med;\ + (fe).lindex=-1;\ + }; + +#define KeyStateToDropEffect(kst)\ + ((((kst)&(MK_CONTROL|MK_SHIFT))==(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_LINK :\ + (((kst)&(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_COPY :\ + DROPEFFECT_MOVE)) + + +HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags); + +/* Change Notification */ +void InitChangeNotifications(void); +void FreeChangeNotifications(void); +void InitIconOverlays(void); + +/* file operation */ +#define ASK_DELETE_FILE 1 +#define ASK_DELETE_FOLDER 2 +#define ASK_DELETE_MULTIPLE_ITEM 3 +#define ASK_CREATE_FOLDER 4 +#define ASK_OVERWRITE_FILE 5 +#define ASK_DELETE_SELECTED 6 +#define ASK_TRASH_FILE 7 +#define ASK_TRASH_FOLDER 8 +#define ASK_TRASH_MULTIPLE_ITEM 9 +#define ASK_CANT_TRASH_ITEM 10 +#define ASK_OVERWRITE_FOLDER 11 + +BOOL SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pwszDir, BOOL bShowUI); +BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir); + +void WINAPI _InsertMenuItemW (HMENU hmenu, UINT indexMenu, BOOL fByPosition, + UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState); + +static BOOL __inline SHELL_OsIsUnicode(void) +{ + /* if high-bit of version is 0, we are emulating NT */ + return !(GetVersion() & 0x80000000); +} + +#define __SHFreeAndNil(ptr) \ + {\ + SHFree(*ptr); \ + *ptr = NULL; \ + }; +static void __inline __SHCloneStrA(char **target, const char *source) +{ + *target = (char *)SHAlloc(strlen(source) + 1); + strcpy(*target, source); +} + +static void __inline __SHCloneStrWtoA(char **target, const WCHAR *source) +{ + int len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL); + *target = (char *)SHAlloc(len); + WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL); +} + +static void __inline __SHCloneStrW(WCHAR **target, const WCHAR *source) +{ + *target = (WCHAR *)SHAlloc((lstrlenW(source) + 1) * sizeof(WCHAR) ); + lstrcpyW(*target, source); +} + +static LPWSTR __inline __SHCloneStrAtoW(WCHAR **target, const char *source) +{ + int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0); + *target = (WCHAR *)SHAlloc(len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, source, -1, *target, len); + return *target; +} + +/* handle conversions */ +#define HICON_16(h32) (LOWORD(h32)) +#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16)) +#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16)) +#define HINSTANCE_16(h32) (LOWORD(h32)) + +typedef UINT_PTR (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, + const SHELLEXECUTEINFOW *sei, LPSHELLEXECUTEINFOW sei_out); + +BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc); + +extern WCHAR swShell32Name[MAX_PATH]; + +BOOL UNIXFS_is_rooted_at_desktop(void); +extern const GUID CLSID_UnixFolder; +extern const GUID CLSID_UnixDosFolder; + +/* Default shell folder value registration */ +HRESULT SHELL_RegisterShellFolders(void); + +/* Detect Shell Links */ +BOOL SHELL_IsShortcut(LPCITEMIDLIST); + +INT_PTR CALLBACK SH_FileGeneralDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK SH_FileVersionDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +HPROPSHEETPAGE SH_CreatePropertySheetPage(LPCSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle); +BOOL SH_ShowDriveProperties(WCHAR * drive, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl); +BOOL SH_ShowRecycleBinProperties(WCHAR sDrive); +BOOL SH_ShowPropertiesDialog(LPWSTR lpf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl); +BOOL SH_ShowFolderProperties(LPWSTR pwszFolder, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST * apidl); +#endif diff --git a/dll/win32/shell32_new/shellfolder.h b/dll/win32/shell32_new/shellfolder.h new file mode 100644 index 00000000000..7b8bd898271 --- /dev/null +++ b/dll/win32/shell32_new/shellfolder.h @@ -0,0 +1,69 @@ +/* + * Defines helper functions to manipulate the contents of an IShellFolder + * + * Copyright 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_SHELLFOLDER_HELP_H +#define __WINE_SHELLFOLDER_HELP_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" + +#include "shlobj.h" + +/***************************************************************************** + * Predeclare the interfaces + */ +DEFINE_GUID(IID_ISFHelper, 0x1fe68efbL, 0x1874, 0x9812, 0x56, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + +/***************************************************************************** + * ISFHelper interface + */ +#undef INTERFACE + +#define INTERFACE ISFHelper +DECLARE_INTERFACE_(ISFHelper,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** ISFHelper methods ***/ + STDMETHOD(GetUniqueName)(THIS_ LPWSTR lpName, UINT uLen) PURE; + STDMETHOD(AddFolder)(THIS_ HWND hwnd, LPCWSTR lpName, LPITEMIDLIST * ppidlOut) PURE; + STDMETHOD(DeleteItems)(THIS_ UINT cidl, LPCITEMIDLIST * apidl) PURE; + STDMETHOD(CopyItems)(THIS_ IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) PURE; +}; +#undef INTERFACE + +#ifdef COBJMACROS +/*** IUnknown methods ***/ +#define ISFHelper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define ISFHelper_AddRef(p) (p)->lpVtbl->AddRef(p) +#define ISFHelper_Release(p) (p)->lpVtbl->Release(p) +/*** ISFHelper methods ***/ +#define ISFHelper_GetUniqueName(p,a,b) (p)->lpVtbl->GetUniqueName(p,a,b) +#define ISFHelper_AddFolder(p,a,b,c) (p)->lpVtbl->AddFolder(p,a,b,c) +#define ISFHelper_DeleteItems(p,a,b) (p)->lpVtbl->DeleteItems(p,a,b) +#define ISFHelper_CopyItems(p,a,b,c) (p)->lpVtbl->CopyItems(p,a,b,c) +#endif + +#endif /* __WINE_SHELLFOLDER_HELP_H */ diff --git a/dll/win32/shell32_new/shellitem.cpp b/dll/win32/shell32_new/shellitem.cpp new file mode 100644 index 00000000000..4a7b52d3383 --- /dev/null +++ b/dll/win32/shell32_new/shellitem.cpp @@ -0,0 +1,253 @@ +/* + * IShellItem implementation + * + * Copyright 2008 Vincent Povirk for CodeWeavers + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "precomp.h" +#include +#include +#include +#include +#include "shellitem.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +EXTERN_C HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, + IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi); + +ShellItem::ShellItem() +{ + pidl = NULL; +} + +ShellItem::~ShellItem() +{ + ILFree(pidl); +} + +HRESULT ShellItem::get_parent_pidl(LPITEMIDLIST *parent_pidl) +{ + *parent_pidl = ILClone(pidl); + if (*parent_pidl) + { + if (ILRemoveLastID(*parent_pidl)) + return S_OK; + else + { + ILFree(*parent_pidl); + *parent_pidl = NULL; + return E_INVALIDARG; + } + } + else + { + *parent_pidl = NULL; + return E_OUTOFMEMORY; + } +} + +HRESULT ShellItem::get_parent_shellfolder(IShellFolder **ppsf) +{ + LPITEMIDLIST parent_pidl; + CComPtr desktop; + HRESULT ret; + + ret = get_parent_pidl(&parent_pidl); + if (SUCCEEDED(ret)) + { + ret = SHGetDesktopFolder(&desktop); + if (SUCCEEDED(ret)) + ret = desktop->BindToObject(parent_pidl, NULL, IID_IShellFolder, (void**)ppsf); + ILFree(parent_pidl); + } + + return ret; +} + +HRESULT WINAPI ShellItem::BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut) +{ + FIXME("(%p,%p,%s,%p,%p)\n", this, pbc, shdebugstr_guid(&rbhid), riid, ppvOut); + + *ppvOut = NULL; + + return E_NOTIMPL; +} + +HRESULT WINAPI ShellItem::GetParent(IShellItem **ppsi) +{ + LPITEMIDLIST parent_pidl; + HRESULT ret; + + TRACE("(%p,%p)\n", this, ppsi); + + ret = get_parent_pidl(&parent_pidl); + if (SUCCEEDED(ret)) + { + ret = SHCreateShellItem(NULL, NULL, parent_pidl, ppsi); + ILFree(parent_pidl); + } + + return ret; +} + +HRESULT WINAPI ShellItem::GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName) +{ + FIXME("(%p,%x,%p)\n", this, sigdnName, ppszName); + + *ppszName = NULL; + + return E_NOTIMPL; +} + +HRESULT WINAPI ShellItem::GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs) +{ + CComPtr parent_folder; + LPITEMIDLIST child_pidl; + HRESULT ret; + + TRACE("(%p,%x,%p)\n", this, sfgaoMask, psfgaoAttribs); + + ret = get_parent_shellfolder(&parent_folder); + if (SUCCEEDED(ret)) + { + child_pidl = ILFindLastID(pidl); + *psfgaoAttribs = sfgaoMask; + ret = parent_folder->GetAttributesOf(1, (LPCITEMIDLIST*)&child_pidl, psfgaoAttribs); + } + + return ret; +} + +HRESULT WINAPI ShellItem::Compare(IShellItem *oth, SICHINTF hint, int *piOrder) +{ + FIXME("(%p,%p,%x,%p)\n", this, oth, hint, piOrder); + + return E_NOTIMPL; +} + +HRESULT WINAPI ShellItem::GetClassID(CLSID *pClassID) +{ + TRACE("(%p,%p)\n", this, pClassID); + + *pClassID = CLSID_ShellItem; + return S_OK; +} + + +HRESULT WINAPI ShellItem::SetIDList(LPCITEMIDLIST pidlx) +{ + LPITEMIDLIST new_pidl; + + TRACE("(%p,%p)\n", this, pidlx); + + new_pidl = ILClone(pidlx); + + if (new_pidl) + { + ILFree(pidl); + pidl = new_pidl; + return S_OK; + } + else + return E_OUTOFMEMORY; +} + +HRESULT WINAPI ShellItem::GetIDList(LPITEMIDLIST *ppidl) +{ + TRACE("(%p,%p)\n", this, ppidl); + + *ppidl = ILClone(pidl); + if (*ppidl) + return S_OK; + else + return E_OUTOFMEMORY; +} + +HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, + IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi) +{ + IShellItem *newShellItem; + LPITEMIDLIST new_pidl; + CComPtr newPersistIDList; + HRESULT ret; + + TRACE("(%p,%p,%p,%p)\n", pidlParent, psfParent, pidl, ppsi); + + if (!pidl) + { + return E_INVALIDARG; + } + else if (pidlParent || psfParent) + { + LPITEMIDLIST temp_parent=NULL; + if (!pidlParent) + { + CComPtr ppf2Parent; + + if (FAILED(psfParent->QueryInterface(IID_IPersistFolder2, (void**)&ppf2Parent))) + { + FIXME("couldn't get IPersistFolder2 interface of parent\n"); + return E_NOINTERFACE; + } + + if (FAILED(ppf2Parent->GetCurFolder(&temp_parent))) + { + FIXME("couldn't get parent PIDL\n"); + return E_NOINTERFACE; + } + + pidlParent = temp_parent; + } + + new_pidl = ILCombine(pidlParent, pidl); + ILFree(temp_parent); + + if (!new_pidl) + return E_OUTOFMEMORY; + } + else + { + new_pidl = ILClone(pidl); + if (!new_pidl) + return E_OUTOFMEMORY; + } + + ret = ShellItem::_CreatorClass::CreateInstance(NULL, IID_IShellItem, (void**)&newShellItem); + if (FAILED(ret)) + { + *ppsi = NULL; + ILFree(new_pidl); + return ret; + } + ret = newShellItem->QueryInterface(IID_IPersistIDList, (void **)&newPersistIDList); + if (FAILED(ret)) + { + ILFree(new_pidl); + return ret; + } + ret = newPersistIDList->SetIDList(new_pidl); + if (FAILED(ret)) + { + ILFree(new_pidl); + return ret; + } + ILFree(new_pidl); + *ppsi = newShellItem; + return ret; +} diff --git a/dll/win32/shell32_new/shellitem.h b/dll/win32/shell32_new/shellitem.h new file mode 100644 index 00000000000..546fb74c44e --- /dev/null +++ b/dll/win32/shell32_new/shellitem.h @@ -0,0 +1,62 @@ +/* + * IShellItem implementation + * + * Copyright 2008 Vincent Povirk for CodeWeavers + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHELLITEM_H_ +#define _SHELLITEM_H_ + +class ShellItem : + public CComCoClass, + public CComObjectRootEx, + public IShellItem, + public IPersistIDList +{ +private: + LPITEMIDLIST pidl; +public: + ShellItem(); + ~ShellItem(); + HRESULT get_parent_pidl(LPITEMIDLIST *parent_pidl); + HRESULT get_parent_shellfolder(IShellFolder **ppsf); + + // IShellItem + virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut); + virtual HRESULT WINAPI GetParent(IShellItem **ppsi); + virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName); + virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs); + virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder); + + // IPersistIDList + virtual HRESULT WINAPI GetClassID(CLSID *pClassID); + virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl); + virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl); + +DECLARE_NO_REGISTRY() +DECLARE_NOT_AGGREGATABLE(ShellItem) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(ShellItem) + COM_INTERFACE_ENTRY_IID(IID_IShellItem, IShellItem) + COM_INTERFACE_ENTRY_IID(IID_IPersistIDList, IPersistIDList) +END_COM_MAP() +}; + +#endif // _SHELLITEM_H_ diff --git a/dll/win32/shell32_new/shelllink.cpp b/dll/win32/shell32_new/shelllink.cpp new file mode 100644 index 00000000000..348ebbf6d76 --- /dev/null +++ b/dll/win32/shell32_new/shelllink.cpp @@ -0,0 +1,2201 @@ +/* + * + * Copyright 1997 Marcus Meissner + * Copyright 1998 Juergen Schmied + * Copyright 2005 Mike McCormack + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES + * Nearly complete information about the binary formats + * of .lnk files available at http://www.wotsit.org + * + * You can use winedump to examine the contents of a link file: + * winedump lnk sc.lnk + * + * MSI advertised shortcuts are totally undocumented. They provide an + * icon for a program that is not yet installed, and invoke MSI to + * install the program when the shortcut is clicked on. They are + * created by passing a special string to SetPath, and the information + * in that string is parsed an stored. + */ + +#include +#include +#include +#include +#include +#include "shelllink.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define SHLINK_LOCAL 0 +#define SHLINK_REMOTE 1 +#define MAX_PROPERTY_SHEET_PAGE 32 + +/* link file formats */ + +#include "pshpack1.h" + +struct LINK_HEADER +{ + DWORD dwSize; /* 0x00 size of the header - 0x4c */ + GUID MagicGuid; /* 0x04 is CLSID_ShellLink */ + DWORD dwFlags; /* 0x14 describes elements following */ + DWORD dwFileAttr; /* 0x18 attributes of the target file */ + FILETIME Time1; /* 0x1c */ + FILETIME Time2; /* 0x24 */ + FILETIME Time3; /* 0x2c */ + DWORD dwFileLength; /* 0x34 File length */ + DWORD nIcon; /* 0x38 icon number */ + DWORD fStartup; /* 0x3c startup type */ + DWORD wHotKey; /* 0x40 hotkey */ + DWORD Unknown5; /* 0x44 */ + DWORD Unknown6; /* 0x48 */ +}; + +struct LOCATION_INFO +{ + DWORD dwTotalSize; + DWORD dwHeaderSize; + DWORD dwFlags; + DWORD dwVolTableOfs; + DWORD dwLocalPathOfs; + DWORD dwNetworkVolTableOfs; + DWORD dwFinalPathOfs; +}; + +struct LOCAL_VOLUME_INFO +{ + DWORD dwSize; + DWORD dwType; + DWORD dwVolSerial; + DWORD dwVolLabelOfs; +}; + +struct volume_info +{ + DWORD type; + DWORD serial; + WCHAR label[12]; /* assume 8.3 */ +}; + +#include "poppack.h" + +/* IShellLink Implementation */ + +static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath); + +/* strdup on the process heap */ +static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) +{ + assert(str); + INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); + LPWSTR p = (LPWSTR)HeapAlloc( heap, flags, len*sizeof (WCHAR) ); + if( !p ) + return p; + MultiByteToWideChar( CP_ACP, 0, str, -1, p, len ); + return p; +} + +static LPWSTR __inline strdupW( LPCWSTR src ) +{ + LPWSTR dest; + if (!src) return NULL; + dest = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, (wcslen(src)+1)*sizeof(WCHAR) ); + if (dest) + wcscpy(dest, src); + return dest; +} + +ShellLink::ShellLink() +{ + pPidl = NULL; + wHotKey = 0; + memset(&time1, 0, sizeof(time1)); + memset(&time2, 0, sizeof(time2)); + memset(&time3, 0, sizeof(time3)); + iShowCmd = SW_SHOWNORMAL; + sIcoPath = NULL; + iIcoNdx = 0; + sPath = NULL; + sArgs = NULL; + sWorkDir = NULL; + sDescription = NULL; + sPathRel = NULL; + sProduct = NULL; + sComponent = NULL; + memset(&volume, 0, sizeof(volume)); + sLinkPath = NULL; + bRunAs = FALSE; + bDirty = FALSE; + iIdOpen = -1; +} + +ShellLink::~ShellLink() +{ + TRACE("-- destroying IShellLink(%p)\n", this); + + HeapFree(GetProcessHeap(), 0, sIcoPath); + HeapFree(GetProcessHeap(), 0, sArgs); + HeapFree(GetProcessHeap(), 0, sWorkDir); + HeapFree(GetProcessHeap(), 0, sDescription); + HeapFree(GetProcessHeap(), 0, sPath); + HeapFree(GetProcessHeap(), 0, sLinkPath); + + if (pPidl) + ILFree(pPidl); +} + +HRESULT WINAPI ShellLink::GetClassID(CLSID *pclsid ) +{ + TRACE("%p %p\n", this, pclsid); + + if (pclsid == NULL) + return E_POINTER; + *pclsid = CLSID_ShellLink; + return S_OK; +} + +HRESULT WINAPI ShellLink::IsDirty() +{ + TRACE("(%p)\n",this); + + if (bDirty) + return S_OK; + + return S_FALSE; +} + +HRESULT WINAPI ShellLink::Load(LPCOLESTR pszFileName, DWORD dwMode) +{ + HRESULT r; + CComPtr stm; + + TRACE("(%p, %s, %x)\n",this, debugstr_w(pszFileName), dwMode); + + if (dwMode == 0) + dwMode = STGM_READ | STGM_SHARE_DENY_WRITE; + r = SHCreateStreamOnFileW(pszFileName, dwMode, &stm); + if (SUCCEEDED(r)) + { + HeapFree(GetProcessHeap(), 0, sLinkPath); + sLinkPath = strdupW(pszFileName); + r = Load(stm); + ShellLink_UpdatePath(sPathRel, pszFileName, sWorkDir, &sPath); + bDirty = FALSE; + } + TRACE("-- returning hr %08x\n", r); + return r; +} + +static BOOL StartLinkProcessor( LPCOLESTR szLink ) +{ + static const WCHAR szFormat[] = { + 'w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e', + ' ','-','w',' ','"','%','s','"',0 }; + LONG len; + LPWSTR buffer; + STARTUPINFOW si; + PROCESS_INFORMATION pi; + BOOL ret; + + len = sizeof(szFormat) + wcslen( szLink ) * sizeof(WCHAR); + buffer = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, len ); + if( !buffer ) + return FALSE; + + swprintf( buffer, szFormat, szLink ); + + TRACE("starting %s\n",debugstr_w(buffer)); + + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + + ret = CreateProcessW( NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ); + + HeapFree( GetProcessHeap(), 0, buffer ); + + if (ret) + { + CloseHandle( pi.hProcess ); + CloseHandle( pi.hThread ); + } + + return ret; +} + +HRESULT WINAPI ShellLink::Save(LPCOLESTR pszFileName, BOOL fRemember) +{ + HRESULT r; + CComPtr stm; + + TRACE("(%p)->(%s)\n", this, debugstr_w(pszFileName)); + + if (!pszFileName) + return E_FAIL; + + r = SHCreateStreamOnFileW( pszFileName, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, &stm ); + if( SUCCEEDED( r ) ) + { + r = Save(stm, FALSE); + + if( SUCCEEDED( r ) ) + { + if ( sCurFile ) + { + HeapFree(GetProcessHeap(), 0, sCurFile); + } + sCurFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(pszFileName)+1) * sizeof(WCHAR)); + if ( sCurFile ) + { + wcscpy(sCurFile, pszFileName); + } + + StartLinkProcessor( pszFileName ); + + bDirty = FALSE; + } + else + { + DeleteFileW( pszFileName ); + WARN("Failed to create shortcut %s\n", debugstr_w(pszFileName) ); + } + } + + return r; +} + +HRESULT WINAPI ShellLink::SaveCompleted(LPCOLESTR pszFileName) +{ + FIXME("(%p)->(%s)\n", this, debugstr_w(pszFileName)); + return NOERROR; +} + +HRESULT WINAPI ShellLink::GetCurFile(LPOLESTR *ppszFileName) +{ + *ppszFileName = NULL; + + if ( !sCurFile) + { + /* IPersistFile::GetCurFile called before IPersistFile::Save */ + return S_FALSE; + } + + *ppszFileName = (LPOLESTR)CoTaskMemAlloc((wcslen(sCurFile)+1) * sizeof(WCHAR)); + if (!*ppszFileName) + { + /* out of memory */ + return E_OUTOFMEMORY; + } + + /* copy last saved filename */ + wcscpy(*ppszFileName, sCurFile); + + return NOERROR; +} + +/************************************************************************ + * IPersistStream_IsDirty (IPersistStream) + */ + +static HRESULT Stream_LoadString( IStream* stm, BOOL unicode, LPWSTR *pstr ) +{ + DWORD count; + USHORT len; + LPSTR temp; + LPWSTR str; + HRESULT r; + + TRACE("%p\n", stm); + + count = 0; + r = stm->Read(&len, sizeof(len), &count); + if ( FAILED (r) || ( count != sizeof(len) ) ) + return E_FAIL; + + if( unicode ) + len *= sizeof (WCHAR); + + TRACE("reading %d\n", len); + temp = (LPSTR)HeapAlloc(GetProcessHeap(), 0, len+sizeof(WCHAR)); + if( !temp ) + return E_OUTOFMEMORY; + count = 0; + r = stm->Read(temp, len, &count); + if( FAILED (r) || ( count != len ) ) + { + HeapFree( GetProcessHeap(), 0, temp ); + return E_FAIL; + } + + TRACE("read %s\n", debugstr_an(temp,len)); + + /* convert to unicode if necessary */ + if( !unicode ) + { + count = MultiByteToWideChar( CP_ACP, 0, temp, len, NULL, 0 ); + str = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, (count+1)*sizeof (WCHAR) ); + if( !str ) + { + HeapFree( GetProcessHeap(), 0, temp ); + return E_OUTOFMEMORY; + } + MultiByteToWideChar( CP_ACP, 0, temp, len, str, count ); + HeapFree( GetProcessHeap(), 0, temp ); + } + else + { + count /= 2; + str = (LPWSTR)temp; + } + str[count] = 0; + + *pstr = str; + + return S_OK; +} + +static HRESULT Stream_ReadChunk( IStream* stm, LPVOID *data ) +{ + DWORD size; + ULONG count; + HRESULT r; + struct sized_chunk { + DWORD size; + unsigned char data[1]; + } *chunk; + + TRACE("%p\n",stm); + + r = stm->Read(&size, sizeof(size), &count ); + if( FAILED( r ) || count != sizeof(size) ) + return E_FAIL; + + chunk = (sized_chunk *)HeapAlloc( GetProcessHeap(), 0, size ); + if( !chunk ) + return E_OUTOFMEMORY; + + chunk->size = size; + r = stm->Read(chunk->data, size - sizeof(size), &count ); + if( FAILED( r ) || count != (size - sizeof(size)) ) + { + HeapFree( GetProcessHeap(), 0, chunk ); + return E_FAIL; + } + + TRACE("Read %d bytes\n",chunk->size); + + *data = chunk; + + return S_OK; +} + +static BOOL Stream_LoadVolume( LOCAL_VOLUME_INFO *vol, ShellLink::volume_info *volume ) +{ + const int label_sz = sizeof volume->label/sizeof volume->label[0]; + LPSTR label; + int len; + + volume->serial = vol->dwVolSerial; + volume->type = vol->dwType; + + if( !vol->dwVolLabelOfs ) + return FALSE; + if( vol->dwSize <= vol->dwVolLabelOfs ) + return FALSE; + len = vol->dwSize - vol->dwVolLabelOfs; + + label = (LPSTR) vol; + label += vol->dwVolLabelOfs; + MultiByteToWideChar( CP_ACP, 0, label, len, volume->label, label_sz-1); + + return TRUE; +} + +static LPWSTR Stream_LoadPath( LPCSTR p, DWORD maxlen ) +{ + unsigned int len = 0, wlen; + LPWSTR path; + + while( p[len] && (len < maxlen) ) + len++; + + wlen = MultiByteToWideChar(CP_ACP, 0, p, len, NULL, 0); + path = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wlen+1)*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, p, len, path, wlen); + path[wlen] = 0; + + return path; +} + +static HRESULT Stream_LoadLocation( IStream *stm, + ShellLink::volume_info *volume, LPWSTR *path ) +{ + char *p = NULL; + LOCATION_INFO *loc; + HRESULT r; + DWORD n; + + r = Stream_ReadChunk( stm, (LPVOID*) &p ); + if( FAILED(r) ) + return r; + + loc = (LOCATION_INFO*) p; + if (loc->dwTotalSize < sizeof(LOCATION_INFO)) + { + HeapFree( GetProcessHeap(), 0, p ); + return E_FAIL; + } + + /* if there's valid local volume information, load it */ + if( loc->dwVolTableOfs && + ((loc->dwVolTableOfs + sizeof(LOCAL_VOLUME_INFO)) <= loc->dwTotalSize) ) + { + LOCAL_VOLUME_INFO *volume_info; + + volume_info = (LOCAL_VOLUME_INFO*) &p[loc->dwVolTableOfs]; + Stream_LoadVolume( volume_info, volume ); + } + + /* if there's a local path, load it */ + n = loc->dwLocalPathOfs; + if( n && (n < loc->dwTotalSize) ) + *path = Stream_LoadPath( &p[n], loc->dwTotalSize - n ); + + TRACE("type %d serial %08x name %s path %s\n", volume->type, + volume->serial, debugstr_w(volume->label), debugstr_w(*path)); + + HeapFree( GetProcessHeap(), 0, p ); + return S_OK; +} + +/* + * The format of the advertised shortcut info seems to be: + * + * Offset Description + * ------ ----------- + * + * 0 Length of the block (4 bytes, usually 0x314) + * 4 tag (dword) + * 8 string data in ASCII + * 8+0x104 string data in UNICODE + * + * In the original Win32 implementation the buffers are not initialized + * to zero, so data trailing the string is random garbage. + */ +static HRESULT Stream_LoadAdvertiseInfo( IStream* stm, LPWSTR *str ) +{ + DWORD size; + ULONG count; + HRESULT r; + EXP_DARWIN_LINK buffer; + + TRACE("%p\n",stm); + + r = stm->Read(&buffer.dbh.cbSize, sizeof (DWORD), &count ); + if( FAILED( r ) ) + return r; + + /* make sure that we read the size of the structure even on error */ + size = sizeof buffer - sizeof (DWORD); + if( buffer.dbh.cbSize != sizeof buffer ) + { + ERR("Ooops. This structure is not as expected...\n"); + return E_FAIL; + } + + r = stm->Read(&buffer.dbh.dwSignature, size, &count ); + if( FAILED( r ) ) + return r; + + if( count != size ) + return E_FAIL; + + TRACE("magic %08x string = %s\n", buffer.dbh.dwSignature, debugstr_w(buffer.szwDarwinID)); + + if( (buffer.dbh.dwSignature&0xffff0000) != 0xa0000000 ) + { + ERR("Unknown magic number %08x in advertised shortcut\n", buffer.dbh.dwSignature); + return E_FAIL; + } + + *str = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, + (wcslen(buffer.szwDarwinID)+1) * sizeof(WCHAR) ); + wcscpy( *str, buffer.szwDarwinID ); + + return S_OK; +} + +/************************************************************************ + * IPersistStream_Load (IPersistStream) + */ +HRESULT WINAPI ShellLink::Load(IStream *stm) +{ + LINK_HEADER hdr; + ULONG dwBytesRead; + BOOL unicode; + HRESULT r; + DWORD zero; + + TRACE("%p %p\n", this, stm); + + if (!stm) + return STG_E_INVALIDPOINTER; + + dwBytesRead = 0; + r = stm->Read(&hdr, sizeof(hdr), &dwBytesRead); + if (FAILED(r)) + return r; + + if (dwBytesRead != sizeof(hdr)) + return E_FAIL; + if (hdr.dwSize != sizeof(hdr)) + return E_FAIL; + if (!IsEqualIID(hdr.MagicGuid, CLSID_ShellLink)) + return E_FAIL; + + /* free all the old stuff */ + ILFree(pPidl); + pPidl = NULL; + memset( &volume, 0, sizeof volume ); + HeapFree(GetProcessHeap(), 0, sPath); + sPath = NULL; + HeapFree(GetProcessHeap(), 0, sDescription); + sDescription = NULL; + HeapFree(GetProcessHeap(), 0, sPathRel); + sPathRel = NULL; + HeapFree(GetProcessHeap(), 0, sWorkDir); + sWorkDir = NULL; + HeapFree(GetProcessHeap(), 0, sArgs); + sArgs = NULL; + HeapFree(GetProcessHeap(), 0, sIcoPath); + sIcoPath = NULL; + HeapFree(GetProcessHeap(), 0, sProduct); + sProduct = NULL; + HeapFree(GetProcessHeap(), 0, sComponent); + sComponent = NULL; + + wHotKey = (WORD)hdr.wHotKey; + iIcoNdx = hdr.nIcon; + FileTimeToSystemTime (&hdr.Time1, &time1); + FileTimeToSystemTime (&hdr.Time2, &time2); + FileTimeToSystemTime (&hdr.Time3, &time3); + if (TRACE_ON(shell)) + { + WCHAR sTemp[MAX_PATH]; + GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &time1, + NULL, sTemp, sizeof(sTemp)/sizeof(*sTemp)); + TRACE("-- time1: %s\n", debugstr_w(sTemp) ); + GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &time2, + NULL, sTemp, sizeof(sTemp)/sizeof(*sTemp)); + TRACE("-- time2: %s\n", debugstr_w(sTemp) ); + GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &time3, + NULL, sTemp, sizeof(sTemp)/sizeof(*sTemp)); + TRACE("-- time3: %s\n", debugstr_w(sTemp) ); + } + + /* load all the new stuff */ + if( hdr.dwFlags & SLDF_HAS_ID_LIST ) + { + r = ILLoadFromStream( stm, &pPidl ); + if( FAILED( r ) ) + return r; + } + pdump(pPidl); + + /* load the location information */ + if( hdr.dwFlags & SLDF_HAS_LINK_INFO ) + r = Stream_LoadLocation( stm, &volume, &sPath ); + if( FAILED( r ) ) + goto end; + + unicode = hdr.dwFlags & SLDF_UNICODE; + if( hdr.dwFlags & SLDF_HAS_NAME ) + { + r = Stream_LoadString( stm, unicode, &sDescription ); + TRACE("Description -> %s\n",debugstr_w(sDescription)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SLDF_HAS_RELPATH ) + { + r = Stream_LoadString( stm, unicode, &sPathRel ); + TRACE("Relative Path-> %s\n",debugstr_w(sPathRel)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SLDF_HAS_WORKINGDIR ) + { + r = Stream_LoadString( stm, unicode, &sWorkDir ); + TRACE("Working Dir -> %s\n",debugstr_w(sWorkDir)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SLDF_HAS_ARGS ) + { + r = Stream_LoadString( stm, unicode, &sArgs ); + TRACE("Working Dir -> %s\n",debugstr_w(sArgs)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SLDF_HAS_ICONLOCATION ) + { + r = Stream_LoadString( stm, unicode, &sIcoPath ); + TRACE("Icon file -> %s\n",debugstr_w(sIcoPath)); + } + if( FAILED( r ) ) + goto end; + +#if (NTDDI_VERSION < NTDDI_LONGHORN) + if( hdr.dwFlags & SLDF_HAS_LOGO3ID ) + { + r = Stream_LoadAdvertiseInfo( stm, &sProduct ); + TRACE("Product -> %s\n",debugstr_w(sProduct)); + } + if( FAILED( r ) ) + goto end; +#endif + + if( hdr.dwFlags & SLDF_HAS_DARWINID ) + { + r = Stream_LoadAdvertiseInfo( stm, &sComponent ); + TRACE("Component -> %s\n",debugstr_w(sComponent)); + } + if( hdr.dwFlags & SLDF_RUNAS_USER ) + { + bRunAs = TRUE; + } + else + { + bRunAs = FALSE; + } + + if( FAILED( r ) ) + goto end; + + r = stm->Read(&zero, sizeof zero, &dwBytesRead); + if( FAILED( r ) || zero || dwBytesRead != sizeof zero ) + ERR("Last word was not zero\n"); + + TRACE("OK\n"); + + pdump (pPidl); + + return S_OK; +end: + return r; +} + +/************************************************************************ + * Stream_WriteString + * + * Helper function for IPersistStream_Save. Writes a unicode string + * with terminating nul byte to a stream, preceded by the its length. + */ +static HRESULT Stream_WriteString( IStream* stm, LPCWSTR str ) +{ + USHORT len = wcslen( str ) + 1; + DWORD count; + HRESULT r; + + r = stm->Write(&len, sizeof(len), &count ); + if( FAILED( r ) ) + return r; + + len *= sizeof(WCHAR); + + r = stm->Write(str, len, &count ); + if( FAILED( r ) ) + return r; + + return S_OK; +} + +/************************************************************************ + * Stream_WriteLocationInfo + * + * Writes the location info to a stream + * + * FIXME: One day we might want to write the network volume information + * and the final path. + * Figure out how Windows deals with unicode paths here. + */ +static HRESULT Stream_WriteLocationInfo( IStream* stm, LPCWSTR path, + ShellLink::volume_info *volume ) +{ + DWORD total_size, path_size, volume_info_size, label_size, final_path_size; + LOCAL_VOLUME_INFO *vol; + LOCATION_INFO *loc; + LPSTR szLabel, szPath, szFinalPath; + ULONG count = 0; + HRESULT hr; + + TRACE("%p %s %p\n", stm, debugstr_w(path), volume); + + /* figure out the size of everything */ + label_size = WideCharToMultiByte( CP_ACP, 0, volume->label, -1, + NULL, 0, NULL, NULL ); + path_size = WideCharToMultiByte( CP_ACP, 0, path, -1, + NULL, 0, NULL, NULL ); + volume_info_size = sizeof *vol + label_size; + final_path_size = 1; + total_size = sizeof *loc + volume_info_size + path_size + final_path_size; + + /* create pointers to everything */ + loc = (LOCATION_INFO *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, total_size); + vol = (LOCAL_VOLUME_INFO*) &loc[1]; + szLabel = (LPSTR) &vol[1]; + szPath = &szLabel[label_size]; + szFinalPath = &szPath[path_size]; + + /* fill in the location information header */ + loc->dwTotalSize = total_size; + loc->dwHeaderSize = sizeof (*loc); + loc->dwFlags = 1; + loc->dwVolTableOfs = sizeof (*loc); + loc->dwLocalPathOfs = sizeof (*loc) + volume_info_size; + loc->dwNetworkVolTableOfs = 0; + loc->dwFinalPathOfs = sizeof (*loc) + volume_info_size + path_size; + + /* fill in the volume information */ + vol->dwSize = volume_info_size; + vol->dwType = volume->type; + vol->dwVolSerial = volume->serial; + vol->dwVolLabelOfs = sizeof (*vol); + + /* copy in the strings */ + WideCharToMultiByte( CP_ACP, 0, volume->label, -1, + szLabel, label_size, NULL, NULL ); + WideCharToMultiByte( CP_ACP, 0, path, -1, + szPath, path_size, NULL, NULL ); + szFinalPath[0] = 0; + + hr = stm->Write(loc, total_size, &count ); + HeapFree(GetProcessHeap(), 0, loc); + + return hr; +} + +static EXP_DARWIN_LINK* shelllink_build_darwinid( LPCWSTR string, DWORD magic ) +{ + EXP_DARWIN_LINK *buffer; + + buffer = (EXP_DARWIN_LINK *)LocalAlloc( LMEM_ZEROINIT, sizeof *buffer ); + buffer->dbh.cbSize = sizeof *buffer; + buffer->dbh.dwSignature = magic; + lstrcpynW( buffer->szwDarwinID, string, MAX_PATH ); + WideCharToMultiByte(CP_ACP, 0, string, -1, buffer->szDarwinID, MAX_PATH, NULL, NULL ); + + return buffer; +} + +static HRESULT Stream_WriteAdvertiseInfo( IStream* stm, LPCWSTR string, DWORD magic ) +{ + EXP_DARWIN_LINK *buffer; + ULONG count; + + TRACE("%p\n",stm); + + buffer = shelllink_build_darwinid( string, magic ); + + return stm->Write(buffer, buffer->dbh.cbSize, &count ); +} + +/************************************************************************ + * IPersistStream_Save (IPersistStream) + * + * FIXME: makes assumptions about byte order + */ +HRESULT WINAPI ShellLink::Save(IStream *stm, BOOL fClearDirty) +{ + LINK_HEADER header; + ULONG count; + DWORD zero; + HRESULT r; + + TRACE("%p %p %x\n", this, stm, fClearDirty); + + memset(&header, 0, sizeof(header)); + header.dwSize = sizeof(header); + header.fStartup = iShowCmd; + header.MagicGuid = CLSID_ShellLink; + + header.wHotKey = wHotKey; + header.nIcon = iIcoNdx; + header.dwFlags = SLDF_UNICODE; /* strings are in unicode */ + if( pPidl ) + header.dwFlags |= SLDF_HAS_ID_LIST; + if( sPath ) + header.dwFlags |= SLDF_HAS_LINK_INFO; + if( sDescription ) + header.dwFlags |= SLDF_HAS_NAME; + if( sWorkDir ) + header.dwFlags |= SLDF_HAS_WORKINGDIR; + if( sArgs ) + header.dwFlags |= SLDF_HAS_ARGS; + if( sIcoPath ) + header.dwFlags |= SLDF_HAS_ICONLOCATION; +#if (NTDDI_VERSION < NTDDI_LONGHORN) + if( sProduct ) + header.dwFlags |= SLDF_HAS_LOGO3ID; +#endif + if( sComponent ) + header.dwFlags |= SLDF_HAS_DARWINID; + if( bRunAs ) + header.dwFlags |= SLDF_RUNAS_USER; + + SystemTimeToFileTime ( &time1, &header.Time1 ); + SystemTimeToFileTime ( &time2, &header.Time2 ); + SystemTimeToFileTime ( &time3, &header.Time3 ); + + /* write the Shortcut header */ + r = stm->Write(&header, sizeof(header), &count ); + if( FAILED( r ) ) + { + ERR("Write failed at %d\n",__LINE__); + return r; + } + + TRACE("Writing pidl\n"); + + /* write the PIDL to the shortcut */ + if( pPidl ) + { + r = ILSaveToStream( stm, pPidl ); + if( FAILED( r ) ) + { + ERR("Failed to write PIDL at %d\n",__LINE__); + return r; + } + } + + if( sPath ) + Stream_WriteLocationInfo( stm, sPath, &volume ); + + if( sDescription ) + r = Stream_WriteString( stm, sDescription ); + + if( sPathRel ) + r = Stream_WriteString( stm, sPathRel ); + + if( sWorkDir ) + r = Stream_WriteString( stm, sWorkDir ); + + if( sArgs ) + r = Stream_WriteString( stm, sArgs ); + + if( sIcoPath ) + r = Stream_WriteString( stm, sIcoPath ); + + if( sProduct ) + r = Stream_WriteAdvertiseInfo( stm, sProduct, EXP_SZ_ICON_SIG ); + + if( sComponent ) + r = Stream_WriteAdvertiseInfo( stm, sComponent, EXP_DARWIN_ID_SIG ); + + /* the last field is a single zero dword */ + zero = 0; + r = stm->Write(&zero, sizeof zero, &count ); + + return S_OK; +} + +/************************************************************************ + * IPersistStream_GetSizeMax (IPersistStream) + */ +HRESULT WINAPI ShellLink::GetSizeMax(ULARGE_INTEGER *pcbSize) +{ + TRACE("(%p)\n", this); + + return E_NOTIMPL; +} + +static BOOL SHELL_ExistsFileW(LPCWSTR path) +{ + if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(path)) + return FALSE; + return TRUE; +} + +/************************************************************************** + * ShellLink_UpdatePath + * update absolute path in sPath using relative path in sPathRel + */ +static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath) +{ + if (!path || !psPath) + return E_INVALIDARG; + + if (!*psPath && sPathRel) { + WCHAR buffer[2*MAX_PATH], abs_path[2*MAX_PATH]; + LPWSTR final = NULL; + + /* first try if [directory of link file] + [relative path] finds an existing file */ + + GetFullPathNameW( path, MAX_PATH*2, buffer, &final ); + if( !final ) + final = buffer; + wcscpy(final, sPathRel); + + *abs_path = '\0'; + + if (SHELL_ExistsFileW(buffer)) { + if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) + wcscpy(abs_path, buffer); + } else { + /* try if [working directory] + [relative path] finds an existing file */ + if (sWorkDir) { + wcscpy(buffer, sWorkDir); + wcscpy(PathAddBackslashW(buffer), sPathRel); + + if (SHELL_ExistsFileW(buffer)) + if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) + wcscpy(abs_path, buffer); + } + } + + /* FIXME: This is even not enough - not all shell links can be resolved using this algorithm. */ + if (!*abs_path) + wcscpy(abs_path, sPathRel); + + *psPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(abs_path)+1)*sizeof(WCHAR)); + if (!*psPath) + return E_OUTOFMEMORY; + + wcscpy(*psPath, abs_path); + } + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetPath(LPSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags) +{ + TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%u)(%s)\n", + this, pszFile, cchMaxPath, pfd, fFlags, debugstr_w(sPath)); + + if (sComponent || sProduct) + return S_FALSE; + + if (cchMaxPath) + pszFile[0] = 0; + if (sPath) + WideCharToMultiByte( CP_ACP, 0, sPath, -1, + pszFile, cchMaxPath, NULL, NULL); + + if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", this); + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetIDList(LPITEMIDLIST * ppidl) +{ + TRACE("(%p)->(ppidl=%p)\n",this, ppidl); + + if (!pPidl) + { + *ppidl = NULL; + return S_FALSE; + } + *ppidl = ILClone(pPidl); + return S_OK; +} + +HRESULT WINAPI ShellLink::SetIDList(LPCITEMIDLIST pidl) +{ + TRACE("(%p)->(pidl=%p)\n",this, pidl); + + if( pPidl ) + ILFree( pPidl ); + pPidl = ILClone( pidl ); + if( !pPidl ) + return E_FAIL; + + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetDescription(LPSTR pszName,INT cchMaxName) +{ + TRACE("(%p)->(%p len=%u)\n",this, pszName, cchMaxName); + + if( cchMaxName ) + pszName[0] = 0; + if( sDescription ) + WideCharToMultiByte( CP_ACP, 0, sDescription, -1, + pszName, cchMaxName, NULL, NULL); + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetDescription(LPCSTR pszName) +{ + TRACE("(%p)->(pName=%s)\n", this, pszName); + + HeapFree(GetProcessHeap(), 0, sDescription); + sDescription = NULL; + + if ( pszName ) { + sDescription = HEAP_strdupAtoW( GetProcessHeap(), 0, pszName); + if ( !sDescription ) + return E_OUTOFMEMORY; + } + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetWorkingDirectory(LPSTR pszDir,INT cchMaxPath) +{ + TRACE("(%p)->(%p len=%u)\n", this, pszDir, cchMaxPath); + + if( cchMaxPath ) + pszDir[0] = 0; + if( sWorkDir ) + WideCharToMultiByte( CP_ACP, 0, sWorkDir, -1, + pszDir, cchMaxPath, NULL, NULL); + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetWorkingDirectory(LPCSTR pszDir) +{ + TRACE("(%p)->(dir=%s)\n",this, pszDir); + + HeapFree(GetProcessHeap(), 0, sWorkDir); + sWorkDir = NULL; + + if ( pszDir ) { + sWorkDir = HEAP_strdupAtoW( GetProcessHeap(), 0, pszDir); + if ( !sWorkDir ) + return E_OUTOFMEMORY; + } + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetArguments(LPSTR pszArgs,INT cchMaxPath) +{ + TRACE("(%p)->(%p len=%u)\n", this, pszArgs, cchMaxPath); + + if( cchMaxPath ) + pszArgs[0] = 0; + if( sArgs ) + WideCharToMultiByte( CP_ACP, 0, sArgs, -1, + pszArgs, cchMaxPath, NULL, NULL); + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetArguments(LPCSTR pszArgs) +{ + TRACE("(%p)->(args=%s)\n",this, pszArgs); + + HeapFree(GetProcessHeap(), 0, sArgs); + sArgs = NULL; + + if ( pszArgs ) { + sArgs = HEAP_strdupAtoW( GetProcessHeap(), 0, pszArgs); + if( !sArgs ) + return E_OUTOFMEMORY; + } + + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetHotkey(WORD *pwHotkey) +{ + TRACE("(%p)->(%p)(0x%08x)\n",this, pwHotkey, wHotKey); + + *pwHotkey = wHotKey; + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetHotkey(WORD wHotkey) +{ + TRACE("(%p)->(hotkey=%x)\n",this, wHotkey); + + wHotKey = wHotkey; + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetShowCmd(INT *piShowCmd) +{ + TRACE("(%p)->(%p)\n",this, piShowCmd); + *piShowCmd = iShowCmd; + return S_OK; +} + +HRESULT WINAPI ShellLink::SetShowCmd(INT iShowCmd) +{ + TRACE("(%p) %d\n",this, iShowCmd); + + iShowCmd = iShowCmd; + bDirty = TRUE; + + return NOERROR; +} + +static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPCITEMIDLIST pidl, + LPSTR pszIconPath, int cchIconPath, int* piIcon) +{ + LPCITEMIDLIST pidlLast; + + HRESULT hr = SHBindToParent(pidl, IID_IShellFolder, (LPVOID*)&psf, &pidlLast); + + if (SUCCEEDED(hr)) { + CComPtr pei; + + hr = psf->GetUIObjectOf(0, 1, &pidlLast, IID_IExtractIconA, NULL, (LPVOID*)&pei); + + if (SUCCEEDED(hr)) { + hr = pei->GetIconLocation(0, pszIconPath, MAX_PATH, piIcon, NULL); + } + + psf->Release(); + } + + return hr; +} + +HRESULT WINAPI ShellLink::GetIconLocation(LPSTR pszIconPath,INT cchIconPath,INT *piIcon) +{ + TRACE("(%p)->(%p len=%u iicon=%p)\n", this, pszIconPath, cchIconPath, piIcon); + + pszIconPath[0] = 0; + *piIcon = iIcoNdx; + + if (sIcoPath) + { + WideCharToMultiByte(CP_ACP, 0, sIcoPath, -1, pszIconPath, cchIconPath, NULL, NULL); + return S_OK; + } + + if (pPidl || sPath) + { + CComPtr pdsk; + + HRESULT hr = SHGetDesktopFolder(&pdsk); + + if (SUCCEEDED(hr)) + { + /* first look for an icon using the PIDL (if present) */ + if (pPidl) + hr = SHELL_PidlGeticonLocationA(pdsk, pPidl, pszIconPath, cchIconPath, piIcon); + else + hr = E_FAIL; + + /* if we couldn't find an icon yet, look for it using the file system path */ + if (FAILED(hr) && sPath) + { + LPITEMIDLIST pidl; + + hr = pdsk->ParseDisplayName(0, NULL, sPath, NULL, &pidl, NULL); + + if (SUCCEEDED(hr)) { + hr = SHELL_PidlGeticonLocationA(pdsk, pidl, pszIconPath, cchIconPath, piIcon); + + SHFree(pidl); + } + } + } + + return hr; + } + return S_OK; +} + +HRESULT WINAPI ShellLink::SetIconLocation(LPCSTR pszIconPath,INT iIcon) +{ + TRACE("(%p)->(path=%s iicon=%u)\n",this, pszIconPath, iIcon); + + HeapFree(GetProcessHeap(), 0, sIcoPath); + sIcoPath = NULL; + + if ( pszIconPath ) { + sIcoPath = HEAP_strdupAtoW(GetProcessHeap(), 0, pszIconPath); + if ( !sIcoPath ) + return E_OUTOFMEMORY; + } + + iIcoNdx = iIcon; + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetRelativePath(LPCSTR pszPathRel, DWORD dwReserved) +{ + TRACE("(%p)->(path=%s %x)\n",this, pszPathRel, dwReserved); + + HeapFree(GetProcessHeap(), 0, sPathRel); + sPathRel = NULL; + + if ( pszPathRel ) { + sPathRel = HEAP_strdupAtoW(GetProcessHeap(), 0, pszPathRel); + bDirty = TRUE; + } + + return ShellLink_UpdatePath(sPathRel, sPath, sWorkDir, &sPath); +} + +HRESULT WINAPI ShellLink::Resolve(HWND hwnd, DWORD fFlags) +{ + HRESULT hr = S_OK; + BOOL bSuccess; + + TRACE("(%p)->(hwnd=%p flags=%x)\n",this, hwnd, fFlags); + + /*FIXME: use IResolveShellLink interface */ + + if (!sPath && pPidl) { + WCHAR buffer[MAX_PATH]; + + bSuccess = SHGetPathFromIDListW(pPidl, buffer); + + if (bSuccess && *buffer) { + sPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(buffer)+1)*sizeof(WCHAR)); + if (!sPath) + return E_OUTOFMEMORY; + + wcscpy(sPath, buffer); + + bDirty = TRUE; + } else + hr = S_OK; /* don't report an error occurred while just caching information */ + } + + if (!sIcoPath && sPath) { + sIcoPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(sPath)+1)*sizeof(WCHAR)); + if (!sIcoPath) + return E_OUTOFMEMORY; + + wcscpy(sIcoPath, sPath); + iIcoNdx = 0; + + bDirty = TRUE; + } + + return hr; +} + +HRESULT WINAPI ShellLink::SetPath(LPCSTR pszFile) +{ + HRESULT r; + LPWSTR str; + + TRACE("(%p)->(path=%s)\n",this, pszFile); + if (pszFile == NULL) + return E_INVALIDARG; + + str = HEAP_strdupAtoW(GetProcessHeap(), 0, pszFile); + if( !str ) + return E_OUTOFMEMORY; + + r = SetPath(str); + HeapFree( GetProcessHeap(), 0, str ); + + return r; +} + +HRESULT WINAPI ShellLink::GetPath(LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags) +{ + TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%u)(%s)\n", + this, pszFile, cchMaxPath, pfd, fFlags, debugstr_w(sPath)); + + if (sComponent || sProduct) + return S_FALSE; + + if (cchMaxPath) + pszFile[0] = 0; + if (sPath) + lstrcpynW( pszFile, sPath, cchMaxPath ); + + if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", this); + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetDescription(LPWSTR pszName,INT cchMaxName) +{ + TRACE("(%p)->(%p len=%u)\n",this, pszName, cchMaxName); + + pszName[0] = 0; + if( sDescription ) + lstrcpynW( pszName, sDescription, cchMaxName ); + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetDescription(LPCWSTR pszName) +{ + TRACE("(%p)->(desc=%s)\n",this, debugstr_w(pszName)); + + HeapFree(GetProcessHeap(), 0, sDescription); + sDescription = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, + (wcslen( pszName )+1)*sizeof(WCHAR) ); + if ( !sDescription ) + return E_OUTOFMEMORY; + + wcscpy( sDescription, pszName ); + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetWorkingDirectory(LPWSTR pszDir,INT cchMaxPath) +{ + TRACE("(%p)->(%p len %u)\n", this, pszDir, cchMaxPath); + + if( cchMaxPath ) + pszDir[0] = 0; + if( sWorkDir ) + lstrcpynW( pszDir, sWorkDir, cchMaxPath ); + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetWorkingDirectory(LPCWSTR pszDir) +{ + TRACE("(%p)->(dir=%s)\n",this, debugstr_w(pszDir)); + + HeapFree(GetProcessHeap(), 0, sWorkDir); + sWorkDir = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, + (wcslen( pszDir )+1)*sizeof (WCHAR) ); + if ( !sWorkDir ) + return E_OUTOFMEMORY; + wcscpy( sWorkDir, pszDir ); + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetArguments(LPWSTR pszArgs,INT cchMaxPath) +{ + TRACE("(%p)->(%p len=%u)\n", this, pszArgs, cchMaxPath); + + if( cchMaxPath ) + pszArgs[0] = 0; + if( sArgs ) + lstrcpynW( pszArgs, sArgs, cchMaxPath ); + + return NOERROR; +} + +HRESULT WINAPI ShellLink::SetArguments(LPCWSTR pszArgs) +{ + TRACE("(%p)->(args=%s)\n",this, debugstr_w(pszArgs)); + + HeapFree(GetProcessHeap(), 0, sArgs); + sArgs = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, + (wcslen( pszArgs )+1)*sizeof (WCHAR) ); + if ( !sArgs ) + return E_OUTOFMEMORY; + wcscpy( sArgs, pszArgs ); + bDirty = TRUE; + + return S_OK; +} + +static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPCITEMIDLIST pidl, + LPWSTR pszIconPath, int cchIconPath, int* piIcon) +{ + LPCITEMIDLIST pidlLast; + UINT wFlags; + + HRESULT hr = SHBindToParent(pidl, IID_IShellFolder, (LPVOID*)&psf, &pidlLast); + + if (SUCCEEDED(hr)) { + CComPtr pei; + + hr = psf->GetUIObjectOf(0, 1, &pidlLast, IID_IExtractIconW, NULL, (LPVOID*)&pei); + + if (SUCCEEDED(hr)) { + hr = pei->GetIconLocation(0, pszIconPath, MAX_PATH, piIcon, &wFlags); + } + + psf->Release(); + } + + return hr; +} + +HRESULT WINAPI ShellLink::GetIconLocation(LPWSTR pszIconPath,INT cchIconPath,INT *piIcon) +{ + TRACE("(%p)->(%p len=%u iicon=%p)\n", this, pszIconPath, cchIconPath, piIcon); + + pszIconPath[0] = 0; + *piIcon = iIcoNdx; + + if (sIcoPath) + { + lstrcpynW(pszIconPath, sIcoPath, cchIconPath); + return S_OK; + } + + if (pPidl || sPath) + { + CComPtr pdsk; + + HRESULT hr = SHGetDesktopFolder(&pdsk); + + if (SUCCEEDED(hr)) + { + /* first look for an icon using the PIDL (if present) */ + if (pPidl) + hr = SHELL_PidlGeticonLocationW(pdsk, pPidl, pszIconPath, cchIconPath, piIcon); + else + hr = E_FAIL; + + /* if we couldn't find an icon yet, look for it using the file system path */ + if (FAILED(hr) && sPath) + { + LPITEMIDLIST pidl; + + hr = pdsk->ParseDisplayName(0, NULL, sPath, NULL, &pidl, NULL); + + if (SUCCEEDED(hr)) + { + hr = SHELL_PidlGeticonLocationW(pdsk, pidl, pszIconPath, cchIconPath, piIcon); + + SHFree(pidl); + } + } + } + return hr; + } + return S_OK; +} + +HRESULT WINAPI ShellLink::SetIconLocation(LPCWSTR pszIconPath,INT iIcon) +{ + TRACE("(%p)->(path=%s iicon=%u)\n",this, debugstr_w(pszIconPath), iIcon); + + HeapFree(GetProcessHeap(), 0, sIcoPath); + sIcoPath = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, + (wcslen( pszIconPath )+1)*sizeof (WCHAR) ); + if ( !sIcoPath ) + return E_OUTOFMEMORY; + wcscpy( sIcoPath, pszIconPath ); + + iIcoNdx = iIcon; + bDirty = TRUE; + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetRelativePath(LPCWSTR pszPathRel, DWORD dwReserved) +{ + TRACE("(%p)->(path=%s %x)\n",this, debugstr_w(pszPathRel), dwReserved); + + HeapFree(GetProcessHeap(), 0, sPathRel); + sPathRel = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, + (wcslen( pszPathRel )+1) * sizeof (WCHAR) ); + if ( !sPathRel ) + return E_OUTOFMEMORY; + wcscpy( sPathRel, pszPathRel ); + bDirty = TRUE; + + return ShellLink_UpdatePath(sPathRel, sPath, sWorkDir, &sPath); +} + +LPWSTR ShellLink::ShellLink_GetAdvertisedArg(LPCWSTR str) +{ + LPWSTR ret; + LPCWSTR p; + DWORD len; + + if( !str ) + return NULL; + + p = wcschr( str, ':' ); + if( !p ) + return NULL; + len = p - str; + ret = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR)*(len+1)); + if( !ret ) + return ret; + memcpy( ret, str, sizeof(WCHAR)*len ); + ret[len] = 0; + return ret; +} + +HRESULT ShellLink::ShellLink_SetAdvertiseInfo(LPCWSTR str) +{ + LPCWSTR szComponent = NULL, szProduct = NULL, p; + WCHAR szGuid[39]; + HRESULT r; + GUID guid; + int len; + + while( str[0] ) + { + /* each segment must start with two colons */ + if( str[0] != ':' || str[1] != ':' ) + return E_FAIL; + + /* the last segment is just two colons */ + if( !str[2] ) + break; + str += 2; + + /* there must be a colon straight after a guid */ + p = wcschr( str, ':' ); + if( !p ) + return E_FAIL; + len = p - str; + if( len != 38 ) + return E_FAIL; + + /* get the guid, and check it's validly formatted */ + memcpy( szGuid, str, sizeof(WCHAR)*len ); + szGuid[len] = 0; + r = CLSIDFromString( szGuid, &guid ); + if( r != S_OK ) + return r; + str = p + 1; + + /* match it up to a guid that we care about */ + if( IsEqualGUID( guid, SHELL32_AdvtShortcutComponent ) && !szComponent ) + szComponent = str; + else if( IsEqualGUID(guid, SHELL32_AdvtShortcutProduct ) && !szProduct ) + szProduct = str; + else + return E_FAIL; + + /* skip to the next field */ + str = wcschr( str, ':' ); + if( !str ) + return E_FAIL; + } + + /* we have to have a component for an advertised shortcut */ + if( !szComponent ) + return E_FAIL; + + sComponent = ShellLink_GetAdvertisedArg( szComponent ); + sProduct = ShellLink_GetAdvertisedArg( szProduct ); + + TRACE("Component = %s\n", debugstr_w(sComponent)); + TRACE("Product = %s\n", debugstr_w(sProduct)); + + return S_OK; +} + +static BOOL ShellLink_GetVolumeInfo(LPCWSTR path, ShellLink::volume_info *volume) +{ + const int label_sz = sizeof volume->label/sizeof volume->label[0]; + WCHAR drive[4] = { path[0], ':', '\\', 0 }; + BOOL r; + + volume->type = GetDriveTypeW(drive); + r = GetVolumeInformationW(drive, volume->label, label_sz, &volume->serial, NULL, NULL, NULL, 0); + TRACE("r = %d type %d serial %08x name %s\n", r, + volume->type, volume->serial, debugstr_w(volume->label)); + return r; +} + +HRESULT WINAPI ShellLink::SetPath(LPCWSTR pszFile) +{ + WCHAR buffer[MAX_PATH]; + LPWSTR fname, unquoted = NULL; + HRESULT hr = S_OK; + UINT len; + + TRACE("(%p)->(path=%s)\n",this, debugstr_w(pszFile)); + + if (!pszFile) return E_INVALIDARG; + + /* quotes at the ends of the string are stripped */ + len = wcslen(pszFile); + if (pszFile[0] == '"' && pszFile[len-1] == '"') + { + unquoted = strdupW(pszFile); + PathUnquoteSpacesW(unquoted); + pszFile = unquoted; + } + + /* any other quote marks are invalid */ + if (wcschr(pszFile, '"')) + { + HeapFree(GetProcessHeap(), 0, unquoted); + return S_FALSE; + } + + HeapFree(GetProcessHeap(), 0, sPath); + sPath = NULL; + + HeapFree(GetProcessHeap(), 0, sComponent); + sComponent = NULL; + + if (pPidl) + ILFree(pPidl); + pPidl = NULL; + + if (S_OK != ShellLink_SetAdvertiseInfo(pszFile )) + { + if (*pszFile == '\0') + *buffer = '\0'; + else if (!GetFullPathNameW(pszFile, MAX_PATH, buffer, &fname)) + return E_FAIL; + else if(!PathFileExistsW(buffer) && + !SearchPathW(NULL, pszFile, NULL, MAX_PATH, buffer, NULL)) + hr = S_FALSE; + + pPidl = SHSimpleIDListFromPathW(pszFile); + ShellLink_GetVolumeInfo(buffer, &volume); + + sPath = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, + (wcslen( buffer )+1) * sizeof (WCHAR) ); + if (!sPath) + return E_OUTOFMEMORY; + + wcscpy(sPath, buffer); + } + bDirty = TRUE; + HeapFree(GetProcessHeap(), 0, unquoted); + + return hr; +} + +HRESULT WINAPI ShellLink::AddDataBlock(void* pDataBlock ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +HRESULT WINAPI ShellLink::CopyDataBlock(DWORD dwSig, void** ppDataBlock ) +{ + LPVOID block = NULL; + HRESULT r = E_FAIL; + + TRACE("%p %08x %p\n", this, dwSig, ppDataBlock ); + + switch (dwSig) + { + case EXP_DARWIN_ID_SIG: + if (!sComponent) + break; + block = shelllink_build_darwinid( sComponent, dwSig ); + r = S_OK; + break; + case EXP_SZ_LINK_SIG: + case NT_CONSOLE_PROPS_SIG: + case NT_FE_CONSOLE_PROPS_SIG: + case EXP_SPECIAL_FOLDER_SIG: + case EXP_SZ_ICON_SIG: + FIXME("valid but unhandled datablock %08x\n", dwSig); + break; + default: + ERR("unknown datablock %08x\n", dwSig); + } + *ppDataBlock = block; + return r; +} + +HRESULT WINAPI ShellLink::RemoveDataBlock(DWORD dwSig ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +HRESULT WINAPI ShellLink::GetFlags(DWORD* pdwFlags ) +{ + DWORD flags = 0; + + FIXME("%p %p\n", this, pdwFlags ); + + /* FIXME: add more */ + if (sArgs) + flags |= SLDF_HAS_ARGS; + if (sComponent) + flags |= SLDF_HAS_DARWINID; + if (sIcoPath) + flags |= SLDF_HAS_ICONLOCATION; +#if (NTDDI_VERSION < NTDDI_LONGHORN) + if (sProduct) + flags |= SLDF_HAS_LOGO3ID; +#endif + if (pPidl) + flags |= SLDF_HAS_ID_LIST; + + *pdwFlags = flags; + + return S_OK; +} + +HRESULT WINAPI ShellLink::SetFlags(DWORD dwFlags ) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +/************************************************************************** + * ShellLink implementation of IShellExtInit::Initialize() + * + * Loads the shelllink from the dataobject the shell is pointing to. + */ +HRESULT WINAPI ShellLink::Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID ) +{ + FORMATETC format; + STGMEDIUM stgm; + UINT count; + HRESULT r = E_FAIL; + + TRACE("%p %p %p %p\n", this, pidlFolder, pdtobj, hkeyProgID ); + + if( !pdtobj ) + return r; + + format.cfFormat = CF_HDROP; + format.ptd = NULL; + format.dwAspect = DVASPECT_CONTENT; + format.lindex = -1; + format.tymed = TYMED_HGLOBAL; + + if( FAILED(pdtobj->GetData(&format, &stgm ) ) ) + return r; + + count = DragQueryFileW((HDROP)stgm.hGlobal, -1, NULL, 0 ); + if( count == 1 ) + { + LPWSTR path; + + count = DragQueryFileW((HDROP)stgm.hGlobal, 0, NULL, 0 ); + count++; + path = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, count*sizeof(WCHAR) ); + if( path ) + { + count = DragQueryFileW((HDROP)stgm.hGlobal, 0, path, count ); + r = Load(path, 0 ); + HeapFree(GetProcessHeap(), 0, path ); + } + } + ReleaseStgMedium(&stgm ); + + return r; +} + +HRESULT WINAPI ShellLink::QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) +{ + WCHAR szOpen[20]; + MENUITEMINFOW mii; + int id = 1; + + TRACE("%p %p %u %u %u %u\n", this, + hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags ); + + if ( !hmenu ) + return E_INVALIDARG; + + if (!LoadStringW(shell32_hInstance, IDS_OPEN_VERB, szOpen, sizeof(szOpen)/sizeof(WCHAR))) + szOpen[0] = L'\0'; + else + szOpen[(sizeof(szOpen)/sizeof(WCHAR))-1] = L'\0'; + + memset( &mii, 0, sizeof(mii) ); + mii.cbSize = sizeof (mii); + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; + mii.dwTypeData = (LPWSTR)szOpen; + mii.cch = wcslen( mii.dwTypeData ); + mii.wID = idCmdFirst + id++; + mii.fState = MFS_DEFAULT | MFS_ENABLED; + mii.fType = MFT_STRING; + if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) + return E_FAIL; + iIdOpen = 1; + + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id ); +} + +static LPWSTR +shelllink_get_msi_component_path( LPWSTR component ) +{ + LPWSTR path; + DWORD r, sz = 0; + + r = CommandLineFromMsiDescriptor( component, NULL, &sz ); + if (r != ERROR_SUCCESS) + return NULL; + + sz++; + path = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, sz*sizeof(WCHAR) ); + r = CommandLineFromMsiDescriptor( component, path, &sz ); + if (r != ERROR_SUCCESS) + { + HeapFree( GetProcessHeap(), 0, path ); + path = NULL; + } + + TRACE("returning %s\n", debugstr_w( path ) ); + + return path; +} + +HRESULT WINAPI ShellLink::InvokeCommand(LPCMINVOKECOMMANDINFO lpici) +{ + static const WCHAR szOpen[] = { 'o','p','e','n',0 }; + static const WCHAR szCplOpen[] = { 'c','p','l','o','p','e','n',0 }; + SHELLEXECUTEINFOW sei; + HWND hwnd = NULL; /* FIXME: get using interface set from IObjectWithSite */ + LPWSTR args = NULL; + LPWSTR path = NULL; + HRESULT r; + + TRACE("%p %p\n", this, lpici ); + + if ( lpici->cbSize < sizeof (CMINVOKECOMMANDINFO) ) + return E_INVALIDARG; + + r = Resolve(hwnd, 0 ); + if ( FAILED( r ) ) + { + TRACE("failed to resolve component with error 0x%08x", r); + return r; + } + if ( sComponent ) + { + path = shelllink_get_msi_component_path( sComponent ); + if (!path) + return E_FAIL; + } + else + path = strdupW( sPath ); + + if ( lpici->cbSize == sizeof (CMINVOKECOMMANDINFOEX) && + ( lpici->fMask & CMIC_MASK_UNICODE ) ) + { + LPCMINVOKECOMMANDINFOEX iciex = (LPCMINVOKECOMMANDINFOEX) lpici; + DWORD len = 2; + + if ( sArgs ) + len += wcslen( sArgs ); + if ( iciex->lpParametersW ) + len += wcslen( iciex->lpParametersW ); + + args = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + args[0] = 0; + if ( sArgs ) + wcscat( args, sArgs ); + if ( iciex->lpParametersW ) + { + static const WCHAR space[] = { ' ', 0 }; + wcscat( args, space ); + wcscat( args, iciex->lpParametersW ); + } + } + else if (sArgs != NULL) + { + args = strdupW(sArgs); + } + + memset( &sei, 0, sizeof sei ); + sei.cbSize = sizeof sei; + sei.fMask = SEE_MASK_UNICODE | (lpici->fMask & (SEE_MASK_NOASYNC|SEE_MASK_ASYNCOK|SEE_MASK_FLAG_NO_UI)); + sei.lpFile = path; + sei.nShow = iShowCmd; + sei.lpDirectory = sWorkDir; + sei.lpParameters = args; + sei.lpVerb = szOpen; + + // HACK for ShellExecuteExW + if (!wcsstr(sPath, L".cpl")) + sei.lpVerb = szOpen; + else + sei.lpVerb = szCplOpen; + + if( ShellExecuteExW( &sei ) ) + r = S_OK; + else + r = E_FAIL; + + HeapFree( GetProcessHeap(), 0, args ); + HeapFree( GetProcessHeap(), 0, path ); + + return r; +} + +HRESULT WINAPI ShellLink::GetCommandString(UINT_PTR idCmd, UINT uType, UINT* pwReserved, LPSTR pszName, UINT cchMax) +{ + FIXME("%p %lu %u %p %p %u\n", this, idCmd, uType, pwReserved, pszName, cchMax ); + + return E_NOTIMPL; +} + +INT_PTR CALLBACK ExtendedShortcutProc( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + HWND hDlgCtrl; + + switch(uMsg) + { + case WM_INITDIALOG: + if (lParam) + { + hDlgCtrl = GetDlgItem(hwndDlg, 14000); + SendMessage(hDlgCtrl, BM_SETCHECK, BST_CHECKED, 0); + } + return TRUE; + case WM_COMMAND: + hDlgCtrl = GetDlgItem(hwndDlg, 14000); + if (LOWORD(wParam) == IDOK) + { + if ( SendMessage(hDlgCtrl, BM_GETCHECK, 0, 0) == BST_CHECKED ) + EndDialog(hwndDlg, 1); + else + EndDialog(hwndDlg, 0); + } + else if (LOWORD(wParam) == IDCANCEL) + { + EndDialog(hwndDlg, -1); + } + else if (LOWORD(wParam) == 14000) + { + if ( SendMessage(hDlgCtrl, BM_GETCHECK, 0, 0) == BST_CHECKED) + SendMessage(hDlgCtrl, BM_SETCHECK, BST_UNCHECKED, 0); + else + SendMessage(hDlgCtrl, BM_SETCHECK, BST_CHECKED, 0); + + } + } + return FALSE; +} + +/************************************************************************** + * SH_ShellLinkDlgProc + * + * dialog proc of the shortcut property dialog + */ + +INT_PTR CALLBACK ShellLink::SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + LPPROPSHEETPAGEW ppsp; + LPPSHNOTIFY lppsn; + ShellLink *pThis; + HWND hDlgCtrl; + WCHAR szBuffer[MAX_PATH]; + WCHAR * ptr; + int IconIndex; + INT_PTR result; + + pThis = (ShellLink *)GetWindowLongPtr(hwndDlg, DWLP_USER); + + switch(uMsg) + { + case WM_INITDIALOG: + ppsp = (LPPROPSHEETPAGEW)lParam; + if (ppsp == NULL) + break; + + TRACE("ShellLink_DlgProc (WM_INITDIALOG hwnd %p lParam %p ppsplParam %x)\n",hwndDlg, lParam, ppsp->lParam); + + pThis = (ShellLink *)ppsp->lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pThis); + + TRACE("sArgs: %S sComponent: %S sDescription: %S sIcoPath: %S sPath: %S sPathRel: %S sProduct: %S sWorkDir: %S\n", pThis->sArgs, pThis->sComponent, pThis->sDescription, + pThis->sIcoPath, pThis->sPath, pThis->sPathRel, pThis->sProduct, pThis->sWorkDir); + + /* target path */ + hDlgCtrl = GetDlgItem( hwndDlg, 14009 ); + if ( hDlgCtrl != NULL ) + SendMessageW( hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)pThis->sPath ); + + /* working dir */ + hDlgCtrl = GetDlgItem( hwndDlg, 14011 ); + if ( hDlgCtrl != NULL ) + SendMessageW( hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)pThis->sWorkDir ); + + /* description */ + hDlgCtrl = GetDlgItem( hwndDlg, 14019 ); + if ( hDlgCtrl != NULL ) + SendMessageW( hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)pThis->sDescription ); + return TRUE; + case WM_NOTIFY: + lppsn = (LPPSHNOTIFY) lParam; + if ( lppsn->hdr.code == PSN_APPLY ) + { + /* set working directory */ + hDlgCtrl = GetDlgItem( hwndDlg, 14011 ); + SendMessageW( hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)szBuffer ); + pThis->SetWorkingDirectory(szBuffer); + /* set link destination */ + hDlgCtrl = GetDlgItem( hwndDlg, 14009 ); + SendMessageW( hDlgCtrl, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)szBuffer); + if ( !SHELL_ExistsFileW(szBuffer) ) + { + //FIXME load localized error msg + MessageBoxW( hwndDlg, L"file not existing", szBuffer, MB_OK ); + SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE ); + return TRUE; + } + ptr = wcsrchr(szBuffer, L'.'); + if (ptr && !_wcsnicmp(ptr, L".lnk", 4)) + { + // FIXME load localized error msg + MessageBoxW( hwndDlg, L"You cannot create a link to a shortcut", L"Error", MB_ICONERROR ); + SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE ); + return TRUE; + } + + pThis->SetPath(szBuffer); + + TRACE("This %p sLinkPath %S\n", pThis, pThis->sLinkPath); + pThis->Save(pThis->sLinkPath, TRUE ); + SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR ); + return TRUE; + } + break; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case 14020: + /// + /// FIXME + /// open target directory + /// + return TRUE; + case 14021: + if (pThis->sIcoPath) + wcscpy(szBuffer, pThis->sIcoPath); + IconIndex = pThis->iIcoNdx; + if (PickIconDlg(hwndDlg, szBuffer, MAX_PATH, &IconIndex)) + { + pThis->SetIconLocation(szBuffer, IconIndex); + /// + /// FIXME redraw icon + } + return TRUE; + case 14022: + result = DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(SHELL_EXTENDED_SHORTCUT_DLG), hwndDlg, ExtendedShortcutProc, (LPARAM)pThis->bRunAs); + if (result == 1 || result == 0) + { + if (pThis->bRunAs != result ) + { + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + + pThis->bRunAs = result; + } + return TRUE; + } + switch(HIWORD(wParam)) + { + case EN_CHANGE: + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + break; + } + break; + default: + break; + } + return FALSE; +} + +/************************************************************************** + * ShellLink_IShellPropSheetExt interface + */ + +HRESULT WINAPI ShellLink::AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) +{ + HPROPSHEETPAGE hPage; + BOOL bRet; + + hPage = SH_CreatePropertySheetPage("SHELL_GENERAL_SHORTCUT_DLG", SH_ShellLinkDlgProc, (LPARAM)this, NULL); + if (hPage == NULL) + { + ERR("failed to create property sheet page\n"); + return E_FAIL; + } + + bRet = pfnAddPage(hPage, lParam); + if (bRet) + return S_OK; + else + return E_FAIL; +} + +HRESULT WINAPI ShellLink::ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) +{ + TRACE("(%p) (uPageID %u, pfnReplacePage %p lParam %p\n", this, uPageID, pfnReplacePage, lParam); + return E_NOTIMPL; +} + +HRESULT WINAPI ShellLink::SetSite(IUnknown *punk) +{ + TRACE("%p %p\n", this, punk); + + site = punk; + + return S_OK; +} + +HRESULT WINAPI ShellLink::GetSite(REFIID iid, void ** ppvSite) +{ + TRACE("%p %s %p\n", this, debugstr_guid(&iid), ppvSite ); + + if (site == NULL) + return E_FAIL; + return site->QueryInterface(iid, ppvSite ); +} + +/************************************************************************** + * IShellLink_ConstructFromFile + */ +HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown *pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, LPVOID *ppv) +{ + CComPtr psl; + + HRESULT hr = ShellLink::_CreatorClass::CreateInstance(NULL, riid, (void**)&psl); + + if (SUCCEEDED(hr)) + { + CComPtr ppf; + + *ppv = NULL; + + hr = psl->QueryInterface(IID_IPersistFile, (LPVOID*)&ppf); + + if (SUCCEEDED(hr)) + { + WCHAR path[MAX_PATH]; + + if (SHGetPathFromIDListW(pidl, path)) + hr = ppf->Load(path, 0); + else + hr = E_FAIL; + + if (SUCCEEDED(hr)) + *ppv = psl.Detach(); + } + } + + return hr; +} diff --git a/dll/win32/shell32_new/shelllink.h b/dll/win32/shell32_new/shelllink.h new file mode 100644 index 00000000000..a05dd23934f --- /dev/null +++ b/dll/win32/shell32_new/shelllink.h @@ -0,0 +1,183 @@ +/* + * + * Copyright 1997 Marcus Meissner + * Copyright 1998 Juergen Schmied + * Copyright 2005 Mike McCormack + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#ifndef _SHELLLINK_H_ +#define _SHELLLINK_H_ + +class ShellLink : + public CComCoClass, + public CComObjectRootEx, + public IShellLinkA, + public IShellLinkW, + public IPersistFile, + public IPersistStream, + public IShellLinkDataList, + public IShellExtInit, + public IContextMenu, + public IObjectWithSite, + public IShellPropSheetExt +{ +public: + /* link file formats */ + + #include "pshpack1.h" + + struct volume_info + { + DWORD type; + DWORD serial; + WCHAR label[12]; /* assume 8.3 */ + }; + + #include "poppack.h" + +private: + /* data structures according to the information in the link */ + LPITEMIDLIST pPidl; + WORD wHotKey; + SYSTEMTIME time1; + SYSTEMTIME time2; + SYSTEMTIME time3; + + DWORD iShowCmd; + LPWSTR sIcoPath; + INT iIcoNdx; + LPWSTR sPath; + LPWSTR sArgs; + LPWSTR sWorkDir; + LPWSTR sDescription; + LPWSTR sPathRel; + LPWSTR sProduct; + LPWSTR sComponent; + volume_info volume; + LPWSTR sLinkPath; + LPWSTR sCurFile; + BOOL bRunAs; + BOOL bDirty; + INT iIdOpen; /* id of the "Open" entry in the context menu */ + CComPtr site; +public: + ShellLink(); + ~ShellLink(); + LPWSTR ShellLink_GetAdvertisedArg(LPCWSTR str); + HRESULT ShellLink_SetAdvertiseInfo(LPCWSTR str); + static INT_PTR CALLBACK SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); + + // IPersistFile + virtual HRESULT WINAPI GetClassID(CLSID *pclsid); + virtual HRESULT WINAPI IsDirty(); + virtual HRESULT WINAPI Load(LPCOLESTR pszFileName, DWORD dwMode); + virtual HRESULT WINAPI Save(LPCOLESTR pszFileName, BOOL fRemember); + virtual HRESULT WINAPI SaveCompleted(LPCOLESTR pszFileName); + virtual HRESULT WINAPI GetCurFile(LPOLESTR *ppszFileName); + + // IPersistStream +// virtual WINAPI HRESULT GetClassID(CLSID *pclsid); +// virtual HRESULT WINAPI IsDirty(); + virtual HRESULT WINAPI Load(IStream *stm); + virtual HRESULT WINAPI Save(IStream *stm, BOOL fClearDirty); + virtual HRESULT WINAPI GetSizeMax(ULARGE_INTEGER *pcbSize); + + // IShellLinkA + virtual HRESULT WINAPI GetPath(LPSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags); + virtual HRESULT WINAPI GetIDList(LPITEMIDLIST * ppidl); + virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl); + virtual HRESULT WINAPI GetDescription(LPSTR pszName,INT cchMaxName); + virtual HRESULT WINAPI SetDescription(LPCSTR pszName); + virtual HRESULT WINAPI GetWorkingDirectory(LPSTR pszDir,INT cchMaxPath); + virtual HRESULT WINAPI SetWorkingDirectory(LPCSTR pszDir); + virtual HRESULT WINAPI GetArguments(LPSTR pszArgs,INT cchMaxPath); + virtual HRESULT WINAPI SetArguments(LPCSTR pszArgs); + virtual HRESULT WINAPI GetHotkey(WORD *pwHotkey); + virtual HRESULT WINAPI SetHotkey(WORD wHotkey); + virtual HRESULT WINAPI GetShowCmd(INT *piShowCmd); + virtual HRESULT WINAPI SetShowCmd(INT iShowCmd); + virtual HRESULT WINAPI GetIconLocation(LPSTR pszIconPath,INT cchIconPath,INT *piIcon); + virtual HRESULT WINAPI SetIconLocation(LPCSTR pszIconPath,INT iIcon); + virtual HRESULT WINAPI SetRelativePath(LPCSTR pszPathRel, DWORD dwReserved); + virtual HRESULT WINAPI Resolve(HWND hwnd, DWORD fFlags); + virtual HRESULT WINAPI SetPath(LPCSTR pszFile); + + // IShellLinkW + virtual HRESULT WINAPI GetPath(LPWSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags); +// virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl); +// virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl); + virtual HRESULT WINAPI GetDescription(LPWSTR pszName, INT cchMaxName); + virtual HRESULT WINAPI SetDescription(LPCWSTR pszName); + virtual HRESULT WINAPI GetWorkingDirectory(LPWSTR pszDir, INT cchMaxPath); + virtual HRESULT WINAPI SetWorkingDirectory(LPCWSTR pszDir); + virtual HRESULT WINAPI GetArguments(LPWSTR pszArgs,INT cchMaxPath); + virtual HRESULT WINAPI SetArguments(LPCWSTR pszArgs); +// virtual HRESULT WINAPI GetHotkey(WORD *pwHotkey); +// virtual HRESULT WINAPI SetHotkey(WORD wHotkey); +// virtual HRESULT WINAPI GetShowCmd(INT *piShowCmd); +// virtual HRESULT WINAPI SetShowCmd(INT iShowCmd); + virtual HRESULT WINAPI GetIconLocation(LPWSTR pszIconPath,INT cchIconPath,INT *piIcon); + virtual HRESULT WINAPI SetIconLocation(LPCWSTR pszIconPath,INT iIcon); + virtual HRESULT WINAPI SetRelativePath(LPCWSTR pszPathRel, DWORD dwReserved); +// virtual HRESULT WINAPI Resolve(HWND hwnd, DWORD fFlags); + virtual HRESULT WINAPI SetPath(LPCWSTR pszFile); + + // IShellLinkDataList + virtual HRESULT WINAPI AddDataBlock(void *pDataBlock); + virtual HRESULT WINAPI CopyDataBlock(DWORD dwSig, void **ppDataBlock); + virtual HRESULT WINAPI RemoveDataBlock(DWORD dwSig); + virtual HRESULT WINAPI GetFlags(DWORD *pdwFlags); + virtual HRESULT WINAPI SetFlags(DWORD dwFlags); + + // IShellExtInit + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax); + + // IShellPropSheetExt + virtual HRESULT WINAPI AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); + virtual HRESULT WINAPI ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam); + + // IObjectWithSite + virtual HRESULT WINAPI SetSite(IUnknown *punk); + virtual HRESULT WINAPI GetSite(REFIID iid, void **ppvSite); + +DECLARE_REGISTRY_RESOURCEID(IDR_SHELLLINK) +DECLARE_NOT_AGGREGATABLE(ShellLink) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(ShellLink) + COM_INTERFACE_ENTRY2_IID(IID_IPersist, IPersist, IPersistFile) + COM_INTERFACE_ENTRY_IID(IID_IPersistFile, IPersistFile) + COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream) + COM_INTERFACE_ENTRY_IID(IID_IShellLinkA, IShellLinkA) + COM_INTERFACE_ENTRY_IID(IID_IShellLinkW, IShellLinkW) + COM_INTERFACE_ENTRY_IID(IID_IShellLinkDataList, IShellLinkDataList) + COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) +END_COM_MAP() +}; + +#endif // _SHELLLINK_H_ diff --git a/dll/win32/shell32_new/shellole.cpp b/dll/win32/shell32_new/shellole.cpp new file mode 100644 index 00000000000..3c01c0a360d --- /dev/null +++ b/dll/win32/shell32_new/shellole.cpp @@ -0,0 +1,586 @@ +/* + * handling of SHELL32.DLL OLE-Objects + * + * Copyright 1997 Marcus Meissner + * Copyright 1998 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_desktop.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +extern HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); + +static const WCHAR sShell32[12] = {'S','H','E','L','L','3','2','.','D','L','L','\0'}; + +/************************************************************************** + * Default ClassFactory types + */ +typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); +HRESULT IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, const IID *riidInst, IClassFactory **theFactory); + +/* FIXME: this should be SHLWAPI.24 since we can't yet import by ordinal */ + +DWORD WINAPI __SHGUIDToStringW (REFGUID guid, LPWSTR str) +{ + WCHAR sFormat[52] = {'{','%','0','8','l','x','-','%','0','4', + 'x','-','%','0','4','x','-','%','0','2', + 'x','%','0','2','x','-','%','0','2','x', + '%','0','2','x','%','0','2','x','%','0', + '2','x','%','0','2','x','%','0','2','x', + '}','\0'}; + + return swprintf ( str, sFormat, + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], + guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7] ); + +} + +/************************************************************************* + * SHCoCreateInstance [SHELL32.102] + * + * Equivalent to CoCreateInstance. Under Windows 9x this function could sometimes + * use the shell32 built-in "mini-COM" without the need to load ole32.dll - see + * SHLoadOLE for details. + * + * Under wine if a "LoadWithoutCOM" value is present or the object resides in + * shell32.dll the function will load the object manually without the help of ole32 + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * CoCreateInstace, SHLoadOLE + */ +HRESULT WINAPI SHCoCreateInstance( + LPCWSTR aclsid, + const CLSID *clsid, + LPUNKNOWN pUnkOuter, + REFIID refiid, + LPVOID *ppv) +{ + DWORD hres; + CLSID iid; + const CLSID * myclsid = clsid; + WCHAR sKeyName[MAX_PATH]; + const WCHAR sCLSID[7] = {'C','L','S','I','D','\\','\0'}; + WCHAR sClassID[60]; + const WCHAR sInProcServer32[16] ={'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2','\0'}; + const WCHAR sLoadWithoutCOM[15] ={'L','o','a','d','W','i','t','h','o','u','t','C','O','M','\0'}; + WCHAR sDllPath[MAX_PATH]; + HKEY hKey; + DWORD dwSize; + BOOLEAN bLoadFromShell32 = FALSE; + BOOLEAN bLoadWithoutCOM = FALSE; + CComPtr pcf; + + if(!ppv) return E_POINTER; + *ppv=NULL; + + /* if the clsid is a string, convert it */ + if (!clsid) + { + if (!aclsid) return REGDB_E_CLASSNOTREG; + CLSIDFromString((LPOLESTR)aclsid, &iid); + myclsid = &iid; + } + + TRACE("(%p,%s,unk:%p,%s,%p)\n", + aclsid, shdebugstr_guid(myclsid), pUnkOuter, shdebugstr_guid(&refiid), ppv); + + /* we look up the dll path in the registry */ + __SHGUIDToStringW(*myclsid, sClassID); + wcscpy(sKeyName, sCLSID); + wcscat(sKeyName, sClassID); + wcscat(sKeyName, sInProcServer32); + + if (ERROR_SUCCESS == RegOpenKeyExW(HKEY_CLASSES_ROOT, sKeyName, 0, KEY_READ, &hKey)) { + dwSize = sizeof(sDllPath); + SHQueryValueExW(hKey, NULL, 0,0, sDllPath, &dwSize ); + + /* if a special registry key is set, we load a shell extension without help of OLE32 */ + bLoadWithoutCOM = (ERROR_SUCCESS == SHQueryValueExW(hKey, sLoadWithoutCOM, 0, 0, 0, 0)); + + /* if the com object is inside shell32, omit use of ole32 */ + bLoadFromShell32 = (0==lstrcmpiW( PathFindFileNameW(sDllPath), sShell32)); + + RegCloseKey (hKey); + } else { + /* since we can't find it in the registry we try internally */ + bLoadFromShell32 = TRUE; + } + + TRACE("WithoutCom=%u FromShell=%u\n", bLoadWithoutCOM, bLoadFromShell32); + + /* now we create an instance */ + if (bLoadFromShell32) { + if (! SUCCEEDED(DllGetClassObject(*myclsid, IID_IClassFactory, (LPVOID*)&pcf))) { + ERR("LoadFromShell failed for CLSID=%s\n", shdebugstr_guid(myclsid)); + } + } else if (bLoadWithoutCOM) { + + /* load an external dll without ole32 */ + HINSTANCE hLibrary; + typedef HRESULT (CALLBACK *DllGetClassObjectFunc)(REFCLSID clsid, REFIID iid, LPVOID *ppv); + DllGetClassObjectFunc DllGetClassObject; + + if ((hLibrary = LoadLibraryExW(sDllPath, 0, LOAD_WITH_ALTERED_SEARCH_PATH)) == 0) { + ERR("couldn't load InprocServer32 dll %s\n", debugstr_w(sDllPath)); + hres = E_ACCESSDENIED; + goto end; + } else if (!(DllGetClassObject = (DllGetClassObjectFunc)GetProcAddress(hLibrary, "DllGetClassObject"))) { + ERR("couldn't find function DllGetClassObject in %s\n", debugstr_w(sDllPath)); + FreeLibrary( hLibrary ); + hres = E_ACCESSDENIED; + goto end; + } else if (! SUCCEEDED(hres = DllGetClassObject(*myclsid, IID_IClassFactory, (LPVOID*)&pcf))) { + TRACE("GetClassObject failed 0x%08x\n", hres); + goto end; + } + + } else { + + /* load an external dll in the usual way */ + hres = CoCreateInstance(*myclsid, pUnkOuter, CLSCTX_INPROC_SERVER, refiid, ppv); + goto end; + } + + /* here we should have a ClassFactory */ + if (!pcf) return E_ACCESSDENIED; + + hres = pcf->CreateInstance(pUnkOuter, refiid, ppv); +end: + if(hres!=S_OK) + { + ERR("failed (0x%08x) to create CLSID:%s IID:%s\n", + hres, shdebugstr_guid(myclsid), shdebugstr_guid(&refiid)); + ERR("class not found in registry\n"); + } + + TRACE("-- instance: %p\n",*ppv); + return hres; +} + +/************************************************************************* + * SHCLSIDFromString [SHELL32.147] + * + * Under Windows 9x this was an ANSI version of CLSIDFromString. It also allowed + * to avoid dependency on ole32.dll (see SHLoadOLE for details). + * + * Under Windows NT/2000/XP this is equivalent to CLSIDFromString + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * CLSIDFromString, SHLoadOLE + */ +DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id) +{ + WCHAR buffer[40]; + TRACE("(%p(%s) %p)\n", clsid, clsid, id); + if (!MultiByteToWideChar( CP_ACP, 0, clsid, -1, buffer, sizeof(buffer)/sizeof(WCHAR) )) + return CO_E_CLASSSTRING; + return CLSIDFromString( buffer, id ); +} + +DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id) +{ + TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id); + return CLSIDFromString((LPWSTR)clsid, id); +} + +EXTERN_C DWORD WINAPI SHCLSIDFromStringAW (LPCVOID clsid, CLSID *id) +{ + if (SHELL_OsIsUnicode()) + return SHCLSIDFromStringW ((LPCWSTR)clsid, id); + return SHCLSIDFromStringA ((LPCSTR)clsid, id); +} + +/************************************************************************* + * SHGetMalloc [SHELL32.@] + * + * Equivalent to CoGetMalloc(MEMCTX_TASK, ...). Under Windows 9x this function + * could use the shell32 built-in "mini-COM" without the need to load ole32.dll - + * see SHLoadOLE for details. + * + * PARAMS + * lpmal [O] Destination for IMalloc interface. + * + * RETURNS + * Success: S_OK. lpmal contains the shells IMalloc interface. + * Failure. An HRESULT error code. + * + * SEE ALSO + * CoGetMalloc, SHLoadOLE + */ +HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) +{ + TRACE("(%p)\n", lpmal); + return CoGetMalloc(MEMCTX_TASK, lpmal); +} + +/************************************************************************* + * SHAlloc [SHELL32.196] + * + * Equivalent to CoTaskMemAlloc. Under Windows 9x this function could use + * the shell32 built-in "mini-COM" without the need to load ole32.dll - + * see SHLoadOLE for details. + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * CoTaskMemAlloc, SHLoadOLE + */ +LPVOID WINAPI SHAlloc(DWORD len) +{ + LPVOID ret; + + ret = CoTaskMemAlloc(len); + TRACE("%u bytes at %p\n",len, ret); + return ret; +} + +/************************************************************************* + * SHFree [SHELL32.195] + * + * Equivalent to CoTaskMemFree. Under Windows 9x this function could use + * the shell32 built-in "mini-COM" without the need to load ole32.dll - + * see SHLoadOLE for details. + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * CoTaskMemFree, SHLoadOLE + */ +void WINAPI SHFree(LPVOID pv) +{ + TRACE("%p\n",pv); + CoTaskMemFree(pv); +} + +/************************************************************************* + * SHGetDesktopFolder [SHELL32.@] + */ +HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf) +{ + HRESULT hres = S_OK; + TRACE("\n"); + + if(!psf) return E_INVALIDARG; + *psf = NULL; + hres = CDesktopFolder::_CreatorClass::CreateInstance(NULL, IID_IShellFolder, (void**)psf); + + TRACE("-- %p->(%p)\n",psf, *psf); + return hres; +} +/************************************************************************** + * Default ClassFactory Implementation + * + * SHCreateDefClassObject + * + * NOTES + * Helper function for dlls without their own classfactory. + * A generic classfactory is returned. + * When the CreateInstance of the cf is called the callback is executed. + */ + +class IDefClFImpl : + public CComObjectRootEx, + public IClassFactory +{ +private: + CLSID *rclsid; + LPFNCREATEINSTANCE lpfnCI; + const IID *riidInst; + LONG *pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */ +public: + IDefClFImpl(); + HRESULT Initialize(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, const IID *riidInstx); + + // IClassFactory + virtual HRESULT WINAPI CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject); + virtual HRESULT WINAPI LockServer(BOOL fLock); + +BEGIN_COM_MAP(IDefClFImpl) + COM_INTERFACE_ENTRY_IID(IID_IClassFactory, IClassFactory) +END_COM_MAP() +}; + +IDefClFImpl::IDefClFImpl() +{ + lpfnCI = NULL; + riidInst = NULL; + pcRefDll = NULL; +} + +HRESULT IDefClFImpl::Initialize(LPFNCREATEINSTANCE lpfnCIx, PLONG pcRefDllx, const IID *riidInstx) +{ + lpfnCI = lpfnCIx; + riidInst = riidInstx; + pcRefDll = pcRefDllx; + + if (pcRefDll) + InterlockedIncrement(pcRefDll); + + TRACE("(%p)%s\n", this, shdebugstr_guid(riidInst)); + return S_OK; +} + +/****************************************************************************** + * IDefClF_fnCreateInstance + */ +HRESULT WINAPI IDefClFImpl::CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject) +{ + TRACE("%p->(%p,%s,%p)\n", this, pUnkOuter, shdebugstr_guid(&riid), ppvObject); + + *ppvObject = NULL; + + if (riidInst == NULL || IsEqualCLSID(riid, *riidInst) || IsEqualCLSID(riid, IID_IUnknown)) + { + return lpfnCI(pUnkOuter, riid, ppvObject); + } + + ERR("unknown IID requested %s\n", shdebugstr_guid(&riid)); + return E_NOINTERFACE; +} + +/****************************************************************************** + * IDefClF_fnLockServer + */ +HRESULT WINAPI IDefClFImpl::LockServer(BOOL fLock) +{ + TRACE("%p->(0x%x), not implemented\n", this, fLock); + return E_NOTIMPL; +} + +/************************************************************************** + * IDefClF_fnConstructor + */ + +HRESULT IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, const IID *riidInst, IClassFactory **theFactory) +{ + CComObject *theClassObject; + CComPtr result; + HRESULT hResult; + + if (theFactory == NULL) + return E_POINTER; + *theFactory = NULL; + ATLTRY (theClassObject = new CComObject); + if (theClassObject == NULL) + return E_OUTOFMEMORY; + hResult = theClassObject->QueryInterface (IID_IClassFactory, (void **)&result); + if (FAILED (hResult)) + { + delete theClassObject; + return hResult; + } + hResult = theClassObject->Initialize (lpfnCI, pcRefDll, riidInst); + if (FAILED (hResult)) + return hResult; + *theFactory = result.Detach (); + return S_OK; +} + +/****************************************************************************** + * SHCreateDefClassObject [SHELL32.70] + */ +HRESULT WINAPI SHCreateDefClassObject( + REFIID riid, + LPVOID* ppv, + LPFNCREATEINSTANCE lpfnCI, /* [in] create instance callback entry */ + LPDWORD pcRefDll, /* [in/out] ref count of the dll */ + REFIID riidInst) /* [in] optional interface to the instance */ +{ + IClassFactory *pcf; + HRESULT hResult; + + TRACE("%s %p %p %p %s\n", shdebugstr_guid(&riid), ppv, lpfnCI, pcRefDll, shdebugstr_guid(&riidInst)); + + if (!IsEqualCLSID(riid, IID_IClassFactory)) + return E_NOINTERFACE; + hResult = IDefClF_fnConstructor(lpfnCI, (PLONG)pcRefDll, &riidInst, &pcf); + if (FAILED(hResult)) + return hResult; + *ppv = pcf; + return NOERROR; +} + +/************************************************************************* + * DragAcceptFiles [SHELL32.@] + */ +void WINAPI DragAcceptFiles(HWND hWnd, BOOL b) +{ + LONG exstyle; + + if( !IsWindow(hWnd) ) return; + exstyle = GetWindowLongPtrA(hWnd,GWL_EXSTYLE); + if (b) + exstyle |= WS_EX_ACCEPTFILES; + else + exstyle &= ~WS_EX_ACCEPTFILES; + SetWindowLongPtrA(hWnd,GWL_EXSTYLE,exstyle); +} + +/************************************************************************* + * DragFinish [SHELL32.@] + */ +void WINAPI DragFinish(HDROP h) +{ + TRACE("\n"); + GlobalFree((HGLOBAL)h); +} + +/************************************************************************* + * DragQueryPoint [SHELL32.@] + */ +BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p) +{ + DROPFILES *lpDropFileStruct; + BOOL bRet; + + TRACE("\n"); + + lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); + + *p = lpDropFileStruct->pt; + bRet = lpDropFileStruct->fNC; + + GlobalUnlock(hDrop); + return bRet; +} + +/************************************************************************* + * DragQueryFileA [SHELL32.@] + * DragQueryFile [SHELL32.@] + */ +UINT WINAPI DragQueryFileA( + HDROP hDrop, + UINT lFile, + LPSTR lpszFile, + UINT lLength) +{ + LPSTR lpDrop; + UINT i = 0; + DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); + + TRACE("(%p, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength); + + if(!lpDropFileStruct) goto end; + + lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->pFiles; + + if(lpDropFileStruct->fWide) { + LPWSTR lpszFileW = NULL; + + if(lpszFile) { + lpszFileW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, lLength*sizeof(WCHAR)); + if(lpszFileW == NULL) { + goto end; + } + } + i = DragQueryFileW(hDrop, lFile, lpszFileW, lLength); + + if(lpszFileW) { + WideCharToMultiByte(CP_ACP, 0, lpszFileW, -1, lpszFile, lLength, 0, NULL); + HeapFree(GetProcessHeap(), 0, lpszFileW); + } + goto end; + } + + while (i++ < lFile) + { + while (*lpDrop++); /* skip filename */ + if (!*lpDrop) + { + i = (lFile == 0xFFFFFFFF) ? i : 0; + goto end; + } + } + + i = strlen(lpDrop); + if (!lpszFile ) goto end; /* needed buffer size */ + lstrcpynA (lpszFile, lpDrop, lLength); +end: + GlobalUnlock(hDrop); + return i; +} + +/************************************************************************* + * DragQueryFileW [SHELL32.@] + */ +UINT WINAPI DragQueryFileW( + HDROP hDrop, + UINT lFile, + LPWSTR lpszwFile, + UINT lLength) +{ + LPWSTR lpwDrop; + UINT i = 0; + DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); + + TRACE("(%p, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength); + + if(!lpDropFileStruct) goto end; + + lpwDrop = (LPWSTR) ((LPSTR)lpDropFileStruct + lpDropFileStruct->pFiles); + + if(lpDropFileStruct->fWide == FALSE) { + LPSTR lpszFileA = NULL; + + if(lpszwFile) { + lpszFileA = (LPSTR)HeapAlloc(GetProcessHeap(), 0, lLength); + if(lpszFileA == NULL) { + goto end; + } + } + i = DragQueryFileA(hDrop, lFile, lpszFileA, lLength); + + if(lpszFileA) { + MultiByteToWideChar(CP_ACP, 0, lpszFileA, -1, lpszwFile, lLength); + HeapFree(GetProcessHeap(), 0, lpszFileA); + } + goto end; + } + + i = 0; + while (i++ < lFile) + { + while (*lpwDrop++); /* skip filename */ + if (!*lpwDrop) + { + i = (lFile == 0xFFFFFFFF) ? i : 0; + goto end; + } + } + + i = wcslen(lpwDrop); + if ( !lpszwFile) goto end; /* needed buffer size */ + lstrcpynW (lpszwFile, lpwDrop, lLength); +end: + GlobalUnlock(hDrop); + return i; +} diff --git a/dll/win32/shell32_new/shellord.cpp b/dll/win32/shell32_new/shellord.cpp new file mode 100644 index 00000000000..ff499ea4132 --- /dev/null +++ b/dll/win32/shell32_new/shellord.cpp @@ -0,0 +1,2281 @@ +/* + * The parameters of many functions changes between different OS versions + * (NT uses Unicode strings, 95 uses ASCII strings) + * + * Copyright 1997 Marcus Meissner + * 1998 Jrgen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include "config.h" + +#include +#include +#include + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wine/debug.h" +#include "winnls.h" +#include "winternl.h" + +#include +#include +#include +#include + +#include "shellapi.h" +#include "objbase.h" +#include "shlguid.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "shell32_main.h" +#include "undocshell.h" +#include "pidl.h" +#include "shlwapi.h" +#include "commdlg.h" +#include "recyclebin.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); +WINE_DECLARE_DEBUG_CHANNEL(pidl); + +/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */ +/* !!! it is in both here and comctl32undoc.c !!! */ +typedef struct tagCREATEMRULIST +{ + DWORD cbSize; /* size of struct */ + DWORD nMaxItems; /* max no. of items in list */ + DWORD dwFlags; /* see below */ + HKEY hKey; /* root reg. key under which list is saved */ + LPCSTR lpszSubKey; /* reg. subkey */ + PROC lpfnCompare; /* item compare proc */ +} CREATEMRULISTA, *LPCREATEMRULISTA; + +/* dwFlags */ +#define MRUF_STRING_LIST 0 /* list will contain strings */ +#define MRUF_BINARY_LIST 1 /* list will contain binary data */ +#define MRUF_DELAYED_SAVE 2 /* only save list order to reg. is FreeMRUList */ + +EXTERN_C HANDLE WINAPI CreateMRUListA(LPCREATEMRULISTA lpcml); +EXTERN_C DWORD WINAPI FreeMRUList(HANDLE hMRUList); +EXTERN_C INT WINAPI AddMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData); +EXTERN_C INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum); +EXTERN_C INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize); + + +/* Get a function pointer from a DLL handle */ +#define GET_FUNC(func, funcType, module, name, fail) \ + do { \ + if (!func) { \ + if (!SHELL32_h##module && !(SHELL32_h##module = LoadLibraryA(#module ".dll"))) return fail; \ + func = (funcType)GetProcAddress(SHELL32_h##module, name); \ + if (!func) return fail; \ + } \ + } while (0) + +/* Function pointers for GET_FUNC macro */ +static HMODULE SHELL32_hshlwapi=NULL; + + +/************************************************************************* + * ParseFieldA [internal] + * + * copies a field from a ',' delimited string + * + * first field is nField = 1 + */ +DWORD WINAPI ParseFieldA( + LPCSTR src, + DWORD nField, + LPSTR dst, + DWORD len) +{ + WARN("(%s,0x%08x,%p,%d) semi-stub.\n",debugstr_a(src),nField,dst,len); + + if (!src || !src[0] || !dst || !len) + return 0; + + /* skip n fields delimited by ',' */ + while (nField > 1) + { + if (*src=='\0') return FALSE; + if (*(src++)==',') nField--; + } + + /* copy part till the next ',' to dst */ + while ( *src!='\0' && *src!=',' && (len--)>0 ) *(dst++)=*(src++); + + /* finalize the string */ + *dst=0x0; + + return TRUE; +} + +/************************************************************************* + * ParseFieldW [internal] + * + * copies a field from a ',' delimited string + * + * first field is nField = 1 + */ +DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len) +{ + WARN("(%s,0x%08x,%p,%d) semi-stub.\n", debugstr_w(src), nField, dst, len); + + if (!src || !src[0] || !dst || !len) + return 0; + + /* skip n fields delimited by ',' */ + while (nField > 1) + { + if (*src == 0x0) return FALSE; + if (*src++ == ',') nField--; + } + + /* copy part till the next ',' to dst */ + while ( *src != 0x0 && *src != ',' && (len--)>0 ) *(dst++) = *(src++); + + /* finalize the string */ + *dst = 0x0; + + return TRUE; +} + +/************************************************************************* + * ParseField [SHELL32.58] + */ +EXTERN_C DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) +{ + if (SHELL_OsIsUnicode()) + return ParseFieldW((LPCWSTR)src, nField, (LPWSTR)dst, len); + return ParseFieldA((LPCSTR)src, nField, (LPSTR)dst, len); +} + +/************************************************************************* + * GetFileNameFromBrowse [SHELL32.63] + * + */ +BOOL WINAPI GetFileNameFromBrowse( + HWND hwndOwner, + LPWSTR lpstrFile, + UINT nMaxFile, + LPCWSTR lpstrInitialDir, + LPCWSTR lpstrDefExt, + LPCWSTR lpstrFilter, + LPCWSTR lpstrTitle) +{ +typedef BOOL (WINAPI *GetOpenFileNameProc)(OPENFILENAMEW *ofn); + HMODULE hmodule; + GetOpenFileNameProc pGetOpenFileNameW; + OPENFILENAMEW ofn; + BOOL ret; + + TRACE("%p, %s, %d, %s, %s, %s, %s)\n", + hwndOwner, debugstr_w(lpstrFile), nMaxFile, lpstrInitialDir, lpstrDefExt, + lpstrFilter, lpstrTitle); + + hmodule = LoadLibraryW(L"comdlg32.dll"); + if(!hmodule) return FALSE; + pGetOpenFileNameW = (GetOpenFileNameProc)GetProcAddress(hmodule, "GetOpenFileNameW"); + if(!pGetOpenFileNameW) + { + FreeLibrary(hmodule); + return FALSE; + } + + memset(&ofn, 0, sizeof(ofn)); + + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hwndOwner; + ofn.lpstrFilter = lpstrFilter; + ofn.lpstrFile = lpstrFile; + ofn.nMaxFile = nMaxFile; + ofn.lpstrInitialDir = lpstrInitialDir; + ofn.lpstrTitle = lpstrTitle; + ofn.lpstrDefExt = lpstrDefExt; + ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; + ret = pGetOpenFileNameW(&ofn); + + FreeLibrary(hmodule); + return ret; +} + +/************************************************************************* + * SHGetSetSettings [SHELL32.68] + */ +EXTERN_C VOID WINAPI SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet) +{ + if(bSet) + { + FIXME("%p 0x%08x TRUE\n", lpss, dwMask); + } + else + { + SHGetSettings((LPSHELLFLAGSTATE)lpss,dwMask); + } +} + +/************************************************************************* + * SHGetSettings [SHELL32.@] + * + * NOTES + * the registry path are for win98 (tested) + * and possibly are the same in nt40 + * + */ +EXTERN_C VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask) +{ + HKEY hKey; + DWORD dwData; + DWORD dwDataSize = sizeof (DWORD); + + TRACE("(%p 0x%08x)\n",lpsfs,dwMask); + + if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) + return; + + if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fShowExtensions = ((dwData == 0) ? 0 : 1); + + if ( (SSF_SHOWINFOTIP & dwMask) && !RegQueryValueExA(hKey, "ShowInfoTip", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fShowInfoTip = ((dwData == 0) ? 0 : 1); + + if ( (SSF_DONTPRETTYPATH & dwMask) && !RegQueryValueExA(hKey, "DontPrettyPath", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fDontPrettyPath = ((dwData == 0) ? 0 : 1); + + if ( (SSF_HIDEICONS & dwMask) && !RegQueryValueExA(hKey, "HideIcons", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fHideIcons = ((dwData == 0) ? 0 : 1); + + if ( (SSF_MAPNETDRVBUTTON & dwMask) && !RegQueryValueExA(hKey, "MapNetDrvBtn", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fMapNetDrvBtn = ((dwData == 0) ? 0 : 1); + + if ( (SSF_SHOWATTRIBCOL & dwMask) && !RegQueryValueExA(hKey, "ShowAttribCol", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fShowAttribCol = ((dwData == 0) ? 0 : 1); + + if (((SSF_SHOWALLOBJECTS | SSF_SHOWSYSFILES) & dwMask) && !RegQueryValueExA(hKey, "Hidden", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + { if (dwData == 0) + { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0; + if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; + } + else if (dwData == 1) + { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 1; + if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; + } + else if (dwData == 2) + { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0; + if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 1; + } + } + RegCloseKey (hKey); + + TRACE("-- 0x%04x\n", *(WORD*)lpsfs); +} + +/************************************************************************* + * SHShellFolderView_Message [SHELL32.73] + * + * Send a message to an explorer cabinet window. + * + * PARAMS + * hwndCabinet [I] The window containing the shellview to communicate with + * dwMessage [I] The SFVM message to send + * dwParam [I] Message parameter + * + * RETURNS + * fixme. + * + * NOTES + * Message SFVM_REARRANGE = 1 + * + * This message gets sent when a column gets clicked to instruct the + * shell view to re-sort the item list. dwParam identifies the column + * that was clicked. + */ +LRESULT WINAPI SHShellFolderView_Message( + HWND hwndCabinet, + UINT uMessage, + LPARAM lParam) +{ + FIXME("%p %08x %08lx stub\n",hwndCabinet, uMessage, lParam); + return 0; +} + +/************************************************************************* + * RegisterShellHook [SHELL32.181] + * + * Register a shell hook. + * + * PARAMS + * hwnd [I] Window handle + * dwType [I] Type of hook. + * + * NOTES + * Exported by ordinal + */ +BOOL WINAPI RegisterShellHook( + HWND hWnd, + DWORD dwType) +{ + FIXME("(%p,0x%08x):stub.\n",hWnd, dwType); + return TRUE; +} + +/************************************************************************* + * ShellMessageBoxW [SHELL32.182] + * + * See ShellMessageBoxA. + * + * NOTE: + * shlwapi.ShellMessageBoxWrapW is a duplicate of shell32.ShellMessageBoxW + * because we can't forward to it in the .spec file since it's exported by + * ordinal. If you change the implementation here please update the code in + * shlwapi as well. + */ +EXTERN_C int WINAPI ShellMessageBoxW( + HINSTANCE hInstance, + HWND hWnd, + LPCWSTR lpText, + LPCWSTR lpCaption, + UINT uType, + ...) +{ + WCHAR szText[100],szTitle[100]; + LPCWSTR pszText = szText, pszTitle = szTitle; + LPWSTR pszTemp; + va_list args; + int ret; + + va_start(args, uType); + /* wvsprintfA(buf,fmt, args); */ + + TRACE("(%p,%p,%p,%p,%08x)\n", + hInstance,hWnd,lpText,lpCaption,uType); + + if (IS_INTRESOURCE(lpCaption)) + LoadStringW(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle)/sizeof(szTitle[0])); + else + pszTitle = lpCaption; + + if (IS_INTRESOURCE(lpText)) + LoadStringW(hInstance, LOWORD(lpText), szText, sizeof(szText)/sizeof(szText[0])); + else + pszText = lpText; + + FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, + pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args); + + va_end(args); + + ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType); + LocalFree(pszTemp); + return ret; +} + +/************************************************************************* + * ShellMessageBoxA [SHELL32.183] + * + * Format and output an error message. + * + * PARAMS + * hInstance [I] Instance handle of message creator + * hWnd [I] Window handle of message creator + * lpText [I] Resource Id of title or LPSTR + * lpCaption [I] Resource Id of title or LPSTR + * uType [I] Type of error message + * + * RETURNS + * A return value from MessageBoxA(). + * + * NOTES + * Exported by ordinal + */ +EXTERN_C int WINAPI ShellMessageBoxA( + HINSTANCE hInstance, + HWND hWnd, + LPCSTR lpText, + LPCSTR lpCaption, + UINT uType, + ...) +{ + char szText[100],szTitle[100]; + LPCSTR pszText = szText, pszTitle = szTitle; + LPSTR pszTemp; + va_list args; + int ret; + + va_start(args, uType); + /* wvsprintfA(buf,fmt, args); */ + + TRACE("(%p,%p,%p,%p,%08x)\n", + hInstance,hWnd,lpText,lpCaption,uType); + + if (IS_INTRESOURCE(lpCaption)) + LoadStringA(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle)); + else + pszTitle = lpCaption; + + if (IS_INTRESOURCE(lpText)) + LoadStringA(hInstance, LOWORD(lpText), szText, sizeof(szText)); + else + pszText = lpText; + + FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, + pszText, 0, 0, (LPSTR)&pszTemp, 0, &args); + + va_end(args); + + ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType); + LocalFree(pszTemp); + return ret; +} + +/************************************************************************* + * SHRegisterDragDrop [SHELL32.86] + * + * Probably equivalent to RegisterDragDrop but under Windows 95 it could use the + * shell32 built-in "mini-COM" without the need to load ole32.dll - see SHLoadOLE + * for details. Under Windows 98 this function initializes the true OLE when called + * the first time, on XP always returns E_OUTOFMEMORY and it got removed from Vista. + * + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * RegisterDragDrop, SHLoadOLE + */ +HRESULT WINAPI SHRegisterDragDrop( + HWND hWnd, + LPDROPTARGET pDropTarget) +{ + FIXME("(%p,%p):stub.\n", hWnd, pDropTarget); + return RegisterDragDrop(hWnd, pDropTarget); +} + +/************************************************************************* + * SHRevokeDragDrop [SHELL32.87] + * + * Probably equivalent to RevokeDragDrop but under Windows 9x it could use the + * shell32 built-in "mini-COM" without the need to load ole32.dll - see SHLoadOLE + * for details. Function removed from Windows Vista. + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * RevokeDragDrop, SHLoadOLE + */ +HRESULT WINAPI SHRevokeDragDrop(HWND hWnd) +{ + FIXME("(%p):stub.\n",hWnd); + return RevokeDragDrop(hWnd); +} + +/************************************************************************* + * SHDoDragDrop [SHELL32.88] + * + * Probably equivalent to DoDragDrop but under Windows 9x it could use the + * shell32 built-in "mini-COM" without the need to load ole32.dll - see SHLoadOLE + * for details + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * DoDragDrop, SHLoadOLE + */ +HRESULT WINAPI SHDoDragDrop( + HWND hWnd, + LPDATAOBJECT lpDataObject, + LPDROPSOURCE lpDropSource, + DWORD dwOKEffect, + LPDWORD pdwEffect) +{ + FIXME("(%p %p %p 0x%08x %p):stub.\n", + hWnd, lpDataObject, lpDropSource, dwOKEffect, pdwEffect); + return DoDragDrop(lpDataObject, lpDropSource, dwOKEffect, pdwEffect); +} + +/************************************************************************* + * ArrangeWindows [SHELL32.184] + * + */ +WORD WINAPI ArrangeWindows( + HWND hwndParent, + DWORD dwReserved, + LPCRECT lpRect, + WORD cKids, + CONST HWND * lpKids) +{ + /* Unimplemented in WinXP SP3 */ + TRACE("(%p 0x%08x %p 0x%04x %p):stub.\n", + hwndParent, dwReserved, lpRect, cKids, lpKids); + return 0; +} + +/************************************************************************* + * SignalFileOpen [SHELL32.103] + * + * NOTES + * exported by ordinal + */ +EXTERN_C BOOL WINAPI +SignalFileOpen (LPCITEMIDLIST pidl) +{ + FIXME("(0x%08x):stub.\n", pidl); + + return 0; +} + +/************************************************************************* + * SHADD_get_policy - helper function for SHAddToRecentDocs + * + * PARAMETERS + * policy [IN] policy name (null termed string) to find + * type [OUT] ptr to DWORD to receive type + * buffer [OUT] ptr to area to hold data retrieved + * len [IN/OUT] ptr to DWORD holding size of buffer and getting + * length filled + * + * RETURNS + * result of the SHQueryValueEx call + */ +static INT SHADD_get_policy(LPCSTR policy, LPDWORD type, LPVOID buffer, LPDWORD len) +{ + HKEY Policy_basekey; + INT ret; + + /* Get the key for the policies location in the registry + */ + if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", + 0, KEY_READ, &Policy_basekey)) { + + if (RegOpenKeyExA(HKEY_CURRENT_USER, + "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", + 0, KEY_READ, &Policy_basekey)) { + TRACE("No Explorer Policies location exists. Policy wanted=%s\n", + policy); + *len = 0; + return ERROR_FILE_NOT_FOUND; + } + } + + /* Retrieve the data if it exists + */ + ret = SHQueryValueExA(Policy_basekey, policy, 0, type, buffer, len); + RegCloseKey(Policy_basekey); + return ret; +} + + +/************************************************************************* + * SHADD_compare_mru - helper function for SHAddToRecentDocs + * + * PARAMETERS + * data1 [IN] data being looked for + * data2 [IN] data in MRU + * cbdata [IN] length from FindMRUData call (not used) + * + * RETURNS + * position within MRU list that data was added. + */ +static INT CALLBACK SHADD_compare_mru(LPCVOID data1, LPCVOID data2, DWORD cbData) +{ + return lstrcmpiA((LPCSTR)data1, (LPCSTR)data2); +} + +/************************************************************************* + * SHADD_create_add_mru_data - helper function for SHAddToRecentDocs + * + * PARAMETERS + * mruhandle [IN] handle for created MRU list + * doc_name [IN] null termed pure doc name + * new_lnk_name [IN] null termed path and file name for .lnk file + * buffer [IN/OUT] 2048 byte area to construct MRU data + * len [OUT] ptr to int to receive space used in buffer + * + * RETURNS + * position within MRU list that data was added. + */ +static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPCSTR doc_name, LPCSTR new_lnk_name, + LPSTR buffer, INT *len) +{ + LPSTR ptr; + INT wlen; + + /*FIXME: Document: + * RecentDocs MRU data structure seems to be: + * +0h document file name w/ terminating 0h + * +nh short int w/ size of remaining + * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown + * +n+4h 10 bytes zeros - unknown + * +n+eh shortcut file name w/ terminating 0h + * +n+e+nh 3 zero bytes - unknown + */ + + /* Create the MRU data structure for "RecentDocs" + */ + ptr = buffer; + lstrcpyA(ptr, doc_name); + ptr += (lstrlenA(buffer) + 1); + wlen= lstrlenA(new_lnk_name) + 1 + 12; + *((short int*)ptr) = wlen; + ptr += 2; /* step past the length */ + *(ptr++) = 0x30; /* unknown reason */ + *(ptr++) = 0; /* unknown, but can be 0x00, 0x01, 0x02 */ + memset(ptr, 0, 10); + ptr += 10; + lstrcpyA(ptr, new_lnk_name); + ptr += (lstrlenA(new_lnk_name) + 1); + memset(ptr, 0, 3); + ptr += 3; + *len = ptr - buffer; + + /* Add the new entry into the MRU list + */ + return AddMRUData(mruhandle, buffer, *len); +} + +/************************************************************************* + * SHAddToRecentDocs [SHELL32.@] + * + * Modify (add/clear) Shell's list of recently used documents. + * + * PARAMETERS + * uFlags [IN] SHARD_PATHA, SHARD_PATHW or SHARD_PIDL + * pv [IN] string or pidl, NULL clears the list + * + * NOTES + * exported by name + * + * FIXME + * convert to unicode + */ +void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) +{ +/* If list is a string list lpfnCompare has the following prototype + * int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2) + * for binary lists the prototype is + * int CALLBACK MRUCompareBinary(LPCVOID data1, LPCVOID data2, DWORD cbData) + * where cbData is the no. of bytes to compare. + * Need to check what return value means identical - 0? + */ + + + UINT olderrormode; + HKEY HCUbasekey; + CHAR doc_name[MAX_PATH]; + CHAR link_dir[MAX_PATH]; + CHAR new_lnk_filepath[MAX_PATH]; + CHAR new_lnk_name[MAX_PATH]; + CComPtr ppM; + LPITEMIDLIST pidl; + HWND hwnd = 0; /* FIXME: get real window handle */ + INT ret; + DWORD data[64], datalen, type; + + TRACE("%04x %p\n", uFlags, pv); + + /*FIXME: Document: + * RecentDocs MRU data structure seems to be: + * +0h document file name w/ terminating 0h + * +nh short int w/ size of remaining + * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown + * +n+4h 10 bytes zeros - unknown + * +n+eh shortcut file name w/ terminating 0h + * +n+e+nh 3 zero bytes - unknown + */ + + /* See if we need to do anything. + */ + datalen = 64; + ret=SHADD_get_policy( "NoRecentDocsHistory", &type, data, &datalen); + if ((ret > 0) && (ret != ERROR_FILE_NOT_FOUND)) { + ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret); + return; + } + if (ret == ERROR_SUCCESS) { + if (!( (type == REG_DWORD) || + ((type == REG_BINARY) && (datalen == 4)) )) { + ERR("Error policy data for \"NoRecentDocsHistory\" not formatted correctly, type=%d, len=%d\n", + type, datalen); + return; + } + + TRACE("policy value for NoRecentDocsHistory = %08x\n", data[0]); + /* now test the actual policy value */ + if ( data[0] != 0) + return; + } + + /* Open key to where the necessary info is + */ + /* FIXME: This should be done during DLL PROCESS_ATTACH (or THREAD_ATTACH) + * and the close should be done during the _DETACH. The resulting + * key is stored in the DLL global data. + */ + if (RegCreateKeyExA(HKEY_CURRENT_USER, + "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer", + 0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) { + ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n"); + return; + } + + /* Get path to user's "Recent" directory + */ + if(SUCCEEDED(SHGetMalloc(&ppM))) { + if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT, + &pidl))) { + SHGetPathFromIDListA(pidl, link_dir); + ppM->Free(pidl); + } + else { + /* serious issues */ + link_dir[0] = 0; + ERR("serious issues 1\n"); + } + } + else { + /* serious issues */ + link_dir[0] = 0; + ERR("serious issues 2\n"); + } + TRACE("Users Recent dir %s\n", link_dir); + + /* If no input, then go clear the lists */ + if (!pv) { + /* clear user's Recent dir + */ + + /* FIXME: delete all files in "link_dir" + * + * while( more files ) { + * lstrcpyA(old_lnk_name, link_dir); + * PathAppendA(old_lnk_name, filenam); + * DeleteFileA(old_lnk_name); + * } + */ + FIXME("should delete all files in %s\\\n", link_dir); + + /* clear MRU list + */ + /* MS Bug ?? v4.72.3612.1700 of shell32 does the delete against + * HKEY_LOCAL_MACHINE version of ...CurrentVersion\Explorer + * and naturally it fails w/ rc=2. It should do it against + * HKEY_CURRENT_USER which is where it is stored, and where + * the MRU routines expect it!!!! + */ + RegDeleteKeyA(HCUbasekey, "RecentDocs"); + RegCloseKey(HCUbasekey); + return; + } + + /* Have data to add, the jobs to be done: + * 1. Add document to MRU list in registry "HKCU\Software\ + * Microsoft\Windows\CurrentVersion\Explorer\RecentDocs". + * 2. Add shortcut to document in the user's Recent directory + * (CSIDL_RECENT). + * 3. Add shortcut to Start menu's Documents submenu. + */ + + /* Get the pure document name from the input + */ + switch (uFlags) + { + case SHARD_PIDL: + SHGetPathFromIDListA((LPCITEMIDLIST)pv, doc_name); + break; + + case SHARD_PATHA: + lstrcpynA(doc_name, (LPCSTR)pv, MAX_PATH); + break; + + case SHARD_PATHW: + WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)pv, -1, doc_name, MAX_PATH, NULL, NULL); + break; + + default: + FIXME("Unsupported flags: %u\n", uFlags); + return; + } + + TRACE("full document name %s\n", debugstr_a(doc_name)); + PathStripPathA(doc_name); + TRACE("stripped document name %s\n", debugstr_a(doc_name)); + + + /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */ + + { /* on input needs: + * doc_name - pure file-spec, no path + * link_dir - path to the user's Recent directory + * HCUbasekey - key of ...Windows\CurrentVersion\Explorer" node + * creates: + * new_lnk_name- pure file-spec, no path for new .lnk file + * new_lnk_filepath + * - path and file name of new .lnk file + */ + CREATEMRULISTA mymru; + HANDLE mruhandle; + INT len, pos, bufused, err; + INT i; + DWORD attr; + CHAR buffer[2048]; + CHAR *ptr; + CHAR old_lnk_name[MAX_PATH]; + short int slen; + + mymru.cbSize = sizeof(CREATEMRULISTA); + mymru.nMaxItems = 15; + mymru.dwFlags = MRUF_BINARY_LIST | MRUF_DELAYED_SAVE; + mymru.hKey = HCUbasekey; + mymru.lpszSubKey = "RecentDocs"; + mymru.lpfnCompare = (PROC)SHADD_compare_mru; + mruhandle = CreateMRUListA(&mymru); + if (!mruhandle) { + /* MRU failed */ + ERR("MRU processing failed, handle zero\n"); + RegCloseKey(HCUbasekey); + return; + } + len = lstrlenA(doc_name); + pos = FindMRUData(mruhandle, doc_name, len, 0); + + /* Now get the MRU entry that will be replaced + * and delete the .lnk file for it + */ + if ((bufused = EnumMRUListA(mruhandle, (pos == -1) ? 14 : pos, + buffer, 2048)) != -1) { + ptr = buffer; + ptr += (lstrlenA(buffer) + 1); + slen = *((short int*)ptr); + ptr += 2; /* skip the length area */ + if (bufused >= slen + (ptr-buffer)) { + /* buffer size looks good */ + ptr += 12; /* get to string */ + len = bufused - (ptr-buffer); /* get length of buf remaining */ + if ((lstrlenA(ptr) > 0) && (lstrlenA(ptr) <= len-1)) { + /* appears to be good string */ + lstrcpyA(old_lnk_name, link_dir); + PathAppendA(old_lnk_name, ptr); + if (!DeleteFileA(old_lnk_name)) { + if ((attr = GetFileAttributesA(old_lnk_name)) == INVALID_FILE_ATTRIBUTES) { + if ((err = GetLastError()) != ERROR_FILE_NOT_FOUND) { + ERR("Delete for %s failed, err=%d, attr=%08x\n", + old_lnk_name, err, attr); + } + else { + TRACE("old .lnk file %s did not exist\n", + old_lnk_name); + } + } + else { + ERR("Delete for %s failed, attr=%08x\n", + old_lnk_name, attr); + } + } + else { + TRACE("deleted old .lnk file %s\n", old_lnk_name); + } + } + } + } + + /* Create usable .lnk file name for the "Recent" directory + */ + wsprintfA(new_lnk_name, "%s.lnk", doc_name); + lstrcpyA(new_lnk_filepath, link_dir); + PathAppendA(new_lnk_filepath, new_lnk_name); + i = 1; + olderrormode = SetErrorMode(SEM_FAILCRITICALERRORS); + while (GetFileAttributesA(new_lnk_filepath) != INVALID_FILE_ATTRIBUTES) { + i++; + wsprintfA(new_lnk_name, "%s (%u).lnk", doc_name, i); + lstrcpyA(new_lnk_filepath, link_dir); + PathAppendA(new_lnk_filepath, new_lnk_name); + } + SetErrorMode(olderrormode); + TRACE("new shortcut will be %s\n", new_lnk_filepath); + + /* Now add the new MRU entry and data + */ + pos = SHADD_create_add_mru_data(mruhandle, doc_name, new_lnk_name, + buffer, &len); + FreeMRUList(mruhandle); + TRACE("Updated MRU list, new doc is position %d\n", pos); + } + + /* *** JOB 2: Create shortcut in user's "Recent" directory *** */ + + { /* on input needs: + * doc_name - pure file-spec, no path + * new_lnk_filepath + * - path and file name of new .lnk file + * uFlags[in] - flags on call to SHAddToRecentDocs + * pv[in] - document path/pidl on call to SHAddToRecentDocs + */ + CComPtr psl; + CComPtr pPf; + HRESULT hres; + CHAR desc[MAX_PATH]; + WCHAR widelink[MAX_PATH]; + + CoInitialize(0); + + hres = CoCreateInstance(CLSID_ShellLink, + NULL, + CLSCTX_INPROC_SERVER, + IID_IShellLinkA, + (void **)&psl); + if(SUCCEEDED(hres)) { + + hres = psl->QueryInterface(IID_IPersistFile, + (LPVOID *)&pPf); + if(FAILED(hres)) { + /* bombed */ + ERR("failed QueryInterface for IPersistFile %08x\n", hres); + goto fail; + } + + /* Set the document path or pidl */ + if (uFlags == SHARD_PIDL) { + hres = psl->SetIDList((LPCITEMIDLIST) pv); + } else { + hres = psl->SetPath((LPCSTR) pv); + } + if(FAILED(hres)) { + /* bombed */ + ERR("failed Set{IDList|Path} %08x\n", hres); + goto fail; + } + + lstrcpyA(desc, "Shortcut to "); + lstrcatA(desc, doc_name); + hres = psl->SetDescription(desc); + if(FAILED(hres)) { + /* bombed */ + ERR("failed SetDescription %08x\n", hres); + goto fail; + } + + MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1, + widelink, MAX_PATH); + /* create the short cut */ + hres = pPf->Save(widelink, TRUE); + if(FAILED(hres)) { + /* bombed */ + ERR("failed IPersistFile::Save %08x\n", hres); + goto fail; + } + hres = pPf->SaveCompleted(widelink); + TRACE("shortcut %s has been created, result=%08x\n", + new_lnk_filepath, hres); + } + else { + ERR("CoCreateInstance failed, hres=%08x\n", hres); + } + } + + fail: + CoUninitialize(); + + /* all done */ + RegCloseKey(HCUbasekey); + return; +} + +/************************************************************************* + * SHCreateShellFolderViewEx [SHELL32.174] + * + * Create a new instance of the default Shell folder view object. + * + * RETURNS + * Success: S_OK + * Failure: error value + * + * NOTES + * see IShellFolder::CreateViewObject + */ +HRESULT WINAPI SHCreateShellFolderViewEx( + LPCSFV psvcbi, /* [in] shelltemplate struct */ + IShellView **ppv) /* [out] IShellView pointer */ +{ + IShellView * psf; + HRESULT hRes; + + TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n", + psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback, + psvcbi->fvm, psvcbi->psvOuter); + + hRes = IShellView_Constructor(psvcbi->pshf, &psf); + if (FAILED(hRes)) + return hRes; + + if (!psf) + return E_OUTOFMEMORY; + + psf->AddRef(); + hRes = psf->QueryInterface(IID_IShellView, (LPVOID *)ppv); + psf->Release(); + + return hRes; +} +/************************************************************************* + * SHWinHelp [SHELL32.127] + * + */ +EXTERN_C HRESULT WINAPI SHWinHelp (DWORD v, DWORD w, DWORD x, DWORD z) +{ FIXME("0x%08x 0x%08x 0x%08x 0x%08x stub\n",v,w,x,z); + return 0; +} +/************************************************************************* + * SHRunControlPanel [SHELL32.161] + * + */ +EXTERN_C BOOL WINAPI SHRunControlPanel (LPCWSTR lpcszCmdLine, HWND hwndMsgParent) +{ + FIXME("0x%08x 0x%08x stub\n",lpcszCmdLine,hwndMsgParent); + return 0; +} + +static LPUNKNOWN SHELL32_IExplorerInterface=0; +/************************************************************************* + * SHSetInstanceExplorer [SHELL32.176] + * + * NOTES + * Sets the interface + */ +VOID WINAPI SHSetInstanceExplorer (LPUNKNOWN lpUnknown) +{ TRACE("%p\n", lpUnknown); + SHELL32_IExplorerInterface = lpUnknown; +} +/************************************************************************* + * SHGetInstanceExplorer [SHELL32.@] + * + * NOTES + * gets the interface pointer of the explorer and a reference + */ +HRESULT WINAPI SHGetInstanceExplorer (IUnknown **lpUnknown) +{ TRACE("%p\n", lpUnknown); + + *lpUnknown = SHELL32_IExplorerInterface; + + if (!SHELL32_IExplorerInterface) + return E_FAIL; + + SHELL32_IExplorerInterface->AddRef(); + return NOERROR; +} +/************************************************************************* + * SHFreeUnusedLibraries [SHELL32.123] + * + * Probably equivalent to CoFreeUnusedLibraries but under Windows 9x it could use + * the shell32 built-in "mini-COM" without the need to load ole32.dll - see SHLoadOLE + * for details + * + * NOTES + * exported by ordinal + * + * SEE ALSO + * CoFreeUnusedLibraries, SHLoadOLE + */ +void WINAPI SHFreeUnusedLibraries (void) +{ + FIXME("stub\n"); + CoFreeUnusedLibraries(); +} +/************************************************************************* + * DAD_AutoScroll [SHELL32.129] + * + */ +BOOL WINAPI DAD_AutoScroll(HWND hwnd, AUTO_SCROLL_DATA *samples, const POINT * pt) +{ + FIXME("hwnd = %p %p %p\n",hwnd,samples,pt); + return 0; +} +/************************************************************************* + * DAD_DragEnter [SHELL32.130] + * + */ +BOOL WINAPI DAD_DragEnter(HWND hwnd) +{ + FIXME("hwnd = %p\n",hwnd); + return FALSE; +} +/************************************************************************* + * DAD_DragEnterEx [SHELL32.131] + * + */ +BOOL WINAPI DAD_DragEnterEx(HWND hwnd, POINT p) +{ + FIXME("hwnd = %p (%d,%d)\n",hwnd,p.x,p.y); + return FALSE; +} +/************************************************************************* + * DAD_DragMove [SHELL32.134] + * + */ +BOOL WINAPI DAD_DragMove(POINT p) +{ + FIXME("(%d,%d)\n",p.x,p.y); + return FALSE; +} +/************************************************************************* + * DAD_DragLeave [SHELL32.132] + * + */ +BOOL WINAPI DAD_DragLeave(VOID) +{ + FIXME("\n"); + return FALSE; +} +/************************************************************************* + * DAD_SetDragImage [SHELL32.136] + * + * NOTES + * exported by name + */ +BOOL WINAPI DAD_SetDragImage( + HIMAGELIST himlTrack, + LPPOINT lppt) +{ + FIXME("%p %p stub\n",himlTrack, lppt); + return 0; +} +/************************************************************************* + * DAD_ShowDragImage [SHELL32.137] + * + * NOTES + * exported by name + */ +BOOL WINAPI DAD_ShowDragImage(BOOL bShow) +{ + FIXME("0x%08x stub\n",bShow); + return 0; +} + +static const WCHAR szwCabLocation[] = { + 'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'E','x','p','l','o','r','e','r','\\', + 'C','a','b','i','n','e','t','S','t','a','t','e',0 +}; + +static const WCHAR szwSettings[] = { 'S','e','t','t','i','n','g','s',0 }; + +/************************************************************************* + * ReadCabinetState [SHELL32.651] NT 4.0 + * + */ +BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length) +{ + HKEY hkey = 0; + DWORD type, r; + + TRACE("%p %d\n", cs, length); + + if( (cs == NULL) || (length < (int)sizeof(*cs)) ) + return FALSE; + + r = RegOpenKeyW( HKEY_CURRENT_USER, szwCabLocation, &hkey ); + if( r == ERROR_SUCCESS ) + { + type = REG_BINARY; + r = RegQueryValueExW( hkey, szwSettings, + NULL, &type, (LPBYTE)cs, (LPDWORD)&length ); + RegCloseKey( hkey ); + + } + + /* if we can't read from the registry, create default values */ + if ( (r != ERROR_SUCCESS) || (cs->cLength < sizeof(*cs)) || + (cs->cLength != length) ) + { + ERR("Initializing shell cabinet settings\n"); + memset(cs, 0, sizeof(*cs)); + cs->cLength = sizeof(*cs); + cs->nVersion = 2; + cs->fFullPathTitle = FALSE; + cs->fSaveLocalView = TRUE; + cs->fNotShell = FALSE; + cs->fSimpleDefault = TRUE; + cs->fDontShowDescBar = FALSE; + cs->fNewWindowMode = FALSE; + cs->fShowCompColor = FALSE; + cs->fDontPrettyNames = FALSE; + cs->fAdminsCreateCommonGroups = TRUE; + cs->fMenuEnumFilter = 96; + } + + return TRUE; +} + +/************************************************************************* + * WriteCabinetState [SHELL32.652] NT 4.0 + * + */ +BOOL WINAPI WriteCabinetState(CABINETSTATE *cs) +{ + DWORD r; + HKEY hkey = 0; + + TRACE("%p\n",cs); + + if( cs == NULL ) + return FALSE; + + r = RegCreateKeyExW( HKEY_CURRENT_USER, szwCabLocation, 0, + NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); + if( r == ERROR_SUCCESS ) + { + r = RegSetValueExW( hkey, szwSettings, 0, + REG_BINARY, (LPBYTE) cs, cs->cLength); + + RegCloseKey( hkey ); + } + + return (r==ERROR_SUCCESS); +} + +/************************************************************************* + * FileIconInit [SHELL32.660] + * + */ +BOOL WINAPI FileIconInit(BOOL bFullInit) +{ FIXME("(%s)\n", bFullInit ? "true" : "false"); + return 0; +} + +/************************************************************************* + * IsUserAnAdmin [SHELL32.680] NT 4.0 + * + * Checks whether the current user is a member of the Administrators group. + * + * PARAMS + * None + * + * RETURNS + * Success: TRUE + * Failure: FALSE + */ +BOOL WINAPI IsUserAnAdmin(VOID) +{ + SID_IDENTIFIER_AUTHORITY Authority = {SECURITY_NT_AUTHORITY}; + HANDLE hToken; + DWORD dwSize; + PTOKEN_GROUPS lpGroups; + PSID lpSid; + DWORD i; + BOOL bResult = FALSE; + + TRACE("\n"); + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) + { + return FALSE; + } + + if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &dwSize)) + { + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + { + CloseHandle(hToken); + return FALSE; + } + } + + lpGroups = (PTOKEN_GROUPS)HeapAlloc(GetProcessHeap(), 0, dwSize); + if (lpGroups == NULL) + { + CloseHandle(hToken); + return FALSE; + } + + if (!GetTokenInformation(hToken, TokenGroups, lpGroups, dwSize, &dwSize)) + { + HeapFree(GetProcessHeap(), 0, lpGroups); + CloseHandle(hToken); + return FALSE; + } + + CloseHandle(hToken); + + if (!AllocateAndInitializeSid(&Authority, 2, SECURITY_BUILTIN_DOMAIN_RID, + DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, + &lpSid)) + { + HeapFree(GetProcessHeap(), 0, lpGroups); + return FALSE; + } + + for (i = 0; i < lpGroups->GroupCount; i++) + { + if (EqualSid(lpSid, lpGroups->Groups[i].Sid)) + { + bResult = TRUE; + break; + } + } + + FreeSid(lpSid); + HeapFree(GetProcessHeap(), 0, lpGroups); + return bResult; +} + +/************************************************************************* + * SHAllocShared [SHELL32.520] + * + * See shlwapi.SHAllocShared + */ +HANDLE WINAPI SHAllocShared(LPVOID lpvData, DWORD dwSize, DWORD dwProcId) +{ + typedef HANDLE (WINAPI *SHAllocSharedProc)(LPCVOID, DWORD, DWORD); + static SHAllocSharedProc pSHAllocShared; + + GET_FUNC(pSHAllocShared, SHAllocSharedProc, shlwapi, (char*)7, NULL); + return pSHAllocShared(lpvData, dwSize, dwProcId); +} + +/************************************************************************* + * SHLockShared [SHELL32.521] + * + * See shlwapi.SHLockShared + */ +LPVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId) +{ + typedef HANDLE (WINAPI *SHLockSharedProc)(HANDLE, DWORD); + static SHLockSharedProc pSHLockShared; + + GET_FUNC(pSHLockShared, SHLockSharedProc, shlwapi, (char*)8, NULL); + return pSHLockShared(hShared, dwProcId); +} + +/************************************************************************* + * SHUnlockShared [SHELL32.522] + * + * See shlwapi.SHUnlockShared + */ +BOOL WINAPI SHUnlockShared(LPVOID lpView) +{ + typedef HANDLE (WINAPI *SHUnlockSharedProc)(LPCVOID); + static SHUnlockSharedProc pSHUnlockShared; + + GET_FUNC(pSHUnlockShared, SHUnlockSharedProc, shlwapi, (char*)9, FALSE); + return pSHUnlockShared(lpView) != NULL; +} + +/************************************************************************* + * SHFreeShared [SHELL32.523] + * + * See shlwapi.SHFreeShared + */ +BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId) +{ + typedef HANDLE (WINAPI *SHFreeSharedProc)(HANDLE, DWORD); + static SHFreeSharedProc pSHFreeShared; + + GET_FUNC(pSHFreeShared, SHFreeSharedProc, shlwapi, (char*)10, FALSE); + return pSHFreeShared(hShared, dwProcId) != NULL; +} + +/************************************************************************* + * SetAppStartingCursor [SHELL32.99] + */ +EXTERN_C HRESULT WINAPI SetAppStartingCursor(HWND u, DWORD v) +{ FIXME("hwnd=%p 0x%04x stub\n",u,v ); + return 0; +} + +/************************************************************************* + * SHLoadOLE [SHELL32.151] + * + * To reduce the memory usage of Windows 95, its shell32 contained an + * internal implementation of a part of COM (see e.g. SHGetMalloc, SHCoCreateInstance, + * SHRegisterDragDrop etc.) that allowed to use in-process STA objects without + * the need to load OLE32.DLL. If OLE32.DLL was already loaded, the SH* function + * would just call the Co* functions. + * + * The SHLoadOLE was called when OLE32.DLL was being loaded to transfer all the + * information from the shell32 "mini-COM" to ole32.dll. + * + * See http://blogs.msdn.com/oldnewthing/archive/2004/07/05/173226.aspx for a + * detailed description. + * + * Under wine ole32.dll is always loaded as it is imported by shlwapi.dll which is + * imported by shell32 and no "mini-COM" is used (except for the "LoadWithoutCOM" + * hack in SHCoCreateInstance) + */ +HRESULT WINAPI SHLoadOLE(LPARAM lParam) +{ FIXME("0x%08lx stub\n",lParam); + return S_OK; +} +/************************************************************************* + * DriveType [SHELL32.64] + * + */ +EXTERN_C int WINAPI DriveType(int DriveType) +{ + WCHAR root[] = L"A:\\"; + root[0] = L'A' + DriveType; + return GetDriveTypeW(root); +} + +/************************************************************************* + * InvalidateDriveType [SHELL32.65] + * Unimplemented in XP SP3 + */ +EXTERN_C int WINAPI InvalidateDriveType(int u) +{ + TRACE("0x%08x stub\n",u); + return 0; +} + +/************************************************************************* + * SHAbortInvokeCommand [SHELL32.198] + * + */ +EXTERN_C HRESULT WINAPI SHAbortInvokeCommand(void) +{ FIXME("stub\n"); + return 1; +} + +/************************************************************************* + * SHOutOfMemoryMessageBox [SHELL32.126] + * + */ +int WINAPI SHOutOfMemoryMessageBox( + HWND hwndOwner, + LPCSTR lpCaption, + UINT uType) +{ + FIXME("%p %s 0x%08x stub\n",hwndOwner, lpCaption, uType); + return 0; +} + +/************************************************************************* + * SHFlushClipboard [SHELL32.121] + * + */ +EXTERN_C HRESULT WINAPI SHFlushClipboard(void) +{ + return OleFlushClipboard(); +} + +/************************************************************************* + * SHWaitForFileToOpen [SHELL32.97] + * + */ +BOOL WINAPI SHWaitForFileToOpen( + LPCITEMIDLIST pidl, + DWORD dwFlags, + DWORD dwTimeout) +{ + FIXME("%p 0x%08x 0x%08x stub\n", pidl, dwFlags, dwTimeout); + return 0; +} + +/************************************************************************ + * RLBuildListOfPaths [SHELL32.146] + * + * NOTES + * builds a DPA + */ +EXTERN_C DWORD WINAPI RLBuildListOfPaths (void) +{ FIXME("stub\n"); + return 0; +} + +/************************************************************************ + * SHValidateUNC [SHELL32.173] + * + */ +EXTERN_C BOOL WINAPI SHValidateUNC (HWND hwndOwner, LPWSTR pszFile, UINT fConnect) +{ + FIXME("0x%08x 0x%08x 0x%08x stub\n",hwndOwner,pszFile,fConnect); + return 0; +} + +/************************************************************************ + * DoEnvironmentSubstA [SHELL32.@] + * + * Replace %KEYWORD% in the str with the value of variable KEYWORD + * from environment. If it is not found the %KEYWORD% is left + * intact. If the buffer is too small, str is not modified. + * + * PARAMS + * pszString [I] '\0' terminated string with %keyword%. + * [O] '\0' terminated string with %keyword% substituted. + * cchString [I] size of str. + * + * RETURNS + * cchString length in the HIWORD; + * TRUE in LOWORD if subst was successful and FALSE in other case + */ +EXTERN_C DWORD WINAPI DoEnvironmentSubstA(LPSTR pszString, UINT cchString) +{ + LPSTR dst; + BOOL res = FALSE; + FIXME("(%s, %d) stub\n", debugstr_a(pszString), cchString); + if (pszString == NULL) /* Really return 0? */ + return 0; + if ((dst = (LPSTR)HeapAlloc(GetProcessHeap(), 0, cchString * sizeof(CHAR)))) + { + DWORD num = ExpandEnvironmentStringsA(pszString, dst, cchString); + if (num && num < cchString) /* dest buffer is too small */ + { + res = TRUE; + memcpy(pszString, dst, num); + } + HeapFree(GetProcessHeap(), 0, dst); + } + return MAKELONG(res,cchString); /* Always cchString? */ +} + +/************************************************************************ + * DoEnvironmentSubstW [SHELL32.@] + * + * See DoEnvironmentSubstA. + */ +EXTERN_C DWORD WINAPI DoEnvironmentSubstW(LPWSTR pszString, UINT cchString) +{ + LPWSTR dst; + BOOL res = FALSE; + FIXME("(%s, %d): stub\n", debugstr_w(pszString), cchString); + if ((dst = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, cchString * sizeof(WCHAR)))) + { + DWORD num = ExpandEnvironmentStringsW(pszString, dst, cchString); + if (num) + { + res = TRUE; + wcscpy(pszString, dst); + } + HeapFree(GetProcessHeap(), 0, dst); + } + + return MAKELONG(res,cchString); +} + +/************************************************************************ + * DoEnvironmentSubst [SHELL32.53] + * + * See DoEnvironmentSubstA. + */ +DWORD WINAPI DoEnvironmentSubstAW(LPVOID x, UINT y) +{ + if (SHELL_OsIsUnicode()) + return DoEnvironmentSubstW((LPWSTR)x, y); + return DoEnvironmentSubstA((LPSTR)x, y); +} + +/************************************************************************* + * GUIDFromStringA [SHELL32.703] + */ +BOOL WINAPI GUIDFromStringA(LPCSTR str, LPGUID guid) +{ + TRACE("GUIDFromStringA() stub\n"); + return FALSE; +} + +/************************************************************************* + * GUIDFromStringW [SHELL32.704] + */ +BOOL WINAPI GUIDFromStringW(LPCWSTR str, LPGUID guid) +{ + UNICODE_STRING guid_str; + + RtlInitUnicodeString(&guid_str, str); + return !RtlGUIDFromString(&guid_str, guid); +} + +/************************************************************************* + * PathIsTemporaryW [SHELL32.714] + */ +EXTERN_C BOOL WINAPI PathIsTemporaryW(LPWSTR Str) +{ + FIXME("(%s)stub\n", debugstr_w(Str)); + return FALSE; +} + +/************************************************************************* + * PathIsTemporaryA [SHELL32.713] + */ +EXTERN_C BOOL WINAPI PathIsTemporaryA(LPSTR Str) +{ + FIXME("(%s)stub\n", debugstr_a(Str)); + return FALSE; +} + +typedef struct _PSXA +{ + UINT uiCount; + UINT uiAllocated; + IShellPropSheetExt *pspsx[0]; +} PSXA, *PPSXA; + +typedef struct _PSXA_CALL +{ + LPFNADDPROPSHEETPAGE lpfnAddReplaceWith; + LPARAM lParam; + BOOL bCalled; + BOOL bMultiple; + UINT uiCount; +} PSXA_CALL, *PPSXA_CALL; + +static BOOL CALLBACK PsxaCall(HPROPSHEETPAGE hpage, LPARAM lParam) +{ + PPSXA_CALL Call = (PPSXA_CALL)lParam; + + if (Call != NULL) + { + if ((Call->bMultiple || !Call->bCalled) && + Call->lpfnAddReplaceWith(hpage, Call->lParam)) + { + Call->bCalled = TRUE; + Call->uiCount++; + return TRUE; + } + } + + return FALSE; +} + +/************************************************************************* + * SHAddFromPropSheetExtArray [SHELL32.167] + */ +UINT WINAPI SHAddFromPropSheetExtArray(HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam) +{ + PSXA_CALL Call; + UINT i; + PPSXA psxa = (PPSXA)hpsxa; + + TRACE("(%p,%p,%08lx)\n", hpsxa, lpfnAddPage, lParam); + + if (psxa) + { + ZeroMemory(&Call, sizeof(Call)); + Call.lpfnAddReplaceWith = lpfnAddPage; + Call.lParam = lParam; + Call.bMultiple = TRUE; + + /* Call the AddPage method of all registered IShellPropSheetExt interfaces */ + for (i = 0; i != psxa->uiCount; i++) + { + psxa->pspsx[i]->AddPages(PsxaCall, (LPARAM)&Call); + } + + return Call.uiCount; + } + + return 0; +} + +/************************************************************************* + * SHCreatePropSheetExtArray [SHELL32.168] + */ +HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface) +{ + return SHCreatePropSheetExtArrayEx(hKey, pszSubKey, max_iface, NULL); +} + + +/************************************************************************* + * SHCreatePropSheetExtArrayEx [SHELL32.194] + */ +EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj) +{ + static const WCHAR szPropSheetSubKey[] = {'s','h','e','l','l','e','x','\\','P','r','o','p','e','r','t','y','S','h','e','e','t','H','a','n','d','l','e','r','s',0}; + WCHAR szHandler[64]; + DWORD dwHandlerLen; + WCHAR szClsidHandler[39]; + DWORD dwClsidSize; + CLSID clsid; + LONG lRet; + DWORD dwIndex; + HKEY hkBase, hkPropSheetHandlers; + PPSXA psxa = NULL; + HRESULT hr; + + TRACE("(%p,%s,%u)\n", hKey, debugstr_w(pszSubKey), max_iface); + + if (max_iface == 0) + return NULL; + + /* Open the registry key */ + lRet = RegOpenKeyW(hKey, pszSubKey, &hkBase); + if (lRet != ERROR_SUCCESS) + return NULL; + + lRet = RegOpenKeyExW(hkBase, szPropSheetSubKey, 0, KEY_ENUMERATE_SUB_KEYS, &hkPropSheetHandlers); + RegCloseKey(hkBase); + if (lRet == ERROR_SUCCESS) + { + /* Create and initialize the Property Sheet Extensions Array */ + psxa = (PPSXA)LocalAlloc(LMEM_FIXED | LMEM_ZEROINIT, sizeof(PSXA) + max_iface * sizeof(IShellPropSheetExt *)); + if (psxa) + { + psxa->uiAllocated = max_iface; + + /* Enumerate all subkeys and attempt to load the shell extensions */ + dwIndex = 0; + do + { + dwHandlerLen = sizeof(szHandler) / sizeof(szHandler[0]); + lRet = RegEnumKeyExW(hkPropSheetHandlers, dwIndex++, szHandler, &dwHandlerLen, NULL, NULL, NULL, NULL); + if (lRet != ERROR_SUCCESS) + { + if (lRet == ERROR_MORE_DATA) + continue; + + if (lRet == ERROR_NO_MORE_ITEMS) + lRet = ERROR_SUCCESS; + break; + } + szHandler[(sizeof(szHandler) / sizeof(szHandler[0])) - 1] = 0; + hr = CLSIDFromString(szHandler, &clsid); + if (FAILED(hr)) + { + dwClsidSize = sizeof(szClsidHandler); + if (SHGetValueW(hkPropSheetHandlers, szHandler, NULL, NULL, szClsidHandler, &dwClsidSize) == ERROR_SUCCESS) + { + szClsidHandler[(sizeof(szClsidHandler) / sizeof(szClsidHandler[0])) - 1] = 0; + hr = CLSIDFromString(szClsidHandler, &clsid); + } + } + if (SUCCEEDED(hr)) + { + CComPtr psxi; + CComPtr pspsx; + + /* Attempt to get an IShellPropSheetExt and an IShellExtInit instance. + Only if both interfaces are supported it's a real shell extension. + Then call IShellExtInit's Initialize method. */ + if (SUCCEEDED(CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER/* | CLSCTX_NO_CODE_DOWNLOAD */, IID_IShellPropSheetExt, (LPVOID *)&pspsx))) + { + if (SUCCEEDED(pspsx->QueryInterface(IID_IShellExtInit, (PVOID *)&psxi))) + { + if (SUCCEEDED(psxi->Initialize(NULL, pDataObj, hKey))) + { + /* Add the IShellPropSheetExt instance to the array */ + psxa->pspsx[psxa->uiCount++] = pspsx.Detach(); + } + } + } + } + } while (psxa->uiCount != psxa->uiAllocated); + } + else + lRet = ERROR_NOT_ENOUGH_MEMORY; + + RegCloseKey(hkPropSheetHandlers); + } + + if (lRet != ERROR_SUCCESS && psxa) + { + SHDestroyPropSheetExtArray((HPSXA)psxa); + psxa = NULL; + } + + return (HPSXA)psxa; +} + +/************************************************************************* + * SHReplaceFromPropSheetExtArray [SHELL32.170] + */ +UINT WINAPI SHReplaceFromPropSheetExtArray(HPSXA hpsxa, UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam) +{ + PSXA_CALL Call; + UINT i; + PPSXA psxa = (PPSXA)hpsxa; + + TRACE("(%p,%u,%p,%08lx)\n", hpsxa, uPageID, lpfnReplaceWith, lParam); + + if (psxa) + { + ZeroMemory(&Call, sizeof(Call)); + Call.lpfnAddReplaceWith = lpfnReplaceWith; + Call.lParam = lParam; + + /* Call the ReplacePage method of all registered IShellPropSheetExt interfaces. + Each shell extension is only allowed to call the callback once during the callback. */ + for (i = 0; i != psxa->uiCount; i++) + { + Call.bCalled = FALSE; + psxa->pspsx[i]->ReplacePage(uPageID, PsxaCall, (LPARAM)&Call); + } + + return Call.uiCount; + } + + return 0; +} + +/************************************************************************* + * SHDestroyPropSheetExtArray [SHELL32.169] + */ +void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa) +{ + UINT i; + PPSXA psxa = (PPSXA)hpsxa; + + TRACE("(%p)\n", hpsxa); + + if (psxa) + { + for (i = 0; i != psxa->uiCount; i++) + { + psxa->pspsx[i]->Release(); + } + + LocalFree((HLOCAL)psxa); + } +} + +/************************************************************************* + * CIDLData_CreateFromIDArray [SHELL32.83] + * + * Create IDataObject from PIDLs?? + */ +HRESULT WINAPI CIDLData_CreateFromIDArray( + LPCITEMIDLIST pidlFolder, + UINT cpidlFiles, + LPCITEMIDLIST *lppidlFiles, + IDataObject **ppdataObject) +{ + UINT i; + HWND hwnd = 0; /*FIXME: who should be hwnd of owner? set to desktop */ + HRESULT hResult; + + TRACE("(%p, %d, %p, %p)\n", pidlFolder, cpidlFiles, lppidlFiles, ppdataObject); + if (TRACE_ON(pidl)) + { + pdump (pidlFolder); + for (i = 0; i < cpidlFiles; i++) + pdump(lppidlFiles[i]); + } + hResult = IDataObject_Constructor(hwnd, pidlFolder, lppidlFiles, cpidlFiles, ppdataObject); + return hResult; +} + +/************************************************************************* + * SHCreateStdEnumFmtEtc [SHELL32.74] + * + * NOTES + * + */ +HRESULT WINAPI SHCreateStdEnumFmtEtc( + UINT cFormats, + const FORMATETC *lpFormats, + LPENUMFORMATETC *ppenumFormatetc) +{ + IEnumFORMATETC *pef; + HRESULT hRes; + TRACE("cf=%d fe=%p pef=%p\n", cFormats, lpFormats, ppenumFormatetc); + + hRes = IEnumFORMATETC_Constructor(cFormats, lpFormats, &pef); + if (FAILED(hRes)) + return hRes; + + pef->AddRef(); + hRes = pef->QueryInterface(IID_IEnumFORMATETC, (LPVOID*)ppenumFormatetc); + pef->Release(); + + return hRes; +} + + +/************************************************************************* + * SHCreateShellFolderView (SHELL32.256) + */ +HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv) +{ + HRESULT ret = S_OK; + + FIXME("SHCreateShellFolderView() stub\n"); + + if (!pcsfv || sizeof(*pcsfv) != pcsfv->cbSize) + ret = E_INVALIDARG; + else + { + LPVOID lpdata = 0;/*LocalAlloc(LMEM_ZEROINIT, 0x4E4);*/ + + if (!lpdata) + ret = E_OUTOFMEMORY; + else + { + /* Initialize and return unknown lpdata structure */ + } + } + + return ret; +} + +/************************************************************************* + * SHFindFiles (SHELL32.90) + */ +BOOL WINAPI SHFindFiles( LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlSaveFile ) +{ + FIXME("%p %p\n", pidlFolder, pidlSaveFile ); + return FALSE; +} + +/************************************************************************* + * SHUpdateImageW (SHELL32.192) + * + * Notifies the shell that an icon in the system image list has been changed. + * + * PARAMS + * pszHashItem [I] Path to file that contains the icon. + * iIndex [I] Zero-based index of the icon in the file. + * uFlags [I] Flags determining the icon attributes. See notes. + * iImageIndex [I] Index of the icon in the system image list. + * + * RETURNS + * Nothing + * + * NOTES + * uFlags can be one or more of the following flags: + * GIL_NOTFILENAME - pszHashItem is not a file name. + * GIL_SIMULATEDOC - Create a document icon using the specified icon. + */ +void WINAPI SHUpdateImageW(LPCWSTR pszHashItem, int iIndex, UINT uFlags, int iImageIndex) +{ + FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_w(pszHashItem), iIndex, uFlags, iImageIndex); +} + +/************************************************************************* + * SHUpdateImageA (SHELL32.191) + * + * See SHUpdateImageW. + */ +VOID WINAPI SHUpdateImageA(LPCSTR pszHashItem, INT iIndex, UINT uFlags, INT iImageIndex) +{ + FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_a(pszHashItem), iIndex, uFlags, iImageIndex); +} + +INT WINAPI SHHandleUpdateImage(LPCITEMIDLIST pidlExtra) +{ + FIXME("%p - stub\n", pidlExtra); + + return -1; +} + +BOOL WINAPI SHObjectProperties(HWND hwnd, DWORD dwType, LPCWSTR szObject, LPCWSTR szPage) +{ + FIXME("%p, 0x%08x, %s, %s - stub\n", hwnd, dwType, debugstr_w(szObject), debugstr_w(szPage)); + + return TRUE; +} + +BOOL WINAPI SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, + UINT uFlags) +{ + WCHAR wszLinkTo[MAX_PATH]; + WCHAR wszDir[MAX_PATH]; + WCHAR wszName[MAX_PATH]; + BOOL res; + + MultiByteToWideChar(CP_ACP, 0, pszLinkTo, -1, wszLinkTo, MAX_PATH); + MultiByteToWideChar(CP_ACP, 0, pszDir, -1, wszDir, MAX_PATH); + + res = SHGetNewLinkInfoW(wszLinkTo, wszDir, wszName, pfMustCopy, uFlags); + + if (res) + WideCharToMultiByte(CP_ACP, 0, wszName, -1, pszName, MAX_PATH, NULL, NULL); + + return res; +} + +BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, + UINT uFlags) +{ + const WCHAR *basename; + WCHAR *dst_basename; + int i=2; + static const WCHAR lnkformat[] = {'%','s','.','l','n','k',0}; + static const WCHAR lnkformatnum[] = {'%','s',' ','(','%','d',')','.','l','n','k',0}; + + TRACE("(%s, %s, %p, %p, 0x%08x)\n", debugstr_w(pszLinkTo), debugstr_w(pszDir), + pszName, pfMustCopy, uFlags); + + *pfMustCopy = FALSE; + + if (uFlags & SHGNLI_PIDL) + { + FIXME("SHGNLI_PIDL flag unsupported\n"); + return FALSE; + } + + if (uFlags) + FIXME("ignoring flags: 0x%08x\n", uFlags); + + /* FIXME: should test if the file is a shortcut or DOS program */ + if (GetFileAttributesW(pszLinkTo) == INVALID_FILE_ATTRIBUTES) + return FALSE; + + basename = strrchrW(pszLinkTo, '\\'); + if (basename) + basename = basename+1; + else + basename = pszLinkTo; + + lstrcpynW(pszName, pszDir, MAX_PATH); + if (!PathAddBackslashW(pszName)) + return FALSE; + + dst_basename = pszName + strlenW(pszName); + + snprintfW(dst_basename, pszName + MAX_PATH - dst_basename, lnkformat, basename); + + while (GetFileAttributesW(pszName) != INVALID_FILE_ATTRIBUTES) + { + snprintfW(dst_basename, pszName + MAX_PATH - dst_basename, lnkformatnum, basename, i); + i++; + } + + return TRUE; +} + +/************************************************************************* + * SHStartNetConnectionDialog (SHELL32.@) + */ +HRESULT WINAPI SHStartNetConnectionDialog(HWND hwnd, LPCSTR pszRemoteName, DWORD dwType) +{ + FIXME("%p, %s, 0x%08x - stub\n", hwnd, debugstr_a(pszRemoteName), dwType); + + return S_OK; +} +/************************************************************************* + * SHEmptyRecycleBinA (SHELL32.@) + */ +HRESULT WINAPI SHEmptyRecycleBinA(HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags) +{ + LPWSTR szRootPathW = NULL; + int len; + HRESULT hr; + + TRACE("%p, %s, 0x%08x\n", hwnd, debugstr_a(pszRootPath), dwFlags); + + if (pszRootPath) + { + len = MultiByteToWideChar(CP_ACP, 0, pszRootPath, -1, NULL, 0); + if (len == 0) + return HRESULT_FROM_WIN32(GetLastError()); + szRootPathW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!szRootPathW) + return E_OUTOFMEMORY; + if (MultiByteToWideChar(CP_ACP, 0, pszRootPath, -1, szRootPathW, len) == 0) + { + HeapFree(GetProcessHeap(), 0, szRootPathW); + return HRESULT_FROM_WIN32(GetLastError()); + } + } + + hr = SHEmptyRecycleBinW(hwnd, szRootPathW, dwFlags); + HeapFree(GetProcessHeap(), 0, szRootPathW); + + return hr; +} + +HRESULT WINAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags) +{ + WCHAR szPath[MAX_PATH] = {0}; + DWORD dwSize, dwType; + LONG ret; + + TRACE("%p, %s, 0x%08x\n", hwnd, debugstr_w(pszRootPath), dwFlags); + + if (!(dwFlags & SHERB_NOCONFIRMATION)) + { + /* FIXME + * enumerate available files + * show confirmation dialog + */ + FIXME("show confirmation dialog\n"); + } + + if (dwFlags & SHERB_NOPROGRESSUI) + { + ret = EmptyRecycleBinW(pszRootPath); + } + else + { + /* FIXME + * show a progress dialog + */ + ret = EmptyRecycleBinW(pszRootPath); + } + + if (!ret) + return HRESULT_FROM_WIN32(GetLastError()); + + if (!(dwFlags & SHERB_NOSOUND)) + { + dwSize = sizeof(szPath); + ret = RegGetValueW(HKEY_CURRENT_USER, + L"AppEvents\\Schemes\\Apps\\Explorer\\EmptyRecycleBin\\.Current", + NULL, + RRF_RT_REG_EXPAND_SZ, + &dwType, + (PVOID)szPath, + &dwSize); + if (ret != ERROR_SUCCESS) + return S_OK; + + if (dwType != REG_EXPAND_SZ) /* type dismatch */ + return S_OK; + + szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0'; + PlaySoundW(szPath, NULL, SND_FILENAME); + } + return S_OK; +} + +HRESULT WINAPI SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) +{ + LPWSTR szRootPathW = NULL; + int len; + HRESULT hr; + + TRACE("%s, %p\n", debugstr_a(pszRootPath), pSHQueryRBInfo); + + if (pszRootPath) + { + len = MultiByteToWideChar(CP_ACP, 0, pszRootPath, -1, NULL, 0); + if (len == 0) + return HRESULT_FROM_WIN32(GetLastError()); + szRootPathW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!szRootPathW) + return E_OUTOFMEMORY; + if (MultiByteToWideChar(CP_ACP, 0, pszRootPath, -1, szRootPathW, len) == 0) + { + HeapFree(GetProcessHeap(), 0, szRootPathW); + return HRESULT_FROM_WIN32(GetLastError()); + } + } + + hr = SHQueryRecycleBinW(szRootPathW, pSHQueryRBInfo); + HeapFree(GetProcessHeap(), 0, szRootPathW); + + return hr; +} + +HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) +{ + FIXME("%s, %p - stub\n", debugstr_w(pszRootPath), pSHQueryRBInfo); + + if (!(pszRootPath) || (pszRootPath[0] == 0) || + !(pSHQueryRBInfo) || (pSHQueryRBInfo->cbSize < sizeof(SHQUERYRBINFO))) + { + return E_INVALIDARG; + } + + pSHQueryRBInfo->i64Size = 0; + pSHQueryRBInfo->i64NumItems = 0; + + return S_OK; +} + +/************************************************************************* + * SHSetLocalizedName (SHELL32.@) + */ +EXTERN_C HRESULT WINAPI SHSetLocalizedName(LPCWSTR pszPath, LPCWSTR pszResModule, int idsRes) +{ + FIXME("%p, %s, %d - stub\n", pszPath, debugstr_w(pszResModule), idsRes); + + return S_OK; +} + +/************************************************************************* + * LinkWindow_RegisterClass (SHELL32.258) + */ +EXTERN_C BOOL WINAPI LinkWindow_RegisterClass(void) +{ + FIXME("()\n"); + return TRUE; +} + +/************************************************************************* + * LinkWindow_UnregisterClass (SHELL32.259) + */ +EXTERN_C BOOL WINAPI LinkWindow_UnregisterClass(void) +{ + FIXME("()\n"); + return TRUE; + +} + +/************************************************************************* + * SHFlushSFCache (SHELL32.526) + * + * Notifies the shell that a user-specified special folder location has changed. + * + * NOTES + * In Wine, the shell folder registry values are not cached, so this function + * has no effect. + */ +EXTERN_C void WINAPI SHFlushSFCache(void) +{ +} + +EXTERN_C HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) +{ + FIXME("STUB: %i %s\n",iImageList,debugstr_guid(&riid)); + return E_NOINTERFACE; +} + +/************************************************************************* + * SHParseDisplayName [shell version 6.0] + */ +EXTERN_C HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, +LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut) +{ + CComPtr psfDesktop; + HRESULT hr=E_FAIL; + ULONG dwAttr=sfgaoIn; + + if(!ppidl) + return E_INVALIDARG; + + if (!pszName || !psfgaoOut) + { + *ppidl = NULL; + return E_INVALIDARG; + } + + hr = SHGetDesktopFolder(&psfDesktop); + if (FAILED(hr)) + { + *ppidl = NULL; + return hr; + } + + hr = psfDesktop->ParseDisplayName((HWND)NULL, pbc, (LPOLESTR)pszName, (ULONG *)NULL, ppidl, &dwAttr); + + psfDesktop->Release(); + + if (SUCCEEDED(hr)) + *psfgaoOut = dwAttr; + else + *ppidl = NULL; + + return hr; +} diff --git a/dll/win32/shell32_new/shellpath.cpp b/dll/win32/shell32_new/shellpath.cpp new file mode 100644 index 00000000000..f1418618ac8 --- /dev/null +++ b/dll/win32/shell32_new/shellpath.cpp @@ -0,0 +1,2030 @@ +/* + * Path Functions + * + * Copyright 1998, 1999, 2000 Juergen Schmied + * Copyright 2004 Juan Lang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES: + * + * Many of these functions are in SHLWAPI.DLL also + * + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/* + ########## Combining and Constructing paths ########## +*/ + +/************************************************************************* + * PathAppend [SHELL32.36] + */ +BOOL WINAPI PathAppendAW( + LPVOID lpszPath1, + LPCVOID lpszPath2) +{ + if (SHELL_OsIsUnicode()) + return PathAppendW((LPWSTR)lpszPath1, (LPCWSTR)lpszPath2); + return PathAppendA((LPSTR)lpszPath1, (LPCSTR)lpszPath2); +} + +/************************************************************************* + * PathBuildRoot [SHELL32.30] + */ +LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive) +{ + if(SHELL_OsIsUnicode()) + return PathBuildRootW((LPWSTR)lpszPath, drive); + return PathBuildRootA((LPSTR)lpszPath, drive); +} + +/************************************************************************* + * PathGetExtensionA [internal] + * + * NOTES + * exported by ordinal + * return value points to the first char after the dot + */ +static LPSTR PathGetExtensionA(LPCSTR lpszPath) +{ + TRACE("(%s)\n",lpszPath); + + lpszPath = PathFindExtensionA(lpszPath); + return (LPSTR)(*lpszPath?(lpszPath+1):lpszPath); +} + +/************************************************************************* + * PathGetExtensionW [internal] + */ +LPWSTR PathGetExtensionW(LPCWSTR lpszPath) +{ + TRACE("(%s)\n",debugstr_w(lpszPath)); + + lpszPath = PathFindExtensionW(lpszPath); + return (LPWSTR)(*lpszPath?(lpszPath+1):lpszPath); +} + +/************************************************************************* + * SHPathGetExtension [SHELL32.158] + */ +EXTERN_C LPVOID WINAPI SHPathGetExtensionW(LPCWSTR lpszPath, DWORD void1, DWORD void2) +{ + return PathGetExtensionW(lpszPath); +} + +/************************************************************************* + * PathRemoveFileSpec [SHELL32.35] + */ +BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathRemoveFileSpecW((LPWSTR)lpszPath); + return PathRemoveFileSpecA((LPSTR)lpszPath); +} + +/* + Path Manipulations +*/ + +/************************************************************************* + * PathGetShortPathA [internal] + */ +static void PathGetShortPathA(LPSTR pszPath) +{ + CHAR path[MAX_PATH]; + + TRACE("%s\n", pszPath); + + if (GetShortPathNameA(pszPath, path, MAX_PATH)) + { + lstrcpyA(pszPath, path); + } +} + +/************************************************************************* + * PathGetShortPathW [internal] + */ +static void PathGetShortPathW(LPWSTR pszPath) +{ + WCHAR path[MAX_PATH]; + + TRACE("%s\n", debugstr_w(pszPath)); + + if (GetShortPathNameW(pszPath, path, MAX_PATH)) + { + wcscpy(pszPath, path); + } +} + +/************************************************************************* + * PathGetShortPath [SHELL32.92] + */ +EXTERN_C VOID WINAPI PathGetShortPathAW(LPVOID pszPath) +{ + if(SHELL_OsIsUnicode()) + PathGetShortPathW((LPWSTR)pszPath); + PathGetShortPathA((LPSTR)pszPath); +} + +/* + ########## Path Testing ########## +*/ + +/************************************************************************* + * PathIsRoot [SHELL32.29] + */ +BOOL WINAPI PathIsRootAW(LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathIsRootW((LPWSTR)lpszPath); + return PathIsRootA((LPSTR)lpszPath); +} + +/************************************************************************* + * PathIsExeA [internal] + */ +static BOOL PathIsExeA (LPCSTR lpszPath) +{ + LPCSTR lpszExtension = PathGetExtensionA(lpszPath); + int i; + static const char * const lpszExtensions[] = + {"exe", "com", "pif", "cmd", "bat", "scf", "scr", NULL }; + + TRACE("path=%s\n",lpszPath); + + for(i=0; lpszExtensions[i]; i++) + if (!lstrcmpiA(lpszExtension,lpszExtensions[i])) return TRUE; + + return FALSE; +} + +/************************************************************************* + * PathIsExeW [internal] + */ +static BOOL PathIsExeW (LPCWSTR lpszPath) +{ + LPCWSTR lpszExtension = PathGetExtensionW(lpszPath); + int i; + static const WCHAR lpszExtensions[][4] = + {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','f','\0'}, + {'c','m','d','\0'}, {'b','a','t','\0'}, {'s','c','f','\0'}, + {'s','c','r','\0'}, {'\0'} }; + + TRACE("path=%s\n",debugstr_w(lpszPath)); + + for(i=0; lpszExtensions[i][0]; i++) + if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; + + return FALSE; +} + +/************************************************************************* + * PathIsExe [SHELL32.43] + */ +BOOL WINAPI PathIsExeAW (LPCVOID path) +{ + if (SHELL_OsIsUnicode()) + return PathIsExeW ((LPWSTR)path); + return PathIsExeA((LPSTR)path); +} + +/************************************************************************* + * PathFileExists [SHELL32.45] + */ +BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathFileExistsW ((LPWSTR)lpszPath); + return PathFileExistsA ((LPSTR)lpszPath); +} + +/************************************************************************* + * PathIsSameRoot [SHELL32.650] + */ +BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2) +{ + if (SHELL_OsIsUnicode()) + return PathIsSameRootW((LPCWSTR)lpszPath1, (LPCWSTR)lpszPath2); + return PathIsSameRootA((LPCSTR)lpszPath1, (LPCSTR)lpszPath2); +} + +/************************************************************************* + * IsLFNDriveA [SHELL32.41] + */ +EXTERN_C BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath) +{ + DWORD fnlen; + + if (!GetVolumeInformationA(lpszPath, NULL, 0, NULL, &fnlen, NULL, NULL, 0)) + return FALSE; + return fnlen > 12; +} + +/************************************************************************* + * IsLFNDriveW [SHELL32.42] + */ +EXTERN_C BOOL WINAPI IsLFNDriveW(LPCWSTR lpszPath) +{ + DWORD fnlen; + + if (!GetVolumeInformationW(lpszPath, NULL, 0, NULL, &fnlen, NULL, NULL, 0)) + return FALSE; + return fnlen > 12; +} + +/************************************************************************* + * IsLFNDrive [SHELL32.119] + */ +EXTERN_C BOOL WINAPI IsLFNDriveAW(LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return IsLFNDriveW((LPCWSTR)lpszPath); + return IsLFNDriveA((LPCSTR)lpszPath); +} + +/* + ########## Creating Something Unique ########## +*/ +/************************************************************************* + * PathMakeUniqueNameA [internal] + */ +BOOL WINAPI PathMakeUniqueNameA( + LPSTR lpszBuffer, + DWORD dwBuffSize, + LPCSTR lpszShortName, + LPCSTR lpszLongName, + LPCSTR lpszPathName) +{ + FIXME("%p %u %s %s %s stub\n", + lpszBuffer, dwBuffSize, debugstr_a(lpszShortName), + debugstr_a(lpszLongName), debugstr_a(lpszPathName)); + return TRUE; +} + +/************************************************************************* + * PathMakeUniqueNameW [internal] + */ +BOOL WINAPI PathMakeUniqueNameW( + LPWSTR lpszBuffer, + DWORD dwBuffSize, + LPCWSTR lpszShortName, + LPCWSTR lpszLongName, + LPCWSTR lpszPathName) +{ + FIXME("%p %u %s %s %s stub\n", + lpszBuffer, dwBuffSize, debugstr_w(lpszShortName), + debugstr_w(lpszLongName), debugstr_w(lpszPathName)); + return TRUE; +} + +/************************************************************************* + * PathMakeUniqueName [SHELL32.47] + */ +BOOL WINAPI PathMakeUniqueNameAW( + LPVOID lpszBuffer, + DWORD dwBuffSize, + LPCVOID lpszShortName, + LPCVOID lpszLongName, + LPCVOID lpszPathName) +{ + if (SHELL_OsIsUnicode()) + return PathMakeUniqueNameW((LPWSTR)lpszBuffer, dwBuffSize, (LPCWSTR)lpszShortName, (LPCWSTR)lpszLongName, (LPCWSTR)lpszPathName); + return PathMakeUniqueNameA((LPSTR)lpszBuffer, dwBuffSize, (LPCSTR)lpszShortName, (LPCSTR)lpszLongName, (LPCSTR)lpszPathName); +} + +/************************************************************************* + * PathYetAnotherMakeUniqueName [SHELL32.75] + * + * NOTES + * exported by ordinal + */ +BOOL WINAPI PathYetAnotherMakeUniqueName( + LPWSTR lpszBuffer, + LPCWSTR lpszPathName, + LPCWSTR lpszShortName, + LPCWSTR lpszLongName) +{ + FIXME("(%p, %s, %s ,%s):stub.\n", + lpszBuffer, debugstr_w(lpszPathName), debugstr_w(lpszShortName), debugstr_w(lpszLongName)); + return TRUE; +} + + +/* + ########## cleaning and resolving paths ########## + */ + +/************************************************************************* + * PathCleanupSpec [SHELL32.171] + * + * lpszFile is changed in place. + */ +int WINAPI PathCleanupSpec( LPCWSTR lpszPathW, LPWSTR lpszFileW ) +{ + int i = 0; + DWORD rc = 0; + int length = 0; + + if (SHELL_OsIsUnicode()) + { + LPWSTR p = lpszFileW; + + TRACE("Cleanup %s\n",debugstr_w(lpszFileW)); + + if (lpszPathW) + length = wcslen(lpszPathW); + + while (*p) + { + int gct = PathGetCharTypeW(*p); + if (gct == GCT_INVALID || gct == GCT_WILD || gct == GCT_SEPARATOR) + { + lpszFileW[i]='-'; + rc |= PCS_REPLACEDCHAR; + } + else + lpszFileW[i]=*p; + i++; + p++; + if (length + i == MAX_PATH) + { + rc |= PCS_FATAL | PCS_PATHTOOLONG; + break; + } + } + lpszFileW[i]=0; + } + else + { + LPSTR lpszFileA = (LPSTR)lpszFileW; + LPCSTR lpszPathA = (LPCSTR)lpszPathW; + LPSTR p = lpszFileA; + + TRACE("Cleanup %s\n",debugstr_a(lpszFileA)); + + if (lpszPathA) + length = strlen(lpszPathA); + + while (*p) + { + int gct = PathGetCharTypeA(*p); + if (gct == GCT_INVALID || gct == GCT_WILD || gct == GCT_SEPARATOR) + { + lpszFileA[i]='-'; + rc |= PCS_REPLACEDCHAR; + } + else + lpszFileA[i]=*p; + i++; + p++; + if (length + i == MAX_PATH) + { + rc |= PCS_FATAL | PCS_PATHTOOLONG; + break; + } + } + lpszFileA[i]=0; + } + return rc; +} + +/************************************************************************* + * PathQualifyA [SHELL32] + */ +BOOL WINAPI PathQualifyA(LPCSTR pszPath) +{ + FIXME("%s\n",pszPath); + return 0; +} + +/************************************************************************* + * PathQualifyW [SHELL32] + */ +BOOL WINAPI PathQualifyW(LPCWSTR pszPath) +{ + FIXME("%s\n",debugstr_w(pszPath)); + return 0; +} + +/************************************************************************* + * PathQualify [SHELL32.49] + */ +BOOL WINAPI PathQualifyAW(LPCVOID pszPath) +{ + if (SHELL_OsIsUnicode()) + return PathQualifyW((LPCWSTR)pszPath); + return PathQualifyA((LPCSTR)pszPath); +} + +/************************************************************************* + * PathResolveA [SHELL32.51] + */ +BOOL WINAPI PathResolveA( + LPSTR lpszPath, + LPCSTR *alpszPaths, + DWORD dwFlags) +{ + FIXME("(%s,%p,0x%08x),stub!\n", + lpszPath, *alpszPaths, dwFlags); + return 0; +} + +/************************************************************************* + * PathResolveW [SHELL32] + */ +BOOL WINAPI PathResolveW( + LPWSTR lpszPath, + LPCWSTR *alpszPaths, + DWORD dwFlags) +{ + FIXME("(%s,%p,0x%08x),stub!\n", + debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags); + return 0; +} + +/************************************************************************* + * PathResolve [SHELL32.51] + */ +BOOL WINAPI PathResolveAW( + LPVOID lpszPath, + LPCVOID *alpszPaths, + DWORD dwFlags) +{ + if (SHELL_OsIsUnicode()) + return PathResolveW((LPWSTR)lpszPath, (LPCWSTR *)alpszPaths, dwFlags); + return PathResolveA((LPSTR)lpszPath, (LPCSTR *)alpszPaths, dwFlags); +} + +/************************************************************************* +* PathProcessCommandA [SHELL32.653] +*/ +LONG WINAPI PathProcessCommandA ( + LPCSTR lpszPath, + LPSTR lpszBuff, + DWORD dwBuffSize, + DWORD dwFlags) +{ + FIXME("%s %p 0x%04x 0x%04x stub\n", + lpszPath, lpszBuff, dwBuffSize, dwFlags); + if(!lpszPath) return -1; + if(lpszBuff) strcpy(lpszBuff, lpszPath); + return strlen(lpszPath); +} + +/************************************************************************* +* PathProcessCommandW +*/ +LONG WINAPI PathProcessCommandW ( + LPCWSTR lpszPath, + LPWSTR lpszBuff, + DWORD dwBuffSize, + DWORD dwFlags) +{ + FIXME("(%s, %p, 0x%04x, 0x%04x) stub\n", + debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags); + if(!lpszPath) return -1; + if(lpszBuff) wcscpy(lpszBuff, lpszPath); + return wcslen(lpszPath); +} + +/************************************************************************* +* PathProcessCommand (SHELL32.653) +*/ +LONG WINAPI PathProcessCommandAW ( + LPCVOID lpszPath, + LPVOID lpszBuff, + DWORD dwBuffSize, + DWORD dwFlags) +{ + if (SHELL_OsIsUnicode()) + return PathProcessCommandW((LPCWSTR)lpszPath, (LPWSTR)lpszBuff, dwBuffSize, dwFlags); + return PathProcessCommandA((LPCSTR)lpszPath, (LPSTR)lpszBuff, dwBuffSize, dwFlags); +} + +/* + ########## special ########## +*/ + +static const WCHAR szCurrentVersion[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0'}; +static const WCHAR Administrative_ToolsW[] = {'A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; +static const WCHAR AppDataW[] = {'A','p','p','D','a','t','a','\0'}; +static const WCHAR CacheW[] = {'C','a','c','h','e','\0'}; +static const WCHAR CD_BurningW[] = {'C','D',' ','B','u','r','n','i','n','g','\0'}; +static const WCHAR Common_Administrative_ToolsW[] = {'C','o','m','m','o','n',' ','A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; +static const WCHAR Common_AppDataW[] = {'C','o','m','m','o','n',' ','A','p','p','D','a','t','a','\0'}; +static const WCHAR Common_DesktopW[] = {'C','o','m','m','o','n',' ','D','e','s','k','t','o','p','\0'}; +static const WCHAR Common_DocumentsW[] = {'C','o','m','m','o','n',' ','D','o','c','u','m','e','n','t','s','\0'}; +static const WCHAR CommonFilesDirW[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r','\0'}; +static const WCHAR CommonMusicW[] = {'C','o','m','m','o','n','M','u','s','i','c','\0'}; +static const WCHAR CommonPicturesW[] = {'C','o','m','m','o','n','P','i','c','t','u','r','e','s','\0'}; +static const WCHAR Common_ProgramsW[] = {'C','o','m','m','o','n',' ','P','r','o','g','r','a','m','s','\0'}; +static const WCHAR Common_StartUpW[] = {'C','o','m','m','o','n',' ','S','t','a','r','t','U','p','\0'}; +static const WCHAR Common_Start_MenuW[] = {'C','o','m','m','o','n',' ','S','t','a','r','t',' ','M','e','n','u','\0'}; +static const WCHAR Common_TemplatesW[] = {'C','o','m','m','o','n',' ','T','e','m','p','l','a','t','e','s','\0'}; +static const WCHAR CommonVideoW[] = {'C','o','m','m','o','n','V','i','d','e','o','\0'}; +static const WCHAR CookiesW[] = {'C','o','o','k','i','e','s','\0'}; +static const WCHAR DesktopW[] = {'D','e','s','k','t','o','p','\0'}; +static const WCHAR FavoritesW[] = {'F','a','v','o','r','i','t','e','s','\0'}; +static const WCHAR FontsW[] = {'F','o','n','t','s','\0'}; +static const WCHAR HistoryW[] = {'H','i','s','t','o','r','y','\0'}; +static const WCHAR Local_AppDataW[] = {'L','o','c','a','l',' ','A','p','p','D','a','t','a','\0'}; +static const WCHAR My_MusicW[] = {'M','y',' ','M','u','s','i','c','\0'}; +static const WCHAR My_PicturesW[] = {'M','y',' ','P','i','c','t','u','r','e','s','\0'}; +static const WCHAR My_VideoW[] = {'M','y',' ','V','i','d','e','o','\0'}; +static const WCHAR NetHoodW[] = {'N','e','t','H','o','o','d','\0'}; +static const WCHAR PersonalW[] = {'P','e','r','s','o','n','a','l','\0'}; +static const WCHAR PrintHoodW[] = {'P','r','i','n','t','H','o','o','d','\0'}; +static const WCHAR ProgramFilesDirW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r','\0'}; +static const WCHAR ProgramsW[] = {'P','r','o','g','r','a','m','s','\0'}; +static const WCHAR RecentW[] = {'R','e','c','e','n','t','\0'}; +static const WCHAR ResourcesW[] = {'R','e','s','o','u','r','c','e','s','\0'}; +static const WCHAR SendToW[] = {'S','e','n','d','T','o','\0'}; +static const WCHAR StartUpW[] = {'S','t','a','r','t','U','p','\0'}; +static const WCHAR Start_MenuW[] = {'S','t','a','r','t',' ','M','e','n','u','\0'}; +static const WCHAR TemplatesW[] = {'T','e','m','p','l','a','t','e','s','\0'}; +static const WCHAR DefaultW[] = {'.','D','e','f','a','u','l','t','\0'}; +static const WCHAR AllUsersProfileW[] = {'%','A','L','L','U','S','E','R','S','P','R','O','F','I','L','E','%','\0'}; +static const WCHAR UserProfileW[] = {'%','U','S','E','R','P','R','O','F','I','L','E','%','\0'}; +static const WCHAR SystemDriveW[] = {'%','S','y','s','t','e','m','D','r','i','v','e','%','\0'}; +static const WCHAR ProfileListW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','P','r','o','f','i','l','e','L','i','s','t',0}; +static const WCHAR ProfilesDirectoryW[] = {'P','r','o','f','i','l','e','s','D','i','r','e','c','t','o','r','y',0}; +static const WCHAR AllUsersProfileValueW[] = {'A','l','l','U','s','e','r','s','P','r','o','f','i','l','e','\0'}; +static const WCHAR szSHFolders[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; +static const WCHAR szSHUserFolders[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; +/* This defaults to L"Documents and Settings" on Windows 2000/XP, but we're + * acting more Windows 9x-like for now. + */ +static const WCHAR szDefaultProfileDirW[] = {'p','r','o','f','i','l','e','s','\0'}; +static const WCHAR AllUsersW[] = {'A','l','l',' ','U','s','e','r','s','\0'}; + +typedef enum _CSIDL_Type { + CSIDL_Type_User, + CSIDL_Type_AllUsers, + CSIDL_Type_CurrVer, + CSIDL_Type_Disallowed, + CSIDL_Type_NonExistent, + CSIDL_Type_WindowsPath, + CSIDL_Type_SystemPath, +} CSIDL_Type; + +typedef struct +{ + CSIDL_Type type; + LPCWSTR szValueName; + LPCWSTR szDefaultPath; /* fallback string or resource ID */ +} CSIDL_DATA; + +static const CSIDL_DATA CSIDL_Data[] = +{ + { /* 0x00 - CSIDL_DESKTOP */ + CSIDL_Type_User, + DesktopW, + MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY) + }, + { /* 0x01 - CSIDL_INTERNET */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x02 - CSIDL_PROGRAMS */ + CSIDL_Type_User, + ProgramsW, + MAKEINTRESOURCEW(IDS_PROGRAMS) + }, + { /* 0x03 - CSIDL_CONTROLS (.CPL files) */ + CSIDL_Type_SystemPath, + NULL, + NULL + }, + { /* 0x04 - CSIDL_PRINTERS */ + CSIDL_Type_SystemPath, + NULL, + NULL + }, + { /* 0x05 - CSIDL_PERSONAL */ + CSIDL_Type_User, + PersonalW, + MAKEINTRESOURCEW(IDS_PERSONAL) + }, + { /* 0x06 - CSIDL_FAVORITES */ + CSIDL_Type_User, + FavoritesW, + MAKEINTRESOURCEW(IDS_FAVORITES) + }, + { /* 0x07 - CSIDL_STARTUP */ + CSIDL_Type_User, + StartUpW, + MAKEINTRESOURCEW(IDS_STARTUP) + }, + { /* 0x08 - CSIDL_RECENT */ + CSIDL_Type_User, + RecentW, + MAKEINTRESOURCEW(IDS_RECENT) + }, + { /* 0x09 - CSIDL_SENDTO */ + CSIDL_Type_User, + SendToW, + MAKEINTRESOURCEW(IDS_SENDTO) + }, + { /* 0x0a - CSIDL_BITBUCKET - Recycle Bin */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x0b - CSIDL_STARTMENU */ + CSIDL_Type_User, + Start_MenuW, + MAKEINTRESOURCEW(IDS_STARTMENU) + }, + { /* 0x0c - CSIDL_MYDOCUMENTS */ + CSIDL_Type_Disallowed, /* matches WinXP--can't get its path */ + NULL, + NULL + }, + { /* 0x0d - CSIDL_MYMUSIC */ + CSIDL_Type_User, + My_MusicW, + MAKEINTRESOURCEW(IDS_MYMUSIC) + }, + { /* 0x0e - CSIDL_MYVIDEO */ + CSIDL_Type_User, + My_VideoW, + MAKEINTRESOURCEW(IDS_MYVIDEO) + }, + { /* 0x0f - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x10 - CSIDL_DESKTOPDIRECTORY */ + CSIDL_Type_User, + DesktopW, + MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY) + }, + { /* 0x11 - CSIDL_DRIVES */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x12 - CSIDL_NETWORK */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x13 - CSIDL_NETHOOD */ + CSIDL_Type_User, + NetHoodW, + MAKEINTRESOURCEW(IDS_NETHOOD) + }, + { /* 0x14 - CSIDL_FONTS */ + CSIDL_Type_WindowsPath, + FontsW, + FontsW + }, + { /* 0x15 - CSIDL_TEMPLATES */ + CSIDL_Type_User, + TemplatesW, + MAKEINTRESOURCEW(IDS_TEMPLATES) + }, + { /* 0x16 - CSIDL_COMMON_STARTMENU */ + CSIDL_Type_AllUsers, + Common_Start_MenuW, + MAKEINTRESOURCEW(IDS_STARTMENU) + }, + { /* 0x17 - CSIDL_COMMON_PROGRAMS */ + CSIDL_Type_AllUsers, + Common_ProgramsW, + MAKEINTRESOURCEW(IDS_PROGRAMS) + }, + { /* 0x18 - CSIDL_COMMON_STARTUP */ + CSIDL_Type_AllUsers, + Common_StartUpW, + MAKEINTRESOURCEW(IDS_STARTUP) + }, + { /* 0x19 - CSIDL_COMMON_DESKTOPDIRECTORY */ + CSIDL_Type_AllUsers, + Common_DesktopW, + MAKEINTRESOURCEW(IDS_DESKTOP) + }, + { /* 0x1a - CSIDL_APPDATA */ + CSIDL_Type_User, + AppDataW, + MAKEINTRESOURCEW(IDS_APPDATA) + }, + { /* 0x1b - CSIDL_PRINTHOOD */ + CSIDL_Type_User, + PrintHoodW, + MAKEINTRESOURCEW(IDS_PRINTHOOD) + }, + { /* 0x1c - CSIDL_LOCAL_APPDATA */ + CSIDL_Type_User, + Local_AppDataW, + MAKEINTRESOURCEW(IDS_LOCAL_APPDATA) + }, + { /* 0x1d - CSIDL_ALTSTARTUP */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x1e - CSIDL_COMMON_ALTSTARTUP */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x1f - CSIDL_COMMON_FAVORITES */ + CSIDL_Type_AllUsers, + FavoritesW, + MAKEINTRESOURCEW(IDS_FAVORITES) + }, + { /* 0x20 - CSIDL_INTERNET_CACHE */ + CSIDL_Type_User, + CacheW, + MAKEINTRESOURCEW(IDS_INTERNET_CACHE) + }, + { /* 0x21 - CSIDL_COOKIES */ + CSIDL_Type_User, + CookiesW, + MAKEINTRESOURCEW(IDS_COOKIES) + }, + { /* 0x22 - CSIDL_HISTORY */ + CSIDL_Type_User, + HistoryW, + MAKEINTRESOURCEW(IDS_HISTORY) + }, + { /* 0x23 - CSIDL_COMMON_APPDATA */ + CSIDL_Type_AllUsers, + Common_AppDataW, + MAKEINTRESOURCEW(IDS_APPDATA) + }, + { /* 0x24 - CSIDL_WINDOWS */ + CSIDL_Type_WindowsPath, + NULL, + NULL + }, + { /* 0x25 - CSIDL_SYSTEM */ + CSIDL_Type_SystemPath, + NULL, + NULL + }, + { /* 0x26 - CSIDL_PROGRAM_FILES */ + CSIDL_Type_CurrVer, + ProgramFilesDirW, + MAKEINTRESOURCEW(IDS_PROGRAM_FILES) + }, + { /* 0x27 - CSIDL_MYPICTURES */ + CSIDL_Type_User, + My_PicturesW, + MAKEINTRESOURCEW(IDS_MYPICTURES) + }, + { /* 0x28 - CSIDL_PROFILE */ + CSIDL_Type_User, + NULL, + NULL + }, + { /* 0x29 - CSIDL_SYSTEMX86 */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x2a - CSIDL_PROGRAM_FILESX86 */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x2b - CSIDL_PROGRAM_FILES_COMMON */ + CSIDL_Type_CurrVer, + CommonFilesDirW, + MAKEINTRESOURCEW(IDS_PROGRAM_FILES_COMMON) + }, + { /* 0x2c - CSIDL_PROGRAM_FILES_COMMONX86 */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x2d - CSIDL_COMMON_TEMPLATES */ + CSIDL_Type_AllUsers, + Common_TemplatesW, + MAKEINTRESOURCEW(IDS_TEMPLATES) + }, + { /* 0x2e - CSIDL_COMMON_DOCUMENTS */ + CSIDL_Type_AllUsers, + Common_DocumentsW, + MAKEINTRESOURCEW(IDS_COMMON_DOCUMENTS) + }, + { /* 0x2f - CSIDL_COMMON_ADMINTOOLS */ + CSIDL_Type_AllUsers, + Common_Administrative_ToolsW, + MAKEINTRESOURCEW(IDS_ADMINTOOLS) + }, + { /* 0x30 - CSIDL_ADMINTOOLS */ + CSIDL_Type_User, + Administrative_ToolsW, + MAKEINTRESOURCEW(IDS_ADMINTOOLS) + }, + { /* 0x31 - CSIDL_CONNECTIONS */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x32 - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x33 - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x34 - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x35 - CSIDL_COMMON_MUSIC */ + CSIDL_Type_AllUsers, + CommonMusicW, + MAKEINTRESOURCEW(IDS_COMMON_MUSIC) + }, + { /* 0x36 - CSIDL_COMMON_PICTURES */ + CSIDL_Type_AllUsers, + CommonPicturesW, + MAKEINTRESOURCEW(IDS_COMMON_PICTURES) + }, + { /* 0x37 - CSIDL_COMMON_VIDEO */ + CSIDL_Type_AllUsers, + CommonVideoW, + MAKEINTRESOURCEW(IDS_COMMON_VIDEO) + }, + { /* 0x38 - CSIDL_RESOURCES */ + CSIDL_Type_WindowsPath, + NULL, + ResourcesW + }, + { /* 0x39 - CSIDL_RESOURCES_LOCALIZED */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x3a - CSIDL_COMMON_OEM_LINKS */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x3b - CSIDL_CDBURN_AREA */ + CSIDL_Type_User, + CD_BurningW, + MAKEINTRESOURCEW(IDS_CDBURN_AREA) + }, + { /* 0x3c unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x3d - CSIDL_COMPUTERSNEARME */ + CSIDL_Type_Disallowed, /* FIXME */ + NULL, + NULL + }, + { /* 0x3e - CSIDL_PROFILES */ + CSIDL_Type_Disallowed, /* oddly, this matches WinXP */ + NULL, + NULL + } +}; + +/* Gets the value named value from the registry key + * rootKey\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders + * (or from rootKey\userPrefix\... if userPrefix is not NULL) into path, which + * is assumed to be MAX_PATH WCHARs in length. + * If it exists, expands the value and writes the expanded value to + * rootKey\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders + * Returns successful error code if the value was retrieved from the registry, + * and a failure otherwise. + */ +static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, + LPCWSTR value, LPWSTR path) +{ + HRESULT hr; + WCHAR shellFolderPath[MAX_PATH], userShellFolderPath[MAX_PATH]; + LPCWSTR pShellFolderPath, pUserShellFolderPath; + DWORD dwDisp, dwType, dwPathLen; + HKEY userShellFolderKey, shellFolderKey; + + TRACE("%p,%s,%s,%p\n",rootKey, debugstr_w(userPrefix), debugstr_w(value), + path); + + if (userPrefix) + { + wcscpy(shellFolderPath, userPrefix); + PathAddBackslashW(shellFolderPath); + wcscat(shellFolderPath, szSHFolders); + pShellFolderPath = shellFolderPath; + wcscpy(userShellFolderPath, userPrefix); + PathAddBackslashW(userShellFolderPath); + wcscat(userShellFolderPath, szSHUserFolders); + pUserShellFolderPath = userShellFolderPath; + } + else + { + pUserShellFolderPath = szSHUserFolders; + pShellFolderPath = szSHFolders; + } + + if (RegCreateKeyExW(rootKey, pShellFolderPath, 0, NULL, 0, KEY_SET_VALUE, + NULL, &shellFolderKey, &dwDisp)) + { + TRACE("Failed to create %s\n", debugstr_w(pShellFolderPath)); + return E_FAIL; + } + if (RegCreateKeyExW(rootKey, pUserShellFolderPath, 0, NULL, 0, + KEY_QUERY_VALUE, NULL, &userShellFolderKey, &dwDisp)) + { + TRACE("Failed to create %s\n", + debugstr_w(pUserShellFolderPath)); + RegCloseKey(shellFolderKey); + return E_FAIL; + } + + dwPathLen = MAX_PATH * sizeof(WCHAR); + + if (!RegQueryValueExW(userShellFolderKey, value, NULL, &dwType, + (LPBYTE)path, &dwPathLen) && (dwType == REG_EXPAND_SZ || dwType == REG_SZ)) + { + LONG ret; + + dwPathLen /= sizeof(WCHAR); + + path[dwPathLen] = '\0'; + if (dwType == REG_EXPAND_SZ && path[0] == '%') + { + WCHAR szTemp[MAX_PATH]; + + dwPathLen = ExpandEnvironmentStringsW(path, szTemp, MAX_PATH); + lstrcpynW(path, szTemp, dwPathLen); + } + + ret = RegSetValueExW(shellFolderKey, value, 0, REG_SZ, (LPBYTE)path, dwPathLen * sizeof(WCHAR)); + if (ret != ERROR_SUCCESS) + hr = HRESULT_FROM_WIN32(ret); + else + hr = S_OK; + } + else + hr = E_FAIL; + + RegCloseKey(shellFolderKey); + RegCloseKey(userShellFolderKey); + TRACE("returning 0x%08x\n", hr); + return hr; +} + +/* Gets a 'semi-expanded' default value of the CSIDL with index folder into + * pszPath, based on the entries in CSIDL_Data. By semi-expanded, I mean: + * - The entry's szDefaultPath may be either a string value or an integer + * resource identifier. In the latter case, the string value of the resource + * is written. + * - Depending on the entry's type, the path may begin with an (unexpanded) + * environment variable name. The caller is responsible for expanding + * environment strings if so desired. + * The types that are prepended with environment variables are: + * CSIDL_Type_User: %USERPROFILE% + * CSIDL_Type_AllUsers: %ALLUSERSPROFILE% + * CSIDL_Type_CurrVer: %SystemDrive% + * (Others might make sense too, but as yet are unneeded.) + */ +static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath) +{ + DWORD dwSize; + HRESULT hr; + HKEY hKey; + WCHAR resourcePath[MAX_PATH]; + LPCWSTR pDefaultPath = NULL; + + TRACE("0x%02x,%p\n", folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if (!pszPath) + return E_INVALIDARG; + + + if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* FIXME assume MAX_PATH size */ + dwSize = MAX_PATH * sizeof(WCHAR); + if (RegQueryValueExW(hKey, CSIDL_Data[folder].szValueName, NULL, NULL, (LPBYTE)pszPath, &dwSize) == ERROR_SUCCESS) + { + RegCloseKey(hKey); + return S_OK; + } + RegCloseKey(hKey); + } + + if (CSIDL_Data[folder].szDefaultPath && + IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath)) + { + if (LoadStringW(shell32_hInstance, + LOWORD(CSIDL_Data[folder].szDefaultPath), resourcePath, MAX_PATH)) + { + hr = S_OK; + pDefaultPath = resourcePath; + } + else + { + FIXME("(%d,%s), LoadString failed, missing translation?\n", folder, + debugstr_w(pszPath)); + hr = E_FAIL; + } + } + else + { + hr = S_OK; + pDefaultPath = CSIDL_Data[folder].szDefaultPath; + } + if (SUCCEEDED(hr)) + { + switch (CSIDL_Data[folder].type) + { + case CSIDL_Type_User: + wcscpy(pszPath, UserProfileW); + break; + case CSIDL_Type_AllUsers: + wcscpy(pszPath, AllUsersProfileW); + break; + case CSIDL_Type_CurrVer: + wcscpy(pszPath, SystemDriveW); + break; + default: + ; /* no corresponding env. var, do nothing */ + } + if (pDefaultPath) + { + PathAddBackslashW(pszPath); + wcscat(pszPath, pDefaultPath); + } + } + TRACE("returning 0x%08x\n", hr); + return hr; +} + +/* Gets the (unexpanded) value of the folder with index folder into pszPath. + * The folder's type is assumed to be CSIDL_Type_CurrVer. Its default value + * can be overridden in the HKLM\\szCurrentVersion key. + * If dwFlags has SHGFP_TYPE_DEFAULT set or if the value isn't overridden in + * the registry, uses _SHGetDefaultValue to get the value. + */ +static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder, + LPWSTR pszPath) +{ + HRESULT hr; + + TRACE("0x%08x,0x%02x,%p\n", dwFlags, folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if (CSIDL_Data[folder].type != CSIDL_Type_CurrVer) + return E_INVALIDARG; + if (!pszPath) + return E_INVALIDARG; + + if (dwFlags & SHGFP_TYPE_DEFAULT) + hr = _SHGetDefaultValue(folder, pszPath); + else + { + HKEY hKey; + DWORD dwDisp; + + if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szCurrentVersion, 0, + NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp)) + hr = E_FAIL; + else + { + DWORD dwType, dwPathLen = MAX_PATH * sizeof(WCHAR); + + if (RegQueryValueExW(hKey, CSIDL_Data[folder].szValueName, NULL, + &dwType, (LPBYTE)pszPath, &dwPathLen) || + (dwType != REG_SZ && dwType != REG_EXPAND_SZ)) + { + hr = _SHGetDefaultValue(folder, pszPath); + dwType = REG_EXPAND_SZ; + RegSetValueExW(hKey, CSIDL_Data[folder].szValueName, 0, dwType, + (LPBYTE)pszPath, (wcslen(pszPath)+1)*sizeof(WCHAR)); + } + else + { + pszPath[dwPathLen / sizeof(WCHAR)] = '\0'; + hr = S_OK; + } + RegCloseKey(hKey); + } + } + TRACE("returning 0x%08x (output path is %s)\n", hr, debugstr_w(pszPath)); + return hr; +} + +/* Gets the user's path (unexpanded) for the CSIDL with index folder: + * If SHGFP_TYPE_DEFAULT is set, calls _SHGetDefaultValue for it. Otherwise + * calls _SHGetUserShellFolderPath for it. Where it looks depends on hToken: + * - if hToken is -1, looks in HKEY_USERS\.Default + * - otherwise looks first in HKEY_CURRENT_USER, followed by HKEY_LOCAL_MACHINE + * if HKEY_CURRENT_USER doesn't contain any entries. If both fail, finally + * calls _SHGetDefaultValue for it. + */ +static HRESULT _SHGetUserProfilePath(HANDLE hToken, DWORD dwFlags, BYTE folder, + LPWSTR pszPath) +{ + HRESULT hr; + + TRACE("%p,0x%08x,0x%02x,%p\n", hToken, dwFlags, folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + + if (CSIDL_Data[folder].type != CSIDL_Type_User) + return E_INVALIDARG; + + if (!pszPath) + return E_INVALIDARG; + + if (dwFlags & SHGFP_TYPE_DEFAULT) + { + hr = _SHGetDefaultValue(folder, pszPath); + } + else + { + LPWSTR userPrefix; + HKEY hRootKey; + + if (hToken == (HANDLE)-1) + { + /* Get the folder of the default user */ + hRootKey = HKEY_USERS; + userPrefix = (LPWSTR)DefaultW; + } + else if(!hToken) + { + /* Get the folder of the current user */ + hRootKey = HKEY_CURRENT_USER; + userPrefix = NULL; + } + else + { + /* Get the folder of the specified user */ + DWORD InfoLength; + PTOKEN_USER UserInfo; + + hRootKey = HKEY_USERS; + + GetTokenInformation(hToken, TokenUser, NULL, 0, &InfoLength); + UserInfo = (PTOKEN_USER)HeapAlloc(GetProcessHeap(), 0, InfoLength); + + if(!GetTokenInformation(hToken, TokenUser, UserInfo, InfoLength, &InfoLength)) + { + WARN("GetTokenInformation failed for %x!\n", hToken); + HeapFree(GetProcessHeap(), 0, UserInfo); + return E_FAIL; + } + + if(!ConvertSidToStringSidW(UserInfo->User.Sid, &userPrefix)) + { + WARN("ConvertSidToStringSidW failed for %x!\n", hToken); + HeapFree(GetProcessHeap(), 0, UserInfo); + return E_FAIL; + } + + HeapFree(GetProcessHeap(), 0, UserInfo); + } + + hr = _SHGetUserShellFolderPath(hRootKey, userPrefix, CSIDL_Data[folder].szValueName, pszPath); + + /* Free the memory allocated by ConvertSidToStringSidW */ + if(hToken && hToken != (HANDLE)-1) + LocalFree(userPrefix); + + if (FAILED(hr) && hRootKey != HKEY_LOCAL_MACHINE) + hr = _SHGetUserShellFolderPath(HKEY_LOCAL_MACHINE, NULL, CSIDL_Data[folder].szValueName, pszPath); + + if (FAILED(hr)) + hr = _SHGetDefaultValue(folder, pszPath); + } + + TRACE("returning 0x%08x (output path is %s)\n", hr, debugstr_w(pszPath)); + return hr; +} + +/* Gets the (unexpanded) path for the CSIDL with index folder. If dwFlags has + * SHGFP_TYPE_DEFAULT set, calls _SHGetDefaultValue. Otherwise calls + * _SHGetUserShellFolderPath for it, looking only in HKEY_LOCAL_MACHINE. + * If this fails, falls back to _SHGetDefaultValue. + */ +static HRESULT _SHGetAllUsersProfilePath(DWORD dwFlags, BYTE folder, + LPWSTR pszPath) +{ + HRESULT hr; + + TRACE("0x%08x,0x%02x,%p\n", dwFlags, folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if (CSIDL_Data[folder].type != CSIDL_Type_AllUsers) + return E_INVALIDARG; + if (!pszPath) + return E_INVALIDARG; + + if (dwFlags & SHGFP_TYPE_DEFAULT) + hr = _SHGetDefaultValue(folder, pszPath); + else + { + hr = _SHGetUserShellFolderPath(HKEY_LOCAL_MACHINE, NULL, + CSIDL_Data[folder].szValueName, pszPath); + if (FAILED(hr)) + hr = _SHGetDefaultValue(folder, pszPath); + } + TRACE("returning 0x%08x (output path is %s)\n", hr, debugstr_w(pszPath)); + return hr; +} + +/************************************************************************* + * SHGetFolderPathW [SHELL32.@] + * + * Convert nFolder to path. + * + * RETURNS + * Success: S_OK + * Failure: standard HRESULT error codes. + * + * NOTES + * Most values can be overridden in either + * HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders + * or in the same location in HKLM. + * The "Shell Folders" registry key was used in NT4 and earlier systems. + * Beginning with Windows 2000, the "User Shell Folders" key is used, so + * changes made to it are made to the former key too. This synchronization is + * done on-demand: not until someone requests the value of one of these paths + * (by calling one of the SHGet functions) is the value synchronized. + * Furthermore, the HKCU paths take precedence over the HKLM paths. + */ +HRESULT WINAPI SHGetFolderPathW( + HWND hwndOwner, /* [I] owner window */ + int nFolder, /* [I] CSIDL identifying the folder */ + HANDLE hToken, /* [I] access token */ + DWORD dwFlags, /* [I] which path to return */ + LPWSTR pszPath) /* [O] converted path */ +{ + HRESULT hr = SHGetFolderPathAndSubDirW(hwndOwner, nFolder, hToken, dwFlags, NULL, pszPath); + if(HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr) + hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + return hr; +} + +HRESULT WINAPI SHGetFolderPathAndSubDirA( + HWND hwndOwner, /* [I] owner window */ + int nFolder, /* [I] CSIDL identifying the folder */ + HANDLE hToken, /* [I] access token */ + DWORD dwFlags, /* [I] which path to return */ + LPCSTR pszSubPath, /* [I] sub directory of the specified folder */ + LPSTR pszPath) /* [O] converted path */ +{ + int length; + HRESULT hr = S_OK; + LPWSTR pszSubPathW = NULL; + LPWSTR pszPathW = NULL; + TRACE("%08x,%08x,%s\n",nFolder, dwFlags, debugstr_w(pszSubPathW)); + + if(pszPath) { + pszPathW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); + if(!pszPathW) { + hr = HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + } + TRACE("%08x,%08x,%s\n",nFolder, dwFlags, debugstr_w(pszSubPathW)); + + /* SHGetFolderPathAndSubDirW does not distinguish if pszSubPath isn't + * set (null), or an empty string.therefore call it without the parameter set + * if pszSubPath is an empty string + */ + if (pszSubPath && pszSubPath[0]) { + length = MultiByteToWideChar(CP_ACP, 0, pszSubPath, -1, NULL, 0); + pszSubPathW = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR)); + if(!pszSubPathW) { + hr = HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + MultiByteToWideChar(CP_ACP, 0, pszSubPath, -1, pszSubPathW, length); + } + + hr = SHGetFolderPathAndSubDirW(hwndOwner, nFolder, hToken, dwFlags, pszSubPathW, pszPathW); + + if (SUCCEEDED(hr) && pszPath) + WideCharToMultiByte(CP_ACP, 0, pszPathW, -1, pszPath, MAX_PATH, NULL, NULL); + +cleanup: + HeapFree(GetProcessHeap(), 0, pszPathW); + HeapFree(GetProcessHeap(), 0, pszSubPathW); + return hr; +} + +HRESULT WINAPI SHGetFolderPathAndSubDirW( + HWND hwndOwner, /* [I] owner window */ + int nFolder, /* [I] CSIDL identifying the folder */ + HANDLE hToken, /* [I] access token */ + DWORD dwFlags, /* [I] which path to return */ + LPCWSTR pszSubPath,/* [I] sub directory of the specified folder */ + LPWSTR pszPath) /* [O] converted path */ +{ + HRESULT hr; + WCHAR szBuildPath[MAX_PATH], szTemp[MAX_PATH]; + DWORD folder = nFolder & CSIDL_FOLDER_MASK; //FIXME + CSIDL_Type type; + int ret; + + TRACE("%p,%p,nFolder=0x%04x,%s\n", hwndOwner,pszPath,nFolder,debugstr_w(pszSubPath)); + + /* Windows always NULL-terminates the resulting path regardless of success + * or failure, so do so first + */ + if (pszPath) + *pszPath = '\0'; + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if ((SHGFP_TYPE_CURRENT != dwFlags) && (SHGFP_TYPE_DEFAULT != dwFlags)) + return E_INVALIDARG; + szTemp[0] = 0; + type = CSIDL_Data[folder].type; + switch (type) + { + case CSIDL_Type_Disallowed: + hr = E_INVALIDARG; + break; + case CSIDL_Type_NonExistent: + hr = S_FALSE; + break; + case CSIDL_Type_WindowsPath: + GetWindowsDirectoryW(szTemp, MAX_PATH); + if (CSIDL_Data[folder].szDefaultPath && + !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) && + *CSIDL_Data[folder].szDefaultPath) + { + PathAddBackslashW(szTemp); + wcscat(szTemp, CSIDL_Data[folder].szDefaultPath); + } + hr = S_OK; + break; + case CSIDL_Type_SystemPath: + GetSystemDirectoryW(szTemp, MAX_PATH); + if (CSIDL_Data[folder].szDefaultPath && + !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) && + *CSIDL_Data[folder].szDefaultPath) + { + PathAddBackslashW(szTemp); + wcscat(szTemp, CSIDL_Data[folder].szDefaultPath); + } + hr = S_OK; + break; + case CSIDL_Type_CurrVer: + hr = _SHGetCurrentVersionPath(dwFlags, folder, szTemp); + break; + case CSIDL_Type_User: + hr = _SHGetUserProfilePath(hToken, dwFlags, folder, szTemp); + break; + case CSIDL_Type_AllUsers: + hr = _SHGetAllUsersProfilePath(dwFlags, folder, szTemp); + break; + default: + FIXME("bogus type %d, please fix\n", type); + hr = E_INVALIDARG; + break; + } + + /* Expand environment strings if necessary */ + if (*szTemp == '%') + { + DWORD ExpandRet = ExpandEnvironmentStringsW(szTemp, szBuildPath, MAX_PATH); + + if (ExpandRet > MAX_PATH) + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + else if (ExpandRet == 0) + hr = HRESULT_FROM_WIN32(GetLastError()); + else + hr = S_OK; + } + else + { + wcscpy(szBuildPath, szTemp); + } + + if (FAILED(hr)) goto end; + + if(pszSubPath) { + /* make sure the new path does not exceed th bufferlength + * rememebr to backslash and the termination */ + if(MAX_PATH < (wcslen(szBuildPath) + wcslen(pszSubPath) + 2)) { + hr = HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE); + goto end; + } + PathAppendW(szBuildPath, pszSubPath); + PathRemoveBackslashW(szBuildPath); + } + /* Copy the path if it's available before we might return */ + if (SUCCEEDED(hr) && pszPath) + wcscpy(pszPath, szBuildPath); + + /* if we don't care about existing directories we are ready */ + if(nFolder & CSIDL_FLAG_DONT_VERIFY) goto end; + + if (PathFileExistsW(szBuildPath)) goto end; + + /* not existing but we are not allowed to create it. The return value + * is verified against shell32 version 6.0. + */ + if (!(nFolder & CSIDL_FLAG_CREATE)) + { + hr = HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); + goto end; + } + + /* create directory/directories */ + ret = SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL); + if (ret && ret != ERROR_ALREADY_EXISTS) + { + ERR("Failed to create directory %s.\n", debugstr_w(szBuildPath)); + hr = E_FAIL; + goto end; + } + + TRACE("Created missing system directory %s\n", debugstr_w(szBuildPath)); +end: + TRACE("returning 0x%08x (final path is %s)\n", hr, debugstr_w(szBuildPath)); + return hr; +} + +/************************************************************************* + * SHGetFolderPathA [SHELL32.@] + * + * See SHGetFolderPathW. + */ +HRESULT WINAPI SHGetFolderPathA( + HWND hwndOwner, + int nFolder, + HANDLE hToken, + DWORD dwFlags, + LPSTR pszPath) +{ + WCHAR szTemp[MAX_PATH]; + HRESULT hr; + + TRACE("%p,%p,nFolder=0x%04x\n",hwndOwner,pszPath,nFolder); + + if (pszPath) + *pszPath = '\0'; + hr = SHGetFolderPathW(hwndOwner, nFolder, hToken, dwFlags, szTemp); + if (SUCCEEDED(hr) && pszPath) + WideCharToMultiByte(CP_ACP, 0, szTemp, -1, pszPath, MAX_PATH, NULL, + NULL); + + return hr; +} + +/* For each folder in folders, if its value has not been set in the registry, + * calls _SHGetUserProfilePath or _SHGetAllUsersProfilePath (depending on the + * folder's type) to get the unexpanded value first. + * Writes the unexpanded value to User Shell Folders, and queries it with + * SHGetFolderPathW to force the creation of the directory if it doesn't + * already exist. SHGetFolderPathW also returns the expanded value, which + * this then writes to Shell Folders. + */ +static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, + LPCWSTR szUserShellFolderPath, LPCWSTR szShellFolderPath, const UINT folders[], + UINT foldersLen) +{ + UINT i; + WCHAR path[MAX_PATH]; + HRESULT hr = S_OK; + HKEY hUserKey = NULL, hKey = NULL; + DWORD dwDisp, dwType, dwPathLen; + LONG ret; + + TRACE("%p,%p,%s,%p,%u\n", hRootKey, hToken, + debugstr_w(szUserShellFolderPath), folders, foldersLen); + + ret = RegCreateKeyExW(hRootKey, szUserShellFolderPath, 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &hUserKey, &dwDisp); + if (ret) + hr = HRESULT_FROM_WIN32(ret); + else + { + ret = RegCreateKeyExW(hRootKey, szShellFolderPath, 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); + if (ret) + hr = HRESULT_FROM_WIN32(ret); + } + for (i = 0; SUCCEEDED(hr) && i < foldersLen; i++) + { + dwPathLen = MAX_PATH * sizeof(WCHAR); + if (RegQueryValueExW(hUserKey, CSIDL_Data[folders[i]].szValueName, NULL, + &dwType, (LPBYTE)path, &dwPathLen) || (dwType != REG_SZ && + dwType != REG_EXPAND_SZ)) + { + *path = '\0'; + if (CSIDL_Data[folders[i]].type == CSIDL_Type_User) + _SHGetUserProfilePath(hToken, SHGFP_TYPE_DEFAULT, folders[i], + path); + else if (CSIDL_Data[folders[i]].type == CSIDL_Type_AllUsers) + _SHGetAllUsersProfilePath(SHGFP_TYPE_DEFAULT, folders[i], path); + else if (CSIDL_Data[folders[i]].type == CSIDL_Type_WindowsPath) + GetWindowsDirectoryW(path, MAX_PATH); + else + hr = E_FAIL; + if (*path) + { + ret = RegSetValueExW(hUserKey, + CSIDL_Data[folders[i]].szValueName, 0, REG_EXPAND_SZ, + (LPBYTE)path, (wcslen(path) + 1) * sizeof(WCHAR)); + if (ret) + hr = HRESULT_FROM_WIN32(ret); + else + { + hr = SHGetFolderPathW(NULL, folders[i] | CSIDL_FLAG_CREATE, + hToken, SHGFP_TYPE_DEFAULT, path); + ret = RegSetValueExW(hKey, + CSIDL_Data[folders[i]].szValueName, 0, REG_SZ, + (LPBYTE)path, (wcslen(path) + 1) * sizeof(WCHAR)); + if (ret) + hr = HRESULT_FROM_WIN32(ret); + } + } + } + } + if (hUserKey) + RegCloseKey(hUserKey); + if (hKey) + RegCloseKey(hKey); + + TRACE("returning 0x%08x\n", hr); + return hr; +} + +static HRESULT _SHRegisterUserShellFolders(BOOL bDefault) +{ + static const UINT folders[] = { + CSIDL_PROGRAMS, + CSIDL_PERSONAL, + CSIDL_FAVORITES, + CSIDL_APPDATA, + CSIDL_STARTUP, + CSIDL_RECENT, + CSIDL_SENDTO, + CSIDL_STARTMENU, + CSIDL_MYMUSIC, + CSIDL_MYVIDEO, + CSIDL_DESKTOPDIRECTORY, + CSIDL_NETHOOD, + CSIDL_TEMPLATES, + CSIDL_PRINTHOOD, + CSIDL_LOCAL_APPDATA, + CSIDL_INTERNET_CACHE, + CSIDL_COOKIES, + CSIDL_HISTORY, + CSIDL_MYPICTURES, + CSIDL_FONTS + }; + WCHAR userShellFolderPath[MAX_PATH], shellFolderPath[MAX_PATH]; + LPCWSTR pUserShellFolderPath, pShellFolderPath; + HRESULT hr = S_OK; + HKEY hRootKey; + HANDLE hToken; + + TRACE("%s\n", bDefault ? "TRUE" : "FALSE"); + if (bDefault) + { + hToken = (HANDLE)-1; + hRootKey = HKEY_USERS; + wcscpy(userShellFolderPath, DefaultW); + PathAddBackslashW(userShellFolderPath); + wcscat(userShellFolderPath, szSHUserFolders); + pUserShellFolderPath = userShellFolderPath; + wcscpy(shellFolderPath, DefaultW); + PathAddBackslashW(shellFolderPath); + wcscat(shellFolderPath, szSHFolders); + pShellFolderPath = shellFolderPath; + } + else + { + hToken = NULL; + hRootKey = HKEY_CURRENT_USER; + pUserShellFolderPath = szSHUserFolders; + pShellFolderPath = szSHFolders; + } + + hr = _SHRegisterFolders(hRootKey, hToken, pUserShellFolderPath, + pShellFolderPath, folders, sizeof(folders) / sizeof(folders[0])); + TRACE("returning 0x%08x\n", hr); + return hr; +} + +static HRESULT _SHRegisterCommonShellFolders(void) +{ + static const UINT folders[] = { + CSIDL_COMMON_STARTMENU, + CSIDL_COMMON_PROGRAMS, + CSIDL_COMMON_STARTUP, + CSIDL_COMMON_DESKTOPDIRECTORY, + CSIDL_COMMON_FAVORITES, + CSIDL_COMMON_APPDATA, + CSIDL_COMMON_TEMPLATES, + CSIDL_COMMON_DOCUMENTS, + }; + HRESULT hr; + + TRACE("\n"); + hr = _SHRegisterFolders(HKEY_LOCAL_MACHINE, NULL, szSHUserFolders, + szSHFolders, folders, sizeof(folders) / sizeof(folders[0])); + TRACE("returning 0x%08x\n", hr); + return hr; +} + +/****************************************************************************** + * _SHAppendToUnixPath [Internal] + * + * Helper function for _SHCreateSymbolicLinks. Appends pwszSubPath (or the + * corresponding resource, if IS_INTRESOURCE) to the unix base path 'szBasePath' + * and replaces backslashes with slashes. + * + * PARAMS + * szBasePath [IO] The unix base path, which will be appended to (CP_UNXICP). + * pwszSubPath [I] Sub-path or resource id (use MAKEINTRESOURCEW). + * + * RETURNS + * Success: TRUE, + * Failure: FALSE + */ +static BOOL __inline _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) { + WCHAR wszSubPath[MAX_PATH]; + int cLen = strlen(szBasePath); + char *pBackslash; + + if (IS_INTRESOURCE(pwszSubPath)) { + if (!LoadStringW(shell32_hInstance, LOWORD(pwszSubPath), wszSubPath, MAX_PATH)) { + /* Fall back to hard coded defaults. */ + switch (LOWORD(pwszSubPath)) { + case IDS_PERSONAL: + wcscpy(wszSubPath, PersonalW); + break; + case IDS_MYMUSIC: + wcscpy(wszSubPath, My_MusicW); + break; + case IDS_MYPICTURES: + wcscpy(wszSubPath, My_PicturesW); + break; + case IDS_MYVIDEO: + wcscpy(wszSubPath, My_VideoW); + break; + default: + ERR("LoadString(%d) failed!\n", LOWORD(pwszSubPath)); + return FALSE; + } + } + } else { + wcscpy(wszSubPath, pwszSubPath); + } + + if (szBasePath[cLen-1] != '/') szBasePath[cLen++] = '/'; + + if (!WideCharToMultiByte(CP_ACP, 0, wszSubPath, -1, szBasePath + cLen, + FILENAME_MAX - cLen, NULL, NULL)) + { + return FALSE; + } + + pBackslash = szBasePath + cLen; + while ((pBackslash = strchr(pBackslash, '\\'))) *pBackslash = '/'; + + return TRUE; +} +#if 0 +/****************************************************************************** + * _SHCreateSymbolicLinks [Internal] + * + * Sets up symbol links for various shell folders to point into the users home + * directory. We do an educated guess about what the user would probably want: + * - If there is a 'My Documents' directory in $HOME, the user probably wants + * wine's 'My Documents' to point there. Furthermore, we imply that the user + * is a Windows lover and has no problem with wine creating 'My Pictures', + * 'My Music' and 'My Video' subfolders under '$HOME/My Documents', if those + * do not already exits. We put appropriate symbolic links in place for those, + * too. + * - If there is no 'My Documents' directory in $HOME, we let 'My Documents' + * point directly to $HOME. We assume the user to be a unix hacker who does not + * want wine to create anything anywhere besides the .wine directory. So, if + * there already is a 'My Music' directory in $HOME, we symlink the 'My Music' + * shell folder to it. But if not, we symlink it to $HOME directly. The same + * holds fo 'My Pictures' and 'My Video'. + * - The Desktop shell folder is symlinked to '$HOME/Desktop', if that does + * exists and left alone if not. + * ('My Music',... above in fact means LoadString(IDS_MYMUSIC)) + */ +static void _SHCreateSymbolicLinks(void) +{ + UINT aidsMyStuff[] = { IDS_MYPICTURES, IDS_MYVIDEO, IDS_MYMUSIC }, i; + int acsidlMyStuff[] = { CSIDL_MYPICTURES, CSIDL_MYVIDEO, CSIDL_MYMUSIC }; + WCHAR wszTempPath[MAX_PATH]; + char szPersonalTarget[FILENAME_MAX], *pszPersonal; + char szMyStuffTarget[FILENAME_MAX], *pszMyStuff; + char szDesktopTarget[FILENAME_MAX], *pszDesktop; + struct stat statFolder; + const char *pszHome; + HRESULT hr; + + /* Create all necessary profile sub-dirs up to 'My Documents' and get the unix path. */ + hr = SHGetFolderPathW(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL, + SHGFP_TYPE_DEFAULT, wszTempPath); + if (FAILED(hr)) return; + pszPersonal = wine_get_unix_file_name(wszTempPath); + if (!pszPersonal) return; + + pszHome = getenv("HOME"); + if (pszHome && !stat(pszHome, &statFolder) && S_ISDIR(statFolder.st_mode)) { + strcpy(szPersonalTarget, pszHome); + if (_SHAppendToUnixPath(szPersonalTarget, MAKEINTRESOURCEW(IDS_PERSONAL)) && + !stat(szPersonalTarget, &statFolder) && S_ISDIR(statFolder.st_mode)) + { + /* '$HOME/My Documents' exists. Create 'My Pictures', 'My Videos' and + * 'My Music' subfolders or fail silently if they already exist. */ + for (i = 0; i < sizeof(aidsMyStuff)/sizeof(aidsMyStuff[0]); i++) { + strcpy(szMyStuffTarget, szPersonalTarget); + if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i]))) + mkdir(szMyStuffTarget); + } + } + else + { + /* '$HOME/My Documents' doesn't exists, but '$HOME' does. */ + strcpy(szPersonalTarget, pszHome); + } + + /* Replace 'My Documents' directory with a symlink of fail silently if not empty. */ + rmdir(pszPersonal); + symlink(szPersonalTarget, pszPersonal); + } + else + { + /* '$HOME' doesn't exist. Create 'My Pictures', 'My Videos' and 'My Music' subdirs + * in '%USERPROFILE%\\My Documents' or fail silently if they already exist. */ + strcpy(szPersonalTarget, pszPersonal); + for (i = 0; i < sizeof(aidsMyStuff)/sizeof(aidsMyStuff[0]); i++) { + strcpy(szMyStuffTarget, szPersonalTarget); + if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i]))) + mkdir(szMyStuffTarget); + } + } + + /* Create symbolic links for 'My Pictures', 'My Video' and 'My Music'. */ + for (i=0; i < sizeof(aidsMyStuff)/sizeof(aidsMyStuff[0]); i++) { + /* Create the current 'My Whatever' folder and get it's unix path. */ + hr = SHGetFolderPathW(NULL, acsidlMyStuff[i]|CSIDL_FLAG_CREATE, NULL, + SHGFP_TYPE_DEFAULT, wszTempPath); + if (FAILED(hr)) continue; + pszMyStuff = wine_get_unix_file_name(wszTempPath); + if (!pszMyStuff) continue; + + strcpy(szMyStuffTarget, szPersonalTarget); + if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])) && + !stat(szMyStuffTarget, &statFolder) && S_ISDIR(statFolder.st_mode)) + { + /* If there's a 'My Whatever' directory where 'My Documents' links to, link to it. */ + rmdir(pszMyStuff); + symlink(szMyStuffTarget, pszMyStuff); + } + else + { + /* Else link to where 'My Documents' itself links to. */ + rmdir(pszMyStuff); + symlink(szPersonalTarget, pszMyStuff); + } + HeapFree(GetProcessHeap(), 0, pszMyStuff); + } + + /* Last but not least, the Desktop folder */ + if (pszHome) + strcpy(szDesktopTarget, pszHome); + else + strcpy(szDesktopTarget, pszPersonal); + HeapFree(GetProcessHeap(), 0, pszPersonal); + + if (_SHAppendToUnixPath(szDesktopTarget, DesktopW) && + !stat(szDesktopTarget, &statFolder) && S_ISDIR(statFolder.st_mode)) + { + hr = SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, NULL, + SHGFP_TYPE_DEFAULT, wszTempPath); + if (SUCCEEDED(hr) && (pszDesktop = wine_get_unix_file_name(wszTempPath))) + { + rmdir(pszDesktop); + symlink(szDesktopTarget, pszDesktop); + HeapFree(GetProcessHeap(), 0, pszDesktop); + } + } +} +#endif + +/* Register the default values in the registry, as some apps seem to depend + * on their presence. The set registered was taken from Windows XP. + */ +HRESULT SHELL_RegisterShellFolders(void) +{ + HRESULT hr; + + /* Set up '$HOME' targeted symlinks for 'My Documents', 'My Pictures', + * 'My Video', 'My Music' and 'Desktop' in advance, so that the + * _SHRegister*ShellFolders() functions will find everything nice and clean + * and thus will not attempt to create them in the profile directory. */ +#if 0 + _SHCreateSymbolicLinks(); +#endif + + hr = _SHRegisterUserShellFolders(TRUE); + if (SUCCEEDED(hr)) + hr = _SHRegisterUserShellFolders(FALSE); + if (SUCCEEDED(hr)) + hr = _SHRegisterCommonShellFolders(); + return hr; +} + +/************************************************************************* + * SHGetSpecialFolderPathA [SHELL32.@] + */ +BOOL WINAPI SHGetSpecialFolderPathA ( + HWND hwndOwner, + LPSTR szPath, + int nFolder, + BOOL bCreate) +{ + return (SHGetFolderPathA( + hwndOwner, + nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), + NULL, + 0, + szPath)) == S_OK ? TRUE : FALSE; +} + +/************************************************************************* + * SHGetSpecialFolderPathW + */ +BOOL WINAPI SHGetSpecialFolderPathW ( + HWND hwndOwner, + LPWSTR szPath, + int nFolder, + BOOL bCreate) +{ + return (SHGetFolderPathW( + hwndOwner, + nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), + NULL, + 0, + szPath)) == S_OK ? TRUE : FALSE; +} + +/************************************************************************* + * SHGetFolderLocation [SHELL32.@] + * + * Gets the folder locations from the registry and creates a pidl. + * + * PARAMS + * hwndOwner [I] + * nFolder [I] CSIDL_xxxxx + * hToken [I] token representing user, or NULL for current user, or -1 for + * default user + * dwReserved [I] must be zero + * ppidl [O] PIDL of a special folder + * + * RETURNS + * Success: S_OK + * Failure: Standard OLE-defined error result, S_FALSE or E_INVALIDARG + * + * NOTES + * Creates missing reg keys and directories. + * Mostly forwards to SHGetFolderPathW, but a few values of nFolder return + * virtual folders that are handled here. + */ +HRESULT WINAPI SHGetFolderLocation( + HWND hwndOwner, + int nFolder, + HANDLE hToken, + DWORD dwReserved, + LPITEMIDLIST *ppidl) +{ + HRESULT hr = E_INVALIDARG; + + TRACE("%p 0x%08x %p 0x%08x %p\n", + hwndOwner, nFolder, hToken, dwReserved, ppidl); + + if (!ppidl) + return E_INVALIDARG; + if (dwReserved) + return E_INVALIDARG; + + /* The virtual folders' locations are not user-dependent */ + *ppidl = NULL; + switch (nFolder) + { + case CSIDL_DESKTOP: + *ppidl = _ILCreateDesktop(); + break; + + case CSIDL_PERSONAL: + *ppidl = _ILCreateMyDocuments(); + break; + + case CSIDL_INTERNET: + *ppidl = _ILCreateIExplore(); + break; + + case CSIDL_CONTROLS: + *ppidl = _ILCreateControlPanel(); + break; + + case CSIDL_PRINTERS: + *ppidl = _ILCreatePrinters(); + break; + + case CSIDL_BITBUCKET: + *ppidl = _ILCreateBitBucket(); + break; + + case CSIDL_DRIVES: + *ppidl = _ILCreateMyComputer(); + break; + + case CSIDL_NETWORK: + *ppidl = _ILCreateNetwork(); + break; + + default: + { + WCHAR szPath[MAX_PATH]; + + hr = SHGetFolderPathW(hwndOwner, nFolder, hToken, + SHGFP_TYPE_CURRENT, szPath); + if (SUCCEEDED(hr)) + { + DWORD attributes=0; + + TRACE("Value=%s\n", debugstr_w(szPath)); + hr = SHILCreateFromPathW(szPath, ppidl, &attributes); + } + else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) + { + /* unlike SHGetFolderPath, SHGetFolderLocation in shell32 + * version 6.0 returns E_FAIL for nonexistent paths + */ + hr = E_FAIL; + } + } + } + if(*ppidl) + hr = NOERROR; + + TRACE("-- (new pidl %p)\n",*ppidl); + return hr; +} + +/************************************************************************* + * SHGetSpecialFolderLocation [SHELL32.@] + * + * NOTES + * In NT5, SHGetSpecialFolderLocation needs the /Recent + * directory. + */ +HRESULT WINAPI SHGetSpecialFolderLocation( + HWND hwndOwner, + INT nFolder, + LPITEMIDLIST * ppidl) +{ + HRESULT hr = E_INVALIDARG; + + TRACE("(%p,0x%x,%p)\n", hwndOwner,nFolder,ppidl); + + if (!ppidl) + return E_INVALIDARG; + + hr = SHGetFolderLocation(hwndOwner, nFolder, NULL, 0, ppidl); + return hr; +} diff --git a/dll/win32/shell32_new/shellreg.cpp b/dll/win32/shell32_new/shellreg.cpp new file mode 100644 index 00000000000..5cd665f22c6 --- /dev/null +++ b/dll/win32/shell32_new/shellreg.cpp @@ -0,0 +1,144 @@ +/* + * Shell Registry Access + * + * Copyright 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************************************************************* + * SHRegOpenKeyA [SHELL32.506] + * + */ +EXTERN_C HRESULT WINAPI SHRegOpenKeyA( + HKEY hKey, + LPSTR lpSubKey, + PHKEY phkResult) +{ + TRACE("(%p, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult); + return RegOpenKeyA(hKey, lpSubKey, phkResult); +} + +/************************************************************************* + * SHRegOpenKeyW [SHELL32.507] NT 4.0 + * + */ +EXTERN_C HRESULT WINAPI SHRegOpenKeyW ( + HKEY hkey, + LPCWSTR lpszSubKey, + PHKEY retkey) +{ + WARN("%p %s %p\n",hkey,debugstr_w(lpszSubKey),retkey); + return RegOpenKeyW( hkey, lpszSubKey, retkey ); +} + +/************************************************************************* + * SHRegQueryValueA [SHELL32.508] + * + */ +EXTERN_C HRESULT WINAPI SHRegQueryValueA(HKEY hkey, LPSTR lpSubKey, LPSTR lpValue, LPDWORD lpcbValue) +{ + TRACE("(%p %s %p %p)\n", hkey, debugstr_a(lpSubKey), lpValue, lpcbValue); + return RegQueryValueA(hkey, lpSubKey, lpValue, (LONG*)lpcbValue); +} + +/************************************************************************* + * SHRegQueryValueExA [SHELL32.509] + * + */ +EXTERN_C HRESULT WINAPI SHRegQueryValueExA( + HKEY hkey, + LPSTR lpValueName, + LPDWORD lpReserved, + LPDWORD lpType, + LPBYTE lpData, + LPDWORD lpcbData) +{ + TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData); + return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData); +} + +/************************************************************************* + * SHRegQueryValueW [SHELL32.510] NT4.0 + * + */ +EXTERN_C HRESULT WINAPI SHRegQueryValueW( + HKEY hkey, + LPWSTR lpszSubKey, + LPWSTR lpszData, + LPDWORD lpcbData ) +{ + WARN("%p %s %p %p semi-stub\n", + hkey, debugstr_w(lpszSubKey), lpszData, lpcbData); + return RegQueryValueW( hkey, lpszSubKey, lpszData, (LONG*)lpcbData ); +} + +/************************************************************************* + * SHRegQueryValueExW [SHELL32.511] NT4.0 + * + * FIXME + * if the datatype REG_EXPAND_SZ then expand the string and change + * *pdwType to REG_SZ. + */ +EXTERN_C HRESULT WINAPI SHRegQueryValueExW ( + HKEY hkey, + LPWSTR pszValue, + LPDWORD pdwReserved, + LPDWORD pdwType, + LPVOID pvData, + LPDWORD pcbData) +{ + DWORD ret; + WARN("%p %s %p %p %p %p semi-stub\n", + hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData); + ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, (LPBYTE)pvData, pcbData); + return ret; +} + +/************************************************************************* + * SHRegDeleteKeyA [SHELL32.?] + */ +HRESULT WINAPI SHRegDeleteKeyA( + HKEY hkey, + LPCSTR pszSubKey) +{ + FIXME("hkey=%p, %s\n", hkey, debugstr_a(pszSubKey)); + return 0; +} + +/************************************************************************* + * SHRegDeleteKeyW [SHELL32.512] + */ +EXTERN_C HRESULT WINAPI SHRegDeleteKeyW( + HKEY hkey, + LPCWSTR pszSubKey) +{ + FIXME("hkey=%p, %s\n", hkey, debugstr_w(pszSubKey)); + return 0; +} + +/************************************************************************* + * SHRegCloseKey [SHELL32.505] NT 4.0 + * + */ +EXTERN_C HRESULT WINAPI SHRegCloseKey (HKEY hkey) +{ + TRACE("%p\n",hkey); + return RegCloseKey( hkey ); +} diff --git a/dll/win32/shell32_new/shellstring.cpp b/dll/win32/shell32_new/shellstring.cpp new file mode 100644 index 00000000000..073270ad149 --- /dev/null +++ b/dll/win32/shell32_new/shellstring.cpp @@ -0,0 +1,264 @@ +/* + * Copyright 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************* STRRET functions ****************************/ + +BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) +{ + TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", + dest,len,src, + (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : + (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : + (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", + pidl); + + if (!dest) + return FALSE; + + switch (src->uType) + { + case STRRET_WSTR: + WideCharToMultiByte(CP_ACP, 0, src->pOleStr, -1, dest, len, NULL, NULL); + CoTaskMemFree(src->pOleStr); + break; + + case STRRET_CSTR: + lstrcpynA(dest, src->cStr, len); + break; + + case STRRET_OFFSET: + lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->uOffset, len); + break; + + default: + FIXME("unknown type!\n"); + if (len) *dest = '\0'; + return FALSE; + } + TRACE("-- %s\n", debugstr_a(dest) ); + return TRUE; +} + +/************************************************************************/ + +BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) +{ + TRACE("dest=%p len=0x%x strret=%p(%s) pidl=%p\n", + dest,len,src, + (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : + (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : + (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", + pidl); + + if (!dest) + return FALSE; + + switch (src->uType) + { + case STRRET_WSTR: + lstrcpynW(dest, src->pOleStr, len); + CoTaskMemFree(src->pOleStr); + break; + + case STRRET_CSTR: + if (!MultiByteToWideChar( CP_ACP, 0, src->cStr, -1, dest, len ) && len) + dest[len-1] = 0; + break; + + case STRRET_OFFSET: + if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->uOffset, -1, dest, len ) && len) + dest[len-1] = 0; + break; + + default: + FIXME("unknown type!\n"); + if (len) *dest = '\0'; + return FALSE; + } + return TRUE; +} + + +/************************************************************************* + * StrRetToStrN [SHELL32.96] + * + * converts a STRRET to a normal string + * + * NOTES + * the pidl is for STRRET OFFSET + */ +EXTERN_C BOOL WINAPI StrRetToStrNAW(LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) +{ + if(SHELL_OsIsUnicode()) + return StrRetToStrNW((LPWSTR)dest, len, src, pidl); + else + return StrRetToStrNA((LPSTR)dest, len, src, pidl); +} + +/************************* OLESTR functions ****************************/ + +/************************************************************************ + * StrToOleStr [SHELL32.163] + * + */ +int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString) +{ + TRACE("(%p, %p %s)\n", + lpWideCharStr, lpMultiByteString, debugstr_a(lpMultiByteString)); + + return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH); + +} +int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString) +{ + TRACE("(%p, %p %s)\n", + lpWideCharStr, lpWString, debugstr_w(lpWString)); + + wcscpy (lpWideCharStr, lpWString ); + return wcslen(lpWideCharStr); +} + +EXTERN_C BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString) +{ + if (SHELL_OsIsUnicode()) + return StrToOleStrW (lpWideCharStr, (LPCWSTR)lpString); + return StrToOleStrA (lpWideCharStr, (LPCSTR)lpString); +} + +/************************************************************************* + * StrToOleStrN [SHELL32.79] + * lpMulti, nMulti, nWide [IN] + * lpWide [OUT] + */ +BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr) +{ + TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_an(lpStrA,nStr), nStr); + return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide); +} +BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr) +{ + TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_wn(lpStrW, nStr), nStr); + + if (lstrcpynW (lpWide, lpStrW, nWide)) + { return wcslen (lpWide); + } + return 0; +} + +EXTERN_C BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr) +{ + if (SHELL_OsIsUnicode()) + return StrToOleStrNW (lpWide, nWide, (LPCWSTR)lpStr, nStr); + return StrToOleStrNA (lpWide, nWide, (LPCSTR)lpStr, nStr); +} + +/************************************************************************* + * OleStrToStrN [SHELL32.78] + */ +BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle) +{ + TRACE("(%p, %x, %s, %x)\n", lpStr, nStr, debugstr_wn(lpOle,nOle), nOle); + return WideCharToMultiByte (0, 0, lpOle, nOle, lpStr, nStr, NULL, NULL); +} + +BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle) +{ + TRACE("(%p, %x, %s, %x)\n", lpwStr, nwStr, debugstr_wn(lpOle,nOle), nOle); + + if (lstrcpynW ( lpwStr, lpOle, nwStr)) + { return wcslen (lpwStr); + } + return 0; +} + +EXTERN_C BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) +{ + if (SHELL_OsIsUnicode()) + return OleStrToStrNW ((LPWSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn); + return OleStrToStrNA ((LPSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn); +} + + +/************************************************************************* + * CheckEscapesA [SHELL32.@] + * + * Checks a string for special characters which are not allowed in a path + * and encloses it in quotes if that is the case. + * + * PARAMS + * string [I/O] string to check and on return eventually quoted + * len [I] length of string + * + * RETURNS + * length of actual string + * + * NOTES + * Not really sure if this function returns actually a value at all. + */ +DWORD WINAPI CheckEscapesA( + LPSTR string, /* [I/O] string to check ??*/ + DWORD len) /* [I] is 0 */ +{ + LPWSTR wString; + DWORD ret = 0; + + TRACE("(%s %d)\n", debugstr_a(string), len); + wString = (LPWSTR)LocalAlloc(LPTR, len * sizeof(WCHAR)); + if (wString) + { + MultiByteToWideChar(CP_ACP, 0, string, len, wString, len); + ret = CheckEscapesW(wString, len); + WideCharToMultiByte(CP_ACP, 0, wString, len, string, len, NULL, NULL); + LocalFree(wString); + } + return ret; +} + +static const WCHAR strEscapedChars[] = {' ','"',',',';','^',0}; + +/************************************************************************* + * CheckEscapesW [SHELL32.@] + * + * See CheckEscapesA. + */ +DWORD WINAPI CheckEscapesW( + LPWSTR string, + DWORD len) +{ + DWORD size = wcslen(string); + LPWSTR s, d; + + TRACE("(%s %d) stub\n", debugstr_w(string), len); + + if (StrPBrkW(string, strEscapedChars) && size + 2 <= len) + { + s = &string[size - 1]; + d = &string[size + 2]; + *d-- = 0; + *d-- = '"'; + for (;d > string;) + *d-- = *s--; + *d = '"'; + return size + 2; + } + return size; +} diff --git a/dll/win32/shell32_new/shfldr.h b/dll/win32/shell32_new/shfldr.h new file mode 100644 index 00000000000..886f36619b8 --- /dev/null +++ b/dll/win32/shell32_new/shfldr.h @@ -0,0 +1,78 @@ + +/* + * Virtual Folder + * common definitions + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHFLDR_H_ +#define _SHFLDR_H_ + +#define CHARS_IN_GUID 39 + +typedef struct { + int colnameid; + int pcsFlags; + int fmt; + int cxChar; +} shvheader; + +#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00) +#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF) + +BOOL SHELL32_GetCustomFolderAttribute (LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, LPWSTR pwszValue, DWORD cchValue); + +LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut); +HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST * pidlInOut, + LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes); +HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes); +HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPWSTR szOut, + DWORD dwOutLen); + +HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, + LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut); + +HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); +LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path); + +static int __inline SHELL32_GUIDToStringA (REFGUID guid, LPSTR str) +{ + return sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], + guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); +} + +static int __inline SHELL32_GUIDToStringW (REFGUID guid, LPWSTR str) +{ + static const WCHAR fmtW[] = + { '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-', + '%','0','2','x','%','0','2','x','-', + '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x', + '%','0','2','x','%','0','2','x','}',0 }; + return swprintf(str, fmtW, + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], + guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); +} + +void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath, DWORD dwFlags); +BOOL SHELL_FS_HideExtension(LPWSTR pwszPath); + +#endif // _SHFLDR_H_ diff --git a/dll/win32/shell32_new/shfldr_admintools.cpp b/dll/win32/shell32_new/shfldr_admintools.cpp new file mode 100644 index 00000000000..756228e31bf --- /dev/null +++ b/dll/win32/shell32_new/shfldr_admintools.cpp @@ -0,0 +1,589 @@ +/* + * Virtual Admin Tools Folder + * + * Copyright 2008 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_admintools.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + + +/* +This folder should not exist. It is just a file system folder... +*/ + +/* List shortcuts of + * CSIDL_COMMON_ADMINTOOLS + * Note: CSIDL_ADMINTOOLS is ignored, tested with Window XP SP3+ + */ + +/*********************************************************************** + * AdminTools folder implementation + */ + +class CDesktopFolderEnumY : + public IEnumIDListImpl +{ +private: +public: + CDesktopFolderEnumY(); + ~CDesktopFolderEnumY(); + HRESULT WINAPI Initialize(LPWSTR szTarget, DWORD dwFlags); + +BEGIN_COM_MAP(CDesktopFolderEnumY) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +static const shvheader AdminToolsSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12} +}; + +#define COLUMN_NAME 0 +#define COLUMN_SIZE 1 +#define COLUMN_TYPE 2 +#define COLUMN_DATE 3 + +#define AdminToolsHELLVIEWCOLUMNS (4) + +CDesktopFolderEnumY::CDesktopFolderEnumY() +{ +} + +CDesktopFolderEnumY::~CDesktopFolderEnumY() +{ +} + +HRESULT WINAPI CDesktopFolderEnumY::Initialize(LPWSTR szTarget, DWORD dwFlags) +{ + TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags); + /* enumerate the elements in %windir%\desktop */ + return CreateFolderEnumList(szTarget, dwFlags); +} + +CAdminToolsFolder::CAdminToolsFolder() +{ + pclsid = NULL; + + pidlRoot = NULL; /* absolute pidl */ + szTarget = NULL; + + dwAttributes = 0; /* attributes returned by GetAttributesOf FIXME: use it */ +} + +CAdminToolsFolder::~CAdminToolsFolder() +{ + TRACE ("-- destroying IShellFolder(%p)\n", this); + if (pidlRoot) + SHFree(pidlRoot); + HeapFree(GetProcessHeap(), 0, szTarget); +} + +HRESULT WINAPI CAdminToolsFolder::FinalConstruct() +{ + szTarget = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); + if (szTarget == NULL) + return E_OUTOFMEMORY; + if (!SHGetSpecialFolderPathW(NULL, szTarget, CSIDL_COMMON_ADMINTOOLS, FALSE)) + return E_FAIL; + + pidlRoot = _ILCreateAdminTools(); /* my qualified pidl */ + if (pidlRoot == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +/************************************************************************** + * ISF_AdminTools_fnParseDisplayName + * + */ +HRESULT WINAPI CAdminToolsFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; + + MessageBoxW(NULL, lpszDisplayName, L"ParseDisplayName", MB_OK); + + return E_NOTIMPL; +} + +/************************************************************************** + * ISF_AdminTools_fnEnumObjects + */ +HRESULT WINAPI CAdminToolsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (szTarget, dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** + * ISF_AdminTools_fnBindToObject + */ +HRESULT WINAPI CAdminToolsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild (pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** + * ISF_AdminTools_fnBindToStorage + */ +HRESULT WINAPI CAdminToolsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", + this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** + * ISF_AdminTools_fnCompareIDs + */ +HRESULT WINAPI CAdminToolsFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** + * ISF_AdminTools_fnCreateViewObject + */ +HRESULT WINAPI CAdminToolsFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) +{ + CComPtr pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", this, + hwndOwner, shdebugstr_guid (&riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) + hr = pShellView->QueryInterface(riid, ppvOut); + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** + * ISF_AdminTools_fnGetAttributesOf + */ +HRESULT WINAPI CAdminToolsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut) +{ + HRESULT hr = S_OK; + static const DWORD dwAdminToolsAttributes = + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", + this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if(cidl == 0) { + *rgfInOut &= dwAdminToolsAttributes; + } else { + while (cidl > 0 && *apidl) { + pdump (*apidl); + if (_ILIsAdminTools(*apidl)) { + *rgfInOut &= dwAdminToolsAttributes; + } else { + SHELL32_GetItemAttributes (this, *apidl, rgfInOut); + } + apidl++; + cidl--; + } + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + + return hr; +} + +/************************************************************************** + * ISF_AdminTools_fnGetUIObjectOf + * + * PARAMETERS + * HWND hwndOwner, //[in ] Parent window for any output + * UINT cidl, //[in ] array size + * LPCITEMIDLIST* apidl, //[in ] simple pidl array + * REFIID riid, //[in ] Requested Interface + * UINT* prgfInOut, //[ ] reserved + * LPVOID* ppvObject) //[out] Resulting Interface + * + */ +HRESULT WINAPI CAdminToolsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, + REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + CComPtr pObj; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + this, hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IContextMenu)) + { + hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder *)this, NULL, 0, NULL, (IContextMenu **)&pObj); + } + else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1)) + { + hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } + else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IExtractIconW) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) + { + hr = this->QueryInterface(IID_IDropTarget, (LPVOID *)&pObj); + } + else if ((IsEqualIID(riid, IID_IShellLinkW) || + IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); + SHFree (pidl); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj.Detach(); + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +/************************************************************************** + * ISF_AdminTools_fnGetDisplayNameOf + * + */ +HRESULT WINAPI CAdminToolsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + HRESULT hr = S_OK; + LPWSTR pszPath, pOffset; + + TRACE ("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH +1) * sizeof(WCHAR)); + if (!pszPath) + return E_OUTOFMEMORY; + + ZeroMemory(pszPath, (MAX_PATH +1) * sizeof(WCHAR)); + + if (_ILIsAdminTools (pidl)) + { + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && + (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)) + wcscpy(pszPath, szTarget); + else if (!HCR_GetClassNameW(CLSID_AdminFolderShortcut, pszPath, MAX_PATH)) + hr = E_FAIL; + } + else if (_ILIsPidlSimple(pidl)) + { + if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && + szTarget) + { + wcscpy(pszPath, szTarget); + pOffset = PathAddBackslashW(pszPath); + if (pOffset) + { + if (!_ILSimpleGetTextW(pidl, pOffset, MAX_PATH + 1 - (pOffset - pszPath))) + hr = E_FAIL; + } + else + hr = E_FAIL; + } + else + { + if (_ILSimpleGetTextW(pidl, pszPath, MAX_PATH + 1)) + { + if (SHELL_FS_HideExtension(pszPath)) + PathRemoveExtensionW(pszPath); + } + else + hr = E_FAIL; + } + } + else if (_ILIsSpecialFolder(pidl)) + { + BOOL bSimplePidl = _ILIsPidlSimple(pidl); + + if (bSimplePidl) + { + if (!_ILSimpleGetTextW(pidl, pszPath, MAX_PATH)) + hr = E_FAIL; + } + else if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) + { + int len = 0; + + wcscpy(pszPath, szTarget); + PathAddBackslashW(pszPath); + len = wcslen(pszPath); + + if (!SUCCEEDED(SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags | SHGDN_INFOLDER, pszPath + len, MAX_PATH + 1 - len))) + { + CoTaskMemFree(pszPath); + return E_OUTOFMEMORY; + } + + } + } + + if (SUCCEEDED(hr)) + { + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszPath; + TRACE ("-- (%p)->(%s,0x%08x)\n", this, debugstr_w(strRet->pOleStr), hr); + } + else + CoTaskMemFree(pszPath); + + return hr; +} + +/************************************************************************** + * ISF_AdminTools_fnSetNameOf + * Changes the name of a file object or subfolder, possibly changing its item + * identifier in the process. + * + * PARAMETERS + * HWND hwndOwner, //[in ] Owner window for output + * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change + * LPCOLESTR lpszName, //[in ] the items new display name + * DWORD dwFlags, //[in ] SHGNO formatting flags + * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned + */ +HRESULT WINAPI CAdminToolsFolder::SetNameOf (HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", this, hwndOwner, pidl, + debugstr_w (lpName), dwFlags, pPidlOut); + + return E_FAIL; +} + +HRESULT WINAPI CAdminToolsFolder::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CAdminToolsFolder::EnumSearches(IEnumExtraSearch ** ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CAdminToolsFolder::GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} +HRESULT WINAPI CAdminToolsFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) +{ + if (!pcsFlags || iColumn >= AdminToolsHELLVIEWCOLUMNS) + return E_INVALIDARG; + *pcsFlags = AdminToolsSFHeader[iColumn].pcsFlags; + return S_OK; + +} + +HRESULT WINAPI CAdminToolsFolder::GetDetailsEx (LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME ("(%p): stub\n", this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CAdminToolsFolder::GetDetailsOf (LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) +{ + WCHAR buffer[MAX_PATH] = {0}; + HRESULT hr = E_FAIL; + + TRACE("(%p)->(%p %i %p): stub\n", this, pidl, iColumn, psd); + + if (iColumn >= AdminToolsHELLVIEWCOLUMNS) + return E_FAIL; + + psd->fmt = AdminToolsSFHeader[iColumn].fmt; + psd->cxChar = AdminToolsSFHeader[iColumn].cxChar; + if (pidl == NULL) + { + psd->str.uType = STRRET_WSTR; + if (LoadStringW(shell32_hInstance, AdminToolsSFHeader[iColumn].colnameid, buffer, MAX_PATH)) + hr = SHStrDupW(buffer, &psd->str.pOleStr); + + return hr; + } + + psd->str.uType = STRRET_CSTR; + switch (iColumn) + { + case COLUMN_NAME: + psd->str.uType = STRRET_WSTR; + hr = GetDisplayNameOf(pidl, + SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case COLUMN_SIZE: + _ILGetFileSize (pidl, psd->str.cStr, MAX_PATH); + break; + case COLUMN_TYPE: + _ILGetFileType (pidl, psd->str.cStr, MAX_PATH); + break; + case COLUMN_DATE: + _ILGetFileDate (pidl, psd->str.cStr, MAX_PATH); + break; + } + + return hr; +} + +HRESULT WINAPI CAdminToolsFolder::MapColumnToSCID(UINT column, SHCOLUMNID *pscid) +{ + FIXME ("(%p): stub\n", this); + return E_NOTIMPL; +} + +/************************************************************************ + * IPF_AdminTools_GetClassID + */ +HRESULT WINAPI CAdminToolsFolder::GetClassID(CLSID *lpClassId) +{ + TRACE ("(%p)\n", this); + + memcpy(lpClassId, &CLSID_AdminFolderShortcut, sizeof(CLSID)); + + return S_OK; +} + +/************************************************************************ + * IPF_AdminTools_Initialize + * + */ +HRESULT WINAPI CAdminToolsFolder::Initialize(LPCITEMIDLIST pidl) +{ + if (pidlRoot) + SHFree((LPVOID)pidlRoot); + + pidlRoot = ILClone(pidl); + return S_OK; +} + +/************************************************************************** + * IPF_AdminTools_fnGetCurFolder + */ +HRESULT WINAPI CAdminToolsFolder::GetCurFolder(LPITEMIDLIST *pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + *pidl = ILClone (pidlRoot); + return S_OK; +} diff --git a/dll/win32/shell32_new/shfldr_admintools.h b/dll/win32/shell32_new/shfldr_admintools.h new file mode 100644 index 00000000000..98f7df361e9 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_admintools.h @@ -0,0 +1,87 @@ +/* + * Virtual Admin Tools Folder + * + * Copyright 2008 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _SHFLDR_ADMINTOOLS_H_ +#define _SHFLDR_ADMINTOOLS_H_ + +class CAdminToolsFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2 +{ +private: + CLSID *pclsid; + + LPITEMIDLIST pidlRoot; /* absolute pidl */ + LPWSTR szTarget; + + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ +public: + CAdminToolsFolder(); + ~CAdminToolsFolder(); + HRESULT WINAPI FinalConstruct(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + +DECLARE_REGISTRY_RESOURCEID(IDR_ADMINFOLDERSHORTCUT) +DECLARE_NOT_AGGREGATABLE(CAdminToolsFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CAdminToolsFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) +END_COM_MAP() +}; + +#endif // _SHFLDR_ADMINTOOLS_H_ diff --git a/dll/win32/shell32_new/shfldr_cpanel.cpp b/dll/win32/shell32_new/shfldr_cpanel.cpp new file mode 100644 index 00000000000..5f72b859c12 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_cpanel.cpp @@ -0,0 +1,1078 @@ +/* + * Control panel folder + * + * Copyright 2003 Martin Fuchs + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* +TODO: +1. The selected items list should not be stored in CControlPanelFolder, it should + be a result returned by an internal method. +*/ + +#include +#include +#include +#include +#include +#include "shfldr_cpanel.h" +#include "shelllink.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/*********************************************************************** +* control panel implementation in shell namespace +*/ + +class CControlPanelEnum : + public IEnumIDListImpl +{ +private: +public: + CControlPanelEnum(); + ~CControlPanelEnum(); + HRESULT WINAPI Initialize(DWORD dwFlags); + BOOL SHELL_RegisterCPanelApp(LPCSTR path); + int SHELL_RegisterRegistryCPanelApps(HKEY hkey_root, LPCSTR szRepPath); + int SHELL_RegisterCPanelFolders(HKEY hkey_root, LPCSTR szRepPath); + BOOL CreateCPanelEnumList(DWORD dwFlags); + +BEGIN_COM_MAP(CControlPanelEnum) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +/*********************************************************************** +* IShellFolder [ControlPanel] implementation +*/ + +static const shvheader ControlPanelSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ + {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ +}; + +#define CONROLPANELSHELLVIEWCOLUMNS 2 + +CControlPanelEnum::CControlPanelEnum() +{ +} + +CControlPanelEnum::~CControlPanelEnum() +{ +} + +HRESULT WINAPI CControlPanelEnum::Initialize(DWORD dwFlags) +{ + if (CreateCPanelEnumList(dwFlags) == FALSE) + return E_FAIL; + return S_OK; +} + +static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, LPCSTR comment, int iconIdx) +{ + PIDLCPanelStruct *p; + LPITEMIDLIST pidl; + PIDLDATA tmp; + int size0 = (char*)&tmp.u.cpanel.szName - (char*)&tmp.u.cpanel; + int size = size0; + int l; + + tmp.type = PT_CPLAPPLET; + tmp.u.cpanel.dummy = 0; + tmp.u.cpanel.iconIdx = iconIdx; + + l = strlen(name); + size += l + 1; + + tmp.u.cpanel.offsDispName = l+1; + l = strlen(displayName); + size += l + 1; + + tmp.u.cpanel.offsComment = tmp.u.cpanel.offsDispName + 1 + l; + l = strlen(comment); + size += l + 1; + + pidl = (LPITEMIDLIST)SHAlloc(size + 4); + if (!pidl) + return NULL; + + pidl->mkid.cb = size + 2; + memcpy(pidl->mkid.abID, &tmp, 2 + size0); + + p = &((PIDLDATA *)pidl->mkid.abID)->u.cpanel; + strcpy(p->szName, name); + strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); + strcpy(p->szName+tmp.u.cpanel.offsComment, comment); + + *(WORD*)((char*)pidl + (size + 2)) = 0; + + pcheck(pidl); + + return pidl; +} + +/************************************************************************** + * _ILGetCPanelPointer() + * gets a pointer to the control panel struct stored in the pidl + */ +static PIDLCPanelStruct *_ILGetCPanelPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type == PT_CPLAPPLET) + return (PIDLCPanelStruct *)&(pdata->u.cpanel); + + return NULL; +} + +BOOL CControlPanelEnum::SHELL_RegisterCPanelApp(LPCSTR path) +{ + LPITEMIDLIST pidl; + CPlApplet* applet; + CPanel panel; + CPLINFO info; + unsigned i; + int iconIdx; + + char displayName[MAX_PATH]; + char comment[MAX_PATH]; + + WCHAR wpath[MAX_PATH]; + + MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH); + + panel.first = NULL; + applet = Control_LoadApplet(0, wpath, &panel); + + if (applet) + { + for (i = 0; i < applet->count; ++i) + { + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0); + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0); + + applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info); + + if (info.idIcon > 0) + iconIdx = -info.idIcon; /* negative icon index instead of icon number */ + else + iconIdx = 0; + + pidl = _ILCreateCPanelApplet(path, displayName, comment, iconIdx); + + if (pidl) + AddToEnumList(pidl); + } + Control_UnloadApplet(applet); + } + return TRUE; +} + +int CControlPanelEnum::SHELL_RegisterRegistryCPanelApps(HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + char value[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + + for(; ; idx++) + { + DWORD nameLen = MAX_PATH; + DWORD valueLen = MAX_PATH; + + if (RegEnumValueA(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS) + break; + + if (SHELL_RegisterCPanelApp(value)) + ++cnt; + } + RegCloseKey(hkey); + } + + return cnt; +} + +int CControlPanelEnum::SHELL_RegisterCPanelFolders(HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + for (; ; idx++) + { + if (RegEnumKeyA(hkey, idx, name, MAX_PATH) != ERROR_SUCCESS) + break; + + if (*name == '{') + { + LPITEMIDLIST pidl = _ILCreateGuidFromStrA(name); + + if (pidl && AddToEnumList(pidl)) + ++cnt; + } + } + + RegCloseKey(hkey); + } + + return cnt; +} + +/************************************************************************** + * CreateCPanelEnumList() + */ +BOOL CControlPanelEnum::CreateCPanelEnumList(DWORD dwFlags) +{ + CHAR szPath[MAX_PATH]; + WIN32_FIND_DATAA wfd; + HANDLE hFile; + + TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags); + + /* enumerate control panel folders */ + if (dwFlags & SHCONTF_FOLDERS) + SHELL_RegisterCPanelFolders(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); + + /* enumerate the control panel applets */ + if (dwFlags & SHCONTF_NONFOLDERS) + { + LPSTR p; + + GetSystemDirectoryA(szPath, MAX_PATH); + p = PathAddBackslashA(szPath); + strcpy(p, "*.cpl"); + + TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n", this, debugstr_a(szPath)); + hFile = FindFirstFileA(szPath, &wfd); + + if (hFile != INVALID_HANDLE_VALUE) + { + do + { + if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) + continue; + + if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + strcpy(p, wfd.cFileName); + if (strcmp(wfd.cFileName, "ncpa.cpl")) + SHELL_RegisterCPanelApp(szPath); + } + } while(FindNextFileA(hFile, &wfd)); + FindClose(hFile); + } + + SHELL_RegisterRegistryCPanelApps(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + SHELL_RegisterRegistryCPanelApps(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + } + return TRUE; +} + +CControlPanelFolder::CControlPanelFolder() +{ + pidlRoot = NULL; /* absolute pidl */ + dwAttributes = 0; /* attributes returned by GetAttributesOf FIXME: use it */ + apidl = NULL; + cidl = 0; +} + +CControlPanelFolder::~CControlPanelFolder() +{ + TRACE("-- destroying IShellFolder(%p)\n", this); + SHFree(pidlRoot); +} + +HRESULT WINAPI CControlPanelFolder::FinalConstruct() +{ + pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ + if (pidlRoot == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +/************************************************************************** +* ISF_ControlPanel_fnParseDisplayName +*/ +HRESULT WINAPI CControlPanelFolder::ParseDisplayName(HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + WCHAR szElement[MAX_PATH]; + LPCWSTR szNext = NULL; + LPITEMIDLIST pidlTemp = NULL; + HRESULT hr = S_OK; + CLSID clsid; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + if (!lpszDisplayName || !ppidl) + return E_INVALIDARG; + + *ppidl = 0; + + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') + { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + TRACE ("-- element: %s\n", debugstr_w (szElement)); + CLSIDFromString (szElement + 2, &clsid); + pidlTemp = _ILCreateGuid (PT_GUID, clsid); + } + else if( (pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, lpszDisplayName)) ) + { + *ppidl = pidlTemp; + return S_OK; + } + + if (SUCCEEDED(hr) && pidlTemp) + { + if (szNext && *szNext) + { + hr = SHELL32_ParseNextElement(this, hwndOwner, pbc, + &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); + } + else + { + if (pdwAttributes && *pdwAttributes) + hr = SHELL32_GetItemAttributes(this, + pidlTemp, pdwAttributes); + } + } + + *ppidl = pidlTemp; + + TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr); + + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnEnumObjects +*/ +HRESULT WINAPI CControlPanelFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToObject +*/ +HRESULT WINAPI CControlPanelFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", this, pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut); + + return SHELL32_BindToChild(pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToStorage +*/ +HRESULT WINAPI CControlPanelFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, pidl, pbcReserved, shdebugstr_guid(&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_ControlPanel_fnCompareIDs +*/ + +HRESULT WINAPI CControlPanelFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs(this, lParam, pidl1, pidl2); + TRACE("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_ControlPanel_fnCreateViewObject +*/ +HRESULT WINAPI CControlPanelFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + CComPtr pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(hwnd=%p,%s,%p)\n", this, hwndOwner, shdebugstr_guid(&riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, IID_IDropTarget)) { + WARN("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, IID_IContextMenu)) { + WARN("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, IID_IShellView)) { + hr = IShellView_Constructor((IShellFolder *)this, &pShellView); + if (pShellView) { + hr = pShellView->QueryInterface(riid, ppvOut); + } + } + } + TRACE("--(%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetAttributesOf +*/ +HRESULT WINAPI CControlPanelFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + HRESULT hr = S_OK; + + TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", + this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + while(cidl > 0 && *apidl) { + pdump(*apidl); + SHELL32_GetItemAttributes(this, *apidl, rgfInOut); + apidl++; + cidl--; + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +*/ +HRESULT WINAPI CControlPanelFolder::GetUIObjectOf(HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + this, hwndOwner, cidl, apidl, shdebugstr_guid(&riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, IID_IContextMenu) &&(cidl >= 1)) { + // TODO + // create a seperate item struct + // + pObj = (IContextMenu *)this; + this->apidl = apidl; + cidl = cidl; + pObj->AddRef(); + hr = S_OK; + } else if (IsEqualIID(riid, IID_IDataObject) &&(cidl >= 1)) { + hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } else if (IsEqualIID(riid, IID_IExtractIconA) &&(cidl == 1)) { + pidl = ILCombine(pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if (IsEqualIID(riid, IID_IExtractIconW) &&(cidl == 1)) { + pidl = ILCombine(pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if ((IsEqualIID(riid, IID_IShellLinkW) || IsEqualIID(riid, IID_IShellLinkA)) + && (cidl == 1)) { + pidl = ILCombine(pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); + SHFree(pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetDisplayNameOf +*/ +HRESULT WINAPI CControlPanelFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + CHAR szPath[MAX_PATH]; + WCHAR wszPath[MAX_PATH+1]; /* +1 for potential backslash */ + PIDLCPanelStruct* pcpanel; + + *szPath = '\0'; + + TRACE("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump(pidl); + + if (!pidl || !strRet) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(pidl); + + if (pcpanel) { + lstrcpyA(szPath, pcpanel->szName+pcpanel->offsDispName); + + if (!(dwFlags & SHGDN_FORPARSING)) + FIXME("retrieve display name from control panel app\n"); + } + /* take names of special folders only if it's only this folder */ + else if (_ILIsSpecialFolder(pidl)) { + BOOL bSimplePidl = _ILIsPidlSimple(pidl); + + if (bSimplePidl) { + _ILSimpleGetTextW(pidl, wszPath, MAX_PATH); /* append my own path */ + } else { + FIXME("special pidl\n"); + } + + if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ + int len = 0; + + PathAddBackslashW(wszPath); + len = wcslen(wszPath); + + if (!SUCCEEDED + (SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, wszPath + len, MAX_PATH + 1 - len))) + return E_OUTOFMEMORY; + if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) + wszPath[0] = '\0'; + } else { + if (bSimplePidl) { + if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) + wszPath[0] = '\0'; + } + } + } + + strRet->uType = STRRET_CSTR; + lstrcpynA(strRet->cStr, szPath, MAX_PATH); + + TRACE("--(%p)->(%s)\n", this, szPath); + return S_OK; +} + +/************************************************************************** +* ISF_ControlPanel_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +HRESULT WINAPI CControlPanelFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +HRESULT WINAPI CControlPanelFolder::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CControlPanelFolder::EnumSearches(IEnumExtraSearch **ppenum) +{ + FIXME("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CControlPanelFolder::GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + TRACE("(%p)\n", this); + + if (pSort) *pSort = 0; + if (pDisplay) *pDisplay = 0; + return S_OK; +} + +HRESULT WINAPI CControlPanelFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) +{ + TRACE("(%p)\n", this); + + if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; + *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; + return S_OK; +} + +HRESULT WINAPI CControlPanelFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CControlPanelFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) +{ + HRESULT hr; + + TRACE("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd); + + if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + psd->fmt = ControlPanelSFHeader[iColumn].fmt; + psd->cxChar = ControlPanelSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA(shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid, psd->str.cStr, MAX_PATH); + return S_OK; + } else { + psd->str.cStr[0] = 0x00; + psd->str.uType = STRRET_CSTR; + switch(iColumn) { + case 0: /* name */ + hr = GetDisplayNameOf(pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* comment */ + _ILGetFileType(pidl, psd->str.cStr, MAX_PATH); + break; + } + hr = S_OK; + } + + return hr; +} +HRESULT WINAPI CControlPanelFolder::MapColumnToSCID(UINT column, SHCOLUMNID *pscid) +{ + FIXME("(%p)\n", this); + return E_NOTIMPL; +} + +/************************************************************************ + * ICPanel_PersistFolder2_GetClassID + */ +HRESULT WINAPI CControlPanelFolder::GetClassID(CLSID *lpClassId) +{ + TRACE("(%p)\n", this); + + if (!lpClassId) + return E_POINTER; + *lpClassId = CLSID_ControlPanel; + + return S_OK; +} + +/************************************************************************ + * ICPanel_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +HRESULT WINAPI CControlPanelFolder::Initialize(LPCITEMIDLIST pidl) +{ + if (pidlRoot) + SHFree((LPVOID)pidlRoot); + + pidlRoot = ILClone(pidl); + return S_OK; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +HRESULT WINAPI CControlPanelFolder::GetCurFolder(LPITEMIDLIST * pidl) +{ + TRACE("(%p)->(%p)\n", this, pidl); + + if (!pidl) + return E_POINTER; + *pidl = ILClone(pidlRoot); + return S_OK; +} + +HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST pidl, LPWSTR szIconFile, UINT cchMax, int* piIndex) +{ + PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); + + if (!pcpanel) + return E_INVALIDARG; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); + *piIndex = (int)pcpanel->iconIdx != -1 ? pcpanel->iconIdx : 0; + + return S_OK; +} + + +/************************************************************************** +* IShellExecuteHookW Implementation +*/ + +HRESULT +ExecuteAppletFromCLSID(LPOLESTR pOleStr) +{ + WCHAR szCmd[MAX_PATH]; + WCHAR szExpCmd[MAX_PATH]; + PROCESS_INFORMATION pi; + STARTUPINFOW si; + WCHAR szBuffer[90] = { 'C', 'L', 'S', 'I', 'D', '\\', 0 }; + DWORD dwType, dwSize; + + wcscpy(&szBuffer[6], pOleStr); + wcscat(szBuffer, L"\\shell\\open\\command"); + + dwSize = sizeof(szCmd); + if (RegGetValueW(HKEY_CLASSES_ROOT, szBuffer, NULL, RRF_RT_REG_SZ, &dwType, (PVOID)szCmd, &dwSize) != ERROR_SUCCESS) + { + ERR("RegGetValueW failed with %u\n", GetLastError()); + return E_FAIL; + } + +#if 0 + if (dwType != RRF_RT_REG_SZ && dwType != RRF_RT_REG_EXPAND_SZ) + return E_FAIL; +#endif + + if (!ExpandEnvironmentStringsW(szCmd, szExpCmd, sizeof(szExpCmd)/sizeof(WCHAR))) + return E_FAIL; + + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + if (!CreateProcessW(NULL, szExpCmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) + return E_FAIL; + + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + return S_OK; +} + + +HRESULT WINAPI CControlPanelFolder::Execute(LPSHELLEXECUTEINFOW psei) +{ + static const WCHAR wCplopen[] = {'c','p','l','o','p','e','n','\0'}; + SHELLEXECUTEINFOW sei_tmp; + PIDLCPanelStruct* pcpanel; + WCHAR path[MAX_PATH]; + WCHAR params[MAX_PATH]; + BOOL ret; + HRESULT hr; + int l; + + TRACE("(%p)->execute(%p)\n", this, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID((LPCITEMIDLIST)psei->lpIDList)); + + if (!pcpanel) + { + LPOLESTR pOleStr; + + IID * iid = _ILGetGUIDPointer(ILFindLastID((LPCITEMIDLIST)psei->lpIDList)); + if (!iid) + return E_INVALIDARG; + if (StringFromCLSID(*iid, &pOleStr) == S_OK) + { + + hr = ExecuteAppletFromCLSID(pOleStr); + CoTaskMemFree(pOleStr); + return hr; + } + + return E_INVALIDARG; + } + path[0] = '\"'; + /* Return value from MultiByteToWideChar includes terminating NUL, which + * compensates for the starting double quote we just put in */ + l = MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + path[l++] = '"'; + path[l] = '\0'; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, params, MAX_PATH); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.lpParameters = params; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + sei_tmp.lpVerb = wCplopen; + + ret = ShellExecuteExW(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +/************************************************************************** +* IShellExecuteHookA Implementation +*/ + +HRESULT WINAPI CControlPanelFolder::Execute(LPSHELLEXECUTEINFOA psei) +{ + SHELLEXECUTEINFOA sei_tmp; + PIDLCPanelStruct* pcpanel; + char path[MAX_PATH]; + BOOL ret; + + TRACE("(%p)->execute(%p)\n", this, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID((LPCITEMIDLIST)psei->lpIDList)); + + if (!pcpanel) + return E_INVALIDARG; + + path[0] = '\"'; + lstrcpyA(path+1, pcpanel->szName); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + lstrcatA(path, "\" "); + lstrcatA(path, pcpanel->szName+pcpanel->offsDispName); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + + ret = ShellExecuteExA(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +/************************************************************************** +* IContextMenu2 Implementation +*/ + +/************************************************************************** +* ICPanel_IContextMenu_QueryContextMenu() +*/ +HRESULT WINAPI CControlPanelFolder::QueryContextMenu( + HMENU hMenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + WCHAR szBuffer[30] = {0}; + ULONG Count = 1; + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", + this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_OPEN, MFT_STRING, szBuffer, MFS_DEFAULT); //FIXME identifier + Count++; + } + + if (LoadStringW(shell32_hInstance, IDS_CREATELINK, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + if (Count) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_SEPARATOR, NULL, MFS_ENABLED); + } + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + + _InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_CREATELINK, MFT_STRING, szBuffer, MFS_ENABLED); //FIXME identifier + Count++; + } + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); +} + +/************************************************************************** +* ICPanel_IContextMenu_InvokeCommand() +*/ +HRESULT WINAPI CControlPanelFolder::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) +{ + SHELLEXECUTEINFOW sei; + WCHAR szPath[MAX_PATH]; + char szTarget[MAX_PATH]; + STRRET strret; + WCHAR* pszPath; + INT Length, cLength; + PIDLCPanelStruct *pcpanel; + CComPtr ppf; + CComPtr isl; + HRESULT hResult; + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",this,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_OPEN)) //FIXME + { + ZeroMemory(&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_INVOKEIDLIST; + sei.lpIDList = ILCombine(pidlRoot, apidl[0]); + sei.hwnd = lpcmi->hwnd; + sei.nShow = SW_SHOWNORMAL; + sei.lpVerb = L"open"; + ShellExecuteExW(&sei); + if (sei.hInstApp == FALSE) + return E_FAIL; + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_CREATELINK)) //FIXME + { + if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_DESKTOPDIRECTORY, FALSE)) + return E_FAIL; + + pszPath = PathAddBackslashW(szPath); + if (!pszPath) + return E_FAIL; + + if (GetDisplayNameOf(apidl[0], SHGDN_FORPARSING, &strret) != S_OK) + return E_FAIL; + + Length = MAX_PATH - (pszPath - szPath); + cLength = strlen(strret.cStr); + if (Length < cLength + 5) + { + FIXME("\n"); + return E_FAIL; + } + + if (MultiByteToWideChar(CP_ACP, 0, strret.cStr, cLength + 1, pszPath, Length)) + { + pszPath += cLength; + Length -= cLength; + } + + if (Length > 10) + { + wcscpy(pszPath, L" - "); + cLength = LoadStringW(shell32_hInstance, IDS_LNK_FILE, &pszPath[3], Length - 4) + 3; + if (cLength + 5 > Length) + cLength = Length - 5; + Length -= cLength; + pszPath += cLength; + } + wcscpy(pszPath, L".lnk"); + + pcpanel = _ILGetCPanelPointer(ILFindLastID(apidl[0])); + if (pcpanel) + { + strncpy(szTarget, pcpanel->szName, MAX_PATH); + } + else + { + FIXME("Couldn't retrieve pointer to cpl structure\n"); + return E_FAIL; + } + hResult = ShellLink::_CreatorClass::CreateInstance(NULL, IID_IShellLinkA, (void **)&isl); + if (SUCCEEDED(hResult)) + { + isl->SetPath(szTarget); + if (SUCCEEDED(isl->QueryInterface(IID_IPersistFile, (LPVOID*)&ppf))) + ppf->Save(szPath, TRUE); + } + return NOERROR; + } + return S_OK; +} + +/************************************************************************** + * ICPanel_IContextMenu_GetCommandString() + * + */ +HRESULT WINAPI CControlPanelFolder::GetCommandString( + UINT_PTR idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + FIXME("unknown command string\n"); + return E_FAIL; +} + +/************************************************************************** +* ICPanel_IContextMenu_HandleMenuMsg() +*/ +HRESULT WINAPI CControlPanelFolder::HandleMenuMsg( + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",this, uMsg, wParam, lParam); + + return E_NOTIMPL; +} diff --git a/dll/win32/shell32_new/shfldr_cpanel.h b/dll/win32/shell32_new/shfldr_cpanel.h new file mode 100644 index 00000000000..bcb1f07728f --- /dev/null +++ b/dll/win32/shell32_new/shfldr_cpanel.h @@ -0,0 +1,107 @@ +/* + * Control panel folder + * + * Copyright 2003 Martin Fuchs + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHFLDR_CPANEL_H_ +#define _SHFLDR_CPANEL_H_ + +class CControlPanelFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2, + public IShellExecuteHookA, + public IShellExecuteHookW, + public IContextMenu2 +{ +private: + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ + LPCITEMIDLIST *apidl; + UINT cidl; +public: + CControlPanelFolder(); + ~CControlPanelFolder(); + HRESULT WINAPI FinalConstruct(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + + // IShellExecuteHookW + virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOW psei); + + // IShellExecuteHookA + virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOA psei); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + +DECLARE_REGISTRY_RESOURCEID(IDR_CONTROLPANEL) +DECLARE_NOT_AGGREGATABLE(CControlPanelFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CControlPanelFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_IShellExecuteHookA, IShellExecuteHookA) + COM_INTERFACE_ENTRY_IID(IID_IShellExecuteHookW, IShellExecuteHookW) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) +END_COM_MAP() +}; + +#endif // _SHFLDR_CPANEL_H_ diff --git a/dll/win32/shell32_new/shfldr_desktop.cpp b/dll/win32/shell32_new/shfldr_desktop.cpp new file mode 100644 index 00000000000..fe03e9ed913 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_desktop.cpp @@ -0,0 +1,1266 @@ +/* + * Virtual Desktop Folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_desktop.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/* +CDesktopFolder should create two file system folders internally, one representing the +user's desktop folder, and the other representing the common desktop folder. It should +also create a CRegFolder to represent the virtual items that exist only in the registry. +The CRegFolder is aggregated by the CDesktopFolder, and queries for the CLSID_IShellFolder, +CLSID_IShellFolder2, or CLSID_IShellIconOverlay interfaces prefer the CRegFolder +implementation. +The CDesktopFolderEnum class should create two enumerators, one for each of the file +system folders, and enumerate the contents of each folder. Since the CRegFolder +implementation of IShellFolder::EnumObjects enumerates the virtual items, the +CDesktopFolderEnum is only responsible for returning the physical items. +CDesktopFolderEnum is incorrect where it filters My Computer from the enumeration +if the new start menu is used. The CDesktopViewCallback is responsible for filtering +it from the view by handling the IncludeObject query to return S_FALSE. The enumerator +always shows My Computer. +*/ + +/*********************************************************************** +* Desktopfolder implementation +*/ + +class CDesktopFolder; + +class CDesktopFolderEnum : + public IEnumIDListImpl +{ +private: +// CComPtr fDesktopEnumerator; +// CComPtr fCommonDesktopEnumerator; +public: + CDesktopFolderEnum(); + ~CDesktopFolderEnum(); + HRESULT WINAPI Initialize(CDesktopFolder *desktopFolder, HWND hwndOwner, DWORD dwFlags); + +BEGIN_COM_MAP(CDesktopFolderEnum) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); +int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll); + +static const shvheader DesktopSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, + {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +}; + +#define DESKTOPSHELLVIEWCOLUMNS 5 + +CDesktopFolderEnum::CDesktopFolderEnum() +{ +} + +CDesktopFolderEnum::~CDesktopFolderEnum() +{ +} + +static const WCHAR ClassicStartMenuW[] = {'S','O','F','T','W','A','R','E','\\', + 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r', + '\\','H','i','d','e','D','e','s','k','t','o','p','I','c','o','n','s','\\', + 'C','l','a','s','s','i','c','S','t','a','r','t','M','e','n','u','\0' }; + +INT +IsNamespaceExtensionHidden(WCHAR *iid) +{ + DWORD Result, dwResult; + dwResult = sizeof(DWORD); + + if (RegGetValueW(HKEY_CURRENT_USER, /* FIXME use NewStartPanel when activated */ + ClassicStartMenuW, + iid, + RRF_RT_DWORD, + NULL, + &Result, + &dwResult) != ERROR_SUCCESS) + { + return -1; + } + + return Result; +} + +static +VOID +SetNamespaceExtensionVisibleStatus(const WCHAR * iid, DWORD dwStatus) +{ + HKEY hKey; + + if (RegOpenKeyExW(HKEY_CURRENT_USER, ClassicStartMenuW, 0, KEY_WRITE, &hKey) == ERROR_SUCCESS) + { + RegSetValueExW(hKey, iid, 0, REG_DWORD, (LPBYTE)&dwStatus, sizeof(DWORD)); + RegCloseKey(hKey); + } +} + +/************************************************************************** + * CreateDesktopEnumList() + */ +static const WCHAR Desktop_NameSpaceW[] = { 'S','O','F','T','W','A','R','E', + '\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l', + 'o','r','e','r','\\','D','e','s','k','t','o','p','\\','N','a','m','e','s','p', + 'a','c','e','\0' }; + +HRESULT WINAPI CDesktopFolderEnum::Initialize(CDesktopFolder *desktopFolder, HWND hwndOwner, DWORD dwFlags) +{ + BOOL ret = TRUE; + WCHAR szPath[MAX_PATH]; + + static WCHAR MyDocumentsClassString[] = L"{450D8FBA-AD25-11D0-98A8-0800361B1103}"; + + TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags); + + /* enumerate the root folders */ + if (dwFlags & SHCONTF_FOLDERS) + { + HKEY hkey; + UINT i; + DWORD dwResult; + + /* create the pidl for This item */ + if (IsNamespaceExtensionHidden(MyDocumentsClassString) < 1) + { + ret = AddToEnumList(_ILCreateMyDocuments()); + } + ret = AddToEnumList(_ILCreateMyComputer()); + + for (i = 0; i < 2; i++) + { + if (i == 0) + dwResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, Desktop_NameSpaceW, 0, KEY_READ, &hkey); + else + dwResult = RegOpenKeyExW(HKEY_CURRENT_USER, Desktop_NameSpaceW, 0, KEY_READ, &hkey); + + if (dwResult == ERROR_SUCCESS) + { + WCHAR iid[50]; + LPITEMIDLIST pidl; + int i=0; + + while (ret) + { + DWORD size; + LONG r; + + size = sizeof (iid) / sizeof (iid[0]); + r = RegEnumKeyExW(hkey, i, iid, &size, 0, NULL, NULL, NULL); + if (ERROR_SUCCESS == r) + { + if (IsNamespaceExtensionHidden(iid) < 1) + { + pidl = _ILCreateGuidFromStrW(iid); + if (pidl != NULL) + { + if (!HasItemWithCLSID(pidl)) + { + ret = AddToEnumList(pidl); + } + else + { + SHFree(pidl); + } + } + } + } + else if (ERROR_NO_MORE_ITEMS == r) + break; + else + ret = FALSE; + i++; + } + RegCloseKey(hkey); + } + } + for (i = 0; i < 2; i++) + { + if (i == 0) + dwResult = RegOpenKeyExW(HKEY_LOCAL_MACHINE, ClassicStartMenuW, 0, KEY_READ, &hkey); + else + dwResult = RegOpenKeyExW(HKEY_CURRENT_USER, ClassicStartMenuW, 0, KEY_READ, &hkey); + + if (dwResult == ERROR_SUCCESS) + { + DWORD j = 0, dwVal, Val, dwType, dwIID; + LONG r; + WCHAR iid[50]; + + while(ret) + { + dwVal = sizeof(Val); + dwIID = sizeof(iid) / sizeof(WCHAR); + + r = RegEnumValueW(hkey, j++, iid, &dwIID, NULL, &dwType, (LPBYTE)&Val, &dwVal); + if (r == ERROR_SUCCESS) + { + if (Val == 0 && dwType == REG_DWORD) + { + LPITEMIDLIST pidl = _ILCreateGuidFromStrW(iid); + if (pidl != NULL) + { + if (!HasItemWithCLSID(pidl)) + { + AddToEnumList(pidl); + } + else + { + SHFree(pidl); + } + } + } + } + else if (ERROR_NO_MORE_ITEMS == r) + break; + else + ret = FALSE; + } + RegCloseKey(hkey); + } + + } + } + + /* enumerate the elements in %windir%\desktop */ + ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); + ret = ret && CreateFolderEnumList(szPath, dwFlags); + + ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_COMMON_DESKTOPDIRECTORY, FALSE); + ret = ret && CreateFolderEnumList(szPath, dwFlags); + + return ret ? S_OK : E_FAIL; +} + +CDesktopFolder::CDesktopFolder() +{ +} + +CDesktopFolder::~CDesktopFolder() +{ +} + +HRESULT WINAPI CDesktopFolder::FinalConstruct() +{ + WCHAR szMyPath[MAX_PATH]; + + if (!SHGetSpecialFolderPathW( 0, szMyPath, CSIDL_DESKTOPDIRECTORY, TRUE )) + return E_UNEXPECTED; + + pidlRoot = _ILCreateDesktop(); /* my qualified pidl */ + sPathTarget = (LPWSTR)SHAlloc((wcslen(szMyPath) + 1) * sizeof(WCHAR)); + wcscpy(sPathTarget, szMyPath); + return S_OK; +} + +/************************************************************************** + * ISF_Desktop_fnParseDisplayName + * + * NOTES + * "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" and "" binds + * to MyComputer + */ +HRESULT WINAPI CDesktopFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, + DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes) +{ + WCHAR szElement[MAX_PATH]; + LPCWSTR szNext = NULL; + LPITEMIDLIST pidlTemp = NULL; + HRESULT hr = S_OK; + CLSID clsid; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + if (!lpszDisplayName || !ppidl) + return E_INVALIDARG; + + *ppidl = 0; + + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') + { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + TRACE ("-- element: %s\n", debugstr_w (szElement)); + CLSIDFromString (szElement + 2, &clsid); + pidlTemp = _ILCreateGuid (PT_GUID, clsid); + } + else if (PathGetDriveNumberW (lpszDisplayName) >= 0) + { + /* it's a filesystem path with a drive. Let MyComputer/UnixDosFolder parse it */ + pidlTemp = _ILCreateMyComputer (); + szNext = lpszDisplayName; + } + else if (PathIsUNCW(lpszDisplayName)) + { + pidlTemp = _ILCreateNetwork(); + szNext = lpszDisplayName; + } + else if( (pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, lpszDisplayName)) ) + { + *ppidl = pidlTemp; + return S_OK; + } + else + { + /* it's a filesystem path on the desktop. Let a FSFolder parse it */ + + if (*lpszDisplayName) + { + WCHAR szPath[MAX_PATH]; + LPWSTR pathPtr; + + /* build a complete path to create a simple pidl */ + lstrcpynW(szPath, sPathTarget, MAX_PATH); + pathPtr = PathAddBackslashW(szPath); + if (pathPtr) + { + lstrcpynW(pathPtr, lpszDisplayName, MAX_PATH - (pathPtr - szPath)); + hr = _ILCreateFromPathW(szPath, &pidlTemp); + } + else + { + /* should never reach here, but for completeness */ + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + } + } + else + pidlTemp = _ILCreateMyComputer(); + + szNext = NULL; + } + + if (SUCCEEDED(hr) && pidlTemp) + { + if (szNext && *szNext) + { + hr = SHELL32_ParseNextElement(this, hwndOwner, pbc, + &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); + } + else + { + if (pdwAttributes && *pdwAttributes) + hr = SHELL32_GetItemAttributes((IShellFolder *)this, + pidlTemp, pdwAttributes); + } + } + + *ppidl = pidlTemp; + + TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr); + + return hr; +} + +/************************************************************************** + * ISF_Desktop_fnEnumObjects + */ +HRESULT WINAPI CDesktopFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (this, hwndOwner, dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** + * ISF_Desktop_fnBindToObject + */ +HRESULT WINAPI CDesktopFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", + this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild( pidlRoot, sPathTarget, pidl, riid, ppvOut ); +} + +/************************************************************************** + * ISF_Desktop_fnBindToStorage + */ +HRESULT WINAPI CDesktopFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", + this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** + * ISF_Desktop_fnCompareIDs + */ +HRESULT WINAPI CDesktopFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs ((IShellFolder *)this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** + * ISF_Desktop_fnCreateViewObject + */ +HRESULT WINAPI CDesktopFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) +{ + CComPtr pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", + this, hwndOwner, shdebugstr_guid (&riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IContextMenu)) + { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor((IShellFolder *)this, &pShellView); + if (pShellView) + hr = pShellView->QueryInterface(riid, ppvOut); + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** + * ISF_Desktop_fnGetAttributesOf + */ +HRESULT WINAPI CDesktopFolder::GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut) +{ + HRESULT hr = S_OK; + static const DWORD dwDesktopAttributes = + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER; + static const DWORD dwMyComputerAttributes = + SFGAO_CANRENAME | SFGAO_CANDELETE | SFGAO_HASPROPSHEET | + SFGAO_DROPTARGET | SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_HASSUBFOLDER; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", + this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if(cidl == 0) { + *rgfInOut &= dwDesktopAttributes; + } else { + while (cidl > 0 && *apidl) { + pdump (*apidl); + if (_ILIsDesktop(*apidl)) { + *rgfInOut &= dwDesktopAttributes; + } else if (_ILIsMyComputer(*apidl)) { + *rgfInOut &= dwMyComputerAttributes; + } else { + SHELL32_GetItemAttributes ((IShellFolder *)this, *apidl, rgfInOut); + } + apidl++; + cidl--; + } + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + + return hr; +} + +/************************************************************************** + * ISF_Desktop_fnGetUIObjectOf + * + * PARAMETERS + * HWND hwndOwner, //[in ] Parent window for any output + * UINT cidl, //[in ] array size + * LPCITEMIDLIST* apidl, //[in ] simple pidl array + * REFIID riid, //[in ] Requested Interface + * UINT* prgfInOut, //[ ] reserved + * LPVOID* ppvObject) //[out] Resulting Interface + * + */ +HRESULT WINAPI CDesktopFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, + REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + this, hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IContextMenu)) + { + hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder *)this, NULL, 0, NULL, (IContextMenu **)&pObj); + } + else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1)) + { + hr = IDataObject_Constructor( hwndOwner, pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } + else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IExtractIconW) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) + { + hr = this->QueryInterface (IID_IDropTarget, (LPVOID *)&pObj); + } + else if ((IsEqualIID(riid, IID_IShellLinkW) || + IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); + SHFree (pidl); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +/************************************************************************** + * ISF_Desktop_fnGetDisplayNameOf + * + * NOTES + * special case: pidl = null gives desktop-name back + */ +HRESULT WINAPI CDesktopFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + HRESULT hr = S_OK; + LPWSTR pszPath; + + TRACE ("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH +1) * sizeof(WCHAR)); + if (!pszPath) + return E_OUTOFMEMORY; + + if (_ILIsDesktop (pidl)) + { + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && + (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)) + wcscpy(pszPath, sPathTarget); + else + HCR_GetClassNameW(CLSID_ShellDesktop, pszPath, MAX_PATH); + } + else if (_ILIsPidlSimple (pidl)) + { + GUID const *clsid; + + if ((clsid = _ILGetGUIDPointer (pidl))) + { + if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING) + { + int bWantsForParsing; + + /* + * We can only get a filesystem path from a shellfolder if the + * value WantsFORPARSING in CLSID\\{...}\\shellfolder exists. + * + * Exception: The MyComputer folder doesn't have this key, + * but any other filesystem backed folder it needs it. + */ + if (IsEqualIID (*clsid, CLSID_MyComputer)) + { + bWantsForParsing = TRUE; + } + else + { + /* get the "WantsFORPARSING" flag from the registry */ + static const WCHAR clsidW[] = + { 'C','L','S','I','D','\\',0 }; + static const WCHAR shellfolderW[] = + { '\\','s','h','e','l','l','f','o','l','d','e','r',0 }; + static const WCHAR wantsForParsingW[] = + { 'W','a','n','t','s','F','o','r','P','a','r','s','i','n', + 'g',0 }; + WCHAR szRegPath[100]; + LONG r; + + wcscpy (szRegPath, clsidW); + SHELL32_GUIDToStringW (*clsid, &szRegPath[6]); + wcscat (szRegPath, shellfolderW); + r = SHGetValueW(HKEY_CLASSES_ROOT, szRegPath, + wantsForParsingW, NULL, NULL, NULL); + if (r == ERROR_SUCCESS) + bWantsForParsing = TRUE; + else + bWantsForParsing = FALSE; + } + + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && + bWantsForParsing) + { + /* + * we need the filesystem path to the destination folder. + * Only the folder itself can know it + */ + hr = SHELL32_GetDisplayNameOfChild (this, pidl, dwFlags, + pszPath, + MAX_PATH); + } + else + { + /* parsing name like ::{...} */ + pszPath[0] = ':'; + pszPath[1] = ':'; + SHELL32_GUIDToStringW (*clsid, &pszPath[2]); + } + } + else + { + /* user friendly name */ + HCR_GetClassNameW (*clsid, pszPath, MAX_PATH); + } + } + else + { + int cLen = 0; + + /* file system folder or file rooted at the desktop */ + if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER)) + { + lstrcpynW(pszPath, sPathTarget, MAX_PATH - 1); + PathAddBackslashW(pszPath); + cLen = wcslen(pszPath); + } + + _ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen); + if (!_ILIsFolder(pidl)) + SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); + + if (GetFileAttributes(pszPath) == INVALID_FILE_ATTRIBUTES) + { + /* file system folder or file rooted at the AllUsers desktop */ + if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER)) + { + SHGetSpecialFolderPathW(0, pszPath, CSIDL_COMMON_DESKTOPDIRECTORY, FALSE); + PathAddBackslashW(pszPath); + cLen = wcslen(pszPath); + } + + _ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen); + if (!_ILIsFolder(pidl)) + SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); + } } + } + else + { + /* a complex pidl, let the subfolder do the work */ + hr = SHELL32_GetDisplayNameOfChild (this, pidl, dwFlags, + pszPath, MAX_PATH); + } + + if (SUCCEEDED(hr)) + { + /* Win9x always returns ANSI strings, NT always returns Unicode strings */ + if (GetVersion() & 0x80000000) + { + strRet->uType = STRRET_CSTR; + if (!WideCharToMultiByte(CP_ACP, 0, pszPath, -1, strRet->cStr, MAX_PATH, + NULL, NULL)) + strRet->cStr[0] = '\0'; + CoTaskMemFree(pszPath); + } + else + { + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszPath; + } + } + else + CoTaskMemFree(pszPath); + + TRACE ("-- (%p)->(%s,0x%08x)\n", this, + strRet->uType == STRRET_CSTR ? strRet->cStr : + debugstr_w(strRet->pOleStr), hr); + return hr; +} + +/************************************************************************** + * ISF_Desktop_fnSetNameOf + * Changes the name of a file object or subfolder, possibly changing its item + * identifier in the process. + * + * PARAMETERS + * HWND hwndOwner, //[in ] Owner window for output + * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change + * LPCOLESTR lpszName, //[in ] the items new display name + * DWORD dwFlags, //[in ] SHGNO formatting flags + * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned + */ +HRESULT WINAPI CDesktopFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut) +{ + CComPtr psf; + HRESULT hr; + WCHAR szSrc[MAX_PATH + 1], szDest[MAX_PATH + 1]; + LPWSTR ptr; + BOOL bIsFolder = _ILIsFolder (ILFindLastID (pidl)); + + TRACE ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, + debugstr_w (lpName), dwFlags, pPidlOut); + + if (_ILGetGUIDPointer(pidl)) + { + if (SUCCEEDED(BindToObject(pidl, NULL, IID_IShellFolder2, (LPVOID *)&psf))) + { + hr = psf->SetNameOf(hwndOwner, pidl, lpName, dwFlags, pPidlOut); + return hr; + } + } + + /* build source path */ + lstrcpynW(szSrc, sPathTarget, MAX_PATH); + ptr = PathAddBackslashW (szSrc); + if (ptr) + _ILSimpleGetTextW (pidl, ptr, MAX_PATH + 1 - (ptr - szSrc)); + + /* build destination path */ + if (dwFlags == SHGDN_NORMAL || dwFlags & SHGDN_INFOLDER) { + lstrcpynW(szDest, sPathTarget, MAX_PATH); + ptr = PathAddBackslashW (szDest); + if (ptr) + lstrcpynW(ptr, lpName, MAX_PATH + 1 - (ptr - szDest)); + } else + lstrcpynW(szDest, lpName, MAX_PATH); + + if(!(dwFlags & SHGDN_FORPARSING) && SHELL_FS_HideExtension(szSrc)) { + WCHAR *ext = PathFindExtensionW(szSrc); + if(*ext != '\0') { + INT len = wcslen(szDest); + lstrcpynW(szDest + len, ext, MAX_PATH - len); + } + } + + if (!memcmp(szSrc, szDest, (wcslen(szDest)+1) * sizeof(WCHAR))) + { + /* src and destination is the same */ + hr = S_OK; + if (pPidlOut) + hr = _ILCreateFromPathW(szDest, pPidlOut); + + return hr; + } + + TRACE ("src=%s dest=%s\n", debugstr_w(szSrc), debugstr_w(szDest)); + if (MoveFileW (szSrc, szDest)) + { + hr = S_OK; + + if (pPidlOut) + hr = _ILCreateFromPathW(szDest, pPidlOut); + + SHChangeNotify (bIsFolder ? SHCNE_RENAMEFOLDER : SHCNE_RENAMEITEM, + SHCNF_PATHW, szSrc, szDest); + + return hr; + } + return E_FAIL; +} + +HRESULT WINAPI CDesktopFolder::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CDesktopFolder::EnumSearches(IEnumExtraSearch **ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CDesktopFolder::GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + TRACE ("(%p)\n", this); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +HRESULT WINAPI CDesktopFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) +{ + TRACE ("(%p)\n", this); + + if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + *pcsFlags = DesktopSFHeader[iColumn].pcsFlags; + + return S_OK; +} + +HRESULT WINAPI CDesktopFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME ("(%p)\n", this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDesktopFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) +{ + HRESULT hr = S_OK; + + TRACE ("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd); + + if (!psd || iColumn >= DESKTOPSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) + { + psd->fmt = DesktopSFHeader[iColumn].fmt; + psd->cxChar = DesktopSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA (shell32_hInstance, DesktopSFHeader[iColumn].colnameid, + psd->str.cStr, MAX_PATH); + return S_OK; + } + + /* the data from the pidl */ + psd->str.uType = STRRET_CSTR; + switch (iColumn) + { + case 0: /* name */ + hr = GetDisplayNameOf(pidl, + SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* size */ + _ILGetFileSize (pidl, psd->str.cStr, MAX_PATH); + break; + case 2: /* type */ + _ILGetFileType (pidl, psd->str.cStr, MAX_PATH); + break; + case 3: /* date */ + _ILGetFileDate (pidl, psd->str.cStr, MAX_PATH); + break; + case 4: /* attributes */ + _ILGetFileAttributes (pidl, psd->str.cStr, MAX_PATH); + break; + } + + return hr; +} + +HRESULT WINAPI CDesktopFolder::MapColumnToSCID(UINT column, SHCOLUMNID *pscid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CDesktopFolder::GetClassID(CLSID *lpClassId) +{ + TRACE ("(%p)\n", this); + + if (!lpClassId) + return E_POINTER; + + *lpClassId = CLSID_ShellDesktop; + + return S_OK; +} + +HRESULT WINAPI CDesktopFolder::Initialize(LPCITEMIDLIST pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDesktopFolder::GetCurFolder(LPITEMIDLIST * pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + if (!pidl) return E_POINTER; + *pidl = ILClone (pidlRoot); + return S_OK; +} + +HRESULT WINAPI CDesktopFolder::GetUniqueName(LPWSTR pwszName, UINT uLen) +{ + CComPtr penum; + HRESULT hr; + WCHAR wszText[MAX_PATH]; + WCHAR wszNewFolder[25]; + const WCHAR wszFormat[] = {'%','s',' ','%','d',0 }; + + LoadStringW(shell32_hInstance, IDS_NEWFOLDER, wszNewFolder, sizeof(wszNewFolder)/sizeof(WCHAR)); + + TRACE ("(%p)(%p %u)\n", this, pwszName, uLen); + + if (uLen < sizeof(wszNewFolder)/sizeof(WCHAR) + 3) + return E_POINTER; + + lstrcpynW (pwszName, wszNewFolder, uLen); + + hr = EnumObjects(0, + SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum); + if (penum) { + LPITEMIDLIST pidl; + DWORD dwFetched; + int i = 1; + +next: + penum->Reset (); + while (S_OK == penum->Next(1, &pidl, &dwFetched) && + dwFetched) { + _ILSimpleGetTextW (pidl, wszText, MAX_PATH); + if (0 == lstrcmpiW (wszText, pwszName)) { + _snwprintf (pwszName, uLen, wszFormat, wszNewFolder, i++); + if (i > 99) { + hr = E_FAIL; + break; + } + goto next; + } + } + + } + return hr; +} + +HRESULT WINAPI CDesktopFolder::AddFolder(HWND hwnd, LPCWSTR pwszName, LPITEMIDLIST *ppidlOut) +{ + WCHAR wszNewDir[MAX_PATH]; + DWORD bRes; + HRESULT hres = E_FAIL; + + TRACE ("(%p)(%s %p)\n", this, debugstr_w(pwszName), ppidlOut); + + wszNewDir[0] = 0; + if (sPathTarget) + lstrcpynW(wszNewDir, sPathTarget, MAX_PATH); + PathAppendW(wszNewDir, pwszName); + bRes = CreateDirectoryW (wszNewDir, NULL); + if (bRes) + { + SHChangeNotify (SHCNE_MKDIR, SHCNF_PATHW, wszNewDir, NULL); + hres = S_OK; + if (ppidlOut) + hres = _ILCreateFromPathW(wszNewDir, ppidlOut); + } + + return hres; +} + +HRESULT WINAPI CDesktopFolder::DeleteItems(UINT cidl, LPCITEMIDLIST *apidl) +{ + UINT i; + SHFILEOPSTRUCTW op; + WCHAR wszPath[MAX_PATH]; + WCHAR wszCaption[50]; + WCHAR *wszPathsList; + HRESULT ret; + WCHAR *wszCurrentPath; + UINT bRestoreWithDeskCpl = FALSE; + int res; + + TRACE ("(%p)(%u %p)\n", this, cidl, apidl); + if (cidl==0) return S_OK; + + for(i = 0; i < cidl; i++) + { + if (_ILIsMyComputer(apidl[i])) + bRestoreWithDeskCpl++; + else if (_ILIsNetHood(apidl[i])) + bRestoreWithDeskCpl++; + else if (_ILIsMyDocuments(apidl[i])) + bRestoreWithDeskCpl++; + } + + if (bRestoreWithDeskCpl) + { + /* FIXME use FormatMessage + * use a similar message resource as in windows + */ + LoadStringW(shell32_hInstance, IDS_DELETEMULTIPLE_TEXT, wszPath, sizeof(wszPath)/sizeof(WCHAR)); + wszPath[(sizeof(wszPath)/sizeof(WCHAR))-1] = 0; + + LoadStringW(shell32_hInstance, IDS_DELETEITEM_CAPTION, wszCaption, sizeof(wszCaption)/sizeof(WCHAR)); + wszCaption[(sizeof(wszCaption)/sizeof(WCHAR))-1] = 0; + + res = SHELL_ConfirmMsgBox(GetActiveWindow(), wszPath, wszCaption, NULL, cidl > 1); + if (res == IDD_YESTOALL || res == IDYES) + { + for(i = 0; i < cidl; i++) + { + if (_ILIsMyComputer(apidl[i])) + SetNamespaceExtensionVisibleStatus(L"{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 0x1); + else if (_ILIsNetHood(apidl[i])) + SetNamespaceExtensionVisibleStatus(L"{208D2C60-3AEA-1069-A2D7-08002B30309D}", 0x1); + else if (_ILIsMyDocuments(apidl[i])) + SetNamespaceExtensionVisibleStatus(L"{450D8FBA-AD25-11D0-98A8-0800361B1103}", 0x1); + } + } + } + if (sPathTarget) + lstrcpynW(wszPath, sPathTarget, MAX_PATH); + else + wszPath[0] = '\0'; + + PathAddBackslashW(wszPath); + wszPathsList = build_paths_list(wszPath, cidl, apidl); + + ZeroMemory(&op, sizeof(op)); + op.hwnd = GetActiveWindow(); + op.wFunc = FO_DELETE; + op.pFrom = wszPathsList; + op.fFlags = FOF_ALLOWUNDO; + if (SHFileOperationW(&op)) + { + WARN("SHFileOperation failed\n"); + ret = E_FAIL; + } + else + ret = S_OK; + + /* we currently need to manually send the notifies */ + wszCurrentPath = wszPathsList; + for (i = 0; i < cidl; i++) + { + LONG wEventId; + + if (_ILIsFolder(apidl[i])) + wEventId = SHCNE_RMDIR; + else if (_ILIsValue(apidl[i])) + wEventId = SHCNE_DELETE; + else + continue; + + /* check if file exists */ + if (GetFileAttributesW(wszCurrentPath) == INVALID_FILE_ATTRIBUTES) + { + LPITEMIDLIST pidl = ILCombine(pidlRoot, apidl[i]); + SHChangeNotify(wEventId, SHCNF_IDLIST, pidl, NULL); + SHFree(pidl); + } + + wszCurrentPath += wcslen(wszCurrentPath)+1; + } + HeapFree(GetProcessHeap(), 0, wszPathsList); + return ret; +} + +HRESULT WINAPI CDesktopFolder::CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST *apidl) +{ + CComPtr ppf2; + WCHAR szSrcPath[MAX_PATH]; + WCHAR szTargetPath[MAX_PATH]; + SHFILEOPSTRUCTW op; + LPITEMIDLIST pidl; + LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList, pszFileName; + int res, length; + STRRET strRet; + + TRACE ("(%p)->(%p,%u,%p)\n", this, pSFFrom, cidl, apidl); + + pSFFrom->QueryInterface(IID_IPersistFolder2, (LPVOID *)&ppf2); + if (ppf2) + { + if (FAILED(ppf2->GetCurFolder(&pidl))) + return E_FAIL; + + if (FAILED(pSFFrom->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strRet))) + { + SHFree (pidl); + return E_FAIL; + } + + if (FAILED(StrRetToBufW(&strRet, pidl, szSrcPath, MAX_PATH))) + { + SHFree (pidl); + return E_FAIL; + } + SHFree (pidl); + + pszSrc = PathAddBackslashW (szSrcPath); + + wcscpy(szTargetPath, sPathTarget); + pszTarget = PathAddBackslashW (szTargetPath); + + pszSrcList = build_paths_list(szSrcPath, cidl, apidl); + pszTargetList = build_paths_list(szTargetPath, cidl, apidl); + + if (!pszSrcList || !pszTargetList) + { + if (pszSrcList) + HeapFree(GetProcessHeap(), 0, pszSrcList); + + if (pszTargetList) + HeapFree(GetProcessHeap(), 0, pszTargetList); + + SHFree (pidl); + return E_OUTOFMEMORY; + } + ZeroMemory(&op, sizeof(op)); + if (!pszSrcList[0]) + { + /* remove trailing backslash */ + pszSrc--; + pszSrc[0] = L'\0'; + op.pFrom = szSrcPath; + } + else + { + op.pFrom = pszSrcList; + } + + if (!pszTargetList[0]) + { + /* remove trailing backslash */ + if (pszTarget - szTargetPath > 3) + { + pszTarget--; + pszTarget[0] = L'\0'; + } + else + { + pszTarget[1] = L'\0'; + } + + op.pTo = szTargetPath; + } + else + { + op.pTo = pszTargetList; + } + op.hwnd = GetActiveWindow(); + op.wFunc = FO_COPY; + op.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMMKDIR; + + res = SHFileOperationW(&op); + + if (res == DE_SAMEFILE) + { + length = wcslen(szTargetPath); + + + pszFileName = wcsrchr(pszSrcList, '\\'); + pszFileName++; + + if (LoadStringW(shell32_hInstance, IDS_COPY_OF, pszTarget, MAX_PATH - length)) + { + wcscat(szTargetPath, L" "); + } + + wcscat(szTargetPath, pszFileName); + op.pTo = szTargetPath; + + res = SHFileOperationW(&op); + } + + + HeapFree(GetProcessHeap(), 0, pszSrcList); + HeapFree(GetProcessHeap(), 0, pszTargetList); + + if (res) + return E_FAIL; + else + return S_OK; + } + return E_FAIL; +} diff --git a/dll/win32/shell32_new/shfldr_desktop.h b/dll/win32/shell32_new/shfldr_desktop.h new file mode 100644 index 00000000000..ab20136ffb7 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_desktop.h @@ -0,0 +1,96 @@ +/* + * Virtual Desktop Folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _CDESKTOPFOLDER_H_ +#define _CDESKTOPFOLDER_H_ + +class CDesktopFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2, + public ISFHelper +{ +private: + /* both paths are parsible from the desktop */ + LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + +// CComPtr fDesktopFolder; +// CComPtr fCommonDesktopFolder; +public: + CDesktopFolder(); + ~CDesktopFolder(); + HRESULT WINAPI FinalConstruct(); + + // *** IShellFolder methods *** + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + // *** ShellFolder2 methods *** + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // *** IPersist methods *** + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // *** IPersistFolder methods *** + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // *** IPersistFolder2 methods *** + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + + // *** ISFHelper methods *** + virtual HRESULT WINAPI GetUniqueName(LPWSTR pwszName, UINT uLen); + virtual HRESULT WINAPI AddFolder(HWND hwnd, LPCWSTR pwszName, LPITEMIDLIST *ppidlOut); + virtual HRESULT WINAPI DeleteItems(UINT cidl, LPCITEMIDLIST *apidl); + virtual HRESULT WINAPI CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST *apidl); + +DECLARE_REGISTRY_RESOURCEID(IDR_SHELLDESKTOP) +DECLARE_NOT_AGGREGATABLE(CDesktopFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CDesktopFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_ISFHelper, ISFHelper) +END_COM_MAP() +}; + +#endif // _CDESKTOPFOLDER_H_ diff --git a/dll/win32/shell32_new/shfldr_fonts.cpp b/dll/win32/shell32_new/shfldr_fonts.cpp new file mode 100644 index 00000000000..3d88bdad834 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_fonts.cpp @@ -0,0 +1,788 @@ +/* + * Fonts folder + * + * Copyright 2008 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_fonts.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/* +This folder should not exist. It is just a file system folder... The \windows\fonts +directory contains a hidden desktop.ini with a UIHandler entry that specifies a class +that lives in fontext.dll. The UI handler creates a custom view for the folder, which +is what we normally see. However, the folder is a perfectly normal CFSFolder. +*/ + +/*********************************************************************** +* IShellFolder implementation +*/ + +class CDesktopFolderEnumZ : + public IEnumIDListImpl +{ +private: +public: + CDesktopFolderEnumZ(); + ~CDesktopFolderEnumZ(); + HRESULT WINAPI Initialize(DWORD dwFlags); + BOOL CreateFontsEnumList(DWORD dwFlags); + +BEGIN_COM_MAP(CDesktopFolderEnumZ) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +static shvheader FontsSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN_FONTTYPE , SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN12, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15} +}; + +#define COLUMN_NAME 0 +#define COLUMN_TYPE 1 +#define COLUMN_SIZE 2 +#define COLUMN_FILENAME 3 + +#define FontsSHELLVIEWCOLUMNS (4) + +CDesktopFolderEnumZ::CDesktopFolderEnumZ() +{ +} + +CDesktopFolderEnumZ::~CDesktopFolderEnumZ() +{ +} + +HRESULT WINAPI CDesktopFolderEnumZ::Initialize(DWORD dwFlags) +{ + if (CreateFontsEnumList(dwFlags) == FALSE) + return E_FAIL; + return S_OK; +} + +static LPITEMIDLIST _ILCreateFontItem(LPWSTR pszFont, LPWSTR pszFile) +{ + PIDLDATA tmp; + LPITEMIDLIST pidl; + PIDLFontStruct * p; + int size0 = (char*)&tmp.u.cfont.szName-(char*)&tmp.u.cfont; + int size = size0; + + tmp.type = 0x00; + tmp.u.cfont.dummy = 0xFF; + tmp.u.cfont.offsFile = wcslen(pszFont) + 1; + + size += (tmp.u.cfont.offsFile + wcslen(pszFile) + 1) * sizeof(WCHAR); + + pidl = (LPITEMIDLIST)SHAlloc(size + 4); + if (!pidl) + return pidl; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+size0); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.cfont; + wcscpy(p->szName, pszFont); + wcscpy(p->szName + tmp.u.cfont.offsFile, pszFile); + + *(WORD*)((char*)pidl+(size+2)) = 0; + return pidl; +} + +static PIDLFontStruct * _ILGetFontStruct(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==0x00) + return (PIDLFontStruct*)&(pdata->u.cfont); + + return NULL; +} + +/************************************************************************** + * CreateFontsEnumListss() + */ +BOOL CDesktopFolderEnumZ::CreateFontsEnumList(DWORD dwFlags) +{ + WCHAR szPath[MAX_PATH]; + WCHAR szName[LF_FACESIZE+20]; + WCHAR szFile[MAX_PATH]; + LPWSTR pszPath; + UINT Length; + LONG ret; + DWORD dwType, dwName, dwFile, dwIndex; + LPITEMIDLIST pidl; + HKEY hKey; + + if (dwFlags & SHCONTF_NONFOLDERS) + { + if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_FONTS, FALSE)) + return FALSE; + + pszPath = PathAddBackslashW(szPath); + if (!pszPath) + return FALSE; + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", 0, KEY_READ, &hKey)!= ERROR_SUCCESS) + return FALSE; + + Length = pszPath - szPath; + dwIndex = 0; + do + { + dwName = sizeof(szName)/sizeof(WCHAR); + dwFile = sizeof(szFile)/sizeof(WCHAR); + ret = RegEnumValueW(hKey, dwIndex++, szName, &dwName, NULL, &dwType, (LPBYTE)szFile, &dwFile); + if (ret == ERROR_SUCCESS) + { + szFile[(sizeof(szFile)/sizeof(WCHAR))-1] = L'\0'; + if (dwType == REG_SZ && wcslen(szFile) + Length + 1< (sizeof(szPath)/sizeof(WCHAR))) + { + wcscpy(&szPath[Length], szFile); + pidl = _ILCreateFontItem(szName, szPath); + TRACE("pidl %p name %s path %s\n", pidl, debugstr_w(szName), debugstr_w(szPath)); + if (pidl) + { + if (!AddToEnumList(pidl)) + SHFree(pidl); + } + } + } + }while(ret != ERROR_NO_MORE_ITEMS); + RegCloseKey(hKey); + + } + return TRUE; +} + +CFontsFolder::CFontsFolder() +{ +} + +CFontsFolder::~CFontsFolder() +{ + TRACE("-- destroying IShellFolder(%p)\n", this); + SHFree(pidlRoot); +} + +HRESULT WINAPI CFontsFolder::FinalConstruct() +{ + pidlRoot = _ILCreateFont(); /* my qualified pidl */ + if (pidlRoot == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +/************************************************************************** +* ISF_Fonts_fnParseDisplayName +*/ +HRESULT WINAPI CFontsFolder::ParseDisplayName(HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + HRESULT hr = E_UNEXPECTED; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this, + hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr); + + return hr; +} + +/************************************************************************** +* ISF_Fonts_fnEnumObjects +*/ +HRESULT WINAPI CFontsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** +* ISF_Fonts_fnBindToObject +*/ +HRESULT WINAPI CFontsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild (pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_Fonts_fnBindToStorage +*/ +HRESULT WINAPI CFontsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_Fonts_fnCompareIDs +*/ + +HRESULT WINAPI CFontsFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_Fonts_fnCreateViewObject +*/ +HRESULT WINAPI CFontsFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) +{ + CComPtr pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", this, + hwndOwner, shdebugstr_guid (&riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IContextMenu)) + { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) + hr = pShellView->QueryInterface(riid, ppvOut); + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_Fonts_fnGetAttributesOf +*/ +HRESULT WINAPI CFontsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut) +{ + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", this, + cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if (cidl == 0) + { + CComPtr psfParent; + LPCITEMIDLIST rpidl = NULL; + + hr = SHBindToParent(pidlRoot, IID_IShellFolder, (LPVOID *)&psfParent, (LPCITEMIDLIST *)&rpidl); + if (SUCCEEDED(hr)) + SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); + } + else + { + while (cidl > 0 && *apidl) + { + pdump (*apidl); + SHELL32_GetItemAttributes (this, *apidl, rgfInOut); + apidl++; + cidl--; + } + } + + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_Fonts_fnGetUIObjectOf +* +* PARAMETERS +* hwndOwner [in] Parent window for any output +* cidl [in] array size +* apidl [in] simple pidl array +* riid [in] Requested Interface +* prgfInOut [ ] reserved +* ppvObject [out] Resulting Interface +* +*/ +HRESULT WINAPI CFontsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, + UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + CComPtr pObj; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", this, + hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IContextMenu) && (cidl >= 1)) + { + pObj = (IContextMenu *)this; + this->apidl = apidl[0]; + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1)) + { + hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } + else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IExtractIconW) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) + { + hr = this->QueryInterface(IID_IDropTarget, (LPVOID *) & pObj); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj.Detach(); + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +/************************************************************************** +* ISF_Fonts_fnGetDisplayNameOf +* +*/ +HRESULT WINAPI CFontsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + PIDLFontStruct * pfont; + + TRACE("ISF_Fonts_fnGetDisplayNameOf (%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + pfont = _ILGetFontStruct(pidl); + if (!pfont) + return E_INVALIDARG; + + strRet->pOleStr = (LPWSTR)CoTaskMemAlloc((wcslen(pfont->szName)+1) * sizeof(WCHAR)); + if (!strRet->pOleStr) + return E_OUTOFMEMORY; + + wcscpy(strRet->pOleStr, pfont->szName); + strRet->uType = STRRET_WSTR; + + return S_OK; +} + +/************************************************************************** +* ISF_Fonts_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* hwndOwner [in] Owner window for output +* pidl [in] simple pidl of item to change +* lpszName [in] the items new display name +* dwFlags [in] SHGNO formatting flags +* ppidlOut [out] simple pidl returned +*/ +HRESULT WINAPI CFontsFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, + hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +HRESULT WINAPI CFontsFolder::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CFontsFolder::EnumSearches(IEnumExtraSearch **ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CFontsFolder::GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + TRACE ("(%p)\n", this); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +HRESULT WINAPI CFontsFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) +{ + TRACE ("(%p)\n", this); + + if (!pcsFlags || iColumn >= FontsSHELLVIEWCOLUMNS) + return E_INVALIDARG; + *pcsFlags = FontsSFHeader[iColumn].pcsFlags; + return S_OK; +} + +HRESULT WINAPI CFontsFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CFontsFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) +{ + WCHAR buffer[MAX_PATH] = {0}; + HRESULT hr = E_FAIL; + PIDLFontStruct * pfont; + HANDLE hFile; + LARGE_INTEGER FileSize; + SHFILEINFOW fi; + + TRACE("(%p, %p, %d, %p)\n", this, pidl, iColumn, psd); + + if (iColumn >= FontsSHELLVIEWCOLUMNS) + return E_FAIL; + + psd->fmt = FontsSFHeader[iColumn].fmt; + psd->cxChar = FontsSFHeader[iColumn].cxChar; + if (pidl == NULL) + { + psd->str.uType = STRRET_WSTR; + if (LoadStringW(shell32_hInstance, FontsSFHeader[iColumn].colnameid, buffer, MAX_PATH)) + hr = SHStrDupW(buffer, &psd->str.pOleStr); + + return hr; + } + + if (iColumn == COLUMN_NAME) + { + psd->str.uType = STRRET_WSTR; + return GetDisplayNameOf(pidl, SHGDN_NORMAL, &psd->str); + } + + psd->str.uType = STRRET_CSTR; + psd->str.cStr[0] = '\0'; + + switch(iColumn) + { + case COLUMN_TYPE: + pfont = _ILGetFontStruct(pidl); + if (pfont) + { + if (SHGetFileInfoW(pfont->szName + pfont->offsFile, 0, &fi, sizeof(fi), SHGFI_TYPENAME)) + { + psd->str.pOleStr = (LPWSTR)CoTaskMemAlloc((wcslen(fi.szTypeName)+1) * sizeof(WCHAR)); + if (!psd->str.pOleStr) + return E_OUTOFMEMORY; + wcscpy(psd->str.pOleStr, fi.szTypeName); + psd->str.uType = STRRET_WSTR; + return S_OK; + } + } + break; + case COLUMN_SIZE: + pfont = _ILGetFontStruct(pidl); + if (pfont) + { + hFile = CreateFileW(pfont->szName + pfont->offsFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + if (GetFileSizeEx(hFile, &FileSize)) + { + if (StrFormatByteSizeW(FileSize.QuadPart, buffer, sizeof(buffer)/sizeof(WCHAR))) + { + psd->str.pOleStr = (LPWSTR)CoTaskMemAlloc(wcslen(buffer) + 1); + if (!psd->str.pOleStr) + return E_OUTOFMEMORY; + wcscpy(psd->str.pOleStr, buffer); + psd->str.uType = STRRET_WSTR; + CloseHandle(hFile); + return S_OK; + } + } + CloseHandle(hFile); + } + } + break; + case COLUMN_FILENAME: + pfont = _ILGetFontStruct(pidl); + if (pfont) + { + psd->str.pOleStr = (LPWSTR)CoTaskMemAlloc((wcslen(pfont->szName + pfont->offsFile) + 1) * sizeof(WCHAR)); + if (psd->str.pOleStr) + { + psd->str.uType = STRRET_WSTR; + wcscpy(psd->str.pOleStr, pfont->szName + pfont->offsFile); + return S_OK; + } + else + return E_OUTOFMEMORY; + } + break; + } + + return E_FAIL; +} + +HRESULT WINAPI CFontsFolder::MapColumnToSCID(UINT column, SHCOLUMNID *pscid) +{ + FIXME ("(%p)\n", this); + + return E_NOTIMPL; +} + +/************************************************************************ + * INPFldr_PersistFolder2_GetClassID + */ +HRESULT WINAPI CFontsFolder::GetClassID(CLSID *lpClassId) +{ + TRACE ("(%p)\n", this); + + if (!lpClassId) + return E_POINTER; + + *lpClassId = CLSID_FontsFolderShortcut; + + return S_OK; +} + +/************************************************************************ + * INPFldr_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +HRESULT WINAPI CFontsFolder::Initialize(LPCITEMIDLIST pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + return E_NOTIMPL; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +HRESULT WINAPI CFontsFolder::GetCurFolder (LPITEMIDLIST *pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + if (!pidl) + return E_POINTER; + + *pidl = ILClone (pidlRoot); + + return S_OK; +} + +/************************************************************************** +* IContextMenu2 Implementation +*/ + +/************************************************************************** +* ISF_Fonts_IContextMenu_QueryContextMenu() +*/ +HRESULT WINAPI CFontsFolder::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) +{ + WCHAR szBuffer[30] = {0}; + ULONG Count = 1; + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", + this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); + Count++; + } + + if (LoadStringW(shell32_hInstance, IDS_PRINT_VERB, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + } + + if (LoadStringW(shell32_hInstance, IDS_COPY, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + } + + if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + } + + if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + } + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); +} + +/************************************************************************** +* ISF_Fonts_IContextMenu_InvokeCommand() +*/ +HRESULT WINAPI CFontsFolder::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) +{ + SHELLEXECUTEINFOW sei; + PIDLFontStruct * pfont; + SHFILEOPSTRUCTW op; + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",this,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1) || lpcmi->lpVerb == MAKEINTRESOURCEA(2) || lpcmi->lpVerb == MAKEINTRESOURCEA(7)) + { + ZeroMemory(&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.hwnd = lpcmi->hwnd; + sei.nShow = SW_SHOWNORMAL; + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) + sei.lpVerb = L"open"; + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2)) + sei.lpVerb = L"print"; + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(7)) + sei.lpVerb = L"properties"; + + pfont = _ILGetFontStruct(apidl); + sei.lpFile = pfont->szName + pfont->offsFile; + + if (ShellExecuteExW(&sei) == FALSE) + return E_FAIL; + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(4)) + { + FIXME("implement font copying\n"); + return E_NOTIMPL; + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(6)) + { + ZeroMemory(&op, sizeof(op)); + op.hwnd = lpcmi->hwnd; + op.wFunc = FO_DELETE; + op.fFlags = FOF_ALLOWUNDO; + pfont = _ILGetFontStruct(apidl); + op.pFrom = pfont->szName + pfont->offsFile; + SHFileOperationW(&op); + } + + return S_OK; +} + +/************************************************************************** + * ISF_Fonts_IContextMenu_GetCommandString() + * + */ +HRESULT WINAPI CFontsFolder::GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) +{ + TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + return E_FAIL; +} + +/************************************************************************** +* ISF_Fonts_IContextMenu_HandleMenuMsg() +*/ +HRESULT WINAPI CFontsFolder::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TRACE("ISF_Fonts_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",this, uMsg, wParam, lParam); + + return E_NOTIMPL; +} diff --git a/dll/win32/shell32_new/shfldr_fonts.h b/dll/win32/shell32_new/shfldr_fonts.h new file mode 100644 index 00000000000..bce7bc3940a --- /dev/null +++ b/dll/win32/shell32_new/shfldr_fonts.h @@ -0,0 +1,95 @@ +/* + * Fonts folder + * + * Copyright 2008 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHFLDR_FONTS_H_ +#define _SHFLDR_FONTS_H_ + +class CFontsFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2, + public IContextMenu2 +{ +private: + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + LPCITEMIDLIST apidl; /* currently focused font item */ +public: + CFontsFolder(); + ~CFontsFolder(); + HRESULT WINAPI FinalConstruct(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + +DECLARE_REGISTRY_RESOURCEID(IDR_FONTSFOLDERSHORTCUT) +DECLARE_NOT_AGGREGATABLE(CFontsFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CFontsFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) +END_COM_MAP() +}; + +#endif // _SHFLDR_FONTS_H_ diff --git a/dll/win32/shell32_new/shfldr_fs.cpp b/dll/win32/shell32_new/shfldr_fs.cpp new file mode 100644 index 00000000000..df1d3cc48d9 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_fs.cpp @@ -0,0 +1,1324 @@ + +/* + * file system folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_fs.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/* +CFileSysEnum should do an initial FindFirstFile and do a FindNextFile as each file is +returned by Next. When the enumerator is created, it can do numerous additional operations +including formatting a drive, reconnecting a network share drive, and requesting a disk +be inserted in a removable drive. +*/ + +/*********************************************************************** +* IShellFolder implementation +*/ + +class CFileSysEnum : + public IEnumIDListImpl +{ +private: +public: + CFileSysEnum(); + ~CFileSysEnum(); + HRESULT WINAPI Initialize(LPWSTR sPathTarget, DWORD dwFlags); + +BEGIN_COM_MAP(CFileSysEnum) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +CFileSysEnum::CFileSysEnum() +{ +} + +CFileSysEnum::~CFileSysEnum() +{ +} + +HRESULT WINAPI CFileSysEnum::Initialize(LPWSTR sPathTarget, DWORD dwFlags) +{ + return CreateFolderEnumList(sPathTarget, dwFlags); +} + +/************************************************************************** +* registers clipboardformat once +*/ +void CFSFolder::SF_RegisterClipFmt() +{ + TRACE ("(%p)\n", this); + + if (!cfShellIDList) { + cfShellIDList = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); + } +} + +CFSFolder::CFSFolder() +{ + pclsid = (CLSID *)&CLSID_ShellFSFolder; + sPathTarget = NULL; + pidlRoot = NULL; + cfShellIDList = 0; + fAcceptFmt = FALSE; +} + +CFSFolder::~CFSFolder() +{ + TRACE ("-- destroying IShellFolder(%p)\n", this); + + SHFree (pidlRoot); + SHFree (sPathTarget); +} + + +static const shvheader GenericSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, + {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +}; + +#define GENERICSHELLVIEWCOLUMNS 5 + +/************************************************************************** + * SHELL32_CreatePidlFromBindCtx [internal] + * + * If the caller bound File System Bind Data, assume it is the + * find data for the path. + * This allows binding of paths that don't exist. + */ +LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path) +{ + static WCHAR szfsbc[] = { + 'F','i','l','e',' ','S','y','s','t','e','m',' ', + 'B','i','n','d',' ','D','a','t','a',0 }; + IFileSystemBindData *fsbd = NULL; + LPITEMIDLIST pidl = NULL; + IUnknown *param = NULL; + WIN32_FIND_DATAW wfd; + HRESULT r; + + TRACE("%p %s\n", pbc, debugstr_w(path)); + + if (!pbc) + return NULL; + + /* see if the caller bound File System Bind Data */ + r = pbc->GetObjectParam((LPOLESTR) szfsbc, ¶m ); + if (FAILED(r)) + return NULL; + + r = param->QueryInterface(IID_IFileSystemBindData, + (LPVOID*) &fsbd ); + if (SUCCEEDED(r)) + { + r = fsbd->GetFindData(&wfd ); + if (SUCCEEDED(r)) + { + lstrcpynW( &wfd.cFileName[0], path, MAX_PATH ); + pidl = _ILCreateFromFindDataW( &wfd ); + } + fsbd->Release(); + } + + return pidl; +} + +/************************************************************************** +* IShellFolder_ParseDisplayName {SHELL32} +* +* Parse a display name. +* +* PARAMS +* hwndOwner [in] Parent window for any message's +* pbc [in] optional FileSystemBindData context +* lpszDisplayName [in] Unicode displayname. +* pchEaten [out] (unicode) characters processed +* ppidl [out] complex pidl to item +* pdwAttributes [out] items attributes +* +* NOTES +* Every folder tries to parse only its own (the leftmost) pidl and creates a +* subfolder to evaluate the remaining parts. +* Now we can parse into namespaces implemented by shell extensions +* +* Behaviour on win98: lpszDisplayName=NULL -> crash +* lpszDisplayName="" -> returns mycoputer-pidl +* +* FIXME +* pdwAttributes is not set +* pchEaten is not set like in windows +*/ +HRESULT WINAPI CFSFolder::ParseDisplayName(HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD *pchEaten, LPITEMIDLIST *ppidl, + DWORD *pdwAttributes) +{ + HRESULT hr = E_INVALIDARG; + LPCWSTR szNext = NULL; + WCHAR szElement[MAX_PATH]; + WCHAR szPath[MAX_PATH]; + LPITEMIDLIST pidlTemp = NULL; + DWORD len; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + this, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + if (!lpszDisplayName || !ppidl) + return E_INVALIDARG; + + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, lpszDisplayName); + if (!pidlTemp && *lpszDisplayName) + { + /* get the next element */ + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + + /* build the full pathname to the element */ + lstrcpynW(szPath, sPathTarget, MAX_PATH - 1); + PathAddBackslashW(szPath); + len = wcslen(szPath); + lstrcpynW(szPath + len, szElement, MAX_PATH - len); + + /* get the pidl */ + hr = _ILCreateFromPathW(szPath, &pidlTemp); + + if (SUCCEEDED(hr)) { + if (szNext && *szNext) { + /* try to analyse the next element */ + hr = SHELL32_ParseNextElement (this, hwndOwner, pbc, + &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); + } else { + /* it's the last element */ + if (pdwAttributes && *pdwAttributes) { + hr = SHELL32_GetItemAttributes (this, + pidlTemp, pdwAttributes); + } + } + } + } + + if (SUCCEEDED(hr)) + *ppidl = pidlTemp; + else + *ppidl = NULL; + + TRACE ("(%p)->(-- pidl=%p ret=0x%08x)\n", this, ppidl ? *ppidl : 0, hr); + + return hr; +} + +/************************************************************************** +* IShellFolder_fnEnumObjects +* PARAMETERS +* HWND hwndOwner, //[in ] Parent Window +* DWORD grfFlags, //[in ] SHCONTF enumeration mask +* LPENUMIDLIST* ppenumIDList //[out] IEnumIDList interface +*/ +HRESULT WINAPI CFSFolder::EnumObjects (HWND hwndOwner, + DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (sPathTarget, dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** +* IShellFolder_fnBindToObject +* PARAMETERS +* LPCITEMIDLIST pidl, //[in ] relative pidl to open +* LPBC pbc, //[in ] optional FileSystemBindData context +* REFIID riid, //[in ] Initial Interface +* LPVOID* ppvObject //[out] Interface* +*/ +HRESULT WINAPI CFSFolder::BindToObject(LPCITEMIDLIST pidl, + LPBC pbc, REFIID riid, LPVOID * ppvOut) +{ + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this, pidl, pbc, + shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild (pidlRoot, sPathTarget, pidl, riid, + ppvOut); +} + +/************************************************************************** +* IShellFolder_fnBindToStorage +* PARAMETERS +* LPCITEMIDLIST pidl, //[in ] complex pidl to store +* LPBC pbc, //[in ] reserved +* REFIID riid, //[in ] Initial storage interface +* LPVOID* ppvObject //[out] Interface* returned +*/ +HRESULT WINAPI CFSFolder::BindToStorage(LPCITEMIDLIST pidl, + LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, pidl, pbcReserved, + shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* IShellFolder_fnCompareIDs +*/ + +HRESULT WINAPI CFSFolder::CompareIDs(LPARAM lParam, + LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* IShellFolder_fnCreateViewObject +*/ +HRESULT WINAPI CFSFolder::CreateViewObject(HWND hwndOwner, + REFIID riid, LPVOID * ppvOut) +{ + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", this, hwndOwner, shdebugstr_guid (&riid), + ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) { + hr = this->QueryInterface (IID_IDropTarget, ppvOut); + } else if (IsEqualIID (riid, IID_IContextMenu)) { + FIXME ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, IID_IShellView)) { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) { + hr = pShellView->QueryInterface(riid, ppvOut); + pShellView->Release(); + } + } + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** +* IShellFolder_fnGetAttributesOf +* +* PARAMETERS +* UINT cidl, //[in ] num elements in pidl array +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* ULONG* rgfInOut) //[out] result array +* +*/ +HRESULT WINAPI CFSFolder::GetAttributesOf(UINT cidl, + LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", this, cidl, apidl, + rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if(cidl == 0){ + IShellFolder *psfParent = NULL; + LPCITEMIDLIST rpidl = NULL; + + hr = SHBindToParent(pidlRoot, IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); + if(SUCCEEDED(hr)) { + SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); + psfParent->Release(); + } + } + else { + while (cidl > 0 && *apidl) { + pdump (*apidl); + SHELL32_GetItemAttributes (this, *apidl, rgfInOut); + apidl++; + cidl--; + } + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + + return hr; +} + +/************************************************************************** +* IShellFolder_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +* NOTES +* This function gets asked to return "view objects" for one or more (multiple +* select) items: +* The viewobject typically is an COM object with one of the following +* interfaces: +* IExtractIcon,IDataObject,IContextMenu +* In order to support icon positions in the default Listview your DataObject +* must implement the SetData method (in addition to GetData :) - the shell +* passes a barely documented "Icon positions" structure to SetData when the +* drag starts, and GetData's it if the drop is in another explorer window that +* needs the positions. +*/ +HRESULT WINAPI CFSFolder::GetUIObjectOf(HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, + UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + this, hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IContextMenu) && (cidl >= 1)) { + hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)this, NULL, 0, NULL, (IContextMenu**)&pObj); + } else if (IsEqualIID (riid, IID_IDataObject)){ + if (cidl >= 1) { + hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } + else + { + hr = IDataObject_Constructor (hwndOwner, pidlRoot, (LPCITEMIDLIST*)&pidlRoot, 1, (IDataObject **)&pObj); + } + } else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1)) { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) { + hr = this->QueryInterface(IID_IDropTarget, + (LPVOID *) & pObj); + } else if ((IsEqualIID(riid,IID_IShellLinkW) || + IsEqualIID(riid,IID_IShellLinkA)) && (cidl == 1)) { + pidl = ILCombine (pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); + SHFree (pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +static const WCHAR AdvancedW[] = { 'S','O','F','T','W','A','R','E', + '\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l', + 'o','r','e','r','\\','A','d','v','a','n','c','e','d',0 }; +static const WCHAR HideFileExtW[] = { 'H','i','d','e','F','i','l','e','E','x', + 't',0 }; +static const WCHAR NeverShowExtW[] = { 'N','e','v','e','r','S','h','o','w','E', + 'x','t',0 }; + +/****************************************************************************** + * SHELL_FS_HideExtension [Internal] + * + * Query the registry if the filename extension of a given path should be + * hidden. + * + * PARAMS + * szPath [I] Relative or absolute path of a file + * + * RETURNS + * TRUE, if the filename's extension should be hidden + * FALSE, otherwise. + */ +BOOL SHELL_FS_HideExtension(LPWSTR szPath) +{ + HKEY hKey; + DWORD dwData; + DWORD dwDataSize = sizeof (DWORD); + BOOL doHide = FALSE; /* The default value is FALSE (win98 at least) */ + + if (!RegCreateKeyExW(HKEY_CURRENT_USER, AdvancedW, 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) { + if (!RegQueryValueExW(hKey, HideFileExtW, 0, 0, (LPBYTE) &dwData, &dwDataSize)) + doHide = dwData; + RegCloseKey (hKey); + } + + if (!doHide) { + LPWSTR ext = PathFindExtensionW(szPath); + + if (*ext != '\0') { + WCHAR classname[MAX_PATH]; + LONG classlen = sizeof(classname); + + if (!RegQueryValueW(HKEY_CLASSES_ROOT, ext, classname, &classlen)) + if (!RegOpenKeyW(HKEY_CLASSES_ROOT, classname, &hKey)) { + if (!RegQueryValueExW(hKey, NeverShowExtW, 0, NULL, NULL, NULL)) + doHide = TRUE; + RegCloseKey(hKey); + } + } + } + return doHide; +} + +void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath, DWORD dwFlags) +{ + /*FIXME: MSDN also mentions SHGDN_FOREDITING which is not yet handled. */ + if (!(dwFlags & SHGDN_FORPARSING) && + ((dwFlags & SHGDN_INFOLDER) || (dwFlags == SHGDN_NORMAL))) { + if (SHELL_FS_HideExtension(szPath) && szPath[0] != '.') + PathRemoveExtensionW(szPath); + } +} + +/************************************************************************** +* IShellFolder_fnGetDisplayNameOf +* Retrieves the display name for the specified file object or subfolder +* +* PARAMETERS +* LPCITEMIDLIST pidl, //[in ] complex pidl to item +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPSTRRET lpName) //[out] Returned display name +* +* FIXME +* if the name is in the pidl the ret value should be a STRRET_OFFSET +*/ + +HRESULT WINAPI CFSFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, + DWORD dwFlags, LPSTRRET strRet) +{ + LPWSTR pszPath; + + HRESULT hr = S_OK; + int len = 0; + + TRACE ("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!pidl || !strRet) + return E_INVALIDARG; + + pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); + if (!pszPath) + return E_OUTOFMEMORY; + + if (_ILIsDesktop(pidl)) { /* empty pidl */ + if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER)) + { + if (sPathTarget) + lstrcpynW(pszPath, sPathTarget, MAX_PATH); + } else { + /* pidl has to contain exactly one non null SHITEMID */ + hr = E_INVALIDARG; + } + } else if (_ILIsPidlSimple(pidl)) { + if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && + sPathTarget) + { + lstrcpynW(pszPath, sPathTarget, MAX_PATH); + PathAddBackslashW(pszPath); + len = wcslen(pszPath); + } + _ILSimpleGetTextW(pidl, pszPath + len, MAX_PATH + 1 - len); + if (!_ILIsFolder(pidl)) SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); + } else { + hr = SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, pszPath, MAX_PATH); + } + + if (SUCCEEDED(hr)) { + /* Win9x always returns ANSI strings, NT always returns Unicode strings */ + if (GetVersion() & 0x80000000) { + strRet->uType = STRRET_CSTR; + if (!WideCharToMultiByte(CP_ACP, 0, pszPath, -1, strRet->cStr, MAX_PATH, + NULL, NULL)) + strRet->cStr[0] = '\0'; + CoTaskMemFree(pszPath); + } else { + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszPath; + } + } else + CoTaskMemFree(pszPath); + + TRACE ("-- (%p)->(%s)\n", this, strRet->uType == STRRET_CSTR ? strRet->cStr : debugstr_w(strRet->pOleStr)); + return hr; +} + +/************************************************************************** +* IShellFolder_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +HRESULT WINAPI CFSFolder::SetNameOf (HWND hwndOwner, + LPCITEMIDLIST pidl, + LPCOLESTR lpName, + DWORD dwFlags, + LPITEMIDLIST * pPidlOut) +{ + WCHAR szSrc[MAX_PATH + 1], szDest[MAX_PATH + 1]; + LPWSTR ptr; + BOOL bIsFolder = _ILIsFolder (ILFindLastID (pidl)); + + TRACE ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, + debugstr_w (lpName), dwFlags, pPidlOut); + + /* build source path */ + lstrcpynW(szSrc, sPathTarget, MAX_PATH); + ptr = PathAddBackslashW (szSrc); + if (ptr) + _ILSimpleGetTextW (pidl, ptr, MAX_PATH + 1 - (ptr - szSrc)); + + /* build destination path */ + if (dwFlags == SHGDN_NORMAL || dwFlags & SHGDN_INFOLDER) { + lstrcpynW(szDest, sPathTarget, MAX_PATH); + ptr = PathAddBackslashW (szDest); + if (ptr) + lstrcpynW(ptr, lpName, MAX_PATH + 1 - (ptr - szDest)); + } else + lstrcpynW(szDest, lpName, MAX_PATH); + + if(!(dwFlags & SHGDN_FORPARSING) && SHELL_FS_HideExtension(szSrc)) { + WCHAR *ext = PathFindExtensionW(szSrc); + if(*ext != '\0') { + INT len = wcslen(szDest); + lstrcpynW(szDest + len, ext, MAX_PATH - len); + } + } + + TRACE ("src=%s dest=%s\n", debugstr_w(szSrc), debugstr_w(szDest)); + if (!memcmp(szSrc, szDest, (wcslen(szDest)+1) * sizeof(WCHAR))) + { + /* src and destination is the same */ + HRESULT hr = S_OK; + if (pPidlOut) + hr = _ILCreateFromPathW(szDest, pPidlOut); + + return hr; + } + + + if (MoveFileW (szSrc, szDest)) { + HRESULT hr = S_OK; + + if (pPidlOut) + hr = _ILCreateFromPathW(szDest, pPidlOut); + + SHChangeNotify (bIsFolder ? SHCNE_RENAMEFOLDER : SHCNE_RENAMEITEM, + SHCNF_PATHW, szSrc, szDest); + + return hr; + } + + return E_FAIL; +} + +HRESULT WINAPI CFSFolder::GetDefaultSearchGUID(GUID * pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CFSFolder::EnumSearches(IEnumExtraSearch ** ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CFSFolder::GetDefaultColumn(DWORD dwRes, + ULONG * pSort, ULONG * pDisplay) +{ + TRACE ("(%p)\n", this); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +HRESULT WINAPI CFSFolder::GetDefaultColumnState(UINT iColumn, + DWORD * pcsFlags) +{ + TRACE ("(%p)\n", this); + + if (!pcsFlags || iColumn >= GENERICSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + *pcsFlags = GenericSFHeader[iColumn].pcsFlags; + + return S_OK; +} + +HRESULT WINAPI CFSFolder::GetDetailsEx(LPCITEMIDLIST pidl, + const SHCOLUMNID * pscid, VARIANT * pv) +{ + FIXME ("(%p)\n", this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CFSFolder::GetDetailsOf(LPCITEMIDLIST pidl, + UINT iColumn, SHELLDETAILS * psd) +{ + HRESULT hr = E_FAIL; + + TRACE ("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd); + + if (!psd || iColumn >= GENERICSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + /* the header titles */ + psd->fmt = GenericSFHeader[iColumn].fmt; + psd->cxChar = GenericSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA (shell32_hInstance, GenericSFHeader[iColumn].colnameid, + psd->str.cStr, MAX_PATH); + return S_OK; + } else { + hr = S_OK; + psd->str.uType = STRRET_CSTR; + /* the data from the pidl */ + switch (iColumn) { + case 0: /* name */ + hr = GetDisplayNameOf (pidl, + SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* size */ + _ILGetFileSize (pidl, psd->str.cStr, MAX_PATH); + break; + case 2: /* type */ + _ILGetFileType (pidl, psd->str.cStr, MAX_PATH); + break; + case 3: /* date */ + _ILGetFileDate (pidl, psd->str.cStr, MAX_PATH); + break; + case 4: /* attributes */ + _ILGetFileAttributes (pidl, psd->str.cStr, MAX_PATH); + break; + } + } + + return hr; +} + +HRESULT WINAPI CFSFolder::MapColumnToSCID (UINT column, + SHCOLUMNID * pscid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +/**************************************************************************** + * ISFHelper for IShellFolder implementation + */ + +/**************************************************************************** + * ISFHelper_fnAddFolder + * + * creates a unique folder name + */ + +HRESULT WINAPI CFSFolder::GetUniqueName(LPWSTR pwszName, UINT uLen) +{ + IEnumIDList *penum; + HRESULT hr; + WCHAR wszText[MAX_PATH]; + WCHAR wszNewFolder[25]; + const WCHAR wszFormat[] = {'%','s',' ','%','d',0 }; + + LoadStringW(shell32_hInstance, IDS_NEWFOLDER, wszNewFolder, sizeof(wszNewFolder)/sizeof(WCHAR)); + + TRACE ("(%p)(%p %u)\n", this, pwszName, uLen); + + if (uLen < sizeof(wszNewFolder)/sizeof(WCHAR) + 3) + return E_POINTER; + + lstrcpynW (pwszName, wszNewFolder, uLen); + + hr = EnumObjects(0, + SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum); + if (penum) { + LPITEMIDLIST pidl; + DWORD dwFetched; + int i = 1; + +next: + penum->Reset (); + while (S_OK == penum->Next(1, &pidl, &dwFetched) && + dwFetched) { + _ILSimpleGetTextW (pidl, wszText, MAX_PATH); + if (0 == lstrcmpiW (wszText, pwszName)) { + _snwprintf (pwszName, uLen, wszFormat, wszNewFolder, i++); + if (i > 99) { + hr = E_FAIL; + break; + } + goto next; + } + } + + penum->Release(); + } + return hr; +} + +/**************************************************************************** + * ISFHelper_fnAddFolder + * + * adds a new folder. + */ + +HRESULT WINAPI CFSFolder::AddFolder(HWND hwnd, LPCWSTR pwszName, + LPITEMIDLIST * ppidlOut) +{ + WCHAR wszNewDir[MAX_PATH]; + DWORD bRes; + HRESULT hres = E_FAIL; + + TRACE ("(%p)(%s %p)\n", this, debugstr_w(pwszName), ppidlOut); + + wszNewDir[0] = 0; + if (sPathTarget) + lstrcpynW(wszNewDir, sPathTarget, MAX_PATH); + PathAppendW(wszNewDir, pwszName); + + bRes = CreateDirectoryW (wszNewDir, NULL); + if (bRes) { + SHChangeNotify (SHCNE_MKDIR, SHCNF_PATHW, wszNewDir, NULL); + + hres = S_OK; + + if (ppidlOut) + hres = _ILCreateFromPathW(wszNewDir, ppidlOut); + } else { + WCHAR wszText[128 + MAX_PATH]; + WCHAR wszTempText[128]; + WCHAR wszCaption[256]; + + /* Cannot Create folder because of permissions */ + LoadStringW (shell32_hInstance, IDS_CREATEFOLDER_DENIED, wszTempText, + sizeof (wszTempText)); + LoadStringW (shell32_hInstance, IDS_CREATEFOLDER_CAPTION, wszCaption, + sizeof (wszCaption)); + swprintf (wszText, wszTempText, wszNewDir); + MessageBoxW (hwnd, wszText, wszCaption, MB_OK | MB_ICONEXCLAMATION); + } + + return hres; +} + +/**************************************************************************** + * build_paths_list + * + * Builds a list of paths like the one used in SHFileOperation from a table of + * PIDLs relative to the given base folder + */ +WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls) +{ + WCHAR *wszPathsList; + WCHAR *wszListPos; + int iPathLen; + int i; + + iPathLen = wcslen(wszBasePath); + wszPathsList = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, MAX_PATH*sizeof(WCHAR)*cidl+1); + wszListPos = wszPathsList; + + for (i = 0; i < cidl; i++) { + if (!_ILIsFolder(pidls[i]) && !_ILIsValue(pidls[i])) + continue; + + lstrcpynW(wszListPos, wszBasePath, MAX_PATH); + /* FIXME: abort if path too long */ + _ILSimpleGetTextW(pidls[i], wszListPos+iPathLen, MAX_PATH-iPathLen); + wszListPos += wcslen(wszListPos)+1; + } + *wszListPos=0; + return wszPathsList; +} + +/**************************************************************************** + * ISFHelper_fnDeleteItems + * + * deletes items in folder + */ +HRESULT WINAPI CFSFolder::DeleteItems(UINT cidl, LPCITEMIDLIST * apidl) +{ + UINT i; + SHFILEOPSTRUCTW op; + WCHAR wszPath[MAX_PATH]; + WCHAR *wszPathsList; + HRESULT ret; + WCHAR *wszCurrentPath; + + TRACE ("(%p)(%u %p)\n", this, cidl, apidl); + if (cidl==0) return S_OK; + + if (sPathTarget) + lstrcpynW(wszPath, sPathTarget, MAX_PATH); + else + wszPath[0] = '\0'; + PathAddBackslashW(wszPath); + wszPathsList = build_paths_list(wszPath, cidl, apidl); + + ZeroMemory(&op, sizeof(op)); + op.hwnd = GetActiveWindow(); + op.wFunc = FO_DELETE; + op.pFrom = wszPathsList; + op.fFlags = FOF_ALLOWUNDO; + if (SHFileOperationW(&op)) + { + WARN("SHFileOperation failed\n"); + ret = E_FAIL; + } + else + ret = S_OK; + + /* we currently need to manually send the notifies */ + wszCurrentPath = wszPathsList; + for (i = 0; i < cidl; i++) + { + LONG wEventId; + + if (_ILIsFolder(apidl[i])) + wEventId = SHCNE_RMDIR; + else if (_ILIsValue(apidl[i])) + wEventId = SHCNE_DELETE; + else + continue; + + /* check if file exists */ + if (GetFileAttributesW(wszCurrentPath) == INVALID_FILE_ATTRIBUTES) + { + LPITEMIDLIST pidl = ILCombine(pidlRoot, apidl[i]); + SHChangeNotify(wEventId, SHCNF_IDLIST, pidl, NULL); + SHFree(pidl); + } + + wszCurrentPath += wcslen(wszCurrentPath)+1; + } + HeapFree(GetProcessHeap(), 0, wszPathsList); + return ret; +} + +/**************************************************************************** + * ISFHelper_fnCopyItems + * + * copies items to this folder + */ +HRESULT WINAPI CFSFolder::CopyItems(IShellFolder * pSFFrom, UINT cidl, + LPCITEMIDLIST * apidl) +{ + IPersistFolder2 *ppf2 = NULL; + WCHAR szSrcPath[MAX_PATH]; + WCHAR szTargetPath[MAX_PATH]; + SHFILEOPSTRUCTW op; + LPITEMIDLIST pidl; + LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList, pszFileName; + int res, length; + HRESULT hr; + STRRET strRet; + + TRACE ("(%p)->(%p,%u,%p)\n", this, pSFFrom, cidl, apidl); + + hr = pSFFrom->QueryInterface (IID_IPersistFolder2, (LPVOID *) & ppf2); + if (SUCCEEDED(hr)) + { + if (FAILED(ppf2->GetCurFolder(&pidl))) + { + ppf2->Release(); + return E_FAIL; + } + ppf2->Release(); + + if (FAILED(pSFFrom->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strRet))) + { + SHFree (pidl); + return E_FAIL; + } + + if (FAILED(StrRetToBufW(&strRet, pidl, szSrcPath, MAX_PATH))) + { + SHFree (pidl); + return E_FAIL; + } + SHFree (pidl); + + pszSrc = PathAddBackslashW (szSrcPath); + + wcscpy(szTargetPath, sPathTarget); + pszTarget = PathAddBackslashW (szTargetPath); + + pszSrcList = build_paths_list(szSrcPath, cidl, apidl); + pszTargetList = build_paths_list(szTargetPath, cidl, apidl); + + if (!pszSrcList || !pszTargetList) + { + if (pszSrcList) + HeapFree(GetProcessHeap(), 0, pszSrcList); + + if (pszTargetList) + HeapFree(GetProcessHeap(), 0, pszTargetList); + + SHFree (pidl); + ppf2->Release (); + return E_OUTOFMEMORY; + } + ZeroMemory(&op, sizeof(op)); + if (!pszSrcList[0]) + { + /* remove trailing backslash */ + pszSrc--; + pszSrc[0] = L'\0'; + op.pFrom = szSrcPath; + } + else + { + op.pFrom = pszSrcList; + } + + if (!pszTargetList[0]) + { + /* remove trailing backslash */ + if (pszTarget - szTargetPath > 3) + { + pszTarget--; + pszTarget[0] = L'\0'; + } + else + { + pszTarget[1] = L'\0'; + } + + op.pTo = szTargetPath; + } + else + { + op.pTo = pszTargetList; + } + op.hwnd = GetActiveWindow(); + op.wFunc = FO_COPY; + op.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMMKDIR; + + res = SHFileOperationW(&op); + + if (res == DE_SAMEFILE) + { + length = wcslen(szTargetPath); + + pszFileName = wcsrchr(pszSrcList, '\\'); + pszFileName++; + + if (LoadStringW(shell32_hInstance, IDS_COPY_OF, pszTarget, MAX_PATH - length)) + { + wcscat(szTargetPath, L" "); + } + + wcscat(szTargetPath, pszFileName); + op.pTo = szTargetPath; + + res = SHFileOperationW(&op); + } + + HeapFree(GetProcessHeap(), 0, pszSrcList); + HeapFree(GetProcessHeap(), 0, pszTargetList); + + if (res) + return E_FAIL; + else + return S_OK; + } + return E_FAIL; +} + +/************************************************************************ + * IFSFldr_PersistFolder3_GetClassID + */ +HRESULT WINAPI CFSFolder::GetClassID(CLSID * lpClassId) +{ + TRACE ("(%p)\n", this); + + if (!lpClassId) + return E_POINTER; + *lpClassId = *pclsid; + + return S_OK; +} + +/************************************************************************ + * IFSFldr_PersistFolder3_Initialize + * + * NOTES + * sPathTarget is not set. Don't know how to handle in a non rooted environment. + */ +HRESULT WINAPI CFSFolder::Initialize (LPCITEMIDLIST pidl) +{ + WCHAR wszTemp[MAX_PATH]; + + TRACE ("(%p)->(%p)\n", this, pidl); + + SHFree (pidlRoot); /* free the old pidl */ + pidlRoot = ILClone (pidl); /* set my pidl */ + + SHFree (sPathTarget); + sPathTarget = NULL; + + /* set my path */ + if (SHGetPathFromIDListW (pidl, wszTemp)) { + int len = wcslen(wszTemp); + sPathTarget = (WCHAR *)SHAlloc((len + 1) * sizeof(WCHAR)); + if (!sPathTarget) + return E_OUTOFMEMORY; + memcpy(sPathTarget, wszTemp, (len + 1) * sizeof(WCHAR)); + } + + TRACE ("--(%p)->(%s)\n", this, debugstr_w(sPathTarget)); + return S_OK; +} + +/************************************************************************** + * IFSFldr_PersistFolder3_GetCurFolder + */ +HRESULT WINAPI CFSFolder::GetCurFolder(LPITEMIDLIST * pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + if (!pidl) return E_POINTER; + *pidl = ILClone (pidlRoot); + return S_OK; +} + +/************************************************************************** + * IFSFldr_PersistFolder3_InitializeEx + * + * FIXME: error handling + */ +HRESULT WINAPI CFSFolder::InitializeEx(IBindCtx * pbc, LPCITEMIDLIST pidlRootx, + const PERSIST_FOLDER_TARGET_INFO * ppfti) +{ + WCHAR wszTemp[MAX_PATH]; + + TRACE ("(%p)->(%p,%p,%p)\n", this, pbc, pidlRootx, ppfti); + if (ppfti) + TRACE ("--%p %s %s 0x%08x 0x%08x\n", + ppfti->pidlTargetFolder, debugstr_w (ppfti->szTargetParsingName), + debugstr_w (ppfti->szNetworkProvider), ppfti->dwAttributes, + ppfti->csidl); + + pdump (pidlRootx); + if (ppfti && ppfti->pidlTargetFolder) + pdump (ppfti->pidlTargetFolder); + + if (pidlRoot) + __SHFreeAndNil (&pidlRoot); /* free the old */ + if (sPathTarget) + __SHFreeAndNil (&sPathTarget); + + /* + * Root path and pidl + */ + pidlRoot = ILClone (pidlRootx); + + /* + * the target folder is spezified in csidl OR pidlTargetFolder OR + * szTargetParsingName + */ + if (ppfti) { + if (ppfti->csidl != -1) { + if (SHGetSpecialFolderPathW (0, wszTemp, ppfti->csidl, + ppfti->csidl & CSIDL_FLAG_CREATE)) { + int len = wcslen(wszTemp); + sPathTarget = (WCHAR *)SHAlloc((len + 1) * sizeof(WCHAR)); + if (!sPathTarget) + return E_OUTOFMEMORY; + memcpy(sPathTarget, wszTemp, (len + 1) * sizeof(WCHAR)); + } + } else if (ppfti->szTargetParsingName[0]) { + int len = wcslen(ppfti->szTargetParsingName); + sPathTarget = (WCHAR *)SHAlloc((len + 1) * sizeof(WCHAR)); + if (!sPathTarget) + return E_OUTOFMEMORY; + memcpy(sPathTarget, ppfti->szTargetParsingName, + (len + 1) * sizeof(WCHAR)); + } else if (ppfti->pidlTargetFolder) { + if (SHGetPathFromIDListW(ppfti->pidlTargetFolder, wszTemp)) { + int len = wcslen(wszTemp); + sPathTarget = (WCHAR *)SHAlloc((len + 1) * sizeof(WCHAR)); + if (!sPathTarget) + return E_OUTOFMEMORY; + memcpy(sPathTarget, wszTemp, (len + 1) * sizeof(WCHAR)); + } + } + } + + TRACE ("--(%p)->(target=%s)\n", this, debugstr_w(sPathTarget)); + pdump (pidlRoot); + return (sPathTarget) ? S_OK : E_FAIL; +} + +HRESULT WINAPI CFSFolder::GetFolderTargetInfo(PERSIST_FOLDER_TARGET_INFO * ppfti) +{ + FIXME ("(%p)->(%p)\n", this, ppfti); + ZeroMemory (ppfti, sizeof (*ppfti)); + return E_NOTIMPL; +} + +/**************************************************************************** + * ISFDropTarget implementation + */ +BOOL CFSFolder::QueryDrop (DWORD dwKeyState, + LPDWORD pdwEffect) +{ + DWORD dwEffect = *pdwEffect; + + *pdwEffect = DROPEFFECT_NONE; + + if (fAcceptFmt) { /* Does our interpretation of the keystate ... */ + *pdwEffect = KeyStateToDropEffect (dwKeyState); + + /* ... matches the desired effect ? */ + if (dwEffect & *pdwEffect) { + return TRUE; + } + } + return FALSE; +} + +HRESULT WINAPI CFSFolder::DragEnter (IDataObject * pDataObject, + DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) +{ + FORMATETC fmt; + + TRACE ("(%p)->(DataObject=%p)\n", this, pDataObject); + + InitFormatEtc (fmt, cfShellIDList, TYMED_HGLOBAL); + + fAcceptFmt = (S_OK == pDataObject->QueryGetData(&fmt)) ? + TRUE : FALSE; + + QueryDrop(dwKeyState, pdwEffect); + + return S_OK; +} + +HRESULT WINAPI CFSFolder::DragOver (DWORD dwKeyState, POINTL pt, + DWORD * pdwEffect) +{ + TRACE ("(%p)\n", this); + + if (!pdwEffect) + return E_INVALIDARG; + + QueryDrop(dwKeyState, pdwEffect); + + return S_OK; +} + +HRESULT WINAPI CFSFolder::DragLeave () +{ + TRACE ("(%p)\n", this); + + fAcceptFmt = FALSE; + + return S_OK; +} + +HRESULT WINAPI CFSFolder::Drop (IDataObject * pDataObject, + DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) +{ + FIXME ("(%p) object dropped\n", this); + + return E_NOTIMPL; +} diff --git a/dll/win32/shell32_new/shfldr_fs.h b/dll/win32/shell32_new/shfldr_fs.h new file mode 100644 index 00000000000..6523659b602 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_fs.h @@ -0,0 +1,112 @@ +/* + * file system folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _CFSFOLDER_H_ +#define _CFSFOLDER_H_ + +class CFSFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder3, + public IDropTarget, + public ISFHelper +{ +private: + CLSID *pclsid; + + /* both paths are parsible from the desktop */ + LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ + + LPITEMIDLIST pidlRoot; /* absolute pidl */ + + UINT cfShellIDList; /* clipboardformat for IDropTarget */ + BOOL fAcceptFmt; /* flag for pending Drop */ +public: + CFSFolder(); + ~CFSFolder(); + void SF_RegisterClipFmt(); + BOOL QueryDrop (DWORD dwKeyState, LPDWORD pdwEffect); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + + // IPersistFolder3 + virtual HRESULT WINAPI InitializeEx(IBindCtx *pbc, LPCITEMIDLIST pidlRoot, const PERSIST_FOLDER_TARGET_INFO *ppfti); + virtual HRESULT WINAPI GetFolderTargetInfo(PERSIST_FOLDER_TARGET_INFO *ppfti); + + // IDropTarget + virtual HRESULT WINAPI DragEnter(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); + virtual HRESULT WINAPI DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); + virtual HRESULT WINAPI DragLeave(); + virtual HRESULT WINAPI Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); + + // ISFHelper + virtual HRESULT WINAPI GetUniqueName(LPWSTR pwszName, UINT uLen); + virtual HRESULT WINAPI AddFolder(HWND hwnd, LPCWSTR pwszName, LPITEMIDLIST *ppidlOut); + virtual HRESULT WINAPI DeleteItems(UINT cidl, LPCITEMIDLIST *apidl); + virtual HRESULT WINAPI CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST *apidl); + +DECLARE_REGISTRY_RESOURCEID(IDR_SHELLFSFOLDER) +DECLARE_NOT_AGGREGATABLE(CFSFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CFSFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder3, IPersistFolder3) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_ISFHelper, ISFHelper) +END_COM_MAP() +}; + +#endif // _CFSFOLDER_H_ diff --git a/dll/win32/shell32_new/shfldr_mycomp.cpp b/dll/win32/shell32_new/shfldr_mycomp.cpp new file mode 100644 index 00000000000..d950fb6b22c --- /dev/null +++ b/dll/win32/shell32_new/shfldr_mycomp.cpp @@ -0,0 +1,876 @@ +/* + * Virtual Workplace folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_mycomp.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/* +CDrivesFolder should create a CRegFolder to represent the virtual items that exist only in +the registry. The CRegFolder is aggregated by the CDrivesFolder. +The CDrivesFolderEnum class should enumerate only drives on the system. Since the CRegFolder +implementation of IShellFolder::EnumObjects enumerates the virtual items, the +CDrivesFolderEnum is only responsible for returning the physical items. + +2. At least on my XP system, the drive pidls returned are of type PT_DRIVE1, not PT_DRIVE +3. The parsing name returned for my computer is incorrect. It should be "My Computer" +*/ + +/*********************************************************************** +* IShellFolder implementation +*/ + +class CDrivesFolderEnum : + public IEnumIDListImpl +{ +private: +public: + CDrivesFolderEnum(); + ~CDrivesFolderEnum(); + HRESULT WINAPI Initialize(HWND hwndOwner, DWORD dwFlags); + BOOL CreateMyCompEnumList(DWORD dwFlags); + +BEGIN_COM_MAP(CDrivesFolderEnum) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +/*********************************************************************** +* IShellFolder [MyComputer] implementation +*/ + +static const shvheader MyComputerSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, +}; + +#define MYCOMPUTERSHELLVIEWCOLUMNS 4 + +CDrivesFolderEnum::CDrivesFolderEnum() +{ +} + +CDrivesFolderEnum::~CDrivesFolderEnum() +{ +} + +HRESULT WINAPI CDrivesFolderEnum::Initialize(HWND hwndOwner, DWORD dwFlags) +{ + if (CreateMyCompEnumList(dwFlags) == FALSE) + return E_FAIL; + return S_OK; +} + +/************************************************************************** + * CreateMyCompEnumList() + */ +static const WCHAR MyComputer_NameSpaceW[] = { 'S','O','F','T','W','A','R','E', + '\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l', + 'o','r','e','r','\\','M','y','C','o','m','p','u','t','e','r','\\','N','a','m', + 'e','s','p','a','c','e','\0' }; + +BOOL CDrivesFolderEnum::CreateMyCompEnumList(DWORD dwFlags) +{ + BOOL ret = TRUE; + + TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags); + + /* enumerate the folders */ + if (dwFlags & SHCONTF_FOLDERS) + { + WCHAR wszDriveName[] = {'A', ':', '\\', '\0'}; + DWORD dwDrivemap = GetLogicalDrives(); + HKEY hkey; + UINT i; + + while (ret && wszDriveName[0]<='Z') + { + if(dwDrivemap & 0x00000001L) + ret = AddToEnumList(_ILCreateDrive(wszDriveName)); + wszDriveName[0]++; + dwDrivemap = dwDrivemap >> 1; + } + + TRACE("-- (%p)-> enumerate (mycomputer shell extensions)\n", this); + for (i=0; i<2; i++) { + if (ret && !RegOpenKeyExW(i == 0 ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, + MyComputer_NameSpaceW, 0, KEY_READ, &hkey)) + { + WCHAR iid[50]; + int i=0; + + while (ret) + { + DWORD size; + LONG r; + + size = sizeof(iid) / sizeof(iid[0]); + r = RegEnumKeyExW(hkey, i, iid, &size, 0, NULL, NULL, NULL); + if (ERROR_SUCCESS == r) + { + /* FIXME: shell extensions, shouldn't the type be + * PT_SHELLEXT? */ + LPITEMIDLIST pidl = _ILCreateGuidFromStrW(iid); + if (pidl != NULL) + ret = AddToEnumList(pidl); + i++; + } + else if (ERROR_NO_MORE_ITEMS == r) + break; + else + ret = FALSE; + } + RegCloseKey(hkey); + } + } + } + return ret; +} + +CDrivesFolder::CDrivesFolder() +{ + pidlRoot = NULL; + sName = NULL; +} + +CDrivesFolder::~CDrivesFolder() +{ + TRACE ("-- destroying IShellFolder(%p)\n", this); + SHFree(pidlRoot); +} + +HRESULT WINAPI CDrivesFolder::FinalConstruct() +{ + DWORD dwSize; + WCHAR szName[MAX_PATH]; + + pidlRoot = _ILCreateMyComputer(); /* my qualified pidl */ + if (pidlRoot == NULL) + return E_OUTOFMEMORY; + + dwSize = sizeof(szName); + if (RegGetValueW(HKEY_CURRENT_USER, + L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", + NULL, RRF_RT_REG_SZ, NULL, szName, &dwSize) == ERROR_SUCCESS) + { + szName[MAX_PATH - 1] = 0; + sName = (LPWSTR)SHAlloc((wcslen(szName) + 1) * sizeof(WCHAR)); + if (sName) + { + wcscpy(sName, szName); + } + TRACE("sName %s\n", debugstr_w(sName)); + } + return S_OK; +} + +/************************************************************************** +* ISF_MyComputer_fnParseDisplayName +*/ +HRESULT WINAPI CDrivesFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + HRESULT hr = E_INVALIDARG; + LPCWSTR szNext = NULL; + WCHAR szElement[MAX_PATH]; + LPITEMIDLIST pidlTemp = NULL; + CLSID clsid; + + TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this, + hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + /* handle CLSID paths */ + if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') + { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + TRACE ("-- element: %s\n", debugstr_w (szElement)); + CLSIDFromString (szElement + 2, &clsid); + pidlTemp = _ILCreateGuid (PT_GUID, clsid); + } + /* do we have an absolute path name ? */ + else if (PathGetDriveNumberW (lpszDisplayName) >= 0 && + lpszDisplayName[2] == (WCHAR) '\\') + { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + /* make drive letter uppercase to enable PIDL comparison */ + szElement[0] = toupper(szElement[0]); + pidlTemp = _ILCreateDrive (szElement); + } + + if (szNext && *szNext) + { + hr = SHELL32_ParseNextElement (this, hwndOwner, pbc, &pidlTemp, + (LPOLESTR) szNext, pchEaten, pdwAttributes); + } + else + { + if (pdwAttributes && *pdwAttributes) + SHELL32_GetItemAttributes (this, + pidlTemp, pdwAttributes); + hr = S_OK; + } + + *ppidl = pidlTemp; + + TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr); + + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnEnumObjects +*/ +HRESULT WINAPI CDrivesFolder::EnumObjects (HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (hwndOwner, dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** +* ISF_MyComputer_fnBindToObject +*/ +HRESULT WINAPI CDrivesFolder::BindToObject (LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild (pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_MyComputer_fnBindToStorage +*/ +HRESULT WINAPI CDrivesFolder::BindToStorage (LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_MyComputer_fnCompareIDs +*/ + +HRESULT WINAPI CDrivesFolder::CompareIDs (LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_MyComputer_fnCreateViewObject +*/ +HRESULT WINAPI CDrivesFolder::CreateViewObject (HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(hwnd=%p,%s,%p)\n", this, + hwndOwner, shdebugstr_guid (&riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IContextMenu)) + { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) + { + hr = pShellView->QueryInterface(riid, ppvOut); + pShellView->Release(); + } + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnGetAttributesOf +*/ +HRESULT WINAPI CDrivesFolder::GetAttributesOf (UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + HRESULT hr = S_OK; + static const DWORD dwComputerAttributes = + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_CANCOPY | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", + this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if(cidl == 0) { + *rgfInOut &= dwComputerAttributes; + } else { + while (cidl > 0 && *apidl) { + pdump (*apidl); + SHELL32_GetItemAttributes (this, *apidl, rgfInOut); + apidl++; + cidl--; + } + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnGetUIObjectOf +* +* PARAMETERS +* hwndOwner [in] Parent window for any output +* cidl [in] array size +* apidl [in] simple pidl array +* riid [in] Requested Interface +* prgfInOut [ ] reserved +* ppvObject [out] Resulting Interface +* +*/ +HRESULT WINAPI CDrivesFolder::GetUIObjectOf (HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, + UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", this, + hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IContextMenu) && (cidl >= 1)) + { + hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)this, NULL, 0, NULL, (IContextMenu**)&pObj); + } + else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1)) + { + hr = IDataObject_Constructor (hwndOwner, + pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } + else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IExtractIconW) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) + { + hr = this->QueryInterface(IID_IDropTarget, + (LPVOID *) &pObj); + } + else if ((IsEqualIID(riid,IID_IShellLinkW) || + IsEqualIID(riid,IID_IShellLinkA)) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*) &pObj); + SHFree (pidl); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnGetDisplayNameOf +*/ +HRESULT WINAPI CDrivesFolder::GetDisplayNameOf (LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + LPWSTR pszPath; + HRESULT hr = S_OK; + + TRACE ("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH +1) * sizeof(WCHAR)); + if (!pszPath) + return E_OUTOFMEMORY; + + pszPath[0] = 0; + + if (!pidl->mkid.cb) + { + /* parsing name like ::{...} */ + pszPath[0] = ':'; + pszPath[1] = ':'; + SHELL32_GUIDToStringW(CLSID_MyComputer, &pszPath[2]); + } + else if (_ILIsPidlSimple(pidl)) + { + /* take names of special folders only if its only this folder */ + if (_ILIsSpecialFolder(pidl)) + { + GUID const *clsid; + + clsid = _ILGetGUIDPointer (pidl); + if (clsid) + { + if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING) + { + static const WCHAR clsidW[] = + { 'C','L','S','I','D','\\',0 }; + static const WCHAR shellfolderW[] = + { '\\','s','h','e','l','l','f','o','l','d','e','r',0 }; + static const WCHAR wantsForParsingW[] = + { 'W','a','n','t','s','F','o','r','P','a','r','s','i','n', + 'g',0 }; + int bWantsForParsing = FALSE; + WCHAR szRegPath[100]; + LONG r; + + /* + * We can only get a filesystem path from a shellfolder + * if the value WantsFORPARSING exists in + * CLSID\\{...}\\shellfolder + * exception: the MyComputer folder has this keys not + * but like any filesystem backed + * folder it needs these behaviour + * + * Get the "WantsFORPARSING" flag from the registry + */ + + wcscpy (szRegPath, clsidW); + SHELL32_GUIDToStringW (*clsid, &szRegPath[6]); + wcscat (szRegPath, shellfolderW); + r = SHGetValueW (HKEY_CLASSES_ROOT, szRegPath, + wantsForParsingW, NULL, NULL, NULL); + if (r == ERROR_SUCCESS) + bWantsForParsing = TRUE; + + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && + bWantsForParsing) + { + /* + * We need the filesystem path to the destination folder + * Only the folder itself can know it + */ + hr = SHELL32_GetDisplayNameOfChild (this, pidl, + dwFlags, pszPath, MAX_PATH); + } + else + { + LPWSTR p = pszPath; + + /* parsing name like ::{...} */ + p[0] = ':'; + p[1] = ':'; + p += 2; + p += SHELL32_GUIDToStringW(CLSID_MyComputer, p); + + /* \:: */ + p[0] = '\\'; + p[1] = ':'; + p[2] = ':'; + p += 3; + SHELL32_GUIDToStringW(*clsid, p); + } + } + else + { + /* user friendly name */ + + if (_ILIsMyComputer(pidl) && sName) + wcscpy(pszPath, sName); + else + HCR_GetClassNameW (*clsid, pszPath, MAX_PATH); + + TRACE("pszPath %s\n", debugstr_w(pszPath)); + } + } + else + { + /* append my own path */ + _ILSimpleGetTextW (pidl, pszPath, MAX_PATH); + } + } + else if (_ILIsDrive(pidl)) + { + + _ILSimpleGetTextW (pidl, pszPath, MAX_PATH); /* append my own path */ + /* long view "lw_name (C:)" */ + if (!(dwFlags & SHGDN_FORPARSING)) + { + WCHAR wszDrive[18] = {0}; + DWORD dwVolumeSerialNumber, dwMaximumComponentLength, dwFileSystemFlags; + static const WCHAR wszOpenBracket[] = {' ','(',0}; + static const WCHAR wszCloseBracket[] = {')',0}; + + lstrcpynW(wszDrive, pszPath, 4); + pszPath[0] = L'\0'; + GetVolumeInformationW (wszDrive, pszPath, + MAX_PATH - 7, + &dwVolumeSerialNumber, + &dwMaximumComponentLength, &dwFileSystemFlags, NULL, 0); + pszPath[MAX_PATH-1] = L'\0'; + if (!wcslen(pszPath)) + { + UINT DriveType, ResourceId; + DriveType = GetDriveTypeW(wszDrive); + switch(DriveType) + { + case DRIVE_FIXED: + ResourceId = IDS_DRIVE_FIXED; + break; + case DRIVE_REMOTE: + ResourceId = IDS_DRIVE_NETWORK; + break; + case DRIVE_CDROM: + ResourceId = IDS_DRIVE_CDROM; + break; + default: + ResourceId = 0; + } + if (ResourceId) + { + dwFileSystemFlags = LoadStringW(shell32_hInstance, ResourceId, pszPath, MAX_PATH); + if (dwFileSystemFlags > MAX_PATH - 7) + pszPath[MAX_PATH-7] = L'\0'; + } + } + wcscat (pszPath, wszOpenBracket); + wszDrive[2] = L'\0'; + wcscat (pszPath, wszDrive); + wcscat (pszPath, wszCloseBracket); + } + } + else + { + /* Neither a shell namespace extension nor a drive letter. */ + ERR("Wrong pidl type\n"); + CoTaskMemFree(pszPath); + return E_INVALIDARG; + } + } + else + { + /* Complex pidl. Let the child folder do the work */ + hr = SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, pszPath, MAX_PATH); + } + + if (SUCCEEDED (hr)) + { + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszPath; + } + else + CoTaskMemFree(pszPath); + + TRACE ("-- (%p)->(%s)\n", this, strRet->uType == STRRET_CSTR ? strRet->cStr : debugstr_w(strRet->pOleStr)); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* hwndOwner [in] Owner window for output +* pidl [in] simple pidl of item to change +* lpszName [in] the items new display name +* dwFlags [in] SHGNO formatting flags +* ppidlOut [out] simple pidl returned +*/ +HRESULT WINAPI CDrivesFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + LPWSTR sName; + HKEY hKey; + UINT length; + WCHAR szName[30]; + + TRACE ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, + hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + + if (_ILIsDrive(pidl)) + { + if (_ILSimpleGetTextW(pidl, szName, sizeof(szName)/sizeof(WCHAR))) + { + SetVolumeLabelW(szName, lpName); + } + if (pPidlOut) + *pPidlOut = _ILCreateDrive(szName); + return S_OK; + } + + + if (pPidlOut != NULL) + { + *pPidlOut = _ILCreateMyComputer(); + } + + length = (wcslen(lpName) + 1) * sizeof(WCHAR); + sName = (LPWSTR)SHAlloc(length); + + if (!sName) + { + return E_OUTOFMEMORY; + } + + if (RegOpenKeyExW(HKEY_CURRENT_USER, + L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CLSID\\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", + 0, + KEY_WRITE, + &hKey) != ERROR_SUCCESS) + { + WARN("Error: failed to open registry key\n"); + } + else + { + RegSetValueExW(hKey, NULL, 0, REG_SZ, (const LPBYTE)lpName, length); + RegCloseKey(hKey); + } + + wcscpy(sName, lpName); + SHFree(sName); + sName = sName; + TRACE("result %s\n", debugstr_w(sName)); + return S_OK; +} + +HRESULT WINAPI CDrivesFolder::GetDefaultSearchGUID(GUID * pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CDrivesFolder::EnumSearches(IEnumExtraSearch ** ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CDrivesFolder::GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + TRACE ("(%p)\n", this); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + return S_OK; +} + +HRESULT WINAPI CDrivesFolder::GetDefaultColumnState(UINT iColumn, DWORD * pcsFlags) +{ + TRACE ("(%p)\n", this); + + if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) + return E_INVALIDARG; + *pcsFlags = MyComputerSFHeader[iColumn].pcsFlags; + return S_OK; +} + +HRESULT WINAPI CDrivesFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +/* FIXME: drive size >4GB is rolling over */ +HRESULT WINAPI CDrivesFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + HRESULT hr; + + TRACE ("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd); + + if (!psd || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) + { + psd->fmt = MyComputerSFHeader[iColumn].fmt; + psd->cxChar = MyComputerSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA (shell32_hInstance, MyComputerSFHeader[iColumn].colnameid, + psd->str.cStr, MAX_PATH); + return S_OK; + } + else + { + char szPath[MAX_PATH]; + ULARGE_INTEGER ulBytes; + + psd->str.cStr[0] = 0x00; + psd->str.uType = STRRET_CSTR; + switch (iColumn) + { + case 0: /* name */ + hr = GetDisplayNameOf(pidl, + SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* type */ + _ILGetFileType (pidl, psd->str.cStr, MAX_PATH); + break; + case 2: /* total size */ + if (_ILIsDrive (pidl)) + { + _ILSimpleGetText (pidl, szPath, MAX_PATH); + GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL); + StrFormatByteSizeA (ulBytes.LowPart, psd->str.cStr, MAX_PATH); + } + break; + case 3: /* free size */ + if (_ILIsDrive (pidl)) + { + _ILSimpleGetText (pidl, szPath, MAX_PATH); + GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL); + StrFormatByteSizeA (ulBytes.LowPart, psd->str.cStr, MAX_PATH); + } + break; + } + hr = S_OK; + } + + return hr; +} + +HRESULT WINAPI CDrivesFolder::MapColumnToSCID(UINT column, SHCOLUMNID * pscid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +/************************************************************************ + * IMCFldr_PersistFolder2_GetClassID + */ +HRESULT WINAPI CDrivesFolder::GetClassID(CLSID *lpClassId) +{ + TRACE ("(%p)\n", this); + + if (!lpClassId) + return E_POINTER; + *lpClassId = CLSID_MyComputer; + + return S_OK; +} + +/************************************************************************ + * IMCFldr_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +HRESULT WINAPI CDrivesFolder::Initialize(LPCITEMIDLIST pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + if (pidlRoot) + SHFree((LPVOID)pidlRoot); + + pidlRoot = ILClone(pidl); + return S_OK; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +HRESULT WINAPI CDrivesFolder::GetCurFolder(LPITEMIDLIST *pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + if (!pidl) + return E_POINTER; + *pidl = ILClone (pidlRoot); + return S_OK; +} diff --git a/dll/win32/shell32_new/shfldr_mycomp.h b/dll/win32/shell32_new/shfldr_mycomp.h new file mode 100644 index 00000000000..cdc892c83eb --- /dev/null +++ b/dll/win32/shell32_new/shfldr_mycomp.h @@ -0,0 +1,85 @@ +/* + * Virtual Workplace folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _CDRIVESFOLDER_H_ +#define _CDRIVESFOLDER_H_ + +class CDrivesFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2 +{ +private: + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + LPWSTR sName; +public: + CDrivesFolder(); + ~CDrivesFolder(); + HRESULT WINAPI FinalConstruct(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + +DECLARE_REGISTRY_RESOURCEID(IDR_MYCOMPUTER) +DECLARE_NOT_AGGREGATABLE(CDrivesFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CDrivesFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) +END_COM_MAP() +}; + +#endif // _CDRIVESFOLDER_H_ diff --git a/dll/win32/shell32_new/shfldr_mydocuments.cpp b/dll/win32/shell32_new/shfldr_mydocuments.cpp new file mode 100644 index 00000000000..f72f32c88ce --- /dev/null +++ b/dll/win32/shell32_new/shfldr_mydocuments.cpp @@ -0,0 +1,689 @@ +/* + * Virtual MyDocuments Folder + * + * Copyright 2007 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_mydocuments.h" + +WINE_DEFAULT_DEBUG_CHANNEL (mydocs); + +/* +CFileSysEnumX should not exist. CMyDocsFolder should aggregate a CFSFolder which always +maps the contents of CSIDL_PERSONAL. Therefore, CMyDocsFolder::EnumObjects simply calls +CFSFolder::EnumObjects. +*/ + +/*********************************************************************** +* MyDocumentsfolder implementation +*/ + +class CFileSysEnumX : + public IEnumIDListImpl +{ +private: +public: + CFileSysEnumX(); + ~CFileSysEnumX(); + HRESULT WINAPI Initialize(DWORD dwFlags); + +BEGIN_COM_MAP(CFileSysEnumX) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +static const shvheader MyDocumentsSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, + {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +}; + +#define MYDOCUMENTSSHELLVIEWCOLUMNS 5 + +CFileSysEnumX::CFileSysEnumX() +{ +} + +CFileSysEnumX::~CFileSysEnumX() +{ +} + +HRESULT WINAPI CFileSysEnumX::Initialize(DWORD dwFlags) +{ + WCHAR szPath[MAX_PATH]; + + if (SHGetSpecialFolderPathW(0, szPath, CSIDL_PERSONAL, FALSE) == FALSE) + return E_FAIL; + return CreateFolderEnumList(szPath, dwFlags); +} + +CMyDocsFolder::CMyDocsFolder() +{ +} + +CMyDocsFolder::~CMyDocsFolder() +{ + TRACE ("-- destroying IShellFolder(%p)\n", this); + SHFree(pidlRoot); + HeapFree(GetProcessHeap(), 0, sPathTarget); +} + +HRESULT WINAPI CMyDocsFolder::FinalConstruct() +{ + WCHAR szMyPath[MAX_PATH]; + + if (!SHGetSpecialFolderPathW(0, szMyPath, CSIDL_PERSONAL, TRUE)) + return E_UNEXPECTED; + + pidlRoot = _ILCreateMyDocuments(); /* my qualified pidl */ + sPathTarget = (LPWSTR)SHAlloc((wcslen(szMyPath) + 1) * sizeof(WCHAR)); + wcscpy(sPathTarget, szMyPath); + + return S_OK; +} + +HRESULT WINAPI CMyDocsFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + WCHAR szElement[MAX_PATH]; + LPCWSTR szNext = NULL; + LPITEMIDLIST pidlTemp = NULL; + HRESULT hr = S_OK; + CLSID clsid; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + if (!lpszDisplayName || !ppidl) + return E_INVALIDARG; + + *ppidl = 0; + + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') + { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + TRACE ("-- element: %s\n", debugstr_w (szElement)); + CLSIDFromString (szElement + 2, &clsid); + pidlTemp = _ILCreateGuid (PT_GUID, clsid); + } + else if( (pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, lpszDisplayName)) ) + { + *ppidl = pidlTemp; + return S_OK; + } + else + { + /* it's a filesystem path on the desktop. Let a FSFolder parse it */ + + if (*lpszDisplayName) + { + WCHAR szPath[MAX_PATH]; + LPWSTR pathPtr; + + /* build a complete path to create a simple pidl */ + lstrcpynW(szPath, sPathTarget, MAX_PATH); + pathPtr = PathAddBackslashW(szPath); + if (pathPtr) + { + lstrcpynW(pathPtr, lpszDisplayName, MAX_PATH - (pathPtr - szPath)); + hr = _ILCreateFromPathW(szPath, &pidlTemp); + } + else + { + /* should never reach here, but for completeness */ + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + } + } + else + pidlTemp = _ILCreateMyDocuments(); + + szNext = NULL; + } + + if (SUCCEEDED(hr) && pidlTemp) + { + if (szNext && *szNext) + { + hr = SHELL32_ParseNextElement(this, hwndOwner, pbc, + &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); + } + else + { + if (pdwAttributes && *pdwAttributes) + hr = SHELL32_GetItemAttributes(this, + pidlTemp, pdwAttributes); + } + } + + *ppidl = pidlTemp; + + TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr); + + return hr; +} + +/************************************************************************** + * ISF_MyDocuments_fnEnumObjects + */ +HRESULT WINAPI CMyDocsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** + * ISF_MyDocuments_fnBindToObject + */ +HRESULT WINAPI CMyDocsFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", + this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild( pidlRoot, sPathTarget, pidl, riid, ppvOut ); +} + +/************************************************************************** + * ISF_MyDocuments_fnBindToStorage + */ +HRESULT WINAPI CMyDocsFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", + this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** + * ISF_MyDocuments_fnCompareIDs + */ +HRESULT WINAPI CMyDocsFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** + * ISF_MyDocuments_fnCreateViewObject + */ +HRESULT WINAPI CMyDocsFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) +{ + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", + this, hwndOwner, shdebugstr_guid (&riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IContextMenu)) + { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) + { + hr = pShellView->QueryInterface(riid, ppvOut); + pShellView->Release(); + } + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** + * ISF_MyDocuments_fnGetAttributesOf + */ +HRESULT WINAPI CMyDocsFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut) +{ + HRESULT hr = S_OK; + static const DWORD dwMyDocumentsAttributes = + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_CANCOPY | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", + this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if(cidl == 0) { + *rgfInOut &= dwMyDocumentsAttributes; + } else { + while (cidl > 0 && *apidl) { + pdump (*apidl); + if (_ILIsMyDocuments(*apidl)) { + *rgfInOut &= dwMyDocumentsAttributes; + } else { + SHELL32_GetItemAttributes (this, *apidl, rgfInOut); + } + apidl++; + cidl--; + } + } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + + return hr; +} + +/************************************************************************** + * ISF_MyDocuments_fnGetUIObjectOf + * + * PARAMETERS + * HWND hwndOwner, //[in ] Parent window for any output + * UINT cidl, //[in ] array size + * LPCITEMIDLIST* apidl, //[in ] simple pidl array + * REFIID riid, //[in ] Requested Interface + * UINT* prgfInOut, //[ ] reserved + * LPVOID* ppvObject) //[out] Resulting Interface + * + */ +HRESULT WINAPI CMyDocsFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, + REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + this, hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IContextMenu)) + { + hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder *)this, NULL, 0, NULL, (IContextMenu**)&pObj); + } + else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1)) + { + hr = IDataObject_Constructor( hwndOwner, + pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } + else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IExtractIconW) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) + { + hr = this->QueryInterface (IID_IDropTarget, (LPVOID *)&pObj); + } + else if ((IsEqualIID(riid, IID_IShellLinkW) || + IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); + SHFree (pidl); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +HRESULT WINAPI CMyDocsFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + HRESULT hr = S_OK; + LPWSTR pszPath; + + TRACE ("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH +1) * sizeof(WCHAR)); + if (!pszPath) + return E_OUTOFMEMORY; + + ZeroMemory(pszPath, (MAX_PATH +1) * sizeof(WCHAR)); + + if (_ILIsMyDocuments (pidl)) + { + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && + (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)) + wcscpy(pszPath, sPathTarget); + else + HCR_GetClassNameW(CLSID_MyDocuments, pszPath, MAX_PATH); + TRACE("CP\n"); + } + else if (_ILIsPidlSimple (pidl)) + { + GUID const *clsid; + + if ((clsid = _ILGetGUIDPointer (pidl))) + { + if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING) + { + int bWantsForParsing; + + /* + * We can only get a filesystem path from a shellfolder if the + * value WantsFORPARSING in CLSID\\{...}\\shellfolder exists. + * + * Exception: The MyComputer folder doesn't have this key, + * but any other filesystem backed folder it needs it. + */ + if (IsEqualIID (*clsid, CLSID_MyDocuments)) + { + bWantsForParsing = TRUE; + } + else + { + /* get the "WantsFORPARSING" flag from the registry */ + static const WCHAR clsidW[] = + { 'C','L','S','I','D','\\',0 }; + static const WCHAR shellfolderW[] = + { '\\','s','h','e','l','l','f','o','l','d','e','r',0 }; + static const WCHAR wantsForParsingW[] = + { 'W','a','n','t','s','F','o','r','P','a','r','s','i','n', + 'g',0 }; + WCHAR szRegPath[100]; + LONG r; + + wcscpy (szRegPath, clsidW); + SHELL32_GUIDToStringW (*clsid, &szRegPath[6]); + wcscat (szRegPath, shellfolderW); + r = SHGetValueW(HKEY_CLASSES_ROOT, szRegPath, + wantsForParsingW, NULL, NULL, NULL); + if (r == ERROR_SUCCESS) + bWantsForParsing = TRUE; + else + bWantsForParsing = FALSE; + } + + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && + bWantsForParsing) + { + /* + * we need the filesystem path to the destination folder. + * Only the folder itself can know it + */ + hr = SHELL32_GetDisplayNameOfChild (this, pidl, dwFlags, + pszPath, + MAX_PATH); + TRACE("CP\n"); + } + else + { + /* parsing name like ::{...} */ + pszPath[0] = ':'; + pszPath[1] = ':'; + SHELL32_GUIDToStringW (*clsid, &pszPath[2]); + TRACE("CP\n"); + } + } + else + { + /* user friendly name */ + HCR_GetClassNameW (*clsid, pszPath, MAX_PATH); + TRACE("CP\n"); + } + } + else + { + int cLen = 0; + + /* file system folder or file rooted at the desktop */ + if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER)) + { + lstrcpynW(pszPath, sPathTarget, MAX_PATH - 1); + TRACE("CP %s\n", debugstr_w(pszPath)); + } + + if (!_ILIsDesktop(pidl)) + { + PathAddBackslashW(pszPath); + cLen = wcslen(pszPath); + _ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen); + if (!_ILIsFolder(pidl)) + { + SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); + TRACE("CP\n"); + } + } + } + } + else + { + /* a complex pidl, let the subfolder do the work */ + hr = SHELL32_GetDisplayNameOfChild (this, pidl, dwFlags, + pszPath, MAX_PATH); + TRACE("CP\n"); + } + + if (SUCCEEDED(hr)) + { + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszPath; + } + else + CoTaskMemFree(pszPath); + + TRACE ("-- (%p)->(%s,0x%08x)\n", this, debugstr_w(strRet->pOleStr), hr); + return hr; +} + +HRESULT WINAPI CMyDocsFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, hwndOwner, pidl, + debugstr_w (lpName), dwFlags, pPidlOut); + + return E_FAIL; +} + +HRESULT WINAPI CMyDocsFolder::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CMyDocsFolder::EnumSearches(IEnumExtraSearch **ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CMyDocsFolder::GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + TRACE ("(%p)\n", this); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +HRESULT WINAPI CMyDocsFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) +{ + TRACE ("(%p)\n", this); + + if (!pcsFlags || iColumn >= MYDOCUMENTSSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + *pcsFlags = MyDocumentsSFHeader[iColumn].pcsFlags; + + return S_OK; +} + +HRESULT WINAPI CMyDocsFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME ("(%p)\n", this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CMyDocsFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) +{ + HRESULT hr = S_OK; + + TRACE ("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd); + + if (!psd || iColumn >= MYDOCUMENTSSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) + { + psd->fmt = MyDocumentsSFHeader[iColumn].fmt; + psd->cxChar = MyDocumentsSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA (shell32_hInstance, MyDocumentsSFHeader[iColumn].colnameid, + psd->str.cStr, MAX_PATH); + return S_OK; + } + + /* the data from the pidl */ + psd->str.uType = STRRET_CSTR; + switch (iColumn) + { + case 0: /* name */ + hr = GetDisplayNameOf(pidl, + SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* size */ + _ILGetFileSize (pidl, psd->str.cStr, MAX_PATH); + break; + case 2: /* type */ + _ILGetFileType (pidl, psd->str.cStr, MAX_PATH); + break; + case 3: /* date */ + _ILGetFileDate (pidl, psd->str.cStr, MAX_PATH); + break; + case 4: /* attributes */ + _ILGetFileAttributes (pidl, psd->str.cStr, MAX_PATH); + break; + } + + return hr; +} + +HRESULT WINAPI CMyDocsFolder::MapColumnToSCID (UINT column, SHCOLUMNID *pscid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CMyDocsFolder::GetClassID(CLSID *lpClassId) +{ + static GUID const CLSID_MyDocuments = + { 0x450d8fba, 0xad25, 0x11d0, {0x98,0xa8,0x08,0x00,0x36,0x1b,0x11,0x03} }; + + TRACE ("(%p)\n", this); + + if (!lpClassId) + return E_POINTER; + + memcpy(lpClassId, &CLSID_MyDocuments, sizeof(GUID)); + + return S_OK; +} + +HRESULT WINAPI CMyDocsFolder::Initialize(LPCITEMIDLIST pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + return E_NOTIMPL; +} + +HRESULT WINAPI CMyDocsFolder::GetCurFolder(LPITEMIDLIST *pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + if (!pidl) return E_POINTER; + *pidl = ILClone (pidlRoot); + return S_OK; +} diff --git a/dll/win32/shell32_new/shfldr_mydocuments.h b/dll/win32/shell32_new/shfldr_mydocuments.h new file mode 100644 index 00000000000..add9965f700 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_mydocuments.h @@ -0,0 +1,84 @@ +/* + * Virtual MyDocuments Folder + * + * Copyright 2007 Johannes Anderwald + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHFLDR_MYDOCUMENTS_H_ +#define _SHFLDR_MYDOCUMENTS_H_ + +class CMyDocsFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2 +{ +private: + /* both paths are parsible from the MyDocuments */ + LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ +public: + CMyDocsFolder(); + ~CMyDocsFolder(); + HRESULT WINAPI FinalConstruct(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + +DECLARE_REGISTRY_RESOURCEID(IDR_MYDOCUMENTS) +DECLARE_NOT_AGGREGATABLE(CMyDocsFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CMyDocsFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) +END_COM_MAP() +}; + +#endif // _SHFLDR_MYDOCUMENTS_H_ diff --git a/dll/win32/shell32_new/shfldr_netplaces.cpp b/dll/win32/shell32_new/shfldr_netplaces.cpp new file mode 100644 index 00000000000..c4facd2a829 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_netplaces.cpp @@ -0,0 +1,436 @@ +/* + * Network Places (Neighbourhood) folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2003 Mike McCormack for Codeweavers + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_netplaces.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IShellFolder implementation +*/ + +static shvheader NetworkPlacesSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN13, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN_WORKGROUP, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_NETWORKLOCATION, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15} +}; + +#define COLUMN_NAME 0 +#define COLUMN_CATEGORY 1 +#define COLUMN_WORKGROUP 2 +#define COLUMN_NETLOCATION 3 + +#define NETWORKPLACESSHELLVIEWCOLUMNS 4 + +CNetFolder::CNetFolder() +{ +} + +CNetFolder::~CNetFolder() +{ + TRACE("-- destroying IShellFolder(%p)\n", this); + SHFree(pidlRoot); +} + +HRESULT WINAPI CNetFolder::FinalConstruct() +{ + pidlRoot = _ILCreateNetHood(); /* my qualified pidl */ + if (pidlRoot == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnParseDisplayName +*/ +HRESULT WINAPI CNetFolder::ParseDisplayName(HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + HRESULT hr = E_UNEXPECTED; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this, + hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr); + + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnEnumObjects +*/ +HRESULT WINAPI CNetFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, + hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = NULL; //IEnumIDList_Constructor(); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + return S_FALSE; + // return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnBindToObject +*/ +HRESULT WINAPI CNetFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild (pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_NetworkPlaces_fnBindToStorage +*/ +HRESULT WINAPI CNetFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) +{ + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnCompareIDs +*/ + +HRESULT WINAPI CNetFolder::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs(this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnCreateViewObject +*/ +HRESULT WINAPI CNetFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) +{ + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", this, + hwndOwner, shdebugstr_guid (&riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IContextMenu)) + { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) + { + hr = pShellView->QueryInterface(riid, ppvOut); + pShellView->Release(); + } + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnGetAttributesOf +*/ +HRESULT WINAPI CNetFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut) +{ + static const DWORD dwNethoodAttributes = + SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | + SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", this, + cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); + + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + if(cidl == 0) { + *rgfInOut = dwNethoodAttributes; + } + else + { + while (cidl > 0 && *apidl) + { + pdump (*apidl); + SHELL32_GetItemAttributes (this, *apidl, rgfInOut); + apidl++; + cidl--; + } + } + + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnGetUIObjectOf +* +* PARAMETERS +* hwndOwner [in] Parent window for any output +* cidl [in] array size +* apidl [in] simple pidl array +* riid [in] Requested Interface +* prgfInOut [ ] reserved +* ppvObject [out] Resulting Interface +* +*/ +HRESULT WINAPI CNetFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, + UINT * prgfInOut, LPVOID * ppvOut) +{ + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", this, + hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IContextMenu) && (cidl >= 1)) + { + hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)this, NULL, 0, NULL, (IContextMenu**)&pObj); + } + else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1)) + { + hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, (IDataObject **)&pObj); + } + else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IExtractIconW) && (cidl == 1)) + { + pidl = ILCombine (pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } + else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) + { + hr = this->QueryInterface(IID_IDropTarget, (LPVOID *) & pObj); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnGetDisplayNameOf +* +*/ +HRESULT WINAPI CNetFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + FIXME ("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* hwndOwner [in] Owner window for output +* pidl [in] simple pidl of item to change +* lpszName [in] the items new display name +* dwFlags [in] SHGNO formatting flags +* ppidlOut [out] simple pidl returned +*/ +HRESULT WINAPI CNetFolder::SetNameOf (HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this, + hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +HRESULT WINAPI CNetFolder::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CNetFolder::EnumSearches(IEnumExtraSearch ** ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CNetFolder::GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + TRACE ("(%p)\n", this); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +HRESULT WINAPI CNetFolder::GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) +{ + TRACE ("(%p)\n", this); + + if (!pcsFlags || iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS) + return E_INVALIDARG; + *pcsFlags = NetworkPlacesSFHeader[iColumn].pcsFlags; + return S_OK; +} + +HRESULT WINAPI CNetFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CNetFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) +{ + WCHAR buffer[MAX_PATH] = {0}; + HRESULT hr = E_FAIL; + + if (iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS) + return E_FAIL; + + psd->fmt = NetworkPlacesSFHeader[iColumn].fmt; + psd->cxChar = NetworkPlacesSFHeader[iColumn].cxChar; + if (pidl == NULL) + { + psd->str.uType = STRRET_WSTR; + if (LoadStringW(shell32_hInstance, NetworkPlacesSFHeader[iColumn].colnameid, buffer, MAX_PATH)) + hr = SHStrDupW(buffer, &psd->str.pOleStr); + + return hr; + } + + if (iColumn == COLUMN_NAME) + return GetDisplayNameOf(pidl, SHGDN_NORMAL, &psd->str); + + FIXME ("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd); + + return E_NOTIMPL; +} + +HRESULT WINAPI CNetFolder::MapColumnToSCID(UINT column, SHCOLUMNID *pscid) +{ + FIXME ("(%p)\n", this); + + return E_NOTIMPL; +} + +/************************************************************************ + * INPFldr_PersistFolder2_GetClassID + */ +HRESULT WINAPI CNetFolder::GetClassID(CLSID *lpClassId) +{ + TRACE ("(%p)\n", this); + + if (!lpClassId) + return E_POINTER; + + *lpClassId = CLSID_NetworkPlaces; + + return S_OK; +} + +/************************************************************************ + * INPFldr_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +HRESULT WINAPI CNetFolder::Initialize(LPCITEMIDLIST pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + return E_NOTIMPL; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +HRESULT WINAPI CNetFolder::GetCurFolder(LPITEMIDLIST *pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + if (!pidl) + return E_POINTER; + + *pidl = ILClone (pidlRoot); + + return S_OK; +} diff --git a/dll/win32/shell32_new/shfldr_netplaces.h b/dll/win32/shell32_new/shfldr_netplaces.h new file mode 100644 index 00000000000..8f9cc477c7c --- /dev/null +++ b/dll/win32/shell32_new/shfldr_netplaces.h @@ -0,0 +1,85 @@ +/* + * Network Places (Neighbourhood) folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2003 Mike McCormack for Codeweavers + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHFLDR_NETPLACES_H_ +#define _SHFLDR_NETPLACES_H_ + +class CNetFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2 +{ +private: + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ +public: + CNetFolder(); + ~CNetFolder(); + HRESULT WINAPI FinalConstruct(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + +DECLARE_REGISTRY_RESOURCEID(IDR_NETWORKPLACES) +DECLARE_NOT_AGGREGATABLE(CNetFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CNetFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) +END_COM_MAP() +}; + +#endif // _SHFLDR_NETPLACES_H_ diff --git a/dll/win32/shell32_new/shfldr_printers.cpp b/dll/win32/shell32_new/shfldr_printers.cpp new file mode 100644 index 00000000000..b04601b8b54 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_printers.cpp @@ -0,0 +1,731 @@ +/* + * Virtual Printers Folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2005 Huw Davies + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include +#include "shfldr_printers.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** + * Printers_IExtractIconW implementation + */ +class IExtractIconWImpl : + public CComObjectRootEx, + public IExtractIconW, + public IExtractIconA +{ +private: + LPITEMIDLIST pidl; +public: + IExtractIconWImpl(); + ~IExtractIconWImpl(); + HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IExtractIconW + virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); + virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + + // IExtractIconA + virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); + virtual HRESULT STDMETHODCALLTYPE Extract(LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + +BEGIN_COM_MAP(IExtractIconWImpl) + COM_INTERFACE_ENTRY_IID(IID_IExtractIconW, IExtractIconW) + COM_INTERFACE_ENTRY_IID(IID_IExtractIconA, IExtractIconA) +END_COM_MAP() +}; + +static shvheader PrinterSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN_DOCUMENTS , SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN_STATUS, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN_COMMENTS, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN_LOCATION, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN_MODEL, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15} +}; + +#define COLUMN_NAME 0 +#define COLUMN_DOCUMENTS 1 +#define COLUMN_STATUS 2 +#define COLUMN_COMMENTS 3 +#define COLUMN_LOCATION 4 +#define COLUMN_MODEL 5 + + +#define PrinterSHELLVIEWCOLUMNS (6) + +IExtractIconWImpl::IExtractIconWImpl() +{ + pidl = NULL; +} + +IExtractIconWImpl::~IExtractIconWImpl() +{ + TRACE(" destroying IExtractIcon(%p)\n", this); + SHFree(pidl); +} + +HRESULT WINAPI IExtractIconWImpl::Initialize(LPCITEMIDLIST pidl) +{ + pidl = ILClone(pidl); + + pdump(pidl); + return S_OK; +} + +/************************************************************************** + * IExtractIconW_GetIconLocation + * + * mapping filetype to icon + */ +HRESULT WINAPI IExtractIconWImpl::GetIconLocation(UINT uFlags, /* GIL_ flags */ + LPWSTR szIconFile, + UINT cchMax, + int *piIndex, + UINT *pwFlags) /* returned GIL_ flags */ +{ + TRACE("(%p) (flags=%u %p %u %p %p)\n", this, uFlags, szIconFile, cchMax, piIndex, pwFlags); + + if (pwFlags) + *pwFlags = 0; + + lstrcpynW(szIconFile, swShell32Name, cchMax); + *piIndex = -IDI_SHELL_PRINTERS_FOLDER; /* FIXME: other icons for default, network, print to file */ + + TRACE("-- %s %x\n", debugstr_w(szIconFile), *piIndex); + return NOERROR; +} + +/************************************************************************** + * IExtractIconW_Extract + */ +HRESULT WINAPI IExtractIconWImpl::Extract(LPCWSTR pszFile, + UINT nIconIndex, HICON *phiconLarge, + HICON *phiconSmall, UINT nIconSize) +{ + int index; + + FIXME("(%p) (file=%p index=%d %p %p size=%x) semi-stub\n", this, debugstr_w(pszFile), + (signed)nIconIndex, phiconLarge, phiconSmall, nIconSize); + + index = SIC_GetIconIndex(pszFile, nIconIndex, 0); + + if (phiconLarge) + *phiconLarge = ImageList_GetIcon(ShellBigIconList, index, ILD_TRANSPARENT); + + if (phiconSmall) + *phiconSmall = ImageList_GetIcon(ShellSmallIconList, index, ILD_TRANSPARENT); + + return S_OK; +} + +/************************************************************************** + * IExtractIconA_GetIconLocation + */ +HRESULT WINAPI IExtractIconWImpl::GetIconLocation(UINT uFlags, + LPSTR szIconFile, + UINT cchMax, + int * piIndex, + UINT * pwFlags) +{ + HRESULT ret; + LPWSTR lpwstrFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, cchMax * sizeof(WCHAR)); + + TRACE("(%p) (flags=%u %p %u %p %p)\n", this, uFlags, szIconFile, cchMax, piIndex, pwFlags); + + ret = GetIconLocation(uFlags, lpwstrFile, cchMax, piIndex, pwFlags); + WideCharToMultiByte(CP_ACP, 0, lpwstrFile, -1, szIconFile, cchMax, NULL, NULL); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + + TRACE("-- %s %x\n", szIconFile, *piIndex); + return ret; +} +/************************************************************************** + * IExtractIconA_Extract + */ +HRESULT WINAPI IExtractIconWImpl::Extract(LPCSTR pszFile, + UINT nIconIndex, HICON *phiconLarge, + HICON *phiconSmall, UINT nIconSize) +{ + HRESULT ret; + INT len = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0); + LPWSTR lpwstrFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("(%p) (file=%p index=%u %p %p size=%u)\n", this, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); + + MultiByteToWideChar(CP_ACP, 0, pszFile, -1, lpwstrFile, len); + ret = Extract(lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + return ret; +} + +/************************************************************************** + * IExtractIcon_Constructor + */ +static HRESULT WINAPI IEI_Printers_Constructor(LPCITEMIDLIST pidl, REFIID riid, IUnknown **ppv) +{ + CComObject *theExtractor; + CComPtr result; + HRESULT hResult; + + if (ppv == NULL) + return E_POINTER; + *ppv = NULL; + ATLTRY (theExtractor = new CComObject); + if (theExtractor == NULL) + return E_OUTOFMEMORY; + hResult = theExtractor->QueryInterface (riid, (void **)&result); + if (FAILED (hResult)) + { + delete theExtractor; + return hResult; + } + hResult = theExtractor->Initialize (pidl); + if (FAILED (hResult)) + return hResult; + *ppv = result.Detach (); + return S_OK; +} + +/*********************************************************************** + * Printers folder implementation + */ + +class CPrintersEnum : + public IEnumIDListImpl +{ +private: +public: + CPrintersEnum(); + ~CPrintersEnum(); + HRESULT WINAPI Initialize(HWND hwndOwner, DWORD dwFlags); + BOOL CreatePrintersEnumList(DWORD dwFlags); + +BEGIN_COM_MAP(CPrintersEnum) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +CPrintersEnum::CPrintersEnum() +{ +} + +CPrintersEnum::~CPrintersEnum() +{ +} + +HRESULT WINAPI CPrintersEnum::Initialize(HWND hwndOwner, DWORD dwFlags) +{ + if (CreatePrintersEnumList(dwFlags) == FALSE) + return E_FAIL; + return S_OK; +} + +static LPITEMIDLIST _ILCreatePrinterItem(PRINTER_INFO_4W *pi) +{ + PIDLDATA tmp; + LPITEMIDLIST pidl; + PIDLPrinterStruct * p; + int size0 = (char*)&tmp.u.cprinter.szName-(char*)&tmp.u.cprinter; + int size = size0; + + tmp.type = 0x00; + tmp.u.cprinter.dummy = 0xFF; + if (pi->pPrinterName) + tmp.u.cprinter.offsServer = wcslen(pi->pPrinterName) + 1; + else + tmp.u.cprinter.offsServer = 1; + + size += tmp.u.cprinter.offsServer * sizeof(WCHAR); + if (pi->pServerName) + size += ( + wcslen(pi->pServerName) + 1) * sizeof(WCHAR); + else + size += sizeof(WCHAR); + + pidl = (LPITEMIDLIST)SHAlloc(size + 4); + if (!pidl) + return pidl; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+size0); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.cprinter; + + p->Attributes = pi->Attributes; + if (pi->pPrinterName) + wcscpy(p->szName, pi->pPrinterName); + else + p->szName[0] = L'\0'; + + if (pi->pServerName) + wcscpy(p->szName + p->offsServer, pi->pServerName); + else + p->szName[p->offsServer] = L'\0'; + + *(WORD*)((char*)pidl+(size+2)) = 0; + return pidl; +} + +/************************************************************************** + * CreatePrintersEnumList() + */ +BOOL CPrintersEnum::CreatePrintersEnumList(DWORD dwFlags) +{ + BOOL ret = TRUE; + + TRACE("(%p)->(flags=0x%08lx) \n", this, dwFlags); + + /* enumerate the folders */ + if (dwFlags & SHCONTF_NONFOLDERS) + { + DWORD needed = 0, num = 0, i; + PRINTER_INFO_4W *pi; + + EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 4, NULL, 0, &needed, &num); + if (!needed) + return ret; + + pi = (PRINTER_INFO_4W *)HeapAlloc(GetProcessHeap(), 0, needed); + if(!EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 4, (LPBYTE)pi, needed, &needed, &num)) { + HeapFree(GetProcessHeap(), 0, pi); + return FALSE; + } + + for(i = 0; i < num; i++) { + LPITEMIDLIST pidl = _ILCreatePrinterItem(&pi[i]); + if (pidl) + { + if (!AddToEnumList(pidl)) + SHFree(pidl); + } + } + HeapFree(GetProcessHeap(), 0, pi); + } + return ret; +} + +CPrinterFolder::CPrinterFolder() +{ +} + +CPrinterFolder::~CPrinterFolder() +{ + TRACE("-- destroying IShellFolder(%p)\n", this); + if (pidlRoot) + SHFree(pidlRoot); +} + +HRESULT WINAPI CPrinterFolder::FinalConstruct() +{ + pidlRoot = _ILCreatePrinters(); /* my qualified pidl */ + if (pidlRoot == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +/************************************************************************** + * ISF_Printers_fnParseDisplayName + * + * This is E_NOTIMPL in Windows too. + */ +HRESULT WINAPI CPrinterFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), + pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; + + return E_NOTIMPL; +} + +static PIDLPrinterStruct * _ILGetPrinterStruct(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==0x00) + return (PIDLPrinterStruct*)&(pdata->u.cfont); + + return NULL; +} + +/************************************************************************** + * ISF_Printers_fnEnumObjects + */ +HRESULT WINAPI CPrinterFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize (hwndOwner, dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach (); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +/************************************************************************** + * ISF_Printers_fnBindToObject + */ +HRESULT WINAPI CPrinterFolder::BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this, + pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + return SHELL32_BindToChild (pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** + * ISF_Printers_fnBindToStorage + */ +HRESULT WINAPI CPrinterFolder::BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", + this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** + * ISF_Printers_fnCompareIDs + */ +HRESULT WINAPI CPrinterFolder::CompareIDs (LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", this, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (this, lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** + * ISF_Printers_fnCreateViewObject + */ +HRESULT WINAPI CPrinterFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", this, + hwndOwner, shdebugstr_guid (&riid), ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IContextMenu)) + { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) + { + hr = pShellView->QueryInterface(riid, ppvOut); + pShellView->Release(); + } + } + TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut); + return hr; +} + +/************************************************************************** + * ISF_Printers_fnGetAttributesOf + */ +HRESULT WINAPI CPrinterFolder::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut) +{ + static const DWORD dwPrintersAttributes = + SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE; + HRESULT hr = S_OK; + + FIXME ("(%p)->(cidl=%d apidl=%p mask=0x%08lx): stub\n", + this, cidl, apidl, *rgfInOut); + + *rgfInOut &= dwPrintersAttributes; + + *rgfInOut &= ~SFGAO_VALIDATE; + + TRACE ("-- result=0x%08x\n", *rgfInOut); + return hr; +} + +/************************************************************************** + * ISF_Printers_fnGetUIObjectOf + * + * PARAMETERS + * HWND hwndOwner, //[in ] Parent window for any output + * UINT cidl, //[in ] array size + * LPCITEMIDLIST* apidl, //[in ] simple pidl array + * REFIID riid, //[in ] Requested Interface + * UINT* prgfInOut, //[ ] reserved + * LPVOID* ppvObject) //[out] Resulting Interface + * + */ +HRESULT WINAPI CPrinterFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, + REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + this, hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut); + + if (!ppvOut) + return hr; + + *ppvOut = NULL; + + if ((IsEqualIID (riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1)) + { + hr = IEI_Printers_Constructor(apidl[0], riid, &pObj); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + TRACE ("(%p)->hr=0x%08lx\n", this, hr); + return hr; +} + +/************************************************************************** + * ISF_Printers_fnGetDisplayNameOf + * + */ +HRESULT WINAPI CPrinterFolder::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + LPWSTR pszName; + PIDLPrinterStruct * p; + + TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", this, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + { + WARN("no strRet\n"); + return E_INVALIDARG; + } + + if (_ILIsPrinter(pidl)) + { + pszName = (LPWSTR)CoTaskMemAlloc(MAX_PATH * sizeof(WCHAR)); + if (!pszName) + return E_OUTOFMEMORY; + + if (LoadStringW(shell32_hInstance, IDS_PRINTERS, pszName, MAX_PATH)) + { + pszName[MAX_PATH-1] = L'\0'; + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszName; + return S_OK; + } + CoTaskMemFree(pszName); + return E_FAIL; + } + + p = _ILGetPrinterStruct(pidl); + if (!p) + { + WARN("no printer struct\n"); + return E_INVALIDARG; + } + strRet->pOleStr = (LPWSTR)SHAlloc(p->offsServer * sizeof(WCHAR)); + if (!strRet->pOleStr) + return E_OUTOFMEMORY; + + memcpy((LPVOID)strRet->pOleStr, (LPVOID)p->szName, p->offsServer * sizeof(WCHAR)); + TRACE("ret %s\n", debugstr_w(strRet->pOleStr)); + + return S_OK; +} + +/************************************************************************** + * ISF_Printers_fnSetNameOf + * Changes the name of a file object or subfolder, possibly changing its item + * identifier in the process. + * + * PARAMETERS + * HWND hwndOwner, //[in ] Owner window for output + * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change + * LPCOLESTR lpszName, //[in ] the items new display name + * DWORD dwFlags, //[in ] SHGNO formatting flags + * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned + */ +HRESULT WINAPI CPrinterFolder::SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", this, hwndOwner, pidl, + debugstr_w (lpName), dwFlags, pPidlOut); + + return E_FAIL; +} + +HRESULT WINAPI CPrinterFolder::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CPrinterFolder::EnumSearches (IEnumExtraSearch **ppenum) +{ + FIXME ("(%p)\n", this); + return E_NOTIMPL; +} + +HRESULT WINAPI CPrinterFolder::GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay) +{ + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} + +HRESULT WINAPI CPrinterFolder::GetDefaultColumnState (UINT iColumn, DWORD *pcsFlags) +{ + if (!pcsFlags || iColumn >= PrinterSHELLVIEWCOLUMNS) + return E_INVALIDARG; + *pcsFlags = PrinterSFHeader[iColumn].pcsFlags; + return S_OK; + +} + +HRESULT WINAPI CPrinterFolder::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME ("(%p): stub\n", this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CPrinterFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) +{ + WCHAR buffer[MAX_PATH] = {0}; + HRESULT hr = E_FAIL; + + TRACE("(%p)->(%p %i %p): stub\n", this, pidl, iColumn, psd); + + if (iColumn >= PrinterSHELLVIEWCOLUMNS) + return E_FAIL; + + psd->fmt = PrinterSFHeader[iColumn].fmt; + psd->cxChar = PrinterSFHeader[iColumn].cxChar; + if (pidl == NULL) + { + psd->str.uType = STRRET_WSTR; + if (LoadStringW(shell32_hInstance, PrinterSFHeader[iColumn].colnameid, buffer, MAX_PATH)) + hr = SHStrDupW(buffer, &psd->str.pOleStr); + + return hr; + } + + if (iColumn == COLUMN_NAME) + { + psd->str.uType = STRRET_WSTR; + return GetDisplayNameOf(pidl, SHGDN_NORMAL, &psd->str); + } + + psd->str.uType = STRRET_CSTR; + psd->str.cStr[0] = '\0'; + + return E_NOTIMPL; +} + +HRESULT WINAPI CPrinterFolder::MapColumnToSCID(UINT column, SHCOLUMNID *pscid) +{ + FIXME ("(%p): stub\n", this); + return E_NOTIMPL; +} + +/************************************************************************ + * IPF_Printers_GetClassID + */ +HRESULT WINAPI CPrinterFolder::GetClassID (CLSID *lpClassId) +{ + TRACE ("(%p)\n", this); + + *lpClassId = CLSID_Printers; + + return S_OK; +} + +/************************************************************************ + * IPF_Printers_Initialize + * + */ +HRESULT WINAPI CPrinterFolder::Initialize(LPCITEMIDLIST pidl) +{ + if (pidlRoot) + SHFree((LPVOID)pidlRoot); + + pidlRoot = ILClone(pidl); + return S_OK; +} + +/************************************************************************** + * IPF_Printers_fnGetCurFolder + */ +HRESULT WINAPI CPrinterFolder::GetCurFolder(LPITEMIDLIST * pidl) +{ + TRACE ("(%p)->(%p)\n", this, pidl); + + *pidl = ILClone (pidlRoot); + return S_OK; +} diff --git a/dll/win32/shell32_new/shfldr_printers.h b/dll/win32/shell32_new/shfldr_printers.h new file mode 100644 index 00000000000..174b698d977 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_printers.h @@ -0,0 +1,88 @@ +/* + * Virtual Printers Folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2005 Huw Davies + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _SHFLDR_PRINTERS_H_ +#define _SHFLDR_PRINTERS_H_ + +class CPrinterFolder : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2 +{ +private: + CLSID *pclsid; + + LPITEMIDLIST pidlRoot; /* absolute pidl */ + + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ +public: + CPrinterFolder(); + ~CPrinterFolder(); + HRESULT WINAPI FinalConstruct(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + +DECLARE_REGISTRY_RESOURCEID(IDR_PRINTERS) +DECLARE_NOT_AGGREGATABLE(CPrinterFolder) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CPrinterFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) +END_COM_MAP() +}; + +#endif // _SHFLDR_PRINTERS_H_ diff --git a/dll/win32/shell32_new/shfldr_recyclebin.cpp b/dll/win32/shell32_new/shfldr_recyclebin.cpp new file mode 100644 index 00000000000..d0c39eb13a2 --- /dev/null +++ b/dll/win32/shell32_new/shfldr_recyclebin.cpp @@ -0,0 +1,1419 @@ +/* + * Trash virtual folder support. The trashing engine is implemented in trash.c + * + * Copyright (C) 2006 Mikolaj Zalewski + * Copyright (C) 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define MAX_PROPERTY_SHEET_PAGE 32 + +#include +#include +#include +#include +#include +#include "shfldr_recyclebin.h" + +WINE_DEFAULT_DEBUG_CHANNEL(CBitBucket); + +typedef struct +{ + int column_name_id; + const GUID *fmtId; + DWORD pid; + int pcsFlags; + int fmt; + int cxChars; +} columninfo; + +static const columninfo CBitBucketColumns[] = +{ + {IDS_SHV_COLUMN1, &FMTID_Storage, PID_STG_NAME, SHCOLSTATE_TYPE_STR|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30}, + {IDS_SHV_COLUMN_DELFROM, &FMTID_Displaced, PID_DISPLACED_FROM, SHCOLSTATE_TYPE_STR|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30}, + {IDS_SHV_COLUMN_DELDATE, &FMTID_Displaced, PID_DISPLACED_DATE, SHCOLSTATE_TYPE_DATE|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20}, + {IDS_SHV_COLUMN2, &FMTID_Storage, PID_STG_SIZE, SHCOLSTATE_TYPE_INT|SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 20}, + {IDS_SHV_COLUMN3, &FMTID_Storage, PID_STG_STORAGETYPE,SHCOLSTATE_TYPE_INT|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20}, + {IDS_SHV_COLUMN4, &FMTID_Storage, PID_STG_WRITETIME, SHCOLSTATE_TYPE_DATE|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20}, +/* {"creation time", &FMTID_Storage, PID_STG_CREATETIME, SHCOLSTATE_TYPE_DATE, LVCFMT_LEFT, 20}, */ +/* {"attribs", &FMTID_Storage, PID_STG_ATTRIBUTES, SHCOLSTATE_TYPE_STR, LVCFMT_LEFT, 20}, */ +}; + +#define COLUMN_NAME 0 +#define COLUMN_DELFROM 1 +#define COLUMN_DATEDEL 2 +#define COLUMN_SIZE 3 +#define COLUMN_TYPE 4 +#define COLUMN_MTIME 5 + +#define COLUMNS_COUNT 6 + +/* + * Recycle Bin folder + */ + +class CBitBucketEnum : + public IEnumIDListImpl +{ +private: +public: + CBitBucketEnum(); + ~CBitBucketEnum(); + HRESULT WINAPI Initialize(DWORD dwFlags); + static BOOL WINAPI CBEnumBitBucket(IN PVOID Context, IN HANDLE hDeletedFile); + BOOL WINAPI CBEnumBitBucket(IN HANDLE hDeletedFile); + +BEGIN_COM_MAP(CBitBucketEnum) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) +END_COM_MAP() +}; + +class CCBitBucketBackgroundContextMenu : + public CComObjectRootEx, + public IContextMenu2 +{ +private: + INT iIdEmpty; +public: + CCBitBucketBackgroundContextMenu(); + ~CCBitBucketBackgroundContextMenu(); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + +BEGIN_COM_MAP(CCBitBucketBackgroundContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) +END_COM_MAP() +}; + +class CCBitBucketItemContextMenu : + public CComObjectRootEx, + public IContextMenu2 +{ +private: + LPITEMIDLIST apidl; +public: + CCBitBucketItemContextMenu(); + ~CCBitBucketItemContextMenu(); + HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + +BEGIN_COM_MAP(CCBitBucketItemContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) +END_COM_MAP() +}; + +typedef struct +{ + PIDLRecycleStruct *pFileDetails; + HANDLE hDeletedFile; + BOOL bFound; +}SEARCH_CONTEXT, *PSEARCH_CONTEXT; + +typedef struct +{ + DWORD dwNukeOnDelete; + DWORD dwSerial; + DWORD dwMaxCapacity; +}DRIVE_ITEM_CONTEXT, *PDRIVE_ITEM_CONTEXT; + +BOOL WINAPI CBSearchBitBucket(IN PVOID Context, IN HANDLE hDeletedFile) +{ + PSEARCH_CONTEXT pContext = (PSEARCH_CONTEXT)Context; + + PDELETED_FILE_DETAILS_W pFileDetails; + DWORD dwSize; + BOOL ret; + + if (!GetDeletedFileDetailsW(hDeletedFile, + 0, + NULL, + &dwSize) && + GetLastError() != ERROR_INSUFFICIENT_BUFFER) + { + ERR("GetDeletedFileDetailsW failed\n"); + return FALSE; + } + + pFileDetails = (DELETED_FILE_DETAILS_W *)SHAlloc(dwSize); + if (!pFileDetails) + { + ERR("No memory\n"); + return FALSE; + } + + if (!GetDeletedFileDetailsW(hDeletedFile, + dwSize, + pFileDetails, + NULL)) + { + ERR("GetDeletedFileDetailsW failed\n"); + SHFree(pFileDetails); + return FALSE; + } + + ret = memcmp(pFileDetails, pContext->pFileDetails, dwSize); + if (!ret) + { + pContext->hDeletedFile = hDeletedFile; + pContext->bFound = TRUE; + } + else + CloseRecycleBinHandle(hDeletedFile); + + SHFree(pFileDetails); + return ret; +} + +static PIDLRecycleStruct * _ILGetRecycleStruct(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==0x00) + return (PIDLRecycleStruct*)&(pdata->u.crecycle); + + return NULL; +} + +CBitBucketEnum::CBitBucketEnum() +{ +} + +CBitBucketEnum::~CBitBucketEnum() +{ +} + +HRESULT WINAPI CBitBucketEnum::Initialize(DWORD dwFlags) +{ + static LPCWSTR szDrive = L"C:\\"; + + if (dwFlags & SHCONTF_NONFOLDERS) + { + TRACE("Starting Enumeration\n"); + + if (!EnumerateRecycleBinW(szDrive /* FIXME */ , CBEnumBitBucket, (PVOID)this)) + { + WARN("Error: EnumerateCBitBucketW failed\n"); + return E_FAIL; + } + } + else + { + // do nothing + } + return S_OK; +} + +static LPITEMIDLIST _ILCreateRecycleItem(PDELETED_FILE_DETAILS_W pFileDetails) +{ + PIDLDATA tmp; + LPITEMIDLIST pidl; + PIDLRecycleStruct * p; + int size0 = (char*)&tmp.u.crecycle.szName-(char*)&tmp.u.crecycle; + int size = size0; + + tmp.type = 0x00; + size += (wcslen(pFileDetails->FileName) + 1) * sizeof(WCHAR); + + pidl = (LPITEMIDLIST)SHAlloc(size + 4); + if (!pidl) + return pidl; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+size0); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.crecycle; + RtlCopyMemory(p, pFileDetails, sizeof(DELETED_FILE_DETAILS_W)); + wcscpy(p->szName, pFileDetails->FileName); + *(WORD*)((char*)pidl+(size+2)) = 0; + return pidl; +} + +BOOL WINAPI CBitBucketEnum::CBEnumBitBucket(IN PVOID Context, IN HANDLE hDeletedFile) +{ + return ((CBitBucketEnum *)Context)->CBEnumBitBucket(hDeletedFile); +} + +BOOL WINAPI CBitBucketEnum::CBEnumBitBucket(IN HANDLE hDeletedFile) +{ + PDELETED_FILE_DETAILS_W pFileDetails; + DWORD dwSize; + LPITEMIDLIST pidl = NULL; + BOOL ret; + + if (!GetDeletedFileDetailsW(hDeletedFile, + 0, + NULL, + &dwSize) && + GetLastError() != ERROR_INSUFFICIENT_BUFFER) + { + ERR("GetDeletedFileDetailsW failed\n"); + return FALSE; + } + + pFileDetails = (DELETED_FILE_DETAILS_W *)SHAlloc(dwSize); + if (!pFileDetails) + { + ERR("No memory\n"); + return FALSE; + } + + if (!GetDeletedFileDetailsW(hDeletedFile, + dwSize, + pFileDetails, + NULL)) + { + ERR("GetDeletedFileDetailsW failed\n"); + SHFree(pFileDetails); + return FALSE; + } + + pidl = _ILCreateRecycleItem(pFileDetails); + if (!pidl) + { + SHFree(pFileDetails); + return FALSE; + } + + ret = AddToEnumList(pidl); + + if (!ret) + SHFree(pidl); + SHFree(pFileDetails); + TRACE("Returning %d\n", ret); + CloseRecycleBinHandle(hDeletedFile); + return ret; +} + +/************************************************************************* + * BitBucket context menu + * + */ + +CCBitBucketBackgroundContextMenu::CCBitBucketBackgroundContextMenu() +{ + iIdEmpty = 0; +} + +CCBitBucketBackgroundContextMenu::~CCBitBucketBackgroundContextMenu() +{ +} + +HRESULT WINAPI CCBitBucketBackgroundContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) +{ + WCHAR szBuffer[100]; + MENUITEMINFOW mii; + int id = 1; + + TRACE("%p %p %u %u %u %u\n", this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags ); + + if (!hMenu) + return E_INVALIDARG; + + memset(&mii, 0, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; + mii.fState = MFS_ENABLED; + szBuffer[0] = L'\0'; + LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + mii.dwTypeData = szBuffer; + mii.cch = wcslen( mii.dwTypeData ); + mii.wID = idCmdFirst + id++; + mii.fType = MFT_STRING; + iIdEmpty = 1; + + if (!InsertMenuItemW(hMenu, indexMenu, TRUE, &mii)) + return E_FAIL; + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, id); +} + +HRESULT WINAPI CCBitBucketBackgroundContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) +{ + HRESULT hr; + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV = NULL; + + TRACE("%p %p verb %p\n", this, lpcmi, lpcmi->lpVerb); + + if (LOWORD(lpcmi->lpVerb) == iIdEmpty) + { + // FIXME + // path & flags + hr = SHEmptyRecycleBinW(lpcmi->hwnd, L"C:\\", 0); + TRACE("result %x\n", hr); + if (hr != S_OK) + return hr; + + lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER, 0, 0); + if (lpSB && SUCCEEDED(lpSB->QueryActiveShellView(&lpSV))) + lpSV->Refresh(); + } + return S_OK; +} + +HRESULT WINAPI CCBitBucketBackgroundContextMenu::GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) +{ + FIXME("%p %lu %u %p %p %u\n", this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + return E_NOTIMPL; +} + +HRESULT WINAPI CCBitBucketBackgroundContextMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TRACE("CBitBucket_IContextMenu2Item_IContextMenu2Folder_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n", this, uMsg, wParam, lParam); + + return E_NOTIMPL; +} + +static HRESULT WINAPI CBitBucketBackgroundContextMenuConstructor(REFIID riid, LPVOID *ppv) +{ + CComObject *theMenu; + CComPtr result; + HRESULT hResult; + + TRACE("%s\n", shdebugstr_guid(&riid)); + + if (ppv == NULL) + return E_POINTER; + *ppv = NULL; + ATLTRY(theMenu = new CComObject); + if (theMenu == NULL) + return E_OUTOFMEMORY; + hResult = theMenu->QueryInterface(riid, (void **)&result); + if (FAILED(hResult)) + { + delete theMenu; + return hResult; + } + *ppv = result.Detach(); + TRACE ("--(%p)\n", *ppv); + return S_OK; +} + +/************************************************************************** +* IContextMenu2 Bitbucket Item Implementation +*/ + +CCBitBucketItemContextMenu::CCBitBucketItemContextMenu() +{ + apidl = NULL; +} + +CCBitBucketItemContextMenu::~CCBitBucketItemContextMenu() +{ + ILFree(apidl); +} + +HRESULT WINAPI CCBitBucketItemContextMenu::Initialize(LPCITEMIDLIST pidl) +{ + apidl = ILClone(pidl); + if (apidl == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +HRESULT WINAPI CCBitBucketItemContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) +{ + WCHAR szBuffer[30] = {0}; + ULONG Count = 1; + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + if (LoadStringW(shell32_hInstance, IDS_RESTORE, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); + Count++; + } + + if (LoadStringW(shell32_hInstance, IDS_CUT, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + } + + if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); + } + + if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) + { + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); + } + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); +} + +HRESULT WINAPI CCBitBucketItemContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) +{ + SEARCH_CONTEXT Context; + static LPCWSTR szDrive = L"C:\\"; + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",this,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1) || lpcmi->lpVerb == MAKEINTRESOURCEA(5)) + { + Context.pFileDetails = _ILGetRecycleStruct(apidl); + Context.bFound = FALSE; + + EnumerateRecycleBinW(szDrive, CBSearchBitBucket, (PVOID)&Context); + if (!Context.bFound) + return E_FAIL; + + if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) + { + /* restore file */ + if (RestoreFile(Context.hDeletedFile)) + return S_OK; + else + return E_FAIL; + } + else + { + DeleteFileHandleToRecycleBin(Context.hDeletedFile); + return E_NOTIMPL; + } + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(3)) + { + FIXME("implement cut\n"); + return E_NOTIMPL; + } + else if (lpcmi->lpVerb == MAKEINTRESOURCEA(7)) + { + FIXME("implement properties\n"); + return E_NOTIMPL; + } + + return S_OK; +} + +HRESULT WINAPI CCBitBucketItemContextMenu::GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) +{ + TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + return E_FAIL; +} + +HRESULT WINAPI CCBitBucketItemContextMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TRACE("CBitBucket_IContextMenu2Item_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",this, uMsg, wParam, lParam); + + return E_NOTIMPL; +} + +static HRESULT WINAPI CBitBucketItemContextMenuConstructor(REFIID riid, LPCITEMIDLIST pidl, LPVOID *ppv) +{ + CComObject *theMenu; + CComPtr result; + HRESULT hResult; + + TRACE("%s\n", shdebugstr_guid(&riid)); + + if (ppv == NULL) + return E_POINTER; + *ppv = NULL; + ATLTRY(theMenu = new CComObject); + if (theMenu == NULL) + return E_OUTOFMEMORY; + hResult = theMenu->QueryInterface(riid, (void **)&result); + if (FAILED(hResult)) + { + delete theMenu; + return hResult; + } + hResult = theMenu->Initialize(pidl); + if (FAILED(hResult)) + return hResult; + *ppv = result.Detach(); + TRACE ("--(%p)\n", *ppv); + return S_OK; +} + +CBitBucket::CBitBucket() +{ +} + +CBitBucket::~CBitBucket() +{ +/* InterlockedDecrement(&objCount);*/ + SHFree(pidl); +} + +HRESULT WINAPI CBitBucket::ParseDisplayName(HWND hwnd, LPBC pbc, + LPOLESTR pszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, + ULONG *pdwAttributes) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + + +PDELETED_FILE_DETAILS_W +UnpackDetailsFromPidl(LPCITEMIDLIST pidl) +{ + return (PDELETED_FILE_DETAILS_W)&pidl->mkid.abID; +} + +HRESULT WINAPI CBitBucket::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + CComObject *theEnumerator; + CComPtr result; + HRESULT hResult; + + TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList); + + if (ppEnumIDList == NULL) + return E_POINTER; + *ppEnumIDList = NULL; + ATLTRY (theEnumerator = new CComObject); + if (theEnumerator == NULL) + return E_OUTOFMEMORY; + hResult = theEnumerator->QueryInterface(IID_IEnumIDList, (void **)&result); + if (FAILED (hResult)) + { + delete theEnumerator; + return hResult; + } + hResult = theEnumerator->Initialize(dwFlags); + if (FAILED (hResult)) + return hResult; + *ppEnumIDList = result.Detach(); + + TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList); + + return S_OK; +} + +HRESULT WINAPI CBitBucket::BindToObject(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) +{ + FIXME("(%p, %p, %p, %s, %p) - stub\n", this, pidl, pbc, debugstr_guid(&riid), ppv); + return E_NOTIMPL; +} + +HRESULT WINAPI CBitBucket::BindToStorage(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) +{ + FIXME("(%p, %p, %p, %s, %p) - stub\n", this, pidl, pbc, debugstr_guid(&riid), ppv); + return E_NOTIMPL; +} + +HRESULT WINAPI CBitBucket::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + /* TODO */ + TRACE("(%p, %p, %p, %p)\n", this, (void *)lParam, pidl1, pidl2); + if (pidl1->mkid.cb != pidl2->mkid.cb) + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, pidl1->mkid.cb - pidl2->mkid.cb); + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (unsigned short)memcmp(pidl1->mkid.abID, pidl2->mkid.abID, pidl1->mkid.cb)); +} + +HRESULT WINAPI CBitBucket::CreateViewObject(HWND hwndOwner, REFIID riid, void **ppv) +{ + LPSHELLVIEW pShellView; + HRESULT hr = E_NOINTERFACE; + + TRACE("(%p, %p, %s, %p)\n", this, hwndOwner, debugstr_guid(&riid), ppv); + + if (!ppv) + return hr; + + *ppv = NULL; + + if (IsEqualIID (riid, IID_IDropTarget)) + { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } + else if (IsEqualIID (riid, IID_IContextMenu) || IsEqualIID (riid, IID_IContextMenu2)) + { + hr = CBitBucketBackgroundContextMenuConstructor(riid, ppv); + } + else if (IsEqualIID (riid, IID_IShellView)) + { + hr = IShellView_Constructor ((IShellFolder *)this, &pShellView); + if (pShellView) + { + hr = pShellView->QueryInterface(riid, ppv); + pShellView->Release(); + } + } + else + return hr; + TRACE ("-- (%p)->(interface=%p)\n", this, ppv); + return hr; + +} + +HRESULT WINAPI CBitBucket::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, + SFGAOF *rgfInOut) +{ + TRACE("(%p, %d, {%p, ...}, {%x})\n", this, cidl, apidl ? apidl[0] : NULL, (unsigned int)*rgfInOut); + *rgfInOut &= SFGAO_CANMOVE|SFGAO_CANDELETE|SFGAO_HASPROPSHEET|SFGAO_FILESYSTEM | SFGAO_FOLDER; + return S_OK; +} + +HRESULT WINAPI CBitBucket::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, + REFIID riid, UINT *prgfInOut, void **ppv) +{ + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p, %p %p)\n", this, + hwndOwner, cidl, apidl, prgfInOut, ppv); + + if (!ppv) + return hr; + + *ppv = NULL; + + if ((IsEqualIID (riid, IID_IContextMenu) || IsEqualIID(riid, IID_IContextMenu2)) && (cidl >= 1)) + { + hr = CBitBucketItemContextMenuConstructor(riid, apidl[0], (void **)&pObj); + } + else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) + { + hr = this->QueryInterface(IID_IDropTarget, (LPVOID *) & pObj); + } + else + hr = E_NOINTERFACE; + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppv = pObj; + TRACE ("(%p)->hr=0x%08x\n", this, hr); + return hr; +} + +HRESULT WINAPI CBitBucket::GetDisplayNameOf(LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET *pName) +{ + PIDLRecycleStruct *pFileDetails; + LPWSTR pFileName; + + TRACE("(%p, %p, %x, %p)\n", this, pidl, (unsigned int)uFlags, pName); + + + if (_ILIsBitBucket (pidl)) + { + WCHAR pszPath[100]; + + if (HCR_GetClassNameW(CLSID_RecycleBin, pszPath, MAX_PATH)) + { + pName->uType = STRRET_WSTR; + pName->pOleStr = StrDupW(pszPath); + return S_OK; + } + } + + pFileDetails = _ILGetRecycleStruct(pidl); + if (!pFileDetails) + { + pName->cStr[0] = 0; + pName->uType = STRRET_CSTR; + return E_INVALIDARG; + } + + pFileName = wcsrchr(pFileDetails->szName, L'\\'); + if (!pFileName) + { + pName->cStr[0] = 0; + pName->uType = STRRET_CSTR; + return E_UNEXPECTED; + } + + pName->pOleStr = StrDupW(pFileName + 1); + if (pName->pOleStr == NULL) + return E_OUTOFMEMORY; + + pName->uType = STRRET_WSTR; + return S_OK; +} + +HRESULT WINAPI CBitBucket::SetNameOf(HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName, + SHGDNF uFlags, LPITEMIDLIST *ppidlOut) +{ + TRACE("\n"); + return E_FAIL; /* not supported */ +} + +HRESULT WINAPI CBitBucket::GetDefaultSearchGUID(GUID *pguid) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +HRESULT WINAPI CBitBucket::EnumSearches(IEnumExtraSearch **ppEnum) +{ + FIXME("stub\n"); + *ppEnum = NULL; + return E_NOTIMPL; +} + +HRESULT WINAPI CBitBucket::GetDefaultColumn(DWORD dwReserved, ULONG *pSort, ULONG *pDisplay) +{ + TRACE("(%p, %x, %p, %p)\n", this, (unsigned int)dwReserved, pSort, pDisplay); + *pSort = 0; + *pDisplay = 0; + return S_OK; +} + +HRESULT WINAPI CBitBucket::GetDefaultColumnState(UINT iColumn, SHCOLSTATEF *pcsFlags) +{ + TRACE("(%p, %d, %p)\n", this, iColumn, pcsFlags); + if (iColumn >= COLUMNS_COUNT) + return E_INVALIDARG; + *pcsFlags = CBitBucketColumns[iColumn].pcsFlags; + return S_OK; +} + +HRESULT WINAPI CBitBucket::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) +{ + FIXME("stub\n"); + return E_NOTIMPL; +} + +static HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME * ft) +{ + FILETIME lft; + SYSTEMTIME time; + int ret; + + FileTimeToLocalFileTime(ft, &lft); + FileTimeToSystemTime(&lft, &time); + + ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &time, NULL, buffer, size); + if (ret>0 && ret= COLUMNS_COUNT) + return E_FAIL; + pDetails->fmt = CBitBucketColumns[iColumn].fmt; + pDetails->cxChar = CBitBucketColumns[iColumn].cxChars; + if (pidl == NULL) + { + pDetails->str.uType = STRRET_WSTR; + LoadStringW(shell32_hInstance, CBitBucketColumns[iColumn].column_name_id, buffer, MAX_PATH); + return SHStrDupW(buffer, &pDetails->str.pOleStr); + } + + if (iColumn == COLUMN_NAME) + return GetDisplayNameOf(pidl, SHGDN_NORMAL, &pDetails->str); + + pFileDetails = _ILGetRecycleStruct(pidl); + switch (iColumn) + { + case COLUMN_DATEDEL: + FormatDateTime(buffer, MAX_PATH, &pFileDetails->DeletionTime); + break; + case COLUMN_DELFROM: + pszBackslash = wcsrchr(pFileDetails->szName, L'\\'); + Length = (pszBackslash - pFileDetails->szName); + memcpy((LPVOID)buffer, pFileDetails->szName, Length * sizeof(WCHAR)); + buffer[Length] = L'\0'; + break; + case COLUMN_SIZE: + StrFormatKBSizeW(pFileDetails->FileSize.QuadPart, buffer, MAX_PATH); + break; + case COLUMN_MTIME: + FormatDateTime(buffer, MAX_PATH, &pFileDetails->LastModification); + break; + case COLUMN_TYPE: + szTypeName[0] = L'\0'; + wcscpy(buffer,PathFindExtensionW(pFileDetails->szName)); + if (!( HCR_MapTypeToValueW(buffer, buffer, sizeof(buffer)/sizeof(WCHAR), TRUE) && + HCR_MapTypeToValueW(buffer, szTypeName, sizeof(szTypeName)/sizeof(WCHAR), FALSE ))) + { + wcscpy (szTypeName, PathFindExtensionW(pFileDetails->szName)); + wcscat(szTypeName, L"-"); + Length = wcslen(szTypeName); + if (LoadStringW(shell32_hInstance, IDS_SHV_COLUMN1, &szTypeName[Length], (sizeof(szTypeName)/sizeof(WCHAR))- Length)) + szTypeName[(sizeof(szTypeName)/sizeof(WCHAR))-1] = L'\0'; + } + pDetails->str.uType = STRRET_WSTR; + return SHStrDupW(szTypeName, &pDetails->str.pOleStr); + break; + default: + return E_FAIL; + } + + pDetails->str.uType = STRRET_WSTR; + return SHStrDupW(buffer, &pDetails->str.pOleStr); +} + +HRESULT WINAPI CBitBucket::MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid) +{ + TRACE("(%p, %d, %p)\n", this, iColumn, pscid); + if (iColumn>=COLUMNS_COUNT) + return E_INVALIDARG; + pscid->fmtid = *CBitBucketColumns[iColumn].fmtId; + pscid->pid = CBitBucketColumns[iColumn].pid; + return S_OK; +} + +HRESULT WINAPI CBitBucket::GetClassID(CLSID *pClassID) +{ + TRACE("(%p, %p)\n", this, pClassID); + if (pClassID == NULL) + return E_INVALIDARG; + memcpy(pClassID, &CLSID_RecycleBin, sizeof(CLSID)); + return S_OK; +} + +HRESULT WINAPI CBitBucket::Initialize(LPCITEMIDLIST pidl) +{ + TRACE("(%p, %p)\n", this, pidl); + + SHFree((LPVOID)this->pidl); + this->pidl = ILClone(pidl); + if (this->pidl == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +HRESULT WINAPI CBitBucket::GetCurFolder(LPITEMIDLIST *ppidl) +{ + TRACE("\n"); + *ppidl = ILClone(pidl); + return S_OK; +} + +/************************************************************************* + * BitBucket IShellExtInit interface + */ + +HRESULT WINAPI CBitBucket::Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) +{ + TRACE("%p %p %p %p\n", this, pidlFolder, pdtobj, hkeyProgID ); + return S_OK; +} + +void toggleNukeOnDeleteOption(HWND hwndDlg, BOOL bEnable) +{ + if (bEnable) + { + SendDlgItemMessage(hwndDlg, 14001, BM_SETCHECK, BST_UNCHECKED, 0); + EnableWindow(GetDlgItem(hwndDlg, 14002), FALSE); + SendDlgItemMessage(hwndDlg, 14003, BM_SETCHECK, BST_CHECKED, 0); + } + else + { + SendDlgItemMessage(hwndDlg, 14001, BM_SETCHECK, BST_CHECKED, 0); + EnableWindow(GetDlgItem(hwndDlg, 14002), TRUE); + SendDlgItemMessage(hwndDlg, 14003, BM_SETCHECK, BST_UNCHECKED, 0); + } +} + + +void +InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) +{ + WCHAR CurDrive = L'A'; + WCHAR szDrive[] = L"A:\\"; + DWORD dwDrives; + WCHAR szName[100]; + WCHAR szVolume[100]; + DWORD MaxComponent, Flags; + DWORD dwSerial; + LVCOLUMNW lc; + HWND hDlgCtrl; + LVITEMW li; + INT itemCount; + ULARGE_INTEGER TotalNumberOfFreeBytes, TotalNumberOfBytes, FreeBytesAvailable; + RECT rect; + int columnSize; + int defIndex = 0; + DWORD dwSize; + PDRIVE_ITEM_CONTEXT pItem = NULL, pDefault = NULL, pFirst = NULL; + + hDlgCtrl = GetDlgItem(hwndDlg, 14000); + + if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_LOCATION, szVolume, sizeof(szVolume) / sizeof(WCHAR))) + szVolume[0] = 0; + + GetClientRect(hDlgCtrl, &rect); + + memset(&lc, 0, sizeof(LV_COLUMN) ); + lc.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT; + + columnSize = 140; //FIXME + lc.iSubItem = 0; + lc.fmt = LVCFMT_FIXED_WIDTH; + lc.cx = columnSize; + lc.cchTextMax = wcslen(szVolume); + lc.pszText = szVolume; + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&lc); + + if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, sizeof(szVolume) / sizeof(WCHAR))) + szVolume[0] = 0; + + lc.iSubItem = 1; + lc.cx = rect.right - rect.left - columnSize; + lc.cchTextMax = wcslen(szVolume); + lc.pszText = szVolume; + (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 1, (LPARAM)&lc); + + dwDrives = GetLogicalDrives(); + itemCount = 0; + do + { + if ((dwDrives & 0x1)) + { + UINT Type = GetDriveTypeW(szDrive); + if (Type == DRIVE_FIXED) //FIXME + { + if (!GetVolumeInformationW(szDrive, szName, sizeof(szName) / sizeof(WCHAR), &dwSerial, &MaxComponent, &Flags, NULL, 0)) + { + szName[0] = 0; + dwSerial = -1; + } + + swprintf(szVolume, L"%s (%c)", szName, szDrive[0]); + memset(&li, 0x0, sizeof(LVITEMW)); + li.mask = LVIF_TEXT | LVIF_PARAM; + li.iSubItem = 0; + li.pszText = szVolume; + li.iItem = itemCount; + (void)SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&li); + if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable , &TotalNumberOfBytes, &TotalNumberOfFreeBytes)) + { + if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, sizeof(szVolume) / sizeof(WCHAR))) + { + + pItem = (DRIVE_ITEM_CONTEXT *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DRIVE_ITEM_CONTEXT)); + if (pItem) + { + swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial)); + dwSize = sizeof(DWORD); + RegGetValueW(HKEY_CURRENT_USER, szName, L"MaxCapacity", RRF_RT_DWORD, NULL, &pItem->dwMaxCapacity, &dwSize); + dwSize = sizeof(DWORD); + RegGetValueW(HKEY_CURRENT_USER, szName, L"NukeOnDelete", RRF_RT_DWORD, NULL, &pItem->dwNukeOnDelete, &dwSize); + pItem->dwSerial = dwSerial; + li.mask = LVIF_PARAM; + li.lParam = (LPARAM)pItem; + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); + if (CurDrive == DefaultDrive) + { + defIndex = itemCount; + pDefault = pItem; + } + } + if (!pFirst) + pFirst = pItem; + + li.mask = LVIF_TEXT; + li.iSubItem = 1; + li.pszText = szVolume; + li.iItem = itemCount; + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); + } + } + itemCount++; + } + } + CurDrive++; + szDrive[0] = CurDrive; + dwDrives = (dwDrives >> 1); + }while(dwDrives); + + if (!pDefault) + pDefault = pFirst; + if (pDefault) + { + toggleNukeOnDeleteOption(hwndDlg, pDefault->dwNukeOnDelete); + SetDlgItemInt(hwndDlg, 14002, pDefault->dwMaxCapacity, FALSE); + } + ZeroMemory(&li, sizeof(li)); + li.mask = LVIF_STATE; + li.stateMask = (UINT)-1; + li.state = LVIS_FOCUSED|LVIS_SELECTED; + li.iItem = defIndex; + (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); + +} + +static BOOL StoreDriveSettings(HWND hwndDlg) +{ + int iCount, iIndex; + HWND hDlgCtrl = GetDlgItem(hwndDlg, 14000); + LVITEMW li; + PDRIVE_ITEM_CONTEXT pItem; + HKEY hKey, hSubKey; + WCHAR szSerial[20]; + DWORD dwSize; + + + if (RegCreateKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume", 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) + return FALSE; + + iCount = ListView_GetItemCount(hDlgCtrl); + + ZeroMemory(&li, sizeof(li)); + li.mask = LVIF_PARAM; + + for(iIndex = 0; iIndex < iCount; iIndex++) + { + li.iItem = iIndex; + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li)) + { + pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; + swprintf(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial)); + if (RegCreateKeyExW(hKey, szSerial, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) + { + dwSize = sizeof(DWORD); + RegSetValueExW(hSubKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&pItem->dwNukeOnDelete, dwSize); + dwSize = sizeof(DWORD); + RegSetValueExW(hSubKey, L"MaxCapacity", 0, REG_DWORD, (LPBYTE)&pItem->dwMaxCapacity, dwSize); + RegCloseKey(hSubKey); + } + } + } + RegCloseKey(hKey); + return TRUE; + +} + +static VOID FreeDriveItemContext(HWND hwndDlg) +{ + int iCount, iIndex; + HWND hDlgCtrl = GetDlgItem(hwndDlg, 14000); + LVITEMW li; + + iCount = ListView_GetItemCount(hDlgCtrl); + + ZeroMemory(&li, sizeof(li)); + li.mask = LVIF_PARAM; + + for(iIndex = 0; iIndex < iCount; iIndex++) + { + li.iItem = iIndex; + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li)) + { + HeapFree(GetProcessHeap(), 0, (LPVOID)li.lParam); + } + } +} + +INT +GetDefaultItem(HWND hwndDlg, LVITEMW * li) +{ + HWND hDlgCtrl; + UINT iItemCount, iIndex; + + hDlgCtrl = GetDlgItem(hwndDlg, 14000); + if (!hDlgCtrl) + return -1; + + iItemCount = ListView_GetItemCount(hDlgCtrl); + if (!iItemCount) + return -1; + + ZeroMemory(li, sizeof(LVITEMW)); + li->mask = LVIF_PARAM | LVIF_STATE; + li->stateMask = (UINT)-1; + for (iIndex = 0; iIndex < iItemCount; iIndex++) + { + li->iItem = iIndex; + if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)li)) + { + if (li->state & LVIS_SELECTED) + return iIndex; + } + } + return -1; + +} + +INT_PTR +CALLBACK +BitBucketDlg( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam +) +{ + LPPSHNOTIFY lppsn; + LPNMLISTVIEW lppl; + LVITEMW li; + PDRIVE_ITEM_CONTEXT pItem; + BOOL bSuccess; + UINT uResult; + PROPSHEETPAGE * page; + DWORD dwStyle; + + switch(uMsg) + { + case WM_INITDIALOG: + page = (PROPSHEETPAGE*)lParam; + InitializeBitBucketDlg(hwndDlg, (WCHAR)page->lParam); + dwStyle = (DWORD) SendDlgItemMessage(hwndDlg, 14000, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); + dwStyle = dwStyle | LVS_EX_FULLROWSELECT; + SendDlgItemMessage(hwndDlg, 14000, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); + if (GetDlgCtrlID((HWND)wParam) != 14000) + { + SetFocus(GetDlgItem(hwndDlg, 14000)); + return FALSE; + } + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) + { + case 14001: + toggleNukeOnDeleteOption(hwndDlg, FALSE); + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + break; + case 14003: + toggleNukeOnDeleteOption(hwndDlg, TRUE); + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + break; + case 14004: + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + break; + } + break; + case WM_NOTIFY: + lppsn = (LPPSHNOTIFY) lParam; + lppl = (LPNMLISTVIEW) lParam; + if (lppsn->hdr.code == PSN_APPLY) + { + if (GetDefaultItem(hwndDlg, &li) > -1) + { + pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; + if (pItem) + { + uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE); + if (bSuccess) + pItem->dwMaxCapacity = uResult; + if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) + pItem->dwNukeOnDelete = TRUE; + else + pItem->dwNukeOnDelete = FALSE; + } + } + if (StoreDriveSettings(hwndDlg)) + { + SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR ); + return TRUE; + } + } + else if (lppl->hdr.code == LVN_ITEMCHANGING) + { + ZeroMemory(&li, sizeof(li)); + li.mask = LVIF_PARAM; + li.iItem = lppl->iItem; + if (!SendMessageW(lppl->hdr.hwndFrom, LVM_GETITEMW, 0, (LPARAM)&li)) + return TRUE; + + pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; + if (!pItem) + return TRUE; + + if (!(lppl->uOldState & LVIS_FOCUSED) && (lppl->uNewState & LVIS_FOCUSED)) + { + /* new focused item */ + toggleNukeOnDeleteOption(lppl->hdr.hwndFrom, pItem->dwNukeOnDelete); + SetDlgItemInt(hwndDlg, 14002, pItem->dwMaxCapacity, FALSE); + } + else if ((lppl->uOldState & LVIS_FOCUSED) && !(lppl->uNewState & LVIS_FOCUSED)) + { + /* kill focus */ + uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE); + if (bSuccess) + pItem->dwMaxCapacity = uResult; + if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) + pItem->dwNukeOnDelete = TRUE; + else + pItem->dwNukeOnDelete = FALSE; + } + return TRUE; + + } + break; + case WM_DESTROY: + FreeDriveItemContext(hwndDlg); + break; + } + return FALSE; +} + +BOOL SH_ShowRecycleBinProperties(WCHAR sDrive) +{ + HPROPSHEETPAGE hpsp[1]; + PROPSHEETHEADERW psh; + HPROPSHEETPAGE hprop; + + BOOL ret; + + + ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); + psh.dwSize = sizeof(PROPSHEETHEADERW); + psh.dwFlags = PSP_DEFAULT | PSH_PROPTITLE; + psh.pszCaption = MAKEINTRESOURCEW(IDS_RECYCLEBIN_FOLDER_NAME); + psh.hwndParent = NULL; + psh.phpage = hpsp; + psh.hInstance = shell32_hInstance; + + hprop = SH_CreatePropertySheetPage("BITBUCKET_PROPERTIES_DLG", BitBucketDlg, (LPARAM)sDrive, NULL); + if (!hprop) + { + ERR("Failed to create property sheet\n"); + return FALSE; + } + hpsp[psh.nPages] = hprop; + psh.nPages++; + + + ret = PropertySheetW(&psh); + if (ret < 0) + return FALSE; + else + return TRUE; +} + +BOOL +TRASH_CanTrashFile(LPCWSTR wszPath) +{ + LONG ret; + DWORD dwNukeOnDelete, dwType, VolSerialNumber, MaxComponentLength; + DWORD FileSystemFlags, dwSize, dwDisposition; + HKEY hKey; + WCHAR szBuffer[10]; + WCHAR szKey[150] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\"; + + if (wszPath[1] != L':') + { + /* path is UNC */ + return FALSE; + } + + if (GetDriveTypeW(wszPath) != DRIVE_FIXED) + { + /* no bitbucket on removable media */ + return FALSE; + } + + if (!GetVolumeInformationW(wszPath, NULL, 0, &VolSerialNumber, &MaxComponentLength, &FileSystemFlags, NULL, 0)) + { + ERR("GetVolumeInformationW failed with %u\n", GetLastError()); + return FALSE; + } + + swprintf(szBuffer, L"%04X-%04X", LOWORD(VolSerialNumber), HIWORD(VolSerialNumber)); + wcscat(szKey, szBuffer); + + if (RegCreateKeyExW(HKEY_CURRENT_USER, szKey, 0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition) != ERROR_SUCCESS) + { + ERR("RegCreateKeyExW failed\n"); + return FALSE; + } + + if (dwDisposition & REG_CREATED_NEW_KEY) + { + /* per default move to bitbucket */ + dwNukeOnDelete = 0; + RegSetValueExW(hKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&dwNukeOnDelete, sizeof(DWORD)); + /* per default unlimited size */ + dwSize = -1; + RegSetValueExW(hKey, L"MaxCapacity", 0, REG_DWORD, (LPBYTE)&dwSize, sizeof(DWORD)); + RegCloseKey(hKey); + return TRUE; + } + else + { + dwSize = sizeof(dwNukeOnDelete); + ret = RegQueryValueExW(hKey, L"NukeOnDelete", NULL, &dwType, (LPBYTE)&dwNukeOnDelete, &dwSize); + if (ret != ERROR_SUCCESS) + { + if (ret == ERROR_FILE_NOT_FOUND) + { + /* restore key and enable bitbucket */ + dwNukeOnDelete = 0; + RegSetValueExW(hKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&dwNukeOnDelete, sizeof(DWORD)); + } + RegCloseKey(hKey); + return TRUE; + } + else if (dwNukeOnDelete) + { + /* do not delete to bitbucket */ + RegCloseKey(hKey); + return FALSE; + } + /* FIXME + * check if bitbucket is full + */ + RegCloseKey(hKey); + return TRUE; + } +} + +BOOL +TRASH_TrashFile(LPCWSTR wszPath) +{ + TRACE("(%s)\n", debugstr_w(wszPath)); + return DeleteFileToRecycleBin(wszPath); +} + +/************************************************************************* + * SHUpdateCBitBucketIcon [SHELL32.@] + * + * Undocumented + */ +EXTERN_C HRESULT WINAPI SHUpdateRecycleBinIcon(void) +{ + FIXME("stub\n"); + + + + return S_OK; +} diff --git a/dll/win32/shell32_new/shfldr_recyclebin.h b/dll/win32/shell32_new/shfldr_recyclebin.h new file mode 100644 index 00000000000..2a2e5988f1c --- /dev/null +++ b/dll/win32/shell32_new/shfldr_recyclebin.h @@ -0,0 +1,86 @@ +/* + * Trash virtual folder support. The trashing engine is implemented in trash.c + * + * Copyright (C) 2006 Mikolaj Zalewski + * Copyright (C) 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHFLDR_RECYCLEBIN_H_ +#define _SHFLDR_RECYCLEBIN_H_ + +class CBitBucket : + public CComCoClass, + public CComObjectRootEx, + public IShellFolder2, + public IPersistFolder2, + public IShellExtInit +{ +private: + LPITEMIDLIST pidl; +public: + CBitBucket(); + ~CBitBucket(); + + // IShellFolder + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); + virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); + virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + + /* ShellFolder2 */ + virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); + virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); + virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); + virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); + virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + + // IPersist + virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + + // IPersistFolder + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + + // IShellExtInit + virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + +DECLARE_REGISTRY_RESOURCEID(IDR_RECYCLEBIN) +DECLARE_NOT_AGGREGATABLE(CBitBucket) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CBitBucket) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) +END_COM_MAP() +}; + +#endif // _SHFLDR_RECYCLEBIN_H_ diff --git a/dll/win32/shell32_new/shfldr_unixfs.cpp b/dll/win32/shell32_new/shfldr_unixfs.cpp new file mode 100644 index 00000000000..95e4defc81e --- /dev/null +++ b/dll/win32/shell32_new/shfldr_unixfs.cpp @@ -0,0 +1,21 @@ +/* + * UNIXFS - Shell namespace extension for the unix filesystem + * + * Copyright (C) 2005 Michael Jung + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* Placeholder in ReactOS, we don't need this */ diff --git a/dll/win32/shell32_new/shlexec.cpp b/dll/win32/shell32_new/shlexec.cpp new file mode 100644 index 00000000000..f83c901671d --- /dev/null +++ b/dll/win32/shell32_new/shlexec.cpp @@ -0,0 +1,2009 @@ +/* + * Shell Library Functions + * + * Copyright 1998 Marcus Meissner + * Copyright 2002 Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(exec); + +static const WCHAR wszOpen[] = {'o','p','e','n',0}; +static const WCHAR wszExe[] = {'.','e','x','e',0}; +static const WCHAR wszILPtr[] = {':','%','p',0}; +static const WCHAR wszShell[] = {'\\','s','h','e','l','l','\\',0}; +static const WCHAR wszFolder[] = {'F','o','l','d','e','r',0}; +static const WCHAR wszEmpty[] = {0}; + +#define SEE_MASK_CLASSALL (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY) + + +/*********************************************************************** + * SHELL_ArgifyW [Internal] + * + * this function is supposed to expand the escape sequences found in the registry + * some diving reported that the following were used: + * + %1, %2... seem to report to parameter of index N in ShellExecute pmts + * %1 file + * %2 printer + * %3 driver + * %4 port + * %I address of a global item ID (explorer switch /idlist) + * %L seems to be %1 as long filename followed by the 8+3 variation + * %S ??? + * %* all following parameters (see batfile) + * + */ +static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR* lpFile, LPITEMIDLIST pidl, LPCWSTR args, DWORD* out_len) +{ + WCHAR xlpFile[1024]; + BOOL done = FALSE; + BOOL found_p1 = FALSE; + PWSTR res = out; + PCWSTR cmd; + DWORD used = 0; + + TRACE("%p, %d, %s, %s, %p, %p\n", out, len, debugstr_w(fmt), + debugstr_w(lpFile), pidl, args); + + while (*fmt) + { + if (*fmt == '%') + { + switch (*++fmt) + { + case '\0': + case '%': + used++; + if (used < len) + *res++ = '%'; + break; + + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '0': + case '*': + if (args) + { + if (*fmt == '*') + { + used++; + if (used < len) + *res++ = '"'; + while(*args) + { + used++; + if (used < len) + *res++ = *args++; + else + args++; + } + used++; + if (used < len) + *res++ = '"'; + break; + } + else + { + while(*args && !isspace(*args)) + { + used++; + if (used < len) + *res++ = *args++; + else + args++; + } + + while(isspace(*args)) + ++args; + } + break; + } + else + { + break; + } + case '1': + if (!done || (*fmt == '1')) + { + /*FIXME Is the call to SearchPathW() really needed? We already have separated out the parameter string in args. */ + if (SearchPathW(NULL, lpFile, wszExe, sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL)) + cmd = xlpFile; + else + cmd = lpFile; + + used += wcslen(cmd); + if (used < len) + { + wcscpy(res, cmd); + res += wcslen(cmd); + } + } + found_p1 = TRUE; + break; + + /* + * IE uses this a lot for activating things such as windows media + * player. This is not verified to be fully correct but it appears + * to work just fine. + */ + case 'l': + case 'L': + if (lpFile) { + used += wcslen(lpFile); + if (used < len) + { + wcscpy(res, lpFile); + res += wcslen(lpFile); + } + } + found_p1 = TRUE; + break; + + case 'i': + case 'I': + if (pidl) { + DWORD chars = 0; + /* %p should not exceed 8, maybe 16 when looking forward to 64bit. + * allowing a buffer of 100 should more than exceed all needs */ + WCHAR buf[100]; + LPVOID pv; + HGLOBAL hmem = SHAllocShared(pidl, ILGetSize(pidl), 0); + pv = SHLockShared(hmem, 0); + chars = swprintf(buf, wszILPtr, pv); + if (chars >= sizeof(buf)/sizeof(WCHAR)) + ERR("pidl format buffer too small!\n"); + used += chars; + if (used < len) + { + wcscpy(res,buf); + res += chars; + } + SHUnlockShared(pv); + } + found_p1 = TRUE; + break; + + default: + /* + * Check if this is an env-variable here... + */ + + /* Make sure that we have at least one more %.*/ + if (strchrW(fmt, '%')) + { + WCHAR tmpBuffer[1024]; + PWSTR tmpB = tmpBuffer; + WCHAR tmpEnvBuff[MAX_PATH]; + DWORD envRet; + + while (*fmt != '%') + *tmpB++ = *fmt++; + *tmpB++ = 0; + + TRACE("Checking %s to be an env-var\n", debugstr_w(tmpBuffer)); + + envRet = GetEnvironmentVariableW(tmpBuffer, tmpEnvBuff, MAX_PATH); + if (envRet == 0 || envRet > MAX_PATH) + { + used += wcslen(tmpBuffer); + if (used < len) + { + wcscpy( res, tmpBuffer ); + res += wcslen(tmpBuffer); + } + } + else + { + used += wcslen(tmpEnvBuff); + if (used < len) + { + wcscpy( res, tmpEnvBuff ); + res += wcslen(tmpEnvBuff); + } + } + } + done = TRUE; + break; + } + /* Don't skip past terminator (catch a single '%' at the end) */ + if (*fmt != '\0') + { + fmt++; + } + } + else + { + used ++; + if (used < len) + *res++ = *fmt++; + else + fmt++; + } + } + + *res = '\0'; + TRACE("used %i of %i space\n",used,len); + if (out_len) + *out_len = used; + + return found_p1; +} + +static HRESULT SHELL_GetPathFromIDListForExecuteW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize) +{ + STRRET strret; + IShellFolder* desktop; + + HRESULT hr = SHGetDesktopFolder(&desktop); + + if (SUCCEEDED(hr)) { + hr = desktop->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strret); + + if (SUCCEEDED(hr)) + StrRetToStrNW(pszPath, uOutSize, &strret, pidl); + + desktop->Release(); + } + + return hr; +} + +/************************************************************************* + * SHELL_ExecuteW [Internal] + * + */ +static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, + const SHELLEXECUTEINFOW *psei, LPSHELLEXECUTEINFOW psei_out) +{ + STARTUPINFOW startup; + PROCESS_INFORMATION info; + UINT_PTR retval = SE_ERR_NOASSOC; + UINT gcdret = 0; + WCHAR curdir[MAX_PATH]; + DWORD dwCreationFlags; + const WCHAR *lpDirectory = NULL; + + TRACE("Execute %s from directory %s\n", debugstr_w(lpCmd), debugstr_w(psei->lpDirectory)); + + /* make sure we don't fail the CreateProcess if the calling app passes in + * a bad working directory */ + if (psei->lpDirectory && psei->lpDirectory[0]) + { + DWORD attr = GetFileAttributesW(psei->lpDirectory); + if (attr != INVALID_FILE_ATTRIBUTES && attr & FILE_ATTRIBUTE_DIRECTORY) + lpDirectory = psei->lpDirectory; + } + + /* ShellExecute specifies the command from psei->lpDirectory + * if present. Not from the current dir as CreateProcess does */ + if( lpDirectory ) + if( ( gcdret = GetCurrentDirectoryW( MAX_PATH, curdir))) + if( !SetCurrentDirectoryW( lpDirectory)) + ERR("cannot set directory %s\n", debugstr_w(lpDirectory)); + ZeroMemory(&startup,sizeof(STARTUPINFOW)); + startup.cb = sizeof(STARTUPINFOW); + startup.dwFlags = STARTF_USESHOWWINDOW; + startup.wShowWindow = psei->nShow; + dwCreationFlags = CREATE_UNICODE_ENVIRONMENT; + if (psei->fMask & SEE_MASK_NO_CONSOLE) + dwCreationFlags |= CREATE_NEW_CONSOLE; + if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, dwCreationFlags, env, + lpDirectory, &startup, &info)) + { + /* Give 30 seconds to the app to come up, if desired. Probably only needed + when starting app immediately before making a DDE connection. */ + if (shWait) + if (WaitForInputIdle( info.hProcess, 30000 ) == WAIT_FAILED) + WARN("WaitForInputIdle failed: Error %d\n", GetLastError() ); + retval = 33; + if (psei->fMask & SEE_MASK_NOCLOSEPROCESS) + psei_out->hProcess = info.hProcess; + else + CloseHandle( info.hProcess ); + CloseHandle( info.hThread ); + } + else if ((retval = GetLastError()) >= 32) + { + TRACE("CreateProcess returned error %ld\n", retval); + retval = ERROR_BAD_FORMAT; + } + + TRACE("returning %lu\n", retval); + + psei_out->hInstApp = (HINSTANCE)retval; + if( gcdret ) + if( !SetCurrentDirectoryW( curdir)) + ERR("cannot return to directory %s\n", debugstr_w(curdir)); + + return retval; +} + + +/*********************************************************************** + * SHELL_BuildEnvW [Internal] + * + * Build the environment for the new process, adding the specified + * path to the PATH variable. Returned pointer must be freed by caller. + */ +static LPWSTR SHELL_BuildEnvW( const WCHAR *path ) +{ + static const WCHAR wPath[] = {'P','A','T','H','=',0}; + WCHAR *strings, *new_env; + WCHAR *p, *p2; + int total = wcslen(path) + 1; + BOOL got_path = FALSE; + + if (!(strings = GetEnvironmentStringsW())) return NULL; + p = strings; + while (*p) + { + int len = wcslen(p) + 1; + if (!_wcsnicmp( p, wPath, 5 )) got_path = TRUE; + total += len; + p += len; + } + if (!got_path) total += 5; /* we need to create PATH */ + total++; /* terminating null */ + + if (!(new_env = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, total * sizeof(WCHAR) ))) + { + FreeEnvironmentStringsW( strings ); + return NULL; + } + p = strings; + p2 = new_env; + while (*p) + { + int len = wcslen(p) + 1; + memcpy( p2, p, len * sizeof(WCHAR) ); + if (!_wcsnicmp( p, wPath, 5 )) + { + p2[len - 1] = ';'; + wcscpy( p2 + len, path ); + p2 += wcslen(path) + 1; + } + p += len; + p2 += len; + } + if (!got_path) + { + wcscpy( p2, wPath ); + wcscat( p2, path ); + p2 += wcslen(p2) + 1; + } + *p2 = 0; + FreeEnvironmentStringsW( strings ); + return new_env; +} + + +/*********************************************************************** + * SHELL_TryAppPathW [Internal] + * + * Helper function for SHELL_FindExecutable + * @param lpResult - pointer to a buffer of size MAX_PATH + * On entry: szName is a filename (probably without path separators). + * On exit: if szName found in "App Path", place full path in lpResult, and return true + */ +static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env) +{ + static const WCHAR wszKeyAppPaths[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s', + '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','A','p','p',' ','P','a','t','h','s','\\',0}; + static const WCHAR wPath[] = {'P','a','t','h',0}; + HKEY hkApp = 0; + WCHAR buffer[1024]; + LONG len; + LONG res; + BOOL found = FALSE; + + if (env) *env = NULL; + wcscpy(buffer, wszKeyAppPaths); + wcscat(buffer, szName); + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp); + if (res) goto end; + + len = MAX_PATH*sizeof(WCHAR); + res = RegQueryValueW(hkApp, NULL, lpResult, &len); + if (res) goto end; + found = TRUE; + + if (env) + { + DWORD count = sizeof(buffer); + if (!RegQueryValueExW(hkApp, wPath, NULL, NULL, (LPBYTE)buffer, &count) && buffer[0]) + *env = SHELL_BuildEnvW( buffer ); + } + +end: + if (hkApp) RegCloseKey(hkApp); + return found; +} + +static UINT SHELL_FindExecutableByOperation(LPCWSTR lpOperation, LPWSTR key, LPWSTR filetype, LPWSTR command, LONG commandlen) +{ + static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; + HKEY hkeyClass; + WCHAR verb[MAX_PATH]; + + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, filetype, 0, 0x02000000, &hkeyClass)) + return SE_ERR_NOASSOC; + if (!HCR_GetDefaultVerbW(hkeyClass, lpOperation, verb, sizeof(verb)/sizeof(verb[0]))) + return SE_ERR_NOASSOC; + RegCloseKey(hkeyClass); + + /* Looking for ...buffer\shell\\command */ + wcscat(filetype, wszShell); + wcscat(filetype, verb); + wcscat(filetype, wCommand); + + if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, command, + &commandlen) == ERROR_SUCCESS) + { + commandlen /= sizeof(WCHAR); + if (key) wcscpy(key, filetype); +#if 0 + LPWSTR tmp; + WCHAR param[256]; + LONG paramlen = sizeof(param); + static const WCHAR wSpace[] = {' ',0}; + + /* FIXME: it seems all Windows version don't behave the same here. + * the doc states that this ddeexec information can be found after + * the exec names. + * on Win98, it doesn't appear, but I think it does on Win2k + */ + /* Get the parameters needed by the application + from the associated ddeexec key */ + tmp = strstrW(filetype, wCommand); + tmp[0] = '\0'; + wcscat(filetype, wDdeexec); + if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, param, + ¶mlen) == ERROR_SUCCESS) + { + paramlen /= sizeof(WCHAR); + wcscat(command, wSpace); + wcscat(command, param); + commandlen += paramlen; + } +#endif + + command[commandlen] = '\0'; + + return 33; /* FIXME see SHELL_FindExecutable() */ + } + + return SE_ERR_NOASSOC; +} + +/************************************************************************* + * SHELL_FindExecutable [Internal] + * + * Utility for code sharing between FindExecutable and ShellExecute + * in: + * lpFile the name of a file + * lpOperation the operation on it (open) + * out: + * lpResult a buffer, big enough :-(, to store the command to do the + * operation on the file + * key a buffer, big enough, to get the key name to do actually the + * command (it'll be used afterwards for more information + * on the operation) + */ +static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, + LPWSTR lpResult, DWORD resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args) +{ + static const WCHAR wWindows[] = {'w','i','n','d','o','w','s',0}; + static const WCHAR wPrograms[] = {'p','r','o','g','r','a','m','s',0}; + static const WCHAR wExtensions[] = {'e','x','e',' ','p','i','f',' ','b','a','t',' ','c','m','d',' ','c','o','m',0}; + WCHAR *extension = NULL; /* pointer to file extension */ + WCHAR filetype[256]; /* registry name for this filetype */ + LONG filetypelen = sizeof(filetype); /* length of above */ + WCHAR command[1024]; /* command from registry */ + WCHAR wBuffer[256]; /* Used to GetProfileString */ + UINT retval = SE_ERR_NOASSOC; + WCHAR *tok; /* token pointer */ + WCHAR xlpFile[256]; /* result of SearchPath */ + DWORD attribs; /* file attributes */ + + TRACE("%s\n", debugstr_w(lpFile)); + + if (!lpResult) + return ERROR_INVALID_PARAMETER; + + xlpFile[0] = '\0'; + lpResult[0] = '\0'; /* Start off with an empty return string */ + if (key) *key = '\0'; + + /* trap NULL parameters on entry */ + if (!lpFile) + { + WARN("(lpFile=%s,lpResult=%s): NULL parameter\n", + debugstr_w(lpFile), debugstr_w(lpResult)); + return ERROR_FILE_NOT_FOUND; /* File not found. Close enough, I guess. */ + } + + if (SHELL_TryAppPathW( lpFile, lpResult, env )) + { + TRACE("found %s via App Paths\n", debugstr_w(lpResult)); + return 33; + } + + if (SearchPathW(lpPath, lpFile, wszExe, sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL)) + { + TRACE("SearchPathW returned non-zero\n"); + lpFile = xlpFile; + /* Hey, isn't this value ignored? Why make this call? Shouldn't we return here? --dank*/ + } + + attribs = GetFileAttributesW(lpFile); + if (attribs!=INVALID_FILE_ATTRIBUTES && (attribs&FILE_ATTRIBUTE_DIRECTORY)) + { + wcscpy(filetype, wszFolder); + filetypelen = 6; /* strlen("Folder") */ + } + else + { + /* Did we get something? Anything? */ + if (xlpFile[0]==0) + { + TRACE("Returning SE_ERR_FNF\n"); + return SE_ERR_FNF; + } + /* First thing we need is the file's extension */ + extension = wcsrchr(xlpFile, '.'); /* Assume last "." is the one; */ + /* File->Run in progman uses */ + /* .\FILE.EXE :( */ + TRACE("xlpFile=%s,extension=%s\n", debugstr_w(xlpFile), debugstr_w(extension)); + + if (extension == NULL || extension[1]==0) + { + WARN("Returning SE_ERR_NOASSOC\n"); + return SE_ERR_NOASSOC; + } + + /* Three places to check: */ + /* 1. win.ini, [windows], programs (NB no leading '.') */ + /* 2. Registry, HKEY_CLASS_ROOT\\shell\open\command */ + /* 3. win.ini, [extensions], extension (NB no leading '.' */ + /* All I know of the order is that registry is checked before */ + /* extensions; however, it'd make sense to check the programs */ + /* section first, so that's what happens here. */ + + /* See if it's a program - if GetProfileString fails, we skip this + * section. Actually, if GetProfileString fails, we've probably + * got a lot more to worry about than running a program... */ + if (GetProfileStringW(wWindows, wPrograms, wExtensions, wBuffer, sizeof(wBuffer)/sizeof(WCHAR)) > 0) + { + CharLowerW(wBuffer); + tok = wBuffer; + while (*tok) + { + WCHAR *p = tok; + while (*p && *p != ' ' && *p != '\t') p++; + if (*p) + { + *p++ = 0; + while (*p == ' ' || *p == '\t') p++; + } + + if (wcsicmp(tok, &extension[1]) == 0) /* have to skip the leading "." */ + { + wcscpy(lpResult, xlpFile); + /* Need to perhaps check that the file has a path + * attached */ + TRACE("found %s\n", debugstr_w(lpResult)); + return 33; + /* Greater than 32 to indicate success */ + } + tok = p; + } + } + + /* Check registry */ + if (RegQueryValueW(HKEY_CLASSES_ROOT, extension, filetype, + &filetypelen) == ERROR_SUCCESS) + { + filetypelen /= sizeof(WCHAR); + if (filetypelen == sizeof(filetype)/sizeof(WCHAR)) + filetypelen--; + filetype[filetypelen] = '\0'; + TRACE("File type: %s\n", debugstr_w(filetype)); + } + else + { + *filetype = '\0'; + filetypelen = 0; + } + } + + if (*filetype) + { + /* pass the operation string to SHELL_FindExecutableByOperation() */ + filetype[filetypelen] = '\0'; + retval = SHELL_FindExecutableByOperation(lpOperation, key, filetype, command, sizeof(command)); + + if (retval > 32) + { + DWORD finishedLen; + SHELL_ArgifyW(lpResult, resultLen, command, xlpFile, pidl, args, &finishedLen); + if (finishedLen > resultLen) + ERR("Argify buffer not large enough.. truncated\n"); + + /* Remove double quotation marks and command line arguments */ + if (*lpResult == '"') + { + WCHAR *p = lpResult; + while (*(p + 1) != '"') + { + *p = *(p + 1); + p++; + } + *p = '\0'; + } + else + { + /* Truncate on first space */ + WCHAR *p = lpResult; + while (*p != ' ' && *p != '\0') + p++; + *p='\0'; + } + } + } + else /* Check win.ini */ + { + static const WCHAR wExtensions[] = {'e','x','t','e','n','s','i','o','n','s',0}; + + /* Toss the leading dot */ + extension++; + if (GetProfileStringW(wExtensions, extension, wszEmpty, command, sizeof(command)/sizeof(WCHAR)) > 0) + { + if (wcslen(command) != 0) + { + wcscpy(lpResult, command); + tok = wcschr(lpResult, '^'); /* should be ^.extension? */ + if (tok != NULL) + { + tok[0] = '\0'; + wcscat(lpResult, xlpFile); /* what if no dir in xlpFile? */ + tok = wcschr(command, '^'); /* see above */ + if ((tok != NULL) && (wcslen(tok)>5)) + { + wcscat(lpResult, &tok[5]); + } + } + retval = 33; /* FIXME - see above */ + } + } + } + + TRACE("returning %s\n", debugstr_w(lpResult)); + return retval; +} + +/****************************************************************** + * dde_cb + * + * callback for the DDE connection. not really useful + */ +static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv, + HSZ hsz1, HSZ hsz2, HDDEDATA hData, + ULONG_PTR dwData1, ULONG_PTR dwData2) +{ + TRACE("dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n", + uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2); + return NULL; +} + +/****************************************************************** + * dde_connect + * + * ShellExecute helper. Used to do an operation with a DDE connection + * + * Handles both the direct connection (try #1), and if it fails, + * launching an application and trying (#2) to connect to it + * + */ +static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec, + const WCHAR* lpFile, WCHAR *env, + LPCWSTR szCommandline, LPITEMIDLIST pidl, SHELL_ExecuteW32 execfunc, + const SHELLEXECUTEINFOW *psei, LPSHELLEXECUTEINFOW psei_out) +{ + static const WCHAR wApplication[] = {'\\','a','p','p','l','i','c','a','t','i','o','n',0}; + static const WCHAR wTopic[] = {'\\','t','o','p','i','c',0}; + WCHAR regkey[256]; + WCHAR * endkey = regkey + wcslen(key); + WCHAR app[256], topic[256], ifexec[256], res[256]; + LONG applen, topiclen, ifexeclen; + WCHAR * exec; + DWORD ddeInst = 0; + DWORD tid; + DWORD resultLen; + HSZ hszApp, hszTopic; + HCONV hConv; + HDDEDATA hDdeData; + unsigned ret = SE_ERR_NOASSOC; + BOOL unicode = !(GetVersion() & 0x80000000); + + wcscpy(regkey, key); + wcscpy(endkey, wApplication); + applen = sizeof(app); + if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, app, &applen) != ERROR_SUCCESS) + { + WCHAR command[1024], fullpath[MAX_PATH]; + static const WCHAR wSo[] = { '.','s','o',0 }; + DWORD sizeSo = sizeof(wSo)/sizeof(WCHAR); + LPWSTR ptr = NULL; + DWORD ret = 0; + + /* Get application command from start string and find filename of application */ + if (*start == '"') + { + wcscpy(command, start+1); + if ((ptr = wcschr(command, '"'))) + *ptr = 0; + ret = SearchPathW(NULL, command, wszExe, sizeof(fullpath)/sizeof(WCHAR), fullpath, &ptr); + } + else + { + LPWSTR p,space; + for (p=(LPWSTR)start; (space= const_cast(strchrW(p, ' '))); p=space+1) + { + int idx = space-start; + memcpy(command, start, idx*sizeof(WCHAR)); + command[idx] = '\0'; + if ((ret = SearchPathW(NULL, command, wszExe, sizeof(fullpath)/sizeof(WCHAR), fullpath, &ptr))) + break; + } + if (!ret) + ret = SearchPathW(NULL, start, wszExe, sizeof(fullpath)/sizeof(WCHAR), fullpath, &ptr); + } + + if (!ret) + { + ERR("Unable to find application path for command %s\n", debugstr_w(start)); + return ERROR_ACCESS_DENIED; + } + wcscpy(app, ptr); + + /* Remove extensions (including .so) */ + ptr = app + wcslen(app) - (sizeSo-1); + if (wcslen(app) >= sizeSo && + !wcscmp(ptr, wSo)) + *ptr = 0; + + ptr = const_cast(strrchrW(app, '.')); + assert(ptr); + *ptr = 0; + } + + wcscpy(endkey, wTopic); + topiclen = sizeof(topic); + if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, topic, &topiclen) != ERROR_SUCCESS) + { + static const WCHAR wSystem[] = {'S','y','s','t','e','m',0}; + wcscpy(topic, wSystem); + } + + if (unicode) + { + if (DdeInitializeW(&ddeInst, dde_cb, APPCMD_CLIENTONLY, 0L) != DMLERR_NO_ERROR) + return 2; + } + else + { + if (DdeInitializeA(&ddeInst, dde_cb, APPCMD_CLIENTONLY, 0L) != DMLERR_NO_ERROR) + return 2; + } + + hszApp = DdeCreateStringHandleW(ddeInst, app, CP_WINUNICODE); + hszTopic = DdeCreateStringHandleW(ddeInst, topic, CP_WINUNICODE); + + hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL); + exec = ddeexec; + if (!hConv) + { + static const WCHAR wIfexec[] = {'\\','i','f','e','x','e','c',0}; + TRACE("Launching %s\n", debugstr_w(start)); + ret = execfunc(start, env, TRUE, psei, psei_out); + if (ret <= 32) + { + TRACE("Couldn't launch\n"); + goto error; + } + hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL); + if (!hConv) + { + TRACE("Couldn't connect. ret=%d\n", ret); + DdeUninitialize(ddeInst); + SetLastError(ERROR_DDE_FAIL); + return 30; /* whatever */ + } + strcpyW(endkey, wIfexec); + ifexeclen = sizeof(ifexec); + if (RegQueryValueW(HKEY_CLASSES_ROOT, regkey, ifexec, &ifexeclen) == ERROR_SUCCESS) + { + exec = ifexec; + } + } + + SHELL_ArgifyW(res, sizeof(res)/sizeof(WCHAR), exec, lpFile, pidl, szCommandline, &resultLen); + if (resultLen > sizeof(res)/sizeof(WCHAR)) + ERR("Argify buffer not large enough, truncated\n"); + TRACE("%s %s => %s\n", debugstr_w(exec), debugstr_w(lpFile), debugstr_w(res)); + + /* It's documented in the KB 330337 that IE has a bug and returns + * error DMLERR_NOTPROCESSED on XTYP_EXECUTE request. + */ + if (unicode) + hDdeData = DdeClientTransaction((LPBYTE)res, (strlenW(res) + 1) * sizeof(WCHAR), hConv, 0L, 0, + XTYP_EXECUTE, 30000, &tid); + else + { + DWORD lenA = WideCharToMultiByte(CP_ACP, 0, res, -1, NULL, 0, NULL, NULL); + char *resA = (LPSTR)HeapAlloc(GetProcessHeap(), 0, lenA); + WideCharToMultiByte(CP_ACP, 0, res, -1, resA, lenA, NULL, NULL); + hDdeData = DdeClientTransaction( (LPBYTE)resA, lenA, hConv, 0L, 0, + XTYP_EXECUTE, 10000, &tid ); + HeapFree(GetProcessHeap(), 0, resA); + } + if (hDdeData) + DdeFreeDataHandle(hDdeData); + else + WARN("DdeClientTransaction failed with error %04x\n", DdeGetLastError(ddeInst)); + ret = 33; + + DdeDisconnect(hConv); + + error: + DdeUninitialize(ddeInst); + + return ret; +} + +/************************************************************************* + * execute_from_key [Internal] + */ +static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR szCommandline, + LPCWSTR executable_name, + SHELL_ExecuteW32 execfunc, + LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) +{ + static const WCHAR wCommand[] = {'c','o','m','m','a','n','d',0}; + static const WCHAR wDdeexec[] = {'d','d','e','e','x','e','c',0}; + WCHAR cmd[256], param[1024], ddeexec[256]; + DWORD cmdlen = sizeof(cmd), ddeexeclen = sizeof(ddeexec); + UINT_PTR retval = SE_ERR_NOASSOC; + DWORD resultLen; + LPWSTR tmp; + + TRACE("%s %s %s %s %s\n", debugstr_w(key), debugstr_w(lpFile), debugstr_w(env), + debugstr_w(szCommandline), debugstr_w(executable_name)); + + cmd[0] = '\0'; + param[0] = '\0'; + + /* Get the application from the registry */ + if (RegQueryValueW(HKEY_CLASSES_ROOT, key, cmd, (LONG *)&cmdlen) == ERROR_SUCCESS) + { + TRACE("got cmd: %s\n", debugstr_w(cmd)); + + /* Is there a replace() function anywhere? */ + cmdlen /= sizeof(WCHAR); + if (cmdlen >= sizeof(cmd)/sizeof(WCHAR)) + cmdlen = sizeof(cmd)/sizeof(WCHAR)-1; + cmd[cmdlen] = '\0'; + SHELL_ArgifyW(param, sizeof(param)/sizeof(WCHAR), cmd, lpFile, (LPITEMIDLIST)psei->lpIDList, szCommandline, &resultLen); + if (resultLen > sizeof(param)/sizeof(WCHAR)) + ERR("Argify buffer not large enough, truncating\n"); + } + + /* Get the parameters needed by the application + from the associated ddeexec key */ + tmp = const_cast(strstrW(key, wCommand)); + assert(tmp); + wcscpy(tmp, wDdeexec); + + if (RegQueryValueW(HKEY_CLASSES_ROOT, key, ddeexec, (LONG *)&ddeexeclen) == ERROR_SUCCESS) + { + TRACE("Got ddeexec %s => %s\n", debugstr_w(key), debugstr_w(ddeexec)); + if (!param[0]) strcpyW(param, executable_name); + retval = dde_connect(key, param, ddeexec, lpFile, env, szCommandline, (LPITEMIDLIST)psei->lpIDList, execfunc, psei, psei_out); + } + else if (param[0]) + { + TRACE("executing: %s\n", debugstr_w(param)); + retval = execfunc(param, env, FALSE, psei, psei_out); + } + else + WARN("Nothing appropriate found for %s\n", debugstr_w(key)); + + return retval; +} + +/************************************************************************* + * FindExecutableA [SHELL32.@] + */ +HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult) +{ + HINSTANCE retval; + WCHAR *wFile = NULL, *wDirectory = NULL; + WCHAR wResult[MAX_PATH]; + + if (lpFile) __SHCloneStrAtoW(&wFile, lpFile); + if (lpDirectory) __SHCloneStrAtoW(&wDirectory, lpDirectory); + + retval = FindExecutableW(wFile, wDirectory, wResult); + WideCharToMultiByte(CP_ACP, 0, wResult, -1, lpResult, MAX_PATH, NULL, NULL); + SHFree( wFile ); + SHFree( wDirectory ); + + TRACE("returning %s\n", lpResult); + return retval; +} + +/************************************************************************* + * FindExecutableW [SHELL32.@] + * + * This function returns the executable associated with the specified file + * for the default verb. + * + * PARAMS + * lpFile [I] The file to find the association for. This must refer to + * an existing file otherwise FindExecutable fails and returns + * SE_ERR_FNF. + * lpResult [O] Points to a buffer into which the executable path is + * copied. This parameter must not be NULL otherwise + * FindExecutable() segfaults. The buffer must be of size at + * least MAX_PATH characters. + * + * RETURNS + * A value greater than 32 on success, less than or equal to 32 otherwise. + * See the SE_ERR_* constants. + * + * NOTES + * On Windows XP and 2003, FindExecutable() seems to first convert the + * filename into 8.3 format, thus taking into account only the first three + * characters of the extension, and expects to find an association for those. + * However other Windows versions behave sanely. + */ +HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult) +{ + UINT_PTR retval = SE_ERR_NOASSOC; + WCHAR old_dir[1024]; + + TRACE("File %s, Dir %s\n", debugstr_w(lpFile), debugstr_w(lpDirectory)); + + lpResult[0] = '\0'; /* Start off with an empty return string */ + if (lpFile == NULL) + return (HINSTANCE)SE_ERR_FNF; + + if (lpDirectory) + { + GetCurrentDirectoryW(sizeof(old_dir)/sizeof(WCHAR), old_dir); + SetCurrentDirectoryW(lpDirectory); + } + + retval = SHELL_FindExecutable(lpDirectory, lpFile, wszOpen, lpResult, MAX_PATH, NULL, NULL, NULL, NULL); + + TRACE("returning %s\n", debugstr_w(lpResult)); + if (lpDirectory) + SetCurrentDirectoryW(old_dir); + return (HINSTANCE)retval; +} + +/* FIXME: is this already implemented somewhere else? */ +static HKEY ShellExecute_GetClassKey( const SHELLEXECUTEINFOW *sei ) +{ + LPCWSTR ext = NULL, lpClass = NULL; + LPWSTR cls = NULL; + DWORD type = 0, sz = 0; + HKEY hkey = 0; + LONG r; + + if (sei->fMask & SEE_MASK_CLASSALL) + return sei->hkeyClass; + + if (sei->fMask & SEE_MASK_CLASSNAME) + lpClass = sei->lpClass; + else + { + ext = PathFindExtensionW( sei->lpFile ); + TRACE("ext = %s\n", debugstr_w( ext ) ); + if (!ext) + return hkey; + + r = RegOpenKeyW( HKEY_CLASSES_ROOT, ext, &hkey ); + if (r != ERROR_SUCCESS ) + return hkey; + + r = RegQueryValueExW( hkey, NULL, 0, &type, NULL, &sz ); + if ( r == ERROR_SUCCESS && type == REG_SZ ) + { + sz += sizeof (WCHAR); + cls = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, sz ); + cls[0] = 0; + RegQueryValueExW( hkey, NULL, 0, &type, (LPBYTE) cls, &sz ); + } + + RegCloseKey( hkey ); + lpClass = cls; + } + + TRACE("class = %s\n", debugstr_w(lpClass) ); + + hkey = 0; + if ( lpClass ) + RegOpenKeyW( HKEY_CLASSES_ROOT, lpClass, &hkey ); + + HeapFree( GetProcessHeap(), 0, cls ); + + return hkey; +} + +static IDataObject *shellex_get_dataobj( LPSHELLEXECUTEINFOW sei ) +{ + LPCITEMIDLIST pidllast = NULL; + IDataObject *dataobj = NULL; + IShellFolder *shf = NULL; + LPITEMIDLIST pidl = NULL; + HRESULT r; + + if (sei->fMask & SEE_MASK_CLASSALL) + pidl = (LPITEMIDLIST)sei->lpIDList; + else + { + WCHAR fullpath[MAX_PATH]; + BOOL ret; + + fullpath[0] = 0; + ret = GetFullPathNameW( sei->lpFile, MAX_PATH, fullpath, NULL ); + if (!ret) + goto end; + + pidl = ILCreateFromPathW( fullpath ); + } + + r = SHBindToParent( pidl, IID_IShellFolder, (LPVOID*)&shf, &pidllast ); + if ( FAILED( r ) ) + goto end; + + shf->GetUIObjectOf(NULL, 1, &pidllast, + IID_IDataObject, NULL, (LPVOID*) &dataobj ); + +end: + if ( pidl != sei->lpIDList ) + ILFree( pidl ); + if ( shf ) + shf->Release(); + return dataobj; +} + +static HRESULT shellex_run_context_menu_default( IShellExtInit *obj, + LPSHELLEXECUTEINFOW sei ) +{ + IContextMenu *cm = NULL; + CMINVOKECOMMANDINFOEX ici; + MENUITEMINFOW info; + WCHAR string[0x80]; + INT i, n, def = -1; + HMENU hmenu = 0; + HRESULT r; + + TRACE("%p %p\n", obj, sei ); + + r = obj->QueryInterface(IID_IContextMenu, (LPVOID*) &cm ); + if ( FAILED( r ) ) + return r; + + hmenu = CreateMenu(); + if ( !hmenu ) + goto end; + + /* the number of the last menu added is returned in r */ + r = cm->QueryContextMenu(hmenu, 0, 0x20, 0x7fff, CMF_DEFAULTONLY ); + if ( FAILED( r ) ) + goto end; + + n = GetMenuItemCount( hmenu ); + for ( i = 0; i < n; i++ ) + { + memset( &info, 0, sizeof info ); + info.cbSize = sizeof info; + info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_DATA | MIIM_ID; + info.dwTypeData = string; + info.cch = sizeof string; + string[0] = 0; + GetMenuItemInfoW( hmenu, i, TRUE, &info ); + + TRACE("menu %d %s %08x %08lx %08x %08x\n", i, debugstr_w(string), + info.fState, info.dwItemData, info.fType, info.wID ); + if ( ( !sei->lpVerb && (info.fState & MFS_DEFAULT) ) || + ( sei->lpVerb && !lstrcmpiW( sei->lpVerb, string ) ) ) + { + def = i; + break; + } + } + + r = E_FAIL; + if ( def == -1 ) + goto end; + + memset( &ici, 0, sizeof ici ); + ici.cbSize = sizeof ici; + ici.fMask = CMIC_MASK_UNICODE | (sei->fMask & (SEE_MASK_NOASYNC|SEE_MASK_ASYNCOK|SEE_MASK_FLAG_NO_UI)); + ici.nShow = sei->nShow; + ici.lpVerb = MAKEINTRESOURCEA( def ); + ici.hwnd = sei->hwnd; + ici.lpParametersW = sei->lpParameters; + + r = cm->InvokeCommand((LPCMINVOKECOMMANDINFO) &ici ); + + TRACE("invoke command returned %08x\n", r ); + +end: + if ( hmenu ) + DestroyMenu( hmenu ); + if ( cm ) + cm->Release(); + return r; +} + +static HRESULT shellex_load_object_and_run( HKEY hkey, LPCGUID guid, LPSHELLEXECUTEINFOW sei ) +{ + IDataObject *dataobj = NULL; + IObjectWithSite *ows = NULL; + IShellExtInit *obj = NULL; + HRESULT r; + + TRACE("%p %s %p\n", hkey, debugstr_guid( guid ), sei ); + + r = CoInitialize( NULL ); + if ( FAILED( r ) ) + goto end; + + r = CoCreateInstance(*guid, NULL, CLSCTX_INPROC_SERVER, + IID_IShellExtInit, (LPVOID*)&obj ); + if ( FAILED( r ) ) + { + ERR("failed %08x\n", r ); + goto end; + } + + dataobj = shellex_get_dataobj( sei ); + if ( !dataobj ) + { + ERR("failed to get data object\n"); + goto end; + } + + r = obj->Initialize(NULL, dataobj, hkey ); + if ( FAILED( r ) ) + goto end; + + r = obj->QueryInterface(IID_IObjectWithSite, (LPVOID*) &ows ); + if ( FAILED( r ) ) + goto end; + + ows->SetSite(NULL ); + + r = shellex_run_context_menu_default( obj, sei ); + +end: + if ( ows ) + ows->Release(); + if ( dataobj ) + dataobj->Release(); + if ( obj ) + obj->Release(); + CoUninitialize(); + return r; +} + + +/************************************************************************* + * ShellExecute_FromContextMenu [Internal] + */ +static LONG ShellExecute_FromContextMenu( LPSHELLEXECUTEINFOW sei ) +{ + static const WCHAR szcm[] = { 's','h','e','l','l','e','x','\\', + 'C','o','n','t','e','x','t','M','e','n','u','H','a','n','d','l','e','r','s',0 }; + HKEY hkey, hkeycm = 0; + WCHAR szguid[39]; + HRESULT hr; + GUID guid; + DWORD i; + LONG r; + + TRACE("%s\n", debugstr_w(sei->lpFile) ); + + hkey = ShellExecute_GetClassKey( sei ); + if ( !hkey ) + return ERROR_FUNCTION_FAILED; + + r = RegOpenKeyW( hkey, szcm, &hkeycm ); + if ( r == ERROR_SUCCESS ) + { + i = 0; + while ( 1 ) + { + r = RegEnumKeyW( hkeycm, i++, szguid, sizeof(szguid)/sizeof(szguid[0]) ); + if ( r != ERROR_SUCCESS ) + break; + + hr = CLSIDFromString( szguid, &guid ); + if (SUCCEEDED(hr)) + { + /* stop at the first one that succeeds in running */ + hr = shellex_load_object_and_run( hkey, &guid, sei ); + if ( SUCCEEDED( hr ) ) + break; + } + } + RegCloseKey( hkeycm ); + } + + if ( hkey != sei->hkeyClass ) + RegCloseKey( hkey ); + return r; +} + +static UINT_PTR SHELL_execute_class( LPCWSTR wszApplicationName, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc ) +{ + static const WCHAR wSpace[] = {' ',0}; + WCHAR execCmd[1024], wcmd[1024]; + /* launch a document by fileclass like 'WordPad.Document.1' */ + /* the Commandline contains 'c:\Path\wordpad.exe "%1"' */ + /* FIXME: wcmd should not be of a fixed size. Fixed to 1024, MAX_PATH is way too short! */ + ULONG cmask=(psei->fMask & SEE_MASK_CLASSALL); + DWORD resultLen; + BOOL done; + + HCR_GetExecuteCommandW((cmask == SEE_MASK_CLASSKEY) ? psei->hkeyClass : NULL, + (cmask == SEE_MASK_CLASSNAME) ? psei->lpClass: NULL, + psei->lpVerb, + execCmd, sizeof(execCmd)); + + /* FIXME: get the extension of lpFile, check if it fits to the lpClass */ + TRACE("SEE_MASK_CLASSNAME->%s, doc->%s\n", debugstr_w(execCmd), debugstr_w(wszApplicationName)); + + wcmd[0] = '\0'; + done = SHELL_ArgifyW(wcmd, sizeof(wcmd)/sizeof(WCHAR), execCmd, wszApplicationName, (LPITEMIDLIST)psei->lpIDList, NULL, &resultLen); + if (!done && wszApplicationName[0]) + { + strcatW(wcmd, wSpace); + strcatW(wcmd, wszApplicationName); + } + if (resultLen > sizeof(wcmd)/sizeof(WCHAR)) + ERR("Argify buffer not large enough... truncating\n"); + return execfunc(wcmd, NULL, FALSE, psei, psei_out); +} + +static BOOL SHELL_translate_idlist( LPSHELLEXECUTEINFOW sei, LPWSTR wszParameters, DWORD parametersLen, LPWSTR wszApplicationName, DWORD dwApplicationNameLen ) +{ + static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0}; + WCHAR buffer[MAX_PATH]; + BOOL appKnownSingular = FALSE; + + /* last chance to translate IDList: now also allow CLSID paths */ + if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW((LPCITEMIDLIST)sei->lpIDList, buffer, sizeof(buffer)))) { + if (buffer[0]==':' && buffer[1]==':') { + /* open shell folder for the specified class GUID */ + if (strlenW(buffer) + 1 > parametersLen) + ERR("parameters len exceeds buffer size (%i > %i), truncating\n", + lstrlenW(buffer) + 1, parametersLen); + lstrcpynW(wszParameters, buffer, parametersLen); + if (strlenW(wExplorer) > dwApplicationNameLen) + ERR("application len exceeds buffer size (%i > %i), truncating\n", + lstrlenW(wExplorer) + 1, dwApplicationNameLen); + lstrcpynW(wszApplicationName, wExplorer, dwApplicationNameLen); + appKnownSingular = TRUE; + + sei->fMask &= ~SEE_MASK_INVOKEIDLIST; + } else { + WCHAR target[MAX_PATH]; + DWORD attribs; + DWORD resultLen; + /* Check if we're executing a directory and if so use the + handler for the Folder class */ + strcpyW(target, buffer); + attribs = GetFileAttributesW(buffer); + if (attribs != INVALID_FILE_ATTRIBUTES && + (attribs & FILE_ATTRIBUTE_DIRECTORY) && + HCR_GetExecuteCommandW(0, wszFolder, + sei->lpVerb, + buffer, sizeof(buffer))) { + SHELL_ArgifyW(wszApplicationName, dwApplicationNameLen, + buffer, target, (LPITEMIDLIST)sei->lpIDList, NULL, &resultLen); + if (resultLen > dwApplicationNameLen) + ERR("Argify buffer not large enough... truncating\n"); + appKnownSingular = FALSE; + } + sei->fMask &= ~SEE_MASK_INVOKEIDLIST; + } + } + return appKnownSingular; +} + +static UINT_PTR SHELL_quote_and_execute( LPCWSTR wcmd, LPCWSTR wszParameters, LPCWSTR lpstrProtocol, LPCWSTR wszApplicationName, LPWSTR env, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc ) +{ + static const WCHAR wQuote[] = {'"',0}; + static const WCHAR wSpace[] = {' ',0}; + UINT_PTR retval; + DWORD len; + WCHAR *wszQuotedCmd; + + /* Length of quotes plus length of command plus NULL terminator */ + len = 2 + lstrlenW(wcmd) + 1; + if (wszParameters[0]) + { + /* Length of space plus length of parameters */ + len += 1 + lstrlenW(wszParameters); + } + wszQuotedCmd = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + /* Must quote to handle case where cmd contains spaces, + * else security hole if malicious user creates executable file "C:\\Program" + */ + strcpyW(wszQuotedCmd, wQuote); + strcatW(wszQuotedCmd, wcmd); + strcatW(wszQuotedCmd, wQuote); + if (wszParameters[0]) { + strcatW(wszQuotedCmd, wSpace); + strcatW(wszQuotedCmd, wszParameters); + } + TRACE("%s/%s => %s/%s\n", debugstr_w(wszApplicationName), debugstr_w(psei->lpVerb), debugstr_w(wszQuotedCmd), debugstr_w(lpstrProtocol)); + if (*lpstrProtocol) + retval = execute_from_key(lpstrProtocol, wszApplicationName, env, psei->lpParameters, wcmd, execfunc, psei, psei_out); + else + retval = execfunc(wszQuotedCmd, env, FALSE, psei, psei_out); + HeapFree(GetProcessHeap(), 0, wszQuotedCmd); + return retval; +} + +static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd, LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out, SHELL_ExecuteW32 execfunc ) +{ + static const WCHAR wShell[] = {'\\','s','h','e','l','l','\\',0}; + static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; + UINT_PTR retval; + WCHAR *lpstrProtocol; + LPCWSTR lpstrRes; + INT iSize; + DWORD len; + + lpstrRes = strchrW(lpFile, ':'); + if (lpstrRes) + iSize = lpstrRes - lpFile; + else + iSize = strlenW(lpFile); + + TRACE("Got URL: %s\n", debugstr_w(lpFile)); + /* Looking for ...protocol\shell\lpOperation\command */ + len = iSize + lstrlenW(wShell) + lstrlenW(wCommand) + 1; + if (psei->lpVerb) + len += lstrlenW(psei->lpVerb); + else + len += lstrlenW(wszOpen); + lpstrProtocol = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + memcpy(lpstrProtocol, lpFile, iSize*sizeof(WCHAR)); + lpstrProtocol[iSize] = '\0'; + strcatW(lpstrProtocol, wShell); + strcatW(lpstrProtocol, psei->lpVerb? psei->lpVerb: wszOpen); + strcatW(lpstrProtocol, wCommand); + + /* Remove File Protocol from lpFile */ + /* In the case file://path/file */ + if (!strncmpiW(lpFile, wFile, iSize)) + { + lpFile += iSize; + while (*lpFile == ':') lpFile++; + } + retval = execute_from_key(lpstrProtocol, lpFile, NULL, psei->lpParameters, + wcmd, execfunc, psei, psei_out); + HeapFree(GetProcessHeap(), 0, lpstrProtocol); + return retval; +} + +void do_error_dialog( UINT_PTR retval, HWND hwnd ) +{ + WCHAR msg[2048]; + int error_code=GetLastError(); + + if (retval == SE_ERR_NOASSOC) + LoadStringW(shell32_hInstance, IDS_SHLEXEC_NOASSOC, msg, sizeof(msg)/sizeof(WCHAR)); + else + FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, msg, sizeof(msg)/sizeof(WCHAR), NULL); + + MessageBoxW(hwnd, msg, NULL, MB_ICONERROR); +} + +/************************************************************************* + * SHELL_execute [Internal] + */ +BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) +{ + static const WCHAR wSpace[] = {' ',0}; + static const WCHAR wWww[] = {'w','w','w',0}; + static const WCHAR wFile[] = {'f','i','l','e',0}; + static const WCHAR wHttp[] = {'h','t','t','p',':','/','/',0}; + static const DWORD unsupportedFlags = + SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | + SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | + SEE_MASK_UNICODE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR; + + WCHAR parametersBuffer[1024], dirBuffer[MAX_PATH], wcmdBuffer[1024]; + WCHAR *wszApplicationName, *wszParameters, *wszDir, *wcmd; + DWORD dwApplicationNameLen = MAX_PATH+2; + DWORD parametersLen = sizeof(parametersBuffer) / sizeof(WCHAR); + DWORD dirLen = sizeof(dirBuffer) / sizeof(WCHAR); + DWORD wcmdLen = sizeof(wcmdBuffer) / sizeof(WCHAR); + DWORD len; + SHELLEXECUTEINFOW sei_tmp; /* modifiable copy of SHELLEXECUTEINFO struct */ + WCHAR wfileName[MAX_PATH]; + WCHAR *env; + WCHAR lpstrProtocol[256]; + LPCWSTR lpFile; + UINT_PTR retval = SE_ERR_NOASSOC; + BOOL appKnownSingular = FALSE; + + /* make a local copy of the LPSHELLEXECUTEINFO structure and work with this from now on */ + sei_tmp = *sei; + + TRACE("mask=0x%08x hwnd=%p verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s\n", + sei_tmp.fMask, sei_tmp.hwnd, debugstr_w(sei_tmp.lpVerb), + debugstr_w(sei_tmp.lpFile), debugstr_w(sei_tmp.lpParameters), + debugstr_w(sei_tmp.lpDirectory), sei_tmp.nShow, + ((sei_tmp.fMask & SEE_MASK_CLASSALL) == SEE_MASK_CLASSNAME) ? + debugstr_w(sei_tmp.lpClass) : "not used"); + + sei->hProcess = NULL; + + /* make copies of all path/command strings */ + if (!sei_tmp.lpFile) + { + wszApplicationName = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwApplicationNameLen*sizeof(WCHAR)); + *wszApplicationName = '\0'; + } + else if (*sei_tmp.lpFile == '\"') + { + DWORD l = strlenW(sei_tmp.lpFile+1); + if(l >= dwApplicationNameLen) dwApplicationNameLen = l+1; + wszApplicationName = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwApplicationNameLen*sizeof(WCHAR)); + memcpy(wszApplicationName, sei_tmp.lpFile+1, (l+1)*sizeof(WCHAR)); + if (wszApplicationName[l-1] == '\"') + wszApplicationName[l-1] = '\0'; + appKnownSingular = TRUE; + TRACE("wszApplicationName=%s\n",debugstr_w(wszApplicationName)); + } else { + DWORD l = strlenW(sei_tmp.lpFile)+1; + if(l > dwApplicationNameLen) dwApplicationNameLen = l+1; + wszApplicationName = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwApplicationNameLen*sizeof(WCHAR)); + memcpy(wszApplicationName, sei_tmp.lpFile, l*sizeof(WCHAR)); + } + + wszParameters = parametersBuffer; + if (sei_tmp.lpParameters) + { + len = lstrlenW(sei_tmp.lpParameters) + 1; + if (len > parametersLen) + { + wszParameters = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + parametersLen = len; + } + strcpyW(wszParameters, sei_tmp.lpParameters); + } + else + *wszParameters = '\0'; + + wszDir = dirBuffer; + if (sei_tmp.lpDirectory) + { + len = lstrlenW(sei_tmp.lpDirectory) + 1; + if (len > dirLen) + { + wszDir = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + dirLen = len; + } + strcpyW(wszDir, sei_tmp.lpDirectory); + } + else + *wszDir = '\0'; + + /* adjust string pointers to point to the new buffers */ + sei_tmp.lpFile = wszApplicationName; + sei_tmp.lpParameters = wszParameters; + sei_tmp.lpDirectory = wszDir; + + if (sei_tmp.fMask & unsupportedFlags) + { + FIXME("flags ignored: 0x%08x\n", sei_tmp.fMask & unsupportedFlags); + } + + /* process the IDList */ + if (sei_tmp.fMask & SEE_MASK_IDLIST) + { + IShellExecuteHookW* pSEH; + + HRESULT hr = SHBindToParent((LPCITEMIDLIST)sei_tmp.lpIDList, IID_IShellExecuteHookW, (LPVOID*)&pSEH, NULL); + + if (SUCCEEDED(hr)) + { + hr = pSEH->Execute(&sei_tmp); + + pSEH->Release(); + + if (hr == S_OK) { + HeapFree(GetProcessHeap(), 0, wszApplicationName); + if (wszParameters != parametersBuffer) + HeapFree(GetProcessHeap(), 0, wszParameters); + if (wszDir != dirBuffer) + HeapFree(GetProcessHeap(), 0, wszDir); + return TRUE; + } + } + + SHGetPathFromIDListW((LPCITEMIDLIST)sei_tmp.lpIDList, wszApplicationName); + appKnownSingular = TRUE; + TRACE("-- idlist=%p (%s)\n", sei_tmp.lpIDList, debugstr_w(wszApplicationName)); + } + + if ( ERROR_SUCCESS == ShellExecute_FromContextMenu( &sei_tmp ) ) + { + sei->hInstApp = (HINSTANCE) 33; + HeapFree(GetProcessHeap(), 0, wszApplicationName); + if (wszParameters != parametersBuffer) + HeapFree(GetProcessHeap(), 0, wszParameters); + if (wszDir != dirBuffer) + HeapFree(GetProcessHeap(), 0, wszDir); + return TRUE; + } + + if (sei_tmp.fMask & SEE_MASK_CLASSALL) + { + retval = SHELL_execute_class( wszApplicationName, &sei_tmp, sei, + execfunc ); + if (retval <= 32 && !(sei_tmp.fMask & SEE_MASK_FLAG_NO_UI)) + { + OPENASINFO Info; + + //FIXME + // need full path + + Info.pcszFile = wszApplicationName; + Info.pcszClass = NULL; + Info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_EXEC; + + //if (SHOpenWithDialog(sei_tmp.hwnd, &Info) != S_OK) + do_error_dialog(retval, sei_tmp.hwnd); + } + HeapFree(GetProcessHeap(), 0, wszApplicationName); + if (wszParameters != parametersBuffer) + HeapFree(GetProcessHeap(), 0, wszParameters); + if (wszDir != dirBuffer) + HeapFree(GetProcessHeap(), 0, wszDir); + return retval > 32; + } + + /* Has the IDList not yet been translated? */ + if (sei_tmp.fMask & SEE_MASK_IDLIST) + { + appKnownSingular = SHELL_translate_idlist( &sei_tmp, wszParameters, + parametersLen, + wszApplicationName, + dwApplicationNameLen ); + } + + /* expand environment strings */ + len = ExpandEnvironmentStringsW(sei_tmp.lpFile, NULL, 0); + if (len>0) + { + LPWSTR buf; + buf = (LPWSTR)HeapAlloc(GetProcessHeap(),0,(len+1)*sizeof(WCHAR)); + + ExpandEnvironmentStringsW(sei_tmp.lpFile, buf, len+1); + HeapFree(GetProcessHeap(), 0, wszApplicationName); + dwApplicationNameLen = len+1; + wszApplicationName = buf; + /* appKnownSingular unmodified */ + + sei_tmp.lpFile = wszApplicationName; + } + + if (*sei_tmp.lpParameters) + { + len = ExpandEnvironmentStringsW(sei_tmp.lpParameters, NULL, 0); + if (len > 0) + { + LPWSTR buf; + len++; + buf = (LPWSTR)HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR)); + ExpandEnvironmentStringsW(sei_tmp.lpParameters, buf, len); + if (wszParameters != parametersBuffer) + HeapFree(GetProcessHeap(), 0, wszParameters); + wszParameters = buf; + parametersLen = len; + sei_tmp.lpParameters = wszParameters; + } + } + + if (*sei_tmp.lpDirectory) + { + len = ExpandEnvironmentStringsW(sei_tmp.lpDirectory, NULL, 0); + if (len > 0) + { + LPWSTR buf; + len++; + buf = (LPWSTR)HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR)); + ExpandEnvironmentStringsW(sei_tmp.lpDirectory, buf, len); + if (wszDir != dirBuffer) + HeapFree(GetProcessHeap(), 0, wszDir); + wszDir = buf; + sei_tmp.lpDirectory = wszDir; + } + } + + /* Else, try to execute the filename */ + TRACE("execute:%s,%s,%s\n", debugstr_w(wszApplicationName), debugstr_w(wszParameters), debugstr_w(wszDir)); + + /* separate out command line arguments from executable file name */ + if (!*sei_tmp.lpParameters && !appKnownSingular) { + /* If the executable path is quoted, handle the rest of the command line as parameters. */ + if (sei_tmp.lpFile[0] == '"') { + LPWSTR src = wszApplicationName/*sei_tmp.lpFile*/ + 1; + LPWSTR dst = wfileName; + LPWSTR end; + + /* copy the unquoted executable path to 'wfileName' */ + while(*src && *src!='"') + *dst++ = *src++; + + *dst = '\0'; + + if (*src == '"') { + end = ++src; + + while(isspace(*src)) + ++src; + } else + end = src; + + /* copy the parameter string to 'wszParameters' */ + strcpyW(wszParameters, src); + + /* terminate previous command string after the quote character */ + *end = '\0'; + } + else + { + /* If the executable name is not quoted, we have to use this search loop here, + that in CreateProcess() is not sufficient because it does not handle shell links. */ + WCHAR buffer[MAX_PATH], xlpFile[MAX_PATH]; + LPWSTR space, s; + + LPWSTR beg = wszApplicationName/*sei_tmp.lpFile*/; + for(s=beg; (space= const_cast(strchrW(s, ' '))); s=space+1) { + int idx = space-sei_tmp.lpFile; + memcpy(buffer, sei_tmp.lpFile, idx * sizeof(WCHAR)); + buffer[idx] = '\0'; + + /*FIXME This finds directory paths if the targeted file name contains spaces. */ + if (SearchPathW(*sei_tmp.lpDirectory? sei_tmp.lpDirectory: NULL, buffer, wszExe, sizeof(xlpFile)/sizeof(xlpFile[0]), xlpFile, NULL)) + { + /* separate out command from parameter string */ + LPCWSTR p = space + 1; + + while(isspaceW(*p)) + ++p; + + strcpyW(wszParameters, p); + *space = '\0'; + + break; + } + } + + lstrcpynW(wfileName, sei_tmp.lpFile,sizeof(wfileName)/sizeof(WCHAR)); + } + } else + lstrcpynW(wfileName, sei_tmp.lpFile,sizeof(wfileName)/sizeof(WCHAR)); + + lpFile = wfileName; + + wcmd = wcmdBuffer; + len = lstrlenW(wszApplicationName) + 1; + if (sei_tmp.lpParameters[0]) + len += 1 + lstrlenW(wszParameters); + if (len > wcmdLen) + { + wcmd = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + wcmdLen = len; + } + strcpyW(wcmd, wszApplicationName); + if (sei_tmp.lpParameters[0]) { + strcatW(wcmd, wSpace); + strcatW(wcmd, wszParameters); + } + + retval = execfunc(wcmd, NULL, FALSE, &sei_tmp, sei); + if (retval > 32) { + HeapFree(GetProcessHeap(), 0, wszApplicationName); + if (wszParameters != parametersBuffer) + HeapFree(GetProcessHeap(), 0, wszParameters); + if (wszDir != dirBuffer) + HeapFree(GetProcessHeap(), 0, wszDir); + if (wcmd != wcmdBuffer) + HeapFree(GetProcessHeap(), 0, wcmd); + return TRUE; + } + + /* Else, try to find the executable */ + wcmd[0] = '\0'; + retval = SHELL_FindExecutable(sei_tmp.lpDirectory, lpFile, sei_tmp.lpVerb, wcmd, wcmdLen, lpstrProtocol, &env, (LPITEMIDLIST)sei_tmp.lpIDList, sei_tmp.lpParameters); + if (retval > 32) /* Found */ + { + retval = SHELL_quote_and_execute( wcmd, wszParameters, lpstrProtocol, + wszApplicationName, env, &sei_tmp, + sei, execfunc ); + HeapFree( GetProcessHeap(), 0, env ); + } + else if (PathIsDirectoryW(lpFile)) + { + static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r',0}; + static const WCHAR wQuote[] = {'"',0}; + WCHAR wExec[MAX_PATH]; + WCHAR * lpQuotedFile = (LPWSTR)HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR) * (strlenW(lpFile) + 3) ); + + if (lpQuotedFile) + { + retval = SHELL_FindExecutable( sei_tmp.lpDirectory, wExplorer, + wszOpen, wExec, MAX_PATH, + NULL, &env, NULL, NULL ); + if (retval > 32) + { + strcpyW(lpQuotedFile, wQuote); + strcatW(lpQuotedFile, lpFile); + strcatW(lpQuotedFile, wQuote); + retval = SHELL_quote_and_execute( wExec, lpQuotedFile, + lpstrProtocol, + wszApplicationName, env, + &sei_tmp, sei, execfunc ); + HeapFree( GetProcessHeap(), 0, env ); + } + HeapFree( GetProcessHeap(), 0, lpQuotedFile ); + } + else + retval = 0; /* Out of memory */ + } + else if (PathIsURLW(lpFile)) /* File not found, check for URL */ + { + retval = SHELL_execute_url( lpFile, wFile, wcmd, &sei_tmp, sei, execfunc ); + } + /* Check if file specified is in the form www.??????.*** */ + else if (!strncmpiW(lpFile, wWww, 3)) + { + /* if so, append lpFile http:// and call ShellExecute */ + WCHAR lpstrTmpFile[256]; + strcpyW(lpstrTmpFile, wHttp); + strcatW(lpstrTmpFile, lpFile); + retval = (UINT_PTR)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, lpstrTmpFile, NULL, NULL, 0); + } + + TRACE("retval %lu\n", retval); + + if (retval <= 32 && !(sei_tmp.fMask & SEE_MASK_FLAG_NO_UI)) + { + OPENASINFO Info; + + //FIXME + // need full path + + Info.pcszFile = wszApplicationName; + Info.pcszClass = NULL; + Info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_EXEC; + + //if (SHOpenWithDialog(sei_tmp.hwnd, &Info) != S_OK) + do_error_dialog(retval, sei_tmp.hwnd); + } + + HeapFree(GetProcessHeap(), 0, wszApplicationName); + if (wszParameters != parametersBuffer) + HeapFree(GetProcessHeap(), 0, wszParameters); + if (wszDir != dirBuffer) + HeapFree(GetProcessHeap(), 0, wszDir); + if (wcmd != wcmdBuffer) + HeapFree(GetProcessHeap(), 0, wcmd); + + sei->hInstApp = (HINSTANCE)(retval > 32 ? 33 : retval); + + return retval > 32; +} + +/************************************************************************* + * ShellExecuteA [SHELL32.290] + */ +HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile, + LPCSTR lpParameters,LPCSTR lpDirectory, INT iShowCmd) +{ + SHELLEXECUTEINFOA sei; + + TRACE("%p,%s,%s,%s,%s,%d\n", + hWnd, debugstr_a(lpOperation), debugstr_a(lpFile), + debugstr_a(lpParameters), debugstr_a(lpDirectory), iShowCmd); + + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_FLAG_NO_UI; + sei.hwnd = hWnd; + sei.lpVerb = lpOperation; + sei.lpFile = lpFile; + sei.lpParameters = lpParameters; + sei.lpDirectory = lpDirectory; + sei.nShow = iShowCmd; + sei.lpIDList = 0; + sei.lpClass = 0; + sei.hkeyClass = 0; + sei.dwHotKey = 0; + sei.hProcess = 0; + + ShellExecuteExA (&sei); + return sei.hInstApp; +} + +/************************************************************************* + * ShellExecuteExA [SHELL32.292] + * + */ +BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei) +{ + SHELLEXECUTEINFOW seiW; + BOOL ret; + WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL, *wClass = NULL; + + TRACE("%p\n", sei); + + memcpy(&seiW, sei, sizeof(SHELLEXECUTEINFOW)); + + if (sei->lpVerb) + seiW.lpVerb = __SHCloneStrAtoW(&wVerb, sei->lpVerb); + + if (sei->lpFile) + seiW.lpFile = __SHCloneStrAtoW(&wFile, sei->lpFile); + + if (sei->lpParameters) + seiW.lpParameters = __SHCloneStrAtoW(&wParameters, sei->lpParameters); + + if (sei->lpDirectory) + seiW.lpDirectory = __SHCloneStrAtoW(&wDirectory, sei->lpDirectory); + + if ((sei->fMask & SEE_MASK_CLASSALL) == SEE_MASK_CLASSNAME && sei->lpClass) + seiW.lpClass = __SHCloneStrAtoW(&wClass, sei->lpClass); + else + seiW.lpClass = NULL; + + ret = SHELL_execute( &seiW, SHELL_ExecuteW ); + + sei->hInstApp = seiW.hInstApp; + + if (sei->fMask & SEE_MASK_NOCLOSEPROCESS) + sei->hProcess = seiW.hProcess; + + SHFree(wVerb); + SHFree(wFile); + SHFree(wParameters); + SHFree(wDirectory); + SHFree(wClass); + + return ret; +} + +/************************************************************************* + * ShellExecuteExW [SHELL32.293] + * + */ +BOOL WINAPI ShellExecuteExW (LPSHELLEXECUTEINFOW sei) +{ + return SHELL_execute( sei, SHELL_ExecuteW ); +} + +/************************************************************************* + * ShellExecuteW [SHELL32.294] + * from shellapi.h + * WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, + * LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd); + */ +HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, + LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd) +{ + SHELLEXECUTEINFOW sei; + + TRACE("\n"); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_FLAG_NO_UI; + sei.hwnd = hwnd; + sei.lpVerb = lpOperation; + sei.lpFile = lpFile; + sei.lpParameters = lpParameters; + sei.lpDirectory = lpDirectory; + sei.nShow = nShowCmd; + sei.lpIDList = 0; + sei.lpClass = 0; + sei.hkeyClass = 0; + sei.dwHotKey = 0; + sei.hProcess = 0; + + SHELL_execute( &sei, SHELL_ExecuteW ); + return sei.hInstApp; +} + +/************************************************************************* + * WOWShellExecute [SHELL32.@] + * + * FIXME: the callback function most likely doesn't work the same way on Windows. + */ +EXTERN_C HINSTANCE WINAPI WOWShellExecute(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile, + LPCSTR lpParameters,LPCSTR lpDirectory, INT iShowCmd, void *callback) +{ + SHELLEXECUTEINFOW seiW; + WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL; + HANDLE hProcess = 0; + + seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL; + seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL; + seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL; + seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL; + + seiW.cbSize = sizeof(seiW); + seiW.fMask = 0; + seiW.hwnd = hWnd; + seiW.nShow = iShowCmd; + seiW.lpIDList = 0; + seiW.lpClass = 0; + seiW.hkeyClass = 0; + seiW.dwHotKey = 0; + seiW.hProcess = hProcess; + + SHELL_execute( &seiW, (SHELL_ExecuteW32)callback ); + + SHFree(wVerb); + SHFree(wFile); + SHFree(wParameters); + SHFree(wDirectory); + return seiW.hInstApp; +} + +/************************************************************************* + * OpenAs_RunDLLA [SHELL32.@] + */ +EXTERN_C void WINAPI OpenAs_RunDLLA(HWND hwnd, HINSTANCE hinst, LPCSTR cmdline, int cmdshow) +{ + FIXME("%p, %p, %s, %d\n", hwnd, hinst, debugstr_a(cmdline), cmdshow); +} + +/************************************************************************* + * OpenAs_RunDLLW [SHELL32.@] + */ +EXTERN_C void WINAPI OpenAs_RunDLLW(HWND hwnd, HINSTANCE hinst, LPCWSTR cmdline, int cmdshow) +{ + FIXME("%p, %p, %s, %d\n", hwnd, hinst, debugstr_w(cmdline), cmdshow); +} diff --git a/dll/win32/shell32_new/shlfileop.cpp b/dll/win32/shell32_new/shlfileop.cpp new file mode 100644 index 00000000000..b0d97c64ad9 --- /dev/null +++ b/dll/win32/shell32_new/shlfileop.cpp @@ -0,0 +1,1878 @@ +/* + * SHFileOperation + * + * Copyright 2000 Juergen Schmied + * Copyright 2002 Andriy Palamarchuk + * Copyright 2004 Dietrich Teickner (from Odin) + * Copyright 2004 Rolf Kalbermatter + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +//#define NO_SHLWAPI_STREAM +#include + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define IsAttrib(x, y) ((INVALID_FILE_ATTRIBUTES != (x)) && ((x) & (y))) +#define IsAttribFile(x) (!((x) & FILE_ATTRIBUTE_DIRECTORY)) +#define IsAttribDir(x) IsAttrib(x, FILE_ATTRIBUTE_DIRECTORY) +#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) + +#define FO_MASK 0xF +#define WM_FILE (WM_USER + 1) +#define TIMER_ID (100) + +static const WCHAR wWildcardFile[] = {'*',0}; +static const WCHAR wWildcardChars[] = {'*','?',0}; + +static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec); +static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path); +static DWORD SHNotifyDeleteFileW(LPCWSTR path); +static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest); +static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists); +static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly); + +typedef struct +{ + SHFILEOPSTRUCTW *req; + DWORD dwYesToAllMask; + BOOL bManyItems; + BOOL bCancelled; +} FILE_OPERATION; + +#define ERROR_SHELL_INTERNAL_FILE_NOT_FOUND 1026 + +typedef struct +{ + DWORD attributes; + LPWSTR szDirectory; + LPWSTR szFilename; + LPWSTR szFullPath; + BOOL bFromWildcard; + BOOL bFromRelative; + BOOL bExists; +} FILE_ENTRY; + +typedef struct +{ + FILE_ENTRY *feFiles; + DWORD num_alloc; + DWORD dwNumFiles; + BOOL bAnyFromWildcard; + BOOL bAnyDirectories; + BOOL bAnyDontExist; +} FILE_LIST; + +typedef struct +{ + FILE_LIST * from; + FILE_LIST * to; + FILE_OPERATION * op; + DWORD Index; + HWND hDlgCtrl; + HWND hwndDlg; +}FILE_OPERATION_CONTEXT; + + +/* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations + */ +static const WCHAR CONFIRM_MSG_PROP[] = {'W','I','N','E','_','C','O','N','F','I','R','M',0}; + +struct confirm_msg_info +{ + LPWSTR lpszText; + LPWSTR lpszCaption; + HICON hIcon; + BOOL bYesToAll; +}; + +/* as some buttons may be hidden and the dialog height may change we may need + * to move the controls */ +static void confirm_msg_move_button(HWND hDlg, INT iId, INT *xPos, INT yOffset, BOOL bShow) +{ + HWND hButton = GetDlgItem(hDlg, iId); + RECT r; + + if (bShow) { + POINT pt; + int width; + + GetWindowRect(hButton, &r); + width = r.right - r.left; + pt.x = r.left; + pt.y = r.top; + ScreenToClient(hDlg, &pt); + MoveWindow(hButton, *xPos - width, pt.y - yOffset, width, r.bottom - r.top, FALSE); + *xPos -= width + 5; + } + else + ShowWindow(hButton, SW_HIDE); +} + +/* Note: we paint the text manually and don't use the static control to make + * sure the text has the same height as the one computed in WM_INITDIALOG + */ +static INT_PTR ConfirmMsgBox_Paint(HWND hDlg) +{ + PAINTSTRUCT ps; + HFONT hOldFont; + RECT r; + HDC hdc; + + BeginPaint(hDlg, &ps); + hdc = ps.hdc; + + GetClientRect(GetDlgItem(hDlg, IDD_MESSAGE), &r); + /* this will remap the rect to dialog coords */ + MapWindowPoints(GetDlgItem(hDlg, IDD_MESSAGE), hDlg, (LPPOINT)&r, 2); + hOldFont = (HFONT)SelectObject(hdc, (HFONT)SendDlgItemMessageW(hDlg, IDD_MESSAGE, WM_GETFONT, 0, 0)); + DrawTextW(hdc, (LPWSTR)GetPropW(hDlg, CONFIRM_MSG_PROP), -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK); + SelectObject(hdc, hOldFont); + EndPaint(hDlg, &ps); + return TRUE; +} + +static INT_PTR ConfirmMsgBox_Init(HWND hDlg, LPARAM lParam) +{ + struct confirm_msg_info *info = (struct confirm_msg_info *)lParam; + INT xPos, yOffset; + int width, height; + HFONT hOldFont; + HDC hdc; + RECT r; + + SetWindowTextW(hDlg, info->lpszCaption); + ShowWindow(GetDlgItem(hDlg, IDD_MESSAGE), SW_HIDE); + SetPropW(hDlg, CONFIRM_MSG_PROP, info->lpszText); + SendDlgItemMessageW(hDlg, IDD_ICON, STM_SETICON, (WPARAM)info->hIcon, 0); + + /* compute the text height and resize the dialog */ + GetClientRect(GetDlgItem(hDlg, IDD_MESSAGE), &r); + hdc = GetDC(hDlg); + yOffset = r.bottom; + hOldFont = (HFONT)SelectObject(hdc, (HFONT)SendDlgItemMessageW(hDlg, IDD_MESSAGE, WM_GETFONT, 0, 0)); + DrawTextW(hdc, info->lpszText, -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK | DT_CALCRECT); + SelectObject(hdc, hOldFont); + yOffset -= r.bottom; + yOffset = min(yOffset, 35); /* don't make the dialog too small */ + ReleaseDC(hDlg, hdc); + + GetClientRect(hDlg, &r); + xPos = r.right - 7; + GetWindowRect(hDlg, &r); + width = r.right - r.left; + height = r.bottom - r.top - yOffset; + MoveWindow(hDlg, (GetSystemMetrics(SM_CXSCREEN) - width)/2, + (GetSystemMetrics(SM_CYSCREEN) - height)/2, width, height, FALSE); + + confirm_msg_move_button(hDlg, IDCANCEL, &xPos, yOffset, info->bYesToAll); + confirm_msg_move_button(hDlg, IDNO, &xPos, yOffset, TRUE); + confirm_msg_move_button(hDlg, IDD_YESTOALL, &xPos, yOffset, info->bYesToAll); + confirm_msg_move_button(hDlg, IDYES, &xPos, yOffset, TRUE); + return TRUE; +} + +static INT_PTR CALLBACK ConfirmMsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_INITDIALOG: + return ConfirmMsgBox_Init(hDlg, lParam); + case WM_PAINT: + return ConfirmMsgBox_Paint(hDlg); + case WM_COMMAND: + EndDialog(hDlg, wParam); + break; + case WM_CLOSE: + EndDialog(hDlg, IDCANCEL); + break; + } + return FALSE; +} + +int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll) +{ + static const WCHAR wszTemplate[] = {'S','H','E','L','L','_','Y','E','S','T','O','A','L','L','_','M','S','G','B','O','X',0}; + struct confirm_msg_info info; + + info.lpszText = lpszText; + info.lpszCaption = lpszCaption; + info.hIcon = hIcon; + info.bYesToAll = bYesToAll; + return DialogBoxParamW(shell32_hInstance, wszTemplate, hWnd, ConfirmMsgBoxProc, (LPARAM)&info); +} + +/* confirmation dialogs content */ +typedef struct +{ + HINSTANCE hIconInstance; + UINT icon_resource_id; + UINT caption_resource_id, text_resource_id; +} SHELL_ConfirmIDstruc; + +static BOOL SHELL_ConfirmIDs(int nKindOfDialog, SHELL_ConfirmIDstruc *ids) +{ + ids->hIconInstance = shell32_hInstance; + switch (nKindOfDialog) { + case ASK_DELETE_FILE: + ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE; + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_DELETEITEM_TEXT; + return TRUE; + case ASK_DELETE_FOLDER: + ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE; + ids->caption_resource_id = IDS_DELETEFOLDER_CAPTION; + ids->text_resource_id = IDS_DELETEITEM_TEXT; + return TRUE; + case ASK_DELETE_MULTIPLE_ITEM: + ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE; + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_DELETEMULTIPLE_TEXT; + return TRUE; + case ASK_TRASH_FILE: + ids->icon_resource_id = IDI_SHELL_TRASH_FILE; + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_TRASHITEM_TEXT; + return TRUE; + case ASK_TRASH_FOLDER: + ids->icon_resource_id = IDI_SHELL_TRASH_FILE; + ids->caption_resource_id = IDS_DELETEFOLDER_CAPTION; + ids->text_resource_id = IDS_TRASHFOLDER_TEXT; + return TRUE; + case ASK_TRASH_MULTIPLE_ITEM: + ids->icon_resource_id = IDI_SHELL_TRASH_FILE; + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_TRASHMULTIPLE_TEXT; + return TRUE; + case ASK_CANT_TRASH_ITEM: + ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE; + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_CANTTRASH_TEXT; + return TRUE; + case ASK_DELETE_SELECTED: + ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE; + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_DELETESELECTED_TEXT; + return TRUE; + case ASK_OVERWRITE_FILE: + ids->hIconInstance = NULL; + ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE; + ids->caption_resource_id = IDS_OVERWRITEFILE_CAPTION; + ids->text_resource_id = IDS_OVERWRITEFILE_TEXT; + return TRUE; + case ASK_OVERWRITE_FOLDER: + ids->hIconInstance = NULL; + ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE; + ids->caption_resource_id = IDS_OVERWRITEFILE_CAPTION; + ids->text_resource_id = IDS_OVERWRITEFOLDER_TEXT; + return TRUE; + default: + FIXME(" Unhandled nKindOfDialog %d stub\n", nKindOfDialog); + } + return FALSE; +} + +static BOOL SHELL_ConfirmDialogW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir, FILE_OPERATION *op) +{ + WCHAR szCaption[255], szText[255], szBuffer[MAX_PATH + 256]; + SHELL_ConfirmIDstruc ids; + DWORD_PTR args[1]; + HICON hIcon; + int ret; + + assert(nKindOfDialog >= 0 && nKindOfDialog < 32); + if (op && (op->dwYesToAllMask & (1 << nKindOfDialog))) + return TRUE; + + if (!SHELL_ConfirmIDs(nKindOfDialog, &ids)) return FALSE; + + LoadStringW(shell32_hInstance, ids.caption_resource_id, szCaption, sizeof(szCaption)/sizeof(WCHAR)); + LoadStringW(shell32_hInstance, ids.text_resource_id, szText, sizeof(szText)/sizeof(WCHAR)); + + args[0] = (DWORD_PTR)szDir; + FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, + szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)args); + hIcon = LoadIconW(ids.hIconInstance, (LPWSTR)MAKEINTRESOURCE(ids.icon_resource_id)); + + ret = SHELL_ConfirmMsgBox(hWnd, szBuffer, szCaption, hIcon, op && op->bManyItems); + if (op) { + if (ret == IDD_YESTOALL) { + op->dwYesToAllMask |= (1 << nKindOfDialog); + ret = IDYES; + } + if (ret == IDCANCEL) + op->bCancelled = TRUE; + if (ret != IDYES) + op->req->fAnyOperationsAborted = TRUE; + } + return ret == IDYES; +} + +BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir) +{ + return SHELL_ConfirmDialogW(hWnd, nKindOfDialog, szDir, NULL); +} + +static DWORD SHELL32_AnsiToUnicodeBuf(LPCSTR aPath, LPWSTR *wPath, DWORD minChars) +{ + DWORD len = MultiByteToWideChar(CP_ACP, 0, aPath, -1, NULL, 0); + + if (len < minChars) + len = minChars; + + *wPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (*wPath) + { + MultiByteToWideChar(CP_ACP, 0, aPath, -1, *wPath, len); + return NO_ERROR; + } + return E_OUTOFMEMORY; +} + +static void SHELL32_FreeUnicodeBuf(LPWSTR wPath) +{ + HeapFree(GetProcessHeap(), 0, wPath); +} + +EXTERN_C HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status) +{ + FIXME("(%s, %p) stub\n", debugstr_w(path), status); + return E_FAIL; +} + +/************************************************************************** + * SHELL_DeleteDirectory() [internal] + * + * Asks for confirmation when bShowUI is true and deletes the directory and + * all its subdirectories and files if necessary. + */ +BOOL SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI) +{ + BOOL ret = TRUE; + HANDLE hFind; + WIN32_FIND_DATAW wfd; + WCHAR szTemp[MAX_PATH]; + + /* Make sure the directory exists before eventually prompting the user */ + PathCombineW(szTemp, pszDir, wWildcardFile); + hFind = FindFirstFileW(szTemp, &wfd); + if (hFind == INVALID_HANDLE_VALUE) + return FALSE; + + if (!bShowUI || (ret = SHELL_ConfirmDialogW(hwnd, ASK_DELETE_FOLDER, pszDir, NULL))) + { + do + { + if (IsDotDir(wfd.cFileName)) + continue; + PathCombineW(szTemp, pszDir, wfd.cFileName); + if (FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes) + ret = SHELL_DeleteDirectoryW(hwnd, szTemp, FALSE); + else + ret = (SHNotifyDeleteFileW(szTemp) == ERROR_SUCCESS); + } while (ret && FindNextFileW(hFind, &wfd)); + } + FindClose(hFind); + if (ret) + ret = (SHNotifyRemoveDirectoryW(pszDir) == ERROR_SUCCESS); + return ret; +} + +/************************************************************************** + * Win32CreateDirectory [SHELL32.93] + * + * Creates a directory. Also triggers a change notify if one exists. + * + * PARAMS + * path [I] path to directory to create + * + * RETURNS + * TRUE if successful, FALSE otherwise + */ + +static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec) +{ + TRACE("(%s, %p)\n", debugstr_w(path), sec); + + if (CreateDirectoryW(path, sec)) + { + SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHW, path, NULL); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/**********************************************************************/ + +EXTERN_C BOOL WINAPI Win32CreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec) +{ + return (SHNotifyCreateDirectoryW(path, sec) == ERROR_SUCCESS); +} + +/************************************************************************ + * Win32RemoveDirectory [SHELL32.94] + * + * Deletes a directory. Also triggers a change notify if one exists. + * + * PARAMS + * path [I] path to directory to delete + * + * RETURNS + * TRUE if successful, FALSE otherwise + */ +static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path) +{ + BOOL ret; + TRACE("(%s)\n", debugstr_w(path)); + + ret = RemoveDirectoryW(path); + if (!ret) + { + /* Directory may be write protected */ + DWORD dwAttr = GetFileAttributesW(path); + if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY)) + if (SetFileAttributesW(path, dwAttr & ~FILE_ATTRIBUTE_READONLY)) + ret = RemoveDirectoryW(path); + } + if (ret) + { + SHChangeNotify(SHCNE_RMDIR, SHCNF_PATHW, path, NULL); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/***********************************************************************/ + +EXTERN_C BOOL WINAPI Win32RemoveDirectoryW(LPCWSTR path) +{ + return (SHNotifyRemoveDirectoryW(path) == ERROR_SUCCESS); +} + +/************************************************************************ + * Win32DeleteFile [SHELL32.164] + * + * Deletes a file. Also triggers a change notify if one exists. + * + * PARAMS + * path [I] path to file to delete + * + * RETURNS + * TRUE if successful, FALSE otherwise + */ +static DWORD SHNotifyDeleteFileW(LPCWSTR path) +{ + BOOL ret; + + TRACE("(%s)\n", debugstr_w(path)); + + ret = DeleteFileW(path); + if (!ret) + { + /* File may be write protected or a system file */ + DWORD dwAttr = GetFileAttributesW(path); + if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)) + if (SetFileAttributesW(path, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))) + ret = DeleteFileW(path); + } + if (ret) + { + SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/***********************************************************************/ + +EXTERN_C DWORD WINAPI Win32DeleteFileW(LPCWSTR path) +{ + return (SHNotifyDeleteFileW(path) == ERROR_SUCCESS); +} + +/************************************************************************ + * SHNotifyMoveFile [internal] + * + * Moves a file. Also triggers a change notify if one exists. + * + * PARAMS + * src [I] path to source file to move + * dest [I] path to target file to move to + * + * RETURNS + * ERORR_SUCCESS if successful + */ +static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest) +{ + BOOL ret; + + TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest)); + + ret = MoveFileExW(src, dest, MOVEFILE_REPLACE_EXISTING); + + /* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */ + if (!ret) + ret = MoveFileW(src, dest); + + if (!ret) + { + DWORD dwAttr; + + dwAttr = SHFindAttrW(dest, FALSE); + if (INVALID_FILE_ATTRIBUTES == dwAttr) + { + /* Source file may be write protected or a system file */ + dwAttr = GetFileAttributesW(src); + if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)) + if (SetFileAttributesW(src, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))) + ret = MoveFileW(src, dest); + } + } + if (ret) + { + SHChangeNotify(SHCNE_RENAMEITEM, SHCNF_PATHW, src, dest); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +static DWORD WINAPI SHOperationProgressRoutine(LARGE_INTEGER TotalFileSize, LARGE_INTEGER TotalBytesTransferred, LARGE_INTEGER StreamSize, LARGE_INTEGER StreamBytesTransferred, DWORD dwStreamNumber, DWORD dwCallbackReason, HANDLE hSourceFile, HANDLE hDestinationFile, LPVOID lpData) +{ + FILE_OPERATION_CONTEXT * Context; + LARGE_INTEGER Progress; + + /* get context */ + Context = (FILE_OPERATION_CONTEXT*)lpData; + + if (TotalBytesTransferred.QuadPart) + { + Progress.QuadPart = (TotalBytesTransferred.QuadPart * 100) / TotalFileSize.QuadPart; + } + else + { + Progress.QuadPart = 1; + } + + /* update progress bar */ + SendMessageW(Context->hDlgCtrl, PBM_SETPOS, (WPARAM)Progress.u.LowPart, 0); + + if (TotalBytesTransferred.QuadPart == TotalFileSize.QuadPart) + { + /* file was copied */ + Context->Index++; + PostMessageW(Context->hwndDlg, WM_FILE, 0, 0); + } + + return PROGRESS_CONTINUE; +} + +BOOL +QueueFile( + FILE_OPERATION_CONTEXT * Context) +{ + FILE_ENTRY * from, *to; + BOOL bRet = FALSE; + + if (Context->Index >= Context->from->dwNumFiles) + return FALSE; + + /* get current file */ + from = &Context->from->feFiles[Context->Index]; + + if (Context->op->req->fFlags != FO_DELETE) + to = &Context->to->feFiles[Context->Index]; + + /* update status */ + SendDlgItemMessageW(Context->hwndDlg, 14001, WM_SETTEXT, 0, (LPARAM)from->szFullPath); + + if (Context->op->req->wFunc == FO_COPY) + { + bRet = CopyFileExW(from->szFullPath, to->szFullPath, SHOperationProgressRoutine, (LPVOID)Context, &Context->op->bCancelled, 0); + } + else if (Context->op->req->wFunc == FO_MOVE) + { + //bRet = MoveFileWithProgressW(from->szFullPath, to->szFullPath, SHOperationProgressRoutine, (LPVOID)Context, MOVEFILE_COPY_ALLOWED); + } + else if (Context->op->req->wFunc == FO_DELETE) + { + bRet = DeleteFile(from->szFullPath); + } + + return bRet; +} + +static INT_PTR CALLBACK SHOperationDialog(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + FILE_OPERATION_CONTEXT * Context; + + Context = (FILE_OPERATION_CONTEXT*) GetWindowLongPtr(hwndDlg, DWLP_USER); + + switch(uMsg) + { + case WM_INITDIALOG: + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)lParam); + + /* get context */ + Context = (FILE_OPERATION_CONTEXT*)lParam; + + /* store progress bar handle */ + Context->hDlgCtrl = GetDlgItem(hwndDlg, 14000); + + /* store window handle */ + Context->hwndDlg = hwndDlg; + + /* set progress bar range */ + (void)SendMessageW(Context->hDlgCtrl, (UINT) PBM_SETRANGE, 0, MAKELPARAM(0, 100)); + + /* start file queueing */ + SetTimer(hwndDlg, TIMER_ID, 1000, NULL); + //QueueFile(Context); + + return TRUE; + + case WM_CLOSE: + Context->op->bCancelled = TRUE; + EndDialog(hwndDlg, Context->op->bCancelled); + return TRUE; + case WM_COMMAND: + if (LOWORD(wParam) == 14002) + { + Context->op->bCancelled = TRUE; + EndDialog(hwndDlg, Context->op->bCancelled); + return TRUE; + } + break; + case WM_TIMER: + if (wParam == TIMER_ID) + { + QueueFile(Context); + KillTimer(hwndDlg, TIMER_ID); + } + break; + case WM_FILE: + if (!QueueFile(Context)) + EndDialog(hwndDlg, Context->op->bCancelled); + default: + break; + } + return FALSE; +} + +HRESULT +SHShowFileOperationDialog(FILE_OPERATION *op, FILE_LIST *flFrom, FILE_LIST *flTo) +{ + HWND hwnd; + BOOL bRet; + MSG msg; + FILE_OPERATION_CONTEXT Context; + + Context.from = flFrom; + Context.to = flTo; + Context.op = op; + Context.Index = 0; + Context.op->bCancelled = FALSE; + + hwnd = CreateDialogParam(shell32_hInstance, MAKEINTRESOURCE(IDD_SH_FILE_COPY), NULL, SHOperationDialog, (LPARAM)&Context); + if (hwnd == NULL) + { + ERR("Failed to create dialog\n"); + return E_FAIL; + } + ShowWindow(hwnd, SW_SHOWNORMAL); + + while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0) + { + if (!IsWindow(hwnd) || !IsDialogMessage(hwnd, &msg)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + + return NOERROR; +} + + +/************************************************************************ + * SHNotifyCopyFile [internal] + * + * Copies a file. Also triggers a change notify if one exists. + * + * PARAMS + * src [I] path to source file to move + * dest [I] path to target file to move to + * bFailIfExists [I] if TRUE, the target file will not be overwritten if + * a file with this name already exists + * + * RETURNS + * ERROR_SUCCESS if successful + */ +static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists) +{ + BOOL ret; + DWORD attribs; + + TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : ""); + + /* Destination file may already exist with read only attribute */ + attribs = GetFileAttributesW(dest); + if (IsAttrib(attribs, FILE_ATTRIBUTE_READONLY)) + SetFileAttributesW(dest, attribs & ~FILE_ATTRIBUTE_READONLY); + + ret = CopyFileW(src, dest, bFailIfExists); + if (ret) + { + SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL); + return ERROR_SUCCESS; + } + + return GetLastError(); +} + +/************************************************************************* + * SHCreateDirectory [SHELL32.165] + * + * This function creates a file system folder whose fully qualified path is + * given by path. If one or more of the intermediate folders do not exist, + * they will be created as well. + * + * PARAMS + * hWnd [I] + * path [I] path of directory to create + * + * RETURNS + * ERROR_SUCCESS or one of the following values: + * ERROR_BAD_PATHNAME if the path is relative + * ERROR_FILE_EXISTS when a file with that name exists + * ERROR_PATH_NOT_FOUND can't find the path, probably invalid + * ERROR_INVALID_NAME if the path contains invalid chars + * ERROR_ALREADY_EXISTS when the directory already exists + * ERROR_FILENAME_EXCED_RANGE if the filename was to long to process + * + * NOTES + * exported by ordinal + * Win9x exports ANSI + * WinNT/2000 exports Unicode + */ +int WINAPI SHCreateDirectory(HWND hWnd, LPCWSTR path) +{ + return SHCreateDirectoryExW(hWnd, path, NULL); +} + +/************************************************************************* + * SHCreateDirectoryExA [SHELL32.@] + * + * This function creates a file system folder whose fully qualified path is + * given by path. If one or more of the intermediate folders do not exist, + * they will be created as well. + * + * PARAMS + * hWnd [I] + * path [I] path of directory to create + * sec [I] security attributes to use or NULL + * + * RETURNS + * ERROR_SUCCESS or one of the following values: + * ERROR_BAD_PATHNAME or ERROR_PATH_NOT_FOUND if the path is relative + * ERROR_INVALID_NAME if the path contains invalid chars + * ERROR_FILE_EXISTS when a file with that name exists + * ERROR_ALREADY_EXISTS when the directory already exists + * ERROR_FILENAME_EXCED_RANGE if the filename was to long to process + * + * FIXME: Not implemented yet; + * SHCreateDirectoryEx also verifies that the files in the directory will be visible + * if the path is a network path to deal with network drivers which might have a limited + * but unknown maximum path length. If not: + * + * If hWnd is set to a valid window handle, a message box is displayed warning + * the user that the files may not be accessible. If the user chooses not to + * proceed, the function returns ERROR_CANCELLED. + * + * If hWnd is set to NULL, no user interface is displayed and the function + * returns ERROR_CANCELLED. + */ +int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec) +{ + LPWSTR wPath; + DWORD retCode; + + TRACE("(%s, %p)\n", debugstr_a(path), sec); + + retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); + if (!retCode) + { + retCode = SHCreateDirectoryExW(hWnd, wPath, sec); + SHELL32_FreeUnicodeBuf(wPath); + } + return retCode; +} + +/************************************************************************* + * SHCreateDirectoryExW [SHELL32.@] + * + * See SHCreateDirectoryExA. + */ +int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec) +{ + int ret = ERROR_BAD_PATHNAME; + TRACE("(%p, %s, %p)\n", hWnd, debugstr_w(path), sec); + + if (PathIsRelativeW(path)) + { + SetLastError(ret); + } + else + { + ret = SHNotifyCreateDirectoryW(path, sec); + /* Refuse to work on certain error codes before trying to create directories recursively */ + if (ret != ERROR_SUCCESS && + ret != ERROR_FILE_EXISTS && + ret != ERROR_ALREADY_EXISTS && + ret != ERROR_FILENAME_EXCED_RANGE) + { + WCHAR *pEnd, *pSlash, szTemp[MAX_PATH + 1]; /* extra for PathAddBackslash() */ + + lstrcpynW(szTemp, path, MAX_PATH); + pEnd = PathAddBackslashW(szTemp); + pSlash = szTemp + 3; + + while (*pSlash) + { + while (*pSlash && *pSlash != '\\') pSlash++; + if (*pSlash) + { + *pSlash = 0; /* terminate path at separator */ + + ret = SHNotifyCreateDirectoryW(szTemp, pSlash + 1 == pEnd ? sec : NULL); + } + *pSlash++ = '\\'; /* put the separator back */ + } + } + + if (ret && hWnd && (ERROR_CANCELLED != ret)) + { + /* We failed and should show a dialog box */ + FIXME("Show system error message, creating path %s, failed with error %d\n", debugstr_w(path), ret); + ret = ERROR_CANCELLED; /* Error has been already presented to user (not really yet!) */ + } + } + return ret; +} + +/************************************************************************* + * SHFindAttrW [internal] + * + * Get the Attributes for a file or directory. The difference to GetAttributes() + * is that this function will also work for paths containing wildcard characters + * in its filename. + + * PARAMS + * path [I] path of directory or file to check + * fileOnly [I] TRUE if only files should be found + * + * RETURNS + * INVALID_FILE_ATTRIBUTES if the path does not exist, the actual attributes of + * the first file or directory found otherwise + */ +static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly) +{ + WIN32_FIND_DATAW wfd; + BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars)); + DWORD dwAttr = INVALID_FILE_ATTRIBUTES; + HANDLE hFind = FindFirstFileW(pName, &wfd); + + TRACE("%s %d\n", debugstr_w(pName), fileOnly); + if (INVALID_HANDLE_VALUE != hFind) + { + do + { + if (b_FileMask && IsAttribDir(wfd.dwFileAttributes)) + continue; + dwAttr = wfd.dwFileAttributes; + break; + } + while (FindNextFileW(hFind, &wfd)); + FindClose(hFind); + } + return dwAttr; +} + +/************************************************************************* + * + * SHNameTranslate HelperFunction for SHFileOperationA + * + * Translates a list of 0 terminated ASCII strings into Unicode. If *wString + * is NULL, only the necessary size of the string is determined and returned, + * otherwise the ASCII strings are copied into it and the buffer is increased + * to point to the location after the final 0 termination char. + */ +static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more) +{ + DWORD size = 0, aSize = 0; + LPCSTR aString = (LPCSTR)*pWToFrom; + + if (aString) + { + do + { + size = lstrlenA(aString) + 1; + aSize += size; + aString += size; + } while ((size != 1) && more); + /* The two sizes might be different in the case of multibyte chars */ + size = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, 0); + if (*wString) /* only in the second loop */ + { + MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, size); + *pWToFrom = *wString; + *wString += size; + } + } + return size; +} +/************************************************************************* + * SHFileOperationA [SHELL32.@] + * + * Function to copy, move, delete and create one or more files with optional + * user prompts. + * + * PARAMS + * lpFileOp [I/O] pointer to a structure containing all the necessary information + * + * RETURNS + * Success: ERROR_SUCCESS. + * Failure: ERROR_CANCELLED. + * + * NOTES + * exported by name + */ +int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp) +{ + SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp); + int retCode = 0; + DWORD size; + LPWSTR ForFree = NULL, /* we change wString in SHNameTranslate and can't use it for freeing */ + wString = NULL; /* we change this in SHNameTranslate */ + + TRACE("\n"); + if (FO_DELETE == (nFileOp.wFunc & FO_MASK)) + nFileOp.pTo = NULL; /* we need a NULL or a valid pointer for translation */ + if (!(nFileOp.fFlags & FOF_SIMPLEPROGRESS)) + nFileOp.lpszProgressTitle = NULL; /* we need a NULL or a valid pointer for translation */ + while (1) /* every loop calculate size, second translate also, if we have storage for this */ + { + size = SHNameTranslate(&wString, &nFileOp.lpszProgressTitle, FALSE); /* no loop */ + size += SHNameTranslate(&wString, &nFileOp.pFrom, TRUE); /* internal loop */ + size += SHNameTranslate(&wString, &nFileOp.pTo, TRUE); /* internal loop */ + + if (ForFree) + { + retCode = SHFileOperationW(&nFileOp); + HeapFree(GetProcessHeap(), 0, ForFree); /* we cannot use wString, it was changed */ + break; + } + else + { + wString = ForFree = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); + if (ForFree) continue; + retCode = ERROR_OUTOFMEMORY; + nFileOp.fAnyOperationsAborted = TRUE; + SetLastError(retCode); + return retCode; + } + } + + lpFileOp->hNameMappings = nFileOp.hNameMappings; + lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted; + return retCode; +} + +static void __inline grow_list(FILE_LIST *list) +{ + FILE_ENTRY *newx = (FILE_ENTRY *)HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles, + list->num_alloc * 2 * sizeof(*newx) ); + list->feFiles = newx; + list->num_alloc *= 2; +} + +/* adds a file to the FILE_ENTRY struct + */ +static void add_file_to_entry(FILE_ENTRY *feFile, LPCWSTR szFile) +{ + DWORD dwLen = lstrlenW(szFile) + 1; + LPCWSTR ptr; + + feFile->szFullPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); + lstrcpyW(feFile->szFullPath, szFile); + + ptr = StrRChrW(szFile, NULL, '\\'); + if (ptr) + { + dwLen = ptr - szFile + 1; + feFile->szDirectory = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); + lstrcpynW(feFile->szDirectory, szFile, dwLen); + + dwLen = lstrlenW(feFile->szFullPath) - dwLen + 1; + feFile->szFilename = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); + lstrcpyW(feFile->szFilename, ptr + 1); /* skip over backslash */ + } + feFile->bFromWildcard = FALSE; +} + +static LPWSTR wildcard_to_file(LPCWSTR szWildCard, LPCWSTR szFileName) +{ + LPCWSTR ptr; + LPWSTR szFullPath; + DWORD dwDirLen, dwFullLen; + + ptr = StrRChrW(szWildCard, NULL, '\\'); + dwDirLen = ptr - szWildCard + 1; + + dwFullLen = dwDirLen + lstrlenW(szFileName) + 1; + szFullPath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dwFullLen * sizeof(WCHAR)); + + lstrcpynW(szFullPath, szWildCard, dwDirLen + 1); + lstrcatW(szFullPath, szFileName); + + return szFullPath; +} + +static void parse_wildcard_files(FILE_LIST *flList, LPCWSTR szFile, LPDWORD pdwListIndex) +{ + WIN32_FIND_DATAW wfd; + HANDLE hFile = FindFirstFileW(szFile, &wfd); + FILE_ENTRY *file; + LPWSTR szFullPath; + BOOL res; + + if (hFile == INVALID_HANDLE_VALUE) return; + + for (res = TRUE; res; res = FindNextFileW(hFile, &wfd)) + { + if (IsDotDir(wfd.cFileName)) continue; + if (*pdwListIndex >= flList->num_alloc) grow_list( flList ); + szFullPath = wildcard_to_file(szFile, wfd.cFileName); + file = &flList->feFiles[(*pdwListIndex)++]; + add_file_to_entry(file, szFullPath); + file->bFromWildcard = TRUE; + file->attributes = wfd.dwFileAttributes; + if (IsAttribDir(file->attributes)) flList->bAnyDirectories = TRUE; + HeapFree(GetProcessHeap(), 0, szFullPath); + } + + FindClose(hFile); +} + +/* takes the null-separated file list and fills out the FILE_LIST */ +static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) +{ + LPCWSTR ptr = szFiles; + WCHAR szCurFile[MAX_PATH]; + DWORD i = 0; + + if (!szFiles) + return ERROR_INVALID_PARAMETER; + + flList->bAnyFromWildcard = FALSE; + flList->bAnyDirectories = FALSE; + flList->bAnyDontExist = FALSE; + flList->num_alloc = 32; + flList->dwNumFiles = 0; + + /* empty list */ + if (!szFiles[0]) + return ERROR_ACCESS_DENIED; + + flList->feFiles = (FILE_ENTRY *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + flList->num_alloc * sizeof(FILE_ENTRY)); + + while (*ptr) + { + if (i >= flList->num_alloc) grow_list( flList ); + + /* change relative to absolute path */ + if (PathIsRelativeW(ptr)) + { + GetCurrentDirectoryW(MAX_PATH, szCurFile); + PathCombineW(szCurFile, szCurFile, ptr); + flList->feFiles[i].bFromRelative = TRUE; + } + else + { + lstrcpyW(szCurFile, ptr); + flList->feFiles[i].bFromRelative = FALSE; + } + + /* parse wildcard files if they are in the filename */ + if (StrPBrkW(szCurFile, wWildcardChars)) + { + parse_wildcard_files(flList, szCurFile, &i); + flList->bAnyFromWildcard = TRUE; + i--; + } + else + { + FILE_ENTRY *file = &flList->feFiles[i]; + add_file_to_entry(file, szCurFile); + file->attributes = GetFileAttributesW( file->szFullPath ); + file->bExists = (file->attributes != INVALID_FILE_ATTRIBUTES); + if (!file->bExists) flList->bAnyDontExist = TRUE; + if (IsAttribDir(file->attributes)) flList->bAnyDirectories = TRUE; + } + + /* advance to the next string */ + ptr += lstrlenW(ptr) + 1; + i++; + } + flList->dwNumFiles = i; + + return S_OK; +} + +/* free the FILE_LIST */ +static void destroy_file_list(FILE_LIST *flList) +{ + DWORD i; + + if (!flList || !flList->feFiles) + return; + + for (i = 0; i < flList->dwNumFiles; i++) + { + HeapFree(GetProcessHeap(), 0, flList->feFiles[i].szDirectory); + HeapFree(GetProcessHeap(), 0, flList->feFiles[i].szFilename); + HeapFree(GetProcessHeap(), 0, flList->feFiles[i].szFullPath); + } + + HeapFree(GetProcessHeap(), 0, flList->feFiles); +} + +static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWSTR szDestPath) +{ + WCHAR szFrom[MAX_PATH], szTo[MAX_PATH]; + SHFILEOPSTRUCTW fileOp; + + static const WCHAR wildCardFiles[] = {'*','.','*',0}; + + if (IsDotDir(feFrom->szFilename)) + return; + + if (PathFileExistsW(szDestPath)) + PathCombineW(szTo, szDestPath, feFrom->szFilename); + else + lstrcpyW(szTo, szDestPath); + + if (!(op->req->fFlags & FOF_NOCONFIRMATION) && PathFileExistsW(szTo)) { + if (!SHELL_ConfirmDialogW(op->req->hwnd, ASK_OVERWRITE_FOLDER, feFrom->szFilename, op)) + { + /* Vista returns an ERROR_CANCELLED even if user pressed "No" */ + if (!op->bManyItems) + op->bCancelled = TRUE; + return; + } + } + + szTo[lstrlenW(szTo) + 1] = '\0'; + SHNotifyCreateDirectoryW(szTo, NULL); + + PathCombineW(szFrom, feFrom->szFullPath, wildCardFiles); + szFrom[lstrlenW(szFrom) + 1] = '\0'; + + fileOp = *op->req; + fileOp.pFrom = szFrom; + fileOp.pTo = szTo; + fileOp.fFlags &= ~FOF_MULTIDESTFILES; /* we know we're copying to one dir */ + + /* Don't ask the user about overwriting files when he accepted to overwrite the + folder. FIXME: this is not exactly what Windows does - e.g. there would be + an additional confirmation for a nested folder */ + fileOp.fFlags |= FOF_NOCONFIRMATION; + + SHFileOperationW(&fileOp); +} + +static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCHAR *szTo) +{ + if (!(op->req->fFlags & FOF_NOCONFIRMATION) && PathFileExistsW(szTo)) + { + if (!SHELL_ConfirmDialogW(op->req->hwnd, ASK_OVERWRITE_FILE, PathFindFileNameW(szTo), op)) + return 0; + } + + return SHNotifyCopyFileW(szFrom, szTo, FALSE) == 0; +} + +/* copy a file or directory to another directory */ +static void copy_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) +{ + if (!PathFileExistsW(feTo->szFullPath)) + SHNotifyCreateDirectoryW(feTo->szFullPath, NULL); + + if (IsAttribFile(feFrom->attributes)) + { + WCHAR szDestPath[MAX_PATH]; + + PathCombineW(szDestPath, feTo->szFullPath, feFrom->szFilename); + copy_file_to_file(op, feFrom->szFullPath, szDestPath); + } + else if (!(op->req->fFlags & FOF_FILESONLY && feFrom->bFromWildcard)) + copy_dir_to_dir(op, feFrom, feTo->szFullPath); +} + +static void create_dest_dirs(LPCWSTR szDestDir) +{ + WCHAR dir[MAX_PATH]; + LPCWSTR ptr = StrChrW(szDestDir, '\\'); + + /* make sure all directories up to last one are created */ + while (ptr && (ptr = StrChrW(ptr + 1, '\\'))) + { + lstrcpynW(dir, szDestDir, ptr - szDestDir + 1); + + if (!PathFileExistsW(dir)) + SHNotifyCreateDirectoryW(dir, NULL); + } + + /* create last directory */ + if (!PathFileExistsW(szDestDir)) + SHNotifyCreateDirectoryW(szDestDir, NULL); +} + +/* the FO_COPY operation */ +static HRESULT copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *flTo) +{ + DWORD i; + const FILE_ENTRY *entryToCopy; + const FILE_ENTRY *fileDest = &flTo->feFiles[0]; + + if (flFrom->bAnyDontExist) + return ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; + + if (flTo->dwNumFiles == 0) + { + /* If the destination is empty, SHFileOperation should use the current directory */ + WCHAR curdir[MAX_PATH+1]; + + GetCurrentDirectoryW(MAX_PATH, curdir); + curdir[lstrlenW(curdir)+1] = 0; + + destroy_file_list(flTo); + ZeroMemory(flTo, sizeof(FILE_LIST)); + parse_file_list(flTo, curdir); + fileDest = &flTo->feFiles[0]; + } + + if (op->req->fFlags & FOF_MULTIDESTFILES) + { + if (flFrom->bAnyFromWildcard) + return ERROR_CANCELLED; + + if (flFrom->dwNumFiles != flTo->dwNumFiles) + { + if (flFrom->dwNumFiles != 1 && !IsAttribDir(fileDest->attributes)) + return ERROR_CANCELLED; + + /* Free all but the first entry. */ + for (i = 1; i < flTo->dwNumFiles; i++) + { + HeapFree(GetProcessHeap(), 0, flTo->feFiles[i].szDirectory); + HeapFree(GetProcessHeap(), 0, flTo->feFiles[i].szFilename); + HeapFree(GetProcessHeap(), 0, flTo->feFiles[i].szFullPath); + } + + flTo->dwNumFiles = 1; + } + else if (IsAttribDir(fileDest->attributes)) + { + for (i = 1; i < flTo->dwNumFiles; i++) + if (!IsAttribDir(flTo->feFiles[i].attributes) || + !IsAttribDir(flFrom->feFiles[i].attributes)) + { + return ERROR_CANCELLED; + } + } + } + else if (flFrom->dwNumFiles != 1) + { + if (flTo->dwNumFiles != 1 && !IsAttribDir(fileDest->attributes)) + return ERROR_CANCELLED; + + if (PathFileExistsW(fileDest->szFullPath) && + IsAttribFile(fileDest->attributes)) + { + return ERROR_CANCELLED; + } + + if (flTo->dwNumFiles == 1 && fileDest->bFromRelative && + !PathFileExistsW(fileDest->szFullPath)) + { + return ERROR_CANCELLED; + } + } + + for (i = 0; i < flFrom->dwNumFiles; i++) + { + entryToCopy = &flFrom->feFiles[i]; + + if ((op->req->fFlags & FOF_MULTIDESTFILES) && + flTo->dwNumFiles > 1) + { + fileDest = &flTo->feFiles[i]; + } + + if (IsAttribDir(entryToCopy->attributes) && + !lstrcmpiW(entryToCopy->szFullPath, fileDest->szDirectory)) + { + return ERROR_SUCCESS; + } + + create_dest_dirs(fileDest->szDirectory); + + if (!lstrcmpiW(entryToCopy->szFullPath, fileDest->szFullPath)) + { + if (IsAttribFile(entryToCopy->attributes)) + return ERROR_NO_MORE_SEARCH_HANDLES; + else + return ERROR_SUCCESS; + } + + if ((flFrom->dwNumFiles > 1 && flTo->dwNumFiles == 1) || + IsAttribDir(fileDest->attributes)) + { + copy_to_dir(op, entryToCopy, fileDest); + } + else if (IsAttribDir(entryToCopy->attributes)) + { + copy_dir_to_dir(op, entryToCopy, fileDest->szFullPath); + } + else + { + if (!copy_file_to_file(op, entryToCopy->szFullPath, fileDest->szFullPath)) + { + op->req->fAnyOperationsAborted = TRUE; + return ERROR_CANCELLED; + } + } + + /* Vista return code. XP would return e.g. ERROR_FILE_NOT_FOUND, ERROR_ALREADY_EXISTS */ + if (op->bCancelled) + return ERROR_CANCELLED; + } + + /* Vista return code. On XP if the used pressed "No" for the last item, + * ERROR_ARENA_TRASHED would be returned */ + return ERROR_SUCCESS; +} + +static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE_LIST *flFrom) +{ + if (flFrom->dwNumFiles > 1) + { + WCHAR tmp[8]; + const WCHAR format[] = {'%','d',0}; + + wnsprintfW(tmp, sizeof(tmp)/sizeof(tmp[0]), format, flFrom->dwNumFiles); + return SHELL_ConfirmDialogW(hWnd, (fTrash?ASK_TRASH_MULTIPLE_ITEM:ASK_DELETE_MULTIPLE_ITEM), tmp, NULL); + } + else + { + const FILE_ENTRY *fileEntry = &flFrom->feFiles[0]; + + if (IsAttribFile(fileEntry->attributes)) + return SHELL_ConfirmDialogW(hWnd, (fTrash?ASK_TRASH_FILE:ASK_DELETE_FILE), fileEntry->szFullPath, NULL); + else if (!(fFlags & FOF_FILESONLY && fileEntry->bFromWildcard)) + return SHELL_ConfirmDialogW(hWnd, (fTrash?ASK_TRASH_FOLDER:ASK_DELETE_FOLDER), fileEntry->szFullPath, NULL); + } + return TRUE; +} + +/* the FO_DELETE operation */ +static HRESULT delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom) +{ + const FILE_ENTRY *fileEntry; + DWORD i; + BOOL bPathExists; + BOOL bTrash; + + if (!flFrom->dwNumFiles) + return ERROR_SUCCESS; + + /* Windows also checks only the first item */ + bTrash = (lpFileOp->fFlags & FOF_ALLOWUNDO) + && TRASH_CanTrashFile(flFrom->feFiles[0].szFullPath); + + if (!(lpFileOp->fFlags & FOF_NOCONFIRMATION) || (!bTrash && lpFileOp->fFlags & FOF_WANTNUKEWARNING)) + if (!confirm_delete_list(lpFileOp->hwnd, lpFileOp->fFlags, bTrash, flFrom)) + { + lpFileOp->fAnyOperationsAborted = TRUE; + return 0; + } + + for (i = 0; i < flFrom->dwNumFiles; i++) + { + bPathExists = TRUE; + fileEntry = &flFrom->feFiles[i]; + + if (!IsAttribFile(fileEntry->attributes) && + (lpFileOp->fFlags & FOF_FILESONLY && fileEntry->bFromWildcard)) + continue; + + if (bTrash) + { + BOOL bDelete; + if (TRASH_TrashFile(fileEntry->szFullPath)) + continue; + + /* Note: Windows silently deletes the file in such a situation, we show a dialog */ + if (!(lpFileOp->fFlags & FOF_NOCONFIRMATION) || (lpFileOp->fFlags & FOF_WANTNUKEWARNING)) + bDelete = SHELL_ConfirmDialogW(lpFileOp->hwnd, ASK_CANT_TRASH_ITEM, fileEntry->szFullPath, NULL); + else + bDelete = TRUE; + + if (!bDelete) + { + lpFileOp->fAnyOperationsAborted = TRUE; + break; + } + } + + /* delete the file or directory */ + if (IsAttribFile(fileEntry->attributes)) + bPathExists = DeleteFileW(fileEntry->szFullPath); + else + bPathExists = SHELL_DeleteDirectoryW(lpFileOp->hwnd, fileEntry->szFullPath, FALSE); + + if (!bPathExists) + return ERROR_PATH_NOT_FOUND; + } + + return ERROR_SUCCESS; +} + +static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, LPCWSTR szDestPath) +{ + WCHAR szFrom[MAX_PATH], szTo[MAX_PATH]; + SHFILEOPSTRUCTW fileOp; + + static const WCHAR wildCardFiles[] = {'*','.','*',0}; + + if (IsDotDir(feFrom->szFilename)) + return; + + SHNotifyCreateDirectoryW(szDestPath, NULL); + + PathCombineW(szFrom, feFrom->szFullPath, wildCardFiles); + szFrom[lstrlenW(szFrom) + 1] = '\0'; + + lstrcpyW(szTo, szDestPath); + szTo[lstrlenW(szDestPath) + 1] = '\0'; + + fileOp = *lpFileOp; + fileOp.pFrom = szFrom; + fileOp.pTo = szTo; + + SHFileOperationW(&fileOp); +} + +/* moves a file or directory to another directory */ +static void move_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) +{ + WCHAR szDestPath[MAX_PATH]; + + PathCombineW(szDestPath, feTo->szFullPath, feFrom->szFilename); + + if (IsAttribFile(feFrom->attributes)) + SHNotifyMoveFileW(feFrom->szFullPath, szDestPath); + else if (!(lpFileOp->fFlags & FOF_FILESONLY && feFrom->bFromWildcard)) + move_dir_to_dir(lpFileOp, feFrom, szDestPath); +} + +/* the FO_MOVE operation */ +static HRESULT move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const FILE_LIST *flTo) +{ + DWORD i; + const FILE_ENTRY *entryToMove; + const FILE_ENTRY *fileDest; + + if (!flFrom->dwNumFiles || !flTo->dwNumFiles) + return ERROR_CANCELLED; + + if (!(lpFileOp->fFlags & FOF_MULTIDESTFILES) && + flTo->dwNumFiles > 1 && flFrom->dwNumFiles > 1) + { + return ERROR_CANCELLED; + } + + if (!(lpFileOp->fFlags & FOF_MULTIDESTFILES) && + !flFrom->bAnyDirectories && + flFrom->dwNumFiles > flTo->dwNumFiles) + { + return ERROR_CANCELLED; + } + + if (!PathFileExistsW(flTo->feFiles[0].szDirectory)) + return ERROR_CANCELLED; + + if ((lpFileOp->fFlags & FOF_MULTIDESTFILES) && + flFrom->dwNumFiles != flTo->dwNumFiles) + { + return ERROR_CANCELLED; + } + + fileDest = &flTo->feFiles[0]; + for (i = 0; i < flFrom->dwNumFiles; i++) + { + entryToMove = &flFrom->feFiles[i]; + + if (lpFileOp->fFlags & FOF_MULTIDESTFILES) + fileDest = &flTo->feFiles[i]; + + if (!PathFileExistsW(fileDest->szDirectory)) + return ERROR_CANCELLED; + + if (fileDest->bExists && IsAttribDir(fileDest->attributes)) + move_to_dir(lpFileOp, entryToMove, fileDest); + else + SHNotifyMoveFileW(entryToMove->szFullPath, fileDest->szFullPath); + } + + return ERROR_SUCCESS; +} + +/* the FO_RENAME files */ +static HRESULT rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const FILE_LIST *flTo) +{ + const FILE_ENTRY *feFrom; + const FILE_ENTRY *feTo; + + if (flFrom->dwNumFiles != 1) + return ERROR_GEN_FAILURE; + + if (flTo->dwNumFiles != 1) + return ERROR_CANCELLED; + + feFrom = &flFrom->feFiles[0]; + feTo= &flTo->feFiles[0]; + + /* fail if destination doesn't exist */ + if (!feFrom->bExists) + return ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; + + /* fail if destination already exists */ + if (feTo->bExists) + return ERROR_ALREADY_EXISTS; + + return SHNotifyMoveFileW(feFrom->szFullPath, feTo->szFullPath); +} + +/* alert the user if an unsupported flag is used */ +static void check_flags(FILEOP_FLAGS fFlags) +{ + WORD wUnsupportedFlags = FOF_NO_CONNECTED_ELEMENTS | + FOF_NOCOPYSECURITYATTRIBS | FOF_NORECURSEREPARSE | + FOF_RENAMEONCOLLISION | FOF_WANTMAPPINGHANDLE; + + if (fFlags & wUnsupportedFlags) + FIXME("Unsupported flags: %04x\n", fFlags); +} + +/************************************************************************* + * SHFileOperationW [SHELL32.@] + * + * See SHFileOperationA + */ +int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) +{ + FILE_OPERATION op; + FILE_LIST flFrom, flTo; + int ret = 0; + + if (!lpFileOp) + return ERROR_INVALID_PARAMETER; + + check_flags(lpFileOp->fFlags); + + ZeroMemory(&flFrom, sizeof(FILE_LIST)); + ZeroMemory(&flTo, sizeof(FILE_LIST)); + + if ((ret = parse_file_list(&flFrom, lpFileOp->pFrom))) + return ret; + + if (lpFileOp->wFunc != FO_DELETE) + parse_file_list(&flTo, lpFileOp->pTo); + + ZeroMemory(&op, sizeof(op)); + op.req = lpFileOp; + op.bManyItems = (flFrom.dwNumFiles > 1); + + switch (lpFileOp->wFunc) + { + case FO_COPY: + ret = copy_files(&op, &flFrom, &flTo); + break; + case FO_DELETE: + ret = delete_files(lpFileOp, &flFrom); + break; + case FO_MOVE: + ret = move_files(lpFileOp, &flFrom, &flTo); + break; + case FO_RENAME: + ret = rename_files(lpFileOp, &flFrom, &flTo); + break; + default: + ret = ERROR_INVALID_PARAMETER; + break; + } + + destroy_file_list(&flFrom); + + if (lpFileOp->wFunc != FO_DELETE) + destroy_file_list(&flTo); + + if (ret == ERROR_CANCELLED) + lpFileOp->fAnyOperationsAborted = TRUE; + + return ret; +} + +#define SHDSA_GetItemCount(hdsa) (*(int*)(hdsa)) + +/************************************************************************* + * SHFreeNameMappings [shell32.246] + * + * Free the mapping handle returned by SHFileOperation if FOF_WANTSMAPPINGHANDLE + * was specified. + * + * PARAMS + * hNameMapping [I] handle to the name mappings used during renaming of files + * + * RETURNS + * Nothing + */ +void WINAPI SHFreeNameMappings(HANDLE hNameMapping) +{ + if (hNameMapping) + { + int i = SHDSA_GetItemCount((HDSA)hNameMapping) - 1; + + for (; i>= 0; i--) + { + LPSHNAMEMAPPINGW lp = (SHNAMEMAPPINGW *)DSA_GetItemPtr((HDSA)hNameMapping, i); + + SHFree(lp->pszOldPath); + SHFree(lp->pszNewPath); + } + DSA_Destroy((HDSA)hNameMapping); + } +} + +/************************************************************************* + * SheGetDirA [SHELL32.@] + * + * drive = 0: returns the current directory path + * drive > 0: returns the current directory path of the specified drive + * drive=1 -> A: drive=2 -> B: ... + * returns 0 if successful +*/ +EXTERN_C DWORD WINAPI SheGetDirA(DWORD drive, LPSTR buffer) +{ + WCHAR org_path[MAX_PATH]; + DWORD ret; + char drv_path[3]; + + /* change current directory to the specified drive */ + if (drive) { + strcpy(drv_path, "A:"); + drv_path[0] += (char)drive-1; + + GetCurrentDirectoryW(MAX_PATH, org_path); + + SetCurrentDirectoryA(drv_path); + } + + /* query current directory path of the specified drive */ + ret = GetCurrentDirectoryA(MAX_PATH, buffer); + + /* back to the original drive */ + if (drive) + SetCurrentDirectoryW(org_path); + + if (!ret) + return GetLastError(); + + return 0; +} + +/************************************************************************* + * SheGetDirW [SHELL32.@] + * + * drive = 0: returns the current directory path + * drive > 0: returns the current directory path of the specified drive + * drive=1 -> A: drive=2 -> B: ... + * returns 0 if successful + */ +EXTERN_C DWORD WINAPI SheGetDirW(DWORD drive, LPWSTR buffer) +{ + WCHAR org_path[MAX_PATH]; + DWORD ret; + char drv_path[3]; + + /* change current directory to the specified drive */ + if (drive) { + strcpy(drv_path, "A:"); + drv_path[0] += (char)drive-1; + + GetCurrentDirectoryW(MAX_PATH, org_path); + + SetCurrentDirectoryA(drv_path); + } + + /* query current directory path of the specified drive */ + ret = GetCurrentDirectoryW(MAX_PATH, buffer); + + /* back to the original drive */ + if (drive) + SetCurrentDirectoryW(org_path); + + if (!ret) + return GetLastError(); + + return 0; +} + +/************************************************************************* + * SheChangeDirA [SHELL32.@] + * + * changes the current directory to the specified path + * and returns 0 if successful + */ +EXTERN_C DWORD WINAPI SheChangeDirA(LPSTR path) +{ + if (SetCurrentDirectoryA(path)) + return 0; + else + return GetLastError(); +} + +/************************************************************************* + * SheChangeDirW [SHELL32.@] + * + * changes the current directory to the specified path + * and returns 0 if successful + */ +EXTERN_C DWORD WINAPI SheChangeDirW(LPWSTR path) +{ + if (SetCurrentDirectoryW(path)) + return 0; + else + return GetLastError(); +} + +/************************************************************************* + * IsNetDrive [SHELL32.66] + */ +EXTERN_C int WINAPI IsNetDrive(int drive) +{ + char root[4]; + strcpy(root, "A:\\"); + root[0] += (char)drive; + return (GetDriveTypeA(root) == DRIVE_REMOTE); +} + + +/************************************************************************* + * RealDriveType [SHELL32.524] + */ +EXTERN_C INT WINAPI RealDriveType(INT drive, BOOL bQueryNet) +{ + char root[] = "A:\\"; + root[0] += (char)drive; + return GetDriveTypeA(root); +} + +/*********************************************************************** + * SHPathPrepareForWriteW (SHELL32.@) + */ +EXTERN_C HRESULT WINAPI SHPathPrepareForWriteW(HWND hwnd, IUnknown *modless, LPCWSTR path, DWORD flags) +{ + DWORD res; + DWORD err; + LPCWSTR realpath; + int len; + WCHAR* last_slash; + WCHAR* temppath=NULL; + + TRACE("%p %p %s 0x%80x\n", hwnd, modless, debugstr_w(path), flags); + + if (flags & ~(SHPPFW_DIRCREATE|SHPPFW_ASKDIRCREATE|SHPPFW_IGNOREFILENAME)) + FIXME("unimplemented flags 0x%08x\n", flags); + + /* cut off filename if necessary */ + if (flags & SHPPFW_IGNOREFILENAME) + { + last_slash = StrRChrW(path, NULL, '\\'); + if (last_slash == NULL) + len = 1; + else + len = last_slash - path + 1; + temppath = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!temppath) + return E_OUTOFMEMORY; + StrCpyNW(temppath, path, len); + realpath = temppath; + } + else + { + realpath = path; + } + + /* try to create the directory if asked to */ + if (flags & (SHPPFW_DIRCREATE|SHPPFW_ASKDIRCREATE)) + { + if (flags & SHPPFW_ASKDIRCREATE) + FIXME("treating SHPPFW_ASKDIRCREATE as SHPPFW_DIRCREATE\n"); + + SHCreateDirectoryExW(0, realpath, NULL); + } + + /* check if we can access the directory */ + res = GetFileAttributesW(realpath); + + HeapFree(GetProcessHeap(), 0, temppath); + + if (res == INVALID_FILE_ATTRIBUTES) + { + err = GetLastError(); + if (err == ERROR_FILE_NOT_FOUND) + return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); + return HRESULT_FROM_WIN32(err); + } + else if (res & FILE_ATTRIBUTE_DIRECTORY) + return S_OK; + else + return HRESULT_FROM_WIN32(ERROR_DIRECTORY); +} + +/*********************************************************************** + * SHPathPrepareForWriteA (SHELL32.@) + */ +EXTERN_C HRESULT WINAPI SHPathPrepareForWriteA(HWND hwnd, IUnknown *modless, LPCSTR path, DWORD flags) +{ + WCHAR wpath[MAX_PATH]; + MultiByteToWideChar( CP_ACP, 0, path, -1, wpath, MAX_PATH); + return SHPathPrepareForWriteW(hwnd, modless, wpath, flags); +} diff --git a/dll/win32/shell32_new/shlfolder.cpp b/dll/win32/shell32_new/shlfolder.cpp new file mode 100644 index 00000000000..cb6fce5c48d --- /dev/null +++ b/dll/win32/shell32_new/shlfolder.cpp @@ -0,0 +1,564 @@ +/* + * Shell Folder stuff + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * IShellFolder2 and related interfaces + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +static const WCHAR wszDotShellClassInfo[] = { + '.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0}; + +/*************************************************************************** + * SHELL32_GetCustomFolderAttribute (internal function) + * + * Gets a value from the folder's desktop.ini file, if one exists. + * + * PARAMETERS + * pidl [I] Folder containing the desktop.ini file. + * pwszHeading [I] Heading in .ini file. + * pwszAttribute [I] Attribute in .ini file. + * pwszValue [O] Buffer to store value into. + * cchValue [I] Size in characters including NULL of buffer pointed to + * by pwszValue. + * + * RETURNS + * TRUE if returned non-NULL value. + * FALSE otherwise. + */ +static BOOL __inline SHELL32_GetCustomFolderAttributeFromPath( + LPWSTR pwszFolderPath, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, + LPWSTR pwszValue, DWORD cchValue) +{ + static const WCHAR wszDesktopIni[] = + {'d','e','s','k','t','o','p','.','i','n','i',0}; + static const WCHAR wszDefault[] = {0}; + + PathAddBackslashW(pwszFolderPath); + PathAppendW(pwszFolderPath, wszDesktopIni); + return GetPrivateProfileStringW(pwszHeading, pwszAttribute, wszDefault, + pwszValue, cchValue, pwszFolderPath); +} + +BOOL SHELL32_GetCustomFolderAttribute( + LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, + LPWSTR pwszValue, DWORD cchValue) +{ + DWORD dwAttrib = FILE_ATTRIBUTE_SYSTEM; + WCHAR wszFolderPath[MAX_PATH]; + + /* Hack around not having system attribute on non-Windows file systems */ + if (0) + dwAttrib = _ILGetFileAttributes(pidl, NULL, 0); + + if (dwAttrib & FILE_ATTRIBUTE_SYSTEM) + { + if (!SHGetPathFromIDListW(pidl, wszFolderPath)) + return FALSE; + + return SHELL32_GetCustomFolderAttributeFromPath(wszFolderPath, pwszHeading, + pwszAttribute, pwszValue, cchValue); + } + return FALSE; +} + +/*************************************************************************** + * GetNextElement (internal function) + * + * Gets a part of a string till the first backslash. + * + * PARAMETERS + * pszNext [IN] string to get the element from + * pszOut [IN] pointer to buffer which receives string + * dwOut [IN] length of pszOut + * + * RETURNS + * LPSTR pointer to first, not yet parsed char + */ + +LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut) +{ + LPCWSTR pszTail = pszNext; + DWORD dwCopy; + + TRACE ("(%s %p 0x%08x)\n", debugstr_w (pszNext), pszOut, dwOut); + + *pszOut = 0x0000; + + if (!pszNext || !*pszNext) + return NULL; + + while (*pszTail && (*pszTail != (WCHAR) '\\')) + pszTail++; + + dwCopy = pszTail - pszNext + 1; + lstrcpynW (pszOut, pszNext, (dwOut < dwCopy) ? dwOut : dwCopy); + + if (*pszTail) + pszTail++; + else + pszTail = NULL; + + TRACE ("--(%s %s 0x%08x %p)\n", debugstr_w (pszNext), debugstr_w (pszOut), dwOut, pszTail); + return pszTail; +} + +HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, + LPITEMIDLIST * pidlInOut, LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes) +{ + HRESULT hr = E_INVALIDARG; + LPITEMIDLIST pidlOut = NULL, + pidlTemp = NULL; + IShellFolder *psfChild; + + TRACE ("(%p, %p, %p, %s)\n", psf, pbc, pidlInOut ? *pidlInOut : NULL, debugstr_w (szNext)); + + /* get the shellfolder for the child pidl and let it analyse further */ + hr = psf->BindToObject(*pidlInOut, pbc, IID_IShellFolder, (LPVOID *)&psfChild); + + if (SUCCEEDED(hr)) { + hr = psfChild->ParseDisplayName(hwndOwner, pbc, szNext, pEaten, &pidlOut, pdwAttributes); + psfChild->Release(); + + if (SUCCEEDED(hr)) { + pidlTemp = ILCombine (*pidlInOut, pidlOut); + + if (!pidlTemp) + hr = E_OUTOFMEMORY; + } + + if (pidlOut) + ILFree (pidlOut); + } + + ILFree (*pidlInOut); + *pidlInOut = pidlTemp; + + TRACE ("-- pidl=%p ret=0x%08x\n", pidlInOut ? *pidlInOut : NULL, hr); + return hr; +} + +/*********************************************************************** + * SHELL32_CoCreateInitSF + * + * Creates a shell folder and initializes it with a pidl and a root folder + * via IPersistFolder3 or IPersistFolder. + * + * NOTES + * pathRoot can be NULL for Folders being a drive. + * In this case the absolute path is built from pidlChild (eg. C:) + */ +static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot, + LPCITEMIDLIST pidlChild, REFCLSID clsid, LPVOID * ppvOut) +{ + HRESULT hr; + + TRACE ("%p %s %p\n", pidlRoot, debugstr_w(pathRoot), pidlChild); + + hr = SHCoCreateInstance(NULL, &clsid, NULL, IID_IShellFolder, ppvOut); + if (SUCCEEDED (hr)) + { + LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild); + IPersistFolder *pPF; + IPersistFolder3 *ppf; + + if (_ILIsFolder(pidlChild) && + SUCCEEDED (((IUnknown *)(*ppvOut))->QueryInterface(IID_IPersistFolder3, (LPVOID *) & ppf))) + { + PERSIST_FOLDER_TARGET_INFO ppfti; + + ZeroMemory (&ppfti, sizeof (ppfti)); + + /* fill the PERSIST_FOLDER_TARGET_INFO */ + ppfti.dwAttributes = -1; + ppfti.csidl = -1; + + /* build path */ + if (pathRoot) { + lstrcpynW (ppfti.szTargetParsingName, pathRoot, MAX_PATH - 1); + PathAddBackslashW(ppfti.szTargetParsingName); /* FIXME: why have drives a backslash here ? */ + } + + if (pidlChild) { + int len = wcslen(ppfti.szTargetParsingName); + + if (!_ILSimpleGetTextW(pidlChild, ppfti.szTargetParsingName + len, MAX_PATH - len)) + hr = E_INVALIDARG; + } + + ppf->InitializeEx(NULL, pidlAbsolute, &ppfti); + ppf->Release(); + } + else if (SUCCEEDED ((hr = ((IUnknown *)(*ppvOut))->QueryInterface (IID_IPersistFolder, (LPVOID *) & pPF)))) { + pPF->Initialize(pidlAbsolute); + pPF->Release(); + } + ILFree (pidlAbsolute); + } + TRACE ("-- (%p) ret=0x%08x\n", *ppvOut, hr); + return hr; +} + +/*********************************************************************** + * SHELL32_BindToChild [Internal] + * + * Common code for IShellFolder_BindToObject. + * + * PARAMS + * pidlRoot [I] The parent shell folder's absolute pidl. + * pathRoot [I] Absolute dos path of the parent shell folder. + * pidlComplete [I] PIDL of the child. Relative to pidlRoot. + * riid [I] GUID of the interface, which ppvOut shall be bound to. + * ppvOut [O] A reference to the child's interface (riid). + * + * NOTES + * pidlComplete has to contain at least one non empty SHITEMID. + * This function makes special assumptions on the shell namespace, which + * means you probably can't use it for your IShellFolder implementation. + */ +HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, + LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) +{ + GUID const *clsid; + IShellFolder *pSF; + HRESULT hr; + LPITEMIDLIST pidlChild; + + if (!pidlRoot || !ppvOut || !pidlComplete || !pidlComplete->mkid.cb) + return E_INVALIDARG; + + *ppvOut = NULL; + + pidlChild = ILCloneFirst (pidlComplete); + + if ((clsid = _ILGetGUIDPointer (pidlChild))) { + /* virtual folder */ + hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, *clsid, (LPVOID *)&pSF); + } else { + /* file system folder */ + CLSID clsidFolder = CLSID_ShellFSFolder; + static const WCHAR wszCLSID[] = {'C','L','S','I','D',0}; + WCHAR wszCLSIDValue[CHARS_IN_GUID], wszFolderPath[MAX_PATH], *pwszPathTail = wszFolderPath; + + /* see if folder CLSID should be overridden by desktop.ini file */ + if (pathRoot) { + lstrcpynW(wszFolderPath, pathRoot, MAX_PATH); + pwszPathTail = PathAddBackslashW(wszFolderPath); + } + + _ILSimpleGetTextW(pidlChild,pwszPathTail,MAX_PATH - (int)(pwszPathTail - wszFolderPath)); + + if (SHELL32_GetCustomFolderAttributeFromPath (wszFolderPath, + wszDotShellClassInfo, wszCLSID, wszCLSIDValue, CHARS_IN_GUID)) + CLSIDFromString (wszCLSIDValue, &clsidFolder); + + hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, + clsidFolder, (LPVOID *)&pSF); + } + ILFree (pidlChild); + + if (SUCCEEDED (hr)) { + if (_ILIsPidlSimple (pidlComplete)) { + /* no sub folders */ + hr = pSF->QueryInterface(riid, ppvOut); + } else { + /* go deeper */ + hr = pSF->BindToObject(ILGetNext (pidlComplete), NULL, riid, ppvOut); + } + pSF->Release(); + } + + TRACE ("-- returning (%p) %08x\n", *ppvOut, hr); + + return hr; +} + +/*********************************************************************** + * SHELL32_GetDisplayNameOfChild + * + * Retrieves the display name of a child object of a shellfolder. + * + * For a pidl eg. [subpidl1][subpidl2][subpidl3]: + * - it binds to the child shellfolder [subpidl1] + * - asks it for the displayname of [subpidl2][subpidl3] + * + * Is possible the pidl is a simple pidl. In this case it asks the + * subfolder for the displayname of an empty pidl. The subfolder + * returns the own displayname eg. "::{guid}". This is used for + * virtual folders with the registry key WantsFORPARSING set. + */ +HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, + LPCITEMIDLIST pidl, DWORD dwFlags, LPWSTR szOut, DWORD dwOutLen) +{ + LPITEMIDLIST pidlFirst; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(pidl=%p 0x%08x %p 0x%08x)\n", psf, pidl, dwFlags, szOut, dwOutLen); + pdump (pidl); + + pidlFirst = ILCloneFirst (pidl); + if (pidlFirst) { + IShellFolder2 *psfChild; + + hr = psf->BindToObject(pidlFirst, NULL, IID_IShellFolder, (LPVOID *) & psfChild); + if (SUCCEEDED (hr)) { + STRRET strTemp; + LPITEMIDLIST pidlNext = ILGetNext (pidl); + + hr = psfChild->GetDisplayNameOf(pidlNext, dwFlags, &strTemp); + if (SUCCEEDED (hr)) { + if(!StrRetToStrNW (szOut, dwOutLen, &strTemp, pidlNext)) + hr = E_FAIL; + } + psfChild->Release(); + } + ILFree (pidlFirst); + } else + hr = E_OUTOFMEMORY; + + TRACE ("-- ret=0x%08x %s\n", hr, debugstr_w(szOut)); + + return hr; +} + +/*********************************************************************** + * SHELL32_GetItemAttributes + * + * NOTES + * Observed values: + * folder: 0xE0000177 FILESYSTEM | HASSUBFOLDER | FOLDER + * file: 0x40000177 FILESYSTEM + * drive: 0xf0000144 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR + * mycomputer: 0xb0000154 HASSUBFOLDER | FOLDER | FILESYSANCESTOR + * (seems to be default for shell extensions if no registry entry exists) + * + * win2k: + * folder: 0xF0400177 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR | CANMONIKER + * file: 0x40400177 FILESYSTEM | CANMONIKER + * drive 0xF0400154 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR | CANMONIKER | CANRENAME (LABEL) + * + * According to the MSDN documentation this function should not set flags. It claims only to reset flags when necessary. + * However it turns out the native shell32.dll _sets_ flags in several cases - so do we. + */ +HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes) +{ + DWORD dwAttributes; + BOOL has_guid; + static const DWORD dwSupportedAttr= + SFGAO_CANCOPY | /*0x00000001 */ + SFGAO_CANMOVE | /*0x00000002 */ + SFGAO_CANLINK | /*0x00000004 */ + SFGAO_CANRENAME | /*0x00000010 */ + SFGAO_CANDELETE | /*0x00000020 */ + SFGAO_HASPROPSHEET | /*0x00000040 */ + SFGAO_DROPTARGET | /*0x00000100 */ + SFGAO_LINK | /*0x00010000 */ + SFGAO_READONLY | /*0x00040000 */ + SFGAO_HIDDEN | /*0x00080000 */ + SFGAO_FILESYSANCESTOR | /*0x10000000 */ + SFGAO_FOLDER | /*0x20000000 */ + SFGAO_FILESYSTEM | /*0x40000000 */ + SFGAO_HASSUBFOLDER; /*0x80000000 */ + + TRACE ("0x%08x\n", *pdwAttributes); + + if (*pdwAttributes & ~dwSupportedAttr) + { + WARN ("attributes 0x%08x not implemented\n", (*pdwAttributes & ~dwSupportedAttr)); + *pdwAttributes &= dwSupportedAttr; + } + + has_guid = _ILGetGUIDPointer(pidl) != NULL; + + dwAttributes = *pdwAttributes; + + if (_ILIsDrive (pidl)) { + *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR| + SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME; + } else if (has_guid && HCR_GetFolderAttributes(pidl, &dwAttributes)) { + *pdwAttributes = dwAttributes; + } else if (_ILGetDataPointer (pidl)) { + dwAttributes = _ILGetFileAttributes (pidl, NULL, 0); + + if (!dwAttributes && has_guid) { + WCHAR path[MAX_PATH]; + STRRET strret; + + /* File attributes are not present in the internal PIDL structure, so get them from the file system. */ + + HRESULT hr = psf->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strret); + + if (SUCCEEDED(hr)) { + hr = StrRetToBufW(&strret, pidl, path, MAX_PATH); + + /* call GetFileAttributes() only for file system paths, not for parsing names like "::{...}" */ + if (SUCCEEDED(hr) && path[0]!=':') + dwAttributes = GetFileAttributesW(path); + } + } + + /* Set common attributes */ + *pdwAttributes |= SFGAO_FILESYSTEM | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANDELETE | + SFGAO_CANRENAME | SFGAO_CANLINK | SFGAO_CANMOVE | SFGAO_CANCOPY; + + if (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + *pdwAttributes |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR); + *pdwAttributes &= ~SFGAO_CANLINK; + } + else + *pdwAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR); + + if (dwAttributes & FILE_ATTRIBUTE_HIDDEN) + *pdwAttributes |= SFGAO_HIDDEN; + else + *pdwAttributes &= ~SFGAO_HIDDEN; + + if (dwAttributes & FILE_ATTRIBUTE_READONLY) + *pdwAttributes |= SFGAO_READONLY; + else + *pdwAttributes &= ~SFGAO_READONLY; + + if (SFGAO_LINK & *pdwAttributes) { + char ext[MAX_PATH]; + + if (!_ILGetExtension(pidl, ext, MAX_PATH) || lstrcmpiA(ext, "lnk")) + *pdwAttributes &= ~SFGAO_LINK; + } + + if (SFGAO_HASSUBFOLDER & *pdwAttributes) + { + IShellFolder *psf2; + if (SUCCEEDED(psf->BindToObject(pidl, 0, IID_IShellFolder, (LPVOID *)&psf2))) + { + IEnumIDList *pEnumIL = NULL; + if (SUCCEEDED(psf2->EnumObjects(0, SHCONTF_FOLDERS, &pEnumIL))) + { + if (pEnumIL->Skip(1) != S_OK) + *pdwAttributes &= ~SFGAO_HASSUBFOLDER; + pEnumIL->Release(); + } + psf2->Release(); + } + } + } else { + *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; + } + TRACE ("-- 0x%08x\n", *pdwAttributes); + return S_OK; +} + +/*********************************************************************** + * SHELL32_CompareIDs + */ +HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int type1, + type2; + char szTemp1[MAX_PATH]; + char szTemp2[MAX_PATH]; + HRESULT nReturn; + LPITEMIDLIST firstpidl, + nextpidl1, + nextpidl2; + IShellFolder *psf; + + /* test for empty pidls */ + BOOL isEmpty1 = _ILIsDesktop (pidl1); + BOOL isEmpty2 = _ILIsDesktop (pidl2); + + if (isEmpty1 && isEmpty2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); + if (isEmpty1) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + if (isEmpty2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + + /* test for different types. Sort order is the PT_* constant */ + type1 = _ILGetDataPointer (pidl1)->type; + type2 = _ILGetDataPointer (pidl2)->type; + if (type1 < type2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + else if (type1 > type2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + + /* test for name of pidl */ + _ILSimpleGetText (pidl1, szTemp1, MAX_PATH); + _ILSimpleGetText (pidl2, szTemp2, MAX_PATH); + nReturn = lstrcmpiA (szTemp1, szTemp2); + if (nReturn < 0) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + else if (nReturn > 0) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + + /* test of complex pidls */ + firstpidl = ILCloneFirst (pidl1); + nextpidl1 = ILGetNext (pidl1); + nextpidl2 = ILGetNext (pidl2); + + /* optimizing: test special cases and bind not deeper */ + /* the deeper shellfolder would do the same */ + isEmpty1 = _ILIsDesktop (nextpidl1); + isEmpty2 = _ILIsDesktop (nextpidl2); + + if (isEmpty1 && isEmpty2) { + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); + } else if (isEmpty1) { + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + } else if (isEmpty2) { + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + /* optimizing end */ + } else if (SUCCEEDED (iface->BindToObject(firstpidl, NULL, IID_IShellFolder, (LPVOID *)&psf))) { + nReturn = psf->CompareIDs(lParam, nextpidl1, nextpidl2); + psf->Release(); + } + ILFree (firstpidl); + return nReturn; +} + +/*********************************************************************** + * SHCreateLinks + * + * Undocumented. + */ +HRESULT WINAPI SHCreateLinks( HWND hWnd, LPCSTR lpszDir, LPDATAOBJECT lpDataObject, + UINT uFlags, LPITEMIDLIST *lppidlLinks) +{ + FIXME("%p %s %p %08x %p\n",hWnd,lpszDir,lpDataObject,uFlags,lppidlLinks); + return E_NOTIMPL; +} + +/*********************************************************************** + * SHOpenFolderAndSelectItems + * + * Unimplemented. + */ +EXTERN_C HRESULT +WINAPI +SHOpenFolderAndSelectItems(LPITEMIDLIST pidlFolder, + UINT cidl, + PCUITEMID_CHILD_ARRAY apidl, + DWORD dwFlags) +{ + FIXME("SHOpenFolderAndSelectItems() stub\n"); + return E_NOTIMPL; +} diff --git a/dll/win32/shell32_new/shlfsbind.cpp b/dll/win32/shell32_new/shlfsbind.cpp new file mode 100644 index 00000000000..6cd898531b8 --- /dev/null +++ b/dll/win32/shell32_new/shlfsbind.cpp @@ -0,0 +1,168 @@ +/* + * File System Bind Data object to use as parameter for the bind context to + * IShellFolder_ParseDisplayName + * + * Copyright 2003 Rolf Kalbermatter + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include +#include +#include +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(pidl); + +/*********************************************************************** + * IFileSystemBindData implementation + */ +class IFileSystemBindDataImpl : + public CComObjectRootEx, + public IFileSystemBindData +{ +private: + WIN32_FIND_DATAW findFile; +public: + IFileSystemBindDataImpl(); + ~IFileSystemBindDataImpl(); + + // *** IFileSystemBindData methods *** + virtual HRESULT STDMETHODCALLTYPE SetFindData(const WIN32_FIND_DATAW *pfd); + virtual HRESULT STDMETHODCALLTYPE GetFindData(WIN32_FIND_DATAW *pfd); + +DECLARE_NOT_AGGREGATABLE(IFileSystemBindDataImpl) +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(IFileSystemBindDataImpl) + COM_INTERFACE_ENTRY_IID(IID_IFileSystemBindData, IFileSystemBindData) +END_COM_MAP() +}; + +static const WCHAR wFileSystemBindData[] = { + 'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d','D','a','t','a',0}; + +HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV) +{ + CComPtr fileSystemBindData; + CComPtr bindContext; + BIND_OPTS bindOpts; + HRESULT hResult; + + TRACE("%p, %p\n", pfd, ppV); + + if (ppV == NULL) + return E_INVALIDARG; + + *ppV = NULL; + + hResult = IFileSystemBindDataImpl::_CreatorClass::CreateInstance(NULL, IID_IFileSystemBindData, (void **)&fileSystemBindData); + if (FAILED(hResult)) + return hResult; + hResult = fileSystemBindData->SetFindData(pfd); + if (FAILED(hResult)) + return hResult; + + hResult = CreateBindCtx(0, &bindContext); + if (FAILED(hResult)) + return hResult; + bindOpts.cbStruct = sizeof(BIND_OPTS); + bindOpts.grfFlags = 0; + bindOpts.grfMode = STGM_CREATE; + bindOpts.dwTickCountDeadline = 0; + hResult = bindContext->SetBindOptions(&bindOpts); + if (FAILED(hResult)) + return hResult; + hResult = bindContext->RegisterObjectParam((LPOLESTR)wFileSystemBindData, fileSystemBindData); + if (FAILED(hResult)) + return hResult; + + *ppV = bindContext.Detach(); + + return S_OK; +} + +HRESULT WINAPI FileSystemBindData_GetFindData(LPBC pbc, WIN32_FIND_DATAW *pfd) +{ + CComPtr pUnk; + CComPtr pfsbd; + HRESULT ret; + + TRACE("%p, %p\n", pbc, pfd); + + if (!pfd) + return E_INVALIDARG; + + ret = pbc->GetObjectParam((LPOLESTR)wFileSystemBindData, &pUnk); + if (SUCCEEDED(ret)) + { + ret = pUnk->QueryInterface(IID_IFileSystemBindData, (LPVOID *)&pfsbd); + if (SUCCEEDED(ret)) + ret = pfsbd->GetFindData(pfd); + } + return ret; +} + +HRESULT WINAPI FileSystemBindData_SetFindData(LPBC pbc, const WIN32_FIND_DATAW *pfd) +{ + CComPtr pUnk; + CComPtr pfsbd; + HRESULT ret; + + TRACE("%p, %p\n", pbc, pfd); + + ret = pbc->GetObjectParam((LPOLESTR)wFileSystemBindData, &pUnk); + if (SUCCEEDED(ret)) + { + ret = pUnk->QueryInterface(IID_IFileSystemBindData, (LPVOID *)&pfsbd); + if (SUCCEEDED(ret)) + ret = pfsbd->SetFindData(pfd); + } + return ret; +} + +IFileSystemBindDataImpl::IFileSystemBindDataImpl() +{ + memset(&findFile, 0, sizeof(WIN32_FIND_DATAW)); +} + +IFileSystemBindDataImpl::~IFileSystemBindDataImpl() +{ + TRACE(" destroying ISFBindPidl(%p)\n", this); +} + +HRESULT WINAPI IFileSystemBindDataImpl::GetFindData(WIN32_FIND_DATAW *pfd) +{ + TRACE("(%p), %p\n", this, pfd); + + if (!pfd) + return E_INVALIDARG; + + memcpy(pfd, &findFile, sizeof(WIN32_FIND_DATAW)); + return NOERROR; +} + +HRESULT WINAPI IFileSystemBindDataImpl::SetFindData(const WIN32_FIND_DATAW *pfd) +{ + TRACE("(%p), %p\n", this, pfd); + + if (pfd) + memcpy(&findFile, pfd, sizeof(WIN32_FIND_DATAW)); + else + memset(&findFile, 0, sizeof(WIN32_FIND_DATAW)); + return NOERROR; +} diff --git a/dll/win32/shell32_new/shlmenu.cpp b/dll/win32/shell32_new/shlmenu.cpp new file mode 100644 index 00000000000..63abcb7b862 --- /dev/null +++ b/dll/win32/shell32_new/shlmenu.cpp @@ -0,0 +1,982 @@ +/* + * see www.geocities.com/SiliconValley/4942/filemenu.html + * + * Copyright 1999, 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#ifdef FM_SEPARATOR +#undef FM_SEPARATOR +#endif +#define FM_SEPARATOR (LPCWSTR)1 + +static BOOL FileMenu_AppendItemW(HMENU hMenu, LPCWSTR lpText, UINT uID, int icon, + HMENU hMenuPopup, int nItemHeight); + +typedef struct +{ + BOOL bInitialized; + BOOL bFixedItems; + /* create */ + COLORREF crBorderColor; + int nBorderWidth; + HBITMAP hBorderBmp; + + /* insert using pidl */ + LPITEMIDLIST pidl; + UINT uID; + UINT uFlags; + UINT uEnumFlags; + LPFNFMCALLBACK lpfnCallback; +} FMINFO, *LPFMINFO; + +typedef struct +{ int cchItemText; + int iIconIndex; + HMENU hMenu; + WCHAR szItemText[1]; +} FMITEM, * LPFMITEM; + +static BOOL bAbortInit; + +#define CCH_MAXITEMTEXT 256 + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +static LPFMINFO FM_GetMenuInfo(HMENU hmenu) +{ + MENUINFO MenuInfo; + LPFMINFO menudata; + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + + if (! GetMenuInfo(hmenu, &MenuInfo)) + return NULL; + + menudata = (LPFMINFO)MenuInfo.dwMenuData; + + if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) + { + ERR("menudata corrupt: %p %u\n", menudata, MenuInfo.cbSize); + return 0; + } + + return menudata; + +} +/************************************************************************* + * FM_SetMenuParameter [internal] + * + */ +static LPFMINFO FM_SetMenuParameter( + HMENU hmenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + LPFMINFO menudata; + + TRACE("\n"); + + menudata = FM_GetMenuInfo(hmenu); + + SHFree(menudata->pidl); + + menudata->uID = uID; + menudata->pidl = ILClone(pidl); + menudata->uFlags = uFlags; + menudata->uEnumFlags = uEnumFlags; + menudata->lpfnCallback = lpfnCallback; + + return menudata; +} + +/************************************************************************* + * FM_InitMenuPopup [internal] + * + */ +static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) +{ IShellFolder *lpsf, *lpsf2; + ULONG ulItemAttr = SFGAO_FOLDER; + UINT uID, uEnumFlags; + LPFNFMCALLBACK lpfnCallback; + LPCITEMIDLIST pidl; + WCHAR sTemp[MAX_PATH]; + int NumberOfItems = 0, iIcon; + MENUINFO MenuInfo; + LPFMINFO menudata; + + TRACE("%p %p\n", hmenu, pAlternatePidl); + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + + if (! GetMenuInfo(hmenu, &MenuInfo)) + return FALSE; + + menudata = (LPFMINFO)MenuInfo.dwMenuData; + + if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) + { + ERR("menudata corrupt: %p %u\n", menudata, MenuInfo.cbSize); + return 0; + } + + if (menudata->bInitialized) + return 0; + + pidl = (pAlternatePidl? pAlternatePidl: menudata->pidl); + if (!pidl) + return 0; + + uID = menudata->uID; + uEnumFlags = menudata->uEnumFlags; + lpfnCallback = menudata->lpfnCallback; + menudata->bInitialized = FALSE; + + SetMenuInfo(hmenu, &MenuInfo); + + if (SUCCEEDED (SHGetDesktopFolder(&lpsf))) + { + if (SUCCEEDED(lpsf->BindToObject(pidl, 0, IID_IShellFolder, (LPVOID *)&lpsf2))) + { + IEnumIDList *lpe = NULL; + + if (SUCCEEDED (lpsf2->EnumObjects(0, uEnumFlags, &lpe ))) + { + + LPITEMIDLIST pidlTemp = NULL; + ULONG ulFetched; + + while ((!bAbortInit) && (NOERROR == lpe->Next(1,&pidlTemp,&ulFetched))) + { + if (SUCCEEDED (lpsf->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlTemp, &ulItemAttr))) + { + ILGetDisplayNameExW(NULL, pidlTemp, sTemp, ILGDN_FORPARSING); + if (! (PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon))) + iIcon = FM_BLANK_ICON; + if ( SFGAO_FOLDER & ulItemAttr) + { + LPFMINFO lpFmMi; + MENUINFO MenuInfo; + HMENU hMenuPopup = CreatePopupMenu(); + + lpFmMi = (LPFMINFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FMINFO)); + + lpFmMi->pidl = ILCombine(pidl, pidlTemp); + lpFmMi->uEnumFlags = SHCONTF_FOLDERS | SHCONTF_NONFOLDERS; + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + MenuInfo.dwMenuData = (ULONG_PTR) lpFmMi; + SetMenuInfo (hMenuPopup, &MenuInfo); + + FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, hMenuPopup, FM_DEFAULT_HEIGHT); + } + else + { + LPWSTR pExt = PathFindExtensionW(sTemp); + if (pExt) + *pExt = 0; + FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, 0, FM_DEFAULT_HEIGHT); + } + } + + if (lpfnCallback) + { + TRACE("enter callback\n"); + lpfnCallback ( pidl, pidlTemp); + TRACE("leave callback\n"); + } + + NumberOfItems++; + } + lpe->Release(); + } + lpsf2->Release(); + } + lpsf->Release(); + } + + if ( GetMenuItemCount (hmenu) == 0 ) + { + static const WCHAR szEmpty[] = { '(','e','m','p','t','y',')',0 }; + FileMenu_AppendItemW (hmenu, szEmpty, uID, FM_BLANK_ICON, 0, FM_DEFAULT_HEIGHT); + NumberOfItems++; + } + + menudata->bInitialized = TRUE; + SetMenuInfo(hmenu, &MenuInfo); + + return NumberOfItems; +} +/************************************************************************* + * FileMenu_Create [SHELL32.114] + * + * NOTES + * for non-root menus values are + * (ffffffff,00000000,00000000,00000000,00000000) + */ +HMENU WINAPI FileMenu_Create ( + COLORREF crBorderColor, + int nBorderWidth, + HBITMAP hBorderBmp, + int nSelHeight, + UINT uFlags) +{ + MENUINFO MenuInfo; + LPFMINFO menudata; + + HMENU hMenu = CreatePopupMenu(); + + TRACE("0x%08x 0x%08x %p 0x%08x 0x%08x hMenu=%p\n", + crBorderColor, nBorderWidth, hBorderBmp, nSelHeight, uFlags, hMenu); + + menudata = (LPFMINFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FMINFO)); + menudata->crBorderColor = crBorderColor; + menudata->nBorderWidth = nBorderWidth; + menudata->hBorderBmp = hBorderBmp; + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + MenuInfo.dwMenuData = (ULONG_PTR) menudata; + SetMenuInfo (hMenu, &MenuInfo); + + return hMenu; +} + +/************************************************************************* + * FileMenu_Destroy [SHELL32.118] + * + * NOTES + * exported by name + */ +void WINAPI FileMenu_Destroy (HMENU hmenu) +{ + LPFMINFO menudata; + + TRACE("%p\n", hmenu); + + FileMenu_DeleteAllItems (hmenu); + + menudata = FM_GetMenuInfo(hmenu); + + SHFree( menudata->pidl); + HeapFree(GetProcessHeap(), 0, menudata); + + DestroyMenu (hmenu); +} + +/************************************************************************* + * FileMenu_AppendItem [SHELL32.115] + * + */ +static BOOL FileMenu_AppendItemW( + HMENU hMenu, + LPCWSTR lpText, + UINT uID, + int icon, + HMENU hMenuPopup, + int nItemHeight) +{ + MENUITEMINFOW mii; + LPFMITEM myItem; + LPFMINFO menudata; + MENUINFO MenuInfo; + + + TRACE("%p %s 0x%08x 0x%08x %p 0x%08x\n", + hMenu, (lpText!=FM_SEPARATOR) ? debugstr_w(lpText) : NULL, + uID, icon, hMenuPopup, nItemHeight); + + ZeroMemory (&mii, sizeof(MENUITEMINFOW)); + + mii.cbSize = sizeof(MENUITEMINFOW); + + if (lpText != FM_SEPARATOR) + { + int len = strlenW (lpText); + myItem = (LPFMITEM)SHAlloc(sizeof(FMITEM) + len*sizeof(WCHAR)); + wcscpy (myItem->szItemText, lpText); + myItem->cchItemText = len; + myItem->iIconIndex = icon; + myItem->hMenu = hMenu; + mii.fMask = MIIM_DATA; + mii.dwItemData = (ULONG_PTR) myItem; + } + + if ( hMenuPopup ) + { /* sub menu */ + mii.fMask |= MIIM_TYPE | MIIM_SUBMENU; + mii.fType = MFT_OWNERDRAW; + mii.hSubMenu = hMenuPopup; + } + else if (lpText == FM_SEPARATOR ) + { mii.fMask |= MIIM_ID | MIIM_TYPE; + mii.fType = MFT_SEPARATOR; + } + else + { /* normal item */ + mii.fMask |= MIIM_ID | MIIM_TYPE | MIIM_STATE; + mii.fState = MFS_ENABLED | MFS_DEFAULT; + mii.fType = MFT_OWNERDRAW; + } + mii.wID = uID; + + InsertMenuItemW (hMenu, (UINT)-1, TRUE, &mii); + + /* set bFixedItems to true */ + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + + if (! GetMenuInfo(hMenu, &MenuInfo)) + return FALSE; + + menudata = (LPFMINFO)MenuInfo.dwMenuData; + if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) + { + ERR("menudata corrupt: %p %u\n", menudata, MenuInfo.cbSize); + return 0; + } + + menudata->bFixedItems = TRUE; + SetMenuInfo(hMenu, &MenuInfo); + + return TRUE; + +} + +/**********************************************************************/ + +EXTERN_C BOOL WINAPI FileMenu_AppendItemAW( + HMENU hMenu, + LPCVOID lpText, + UINT uID, + int icon, + HMENU hMenuPopup, + int nItemHeight) +{ + BOOL ret; + + if (!lpText) return FALSE; + + if (SHELL_OsIsUnicode() || lpText == FM_SEPARATOR) + ret = FileMenu_AppendItemW(hMenu, (LPWSTR)lpText, uID, icon, hMenuPopup, nItemHeight); + else + { + DWORD len = MultiByteToWideChar( CP_ACP, 0, (LPSTR)lpText, -1, NULL, 0 ); + LPWSTR lpszText = (LPWSTR)HeapAlloc ( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + if (!lpszText) return FALSE; + MultiByteToWideChar( CP_ACP, 0, (LPSTR)lpText, -1, lpszText, len ); + ret = FileMenu_AppendItemW(hMenu, lpszText, uID, icon, hMenuPopup, nItemHeight); + HeapFree( GetProcessHeap(), 0, lpszText ); + } + + return ret; +} + +/************************************************************************* + * FileMenu_InsertUsingPidl [SHELL32.110] + * + * NOTES + * uEnumFlags any SHCONTF flag + */ +int WINAPI FileMenu_InsertUsingPidl ( + HMENU hmenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + TRACE("%p 0x%08x %p 0x%08x 0x%08x %p\n", + hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + + pdump (pidl); + + bAbortInit = FALSE; + + FM_SetMenuParameter(hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + + return FM_InitMenuPopup(hmenu, NULL); +} + +/************************************************************************* + * FileMenu_ReplaceUsingPidl [SHELL32.113] + * + * FIXME: the static items are deleted but won't be refreshed + */ +int WINAPI FileMenu_ReplaceUsingPidl( + HMENU hmenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + TRACE("%p 0x%08x %p 0x%08x %p\n", + hmenu, uID, pidl, uEnumFlags, lpfnCallback); + + FileMenu_DeleteAllItems (hmenu); + + FM_SetMenuParameter(hmenu, uID, pidl, 0, uEnumFlags, lpfnCallback); + + return FM_InitMenuPopup(hmenu, NULL); +} + +/************************************************************************* + * FileMenu_Invalidate [SHELL32.111] + */ +void WINAPI FileMenu_Invalidate (HMENU hMenu) +{ + FIXME("%p\n",hMenu); +} + +/************************************************************************* + * FileMenu_FindSubMenuByPidl [SHELL32.106] + */ +HMENU WINAPI FileMenu_FindSubMenuByPidl( + HMENU hMenu, + LPCITEMIDLIST pidl) +{ + FIXME("%p %p\n",hMenu, pidl); + return 0; +} + +/************************************************************************* + * FileMenu_AppendFilesForPidl [SHELL32.124] + */ +int WINAPI FileMenu_AppendFilesForPidl( + HMENU hmenu, + LPCITEMIDLIST pidl, + BOOL bAddSeparator) +{ + LPFMINFO menudata; + + menudata = FM_GetMenuInfo(hmenu); + + menudata->bInitialized = FALSE; + + FM_InitMenuPopup(hmenu, pidl); + + if (bAddSeparator) + FileMenu_AppendItemW (hmenu, FM_SEPARATOR, 0, 0, 0, FM_DEFAULT_HEIGHT); + + TRACE("%p %p 0x%08x\n",hmenu, pidl,bAddSeparator); + + return 0; +} +/************************************************************************* + * FileMenu_AddFilesForPidl [SHELL32.125] + * + * NOTES + * uEnumFlags any SHCONTF flag + */ +int WINAPI FileMenu_AddFilesForPidl ( + HMENU hmenu, + UINT uReserved, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + TRACE("%p 0x%08x 0x%08x %p 0x%08x 0x%08x %p\n", + hmenu, uReserved, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + + return FileMenu_InsertUsingPidl ( hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + +} + + +/************************************************************************* + * FileMenu_TrackPopupMenuEx [SHELL32.116] + */ +BOOL WINAPI FileMenu_TrackPopupMenuEx ( + HMENU hMenu, + UINT uFlags, + int x, + int y, + HWND hWnd, + LPTPMPARAMS lptpm) +{ + TRACE("%p 0x%08x 0x%x 0x%x %p %p\n", + hMenu, uFlags, x, y, hWnd, lptpm); + return TrackPopupMenuEx(hMenu, uFlags, x, y, hWnd, lptpm); +} + +/************************************************************************* + * FileMenu_GetLastSelectedItemPidls [SHELL32.107] + */ +BOOL WINAPI FileMenu_GetLastSelectedItemPidls( + UINT uReserved, + LPCITEMIDLIST *ppidlFolder, + LPCITEMIDLIST *ppidlItem) +{ + FIXME("0x%08x %p %p\n",uReserved, ppidlFolder, ppidlItem); + return 0; +} + +#define FM_ICON_SIZE 16 +#define FM_Y_SPACE 4 +#define FM_SPACE1 4 +#define FM_SPACE2 2 +#define FM_LEFTBORDER 2 +#define FM_RIGHTBORDER 8 +/************************************************************************* + * FileMenu_MeasureItem [SHELL32.112] + */ +LRESULT WINAPI FileMenu_MeasureItem( + HWND hWnd, + LPMEASUREITEMSTRUCT lpmis) +{ + LPFMITEM pMyItem = (LPFMITEM)(lpmis->itemData); + HDC hdc = GetDC(hWnd); + SIZE size; + LPFMINFO menuinfo; + + TRACE("%p %p %s\n", hWnd, lpmis, debugstr_w(pMyItem->szItemText)); + + GetTextExtentPoint32W(hdc, pMyItem->szItemText, pMyItem->cchItemText, &size); + + lpmis->itemWidth = size.cx + FM_LEFTBORDER + FM_ICON_SIZE + FM_SPACE1 + FM_SPACE2 + FM_RIGHTBORDER; + lpmis->itemHeight = (size.cy > (FM_ICON_SIZE + FM_Y_SPACE)) ? size.cy : (FM_ICON_SIZE + FM_Y_SPACE); + + /* add the menubitmap */ + menuinfo = FM_GetMenuInfo(pMyItem->hMenu); + if (menuinfo->nBorderWidth) + lpmis->itemWidth += menuinfo->nBorderWidth; + + TRACE("-- 0x%04x 0x%04x\n", lpmis->itemWidth, lpmis->itemHeight); + ReleaseDC (hWnd, hdc); + return 0; +} +/************************************************************************* + * FileMenu_DrawItem [SHELL32.105] + */ +LRESULT WINAPI FileMenu_DrawItem( + HWND hWnd, + LPDRAWITEMSTRUCT lpdis) +{ + LPFMITEM pMyItem = (LPFMITEM)(lpdis->itemData); + COLORREF clrPrevText, clrPrevBkgnd; + int xi,yi,xt,yt; + HIMAGELIST hImageList; + RECT TextRect; + LPFMINFO menuinfo; + + TRACE("%p %p %s\n", hWnd, lpdis, debugstr_w(pMyItem->szItemText)); + + if (lpdis->itemState & ODS_SELECTED) + { + clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_HIGHLIGHTTEXT)); + clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_HIGHLIGHT)); + } + else + { + clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_MENUTEXT)); + clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_MENU)); + } + + CopyRect(&TextRect, &(lpdis->rcItem)); + + /* add the menubitmap */ + menuinfo = FM_GetMenuInfo(pMyItem->hMenu); + if (menuinfo->nBorderWidth) + TextRect.left += menuinfo->nBorderWidth; + + TextRect.left += FM_LEFTBORDER; + xi = TextRect.left + FM_SPACE1; + yi = TextRect.top + FM_Y_SPACE/2; + TextRect.bottom -= FM_Y_SPACE/2; + + xt = xi + FM_ICON_SIZE + FM_SPACE2; + yt = yi; + + ExtTextOutW (lpdis->hDC, xt , yt, ETO_OPAQUE, &TextRect, pMyItem->szItemText, pMyItem->cchItemText, NULL); + + Shell_GetImageLists(0, &hImageList); + ImageList_Draw(hImageList, pMyItem->iIconIndex, lpdis->hDC, xi, yi, ILD_NORMAL); + + TRACE("-- 0x%04x 0x%04x 0x%04x 0x%04x\n", TextRect.left, TextRect.top, TextRect.right, TextRect.bottom); + + SetTextColor(lpdis->hDC, clrPrevText); + SetBkColor(lpdis->hDC, clrPrevBkgnd); + + return TRUE; +} + +/************************************************************************* + * FileMenu_InitMenuPopup [SHELL32.109] + * + * NOTES + * The filemenu is an ownerdrawn menu. Call this function responding to + * WM_INITPOPUPMENU + * + */ +BOOL WINAPI FileMenu_InitMenuPopup (HMENU hmenu) +{ + FM_InitMenuPopup(hmenu, NULL); + return TRUE; +} + +/************************************************************************* + * FileMenu_HandleMenuChar [SHELL32.108] + */ +LRESULT WINAPI FileMenu_HandleMenuChar( + HMENU hMenu, + WPARAM wParam) +{ + FIXME("%p 0x%08lx\n",hMenu,wParam); + return 0; +} + +/************************************************************************* + * FileMenu_DeleteAllItems [SHELL32.104] + * + * NOTES + * exported by name + */ +BOOL WINAPI FileMenu_DeleteAllItems (HMENU hmenu) +{ + MENUITEMINFOW mii; + LPFMINFO menudata; + + int i; + + TRACE("%p\n", hmenu); + + ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_SUBMENU|MIIM_DATA; + + for (i = 0; i < GetMenuItemCount( hmenu ); i++) + { GetMenuItemInfoW(hmenu, i, TRUE, &mii ); + + SHFree((LPFMINFO)mii.dwItemData); + + if (mii.hSubMenu) + FileMenu_Destroy(mii.hSubMenu); + } + + while (DeleteMenu (hmenu, 0, MF_BYPOSITION)){}; + + menudata = FM_GetMenuInfo(hmenu); + + menudata->bInitialized = FALSE; + + return TRUE; +} + +/************************************************************************* + * FileMenu_DeleteItemByCmd [SHELL32.117] + * + */ +BOOL WINAPI FileMenu_DeleteItemByCmd (HMENU hMenu, UINT uID) +{ + MENUITEMINFOW mii; + + TRACE("%p 0x%08x\n", hMenu, uID); + + ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_SUBMENU; + + GetMenuItemInfoW(hMenu, uID, FALSE, &mii ); + if ( mii.hSubMenu ) + { + /* FIXME: Do what? */ + } + + DeleteMenu(hMenu, MF_BYCOMMAND, uID); + return TRUE; +} + +/************************************************************************* + * FileMenu_DeleteItemByIndex [SHELL32.140] + */ +BOOL WINAPI FileMenu_DeleteItemByIndex ( HMENU hMenu, UINT uPos) +{ + MENUITEMINFOW mii; + + TRACE("%p 0x%08x\n", hMenu, uPos); + + ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_SUBMENU; + + GetMenuItemInfoW(hMenu, uPos, TRUE, &mii ); + if ( mii.hSubMenu ) + { + /* FIXME: Do what? */ + } + + DeleteMenu(hMenu, MF_BYPOSITION, uPos); + return TRUE; +} + +/************************************************************************* + * FileMenu_DeleteItemByFirstID [SHELL32.141] + */ +EXTERN_C BOOL WINAPI FileMenu_DeleteItemByFirstID( + HMENU hMenu, + UINT uID) +{ + TRACE("%p 0x%08x\n", hMenu, uID); + return 0; +} + +/************************************************************************* + * FileMenu_DeleteSeparator [SHELL32.142] + */ +BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu) +{ + TRACE("%p\n", hMenu); + return 0; +} + +/************************************************************************* + * FileMenu_EnableItemByCmd [SHELL32.143] + */ +BOOL WINAPI FileMenu_EnableItemByCmd( + HMENU hMenu, + UINT uID, + BOOL bEnable) +{ + TRACE("%p 0x%08x 0x%08x\n", hMenu, uID,bEnable); + return 0; +} + +/************************************************************************* + * FileMenu_GetItemExtent [SHELL32.144] + * + * NOTES + * if the menu is too big, entries are getting cut away!! + */ +DWORD WINAPI FileMenu_GetItemExtent (HMENU hMenu, UINT uPos) +{ RECT rect; + + FIXME("%p 0x%08x\n", hMenu, uPos); + + if (GetMenuItemRect(0, hMenu, uPos, &rect)) + { FIXME("0x%04x 0x%04x 0x%04x 0x%04x\n", + rect.right, rect.left, rect.top, rect.bottom); + return ((rect.right-rect.left)<<16) + (rect.top-rect.bottom); + } + return 0x00100010; /*FIXME*/ +} + +/************************************************************************* + * FileMenu_AbortInitMenu [SHELL32.120] + * + */ +void WINAPI FileMenu_AbortInitMenu (void) +{ TRACE("\n"); + bAbortInit = TRUE; +} + +/************************************************************************* + * SHFind_InitMenuPopup [SHELL32.149] + * + * Get the IContextMenu instance for the submenu of options displayed + * for the Search entry in the Classic style Start menu. + * + * PARAMETERS + * hMenu [in] handle of menu previously created + * hWndParent [in] parent window + * w [in] no pointer (0x209 over here) perhaps menu IDs ??? + * x [in] no pointer (0x226 over here) + * + * RETURNS + * LPXXXXX pointer to struct containing a func addr at offset 8 + * or NULL at failure. + */ +EXTERN_C IContextMenu * WINAPI SHFind_InitMenuPopup (HMENU hMenu, HWND hWndParent, UINT w, UINT x) +{ + FIXME("hmenu=%p hwnd=%p 0x%08x 0x%08x stub\n", + hMenu,hWndParent,w,x); + return NULL; /* this is supposed to be a pointer */ +} + +/************************************************************************* + * _SHIsMenuSeparator (internal) + */ +static BOOL _SHIsMenuSeparator(HMENU hm, int i) +{ + MENUITEMINFOW mii; + + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_TYPE; + mii.cch = 0; /* WARNING: We MUST initialize it to 0*/ + if (!GetMenuItemInfoW(hm, i, TRUE, &mii)) + { + return(FALSE); + } + + if (mii.fType & MFT_SEPARATOR) + { + return(TRUE); + } + + return(FALSE); +} + +/************************************************************************* + * Shell_MergeMenus [SHELL32.67] + */ +UINT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags) +{ + int nItem; + HMENU hmSubMenu; + BOOL bAlreadySeparated; + MENUITEMINFOW miiSrc; + WCHAR szName[256]; + UINT uTemp, uIDMax = uIDAdjust; + + TRACE("hmenu1=%p hmenu2=%p 0x%04x 0x%04x 0x%04x 0x%04x\n", + hmDst, hmSrc, uInsert, uIDAdjust, uIDAdjustMax, uFlags); + + if (!hmDst || !hmSrc) + return uIDMax; + + nItem = GetMenuItemCount(hmDst); + + if (uInsert >= (UINT)nItem) /* insert position inside menu? */ + { + uInsert = (UINT)nItem; /* append on the end */ + bAlreadySeparated = TRUE; + } + else + { + bAlreadySeparated = _SHIsMenuSeparator(hmDst, uInsert); + } + + if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated) + { + /* Add a separator between the menus */ + InsertMenuA(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); + bAlreadySeparated = TRUE; + } + + + /* Go through the menu items and clone them*/ + for (nItem = GetMenuItemCount(hmSrc) - 1; nItem >= 0; nItem--) + { + miiSrc.cbSize = sizeof(MENUITEMINFOW); + miiSrc.fMask = MIIM_STATE | MIIM_ID | MIIM_SUBMENU | MIIM_CHECKMARKS | MIIM_TYPE | MIIM_DATA; + + /* We need to reset this every time through the loop in case menus DON'T have IDs*/ + miiSrc.fType = MFT_STRING; + miiSrc.dwTypeData = szName; + miiSrc.dwItemData = 0; + miiSrc.cch = sizeof(szName)/sizeof(WCHAR); + + if (!GetMenuItemInfoW(hmSrc, nItem, TRUE, &miiSrc)) + { + continue; + } + +/* TRACE("found menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmSrc, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu); +*/ + if (miiSrc.fType & MFT_SEPARATOR) + { + /* This is a separator; don't put two of them in a row */ + if (bAlreadySeparated) + continue; + bAlreadySeparated = TRUE; + } + else if (miiSrc.hSubMenu) + { + if ((uFlags & MM_SUBMENUSHAVEIDS) != 0 && miiSrc.wID != (UINT)miiSrc.hSubMenu) + { + miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ + + if (miiSrc.wID > uIDAdjustMax && miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + continue; + if (uIDMax <= miiSrc.wID) /* remember the highest ID */ + uIDMax = miiSrc.wID + 1; + } + else + { + miiSrc.fMask &= ~MIIM_ID; /* Don't set IDs for submenus that didn't have them already */ + } + hmSubMenu = miiSrc.hSubMenu; + + miiSrc.hSubMenu = CreatePopupMenu(); + + if (!miiSrc.hSubMenu) return(uIDMax); + + uTemp = Shell_MergeMenus(miiSrc.hSubMenu, hmSubMenu, 0, uIDAdjust, uIDAdjustMax, uFlags & MM_SUBMENUSHAVEIDS); + + if (uIDMax <= uTemp) + uIDMax = uTemp; + + bAlreadySeparated = FALSE; + } + else /* normal menu item */ + { + miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ + + if (miiSrc.wID > uIDAdjustMax && miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */{ + continue; + } + if (uIDMax <= miiSrc.wID) /* remember the highest ID */ + uIDMax = miiSrc.wID + 1; + + bAlreadySeparated = FALSE; + } + +/* TRACE("inserting menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmDst, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu); +*/ + if (!InsertMenuItemW(hmDst, uInsert, TRUE, &miiSrc)) + { + return(uIDMax); + } + } + + /* Ensure the correct number of separators at the beginning of the + inserted menu items*/ + if (uInsert == 0) + { + if (bAlreadySeparated) + { + DeleteMenu(hmDst, uInsert, MF_BYPOSITION); + } + } + else + { + if (_SHIsMenuSeparator(hmDst, uInsert-1)) + { + if (bAlreadySeparated) + { + DeleteMenu(hmDst, uInsert, MF_BYPOSITION); + } + } + else + { + if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated) + { + /* Add a separator between the menus*/ + InsertMenuW(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); + } + } + } + return(uIDMax); +} diff --git a/dll/win32/shell32_new/shlview.cpp b/dll/win32/shell32_new/shlview.cpp new file mode 100644 index 00000000000..d19f023788e --- /dev/null +++ b/dll/win32/shell32_new/shlview.cpp @@ -0,0 +1,2525 @@ +/* + * ShellView + * + * Copyright 1998,1999 + * + * This is the view visualizing the data provided by the shellfolder. + * No direct access to data from pidls should be done from here. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * FIXME: The order by part of the background context menu should be + * built according to the columns shown. + * + * FIXME: CheckToolbar: handle the "new folder" and "folder up" button + * + * FIXME: ShellView_FillList: consider sort orders + */ + +/* +TODO: +1. Load/Save the view state from/into the stream provided by the ShellBrowser. +2. Let the shell folder sort items. +3. Code to merge menus in the shellbrowser is incorrect. +4. Move the background context menu creation into shell view. It should store the + shell view HWND to send commands. +5. Send init, measure, and draw messages to context menu during tracking. +6. Shell view should do SetCommandTarget on internet toolbar. +7. When editing starts on item, set edit text to for editing value. +8. When shell view is called back for item info, let listview save the value. +9. Shell view should update status bar. +10. Fix shell view to handle view mode popup exec. +11. The background context menu should have a pidl just like foreground menus. This + causes crashes when dynamic handlers try to use the NULL pidl. +12. The SHELLDLL_DefView should not be filled with blue unconditionally. This causes + annoying flashing of blue even on XP, and is not correct. +13. Reorder of columns doesn't work - might be bug in comctl32 +*/ + +#include +#include +#include +#include +#include +#include "shlwapi_undoc.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#undef SV_CLASS_NAME + +static const WCHAR SV_CLASS_NAME[] = {'S','H','E','L','L','D','L','L','_','D','e','f','V','i','e','w',0}; + +typedef struct +{ BOOL bIsAscending; + INT nHeaderID; + INT nLastHeaderID; +}LISTVIEW_SORT_INFO, *LPLISTVIEW_SORT_INFO; + +#define SHV_CHANGE_NOTIFY WM_USER + 0x1111 + +class CDefView : + public CWindowImpl, + public CComObjectRootEx, + public IShellView, + public IFolderView, + public IOleCommandTarget, + public IDropTarget, + public IDropSource, + public IViewObject, + public IServiceProvider +{ +private: + CComPtr pSFParent; + CComPtr pSF2Parent; + CComPtr pShellBrowser; + CComPtr pCommDlgBrowser; + HWND hWndList; /* ListView control */ + HWND hWndParent; + FOLDERSETTINGS FolderSettings; + HMENU hMenu; + UINT uState; + UINT cidl; + LPITEMIDLIST *apidl; + LISTVIEW_SORT_INFO ListViewSortInfo; + ULONG hNotify; /* change notification handle */ + HANDLE hAccel; + DWORD dwAspects; + DWORD dwAdvf; + CComPtr pAdvSink; + // for drag and drop + CComPtr pCurDropTarget; /* The sub-item, which is currently dragged over */ + CComPtr pCurDataObject; /* The dragged data-object */ + LONG iDragOverItem; /* Dragged over item's index, iff pCurDropTarget != NULL */ + UINT cScrollDelay; /* Send a WM_*SCROLL msg every 250 ms during drag-scroll */ + POINT ptLastMousePos; /* Mouse position at last DragOver call */ + // + CComPtr pCM; +public: + CDefView(); + ~CDefView(); + HRESULT WINAPI Initialize(IShellFolder *shellFolder); + HRESULT IncludeObject(LPCITEMIDLIST pidl); + HRESULT OnDefaultCommand(); + HRESULT OnStateChange(UINT uFlags); + void CheckToolbar(); + void SetStyle(DWORD dwAdd, DWORD dwRemove); + BOOL CreateList(); + BOOL InitList(); + static INT CALLBACK CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData); + static INT CALLBACK ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData); + int LV_FindItemByPidl(LPCITEMIDLIST pidl); + BOOLEAN LV_AddItem(LPCITEMIDLIST pidl); + BOOLEAN LV_DeleteItem(LPCITEMIDLIST pidl); + BOOLEAN LV_RenameItem(LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew); + static INT CALLBACK fill_list(LPVOID ptr, LPVOID arg); + HRESULT FillList(); + HMENU BuildFileMenu(); + void MergeFileMenu(HMENU hSubMenu); + void MergeViewMenu(HMENU hSubMenu); + UINT GetSelections(); + HRESULT OpenSelectedItems(); + void OnDeactivate(); + void DoActivate(UINT uState); + HRESULT drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + + // *** IShellView methods *** + virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(MSG *pmsg); + virtual HRESULT STDMETHODCALLTYPE EnableModeless(BOOL fEnable); + virtual HRESULT STDMETHODCALLTYPE UIActivate(UINT uState); + virtual HRESULT STDMETHODCALLTYPE Refresh(); + virtual HRESULT STDMETHODCALLTYPE CreateViewWindow(IShellView *psvPrevious, LPCFOLDERSETTINGS pfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd); + virtual HRESULT STDMETHODCALLTYPE DestroyViewWindow(); + virtual HRESULT STDMETHODCALLTYPE GetCurrentInfo(LPFOLDERSETTINGS pfs); + virtual HRESULT STDMETHODCALLTYPE AddPropertySheetPages(DWORD dwReserved, LPFNSVADDPROPSHEETPAGE pfn, LPARAM lparam); + virtual HRESULT STDMETHODCALLTYPE SaveViewState(); + virtual HRESULT STDMETHODCALLTYPE SelectItem(LPCITEMIDLIST pidlItem, SVSIF uFlags); + virtual HRESULT STDMETHODCALLTYPE GetItemObject(UINT uItem, REFIID riid, void **ppv); + + // *** IFolderView methods *** + virtual HRESULT STDMETHODCALLTYPE GetCurrentViewMode(UINT *pViewMode); + virtual HRESULT STDMETHODCALLTYPE SetCurrentViewMode(UINT ViewMode); + virtual HRESULT STDMETHODCALLTYPE GetFolder(REFIID riid, void **ppv); + virtual HRESULT STDMETHODCALLTYPE Item(int iItemIndex, LPITEMIDLIST *ppidl); + virtual HRESULT STDMETHODCALLTYPE ItemCount(UINT uFlags, int *pcItems); + virtual HRESULT STDMETHODCALLTYPE Items(UINT uFlags, REFIID riid, void **ppv); + virtual HRESULT STDMETHODCALLTYPE GetSelectionMarkedItem(int *piItem); + virtual HRESULT STDMETHODCALLTYPE GetFocusedItem(int *piItem); + virtual HRESULT STDMETHODCALLTYPE GetItemPosition(LPCITEMIDLIST pidl, POINT *ppt); + virtual HRESULT STDMETHODCALLTYPE GetSpacing(POINT *ppt); + virtual HRESULT STDMETHODCALLTYPE GetDefaultSpacing(POINT *ppt); + virtual HRESULT STDMETHODCALLTYPE GetAutoArrange(); + virtual HRESULT STDMETHODCALLTYPE SelectItem(int iItem, DWORD dwFlags); + virtual HRESULT STDMETHODCALLTYPE SelectAndPositionItems(UINT cidl, LPCITEMIDLIST *apidl, POINT *apt, DWORD dwFlags); + + // *** IOleCommandTarget methods *** + virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); + virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + + // *** IDropTarget methods *** + virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + virtual HRESULT STDMETHODCALLTYPE DragLeave(); + virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + + // *** IDropSource methods *** + virtual HRESULT STDMETHODCALLTYPE QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState); + virtual HRESULT STDMETHODCALLTYPE GiveFeedback(DWORD dwEffect); + + // *** IViewObject methods *** + virtual HRESULT STDMETHODCALLTYPE Draw(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, + HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, + BOOL ( STDMETHODCALLTYPE *pfnContinue )(ULONG_PTR dwContinue), ULONG_PTR dwContinue); + virtual HRESULT STDMETHODCALLTYPE GetColorSet(DWORD dwDrawAspect, LONG lindex, void *pvAspect, + DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet); + virtual HRESULT STDMETHODCALLTYPE Freeze(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze); + virtual HRESULT STDMETHODCALLTYPE Unfreeze(DWORD dwFreeze); + virtual HRESULT STDMETHODCALLTYPE SetAdvise(DWORD aspects, DWORD advf, IAdviseSink *pAdvSink); + virtual HRESULT STDMETHODCALLTYPE GetAdvise(DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink); + + // *** IServiceProvider methods *** + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + + // message handlers + LRESULT OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnGetDlgCode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnGetShellBrowser(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnCustomItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + + static ATL::CWndClassInfo& GetWndClassInfo() + { + static ATL::CWndClassInfo wc = + { + { sizeof(WNDCLASSEX), CS_HREDRAW | CS_VREDRAW, StartWindowProc, + 0, 0, NULL, NULL, + LoadCursor(NULL, IDC_ARROW), (HBRUSH)(COLOR_BACKGROUND + 1), NULL, SV_CLASS_NAME, NULL }, + NULL, NULL, IDC_ARROW, TRUE, 0, _T("") + }; + return wc; + } + + virtual WNDPROC GetWindowProc() + { + return WindowProc; + } + + static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) + { + CDefView *pThis; + LRESULT result; + + // must hold a reference during message handling + pThis = reinterpret_cast(hWnd); + pThis->AddRef(); + result = CWindowImpl::WindowProc(hWnd, uMsg, wParam, lParam); + pThis->Release(); + return result; + } + +BEGIN_MSG_MAP(CDefView) + MESSAGE_HANDLER(WM_SIZE, OnSize) + MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) + MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus) + MESSAGE_HANDLER(WM_CREATE, OnCreate) + MESSAGE_HANDLER(WM_ACTIVATE, OnActivate) + MESSAGE_HANDLER(WM_NOTIFY, OnNotify) + MESSAGE_HANDLER(WM_COMMAND, OnCommand) + MESSAGE_HANDLER(SHV_CHANGE_NOTIFY, OnChangeNotify) + MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu) + MESSAGE_HANDLER(WM_DRAWITEM, OnCustomItem) + MESSAGE_HANDLER(WM_MEASUREITEM, OnCustomItem) + MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) + MESSAGE_HANDLER(WM_GETDLGCODE, OnGetDlgCode) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground) + MESSAGE_HANDLER(CWM_GETISHELLBROWSER, OnGetShellBrowser) +END_MSG_MAP() + +BEGIN_COM_MAP(CDefView) + COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) + COM_INTERFACE_ENTRY_IID(IID_IShellView, IShellView) + COM_INTERFACE_ENTRY_IID(IID_IFolderView, IFolderView) + COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) + COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget) + COM_INTERFACE_ENTRY_IID(IID_IDropSource, IDropSource) + COM_INTERFACE_ENTRY_IID(IID_IViewObject, IViewObject) + COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) +END_COM_MAP() +}; + +/* ListView Header ID's */ +#define LISTVIEW_COLUMN_NAME 0 +#define LISTVIEW_COLUMN_SIZE 1 +#define LISTVIEW_COLUMN_TYPE 2 +#define LISTVIEW_COLUMN_TIME 3 +#define LISTVIEW_COLUMN_ATTRIB 4 + +/*menu items */ +#define IDM_VIEW_FILES (FCIDM_SHVIEWFIRST + 0x500) +#define IDM_VIEW_IDW (FCIDM_SHVIEWFIRST + 0x501) +#define IDM_MYFILEITEM (FCIDM_SHVIEWFIRST + 0x502) + +#define ID_LISTVIEW 1 + +/*windowsx.h */ +#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp) +#define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp) +#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp) + +/* + Items merged into the toolbar and the filemenu +*/ +typedef struct +{ int idCommand; + int iImage; + int idButtonString; + int idMenuString; + BYTE bState; + BYTE bStyle; +} MYTOOLINFO, *LPMYTOOLINFO; + +static const MYTOOLINFO Tools[] = +{ +{ FCIDM_SHVIEW_BIGICON, 0, 0, IDS_VIEW_LARGE, TBSTATE_ENABLED, BTNS_BUTTON }, +{ FCIDM_SHVIEW_SMALLICON, 0, 0, IDS_VIEW_SMALL, TBSTATE_ENABLED, BTNS_BUTTON }, +{ FCIDM_SHVIEW_LISTVIEW, 0, 0, IDS_VIEW_LIST, TBSTATE_ENABLED, BTNS_BUTTON }, +{ FCIDM_SHVIEW_REPORTVIEW, 0, 0, IDS_VIEW_DETAILS, TBSTATE_ENABLED, BTNS_BUTTON }, +{ -1, 0, 0, 0, 0, 0} +}; + +typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask); + +CDefView::CDefView() +{ + hWndList = NULL; + hWndParent = NULL; + FolderSettings.fFlags = 0; + FolderSettings.ViewMode = 0; + hMenu = NULL; + uState = 0; + cidl = 0; + apidl = NULL; + ListViewSortInfo.bIsAscending = FALSE; + ListViewSortInfo.nHeaderID = 0; + ListViewSortInfo.nLastHeaderID = 0; + hNotify = 0; + hAccel = NULL; + dwAspects = 0; + dwAdvf = 0; + iDragOverItem = 0; + cScrollDelay = 0; + ptLastMousePos.x = 0; + ptLastMousePos.y = 0; +} + +CDefView::~CDefView() +{ + TRACE(" destroying IShellView(%p)\n", this); + + SHFree(apidl); +} + +HRESULT WINAPI CDefView::Initialize(IShellFolder *shellFolder) +{ + pSFParent = shellFolder; + shellFolder->QueryInterface(IID_IShellFolder2, (LPVOID *)&pSF2Parent); + return S_OK; +} + +/********************************************************** + * + * ##### helperfunctions for communication with ICommDlgBrowser ##### + */ +HRESULT CDefView::IncludeObject(LPCITEMIDLIST pidl) +{ + HRESULT ret = S_OK; + + if (pCommDlgBrowser.p != NULL) + { + TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl); + ret = pCommDlgBrowser->IncludeObject((IShellView *)this, pidl); + TRACE("--0x%08x\n", ret); + } + return ret; +} + +HRESULT CDefView::OnDefaultCommand() +{ + HRESULT ret = S_FALSE; + + if (pCommDlgBrowser.p != NULL) + { + TRACE("ICommDlgBrowser::OnDefaultCommand\n"); + ret = pCommDlgBrowser->OnDefaultCommand((IShellView *)this); + TRACE("-- returns %08x\n", ret); + } + return ret; +} + +HRESULT CDefView::OnStateChange(UINT uFlags) +{ + HRESULT ret = S_FALSE; + + if (pCommDlgBrowser.p != NULL) + { + TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags); + ret = pCommDlgBrowser->OnStateChange((IShellView *)this, uFlags); + TRACE("--\n"); + } + return ret; +} +/********************************************************** + * set the toolbar of the filedialog buttons + * + * - activates the buttons from the shellbrowser according to + * the view state + */ +void CDefView::CheckToolbar() +{ + LRESULT result; + + TRACE("\n"); + + if (pCommDlgBrowser != NULL) + { + pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_CHECKBUTTON, + FCIDM_TB_SMALLICON, (FolderSettings.ViewMode==FVM_LIST)? TRUE : FALSE, &result); + pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_CHECKBUTTON, + FCIDM_TB_REPORTVIEW, (FolderSettings.ViewMode==FVM_DETAILS)? TRUE : FALSE, &result); + pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_ENABLEBUTTON, + FCIDM_TB_SMALLICON, TRUE, &result); + pShellBrowser->SendControlMsg(FCW_TOOLBAR, TB_ENABLEBUTTON, + FCIDM_TB_REPORTVIEW, TRUE, &result); + } +} + +/********************************************************** + * + * ##### helperfunctions for initializing the view ##### + */ +/********************************************************** + * change the style of the listview control + */ +void CDefView::SetStyle(DWORD dwAdd, DWORD dwRemove) +{ + DWORD tmpstyle; + + TRACE("(%p)\n", this); + + tmpstyle = ::GetWindowLongPtrW(hWndList, GWL_STYLE); + ::SetWindowLongPtrW(hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove)); +} + +/********************************************************** +* ShellView_CreateList() +* +* - creates the list view window +*/ +BOOL CDefView::CreateList() +{ DWORD dwStyle, dwExStyle; + + TRACE("%p\n",this); + + dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | + LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_AUTOARRANGE; + dwExStyle = WS_EX_CLIENTEDGE; + + switch (FolderSettings.ViewMode) + { + case FVM_ICON: dwStyle |= LVS_ICON; break; + case FVM_DETAILS: dwStyle |= LVS_REPORT; break; + case FVM_SMALLICON: dwStyle |= LVS_SMALLICON; break; + case FVM_LIST: dwStyle |= LVS_LIST; break; + default: dwStyle |= LVS_LIST; break; + } + + if (FolderSettings.fFlags & FWF_AUTOARRANGE) dwStyle |= LVS_AUTOARRANGE; + if (FolderSettings.fFlags & FWF_DESKTOP) + FolderSettings.fFlags |= FWF_NOCLIENTEDGE | FWF_NOSCROLL; + if (FolderSettings.fFlags & FWF_SINGLESEL) dwStyle |= LVS_SINGLESEL; + if (FolderSettings.fFlags & FWF_NOCLIENTEDGE) + dwExStyle &= ~WS_EX_CLIENTEDGE; + + hWndList=CreateWindowExW( dwExStyle, + WC_LISTVIEWW, + NULL, + dwStyle, + 0,0,0,0, + m_hWnd, + (HMENU)ID_LISTVIEW, + shell32_hInstance, + NULL); + + if(!hWndList) + return FALSE; + + ListViewSortInfo.bIsAscending = TRUE; + ListViewSortInfo.nHeaderID = -1; + ListViewSortInfo.nLastHeaderID = -1; + + if (FolderSettings.fFlags & FWF_DESKTOP) { + /* + * FIXME: look at the registry value + * HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow + * and activate drop shadows if necessary + */ + if (0) + SendMessageW(hWndList, LVM_SETTEXTBKCOLOR, 0, CLR_NONE); + else + { + SendMessageW(hWndList, LVM_SETTEXTBKCOLOR, 0, GetSysColor(COLOR_DESKTOP)); + SendMessageW(hWndList, LVM_SETBKCOLOR, 0, GetSysColor(COLOR_DESKTOP)); + } + + SendMessageW(hWndList, LVM_SETTEXTCOLOR, 0, RGB(255,255,255)); + } + + /* UpdateShellSettings(); */ + return TRUE; +} + +/********************************************************** +* ShellView_InitList() +* +* - adds all needed columns to the shellview +*/ +BOOL CDefView::InitList() +{ + LVCOLUMNW lvColumn; + SHELLDETAILS sd; + int i; + WCHAR szTemp[50]; + + TRACE("%p\n",this); + + SendMessageW(hWndList, LVM_DELETEALLITEMS, 0, 0); + + lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; + lvColumn.pszText = szTemp; + + if (pSF2Parent) + { + for (i=0; 1; i++) + { + if (FAILED(pSF2Parent->GetDetailsOf(NULL, i, &sd))) + break; + lvColumn.fmt = sd.fmt; + lvColumn.cx = sd.cxChar*8; /* chars->pixel */ + StrRetToStrNW( szTemp, 50, &sd.str, NULL); + SendMessageW(hWndList, LVM_INSERTCOLUMNW, i, (LPARAM) &lvColumn); + } + } + else + { + FIXME("no SF2\n"); + } + + SendMessageW(hWndList, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ShellSmallIconList); + SendMessageW(hWndList, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)ShellBigIconList); + + return TRUE; +} + +/********************************************************** +* ShellView_CompareItems() +* +* NOTES +* internal, CALLBACK for DSA_Sort +*/ +INT CALLBACK CDefView::CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData) +{ + int ret; + TRACE("pidl1=%p pidl2=%p lpsf=%p\n", lParam1, lParam2, (LPVOID) lpData); + + if(!lpData) return 0; + + ret = (SHORT)SCODE_CODE(((IShellFolder *)lpData)->CompareIDs(0, (LPITEMIDLIST)lParam1, (LPITEMIDLIST)lParam2)); + TRACE("ret=%i\n",ret); + return ret; +} + +/************************************************************************* + * ShellView_ListViewCompareItems + * + * Compare Function for the Listview (FileOpen Dialog) + * + * PARAMS + * lParam1 [I] the first ItemIdList to compare with + * lParam2 [I] the second ItemIdList to compare with + * lpData [I] The column ID for the header Ctrl to process + * + * RETURNS + * A negative value if the first item should precede the second, + * a positive value if the first item should follow the second, + * or zero if the two items are equivalent + * + * NOTES + * FIXME: function does what ShellView_CompareItems is supposed to do. + * unify it and figure out how to use the undocumented first parameter + * of IShellFolder_CompareIDs to do the job this function does and + * move this code to IShellFolder. + * make LISTVIEW_SORT_INFO obsolete + * the way this function works is only usable if we had only + * filesystemfolders (25/10/99 jsch) + */ +INT CALLBACK CDefView::ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData) +{ + INT nDiff=0; + FILETIME fd1, fd2; + char strName1[MAX_PATH], strName2[MAX_PATH]; + BOOL bIsFolder1, bIsFolder2,bIsBothFolder; + LPITEMIDLIST pItemIdList1 = (LPITEMIDLIST) lParam1; + LPITEMIDLIST pItemIdList2 = (LPITEMIDLIST) lParam2; + LISTVIEW_SORT_INFO *pSortInfo = (LPLISTVIEW_SORT_INFO) lpData; + + + bIsFolder1 = _ILIsFolder(pItemIdList1); + bIsFolder2 = _ILIsFolder(pItemIdList2); + bIsBothFolder = bIsFolder1 && bIsFolder2; + + /* When sorting between a File and a Folder, the Folder gets sorted first */ + if( (bIsFolder1 || bIsFolder2) && !bIsBothFolder) + { + nDiff = bIsFolder1 ? -1 : 1; + } + else + { + /* Sort by Time: Folders or Files can be sorted */ + + if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TIME) + { + _ILGetFileDateTime(pItemIdList1, &fd1); + _ILGetFileDateTime(pItemIdList2, &fd2); + nDiff = CompareFileTime(&fd2, &fd1); + } + /* Sort by Attribute: Folder or Files can be sorted */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_ATTRIB) + { + _ILGetFileAttributes(pItemIdList1, strName1, MAX_PATH); + _ILGetFileAttributes(pItemIdList2, strName2, MAX_PATH); + nDiff = lstrcmpiA(strName1, strName2); + } + /* Sort by FileName: Folder or Files can be sorted */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_NAME || bIsBothFolder) + { + /* Sort by Text */ + _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); + _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); + nDiff = lstrcmpiA(strName1, strName2); + } + /* Sort by File Size, Only valid for Files */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_SIZE) + { + nDiff = (INT)(_ILGetFileSize(pItemIdList1, NULL, 0) - _ILGetFileSize(pItemIdList2, NULL, 0)); + } + /* Sort by File Type, Only valid for Files */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TYPE) + { + /* Sort by Type */ + _ILGetFileType(pItemIdList1, strName1, MAX_PATH); + _ILGetFileType(pItemIdList2, strName2, MAX_PATH); + nDiff = lstrcmpiA(strName1, strName2); + } + } + /* If the Date, FileSize, FileType, Attrib was the same, sort by FileName */ + + if(nDiff == 0) + { + _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); + _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); + nDiff = lstrcmpiA(strName1, strName2); + } + + if(!pSortInfo->bIsAscending) + { + nDiff = -nDiff; + } + + return nDiff; + +} + +/********************************************************** +* LV_FindItemByPidl() +*/ +int CDefView::LV_FindItemByPidl(LPCITEMIDLIST pidl) +{ + LVITEMW lvItem; + lvItem.iSubItem = 0; + lvItem.mask = LVIF_PARAM; + for(lvItem.iItem = 0; + SendMessageW(hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); + lvItem.iItem++) + { + LPITEMIDLIST currentpidl = (LPITEMIDLIST) lvItem.lParam; + HRESULT hr = pSFParent->CompareIDs(0, pidl, currentpidl); + if(SUCCEEDED(hr) && !HRESULT_CODE(hr)) + { + return lvItem.iItem; + } + } + return -1; +} + +/********************************************************** +* LV_AddItem() +*/ +BOOLEAN CDefView::LV_AddItem(LPCITEMIDLIST pidl) +{ + LVITEMW lvItem; + + TRACE("(%p)(pidl=%p)\n", this, pidl); + + lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ + lvItem.iItem = ListView_GetItemCount(hWndList); /*add the item to the end of the list*/ + lvItem.iSubItem = 0; + lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ + lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/ + lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ + if (SendMessageW(hWndList, LVM_INSERTITEMW, 0, (LPARAM)&lvItem) == -1) + return FALSE; + else + return TRUE; +} + +/********************************************************** +* LV_DeleteItem() +*/ +BOOLEAN CDefView::LV_DeleteItem(LPCITEMIDLIST pidl) +{ + int nIndex; + + TRACE("(%p)(pidl=%p)\n", this, pidl); + + nIndex = LV_FindItemByPidl(ILFindLastID(pidl)); + return (-1 == ListView_DeleteItem(hWndList, nIndex)) ? FALSE : TRUE; +} + +/********************************************************** +* LV_RenameItem() +*/ +BOOLEAN CDefView::LV_RenameItem(LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew) +{ + int nItem; + LVITEMW lvItem; + + TRACE("(%p)(pidlold=%p pidlnew=%p)\n", this, pidlOld, pidlNew); + + nItem = LV_FindItemByPidl(ILFindLastID(pidlOld)); + if ( -1 != nItem ) + { + lvItem.mask = LVIF_PARAM; /* only the pidl */ + lvItem.iItem = nItem; + SendMessageW(hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); + + SHFree((LPITEMIDLIST)lvItem.lParam); + lvItem.mask = LVIF_PARAM; + lvItem.iItem = nItem; + lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew)); /* set the item's data */ + SendMessageW(hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); + SendMessageW(hWndList, LVM_UPDATE, nItem, 0); + return TRUE; /* FIXME: better handling */ + } + return FALSE; +} + +/********************************************************** +* ShellView_FillList() +* +* - gets the objectlist from the shellfolder +* - sorts the list +* - fills the list into the view +*/ +INT CALLBACK CDefView::fill_list( LPVOID ptr, LPVOID arg ) +{ + LPITEMIDLIST pidl = (LPITEMIDLIST)ptr; + CDefView *pThis = (CDefView *)arg; + /* in a commdlg This works as a filemask*/ + if ( pThis->IncludeObject(pidl)==S_OK ) pThis->LV_AddItem(pidl); + SHFree(pidl); + return TRUE; +} + +HRESULT CDefView::FillList() +{ + LPENUMIDLIST pEnumIDList; + LPITEMIDLIST pidl; + DWORD dwFetched; + HRESULT hRes; + HDPA hdpa; + + TRACE("%p\n",this); + + /* get the itemlist from the shfolder*/ + hRes = pSFParent->EnumObjects(m_hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); + if (hRes != S_OK) + { + if (hRes==S_FALSE) + return(NOERROR); + return(hRes); + } + + /* create a pointer array */ + hdpa = DPA_Create(16); + if (!hdpa) + { + return(E_OUTOFMEMORY); + } + + /* copy the items into the array*/ + while((S_OK == pEnumIDList->Next(1, &pidl, &dwFetched)) && dwFetched) + { + if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1) + { + SHFree(pidl); + } + } + + /* sort the array */ + DPA_Sort(hdpa, CompareItems, (LPARAM)pSFParent.p); + + /*turn the listview's redrawing off*/ + SendMessageA(hWndList, WM_SETREDRAW, FALSE, 0); + + DPA_DestroyCallback( hdpa, fill_list, (void *)this); + + /*turn the listview's redrawing back on and force it to draw*/ + SendMessageA(hWndList, WM_SETREDRAW, TRUE, 0); + + pEnumIDList->Release(); /* destroy the list*/ + + return S_OK; +} + +LRESULT CDefView::OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + ::UpdateWindow(hWndList); + bHandled = FALSE; + return 0; +} + +LRESULT CDefView::OnGetDlgCode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + return SendMessageW(hWndList, uMsg, 0, 0); +} + +LRESULT CDefView::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + RevokeDragDrop(m_hWnd); + SHChangeNotifyDeregister(hNotify); + bHandled = FALSE; + return 0; +} + +LRESULT CDefView::OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + if (FolderSettings.fFlags & (FWF_DESKTOP | FWF_TRANSPARENT)) + return 1; + bHandled = FALSE; + return 0; +} + +LRESULT CDefView::OnGetShellBrowser(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + return (LRESULT)pShellBrowser.p; +} + +/********************************************************** +* ShellView_OnCreate() +*/ +LRESULT CDefView::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + CComPtr pdt; + SHChangeNotifyEntry ntreg; + CComPtr ppf2; + + TRACE("%p\n",this); + + if(CreateList()) + { + if(InitList()) + { + FillList(); + } + } + + if (SUCCEEDED(this->QueryInterface(IID_IDropTarget, (LPVOID*)&pdt))) + RegisterDragDrop(m_hWnd, pdt); + + /* register for receiving notifications */ + pSFParent->QueryInterface(IID_IPersistFolder2, (LPVOID*)&ppf2); + if (ppf2) + { + ppf2->GetCurFolder((LPITEMIDLIST*)&ntreg.pidl); + ntreg.fRecursive = TRUE; + hNotify = SHChangeNotifyRegister(m_hWnd, SHCNF_IDLIST, SHCNE_ALLEVENTS, SHV_CHANGE_NOTIFY, 1, &ntreg); + SHFree((LPITEMIDLIST)ntreg.pidl); + } + + hAccel = LoadAcceleratorsA(shell32_hInstance, "shv_accel"); + + return S_OK; +} + +/********************************************************** + * #### Handling of the menus #### + */ + +/********************************************************** +* ShellView_BuildFileMenu() +*/ +HMENU CDefView::BuildFileMenu() +{ WCHAR szText[MAX_PATH]; + MENUITEMINFOW mii; + int nTools,i; + HMENU hSubMenu; + + TRACE("(%p)\n",this); + + hSubMenu = CreatePopupMenu(); + if(hSubMenu) + { /*get the number of items in our global array*/ + for(nTools = 0; Tools[nTools].idCommand != -1; nTools++){} + + /*add the menu items*/ + for(i = 0; i < nTools; i++) + { + LoadStringW(shell32_hInstance, Tools[i].idMenuString, szText, MAX_PATH); + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; + + if(BTNS_SEP != Tools[i].bStyle) /* no separator*/ + { + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + mii.dwTypeData = szText; + mii.wID = Tools[i].idCommand; + } + else + { + mii.fType = MFT_SEPARATOR; + } + /* tack This item onto the end of the menu */ + InsertMenuItemW(hSubMenu, (UINT)-1, TRUE, &mii); + } + } + TRACE("-- return (menu=%p)\n",hSubMenu); + return hSubMenu; +} + +/********************************************************** +* ShellView_MergeFileMenu() +*/ +void CDefView::MergeFileMenu(HMENU hSubMenu) +{ TRACE("(%p)->(submenu=%p) stub\n",this,hSubMenu); + + if(hSubMenu) + { /*insert This item at the beginning of the menu */ + _InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, L"dummy45", MFS_ENABLED); + + } + TRACE("--\n"); +} + +/********************************************************** +* ShellView_MergeViewMenu() +*/ +void CDefView::MergeViewMenu(HMENU hSubMenu) +{ + TRACE("(%p)->(submenu=%p)\n",this,hSubMenu); + + if(hSubMenu) + { /*add a separator at the correct position in the menu*/ + MENUITEMINFOW mii; + static WCHAR view[] = L"View"; + + _InsertMenuItemW(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA; + mii.fType = MFT_STRING; + mii.dwTypeData = view; + mii.hSubMenu = LoadMenuW(shell32_hInstance, L"MENU_001"); + InsertMenuItemW(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); + } +} + +/********************************************************** +* ShellView_GetSelections() +* +* - fills the this->apidl list with the selected objects +* +* RETURNS +* number of selected items +*/ +UINT CDefView::GetSelections() +{ + LVITEMW lvItem; + UINT i = 0; + + SHFree(apidl); + + cidl = ListView_GetSelectedCount(hWndList); + apidl = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST)); + + TRACE("selected=%i\n", cidl); + + if(apidl) + { + TRACE("-- Items selected =%u\n", cidl); + + lvItem.mask = LVIF_STATE | LVIF_PARAM; + lvItem.stateMask = LVIS_SELECTED; + lvItem.iItem = 0; + lvItem.iSubItem = 0; + + while(SendMessageW(hWndList, LVM_GETITEMW, 0, (LPARAM)&lvItem) && (i < cidl)) + { + if(lvItem.state & LVIS_SELECTED) + { + apidl[i] = (LPITEMIDLIST)lvItem.lParam; + i++; + if (i == cidl) + break; + TRACE("-- selected Item found\n"); + } + lvItem.iItem++; + } + } + return cidl; + +} + +/********************************************************** + * ShellView_OpenSelectedItems() + */ +HRESULT CDefView::OpenSelectedItems() +{ + static UINT CF_IDLIST = 0; + HRESULT hr; + CComPtr selection; + CComPtr cm; + HMENU hmenu; + FORMATETC fetc; + STGMEDIUM stgm; + LPIDA pIDList; + LPCITEMIDLIST parent_pidl; + WCHAR parent_path[MAX_PATH]; + LPCWSTR parent_dir = NULL; + SFGAOF attribs; + int i; + CMINVOKECOMMANDINFOEX ici; + MENUITEMINFOW info; + + if (0 == GetSelections()) + { + return S_OK; + } + + hr = pSFParent->GetUIObjectOf(m_hWnd, cidl, + (LPCITEMIDLIST*)apidl, IID_IContextMenu, + 0, (LPVOID *)&cm); + + if (SUCCEEDED(hr)) + { + hmenu = CreatePopupMenu(); + if (hmenu) + { + hr = IUnknown_SetSite(cm, (IShellView *)this); + if (SUCCEEDED(cm->QueryContextMenu(hmenu, 0, 0x20, 0x7fff, CMF_DEFAULTONLY))) + { + INT def = -1, n = GetMenuItemCount(hmenu); + + for ( i = 0; i < n; i++ ) + { + memset( &info, 0, sizeof info ); + info.cbSize = sizeof info; + info.fMask = MIIM_FTYPE | MIIM_STATE | MIIM_ID; + if (GetMenuItemInfoW( hmenu, i, TRUE, &info)) + { + if (info.fState & MFS_DEFAULT) + { + def = info.wID; + break; + } + } + } + if (def != -1) + { + memset( &ici, 0, sizeof ici ); + ici.cbSize = sizeof ici; + ici.lpVerb = MAKEINTRESOURCEA( def ); + ici.hwnd = m_hWnd; + + if (cm->InvokeCommand((LPCMINVOKECOMMANDINFO) &ici ) == S_OK) + { + DestroyMenu( hmenu ); + hr = IUnknown_SetSite(cm, NULL); + return S_OK; + } + } + + } + DestroyMenu( hmenu ); + hr = IUnknown_SetSite(cm, NULL); + } + cm->Release(); + } + + + + hr = pSFParent->GetUIObjectOf(m_hWnd, cidl, + (LPCITEMIDLIST*)apidl, IID_IDataObject, + 0, (LPVOID *)&selection); + + + + if (FAILED(hr)) + return hr; + + if (0 == CF_IDLIST) + { + CF_IDLIST = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); + } + fetc.cfFormat = CF_IDLIST; + fetc.ptd = NULL; + fetc.dwAspect = DVASPECT_CONTENT; + fetc.lindex = -1; + fetc.tymed = TYMED_HGLOBAL; + + hr = selection->QueryGetData(&fetc); + if (FAILED(hr)) + return hr; + + hr = selection->GetData(&fetc, &stgm); + if (FAILED(hr)) + return hr; + + pIDList = (LPIDA)GlobalLock(stgm.hGlobal); + + parent_pidl = (LPCITEMIDLIST) ((LPBYTE)pIDList+pIDList->aoffset[0]); + hr = pSFParent->GetAttributesOf(1, &parent_pidl, &attribs); + if (SUCCEEDED(hr) && (attribs & SFGAO_FILESYSTEM) && + SHGetPathFromIDListW(parent_pidl, parent_path)) + { + parent_dir = parent_path; + } + + for (i = pIDList->cidl; i > 0; --i) + { + LPCITEMIDLIST pidl; + + pidl = (LPCITEMIDLIST)((LPBYTE)pIDList+pIDList->aoffset[i]); + + attribs = SFGAO_FOLDER; + hr = pSFParent->GetAttributesOf(1, &pidl, &attribs); + + if (SUCCEEDED(hr) && ! (attribs & SFGAO_FOLDER)) + { + SHELLEXECUTEINFOW shexinfo; + + shexinfo.cbSize = sizeof(SHELLEXECUTEINFOW); + shexinfo.fMask = SEE_MASK_INVOKEIDLIST; /* SEE_MASK_IDLIST is also possible. */ + shexinfo.hwnd = NULL; + shexinfo.lpVerb = NULL; + shexinfo.lpFile = NULL; + shexinfo.lpParameters = NULL; + shexinfo.lpDirectory = parent_dir; + shexinfo.nShow = SW_NORMAL; + shexinfo.lpIDList = ILCombine(parent_pidl, pidl); + + ShellExecuteExW(&shexinfo); /* Discard error/success info */ + + ILFree((LPITEMIDLIST)shexinfo.lpIDList); + } + } + + GlobalUnlock(stgm.hGlobal); + ReleaseStgMedium(&stgm); + + return S_OK; +} + +/********************************************************** + * ShellView_DoContextMenu() + */ +LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + WORD x; + WORD y; + BOOL bDefault; + UINT uCommand; + DWORD wFlags; + HMENU hMenu; + BOOL fExplore; + HWND hwndTree; + CMINVOKECOMMANDINFO cmi; + HRESULT hResult; + + // for some reason I haven't figured out, we sometimes recurse into this method + if (pCM != NULL) + return 0; + + x = LOWORD(lParam); + y = HIWORD(lParam); + bDefault = FALSE; + + TRACE("(%p)->(0x%08x 0x%08x 0x%08x) stub\n",this, x, y, bDefault); + + fExplore = FALSE; + hwndTree = NULL; + + /* look, what's selected and create a context menu object of it*/ + if (GetSelections()) + { + pSFParent->GetUIObjectOf(hWndParent, cidl, (LPCITEMIDLIST*)apidl, IID_IContextMenu, NULL, (LPVOID *)&pCM); + + if(pCM) + { + TRACE("-- pContextMenu\n"); + hMenu = CreatePopupMenu(); + + if( hMenu ) + { + hResult = IUnknown_SetSite(pCM, (IShellView *)this); + /* See if we are in Explore or Open mode. If the browser's tree is present, we are in Explore mode.*/ + if(SUCCEEDED(pShellBrowser->GetControlWindow(FCW_TREE, &hwndTree)) && hwndTree) + { + TRACE("-- explore mode\n"); + fExplore = TRUE; + } + + /* build the flags depending on what we can do with the selected item */ + wFlags = CMF_NORMAL | (cidl != 1 ? 0 : CMF_CANRENAME) | (fExplore ? CMF_EXPLORE : 0); + + /* let the ContextMenu merge its items in */ + if (SUCCEEDED(pCM->QueryContextMenu(hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, wFlags ))) + { + if (FolderSettings.fFlags & FWF_DESKTOP) + SetMenuDefaultItem(hMenu, FCIDM_SHVIEW_OPEN, MF_BYCOMMAND); + + if( bDefault ) + { + TRACE("-- get menu default command\n"); + uCommand = GetMenuDefaultItem(hMenu, FALSE, GMDI_GOINTOPOPUPS); + } + else + { + TRACE("-- track popup\n"); + uCommand = TrackPopupMenu( hMenu,TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,m_hWnd,NULL); + } + + if(uCommand > 0) + { + TRACE("-- uCommand=%u\n", uCommand); + if (uCommand==FCIDM_SHVIEW_OPEN && pCommDlgBrowser.p != NULL) + { + TRACE("-- dlg: OnDefaultCommand\n"); + if (OnDefaultCommand() != S_OK) + { + OpenSelectedItems(); + } + } + else + { + TRACE("-- explore -- invoke command\n"); + ZeroMemory(&cmi, sizeof(cmi)); + cmi.cbSize = sizeof(cmi); + cmi.hwnd = hWndParent; /* this window has to answer CWM_GETISHELLBROWSER */ + cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); + pCM->InvokeCommand(&cmi); + } + } + hResult = IUnknown_SetSite(pCM, NULL); + DestroyMenu(hMenu); + } + } + pCM.Release(); + } + } + else /* background context menu */ + { + hMenu = CreatePopupMenu(); + + CDefFolderMenu_Create2(NULL, NULL, cidl, (LPCITEMIDLIST*)apidl, pSFParent, NULL, 0, NULL, (IContextMenu**)&pCM); + pCM->QueryContextMenu(hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0); + + uCommand = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,m_hWnd,NULL); + DestroyMenu(hMenu); + + TRACE("-- (%p)->(uCommand=0x%08x )\n",this, uCommand); + + ZeroMemory(&cmi, sizeof(cmi)); + cmi.cbSize = sizeof(cmi); + cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); + cmi.hwnd = hWndParent; + pCM->InvokeCommand(&cmi); + + pCM.Release(); + } + return 0; +} + +/********************************************************** + * ##### message handling ##### + */ + +/********************************************************** +* ShellView_OnSize() +*/ +LRESULT CDefView::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + WORD wWidth; + WORD wHeight; + + wWidth = LOWORD(lParam); + wHeight = HIWORD(lParam); + + TRACE("%p width=%u height=%u\n", this, wWidth, wHeight); + + /*resize the ListView to fit our window*/ + if (hWndList) + { + ::MoveWindow(hWndList, 0, 0, wWidth, wHeight, TRUE); + } + + return 0; +} + +/********************************************************** +* ShellView_OnDeactivate() +* +* NOTES +* internal +*/ +void CDefView::OnDeactivate() +{ + TRACE("%p\n",this); + + if(uState != SVUIA_DEACTIVATE) + { + if(hMenu) + { + pShellBrowser->SetMenuSB(0, 0, 0); + pShellBrowser->RemoveMenusSB(hMenu); + DestroyMenu(hMenu); + hMenu = 0; + } + + uState = SVUIA_DEACTIVATE; + } +} + +void CDefView::DoActivate(UINT uState) +{ + OLEMENUGROUPWIDTHS omw = { {0, 0, 0, 0, 0, 0} }; + MENUITEMINFOA mii; + CHAR szText[MAX_PATH]; + + TRACE("%p uState=%x\n", this, uState); + + /*don't do anything if the state isn't really changing */ + if(uState == uState) + { + return; + } + + OnDeactivate(); + + /*only do This if we are active */ + if(uState != SVUIA_DEACTIVATE) + { + /*merge the menus */ + hMenu = CreateMenu(); + + if(hMenu) + { + pShellBrowser->InsertMenusSB(hMenu, &omw); + TRACE("-- after fnInsertMenusSB\n"); + + /*build the top level menu get the menu item's text*/ + strcpy(szText,"dummy 31"); + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_STATE; + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + mii.dwTypeData = szText; + mii.hSubMenu = BuildFileMenu(); + + /*insert our menu into the menu bar*/ + if(mii.hSubMenu) + { + InsertMenuItemA(hMenu, FCIDM_MENU_HELP, FALSE, &mii); + } + + /*get the view menu so we can merge with it*/ + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU; + + if(GetMenuItemInfoA(hMenu, FCIDM_MENU_VIEW, FALSE, &mii)) + { + MergeViewMenu(mii.hSubMenu); + } + + /*add the items that should only be added if we have the focus*/ + if(SVUIA_ACTIVATE_FOCUS == uState) + { + /*get the file menu so we can merge with it */ + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU; + + if(GetMenuItemInfoA(hMenu, FCIDM_MENU_FILE, FALSE, &mii)) + { + MergeFileMenu(mii.hSubMenu); + } + } + TRACE("-- before fnSetMenuSB\n"); + pShellBrowser->SetMenuSB(hMenu, 0, m_hWnd); + } + } + uState = uState; + TRACE("--\n"); +} + +/********************************************************** +* ShellView_OnActivate() +*/ +LRESULT CDefView::OnActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + DoActivate(SVUIA_ACTIVATE_FOCUS); + return 0; +} + +/********************************************************** +* ShellView_OnSetFocus() +* +*/ +LRESULT CDefView::OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("%p\n", this); + + /* Tell the browser one of our windows has received the focus. This + should always be done before merging menus (OnActivate merges the + menus) if one of our windows has the focus.*/ + + pShellBrowser->OnViewWindowActive((IShellView *)this); + DoActivate(SVUIA_ACTIVATE_FOCUS); + + /* Set the focus to the listview */ + ::SetFocus(hWndList); + + /* Notify the ICommDlgBrowser interface */ + OnStateChange(CDBOSC_SETFOCUS); + + return 0; +} + +/********************************************************** +* ShellView_OnKillFocus() +*/ +LRESULT CDefView::OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + TRACE("(%p) stub\n", this); + + DoActivate(SVUIA_ACTIVATE_NOFOCUS); + /* Notify the ICommDlgBrowser */ + OnStateChange(CDBOSC_KILLFOCUS); + + return 0; +} + +/********************************************************** +* ShellView_OnCommand() +* +* NOTES +* the CmdID's are the ones from the context menu +*/ +LRESULT CDefView::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + DWORD dwCmdID; + DWORD dwCmd; + HWND hwndCmd; + + dwCmdID = GET_WM_COMMAND_ID(wParam, lParam); + dwCmd = GET_WM_COMMAND_CMD(wParam, lParam); + hwndCmd = GET_WM_COMMAND_HWND(wParam, lParam); + + TRACE("(%p)->(0x%08x 0x%08x %p) stub\n",this, dwCmdID, dwCmd, hwndCmd); + + switch(dwCmdID) + { + case FCIDM_SHVIEW_SMALLICON: + FolderSettings.ViewMode = FVM_SMALLICON; + SetStyle (LVS_SMALLICON, LVS_TYPEMASK); + CheckToolbar(); + break; + + case FCIDM_SHVIEW_BIGICON: + FolderSettings.ViewMode = FVM_ICON; + SetStyle (LVS_ICON, LVS_TYPEMASK); + CheckToolbar(); + break; + + case FCIDM_SHVIEW_LISTVIEW: + FolderSettings.ViewMode = FVM_LIST; + SetStyle (LVS_LIST, LVS_TYPEMASK); + CheckToolbar(); + break; + + case FCIDM_SHVIEW_REPORTVIEW: + FolderSettings.ViewMode = FVM_DETAILS; + SetStyle (LVS_REPORT, LVS_TYPEMASK); + CheckToolbar(); + break; + + /* the menu-ID's for sorting are 0x30... see shrec.rc */ + case 0x30: + case 0x31: + case 0x32: + case 0x33: + ListViewSortInfo.nHeaderID = (LPARAM) (dwCmdID - 0x30); + ListViewSortInfo.bIsAscending = TRUE; + ListViewSortInfo.nLastHeaderID = ListViewSortInfo.nHeaderID; + SendMessageA(hWndList, LVM_SORTITEMS, (WPARAM) &ListViewSortInfo, (LPARAM)ListViewCompareItems); + break; + + default: + TRACE("-- COMMAND 0x%04x unhandled\n", dwCmdID); + } + return 0; +} + +/********************************************************** +* ShellView_OnNotify() +*/ + +LRESULT CDefView::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + UINT CtlID; + LPNMHDR lpnmh; + LPNMLISTVIEW lpnmlv; + NMLVDISPINFOW *lpdi; + LPITEMIDLIST pidl; + BOOL unused; + + CtlID = wParam; + lpnmh = (LPNMHDR)lParam; + lpnmlv = (LPNMLISTVIEW)lpnmh; + lpdi = (NMLVDISPINFOW *)lpnmh; + + TRACE("%p CtlID=%u lpnmh->code=%x\n",this,CtlID,lpnmh->code); + + switch(lpnmh->code) + { + case NM_SETFOCUS: + TRACE("-- NM_SETFOCUS %p\n", this); + OnSetFocus(0, 0, 0, unused); + break; + + case NM_KILLFOCUS: + TRACE("-- NM_KILLFOCUS %p\n", this); + OnDeactivate(); + /* Notify the ICommDlgBrowser interface */ + OnStateChange(CDBOSC_KILLFOCUS); + break; + + case NM_CUSTOMDRAW: + TRACE("-- NM_CUSTOMDRAW %p\n", this); + return CDRF_DODEFAULT; + + case NM_RELEASEDCAPTURE: + TRACE("-- NM_RELEASEDCAPTURE %p\n", this); + break; + + case NM_CLICK: + TRACE("-- NM_CLICK %p\n", this); + break; + + case NM_RCLICK: + TRACE("-- NM_RCLICK %p\n", this); + break; + + case NM_DBLCLK: + TRACE("-- NM_DBLCLK %p\n", this); + if (OnDefaultCommand() != S_OK) OpenSelectedItems(); + break; + + case NM_RETURN: + TRACE("-- NM_RETURN %p\n", this); + if (OnDefaultCommand() != S_OK) OpenSelectedItems(); + break; + + case HDN_ENDTRACKW: + TRACE("-- HDN_ENDTRACKW %p\n", this); + /*nColumn1 = ListView_GetColumnWidth(hWndList, 0); + nColumn2 = ListView_GetColumnWidth(hWndList, 1);*/ + break; + + case LVN_DELETEITEM: + TRACE("-- LVN_DELETEITEM %p\n", this); + SHFree((LPITEMIDLIST)lpnmlv->lParam); /*delete the pidl because we made a copy of it*/ + break; + + case LVN_DELETEALLITEMS: + TRACE("-- LVN_DELETEALLITEMS %p\n", this); + return FALSE; + + case LVN_INSERTITEM: + TRACE("-- LVN_INSERTITEM (STUB)%p\n", this); + break; + + case LVN_ITEMACTIVATE: + TRACE("-- LVN_ITEMACTIVATE %p\n", this); + OnStateChange(CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ + break; + + case LVN_COLUMNCLICK: + ListViewSortInfo.nHeaderID = lpnmlv->iSubItem; + if(ListViewSortInfo.nLastHeaderID == ListViewSortInfo.nHeaderID) + { + ListViewSortInfo.bIsAscending = !ListViewSortInfo.bIsAscending; + } + else + { + ListViewSortInfo.bIsAscending = TRUE; + } + ListViewSortInfo.nLastHeaderID = ListViewSortInfo.nHeaderID; + + SendMessageW(lpnmlv->hdr.hwndFrom, LVM_SORTITEMS, (WPARAM) &ListViewSortInfo, (LPARAM)ListViewCompareItems); + break; + + case LVN_GETDISPINFOA: + case LVN_GETDISPINFOW: + TRACE("-- LVN_GETDISPINFO %p\n", this); + pidl = (LPITEMIDLIST)lpdi->item.lParam; + + if(lpdi->item.mask & LVIF_TEXT) /* text requested */ + { + if (pSF2Parent) + { + SHELLDETAILS sd; + pSF2Parent->GetDetailsOf(pidl, lpdi->item.iSubItem, &sd); + if (lpnmh->code == LVN_GETDISPINFOA) + { + /* shouldn't happen */ + NMLVDISPINFOA *lpdiA = (NMLVDISPINFOA *)lpnmh; + StrRetToStrNA( lpdiA->item.pszText, lpdiA->item.cchTextMax, &sd.str, NULL); + TRACE("-- text=%s\n",lpdiA->item.pszText); + } + else /* LVN_GETDISPINFOW */ + { + StrRetToStrNW( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL); + TRACE("-- text=%s\n",debugstr_w(lpdi->item.pszText)); + } + } + else + { + FIXME("no SF2\n"); + } + } + if(lpdi->item.mask & LVIF_IMAGE) /* image requested */ + { + lpdi->item.iImage = SHMapPIDLToSystemImageListIndex(pSFParent, pidl, 0); + } + lpdi->item.mask |= LVIF_DI_SETITEM; + break; + + case LVN_ITEMCHANGED: + TRACE("-- LVN_ITEMCHANGED %p\n", this); + OnStateChange(CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ + break; + + case LVN_BEGINDRAG: + case LVN_BEGINRDRAG: + TRACE("-- LVN_BEGINDRAG\n"); + + if (GetSelections()) + { + IDataObject * pda; + DWORD dwAttributes = SFGAO_CANLINK; + DWORD dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE; + + if (SUCCEEDED(pSFParent->GetUIObjectOf(m_hWnd, cidl, (LPCITEMIDLIST*)apidl, IID_IDataObject,0,(LPVOID *)&pda))) + { + IDropSource * pds = (IDropSource *)this; /* own DropSource interface */ + + if (SUCCEEDED(pSFParent->GetAttributesOf(cidl, (LPCITEMIDLIST*)apidl, &dwAttributes))) + { + if (dwAttributes & SFGAO_CANLINK) + { + dwEffect |= DROPEFFECT_LINK; + } + } + + if (pds) + { + DWORD dwEffect2; + DoDragDrop(pda, pds, dwEffect, &dwEffect2); + } + pda->Release(); + } + } + break; + + case LVN_BEGINLABELEDITW: + { + DWORD dwAttr = SFGAO_CANRENAME; + pidl = (LPITEMIDLIST)lpdi->item.lParam; + + TRACE("-- LVN_BEGINLABELEDITW %p\n", this); + + pSFParent->GetAttributesOf(1, (LPCITEMIDLIST*)&pidl, &dwAttr); + if (SFGAO_CANRENAME & dwAttr) + { + return FALSE; + } + return TRUE; + } + + case LVN_ENDLABELEDITW: + { + TRACE("-- LVN_ENDLABELEDITA %p\n", this); + if (lpdi->item.pszText) + { + HRESULT hr; + LVITEMW lvItem; + + lvItem.iItem = lpdi->item.iItem; + lvItem.iSubItem = 0; + lvItem.mask = LVIF_PARAM; + SendMessageW(hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); + + pidl = (LPITEMIDLIST)lpdi->item.lParam; + hr = pSFParent->SetNameOf(0, pidl, lpdi->item.pszText, SHGDN_INFOLDER, &pidl); + + if(SUCCEEDED(hr) && pidl) + { + lvItem.mask = LVIF_PARAM; + lvItem.lParam = (LPARAM)pidl; + SendMessageW(hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); + return TRUE; + } + } + return FALSE; + } + + case LVN_KEYDOWN: + { + /* MSG msg; + msg.hwnd = m_hWnd; + msg.message = WM_KEYDOWN; + msg.wParam = plvKeyDown->wVKey; + msg.lParam = 0; + msg.time = 0; + msg.pt = 0;*/ + + LPNMLVKEYDOWN plvKeyDown = (LPNMLVKEYDOWN) lpnmh; + SHORT ctrl = GetKeyState(VK_CONTROL) & 0x8000; + + /* initiate a rename of the selected file or directory */ + if(plvKeyDown->wVKey == VK_F2) + { + /* see how many files are selected */ + int i = ListView_GetSelectedCount(hWndList); + + /* get selected item */ + if(i == 1) + { + /* get selected item */ + i = ListView_GetNextItem(hWndList, -1, + LVNI_SELECTED); + + SendMessageW(hWndList, LVM_ENSUREVISIBLE, i, 0); + SendMessageW(hWndList, LVM_EDITLABELW, i, 0); + } + } +#if 0 + TranslateAccelerator(m_hWnd, hAccel, &msg) +#endif + else if(plvKeyDown->wVKey == VK_DELETE) + { + UINT i; + int item_index; + LVITEMA item; + LPITEMIDLIST* pItems; + ISFHelper *psfhlp; + + pSFParent->QueryInterface(IID_ISFHelper, + (LPVOID*)&psfhlp); + + if (psfhlp == NULL) + break; + + if(!(i = ListView_GetSelectedCount(hWndList))) + break; + + /* allocate memory for the pidl array */ + pItems = (LPITEMIDLIST *)HeapAlloc(GetProcessHeap(), 0, + sizeof(LPITEMIDLIST) * i); + + /* retrieve all selected items */ + i = 0; + item_index = -1; + while(ListView_GetSelectedCount(hWndList) > i) + { + /* get selected item */ + item_index = ListView_GetNextItem(hWndList, + item_index, LVNI_SELECTED); + item.iItem = item_index; + item.mask = LVIF_PARAM; + SendMessageA(hWndList, LVM_GETITEMA, 0, (LPARAM) &item); + + /* get item pidl */ + pItems[i] = (LPITEMIDLIST)item.lParam; + + i++; + } + + /* perform the item deletion */ + psfhlp->DeleteItems(i, (LPCITEMIDLIST*)pItems); + + /* free pidl array memory */ + HeapFree(GetProcessHeap(), 0, pItems); + } + + /* Initiate a refresh */ + else if(plvKeyDown->wVKey == VK_F5) + { + Refresh(); + } + else if(plvKeyDown->wVKey == VK_BACK) + { + LPSHELLBROWSER lpSb; + if((lpSb = (LPSHELLBROWSER)SendMessageW(hWndParent, CWM_GETISHELLBROWSER, 0, 0))) + { + lpSb->BrowseObject(NULL, SBSP_PARENT); + } + } + else if(plvKeyDown->wVKey == 'C' && ctrl) + { + FIXME("Need to copy\n"); + } + else if(plvKeyDown->wVKey == 'V' && ctrl) + { + FIXME("Need to paste\n"); + } + else + FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey); + } + break; + + default: + TRACE("-- %p WM_COMMAND %x unhandled\n", this, lpnmh->code); + break; + } + return 0; +} + +/********************************************************** +* ShellView_OnChange() +*/ +LRESULT CDefView::OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + LPITEMIDLIST *Pidls; + + Pidls = (LPITEMIDLIST *)wParam; + + TRACE("(%p)(%p,%p,0x%08x)\n", this, Pidls[0], Pidls[1], lParam); + + switch (lParam) + { + case SHCNE_MKDIR: + case SHCNE_CREATE: + LV_AddItem(Pidls[0]); + break; + case SHCNE_RMDIR: + case SHCNE_DELETE: + LV_DeleteItem(Pidls[0]); + break; + case SHCNE_RENAMEFOLDER: + case SHCNE_RENAMEITEM: + LV_RenameItem(Pidls[0], Pidls[1]); + break; + case SHCNE_UPDATEITEM: + break; + } + return TRUE; +} + +/********************************************************** +* ShellView_DoMeasureItem +*/ +LRESULT CDefView::OnCustomItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + if (!pCM.p) + { + /* no menu */ + ERR("no menu!!!\n"); + return FALSE; + } + + if (pCM.p->HandleMenuMsg(uMsg, (WPARAM)m_hWnd, lParam) == S_OK) + return TRUE; + else + return FALSE; +} + +/********************************************************** +* +* +* The INTERFACE of the IShellView object +* +* +********************************************************** +*/ + +/********************************************************** +* ShellView_GetWindow +*/ +HRESULT WINAPI CDefView::GetWindow(HWND *phWnd) +{ + TRACE("(%p)\n",this); + + *phWnd = m_hWnd; + + return S_OK; +} + +HRESULT WINAPI CDefView::ContextSensitiveHelp(BOOL fEnterMode) +{ + FIXME("(%p) stub\n",this); + + return E_NOTIMPL; +} + +/********************************************************** +* IShellView_TranslateAccelerator +* +* FIXME: +* use the accel functions +*/ +HRESULT WINAPI CDefView::TranslateAccelerator(LPMSG lpmsg) +{ +#if 0 + FIXME("(%p)->(%p: hwnd=%x msg=%x lp=%x wp=%x) stub\n",this,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam); +#endif + + if (lpmsg->message >= WM_KEYFIRST && lpmsg->message >= WM_KEYLAST) + { + TRACE("-- key=0x04%lx\n",lpmsg->wParam) ; + } + return S_FALSE; /* not handled */ +} + +HRESULT WINAPI CDefView::EnableModeless(BOOL fEnable) +{ + FIXME("(%p) stub\n",this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDefView::UIActivate(UINT uState) +{ +/* + CHAR szName[MAX_PATH]; +*/ + LRESULT lResult; + int nPartArray[1] = {-1}; + + TRACE("(%p)->(state=%x) stub\n",this, uState); + + /*don't do anything if the state isn't really changing*/ + if(uState == uState) + { + return S_OK; + } + + /*OnActivate handles the menu merging and internal state*/ + DoActivate(uState); + + /*only do This if we are active*/ + if(uState != SVUIA_DEACTIVATE) + { + +/* + GetFolderPath is not a method of IShellFolder + IShellFolder_GetFolderPath( pSFParent, szName, sizeof(szName) ); +*/ + /* set the number of parts */ + pShellBrowser->SendControlMsg(FCW_STATUS, SB_SETPARTS, 1, (LPARAM)nPartArray, &lResult); + + /* set the text for the parts */ +/* + pShellBrowser->SendControlMsg(FCW_STATUS, SB_SETTEXTA, 0, (LPARAM)szName, &lResult); +*/ + } + + return S_OK; +} + +HRESULT WINAPI CDefView::Refresh() +{ + TRACE("(%p)\n",this); + + SendMessageW(hWndList, LVM_DELETEALLITEMS, 0, 0); + FillList(); + + return S_OK; +} + +HRESULT WINAPI CDefView::CreateViewWindow(IShellView *lpPrevView, LPCFOLDERSETTINGS lpfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd) +{ + *phWnd = 0; + + TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",this, lpPrevView,lpfs, psb, prcView, phWnd); + TRACE("-- vmode=%x flags=%x left=%i top=%i right=%i bottom=%i\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom); + + /*set up the member variables*/ + pShellBrowser = psb; + FolderSettings = *lpfs; + + /*get our parent window*/ + pShellBrowser->GetWindow(&hWndParent); + + /* try to get the ICommDlgBrowserInterface, adds a reference !!! */ + pCommDlgBrowser = NULL; + if (SUCCEEDED(pShellBrowser->QueryInterface(IID_ICommDlgBrowser, (LPVOID *)&pCommDlgBrowser))) + { + TRACE("-- CommDlgBrowser\n"); + } + + Create(hWndParent, prcView, NULL, WS_CHILD | WS_TABSTOP, 0, 0U); + if (m_hWnd == NULL) + return E_FAIL; + + *phWnd = m_hWnd; + + CheckToolbar(); + + if (!*phWnd) + return E_FAIL; + + SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); + UpdateWindow(); + + return S_OK; +} + +HRESULT WINAPI CDefView::DestroyViewWindow() +{ + TRACE("(%p)\n",this); + + /*Make absolutely sure all our UI is cleaned up.*/ + UIActivate(SVUIA_DEACTIVATE); + + if(hMenu) + { + DestroyMenu(hMenu); + } + + DestroyWindow(); + pShellBrowser.Release(); + pCommDlgBrowser.Release(); + + return S_OK; +} + +HRESULT WINAPI CDefView::GetCurrentInfo(LPFOLDERSETTINGS lpfs) +{ + TRACE("(%p)->(%p) vmode=%x flags=%x\n",this, lpfs, + FolderSettings.ViewMode, FolderSettings.fFlags); + + if (!lpfs) return E_INVALIDARG; + + *lpfs = FolderSettings; + return NOERROR; +} + +HRESULT WINAPI CDefView::AddPropertySheetPages(DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) +{ + FIXME("(%p) stub\n",this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDefView::SaveViewState() +{ + FIXME("(%p) stub\n",this); + + return S_OK; +} + +HRESULT WINAPI CDefView::SelectItem(LPCITEMIDLIST pidl, UINT uFlags) +{ + int i; + + TRACE("(%p)->(pidl=%p, 0x%08x) stub\n",this, pidl, uFlags); + + i = LV_FindItemByPidl(pidl); + + if (i != -1) + { + LVITEMW lvItem; + + if(uFlags & SVSI_ENSUREVISIBLE) + SendMessageW(hWndList, LVM_ENSUREVISIBLE, i, 0); + + lvItem.mask = LVIF_STATE; + lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED; + lvItem.iItem = 0; + lvItem.iSubItem = 0; + + while(SendMessageW(hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem)) + { + if (lvItem.iItem == i) + { + if (uFlags & SVSI_SELECT) + lvItem.state |= LVIS_SELECTED; + else + lvItem.state &= ~LVIS_SELECTED; + + if(uFlags & SVSI_FOCUSED) + lvItem.state &= ~LVIS_FOCUSED; + } + else + { + if (uFlags & SVSI_DESELECTOTHERS) + lvItem.state &= ~LVIS_SELECTED; + } + SendMessageW(hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); + lvItem.iItem++; + } + + + if(uFlags & SVSI_EDIT) + SendMessageW(hWndList, LVM_EDITLABELW, i, 0); + + } + return S_OK; +} + +HRESULT WINAPI CDefView::GetItemObject(UINT uItem, REFIID riid, LPVOID *ppvOut) +{ + HRESULT hr = E_FAIL; + + TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n",this, uItem, debugstr_guid(&riid), ppvOut); + + *ppvOut = NULL; + + switch(uItem) + { + case SVGIO_BACKGROUND: + if (IsEqualIID(riid, IID_IContextMenu)) + { + //*ppvOut = ISvBgCm_Constructor(pSFParent, FALSE); + CDefFolderMenu_Create2(NULL, NULL, cidl, (LPCITEMIDLIST*)apidl, pSFParent, NULL, 0, NULL, (IContextMenu**)ppvOut); + if (!ppvOut) + hr = E_OUTOFMEMORY; + } + break; + + case SVGIO_SELECTION: + GetSelections(); + hr = pSFParent->GetUIObjectOf(m_hWnd, cidl, (LPCITEMIDLIST*)apidl, riid, 0, ppvOut); + break; + } + TRACE("-- (%p)->(interface=%p)\n",this, *ppvOut); + + return hr; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetCurrentViewMode(UINT *pViewMode) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::SetCurrentViewMode(UINT ViewMode) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetFolder(REFIID riid, void **ppv) +{ + if (pSFParent == NULL) + return E_FAIL; + return pSFParent->QueryInterface(riid, ppv); +} + +HRESULT STDMETHODCALLTYPE CDefView::Item(int iItemIndex, LPITEMIDLIST *ppidl) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::ItemCount(UINT uFlags, int *pcItems) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::Items(UINT uFlags, REFIID riid, void **ppv) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetSelectionMarkedItem(int *piItem) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetFocusedItem(int *piItem) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetItemPosition(LPCITEMIDLIST pidl, POINT *ppt) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetSpacing(POINT *ppt) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetDefaultSpacing(POINT *ppt) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::GetAutoArrange() +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::SelectItem(int iItem, DWORD dwFlags) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CDefView::SelectAndPositionItems(UINT cidl, LPCITEMIDLIST *apidl, POINT *apt, DWORD dwFlags) +{ + return E_NOTIMPL; +} + +/********************************************************** + * ISVOleCmdTarget_QueryStatus (IOleCommandTarget) + */ +HRESULT WINAPI CDefView::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText) +{ + UINT i; + + FIXME("(%p)->(%p(%s) 0x%08x %p %p\n", + this, pguidCmdGroup, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText); + + if (!prgCmds) + return E_POINTER; + for (i = 0; i < cCmds; i++) + { + FIXME("\tprgCmds[%d].cmdID = %d\n", i, prgCmds[i].cmdID); + prgCmds[i].cmdf = 0; + } + return OLECMDERR_E_UNKNOWNGROUP; +} + +/********************************************************** + * ISVOleCmdTarget_Exec (IOleCommandTarget) + * + * nCmdID is the OLECMDID_* enumeration + */ +HRESULT WINAPI CDefView::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) +{ + FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08x Opt:0x%08x %p %p)\n", + this, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut); + + if (IsEqualIID(*pguidCmdGroup, CGID_Explorer) && + (nCmdID == 0x29) && + (nCmdexecopt == 4) && pvaOut) + return S_OK; + if (IsEqualIID(*pguidCmdGroup, CGID_ShellDocView) && + (nCmdID == 9) && + (nCmdexecopt == 0)) + return 1; + + return OLECMDERR_E_UNKNOWNGROUP; +} + +/********************************************************** + * ISVDropTarget implementation + */ + +/****************************************************************************** + * drag_notify_subitem [Internal] + * + * Figure out the shellfolder object, which is currently under the mouse cursor + * and notify it via the IDropTarget interface. + */ + +#define SCROLLAREAWIDTH 20 + +HRESULT CDefView::drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) +{ + LVHITTESTINFO htinfo; + LVITEMW lvItem; + LONG lResult; + HRESULT hr; + RECT clientRect; + + /* Map from global to client coordinates and query the index of the listview-item, which is + * currently under the mouse cursor. */ + htinfo.pt.x = pt.x; + htinfo.pt.y = pt.y; + htinfo.flags = LVHT_ONITEM; + ::ScreenToClient(hWndList, &htinfo.pt); + lResult = SendMessageW(hWndList, LVM_HITTEST, 0, (LPARAM)&htinfo); + + /* Send WM_*SCROLL messages every 250 ms during drag-scrolling */ + ::GetClientRect(hWndList, &clientRect); + if (htinfo.pt.x == ptLastMousePos.x && htinfo.pt.y == ptLastMousePos.y && + (htinfo.pt.x < SCROLLAREAWIDTH || htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH || + htinfo.pt.y < SCROLLAREAWIDTH || htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH )) + { + cScrollDelay = (cScrollDelay + 1) % 5; /* DragOver is called every 50 ms */ + if (cScrollDelay == 0) { /* Mouse did hover another 250 ms over the scroll-area */ + if (htinfo.pt.x < SCROLLAREAWIDTH) + SendMessageW(hWndList, WM_HSCROLL, SB_LINEUP, 0); + if (htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH) + SendMessageW(hWndList, WM_HSCROLL, SB_LINEDOWN, 0); + if (htinfo.pt.y < SCROLLAREAWIDTH) + SendMessageW(hWndList, WM_VSCROLL, SB_LINEUP, 0); + if (htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH) + SendMessageW(hWndList, WM_VSCROLL, SB_LINEDOWN, 0); + } + } else { + cScrollDelay = 0; /* Reset, if the cursor is not over the listview's scroll-area */ + } + ptLastMousePos = htinfo.pt; + + /* If we are still over the previous sub-item, notify it via DragOver and return. */ + if (pCurDropTarget && lResult == iDragOverItem) + return pCurDropTarget->DragOver(grfKeyState, pt, pdwEffect); + + /* We've left the previous sub-item, notify it via DragLeave and Release it. */ + if (pCurDropTarget) { + pCurDropTarget->DragLeave(); + pCurDropTarget.Release(); + } + + iDragOverItem = lResult; + if (lResult == -1) { + /* We are not above one of the listview's subitems. Bind to the parent folder's + * DropTarget interface. */ + hr = pSFParent->QueryInterface(IID_IDropTarget, + (LPVOID*)&pCurDropTarget); + } else { + /* Query the relative PIDL of the shellfolder object represented by the currently + * dragged over listview-item ... */ + lvItem.mask = LVIF_PARAM; + lvItem.iItem = lResult; + lvItem.iSubItem = 0; + SendMessageW(hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); + + /* ... and bind pCurDropTarget to the IDropTarget interface of an UIObject of this object */ + hr = pSFParent->GetUIObjectOf(hWndList, 1, + (LPCITEMIDLIST*)&lvItem.lParam, IID_IDropTarget, NULL, (LPVOID*)&pCurDropTarget); + } + + /* If anything failed, pCurDropTarget should be NULL now, which ought to be a save state. */ + if (FAILED(hr)) + return hr; + + /* Notify the item just entered via DragEnter. */ + return pCurDropTarget->DragEnter(pCurDataObject, grfKeyState, pt, pdwEffect); +} + +HRESULT WINAPI CDefView::DragEnter(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) +{ + /* Get a hold on the data object for later calls to DragEnter on the sub-folders */ + pCurDataObject = pDataObject; + pDataObject->AddRef(); + + return drag_notify_subitem(grfKeyState, pt, pdwEffect); +} + +HRESULT WINAPI CDefView::DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) +{ + return drag_notify_subitem(grfKeyState, pt, pdwEffect); +} + +HRESULT WINAPI CDefView::DragLeave() +{ + if (pCurDropTarget) + { + pCurDropTarget->DragLeave(); + pCurDropTarget.Release(); + } + pCurDataObject.Release(); + iDragOverItem = 0; + + return S_OK; +} + +HRESULT WINAPI CDefView::Drop(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) +{ + if (pCurDropTarget) + { + pCurDropTarget->Drop(pDataObject, grfKeyState, pt, pdwEffect); + pCurDropTarget.Release(); + } + + pCurDataObject.Release(); + iDragOverItem = 0; + + return S_OK; +} + +/********************************************************** + * ISVDropSource implementation + */ + +HRESULT WINAPI CDefView::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState) +{ + TRACE("(%p)\n",this); + + if (fEscapePressed) + return DRAGDROP_S_CANCEL; + else if (!(grfKeyState & MK_LBUTTON) && !(grfKeyState & MK_RBUTTON)) + return DRAGDROP_S_DROP; + else + return NOERROR; +} + +HRESULT WINAPI CDefView::GiveFeedback(DWORD dwEffect) +{ + TRACE("(%p)\n",this); + + return DRAGDROP_S_USEDEFAULTCURSORS; +} + +/********************************************************** + * ISVViewObject implementation + */ + +HRESULT WINAPI CDefView::Draw(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue) +{ + FIXME("Stub: this=%p\n",this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDefView::GetColorSet(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDevice, LOGPALETTE **ppColorSet) +{ + FIXME("Stub: this=%p\n",this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDefView::Freeze(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze) +{ + FIXME("Stub: this=%p\n",this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDefView::Unfreeze(DWORD dwFreeze) +{ + FIXME("Stub: this=%p\n",this); + + return E_NOTIMPL; +} + +HRESULT WINAPI CDefView::SetAdvise(DWORD aspects, DWORD advf, IAdviseSink *pAdvSink) +{ + FIXME("partial stub: %p %08x %08x %p\n", this, aspects, advf, pAdvSink); + + /* FIXME: we set the AdviseSink, but never use it to send any advice */ + pAdvSink = pAdvSink; + dwAspects = aspects; + dwAdvf = advf; + + return S_OK; +} + +HRESULT WINAPI CDefView::GetAdvise(DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink) +{ + TRACE("this=%p pAspects=%p pAdvf=%p ppAdvSink=%p\n", this, pAspects, pAdvf, ppAdvSink); + + if( ppAdvSink ) + { + *ppAdvSink = pAdvSink; + pAdvSink.p->AddRef(); + } + if( pAspects ) + *pAspects = dwAspects; + if( pAdvf ) + *pAdvf = dwAdvf; + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CDefView::QueryService(REFGUID guidService, REFIID riid, void **ppvObject) +{ + if (IsEqualIID(guidService, SID_IShellBrowser)) + return pShellBrowser->QueryInterface(riid, ppvObject); + return E_NOINTERFACE; +} + +/********************************************************** + * IShellView_Constructor + */ +HRESULT WINAPI IShellView_Constructor(IShellFolder *pFolder, IShellView **newView) +{ + CComObject *theView; + CComPtr result; + HRESULT hResult; + + if (newView == NULL) + return E_POINTER; + *newView = NULL; + ATLTRY (theView = new CComObject); + if (theView == NULL) + return E_OUTOFMEMORY; + hResult = theView->QueryInterface (IID_IShellView, (void **)&result); + if (FAILED (hResult)) + { + delete theView; + return hResult; + } + hResult = theView->Initialize (pFolder); + if (FAILED (hResult)) + return hResult; + *newView = result.Detach (); + return S_OK; +} diff --git a/dll/win32/shell32_new/shobjidl_local.idl b/dll/win32/shell32_new/shobjidl_local.idl new file mode 100644 index 00000000000..1f90784d861 --- /dev/null +++ b/dll/win32/shell32_new/shobjidl_local.idl @@ -0,0 +1,2 @@ + +#include "shobjidl.idl" diff --git a/dll/win32/shell32_new/shpolicy.cpp b/dll/win32/shell32_new/shpolicy.cpp new file mode 100644 index 00000000000..965118e0cf1 --- /dev/null +++ b/dll/win32/shell32_new/shpolicy.cpp @@ -0,0 +1,905 @@ +/* + * shpolicy.c - Data for shell/system policies. + * + * Copyright 1999 Ian Schmidt + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES: + * + * Some of these policies can be tweaked via the System Policy + * Editor which came with the Win95 Migration Guide, although + * there doesn't appear to be an updated Win98 version that + * would handle the many new policies introduced since then. + * You could easily write one with the information in + * this file... + * + * Up to date as of SHELL32 v5.00 (W2K) + */ + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define SHELL_NO_POLICY 0xffffffff + +typedef struct tagPOLICYDAT +{ + RESTRICTIONS policy; /* policy value passed to SHRestricted */ + LPCSTR appstr; /* application str such as "Explorer" */ + LPCSTR keystr; /* name of the actual registry key / policy */ + DWORD cache; /* cached value or 0xffffffff for invalid */ +} POLICYDATA, *LPPOLICYDATA; + +/* registry strings */ +static const CHAR strRegistryPolicyA[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Policies"; +static const WCHAR strRegistryPolicyW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o', + 's','o','f','t','\\','W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n', + '\\','P','o','l','i','c','i','e','s',0}; +static const CHAR strPolicyA[] = "Policy"; +static const WCHAR strPolicyW[] = {'P','o','l','i','c','y',0}; + +/* application strings */ + +static const char strExplorer[] = {"Explorer"}; +static const char strActiveDesk[] = {"ActiveDesktop"}; +static const char strWinOldApp[] = {"WinOldApp"}; +static const char strAddRemoveProgs[] = {"AddRemoveProgs"}; + +/* key strings */ + +static const char strNoFileURL[] = {"NoFileUrl"}; +static const char strNoFolderOptions[] = {"NoFolderOptions"}; +static const char strNoChangeStartMenu[] = {"NoChangeStartMenu"}; +static const char strNoWindowsUpdate[] = {"NoWindowsUpdate"}; +static const char strNoSetActiveDesktop[] = {"NoSetActiveDesktop"}; +static const char strNoForgetSoftwareUpdate[] = {"NoForgetSoftwareUpdate"}; +static const char strNoMSAppLogo[] = {"NoMSAppLogo5ChannelNotify"}; +static const char strForceCopyACLW[] = {"ForceCopyACLWithFile"}; +static const char strNoResolveTrk[] = {"NoResolveTrack"}; +static const char strNoResolveSearch[] = {"NoResolveSearch"}; +static const char strNoEditComponent[] = {"NoEditingComponents"}; +static const char strNoMovingBand[] = {"NoMovingBands"}; +static const char strNoCloseDragDrop[] = {"NoCloseDragDropBands"}; +static const char strNoCloseComponent[] = {"NoClosingComponents"}; +static const char strNoDelComponent[] = {"NoDeletingComponents"}; +static const char strNoAddComponent[] = {"NoAddingComponents"}; +static const char strNoComponent[] = {"NoComponents"}; +static const char strNoChangeWallpaper[] = {"NoChangingWallpaper"}; +static const char strNoHTMLWallpaper[] = {"NoHTMLWallpaper"}; +static const char strNoCustomWebView[] = {"NoCustomizeWebView"}; +static const char strClassicShell[] = {"ClassicShell"}; +static const char strClearRecentDocs[] = {"ClearRecentDocsOnExit"}; +static const char strNoFavoritesMenu[] = {"NoFavoritesMenu"}; +static const char strNoActiveDesktopChanges[] = {"NoActiveDesktopChanges"}; +static const char strNoActiveDesktop[] = {"NoActiveDesktop"}; +static const char strNoRecentDocMenu[] = {"NoRecentDocsMenu"}; +static const char strNoRecentDocHistory[] = {"NoRecentDocsHistory"}; +static const char strNoInetIcon[] = {"NoInternetIcon"}; +static const char strNoSettingsWizard[] = {"NoSettingsWizards"}; +static const char strNoLogoff[] = {"NoLogoff"}; +static const char strNoNetConDis[] = {"NoNetConnectDisconnect"}; +static const char strNoViewContextMenu[] = {"NoViewContextMenu"}; +static const char strNoTrayContextMenu[] = {"NoTrayContextMenu"}; +static const char strNoWebMenu[] = {"NoWebMenu"}; +static const char strLnkResolveIgnoreLnkInfo[] = {"LinkResolveIgnoreLinkInfo"}; +static const char strNoCommonGroups[] = {"NoCommonGroups"}; +static const char strEnforceShlExtSecurity[] = {"EnforceShellExtensionSecurity"}; +static const char strNoRealMode[] = {"NoRealMode"}; +static const char strMyDocsOnNet[] = {"MyDocsOnNet"}; +static const char strNoStartMenuSubfolder[] = {"NoStartMenuSubFolders"}; +static const char strNoAddPrinters[] = {"NoAddPrinter"}; +static const char strNoDeletePrinters[] = {"NoDeletePrinter"}; +static const char strNoPrintTab[] = {"NoPrinterTabs"}; +static const char strRestrictRun[] = {"RestrictRun"}; +static const char strNoStartBanner[] = {"NoStartBanner"}; +static const char strNoNetworkNeighborhood[] = {"NoNetHood"}; +static const char strNoDriveTypeAtRun[] = {"NoDriveTypeAutoRun"}; +static const char strNoDrivesAutoRun[] = {"NoDriveAutoRun"}; +static const char strSeparateProcess[] = {"SeparateProcess"}; +static const char strNoDrives[] = {"NoDrives"}; +static const char strNoFind[] = {"NoFind"}; +static const char strNoDesktop[] = {"NoDesktop"}; +static const char strNoSetTaskBar[] = {"NoSetTaskbar"}; +static const char strNoSetFld[] = {"NoSetFolders"}; +static const char strNoFileMenu[] = {"NoFileMenu"}; +static const char strNoSaveSetting[] = {"NoSaveSettings"}; +static const char strNoClose[] = {"NoClose"}; +static const char strNoRun[] = {"NoRun"}; + +/* policy data array */ +static POLICYDATA sh32_policy_table[] = +{ + { + REST_NORUN, + strExplorer, + strNoRun, + SHELL_NO_POLICY + }, + { + REST_NOCLOSE, + strExplorer, + strNoClose, + SHELL_NO_POLICY + }, + { + REST_NOSAVESET, + strExplorer, + strNoSaveSetting, + SHELL_NO_POLICY + }, + { + REST_NOFILEMENU, + strExplorer, + strNoFileMenu, + SHELL_NO_POLICY + }, + { + REST_NOSETFOLDERS, + strExplorer, + strNoSetFld, + SHELL_NO_POLICY + }, + { + REST_NOSETTASKBAR, + strExplorer, + strNoSetTaskBar, + SHELL_NO_POLICY + }, + { + REST_NODESKTOP, + strExplorer, + strNoDesktop, + SHELL_NO_POLICY + }, + { + REST_NOFIND, + strExplorer, + strNoFind, + SHELL_NO_POLICY + }, + { + REST_NODRIVES, + strExplorer, + strNoDrives, + SHELL_NO_POLICY + }, + { + REST_NODRIVEAUTORUN, + strExplorer, + strNoDrivesAutoRun, + SHELL_NO_POLICY + }, + { + REST_NODRIVETYPEAUTORUN, + strExplorer, + strNoDriveTypeAtRun, + SHELL_NO_POLICY + }, + { + REST_NONETHOOD, + strExplorer, + strNoNetworkNeighborhood, + SHELL_NO_POLICY + }, + { + REST_STARTBANNER, + strExplorer, + strNoStartBanner, + SHELL_NO_POLICY + }, + { + REST_RESTRICTRUN, + strExplorer, + strRestrictRun, + SHELL_NO_POLICY + }, + { + REST_NOPRINTERTABS, + strExplorer, + strNoPrintTab, + SHELL_NO_POLICY + }, + { + REST_NOPRINTERDELETE, + strExplorer, + strNoDeletePrinters, + SHELL_NO_POLICY + }, + { + REST_NOPRINTERADD, + strExplorer, + strNoAddPrinters, + SHELL_NO_POLICY + }, + { + REST_NOSTARTMENUSUBFOLDERS, + strExplorer, + strNoStartMenuSubfolder, + SHELL_NO_POLICY + }, + { + REST_MYDOCSONNET, + strExplorer, + strMyDocsOnNet, + SHELL_NO_POLICY + }, + { + REST_NOEXITTODOS, + strWinOldApp, + strNoRealMode, + SHELL_NO_POLICY + }, + { + REST_ENFORCESHELLEXTSECURITY, + strExplorer, + strEnforceShlExtSecurity, + SHELL_NO_POLICY + }, + { + REST_LINKRESOLVEIGNORELINKINFO, + strExplorer, + strLnkResolveIgnoreLnkInfo, + SHELL_NO_POLICY + }, + { + REST_NOCOMMONGROUPS, + strExplorer, + strNoCommonGroups, + SHELL_NO_POLICY + }, + { + REST_SEPARATEDESKTOPPROCESS, + strExplorer, + strSeparateProcess, + SHELL_NO_POLICY + }, + { + REST_NOWEB, + strExplorer, + strNoWebMenu, + SHELL_NO_POLICY + }, + { + REST_NOTRAYCONTEXTMENU, + strExplorer, + strNoTrayContextMenu, + SHELL_NO_POLICY + }, + { + REST_NOVIEWCONTEXTMENU, + strExplorer, + strNoViewContextMenu, + SHELL_NO_POLICY + }, + { + REST_NONETCONNECTDISCONNECT, + strExplorer, + strNoNetConDis, + SHELL_NO_POLICY + }, + { + REST_STARTMENULOGOFF, + strExplorer, + strNoLogoff, + SHELL_NO_POLICY + }, + { + REST_NOSETTINGSASSIST, + strExplorer, + strNoSettingsWizard, + SHELL_NO_POLICY + }, + { + REST_NOINTERNETICON, + strExplorer, + strNoInetIcon, + SHELL_NO_POLICY + }, + { + REST_NORECENTDOCSHISTORY, + strExplorer, + strNoRecentDocHistory, + SHELL_NO_POLICY + }, + { + REST_NORECENTDOCSMENU, + strExplorer, + strNoRecentDocMenu, + SHELL_NO_POLICY + }, + { + REST_NOACTIVEDESKTOP, + strExplorer, + strNoActiveDesktop, + SHELL_NO_POLICY + }, + { + REST_NOACTIVEDESKTOPCHANGES, + strExplorer, + strNoActiveDesktopChanges, + SHELL_NO_POLICY + }, + { + REST_NOFAVORITESMENU, + strExplorer, + strNoFavoritesMenu, + SHELL_NO_POLICY + }, + { + REST_CLEARRECENTDOCSONEXIT, + strExplorer, + strClearRecentDocs, + SHELL_NO_POLICY + }, + { + REST_CLASSICSHELL, + strExplorer, + strClassicShell, + SHELL_NO_POLICY + }, + { + REST_NOCUSTOMIZEWEBVIEW, + strExplorer, + strNoCustomWebView, + SHELL_NO_POLICY + }, + { + REST_NOHTMLWALLPAPER, + strActiveDesk, + strNoHTMLWallpaper, + SHELL_NO_POLICY + }, + { + REST_NOCHANGINGWALLPAPER, + strActiveDesk, + strNoChangeWallpaper, + SHELL_NO_POLICY + }, + { + REST_NODESKCOMP, + strActiveDesk, + strNoComponent, + SHELL_NO_POLICY + }, + { + REST_NOADDDESKCOMP, + strActiveDesk, + strNoAddComponent, + SHELL_NO_POLICY + }, + { + REST_NODELDESKCOMP, + strActiveDesk, + strNoDelComponent, + SHELL_NO_POLICY + }, + { + REST_NOCLOSEDESKCOMP, + strActiveDesk, + strNoCloseComponent, + SHELL_NO_POLICY + }, + { + REST_NOCLOSE_DRAGDROPBAND, + strActiveDesk, + strNoCloseDragDrop, + SHELL_NO_POLICY + }, + { + REST_NOMOVINGBAND, + strActiveDesk, + strNoMovingBand, + SHELL_NO_POLICY + }, + { + REST_NOEDITDESKCOMP, + strActiveDesk, + strNoEditComponent, + SHELL_NO_POLICY + }, + { + REST_NORESOLVESEARCH, + strExplorer, + strNoResolveSearch, + SHELL_NO_POLICY + }, + { + REST_NORESOLVETRACK, + strExplorer, + strNoResolveTrk, + SHELL_NO_POLICY + }, + { + REST_FORCECOPYACLWITHFILE, + strExplorer, + strForceCopyACLW, + SHELL_NO_POLICY + }, +#if (NTDDI_VERSION < NTDDI_LONGHORN) + { + REST_NOLOGO3CHANNELNOTIFY, + strExplorer, + strNoMSAppLogo, + SHELL_NO_POLICY + }, +#endif + { + REST_NOFORGETSOFTWAREUPDATE, + strExplorer, + strNoForgetSoftwareUpdate, + SHELL_NO_POLICY + }, + { + REST_NOSETACTIVEDESKTOP, + strExplorer, + strNoSetActiveDesktop, + SHELL_NO_POLICY + }, + { + REST_NOUPDATEWINDOWS, + strExplorer, + strNoWindowsUpdate, + SHELL_NO_POLICY + }, + { + REST_NOCHANGESTARMENU, + strExplorer, + strNoChangeStartMenu, + SHELL_NO_POLICY + }, + { + REST_NOFOLDEROPTIONS, + strExplorer, + strNoFolderOptions, + SHELL_NO_POLICY + }, + { + REST_HASFINDCOMPUTERS, + strExplorer, + "FindComputers", + SHELL_NO_POLICY + }, + { + REST_INTELLIMENUS, + strExplorer, + "IntelliMenus", + SHELL_NO_POLICY + }, + { + REST_RUNDLGMEMCHECKBOX, + strExplorer, + "MemCheckBoxInRunDlg", + SHELL_NO_POLICY + }, + { + REST_ARP_ShowPostSetup, + strAddRemoveProgs, + "ShowPostSetup", + SHELL_NO_POLICY + }, + { + REST_NOCSC, + strExplorer, + "NoSyncAll", + SHELL_NO_POLICY + }, + { + REST_NOCONTROLPANEL, + strExplorer, + "NoControlPanel", + SHELL_NO_POLICY + }, + { + REST_ENUMWORKGROUP, + strExplorer, + "EnumWorkgroup", + SHELL_NO_POLICY + }, + { + REST_ARP_NOARP, + strAddRemoveProgs, + "NoAddRemovePrograms", + SHELL_NO_POLICY + }, + { + REST_ARP_NOREMOVEPAGE, + strAddRemoveProgs, + "NoRemovePage", + SHELL_NO_POLICY + }, + { + REST_ARP_NOADDPAGE, + strAddRemoveProgs, + "NoAddPage", + SHELL_NO_POLICY + }, + { + REST_ARP_NOWINSETUPPAGE, + strAddRemoveProgs, + "NoWindowsSetupPage", + SHELL_NO_POLICY + }, + { + REST_GREYMSIADS, + strExplorer, + "", + SHELL_NO_POLICY + }, + { + REST_NOCHANGEMAPPEDDRIVELABEL, + strExplorer, + "NoChangeMappedDriveLabel", + SHELL_NO_POLICY + }, + { + REST_NOCHANGEMAPPEDDRIVECOMMENT, + strExplorer, + "NoChangeMappedDriveComment", + SHELL_NO_POLICY + }, + { + REST_MaxRecentDocs, + strExplorer, + "MaxRecentDocs", + SHELL_NO_POLICY + }, + { + REST_NONETWORKCONNECTIONS, + strExplorer, + "NoNetworkConnections", + SHELL_NO_POLICY + }, + { + REST_FORCESTARTMENULOGOFF, + strExplorer, + "ForceStartMenuLogoff", + SHELL_NO_POLICY + }, + { + REST_NOWEBVIEW, + strExplorer, + "NoWebView", + SHELL_NO_POLICY + }, + { + REST_NOCUSTOMIZETHISFOLDER, + strExplorer, + "NoCustomizeThisFolder", + SHELL_NO_POLICY + }, + { + REST_NOENCRYPTION, + strExplorer, + "NoEncryption", + SHELL_NO_POLICY + }, + { + REST_ALLOWFRENCHENCRYPTION, + strExplorer, + "AllowFrenchEncryption", + SHELL_NO_POLICY + }, + { + REST_DONTSHOWSUPERHIDDEN, + strExplorer, + "DontShowSuperHidden", + SHELL_NO_POLICY + }, + { + REST_NOSHELLSEARCHBUTTON, + strExplorer, + "NoShellSearchButton", + SHELL_NO_POLICY + }, + { + REST_NOHARDWARETAB, + strExplorer, + "NoHardwareTab", + SHELL_NO_POLICY + }, + { + REST_NORUNASINSTALLPROMPT, + strExplorer, + "NoRunasInstallPrompt", + SHELL_NO_POLICY + }, + { + REST_PROMPTRUNASINSTALLNETPATH, + strExplorer, + "PromptRunasInstallNetPath", + SHELL_NO_POLICY + }, + { + REST_NOMANAGEMYCOMPUTERVERB, + strExplorer, + "NoManageMyComputerVerb", + SHELL_NO_POLICY + }, + { + REST_NORECENTDOCSNETHOOD, + strExplorer, + "NoRecentDocsNetHood", + SHELL_NO_POLICY + }, + { + REST_DISALLOWRUN, + strExplorer, + "DisallowRun", + SHELL_NO_POLICY + }, + { + REST_NOWELCOMESCREEN, + strExplorer, + "NoWelcomeScreen", + SHELL_NO_POLICY + }, + { + REST_RESTRICTCPL, + strExplorer, + "RestrictCpl", + SHELL_NO_POLICY + }, + { + REST_DISALLOWCPL, + strExplorer, + "DisallowCpl", + SHELL_NO_POLICY + }, + { + REST_NOSMBALLOONTIP, + strExplorer, + "NoSMBalloonTip", + SHELL_NO_POLICY + }, + { + REST_NOSMHELP, + strExplorer, + "NoSMHelp", + SHELL_NO_POLICY + }, + { + REST_NOWINKEYS, + strExplorer, + "NoWinKeys", + SHELL_NO_POLICY + }, + { + REST_NOENCRYPTONMOVE, + strExplorer, + "NoEncryptOnMove", + SHELL_NO_POLICY + }, + { + REST_NOLOCALMACHINERUN, + strExplorer, + "DisableLocalMachineRun", + SHELL_NO_POLICY + }, + { + REST_NOCURRENTUSERRUN, + strExplorer, + "DisableCurrentUserRun", + SHELL_NO_POLICY + }, + { + REST_NOLOCALMACHINERUNONCE, + strExplorer, + "DisableLocalMachineRunOnce", + SHELL_NO_POLICY + }, + { + REST_NOCURRENTUSERRUNONCE, + strExplorer, + "DisableCurrentUserRunOnce", + SHELL_NO_POLICY + }, + { + REST_FORCEACTIVEDESKTOPON, + strExplorer, + "ForceActiveDesktopOn", + SHELL_NO_POLICY + }, + { + REST_NOCOMPUTERSNEARME, + strExplorer, + "NoComputersNearMe", + SHELL_NO_POLICY + }, + { + REST_NOVIEWONDRIVE, + strExplorer, + "NoViewOnDrive", + SHELL_NO_POLICY + }, + { + REST_NONETCRAWL, + strExplorer, + "NoNetCrawl", + SHELL_NO_POLICY + }, + { + REST_NOSHAREDDOCUMENTS, + strExplorer, + "NoSharedDocs", + SHELL_NO_POLICY + }, + { + REST_NOSMMYDOCS, + strExplorer, + "NoSMMyDocs", + SHELL_NO_POLICY + }, +/* 0x4000050 - 0x4000060 */ + { + REST_NONLEGACYSHELLMODE, + strExplorer, + "NoneLegacyShellMode", + SHELL_NO_POLICY + }, + { + REST_STARTRUNNOHOMEPATH, + strExplorer, + "StartRunNoHOMEPATH", + SHELL_NO_POLICY + }, +/* 0x4000061 - 0x4000086 */ + { + REST_NODISCONNECT, + strExplorer, + "NoDisconnect", + SHELL_NO_POLICY + }, + { + REST_NOSECURITY, + strExplorer, + "NoNTSecurity", + SHELL_NO_POLICY + }, + { + REST_NOFILEASSOCIATE, + strExplorer, + "NoFileAssociate", + SHELL_NO_POLICY + }, + { + (RESTRICTIONS)0x50000024, + strExplorer, + strNoFileURL, + SHELL_NO_POLICY + }, + { + (RESTRICTIONS)0, + 0, + 0, + SHELL_NO_POLICY + } +}; + +/************************************************************************* + * SHRestricted [SHELL32.100] + * + * Get the value associated with a policy Id. + * + * PARAMS + * pol [I] Policy Id + * + * RETURNS + * The queried value for the policy. + * + * NOTES + * Exported by ordinal. + * This function caches the retrieved values to prevent unnecessary registry access, + * if SHInitRestricted() was previously called. + * + * REFERENCES + * a: MS System Policy Editor. + * b: 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/ + * c: 'The Windows 95 Registry', by John Woram, 1996 MIS: Press + */ +DWORD WINAPI SHRestricted (RESTRICTIONS policy) +{ + char regstr[256]; + HKEY xhkey; + DWORD retval, datsize = 4; + LPPOLICYDATA p; + + TRACE("(%08x)\n", policy); + + /* scan to see if we know this policy ID */ + for (p = sh32_policy_table; p->policy; p++) + { + if (policy == p->policy) + { + break; + } + } + + if (p->policy == 0) + { + /* we don't know this policy, return 0 */ + TRACE("unknown policy: (%08x)\n", policy); + return 0; + } + + /* we have a known policy */ + + /* first check if this policy has been cached, return it if so */ + if (p->cache != SHELL_NO_POLICY) + { + return p->cache; + } + + lstrcpyA(regstr, strRegistryPolicyA); + lstrcatA(regstr, p->appstr); + + /* return 0 and don't set the cache if any registry errors occur */ + retval = 0; + if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS) + { + if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS) + { + p->cache = retval; + } + RegCloseKey(xhkey); + } + return retval; +} + +/************************************************************************* + * SHInitRestricted [SHELL32.244] + * + * Initialise the policy cache to speed up calls to SHRestricted(). + * + * PARAMS + * unused [I] Reserved. + * inpRegKey [I] Registry key to scan. + * + * RETURNS + * Success: -1. The policy cache is initialised. + * Failure: 0, if inpRegKey is any value other than NULL, "Policy", or + * "Software\Microsoft\Windows\CurrentVersion\Policies". + * + * NOTES + * Exported by ordinal. Introduced in Win98. + */ +BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey) +{ + TRACE("(%p, %p)\n", unused, inpRegKey); + + /* first check - if input is non-NULL and points to the secret + key string, then pass. Otherwise return 0. + */ + if (inpRegKey != NULL) + { + if (SHELL_OsIsUnicode()) + { + if (lstrcmpiW((LPCWSTR)inpRegKey, strRegistryPolicyW) && + lstrcmpiW((LPCWSTR)inpRegKey, strPolicyW)) + /* doesn't match, fail */ + return 0; + } + else + { + if (lstrcmpiA((LPCSTR)inpRegKey, strRegistryPolicyA) && + lstrcmpiA((LPCSTR)inpRegKey, strPolicyA)) + /* doesn't match, fail */ + return 0; + } + } + + return TRUE; +} diff --git a/dll/win32/shell32_new/shresdef.h b/dll/win32/shell32_new/shresdef.h new file mode 100644 index 00000000000..15c984812b2 --- /dev/null +++ b/dll/win32/shell32_new/shresdef.h @@ -0,0 +1,462 @@ +/* + * Copyright 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_SHELL_RES_H +#define __WINE_SHELL_RES_H + +#define IDC_STATIC -1 + +/* Bitmap ID's */ +#define IDB_SHELL_ABOUT_LOGO_24BPP 131 + +/* + columntitles for the shellview +*/ +#define IDS_SHV_COLUMN1 7 +#define IDS_SHV_COLUMN2 8 +#define IDS_SHV_COLUMN3 9 +#define IDS_SHV_COLUMN4 10 +#define IDS_SHV_COLUMN5 11 +#define IDS_SHV_COLUMN6 12 +#define IDS_SHV_COLUMN7 13 +#define IDS_SHV_COLUMN8 14 +#define IDS_SHV_COLUMN9 15 +#define IDS_SHV_COLUMN10 16 +#define IDS_SHV_COLUMN11 17 +#define IDS_SHV_COLUMN_DELFROM 18 +#define IDS_SHV_COLUMN_DELDATE 19 + +#define IDS_DESKTOP 20 +#define IDS_MYCOMPUTER 21 + +#define IDS_SELECT 22 +#define IDS_OPEN 23 +#define IDS_VIEW_LARGE 24 +#define IDS_VIEW_SMALL 25 +#define IDS_VIEW_LIST 26 +#define IDS_VIEW_DETAILS 27 + +#define IDS_RESTART_TITLE 40 +#define IDS_RESTART_PROMPT 41 +#define IDS_SHUTDOWN_TITLE 42 +#define IDS_SHUTDOWN_PROMPT 43 + +#define IDS_PROGRAMS 45 +#define IDS_PERSONAL 46 +#define IDS_FAVORITES 47 +#define IDS_STARTUP 48 +#define IDS_RECENT 49 +#define IDS_SENDTO 50 +#define IDS_STARTMENU 51 +#define IDS_MYMUSIC 52 +#define IDS_MYVIDEO 53 +#define IDS_DESKTOPDIRECTORY 54 +#define IDS_NETHOOD 55 +#define IDS_TEMPLATES 56 +#define IDS_APPDATA 57 +#define IDS_PRINTHOOD 58 +#define IDS_LOCAL_APPDATA 59 +#define IDS_INTERNET_CACHE 60 +#define IDS_COOKIES 61 +#define IDS_HISTORY 62 +#define IDS_PROGRAM_FILES 63 +#define IDS_MYPICTURES 64 +#define IDS_PROGRAM_FILES_COMMON 65 +#define IDS_COMMON_DOCUMENTS 66 +#define IDS_ADMINTOOLS 67 +#define IDS_COMMON_MUSIC 68 +#define IDS_COMMON_PICTURES 69 +#define IDS_COMMON_VIDEO 70 +#define IDS_CDBURN_AREA 71 +#define IDS_DRIVE_FIXED 72 +#define IDS_DRIVE_CDROM 73 +#define IDS_DRIVE_NETWORK 74 +#define IDS_NETWORKPLACE 75 +#define IDS_FONTS 76 +#define IDS_PRINTERS 77 + +#define IDS_LOGOFF_TITLE 78 +#define IDS_LOGOFF_PROMPT 79 + +#define IDS_CREATEFOLDER_DENIED 128 +#define IDS_CREATEFOLDER_CAPTION 129 +#define IDS_DELETEITEM_CAPTION 130 +#define IDS_DELETEFOLDER_CAPTION 131 +#define IDS_DELETEITEM_TEXT 132 +#define IDS_DELETEMULTIPLE_TEXT 133 +#define IDS_OVERWRITEFILE_CAPTION 134 +#define IDS_OVERWRITEFILE_TEXT 135 +#define IDS_DELETESELECTED_TEXT 136 +#define IDS_TRASHFOLDER_TEXT 137 +#define IDS_TRASHITEM_TEXT 138 +#define IDS_TRASHMULTIPLE_TEXT 139 +#define IDS_CANTTRASH_TEXT 140 +#define IDS_OVERWRITEFOLDER_TEXT 141 +#define IDS_OPEN_WITH 142 +#define IDS_OPEN_WITH_CHOOSE 143 +#define IDS_SHELL_ABOUT_AUTHORS 144 +#define IDS_SHELL_ABOUT_BACK 145 +#define FCIDM_SHVIEW_NEW 146 +#define FCIDM_SHVIEW_VIEW 147 +#define IDS_CONTROLPANEL 148 +#define IDS_NEWFOLDER 149 +#define IDS_FOLDER_OPTIONS 150 +#define IDS_COLUMN_EXTENSION 151 +#define IDS_NO_EXTENSION 152 +#define IDS_RECYCLEBIN_LOCATION 153 +#define IDS_RECYCLEBIN_DISKSPACE 154 +#define IDS_OPEN_WITH_FILTER 155 +#define IDS_DIRECTORY 156 +#define IDS_VIRTUAL_DRIVER 157 +#define IDS_BAT_FILE 158 +#define IDS_CMD_FILE 159 +#define IDS_COM_FILE 160 +#define IDS_CPL_FILE 161 +#define IDS_CUR_FILE 162 +#define IDS_DLL_FILE 163 +#define IDS_DRV_FILE 164 +#define IDS_EXE_FILE 165 +#define IDS_FON_FILE 166 +#define IDS_TTF_FILE 167 +#define IDS_HLP_FILE 168 +#define IDS_INI_FILE 169 +#define IDS_LNK_FILE 170 +#define IDS_SYS_FILE 171 +#define IDS_EMPTY_BITBUCKET 172 +#define IDS_SHLEXEC_NOASSOC 173 +#define IDS_FILE_TYPES 174 +#define IDS_FILE_DETAILS 175 + +#define IDS_OPEN_VERB 300 +#define IDS_EXPLORE_VERB 301 +#define IDS_RUNAS_VERB 302 +#define IDS_EDIT_VERB 303 +#define IDS_FIND_VERB 304 +#define IDS_PRINT_VERB 305 +#define IDS_PLAY_VERB 306 +#define IDS_PREVIEW_VERB 307 +#define IDS_FILE_FOLDER 308 +#define IDS_CREATELINK 309 +#define IDS_INSTALLNEWFONT 310 +#define IDS_SHV_COLUMN_FONTTYPE 311 +#define IDS_SHV_COLUMN12 312 +#define IDS_SHV_COLUMN13 313 +#define IDS_SHV_COLUMN_WORKGROUP 314 +#define IDS_SHV_NETWORKLOCATION 315 +#define IDS_COPY 316 +#define IDS_DELETE 317 +#define IDS_PROPERTIES 318 +#define IDS_SHV_COLUMN_DOCUMENTS 319 +#define IDS_SHV_COLUMN_STATUS 320 +#define IDS_SHV_COLUMN_COMMENTS 321 +#define IDS_SHV_COLUMN_LOCATION 322 +#define IDS_SHV_COLUMN_MODEL 323 +#define IDS_CUT 324 +#define IDS_RESTORE 325 +#define IDS_DEFAULT_CLUSTER_SIZE 326 +#define IDS_ADMINISTRATIVETOOLS 327 +#define IDS_FORMATDRIVE 328 +#define IDS_RENAME 329 +#define IDS_INSERT 330 +#define IDS_DESCRIPTION 331 +#define IDS_COPY_OF 332 + +/* Note: this string is referenced from the registry */ +#define IDS_RECYCLEBIN_FOLDER_NAME 8964 + +#define IDD_ICON 0x4300 +#define IDD_MESSAGE 0x4301 + +/* these IDs are the same as on native */ +#define IDD_YESTOALL 0x3207 + +/* browse for folder dialog box */ +#define IDD_MAKENEWFOLDER 0x3746 +#define IDD_FOLDERTEXT 0x3745 +#define IDD_FOLDER 0x3744 +#define IDD_STATUS 0x3743 +#define IDD_TITLE 0x3742 +#define IDD_TREEVIEW 0x3741 +#define SHELL_EXTENDED_SHORTCUT_DLG 0x4000 +#define OPEN_WITH_PROGRAMM_DLG 0x4001 +#define IDD_SH_FILE_COPY 0x4002 + +/* ID's of the ShellAbout controls */ +// Part 1 - ID's identical to Windows Server 2003 SP1's shell32.dll +#define IDD_SHELL_ABOUT 0x3810 +#define IDC_SHELL_ABOUT_ICON 0x3009 +#define IDC_SHELL_ABOUT_APPNAME 0x3500 +#define IDC_SHELL_ABOUT_OTHERSTUFF 0x350D +#define IDC_SHELL_ABOUT_REG_USERNAME 0x3507 +#define IDC_SHELL_ABOUT_REG_ORGNAME 0x3508 +#define IDC_SHELL_ABOUT_PHYSMEM 0x3503 + +// Part 2 - ReactOS-specific ID's +#define IDD_SHELL_ABOUT_AUTHORS 0x4100 +#define IDC_SHELL_ABOUT_AUTHORS 0x4101 +#define IDC_SHELL_ABOUT_AUTHORS_LISTBOX 0x4102 +#define IDD_PICK_ICON_DIALOG 0x4120 +#define IDC_PICKICON_LIST 0x4121 +#define IDC_BUTTON_PATH 0x4122 +#define IDC_EDIT_PATH 0x4123 +#define IDS_PICK_ICON_TITLE 0x4124 +#define IDS_PICK_ICON_FILTER 0x4125 + +#define IDI_SHELL_DOCUMENT 1 +#define IDI_SHELL_RICH_TEXT 2 +#define IDI_SHELL_EXE 3 +#define IDI_SHELL_FOLDER 4 +#define IDI_SHELL_FOLDER_OPEN 5 +#define IDI_SHELL_5_12_FLOPPY 6 +#define IDI_SHELL_3_14_FLOPPY 7 +#define IDI_SHELL_FLOPPY 8 +#define IDI_SHELL_DRIVE 9 +#define IDI_SHELL_NETDRIVE 10 +#define IDI_SHELL_NETDRIVE2 11 +#define IDI_SHELL_CDROM 12 +#define IDI_SHELL_RAMDISK 13 +#define IDI_SHELL_ENTIRE_NETWORK 14 +#define IDI_SHELL_NETWORK 15 +#define IDI_SHELL_MY_COMPUTER 16 +#define IDI_SHELL_PRINTER 17 +#define IDI_SHELL_MY_NETWORK_PLACES 18 +#define IDI_SHELL_COMPUTERS_NEAR_ME 19 +#define IDI_SHELL_PROGRAMS_FOLDER 20 +#define IDI_SHELL_RECENT_DOCUMENTS 21 +#define IDI_SHELL_CONTROL_PANEL 22 +#define IDI_SHELL_SEARCH 23 +#define IDI_SHELL_HELP 24 +#define IDI_SHELL_RUN 25 +/* TODO: 26.ico, 27.ico */ +#define IDI_SHELL_SHUTDOWN 28 +#define IDI_SHELL_SHARE 29 +#define IDI_SHELL_SHORTCUT 30 +#define IDI_SHELL_FOLDER_OPEN_SMALL 31 /* ??? */ +#define IDI_SHELL_EMPTY_RECYCLE_BIN 32 +#define IDI_SHELL_FULL_RECYCLE_BIN 33 +/* TODO: 34.ico */ +#define IDI_SHELL_DESKTOP 35 +#define IDI_SHELL_CONTROL_PANEL2 36 +#define IDI_SHELL_PROGRAMS_FOLDER2 37 +#define IDI_SHELL_PRINTERS_FOLDER 38 +#define IDI_SHELL_FONTS_FOLDER 39 +#define IDI_SHELL_TSKBAR_STARTMENU 40 +#define IDI_SHELL_CD_MUSIC 41 +/* TODO: 42.ico, 43.ico */ +#define IDI_SHELL_FAVORITES 44 +#define IDI_SHELL_LOGOFF 45 +#define IDI_SHELL_EXPLORER 46 +#define IDI_SHELL_UPDATE 47 +#define IDI_SHELL_LOCKED 48 +#define IDI_SHELL_NOT_CONNECTED_HDD 54 +/* TODO: 133.ico */ +#define IDI_SHELL_FIND_IN_FILE 134 +#define IDI_SHELL_OPEN_WITH 135 +#define IDI_SHELL_CONTROL_PANEL3 137 +#define IDI_SHELL_PRINTER2 138 +/* TODO: 139.ico, 140.ico, 141.ico */ +#define IDI_SHELL_TRASH_FILE 142 +/* TODO: 143.ico, 144,ico, 145.ico, 146.ico, 147.ico, 148.ico */ +#define IDI_SHELL_INF_FILE 151 +#define IDI_SHELL_TEXT_FILE 152 +#define IDI_SHELL_BAT_FILE 153 +#define IDI_SHELL_SYSTEM_FILE 154 +#define IDI_SHELL_FONT_FILE 155 +#define IDI_SHELL_TT_FONT_FILE 156 +#define IDI_SHELL_FONT_FILE2 157 +#define IDI_SHELL_RUN2 160 +#define IDI_SHELL_CONFIRM_DELETE 161 +/* TODO: 165.ico, 166.ico, 167.ico, 168.ico, 169.ico, 170.ico, 171.ico */ +#define IDI_SHELL_NETWORK_FOLDER 172 +#define IDI_SHELL_FAVORITES2 173 +/* TODO: 174.ico, 175.ico, 176.ico, 177.ico, 178.ico, 179.ico, 180.ico, 181.ico */ +#define IDI_SHELL_EMPTY_RECYCLE_BIN1 191 +#define IDI_SHELL_FULL_RECYCLE_BIN1 192 +/* TODO: 193.ico, 194.ico, 196.ico, 197.ico, 198.ico, 199.ico, 200.ico */ +#define IDI_SHELL_FOLDER_OPTIONS 210 +#define IDI_SHELL_USERS2 220 +#define IDI_SHELL_TURN_OFF 221 +#define IDI_SHELL_DVD_ROM 222 +/* TODO: 223.ico */ +#define IDI_SHELL_MOVIE_FILE 224 +#define IDI_SHELL_MUSIC_FILE 225 +#define IDI_SHELL_PICTURE_FILE 226 +/* TODO: 227.ico */ +#define IDI_SHELL_CD_MUSIC2 228 +/* TODO: 229.ico, 230.ico, 231.ico, 232.ico */ +#define IDI_SHELL_FDD 233 +/* TODO: 234.ico */ +#define IDI_SHELL_MY_DOCUMENTS 235 +#define IDI_SHELL_MY_PICTURES 236 +#define IDI_SHELL_MY_MUSIC 237 +#define IDI_SHELL_MY_MOVIES 238 +/* TODO: 239.ico */ +#define IDI_SHELL_FULL_RECYCLE_BIN2 240 +/* TODO: 241.ico, 242.ico, 243.ico, 244.ico */ +#define IDI_SHELL_PRINTER3 245 +#define IDI_SHELL_ICON_246 246 +/* TODO: 247.ico */ +#define IDI_SHELL_CAMERA 248 +#define IDI_SHELL_SLIDE_SHOW 249 +#define IDI_SHELL_DISPLAY 250 +/* TODO: 251.ico */ +#define IDI_SHELL_PRINT_PICS 252 +/* TODO: 253.ico */ +#define IDI_SHELL_EMPTY_RECYCLE_BIN3 254 +#define IDI_SHELL_ICON_255 255 +/* TODO: 256.ico, 257.ico, 258.ico, 259.ico, 260.ico, 261.ico, 262.ico */ +#define IDI_SHELL_HELP1 263 +/* TODO: 264.ico */ +#define IDI_SHELL_SENDMAIL 265 +/* TODO: 266.ico, 267.ico */ +#define IDI_SHELL_ACCESSABILITY 268 +#define IDI_SHELL_USERS 269 +#define IDI_SHELL_SCREEN_COLORS 270 +#define IDI_SHELL_ADD_REM_PROGRAMS 271 +/* TODO: 272.ico, 273.ico, 274.ico, 275.ico, 276.ico */ +#define IDI_SHELL_TUNES 277 +/* TODO: 278.ico */ +#define IDI_SHELL_USER_ACCOUNTS 279 +/* TODO: 281.ico, 282.ico, 283.ico, 284.ico */ +#define IDI_SHELL_HELP_FILE 289 +#define IDI_SHELL_GO 290 +#define IDI_SHELL_DVD_DRIVE 291 +#define IDI_SHELL_CD_ADD_MUSIC 292 +#define IDI_SHELL_CD 293 +#define IDI_SHELL_CD_ROM 294 +#define IDI_SHELL_CDR 295 +#define IDI_SHELL_CDRW 296 +#define IDI_SHELL_DVD_RAM 297 +#define IDI_SHELL_DVDR_ROM 298 +#define IDI_SHELL_MP3_PLAYER 299 +/* TODO: 300.ico, 301.ico */ +#define IDI_SHELL_CD_ROM1 302 +/* TODO: 303.ico */ +#define IDI_SHELL_DVD_ROM1 304 +#define IDI_SHELL_FDD2 305 +/* TODO: 306.ico, 307.ico, 308.ico */ +#define IDI_SHELL_CAMERA1 309 +/* TODO: 310.ico, 311.ico, 312.ico, 313.ico, 314.ico */ +#define IDI_SHELL_SCANNER 315 +/* TODO: 316.ico */ +#define IDI_SHELL_CAMCORDER 317 +#define IDI_SHELL_DVDRW_ROM 318 +#define IDI_SHELL_NEW_FOLDER 319 +/* TODO: 320.ico, 321.ico */ +#define IDI_SHELL_FAVOTITES 322 +#define IDI_SHELL_SEARCH1 323 +#define IDI_SHELL_HELP2 324 +#define IDI_SHELL_LOGOFF1 325 +#define IDI_SHELL_PROGRAMS_FOLDER1 326 +#define IDI_SHELL_RECENT_DOCUMENTS1 327 +#define IDI_SHELL_RUN1 328 +#define IDI_SHELL_SHUTDOWN1 329 +#define IDI_SHELL_CONTROL_PANEL1 330 +/* TODO: 331.ico, 337.ico, 338.ico, 512.ico */ +#define IDI_SHELL_IDEA 1001 +/* TODO: 1002.ico, 1003.ico */ +#define IDI_SHELL_HELP_FILE1 1004 +/* TODO: 1005.ico, 1006.ico, 1007.ico, 1008.ico, 1009.ico, 1010.ico, 1011.ico */ +#define IDI_SHELL_SHUTDOWN2 8240 + +#define IDI_SHELL_DELETE1 16710 +#define IDI_SHELL_DELETE2 16715 +#define IDI_SHELL_DELETE3 16717 +#define IDI_SHELL_DELETE4 16718 +#define IDI_SHELL_DELETE5 16721 + +#define IDI_SHELL_ADMINTOOLS 1700 /* FIXME */ + +// Icons for Folder Options (ID's identical to Windows XP SP3) +#define IDI_SHELL_SHOW_COMMON_TASKS 182 +#define IDI_SHELL_CLASSIC_FOLDERS 183 +#define IDI_SHELL_OPEN_IN_SOME_WINDOW 184 +#define IDI_SHELL_OPEN_IN_NEW_WINDOW 185 +#define IDI_SHELL_SINGLE_CLICK_TO_OPEN 186 +#define IDI_SHELL_DOUBLE_CLICK_TO_OPEN 187 + +/* +AVI resources, windows shell32 has 14 of them: 150-152 and 160-170 +FIXME: Need to add them, but for now just let them use the same: searching.avi +(also to limit shell32's size) +*/ +#define IDR_AVI_SEARCH 150 +#define IDR_AVI_SEARCHING 151 +#define IDR_AVI_FINDCOMPUTER 152 +#define IDR_AVI_FILEMOVE 160 +#define IDR_AVI_FILECOPY 161 +#define IDR_AVI_FILENUKE 163 +#define IDR_AVI_FILEDELETE 164 + +#define FCIDM_SHVIEW_ARRANGE 0x7001 +#define FCIDM_SHVIEW_DELETE 0x7011 +#define FCIDM_SHVIEW_PROPERTIES 0x7013 +#define FCIDM_SHVIEW_CUT 0x7018 +#define FCIDM_SHVIEW_COPY 0x7019 +#define FCIDM_SHVIEW_INSERT 0x701A +#define FCIDM_SHVIEW_UNDO 0x701B +#define FCIDM_SHVIEW_INSERTLINK 0x701C +#define FCIDM_SHVIEW_SELECTALL 0x7021 +#define FCIDM_SHVIEW_INVERTSELECTION 0x7022 + +#define FCIDM_SHVIEW_BIGICON 0x7029 //FIXME +#define FCIDM_SHVIEW_SMALLICON 0x702A //FIXME +#define FCIDM_SHVIEW_LISTVIEW 0x702B //FIXME +#define FCIDM_SHVIEW_REPORTVIEW 0x702C //FIXME +/* 0x7030-0x703f are used by the shellbrowser */ +#define FCIDM_SHVIEW_AUTOARRANGE 0x7031 +#define FCIDM_SHVIEW_SNAPTOGRID 0x7032 + +#define FCIDM_SHVIEW_HELP 0x7041 +#define FCIDM_SHVIEW_RENAME 0x7050 +#define FCIDM_SHVIEW_CREATELINK 0x7051 +#define FCIDM_SHVIEW_NEWLINK 0x7052 +#define FCIDM_SHVIEW_NEWFOLDER 0x7053 + +#define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */ +#define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */ +#define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */ + + +#define FCIDM_TB_UPFOLDER 0xA001 +#define FCIDM_TB_NEWFOLDER 0xA002 +#define FCIDM_TB_SMALLICON 0xA003 +#define FCIDM_TB_REPORTVIEW 0xA004 +#define FCIDM_TB_DESKTOP 0xA005 /* FIXME */ + +/* .rgs files */ +#define IDR_ADMINFOLDERSHORTCUT 128 +#define IDR_AUTOCOMPLETE 129 +#define IDR_CONTROLPANEL 130 +#define IDR_DRAGDROPHELPER 131 +#define IDR_FOLDEROPTIONS 132 +#define IDR_FOLDERSHORTCUT 133 +#define IDR_FONTSFOLDERSHORTCUT 134 +#define IDR_MENUBANDSITE 135 +#define IDR_MYCOMPUTER 136 +#define IDR_MYDOCUMENTS 137 +#define IDR_NETWORKPLACES 138 +#define IDR_NEWMENU 139 +#define IDR_PRINTERS 140 +#define IDR_RECYCLEBIN 141 +#define IDR_SHELLDESKTOP 142 +#define IDR_SHELLFSFOLDER 143 +#define IDR_SHELLLINK 144 +#define IDR_STARTMENU 145 + +#endif diff --git a/dll/win32/shell32_new/shv_def_cmenu.cpp b/dll/win32/shell32_new/shv_def_cmenu.cpp new file mode 100644 index 00000000000..0914b3cc4ae --- /dev/null +++ b/dll/win32/shell32_new/shv_def_cmenu.cpp @@ -0,0 +1,1743 @@ +/* + * PROJECT: shell32 + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/win32/shell32/shv_item_new.c + * PURPOSE: provides default context menu implementation + * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + */ + +/* +TODO: +1. In DoStaticShellExtensions, check for "Explore" and "Open" verbs, and for BrowserFlags or + ExplorerFlags under those entries. These flags indicate if we should browse to the new item + instead of attempting to open it. +2. The code in NotifyShellViewWindow to deliver commands to the view is broken. It is an excellent + example of the wrong way to do it. +*/ + +#include +#include +#include +#include +#include +#include "shelllink.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dmenu); + +typedef struct _DynamicShellEntry_ +{ + UINT iIdCmdFirst; + UINT NumIds; + CLSID ClassID; + IContextMenu * CMenu; + struct _DynamicShellEntry_ * Next; +}DynamicShellEntry, *PDynamicShellEntry; + +typedef struct _StaticShellEntry_ +{ + LPWSTR szVerb; + LPWSTR szClass; + struct _StaticShellEntry_ * Next; +}StaticShellEntry, *PStaticShellEntry; + +WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); + +class IDefaultContextMenuImpl : + public CComObjectRootEx, + public IContextMenu2 +{ +private: + DEFCONTEXTMENU dcm; + IDataObject * pDataObj; + DWORD bGroupPolicyActive; + PDynamicShellEntry dhead; /* first dynamic shell extension entry */ + UINT iIdSHEFirst; /* first used id */ + UINT iIdSHELast; /* last used id */ + PStaticShellEntry shead; /* first static shell extension entry */ + UINT iIdSCMFirst; /* first static used id */ + UINT iIdSCMLast; /* last static used id */ +public: + IDefaultContextMenuImpl(); + ~IDefaultContextMenuImpl(); + HRESULT WINAPI Initialize(const DEFCONTEXTMENU *pdcm); + void SH_AddStaticEntry(const WCHAR *szVerb, const WCHAR *szClass); + void SH_AddStaticEntryForKey(HKEY hKey, const WCHAR *szClass); + void SH_AddStaticEntryForFileClass(const WCHAR *szExt); + BOOL IsShellExtensionAlreadyLoaded(const CLSID *szClass); + HRESULT SH_LoadDynamicContextMenuHandler(HKEY hKey, const CLSID *szClass, BOOL bExternalInit); + UINT EnumerateDynamicContextHandlerForKey(HKEY hRootKey); + UINT InsertMenuItemsOfDynamicContextMenuExtension(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast); + UINT BuildBackgroundContextMenu(HMENU hMenu, UINT iIdCmdFirst, UINT iIdCmdLast, UINT uFlags); + UINT AddStaticContextMenusToMenu(HMENU hMenu, UINT indexMenu); + UINT BuildShellItemContextMenu(HMENU hMenu, UINT iIdCmdFirst, UINT iIdCmdLast, UINT uFlags); + HRESULT DoPaste(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoOpenOrExplore(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoCreateLink(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoDelete(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoCopyOrCut(LPCMINVOKECOMMANDINFO lpcmi, BOOL bCopy); + HRESULT DoRename(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoProperties(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoFormat(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoDynamicShellExtensions(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoStaticShellExtensions(LPCMINVOKECOMMANDINFO lpcmi); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + +BEGIN_COM_MAP(IDefaultContextMenuImpl) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) +END_COM_MAP() +}; + +IDefaultContextMenuImpl::IDefaultContextMenuImpl() +{ + memset (&dcm, 0, sizeof(dcm)); + pDataObj = NULL; + bGroupPolicyActive = 0; + dhead = NULL; + iIdSHEFirst = 0; + iIdSHELast = 0; + shead = NULL; + iIdSCMFirst = 0; + iIdSCMLast = 0; +} + +IDefaultContextMenuImpl::~IDefaultContextMenuImpl() +{ + PDynamicShellEntry dEntry, dNext; + PStaticShellEntry sEntry, sNext; + + /* free dynamic shell extension entries */ + dEntry = dhead; + while (dEntry) + { + dNext = dEntry->Next; + dEntry->CMenu->Release(); + HeapFree(GetProcessHeap(), 0, dEntry); + dEntry = dNext; + } + /* free static shell extension entries */ + sEntry = shead; + while (sEntry) + { + sNext = sEntry->Next; + HeapFree(GetProcessHeap(), 0, sEntry->szClass); + HeapFree(GetProcessHeap(), 0, sEntry->szVerb); + HeapFree(GetProcessHeap(), 0, sEntry); + sEntry = sNext; + } +} + +HRESULT WINAPI IDefaultContextMenuImpl::Initialize(const DEFCONTEXTMENU *pdcm) +{ + IDataObject *newDataObj; + + TRACE("cidl %u\n", dcm.cidl); + if (SUCCEEDED(SHCreateDataObject(pdcm->pidlFolder, pdcm->cidl, pdcm->apidl, NULL, IID_IDataObject, (void**)&newDataObj))) + pDataObj = newDataObj; + CopyMemory(&dcm, pdcm, sizeof(DEFCONTEXTMENU)); + return S_OK; +} + +void +IDefaultContextMenuImpl::SH_AddStaticEntry(const WCHAR *szVerb, const WCHAR * szClass) +{ + PStaticShellEntry curEntry; + PStaticShellEntry lastEntry = NULL; + + curEntry = shead; + while(curEntry) + { + if (!wcsicmp(curEntry->szVerb, szVerb)) + { + /* entry already exists */ + return; + } + lastEntry = curEntry; + curEntry = curEntry->Next; + } + + TRACE("adding verb %s szClass %s\n", debugstr_w(szVerb), debugstr_w(szClass)); + + curEntry = (StaticShellEntry *)HeapAlloc(GetProcessHeap(), 0, sizeof(StaticShellEntry)); + if (curEntry) + { + curEntry->Next = NULL; + curEntry->szVerb = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(szVerb)+1) * sizeof(WCHAR)); + if (curEntry->szVerb) + wcscpy(curEntry->szVerb, szVerb); + curEntry->szClass = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(szClass)+1) * sizeof(WCHAR)); + if (curEntry->szClass) + wcscpy(curEntry->szClass, szClass); + } + + if (!wcsicmp(szVerb, L"open")) + { + /* open verb is always inserted in front */ + curEntry->Next = shead; + shead = curEntry; + return; + } + + + + if (lastEntry) + { + lastEntry->Next = curEntry; + } + else + { + shead = curEntry; + } +} + +void +IDefaultContextMenuImpl::SH_AddStaticEntryForKey(HKEY hKey, const WCHAR * szClass) +{ + LONG result; + DWORD dwIndex; + WCHAR szName[40]; + DWORD dwName; + + dwIndex = 0; + do + { + szName[0] = 0; + dwName = sizeof(szName) / sizeof(WCHAR); + result = RegEnumKeyExW(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); + szName[(sizeof(szName)/sizeof(WCHAR))-1] = 0; + if (result == ERROR_SUCCESS) + { + SH_AddStaticEntry(szName, szClass); + } + dwIndex++; + }while(result == ERROR_SUCCESS); +} + +void +IDefaultContextMenuImpl::SH_AddStaticEntryForFileClass(const WCHAR * szExt) +{ + WCHAR szBuffer[100]; + HKEY hKey; + LONG result; + DWORD dwBuffer; + UINT Length; + static WCHAR szShell[] = L"\\shell"; + static WCHAR szShellAssoc[] = L"SystemFileAssociations\\"; + + TRACE("SH_AddStaticEntryForFileClass entered with %s\n", debugstr_w(szExt)); + + Length = wcslen(szExt); + if (Length + (sizeof(szShell)/sizeof(WCHAR)) + 1 < sizeof(szBuffer)/sizeof(WCHAR)) + { + wcscpy(szBuffer, szExt); + wcscpy(&szBuffer[Length], szShell); + result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); + if (result == ERROR_SUCCESS) + { + szBuffer[Length] = 0; + SH_AddStaticEntryForKey(hKey, szExt); + RegCloseKey(hKey); + } + } + + dwBuffer = sizeof(szBuffer); + result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, NULL, RRF_RT_REG_SZ, NULL, (LPBYTE)szBuffer, &dwBuffer); + if (result == ERROR_SUCCESS) + { + Length = wcslen(szBuffer); + if (Length + (sizeof(szShell)/sizeof(WCHAR)) + 1 < sizeof(szBuffer)/sizeof(WCHAR)) + { + wcscpy(&szBuffer[Length], szShell); + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + + result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); + if (result == ERROR_SUCCESS) + { + szBuffer[Length] = 0; + SH_AddStaticEntryForKey(hKey, szBuffer); + RegCloseKey(hKey); + } + } + } + + wcscpy(szBuffer, szShellAssoc); + dwBuffer = sizeof(szBuffer) - sizeof(szShellAssoc) - sizeof(WCHAR); + result = RegGetValueW(HKEY_CLASSES_ROOT, szExt, L"PerceivedType", RRF_RT_REG_SZ, NULL, (LPBYTE)&szBuffer[_countof(szShellAssoc) - 1], &dwBuffer); + if (result == ERROR_SUCCESS) + { + Length = wcslen(&szBuffer[_countof(szShellAssoc)]) + _countof(szShellAssoc); + wcscat(szBuffer, L"\\shell"); + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + + result = RegOpenKeyExW(HKEY_CLASSES_ROOT, szBuffer, 0, KEY_READ | KEY_QUERY_VALUE, &hKey); + if (result == ERROR_SUCCESS) + { + szBuffer[Length] = 0; + SH_AddStaticEntryForKey(hKey, szBuffer); + RegCloseKey(hKey); + } + } +} + +static +BOOL +HasClipboardData() +{ + BOOL ret = FALSE; + IDataObject * pda; + + if(SUCCEEDED(OleGetClipboard(&pda))) + { + STGMEDIUM medium; + FORMATETC formatetc; + + TRACE("pda=%p\n", pda); + + /* Set the FORMATETC structure*/ + InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); + if(SUCCEEDED(pda->GetData(&formatetc,&medium))) + { + ret = TRUE; + ReleaseStgMedium(&medium); + } + + pda->Release(); + } + + return ret; +} + +VOID +DisablePasteOptions(HMENU hMenu) +{ + MENUITEMINFOW mii; + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_STATE; + mii.fState = MFS_DISABLED; + + TRACE("result %d\n", SetMenuItemInfoW(hMenu, FCIDM_SHVIEW_INSERT, FALSE, &mii)); + TRACE("result %d\n", SetMenuItemInfoW(hMenu, FCIDM_SHVIEW_INSERTLINK, FALSE, &mii)); +} + +BOOL +IDefaultContextMenuImpl::IsShellExtensionAlreadyLoaded(const CLSID * szClass) +{ + PDynamicShellEntry curEntry = dhead; + + while(curEntry) + { + if (!memcmp(&curEntry->ClassID, szClass, sizeof(CLSID))) + return TRUE; + curEntry = curEntry->Next; + } + return FALSE; +} + + +HRESULT +IDefaultContextMenuImpl::SH_LoadDynamicContextMenuHandler(HKEY hKey, const CLSID * szClass, BOOL bExternalInit) +{ + HRESULT hr; + IContextMenu * cmobj; + IShellExtInit *shext; + PDynamicShellEntry curEntry; + //WCHAR szTemp[100]; + LPOLESTR pstr; + + StringFromCLSID(*szClass, &pstr); + + TRACE("SH_LoadDynamicContextMenuHandler entered with This %p hKey %p szClass %s bExternalInit %u\n",this, hKey, wine_dbgstr_guid(szClass), bExternalInit); + //swprintf(szTemp, L"This %p hKey %p szClass %s bExternalInit %u", this, hKey, pstr, bExternalInit); + //MessageBoxW(NULL, szTemp, NULL, MB_OK); + + if (IsShellExtensionAlreadyLoaded(szClass)) + return S_OK; + + hr = SHCoCreateInstance(NULL, szClass, NULL, IID_IContextMenu, (void**)&cmobj); + if (hr != S_OK) + { + TRACE("SHCoCreateInstance failed %x\n", GetLastError()); + return hr; + } + + if (bExternalInit) + { + hr = cmobj->QueryInterface(IID_IShellExtInit, (void**)&shext); + if (hr != S_OK) + { + TRACE("Failed to query for interface IID_IShellExtInit\n"); + cmobj->Release(); + return FALSE; + } + hr = shext->Initialize(NULL, pDataObj, hKey); + shext->Release(); + if (hr != S_OK) + { + TRACE("Failed to initialize shell extension error %x\n", hr); + cmobj->Release(); + return hr; + } + } + + curEntry = (DynamicShellEntry *)HeapAlloc(GetProcessHeap(), 0, sizeof(DynamicShellEntry)); + if(!curEntry) + { + cmobj->Release(); + return E_OUTOFMEMORY; + } + + curEntry->iIdCmdFirst = 0; + curEntry->Next = NULL; + curEntry->NumIds = 0; + curEntry->CMenu = cmobj; + memcpy(&curEntry->ClassID, szClass, sizeof(CLSID)); + + if (dhead) + { + PDynamicShellEntry pEntry = dhead; + + while(pEntry->Next) + { + pEntry = pEntry->Next; + } + + pEntry->Next = curEntry; + } + else + { + dhead = curEntry; + } + + return hr; +} + +UINT +IDefaultContextMenuImpl::EnumerateDynamicContextHandlerForKey(HKEY hRootKey) +{ + WCHAR szKey[MAX_PATH] = {0}; + WCHAR szName[MAX_PATH] = {0}; + DWORD dwIndex, dwName; + LONG res; + HRESULT hResult; + UINT index; + CLSID clsid; + HKEY hKey; + + static const WCHAR szShellEx[] = { 's','h','e','l','l','e','x','\\','C','o','n','t','e','x','t','M','e','n','u','H','a','n','d','l','e','r','s',0 }; + + if (RegOpenKeyExW(hRootKey, szShellEx, 0, KEY_READ, &hKey) != ERROR_SUCCESS) + { + TRACE("RegOpenKeyExW failed for key %s\n", debugstr_w(szKey)); + return 0; + } + + dwIndex = 0; + index = 0; + do + { + dwName = MAX_PATH; + res = RegEnumKeyExW(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); + if (res == ERROR_SUCCESS) + { + hResult = CLSIDFromString(szName, &clsid); + if (hResult != S_OK) + { + dwName = MAX_PATH; + if (RegGetValueW(hKey, szName, NULL, RRF_RT_REG_SZ, NULL, szKey, &dwName) == ERROR_SUCCESS) + { + hResult = CLSIDFromString(szKey, &clsid); + } + } + if (SUCCEEDED(hResult)) + { + if (bGroupPolicyActive) + { + if (RegGetValueW(HKEY_LOCAL_MACHINE, + L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", + szKey, + RRF_RT_REG_SZ, + NULL, + NULL, + &dwName) == ERROR_SUCCESS) + { + SH_LoadDynamicContextMenuHandler(hKey, &clsid, TRUE); + } + } + else + { + SH_LoadDynamicContextMenuHandler(hKey, &clsid, TRUE); + } + } + } + dwIndex++; + }while(res == ERROR_SUCCESS); + + RegCloseKey(hKey); + return index; +} + +UINT +IDefaultContextMenuImpl::InsertMenuItemsOfDynamicContextMenuExtension(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast) +{ + PDynamicShellEntry curEntry; + HRESULT hResult; + + if (!dhead) + { + iIdSHEFirst = 0; + iIdSHELast = 0; + return indexMenu; + } + + curEntry = dhead; + idCmdFirst = 0x5000; + idCmdLast = 0x6000; + iIdSHEFirst = idCmdFirst; + do + { + hResult = curEntry->CMenu->QueryContextMenu(hMenu, indexMenu++, idCmdFirst, idCmdLast, CMF_NORMAL); + if (SUCCEEDED(hResult)) + { + curEntry->iIdCmdFirst = idCmdFirst; + curEntry->NumIds = LOWORD(hResult); + indexMenu += curEntry->NumIds; + idCmdFirst += curEntry->NumIds + 0x10; + } + TRACE("curEntry %p hresult %x contextmenu %p cmdfirst %x num ids %x\n", curEntry, hResult, curEntry->CMenu, curEntry->iIdCmdFirst, curEntry->NumIds); + curEntry = curEntry->Next; + }while(curEntry); + + iIdSHELast = idCmdFirst; + TRACE("SH_LoadContextMenuHandlers first %x last %x\n", iIdSHEFirst, iIdSHELast); + return indexMenu; +} + +UINT +IDefaultContextMenuImpl::BuildBackgroundContextMenu( + HMENU hMenu, + UINT iIdCmdFirst, + UINT iIdCmdLast, + UINT uFlags) +{ + MENUITEMINFOW mii; + WCHAR szBuffer[MAX_PATH]; + UINT indexMenu = 0; + HMENU hSubMenu; + HKEY hKey; + + ZeroMemory(&mii, sizeof(mii)); + + TRACE("BuildBackgroundContextMenu entered\n"); + + if (!_ILIsDesktop(dcm.pidlFolder)) + { + /* view option is only available in browsing mode */ + hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001"); + if (hSubMenu) + { + szBuffer[0] = 0; + LoadStringW(shell32_hInstance, FCIDM_SHVIEW_VIEW, szBuffer, MAX_PATH); + szBuffer[MAX_PATH-1] = 0; + + TRACE("szBuffer %s\n", debugstr_w(szBuffer)); + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_STATE | MIIM_SUBMENU | MIIM_ID; + mii.fType = MFT_STRING; + mii.wID = iIdCmdFirst++; + mii.dwTypeData = szBuffer; + mii.cch = wcslen( mii.dwTypeData ); + mii.fState = MFS_ENABLED; + mii.hSubMenu = hSubMenu; + InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); + DestroyMenu(hSubMenu); + } + } + hSubMenu = LoadMenuW(shell32_hInstance, L"MENU_002"); + if (hSubMenu) + { + /* merge general background context menu in */ + iIdCmdFirst = Shell_MergeMenus(hMenu, GetSubMenu(hSubMenu, 0), indexMenu, 0, 0xFFFF, MM_DONTREMOVESEPS | MM_SUBMENUSHAVEIDS) + 1; + DestroyMenu(hSubMenu); + } + + if (!HasClipboardData()) + { + TRACE("disabling paste options\n"); + DisablePasteOptions(hMenu); + } + /* load extensions from HKCR\* key */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, + L"*", + 0, + KEY_READ, + &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + + /* load create new shell extension */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, + L"CLSID\\{D969A300-E7FF-11d0-A93B-00A0C90F2719}", + 0, + KEY_READ, + &hKey) == ERROR_SUCCESS) + { + SH_LoadDynamicContextMenuHandler(hKey, &CLSID_NewMenu, TRUE); + RegCloseKey(hKey); + } + + if (InsertMenuItemsOfDynamicContextMenuExtension(hMenu, GetMenuItemCount(hMenu)-1, iIdCmdFirst, iIdCmdLast)) + { + /* seperate dynamic context menu items */ + _InsertMenuItemW(hMenu, GetMenuItemCount(hMenu)-1, TRUE, -1, MFT_SEPARATOR, NULL, MFS_ENABLED); + } + + return iIdCmdLast; +} + +UINT +IDefaultContextMenuImpl::AddStaticContextMenusToMenu( + HMENU hMenu, + UINT indexMenu) +{ + MENUITEMINFOW mii; + UINT idResource; + PStaticShellEntry curEntry; + WCHAR szVerb[40]; + WCHAR szTemp[50]; + DWORD dwSize; + UINT fState; + UINT Length; + + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + mii.wID = 0x4000; + iIdSCMFirst = mii.wID; + + curEntry = shead; + + while(curEntry) + { + fState = MFS_ENABLED; + if (!wcsicmp(curEntry->szVerb, L"open")) + { + fState |= MFS_DEFAULT; + idResource = IDS_OPEN_VERB; + } + else if (!wcsicmp(curEntry->szVerb, L"explore")) + idResource = IDS_EXPLORE_VERB; + else if (!wcsicmp(curEntry->szVerb, L"runas")) + idResource = IDS_RUNAS_VERB; + else if (!wcsicmp(curEntry->szVerb, L"edit")) + idResource = IDS_EDIT_VERB; + else if (!wcsicmp(curEntry->szVerb, L"find")) + idResource = IDS_FIND_VERB; + else if (!wcsicmp(curEntry->szVerb, L"print")) + idResource = IDS_PRINT_VERB; + else if (!wcsicmp(curEntry->szVerb, L"play")) + idResource = IDS_PLAY_VERB; + else if (!wcsicmp(curEntry->szVerb, L"preview")) + idResource = IDS_PREVIEW_VERB; + else if (!wcsicmp(curEntry->szVerb, L"printto")) + { + curEntry = curEntry->Next; + continue; + } + else + idResource = 0; + + if (idResource > 0) + { + if (LoadStringW(shell32_hInstance, idResource, szVerb, sizeof(szVerb)/sizeof(WCHAR))) + { + /* use translated verb */ + szVerb[(sizeof(szVerb)/sizeof(WCHAR))-1] = L'\0'; + mii.dwTypeData = szVerb; + } + } + else + { + Length = wcslen(curEntry->szClass) + wcslen(curEntry->szVerb) + 8; + if (Length < sizeof(szTemp)/sizeof(WCHAR)) + { + wcscpy(szTemp, curEntry->szClass); + wcscat(szTemp, L"\\shell\\"); + wcscat(szTemp, curEntry->szVerb); + dwSize = sizeof(szVerb); + + if (RegGetValueW(HKEY_CLASSES_ROOT, szTemp, NULL, RRF_RT_REG_SZ, NULL, szVerb, &dwSize) == ERROR_SUCCESS) + { + /* use description for the menu entry */ + mii.dwTypeData = szVerb; + } + else + { + /* use verb for the menu entry */ + mii.dwTypeData = curEntry->szVerb; + } + } + + } + + mii.cch = wcslen(mii.dwTypeData); + mii.fState = fState; + InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); + + mii.wID++; + curEntry = curEntry->Next; + } + iIdSCMLast = mii.wID - 1; + return indexMenu; +} + +void WINAPI _InsertMenuItemW ( + HMENU hmenu, + UINT indexMenu, + BOOL fByPosition, + UINT wID, + UINT fType, + LPCWSTR dwTypeData, + UINT fState) +{ + MENUITEMINFOW mii; + WCHAR szText[100]; + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + if (fType == MFT_SEPARATOR) + { + mii.fMask = MIIM_ID | MIIM_TYPE; + } + else if (fType == MFT_STRING) + { + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + if ((ULONG_PTR)HIWORD((ULONG_PTR)dwTypeData) == 0) + { + if (LoadStringW(shell32_hInstance, LOWORD((ULONG_PTR)dwTypeData), szText, sizeof(szText)/sizeof(WCHAR))) + { + szText[(sizeof(szText)/sizeof(WCHAR))-1] = 0; + mii.dwTypeData = szText; + } + else + { + TRACE("failed to load string %p\n", dwTypeData); + return; + } + } + else + { + mii.dwTypeData = (LPWSTR) dwTypeData; + } + mii.fState = fState; + } + + mii.wID = wID; + mii.fType = fType; + InsertMenuItemW( hmenu, indexMenu, fByPosition, &mii); +} + +UINT +IDefaultContextMenuImpl::BuildShellItemContextMenu( + HMENU hMenu, + UINT iIdCmdFirst, + UINT iIdCmdLast, + UINT uFlags) +{ + WCHAR szPath[MAX_PATH]; + WCHAR szTemp[40]; + HKEY hKey; + UINT indexMenu; + SFGAOF rfg; + HRESULT hr; + BOOL bAddSep; + GUID * guid; + BOOL bClipboardData; + STRRET strFile; + LPWSTR pOffset; + DWORD dwSize; + + TRACE("BuildShellItemContextMenu entered\n"); + + if (dcm.psf->GetDisplayNameOf(dcm.apidl[0], SHGDN_FORPARSING, &strFile) == S_OK) + { + if (StrRetToBufW(&strFile, dcm.apidl[0], szPath, MAX_PATH) == S_OK) + { + pOffset = wcsrchr(szPath, L'.'); + if (pOffset) + { + /* enumerate dynamic/static for a given file class */ + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, pOffset, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* add static verbs */ + SH_AddStaticEntryForFileClass(pOffset); + /* load dynamic extensions from file extension key */ + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + dwSize = sizeof(szTemp); + if (RegGetValueW(HKEY_CLASSES_ROOT, pOffset, NULL, RRF_RT_REG_SZ, NULL, szTemp, &dwSize) == ERROR_SUCCESS) + { + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szTemp, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* add static verbs from progid key */ + SH_AddStaticEntryForFileClass(szTemp); + /* load dynamic extensions from progid key */ + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + } + } + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"*", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* load default extensions */ + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + } + } + + guid = _ILGetGUIDPointer(dcm.apidl[0]); + if (guid) + { + LPOLESTR pwszCLSID; + WCHAR buffer[60]; + + wcscpy(buffer, L"CLSID\\"); + hr = StringFromCLSID(*guid, &pwszCLSID); + if (hr == S_OK) + { + wcscpy(&buffer[6], pwszCLSID); + TRACE("buffer %s\n", debugstr_w(buffer)); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, buffer, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(hKey); + SH_AddStaticEntryForFileClass(buffer); + RegCloseKey(hKey); + } + CoTaskMemFree(pwszCLSID); + } + } + + + if (_ILIsDrive(dcm.apidl[0])) + { + SH_AddStaticEntryForFileClass(L"Drive"); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Drive", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + + } + + /* add static actions */ + rfg = SFGAO_BROWSABLE | SFGAO_CANCOPY | SFGAO_CANLINK | SFGAO_CANMOVE | SFGAO_CANDELETE | SFGAO_CANRENAME | SFGAO_HASPROPSHEET | SFGAO_FILESYSTEM | SFGAO_FOLDER; + hr = dcm.psf->GetAttributesOf(dcm.cidl, dcm.apidl, &rfg); + if (!SUCCEEDED(hr)) + rfg = 0; + + if (rfg & SFGAO_FOLDER) + { + /* add the default verbs open / explore */ + SH_AddStaticEntryForFileClass(L"Folder"); + SH_AddStaticEntryForFileClass(L"Directory"); + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Folder", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Directory", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + } + + + if (rfg & SFGAO_FILESYSTEM) + { + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"AllFilesystemObjects", 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + /* sendto service is registered here */ + EnumerateDynamicContextHandlerForKey(hKey); + RegCloseKey(hKey); + } + } + + /* add static context menu handlers */ + indexMenu = AddStaticContextMenusToMenu(hMenu, 0); + /* now process dynamic context menu handlers */ + indexMenu = InsertMenuItemsOfDynamicContextMenuExtension(hMenu, indexMenu, iIdCmdFirst, iIdCmdLast); + TRACE("indexMenu %d\n", indexMenu); + + if (_ILIsDrive(dcm.apidl[0])) + { + /* The 'Format' option must be always available, + * thus it is not registered as a static shell extension + */ + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0x7ABC, MFT_STRING, MAKEINTRESOURCEW(IDS_FORMATDRIVE), MFS_ENABLED); + bAddSep = TRUE; + } + + bClipboardData = (HasClipboardData() && (rfg & SFGAO_FILESYSTEM)); + if (rfg & (SFGAO_CANCOPY | SFGAO_CANMOVE) || bClipboardData) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + if (rfg & SFGAO_CANMOVE) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_CUT, MFT_STRING, MAKEINTRESOURCEW(IDS_CUT), MFS_ENABLED); + if (rfg & SFGAO_CANCOPY) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_COPY, MFT_STRING, MAKEINTRESOURCEW(IDS_COPY), MFS_ENABLED); + if (bClipboardData) + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_INSERT, MFT_STRING, MAKEINTRESOURCEW(IDS_INSERT), MFS_ENABLED); + + bAddSep = TRUE; + } + + + if (rfg & SFGAO_CANLINK) + { + bAddSep = FALSE; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_CREATELINK, MFT_STRING, MAKEINTRESOURCEW(IDS_CREATELINK), MFS_ENABLED); + } + + + if (rfg & SFGAO_CANDELETE) + { + if (bAddSep) + { + bAddSep = FALSE; + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + } + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_DELETE, MFT_STRING, MAKEINTRESOURCEW(IDS_DELETE), MFS_ENABLED); + } + + if (rfg & SFGAO_CANRENAME) + { + if (bAddSep) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + } + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_RENAME, MFT_STRING, MAKEINTRESOURCEW(IDS_RENAME), MFS_ENABLED); + bAddSep = TRUE; + } + + if (rfg & SFGAO_HASPROPSHEET) + { + _InsertMenuItemW(hMenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItemW(hMenu, indexMenu++, TRUE, FCIDM_SHVIEW_PROPERTIES, MFT_STRING, MAKEINTRESOURCEW(IDS_PROPERTIES), MFS_ENABLED); + } + + return iIdCmdLast; +} + +HRESULT +WINAPI +IDefaultContextMenuImpl::QueryContextMenu( + HMENU hmenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + if (dcm.cidl) + { + idCmdFirst = BuildShellItemContextMenu(hmenu, idCmdFirst, idCmdLast, uFlags); + } + else + { + idCmdFirst = BuildBackgroundContextMenu(hmenu, idCmdFirst, idCmdLast, uFlags); + } + + return S_OK; +} + +static +HRESULT +NotifyShellViewWindow(LPCMINVOKECOMMANDINFO lpcmi, BOOL bRefresh) +{ + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV = NULL; + HWND hwndSV = NULL; + + if((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + if(SUCCEEDED(lpSB->QueryActiveShellView(&lpSV))) + { + lpSV->GetWindow(&hwndSV); + } + } + + if (LOWORD(lpcmi->lpVerb) == FCIDM_SHVIEW_REFRESH || bRefresh) + { + if (lpSV) + lpSV->Refresh(); + + return S_OK; + } + + SendMessageW(hwndSV, WM_COMMAND, MAKEWPARAM(LOWORD(lpcmi->lpVerb), 0), 0); + + return S_OK; +} + +HRESULT +IDefaultContextMenuImpl::DoPaste( + LPCMINVOKECOMMANDINFO lpcmi) +{ + IDataObject * pda; + STGMEDIUM medium; + FORMATETC formatetc; + LPITEMIDLIST * apidl; + LPITEMIDLIST pidl; + IShellFolder *psfFrom = NULL, *psfDesktop, *psfTarget = NULL; + LPIDA lpcida; + ISFHelper *psfhlpdst, *psfhlpsrc; + HRESULT hr; + + if (OleGetClipboard(&pda) != S_OK) + return E_FAIL; + + InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); + hr = pda->GetData(&formatetc,&medium); + + if (FAILED(hr)) + { + pda->Release(); + return E_FAIL; + } + + /* lock the handle */ + lpcida = (LPIDA)GlobalLock(medium.hGlobal); + if (!lpcida) + { + ReleaseStgMedium(&medium); + pda->Release(); + return E_FAIL; + } + + /* convert the data into pidl */ + apidl = _ILCopyCidaToaPidl(&pidl, lpcida); + + if (!apidl) + return E_FAIL; + + if (FAILED(SHGetDesktopFolder(&psfDesktop))) + { + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + pda->Release(); + return E_FAIL; + } + + if (_ILIsDesktop(pidl)) + { + /* use desktop shellfolder */ + psfFrom = psfDesktop; + } + else if (FAILED(psfDesktop->BindToObject(pidl, NULL, IID_IShellFolder, (LPVOID*)&psfFrom))) + { + ERR("no IShellFolder\n"); + + psfDesktop->Release(); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + pda->Release(); + + return E_FAIL; + } + + if (dcm.cidl) + { + psfDesktop->Release(); + hr = dcm.psf->BindToObject(dcm.apidl[0], NULL, IID_IShellFolder, (LPVOID*)&psfTarget); + } + else + { + IPersistFolder2 *ppf2 = NULL; + LPITEMIDLIST pidl; + + /* cidl is zero due to explorer view */ + hr = dcm.psf->QueryInterface (IID_IPersistFolder2, (LPVOID *) &ppf2); + if (SUCCEEDED(hr)) + { + hr = ppf2->GetCurFolder (&pidl); + ppf2->Release(); + if (SUCCEEDED(hr)) + { + if (_ILIsDesktop(pidl)) + { + /* use desktop shellfolder */ + psfTarget = psfDesktop; + } + else + { + /* retrieve target desktop folder */ + hr = psfDesktop->BindToObject(pidl, NULL, IID_IShellFolder, (LPVOID*)&psfTarget); + } + TRACE("psfTarget %x %p, Desktop %u\n", hr, psfTarget, _ILIsDesktop(pidl)); + ILFree(pidl); + } + } + } + + if (FAILED(hr)) + { + ERR("no IShellFolder\n"); + + psfFrom->Release(); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + pda->Release(); + + return E_FAIL; + } + + + /* get source and destination shellfolder */ + if (FAILED(psfTarget->QueryInterface(IID_ISFHelper, (LPVOID*)&psfhlpdst))) + { + ERR("no IID_ISFHelper for destination\n"); + + psfFrom->Release(); + psfTarget->Release(); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + pda->Release(); + + return E_FAIL; + } + + if (FAILED(psfFrom->QueryInterface(IID_ISFHelper, (LPVOID*)&psfhlpsrc))) + { + ERR("no IID_ISFHelper for source\n"); + + psfhlpdst->Release(); + psfFrom->Release(); + psfTarget->Release(); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + pda->Release(); + return E_FAIL; + } + + /* FIXXME + * do we want to perform a copy or move ??? + */ + hr = psfhlpdst->CopyItems(psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl); + + psfhlpdst->Release(); + psfhlpsrc->Release(); + psfFrom->Release(); + psfTarget->Release(); + SHFree(pidl); + _ILFreeaPidl(apidl, lpcida->cidl); + ReleaseStgMedium(&medium); + pda->Release(); + TRACE("CP result %x\n",hr); + return S_OK; +} + +HRESULT +IDefaultContextMenuImpl::DoOpenOrExplore( + LPCMINVOKECOMMANDINFO lpcmi) +{ + + + return E_FAIL; +} + +BOOL +GetUniqueFileName(LPWSTR szBasePath, LPWSTR szExt, LPWSTR szTarget, BOOL bShortcut) +{ + UINT RetryCount = 0, Length; + WCHAR szLnk[40]; + HANDLE hFile; + + if (!bShortcut) + { + Length = LoadStringW(shell32_hInstance, IDS_LNK_FILE, szLnk, sizeof(szLnk)/sizeof(WCHAR)); + } + + do + { + if (!bShortcut) + { + if (RetryCount) + swprintf(szTarget, L"%s%s(%u).%s", szLnk, szBasePath, RetryCount, szExt); + else + swprintf(szTarget, L"%s%s.%s", szLnk, szBasePath, szExt); + } + else + { + if (RetryCount) + swprintf(szTarget, L"%s(%u).%s", szBasePath, RetryCount, szExt); + else + swprintf(szTarget, L"%s.%s", szBasePath, szExt); + } + + hFile = CreateFileW(szTarget, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + CloseHandle(hFile); + return TRUE; + } + + }while(RetryCount++ < 100); + + return FALSE; + +} + +HRESULT +IDefaultContextMenuImpl::DoCreateLink( + LPCMINVOKECOMMANDINFO lpcmi) +{ + WCHAR szPath[MAX_PATH]; + WCHAR szTarget[MAX_PATH] = {0}; + WCHAR szDirPath[MAX_PATH]; + LPWSTR pszFile; + STRRET strFile; + LPWSTR pszExt; + HRESULT hr; + IShellLinkW * nLink; + IPersistFile * ipf; + static WCHAR szLnk[] = L"lnk"; + + if (dcm.psf->GetDisplayNameOf(dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); + return E_FAIL; + } + + if (StrRetToBufW(&strFile, dcm.apidl[0], szPath, MAX_PATH) != S_OK) + return E_FAIL; + + pszExt = wcsrchr(szPath, L'.'); + + if (pszExt && !wcsicmp(pszExt + 1, szLnk)) + { + if (!GetUniqueFileName(szPath, pszExt + 1, szTarget, TRUE)) + return E_FAIL; + + hr = IShellLink_ConstructFromFile(NULL, IID_IPersistFile, dcm.apidl[0], (LPVOID*)&ipf); + if (hr != S_OK) + { + return hr; + } + hr = ipf->Save(szTarget, FALSE); + ipf->Release(); + NotifyShellViewWindow(lpcmi, TRUE); + return hr; + } + else + { + if (!GetUniqueFileName(szPath, szLnk, szTarget, TRUE)) + return E_FAIL; + + hr = ShellLink::_CreatorClass::CreateInstance(NULL, IID_IShellLinkW, (void**)&nLink); + if (hr != S_OK) + { + return E_FAIL; + } + + GetFullPathName(szPath, MAX_PATH, szDirPath, &pszFile); + if (pszFile) pszFile[0] = 0; + + if (SUCCEEDED(nLink->SetPath(szPath)) && + SUCCEEDED(nLink->SetWorkingDirectory(szDirPath))) + { + if (SUCCEEDED(nLink->QueryInterface(IID_IPersistFile, (LPVOID*)&ipf))) + { + hr = ipf->Save(szTarget, TRUE); + ipf->Release(); + } + } + nLink->Release(); + NotifyShellViewWindow(lpcmi, TRUE); + return hr; + } +} + +HRESULT +IDefaultContextMenuImpl::DoDelete( + LPCMINVOKECOMMANDINFO lpcmi) +{ + HRESULT hr; + STRRET strTemp; + WCHAR szPath[MAX_PATH]; + LPWSTR wszPath, wszPos; + SHFILEOPSTRUCTW op; + int ret; + LPSHELLBROWSER lpSB; + HWND hwnd; + + + hr = dcm.psf->GetDisplayNameOf(dcm.apidl[0], SHGDN_FORPARSING, &strTemp); + if(hr != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed with %x\n", hr); + return hr; + } + ZeroMemory(szPath, sizeof(szPath)); + hr = StrRetToBufW(&strTemp, dcm.apidl[0], szPath, MAX_PATH); + if (hr != S_OK) + { + ERR("StrRetToBufW failed with %x\n", hr); + return hr; + } + + /* Only keep the base path */ + wszPos = strrchrW(szPath, '\\'); + if (wszPos != NULL) + { + *(wszPos + 1) = '\0'; + } + + wszPath = build_paths_list(szPath, dcm.cidl, dcm.apidl); + + ZeroMemory(&op, sizeof(op)); + op.hwnd = GetActiveWindow(); + op.wFunc = FO_DELETE; + op.pFrom = wszPath; + op.fFlags = FOF_ALLOWUNDO; + ret = SHFileOperationW(&op); + + if (ret) + { + ERR("SHFileOperation failed with 0x%x for %s\n", GetLastError(), debugstr_w(wszPath)); + return S_OK; + } + + /* get the active IShellView */ + if ((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + /* is the treeview focused */ + if (SUCCEEDED(lpSB->GetControlWindow(FCW_TREE, &hwnd))) + { + HTREEITEM hItem = TreeView_GetSelection(hwnd); + if (hItem) + { + (void)TreeView_DeleteItem(hwnd, hItem); + } + } + } + NotifyShellViewWindow(lpcmi, TRUE); + + HeapFree(GetProcessHeap(), 0, wszPath); + return S_OK; + +} + +HRESULT +IDefaultContextMenuImpl::DoCopyOrCut( + LPCMINVOKECOMMANDINFO lpcmi, + BOOL bCopy) +{ + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV; + LPDATAOBJECT pDataObj; + HRESULT hr; + + if (SUCCEEDED(SHCreateDataObject(dcm.pidlFolder, dcm.cidl, dcm.apidl, NULL, IID_IDataObject, (void**)&pDataObj))) + { + hr = OleSetClipboard(pDataObj); + pDataObj->Release(); + return hr; + } + + lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0); + if (!lpSB) + { + TRACE("failed to get shellbrowser\n"); + return E_FAIL; + } + + hr = lpSB->QueryActiveShellView(&lpSV); + if (FAILED(hr)) + { + TRACE("failed to query the active shellview\n"); + return hr; + } + + hr = lpSV->GetItemObject(SVGIO_SELECTION, IID_IDataObject, (LPVOID*)&pDataObj); + if (FAILED(hr)) + { + TRACE("failed to get item object\n"); + return hr; + } + + hr = OleSetClipboard(pDataObj); + if (FAILED(hr)) + { + WARN("OleSetClipboard failed"); + } + pDataObj->Release(); + lpSV->Release(); + return S_OK; +} + +HRESULT +IDefaultContextMenuImpl::DoRename( + LPCMINVOKECOMMANDINFO lpcmi) +{ + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV; + HWND hwnd; + + /* get the active IShellView */ + if ((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + /* is the treeview focused */ + if (SUCCEEDED(lpSB->GetControlWindow(FCW_TREE, &hwnd))) + { + HTREEITEM hItem = TreeView_GetSelection(hwnd); + if (hItem) + { + (void)TreeView_EditLabel(hwnd, hItem); + } + } + + if(SUCCEEDED(lpSB->QueryActiveShellView(&lpSV))) + { + lpSV->SelectItem(dcm.apidl[0], + SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT); + lpSV->Release(); + return S_OK; + } + } + return E_FAIL; +} + +HRESULT +IDefaultContextMenuImpl::DoProperties( + LPCMINVOKECOMMANDINFO lpcmi) +{ + WCHAR szDrive[MAX_PATH]; + STRRET strFile; + + if (dcm.cidl &&_ILIsMyComputer(dcm.apidl[0])) + { + ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl", NULL, NULL, SW_SHOWNORMAL); + return S_OK; + } + else if (dcm.cidl == 0 && _ILIsDesktop(dcm.pidlFolder)) + { + ShellExecuteW(lpcmi->hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL); + return S_OK; + } + else if (_ILIsDrive(dcm.apidl[0])) + { + ILGetDisplayName(dcm.apidl[0], szDrive); + SH_ShowDriveProperties(szDrive, dcm.pidlFolder, dcm.apidl); + return S_OK; + } + else if (_ILIsNetHood(dcm.apidl[0])) + { + //FIXME path! + ShellExecuteW(NULL, L"open", L"explorer.exe", + L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}", + NULL, SW_SHOWDEFAULT); + return S_OK; + } + else if (_ILIsBitBucket(dcm.apidl[0])) + { + /* FIXME + * detect the drive path of bitbucket if appropiate + */ + + SH_ShowRecycleBinProperties(L'C'); + return S_OK; + } + + if (dcm.cidl > 1) + WARN("SHMultiFileProperties is not yet implemented\n"); + + if (dcm.psf->GetDisplayNameOf(dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); + return E_FAIL; + } + + if (StrRetToBufW(&strFile, dcm.apidl[0], szDrive, MAX_PATH) != S_OK) + return E_FAIL; + + return SH_ShowPropertiesDialog(szDrive, dcm.pidlFolder, dcm.apidl); +} + +HRESULT +IDefaultContextMenuImpl::DoFormat( + LPCMINVOKECOMMANDINFO lpcmi) +{ + char sDrive[5] = {0}; + + if (!_ILGetDrive(dcm.apidl[0], sDrive, sizeof(sDrive))) + { + ERR("pidl is not a drive\n"); + return E_FAIL; + } + + SHFormatDrive(lpcmi->hwnd, sDrive[0] - 'A', SHFMT_ID_DEFAULT, 0); + return S_OK; +} + +HRESULT +IDefaultContextMenuImpl::DoDynamicShellExtensions( + LPCMINVOKECOMMANDINFO lpcmi) +{ + UINT verb = LOWORD(lpcmi->lpVerb); + PDynamicShellEntry pCurrent = dhead; + + TRACE("verb %p first %x last %x", lpcmi->lpVerb, iIdSHEFirst, iIdSHELast); + + while(pCurrent && verb > pCurrent->iIdCmdFirst + pCurrent->NumIds) + pCurrent = pCurrent->Next; + + if (!pCurrent) + return E_FAIL; + + if (verb >= pCurrent->iIdCmdFirst && verb <= pCurrent->iIdCmdFirst + pCurrent->NumIds) + { + /* invoke the dynamic context menu */ + lpcmi->lpVerb = MAKEINTRESOURCEA(verb - pCurrent->iIdCmdFirst); + return pCurrent->CMenu->InvokeCommand(lpcmi); + } + + return E_FAIL; +} + + +HRESULT +IDefaultContextMenuImpl::DoStaticShellExtensions( + LPCMINVOKECOMMANDINFO lpcmi) +{ + STRRET strFile; + WCHAR szPath[MAX_PATH]; + WCHAR szDir[MAX_PATH]; + SHELLEXECUTEINFOW sei; + PStaticShellEntry pCurrent = shead; + int verb = LOWORD(lpcmi->lpVerb) - iIdSCMFirst; + + + while(pCurrent && verb-- > 0) + pCurrent = pCurrent->Next; + + if (verb > 0) + return E_FAIL; + + + if (dcm.psf->GetDisplayNameOf(dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); + return E_FAIL; + } + + if (StrRetToBufW(&strFile, dcm.apidl[0], szPath, MAX_PATH) != S_OK) + return E_FAIL; + + wcscpy(szDir, szPath); + PathRemoveFileSpec(szDir); + + ZeroMemory(&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_CLASSNAME; + sei.lpClass = pCurrent->szClass; + sei.hwnd = lpcmi->hwnd; + sei.nShow = SW_SHOWNORMAL; + sei.lpVerb = pCurrent->szVerb; + sei.lpFile = szPath; + sei.lpDirectory = szDir; + ShellExecuteExW(&sei); + return S_OK; + +} + +HRESULT +WINAPI +IDefaultContextMenuImpl::InvokeCommand( + LPCMINVOKECOMMANDINFO lpcmi) +{ + switch(LOWORD(lpcmi->lpVerb)) + { + case FCIDM_SHVIEW_BIGICON: + case FCIDM_SHVIEW_SMALLICON: + case FCIDM_SHVIEW_LISTVIEW: + case FCIDM_SHVIEW_REPORTVIEW: + case 0x30: /* FIX IDS in resource files */ + case 0x31: + case 0x32: + case 0x33: + case FCIDM_SHVIEW_AUTOARRANGE: + case FCIDM_SHVIEW_SNAPTOGRID: + case FCIDM_SHVIEW_REFRESH: + return NotifyShellViewWindow(lpcmi, FALSE); + case FCIDM_SHVIEW_INSERT: + case FCIDM_SHVIEW_INSERTLINK: + return DoPaste(lpcmi); + case FCIDM_SHVIEW_OPEN: + case FCIDM_SHVIEW_EXPLORE: + return DoOpenOrExplore(lpcmi); + case FCIDM_SHVIEW_COPY: + case FCIDM_SHVIEW_CUT: + return DoCopyOrCut(lpcmi, LOWORD(lpcmi->lpVerb) == FCIDM_SHVIEW_COPY); + case FCIDM_SHVIEW_CREATELINK: + return DoCreateLink(lpcmi); + case FCIDM_SHVIEW_DELETE: + return DoDelete(lpcmi); + case FCIDM_SHVIEW_RENAME: + return DoRename(lpcmi); + case FCIDM_SHVIEW_PROPERTIES: + return DoProperties(lpcmi); + case 0x7ABC: + return DoFormat(lpcmi); + } + + if (iIdSHEFirst && iIdSHELast) + { + if (LOWORD(lpcmi->lpVerb) >= iIdSHEFirst && LOWORD(lpcmi->lpVerb) <= iIdSHELast) + { + return DoDynamicShellExtensions(lpcmi); + } + } + + if (iIdSCMFirst && iIdSCMLast) + { + if (LOWORD(lpcmi->lpVerb) >= iIdSCMFirst && LOWORD(lpcmi->lpVerb) <= iIdSCMLast) + { + return DoStaticShellExtensions(lpcmi); + } + } + + FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); + return E_UNEXPECTED; +} + +HRESULT +WINAPI +IDefaultContextMenuImpl::GetCommandString( + UINT_PTR idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + + return S_OK; +} + +HRESULT +WINAPI +IDefaultContextMenuImpl::HandleMenuMsg( + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + + return S_OK; +} + +static +HRESULT +IDefaultContextMenu_Constructor( + const DEFCONTEXTMENU *pdcm, + REFIID riid, + void **ppv) +{ + CComObject *theContextMenu; + CComPtr result; + HRESULT hResult; + + if (ppv == NULL) + return E_POINTER; + *ppv = NULL; + ATLTRY (theContextMenu = new CComObject); + if (theContextMenu == NULL) + return E_OUTOFMEMORY; + hResult = theContextMenu->QueryInterface (riid, (void **)&result); + if (FAILED (hResult)) + { + delete theContextMenu; + return hResult; + } + hResult = theContextMenu->Initialize (pdcm); + if (FAILED (hResult)) + return hResult; + *ppv = result.Detach (); + TRACE("This(%p)(%x) cidl %u\n", *ppv, hResult, pdcm->cidl); + return S_OK; +} + +/************************************************************************* + * SHCreateDefaultContextMenu [SHELL32.325] Vista API + * + */ + +HRESULT +WINAPI +SHCreateDefaultContextMenu( + const DEFCONTEXTMENU *pdcm, + REFIID riid, + void **ppv) +{ + HRESULT hr = E_FAIL; + + *ppv = NULL; + hr = IDefaultContextMenu_Constructor( pdcm, riid, ppv ); + + TRACE("pcm %p hr %x\n", pdcm, hr); + return hr; +} + +/************************************************************************* + * CDefFolderMenu_Create2 [SHELL32.701] + * + */ + +HRESULT +WINAPI +CDefFolderMenu_Create2( + LPCITEMIDLIST pidlFolder, + HWND hwnd, + UINT cidl, + LPCITEMIDLIST *apidl, + IShellFolder *psf, + LPFNDFMCALLBACK lpfn, + UINT nKeys, + const HKEY *ahkeyClsKeys, + IContextMenu **ppcm) +{ + DEFCONTEXTMENU pdcm; + HRESULT hr; + + pdcm.hwnd = hwnd; + pdcm.pcmcb = NULL; + pdcm.pidlFolder = pidlFolder; + pdcm.psf = psf; + pdcm.cidl = cidl; + pdcm.apidl = apidl; + pdcm.punkAssociationInfo = NULL; + pdcm.cKeys = nKeys; + pdcm.aKeys = ahkeyClsKeys; + + hr = SHCreateDefaultContextMenu(&pdcm, IID_IContextMenu, (void**)ppcm); + return hr; +} + diff --git a/dll/win32/shell32_new/shv_item_new.cpp b/dll/win32/shell32_new/shv_item_new.cpp new file mode 100644 index 00000000000..c04b3870f9b --- /dev/null +++ b/dll/win32/shell32_new/shv_item_new.cpp @@ -0,0 +1,720 @@ +/* + * provides new shell item service + * + * Copyright 2007 Johannes Anderwald (janderwald@reactos.org) + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include +#include "shv_item_new.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +static WCHAR szNew[MAX_PATH]; + +CNewMenu::CNewMenu() +{ + s_SnHead = NULL; +} + +CNewMenu::~CNewMenu() +{ +} + +static +BOOL +GetKeyDescription(LPWSTR szKeyName, LPWSTR szResult) +{ + HKEY hKey; + DWORD dwDesc, dwError; + WCHAR szDesc[100]; + + static const WCHAR szFriendlyTypeName[] = { '\\','F','r','i','e','n','d','l','y','T','y','p','e','N','a','m','e',0 }; + + TRACE("GetKeyDescription: keyname %s\n", debugstr_w(szKeyName)); + + if (RegOpenKeyExW(HKEY_CLASSES_ROOT,szKeyName,0, KEY_READ | KEY_QUERY_VALUE,&hKey) != ERROR_SUCCESS) + return FALSE; + + if (RegLoadMUIStringW(hKey,szFriendlyTypeName,szResult,MAX_PATH,&dwDesc,0,NULL) == ERROR_SUCCESS) + { + TRACE("result %s\n", debugstr_w(szResult)); + RegCloseKey(hKey); + return TRUE; + } + /* fetch default value */ + dwDesc = sizeof(szDesc); + dwError = RegGetValueW(hKey,NULL,NULL, RRF_RT_REG_SZ,NULL,szDesc,&dwDesc); + if(dwError == ERROR_SUCCESS) + { + if (wcsncmp(szKeyName, szDesc, dwDesc / sizeof(WCHAR))) + { + /* recurse for to a linked key */ + if (!GetKeyDescription(szDesc, szResult)) + { + /* use description */ + wcscpy(szResult, szDesc); + } + } + else + { + /* use default value as description */ + wcscpy(szResult, szDesc); + } + } + else + { + /* registry key w/o default key?? */ + TRACE("RegGetValue failed with %x\n", dwError); + wcscpy(szResult, szKeyName); + } + + RegCloseKey(hKey); + return TRUE; +} + + +CNewMenu::SHELLNEW_ITEM *CNewMenu::LoadItem(LPWSTR szKeyName) +{ + HKEY hKey; + DWORD dwIndex; + WCHAR szName[MAX_PATH]; + WCHAR szCommand[MAX_PATH]; + WCHAR szDesc[MAX_PATH] = {0}; + WCHAR szIcon[MAX_PATH] = {0}; + DWORD dwName, dwCommand; + LONG result; + SHELLNEW_ITEM *pNewItem; + + static const WCHAR szShellNew[] = { '\\','S','h','e','l','l','N','e','w',0 }; + static const WCHAR szCmd[] = { 'C','o','m','m','a','n','d',0 }; + static const WCHAR szData[] = { 'D','a','t','a',0 }; + static const WCHAR szFileName[] = { 'F','i','l','e','N','a','m','e', 0 }; + static const WCHAR szNullFile[] = { 'N','u','l','l','F','i','l','e', 0 }; + + + wcscpy(szName, szKeyName); + GetKeyDescription(szKeyName, szDesc); + wcscat(szName, szShellNew); + result = RegOpenKeyExW(HKEY_CLASSES_ROOT,szName,0,KEY_READ,&hKey); + + //TRACE("LoadItem dwName %d keyname %s szName %s szDesc %s szIcon %s\n", dwName, debugstr_w(szKeyName), debugstr_w(szName), debugstr_w(szDesc), debugstr_w(szIcon)); + + if (result != ERROR_SUCCESS) + { + return NULL; + } + + dwIndex = 0; + pNewItem = NULL; + + do + { + dwName = MAX_PATH; + dwCommand = MAX_PATH; + result = RegEnumValueW(hKey,dwIndex,szName,&dwName,NULL,NULL,(LPBYTE)szCommand, &dwCommand); + if (result == ERROR_SUCCESS) + { + SHELLNEW_TYPE type = SHELLNEW_TYPE_INVALID; + LPWSTR szTarget = szCommand; + //TRACE("szName %s szCommand %s\n", debugstr_w(szName), debugstr_w(szCommand)); + if (!wcsicmp(szName, szCmd)) + { + type = SHELLNEW_TYPE_COMMAND; + }else if (!wcsicmp(szName, szData)) + { + type = SHELLNEW_TYPE_DATA; + } + else if (!wcsicmp(szName, szFileName)) + { + type = SHELLNEW_TYPE_FILENAME; + } + else if (!wcsicmp(szName, szNullFile)) + { + type = SHELLNEW_TYPE_NULLFILE; + szTarget = NULL; + } + if (type != SHELLNEW_TYPE_INVALID) + { + pNewItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), 0, sizeof(SHELLNEW_ITEM)); + pNewItem->Type = type; + if (szTarget) + pNewItem->szTarget = _wcsdup(szTarget); + else + pNewItem->szTarget = NULL; + + pNewItem->szDesc = _wcsdup(szDesc); + pNewItem->szIcon = _wcsdup(szIcon); + pNewItem->szExt = _wcsdup(szKeyName); + pNewItem->Next = NULL; + break; + } + } + dwIndex++; + }while(result != ERROR_NO_MORE_ITEMS); + RegCloseKey(hKey); + return pNewItem; +} + + +BOOL +CNewMenu::LoadShellNewItems() +{ + DWORD dwIndex; + WCHAR szName[MAX_PATH]; + LONG result; + SHELLNEW_ITEM *pNewItem; + SHELLNEW_ITEM *pCurItem = NULL; + static WCHAR szLnk[] = { '.','l','n','k',0 }; + + /* insert do new folder action */ + if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, szNew, sizeof(szNew) / sizeof(WCHAR))) + szNew[0] = 0; + szNew[MAX_PATH-1] = 0; + + dwIndex = 0; + do + { + result = RegEnumKeyW(HKEY_CLASSES_ROOT,dwIndex,szName,MAX_PATH); + if (result == ERROR_SUCCESS) + { + pNewItem = LoadItem(szName); + if (pNewItem) + { + if (!wcsicmp(pNewItem->szExt, szLnk)) + { + if (s_SnHead) + { + pNewItem->Next = s_SnHead; + s_SnHead = pNewItem; + } + else + { + s_SnHead = pCurItem = pNewItem; + } + } + else + { + if (pCurItem) + { + pCurItem->Next = pNewItem; + pCurItem = pNewItem; + } + else + { + pCurItem = s_SnHead = pNewItem; + } + } + } + } + dwIndex++; + }while(result != ERROR_NO_MORE_ITEMS); + + if (s_SnHead == NULL) + return FALSE; + else + return TRUE; +} + +UINT +CNewMenu::InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu) +{ + MENUITEMINFOW mii; + SHELLNEW_ITEM *pCurItem; + UINT i; + WCHAR szBuffer[MAX_PATH]; + + if (s_SnHead == NULL) + { + if (!LoadShellNewItems()) + return 0; + } + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + + /* insert do new shortcut action */ + if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEWFOLDER, szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]))) + szBuffer[0] = 0; + szBuffer[MAX_PATH-1] = 0; + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; + mii.fType = MFT_STRING; + mii.dwTypeData = szBuffer; + mii.cch = wcslen(mii.dwTypeData); + mii.wID = idFirst++; + InsertMenuItemW(hMenu, idMenu++, TRUE, &mii); + + /* insert do new shortcut action */ + if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEWLINK, szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]))) + szBuffer[0] = 0; + szBuffer[MAX_PATH-1] = 0; + mii.dwTypeData = szBuffer; + mii.cch = wcslen(mii.dwTypeData); + mii.wID = idFirst++; + InsertMenuItemW(hMenu, idMenu++, TRUE, &mii); + + /* insert seperator for custom new action */ + mii.fMask = MIIM_TYPE | MIIM_ID; + mii.fType = MFT_SEPARATOR; + mii.wID = -1; + InsertMenuItemW(hMenu, idMenu++, TRUE, &mii); + + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; + /* + * FIXME + * implement loading of icons + * and using MFT_OWNERDRAWN + */ + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + + pCurItem = s_SnHead; + i = 0; + + while(pCurItem) + { + if (i >= 1) + { + TRACE("szDesc %s\n", debugstr_w(pCurItem->szDesc)); + mii.dwTypeData = pCurItem->szDesc; + mii.cch = wcslen(mii.dwTypeData); + mii.wID = idFirst++; + InsertMenuItemW(hMenu, idMenu++, TRUE, &mii); + } + pCurItem = pCurItem->Next; + i++; + } + return (i+2); +} + +HRESULT +CNewMenu::DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi) +{ + SHELLNEW_ITEM *pCurItem = s_SnHead; + IPersistFolder3 * psf; + LPITEMIDLIST pidl; + STRRET strTemp; + WCHAR szTemp[MAX_PATH]; + WCHAR szBuffer[MAX_PATH]; + WCHAR szPath[MAX_PATH]; + STARTUPINFOW sInfo; + PROCESS_INFORMATION pi; + UINT i, target; + HANDLE hFile; + DWORD dwWritten, dwError; + CComPtr folderView; + CComPtr parentFolder; + HRESULT hResult; + + static const WCHAR szP1[] = { '%', '1', 0 }; + static const WCHAR szFormat[] = {'%','s',' ','(','%','d',')','%','s',0 }; + + i = 1; + target = LOWORD(lpcmi->lpVerb); + + while(pCurItem) + { + if (i == target) + break; + + pCurItem = pCurItem->Next; + i++; + } + + if (!pCurItem) + return E_UNEXPECTED; + + if (fSite == NULL) + return E_FAIL; + hResult = IUnknown_QueryService(fSite, SID_IFolderView, IID_IFolderView, (void **)&folderView); + if (FAILED(hResult)) + return hResult; + hResult = folderView->GetFolder(IID_IShellFolder, (void **)&parentFolder); + if (FAILED(hResult)) + return hResult; + + if (parentFolder->QueryInterface(IID_IPersistFolder2, (LPVOID*)&psf) != S_OK) + { + ERR("Failed to get interface IID_IPersistFolder2\n"); + return E_FAIL; + } + if (psf->GetCurFolder(&pidl) != S_OK) + { + ERR("IPersistFolder2_GetCurFolder failed\n"); + return E_FAIL; + } + + if (parentFolder == NULL || parentFolder->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strTemp) != S_OK) + { + ERR("IShellFolder_GetDisplayNameOf failed\n"); + return E_FAIL; + } + StrRetToBufW(&strTemp, pidl, szPath, MAX_PATH); + + switch(pCurItem->Type) + { + case SHELLNEW_TYPE_COMMAND: + { + LPWSTR ptr; + LPWSTR szCmd; + + if (!ExpandEnvironmentStringsW(pCurItem->szTarget, szBuffer, MAX_PATH)) + { + TRACE("ExpandEnvironmentStrings failed\n"); + break; + } + + ptr = wcsstr(szBuffer, szP1); + if (ptr) + { + ptr[1] = 's'; + swprintf(szTemp, szBuffer, szPath); + ptr = szTemp; + } + else + { + ptr = szBuffer; + } + + ZeroMemory(&sInfo, sizeof(sInfo)); + sInfo.cb = sizeof(sInfo); + szCmd = _wcsdup(ptr); + if (!szCmd) + break; + if (CreateProcessW(NULL, szCmd, NULL, NULL,FALSE,0,NULL,NULL,&sInfo, &pi)) + { + CloseHandle( pi.hProcess ); + CloseHandle( pi.hThread ); + } + free(szCmd); + break; + } + case SHELLNEW_TYPE_DATA: + case SHELLNEW_TYPE_FILENAME: + case SHELLNEW_TYPE_NULLFILE: + { + i = 2; + + PathAddBackslashW(szPath); + wcscat(szPath, szNew); + wcscat(szPath, L" "); + wcscat(szPath, pCurItem->szDesc); + wcscpy(szBuffer, szPath); + wcscat(szBuffer, pCurItem->szExt); + do + { + hFile = CreateFileW(szBuffer, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile != INVALID_HANDLE_VALUE) + break; + dwError = GetLastError(); + + TRACE("FileName %s szBuffer %s i %u error %x\n", debugstr_w(szBuffer), debugstr_w(szPath), i, dwError); + swprintf(szBuffer, szFormat, szPath, i, pCurItem->szExt); + i++; + }while(hFile == INVALID_HANDLE_VALUE && dwError == ERROR_FILE_EXISTS); + + if (hFile == INVALID_HANDLE_VALUE) + return E_FAIL; + + if (pCurItem->Type == SHELLNEW_TYPE_DATA) + { + i = WideCharToMultiByte(CP_ACP, 0, pCurItem->szTarget, -1, (LPSTR)szTemp, MAX_PATH*2, NULL, NULL); + if (i) + { + WriteFile(hFile, (LPCVOID)szTemp, i, &dwWritten, NULL); + } + } + CloseHandle(hFile); + if (pCurItem->Type == SHELLNEW_TYPE_FILENAME) + { + if (!CopyFileW(pCurItem->szTarget, szBuffer, FALSE)) + break; + } + TRACE("Notifying fs %s\n", debugstr_w(szBuffer)); + SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, (LPCVOID)szBuffer, NULL); + break; + case SHELLNEW_TYPE_INVALID: + break; + } + } + return S_OK; +} +/************************************************************************** +* DoMeasureItem +*/ +HRESULT +CNewMenu::DoMeasureItem(HWND hWnd, MEASUREITEMSTRUCT * lpmis) +{ + SHELLNEW_ITEM *pCurItem; + SHELLNEW_ITEM *pItem; + UINT i; + HDC hDC; + SIZE size; + + TRACE("DoMeasureItem entered with id %x\n", lpmis->itemID); + + pCurItem = s_SnHead; + + i = 1; + pItem = NULL; + while(pCurItem) + { + if (i == lpmis->itemID) + { + pItem = pCurItem; + break; + } + pCurItem = pCurItem->Next; + i++; + } + + if (!pItem) + { + TRACE("DoMeasureItem no item found\n"); + return E_FAIL; + } + hDC = GetDC(hWnd); + GetTextExtentPoint32W(hDC, pCurItem->szDesc, wcslen(pCurItem->szDesc), &size); + lpmis->itemWidth = size.cx + 32; + lpmis->itemHeight = max(size.cy, 20); + ReleaseDC (hWnd, hDC); + return S_OK; +} +/************************************************************************** +* DoDrawItem +*/ +HRESULT +CNewMenu::DoDrawItem(HWND hWnd, DRAWITEMSTRUCT * drawItem) +{ + SHELLNEW_ITEM *pCurItem; + SHELLNEW_ITEM *pItem; + UINT i; + pCurItem = s_SnHead; + + TRACE("DoDrawItem entered with id %x\n", drawItem->itemID); + + i = 1; + pItem = NULL; + while(pCurItem) + { + if (i == drawItem->itemID) + { + pItem = pCurItem; + break; + } + pCurItem = pCurItem->Next; + i++; + } + + if (!pItem) + return E_FAIL; + + drawItem->rcItem.left += 20; + + DrawTextW(drawItem->hDC, pCurItem->szDesc, wcslen(pCurItem->szDesc), &drawItem->rcItem, 0); + return S_OK; +} + +/************************************************************************** +* DoNewFolder +*/ +void CNewMenu::DoNewFolder( + IShellView *psv) +{ + ISFHelper * psfhlp; + WCHAR wszName[MAX_PATH]; + CComPtr folderView; + CComPtr parentFolder; + HRESULT hResult; + + if (fSite == NULL) + return; + hResult = IUnknown_QueryService(fSite, SID_IFolderView, IID_IFolderView, (void **)&folderView); + if (FAILED(hResult)) + return; + hResult = folderView->GetFolder(IID_IShellFolder, (void **)&parentFolder); + if (FAILED(hResult)) + return; + + parentFolder->QueryInterface(IID_ISFHelper, (LPVOID*)&psfhlp); + if (psfhlp) + { + LPITEMIDLIST pidl; + + if (psfhlp->GetUniqueName(wszName, MAX_PATH) != S_OK) + return; + if (psfhlp->AddFolder(0, wszName, &pidl) != S_OK) + return; + + if(psv) + { + psv->Refresh(); + /* if we are in a shellview do labeledit */ + psv->SelectItem( + pidl,(SVSI_DESELECTOTHERS | SVSI_EDIT | SVSI_ENSUREVISIBLE + |SVSI_FOCUSED|SVSI_SELECT)); + psv->Refresh(); + } + SHFree(pidl); + + psfhlp->Release(); + } +} + +HRESULT STDMETHODCALLTYPE CNewMenu::SetSite(IUnknown *pUnkSite) +{ + fSite = pUnkSite; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CNewMenu::GetSite(REFIID riid, void **ppvSite) +{ + if (ppvSite == NULL) + return E_POINTER; + *ppvSite = fSite; + if (fSite.p != NULL) + fSite.p->AddRef(); + return S_OK; +} + +HRESULT +WINAPI +CNewMenu::QueryContextMenu(HMENU hmenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + WCHAR szBuffer[200]; + MENUITEMINFOW mii; + HMENU hSubMenu; + int id = 1; + + TRACE("%p %p %u %u %u %u\n", this, + hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags ); + + if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, szBuffer, 200)) + { + szBuffer[0] = 0; + } + szBuffer[199] = 0; + + hSubMenu = CreateMenu(); + memset( &mii, 0, sizeof(mii) ); + mii.cbSize = sizeof (mii); + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; + mii.fType = MFT_STRING; + mii.wID = idCmdFirst + id++; + mii.dwTypeData = szBuffer; + mii.cch = wcslen( mii.dwTypeData ); + mii.fState = MFS_ENABLED; + + if (hSubMenu) + { + id += InsertShellNewItems( hSubMenu, idCmdFirst, 0); + mii.fMask |= MIIM_SUBMENU; + mii.hSubMenu = hSubMenu; + } + + + if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) + return E_FAIL; + + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id ); +} + +HRESULT +WINAPI +CNewMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici) +{ + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV = NULL; + HRESULT hr; + + if((lpSB = (LPSHELLBROWSER)SendMessageA(lpici->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + lpSB->QueryActiveShellView(&lpSV); + } + + if (LOWORD(lpici->lpVerb) == 0) + { + DoNewFolder(lpSV); + return S_OK; + } + + hr = DoShellNewCmd(lpici); + if (SUCCEEDED(hr) && lpSV) + { + lpSV->Refresh(); + } + + TRACE("INewItem_IContextMenu_fnInvokeCommand %x\n", hr); + return hr; +} + +HRESULT +WINAPI +CNewMenu::GetCommandString(UINT_PTR idCmd, + UINT uType, + UINT* pwReserved, + LPSTR pszName, + UINT cchMax) +{ + FIXME("%p %lu %u %p %p %u\n", this, + idCmd, uType, pwReserved, pszName, cchMax ); + + return E_NOTIMPL; +} + +HRESULT +WINAPI +CNewMenu::HandleMenuMsg(UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + DRAWITEMSTRUCT * lpids = (DRAWITEMSTRUCT*) lParam; + MEASUREITEMSTRUCT *lpmis = (MEASUREITEMSTRUCT*) lParam; + + TRACE("INewItem_IContextMenu_fnHandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",this, uMsg, wParam, lParam); + + + switch(uMsg) + { + case WM_MEASUREITEM: + return DoMeasureItem((HWND)wParam, lpmis); + break; + case WM_DRAWITEM: + return DoDrawItem((HWND)wParam, lpids); + break; + } + return S_OK; + + return E_UNEXPECTED; +} + +HRESULT WINAPI +CNewMenu::Initialize(LPCITEMIDLIST pidlFolder, + IDataObject *pdtobj, HKEY hkeyProgID ) +{ + + return S_OK; +} diff --git a/dll/win32/shell32_new/shv_item_new.h b/dll/win32/shell32_new/shv_item_new.h new file mode 100644 index 00000000000..2bedc5bd60b --- /dev/null +++ b/dll/win32/shell32_new/shv_item_new.h @@ -0,0 +1,94 @@ +/* + * provides new shell item service + * + * Copyright 2007 Johannes Anderwald (janderwald@reactos.org) + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _SHV_ITEM_NEW_H_ +#define _SHV_ITEM_NEW_H_ + +class CNewMenu : + public CComCoClass, + public CComObjectRootEx, + public IObjectWithSite, + public IContextMenu2, + public IShellExtInit +{ +private: + enum SHELLNEW_TYPE + { + SHELLNEW_TYPE_INVALID = -1, + SHELLNEW_TYPE_COMMAND = 1, + SHELLNEW_TYPE_DATA = 2, + SHELLNEW_TYPE_FILENAME = 4, + SHELLNEW_TYPE_NULLFILE = 8 + }; + + struct SHELLNEW_ITEM + { + SHELLNEW_TYPE Type; + LPWSTR szExt; + LPWSTR szTarget; + LPWSTR szDesc; + LPWSTR szIcon; + SHELLNEW_ITEM *Next; + }; + + LPWSTR szPath; + SHELLNEW_ITEM *s_SnHead; + CComPtr fSite; +public: + CNewMenu(); + ~CNewMenu(); + SHELLNEW_ITEM *LoadItem(LPWSTR szKeyName); + BOOL LoadShellNewItems(); + UINT InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu); + HRESULT DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi); + HRESULT DoMeasureItem(HWND hWnd, MEASUREITEMSTRUCT *lpmis); + HRESULT DoDrawItem(HWND hWnd, DRAWITEMSTRUCT *drawItem); + void DoNewFolder(IShellView *psv); + + // IObjectWithSite + virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); + virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + + // IShellExtInit + virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + +DECLARE_REGISTRY_RESOURCEID(IDR_NEWMENU) +DECLARE_NOT_AGGREGATABLE(CNewMenu) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CNewMenu) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) +END_COM_MAP() +}; + +#endif // _SHV_ITEM_NEW_H_ diff --git a/dll/win32/shell32_new/startmenu.cpp b/dll/win32/shell32_new/startmenu.cpp new file mode 100644 index 00000000000..2b3f81101a0 --- /dev/null +++ b/dll/win32/shell32_new/startmenu.cpp @@ -0,0 +1,174 @@ +/* + * Start menu object + * + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "startmenu.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell32start); + +CStartMenuCallback::CStartMenuCallback() +{ +} + +CStartMenuCallback::~CStartMenuCallback() +{ +} + +HRESULT STDMETHODCALLTYPE CStartMenuCallback::SetSite(IUnknown *pUnkSite) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenuCallback::GetSite(REFIID riid, void **ppvSite) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CStartMenuCallback::CallbackSM(LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + return E_NOTIMPL; +} + +CMenuBandSite::CMenuBandSite() +{ +} + +CMenuBandSite::~CMenuBandSite() +{ +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::GetWindow(HWND *phwnd) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::ContextSensitiveHelp(BOOL fEnterMode) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::SetDeskBarSite(IUnknown *punkSite) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::SetModeDBC(DWORD dwMode) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::UIActivateDBC(DWORD dwState) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::GetSize(DWORD dwWhich, LPRECT prc) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::UIActivateIO(BOOL fActivate, LPMSG lpMsg) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::HasFocusIO() +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::TranslateAcceleratorIO(LPMSG lpMsg) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::OnWinEvent(HWND paramC, UINT param10, WPARAM param14, LPARAM param18, LRESULT *param1C) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::IsWindowOwner(HWND paramC) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryService(REFGUID guidService, REFIID riid, void **ppvObject) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::AddBand(IUnknown *punk) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::EnumBands(UINT uBand, DWORD *pdwBandID) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::RemoveBand(DWORD dwBandID) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::SetBandSiteInfo(const BANDSITEINFO *pbsinfo) +{ + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMenuBandSite::GetBandSiteInfo(BANDSITEINFO *pbsinfo) +{ + return E_NOTIMPL; +} diff --git a/dll/win32/shell32_new/startmenu.h b/dll/win32/shell32_new/startmenu.h new file mode 100644 index 00000000000..d9773da4bbd --- /dev/null +++ b/dll/win32/shell32_new/startmenu.h @@ -0,0 +1,125 @@ +/* + * Start menu object + * + * Copyright 2009 Andrew Hill + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _STARTMENU_H_ +#define _STARTMENU_H_ + +class CStartMenuCallback : + public CComCoClass, + public CComObjectRootEx, + public IObjectWithSite, + public IShellMenuCallback +{ +private: +public: + CStartMenuCallback(); + ~CStartMenuCallback(); + + // *** IObjectWithSite methods *** + virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); + virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + + // *** IShellMenuCallback methods *** + virtual HRESULT STDMETHODCALLTYPE CallbackSM(LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam); + +DECLARE_NO_REGISTRY() +DECLARE_NOT_AGGREGATABLE(CStartMenuCallback) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CStartMenuCallback) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) + COM_INTERFACE_ENTRY_IID(IID_IShellMenuCallback, IShellMenuCallback) +END_COM_MAP() +}; + +class CMenuBandSite : + public CComCoClass, + public CComObjectRootEx, + public IDeskBarClient, + public IInputObject, + public IInputObjectSite, + public IWinEventHandler, + public IServiceProvider, + public IOleCommandTarget, + public IBandSite +{ +private: +public: + CMenuBandSite(); + ~CMenuBandSite(); + + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + + // *** IDeskBarClient methods *** + virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite); + virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode); + virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState); + virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc); + + // *** IInputObject methods *** + virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); + virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); + virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + + // *** IInputObjectSite methods *** + virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + + // *** IWinEventHandler methods *** + virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND paramC, UINT param10, WPARAM param14, LPARAM param18, LRESULT *param1C); + virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND paramC); + + // *** IServiceProvider methods *** + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + + // *** IOleCommandTarget methods *** + virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); + virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + + // *** IBandSite methods *** + virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); + virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); + virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); + virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); + virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); + virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv); + virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); + virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); + +DECLARE_REGISTRY_RESOURCEID(IDR_MENUBANDSITE) +DECLARE_NOT_AGGREGATABLE(CMenuBandSite) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CMenuBandSite) + COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) + COM_INTERFACE_ENTRY_IID(IID_IDeskBarClient, IDeskBarClient) + COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) + COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite) + COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) + COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) + COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) + COM_INTERFACE_ENTRY_IID(IID_IBandSite, IBandSite) +END_COM_MAP() +}; + +#endif // _STARTMENU_H_ diff --git a/dll/win32/shell32_new/stubs.cpp b/dll/win32/shell32_new/stubs.cpp new file mode 100644 index 00000000000..ab94da13761 --- /dev/null +++ b/dll/win32/shell32_new/stubs.cpp @@ -0,0 +1,1419 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: shell32.dll + * FILE: dll/win32/shell32/stubs.c + * PURPOSE: shell32.dll stubs + * PROGRAMMER: Dmitry Chapyshev (dmitry@reactos.org) + * NOTES: If you implement a function, remove it from this file + * UPDATE HISTORY: + * 03/02/2009 Created + */ + + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/* + * Unimplemented + */ +EXTERN_C HLOCAL +WINAPI +SHLocalAlloc(UINT uFlags, SIZE_T uBytes) +{ + FIXME("SHLocalAlloc() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C HLOCAL +WINAPI +SHLocalFree(HLOCAL hMem) +{ + FIXME("SHLocalFree() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C HLOCAL +WINAPI +SHLocalReAlloc(HLOCAL hMem, + SIZE_T uBytes, + UINT uFlags) +{ + FIXME("SHLocalReAlloc() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C LPWSTR +WINAPI +AddCommasW(DWORD dwUnknown, LPWSTR lpNumber) +{ + LPCWSTR lpRetBuf = L"0"; + + FIXME("AddCommasW() stub\n"); + return const_cast(lpRetBuf); +} + +/* + * Unimplemented + */ +EXTERN_C LPWSTR +WINAPI +ShortSizeFormatW(LONGLONG llNumber) +{ + FIXME("ShortSizeFormatW() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHFindComputer(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + FIXME("SHFindComputer() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHLimitInputEdit(HWND hWnd, IShellFolder *psf) +{ + FIXME("SHLimitInputEdit() stub\n"); + return S_FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHLimitInputCombo(HWND hWnd, LPVOID lpUnknown) +{ + FIXME("SHLimitInputCombo() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +PathIsEqualOrSubFolder(LPWSTR lpFolder, LPWSTR lpSubFolder) +{ + FIXME("PathIsEqualOrSubFolder() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHCreateFileExtractIconW(LPCWSTR pszPath, + DWORD dwFileAttributes, + REFIID riid, + void **ppv) +{ + FIXME("SHCreateFileExtractIconW() stub\n"); + return E_FAIL; +} + +EXTERN_C HRESULT +WINAPI +SHGetUnreadMailCountW(HKEY hKeyUser, + LPCWSTR pszMailAddress, + DWORD *pdwCount, + FILETIME *pFileTime, + LPWSTR pszShellExecuteCommand, + int cchShellExecuteCommand) +{ + FIXME("SHGetUnreadMailCountW() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHSetUnreadMailCountW(LPCWSTR pszMailAddress, + DWORD dwCount, + LPCWSTR pszShellExecuteCommand) +{ + FIXME("SHSetUnreadMailCountW() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +CheckDiskSpace(VOID) +{ + FIXME("CheckDiskSpace() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +SHReValidateDarwinCache(VOID) +{ + FIXME("SHReValidateDarwinCache() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +CopyStreamUI(IStream *pSrc, IStream *pDst, IProgressDialog *pProgDlg) +{ + FIXME("CopyStreamUI() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C FILEDESCRIPTOR* +WINAPI +GetFileDescriptor(FILEGROUPDESCRIPTOR *pFileGroupDesc, BOOL bUnicode, INT iIndex, LPWSTR lpName) +{ + FIXME("GetFileDescriptor() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHIsTempDisplayMode(VOID) +{ + FIXME("SHIsTempDisplayMode() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C LONG +WINAPI +SHCreateSessionKey(REGSAM regSam, PHKEY phKey) +{ + FIXME("SHCreateSessionKey() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +MakeShellURLFromPathW(LPCWSTR lpPath, LPWSTR lpUrl, INT cchMax) +{ + FIXME("MakeShellURLFromPathW() stub\n"); + lpUrl = NULL; + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +MakeShellURLFromPathA(LPCSTR lpPath, LPSTR lpUrl, INT cchMax) +{ + FIXME("MakeShellURLFromPathA() stub\n"); + lpUrl = NULL; + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHParseDarwinIDFromCacheW(LPCWSTR lpUnknown1, LPWSTR lpUnknown2) +{ + FIXME("SHParseDarwinIDFromCacheW() stub\n"); + lpUnknown2 = NULL; + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHMultiFileProperties(IDataObject *pDataObject, DWORD dwFlags) +{ + FIXME("SHMultiFileProperties() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHCreatePropertyBag(REFIID refIId, LPVOID *lpUnknown) +{ + /* Call SHCreatePropertyBagOnMemory() from shlwapi.dll */ + FIXME("SHCreatePropertyBag() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHCopyMonikerToTemp(IMoniker *pMoniker, LPCWSTR lpInput, LPWSTR lpOutput, INT cchMax) +{ + /* Unimplemented in XP SP3 */ + TRACE("SHCopyMonikerToTemp() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HLOCAL +WINAPI +CheckWinIniForAssocs(VOID) +{ + FIXME("CheckWinIniForAssocs() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHGetSetFolderCustomSettingsW(LPSHFOLDERCUSTOMSETTINGSW pfcs, + LPCWSTR pszPath, + DWORD dwReadWrite) +{ + FIXME("SHGetSetFolderCustomSettingsW() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs, + LPCSTR pszPath, + DWORD dwReadWrite) +{ + FIXME("SHGetSetFolderCustomSettingsA() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHOpenPropSheetA(LPCSTR lpCaption, + HKEY hKeys[], + UINT uCount, + const CLSID *pClsID, + IDataObject *pDataObject, + IShellBrowser *pShellBrowser, + LPCSTR lpStartPage) +{ + FIXME("SHOpenPropSheetA() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHOpenPropSheetW(LPCWSTR lpCaption, + HKEY hKeys[], + UINT uCount, + const CLSID *pClsID, + IDataObject *pDataObject, + IShellBrowser *pShellBrowser, + LPCWSTR lpStartPage) +{ + FIXME("SHOpenPropSheetW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +CDefFolderMenu_MergeMenu(HINSTANCE hInstance, + UINT uMainMerge, + UINT uPopupMerge, + LPQCMINFO lpQcmInfo) +{ + FIXME("CDefFolderMenu_MergeMenu() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +CDefFolderMenu_Create(LPITEMIDLIST pidlFolder, + HWND hwnd, + UINT uidl, + PCUITEMID_CHILD_ARRAY *apidl, + IShellFolder *psf, + LPFNDFMCALLBACK lpfn, + HKEY hProgID, + HKEY hBaseProgID, + IContextMenu **ppcm) +{ + FIXME("CDefFolderMenu_Create() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHChangeRegistrationReceive(LPVOID lpUnknown1, DWORD dwUnknown2) +{ + FIXME("SHChangeRegistrationReceive() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +SHWaitOp_Operate(LPVOID lpUnknown1, DWORD dwUnknown2) +{ + FIXME("SHWaitOp_Operate() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +SHChangeNotifyReceive(LONG lUnknown, UINT uUnknown, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + FIXME("SHChangeNotifyReceive() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +RealDriveTypeFlags(INT iDrive, BOOL bUnknown) +{ + FIXME("RealDriveTypeFlags() stub\n"); + return 1; +} + +/* + * Unimplemented + */ +EXTERN_C LPWSTR +WINAPI +StrRStrW(LPWSTR lpSrc, LPWSTR lpLast, LPWSTR lpSearch) +{ + FIXME("StrRStrW() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C LPWSTR +WINAPI +StrRStrA(LPSTR lpSrc, LPSTR lpLast, LPSTR lpSearch) +{ + FIXME("StrRStrA() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C LONG +WINAPI +ShellHookProc(INT iCode, WPARAM wParam, LPARAM lParam) +{ + /* Unimplemented in WinXP SP3 */ + TRACE("ShellHookProc() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +ShellExec_RunDLL(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) +{ + FIXME("ShellExec_RunDLL() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +ShellExec_RunDLLA(HWND hwnd, HINSTANCE hInstance, LPSTR pszCmdLine, int nCmdShow) +{ + FIXME("ShellExec_RunDLLA() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +ShellExec_RunDLLW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) +{ + FIXME("ShellExec_RunDLLW() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SheShortenPathW(LPWSTR lpPath, BOOL bShorten) +{ + FIXME("SheShortenPathW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SheShortenPathA(LPSTR lpPath, BOOL bShorten) +{ + FIXME("SheShortenPathA() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SheSetCurDrive(INT iIndex) +{ + FIXME("SheSetCurDrive() stub\n"); + return 1; +} + +/* + * Unimplemented + */ +EXTERN_C LPWSTR +WINAPI +SheRemoveQuotesW(LPWSTR lpInput) +{ + FIXME("SheRemoveQuotesW() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C LPSTR +WINAPI +SheRemoveQuotesA(LPSTR lpInput) +{ + FIXME("SheRemoveQuotesA() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SheGetPathOffsetW(LPWSTR lpPath) +{ + FIXME("SheGetPathOffsetW() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SheGetDirExW(LPWSTR lpDrive, + LPDWORD lpCurDirLen, + LPWSTR lpCurDir) +{ + FIXME("SheGetDirExW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SheGetCurDrive(VOID) +{ + FIXME("SheGetCurDrive() stub\n"); + return 1; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SheFullPathW(LPWSTR lpFullName, DWORD dwPathSize, LPWSTR lpBuffer) +{ + FIXME("SheFullPathW() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SheFullPathA(LPSTR lpFullName, DWORD dwPathSize, LPSTR lpBuffer) +{ + FIXME("SheFullPathA() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SheConvertPathW(LPWSTR lpCmd, LPWSTR lpFileName, UINT uCmdLen) +{ + FIXME("SheConvertPathW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SheChangeDirExW(LPWSTR lpDir) +{ + FIXME("SheChangeDirExW() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SheChangeDirExA(LPSTR lpDir) +{ + FIXME("SheChangeDirExA() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHInvokePrinterCommandW(HWND hwnd, + UINT uAction, + LPCWSTR lpBuf1, + LPCWSTR lpBuf2, + BOOL fModal) +{ + FIXME("SHInvokePrinterCommandW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHInvokePrinterCommandA(HWND hwnd, + UINT uAction, + LPCSTR lpBuf1, + LPCSTR lpBuf2, + BOOL fModal) +{ + FIXME("SHInvokePrinterCommandA() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHCreateQueryCancelAutoPlayMoniker(IMoniker **ppmoniker) +{ + FIXME("SHCreateQueryCancelAutoPlayMoniker() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi) +{ + FIXME("SHCreateProcessAsUserW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHChangeNotifySuspendResume(BOOL bSuspend, + LPITEMIDLIST pidl, + BOOL bRecursive, + DWORD dwReserved) +{ + FIXME("SHChangeNotifySuspendResume() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +RegenerateUserEnvironment(LPVOID *lpUnknown, BOOL bUnknown) +{ + FIXME("RegenerateUserEnvironment() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C HINSTANCE +WINAPI +RealShellExecuteExA(HWND hwnd, + LPCSTR lpOperation, + LPCSTR lpFile, + LPCSTR lpParameters, + LPCSTR lpDirectory, + LPSTR lpReturn, + LPCSTR lpTitle, + LPSTR lpReserved, + WORD nShowCmd, + HANDLE *lpProcess, + DWORD dwFlags) +{ + FIXME("RealShellExecuteExA() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C HINSTANCE +WINAPI +RealShellExecuteExW(HWND hwnd, + LPCWSTR lpOperation, + LPCWSTR lpFile, + LPCWSTR lpParameters, + LPCWSTR lpDirectory, + LPWSTR lpReturn, + LPCWSTR lpTitle, + LPWSTR lpReserved, + WORD nShowCmd, + HANDLE *lpProcess, + DWORD dwFlags) +{ + FIXME("RealShellExecuteExW() stub\n"); + return NULL; +} + +/* + * Implemented + */ +EXTERN_C HINSTANCE +WINAPI +RealShellExecuteA(HWND hwnd, + LPCSTR lpOperation, + LPCSTR lpFile, + LPCSTR lpParameters, + LPCSTR lpDirectory, + LPSTR lpReturn, + LPCSTR lpTitle, + LPSTR lpReserved, + WORD nShowCmd, + HANDLE *lpProcess) +{ + return RealShellExecuteExA(hwnd, + lpOperation, + lpFile, + lpParameters, + lpDirectory, + lpReturn, + lpTitle, + lpReserved, + nShowCmd, + lpProcess, + 0); +} + +/* + * Implemented + */ +EXTERN_C HINSTANCE +WINAPI +RealShellExecuteW(HWND hwnd, + LPCWSTR lpOperation, + LPCWSTR lpFile, + LPCWSTR lpParameters, + LPCWSTR lpDirectory, + LPWSTR lpReturn, + LPCWSTR lpTitle, + LPWSTR lpReserved, + WORD nShowCmd, + HANDLE *lpProcess) +{ + return RealShellExecuteExW(hwnd, + lpOperation, + lpFile, + lpParameters, + lpDirectory, + lpReturn, + lpTitle, + lpReserved, + nShowCmd, + lpProcess, + 0); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +PrintersGetCommand_RunDLL(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) +{ + FIXME("PrintersGetCommand_RunDLL() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +PrintersGetCommand_RunDLLA(HWND hwnd, HINSTANCE hInstance, LPSTR pszCmdLine, int nCmdShow) +{ + FIXME("PrintersGetCommand_RunDLLA() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +PrintersGetCommand_RunDLLW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) +{ + FIXME("PrintersGetCommand_RunDLLW() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C IShellFolderViewCB* +WINAPI +SHGetShellFolderViewCB(HWND hwnd) +{ + FIXME("SHGetShellFolderViewCB() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SHLookupIconIndexA(LPCSTR lpName, INT iIndex, UINT uFlags) +{ + FIXME("SHLookupIconIndexA() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +SHLookupIconIndexW(LPCWSTR lpName, INT iIndex, UINT uFlags) +{ + FIXME("SHLookupIconIndexW() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C HANDLE +WINAPI +PifMgr_OpenProperties(LPCWSTR lpAppPath, LPCWSTR lpPifPath, UINT hInfIndex, UINT options) +{ + FIXME("PifMgr_OpenProperties() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +PifMgr_GetProperties(HANDLE hHandle, LPCSTR lpName, LPVOID lpUnknown, INT iUnknown, UINT uUnknown) +{ + FIXME("PifMgr_GetProperties() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +PifMgr_SetProperties(HANDLE hHandle, LPCSTR lpName, LPCVOID lpUnknown, INT iUnknown, UINT uUnknown) +{ + FIXME("PifMgr_SetProperties() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHStartNetConnectionDialogA(HWND hwnd, + LPCSTR pszRemoteName, + DWORD dwType) +{ + FIXME("SHStartNetConnectionDialogA() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHStartNetConnectionDialogW(HWND hwnd, + LPCWSTR pszRemoteName, + DWORD dwType) +{ + FIXME("SHStartNetConnectionDialogW() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HANDLE +WINAPI +PifMgr_CloseProperties(HANDLE hHandle, UINT uUnknown) +{ + FIXME("PifMgr_CloseProperties() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +DAD_DragEnterEx2(HWND hwndTarget, + POINT ptStart, + IDataObject *pdtObject) +{ + FIXME("DAD_DragEnterEx2() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +IsSuspendAllowed(VOID) +{ + FIXME("IsSuspendAllowed() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C UINT +WINAPI +SHGetNetResource(LPVOID lpUnknown1, UINT iIndex, LPVOID lpUnknown2, UINT cchMax) +{ + FIXME("SHGetNetResource() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +DragQueryInfo(HDROP hDrop, DRAGINFO *pDragInfo) +{ + FIXME("DragQueryInfo() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C LPVOID +WINAPI +DDECreatePostNotify(LPVOID lpUnknown) +{ + FIXME("DDECreatePostNotify() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHIsBadInterfacePtr(LPVOID pv, UINT ucb) +{ + FIXME("SHIsBadInterfacePtr() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +Activate_RunDLL(DWORD dwProcessId, LPVOID lpUnused1, LPVOID lpUnused2, LPVOID lpUnused3) +{ + FIXME("Activate_RunDLL() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +AppCompat_RunDLLW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) +{ + FIXME("AppCompat_RunDLLW() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +Control_RunDLLAsUserW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) +{ + FIXME("Control_RunDLLAsUserW() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C UINT +WINAPI +DragQueryFileAorW(HDROP hDrop, UINT iIndex, LPWSTR lpFile, UINT ucb, BOOL bUnicode, BOOL bShorten) +{ + FIXME("DragQueryFileAorW() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C DWORD +WINAPI +SHNetConnectionDialog(HWND hwndOwner, + LPCWSTR lpstrRemoteName, + DWORD dwType) +{ + FIXME("SHNetConnectionDialog() stub\n"); + return ERROR_INVALID_PARAMETER; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +DAD_SetDragImageFromListView(HWND hwnd, POINT pt) +{ + FIXME("DAD_SetDragImageFromListView() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C void +WINAPI +SHHandleDiskFull(HWND hwndOwner, UINT uDrive) +{ + FIXME("SHHandleDiskFull() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +ILGetPseudoNameW(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, LPWSTR szStr, INT iUnknown) +{ + /* Unimplemented in WinXP SP3 */ + TRACE("ILGetPseudoNameW() stub\n"); + *szStr = 0; + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C VOID +WINAPI +SHGlobalDefect(DWORD dwUnknown) +{ + /* Unimplemented in WinXP SP3 */ + TRACE("SHGlobalDefect() stub\n"); +} + +/* + * Unimplemented + */ +EXTERN_C LPITEMIDLIST +WINAPI +Printers_GetPidl(LPCITEMIDLIST pidl, LPCWSTR lpName) +{ + FIXME("Printers_GetPidl() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +Int64ToString(LONGLONG llInt64, + LPWSTR lpOut, + UINT uSize, + BOOL bUseFormat, + NUMBERFMT *pNumberFormat, + DWORD dwNumberFlags) +{ + FIXME("Int64ToString() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C INT +WINAPI +LargeIntegerToString(LARGE_INTEGER *pLargeInt, + LPWSTR lpOut, + UINT uSize, + BOOL bUseFormat, + NUMBERFMT *pNumberFormat, + DWORD dwNumberFlags) +{ + FIXME("LargeIntegerToString() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C LONG +WINAPI +Printers_AddPrinterPropPages(LPVOID lpUnknown1, LPVOID lpUnknown2) +{ + FIXME("Printers_AddPrinterPropPages() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C WORD +WINAPI +ExtractIconResInfoA(HANDLE hHandle, + LPSTR lpFile, + WORD wIndex, + LPWORD lpSize, + LPHANDLE lpIcon) +{ + FIXME("ExtractIconResInfoA() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C WORD +WINAPI +ExtractIconResInfoW(HANDLE hHandle, + LPWSTR lpFile, + WORD wIndex, + LPWORD lpSize, + LPHANDLE lpIcon) +{ + FIXME("ExtractIconResInfoW() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C DWORD +WINAPI +ExtractVersionResource16W(LPWSTR lpName, LPHANDLE lpHandle) +{ + FIXME("ExtractVersionResource16W() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL* +WINAPI +FindExeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + FIXME("FindExeDlgProc() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C HANDLE +WINAPI +InternalExtractIconListW(HANDLE hHandle, + LPWSTR lpFileName, + LPINT lpCount) +{ + FIXME("InternalExtractIconListW() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C HANDLE +WINAPI +InternalExtractIconListA(HANDLE hHandle, + LPSTR lpFileName, + LPINT lpCount) +{ + FIXME("InternalExtractIconListA() stub\n"); + return NULL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +FirstUserLogon(LPWSTR lpUnknown1, LPWSTR lpUnknown2) +{ + FIXME("FirstUserLogon() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHSetFolderPathA(int csidl, + HANDLE hToken, + DWORD dwFlags, + LPCSTR pszPath) +{ + FIXME("SHSetFolderPathA() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHSetFolderPathW(int csidl, + HANDLE hToken, + DWORD dwFlags, + LPCWSTR pszPath) +{ + FIXME("SHSetFolderPathW() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHGetUserPicturePathW(LPCWSTR lpPath, int csidl, LPVOID lpUnknown) +{ + FIXME("SHGetUserPicturePathW() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C HRESULT +WINAPI +SHSetUserPicturePathW(LPCWSTR lpPath, int csidl, LPVOID lpUnknown) +{ + FIXME("SHGetUserPicturePathA() stub\n"); + return E_FAIL; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHOpenEffectiveToken(LPVOID Token) +{ + FIXME("SHOpenEffectiveToken() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHTestTokenPrivilegeW(HANDLE hToken, LPDWORD ReturnLength) +{ + FIXME("SHTestTokenPrivilegeW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHShouldShowWizards(LPVOID lpUnknown) +{ + FIXME("SHShouldShowWizards() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +PathIsSlowW(LPCWSTR pszFile, DWORD dwFileAttr) +{ + FIXME("PathIsSlowW() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +PathIsSlowA(LPCSTR pszFile, DWORD dwFileAttr) +{ + FIXME("PathIsSlowA() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C DWORD +WINAPI +SHGetUserDisplayName(LPWSTR lpName, PULONG puSize) +{ + FIXME("SHGetUserDisplayName() stub\n"); + wcscpy(lpName, L"UserName"); + return ERROR_SUCCESS; +} + +/* + * Unimplemented + */ +EXTERN_C DWORD +WINAPI +SHGetProcessDword(DWORD dwUnknown1, DWORD dwUnknown2) +{ + /* Unimplemented in WinXP SP3 */ + TRACE("SHGetProcessDword() stub\n"); + return 0; +} + +/* + * Unimplemented + */ +EXTERN_C BOOL +WINAPI +SHTestTokenMembership(HANDLE TokenHandle, ULONG SidToCheck) +{ + FIXME("SHTestTokenMembership() stub\n"); + return FALSE; +} + +/* + * Unimplemented + */ +EXTERN_C LPVOID +WINAPI +SHGetUserSessionId(HANDLE hHandle) +{ + FIXME("SHGetUserSessionId() stub\n"); + return NULL; +} diff --git a/dll/win32/shell32_new/systray.cpp b/dll/win32/shell32_new/systray.cpp new file mode 100644 index 00000000000..81297a78907 --- /dev/null +++ b/dll/win32/shell32_new/systray.cpp @@ -0,0 +1,196 @@ +/* + * Systray handling + * + * Copyright 1999 Kai Morich + * Copyright 2004 Mike Hearn, for CodeWeavers + * Copyright 2005 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winnls.h" +#include "winuser.h" +#include "shellapi.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(systray); + +static const WCHAR classname[] = /* Shell_TrayWnd */ {'S','h','e','l','l','_','T','r','a','y','W','n','d','\0'}; + +/************************************************************************* + * Shell_NotifyIcon [SHELL32.296] + * Shell_NotifyIconA [SHELL32.297] + */ +BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) +{ + NOTIFYICONDATAW nidW; + INT cbSize; + + /* Validate the cbSize as Windows XP does */ + if (pnid->cbSize != NOTIFYICONDATAA_V1_SIZE && + pnid->cbSize != NOTIFYICONDATAA_V2_SIZE && + pnid->cbSize != NOTIFYICONDATAA_V3_SIZE && + pnid->cbSize != sizeof(NOTIFYICONDATAA)) + { + WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", + pnid->cbSize, NOTIFYICONDATAA_V1_SIZE); + cbSize = NOTIFYICONDATAA_V1_SIZE; + } + else + cbSize = pnid->cbSize; + + ZeroMemory(&nidW, sizeof(nidW)); + nidW.cbSize = sizeof(nidW); + nidW.hWnd = pnid->hWnd; + nidW.uID = pnid->uID; + nidW.uFlags = pnid->uFlags; + nidW.uCallbackMessage = pnid->uCallbackMessage; + nidW.hIcon = pnid->hIcon; + + /* szTip */ + if (pnid->uFlags & NIF_TIP) + MultiByteToWideChar(CP_ACP, 0, pnid->szTip, -1, nidW.szTip, sizeof(nidW.szTip)/sizeof(WCHAR)); + + if (cbSize >= NOTIFYICONDATAA_V2_SIZE) + { + nidW.dwState = pnid->dwState; + nidW.dwStateMask = pnid->dwStateMask; + + /* szInfo, szInfoTitle */ + if (pnid->uFlags & NIF_INFO) + { + MultiByteToWideChar(CP_ACP, 0, pnid->szInfo, -1, nidW.szInfo, sizeof(nidW.szInfo)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, pnid->szInfoTitle, -1, nidW.szInfoTitle, sizeof(nidW.szInfoTitle)/sizeof(WCHAR)); + } + + nidW.u.uTimeout = pnid->u.uTimeout; + nidW.dwInfoFlags = pnid->dwInfoFlags; + } + + if (cbSize >= NOTIFYICONDATAA_V3_SIZE) + nidW.guidItem = pnid->guidItem; + + if (cbSize >= sizeof(NOTIFYICONDATAA)) + nidW.hBalloonIcon = pnid->hBalloonIcon; + return Shell_NotifyIconW(dwMessage, &nidW); +} + +/************************************************************************* + * Shell_NotifyIconW [SHELL32.298] + */ +BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid) +{ + HWND tray; + COPYDATASTRUCT cds; + char *buffer = NULL; + BOOL ret; + + TRACE("dwMessage = %d, nid->cbSize=%d\n", dwMessage, nid->cbSize); + + /* Validate the cbSize so that WM_COPYDATA doesn't crash the application */ + if (nid->cbSize != NOTIFYICONDATAW_V1_SIZE && + nid->cbSize != NOTIFYICONDATAW_V2_SIZE && + nid->cbSize != NOTIFYICONDATAW_V3_SIZE && + nid->cbSize != sizeof(NOTIFYICONDATAW)) + { + NOTIFYICONDATAW newNid; + + WARN("Invalid cbSize (%d) - using only Win95 fields (size=%d)\n", + nid->cbSize, NOTIFYICONDATAW_V1_SIZE); + CopyMemory(&newNid, nid, NOTIFYICONDATAW_V1_SIZE); + newNid.cbSize = NOTIFYICONDATAW_V1_SIZE; + return Shell_NotifyIconW(dwMessage, &newNid); + } + + tray = FindWindowExW(0, NULL, classname, NULL); + if (!tray) return FALSE; + + cds.dwData = dwMessage; + + /* FIXME: if statement only needed because we don't support interprocess + * icon handles */ + if (nid->uFlags & NIF_ICON) + { + ICONINFO iconinfo; + BITMAP bmMask; + BITMAP bmColour; + LONG cbMaskBits; + LONG cbColourBits; + + if (!GetIconInfo(nid->hIcon, &iconinfo)) + goto noicon; + + if (!GetObjectW(iconinfo.hbmMask, sizeof(bmMask), &bmMask) || + !GetObjectW(iconinfo.hbmColor, sizeof(bmColour), &bmColour)) + { + DeleteObject(iconinfo.hbmMask); + DeleteObject(iconinfo.hbmColor); + goto noicon; + } + + cbMaskBits = (bmMask.bmPlanes * bmMask.bmWidth * bmMask.bmHeight * bmMask.bmBitsPixel) / 8; + cbColourBits = (bmColour.bmPlanes * bmColour.bmWidth * bmColour.bmHeight * bmColour.bmBitsPixel) / 8; + cds.cbData = nid->cbSize + 2*sizeof(BITMAP) + cbMaskBits + cbColourBits; + buffer = HeapAlloc(GetProcessHeap(), 0, cds.cbData); + if (!buffer) + { + DeleteObject(iconinfo.hbmMask); + DeleteObject(iconinfo.hbmColor); + return FALSE; + } + cds.lpData = buffer; + + memcpy(buffer, nid, nid->cbSize); + buffer += nid->cbSize; + memcpy(buffer, &bmMask, sizeof(bmMask)); + buffer += sizeof(bmMask); + memcpy(buffer, &bmColour, sizeof(bmColour)); + buffer += sizeof(bmColour); + GetBitmapBits(iconinfo.hbmMask, cbMaskBits, buffer); + buffer += cbMaskBits; + GetBitmapBits(iconinfo.hbmColor, cbColourBits, buffer); + + /* Reset pointer to allocated block so it can be freed later. + * Note that cds.lpData cannot be passed to HeapFree since it + * points to nid when no icon info is found. */ + buffer = cds.lpData; + + DeleteObject(iconinfo.hbmMask); + DeleteObject(iconinfo.hbmColor); + } + else + { +noicon: + cds.cbData = nid->cbSize; + cds.lpData = nid; + } + + ret = SendMessageW(tray, WM_COPYDATA, (WPARAM)nid->hWnd, (LPARAM)&cds); + + /* FIXME: if statement only needed because we don't support interprocess + * icon handles */ + HeapFree(GetProcessHeap(), 0, buffer); + + return ret; +} diff --git a/dll/win32/shell32_new/toolband.cpp b/dll/win32/shell32_new/toolband.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/toolband.h b/dll/win32/shell32_new/toolband.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dll/win32/shell32_new/undocshell.h b/dll/win32/shell32_new/undocshell.h new file mode 100644 index 00000000000..a51af2224fa --- /dev/null +++ b/dll/win32/shell32_new/undocshell.h @@ -0,0 +1,537 @@ +/* + * Copyright 1999, 2000 Juergen Schmied + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_UNDOCSHELL_H +#define __WINE_UNDOCSHELL_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "commctrl.h" +#include "shlobj.h" + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ + +/**************************************************************************** + * IDList Functions + */ +BOOL WINAPI ILGetDisplayName( + LPCITEMIDLIST pidl, + LPVOID path); + +/* type parameter for ILGetDisplayNameEx() */ +#define ILGDN_FORPARSING 0 +#define ILGDN_NORMAL 1 +#define ILGDN_INFOLDER 2 + +BOOL WINAPI ILGetDisplayNameEx( + LPSHELLFOLDER psf, + LPCITEMIDLIST pidl, + LPVOID path, + DWORD type); + +LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl); +void WINAPI ILGlobalFree(LPITEMIDLIST pidl); +LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); //FIXME +LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath); + +HRESULT WINAPI SHILCreateFromPathA ( + LPCSTR path, + LPITEMIDLIST * ppidl, + DWORD *attributes); + +HRESULT WINAPI SHILCreateFromPathW ( + LPCWSTR path, + LPITEMIDLIST * ppidl, + DWORD *attributes); + +/* + string functions +*/ +BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*); +BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*); + +/**************************************************************************** + * Shell Common Dialogs + */ + +/* RunFileDlg flags */ +#define RFF_NOBROWSE 0x01 +#define RFF_NODEFAULT 0x02 +#define RFF_CALCDIRECTORY 0x04 +#define RFF_NOLABEL 0x08 +#define RFF_NOSEPARATEMEM 0x20 /* NT only */ + +#define DE_SAMEFILE 0x71 + +/* RunFileFlg notification structure */ +typedef struct +{ + NMHDR hdr; + LPCSTR lpFile; + LPCSTR lpDirectory; + int nShow; +} NM_RUNFILEDLG, * LPNM_RUNFILEDLG; + +/* RunFileDlg notification return values */ +#define RF_OK 0x00 +#define RF_CANCEL 0x01 +#define RF_RETRY 0x02 + +void WINAPI RunFileDlg( + HWND hwndOwner, + HICON hIcon, + LPCSTR lpstrDirectory, + LPCSTR lpstrTitle, + LPCSTR lpstrDescription, + UINT uFlags); + +void WINAPI ExitWindowsDialog(HWND hwndOwner); + +BOOL WINAPI SHFindComputer( + LPCITEMIDLIST pidlRoot, + LPCITEMIDLIST pidlSavedSearch); + +void WINAPI SHHandleDiskFull(HWND hwndOwner, + UINT uDrive); + +int WINAPI SHOutOfMemoryMessageBox( + HWND hwndOwner, + LPCSTR lpCaption, + UINT uType); + +DWORD WINAPI SHNetConnectionDialog( + HWND hwndOwner, + LPCWSTR lpstrRemoteName, + DWORD dwType); + +/**************************************************************************** + * Cabinet Window Messages + */ + +#define CWM_SETPATH (WM_USER + 2) +#define CWM_WANTIDLE (WM_USER + 3) +#define CWM_GETSETCURRENTINFO (WM_USER + 4) +#define CWM_SELECTITEM (WM_USER + 5) +#define CWM_SELECTITEMSTR (WM_USER + 6) +#define CWM_GETISHELLBROWSER (WM_USER + 7) +#define CWM_TESTPATH (WM_USER + 9) +#define CWM_STATECHANGE (WM_USER + 10) +#define CWM_GETPATH (WM_USER + 12) + +/* CWM_TESTPATH types */ +#define CWTP_ISEQUAL 0 +#define CWTP_ISCHILD 1 + +/* CWM_TESTPATH structure */ +typedef struct +{ + DWORD dwType; + ITEMIDLIST idl; +} CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT; + +/**************************************************************************** + * System Imagelist Routines + */ + +int WINAPI Shell_GetCachedImageIndexA( + LPCSTR lpszFileName, + int nIconIndex, + UINT bSimulateDoc); + +BOOL WINAPI Shell_GetImageLists( + HIMAGELIST *lphimlLarge, + HIMAGELIST *lphimlSmall); + +HICON WINAPI SHGetFileIcon( + DWORD dwReserved, + LPCSTR lpszPath, + DWORD dwFileAttributes, + UINT uFlags); + +BOOL WINAPI FileIconInit(BOOL bFullInit); + +/**************************************************************************** + * File Menu Routines + */ +/* FileMenu_Create nSelHeight constants */ +#define FM_DEFAULT_SELHEIGHT -1 +#define FM_FULL_SELHEIGHT 0 + +/* FileMenu_Create flags */ +#define FMF_SMALL_ICONS 0x00 +#define FMF_LARGE_ICONS 0x08 +#define FMF_NO_COLUMN_BREAK 0x10 + +HMENU WINAPI FileMenu_Create( + COLORREF crBorderColor, + int nBorderWidth, + HBITMAP hBorderBmp, + int nSelHeight, + UINT uFlags); + +void WINAPI FileMenu_Destroy(HMENU hMenu); + +/* FileMenu_AppendItem constants */ +#define FM_SEPARATOR (LPCSTR)1 +#define FM_BLANK_ICON -1 +#define FM_DEFAULT_HEIGHT 0 + +BOOL WINAPI FileMenu_AppendItem( + HMENU hMenu, + LPCSTR lpszText, + UINT uID, + int iIcon, + HMENU hMenuPopup, + int nItemHeight); + +/* FileMenu_InsertUsingPidl flags */ +#define FMF_NO_EMPTY_ITEM 0x01 +#define FMF_NO_PROGRAM_GROUPS 0x04 + +/* FileMenu_InsertUsingPidl callback function */ +typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile); + +int WINAPI FileMenu_InsertUsingPidl( + HMENU hMenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback); + +int WINAPI FileMenu_ReplaceUsingPidl( + HMENU hMenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback); + +void WINAPI FileMenu_Invalidate(HMENU hMenu); + +HMENU WINAPI FileMenu_FindSubMenuByPidl( + HMENU hMenu, + LPCITEMIDLIST pidl); + +BOOL WINAPI FileMenu_TrackPopupMenuEx( + HMENU hMenu, + UINT uFlags, + int x, + int y, + HWND hWnd, + LPTPMPARAMS lptpm); + +BOOL WINAPI FileMenu_GetLastSelectedItemPidls( + UINT uReserved, + LPCITEMIDLIST *ppidlFolder, + LPCITEMIDLIST *ppidlItem); + +LRESULT WINAPI FileMenu_MeasureItem( + HWND hWnd, + LPMEASUREITEMSTRUCT lpmis); + +LRESULT WINAPI FileMenu_DrawItem( + HWND hWnd, + LPDRAWITEMSTRUCT lpdis); + +BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu); + +void WINAPI FileMenu_AbortInitMenu(void); + +LRESULT WINAPI FileMenu_HandleMenuChar( + HMENU hMenu, + WPARAM wParam); + +BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu); + +BOOL WINAPI FileMenu_DeleteItemByCmd( + HMENU hMenu, + UINT uID); + +BOOL WINAPI FileMenu_DeleteItemByIndex( + HMENU hMenu, + UINT uPos); + +BOOL WINAPI FileMenu_DeleteMenuItemByFirstID( + HMENU hMenu, + UINT uID); + +BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu); + +BOOL WINAPI FileMenu_EnableItemByCmd( + HMENU hMenu, + UINT uID, + BOOL bEnable); + +DWORD WINAPI FileMenu_GetItemExtent( + HMENU hMenu, + UINT uPos); + +int WINAPI FileMenu_AppendFilesForPidl( + HMENU hMenu, + LPCITEMIDLIST pidl, + BOOL bAddSeparator); + +int WINAPI FileMenu_AddFilesForPidl( + HMENU hMenu, + UINT uReserved, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback); + +/**************************************************************************** + * Drag And Drop Routines + */ + +HRESULT WINAPI SHRegisterDragDrop( + HWND hWnd, + LPDROPTARGET lpDropTarget); + +HRESULT WINAPI SHRevokeDragDrop(HWND hWnd); + +BOOL WINAPI DAD_DragEnter(HWND hWnd); + +BOOL WINAPI DAD_SetDragImageFromListView( + HWND hWnd, + POINT pt); + +BOOL WINAPI DAD_ShowDragImage(BOOL bShow); + +/**************************************************************************** + * Path Manipulation Routines + */ + +BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2); + +LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile); + +LPVOID WINAPI PathAddBackslashAW(LPVOID path); + +LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive); + +LPVOID WINAPI PathFindExtensionAW(LPCVOID path); + +LPVOID WINAPI PathFindFileNameAW(LPCVOID path); + +LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2); + +LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath); + +BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath); + +void WINAPI PathRemoveBlanksAW(LPVOID lpszPath); + +VOID WINAPI PathQuoteSpacesAW(LPVOID path); + +void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath); + +BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath); + +BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath); + +BOOL WINAPI PathIsRootAW(LPCVOID x); + +BOOL WINAPI PathIsExeAW(LPCVOID lpszPath); + +BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath); + +BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath); + +BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec); + +BOOL WINAPI PathMakeUniqueNameAW( + LPVOID lpszBuffer, + DWORD dwBuffSize, + LPCVOID lpszShortName, + LPCVOID lpszLongName, + LPCVOID lpszPathName); + +BOOL WINAPI PathYetAnotherMakeUniqueName( + LPWSTR lpszBuffer, + LPCWSTR lpszPathName, + LPCWSTR lpszShortName, + LPCWSTR lpszLongName); + +BOOL WINAPI PathQualifyA(LPCSTR path); +BOOL WINAPI PathQualifyW(LPCWSTR path); +#define PathQualify WINELIB_NAME_AW(PathQualify) +BOOL WINAPI PathQualifyAW(LPCVOID path); + + +/* PathResolve flags */ +#define PRF_CHECKEXISTANCE 0x01 +#define PRF_EXECUTABLE 0x02 +#define PRF_QUALIFYONPATH 0x04 +#define PRF_WINDOWS31 0x08 + +BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags); + +VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath); + +/* PathProcessCommand flags */ +#define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */ +#define PPCF_INCLUDEARGS 0x02 +//#define PPCF_NODIRECTORIES 0x10 move to shlobj +#define PPCF_DONTRESOLVE 0x20 +#define PPCF_PATHISRELATIVE 0x40 + +HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff, + DWORD dwBuffSize, DWORD dwFlags); + +void WINAPI PathStripPathAW(LPVOID lpszPath); + +BOOL WINAPI PathStripToRootAW(LPVOID lpszPath); + +void WINAPI PathRemoveArgsAW(LPVOID lpszPath); + +void WINAPI PathRemoveExtensionAW(LPVOID lpszPath); + +int WINAPI PathParseIconLocationAW(LPVOID lpszPath); + +BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2); + +BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs); + +/**************************************************************************** + * Shell Namespace Routines + */ + +/* Generic structure used by several messages */ +typedef struct +{ + DWORD dwReserved; + DWORD dwReserved2; + LPCITEMIDLIST pidl; + LPDWORD lpdwUser; +} SFVCBINFO, * LPSFVCBINFO; +typedef const SFVCBINFO * LPCSFVCBINFO; + +/* SFVCB_SELECTIONCHANGED structure */ +typedef struct +{ + UINT uOldState; + UINT uNewState; + LPCITEMIDLIST pidl; + LPDWORD lpdwUser; +} SFVSELECTSTATE, * LPSFVSELECTSTATE; +typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE; + +/* SFVCB_COPYHOOKCALLBACK structure */ +typedef struct +{ + HWND hwnd; + UINT wFunc; + UINT wFlags; + LPCSTR pszSrcFile; + DWORD dwSrcAttribs; + LPCSTR pszDestFile; + DWORD dwDestAttribs; +} SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO; +typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO; + +/* SFVCB_GETDETAILSOF structure */ +typedef struct +{ + LPCITEMIDLIST pidl; + int fmt; + int cx; + STRRET lpText; +} SFVCOLUMNINFO, * LPSFVCOLUMNINFO; + +/**************************************************************************** + * Misc Stuff + */ + +/* SHWaitForFileToOpen flags */ +#define SHWFF_ADD 0x01 +#define SHWFF_REMOVE 0x02 +#define SHWFF_WAIT 0x04 + +BOOL WINAPI SHWaitForFileToOpen( + LPCITEMIDLIST pidl, + DWORD dwFlags, + DWORD dwTimeout); + +WORD WINAPI ArrangeWindows( + HWND hwndParent, + DWORD dwReserved, + LPCRECT lpRect, + WORD cKids, + CONST HWND * lpKids); + +/* RegisterShellHook types */ +#define RSH_DEREGISTER 0 +#define RSH_REGISTER 1 +#define RSH_REGISTER_PROGMAN 2 +#define RSH_REGISTER_TASKMAN 3 + +BOOL WINAPI RegisterShellHook( + HWND hWnd, + DWORD dwType); + +/* SHCreateDefClassObject callback function */ +typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)( + LPUNKNOWN pUnkOuter, + REFIID riidObject, + LPVOID *ppvObject); + +HRESULT WINAPI SHCreateDefClassObject( + REFIID riidFactory, + LPVOID *ppvFactory, + LPFNCDCOCALLBACK lpfnCallback, + LPDWORD lpdwUsage, + REFIID riidObject); + +void WINAPI SHFreeUnusedLibraries(void); + +/* SHCreateLinks flags */ +#define SHCLF_PREFIXNAME 0x01 +#define SHCLF_CREATEONDESKTOP 0x02 + +HRESULT WINAPI SHCreateLinks( + HWND hWnd, + LPCSTR lpszDir, + LPDATAOBJECT lpDataObject, + UINT uFlags, + LPITEMIDLIST *lppidlLinks); + +DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len); +DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len); + +/* policy functions */ +BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey); + +/* Shell Desktop functions */ + +#define WM_GETISHELLBROWSER (WM_USER+7) + +BOOL WINAPI SHDesktopMessageLoop(HANDLE); + +#define CSIDL_FOLDER_MASK 0x00ff + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* __WINE_UNDOCSHELL_H */ diff --git a/dll/win32/shell32_new/version.h b/dll/win32/shell32_new/version.h new file mode 100644 index 00000000000..cd0d8dbb9c7 --- /dev/null +++ b/dll/win32/shell32_new/version.h @@ -0,0 +1,28 @@ +/* + * Shared Resource/DllGetVersion version information + * + * Copyright (C) 2004 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEVERSION_MAJOR 5 +#define WINE_FILEVERSION_MINOR 0 +#define WINE_FILEVERSION_BUILD 3900 +#define WINE_FILEVERSION_PLATFORMID 6975 + +/* FIXME: when libs/wpp gets fixed to support concatenation we can remove + * this and define it in version.rc */ +#define WINE_FILEVERSION_STR "5.0.3900.6975" diff --git a/dll/win32/shell32_new/version.rc b/dll/win32/shell32_new/version.rc new file mode 100644 index 00000000000..a5e23ddce39 --- /dev/null +++ b/dll/win32/shell32_new/version.rc @@ -0,0 +1,27 @@ +/* + * version information for shell32.dll + * + * Copyright (C) 2003 John K. Hohm + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "version.h" + +#define WINE_OLESELFREGISTER +#define WINE_FILEVERSION WINE_FILEVERSION_MAJOR,WINE_FILEVERSION_MINOR,WINE_FILEVERSION_BUILD,WINE_FILEVERSION_PLATFORMID +#define WINE_FILENAME_STR "shell32.dll" + +#include diff --git a/dll/win32/shell32_new/xdg.h b/dll/win32/shell32_new/xdg.h new file mode 100644 index 00000000000..6c083c66e32 --- /dev/null +++ b/dll/win32/shell32_new/xdg.h @@ -0,0 +1,51 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#ifndef __XDG_H__ +#define __XDG_H__ + +/* + * XDG directories access + */ +#define XDG_DATA_HOME 0 +#define XDG_CONFIG_HOME 1 +#define XDG_DATA_DIRS 2 +#define XDG_CONFIG_DIRS 3 +#define XDG_CACHE_HOME 4 + +const char *XDG_GetPath(int path_id); +char *XDG_BuildPath(int root_id, const char *subpath); +int XDG_MakeDirs(const char *path); + +#define XDG_URLENCODE 0x1 +BOOL XDG_WriteDesktopStringEntry(int fd, const char *keyName, DWORD dwFlags, const char *value); + +typedef struct tagXDG_PARSED_FILE XDG_PARSED_FILE; + +XDG_PARSED_FILE *XDG_ParseDesktopFile(int fd); +char *XDG_GetStringValue(XDG_PARSED_FILE *file, const char *group_name, const char *value_name, DWORD dwFlags); +void XDG_FreeParsedFile(XDG_PARSED_FILE *file); + +/* implemented in trash.c */ +typedef struct tagTRASH_ELEMENT TRASH_ELEMENT; + +BOOL TRASH_CanTrashFile(LPCWSTR wszPath); +BOOL TRASH_TrashFile(LPCWSTR wszPath); +HRESULT TRASH_UnpackItemID(LPCSHITEMID id, TRASH_ELEMENT *element, WIN32_FIND_DATAW *data); +HRESULT TRASH_EnumItems(LPITEMIDLIST **pidls, int *count); +void TRASH_DisposeElement(TRASH_ELEMENT *element); + + +#endif /* ndef __XDG_H__ */ diff --git a/dll/win32/shimgvw/lang/pl-PL.rc b/dll/win32/shimgvw/lang/pl-PL.rc index 1237b398840..dd90848c68b 100644 --- a/dll/win32/shimgvw/lang/pl-PL.rc +++ b/dll/win32/shimgvw/lang/pl-PL.rc @@ -1,18 +1,23 @@ +/* + * Polish translation by Rafal Harabien (Apr, 2011) + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_APPTITLE "Przegldarka obrazw i faxw ReactOS" - IDS_SETASDESKBG "Ustaw jako to pulpitu" - IDS_PREVIEW "Podgld" + IDS_APPTITLE "Przeglądarka obrazów i faksów ReactOS" + IDS_SETASDESKBG "Ustaw jako tło pulpitu" + IDS_PREVIEW "Podgląd" /* Tooltips */ - IDS_TOOLTIP_NEXT_PIC "Nastpny obraz" + IDS_TOOLTIP_NEXT_PIC "Następny obraz" IDS_TOOLTIP_PREV_PIC "Poprzedni obraz" - IDS_TOOLTIP_ZOOM_IN "Powiksz (+)" + IDS_TOOLTIP_ZOOM_IN "Powiększ (+)" IDS_TOOLTIP_ZOOM_OUT "Pomniejsz (-)" - IDS_TOOLTIP_ROT_CLOCKW "Obr zgodnie z ruchem wskazwek zegara (Ctrl+K)" - IDS_TOOLTIP_ROT_COUNCW "Obr przeciwnie do ruchu wskazwek zegara (Ctrl+L)" + IDS_TOOLTIP_ROT_CLOCKW "Obróć zgodnie z ruchem wskazówek zegara (Ctrl+K)" + IDS_TOOLTIP_ROT_COUNCW "Obróć przeciwnie do ruchu wskazówek zegara (Ctrl+L)" IDS_TOOLTIP_PRINT "Drukuj (Ctrl+P)" IDS_TOOLTIP_SAVEAS "Zapisz jako... (Ctrl+S)" END diff --git a/dll/win32/shimgvw/lang/ru-RU.rc b/dll/win32/shimgvw/lang/ru-RU.rc index 27ae9d88042..82c054ed056 100644 --- a/dll/win32/shimgvw/lang/ru-RU.rc +++ b/dll/win32/shimgvw/lang/ru-RU.rc @@ -2,17 +2,17 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_APPTITLE " " - IDS_SETASDESKBG " " - IDS_PREVIEW "" + IDS_APPTITLE "Программа просмотра изображений и факсов" + IDS_SETASDESKBG "Установить как фон рабочего стола" + IDS_PREVIEW "Предпросмотр" /* Tooltips */ - IDS_TOOLTIP_NEXT_PIC " " - IDS_TOOLTIP_PREV_PIC " " - IDS_TOOLTIP_ZOOM_IN " (+)" - IDS_TOOLTIP_ZOOM_OUT " (-)" - IDS_TOOLTIP_ROT_CLOCKW " (Ctrl+K)" - IDS_TOOLTIP_ROT_COUNCW " (Ctrl+L)" - IDS_TOOLTIP_PRINT " (Ctrl+P)" - IDS_TOOLTIP_SAVEAS " ... (Ctrl+S)" + IDS_TOOLTIP_NEXT_PIC "Следующее изображение" + IDS_TOOLTIP_PREV_PIC "Предыдущее изображение" + IDS_TOOLTIP_ZOOM_IN "Увеличить (+)" + IDS_TOOLTIP_ZOOM_OUT "Уменьшить (-)" + IDS_TOOLTIP_ROT_CLOCKW "Повернуть по часовой стрелке (Ctrl+K)" + IDS_TOOLTIP_ROT_COUNCW "Повернуть против часовой стрелки (Ctrl+L)" + IDS_TOOLTIP_PRINT "Печать (Ctrl+P)" + IDS_TOOLTIP_SAVEAS "Сохранить как... (Ctrl+S)" END diff --git a/dll/win32/shimgvw/lang/uk-UA.rc b/dll/win32/shimgvw/lang/uk-UA.rc index 3c323fc2e4e..b69a9247303 100644 --- a/dll/win32/shimgvw/lang/uk-UA.rc +++ b/dll/win32/shimgvw/lang/uk-UA.rc @@ -10,17 +10,17 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE BEGIN - IDS_APPTITLE " ReactOS" - IDS_SETASDESKBG " " - IDS_PREVIEW "" + IDS_APPTITLE "Програма перегляду зображень і факсів ReactOS" + IDS_SETASDESKBG "Встановити як фон робочого столу" + IDS_PREVIEW "Перегляд" /* Tooltips */ - IDS_TOOLTIP_NEXT_PIC " " - IDS_TOOLTIP_PREV_PIC " " - IDS_TOOLTIP_ZOOM_IN " (+)" - IDS_TOOLTIP_ZOOM_OUT " (-)" - IDS_TOOLTIP_ROT_CLOCKW " (Ctrl+K)" - IDS_TOOLTIP_ROT_COUNCW " (Ctrl+L)" - IDS_TOOLTIP_PRINT " (Ctrl+P)" - IDS_TOOLTIP_SAVEAS " ... (Ctrl+S)" + IDS_TOOLTIP_NEXT_PIC "Наступне зображення" + IDS_TOOLTIP_PREV_PIC "Попереднє зображення" + IDS_TOOLTIP_ZOOM_IN "Збільшити (+)" + IDS_TOOLTIP_ZOOM_OUT "Зменшити (-)" + IDS_TOOLTIP_ROT_CLOCKW "Повернути за годинниковою стрілкою (Ctrl+K)" + IDS_TOOLTIP_ROT_COUNCW "Повернути проти годинникової стрілки (Ctrl+L)" + IDS_TOOLTIP_PRINT "Друк (Ctrl+P)" + IDS_TOOLTIP_SAVEAS "Зберегти як... (Ctrl+S)" END diff --git a/dll/win32/shimgvw/rsrc.rc b/dll/win32/shimgvw/rsrc.rc index 55f1bd3cb83..8b45ab5d4a5 100644 --- a/dll/win32/shimgvw/rsrc.rc +++ b/dll/win32/shimgvw/rsrc.rc @@ -10,7 +10,10 @@ #include "lang/it-IT.rc" #include "lang/no-NO.rc" #include "lang/lt-LT.rc" +#include "lang/sk-SK.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" -#include "lang/sk-SK.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/shlwapi/ordinal.c b/dll/win32/shlwapi/ordinal.c index 2bf0e79f1ac..8151fc78cd6 100644 --- a/dll/win32/shlwapi/ordinal.c +++ b/dll/win32/shlwapi/ordinal.c @@ -144,7 +144,7 @@ static HANDLE SHLWAPI_DupSharedHandle(HANDLE hShared, DWORD dwDstProcId, * the view pointer returned by this size. * */ -HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId) +HANDLE WINAPI SHAllocShared(LPVOID lpvData, ULONG dwSize, DWORD dwProcId) { HANDLE hMap; LPVOID pMapped; @@ -3735,6 +3735,7 @@ BOOL WINAPI GetOpenFileNameWrapW(LPOPENFILENAMEW ofn) /************************************************************************* * @ [SHLWAPI.404] */ +#if 1 HRESULT WINAPI SHIShellFolder_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF flags, IEnumIDList **ppenum) { /* Windows attempts to get an IPersist interface and, if that fails, an @@ -3751,6 +3752,29 @@ HRESULT WINAPI SHIShellFolder_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHC return IShellFolder_EnumObjects(lpFolder, hwnd, flags, ppenum); } +#else +HRESULT WINAPI SHIShellFolder_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF flags, IEnumIDList **ppenum) +{ + IPersist *persist; + HRESULT hr; + + hr = IShellFolder_QueryInterface(lpFolder, &IID_IPersist, (LPVOID)&persist); + if(SUCCEEDED(hr)) + { + CLSID clsid; + hr = IPersist_GetClassID(persist, &clsid); + if(SUCCEEDED(hr)) + { + if(IsEqualCLSID(&clsid, &CLSID_ShellFSFolder)) + hr = IShellFolder_EnumObjects(lpFolder, hwnd, flags, ppenum); + else + hr = E_FAIL; + } + IPersist_Release(persist); + } + return hr; +} +#endif /* INTERNAL: Map from HLS color space to RGB */ static WORD ConvertHue(int wHue, WORD wMid1, WORD wMid2) diff --git a/dll/win32/shlwapi/shlwapi.rc b/dll/win32/shlwapi/shlwapi.rc index 0dd60f80528..869e4296aae 100644 --- a/dll/win32/shlwapi/shlwapi.rc +++ b/dll/win32/shlwapi/shlwapi.rc @@ -37,7 +37,6 @@ #include "shlwapi_Sk.rc" #include "shlwapi_Sv.rc" #include "shlwapi_Tr.rc" -#include "shlwapi_Uk.rc" /* UTF-8 */ @@ -50,4 +49,5 @@ #include "shlwapi_Ro.rc" #include "shlwapi_Ru.rc" #include "shlwapi_Si.rc" +#include "shlwapi_Uk.rc" #include "shlwapi_Zh.rc" diff --git a/dll/win32/shlwapi/shlwapi_Uk.rc b/dll/win32/shlwapi/shlwapi_Uk.rc index e468c4ac451..45da24723e6 100644 --- a/dll/win32/shlwapi/shlwapi_Uk.rc +++ b/dll/win32/shlwapi/shlwapi_Uk.rc @@ -20,26 +20,29 @@ #include "resource.h" +/* UTF-8 */ +#pragma code_page(65001) + LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "!" +CAPTION "Помилка!" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "& ", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "&Більше не показувати це повідомлення", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&ͳ", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"&Скасувати", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"&Так", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON L"&Ні", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } STRINGTABLE { - IDS_BYTES_FORMAT "%ld " - IDS_TIME_INTERVAL_HOURS " " - IDS_TIME_INTERVAL_MINUTES " " - IDS_TIME_INTERVAL_SECONDS " ." + IDS_BYTES_FORMAT "%ld байт" + IDS_TIME_INTERVAL_HOURS " год" + IDS_TIME_INTERVAL_MINUTES " хв" + IDS_TIME_INTERVAL_SECONDS " сек." } diff --git a/dll/win32/smdll/CMakeLists.txt b/dll/win32/smdll/CMakeLists.txt index cb850fc1bde..ba212af1866 100644 --- a/dll/win32/smdll/CMakeLists.txt +++ b/dll/win32/smdll/CMakeLists.txt @@ -12,6 +12,7 @@ list(APPEND SOURCE add_library(smdll SHARED ${SOURCE}) target_link_libraries(smdll smlib) +set_entrypoint(smdll DllMainCRTStartup 12) add_importlibs(smdll ntdll) add_dependencies(smdll psdk) add_cd_file(TARGET smdll DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/sti/CMakeLists.txt b/dll/win32/sti/CMakeLists.txt index 9a06b70d782..bf59c851302 100644 --- a/dll/win32/sti/CMakeLists.txt +++ b/dll/win32/sti/CMakeLists.txt @@ -36,6 +36,7 @@ add_importlibs(sti oleaut32 rpcrt4 advapi32 + msvcrt kernel32 ntdll) diff --git a/dll/win32/syssetup/CMakeLists.txt b/dll/win32/syssetup/CMakeLists.txt index 9f8ac236bd0..433fb648119 100644 --- a/dll/win32/syssetup/CMakeLists.txt +++ b/dll/win32/syssetup/CMakeLists.txt @@ -1,8 +1,7 @@ + set_unicode() - -add_definitions(-D_DLL -D__USE_CRTIMP) - set_rc_compiler() + spec2def(syssetup.dll syssetup.spec) list(APPEND SOURCE @@ -19,9 +18,7 @@ add_library(syssetup SHARED ${SOURCE}) set_module_type(syssetup win32dll) -target_link_libraries(syssetup - uuid - ${PSEH_LIB}) +target_link_libraries(syssetup uuid ${PSEH_LIB}) add_importlibs(syssetup msvcrt @@ -38,5 +35,4 @@ add_importlibs(syssetup kernel32 ntdll) - add_cd_file(TARGET syssetup DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/syssetup/lang/bg-BG.rc b/dll/win32/syssetup/lang/bg-BG.rc index 44bd6211055..06e1ebe4c99 100644 --- a/dll/win32/syssetup/lang/bg-BG.rc +++ b/dll/win32/syssetup/lang/bg-BG.rc @@ -27,9 +27,7 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN LTEXT " !", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT " . "\ - " , "\ - " .", IDC_STATIC, 115, 40, 195, 100 + LTEXT " . , .", IDC_STATIC, 115, 40, 195, 100 LTEXT " .", IDC_STATIC, 115, 169, 200, 17 END @@ -39,13 +37,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION " " FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " "\ - " , ( ) :", + LTEXT " , ( ) :", IDC_STATIC,15,2,286,24 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT " GPL "\ - "( ), GPL.", + LTEXT " GPL ( ), GPL.", IDC_STATIC,15,110,227,20 PUSHBUTTON "& GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT " .",IDC_STATIC,15,136, @@ -74,14 +70,12 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT " 15 . "\ - " , .", + LTEXT " 15 . , .", IDC_STATIC, 45, 7, 250, 24 LTEXT " &:", IDC_STATIC, 45, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT " , Administrator. "\ - " , .", + LTEXT " , Administrator. , .", IDC_STATIC, 45, 57, 250, 25 LTEXT " Administrator, - 14 .", IDC_STATIC, 54, 87, 250, 8 @@ -98,9 +92,7 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT " , "\ - " . "\ - " .", IDC_STATIC, 53, 2, 253, 26 + LTEXT " , . .", IDC_STATIC, 53, 2, 253, 26 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT " , .", IDC_STATIC, 53, 60, 184, 16 @@ -151,11 +143,9 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN LTEXT " ", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT " .\n\n" \ - " , .", IDC_STATIC, 115, 40, 195, 100 + LTEXT " .\n\n , .", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT " , . "\ - " .", IDC_STATIC, 115, 169, 200, 17 + LTEXT " , . .", IDC_STATIC, 115, 169, 200, 17 END diff --git a/dll/win32/syssetup/lang/cs-CZ.rc b/dll/win32/syssetup/lang/cs-CZ.rc index 3a334191b55..cb32b17d606 100644 --- a/dll/win32/syssetup/lang/cs-CZ.rc +++ b/dll/win32/syssetup/lang/cs-CZ.rc @@ -12,9 +12,7 @@ CAPTION "ReactOS Instal FONT 8, "MS Shell Dlg" BEGIN LTEXT "Vtejte v prvodci instalace systmu ReactOS.", IDC_WELCOMETITLE, 115, 9, 189, 31 - LTEXT "Tento prvodce nainstaluje systm ReactOS na V pota. Prvodce "\ - "potebuje zskat nkter informace o Vs a Vaem potai "\ - "aby mohl systm sprvn nastavit.", IDC_STATIC, 115, 50, 189, 100 + LTEXT "Tento prvodce nainstaluje systm ReactOS na V pota. Prvodce potebuje zskat nkter informace o Vs a Vaem potai aby mohl systm sprvn nastavit.", IDC_STATIC, 115, 50, 189, 100 LTEXT "Kliknutm na Dal pokraujte v instalaci.", IDC_STATIC, 115, 160, 189, 31 END @@ -24,13 +22,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Instaltor" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Vvoji systmu ReactOS by rdi zmnili nsledujc Open Source projekty."\ - "Tyto projekty (nebo jejich sti) byly pouity pi vvoji systmu ReactOS:", + LTEXT "Vvoji systmu ReactOS by rdi zmnili nsledujc Open Source projekty. Tyto projekty (nebo jejich sti) byly pouity pi vvoji systmu ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS je licencovn pod GPL. Pokud chcete systm (nebo jeho sti) pout "\ - "nebo redistribuovat, muste respektovat GPL", + LTEXT "ReactOS je licencovn pod GPL. Pokud chcete systm (nebo jeho sti) pout nebo redistribuovat, muste respektovat GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&Zobrazit GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Kliknutm na Dal pokraujte v instalaci.",IDC_STATIC,15,136, @@ -59,14 +55,12 @@ CAPTION "ReactOS Instal FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Napite jmno Vaeho potae o dlce 15 znak nebo mn. "\ - "Pokud je pota pipojen k sti, mus bt jeho jmno uniktn.", + LTEXT "Napite jmno Vaeho potae o dlce 15 znak nebo mn. Pokud je pota pipojen k sti, mus bt jeho jmno uniktn.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Jmno potae:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Instaltor vytvo uivatelsk et nazvan Administrator. "\ - "Mete tento et pout, pokud budete potebovat pln pstup k Vaemu potai.", + LTEXT "Instaltor vytvo uivatelsk et nazvan Administrator. Mete tento et pout, pokud budete potebovat pln pstup k Vaemu potai.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Zadejte heslo tu Administrator o dlce 14 znak nebo mn.", IDC_STATIC, 54, 87, 250, 8 @@ -83,9 +77,7 @@ CAPTION "ReactOS Instal FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Lokalizace systmu by mla souhlasit s jazykem aplikac, "\ - "kter chcete pouvat. Localizace ur jak budou zobrazena "\ - "sla, mny a kalendn data.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "Lokalizace systmu by mla souhlasit s jazykem aplikac, kter chcete pouvat. Localizace ur jak budou zobrazena sla, mny a kalendn data.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Pro zmnu lokalizace systmu kliknte na Zmnit.", IDC_STATIC, 53, 60, 184, 8 @@ -135,11 +127,9 @@ CAPTION "Dokon FONT 8, "MS Shell Dlg" BEGIN LTEXT "Dokonen prvodce instalac systmu ReactOS",IDC_FINISHTITLE,115,9,195,37 - LTEXT "Prvodce instalac systmu ReactOS byl spn dokonen.\n\n" \ - "Po kliknut na Dokonit bude pota restartovn.", IDC_STATIC, 115, 58, 195, 100 + LTEXT "Prvodce instalac systmu ReactOS byl spn dokonen.\n\nPo kliknut na Dokonit bude pota restartovn.", IDC_STATIC, 115, 58, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Pokud je v mechanice instalan CD, vyjmte jej. Pot kliknutm na Dokonit "\ - "restartujte pota.", IDC_STATIC, 115, 160, 195, 31 + LTEXT "Pokud je v mechanice instalan CD, vyjmte jej. Pot kliknutm na Dokonit restartujte pota.", IDC_STATIC, 115, 160, 195, 31 END diff --git a/dll/win32/syssetup/lang/de-DE.rc b/dll/win32/syssetup/lang/de-DE.rc index 95441e76417..53585237fe3 100644 --- a/dll/win32/syssetup/lang/de-DE.rc +++ b/dll/win32/syssetup/lang/de-DE.rc @@ -26,9 +26,7 @@ CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Willkommen beim ReactOS-Setupassistenten.", IDC_WELCOMETITLE, 115, 9, 189, 31 - LTEXT "Dieser Assistent wird ReactOS auf Ihrem Computer installieren. "\ - "Der Assistent bentigt einige Informationen, um ReactOS "\ - "installieren zu knnen.", IDC_STATIC, 115, 50, 189, 100 + LTEXT "Dieser Assistent wird ReactOS auf Ihrem Computer installieren. Der Assistent bentigt einige Informationen, um ReactOS installieren zu knnen.", IDC_STATIC, 115, 50, 189, 100 LTEXT "Klicken Sie auf Weiter, um fortzufahren.", IDC_STATIC, 115, 160, 189, 31 END @@ -38,13 +36,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Die ReactOS-Programmierer mchten folgende Open-Source-Projekte anerkennen, "\ - "die (teils) verwendet wurden, um ReactOS zu erstellen:", + LTEXT "Die ReactOS-Programmierer mchten folgende Open-Source-Projekte anerkennen, die (teils) verwendet wurden, um ReactOS zu erstellen:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS ist unter der GPL verffentlicht, wenn Sie (Teile von) ReactOS wiederverwenden "\ - "oder wiederverffentlichen wollen, mssen Sie die Bestimmungen der GPL anerkennen.", + LTEXT "ReactOS ist unter der GPL verffentlicht, wenn Sie (Teile von) ReactOS wiederverwenden oder wiederverffentlichen wollen, mssen Sie die Bestimmungen der GPL anerkennen.", IDC_STATIC,15,110,227,24 PUSHBUTTON "GPL &ansehen...",IDC_VIEWGPL,251,110,55,19 LTEXT "Klicken Sie auf Weiter, um mit der Einrichtung fortzufahren.",IDC_STATIC,15,136, @@ -73,14 +69,12 @@ CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Bitte geben sie einen Computernamen ein (maximal 15 Zeichen). "\ - "Wenn Sie im Netzwerk sind, muss dieser Name einmalig sein.", + LTEXT "Bitte geben sie einen Computernamen ein (maximal 15 Zeichen). Wenn Sie im Netzwerk sind, muss dieser Name einmalig sein.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Computername:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Das Setup wird ein Administratorkonto erstellen. "\ - "Benutzen Sie es, wenn Sie vollen Zugriff auf Ihren Computer bentigen.", + LTEXT "Das Setup wird ein Administratorkonto erstellen. Benutzen Sie es, wenn Sie vollen Zugriff auf Ihren Computer bentigen.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Geben Sie ein Passwort fr das Administratorkonto mit max. 14 Zeichen ein.", IDC_STATIC, 54, 87, 250, 8 @@ -97,9 +91,7 @@ CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Die lokalen Systemeinstellungen sollten mit der Sprache der Anwendungen, "\ - "die Sie nutzen wollen bereinstimmen. Die lokalen Nutzereinstellungen geben vor, "\ - "wie Nummern, Whrungen und Datumsangaben dargestellt werden.", IDC_STATIC, 53, 6, 253, 30 + LTEXT "Die lokalen Systemeinstellungen sollten mit der Sprache der Anwendungen, die Sie nutzen wollen bereinstimmen. Die lokalen Nutzereinstellungen geben vor, wie Nummern, Whrungen und Datumsangaben dargestellt werden.", IDC_STATIC, 53, 6, 253, 30 LTEXT "", IDC_LOCALETEXT, 54, 34, 250, 16 LTEXT "Um die lokalen Nutzer- oder Systemeinstellungen zu ndern, klicken Sie auf Einstellen.", IDC_STATIC, 53, 57, 188, 15 @@ -149,11 +141,9 @@ CAPTION "Fertigstellung des ReactOS-Setups" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Fertigstellung des ReactOS-Setupassistenten",IDC_FINISHTITLE,115,9,195,37 - LTEXT "Das ReactOS-Setup wurde erfolgreich fertiggestellt.\n\n" \ - "Wenn Sie auf Beenden klicken, wird der Computer neu gestartet.", IDC_STATIC, 115, 58, 195, 100 + LTEXT "Das ReactOS-Setup wurde erfolgreich fertiggestellt.\n\nWenn Sie auf Beenden klicken, wird der Computer neu gestartet.", IDC_STATIC, 115, 58, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Entfernen Sie die CD, wenn vorhanden. Danach klicken Sie "\ - "auf Beenden, um den Computer neu zu starten.", IDC_STATIC, 115, 160, 195, 31 + LTEXT "Entfernen Sie die CD, wenn vorhanden. Danach klicken Sie auf Beenden, um den Computer neu zu starten.", IDC_STATIC, 115, 160, 195, 31 END diff --git a/dll/win32/syssetup/lang/el-GR.rc b/dll/win32/syssetup/lang/el-GR.rc index 5b4da9111f6..2ba56a0020d 100644 --- a/dll/win32/syssetup/lang/el-GR.rc +++ b/dll/win32/syssetup/lang/el-GR.rc @@ -26,9 +26,7 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN LTEXT " ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT " ReactOS . "\ - " "\ - " ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT " ReactOS . ReactOS.", IDC_STATIC, 115, 40, 195, 100 LTEXT " '' .", IDC_STATIC, 115, 169, 195, 17 END @@ -38,13 +36,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION " ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS "\ - " , ( ) ReactOS:", + LTEXT " ReactOS , ( ) ReactOS:", IDC_STATIC,15,4,286,25 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT " ReactOS GPL, "\ - " ReactOS, GPL.", + LTEXT " ReactOS GPL, ReactOS, GPL.", IDC_STATIC,15,110,227,24 PUSHBUTTON "&...",IDC_VIEWGPL,251,110,50,19 LTEXT " '' .",IDC_STATIC,15,136, @@ -73,14 +69,12 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT " , 15 . "\ - " , .", + LTEXT " , 15 . , .", IDC_STATIC, 54, 7, 250, 24 LTEXT "& :", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT " Administrator. "\ - " .", + LTEXT " Administrator. .", IDC_STATIC, 54, 57, 250, 25 LTEXT " 14 .", IDC_STATIC, 54, 83, 250, 16 @@ -97,9 +91,7 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT " "\ - " . "\ - " , .", IDC_STATIC, 53, 7, 253, 31 + LTEXT " . , .", IDC_STATIC, 53, 7, 253, 31 LTEXT "", IDC_LOCALETEXT, 53, 31, 250, 16 LTEXT " , ''.", IDC_STATIC, 53, 57, 184, 16 @@ -150,11 +142,9 @@ CAPTION " FONT 8, "MS Shell Dlg" BEGIN LTEXT " ReactOS", IDC_FINISHTITLE, 115, 8, 195, 27 - LTEXT " ReactOS.\n\n"\ - " '' .", IDC_STATIC, 115, 40, 195, 100 + LTEXT " ReactOS.\n\n '' .", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT " CD/DVD , . , "\ - "'' .", IDC_STATIC, 115, 160, 195, 25 + LTEXT " CD/DVD , . , '' .", IDC_STATIC, 115, 160, 195, 25 END diff --git a/dll/win32/syssetup/lang/en-US.rc b/dll/win32/syssetup/lang/en-US.rc index bd0d16410a0..b7e28324826 100644 --- a/dll/win32/syssetup/lang/en-US.rc +++ b/dll/win32/syssetup/lang/en-US.rc @@ -26,9 +26,7 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Welcome to the ReactOS Setup Wizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "This wizard installs ReactOS on your computer. The wizard "\ - "needs to gather some information about you and your computer "\ - "to set up ReactOS properly.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "This wizard installs ReactOS on your computer. The wizard needs to gather some information about you and your computer to set up ReactOS properly.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Click Next to continue with Setup.", IDC_STATIC, 115, 169, 195, 17 END @@ -38,13 +36,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, "\ - "(parts of) which were used to create ReactOS:", + LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, (parts of) which were used to create ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute "\ - "(parts of) it you must respect the GPL", + LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute (parts of) it you must respect the GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&View GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Click Next to continue with Setup.",IDC_STATIC,15,136, @@ -73,14 +69,12 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Type a name for your computer that is 15 characters or less. "\ - "If you are on a network, your computer name must be unique.", + LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. "\ - "You can use this account if you need full access to your computer.", + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Type an Administrator Password that is 14 characters or less.", IDC_STATIC, 54, 87, 250, 8 @@ -97,9 +91,7 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "The system locale should match the language of the applications "\ - "you want to use. The user locale controls how numbers, "\ - "currencies, and dates appear.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "The system locale should match the language of the applications you want to use. The user locale controls how numbers, currencies, and dates appear.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "To change system or user locale settings, click Customize.", IDC_STATIC, 53, 60, 196, 8 @@ -150,11 +142,9 @@ CAPTION "Completing ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Completing the ReactOS Setup Wizard", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "You have successfully completed ReactOS Setup.\n\n" \ - "When you click Finish, your computer will restart.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "You have successfully completed ReactOS Setup.\n\nWhen you click Finish, your computer will restart.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "If there is a CD in a drive, remove it. Then, to restart "\ - "your computer, click Finish.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "If there is a CD in a drive, remove it. Then, to restart your computer, click Finish.", IDC_STATIC, 115, 169, 195, 17 END @@ -284,7 +274,7 @@ BEGIN IDS_SHORT_SOLITAIRE "Solitaire.lnk" IDS_SHORT_WINEMINE "WineMine.lnk" IDS_SHORT_WORDPAD "WordPad.lnk" - IDS_SHORT_PAINT "Paint.lnk" + IDS_SHORT_PAINT "MSPaint.lnk" IDS_SHORT_SPIDER "Spider Solitaire.lnk" END diff --git a/dll/win32/syssetup/lang/es-ES.rc b/dll/win32/syssetup/lang/es-ES.rc index 081d5fdc4cd..3e6be5d56af 100644 --- a/dll/win32/syssetup/lang/es-ES.rc +++ b/dll/win32/syssetup/lang/es-ES.rc @@ -34,9 +34,7 @@ CAPTION "Instalaci FONT 8, "MS Shell Dlg" BEGIN LTEXT "Bienvenido al asistente de instalacin de ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Este asistente instalar ReactOS en su equipo. El asistente "\ - "necesita recopilar alguna informacin sobre usted y su equipo "\ - "para configurar ReactOS apropiadamente.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Este asistente instalar ReactOS en su equipo. El asistente necesita recopilar alguna informacin sobre usted y su equipo para configurar ReactOS apropiadamente.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Pulse Siguiente para continuar la instalacin.", IDC_STATIC, 115, 169, 195, 17 END @@ -46,13 +44,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Instalacin de ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Los desarrolladores de ReactOS quieren agradecer a los siguientes proyectos Open Source, "\ - "los cuales (o parte de ellos) han sido usados para crear ReactOS:", + LTEXT "Los desarrolladores de ReactOS quieren agradecer a los siguientes proyectos Open Source, los cuales (o parte de ellos) han sido usados para crear ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS est bajo licencia GPL, asi que si quiere reutilizarlo o redistribuirlo "\ - "(o parte de el) debe respetar la licencia GPL", + LTEXT "ReactOS est bajo licencia GPL, asi que si quiere reutilizarlo o redistribuirlo (o parte de el) debe respetar la licencia GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&Ver GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Pulse siguiente para cotinuar con la instalacin.",IDC_STATIC,15,136, @@ -81,14 +77,12 @@ CAPTION "Instalaci FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Escriba un nombre para su equipo que sea de 15 caracteres o menos. "\ - "Si se encuentra conectado a una red, el nombre debe ser nico.", + LTEXT "Escriba un nombre para su equipo que sea de 15 caracteres o menos. Si se encuentra conectado a una red, el nombre debe ser nico.", IDC_STATIC, 54, 7, 250, 24 LTEXT "Nombre del &Equipo:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "El instalador crear un perfil de usuario en su equipo llamado Administrator. "\ - "Puede utilizar este perfil si necesita acceso completo a su equipo.", + LTEXT "El instalador crear un perfil de usuario en su equipo llamado Administrator. Puede utilizar este perfil si necesita acceso completo a su equipo.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Escriba una contrasea para este perfil de 14 caracteres o menos.", IDC_STATIC, 54, 87, 250, 8 @@ -105,15 +99,12 @@ CAPTION "Instalaci FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Las opciones regionales y de idioma permiten configurar la manera en que se representan "\ - "fechas ,nmero ,monedas y horas. Tambin puede agregar compatibilidad con otros idiomas "\ - "y cambiar la configuracin de su ubicacin.", IDC_STATIC, 53, 6, 253, 30 + LTEXT "Las opciones regionales y de idioma permiten configurar la manera en que se representan fechas ,nmero ,monedas y horas. Tambin puede agregar compatibilidad con otros idiomas y cambiar la configuracin de su ubicacin.", IDC_STATIC, 53, 6, 253, 30 LTEXT "", IDC_LOCALETEXT, 53, 34, 250, 16 LTEXT "Para modificar esta configuracin, pulse Modificar.", IDC_STATIC, 53, 60, 184, 8 PUSHBUTTON "&Modificar...", IDC_CUSTOMLOCALE, 245, 57, 50, 14 - LTEXT "La disposicin de teclado especifica los caracteres que aparecen cuando "\ - "usted escribe.", + LTEXT "La disposicin de teclado especifica los caracteres que aparecen cuando usted escribe.", IDC_STATIC, 53, 86, 253, 32 LTEXT "", IDC_LAYOUTTEXT, 53, 109, 250, 16 LTEXT "Para cambiar la disposicin de teclado, pulse Modificar.", @@ -159,11 +150,9 @@ CAPTION "Finalizaci FONT 8, "MS Shell Dlg" BEGIN LTEXT "El asistente de Instalacin de ReactOS ha terminado", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "Usted ha finalizado con xito la instalacin de ReactOS.\n\n" \ - "Cuando pulse Terminar, su equipo ser reiniciado.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Usted ha finalizado con xito la instalacin de ReactOS.\n\nCuando pulse Terminar, su equipo ser reiniciado.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Si hay un CD en alguna unidad, retrelo. Luego, reinicie su equipo "\ - "pulsando Terminar.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Si hay un CD en alguna unidad, retrelo. Luego, reinicie su equipo pulsando Terminar.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/et-EE.rc b/dll/win32/syssetup/lang/et-EE.rc index 98a931bb47b..957eedd7ade 100644 --- a/dll/win32/syssetup/lang/et-EE.rc +++ b/dll/win32/syssetup/lang/et-EE.rc @@ -26,8 +26,7 @@ CAPTION "ReactOSi paigaldamine" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Tere tulemast ReactOSi paigaldusprogrammi.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Selle programmi abil paigaldatakse ReactOS arvutisse. "\ - "Selleks peab esmalt koguma natuke andmeid sinu ja su arvuti kohta.",\ + LTEXT "Selle programmi abil paigaldatakse ReactOS arvutisse. Selleks peab esmalt koguma natuke andmeid sinu ja su arvuti kohta.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Vajuta Jrgmine, et jtkata paigaldamist.", IDC_STATIC, 115, 169, 195, 17 END @@ -38,13 +37,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "ReactOSi arendajad sooviksid tunnustada jrgmisi avatud lhtekoodiga projekte, "\ - "mida kasutati ReactOSi loomisel:", + LTEXT "ReactOSi arendajad sooviksid tunnustada jrgmisi avatud lhtekoodiga projekte, mida kasutati ReactOSi loomisel:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOSi litsentsiks on GPL, seega kui soovid ReactOSi (vi selle osasid) "\ - "kasutada vi levitada, peab see toimuma GPL litsentsiga koosklas", + LTEXT "ReactOSi litsentsiks on GPL, seega kui soovid ReactOSi (vi selle osasid) kasutada vi levitada, peab see toimuma GPL litsentsiga koosklas", IDC_STATIC,15,110,220,22 PUSHBUTTON "&Vaata GPL litsentsi...",IDC_VIEWGPL,230,110,71,19 LTEXT "Vajuta Jrgmine, et jtkata paigaldamist.",IDC_STATIC,15,136, @@ -73,13 +70,12 @@ CAPTION "ReactOSi paigaldamine" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Anna oma arvutile nimi. See ei tohi olla pikem kui 15 themrki. "\ - "Vrgus peab arvuti nimi olema unikaalne.", + LTEXT "Anna oma arvutile nimi. See ei tohi olla pikem kui 15 themrki. Vrgus peab arvuti nimi olema unikaalne.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Arvuti nimi:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Arvuti tielikuks haldamiseks luuakse administraatori konto (Administrator). ",\ + LTEXT "Arvuti tielikuks haldamiseks luuakse administraatori konto (Administrator). ", IDC_STATIC, 54, 57, 250, 25 LTEXT "Sisesta administraatori parool, mille pikkus on maksimaalselt 14 themrki.", IDC_STATIC, 54, 87, 250, 8 @@ -96,9 +92,7 @@ CAPTION "ReactOSi paigaldamine" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Ssteemi lokaat peaks olema htiv nende programmide keelega, "\ - "mida soovid kasutada. Kasutaja lokaat mrab, kuidas nidatakse numbreid, "\ - "valuutat ja kuupeva.", IDC_STATIC, 53, 7, 253, 22 + LTEXT "Ssteemi lokaat peaks olema htiv nende programmide keelega, mida soovid kasutada. Kasutaja lokaat mrab, kuidas nidatakse numbreid, valuutat ja kuupeva.", IDC_STATIC, 53, 7, 253, 22 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Ssteemi vi kasutaja lokaadi muutmiseks vajuta Tpsusta.", IDC_STATIC, 53, 60, 196, 8 @@ -149,11 +143,9 @@ CAPTION "ReactOSi paigaldamise l FONT 8, "MS Shell Dlg" BEGIN LTEXT "ReactOSi paigalduse lpetamine", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "ReactOS on edukalt paigaldatud.\n\n" \ - "Prast Lpeta vajutamist taaskivitatakse arvuti.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "ReactOS on edukalt paigaldatud.\n\nPrast Lpeta vajutamist taaskivitatakse arvuti.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Kui CD draivis on CD, siis eemalda see. Seejrel vajuta "\ - "taaskivitamiseks Lpeta.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Kui CD draivis on CD, siis eemalda see. Seejrel vajuta taaskivitamiseks Lpeta.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/fr-FR.rc b/dll/win32/syssetup/lang/fr-FR.rc index 8ab886be23d..dcc49e88c44 100644 --- a/dll/win32/syssetup/lang/fr-FR.rc +++ b/dll/win32/syssetup/lang/fr-FR.rc @@ -27,9 +27,7 @@ CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Bienvenue dans l'assistant d'installation de ReactOS.", IDC_WELCOMETITLE, 115, 9, 189, 31 - LTEXT "Cet assistant installe ReactOS sur votre ordinateur. Il a "\ - "besoin de certaines informations sur vous et votre ordinateur "\ - "pour configurer ReactOS correctement.", IDC_STATIC, 115, 50, 189, 100 + LTEXT "Cet assistant installe ReactOS sur votre ordinateur. Il a besoin de certaines informations sur vous et votre ordinateur pour configurer ReactOS correctement.", IDC_STATIC, 115, 50, 189, 100 LTEXT "Appuyez sur Suivant pour continuer l'installation.", IDC_STATIC, 115, 160, 189, 31 END @@ -39,13 +37,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Les dveloppeurs de ReactOS voudraient prsenter les projets Open Source suivants, "\ - "(ou seulement des composants) qui ont t utiliss pour crer ReactOS :", + LTEXT "Les dveloppeurs de ReactOS voudraient prsenter les projets Open Source suivants, (ou seulement des composants) qui ont t utiliss pour crer ReactOS :", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS est sous license GPL, ainsi si vous voulez le rutiliser ou le redistribuer "\ - "(ou seulement des composants) vous devez respecter la GPL", + LTEXT "ReactOS est sous license GPL, ainsi si vous voulez le rutiliser ou le redistribuer (ou seulement des composants) vous devez respecter la GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&Voir la GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Cliquez sur Suivant pour continuer l'installation.",IDC_STATIC,15,136, @@ -74,14 +70,12 @@ CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Entrez un nom pour votre ordinateur de 15 caractres ou moins. "\ - "Si vous tes sur un rseau, le nom saisi doit tre unique.", + LTEXT "Entrez un nom pour votre ordinateur de 15 caractres ou moins. Si vous tes sur un rseau, le nom saisi doit tre unique.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Nom de l'ordinateur :", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "L'assistant va crer un compte utilisateur sur votre ordinateur appel Administrateur. "\ - "Vous pourrez utiliser ce compte pour avoir un accs complet votre ordinateur.", + LTEXT "L'assistant va crer un compte utilisateur sur votre ordinateur appel Administrateur. Vous pourrez utiliser ce compte pour avoir un accs complet votre ordinateur.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Entrez le mot de passe Administrateur (14 caractres ou moins).", IDC_STATIC, 54, 87, 250, 8 @@ -98,9 +92,7 @@ CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "La localisation systme correspond la langue souhaite "\ - "pour les applications. Elle contrle la manire dont les nombres, "\ - "monnaies et dates sont affiches.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "La localisation systme correspond la langue souhaite pour les applications. Elle contrle la manire dont les nombres, monnaies et dates sont affiches.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Pour changer la localisation systme, cliquez sur Modifier.", IDC_STATIC, 53, 60, 184, 8 @@ -150,11 +142,9 @@ CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "L'assistant d'installation de ReactOS est termin.",IDC_FINISHTITLE,115,9,195,37 - LTEXT "Vous avez install avec succs ReactOS.\n\n" \ - "En cliquant sur Terminer, votre ordinateur va redmarrer.", IDC_STATIC, 115, 58, 195, 100 + LTEXT "Vous avez install avec succs ReactOS.\n\nEn cliquant sur Terminer, votre ordinateur va redmarrer.", IDC_STATIC, 115, 58, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "S'il y a un CD dans un lecteur, enlevez-le. Puis, pour redmarrer "\ - "votre ordinateur, cliquez sur Terminer.", IDC_STATIC, 115, 160, 195, 31 + LTEXT "S'il y a un CD dans un lecteur, enlevez-le. Puis, pour redmarrer votre ordinateur, cliquez sur Terminer.", IDC_STATIC, 115, 160, 195, 31 END diff --git a/dll/win32/syssetup/lang/hu-HU.rc b/dll/win32/syssetup/lang/hu-HU.rc index 33cc05b16dd..a3d5e56a364 100644 --- a/dll/win32/syssetup/lang/hu-HU.rc +++ b/dll/win32/syssetup/lang/hu-HU.rc @@ -26,8 +26,7 @@ CAPTION "ReactOS Telep FONT 8, "MS Shell Dlg" BEGIN LTEXT "dvzlnk a ReactOS teleptben.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "A ReactOS telept segtsgvel felteleptjk a ReactOS rendszert a gpedre. "\ - "A telept elbb sszegyjt pr informcit, majd vglegestjk a teleptst. ", IDC_STATIC, 115, 40, 195, 100 + LTEXT "A ReactOS telept segtsgvel felteleptjk a ReactOS rendszert a gpedre. A telept elbb sszegyjt pr informcit, majd vglegestjk a teleptst. ", IDC_STATIC, 115, 40, 195, 100 LTEXT "Kattints a Tovbb gombra a folytatshoz.", IDC_STATIC, 115, 169, 195, 17 END @@ -37,13 +36,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Telept" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "A ReactOS fejlesztk szeretnnek ksznetet mondani az albbi Open Source projekteknek "\ - "amiket (rszben) felhasznltak a ReactOS fejlesztshez:", + LTEXT "A ReactOS fejlesztk szeretnnek ksznetet mondani az albbi Open Source projekteknek amiket (rszben) felhasznltak a ReactOS fejlesztshez:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "A ReactOS a GPL licenszvel rendelkezik, gy felhasznlshoz s terjesztshez "\ - "ezt a licenszt kell figyelembe venni.", + LTEXT "A ReactOS a GPL licenszvel rendelkezik, gy felhasznlshoz s terjesztshez ezt a licenszt kell figyelembe venni.", IDC_STATIC,15,110,227,19 PUSHBUTTON "&Licensz megtekintse...",IDC_VIEWGPL,200,120,90,19 LTEXT "Kattints a Tovbb gombra a folytatshoz.",IDC_STATIC,15,136,170,17 @@ -71,14 +68,12 @@ CAPTION "ReactOS Telep FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Adj egy nevet a szmtgpednek, ami nem tbb mint 15 bet. "\ - "Ha hlzaton vagy, akkor ennek a nvnek egyedinek kell lennie.", + LTEXT "Adj egy nevet a szmtgpednek, ami nem tbb mint 15 bet. Ha hlzaton vagy, akkor ennek a nvnek egyedinek kell lennie.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Szmtgp nv:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "A telept ltrehoz egy felhasznli fikot, a Rendszergazdt. "\ - "Ezzel a fikkal teljes jogod van a szmtgped felett.", IDC_STATIC, 54, 57, 250, 25 + LTEXT "A telept ltrehoz egy felhasznli fikot, a Rendszergazdt. Ezzel a fikkal teljes jogod van a szmtgped felett.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Adj meg egy jelszt, ami nem tbb mint 14 karakter.", IDC_STATIC, 54, 87, 250, 8 LTEXT "&Jelsz:", IDC_STATIC, 54, 104, 75, 8 EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD @@ -93,12 +88,9 @@ CAPTION "ReactOS Telep FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "A rendszer terleti belltsa meghatrozzk a hasznlni kvnt nyelvet. "\ - "A terleti belltsok hatrozzk meg, hogy a szmok, "\ - "valuta s dtum informcik hogyan jelennek meg.", IDC_STATIC, 53, 7, 253, 24 + LTEXT "A rendszer terleti belltsa meghatrozzk a hasznlni kvnt nyelvet. A terleti belltsok hatrozzk meg, hogy a szmok, valuta s dtum informcik hogyan jelennek meg.", IDC_STATIC, 53, 7, 253, 24 LTEXT "", IDC_LOCALETEXT, 53, 35, 250, 16 - LTEXT "A terleti bellts megvltoztatshoz kattints\n" \ - "a Kivlaszts gombra.", IDC_STATIC, 53, 56, 184, 16 + LTEXT "A terleti bellts megvltoztatshoz kattints\na Kivlaszts gombra.", IDC_STATIC, 53, 56, 184, 16 PUSHBUTTON "&Kivlaszts...", IDC_CUSTOMLOCALE, 245, 57, 50, 14 LTEXT "A billentyzet kioszts hatrozza meg a gombok mkdst.", IDC_STATIC, 53, 86, 253, 8 LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 @@ -144,11 +136,9 @@ CAPTION "A ReactOS telep FONT 8, "MS Shell Dlg" BEGIN LTEXT "A telepts befejezse", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "Sikeresen felteleptetted a ReactOS rendszert.\n\n" \ - "Ha a befejezsre kattintasz, a szmtgped jraindul.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Sikeresen felteleptetted a ReactOS rendszert.\n\nHa a befejezsre kattintasz, a szmtgped jraindul.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Ha van CD vagy DVD lemez a meghajtdban, vedd ki, s utnna "\ - "kattints a Befejezs gombra.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Ha van CD vagy DVD lemez a meghajtdban, vedd ki, s utnna kattints a Befejezs gombra.", IDC_STATIC, 115, 169, 195, 17 END @@ -161,9 +151,7 @@ CAPTION "ReactOS Telep FONT 8, "MS Shell Dlg" BEGIN LTEXT "Sikeresen felteleptetted a ReactOS rendszert.", IDC_STATIC, 13, 12, 212, 16 - LTEXT "A folytatshoz jra kell indtani a rendszert. "\ - "A szmtgp 15 msodperc mlva jraindul, vagy azonnal ha rkattintasz "\ - "az jraindts gombra.", IDC_STATIC, 13, 33, 212, 32 + LTEXT "A folytatshoz jra kell indtani a rendszert. A szmtgp 15 msodperc mlva jraindul, vagy azonnal ha rkattintasz az jraindts gombra.", IDC_STATIC, 13, 33, 212, 32 // GROUPBOX "", -1, 7, 3, 231, 106 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8 PUSHBUTTON "&jraindts", IDOK, 98, 87, 50, 14 diff --git a/dll/win32/syssetup/lang/id-ID.rc b/dll/win32/syssetup/lang/id-ID.rc index c42d42bd9ea..2c72cfb066c 100644 --- a/dll/win32/syssetup/lang/id-ID.rc +++ b/dll/win32/syssetup/lang/id-ID.rc @@ -24,9 +24,7 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Welcome to the ReactOS Setup Wizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "This wizard installs ReactOS on your computer. The wizard "\ - "needs to gather some information about you and your computer "\ - "to set up ReactOS properly.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "This wizard installs ReactOS on your computer. The wizard needs to gather some information about you and your computer to set up ReactOS properly.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Click Next to continue with Setup.", IDC_STATIC, 115, 169, 195, 17 END @@ -36,13 +34,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, "\ - "(parts of) which were used to create ReactOS:", + LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, (parts of) which were used to create ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute "\ - "(parts of) it you must respect the GPL", + LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute (parts of) it you must respect the GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&View GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Click Next to continue with Setup.",IDC_STATIC,15,136, @@ -71,14 +67,12 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Type a name for your computer that is 15 characters or less. "\ - "If you are on a network, your computer name must be unique.", + LTEXT "Type a name for your computer that is 15 characters or less. If you are on a network, your computer name must be unique.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Computer Name:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. "\ - "You can use this account if you need full access to your computer.", + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Type an Administrator Password that is 14 characters or less.", IDC_STATIC, 54, 87, 250, 8 @@ -95,9 +89,7 @@ CAPTION "Setup ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Lokal sistem harus sama bahasa dari aplikasi "\ - "yang ingin anda gunakan. Pengguna lokal mengontrol bagaimana "\ - "angka, kurs, dan tampilan tanggal.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "Lokal sistem harus sama bahasa dari aplikasi yang ingin anda gunakan. Pengguna lokal mengontrol bagaimana angka, kurs, dan tampilan tanggal.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Untuk mengubah sistem atau setelan lokal pengguna, klik Kustomisasi.", IDC_STATIC, 53, 60, 184, 8 @@ -148,11 +140,9 @@ CAPTION "Menyelesaikan Setup ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Menyelesaikan Bimbingan Setup ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "Anda telah sukses menyelesaikan Setup ReactOS.\n\n" \ - "Saat anda mengklik Selesai, komputer anda akan dimulai lagi.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Anda telah sukses menyelesaikan Setup ReactOS.\n\nSaat anda mengklik Selesai, komputer anda akan dimulai lagi.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Jika ada CD di dalam drive, keluarkan. Lalu, untuk memulai lagi "\ - "komputer anda, klik Selesai.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Jika ada CD di dalam drive, keluarkan. Lalu, untuk memulai lagi komputer anda, klik Selesai.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/it-IT.rc b/dll/win32/syssetup/lang/it-IT.rc index d6603962a0a..ea2cdf398af 100644 --- a/dll/win32/syssetup/lang/it-IT.rc +++ b/dll/win32/syssetup/lang/it-IT.rc @@ -17,9 +17,7 @@ CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Benvenuti alla configurazione guidata di ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Questa procedura guidata installa ReactOS su questo computer.\nLa procedura "\ - "deve raccogliere alcune informazioni sull'utente e sul computer "\ - "per configurare ReactOS adeguatamente.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Questa procedura guidata installa ReactOS su questo computer.\nLa procedura deve raccogliere alcune informazioni sull'utente e sul computer per configurare ReactOS adeguatamente.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Selezionare Avanti per proseguire con la configurazione.", IDC_STATIC, 115, 169, 195, 17 END @@ -29,13 +27,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Gli sviluppatori di ReactOS desiderano citare i seguenti progetti Open Source, "\ - "che sono stati usati (in tutto o in parte) per creare ReactOS:", + LTEXT "Gli sviluppatori di ReactOS desiderano citare i seguenti progetti Open Source, che sono stati usati (in tutto o in parte) per creare ReactOS:", IDC_STATIC,20,7,286,19 LISTBOX IDC_PROJECTS,20,30,280,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS soggetto alla licenza GPL, per cui se si desidera riusarlo o ridistribuirlo "\ - "(in tutto o in parte) necessario rispettare la GPL", + LTEXT "ReactOS soggetto alla licenza GPL, per cui se si desidera riusarlo o ridistribuirlo (in tutto o in parte) necessario rispettare la GPL", IDC_STATIC,20,110,217,22 PUSHBUTTON "&Mostra la GPL...",IDC_VIEWGPL,241,110,60,19 LTEXT "Selezionare Avanti per proseguire con la configurazione.",IDC_STATIC,20,136, @@ -64,14 +60,12 @@ CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Scrivere un nome per il computer che sia lungo al massimo 15 caratteri.\n"\ - "Se si in rete, il nome del computer deve essere univoco.", + LTEXT "Scrivere un nome per il computer che sia lungo al massimo 15 caratteri.\nSe si in rete, il nome del computer deve essere univoco.", IDC_STATIC, 54, 7, 250, 24 LTEXT "Nome del &computer:", IDC_STATIC, 29, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 140, 35, 160, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Questa procedura creer su questo computer un account utente chiamato Administrator. "\ - "Si potr usare questo account se si necessita l'accesso completo al computer.", + LTEXT "Questa procedura creer su questo computer un account utente chiamato Administrator. Si potr usare questo account se si necessita l'accesso completo al computer.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Scrivere una password per Administrator che sia lunga al massimo 14 caratteri.", IDC_STATIC, 26, 87, 280, 8 @@ -88,9 +82,7 @@ CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Le impostazioni linguistiche del sistema devono coincidere con la lingua degli applicativi "\ - "che si desidera usare. Le impostazioni linguistiche dell'utente stabiliscono come appaiono "\ - "i numeri, i valori monetari e le date.", IDC_STATIC, 56, 7, 253, 26 + LTEXT "Le impostazioni linguistiche del sistema devono coincidere con la lingua degli applicativi che si desidera usare. Le impostazioni linguistiche dell'utente stabiliscono come appaiono i numeri, i valori monetari e le date.", IDC_STATIC, 56, 7, 253, 26 LTEXT "", IDC_LOCALETEXT, 56, 35, 250, 16 LTEXT "Per cambiare le impostazioni linguistiche del sistema o dell'utente, selezionare Personalizza.", IDC_STATIC, 20, 55, 184, 16 @@ -141,11 +133,9 @@ CAPTION "L'installazione di ReactOS FONT 8, "MS Shell Dlg" BEGIN LTEXT "Completamento della procedura guidata di installazione di ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "La procedura guidata di installazione di ReactOS completata.\n\n" \ - "Selezionando Fine, il computer sar riavviato.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "La procedura guidata di installazione di ReactOS completata.\n\nSelezionando Fine, il computer sar riavviato.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Se c' un CD in un lettore, necessario rimuoverlo. Poi, per riavviare "\ - "il computer, selezionare Fine.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Se c' un CD in un lettore, necessario rimuoverlo. Poi, per riavviare il computer, selezionare Fine.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/ja-JP.rc b/dll/win32/syssetup/lang/ja-JP.rc index ebe36a432d3..6fb7e03e9d5 100644 --- a/dll/win32/syssetup/lang/ja-JP.rc +++ b/dll/win32/syssetup/lang/ja-JP.rc @@ -26,9 +26,7 @@ CAPTION "ReactOS FONT 9, "MS UI Gothic" BEGIN LTEXT "ReactOSZbgAbv EBU[hւ悤B", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "̃EBU[hł́AReactOS Rs[^ɃCXg[܂B "\ - "ReactOS𐳂ZbgAbv邽߂ɁA[U[ƃRs[^ "\ - "ւW߂Kv܂B", IDC_STATIC, 115, 40, 195, 100 + LTEXT "̃EBU[hł́AReactOS Rs[^ɃCXg[܂B ReactOS𐳂ZbgAbv邽߂ɁA[U[ƃRs[^ ւW߂Kv܂B", IDC_STATIC, 115, 40, 195, 100 LTEXT "ZbgAbv𑱍sɂ [] NbNĂB", IDC_STATIC, 115, 169, 195, 17 END @@ -38,13 +36,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS ZbgAbv" FONT 9, "MS UI Gothic", 0, 0, 0x0 BEGIN - LTEXT "ReactOS̊J҂AL̃I[v\\[X vWFNgɊӂ̈ӂ\\܂B "\ - "ׂ̂Ă܂͈ꕔReactOS̊Jɗp܂B", + LTEXT "ReactOS̊J҂AL̃I[v\\[X vWFNgɊӂ̈ӂ\\܂B ׂ̂Ă܂͈ꕔReactOS̊Jɗp܂B", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOSGPL̉ɃCZXĂAׂĂ܂͈ꕔėpA "\ - "ĔzzꍇGPLɏ]Kv܂B", + LTEXT "ReactOSGPL̉ɃCZXĂAׂĂ܂͈ꕔėpA ĔzzꍇGPLɏ]Kv܂B", IDC_STATIC,15,110,227,19 PUSHBUTTON "GPL\\(&V)...",IDC_VIEWGPL,251,110,50,19 LTEXT "ZbgAbv𑱍sɂ [] NbNĂB",IDC_STATIC,15,136, @@ -73,14 +69,12 @@ CAPTION "ReactOS FONT 9, "MS UI Gothic" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Rs[^𔼊p63ȓœ͂ĂB "\ - "Rs[^lbg[Nɂꍇ́AOdȂ悤ɂĂB", + LTEXT "Rs[^𔼊p63ȓœ͂ĂB Rs[^lbg[Nɂꍇ́AOdȂ悤ɂĂB", IDC_STATIC, 54, 7, 250, 24 LTEXT "Rs[^(&C):", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "AdministratorƌĂ΂郆[U[AJEg쐬܂B "\ - "Rs[^ɃtANZXKvȂƂÃAJEggp܂B", + LTEXT "AdministratorƌĂ΂郆[U[AJEg쐬܂B Rs[^ɃtANZXKvȂƂÃAJEggp܂B", IDC_STATIC, 54, 57, 250, 25 LTEXT "Administrator̃pX[h𔼊p 14 ȓœ͂ĂB", IDC_STATIC, 54, 87, 250, 8 @@ -97,9 +91,7 @@ CAPTION "ReactOS FONT 9, "MS UI Gothic" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "VXẽP[AAvP[VŎgpɐݒ肵ĂB "\ - "[U[P[́AlAʉ݁At̕\\@𐧌䂵܂B "\ - "", IDC_STATIC, 53, 7, 253, 20 + LTEXT "VXẽP[AAvP[VŎgpɐݒ肵ĂB [U[P[́AlAʉ݁At̕\\@𐧌䂵܂B ", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "VXeA[U[P[ݒύXɂ[JX^}CY]NbN܂B", IDC_STATIC, 53, 50, 166, 25 @@ -150,11 +142,9 @@ CAPTION "ReactOS FONT 9, "MS UI Gothic" BEGIN LTEXT "ReactOS ZbgAbv EBU[h̊", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "ReactOS ZbgAbvɊ܂B\n\n" \ - "[] NbNƁARs[^ċN܂B", IDC_STATIC, 115, 40, 195, 100 + LTEXT "ReactOS ZbgAbvɊ܂B\n\n[] NbNƁARs[^ċN܂B", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "hCuCDꍇ͎oĂB ċNɂ "\ - "NbNĂB", IDC_STATIC, 115, 169, 195, 17 + LTEXT "hCuCDꍇ͎oĂB ċNɂ NbNĂB", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/nl-NL.rc b/dll/win32/syssetup/lang/nl-NL.rc index 85fd68f61cb..41f042d0afb 100644 --- a/dll/win32/syssetup/lang/nl-NL.rc +++ b/dll/win32/syssetup/lang/nl-NL.rc @@ -26,9 +26,7 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Welkom bij de Reactos installatiewizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Deze wizard zal Reactos op je computer installeren. De wizard "\ - "heeft informatie over jou en jouw computer nodig "\ - "om Reactos correct in te stellen.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Deze wizard zal Reactos op je computer installeren. De wizard heeft informatie over jou en jouw computer nodig om Reactos correct in te stellen.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Klik op Volgende om voort te gaan met de installatie.", IDC_STATIC, 115, 169, 195, 17 END @@ -38,13 +36,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, "\ - "(parts of) which were used to create ReactOS:", + LTEXT "The ReactOS developers would like to acknowledge the following Open Source projects, (parts of) which were used to create ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute "\ - "(parts of) it you must respect the GPL", + LTEXT "ReactOS is licensed under the GPL, so if you want to reuse or redistribute (parts of) it you must respect the GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&View GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Klik op Volgende om voort te gaan met de installatie.",IDC_STATIC,15,136, @@ -73,14 +69,12 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Geef een naam in voor de computer. "\ - "In een netwerk moet je een unieke naam kiezen.", + LTEXT "Geef een naam in voor de computer. In een netwerk moet je een unieke naam kiezen.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Computernaam:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Setup will create a user account on your computer called Administrator. "\ - "You can use this account if you need full access to your computer.", + LTEXT "Setup will create a user account on your computer called Administrator. You can use this account if you need full access to your computer.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Type an Administrator Password that is 14 characters or less.", IDC_STATIC, 54, 87, 250, 8 @@ -97,9 +91,7 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "The system locale should match the language of the applications "\ - "you want to use. The user locale controls how numbers, "\ - "currencies, and dates appear.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "The system locale should match the language of the applications you want to use. The user locale controls how numbers, currencies, and dates appear.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "To change system or user locale settings, click Customize.", IDC_STATIC, 53, 60, 184, 8 @@ -150,11 +142,9 @@ CAPTION "Completing ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Completing the ReactOS Setup Wizard", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "You have successfully completed ReactOS Setup.\n\n" \ - "When you click Finish, your computer will restart.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "You have successfully completed ReactOS Setup.\n\nWhen you click Finish, your computer will restart.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "If there is a CD in a drive, remove it. Then, to restart "\ - "your computer, click Finish.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "If there is a CD in a drive, remove it. Then, to restart your computer, click Finish.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/no-NO.rc b/dll/win32/syssetup/lang/no-NO.rc index 2ce6965bf56..1bfed28f3b4 100644 --- a/dll/win32/syssetup/lang/no-NO.rc +++ b/dll/win32/syssetup/lang/no-NO.rc @@ -29,9 +29,7 @@ CAPTION "ReactOS installasjon" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Velkommen til ReactOS installasjon veiviser.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Denne veiviseren installerer ReactOS p din datamaskin. Veiviseren "\ - "m samle sammen ndvendig informasjon om deg og din datamaskin "\ - "for sette opp ReactOS skikkelig.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Denne veiviseren installerer ReactOS p din datamaskin. Veiviseren m samle sammen ndvendig informasjon om deg og din datamaskin for sette opp ReactOS skikkelig.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Klikk Neste for fortsette installasjonen.", IDC_STATIC, 115, 169, 195, 17 END @@ -41,13 +39,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS installasjon" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "ReactOS utviklerene anerkjenner de flgende pen kildekode prosjektene, "\ - "(deler av) som ble brukt til skape ReactOS:", + LTEXT "ReactOS utviklerene anerkjenner de flgende pen kildekode prosjektene, (deler av) som ble brukt til skape ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS er lisensert under GPL, s hvis du vil bruke eller gi ut "\ - "(deler av) ReactOS, m du respektere GPL", + LTEXT "ReactOS er lisensert under GPL, s hvis du vil bruke eller gi ut (deler av) ReactOS, m du respektere GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&Vis GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Klikk Neste for fortsette installasjonen.",IDC_STATIC,15,136, @@ -76,14 +72,12 @@ CAPTION "ReactOS installasjon" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Skriv inn et navn for din datamaskin som er 15 karakterer eller mindre. "\ - "Hvis du er p et nettverk, s m ditt datamaskin navn vre unikt.", + LTEXT "Skriv inn et navn for din datamaskin som er 15 karakterer eller mindre. Hvis du er p et nettverk, s m ditt datamaskin navn vre unikt.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Datamaskin navn:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Installasjonen vil lage en brukerkonto som blir kalt Administrator. "\ - "Du kan bruke denne kontoen hvis du trenger full adgang til din datamaskin.", + LTEXT "Installasjonen vil lage en brukerkonto som blir kalt Administrator. Du kan bruke denne kontoen hvis du trenger full adgang til din datamaskin.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Skriv inn et Administrator passord som er 14 karakterer eller mindre.", IDC_STATIC, 54, 87, 250, 8 @@ -100,9 +94,7 @@ CAPTION "ReactOS installasjon" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Systemets sprk og region burde samsvare med sprket p programmene "\ - "du vil bruke. Innstillingene for sprk og region kontrollerer hvordan tall, "\ - "valutaer, og dato vises.", IDC_STATIC, 55, 7, 259, 24 + LTEXT "Systemets sprk og region burde samsvare med sprket p programmene du vil bruke. Innstillingene for sprk og region kontrollerer hvordan tall, valutaer, og dato vises.", IDC_STATIC, 55, 7, 259, 24 LTEXT "", IDC_LOCALETEXT, 53, 32, 250, 18 LTEXT "For forandre systemets sprk og region instilling, Trykk p Tilpass.", IDC_STATIC, 53, 60, 184, 8 @@ -153,11 +145,9 @@ CAPTION "Fullf FONT 8, "MS Shell Dlg" BEGIN LTEXT "Fullfrer ReactOS installasjons veiviser", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "Installasjonen av ReactOS er fullfrt.\n\n" \ - "Nr du trykker p fullfr, vil datamaskinen bli startet p nytt.", IDC_STATIC, 115, 40, 205, 100 + LTEXT "Installasjonen av ReactOS er fullfrt.\n\nNr du trykker p fullfr, vil datamaskinen bli startet p nytt.", IDC_STATIC, 115, 40, 205, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Fjern en eventuell CD-ROM fra stasjonen. Klikk Fullfr "\ - "for starte datamaskinen p nytt.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Fjern en eventuell CD-ROM fra stasjonen. Klikk Fullfr for starte datamaskinen p nytt.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/pl-PL.rc b/dll/win32/syssetup/lang/pl-PL.rc index 57a8613cbb3..25d2873b1ea 100644 --- a/dll/win32/syssetup/lang/pl-PL.rc +++ b/dll/win32/syssetup/lang/pl-PL.rc @@ -17,12 +17,12 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * translated by Caemyr - * updated by Caemyr - Olaf Siejka (Jan, 2008), (Aug, 2009) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; - * + * translated by Caemyr + * updated by Caemyr - Olaf Siejka (Jan, 2008), (Aug, 2009) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -34,10 +34,8 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Witamy w programie instalacyjnym ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Ten program pomoe w instalacji systemu ReactOS. W tym celu "\ - "konieczne bdzie zebranie informacji o twoim komputerze, by "\ - "prawidowo skonfigurowa system operacyjny.", IDC_STATIC, 115, 40, 168, 100 - LTEXT "Nacinij Dalej, by kontynuowa.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Ten program pomoże w instalacji systemu ReactOS. W tym celu konieczne będzie zebranie informacji o twoim komputerze, by prawidłowo skonfigurować system operacyjny.", IDC_STATIC, 115, 40, 168, 100 + LTEXT "Naciśnij Dalej, by kontynuować.", IDC_STATIC, 115, 169, 195, 17 END @@ -46,16 +44,14 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Twrcy ReactOS chcieliby podzikowa nastpujcym projektom Open Source, "\ - "ktrych to fragmenty zostay wykorzystane do stworzenia ReactOS:", + LTEXT "Twórcy ReactOS chcieliby podziękować następującym projektom Open Source, których to fragmenty zostały wykorzystane do stworzenia ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS oparty jest na licencji GPL, wic by w caoci lub czciowo wykorzysta rda "\ - "ReactOS, musisz przestrzega postanowie licencji.", + LTEXT "ReactOS oparty jest na licencji GPL, więc by w całości lub częściowo wykorzystać źródła ReactOS, musisz przestrzegać postanowień licencji.", IDC_STATIC,15,110,247,19 - PUSHBUTTON "Poka &GPL..",IDC_VIEWGPL,251,110,50,19 - LTEXT "Nacinij Dalej, by kontynuowa.",IDC_STATIC,15,136, + PUSHBUTTON "Pokaż &GPL..",IDC_VIEWGPL,251,110,50,19 + LTEXT "Naciśnij Dalej, by kontynuować.",IDC_STATIC,15,136, 195,17 END @@ -66,7 +62,7 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON2, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Podaj swoje imi i nazwisko, a take nazw Twojej firmy lub organizacji.", + LTEXT "Podaj swoje imię i nazwisko, a także nazwę Twojej firmy lub organizacji.", IDC_STATIC, 54, 7, 242, 21 LTEXT "Na&zwa:", IDC_STATIC, 54, 37, 44, 8 EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL @@ -81,20 +77,18 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Podaj nazw komputera, nie dusz ni 15 znakw. "\ - "Jeli chcesz pracowa w sieci, nazwa musi pozosta unikalna.", + LTEXT "Podaj nazwę komputera, nie dłuższą niż 15 znaków. Jeśli chcesz pracować w sieci, nazwa musi pozostać unikalna.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Nazwa komputera:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Program konfiguracyjny stworzy konto Administrator. "\ - "Dziki niemu uzyskasz, w razie potrzeby, peen dostp do systemu.", + LTEXT "Program konfiguracyjny stworzy konto Administrator. Dzięki niemu uzyskasz, w razie potrzeby, pełny dostęp do systemu.", IDC_STATIC, 54, 57, 250, 25 - LTEXT "Podaj haso administratora, nie dusze ni 14 znakw.", + LTEXT "Podaj hasło administratora, nie dłuższe niż 14 znaków.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "&Haso administratora:", IDC_STATIC, 54, 104, 75, 8 + LTEXT "&Hasło administratora:", IDC_STATIC, 54, 104, 75, 8 EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "&Potwierdzenie hasa:", IDC_STATIC, 54, 123, 75, 8 + LTEXT "&Potwierdzenie hasła:", IDC_STATIC, 54, 123, 75, 8 EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END @@ -105,17 +99,15 @@ CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Lokalizacja systemu powinna by zgodna (jzykowo) z aplikacjami, "\ - "ktrych planujesz uywa. Lokalizacja odpowiada rwnie za wywietlanie "\ - "danych, liczb i walut.", IDC_STATIC, 53, 7, 238, 25 + LTEXT "Lokalizacja systemu powinna być zgodna (językowo) z aplikacjami, których planujesz używać. Lokalizacja odpowiada również za wyświetlanie danych, liczb i walut.", IDC_STATIC, 53, 7, 238, 25 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 - LTEXT "By zmieni lokalizacj systemu, nacinij Ustaw.", + LTEXT "By zmienić lokalizację systemu, naciśnij Ustaw.", IDC_STATIC, 53, 60, 184, 8 PUSHBUTTON "&Ustaw...", IDC_CUSTOMLOCALE, 245, 57, 50, 14 - LTEXT "Ukad klawiatury decyduje o przyporzdkowaniu znakw pod klawisze.", + LTEXT "Układ klawiatury decyduje o przyporządkowaniu znaków pod klawisze.", IDC_STATIC, 53, 86, 253, 8 LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 - LTEXT "Aby zmieni ukad klawiatury, nacinij Ustaw.", + LTEXT "Aby zmienić układ klawiatury, naciśnij Ustaw.", IDC_STATIC, 53, 126, 184, 8 PUSHBUTTON "U&staw...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14 END @@ -154,15 +146,13 @@ END IDD_FINISHPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Zakoczenie instalacji ReactOS" +CAPTION "Zakończenie instalacji ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Konfiguracja ReactOS ukoczona.", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "To ju koniec ustawie ReactOS.\n\n" \ - "Teraz nacinij Koniec, by ponownie uruchomi komputer.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Konfiguracja ReactOS ukończona.", IDC_FINISHTITLE, 115, 8, 195, 24 + LTEXT "To już koniec ustawień ReactOS.\n\nTeraz naciśnij Koniec, by ponownie uruchomić komputer.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Upewnij si, czy w napdach CD/DVD nie pozosta aden nonik. "\ - "Jeli tak, to wyjmij go przed naciniciem przycisku Koniec.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Upewnij się, czy w napędach CD/DVD nie pozostał żaden nośnik. Jeśli tak, to wyjmij go przed naciśnięciem przycisku Koniec.", IDC_STATIC, 115, 169, 195, 17 END @@ -179,7 +169,7 @@ END IDD_STATUSWINDOW_DLG DIALOGEX 0,0,274,26 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION "Prosz czeka..." +CAPTION "Proszę czekać..." FONT 8,"MS Shell Dlg 2",400,0,1 BEGIN LTEXT "",IDC_STATUSLABEL,7,8,234,12,SS_WORDELLIPSIS @@ -188,47 +178,47 @@ END STRINGTABLE BEGIN - IDS_ACKTITLE "Podzikowania" - IDS_ACKSUBTITLE "Wszyscy, bez ktrych nie byoby ReactOS, a take informacje o Licencji " + IDS_ACKTITLE "Podziękowania" + IDS_ACKSUBTITLE "Wszyscy, bez których nie byłoby ReactOS, a także informacje o Licencji " IDS_OWNERTITLE "Personalizacja systemu" - IDS_OWNERSUBTITLE "Program konfiguracyjny wykorzysta te informacje, aby spersonalizowa system." - IDS_COMPUTERTITLE "Nazwa komputera i haso administratora" - IDS_COMPUTERSUBTITLE "Musisz poda nazw swojego komputera a take haso administratora." + IDS_OWNERSUBTITLE "Program konfiguracyjny wykorzysta te informacje, aby spersonalizować system." + IDS_COMPUTERTITLE "Nazwa komputera i hasło administratora" + IDS_COMPUTERSUBTITLE "Musisz podać nazwę swojego komputera a także hasło administratora." IDS_LOCALETITLE "Ustawienia regionalne" - IDS_LOCALESUBTITLE "Moesz ustawi ReactOS pod ktem jzyka i sposobu wywietlania danych." + IDS_LOCALESUBTITLE "Możesz ustawić ReactOS pod kątem języka i sposobu wyświetlania danych." IDS_DATETIMETITLE "Data i czas" - IDS_DATETIMESUBTITLE "Ustaw prawidow dat i czas." - IDS_PROCESSTITLE "Rejestracja skadnikw" - IDS_PROCESSSUBTITLE "Prosz czeka..." + IDS_DATETIMESUBTITLE "Ustaw prawidłową datę i czas." + IDS_PROCESSTITLE "Rejestracja składników" + IDS_PROCESSSUBTITLE "Proszę czekać..." END STRINGTABLE BEGIN - IDS_CMT_DOWNLOADER "cignij i zainstaluj inne aplikacje" + IDS_CMT_DOWNLOADER "Ściągnij i zainstaluj inne aplikacje" END STRINGTABLE BEGIN IDS_ACCESSORIES "Akcesoria" IDS_CMT_CALC "Uruchom Kalkulator" - IDS_CMT_CMD "Uruchom konsol" + IDS_CMT_CMD "Uruchom konsolę" IDS_CMT_EXPLORER "Uruchom Eksplorator" IDS_CMT_NOTEPAD "Uruchom Edytor tekstu" IDS_CMT_REGEDIT "Uruchom Edytor rejestru" IDS_CMT_WORDPAD "Uruchom WordPada" IDS_CMT_SCREENSHOT "Zrzut ekranu" - IDS_CMT_DEVMGMT "Uruchom Meneder urzdze" - IDS_CMT_SERVMAN "Uruchom Meneder usug" + IDS_CMT_DEVMGMT "Uruchom Menedżer urządzeń" + IDS_CMT_SERVMAN "Uruchom Menedżer usług" IDS_CMT_RDESKTOP "Uruchom Zdalny pulpit" - IDS_CMT_EVENTVIEW "Uruchom Podgld Zdarze" - IDS_CMT_MSCONFIG "Uruchom Narzdzie konfiguracji systemu" + IDS_CMT_EVENTVIEW "Uruchom Podgląd Zdarzeń" + IDS_CMT_MSCONFIG "Uruchom Narzędzie konfiguracji systemu" IDS_CMT_PAINT "Uruchom Paint" END STRINGTABLE BEGIN - IDS_SYS_ACCESSIBILITY "Uatwienia Dostpu" + IDS_SYS_ACCESSIBILITY "Ułatwienia Dostępu" IDS_CMT_MAGNIFY "Lupa" END @@ -236,15 +226,15 @@ STRINGTABLE BEGIN IDS_SYS_ENTERTAINMENT "Rozrywka" IDS_CMT_MPLAY32 "Uruchom Odtwarzacz multimedialny" - IDS_CMT_SNDVOL32 "Uruchom regulacj gonoci" + IDS_CMT_SNDVOL32 "Uruchom regulację głośności" IDS_CMT_SNDREC32 "Launch Sound Recorder" END STRINGTABLE BEGIN - IDS_SYS_TOOLS "Narzdzia systemowe" - IDS_CMT_CHARMAP "Tablica znakw" - IDS_CMT_KBSWITCH "Zmiana ukadu klawiatury" + IDS_SYS_TOOLS "Narzędzia systemowe" + IDS_CMT_CHARMAP "Tablica znaków" + IDS_CMT_KBSWITCH "Zmiana układu klawiatury" IDS_CMT_DXDIAG "Uruchom program diagnostyczny ReactX" END @@ -259,23 +249,23 @@ END STRINGTABLE BEGIN IDS_REACTOS_SETUP "Ustawienia ReactOS" - IDS_UNKNOWN_ERROR "Nieznany bd" - IDS_REGISTERING_COMPONENTS "Rejestracja skadnikw..." + IDS_UNKNOWN_ERROR "Nieznany błąd" + IDS_REGISTERING_COMPONENTS "Rejestracja składników..." IDS_LOADLIBRARY_FAILED "Nieudane LoadLibrary : " IDS_GETPROCADDR_FAILED "Nieudane GetProcAddr : " IDS_REGSVR_FAILED "Nieudane DllRegisterServer: " IDS_DLLINSTALL_FAILED "Nieudane DllInstall: " - IDS_TIMEOUT "Upyn czas rejestracji" + IDS_TIMEOUT "Upłynął czas rejestracji" IDS_REASON_UNKNOWN "" END STRINGTABLE BEGIN - IDS_SHORT_CMD "Wiersz polece.lnk" + IDS_SHORT_CMD "Wiersz poleceń.lnk" IDS_SHORT_EXPLORER "Eksplorator ReactOS.lnk" - IDS_SHORT_DOWNLOADER "Meneder aplikacji ReactOS.lnk" - IDS_SHORT_SERVICE "Meneder usug.lnk" - IDS_SHORT_DEVICE "Meneder urzdze.lnk" + IDS_SHORT_DOWNLOADER "Menedżer aplikacji ReactOS.lnk" + IDS_SHORT_SERVICE "Menedżer usług.lnk" + IDS_SHORT_DEVICE "Menedżer urządzeń.lnk" IDS_SHORT_MPLAY32 "Odtwarzacz multimedialny.lnk" IDS_SHORT_CALC "Kalkulator.lnk" IDS_SHORT_REGEDIT "Edytor rejestru.lnk" @@ -285,31 +275,31 @@ BEGIN IDS_SHORT_SOLITAIRE "Pasjans.lnk" IDS_SHORT_WINEMINE "Saper.lnk" IDS_SHORT_MAGNIFY "Lupa.lnk" - IDS_SHORT_RDESKTOP "Dostp zdalny.lnk" - IDS_SHORT_KBSWITCH "Zmiana ukadu klawiatury.lnk" - IDS_SHORT_EVENTVIEW "Podgld zdarze.lnk" + IDS_SHORT_RDESKTOP "Dostęp zdalny.lnk" + IDS_SHORT_KBSWITCH "Zmiana układu klawiatury.lnk" + IDS_SHORT_EVENTVIEW "Podgląd zdarzeń.lnk" IDS_SHORT_MSCONFIG "Konfiguracja systemowa.lnk" - IDS_SHORT_SNDVOL32 "Regulacja gonoci.lnk" - IDS_SHORT_SNDREC32 "Audiorecorder.lnk" + IDS_SHORT_SNDVOL32 "Regulacja głośności.lnk" + IDS_SHORT_SNDREC32 "Rejestrator dźwięku.lnk" IDS_SHORT_DXDIAG "Program diagnostyczny ReactX.lnk" - IDS_SHORT_PAINT "Paint.lnk" + IDS_SHORT_PAINT "MSPaint.lnk" IDS_SHORT_SPIDER "Spider Solitaire.lnk" END STRINGTABLE BEGIN - IDS_WZD_NAME "Program instalacyjny nie moe kontynuowa dopki nie wpiszesz swojego imienia i nazwiska." - IDS_WZD_SETCOMPUTERNAME "Program instalacyjny nie zdoa ustawi nowej nazwy komputera." - IDS_WZD_COMPUTERNAME "Program instalacyjny nie moe kontynuowa dopki nie wpiszesz nazwy komputera." - IDS_WZD_PASSWORDEMPTY "Musisz wprowadzi haso!" - IDS_WZD_PASSWORDMATCH "Oba wprowadzone hasa nie s identyczne. Musisz wpisa to samo haso dwa razy." - IDS_WZD_PASSWORDCHAR "Wprowadzone haso zawiera nieodpowiednie znaki. Prosz wprowadzi haso bez ich udziau." - IDS_WZD_LOCALTIME "Program instalacyjny nie zdoa ustawi czasu lokalnego." + IDS_WZD_NAME "Program instalacyjny nie może kontynuować dopóki nie wpiszesz swojego imienia i nazwiska." + IDS_WZD_SETCOMPUTERNAME "Program instalacyjny nie zdołał ustawić nowej nazwy komputera." + IDS_WZD_COMPUTERNAME "Program instalacyjny nie może kontynuować dopóki nie wpiszesz nazwy komputera." + IDS_WZD_PASSWORDEMPTY "Musisz wprowadzić hasło!" + IDS_WZD_PASSWORDMATCH "Oba wprowadzone hasła nie są identyczne. Musisz wpisać to samo hasło dwa razy." + IDS_WZD_PASSWORDCHAR "Wprowadzone hasło zawiera nieodpowiednie znaki. Proszę wprowadzić hasło bez ich udziału." + IDS_WZD_LOCALTIME "Program instalacyjny nie zdołał ustawić czasu lokalnego." END STRINGTABLE BEGIN - IDS_STATUS_INSTALL_DEV "Instalacja urzdze..." + IDS_STATUS_INSTALL_DEV "Instalacja urządzeń..." END /* EOF */ diff --git a/dll/win32/syssetup/lang/pt-BR.rc b/dll/win32/syssetup/lang/pt-BR.rc index c8ca8e9d3b1..29f9a679339 100644 --- a/dll/win32/syssetup/lang/pt-BR.rc +++ b/dll/win32/syssetup/lang/pt-BR.rc @@ -24,9 +24,7 @@ CAPTION "Instala FONT 8, "MS Shell Dlg" BEGIN LTEXT "Bem-vindo ao assistente de instalao do ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Este assistente instala o ReactOS no seu computador. Ele "\ - "precisa reunir algumas informaes sobre voc e seu computador "\ - "para instalar o ReactOS devidamente.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Este assistente instala o ReactOS no seu computador. Ele precisa reunir algumas informaes sobre voc e seu computador para instalar o ReactOS devidamente.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Clique Avanar para continuar a instalao.", IDC_STATIC, 115, 169, 195, 17 END @@ -36,13 +34,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Instalao do ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Os desenvolvedores do ReactOS gostariam de agradecer aos seguintes projetos Open Source, "\ - "cujo partes foram utilizadas para criar o ReactOS:", + LTEXT "Os desenvolvedores do ReactOS gostariam de agradecer aos seguintes projetos Open Source, cujo partes foram utilizadas para criar o ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS est licenciado sob a GPL, se voc deseja reutilizar ou redistribuir "\ - "(partes) (d)ele voc deve respeitar a GPL", + LTEXT "ReactOS est licenciado sob a GPL, se voc deseja reutilizar ou redistribuir (partes) (d)ele voc deve respeitar a GPL", IDC_STATIC,15,110,227,19 PUSHBUTTON "&Visualizar GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Clique Avanar para continuar com a instalao.",IDC_STATIC,15,136, @@ -71,14 +67,12 @@ CAPTION "Instala FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Digite um nome para o seu computador com 15 caracteres ou menos. "\ - "Se voc est em uma rede, o nome do computador deve ser exclusivo.", + LTEXT "Digite um nome para o seu computador com 15 caracteres ou menos. Se voc est em uma rede, o nome do computador deve ser exclusivo.", IDC_STATIC, 54, 7, 250, 24 LTEXT "Nome do &Computador:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "A instalao vai criar uma conta no seu computador chamada Administrator. "\ - "Voc pode usar esta conta se precisar de acesso total ao seu computador.", + LTEXT "A instalao vai criar uma conta no seu computador chamada Administrator. Voc pode usar esta conta se precisar de acesso total ao seu computador.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Digite uma senha para o administrador com 14 caracteres ou menos.", IDC_STATIC, 54, 87, 250, 8 @@ -95,9 +89,7 @@ CAPTION "Instala FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "A localidade do sistema deve coincidir com o idioma das aplicaes "\ - "que voc quer utilizar. A localidade de usurio controla como nmeros, "\ - "moeda e datas aparecem.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "A localidade do sistema deve coincidir com o idioma das aplicaes que voc quer utilizar. A localidade de usurio controla como nmeros, moeda e datas aparecem.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Para alterar a localidade de sistema ou usurio, clique Personalizar.", IDC_STATIC, 53, 60, 196, 8 @@ -148,11 +140,9 @@ CAPTION "Finalizando a instala FONT 8, "MS Shell Dlg" BEGIN LTEXT "Finalizando o Assistente de Instalao do ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "Voc completou a instalao do ReactOS com sucesso.\n\n" \ - "Quando voc clicar em Finalizar, o computador ser reiniciado.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Voc completou a instalao do ReactOS com sucesso.\n\nQuando voc clicar em Finalizar, o computador ser reiniciado.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Se houver um cd em algum drive, remova-o. Depois, para "\ - "reiniciar seu computador, clique Finalizar.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Se houver um cd em algum drive, remova-o. Depois, para reiniciar seu computador, clique Finalizar.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/dll/win32/syssetup/lang/ro-RO.rc b/dll/win32/syssetup/lang/ro-RO.rc index 35ff476c2e1..553aefa57f9 100644 --- a/dll/win32/syssetup/lang/ro-RO.rc +++ b/dll/win32/syssetup/lang/ro-RO.rc @@ -19,17 +19,13 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) - IDD_WELCOMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Bun venit la Expertul de instalare al ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Acest expert instalează ReactOS pe computerul dvs. Expertul "\ - "trebuie să adune niște informații despre computer"\ - "pentru a instala ReactOS corect.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Acest expert instalează ReactOS pe computerul dvs. Expertul trebuie să adune niște informații despre computerpentru a instala ReactOS corect.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Clic pe Următor pentru a continua.", IDC_STATIC, 115, 169, 195, 17 END @@ -39,13 +35,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Dezvoltatorii ReactOS le sunt recunoscători următoarelor proiecte de software liber "\ - "care au fost utilizate la crearea ReactOS:", + LTEXT "Dezvoltatorii ReactOS le sunt recunoscători următoarelor proiecte de software liber care au fost utilizate la crearea ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS este sub licența GPL, astfel dacă vreți să îl redistribuiți "\ - "trebuie să respectați licența GPL.", + LTEXT "ReactOS este sub licența GPL, astfel dacă vreți să îl redistribuiți trebuie să respectați licența GPL.", IDC_STATIC,15,110,227,19 PUSHBUTTON "&Vizualizare GPL...",IDC_VIEWGPL,251,110,50,19 LTEXT "Clic pe Următor pentru a continua.",IDC_STATIC,15,136, @@ -74,14 +68,12 @@ CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Scrieți un nume pentru computer de maxim 15 de caractere. "\ - "Dacă sunteți în rețea, numele computerului trebuie să fie unic.", + LTEXT "Scrieți un nume pentru computer de maxim 15 de caractere. Dacă sunteți în rețea, numele computerului trebuie să fie unic.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Nume:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Expertul va crea un cont de utilizator cu numele Administrator. "\ - "Îl puteți folosi când vreți control complet asupra computerului.", + LTEXT "Expertul va crea un cont de utilizator cu numele Administrator. Îl puteți folosi când vreți control complet asupra computerului.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Scrieți o parolă pentru Administrator de maxim 14 caractere.", IDC_STATIC, 54, 87, 250, 8 @@ -98,9 +90,7 @@ CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Setările regionale ar trebui să se potrivească cu limba"\ - "programelor. Acestea controlează cum apar numerele, "\ - "datele și valutele.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "Setările regionale ar trebui să se potrivească cu limbaprogramelor. Acestea controlează cum apar numerele, datele și valutele.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Pentru a aceste setări, clic pe Particularizare.", IDC_STATIC, 53, 60, 196, 8 @@ -151,11 +141,9 @@ CAPTION "Finalizare instalare ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Terminare Expert instalare ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT "Ați terminat cu succes instalarea ReactOS.\n\n" \ - "După ce veți apăsa Termină computerul va reporni.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Ați terminat cu succes instalarea ReactOS.\n\nDupă ce veți apăsa Termină computerul va reporni.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Dacă aveți un CD introdus în computer, scoateți-l. Pentru a "\ - "reporni computerul, clic pe Termină.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Dacă aveți un CD introdus în computer, scoateți-l. Pentru a reporni computerul, clic pe Termină.", IDC_STATIC, 115, 169, 195, 17 END @@ -304,6 +292,3 @@ STRINGTABLE BEGIN IDS_STATUS_INSTALL_DEV "Instalare dispozitive..." END - -#pragma code_page(default) -/* EOF */ diff --git a/dll/win32/syssetup/lang/ru-RU.rc b/dll/win32/syssetup/lang/ru-RU.rc index 769cfcb7885..087e35051db 100644 --- a/dll/win32/syssetup/lang/ru-RU.rc +++ b/dll/win32/syssetup/lang/ru-RU.rc @@ -5,117 +5,111 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT " "\ - " ReactOS .", IDC_STATIC, 115, 40, 195, 100 - LTEXT " """" .", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Добро пожаловать в мастер установки ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 + LTEXT "Этот мастер поможет ввести сведения для правильной установки ReactOS и установит ее на ваш компьютер.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Нажмите ""Далее"" для продолжения установки.", IDC_STATIC, 115, 169, 195, 17 END IDD_ACKPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS Open Source-, "\ - " ReactOS:", + LTEXT "Разработчики ReactOS и Open Source-проекты, благодаря которым была создана ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS GPL, "\ - " , GPL.", + LTEXT "ReactOS распространяется под лицензией GPL, если вы хотите использовать и распространять ее, вы должны соблюдать GPL.", IDC_STATIC,15,110,227,19 - PUSHBUTTON "&...",IDC_VIEWGPL,251,110,50,14 - LTEXT " """" .",IDC_STATIC,15,136, + PUSHBUTTON "&Лицензия...",IDC_VIEWGPL,251,110,50,14 + LTEXT "Нажмите ""Далее"" для продолжения установки.",IDC_STATIC,15,136, 195,17 END IDD_OWNERPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON2, IDC_STATIC, 21, 7, 20, 20 - LTEXT " .", + LTEXT "Введите ваше полное имя и название организации.", IDC_STATIC, 54, 7, 242, 21 - LTEXT "&:", IDC_STATIC, 54, 37, 44, 8 + LTEXT "&Имя:", IDC_STATIC, 54, 37, 44, 8 EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "&:", IDC_STATIC, 54, 57, 47, 8 + LTEXT "&Организация:", IDC_STATIC, 54, 57, 47, 8 EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL END IDD_COMPUTERPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT " ( 15 ). "\ - " , .", + LTEXT "Введите имя вашего компьютера (не более 15 символов). Если ваш компьютер подключен к сети, то его имя должно быть уникально.", IDC_STATIC, 54, 7, 250, 24 - LTEXT "& :", IDC_STATIC, 54, 38, 75, 8 + LTEXT "&Имя компьютера:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 165, 35, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT " Administrator "\ - " , .", + LTEXT "При установке будет создан профиль пользователя с именем Administrator Вы можете использовать этот профиль, если вам нужно получить права администратора.", IDC_STATIC, 54, 57, 250, 25 - LTEXT " ( 14 ).", + LTEXT "Введите пароль администратора (не более 14 символов).", IDC_STATIC, 54, 87, 250, 8 - LTEXT "& :", IDC_STATIC, 54, 104, 96, 8 + LTEXT "&Пароль администратора:", IDC_STATIC, 54, 104, 96, 8 EDITTEXT IDC_ADMINPASSWORD1, 165, 101, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "& :", IDC_STATIC, 54, 123, 75, 8 + LTEXT "П&овторите пароль:", IDC_STATIC, 54, 123, 75, 8 EDITTEXT IDC_ADMINPASSWORD2, 165, 120, 148, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT " . "\ - " , .", IDC_STATIC, 53, 7, 253, 20 + LTEXT "Язык системы устанавливается и действует во всех приложениях. Можно выбрать систему исчисления, формат чисел и даты.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 - LTEXT " """".", + LTEXT "Для изменения языка системы нажмите ""Настроить"".", IDC_STATIC, 53, 60, 197, 8 - PUSHBUTTON "&...", IDC_CUSTOMLOCALE, 245, 57, 55, 14 - LTEXT " .", + PUSHBUTTON "&Настроить...", IDC_CUSTOMLOCALE, 245, 57, 55, 14 + LTEXT "Выбрав раскладку вы сможете вводить символы на вашем языке.", IDC_STATIC, 53, 86, 253, 8 LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 - LTEXT " """".", + LTEXT "Для изменения раскладки нажмите ""Настроить"".", IDC_STATIC, 53, 126, 184, 8 - PUSHBUTTON "&...", IDC_CUSTOMLAYOUT, 245, 122, 55, 14 + PUSHBUTTON "Н&астроить...", IDC_CUSTOMLAYOUT, 245, 122, 55, 14 END IDD_DATETIMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON3, IDC_STATIC, 21, 10, 20, 20 - LTEXT " :", IDC_STATIC, 53, 7, 253, 8 + LTEXT "Дата и время:", IDC_STATIC, 53, 7, 253, 8 CONTROL "", IDC_DATEPICKER, "SysDateTimePick32", DTS_LONGDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 17, 137, 14 CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 200, 17, 54, 14 - LTEXT " :", IDC_STATIC, 53, 42, 253, 8 + LTEXT "Часовой пояс:", IDC_STATIC, 53, 42, 253, 8 COMBOBOX IDC_TIMEZONELIST, 53, 52, 201, 93, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - AUTOCHECKBOX "& .", + AUTOCHECKBOX "Ав&томатический переход на летнее время и обратно.", IDC_AUTODAYLIGHT, 53, 124, 201, 10 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 @@ -127,21 +121,19 @@ END IDD_FINISHPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Завершение установки ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT " ReactOS.\n\n" \ - " """" .", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Завершение мастера установки ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 + LTEXT "Вы успешно закончили установку ReactOS.\n\nНажмите ""Готово"" для перезагрузки вашего компьютера.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT " CD , . "\ - " """".", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Если в CD находится в приводе, нужно извлечь его. Для перезагрузки компьютера нажмите ""Готово"".", IDC_STATIC, 115, 169, 195, 17 END IDD_GPL DIALOGEX 0, 0, 333, 230 STYLE DS_SHELLFONT | DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " GNU" +CAPTION "Открытое лицензионное соглашение GNU" FONT 8, "MS Shell Dlg" BEGIN EDITTEXT IDC_GPL_TEXT,7,7,319,190,ES_MULTILINE | ES_AUTOHSCROLL | @@ -152,7 +144,7 @@ END IDD_STATUSWINDOW_DLG DIALOGEX 0,0,274,26 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION " ..." +CAPTION "Пожалуйста подождите..." FONT 8,"MS Shell Dlg 2",400,0,1 BEGIN LTEXT "",IDC_STATUSLABEL,7,8,234,12,SS_WORDELLIPSIS @@ -161,129 +153,129 @@ END STRINGTABLE BEGIN - IDS_ACKTITLE " " - IDS_ACKSUBTITLE " ReactOS ." - IDS_OWNERTITLE " " - IDS_OWNERSUBTITLE " ReactOS." - IDS_COMPUTERTITLE " " - IDS_COMPUTERSUBTITLE " ." - IDS_LOCALETITLE " " - IDS_LOCALESUBTITLE " ReactOS ." - IDS_DATETIMETITLE " " - IDS_DATETIMESUBTITLE " ." - IDS_PROCESSTITLE " " - IDS_PROCESSSUBTITLE " ReactOS ." + IDS_ACKTITLE "Подтверждение лицензии" + IDS_ACKSUBTITLE "Информация о разработчиках ReactOS и лизензионное соглашение." + IDS_OWNERTITLE "Персональные данные" + IDS_OWNERSUBTITLE "Установка информации о пользователях ReactOS." + IDS_COMPUTERTITLE "Имя компьютера и пароль администратора" + IDS_COMPUTERSUBTITLE "Вы должны ввести имя и администраторский пароль для вашего компьютера." + IDS_LOCALETITLE "Региональные настройки" + IDS_LOCALESUBTITLE "Вы можете настраивать ReactOS для разных регионов и языков." + IDS_DATETIMETITLE "Дата и время" + IDS_DATETIMESUBTITLE "Установите правильную дату и время на вашем компьютере." + IDS_PROCESSTITLE "Процесс установки" + IDS_PROCESSSUBTITLE "Установка ReactOS на ваш компьютер." END STRINGTABLE BEGIN - IDS_CMT_DOWNLOADER " " + IDS_CMT_DOWNLOADER "Скачать и установить другие приложения" END STRINGTABLE BEGIN - IDS_ACCESSORIES "" - IDS_CMT_CALC " " - IDS_CMT_CMD " " - IDS_CMT_EXPLORER " " - IDS_CMT_NOTEPAD " " - IDS_CMT_REGEDIT " " - IDS_CMT_WORDPAD " " - IDS_CMT_SCREENSHOT " " - IDS_CMT_DEVMGMT " " - IDS_CMT_SERVMAN " " - IDS_CMT_RDESKTOP " " - IDS_CMT_EVENTVIEW " " - IDS_CMT_MSCONFIG " " - IDS_CMT_PAINT " Paint" + IDS_ACCESSORIES "Стандартные" + IDS_CMT_CALC "Запустить калькулятор" + IDS_CMT_CMD "Открыть командную строку" + IDS_CMT_EXPLORER "Запустить Проводник" + IDS_CMT_NOTEPAD "Запустить текстовый редактор" + IDS_CMT_REGEDIT "Запустить редактор реестра" + IDS_CMT_WORDPAD "Запустить редактор документов" + IDS_CMT_SCREENSHOT "Сделать снимок экрана" + IDS_CMT_DEVMGMT "Запустить диспетчер устройств" + IDS_CMT_SERVMAN "Запустить диспетчер служб" + IDS_CMT_RDESKTOP "Запустить удаленный рабочий стол" + IDS_CMT_EVENTVIEW "Запустить программу просмотра событий" + IDS_CMT_MSCONFIG "Запустить программу настройки системы" + IDS_CMT_PAINT "Запустить Paint" END STRINGTABLE BEGIN - IDS_GAMES "" - IDS_CMT_SOLITAIRE " " - IDS_CMT_WINEMINE "" - IDS_CMT_SPIDER " " + IDS_GAMES "Игры" + IDS_CMT_SOLITAIRE "Пасьянс Косынка" + IDS_CMT_WINEMINE "Сапер" + IDS_CMT_SPIDER "Пасьянс Паук" END STRINGTABLE BEGIN - IDS_SYS_TOOLS "" - IDS_CMT_CHARMAP " " - IDS_CMT_KBSWITCH " " - IDS_CMT_DXDIAG " ReactX" + IDS_SYS_TOOLS "Служебные" + IDS_CMT_CHARMAP "Таблица символов" + IDS_CMT_KBSWITCH "Переключатель раскладки клавиатуры" + IDS_CMT_DXDIAG "Запустить программу диагностики ReactX" END STRINGTABLE BEGIN - IDS_SYS_ACCESSIBILITY " " - IDS_CMT_MAGNIFY " " + IDS_SYS_ACCESSIBILITY "Специальные возможности" + IDS_CMT_MAGNIFY "Экранная лупа" END STRINGTABLE BEGIN - IDS_SYS_ENTERTAINMENT "" - IDS_CMT_MPLAY32 " " - IDS_CMT_SNDVOL32 " " + IDS_SYS_ENTERTAINMENT "Развлечения" + IDS_CMT_MPLAY32 "Запустить проигрыватель" + IDS_CMT_SNDVOL32 "Запустить регулятор громкости" IDS_CMT_SNDREC32 "Launch Sound Recorder" END STRINGTABLE BEGIN - IDS_REACTOS_SETUP " ReactOS" - IDS_UNKNOWN_ERROR " " - IDS_REGISTERING_COMPONENTS " ..." - IDS_LOADLIBRARY_FAILED " LoadLibrary: " - IDS_GETPROCADDR_FAILED " GetProcAddr: " - IDS_REGSVR_FAILED " DllRegisterServer: " - IDS_DLLINSTALL_FAILED " DllInstall: " - IDS_TIMEOUT " " + IDS_REACTOS_SETUP "Установка ReactOS" + IDS_UNKNOWN_ERROR "Неизвестная ошибка" + IDS_REGISTERING_COMPONENTS "Регистрация компонентов..." + IDS_LOADLIBRARY_FAILED "Ошибка LoadLibrary: " + IDS_GETPROCADDR_FAILED "Ошибка GetProcAddr: " + IDS_REGSVR_FAILED "Ошибка DllRegisterServer: " + IDS_DLLINSTALL_FAILED "Ошибка DllInstall: " + IDS_TIMEOUT "Таймаут в ходе регистрации" IDS_REASON_UNKNOWN "" END STRINGTABLE BEGIN - IDS_SHORT_CMD " .lnk" - IDS_SHORT_EXPLORER " ReactOS.lnk" - IDS_SHORT_DOWNLOADER " ReactOS.lnk" - IDS_SHORT_SERVICE " .lnk" - IDS_SHORT_DEVICE " .lnk" - IDS_SHORT_MPLAY32 ".lnk" - IDS_SHORT_CALC ".lnk" - IDS_SHORT_REGEDIT " .lnk" - IDS_SHORT_NOTEPAD ".lnk" + IDS_SHORT_CMD "Командная строка.lnk" + IDS_SHORT_EXPLORER "Проводник ReactOS.lnk" + IDS_SHORT_DOWNLOADER "Менеджер приложений ReactOS.lnk" + IDS_SHORT_SERVICE "Диспетчер служб.lnk" + IDS_SHORT_DEVICE "Диспетчер устройств.lnk" + IDS_SHORT_MPLAY32 "Проигрыватель.lnk" + IDS_SHORT_CALC "Калькулятор.lnk" + IDS_SHORT_REGEDIT "Редактор реестра.lnk" + IDS_SHORT_NOTEPAD "Блокнот.lnk" IDS_SHORT_WORDPAD "WordPad.lnk" IDS_SHORT_SNAP "SnapShot.lnk" - IDS_SHORT_SOLITAIRE " .lnk" - IDS_SHORT_WINEMINE ".lnk" - IDS_SHORT_CHARMAP " .lnk" - IDS_SHORT_MAGNIFY " .lnk" - IDS_SHORT_RDESKTOP " .lnk" - IDS_SHORT_KBSWITCH " .lnk" - IDS_SHORT_EVENTVIEW " .lnk" - IDS_SHORT_MSCONFIG " .lnk" - IDS_SHORT_SNDVOL32 ".lnk" + IDS_SHORT_SOLITAIRE "Пасьянс Косынка.lnk" + IDS_SHORT_WINEMINE "Сапер.lnk" + IDS_SHORT_CHARMAP "Таблица символов.lnk" + IDS_SHORT_MAGNIFY "Экранная лупа.lnk" + IDS_SHORT_RDESKTOP "Удаленный рабочий стол.lnk" + IDS_SHORT_KBSWITCH "Переключатель раскладки клавиатуры.lnk" + IDS_SHORT_EVENTVIEW "Просмотр событий.lnk" + IDS_SHORT_MSCONFIG "Параметры системы.lnk" + IDS_SHORT_SNDVOL32 "Громкость.lnk" IDS_SHORT_SNDREC32 "Audiorecorder.lnk" - IDS_SHORT_DXDIAG " ReactX.lnk" + IDS_SHORT_DXDIAG "Средство диагностики ReactX.lnk" IDS_SHORT_PAINT "Paint.lnk" - IDS_SHORT_SPIDER " .lnk" + IDS_SHORT_SPIDER "Пасьянс Паук.lnk" END STRINGTABLE BEGIN - IDS_WZD_NAME " ." - IDS_WZD_SETCOMPUTERNAME " ! ." - IDS_WZD_COMPUTERNAME " ." - IDS_WZD_PASSWORDEMPTY " !" - IDS_WZD_PASSWORDMATCH ", . ." - IDS_WZD_PASSWORDCHAR ", . ." - IDS_WZD_LOCALTIME " ." + IDS_WZD_NAME "Для продолжения установки нужно ввести ваше имя." + IDS_WZD_SETCOMPUTERNAME "Ошибка установки! Нужно ввести имя компьютера." + IDS_WZD_COMPUTERNAME "Для продолжения установки нужно ввести имя компьютера." + IDS_WZD_PASSWORDEMPTY "Вы должны ввести пароль!" + IDS_WZD_PASSWORDMATCH "Пароли, которые вы ввели не совпадают. Введите их снова." + IDS_WZD_PASSWORDCHAR "Пароли, которые вы ввели содержат запрещенные символы. Введите их снова." + IDS_WZD_LOCALTIME "Не удалось установить местное время." END STRINGTABLE BEGIN - IDS_STATUS_INSTALL_DEV " ..." + IDS_STATUS_INSTALL_DEV "Установка оборудования..." END /* EOF */ diff --git a/dll/win32/syssetup/lang/sk-SK.rc b/dll/win32/syssetup/lang/sk-SK.rc index 7804ec23e59..d8338d8e19c 100644 --- a/dll/win32/syssetup/lang/sk-SK.rc +++ b/dll/win32/syssetup/lang/sk-SK.rc @@ -12,9 +12,7 @@ CAPTION "In FONT 8, "MS Shell Dlg" BEGIN LTEXT "Vitajte v sprievodcovi intalcie systmu ReactOS.", IDC_WELCOMETITLE, 115, 9, 189, 31 - LTEXT "Tento sprievodca naintaluje systm ReactOS na V pota. Sprievodca "\ - "potrebuje zska niektor informcie o Vs a Vaom potai "\ - "aby mohol systm ReactOS sprvne nastavi.", IDC_STATIC, 115, 50, 189, 100 + LTEXT "Tento sprievodca naintaluje systm ReactOS na V pota. Sprievodca potrebuje zska niektor informcie o Vs a Vaom potai aby mohol systm ReactOS sprvne nastavi.", IDC_STATIC, 115, 50, 189, 100 LTEXT "Kliknutm na alej pokraujte v intalcii.", IDC_STATIC, 115, 160, 189, 31 END @@ -24,13 +22,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "Intaltor systmu ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Vvojri systmu ReactOS by sa chceli poakova nasledujcim Open Source projektom, "\ - "ktor (alebo asti ktorch) boli pouit pri vvoji systmu ReactOS:", + LTEXT "Vvojri systmu ReactOS by sa chceli poakova nasledujcim Open Source projektom, ktor (alebo asti ktorch) boli pouit pri vvoji systmu ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "Systm ReactOS je vydan pod licenciou GPL. Pokia chcete systm (alebo jeho asti) poui "\ - "alebo redistribuova, muste repektova GPL", + LTEXT "Systm ReactOS je vydan pod licenciou GPL. Pokia chcete systm (alebo jeho asti) poui alebo redistribuova, muste repektova GPL", IDC_STATIC,15,110,228,22 PUSHBUTTON "&Zobrazi GPL...",IDC_VIEWGPL,245,110,56,19 LTEXT "Kliknutm na alej pokraujte v intalcii.",IDC_STATIC,15,136, @@ -59,14 +55,12 @@ CAPTION "In FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Napte nzov Vho potaa v dke 15 znakov alebo menej. "\ - "Ak je pota pripojen k sieti, mus b jeho nzov uniktny.", + LTEXT "Napte nzov Vho potaa v dke 15 znakov alebo menej. Ak je pota pripojen k sieti, mus b jeho nzov uniktny.", IDC_STATIC, 54, 7, 250, 24 LTEXT "&Nzov potaa:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "Intaltor vytvor na potai pouvatesk et nazvan Administrator. "\ - "Tento et mete poui, ke budete potrebova pln prstup k Vmu potau.", + LTEXT "Intaltor vytvor na potai pouvatesk et nazvan Administrator. Tento et mete poui, ke budete potrebova pln prstup k Vmu potau.", IDC_STATIC, 54, 57, 250, 25 LTEXT "Zadajte heslo tu Administrator v dke 14 znakov alebo menej.", IDC_STATIC, 54, 87, 250, 8 @@ -83,9 +77,7 @@ CAPTION "In FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "Lokalizcia systmu by mala shlasi s jazykom aplikci, "\ - "ktor chcete pouva. Lokalizcia ur ako bud zobrazen "\ - "sla, meny a daje kalendra.", IDC_STATIC, 53, 7, 253, 20 + LTEXT "Lokalizcia systmu by mala shlasi s jazykom aplikci, ktor chcete pouva. Lokalizcia ur ako bud zobrazen sla, meny a daje kalendra.", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Pre zmenu lokalizcie systmu kliknite na Zmeni.", IDC_STATIC, 53, 60, 184, 8 @@ -135,11 +127,9 @@ CAPTION "Dokon FONT 8, "MS Shell Dlg" BEGIN LTEXT "Dokonenie sprievodcu intalciou systmu ReactOS",IDC_FINISHTITLE,115,9,195,37 - LTEXT "Sprievodca intalciou systmu ReactOS bol spene dokonen.\n\n" \ - "Po kliknut na Dokoni sa pota retartuje.", IDC_STATIC, 115, 58, 195, 100 + LTEXT "Sprievodca intalciou systmu ReactOS bol spene dokonen.\n\nPo kliknut na Dokoni sa pota retartuje.", IDC_STATIC, 115, 58, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "Ak je v mechanike intalan mdium, vyberte ho. Potom kliknutm na Dokoni "\ - "retartujte pota.", IDC_STATIC, 115, 160, 195, 31 + LTEXT "Ak je v mechanike intalan mdium, vyberte ho. Potom kliknutm na Dokoni retartujte pota.", IDC_STATIC, 115, 160, 195, 31 END diff --git a/dll/win32/syssetup/lang/uk-UA.rc b/dll/win32/syssetup/lang/uk-UA.rc index 7d10b8b8845..9fe6a7a2668 100644 --- a/dll/win32/syssetup/lang/uk-UA.rc +++ b/dll/win32/syssetup/lang/uk-UA.rc @@ -11,119 +11,111 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_WELCOMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT " ReactOS '. "\ - " ' "\ - " ReactOS .", IDC_STATIC, 115, 40, 195, 100 - LTEXT " """", .", IDC_STATIC, 115, 169, 195, 17 + LTEXT "Ласкаво просимо до майстра встановлення ReactOS.", IDC_WELCOMETITLE, 115, 8, 195, 24 + LTEXT "Цей майстер встановлює ReactOS на Ваш комп'ютер. Йому потрібно зібрати деякі відомості про Вас і Ваш комп'ютер щоб установити ReactOS належним чином.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Натисніть ""Далі"", щоб продовжити встановлення.", IDC_STATIC, 115, 169, 195, 17 END IDD_ACKPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT " ReactOS Open Source , "\ - " () ReactOS:", + LTEXT "Розробники ReactOS хотіли б подякувати наступним Open Source проектам, що (частково) використовувалися при створенні ReactOS:", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS GPL, "\ - " (), GPL", + LTEXT "ReactOS ліцензується за GPL, так що якщо Ви хочете повторно використовувати або поширювати його (частини), Ви повинні поважати GPL", IDC_STATIC,15,110,227,24 - PUSHBUTTON "& GPL...",IDC_VIEWGPL,244,110,58,19 - LTEXT " """", .",IDC_STATIC,15,136, + PUSHBUTTON "&Перегляд GPL...",IDC_VIEWGPL,244,110,58,19 + LTEXT "Натисніть ""Далі"", щоб продовжити встановлення.",IDC_STATIC,15,136, 195,17 END IDD_OWNERPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON2, IDC_STATIC, 21, 7, 20, 20 - LTEXT " ' .", + LTEXT "Введіть своє повне ім'я і назву вашої компанії або організації.", IDC_STATIC, 54, 7, 242, 21 - LTEXT "&':", IDC_STATIC, 54, 37, 44, 8 + LTEXT "&Ім'я:", IDC_STATIC, 54, 37, 44, 8 EDITTEXT IDC_OWNERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "&:", IDC_STATIC, 54, 57, 44, 8 + LTEXT "&Організація:", IDC_STATIC, 54, 57, 44, 8 EDITTEXT IDC_OWNERORGANIZATION, 132, 55, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL END IDD_COMPUTERPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT " ' ' 15 . "\ - " , ' ' .", + LTEXT "Введіть ім'я Вашого комп'ютера довжиною до 15 символів. Якщо Ви працюєте в мережі, ім'я Вашого комп'ютера має бути унікальним.", IDC_STATIC, 54, 7, 250, 24 - LTEXT "&' ':", IDC_STATIC, 54, 38, 75, 8 + LTEXT "&Ім'я комп'ютера:", IDC_STATIC, 54, 38, 75, 8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT " '', "\ - " '.", + LTEXT "Програма встановлення створить обліковий запис користувача 'Адміністратор', який дає повні права доступу до Вашого комп'ютера.", IDC_STATIC, 54, 57, 250, 25 - LTEXT " 14 .", + LTEXT "Введіть пароль адміністратора довжиною до 14 символів.", IDC_STATIC, 54, 87, 250, 8 - LTEXT "& :", IDC_STATIC, 54, 104, 75, 8 + LTEXT "&Пароль адміністратора:", IDC_STATIC, 54, 104, 75, 8 EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD - LTEXT "ϳ&:", IDC_STATIC, 54, 123, 75, 8 + LTEXT "Пі&дтвердження:", IDC_STATIC, 54, 123, 75, 8 EDITTEXT IDC_ADMINPASSWORD2, 132, 120, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD END IDD_LOCALEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT " , "\ - ". "\ - ", .", IDC_STATIC, 53, 5, 253, 27 + LTEXT "Мова системи має відповідати мові додатків, які ви хочете використовувати. Мова користувача задає формат виведення чисел, грошових одиниць і дат.", IDC_STATIC, 53, 5, 253, 27 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 - LTEXT " """".", + LTEXT "Для зміни мови системи або мови користувача натисніть ""Налаштувати"".", IDC_STATIC, 53, 60, 184, 16 - PUSHBUTTON "&...", IDC_CUSTOMLOCALE, 240, 57, 57, 14 - LTEXT " , .", + PUSHBUTTON "На&лаштувати...", IDC_CUSTOMLOCALE, 240, 57, 57, 14 + LTEXT "Розкладка клавіатури визначає символи, що вводяться при натисненні клавіш.", IDC_STATIC, 53, 84, 253, 18 LTEXT "", IDC_LAYOUTTEXT, 53, 100, 250, 16 - LTEXT " """".", + LTEXT "Для зміни розкладки клавіатури натисніть ""Налаштувати"".", IDC_STATIC, 53, 126, 184, 18 - PUSHBUTTON "&...", IDC_CUSTOMLAYOUT, 240, 122, 57, 14 + PUSHBUTTON "Нал&аштувати...", IDC_CUSTOMLAYOUT, 240, 122, 57, 14 END IDD_DATETIMEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_ICON3, IDC_STATIC, 21, 10, 20, 20 - LTEXT " ", IDC_STATIC, 53, 7, 253, 8 + LTEXT "Дата й час", IDC_STATIC, 53, 7, 253, 8 CONTROL "", IDC_DATEPICKER, "SysDateTimePick32", DTS_LONGDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 17, 137, 14 CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 200, 17, 54, 14 - LTEXT " ", IDC_STATIC, 53, 42, 253, 8 + LTEXT "Часовий пояс", IDC_STATIC, 53, 42, 253, 8 COMBOBOX IDC_TIMEZONELIST, 53, 52, 201, 93, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - AUTOCHECKBOX "& / ", + AUTOCHECKBOX "Автомати&чне переведення годинника на літний/зимовий час", IDC_AUTODAYLIGHT, 53, 124, 219, 10 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 @@ -135,15 +127,13 @@ END IDD_FINISHPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION " ReactOS" +CAPTION "Завершення встановлення ReactOS" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 - LTEXT " ReactOS.\n\n" \ - "ϳ """" ' .", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Завершення встановлення ReactOS", IDC_FINISHTITLE, 115, 8, 195, 24 + LTEXT "Ви успішно завершили встановлення ReactOS.\n\nПісля натиснення кнопки ""Завершити"" комп'ютер буде перезавантажений.", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT " -, . "\ - " ' """".", IDC_STATIC, 115, 163, 195, 25 + LTEXT "Якщо в дисковод вставлений компакт-диск, вийміть його. Потім для перезавантаження Вашого комп'ютера натистніть ""Завершити"".", IDC_STATIC, 115, 163, 195, 25 END @@ -160,7 +150,7 @@ END IDD_STATUSWINDOW_DLG DIALOGEX 0,0,274,26 STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP -CAPTION "..." +CAPTION "Зачекайте..." FONT 8,"MS Shell Dlg 2",400,0,1 BEGIN LTEXT "",IDC_STATUSLABEL,7,8,234,12,SS_WORDELLIPSIS @@ -169,129 +159,129 @@ END STRINGTABLE BEGIN - IDS_ACKTITLE "" - IDS_ACKSUBTITLE " ReactOS " - IDS_OWNERTITLE " " - IDS_OWNERSUBTITLE "ֳ ReactOS." - IDS_COMPUTERTITLE "' ' " - IDS_COMPUTERSUBTITLE " ' '." - IDS_LOCALETITLE " " - IDS_LOCALESUBTITLE " ReactOS ." - IDS_DATETIMETITLE " " - IDS_DATETIMESUBTITLE " '." - IDS_PROCESSTITLE " " - IDS_PROCESSSUBTITLE ", ..." + IDS_ACKTITLE "Подяки" + IDS_ACKSUBTITLE "Інформація про розробників ReactOS і лізензійна угода" + IDS_OWNERTITLE "Налаштування ваших програм" + IDS_OWNERSUBTITLE "Ці особисті відомості будуть використані для налаштування ReactOS." + IDS_COMPUTERTITLE "Ім'я комп'ютера та пароль адміністратора" + IDS_COMPUTERSUBTITLE "Ви маєте вказати ім'я та пароль адміністратора Вашого комп'ютера." + IDS_LOCALETITLE "Мова і стандарти" + IDS_LOCALESUBTITLE "Ви можете налаштувати ReactOS для різних регіонів і мов." + IDS_DATETIMETITLE "Дата та час" + IDS_DATETIMESUBTITLE "Встановити правильні дату і час для Вашого комп'ютера." + IDS_PROCESSTITLE "Реєстрація компонентів" + IDS_PROCESSSUBTITLE "Зачекайте, будь ласка..." END STRINGTABLE BEGIN - IDS_CMT_DOWNLOADER " " + IDS_CMT_DOWNLOADER "Завантаження і встановлення різних додатків" END STRINGTABLE BEGIN - IDS_ACCESSORIES " " - IDS_CMT_CALC " " - IDS_CMT_CMD "³ " - IDS_CMT_DEVMGMT " " - IDS_CMT_EVENTVIEW " " - IDS_CMT_EXPLORER " " - IDS_CMT_MSCONFIG " " - IDS_CMT_NOTEPAD " " - IDS_CMT_RDESKTOP " ³ " - IDS_CMT_REGEDIT " " - IDS_CMT_SCREENSHOT " " - IDS_CMT_SERVMAN " " - IDS_CMT_WORDPAD " " - IDS_CMT_PAINT " Paint" + IDS_ACCESSORIES "Допоміжні програми" + IDS_CMT_CALC "Запустити Калькулятор" + IDS_CMT_CMD "Відкрити командний рядок" + IDS_CMT_DEVMGMT "Запустити Диспетчер пристроїв" + IDS_CMT_EVENTVIEW "Запустити Оглядач подій" + IDS_CMT_EXPLORER "Запустити Провідник" + IDS_CMT_MSCONFIG "Запустити Програму конфігурації системи" + IDS_CMT_NOTEPAD "Запустити Текстовий редактор" + IDS_CMT_RDESKTOP "Запустити Віддалене керування робочим столом" + IDS_CMT_REGEDIT "Запустити Редактор реєстру" + IDS_CMT_SCREENSHOT "Зробити знімок екрана" + IDS_CMT_SERVMAN "Запустити Диспетчер керування службами" + IDS_CMT_WORDPAD "Запустити Редактор документів" + IDS_CMT_PAINT "Запустити Графічний редактор Paint" END STRINGTABLE BEGIN - IDS_GAMES "" - IDS_CMT_SOLITAIRE "" - IDS_CMT_WINEMINE "" - IDS_CMT_SPIDER "' " + IDS_GAMES "Ігри" + IDS_CMT_SOLITAIRE "Косинка" + IDS_CMT_WINEMINE "Сапер" + IDS_CMT_SPIDER "Пас'янс Павук" END STRINGTABLE BEGIN - IDS_SYS_TOOLS "" - IDS_CMT_CHARMAP " " - IDS_CMT_DXDIAG " ReactX" - IDS_CMT_KBSWITCH " " + IDS_SYS_TOOLS "Службові" + IDS_CMT_CHARMAP "Таблиця символів" + IDS_CMT_DXDIAG "Запуск програми діагностики ReactX" + IDS_CMT_KBSWITCH "Перемикач розкладки клавіатури" END STRINGTABLE BEGIN - IDS_SYS_ACCESSIBILITY " " - IDS_CMT_MAGNIFY " " + IDS_SYS_ACCESSIBILITY "Спеціальні можливості" + IDS_CMT_MAGNIFY "Екранна лупа" END STRINGTABLE BEGIN - IDS_SYS_ENTERTAINMENT "" - IDS_CMT_MPLAY32 " " - IDS_CMT_SNDVOL32 " " - IDS_CMT_SNDREC32 " " + IDS_SYS_ENTERTAINMENT "Розваги" + IDS_CMT_MPLAY32 "Запуск мультимедійного плеєра" + IDS_CMT_SNDVOL32 "Запуск регулятора гучності" + IDS_CMT_SNDREC32 "Запуск записувача звуку" END STRINGTABLE BEGIN - IDS_REACTOS_SETUP " ReactOS" - IDS_UNKNOWN_ERROR " " - IDS_REGISTERING_COMPONENTS " ..." - IDS_LOADLIBRARY_FAILED " LoadLibrary: " - IDS_GETPROCADDR_FAILED " GetProcAddr: " - IDS_REGSVR_FAILED " DllRegisterServer: " - IDS_DLLINSTALL_FAILED " DllInstall: " - IDS_TIMEOUT " " + IDS_REACTOS_SETUP "Встановлення ReactOS" + IDS_UNKNOWN_ERROR "Невідома помилка" + IDS_REGISTERING_COMPONENTS "Реєстрація компонентів..." + IDS_LOADLIBRARY_FAILED "Помилка LoadLibrary: " + IDS_GETPROCADDR_FAILED "Помилка GetProcAddr: " + IDS_REGSVR_FAILED "Помилка DllRegisterServer: " + IDS_DLLINSTALL_FAILED "Помилка DllInstall: " + IDS_TIMEOUT "Таймаут під час реєстрації" IDS_REASON_UNKNOWN "" END STRINGTABLE BEGIN - IDS_SHORT_CALC ".lnk" - IDS_SHORT_CHARMAP " .lnk" - IDS_SHORT_CMD " .lnk" - IDS_SHORT_DEVICE " .lnk" - IDS_SHORT_DOWNLOADER " ReactOS.lnk" - IDS_SHORT_DXDIAG "ij ReactX.lnk" - IDS_SHORT_EVENTVIEW " .lnk" - IDS_SHORT_EXPLORER " ReactOS.lnk" - IDS_SHORT_KBSWITCH " .lnk" - IDS_SHORT_MAGNIFY " .lnk" - IDS_SHORT_MPLAY32 " .lnk" - IDS_SHORT_MSCONFIG " .lnk" - IDS_SHORT_NOTEPAD ".lnk" - IDS_SHORT_RDESKTOP "³ .lnk" - IDS_SHORT_REGEDIT " .lnk" - IDS_SHORT_SERVICE " .lnk" - IDS_SHORT_SNAP " .lnk" - IDS_SHORT_SNDVOL32 " .lnk" - IDS_SHORT_SNDREC32 " .lnk" - IDS_SHORT_SOLITAIRE ".lnk" + IDS_SHORT_CALC "Калькулятор.lnk" + IDS_SHORT_CHARMAP "Таблиця символів.lnk" + IDS_SHORT_CMD "Командний рядок.lnk" + IDS_SHORT_DEVICE "Диспетчер пристроїв.lnk" + IDS_SHORT_DOWNLOADER "Менеджер програм ReactOS.lnk" + IDS_SHORT_DXDIAG "Діагностика ReactX.lnk" + IDS_SHORT_EVENTVIEW "Оглядач подій.lnk" + IDS_SHORT_EXPLORER "Провідник ReactOS.lnk" + IDS_SHORT_KBSWITCH "Перемикач розкладки клавіатури.lnk" + IDS_SHORT_MAGNIFY "Екранна лупа.lnk" + IDS_SHORT_MPLAY32 "Мультимедійний плеєр.lnk" + IDS_SHORT_MSCONFIG "Конфігурація системи.lnk" + IDS_SHORT_NOTEPAD "Блокнот.lnk" + IDS_SHORT_RDESKTOP "Віддалене керування робочим столом.lnk" + IDS_SHORT_REGEDIT "Редактор реєстру.lnk" + IDS_SHORT_SERVICE "Диспетчер служб.lnk" + IDS_SHORT_SNAP "Знімок екрану.lnk" + IDS_SHORT_SNDVOL32 "Регулятор гучності.lnk" + IDS_SHORT_SNDREC32 "Записувач звуку.lnk" + IDS_SHORT_SOLITAIRE "Косинка.lnk" IDS_SHORT_WINEMINE "WineMine.lnk" IDS_SHORT_WORDPAD "WordPad.lnk" IDS_SHORT_PAINT "Paint.lnk" - IDS_SHORT_SPIDER "' .lnk" + IDS_SHORT_SPIDER "Пас'янс Павук.lnk" END STRINGTABLE BEGIN - IDS_WZD_NAME " '." - IDS_WZD_SETCOMPUTERNAME " ' '." - IDS_WZD_COMPUTERNAME " ' '." - IDS_WZD_PASSWORDEMPTY " !" - IDS_WZD_PASSWORDMATCH ", , . ." - IDS_WZD_PASSWORDCHAR ", , . ." - IDS_WZD_LOCALTIME " ." + IDS_WZD_NAME "Для продовження встановлення необхідно ввести ваше ім'я." + IDS_WZD_SETCOMPUTERNAME "Програмі інсталяції не вдалося встановити ім'я комп'ютера." + IDS_WZD_COMPUTERNAME "Для продовження встановлення необхідно ввести ім'я комп'ютера." + IDS_WZD_PASSWORDEMPTY "Ви маєте ввести пароль !" + IDS_WZD_PASSWORDMATCH "Паролі, які ви ввели, не співпадають. Будь ласка введіть потрібний пароль знову." + IDS_WZD_PASSWORDCHAR "Пароль, який ви ввели, містить заборонені символи. Будь ласка введіть інший пароль." + IDS_WZD_LOCALTIME "Програмі інсталяції не вдалося встановити місцевий час." END STRINGTABLE BEGIN - IDS_STATUS_INSTALL_DEV " ..." + IDS_STATUS_INSTALL_DEV "Встановлення пристроїв..." END /* EOF */ diff --git a/dll/win32/syssetup/lang/zh-CN.rc b/dll/win32/syssetup/lang/zh-CN.rc index 871238d0989..3a01d28ce65 100644 --- a/dll/win32/syssetup/lang/zh-CN.rc +++ b/dll/win32/syssetup/lang/zh-CN.rc @@ -17,9 +17,7 @@ CAPTION "ReactOS FONT 9, "MS Shell Dlg" BEGIN LTEXT "ӭʹReactOSװ򵼡", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "װ򵼽ڼϰװ ReactOS \n"\ - "ҪѼйĺͼϢ\n"\ - "Աȷװ ReactOS", IDC_STATIC, 115, 40, 195, 100 + LTEXT "װ򵼽ڼϰװ ReactOS \nҪѼйĺͼϢ\nԱȷװ ReactOS", IDC_STATIC, 115, 40, 195, 100 LTEXT "Ҫ뵥һ.", IDC_STATIC, 115, 169, 195, 17 END @@ -29,13 +27,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS װ " FONT 9, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "ReactOS ĿԱµĿʾл"\ - "ڽ ReactOS ʱʹеĴ :", + LTEXT "ReactOS ĿԱµĿʾлڽ ReactOS ʱʹеĴ :", IDC_STATIC,15,7,286,19 LISTBOX IDC_PROJECTS,15,30,286,75,LBS_NOSEL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL - LTEXT "ReactOS ǻGPLЭ鷢ģҪû· ReactOS "\ - "(򲿷)ѭGPLɡ", + LTEXT "ReactOS ǻGPLЭ鷢ģҪû· ReactOS (򲿷)ѭGPLɡ", IDC_STATIC,15,110,227,19 PUSHBUTTON "鿴GPL(&V)...",IDC_VIEWGPL,245,110,65,15 LTEXT "װ һ ",IDC_STATIC,15,136,195,17 @@ -62,14 +58,12 @@ CAPTION "ReactOS FONT 9, "MS Shell Dlg" BEGIN ICON IDI_ICON1, IDC_STATIC, 21, 7, 20, 20 - LTEXT "벻63ַļ"\ - "ÿһϵļһΨһơ", + LTEXT "벻63ַļÿһϵļһΨһơ", IDC_STATIC, 54, 7, 250, 24 LTEXT "(&C):", IDC_STATIC,54,38,75,8 EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE ICON IDI_ICON5, IDC_STATIC, 21, 57, 20, 20 - LTEXT "װᴴһΪ Administrator (ϵͳԱ)ûʻ"\ - "ҪȫƼʱʹʻ", + LTEXT "װᴴһΪ Administrator (ϵͳԱ)ûʻҪȫƼʱʹʻ", IDC_STATIC, 54, 57, 250, 25 LTEXT "벻14ַϵͳԱ롣", IDC_STATIC, 54, 87, 250, 8 @@ -86,8 +80,7 @@ CAPTION "ReactOS FONT 9, "MS Shell Dlg" BEGIN ICON IDI_ICON4, IDC_STATIC, 21, 7, 20, 20 - LTEXT "ϵͳӦʹõԣ"\ - "ûֵңڵʾʽ ", IDC_STATIC, 53, 7, 253, 20 + LTEXT "ϵͳӦʹõԣûֵңڵʾʽ ", IDC_STATIC, 53, 7, 253, 20 LTEXT "", IDC_LOCALETEXT, 53, 29, 250, 16 LTEXT "Ҫϵͳûã뵥 Զ塱 ", IDC_STATIC, 53, 60, 184, 8 @@ -138,11 +131,9 @@ CAPTION "ReactOS FONT 9, "MS Shell Dlg" BEGIN LTEXT " ReactOS װ", IDC_FINISHTITLE,115,8,195,24 - LTEXT "ReactOS װ˳ɡ\n\n"\ - "Ҫ뵥ɡ", IDC_STATIC, 115, 40, 195, 100 + LTEXT "ReactOS װ˳ɡ\n\nҪ뵥ɡ", IDC_STATIC, 115, 40, 195, 100 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12 - LTEXT "CD뽫ȡ"\ - "Ҫ뵥ɡ", IDC_STATIC, 115, 160, 195, 17 + LTEXT "CD뽫ȡҪ뵥ɡ", IDC_STATIC, 115, 160, 195, 17 END diff --git a/dll/win32/syssetup/syssetup.rc b/dll/win32/syssetup/syssetup.rc index d13f09ba5eb..ca7bcb28083 100644 --- a/dll/win32/syssetup/syssetup.rc +++ b/dll/win32/syssetup/syssetup.rc @@ -24,23 +24,7 @@ IDI_ICON5 ICON "resources/5.ico" STRINGTABLE BEGIN - IDS_ACKPROJECTS "Wine - http://www.winehq.org\n"\ - "FreeType - http://www.freetype.org\n"\ - "Expat - http://expat.sourceforge.net\n"\ - "DJGPP - http://www.delorie.com/djgpp\n"\ - "SYSLINUX - http://syslinux.zytor.com\n"\ - "Xbox Linux - http://www.xbox-linux.org\n"\ - "MinGW - http://www.mingw.org\n"\ - "Bochs - http://bochs.sourceforge.net\n"\ - "QEMU - http://fabrice.bellard.free.fr/qemu\n"\ - "Mesa3D - http://www.mesa3d.org\n"\ - "FreeBSD - http://www.freebsd.org\n"\ - "adns - http://adns.jgaa.com\n"\ - "ICU - http://www.icu-project.org/\n"\ - "GraphApp - http://enchantia.com/software/graphapp/\n"\ - "Ext2 - http://winext2fsd.sourceforge.net/\n"\ - "X - http://www.x.org/\n"\ - "" + IDS_ACKPROJECTS "Wine - http://www.winehq.org\nFreeType - http://www.freetype.org\nExpat - http://expat.sourceforge.net\nDJGPP - http://www.delorie.com/djgpp\nSYSLINUX - http://syslinux.zytor.com\nXbox Linux - http://www.xbox-linux.org\nMinGW - http://www.mingw.org\nBochs - http://bochs.sourceforge.net\nQEMU - http://fabrice.bellard.free.fr/qemu\nMesa3D - http://www.mesa3d.org\nFreeBSD - http://www.freebsd.org\nadns - http://adns.jgaa.com\nICU - http://www.icu-project.org/\nGraphApp - http://enchantia.com/software/graphapp/\nExt2 - http://winext2fsd.sourceforge.net/\nX - http://www.x.org/\n" END IDR_GPL RT_TEXT "COPYING" @@ -66,10 +50,13 @@ IDR_GPL RT_TEXT "COPYING" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" #include "lang/sk-SK.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/dll/win32/syssetup/wizard.c b/dll/win32/syssetup/wizard.c index db554312af0..9547493ec51 100644 --- a/dll/win32/syssetup/wizard.c +++ b/dll/win32/syssetup/wizard.c @@ -1453,7 +1453,7 @@ WriteDateTimeSettings(HWND hwndDlg, PSETUPDATA SetupData) if (0 == LoadStringW(hDllInstance, IDS_WZD_LOCALTIME, ErrorLocalTime, sizeof(ErrorLocalTime) / sizeof(ErrorLocalTime[0]))) { - wcscpy(ErrorLocalTime, L"Setup failed to set the computer name."); + wcscpy(ErrorLocalTime, L"Setup was unable to set the local time."); } MessageBoxW(hwndDlg, ErrorLocalTime, Title, MB_ICONWARNING | MB_OK); return FALSE; @@ -1469,8 +1469,6 @@ DateTimePageDlgProc(HWND hwndDlg, LPARAM lParam) { PSETUPDATA SetupData; - WCHAR Title[64]; - WCHAR ErrorLocalTime[256]; /* Retrieve pointer to the global setup data */ SetupData = (PSETUPDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); @@ -1525,23 +1523,7 @@ DateTimePageDlgProc(HWND hwndDlg, case PSN_WIZNEXT: { - GetLocalSystemTime(hwndDlg, SetupData); - SetLocalTimeZone(GetDlgItem(hwndDlg, IDC_TIMEZONELIST), - SetupData); - SetAutoDaylightInfo(GetDlgItem(hwndDlg, IDC_AUTODAYLIGHT)); - if(!SetSystemLocalTime(hwndDlg, SetupData)) - { - if (0 == LoadStringW(hDllInstance, IDS_REACTOS_SETUP, Title, sizeof(Title) / sizeof(Title[0]))) - { - wcscpy(Title, L"ReactOS Setup"); - } - if (0 == LoadStringW(hDllInstance, IDS_WZD_LOCALTIME, ErrorLocalTime, - sizeof(ErrorLocalTime) / sizeof(ErrorLocalTime[0]))) - { - wcscpy(ErrorLocalTime, L"Setup failed to set the computer name."); - } - MessageBoxW(hwndDlg, ErrorLocalTime, Title, MB_ICONWARNING | MB_OK); - } + WriteDateTimeSettings(hwndDlg, SetupData); } break; @@ -1939,7 +1921,7 @@ SetInstallationCompleted(VOID) HKEY hKey = 0; DWORD InProgress = 0; DWORD InstallDate; - + if (RegOpenKeyExW( HKEY_LOCAL_MACHINE, L"SYSTEM\\Setup", 0, @@ -1949,7 +1931,7 @@ SetInstallationCompleted(VOID) RegSetValueExW( hKey, L"SystemSetupInProgress", 0, REG_DWORD, (LPBYTE)&InProgress, sizeof(InProgress) ); RegCloseKey( hKey ); } - + if (RegOpenKeyExW( HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion", 0, @@ -2251,7 +2233,7 @@ GetRosInstallCD(WCHAR * szPath, DWORD dwPathLength) { WCHAR szBuffer[MAX_PATH]; wcscpy(szBuffer, szDrive); - wcscat(szBuffer, L"reactos\\ntoskrnl.exe"); + wcscat(szBuffer, L"reactos\\system32\\ntoskrnl.exe"); LogItem(SYSSETUP_SEVERITY_INFORMATION, szBuffer); if (FileExists(szBuffer, NULL)) { @@ -2401,7 +2383,7 @@ InstallWizard(VOID) hWnd = (HWND)PropertySheet(&psh); ShowWindow(hWnd, SW_SHOW); - while (GetMessage(&msg, NULL, 0, 0)) + while (GetMessage(&msg, NULL, 0, 0)) { if(!IsDialogMessage(hWnd, &msg)) { diff --git a/dll/win32/tapiui/lang/pl-PL.rc b/dll/win32/tapiui/lang/pl-PL.rc index 5ce9741ff9a..7ee56bf44c4 100644 --- a/dll/win32/tapiui/lang/pl-PL.rc +++ b/dll/win32/tapiui/lang/pl-PL.rc @@ -1,67 +1,68 @@ /* - * translated by Caemyr - Olaf Siejka (Jan, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * translated by Caemyr - Olaf Siejka (Jan, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT 101 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Reguy wybierania" +CAPTION "Reguły wybierania" FONT 8, "MS Shell Dlg" BEGIN ICON 201, 2000, 7, 7, 21, 20 - LTEXT "Ponisza lista pokazuje wyznaczone lokalizacje. Wybierz spord nich t z ktrej dzwonisz.", -1, 35, 7, 210, 16 + LTEXT "Poniższa lista pokazuje wyznaczone lokalizacje. Wybierz spośród nich tą z której dzwonisz.", -1, 35, 7, 210, 16 LTEXT "&Lokalizacje:", -1, 7, 35, 210, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000011D, 7, 46, 238, 105, WS_EX_CLIENTEDGE PUSHBUTTON "&Nowa", 1030, 87, 155, 50, 14 PUSHBUTTON "&Edycja", 1031, 141, 155, 50, 14 PUSHBUTTON "&Skasuj", 1032, 195, 155, 50, 14 - LTEXT "Numer telefoniczny bdzie wybierany jako:", 1052, 7, 181, 100, 8 + LTEXT "Numer telefoniczny będzie wybierany jako:", 1052, 7, 181, 100, 8 LTEXT "", 1053, 14, 195, 224, 16 END 102 DIALOGEX 0, 0, 252, 255 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN ICON 202, 2000, 7, 7, 20, 20 LTEXT "&Nazwa lokalizacji:", -1, 35, 11, 56, 8, SS_CENTERIMAGE EDITTEXT 1038, 96, 8, 149, 14, ES_AUTOHSCROLL - LTEXT "Wyznacz lokalizacj z ktrej bdziesz dzwoni.", 2001, 7, 33, 238, 8 + LTEXT "Wyznacz lokalizację z której będziesz dzwonić.", 2001, 7, 33, 238, 8 LTEXT "Kraj/®ion:", -1, 7, 49, 161, 8 COMBOBOX 1006, 7, 60, 175, 200, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL LTEXT "N&umer zamiejscowy:", -1, 190, 49, 48, 8 EDITTEXT 1034, 190, 60, 48, 12, ES_AUTOHSCROLL - GROUPBOX "Reguu wybierania", 2002, 7, 80, 238, 92 - LTEXT "Dzwonic z poniszej lokalizacji, uyj nastpujcych regu:", 2003, 14, 92, 224, 8 - LTEXT "Aby uzyska dostp do zewntrznej linii dla pocze &lokalnych, wybierz:", -1, 14, 106, 170, 8 + GROUPBOX "Regułu wybierania", 2002, 7, 80, 238, 92 + LTEXT "Dzwoniąc z poniższej lokalizacji, użyj następujących reguł:", 2003, 14, 92, 224, 8 + LTEXT "Aby uzyskać dostęp do zewnętrznej linii dla połączeń &lokalnych, wybierz:", -1, 14, 106, 170, 8 EDITTEXT 1010, 190, 104, 48, 12, ES_AUTOHSCROLL - LTEXT "Aby uzyska dostp do zewntrznej linii dla pocze &zamiejscowych, wybierz:", -1, 14, 122, 170, 8 + LTEXT "Aby uzyskać dostęp do zewnętrznej linii dla połączeń &zamiejscowych, wybierz:", -1, 14, 122, 170, 8 EDITTEXT 1011, 190, 120, 48, 12, ES_AUTOHSCROLL - LTEXT "Uyj nastpujcego &kodu dla pocze zamiejscowych:", -1, 14, 138, 170, 8 + LTEXT "Użyj następującego &kodu dla połączeń zamiejscowych:", -1, 14, 138, 170, 8 EDITTEXT 1059, 190, 136, 48, 12, ES_AUTOHSCROLL - LTEXT "Uyj nastpujcego kodu dla pocze &midzynarodowych:", -1, 14, 154, 170, 8 + LTEXT "Użyj następującego kodu dla połączeń &międzynarodowych:", -1, 14, 154, 170, 8 EDITTEXT 1060, 190, 152, 48, 12, ES_AUTOHSCROLL - AUTOCHECKBOX "Aby &wyczy oczekiwanie przy poczeniu, wybierz:", 1035, 14, 177, 170, 10 + AUTOCHECKBOX "Aby &wyłączyć oczekiwanie przy połączeniu, wybierz:", 1035, 14, 177, 170, 10 COMBOBOX 1013, 190, 176, 48, 73, CBS_DROPDOWN | CBS_SORT | WS_VSCROLL LTEXT "Wybierz numer:", -1, 14, 195, 40, 8 AUTORADIOBUTTON "&Tonowo", 1036, 58, 194, 50, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "&Cigiem impulsw", 1037, 112, 194, 50, 10, NOT WS_TABSTOP - LTEXT "Numer telefoniczny bdzie wybierany jako:", 1052, 7, 219, 100, 8 + AUTORADIOBUTTON "&Ciągiem impulsów", 1037, 112, 194, 50, 10, NOT WS_TABSTOP + LTEXT "Numer telefoniczny będzie wybierany jako:", 1052, 7, 219, 100, 8 LTEXT "", 1053, 14, 232, 224, 16 END 103 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Reguy numerw zamiejscowych" +CAPTION "Reguły numerów zamiejscowych" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Regua numerw zamiejscowych okrela, w jaki naley dzwoni z twojego obecnego rejonu do innych a take w obrbie twojego rejonu.", 2000, 7, 7, 238, 16 - LTEXT "Reguy &numerw zamiejscowych:", -1, 7, 31, 238, 8 + LTEXT "Reguła numerów zamiejscowych określa, w jaki należy dzwonić z twojego obecnego rejonu do innych a także w obrębie twojego rejonu.", 2000, 7, 7, 238, 16 + LTEXT "Reguły &numerów zamiejscowych:", -1, 7, 31, 238, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000801D, 7, 42, 238, 99, WS_EX_CLIENTEDGE PUSHBUTTON "&Nowa..", 1030, 87, 147, 50, 14 PUSHBUTTON "&Edytuj", 1031, 141, 147, 50, 14 @@ -75,7 +76,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Karta telefoniczna" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz kart telefoniczn, jak chcesz uy albo kliknij na Nowa by doda inn kart.", 2000, 7, 7, 238, 8 + LTEXT "Wybierz kartę telefoniczną, jaką chcesz użyć albo kliknij na Nowa by dodać inną kartę.", 2000, 7, 7, 238, 8 LTEXT "&Rodzaje kart:", -1, 7, 23, 238, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 34, 238, 63, WS_EX_CLIENTEDGE PUSHBUTTON "&Nowa..", 1030, 87, 103, 50, 14 @@ -85,10 +86,10 @@ BEGIN EDITTEXT 1018, 102, 125, 143, 12, ES_AUTOHSCROLL LTEXT "Numer &Identyfikacyjny (PIN):", -1, 7, 145, 91, 8 EDITTEXT 1019, 102, 143, 143, 12, ES_AUTOHSCROLL - GROUPBOX "Uyj do pocze", 2001, 7, 158, 238, 53 + GROUPBOX "Użyj do połączeń", 2001, 7, 158, 238, 53 LTEXT "Zamiejscowych:", -1, 14, 172, 84, 8 LTEXT "", 1042, 102, 172, 136, 8 - LTEXT "Midzynarodowych:", -1, 14, 184, 84, 8 + LTEXT "Międzynarodowych:", -1, 14, 184, 84, 8 LTEXT "", 1043, 102, 184, 136, 8 LTEXT "Lokalnych:", -1, 14, 196, 84, 8 LTEXT "", 1051, 102, 196, 136, 8 @@ -96,7 +97,7 @@ END 105 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Oglne" +CAPTION "Ogólne" FONT 8, "MS Shell Dlg" BEGIN ICON 203, 2000, 7, 7, 20, 20 @@ -106,8 +107,8 @@ BEGIN EDITTEXT 1018, 7, 46, 116, 14, ES_AUTOHSCROLL LTEXT "Numer &Identyfikacyjny (PIN):", -1, 7, 68, 238, 8 EDITTEXT 1019, 7, 80, 116, 14, ES_AUTOHSCROLL - LTEXT "Ta karta telefoniczna bdzie uyta, gdy:", 1056, 14, 117, 224, 8 - GROUPBOX "Informacje szczegowe o karcie", 2001, 7, 105, 238, 66 + LTEXT "Ta karta telefoniczna będzie użyta, gdy:", 1056, 14, 117, 224, 8 + GROUPBOX "Informacje szczegółowe o karcie", 2001, 7, 105, 238, 66 LTEXT "", 1000, 22, 131, 216, 8 LTEXT "", 1001, 22, 143, 216, 8 LTEXT "", 1002, 22, 155, 216, 8 @@ -118,41 +119,41 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Long Distance" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Numer dostpowy dla pocze &midzymiastowych:", -1, 7, 7, 238, 8 + LTEXT "Numer dostępowy dla połączeń &międzymiastowych:", -1, 7, 7, 238, 8 EDITTEXT 1044, 7, 18, 140, 14, ES_AUTOHSCROLL - LTEXT "Uyj przyciskw poniej by wprowadzi sekwencj wybierania pocze midzymiastowych. Pamitaj o zachowaniu dokadnie takiej kolejnoci, jaka jest podana na karcie.", 2000, 7, 40, 238, 24 + LTEXT "Użyj przycisków poniżej by wprowadzić sekwencję wybierania połączeń międzymiastowych. Pamiętaj o zachowaniu dokładnie takiej kolejności, jaka jest podana na karcie.", 2000, 7, 40, 238, 24 LTEXT "Sekwe&ncja wybierania numeru:", -1, 7, 72, 80, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "W &gr", 1022, 195, 83, 50, 14 - PUSHBUTTON "W &d", 1023, 195, 101, 50, 14 + PUSHBUTTON "W &górę", 1022, 195, 83, 50, 14 + PUSHBUTTON "W &dół", 1023, 195, 101, 50, 14 PUSHBUTTON "&Skasuj", 1024, 195, 119, 50, 14 - PUSHBUTTON "Numer d&ostpowy", 1025, 7, 161, 90, 14 + PUSHBUTTON "Numer d&ostępowy", 1025, 7, 161, 90, 14 PUSHBUTTON "Numer &konta", 1018, 101, 161, 90, 14 PUSHBUTTON "&PIN", 1019, 7, 179, 90, 14 PUSHBUTTON "Numer &telefoniczny", 1020, 101, 179, 90, 14 PUSHBUTTON "&Czekaj na wpisanie", 1017, 7, 197, 90, 14 - PUSHBUTTON "Ok&rel cyfry", 1021, 101, 197, 90, 14 + PUSHBUTTON "Ok&reśl cyfry", 1021, 101, 197, 90, 14 END 107 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Midzynarodowe" +CAPTION "Międzynarodowe" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Numer dostpowy dla pocze &midzynarodowych:", -1, 7, 7, 238, 8 + LTEXT "Numer dostępowy dla połączeń &międzynarodowych:", -1, 7, 7, 238, 8 EDITTEXT 1045, 7, 18, 140, 14, ES_AUTOHSCROLL - LTEXT "Uyj przyciskw poniej by wprowadzi sekwencj wybierania pocze midzynarodowych. Pamitaj o zachowaniu dokadnie takiej kolejnoci, jaka jest podana na karcie.", 2000, 7, 40, 244, 24 + LTEXT "Użyj przycisków poniżej by wprowadzić sekwencję wybierania połączeń międzynarodowych. Pamiętaj o zachowaniu dokładnie takiej kolejności, jaka jest podana na karcie.", 2000, 7, 40, 244, 24 LTEXT "Sekwe&ncja wybierania numeru:", -1, 7, 72, 80, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "W &gr", 1022, 195, 83, 50, 14 - PUSHBUTTON "W &d", 1023, 195, 101, 50, 14 + PUSHBUTTON "W &górę", 1022, 195, 83, 50, 14 + PUSHBUTTON "W &dół", 1023, 195, 101, 50, 14 PUSHBUTTON "&Skasuj", 1024, 195, 119, 50, 14 - PUSHBUTTON "Numer d&ostpowy", 1025, 7, 161, 90, 14 + PUSHBUTTON "Numer d&ostępowy", 1025, 7, 161, 90, 14 PUSHBUTTON "Numer &konta", 1018, 101, 161, 90, 14 PUSHBUTTON "&PIN", 1019, 7, 179, 90, 14 PUSHBUTTON "Numer &telefoniczny", 1020, 101, 179, 90, 14 PUSHBUTTON "&Czekaj na wpisanie", 1017, 7, 197, 90, 14 - PUSHBUTTON "&Okrel cyfry", 1021, 101, 197, 90, 14 + PUSHBUTTON "&Określ cyfry", 1021, 101, 197, 90, 14 END 108 DIALOGEX 0, 0, 252, 218 @@ -160,43 +161,43 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION CAPTION "Lokalne" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Numer dostpowy dla pocze &lokalnych:", -1, 7, 7, 238, 8 + LTEXT "Numer dostępowy dla połączeń &lokalnych:", -1, 7, 7, 238, 8 EDITTEXT 1008, 7, 18, 140, 14, ES_AUTOHSCROLL - LTEXT "Uyj przyciskw poniej by wprowadzi sekwencj wybierania pocze midzynarodowych. Pamitaj o zachowaniu dokadnie takiej kolejnoci, jaka jest podana na karcie. Aby dzwoni z pominiciem karty, zostaw to pole puste.", 2000, 7, 40, 238, 24 + LTEXT "Użyj przycisków poniżej by wprowadzić sekwencję wybierania połączeń międzynarodowych. Pamiętaj o zachowaniu dokładnie takiej kolejności, jaka jest podana na karcie. Aby dzwonić z pominięciem karty, zostaw to pole puste.", 2000, 7, 40, 238, 24 LTEXT "Sekwe&ncja wybierania numeru:", -1, 7, 72, 238, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "W &gr", 1022, 195, 83, 50, 14 - PUSHBUTTON "W &d", 1023, 195, 101, 50, 14 + PUSHBUTTON "W &górę", 1022, 195, 83, 50, 14 + PUSHBUTTON "W &dół", 1023, 195, 101, 50, 14 PUSHBUTTON "&Skasuj", 1024, 195, 119, 50, 14 - PUSHBUTTON "Numer d&ostpowy", 1025, 7, 161, 90, 14 + PUSHBUTTON "Numer d&ostępowy", 1025, 7, 161, 90, 14 PUSHBUTTON "Numer &konta", 1018, 101, 161, 90, 14 PUSHBUTTON "&PIN", 1019, 7, 179, 90, 14 PUSHBUTTON "Numer &telefoniczny", 1020, 101, 179, 90, 14 PUSHBUTTON "&Czekaj na wpisanie", 1017, 7, 197, 90, 14 - PUSHBUTTON "&Okrel cyfry", 1021, 101, 197, 90, 14 + PUSHBUTTON "&Określ cyfry", 1021, 101, 197, 90, 14 END 109 DIALOGEX 0, 0, 252, 257 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION "Nowa regua numeru zamiejscowego" +CAPTION "Nowa reguła numeru zamiejscowego" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Ta regua numeru zamiejscowego zostanie uyta tylko dla pocze o podanej poniej kombinacji numeru zamiejscowego i prefiksu.", 2000, 7, 6, 238, 16 + LTEXT "Ta reguła numeru zamiejscowego zostanie użyta tylko dla połączeń o podanej poniżej kombinacji numeru zamiejscowego i prefiksu.", 2000, 7, 6, 238, 16 LTEXT "Numer zamiejscowy na jaki dzwonisz:", -1, 7, 31, 110, 8 LTEXT "&Numer zamiejscowy:", -1, 7, 47, 36, 8 EDITTEXT 1034, 46, 44, 50, 14, ES_AUTOHSCROLL - LTEXT "Podaj prefiks jaki ma by uyty z t regu numeru zamiejscowego.", -1, 14, 78, 224, 8 - AUTORADIOBUTTON "&Zacz wszystkie prefiksy z tego numeru zamiejscowego", 1014, 14, 90, 224, 12, NOT WS_TABSTOP - AUTORADIOBUTTON "Z&acz tylko prefiksy z listy poniej:", 1015, 14, 104, 224, 12, NOT WS_TABSTOP - LTEXT "&Prefiksy do zaczenia", 1057, 26, 117, 119, 8 + LTEXT "Podaj prefiks jaki ma być użyty z tą regułą numeru zamiejscowego.", -1, 14, 78, 224, 8 + AUTORADIOBUTTON "&Załącz wszystkie prefiksy z tego numeru zamiejscowego", 1014, 14, 90, 224, 12, NOT WS_TABSTOP + AUTORADIOBUTTON "Z&ałącz tylko prefiksy z listy poniżej:", 1015, 14, 104, 224, 12, NOT WS_TABSTOP + LTEXT "&Prefiksy do załączenia", 1057, 26, 117, 119, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000411D, 25, 128, 66, 32, WS_EX_CLIENTEDGE PUSHBUTTON "&Dodaj", 1005, 95, 128, 50, 14 PUSHBUTTON "&Skasuj", 1024, 95, 146, 50, 14 - LTEXT "Podczas wybierania numerw, ktre zawieraj powysze prefiksy:", -1, 14, 184, 224, 8 + LTEXT "Podczas wybierania numerów, które zawierają powyższe prefiksy:", -1, 14, 184, 224, 8 AUTOCHECKBOX "&Wybierz:", 1012, 14, 198, 30, 12 EDITTEXT 1007, 46, 196, 42, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "Docz numer zamiejscowy", 1029, 14, 214, 85, 12 + AUTOCHECKBOX "Dołącz numer zamiejscowy", 1029, 14, 214, 85, 12 DEFPUSHBUTTON "OK", 1, 141, 236, 50, 14 PUSHBUTTON "Anuluj", 2, 195, 236, 50, 14 RTEXT "Numer zamiejscowy", 2001, 133, 31, 51, 8 @@ -205,7 +206,7 @@ BEGIN CONTROL "", 2004, "STATIC", SS_BLACKFRAME | SS_SUNKEN, 203, 41, 1, 6 RTEXT "X - X X X - X X X - X X X X", 2005, 133, 48, 112, 8 GROUPBOX "Prefiksy", -1, 7, 64, 238, 102 - GROUPBOX "Reguy", -1, 7, 170, 238, 60 + GROUPBOX "Reguły", -1, 7, 170, 238, 60 END 110 DIALOGEX 0, 0, 227, 82 @@ -226,10 +227,10 @@ EXSTYLE WS_EX_CONTEXTHELP CAPTION "Oczekuj" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz rodzaj znaku zachty na oczekiwanie przed rozpoczciem sekwencji wybierania.", 2000, 7, 7, 238, 16 + LTEXT "Wybierz rodzaj znaku zachęty na oczekiwanie przed rozpoczęciem sekwencji wybierania.", 2000, 7, 7, 238, 16 AUTORADIOBUTTON "Czekaj na &ton wybierania", 1009, 7, 31, 238, 10, WS_GROUP - AUTORADIOBUTTON "Czekaj na wiadomo &gosow", 1016, 7, 47, 238, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "Czekaj przez okrelony czas:", 1048, 7, 63, 238, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Czekaj na wiadomość &głosową", 1016, 7, 47, 238, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Czekaj przez określony czas:", 1048, 7, 63, 238, 10, NOT WS_TABSTOP EDITTEXT 1050, 18, 77, 36, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "Spin1", 1049, "msctls_updown32", 0x00000036, 42, 78, 11, 14 LTEXT "&sekund", -1, 58, 81, 187, 8 @@ -243,9 +244,9 @@ EXSTYLE WS_EX_CONTEXTHELP CAPTION "Numer docelowy" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "W tym kroku trzeba poda numer docelowy, ktry bdzie wybierany przy uyciu karty telefonicznej. Wybierz czci numeru ktre maj zosta wybrane automagicznie:", 2000, 7, 7, 238, 24 - AUTOCHECKBOX "Wybieraj numer &midzynarodowy", 1027, 7, 39, 238, 10 - AUTOCHECKBOX "Wybieraj numer mi&dzymiastowy", 1034, 7, 55, 238, 10 + LTEXT "W tym kroku trzeba podać numer docelowy, który będzie wybierany przy użyciu karty telefonicznej. Wybierz części numeru które mają zostać wybrane automagicznie:", 2000, 7, 7, 238, 24 + AUTOCHECKBOX "Wybieraj numer &międzynarodowy", 1027, 7, 39, 238, 10 + AUTOCHECKBOX "Wybieraj numer mię&dzymiastowy", 1034, 7, 55, 238, 10 AUTOCHECKBOX "Wybieraj numer &telefoniczny", 1008, 7, 71, 238, 10, WS_DISABLED DEFPUSHBUTTON "OK", 1, 141, 92, 50, 14 PUSHBUTTON "Anuluj", 2, 195, 92, 50, 14 @@ -257,11 +258,11 @@ CAPTION "Zaawansowane" FONT 8, "MS Shell Dlg" BEGIN ICON 201, 2000, 7, 7, 20, 20 - LTEXT "Nastpujcy providerzy usug telefonicznych s zainstalowani na tym komputerze:", -1, 40, 7, 205, 8 + LTEXT "Następujący providerzy usług telefonicznych są zainstalowani na tym komputerze:", -1, 40, 7, 205, 8 LTEXT "&Providerzy:", -1, 7, 35, 238, 8 LISTBOX 1033, 7, 46, 238, 147, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | WS_TABSTOP PUSHBUTTON "&Dodaj...", 1005, 87, 197, 50, 14 - PUSHBUTTON "&Usu....", 1024, 141, 197, 50, 14 + PUSHBUTTON "&Usuń....", 1024, 141, 197, 50, 14 PUSHBUTTON "&Konfiguruj", 1031, 195, 197, 50, 14 END @@ -270,8 +271,8 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBL CAPTION "Dodaj Providera" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Wybierz providera, ktrego chciaby zainstalowa, z listy poniej, i nacinij Dodaj.", 2000, 7, 7, 241, 8 - LTEXT "&Providerzy usug telefonicznych:", -1, 7, 23, 144, 10 + LTEXT "Wybierz providera, którego chciałbyś zainstalować, z listy poniżej, i naciśnij Dodaj.", 2000, 7, 7, 241, 8 + LTEXT "&Providerzy usług telefonicznych:", -1, 7, 23, 144, 10 LISTBOX 1055, 7, 34, 238, 74, LBS_STANDARD | WS_TABSTOP PUSHBUTTON "&Dodaj", 1005, 141, 106, 50, 14 DEFPUSHBUTTON "Anuluj", 2, 195, 106, 50, 14 @@ -284,18 +285,18 @@ CAPTION "Informacje o lokalizacji" FONT 8, "MS Shell Dlg" BEGIN CONTROL 302, 302, "STATIC", SS_BITMAP, 10, 10, 88, 155 - LTEXT "Zanim bdziesz mg dokona jakichkolwiek pocze telefonicznych albo modemowych, ReactOS porzebuje nastpujcych informacji o twojej obecnej lokalizacji.", 2000, 107, 15, 188, 25 + LTEXT "Zanim będziesz mógł dokonać jakichkolwiek połączeń telefonicznych albo modemowych, ReactOS porzebuje następujących informacji o twojej obecnej lokalizacji.", 2000, 107, 15, 188, 25 LTEXT "&Kraj/Region", -1, 107, 43, 189, 10 COMBOBOX 1006, 107, 55, 180, 200, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT "Numer &midzymiastowy", -1, 107, 74, 189, 10 + LTEXT "Numer &międzymiastowy", -1, 107, 74, 189, 10 EDITTEXT 1034, 107, 87, 45, 12, ES_AUTOHSCROLL - LTEXT "Kod &nonej (o ile potrzebny)", -1, 107, 105, 189, 10 + LTEXT "Kod &nośnej (o ile potrzebny)", -1, 107, 105, 189, 10 EDITTEXT 1058, 106, 118, 45, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT "Numer do &linii zewntrznej", -1, 107, 137, 189, 10 + LTEXT "Numer do &linii zewnętrznej", -1, 107, 137, 189, 10 EDITTEXT 1010, 107, 149, 45, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT "System telefoniczny uywa:", -1, 107, 168, 189, 10 + LTEXT "System telefoniczny używa:", -1, 107, 168, 189, 10 AUTORADIOBUTTON "Wybierania &Tonowego", 1036, 107, 178, 57, 14, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "Wybierania &Cigiem Impulsw", 1037, 175, 178, 57, 14, NOT WS_TABSTOP + AUTORADIOBUTTON "Wybierania &Ciągiem Impulsów", 1037, 175, 178, 57, 14, NOT WS_TABSTOP DEFPUSHBUTTON "OK", 1, 192, 204, 50, 14 PUSHBUTTON "Anuluj", 2, 246, 204, 50, 14 END @@ -305,21 +306,21 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN CONTROL 302, 302, "STATIC", SS_BITMAP, 0, 0, 88, 155 - LTEXT "Zanim bdziesz mg dokona jakichkolwiek pocze telefonicznych albo modemowych, ReactOS porzebuje nastpujcych informacji o twojej obecnej lokalizacji.", 2000, 95, 2, 188, 25 + LTEXT "Zanim będziesz mógł dokonać jakichkolwiek połączeń telefonicznych albo modemowych, ReactOS porzebuje następujących informacji o twojej obecnej lokalizacji.", 2000, 95, 2, 188, 25 LTEXT "&What country/region are you in now?", -1, 95, 30, 188, 10 COMBOBOX 1006, 95, 41, 177, 68, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT "Numer &midzymiastowy", -1, 95, 61, 188, 10 + LTEXT "Numer &międzymiastowy", -1, 95, 61, 188, 10 EDITTEXT 1034, 95, 73, 40, 14, ES_AUTOHSCROLL - LTEXT "Numer do &linii zewntrznej", -1, 95, 96, 188, 10 + LTEXT "Numer do &linii zewnętrznej", -1, 95, 96, 188, 10 EDITTEXT 1010, 95, 107, 40, 14, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT "System telefoniczny uywa:", -1, 95, 129, 159, 10 + LTEXT "System telefoniczny używa:", -1, 95, 129, 159, 10 AUTORADIOBUTTON "Wybierania &Tonowego", 1036, 95, 139, 55, 12, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "Wybierania &Cigiem Impulsw", 1037, 155, 139, 55, 12, NOT WS_TABSTOP + AUTORADIOBUTTON "Wybierania &Ciągiem Impulsów", 1037, 155, 139, 55, 12, NOT WS_TABSTOP END 500 DIALOGEX 0, 0, 235, 88 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION "Explorer ReactOS" +CAPTION "Explorator ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 504, 501, 13, 14, 21, 20 @@ -332,111 +333,111 @@ END STRINGTABLE BEGIN 1 "Opcje telefonu i modemu" - 2 "Ustawienia regu wybierania i waciwoci twojego modemu." + 2 "Ustawienia reguł wybierania i właściwości twojego modemu." 3 "Lokalizacja" - 4 "Aby utworzy now lokalizacj, nacinij Nowa." + 4 "Aby utworzyć nową lokalizację, naciśnij Nowa." 5 "Nowa Lokalizacja" - 6 "Edytuj Lokalizacj" + 6 "Edytuj Lokalizację" 7 "Nowa Karta Telefoniczna" - 8 "Edytuj Kart Telefoniczn" + 8 "Edytuj Kartę Telefoniczną" 9 "Numer zamiejscowy" 10 "Prefiksy" - 11 "Reguy" - 12 "Wprowadzony znak jest nieprawidowy.\n\nPrawidowe znaki to te od 0 do 9, *, # i przecinek." - 13 "Wprowadzony znak jest nieprawidowy.\n\nPrawidowe znaki to te od 0 do 9, *, #, spacja i przecinek." - 14 "Wprowadzony znak jest nieprawidowy.\n\nPrawidowe znaki to te od 0 do 9." - 15 "Wprowadzony znak jest nieprawidowy." + 11 "Reguły" + 12 "Wprowadzony znak jest nieprawidłowy.\n\nPrawidłowe znaki to te od 0 do 9, *, # i przecinek." + 13 "Wprowadzony znak jest nieprawidłowy.\n\nPrawidłowe znaki to te od 0 do 9, *, #, spacja i przecinek." + 14 "Wprowadzony znak jest nieprawidłowy.\n\nPrawidłowe znaki to te od 0 do 9." + 15 "Wprowadzony znak jest nieprawidłowy." 16 "Wybieraj %1" 17 "Wybieraj %1 i numer zamiejscowy" 18 "Wybieraj numer zamiejscowy" 19 "Wybieraj tylko numer telefoniczny" 20 "Wszystkie" 21 "Wybrane" - 22 "Edytuj Regu numerw zamiejscowych" - 23 "Wybierz regu z listy powyej aby przejrze jej opis, albo nacinij Nowa aby doda regu." - 24 "Wybieraj '%2' z numerem midzymiastowym przed numerem telefonicznym, dla wszystkich pocze w obszarze %1." - 25 "Wybieraj '%2' przed numerem telefonicznym, dla wszystkich pocze w obszarze %1." - 26 "Wybieraj numer midzymiastowy przed numerem telefonicznym, dla wszystkich pocze w obszarze %1." - 27 "Wybieraj tylko numer telefoniczny, dla wszystkich pocze w obszarze %1." - 28 "Wybieraj '%2' z numerem midzymiastowym przed numerem telefonicznym, dla wszystkich pocze w obszarze %1, zawierajcych wyznaczone prefiksy." - 29 "Wybieraj '%2' przed numerem telefonicznym, dla wszystkich pocze w obszarze %1, zawierajcych wyznaczone prefiksy." - 30 "Wybieraj numer midzymiastowy przed numerem telefonicznym, dla wszystkich pocze w obszarze %1, zawierajcych wyznaczone prefiksy." - 31 "Wybieraj tylko numer telefoniczny, dla wszystkich pocze w obszarze %1, zawierajcych wyznaczone prefiksy." - 32 "Wybieraj '1' przed poczeniami ze wszystkimi numerami midzymiastowymi i docz numer midzymiastowy przy wszystkich prefiksach." + 22 "Edytuj Regułę numerów zamiejscowych" + 23 "Wybierz regułę z listy powyżej aby przejrzeć jej opis, albo naciśnij Nowa aby dodać regułę." + 24 "Wybieraj '%2' z numerem międzymiastowym przed numerem telefonicznym, dla wszystkich połączeń w obszarze %1." + 25 "Wybieraj '%2' przed numerem telefonicznym, dla wszystkich połączeń w obszarze %1." + 26 "Wybieraj numer międzymiastowy przed numerem telefonicznym, dla wszystkich połączeń w obszarze %1." + 27 "Wybieraj tylko numer telefoniczny, dla wszystkich połączeń w obszarze %1." + 28 "Wybieraj '%2' z numerem międzymiastowym przed numerem telefonicznym, dla wszystkich połączeń w obszarze %1, zawierających wyznaczone prefiksy." + 29 "Wybieraj '%2' przed numerem telefonicznym, dla wszystkich połączeń w obszarze %1, zawierających wyznaczone prefiksy." + 30 "Wybieraj numer międzymiastowy przed numerem telefonicznym, dla wszystkich połączeń w obszarze %1, zawierających wyznaczone prefiksy." + 31 "Wybieraj tylko numer telefoniczny, dla wszystkich połączeń w obszarze %1, zawierających wyznaczone prefiksy." + 32 "Wybieraj '1' przed połączeniami ze wszystkimi numerami międzymiastowymi i dołącz numer międzymiastowy przy wszystkich prefiksach." 33 "Dodaj Prefiks" - 34 "Wprowad jeden lub wicej prefiksw, rozdzielajc je spacjami lub przecinkami." + 34 "Wprowadź jeden lub więcej prefiksów, rozdzielając je spacjami lub przecinkami." 35 "Wyznacz cyfry" - 36 "Wprowad jedn lub wicej cyfr (wczajc * i #) do wybierania." - 37 "Wprowadzie nieprawidowy znak.\n\nPrawidowymi znakami s liczby od 0 do 9 i spacja." - 38 "Czekaj przez %1!d! sekund()." - 39 "Wybierz numer dostpowy." + 36 "Wprowadź jedną lub więcej cyfr (włączając * i #) do wybierania." + 37 "Wprowadziłeś nieprawidłowy znak.\n\nPrawidłowymi znakami są liczby od 0 do 9 i spacja." + 38 "Czekaj przez %1!d! sekund(ę)." + 39 "Wybierz numer dostępowy." 40 "Wybierz numer konta." 41 "Wybierz numer PIN." - 42 "Czekaj na sygna wybierania." - 43 "Czekaj na koniec wiadomoci gosowej." - 44 "Wybieraj numer midzynarodowy, midzymiastowy i telefoniczny." - 45 "Wybieraj numer midzynarodowy i telefoniczny." - 46 "Wybieraj numer midzymiastowy i telefoniczny." - 47 "Wybieraj numer midzynarodowy." - 48 "Wybieraj numer midzymiastowy." + 42 "Czekaj na sygnał wybierania." + 43 "Czekaj na koniec wiadomości głosowej." + 44 "Wybieraj numer międzynarodowy, międzymiastowy i telefoniczny." + 45 "Wybieraj numer międzynarodowy i telefoniczny." + 46 "Wybieraj numer międzymiastowy i telefoniczny." + 47 "Wybieraj numer międzynarodowy." + 48 "Wybieraj numer międzymiastowy." 49 "Wybieraj numer telefoniczny." 50 "wybieranie numeru zamiejscowego." 51 "wybieranie numeru zagranicznego." 52 "wybieranie numeru lokalnego." - 53 "Nie ma zdefiniowanych regu do uycia tej karty telefonicznej." - 54 "Musisz wprowadzi kod operatora midzymiastowego dla tej lokalizacji." - 55 "Musisz wprowadzi nazw dla tej lokalizacji." - 56 "Musisz wprowadzi numer midzymiastowy dla tej lokalizacji." - 57 "Musisz wybra kod do usunicia oczekiwania na wybieranie." - 58 "Musisz wybra kraj lub region, z ktrego dzwonisz." - 59 "Brakujce informacje" - 60 "Wprowadzona nazwa lokalizacji jest ju uyta. Prosz wprowadzi nazw unikaln." - 61 "Brak potrzebnych dla tej karty informacji. Aby jej uy, nacinij Edytuj aby wprowadzi potrzebne informacje, albo wybierz inn kart." - 62 "Musisz wybra domyln kart telefoniczn. Wybierz kart z listy, albo kliknij na Nowa aby wprowadzi now kart." - 63 "Musisz wprowadzi nazw karty telefonicznej." - 64 "Musisz wprowadzi numer konta." - 65 "Musisz wprowadzi numer PIN." - 66 "Nie ma zdefiniowanych regu dla tej karty telefonicznej. Aby stworzy regu, wybierz zakadk Zamiejscowe, Midzynarodowe lub Lokalne." - 67 "Twoja regua Rozmowy Zamiejscowej wymaga podania numeru dostpowego z twojej karty, do rozmw zamiejscowych." - 68 "Twoja regua Rozmowy Midzynarodowej wymaga podania numeru dostpowego z twojej karty, do rozmw midzynarodowych." - 69 "Twoja regua Rozmowy Lokalnej wymaga podania numeru dostpowego z twojej karty, do rozmw lokalnych." + 53 "Nie ma zdefiniowanych reguł do użycia tej karty telefonicznej." + 54 "Musisz wprowadzić kod operatora międzymiastowego dla tej lokalizacji." + 55 "Musisz wprowadzić nazwę dla tej lokalizacji." + 56 "Musisz wprowadzić numer międzymiastowy dla tej lokalizacji." + 57 "Musisz wybrać kod do usunięcia oczekiwania na wybieranie." + 58 "Musisz wybrać kraj lub region, z którego dzwonisz." + 59 "Brakujące informacje" + 60 "Wprowadzona nazwa lokalizacji jest już użyta. Proszę wprowadzić nazwę unikalną." + 61 "Brak potrzebnych dla tej karty informacji. Aby jej użyć, naciśnij Edytuj aby wprowadzić potrzebne informacje, albo wybierz inną kartę." + 62 "Musisz wybrać domyślną kartę telefoniczną. Wybierz kartę z listy, albo kliknij na Nowa aby wprowadzić nową kartę." + 63 "Musisz wprowadzić nazwę karty telefonicznej." + 64 "Musisz wprowadzić numer konta." + 65 "Musisz wprowadzić numer PIN." + 66 "Nie ma zdefiniowanych reguł dla tej karty telefonicznej. Aby stworzyć regułę, wybierz zakładkę Zamiejscowe, Międzynarodowe lub Lokalne." + 67 "Twoja reguła Rozmowy Zamiejscowej wymaga podania numeru dostępowego z twojej karty, do rozmów zamiejscowych." + 68 "Twoja reguła Rozmowy Międzynarodowej wymaga podania numeru dostępowego z twojej karty, do rozmów międzynarodowych." + 69 "Twoja reguła Rozmowy Lokalnej wymaga podania numeru dostępowego z twojej karty, do rozmów lokalnych." 70 "Brak" - 71 "Czy jeste pewien, e chcesz usun wybranego Providera Usug Telefonicznych?" - 72 "" - 73 "Musisz wprowadzi prefiksy, do ktrych odnosi si ta regua." + 71 "Czy jesteś pewien, że chcesz usunąć wybranego Providera Usług Telefonicznych?" + 72 "" + 73 "Musisz wprowadzić prefiksy, do których odnosi się ta reguła." 74 "&Cyfry:" 75 "&Prefiksy:" - 76 "Wprowadzie nieprawidowy znak.\n\nPrawidowymi znakami s liczby od 0 do 9, spacja i przecinek." - 77 "Potwierd skasowanie" - 78 "Czy na pewno chcesz skasowa t lokalizacj?" - 79 "Czy na pewno chcesz skasowa t kart telefoniczn?" - 80 "Czy na pewno chcesz skasowa t regu numeru midzymiastowego?" - 81 "Musisz wprowadzi cyfry do wybierania." - 82 "Podana nazwa karty telefonicznej jest ju uyta. Prosz wprowadzi nazw unikaln." - 83 "ReactOS potrzebuje informacji o lokalizacji z ktrej bdziesz dzwoni. Jeeli anulujesz, bez podania tych informacji, ten program moe nie dziaa poprawnie podczas wybierania. W dodatku niektre aplikacje ponownie wywoaj to okno po naciniciu Anuluj\nCzy na pewno chcesz anulowa?" - 84 "Potwierd Anulowanie" + 76 "Wprowadziłeś nieprawidłowy znak.\n\nPrawidłowymi znakami są liczby od 0 do 9, spacja i przecinek." + 77 "Potwierdź skasowanie" + 78 "Czy na pewno chcesz skasować tą lokalizację?" + 79 "Czy na pewno chcesz skasować tą kartę telefoniczną?" + 80 "Czy na pewno chcesz skasować tę regułę numeru międzymiastowego?" + 81 "Musisz wprowadzić cyfry do wybierania." + 82 "Podana nazwa karty telefonicznej jest już użyta. Proszę wprowadzić nazwę unikalną." + 83 "ReactOS potrzebuje informacji o lokalizacji z której będziesz dzwonić. Jeżeli anulujesz, bez podania tych informacji, ten program może nie działać poprawnie podczas wybierania. W dodatku niektóre aplikacje ponownie wywołają to okno po naciśnięciu Anuluj\nCzy na pewno chcesz anulować?" + 84 "Potwierdź Anulowanie" 85 "Moja Lokalizacja" - 86 "" - 87 "Wprowadzie nieprawidowy znak.\n\nPrawidowymi znakami s liczby od 0 do 9, litery od A do D, *, #, +, !, spacja i przecinek." - 88 "Musisz wprowadzi kod operatora midzynarodowego dla tej lokalizacji." - 89 "Musisz wprowadzi kod operatora dla tej lokalizacji." - 90 "Te okno prbuje utworzy albo monitorowa poczenie telefoniczne albo podobne, na twoim komputerze.\nCzy chcesz kontynuowa?" - 91 "Te okno prbuje uzyska dostp do informacji o poczeniach w twojej sieci.\nCzy chcesz kontynuowa?" - 92 "Te okno prbuje uzyska dostp do albo zmieni informacje o konferencjach w sieci.\nCzy chcesz kontynuowa?" - 93 "Te okno prbuje uzyska dostp do albo zmieni ustawienia w rejestrze.\nCzy chcesz kontynuowa?" - 1064 "Aplet Telefon i Modem w Panelu Sterowania nie moe by otwarty. Moesz mie problem z uruchomieniem usugi Telefon." - 1065 "Usu Providera" + 86 "" + 87 "Wprowadziłeś nieprawidłowy znak.\n\nPrawidłowymi znakami są liczby od 0 do 9, litery od A do D, *, #, +, !, spacja i przecinek." + 88 "Musisz wprowadzić kod operatora międzynarodowego dla tej lokalizacji." + 89 "Musisz wprowadzić kod operatora dla tej lokalizacji." + 90 "Te okno próbuje utworzyć albo monitorować połączenie telefoniczne albo podobne, na twoim komputerze.\nCzy chcesz kontynuować?" + 91 "Te okno próbuje uzyskać dostęp do informacji o połączeniach w twojej sieci.\nCzy chcesz kontynuować?" + 92 "Te okno próbuje uzyskać dostęp do albo zmienić informacje o konferencjach w sieci.\nCzy chcesz kontynuować?" + 93 "Te okno próbuje uzyskać dostęp do albo zmienić ustawienia w rejestrze.\nCzy chcesz kontynuować?" + 1064 "Aplet Telefon i Modem w Panelu Sterowania nie może być otwarty. Możesz mieć problem z uruchomieniem usługi Telefon." + 1065 "Usuń Providera" 15800 "23" - 15801 "0,""Brak (wybiernie bezporednie)"","""","""","""","""","""","""","""","""",1" - 15802 "1,""AT&T wybieranie bezporednie przez 1010ATT1"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010288"",""1010288"",1" + 15801 "0,""Brak (wybiernie bezpośrednie)"","""","""","""","""","""","""","""","""",1" + 15802 "1,""AT&T wybieranie bezpośrednie przez 1010ATT1"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010288"",""1010288"",1" 15803 "2,""AT&T przez 1010ATT0"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010288"",""1010288"",1" 15804 "3,""AT&T przez 1-800-321-0288"","""",""G"",""J$TFG$TH"",""J$T01EFG$TH"","""","""",""18003210288"",""18003210288"",1" - 15805 "4,""MCI wybieranie bezporednie przez 10102221"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010222"",""1010222"",1" + 15805 "4,""MCI wybieranie bezpośrednie przez 10102221"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010222"",""1010222"",1" 15806 "5,""MCI przez 10102220"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010222"",""1010222"",1" 15807 "6,""MCI przez 1-800-888-8000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18008888000"",""18008888000"",1" 15808 "7,""MCI przez 1-800-674-0700"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006740700"",""18006740700"",1" 15809 "8,""MCI przez 1-800-674-7000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006747000"",""18006747000"",1" - 15810 "9,""US Sprint wybieranie bezporednie przez 10103331"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010333"",""1010333"",1" + 15810 "9,""US Sprint wybieranie bezpośrednie przez 10103331"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010333"",""1010333"",1" 15811 "10,""US Sprint przez 10103330"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010333"",""1010333"",1" 15812 "11,""US Sprint przez 1-800-877-8000"","""",""G"",""J,,,T0FG,,H"",""J,,,T01EFG#,H"","""","""",""18008778000"",""18008778000"",1" 15813 "12,""Karta Telefoniczna przez 0"","""",""G"",""0FG$TH"",""01EFG$TH"","""","""","""","""",1" @@ -446,7 +447,7 @@ BEGIN 15817 "16,""CLEAR Communications (New Zealand)"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,00EFG"","""",""0502333"",""0502333"",""0502333"",1" 15818 "17,""Telecom New Zealand"","""",""J,0FG?H"",""J,0FG?H"",""J,00EFG?H"","""",""012"",""012"",""012"",1" 15819 "18,""Karta Global (Taiwan do USA)"","""",""G"",""0FG"",""J,102880$TFG$H"","""","""","""",""0080"",1" - 15820 "19,""Telstra (Australia) przez 1818 (gos)"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0011EFG#"","""",""1818"",""1818"",""1818"",1" + 15820 "19,""Telstra (Australia) przez 1818 (głos)"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0011EFG#"","""",""1818"",""1818"",""1818"",1" 15821 "20,""Telstra (Australia) przez 1818 (faks)"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0015EFG#"","""",""1818"",""1818"",""1818"",1" 15822 "21,""Optus (Australia) przez 1812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""1812"",1" 15823 "22,""Optus (Australia) przez 008551812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""008551812"",1" diff --git a/dll/win32/tapiui/lang/ru-RU.rc b/dll/win32/tapiui/lang/ru-RU.rc index 6d29dd4bbf5..9ac5f8f93b9 100644 --- a/dll/win32/tapiui/lang/ru-RU.rc +++ b/dll/win32/tapiui/lang/ru-RU.rc @@ -2,105 +2,105 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 101 DIALOGEX 0, 0, 252, 226 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Набор номера" FONT 8, "MS Shell Dlg" BEGIN ICON 201, 2000, 7, 7, 21, 20 - LTEXT "&:", -1, 7, 43, 210, 8 - LTEXT " . , .", -1, 35, 12, 210, 24 + LTEXT "&Размещение:", -1, 7, 43, 210, 8 + LTEXT "В списке содержатся указанные местоположения. Выберите место, из которого производится набор номера.", -1, 35, 12, 210, 24 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000011D, 7, 54, 238, 105, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1030, 87, 163, 50, 14 - PUSHBUTTON "&...", 1031, 141, 163, 50, 14 - PUSHBUTTON "&", 1032, 195, 163, 50, 14 - LTEXT " :", 1052, 7, 189, 121, 8 + PUSHBUTTON "&Создать...", 1030, 87, 163, 50, 14 + PUSHBUTTON "&Изменить...", 1031, 141, 163, 50, 14 + PUSHBUTTON "&Удалить", 1032, 195, 163, 50, 14 + LTEXT "Номер телефона будет набран как:", 1052, 7, 189, 121, 8 LTEXT "", 1053, 14, 203, 224, 16 END 102 DIALOGEX 0, 0, 252, 255 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN ICON 202, 2000, 7, 7, 21, 20 - LTEXT "& :", -1, 35, 12, 79, 8, SS_CENTERIMAGE + LTEXT "&Имя местоположения:", -1, 35, 12, 79, 8, SS_CENTERIMAGE EDITTEXT 1038, 118, 9, 127, 14, ES_AUTOHSCROLL - LTEXT " , .", 2001, 7, 35, 238, 8 - LTEXT "& :", -1, 7, 49, 161, 8 + LTEXT "Выберите место, из которого производится набор номера.", 2001, 7, 35, 238, 8 + LTEXT "&Страна или регион:", -1, 7, 49, 161, 8 COMBOBOX 1006, 7, 60, 175, 152, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT " &:", -1, 190, 49, 48, 8 + LTEXT "Код &города:", -1, 190, 49, 48, 8 EDITTEXT 1034, 190, 60, 48, 12, ES_AUTOHSCROLL - GROUPBOX "", 2002, 7, 80, 238, 92 - LTEXT " :", 2003, 14, 92, 224, 8 - LTEXT " - & , :", -1, 14, 106, 174, 8 + GROUPBOX "Правила", 2002, 7, 80, 238, 92 + LTEXT "При наборе номера из этого места:", 2003, 14, 92, 224, 8 + LTEXT " - для доступа &к внешней местной линии, набирать:", -1, 14, 106, 174, 8 EDITTEXT 1010, 190, 104, 48, 12, ES_AUTOHSCROLL - LTEXT " - & :", -1, 14, 122, 170, 8 + LTEXT " - а для доступа к внешней ме&ждународной линии:", -1, 14, 122, 170, 8 EDITTEXT 1011, 190, 120, 48, 12, ES_AUTOHSCROLL - LTEXT "& :", -1, 14, 138, 170, 8 + LTEXT "Д&ля междугородных звонков использовать код:", -1, 14, 138, 170, 8 EDITTEXT 1059, 190, 136, 48, 12, ES_AUTOHSCROLL - LTEXT "& :", -1, 14, 154, 170, 8 + LTEXT "Дл&я международных звонков использовать код:", -1, 14, 154, 170, 8 EDITTEXT 1060, 190, 152, 48, 12, ES_AUTOHSCROLL - AUTOCHECKBOX " & :", 1035, 14, 175, 170, 10 + AUTOCHECKBOX "Код откл&ючения режима оповещения:", 1035, 14, 175, 170, 10 COMBOBOX 1013, 190, 174, 48, 73, CBS_DROPDOWN | CBS_SORT | WS_VSCROLL - LTEXT " :", -1, 14, 193, 70, 8 - AUTORADIOBUTTON "&", 1036, 123, 192, 50, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "&", 1037, 177, 192, 54, 10, NOT WS_TABSTOP - LTEXT " :", 1052, 7, 219, 126, 8 + LTEXT "Тип набора номера:", -1, 14, 193, 70, 8 + AUTORADIOBUTTON "&тоновый", 1036, 123, 192, 50, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "им&пульсный", 1037, 177, 192, 54, 10, NOT WS_TABSTOP + LTEXT "Номер телефона будет набран как:", 1052, 7, 219, 126, 8 LTEXT "", 1053, 14, 232, 224, 16 END 103 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Код города" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 2000, 7, 7, 238, 16 - LTEXT "& :", -1, 7, 31, 238, 8 + LTEXT "Правило набора номера определяет способ набора номеров с таким же или другим кодом города.", 2000, 7, 7, 238, 16 + LTEXT "&Правила набора номера:", -1, 7, 31, 238, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000801D, 7, 42, 238, 99, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1030, 87, 145, 50, 14 - PUSHBUTTON "&...", 1031, 141, 145, 50, 14 - PUSHBUTTON "&", 1032, 195, 145, 50, 14 - GROUPBOX "", 2006, 7, 166, 238, 45 + PUSHBUTTON "&Создать...", 1030, 87, 145, 50, 14 + PUSHBUTTON "&Изменить...", 1031, 141, 145, 50, 14 + PUSHBUTTON "&Удалить", 1032, 195, 145, 50, 14 + GROUPBOX "Описание", 2006, 7, 166, 238, 45 LTEXT "", 1039, 14, 180, 224, 24 END 104 DIALOGEX 0, 0, 252, 234 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Телефонная карточка" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " """" .", 2000, 7, 7, 238, 8 - LTEXT "& :", -1, 7, 31, 238, 8 + LTEXT "Выберите используемую телефонную карточку или нажмите кнопку ""Создать"" для добавления другой карточки.", 2000, 7, 7, 238, 8 + LTEXT "&Типы карточек:", -1, 7, 31, 238, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 42, 238, 63, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1030, 87, 109, 50, 14 - PUSHBUTTON "&...", 1031, 141, 109, 50, 14 - PUSHBUTTON "&", 1032, 195, 109, 50, 14 - LTEXT " &:", -1, 7, 135, 91, 8 + PUSHBUTTON "&Создать...", 1030, 87, 109, 50, 14 + PUSHBUTTON "&Изменить...", 1031, 141, 109, 50, 14 + PUSHBUTTON "&Удалить", 1032, 195, 109, 50, 14 + LTEXT "Учетный &номер:", -1, 7, 135, 91, 8 EDITTEXT 1018, 102, 133, 143, 12, ES_AUTOHSCROLL - LTEXT "& PIN-:", -1, 7, 153, 91, 8 + LTEXT "&Личный PIN-код:", -1, 7, 153, 91, 8 EDITTEXT 1019, 102, 151, 143, 12, ES_AUTOHSCROLL - GROUPBOX " ", 2001, 7, 166, 238, 53 - LTEXT " :", -1, 14, 180, 87, 8 + GROUPBOX "Набираемые номера для", 2001, 7, 166, 238, 53 + LTEXT "междугородных звонков:", -1, 14, 180, 87, 8 LTEXT "", 1042, 106, 180, 132, 8 - LTEXT " :", -1, 14, 192, 88, 8 + LTEXT "международных звонков:", -1, 14, 192, 88, 8 LTEXT "", 1043, 106, 192, 132, 8 - LTEXT " :", -1, 14, 204, 84, 8 + LTEXT "местных звонков:", -1, 14, 204, 84, 8 LTEXT "", 1051, 106, 204, 132, 8 END 105 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Общие" FONT 8, "MS Shell Dlg" BEGIN ICON 203, 2000, 7, 7, 21, 20 - LTEXT "& :", -1, 35, 12, 64, 8, SS_CENTERIMAGE + LTEXT "&Имя карточки:", -1, 35, 12, 64, 8, SS_CENTERIMAGE EDITTEXT 1047, 105, 9, 140, 14, ES_AUTOHSCROLL - LTEXT " &:", -1, 7, 35, 238, 8 + LTEXT "Учетный &номер:", -1, 7, 35, 238, 8 EDITTEXT 1018, 7, 46, 116, 14, ES_AUTOHSCROLL - LTEXT "& PIN-:", -1, 7, 68, 238, 8 + LTEXT "&Личный PIN-код:", -1, 7, 68, 238, 8 EDITTEXT 1019, 7, 79, 116, 14, ES_AUTOHSCROLL - LTEXT " :", 1056, 14, 117, 224, 8 - GROUPBOX " ", 2001, 7, 105, 238, 66 + LTEXT "Эта карточка будет использоваться при:", 1056, 14, 117, 224, 8 + GROUPBOX "Использовать карточки", 2001, 7, 105, 238, 66 LTEXT "", 1000, 22, 131, 216, 8 LTEXT "", 1001, 22, 143, 216, 8 LTEXT "", 1002, 22, 155, 216, 8 @@ -108,97 +108,97 @@ END 106 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Междугородные звонки" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 238, 8 + LTEXT "&Номер для выхода на междугородную линию:", -1, 7, 7, 238, 8 EDITTEXT 1044, 7, 18, 116, 14, ES_AUTOHSCROLL - LTEXT " . .", 2000, 7, 40, 238, 24 - LTEXT "& :", -1, 7, 72, 174, 8 + LTEXT "Укажите последовательность выхода на междугородную линию. Последовательность шагов должна совпадать с приведенной на карточке.", 2000, 7, 40, 238, 24 + LTEXT "&Шаги набора номера при использовании карточки:", -1, 7, 72, 174, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1022, 195, 83, 50, 14 - PUSHBUTTON "&", 1023, 195, 101, 50, 14 - PUSHBUTTON "&", 1024, 195, 119, 50, 14 - PUSHBUTTON "& ", 1025, 7, 161, 90, 14 - PUSHBUTTON "& ", 1018, 101, 161, 90, 14 - PUSHBUTTON "PIN-&", 1019, 7, 179, 90, 14 - PUSHBUTTON "& ...", 1020, 101, 179, 90, 14 - PUSHBUTTON "&...", 1017, 7, 197, 90, 14 - PUSHBUTTON "& ...", 1021, 101, 197, 90, 14 + PUSHBUTTON "В&верх", 1022, 195, 83, 50, 14 + PUSHBUTTON "Вни&з", 1023, 195, 101, 50, 14 + PUSHBUTTON "&Удалить", 1024, 195, 119, 50, 14 + PUSHBUTTON "Но&мер доступа", 1025, 7, 161, 90, 14 + PUSHBUTTON "У&четный номер", 1018, 101, 161, 90, 14 + PUSHBUTTON "PIN-&код", 1019, 7, 179, 90, 14 + PUSHBUTTON "В&ызываемый номер...", 1020, 101, 179, 90, 14 + PUSHBUTTON "О&жидание...", 1017, 7, 197, 90, 14 + PUSHBUTTON "Вв&едите цифры...", 1021, 101, 197, 90, 14 END 107 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Международная связь" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 238, 8 + LTEXT "&Номер для выхода на международную линию:", -1, 7, 7, 238, 8 EDITTEXT 1045, 7, 18, 116, 14, ES_AUTOHSCROLL - LTEXT " . .", 2000, 7, 40, 244, 24 - LTEXT "& :", -1, 7, 72, 174, 8 + LTEXT "Укажите последовательность выхода на международную линию. Последовательность шагов должна совпадать с приведенной на карточке.", 2000, 7, 40, 244, 24 + LTEXT "&Шаги набора номера при использовании карточки:", -1, 7, 72, 174, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1022, 195, 83, 50, 14 - PUSHBUTTON "&", 1023, 195, 101, 50, 14 - PUSHBUTTON "&", 1024, 195, 119, 50, 14 - PUSHBUTTON "& ", 1025, 7, 161, 90, 14 - PUSHBUTTON "& ", 1018, 101, 161, 90, 14 - PUSHBUTTON "PIN-&", 1019, 7, 179, 90, 14 - PUSHBUTTON "& ...", 1020, 101, 179, 90, 14 - PUSHBUTTON "&...", 1017, 7, 197, 90, 14 - PUSHBUTTON "& ...", 1021, 101, 197, 90, 14 + PUSHBUTTON "В&верх", 1022, 195, 83, 50, 14 + PUSHBUTTON "Вни&з", 1023, 195, 101, 50, 14 + PUSHBUTTON "&Удалить", 1024, 195, 119, 50, 14 + PUSHBUTTON "Но&мер доступа", 1025, 7, 161, 90, 14 + PUSHBUTTON "У&четный номер", 1018, 101, 161, 90, 14 + PUSHBUTTON "PIN-&код", 1019, 7, 179, 90, 14 + PUSHBUTTON "В&ызываемый номер...", 1020, 101, 179, 90, 14 + PUSHBUTTON "О&жидание...", 1017, 7, 197, 90, 14 + PUSHBUTTON "Вв&едите цифры...", 1021, 101, 197, 90, 14 END 108 DIALOGEX 0, 0, 252, 226 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Местные звонки" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "& :", -1, 7, 7, 238, 8 + LTEXT "&Номер для выхода на внешнюю линию:", -1, 7, 7, 238, 8 EDITTEXT 1008, 7, 18, 132, 14, ES_AUTOHSCROLL - LTEXT " . . .", 2000, 7, 40, 238, 32 - LTEXT "& :", -1, 7, 80, 238, 8 + LTEXT "Укажите последовательность выхода на местную линию. Последовательность шагов должна совпадать с приведенной на карточке. Для выполнения звонков без использования телефонной карточки оставьте поля пустыми.", 2000, 7, 40, 238, 32 + LTEXT "&Шаги набора номера при использовании карточки:", -1, 7, 80, 238, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 91, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1022, 195, 91, 50, 14 - PUSHBUTTON "&", 1023, 195, 109, 50, 14 - PUSHBUTTON "&", 1024, 195, 127, 50, 14 - PUSHBUTTON "& ", 1025, 7, 169, 90, 14 - PUSHBUTTON "& ", 1018, 101, 169, 90, 14 - PUSHBUTTON "PIN-&", 1019, 7, 187, 90, 14 - PUSHBUTTON "& ...", 1020, 101, 187, 90, 14 - PUSHBUTTON "&...", 1017, 7, 205, 90, 14 - PUSHBUTTON "& ...", 1021, 101, 205, 90, 14 + PUSHBUTTON "В&верх", 1022, 195, 91, 50, 14 + PUSHBUTTON "Вни&з", 1023, 195, 109, 50, 14 + PUSHBUTTON "&Удалить", 1024, 195, 127, 50, 14 + PUSHBUTTON "Но&мер доступа", 1025, 7, 169, 90, 14 + PUSHBUTTON "У&четный номер", 1018, 101, 169, 90, 14 + PUSHBUTTON "PIN-&код", 1019, 7, 187, 90, 14 + PUSHBUTTON "В&ызываемый номер...", 1020, 101, 187, 90, 14 + PUSHBUTTON "О&жидание...", 1017, 7, 205, 90, 14 + PUSHBUTTON "Вв&едите цифры...", 1021, 101, 205, 90, 14 END 109 DIALOGEX 0, 0, 252, 257 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Новое правило набора номера" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 2000, 7, 7, 238, 16 - LTEXT " :", -1, 7, 31, 122, 8 - LTEXT " &:", -1, 7, 45, 41, 8 + LTEXT "Это правило будет применяться только к звонкам с указанными кодом города и префиксом.", 2000, 7, 7, 238, 16 + LTEXT "Используемый код города:", -1, 7, 31, 122, 8 + LTEXT "Код &города:", -1, 7, 45, 41, 8 EDITTEXT 1034, 50, 42, 50, 14, ES_AUTOHSCROLL - LTEXT ", .", -1, 14, 78, 224, 8 - AUTORADIOBUTTON "& ", 1014, 14, 90, 224, 12, NOT WS_TABSTOP - AUTORADIOBUTTON "& :", 1015, 14, 104, 224, 12, NOT WS_TABSTOP - LTEXT "& :", 1057, 26, 117, 119, 8 + LTEXT "Префиксы, используемые с этим кодом города.", -1, 14, 78, 224, 8 + AUTORADIOBUTTON "&Включить все префиксы в код города", 1014, 14, 90, 224, 12, NOT WS_TABSTOP + AUTORADIOBUTTON "В&клюсчить только префикы из списка:", 1015, 14, 104, 224, 12, NOT WS_TABSTOP + LTEXT "Вк&лючаемые префиксы:", 1057, 26, 117, 119, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000411D, 25, 128, 66, 32, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1005, 95, 128, 50, 14 - PUSHBUTTON "&", 1024, 95, 146, 50, 14 - LTEXT " , :", -1, 14, 184, 224, 8 - AUTOCHECKBOX "&:", 1012, 14, 198, 46, 10 + PUSHBUTTON "&Добавить...", 1005, 95, 128, 50, 14 + PUSHBUTTON "&Удалить", 1024, 95, 146, 50, 14 + LTEXT "При наборе номеров, содержащих указанные префиксы:", -1, 14, 184, 224, 8 + AUTOCHECKBOX "Н&абрать:", 1012, 14, 198, 46, 10 EDITTEXT 1007, 62, 196, 42, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1029, 14, 214, 85, 12 + AUTOCHECKBOX "На&брать код города", 1029, 14, 214, 85, 12 DEFPUSHBUTTON "OK", 1, 141, 236, 50, 14 - PUSHBUTTON "", 2, 195, 236, 50, 14 - RTEXT " ", 2001, 133, 31, 51, 8 - LTEXT "", 2002, 200, 31, 45, 8 + PUSHBUTTON "Отмена", 2, 195, 236, 50, 14 + RTEXT "Код города", 2001, 133, 31, 51, 8 + LTEXT "Префикс", 2002, 200, 31, 45, 8 CONTROL "", 2003, "STATIC", SS_BLACKFRAME | SS_SUNKEN, 180, 41, 1, 6 CONTROL "", 2004, "STATIC", SS_BLACKFRAME | SS_SUNKEN, 203, 41, 1, 6 RTEXT "X - X X X - X X X - X X X X", 2005, 133, 48, 112, 8 - GROUPBOX "", -1, 7, 64, 238, 102 - GROUPBOX "", -1, 7, 170, 238, 60 + GROUPBOX "Префиксы", -1, 7, 64, 238, 102 + GROUPBOX "Правила", -1, 7, 170, 238, 60 END 110 DIALOGEX 0, 0, 227, 82 @@ -210,87 +210,87 @@ BEGIN LTEXT "", 1039, 7, 23, 213, 8 EDITTEXT 1031, 7, 34, 213, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 116, 61, 50, 14 - PUSHBUTTON "", 2, 170, 61, 50, 14 + PUSHBUTTON "Отмена", 2, 170, 61, 50, 14 END 111 DIALOGEX 0, 0, 252, 124 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION "" +CAPTION "Ожидание" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 2000, 7, 7, 238, 16 - AUTORADIOBUTTON " &", 1009, 7, 31, 238, 10, WS_GROUP - AUTORADIOBUTTON " & ", 1016, 7, 47, 238, 10, NOT WS_TABSTOP - AUTORADIOBUTTON " & :", 1048, 7, 63, 238, 10, NOT WS_TABSTOP - LTEXT "&.", -1, 58, 80, 187, 8 + LTEXT "Выберите тип ожидаемого сигнала перед продолжением набора номера.", 2000, 7, 7, 238, 16 + AUTORADIOBUTTON "Ждать &гудка", 1009, 7, 31, 238, 10, WS_GROUP + AUTORADIOBUTTON "Ждать &завершения голосового сообщения", 1016, 7, 47, 238, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Ждать &в течение:", 1048, 7, 63, 238, 10, NOT WS_TABSTOP + LTEXT "&сек.", -1, 58, 80, 187, 8 EDITTEXT 1050, 18, 77, 36, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "Spin1", 1049, "msctls_updown32", 0x00000036, 42, 77, 11, 14 DEFPUSHBUTTON "OK", 1, 141, 103, 50, 14 - PUSHBUTTON "", 2, 195, 103, 50, 14 + PUSHBUTTON "Отмена", 2, 195, 103, 50, 14 END 112 DIALOGEX 0, 0, 252, 111 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Вызываемый номер" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . ?", 2000, 7, 7, 238, 24 - AUTOCHECKBOX " &/", 1027, 7, 39, 238, 10 - AUTOCHECKBOX " &", 1034, 7, 55, 238, 10 - AUTOCHECKBOX " &", 1008, 7, 71, 238, 10, WS_DISABLED + LTEXT "На этом шаге требуется указать способ набора номера при использовании телефонной карточки. Набор каких частей номера требуется производить?", 2000, 7, 7, 238, 24 + AUTOCHECKBOX "Набрать код &страны/региона", 1027, 7, 39, 238, 10 + AUTOCHECKBOX "Набрать код &города", 1034, 7, 55, 238, 10 + AUTOCHECKBOX "Набрать &номер", 1008, 7, 71, 238, 10, WS_DISABLED DEFPUSHBUTTON "OK", 1, 141, 91, 50, 14 - PUSHBUTTON "", 2, 195, 91, 50, 14 + PUSHBUTTON "Отмена", 2, 195, 91, 50, 14 END 113 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" BEGIN ICON 201, 2000, 7, 7, 20, 20 - LTEXT " :", -1, 40, 12, 205, 16 - LTEXT "& :", -1, 7, 35, 238, 8 + LTEXT "На компьютере установлены следующие службы доступа к телефонии:", -1, 40, 12, 205, 16 + LTEXT "С&лужбы доступа:", -1, 7, 35, 238, 8 LISTBOX 1033, 7, 46, 238, 147, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | WS_TABSTOP - PUSHBUTTON "&...", 1005, 87, 197, 50, 14 - PUSHBUTTON "&", 1024, 141, 197, 50, 14 - PUSHBUTTON "&...", 1031, 195, 197, 50, 14 + PUSHBUTTON "До&бавить...", 1005, 87, 197, 50, 14 + PUSHBUTTON "&Удалить", 1024, 141, 197, 50, 14 + PUSHBUTTON "&Настроить...", 1031, 195, 197, 50, 14 END 114 DIALOGEX 20, 15, 252, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Установка службы доступа" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " """".", 2000, 7, 7, 241, 16 - LTEXT "& :", -1, 7, 31, 155, 10 + LTEXT "Выберите устанавливаемую службу доступа из списка и нажмите кнопку ""Добавить"".", 2000, 7, 7, 241, 16 + LTEXT "С&лужбы доступа к телефонии:", -1, 7, 31, 155, 10 LISTBOX 1055, 7, 42, 238, 74, LBS_STANDARD | WS_TABSTOP - PUSHBUTTON "&", 1005, 141, 114, 50, 14 - DEFPUSHBUTTON "", 2, 195, 114, 50, 14 + PUSHBUTTON "&Добавить", 1005, 141, 114, 50, 14 + DEFPUSHBUTTON "Отмена", 2, 195, 114, 50, 14 END 115 DIALOGEX 10, 10, 303, 228 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Сведения о местонахождении" FONT 8, "MS Shell Dlg" BEGIN CONTROL 302, 302, "STATIC", SS_BITMAP, 10, 10, 88, 155 - LTEXT " .", 2000, 107, 15, 188, 25 - LTEXT "&, :", -1, 107, 43, 189, 10 + LTEXT "Перед созданием телефонного или модемного подключения требуется ввести сведения о вашем текущем нахождении.", 2000, 107, 15, 188, 25 + LTEXT "&Страна, где вы сейчас находитесь:", -1, 107, 43, 189, 10 COMBOBOX 1006, 107, 55, 180, 68, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT " &", -1, 107, 73, 189, 10 + LTEXT "Телефонный код &города", -1, 107, 73, 189, 10 EDITTEXT 1034, 107, 87, 40, 12, ES_AUTOHSCROLL - LTEXT " & :", -1, 107, 104, 189, 10 + LTEXT "Код выхода на линию поста&вщика услуг:", -1, 107, 104, 189, 10 EDITTEXT 1058, 106, 118, 40, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT " ( ):", -1, 107, 136, 189, 10 + LTEXT "Код выхода на городкую линию (для офисных АТС):", -1, 107, 136, 189, 10 EDITTEXT 1010, 107, 149, 40, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT " :", -1, 107, 167, 189, 10 - AUTORADIOBUTTON "& ", 1036, 107, 178, 73, 14, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& ", 1037, 192, 178, 80, 14, NOT WS_TABSTOP + LTEXT "Тип набора номера:", -1, 107, 167, 189, 10 + AUTORADIOBUTTON "&тоновый набор", 1036, 107, 178, 73, 14, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&импульсный набор", 1037, 192, 178, 80, 14, NOT WS_TABSTOP DEFPUSHBUTTON "OK", 1, 192, 204, 50, 14 - PUSHBUTTON "", 2, 246, 204, 50, 14 + PUSHBUTTON "Отмена", 2, 246, 204, 50, 14 END 400 DIALOGEX 0, 0, 290, 151 @@ -298,149 +298,149 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN CONTROL 302, 302, "STATIC", SS_BITMAP, 0, 0, 88, 155 - LTEXT " .", 2000, 95, 0, 188, 25 - LTEXT "&, :", -1, 95, 30, 188, 10 + LTEXT "Перед созданием телефонного или модемного подключения требуется ввести сведения в вашем текущем нахождении.", 2000, 95, 0, 188, 25 + LTEXT "&Страна, где вы сейчас находитесь:", -1, 95, 30, 188, 10 COMBOBOX 1006, 95, 41, 177, 68, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT " &:", -1, 95, 60, 188, 10 + LTEXT "Телефонный код &города:", -1, 95, 60, 188, 10 EDITTEXT 1034, 95, 73, 40, 14, ES_AUTOHSCROLL - LTEXT "& ( ):", -1, 95, 96, 188, 10 + LTEXT "&Код выхода на городскую линию (для офисных АТС):", -1, 95, 96, 188, 10 EDITTEXT 1010, 95, 107, 40, 14, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT " :", -1, 95, 129, 159, 10 - AUTORADIOBUTTON "& ", 1036, 95, 139, 67, 12, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& ", 1037, 167, 139, 79, 12, NOT WS_TABSTOP + LTEXT "Тип набора номера:", -1, 95, 129, 159, 10 + AUTORADIOBUTTON "&тоновый набор", 1036, 95, 139, 67, 12, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&импульсный набор", 1037, 167, 139, 79, 12, NOT WS_TABSTOP END 500 DIALOGEX 0, 0, 235, 88 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION -CAPTION " ReactOS" +CAPTION "Обозреватель ReactOS" FONT 8, "MS Shell Dlg" BEGIN ICON 504, 501, 13, 14, 21, 20 LTEXT "", 502, 47, 15, 180, 32 - AUTOCHECKBOX "& ", 503, 47, 47, 180, 12 + AUTOCHECKBOX "&Всегда доверять содержимому этой страницы", 503, 47, 47, 180, 12 DEFPUSHBUTTON "&OK", 505, 110, 65, 50, 14 - PUSHBUTTON "&", 506, 164, 65, 50, 14 + PUSHBUTTON "&Отмена", 506, 164, 65, 50, 14 END STRINGTABLE BEGIN - 1 " " - 2 " ." - 3 "" - 4 " """"." - 5 " " - 6 " " - 7 " " - 8 " " - 9 " " - 10 "" - 11 "" - 12 " .\n\n 0 9, *, # ." - 13 " .\n\n 0 9, *, #, ." - 14 " .\n\n 0 9." - 15 " ." - 16 " %1" - 17 " %1 " - 18 " " - 19 " " - 20 "" - 21 "" - 22 " " - 23 " """" ." - 24 " '%2' %1." - 25 " '%2' %1." - 26 " %1." - 27 " %1." - 28 " '%2' %1, ." - 29 " '%2' %1, ." - 30 " %1, ." - 31 " %1, ." - 32 " '1' , ." - 33 " " - 34 " ." - 35 " " - 36 " ( * #) ." - 37 " .\n\n 0 9 ." - 38 " %1!d! ." - 39 " ." - 40 " ." - 41 " PIN-." - 42 " ." - 43 " ." - 44 " /, ." - 45 " / ." - 46 " ." - 47 " /." - 48 " ." - 49 " ." - 50 " ." - 51 " ." - 52 " ." - 53 " ." - 54 " ." - 55 " ." - 56 " ." - 57 " ." - 58 " ." - 59 " " - 60 " . ." - 61 " . """" ." - 62 " , . """" ." - 63 " ." - 64 " ." - 65 " PIN-." - 66 " . """", """" """"." - 67 " ." - 68 " ." - 69 " ." - 70 "" - 71 " ?" - 72 "< >" - 73 " , ." - 74 "&:" - 75 "&:" - 76 " .\n\n 0 9, ." - 77 " " - 78 " ?" - 79 " ?" - 80 " ?" - 81 " ." - 82 " . ." - 83 " , . , . , .\n ?" - 84 " " - 85 " " - 86 "< >" - 87 " .\n\n 0 9, A D, *, #, +, !, ." - 88 " ." - 89 " ." - 90 " , .\n ?" - 91 " .\n ?" - 92 " .\n ?" - 93 " .\n ?" - 1064 " . ." - 1065 " " + 1 "Телефон и модем" + 2 "Настройка правил набора номера и иных параметров при работе с модемом." + 3 "Размещение" + 4 "Для создания нового размещения нажмите кнопку ""Создать""." + 5 "Новое место" + 6 "Изменение местонахождения" + 7 "Новая карточка" + 8 "Изменить телефонную карточку" + 9 "Код города" + 10 "Префиксы" + 11 "Правило" + 12 "Введен недопустимый символ.\n\nДопустимыми символами являются цифры от 0 до 9, *, # и запятая." + 13 "Введен недопустимый символ.\n\nДопустимыми символами являются цифры от 0 до 9, *, #, пробел и запятая." + 14 "Введен недопустимый символ.\n\nДопустимыми символами являются цифры от 0 до 9." + 15 "Введен недопустимый символ." + 16 "Набрать %1" + 17 "Набрать %1 и код города" + 18 "Набрать код города" + 19 "Набрать только номер" + 20 "Все" + 21 "Выбранный" + 22 "Изменение правила набора номера" + 23 "Выберите элемент списка для просмотра его описания или нажмите кнопку ""Создать"" для добавления нового." + 24 "Набрать '%2' и код города перед номером для всех номеров с кодом города %1." + 25 "Набрать '%2' перед номером для всех номеров с кодом города %1." + 26 "Набрать код города перед номером для всех номеров с кодом города %1." + 27 "Набрать только номер телефона для всех номеров с кодом города %1." + 28 "Набрать '%2' и код города перед номером для номеров с кодом города %1, содержащих указанные префиксы." + 29 "Набрать '%2' перед номером для номеров с кодом города %1, содержащих указанные префиксы." + 30 "Набрать код города перед номером для номеров с кодом города %1, содержащих указанные префиксы." + 31 "Набрать только номер телефона для номеров с кодом города %1, содержащих указанные префиксы." + 32 "Набрать '1' перед набором номера для всех кодов городов, включая код города для всех префиксов." + 33 "Добавить префикс" + 34 "Введите один или несколько префиксов разделенных пробелами или запятыми." + 35 "Введите цифры" + 36 "Введите одну или несколько цифр (а также * и #) которые должны быть набраны." + 37 "Введен неправильный символ.\n\nДопустимыми символами являются цифры от 0 до 9 и пробел." + 38 "Ожидание %1!d! сек." + 39 "Набор номера доступа." + 40 "Набор номера учетной записи." + 41 "Набрать PIN-код." + 42 "Ждать гудка." + 43 "Ожидание окончания голосового сообщения." + 44 "Набрать код страны/региона, код города и номер." + 45 "Набрать код страны/региона и номер." + 46 "Набрать код города и номер." + 47 "Набрать код страны/региона." + 48 "Набрать код города." + 49 "Набор номера." + 50 "наборе междугородных номеров." + 51 "наборе международных номеров." + 52 "наборе местных номеров." + 53 "Правила набора номера для этой карточки не определены." + 54 "Необходимо ввести код носителя для междугородных звонков для этого размещения." + 55 "Необходимо ввести имя для этого размещения." + 56 "Необходимо ввести код города для этого размещения." + 57 "Для отключения режима оповещения требуется ввести номер." + 58 "Необходимо выбрать страну или регион из которого производится вызов." + 59 "Сведения отсутствуют" + 60 "Введенное имя размещения уже используется. Введите другое имя." + 61 "Отсутствуют необходимые сведения для использования этой телефонной карточки. Нажмите кнопку ""Изменить"" и укажите отсутствующие сведения или выберите другую карточку." + 62 "Требуется указать карточку, используемую по умолчанию. Выберите карточку из списка или нажмите кнопку ""Создать"" для добавления новой карточки." + 63 "Необходимо ввести имя телефонной карточки." + 64 "Необходимо ввести учетный номер." + 65 "Необходимо ввести PIN-код." + 66 "Правила набора номера для этой карточки не определены. Для создания правила выберите вкладку ""Междугородный"", ""Международный"" или ""Местный""." + 67 "Правило для междугородного звонка требует указания номера доступа." + 68 "Правило для международного звонка требует указания номера доступа." + 69 "Правило для местного звонка требует указания номера доступа." + 70 "Нет" + 71 "Удалить выбранного поставщика услуг телефонной службы?" + 72 "<нет установленных поставщиков услуг>" + 73 "Необходимо ввести префиксы, для которых применимо это правило." + 74 "&Цифры:" + 75 "&Префиксы:" + 76 "Введен неправильный символ.\n\nДопустимыми символами являются цифры от 0 до 9, пробел и запятая." + 77 "Подтверждение удаления" + 78 "Подтверждаете удаление этого размещения?" + 79 "Подтверждаете удаление этой карточки?" + 80 "Подтверждаете удаление этого правила?" + 81 "Необходимо ввести набираемые цифры." + 82 "Введенное имя карточки уже используется. Введите другое имя." + 83 "Требуется указание сведений о местонахождении, откуда производится вызов. Если не указать эти сведения, данная программа может неправильно набирать номер. Кроме того, некоторые приложения отвечают на отмену ввода данных повторной их отправкой.\nОтменить ввод данных?" + 84 "Подтверждение отмены" + 85 "Мое размещение" + 86 "<отсутствуют поставщики служб доступа для установки>" + 87 "Введен недопустимый символ.\n\nДопустимыми символами являются цифры от 0 до 9, буквы от A до D, *, #, +, !, пробел и запятая." + 88 "Необходимо ввести код носителя для международных звонков для этого размещения." + 89 "Необходимо ввести код носителя для этого размещения." + 90 "С этой страницы произведена попытка произвести вызов или наблюдать за вызовами, производимыми на этом компьютере.\nПродолжить выполнение?" + 91 "С этой страницы произведена попытка получить доступ к информации каталога сети.\nПродолжить выполнение?" + 92 "С этой страницы произведена попытка получить доступ или изменить информацию о сетевых конференциях.\nПродолжить выполнение?" + 93 "С этой страницы произведена попытка получить доступ или изменить информацию в реестре.\nРазрешить и продолжить выполнение?" + 1064 "Не удалось открыть панель управления телефоном и модемом. Возможны проблемы с запуском приложения." + 1065 "Удаленный поставщик" 15800 "23" - 15801 "0,"" "","""","""","""","""","""","""","""","""",1" - 15802 "1,"" AT&T 1010ATT1"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010288"",""1010288"",1" - 15803 "2,""AT&T 1010ATT0"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010288"",""1010288"",1" - 15804 "3,""AT&T 1-800-321-0288"","""",""G"",""J$TFG$TH"",""J$T01EFG$TH"","""","""",""18003210288"",""18003210288"",1" - 15805 "4,"" MCI 10102221"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010222"",""1010222"",1" - 15806 "5,""MCI 10102220"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010222"",""1010222"",1" - 15807 "6,""MCI 1-800-888-8000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18008888000"",""18008888000"",1" - 15808 "7,""MCI 1-800-674-0700"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006740700"",""18006740700"",1" - 15809 "8,""MCI 1-800-674-7000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006747000"",""18006747000"",1" - 15810 "9,"" US Sprint 10103331"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010333"",""1010333"",1" - 15811 "10,""US Sprint 10103330"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010333"",""1010333"",1" - 15812 "11,""US Sprint 1-800-877-8000"","""",""G"",""J,,,T0FG,,H"",""J,,,T01EFG#,H"","""","""",""18008778000"",""18008778000"",1" - 15813 "12,"" 0"","""",""G"",""0FG$TH"",""01EFG$TH"","""","""","""","""",1" + 15801 "0,""Не используется"","""","""","""","""","""","""","""","""",1" + 15802 "1,""Прямой канал AT&T через 1010ATT1"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010288"",""1010288"",1" + 15803 "2,""AT&T через 1010ATT0"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010288"",""1010288"",1" + 15804 "3,""AT&T через 1-800-321-0288"","""",""G"",""J$TFG$TH"",""J$T01EFG$TH"","""","""",""18003210288"",""18003210288"",1" + 15805 "4,""Прямой канал MCI через 10102221"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010222"",""1010222"",1" + 15806 "5,""MCI через 10102220"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010222"",""1010222"",1" + 15807 "6,""MCI через 1-800-888-8000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18008888000"",""18008888000"",1" + 15808 "7,""MCI через 1-800-674-0700"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006740700"",""18006740700"",1" + 15809 "8,""MCI через 1-800-674-7000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006747000"",""18006747000"",1" + 15810 "9,""Прямой канал US Sprint через 10103331"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010333"",""1010333"",1" + 15811 "10,""US Sprint через 10103330"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010333"",""1010333"",1" + 15812 "11,""US Sprint через 1-800-877-8000"","""",""G"",""J,,,T0FG,,H"",""J,,,T01EFG#,H"","""","""",""18008778000"",""18008778000"",1" + 15813 "12,""Телефонная карточка через 0"","""",""G"",""0FG$TH"",""01EFG$TH"","""","""","""","""",1" 15814 "13,""Carte France Telecom"","""",""T3010,H,0FG#"",""T3010,H,0FG#"",""T3010,H,00EFG#"","""","""","""","""",1" 15815 "14,""Mercury (UK)"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,0FG"","""",""0500800800"",""0500800800"",""0500800800"",1" 15816 "15,""British Telecom (UK)"","""",""J$H,0FG"",""J$H,0FG"",""J$H,00EFG"","""",""144"",""144"".""144"",1" - 15817 "16,""CLEAR Communications ( )"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,00EFG"","""",""0502333"",""0502333"",""0502333"",1" + 15817 "16,""CLEAR Communications (Новая Зеландия)"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,00EFG"","""",""0502333"",""0502333"",""0502333"",1" 15818 "17,""Telecom New Zealand"","""",""J,0FG?H"",""J,0FG?H"",""J,00EFG?H"","""",""012"",""012"",""012"",1" - 15819 "18,""Global Card ( - )"","""",""G"",""0FG"",""J,102880$TFG$H"","""","""","""",""0080"",1" - 15820 "19,""Telstra () 1818 ()"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0011EFG#"","""",""1818"",""1818"",""1818"",1" - 15821 "20,""Telstra () 1818 ()"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0015EFG#"","""",""1818"",""1818"",""1818"",1" - 15822 "21,""Optus () 1812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""1812"",1" - 15823 "22,""Optus () 008551812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""008551812"",1" + 15819 "18,""Global Card (Тайвань - США)"","""",""G"",""0FG"",""J,102880$TFG$H"","""","""","""",""0080"",1" + 15820 "19,""Telstra (Австралия) через 1818 (голосом)"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0011EFG#"","""",""1818"",""1818"",""1818"",1" + 15821 "20,""Telstra (Австралия) через 1818 (факс)"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0015EFG#"","""",""1818"",""1818"",""1818"",1" + 15822 "21,""Optus (Австралия) через 1812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""1812"",1" + 15823 "22,""Optus (Австралия) через 008551812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""008551812"",1" END diff --git a/dll/win32/tapiui/lang/uk-UA.rc b/dll/win32/tapiui/lang/uk-UA.rc index 7eff0eebde6..67a147e9fca 100644 --- a/dll/win32/tapiui/lang/uk-UA.rc +++ b/dll/win32/tapiui/lang/uk-UA.rc @@ -10,105 +10,105 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT 101 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Правила набору номера" FONT 8, "MS Shell Dlg" BEGIN ICON 201, 2000, 7, 7, 21, 20 - LTEXT " . , .", -1, 35, 7, 210, 16 - LTEXT "&:", -1, 7, 35, 210, 8 + LTEXT "Нижченаведений список містить вказані розташування. Виберіть розташування, з якого ви телефонуєте.", -1, 35, 7, 210, 16 + LTEXT "&Розташування:", -1, 7, 35, 210, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000011D, 7, 46, 238, 105, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1030, 87, 155, 50, 14 - PUSHBUTTON "&...", 1031, 141, 155, 50, 14 - PUSHBUTTON "&", 1032, 195, 155, 50, 14 - LTEXT " :", 1052, 7, 181, 100, 8 + PUSHBUTTON "&Створити...", 1030, 87, 155, 50, 14 + PUSHBUTTON "З&мінити...", 1031, 141, 155, 50, 14 + PUSHBUTTON "В&идалити", 1032, 195, 155, 50, 14 + LTEXT "Номер телефону буде набрано як:", 1052, 7, 181, 100, 8 LTEXT "", 1053, 14, 195, 224, 16 END 102 DIALOGEX 0, 0, 252, 255 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN ICON 202, 2000, 7, 7, 20, 20 - LTEXT "&' :", -1, 35, 11, 56, 8, SS_CENTERIMAGE + LTEXT "&Ім'я розташування:", -1, 35, 11, 56, 8, SS_CENTERIMAGE EDITTEXT 1038, 96, 8, 149, 14, ES_AUTOHSCROLL - LTEXT " , .", 2001, 7, 33, 238, 8 - LTEXT "&/:", -1, 7, 49, 161, 8 + LTEXT "Укажіть розташування, звідки ви телефонуєте.", 2001, 7, 33, 238, 8 + LTEXT "&Країна/регіон:", -1, 7, 49, 161, 8 COMBOBOX 1006, 7, 60, 175, 200, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT " &:", -1, 190, 49, 48, 8 + LTEXT "Код &міста:", -1, 190, 49, 48, 8 EDITTEXT 1034, 190, 60, 48, 12, ES_AUTOHSCROLL - GROUPBOX " ", 2002, 7, 80, 238, 92 - LTEXT " , :", 2003, 14, 92, 224, 8 - LTEXT " & :", -1, 14, 106, 170, 8 + GROUPBOX "Правила набору номера", 2002, 7, 80, 238, 92 + LTEXT "Телефонуючи з цього розташування, застосовувати такі правила:", 2003, 14, 92, 224, 8 + LTEXT "для доступу до &зовнішньої місцевої лінії набирати:", -1, 14, 106, 170, 8 EDITTEXT 1010, 190, 104, 48, 12, ES_AUTOHSCROLL - LTEXT " & :", -1, 14, 122, 170, 8 + LTEXT "для доступу до зовнішньої мі&жміської лінії набирати:", -1, 14, 122, 170, 8 EDITTEXT 1011, 190, 120, 48, 12, ES_AUTOHSCROLL - LTEXT " & :", -1, 14, 138, 170, 8 + LTEXT "для міжміськ&их дзвінків використовувати код:", -1, 14, 138, 170, 8 EDITTEXT 1059, 190, 136, 48, 12, ES_AUTOHSCROLL - LTEXT "& :", -1, 14, 154, 170, 8 + LTEXT "дл&я міжнародних дзвінків використовувати код:", -1, 14, 154, 170, 8 EDITTEXT 1060, 190, 152, 48, 12, ES_AUTOHSCROLL - AUTOCHECKBOX " & :", 1035, 14, 177, 170, 10 + AUTOCHECKBOX "Код вимкнення режиму очіку&ючого дзвінка:", 1035, 14, 177, 170, 10 COMBOBOX 1013, 190, 176, 48, 73, CBS_DROPDOWN | CBS_SORT | WS_VSCROLL - LTEXT " :", -1, 14, 195, 40, 8 - AUTORADIOBUTTON "&", 1036, 58, 194, 50, 10, NOT WS_TABSTOP - AUTORADIOBUTTON "&", 1037, 112, 194, 50, 10, NOT WS_TABSTOP - LTEXT " :", 1052, 7, 219, 100, 8 + LTEXT "Тип набору номера:", -1, 14, 195, 40, 8 + AUTORADIOBUTTON "&тоновий", 1036, 58, 194, 50, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "ім&пульсний", 1037, 112, 194, 50, 10, NOT WS_TABSTOP + LTEXT "Номер телефону буде набрано як:", 1052, 7, 219, 100, 8 LTEXT "", 1053, 14, 232, 224, 16 END 103 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Правила набору коду міста" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 2000, 7, 7, 238, 16 - LTEXT "& :", -1, 7, 31, 238, 8 + LTEXT "Правило набору коду міста визначає спосіб набору номерів із таким самим або іншим кодом міста.", 2000, 7, 7, 238, 16 + LTEXT "&Правила набору коду міста:", -1, 7, 31, 238, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000801D, 7, 42, 238, 99, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1030, 87, 147, 50, 14 - PUSHBUTTON "&...", 1031, 141, 147, 50, 14 - PUSHBUTTON "&", 1032, 195, 147, 50, 14 - GROUPBOX "", 2006, 7, 166, 238, 45 + PUSHBUTTON "&Створити...", 1030, 87, 147, 50, 14 + PUSHBUTTON "З&мінити...", 1031, 141, 147, 50, 14 + PUSHBUTTON "В&идалити", 1032, 195, 147, 50, 14 + GROUPBOX "Опис", 2006, 7, 166, 238, 45 LTEXT "", 1039, 14, 180, 224, 24 END 104 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION " " +CAPTION "Телефонна картка" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , , """", .", 2000, 7, 7, 238, 8 - LTEXT "& :", -1, 7, 23, 238, 8 + LTEXT "Виберіть телефонну картку, яка використовуватиметься, або натисніть кнопку ""Створити"", щоб додати іншу картку.", 2000, 7, 7, 238, 8 + LTEXT "&Типи карток:", -1, 7, 23, 238, 8 CONTROL "", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 34, 238, 63, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1030, 87, 103, 50, 14 - PUSHBUTTON "&...", 1031, 141, 103, 50, 14 - PUSHBUTTON "&", 1032, 195, 103, 50, 14 - LTEXT " &:", -1, 7, 127, 91, 8 + PUSHBUTTON "&Створити...", 1030, 87, 103, 50, 14 + PUSHBUTTON "З&мінити...", 1031, 141, 103, 50, 14 + PUSHBUTTON "З&мінити", 1032, 195, 103, 50, 14 + LTEXT "Обліковий &номер:", -1, 7, 127, 91, 8 EDITTEXT 1018, 102, 125, 143, 12, ES_AUTOHSCROLL - LTEXT "& PIN-:", -1, 7, 145, 91, 8 + LTEXT "Осо&бистий PIN-код:", -1, 7, 145, 91, 8 EDITTEXT 1019, 102, 143, 143, 12, ES_AUTOHSCROLL - GROUPBOX ", ", 2001, 7, 158, 238, 53 - LTEXT " :", -1, 14, 172, 84, 8 + GROUPBOX "Номери, які слід набирати для", 2001, 7, 158, 238, 53 + LTEXT "міжміських дзвінків:", -1, 14, 172, 84, 8 LTEXT "", 1042, 102, 172, 136, 8 - LTEXT " :", -1, 14, 184, 84, 8 + LTEXT "міжнародних дзвінків:", -1, 14, 184, 84, 8 LTEXT "", 1043, 102, 184, 136, 8 - LTEXT " :", -1, 14, 196, 84, 8 + LTEXT "місцевих дзвінків:", -1, 14, 196, 84, 8 LTEXT "", 1051, 102, 196, 136, 8 END 105 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Загальні" FONT 8, "MS Shell Dlg" BEGIN ICON 203, 2000, 7, 7, 20, 20 - LTEXT "&' :", -1, 35, 12, 64, 8, SS_CENTERIMAGE + LTEXT "&Ім'я картки:", -1, 35, 12, 64, 8, SS_CENTERIMAGE EDITTEXT 1047, 105, 9, 140, 14, ES_AUTOHSCROLL - LTEXT " &:", -1, 7, 35, 238, 8 + LTEXT "Обліковий &номер:", -1, 7, 35, 238, 8 EDITTEXT 1018, 7, 46, 116, 14, ES_AUTOHSCROLL - LTEXT "& PIN-:", -1, 7, 68, 238, 8 + LTEXT "Осо&бистий PIN-код:", -1, 7, 68, 238, 8 EDITTEXT 1019, 7, 80, 116, 14, ES_AUTOHSCROLL - LTEXT " :", 1056, 14, 117, 224, 8 - GROUPBOX "³ ", 2001, 7, 105, 238, 66 + LTEXT "Ця телефонна картка застосовуватиметься за:", 1056, 14, 117, 224, 8 + GROUPBOX "Відомості про телефонну картку", 2001, 7, 105, 238, 66 LTEXT "", 1000, 22, 131, 216, 8 LTEXT "", 1001, 22, 143, 216, 8 LTEXT "", 1002, 22, 155, 216, 8 @@ -116,97 +116,97 @@ END 106 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "̳" +CAPTION "Міжміські" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " & :", -1, 7, 7, 238, 8 + LTEXT "Номер для ви&ходу на міжміську лінію:", -1, 7, 7, 238, 8 EDITTEXT 1044, 7, 18, 140, 14, ES_AUTOHSCROLL - LTEXT " . , .", 2000, 7, 40, 238, 24 - LTEXT " & :", -1, 7, 72, 80, 8 + LTEXT "За допомогою кнопок укажіть послідовність виходу на міжміську лінію. Укажіть послідовність кроків у тому порядку, як вони зазначені на картці.", 2000, 7, 40, 238, 24 + LTEXT "Кроки на&бору номера за використання картки:", -1, 7, 72, 80, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1022, 195, 83, 50, 14 - PUSHBUTTON "&", 1023, 195, 101, 50, 14 - PUSHBUTTON "&", 1024, 195, 119, 50, 14 - PUSHBUTTON "& ", 1025, 7, 161, 90, 14 - PUSHBUTTON " &", 1018, 101, 161, 90, 14 - PUSHBUTTON "PIN-&", 1019, 7, 179, 90, 14 - PUSHBUTTON " &...", 1020, 101, 179, 90, 14 - PUSHBUTTON "&...", 1017, 7, 197, 90, 14 - PUSHBUTTON "& ...", 1021, 101, 197, 90, 14 + PUSHBUTTON "В&гору", 1022, 195, 83, 50, 14 + PUSHBUTTON "В&низ", 1023, 195, 101, 50, 14 + PUSHBUTTON "В&идалити", 1024, 195, 119, 50, 14 + PUSHBUTTON "Но&мер доступу", 1025, 7, 161, 90, 14 + PUSHBUTTON "Обліковий ном&ер", 1018, 101, 161, 90, 14 + PUSHBUTTON "PIN-&код", 1019, 7, 179, 90, 14 + PUSHBUTTON "Номер при&значення...", 1020, 101, 179, 90, 14 + PUSHBUTTON "О&чікування...", 1017, 7, 197, 90, 14 + PUSHBUTTON "Ука&жіть цифри...", 1021, 101, 197, 90, 14 END 107 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "̳" +CAPTION "Міжнародні" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " & :", -1, 7, 7, 238, 8 + LTEXT "Номер для ви&ходу на міжнародну лінію:", -1, 7, 7, 238, 8 EDITTEXT 1045, 7, 18, 140, 14, ES_AUTOHSCROLL - LTEXT " . , .", 2000, 7, 40, 244, 24 - LTEXT " & :", -1, 7, 72, 80, 8 + LTEXT "За допомогою кнопок укажіть послідовність виходу на міжнародну лінію. Укажіть послідовність кроків у тому порядку, в якому вони зазначені на картці.", 2000, 7, 40, 244, 24 + LTEXT "Кроки на&бору номера за використання картки:", -1, 7, 72, 80, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1022, 195, 83, 50, 14 - PUSHBUTTON "&", 1023, 195, 101, 50, 14 - PUSHBUTTON "&", 1024, 195, 119, 50, 14 - PUSHBUTTON "& ", 1025, 7, 161, 90, 14 - PUSHBUTTON " &", 1018, 101, 161, 90, 14 - PUSHBUTTON "PIN-&", 1019, 7, 179, 90, 14 - PUSHBUTTON " &...", 1020, 101, 179, 90, 14 - PUSHBUTTON "&...", 1017, 7, 197, 90, 14 - PUSHBUTTON "& ...", 1021, 101, 197, 90, 14 + PUSHBUTTON "В&гору", 1022, 195, 83, 50, 14 + PUSHBUTTON "В&низ", 1023, 195, 101, 50, 14 + PUSHBUTTON "В&идалити", 1024, 195, 119, 50, 14 + PUSHBUTTON "Но&мер доступу", 1025, 7, 161, 90, 14 + PUSHBUTTON "Обліковий ном&ер", 1018, 101, 161, 90, 14 + PUSHBUTTON "PIN-&код", 1019, 7, 179, 90, 14 + PUSHBUTTON "Номер при&значення...", 1020, 101, 179, 90, 14 + PUSHBUTTON "О&чікування...", 1017, 7, 197, 90, 14 + PUSHBUTTON "Ука&жіть цифри...", 1021, 101, 197, 90, 14 END 108 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "̳" +CAPTION "Місцеві" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " & :", -1, 7, 7, 238, 8 + LTEXT "Номер для ви&ходу на місцеву лінію:", -1, 7, 7, 238, 8 EDITTEXT 1008, 7, 18, 140, 14, ES_AUTOHSCROLL - LTEXT " . , . .", 2000, 7, 40, 238, 24 - LTEXT " & :", -1, 7, 72, 238, 8 + LTEXT "За допомогою кнопок укажіть послідовність виходу на місцеву лінію. Укажіть послідовність кроків у тому порядку, як вони зазначені на картці. Для дзвінків без використання телефонної картки залиште ці поля пустими.", 2000, 7, 40, 238, 24 + LTEXT "Кроки на&бору номера за використання картки:", -1, 7, 72, 238, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000400D, 7, 83, 184, 74, WS_EX_CLIENTEDGE - PUSHBUTTON "&", 1022, 195, 83, 50, 14 - PUSHBUTTON "&", 1023, 195, 101, 50, 14 - PUSHBUTTON "&", 1024, 195, 119, 50, 14 - PUSHBUTTON "& ", 1025, 7, 161, 90, 14 - PUSHBUTTON " &", 1018, 101, 161, 90, 14 - PUSHBUTTON "PIN-&", 1019, 7, 179, 90, 14 - PUSHBUTTON " &...", 1020, 101, 179, 90, 14 - PUSHBUTTON "&...", 1017, 7, 197, 90, 14 - PUSHBUTTON "& ...", 1021, 101, 197, 90, 14 + PUSHBUTTON "В&гору", 1022, 195, 83, 50, 14 + PUSHBUTTON "В&низ", 1023, 195, 101, 50, 14 + PUSHBUTTON "В&идалити", 1024, 195, 119, 50, 14 + PUSHBUTTON "Но&мер доступу", 1025, 7, 161, 90, 14 + PUSHBUTTON "Обліковий ном&ер", 1018, 101, 161, 90, 14 + PUSHBUTTON "PIN-&код", 1019, 7, 179, 90, 14 + PUSHBUTTON "Номер при&значення...", 1020, 101, 179, 90, 14 + PUSHBUTTON "О&чікування...", 1017, 7, 197, 90, 14 + PUSHBUTTON "Ука&жіть цифри...", 1021, 101, 197, 90, 14 END 109 DIALOGEX 0, 0, 252, 257 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Нове правило набору коду міста" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 2000, 7, 6, 238, 16 - LTEXT " , :", -1, 7, 31, 110, 8 - LTEXT " &:", -1, 7, 47, 36, 8 + LTEXT "Це правило застосовуватиметься лише до дзвінків з указаними кодом міста й префіксом.", 2000, 7, 6, 238, 16 + LTEXT "Код міста, куди телефонують:", -1, 7, 31, 110, 8 + LTEXT "Код &міста:", -1, 7, 47, 36, 8 EDITTEXT 1034, 46, 44, 50, 14, ES_AUTOHSCROLL - LTEXT ", .", -1, 14, 78, 224, 8 - AUTORADIOBUTTON "& ", 1014, 14, 90, 224, 12, NOT WS_TABSTOP - AUTORADIOBUTTON "& :", 1015, 14, 104, 224, 12, NOT WS_TABSTOP - LTEXT ", & :", 1057, 26, 117, 119, 8 + LTEXT "Префікси, які слід використовувати з цим кодом міста.", -1, 14, 78, 224, 8 + AUTORADIOBUTTON "&Включити всі префікси до коду міста", 1014, 14, 90, 224, 12, NOT WS_TABSTOP + AUTORADIOBUTTON "В&ключити лише префікси зі списку:", 1015, 14, 104, 224, 12, NOT WS_TABSTOP + LTEXT "Префікси, які с&лід включити:", 1057, 26, 117, 119, 8 CONTROL "List1", 1033, "SysListView32", WS_BORDER | WS_TABSTOP | 0x0000411D, 25, 128, 66, 32, WS_EX_CLIENTEDGE - PUSHBUTTON "&...", 1005, 95, 128, 50, 14 - PUSHBUTTON "&", 1024, 95, 146, 50, 14 - LTEXT " , :", -1, 14, 184, 224, 8 - AUTOCHECKBOX "&:", 1012, 14, 198, 30, 12 + PUSHBUTTON "&Додати...", 1005, 95, 128, 50, 14 + PUSHBUTTON "В&идалити", 1024, 95, 146, 50, 14 + LTEXT "Набираючи номери, які містять указані префікси:", -1, 14, 184, 224, 8 + AUTOCHECKBOX "Н&абрати:", 1012, 14, 198, 30, 12 EDITTEXT 1007, 46, 196, 42, 14, ES_AUTOHSCROLL - AUTOCHECKBOX "& ", 1029, 14, 214, 85, 12 + AUTOCHECKBOX "На&брати код міста", 1029, 14, 214, 85, 12 DEFPUSHBUTTON "OK", 1, 141, 236, 50, 14 - PUSHBUTTON "", 2, 195, 236, 50, 14 - RTEXT " ", 2001, 133, 31, 51, 8 - LTEXT "", 2002, 200, 31, 45, 8 + PUSHBUTTON "Скасувати", 2, 195, 236, 50, 14 + RTEXT "Код міста", 2001, 133, 31, 51, 8 + LTEXT "Префікс", 2002, 200, 31, 45, 8 CONTROL "", 2003, "STATIC", SS_BLACKFRAME | SS_SUNKEN, 180, 41, 1, 6 CONTROL "", 2004, "STATIC", SS_BLACKFRAME | SS_SUNKEN, 203, 41, 1, 6 RTEXT "X - X X X - X X X - X X X X", 2005, 133, 48, 112, 8 - GROUPBOX "", -1, 7, 64, 238, 102 - GROUPBOX "", -1, 7, 170, 238, 60 + GROUPBOX "Префікси", -1, 7, 64, 238, 102 + GROUPBOX "Правила", -1, 7, 170, 238, 60 END 110 DIALOGEX 0, 0, 227, 82 @@ -218,87 +218,87 @@ BEGIN LTEXT "", 1039, 7, 23, 213, 8 EDITTEXT 1031, 7, 34, 213, 14, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 116, 62, 50, 14 - PUSHBUTTON "", 2, 170, 62, 50, 14 + PUSHBUTTON "Скасувати", 2, 170, 62, 50, 14 END 111 DIALOGEX 0, 0, 252, 124 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION "" +CAPTION "Очікування" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " .", 2000, 7, 7, 238, 16 - AUTORADIOBUTTON " &", 1009, 7, 31, 238, 10, WS_GROUP - AUTORADIOBUTTON " & ", 1016, 7, 47, 238, 10, NOT WS_TABSTOP - AUTORADIOBUTTON " & :", 1048, 7, 63, 238, 10, NOT WS_TABSTOP + LTEXT "Виберіть тип очікуваного сигналу перед продовженням набору номера.", 2000, 7, 7, 238, 16 + AUTORADIOBUTTON "Чекати на &гудок", 1009, 7, 31, 238, 10, WS_GROUP + AUTORADIOBUTTON "Чекати на &закінчення голосового повідомлення", 1016, 7, 47, 238, 10, NOT WS_TABSTOP + AUTORADIOBUTTON "Чекати &протягом певного часу:", 1048, 7, 63, 238, 10, NOT WS_TABSTOP EDITTEXT 1050, 18, 77, 36, 14, ES_AUTOHSCROLL | WS_GROUP CONTROL "Spin1", 1049, "msctls_updown32", 0x00000036, 42, 78, 11, 14 - LTEXT "&", -1, 58, 81, 187, 8 + LTEXT "&сек", -1, 58, 81, 187, 8 DEFPUSHBUTTON "OK", 1, 141, 103, 50, 14 - PUSHBUTTON "", 2, 195, 103, 50, 14 + PUSHBUTTON "Скасувати", 2, 195, 103, 50, 14 END 112 DIALOGEX 0, 0, 252, 111 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION " " +CAPTION "Номер призначення" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " . ?", 2000, 7, 7, 238, 24 - AUTOCHECKBOX "& /", 1027, 7, 39, 238, 10 - AUTOCHECKBOX " & ", 1034, 7, 55, 238, 10 - AUTOCHECKBOX "& ", 1008, 7, 71, 238, 10, WS_DISABLED + LTEXT "На цьому кроці слід указати спосіб набору номера за використання телефонної картки. Які частини номера слід набирати?", 2000, 7, 7, 238, 24 + AUTOCHECKBOX "На&брати код країни/регіону", 1027, 7, 39, 238, 10 + AUTOCHECKBOX "Набрати &код міста", 1034, 7, 55, 238, 10 + AUTOCHECKBOX "&Набрати номер", 1008, 7, 71, 238, 10, WS_DISABLED DEFPUSHBUTTON "OK", 1, 141, 92, 50, 14 - PUSHBUTTON "", 2, 195, 92, 50, 14 + PUSHBUTTON "Скасувати", 2, 195, 92, 50, 14 END 113 DIALOGEX 0, 0, 252, 218 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION -CAPTION "" +CAPTION "Додатково" FONT 8, "MS Shell Dlg" BEGIN ICON 201, 2000, 7, 7, 20, 20 - LTEXT " ' :", -1, 40, 7, 205, 8 - LTEXT "& :", -1, 7, 35, 238, 8 + LTEXT "На цьому комп'ютері установлені такі служби телефонного доступу:", -1, 40, 7, 205, 8 + LTEXT "Слу&жби доступу:", -1, 7, 35, 238, 8 LISTBOX 1033, 7, 46, 238, 147, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | WS_TABSTOP - PUSHBUTTON "&...", 1005, 87, 197, 50, 14 - PUSHBUTTON "&", 1024, 141, 197, 50, 14 - PUSHBUTTON "&...", 1031, 195, 197, 50, 14 + PUSHBUTTON "&Додати...", 1005, 87, 197, 50, 14 + PUSHBUTTON "В&идалити", 1024, 141, 197, 50, 14 + PUSHBUTTON "&Налаштувати...", 1031, 195, 197, 50, 14 END 114 DIALOGEX 20, 15, 252, 127 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION " " +CAPTION "Установка служби доступу" FONT 8, "MS Shell Dlg" BEGIN - LTEXT " , , """".", 2000, 7, 7, 241, 8 - LTEXT "& :", -1, 7, 23, 144, 10 + LTEXT "Виберіть зі списку службу доступу, яку потрібно установити, й натисніть кнопку ""Додати"".", 2000, 7, 7, 241, 8 + LTEXT "С&лужби телефонного доступу:", -1, 7, 23, 144, 10 LISTBOX 1055, 7, 34, 238, 74, LBS_STANDARD | WS_TABSTOP - PUSHBUTTON "&", 1005, 141, 106, 50, 14 - DEFPUSHBUTTON "", 2, 195, 106, 50, 14 + PUSHBUTTON "&Додати", 1005, 141, 106, 50, 14 + DEFPUSHBUTTON "Скасувати", 2, 195, 106, 50, 14 END 115 DIALOGEX 10, 10, 303, 228 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION EXSTYLE WS_EX_CONTEXTHELP -CAPTION "³ " +CAPTION "Відомості про розташування" FONT 8, "MS Shell Dlg" BEGIN CONTROL 302, 302, "STATIC", SS_BITMAP, 10, 10, 88, 155 - LTEXT " .", 2000, 107, 15, 188, 25 - LTEXT "&, :", -1, 107, 43, 189, 10 + LTEXT "Перед створенням телефонного або модемного підключення потрібно вказати відомості про ваше поточне розташування.", 2000, 107, 15, 188, 25 + LTEXT "&Країна, в якій ви зараз перебуваєте:", -1, 107, 43, 189, 10 COMBOBOX 1006, 107, 55, 180, 200, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT "& :", -1, 107, 74, 189, 10 + LTEXT "Те&лефонний код міста:", -1, 107, 74, 189, 10 EDITTEXT 1034, 107, 87, 45, 12, ES_AUTOHSCROLL - LTEXT " & ':", -1, 107, 105, 189, 10 + LTEXT "Код &виходу на лінію оператора зв'язку:", -1, 107, 105, 189, 10 EDITTEXT 1058, 106, 118, 45, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT " & :", -1, 107, 137, 189, 10 + LTEXT "Код ви&ходу на зовнішню лінію:", -1, 107, 137, 189, 10 EDITTEXT 1010, 107, 149, 45, 12, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT " :", -1, 107, 168, 189, 10 - AUTORADIOBUTTON "& ", 1036, 107, 178, 57, 14, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& ", 1037, 175, 178, 57, 14, NOT WS_TABSTOP + LTEXT "Тип набору номера:", -1, 107, 168, 189, 10 + AUTORADIOBUTTON "&тоновий набір", 1036, 107, 178, 57, 14, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&імпульсний набір", 1037, 175, 178, 57, 14, NOT WS_TABSTOP DEFPUSHBUTTON "OK", 1, 192, 204, 50, 14 - PUSHBUTTON "", 2, 246, 204, 50, 14 + PUSHBUTTON "Скасувати", 2, 246, 204, 50, 14 END 400 DIALOGEX 0, 0, 290, 151 @@ -306,16 +306,16 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION FONT 8, "MS Shell Dlg" BEGIN CONTROL 302, 302, "STATIC", SS_BITMAP, 0, 0, 88, 155 - LTEXT " .", 2000, 95, 2, 188, 25 - LTEXT "&, :", -1, 95, 30, 188, 10 + LTEXT "Перед створенням телефонного або модемного підключення потрібно вказати відомості про ваше поточне розташування.", 2000, 95, 2, 188, 25 + LTEXT "&Країна, в якій ви зараз перебуваєте:", -1, 95, 30, 188, 10 COMBOBOX 1006, 95, 41, 177, 68, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL - LTEXT "& :", -1, 95, 61, 188, 10 + LTEXT "Т&елефонний код міста:", -1, 95, 61, 188, 10 EDITTEXT 1034, 95, 73, 40, 14, ES_AUTOHSCROLL - LTEXT " & :", -1, 95, 96, 188, 10 + LTEXT "Код ви&ходу на зовнішню лінію:", -1, 95, 96, 188, 10 EDITTEXT 1010, 95, 107, 40, 14, ES_UPPERCASE | ES_AUTOHSCROLL - LTEXT " :", -1, 95, 129, 159, 10 - AUTORADIOBUTTON "& ", 1036, 95, 139, 55, 12, WS_GROUP | NOT WS_TABSTOP - AUTORADIOBUTTON "& ", 1037, 155, 139, 55, 12, NOT WS_TABSTOP + LTEXT "Тип набору номера:", -1, 95, 129, 159, 10 + AUTORADIOBUTTON "&тоновий набір", 1036, 95, 139, 55, 12, WS_GROUP | NOT WS_TABSTOP + AUTORADIOBUTTON "&імпульсний набір", 1037, 155, 139, 55, 12, NOT WS_TABSTOP END 500 DIALOGEX 0, 0, 235, 88 @@ -325,130 +325,130 @@ FONT 8, "MS Shell Dlg" BEGIN ICON 504, 501, 13, 14, 21, 20 LTEXT "", 502, 47, 15, 180, 32 - AUTOCHECKBOX "& ", 503, 50, 47, 147, 12 + AUTOCHECKBOX "За&вжди довіряти вмісту цієї сторінки", 503, 50, 47, 147, 12 DEFPUSHBUTTON "&OK", 505, 110, 65, 50, 14 - PUSHBUTTON "&", 506, 164, 65, 50, 14 + PUSHBUTTON "&Скасувати", 506, 164, 65, 50, 14 END STRINGTABLE BEGIN - 1 " " - 2 " ." - 3 "" - 4 " , """"." - 5 " " - 6 " " - 7 " " - 8 " " - 9 " " - 10 "" - 11 "" - 12 " .\n\n 0 9, (*), # ." - 13 " .\n\n 0 9, (*), #, ." - 14 " .\n\n 0 9." - 15 " ." - 16 " %1" - 17 " %1 " - 18 " " - 19 " " - 20 "" - 21 "" - 22 " " - 23 " , , """", ." - 24 " ""%2"" %1." - 25 " ""%2"" %1." - 26 " %1." - 27 " %1." - 28 " ""%2"" %1, ." - 29 " ""%2"" %1, ." - 30 " %1, ." - 31 " %1, ." - 32 " ""1"" ." - 33 " " - 34 " ." - 35 " " - 36 " ( * #), ." - 37 " .\n\n 0 9 ." - 38 " %1!d! ." - 39 " ." - 40 " ." - 41 " PIN-." - 42 " ." - 43 " ." - 44 " /, ." - 45 " / ." - 46 " ." - 47 " /." - 48 " ." - 49 " ." - 50 " ." - 51 " ." - 52 " ." - 53 " ." - 54 " ' ." - 55 " ' ." - 56 " ." - 57 " , ." - 58 " , ." - 59 "³ " - 60 " ' . '." - 61 "³ , . """" ." - 62 " , . """", ." - 63 " ' ." - 64 " ." - 65 " PIN-." - 66 " . , ""̳"", ""̳"" ""̳""." - 67 " '." - 68 " '." - 69 " '." - 70 "" - 71 " ?" - 72 "< >" - 73 " , ." - 74 "&:" - 75 "&:" - 76 " .\n\n 0 9, ." - 77 "ϳ " - 78 " ?" - 79 " ?" - 80 " ?" - 81 " ." - 82 " ' . '." - 83 "ReactOS , . , . , , .\n ?" - 84 "ϳ " - 85 " " - 86 "< >" - 87 " .\n\n 0 9, A D, *, #, +, !, ." - 88 " ' ." - 89 " ' ." - 90 " ', '.\n ?" - 91 " .\n ?" - 92 " .\n ?" - 93 " .\n ?" - 1064 " . ." - 1065 " " + 1 "Телефон і модем" + 2 "Настройка правил набору номера та інших параметрів використання модема." + 3 "Розташування" + 4 "Щоб створити нове розташування, натисніть кнопку ""Створити""." + 5 "Нове розташування" + 6 "Змінити розташування" + 7 "Нова телефонна картка" + 8 "Змінити телефонну картку" + 9 "Код міста" + 10 "Префікси" + 11 "Правило" + 12 "Введено неприпустимий символ.\n\nДозволені цифри від 0 до 9, зірочка (*), знак # і кома." + 13 "Введено неприпустимий символ.\n\nДозволені цифри від 0 до 9, зірочка (*), знак #, пробіл і кома." + 14 "Введено неприпустимий символ.\n\nДозволені цифри від 0 до 9." + 15 "Введено неприпустимий символ." + 16 "Набрати %1" + 17 "Набрати %1 і код міста" + 18 "Набрати код міста" + 19 "Набрати лише номер" + 20 "Усі" + 21 "Вибраний" + 22 "Змінити правило набору коду міста" + 23 "Виберіть зі списку правило, щоб переглянути його опис, або натисніть кнопку ""Створити"", щоб додати нове правило." + 24 "Набрати ""%2"" і код міста перед номером для всіх номерів із кодом міста %1." + 25 "Набрати ""%2"" перед номером для всіх номерів із кодом міста %1." + 26 "Набрати код міста перед номером для всіх номерів із кодом міста %1." + 27 "Набрати лише номер телефону для всіх номерів із кодом міста %1." + 28 "Набрати ""%2"" і код міста перед номером для номерів із кодом міста %1, які містять указані префікси." + 29 "Набрати ""%2"" перед номером для номерів із кодом міста %1, які містять указані префікси." + 30 "Набрати код міста перед номером для номерів із кодом міста %1, які містять указані префікси." + 31 "Набрати лише номер телефону для номерів із кодом міста %1, які містять указані префікси." + 32 "Набрати ""1"" перед набором номера для всіх кодів міст і включити код міста для всіх префіксів." + 33 "Додати префікс" + 34 "Введіть один або декілька префіксів через пробіли або коми." + 35 "Укажіть цифри" + 36 "Введіть одну або декілька цифр (а також * і #), які слід набрати." + 37 "Введено неприпустимий символ.\n\nДозволені цифри від 0 до 9 і пробіл." + 38 "Чекати %1!d! секунд." + 39 "Набрати номер доступу." + 40 "Набрати номер облікового запису." + 41 "Набрати PIN-код." + 42 "Чекати на гудок." + 43 "Чекати на закінчення голосового повідомлення." + 44 "Набрати код країни/регіону, код міста й номер." + 45 "Набрати код країни/регіону й номер." + 46 "Набрати код міста й номер." + 47 "Набрати код країни/регіону." + 48 "Набрати код міста." + 49 "Набрати номер." + 50 "наборі міжміських номерів." + 51 "наборі міжнародних номерів." + 52 "наборі місцевих номерів." + 53 "Для цієї телефонної картки не визначено правил набору номера." + 54 "Слід ввести код оператора міжміського зв'язку для цього розташування." + 55 "Слід ввести ім'я для цього розташування." + 56 "Слід ввести код міста для цього розташування." + 57 "Щоб вимкнути режим очікуючого дзвінка, слід вибрати номер." + 58 "Слід вибрати країну або регіон, з якого ви телефонуєте." + 59 "Відомості відсутні" + 60 "Указане ім'я розташування вже використовується. Введіть унікальне ім'я." + 61 "Відсутні деякі відомості, потрібні для використання цієї телефонної картки. Натисніть кнопку ""Змінити"" і вкажіть потрібні відомості або виберіть іншу картку." + 62 "Слід вибрати телефонну картку, яка використовуватиметься за замовчуванням. Виберіть її зі списку або натисніть кнопку ""Створити"", щоб додати нову картку." + 63 "Слід ввести ім'я телефонної картки." + 64 "Слід ввести обліковий номер." + 65 "Слід ввести PIN-код." + 66 "Для цієї телефонної картки не визначено правил набору номера. Щоб створити правило, виберіть вкладку ""Міжміські"", ""Міжнародні"" або ""Місцеві""." + 67 "Правило для міжміського дзвінка потребує вказання номера доступу для міжміського зв'язку." + 68 "Правило для міжнародного дзвінка потребує вказання номера доступу для міжнародного зв'язку." + 69 "Правило для місцевого дзвінка потребує вказання номера доступу для місцевого зв'язку." + 70 "Немає" + 71 "Ви дійсно бажаєте видалити вибраного постачальника послуг телефонної служби?" + 72 "<немає установлених постачальників послуг>" + 73 "Слід ввести префікси, для яких застосовується це правило." + 74 "&Цифри:" + 75 "&Префікси:" + 76 "Введено неприпустимий символ.\n\nДозволені цифри від 0 до 9, пробіл і кома." + 77 "Підтвердження видалення" + 78 "Ви дійсно бажаєте видалити це розташування?" + 79 "Ви дійсно бажаєте видалити цю картку?" + 80 "Ви дійсно бажаєте видалити це правило?" + 81 "Слід ввести цифри для набору." + 82 "Указане ім'я телефонної картки вже використовується. Введіть унікальне ім'я." + 83 "ReactOS потребує відомостей про розташування, звідки ви телефонуєте. Якщо не вказати ці відомості, програма може неправильно набирати номер. Крім того, деякі додатки реагують на скасування вводу даних, відправляючи їх повторно.\nВи дійсно бажаєте скасувати ввід даних?" + 84 "Підтвердження скасування" + 85 "Моє розташування" + 86 "<немає постачальників послуг доступу для установки>" + 87 "Введено неприпустимий символ.\n\nДозволені цифри від 0 до 9, літери від A до D, *, #, +, !, пробіл і кома." + 88 "Слід ввести код оператора міжнародного зв'язку для цього розташування." + 89 "Слід ввести код оператора зв'язку для цього розташування." + 90 "Ця сторінка намагається зробити або проконтролювати телефонні дзвінки або інші з'єднання, які виконуються на вашому комп'ютері.\nДозволити продовження?" + 91 "Ця сторінка намагається отримати доступ до інформації каталогів у вашій мережі.\nДозволити продовження?" + 92 "Ця сторінка намагається отримати доступ або змінити інформацію про мережні конференції.\nДозволити продовження?" + 93 "Ця сторінка намагається отримати доступ або змінити інформацію в реєстрі.\nДозволити продовження?" + 1064 "Не вдалося відкрити панель керування телефоном і модемом. Можливі неполадки під час запуску телефонної служби." + 1065 "Видалити постачальника" 15800 "23" - 15801 "0,"" "","""","""","""","""","""","""","""","""",1" - 15802 "1,"" AT&T 1010ATT1"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010288"",""1010288"",1" - 15803 "2,""AT&T 1010ATT0"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010288"",""1010288"",1" - 15804 "3,""AT&T 1-800-321-0288"","""",""G"",""J$TFG$TH"",""J$T01EFG$TH"","""","""",""18003210288"",""18003210288"",1" - 15805 "4,"" MCI 10102221"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010222"",""1010222"",1" - 15806 "5,""MCI 10102220"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010222"",""1010222"",1" - 15807 "6,""MCI 1-800-888-8000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18008888000"",""18008888000"",1" - 15808 "7,""MCI 1-800-674-0700"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006740700"",""18006740700"",1" - 15809 "8,""MCI 1-800-674-7000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006747000"",""18006747000"",1" - 15810 "9,"" US Sprint 10103331"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010333"",""1010333"",1" - 15811 "10,""US Sprint 10103330"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010333"",""1010333"",1" - 15812 "11,""US Sprint 1-800-877-8000"","""",""G"",""J,,,T0FG,,H"",""J,,,T01EFG#,H"","""","""",""18008778000"",""18008778000"",1" - 15813 "12,"" 0"","""",""G"",""0FG$TH"",""01EFG$TH"","""","""","""","""",1" + 15801 "0,""Не використовується"","""","""","""","""","""","""","""","""",1" + 15802 "1,""Прямий канал AT&T через 1010ATT1"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010288"",""1010288"",1" + 15803 "2,""AT&T через 1010ATT0"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010288"",""1010288"",1" + 15804 "3,""AT&T через 1-800-321-0288"","""",""G"",""J$TFG$TH"",""J$T01EFG$TH"","""","""",""18003210288"",""18003210288"",1" + 15805 "4,""Прямий канал MCI через 10102221"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010222"",""1010222"",1" + 15806 "5,""MCI через 10102220"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010222"",""1010222"",1" + 15807 "6,""MCI через 1-800-888-8000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18008888000"",""18008888000"",1" + 15808 "7,""MCI через 1-800-674-0700"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006740700"",""18006740700"",1" + 15809 "8,""MCI через 1-800-674-7000"","""",""G"",""J,,,,,,TH,,FG"",""J,,,,,,TH,,011EFG"","""","""",""18006747000"",""18006747000"",1" + 15810 "9,""Прямий канал US Sprint через 10103331"","""",""G"",""J1FG"",""J011EFG"","""","""",""1010333"",""1010333"",1" + 15811 "10,""US Sprint через 10103330"","""",""G"",""J0FG$TH"",""J01EFG$TH"","""","""",""1010333"",""1010333"",1" + 15812 "11,""US Sprint через 1-800-877-8000"","""",""G"",""J,,,T0FG,,H"",""J,,,T01EFG#,H"","""","""",""18008778000"",""18008778000"",1" + 15813 "12,""Телефонна картка через 0"","""",""G"",""0FG$TH"",""01EFG$TH"","""","""","""","""",1" 15814 "13,""Carte France Telecom"","""",""T3010,H,0FG#"",""T3010,H,0FG#"",""T3010,H,00EFG#"","""","""","""","""",1" - 15815 "14,""Mercury ()"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,0FG"","""",""0500800800"",""0500800800"",""0500800800"",1" - 15816 "15,""British Telecom ()"","""",""J$H,0FG"",""J$H,0FG"",""J$H,00EFG"","""",""144"",""144"".""144"",1" - 15817 "16,""CLEAR Communications ( )"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,00EFG"","""",""0502333"",""0502333"",""0502333"",1" - 15818 "17,""Telecom ( )"","""",""J,0FG?H"",""J,0FG?H"",""J,00EFG?H"","""",""012"",""012"",""012"",1" - 15819 "18,""Global Card ( - )"","""",""G"",""0FG"",""J,102880$TFG$H"","""","""","""",""0080"",1" - 15820 "19,""Telstra () 1818 ()"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0011EFG#"","""",""1818"",""1818"",""1818"",1" - 15821 "20,""Telstra () 1818 ()"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0015EFG#"","""",""1818"",""1818"",""1818"",1" - 15822 "21,""Optus () 1812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""1812"",1" - 15823 "22,""Optus () 008551812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""008551812"",1" + 15815 "14,""Mercury (Великобританія)"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,0FG"","""",""0500800800"",""0500800800"",""0500800800"",1" + 15816 "15,""British Telecom (Великобританія)"","""",""J$H,0FG"",""J$H,0FG"",""J$H,00EFG"","""",""144"",""144"".""144"",1" + 15817 "16,""CLEAR Communications (Нова Зеландія)"","""",""J$TH,0FG"",""J$TH,0FG"",""J$TH,00EFG"","""",""0502333"",""0502333"",""0502333"",1" + 15818 "17,""Telecom (Нова Зеландія)"","""",""J,0FG?H"",""J,0FG?H"",""J,00EFG?H"","""",""012"",""012"",""012"",1" + 15819 "18,""Global Card (Тайвань - США)"","""",""G"",""0FG"",""J,102880$TFG$H"","""","""","""",""0080"",1" + 15820 "19,""Telstra (Австралія) через 1818 (голосом)"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0011EFG#"","""",""1818"",""1818"",""1818"",1" + 15821 "20,""Telstra (Австралія) через 1818 (факс)"","""",""J$TH,FG#"",""J$TH,FG#"",""J$TH,0015EFG#"","""",""1818"",""1818"",""1818"",1" + 15822 "21,""Optus (Австралія) через 1812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""1812"",1" + 15823 "22,""Optus (Австралія) через 008551812"","""",""FG"",""FG"",""J@TH,0011EFG"","""","""","""",""008551812"",1" END diff --git a/dll/win32/tapiui/tapiui.rc b/dll/win32/tapiui/tapiui.rc index 0546f0fc681..df707fbbfcc 100644 --- a/dll/win32/tapiui/tapiui.rc +++ b/dll/win32/tapiui/tapiui.rc @@ -18,6 +18,9 @@ IDB_WIZARD BITMAP "res/302.bmp" #include "lang/de-DE.rc" #include "lang/en-US.rc" #include "lang/no-NO.rc" + +// UTF-8 +#pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/twain_32/CMakeLists.txt b/dll/win32/twain_32/CMakeLists.txt index 5eb3ac68cf3..597903e8867 100644 --- a/dll/win32/twain_32/CMakeLists.txt +++ b/dll/win32/twain_32/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - spec2def(twain_32.dll twain_32.spec) list(APPEND SOURCE diff --git a/dll/win32/ufatx/CMakeLists.txt b/dll/win32/ufatx/CMakeLists.txt index 8cf783e9fab..98369440c6e 100644 --- a/dll/win32/ufatx/CMakeLists.txt +++ b/dll/win32/ufatx/CMakeLists.txt @@ -9,8 +9,8 @@ add_library(ufatx SHARED ${SOURCE}) set_entrypoint(ufatx 0) -target_link_libraries(ufatx vfatxlib -lgcc) -add_importlibs(ufatx kernel32 ntdll) +target_link_libraries(ufatx vfatxlib) +add_importlibs(ufatx msvcrt kernel32 ntdll) add_importlib_target(ufatx.spec) add_dependencies(ufatx psdk) add_cd_file(TARGET ufatx DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/unicows/CMakeLists.txt b/dll/win32/unicows/CMakeLists.txt index 27ecb838a7d..1abe3c6c9d6 100644 --- a/dll/win32/unicows/CMakeLists.txt +++ b/dll/win32/unicows/CMakeLists.txt @@ -24,6 +24,7 @@ add_importlibs(unicows mpr gdi32 advapi32 + msvcrt kernel32 ntdll) add_cd_file(TARGET unicows DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/updspapi/updspapi.spec b/dll/win32/updspapi/updspapi.spec index dc6b25f0471..17c393ee857 100644 --- a/dll/win32/updspapi/updspapi.spec +++ b/dll/win32/updspapi/updspapi.spec @@ -67,12 +67,12 @@ @ stub UpdSpSetDynamicStringExA @ stub UpdSpSetDynamicStringExW @ stub UpdSpSetDynamicStringW -@ stdcall UpdSpStringTableAddString(ptr wstr long) setupapi.StringTableAddString -@ stdcall UpdSpStringTableAddStringEx(ptr wstr long ptr long) setupapi.StringTableAddStringEx -@ stdcall UpdSpStringTableDestroy(ptr) setupapi.StringTableDestroy +@ stdcall UpdSpStringTableAddString(ptr wstr long) setupapi.pSetupStringTableAddString +@ stdcall UpdSpStringTableAddStringEx(ptr wstr long ptr long) setupapi.pSetupStringTableAddStringEx +@ stdcall UpdSpStringTableDestroy(ptr) setupapi.pSetupStringTableDestroy @ stub UpdSpStringTableEnum -@ stdcall UpdSpStringTableInitialize() setupapi.StringTableInitialize -@ stdcall UpdSpStringTableInitializeEx(long long) setupapi.StringTableInitializeEx -@ stdcall UpdSpStringTableLookUpString(ptr wstr long) setupapi.StringTableLookUpString -@ stdcall UpdSpStringTableLookUpStringEx(ptr wstr long ptr long) setupapi.StringTableLookUpStringEx +@ stdcall UpdSpStringTableInitialize() setupapi.pSetupStringTableInitialize +@ stdcall UpdSpStringTableInitializeEx(long long) setupapi.pSetupStringTableInitializeEx +@ stdcall UpdSpStringTableLookUpString(ptr wstr long) setupapi.pSetupStringTableLookUpString +@ stdcall UpdSpStringTableLookUpStringEx(ptr wstr long ptr long) setupapi.pSetupStringTableLookUpStringEx @ stdcall UpdSpTermDefaultQueueCallback(ptr) setupapi.SetupTermDefaultQueueCallback diff --git a/dll/win32/urlmon/CMakeLists.txt b/dll/win32/urlmon/CMakeLists.txt index 76abc2893e1..99a95265ae4 100644 --- a/dll/win32/urlmon/CMakeLists.txt +++ b/dll/win32/urlmon/CMakeLists.txt @@ -27,7 +27,6 @@ list(APPEND SOURCE mk.c protocol.c protproxy.c - regsvr.c sec_mgr.c session.c umon.c @@ -73,5 +72,8 @@ add_definitions( add_definitions(-DPROXY_CLSID_IS="{0x79EAC9F1,0xBAF9,0x11CE,{0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B}}") -add_cd_file(TARGET urlmon DESTINATION reactos/system32 FOR all) +if(NOT MSVC) + # FIXME: msvc build + add_cd_file(TARGET urlmon DESTINATION reactos/system32 FOR all) +endif() add_importlib_target(urlmon.spec) diff --git a/dll/win32/urlmon/bindctx.c b/dll/win32/urlmon/bindctx.c index b08eb80e7a5..1af7fa7a129 100644 --- a/dll/win32/urlmon/bindctx.c +++ b/dll/win32/urlmon/bindctx.c @@ -28,10 +28,10 @@ static WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_ extern IID IID_IBindStatusCallbackHolder; typedef struct { - const IBindStatusCallbackExVtbl *lpBindStatusCallbackExVtbl; - const IServiceProviderVtbl *lpServiceProviderVtbl; - const IHttpNegotiate2Vtbl *lpHttpNegotiate2Vtbl; - const IAuthenticateVtbl *lpAuthenticateVtbl; + IBindStatusCallbackEx IBindStatusCallbackEx_iface; + IServiceProvider IServiceProvider_iface; + IHttpNegotiate2 IHttpNegotiate2_iface; + IAuthenticate IAuthenticate_iface; LONG ref; @@ -39,12 +39,6 @@ typedef struct { IServiceProvider *serv_prov; } BindStatusCallback; -#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackExVtbl) -#define STATUSCLBEX(x) ((IBindStatusCallbackEx*)&(x)->lpBindStatusCallbackExVtbl) -#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) -#define HTTPNEG2(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl) -#define AUTHENTICATE(x) ((IAuthenticate*) &(x)->lpAuthenticateVtbl) - static void *get_callback_iface(BindStatusCallback *This, REFIID riid) { void *ret; @@ -57,39 +51,42 @@ static void *get_callback_iface(BindStatusCallback *This, REFIID riid) return SUCCEEDED(hres) ? ret : NULL; } -#define STATUSCLB_THIS(iface) DEFINE_THIS(BindStatusCallback, BindStatusCallbackEx, iface) +static inline BindStatusCallback *impl_from_IBindStatusCallbackEx(IBindStatusCallbackEx *iface) +{ + return CONTAINING_RECORD(iface, BindStatusCallback, IBindStatusCallbackEx_iface); +} static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown, %p)\n", This, ppv); - *ppv = STATUSCLB(This); + *ppv = &This->IBindStatusCallbackEx_iface; }else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) { TRACE("(%p)->(IID_IBindStatusCallback, %p)\n", This, ppv); - *ppv = STATUSCLB(This); + *ppv = &This->IBindStatusCallbackEx_iface; }else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid)) { TRACE("(%p)->(IID_IBindStatusCallback, %p)\n", This, ppv); - *ppv = STATUSCLBEX(This); + *ppv = &This->IBindStatusCallbackEx_iface; }else if(IsEqualGUID(&IID_IBindStatusCallbackHolder, riid)) { TRACE("(%p)->(IID_IBindStatusCallbackHolder, %p)\n", This, ppv); *ppv = This; }else if(IsEqualGUID(&IID_IServiceProvider, riid)) { TRACE("(%p)->(IID_IServiceProvider, %p)\n", This, ppv); - *ppv = SERVPROV(This); + *ppv = &This->IServiceProvider_iface; }else if(IsEqualGUID(&IID_IHttpNegotiate, riid)) { TRACE("(%p)->(IID_IHttpNegotiate, %p)\n", This, ppv); - *ppv = HTTPNEG2(This); + *ppv = &This->IHttpNegotiate2_iface; }else if(IsEqualGUID(&IID_IHttpNegotiate2, riid)) { TRACE("(%p)->(IID_IHttpNegotiate2, %p)\n", This, ppv); - *ppv = HTTPNEG2(This); + *ppv = &This->IHttpNegotiate2_iface; }else if(IsEqualGUID(&IID_IAuthenticate, riid)) { TRACE("(%p)->(IID_IAuthenticate, %p)\n", This, ppv); - *ppv = AUTHENTICATE(This); + *ppv = &This->IAuthenticate_iface; } if(*ppv) { @@ -103,7 +100,7 @@ static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallbackEx *i static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallbackEx *iface) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref = %d\n", This, ref); @@ -113,7 +110,7 @@ static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallbackEx *iface) static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallbackEx *iface) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref = %d\n", This, ref); @@ -131,7 +128,7 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallbackEx *iface) static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallbackEx *iface, DWORD dwReserved, IBinding *pbind) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); TRACE("(%p)->(%d %p)\n", This, dwReserved, pbind); @@ -140,7 +137,7 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallbackEx *i static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallbackEx *iface, LONG *pnPriority) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); TRACE("(%p)->(%p)\n", This, pnPriority); @@ -149,7 +146,7 @@ static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallbackEx *ifac static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallbackEx *iface, DWORD reserved) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); TRACE("(%p)->(%d)\n", This, reserved); @@ -159,7 +156,7 @@ static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallbackEx *if static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallbackEx *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); TRACE("%p)->(%u %u %u %s)\n", This, ulProgress, ulProgressMax, ulStatusCode, debugstr_w(szStatusText)); @@ -171,7 +168,7 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallbackEx *iface static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallbackEx *iface, HRESULT hresult, LPCWSTR szError) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError)); @@ -181,7 +178,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallbackEx *if static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); IBindStatusCallbackEx *bscex; HRESULT hres; @@ -203,7 +200,7 @@ static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallbackEx *ifac static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallbackEx *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); TRACE("(%p)->(%08x %d %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed); @@ -213,7 +210,7 @@ static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallbackEx * static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallbackEx *iface, REFIID riid, IUnknown *punk) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), punk); @@ -223,7 +220,7 @@ static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallbackEx static HRESULT WINAPI BindStatusCallback_GetBindInfoEx(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo, DWORD *grfBINDF2, DWORD *pdwReserved) { - BindStatusCallback *This = STATUSCLB_THIS(iface); + BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface); IBindStatusCallbackEx *bscex; HRESULT hres; @@ -240,8 +237,6 @@ static HRESULT WINAPI BindStatusCallback_GetBindInfoEx(IBindStatusCallbackEx *if return hres; } -#undef STATUSCLB_THIS - static const IBindStatusCallbackExVtbl BindStatusCallbackExVtbl = { BindStatusCallback_QueryInterface, BindStatusCallback_AddRef, @@ -257,46 +252,49 @@ static const IBindStatusCallbackExVtbl BindStatusCallbackExVtbl = { BindStatusCallback_GetBindInfoEx }; -#define SERVPROV_THIS(iface) DEFINE_THIS(BindStatusCallback, ServiceProvider, iface) +static inline BindStatusCallback *impl_from_IServiceProvider(IServiceProvider *iface) +{ + return CONTAINING_RECORD(iface, BindStatusCallback, IServiceProvider_iface); +} static HRESULT WINAPI BSCServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) { - BindStatusCallback *This = SERVPROV_THIS(iface); - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); + BindStatusCallback *This = impl_from_IServiceProvider(iface); + return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } static ULONG WINAPI BSCServiceProvider_AddRef(IServiceProvider *iface) { - BindStatusCallback *This = SERVPROV_THIS(iface); - return IBindStatusCallback_AddRef(STATUSCLB(This)); + BindStatusCallback *This = impl_from_IServiceProvider(iface); + return IBindStatusCallback_AddRef(&This->IBindStatusCallbackEx_iface); } static ULONG WINAPI BSCServiceProvider_Release(IServiceProvider *iface) { - BindStatusCallback *This = SERVPROV_THIS(iface); - return IBindStatusCallback_Release(STATUSCLB(This)); + BindStatusCallback *This = impl_from_IServiceProvider(iface); + return IBindStatusCallback_Release(&This->IBindStatusCallbackEx_iface); } static HRESULT WINAPI BSCServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv) { - BindStatusCallback *This = SERVPROV_THIS(iface); + BindStatusCallback *This = impl_from_IServiceProvider(iface); HRESULT hres; if(IsEqualGUID(&IID_IHttpNegotiate, guidService)) { TRACE("(%p)->(IID_IHttpNegotiate %s %p)\n", This, debugstr_guid(riid), ppv); - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); + return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } if(IsEqualGUID(&IID_IHttpNegotiate2, guidService)) { TRACE("(%p)->(IID_IHttpNegotiate2 %s %p)\n", This, debugstr_guid(riid), ppv); - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); + return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } if(IsEqualGUID(&IID_IAuthenticate, guidService)) { TRACE("(%p)->(IID_IAuthenticate %s %p)\n", This, debugstr_guid(riid), ppv); - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); + return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); @@ -314,8 +312,6 @@ static HRESULT WINAPI BSCServiceProvider_QueryService(IServiceProvider *iface, return E_NOINTERFACE; } -#undef SERVPROV_THIS - static const IServiceProviderVtbl BSCServiceProviderVtbl = { BSCServiceProvider_QueryInterface, BSCServiceProvider_AddRef, @@ -323,31 +319,34 @@ static const IServiceProviderVtbl BSCServiceProviderVtbl = { BSCServiceProvider_QueryService }; -#define HTTPNEG2_THIS(iface) DEFINE_THIS(BindStatusCallback, HttpNegotiate2, iface) +static inline BindStatusCallback *impl_from_IHttpNegotiate2(IHttpNegotiate2 *iface) +{ + return CONTAINING_RECORD(iface, BindStatusCallback, IHttpNegotiate2_iface); +} static HRESULT WINAPI BSCHttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv) { - BindStatusCallback *This = HTTPNEG2_THIS(iface); - return IBindStatusCallback_QueryInterface(STATUSCLB(This), riid, ppv); + BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); + return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } static ULONG WINAPI BSCHttpNegotiate_AddRef(IHttpNegotiate2 *iface) { - BindStatusCallback *This = HTTPNEG2_THIS(iface); - return IBindStatusCallback_AddRef(STATUSCLB(This)); + BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); + return IBindStatusCallback_AddRef(&This->IBindStatusCallbackEx_iface); } static ULONG WINAPI BSCHttpNegotiate_Release(IHttpNegotiate2 *iface) { - BindStatusCallback *This = HTTPNEG2_THIS(iface); - return IBindStatusCallback_Release(STATUSCLB(This)); + BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); + return IBindStatusCallback_Release(&This->IBindStatusCallbackEx_iface); } static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders) { - BindStatusCallback *This = HTTPNEG2_THIS(iface); + BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); IHttpNegotiate *http_negotiate; HRESULT hres = S_OK; @@ -370,7 +369,7 @@ static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders) { - BindStatusCallback *This = HTTPNEG2_THIS(iface); + BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); LPWSTR additional_headers = NULL; IHttpNegotiate *http_negotiate; HRESULT hres = S_OK; @@ -396,7 +395,7 @@ static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD static HRESULT WINAPI BSCHttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved) { - BindStatusCallback *This = HTTPNEG2_THIS(iface); + BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); IHttpNegotiate2 *http_negotiate2; HRESULT hres = E_FAIL; @@ -412,8 +411,6 @@ static HRESULT WINAPI BSCHttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, return hres; } -#undef HTTPNEG2_THIS - static const IHttpNegotiate2Vtbl BSCHttpNegotiateVtbl = { BSCHttpNegotiate_QueryInterface, BSCHttpNegotiate_AddRef, @@ -423,36 +420,37 @@ static const IHttpNegotiate2Vtbl BSCHttpNegotiateVtbl = { BSCHttpNegotiate_GetRootSecurityId }; -#define AUTHENTICATE_THIS(iface) DEFINE_THIS(BindStatusCallback, Authenticate, iface) +static inline BindStatusCallback *impl_from_IAuthenticate(IAuthenticate *iface) +{ + return CONTAINING_RECORD(iface, BindStatusCallback, IAuthenticate_iface); +} static HRESULT WINAPI BSCAuthenticate_QueryInterface(IAuthenticate *iface, REFIID riid, void **ppv) { - BindStatusCallback *This = AUTHENTICATE_THIS(iface); - return IBindStatusCallback_QueryInterface(AUTHENTICATE(This), riid, ppv); + BindStatusCallback *This = impl_from_IAuthenticate(iface); + return IBindStatusCallback_QueryInterface(&This->IAuthenticate_iface, riid, ppv); } static ULONG WINAPI BSCAuthenticate_AddRef(IAuthenticate *iface) { - BindStatusCallback *This = AUTHENTICATE_THIS(iface); - return IBindStatusCallback_AddRef(STATUSCLB(This)); + BindStatusCallback *This = impl_from_IAuthenticate(iface); + return IBindStatusCallback_AddRef(&This->IBindStatusCallbackEx_iface); } static ULONG WINAPI BSCAuthenticate_Release(IAuthenticate *iface) { - BindStatusCallback *This = AUTHENTICATE_THIS(iface); - return IBindStatusCallback_Release(STATUSCLB(This)); + BindStatusCallback *This = impl_from_IAuthenticate(iface); + return IBindStatusCallback_Release(&This->IBindStatusCallbackEx_iface); } static HRESULT WINAPI BSCAuthenticate_Authenticate(IAuthenticate *iface, HWND *phwnd, LPWSTR *pszUsername, LPWSTR *pszPassword) { - BindStatusCallback *This = AUTHENTICATE_THIS(iface); + BindStatusCallback *This = impl_from_IAuthenticate(iface); FIXME("(%p)->(%p %p %p)\n", This, phwnd, pszUsername, pszPassword); return E_NOTIMPL; } -#undef AUTHENTICATE_THIS - static const IAuthenticateVtbl BSCAuthenticateVtbl = { BSCAuthenticate_QueryInterface, BSCAuthenticate_AddRef, @@ -485,15 +483,15 @@ HRESULT wrap_callback(IBindStatusCallback *bsc, IBindStatusCallback **ret_iface) if(!ret) return E_OUTOFMEMORY; - ret->lpBindStatusCallbackExVtbl = &BindStatusCallbackExVtbl; - ret->lpServiceProviderVtbl = &BSCServiceProviderVtbl; - ret->lpHttpNegotiate2Vtbl = &BSCHttpNegotiateVtbl; - ret->lpAuthenticateVtbl = &BSCAuthenticateVtbl; + ret->IBindStatusCallbackEx_iface.lpVtbl = &BindStatusCallbackExVtbl; + ret->IServiceProvider_iface.lpVtbl = &BSCServiceProviderVtbl; + ret->IHttpNegotiate2_iface.lpVtbl = &BSCHttpNegotiateVtbl; + ret->IAuthenticate_iface.lpVtbl = &BSCAuthenticateVtbl; ret->ref = 1; set_callback(ret, bsc); - *ret_iface = STATUSCLB(ret); + *ret_iface = (IBindStatusCallback*)&ret->IBindStatusCallbackEx_iface; return S_OK; } @@ -541,7 +539,7 @@ HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pb set_callback(holder, pbsc); IBindStatusCallback_Release(bsc); - IBindStatusCallback_Release(STATUSCLB(holder)); + IBindStatusCallback_Release(&holder->IBindStatusCallbackEx_iface); return S_OK; }else { prev = bsc; @@ -605,7 +603,7 @@ HRESULT WINAPI RevokeBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc if(SUCCEEDED(hres)) { if(pbsc == holder->callback) dorevoke = TRUE; - IBindStatusCallback_Release(STATUSCLB(holder)); + IBindStatusCallback_Release(&holder->IBindStatusCallbackEx_iface); }else if(pbsc == callback) { dorevoke = TRUE; } @@ -618,32 +616,33 @@ HRESULT WINAPI RevokeBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc } typedef struct { - const IBindCtxVtbl *lpBindCtxVtbl; + IBindCtx IBindCtx_iface; LONG ref; IBindCtx *bindctx; } AsyncBindCtx; -#define BINDCTX(x) ((IBindCtx*) &(x)->lpBindCtxVtbl) - -#define BINDCTX_THIS(iface) DEFINE_THIS(AsyncBindCtx, BindCtx, iface) +static inline AsyncBindCtx *impl_from_IBindCtx(IBindCtx *iface) +{ + return CONTAINING_RECORD(iface, AsyncBindCtx, IBindCtx_iface); +} static HRESULT WINAPI AsyncBindCtx_QueryInterface(IBindCtx *iface, REFIID riid, void **ppv) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); *ppv = NULL; if(IsEqualGUID(riid, &IID_IUnknown)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = BINDCTX(This); + *ppv = &This->IBindCtx_iface; }else if(IsEqualGUID(riid, &IID_IBindCtx)) { TRACE("(%p)->(IID_IBindCtx %p)\n", This, ppv); - *ppv = BINDCTX(This); + *ppv = &This->IBindCtx_iface; }else if(IsEqualGUID(riid, &IID_IAsyncBindCtx)) { TRACE("(%p)->(IID_IAsyncBindCtx %p)\n", This, ppv); - *ppv = BINDCTX(This); + *ppv = &This->IBindCtx_iface; } if(*ppv) { @@ -657,7 +656,7 @@ static HRESULT WINAPI AsyncBindCtx_QueryInterface(IBindCtx *iface, REFIID riid, static ULONG WINAPI AsyncBindCtx_AddRef(IBindCtx *iface) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -667,7 +666,7 @@ static ULONG WINAPI AsyncBindCtx_AddRef(IBindCtx *iface) static ULONG WINAPI AsyncBindCtx_Release(IBindCtx *iface) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -682,7 +681,7 @@ static ULONG WINAPI AsyncBindCtx_Release(IBindCtx *iface) static HRESULT WINAPI AsyncBindCtx_RegisterObjectBound(IBindCtx *iface, IUnknown *punk) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%p)\n", This, punk); @@ -691,7 +690,7 @@ static HRESULT WINAPI AsyncBindCtx_RegisterObjectBound(IBindCtx *iface, IUnknown static HRESULT WINAPI AsyncBindCtx_RevokeObjectBound(IBindCtx *iface, IUnknown *punk) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p %p)\n", This, punk); @@ -700,7 +699,7 @@ static HRESULT WINAPI AsyncBindCtx_RevokeObjectBound(IBindCtx *iface, IUnknown * static HRESULT WINAPI AsyncBindCtx_ReleaseBoundObjects(IBindCtx *iface) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)\n", This); @@ -709,7 +708,7 @@ static HRESULT WINAPI AsyncBindCtx_ReleaseBoundObjects(IBindCtx *iface) static HRESULT WINAPI AsyncBindCtx_SetBindOptions(IBindCtx *iface, BIND_OPTS *pbindopts) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%p)\n", This, pbindopts); @@ -718,7 +717,7 @@ static HRESULT WINAPI AsyncBindCtx_SetBindOptions(IBindCtx *iface, BIND_OPTS *pb static HRESULT WINAPI AsyncBindCtx_GetBindOptions(IBindCtx *iface, BIND_OPTS *pbindopts) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%p)\n", This, pbindopts); @@ -727,7 +726,7 @@ static HRESULT WINAPI AsyncBindCtx_GetBindOptions(IBindCtx *iface, BIND_OPTS *pb static HRESULT WINAPI AsyncBindCtx_GetRunningObjectTable(IBindCtx *iface, IRunningObjectTable **pprot) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%p)\n", This, pprot); @@ -736,7 +735,7 @@ static HRESULT WINAPI AsyncBindCtx_GetRunningObjectTable(IBindCtx *iface, IRunni static HRESULT WINAPI AsyncBindCtx_RegisterObjectParam(IBindCtx *iface, LPOLESTR pszkey, IUnknown *punk) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_w(pszkey), punk); @@ -745,7 +744,7 @@ static HRESULT WINAPI AsyncBindCtx_RegisterObjectParam(IBindCtx *iface, LPOLESTR static HRESULT WINAPI AsyncBindCtx_GetObjectParam(IBindCtx* iface, LPOLESTR pszkey, IUnknown **punk) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_w(pszkey), punk); @@ -754,7 +753,7 @@ static HRESULT WINAPI AsyncBindCtx_GetObjectParam(IBindCtx* iface, LPOLESTR pszk static HRESULT WINAPI AsyncBindCtx_RevokeObjectParam(IBindCtx *iface, LPOLESTR pszkey) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%s)\n", This, debugstr_w(pszkey)); @@ -763,15 +762,13 @@ static HRESULT WINAPI AsyncBindCtx_RevokeObjectParam(IBindCtx *iface, LPOLESTR p static HRESULT WINAPI AsyncBindCtx_EnumObjectParam(IBindCtx *iface, IEnumString **pszkey) { - AsyncBindCtx *This = BINDCTX_THIS(iface); + AsyncBindCtx *This = impl_from_IBindCtx(iface); TRACE("(%p)->(%p)\n", This, pszkey); return IBindCtx_EnumObjectParam(This->bindctx, pszkey); } -#undef BINDCTX_THIS - static const IBindCtxVtbl AsyncBindCtxVtbl = { AsyncBindCtx_QueryInterface, @@ -878,16 +875,16 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options, ret = heap_alloc(sizeof(AsyncBindCtx)); - ret->lpBindCtxVtbl = &AsyncBindCtxVtbl; + ret->IBindCtx_iface.lpVtbl = &AsyncBindCtxVtbl; ret->ref = 1; ret->bindctx = bindctx; - hres = init_bindctx(BINDCTX(ret), options, callback, format); + hres = init_bindctx(&ret->IBindCtx_iface, options, callback, format); if(FAILED(hres)) { - IBindCtx_Release(BINDCTX(ret)); + IBindCtx_Release(&ret->IBindCtx_iface); return hres; } - *pbind = BINDCTX(ret); + *pbind = &ret->IBindCtx_iface; return S_OK; } diff --git a/dll/win32/urlmon/binding.c b/dll/win32/urlmon/binding.c index 699bf98a76d..5504f6f2f4b 100644 --- a/dll/win32/urlmon/binding.c +++ b/dll/win32/urlmon/binding.c @@ -27,27 +27,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); static WCHAR cbinding_contextW[] = {'C','B','i','n','d','i','n','g',' ','C','o','n','t','e','x','t',0}; static WCHAR bscb_holderW[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 }; -typedef struct Binding Binding; - -struct _task_header_t; - -typedef void (*task_proc_t)(Binding*, struct _task_header_t*); - -typedef struct _task_header_t { - task_proc_t proc; - struct _task_header_t *next; -} task_header_t; - typedef struct { - const IUnknownVtbl *lpUnknownVtbl; + IUnknown IUnknown_iface; LONG ref; IInternetProtocolEx *protocol; - BYTE buf[1024*8]; - DWORD size; - BOOL init; HANDLE file; HRESULT hres; @@ -66,8 +52,6 @@ struct _stgmed_obj_t { const stgmed_obj_vtbl *vtbl; }; -#define STGMEDUNK(x) ((IUnknown*) &(x)->lpUnknownVtbl) - typedef enum { BEFORE_DOWNLOAD, DOWNLOADING, @@ -79,19 +63,20 @@ typedef enum { #define BINDING_OBJAVAIL 0x0004 #define BINDING_ABORTED 0x0008 -struct Binding { - const IBindingVtbl *lpBindingVtbl; - const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl; - const IInternetBindInfoVtbl *lpInternetBindInfoVtbl; - const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl; - const IServiceProviderVtbl *lpServiceProviderVtbl; +typedef struct { + IBinding IBinding_iface; + IInternetProtocolSink IInternetProtocolSink_iface; + IInternetBindInfo IInternetBindInfo_iface; + IWinInetHttpInfo IWinInetHttpInfo_iface; + IServiceProvider IServiceProvider_iface; LONG ref; IBindStatusCallback *callback; - IInternetProtocolEx *protocol; IServiceProvider *service_provider; + BindProtocol *protocol; + stgmed_buf_t *stgmed_buf; stgmed_obj_t *stgmed_obj; @@ -114,29 +99,7 @@ struct Binding { HWND notif_hwnd; CRITICAL_SECTION section; -}; - -#define BINDING(x) ((IBinding*) &(x)->lpBindingVtbl) -#define BINDINF(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl) -#define INETINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl) -#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) - -#define STREAM(x) ((IStream*) &(x)->lpStreamVtbl) -#define HTTPNEG2(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl) - -static void fill_stgmed_buffer(stgmed_buf_t *buf) -{ - DWORD read = 0; - - if(sizeof(buf->buf) == buf->size) - return; - - buf->hres = IInternetProtocol_Read(buf->protocol, buf->buf+buf->size, - sizeof(buf->buf)-buf->size, &read); - buf->size += read; - if(read > 0) - buf->init = TRUE; -} +} Binding; static void read_protocol_data(stgmed_buf_t *stgmed_buf) { @@ -144,10 +107,6 @@ static void read_protocol_data(stgmed_buf_t *stgmed_buf) DWORD read; HRESULT hres; - fill_stgmed_buffer(stgmed_buf); - if(stgmed_buf->size < sizeof(stgmed_buf->buf)) - return; - do hres = IInternetProtocol_Read(stgmed_buf->protocol, buf, sizeof(buf), &read); while(hres == S_OK); } @@ -212,7 +171,7 @@ static void mime_available(Binding *This, LPCWSTR mime) static void stop_binding(Binding *binding, HRESULT hres, LPCWSTR str) { if(binding->state & BINDING_LOCKED) { - IInternetProtocol_UnlockRequest(binding->protocol); + IInternetProtocolEx_UnlockRequest(&binding->protocol->IInternetProtocolEx_iface); binding->state &= ~BINDING_LOCKED; } @@ -281,7 +240,7 @@ static void load_doc_mon(Binding *binding, IPersistMoniker *persist) } IBindCtx_RevokeObjectParam(bctx, bscb_holderW); - IBindCtx_RegisterObjectParam(bctx, cbinding_contextW, (IUnknown*)BINDING(binding)); + IBindCtx_RegisterObjectParam(bctx, cbinding_contextW, (IUnknown*)&binding->IBinding_iface); hres = IPersistMoniker_Load(persist, binding->download_state == END_DOWNLOAD, binding->mon, bctx, 0x12); IBindCtx_RevokeObjectParam(bctx, cbinding_contextW); @@ -354,7 +313,7 @@ static void create_object(Binding *binding) stop_binding(binding, hres, NULL); if(FAILED(hres)) - IInternetProtocol_Terminate(binding->protocol, 0); + IInternetProtocolEx_Terminate(&binding->protocol->IInternetProtocolEx_iface, 0); } static void cache_file_available(Binding *This, const WCHAR *file_name) @@ -370,19 +329,22 @@ static void cache_file_available(Binding *This, const WCHAR *file_name) } } -#define STGMEDUNK_THIS(iface) DEFINE_THIS(stgmed_buf_t, Unknown, iface) +static inline stgmed_buf_t *impl_from_IUnknown(IUnknown *iface) +{ + return CONTAINING_RECORD(iface, stgmed_buf_t, IUnknown_iface); +} static HRESULT WINAPI StgMedUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) { - stgmed_buf_t *This = STGMEDUNK_THIS(iface); + stgmed_buf_t *This = impl_from_IUnknown(iface); *ppv = NULL; if(IsEqualGUID(riid, &IID_IUnknown)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = STGMEDUNK(This); - IUnknown_AddRef(STGMEDUNK(This)); + *ppv = &This->IUnknown_iface; + IUnknown_AddRef(&This->IUnknown_iface); return S_OK; } @@ -392,7 +354,7 @@ static HRESULT WINAPI StgMedUnk_QueryInterface(IUnknown *iface, REFIID riid, voi static ULONG WINAPI StgMedUnk_AddRef(IUnknown *iface) { - stgmed_buf_t *This = STGMEDUNK_THIS(iface); + stgmed_buf_t *This = impl_from_IUnknown(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -402,7 +364,7 @@ static ULONG WINAPI StgMedUnk_AddRef(IUnknown *iface) static ULONG WINAPI StgMedUnk_Release(IUnknown *iface) { - stgmed_buf_t *This = STGMEDUNK_THIS(iface); + stgmed_buf_t *This = impl_from_IUnknown(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -420,8 +382,6 @@ static ULONG WINAPI StgMedUnk_Release(IUnknown *iface) return ref; } -#undef STGMEDUNK_THIS - static const IUnknownVtbl StgMedUnkVtbl = { StgMedUnk_QueryInterface, StgMedUnk_AddRef, @@ -432,10 +392,8 @@ static stgmed_buf_t *create_stgmed_buf(IInternetProtocolEx *protocol) { stgmed_buf_t *ret = heap_alloc(sizeof(*ret)); - ret->lpUnknownVtbl = &StgMedUnkVtbl; + ret->IUnknown_iface.lpVtbl = &StgMedUnkVtbl; ret->ref = 1; - ret->size = 0; - ret->init = FALSE; ret->file = INVALID_HANDLE_VALUE; ret->hres = S_OK; ret->cache_file = NULL; @@ -450,35 +408,38 @@ static stgmed_buf_t *create_stgmed_buf(IInternetProtocolEx *protocol) typedef struct { stgmed_obj_t stgmed_obj; - const IStreamVtbl *lpStreamVtbl; + IStream IStream_iface; LONG ref; stgmed_buf_t *buf; } ProtocolStream; -#define STREAM_THIS(iface) DEFINE_THIS(ProtocolStream, Stream, iface) +static inline ProtocolStream *impl_from_IStream(IStream *iface) +{ + return CONTAINING_RECORD(iface, ProtocolStream, IStream_iface); +} static HRESULT WINAPI ProtocolStream_QueryInterface(IStream *iface, REFIID riid, void **ppv) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = STREAM(This); + *ppv = &This->IStream_iface; }else if(IsEqualGUID(&IID_ISequentialStream, riid)) { TRACE("(%p)->(IID_ISequentialStream %p)\n", This, ppv); - *ppv = STREAM(This); + *ppv = &This->IStream_iface; }else if(IsEqualGUID(&IID_IStream, riid)) { TRACE("(%p)->(IID_IStream %p)\n", This, ppv); - *ppv = STREAM(This); + *ppv = &This->IStream_iface; } if(*ppv) { - IStream_AddRef(STREAM(This)); + IStream_AddRef(&This->IStream_iface); return S_OK; } @@ -488,7 +449,7 @@ static HRESULT WINAPI ProtocolStream_QueryInterface(IStream *iface, static ULONG WINAPI ProtocolStream_AddRef(IStream *iface) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -498,13 +459,13 @@ static ULONG WINAPI ProtocolStream_AddRef(IStream *iface) static ULONG WINAPI ProtocolStream_Release(IStream *iface) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); if(!ref) { - IUnknown_Release(STGMEDUNK(This->buf)); + IUnknown_Release(&This->buf->IUnknown_iface); heap_free(This); URLMON_UnlockModule(); @@ -516,56 +477,33 @@ static ULONG WINAPI ProtocolStream_Release(IStream *iface) static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead) { - ProtocolStream *This = STREAM_THIS(iface); - DWORD read = 0, pread = 0; + ProtocolStream *This = impl_from_IStream(iface); + DWORD read = 0; HRESULT hres; TRACE("(%p)->(%p %d %p)\n", This, pv, cb, pcbRead); - if(This->buf->file != INVALID_HANDLE_VALUE) { - if (!ReadFile(This->buf->file, pv, cb, &read, NULL)) - return INET_E_DOWNLOAD_FAILURE; - - if(pcbRead) - *pcbRead = read; - return read ? S_OK : S_FALSE; + if(This->buf->file == INVALID_HANDLE_VALUE) { + hres = This->buf->hres = IInternetProtocol_Read(This->buf->protocol, (PBYTE)pv, cb, &read); + }else { + hres = ReadFile(This->buf->file, pv, cb, &read, NULL) ? S_OK : INET_E_DOWNLOAD_FAILURE; } - if(This->buf->size) { - read = cb; - - if(read > This->buf->size) - read = This->buf->size; - - memcpy(pv, This->buf->buf, read); - - if(read < This->buf->size) - memmove(This->buf->buf, This->buf->buf+read, This->buf->size-read); - This->buf->size -= read; - } - - if(read == cb) { - if (pcbRead) - *pcbRead = read; - return S_OK; - } - - hres = This->buf->hres = IInternetProtocol_Read(This->buf->protocol, (PBYTE)pv+read, cb-read, &pread); if (pcbRead) - *pcbRead = read + pread; + *pcbRead = read; if(hres == E_PENDING) return E_PENDING; else if(FAILED(hres)) FIXME("Read failed: %08x\n", hres); - return read || pread ? S_OK : S_FALSE; + return read ? S_OK : S_FALSE; } static HRESULT WINAPI ProtocolStream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); TRACE("(%p)->(%p %d %p)\n", This, pv, cb, pcbWritten); @@ -575,14 +513,14 @@ static HRESULT WINAPI ProtocolStream_Write(IStream *iface, const void *pv, static HRESULT WINAPI ProtocolStream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); FIXME("(%p)->(%d %08x %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); return E_NOTIMPL; } static HRESULT WINAPI ProtocolStream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); FIXME("(%p)->(%d)\n", This, libNewSize.u.LowPart); return E_NOTIMPL; } @@ -590,14 +528,14 @@ static HRESULT WINAPI ProtocolStream_SetSize(IStream *iface, ULARGE_INTEGER libN static HRESULT WINAPI ProtocolStream_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); FIXME("(%p)->(%p %d %p %p)\n", This, pstm, cb.u.LowPart, pcbRead, pcbWritten); return E_NOTIMPL; } static HRESULT WINAPI ProtocolStream_Commit(IStream *iface, DWORD grfCommitFlags) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); TRACE("(%p)->(%08x)\n", This, grfCommitFlags); @@ -606,7 +544,7 @@ static HRESULT WINAPI ProtocolStream_Commit(IStream *iface, DWORD grfCommitFlags static HRESULT WINAPI ProtocolStream_Revert(IStream *iface) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); TRACE("(%p)\n", This); @@ -616,7 +554,7 @@ static HRESULT WINAPI ProtocolStream_Revert(IStream *iface) static HRESULT WINAPI ProtocolStream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); FIXME("(%p)->(%d %d %d)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType); return E_NOTIMPL; } @@ -624,7 +562,7 @@ static HRESULT WINAPI ProtocolStream_LockRegion(IStream *iface, ULARGE_INTEGER l static HRESULT WINAPI ProtocolStream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); FIXME("(%p)->(%d %d %d)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType); return E_NOTIMPL; } @@ -632,7 +570,7 @@ static HRESULT WINAPI ProtocolStream_UnlockRegion(IStream *iface, static HRESULT WINAPI ProtocolStream_Stat(IStream *iface, STATSTG *pstatstg, DWORD dwStatFlag) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); TRACE("(%p)->(%p %08x)\n", This, pstatstg, dwStatFlag); if(!pstatstg) @@ -661,13 +599,11 @@ static HRESULT WINAPI ProtocolStream_Stat(IStream *iface, STATSTG *pstatstg, static HRESULT WINAPI ProtocolStream_Clone(IStream *iface, IStream **ppstm) { - ProtocolStream *This = STREAM_THIS(iface); + ProtocolStream *This = impl_from_IStream(iface); FIXME("(%p)->(%p)\n", This, ppstm); return E_NOTIMPL; } -#undef STREAM_THIS - static const IStreamVtbl ProtocolStreamVtbl = { ProtocolStream_QueryInterface, ProtocolStream_AddRef, @@ -688,7 +624,7 @@ static const IStreamVtbl ProtocolStreamVtbl = { static void stgmed_stream_release(stgmed_obj_t *obj) { ProtocolStream *stream = (ProtocolStream*)obj; - IStream_Release(STREAM(stream)); + IStream_Release(&stream->IStream_iface); } static HRESULT stgmed_stream_fill_stgmed(stgmed_obj_t *obj, STGMEDIUM *stgmed) @@ -696,8 +632,8 @@ static HRESULT stgmed_stream_fill_stgmed(stgmed_obj_t *obj, STGMEDIUM *stgmed) ProtocolStream *stream = (ProtocolStream*)obj; stgmed->tymed = TYMED_ISTREAM; - stgmed->u.pstm = STREAM(stream); - stgmed->pUnkForRelease = STGMEDUNK(stream->buf); + stgmed->u.pstm = &stream->IStream_iface; + stgmed->pUnkForRelease = &stream->buf->IUnknown_iface; return S_OK; } @@ -707,11 +643,11 @@ static HRESULT stgmed_stream_get_result(stgmed_obj_t *obj, DWORD bindf, void **r ProtocolStream *stream = (ProtocolStream*)obj; if(!(bindf & BINDF_ASYNCHRONOUS) && stream->buf->file == INVALID_HANDLE_VALUE - && (stream->buf->hres != S_FALSE || stream->buf->size)) + && stream->buf->hres != S_FALSE) return INET_E_DATA_NOT_AVAILABLE; - IStream_AddRef(STREAM(stream)); - *result = STREAM(stream); + IStream_AddRef(&stream->IStream_iface); + *result = &stream->IStream_iface; return S_OK; } @@ -731,10 +667,10 @@ static stgmed_obj_t *create_stgmed_stream(stgmed_buf_t *buf) ProtocolStream *ret = heap_alloc(sizeof(ProtocolStream)); ret->stgmed_obj.vtbl = &stgmed_stream_vtbl; - ret->lpStreamVtbl = &ProtocolStreamVtbl; + ret->IStream_iface.lpVtbl = &ProtocolStreamVtbl; ret->ref = 1; - IUnknown_AddRef(STGMEDUNK(buf)); + IUnknown_AddRef(&buf->IUnknown_iface); ret->buf = buf; URLMON_LockModule(); @@ -746,7 +682,7 @@ static void stgmed_file_release(stgmed_obj_t *obj) { stgmed_file_obj_t *file_obj = (stgmed_file_obj_t*)obj; - IUnknown_Release(STGMEDUNK(file_obj->buf)); + IUnknown_Release(&file_obj->buf->IUnknown_iface); heap_free(file_obj); } @@ -763,7 +699,7 @@ static HRESULT stgmed_file_fill_stgmed(stgmed_obj_t *obj, STGMEDIUM *stgmed) stgmed->tymed = TYMED_FILE; stgmed->u.lpszFileName = file_obj->buf->cache_file; - stgmed->pUnkForRelease = STGMEDUNK(file_obj->buf); + stgmed->pUnkForRelease = &file_obj->buf->IUnknown_iface; return S_OK; } @@ -785,64 +721,57 @@ static stgmed_obj_t *create_stgmed_file(stgmed_buf_t *buf) ret->stgmed_obj.vtbl = &stgmed_file_vtbl; - IUnknown_AddRef(STGMEDUNK(buf)); + IUnknown_AddRef(&buf->IUnknown_iface); ret->buf = buf; return &ret->stgmed_obj; } -#define BINDING_THIS(iface) DEFINE_THIS(Binding, Binding, iface) +static inline Binding *impl_from_IBinding(IBinding *iface) +{ + return CONTAINING_RECORD(iface, Binding, IBinding_iface); +} static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void **ppv) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = BINDING(This); + *ppv = &This->IBinding_iface; }else if(IsEqualGUID(&IID_IBinding, riid)) { TRACE("(%p)->(IID_IBinding %p)\n", This, ppv); - *ppv = BINDING(This); + *ppv = &This->IBinding_iface; }else if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) { TRACE("(%p)->(IID_IInternetProtocolSink %p)\n", This, ppv); - *ppv = PROTSINK(This); + *ppv = &This->IInternetProtocolSink_iface; }else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) { TRACE("(%p)->(IID_IInternetBindInfo %p)\n", This, ppv); - *ppv = BINDINF(This); + *ppv = &This->IInternetBindInfo_iface; }else if(IsEqualGUID(&IID_IServiceProvider, riid)) { TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv); - *ppv = SERVPROV(This); + *ppv = &This->IServiceProvider_iface; }else if(IsEqualGUID(&IID_IWinInetInfo, riid)) { TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv); /* NOTE: This violidates COM rules, but tests prove that we should do it */ - if(!get_wininet_info(This->protocol)) + if(!This->protocol->wininet_info) return E_NOINTERFACE; - *ppv = INETINFO(This); + *ppv = &This->IWinInetHttpInfo_iface; }else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) { - IWinInetHttpInfo *http_info; - IWinInetInfo *info; - HRESULT hres; - TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv); - info = get_wininet_info(This->protocol); - if(!info) + if(!This->protocol->wininet_http_info) return E_NOINTERFACE; - hres = IWinInetInfo_QueryInterface(info, &IID_IWinInetHttpInfo, (void**)&http_info); - if(FAILED(hres)) - return E_NOINTERFACE; - - IWinInetHttpInfo_Release(http_info); - *ppv = INETINFO(This); + *ppv = &This->IWinInetHttpInfo_iface; } if(*ppv) { - IBinding_AddRef(BINDING(This)); + IBinding_AddRef(&This->IBinding_iface); return S_OK; } @@ -852,7 +781,7 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void static ULONG WINAPI Binding_AddRef(IBinding *iface) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -862,7 +791,7 @@ static ULONG WINAPI Binding_AddRef(IBinding *iface) static ULONG WINAPI Binding_Release(IBinding *iface) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -875,11 +804,11 @@ static ULONG WINAPI Binding_Release(IBinding *iface) if(This->callback) IBindStatusCallback_Release(This->callback); if(This->protocol) - IInternetProtocol_Release(This->protocol); + IInternetProtocolEx_Release(&This->protocol->IInternetProtocolEx_iface); if(This->service_provider) IServiceProvider_Release(This->service_provider); if(This->stgmed_buf) - IUnknown_Release(STGMEDUNK(This->stgmed_buf)); + IUnknown_Release(&This->stgmed_buf->IUnknown_iface); if(This->stgmed_obj) This->stgmed_obj->vtbl->release(This->stgmed_obj); if(This->obj) @@ -903,7 +832,7 @@ static ULONG WINAPI Binding_Release(IBinding *iface) static HRESULT WINAPI Binding_Abort(IBinding *iface) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); HRESULT hres; TRACE("(%p)\n", This); @@ -911,7 +840,8 @@ static HRESULT WINAPI Binding_Abort(IBinding *iface) if(This->state & BINDING_ABORTED) return E_FAIL; - hres = IInternetProtocol_Abort(This->protocol, E_ABORT, ERROR_SUCCESS); + hres = IInternetProtocolEx_Abort(&This->protocol->IInternetProtocolEx_iface, E_ABORT, + ERROR_SUCCESS); if(FAILED(hres)) return hres; @@ -921,28 +851,28 @@ static HRESULT WINAPI Binding_Abort(IBinding *iface) static HRESULT WINAPI Binding_Suspend(IBinding *iface) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } static HRESULT WINAPI Binding_Resume(IBinding *iface) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } static HRESULT WINAPI Binding_SetPriority(IBinding *iface, LONG nPriority) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); FIXME("(%p)->(%d)\n", This, nPriority); return E_NOTIMPL; } static HRESULT WINAPI Binding_GetPriority(IBinding *iface, LONG *pnPriority) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); FIXME("(%p)->(%p)\n", This, pnPriority); return E_NOTIMPL; } @@ -950,32 +880,11 @@ static HRESULT WINAPI Binding_GetPriority(IBinding *iface, LONG *pnPriority) static HRESULT WINAPI Binding_GetBindResult(IBinding *iface, CLSID *pclsidProtocol, DWORD *pdwResult, LPOLESTR *pszResult, DWORD *pdwReserved) { - Binding *This = BINDING_THIS(iface); + Binding *This = impl_from_IBinding(iface); FIXME("(%p)->(%p %p %p %p)\n", This, pclsidProtocol, pdwResult, pszResult, pdwReserved); return E_NOTIMPL; } -static Binding *get_bctx_binding(IBindCtx *bctx) -{ - IBinding *binding; - IUnknown *unk; - HRESULT hres; - - hres = IBindCtx_GetObjectParam(bctx, cbinding_contextW, &unk); - if(FAILED(hres)) - return NULL; - - hres = IUnknown_QueryInterface(unk, &IID_IBinding, (void*)&binding); - IUnknown_Release(unk); - if(FAILED(hres)) - return NULL; - - /* FIXME!!! */ - return BINDING_THIS(binding); -} - -#undef BINDING_THIS - static const IBindingVtbl BindingVtbl = { Binding_QueryInterface, Binding_AddRef, @@ -988,31 +897,54 @@ static const IBindingVtbl BindingVtbl = { Binding_GetBindResult }; -#define PROTSINK_THIS(iface) DEFINE_THIS(Binding, IInternetProtocolSink, iface) +static Binding *get_bctx_binding(IBindCtx *bctx) +{ + IBinding *binding; + IUnknown *unk; + HRESULT hres; + + hres = IBindCtx_GetObjectParam(bctx, cbinding_contextW, &unk); + if(FAILED(hres)) + return NULL; + + hres = IUnknown_QueryInterface(unk, &IID_IBinding, (void**)&binding); + IUnknown_Release(unk); + if(FAILED(hres)) + return NULL; + + if (binding->lpVtbl != &BindingVtbl) + return NULL; + return impl_from_IBinding(binding); +} + +static inline Binding *impl_from_IInternetProtocolSink(IInternetProtocolSink *iface) +{ + return CONTAINING_RECORD(iface, Binding, IInternetProtocolSink_iface); +} static HRESULT WINAPI InternetProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) { - Binding *This = PROTSINK_THIS(iface); - return IBinding_QueryInterface(BINDING(This), riid, ppv); + Binding *This = impl_from_IInternetProtocolSink(iface); + return IBinding_QueryInterface(&This->IBinding_iface, riid, ppv); } static ULONG WINAPI InternetProtocolSink_AddRef(IInternetProtocolSink *iface) { - Binding *This = PROTSINK_THIS(iface); - return IBinding_AddRef(BINDING(This)); + Binding *This = impl_from_IInternetProtocolSink(iface); + return IBinding_AddRef(&This->IBinding_iface); } static ULONG WINAPI InternetProtocolSink_Release(IInternetProtocolSink *iface) { - Binding *This = PROTSINK_THIS(iface); - return IBinding_Release(BINDING(This)); + Binding *This = impl_from_IInternetProtocolSink(iface); + return IBinding_Release(&This->IBinding_iface); } static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) { - Binding *This = PROTSINK_THIS(iface); + Binding *This = impl_from_IInternetProtocolSink(iface); WARN("(%p)->(%p)\n", This, pProtocolData); @@ -1029,7 +961,7 @@ static void on_progress(Binding *This, ULONG progress, ULONG progress_max, static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, LPCWSTR szStatusText) { - Binding *This = PROTSINK_THIS(iface); + Binding *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText)); @@ -1046,7 +978,6 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink on_progress(This, 0, 0, BINDSTATUS_REDIRECTING, szStatusText); break; case BINDSTATUS_BEGINDOWNLOADDATA: - fill_stgmed_buffer(This->stgmed_buf); break; case BINDSTATUS_SENDINGREQUEST: on_progress(This, 0, 0, BINDSTATUS_SENDINGREQUEST, szStatusText); @@ -1086,13 +1017,16 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres TRACE("(%p)->(%d %u %u)\n", This, bscf, progress, progress_max); - if(This->download_state == END_DOWNLOAD || (This->state & (BINDING_STOPPED|BINDING_ABORTED))) + if(This->download_state == END_DOWNLOAD || (This->state & BINDING_ABORTED)) { + read_protocol_data(This->stgmed_buf); + return; + } + + if(This->state & BINDING_STOPPED) return; if(This->stgmed_buf->file != INVALID_HANDLE_VALUE) read_protocol_data(This->stgmed_buf); - else if(This->download_state == BEFORE_DOWNLOAD) - fill_stgmed_buffer(This->stgmed_buf); if(This->download_state == BEFORE_DOWNLOAD) { This->download_state = DOWNLOADING; @@ -1119,16 +1053,17 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres if(This->to_object) { if(!(This->state & BINDING_OBJAVAIL)) { - IBinding_AddRef(BINDING(This)); + IBinding_AddRef(&This->IBinding_iface); create_object(This); - IBinding_Release(BINDING(This)); + IBinding_Release(&This->IBinding_iface); } }else { STGMEDIUM stgmed; HRESULT hres; if(!(This->state & BINDING_LOCKED)) { - HRESULT hres = IInternetProtocol_LockRequest(This->protocol, 0); + HRESULT hres = IInternetProtocolEx_LockRequest( + &This->protocol->IInternetProtocolEx_iface, 0); if(SUCCEEDED(hres)) This->state |= BINDING_LOCKED; } @@ -1153,7 +1088,7 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax) { - Binding *This = PROTSINK_THIS(iface); + Binding *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax); @@ -1164,17 +1099,15 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult) { - Binding *This = PROTSINK_THIS(iface); + Binding *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult)); stop_binding(This, hrResult, szResult); - IInternetProtocol_Terminate(This->protocol, 0); + IInternetProtocolEx_Terminate(&This->protocol->IInternetProtocolEx_iface, 0); return S_OK; } -#undef PROTSINK_THIS - static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = { InternetProtocolSink_QueryInterface, InternetProtocolSink_AddRef, @@ -1185,31 +1118,34 @@ static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = { InternetProtocolSink_ReportResult }; -#define BINDINF_THIS(iface) DEFINE_THIS(Binding, InternetBindInfo, iface) +static inline Binding *impl_from_IInternetBindInfo(IInternetBindInfo *iface) +{ + return CONTAINING_RECORD(iface, Binding, IInternetBindInfo_iface); +} static HRESULT WINAPI InternetBindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv) { - Binding *This = BINDINF_THIS(iface); - return IBinding_QueryInterface(BINDING(This), riid, ppv); + Binding *This = impl_from_IInternetBindInfo(iface); + return IBinding_QueryInterface(&This->IBinding_iface, riid, ppv); } static ULONG WINAPI InternetBindInfo_AddRef(IInternetBindInfo *iface) { - Binding *This = BINDINF_THIS(iface); - return IBinding_AddRef(BINDING(This)); + Binding *This = impl_from_IInternetBindInfo(iface); + return IBinding_AddRef(&This->IBinding_iface); } static ULONG WINAPI InternetBindInfo_Release(IInternetBindInfo *iface) { - Binding *This = BINDINF_THIS(iface); - return IBinding_Release(BINDING(This)); + Binding *This = impl_from_IInternetBindInfo(iface); + return IBinding_Release(&This->IBinding_iface); } static HRESULT WINAPI InternetBindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) { - Binding *This = BINDINF_THIS(iface); + Binding *This = impl_from_IInternetBindInfo(iface); TRACE("(%p)->(%p %p)\n", This, grfBINDF, pbindinfo); @@ -1232,7 +1168,7 @@ static HRESULT WINAPI InternetBindInfo_GetBindInfo(IInternetBindInfo *iface, static HRESULT WINAPI InternetBindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, LPOLESTR *ppwzStr, ULONG cEl, ULONG *pcElFetched) { - Binding *This = BINDINF_THIS(iface); + Binding *This = impl_from_IInternetBindInfo(iface); TRACE("(%p)->(%d %p %d %p)\n", This, ulStringType, ppwzStr, cEl, pcElFetched); @@ -1280,8 +1216,6 @@ static HRESULT WINAPI InternetBindInfo_GetBindString(IInternetBindInfo *iface, return E_NOTIMPL; } -#undef BINDF_THIS - static const IInternetBindInfoVtbl InternetBindInfoVtbl = { InternetBindInfo_QueryInterface, InternetBindInfo_AddRef, @@ -1290,43 +1224,54 @@ static const IInternetBindInfoVtbl InternetBindInfoVtbl = { InternetBindInfo_GetBindString }; -#define INETINFO_THIS(iface) DEFINE_THIS(Binding, WinInetHttpInfo, iface) +static inline Binding *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface) +{ + return CONTAINING_RECORD(iface, Binding, IWinInetHttpInfo_iface); +} static HRESULT WINAPI WinInetHttpInfo_QueryInterface(IWinInetHttpInfo *iface, REFIID riid, void **ppv) { - Binding *This = INETINFO_THIS(iface); - return IBinding_QueryInterface(BINDING(This), riid, ppv); + Binding *This = impl_from_IWinInetHttpInfo(iface); + return IBinding_QueryInterface(&This->IBinding_iface, riid, ppv); } static ULONG WINAPI WinInetHttpInfo_AddRef(IWinInetHttpInfo *iface) { - Binding *This = INETINFO_THIS(iface); - return IBinding_AddRef(BINDING(This)); + Binding *This = impl_from_IWinInetHttpInfo(iface); + return IBinding_AddRef(&This->IBinding_iface); } static ULONG WINAPI WinInetHttpInfo_Release(IWinInetHttpInfo *iface) { - Binding *This = INETINFO_THIS(iface); - return IBinding_Release(BINDING(This)); + Binding *This = impl_from_IWinInetHttpInfo(iface); + return IBinding_Release(&This->IBinding_iface); } static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer) { - Binding *This = INETINFO_THIS(iface); - FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); - return E_NOTIMPL; + Binding *This = impl_from_IWinInetHttpInfo(iface); + TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); + + if(!This->protocol->wininet_info) + return E_FAIL; + + return IWinInetInfo_QueryOption(This->protocol->wininet_info, + dwOption, pBuffer, pcbBuffer); } static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) { - Binding *This = INETINFO_THIS(iface); - FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); - return E_NOTIMPL; -} + Binding *This = impl_from_IWinInetHttpInfo(iface); + TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); -#undef INETINFO_THIS + if(!This->protocol->wininet_http_info) + return E_FAIL; + + return IWinInetHttpInfo_QueryInfo(This->protocol->wininet_http_info, + dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); +} static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { WinInetHttpInfo_QueryInterface, @@ -1336,31 +1281,34 @@ static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { WinInetHttpInfo_QueryInfo }; -#define SERVPROV_THIS(iface) DEFINE_THIS(Binding, ServiceProvider, iface) +static inline Binding *impl_from_IServiceProvider(IServiceProvider *iface) +{ + return CONTAINING_RECORD(iface, Binding, IServiceProvider_iface); +} static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) { - Binding *This = SERVPROV_THIS(iface); - return IBinding_QueryInterface(BINDING(This), riid, ppv); + Binding *This = impl_from_IServiceProvider(iface); + return IBinding_QueryInterface(&This->IBinding_iface, riid, ppv); } static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) { - Binding *This = SERVPROV_THIS(iface); - return IBinding_AddRef(BINDING(This)); + Binding *This = impl_from_IServiceProvider(iface); + return IBinding_AddRef(&This->IBinding_iface); } static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) { - Binding *This = SERVPROV_THIS(iface); - return IBinding_Release(BINDING(This)); + Binding *This = impl_from_IServiceProvider(iface); + return IBinding_Release(&This->IBinding_iface); } static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv) { - Binding *This = SERVPROV_THIS(iface); + Binding *This = impl_from_IServiceProvider(iface); HRESULT hres; TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); @@ -1373,11 +1321,9 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, } WARN("unknown service %s\n", debugstr_guid(guidService)); - return E_NOTIMPL; + return E_NOINTERFACE; } -#undef SERVPROV_THIS - static const IServiceProviderVtbl ServiceProviderVtbl = { ServiceProvider_QueryInterface, ServiceProvider_AddRef, @@ -1431,11 +1377,11 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB ret = heap_alloc_zero(sizeof(Binding)); - ret->lpBindingVtbl = &BindingVtbl; - ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; - ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl; - ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; - ret->lpServiceProviderVtbl = &ServiceProviderVtbl; + ret->IBinding_iface.lpVtbl = &BindingVtbl; + ret->IInternetProtocolSink_iface.lpVtbl = &InternetProtocolSinkVtbl; + ret->IInternetBindInfo_iface.lpVtbl = &InternetBindInfoVtbl; + ret->IWinInetHttpInfo_iface.lpVtbl = &WinInetHttpInfoVtbl; + ret->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl; ret->ref = 1; @@ -1463,7 +1409,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB hres = get_callback(pbc, &ret->callback); if(FAILED(hres)) { WARN("Could not get IBindStatusCallback\n"); - IBinding_Release(BINDING(ret)); + IBinding_Release(&ret->IBinding_iface); return hres; } @@ -1472,12 +1418,12 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB if(binding_ctx) { ret->protocol = binding_ctx->protocol; - IInternetProtocol_AddRef(ret->protocol); + IInternetProtocolEx_AddRef(&ret->protocol->IInternetProtocolEx_iface); }else { hres = create_binding_protocol(TRUE, &ret->protocol); if(FAILED(hres)) { WARN("Could not get protocol handler\n"); - IBinding_Release(BINDING(ret)); + IBinding_Release(&ret->IBinding_iface); return hres; } } @@ -1485,7 +1431,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB hres = IBindStatusCallback_GetBindInfo(ret->callback, &ret->bindf, &ret->bindinfo); if(FAILED(hres)) { WARN("GetBindInfo failed: %08x\n", hres); - IBinding_Release(BINDING(ret)); + IBinding_Release(&ret->IBinding_iface); return hres; } @@ -1496,7 +1442,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB if(to_obj) ret->bindinfo.dwOptions |= 0x100000; - if(!(ret->bindf & BINDF_ASYNCHRONOUS)) { + if(!(ret->bindf & BINDF_ASYNCHRONOUS) || !(ret->bindf & BINDF_PULLDATA)) { ret->bindf |= BINDF_NEEDFILE; ret->use_cache_file = TRUE; }else if(!is_urlmon_protocol(uri)) { @@ -1505,16 +1451,16 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB hres = IUri_GetDisplayUri(uri, &ret->url); if(FAILED(hres)) { - IBinding_Release(BINDING(ret)); + IBinding_Release(&ret->IBinding_iface); return hres; } if(binding_ctx) { ret->stgmed_buf = binding_ctx->stgmed_buf; - IUnknown_AddRef(STGMEDUNK(ret->stgmed_buf)); + IUnknown_AddRef(&ret->stgmed_buf->IUnknown_iface); ret->clipboard_format = binding_ctx->clipboard_format; }else { - ret->stgmed_buf = create_stgmed_buf(ret->protocol); + ret->stgmed_buf = create_stgmed_buf(&ret->protocol->IInternetProtocolEx_iface); } if(to_obj) { @@ -1526,7 +1472,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB ret->stgmed_obj = create_stgmed_file(ret->stgmed_buf); }else { FIXME("Unsupported riid %s\n", debugstr_guid(riid)); - IBinding_Release(BINDING(ret)); + IBinding_Release(&ret->IBinding_iface); return E_NOTIMPL; } @@ -1545,29 +1491,34 @@ static HRESULT start_binding(IMoniker *mon, Binding *binding_ctx, IUri *uri, IBi if(FAILED(hres)) return hres; - hres = IBindStatusCallback_OnStartBinding(binding->callback, 0, BINDING(binding)); + hres = IBindStatusCallback_OnStartBinding(binding->callback, 0, &binding->IBinding_iface); if(FAILED(hres)) { WARN("OnStartBinding failed: %08x\n", hres); - stop_binding(binding, INET_E_DOWNLOAD_FAILURE, NULL); - IBinding_Release(BINDING(binding)); + if(hres != E_ABORT && hres != E_NOTIMPL) + hres = INET_E_DOWNLOAD_FAILURE; + + stop_binding(binding, hres, NULL); + IBinding_Release(&binding->IBinding_iface); return hres; } if(binding_ctx) { - set_binding_sink(binding->protocol, PROTSINK(binding), BINDINF(binding)); + set_binding_sink(binding->protocol, &binding->IInternetProtocolSink_iface, + &binding->IInternetBindInfo_iface); if(binding_ctx->redirect_url) IBindStatusCallback_OnProgress(binding->callback, 0, 0, BINDSTATUS_REDIRECTING, binding_ctx->redirect_url); report_data(binding, BSCF_FIRSTDATANOTIFICATION | (binding_ctx->download_state == END_DOWNLOAD ? BSCF_LASTDATANOTIFICATION : 0), 0, 0); }else { - hres = IInternetProtocolEx_StartEx(binding->protocol, uri, PROTSINK(binding), - BINDINF(binding), PI_APARTMENTTHREADED|PI_MIMEVERIFICATION, 0); + hres = IInternetProtocolEx_StartEx(&binding->protocol->IInternetProtocolEx_iface, uri, + &binding->IInternetProtocolSink_iface, &binding->IInternetBindInfo_iface, + PI_APARTMENTTHREADED|PI_MIMEVERIFICATION, 0); TRACE("start ret %08x\n", hres); if(FAILED(hres) && hres != E_PENDING) { stop_binding(binding, hres, NULL); - IBinding_Release(BINDING(binding)); + IBinding_Release(&binding->IBinding_iface); return hres; } @@ -1591,19 +1542,17 @@ HRESULT bind_to_storage(IUri *uri, IBindCtx *pbc, REFIID riid, void **ppv) Binding *binding = NULL, *binding_ctx; HRESULT hres; - *ppv = NULL; - binding_ctx = get_bctx_binding(pbc); hres = start_binding(NULL, binding_ctx, uri, pbc, FALSE, riid, &binding); if(binding_ctx) - IBinding_Release(BINDING(binding_ctx)); + IBinding_Release(&binding_ctx->IBinding_iface); if(FAILED(hres)) return hres; - if(binding->hres == S_OK && binding->stgmed_buf->init) { + if(binding->hres == S_OK && binding->download_state != BEFORE_DOWNLOAD /* FIXME */) { if((binding->state & BINDING_STOPPED) && (binding->state & BINDING_LOCKED)) - IInternetProtocol_UnlockRequest(binding->protocol); + IInternetProtocolEx_UnlockRequest(&binding->protocol->IInternetProtocolEx_iface); hres = binding->stgmed_obj->vtbl->get_result(binding->stgmed_obj, binding->bindf, ppv); }else if(binding->bindf & BINDF_ASYNCHRONOUS) { @@ -1612,7 +1561,7 @@ HRESULT bind_to_storage(IUri *uri, IBindCtx *pbc, REFIID riid, void **ppv) hres = FAILED(binding->hres) ? binding->hres : S_OK; } - IBinding_Release(BINDING(binding)); + IBinding_Release(&binding->IBinding_iface); return hres; } @@ -1638,7 +1587,7 @@ HRESULT bind_to_object(IMoniker *mon, IUri *uri, IBindCtx *pbc, REFIID riid, voi hres = S_OK; } - IBinding_Release(BINDING(binding)); + IBinding_Release(&binding->IBinding_iface); return hres; } diff --git a/dll/win32/urlmon/bindprot.c b/dll/win32/urlmon/bindprot.c index 0549712a048..45cf14c2cc6 100644 --- a/dll/win32/urlmon/bindprot.c +++ b/dll/win32/urlmon/bindprot.c @@ -21,67 +21,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); -typedef struct BindProtocol BindProtocol; +typedef void (*task_proc_t)(BindProtocol*,task_header_t*); -struct _task_header_t; - -typedef void (*task_proc_t)(BindProtocol*,struct _task_header_t*); - -typedef struct _task_header_t { +struct _task_header_t { task_proc_t proc; - struct _task_header_t *next; -} task_header_t; - -struct BindProtocol { - const IInternetProtocolExVtbl *lpIInternetProtocolExVtbl; - const IInternetBindInfoVtbl *lpInternetBindInfoVtbl; - const IInternetPriorityVtbl *lpInternetPriorityVtbl; - const IServiceProviderVtbl *lpServiceProviderVtbl; - const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl; - const IWinInetHttpInfoVtbl *lpIWinInetHttpInfoVtbl; - - LONG ref; - - IInternetProtocol *protocol; - IInternetBindInfo *bind_info; - IInternetProtocolSink *protocol_sink; - IServiceProvider *service_provider; - IWinInetInfo *wininet_info; - - struct { - IInternetProtocol IInternetProtocol_iface; - } default_protocol_handler; - IInternetProtocol *protocol_handler; - - LONG priority; - - BOOL reported_result; - BOOL reported_mime; - BOOL from_urlmon; - DWORD pi; - - DWORD apartment_thread; - HWND notif_hwnd; - DWORD continue_call; - - CRITICAL_SECTION section; - task_header_t *task_queue_head, *task_queue_tail; - - BYTE *buf; - DWORD buf_size; - LPWSTR mime; - IUri *uri; - ProtocolProxy *filter_proxy; + task_header_t *next; }; -#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl) -#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) -#define HTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpIWinInetHttpInfoVtbl) -#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) -#define PROTOCOLEX(x) ((IInternetProtocolEx*) &(x)->lpIInternetProtocolExVtbl) - -#define PROTOCOLHANDLER(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolHandlerVtbl) - #define BUFFER_SIZE 2048 #define MIME_TEST_SIZE 255 @@ -115,7 +61,7 @@ static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM This->continue_call--; } - IInternetProtocolEx_Release(PROTOCOLEX(This)); + IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); return 0; } case WM_MK_RELEASE: { @@ -214,7 +160,7 @@ static void push_task(BindProtocol *This, task_header_t *task, task_proc_t proc) LeaveCriticalSection(&This->section); if(do_post) { - IInternetProtocolEx_AddRef(PROTOCOLEX(This)); + IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); PostMessageW(This->notif_hwnd, WM_MK_CONTINUE, 0, (LPARAM)This); } } @@ -248,9 +194,10 @@ static HRESULT handle_mime_filter(BindProtocol *This, IInternetProtocol *mime_fi IInternetProtocol_AddRef(mime_filter); This->protocol_handler = mime_filter; - filter_data.pProtocol = PROTOCOL(filter_proxy); - hres = IInternetProtocol_Start(mime_filter, mime, PROTSINK(filter_proxy), BINDINFO(This), - PI_FILTER_MODE|PI_FORCE_ASYNC, (HANDLE_PTR)&filter_data); + filter_data.pProtocol = &filter_proxy->IInternetProtocol_iface; + hres = IInternetProtocol_Start(mime_filter, mime, &filter_proxy->IInternetProtocolSink_iface, + &This->IInternetBindInfo_iface, PI_FILTER_MODE|PI_FORCE_ASYNC, + (HANDLE_PTR)&filter_data); if(FAILED(hres)) { IInternetProtocolSink_Release(old_sink); return hres; @@ -291,39 +238,42 @@ static void mime_available(BindProtocol *This, LPCWSTR mime, BOOL verified) } } -#define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, IInternetProtocolEx, iface) +static inline BindProtocol *impl_from_IInternetProtocolEx(IInternetProtocolEx *iface) +{ + return CONTAINING_RECORD(iface, BindProtocol, IInternetProtocolEx_iface); +} static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = PROTOCOLEX(This); + *ppv = &This->IInternetProtocolEx_iface; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); - *ppv = PROTOCOLEX(This); + *ppv = &This->IInternetProtocolEx_iface; }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) { TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv); - *ppv = PROTOCOLEX(This); + *ppv = &This->IInternetProtocolEx_iface; }else if(IsEqualGUID(&IID_IInternetProtocolEx, riid)) { TRACE("(%p)->(IID_IInternetProtocolEx %p)\n", This, ppv); - *ppv = PROTOCOLEX(This); + *ppv = &This->IInternetProtocolEx_iface; }else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) { TRACE("(%p)->(IID_IInternetBindInfo %p)\n", This, ppv); - *ppv = BINDINFO(This); + *ppv = &This->IInternetBindInfo_iface; }else if(IsEqualGUID(&IID_IInternetPriority, riid)) { TRACE("(%p)->(IID_IInternetPriority %p)\n", This, ppv); - *ppv = PRIORITY(This); + *ppv = &This->IInternetPriority_iface; }else if(IsEqualGUID(&IID_IAuthenticate, riid)) { FIXME("(%p)->(IID_IAuthenticate %p)\n", This, ppv); }else if(IsEqualGUID(&IID_IServiceProvider, riid)) { TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv); - *ppv = SERVPROV(This); + *ppv = &This->IServiceProvider_iface; }else if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) { TRACE("(%p)->(IID_IInternetProtocolSink %p)\n", This, ppv); - *ppv = PROTSINK(This); + *ppv = &This->IInternetProtocolSink_iface; }else if(IsEqualGUID(&IID_IWinInetInfo, riid)) { TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv); @@ -333,7 +283,7 @@ static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocolEx *iface, RE hres = IInternetProtocol_QueryInterface(This->protocol, &IID_IWinInetInfo, (void**)&inet_info); if(SUCCEEDED(hres)) { - *ppv = HTTPINFO(This); + *ppv = &This->IWinInetHttpInfo_iface; IWinInetInfo_Release(inet_info); } } @@ -346,7 +296,7 @@ static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocolEx *iface, RE hres = IInternetProtocol_QueryInterface(This->protocol, &IID_IWinInetHttpInfo, (void**)&http_info); if(SUCCEEDED(hres)) { - *ppv = HTTPINFO(This); + *ppv = &This->IWinInetHttpInfo_iface; IWinInetHttpInfo_Release(http_info); } } @@ -363,7 +313,7 @@ static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocolEx *iface, RE static ULONG WINAPI BindProtocol_AddRef(IInternetProtocolEx *iface) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); return ref; @@ -371,7 +321,7 @@ static ULONG WINAPI BindProtocol_AddRef(IInternetProtocolEx *iface) static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -379,6 +329,8 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface) if(!ref) { if(This->wininet_info) IWinInetInfo_Release(This->wininet_info); + if(This->wininet_http_info) + IWinInetHttpInfo_Release(This->wininet_http_info); if(This->protocol) IInternetProtocol_Release(This->protocol); if(This->bind_info) @@ -386,11 +338,11 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface) if(This->protocol_handler && This->protocol_handler != &This->default_protocol_handler.IInternetProtocol_iface) IInternetProtocol_Release(This->protocol_handler); if(This->filter_proxy) - IInternetProtocol_Release(PROTOCOL(This->filter_proxy)); + IInternetProtocol_Release(&This->filter_proxy->IInternetProtocol_iface); if(This->uri) IUri_Release(This->uri); - set_binding_sink(PROTOCOLEX(This), NULL, NULL); + set_binding_sink(This, NULL, NULL); if(This->notif_hwnd) release_notif_hwnd(This->notif_hwnd); @@ -409,7 +361,7 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); IUri *uri; HRESULT hres; @@ -420,8 +372,8 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU if(FAILED(hres)) return hres; - hres = IInternetProtocolEx_StartEx(PROTOCOLEX(This), uri, pOIProtSink, pOIBindInfo, - grfPI, (HANDLE*)dwReserved); + hres = IInternetProtocolEx_StartEx(&This->IInternetProtocolEx_iface, uri, pOIProtSink, + pOIBindInfo, grfPI, (HANDLE*)dwReserved); IUri_Release(uri); return hres; @@ -429,7 +381,7 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU static HRESULT WINAPI BindProtocol_Continue(IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); TRACE("(%p)->(%p)\n", This, pProtocolData); @@ -439,7 +391,7 @@ static HRESULT WINAPI BindProtocol_Continue(IInternetProtocolEx *iface, PROTOCOL static HRESULT WINAPI BindProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrReason, DWORD dwOptions) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions); @@ -448,7 +400,7 @@ static HRESULT WINAPI BindProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrR static HRESULT WINAPI BindProtocol_Terminate(IInternetProtocolEx *iface, DWORD dwOptions) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); TRACE("(%p)->(%08x)\n", This, dwOptions); @@ -457,14 +409,14 @@ static HRESULT WINAPI BindProtocol_Terminate(IInternetProtocolEx *iface, DWORD d static HRESULT WINAPI BindProtocol_Suspend(IInternetProtocolEx *iface) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } static HRESULT WINAPI BindProtocol_Resume(IInternetProtocolEx *iface) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } @@ -472,7 +424,7 @@ static HRESULT WINAPI BindProtocol_Resume(IInternetProtocolEx *iface) static HRESULT WINAPI BindProtocol_Read(IInternetProtocolEx *iface, void *pv, ULONG cb, ULONG *pcbRead) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); @@ -484,14 +436,14 @@ static HRESULT WINAPI BindProtocol_Read(IInternetProtocolEx *iface, void *pv, static HRESULT WINAPI BindProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); return E_NOTIMPL; } static HRESULT WINAPI BindProtocol_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); TRACE("(%p)->(%08x)\n", This, dwOptions); @@ -500,7 +452,7 @@ static HRESULT WINAPI BindProtocol_LockRequest(IInternetProtocolEx *iface, DWORD static HRESULT WINAPI BindProtocol_UnlockRequest(IInternetProtocolEx *iface) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); TRACE("(%p)\n", This); @@ -511,7 +463,7 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE *dwReserved) { - BindProtocol *This = PROTOCOL_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolEx(iface); IInternetProtocol *protocol = NULL; IInternetProtocolEx *protocolex; IInternetPriority *priority; @@ -554,7 +506,7 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr if(FAILED(hres)) return hres; }else { - hres = IClassFactory_CreateInstance(cf, (IUnknown*)BINDINFO(This), + hres = IClassFactory_CreateInstance(cf, (IUnknown*)&This->IInternetBindInfo_iface, &IID_IUnknown, (void**)&unk); IClassFactory_Release(cf); if(FAILED(hres)) @@ -573,10 +525,12 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr This->protocol = protocol; - if(urlmon_protocol) + if(urlmon_protocol) { IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&This->wininet_info); + IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&This->wininet_http_info); + } - set_binding_sink(PROTOCOLEX(This), pOIProtSink, pOIBindInfo); + set_binding_sink(This, pOIProtSink, pOIBindInfo); hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); if(SUCCEEDED(hres)) { @@ -586,7 +540,8 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolEx, (void**)&protocolex); if(SUCCEEDED(hres)) { - hres = IInternetProtocolEx_StartEx(protocolex, pUri, PROTSINK(This), BINDINFO(This), 0, NULL); + hres = IInternetProtocolEx_StartEx(protocolex, pUri, &This->IInternetProtocolSink_iface, + &This->IInternetBindInfo_iface, 0, NULL); IInternetProtocolEx_Release(protocolex); }else { BSTR display_uri; @@ -595,16 +550,16 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr if(FAILED(hres)) return hres; - hres = IInternetProtocol_Start(protocol, display_uri, PROTSINK(This), BINDINFO(This), 0, 0); + hres = IInternetProtocol_Start(protocol, display_uri, &This->IInternetProtocolSink_iface, + &This->IInternetBindInfo_iface, 0, 0); SysFreeString(display_uri); } return hres; } -void set_binding_sink(IInternetProtocolEx *bind_protocol, IInternetProtocolSink *sink, IInternetBindInfo *bind_info) +void set_binding_sink(BindProtocol *This, IInternetProtocolSink *sink, IInternetBindInfo *bind_info) { - BindProtocol *This = PROTOCOL_THIS(bind_protocol); IInternetProtocolSink *prev_sink; IServiceProvider *service_provider = NULL; @@ -627,15 +582,6 @@ void set_binding_sink(IInternetProtocolEx *bind_protocol, IInternetProtocolSink IInternetBindInfo_Release(bind_info); } -IWinInetInfo *get_wininet_info(IInternetProtocolEx *bind_protocol) -{ - BindProtocol *This = PROTOCOL_THIS(bind_protocol); - - return This->wininet_info; -} - -#undef PROTOCOL_THIS - static const IInternetProtocolExVtbl BindProtocolVtbl = { BindProtocol_QueryInterface, BindProtocol_AddRef, @@ -667,13 +613,13 @@ static HRESULT WINAPI ProtocolHandler_QueryInterface(IInternetProtocol *iface, R static ULONG WINAPI ProtocolHandler_AddRef(IInternetProtocol *iface) { BindProtocol *This = impl_from_IInternetProtocol(iface); - return IInternetProtocolEx_AddRef(PROTOCOLEX(This)); + return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); } static ULONG WINAPI ProtocolHandler_Release(IInternetProtocol *iface) { BindProtocol *This = impl_from_IInternetProtocol(iface); - return IInternetProtocolEx_Release(PROTOCOLEX(This)); + return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); } static HRESULT WINAPI ProtocolHandler_Start(IInternetProtocol *iface, LPCWSTR szUrl, @@ -722,11 +668,11 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD IInternetProtocol_Terminate(This->protocol, 0); if(This->filter_proxy) { - IInternetProtocol_Release(PROTOCOL(This->filter_proxy)); + IInternetProtocol_Release(&This->filter_proxy->IInternetProtocol_iface); This->filter_proxy = NULL; } - set_binding_sink(PROTOCOLEX(This), NULL, NULL); + set_binding_sink(This, NULL, NULL); if(This->bind_info) { IInternetBindInfo_Release(This->bind_info); @@ -826,31 +772,34 @@ static const IInternetProtocolVtbl InternetProtocolHandlerVtbl = { ProtocolHandler_UnlockRequest }; -#define BINDINFO_THIS(iface) DEFINE_THIS(BindProtocol, InternetBindInfo, iface) +static inline BindProtocol *impl_from_IInternetBindInfo(IInternetBindInfo *iface) +{ + return CONTAINING_RECORD(iface, BindProtocol, IInternetBindInfo_iface); +} static HRESULT WINAPI BindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv) { - BindProtocol *This = BINDINFO_THIS(iface); - return IInternetProtocolEx_QueryInterface(PROTOCOLEX(This), riid, ppv); + BindProtocol *This = impl_from_IInternetBindInfo(iface); + return IInternetProtocolEx_QueryInterface(&This->IInternetProtocolEx_iface, riid, ppv); } static ULONG WINAPI BindInfo_AddRef(IInternetBindInfo *iface) { - BindProtocol *This = BINDINFO_THIS(iface); - return IInternetProtocolEx_AddRef(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IInternetBindInfo(iface); + return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); } static ULONG WINAPI BindInfo_Release(IInternetBindInfo *iface) { - BindProtocol *This = BINDINFO_THIS(iface); - return IInternetProtocolEx_Release(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IInternetBindInfo(iface); + return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); } static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) { - BindProtocol *This = BINDINFO_THIS(iface); + BindProtocol *This = impl_from_IInternetBindInfo(iface); HRESULT hres; TRACE("(%p)->(%p %p)\n", This, grfBINDF, pbindinfo); @@ -868,15 +817,13 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, LPOLESTR *ppwzStr, ULONG cEl, ULONG *pcElFetched) { - BindProtocol *This = BINDINFO_THIS(iface); + BindProtocol *This = impl_from_IInternetBindInfo(iface); TRACE("(%p)->(%d %p %d %p)\n", This, ulStringType, ppwzStr, cEl, pcElFetched); return IInternetBindInfo_GetBindString(This->bind_info, ulStringType, ppwzStr, cEl, pcElFetched); } -#undef BINDFO_THIS - static const IInternetBindInfoVtbl InternetBindInfoVtbl = { BindInfo_QueryInterface, BindInfo_AddRef, @@ -885,30 +832,33 @@ static const IInternetBindInfoVtbl InternetBindInfoVtbl = { BindInfo_GetBindString }; -#define PRIORITY_THIS(iface) DEFINE_THIS(BindProtocol, InternetPriority, iface) +static inline BindProtocol *impl_from_IInternetPriority(IInternetPriority *iface) +{ + return CONTAINING_RECORD(iface, BindProtocol, IInternetPriority_iface); +} static HRESULT WINAPI InternetPriority_QueryInterface(IInternetPriority *iface, REFIID riid, void **ppv) { - BindProtocol *This = PRIORITY_THIS(iface); - return IInternetProtocolEx_QueryInterface(PROTOCOLEX(This), riid, ppv); + BindProtocol *This = impl_from_IInternetPriority(iface); + return IInternetProtocolEx_QueryInterface(&This->IInternetProtocolEx_iface, riid, ppv); } static ULONG WINAPI InternetPriority_AddRef(IInternetPriority *iface) { - BindProtocol *This = PRIORITY_THIS(iface); - return IInternetProtocolEx_AddRef(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IInternetPriority(iface); + return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); } static ULONG WINAPI InternetPriority_Release(IInternetPriority *iface) { - BindProtocol *This = PRIORITY_THIS(iface); - return IInternetProtocolEx_Release(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IInternetPriority(iface); + return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); } static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LONG nPriority) { - BindProtocol *This = PRIORITY_THIS(iface); + BindProtocol *This = impl_from_IInternetPriority(iface); TRACE("(%p)->(%d)\n", This, nPriority); @@ -918,7 +868,7 @@ static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LON static HRESULT WINAPI InternetPriority_GetPriority(IInternetPriority *iface, LONG *pnPriority) { - BindProtocol *This = PRIORITY_THIS(iface); + BindProtocol *This = impl_from_IInternetPriority(iface); TRACE("(%p)->(%p)\n", This, pnPriority); @@ -926,8 +876,6 @@ static HRESULT WINAPI InternetPriority_GetPriority(IInternetPriority *iface, LON return S_OK; } -#undef PRIORITY_THIS - static const IInternetPriorityVtbl InternetPriorityVtbl = { InternetPriority_QueryInterface, InternetPriority_AddRef, @@ -937,25 +885,28 @@ static const IInternetPriorityVtbl InternetPriorityVtbl = { }; -#define PROTSINK_THIS(iface) DEFINE_THIS(BindProtocol, IInternetProtocolSink, iface) +static inline BindProtocol *impl_from_IInternetProtocolSink(IInternetProtocolSink *iface) +{ + return CONTAINING_RECORD(iface, BindProtocol, IInternetProtocolSink_iface); +} static HRESULT WINAPI BPInternetProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) { - BindProtocol *This = PROTSINK_THIS(iface); - return IInternetProtocolEx_QueryInterface(PROTOCOLEX(This), riid, ppv); + BindProtocol *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocolEx_QueryInterface(&This->IInternetProtocolEx_iface, riid, ppv); } static ULONG WINAPI BPInternetProtocolSink_AddRef(IInternetProtocolSink *iface) { - BindProtocol *This = PROTSINK_THIS(iface); - return IInternetProtocolEx_AddRef(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); } static ULONG WINAPI BPInternetProtocolSink_Release(IInternetProtocolSink *iface) { - BindProtocol *This = PROTSINK_THIS(iface); - return IInternetProtocolEx_Release(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); } typedef struct { @@ -975,7 +926,7 @@ static void switch_proc(BindProtocol *bind, task_header_t *t) static HRESULT WINAPI BPInternetProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) { - BindProtocol *This = PROTSINK_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolSink(iface); PROTOCOLDATA *data; TRACE("(%p)->(%p)\n", This, pProtocolData); @@ -1015,7 +966,6 @@ static void report_progress(BindProtocol *This, ULONG status_code, LPCWSTR statu case BINDSTATUS_FINDINGRESOURCE: case BINDSTATUS_CONNECTING: case BINDSTATUS_REDIRECTING: - case BINDSTATUS_BEGINDOWNLOADDATA: case BINDSTATUS_SENDINGREQUEST: case BINDSTATUS_CACHEFILENAMEAVAILABLE: case BINDSTATUS_DIRECTBIND: @@ -1024,6 +974,11 @@ static void report_progress(BindProtocol *This, ULONG status_code, LPCWSTR statu IInternetProtocolSink_ReportProgress(This->protocol_sink, status_code, status_text); break; + case BINDSTATUS_BEGINDOWNLOADDATA: + if(This->protocol_sink) + IInternetProtocolSink_ReportData(This->protocol_sink, This->bscf, This->progress, This->progress_max); + break; + case BINDSTATUS_MIMETYPEAVAILABLE: mime_available(This, status_text, FALSE); break; @@ -1057,7 +1012,7 @@ static void on_progress_proc(BindProtocol *This, task_header_t *t) static HRESULT WINAPI BPInternetProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, LPCWSTR szStatusText) { - BindProtocol *This = PROTSINK_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText)); @@ -1079,6 +1034,10 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportProgress(IInternetProtocolSin static HRESULT report_data(BindProtocol *This, DWORD bscf, ULONG progress, ULONG progress_max) { + This->bscf = bscf; + This->progress = progress; + This->progress_max = progress_max; + if(!This->protocol_sink) return S_OK; @@ -1161,7 +1120,7 @@ static void report_data_proc(BindProtocol *This, task_header_t *t) static HRESULT WINAPI BPInternetProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax) { - BindProtocol *This = PROTSINK_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax); @@ -1208,7 +1167,7 @@ static void report_result_proc(BindProtocol *This, task_header_t *t) static HRESULT WINAPI BPInternetProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult) { - BindProtocol *This = PROTSINK_THIS(iface); + BindProtocol *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult)); @@ -1235,8 +1194,6 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportResult(IInternetProtocolSink return IInternetProtocolSink_ReportResult(This->protocol_sink, hrResult, dwError, szResult); } -#undef PROTSINK_THIS - static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = { BPInternetProtocolSink_QueryInterface, BPInternetProtocolSink_AddRef, @@ -1247,30 +1204,33 @@ static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = { BPInternetProtocolSink_ReportResult }; -#define INETINFO_THIS(iface) DEFINE_THIS(BindProtocol, IWinInetHttpInfo, iface) +static inline BindProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface) +{ + return CONTAINING_RECORD(iface, BindProtocol, IWinInetHttpInfo_iface); +} static HRESULT WINAPI WinInetHttpInfo_QueryInterface(IWinInetHttpInfo *iface, REFIID riid, void **ppv) { - BindProtocol *This = INETINFO_THIS(iface); - return IInternetProtocolEx_QueryInterface(PROTOCOLEX(This), riid, ppv); + BindProtocol *This = impl_from_IWinInetHttpInfo(iface); + return IInternetProtocolEx_QueryInterface(&This->IInternetProtocolEx_iface, riid, ppv); } static ULONG WINAPI WinInetHttpInfo_AddRef(IWinInetHttpInfo *iface) { - BindProtocol *This = INETINFO_THIS(iface); - return IInternetProtocolEx_AddRef(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IWinInetHttpInfo(iface); + return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); } static ULONG WINAPI WinInetHttpInfo_Release(IWinInetHttpInfo *iface) { - BindProtocol *This = INETINFO_THIS(iface); - return IInternetProtocolEx_Release(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IWinInetHttpInfo(iface); + return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); } static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer) { - BindProtocol *This = INETINFO_THIS(iface); + BindProtocol *This = impl_from_IWinInetHttpInfo(iface); FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); return E_NOTIMPL; } @@ -1278,13 +1238,11 @@ static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) { - BindProtocol *This = INETINFO_THIS(iface); + BindProtocol *This = impl_from_IWinInetHttpInfo(iface); FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); return E_NOTIMPL; } -#undef INETINFO_THIS - static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { WinInetHttpInfo_QueryInterface, WinInetHttpInfo_AddRef, @@ -1293,31 +1251,34 @@ static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { WinInetHttpInfo_QueryInfo }; -#define SERVPROV_THIS(iface) DEFINE_THIS(BindProtocol, ServiceProvider, iface) +static inline BindProtocol *impl_from_IServiceProvider(IServiceProvider *iface) +{ + return CONTAINING_RECORD(iface, BindProtocol, IServiceProvider_iface); +} static HRESULT WINAPI BPServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) { - BindProtocol *This = SERVPROV_THIS(iface); - return IInternetProtocolEx_QueryInterface(PROTOCOLEX(This), riid, ppv); + BindProtocol *This = impl_from_IServiceProvider(iface); + return IInternetProtocolEx_QueryInterface(&This->IInternetProtocolEx_iface, riid, ppv); } static ULONG WINAPI BPServiceProvider_AddRef(IServiceProvider *iface) { - BindProtocol *This = SERVPROV_THIS(iface); - return IInternetProtocolEx_AddRef(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IServiceProvider(iface); + return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface); } static ULONG WINAPI BPServiceProvider_Release(IServiceProvider *iface) { - BindProtocol *This = SERVPROV_THIS(iface); - return IInternetProtocolEx_Release(PROTOCOLEX(This)); + BindProtocol *This = impl_from_IServiceProvider(iface); + return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); } static HRESULT WINAPI BPServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv) { - BindProtocol *This = SERVPROV_THIS(iface); + BindProtocol *This = impl_from_IServiceProvider(iface); TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); @@ -1327,8 +1288,6 @@ static HRESULT WINAPI BPServiceProvider_QueryService(IServiceProvider *iface, return IServiceProvider_QueryService(This->service_provider, guidService, riid, ppv); } -#undef SERVPROV_THIS - static const IServiceProviderVtbl ServiceProviderVtbl = { BPServiceProvider_QueryInterface, BPServiceProvider_AddRef, @@ -1336,16 +1295,16 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { BPServiceProvider_QueryService }; -HRESULT create_binding_protocol(BOOL from_urlmon, IInternetProtocolEx **protocol) +HRESULT create_binding_protocol(BOOL from_urlmon, BindProtocol **protocol) { BindProtocol *ret = heap_alloc_zero(sizeof(BindProtocol)); - ret->lpIInternetProtocolExVtbl = &BindProtocolVtbl; - ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl; - ret->lpInternetPriorityVtbl = &InternetPriorityVtbl; - ret->lpServiceProviderVtbl = &ServiceProviderVtbl; - ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; - ret->lpIWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; + ret->IInternetProtocolEx_iface.lpVtbl = &BindProtocolVtbl; + ret->IInternetBindInfo_iface.lpVtbl = &InternetBindInfoVtbl; + ret->IInternetPriority_iface.lpVtbl = &InternetPriorityVtbl; + ret->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl; + ret->IInternetProtocolSink_iface.lpVtbl = &InternetProtocolSinkVtbl; + ret->IWinInetHttpInfo_iface.lpVtbl = &WinInetHttpInfoVtbl; ret->default_protocol_handler.IInternetProtocol_iface.lpVtbl = &InternetProtocolHandlerVtbl; @@ -1358,6 +1317,6 @@ HRESULT create_binding_protocol(BOOL from_urlmon, IInternetProtocolEx **protocol URLMON_LockModule(); - *protocol = PROTOCOLEX(ret); + *protocol = ret; return S_OK; } diff --git a/dll/win32/urlmon/download.c b/dll/win32/urlmon/download.c index 9759e71d18e..c20c87c5a1a 100644 --- a/dll/win32/urlmon/download.c +++ b/dll/win32/urlmon/download.c @@ -28,6 +28,7 @@ typedef struct { LONG ref; IBindStatusCallback *callback; + IBinding *binding; LPWSTR file_name; LPWSTR cache_file; } DownloadBSC; @@ -89,6 +90,8 @@ static ULONG WINAPI DownloadBSC_Release(IBindStatusCallback *iface) if(!ref) { if(This->callback) IBindStatusCallback_Release(This->callback); + if(This->binding) + IBinding_Release(This->binding); heap_free(This->file_name); heap_free(This->cache_file); heap_free(This); @@ -101,13 +104,19 @@ static HRESULT WINAPI DownloadBSC_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pbind) { DownloadBSC *This = impl_from_IBindStatusCallback(iface); + HRESULT hres = S_OK; TRACE("(%p)->(%d %p)\n", This, dwReserved, pbind); - if(This->callback) - IBindStatusCallback_OnStartBinding(This->callback, dwReserved, pbind); + if(This->callback) { + hres = IBindStatusCallback_OnStartBinding(This->callback, dwReserved, pbind); - return S_OK; + IBinding_AddRef(pbind); + This->binding = pbind; + } + + /* Windows seems to ignore E_NOTIMPL if it's returned from the client. */ + return hres == E_NOTIMPL ? S_OK : hres; } static HRESULT WINAPI DownloadBSC_GetPriority(IBindStatusCallback *iface, LONG *pnPriority) @@ -132,6 +141,13 @@ static HRESULT on_progress(DownloadBSC *This, ULONG progress, ULONG progress_max return S_OK; hres = IBindStatusCallback_OnProgress(This->callback, progress, progress_max, status_code, status_text); + if(hres == E_ABORT) { + if(This->binding) + IBinding_Abort(This->binding); + else + FIXME("No binding, not sure what to do!\n"); + } + return hres; } @@ -191,6 +207,11 @@ static HRESULT WINAPI DownloadBSC_OnStopBinding(IBindStatusCallback *iface, if(This->callback) IBindStatusCallback_OnStopBinding(This->callback, hresult, szError); + if(This->binding) { + IBinding_Release(This->binding); + This->binding = NULL; + } + return S_OK; } @@ -311,6 +332,7 @@ static HRESULT DownloadBSC_Create(IBindStatusCallback *callback, LPCWSTR file_na ret->ref = 1; ret->file_name = heap_strdupW(file_name); ret->cache_file = NULL; + ret->binding = NULL; if(callback) IBindStatusCallback_AddRef(callback); diff --git a/dll/win32/urlmon/ftp.c b/dll/win32/urlmon/ftp.c index deb611bc901..04cf49c5d82 100644 --- a/dll/win32/urlmon/ftp.c +++ b/dll/win32/urlmon/ftp.c @@ -50,12 +50,15 @@ static inline FtpProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface) return CONTAINING_RECORD(iface, FtpProtocol, IWinInetHttpInfo_iface); } -#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(FtpProtocol, base, iface) +static inline FtpProtocol *impl_from_Protocol(Protocol *prot) +{ + return CONTAINING_RECORD(prot, FtpProtocol, base); +} static HRESULT FtpProtocol_open_request(Protocol *prot, IUri *uri, DWORD request_flags, HINTERNET internet_session, IInternetBindInfo *bind_info) { - FtpProtocol *This = ASYNCPROTOCOL_THIS(prot); + FtpProtocol *This = impl_from_Protocol(prot); BSTR url; HRESULT hres; @@ -82,7 +85,7 @@ static HRESULT FtpProtocol_end_request(Protocol *prot) static HRESULT FtpProtocol_start_downloading(Protocol *prot) { - FtpProtocol *This = ASYNCPROTOCOL_THIS(prot); + FtpProtocol *This = impl_from_Protocol(prot); DWORD size; BOOL res; @@ -99,13 +102,17 @@ static void FtpProtocol_close_connection(Protocol *prot) { } -#undef ASYNCPROTOCOL_THIS +static void FtpProtocol_on_error(Protocol *prot, DWORD error) +{ + FIXME("(%p) %d - stub\n", prot, error); +} static const ProtocolVtbl AsyncProtocolVtbl = { FtpProtocol_open_request, FtpProtocol_end_request, FtpProtocol_start_downloading, - FtpProtocol_close_connection + FtpProtocol_close_connection, + FtpProtocol_on_error }; static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv) @@ -377,16 +384,28 @@ static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOpti void *pBuffer, DWORD *pcbBuffer) { FtpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); + + if(!This->base.request) + return E_FAIL; + + if(!InternetQueryOptionW(This->base.request, dwOption, pBuffer, pcbBuffer)) + return S_FALSE; + return S_OK; } static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) { FtpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); + + if(!This->base.request) + return E_FAIL; + + if(!HttpQueryInfoW(This->base.request, dwOption, pBuffer, pcbBuffer, pdwFlags)) + return S_FALSE; + return S_OK; } static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { diff --git a/dll/win32/urlmon/gopher.c b/dll/win32/urlmon/gopher.c index da241e9358e..4087ed5ace2 100644 --- a/dll/win32/urlmon/gopher.c +++ b/dll/win32/urlmon/gopher.c @@ -24,20 +24,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { Protocol base; - const IInternetProtocolVtbl *lpIInternetProtocolVtbl; - const IInternetPriorityVtbl *lpInternetPriorityVtbl; + IInternetProtocol IInternetProtocol_iface; + IInternetPriority IInternetPriority_iface; LONG ref; } GopherProtocol; -#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) - -#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(GopherProtocol, base, iface) +static inline GopherProtocol *impl_from_Protocol(Protocol *prot) +{ + return CONTAINING_RECORD(prot, GopherProtocol, base); +} static HRESULT GopherProtocol_open_request(Protocol *prot, IUri *uri, DWORD request_flags, HINTERNET internet_session, IInternetBindInfo *bind_info) { - GopherProtocol *This = ASYNCPROTOCOL_THIS(prot); + GopherProtocol *This = impl_from_Protocol(prot); BSTR url; HRESULT hres; @@ -70,34 +71,41 @@ static void GopherProtocol_close_connection(Protocol *prot) { } -#undef ASYNCPROTOCOL_THIS +static void GopherProtocol_on_error(Protocol *prot, DWORD error) +{ + FIXME("(%p) %d - stub\n", prot, error); +} static const ProtocolVtbl AsyncProtocolVtbl = { GopherProtocol_open_request, GopherProtocol_end_request, GopherProtocol_start_downloading, - GopherProtocol_close_connection + GopherProtocol_close_connection, + GopherProtocol_on_error }; -#define PROTOCOL_THIS(iface) DEFINE_THIS(GopherProtocol, IInternetProtocol, iface) +static inline GopherProtocol *impl_from_IInternetProtocol(IInternetProtocol *iface) +{ + return CONTAINING_RECORD(iface, GopherProtocol, IInternetProtocol_iface); +} static HRESULT WINAPI GopherProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) { TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetPriority, riid)) { TRACE("(%p)->(IID_IInternetPriority %p)\n", This, ppv); - *ppv = PRIORITY(This); + *ppv = &This->IInternetPriority_iface; } if(*ppv) { @@ -111,7 +119,7 @@ static HRESULT WINAPI GopherProtocol_QueryInterface(IInternetProtocol *iface, RE static ULONG WINAPI GopherProtocol_AddRef(IInternetProtocol *iface) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); return ref; @@ -119,7 +127,7 @@ static ULONG WINAPI GopherProtocol_AddRef(IInternetProtocol *iface) static ULONG WINAPI GopherProtocol_Release(IInternetProtocol *iface) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -137,7 +145,7 @@ static HRESULT WINAPI GopherProtocol_Start(IInternetProtocol *iface, LPCWSTR szU IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); IUri *uri; HRESULT hres; @@ -148,7 +156,8 @@ static HRESULT WINAPI GopherProtocol_Start(IInternetProtocol *iface, LPCWSTR szU if(FAILED(hres)) return hres; - hres = protocol_start(&This->base, PROTOCOL(This), uri, pOIProtSink, pOIBindInfo); + hres = protocol_start(&This->base, &This->IInternetProtocol_iface, uri, pOIProtSink, + pOIBindInfo); IUri_Release(uri); return hres; @@ -156,7 +165,7 @@ static HRESULT WINAPI GopherProtocol_Start(IInternetProtocol *iface, LPCWSTR szU static HRESULT WINAPI GopherProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%p)\n", This, pProtocolData); @@ -166,7 +175,7 @@ static HRESULT WINAPI GopherProtocol_Continue(IInternetProtocol *iface, PROTOCOL static HRESULT WINAPI GopherProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions); @@ -175,7 +184,7 @@ static HRESULT WINAPI GopherProtocol_Abort(IInternetProtocol *iface, HRESULT hrR static HRESULT WINAPI GopherProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%08x)\n", This, dwOptions); @@ -185,14 +194,14 @@ static HRESULT WINAPI GopherProtocol_Terminate(IInternetProtocol *iface, DWORD d static HRESULT WINAPI GopherProtocol_Suspend(IInternetProtocol *iface) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } static HRESULT WINAPI GopherProtocol_Resume(IInternetProtocol *iface) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } @@ -200,7 +209,7 @@ static HRESULT WINAPI GopherProtocol_Resume(IInternetProtocol *iface) static HRESULT WINAPI GopherProtocol_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); @@ -210,14 +219,14 @@ static HRESULT WINAPI GopherProtocol_Read(IInternetProtocol *iface, void *pv, static HRESULT WINAPI GopherProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); return E_NOTIMPL; } static HRESULT WINAPI GopherProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%08x)\n", This, dwOptions); @@ -226,15 +235,13 @@ static HRESULT WINAPI GopherProtocol_LockRequest(IInternetProtocol *iface, DWORD static HRESULT WINAPI GopherProtocol_UnlockRequest(IInternetProtocol *iface) { - GopherProtocol *This = PROTOCOL_THIS(iface); + GopherProtocol *This = impl_from_IInternetProtocol(iface); TRACE("(%p)\n", This); return protocol_unlock_request(&This->base); } -#undef PROTOCOL_THIS - static const IInternetProtocolVtbl GopherProtocolVtbl = { GopherProtocol_QueryInterface, GopherProtocol_AddRef, @@ -251,29 +258,32 @@ static const IInternetProtocolVtbl GopherProtocolVtbl = { GopherProtocol_UnlockRequest }; -#define PRIORITY_THIS(iface) DEFINE_THIS(GopherProtocol, InternetPriority, iface) +static inline GopherProtocol *impl_from_IInternetPriority(IInternetPriority *iface) +{ + return CONTAINING_RECORD(iface, GopherProtocol, IInternetPriority_iface); +} static HRESULT WINAPI GopherPriority_QueryInterface(IInternetPriority *iface, REFIID riid, void **ppv) { - GopherProtocol *This = PRIORITY_THIS(iface); - return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv); + GopherProtocol *This = impl_from_IInternetPriority(iface); + return IInternetProtocol_QueryInterface(&This->IInternetProtocol_iface, riid, ppv); } static ULONG WINAPI GopherPriority_AddRef(IInternetPriority *iface) { - GopherProtocol *This = PRIORITY_THIS(iface); - return IInternetProtocol_AddRef(PROTOCOL(This)); + GopherProtocol *This = impl_from_IInternetPriority(iface); + return IInternetProtocol_AddRef(&This->IInternetProtocol_iface); } static ULONG WINAPI GopherPriority_Release(IInternetPriority *iface) { - GopherProtocol *This = PRIORITY_THIS(iface); - return IInternetProtocol_Release(PROTOCOL(This)); + GopherProtocol *This = impl_from_IInternetPriority(iface); + return IInternetProtocol_Release(&This->IInternetProtocol_iface); } static HRESULT WINAPI GopherPriority_SetPriority(IInternetPriority *iface, LONG nPriority) { - GopherProtocol *This = PRIORITY_THIS(iface); + GopherProtocol *This = impl_from_IInternetPriority(iface); TRACE("(%p)->(%d)\n", This, nPriority); @@ -283,7 +293,7 @@ static HRESULT WINAPI GopherPriority_SetPriority(IInternetPriority *iface, LONG static HRESULT WINAPI GopherPriority_GetPriority(IInternetPriority *iface, LONG *pnPriority) { - GopherProtocol *This = PRIORITY_THIS(iface); + GopherProtocol *This = impl_from_IInternetPriority(iface); TRACE("(%p)->(%p)\n", This, pnPriority); @@ -291,8 +301,6 @@ static HRESULT WINAPI GopherPriority_GetPriority(IInternetPriority *iface, LONG return S_OK; } -#undef PRIORITY_THIS - static const IInternetPriorityVtbl GopherPriorityVtbl = { GopherPriority_QueryInterface, GopherPriority_AddRef, @@ -312,11 +320,11 @@ HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret = heap_alloc_zero(sizeof(GopherProtocol)); ret->base.vtbl = &AsyncProtocolVtbl; - ret->lpIInternetProtocolVtbl = &GopherProtocolVtbl; - ret->lpInternetPriorityVtbl = &GopherPriorityVtbl; + ret->IInternetProtocol_iface.lpVtbl = &GopherProtocolVtbl; + ret->IInternetPriority_iface.lpVtbl = &GopherPriorityVtbl; ret->ref = 1; - *ppobj = PROTOCOL(ret); + *ppobj = &ret->IInternetProtocol_iface; return S_OK; } diff --git a/dll/win32/urlmon/http.c b/dll/win32/urlmon/http.c index 2aaefb085ec..5a606ca774d 100644 --- a/dll/win32/urlmon/http.c +++ b/dll/win32/urlmon/http.c @@ -36,7 +36,7 @@ typedef struct { BOOL https; IHttpNegotiate *http_negotiate; - LPWSTR full_header; + WCHAR *full_header; LONG ref; } HttpProtocol; @@ -56,9 +56,8 @@ static inline HttpProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface) return CONTAINING_RECORD(iface, HttpProtocol, IWinInetHttpInfo_iface); } -/* Default headers from native */ -static const WCHAR wszHeaders[] = {'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g', - ':',' ','g','z','i','p',',',' ','d','e','f','l','a','t','e',0}; +static const WCHAR default_headersW[] = { + 'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',':',' ','g','z','i','p',',',' ','d','e','f','l','a','t','e',0}; static LPWSTR query_http_info(HttpProtocol *This, DWORD option) { @@ -80,13 +79,196 @@ static LPWSTR query_http_info(HttpProtocol *This, DWORD option) return ret; } -#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(HttpProtocol, base, iface) +static inline BOOL set_security_flag(HttpProtocol *This, DWORD new_flag) +{ + DWORD flags, size = sizeof(flags); + BOOL res; + + res = InternetQueryOptionW(This->base.request, INTERNET_OPTION_SECURITY_FLAGS, &flags, &size); + if(res) { + flags |= new_flag; + res = InternetSetOptionW(This->base.request, INTERNET_OPTION_SECURITY_FLAGS, &flags, size); + } + if(!res) + ERR("Failed to set security flag(s): %x\n", new_flag); + + return res; +} + +static inline HRESULT internet_error_to_hres(DWORD error) +{ + switch(error) + { + case ERROR_INTERNET_SEC_CERT_DATE_INVALID: + case ERROR_INTERNET_SEC_CERT_CN_INVALID: + case ERROR_INTERNET_INVALID_CA: + case ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED: + return INET_E_INVALID_CERTIFICATE; + case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR: + case ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR: + case ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION: + return INET_E_REDIRECT_FAILED; + default: + return INET_E_DOWNLOAD_FAILURE; + } +} + +static HRESULT handle_http_error(HttpProtocol *This, DWORD error) +{ + IServiceProvider *serv_prov; + IWindowForBindingUI *wfb_ui; + IHttpSecurity *http_security; + BOOL security_problem; + HRESULT hres; + + switch(error) { + case ERROR_INTERNET_SEC_CERT_DATE_INVALID: + case ERROR_INTERNET_SEC_CERT_CN_INVALID: + case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR: + case ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR: + case ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION: + case ERROR_INTERNET_INVALID_CA: + case ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED: + security_problem = TRUE; + break; + default: + security_problem = FALSE; + } + + hres = IInternetProtocolSink_QueryInterface(This->base.protocol_sink, &IID_IServiceProvider, + (void**)&serv_prov); + if(FAILED(hres)) { + ERR("Failed to get IServiceProvider.\n"); + return E_ABORT; + } + + if(security_problem) { + hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpSecurity, &IID_IHttpSecurity, + (void**)&http_security); + if(SUCCEEDED(hres)) { + hres = IHttpSecurity_OnSecurityProblem(http_security, error); + IHttpSecurity_Release(http_security); + + if(hres != S_FALSE) + { + BOOL res = FALSE; + + IServiceProvider_Release(serv_prov); + + if(hres == S_OK) { + if(error == ERROR_INTERNET_SEC_CERT_DATE_INVALID) + res = set_security_flag(This, SECURITY_FLAG_IGNORE_CERT_DATE_INVALID); + else if(error == ERROR_INTERNET_SEC_CERT_CN_INVALID) + res = set_security_flag(This, SECURITY_FLAG_IGNORE_CERT_CN_INVALID); + else if(error == ERROR_INTERNET_INVALID_CA) + res = set_security_flag(This, SECURITY_FLAG_IGNORE_UNKNOWN_CA); + + if(res) + return RPC_E_RETRY; + + FIXME("Don't know how to ignore error %d\n", error); + return E_ABORT; + } + + if(hres == E_ABORT) + return E_ABORT; + if(hres == RPC_E_RETRY) + return RPC_E_RETRY; + + return internet_error_to_hres(error); + } + } + } + + hres = IServiceProvider_QueryService(serv_prov, &IID_IWindowForBindingUI, &IID_IWindowForBindingUI, + (void**)&wfb_ui); + if(SUCCEEDED(hres)) { + HWND hwnd; + const IID *iid_reason; + + if(security_problem) + iid_reason = &IID_IHttpSecurity; + else if(error == ERROR_INTERNET_INCORRECT_PASSWORD) + iid_reason = &IID_IAuthenticate; + else + iid_reason = &IID_IWindowForBindingUI; + + hres = IWindowForBindingUI_GetWindow(wfb_ui, iid_reason, &hwnd); + if(SUCCEEDED(hres) && hwnd) + { + DWORD res; + + res = InternetErrorDlg(hwnd, This->base.request, error, + FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS | FLAGS_ERROR_UI_FLAGS_GENERATE_DATA, + NULL); + + if(res == ERROR_INTERNET_FORCE_RETRY || res == ERROR_SUCCESS) + hres = RPC_E_RETRY; + else + hres = E_FAIL; + } + IWindowForBindingUI_Release(wfb_ui); + } + + IServiceProvider_Release(serv_prov); + + if(hres == RPC_E_RETRY) + return hres; + + return internet_error_to_hres(error); +} + +static ULONG send_http_request(HttpProtocol *This) +{ + INTERNET_BUFFERSW send_buffer = {sizeof(INTERNET_BUFFERSW)}; + BOOL res; + + send_buffer.lpcszHeader = This->full_header; + send_buffer.dwHeadersLength = send_buffer.dwHeadersTotal = strlenW(This->full_header); + + if(This->base.bind_info.dwBindVerb != BINDVERB_GET) { + switch(This->base.bind_info.stgmedData.tymed) { + case TYMED_HGLOBAL: + /* Native does not use GlobalLock/GlobalUnlock, so we won't either */ + send_buffer.lpvBuffer = This->base.bind_info.stgmedData.u.hGlobal; + send_buffer.dwBufferLength = send_buffer.dwBufferTotal = This->base.bind_info.cbstgmedData; + break; + case TYMED_ISTREAM: { + LARGE_INTEGER offset; + + send_buffer.dwBufferTotal = This->base.bind_info.cbstgmedData; + if(!This->base.post_stream) { + This->base.post_stream = This->base.bind_info.stgmedData.u.pstm; + IStream_AddRef(This->base.post_stream); + } + + offset.QuadPart = 0; + IStream_Seek(This->base.post_stream, offset, STREAM_SEEK_SET, NULL); + break; + } + default: + FIXME("Unsupported This->base.bind_info.stgmedData.tymed %d\n", This->base.bind_info.stgmedData.tymed); + } + } + + if(This->base.post_stream) + res = HttpSendRequestExW(This->base.request, &send_buffer, NULL, 0, 0); + else + res = HttpSendRequestW(This->base.request, send_buffer.lpcszHeader, send_buffer.dwHeadersLength, + send_buffer.lpvBuffer, send_buffer.dwBufferLength); + + return res ? 0 : GetLastError(); +} + +static inline HttpProtocol *impl_from_Protocol(Protocol *prot) +{ + return CONTAINING_RECORD(prot, HttpProtocol, base); +} static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD request_flags, HINTERNET internet_session, IInternetBindInfo *bind_info) { - HttpProtocol *This = ASYNCPROTOCOL_THIS(prot); - INTERNET_BUFFERSW send_buffer = {sizeof(INTERNET_BUFFERSW)}; + HttpProtocol *This = impl_from_Protocol(prot); LPWSTR addl_header = NULL, post_cookie = NULL; IServiceProvider *service_provider = NULL; IHttpNegotiate2 *http_negotiate2 = NULL; @@ -94,8 +276,8 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques LPOLESTR accept_mimes[257]; const WCHAR **accept_types; BYTE security_id[512]; - DWORD len = 0, port; - ULONG num; + DWORD len, port; + ULONG num, error; BOOL res, b; HRESULT hres; @@ -188,7 +370,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques return hres; } - hres = IHttpNegotiate_BeginningTransaction(This->http_negotiate, url, wszHeaders, + hres = IHttpNegotiate_BeginningTransaction(This->http_negotiate, url, default_headersW, 0, &addl_header); SysFreeString(url); if(hres != S_OK) { @@ -197,18 +379,19 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques return hres; } - if(addl_header) { - int len_addl_header = strlenW(addl_header); + len = addl_header ? strlenW(addl_header) : 0; - This->full_header = heap_alloc(len_addl_header*sizeof(WCHAR)+sizeof(wszHeaders)); - - lstrcpyW(This->full_header, addl_header); - lstrcpyW(&This->full_header[len_addl_header], wszHeaders); - CoTaskMemFree(addl_header); - }else { - This->full_header = (LPWSTR)wszHeaders; + This->full_header = heap_alloc(len*sizeof(WCHAR)+sizeof(default_headersW)); + if(!This->full_header) { + IServiceProvider_Release(service_provider); + return E_OUTOFMEMORY; } + if(len) + memcpy(This->full_header, addl_header, len*sizeof(WCHAR)); + CoTaskMemFree(addl_header); + memcpy(This->full_header+len, default_headersW, sizeof(default_headersW)); + hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2, (void **)&http_negotiate2); IServiceProvider_Release(service_provider); @@ -236,48 +419,23 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques } } - send_buffer.lpcszHeader = This->full_header; - send_buffer.dwHeadersLength = send_buffer.dwHeadersTotal = strlenW(This->full_header); - - if(This->base.bind_info.dwBindVerb != BINDVERB_GET) { - switch(This->base.bind_info.stgmedData.tymed) { - case TYMED_HGLOBAL: - /* Native does not use GlobalLock/GlobalUnlock, so we won't either */ - send_buffer.lpvBuffer = This->base.bind_info.stgmedData.u.hGlobal; - send_buffer.dwBufferLength = send_buffer.dwBufferTotal = This->base.bind_info.cbstgmedData; - break; - case TYMED_ISTREAM: { - LARGE_INTEGER offset; - - send_buffer.dwBufferTotal = This->base.bind_info.cbstgmedData; - This->base.post_stream = This->base.bind_info.stgmedData.u.pstm; - IStream_AddRef(This->base.post_stream); - - offset.QuadPart = 0; - IStream_Seek(This->base.post_stream, offset, STREAM_SEEK_SET, NULL); - break; - } - default: - FIXME("Unsupported This->base.bind_info.stgmedData.tymed %d\n", This->base.bind_info.stgmedData.tymed); - } - } - b = TRUE; res = InternetSetOptionW(This->base.request, INTERNET_OPTION_HTTP_DECODING, &b, sizeof(b)); if(!res) WARN("InternetSetOption(INTERNET_OPTION_HTTP_DECODING) failed: %08x\n", GetLastError()); - if(This->base.post_stream) - res = HttpSendRequestExW(This->base.request, &send_buffer, NULL, 0, 0); - else - res = HttpSendRequestW(This->base.request, send_buffer.lpcszHeader, send_buffer.dwHeadersLength, - send_buffer.lpvBuffer, send_buffer.dwBufferLength); - if(!res && GetLastError() != ERROR_IO_PENDING) { - WARN("HttpSendRequest failed: %d\n", GetLastError()); - return INET_E_DOWNLOAD_FAILURE; - } + do { + error = send_http_request(This); - return S_OK; + if(error == ERROR_IO_PENDING || error == ERROR_SUCCESS) + return S_OK; + + hres = handle_http_error(This, error); + + } while(hres == RPC_E_RETRY); + + WARN("HttpSendRequest failed: %d\n", error); + return hres; } static HRESULT HttpProtocol_end_request(Protocol *protocol) @@ -295,7 +453,7 @@ static HRESULT HttpProtocol_end_request(Protocol *protocol) static HRESULT HttpProtocol_start_downloading(Protocol *prot) { - HttpProtocol *This = ASYNCPROTOCOL_THIS(prot); + HttpProtocol *This = impl_from_Protocol(prot); LPWSTR content_type, content_length, ranges; DWORD len = sizeof(DWORD); DWORD status_code; @@ -363,27 +521,49 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot) static void HttpProtocol_close_connection(Protocol *prot) { - HttpProtocol *This = ASYNCPROTOCOL_THIS(prot); + HttpProtocol *This = impl_from_Protocol(prot); if(This->http_negotiate) { IHttpNegotiate_Release(This->http_negotiate); - This->http_negotiate = 0; + This->http_negotiate = NULL; } if(This->full_header) { - if(This->full_header != wszHeaders) - heap_free(This->full_header); - This->full_header = 0; + heap_free(This->full_header); + This->full_header = NULL; } } -#undef ASYNCPROTOCOL_THIS +static void HttpProtocol_on_error(Protocol *prot, DWORD error) +{ + HttpProtocol *This = impl_from_Protocol(prot); + HRESULT hres; + + TRACE("(%p) %d\n", prot, error); + + if(prot->flags & FLAG_FIRST_CONTINUE_COMPLETE) { + FIXME("Not handling error %d\n", error); + return; + } + + while((hres = handle_http_error(This, error)) == RPC_E_RETRY) { + error = send_http_request(This); + + if(error == ERROR_IO_PENDING || error == ERROR_SUCCESS) + return; + } + + protocol_abort(prot, hres); + protocol_close_connection(prot); + return; +} static const ProtocolVtbl AsyncProtocolVtbl = { HttpProtocol_open_request, HttpProtocol_end_request, HttpProtocol_start_downloading, - HttpProtocol_close_connection + HttpProtocol_close_connection, + HttpProtocol_on_error }; static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv) @@ -655,16 +835,31 @@ static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOpti void *pBuffer, DWORD *pcbBuffer) { HttpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); + + if(!This->base.request) + return E_FAIL; + + if(!InternetQueryOptionW(This->base.request, dwOption, pBuffer, pcbBuffer)) + return S_FALSE; + return S_OK; } static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) { HttpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); + + if(!This->base.request) + return E_FAIL; + + if(!HttpQueryInfoW(This->base.request, dwOption, pBuffer, pcbBuffer, pdwFlags)) { + if(pBuffer) + memset(pBuffer, 0, *pcbBuffer); + return S_OK; + } + return S_OK; } static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { diff --git a/dll/win32/urlmon/internet.c b/dll/win32/urlmon/internet.c index 3d41defe8f6..3832c524daa 100644 --- a/dll/win32/urlmon/internet.c +++ b/dll/win32/urlmon/internet.c @@ -1,5 +1,6 @@ /* * Copyright 2005 Jacek Caban + * Copyright 2011 Thomas Mullaly for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,6 +25,127 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); +static const WCHAR feature_control_keyW[] = + {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\', + 'M','a','i','n','\\', + 'F','e','a','t','u','r','e','C','o','n','t','r','o','l',0}; + +static const WCHAR feature_object_cachingW[] = + {'F','E','A','T','U','R','E','_','O','B','J','E','C','T','_','C','A','C','H','I','N','G',0}; +static const WCHAR feature_zone_elevationW[] = + {'F','E','A','T','U','R','E','_','Z','O','N','E','_','E','L','E','V','A','T','I','O','N',0}; +static const WCHAR feature_mime_handlingW[] = + {'F','E','A','T','U','R','E','_','M','I','M','E','_','H','A','N','D','L','I','N','G',0}; +static const WCHAR feature_mime_sniffingW[] = + {'F','E','A','T','U','R','E','_','M','I','M','E','_','S','N','I','F','F','I','N','G',0}; +static const WCHAR feature_window_restrictionsW[] = + {'F','E','A','T','U','R','E','_','W','I','N','D','O','W','_','R','E','S','T','R','I','C','T','I','O','N','S',0}; +static const WCHAR feature_weboc_popupmanagementW[] = + {'F','E','A','T','U','R','E','_','W','E','B','O','C','_','P','O','P','U','P','M','A','N','A','G','E','M','E','N','T',0}; +static const WCHAR feature_behaviorsW[] = + {'F','E','A','T','U','R','E','_','B','E','H','A','V','I','O','R','S',0}; +static const WCHAR feature_disable_mk_protocolW[] = + {'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','M','K','_','P','R','O','T','O','C','O','L',0}; +static const WCHAR feature_localmachine_lockdownW[] = + {'F','E','A','T','U','R','E','_','L','O','C','A','L','M','A','C','H','I','N','E','_','L','O','C','K','D','O','W','N',0}; +static const WCHAR feature_securitybandW[] = + {'F','E','A','T','U','R','E','_','S','E','C','U','R','I','T','Y','B','A','N','D',0}; +static const WCHAR feature_restrict_activexinstallW[] = + {'F','E','A','T','U','R','E','_','R','E','S','T','R','I','C','T','_','A','C','T','I','V','E','X','I','N','S','T','A','L','L',0}; +static const WCHAR feature_validate_navigate_urlW[] = + {'F','E','A','T','U','R','E','_','V','A','L','I','D','A','T','E','_','N','A','V','I','G','A','T','E','_','U','R','L',0}; +static const WCHAR feature_restrict_filedownloadW[] = + {'F','E','A','T','U','R','E','_','R','E','S','T','R','I','C','T','_','F','I','L','E','D','O','W','N','L','O','A','D',0}; +static const WCHAR feature_addon_managementW[] = + {'F','E','A','T','U','R','E','_','A','D','D','O','N','_','M','A','N','A','G','E','M','E','N','T',0}; +static const WCHAR feature_protocol_lockdownW[] = + {'F','E','A','T','U','R','E','_','P','R','O','T','O','C','O','L','_','L','O','C','K','D','O','W','N',0}; +static const WCHAR feature_http_username_password_disableW[] = + {'F','E','A','T','U','R','E','_','H','T','T','P','_','U','S','E','R','N','A','M','E','_', + 'P','A','S','S','W','O','R','D','_','D','I','S','A','B','L','E',0}; +static const WCHAR feature_safe_bindtoobjectW[] = + {'F','E','A','T','U','R','E','_','S','A','F','E','_','B','I','N','D','T','O','O','B','J','E','C','T',0}; +static const WCHAR feature_unc_savedfilecheckW[] = + {'F','E','A','T','U','R','E','_','U','N','C','_','S','A','V','E','D','F','I','L','E','C','H','E','C','K',0}; +static const WCHAR feature_get_url_dom_filepath_unencodedW[] = + {'F','E','A','T','U','R','E','_','G','E','T','_','U','R','L','_','D','O','M','_', + 'F','I','L','E','P','A','T','H','_','U','N','E','N','C','O','D','E','D',0}; +static const WCHAR feature_tabbed_browsingW[] = + {'F','E','A','T','U','R','E','_','T','A','B','B','E','D','_','B','R','O','W','S','I','N','G',0}; +static const WCHAR feature_ssluxW[] = + {'F','E','A','T','U','R','E','_','S','S','L','U','X',0}; +static const WCHAR feature_disable_navigation_soundsW[] = + {'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','N','A','V','I','G','A','T','I','O','N','_', + 'S','O','U','N','D','S',0}; +static const WCHAR feature_disable_legacy_compressionW[] = + {'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','L','E','G','A','C','Y','_', + 'C','O','M','P','R','E','S','S','I','O','N',0}; +static const WCHAR feature_force_addr_and_statusW[] = + {'F','E','A','T','U','R','E','_','F','O','R','C','E','_','A','D','D','R','_','A','N','D','_', + 'S','T','A','T','U','S',0}; +static const WCHAR feature_xmlhttpW[] = + {'F','E','A','T','U','R','E','_','X','M','L','H','T','T','P',0}; +static const WCHAR feature_disable_telnet_protocolW[] = + {'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','T','E','L','N','E','T','_', + 'P','R','O','T','O','C','O','L',0}; +static const WCHAR feature_feedsW[] = + {'F','E','A','T','U','R','E','_','F','E','E','D','S',0}; +static const WCHAR feature_block_input_promptsW[] = + {'F','E','A','T','U','R','E','_','B','L','O','C','K','_','I','N','P','U','T','_','P','R','O','M','P','T','S',0}; + +static CRITICAL_SECTION process_features_cs; +static CRITICAL_SECTION_DEBUG process_features_cs_dbg = +{ + 0, 0, &process_features_cs, + { &process_features_cs_dbg.ProcessLocksList, &process_features_cs_dbg.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": process features") } +}; +static CRITICAL_SECTION process_features_cs = { &process_features_cs_dbg, -1, 0, 0, 0, 0 }; + +typedef struct feature_control { + LPCWSTR feature_name; + BOOL enabled; + BOOL check_registry; +} feature_control; + +/* IMPORTANT!!! + * + * This array is indexed using INTERNETFEATURELIST values, so everything must + * appear in the same order as it does in INTERNETFEATURELIST. + */ +static feature_control process_feature_controls[FEATURE_ENTRY_COUNT] = { + {feature_object_cachingW, TRUE ,TRUE}, + {feature_zone_elevationW, FALSE,TRUE}, + {feature_mime_handlingW, FALSE,TRUE}, + {feature_mime_sniffingW, FALSE,TRUE}, + {feature_window_restrictionsW, FALSE,TRUE}, + {feature_weboc_popupmanagementW, FALSE,TRUE}, + {feature_behaviorsW, TRUE ,TRUE}, + {feature_disable_mk_protocolW, TRUE ,TRUE}, + {feature_localmachine_lockdownW, FALSE,TRUE}, + {feature_securitybandW, FALSE,TRUE}, + {feature_restrict_activexinstallW, FALSE,TRUE}, + {feature_validate_navigate_urlW, FALSE,TRUE}, + {feature_restrict_filedownloadW, FALSE,TRUE}, + {feature_addon_managementW, FALSE,TRUE}, + {feature_protocol_lockdownW, FALSE,TRUE}, + {feature_http_username_password_disableW, FALSE,TRUE}, + {feature_safe_bindtoobjectW, FALSE,TRUE}, + {feature_unc_savedfilecheckW, FALSE,TRUE}, + {feature_get_url_dom_filepath_unencodedW, TRUE ,TRUE}, + {feature_tabbed_browsingW, FALSE,TRUE}, + {feature_ssluxW, FALSE,TRUE}, + {feature_disable_navigation_soundsW, FALSE,TRUE}, + {feature_disable_legacy_compressionW, TRUE ,TRUE}, + {feature_force_addr_and_statusW, FALSE,TRUE}, + {feature_xmlhttpW, TRUE ,TRUE}, + {feature_disable_telnet_protocolW, FALSE,TRUE}, + {feature_feedsW, FALSE,TRUE}, + {feature_block_input_promptsW, FALSE,TRUE} +}; + static HRESULT parse_schema(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize) { WCHAR *ptr; @@ -397,20 +519,182 @@ HRESULT WINAPI CoInternetQueryInfo(LPCWSTR pwzUrl, QUERYOPTION QueryOption, return S_OK; } +static void set_feature_on_process(INTERNETFEATURELIST feature, BOOL enable) +{ + EnterCriticalSection(&process_features_cs); + + process_feature_controls[feature].enabled = enable; + process_feature_controls[feature].check_registry = FALSE; + + LeaveCriticalSection(&process_features_cs); +} + +static HRESULT set_internet_feature(INTERNETFEATURELIST feature, DWORD flags, BOOL enable) +{ + const DWORD supported_flags = SET_FEATURE_ON_PROCESS; + + if(feature >= FEATURE_ENTRY_COUNT) + return E_FAIL; + + if(flags & ~supported_flags) { + FIXME("Unsupported flags: %08x\n", flags & ~supported_flags); + return E_NOTIMPL; + } + + if(flags & SET_FEATURE_ON_PROCESS) + set_feature_on_process(feature, enable); + + return S_OK; +} + +static BOOL get_feature_from_reg(HKEY feature_control, LPCWSTR feature_name, LPCWSTR process_name, BOOL *enabled) +{ + BOOL ret = FALSE; + HKEY feature; + DWORD res; + + static const WCHAR wildcardW[] = {'*',0}; + + res = RegOpenKeyW(feature_control, feature_name, &feature); + if(res == ERROR_SUCCESS) { + DWORD type, value, size; + + size = sizeof(DWORD); + res = RegQueryValueExW(feature, process_name, NULL, &type, (BYTE*)&value, &size); + if(type != REG_DWORD) + WARN("Unexpected registry value type %d (expected REG_DWORD) for %s\n", type, debugstr_w(process_name)); + + if(res == ERROR_SUCCESS && type == REG_DWORD) { + *enabled = value == 1; + ret = TRUE; + } else { + size = sizeof(DWORD); + res = RegQueryValueExW(feature, wildcardW, NULL, &type, (BYTE*)&value, &size); + if(type != REG_DWORD) + WARN("Unexpected registry value type %d (expected REG_DWORD) for %s\n", type, debugstr_w(wildcardW)); + + if(res == ERROR_SUCCESS && type == REG_DWORD) { + *enabled = value == 1; + ret = TRUE; + } + } + RegCloseKey(feature); + } + + return ret; +} + +/* Assumes 'process_features_cs' is held. */ +static HRESULT load_process_feature(INTERNETFEATURELIST feature) +{ + DWORD res; + HKEY feature_control; + WCHAR module_name[MAX_PATH]; + LPCWSTR process_name, feature_name; + HRESULT hres = S_FALSE; + BOOL check_hklm = FALSE; + BOOL enabled; + + if (!GetModuleFileNameW(NULL, module_name, sizeof(module_name)/sizeof(WCHAR))) { + ERR("Failed to get module file name: %u\n", GetLastError()); + return E_UNEXPECTED; + } + + process_name = strrchrW(module_name, '\\'); + if(!process_name) { + ERR("Invalid module file name: %s\n", debugstr_w(module_name)); + return E_UNEXPECTED; + } + + /* Skip past the '\\' in front of the filename. */ + ++process_name; + + feature_name = process_feature_controls[feature].feature_name; + + res = RegOpenKeyW(HKEY_CURRENT_USER, feature_control_keyW, &feature_control); + if(res == ERROR_SUCCESS) { + if(get_feature_from_reg(feature_control, feature_name, process_name, &enabled)) { + hres = enabled ? S_OK : S_FALSE; + process_feature_controls[feature].enabled = enabled; + } else + /* We didn't find anything in HKCU, so check HKLM. */ + check_hklm = TRUE; + + RegCloseKey(feature_control); + } + + if(check_hklm) { + res = RegOpenKeyW(HKEY_LOCAL_MACHINE, feature_control_keyW, &feature_control); + if(res == ERROR_SUCCESS) { + if(get_feature_from_reg(feature_control, feature_name, process_name, &enabled)) { + hres = enabled ? S_OK : S_FALSE; + process_feature_controls[feature].enabled = enabled; + } + RegCloseKey(feature_control); + } + } + + /* Don't bother checking the registry again for this feature. */ + process_feature_controls[feature].check_registry = FALSE; + + return hres; +} + +static HRESULT get_feature_from_process(INTERNETFEATURELIST feature) +{ + HRESULT hres; + + EnterCriticalSection(&process_features_cs); + + /* Try loading the feature from the registry, if it hasn't already + * been done. + */ + if(process_feature_controls[feature].check_registry) { + hres = load_process_feature(feature); + if(FAILED(hres)) { + LeaveCriticalSection(&process_features_cs); + return hres; + } + } + + hres = process_feature_controls[feature].enabled ? S_OK : S_FALSE; + + LeaveCriticalSection(&process_features_cs); + + return hres; +} + +static HRESULT get_internet_feature(INTERNETFEATURELIST feature, DWORD flags) +{ + HRESULT hres; + + if(feature >= FEATURE_ENTRY_COUNT) + return E_FAIL; + + if(flags == GET_FEATURE_FROM_PROCESS) + hres = get_feature_from_process(feature); + else { + FIXME("Unsupported flags: %08x\n", flags); + hres = E_NOTIMPL; + } + + return hres; +} + /*********************************************************************** * CoInternetSetFeatureEnabled (URLMON.@) */ -HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST feature, DWORD flags, BOOL enable) +HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST FeatureEntry, DWORD dwFlags, BOOL fEnable) { - FIXME("%d, 0x%08x, %x, stub\n", feature, flags, enable); - return E_NOTIMPL; + TRACE("(%d, %08x, %x)\n", FeatureEntry, dwFlags, fEnable); + return set_internet_feature(FeatureEntry, dwFlags, fEnable); } /*********************************************************************** * CoInternetIsFeatureEnabled (URLMON.@) */ -HRESULT WINAPI CoInternetIsFeatureEnabled(INTERNETFEATURELIST feature, DWORD flags) +HRESULT WINAPI CoInternetIsFeatureEnabled(INTERNETFEATURELIST FeatureEntry, DWORD dwFlags) { - FIXME("%d, 0x%08x, stub\n", feature, flags); - return E_NOTIMPL; + TRACE("(%d, %08x)\n", FeatureEntry, dwFlags); + return get_internet_feature(FeatureEntry, dwFlags); } diff --git a/dll/win32/urlmon/mimefilter.c b/dll/win32/urlmon/mimefilter.c index ee6f50f238f..1fe5246cbb0 100644 --- a/dll/win32/urlmon/mimefilter.c +++ b/dll/win32/urlmon/mimefilter.c @@ -22,34 +22,34 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { - const IInternetProtocolVtbl *lpIInternetProtocolVtbl; - const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl; + IInternetProtocol IInternetProtocol_iface; + IInternetProtocolSink IInternetProtocolSink_iface; LONG ref; } MimeFilter; -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolVtbl) -#define PROTOCOLSINK(x) ((IInternetProtocolSink*) &(x)->lpIInternetProtocolSinkVtbl) - -#define PROTOCOL_THIS(iface) DEFINE_THIS(MimeFilter, IInternetProtocol, iface) +static inline MimeFilter *impl_from_IInternetProtocol(IInternetProtocol *iface) +{ + return CONTAINING_RECORD(iface, MimeFilter, IInternetProtocol_iface); +} static HRESULT WINAPI MimeFilterProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) { TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) { TRACE("(%p)->(IID_IInternetProtocolSink %p)\n", This, ppv); - *ppv = PROTOCOLSINK(This); + *ppv = &This->IInternetProtocolSink_iface; } if(*ppv) { @@ -63,7 +63,7 @@ static HRESULT WINAPI MimeFilterProtocol_QueryInterface(IInternetProtocol *iface static ULONG WINAPI MimeFilterProtocol_AddRef(IInternetProtocol *iface) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); return ref; @@ -71,7 +71,7 @@ static ULONG WINAPI MimeFilterProtocol_AddRef(IInternetProtocol *iface) static ULONG WINAPI MimeFilterProtocol_Release(IInternetProtocol *iface) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -89,7 +89,7 @@ static HRESULT WINAPI MimeFilterProtocol_Start(IInternetProtocol *iface, LPCWSTR IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink, pOIBindInfo, grfPI, dwReserved); return E_NOTIMPL; @@ -97,7 +97,7 @@ static HRESULT WINAPI MimeFilterProtocol_Start(IInternetProtocol *iface, LPCWSTR static HRESULT WINAPI MimeFilterProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%p)\n", This, pProtocolData); return E_NOTIMPL; } @@ -105,28 +105,28 @@ static HRESULT WINAPI MimeFilterProtocol_Continue(IInternetProtocol *iface, PROT static HRESULT WINAPI MimeFilterProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions); return E_NOTIMPL; } static HRESULT WINAPI MimeFilterProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%08x)\n", This, dwOptions); return E_NOTIMPL; } static HRESULT WINAPI MimeFilterProtocol_Suspend(IInternetProtocol *iface) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } static HRESULT WINAPI MimeFilterProtocol_Resume(IInternetProtocol *iface) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } @@ -134,7 +134,7 @@ static HRESULT WINAPI MimeFilterProtocol_Resume(IInternetProtocol *iface) static HRESULT WINAPI MimeFilterProtocol_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); return E_NOTIMPL; } @@ -142,27 +142,25 @@ static HRESULT WINAPI MimeFilterProtocol_Read(IInternetProtocol *iface, void *pv static HRESULT WINAPI MimeFilterProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); return E_NOTIMPL; } static HRESULT WINAPI MimeFilterProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%08x)\n", This, dwOptions); return E_NOTIMPL; } static HRESULT WINAPI MimeFilterProtocol_UnlockRequest(IInternetProtocol *iface) { - MimeFilter *This = PROTOCOL_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocol(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } -#undef PROTOCOL_THIS - static const IInternetProtocolVtbl MimeFilterProtocolVtbl = { MimeFilterProtocol_QueryInterface, MimeFilterProtocol_AddRef, @@ -179,31 +177,34 @@ static const IInternetProtocolVtbl MimeFilterProtocolVtbl = { MimeFilterProtocol_UnlockRequest }; -#define PROTSINK_THIS(iface) DEFINE_THIS(MimeFilter, IInternetProtocolSink, iface) +static inline MimeFilter *impl_from_IInternetProtocolSink(IInternetProtocolSink *iface) +{ + return CONTAINING_RECORD(iface, MimeFilter, IInternetProtocolSink_iface); +} static HRESULT WINAPI MimeFilterSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) { - MimeFilter *This = PROTSINK_THIS(iface); - return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv); + MimeFilter *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocol_QueryInterface(&This->IInternetProtocol_iface, riid, ppv); } static ULONG WINAPI MimeFilterSink_AddRef(IInternetProtocolSink *iface) { - MimeFilter *This = PROTSINK_THIS(iface); - return IInternetProtocol_AddRef(PROTOCOL(This)); + MimeFilter *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocol_AddRef(&This->IInternetProtocol_iface); } static ULONG WINAPI MimeFilterSink_Release(IInternetProtocolSink *iface) { - MimeFilter *This = PROTSINK_THIS(iface); - return IInternetProtocol_Release(PROTOCOL(This)); + MimeFilter *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocol_Release(&This->IInternetProtocol_iface); } static HRESULT WINAPI MimeFilterSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) { - MimeFilter *This = PROTSINK_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocolSink(iface); FIXME("(%p)->(%p)\n", This, pProtocolData); return E_NOTIMPL; } @@ -211,7 +212,7 @@ static HRESULT WINAPI MimeFilterSink_Switch(IInternetProtocolSink *iface, static HRESULT WINAPI MimeFilterSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, LPCWSTR szStatusText) { - MimeFilter *This = PROTSINK_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocolSink(iface); FIXME("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText)); return E_NOTIMPL; } @@ -219,7 +220,7 @@ static HRESULT WINAPI MimeFilterSink_ReportProgress(IInternetProtocolSink *iface static HRESULT WINAPI MimeFilterSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax) { - MimeFilter *This = PROTSINK_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocolSink(iface); FIXME("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax); return E_NOTIMPL; } @@ -227,13 +228,11 @@ static HRESULT WINAPI MimeFilterSink_ReportData(IInternetProtocolSink *iface, static HRESULT WINAPI MimeFilterSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult) { - MimeFilter *This = PROTSINK_THIS(iface); + MimeFilter *This = impl_from_IInternetProtocolSink(iface); FIXME("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult)); return E_NOTIMPL; } -#undef PROTSINK_THIS - static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = { MimeFilterSink_QueryInterface, MimeFilterSink_AddRef, @@ -254,10 +253,10 @@ HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret = heap_alloc_zero(sizeof(MimeFilter)); - ret->lpIInternetProtocolVtbl = &MimeFilterProtocolVtbl; - ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; + ret->IInternetProtocol_iface.lpVtbl = &MimeFilterProtocolVtbl; + ret->IInternetProtocolSink_iface.lpVtbl = &InternetProtocolSinkVtbl; ret->ref = 1; - *ppobj = PROTOCOL(ret); + *ppobj = &ret->IInternetProtocol_iface; return S_OK; } diff --git a/dll/win32/urlmon/mk.c b/dll/win32/urlmon/mk.c index 0befe5c34c6..46b4ddcc778 100644 --- a/dll/win32/urlmon/mk.c +++ b/dll/win32/urlmon/mk.c @@ -19,32 +19,41 @@ #include "urlmon_main.h" #include "wine/debug.h" +#define NO_SHLWAPI_REG +#include "shlwapi.h" + WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { - const IInternetProtocolVtbl *lpIInternetProtocolVtbl; + IInternetProtocolEx IInternetProtocolEx_iface; LONG ref; IStream *stream; } MkProtocol; -#define PROTOCOL_THIS(iface) DEFINE_THIS(MkProtocol, IInternetProtocol, iface) - -static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) +static inline MkProtocol *impl_from_IInternetProtocolEx(IInternetProtocolEx *iface) { - MkProtocol *This = PROTOCOL_THIS(iface); + return CONTAINING_RECORD(iface, MkProtocol, IInternetProtocolEx_iface); +} + +static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocolEx_iface; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocolEx_iface; }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) { TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocolEx_iface; + }else if(IsEqualGUID(&IID_IInternetProtocolEx, riid)) { + TRACE("(%p)->(IID_IInternetProtocolEx %p)\n", This, ppv); + *ppv = &This->IInternetProtocolEx_iface; } if(*ppv) { @@ -56,17 +65,17 @@ static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocol *iface, REFIID return E_NOINTERFACE; } -static ULONG WINAPI MkProtocol_AddRef(IInternetProtocol *iface) +static ULONG WINAPI MkProtocol_AddRef(IInternetProtocolEx *iface) { - MkProtocol *This = PROTOCOL_THIS(iface); + MkProtocol *This = impl_from_IInternetProtocolEx(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); return ref; } -static ULONG WINAPI MkProtocol_Release(IInternetProtocol *iface) +static ULONG WINAPI MkProtocol_Release(IInternetProtocolEx *iface) { - MkProtocol *This = PROTOCOL_THIS(iface); + MkProtocol *This = impl_from_IInternetProtocolEx(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -89,27 +98,128 @@ static HRESULT report_result(IInternetProtocolSink *sink, HRESULT hres, DWORD dw return hres; } -static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, +static HRESULT WINAPI MkProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) { - MkProtocol *This = PROTOCOL_THIS(iface); - IParseDisplayName *pdn; - IMoniker *mon; - LPWSTR mime, progid, display_name; - LPCWSTR ptr, ptr2; - BINDINFO bindinfo; - STATSTG statstg; - DWORD bindf=0, eaten=0, len; - CLSID clsid; + MkProtocol *This = impl_from_IInternetProtocolEx(iface); HRESULT hres; - - static const WCHAR wszMK[] = {'m','k',':','@'}; + IUri *uri; TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink, pOIBindInfo, grfPI, dwReserved); - if(strncmpiW(szUrl, wszMK, sizeof(wszMK)/sizeof(WCHAR))) + hres = CreateUri(szUrl, 0, 0, &uri); + if(FAILED(hres)) + return hres; + + hres = IInternetProtocolEx_StartEx(&This->IInternetProtocolEx_iface, uri, pOIProtSink, + pOIBindInfo, grfPI, (HANDLE*)dwReserved); + + IUri_Release(uri); + return hres; +} + +static HRESULT WINAPI MkProtocol_Continue(IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + FIXME("(%p)->(%p)\n", This, pProtocolData); + return E_NOTIMPL; +} + +static HRESULT WINAPI MkProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrReason, + DWORD dwOptions) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions); + return E_NOTIMPL; +} + +static HRESULT WINAPI MkProtocol_Terminate(IInternetProtocolEx *iface, DWORD dwOptions) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + + TRACE("(%p)->(%08x)\n", This, dwOptions); + + return S_OK; +} + +static HRESULT WINAPI MkProtocol_Suspend(IInternetProtocolEx *iface) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI MkProtocol_Resume(IInternetProtocolEx *iface) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI MkProtocol_Read(IInternetProtocolEx *iface, void *pv, + ULONG cb, ULONG *pcbRead) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + + TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); + + if(!This->stream) + return E_FAIL; + + return IStream_Read(This->stream, pv, cb, pcbRead); +} + +static HRESULT WINAPI MkProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGER dlibMove, + DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); + return E_NOTIMPL; +} + +static HRESULT WINAPI MkProtocol_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + + TRACE("(%p)->(%08x)\n", This, dwOptions); + + return S_OK; +} + +static HRESULT WINAPI MkProtocol_UnlockRequest(IInternetProtocolEx *iface) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + + TRACE("(%p)\n", This); + + return S_OK; +} + +static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri, + IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, + DWORD grfPI, HANDLE *dwReserved) +{ + MkProtocol *This = impl_from_IInternetProtocolEx(iface); + LPWSTR mime, progid, display_name, colon_ptr; + DWORD path_size = INTERNET_MAX_URL_LENGTH; + DWORD bindf=0, eaten=0, scheme=0, len; + BSTR url, path_tmp, path = NULL; + IParseDisplayName *pdn; + BINDINFO bindinfo; + STATSTG statstg; + IMoniker *mon; + HRESULT hres; + CLSID clsid; + + TRACE("(%p)->(%p %p %p %08x %p)\n", This, pUri, pOIProtSink, + pOIBindInfo, grfPI, dwReserved); + + hres = IUri_GetScheme(pUri, &scheme); + if(FAILED(hres)) + return hres; + if(scheme != URL_SCHEME_MK) return INET_E_INVALID_URL; memset(&bindinfo, 0, sizeof(bindinfo)); @@ -124,35 +234,56 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, NULL); - hres = FindMimeFromData(NULL, szUrl, NULL, 0, NULL, 0, &mime, 0); + hres = IUri_GetDisplayUri(pUri, &url); + if(FAILED(hres)) + return hres; + hres = FindMimeFromData(NULL, url, NULL, 0, NULL, 0, &mime, 0); + SysFreeString(url); if(SUCCEEDED(hres)) { IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE, mime); CoTaskMemFree(mime); } - ptr2 = szUrl + sizeof(wszMK)/sizeof(WCHAR); - ptr = strchrW(ptr2, ':'); - if(!ptr) - return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); - - progid = heap_alloc((ptr-ptr2+1)*sizeof(WCHAR)); - memcpy(progid, ptr2, (ptr-ptr2)*sizeof(WCHAR)); - progid[ptr-ptr2] = 0; - hres = CLSIDFromProgID(progid, &clsid); - heap_free(progid); + hres = IUri_GetPath(pUri, &path_tmp); if(FAILED(hres)) + return hres; + path = heap_alloc(path_size); + hres = UrlUnescapeW((LPWSTR)path_tmp, path, &path_size, 0); + SysFreeString(path_tmp); + if (FAILED(hres)) + { + heap_free(path); return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); + } + progid = path+1; /* skip '@' symbol */ + colon_ptr = strchrW(path, ':'); + if(!colon_ptr) + { + heap_free(path); + return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); + } + + len = strlenW(path); + display_name = heap_alloc((len+1)*sizeof(WCHAR)); + memcpy(display_name, path, (len+1)*sizeof(WCHAR)); + + progid[colon_ptr-progid] = 0; /* overwrite ':' with NULL terminator */ + hres = CLSIDFromProgID(progid, &clsid); + heap_free(path); + if(FAILED(hres)) + { + heap_free(display_name); + return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER); + } hres = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IParseDisplayName, (void**)&pdn); if(FAILED(hres)) { WARN("Could not create object %s\n", debugstr_guid(&clsid)); + heap_free(display_name); return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER); } - len = strlenW(--ptr2); - display_name = heap_alloc((len+1)*sizeof(WCHAR)); - memcpy(display_name, ptr2, (len+1)*sizeof(WCHAR)); hres = IParseDisplayName_ParseDisplayName(pdn, NULL /* FIXME */, display_name, &eaten, &mon); heap_free(display_name); IParseDisplayName_Release(pdn); @@ -182,90 +313,10 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink_ReportData(pOIProtSink, BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION, statstg.cbSize.u.LowPart, statstg.cbSize.u.LowPart); - return report_result(pOIProtSink, S_OK, ERROR_SUCCESS); } -static HRESULT WINAPI MkProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)->(%p)\n", This, pProtocolData); - return E_NOTIMPL; -} - -static HRESULT WINAPI MkProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason, - DWORD dwOptions) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions); - return E_NOTIMPL; -} - -static HRESULT WINAPI MkProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - - TRACE("(%p)->(%08x)\n", This, dwOptions); - - return S_OK; -} - -static HRESULT WINAPI MkProtocol_Suspend(IInternetProtocol *iface) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI MkProtocol_Resume(IInternetProtocol *iface) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI MkProtocol_Read(IInternetProtocol *iface, void *pv, - ULONG cb, ULONG *pcbRead) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - - TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); - - if(!This->stream) - return E_FAIL; - - return IStream_Read(This->stream, pv, cb, pcbRead); -} - -static HRESULT WINAPI MkProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, - DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); - return E_NOTIMPL; -} - -static HRESULT WINAPI MkProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - - TRACE("(%p)->(%08x)\n", This, dwOptions); - - return S_OK; -} - -static HRESULT WINAPI MkProtocol_UnlockRequest(IInternetProtocol *iface) -{ - MkProtocol *This = PROTOCOL_THIS(iface); - - TRACE("(%p)\n", This); - - return S_OK; -} - -#undef PROTOCOL_THIS - -static const IInternetProtocolVtbl MkProtocolVtbl = { +static const IInternetProtocolExVtbl MkProtocolVtbl = { MkProtocol_QueryInterface, MkProtocol_AddRef, MkProtocol_Release, @@ -278,7 +329,8 @@ static const IInternetProtocolVtbl MkProtocolVtbl = { MkProtocol_Read, MkProtocol_Seek, MkProtocol_LockRequest, - MkProtocol_UnlockRequest + MkProtocol_UnlockRequest, + MkProtocol_StartEx }; HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) @@ -291,14 +343,14 @@ HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ret = heap_alloc(sizeof(MkProtocol)); - ret->lpIInternetProtocolVtbl = &MkProtocolVtbl; + ret->IInternetProtocolEx_iface.lpVtbl = &MkProtocolVtbl; ret->ref = 1; ret->stream = NULL; /* NOTE: * Native returns NULL ppobj and S_OK in CreateInstance if called with IID_IUnknown riid. */ - *ppobj = PROTOCOL(ret); + *ppobj = &ret->IInternetProtocolEx_iface; return S_OK; } diff --git a/dll/win32/urlmon/protocol.c b/dll/win32/urlmon/protocol.c index 669343b211f..326564b907c 100644 --- a/dll/win32/urlmon/protocol.c +++ b/dll/win32/urlmon/protocol.c @@ -23,36 +23,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); -/* Flags are needed for, among other things, return HRESULTs from the Read function - * to conform to native. For example, Read returns: - * - * 1. E_PENDING if called before the request has completed, - * (flags = 0) - * 2. S_FALSE after all data has been read and S_OK has been reported, - * (flags = FLAG_REQUEST_COMPLETE | FLAG_ALL_DATA_READ | FLAG_RESULT_REPORTED) - * 3. INET_E_DATA_NOT_AVAILABLE if InternetQueryDataAvailable fails. The first time - * this occurs, INET_E_DATA_NOT_AVAILABLE will also be reported to the sink, - * (flags = FLAG_REQUEST_COMPLETE) - * but upon subsequent calls to Read no reporting will take place, yet - * InternetQueryDataAvailable will still be called, and, on failure, - * INET_E_DATA_NOT_AVAILABLE will still be returned. - * (flags = FLAG_REQUEST_COMPLETE | FLAG_RESULT_REPORTED) - * - * FLAG_FIRST_DATA_REPORTED and FLAG_LAST_DATA_REPORTED are needed for proper - * ReportData reporting. For example, if OnResponse returns S_OK, Continue will - * report BSCF_FIRSTDATANOTIFICATION, and when all data has been read Read will - * report BSCF_INTERMEDIATEDATANOTIFICATION|BSCF_LASTDATANOTIFICATION. However, - * if OnResponse does not return S_OK, Continue will not report data, and Read - * will report BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION when all - * data has been read. - */ -#define FLAG_REQUEST_COMPLETE 0x0001 -#define FLAG_FIRST_CONTINUE_COMPLETE 0x0002 -#define FLAG_FIRST_DATA_REPORTED 0x0004 -#define FLAG_ALL_DATA_READ 0x0008 -#define FLAG_LAST_DATA_REPORTED 0x0010 -#define FLAG_RESULT_REPORTED 0x0020 - static inline HRESULT report_progress(Protocol *protocol, ULONG status_code, LPCWSTR status_text) { return IInternetProtocolSink_ReportProgress(protocol->protocol_sink, status_code, status_text); @@ -106,25 +76,27 @@ static void request_complete(Protocol *protocol, INTERNET_ASYNC_RESULT *ar) TRACE("(%p)->(%p)\n", protocol, ar); - if(!ar->dwResult) { - WARN("request failed: %d\n", ar->dwError); - return; - } - - protocol->flags |= FLAG_REQUEST_COMPLETE; - - if(!protocol->request) { - TRACE("setting request handle %p\n", (HINTERNET)ar->dwResult); - protocol->request = (HINTERNET)ar->dwResult; - } - /* PROTOCOLDATA same as native */ memset(&data, 0, sizeof(data)); data.dwState = 0xf1000000; - if(protocol->flags & FLAG_FIRST_CONTINUE_COMPLETE) - data.pData = (LPVOID)BINDSTATUS_ENDDOWNLOADCOMPONENTS; - else - data.pData = (LPVOID)BINDSTATUS_DOWNLOADINGDATA; + + if(ar->dwResult) { + protocol->flags |= FLAG_REQUEST_COMPLETE; + + if(!protocol->request) { + TRACE("setting request handle %p\n", (HINTERNET)ar->dwResult); + protocol->request = (HINTERNET)ar->dwResult; + } + + if(protocol->flags & FLAG_FIRST_CONTINUE_COMPLETE) + data.pData = (LPVOID)BINDSTATUS_ENDDOWNLOADCOMPONENTS; + else + data.pData = (LPVOID)BINDSTATUS_DOWNLOADINGDATA; + + }else { + protocol->flags |= FLAG_ERROR; + data.pData = (LPVOID)ar->dwError; + } if (protocol->bindf & BINDF_FROMURLMON) IInternetProtocolSink_Switch(protocol->protocol_sink, &data); @@ -331,6 +303,12 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data) return S_OK; } + if(protocol->flags & FLAG_ERROR) { + protocol->flags &= ~FLAG_ERROR; + protocol->vtbl->on_error(protocol, (DWORD)data->pData); + return S_OK; + } + if(protocol->post_stream) return write_post_stream(protocol); @@ -357,7 +335,7 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data) protocol->flags |= FLAG_FIRST_CONTINUE_COMPLETE; } - if(data->pData >= (LPVOID)BINDSTATUS_DOWNLOADINGDATA) { + if(data->pData >= (LPVOID)BINDSTATUS_DOWNLOADINGDATA && !protocol->available_bytes) { BOOL res; /* InternetQueryDataAvailable may immediately fork and perform its asynchronous @@ -389,33 +367,33 @@ HRESULT protocol_read(Protocol *protocol, void *buf, ULONG size, ULONG *read_ret return S_FALSE; } - if(!(protocol->flags & FLAG_REQUEST_COMPLETE)) { + if(!(protocol->flags & FLAG_REQUEST_COMPLETE) || !protocol->available_bytes) { *read_ret = 0; return E_PENDING; } - while(read < size) { - if(protocol->available_bytes) { - ULONG len; + while(read < size && protocol->available_bytes) { + ULONG len; - res = InternetReadFile(protocol->request, ((BYTE *)buf)+read, - protocol->available_bytes > size-read ? size-read : protocol->available_bytes, &len); - if(!res) { - WARN("InternetReadFile failed: %d\n", GetLastError()); - hres = INET_E_DOWNLOAD_FAILURE; - report_result(protocol, hres); - break; - } + res = InternetReadFile(protocol->request, ((BYTE *)buf)+read, + protocol->available_bytes > size-read ? size-read : protocol->available_bytes, &len); + if(!res) { + WARN("InternetReadFile failed: %d\n", GetLastError()); + hres = INET_E_DOWNLOAD_FAILURE; + report_result(protocol, hres); + break; + } - if(!len) { - all_data_read(protocol); - break; - } + if(!len) { + all_data_read(protocol); + break; + } - read += len; - protocol->current_position += len; - protocol->available_bytes -= len; - }else { + read += len; + protocol->current_position += len; + protocol->available_bytes -= len; + + if(!protocol->available_bytes) { /* InternetQueryDataAvailable may immediately fork and perform its asynchronous * read, so clear the flag _before_ calling so it does not incorrectly get cleared * after the status callback is called */ diff --git a/dll/win32/urlmon/protproxy.c b/dll/win32/urlmon/protproxy.c index c3d64c48221..06a85863b6d 100644 --- a/dll/win32/urlmon/protproxy.c +++ b/dll/win32/urlmon/protproxy.c @@ -21,25 +21,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); -#define PROTOCOL_THIS(iface) DEFINE_THIS(ProtocolProxy, IInternetProtocol, iface) +static inline ProtocolProxy *impl_from_IInternetProtocol(IInternetProtocol *iface) +{ + return CONTAINING_RECORD(iface, ProtocolProxy, IInternetProtocol_iface); +} static HRESULT WINAPI ProtocolProxy_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) { TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) { TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv); - *ppv = PROTOCOL(This); + *ppv = &This->IInternetProtocol_iface; }else if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) { TRACE("(%p)->(IID_IInternetProtocolSink %p)\n", This, ppv); - *ppv = PROTSINK(This); + *ppv = &This->IInternetProtocolSink_iface; } if(*ppv) { @@ -53,7 +56,7 @@ static HRESULT WINAPI ProtocolProxy_QueryInterface(IInternetProtocol *iface, REF static ULONG WINAPI ProtocolProxy_AddRef(IInternetProtocol *iface) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); return ref; @@ -61,7 +64,7 @@ static ULONG WINAPI ProtocolProxy_AddRef(IInternetProtocol *iface) static ULONG WINAPI ProtocolProxy_Release(IInternetProtocol *iface) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -84,7 +87,7 @@ static HRESULT WINAPI ProtocolProxy_Start(IInternetProtocol *iface, LPCWSTR szUr IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink, pOIBindInfo, grfPI, dwReserved); @@ -94,7 +97,7 @@ static HRESULT WINAPI ProtocolProxy_Start(IInternetProtocol *iface, LPCWSTR szUr static HRESULT WINAPI ProtocolProxy_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%p)\n", This, pProtocolData); @@ -104,14 +107,14 @@ static HRESULT WINAPI ProtocolProxy_Continue(IInternetProtocol *iface, PROTOCOLD static HRESULT WINAPI ProtocolProxy_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions); return E_NOTIMPL; } static HRESULT WINAPI ProtocolProxy_Terminate(IInternetProtocol *iface, DWORD dwOptions) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%08x)\n", This, dwOptions); @@ -120,14 +123,14 @@ static HRESULT WINAPI ProtocolProxy_Terminate(IInternetProtocol *iface, DWORD dw static HRESULT WINAPI ProtocolProxy_Suspend(IInternetProtocol *iface) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } static HRESULT WINAPI ProtocolProxy_Resume(IInternetProtocol *iface) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); FIXME("(%p)\n", This); return E_NOTIMPL; } @@ -135,7 +138,7 @@ static HRESULT WINAPI ProtocolProxy_Resume(IInternetProtocol *iface) static HRESULT WINAPI ProtocolProxy_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); @@ -145,14 +148,14 @@ static HRESULT WINAPI ProtocolProxy_Read(IInternetProtocol *iface, void *pv, static HRESULT WINAPI ProtocolProxy_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); return E_NOTIMPL; } static HRESULT WINAPI ProtocolProxy_LockRequest(IInternetProtocol *iface, DWORD dwOptions) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); TRACE("(%p)->(%08x)\n", This, dwOptions); @@ -161,15 +164,13 @@ static HRESULT WINAPI ProtocolProxy_LockRequest(IInternetProtocol *iface, DWORD static HRESULT WINAPI ProtocolProxy_UnlockRequest(IInternetProtocol *iface) { - ProtocolProxy *This = PROTOCOL_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocol(iface); TRACE("(%p)\n", This); return IInternetProtocol_UnlockRequest(This->protocol); } -#undef PROTOCOL_THIS - static const IInternetProtocolVtbl ProtocolProxyVtbl = { ProtocolProxy_QueryInterface, ProtocolProxy_AddRef, @@ -186,31 +187,34 @@ static const IInternetProtocolVtbl ProtocolProxyVtbl = { ProtocolProxy_UnlockRequest }; -#define PROTSINK_THIS(iface) DEFINE_THIS(ProtocolProxy, IInternetProtocolSink, iface) +static inline ProtocolProxy *impl_from_IInternetProtocolSink(IInternetProtocolSink *iface) +{ + return CONTAINING_RECORD(iface, ProtocolProxy, IInternetProtocolSink_iface); +} static HRESULT WINAPI ProtocolProxySink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) { - ProtocolProxy *This = PROTSINK_THIS(iface); - return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv); + ProtocolProxy *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocol_QueryInterface(&This->IInternetProtocol_iface, riid, ppv); } static ULONG WINAPI ProtocolProxySink_AddRef(IInternetProtocolSink *iface) { - ProtocolProxy *This = PROTSINK_THIS(iface); - return IInternetProtocol_AddRef(PROTOCOL(This)); + ProtocolProxy *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocol_AddRef(&This->IInternetProtocol_iface); } static ULONG WINAPI ProtocolProxySink_Release(IInternetProtocolSink *iface) { - ProtocolProxy *This = PROTSINK_THIS(iface); - return IInternetProtocol_Release(PROTOCOL(This)); + ProtocolProxy *This = impl_from_IInternetProtocolSink(iface); + return IInternetProtocol_Release(&This->IInternetProtocol_iface); } static HRESULT WINAPI ProtocolProxySink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) { - ProtocolProxy *This = PROTSINK_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%p)\n", This, pProtocolData); @@ -220,7 +224,7 @@ static HRESULT WINAPI ProtocolProxySink_Switch(IInternetProtocolSink *iface, static HRESULT WINAPI ProtocolProxySink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, LPCWSTR szStatusText) { - ProtocolProxy *This = PROTSINK_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText)); @@ -238,7 +242,7 @@ static HRESULT WINAPI ProtocolProxySink_ReportProgress(IInternetProtocolSink *if static HRESULT WINAPI ProtocolProxySink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax) { - ProtocolProxy *This = PROTSINK_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax); @@ -248,15 +252,13 @@ static HRESULT WINAPI ProtocolProxySink_ReportData(IInternetProtocolSink *iface, static HRESULT WINAPI ProtocolProxySink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult) { - ProtocolProxy *This = PROTSINK_THIS(iface); + ProtocolProxy *This = impl_from_IInternetProtocolSink(iface); TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult)); return IInternetProtocolSink_ReportResult(This->protocol_sink, hrResult, dwError, szResult); } -#undef PROTSINK_THIS - static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = { ProtocolProxySink_QueryInterface, ProtocolProxySink_AddRef, @@ -275,8 +277,8 @@ HRESULT create_protocol_proxy(IInternetProtocol *protocol, IInternetProtocolSink if(!sink) return E_OUTOFMEMORY; - sink->lpIInternetProtocolVtbl = &ProtocolProxyVtbl; - sink->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; + sink->IInternetProtocol_iface.lpVtbl = &ProtocolProxyVtbl; + sink->IInternetProtocolSink_iface.lpVtbl = &InternetProtocolSinkVtbl; sink->ref = 1; IInternetProtocol_AddRef(protocol); diff --git a/dll/win32/urlmon/regsvr.c b/dll/win32/urlmon/regsvr.c deleted file mode 100644 index 6e417ac9607..00000000000 --- a/dll/win32/urlmon/regsvr.c +++ /dev/null @@ -1,609 +0,0 @@ -/* - * self-registerable dll functions for urlmon.dll - * - * Copyright (C) 2003 John K. Hohm - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "urlmon_main.h" - -#include "winreg.h" -#include "advpub.h" - -#include "wine/debug.h" -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(urlmon); - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/*********************************************************************** - * interface for self-registering - */ -struct regsvr_interface -{ - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -struct regsvr_coclass -{ - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ - LPCSTR viprogid; /* can be NULL to omit */ - LPCSTR progid_extra; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[7] = { - 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[25] = { - 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', - 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', - 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); -static LONG register_progid(WCHAR const *clsid, - char const *progid, char const *curver_progid, - char const *name, char const *extra); - -/*********************************************************************** - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - sprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = RegDeleteTreeW(interface_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->progid, NULL, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->viprogid) { - res = register_key_defvalueA(clsid_key, viprogid_keyname, - list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->viprogid, list->progid, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = RegDeleteTreeW(coclass_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - - if (list->viprogid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) -{ - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_progid - */ -static LONG register_progid( - WCHAR const *clsid, - char const *progid, - char const *curver_progid, - char const *name, - char const *extra) -{ - LONG res; - HKEY progid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) return res; - - if (name) { - res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, - (CONST BYTE*)name, strlen(name) + 1); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (clsid) { - res = register_key_defvalueW(progid_key, clsid_keyname, clsid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (curver_progid) { - res = register_key_defvalueA(progid_key, curver_keyname, - curver_progid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (extra) { - HKEY extra_key; - - res = RegCreateKeyExA(progid_key, extra, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &extra_key, NULL); - if (res == ERROR_SUCCESS) - RegCloseKey(extra_key); - } - -error_close_progid_key: - RegCloseKey(progid_key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static struct regsvr_coclass const coclass_list[] = { - { &CLSID_StdURLMoniker, - "URL Moniker", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_CdlProtocol, - "CDL: Asynchronous Pluggable Protocol Handler", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_FileProtocol, - "file:, local: Asynchronous Pluggable Protocol Handler", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_FtpProtocol, - "ftp: Asynchronous Pluggable Protocol Handler", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_GopherProtocol, - "gopher: Asynchronous Pluggable Protocol Handler", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_HttpProtocol, - "http: Asynchronous Pluggable Protocol Handler", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_HttpSProtocol, - "https: Asynchronous Pluggable Protocol Handler", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_MkProtocol, - "mk: Asynchronous Pluggable Protocol Handler", - NULL, - "urlmon.dll", - "Apartment" - }, - { &CLSID_InternetSecurityManager, - "Security Manager", - NULL, - "urlmon.dll", - "Both" - }, - { &CLSID_InternetZoneManager, - "URL Zone Manager", - NULL, - "urlmon.dll", - "Both" - }, - { &CLSID_PSFactoryBuffer, - "URLMoniker ProxyStub Factory", - NULL, - "urlmon.dll", - "Apartment" - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * interface list - */ - -static struct regsvr_interface const interface_list[] = { - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * register_inf - */ - -#define INF_SET_CLSID(clsid) \ - do \ - { \ - static CHAR name[] = #clsid; \ - \ - pse[i].pszName = name; \ - clsids[i++] = &clsid; \ - } while (0) - -static HRESULT register_inf(BOOL doregister) -{ - HRESULT hres; - HMODULE hAdvpack; - HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable); - STRTABLEA strtable; - STRENTRYA pse[8]; - static CLSID const *clsids[8]; - unsigned int i = 0; - - static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; - - INF_SET_CLSID(CLSID_CdlProtocol); - INF_SET_CLSID(CLSID_FileProtocol); - INF_SET_CLSID(CLSID_FtpProtocol); - INF_SET_CLSID(CLSID_GopherProtocol); - INF_SET_CLSID(CLSID_HttpProtocol); - INF_SET_CLSID(CLSID_HttpSProtocol); - INF_SET_CLSID(CLSID_MkProtocol); - INF_SET_CLSID(CLSID_DeCompMimeFilter); - - for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) { - pse[i].pszValue = heap_alloc(39); - sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0], - clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4], - clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]); - } - - strtable.cEntries = sizeof(pse)/sizeof(pse[0]); - strtable.pse = pse; - - hAdvpack = LoadLibraryW(wszAdvpack); - pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall"); - - hres = pRegInstall(hProxyDll, doregister ? "RegisterDll" : "UnregisterDll", &strtable); - - for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) - heap_free(pse[i].pszValue); - - return hres; -} - -#undef INF_SET_CLSID - -/*********************************************************************** - * DllRegisterServer (URLMON.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = URLMON_DllRegisterServer(); - if(SUCCEEDED(hr)) - hr = register_coclasses(coclass_list); - if(SUCCEEDED(hr)) - hr = register_interfaces(interface_list); - if(SUCCEEDED(hr)) - hr = register_inf(TRUE); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (URLMON.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = URLMON_DllUnregisterServer(); - if(SUCCEEDED(hr)) - hr = unregister_coclasses(coclass_list); - if(SUCCEEDED(hr)) - hr = unregister_interfaces(interface_list); - if(SUCCEEDED(hr)) - hr = register_inf(FALSE); - return hr; -} diff --git a/dll/win32/urlmon/rsrc.rc b/dll/win32/urlmon/rsrc.rc index c87ea81998c..c86575d228d 100644 --- a/dll/win32/urlmon/rsrc.rc +++ b/dll/win32/urlmon/rsrc.rc @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +/* @makedep: urlmon.rgs */ +1 WINE_REGISTRY urlmon.rgs + /* @makedep: urlmon.inf */ REGINST REGINST urlmon.inf diff --git a/dll/win32/urlmon/sec_mgr.c b/dll/win32/urlmon/sec_mgr.c index 6b12a9aabaa..7b4bb35dc2a 100644 --- a/dll/win32/urlmon/sec_mgr.c +++ b/dll/win32/urlmon/sec_mgr.c @@ -4,6 +4,7 @@ * Copyright (c) 2004 Huw D M Davies * Copyright 2004 Jacek Caban * Copyright 2009 Detlef Riekenberg + * Copyright 2011 Thomas Mullaly for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,6 +27,9 @@ #include "winreg.h" #include "wininet.h" +#define NO_SHLWAPI_REG +#include "shlwapi.h" + #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(urlmon); @@ -45,6 +49,13 @@ static const WCHAR wszZonesKey[] = {'S','o','f','t','w','a','r','e','\\', 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\', 'Z','o','n','e','s','\\',0}; +static const WCHAR wszZoneMapDomainsKey[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\', + 'Z','o','n','e','M','a','p','\\', + 'D','o','m','a','i','n','s',0}; /******************************************************************** * get_string_from_reg [internal] @@ -140,6 +151,350 @@ static HRESULT get_zone_from_reg(LPCWSTR schema, DWORD *zone) return S_OK; } +/******************************************************************** + * matches_domain_pattern [internal] + * + * Checks if the given string matches the specified domain pattern. + * + * This function looks for explicit wildcard domain components iff + * they appear at the very beginning of the 'pattern' string + * + * pattern = "*.google.com" + */ +static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_wildcard, LPCWSTR *matched) +{ + BOOL matches = FALSE; + DWORD pattern_len = strlenW(pattern); + DWORD str_len = strlenW(str); + + TRACE("(%d) Checking if %s matches %s\n", implicit_wildcard, debugstr_w(str), debugstr_w(pattern)); + + *matched = NULL; + if(str_len >= pattern_len) { + /* Check if there's an explicit wildcard in the pattern. */ + if(pattern[0] == '*' && pattern[1] == '.') { + /* Make sure that 'str' matches the wildcard pattern. + * + * Example: + * pattern = "*.google.com" + * + * So in this case 'str' would have to end with ".google.com" in order + * to map to this pattern. + */ + if(str_len >= pattern_len+1 && !strcmpiW(str+(str_len-pattern_len+1), pattern+1)) { + /* Check if there's another '.' inside of the "unmatched" portion + * of 'str'. + * + * Example: + * pattern = "*.google.com" + * str = "test.testing.google.com" + * + * The currently matched portion is ".google.com" in 'str', we need + * see if there's a '.' inside of the unmatched portion ("test.testing"), because + * if there is and 'implicit_wildcard' isn't set, then this isn't + * a match. + */ + const WCHAR *ptr; + if(str_len > pattern_len+1 && (ptr = memrchrW(str, '.', str_len-pattern_len-2))) { + if(implicit_wildcard) { + matches = TRUE; + *matched = ptr+1; + } + } else { + matches = TRUE; + *matched = str; + } + } + } else if(implicit_wildcard && str_len > pattern_len) { + /* When the pattern has an implicit wildcard component, it means + * that anything goes in 'str' as long as it ends with the pattern + * and that the beginning of the match has a '.' before it. + * + * Example: + * pattern = "google.com" + * str = "www.google.com" + * + * Implicitly matches the pattern, where as: + * + * pattern = "google.com" + * str = "wwwgoogle.com" + * + * Doesn't match the pattern. + */ + if(str_len > pattern_len) { + if(str[str_len-pattern_len-1] == '.' && !strcmpiW(str+(str_len-pattern_len), pattern)) { + matches = TRUE; + *matched = str+(str_len-pattern_len); + } + } + } else { + /* The pattern doesn't have an implicit wildcard, or an explicit wildcard, + * so 'str' has to be an exact match to the 'pattern'. + */ + if(!strcmpiW(str, pattern)) { + matches = TRUE; + *matched = str; + } + } + } + + if(matches) + TRACE("Found a match: matched=%s\n", debugstr_w(*matched)); + else + TRACE("No match found\n"); + + return matches; +} + +static BOOL get_zone_for_scheme(HKEY key, LPCWSTR schema, DWORD *zone) +{ + static const WCHAR wildcardW[] = {'*',0}; + + DWORD res; + DWORD size = sizeof(DWORD); + DWORD type; + + /* See if the key contains a value for the scheme first. */ + res = RegQueryValueExW(key, schema, NULL, &type, (BYTE*)zone, &size); + if(type != REG_DWORD) + WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(schema)); + + if(res != ERROR_SUCCESS || type != REG_DWORD) { + /* Try to get the zone for the wildcard scheme. */ + size = sizeof(DWORD); + res = RegQueryValueExW(key, wildcardW, NULL, &type, (BYTE*)zone, &size); + if(type != REG_DWORD) + WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(wildcardW)); + } + + return res == ERROR_SUCCESS && type == REG_DWORD; +} + +/******************************************************************** + * search_domain_for_zone [internal] + * + * Searches the specified 'domain' registry key to see if 'host' maps into it, or any + * of it's subdomain registry keys. + * + * Returns S_OK if a match is found, S_FALSE if no matches were found, or an error code. + */ +static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain_len, LPCWSTR schema, + LPCWSTR host, DWORD host_len, DWORD *zone) +{ + BOOL found = FALSE; + HKEY domain_key; + DWORD res; + LPCWSTR matched; + + if(host_len >= domain_len && matches_domain_pattern(domain, host, TRUE, &matched)) { + res = RegOpenKeyW(domains, domain, &domain_key); + if(res != ERROR_SUCCESS) { + ERR("Failed to open domain key %s: %d\n", debugstr_w(domain), res); + return E_UNEXPECTED; + } + + if(matched == host) + found = get_zone_for_scheme(domain_key, schema, zone); + else { + INT domain_offset; + DWORD subdomain_count, subdomain_len; + BOOL check_domain = TRUE; + + find_domain_name(domain, domain_len, &domain_offset); + + res = RegQueryInfoKeyW(domain_key, NULL, NULL, NULL, &subdomain_count, &subdomain_len, + NULL, NULL, NULL, NULL, NULL, NULL); + if(res != ERROR_SUCCESS) { + ERR("Unable to query info for key %s: %d\n", debugstr_w(domain), res); + RegCloseKey(domain_key); + return E_UNEXPECTED; + } + + if(subdomain_count) { + WCHAR *subdomain; + WCHAR *component; + DWORD i; + + subdomain = heap_alloc((subdomain_len+1)*sizeof(WCHAR)); + if(!subdomain) { + RegCloseKey(domain_key); + return E_OUTOFMEMORY; + } + + component = heap_strndupW(host, matched-host-1); + if(!component) { + heap_free(subdomain); + RegCloseKey(domain_key); + return E_OUTOFMEMORY; + } + + for(i = 0; i < subdomain_count; ++i) { + DWORD len = subdomain_len+1; + const WCHAR *sub_matched; + + res = RegEnumKeyExW(domain_key, i, subdomain, &len, NULL, NULL, NULL, NULL); + if(res != ERROR_SUCCESS) { + heap_free(component); + heap_free(subdomain); + RegCloseKey(domain_key); + return E_UNEXPECTED; + } + + if(matches_domain_pattern(subdomain, component, FALSE, &sub_matched)) { + HKEY subdomain_key; + + res = RegOpenKeyW(domain_key, subdomain, &subdomain_key); + if(res != ERROR_SUCCESS) { + ERR("Unable to open subdomain key %s of %s: %d\n", debugstr_w(subdomain), + debugstr_w(domain), res); + heap_free(component); + heap_free(subdomain); + RegCloseKey(domain_key); + return E_UNEXPECTED; + } + + found = get_zone_for_scheme(subdomain_key, schema, zone); + check_domain = FALSE; + RegCloseKey(subdomain_key); + break; + } + } + heap_free(subdomain); + heap_free(component); + } + + /* There's a chance that 'host' implicitly mapped into 'domain', in + * which case we check to see if 'domain' contains zone information. + * + * This can only happen if 'domain' is it's own domain name. + * Example: + * "google.com" (domain name = "google.com") + * + * So if: + * host = "www.google.com" + * + * Then host would map directly into the "google.com" domain key. + * + * If 'domain' has more than just it's domain name, or it does not + * have a domain name, then we don't perform the check. The reason + * for this is that these domains don't allow implicit mappings. + * Example: + * domain = "org" (has no domain name) + * host = "www.org" + * + * The mapping would only happen if the "org" key had an explicit subkey + * called "www". + */ + if(check_domain && !domain_offset && !strchrW(host, matched-host-1)) + found = get_zone_for_scheme(domain_key, schema, zone); + } + RegCloseKey(domain_key); + } + + return found ? S_OK : S_FALSE; +} + +static HRESULT search_for_domain_mapping(HKEY domains, LPCWSTR schema, LPCWSTR host, DWORD host_len, DWORD *zone) +{ + WCHAR *domain; + DWORD domain_count, domain_len, i; + DWORD res; + HRESULT hres = S_FALSE; + + res = RegQueryInfoKeyW(domains, NULL, NULL, NULL, &domain_count, &domain_len, + NULL, NULL, NULL, NULL, NULL, NULL); + if(res != ERROR_SUCCESS) { + WARN("Failed to retrieve information about key\n"); + return E_UNEXPECTED; + } + + if(!domain_count) + return S_FALSE; + + domain = heap_alloc((domain_len+1)*sizeof(WCHAR)); + if(!domain) + return E_OUTOFMEMORY; + + for(i = 0; i < domain_count; ++i) { + DWORD len = domain_len+1; + + res = RegEnumKeyExW(domains, i, domain, &len, NULL, NULL, NULL, NULL); + if(res != ERROR_SUCCESS) { + heap_free(domain); + return E_UNEXPECTED; + } + + hres = search_domain_for_zone(domains, domain, len, schema, host, host_len, zone); + if(FAILED(hres) || hres == S_OK) + break; + } + + heap_free(domain); + return hres; +} + +static HRESULT get_zone_from_domains(LPCWSTR url, LPCWSTR schema, DWORD *zone) +{ + HRESULT hres; + WCHAR *host_name; + DWORD host_len = lstrlenW(url)+1; + DWORD res; + HKEY domains; + + host_name = heap_alloc(host_len*sizeof(WCHAR)); + if(!host_name) + return E_OUTOFMEMORY; + + hres = CoInternetParseUrl(url, PARSE_DOMAIN, 0, host_name, host_len, &host_len, 0); + if(hres == S_FALSE) { + WCHAR *tmp = heap_realloc(host_name, (host_len+1)*sizeof(WCHAR)); + if(!tmp) { + heap_free(host_name); + return E_OUTOFMEMORY; + } + + host_name = tmp; + hres = CoInternetParseUrl(url, PARSE_DOMAIN, 0, host_name, host_len+1, &host_len, 0); + } + + /* Windows doesn't play nice with unknown scheme types when it tries + * to check if a host name maps into any domains. + * + * The reason is with how CoInternetParseUrl handles unknown scheme types + * when it's parsing the domain of a URL (IE it always returns E_FAIL). + * + * Windows doesn't compenstate for this and simply doesn't check if + * the URL maps into any domains. + */ + if(hres != S_OK) { + heap_free(host_name); + if(hres == E_FAIL) + return S_FALSE; + return hres; + } + + /* First try CURRENT_USER. */ + res = RegOpenKeyW(HKEY_CURRENT_USER, wszZoneMapDomainsKey, &domains); + if(res == ERROR_SUCCESS) { + hres = search_for_domain_mapping(domains, schema, host_name, host_len, zone); + RegCloseKey(domains); + } else + WARN("Failed to open HKCU's %s key\n", debugstr_w(wszZoneMapDomainsKey)); + + /* If that doesn't work try LOCAL_MACHINE. */ + if(hres == S_FALSE) { + res = RegOpenKeyW(HKEY_LOCAL_MACHINE, wszZoneMapDomainsKey, &domains); + if(res == ERROR_SUCCESS) { + hres = search_for_domain_mapping(domains, schema, host_name, host_len, zone); + RegCloseKey(domains); + } else + WARN("Failed to open HKLM's %s key\n", debugstr_w(wszZoneMapDomainsKey)); + } + + heap_free(host_name); + return hres; +} + static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) { LPWSTR secur_url; @@ -147,7 +502,7 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) DWORD size=0; HRESULT hres; - *zone = -1; + *zone = URLZONE_INVALID; hres = CoInternetGetSecurityUrl(url, &secur_url, PSU_SECURITY_URL_ONLY, 0); if(hres != S_OK) { @@ -190,11 +545,11 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) case DRIVE_FIXED: case DRIVE_CDROM: case DRIVE_RAMDISK: - *zone = 0; + *zone = URLZONE_LOCAL_MACHINE; hres = S_OK; break; case DRIVE_REMOTE: - *zone = 3; + *zone = URLZONE_INTERNET; hres = S_OK; break; default: @@ -203,9 +558,10 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) } } - if(*zone == -1) { - WARN("domains are not yet implemented\n"); - hres = get_zone_from_reg(schema, zone); + if(*zone == URLZONE_INVALID) { + hres = get_zone_from_domains(secur_url, schema, zone); + if(hres == S_FALSE) + hres = get_zone_from_reg(schema, zone); } if(FAILED(hres) || !ret_url) @@ -218,9 +574,9 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) static HRESULT open_zone_key(HKEY parent_key, DWORD zone, HKEY *hkey) { - static const WCHAR wszFormat[] = {'%','s','%','l','d',0}; + static const WCHAR wszFormat[] = {'%','s','%','u',0}; - WCHAR key_name[sizeof(wszZonesKey)/sizeof(WCHAR)+8]; + WCHAR key_name[sizeof(wszZonesKey)/sizeof(WCHAR)+12]; DWORD res; wsprintfW(key_name, wszFormat, wszZonesKey, zone); @@ -439,7 +795,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManager *ifac } if(!pwszUrl) { - *pdwZone = -1; + *pdwZone = URLZONE_INVALID; return E_INVALIDARG; } @@ -864,8 +1220,42 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneAttributes(IInternetZoneManagerEx2* ifa DWORD dwZone, ZONEATTRIBUTES* pZoneAttributes) { - FIXME("(%p)->(%08x %p) stub\n", iface, dwZone, pZoneAttributes); - return E_NOTIMPL; + ZoneMgrImpl* This = impl_from_IInternetZoneManagerEx2(iface); + HRESULT hr; + HKEY hcu; + + TRACE("(%p)->(%d %p)\n", This, dwZone, pZoneAttributes); + + if (!pZoneAttributes) + return E_INVALIDARG; + + hr = open_zone_key(HKEY_CURRENT_USER, dwZone, &hcu); + if (FAILED(hr)) + return S_OK; /* IE6 returned E_FAIL here */ + + /* cbSize is ignored */ + RegSetValueExW(hcu, displaynameW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDisplayName, + (lstrlenW(pZoneAttributes->szDisplayName)+1)* sizeof(WCHAR)); + + RegSetValueExW(hcu, descriptionW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDescription, + (lstrlenW(pZoneAttributes->szDescription)+1)* sizeof(WCHAR)); + + RegSetValueExW(hcu, iconW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szIconPath, + (lstrlenW(pZoneAttributes->szIconPath)+1)* sizeof(WCHAR)); + + RegSetValueExW(hcu, minlevelW, 0, REG_DWORD, + (const BYTE*) &pZoneAttributes->dwTemplateMinLevel, sizeof(DWORD)); + + RegSetValueExW(hcu, currentlevelW, 0, REG_DWORD, + (const BYTE*) &pZoneAttributes->dwTemplateCurrentLevel, sizeof(DWORD)); + + RegSetValueExW(hcu, recommendedlevelW, 0, REG_DWORD, + (const BYTE*) &pZoneAttributes->dwTemplateRecommended, sizeof(DWORD)); + + RegSetValueExW(hcu, flagsW, 0, REG_DWORD, (const BYTE*) &pZoneAttributes->dwFlags, sizeof(DWORD)); + RegCloseKey(hcu); + return S_OK; + } /******************************************************************** @@ -1243,86 +1633,209 @@ HRESULT WINAPI CoInternetCreateZoneManager(IServiceProvider* pSP, IInternetZoneM return ZoneMgrImpl_Construct(NULL, (void**)ppZM); } +static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **result) { + IInternetProtocolInfo *protocol_info; + WCHAR *tmp, *new_url = NULL, *alloc_url = NULL; + DWORD size, new_size; + HRESULT hres = S_OK, parse_hres; + + while(1) { + TRACE("parsing %s\n", debugstr_w(url)); + + protocol_info = get_protocol_info(url); + if(!protocol_info) + break; + + size = strlenW(url)+1; + new_url = CoTaskMemAlloc(size*sizeof(WCHAR)); + if(!new_url) { + hres = E_OUTOFMEMORY; + break; + } + + new_size = 0; + parse_hres = IInternetProtocolInfo_ParseUrl(protocol_info, url, PARSE_SECURITY_URL, 0, new_url, size, &new_size, 0); + if(parse_hres == S_FALSE) { + if(!new_size) { + hres = E_UNEXPECTED; + break; + } + + tmp = CoTaskMemRealloc(new_url, new_size*sizeof(WCHAR)); + if(!tmp) { + hres = E_OUTOFMEMORY; + break; + } + new_url = tmp; + parse_hres = IInternetProtocolInfo_ParseUrl(protocol_info, url, PARSE_SECURITY_URL, 0, new_url, + new_size, &new_size, 0); + if(parse_hres == S_FALSE) { + hres = E_FAIL; + break; + } + } + + if(parse_hres != S_OK || !strcmpW(url, new_url)) + break; + + CoTaskMemFree(alloc_url); + url = alloc_url = new_url; + new_url = NULL; + } + + CoTaskMemFree(new_url); + + if(hres != S_OK) { + WARN("failed: %08x\n", hres); + CoTaskMemFree(alloc_url); + return hres; + } + + if(action == PSU_DEFAULT && (protocol_info = get_protocol_info(url))) { + size = strlenW(url)+1; + new_url = CoTaskMemAlloc(size * sizeof(WCHAR)); + if(new_url) { + new_size = 0; + parse_hres = IInternetProtocolInfo_ParseUrl(protocol_info, url, PARSE_SECURITY_DOMAIN, 0, + new_url, size, &new_size, 0); + if(parse_hres == S_FALSE) { + if(new_size) { + tmp = CoTaskMemRealloc(new_url, new_size*sizeof(WCHAR)); + if(tmp) { + new_url = tmp; + parse_hres = IInternetProtocolInfo_ParseUrl(protocol_info, url, PARSE_SECURITY_DOMAIN, 0, new_url, + new_size, &new_size, 0); + if(parse_hres == S_FALSE) + hres = E_FAIL; + }else { + hres = E_OUTOFMEMORY; + } + }else { + hres = E_UNEXPECTED; + } + } + + if(hres == S_OK && parse_hres == S_OK) { + CoTaskMemFree(alloc_url); + url = alloc_url = new_url; + new_url = NULL; + } + + CoTaskMemFree(new_url); + }else { + hres = E_OUTOFMEMORY; + } + IInternetProtocolInfo_Release(protocol_info); + } + + if(FAILED(hres)) { + WARN("failed %08x\n", hres); + CoTaskMemFree(alloc_url); + return hres; + } + + if(!alloc_url) { + size = strlenW(url)+1; + alloc_url = CoTaskMemAlloc(size * sizeof(WCHAR)); + if(!alloc_url) + return E_OUTOFMEMORY; + memcpy(alloc_url, url, size * sizeof(WCHAR)); + } + + *result = alloc_url; + return S_OK; +} + /******************************************************************** * CoInternetGetSecurityUrl (URLMON.@) */ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUACTION psuAction, DWORD dwReserved) { - WCHAR buf1[INTERNET_MAX_URL_LENGTH], buf2[INTERNET_MAX_URL_LENGTH]; - LPWSTR url, domain; - DWORD len; + WCHAR *secure_url; HRESULT hres; TRACE("(%p,%p,%u,%u)\n", pwzUrl, ppwzSecUrl, psuAction, dwReserved); - url = buf1; - domain = buf2; - strcpyW(url, pwzUrl); - - while(1) { - hres = CoInternetParseUrl(url, PARSE_SECURITY_URL, 0, domain, INTERNET_MAX_URL_LENGTH, &len, 0); - if(hres!=S_OK || !strcmpW(url, domain)) - break; - - if(url == buf1) { - url = buf2; - domain = buf1; - } else { - url = buf1; - domain = buf2; - } - } - - if(psuAction==PSU_SECURITY_URL_ONLY) { - len = lstrlenW(url)+1; - *ppwzSecUrl = CoTaskMemAlloc(len*sizeof(WCHAR)); - if(!*ppwzSecUrl) - return E_OUTOFMEMORY; - - memcpy(*ppwzSecUrl, url, len*sizeof(WCHAR)); - return S_OK; - } - - hres = CoInternetParseUrl(url, PARSE_SECURITY_DOMAIN, 0, domain, - INTERNET_MAX_URL_LENGTH, &len, 0); - if(SUCCEEDED(hres)) { - len++; - *ppwzSecUrl = CoTaskMemAlloc(len*sizeof(WCHAR)); - if(!*ppwzSecUrl) - return E_OUTOFMEMORY; - - memcpy(*ppwzSecUrl, domain, len*sizeof(WCHAR)); - return S_OK; - } - - hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, domain, - INTERNET_MAX_URL_LENGTH, &len, 0); - if(hres == S_OK){ - const WCHAR fileW[] = {'f','i','l','e',0}; - if(!strcmpW(domain, fileW)){ - hres = CoInternetParseUrl(url, PARSE_ROOTDOCUMENT, 0, domain, INTERNET_MAX_URL_LENGTH, &len, 0); - }else{ - domain[len] = ':'; - hres = CoInternetParseUrl(url, PARSE_DOMAIN, 0, domain+len+1, - INTERNET_MAX_URL_LENGTH-len-1, &len, 0); - if(hres == S_OK) { - len = lstrlenW(domain)+1; - *ppwzSecUrl = CoTaskMemAlloc(len*sizeof(WCHAR)); - if(!*ppwzSecUrl) - return E_OUTOFMEMORY; - - memcpy(*ppwzSecUrl, domain, len*sizeof(WCHAR)); - return S_OK; - } - } - }else + hres = parse_security_url(pwzUrl, psuAction, &secure_url); + if(FAILED(hres)) return hres; - len = lstrlenW(url)+1; - *ppwzSecUrl = CoTaskMemAlloc(len*sizeof(WCHAR)); - if(!*ppwzSecUrl) - return E_OUTOFMEMORY; + if(psuAction != PSU_SECURITY_URL_ONLY) { + PARSEDURLW parsed_url = { sizeof(parsed_url) }; + DWORD size; - memcpy(*ppwzSecUrl, url, len*sizeof(WCHAR)); + /* FIXME: Use helpers from uri.c */ + if(SUCCEEDED(ParseURLW(secure_url, &parsed_url))) { + WCHAR *new_url; + + switch(parsed_url.nScheme) { + case URL_SCHEME_FTP: + case URL_SCHEME_HTTP: + case URL_SCHEME_HTTPS: + size = strlenW(secure_url)+1; + new_url = CoTaskMemAlloc(size * sizeof(WCHAR)); + if(new_url) + hres = UrlGetPartW(secure_url, new_url, &size, URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME); + else + hres = E_OUTOFMEMORY; + CoTaskMemFree(secure_url); + if(hres != S_OK) { + WARN("UrlGetPart failed: %08x\n", hres); + CoTaskMemFree(new_url); + return FAILED(hres) ? hres : E_FAIL; + } + secure_url = new_url; + } + } + } + + *ppwzSecUrl = secure_url; return S_OK; } + +/******************************************************************** + * CoInternetGetSecurityUrlEx (URLMON.@) + */ +HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION psuAction, DWORD_PTR dwReserved) +{ + URL_SCHEME scheme_type; + BSTR secure_uri; + WCHAR *ret_url; + HRESULT hres; + + TRACE("(%p,%p,%u,%u)\n", pUri, ppSecUri, psuAction, (DWORD)dwReserved); + + if(!pUri || !ppSecUri) + return E_INVALIDARG; + + hres = IUri_GetDisplayUri(pUri, &secure_uri); + if(FAILED(hres)) + return hres; + + hres = parse_security_url(secure_uri, psuAction, &ret_url); + SysFreeString(secure_uri); + if(FAILED(hres)) + return hres; + + hres = CreateUri(ret_url, Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME, 0, ppSecUri); + if(FAILED(hres)) { + CoTaskMemFree(ret_url); + return hres; + } + + /* File URIs have to hierarchical. */ + hres = IUri_GetScheme(pUri, (DWORD*)&scheme_type); + if(SUCCEEDED(hres) && scheme_type == URL_SCHEME_FILE) { + const WCHAR *tmp = ret_url; + + /* Check and see if a "//" is after the scheme name. */ + tmp += sizeof(fileW)/sizeof(WCHAR); + if(*tmp != '/' || *(tmp+1) != '/') + hres = E_INVALIDARG; + } + + if(SUCCEEDED(hres)) + hres = CreateUri(ret_url, Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME, 0, ppSecUri); + CoTaskMemFree(ret_url); + return hres; +} diff --git a/dll/win32/urlmon/session.c b/dll/win32/urlmon/session.c index 72a3e2a3c56..fc36c0bcceb 100644 --- a/dll/win32/urlmon/session.c +++ b/dll/win32/urlmon/session.c @@ -424,7 +424,7 @@ static HRESULT WINAPI InternetSession_CreateBinding(IInternetSession *iface, LPBC pBC, LPCWSTR szUrl, IUnknown *pUnkOuter, IUnknown **ppUnk, IInternetProtocol **ppOInetProt, DWORD dwOption) { - IInternetProtocolEx *protocol; + BindProtocol *protocol; HRESULT hres; TRACE("(%p %s %p %p %p %08x)\n", pBC, debugstr_w(szUrl), pUnkOuter, ppUnk, @@ -437,7 +437,7 @@ static HRESULT WINAPI InternetSession_CreateBinding(IInternetSession *iface, if(FAILED(hres)) return hres; - *ppOInetProt = (IInternetProtocol*)protocol; + *ppOInetProt = (IInternetProtocol*)&protocol->IInternetProtocolEx_iface; return S_OK; } diff --git a/dll/win32/urlmon/umon.c b/dll/win32/urlmon/umon.c index fbb00a44baa..8ef740fedc0 100644 --- a/dll/win32/urlmon/umon.c +++ b/dll/win32/urlmon/umon.c @@ -32,18 +32,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct { - const IMonikerVtbl *lpIMonikerVtbl; + IMoniker IMoniker_iface; + IUriContainer IUriContainer_iface; LONG ref; LPOLESTR URLName; /* URL string identified by this URLmoniker */ } URLMoniker; -#define MONIKER_THIS(iface) DEFINE_THIS(URLMoniker, IMoniker, iface) +static inline URLMoniker *impl_from_IMoniker(IMoniker *iface) +{ + return CONTAINING_RECORD(iface, URLMoniker, IMoniker_iface); +} static HRESULT WINAPI URLMoniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppv) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); if(!ppv) return E_INVALIDARG; @@ -63,6 +67,9 @@ static HRESULT WINAPI URLMoniker_QueryInterface(IMoniker *iface, REFIID riid, vo }else if(IsEqualIID(&IID_IAsyncMoniker, riid)) { TRACE("(%p)->(IID_IAsyncMoniker %p)\n", This, ppv); *ppv = iface; + }else if(IsEqualIID(&IID_IUriContainer, riid)) { + TRACE("(%p)->(IID_IUriContainer %p)\n", This, ppv); + *ppv = &This->IUriContainer_iface; }else { WARN("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv); *ppv = NULL; @@ -75,7 +82,7 @@ static HRESULT WINAPI URLMoniker_QueryInterface(IMoniker *iface, REFIID riid, vo static ULONG WINAPI URLMoniker_AddRef(IMoniker *iface) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); ULONG refCount = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%u\n",This, refCount); @@ -85,7 +92,7 @@ static ULONG WINAPI URLMoniker_AddRef(IMoniker *iface) static ULONG WINAPI URLMoniker_Release(IMoniker *iface) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); ULONG refCount = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%u\n",This, refCount); @@ -102,7 +109,7 @@ static ULONG WINAPI URLMoniker_Release(IMoniker *iface) static HRESULT WINAPI URLMoniker_GetClassID(IMoniker *iface, CLSID *pClassID) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); TRACE("(%p,%p)\n", This, pClassID); @@ -116,7 +123,7 @@ static HRESULT WINAPI URLMoniker_GetClassID(IMoniker *iface, CLSID *pClassID) static HRESULT WINAPI URLMoniker_IsDirty(IMoniker *iface) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); TRACE("(%p)\n",This); @@ -128,7 +135,7 @@ static HRESULT WINAPI URLMoniker_IsDirty(IMoniker *iface) static HRESULT WINAPI URLMoniker_Load(IMoniker* iface,IStream* pStm) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); HRESULT res; ULONG size; ULONG got; @@ -164,7 +171,7 @@ static HRESULT WINAPI URLMoniker_Load(IMoniker* iface,IStream* pStm) static HRESULT WINAPI URLMoniker_Save(IMoniker *iface, IStream* pStm, BOOL fClearDirty) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); HRESULT res; ULONG size; @@ -184,7 +191,7 @@ static HRESULT WINAPI URLMoniker_Save(IMoniker *iface, IStream* pStm, BOOL fClea static HRESULT WINAPI URLMoniker_GetSizeMax(IMoniker* iface, ULARGE_INTEGER *pcbSize) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); TRACE("(%p,%p)\n",This,pcbSize); @@ -198,7 +205,7 @@ static HRESULT WINAPI URLMoniker_GetSizeMax(IMoniker* iface, ULARGE_INTEGER *pcb static HRESULT WINAPI URLMoniker_BindToObject(IMoniker *iface, IBindCtx* pbc, IMoniker *pmkToLeft, REFIID riid, void **ppv) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); IRunningObjectTable *obj_tbl; IUri *uri; HRESULT hres; @@ -224,12 +231,16 @@ static HRESULT WINAPI URLMoniker_BindToObject(IMoniker *iface, IBindCtx* pbc, IM static HRESULT WINAPI URLMoniker_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, void **ppvObject) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); IUri *uri; HRESULT hres; TRACE("(%p)->(%p %p %s %p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppvObject); + if(ppvObject) *ppvObject = NULL; + + if(!pbc || !ppvObject) return E_INVALIDARG; + if(pmkToLeft) FIXME("Unsupported pmkToLeft\n"); @@ -246,8 +257,8 @@ static HRESULT WINAPI URLMoniker_BindToStorage(IMoniker* iface, IBindCtx* pbc, static HRESULT WINAPI URLMoniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced) { - URLMoniker *This = MONIKER_THIS(iface); - + URLMoniker *This = impl_from_IMoniker(iface); + TRACE("(%p,%p,%d,%p,%p)\n", This, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced); if(!ppmkReduced) @@ -261,14 +272,14 @@ static HRESULT WINAPI URLMoniker_Reduce(IMoniker *iface, IBindCtx *pbc, static HRESULT WINAPI URLMoniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); FIXME("(%p)->(%p,%d,%p): stub\n",This,pmkRight,fOnlyIfNotGeneric,ppmkComposite); return E_NOTIMPL; } static HRESULT WINAPI URLMoniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); TRACE("(%p,%d,%p)\n", This, fForward, ppenumMoniker); @@ -282,7 +293,7 @@ static HRESULT WINAPI URLMoniker_Enum(IMoniker *iface, BOOL fForward, IEnumMonik static HRESULT WINAPI URLMoniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); CLSID clsid; LPOLESTR urlPath; IBindCtx* bind; @@ -316,7 +327,7 @@ static HRESULT WINAPI URLMoniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoni static HRESULT WINAPI URLMoniker_Hash(IMoniker *iface, DWORD *pdwHash) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); int h = 0,i,skip,len; int off = 0; LPOLESTR val; @@ -347,7 +358,7 @@ static HRESULT WINAPI URLMoniker_Hash(IMoniker *iface, DWORD *pdwHash) static HRESULT WINAPI URLMoniker_IsRunning(IMoniker* iface, IBindCtx* pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); FIXME("(%p)->(%p,%p,%p): stub\n",This,pbc,pmkToLeft,pmkNewlyRunning); return E_NOTIMPL; } @@ -355,28 +366,28 @@ static HRESULT WINAPI URLMoniker_IsRunning(IMoniker* iface, IBindCtx* pbc, static HRESULT WINAPI URLMoniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pFileTime) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); FIXME("(%p)->(%p,%p,%p): stub\n", This, pbc, pmkToLeft, pFileTime); return E_NOTIMPL; } static HRESULT WINAPI URLMoniker_Inverse(IMoniker *iface, IMoniker **ppmk) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); TRACE("(%p,%p)\n",This,ppmk); return MK_E_NOINVERSE; } static HRESULT WINAPI URLMoniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkPrefix) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); FIXME("(%p)->(%p,%p): stub\n",This,pmkOther,ppmkPrefix); return E_NOTIMPL; } static HRESULT WINAPI URLMoniker_RelativePathTo(IMoniker *iface, IMoniker *pmOther, IMoniker **ppmkRelPath) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); FIXME("(%p)->(%p,%p): stub\n",This,pmOther,ppmkRelPath); return E_NOTIMPL; } @@ -384,7 +395,7 @@ static HRESULT WINAPI URLMoniker_RelativePathTo(IMoniker *iface, IMoniker *pmOth static HRESULT WINAPI URLMoniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); int len; TRACE("(%p,%p,%p,%p)\n", This, pbc, pmkToLeft, ppszDisplayName); @@ -409,14 +420,14 @@ static HRESULT WINAPI URLMoniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, static HRESULT WINAPI URLMoniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); FIXME("(%p)->(%p,%p,%p,%p,%p): stub\n",This,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut); return E_NOTIMPL; } static HRESULT WINAPI URLMoniker_IsSystemMoniker(IMoniker *iface, DWORD *pwdMksys) { - URLMoniker *This = MONIKER_THIS(iface); + URLMoniker *This = impl_from_IMoniker(iface); TRACE("(%p,%p)\n",This,pwdMksys); @@ -454,6 +465,46 @@ static const IMonikerVtbl URLMonikerVtbl = URLMoniker_IsSystemMoniker }; +static inline URLMoniker *impl_from_IUriContainer(IUriContainer *iface) +{ + return CONTAINING_RECORD(iface, URLMoniker, IUriContainer_iface); +} + +static HRESULT WINAPI UriContainer_QueryInterface(IUriContainer *iface, REFIID riid, void **ppv) +{ + URLMoniker *This = impl_from_IUriContainer(iface); + return IMoniker_QueryInterface(&This->IMoniker_iface, riid, ppv); +} + +static ULONG WINAPI UriContainer_AddRef(IUriContainer *iface) +{ + URLMoniker *This = impl_from_IUriContainer(iface); + return IMoniker_AddRef(&This->IMoniker_iface); +} + +static ULONG WINAPI UriContainer_Release(IUriContainer *iface) +{ + URLMoniker *This = impl_from_IUriContainer(iface); + return IMoniker_Release(&This->IMoniker_iface); +} + +static HRESULT WINAPI UriContainer_GetIUri(IUriContainer *iface, IUri **ppIUri) +{ + URLMoniker *This = impl_from_IUriContainer(iface); + + FIXME("(%p)->(%p)\n", This, ppIUri); + + *ppIUri = NULL; + return S_FALSE; +} + +static const IUriContainerVtbl UriContainerVtbl = { + UriContainer_QueryInterface, + UriContainer_AddRef, + UriContainer_Release, + UriContainer_GetIUri +}; + static URLMoniker *alloc_moniker(void) { URLMoniker *ret; @@ -462,7 +513,8 @@ static URLMoniker *alloc_moniker(void) if(!ret) return NULL; - ret->lpIMonikerVtbl = &URLMonikerVtbl; + ret->IMoniker_iface.lpVtbl = &URLMonikerVtbl; + ret->IUriContainer_iface.lpVtbl = &UriContainerVtbl; ret->ref = 1; ret->URLName = NULL; @@ -557,8 +609,8 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker hres = URLMoniker_Init(obj, lefturl, szURL); CoTaskMemFree(lefturl); if(SUCCEEDED(hres)) - hres = URLMoniker_QueryInterface((IMoniker*)obj, &IID_IMoniker, (void**)ppmk); - IMoniker_Release((IMoniker*)obj); + hres = URLMoniker_QueryInterface(&obj->IMoniker_iface, &IID_IMoniker, (void**)ppmk); + IMoniker_Release(&obj->IMoniker_iface); return hres; } diff --git a/dll/win32/urlmon/umstream.c b/dll/win32/urlmon/umstream.c index 5a942f612f6..792cd64979b 100644 --- a/dll/win32/urlmon/umstream.c +++ b/dll/win32/urlmon/umstream.c @@ -32,11 +32,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); typedef struct ProxyBindStatusCallback { - const IBindStatusCallbackVtbl *lpVtbl; + IBindStatusCallback IBindStatusCallback_iface; IBindStatusCallback *pBSC; } ProxyBindStatusCallback; +static inline ProxyBindStatusCallback *impl_from_IBindStatusCallback(IBindStatusCallback *iface) +{ + return CONTAINING_RECORD(iface, ProxyBindStatusCallback, IBindStatusCallback_iface); +} + static HRESULT WINAPI ProxyBindStatusCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv) { if (IsEqualGUID(&IID_IBindStatusCallback, riid) || @@ -64,7 +69,7 @@ static ULONG WINAPI ProxyBindStatusCallback_Release(IBindStatusCallback *iface) static HRESULT WINAPI ProxyBindStatusCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pib) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_OnStartBinding(This->pBSC, dwReserved, pib); @@ -74,7 +79,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_OnStartBinding(IBindStatusCallback static HRESULT WINAPI ProxyBindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_GetPriority(This->pBSC, pnPriority); @@ -84,7 +89,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_GetPriority(IBindStatusCallback *i static HRESULT WINAPI ProxyBindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_OnLowResource(This->pBSC, reserved); @@ -95,7 +100,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_OnLowResource(IBindStatusCallback static HRESULT WINAPI ProxyBindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_OnProgress(This->pBSC, ulProgress, @@ -107,7 +112,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_OnProgress(IBindStatusCallback *if static HRESULT WINAPI ProxyBindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_OnStopBinding(This->pBSC, hresult, szError); @@ -117,7 +122,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_OnStopBinding(IBindStatusCallback static HRESULT WINAPI ProxyBindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo); @@ -128,7 +133,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_GetBindInfo(IBindStatusCallback *i static HRESULT WINAPI ProxyBindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_OnDataAvailable(This->pBSC, grfBSCF, dwSize, @@ -139,7 +144,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_OnDataAvailable(IBindStatusCallbac static HRESULT WINAPI ProxyBindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); if(This->pBSC) return IBindStatusCallback_OnObjectAvailable(This->pBSC, riid, punk); @@ -170,7 +175,7 @@ static const IBindStatusCallbackVtbl BlockingBindStatusCallbackVtbl = static HRESULT WINAPI AsyncBindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) { - ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface; + ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); HRESULT hr = IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo); *grfBINDF |= BINDF_PULLDATA | BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE; return hr; @@ -276,10 +281,10 @@ HRESULT WINAPI URLOpenBlockingStreamW(LPUNKNOWN pCaller, LPCWSTR szURL, if (!szURL || !ppStream) return E_INVALIDARG; - blocking_bsc.lpVtbl = &BlockingBindStatusCallbackVtbl; + blocking_bsc.IBindStatusCallback_iface.lpVtbl = &BlockingBindStatusCallbackVtbl; blocking_bsc.pBSC = lpfnCB; - return URLStartDownload(szURL, ppStream, (IBindStatusCallback *)&blocking_bsc); + return URLStartDownload(szURL, ppStream, &blocking_bsc.IBindStatusCallback_iface); } /*********************************************************************** @@ -326,10 +331,10 @@ HRESULT WINAPI URLOpenStreamW(LPUNKNOWN pCaller, LPCWSTR szURL, DWORD dwReserved if (!szURL) return E_INVALIDARG; - async_bsc.lpVtbl = &AsyncBindStatusCallbackVtbl; + async_bsc.IBindStatusCallback_iface.lpVtbl = &AsyncBindStatusCallbackVtbl; async_bsc.pBSC = lpfnCB; - hr = URLStartDownload(szURL, &pStream, (IBindStatusCallback *)&async_bsc); + hr = URLStartDownload(szURL, &pStream, &async_bsc.IBindStatusCallback_iface); if (SUCCEEDED(hr) && pStream) IStream_Release(pStream); diff --git a/dll/win32/urlmon/uri.c b/dll/win32/urlmon/uri.c index 681327f6cb8..f12f826e8e5 100644 --- a/dll/win32/urlmon/uri.c +++ b/dll/win32/urlmon/uri.c @@ -258,11 +258,11 @@ static Uri *get_uri_obj(IUri *uri) } static inline BOOL is_alpha(WCHAR val) { - return ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z')); + return ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z')); } static inline BOOL is_num(WCHAR val) { - return (val >= '0' && val <= '9'); + return (val >= '0' && val <= '9'); } static inline BOOL is_drive_path(const WCHAR *str) { @@ -350,6 +350,11 @@ static inline BOOL is_path_delim(WCHAR val) { return (!val || val == '#' || val == '?'); } +static inline BOOL is_slash(WCHAR c) +{ + return c == '/' || c == '\\'; +} + static BOOL is_default_port(URL_SCHEME scheme, DWORD port) { DWORD i; @@ -592,21 +597,6 @@ static inline void pct_encode_val(WCHAR val, WCHAR *dest) { dest[2] = hexDigits[val & 0xf]; } -/* Scans the range of characters [str, end] and returns the last occurrence - * of 'ch' or returns NULL. - */ -static const WCHAR *str_last_of(const WCHAR *str, const WCHAR *end, WCHAR ch) { - const WCHAR *ptr = end; - - while(ptr >= str) { - if(*ptr == ch) - return ptr; - --ptr; - } - - return NULL; -} - /* Attempts to parse the domain name from the host. * * This function also includes the Top-level Domain (TLD) name @@ -614,10 +604,10 @@ static const WCHAR *str_last_of(const WCHAR *str, const WCHAR *end, WCHAR ch) { * a valid domain name it will assign 'domain_start' the offset * into 'host' where the domain name starts. * - * It's implied that if a domain name its range is implied to be + * It's implied that if there is a domain name its range is: * [host+domain_start, host+host_len). */ -static void find_domain_name(const WCHAR *host, DWORD host_len, +void find_domain_name(const WCHAR *host, DWORD host_len, INT *domain_start) { const WCHAR *last_tld, *sec_last_tld, *end; @@ -631,12 +621,12 @@ static void find_domain_name(const WCHAR *host, DWORD host_len, if(host_len < 4) return; - last_tld = str_last_of(host, end, '.'); + last_tld = memrchrW(host, '.', host_len); if(!last_tld) /* http://hostname -> has no domain name. */ return; - sec_last_tld = str_last_of(host, last_tld-1, '.'); + sec_last_tld = memrchrW(host, '.', last_tld-host); if(!sec_last_tld) { /* If the '.' is at the beginning of the host there * has to be at least 3 characters in the TLD for it @@ -687,7 +677,7 @@ static void find_domain_name(const WCHAR *host, DWORD host_len, if(last_tld - (sec_last_tld+1) == 3) { for(i = 0; i < sizeof(recognized_tlds)/sizeof(recognized_tlds[0]); ++i) { if(!StrCmpNIW(sec_last_tld+1, recognized_tlds[i].tld_name, 3)) { - const WCHAR *domain = str_last_of(host, sec_last_tld-1, '.'); + const WCHAR *domain = memrchrW(host, '.', sec_last_tld-host); if(!domain) *domain_start = 0; @@ -705,7 +695,7 @@ static void find_domain_name(const WCHAR *host, DWORD host_len, * part of the TLD. * Ex: www.google.fo.uk -> google.fo.uk as the domain name. */ - const WCHAR *domain = str_last_of(host, sec_last_tld-1, '.'); + const WCHAR *domain = memrchrW(host, '.', sec_last_tld-host); if(!domain) *domain_start = 0; @@ -727,8 +717,6 @@ static void find_domain_name(const WCHAR *host, DWORD host_len, /* Removes the dot segments from a hierarchical URIs path component. This * function performs the removal in place. * - * This is a modified version of Qt's QUrl function "removeDotsFromPath". - * * This function returns the new length of the path string. */ static DWORD remove_dot_segments(WCHAR *path, DWORD path_len) { @@ -738,48 +726,46 @@ static DWORD remove_dot_segments(WCHAR *path, DWORD path_len) { DWORD len; while(in < end) { - /* A. if the input buffer begins with a prefix of "/./" or "/.", - * where "." is a complete path segment, then replace that - * prefix with "/" in the input buffer; otherwise, + /* Move the first path segment in the input buffer to the end of + * the output buffer, and any subsequent characters up to, including + * the next "/" character (if any) or the end of the input buffer. */ - if(in <= end - 3 && in[0] == '/' && in[1] == '.' && in[2] == '/') { - in += 2; - continue; - } else if(in == end - 2 && in[0] == '/' && in[1] == '.') { - *out++ = '/'; - in += 2; - break; - } - - /* B. if the input buffer begins with a prefix of "/../" or "/..", - * where ".." is a complete path segment, then replace that - * prefix with "/" in the input buffer and remove the last - * segment and its preceding "/" (if any) from the output - * buffer; otherwise, - */ - if(in <= end - 4 && in[0] == '/' && in[1] == '.' && in[2] == '.' && in[3] == '/') { - while(out > path && *(--out) != '/'); - - in += 3; - continue; - } else if(in == end - 3 && in[0] == '/' && in[1] == '.' && in[2] == '.') { - while(out > path && *(--out) != '/'); - - if(*out == '/') - ++out; - - in += 3; - break; - } - - /* C. move the first path segment in the input buffer to the end of - * the output buffer, including the initial "/" character (if - * any) and any subsequent characters up to, but not including, - * the next "/" character or the end of the input buffer. - */ - *out++ = *in++; - while(in < end && *in != '/') + while(in < end && !is_slash(*in)) *out++ = *in++; + if(in == end) + break; + *out++ = *in++; + + while(in < end) { + if(*in != '.') + break; + + /* Handle ending "/." */ + if(in + 1 == end) { + ++in; + break; + } + + /* Handle "/./" */ + if(is_slash(in[1])) { + in += 2; + continue; + } + + /* If we don't have "/../" or ending "/.." */ + if(in[1] != '.' || (in + 2 != end && !is_slash(in[2]))) + break; + + /* Find the slash preceding out pointer and move out pointer to it */ + if(out > path+1 && is_slash(*--out)) + --out; + while(out > path && !is_slash(*(--out))); + if(is_slash(*out)) + ++out; + in += 2; + if(in != end) + ++in; + } } len = out - path; @@ -809,12 +795,12 @@ static INT find_file_extension(const WCHAR *path, DWORD path_len) { * * NOTES: * Windows will expand an elision if the elision only represents 1 h16 - * component of the URI. + * component of the address. * * Ex: [1::2:3:4:5:6:7] -> [1:0:2:3:4:5:6:7] * * If the IPv6 address contains an IPv4 address, the IPv4 address is also - * considered for being included as part of an elision if all it's components + * considered for being included as part of an elision if all its components * are zeros. * * Ex: [1:2:3:4:5:6:0.0.0.0] -> [1:2:3:4:5:6::] @@ -987,7 +973,7 @@ static USHORT h16tous(h16 component) { return ret; } -/* Converts an IPv6 address into it's 128 bits (16 bytes) numerical value. +/* Converts an IPv6 address into its 128 bits (16 bytes) numerical value. * * This function assumes that the ipv6_address has already been validated. */ @@ -998,7 +984,7 @@ static BOOL ipv6_to_number(const ipv6_address *address, USHORT number[8]) { for(i = 0; i < address->h16_count; ++i) { if(address->elision) { if(address->components[i].str > address->elision && !already_passed_elision) { - /* Means we just passed the elision and need to add it's values to + /* Means we just passed the elision and need to add its values to * 'number' before we do anything else. */ DWORD j = 0; @@ -1016,7 +1002,6 @@ static BOOL ipv6_to_number(const ipv6_address *address, USHORT number[8]) { if(!already_passed_elision && address->elision) { for(i = 0; i < address->elision_size; i+=2) number[cur_component++] = 0; - already_passed_elision = TRUE; } if(address->ipv4) { @@ -1818,7 +1803,7 @@ static BOOL parse_ipv6address(const WCHAR **ptr, parse_data *data, DWORD flags) TRACE("(%p %p %x): Found valid IPv6 literal %s len=%d\n", ptr, data, flags, debugstr_wn(start, *ptr-start), - *ptr-start); + (int)(*ptr-start)); return TRUE; } @@ -1860,7 +1845,7 @@ static BOOL parse_ipvfuture(const WCHAR **ptr, parse_data *data, DWORD flags) { data->host_type = Uri_HOST_UNKNOWN; TRACE("(%p %p %x): Parsed IPvFuture address %s len=%d\n", ptr, data, flags, - debugstr_wn(start, *ptr-start), *ptr-start); + debugstr_wn(start, *ptr-start), (int)(*ptr-start)); return TRUE; } @@ -3151,10 +3136,17 @@ static BOOL canonicalize_path_opaque(const parse_data *data, Uri *uri, DWORD fla } } + if(data->scheme_type == URL_SCHEME_MK && !computeOnly && !(flags & Uri_CREATE_NO_CANONICALIZE)) { + DWORD new_len = remove_dot_segments(uri->canon_uri + uri->path_start, + uri->canon_len - uri->path_start); + uri->canon_len = uri->path_start + new_len; + } + uri->path_len = uri->canon_len - uri->path_start; - TRACE("(%p %p %x %d): Canonicalized opaque URI path %s len=%d\n", data, uri, flags, computeOnly, - debugstr_wn(uri->canon_uri+uri->path_start, uri->path_len), uri->path_len); + if(!computeOnly) + TRACE("(%p %p %x %d): Canonicalized opaque URI path %s len=%d\n", data, uri, flags, computeOnly, + debugstr_wn(uri->canon_uri+uri->path_start, uri->path_len), uri->path_len); return TRUE; } @@ -3436,7 +3428,7 @@ static HRESULT canonicalize_uri(const parse_data *data, Uri *uri, DWORD flags) { INT len; uri->canon_uri = NULL; - len = uri->canon_size = uri->canon_len = 0; + uri->canon_size = uri->canon_len = 0; TRACE("(%p %p %x): beginning to canonicalize URI %s.\n", data, uri, flags, debugstr_w(data->uri)); @@ -5007,10 +4999,10 @@ static ULONG WINAPI UriBuilderFactory_Release(IUriBuilderFactory *iface) return ref; } -static HRESULT WINAPI UriBuilderFactory_CreateInitializedIUriBuilder(IUriBuilderFactory *iface, - DWORD dwFlags, - DWORD_PTR dwReserved, - IUriBuilder **ppIUriBuilder) +static HRESULT WINAPI UriBuilderFactory_CreateIUriBuilder(IUriBuilderFactory *iface, + DWORD dwFlags, + DWORD_PTR dwReserved, + IUriBuilder **ppIUriBuilder) { Uri *This = impl_from_IUriBuilderFactory(iface); TRACE("(%p)->(%08x %08x %p)\n", This, dwFlags, (DWORD)dwReserved, ppIUriBuilder); @@ -5026,10 +5018,10 @@ static HRESULT WINAPI UriBuilderFactory_CreateInitializedIUriBuilder(IUriBuilder return CreateIUriBuilder(NULL, 0, 0, ppIUriBuilder); } -static HRESULT WINAPI UriBuilderFactory_CreateIUriBuilder(IUriBuilderFactory *iface, - DWORD dwFlags, - DWORD_PTR dwReserved, - IUriBuilder **ppIUriBuilder) +static HRESULT WINAPI UriBuilderFactory_CreateInitializedIUriBuilder(IUriBuilderFactory *iface, + DWORD dwFlags, + DWORD_PTR dwReserved, + IUriBuilder **ppIUriBuilder) { Uri *This = impl_from_IUriBuilderFactory(iface); TRACE("(%p)->(%08x %08x %p)\n", This, dwFlags, (DWORD)dwReserved, ppIUriBuilder); @@ -5049,8 +5041,8 @@ static const IUriBuilderFactoryVtbl UriBuilderFactoryVtbl = { UriBuilderFactory_QueryInterface, UriBuilderFactory_AddRef, UriBuilderFactory_Release, - UriBuilderFactory_CreateInitializedIUriBuilder, - UriBuilderFactory_CreateIUriBuilder + UriBuilderFactory_CreateIUriBuilder, + UriBuilderFactory_CreateInitializedIUriBuilder }; static Uri* create_uri_obj(void) { @@ -5795,10 +5787,10 @@ static HRESULT merge_paths(parse_data *data, const WCHAR *base, DWORD base_len, /* Find the characters the will be copied over from * the base path. */ - end = str_last_of(base, base+(base_len-1), '/'); + end = memrchrW(base, '/', base_len); if(!end && data->scheme_type == URL_SCHEME_FILE) /* Try looking for a '\\'. */ - end = str_last_of(base, base+(base_len-1), '\\'); + end = memrchrW(base, '\\', base_len); } if(end) { @@ -6002,7 +5994,7 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result, DWORD new_len = remove_dot_segments(path+offset,path_len-offset); if(new_len != path_len) { - WCHAR *tmp = heap_realloc(path, (path_offset+new_len+1)*sizeof(WCHAR)); + WCHAR *tmp = heap_realloc(path, (offset+new_len+1)*sizeof(WCHAR)); if(!tmp) { heap_free(path); *result = NULL; @@ -6015,6 +6007,11 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result, } } + if(relative->query_start > -1) { + data.query = relative->canon_uri+relative->query_start; + data.query_len = relative->query_len; + } + /* Make sure the path component is valid. */ ptr = path; pptr = &ptr; diff --git a/dll/win32/urlmon/urlmon.inf b/dll/win32/urlmon/urlmon.inf index c9debb43a80..77bb8f21165 100644 --- a/dll/win32/urlmon/urlmon.inf +++ b/dll/win32/urlmon/urlmon.inf @@ -3,43 +3,11 @@ Signature="$CHICAGO$" [RegisterDll] -AddReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg, Misc.Reg +AddReg=ZoneMap.Reg, Zones.Reg [UnregisterDll] -DelReg=Classes.Reg, Protocols.Reg, ZoneMap.Reg, Zones.Reg, Misc.Reg - - -[Classes.Reg] - -;; CLSID_DeCompMimeFilter -HKCR,"CLSID\%CLSID_DeCompMimeFilter%",,,"AP lzdhtml encoding/decoding Filter" -HKCR,"CLSID\%CLSID_DeCompMimeFilter%\InProcServer32",,,"%MODULE%" -HKCR,"CLSID\%CLSID_DeCompMimeFilter%\InProcServer32","ThreadingModel",,"Apartment" - - -[Protocols.Reg] -HKCR,"PROTOCOLS\Handler\cdl",,,"CDL: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Handler\cdl","CLSID",,"%CLSID_CdlProtocol%" -HKCR,"PROTOCOLS\Handler\file",,,"file:, local: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Handler\file","CLSID",,"%CLSID_FileProtocol%" -HKCR,"PROTOCOLS\Handler\local",,,"file:, local: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Handler\local","CLSID",,"%CLSID_FileProtocol%" -HKCR,"PROTOCOLS\Handler\ftp",,,"ftp: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Handler\ftp","CLSID",,"%CLSID_FtpProtocol%" -HKCR,"PROTOCOLS\Handler\gopher",,,"gopher: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Handler\gopher","CLSID",,"%CLSID_GopherProtocol%" -HKCR,"PROTOCOLS\Handler\http",,,"http: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Handler\http","CLSID",,"%CLSID_HttpProtocol%" -HKCR,"PROTOCOLS\Handler\https",,,"https: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Handler\https","CLSID",,"%CLSID_HttpsProtocol%" -HKCR,"PROTOCOLS\Handler\mk",,,"mk: Asynchronous Pluggable Protocol Handler" -HKCR,"PROTOCOLS\Filter\deflate",,,"AP Deflate Encoding/Decoding Filter" -HKCR,"PROTOCOLS\Filter\deflate","CLSID",,"%CLSID_DeCompMimeFilter%" -HKCR,"PROTOCOLS\Filter\gzip",,,"AP Deflate Encoding/Decoding Filter" -HKCR,"PROTOCOLS\Filter\gzip","CLSID",,"%CLSID_DeCompMimeFilter%" -HKCR,"PROTOCOLS\Filter\lzdhtml",,,"AP Deflate Encoding/Decoding Filter" -HKCR,"PROTOCOLS\Filter\lzdhtml","CLSID",,"%CLSID_DeCompMimeFilter%" +DelReg=ZoneMap.Reg, Zones.Reg [ZoneMap.Reg] @@ -459,16 +427,7 @@ HKCU,"%ZONES_UNTRUSTED%","1E05",0x10003,0x10000 HKLM,"%ZONES_UNTRUSTED%","1E05",0x10003,0x10000 -[Misc.Reg] -HKCU,"%INTERNET_SETTINGS%","User Agent",,"%USER_AGENT%" - - [Strings] -MODULE="urlmon.dll" - -USER_AGENT="Mozilla/4.0 (compatible; MSIE 8.0; Win32)" -INTERNET_SETTINGS="Software\Microsoft\Windows\CurrentVersion\Internet Settings" - PATH_ZONEMAP="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" PATH_ZONEMAP_PROTOCOLS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults" PATH_ZONEMAP_DOMAINS="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains" diff --git a/dll/win32/urlmon/urlmon.rgs b/dll/win32/urlmon/urlmon.rgs new file mode 100644 index 00000000000..868baad2a58 --- /dev/null +++ b/dll/win32/urlmon/urlmon.rgs @@ -0,0 +1,123 @@ +HKCR +{ + NoRemove PROTOCOLS + { + NoRemove Handler + { + ForceRemove cdl = s 'CDL: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{3dd53d40-7b8b-11d0-b013-00aa0059ce02}' + } + ForceRemove file = s 'file:, local: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{79eac9e7-baf9-11ce-8c82-00aa004ba90b}' + } + ForceRemove local = s 'file:, local: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{79eac9e7-baf9-11ce-8c82-00aa004ba90b}' + } + ForceRemove ftp = s 'ftp: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{79eac9e3-baf9-11ce-8c82-00aa004ba90b}' + } + ForceRemove gopher = s 'gopher: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{79eac9e4-baf9-11ce-8c82-00aa004ba90b}' + } + ForceRemove http = s 'http: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{79eac9e2-baf9-11ce-8c82-00aa004ba90b}' + } + ForceRemove https = s 'https: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{79eac9e5-baf9-11ce-8c82-00aa004ba90b}' + } + ForceRemove mk = s 'mk: Asynchronous Pluggable Protocol Handler' + { + val CLSID = s '{79eac9e6-baf9-11ce-8c82-00aa004ba90b}' + } + } + NoRemove Filter + { + ForceRemove deflate = s 'AP Deflate Encoding/Decoding Filter' + { + val CLSID = s '{8f6b0360-b80d-11d0-a9b3-006097942311}' + } + ForceRemove gzip = s 'AP Deflate Encoding/Decoding Filter' + { + val CLSID = s '{8f6b0360-b80d-11d0-a9b3-006097942311}' + } + ForceRemove lzdhtml = s 'AP Deflate Encoding/Decoding Filter' + { + val CLSID = s '{8f6b0360-b80d-11d0-a9b3-006097942311}' + } + } + } +} +HKCU +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove Windows + { + NoRemove CurrentVersion + { + NoRemove 'Internet Settings' + { + val 'User Agent' = s 'Mozilla/4.0 (compatible; MSIE 8.0; Win32)' + } + } + } + NoRemove 'Internet Explorer' + { + NoRemove Main + { + FeatureControl + } + } + } + } +} +HKLM +{ + NoRemove Software + { + NoRemove Microsoft + { + NoRemove 'Internet Explorer' + { + NoRemove Main + { + FeatureControl + { + FEATURE_OBJECT_CACHING + FEATURE_ZONE_ELEVATION + FEATURE_MIME_HANDLING + FEATURE_MIME_SNIFFING + FEATURE_WINDOW_RESTRICTIONS + FEATURE_WEBOC_POPUPMANAGEMENT + FEATURE_BEHAVIORS + FEATURE_DISABLE_MK_PROTOCOL + FEATURE_LOCALMACHINE_LOCKDOWN + FEATURE_SECURITYBAND + FEATURE_RESTRICT_ACTIVEXINSTALL + FEATURE_VALIDATE_NAVIGATE_URL + FEATURE_RESTRICT_FILEDOWNLOAD + FEATURE_ADDON_MANAGEMENT + FEATURE_PROTOCOL_LOCKDOWN + FEATURE_HTTP_USERNAME_PASSWORD_DISABLE + FEATURE_SAFE_BINDTOOBJECT + FEATURE_UNC_SAVEDFILECHECK + FEATURE_SSLUX + FEATURE_DISABLE_LEGACY_COMPRESSION + FEATURE_FORCE_ADDR_AND_STATUS + FEATURE_DISABLE_TELNET_PROTOCOL + FEATURE_FEEDS + } + } + } + } + } +} diff --git a/dll/win32/urlmon/urlmon.spec b/dll/win32/urlmon/urlmon.spec index 9d3de3a61dc..58b3f330f59 100644 --- a/dll/win32/urlmon/urlmon.spec +++ b/dll/win32/urlmon/urlmon.spec @@ -18,6 +18,7 @@ @ stdcall CoInternetCreateZoneManager(ptr ptr long) @ stub CoInternetGetProtocolFlags @ stdcall CoInternetGetSecurityUrl(ptr ptr long long) +@ stdcall CoInternetGetSecurityUrlEx(ptr ptr long long) @ stdcall CoInternetGetSession(long ptr long) @ stdcall CoInternetIsFeatureEnabled(long long) @ stdcall CoInternetParseUrl(wstr long long wstr long ptr long) @@ -57,6 +58,7 @@ @ stdcall HlinkNavigateString(ptr wstr) @ stdcall HlinkSimpleNavigateToMoniker(ptr wstr wstr ptr ptr ptr long long) @ stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long) +@ stub IEInstallScope @ stdcall IsAsyncMoniker(ptr) @ stdcall IsLoggingEnabledA(str) @ stdcall IsLoggingEnabledW(wstr) @@ -89,3 +91,6 @@ @ stdcall UrlMkSetSessionOption(long ptr long long) @ stub WriteHitLogging @ stub ZonesReInit + +410 stdcall @(long long) URLMON_410 +423 stdcall @(long long long long) URLMON_423 diff --git a/dll/win32/urlmon/urlmon_main.c b/dll/win32/urlmon/urlmon_main.c index 6ecd1dec954..01442c1f5c5 100644 --- a/dll/win32/urlmon/urlmon_main.c +++ b/dll/win32/urlmon/urlmon_main.c @@ -26,6 +26,8 @@ #define NO_SHLWAPI_REG #include "shlwapi.h" +#include "advpub.h" + #include "wine/debug.h" #include "urlmon.h" @@ -187,12 +189,15 @@ HRESULT WINAPI DllCanUnloadNow(void) * Urlmon ClassFactory */ typedef struct { - const IClassFactoryVtbl *lpClassFactoryVtbl; + IClassFactory IClassFactory_iface; HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); } ClassFactory; -#define CLASSFACTORY(x) ((IClassFactory*) &(x)->lpClassFactoryVtbl) +static inline ClassFactory *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface); +} static HRESULT WINAPI CF_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppv) { @@ -231,7 +236,7 @@ static ULONG WINAPI CF_Release(IClassFactory *iface) static HRESULT WINAPI CF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, LPVOID *ppobj) { - ClassFactory *This = (ClassFactory*)iface; + ClassFactory *This = impl_from_IClassFactory(iface); HRESULT hres; LPUNKNOWN punk; @@ -266,27 +271,27 @@ static const IClassFactoryVtbl ClassFactoryVtbl = CF_LockServer }; -static const ClassFactory FileProtocolCF = - { &ClassFactoryVtbl, FileProtocol_Construct}; -static const ClassFactory FtpProtocolCF = - { &ClassFactoryVtbl, FtpProtocol_Construct}; -static const ClassFactory GopherProtocolCF = - { &ClassFactoryVtbl, GopherProtocol_Construct}; -static const ClassFactory HttpProtocolCF = - { &ClassFactoryVtbl, HttpProtocol_Construct}; -static const ClassFactory HttpSProtocolCF = - { &ClassFactoryVtbl, HttpSProtocol_Construct}; -static const ClassFactory MkProtocolCF = - { &ClassFactoryVtbl, MkProtocol_Construct}; -static const ClassFactory SecurityManagerCF = - { &ClassFactoryVtbl, SecManagerImpl_Construct}; -static const ClassFactory ZoneManagerCF = - { &ClassFactoryVtbl, ZoneMgrImpl_Construct}; -static const ClassFactory StdURLMonikerCF = - { &ClassFactoryVtbl, StdURLMoniker_Construct}; -static const ClassFactory MimeFilterCF = - { &ClassFactoryVtbl, MimeFilter_Construct}; - +static ClassFactory FileProtocolCF = + { { &ClassFactoryVtbl }, FileProtocol_Construct}; +static ClassFactory FtpProtocolCF = + { { &ClassFactoryVtbl }, FtpProtocol_Construct}; +static ClassFactory GopherProtocolCF = + { { &ClassFactoryVtbl }, GopherProtocol_Construct}; +static ClassFactory HttpProtocolCF = + { { &ClassFactoryVtbl }, HttpProtocol_Construct}; +static ClassFactory HttpSProtocolCF = + { { &ClassFactoryVtbl }, HttpSProtocol_Construct}; +static ClassFactory MkProtocolCF = + { { &ClassFactoryVtbl }, MkProtocol_Construct}; +static ClassFactory SecurityManagerCF = + { { &ClassFactoryVtbl }, SecManagerImpl_Construct}; +static ClassFactory ZoneManagerCF = + { { &ClassFactoryVtbl }, ZoneMgrImpl_Construct}; +static ClassFactory StdURLMonikerCF = + { { &ClassFactoryVtbl }, StdURLMoniker_Construct}; +static ClassFactory MimeFilterCF = + { { &ClassFactoryVtbl }, MimeFilter_Construct}; + struct object_creation_info { const CLSID *clsid; @@ -303,16 +308,16 @@ static const WCHAR wszMk[] = {'m','k',0}; static const struct object_creation_info object_creation[] = { - { &CLSID_FileProtocol, CLASSFACTORY(&FileProtocolCF), wszFile }, - { &CLSID_FtpProtocol, CLASSFACTORY(&FtpProtocolCF), wszFtp }, - { &CLSID_GopherProtocol, CLASSFACTORY(&GopherProtocolCF), wszGopher }, - { &CLSID_HttpProtocol, CLASSFACTORY(&HttpProtocolCF), wszHttp }, - { &CLSID_HttpSProtocol, CLASSFACTORY(&HttpSProtocolCF), wszHttps }, - { &CLSID_MkProtocol, CLASSFACTORY(&MkProtocolCF), wszMk }, - { &CLSID_InternetSecurityManager, CLASSFACTORY(&SecurityManagerCF), NULL }, - { &CLSID_InternetZoneManager, CLASSFACTORY(&ZoneManagerCF), NULL }, - { &CLSID_StdURLMoniker, CLASSFACTORY(&StdURLMonikerCF), NULL }, - { &CLSID_DeCompMimeFilter, CLASSFACTORY(&MimeFilterCF), NULL } + { &CLSID_FileProtocol, &FileProtocolCF.IClassFactory_iface, wszFile }, + { &CLSID_FtpProtocol, &FtpProtocolCF.IClassFactory_iface, wszFtp }, + { &CLSID_GopherProtocol, &GopherProtocolCF.IClassFactory_iface, wszGopher }, + { &CLSID_HttpProtocol, &HttpProtocolCF.IClassFactory_iface, wszHttp }, + { &CLSID_HttpSProtocol, &HttpSProtocolCF.IClassFactory_iface, wszHttps }, + { &CLSID_MkProtocol, &MkProtocolCF.IClassFactory_iface, wszMk }, + { &CLSID_InternetSecurityManager, &SecurityManagerCF.IClassFactory_iface, NULL }, + { &CLSID_InternetZoneManager, &ZoneManagerCF.IClassFactory_iface, NULL }, + { &CLSID_StdURLMoniker, &StdURLMonikerCF.IClassFactory_iface, NULL }, + { &CLSID_DeCompMimeFilter, &MimeFilterCF.IClassFactory_iface, NULL } }; static void init_session(BOOL init) @@ -366,6 +371,44 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } +static HRESULT register_inf(BOOL doregister) +{ + HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable); + HMODULE hAdvpack; + + static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; + + hAdvpack = LoadLibraryW(wszAdvpack); + pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall"); + + return pRegInstall(hProxyDll, doregister ? "RegisterDll" : "UnregisterDll", NULL); +} + +/*********************************************************************** + * DllRegisterServer (URLMON.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + HRESULT hr; + + TRACE("\n"); + + hr = URLMON_DllRegisterServer(); + return SUCCEEDED(hr) ? register_inf(TRUE) : hr; +} + +/*********************************************************************** + * DllUnregisterServer (URLMON.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + HRESULT hr; + + TRACE("\n"); + + hr = URLMON_DllUnregisterServer(); + return SUCCEEDED(hr) ? register_inf(FALSE) : hr; +} /*********************************************************************** * DllRegisterServerEx (URLMON.@) @@ -383,7 +426,7 @@ HRESULT WINAPI DllRegisterServerEx(void) * Determines if a specified string is a valid URL. * * PARAMS - * pBC [I] ignored, must be NULL. + * pBC [I] ignored, should be NULL. * szURL [I] string that represents the URL in question. * dwReserved [I] reserved and must be zero. * @@ -399,7 +442,7 @@ HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved) { FIXME("(%p, %s, %d): stub\n", pBC, debugstr_w(szURL), dwReserved); - if (pBC || dwReserved || !szURL) + if (dwReserved || !szURL) return E_INVALIDARG; return S_OK; @@ -862,3 +905,23 @@ BOOL WINAPI IsLoggingEnabledW(LPCWSTR url) FIXME("(%s)\n", debugstr_w(url)); return FALSE; } + +/*********************************************************************** + * URLMON_410 (URLMON.410) + * Undocumented, added in IE8 + */ +BOOL WINAPI URLMON_410(DWORD unknown1, DWORD unknown2) +{ + FIXME("stub: %d %d\n", unknown1, unknown2); + return FALSE; +} + +/*********************************************************************** + * URLMON_423 (URLMON.423) + * Undocumented, added in IE8 + */ +BOOL WINAPI URLMON_423(DWORD unknown1, DWORD unknown2, DWORD unknown3, DWORD unknown4) +{ + FIXME("stub: %d %d %d %d\n", unknown1, unknown2, unknown3, unknown4); + return FALSE; +} diff --git a/dll/win32/urlmon/urlmon_main.h b/dll/win32/urlmon/urlmon_main.h index ea33f152bae..b60d6787a7b 100644 --- a/dll/win32/urlmon/urlmon_main.h +++ b/dll/win32/urlmon/urlmon_main.h @@ -37,16 +37,16 @@ #include "wine/list.h" extern HINSTANCE hProxyDll DECLSPEC_HIDDEN; -extern HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT StdURLMoniker_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT HttpSProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); -extern HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); +extern HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT StdURLMoniker_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT HttpSProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; +extern HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN; extern BOOL WINAPI URLMON_DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) DECLSPEC_HIDDEN; extern HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) DECLSPEC_HIDDEN; @@ -58,30 +58,24 @@ extern GUID const CLSID_PSFactoryBuffer DECLSPEC_HIDDEN; /********************************************************************** * Dll lifetime tracking declaration for urlmon.dll */ -extern LONG URLMON_refCount; +extern LONG URLMON_refCount DECLSPEC_HIDDEN; static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); } static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); } -#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc))) -#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface) +IInternetProtocolInfo *get_protocol_info(LPCWSTR) DECLSPEC_HIDDEN; +HRESULT get_protocol_handler(IUri*,CLSID*,BOOL*,IClassFactory**) DECLSPEC_HIDDEN; +IInternetProtocol *get_mime_filter(LPCWSTR) DECLSPEC_HIDDEN; +BOOL is_registered_protocol(LPCWSTR) DECLSPEC_HIDDEN; +void register_urlmon_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL) DECLSPEC_HIDDEN; +HINTERNET get_internet_session(IInternetBindInfo*) DECLSPEC_HIDDEN; +LPWSTR get_useragent(void) DECLSPEC_HIDDEN; +void free_session(void) DECLSPEC_HIDDEN; -IInternetProtocolInfo *get_protocol_info(LPCWSTR); -HRESULT get_protocol_handler(IUri*,CLSID*,BOOL*,IClassFactory**); -IInternetProtocol *get_mime_filter(LPCWSTR); -BOOL is_registered_protocol(LPCWSTR); -void register_urlmon_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL); -HINTERNET get_internet_session(IInternetBindInfo*); -LPWSTR get_useragent(void); -void free_session(void); +HRESULT bind_to_storage(IUri*,IBindCtx*,REFIID,void**) DECLSPEC_HIDDEN; +HRESULT bind_to_object(IMoniker*,IUri*,IBindCtx*,REFIID,void**ppv) DECLSPEC_HIDDEN; -HRESULT bind_to_storage(IUri*,IBindCtx*,REFIID,void**); -HRESULT bind_to_object(IMoniker*,IUri*,IBindCtx*,REFIID,void**ppv); - -HRESULT create_binding_protocol(BOOL,IInternetProtocolEx**); -void set_binding_sink(IInternetProtocolEx*,IInternetProtocolSink*,IInternetBindInfo*); -IWinInetInfo *get_wininet_info(IInternetProtocolEx*); -HRESULT create_default_callback(IBindStatusCallback**); -HRESULT wrap_callback(IBindStatusCallback*,IBindStatusCallback**); +HRESULT create_default_callback(IBindStatusCallback**) DECLSPEC_HIDDEN; +HRESULT wrap_callback(IBindStatusCallback*,IBindStatusCallback**) DECLSPEC_HIDDEN; typedef struct ProtocolVtbl ProtocolVtbl; @@ -113,19 +107,53 @@ struct ProtocolVtbl { HRESULT (*end_request)(Protocol*); HRESULT (*start_downloading)(Protocol*); void (*close_connection)(Protocol*); + void (*on_error)(Protocol*,DWORD); }; -HRESULT protocol_start(Protocol*,IInternetProtocol*,IUri*,IInternetProtocolSink*,IInternetBindInfo*); -HRESULT protocol_continue(Protocol*,PROTOCOLDATA*); -HRESULT protocol_read(Protocol*,void*,ULONG,ULONG*); -HRESULT protocol_lock_request(Protocol*); -HRESULT protocol_unlock_request(Protocol*); -HRESULT protocol_abort(Protocol*,HRESULT); -void protocol_close_connection(Protocol*); +/* Flags are needed for, among other things, return HRESULTs from the Read function + * to conform to native. For example, Read returns: + * + * 1. E_PENDING if called before the request has completed, + * (flags = 0) + * 2. S_FALSE after all data has been read and S_OK has been reported, + * (flags = FLAG_REQUEST_COMPLETE | FLAG_ALL_DATA_READ | FLAG_RESULT_REPORTED) + * 3. INET_E_DATA_NOT_AVAILABLE if InternetQueryDataAvailable fails. The first time + * this occurs, INET_E_DATA_NOT_AVAILABLE will also be reported to the sink, + * (flags = FLAG_REQUEST_COMPLETE) + * but upon subsequent calls to Read no reporting will take place, yet + * InternetQueryDataAvailable will still be called, and, on failure, + * INET_E_DATA_NOT_AVAILABLE will still be returned. + * (flags = FLAG_REQUEST_COMPLETE | FLAG_RESULT_REPORTED) + * + * FLAG_FIRST_DATA_REPORTED and FLAG_LAST_DATA_REPORTED are needed for proper + * ReportData reporting. For example, if OnResponse returns S_OK, Continue will + * report BSCF_FIRSTDATANOTIFICATION, and when all data has been read Read will + * report BSCF_INTERMEDIATEDATANOTIFICATION|BSCF_LASTDATANOTIFICATION. However, + * if OnResponse does not return S_OK, Continue will not report data, and Read + * will report BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION when all + * data has been read. + */ +#define FLAG_REQUEST_COMPLETE 0x0001 +#define FLAG_FIRST_CONTINUE_COMPLETE 0x0002 +#define FLAG_FIRST_DATA_REPORTED 0x0004 +#define FLAG_ALL_DATA_READ 0x0008 +#define FLAG_LAST_DATA_REPORTED 0x0010 +#define FLAG_RESULT_REPORTED 0x0020 +#define FLAG_ERROR 0x0040 + +HRESULT protocol_start(Protocol*,IInternetProtocol*,IUri*,IInternetProtocolSink*,IInternetBindInfo*) DECLSPEC_HIDDEN; +HRESULT protocol_continue(Protocol*,PROTOCOLDATA*) DECLSPEC_HIDDEN; +HRESULT protocol_read(Protocol*,void*,ULONG,ULONG*) DECLSPEC_HIDDEN; +HRESULT protocol_lock_request(Protocol*) DECLSPEC_HIDDEN; +HRESULT protocol_unlock_request(Protocol*) DECLSPEC_HIDDEN; +HRESULT protocol_abort(Protocol*,HRESULT) DECLSPEC_HIDDEN; +void protocol_close_connection(Protocol*) DECLSPEC_HIDDEN; + +void find_domain_name(const WCHAR*,DWORD,INT*) DECLSPEC_HIDDEN; typedef struct { - const IInternetProtocolVtbl *lpIInternetProtocolVtbl; - const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl; + IInternetProtocol IInternetProtocol_iface; + IInternetProtocolSink IInternetProtocolSink_iface; LONG ref; @@ -133,10 +161,59 @@ typedef struct { IInternetProtocol *protocol; } ProtocolProxy; -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolVtbl) -#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpIInternetProtocolSinkVtbl) +HRESULT create_protocol_proxy(IInternetProtocol*,IInternetProtocolSink*,ProtocolProxy**) DECLSPEC_HIDDEN; -HRESULT create_protocol_proxy(IInternetProtocol*,IInternetProtocolSink*,ProtocolProxy**); +typedef struct _task_header_t task_header_t; + +typedef struct { + IInternetProtocolEx IInternetProtocolEx_iface; + IInternetBindInfo IInternetBindInfo_iface; + IInternetPriority IInternetPriority_iface; + IServiceProvider IServiceProvider_iface; + IInternetProtocolSink IInternetProtocolSink_iface; + IWinInetHttpInfo IWinInetHttpInfo_iface; + + LONG ref; + + IInternetProtocol *protocol; + IInternetBindInfo *bind_info; + IInternetProtocolSink *protocol_sink; + IServiceProvider *service_provider; + IWinInetInfo *wininet_info; + IWinInetHttpInfo *wininet_http_info; + + struct { + IInternetProtocol IInternetProtocol_iface; + } default_protocol_handler; + IInternetProtocol *protocol_handler; + + LONG priority; + + BOOL reported_result; + BOOL reported_mime; + BOOL from_urlmon; + DWORD pi; + + DWORD bscf; + ULONG progress; + ULONG progress_max; + + DWORD apartment_thread; + HWND notif_hwnd; + DWORD continue_call; + + CRITICAL_SECTION section; + task_header_t *task_queue_head, *task_queue_tail; + + BYTE *buf; + DWORD buf_size; + LPWSTR mime; + IUri *uri; + ProtocolProxy *filter_proxy; +} BindProtocol; + +HRESULT create_binding_protocol(BOOL,BindProtocol**) DECLSPEC_HIDDEN; +void set_binding_sink(BindProtocol*,IInternetProtocolSink*,IInternetBindInfo*) DECLSPEC_HIDDEN; typedef struct { HWND notif_hwnd; @@ -145,10 +222,10 @@ typedef struct { struct list entry; } tls_data_t; -tls_data_t *get_tls_data(void); +tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN; -HWND get_notif_hwnd(void); -void release_notif_hwnd(HWND); +HWND get_notif_hwnd(void) DECLSPEC_HIDDEN; +void release_notif_hwnd(HWND) DECLSPEC_HIDDEN; static inline void *heap_alloc(size_t len) { diff --git a/dll/win32/urlmon/urlmon_urlmon.idl b/dll/win32/urlmon/urlmon_urlmon.idl index d45ba07e456..a8c9198c325 100644 --- a/dll/win32/urlmon/urlmon_urlmon.idl +++ b/dll/win32/urlmon/urlmon_urlmon.idl @@ -17,3 +17,93 @@ */ #include "urlmon.idl" + +#ifndef __WIDL__ +#define threading(model) +#define progid(str) +#define vi_progid(str) +#endif + +[ + helpstring("URL Moniker"), + threading(apartment), + uuid(79eac9e0-baf9-11ce-8c82-00aa004ba90b) +] +coclass StdURLMoniker { interface IMoniker; } + +[ + helpstring("http: Asynchronous Pluggable Protocol Handler"), + threading(apartment), + uuid(79eac9e2-baf9-11ce-8c82-00aa004ba90b) +] +coclass HttpProtocol { interface IInternetProtocolEx; interface IInternetPriority; } + +[ + helpstring("ftp: Asynchronous Pluggable Protocol Handler"), + threading(apartment), + uuid(79eac9e3-baf9-11ce-8c82-00aa004ba90b) +] +coclass FtpProtocol { interface IInternetProtocolEx; interface IInternetPriority; } + +[ + helpstring("gopher: Asynchronous Pluggable Protocol Handler"), + threading(apartment), + uuid(79eac9e4-baf9-11ce-8c82-00aa004ba90b) +] +coclass GopherProtocol { interface IInternetProtocolEx; interface IInternetPriority; } + +[ + helpstring("https: Asynchronous Pluggable Protocol Handler"), + threading(apartment), + uuid(79eac9e5-baf9-11ce-8c82-00aa004ba90b) +] +coclass HttpsProtocol { interface IInternetProtocolEx; interface IInternetPriority; } + +[ + helpstring("mk: Asynchronous Pluggable Protocol Handler"), + threading(apartment), + uuid(79eac9e6-baf9-11ce-8c82-00aa004ba90b) +] +coclass MkProtocol { interface IInternetProtocolEx; interface IInternetPriority; } + +[ + helpstring("file:, local: Asynchronous Pluggable Protocol Handler"), + threading(apartment), + uuid(79eac9e7-baf9-11ce-8c82-00aa004ba90b) +] +coclass FileProtocol { interface IInternetProtocolEx; interface IInternetPriority; } + +[ + helpstring("CDL: Asynchronous Pluggable Protocol Handler"), + threading(apartment), + uuid(3dd53d40-7b8b-11d0-b013-00aa0059ce02) +] +coclass CdlProtocol { interface IInternetProtocolEx; interface IInternetPriority; } + +[ + helpstring("Security Manager"), + threading(both), + uuid(7b8a2d94-0ac9-11d1-896c-00c04fb6bfc4) +] +coclass InternetSecurityManager { interface IInternetSecurityManager; } + +[ + helpstring("URL Zone Manager"), + threading(both), + uuid(7b8a2d95-0ac9-11d1-896c-00c04fb6bfc4) +] +coclass InternetZoneManager { interface IInternetZoneManagerEx2; } + +[ + helpstring("URLMoniker ProxyStub Factory"), + threading(apartment), + uuid(79eac9f1-baf9-11ce-8c82-00aa004ba90b) +] +coclass PSFactoryBuffer { interface IPSFactoryBuffer; } + +[ + helpstring("AP lzdhtml encoding/decoding Filter"), + threading(apartment), + uuid(8f6b0360-b80d-11d0-a9b3-006097942311) +] +coclass DeCompMimeFilter { interface IInternetProtocol; interface IInternetProtocolSink; } diff --git a/dll/win32/user32/CMakeLists.txt b/dll/win32/user32/CMakeLists.txt index 1be88006fc3..d40679495f9 100644 --- a/dll/win32/user32/CMakeLists.txt +++ b/dll/win32/user32/CMakeLists.txt @@ -3,8 +3,6 @@ set_unicode() spec2def(user32.dll user32.spec) -add_definitions(-D_DLL -D__USE_CRTIMP) - include_directories( BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine ${REACTOS_SOURCE_DIR}/include/reactos/subsys @@ -13,6 +11,7 @@ include_directories( set_rc_compiler() list(APPEND SOURCE + controls/appswitch.c controls/button.c controls/combo.c controls/edit.c @@ -66,9 +65,7 @@ list(APPEND SOURCE user32.rc ${CMAKE_CURRENT_BINARY_DIR}/user32.def) -add_library(user32 SHARED - ${CMAKE_CURRENT_BINARY_DIR}/user32_user32.h.gch - ${SOURCE}) +add_library(user32 SHARED ${SOURCE}) set_module_type(user32 win32dll) @@ -78,7 +75,7 @@ target_link_libraries(user32 win32ksys ${PSEH_LIB}) -add_pch(user32 ${CMAKE_CURRENT_SOURCE_DIR}/include/user32.h ${SOURCE}) add_importlibs(user32 gdi32 advapi32 imm32 msvcrt kernel32 ntdll) +add_pch(user32 include/user32.h) add_cd_file(TARGET user32 DESTINATION reactos/system32 FOR all) add_importlib_target(user32.spec) diff --git a/dll/win32/user32/controls/appswitch.c b/dll/win32/user32/controls/appswitch.c index f9cfc445d45..063e5b2b5c5 100644 --- a/dll/win32/user32/controls/appswitch.c +++ b/dll/win32/user32/controls/appswitch.c @@ -1,10 +1,10 @@ - /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: dll/win32/user32/controls/appswitch.c * PURPOSE: app switching functionality * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * David Quintana (gigaherz@gmail.com) */ #include @@ -12,259 +12,548 @@ #include WINE_DEFAULT_DEBUG_CHANNEL(user32); -typedef struct APPSWITCH_ITEM +// limit the number of windows shown in the alt-tab window +// 120 windows results in (12*40) by (10*40) pixels worth of icons. +#define MAX_WINDOWS 120 + +// Global variables +HWND switchdialog; +HFONT dialogFont; +int selectedWindow = 0; +BOOL isOpen = FALSE; + +int fontHeight=0; + +WCHAR windowText[1024]; + +HWND windowList[MAX_WINDOWS]; +HICON iconList[MAX_WINDOWS]; +int windowCount = 0; + +int cxBorder, cyBorder; +int nItems, nCols, nRows; +int itemsW, itemsH; +int totalW, totalH; +int xOffset, yOffset; +POINT pt; + +void ResizeAndCenter(HWND hwnd, int width, int height) { - HWND hwndDlg; - DWORD zPos; - HICON hIcon; - BOOL bFocus; - struct APPSWITCH_ITEM * Next; - WCHAR szText[1]; -} APPSWITCH_ITEM, *PAPPSWITCH_ITEM; + int screenwidth = GetSystemMetrics(SM_CXSCREEN); + int screenheight = GetSystemMetrics(SM_CYSCREEN); -static PAPPSWITCH_ITEM pRoot = NULL; -static DWORD NumOfWindows = 0; -static HWND hAppWindowDlg = NULL; -static HHOOK hhk = NULL; + pt.x = (screenwidth - width) / 2; + pt.y = (screenheight - height) / 2; -UINT WINAPI PrivateExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT); - - -BOOL -CALLBACK -EnumWindowEnumProc( - HWND hwnd, - LPARAM lParam -) -{ - PAPPSWITCH_ITEM pItem; - UINT Length; - HICON hIcon; - PAPPSWITCH_ITEM pCurItem; - DWORD dwPid; - HANDLE hProcess; - WCHAR szFileName[MAX_PATH] = {0}; - - /* check if the enumerated window is visible */ - if (!IsWindowVisible(hwnd)) - return TRUE; - /* get window icon */ - hIcon = (HICON)SendMessage(hwnd, WM_GETICON, ICON_BIG, 0); - if (!hIcon) - { - GetWindowThreadProcessId(hwnd, &dwPid); - hProcess = OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ, FALSE, dwPid); - if (hProcess) - { -// if (GetModuleFileNameExW(hProcess, NULL, szFileName, MAX_PATH)) - { - szFileName[MAX_PATH-1] = L'\0'; - PrivateExtractIconExW(szFileName, 0, &hIcon, NULL, 1); - } - } - } - else - { - /* icons from WM_GETICON need to be copied */ - hIcon = CopyIcon(hIcon); - } - /* get the text length */ - Length = SendMessageW(hwnd, WM_GETTEXTLENGTH, 0, 0); - /* allocate item structure for it */ -// pItem = (PAPPSWITCH_ITEM)HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, sizeof(APPSWITCH_ITEM) + Length * sizeof(WCHAR)); - if (!pItem) - return TRUE; - if (Length) - { - /* retrieve the window text when available */ - SendMessageW(hwnd, WM_GETTEXT, Length+1, (LPARAM)pItem->szText); - } - /* copy the window icon */ - pItem->hIcon = hIcon; - /* store window handle */ - pItem->hwndDlg = hwnd; - /* is the window the active window */ - if (GetActiveWindow() == hwnd) - pItem->bFocus = TRUE; - - if (!pRoot) - { - /* first item */ - pRoot = pItem; - return TRUE; - } - - /* enumerate the last item */ - pCurItem = pRoot; - while(pCurItem->Next) - pCurItem = pCurItem->Next; - - /* insert it into the list */ - pCurItem->Next = pItem; - NumOfWindows++; - return TRUE; + MoveWindow(hwnd, pt.x, pt.y, width, height, FALSE); } -VOID -EnumerateAppWindows(HDESK hDesk, HWND hwndDlg) +void MakeWindowActive(HWND hwnd) { - /* initialize defaults */ - pRoot = NULL; - NumOfWindows = 0; - hAppWindowDlg = hwndDlg; - /* enumerate all windows */ - EnumDesktopWindows(hDesk, EnumWindowEnumProc, (LPARAM)NULL); - if (NumOfWindows > 7) + WINDOWPLACEMENT wpl; + + GetWindowPlacement(hwnd, &wpl); + + if (wpl.showCmd == SW_SHOWMINIMIZED) + ShowWindow(hwnd, SW_RESTORE); + + BringWindowToTop(hwnd); // same as: SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); ? + SetForegroundWindow(hwnd); +} + +void CompleteSwitch(BOOL doSwitch) +{ + if (!isOpen) + return; + + isOpen = FALSE; + + TRACE("[ATbot] CompleteSwitch Hiding Window.\n"); + ShowWindow(switchdialog, SW_HIDE); + + if(doSwitch) + { + if(selectedWindow >= windowCount) + return; + + // FIXME: workaround because reactos fails to activate the previous window correctly. + //if(selectedWindow != 0) + { + HWND hwnd = windowList[selectedWindow]; + + GetWindowTextW(hwnd, windowText, 1023); + + TRACE("[ATbot] CompleteSwitch Switching to 0x%08x (%ls)\n", hwnd, windowText); + + MakeWindowActive(hwnd); + } + } + + windowCount = 0; +} + +BOOL CALLBACK EnumerateCallback(HWND window, LPARAM lParam) +{ + HICON hIcon; + + UNREFERENCED_PARAMETER(lParam); + + if (!IsWindowVisible(window)) + return TRUE; + + GetClassNameW(window,windowText,4095); + if ((wcscmp(L"Shell_TrayWnd",windowText)==0) || + (wcscmp(L"Progman",windowText)==0) ) + return TRUE; + + // First try to get the big icon assigned to the window + hIcon = (HICON)SendMessageW(window, WM_GETICON, ICON_BIG, 0); + if (!hIcon) + { + // If no icon is assigned, try to get the icon assigned to the windows' class + hIcon = (HICON)GetClassLongPtrW(window, GCL_HICON); + if (!hIcon) + { + // If we still don't have an icon, see if we can do with the small icon, + // or a default application icon + hIcon = (HICON)SendMessageW(window, WM_GETICON, ICON_SMALL2, 0); + if (!hIcon) + { + // If all fails, give up and continue with the next window + return TRUE; + } + } + } + + windowList[windowCount] = window; + iconList[windowCount] = CopyIcon(hIcon); + + windowCount++; + + // If we got to the max number of windows, + // we won't be able to add any more + if(windowCount == MAX_WINDOWS) + return FALSE; + + return TRUE; +} + +// Function mostly compatible with the normal EnumWindows, +// except it lists in Z-Order and it doesn't ensure consistency +// if a window is removed while enumerating +void EnumWindowsZOrder(WNDENUMPROC callback, LPARAM lParam) +{ + HWND next = GetTopWindow(NULL); + while (next != NULL) { - /* FIXME resize window */ + if(!callback(next, lParam)) + break; + next = GetWindow(next, GW_HWNDNEXT); } } -VOID -MarkNextEntryAsActive() +void ProcessMouseMessage(UINT message, LPARAM lParam) { - PAPPSWITCH_ITEM pItem; + int xPos = LOWORD(lParam); + int yPos = HIWORD(lParam); - pItem = pRoot; - if (!pRoot) - return; + int xIndex = (xPos - xOffset)/40; + int xOff = (xPos - xOffset)%40; - while(pItem) + int yIndex = (yPos - yOffset)/40; + int yOff = (yPos - yOffset)%40; + + if(xOff > 32 || xIndex > nItems) + return; + + if(yOff > 32 || yIndex > nRows) + return; + + selectedWindow = (yIndex*nCols) + xIndex; + if (message == WM_MOUSEMOVE) + { + InvalidateRect(switchdialog, NULL, TRUE); + //RedrawWindow(switchdialog, NULL, NULL, 0); + } + else + { + selectedWindow = (yIndex*nCols) + xIndex; + CompleteSwitch(TRUE); + } +} + +void OnPaint(HWND hWnd) +{ + HDC dialogDC; + PAINTSTRUCT paint; + RECT cRC, textRC; + int i; + HBRUSH hBrush; + HPEN hPen; + COLORREF cr; + int nch = GetWindowTextW(windowList[selectedWindow], windowText, 1023); + + dialogDC = BeginPaint(hWnd, &paint); + { + GetClientRect(hWnd, &cRC); + FillRect(dialogDC, &cRC, GetSysColorBrush(COLOR_MENU)); + + for(i=0; i< windowCount; i++) + { + HICON hIcon = iconList[i]; + + int xpos = xOffset + 40 * (i % nCols); + int ypos = yOffset + 40 * (i / nCols); + + if (selectedWindow == i) + { + hBrush = GetSysColorBrush(COLOR_HIGHLIGHT); + } + else + { + hBrush = GetSysColorBrush(COLOR_MENU); + } +#if TRUE + cr = GetSysColor(COLOR_BTNTEXT); // doesn't look right! >_< + hPen = CreatePen(PS_DOT, 1, cr); + SelectObject(dialogDC, hPen); + SelectObject(dialogDC, hBrush); + Rectangle(dialogDC, xpos-2, ypos-2, xpos+32+2, ypos+32+2); + DeleteObject(hPen); + // Must NOT destroy the system brush! +#else + RECT rc = { xpos-2, ypos-2, xpos+32+2, ypos+32+2 }; + FillRect(dialogDC, &rc, hBrush); +#endif + DrawIcon(dialogDC, xpos, ypos, hIcon); + } + + SelectObject(dialogDC, dialogFont); + SetTextColor(dialogDC, GetSysColor(COLOR_BTNTEXT)); + SetBkColor(dialogDC, GetSysColor(COLOR_BTNFACE)); + + textRC.top = itemsH; + textRC.left = 8; + textRC.right = totalW - 8; + textRC.bottom = totalH - 8; + DrawTextW(dialogDC, windowText, nch, &textRC, DT_CENTER|DT_END_ELLIPSIS); + } + EndPaint(hWnd, &paint); +} + +DWORD CreateSwitcherWindow(HINSTANCE hInstance) +{ + switchdialog = CreateWindowExW( WS_EX_TOPMOST|WS_EX_DLGMODALFRAME|WS_EX_TOOLWINDOW, + WC_SWITCH, + L"", + WS_POPUP|WS_BORDER|WS_DISABLED, + CW_USEDEFAULT, + CW_USEDEFAULT, + 400, 150, + NULL, NULL, + hInstance, NULL); + if (!switchdialog) { - if (pItem->bFocus) - { - pItem->bFocus = FALSE; - if (pItem->Next) - pItem->Next->bFocus = TRUE; + TRACE("[ATbot] Task Switcher Window failed to create.\n"); + return 0; + } + + isOpen = FALSE; + return 1; +} + +DWORD GetDialogFont() +{ + HDC tDC; + TEXTMETRIC tm; + + dialogFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); + + tDC = GetDC(0); + GetTextMetrics(tDC, &tm); + fontHeight = tm.tmHeight; + ReleaseDC(0, tDC); + + return 1; +} + +void PrepareWindow() +{ + cxBorder = GetSystemMetrics(SM_CXBORDER); + cyBorder = GetSystemMetrics(SM_CYBORDER); + + nItems = windowCount; + nCols = min(max(nItems,8),12); + nRows = (nItems+nCols-1)/nCols; + + itemsW = nCols*32 + (nCols+1)*8; + itemsH = nRows*32 + (nRows+1)*8; + + totalW = itemsW + 2*cxBorder + 4; + totalH = itemsH + 2*cyBorder + fontHeight + 8; // give extra pixels for the window title + + xOffset = 8; + yOffset = 8; + + if (nItems < nCols) + { + int w2 = nItems*32 + (nItems-1)*8; + xOffset = (itemsW-w2)/2; + } + ResizeAndCenter(switchdialog, totalW, totalH); +} + +void ProcessHotKey() +{ + if (!isOpen) + { + windowCount=0; + EnumWindowsZOrder(EnumerateCallback, 0); + + if (windowCount < 2) + return; + + selectedWindow = 1; + + TRACE("[ATbot] HotKey Received. Opening window.\n"); + ShowWindow(switchdialog, SW_SHOWNORMAL); + MakeWindowActive(switchdialog); + isOpen = TRUE; + } + else + { + TRACE("[ATbot] HotKey Received Rotating.\n"); + selectedWindow = (selectedWindow + 1)%windowCount; + InvalidateRect(switchdialog, NULL, TRUE); + } +} + +LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam ) +{ + HWND hwnd; + MSG msg; + BOOL Esc = FALSE; + INT Count = 0; + WCHAR Text[1024]; + + switchdialog = NULL; + + switch (lParam) + { + case VK_TAB: + if( !CreateSwitcherWindow(User32Instance) ) return 0; + if( !GetDialogFont() ) return 0; + ProcessHotKey(); + break; + + case VK_ESCAPE: + windowCount = 0; + Count = 0; + EnumWindowsZOrder(EnumerateCallback, 0); + if (windowCount < 2) return 0; + if (wParam == SC_NEXTWINDOW) + Count = 1; + else + { + if (windowCount == 2) + Count = 0; else - pRoot->bFocus = TRUE; - } - pItem = pItem->Next; - } + Count = windowCount - 1; + } + TRACE("DoAppSwitch VK_ESCAPE 1 Count %d windowCount %d\n",Count,windowCount); + hwnd = windowList[Count]; + GetWindowTextW(hwnd, Text, 1023); + TRACE("[ATbot] Switching to 0x%08x (%ls)\n", hwnd, Text); + MakeWindowActive(hwnd); + Esc = TRUE; + break; - InvalidateRgn(hAppWindowDlg, NULL, TRUE); + default: + return 0; + } + // Main message loop: + while (1) + { + for (;;) + { + if (PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE )) + { + if (!CallMsgFilterW( &msg, MSGF_NEXTWINDOW )) break; + /* remove the message from the queue */ + PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE ); + } + else + WaitMessage(); + } + + switch (msg.message) + { + case WM_KEYUP: + { + PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE ); + if (msg.wParam == VK_MENU) + { + CompleteSwitch(TRUE); + } + else if (msg.wParam == VK_RETURN) + { + CompleteSwitch(TRUE); + } + else if (msg.wParam == VK_ESCAPE) + { + TRACE("DoAppSwitch VK_ESCAPE 2\n"); + CompleteSwitch(FALSE); + } + goto Exit; //break; + } + + case WM_SYSKEYDOWN: + { + PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE ); + if (HIWORD(msg.lParam) & KF_ALTDOWN) + { + INT Shift; + if ( msg.wParam == VK_TAB ) + { + if (Esc) break; + Shift = GetKeyState(VK_SHIFT) & 0x8000 ? SC_PREVWINDOW : SC_NEXTWINDOW; + if (Shift == SC_NEXTWINDOW) + { + selectedWindow = (selectedWindow + 1)%windowCount; + } + else + { + selectedWindow = selectedWindow - 1; + if (selectedWindow < 0) + selectedWindow = windowCount - 1; + } + InvalidateRect(switchdialog, NULL, TRUE); + } + else if ( msg.wParam == VK_ESCAPE ) + { + if (!Esc) break; + if (windowCount < 2) + goto Exit; + if (wParam == SC_NEXTWINDOW) + { + Count = (Count + 1)%windowCount; + } + else + { + Count--; + if (Count < 0) + Count = windowCount - 1; + } + hwnd = windowList[Count]; + GetWindowTextW(hwnd, Text, 1023); + MakeWindowActive(hwnd); + } + } + break; + } + + case WM_LBUTTONUP: + PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE ); + ProcessMouseMessage(msg.message, msg.lParam); + goto Exit; + + default: + if (PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE )) + { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } + break; + } + } +Exit: + if (switchdialog) DestroyWindow(switchdialog); + switchdialog = NULL; + selectedWindow = 0; + windowCount = 0; + return 0; } - -LRESULT -CALLBACK -KeyboardHookProc( - int nCode, - WPARAM wParam, - LPARAM lParam -) -{ - PKBDLLHOOKSTRUCT hk = (PKBDLLHOOKSTRUCT) lParam; - - if (wParam == WM_SYSKEYUP) - { - /* is tab key pressed */ - if (hk->vkCode == VK_TAB) - { - if (hAppWindowDlg == NULL) - { - /* FIXME - * launch window - */ - FIXME("launch alt-tab window\n"); - } - else - { - MarkNextEntryAsActive(); - } - } - } - return CallNextHookEx(hhk, nCode, wParam, lParam); -} - -VOID -PaintAppWindows(HWND hwndDlg, HDC hDc) -{ - DWORD dwIndex, X, Y; - PAPPSWITCH_ITEM pCurItem; - RECT Rect; - DWORD XSize, YSize, XMax; - HBRUSH hBrush; - - X = 10; - Y = 10; - XSize = GetSystemMetrics(SM_CXICON); - YSize = GetSystemMetrics(SM_CYICON); - XMax = (XSize+(XSize/2)) * 7 + X; - pCurItem = pRoot; - - for (dwIndex = 0; dwIndex < NumOfWindows; dwIndex++) - { - if (X >= XMax) - { - X = 10; - Y += YSize + (YSize/2); - } - if (pCurItem->bFocus) - { - hBrush = CreateSolidBrush(RGB(30, 30, 255)); - SetRect(&Rect, X-5, Y-5, X + XSize + 5, Y + YSize + 5); - FillRect(hDc, &Rect, hBrush); - DeleteObject((HGDIOBJ)hBrush); -// SendDlgItemMessageW(hwndDlg, IDC_STATIC_CUR_APP, WM_SETTEXT, 0, (LPARAM)pCurItem->szText); - } - - DrawIcon(hDc, X, Y, pCurItem->hIcon); - pCurItem = pCurItem->Next; - X += XSize +(XSize/2); - } -} VOID DestroyAppWindows() { - PAPPSWITCH_ITEM pCurItem, pNextItem; - - pCurItem = pRoot; - while(pCurItem) - { - pNextItem = pCurItem->Next; - DestroyIcon(pCurItem->hIcon); -// HeapFree(Win32CsrApiHeap, 0, pCurItem); - pCurItem = pNextItem; - } - pRoot = NULL; - hAppWindowDlg = NULL; - NumOfWindows = 0; + INT i; + for (i=0; i< windowCount; i++) + { + HICON hIcon = iconList[i]; + DestroyIcon(hIcon); + } } -INT_PTR -CALLBACK -SwitchWindowDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) +// +// Switch System Class Window Proc. +// +LRESULT WINAPI SwitchWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode ) { - PAINTSTRUCT Paint; - HDESK hInput; + PWND pWnd; + PALTTABINFO ati; + pWnd = ValidateHwnd(hWnd); + if (pWnd) + { + if (!pWnd->fnid) + { + NtUserSetWindowFNID(hWnd, FNID_SWITCH); + } + } - switch (message) - { - case WM_INITDIALOG: - hInput = OpenInputDesktop(0,0, GENERIC_ALL); - if (hInput) - { - EnumerateAppWindows(hInput, hwndDlg); - CloseDesktop(hInput); - } - return TRUE; - case WM_PAINT: - BeginPaint(hwndDlg, &Paint); - PaintAppWindows(hwndDlg, Paint.hdc); - EndPaint(hwndDlg, &Paint); - break; - case WM_DESTROY: - DestroyAppWindows(); - break; - } - return FALSE; + switch (uMsg) + { + case WM_NCCREATE: + if (!(ati = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ati)))) + return 0; + SetWindowLongPtrW( hWnd, 0, (LONG_PTR)ati ); + return TRUE; + + case WM_SHOWWINDOW: + if (wParam == TRUE) + { + PrepareWindow(); + ati = (PALTTABINFO)GetWindowLongPtrW(hWnd, 0); + ati->cItems = nItems; + ati->cxItem = ati->cyItem = 43; + ati->cRows = nRows; + ati->cColumns = nCols; + } + return 0; + + case WM_MOUSEMOVE: + ProcessMouseMessage(uMsg, lParam); + return 0; + + case WM_ACTIVATE: + if (wParam == WA_INACTIVE) + { + CompleteSwitch(FALSE); + } + return 0; + + case WM_PAINT: + OnPaint(hWnd); + return 0; + + case WM_DESTROY: + isOpen = FALSE; + ati = (PALTTABINFO)GetWindowLongPtrW(hWnd, 0); + HeapFree( GetProcessHeap(), 0, ati ); + SetWindowLongPtrW( hWnd, 0, 0 ); + DestroyAppWindows(); + NtUserSetWindowFNID(hWnd, FNID_DESTROY); + return 0; + } + return DefWindowProcW(hWnd, uMsg, wParam, lParam); } -VOID -WINAPI -InitializeAppSwitchHook() +LRESULT WINAPI SwitchWndProcA(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - hhk = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, NULL, 0); - TRACE("InitializeAppSwitchHook hhk %p\n", hhk); + return SwitchWndProc_common(hWnd, uMsg, wParam, lParam, FALSE); +} + +LRESULT WINAPI SwitchWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + return SwitchWndProc_common(hWnd, uMsg, wParam, lParam, TRUE); } diff --git a/dll/win32/user32/controls/combo.c b/dll/win32/user32/controls/combo.c index adeac610d78..4d678b790d9 100644 --- a/dll/win32/user32/controls/combo.c +++ b/dll/win32/user32/controls/combo.c @@ -37,10 +37,6 @@ #include WINE_DEFAULT_DEBUG_CHANNEL(combo); - /* bits in the dwKeyData */ -#define KEYDATA_ALT 0x2000 -#define KEYDATA_PREVSTATE 0x4000 - /* * Additional combo box definitions */ @@ -2011,7 +2007,7 @@ LRESULT WINAPI ComboWndProc_common( HWND hwnd, UINT message, SendMessageW(lphc->hWndLBox, message, wParam, lParam); return 0; case WM_SYSKEYDOWN: - if( KEYDATA_ALT & HIWORD(lParam) ) + if( KF_ALTDOWN & HIWORD(lParam) ) // ReactOS (wine) KEYDATA_ALT if( wParam == VK_UP || wParam == VK_DOWN ) COMBO_FlipListbox( lphc, FALSE, FALSE ); return 0; diff --git a/dll/win32/user32/controls/icontitle.c b/dll/win32/user32/controls/icontitle.c index 6daf27ec125..edcdd6bbfc2 100644 --- a/dll/win32/user32/controls/icontitle.c +++ b/dll/win32/user32/controls/icontitle.c @@ -188,7 +188,6 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, { HWND owner = GetWindow( hWnd, GW_OWNER ); - if (!IsWindow(hWnd)) return 0; #ifdef __REACTOS__ // Do this now, remove after Server side is fixed. PWND pWnd; @@ -202,6 +201,8 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, } #endif + if (!IsWindow(hWnd)) return 0; + switch( msg ) { case WM_CREATE: diff --git a/dll/win32/user32/controls/regcontrol.c b/dll/win32/user32/controls/regcontrol.c index 9980f06a6df..cf500b371b4 100644 --- a/dll/win32/user32/controls/regcontrol.c +++ b/dll/win32/user32/controls/regcontrol.c @@ -131,8 +131,8 @@ BOOL WINAPI RegisterClientPFN(VOID) pfnClientW.pfnDefWindowProc = DefWindowProcW; pfnClientA.pfnMessageWindowProc = MsgWindowProc; pfnClientW.pfnMessageWindowProc = MsgWindowProc; - pfnClientA.pfnSwitchWindowProc = DefWindowProcA; - pfnClientW.pfnSwitchWindowProc = DefWindowProcW; + pfnClientA.pfnSwitchWindowProc = SwitchWndProcA; + pfnClientW.pfnSwitchWindowProc = SwitchWndProcW; pfnClientA.pfnButtonWndProc = ButtonWndProcA; pfnClientW.pfnButtonWndProc = ButtonWndProcW; pfnClientA.pfnComboBoxWndProc = ComboWndProcA; diff --git a/dll/win32/user32/controls/scrollbar.c b/dll/win32/user32/controls/scrollbar.c index b238b64532a..5a37fa6b8c3 100644 --- a/dll/win32/user32/controls/scrollbar.c +++ b/dll/win32/user32/controls/scrollbar.c @@ -1243,11 +1243,6 @@ ScrollTrackScrollBar(HWND Wnd, INT SBType, POINT Pt) LRESULT WINAPI ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - if (! IsWindow(Wnd)) - { - return 0; - } - #ifdef __REACTOS__ // Do this now, remove after Server side is fixed. PWND pWnd; @@ -1261,6 +1256,11 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA } #endif + if (! IsWindow(Wnd)) + { + return 0; + } + switch (Msg) { case WM_CREATE: diff --git a/dll/win32/user32/include/controls.h b/dll/win32/user32/include/controls.h index 99a935c7897..b466016dc73 100644 --- a/dll/win32/user32/include/controls.h +++ b/dll/win32/user32/include/controls.h @@ -114,3 +114,5 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode); +LRESULT WINAPI SwitchWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); +LRESULT WINAPI SwitchWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); diff --git a/dll/win32/user32/include/ntwrapper.h b/dll/win32/user32/include/ntwrapper.h index b10b5e603f4..1751d189be4 100644 --- a/dll/win32/user32/include/ntwrapper.h +++ b/dll/win32/user32/include/ntwrapper.h @@ -234,30 +234,12 @@ ChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext) return NtUserChangeClipboardChain(hWndRemove, hWndNewNext); } -EXTINLINE BOOL WINAPI -GetClipCursor(LPRECT lpRect) -{ - return NtUserGetClipCursor(lpRect); -} - EXTINLINE BOOL WINAPI GetCursorInfo(PCURSORINFO pci) { return NtUserGetCursorInfo(pci); } -EXTINLINE BOOL WINAPI -ClipCursor(CONST RECT *lpRect) -{ - return NtUserClipCursor((RECT *)lpRect); -} - -EXTINLINE HCURSOR WINAPI -SetCursor(HCURSOR hCursor) -{ - return NtUserSetCursor(hCursor); -} - EXTINLINE HDC WINAPI GetDC(HWND hWnd) { @@ -468,12 +450,6 @@ GetMenuItemRect(HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem) return NtUserGetMenuItemRect(hWnd, hMenu, uItem, lprcItem); } -EXTINLINE BOOL WINAPI -HiliteMenuItem(HWND hwnd, HMENU hmenu, UINT uItemHilite, UINT uHilite) -{ - return NtUserHiliteMenuItem(hwnd, hmenu, uItemHilite, uHilite); -} - EXTINLINE BOOL WINAPI RemoveMenu(HMENU hMenu, UINT uPosition, UINT uFlags) { diff --git a/dll/win32/user32/lang/bg-BG.rc b/dll/win32/user32/lang/bg-BG.rc index 80dc6f4be8b..7673e8234c9 100644 --- a/dll/win32/user32/lang/bg-BG.rc +++ b/dll/win32/user32/lang/bg-BG.rc @@ -9,11 +9,11 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Избор на прозорец" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL - PUSHBUTTON "&", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&" , 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Добре", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Отказ" , 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END ///////////////////////////////////////////////////////////////////////////// @@ -25,27 +25,27 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&", EM_UNDO + MENUITEM "&Отмяна", EM_UNDO MENUITEM SEPARATOR - MENUITEM "&", WM_CUT - MENUITEM "&", WM_COPY - MENUITEM "&", WM_PASTE - MENUITEM "&", WM_CLEAR + MENUITEM "От&рязване", WM_CUT + MENUITEM "За&помняне", WM_COPY + MENUITEM "По&ставяне", WM_PASTE + MENUITEM "Из&триване", WM_CLEAR MENUITEM SEPARATOR - MENUITEM " &",EM_SETSEL + MENUITEM "Избор на вси&чки",EM_SETSEL END END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&", SC_RESTORE - MENUITEM "&", SC_MOVE - MENUITEM "&", SC_SIZE - MENUITEM "&", SC_MINIMIZE - MENUITEM "&", SC_MAXIMIZE + MENUITEM "&Възстановяване", SC_RESTORE + MENUITEM "&Преместване", SC_MOVE + MENUITEM "&Размер", SC_SIZE + MENUITEM "С&маляване", SC_MINIMIZE + MENUITEM "У&големяване", SC_MAXIMIZE MENUITEM SEPARATOR - MENUITEM "&\tAlt-F4",SC_CLOSE + MENUITEM "&Затваряне\tAlt-F4",SC_CLOSE END ///////////////////////////////////////////////////////////////////////////// @@ -55,21 +55,21 @@ END STRINGTABLE BEGIN - IDS_ERROR, "" - IDS_OK, "" - IDS_CANCEL, "" - IDS_ABORT, "" - IDS_RETRY, "& " - IDS_IGNORE, "&" - IDS_YES, "&" - IDS_NO, "&" - IDS_HELP, "" - IDS_TRYAGAIN, "& " - IDS_CONTINUE, "&" + IDS_ERROR, "Грешка" + IDS_OK, "Добре" + IDS_CANCEL, "Отказ" + IDS_ABORT, "Прекъсване" + IDS_RETRY, "&Нов опит" + IDS_IGNORE, "Прене&брегване" + IDS_YES, "&Да" + IDS_NO, "&Не" + IDS_HELP, "Помощ" + IDS_TRYAGAIN, "&Нов опит" + IDS_CONTINUE, "Про&дължаване" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "& ..." + IDS_MDI_MOREWINDOWS, "&Още прозорци..." END diff --git a/dll/win32/user32/lang/cs-CZ.rc b/dll/win32/user32/lang/cs-CZ.rc index 8f97fd6a7f2..95a9c9b4495 100644 --- a/dll/win32/user32/lang/cs-CZ.rc +++ b/dll/win32/user32/lang/cs-CZ.rc @@ -30,14 +30,14 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&Zpt", EM_UNDO + MENUITEM "&Zpìt", EM_UNDO MENUITEM SEPARATOR MENUITEM "V&yjmout", WM_CUT - MENUITEM "&Koprovat", WM_COPY - MENUITEM "&Vloit", WM_PASTE + MENUITEM "&Kopírovat", WM_COPY + MENUITEM "&Vložit", WM_PASTE MENUITEM "Od&stranit", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "Vy&brat ve", EM_SETSEL + MENUITEM "Vy&brat vše", EM_SETSEL END END @@ -45,12 +45,12 @@ END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN MENUITEM "&Obnovit", 61728 - MENUITEM "&Pesunout", 61456 + MENUITEM "&Pøesunout", 61456 MENUITEM "&Velikost", 61440 MENUITEM "Mi&nimalizovat", 61472 MENUITEM "Ma&ximalizovat", 61488 MENUITEM SEPARATOR - MENUITEM "&Zavt\tAlt-F4", 61536 + MENUITEM "&Zavøít\tAlt-F4", 61536 END ///////////////////////////////////////////////////////////////////////////// @@ -63,18 +63,18 @@ BEGIN IDS_ERROR, "Chyba" IDS_OK, "OK" IDS_CANCEL, "Storno" - IDS_ABORT, "&Peruit" + IDS_ABORT, "&Pøerušit" IDS_RETRY, "&Znovu" IDS_IGNORE, "&Ignorovat" IDS_YES, "&Ano" IDS_NO, "&Ne" - IDS_HELP, "Npovda" + IDS_HELP, "Nápovìda" IDS_TRYAGAIN, "Z&kusit znovu" - IDS_CONTINUE, "P&okraovat" + IDS_CONTINUE, "P&okraèovat" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "&Vce oken..." //kde se toto objevuje? + IDS_MDI_MOREWINDOWS, "&Více oken..." //kde se toto objevuje? END diff --git a/dll/win32/user32/lang/da-DK.rc b/dll/win32/user32/lang/da-DK.rc index 81928115115..5d180154ad9 100644 --- a/dll/win32/user32/lang/da-DK.rc +++ b/dll/win32/user32/lang/da-DK.rc @@ -9,7 +9,7 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Vlg Vindue" +CAPTION "Vælg Vindue" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP @@ -29,10 +29,10 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Kl&ip", WM_CUT MENUITEM "&Kopier", WM_COPY - MENUITEM "&Indst", WM_PASTE + MENUITEM "&Indsæt", WM_PASTE MENUITEM "&Slet", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "Vlg &Alle", EM_SETSEL + MENUITEM "Vælg &Alle", EM_SETSEL END END @@ -40,7 +40,7 @@ SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN MENUITEM "&Gendan", 61728 MENUITEM "&Flyt", 61456 - MENUITEM "&Strrelse", 61440 + MENUITEM "&Størrelse", 61440 MENUITEM "M&inimere", 61472 MENUITEM "Ma&ksimere", 61488 MENUITEM SEPARATOR @@ -58,13 +58,13 @@ BEGIN IDS_OK, "OK" IDS_CANCEL, "Fortryd" IDS_ABORT, "&Afbryd" - IDS_RETRY, "&Forsg Igen" + IDS_RETRY, "&Forsøg Igen" IDS_IGNORE, "&Ignorer" IDS_YES, "&Ja" IDS_NO, "&Nej" - IDS_HELP, "Hjlp" - IDS_TRYAGAIN, "&Forsg Igen" - IDS_CONTINUE, "&Forst" + IDS_HELP, "Hjælp" + IDS_TRYAGAIN, "&Forsøg Igen" + IDS_CONTINUE, "&Forsæt" END STRINGTABLE diff --git a/dll/win32/user32/lang/de-DE.rc b/dll/win32/user32/lang/de-DE.rc index d245f2f7283..fc5e4886fbb 100644 --- a/dll/win32/user32/lang/de-DE.rc +++ b/dll/win32/user32/lang/de-DE.rc @@ -11,7 +11,7 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Fenster Auswhlen" +CAPTION "Fenster Auswählen" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP @@ -27,14 +27,14 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&Rckgngig", EM_UNDO + MENUITEM "&Rückgängig", EM_UNDO MENUITEM SEPARATOR MENUITEM "Auss&chneiden", WM_CUT MENUITEM "&Kopieren", WM_COPY - MENUITEM "&Einfgen", WM_PASTE - MENUITEM "&Lschen", WM_CLEAR + MENUITEM "&Einfügen", WM_PASTE + MENUITEM "&Löschen", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "&Alles auswhlen", EM_SETSEL + MENUITEM "&Alles auswählen", EM_SETSEL END END @@ -43,11 +43,11 @@ SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN MENUITEM "&Wiederherstellen", SC_RESTORE MENUITEM "&Verschieben", SC_MOVE - MENUITEM "&Gre", SC_SIZE + MENUITEM "&Größe", SC_SIZE MENUITEM "Mi&nimieren", SC_MINIMIZE MENUITEM "Ma&ximieren", SC_MAXIMIZE MENUITEM SEPARATOR - MENUITEM "S&chlieen\tAlt+F4", SC_CLOSE + MENUITEM "S&chließen\tAlt+F4", SC_CLOSE END ///////////////////////////////////////////////////////////////////////////// diff --git a/dll/win32/user32/lang/el-GR.rc b/dll/win32/user32/lang/el-GR.rc index d1123f5a9b1..3285764351b 100644 --- a/dll/win32/user32/lang/el-GR.rc +++ b/dll/win32/user32/lang/el-GR.rc @@ -9,11 +9,11 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Επιλέξτε παράθυρο" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&’κυρο", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END ///////////////////////////////////////////////////////////////////////////// @@ -25,27 +25,27 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&", EM_UNDO + MENUITEM "&Αναίρεση", EM_UNDO MENUITEM SEPARATOR - MENUITEM "", WM_CUT - MENUITEM "&", WM_COPY - MENUITEM "&", WM_PASTE - MENUITEM "&", WM_CLEAR + MENUITEM "Αποκοπή", WM_CUT + MENUITEM "Αν&τιγραφή", WM_COPY + MENUITEM "&Εποκόληση", WM_PASTE + MENUITEM "&Διαγραφή", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "& ", EM_SETSEL + MENUITEM "Ε&πιλογή όλων", EM_SETSEL END END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&", 61728 - MENUITEM "&", 61456 - MENUITEM "&", 61440 - MENUITEM "&", 61472 - MENUITEM "&", 61488 + MENUITEM "&Επαναφορά", 61728 + MENUITEM "&Μετακίνηση", 61456 + MENUITEM "Μέ&γεθος", 61440 + MENUITEM "Ε&λαχιστοποίηση", 61472 + MENUITEM "Με&γιστοποίηση", 61488 MENUITEM SEPARATOR - MENUITEM "&\tAlt-F4", 61536 + MENUITEM "&Κλείσημο\tAlt-F4", 61536 END ///////////////////////////////////////////////////////////////////////////// @@ -55,20 +55,20 @@ END STRINGTABLE BEGIN - IDS_ERROR, "" + IDS_ERROR, "Σφάλμα" IDS_OK, "OK" - IDS_CANCEL, "" - IDS_ABORT, "&" - IDS_RETRY, "&" - IDS_IGNORE, "&" - IDS_YES, "&" - IDS_NO, "&" - IDS_HELP, "" - IDS_TRYAGAIN, "&" - IDS_CONTINUE, "&" + IDS_CANCEL, "’κυρο" + IDS_ABORT, "&Ματαίωση" + IDS_RETRY, "&Επανάληψη" + IDS_IGNORE, "Παρά&βλεψη" + IDS_YES, "&Ναι" + IDS_NO, "Ο&χι" + IDS_HELP, "Βοήθεια" + IDS_TRYAGAIN, "&Επανάληψη" + IDS_CONTINUE, "&Συνέχεια" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "& ..." + IDS_MDI_MOREWINDOWS, "&Περισσότερα παράθυρα..." END diff --git a/dll/win32/user32/lang/es-ES.rc b/dll/win32/user32/lang/es-ES.rc index 2e6438d8db0..dea892f6e37 100644 --- a/dll/win32/user32/lang/es-ES.rc +++ b/dll/win32/user32/lang/es-ES.rc @@ -41,7 +41,7 @@ SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN MENUITEM "&Restaurar", SC_RESTORE MENUITEM "&Mover", SC_MOVE - MENUITEM "Tamao", SC_SIZE + MENUITEM "Tamaño", SC_SIZE MENUITEM "Mi&nimizar", SC_MINIMIZE MENUITEM "Ma&ximizar", SC_MAXIMIZE MENUITEM SEPARATOR @@ -70,7 +70,7 @@ END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "&Ms Ventanas..." + IDS_MDI_MOREWINDOWS, "&Más Ventanas..." END diff --git a/dll/win32/user32/lang/fr-FR.rc b/dll/win32/user32/lang/fr-FR.rc index 2cca0493645..cc88709597b 100644 --- a/dll/win32/user32/lang/fr-FR.rc +++ b/dll/win32/user32/lang/fr-FR.rc @@ -13,7 +13,7 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Slectionnez la fentre" +CAPTION "Sélectionnez la fenêtre" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP @@ -36,7 +36,7 @@ BEGIN MENUITEM "C&oller", WM_PASTE MENUITEM "&Supprimer", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "&Tout slectionner", EM_SETSEL + MENUITEM "&Tout sélectionner", EM_SETSEL END END @@ -44,9 +44,9 @@ END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN MENUITEM "&Restaurer", SC_RESTORE - MENUITEM "&Dplacer", SC_MOVE + MENUITEM "&Déplacer", SC_MOVE MENUITEM "&Taille", SC_SIZE - MENUITEM "R&duire", SC_MINIMIZE + MENUITEM "Ré&duire", SC_MINIMIZE MENUITEM "A&grandir", SC_MAXIMIZE MENUITEM SEPARATOR MENUITEM "&Fermer\tAlt-F4", SC_CLOSE @@ -63,7 +63,7 @@ BEGIN IDS_OK, "OK" IDS_CANCEL, "Annuler" IDS_ABORT, "&Abandonner" - IDS_RETRY, "&Ressayer" + IDS_RETRY, "&Réessayer" IDS_IGNORE, "&Ignorer" IDS_YES, "&Oui" IDS_NO, "&Non" @@ -74,6 +74,6 @@ END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "Nouvelle &fentre..." + IDS_MDI_MOREWINDOWS, "Nouvelle &fenêtre..." END diff --git a/dll/win32/user32/lang/hu-HU.rc b/dll/win32/user32/lang/hu-HU.rc index 0af8c09ea09..6129914fcb7 100644 --- a/dll/win32/user32/lang/hu-HU.rc +++ b/dll/win32/user32/lang/hu-HU.rc @@ -17,7 +17,7 @@ CAPTION "Select Window" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Mgse", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Mégse", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END ///////////////////////////////////////////////////////////////////////////// @@ -31,25 +31,25 @@ BEGIN BEGIN MENUITEM "&Visszavon", EM_UNDO MENUITEM SEPARATOR - MENUITEM "K&ivgs", WM_CUT - MENUITEM "&Msol", WM_COPY + MENUITEM "K&ivágás", WM_CUT + MENUITEM "&Másol", WM_COPY MENUITEM "&Beilleszt", WM_PASTE - MENUITEM "&Trl", WM_CLEAR + MENUITEM "&Töröl", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "Mindet &Kijell", EM_SETSEL + MENUITEM "Mindet &Kijelöl", EM_SETSEL END END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&Vissza llt", 61728 - MENUITEM "t &helyez", 61456 - MENUITEM "&Mret", 61440 - MENUITEM "&Kis mret", 61472 - MENUITEM "&Nagy mret", 61488 + MENUITEM "&Vissza állít", 61728 + MENUITEM "Át &helyez", 61456 + MENUITEM "&Méret", 61440 + MENUITEM "&Kis méret", 61472 + MENUITEM "&Nagy méret", 61488 MENUITEM SEPARATOR - MENUITEM "&Bezr\tAlt-F4", 61536 + MENUITEM "&Bezár\tAlt-F4", 61536 END ///////////////////////////////////////////////////////////////////////////// @@ -61,20 +61,20 @@ STRINGTABLE BEGIN IDS_ERROR, "Hiba" IDS_OK, "OK" - IDS_CANCEL, "Mgse" - IDS_ABORT, "&Megszakt" - IDS_RETRY, "&jra" - IDS_IGNORE, "&Tovbb" + IDS_CANCEL, "Mégse" + IDS_ABORT, "&Megszakít" + IDS_RETRY, "&Újra" + IDS_IGNORE, "&Tovább" IDS_YES, "&Igen" IDS_NO, "&Nem" - IDS_HELP, "Sg" - IDS_TRYAGAIN, "&jra" + IDS_HELP, "Súgó" + IDS_TRYAGAIN, "&Újra" IDS_CONTINUE, "&Folytat" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "&Tbb ablak..." + IDS_MDI_MOREWINDOWS, "&Több ablak..." END diff --git a/dll/win32/user32/lang/ja-JP.rc b/dll/win32/user32/lang/ja-JP.rc index 90614bb15ca..c9fe0d557e5 100644 --- a/dll/win32/user32/lang/ja-JP.rc +++ b/dll/win32/user32/lang/ja-JP.rc @@ -9,11 +9,11 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 9, "MS UI Gothic" -CAPTION "EBhEI" +CAPTION "ウィンドウ選択" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "OK (&O)", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "LZ(&C)", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "キャンセル(&C)", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END ///////////////////////////////////////////////////////////////////////////// @@ -25,27 +25,27 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "ɖ߂(&U)", EM_UNDO + MENUITEM "元に戻す(&U)", EM_UNDO MENUITEM SEPARATOR - MENUITEM "؂(&T)", WM_CUT - MENUITEM "Rs[(&C)", WM_COPY - MENUITEM "\\t(&P)", WM_PASTE - MENUITEM "폜(&D)", WM_CLEAR + MENUITEM "切り取り(&T)", WM_CUT + MENUITEM "コピー(&C)", WM_COPY + MENUITEM "貼\り付け(&P)", WM_PASTE + MENUITEM "削除(&D)", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "ׂđI(&A)", EM_SETSEL + MENUITEM "すべて選択(&A)", EM_SETSEL END END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "̃TCYɖ߂(&R)", SC_RESTORE - MENUITEM "ړ(&M)", SC_MOVE - MENUITEM "TCYύX(&S)", SC_SIZE - MENUITEM "ŏ(&N)", SC_MINIMIZE - MENUITEM "ő剻(&X)", SC_MAXIMIZE + MENUITEM "元のサイズに戻す(&R)", SC_RESTORE + MENUITEM "移動(&M)", SC_MOVE + MENUITEM "サイズ変更(&S)", SC_SIZE + MENUITEM "最小化(&N)", SC_MINIMIZE + MENUITEM "最大化(&X)", SC_MAXIMIZE MENUITEM SEPARATOR - MENUITEM "‚(&C)\tAlt-F4", SC_CLOSE + MENUITEM "閉じる(&C)\tAlt-F4", SC_CLOSE END ///////////////////////////////////////////////////////////////////////////// @@ -55,21 +55,21 @@ END STRINGTABLE BEGIN - IDS_ERROR, "G[" + IDS_ERROR, "エラー" IDS_OK, "OK" - IDS_CANCEL, "LZ" - IDS_ABORT, "~(&A)" - IDS_RETRY, "Ďs(&R)" - IDS_IGNORE, "(&I)" - IDS_YES, "͂(&Y)" - IDS_NO, "(&N)" - IDS_HELP, "wv" - IDS_TRYAGAIN, "Ďs(&T)" - IDS_CONTINUE, "(&C)" + IDS_CANCEL, "キャンセル" + IDS_ABORT, "中止(&A)" + IDS_RETRY, "再試行(&R)" + IDS_IGNORE, "無視(&I)" + IDS_YES, "はい(&Y)" + IDS_NO, "いいえ(&N)" + IDS_HELP, "ヘルプ" + IDS_TRYAGAIN, "再試行する(&T)" + IDS_CONTINUE, "続ける(&C)" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "̑̃EBhE(M)..." + IDS_MDI_MOREWINDOWS, "その他のウィンドウ(M)..." END diff --git a/dll/win32/user32/lang/lt-LT.rc b/dll/win32/user32/lang/lt-LT.rc index 867bc42e33d..6da0739a928 100644 --- a/dll/win32/user32/lang/lt-LT.rc +++ b/dll/win32/user32/lang/lt-LT.rc @@ -1,7 +1,7 @@ /* - * Translation by Vytis "CMan" Girdijauskas (cman@cman.us) + * Translation by Vytis "CMan" Girdþijauskas (cman@cman.us) */ - + LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT ///////////////////////////////////////////////////////////////////////////// @@ -13,7 +13,7 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Pasirinkti lang" +CAPTION "Pasirinkti langà" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "Gerai", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP @@ -29,14 +29,14 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&Ataukti", EM_UNDO + MENUITEM "&Atðaukti", EM_UNDO MENUITEM SEPARATOR - MENUITEM "&Ikirpti", WM_CUT + MENUITEM "&Iðkirpti", WM_CUT MENUITEM "&Kopijuoti", WM_COPY - MENUITEM "&dti", WM_PASTE + MENUITEM "Á&dëti", WM_PASTE MENUITEM "&Trinti", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "Paymti &visk", EM_SETSEL + MENUITEM "Paþymëti &viskà", EM_SETSEL END END @@ -49,7 +49,7 @@ BEGIN MENUITEM "Su&skleisti", SC_MINIMIZE MENUITEM "Pa&didint", SC_MAXIMIZE MENUITEM SEPARATOR - MENUITEM "&Uverti\tAlt-F4", SC_CLOSE + MENUITEM "&Uþverti\tAlt-F4", SC_CLOSE END ///////////////////////////////////////////////////////////////////////////// @@ -68,12 +68,12 @@ BEGIN IDS_YES, "&Taip" IDS_NO, "&Ne" IDS_HELP, "Pagalba" - IDS_TRYAGAIN, "&Bandyti vl" - IDS_CONTINUE, "T&sti" + IDS_TRYAGAIN, "&Bandyti vël" + IDS_CONTINUE, "Tæ&sti" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "&Daugiau lang..." + IDS_MDI_MOREWINDOWS, "&Daugiau langø..." END diff --git a/dll/win32/user32/lang/nl-NL.rc b/dll/win32/user32/lang/nl-NL.rc index 8238d43ecae..141501a0e43 100644 --- a/dll/win32/user32/lang/nl-NL.rc +++ b/dll/win32/user32/lang/nl-NL.rc @@ -28,7 +28,7 @@ BEGIN MENUITEM "&Ongedaan maken", EM_UNDO MENUITEM SEPARATOR MENUITEM "K&nippen", WM_CUT - MENUITEM "&Kopiren", WM_COPY + MENUITEM "&Kopiëren", WM_COPY MENUITEM "&Plakken", WM_PASTE MENUITEM "&Verwijderen", WM_CLEAR MENUITEM SEPARATOR diff --git a/dll/win32/user32/lang/no-NO.rc b/dll/win32/user32/lang/no-NO.rc index 6d1f2268f7d..e207a9f8a03 100644 --- a/dll/win32/user32/lang/no-NO.rc +++ b/dll/win32/user32/lang/no-NO.rc @@ -45,7 +45,7 @@ SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN MENUITEM "&Gjenopprett", 61728 MENUITEM "&Flytt", 61456 - MENUITEM "&Strrelse", 61440 + MENUITEM "&Størrelse", 61440 MENUITEM "Mi&nimer", 61472 MENUITEM "&Maksimer", 61488 MENUITEM SEPARATOR @@ -68,7 +68,7 @@ BEGIN IDS_YES, "&Ja" IDS_NO, "&Nei" IDS_HELP, "Hjelp" - IDS_TRYAGAIN, "&Prv p nytt" + IDS_TRYAGAIN, "&Prøv på nytt" IDS_CONTINUE, "&Fortsett" END diff --git a/dll/win32/user32/lang/pl-PL.rc b/dll/win32/user32/lang/pl-PL.rc index 8a4a8897b9f..7fe3b32b658 100644 --- a/dll/win32/user32/lang/pl-PL.rc +++ b/dll/win32/user32/lang/pl-PL.rc @@ -1,4 +1,7 @@ -//Polish translation by Sebastian Gasiorek +/* + * translated by Sebastian Gasiorek + * UTF-8 conversion by Caemyr (May, 2011) + */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -32,7 +35,7 @@ BEGIN MENUITEM "&Wytnij", WM_CUT MENUITEM "&Kopiuj", WM_COPY MENUITEM "Wkl&ej", WM_PASTE - MENUITEM "&Usu", WM_CLEAR + MENUITEM "&Usuń", WM_CLEAR MENUITEM SEPARATOR MENUITEM "Zaznacz w&szystko", EM_SETSEL END @@ -41,8 +44,8 @@ END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&Przywr", 61728 - MENUITEM "Prz&enie", 61456 + MENUITEM "&Przywróć", 61728 + MENUITEM "Prz&enieś", 61456 MENUITEM "&Rozmiar", 61440 MENUITEM "&Minimalizuj", 61472 MENUITEM "Mak&symalizuj", 61488 @@ -57,22 +60,20 @@ END STRINGTABLE BEGIN - IDS_ERROR, "Bd" + IDS_ERROR, "Błąd" IDS_OK, "OK" IDS_CANCEL, "Anuluj" IDS_ABORT, "&Przerwij" - IDS_RETRY, "&Ponw prb" + IDS_RETRY, "&Ponów próbę" IDS_IGNORE, "&Ignoruj" IDS_YES, "&Tak" IDS_NO, "&Nie" IDS_HELP, "Pomoc" - IDS_TRYAGAIN, "&Ponw prb" + IDS_TRYAGAIN, "&Ponów próbę" IDS_CONTINUE, "&Kontynuuj" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "&Wicej okien..." + IDS_MDI_MOREWINDOWS, "&Więcej okien..." END - - diff --git a/dll/win32/user32/lang/ro-RO.rc b/dll/win32/user32/lang/ro-RO.rc index 23b6ef7f666..0527545d26e 100644 --- a/dll/win32/user32/lang/ro-RO.rc +++ b/dll/win32/user32/lang/ro-RO.rc @@ -5,8 +5,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL // Dialogs // -#pragma code_page(65001) - SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU @@ -75,4 +73,3 @@ BEGIN IDS_MDI_MOREWINDOWS, "&Mai multe ferestre..." END -#pragma code_page(default) diff --git a/dll/win32/user32/lang/ru-RU.rc b/dll/win32/user32/lang/ru-RU.rc index 071dbacbdc3..9b665fb84f8 100644 --- a/dll/win32/user32/lang/ru-RU.rc +++ b/dll/win32/user32/lang/ru-RU.rc @@ -9,11 +9,11 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Выбор окна" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Отмена", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END ///////////////////////////////////////////////////////////////////////////// @@ -25,27 +25,27 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&", EM_UNDO + MENUITEM "&Отменить", EM_UNDO MENUITEM SEPARATOR - MENUITEM "&", WM_CUT - MENUITEM "&", WM_COPY - MENUITEM "&", WM_PASTE - MENUITEM "&", WM_CLEAR + MENUITEM "&Вырезать", WM_CUT + MENUITEM "&Копировать", WM_COPY + MENUITEM "В&ставить", WM_PASTE + MENUITEM "&Удалить", WM_CLEAR MENUITEM SEPARATOR - MENUITEM " &", EM_SETSEL + MENUITEM "Выделить &все", EM_SETSEL END END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&", SC_RESTORE - MENUITEM "&", SC_MOVE - MENUITEM "&", SC_SIZE - MENUITEM "&", SC_MINIMIZE - MENUITEM "&", SC_MAXIMIZE + MENUITEM "&Востановить", SC_RESTORE + MENUITEM "&Переместить", SC_MOVE + MENUITEM "Р&азмер", SC_SIZE + MENUITEM "&Свернуть", SC_MINIMIZE + MENUITEM "&Развернуть", SC_MAXIMIZE MENUITEM SEPARATOR - MENUITEM "&\tAlt-F4", SC_CLOSE + MENUITEM "&Закрыть\tAlt-F4", SC_CLOSE END ///////////////////////////////////////////////////////////////////////////// @@ -55,21 +55,21 @@ END STRINGTABLE BEGIN - IDS_ERROR, "" + IDS_ERROR, "Ошибка" IDS_OK, "OK" - IDS_CANCEL, "" - IDS_ABORT, "&" - IDS_RETRY, "&" - IDS_IGNORE, "&" - IDS_YES, "&" - IDS_NO, "&" - IDS_HELP, "" - IDS_TRYAGAIN, "& " - IDS_CONTINUE, "&" + IDS_CANCEL, "Отмена" + IDS_ABORT, "&Прекратить" + IDS_RETRY, "П&овторить" + IDS_IGNORE, "&Игнорировать" + IDS_YES, "&Да" + IDS_NO, "&Нет" + IDS_HELP, "Справка" + IDS_TRYAGAIN, "&Повторить позднее" + IDS_CONTINUE, "П&родолжить" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "& ..." + IDS_MDI_MOREWINDOWS, "&Другие окна..." END diff --git a/dll/win32/user32/lang/sk-SK.rc b/dll/win32/user32/lang/sk-SK.rc index acfb599095d..04e87fadcb2 100644 --- a/dll/win32/user32/lang/sk-SK.rc +++ b/dll/win32/user32/lang/sk-SK.rc @@ -13,11 +13,11 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Vber okna" +CAPTION "Výber okna" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Zrui", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Zrušiť", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END ///////////////////////////////////////////////////////////////////////////// @@ -29,27 +29,27 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&Sp", EM_UNDO + MENUITEM "&Späť", EM_UNDO MENUITEM SEPARATOR - MENUITEM "Vystri&hn", WM_CUT - MENUITEM "&Koprova", WM_COPY - MENUITEM "&Prilepi", WM_PASTE - MENUITEM "&Odstrni", WM_CLEAR + MENUITEM "Vystri&hnúť", WM_CUT + MENUITEM "&Kopírovať", WM_COPY + MENUITEM "&Prilepiť", WM_PASTE + MENUITEM "&Odstrániť", WM_CLEAR MENUITEM SEPARATOR - MENUITEM "Vybra &vetko", EM_SETSEL + MENUITEM "Vybrať &všetko", EM_SETSEL END END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&Obnovi", SC_RESTORE - MENUITEM "&Premiestni", SC_MOVE - MENUITEM "&Vekos", SC_SIZE - MENUITEM "&Minimalizova", SC_MINIMIZE - MENUITEM "M&aximalizova", SC_MAXIMIZE + MENUITEM "&Obnoviť", SC_RESTORE + MENUITEM "&Premiestniť", SC_MOVE + MENUITEM "&Veľkosť", SC_SIZE + MENUITEM "&Minimalizovať", SC_MINIMIZE + MENUITEM "M&aximalizovať", SC_MAXIMIZE MENUITEM SEPARATOR - MENUITEM "&Zavrie\tAlt-F4", SC_CLOSE + MENUITEM "&Zavrieť\tAlt-F4", SC_CLOSE END ///////////////////////////////////////////////////////////////////////////// @@ -61,15 +61,15 @@ STRINGTABLE BEGIN IDS_ERROR, "Chyba" IDS_OK, "OK" - IDS_CANCEL, "Zrui" - IDS_ABORT, "&Prerui" + IDS_CANCEL, "Zrušiť" + IDS_ABORT, "&Prerušiť" IDS_RETRY, "&Znova" - IDS_IGNORE, "&Ignorova" - IDS_YES, "n&o" + IDS_IGNORE, "&Ignorovať" + IDS_YES, "Án&o" IDS_NO, "&Nie" IDS_HELP, "Pomoc" - IDS_TRYAGAIN, "&Sksi znova" - IDS_CONTINUE, "&Pokraova" + IDS_TRYAGAIN, "&Skúsiť znova" + IDS_CONTINUE, "&Pokračovať" END STRINGTABLE diff --git a/dll/win32/user32/lang/sv-SE.rc b/dll/win32/user32/lang/sv-SE.rc index b2e4635144d..cc158549695 100644 --- a/dll/win32/user32/lang/sv-SE.rc +++ b/dll/win32/user32/lang/sv-SE.rc @@ -29,7 +29,7 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Vlj fnster" +CAPTION "Välj fönster" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP @@ -45,7 +45,7 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&ngra", EM_UNDO + MENUITEM "&Ångra", EM_UNDO MENUITEM SEPARATOR MENUITEM "&Klipp ut", WM_CUT MENUITEM "K&opiera", WM_COPY @@ -59,13 +59,13 @@ END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&terstll", 61728 + MENUITEM "&Återställ", 61728 MENUITEM "&Flytta", 61456 MENUITEM "S&torlek", 61440 MENUITEM "&Minimera", 61472 MENUITEM "Ma&ximera", 61488 MENUITEM SEPARATOR - MENUITEM "&Stng\tAlt-F4", 61536 + MENUITEM "&Stäng\tAlt-F4", 61536 END ///////////////////////////////////////////////////////////////////////////// @@ -79,17 +79,17 @@ BEGIN IDS_OK, "OK" IDS_CANCEL, "Avbryt" IDS_ABORT, "&Avbryt" - IDS_RETRY, "&Frsk igen" + IDS_RETRY, "&Försök igen" IDS_IGNORE, "&Ignorera" IDS_YES, "&Ja" IDS_NO, "&Nej" - IDS_HELP, "Hjlp" - IDS_TRYAGAIN, "&Frsk igen" - IDS_CONTINUE, "F&ortstt" + IDS_HELP, "Hjälp" + IDS_TRYAGAIN, "&Försök igen" + IDS_CONTINUE, "F&ortsätt" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "&Fler fnster..." + IDS_MDI_MOREWINDOWS, "&Fler fönster..." END diff --git a/dll/win32/user32/lang/uk-UA.rc b/dll/win32/user32/lang/uk-UA.rc index 6fd31b0fea3..ac231aec074 100644 --- a/dll/win32/user32/lang/uk-UA.rc +++ b/dll/win32/user32/lang/uk-UA.rc @@ -9,11 +9,11 @@ SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION " " +CAPTION "Вибір вікна" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Скасувати", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END ///////////////////////////////////////////////////////////////////////////// @@ -25,27 +25,27 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN POPUP "DUMMY" BEGIN - MENUITEM "&", EM_UNDO + MENUITEM "&Скасувати", EM_UNDO MENUITEM SEPARATOR - MENUITEM "&", WM_CUT - MENUITEM "&", WM_COPY - MENUITEM "&", WM_PASTE - MENUITEM "&", WM_CLEAR + MENUITEM "&Вирізати", WM_CUT + MENUITEM "&Копіювати", WM_COPY + MENUITEM "Вст&авити", WM_PASTE + MENUITEM "В&идалити", WM_CLEAR MENUITEM SEPARATOR - MENUITEM " &", EM_SETSEL + MENUITEM "Виділити вс&е", EM_SETSEL END END SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE BEGIN - MENUITEM "&³", SC_RESTORE - MENUITEM "&", SC_MOVE - MENUITEM "&", SC_SIZE - MENUITEM "&", SC_MINIMIZE - MENUITEM "&", SC_MAXIMIZE + MENUITEM "&Відновити", SC_RESTORE + MENUITEM "П&еремістити", SC_MOVE + MENUITEM "Роз&мір", SC_SIZE + MENUITEM "З&горнути", SC_MINIMIZE + MENUITEM "&Розгорнути", SC_MAXIMIZE MENUITEM SEPARATOR - MENUITEM "&\tAlt-F4", SC_CLOSE + MENUITEM "&Закрити\tAlt-F4", SC_CLOSE END ///////////////////////////////////////////////////////////////////////////// @@ -55,21 +55,21 @@ END STRINGTABLE BEGIN - IDS_ERROR, "" + IDS_ERROR, "Помилка" IDS_OK, "OK" - IDS_CANCEL, "" - IDS_ABORT, "&" - IDS_RETRY, "&" - IDS_IGNORE, "&" - IDS_YES, "&" - IDS_NO, "&" - IDS_HELP, "" - IDS_TRYAGAIN, "&" - IDS_CONTINUE, "&" + IDS_CANCEL, "Скасувати" + IDS_ABORT, "П&ерервати" + IDS_RETRY, "&Повторити" + IDS_IGNORE, "Пр&опустити" + IDS_YES, "&Так" + IDS_NO, "Н&і" + IDS_HELP, "Довідка" + IDS_TRYAGAIN, "По&вторити" + IDS_CONTINUE, "&Продовжити" END STRINGTABLE BEGIN - IDS_MDI_MOREWINDOWS, "& ..." + IDS_MDI_MOREWINDOWS, "Ус&і вікна..." END diff --git a/dll/win32/user32/misc/display.c b/dll/win32/user32/misc/display.c index af430b3bbc1..2773cd09f51 100644 --- a/dll/win32/user32/misc/display.c +++ b/dll/win32/user32/misc/display.c @@ -83,7 +83,7 @@ WINAPI EnumDisplayDevicesW( LPCWSTR lpDevice, DWORD iDevNum, - PDISPLAY_DEVICE lpDisplayDevice, + PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags) { UNICODE_STRING Device; diff --git a/dll/win32/user32/user32.rc b/dll/win32/user32/user32.rc index 40e4bbe04df..51cecf10c97 100644 --- a/dll/win32/user32/user32.rc +++ b/dll/win32/user32/user32.rc @@ -112,6 +112,7 @@ OBM_OLD_CLOSE BITMAP "resources/obm_old_close.bmp" // // Languages // +#pragma code_page(65001) // UTF-8 #include "lang/bg-BG.rc" #include "lang/cs-CZ.rc" @@ -124,7 +125,7 @@ OBM_OLD_CLOSE BITMAP "resources/obm_old_close.bmp" #include "lang/hu-HU.rc" #include "lang/id-ID.rc" #include "lang/it-IT.rc" -//#include "lang/ja-JP.rc" +#include "lang/ja-JP.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" diff --git a/dll/win32/user32/windows/cursoricon.c b/dll/win32/user32/windows/cursoricon.c index ce5a55fb456..e3c5ca13b29 100644 --- a/dll/win32/user32/windows/cursoricon.c +++ b/dll/win32/user32/windows/cursoricon.c @@ -1238,6 +1238,19 @@ BOOL WINAPI DrawIcon( HDC hdc, INT x, INT y, HICON hIcon ) return DrawIconEx( hdc, x, y, hIcon, 0, 0, 0, 0, DI_NORMAL | DI_COMPAT | DI_DEFAULTSIZE ); } +/*********************************************************************** + * SetCursor (USER32.@) + * + * Set the cursor shape. + * + * RETURNS + * A handle to the previous cursor shape. + */ +HCURSOR WINAPI /*DECLSPEC_HOTPATCH*/ SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ ) +{ + return NtUserSetCursor(hCursor); +} + /*********************************************************************** * ShowCursor (USER32.@) */ @@ -1260,6 +1273,23 @@ HCURSOR WINAPI GetCursor(void) } +/*********************************************************************** + * ClipCursor (USER32.@) + */ +BOOL WINAPI /*DECLSPEC_HOTPATCH*/ ClipCursor( const RECT *rect ) +{ + return NtUserClipCursor((RECT *)rect); +} + + +/*********************************************************************** + * GetClipCursor (USER32.@) + */ +BOOL WINAPI /*DECLSPEC_HOTPATCH*/ GetClipCursor( RECT *rect ) +{ + return NtUserGetClipCursor(rect); +} + /*********************************************************************** * SetSystemCursor (USER32.@) @@ -1468,7 +1498,7 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo) return NULL; } } - else + else { mask = CreateBitmap( width, height * 2, 1, 1, NULL ); if(!mask) @@ -1739,7 +1769,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, if (is_dib_monochrome(fix_info)) hbitmap = CreateBitmap(new_width, new_height, 1, 1, NULL); else - hbitmap = CreateCompatibleBitmap(screen_dc, new_width, new_height); + hbitmap = CreateCompatibleBitmap(screen_dc, new_width, new_height); } orig_bm = SelectObject(screen_mem_dc, hbitmap); @@ -1949,7 +1979,7 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx, { /* Look if the colors of the DIB are black and white */ - monochrome = + monochrome = (bi->bmiColors[0].rgbRed == 0xff && bi->bmiColors[0].rgbGreen == 0xff && bi->bmiColors[0].rgbBlue == 0xff diff --git a/dll/win32/user32/windows/defwnd.c b/dll/win32/user32/windows/defwnd.c index 83155b66ca6..e8fda2ffb07 100644 --- a/dll/win32/user32/windows/defwnd.c +++ b/dll/win32/user32/windows/defwnd.c @@ -27,10 +27,6 @@ void MENU_EndMenu( HWND ); /* GLOBALS *******************************************************************/ -/* Bits in the dwKeyData */ -#define KEYDATA_ALT 0x2000 -#define KEYDATA_PREVSTATE 0x4000 - static short iF10Key = 0; static short iMenuSysKey = 0; @@ -293,8 +289,9 @@ DefWndStartSizeMove(HWND hWnd, PWND Wnd, WPARAM wParam, POINT *capturePoint) pt.x = pt.y = 0; while(!hittest) { - if (GetMessageW(&msg, NULL, 0, 0) <= 0) - break; + if (!GetMessageW(&msg, NULL, 0, 0)) break; //return 0; + if (CallMsgFilterW( &msg, MSGF_SIZE )) continue; + switch(msg.message) { case WM_MOUSEMOVE: @@ -330,8 +327,13 @@ DefWndStartSizeMove(HWND hWnd, PWND Wnd, WPARAM wParam, POINT *capturePoint) pt.y =(rectWindow.top+rectWindow.bottom)/2; break; case VK_RETURN: - case VK_ESCAPE: return 0; + case VK_ESCAPE: + return 0; } + default: + TranslateMessage( &msg ); + DispatchMessageW( &msg ); + break; } } *capturePoint = pt; @@ -555,8 +557,8 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam) { int dx = 0, dy = 0; - if (GetMessageW(&msg, 0, 0, 0) <= 0) - break; + if (!GetMessageW(&msg, 0, 0, 0)) break; + if (CallMsgFilterW( &msg, MSGF_SIZE )) continue; /* Exit on button-up, Return, or Esc */ if ((msg.message == WM_LBUTTONUP) || @@ -572,7 +574,11 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam) } if ((msg.message != WM_KEYDOWN) && (msg.message != WM_MOUSEMOVE)) - continue; /* We are not interested in other messages */ + { + TranslateMessage( &msg ); + DispatchMessageW( &msg ); + continue; /* We are not interested in other messages */ + } pt = msg.pt; @@ -747,6 +753,7 @@ DefWndTrackScrollBar(HWND Wnd, WPARAM wParam, POINT Pt) ScrollTrackScrollBar(Wnd, ScrollBar, Pt ); } +LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam); LRESULT DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) @@ -821,15 +828,16 @@ DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) case SC_NEXTWINDOW: case SC_PREVWINDOW: - FIXME("Implement Alt-Tab!!! wParam 0x%x lParam 0x%x\n",wParam,lParam); + DoAppSwitch( wParam, lParam); break; case SC_HOTKEY: { HWND hwnd, hWndLastActive; + PWND pWnd; hwnd = (HWND)lParam; - PWND pWnd = ValidateHwnd(hwnd); + pWnd = ValidateHwnd(hwnd); if (pWnd) { hWndLastActive = GetLastActivePopup(hwnd); @@ -921,8 +929,8 @@ DefWndHandleWindowPosChanged(HWND hWnd, WINDOWPOS* Pos) HBRUSH DefWndControlColor(HDC hDC, UINT ctlType) { - if (CTLCOLOR_SCROLLBAR == ctlType) - { + if (ctlType == CTLCOLOR_SCROLLBAR) + { HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR); COLORREF bk = GetSysColor(COLOR_3DHILIGHT); SetTextColor(hDC, GetSysColor(COLOR_3DFACE)); @@ -932,37 +940,24 @@ DefWndControlColor(HDC hDC, UINT ctlType) * we better use 0x55aa bitmap brush to make scrollbar's background * look different from the window background. */ - if (bk == GetSysColor(COLOR_WINDOW)) - { - static const WORD wPattern55AA[] = - { - 0x5555, 0xaaaa, 0x5555, 0xaaaa, - 0x5555, 0xaaaa, 0x5555, 0xaaaa - }; - static HBITMAP hPattern55AABitmap = NULL; - static HBRUSH hPattern55AABrush = NULL; - if (hPattern55AABrush == NULL) - { - hPattern55AABitmap = CreateBitmap(8, 8, 1, 1, wPattern55AA); - hPattern55AABrush = CreatePatternBrush(hPattern55AABitmap); - } - return hPattern55AABrush; - } - UnrealizeObject(hb); + if ( bk == GetSysColor(COLOR_WINDOW)) + return gpsi->hbrGray; + + UnrealizeObject( hb ); return hb; - } + } SetTextColor(hDC, GetSysColor(COLOR_WINDOWTEXT)); - if ((CTLCOLOR_EDIT == ctlType) || (CTLCOLOR_LISTBOX == ctlType)) - { + if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX)) + { SetBkColor(hDC, GetSysColor(COLOR_WINDOW)); - } + } else - { + { SetBkColor(hDC, GetSysColor(COLOR_3DFACE)); return GetSysColorBrush(COLOR_3DFACE); - } + } return GetSysColorBrush(COLOR_WINDOW); } @@ -1413,10 +1408,10 @@ User32DefWindowProc(HWND hWnd, case WM_SYSKEYDOWN: { - if (HIWORD(lParam) & KEYDATA_ALT) + if (HIWORD(lParam) & KF_ALTDOWN) { /* Previous state, if the key was down before this message, this is a cheap way to ignore autorepeat keys. */ - if ( !(HIWORD(lParam) & KEYDATA_PREVSTATE) ) + if ( !(HIWORD(lParam) & KF_REPEAT) ) { if ( ( wParam == VK_MENU || wParam == VK_LMENU || @@ -1484,7 +1479,7 @@ User32DefWindowProc(HWND hWnd, PostMessageW( hWnd, WM_SYSCOMMAND, SC_RESTORE, 0L ); break; } - if ((HIWORD(lParam) & KEYDATA_ALT) && wParam) + if ((HIWORD(lParam) & KF_ALTDOWN) && wParam) { if (wParam == VK_TAB || wParam == VK_ESCAPE) break; if (wParam == VK_SPACE && (GetWindowLongPtrW( hWnd, GWL_STYLE ) & WS_CHILD)) diff --git a/dll/win32/user32/windows/dialog.c b/dll/win32/user32/windows/dialog.c index ac36d7366cd..b967dfc8e1c 100644 --- a/dll/win32/user32/windows/dialog.c +++ b/dll/win32/user32/windows/dialog.c @@ -18,7 +18,7 @@ */ /* * PROJECT: ReactOS user32.dll - * FILE: lib/user32/windows/dialog.c + * FILE: dll/win32/user32/windows/dialog.c * PURPOSE: Input * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) * Thomas Weidenmueller (w3seek@users.sourceforge.net) @@ -39,6 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(user32); #define DF_END 0x0001 #define DF_OWNERENABLED 0x0002 +#define DF_DIALOGACTIVE 0x4000 // ReactOS #define DWLP_ROS_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR)) #define GETDLGINFO(hwnd) DIALOG_get_info(hwnd, FALSE) #define SETDLGINFO(hwnd, info) SetWindowLongPtrW((hwnd), DWLP_ROS_DIALOGINFO, (LONG_PTR)(info)) @@ -1131,6 +1132,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont ); if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu ); HeapFree( GetProcessHeap(), 0, dlgInfo ); + NtUserSetThreadState(0,DF_DIALOGACTIVE); NtUserCallHwndParam( hwnd, 0, HWNDPARAM_ROUTINE_SETDIALOGPOINTER ); } /* Window clean-up */ @@ -1141,6 +1143,13 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, return DefWindowProcA( hwnd, msg, wParam, lParam ); case WM_ACTIVATE: + { // ReactOS + DWORD dwSetFlag; + HWND hwndparent = DIALOG_FindMsgDestination( hwnd ); + // if WA_CLICK/ACTIVE ? set dialog is active. + dwSetFlag = wParam ? DF_DIALOGACTIVE : 0; + if (hwndparent != hwnd) NtUserSetThreadState(dwSetFlag, DF_DIALOGACTIVE); + } if (wParam) DEFDLG_RestoreFocus( hwnd ); else DEFDLG_SaveFocus( hwnd ); return 0; diff --git a/dll/win32/user32/windows/input.c b/dll/win32/user32/windows/input.c index 9eadc0e81c2..b761d26760b 100644 --- a/dll/win32/user32/windows/input.c +++ b/dll/win32/user32/windows/input.c @@ -181,7 +181,6 @@ GetKeyNameTextW(LONG lParam, return NtUserGetKeyNameText( lParam, lpString, nSize ); } - /* * @implemented */ @@ -191,7 +190,6 @@ GetKeyState(int nVirtKey) return (SHORT) NtUserGetKeyState((DWORD) nVirtKey); } - /* * @implemented */ @@ -225,16 +223,23 @@ GetKeyboardType(int nTypeFlag) return (int)NtUserCallOneParam((DWORD_PTR) nTypeFlag, ONEPARAM_ROUTINE_GETKEYBOARDTYPE); } - /* * @implemented */ BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii) { - return NtUserGetLastInputInfo(plii); -} + TRACE("%p\n", plii); + if (plii->cbSize != sizeof (*plii) ) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + plii->dwTime = gpsi->dwLastRITEventTickCount; + return TRUE; +} /* * @implemented @@ -248,7 +253,6 @@ LoadKeyboardLayoutA(LPCSTR pwszKLID, Flags); } - /* * @implemented */ @@ -263,7 +267,6 @@ LoadKeyboardLayoutW(LPCWSTR pwszKLID, Flags); } - /* * @implemented */ @@ -274,7 +277,6 @@ MapVirtualKeyA(UINT uCode, return MapVirtualKeyExA( uCode, uMapType, GetKeyboardLayout( 0 ) ); } - /* * @implemented */ diff --git a/dll/win32/user32/windows/menu.c b/dll/win32/user32/windows/menu.c index 34eaac9825c..11b9b1f9500 100644 --- a/dll/win32/user32/windows/menu.c +++ b/dll/win32/user32/windows/menu.c @@ -766,7 +766,7 @@ static void FASTCALL MenuCalcItemSize( HDC hdc, PROSMENUITEMINFO lpitem, PROSMEN mis.itemWidth = 0; SendMessageW( hwndOwner, WM_MEASUREITEM, 0, (LPARAM)&mis ); /* Tests reveal that Windows ( Win95 thru WinXP) adds twice the average - * width of a menufont character to the width of an owner-drawn menu. + * width of a menufont character to the width of an owner-drawn menu. */ lpitem->Rect.right += mis.itemWidth + 2 * MenuCharSize.cx; @@ -846,7 +846,7 @@ static void FASTCALL MenuCalcItemSize( HDC hdc, PROSMENUITEMINFO lpitem, PROSMEN } if (menuBar) { txtheight = DrawTextW( hdc, lpitem->dwTypeData, -1, &rc, - DT_SINGLELINE|DT_CALCRECT); + DT_SINGLELINE|DT_CALCRECT); lpitem->Rect.right += rc.right - rc.left; itemheight = max( max( itemheight, txtheight), GetSystemMetrics( SM_CYMENU) - 1); @@ -1148,7 +1148,7 @@ static void FASTCALL MenuDrawMenuItem(HWND hWnd, PROSMENUINFO MenuInfo, HWND Wnd SystemParametersInfoW (SPI_GETFLATMENU, 0, &flat_menu, 0); bkgnd = (menuBar && flat_menu) ? COLOR_MENUBAR : COLOR_MENU; - + /* Setup colors */ if (lpitem->fState & MF_HILITE) @@ -1308,7 +1308,7 @@ static void FASTCALL MenuDrawMenuItem(HWND hWnd, PROSMENUINFO MenuInfo, HWND Wnd * Custom checkmark bitmaps are monochrome but not always 1bpp. */ if( !(MenuInfo->dwStyle & MNS_NOCHECK)) { - bm = (lpitem->fState & MF_CHECKED) ? lpitem->hbmpChecked : + bm = (lpitem->fState & MF_CHECKED) ? lpitem->hbmpChecked : lpitem->hbmpUnchecked; if (bm) /* we have a custom bitmap */ { @@ -1479,7 +1479,7 @@ static void FASTCALL MenuDrawPopupMenu(HWND hwnd, HDC hdc, HMENU hmenu ) if (MenuGetRosMenuInfo(&MenuInfo, hmenu) && MenuInfo.MenuItemCount) { UINT u; - + MenuInitRosMenuItemInfo(&ItemInfo); for (u = 0; u < MenuInfo.MenuItemCount; u++) @@ -1791,7 +1791,6 @@ MenuMoveSelection(HWND WndOwner, PROSMENUINFO MenuInfo, INT Offset) // LRESULT WINAPI PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam) { - TRACE("YES! hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, wParam, lParam); #ifdef __REACTOS__ PWND pWnd; @@ -1805,6 +1804,8 @@ LRESULT WINAPI PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM l } #endif + TRACE("YES! hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, wParam, lParam); + switch(Message) { case WM_CREATE: @@ -1867,7 +1868,7 @@ LRESULT WINAPI PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM l break; case MM_GETMENUHANDLE: - case MN_GETHMENU: + case MN_GETHMENU: return GetWindowLongPtrA(Wnd, 0); default: @@ -1879,7 +1880,6 @@ LRESULT WINAPI PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM l LRESULT WINAPI PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam) { - TRACE("hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, wParam, lParam); #ifdef __REACTOS__ // Do this now, remove after Server side is fixed. PWND pWnd; @@ -1893,6 +1893,8 @@ PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam) } #endif + TRACE("hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, wParam, lParam); + switch(Message) { case WM_CREATE: @@ -2913,8 +2915,8 @@ MenuDoNextMenu(MTRACKER* Mt, UINT Vk, UINT wFlags) if (NewWnd != Mt->OwnerWnd) { Mt->OwnerWnd = NewWnd; - SetCapture(Mt->OwnerWnd); - (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt->OwnerWnd); + (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt->OwnerWnd); // 1 + SetCapture(Mt->OwnerWnd); // 2 } Mt->TopMenu = Mt->CurrentMenu = NewMenu; /* all subpopups are hidden */ @@ -2936,37 +2938,35 @@ MenuDoNextMenu(MTRACKER* Mt, UINT Vk, UINT wFlags) * going to hide it anyway. */ static BOOL FASTCALL -MenuSuspendPopup(MTRACKER* Mt, UINT Message) +MenuSuspendPopup(MTRACKER* Mt, UINT uMsg) { - MSG Msg; + MSG msg; - Msg.hwnd = Mt->OwnerWnd; + msg.hwnd = Mt->OwnerWnd; - PeekMessageW(&Msg, 0, 0, 0, PM_NOYIELD | PM_REMOVE); - Mt->TrackFlags |= TF_SKIPREMOVE; + PeekMessageW( &msg, 0, uMsg, uMsg, PM_NOYIELD | PM_REMOVE); // ported incorrectly since 8317 GvG +// Mt->TrackFlags |= TF_SKIPREMOVE; // This sends TrackMenu into a loop with arrow keys!!!! - switch (Message) + switch( uMsg ) { - case WM_KEYDOWN: - PeekMessageW(&Msg, 0, 0, 0, PM_NOYIELD | PM_NOREMOVE); - if (WM_KEYUP == Msg.message || WM_PAINT == Msg.message) - { - PeekMessageW(&Msg, 0, 0, 0, PM_NOYIELD | PM_REMOVE); - PeekMessageW(&Msg, 0, 0, 0, PM_NOYIELD | PM_NOREMOVE); - if (WM_KEYDOWN == Msg.message - && (VK_LEFT == Msg.wParam || VK_RIGHT == Msg.wParam)) - { - Mt->TrackFlags |= TF_SUSPENDPOPUP; - return TRUE; - } - } - break; + case WM_KEYDOWN: + PeekMessageW( &msg, 0, 0, 0, PM_NOYIELD | PM_NOREMOVE); + if( msg.message == WM_KEYUP || msg.message == WM_PAINT ) + { + PeekMessageW( &msg, 0, 0, 0, PM_NOYIELD | PM_REMOVE); + PeekMessageW( &msg, 0, 0, 0, PM_NOYIELD | PM_NOREMOVE); + if( msg.message == WM_KEYDOWN && + (msg.wParam == VK_LEFT || msg.wParam == VK_RIGHT)) + { + Mt->TrackFlags |= TF_SUSPENDPOPUP; + return TRUE; + } + } + break; } - - /* failures go through this */ - Mt->TrackFlags &= ~TF_SUSPENDPOPUP; - - return FALSE; + /* failures go through this */ + Mt->TrackFlags &= ~TF_SUSPENDPOPUP; + return FALSE; } /*********************************************************************** @@ -3029,14 +3029,14 @@ MenuKeyLeft(MTRACKER* Mt, UINT Flags) } /* Try to move 1 column left (if possible) */ - if (NO_SELECTED_ITEM != (PrevCol = MenuGetStartOfPrevColumn(&MenuInfo))) - { - if (MenuGetRosMenuInfo(&MenuInfo, Mt->CurrentMenu)) - { + if ( (PrevCol = MenuGetStartOfPrevColumn(&MenuInfo)) != NO_SELECTED_ITEM) + { + if (MenuGetRosMenuInfo(&MenuInfo, Mt->CurrentMenu)) + { MenuSelectItem(Mt->OwnerWnd, &MenuInfo, PrevCol, TRUE, 0); - } - return; - } + } + return; + } /* close topmost popup */ while (MenuTmp != Mt->CurrentMenu) @@ -3056,16 +3056,16 @@ MenuKeyLeft(MTRACKER* Mt, UINT Flags) { return; } - if ((MenuPrev == Mt->TopMenu) && 0 == (TopMenuInfo.Flags & MF_POPUP)) + if ((MenuPrev == Mt->TopMenu) && !(TopMenuInfo.Flags & MF_POPUP)) { /* move menu bar selection if no more popups are left */ - if (! MenuDoNextMenu(Mt, VK_LEFT, Flags)) + if (!MenuDoNextMenu(Mt, VK_LEFT, Flags)) { MenuMoveSelection(Mt->OwnerWnd, &TopMenuInfo, ITEM_PREV); } - if (MenuPrev != MenuTmp || 0 != (Mt->TrackFlags & TF_SUSPENDPOPUP)) + if (MenuPrev != MenuTmp || Mt->TrackFlags & TF_SUSPENDPOPUP) { /* A sublevel menu was displayed - display the next one * unless there is another displacement coming up */ @@ -3110,23 +3110,23 @@ static void FASTCALL MenuKeyRight(MTRACKER *Mt, UINT Flags) if (hmenutmp != Mt->CurrentMenu) return; } - if (! MenuGetRosMenuInfo(&CurrentMenuInfo, Mt->CurrentMenu)) + if (! MenuGetRosMenuInfo(&CurrentMenuInfo, Mt->CurrentMenu)) { return; } - /* Check to see if there's another column */ - if (NO_SELECTED_ITEM != (NextCol = MenuGetStartOfNextColumn(&CurrentMenuInfo))) + /* Check to see if there's another column */ + if ( (NextCol = MenuGetStartOfNextColumn(&CurrentMenuInfo)) != NO_SELECTED_ITEM) { - TRACE("Going to %d.\n", NextCol); - if (MenuGetRosMenuInfo(&MenuInfo, Mt->CurrentMenu)) - { + TRACE("Going to %d.\n", NextCol); + if (MenuGetRosMenuInfo(&MenuInfo, Mt->CurrentMenu)) + { MenuSelectItem(Mt->OwnerWnd, &MenuInfo, NextCol, TRUE, 0); - } - return; + } + return; } - if (0 == (MenuInfo.Flags & MF_POPUP)) /* menu bar tracking */ + if (!(MenuInfo.Flags & MF_POPUP)) /* menu bar tracking */ { if (Mt->CurrentMenu != Mt->TopMenu) { @@ -3325,8 +3325,8 @@ static INT FASTCALL MenuTrackMenu(HMENU hmenu, UINT wFlags, INT x, INT y, if (hmenu) fEndMenu |= !MenuMouseMove( &mt, hmenu, wFlags ); - } /* switch(msg.message) - mouse */ - } + } /* switch(msg.message) - mouse */ + } else if ((msg.message >= WM_KEYFIRST) && (msg.message <= WM_KEYLAST)) { fRemove = TRUE; /* Keyboard messages are always removed */ @@ -3339,7 +3339,7 @@ static INT FASTCALL MenuTrackMenu(HMENU hmenu, UINT wFlags, INT x, INT y, case VK_MENU: case VK_F10: fEndMenu = TRUE; - break; + break; case VK_HOME: case VK_END: @@ -3516,7 +3516,7 @@ static INT FASTCALL MenuTrackMenu(HMENU hmenu, UINT wFlags, INT x, INT y, static BOOL FASTCALL MenuInitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags) { ROSMENUINFO MenuInfo; - + TRACE("hwnd=%p hmenu=%p\n", hWnd, hMenu); HideCaret(0); @@ -3668,7 +3668,6 @@ VOID MenuTrackKbdMenuBar(HWND hwnd, UINT wParam, WCHAR wChar) track_menu: MenuTrackMenu( hTrackMenu, wFlags, 0, 0, hwnd, NULL ); MenuExitTracking( hwnd, FALSE ); - } /********************************************************************** @@ -3680,7 +3679,7 @@ BOOL WINAPI TrackPopupMenuEx( HMENU Menu, UINT Flags, int x, int y, BOOL ret = FALSE; ROSMENUINFO MenuInfo; - if (!IsMenu(Menu)) + if (!IsMenu(Menu)) { SetLastError( ERROR_INVALID_MENU_HANDLE ); return FALSE; @@ -3873,10 +3872,10 @@ NTSTATUS WINAPI User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength) { PLOADMENU_CALLBACK_ARGUMENTS Common; - LRESULT Result; + LRESULT Result; Common = (PLOADMENU_CALLBACK_ARGUMENTS) Arguments; - + Result = (LRESULT)LoadMenuW( Common->hModule, IS_INTRESOURCE(Common->MenuName[0]) ? MAKEINTRESOURCE(Common->MenuName[0]) : @@ -4153,6 +4152,25 @@ EndMenu(VOID) return TRUE; } +// So this one maybe one day it will be a callback! +BOOL WINAPI HiliteMenuItem( HWND hWnd, HMENU hMenu, UINT wItemID, + UINT wHilite ) +{ + ROSMENUINFO MenuInfo; + ROSMENUITEMINFO mii; + TRACE("(%p, %p, %04x, %04x);\n", hWnd, hMenu, wItemID, wHilite); + if (!hWnd) + { + SetLastError(ERROR_INVALID_WINDOW_HANDLE); + return FALSE; + } + if (!NtUserMenuItemInfo(hMenu, wItemID, wHilite, &mii, FALSE)) return FALSE; + if (!NtUserMenuInfo(hMenu, &MenuInfo, FALSE)) return FALSE; + if (MenuInfo.FocusedItem == wItemID) return TRUE; + MenuHideSubPopups( hWnd, &MenuInfo, FALSE, 0 ); + MenuSelectItem( hWnd, &MenuInfo, wItemID, TRUE, 0 ); + return TRUE; +} /* * @implemented diff --git a/dll/win32/user32/windows/message.c b/dll/win32/user32/windows/message.c index 8cc1a07f581..147ff7db9d6 100644 --- a/dll/win32/user32/windows/message.c +++ b/dll/win32/user32/windows/message.c @@ -13,6 +13,81 @@ #include WINE_DEFAULT_DEBUG_CHANNEL(user32); +/* From wine: */ +/* flag for messages that contain pointers */ +/* 32 messages per entry, messages 0..31 map to bits 0..31 */ + +#define SET(msg) (1 << ((msg) & 31)) + +static const unsigned int message_pointer_flags[] = +{ + /* 0x00 - 0x1f */ + SET(WM_CREATE) | SET(WM_SETTEXT) | SET(WM_GETTEXT) | + SET(WM_WININICHANGE) | SET(WM_DEVMODECHANGE), + /* 0x20 - 0x3f */ + SET(WM_GETMINMAXINFO) | SET(WM_DRAWITEM) | SET(WM_MEASUREITEM) | SET(WM_DELETEITEM) | + SET(WM_COMPAREITEM), + /* 0x40 - 0x5f */ + SET(WM_WINDOWPOSCHANGING) | SET(WM_WINDOWPOSCHANGED) | SET(WM_COPYDATA) | + SET(WM_COPYGLOBALDATA) | SET(WM_NOTIFY) | SET(WM_HELP), + /* 0x60 - 0x7f */ + SET(WM_STYLECHANGING) | SET(WM_STYLECHANGED), + /* 0x80 - 0x9f */ + SET(WM_NCCREATE) | SET(WM_NCCALCSIZE) | SET(WM_GETDLGCODE), + /* 0xa0 - 0xbf */ + SET(EM_GETSEL) | SET(EM_GETRECT) | SET(EM_SETRECT) | SET(EM_SETRECTNP), + /* 0xc0 - 0xdf */ + SET(EM_REPLACESEL) | SET(EM_GETLINE) | SET(EM_SETTABSTOPS), + /* 0xe0 - 0xff */ + SET(SBM_GETRANGE) | SET(SBM_SETSCROLLINFO) | SET(SBM_GETSCROLLINFO) | SET(SBM_GETSCROLLBARINFO), + /* 0x100 - 0x11f */ + 0, + /* 0x120 - 0x13f */ + 0, + /* 0x140 - 0x15f */ + SET(CB_GETEDITSEL) | SET(CB_ADDSTRING) | SET(CB_DIR) | SET(CB_GETLBTEXT) | + SET(CB_INSERTSTRING) | SET(CB_FINDSTRING) | SET(CB_SELECTSTRING) | + SET(CB_GETDROPPEDCONTROLRECT) | SET(CB_FINDSTRINGEXACT), + /* 0x160 - 0x17f */ + 0, + /* 0x180 - 0x19f */ + SET(LB_ADDSTRING) | SET(LB_INSERTSTRING) | SET(LB_GETTEXT) | SET(LB_SELECTSTRING) | + SET(LB_DIR) | SET(LB_FINDSTRING) | + SET(LB_GETSELITEMS) | SET(LB_SETTABSTOPS) | SET(LB_ADDFILE) | SET(LB_GETITEMRECT), + /* 0x1a0 - 0x1bf */ + SET(LB_FINDSTRINGEXACT), + /* 0x1c0 - 0x1df */ + 0, + /* 0x1e0 - 0x1ff */ + 0, + /* 0x200 - 0x21f */ + SET(WM_NEXTMENU) | SET(WM_SIZING) | SET(WM_MOVING) | SET(WM_DEVICECHANGE), + /* 0x220 - 0x23f */ + SET(WM_MDICREATE) | SET(WM_MDIGETACTIVE) | SET(WM_DROPOBJECT) | + SET(WM_QUERYDROPOBJECT) | SET(WM_DRAGLOOP) | SET(WM_DRAGSELECT) | SET(WM_DRAGMOVE), + /* 0x240 - 0x25f */ + 0, + /* 0x260 - 0x27f */ + 0, + /* 0x280 - 0x29f */ + 0, + /* 0x2a0 - 0x2bf */ + 0, + /* 0x2c0 - 0x2df */ + 0, + /* 0x2e0 - 0x2ff */ + 0, + /* 0x300 - 0x31f */ + SET(WM_ASKCBFORMATNAME) +}; + +/* check whether a given message type includes pointers */ +static inline int is_pointer_message( UINT message ) +{ + if (message >= 8*sizeof(message_pointer_flags)) return FALSE; + return (message_pointer_flags[message / 32] & SET(message)) != 0; +} + /* DDE message exchange * * - Session initialization @@ -1500,6 +1575,12 @@ DispatchMessageA(CONST MSG *lpmsg) else Wnd = NULL; + if (is_pointer_message(lpmsg->message)) + { + SetLastError( ERROR_MESSAGE_SYNC_ONLY ); + return 0; + } + if ((lpmsg->message == WM_TIMER || lpmsg->message == WM_SYSTIMER) && lpmsg->lParam != 0) { WNDPROC WndProc = (WNDPROC)lpmsg->lParam; @@ -1507,6 +1588,8 @@ DispatchMessageA(CONST MSG *lpmsg) if ( lpmsg->message == WM_SYSTIMER ) return NtUserDispatchMessage( (PMSG)lpmsg ); + if (!NtUserValidateTimerCallback(lpmsg->hwnd, lpmsg->wParam, lpmsg->lParam)) return 0; + _SEH2_TRY // wine does this. Hint: Prevents call to another thread.... { Ret = WndProc(lpmsg->hwnd, @@ -1572,6 +1655,12 @@ DispatchMessageW(CONST MSG *lpmsg) else Wnd = NULL; + if (is_pointer_message(lpmsg->message)) + { + SetLastError( ERROR_MESSAGE_SYNC_ONLY ); + return 0; + } + if ((lpmsg->message == WM_TIMER || lpmsg->message == WM_SYSTIMER) && lpmsg->lParam != 0) { WNDPROC WndProc = (WNDPROC)lpmsg->lParam; @@ -1579,6 +1668,8 @@ DispatchMessageW(CONST MSG *lpmsg) if ( lpmsg->message == WM_SYSTIMER ) return NtUserDispatchMessage( (PMSG) lpmsg ); + if (!NtUserValidateTimerCallback(lpmsg->hwnd, lpmsg->wParam, lpmsg->lParam)) return 0; + _SEH2_TRY { Ret = WndProc(lpmsg->hwnd, @@ -2032,6 +2123,12 @@ SendMessageCallbackA( MSG AnsiMsg, UcMsg; CALL_BACK_INFO CallBackInfo; + if (is_pointer_message(Msg)) + { + SetLastError( ERROR_MESSAGE_SYNC_ONLY ); + return FALSE; + } + CallBackInfo.CallBack = lpCallBack; CallBackInfo.Context = dwData; @@ -2073,6 +2170,12 @@ SendMessageCallbackW( { CALL_BACK_INFO CallBackInfo; + if (is_pointer_message(Msg)) + { + SetLastError( ERROR_MESSAGE_SYNC_ONLY ); + return FALSE; + } + CallBackInfo.CallBack = lpCallBack; CallBackInfo.Context = dwData; @@ -2237,6 +2340,12 @@ SendNotifyMessageA( BOOL Ret; MSG AnsiMsg, UcMsg; + if (is_pointer_message(Msg)) + { + SetLastError( ERROR_MESSAGE_SYNC_ONLY ); + return FALSE; + } + AnsiMsg.hwnd = hWnd; AnsiMsg.message = Msg; AnsiMsg.wParam = wParam; @@ -2266,6 +2375,12 @@ SendNotifyMessageW( MSG UMMsg, KMMsg; LRESULT Result; + if (is_pointer_message(Msg)) + { + SetLastError( ERROR_MESSAGE_SYNC_ONLY ); + return FALSE; + } + UMMsg.hwnd = hWnd; UMMsg.message = Msg; UMMsg.wParam = wParam; diff --git a/dll/win32/userenv/CMakeLists.txt b/dll/win32/userenv/CMakeLists.txt index 32d3bd41711..f9327fedf99 100644 --- a/dll/win32/userenv/CMakeLists.txt +++ b/dll/win32/userenv/CMakeLists.txt @@ -17,16 +17,14 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/userenv_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/userenv.def) -add_library(userenv SHARED - ${CMAKE_CURRENT_BINARY_DIR}/userenv_precomp.h.gch - ${SOURCE}) +add_library(userenv SHARED ${SOURCE}) set_module_type(userenv win32dll) target_link_libraries(userenv uuid) add_importlibs(userenv advapi32 user32 msvcrt kernel32 ntdll) -add_pch(userenv ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(userenv precomp.h) add_cd_file(TARGET userenv DESTINATION reactos/system32 FOR all) add_importlib_target(userenv.spec) diff --git a/dll/win32/userenv/lang/pl-PL.rc b/dll/win32/userenv/lang/pl-PL.rc index a79db963e07..bfa5ab22ac3 100644 --- a/dll/win32/userenv/lang/pl-PL.rc +++ b/dll/win32/userenv/lang/pl-PL.rc @@ -15,10 +15,11 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * updated by Caemyr - Olaf Siejka (Jan, 2008) - * Use ReactOS forum PM or IRC to contact me - * http://www.reactos.org - * IRC: irc.freenode.net #reactos-pl; + * updated by Caemyr - Olaf Siejka (Jan, 2008) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT @@ -31,7 +32,7 @@ BEGIN IDS_FAVORITES "Ulubione" IDS_STARTMENU "Menu Start" IDS_PROGRAMS "Menu Start\\Programy" - IDS_ADMINTOOLS "Menu Start\\Programy\\Narzdzia administracyjne" + IDS_ADMINTOOLS "Menu Start\\Programy\\Narzędzia administracyjne" IDS_STARTUP "Menu Start\\Programy\\Autostart" IDS_MYDOCUMENTS "Moje dokumenty" IDS_MYPICTURES "Moje dokumenty\\Moje obrazy" @@ -39,7 +40,7 @@ BEGIN IDS_MYVIDEOS "Moje dokumenty\\Moje wideo" IDS_TEMPLATES "Szablony" IDS_RECENT "Ostatnie" - IDS_SENDTO "WylijDo" + IDS_SENDTO "Wyślij Do" IDS_PRINTHOOD "Drukarki" IDS_NETHOOD "Sieci" IDS_LOCALSETTINGS "Ustawienia lokalne" diff --git a/dll/win32/userenv/lang/ru-RU.rc b/dll/win32/userenv/lang/ru-RU.rc index 6268a4a5287..b177d3d43aa 100644 --- a/dll/win32/userenv/lang/ru-RU.rc +++ b/dll/win32/userenv/lang/ru-RU.rc @@ -22,19 +22,19 @@ STRINGTABLE BEGIN IDS_PROFILEPATH "%SystemDrive%\\Documents and Settings" IDS_APPDATA "Application Data" - IDS_DESKTOP " " - IDS_FAVORITES "" - IDS_STARTMENU " " - IDS_PROGRAMS " \\" - IDS_ADMINTOOLS " \\\\" - IDS_STARTUP " \\\\" - IDS_MYDOCUMENTS " " - IDS_MYPICTURES " \\ " - IDS_MYMUSIC " \\ " - IDS_MYVIDEOS " \\ " - IDS_TEMPLATES "" + IDS_DESKTOP "Рабочий стол" + IDS_FAVORITES "Избранное" + IDS_STARTMENU "Главное меню" + IDS_PROGRAMS "Главное меню\\Программы" + IDS_ADMINTOOLS "Главное меню\\Программы\\Служебные" + IDS_STARTUP "Главное меню\\Программы\\Автозапуск" + IDS_MYDOCUMENTS "Мои документы" + IDS_MYPICTURES "Мои документы\\Мои рисунки" + IDS_MYMUSIC "Мои документы\\Моя музыка" + IDS_MYVIDEOS "Мои документы\\Мои видеозаписи" + IDS_TEMPLATES "Шаблоны" IDS_RECENT "Recent" - IDS_SENDTO "" + IDS_SENDTO "Отправить" IDS_PRINTHOOD "PrintHood" IDS_NETHOOD "NetHood" IDS_LOCALSETTINGS "Local Settings" diff --git a/dll/win32/userenv/lang/uk-UA.rc b/dll/win32/userenv/lang/uk-UA.rc index 7b2d44e4e28..25c1cd45a8b 100644 --- a/dll/win32/userenv/lang/uk-UA.rc +++ b/dll/win32/userenv/lang/uk-UA.rc @@ -23,18 +23,18 @@ BEGIN IDS_PROFILEPATH "%SystemDrive%\\Documents and Settings" IDS_APPDATA "Application Data" IDS_DESKTOP "Desktop" - IDS_FAVORITES "" - IDS_STARTMENU " " - IDS_PROGRAMS " \\" - IDS_ADMINTOOLS " \\\\" - IDS_STARTUP " \\\\" - IDS_MYDOCUMENTS " " - IDS_MYPICTURES " \\ " - IDS_MYMUSIC " \\ " - IDS_MYVIDEOS " \\ " - IDS_TEMPLATES "" + IDS_FAVORITES "Обране" + IDS_STARTMENU "Головне меню" + IDS_PROGRAMS "Головне меню\\Програми" + IDS_ADMINTOOLS "Головне меню\\Програми\\Службові" + IDS_STARTUP "Головне меню\\Програми\\Автозапуск" + IDS_MYDOCUMENTS "Мої документи" + IDS_MYPICTURES "Мої документи\\Мої малюнки" + IDS_MYMUSIC "Мої документи\\Моя музика" + IDS_MYVIDEOS "Мої документи\\Мої відеозаписи" + IDS_TEMPLATES "Шаблони" IDS_RECENT "Recent" - IDS_SENDTO "³" + IDS_SENDTO "Відправити" IDS_PRINTHOOD "PrintHood" IDS_NETHOOD "NetHood" IDS_LOCALSETTINGS "Local Settings" diff --git a/dll/win32/userenv/userenv.rc b/dll/win32/userenv/userenv.rc index 3a0d1e9078d..3f314471ad9 100644 --- a/dll/win32/userenv/userenv.rc +++ b/dll/win32/userenv/userenv.rc @@ -52,10 +52,13 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/lt-LT.rc" #include "lang/no-NO.rc" #include "lang/nl-NL.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/th-TH.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" #include "lang/uk-UA.rc" diff --git a/dll/win32/vdmdbg/CMakeLists.txt b/dll/win32/vdmdbg/CMakeLists.txt index a312742e646..81237307e95 100644 --- a/dll/win32/vdmdbg/CMakeLists.txt +++ b/dll/win32/vdmdbg/CMakeLists.txt @@ -7,11 +7,9 @@ list(APPEND SOURCE vdmdbg.c ${CMAKE_CURRENT_BINARY_DIR}/vdmdbg.def) -add_library(vdmdbg SHARED - ${CMAKE_CURRENT_BINARY_DIR}/vdmdbg_vdmdbg.h.gch - ${SOURCE}) +add_library(vdmdbg SHARED ${SOURCE}) set_module_type(vdmdbg win32dll) add_importlibs(vdmdbg msvcrt kernel32 ntdll) -add_pch(vdmdbg ${CMAKE_CURRENT_SOURCE_DIR}/vdmdbg.h ${SOURCE}) +add_pch(vdmdbg vdmdbg.h) add_cd_file(TARGET vdmdbg DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/version/ver.spec b/dll/win32/version/ver.spec deleted file mode 100644 index 14ce7e7b895..00000000000 --- a/dll/win32/version/ver.spec +++ /dev/null @@ -1,12 +0,0 @@ -#1 DLLENTRYPOINT -2 pascal GetFileResourceSize(str str str ptr) GetFileResourceSize16 -3 pascal GetFileResource(str str str long long ptr) GetFileResource16 -6 pascal GetFileVersionInfoSize(str ptr) GetFileVersionInfoSize16 -7 pascal GetFileVersionInfo(str long long ptr) GetFileVersionInfo16 -8 pascal VerFindFile(word str str str ptr ptr ptr ptr) VerFindFile16 -9 pascal VerInstallFile(word str str str str str ptr ptr) VerInstallFile16 -10 pascal VerLanguageName(word ptr word) VerLanguageName16 -11 pascal VerQueryValue(segptr str ptr ptr) VerQueryValue16 -20 stub GETFILEVERSIONINFORAW -#21 VERFTHK_THUNKDATA16 -#22 VERTHKSL_THUNKDATA16 diff --git a/dll/win32/windowscodecs/CMakeLists.txt b/dll/win32/windowscodecs/CMakeLists.txt index 47ec0d9c422..d99a32ce498 100644 --- a/dll/win32/windowscodecs/CMakeLists.txt +++ b/dll/win32/windowscodecs/CMakeLists.txt @@ -12,6 +12,10 @@ include_directories( ${REACTOS_SOURCE_DIR}/include/reactos/libs/libtiff) set_rc_compiler() +if(MSVC) + add_compiler_flags(/FItypeof.h) +endif() + spec2def(windowscodecs.dll windowscodecs.spec) list(APPEND SOURCE @@ -37,6 +41,12 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def) +if(MSVC) + set_source_files_properties(${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c PROPERTIES GENERATED TRUE) + list(APPEND SOURCE + ${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c) +endif() + add_library(windowscodecs SHARED ${SOURCE}) set_module_type(windowscodecs win32dll) diff --git a/dll/win32/windowscodecs/typeof.h b/dll/win32/windowscodecs/typeof.h new file mode 100644 index 00000000000..006ae624b34 --- /dev/null +++ b/dll/win32/windowscodecs/typeof.h @@ -0,0 +1,79 @@ +#define typeof(X_) __typeof_ ## X_ + +#ifdef _WIN64 +#define __typeof_intptr long long +#define __typeof_longptr long long +#else +#define __typeof_intptr int +#define __typeof_longptr long +#endif + +#ifdef __cplusplus +#define __typeof_size size_t +#define __typeof_wchar wchar_t +#else +#define __typeof_size __typeof_intptr +#define __typeof_wchar unsigned short +#endif + +typedef struct jpeg_error_mgr * (__cdecl typeof(jpeg_std_error))(struct jpeg_error_mgr *); +typedef void (__cdecl typeof(jpeg_CreateDecompress))(struct jpeg_decompress_struct *, int, __typeof_size); +typedef int (__cdecl typeof(jpeg_read_header))(struct jpeg_decompress_struct *, int); +typedef int (__cdecl typeof(jpeg_start_decompress))(struct jpeg_decompress_struct *); +typedef unsigned int (__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *, unsigned char **, unsigned int); +typedef int (__cdecl typeof(jpeg_finish_decompress))(struct jpeg_decompress_struct *); +typedef void (__cdecl typeof(jpeg_destroy_decompress))(struct jpeg_decompress_struct *); +typedef unsigned char (__cdecl typeof(jpeg_resync_to_restart))(struct jpeg_decompress_struct *, int); + +typedef void (*png_error_ptr_1)(struct png_struct_def *, const char *); +typedef struct png_struct_def * (__cdecl typeof(png_create_read_struct))(const char *, void*, png_error_ptr_1, png_error_ptr_1); +typedef struct png_info_def* (__cdecl typeof(png_create_info_struct))(struct png_struct_def *); + +// FIXME the following types are not correct, but they help to compile +typedef void* (__cdecl typeof(png_create_write_struct))(void*); +typedef void* (__cdecl typeof(png_destroy_read_struct))(void*, void*, void*); +typedef void* (__cdecl typeof(png_destroy_write_struct))(void*); +typedef void* (__cdecl typeof(png_destroy_write_struct))(void*); +typedef void* (__cdecl typeof(png_error))(void*); +typedef void* (__cdecl typeof(png_get_bit_depth))(void *); +typedef void* (__cdecl typeof(png_get_color_type))(void *); +typedef void* (__cdecl typeof(png_get_error_ptr))(void *); +typedef void* (__cdecl typeof(png_get_image_height))(void *); +typedef void* (__cdecl typeof(png_get_image_width))(void *); +typedef void* (__cdecl typeof(png_get_io_ptr))(void *); +typedef void* (__cdecl typeof(png_get_pHYs))(void *); +typedef void* (__cdecl typeof(png_get_PLTE))(void *); +typedef void* (__cdecl typeof(png_get_tRNS))(void *); +typedef void* (__cdecl typeof(png_set_bgr))(void *); +typedef void* (__cdecl typeof(png_set_error_fn))(void *); +typedef void* (__cdecl typeof(png_set_expand_gray_1_2_4_to_8))(void *); +typedef void* (__cdecl typeof(png_set_filler))(void *); +typedef void* (__cdecl typeof(png_set_gray_to_rgb))(void *); +typedef void* (__cdecl typeof(png_set_IHDR))(void *); +typedef void* (__cdecl typeof(png_set_pHYs))(void *); +typedef void* (__cdecl typeof(png_set_read_fn))(void *); +typedef void* (__cdecl typeof(png_set_strip_16))(void *); +typedef void* (__cdecl typeof(png_set_tRNS_to_alpha))(void *); +typedef void* (__cdecl typeof(png_set_write_fn))(void *); +typedef void* (__cdecl typeof(png_read_end))(void *); +typedef void* (__cdecl typeof(png_read_image))(void *); +typedef void* (__cdecl typeof(png_read_info))(void *); +typedef void* (__cdecl typeof(png_write_end))(void *); +typedef void* (__cdecl typeof(png_write_info))(void *); +typedef void* (__cdecl typeof(png_write_rows))(void *); + +typedef void* (__cdecl typeof(TIFFClientOpen))(void *); +typedef void* (__cdecl typeof(TIFFClose))(void *); +typedef char* (__cdecl typeof(TIFFCurrentDirectory))(void *); +typedef void* (__cdecl typeof(TIFFGetField))(void *); +typedef void* (__cdecl typeof(TIFFReadDirectory))(void *); +typedef void* (__cdecl typeof(TIFFReadEncodedStrip))(void *); +typedef void* (__cdecl typeof(TIFFSetDirectory))(void *); + +#undef __typeof_intptr +#undef __typeof_longptr +#undef __typeof_wchar +#undef __typeof_size + +/* EOF */ + diff --git a/dll/win32/winemp3.acm/CMakeLists.txt b/dll/win32/winemp3.acm/CMakeLists.txt index 44b35f18022..a7f7e01edf3 100644 --- a/dll/win32/winemp3.acm/CMakeLists.txt +++ b/dll/win32/winemp3.acm/CMakeLists.txt @@ -1,6 +1,5 @@ add_definitions( - -D_DLL -D__USE_CRTIMP -D__WINESRC__ -DWIN32) @@ -16,19 +15,14 @@ add_library(winemp3.acm SHARED set_entrypoint(winemp3.acm 0) set_target_properties(winemp3.acm PROPERTIES SUFFIX "") - -target_link_libraries(winemp3.acm - mingw_common - wine - libmpg123) +target_link_libraries(winemp3.acm wine libmpg123 oldnames) add_importlibs(winemp3.acm - msvcrt winmm user32 + msvcrt kernel32 ntdll) add_dependencies(winemp3.acm psdk) - -add_cd_file(TARGET winemp3.acm DESTINATION reactos/system32 FOR all) \ No newline at end of file +add_cd_file(TARGET winemp3.acm DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/winhttp/net.c b/dll/win32/winhttp/net.c index 276d4d73622..2f7b35dfa49 100644 --- a/dll/win32/winhttp/net.c +++ b/dll/win32/winhttp/net.c @@ -134,6 +134,7 @@ MAKE_FUNCPTR( ERR_free_strings ); MAKE_FUNCPTR( ERR_get_error ); MAKE_FUNCPTR( ERR_error_string ); MAKE_FUNCPTR( X509_STORE_CTX_get_ex_data ); +MAKE_FUNCPTR( X509_STORE_CTX_get_chain ); MAKE_FUNCPTR( i2d_X509 ); MAKE_FUNCPTR( sk_value ); MAKE_FUNCPTR( sk_num ); @@ -374,13 +375,14 @@ static int netconn_secure_verify( int preverify_ok, X509_STORE_CTX *ctx ) X509 *cert; int i; PCCERT_CONTEXT endCert = NULL; + struct stack_st *chain = (struct stack_st *)pX509_STORE_CTX_get_chain( ctx ); ret = TRUE; - for (i = 0; ret && i < psk_num((struct stack_st *)ctx->chain); i++) + for (i = 0; ret && i < psk_num(chain); i++) { PCCERT_CONTEXT context; - cert = (X509 *)psk_value((struct stack_st *)ctx->chain, i); + cert = (X509 *)psk_value(chain, i); if ((context = X509_to_cert_context( cert ))) { if (i == 0) @@ -488,6 +490,7 @@ BOOL netconn_init( netconn_t *conn, BOOL secure ) LOAD_FUNCPTR( ERR_get_error ); LOAD_FUNCPTR( ERR_error_string ); LOAD_FUNCPTR( X509_STORE_CTX_get_ex_data ); + LOAD_FUNCPTR( X509_STORE_CTX_get_chain ); LOAD_FUNCPTR( i2d_X509 ); LOAD_FUNCPTR( sk_value ); LOAD_FUNCPTR( sk_num ); diff --git a/dll/win32/winhttp/request.c b/dll/win32/winhttp/request.c index 80a1b572d4d..4bd411c097f 100644 --- a/dll/win32/winhttp/request.c +++ b/dll/win32/winhttp/request.c @@ -504,7 +504,7 @@ static WCHAR *build_request_path( request_t *request ) sprintfW( ret, fmt, scheme, request->connect->hostname ); if (request->connect->hostport) { - static const WCHAR colonFmt[] = { ':','%','d',0 }; + static const WCHAR colonFmt[] = { ':','%','u',0 }; sprintfW( ret + strlenW( ret ), colonFmt, request->connect->hostport ); @@ -870,7 +870,7 @@ static BOOL read_reply( request_t *request ); static BOOL secure_proxy_connect( request_t *request ) { static const WCHAR verbConnect[] = {'C','O','N','N','E','C','T',0}; - static const WCHAR fmt[] = {'%','s',':','%','d',0}; + static const WCHAR fmt[] = {'%','s',':','%','u',0}; BOOL ret = FALSE; LPWSTR path; connect_t *connect = request->connect; @@ -1837,7 +1837,7 @@ static BOOL receive_response( request_t *request, BOOL async ) if (!(request->hdr.disable_flags & WINHTTP_DISABLE_COOKIES)) record_cookies( request ); - if (status == 301 || status == 302) + if (status == HTTP_STATUS_MOVED || status == HTTP_STATUS_REDIRECT || status == HTTP_STATUS_REDIRECT_KEEP_VERB) { if (request->hdr.disable_flags & WINHTTP_DISABLE_REDIRECTS) break; diff --git a/dll/win32/winhttp/url.c b/dll/win32/winhttp/url.c index 09835b43c91..6ead33cbf27 100644 --- a/dll/win32/winhttp/url.c +++ b/dll/win32/winhttp/url.c @@ -299,7 +299,7 @@ static DWORD comp_length( DWORD len, DWORD flags, WCHAR *comp ) static BOOL calc_length( URL_COMPONENTS *uc, DWORD flags, LPDWORD len ) { - static const WCHAR formatW[] = {'%','d',0}; + static const WCHAR formatW[] = {'%','u',0}; INTERNET_SCHEME scheme; *len = 0; @@ -360,7 +360,7 @@ static BOOL calc_length( URL_COMPONENTS *uc, DWORD flags, LPDWORD len ) */ BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDWORD required ) { - static const WCHAR formatW[] = {'%','d',0}; + static const WCHAR formatW[] = {'%','u',0}; static const WCHAR twoslashW[] = {'/','/'}; DWORD len; diff --git a/dll/win32/winhttp/winhttp_private.h b/dll/win32/winhttp/winhttp_private.h index 5da3ae1d547..24440528308 100644 --- a/dll/win32/winhttp/winhttp_private.h +++ b/dll/win32/winhttp/winhttp_private.h @@ -204,38 +204,38 @@ typedef struct LPDWORD written; } write_data_t; -object_header_t *addref_object( object_header_t * ); -object_header_t *grab_object( HINTERNET ); -void release_object( object_header_t * ); -HINTERNET alloc_handle( object_header_t * ); -BOOL free_handle( HINTERNET ); +object_header_t *addref_object( object_header_t * ) DECLSPEC_HIDDEN; +object_header_t *grab_object( HINTERNET ) DECLSPEC_HIDDEN; +void release_object( object_header_t * ) DECLSPEC_HIDDEN; +HINTERNET alloc_handle( object_header_t * ) DECLSPEC_HIDDEN; +BOOL free_handle( HINTERNET ) DECLSPEC_HIDDEN; -void set_last_error( DWORD ); -DWORD get_last_error( void ); -void send_callback( object_header_t *, DWORD, LPVOID, DWORD ); -void close_connection( request_t * ); +void set_last_error( DWORD ) DECLSPEC_HIDDEN; +DWORD get_last_error( void ) DECLSPEC_HIDDEN; +void send_callback( object_header_t *, DWORD, LPVOID, DWORD ) DECLSPEC_HIDDEN; +void close_connection( request_t * ) DECLSPEC_HIDDEN; -BOOL netconn_close( netconn_t * ); -BOOL netconn_connect( netconn_t *, const struct sockaddr *, unsigned int, int ); -BOOL netconn_connected( netconn_t * ); -BOOL netconn_create( netconn_t *, int, int, int ); -BOOL netconn_get_next_line( netconn_t *, char *, DWORD * ); -BOOL netconn_init( netconn_t *, BOOL ); -void netconn_unload( void ); -BOOL netconn_query_data_available( netconn_t *, DWORD * ); -BOOL netconn_recv( netconn_t *, void *, size_t, int, int * ); -BOOL netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr *, socklen_t *, int ); -BOOL netconn_secure_connect( netconn_t *, WCHAR * ); -BOOL netconn_send( netconn_t *, const void *, size_t, int, int * ); -DWORD netconn_set_timeout( netconn_t *, BOOL, int ); -const void *netconn_get_certificate( netconn_t * ); -int netconn_get_cipher_strength( netconn_t * ); +BOOL netconn_close( netconn_t * ) DECLSPEC_HIDDEN; +BOOL netconn_connect( netconn_t *, const struct sockaddr *, unsigned int, int ) DECLSPEC_HIDDEN; +BOOL netconn_connected( netconn_t * ) DECLSPEC_HIDDEN; +BOOL netconn_create( netconn_t *, int, int, int ) DECLSPEC_HIDDEN; +BOOL netconn_get_next_line( netconn_t *, char *, DWORD * ) DECLSPEC_HIDDEN; +BOOL netconn_init( netconn_t *, BOOL ) DECLSPEC_HIDDEN; +void netconn_unload( void ) DECLSPEC_HIDDEN; +BOOL netconn_query_data_available( netconn_t *, DWORD * ) DECLSPEC_HIDDEN; +BOOL netconn_recv( netconn_t *, void *, size_t, int, int * ) DECLSPEC_HIDDEN; +BOOL netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr *, socklen_t *, int ) DECLSPEC_HIDDEN; +BOOL netconn_secure_connect( netconn_t *, WCHAR * ) DECLSPEC_HIDDEN; +BOOL netconn_send( netconn_t *, const void *, size_t, int, int * ) DECLSPEC_HIDDEN; +DWORD netconn_set_timeout( netconn_t *, BOOL, int ) DECLSPEC_HIDDEN; +const void *netconn_get_certificate( netconn_t * ) DECLSPEC_HIDDEN; +int netconn_get_cipher_strength( netconn_t * ) DECLSPEC_HIDDEN; -BOOL set_cookies( request_t *, const WCHAR * ); -BOOL add_cookie_headers( request_t * ); -BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD ); -void delete_domain( domain_t * ); -BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port ); +BOOL set_cookies( request_t *, const WCHAR * ) DECLSPEC_HIDDEN; +BOOL add_cookie_headers( request_t * ) DECLSPEC_HIDDEN; +BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD ) DECLSPEC_HIDDEN; +void delete_domain( domain_t * ) DECLSPEC_HIDDEN; +BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port ) DECLSPEC_HIDDEN; static inline void *heap_alloc( SIZE_T size ) { diff --git a/dll/win32/wininet/cookie.c b/dll/win32/wininet/cookie.c index 7dfd2a82a8d..77e22ac1af6 100644 --- a/dll/win32/wininet/cookie.c +++ b/dll/win32/wininet/cookie.c @@ -89,7 +89,7 @@ static void COOKIE_deleteDomain(cookie_domain *deadDomain); /* adds a cookie to the domain */ static cookie *COOKIE_addCookie(cookie_domain *domain, LPCWSTR name, LPCWSTR data, FILETIME expiry) { - cookie *newCookie = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie)); + cookie *newCookie = heap_alloc(sizeof(cookie)); list_init(&newCookie->entry); newCookie->lpCookieName = NULL; @@ -145,7 +145,7 @@ static void COOKIE_deleteCookie(cookie *deadCookie, BOOL deleteDomain) /* allocates a domain and adds it to the end */ static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path) { - cookie_domain *newDomain = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie_domain)); + cookie_domain *newDomain = heap_alloc(sizeof(cookie_domain)); list_init(&newDomain->entry); list_init(&newDomain->cookie_list); @@ -260,6 +260,78 @@ static void COOKIE_deleteDomain(cookie_domain *deadDomain) HeapFree(GetProcessHeap(), 0, deadDomain); } +BOOL get_cookie(const WCHAR *host, const WCHAR *path, WCHAR *cookie_data, DWORD *size) +{ + unsigned cnt = 0, len, domain_count = 0, cookie_count = 0; + cookie_domain *domain; + FILETIME tm; + + GetSystemTimeAsFileTime(&tm); + + LIST_FOR_EACH_ENTRY(domain, &domain_list, cookie_domain, entry) { + struct list *cursor, *cursor2; + + if(!COOKIE_matchDomain(host, path, domain, TRUE)) + continue; + + domain_count++; + TRACE("found domain %p\n", domain); + + LIST_FOR_EACH_SAFE(cursor, cursor2, &domain->cookie_list) { + cookie *cookie_iter = LIST_ENTRY(cursor, cookie, entry); + + /* check for expiry */ + if((cookie_iter->expiry.dwLowDateTime != 0 || cookie_iter->expiry.dwHighDateTime != 0) + && CompareFileTime(&tm, &cookie_iter->expiry) > 0) + { + TRACE("Found expired cookie. deleting\n"); + COOKIE_deleteCookie(cookie_iter, FALSE); + continue; + } + + if(!cookie_data) { /* return the size of the buffer required to lpdwSize */ + if (cookie_count) + cnt += 2; /* '; ' */ + cnt += strlenW(cookie_iter->lpCookieName); + if ((len = strlenW(cookie_iter->lpCookieData))) { + cnt += 1; /* = */ + cnt += len; + } + }else { + static const WCHAR szsc[] = { ';',' ',0 }; + static const WCHAR szname[] = { '%','s',0 }; + static const WCHAR szdata[] = { '=','%','s',0 }; + + if (cookie_count) cnt += snprintfW(cookie_data + cnt, *size - cnt, szsc); + cnt += snprintfW(cookie_data + cnt, *size - cnt, szname, cookie_iter->lpCookieName); + + if (cookie_iter->lpCookieData[0]) + cnt += snprintfW(cookie_data + cnt, *size - cnt, szdata, cookie_iter->lpCookieData); + + TRACE("Cookie: %s\n", debugstr_w(cookie_data)); + } + cookie_count++; + } + } + + if (!domain_count) { + TRACE("no cookies found for %s\n", debugstr_w(host)); + SetLastError(ERROR_NO_MORE_ITEMS); + return FALSE; + } + + if(!cookie_data) { + *size = (cnt + 1) * sizeof(WCHAR); + TRACE("returning %u\n", *size); + return TRUE; + } + + *size = cnt + 1; + + TRACE("Returning %u (from %u domains): %s\n", cnt, domain_count, debugstr_w(cookie_data)); + return cnt != 0; +} + /*********************************************************************** * InternetGetCookieW (WININET.@) * @@ -276,14 +348,10 @@ static void COOKIE_deleteDomain(cookie_domain *deadDomain) BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, LPWSTR lpCookieData, LPDWORD lpdwSize) { + WCHAR host[INTERNET_MAX_HOST_NAME_LENGTH], path[INTERNET_MAX_PATH_LENGTH]; BOOL ret; - struct list * cursor; - unsigned int cnt = 0, domain_count = 0, cookie_count = 0; - WCHAR hostName[2048], path[2048]; - FILETIME tm; - TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName), - lpCookieData, lpdwSize); + TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName), lpCookieData, lpdwSize); if (!lpszUrl) { @@ -291,83 +359,11 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, return FALSE; } - hostName[0] = 0; - ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0])); - if (!ret || !hostName[0]) return FALSE; + host[0] = 0; + ret = COOKIE_crackUrlSimple(lpszUrl, host, sizeof(host)/sizeof(host[0]), path, sizeof(path)/sizeof(path[0])); + if (!ret || !host[0]) return FALSE; - GetSystemTimeAsFileTime(&tm); - - LIST_FOR_EACH(cursor, &domain_list) - { - cookie_domain *cookiesDomain = LIST_ENTRY(cursor, cookie_domain, entry); - if (COOKIE_matchDomain(hostName, path, cookiesDomain, TRUE)) - { - struct list * cursor; - domain_count++; - TRACE("found domain %p\n", cookiesDomain); - - LIST_FOR_EACH(cursor, &cookiesDomain->cookie_list) - { - cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry); - /* check for expiry */ - if ((thisCookie->expiry.dwLowDateTime != 0 || thisCookie->expiry.dwHighDateTime != 0) && CompareFileTime(&tm,&thisCookie->expiry) > 0) - { - TRACE("Found expired cookie. deleting\n"); - COOKIE_deleteCookie(thisCookie, FALSE); - continue; - } - - if (lpCookieData == NULL) /* return the size of the buffer required to lpdwSize */ - { - unsigned int len; - - if (cookie_count) cnt += 2; /* '; ' */ - cnt += strlenW(thisCookie->lpCookieName); - if ((len = strlenW(thisCookie->lpCookieData))) - { - cnt += 1; /* = */ - cnt += len; - } - } - else - { - static const WCHAR szsc[] = { ';',' ',0 }; - static const WCHAR szname[] = { '%','s',0 }; - static const WCHAR szdata[] = { '=','%','s',0 }; - - if (cookie_count) cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc); - cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szname, thisCookie->lpCookieName); - - if (thisCookie->lpCookieData[0]) - cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szdata, thisCookie->lpCookieData); - - TRACE("Cookie: %s\n", debugstr_w(lpCookieData)); - } - cookie_count++; - } - } - } - - if (!domain_count) - { - TRACE("no cookies found for %s\n", debugstr_w(hostName)); - SetLastError(ERROR_NO_MORE_ITEMS); - return FALSE; - } - - if (lpCookieData == NULL) - { - *lpdwSize = (cnt + 1) * sizeof(WCHAR); - TRACE("returning %u\n", *lpdwSize); - return TRUE; - } - - *lpdwSize = cnt + 1; - - TRACE("Returning %u (from %u domains): %s\n", cnt, domain_count, - debugstr_w(lpCookieData)); - - return (cnt ? TRUE : FALSE); + return get_cookie(host, path, lpCookieData, lpdwSize); } @@ -397,7 +393,7 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName, r = InternetGetCookieW( url, name, NULL, &len ); if( r ) { - szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + szCookieData = heap_alloc(len * sizeof(WCHAR)); if( !szCookieData ) { r = FALSE; @@ -418,7 +414,7 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName, return r; } -static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWSTR cookie_data) +BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWSTR cookie_data) { cookie_domain *thisCookieDomain = NULL; cookie *thisCookie; @@ -453,7 +449,7 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST if (value != data) HeapFree(GetProcessHeap(), 0, value); - value = HeapAlloc(GetProcessHeap(), 0, (ptr - data) * sizeof(WCHAR)); + value = heap_alloc((ptr - data) * sizeof(WCHAR)); if (value == NULL) { HeapFree(GetProcessHeap(), 0, data); diff --git a/dll/win32/wininet/dialogs.c b/dll/win32/wininet/dialogs.c index 2c4a5278569..5e226c476fd 100644 --- a/dll/win32/wininet/dialogs.c +++ b/dll/win32/wininet/dialogs.c @@ -44,6 +44,8 @@ #include "resource.h" +#define MAX_STRING_LEN 1024 + WINE_DEFAULT_DEBUG_CHANNEL(wininet); struct WININET_ErrorDlgParams @@ -62,25 +64,25 @@ struct WININET_ErrorDlgParams */ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz ) { - http_request_t *lpwhr; - http_session_t *lpwhs = NULL; + http_request_t *request; + http_session_t *session = NULL; appinfo_t *hIC = NULL; BOOL ret = FALSE; LPWSTR p; - lpwhr = (http_request_t*) WININET_GetObject( hRequest ); - if (NULL == lpwhr) + request = (http_request_t*) get_handle_object( hRequest ); + if (NULL == request) return FALSE; - lpwhs = lpwhr->lpHttpSession; - if (NULL == lpwhs) + session = request->session; + if (NULL == session) goto done; - hIC = lpwhs->lpAppInfo; + hIC = session->appInfo; if (NULL == hIC) goto done; - lstrcpynW(szBuf, hIC->lpszProxy, sz); + lstrcpynW(szBuf, hIC->proxy, sz); /* FIXME: perhaps it would be better to use InternetCrackUrl here */ p = strchrW(szBuf, ':'); @@ -90,7 +92,7 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz ) ret = TRUE; done: - WININET_Release( &lpwhr->hdr ); + WININET_Release( &request->hdr ); return ret; } @@ -101,24 +103,24 @@ done: */ static BOOL WININET_GetServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz ) { - http_request_t *lpwhr; - http_session_t *lpwhs = NULL; + http_request_t *request; + http_session_t *session = NULL; BOOL ret = FALSE; - lpwhr = (http_request_t*) WININET_GetObject( hRequest ); - if (NULL == lpwhr) + request = (http_request_t*) get_handle_object( hRequest ); + if (NULL == request) return FALSE; - lpwhs = lpwhr->lpHttpSession; - if (NULL == lpwhs) + session = request->session; + if (NULL == session) goto done; - lstrcpynW(szBuf, lpwhs->lpszHostName, sz); + lstrcpynW(szBuf, session->hostName, sz); ret = TRUE; done: - WININET_Release( &lpwhr->hdr ); + WININET_Release( &request->hdr ); return ret; } @@ -239,17 +241,17 @@ static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer, static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username, LPWSTR password, BOOL proxy ) { - http_request_t *lpwhr; - http_session_t *lpwhs; + http_request_t *request; + http_session_t *session; BOOL ret = FALSE; LPWSTR p, q; - lpwhr = (http_request_t*) WININET_GetObject( hRequest ); - if( !lpwhr ) + request = (http_request_t*) get_handle_object( hRequest ); + if( !request ) return FALSE; - lpwhs = lpwhr->lpHttpSession; - if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION) + session = request->session; + if (NULL == session || session->hdr.htype != WH_HHTTPSESSION) { INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); goto done; @@ -268,27 +270,27 @@ static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username, if (proxy) { - appinfo_t *hIC = lpwhs->lpAppInfo; + appinfo_t *hIC = session->appInfo; - HeapFree(GetProcessHeap(), 0, hIC->lpszProxyUsername); - hIC->lpszProxyUsername = p; + HeapFree(GetProcessHeap(), 0, hIC->proxyUsername); + hIC->proxyUsername = p; - HeapFree(GetProcessHeap(), 0, hIC->lpszProxyPassword); - hIC->lpszProxyPassword = q; + HeapFree(GetProcessHeap(), 0, hIC->proxyPassword); + hIC->proxyPassword = q; } else { - HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName); - lpwhs->lpszUserName = p; + HeapFree(GetProcessHeap(), 0, session->userName); + session->userName = p; - HeapFree(GetProcessHeap(), 0, lpwhs->lpszPassword); - lpwhs->lpszPassword = q; + HeapFree(GetProcessHeap(), 0, session->password); + session->password = q; } ret = TRUE; done: - WININET_Release( &lpwhr->hdr ); + WININET_Release( &request->hdr ); return ret; } @@ -460,6 +462,109 @@ static INT_PTR WINAPI WININET_PasswordDialog( return FALSE; } +/*********************************************************************** + * WININET_InvalidCertificateDialog + */ +static INT_PTR WINAPI WININET_InvalidCertificateDialog( + HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) +{ + struct WININET_ErrorDlgParams *params; + HWND hitem; + WCHAR buf[1024]; + + if( uMsg == WM_INITDIALOG ) + { + TRACE("WM_INITDIALOG (%08lx)\n", lParam); + + /* save the parameter list */ + params = (struct WININET_ErrorDlgParams*) lParam; + SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); + + switch( params->dwError ) + { + case ERROR_INTERNET_INVALID_CA: + LoadStringW( WININET_hModule, IDS_CERT_CA_INVALID, buf, 1024 ); + break; + case ERROR_INTERNET_SEC_CERT_DATE_INVALID: + LoadStringW( WININET_hModule, IDS_CERT_DATE_INVALID, buf, 1024 ); + break; + case ERROR_INTERNET_SEC_CERT_CN_INVALID: + LoadStringW( WININET_hModule, IDS_CERT_CN_INVALID, buf, 1024 ); + break; + case ERROR_INTERNET_SEC_CERT_ERRORS: + /* FIXME: We should fetch information about the + * certificate here and show all the relevant errors. + */ + LoadStringW( WININET_hModule, IDS_CERT_ERRORS, buf, 1024 ); + break; + default: + FIXME( "No message for error %d\n", params->dwError ); + buf[0] = '\0'; + } + + hitem = GetDlgItem( hdlg, IDC_CERT_ERROR ); + SetWindowTextW( hitem, buf ); + + return TRUE; + } + + params = (struct WININET_ErrorDlgParams*) + GetWindowLongPtrW( hdlg, GWLP_USERDATA ); + + switch( uMsg ) + { + case WM_COMMAND: + if( wParam == IDOK ) + { + BOOL res = TRUE; + + if( params->dwFlags & FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS ) + { + DWORD flags, size = sizeof(flags); + + InternetQueryOptionW( params->hRequest, INTERNET_OPTION_SECURITY_FLAGS, &flags, &size ); + switch( params->dwError ) + { + case ERROR_INTERNET_INVALID_CA: + flags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA; + break; + case ERROR_INTERNET_SEC_CERT_DATE_INVALID: + flags |= SECURITY_FLAG_IGNORE_CERT_DATE_INVALID; + break; + case ERROR_INTERNET_SEC_CERT_CN_INVALID: + flags |= SECURITY_FLAG_IGNORE_CERT_CN_INVALID; + break; + case ERROR_INTERNET_SEC_CERT_ERRORS: + FIXME("Should only add ignore flags as needed.\n"); + flags |= SECURITY_FLAG_IGNORE_CERT_CN_INVALID | + SECURITY_FLAG_IGNORE_CERT_DATE_INVALID | + SECURITY_FLAG_IGNORE_UNKNOWN_CA; + /* FIXME: ERROR_INTERNET_SEC_CERT_ERRORS also + * seems to set the corresponding DLG_* flags. + */ + break; + } + res = InternetSetOptionW( params->hRequest, INTERNET_OPTION_SECURITY_FLAGS, &flags, size ); + if(!res) + WARN("InternetSetOption(INTERNET_OPTION_SECURITY_FLAGS) failed.\n"); + } + + EndDialog( hdlg, res ? ERROR_SUCCESS : ERROR_NOT_SUPPORTED ); + return TRUE; + } + if( wParam == IDCANCEL ) + { + TRACE("Pressed cancel.\n"); + + EndDialog( hdlg, ERROR_CANCELLED ); + return TRUE; + } + break; + } + + return FALSE; +} + /*********************************************************************** * WININET_GetConnectionStatus */ @@ -490,11 +595,13 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest, DWORD dwError, DWORD dwFlags, LPVOID* lppvData) { struct WININET_ErrorDlgParams params; - HMODULE hwininet = GetModuleHandleA( "wininet.dll" ); INT dwStatus; TRACE("%p %p %d %08x %p\n", hWnd, hRequest, dwError, dwFlags, lppvData); + if( !hWnd && !(dwFlags & FLAGS_ERROR_UI_FLAGS_NO_UI) ) + return ERROR_INVALID_HANDLE; + params.hWnd = hWnd; params.hRequest = hRequest; params.dwError = dwError; @@ -512,23 +619,32 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest, switch (dwStatus) { case HTTP_STATUS_PROXY_AUTH_REQ: - return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), + return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_PROXYDLG ), hWnd, WININET_ProxyPasswordDialog, (LPARAM) ¶ms ); case HTTP_STATUS_DENIED: - return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_AUTHDLG ), + return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_AUTHDLG ), hWnd, WININET_PasswordDialog, (LPARAM) ¶ms ); default: WARN("unhandled status %u\n", dwStatus); return 0; } - - case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR: - case ERROR_INTERNET_INVALID_CA: - case ERROR_INTERNET_POST_IS_NON_SECURE: + case ERROR_INTERNET_SEC_CERT_ERRORS: case ERROR_INTERNET_SEC_CERT_CN_INVALID: case ERROR_INTERNET_SEC_CERT_DATE_INVALID: + case ERROR_INTERNET_INVALID_CA: + if( dwFlags & FLAGS_ERROR_UI_FLAGS_NO_UI ) + return ERROR_CANCELLED; + + if( dwFlags & ~FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS ) + FIXME("%08x contains unsupported flags.\n", dwFlags); + + return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_INVCERTDLG ), + hWnd, WININET_InvalidCertificateDialog, (LPARAM) ¶ms ); + case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR: + case ERROR_INTERNET_POST_IS_NON_SECURE: FIXME("Need to display dialog for error %d\n", dwError); return ERROR_SUCCESS; } - return ERROR_INVALID_PARAMETER; + + return ERROR_NOT_SUPPORTED; } diff --git a/dll/win32/wininet/ftp.c b/dll/win32/wininet/ftp.c index 80cc6f0e60a..07052c2d60c 100644 --- a/dll/win32/wininet/ftp.c +++ b/dll/win32/wininet/ftp.c @@ -288,7 +288,7 @@ BOOL WINAPI FtpPutFileW(HINTERNET hConnect, LPCWSTR lpszLocalFile, return FALSE; } - lpwfs = (ftp_session_t*) WININET_GetObject( hConnect ); + lpwfs = (ftp_session_t*) get_handle_object( hConnect ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -470,7 +470,7 @@ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory) goto lend; } - lpwfs = (ftp_session_t*) WININET_GetObject( hConnect ); + lpwfs = (ftp_session_t*) get_handle_object( hConnect ); if (NULL == lpwfs || WH_HFTPSESSION != lpwfs->hdr.htype) { INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); @@ -610,7 +610,7 @@ BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory) appinfo_t *hIC = NULL; BOOL r = FALSE; - lpwfs = (ftp_session_t*) WININET_GetObject( hConnect ); + lpwfs = (ftp_session_t*) get_handle_object( hConnect ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -766,7 +766,7 @@ HINTERNET WINAPI FtpFindFirstFileW(HINTERNET hConnect, appinfo_t *hIC = NULL; HINTERNET r = NULL; - lpwfs = (ftp_session_t*) WININET_GetObject( hConnect ); + lpwfs = (ftp_session_t*) get_handle_object( hConnect ); if (NULL == lpwfs || WH_HFTPSESSION != lpwfs->hdr.htype) { INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); @@ -916,7 +916,7 @@ BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDire len = *lpdwCurrentDirectory; if(lpszCurrentDirectory) { - dir = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + dir = heap_alloc(len * sizeof(WCHAR)); if (NULL == dir) { INTERNET_SetLastError(ERROR_OUTOFMEMORY); @@ -964,7 +964,7 @@ BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDir TRACE("%p %p %p\n", hFtpSession, lpszCurrentDirectory, lpdwCurrentDirectory); - lpwfs = (ftp_session_t*) WININET_GetObject( hFtpSession ); + lpwfs = (ftp_session_t*) get_handle_object( hFtpSession ); if (NULL == lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -1127,8 +1127,6 @@ static void FTPFILE_Destroy(object_header_t *hdr) if (nResCode > 0 && nResCode != 226) WARN("server reports failed transfer\n"); WININET_Release(&lpwh->lpFtpSession->hdr); - - HeapFree(GetProcessHeap(), 0, lpwh); } static DWORD FTPFILE_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) @@ -1326,7 +1324,6 @@ static HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs, BOOL bSuccess = FALSE; ftp_file_t *lpwh = NULL; appinfo_t *hIC = NULL; - HINTERNET handle = NULL; TRACE("\n"); @@ -1347,14 +1344,10 @@ static HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs, /* Get data socket to server */ if (bSuccess && FTP_GetDataSocket(lpwfs, &nDataSocket)) { - lpwh = HeapAlloc(GetProcessHeap(), 0, sizeof(ftp_file_t)); + lpwh = alloc_object(&lpwfs->hdr, &FTPFILEVtbl, sizeof(ftp_file_t)); lpwh->hdr.htype = WH_HFILE; - lpwh->hdr.vtbl = &FTPFILEVtbl; lpwh->hdr.dwFlags = dwFlags; lpwh->hdr.dwContext = dwContext; - lpwh->hdr.dwInternalFlags = 0; - lpwh->hdr.refs = 1; - lpwh->hdr.lpfnStatusCB = lpwfs->hdr.lpfnStatusCB; lpwh->nDataSocket = nDataSocket; lpwh->cache_file = NULL; lpwh->cache_file_handle = INVALID_HANDLE_VALUE; @@ -1364,10 +1357,6 @@ static HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs, lpwh->lpFtpSession = lpwfs; list_add_head( &lpwfs->hdr.children, &lpwh->hdr.entry ); - handle = WININET_AllocHandle( &lpwh->hdr ); - if( !handle ) - goto lend; - /* Indicate that a download is currently in progress */ lpwfs->download_in_progress = lpwh; } @@ -1394,7 +1383,7 @@ static HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs, if (!InternetCreateUrlW(&uc, 0, NULL, &len) && GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - WCHAR *url = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + WCHAR *url = heap_alloc(len * sizeof(WCHAR)); if (url && InternetCreateUrlW(&uc, 0, url, &len) && CreateUrlCacheEntryW(url, 0, NULL, filename, 0)) { @@ -1420,7 +1409,7 @@ static HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs, if (lpwh) { - iar.dwResult = (DWORD_PTR)handle; + iar.dwResult = (DWORD_PTR)lpwh->hdr.hInternet; iar.dwError = ERROR_SUCCESS; SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_HANDLE_CREATED, &iar, sizeof(INTERNET_ASYNC_RESULT)); @@ -1436,11 +1425,13 @@ static HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs, } } -lend: - if( lpwh ) - WININET_Release( &lpwh->hdr ); + if(!bSuccess) { + if(lpwh) + WININET_Release( &lpwh->hdr ); + return FALSE; + } - return handle; + return lpwh->hdr.hInternet; } @@ -1501,7 +1492,7 @@ HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession, TRACE("(%p,%s,0x%08x,0x%08x,0x%08lx)\n", hFtpSession, debugstr_w(lpszFileName), fdwAccess, dwFlags, dwContext); - lpwfs = (ftp_session_t*) WININET_GetObject( hFtpSession ); + lpwfs = (ftp_session_t*) get_handle_object( hFtpSession ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -1624,7 +1615,7 @@ BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lps return FALSE; } - lpwfs = (ftp_session_t*) WININET_GetObject( hInternet ); + lpwfs = (ftp_session_t*) get_handle_object( hInternet ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -1818,7 +1809,7 @@ BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName) appinfo_t *hIC = NULL; BOOL r = FALSE; - lpwfs = (ftp_session_t*) WININET_GetObject( hFtpSession ); + lpwfs = (ftp_session_t*) get_handle_object( hFtpSession ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -1963,7 +1954,7 @@ BOOL WINAPI FtpRemoveDirectoryW(HINTERNET hFtpSession, LPCWSTR lpszDirectory) appinfo_t *hIC = NULL; BOOL r = FALSE; - lpwfs = (ftp_session_t*) WININET_GetObject( hFtpSession ); + lpwfs = (ftp_session_t*) get_handle_object( hFtpSession ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -2113,7 +2104,7 @@ BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszD appinfo_t *hIC = NULL; BOOL r = FALSE; - lpwfs = (ftp_session_t*) WININET_GetObject( hFtpSession ); + lpwfs = (ftp_session_t*) get_handle_object( hFtpSession ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -2279,7 +2270,7 @@ BOOL WINAPI FtpCommandW( HINTERNET hConnect, BOOL fExpectResponse, DWORD dwFlags return FALSE; } - lpwfs = (ftp_session_t*) WININET_GetObject( hConnect ); + lpwfs = (ftp_session_t*) get_handle_object( hConnect ); if (!lpwfs) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); @@ -2299,7 +2290,7 @@ BOOL WINAPI FtpCommandW( HINTERNET hConnect, BOOL fExpectResponse, DWORD dwFlags } len = WideCharToMultiByte(CP_ACP, 0, lpszCommand, -1, NULL, 0, NULL, NULL) + strlen(szCRLF); - if ((cmd = HeapAlloc(GetProcessHeap(), 0, len ))) + if ((cmd = heap_alloc(len))) WideCharToMultiByte(CP_ACP, 0, lpszCommand, -1, cmd, len, NULL, NULL); else { @@ -2353,7 +2344,6 @@ static void FTPSESSION_Destroy(object_header_t *hdr) HeapFree(GetProcessHeap(), 0, lpwfs->lpszPassword); HeapFree(GetProcessHeap(), 0, lpwfs->lpszUserName); HeapFree(GetProcessHeap(), 0, lpwfs->servername); - HeapFree(GetProcessHeap(), 0, lpwfs); } static void FTPSESSION_CloseConnection(object_header_t *hdr) @@ -2449,7 +2439,6 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, UINT sock_namelen; BOOL bSuccess = FALSE; ftp_session_t *lpwfs = NULL; - HINTERNET handle = NULL; char szaddr[INET_ADDRSTRLEN]; TRACE("%p Server(%s) Port(%d) User(%s) Paswd(%s)\n", @@ -2461,14 +2450,14 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, if ((!lpszUserName || !*lpszUserName) && lpszPassword && *lpszPassword) { INTERNET_SetLastError(ERROR_INVALID_PARAMETER); - goto lerror; + return NULL; } - lpwfs = HeapAlloc(GetProcessHeap(), 0, sizeof(ftp_session_t)); + lpwfs = alloc_object(&hIC->hdr, &FTPSESSIONVtbl, sizeof(ftp_session_t)); if (NULL == lpwfs) { INTERNET_SetLastError(ERROR_OUTOFMEMORY); - goto lerror; + return NULL; } if (nServerPort == INTERNET_INVALID_PORT_NUMBER) @@ -2477,12 +2466,9 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, lpwfs->serverport = nServerPort; lpwfs->hdr.htype = WH_HFTPSESSION; - lpwfs->hdr.vtbl = &FTPSESSIONVtbl; lpwfs->hdr.dwFlags = dwFlags; lpwfs->hdr.dwContext = dwContext; - lpwfs->hdr.dwInternalFlags = dwInternalFlags; - lpwfs->hdr.refs = 1; - lpwfs->hdr.lpfnStatusCB = hIC->hdr.lpfnStatusCB; + lpwfs->hdr.dwInternalFlags |= dwInternalFlags; lpwfs->download_in_progress = NULL; lpwfs->sndSocket = -1; lpwfs->lstnSocket = -1; @@ -2492,18 +2478,10 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, lpwfs->lpAppInfo = hIC; list_add_head( &hIC->hdr.children, &lpwfs->hdr.entry ); - handle = WININET_AllocHandle( &lpwfs->hdr ); - if( !handle ) - { - ERR("Failed to alloc handle\n"); - INTERNET_SetLastError(ERROR_OUTOFMEMORY); - goto lerror; - } - - if(hIC->lpszProxy && hIC->dwAccessType == INTERNET_OPEN_TYPE_PROXY) { - if(strchrW(hIC->lpszProxy, ' ')) + if(hIC->proxy && hIC->accessType == INTERNET_OPEN_TYPE_PROXY) { + if(strchrW(hIC->proxy, ' ')) FIXME("Several proxies not implemented.\n"); - if(hIC->lpszProxyBypass) + if(hIC->proxyBypass) FIXME("Proxy bypass is ignored.\n"); } if (!lpszUserName || !strlenW(lpszUserName)) { @@ -2537,7 +2515,7 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, { INTERNET_ASYNC_RESULT iar; - iar.dwResult = (DWORD_PTR)handle; + iar.dwResult = (DWORD_PTR)lpwfs->hdr.hInternet; iar.dwError = ERROR_SUCCESS; SendAsyncCallback(&hIC->hdr, dwContext, @@ -2600,15 +2578,14 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, } lerror: - if (lpwfs) WININET_Release( &lpwfs->hdr ); - - if (!bSuccess && handle) + if (!bSuccess) { - WININET_FreeHandle( handle ); - handle = NULL; + if(lpwfs) + WININET_Release( &lpwfs->hdr ); + return NULL; } - return handle; + return lpwfs->hdr.hInternet; } @@ -2683,7 +2660,7 @@ static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam, dwParamLen = lpszParam?strlen(lpszParam)+1:0; len = dwParamLen + strlen(szFtpCommands[ftpCmd]) + strlen(szCRLF); - if (NULL == (buf = HeapAlloc(GetProcessHeap(), 0, len+1))) + if (NULL == (buf = heap_alloc(len+1))) { INTERNET_SetLastError(ERROR_OUTOFMEMORY); return FALSE; @@ -3250,7 +3227,7 @@ static BOOL FTP_SendData(ftp_session_t *lpwfs, INT nDataSocket, HANDLE hFile) CHAR *lpszBuffer; TRACE("\n"); - lpszBuffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CHAR)*DATA_PACKET_SIZE); + lpszBuffer = heap_alloc_zero(sizeof(CHAR)*DATA_PACKET_SIZE); /* Get the size of the file. */ GetFileInformationByHandle(hFile, &fi); @@ -3372,7 +3349,7 @@ static BOOL FTP_RetrieveFileData(ftp_session_t *lpwfs, INT nDataSocket, HANDLE h TRACE("\n"); - lpszBuffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CHAR)*DATA_PACKET_SIZE); + lpszBuffer = heap_alloc_zero(sizeof(CHAR)*DATA_PACKET_SIZE); if (NULL == lpszBuffer) { INTERNET_SetLastError(ERROR_OUTOFMEMORY); @@ -3419,7 +3396,6 @@ static void FTPFINDNEXT_Destroy(object_header_t *hdr) } HeapFree(GetProcessHeap(), 0, lpwfn->lpafp); - HeapFree(GetProcessHeap(), 0, lpwfn); } static DWORD FTPFINDNEXT_FindNextFileProc(WININETFTPFINDNEXTW *find, LPVOID data) @@ -3530,7 +3506,6 @@ static HINTERNET FTP_ReceiveFileList(ftp_session_t *lpwfs, INT nSocket, LPCWSTR DWORD dwSize = 0; LPFILEPROPERTIESW lpafp = NULL; LPWININETFTPFINDNEXTW lpwfn = NULL; - HINTERNET handle = 0; TRACE("(%p,%d,%s,%p,%08lx)\n", lpwfs, nSocket, debugstr_w(lpszSearchFile), lpFindFileData, dwContext); @@ -3539,14 +3514,11 @@ static HINTERNET FTP_ReceiveFileList(ftp_session_t *lpwfs, INT nSocket, LPCWSTR if(lpFindFileData) FTP_ConvertFileProp(lpafp, lpFindFileData); - lpwfn = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WININETFTPFINDNEXTW)); + lpwfn = alloc_object(&lpwfs->hdr, &FTPFINDNEXTVtbl, sizeof(WININETFTPFINDNEXTW)); if (lpwfn) { lpwfn->hdr.htype = WH_HFTPFINDNEXT; - lpwfn->hdr.vtbl = &FTPFINDNEXTVtbl; lpwfn->hdr.dwContext = dwContext; - lpwfn->hdr.refs = 1; - lpwfn->hdr.lpfnStatusCB = lpwfs->hdr.lpfnStatusCB; lpwfn->index = 1; /* Next index is 1 since we return index 0 */ lpwfn->size = dwSize; lpwfn->lpafp = lpafp; @@ -3554,16 +3526,11 @@ static HINTERNET FTP_ReceiveFileList(ftp_session_t *lpwfs, INT nSocket, LPCWSTR WININET_AddRef( &lpwfs->hdr ); lpwfn->lpFtpSession = lpwfs; list_add_head( &lpwfs->hdr.children, &lpwfn->hdr.entry ); - - handle = WININET_AllocHandle( &lpwfn->hdr ); } } - if( lpwfn ) - WININET_Release( &lpwfn->hdr ); - TRACE("Matched %d files\n", dwSize); - return handle; + return lpwfn ? lpwfn->hdr.hInternet : NULL; } @@ -3785,7 +3752,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe TRACE("\n"); /* Allocate initial file properties array */ - *lpafp = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FILEPROPERTIESW)*(sizeFilePropArray)); + *lpafp = heap_alloc_zero(sizeof(FILEPROPERTIESW)*(sizeFilePropArray)); if (!*lpafp) return FALSE; @@ -3795,8 +3762,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe LPFILEPROPERTIESW tmpafp; sizeFilePropArray *= 2; - tmpafp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, *lpafp, - sizeof(FILEPROPERTIESW)*sizeFilePropArray); + tmpafp = heap_realloc_zero(*lpafp, sizeof(FILEPROPERTIESW)*sizeFilePropArray); if (NULL == tmpafp) { bSuccess = FALSE; @@ -3814,8 +3780,7 @@ static BOOL FTP_ParseDirectory(ftp_session_t *lpwfs, INT nSocket, LPCWSTR lpszSe { LPFILEPROPERTIESW tmpafp; - tmpafp = HeapReAlloc(GetProcessHeap(), 0, *lpafp, - sizeof(FILEPROPERTIESW)*indexFilePropArray); + tmpafp = heap_realloc(*lpafp, sizeof(FILEPROPERTIESW)*indexFilePropArray); if (NULL != tmpafp) *lpafp = tmpafp; } diff --git a/dll/win32/wininet/http.c b/dll/win32/wininet/http.c index 796c3595f7b..89ea4ad0b0c 100644 --- a/dll/win32/wininet/http.c +++ b/dll/win32/wininet/http.c @@ -7,6 +7,7 @@ * Copyright 2004 Mike McCormack for CodeWeavers * Copyright 2005 Aric Stewart for CodeWeavers * Copyright 2006 Robert Shearman for CodeWeavers + * Copyright 2011 Jacek Caban for CodeWeavers * * Ulrich Czekalla * David Hammerton @@ -56,6 +57,7 @@ #include "winbase.h" #include "wininet.h" #include "winerror.h" +#include "winternl.h" #define NO_SHLWAPI_STREAM #define NO_SHLWAPI_REG #define NO_SHLWAPI_STRFCNS @@ -155,6 +157,8 @@ static const WCHAR szWWW_Authenticate[] = { 'W','W','W','-','A','u','t','h','e', #define HTTP_ADDHDR_FLAG_REPLACE 0x80000000 #define HTTP_ADDHDR_FLAG_REQ 0x02000000 +#define COLLECT_TIME 60000 + #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) struct HttpAuthInfo @@ -171,24 +175,14 @@ struct HttpAuthInfo }; -struct gzip_stream_t { -#ifdef HAVE_ZLIB - z_stream zstream; -#endif - BYTE buf[8192]; - DWORD buf_size; - DWORD buf_pos; - BOOL end_of_data; -}; - typedef struct _basicAuthorizationData { struct list entry; - LPWSTR lpszwHost; - LPWSTR lpszwRealm; - LPSTR lpszAuthorization; - UINT AuthorizationLen; + LPWSTR host; + LPWSTR realm; + LPSTR authorization; + UINT authorizationLen; } basicAuthorizationData; typedef struct _authorizationData @@ -217,7 +211,6 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION authcache_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; -static DWORD HTTP_OpenConnection(http_request_t *req); static BOOL HTTP_GetResponseHeaders(http_request_t *req, BOOL clear); static DWORD HTTP_ProcessHeader(http_request_t *req, LPCWSTR field, LPCWSTR value, DWORD dwModifier); static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer); @@ -229,8 +222,123 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t*, DWORD, LPVOID, LPDWORD, LPDWOR static LPWSTR HTTP_GetRedirectURL(http_request_t *req, LPCWSTR lpszUrl); static UINT HTTP_DecodeBase64(LPCWSTR base64, LPSTR bin); static BOOL HTTP_VerifyValidHeader(http_request_t *req, LPCWSTR field); -static void HTTP_DrainContent(http_request_t *req); -static BOOL HTTP_FinishedReading(http_request_t *req); + +static CRITICAL_SECTION connection_pool_cs; +static CRITICAL_SECTION_DEBUG connection_pool_debug = +{ + 0, 0, &connection_pool_cs, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": connection_pool_cs") } +}; +static CRITICAL_SECTION connection_pool_cs = { &connection_pool_debug, -1, 0, 0, 0, 0 }; + +static struct list connection_pool = LIST_INIT(connection_pool); +static BOOL collector_running; + +void server_addref(server_t *server) +{ + InterlockedIncrement(&server->ref); +} + +void server_release(server_t *server) +{ + if(InterlockedDecrement(&server->ref)) + return; + + if(!server->ref) + server->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME; +} + +static server_t *get_server(const WCHAR *name, INTERNET_PORT port) +{ + server_t *iter, *server = NULL; + + EnterCriticalSection(&connection_pool_cs); + + LIST_FOR_EACH_ENTRY(iter, &connection_pool, server_t, entry) { + if(iter->port == port && !strcmpW(iter->name, name)) { + server = iter; + server_addref(server); + break; + } + } + + if(!server) { + server = heap_alloc(sizeof(*server)); + if(server) { + server->addr_len = 0; + server->ref = 1; + server->port = port; + list_init(&server->conn_pool); + server->name = heap_strdupW(name); + if(server->name) { + list_add_head(&connection_pool, &server->entry); + }else { + heap_free(server); + server = NULL; + } + } + } + + LeaveCriticalSection(&connection_pool_cs); + + return server; +} + +BOOL collect_connections(BOOL collect_all) +{ + netconn_t *netconn, *netconn_safe; + server_t *server, *server_safe; + BOOL remaining = FALSE; + DWORD64 now; + + now = GetTickCount(); + + LIST_FOR_EACH_ENTRY_SAFE(server, server_safe, &connection_pool, server_t, entry) { + LIST_FOR_EACH_ENTRY_SAFE(netconn, netconn_safe, &server->conn_pool, netconn_t, pool_entry) { + if(collect_all || netconn->keep_until < now) { + TRACE("freeing %p\n", netconn); + list_remove(&netconn->pool_entry); + free_netconn(netconn); + }else { + remaining = TRUE; + } + } + + if(!server->ref) { + if(collect_all || server->keep_until < now) { + list_remove(&server->entry); + + heap_free(server->name); + heap_free(server); + }else { + remaining = TRUE; + } + } + } + + return remaining; +} + +static DWORD WINAPI collect_connections_proc(void *arg) +{ + BOOL remaining_conns; + + do { + /* FIXME: Use more sophisticated method */ + Sleep(5000); + + EnterCriticalSection(&connection_pool_cs); + + remaining_conns = collect_connections(FALSE); + if(!remaining_conns) + collector_running = FALSE; + + LeaveCriticalSection(&connection_pool_cs); + }while(remaining_conns); + + FreeLibraryAndExitThread(WININET_hModule, 0); +} static LPHTTPHEADERW HTTP_GetHeader(http_request_t *req, LPCWSTR head) { @@ -239,14 +347,163 @@ static LPHTTPHEADERW HTTP_GetHeader(http_request_t *req, LPCWSTR head) if (HeaderIndex == -1) return NULL; else - return &req->pCustHeaders[HeaderIndex]; + return &req->custHeaders[HeaderIndex]; +} + +typedef enum { + READMODE_SYNC, + READMODE_ASYNC, + READMODE_NOBLOCK +} read_mode_t; + +struct data_stream_vtbl_t { + DWORD (*get_avail_data)(data_stream_t*,http_request_t*); + BOOL (*end_of_data)(data_stream_t*,http_request_t*); + DWORD (*read)(data_stream_t*,http_request_t*,BYTE*,DWORD,DWORD*,read_mode_t); + BOOL (*drain_content)(data_stream_t*,http_request_t*); + void (*destroy)(data_stream_t*); +}; + +typedef struct { + data_stream_t data_stream; + + BYTE buf[READ_BUFFER_SIZE]; + DWORD buf_size; + DWORD buf_pos; + DWORD chunk_size; +} chunked_stream_t; + +static inline void destroy_data_stream(data_stream_t *stream) +{ + stream->vtbl->destroy(stream); +} + +static void reset_data_stream(http_request_t *req) +{ + destroy_data_stream(req->data_stream); + req->data_stream = &req->netconn_stream.data_stream; + req->read_pos = req->read_size = req->netconn_stream.content_read = 0; + req->read_chunked = req->read_gzip = FALSE; } #ifdef HAVE_ZLIB +typedef struct { + data_stream_t stream; + data_stream_t *parent_stream; + z_stream zstream; + BYTE buf[READ_BUFFER_SIZE]; + DWORD buf_size; + DWORD buf_pos; + BOOL end_of_data; +} gzip_stream_t; + +static DWORD gzip_get_avail_data(data_stream_t *stream, http_request_t *req) +{ + /* Allow reading only from read buffer */ + return 0; +} + +static BOOL gzip_end_of_data(data_stream_t *stream, http_request_t *req) +{ + gzip_stream_t *gzip_stream = (gzip_stream_t*)stream; + return gzip_stream->end_of_data; +} + +static DWORD gzip_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DWORD size, + DWORD *read, read_mode_t read_mode) +{ + gzip_stream_t *gzip_stream = (gzip_stream_t*)stream; + z_stream *zstream = &gzip_stream->zstream; + DWORD current_read, ret_read = 0; + BOOL end; + int zres; + DWORD res = ERROR_SUCCESS; + + while(size && !gzip_stream->end_of_data) { + end = gzip_stream->parent_stream->vtbl->end_of_data(gzip_stream->parent_stream, req); + + if(gzip_stream->buf_size <= 64 && !end) { + if(gzip_stream->buf_pos) { + if(gzip_stream->buf_size) + memmove(gzip_stream->buf, gzip_stream->buf+gzip_stream->buf_pos, gzip_stream->buf_size); + gzip_stream->buf_pos = 0; + } + res = gzip_stream->parent_stream->vtbl->read(gzip_stream->parent_stream, req, gzip_stream->buf+gzip_stream->buf_size, + sizeof(gzip_stream->buf)-gzip_stream->buf_size, ¤t_read, read_mode); + gzip_stream->buf_size += current_read; + if(res != ERROR_SUCCESS) + break; + end = gzip_stream->parent_stream->vtbl->end_of_data(gzip_stream->parent_stream, req); + if(!current_read && !end) { + if(read_mode != READMODE_NOBLOCK) { + WARN("unexpected end of data\n"); + gzip_stream->end_of_data = TRUE; + } + break; + } + if(gzip_stream->buf_size <= 64 && !end) + continue; + } + + zstream->next_in = gzip_stream->buf+gzip_stream->buf_pos; + zstream->avail_in = gzip_stream->buf_size-(end ? 0 : 64); + zstream->next_out = buf+ret_read; + zstream->avail_out = size; + zres = inflate(&gzip_stream->zstream, 0); + current_read = size - zstream->avail_out; + size -= current_read; + ret_read += current_read; + gzip_stream->buf_size -= zstream->next_in - (gzip_stream->buf+gzip_stream->buf_pos); + gzip_stream->buf_pos = zstream->next_in-gzip_stream->buf; + if(zres == Z_STREAM_END) { + TRACE("end of data\n"); + gzip_stream->end_of_data = TRUE; + inflateEnd(zstream); + }else if(zres != Z_OK) { + WARN("inflate failed %d: %s\n", zres, debugstr_a(zstream->msg)); + if(!ret_read) + res = ERROR_INTERNET_DECODING_FAILED; + break; + } + + if(ret_read && read_mode == READMODE_ASYNC) + read_mode = READMODE_NOBLOCK; + } + + TRACE("read %u bytes\n", ret_read); + *read = ret_read; + return res; +} + +static BOOL gzip_drain_content(data_stream_t *stream, http_request_t *req) +{ + gzip_stream_t *gzip_stream = (gzip_stream_t*)stream; + return gzip_stream->parent_stream->vtbl->drain_content(gzip_stream->parent_stream, req); +} + +static void gzip_destroy(data_stream_t *stream) +{ + gzip_stream_t *gzip_stream = (gzip_stream_t*)stream; + + destroy_data_stream(gzip_stream->parent_stream); + + if(!gzip_stream->end_of_data) + inflateEnd(&gzip_stream->zstream); + heap_free(gzip_stream); +} + +static const data_stream_vtbl_t gzip_stream_vtbl = { + gzip_get_avail_data, + gzip_end_of_data, + gzip_read, + gzip_drain_content, + gzip_destroy +}; + static voidpf wininet_zalloc(voidpf opaque, uInt items, uInt size) { - return HeapAlloc(GetProcessHeap(), 0, items*size); + return heap_alloc(items*size); } static void wininet_zfree(voidpf opaque, voidpf address) @@ -254,79 +511,52 @@ static void wininet_zfree(voidpf opaque, voidpf address) HeapFree(GetProcessHeap(), 0, address); } -static void init_gzip_stream(http_request_t *req) +static DWORD init_gzip_stream(http_request_t *req) { gzip_stream_t *gzip_stream; int index, zres; - gzip_stream = HeapAlloc(GetProcessHeap(), 0, sizeof(gzip_stream_t)); + gzip_stream = heap_alloc_zero(sizeof(gzip_stream_t)); + if(!gzip_stream) + return ERROR_OUTOFMEMORY; + + gzip_stream->stream.vtbl = &gzip_stream_vtbl; gzip_stream->zstream.zalloc = wininet_zalloc; gzip_stream->zstream.zfree = wininet_zfree; - gzip_stream->zstream.opaque = NULL; - gzip_stream->zstream.next_in = NULL; - gzip_stream->zstream.avail_in = 0; - gzip_stream->zstream.next_out = NULL; - gzip_stream->zstream.avail_out = 0; - gzip_stream->buf_pos = 0; - gzip_stream->buf_size = 0; - gzip_stream->end_of_data = FALSE; zres = inflateInit2(&gzip_stream->zstream, 0x1f); if(zres != Z_OK) { ERR("inflateInit failed: %d\n", zres); HeapFree(GetProcessHeap(), 0, gzip_stream); - return; + return ERROR_OUTOFMEMORY; } - req->gzip_stream = gzip_stream; - index = HTTP_GetCustomHeaderIndex(req, szContent_Length, 0, FALSE); if(index != -1) HTTP_DeleteCustomHeader(req, index); + + if(req->read_size) { + memcpy(gzip_stream->buf, req->read_buf+req->read_pos, req->read_size); + gzip_stream->buf_size = req->read_size; + req->read_pos = req->read_size = 0; + } + + req->read_gzip = TRUE; + gzip_stream->parent_stream = req->data_stream; + req->data_stream = &gzip_stream->stream; + return ERROR_SUCCESS; } #else -static void init_gzip_stream(http_request_t *req) +static DWORD init_gzip_stream(http_request_t *req) { ERR("gzip stream not supported, missing zlib.\n"); + return ERROR_SUCCESS; } #endif -/* set the request content length based on the headers */ -static DWORD set_content_length( http_request_t *lpwhr ) -{ - static const WCHAR szChunked[] = {'c','h','u','n','k','e','d',0}; - WCHAR encoding[20]; - DWORD size; - - size = sizeof(lpwhr->dwContentLength); - if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_CONTENT_LENGTH, - &lpwhr->dwContentLength, &size, NULL) != ERROR_SUCCESS) - lpwhr->dwContentLength = ~0u; - - size = sizeof(encoding); - if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_TRANSFER_ENCODING, encoding, &size, NULL) == ERROR_SUCCESS && - !strcmpiW(encoding, szChunked)) - { - lpwhr->dwContentLength = ~0u; - lpwhr->read_chunked = TRUE; - } - - if(lpwhr->decoding) { - int encoding_idx; - - static const WCHAR gzipW[] = {'g','z','i','p',0}; - - encoding_idx = HTTP_GetCustomHeaderIndex(lpwhr, szContent_Encoding, 0, FALSE); - if(encoding_idx != -1 && !strcmpiW(lpwhr->pCustHeaders[encoding_idx].lpszValue, gzipW)) - init_gzip_stream(lpwhr); - } - - return lpwhr->dwContentLength; -} - /*********************************************************************** * HTTP_Tokenize (internal) * @@ -361,7 +591,7 @@ static LPWSTR * HTTP_Tokenize(LPCWSTR string, LPCWSTR token_string) } /* add 1 for terminating NULL */ - token_array = HeapAlloc(GetProcessHeap(), 0, (tokens+1) * sizeof(*token_array)); + token_array = heap_alloc((tokens+1) * sizeof(*token_array)); token_array[tokens] = NULL; if (!tokens) return token_array; @@ -371,7 +601,7 @@ static LPWSTR * HTTP_Tokenize(LPCWSTR string, LPCWSTR token_string) next_token = strstrW(string, token_string); if (!next_token) next_token = string+strlenW(string); len = next_token - string; - token_array[i] = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR)); + token_array[i] = heap_alloc((len+1)*sizeof(WCHAR)); memcpy(token_array[i], string, len*sizeof(WCHAR)); token_array[i][len] = '\0'; string = next_token+strlenW(token_string); @@ -392,43 +622,42 @@ static void HTTP_FreeTokens(LPWSTR * token_array) HeapFree(GetProcessHeap(), 0, token_array); } -static void HTTP_FixURL(http_request_t *lpwhr) +static void HTTP_FixURL(http_request_t *request) { static const WCHAR szSlash[] = { '/',0 }; static const WCHAR szHttp[] = { 'h','t','t','p',':','/','/', 0 }; /* If we don't have a path we set it to root */ - if (NULL == lpwhr->lpszPath) - lpwhr->lpszPath = heap_strdupW(szSlash); + if (NULL == request->path) + request->path = heap_strdupW(szSlash); else /* remove \r and \n*/ { - int nLen = strlenW(lpwhr->lpszPath); - while ((nLen >0 ) && ((lpwhr->lpszPath[nLen-1] == '\r')||(lpwhr->lpszPath[nLen-1] == '\n'))) + int nLen = strlenW(request->path); + while ((nLen >0 ) && ((request->path[nLen-1] == '\r')||(request->path[nLen-1] == '\n'))) { nLen--; - lpwhr->lpszPath[nLen]='\0'; + request->path[nLen]='\0'; } /* Replace '\' with '/' */ while (nLen>0) { nLen--; - if (lpwhr->lpszPath[nLen] == '\\') lpwhr->lpszPath[nLen]='/'; + if (request->path[nLen] == '\\') request->path[nLen]='/'; } } if(CSTR_EQUAL != CompareStringW( LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, - lpwhr->lpszPath, strlenW(lpwhr->lpszPath), szHttp, strlenW(szHttp) ) - && lpwhr->lpszPath[0] != '/') /* not an absolute path ?? --> fix it !! */ + request->path, strlenW(request->path), szHttp, strlenW(szHttp) ) + && request->path[0] != '/') /* not an absolute path ?? --> fix it !! */ { - WCHAR *fixurl = HeapAlloc(GetProcessHeap(), 0, - (strlenW(lpwhr->lpszPath) + 2)*sizeof(WCHAR)); + WCHAR *fixurl = heap_alloc((strlenW(request->path) + 2)*sizeof(WCHAR)); *fixurl = '/'; - strcpyW(fixurl + 1, lpwhr->lpszPath); - HeapFree( GetProcessHeap(), 0, lpwhr->lpszPath ); - lpwhr->lpszPath = fixurl; + strcpyW(fixurl + 1, request->path); + HeapFree( GetProcessHeap(), 0, request->path ); + request->path = fixurl; } } -static LPWSTR HTTP_BuildHeaderRequestString( http_request_t *lpwhr, LPCWSTR verb, LPCWSTR path, LPCWSTR version ) +static LPWSTR HTTP_BuildHeaderRequestString( http_request_t *request, LPCWSTR verb, LPCWSTR path, LPCWSTR version ) { LPWSTR requestString; DWORD len, n; @@ -441,8 +670,8 @@ static LPWSTR HTTP_BuildHeaderRequestString( http_request_t *lpwhr, LPCWSTR verb static const WCHAR sztwocrlf[] = {'\r','\n','\r','\n', 0}; /* allocate space for an array of all the string pointers to be added */ - len = (lpwhr->nCustHeaders)*4 + 10; - req = HeapAlloc( GetProcessHeap(), 0, len*sizeof(LPCWSTR) ); + len = (request->nCustHeaders)*4 + 10; + req = heap_alloc(len*sizeof(LPCWSTR)); /* add the verb, path and HTTP version string */ n = 0; @@ -453,18 +682,18 @@ static LPWSTR HTTP_BuildHeaderRequestString( http_request_t *lpwhr, LPCWSTR verb req[n++] = version; /* Append custom request headers */ - for (i = 0; i < lpwhr->nCustHeaders; i++) + for (i = 0; i < request->nCustHeaders; i++) { - if (lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST) + if (request->custHeaders[i].wFlags & HDR_ISREQUEST) { req[n++] = szCrLf; - req[n++] = lpwhr->pCustHeaders[i].lpszField; + req[n++] = request->custHeaders[i].lpszField; req[n++] = szColon; - req[n++] = lpwhr->pCustHeaders[i].lpszValue; + req[n++] = request->custHeaders[i].lpszValue; TRACE("Adding custom header %s (%s)\n", - debugstr_w(lpwhr->pCustHeaders[i].lpszField), - debugstr_w(lpwhr->pCustHeaders[i].lpszValue)); + debugstr_w(request->custHeaders[i].lpszField), + debugstr_w(request->custHeaders[i].lpszValue)); } } @@ -487,32 +716,41 @@ static LPWSTR HTTP_BuildHeaderRequestString( http_request_t *lpwhr, LPCWSTR verb return requestString; } -static void HTTP_ProcessCookies( http_request_t *lpwhr ) +static void HTTP_ProcessCookies( http_request_t *request ) { int HeaderIndex; int numCookies = 0; LPHTTPHEADERW setCookieHeader; - while((HeaderIndex = HTTP_GetCustomHeaderIndex(lpwhr, szSet_Cookie, numCookies, FALSE)) != -1) + if(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) + return; + + while((HeaderIndex = HTTP_GetCustomHeaderIndex(request, szSet_Cookie, numCookies++, FALSE)) != -1) { - setCookieHeader = &lpwhr->pCustHeaders[HeaderIndex]; + HTTPHEADERW *host; + const WCHAR *data; + WCHAR *name; - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue) - { - int len; - static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','%','s',0}; - LPWSTR buf_url; - LPHTTPHEADERW Host; + setCookieHeader = &request->custHeaders[HeaderIndex]; - Host = HTTP_GetHeader(lpwhr, hostW); - len = lstrlenW(Host->lpszValue) + 9 + lstrlenW(lpwhr->lpszPath); - buf_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - sprintfW(buf_url, szFmt, Host->lpszValue, lpwhr->lpszPath); - InternetSetCookieW(buf_url, NULL, setCookieHeader->lpszValue); + if (!setCookieHeader->lpszValue) + continue; - HeapFree(GetProcessHeap(), 0, buf_url); - } - numCookies++; + host = HTTP_GetHeader(request, hostW); + if(!host) + continue; + + data = strchrW(setCookieHeader->lpszValue, '='); + if(!data) + continue; + + name = heap_strndupW(setCookieHeader->lpszValue, data-setCookieHeader->lpszValue); + if(!name) + continue; + + data++; + set_cookie(host->lpszValue, request->path, name, data); + heap_free(name); } } @@ -595,12 +833,12 @@ static UINT retrieve_cached_basic_authorization(LPWSTR host, LPWSTR realm, LPSTR EnterCriticalSection(&authcache_cs); LIST_FOR_EACH_ENTRY(ad, &basicAuthorizationCache, basicAuthorizationData, entry) { - if (!strcmpiW(host,ad->lpszwHost) && !strcmpW(realm,ad->lpszwRealm)) + if (!strcmpiW(host,ad->host) && !strcmpW(realm,ad->realm)) { TRACE("Authorization found in cache\n"); - *auth_data = HeapAlloc(GetProcessHeap(),0,ad->AuthorizationLen); - memcpy(*auth_data,ad->lpszAuthorization,ad->AuthorizationLen); - rc = ad->AuthorizationLen; + *auth_data = heap_alloc(ad->authorizationLen); + memcpy(*auth_data,ad->authorization,ad->authorizationLen); + rc = ad->authorizationLen; break; } } @@ -619,7 +857,7 @@ static void cache_basic_authorization(LPWSTR host, LPWSTR realm, LPSTR auth_data LIST_FOR_EACH(cursor, &basicAuthorizationCache) { basicAuthorizationData *check = LIST_ENTRY(cursor,basicAuthorizationData,entry); - if (!strcmpiW(host,check->lpszwHost) && !strcmpW(realm,check->lpszwRealm)) + if (!strcmpiW(host,check->host) && !strcmpW(realm,check->realm)) { ad = check; break; @@ -629,19 +867,19 @@ static void cache_basic_authorization(LPWSTR host, LPWSTR realm, LPSTR auth_data if (ad) { TRACE("Found match in cache, replacing\n"); - HeapFree(GetProcessHeap(),0,ad->lpszAuthorization); - ad->lpszAuthorization = HeapAlloc(GetProcessHeap(),0,auth_data_len); - memcpy(ad->lpszAuthorization, auth_data, auth_data_len); - ad->AuthorizationLen = auth_data_len; + HeapFree(GetProcessHeap(),0,ad->authorization); + ad->authorization = heap_alloc(auth_data_len); + memcpy(ad->authorization, auth_data, auth_data_len); + ad->authorizationLen = auth_data_len; } else { - ad = HeapAlloc(GetProcessHeap(),0,sizeof(basicAuthorizationData)); - ad->lpszwHost = heap_strdupW(host); - ad->lpszwRealm = heap_strdupW(realm); - ad->lpszAuthorization = HeapAlloc(GetProcessHeap(),0,auth_data_len); - memcpy(ad->lpszAuthorization, auth_data, auth_data_len); - ad->AuthorizationLen = auth_data_len; + ad = heap_alloc(sizeof(basicAuthorizationData)); + ad->host = heap_strdupW(host); + ad->host = heap_strdupW(realm); + ad->authorization = heap_alloc(auth_data_len); + memcpy(ad->authorization, auth_data, auth_data_len); + ad->authorizationLen = auth_data_len; list_add_head(&basicAuthorizationCache,&ad->entry); TRACE("authorization cached\n"); } @@ -662,7 +900,7 @@ static BOOL retrieve_cached_authorization(LPWSTR host, LPWSTR scheme, nt_auth_identity->User = heap_strdupW(ad->user); nt_auth_identity->Password = heap_strdupW(ad->password); - nt_auth_identity->Domain = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*ad->domain_len); + nt_auth_identity->Domain = heap_alloc(sizeof(WCHAR)*ad->domain_len); if(!nt_auth_identity->User || !nt_auth_identity->Password || (!nt_auth_identity->Domain && ad->domain_len)) { HeapFree(GetProcessHeap(), 0, nt_auth_identity->User); @@ -705,7 +943,7 @@ static void cache_authorization(LPWSTR host, LPWSTR scheme, HeapFree(GetProcessHeap(), 0, ad->password); HeapFree(GetProcessHeap(), 0, ad->domain); } else { - ad = HeapAlloc(GetProcessHeap(), 0, sizeof(authorizationData)); + ad = heap_alloc(sizeof(authorizationData)); if(!ad) { LeaveCriticalSection(&authcache_cs); return; @@ -737,7 +975,7 @@ static void cache_authorization(LPWSTR host, LPWSTR scheme, LeaveCriticalSection(&authcache_cs); } -static BOOL HTTP_DoAuthorization( http_request_t *lpwhr, LPCWSTR pszAuthValue, +static BOOL HTTP_DoAuthorization( http_request_t *request, LPCWSTR pszAuthValue, struct HttpAuthInfo **ppAuthInfo, LPWSTR domain_and_username, LPWSTR password, LPWSTR host ) @@ -754,7 +992,7 @@ static BOOL HTTP_DoAuthorization( http_request_t *lpwhr, LPCWSTR pszAuthValue, TimeStamp exp; first = TRUE; - pAuthInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*pAuthInfo)); + pAuthInfo = heap_alloc(sizeof(*pAuthInfo)); if (!pAuthInfo) return FALSE; @@ -889,7 +1127,7 @@ static BOOL HTTP_DoAuthorization( http_request_t *lpwhr, LPCWSTR pszAuthValue, passlen = WideCharToMultiByte(CP_UTF8, 0, password, lstrlenW(password), NULL, 0, NULL, NULL); /* length includes a nul terminator, which will be re-used for the ':' */ - auth_data = HeapAlloc(GetProcessHeap(), 0, userlen + 1 + passlen); + auth_data = heap_alloc(userlen + 1 + passlen); if (!auth_data) { HeapFree(GetProcessHeap(),0,szRealm); @@ -933,11 +1171,11 @@ static BOOL HTTP_DoAuthorization( http_request_t *lpwhr, LPCWSTR pszAuthValue, { pszAuthData++; in.cbBuffer = HTTP_DecodeBase64(pszAuthData, NULL); - in.pvBuffer = HeapAlloc(GetProcessHeap(), 0, in.cbBuffer); + in.pvBuffer = heap_alloc(in.cbBuffer); HTTP_DecodeBase64(pszAuthData, in.pvBuffer); } - buffer = HeapAlloc(GetProcessHeap(), 0, pAuthInfo->max_token); + buffer = heap_alloc(pAuthInfo->max_token); out.BufferType = SECBUFFER_TOKEN; out.cbBuffer = pAuthInfo->max_token; @@ -949,7 +1187,7 @@ static BOOL HTTP_DoAuthorization( http_request_t *lpwhr, LPCWSTR pszAuthValue, sec_status = InitializeSecurityContextW(first ? &pAuthInfo->cred : NULL, first ? NULL : &pAuthInfo->ctx, - first ? lpwhr->lpHttpSession->lpszServerName : NULL, + first ? request->session->serverName : NULL, context_req, 0, SECURITY_NETWORK_DREP, in.pvBuffer ? &in_desc : NULL, 0, &pAuthInfo->ctx, &out_desc, @@ -983,7 +1221,7 @@ static BOOL HTTP_DoAuthorization( http_request_t *lpwhr, LPCWSTR pszAuthValue, /*********************************************************************** * HTTP_HttpAddRequestHeadersW (internal) */ -static DWORD HTTP_HttpAddRequestHeadersW(http_request_t *lpwhr, +static DWORD HTTP_HttpAddRequestHeadersW(http_request_t *request, LPCWSTR lpszHeader, DWORD dwHeaderLength, DWORD dwModifier) { LPWSTR lpszStart; @@ -997,7 +1235,7 @@ static DWORD HTTP_HttpAddRequestHeadersW(http_request_t *lpwhr, len = strlenW(lpszHeader); else len = dwHeaderLength; - buffer = HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR)*(len+1) ); + buffer = heap_alloc(sizeof(WCHAR)*(len+1)); lstrcpynW( buffer, lpszHeader, len + 1); lpszStart = buffer; @@ -1034,9 +1272,9 @@ static DWORD HTTP_HttpAddRequestHeadersW(http_request_t *lpwhr, pFieldAndValue = HTTP_InterpretHttpHeader(lpszStart); if (pFieldAndValue) { - res = HTTP_VerifyValidHeader(lpwhr, pFieldAndValue[0]); + res = HTTP_VerifyValidHeader(request, pFieldAndValue[0]); if (res == ERROR_SUCCESS) - res = HTTP_ProcessHeader(lpwhr, pFieldAndValue[0], + res = HTTP_ProcessHeader(request, pFieldAndValue[0], pFieldAndValue[1], dwModifier | HTTP_ADDHDR_FLAG_REQ); HTTP_FreeTokens(pFieldAndValue); } @@ -1068,7 +1306,7 @@ static DWORD HTTP_HttpAddRequestHeadersW(http_request_t *lpwhr, BOOL WINAPI HttpAddRequestHeadersW(HINTERNET hHttpRequest, LPCWSTR lpszHeader, DWORD dwHeaderLength, DWORD dwModifier) { - http_request_t *lpwhr; + http_request_t *request; DWORD res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; TRACE("%p, %s, %i, %i\n", hHttpRequest, debugstr_wn(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier); @@ -1076,11 +1314,11 @@ BOOL WINAPI HttpAddRequestHeadersW(HINTERNET hHttpRequest, if (!lpszHeader) return TRUE; - lpwhr = (http_request_t*) WININET_GetObject( hHttpRequest ); - if (lpwhr && lpwhr->hdr.htype == WH_HHTTPREQ) - res = HTTP_HttpAddRequestHeadersW( lpwhr, lpszHeader, dwHeaderLength, dwModifier ); - if( lpwhr ) - WININET_Release( &lpwhr->hdr ); + request = (http_request_t*) get_handle_object( hHttpRequest ); + if (request && request->hdr.htype == WH_HHTTPREQ) + res = HTTP_HttpAddRequestHeadersW( request, lpszHeader, dwHeaderLength, dwModifier ); + if( request ) + WININET_Release( &request->hdr ); if(res != ERROR_SUCCESS) SetLastError(res); @@ -1107,7 +1345,7 @@ BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest, TRACE("%p, %s, %i, %i\n", hHttpRequest, debugstr_an(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier); len = MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, NULL, 0 ); - hdr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + hdr = heap_alloc(len*sizeof(WCHAR)); MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, hdr, len ); if( dwHeaderLength != ~0U ) dwHeaderLength = len; @@ -1195,7 +1433,7 @@ HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession, __ENDTRY; types++; } - szAcceptTypes = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *) * (acceptTypesCount+1)); + szAcceptTypes = heap_alloc(sizeof(WCHAR *) * (acceptTypesCount+1)); if (!szAcceptTypes) goto end; acceptTypesCount = 0; @@ -1377,7 +1615,7 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin ) * * Insert or delete the authorization field in the request header. */ -static BOOL HTTP_InsertAuthorization( http_request_t *lpwhr, struct HttpAuthInfo *pAuthInfo, LPCWSTR header ) +static BOOL HTTP_InsertAuthorization( http_request_t *request, struct HttpAuthInfo *pAuthInfo, LPCWSTR header ) { if (pAuthInfo) { @@ -1390,7 +1628,7 @@ static BOOL HTTP_InsertAuthorization( http_request_t *lpwhr, struct HttpAuthInfo { /* scheme + space + base64 encoded data (3/2/1 bytes data -> 4 bytes of characters) */ len = strlenW(pAuthInfo->scheme)+1+((pAuthInfo->auth_data_len+2)*4)/3; - authorization = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR)); + authorization = heap_alloc((len+1)*sizeof(WCHAR)); if (!authorization) return FALSE; @@ -1413,7 +1651,7 @@ static BOOL HTTP_InsertAuthorization( http_request_t *lpwhr, struct HttpAuthInfo TRACE("Inserting authorization: %s\n", debugstr_w(authorization)); - HTTP_ProcessHeader(lpwhr, header, authorization, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE); + HTTP_ProcessHeader(request, header, authorization, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE); HeapFree(GetProcessHeap(), 0, authorization); } @@ -1428,27 +1666,27 @@ static WCHAR *HTTP_BuildProxyRequestUrl(http_request_t *req) size = sizeof(new_location); if (HTTP_HttpQueryInfoW(req, HTTP_QUERY_LOCATION, new_location, &size, NULL) == ERROR_SUCCESS) { - if (!(url = HeapAlloc( GetProcessHeap(), 0, size + sizeof(WCHAR) ))) return NULL; + if (!(url = heap_alloc(size + sizeof(WCHAR)))) return NULL; strcpyW( url, new_location ); } else { static const WCHAR slash[] = { '/',0 }; - static const WCHAR format[] = { 'h','t','t','p',':','/','/','%','s',':','%','d',0 }; - static const WCHAR formatSSL[] = { 'h','t','t','p','s',':','/','/','%','s',':','%','d',0 }; - http_session_t *session = req->lpHttpSession; + static const WCHAR format[] = { 'h','t','t','p',':','/','/','%','s',':','%','u',0 }; + static const WCHAR formatSSL[] = { 'h','t','t','p','s',':','/','/','%','s',':','%','u',0 }; + http_session_t *session = req->session; size = 16; /* "https://" + sizeof(port#) + ":/\0" */ - size += strlenW( session->lpszHostName ) + strlenW( req->lpszPath ); + size += strlenW( session->hostName ) + strlenW( req->path ); - if (!(url = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) return NULL; + if (!(url = heap_alloc(size * sizeof(WCHAR)))) return NULL; if (req->hdr.dwFlags & INTERNET_FLAG_SECURE) - sprintfW( url, formatSSL, session->lpszHostName, session->nHostPort ); + sprintfW( url, formatSSL, session->hostName, session->hostPort ); else - sprintfW( url, format, session->lpszHostName, session->nHostPort ); - if (req->lpszPath[0] != '/') strcatW( url, slash ); - strcatW( url, req->lpszPath ); + sprintfW( url, format, session->hostName, session->hostPort ); + if (req->path[0] != '/') strcatW( url, slash ); + strcatW( url, req->path ); } TRACE("url=%s\n", debugstr_w(url)); return url; @@ -1457,7 +1695,7 @@ static WCHAR *HTTP_BuildProxyRequestUrl(http_request_t *req) /*********************************************************************** * HTTP_DealWithProxy */ -static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *lpwhs, http_request_t *lpwhr) +static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *session, http_request_t *request) { WCHAR buf[MAXHOSTNAME]; WCHAR protoProxy[MAXHOSTNAME + 15]; @@ -1474,7 +1712,7 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *lpwhs, http_reque UrlComponents.lpszHostName = buf; UrlComponents.dwHostNameLength = MAXHOSTNAME; - if (!INTERNET_FindProxyForProtocol(hIC->lpszProxy, protoHttp, protoProxy, &protoProxyLen)) + if (!INTERNET_FindProxyForProtocol(hIC->proxy, protoHttp, protoProxy, &protoProxyLen)) return FALSE; if( CSTR_EQUAL != CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, protoProxy,strlenW(szHttp),szHttp,strlenW(szHttp)) ) @@ -1486,72 +1724,80 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *lpwhs, http_reque if( UrlComponents.dwHostNameLength == 0 ) return FALSE; - if( !lpwhr->lpszPath ) - lpwhr->lpszPath = szNul; + if( !request->path ) + request->path = szNul; if(UrlComponents.nPort == INTERNET_INVALID_PORT_NUMBER) UrlComponents.nPort = INTERNET_DEFAULT_HTTP_PORT; - HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); - lpwhs->lpszServerName = heap_strdupW(UrlComponents.lpszHostName); - lpwhs->nServerPort = UrlComponents.nPort; + HeapFree(GetProcessHeap(), 0, session->serverName); + session->serverName = heap_strdupW(UrlComponents.lpszHostName); + session->serverPort = UrlComponents.nPort; - TRACE("proxy server=%s port=%d\n", debugstr_w(lpwhs->lpszServerName), lpwhs->nServerPort); + TRACE("proxy server=%s port=%d\n", debugstr_w(session->serverName), session->serverPort); return TRUE; } -#ifndef INET6_ADDRSTRLEN -#define INET6_ADDRSTRLEN 46 -#endif - -static DWORD HTTP_ResolveName(http_request_t *lpwhr) +static DWORD HTTP_ResolveName(http_request_t *request, server_t *server) { - char szaddr[INET6_ADDRSTRLEN]; - http_session_t *lpwhs = lpwhr->lpHttpSession; + socklen_t addr_len; const void *addr; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, - INTERNET_STATUS_RESOLVING_NAME, - lpwhs->lpszServerName, - (strlenW(lpwhs->lpszServerName)+1) * sizeof(WCHAR)); + if(server->addr_len) + return ERROR_SUCCESS; - lpwhs->sa_len = sizeof(lpwhs->socketAddress); - if (!GetAddress(lpwhs->lpszServerName, lpwhs->nServerPort, - (struct sockaddr *)&lpwhs->socketAddress, &lpwhs->sa_len)) + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, + INTERNET_STATUS_RESOLVING_NAME, + server->name, + (strlenW(server->name)+1) * sizeof(WCHAR)); + + addr_len = sizeof(server->addr); + if (!GetAddress(server->name, server->port, (struct sockaddr *)&server->addr, &addr_len)) return ERROR_INTERNET_NAME_NOT_RESOLVED; - switch (lpwhs->socketAddress.ss_family) - { + switch(server->addr.ss_family) { case AF_INET: - addr = &((struct sockaddr_in *)&lpwhs->socketAddress)->sin_addr; + addr = &((struct sockaddr_in *)&server->addr)->sin_addr; break; case AF_INET6: - addr = &((struct sockaddr_in6 *)&lpwhs->socketAddress)->sin6_addr; + addr = &((struct sockaddr_in6 *)&server->addr)->sin6_addr; break; default: - WARN("unsupported family %d\n", lpwhs->socketAddress.ss_family); + WARN("unsupported family %d\n", server->addr.ss_family); return ERROR_INTERNET_NAME_NOT_RESOLVED; } - inet_ntop(lpwhs->socketAddress.ss_family, addr, szaddr, sizeof(szaddr)); - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, - INTERNET_STATUS_NAME_RESOLVED, - szaddr, strlen(szaddr)+1); - TRACE("resolved %s to %s\n", debugstr_w(lpwhs->lpszServerName), szaddr); + server->addr_len = addr_len; + inet_ntop(server->addr.ss_family, addr, server->addr_str, sizeof(server->addr_str)); + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, + INTERNET_STATUS_NAME_RESOLVED, + server->addr_str, strlen(server->addr_str)+1); + + TRACE("resolved %s to %s\n", debugstr_w(server->name), server->addr_str); return ERROR_SUCCESS; } static BOOL HTTP_GetRequestURL(http_request_t *req, LPWSTR buf) { + static const WCHAR http[] = { 'h','t','t','p',':','/','/',0 }; + static const WCHAR https[] = { 'h','t','t','p','s',':','/','/',0 }; + static const WCHAR slash[] = { '/',0 }; LPHTTPHEADERW host_header; - - static const WCHAR formatW[] = {'h','t','t','p',':','/','/','%','s','%','s',0}; + LPCWSTR scheme; host_header = HTTP_GetHeader(req, hostW); if(!host_header) return FALSE; - sprintfW(buf, formatW, host_header->lpszValue, req->lpszPath); /* FIXME */ + if (req->hdr.dwFlags & INTERNET_FLAG_SECURE) + scheme = https; + else + scheme = http; + strcpyW(buf, scheme); + strcatW(buf, host_header->lpszValue); + if (req->path[0] != '/') + strcatW(buf, slash); + strcatW(buf, req->path); return TRUE; } @@ -1564,75 +1810,117 @@ static BOOL HTTP_GetRequestURL(http_request_t *req, LPWSTR buf) */ static void HTTPREQ_Destroy(object_header_t *hdr) { - http_request_t *lpwhr = (http_request_t*) hdr; + http_request_t *request = (http_request_t*) hdr; DWORD i; TRACE("\n"); - if(lpwhr->hCacheFile) { + if(request->hCacheFile) { WCHAR url[INTERNET_MAX_URL_LENGTH]; - FILETIME ft; - CloseHandle(lpwhr->hCacheFile); + CloseHandle(request->hCacheFile); - memset(&ft, 0, sizeof(FILETIME)); - if(HTTP_GetRequestURL(lpwhr, url)) { - CommitUrlCacheEntryW(url, lpwhr->lpszCacheFile, ft, ft, - NORMAL_CACHE_ENTRY, NULL, 0, NULL, 0); + if(HTTP_GetRequestURL(request, url)) { + DWORD headersLen; + + headersLen = request->rawHeaders ? strlenW(request->rawHeaders) : 0; + CommitUrlCacheEntryW(url, request->cacheFile, request->expires, + request->last_modified, NORMAL_CACHE_ENTRY, + request->rawHeaders, headersLen, NULL, 0); } } - HeapFree(GetProcessHeap(), 0, lpwhr->lpszCacheFile); + HeapFree(GetProcessHeap(), 0, request->cacheFile); - DeleteCriticalSection( &lpwhr->read_section ); - WININET_Release(&lpwhr->lpHttpSession->hdr); + DeleteCriticalSection( &request->read_section ); + WININET_Release(&request->session->hdr); - destroy_authinfo(lpwhr->pAuthInfo); - destroy_authinfo(lpwhr->pProxyAuthInfo); + destroy_authinfo(request->authInfo); + destroy_authinfo(request->proxyAuthInfo); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszPath); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszRawHeaders); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszVersion); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszStatusText); + HeapFree(GetProcessHeap(), 0, request->path); + HeapFree(GetProcessHeap(), 0, request->verb); + HeapFree(GetProcessHeap(), 0, request->rawHeaders); + HeapFree(GetProcessHeap(), 0, request->version); + HeapFree(GetProcessHeap(), 0, request->statusText); - for (i = 0; i < lpwhr->nCustHeaders; i++) + for (i = 0; i < request->nCustHeaders; i++) { - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszField); - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszValue); + HeapFree(GetProcessHeap(), 0, request->custHeaders[i].lpszField); + HeapFree(GetProcessHeap(), 0, request->custHeaders[i].lpszValue); } -#ifdef HAVE_ZLIB - if(lpwhr->gzip_stream) { - if(!lpwhr->gzip_stream->end_of_data) - inflateEnd(&lpwhr->gzip_stream->zstream); - HeapFree(GetProcessHeap(), 0, lpwhr->gzip_stream); - } -#endif - - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders); - HeapFree(GetProcessHeap(), 0, lpwhr); + destroy_data_stream(request->data_stream); + HeapFree(GetProcessHeap(), 0, request->custHeaders); } -static void HTTPREQ_CloseConnection(object_header_t *hdr) +static void http_release_netconn(http_request_t *req, BOOL reuse) { - http_request_t *lpwhr = (http_request_t*) hdr; + TRACE("%p %p\n",req, req->netconn); - TRACE("%p\n",lpwhr); - - if (!NETCON_connected(&lpwhr->netConnection)) + if(!req->netconn) return; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + if(reuse && req->netconn->keep_alive) { + BOOL run_collector; + + EnterCriticalSection(&connection_pool_cs); + + list_add_head(&req->netconn->server->conn_pool, &req->netconn->pool_entry); + req->netconn->keep_until = (DWORD64)GetTickCount() + COLLECT_TIME; + req->netconn = NULL; + + run_collector = !collector_running; + collector_running = TRUE; + + LeaveCriticalSection(&connection_pool_cs); + + if(run_collector) { + HANDLE thread = NULL; + HMODULE module; + + GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (const WCHAR*)WININET_hModule, &module); + if(module) + thread = CreateThread(NULL, 0, collect_connections_proc, NULL, 0, NULL); + if(!thread) { + EnterCriticalSection(&connection_pool_cs); + collector_running = FALSE; + LeaveCriticalSection(&connection_pool_cs); + + if(module) + FreeLibrary(module); + } + } + return; + } + + INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_CLOSING_CONNECTION, 0, 0); - NETCON_close(&lpwhr->netConnection); + free_netconn(req->netconn); + req->netconn = NULL; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_CONNECTION_CLOSED, 0, 0); } -static BOOL HTTP_KeepAlive(http_request_t *lpwhr) +static void drain_content(http_request_t *req) +{ + BOOL try_reuse; + + if (!req->netconn) return; + + if (req->contentLength == -1) + try_reuse = FALSE; + else if(!strcmpW(req->verb, szHEAD)) + try_reuse = TRUE; + else + try_reuse = req->data_stream->vtbl->drain_content(req->data_stream, req); + + http_release_netconn(req, try_reuse); +} + +static BOOL HTTP_KeepAlive(http_request_t *request) { WCHAR szVersion[10]; WCHAR szConnectionResponse[20]; @@ -1641,15 +1929,15 @@ static BOOL HTTP_KeepAlive(http_request_t *lpwhr) /* as per RFC 2068, S8.1.2.1, if the client is HTTP/1.1 then assume that * the connection is keep-alive by default */ - if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_VERSION, szVersion, &dwBufferSize, NULL) == ERROR_SUCCESS + if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_VERSION, szVersion, &dwBufferSize, NULL) == ERROR_SUCCESS && !strcmpiW(szVersion, g_szHttp1_1)) { keepalive = TRUE; } dwBufferSize = sizeof(szConnectionResponse); - if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) == ERROR_SUCCESS - || HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) == ERROR_SUCCESS) + if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_PROXY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) == ERROR_SUCCESS + || HTTP_HttpQueryInfoW(request, HTTP_QUERY_CONNECTION, szConnectionResponse, &dwBufferSize, NULL) == ERROR_SUCCESS) { keepalive = !strcmpiW(szConnectionResponse, szKeepAlive); } @@ -1657,6 +1945,13 @@ static BOOL HTTP_KeepAlive(http_request_t *lpwhr) return keepalive; } +static void HTTPREQ_CloseConnection(object_header_t *hdr) +{ + http_request_t *req = (http_request_t*)hdr; + + drain_content(req); +} + static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) { http_request_t *req = (http_request_t*)hdr; @@ -1664,7 +1959,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe switch(option) { case INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO: { - http_session_t *lpwhs = req->lpHttpSession; + http_session_t *session = req->session; INTERNET_DIAGNOSTIC_SOCKET_INFO *info = buffer; FIXME("INTERNET_DIAGNOSTIC_SOCKET_INFO stub\n"); @@ -1678,13 +1973,13 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe info->Socket = 0; /* FIXME: get source port from req->netConnection */ info->SourcePort = 0; - info->DestPort = lpwhs->nHostPort; + info->DestPort = session->hostPort; info->Flags = 0; if (HTTP_KeepAlive(req)) info->Flags |= IDSI_FLAG_KEEP_ALIVE; - if (lpwhs->lpAppInfo->lpszProxy && lpwhs->lpAppInfo->lpszProxy[0] != 0) + if (session->appInfo->proxy && session->appInfo->proxy[0] != 0) info->Flags |= IDSI_FLAG_PROXY; - if (req->netConnection.useSSL) + if (req->netconn->useSSL) info->Flags |= IDSI_FLAG_SECURE; return ERROR_SUCCESS; @@ -1693,7 +1988,6 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe case INTERNET_OPTION_SECURITY_FLAGS: { DWORD flags; - int bits; if (*size < sizeof(ULONG)) return ERROR_INSUFFICIENT_BUFFER; @@ -1702,14 +1996,16 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe flags = 0; if (req->hdr.dwFlags & INTERNET_FLAG_SECURE) flags |= SECURITY_FLAG_SECURE; - flags |= req->netConnection.security_flags; - bits = NETCON_GetCipherStrength(&req->netConnection); - if (bits >= 128) - flags |= SECURITY_FLAG_STRENGTH_STRONG; - else if (bits >= 56) - flags |= SECURITY_FLAG_STRENGTH_MEDIUM; - else - flags |= SECURITY_FLAG_STRENGTH_WEAK; + flags |= req->security_flags; + if(req->netconn) { + int bits = NETCON_GetCipherStrength(req->netconn); + if (bits >= 128) + flags |= SECURITY_FLAG_STRENGTH_STRONG; + else if (bits >= 56) + flags |= SECURITY_FLAG_STRENGTH_MEDIUM; + else + flags |= SECURITY_FLAG_STRENGTH_WEAK; + } *(DWORD *)buffer = flags; return ERROR_SUCCESS; } @@ -1739,7 +2035,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe strcatW(url, host->lpszValue); if (NULL != (pch = strchrW(url + strlenW(httpW), ':'))) *pch = 0; - strcatW(url, req->lpszPath); + strcatW(url, req->path); TRACE("INTERNET_OPTION_URL: %s\n",debugstr_w(url)); @@ -1781,7 +2077,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe error = GetLastError(); if (!ret && error == ERROR_INSUFFICIENT_BUFFER) { - if (!(info = HeapAlloc(GetProcessHeap(), 0, nbytes))) + if (!(info = heap_alloc(nbytes))) return ERROR_OUTOFMEMORY; GetUrlCacheEntryInfoW(url, info, &nbytes); @@ -1801,25 +2097,25 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe TRACE("INTERNET_OPTION_DATAFILE_NAME\n"); - if(!req->lpszCacheFile) { + if(!req->cacheFile) { *size = 0; return ERROR_INTERNET_ITEM_NOT_FOUND; } if(unicode) { - req_size = (lstrlenW(req->lpszCacheFile)+1) * sizeof(WCHAR); + req_size = (lstrlenW(req->cacheFile)+1) * sizeof(WCHAR); if(*size < req_size) return ERROR_INSUFFICIENT_BUFFER; *size = req_size; - memcpy(buffer, req->lpszCacheFile, *size); + memcpy(buffer, req->cacheFile, *size); return ERROR_SUCCESS; }else { - req_size = WideCharToMultiByte(CP_ACP, 0, req->lpszCacheFile, -1, NULL, 0, NULL, NULL); + req_size = WideCharToMultiByte(CP_ACP, 0, req->cacheFile, -1, NULL, 0, NULL, NULL); if (req_size > *size) return ERROR_INSUFFICIENT_BUFFER; - *size = WideCharToMultiByte(CP_ACP, 0, req->lpszCacheFile, + *size = WideCharToMultiByte(CP_ACP, 0, req->cacheFile, -1, buffer, *size, NULL, NULL); return ERROR_SUCCESS; } @@ -1833,7 +2129,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe return ERROR_INSUFFICIENT_BUFFER; } - context = (PCCERT_CONTEXT)NETCON_GetCert(&(req->netConnection)); + context = (PCCERT_CONTEXT)NETCON_GetCert(req->netconn); if(context) { INTERNET_CERTIFICATE_INFOA *info = (INTERNET_CERTIFICATE_INFOA*)buffer; DWORD len; @@ -1855,7 +2151,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe CertNameToStrA(context->dwCertEncodingType, &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, info->lpszIssuerInfo, len); - info->dwKeySize = NETCON_GetCipherStrength(&req->netConnection); + info->dwKeySize = NETCON_GetCipherStrength(req->netconn); CertFreeCertificateContext(context); return ERROR_SUCCESS; } @@ -1878,7 +2174,9 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer, return ERROR_INVALID_PARAMETER; flags = *(DWORD *)buffer; TRACE("%08x\n", flags); - req->netConnection.security_flags = flags; + req->security_flags = flags; + if(req->netconn) + req->netconn->security_flags = flags; return ERROR_SUCCESS; } case INTERNET_OPTION_SEND_TIMEOUT: @@ -1888,17 +2186,22 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer, if (size != sizeof(DWORD)) return ERROR_INVALID_PARAMETER; - return NETCON_set_timeout(&req->netConnection, option == INTERNET_OPTION_SEND_TIMEOUT, + if(!req->netconn) { + FIXME("unsupported without active connection\n"); + return ERROR_SUCCESS; + } + + return NETCON_set_timeout(req->netconn, option == INTERNET_OPTION_SEND_TIMEOUT, *(DWORD*)buffer); case INTERNET_OPTION_USERNAME: - HeapFree(GetProcessHeap(), 0, req->lpHttpSession->lpszUserName); - if (!(req->lpHttpSession->lpszUserName = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; + HeapFree(GetProcessHeap(), 0, req->session->userName); + if (!(req->session->userName = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; return ERROR_SUCCESS; case INTERNET_OPTION_PASSWORD: - HeapFree(GetProcessHeap(), 0, req->lpHttpSession->lpszPassword); - if (!(req->lpHttpSession->lpszPassword = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; + HeapFree(GetProcessHeap(), 0, req->session->password); + if (!(req->session->password = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; return ERROR_SUCCESS; case INTERNET_OPTION_HTTP_DECODING: if(size != sizeof(BOOL)) @@ -1926,7 +2229,7 @@ static DWORD read_more_data( http_request_t *req, int maxlen ) if (maxlen == -1) maxlen = sizeof(req->read_buf); - res = NETCON_recv( &req->netConnection, req->read_buf + req->read_size, + res = NETCON_recv( req->netconn, req->read_buf + req->read_size, maxlen - req->read_size, 0, &len ); if(res == ERROR_SUCCESS) req->read_size += len; @@ -1967,7 +2270,7 @@ static BOOL read_line( http_request_t *req, LPSTR buffer, DWORD *len ) if ((res = read_more_data( req, -1 )) != ERROR_SUCCESS || !req->read_size) { *len = 0; - TRACE( "returning empty string\n" ); + TRACE( "returning empty string %u\n", res); LeaveCriticalSection( &req->read_section ); INTERNET_SetLastError(res); return FALSE; @@ -1985,187 +2288,382 @@ static BOOL read_line( http_request_t *req, LPSTR buffer, DWORD *len ) return TRUE; } +/* check if we have reached the end of the data to read (the read section must be held) */ +static BOOL end_of_read_data( http_request_t *req ) +{ + return !req->read_size && req->data_stream->vtbl->end_of_data(req->data_stream, req); +} + +/* fetch some more data into the read buffer (the read section must be held) */ +static DWORD refill_read_buffer(http_request_t *req, read_mode_t read_mode, DWORD *read_bytes) +{ + DWORD res, read=0; + + if(req->read_size == sizeof(req->read_buf)) + return ERROR_SUCCESS; + + if(req->read_pos) { + if(req->read_size) + memmove(req->read_buf, req->read_buf+req->read_pos, req->read_size); + req->read_pos = 0; + } + + res = req->data_stream->vtbl->read(req->data_stream, req, req->read_buf+req->read_size, + sizeof(req->read_buf)-req->read_size, &read, read_mode); + req->read_size += read; + + TRACE("read %u bytes, read_size %u\n", read, req->read_size); + if(read_bytes) + *read_bytes = read; + return res; +} + +/* return the size of data available to be read immediately (the read section must be held) */ +static DWORD get_avail_data( http_request_t *req ) +{ + return req->read_size + req->data_stream->vtbl->get_avail_data(req->data_stream, req); +} + +static DWORD netconn_get_avail_data(data_stream_t *stream, http_request_t *req) +{ + netconn_stream_t *netconn_stream = (netconn_stream_t*)stream; + DWORD avail = 0; + + if(req->netconn) + NETCON_query_data_available(req->netconn, &avail); + return netconn_stream->content_length == ~0u + ? avail + : min(avail, netconn_stream->content_length-netconn_stream->content_read); +} + +static BOOL netconn_end_of_data(data_stream_t *stream, http_request_t *req) +{ + netconn_stream_t *netconn_stream = (netconn_stream_t*)stream; + return netconn_stream->content_read == netconn_stream->content_length || !req->netconn; +} + +static DWORD netconn_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DWORD size, + DWORD *read, read_mode_t read_mode) +{ + netconn_stream_t *netconn_stream = (netconn_stream_t*)stream; + int len = 0; + + size = min(size, netconn_stream->content_length-netconn_stream->content_read); + + if(read_mode == READMODE_NOBLOCK) + size = min(size, netconn_get_avail_data(stream, req)); + + if(size && req->netconn) { + if(NETCON_recv(req->netconn, buf, size, read_mode == READMODE_SYNC ? MSG_WAITALL : 0, &len) != ERROR_SUCCESS) + len = 0; + } + + netconn_stream->content_read += *read = len; + TRACE("read %u bytes\n", len); + return ERROR_SUCCESS; +} + +static BOOL netconn_drain_content(data_stream_t *stream, http_request_t *req) +{ + netconn_stream_t *netconn_stream = (netconn_stream_t*)stream; + BYTE buf[1024]; + DWORD avail; + int len; + + if(netconn_end_of_data(stream, req)) + return TRUE; + + do { + avail = netconn_get_avail_data(stream, req); + if(!avail) + return FALSE; + + if(NETCON_recv(req->netconn, buf, min(avail, sizeof(buf)), 0, &len) != ERROR_SUCCESS) + return FALSE; + + netconn_stream->content_read += len; + }while(netconn_stream->content_read < netconn_stream->content_length); + + return TRUE; +} + +static void netconn_destroy(data_stream_t *stream) +{ +} + +static const data_stream_vtbl_t netconn_stream_vtbl = { + netconn_get_avail_data, + netconn_end_of_data, + netconn_read, + netconn_drain_content, + netconn_destroy +}; + +/* read some more data into the read buffer (the read section must be held) */ +static DWORD read_more_chunked_data(chunked_stream_t *stream, http_request_t *req, int maxlen) +{ + DWORD res; + int len; + + if (stream->buf_pos) + { + /* move existing data to the start of the buffer */ + if(stream->buf_size) + memmove(stream->buf, stream->buf + stream->buf_pos, stream->buf_size); + stream->buf_pos = 0; + } + + if (maxlen == -1) maxlen = sizeof(stream->buf); + + res = NETCON_recv( req->netconn, stream->buf + stream->buf_size, + maxlen - stream->buf_size, 0, &len ); + if(res == ERROR_SUCCESS) + stream->buf_size += len; + + return res; +} + +/* remove some amount of data from the read buffer (the read section must be held) */ +static void remove_chunked_data(chunked_stream_t *stream, int count) +{ + if (!(stream->buf_size -= count)) stream->buf_pos = 0; + else stream->buf_pos += count; +} + /* discard data contents until we reach end of line (the read section must be held) */ -static DWORD discard_eol( http_request_t *req ) +static DWORD discard_chunked_eol(chunked_stream_t *stream, http_request_t *req) { DWORD res; do { - BYTE *eol = memchr( req->read_buf + req->read_pos, '\n', req->read_size ); + BYTE *eol = memchr(stream->buf + stream->buf_pos, '\n', stream->buf_size); if (eol) { - remove_data( req, (eol + 1) - (req->read_buf + req->read_pos) ); + remove_chunked_data(stream, (eol + 1) - (stream->buf + stream->buf_pos)); break; } - req->read_pos = req->read_size = 0; /* discard everything */ - if ((res = read_more_data( req, -1 )) != ERROR_SUCCESS) return res; - } while (req->read_size); + stream->buf_pos = stream->buf_size = 0; /* discard everything */ + if ((res = read_more_chunked_data(stream, req, -1)) != ERROR_SUCCESS) return res; + } while (stream->buf_size); return ERROR_SUCCESS; } /* read the size of the next chunk (the read section must be held) */ -static DWORD start_next_chunk( http_request_t *req ) +static DWORD start_next_chunk(chunked_stream_t *stream, http_request_t *req) { + /* TODOO */ DWORD chunk_size = 0, res; - if (!req->dwContentLength) return ERROR_SUCCESS; - if (req->dwContentLength == req->dwContentRead) - { - /* read terminator for the previous chunk */ - if ((res = discard_eol( req )) != ERROR_SUCCESS) return res; - req->dwContentLength = ~0u; - req->dwContentRead = 0; - } + if(stream->chunk_size != ~0u && (res = discard_chunked_eol(stream, req)) != ERROR_SUCCESS) + return res; + for (;;) { - while (req->read_size) + while (stream->buf_size) { - char ch = req->read_buf[req->read_pos]; + char ch = stream->buf[stream->buf_pos]; if (ch >= '0' && ch <= '9') chunk_size = chunk_size * 16 + ch - '0'; else if (ch >= 'a' && ch <= 'f') chunk_size = chunk_size * 16 + ch - 'a' + 10; else if (ch >= 'A' && ch <= 'F') chunk_size = chunk_size * 16 + ch - 'A' + 10; else if (ch == ';' || ch == '\r' || ch == '\n') { TRACE( "reading %u byte chunk\n", chunk_size ); - req->dwContentLength = chunk_size; - req->dwContentRead = 0; - return discard_eol( req ); + stream->chunk_size = chunk_size; + req->contentLength += chunk_size; + return discard_chunked_eol(stream, req); } - remove_data( req, 1 ); + remove_chunked_data(stream, 1); } - if ((res = read_more_data( req, -1 )) != ERROR_SUCCESS) return res; - if (!req->read_size) + if ((res = read_more_chunked_data(stream, req, -1)) != ERROR_SUCCESS) return res; + if (!stream->buf_size) { - req->dwContentLength = req->dwContentRead = 0; + stream->chunk_size = 0; return ERROR_SUCCESS; } } } -/* check if we have reached the end of the data to read (the read section must be held) */ -static BOOL end_of_read_data( http_request_t *req ) +static DWORD chunked_get_avail_data(data_stream_t *stream, http_request_t *req) { - if (req->gzip_stream) return req->gzip_stream->end_of_data && !req->gzip_stream->buf_size; - if (req->read_chunked) return (req->dwContentLength == 0); - if (req->dwContentLength == ~0u) return FALSE; - return (req->dwContentLength == req->dwContentRead); + /* Allow reading only from read buffer */ + return 0; } -/* fetch some more data into the read buffer (the read section must be held) */ -static DWORD refill_buffer( http_request_t *req ) +static BOOL chunked_end_of_data(data_stream_t *stream, http_request_t *req) { - int len = sizeof(req->read_buf); - DWORD res; + chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; + return !chunked_stream->chunk_size; +} - if (req->read_chunked && (req->dwContentLength == ~0u || req->dwContentLength == req->dwContentRead)) - { - if ((res = start_next_chunk( req )) != ERROR_SUCCESS) return res; +static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DWORD size, + DWORD *read, read_mode_t read_mode) +{ + chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; + DWORD read_bytes = 0, ret_read = 0, res = ERROR_SUCCESS; + + if(chunked_stream->chunk_size == ~0u) { + res = start_next_chunk(chunked_stream, req); + if(res != ERROR_SUCCESS) + return res; } - if (req->dwContentLength != ~0u) len = min( len, req->dwContentLength - req->dwContentRead ); - if (len <= req->read_size) return ERROR_SUCCESS; + while(size && chunked_stream->chunk_size) { + if(chunked_stream->buf_size) { + read_bytes = min(size, min(chunked_stream->buf_size, chunked_stream->chunk_size)); - if ((res = read_more_data( req, len )) != ERROR_SUCCESS) return res; - if (!req->read_size) req->dwContentLength = req->dwContentRead = 0; - return ERROR_SUCCESS; -} + /* this could block */ + if(read_mode == READMODE_NOBLOCK && read_bytes == chunked_stream->chunk_size) + break; -static DWORD read_gzip_data(http_request_t *req, BYTE *buf, int size, BOOL sync, int *read_ret) -{ - DWORD ret = ERROR_SUCCESS; - int read = 0; + memcpy(buf+ret_read, chunked_stream->buf+chunked_stream->buf_pos, read_bytes); + remove_chunked_data(chunked_stream, read_bytes); + }else { + read_bytes = min(size, chunked_stream->chunk_size); -#ifdef HAVE_ZLIB - z_stream *zstream = &req->gzip_stream->zstream; - DWORD buf_avail; - int zres; + if(read_mode == READMODE_NOBLOCK) { + DWORD avail; - while(read < size && !req->gzip_stream->end_of_data) { - if(!req->read_size) { - if(!sync || refill_buffer(req) != ERROR_SUCCESS) + if(!NETCON_query_data_available(req->netconn, &avail) || !avail) + break; + if(read_bytes > avail) + read_bytes = avail; + + /* this could block */ + if(read_bytes == chunked_stream->chunk_size) + break; + } + + res = NETCON_recv(req->netconn, (char *)buf+ret_read, read_bytes, 0, (int*)&read_bytes); + if(res != ERROR_SUCCESS) break; } - if(req->dwContentRead == req->dwContentLength) - break; - - buf_avail = req->dwContentLength == ~0 ? req->read_size : min(req->read_size, req->dwContentLength-req->dwContentRead); - - zstream->next_in = req->read_buf+req->read_pos; - zstream->avail_in = buf_avail; - zstream->next_out = buf+read; - zstream->avail_out = size-read; - zres = inflate(zstream, Z_FULL_FLUSH); - read = size - zstream->avail_out; - req->dwContentRead += buf_avail-zstream->avail_in; - remove_data(req, buf_avail-zstream->avail_in); - if(zres == Z_STREAM_END) { - TRACE("end of data\n"); - req->gzip_stream->end_of_data = TRUE; - inflateEnd(&req->gzip_stream->zstream); - }else if(zres != Z_OK) { - WARN("inflate failed %d\n", zres); - if(!read) - ret = ERROR_INTERNET_DECODING_FAILED; - break; + chunked_stream->chunk_size -= read_bytes; + size -= read_bytes; + ret_read += read_bytes; + if(!chunked_stream->chunk_size) { + assert(read_mode != READMODE_NOBLOCK); + res = start_next_chunk(chunked_stream, req); + if(res != ERROR_SUCCESS) + break; } - } -#endif - *read_ret = read; - return ret; + if(read_mode == READMODE_ASYNC) + read_mode = READMODE_NOBLOCK; + } + + TRACE("read %u bytes\n", ret_read); + *read = ret_read; + return res; } -static void refill_gzip_buffer(http_request_t *req) +static BOOL chunked_drain_content(data_stream_t *stream, http_request_t *req) { - DWORD res; - int len; + chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; - if(!req->gzip_stream || !req->read_size || req->gzip_stream->buf_size == sizeof(req->gzip_stream->buf)) - return; - - if(req->gzip_stream->buf_pos) { - if(req->gzip_stream->buf_size) - memmove(req->gzip_stream->buf, req->gzip_stream->buf + req->gzip_stream->buf_pos, req->gzip_stream->buf_size); - req->gzip_stream->buf_pos = 0; - } - - res = read_gzip_data(req, req->gzip_stream->buf + req->gzip_stream->buf_size, - sizeof(req->gzip_stream->buf) - req->gzip_stream->buf_size, FALSE, &len); - if(res == ERROR_SUCCESS) - req->gzip_stream->buf_size += len; + /* FIXME: we can do better */ + return !chunked_stream->chunk_size; } -/* return the size of data available to be read immediately (the read section must be held) */ -static DWORD get_avail_data( http_request_t *req ) +static void chunked_destroy(data_stream_t *stream) { - if (req->gzip_stream) { - refill_gzip_buffer(req); - return req->gzip_stream->buf_size; + chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; + heap_free(chunked_stream); +} + +static const data_stream_vtbl_t chunked_stream_vtbl = { + chunked_get_avail_data, + chunked_end_of_data, + chunked_read, + chunked_drain_content, + chunked_destroy +}; + +/* set the request content length based on the headers */ +static DWORD set_content_length(http_request_t *request, DWORD status_code) +{ + static const WCHAR szChunked[] = {'c','h','u','n','k','e','d',0}; + WCHAR encoding[20]; + DWORD size; + + if(status_code == HTTP_STATUS_NO_CONTENT) { + request->contentLength = request->netconn_stream.content_length = 0; + return ERROR_SUCCESS; } - if (req->read_chunked && (req->dwContentLength == ~0u || req->dwContentLength == req->dwContentRead)) - return 0; - return min( req->read_size, req->dwContentLength - req->dwContentRead ); + + size = sizeof(request->contentLength); + if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_CONTENT_LENGTH, + &request->contentLength, &size, NULL) != ERROR_SUCCESS) + request->contentLength = ~0u; + request->netconn_stream.content_length = request->contentLength; + request->netconn_stream.content_read = request->read_size; + + size = sizeof(encoding); + if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_TRANSFER_ENCODING, encoding, &size, NULL) == ERROR_SUCCESS && + !strcmpiW(encoding, szChunked)) + { + chunked_stream_t *chunked_stream; + + chunked_stream = heap_alloc(sizeof(*chunked_stream)); + if(!chunked_stream) + return ERROR_OUTOFMEMORY; + + chunked_stream->data_stream.vtbl = &chunked_stream_vtbl; + chunked_stream->buf_size = chunked_stream->buf_pos = 0; + chunked_stream->chunk_size = ~0u; + + if(request->read_size) { + memcpy(chunked_stream->buf, request->read_buf+request->read_pos, request->read_size); + chunked_stream->buf_size = request->read_size; + request->read_size = request->read_pos = 0; + } + + request->data_stream = &chunked_stream->data_stream; + request->contentLength = ~0u; + request->read_chunked = TRUE; + } + + if(request->decoding) { + int encoding_idx; + + static const WCHAR gzipW[] = {'g','z','i','p',0}; + + encoding_idx = HTTP_GetCustomHeaderIndex(request, szContent_Encoding, 0, FALSE); + if(encoding_idx != -1 && !strcmpiW(request->custHeaders[encoding_idx].lpszValue, gzipW)) + return init_gzip_stream(request); + } + + return ERROR_SUCCESS; } static void HTTP_ReceiveRequestData(http_request_t *req, BOOL first_notif) { INTERNET_ASYNC_RESULT iar; - DWORD res; + DWORD res, read = 0; + read_mode_t mode; TRACE("%p\n", req); EnterCriticalSection( &req->read_section ); - if ((res = refill_buffer( req )) == ERROR_SUCCESS) { + + mode = first_notif && req->read_size ? READMODE_NOBLOCK : READMODE_ASYNC; + res = refill_read_buffer(req, mode, &read); + if(res == ERROR_SUCCESS) { iar.dwResult = (DWORD_PTR)req->hdr.hInternet; iar.dwError = first_notif ? 0 : get_avail_data(req); }else { iar.dwResult = 0; iar.dwError = res; } + LeaveCriticalSection( &req->read_section ); + if(res != ERROR_SUCCESS || (mode != READMODE_NOBLOCK && !read)) { + WARN("res %u read %u, closing connection\n", res, read); + http_release_netconn(req, FALSE); + } + INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -2173,72 +2671,46 @@ static void HTTP_ReceiveRequestData(http_request_t *req, BOOL first_notif) /* read data from the http connection (the read section must be held) */ static DWORD HTTPREQ_Read(http_request_t *req, void *buffer, DWORD size, DWORD *read, BOOL sync) { - BOOL finished_reading = FALSE; - int len, bytes_read = 0; - DWORD ret = ERROR_SUCCESS; + DWORD current_read = 0, ret_read = 0; + read_mode_t read_mode; + DWORD res = ERROR_SUCCESS; + + read_mode = req->session->appInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC ? READMODE_ASYNC : READMODE_SYNC; EnterCriticalSection( &req->read_section ); - if (req->read_chunked && (req->dwContentLength == ~0u || req->dwContentLength == req->dwContentRead)) - { - if (start_next_chunk( req ) != ERROR_SUCCESS) goto done; + if(req->read_size) { + ret_read = min(size, req->read_size); + memcpy(buffer, req->read_buf+req->read_pos, ret_read); + req->read_size -= ret_read; + req->read_pos += ret_read; + if(read_mode == READMODE_ASYNC) + read_mode = READMODE_NOBLOCK; } - if(req->gzip_stream) { - if(req->gzip_stream->buf_size) { - bytes_read = min(req->gzip_stream->buf_size, size); - memcpy(buffer, req->gzip_stream->buf + req->gzip_stream->buf_pos, bytes_read); - req->gzip_stream->buf_pos += bytes_read; - req->gzip_stream->buf_size -= bytes_read; - }else if(!req->read_size && !req->gzip_stream->end_of_data) { - refill_buffer(req); - } - - if(size > bytes_read) { - ret = read_gzip_data(req, (BYTE*)buffer+bytes_read, size-bytes_read, sync, &len); - if(ret == ERROR_SUCCESS) - bytes_read += len; - } - - finished_reading = req->gzip_stream->end_of_data && !req->gzip_stream->buf_size; - }else { - if (req->dwContentLength != ~0u) size = min( size, req->dwContentLength - req->dwContentRead ); - - if (req->read_size) { - bytes_read = min( req->read_size, size ); - memcpy( buffer, req->read_buf + req->read_pos, bytes_read ); - remove_data( req, bytes_read ); - } - - if (size > bytes_read && (!bytes_read || sync)) { - if (NETCON_recv( &req->netConnection, (char *)buffer + bytes_read, size - bytes_read, - sync ? MSG_WAITALL : 0, &len) == ERROR_SUCCESS) - bytes_read += len; - /* always return success, even if the network layer returns an error */ - } - - finished_reading = !bytes_read && req->dwContentRead == req->dwContentLength; - req->dwContentRead += bytes_read; + if(ret_read < size) { + res = req->data_stream->vtbl->read(req->data_stream, req, (BYTE*)buffer+ret_read, size-ret_read, ¤t_read, read_mode); + ret_read += current_read; } -done: - *read = bytes_read; - TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, req->dwContentRead, req->dwContentLength ); LeaveCriticalSection( &req->read_section ); - if(ret == ERROR_SUCCESS && req->lpszCacheFile) { - BOOL res; - DWORD dwBytesWritten; + *read = ret_read; + TRACE( "retrieved %u bytes (%u)\n", ret_read, req->contentLength ); - res = WriteFile(req->hCacheFile, buffer, bytes_read, &dwBytesWritten, NULL); + if(req->hCacheFile && res == ERROR_SUCCESS && ret_read) { + BOOL res; + DWORD written; + + res = WriteFile(req->hCacheFile, buffer, ret_read, &written, NULL); if(!res) WARN("WriteFile failed: %u\n", GetLastError()); } - if(finished_reading) - HTTP_FinishedReading(req); + if(size && !ret_read) + http_release_netconn(req, res == ERROR_SUCCESS); - return ret; + return res; } @@ -2331,14 +2803,13 @@ static DWORD HTTPREQ_ReadFileExA(object_header_t *hdr, INTERNET_BUFFERSA *buffer while(1) { res = HTTPREQ_Read(req, (char*)buffers->lpvBuffer+read, size-read, &buffers->dwBufferLength, !(flags & IRF_NO_WAIT)); - if(res == ERROR_SUCCESS) - read += buffers->dwBufferLength; - else + if(res != ERROR_SUCCESS) break; - if(!req->read_chunked || read==size || req->dwContentLength!=req->dwContentRead - || !req->dwContentLength || (req->gzip_stream && req->gzip_stream->end_of_data)) + read += buffers->dwBufferLength; + if(read == size || end_of_read_data(req)) break; + LeaveCriticalSection( &req->read_section ); INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, @@ -2440,14 +2911,13 @@ static DWORD HTTPREQ_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffer while(1) { res = HTTPREQ_Read(req, (char*)buffers->lpvBuffer+read, size-read, &buffers->dwBufferLength, !(flags & IRF_NO_WAIT)); - if(res == ERROR_SUCCESS) - read += buffers->dwBufferLength; - else + if(res != ERROR_SUCCESS) break; - if(!req->read_chunked || read==size || req->dwContentLength!=req->dwContentRead - || !req->dwContentLength || (req->gzip_stream && req->gzip_stream->end_of_data)) + read += buffers->dwBufferLength; + if(read == size || end_of_read_data(req)) break; + LeaveCriticalSection( &req->read_section ); INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, @@ -2479,16 +2949,16 @@ done: static DWORD HTTPREQ_WriteFile(object_header_t *hdr, const void *buffer, DWORD size, DWORD *written) { DWORD res; - http_request_t *lpwhr = (http_request_t*)hdr; + http_request_t *request = (http_request_t*)hdr; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0); + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0); *written = 0; - res = NETCON_send(&lpwhr->netConnection, buffer, size, 0, (LPINT)written); + res = NETCON_send(request->netconn, buffer, size, 0, (LPINT)written); if (res == ERROR_SUCCESS) - lpwhr->dwBytesWritten += *written; + request->bytesWritten += *written; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_REQUEST_SENT, written, sizeof(DWORD)); + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_REQUEST_SENT, written, sizeof(DWORD)); return res; } @@ -2505,13 +2975,14 @@ static DWORD HTTPREQ_QueryDataAvailable(object_header_t *hdr, DWORD *available, TRACE("(%p %p %x %lx)\n", req, available, flags, ctx); - if (req->lpHttpSession->lpAppInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) + if (req->session->appInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) { WORKREQUEST workRequest; /* never wait, if we can't enter the section we queue an async request right away */ if (TryEnterCriticalSection( &req->read_section )) { + refill_read_buffer(req, READMODE_NOBLOCK, NULL); if ((*available = get_avail_data( req ))) goto done; if (end_of_read_data( req )) goto done; LeaveCriticalSection( &req->read_section ); @@ -2529,17 +3000,11 @@ static DWORD HTTPREQ_QueryDataAvailable(object_header_t *hdr, DWORD *available, if (!(*available = get_avail_data( req )) && !end_of_read_data( req )) { - refill_buffer( req ); + refill_read_buffer( req, READMODE_ASYNC, NULL ); *available = get_avail_data( req ); } done: - if (*available == sizeof(req->read_buf) && !req->gzip_stream) /* check if we have even more pending in the socket */ - { - DWORD extra; - if (NETCON_query_data_available(&req->netConnection, &extra)) - *available = min( *available + extra, req->dwContentLength - req->dwContentRead ); - } LeaveCriticalSection( &req->read_section ); TRACE( "returning %u\n", *available ); @@ -2569,64 +3034,39 @@ static const object_vtbl_t HTTPREQVtbl = { * NULL on failure * */ -static DWORD HTTP_HttpOpenRequestW(http_session_t *lpwhs, +static DWORD HTTP_HttpOpenRequestW(http_session_t *session, LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion, LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext, HINTERNET *ret) { - appinfo_t *hIC = NULL; - http_request_t *lpwhr; - LPWSTR lpszHostName = NULL; - HINTERNET handle = NULL; - static const WCHAR szHostForm[] = {'%','s',':','%','u',0}; - DWORD len, res; + appinfo_t *hIC = session->appInfo; + http_request_t *request; + DWORD len, res = ERROR_SUCCESS; TRACE("-->\n"); - assert( lpwhs->hdr.htype == WH_HHTTPSESSION ); - hIC = lpwhs->lpAppInfo; + request = alloc_object(&session->hdr, &HTTPREQVtbl, sizeof(http_request_t)); + if(!request) + return ERROR_OUTOFMEMORY; - lpwhr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(http_request_t)); - if (NULL == lpwhr) - { - res = ERROR_OUTOFMEMORY; - goto lend; - } - lpwhr->hdr.htype = WH_HHTTPREQ; - lpwhr->hdr.vtbl = &HTTPREQVtbl; - lpwhr->hdr.dwFlags = dwFlags; - lpwhr->hdr.dwContext = dwContext; - lpwhr->hdr.refs = 1; - lpwhr->hdr.lpfnStatusCB = lpwhs->hdr.lpfnStatusCB; - lpwhr->hdr.dwInternalFlags = lpwhs->hdr.dwInternalFlags & INET_CALLBACKW; - lpwhr->dwContentLength = ~0u; - InitializeCriticalSection( &lpwhr->read_section ); + request->hdr.htype = WH_HHTTPREQ; + request->hdr.dwFlags = dwFlags; + request->hdr.dwContext = dwContext; + request->contentLength = ~0u; - WININET_AddRef( &lpwhs->hdr ); - lpwhr->lpHttpSession = lpwhs; - list_add_head( &lpwhs->hdr.children, &lpwhr->hdr.entry ); + request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl; + request->data_stream = &request->netconn_stream.data_stream; - lpszHostName = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * - (strlenW(lpwhs->lpszHostName) + 7 /* length of ":65535" + 1 */)); - if (NULL == lpszHostName) - { - res = ERROR_OUTOFMEMORY; - goto lend; - } + InitializeCriticalSection( &request->read_section ); - handle = WININET_AllocHandle( &lpwhr->hdr ); - if (NULL == handle) - { - res = ERROR_OUTOFMEMORY; - goto lend; - } + WININET_AddRef( &session->hdr ); + request->session = session; + list_add_head( &session->hdr.children, &request->hdr.entry ); - if ((res = NETCON_init(&lpwhr->netConnection, dwFlags & INTERNET_FLAG_SECURE)) != ERROR_SUCCESS) - { - InternetCloseHandle( handle ); - handle = NULL; - goto lend; - } + if (dwFlags & INTERNET_FLAG_IGNORE_CERT_CN_INVALID) + request->security_flags |= SECURITY_FLAG_IGNORE_CERT_CN_INVALID; + if (dwFlags & INTERNET_FLAG_IGNORE_CERT_DATE_INVALID) + request->security_flags |= SECURITY_FLAG_IGNORE_CERT_DATE_INVALID; if (lpszObjectName && *lpszObjectName) { HRESULT rc; @@ -2635,22 +3075,22 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *lpwhs, rc = UrlEscapeW(lpszObjectName, NULL, &len, URL_ESCAPE_SPACES_ONLY); if (rc != E_POINTER) len = strlenW(lpszObjectName)+1; - lpwhr->lpszPath = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - rc = UrlEscapeW(lpszObjectName, lpwhr->lpszPath, &len, + request->path = heap_alloc(len*sizeof(WCHAR)); + rc = UrlEscapeW(lpszObjectName, request->path, &len, URL_ESCAPE_SPACES_ONLY); if (rc != S_OK) { ERR("Unable to escape string!(%s) (%d)\n",debugstr_w(lpszObjectName),rc); - strcpyW(lpwhr->lpszPath,lpszObjectName); + strcpyW(request->path,lpszObjectName); } }else { static const WCHAR slashW[] = {'/',0}; - lpwhr->lpszPath = heap_strdupW(slashW); + request->path = heap_strdupW(slashW); } if (lpszReferrer && *lpszReferrer) - HTTP_ProcessHeader(lpwhr, HTTP_REFERER, lpszReferrer, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); + HTTP_ProcessHeader(request, HTTP_REFERER, lpszReferrer, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); if (lpszAcceptTypes) { @@ -2658,53 +3098,66 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *lpwhs, for (i = 0; lpszAcceptTypes[i]; i++) { if (!*lpszAcceptTypes[i]) continue; - HTTP_ProcessHeader(lpwhr, HTTP_ACCEPT, lpszAcceptTypes[i], + HTTP_ProcessHeader(request, HTTP_ACCEPT, lpszAcceptTypes[i], HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA | HTTP_ADDHDR_FLAG_REQ | (i == 0 ? HTTP_ADDHDR_FLAG_REPLACE : 0)); } } - lpwhr->lpszVerb = heap_strdupW(lpszVerb && *lpszVerb ? lpszVerb : szGET); - lpwhr->lpszVersion = heap_strdupW(lpszVersion ? lpszVersion : g_szHttp1_1); + request->verb = heap_strdupW(lpszVerb && *lpszVerb ? lpszVerb : szGET); + request->version = heap_strdupW(lpszVersion ? lpszVersion : g_szHttp1_1); - if (lpwhs->nHostPort != INTERNET_INVALID_PORT_NUMBER && - lpwhs->nHostPort != INTERNET_DEFAULT_HTTP_PORT && - lpwhs->nHostPort != INTERNET_DEFAULT_HTTPS_PORT) + if (session->hostPort != INTERNET_INVALID_PORT_NUMBER && + session->hostPort != INTERNET_DEFAULT_HTTP_PORT && + session->hostPort != INTERNET_DEFAULT_HTTPS_PORT) { - sprintfW(lpszHostName, szHostForm, lpwhs->lpszHostName, lpwhs->nHostPort); - HTTP_ProcessHeader(lpwhr, hostW, lpszHostName, - HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); + WCHAR *host_name; + + static const WCHAR host_formatW[] = {'%','s',':','%','u',0}; + + host_name = heap_alloc((strlenW(session->hostName) + 7 /* length of ":65535" + 1 */) * sizeof(WCHAR)); + if (!host_name) { + res = ERROR_OUTOFMEMORY; + goto lend; + } + + sprintfW(host_name, host_formatW, session->hostName, session->hostPort); + HTTP_ProcessHeader(request, hostW, host_name, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); + heap_free(host_name); } else - HTTP_ProcessHeader(lpwhr, hostW, lpwhs->lpszHostName, + HTTP_ProcessHeader(request, hostW, session->hostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REQ); - if (lpwhs->nServerPort == INTERNET_INVALID_PORT_NUMBER) - lpwhs->nServerPort = (dwFlags & INTERNET_FLAG_SECURE ? + if (session->serverPort == INTERNET_INVALID_PORT_NUMBER) + session->serverPort = (dwFlags & INTERNET_FLAG_SECURE ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT); - if (lpwhs->nHostPort == INTERNET_INVALID_PORT_NUMBER) - lpwhs->nHostPort = (dwFlags & INTERNET_FLAG_SECURE ? + if (session->hostPort == INTERNET_INVALID_PORT_NUMBER) + session->hostPort = (dwFlags & INTERNET_FLAG_SECURE ? INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT); - if (NULL != hIC->lpszProxy && hIC->lpszProxy[0] != 0) - HTTP_DealWithProxy( hIC, lpwhs, lpwhr ); + if (hIC->proxy && hIC->proxy[0]) + HTTP_DealWithProxy( hIC, session, request ); - INTERNET_SendCallback(&lpwhs->hdr, dwContext, - INTERNET_STATUS_HANDLE_CREATED, &handle, - sizeof(handle)); + INTERNET_SendCallback(&session->hdr, dwContext, + INTERNET_STATUS_HANDLE_CREATED, &request->hdr.hInternet, + sizeof(HINTERNET)); lend: - HeapFree(GetProcessHeap(), 0, lpszHostName); - if( lpwhr ) - WININET_Release( &lpwhr->hdr ); + TRACE("<-- %u (%p)\n", res, request); - TRACE("<-- %p (%p)\n", handle, lpwhr); - *ret = handle; - return res; + if(res != ERROR_SUCCESS) { + WININET_Release( &request->hdr ); + *ret = NULL; + return res; + } + + *ret = request->hdr.hInternet; + return ERROR_SUCCESS; } /*********************************************************************** @@ -2722,7 +3175,7 @@ HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession, LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext) { - http_session_t *lpwhs; + http_session_t *session; HINTERNET handle = NULL; DWORD res; @@ -2737,8 +3190,8 @@ HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession, TRACE("\taccept type: %s\n",debugstr_w(lpszAcceptTypes[i])); } - lpwhs = (http_session_t*) WININET_GetObject( hHttpSession ); - if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION) + session = (http_session_t*) get_handle_object( hHttpSession ); + if (NULL == session || session->hdr.htype != WH_HHTTPSESSION) { res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; goto lend; @@ -2751,41 +3204,18 @@ HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession, * necessary HINTERNET pointer returned by this function. * */ - res = HTTP_HttpOpenRequestW(lpwhs, lpszVerb, lpszObjectName, + res = HTTP_HttpOpenRequestW(session, lpszVerb, lpszObjectName, lpszVersion, lpszReferrer, lpszAcceptTypes, dwFlags, dwContext, &handle); lend: - if( lpwhs ) - WININET_Release( &lpwhs->hdr ); + if( session ) + WININET_Release( &session->hdr ); TRACE("returning %p\n", handle); if(res != ERROR_SUCCESS) SetLastError(res); return handle; } -/* read any content returned by the server so that the connection can be - * reused */ -static void HTTP_DrainContent(http_request_t *req) -{ - DWORD bytes_read; - - if (!NETCON_connected(&req->netConnection)) return; - - if (req->dwContentLength == -1) - { - NETCON_close(&req->netConnection); - return; - } - if (!strcmpW(req->lpszVerb, szHEAD)) return; - - do - { - char buffer[2048]; - if (HTTPREQ_Read(req, buffer, sizeof(buffer), &bytes_read, TRUE) != ERROR_SUCCESS) - return; - } while (bytes_read); -} - static const LPCWSTR header_lookup[] = { szMime_Version, /* HTTP_QUERY_MIME_VERSION = 0 */ szContent_Type, /* HTTP_QUERY_CONTENT_TYPE = 1 */ @@ -2865,7 +3295,7 @@ static const LPCWSTR header_lookup[] = { /*********************************************************************** * HTTP_HttpQueryInfoW (internal) */ -static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, +static DWORD HTTP_HttpQueryInfoW(http_request_t *request, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex) { LPHTTPHEADERW lphttpHdr = NULL; @@ -2879,7 +3309,7 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, { case HTTP_QUERY_CUSTOM: if (!lpBuffer) return ERROR_INVALID_PARAMETER; - index = HTTP_GetCustomHeaderIndex(lpwhr, lpBuffer, requested_index, request_only); + index = HTTP_GetCustomHeaderIndex(request, lpBuffer, requested_index, request_only); break; case HTTP_QUERY_RAW_HEADERS_CRLF: { @@ -2888,9 +3318,9 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, DWORD res = ERROR_INVALID_PARAMETER; if (request_only) - headers = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath, lpwhr->lpszVersion); + headers = HTTP_BuildHeaderRequestString(request, request->verb, request->path, request->version); else - headers = lpwhr->lpszRawHeaders; + headers = request->rawHeaders; if (headers) len = strlenW(headers) * sizeof(WCHAR); @@ -2920,7 +3350,7 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, } case HTTP_QUERY_RAW_HEADERS: { - LPWSTR * ppszRawHeaderLines = HTTP_Tokenize(lpwhr->lpszRawHeaders, szCrLf); + LPWSTR * ppszRawHeaderLines = HTTP_Tokenize(request->rawHeaders, szCrLf); DWORD i, size = 0; LPWSTR pszString = lpBuffer; @@ -2950,9 +3380,9 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, return ERROR_SUCCESS; } case HTTP_QUERY_STATUS_TEXT: - if (lpwhr->lpszStatusText) + if (request->statusText) { - DWORD len = strlenW(lpwhr->lpszStatusText); + DWORD len = strlenW(request->statusText); if (len + 1 > *lpdwBufferLength/sizeof(WCHAR)) { *lpdwBufferLength = (len + 1) * sizeof(WCHAR); @@ -2960,7 +3390,7 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, } if (lpBuffer) { - memcpy(lpBuffer, lpwhr->lpszStatusText, (len + 1) * sizeof(WCHAR)); + memcpy(lpBuffer, request->statusText, (len + 1) * sizeof(WCHAR)); TRACE("returning data: %s\n", debugstr_wn(lpBuffer, len)); } *lpdwBufferLength = len * sizeof(WCHAR); @@ -2968,9 +3398,9 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, } break; case HTTP_QUERY_VERSION: - if (lpwhr->lpszVersion) + if (request->version) { - DWORD len = strlenW(lpwhr->lpszVersion); + DWORD len = strlenW(request->version); if (len + 1 > *lpdwBufferLength/sizeof(WCHAR)) { *lpdwBufferLength = (len + 1) * sizeof(WCHAR); @@ -2978,7 +3408,7 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, } if (lpBuffer) { - memcpy(lpBuffer, lpwhr->lpszVersion, (len + 1) * sizeof(WCHAR)); + memcpy(lpBuffer, request->version, (len + 1) * sizeof(WCHAR)); TRACE("returning data: %s\n", debugstr_wn(lpBuffer, len)); } *lpdwBufferLength = len * sizeof(WCHAR); @@ -2986,19 +3416,19 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, } break; case HTTP_QUERY_CONTENT_ENCODING: - index = HTTP_GetCustomHeaderIndex(lpwhr, header_lookup[lpwhr->gzip_stream ? HTTP_QUERY_CONTENT_TYPE : level], + index = HTTP_GetCustomHeaderIndex(request, header_lookup[request->read_gzip ? HTTP_QUERY_CONTENT_TYPE : level], requested_index,request_only); break; default: assert (LAST_TABLE_HEADER == (HTTP_QUERY_UNLESS_MODIFIED_SINCE + 1)); if (level < LAST_TABLE_HEADER && header_lookup[level]) - index = HTTP_GetCustomHeaderIndex(lpwhr, header_lookup[level], + index = HTTP_GetCustomHeaderIndex(request, header_lookup[level], requested_index,request_only); } if (index >= 0) - lphttpHdr = &lpwhr->pCustHeaders[index]; + lphttpHdr = &request->custHeaders[index]; /* Ensure header satisfies requested attributes */ if (!lphttpHdr || @@ -3071,7 +3501,7 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *lpwhr, DWORD dwInfoLevel, BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex) { - http_request_t *lpwhr; + http_request_t *request; DWORD res; if (TRACE_ON(wininet)) { @@ -3184,8 +3614,8 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, TRACE("\n"); } - lpwhr = (http_request_t*) WININET_GetObject( hHttpRequest ); - if (NULL == lpwhr || lpwhr->hdr.htype != WH_HHTTPREQ) + request = (http_request_t*) get_handle_object( hHttpRequest ); + if (NULL == request || request->hdr.htype != WH_HHTTPREQ) { res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; goto lend; @@ -3193,12 +3623,12 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, if (lpBuffer == NULL) *lpdwBufferLength = 0; - res = HTTP_HttpQueryInfoW( lpwhr, dwInfoLevel, + res = HTTP_HttpQueryInfoW( request, dwInfoLevel, lpBuffer, lpdwBufferLength, lpdwIndex); lend: - if( lpwhr ) - WININET_Release( &lpwhr->hdr ); + if( request ) + WININET_Release( &request->hdr ); TRACE("%u <--\n", res); if(res != ERROR_SUCCESS) @@ -3242,7 +3672,7 @@ BOOL WINAPI HttpQueryInfoA(HINTERNET hHttpRequest, DWORD dwInfoLevel, } else alloclen = len; - bufferW = HeapAlloc( GetProcessHeap(), 0, alloclen ); + bufferW = heap_alloc(alloclen); /* buffer is in/out because of HTTP_QUERY_CUSTOM */ if ((dwInfoLevel & HTTP_QUERY_HEADER_MASK) == HTTP_QUERY_CUSTOM) MultiByteToWideChar( CP_ACP, 0, lpBuffer, -1, bufferW, alloclen / sizeof(WCHAR) ); @@ -3276,27 +3706,27 @@ BOOL WINAPI HttpQueryInfoA(HINTERNET hHttpRequest, DWORD dwInfoLevel, /*********************************************************************** * HTTP_GetRedirectURL (internal) */ -static LPWSTR HTTP_GetRedirectURL(http_request_t *lpwhr, LPCWSTR lpszUrl) +static LPWSTR HTTP_GetRedirectURL(http_request_t *request, LPCWSTR lpszUrl) { static WCHAR szHttp[] = {'h','t','t','p',0}; static WCHAR szHttps[] = {'h','t','t','p','s',0}; - http_session_t *lpwhs = lpwhr->lpHttpSession; + http_session_t *session = request->session; URL_COMPONENTSW urlComponents; DWORD url_length = 0; LPWSTR orig_url; LPWSTR combined_url; urlComponents.dwStructSize = sizeof(URL_COMPONENTSW); - urlComponents.lpszScheme = (lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE) ? szHttps : szHttp; + urlComponents.lpszScheme = (request->hdr.dwFlags & INTERNET_FLAG_SECURE) ? szHttps : szHttp; urlComponents.dwSchemeLength = 0; - urlComponents.lpszHostName = lpwhs->lpszHostName; + urlComponents.lpszHostName = session->hostName; urlComponents.dwHostNameLength = 0; - urlComponents.nPort = lpwhs->nHostPort; - urlComponents.lpszUserName = lpwhs->lpszUserName; + urlComponents.nPort = session->hostPort; + urlComponents.lpszUserName = session->userName; urlComponents.dwUserNameLength = 0; urlComponents.lpszPassword = NULL; urlComponents.dwPasswordLength = 0; - urlComponents.lpszUrlPath = lpwhr->lpszPath; + urlComponents.lpszUrlPath = request->path; urlComponents.dwUrlPathLength = 0; urlComponents.lpszExtraInfo = NULL; urlComponents.dwExtraInfoLength = 0; @@ -3305,7 +3735,7 @@ static LPWSTR HTTP_GetRedirectURL(http_request_t *lpwhr, LPCWSTR lpszUrl) (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) return NULL; - orig_url = HeapAlloc(GetProcessHeap(), 0, url_length); + orig_url = heap_alloc(url_length); /* convert from bytes to characters */ url_length = url_length / sizeof(WCHAR) - 1; @@ -3322,7 +3752,7 @@ static LPWSTR HTTP_GetRedirectURL(http_request_t *lpwhr, LPCWSTR lpszUrl) HeapFree(GetProcessHeap(), 0, orig_url); return NULL; } - combined_url = HeapAlloc(GetProcessHeap(), 0, url_length * sizeof(WCHAR)); + combined_url = heap_alloc(url_length * sizeof(WCHAR)); if (!InternetCombineUrlW(orig_url, lpszUrl, combined_url, &url_length, ICU_ENCODE_SPACES_ONLY)) { @@ -3338,11 +3768,11 @@ static LPWSTR HTTP_GetRedirectURL(http_request_t *lpwhr, LPCWSTR lpszUrl) /*********************************************************************** * HTTP_HandleRedirect (internal) */ -static DWORD HTTP_HandleRedirect(http_request_t *lpwhr, LPCWSTR lpszUrl) +static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl) { - http_session_t *lpwhs = lpwhr->lpHttpSession; - appinfo_t *hIC = lpwhs->lpAppInfo; - BOOL using_proxy = hIC->lpszProxy && hIC->lpszProxy[0]; + http_session_t *session = request->session; + appinfo_t *hIC = session->appInfo; + BOOL using_proxy = hIC->proxy && hIC->proxy[0]; WCHAR path[INTERNET_MAX_URL_LENGTH]; int index; @@ -3379,18 +3809,18 @@ static DWORD HTTP_HandleRedirect(http_request_t *lpwhr, LPCWSTR lpszUrl) return INTERNET_GetLastError(); if (!strncmpW(szHttp, urlComponents.lpszScheme, strlenW(szHttp)) && - (lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE)) + (request->hdr.dwFlags & INTERNET_FLAG_SECURE)) { TRACE("redirect from secure page to non-secure page\n"); /* FIXME: warn about from secure redirect to non-secure page */ - lpwhr->hdr.dwFlags &= ~INTERNET_FLAG_SECURE; + request->hdr.dwFlags &= ~INTERNET_FLAG_SECURE; } if (!strncmpW(szHttps, urlComponents.lpszScheme, strlenW(szHttps)) && - !(lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE)) + !(request->hdr.dwFlags & INTERNET_FLAG_SECURE)) { TRACE("redirect from non-secure page to secure page\n"); /* FIXME: notify about redirect to secure page */ - lpwhr->hdr.dwFlags |= INTERNET_FLAG_SECURE; + request->hdr.dwFlags |= INTERNET_FLAG_SECURE; } if (urlComponents.nPort == INTERNET_INVALID_PORT_NUMBER) @@ -3412,61 +3842,46 @@ static DWORD HTTP_HandleRedirect(http_request_t *lpwhr, LPCWSTR lpszUrl) */ /* consider the current host as the referrer */ - if (lpwhs->lpszServerName && *lpwhs->lpszServerName) - HTTP_ProcessHeader(lpwhr, HTTP_REFERER, lpwhs->lpszServerName, + if (session->lpszServerName && *session->lpszServerName) + HTTP_ProcessHeader(request, HTTP_REFERER, session->lpszServerName, HTTP_ADDHDR_FLAG_REQ|HTTP_ADDREQ_FLAG_REPLACE| HTTP_ADDHDR_FLAG_ADD_IF_NEW); #endif - HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName); + HeapFree(GetProcessHeap(), 0, session->hostName); if (urlComponents.nPort != INTERNET_DEFAULT_HTTP_PORT && urlComponents.nPort != INTERNET_DEFAULT_HTTPS_PORT) { int len; - static const WCHAR fmt[] = {'%','s',':','%','i',0}; + static const WCHAR fmt[] = {'%','s',':','%','u',0}; len = lstrlenW(hostName); len += 7; /* 5 for strlen("65535") + 1 for ":" + 1 for '\0' */ - lpwhs->lpszHostName = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - sprintfW(lpwhs->lpszHostName, fmt, hostName, urlComponents.nPort); + session->hostName = heap_alloc(len*sizeof(WCHAR)); + sprintfW(session->hostName, fmt, hostName, urlComponents.nPort); } else - lpwhs->lpszHostName = heap_strdupW(hostName); + session->hostName = heap_strdupW(hostName); - HTTP_ProcessHeader(lpwhr, hostW, lpwhs->lpszHostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ); + HTTP_ProcessHeader(request, hostW, session->hostName, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDHDR_FLAG_REQ); - HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName); - lpwhs->lpszUserName = NULL; + HeapFree(GetProcessHeap(), 0, session->userName); + session->userName = NULL; if (userName[0]) - lpwhs->lpszUserName = heap_strdupW(userName); + session->userName = heap_strdupW(userName); - if (!using_proxy) - { - if (strcmpiW(lpwhs->lpszServerName, hostName) || lpwhs->nServerPort != urlComponents.nPort) - { - DWORD res; + reset_data_stream(request); - HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); - lpwhs->lpszServerName = heap_strdupW(hostName); - lpwhs->nServerPort = urlComponents.nPort; - - NETCON_close(&lpwhr->netConnection); - if ((res = HTTP_ResolveName(lpwhr)) != ERROR_SUCCESS) - return res; - - res = NETCON_init(&lpwhr->netConnection, lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE); - if (res != ERROR_SUCCESS) - return res; - - lpwhr->read_pos = lpwhr->read_size = 0; - lpwhr->read_chunked = FALSE; + if(!using_proxy) { + if(strcmpiW(session->serverName, hostName)) { + HeapFree(GetProcessHeap(), 0, session->serverName); + session->serverName = heap_strdupW(hostName); } + session->serverPort = urlComponents.nPort; } - else - TRACE("Redirect through proxy\n"); } - HeapFree(GetProcessHeap(), 0, lpwhr->lpszPath); - lpwhr->lpszPath=NULL; + HeapFree(GetProcessHeap(), 0, request->path); + request->path=NULL; if (*path) { DWORD needed = 0; @@ -3475,23 +3890,23 @@ static DWORD HTTP_HandleRedirect(http_request_t *lpwhr, LPCWSTR lpszUrl) rc = UrlEscapeW(path, NULL, &needed, URL_ESCAPE_SPACES_ONLY); if (rc != E_POINTER) needed = strlenW(path)+1; - lpwhr->lpszPath = HeapAlloc(GetProcessHeap(), 0, needed*sizeof(WCHAR)); - rc = UrlEscapeW(path, lpwhr->lpszPath, &needed, + request->path = heap_alloc(needed*sizeof(WCHAR)); + rc = UrlEscapeW(path, request->path, &needed, URL_ESCAPE_SPACES_ONLY); if (rc != S_OK) { ERR("Unable to escape string!(%s) (%d)\n",debugstr_w(path),rc); - strcpyW(lpwhr->lpszPath,path); + strcpyW(request->path,path); } } /* Remove custom content-type/length headers on redirects. */ - index = HTTP_GetCustomHeaderIndex(lpwhr, szContent_Type, 0, TRUE); + index = HTTP_GetCustomHeaderIndex(request, szContent_Type, 0, TRUE); if (0 <= index) - HTTP_DeleteCustomHeader(lpwhr, index); - index = HTTP_GetCustomHeaderIndex(lpwhr, szContent_Length, 0, TRUE); + HTTP_DeleteCustomHeader(request, index); + index = HTTP_GetCustomHeaderIndex(request, szContent_Length, 0, TRUE); if (0 <= index) - HTTP_DeleteCustomHeader(lpwhr, index); + HTTP_DeleteCustomHeader(request, index); return ERROR_SUCCESS; } @@ -3510,7 +3925,7 @@ static LPWSTR HTTP_build_req( LPCWSTR *list, int len ) len += strlenW( *t ); len++; - str = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + str = heap_alloc(len*sizeof(WCHAR)); *str = 0; for( t = list; *t ; t++ ) @@ -3519,7 +3934,7 @@ static LPWSTR HTTP_build_req( LPCWSTR *list, int len ) return str; } -static DWORD HTTP_SecureProxyConnect(http_request_t *lpwhr) +static DWORD HTTP_SecureProxyConnect(http_request_t *request) { LPWSTR lpszPath; LPWSTR requestString; @@ -3529,66 +3944,594 @@ static DWORD HTTP_SecureProxyConnect(http_request_t *lpwhr) char *ascii_req; DWORD res; static const WCHAR szConnect[] = {'C','O','N','N','E','C','T',0}; - static const WCHAR szFormat[] = {'%','s',':','%','d',0}; - http_session_t *lpwhs = lpwhr->lpHttpSession; + static const WCHAR szFormat[] = {'%','s',':','%','u',0}; + http_session_t *session = request->session; TRACE("\n"); - lpszPath = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( lpwhs->lpszHostName ) + 13)*sizeof(WCHAR) ); - sprintfW( lpszPath, szFormat, lpwhs->lpszHostName, lpwhs->nHostPort ); - requestString = HTTP_BuildHeaderRequestString( lpwhr, szConnect, lpszPath, g_szHttp1_1 ); + lpszPath = heap_alloc((lstrlenW( session->hostName ) + 13)*sizeof(WCHAR)); + sprintfW( lpszPath, szFormat, session->hostName, session->hostPort ); + requestString = HTTP_BuildHeaderRequestString( request, szConnect, lpszPath, g_szHttp1_1 ); HeapFree( GetProcessHeap(), 0, lpszPath ); len = WideCharToMultiByte( CP_ACP, 0, requestString, -1, NULL, 0, NULL, NULL ); len--; /* the nul terminator isn't needed */ - ascii_req = HeapAlloc( GetProcessHeap(), 0, len ); + ascii_req = heap_alloc(len); WideCharToMultiByte( CP_ACP, 0, requestString, -1, ascii_req, len, NULL, NULL ); HeapFree( GetProcessHeap(), 0, requestString ); TRACE("full request -> %s\n", debugstr_an( ascii_req, len ) ); - res = NETCON_send( &lpwhr->netConnection, ascii_req, len, 0, &cnt ); + res = NETCON_send( request->netconn, ascii_req, len, 0, &cnt ); HeapFree( GetProcessHeap(), 0, ascii_req ); if (res != ERROR_SUCCESS) return res; - responseLen = HTTP_GetResponseHeaders( lpwhr, TRUE ); + responseLen = HTTP_GetResponseHeaders( request, TRUE ); if (!responseLen) return ERROR_HTTP_INVALID_HEADER; return ERROR_SUCCESS; } -static void HTTP_InsertCookies(http_request_t *lpwhr) +static void HTTP_InsertCookies(http_request_t *request) { - static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s','%','s',0}; - LPWSTR lpszCookies, lpszUrl = NULL; - DWORD nCookieSize, size; - LPHTTPHEADERW Host = HTTP_GetHeader(lpwhr, hostW); + DWORD cookie_size, size, cnt = 0; + HTTPHEADERW *host; + WCHAR *cookies; - size = (strlenW(Host->lpszValue) + strlenW(szUrlForm) + strlenW(lpwhr->lpszPath)) * sizeof(WCHAR); - if (!(lpszUrl = HeapAlloc(GetProcessHeap(), 0, size))) return; - sprintfW( lpszUrl, szUrlForm, Host->lpszValue, lpwhr->lpszPath); + static const WCHAR cookieW[] = {'C','o','o','k','i','e',':',' ',0}; - if (InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize)) + host = HTTP_GetHeader(request, hostW); + if(!host) + return; + + if(!get_cookie(host->lpszValue, request->path, NULL, &cookie_size)) + return; + + size = sizeof(cookieW) + cookie_size * sizeof(WCHAR) + sizeof(szCrLf); + if(!(cookies = heap_alloc(size))) + return; + + cnt += sprintfW(cookies, cookieW); + get_cookie(host->lpszValue, request->path, cookies+cnt, &cookie_size); + strcatW(cookies, szCrLf); + + HTTP_HttpAddRequestHeadersW(request, cookies, strlenW(cookies), HTTP_ADDREQ_FLAG_REPLACE); + + heap_free(cookies); +} + +static WORD HTTP_ParseDay(LPCWSTR day) +{ + static const WCHAR days[7][4] = {{ 's','u','n',0 }, + { 'm','o','n',0 }, + { 't','u','e',0 }, + { 'w','e','d',0 }, + { 't','h','u',0 }, + { 'f','r','i',0 }, + { 's','a','t',0 }}; + int i; + for (i = 0; i < sizeof(days)/sizeof(*days); i++) + if (!strcmpiW(day, days[i])) + return i; + + /* Invalid */ + return 7; +} + +static WORD HTTP_ParseMonth(LPCWSTR month) +{ + static const WCHAR jan[] = { 'j','a','n',0 }; + static const WCHAR feb[] = { 'f','e','b',0 }; + static const WCHAR mar[] = { 'm','a','r',0 }; + static const WCHAR apr[] = { 'a','p','r',0 }; + static const WCHAR may[] = { 'm','a','y',0 }; + static const WCHAR jun[] = { 'j','u','n',0 }; + static const WCHAR jul[] = { 'j','u','l',0 }; + static const WCHAR aug[] = { 'a','u','g',0 }; + static const WCHAR sep[] = { 's','e','p',0 }; + static const WCHAR oct[] = { 'o','c','t',0 }; + static const WCHAR nov[] = { 'n','o','v',0 }; + static const WCHAR dec[] = { 'd','e','c',0 }; + + if (!strcmpiW(month, jan)) return 1; + if (!strcmpiW(month, feb)) return 2; + if (!strcmpiW(month, mar)) return 3; + if (!strcmpiW(month, apr)) return 4; + if (!strcmpiW(month, may)) return 5; + if (!strcmpiW(month, jun)) return 6; + if (!strcmpiW(month, jul)) return 7; + if (!strcmpiW(month, aug)) return 8; + if (!strcmpiW(month, sep)) return 9; + if (!strcmpiW(month, oct)) return 10; + if (!strcmpiW(month, nov)) return 11; + if (!strcmpiW(month, dec)) return 12; + /* Invalid */ + return 0; +} + +/* Parses the string pointed to by *str, assumed to be a 24-hour time HH:MM:SS, + * optionally preceded by whitespace. + * Upon success, returns TRUE, sets the wHour, wMinute, and wSecond fields of + * st, and sets *str to the first character after the time format. + */ +static BOOL HTTP_ParseTime(SYSTEMTIME *st, LPCWSTR *str) +{ + LPCWSTR ptr = *str; + WCHAR *nextPtr; + unsigned long num; + + while (isspaceW(*ptr)) + ptr++; + + num = strtoulW(ptr, &nextPtr, 10); + if (!nextPtr || nextPtr <= ptr || *nextPtr != ':') { - int cnt = 0; - static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0}; + ERR("unexpected time format %s\n", debugstr_w(ptr)); + return FALSE; + } + if (num > 23) + { + ERR("unexpected hour in time format %s\n", debugstr_w(ptr)); + return FALSE; + } + ptr = nextPtr + 1; + st->wHour = (WORD)num; + num = strtoulW(ptr, &nextPtr, 10); + if (!nextPtr || nextPtr <= ptr || *nextPtr != ':') + { + ERR("unexpected time format %s\n", debugstr_w(ptr)); + return FALSE; + } + if (num > 59) + { + ERR("unexpected minute in time format %s\n", debugstr_w(ptr)); + return FALSE; + } + ptr = nextPtr + 1; + st->wMinute = (WORD)num; + num = strtoulW(ptr, &nextPtr, 10); + if (!nextPtr || nextPtr <= ptr) + { + ERR("unexpected time format %s\n", debugstr_w(ptr)); + return FALSE; + } + if (num > 59) + { + ERR("unexpected second in time format %s\n", debugstr_w(ptr)); + return FALSE; + } + ptr = nextPtr + 1; + *str = ptr; + st->wSecond = (WORD)num; + return TRUE; +} - size = sizeof(szCookie) + nCookieSize * sizeof(WCHAR) + sizeof(szCrLf); - if ((lpszCookies = HeapAlloc(GetProcessHeap(), 0, size))) +static BOOL HTTP_ParseDateAsAsctime(LPCWSTR value, FILETIME *ft) +{ + static const WCHAR gmt[]= { 'G','M','T',0 }; + WCHAR day[4], *dayPtr, month[4], *monthPtr, *nextPtr; + LPCWSTR ptr; + SYSTEMTIME st = { 0 }; + unsigned long num; + + for (ptr = value, dayPtr = day; *ptr && !isspaceW(*ptr) && + dayPtr - day < sizeof(day) / sizeof(day[0]) - 1; ptr++, dayPtr++) + *dayPtr = *ptr; + *dayPtr = 0; + st.wDayOfWeek = HTTP_ParseDay(day); + if (st.wDayOfWeek >= 7) + { + ERR("unexpected weekday %s\n", debugstr_w(day)); + return FALSE; + } + + while (isspaceW(*ptr)) + ptr++; + + for (monthPtr = month; !isspace(*ptr) && + monthPtr - month < sizeof(month) / sizeof(month[0]) - 1; + monthPtr++, ptr++) + *monthPtr = *ptr; + *monthPtr = 0; + st.wMonth = HTTP_ParseMonth(month); + if (!st.wMonth || st.wMonth > 12) + { + ERR("unexpected month %s\n", debugstr_w(month)); + return FALSE; + } + + while (isspaceW(*ptr)) + ptr++; + + num = strtoulW(ptr, &nextPtr, 10); + if (!nextPtr || nextPtr <= ptr || !num || num > 31) + { + ERR("unexpected day %s\n", debugstr_w(ptr)); + return FALSE; + } + ptr = nextPtr; + st.wDay = (WORD)num; + + while (isspaceW(*ptr)) + ptr++; + + if (!HTTP_ParseTime(&st, &ptr)) + return FALSE; + + while (isspaceW(*ptr)) + ptr++; + + num = strtoulW(ptr, &nextPtr, 10); + if (!nextPtr || nextPtr <= ptr || num < 1601 || num > 30827) + { + ERR("unexpected year %s\n", debugstr_w(ptr)); + return FALSE; + } + ptr = nextPtr; + st.wYear = (WORD)num; + + while (isspaceW(*ptr)) + ptr++; + + /* asctime() doesn't report a timezone, but some web servers do, so accept + * with or without GMT. + */ + if (*ptr && strcmpW(ptr, gmt)) + { + ERR("unexpected timezone %s\n", debugstr_w(ptr)); + return FALSE; + } + return SystemTimeToFileTime(&st, ft); +} + +static BOOL HTTP_ParseRfc1123Date(LPCWSTR value, FILETIME *ft) +{ + static const WCHAR gmt[]= { 'G','M','T',0 }; + WCHAR *nextPtr, day[4], month[4], *monthPtr; + LPCWSTR ptr; + unsigned long num; + SYSTEMTIME st = { 0 }; + + ptr = strchrW(value, ','); + if (!ptr) + return FALSE; + if (ptr - value != 3) + { + ERR("unexpected weekday %s\n", debugstr_wn(value, ptr - value)); + return FALSE; + } + memcpy(day, value, (ptr - value) * sizeof(WCHAR)); + day[3] = 0; + st.wDayOfWeek = HTTP_ParseDay(day); + if (st.wDayOfWeek > 6) + { + ERR("unexpected weekday %s\n", debugstr_wn(value, ptr - value)); + return FALSE; + } + ptr++; + + while (isspaceW(*ptr)) + ptr++; + + num = strtoulW(ptr, &nextPtr, 10); + if (!nextPtr || nextPtr <= ptr || !num || num > 31) + { + ERR("unexpected day %s\n", debugstr_w(value)); + return FALSE; + } + ptr = nextPtr; + st.wDay = (WORD)num; + + while (isspaceW(*ptr)) + ptr++; + + for (monthPtr = month; !isspace(*ptr) && + monthPtr - month < sizeof(month) / sizeof(month[0]) - 1; + monthPtr++, ptr++) + *monthPtr = *ptr; + *monthPtr = 0; + st.wMonth = HTTP_ParseMonth(month); + if (!st.wMonth || st.wMonth > 12) + { + ERR("unexpected month %s\n", debugstr_w(month)); + return FALSE; + } + + while (isspaceW(*ptr)) + ptr++; + + num = strtoulW(ptr, &nextPtr, 10); + if (!nextPtr || nextPtr <= ptr || num < 1601 || num > 30827) + { + ERR("unexpected year %s\n", debugstr_w(value)); + return FALSE; + } + ptr = nextPtr; + st.wYear = (WORD)num; + + if (!HTTP_ParseTime(&st, &ptr)) + return FALSE; + + while (isspaceW(*ptr)) + ptr++; + + if (strcmpW(ptr, gmt)) + { + ERR("unexpected time zone %s\n", debugstr_w(ptr)); + return FALSE; + } + return SystemTimeToFileTime(&st, ft); +} + +/* FIXME: only accepts dates in RFC 1123 format and asctime() format, + * which may not be the only formats actually seen in the wild. + * http://www.hackcraft.net/web/datetime/ suggests at least RFC 850 dates + * should be accepted as well. + */ +static BOOL HTTP_ParseDate(LPCWSTR value, FILETIME *ft) +{ + static const WCHAR zero[] = { '0',0 }; + BOOL ret; + + if (!strcmpW(value, zero)) + { + ft->dwLowDateTime = ft->dwHighDateTime = 0; + ret = TRUE; + } + else if (strchrW(value, ',')) + ret = HTTP_ParseRfc1123Date(value, ft); + else + { + ret = HTTP_ParseDateAsAsctime(value, ft); + if (!ret) + ERR("unexpected date format %s\n", debugstr_w(value)); + } + return ret; +} + +static void HTTP_ProcessExpires(http_request_t *request) +{ + BOOL expirationFound = FALSE; + int headerIndex; + + /* Look for a Cache-Control header with a max-age directive, as it takes + * precedence over the Expires header. + */ + headerIndex = HTTP_GetCustomHeaderIndex(request, szCache_Control, 0, FALSE); + if (headerIndex != -1) + { + LPHTTPHEADERW ccHeader = &request->custHeaders[headerIndex]; + LPWSTR ptr; + + for (ptr = ccHeader->lpszValue; ptr && *ptr; ) { - cnt += sprintfW(lpszCookies, szCookie); - InternetGetCookieW(lpszUrl, NULL, lpszCookies + cnt, &nCookieSize); - strcatW(lpszCookies, szCrLf); + LPWSTR comma = strchrW(ptr, ','), end, equal; - HTTP_HttpAddRequestHeadersW(lpwhr, lpszCookies, strlenW(lpszCookies), HTTP_ADDREQ_FLAG_REPLACE); - HeapFree(GetProcessHeap(), 0, lpszCookies); + if (comma) + end = comma; + else + end = ptr + strlenW(ptr); + for (equal = end - 1; equal > ptr && *equal != '='; equal--) + ; + if (*equal == '=') + { + static const WCHAR max_age[] = { + 'm','a','x','-','a','g','e',0 }; + + if (!strncmpiW(ptr, max_age, equal - ptr - 1)) + { + LPWSTR nextPtr; + unsigned long age; + + age = strtoulW(equal + 1, &nextPtr, 10); + if (nextPtr > equal + 1) + { + LARGE_INTEGER ft; + + NtQuerySystemTime( &ft ); + /* Age is in seconds, FILETIME resolution is in + * 100 nanosecond intervals. + */ + ft.QuadPart += age * (ULONGLONG)1000000; + request->expires.dwLowDateTime = ft.u.LowPart; + request->expires.dwHighDateTime = ft.u.HighPart; + expirationFound = TRUE; + } + } + } + if (comma) + { + ptr = comma + 1; + while (isspaceW(*ptr)) + ptr++; + } + else + ptr = NULL; } } - HeapFree(GetProcessHeap(), 0, lpszUrl); + if (!expirationFound) + { + headerIndex = HTTP_GetCustomHeaderIndex(request, szExpires, 0, FALSE); + if (headerIndex != -1) + { + LPHTTPHEADERW expiresHeader = &request->custHeaders[headerIndex]; + FILETIME ft; + + if (HTTP_ParseDate(expiresHeader->lpszValue, &ft)) + { + expirationFound = TRUE; + request->expires = ft; + } + } + } + if (!expirationFound) + { + LARGE_INTEGER t; + + /* With no known age, default to 10 minutes until expiration. */ + NtQuerySystemTime( &t ); + t.QuadPart += 10 * 60 * (ULONGLONG)10000000; + request->expires.dwLowDateTime = t.u.LowPart; + request->expires.dwHighDateTime = t.u.HighPart; + } +} + +static void HTTP_ProcessLastModified(http_request_t *request) +{ + int headerIndex; + + headerIndex = HTTP_GetCustomHeaderIndex(request, szLast_Modified, 0, FALSE); + if (headerIndex != -1) + { + LPHTTPHEADERW expiresHeader = &request->custHeaders[headerIndex]; + FILETIME ft; + + if (HTTP_ParseDate(expiresHeader->lpszValue, &ft)) + request->last_modified = ft; + } +} + +static void http_process_keep_alive(http_request_t *req) +{ + int index; + + index = HTTP_GetCustomHeaderIndex(req, szConnection, 0, FALSE); + if(index != -1) + req->netconn->keep_alive = !strcmpiW(req->custHeaders[index].lpszValue, szKeepAlive); + else + req->netconn->keep_alive = !strcmpiW(req->version, g_szHttp1_1); +} + +static void HTTP_CacheRequest(http_request_t *request) +{ + WCHAR url[INTERNET_MAX_URL_LENGTH]; + WCHAR cacheFileName[MAX_PATH+1]; + BOOL b; + + b = HTTP_GetRequestURL(request, url); + if(!b) { + WARN("Could not get URL\n"); + return; + } + + b = CreateUrlCacheEntryW(url, request->contentLength, NULL, cacheFileName, 0); + if(b) { + HeapFree(GetProcessHeap(), 0, request->cacheFile); + CloseHandle(request->hCacheFile); + + request->cacheFile = heap_strdupW(cacheFileName); + request->hCacheFile = CreateFileW(request->cacheFile, GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if(request->hCacheFile == INVALID_HANDLE_VALUE) { + WARN("Could not create file: %u\n", GetLastError()); + request->hCacheFile = NULL; + } + }else { + WARN("Could not create cache entry: %08x\n", GetLastError()); + } +} + +static DWORD open_http_connection(http_request_t *request, BOOL *reusing) +{ + const BOOL is_https = (request->hdr.dwFlags & INTERNET_FLAG_SECURE) != 0; + http_session_t *session = request->session; + netconn_t *netconn = NULL; + server_t *server; + DWORD res; + + assert(!request->netconn); + reset_data_stream(request); + + server = get_server(session->serverName, session->serverPort); + if(!server) + return ERROR_OUTOFMEMORY; + + res = HTTP_ResolveName(request, server); + if(res != ERROR_SUCCESS) { + server_release(server); + return res; + } + + EnterCriticalSection(&connection_pool_cs); + + while(!list_empty(&server->conn_pool)) { + netconn = LIST_ENTRY(list_head(&server->conn_pool), netconn_t, pool_entry); + list_remove(&netconn->pool_entry); + + if(NETCON_is_alive(netconn)) + break; + + TRACE("connection %p closed during idle\n", netconn); + free_netconn(netconn); + netconn = NULL; + } + + LeaveCriticalSection(&connection_pool_cs); + + if(netconn) { + TRACE("<-- reusing %p netconn\n", netconn); + request->netconn = netconn; + *reusing = TRUE; + return ERROR_SUCCESS; + } + + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, + INTERNET_STATUS_CONNECTING_TO_SERVER, + server->addr_str, + strlen(server->addr_str)+1); + + res = create_netconn(is_https, server, request->security_flags, &netconn); + server_release(server); + if(res != ERROR_SUCCESS) { + ERR("create_netconn failed: %u\n", res); + return res; + } + + request->netconn = netconn; + + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, + INTERNET_STATUS_CONNECTED_TO_SERVER, + server->addr_str, strlen(server->addr_str)+1); + + if(is_https) { + /* Note: we differ from Microsoft's WinINet here. they seem to have + * a bug that causes no status callbacks to be sent when starting + * a tunnel to a proxy server using the CONNECT verb. i believe our + * behaviour to be more correct and to not cause any incompatibilities + * because using a secure connection through a proxy server is a rare + * case that would be hard for anyone to depend on */ + if(session->appInfo->proxy) + res = HTTP_SecureProxyConnect(request); + if(res == ERROR_SUCCESS) + res = NETCON_secure_connect(request->netconn, session->hostName); + if(res != ERROR_SUCCESS) + { + WARN("Couldn't connect securely to host\n"); + + if((request->hdr.ErrorMask&INTERNET_ERROR_MASK_COMBINED_SEC_CERT) && ( + res == ERROR_INTERNET_SEC_CERT_DATE_INVALID + || res == ERROR_INTERNET_INVALID_CA + || res == ERROR_INTERNET_SEC_CERT_NO_REV + || res == ERROR_INTERNET_SEC_CERT_REV_FAILED + || res == ERROR_INTERNET_SEC_CERT_REVOKED + || res == ERROR_INTERNET_SEC_INVALID_CERT + || res == ERROR_INTERNET_SEC_CERT_CN_INVALID)) + res = ERROR_INTERNET_SEC_CERT_ERRORS; + } + } + + if(res != ERROR_SUCCESS) { + http_release_netconn(request, FALSE); + return res; + } + + *reusing = FALSE; + TRACE("Created connection to %s: %p\n", debugstr_w(server->name), netconn); + return ERROR_SUCCESS; } /*********************************************************************** @@ -3597,11 +4540,11 @@ static void HTTP_InsertCookies(http_request_t *lpwhr) * Sends the specified request to the HTTP server * * RETURNS - * TRUE on success - * FALSE on failure + * ERROR_SUCCESS on success + * win32 error code on failure * */ -static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, +static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength, DWORD dwContentLength, BOOL bEndRequest) { @@ -3617,43 +4560,43 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, WCHAR contentLengthStr[sizeof szContentLength/2 /* includes \r\n */ + 20 /* int */ ]; DWORD res; - TRACE("--> %p\n", lpwhr); + TRACE("--> %p\n", request); - assert(lpwhr->hdr.htype == WH_HHTTPREQ); + assert(request->hdr.htype == WH_HHTTPREQ); /* if the verb is NULL default to GET */ - if (!lpwhr->lpszVerb) - lpwhr->lpszVerb = heap_strdupW(szGET); + if (!request->verb) + request->verb = heap_strdupW(szGET); - if (dwContentLength || strcmpW(lpwhr->lpszVerb, szGET)) + if (dwContentLength || strcmpW(request->verb, szGET)) { sprintfW(contentLengthStr, szContentLength, dwContentLength); - HTTP_HttpAddRequestHeadersW(lpwhr, contentLengthStr, -1L, HTTP_ADDREQ_FLAG_REPLACE); - lpwhr->dwBytesToWrite = dwContentLength; + HTTP_HttpAddRequestHeadersW(request, contentLengthStr, -1L, HTTP_ADDREQ_FLAG_REPLACE); + request->bytesToWrite = dwContentLength; } - if (lpwhr->lpHttpSession->lpAppInfo->lpszAgent) + if (request->session->appInfo->agent) { WCHAR *agent_header; static const WCHAR user_agent[] = {'U','s','e','r','-','A','g','e','n','t',':',' ','%','s','\r','\n',0}; int len; - len = strlenW(lpwhr->lpHttpSession->lpAppInfo->lpszAgent) + strlenW(user_agent); - agent_header = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - sprintfW(agent_header, user_agent, lpwhr->lpHttpSession->lpAppInfo->lpszAgent); + len = strlenW(request->session->appInfo->agent) + strlenW(user_agent); + agent_header = heap_alloc(len * sizeof(WCHAR)); + sprintfW(agent_header, user_agent, request->session->appInfo->agent); - HTTP_HttpAddRequestHeadersW(lpwhr, agent_header, strlenW(agent_header), HTTP_ADDREQ_FLAG_ADD_IF_NEW); + HTTP_HttpAddRequestHeadersW(request, agent_header, strlenW(agent_header), HTTP_ADDREQ_FLAG_ADD_IF_NEW); HeapFree(GetProcessHeap(), 0, agent_header); } - if (lpwhr->hdr.dwFlags & INTERNET_FLAG_PRAGMA_NOCACHE) + if (request->hdr.dwFlags & INTERNET_FLAG_PRAGMA_NOCACHE) { static const WCHAR pragma_nocache[] = {'P','r','a','g','m','a',':',' ','n','o','-','c','a','c','h','e','\r','\n',0}; - HTTP_HttpAddRequestHeadersW(lpwhr, pragma_nocache, strlenW(pragma_nocache), HTTP_ADDREQ_FLAG_ADD_IF_NEW); + HTTP_HttpAddRequestHeadersW(request, pragma_nocache, strlenW(pragma_nocache), HTTP_ADDREQ_FLAG_ADD_IF_NEW); } - if ((lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_CACHE_WRITE) && !strcmpW(lpwhr->lpszVerb, szPost)) + if ((request->hdr.dwFlags & INTERNET_FLAG_NO_CACHE_WRITE) && !strcmpW(request->verb, szPost)) { static const WCHAR cache_control[] = {'C','a','c','h','e','-','C','o','n','t','r','o','l',':', ' ','n','o','-','c','a','c','h','e','\r','\n',0}; - HTTP_HttpAddRequestHeadersW(lpwhr, cache_control, strlenW(cache_control), HTTP_ADDREQ_FLAG_ADD_IF_NEW); + HTTP_HttpAddRequestHeadersW(request, cache_control, strlenW(cache_control), HTTP_ADDREQ_FLAG_ADD_IF_NEW); } do @@ -3666,64 +4609,57 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, /* like native, just in case the caller forgot to call InternetReadFile * for all the data */ - HTTP_DrainContent(lpwhr); - lpwhr->dwContentRead = 0; + drain_content(request); if(redirected) { - lpwhr->dwContentLength = ~0u; - lpwhr->dwBytesToWrite = 0; + request->contentLength = ~0u; + request->bytesToWrite = 0; } if (TRACE_ON(wininet)) { - LPHTTPHEADERW Host = HTTP_GetHeader(lpwhr, hostW); - TRACE("Going to url %s %s\n", debugstr_w(Host->lpszValue), debugstr_w(lpwhr->lpszPath)); + LPHTTPHEADERW Host = HTTP_GetHeader(request, hostW); + TRACE("Going to url %s %s\n", debugstr_w(Host->lpszValue), debugstr_w(request->path)); } - HTTP_FixURL(lpwhr); - if (lpwhr->hdr.dwFlags & INTERNET_FLAG_KEEP_CONNECTION) + HTTP_FixURL(request); + if (request->hdr.dwFlags & INTERNET_FLAG_KEEP_CONNECTION) { - HTTP_ProcessHeader(lpwhr, szConnection, szKeepAlive, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE); + HTTP_ProcessHeader(request, szConnection, szKeepAlive, HTTP_ADDHDR_FLAG_REQ | HTTP_ADDHDR_FLAG_REPLACE); } - HTTP_InsertAuthorization(lpwhr, lpwhr->pAuthInfo, szAuthorization); - HTTP_InsertAuthorization(lpwhr, lpwhr->pProxyAuthInfo, szProxy_Authorization); + HTTP_InsertAuthorization(request, request->authInfo, szAuthorization); + HTTP_InsertAuthorization(request, request->proxyAuthInfo, szProxy_Authorization); - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)) - HTTP_InsertCookies(lpwhr); + if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)) + HTTP_InsertCookies(request); /* add the headers the caller supplied */ if( lpszHeaders && dwHeaderLength ) { - HTTP_HttpAddRequestHeadersW(lpwhr, lpszHeaders, dwHeaderLength, + HTTP_HttpAddRequestHeadersW(request, lpszHeaders, dwHeaderLength, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REPLACE); } - if (lpwhr->lpHttpSession->lpAppInfo->lpszProxy && lpwhr->lpHttpSession->lpAppInfo->lpszProxy[0]) + if (request->session->appInfo->proxy && request->session->appInfo->proxy[0]) { - WCHAR *url = HTTP_BuildProxyRequestUrl(lpwhr); - requestString = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, url, lpwhr->lpszVersion); + WCHAR *url = HTTP_BuildProxyRequestUrl(request); + requestString = HTTP_BuildHeaderRequestString(request, request->verb, url, request->version); HeapFree(GetProcessHeap(), 0, url); } else - requestString = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath, lpwhr->lpszVersion); + requestString = HTTP_BuildHeaderRequestString(request, request->verb, request->path, request->version); TRACE("Request header -> %s\n", debugstr_w(requestString) ); - /* Send the request and store the results */ - if(NETCON_connected(&lpwhr->netConnection)) - reusing_connection = TRUE; - else - reusing_connection = FALSE; - - if ((res = HTTP_OpenConnection(lpwhr)) != ERROR_SUCCESS) - goto lend; + if ((res = open_http_connection(request, &reusing_connection)) != ERROR_SUCCESS) + break; /* send the request as ASCII, tack on the optional data */ if (!lpOptional || redirected) dwOptionalLength = 0; len = WideCharToMultiByte( CP_ACP, 0, requestString, -1, NULL, 0, NULL, NULL ); - ascii_req = HeapAlloc( GetProcessHeap(), 0, len + dwOptionalLength ); + ascii_req = heap_alloc(len + dwOptionalLength); WideCharToMultiByte( CP_ACP, 0, requestString, -1, ascii_req, len, NULL, NULL ); if( lpOptional ) @@ -3732,15 +4668,23 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, ascii_req[len] = 0; TRACE("full request -> %s\n", debugstr_a(ascii_req) ); - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0); - res = NETCON_send(&lpwhr->netConnection, ascii_req, len, 0, &cnt); + res = NETCON_send(request->netconn, ascii_req, len, 0, &cnt); HeapFree( GetProcessHeap(), 0, ascii_req ); + if(res != ERROR_SUCCESS) { + TRACE("send failed: %u\n", res); + if(!reusing_connection) + break; + http_release_netconn(request, FALSE); + loop_next = TRUE; + continue; + } - lpwhr->dwBytesWritten = dwOptionalLength; + request->bytesWritten = dwOptionalLength; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_REQUEST_SENT, &len, sizeof(DWORD)); @@ -3749,54 +4693,60 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, DWORD dwBufferSize; DWORD dwStatusCode; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0); - if (res != ERROR_SUCCESS) - goto lend; - - responseLen = HTTP_GetResponseHeaders(lpwhr, TRUE); + responseLen = HTTP_GetResponseHeaders(request, TRUE); /* FIXME: We should know that connection is closed before sending * headers. Otherwise wrong callbacks are executed */ if(!responseLen && reusing_connection) { TRACE("Connection closed by server, reconnecting\n"); + http_release_netconn(request, FALSE); loop_next = TRUE; continue; } - - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, &responseLen, sizeof(DWORD)); - HTTP_ProcessCookies(lpwhr); - - if (!set_content_length( lpwhr )) HTTP_FinishedReading(lpwhr); + http_process_keep_alive(request); + HTTP_ProcessCookies(request); + HTTP_ProcessExpires(request); + HTTP_ProcessLastModified(request); dwBufferSize = sizeof(dwStatusCode); - if (HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE, + if (HTTP_HttpQueryInfoW(request,HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE, &dwStatusCode,&dwBufferSize,NULL) != ERROR_SUCCESS) dwStatusCode = 0; - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_AUTO_REDIRECT) && responseLen) + res = set_content_length(request, dwStatusCode); + if(res != ERROR_SUCCESS) + goto lend; + if(!request->contentLength) + http_release_netconn(request, TRUE); + + if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_AUTO_REDIRECT) && responseLen) { WCHAR *new_url, szNewLocation[INTERNET_MAX_URL_LENGTH]; dwBufferSize=sizeof(szNewLocation); if ((dwStatusCode == HTTP_STATUS_REDIRECT || dwStatusCode == HTTP_STATUS_MOVED || + dwStatusCode == HTTP_STATUS_REDIRECT_KEEP_VERB || dwStatusCode == HTTP_STATUS_REDIRECT_METHOD) && - HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,NULL) == ERROR_SUCCESS) + HTTP_HttpQueryInfoW(request,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,NULL) == ERROR_SUCCESS) { - if (strcmpW(lpwhr->lpszVerb, szGET) && strcmpW(lpwhr->lpszVerb, szHEAD)) + if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD)) { - HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb); - lpwhr->lpszVerb = heap_strdupW(szGET); + HeapFree(GetProcessHeap(), 0, request->verb); + request->verb = heap_strdupW(szGET); } - HTTP_DrainContent(lpwhr); - if ((new_url = HTTP_GetRedirectURL( lpwhr, szNewLocation ))) + drain_content(request); + if ((new_url = HTTP_GetRedirectURL( request, szNewLocation ))) { - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_REDIRECT, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_REDIRECT, new_url, (strlenW(new_url) + 1) * sizeof(WCHAR)); - res = HTTP_HandleRedirect(lpwhr, new_url); + res = HTTP_HandleRedirect(request, new_url); if (res == ERROR_SUCCESS) { HeapFree(GetProcessHeap(), 0, requestString); @@ -3807,20 +4757,20 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, redirected = TRUE; } } - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_AUTH) && res == ERROR_SUCCESS) + if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_AUTH) && res == ERROR_SUCCESS) { WCHAR szAuthValue[2048]; dwBufferSize=2048; if (dwStatusCode == HTTP_STATUS_DENIED) { - LPHTTPHEADERW Host = HTTP_GetHeader(lpwhr, hostW); + LPHTTPHEADERW Host = HTTP_GetHeader(request, hostW); DWORD dwIndex = 0; - while (HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_WWW_AUTHENTICATE,szAuthValue,&dwBufferSize,&dwIndex) == ERROR_SUCCESS) + while (HTTP_HttpQueryInfoW(request,HTTP_QUERY_WWW_AUTHENTICATE,szAuthValue,&dwBufferSize,&dwIndex) == ERROR_SUCCESS) { - if (HTTP_DoAuthorization(lpwhr, szAuthValue, - &lpwhr->pAuthInfo, - lpwhr->lpHttpSession->lpszUserName, - lpwhr->lpHttpSession->lpszPassword, + if (HTTP_DoAuthorization(request, szAuthValue, + &request->authInfo, + request->session->userName, + request->session->password, Host->lpszValue)) { HeapFree(GetProcessHeap(), 0, requestString); @@ -3831,19 +4781,19 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, if(!loop_next) { TRACE("Cleaning wrong authorization data\n"); - destroy_authinfo(lpwhr->pAuthInfo); - lpwhr->pAuthInfo = NULL; + destroy_authinfo(request->authInfo); + request->authInfo = NULL; } } if (dwStatusCode == HTTP_STATUS_PROXY_AUTH_REQ) { DWORD dwIndex = 0; - while (HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_PROXY_AUTHENTICATE,szAuthValue,&dwBufferSize,&dwIndex) == ERROR_SUCCESS) + while (HTTP_HttpQueryInfoW(request,HTTP_QUERY_PROXY_AUTHENTICATE,szAuthValue,&dwBufferSize,&dwIndex) == ERROR_SUCCESS) { - if (HTTP_DoAuthorization(lpwhr, szAuthValue, - &lpwhr->pProxyAuthInfo, - lpwhr->lpHttpSession->lpAppInfo->lpszProxyUsername, - lpwhr->lpHttpSession->lpAppInfo->lpszProxyPassword, + if (HTTP_DoAuthorization(request, szAuthValue, + &request->proxyAuthInfo, + request->session->appInfo->proxyUsername, + request->session->appInfo->proxyPassword, NULL)) { loop_next = TRUE; @@ -3853,8 +4803,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, if(!loop_next) { TRACE("Cleaning wrong proxy authorization data\n"); - destroy_authinfo(lpwhr->pProxyAuthInfo); - lpwhr->pProxyAuthInfo = NULL; + destroy_authinfo(request->proxyAuthInfo); + request->proxyAuthInfo = NULL; } } } @@ -3864,33 +4814,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders, } while (loop_next); - if(res == ERROR_SUCCESS) { - WCHAR url[INTERNET_MAX_URL_LENGTH]; - WCHAR cacheFileName[MAX_PATH+1]; - BOOL b; - - b = HTTP_GetRequestURL(lpwhr, url); - if(!b) { - WARN("Could not get URL\n"); - goto lend; - } - - b = CreateUrlCacheEntryW(url, lpwhr->dwContentLength > 0 ? lpwhr->dwContentLength : 0, NULL, cacheFileName, 0); - if(b) { - HeapFree(GetProcessHeap(), 0, lpwhr->lpszCacheFile); - CloseHandle(lpwhr->hCacheFile); - - lpwhr->lpszCacheFile = heap_strdupW(cacheFileName); - lpwhr->hCacheFile = CreateFileW(lpwhr->lpszCacheFile, GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, - NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if(lpwhr->hCacheFile == INVALID_HANDLE_VALUE) { - WARN("Could not create file: %u\n", GetLastError()); - lpwhr->hCacheFile = NULL; - } - }else { - WARN("Could not create cache entry: %08x\n", GetLastError()); - } - } + if(res == ERROR_SUCCESS) + HTTP_CacheRequest(request); lend: @@ -3898,16 +4823,16 @@ lend: /* TODO: send notification for P3P header */ - if (lpwhr->lpHttpSession->lpAppInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) + if (request->session->appInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) { - if (res == ERROR_SUCCESS && lpwhr->dwBytesWritten == lpwhr->dwBytesToWrite) - HTTP_ReceiveRequestData(lpwhr, TRUE); + if (res == ERROR_SUCCESS && request->contentLength && request->bytesWritten == request->bytesToWrite) + HTTP_ReceiveRequestData(request, TRUE); else { - iar.dwResult = (res==ERROR_SUCCESS ? (DWORD_PTR)lpwhr->hdr.hInternet : 0); + iar.dwResult = (res==ERROR_SUCCESS ? (DWORD_PTR)request->hdr.hInternet : 0); iar.dwError = res; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -3925,11 +4850,11 @@ lend: static void AsyncHttpSendRequestProc(WORKREQUEST *workRequest) { struct WORKREQ_HTTPSENDREQUESTW const *req = &workRequest->u.HttpSendRequestW; - http_request_t *lpwhr = (http_request_t*) workRequest->hdr; + http_request_t *request = (http_request_t*) workRequest->hdr; - TRACE("%p\n", lpwhr); + TRACE("%p\n", request); - HTTP_HttpSendRequestW(lpwhr, req->lpszHeader, + HTTP_HttpSendRequestW(request, req->lpszHeader, req->dwHeaderLength, req->lpOptional, req->dwOptionalLength, req->dwContentLength, req->bEndRequest); @@ -3937,63 +4862,79 @@ static void AsyncHttpSendRequestProc(WORKREQUEST *workRequest) } -static DWORD HTTP_HttpEndRequestW(http_request_t *lpwhr, DWORD dwFlags, DWORD_PTR dwContext) +static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_PTR dwContext) { INT responseLen; + DWORD dwCode, dwCodeLength; DWORD dwBufferSize; - INTERNET_ASYNC_RESULT iar; DWORD res = ERROR_SUCCESS; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0); - responseLen = HTTP_GetResponseHeaders(lpwhr, TRUE); + responseLen = HTTP_GetResponseHeaders(request, TRUE); if (!responseLen) res = ERROR_HTTP_HEADER_NOT_FOUND; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, &responseLen, sizeof(DWORD)); /* process cookies here. Is this right? */ - HTTP_ProcessCookies(lpwhr); + http_process_keep_alive(request); + HTTP_ProcessCookies(request); + HTTP_ProcessExpires(request); + HTTP_ProcessLastModified(request); - if (!set_content_length( lpwhr )) HTTP_FinishedReading(lpwhr); + dwCodeLength = sizeof(dwCode); + if (HTTP_HttpQueryInfoW(request,HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE, + &dwCode,&dwCodeLength,NULL) != ERROR_SUCCESS) + dwCode = 0; - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_AUTO_REDIRECT)) + if ((res = set_content_length( request, dwCode )) == ERROR_SUCCESS) { + if(!request->contentLength) + http_release_netconn(request, TRUE); + } + + if (res == ERROR_SUCCESS && !(request->hdr.dwFlags & INTERNET_FLAG_NO_AUTO_REDIRECT)) { - DWORD dwCode,dwCodeLength = sizeof(DWORD); - if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE, &dwCode, &dwCodeLength, NULL) == ERROR_SUCCESS - && (dwCode == 302 || dwCode == 301 || dwCode == 303)) + if (dwCode == HTTP_STATUS_REDIRECT || + dwCode == HTTP_STATUS_MOVED || + dwCode == HTTP_STATUS_REDIRECT_METHOD || + dwCode == HTTP_STATUS_REDIRECT_KEEP_VERB) { WCHAR *new_url, szNewLocation[INTERNET_MAX_URL_LENGTH]; dwBufferSize=sizeof(szNewLocation); - if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_LOCATION, szNewLocation, &dwBufferSize, NULL) == ERROR_SUCCESS) + if (HTTP_HttpQueryInfoW(request, HTTP_QUERY_LOCATION, szNewLocation, &dwBufferSize, NULL) == ERROR_SUCCESS) { - if (strcmpW(lpwhr->lpszVerb, szGET) && strcmpW(lpwhr->lpszVerb, szHEAD)) + if (strcmpW(request->verb, szGET) && strcmpW(request->verb, szHEAD)) { - HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb); - lpwhr->lpszVerb = heap_strdupW(szGET); + HeapFree(GetProcessHeap(), 0, request->verb); + request->verb = heap_strdupW(szGET); } - HTTP_DrainContent(lpwhr); - if ((new_url = HTTP_GetRedirectURL( lpwhr, szNewLocation ))) + drain_content(request); + if ((new_url = HTTP_GetRedirectURL( request, szNewLocation ))) { - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_REDIRECT, + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, INTERNET_STATUS_REDIRECT, new_url, (strlenW(new_url) + 1) * sizeof(WCHAR)); - res = HTTP_HandleRedirect(lpwhr, new_url); + res = HTTP_HandleRedirect(request, new_url); if (res == ERROR_SUCCESS) - res = HTTP_HttpSendRequestW(lpwhr, NULL, 0, NULL, 0, 0, TRUE); + res = HTTP_HttpSendRequestW(request, NULL, 0, NULL, 0, 0, TRUE); HeapFree( GetProcessHeap(), 0, new_url ); } } } } - iar.dwResult = (res==ERROR_SUCCESS ? (DWORD_PTR)lpwhr->hdr.hInternet : 0); - iar.dwError = res; + if (res == ERROR_SUCCESS && request->contentLength) { + HTTP_ReceiveRequestData(request, TRUE); + }else { + INTERNET_ASYNC_RESULT iar = {0, res}; + + INTERNET_SendCallback(&request->hdr, request->hdr.dwContext, + INTERNET_STATUS_REQUEST_COMPLETE, &iar, + sizeof(INTERNET_ASYNC_RESULT)); + } - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, - INTERNET_STATUS_REQUEST_COMPLETE, &iar, - sizeof(INTERNET_ASYNC_RESULT)); return res; } @@ -4024,11 +4965,11 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest, static void AsyncHttpEndRequestProc(WORKREQUEST *work) { struct WORKREQ_HTTPENDREQUESTW const *req = &work->u.HttpEndRequestW; - http_request_t *lpwhr = (http_request_t*)work->hdr; + http_request_t *request = (http_request_t*)work->hdr; - TRACE("%p\n", lpwhr); + TRACE("%p\n", request); - HTTP_HttpEndRequestW(lpwhr, req->dwFlags, req->dwContext); + HTTP_HttpEndRequestW(request, req->dwFlags, req->dwContext); } /*********************************************************************** @@ -4044,7 +4985,7 @@ static void AsyncHttpEndRequestProc(WORKREQUEST *work) BOOL WINAPI HttpEndRequestW(HINTERNET hRequest, LPINTERNET_BUFFERSW lpBuffersOut, DWORD dwFlags, DWORD_PTR dwContext) { - http_request_t *lpwhr; + http_request_t *request; DWORD res; TRACE("-->\n"); @@ -4055,36 +4996,36 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest, return FALSE; } - lpwhr = (http_request_t*) WININET_GetObject( hRequest ); + request = (http_request_t*) get_handle_object( hRequest ); - if (NULL == lpwhr || lpwhr->hdr.htype != WH_HHTTPREQ) + if (NULL == request || request->hdr.htype != WH_HHTTPREQ) { SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); - if (lpwhr) - WININET_Release( &lpwhr->hdr ); + if (request) + WININET_Release( &request->hdr ); return FALSE; } - lpwhr->hdr.dwFlags |= dwFlags; + request->hdr.dwFlags |= dwFlags; - if (lpwhr->lpHttpSession->lpAppInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) + if (request->session->appInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) { WORKREQUEST work; - struct WORKREQ_HTTPENDREQUESTW *request; + struct WORKREQ_HTTPENDREQUESTW *work_endrequest; work.asyncproc = AsyncHttpEndRequestProc; - work.hdr = WININET_AddRef( &lpwhr->hdr ); + work.hdr = WININET_AddRef( &request->hdr ); - request = &work.u.HttpEndRequestW; - request->dwFlags = dwFlags; - request->dwContext = dwContext; + work_endrequest = &work.u.HttpEndRequestW; + work_endrequest->dwFlags = dwFlags; + work_endrequest->dwContext = dwContext; INTERNET_AsyncCall(&work); res = ERROR_IO_PENDING; } else - res = HTTP_HttpEndRequestW(lpwhr, dwFlags, dwContext); + res = HTTP_HttpEndRequestW(request, dwFlags, dwContext); - WININET_Release( &lpwhr->hdr ); + WININET_Release( &request->hdr ); TRACE("%u <--\n", res); if(res != ERROR_SUCCESS) SetLastError(res); @@ -4121,7 +5062,7 @@ BOOL WINAPI HttpSendRequestExA(HINTERNET hRequest, { headerlen = MultiByteToWideChar(CP_ACP,0,lpBuffersIn->lpcszHeader, lpBuffersIn->dwHeadersLength,0,0); - header = HeapAlloc(GetProcessHeap(),0,headerlen*sizeof(WCHAR)); + header = heap_alloc(headerlen*sizeof(WCHAR)); if (!(BuffersInW.lpcszHeader = header)) { SetLastError(ERROR_OUTOFMEMORY); @@ -4162,25 +5103,25 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest, LPINTERNET_BUFFERSW lpBuffersOut, DWORD dwFlags, DWORD_PTR dwContext) { - http_request_t *lpwhr; - http_session_t *lpwhs; + http_request_t *request; + http_session_t *session; appinfo_t *hIC; DWORD res; TRACE("(%p, %p, %p, %08x, %08lx)\n", hRequest, lpBuffersIn, lpBuffersOut, dwFlags, dwContext); - lpwhr = (http_request_t*) WININET_GetObject( hRequest ); + request = (http_request_t*) get_handle_object( hRequest ); - if (NULL == lpwhr || lpwhr->hdr.htype != WH_HHTTPREQ) + if (NULL == request || request->hdr.htype != WH_HHTTPREQ) { res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; goto lend; } - lpwhs = lpwhr->lpHttpSession; - assert(lpwhs->hdr.htype == WH_HHTTPSESSION); - hIC = lpwhs->lpAppInfo; + session = request->session; + assert(session->hdr.htype == WH_HHTTPSESSION); + hIC = session->appInfo; assert(hIC->hdr.htype == WH_HINIT); if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC) @@ -4189,7 +5130,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest, struct WORKREQ_HTTPSENDREQUESTW *req; workRequest.asyncproc = AsyncHttpSendRequestProc; - workRequest.hdr = WININET_AddRef( &lpwhr->hdr ); + workRequest.hdr = WININET_AddRef( &request->hdr ); req = &workRequest.u.HttpSendRequestW; if (lpBuffersIn) { @@ -4202,7 +5143,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest, else size = lpBuffersIn->dwHeadersLength * sizeof(WCHAR); - req->lpszHeader = HeapAlloc( GetProcessHeap(), 0, size ); + req->lpszHeader = heap_alloc(size); memcpy( req->lpszHeader, lpBuffersIn->lpcszHeader, size ); } else req->lpszHeader = NULL; @@ -4232,16 +5173,16 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest, else { if (lpBuffersIn) - res = HTTP_HttpSendRequestW(lpwhr, lpBuffersIn->lpcszHeader, lpBuffersIn->dwHeadersLength, + res = HTTP_HttpSendRequestW(request, lpBuffersIn->lpcszHeader, lpBuffersIn->dwHeadersLength, lpBuffersIn->lpvBuffer, lpBuffersIn->dwBufferLength, lpBuffersIn->dwBufferTotal, FALSE); else - res = HTTP_HttpSendRequestW(lpwhr, NULL, 0, NULL, 0, 0, FALSE); + res = HTTP_HttpSendRequestW(request, NULL, 0, NULL, 0, 0, FALSE); } lend: - if ( lpwhr ) - WININET_Release( &lpwhr->hdr ); + if ( request ) + WININET_Release( &request->hdr ); TRACE("<---\n"); SetLastError(res); @@ -4261,29 +5202,29 @@ lend: BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders, DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength) { - http_request_t *lpwhr; - http_session_t *lpwhs = NULL; + http_request_t *request; + http_session_t *session = NULL; appinfo_t *hIC = NULL; DWORD res = ERROR_SUCCESS; TRACE("%p, %s, %i, %p, %i)\n", hHttpRequest, debugstr_wn(lpszHeaders, dwHeaderLength), dwHeaderLength, lpOptional, dwOptionalLength); - lpwhr = (http_request_t*) WININET_GetObject( hHttpRequest ); - if (NULL == lpwhr || lpwhr->hdr.htype != WH_HHTTPREQ) + request = (http_request_t*) get_handle_object( hHttpRequest ); + if (NULL == request || request->hdr.htype != WH_HHTTPREQ) { res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; goto lend; } - lpwhs = lpwhr->lpHttpSession; - if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION) + session = request->session; + if (NULL == session || session->hdr.htype != WH_HHTTPSESSION) { res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; goto lend; } - hIC = lpwhs->lpAppInfo; + hIC = session->appInfo; if (NULL == hIC || hIC->hdr.htype != WH_HINIT) { res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE; @@ -4296,7 +5237,7 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders, struct WORKREQ_HTTPSENDREQUESTW *req; workRequest.asyncproc = AsyncHttpSendRequestProc; - workRequest.hdr = WININET_AddRef( &lpwhr->hdr ); + workRequest.hdr = WININET_AddRef( &request->hdr ); req = &workRequest.u.HttpSendRequestW; if (lpszHeaders) { @@ -4305,7 +5246,7 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders, if (dwHeaderLength == ~0u) size = (strlenW(lpszHeaders) + 1) * sizeof(WCHAR); else size = dwHeaderLength * sizeof(WCHAR); - req->lpszHeader = HeapAlloc(GetProcessHeap(), 0, size); + req->lpszHeader = heap_alloc(size); memcpy(req->lpszHeader, lpszHeaders, size); } else @@ -4324,13 +5265,13 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders, } else { - res = HTTP_HttpSendRequestW(lpwhr, lpszHeaders, + res = HTTP_HttpSendRequestW(request, lpszHeaders, dwHeaderLength, lpOptional, dwOptionalLength, dwOptionalLength, TRUE); } lend: - if( lpwhr ) - WININET_Release( &lpwhr->hdr ); + if( request ) + WININET_Release( &request->hdr ); SetLastError(res); return res == ERROR_SUCCESS; @@ -4355,7 +5296,7 @@ BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders, if(lpszHeaders!=NULL) { nLen=MultiByteToWideChar(CP_ACP,0,lpszHeaders,dwHeaderLength,NULL,0); - szHeaders=HeapAlloc(GetProcessHeap(),0,nLen*sizeof(WCHAR)); + szHeaders = heap_alloc(nLen*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP,0,lpszHeaders,dwHeaderLength,szHeaders,nLen); } result=HttpSendRequestW(hHttpRequest, szHeaders, nLen, lpOptional, dwOptionalLength); @@ -4371,17 +5312,16 @@ BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders, */ static void HTTPSESSION_Destroy(object_header_t *hdr) { - http_session_t *lpwhs = (http_session_t*) hdr; + http_session_t *session = (http_session_t*) hdr; - TRACE("%p\n", lpwhs); + TRACE("%p\n", session); - WININET_Release(&lpwhs->lpAppInfo->hdr); + WININET_Release(&session->appInfo->hdr); - HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName); - HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); - HeapFree(GetProcessHeap(), 0, lpwhs->lpszPassword); - HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName); - HeapFree(GetProcessHeap(), 0, lpwhs); + HeapFree(GetProcessHeap(), 0, session->hostName); + HeapFree(GetProcessHeap(), 0, session->serverName); + HeapFree(GetProcessHeap(), 0, session->password); + HeapFree(GetProcessHeap(), 0, session->userName); } static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) @@ -4408,14 +5348,14 @@ static DWORD HTTPSESSION_SetOption(object_header_t *hdr, DWORD option, void *buf switch(option) { case INTERNET_OPTION_USERNAME: { - HeapFree(GetProcessHeap(), 0, ses->lpszUserName); - if (!(ses->lpszUserName = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; + HeapFree(GetProcessHeap(), 0, ses->userName); + if (!(ses->userName = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; return ERROR_SUCCESS; } case INTERNET_OPTION_PASSWORD: { - HeapFree(GetProcessHeap(), 0, ses->lpszPassword); - if (!(ses->lpszPassword = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; + HeapFree(GetProcessHeap(), 0, ses->password); + if (!(ses->password = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; return ERROR_SUCCESS; } default: break; @@ -4448,13 +5388,11 @@ static const object_vtbl_t HTTPSESSIONVtbl = { * */ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, - INTERNET_PORT nServerPort, LPCWSTR lpszUserName, + INTERNET_PORT serverPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, DWORD dwInternalFlags, HINTERNET *ret) { - http_session_t *lpwhs = NULL; - HINTERNET handle = NULL; - DWORD res = ERROR_SUCCESS; + http_session_t *session = NULL; TRACE("-->\n"); @@ -4463,201 +5401,73 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, assert( hIC->hdr.htype == WH_HINIT ); - lpwhs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(http_session_t)); - if (!lpwhs) + session = alloc_object(&hIC->hdr, &HTTPSESSIONVtbl, sizeof(http_session_t)); + if (!session) return ERROR_OUTOFMEMORY; /* * According to my tests. The name is not resolved until a request is sent */ - lpwhs->hdr.htype = WH_HHTTPSESSION; - lpwhs->hdr.vtbl = &HTTPSESSIONVtbl; - lpwhs->hdr.dwFlags = dwFlags; - lpwhs->hdr.dwContext = dwContext; - lpwhs->hdr.dwInternalFlags = dwInternalFlags | (hIC->hdr.dwInternalFlags & INET_CALLBACKW); - lpwhs->hdr.refs = 1; - lpwhs->hdr.lpfnStatusCB = hIC->hdr.lpfnStatusCB; + session->hdr.htype = WH_HHTTPSESSION; + session->hdr.dwFlags = dwFlags; + session->hdr.dwContext = dwContext; + session->hdr.dwInternalFlags |= dwInternalFlags; WININET_AddRef( &hIC->hdr ); - lpwhs->lpAppInfo = hIC; - list_add_head( &hIC->hdr.children, &lpwhs->hdr.entry ); + session->appInfo = hIC; + list_add_head( &hIC->hdr.children, &session->hdr.entry ); - handle = WININET_AllocHandle( &lpwhs->hdr ); - if (NULL == handle) - { - ERR("Failed to alloc handle\n"); - res = ERROR_OUTOFMEMORY; - goto lerror; - } - - if(hIC->lpszProxy && hIC->dwAccessType == INTERNET_OPEN_TYPE_PROXY) { - if(hIC->lpszProxyBypass) + if(hIC->proxy && hIC->accessType == INTERNET_OPEN_TYPE_PROXY) { + if(hIC->proxyBypass) FIXME("Proxy bypass is ignored.\n"); } - lpwhs->lpszServerName = heap_strdupW(lpszServerName); - lpwhs->lpszHostName = heap_strdupW(lpszServerName); + session->serverName = heap_strdupW(lpszServerName); + session->hostName = heap_strdupW(lpszServerName); if (lpszUserName && lpszUserName[0]) - lpwhs->lpszUserName = heap_strdupW(lpszUserName); + session->userName = heap_strdupW(lpszUserName); if (lpszPassword && lpszPassword[0]) - lpwhs->lpszPassword = heap_strdupW(lpszPassword); - lpwhs->nServerPort = nServerPort; - lpwhs->nHostPort = nServerPort; + session->password = heap_strdupW(lpszPassword); + session->serverPort = serverPort; + session->hostPort = serverPort; /* Don't send a handle created callback if this handle was created with InternetOpenUrl */ - if (!(lpwhs->hdr.dwInternalFlags & INET_OPENURL)) + if (!(session->hdr.dwInternalFlags & INET_OPENURL)) { INTERNET_SendCallback(&hIC->hdr, dwContext, - INTERNET_STATUS_HANDLE_CREATED, &handle, - sizeof(handle)); + INTERNET_STATUS_HANDLE_CREATED, &session->hdr.hInternet, + sizeof(HINTERNET)); } -lerror: - if( lpwhs ) - WININET_Release( &lpwhs->hdr ); - /* * an INTERNET_STATUS_REQUEST_COMPLETE is NOT sent here as per my tests on * windows */ - TRACE("%p --> %p (%p)\n", hIC, handle, lpwhs); + TRACE("%p --> %p\n", hIC, session); - if(res == ERROR_SUCCESS) - *ret = handle; - return res; + *ret = session->hdr.hInternet; + return ERROR_SUCCESS; } - -/*********************************************************************** - * HTTP_OpenConnection (internal) - * - * Connect to a web server - * - * RETURNS - * - * TRUE on success - * FALSE on failure - */ -static DWORD HTTP_OpenConnection(http_request_t *lpwhr) -{ - http_session_t *lpwhs; - appinfo_t *hIC = NULL; - char szaddr[INET6_ADDRSTRLEN]; - const void *addr; - DWORD res = ERROR_SUCCESS; - - TRACE("-->\n"); - - - if (lpwhr->hdr.htype != WH_HHTTPREQ) - { - res = ERROR_INVALID_PARAMETER; - goto lend; - } - - if (NETCON_connected(&lpwhr->netConnection)) - goto lend; - if ((res = HTTP_ResolveName(lpwhr)) != ERROR_SUCCESS) goto lend; - - lpwhs = lpwhr->lpHttpSession; - - hIC = lpwhs->lpAppInfo; - switch (lpwhs->socketAddress.ss_family) - { - case AF_INET: - addr = &((struct sockaddr_in *)&lpwhs->socketAddress)->sin_addr; - break; - case AF_INET6: - addr = &((struct sockaddr_in6 *)&lpwhs->socketAddress)->sin6_addr; - break; - default: - WARN("unsupported family %d\n", lpwhs->socketAddress.ss_family); - return ERROR_INTERNET_NAME_NOT_RESOLVED; - } - inet_ntop(lpwhs->socketAddress.ss_family, addr, szaddr, sizeof(szaddr)); - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, - INTERNET_STATUS_CONNECTING_TO_SERVER, - szaddr, - strlen(szaddr)+1); - - res = NETCON_create(&lpwhr->netConnection, lpwhs->socketAddress.ss_family, SOCK_STREAM, 0); - if (res != ERROR_SUCCESS) - { - WARN("Socket creation failed: %u\n", res); - goto lend; - } - - res = NETCON_connect(&lpwhr->netConnection, (struct sockaddr *)&lpwhs->socketAddress, - lpwhs->sa_len); - if(res != ERROR_SUCCESS) - goto lend; - - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, - INTERNET_STATUS_CONNECTED_TO_SERVER, - szaddr, strlen(szaddr)+1); - - if (lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE) - { - /* Note: we differ from Microsoft's WinINet here. they seem to have - * a bug that causes no status callbacks to be sent when starting - * a tunnel to a proxy server using the CONNECT verb. i believe our - * behaviour to be more correct and to not cause any incompatibilities - * because using a secure connection through a proxy server is a rare - * case that would be hard for anyone to depend on */ - if (hIC->lpszProxy && (res = HTTP_SecureProxyConnect(lpwhr)) != ERROR_SUCCESS) { - HTTPREQ_CloseConnection(&lpwhr->hdr); - goto lend; - } - - res = NETCON_secure_connect(&lpwhr->netConnection, lpwhs->lpszHostName); - if(res != ERROR_SUCCESS) - { - WARN("Couldn't connect securely to host\n"); - - if((lpwhr->hdr.ErrorMask&INTERNET_ERROR_MASK_COMBINED_SEC_CERT) && ( - res == ERROR_INTERNET_SEC_CERT_DATE_INVALID - || res == ERROR_INTERNET_INVALID_CA - || res == ERROR_INTERNET_SEC_CERT_NO_REV - || res == ERROR_INTERNET_SEC_CERT_REV_FAILED - || res == ERROR_INTERNET_SEC_CERT_REVOKED - || res == ERROR_INTERNET_SEC_INVALID_CERT - || res == ERROR_INTERNET_SEC_CERT_CN_INVALID)) - res = ERROR_INTERNET_SEC_CERT_ERRORS; - - HTTPREQ_CloseConnection(&lpwhr->hdr); - goto lend; - } - } - - -lend: - lpwhr->read_pos = lpwhr->read_size = 0; - lpwhr->read_chunked = FALSE; - - TRACE("%d <--\n", res); - return res; -} - - /*********************************************************************** * HTTP_clear_response_headers (internal) * * clear out any old response headers */ -static void HTTP_clear_response_headers( http_request_t *lpwhr ) +static void HTTP_clear_response_headers( http_request_t *request ) { DWORD i; - for( i=0; inCustHeaders; i++) + for( i=0; inCustHeaders; i++) { - if( !lpwhr->pCustHeaders[i].lpszField ) + if( !request->custHeaders[i].lpszField ) continue; - if( !lpwhr->pCustHeaders[i].lpszValue ) + if( !request->custHeaders[i].lpszValue ) continue; - if ( lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST ) + if ( request->custHeaders[i].wFlags & HDR_ISREQUEST ) continue; - HTTP_DeleteCustomHeader( lpwhr, i ); + HTTP_DeleteCustomHeader( request, i ); i--; } } @@ -4672,7 +5482,7 @@ static void HTTP_clear_response_headers( http_request_t *lpwhr ) * TRUE on success * FALSE on error */ -static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) +static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear) { INT cbreaks = 0; WCHAR buffer[MAX_REPLY_LEN]; @@ -4689,7 +5499,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) TRACE("-->\n"); - if (!NETCON_connected(&lpwhr->netConnection)) + if(!request->netconn) goto lend; do { @@ -4698,12 +5508,12 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) * We should first receive 'HTTP/1.x nnn OK' where nnn is the status code. */ buflen = MAX_REPLY_LEN; - if (!read_line(lpwhr, bufferA, &buflen)) + if (!read_line(request, bufferA, &buflen)) goto lend; /* clear old response headers (eg. from a redirect response) */ if (clear) { - HTTP_clear_response_headers( lpwhr ); + HTTP_clear_response_headers( request ); clear = FALSE; } @@ -4733,14 +5543,14 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) { WARN("No status line at head of response (%s)\n", debugstr_w(buffer)); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszVersion); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszStatusText); + HeapFree(GetProcessHeap(), 0, request->version); + HeapFree(GetProcessHeap(), 0, request->statusText); - lpwhr->lpszVersion = heap_strdupW(g_szHttp1_0); - lpwhr->lpszStatusText = heap_strdupW(szOK); + request->version = heap_strdupW(g_szHttp1_0); + request->statusText = heap_strdupW(szOK); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszRawHeaders); - lpwhr->lpszRawHeaders = heap_strdupW(szDefaultHeader); + HeapFree(GetProcessHeap(), 0, request->rawHeaders); + request->rawHeaders = heap_strdupW(szDefaultHeader); bSuccess = TRUE; goto lend; @@ -4748,26 +5558,26 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) } while (codeHundred); /* Add status code */ - HTTP_ProcessHeader(lpwhr, szStatus, status_code, + HTTP_ProcessHeader(request, szStatus, status_code, HTTP_ADDHDR_FLAG_REPLACE); - HeapFree(GetProcessHeap(),0,lpwhr->lpszVersion); - HeapFree(GetProcessHeap(),0,lpwhr->lpszStatusText); + HeapFree(GetProcessHeap(),0,request->version); + HeapFree(GetProcessHeap(),0,request->statusText); - lpwhr->lpszVersion = heap_strdupW(buffer); - lpwhr->lpszStatusText = heap_strdupW(status_text); + request->version = heap_strdupW(buffer); + request->statusText = heap_strdupW(status_text); /* Restore the spaces */ *(status_code-1) = ' '; *(status_text-1) = ' '; /* regenerate raw headers */ - lpszRawHeaders = HeapAlloc(GetProcessHeap(), 0, (cchMaxRawHeaders + 1) * sizeof(WCHAR)); + lpszRawHeaders = heap_alloc((cchMaxRawHeaders + 1) * sizeof(WCHAR)); if (!lpszRawHeaders) goto lend; while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders) cchMaxRawHeaders *= 2; - temp = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); + temp = heap_realloc(lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); if (temp == NULL) goto lend; lpszRawHeaders = temp; memcpy(lpszRawHeaders+cchRawHeaders, buffer, (buflen-1)*sizeof(WCHAR)); @@ -4780,7 +5590,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) do { buflen = MAX_REPLY_LEN; - if (read_line(lpwhr, bufferA, &buflen)) + if (read_line(request, bufferA, &buflen)) { LPWSTR * pFieldAndValue; @@ -4794,7 +5604,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) { while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders) cchMaxRawHeaders *= 2; - temp = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); + temp = heap_realloc(lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); if (temp == NULL) goto lend; lpszRawHeaders = temp; memcpy(lpszRawHeaders+cchRawHeaders, buffer, (buflen-1)*sizeof(WCHAR)); @@ -4803,7 +5613,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) cchRawHeaders += sizeof(szCrLf)/sizeof(szCrLf[0])-1; lpszRawHeaders[cchRawHeaders] = '\0'; - HTTP_ProcessHeader(lpwhr, pFieldAndValue[0], pFieldAndValue[1], + HTTP_ProcessHeader(request, pFieldAndValue[0], pFieldAndValue[1], HTTP_ADDREQ_FLAG_ADD ); HTTP_FreeTokens(pFieldAndValue); @@ -4823,15 +5633,15 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear) if (cchRawHeaders + strlenW(szCrLf) > cchMaxRawHeaders) { cchMaxRawHeaders = cchRawHeaders + strlenW(szCrLf); - temp = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders + 1) * sizeof(WCHAR)); + temp = heap_realloc(lpszRawHeaders, (cchMaxRawHeaders + 1) * sizeof(WCHAR)); if (temp == NULL) goto lend; lpszRawHeaders = temp; } memcpy(&lpszRawHeaders[cchRawHeaders], szCrLf, sizeof(szCrLf)); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszRawHeaders); - lpwhr->lpszRawHeaders = lpszRawHeaders; + HeapFree(GetProcessHeap(), 0, request->rawHeaders); + request->rawHeaders = lpszRawHeaders; TRACE("raw headers: %s\n", debugstr_w(lpszRawHeaders)); bSuccess = TRUE; @@ -4863,7 +5673,7 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer) LPWSTR pszColon; INT len; - pTokenPair = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pTokenPair)*3); + pTokenPair = heap_alloc_zero(sizeof(*pTokenPair)*3); pszColon = strchrW(buffer, ':'); /* must have two tokens */ @@ -4875,7 +5685,7 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer) return NULL; } - pTokenPair[0] = HeapAlloc(GetProcessHeap(), 0, (pszColon - buffer + 1) * sizeof(WCHAR)); + pTokenPair[0] = heap_alloc((pszColon - buffer + 1) * sizeof(WCHAR)); if (!pTokenPair[0]) { HTTP_FreeTokens(pTokenPair); @@ -4887,7 +5697,7 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer) /* skip colon */ pszColon++; len = strlenW(pszColon); - pTokenPair[1] = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR)); + pTokenPair[1] = heap_alloc((len + 1) * sizeof(WCHAR)); if (!pTokenPair[1]) { HTTP_FreeTokens(pTokenPair); @@ -4911,7 +5721,7 @@ static LPWSTR * HTTP_InterpretHttpHeader(LPCWSTR buffer) #define COALESCEFLAGS (HTTP_ADDHDR_FLAG_COALESCE|HTTP_ADDHDR_FLAG_COALESCE_WITH_COMMA|HTTP_ADDHDR_FLAG_COALESCE_WITH_SEMICOLON) -static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR value, DWORD dwModifier) +static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR value, DWORD dwModifier) { LPHTTPHEADERW lphttpHdr = NULL; INT index = -1; @@ -4927,13 +5737,13 @@ static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR va if (dwModifier & HTTP_ADDHDR_FLAG_ADD) index = -1; else - index = HTTP_GetCustomHeaderIndex(lpwhr, field, 0, request_only); + index = HTTP_GetCustomHeaderIndex(request, field, 0, request_only); if (index >= 0) { if (dwModifier & HTTP_ADDHDR_FLAG_ADD_IF_NEW) return ERROR_HTTP_INVALID_HEADER; - lphttpHdr = &lpwhr->pCustHeaders[index]; + lphttpHdr = &request->custHeaders[index]; } else if (value) { @@ -4946,7 +5756,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR va if (dwModifier & HTTP_ADDHDR_FLAG_REQ) hdr.wFlags |= HDR_ISREQUEST; - return HTTP_InsertCustomHeader(lpwhr, &hdr); + return HTTP_InsertCustomHeader(request, &hdr); } /* no value to delete */ else return ERROR_SUCCESS; @@ -4958,7 +5768,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR va if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE) { - HTTP_DeleteCustomHeader( lpwhr, index ); + HTTP_DeleteCustomHeader( request, index ); if (value) { @@ -4971,7 +5781,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR va if (dwModifier & HTTP_ADDHDR_FLAG_REQ) hdr.wFlags |= HDR_ISREQUEST; - return HTTP_InsertCustomHeader(lpwhr, &hdr); + return HTTP_InsertCustomHeader(request, &hdr); } return ERROR_SUCCESS; @@ -4997,7 +5807,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR va len = origlen + valuelen + ((ch > 0) ? 2 : 0); - lpsztmp = HeapReAlloc(GetProcessHeap(), 0, lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR)); + lpsztmp = heap_realloc(lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR)); if (lpsztmp) { lphttpHdr->lpszValue = lpsztmp; @@ -5016,7 +5826,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR va } else { - WARN("HeapReAlloc (%d bytes) failed\n",len+1); + WARN("heap_realloc (%d bytes) failed\n",len+1); res = ERROR_OUTOFMEMORY; } } @@ -5024,53 +5834,28 @@ static DWORD HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR va return res; } - -/*********************************************************************** - * HTTP_FinishedReading (internal) - * - * Called when all content from server has been read by client. - * - */ -static BOOL HTTP_FinishedReading(http_request_t *lpwhr) -{ - BOOL keepalive = HTTP_KeepAlive(lpwhr); - - TRACE("\n"); - - - if (!keepalive) - { - HTTPREQ_CloseConnection(&lpwhr->hdr); - } - - /* FIXME: store data in the URL cache here */ - - return TRUE; -} - - /*********************************************************************** * HTTP_GetCustomHeaderIndex (internal) * * Return index of custom header from header array * */ -static INT HTTP_GetCustomHeaderIndex(http_request_t *lpwhr, LPCWSTR lpszField, +static INT HTTP_GetCustomHeaderIndex(http_request_t *request, LPCWSTR lpszField, int requested_index, BOOL request_only) { DWORD index; TRACE("%s, %d, %d\n", debugstr_w(lpszField), requested_index, request_only); - for (index = 0; index < lpwhr->nCustHeaders; index++) + for (index = 0; index < request->nCustHeaders; index++) { - if (strcmpiW(lpwhr->pCustHeaders[index].lpszField, lpszField)) + if (strcmpiW(request->custHeaders[index].lpszField, lpszField)) continue; - if (request_only && !(lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST)) + if (request_only && !(request->custHeaders[index].wFlags & HDR_ISREQUEST)) continue; - if (!request_only && (lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST)) + if (!request_only && (request->custHeaders[index].wFlags & HDR_ISREQUEST)) continue; if (requested_index == 0) @@ -5078,7 +5863,7 @@ static INT HTTP_GetCustomHeaderIndex(http_request_t *lpwhr, LPCWSTR lpszField, requested_index --; } - if (index >= lpwhr->nCustHeaders) + if (index >= request->nCustHeaders) index = -1; TRACE("Return: %d\n", index); @@ -5092,27 +5877,27 @@ static INT HTTP_GetCustomHeaderIndex(http_request_t *lpwhr, LPCWSTR lpszField, * Insert header into array * */ -static DWORD HTTP_InsertCustomHeader(http_request_t *lpwhr, LPHTTPHEADERW lpHdr) +static DWORD HTTP_InsertCustomHeader(http_request_t *request, LPHTTPHEADERW lpHdr) { INT count; LPHTTPHEADERW lph = NULL; TRACE("--> %s: %s\n", debugstr_w(lpHdr->lpszField), debugstr_w(lpHdr->lpszValue)); - count = lpwhr->nCustHeaders + 1; + count = request->nCustHeaders + 1; if (count > 1) - lph = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lpwhr->pCustHeaders, sizeof(HTTPHEADERW) * count); + lph = heap_realloc_zero(request->custHeaders, sizeof(HTTPHEADERW) * count); else - lph = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HTTPHEADERW) * count); + lph = heap_alloc_zero(sizeof(HTTPHEADERW) * count); if (!lph) return ERROR_OUTOFMEMORY; - lpwhr->pCustHeaders = lph; - lpwhr->pCustHeaders[count-1].lpszField = heap_strdupW(lpHdr->lpszField); - lpwhr->pCustHeaders[count-1].lpszValue = heap_strdupW(lpHdr->lpszValue); - lpwhr->pCustHeaders[count-1].wFlags = lpHdr->wFlags; - lpwhr->pCustHeaders[count-1].wCount= lpHdr->wCount; - lpwhr->nCustHeaders++; + request->custHeaders = lph; + request->custHeaders[count-1].lpszField = heap_strdupW(lpHdr->lpszField); + request->custHeaders[count-1].lpszValue = heap_strdupW(lpHdr->lpszValue); + request->custHeaders[count-1].wFlags = lpHdr->wFlags; + request->custHeaders[count-1].wCount= lpHdr->wCount; + request->nCustHeaders++; return ERROR_SUCCESS; } @@ -5124,20 +5909,20 @@ static DWORD HTTP_InsertCustomHeader(http_request_t *lpwhr, LPHTTPHEADERW lpHdr) * Delete header from array * If this function is called, the indexs may change. */ -static BOOL HTTP_DeleteCustomHeader(http_request_t *lpwhr, DWORD index) +static BOOL HTTP_DeleteCustomHeader(http_request_t *request, DWORD index) { - if( lpwhr->nCustHeaders <= 0 ) + if( request->nCustHeaders <= 0 ) return FALSE; - if( index >= lpwhr->nCustHeaders ) + if( index >= request->nCustHeaders ) return FALSE; - lpwhr->nCustHeaders--; + request->nCustHeaders--; - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[index].lpszField); - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[index].lpszValue); + HeapFree(GetProcessHeap(), 0, request->custHeaders[index].lpszField); + HeapFree(GetProcessHeap(), 0, request->custHeaders[index].lpszValue); - memmove( &lpwhr->pCustHeaders[index], &lpwhr->pCustHeaders[index+1], - (lpwhr->nCustHeaders - index)* sizeof(HTTPHEADERW) ); - memset( &lpwhr->pCustHeaders[lpwhr->nCustHeaders], 0, sizeof(HTTPHEADERW) ); + memmove( &request->custHeaders[index], &request->custHeaders[index+1], + (request->nCustHeaders - index)* sizeof(HTTPHEADERW) ); + memset( &request->custHeaders[request->nCustHeaders], 0, sizeof(HTTPHEADERW) ); return TRUE; } @@ -5149,10 +5934,10 @@ static BOOL HTTP_DeleteCustomHeader(http_request_t *lpwhr, DWORD index) * Verify the given header is not invalid for the given http request * */ -static BOOL HTTP_VerifyValidHeader(http_request_t *lpwhr, LPCWSTR field) +static BOOL HTTP_VerifyValidHeader(http_request_t *request, LPCWSTR field) { /* Accept-Encoding is stripped from HTTP/1.0 requests. It is invalid */ - if (!strcmpW(lpwhr->lpszVersion, g_szHttp1_0) && !strcmpiW(field, szAccept_Encoding)) + if (!strcmpW(request->version, g_szHttp1_0) && !strcmpiW(field, szAccept_Encoding)) return ERROR_HTTP_INVALID_HEADER; return ERROR_SUCCESS; diff --git a/dll/win32/wininet/internet.c b/dll/win32/wininet/internet.c index 94df521e5e4..f473732c8f9 100644 --- a/dll/win32/wininet/internet.c +++ b/dll/win32/wininet/internet.c @@ -88,9 +88,7 @@ typedef struct } WITHREADERROR, *LPWITHREADERROR; static DWORD g_dwTlsErrIndex = TLS_OUT_OF_INDEXES; -static HMODULE WININET_hModule; - -#define HANDLE_CHUNK_SIZE 0x10 +HMODULE WININET_hModule; static CRITICAL_SECTION WININET_cs; static CRITICAL_SECTION_DEBUG WININET_cs_debug = @@ -101,9 +99,9 @@ static CRITICAL_SECTION_DEBUG WININET_cs_debug = }; static CRITICAL_SECTION WININET_cs = { &WININET_cs_debug, -1, 0, 0, 0, 0 }; -static object_header_t **WININET_Handles; -static UINT_PTR WININET_dwNextHandle; -static UINT_PTR WININET_dwMaxHandles; +static object_header_t **handle_table; +static UINT_PTR next_handle; +static UINT_PTR handle_table_size; typedef struct { @@ -119,48 +117,70 @@ static const WCHAR szInternetSettings[] = static const WCHAR szProxyServer[] = { 'P','r','o','x','y','S','e','r','v','e','r', 0 }; static const WCHAR szProxyEnable[] = { 'P','r','o','x','y','E','n','a','b','l','e', 0 }; -HINTERNET WININET_AllocHandle( object_header_t *info ) +void *alloc_object(object_header_t *parent, const object_vtbl_t *vtbl, size_t size) { - object_header_t **p; UINT_PTR handle = 0, num; + object_header_t *ret; + object_header_t **p; + BOOL res = TRUE; - list_init( &info->children ); + ret = heap_alloc_zero(size); + if(!ret) + return NULL; + + list_init(&ret->children); EnterCriticalSection( &WININET_cs ); - if( !WININET_dwMaxHandles ) - { - num = HANDLE_CHUNK_SIZE; - p = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof (*WININET_Handles)* num); - if( !p ) - goto end; - WININET_Handles = p; - WININET_dwMaxHandles = num; - } - if( WININET_dwMaxHandles == WININET_dwNextHandle ) - { - num = WININET_dwMaxHandles + HANDLE_CHUNK_SIZE; - p = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - WININET_Handles, sizeof (*WININET_Handles)* num); - if( !p ) - goto end; - WININET_Handles = p; - WININET_dwMaxHandles = num; + + if(!handle_table_size) { + num = 16; + p = heap_alloc_zero(sizeof(handle_table[0]) * num); + if(p) { + handle_table = p; + handle_table_size = num; + next_handle = 1; + }else { + res = FALSE; + } + }else if(next_handle == handle_table_size) { + num = handle_table_size * 2; + p = heap_realloc_zero(handle_table, sizeof(handle_table[0]) * num); + if(p) { + handle_table = p; + handle_table_size = num; + }else { + res = FALSE; + } } - handle = WININET_dwNextHandle; - if( WININET_Handles[handle] ) - ERR("handle isn't free but should be\n"); - WININET_Handles[handle] = WININET_AddRef( info ); + if(res) { + handle = next_handle; + if(handle_table[handle]) + ERR("handle isn't free but should be\n"); + handle_table[handle] = ret; + ret->valid_handle = TRUE; + + while(handle_table[next_handle] && next_handle < handle_table_size) + next_handle++; + } - while( WININET_Handles[WININET_dwNextHandle] && - (WININET_dwNextHandle < WININET_dwMaxHandles ) ) - WININET_dwNextHandle++; - -end: LeaveCriticalSection( &WININET_cs ); - return info->hInternet = (HINTERNET) (handle+1); + if(!res) { + heap_free(ret); + return NULL; + } + + ret->vtbl = vtbl; + ret->refs = 1; + ret->hInternet = (HINTERNET)handle; + + if(parent) { + ret->lpfnStatusCB = parent->lpfnStatusCB; + ret->dwInternalFlags = parent->dwInternalFlags & INET_CALLBACKW; + } + + return ret; } object_header_t *WININET_AddRef( object_header_t *info ) @@ -170,16 +190,15 @@ object_header_t *WININET_AddRef( object_header_t *info ) return info; } -object_header_t *WININET_GetObject( HINTERNET hinternet ) +object_header_t *get_handle_object( HINTERNET hinternet ) { object_header_t *info = NULL; UINT_PTR handle = (UINT_PTR) hinternet; EnterCriticalSection( &WININET_cs ); - if( (handle > 0) && ( handle <= WININET_dwMaxHandles ) && - WININET_Handles[handle-1] ) - info = WININET_AddRef( WININET_Handles[handle-1] ); + if(handle > 0 && handle < handle_table_size && handle_table[handle] && handle_table[handle]->valid_handle) + info = WININET_AddRef(handle_table[handle]); LeaveCriticalSection( &WININET_cs ); @@ -188,12 +207,31 @@ object_header_t *WININET_GetObject( HINTERNET hinternet ) return info; } +static void invalidate_handle(object_header_t *info) +{ + object_header_t *child, *next; + + if(!info->valid_handle) + return; + info->valid_handle = FALSE; + + /* Free all children as native does */ + LIST_FOR_EACH_ENTRY_SAFE( child, next, &info->children, object_header_t, entry ) + { + TRACE("invalidating child handle %p for parent %p\n", child->hInternet, info); + invalidate_handle( child ); + } + + WININET_Release(info); +} + BOOL WININET_Release( object_header_t *info ) { ULONG refs = InterlockedDecrement(&info->refs); TRACE( "object %p refcount = %d\n", info, refs ); if( !refs ) { + invalidate_handle(info); if ( info->vtbl->CloseConnection ) { TRACE( "closing connection %p\n", info); @@ -211,57 +249,24 @@ BOOL WININET_Release( object_header_t *info ) if ( info->htype != WH_HINIT ) list_remove( &info->entry ); info->vtbl->Destroy( info ); + + if(info->hInternet) { + UINT_PTR handle = (UINT_PTR)info->hInternet; + + EnterCriticalSection( &WININET_cs ); + + handle_table[handle] = NULL; + if(next_handle > handle) + next_handle = handle; + + LeaveCriticalSection( &WININET_cs ); + } + + heap_free(info); } return TRUE; } -BOOL WININET_FreeHandle( HINTERNET hinternet ) -{ - BOOL ret = FALSE; - UINT_PTR handle = (UINT_PTR) hinternet; - object_header_t *info = NULL, *child, *next; - - EnterCriticalSection( &WININET_cs ); - - if( (handle > 0) && ( handle <= WININET_dwMaxHandles ) ) - { - handle--; - if( WININET_Handles[handle] ) - { - info = WININET_Handles[handle]; - TRACE( "destroying handle %ld for object %p\n", handle+1, info); - WININET_Handles[handle] = NULL; - ret = TRUE; - } - } - - LeaveCriticalSection( &WININET_cs ); - - /* As on native when the equivalent of WININET_Release is called, the handle - * is already invalid, but if a new handle is created at this time it does - * not yet get assigned the freed handle number */ - if( info ) - { - /* Free all children as native does */ - LIST_FOR_EACH_ENTRY_SAFE( child, next, &info->children, object_header_t, entry ) - { - TRACE( "freeing child handle %ld for parent handle %ld\n", - (UINT_PTR)child->hInternet, handle+1); - WININET_FreeHandle( child->hInternet ); - } - WININET_Release( info ); - } - - EnterCriticalSection( &WININET_cs ); - - if( WININET_dwNextHandle > handle && !WININET_Handles[handle] ) - WININET_dwNextHandle = handle; - - LeaveCriticalSection( &WININET_cs ); - - return ret; -} - /*********************************************************************** * DllMain [Internal] Initializes the internal 'WININET.DLL'. * @@ -303,7 +308,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) break; case DLL_PROCESS_DETACH: - + collect_connections(TRUE); NETCON_unload(); URLCacheContainers_DeleteAll(); @@ -538,7 +543,7 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi ) LPWSTR szProxy, p; static const WCHAR szHttp[] = {'h','t','t','p','=',0}; - if (!(szProxy = HeapAlloc( GetProcessHeap(), 0, len ))) + if (!(szProxy = heap_alloc(len))) { RegCloseKey( key ); return ERROR_OUTOFMEMORY; @@ -570,7 +575,7 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi ) WCHAR *envproxyW; len = MultiByteToWideChar( CP_UNIXCP, 0, envproxy, -1, NULL, 0 ); - if (!(envproxyW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR)))) + if (!(envproxyW = heap_alloc(len * sizeof(WCHAR)))) return ERROR_OUTOFMEMORY; MultiByteToWideChar( CP_UNIXCP, 0, envproxy, -1, envproxyW, len ); @@ -598,12 +603,12 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai ) if (wpi.dwProxyEnabled) { - lpwai->dwAccessType = INTERNET_OPEN_TYPE_PROXY; - lpwai->lpszProxy = wpi.lpszProxyServer; + lpwai->accessType = INTERNET_OPEN_TYPE_PROXY; + lpwai->proxy = wpi.lpszProxyServer; return TRUE; } - lpwai->dwAccessType = INTERNET_OPEN_TYPE_DIRECT; + lpwai->accessType = INTERNET_OPEN_TYPE_DIRECT; return FALSE; } @@ -676,12 +681,11 @@ static VOID APPINFO_Destroy(object_header_t *hdr) TRACE("%p\n",lpwai); - HeapFree(GetProcessHeap(), 0, lpwai->lpszAgent); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxy); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyBypass); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyUsername); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyPassword); - HeapFree(GetProcessHeap(), 0, lpwai); + HeapFree(GetProcessHeap(), 0, lpwai->agent); + HeapFree(GetProcessHeap(), 0, lpwai->proxy); + HeapFree(GetProcessHeap(), 0, lpwai->proxyBypass); + HeapFree(GetProcessHeap(), 0, lpwai->proxyUsername); + HeapFree(GetProcessHeap(), 0, lpwai->proxyPassword); } static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) @@ -707,14 +711,14 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe bufsize = *size; if (unicode) { - DWORD len = ai->lpszAgent ? strlenW(ai->lpszAgent) : 0; + DWORD len = ai->agent ? strlenW(ai->agent) : 0; *size = (len + 1) * sizeof(WCHAR); if(!buffer || bufsize < *size) return ERROR_INSUFFICIENT_BUFFER; - if (ai->lpszAgent) - strcpyW(buffer, ai->lpszAgent); + if (ai->agent) + strcpyW(buffer, ai->agent); else *(WCHAR *)buffer = 0; /* If the buffer is copied, the returned length doesn't include @@ -722,15 +726,15 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe */ *size = len * sizeof(WCHAR); }else { - if (ai->lpszAgent) - *size = WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, NULL, 0, NULL, NULL); + if (ai->agent) + *size = WideCharToMultiByte(CP_ACP, 0, ai->agent, -1, NULL, 0, NULL, NULL); else *size = 1; if(!buffer || bufsize < *size) return ERROR_INSUFFICIENT_BUFFER; - if (ai->lpszAgent) - WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, buffer, *size, NULL, NULL); + if (ai->agent) + WideCharToMultiByte(CP_ACP, 0, ai->agent, -1, buffer, *size, NULL, NULL); else *(char *)buffer = 0; /* If the buffer is copied, the returned length doesn't include @@ -748,10 +752,10 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; LPWSTR proxy, proxy_bypass; - if (ai->lpszProxy) - proxyBytesRequired = (lstrlenW(ai->lpszProxy) + 1) * sizeof(WCHAR); - if (ai->lpszProxyBypass) - proxyBypassBytesRequired = (lstrlenW(ai->lpszProxyBypass) + 1) * sizeof(WCHAR); + if (ai->proxy) + proxyBytesRequired = (lstrlenW(ai->proxy) + 1) * sizeof(WCHAR); + if (ai->proxyBypass) + proxyBypassBytesRequired = (lstrlenW(ai->proxyBypass) + 1) * sizeof(WCHAR); if (*size < sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired + proxyBypassBytesRequired) { *size = sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired + proxyBypassBytesRequired; @@ -760,16 +764,16 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe proxy = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW)); proxy_bypass = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired); - pi->dwAccessType = ai->dwAccessType; + pi->dwAccessType = ai->accessType; pi->lpszProxy = NULL; pi->lpszProxyBypass = NULL; - if (ai->lpszProxy) { - lstrcpyW(proxy, ai->lpszProxy); + if (ai->proxy) { + lstrcpyW(proxy, ai->proxy); pi->lpszProxy = proxy; } - if (ai->lpszProxyBypass) { - lstrcpyW(proxy_bypass, ai->lpszProxyBypass); + if (ai->proxyBypass) { + lstrcpyW(proxy_bypass, ai->proxyBypass); pi->lpszProxyBypass = proxy_bypass; } @@ -780,10 +784,10 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; LPSTR proxy, proxy_bypass; - if (ai->lpszProxy) - proxyBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->lpszProxy, -1, NULL, 0, NULL, NULL); - if (ai->lpszProxyBypass) - proxyBypassBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->lpszProxyBypass, -1, + if (ai->proxy) + proxyBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->proxy, -1, NULL, 0, NULL, NULL); + if (ai->proxyBypass) + proxyBypassBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->proxyBypass, -1, NULL, 0, NULL, NULL); if (*size < sizeof(INTERNET_PROXY_INFOA) + proxyBytesRequired + proxyBypassBytesRequired) { @@ -793,16 +797,16 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe proxy = (LPSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOA)); proxy_bypass = (LPSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOA) + proxyBytesRequired); - pi->dwAccessType = ai->dwAccessType; + pi->dwAccessType = ai->accessType; pi->lpszProxy = NULL; pi->lpszProxyBypass = NULL; - if (ai->lpszProxy) { - WideCharToMultiByte(CP_ACP, 0, ai->lpszProxy, -1, proxy, proxyBytesRequired, NULL, NULL); + if (ai->proxy) { + WideCharToMultiByte(CP_ACP, 0, ai->proxy, -1, proxy, proxyBytesRequired, NULL, NULL); pi->lpszProxy = proxy; } - if (ai->lpszProxyBypass) { - WideCharToMultiByte(CP_ACP, 0, ai->lpszProxyBypass, -1, proxy_bypass, + if (ai->proxyBypass) { + WideCharToMultiByte(CP_ACP, 0, ai->proxyBypass, -1, proxy_bypass, proxyBypassBytesRequired, NULL, NULL); pi->lpszProxyBypass = proxy_bypass; } @@ -842,7 +846,6 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags) { appinfo_t *lpwai = NULL; - HINTERNET handle = NULL; if (TRACE_ON(wininet)) { #define FE(x) { x, #x } @@ -872,43 +875,28 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, /* Clear any error information */ INTERNET_SetLastError(0); - lpwai = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(appinfo_t)); - if (NULL == lpwai) - { - INTERNET_SetLastError(ERROR_OUTOFMEMORY); - goto lend; + lpwai = alloc_object(NULL, &APPINFOVtbl, sizeof(appinfo_t)); + if (!lpwai) { + SetLastError(ERROR_OUTOFMEMORY); + return NULL; } lpwai->hdr.htype = WH_HINIT; - lpwai->hdr.vtbl = &APPINFOVtbl; lpwai->hdr.dwFlags = dwFlags; - lpwai->hdr.refs = 1; - lpwai->dwAccessType = dwAccessType; - lpwai->lpszProxyUsername = NULL; - lpwai->lpszProxyPassword = NULL; + lpwai->accessType = dwAccessType; + lpwai->proxyUsername = NULL; + lpwai->proxyPassword = NULL; - handle = WININET_AllocHandle( &lpwai->hdr ); - if( !handle ) - { - HeapFree( GetProcessHeap(), 0, lpwai ); - INTERNET_SetLastError(ERROR_OUTOFMEMORY); - goto lend; - } - - lpwai->lpszAgent = heap_strdupW(lpszAgent); + lpwai->agent = heap_strdupW(lpszAgent); if(dwAccessType == INTERNET_OPEN_TYPE_PRECONFIG) INTERNET_ConfigureProxy( lpwai ); else - lpwai->lpszProxy = heap_strdupW(lpszProxy); - lpwai->lpszProxyBypass = heap_strdupW(lpszProxyBypass); - -lend: - if( lpwai ) - WININET_Release( &lpwai->hdr ); + lpwai->proxy = heap_strdupW(lpszProxy); + lpwai->proxyBypass = heap_strdupW(lpszProxyBypass); TRACE("returning %p\n", lpwai); - return handle; + return lpwai->hdr.hInternet; } @@ -1097,7 +1085,7 @@ BOOL WINAPI InternetGetConnectedStateExA(LPDWORD lpdwStatus, LPSTR lpszConnectio TRACE("(%p, %p, %d, 0x%08x)\n", lpdwStatus, lpszConnectionName, dwNameLen, dwReserved); if (lpszConnectionName && dwNameLen > 0) - lpwszConnectionName= HeapAlloc(GetProcessHeap(), 0, dwNameLen * sizeof(WCHAR)); + lpwszConnectionName = heap_alloc(dwNameLen * sizeof(WCHAR)); rc = InternetGetConnectedStateExW(lpdwStatus,lpwszConnectionName, dwNameLen, dwReserved); @@ -1142,7 +1130,7 @@ HINTERNET WINAPI InternetConnectW(HINTERNET hInternet, return NULL; } - hIC = (appinfo_t*)WININET_GetObject( hInternet ); + hIC = (appinfo_t*)get_handle_object( hInternet ); if ( (hIC == NULL) || (hIC->hdr.htype != WH_HINIT) ) { res = ERROR_INVALID_HANDLE; @@ -1249,7 +1237,7 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData) TRACE("\n"); - hdr = WININET_GetObject(hFind); + hdr = get_handle_object(hFind); if(!hdr) { WARN("Invalid handle\n"); SetLastError(ERROR_INVALID_HANDLE); @@ -1282,19 +1270,18 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData) */ BOOL WINAPI InternetCloseHandle(HINTERNET hInternet) { - object_header_t *lpwh; + object_header_t *obj; - TRACE("%p\n",hInternet); + TRACE("%p\n", hInternet); - lpwh = WININET_GetObject( hInternet ); - if (NULL == lpwh) - { - INTERNET_SetLastError(ERROR_INVALID_HANDLE); + obj = get_handle_object( hInternet ); + if (!obj) { + SetLastError(ERROR_INVALID_HANDLE); return FALSE; } - WININET_Release( lpwh ); - WININET_FreeHandle( hInternet ); + invalidate_handle(obj); + WININET_Release(obj); return TRUE; } @@ -1370,7 +1357,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, InternetCrackUrlW should not include it */ if (dwUrlLength == -1) nLength--; - lpwszUrl = HeapAlloc(GetProcessHeap(), 0, (nLength + 1) * sizeof(WCHAR)); + lpwszUrl = heap_alloc((nLength + 1) * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP,0,lpszUrl,dwUrlLength,lpwszUrl,nLength + 1); lpwszUrl[nLength] = '\0'; @@ -1381,7 +1368,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, UCW.dwHostNameLength = lpUrlComponents->dwHostNameLength; if (lpUrlComponents->lpszHostName) { - hostname = HeapAlloc(GetProcessHeap(), 0, UCW.dwHostNameLength * sizeof(WCHAR)); + hostname = heap_alloc(UCW.dwHostNameLength * sizeof(WCHAR)); UCW.lpszHostName = hostname; } } @@ -1390,7 +1377,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, UCW.dwUserNameLength = lpUrlComponents->dwUserNameLength; if (lpUrlComponents->lpszUserName) { - username = HeapAlloc(GetProcessHeap(), 0, UCW.dwUserNameLength * sizeof(WCHAR)); + username = heap_alloc(UCW.dwUserNameLength * sizeof(WCHAR)); UCW.lpszUserName = username; } } @@ -1399,7 +1386,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, UCW.dwPasswordLength = lpUrlComponents->dwPasswordLength; if (lpUrlComponents->lpszPassword) { - password = HeapAlloc(GetProcessHeap(), 0, UCW.dwPasswordLength * sizeof(WCHAR)); + password = heap_alloc(UCW.dwPasswordLength * sizeof(WCHAR)); UCW.lpszPassword = password; } } @@ -1408,7 +1395,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, UCW.dwUrlPathLength = lpUrlComponents->dwUrlPathLength; if (lpUrlComponents->lpszUrlPath) { - path = HeapAlloc(GetProcessHeap(), 0, UCW.dwUrlPathLength * sizeof(WCHAR)); + path = heap_alloc(UCW.dwUrlPathLength * sizeof(WCHAR)); UCW.lpszUrlPath = path; } } @@ -1417,7 +1404,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, UCW.dwSchemeLength = lpUrlComponents->dwSchemeLength; if (lpUrlComponents->lpszScheme) { - scheme = HeapAlloc(GetProcessHeap(), 0, UCW.dwSchemeLength * sizeof(WCHAR)); + scheme = heap_alloc(UCW.dwSchemeLength * sizeof(WCHAR)); UCW.lpszScheme = scheme; } } @@ -1426,7 +1413,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, UCW.dwExtraInfoLength = lpUrlComponents->dwExtraInfoLength; if (lpUrlComponents->lpszExtraInfo) { - extra = HeapAlloc(GetProcessHeap(), 0, UCW.dwExtraInfoLength * sizeof(WCHAR)); + extra = heap_alloc(UCW.dwExtraInfoLength * sizeof(WCHAR)); UCW.lpszExtraInfo = extra; } } @@ -1585,14 +1572,14 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR WCHAR *url_tmp; DWORD len = dwUrlLength + 1; - if (!(url_tmp = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + if (!(url_tmp = heap_alloc(len * sizeof(WCHAR)))) { INTERNET_SetLastError(ERROR_OUTOFMEMORY); return FALSE; } memcpy(url_tmp, lpszUrl_orig, dwUrlLength * sizeof(WCHAR)); url_tmp[dwUrlLength] = 0; - if (!(lpszUrl_decode = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + if (!(lpszUrl_decode = heap_alloc(len * sizeof(WCHAR)))) { HeapFree(GetProcessHeap(), 0, url_tmp); INTERNET_SetLastError(ERROR_OUTOFMEMORY); @@ -2023,7 +2010,7 @@ INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallbackA( TRACE("%p\n", hInternet); - if (!(lpwh = WININET_GetObject(hInternet))) + if (!(lpwh = get_handle_object(hInternet))) return INTERNET_INVALID_STATUS_CALLBACK; retVal = set_status_callback(lpwh, lpfnIntCB, FALSE); @@ -2051,7 +2038,7 @@ INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallbackW( TRACE("%p\n", hInternet); - if (!(lpwh = WININET_GetObject(hInternet))) + if (!(lpwh = get_handle_object(hInternet))) return INTERNET_INVALID_STATUS_CALLBACK; retVal = set_status_callback(lpwh, lpfnIntCB, TRUE); @@ -2088,7 +2075,7 @@ BOOL WINAPI InternetWriteFile(HINTERNET hFile, LPCVOID lpBuffer, TRACE("(%p %p %d %p)\n", hFile, lpBuffer, dwNumOfBytesToWrite, lpdwNumOfBytesWritten); - lpwh = WININET_GetObject( hFile ); + lpwh = get_handle_object( hFile ); if (!lpwh) { WARN("Invalid handle\n"); SetLastError(ERROR_INVALID_HANDLE); @@ -2128,7 +2115,7 @@ BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, TRACE("%p %p %d %p\n", hFile, lpBuffer, dwNumOfBytesToRead, pdwNumOfBytesRead); - hdr = WININET_GetObject(hFile); + hdr = get_handle_object(hFile); if (!hdr) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); return FALSE; @@ -2182,7 +2169,7 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu TRACE("(%p %p 0x%x 0x%lx)\n", hFile, lpBuffersOut, dwFlags, dwContext); - hdr = WININET_GetObject(hFile); + hdr = get_handle_object(hFile); if (!hdr) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); return FALSE; @@ -2214,7 +2201,7 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer, TRACE("(%p %p 0x%x 0x%lx)\n", hFile, lpBuffer, dwFlags, dwContext); - hdr = WININET_GetObject(hFile); + hdr = get_handle_object(hFile); if (!hdr) { INTERNET_SetLastError(ERROR_INVALID_HANDLE); return FALSE; @@ -2305,7 +2292,7 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD * if (*size < sizeof(ULONG)) return ERROR_INSUFFICIENT_BUFFER; - *(ULONG*)size = 4; + *(ULONG*)buffer = 4; *size = sizeof(ULONG); return ERROR_SUCCESS; @@ -2347,27 +2334,27 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD * } for (i = 0; i < con->dwOptionCount; i++) { - INTERNET_PER_CONN_OPTIONW *option = con->pOptions + i; + INTERNET_PER_CONN_OPTIONW *optionW = con->pOptions + i; INTERNET_PER_CONN_OPTIONA *optionA = conA->pOptions + i; - switch (option->dwOption) { + switch (optionW->dwOption) { case INTERNET_PER_CONN_FLAGS: if(pi.dwProxyEnabled) - option->Value.dwValue = PROXY_TYPE_PROXY; + optionW->Value.dwValue = PROXY_TYPE_PROXY; else - option->Value.dwValue = PROXY_TYPE_DIRECT; + optionW->Value.dwValue = PROXY_TYPE_DIRECT; break; case INTERNET_PER_CONN_PROXY_SERVER: if (unicode) - option->Value.pszValue = heap_strdupW(pi.lpszProxyServer); + optionW->Value.pszValue = heap_strdupW(pi.lpszProxyServer); else optionA->Value.pszValue = heap_strdupWtoA(pi.lpszProxyServer); break; case INTERNET_PER_CONN_PROXY_BYPASS: if (unicode) - option->Value.pszValue = heap_strdupW(pi.lpszProxyBypass); + optionW->Value.pszValue = heap_strdupW(pi.lpszProxyBypass); else optionA->Value.pszValue = heap_strdupWtoA(pi.lpszProxyBypass); break; @@ -2378,12 +2365,12 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD * case INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS: case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME: case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL: - FIXME("Unhandled dwOption %d\n", option->dwOption); - memset(&option->Value, 0, sizeof(option->Value)); + FIXME("Unhandled dwOption %d\n", optionW->dwOption); + memset(&optionW->Value, 0, sizeof(optionW->Value)); break; default: - FIXME("Unknown dwOption %d\n", option->dwOption); + FIXME("Unknown dwOption %d\n", optionW->dwOption); res = ERROR_INVALID_PARAMETER; break; } @@ -2440,7 +2427,7 @@ BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption, TRACE("%p %d %p %p\n", hInternet, dwOption, lpBuffer, lpdwBufferLength); if(hInternet) { - hdr = WININET_GetObject(hInternet); + hdr = get_handle_object(hInternet); if (hdr) { res = hdr->vtbl->QueryOption(hdr, dwOption, lpBuffer, lpdwBufferLength, TRUE); WININET_Release(hdr); @@ -2473,7 +2460,7 @@ BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption, TRACE("%p %d %p %p\n", hInternet, dwOption, lpBuffer, lpdwBufferLength); if(hInternet) { - hdr = WININET_GetObject(hInternet); + hdr = get_handle_object(hInternet); if (hdr) { res = hdr->vtbl->QueryOption(hdr, dwOption, lpBuffer, lpdwBufferLength, FALSE); WININET_Release(hdr); @@ -2506,7 +2493,7 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, TRACE("(%p %d %p %d)\n", hInternet, dwOption, lpBuffer, dwBufferLength); - lpwhh = (object_header_t*) WININET_GetObject( hInternet ); + lpwhh = (object_header_t*) get_handle_object( hInternet ); if(lpwhh && lpwhh->vtbl->SetOption) { DWORD res; @@ -2607,9 +2594,10 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, break; case INTERNET_OPTION_SEND_TIMEOUT: case INTERNET_OPTION_RECEIVE_TIMEOUT: + case INTERNET_OPTION_DATA_SEND_TIMEOUT: { ULONG timeout = *(ULONG *)lpBuffer; - FIXME("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT %d\n", timeout); + FIXME("INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT %d\n", timeout); break; } case INTERNET_OPTION_CONNECT_RETRIES: @@ -2764,7 +2752,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, { object_header_t *lpwh; - if (!(lpwh = WININET_GetObject(hInternet))) + if (!(lpwh = get_handle_object(hInternet))) { INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); return FALSE; @@ -2783,7 +2771,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, proxlen = MultiByteToWideChar( CP_ACP, 0, pi->lpszProxy, -1, NULL, 0); prbylen= MultiByteToWideChar( CP_ACP, 0, pi->lpszProxyBypass, -1, NULL, 0); wlen = sizeof(*piw) + proxlen + prbylen; - wbuffer = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(WCHAR) ); + wbuffer = heap_alloc(wlen*sizeof(WCHAR) ); piw = (LPINTERNET_PROXY_INFOW) wbuffer; piw->dwAccessType = pi->dwAccessType; prox = (LPWSTR) &piw[1]; @@ -2799,7 +2787,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, case INTERNET_OPTION_PASSWORD: wlen = MultiByteToWideChar( CP_ACP, 0, lpBuffer, dwBufferLength, NULL, 0 ); - wbuffer = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(WCHAR) ); + wbuffer = heap_alloc(wlen*sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, lpBuffer, dwBufferLength, wbuffer, wlen ); break; @@ -2808,21 +2796,21 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, INTERNET_PER_CONN_OPTION_LISTW *listW; INTERNET_PER_CONN_OPTION_LISTA *listA = lpBuffer; wlen = sizeof(INTERNET_PER_CONN_OPTION_LISTW); - wbuffer = HeapAlloc( GetProcessHeap(), 0, wlen ); + wbuffer = heap_alloc(wlen); listW = wbuffer; listW->dwSize = sizeof(INTERNET_PER_CONN_OPTION_LISTW); if (listA->pszConnection) { wlen = MultiByteToWideChar( CP_ACP, 0, listA->pszConnection, -1, NULL, 0 ); - listW->pszConnection = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(WCHAR) ); + listW->pszConnection = heap_alloc(wlen*sizeof(WCHAR)); MultiByteToWideChar( CP_ACP, 0, listA->pszConnection, -1, listW->pszConnection, wlen ); } else listW->pszConnection = NULL; listW->dwOptionCount = listA->dwOptionCount; listW->dwOptionError = listA->dwOptionError; - listW->pOptions = HeapAlloc( GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW) * listA->dwOptionCount ); + listW->pOptions = heap_alloc(sizeof(INTERNET_PER_CONN_OPTIONW) * listA->dwOptionCount); for (i = 0; i < listA->dwOptionCount; ++i) { INTERNET_PER_CONN_OPTIONA *optA = listA->pOptions + i; @@ -2839,7 +2827,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, if (optA->Value.pszValue) { wlen = MultiByteToWideChar( CP_ACP, 0, optA->Value.pszValue, -1, NULL, 0 ); - optW->Value.pszValue = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(WCHAR) ); + optW->Value.pszValue = heap_alloc(wlen*sizeof(WCHAR)); MultiByteToWideChar( CP_ACP, 0, optA->Value.pszValue, -1, optW->Value.pszValue, wlen ); } else @@ -2852,6 +2840,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, break; case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME: optW->Value.ftValue = optA->Value.ftValue; + break; default: WARN("Unknown PER_CONN dwOption: %d, guessing at conversion to Wide\n", optA->dwOption); optW->Value.dwValue = optA->Value.dwValue; @@ -3173,7 +3162,7 @@ BOOL WINAPI InternetCheckConnectionW( LPCWSTR lpszUrl, DWORD dwFlags, DWORD dwRe * Build our ping command */ len = WideCharToMultiByte(CP_UNIXCP, 0, hostW, -1, NULL, 0, NULL, NULL); - command = HeapAlloc( GetProcessHeap(), 0, strlen(ping)+len+strlen(redirect) ); + command = heap_alloc(strlen(ping)+len+strlen(redirect)); strcpy(command,ping); WideCharToMultiByte(CP_UNIXCP, 0, hostW, -1, command+strlen(ping), len, NULL, NULL); strcat(command,redirect); @@ -3301,7 +3290,7 @@ static HINTERNET INTERNET_InternetOpenUrlW(appinfo_t *hIC, LPCWSTR lpszUrl, WCHAR *path_extra; DWORD len = urlComponents.dwUrlPathLength + urlComponents.dwExtraInfoLength + 1; - if (!(path_extra = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + if (!(path_extra = heap_alloc(len * sizeof(WCHAR)))) { InternetCloseHandle(client); break; @@ -3379,7 +3368,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl, goto lend; } - hIC = (appinfo_t*)WININET_GetObject( hInternet ); + hIC = (appinfo_t*)get_handle_object( hInternet ); if (NULL == hIC || hIC->hdr.htype != WH_HINIT) { SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); goto lend; @@ -3441,7 +3430,7 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl, if(lpszHeaders) { lenHeaders = MultiByteToWideChar(CP_ACP, 0, lpszHeaders, dwHeadersLength, NULL, 0 ); - szHeaders = HeapAlloc(GetProcessHeap(), 0, lenHeaders*sizeof(WCHAR)); + szHeaders = heap_alloc(lenHeaders*sizeof(WCHAR)); if(!szHeaders) { HeapFree(GetProcessHeap(), 0, szUrl); return NULL; @@ -3461,7 +3450,7 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl, static LPWITHREADERROR INTERNET_AllocThreadError(void) { - LPWITHREADERROR lpwite = HeapAlloc(GetProcessHeap(), 0, sizeof(*lpwite)); + LPWITHREADERROR lpwite = heap_alloc(sizeof(*lpwite)); if (lpwite) { @@ -3563,7 +3552,7 @@ DWORD INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest) TRACE("\n"); - lpNewRequest = HeapAlloc(GetProcessHeap(), 0, sizeof(WORKREQUEST)); + lpNewRequest = heap_alloc(sizeof(WORKREQUEST)); if (!lpNewRequest) return ERROR_OUTOFMEMORY; @@ -3682,7 +3671,7 @@ BOOL WINAPI InternetQueryDataAvailable( HINTERNET hFile, TRACE("(%p %p %x %lx)\n", hFile, lpdwNumberOfBytesAvailble, dwFlags, dwContext); - hdr = WININET_GetObject( hFile ); + hdr = get_handle_object( hFile ); if (!hdr) { SetLastError(ERROR_INVALID_HANDLE); return FALSE; @@ -3960,7 +3949,7 @@ static void convert_urlcomp_atow(LPURL_COMPONENTSA lpUrlComponents, LPURL_COMPON if (lpUrlComponents->lpszScheme) { len = URL_GET_COMP_LENGTHA(lpUrlComponents, Scheme) + 1; - urlCompW->lpszScheme = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + urlCompW->lpszScheme = heap_alloc(len * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, lpUrlComponents->lpszScheme, -1, urlCompW->lpszScheme, len); } @@ -3968,7 +3957,7 @@ static void convert_urlcomp_atow(LPURL_COMPONENTSA lpUrlComponents, LPURL_COMPON if (lpUrlComponents->lpszHostName) { len = URL_GET_COMP_LENGTHA(lpUrlComponents, HostName) + 1; - urlCompW->lpszHostName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + urlCompW->lpszHostName = heap_alloc(len * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, lpUrlComponents->lpszHostName, -1, urlCompW->lpszHostName, len); } @@ -3976,7 +3965,7 @@ static void convert_urlcomp_atow(LPURL_COMPONENTSA lpUrlComponents, LPURL_COMPON if (lpUrlComponents->lpszUserName) { len = URL_GET_COMP_LENGTHA(lpUrlComponents, UserName) + 1; - urlCompW->lpszUserName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + urlCompW->lpszUserName = heap_alloc(len * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, lpUrlComponents->lpszUserName, -1, urlCompW->lpszUserName, len); } @@ -3984,7 +3973,7 @@ static void convert_urlcomp_atow(LPURL_COMPONENTSA lpUrlComponents, LPURL_COMPON if (lpUrlComponents->lpszPassword) { len = URL_GET_COMP_LENGTHA(lpUrlComponents, Password) + 1; - urlCompW->lpszPassword = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + urlCompW->lpszPassword = heap_alloc(len * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, lpUrlComponents->lpszPassword, -1, urlCompW->lpszPassword, len); } @@ -3992,7 +3981,7 @@ static void convert_urlcomp_atow(LPURL_COMPONENTSA lpUrlComponents, LPURL_COMPON if (lpUrlComponents->lpszUrlPath) { len = URL_GET_COMP_LENGTHA(lpUrlComponents, UrlPath) + 1; - urlCompW->lpszUrlPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + urlCompW->lpszUrlPath = heap_alloc(len * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, lpUrlComponents->lpszUrlPath, -1, urlCompW->lpszUrlPath, len); } @@ -4000,7 +3989,7 @@ static void convert_urlcomp_atow(LPURL_COMPONENTSA lpUrlComponents, LPURL_COMPON if (lpUrlComponents->lpszExtraInfo) { len = URL_GET_COMP_LENGTHA(lpUrlComponents, ExtraInfo) + 1; - urlCompW->lpszExtraInfo = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + urlCompW->lpszExtraInfo = heap_alloc(len * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, lpUrlComponents->lpszExtraInfo, -1, urlCompW->lpszExtraInfo, len); } @@ -4029,7 +4018,7 @@ BOOL WINAPI InternetCreateUrlA(LPURL_COMPONENTSA lpUrlComponents, DWORD dwFlags, convert_urlcomp_atow(lpUrlComponents, &urlCompW); if (lpszUrl) - urlW = HeapAlloc(GetProcessHeap(), 0, *lpdwUrlLength * sizeof(WCHAR)); + urlW = heap_alloc(*lpdwUrlLength * sizeof(WCHAR)); ret = InternetCreateUrlW(&urlCompW, dwFlags, urlW, lpdwUrlLength); @@ -4083,7 +4072,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags, INTERNET_SCHEME nScheme; static const WCHAR slashSlashW[] = {'/','/'}; - static const WCHAR percentD[] = {'%','d',0}; + static const WCHAR fmtW[] = {'%','u',0}; TRACE("(%p,%d,%p,%p)\n", lpUrlComponents, dwFlags, lpszUrl, lpdwUrlLength); @@ -4170,7 +4159,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags, { WCHAR szPort[MAX_WORD_DIGITS+1]; - sprintfW(szPort, percentD, lpUrlComponents->nPort); + sprintfW(szPort, fmtW, lpUrlComponents->nPort); *lpszUrl = ':'; lpszUrl++; dwLen = strlenW(szPort); diff --git a/dll/win32/wininet/internet.h b/dll/win32/wininet/internet.h index 1b9aff25547..86626742b01 100644 --- a/dll/win32/wininet/internet.h +++ b/dll/win32/wininet/internet.h @@ -47,14 +47,68 @@ #define ioctlsocket ioctl #endif /* __MINGW32__ */ +extern HMODULE WININET_hModule DECLSPEC_HIDDEN; + +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN 46 +#endif + +typedef struct { + WCHAR *name; + INTERNET_PORT port; + struct sockaddr_storage addr; + socklen_t addr_len; + char addr_str[INET6_ADDRSTRLEN]; + + LONG ref; + DWORD64 keep_until; + + struct list entry; + struct list conn_pool; +} server_t; + +void server_addref(server_t*) DECLSPEC_HIDDEN; +void server_release(server_t*) DECLSPEC_HIDDEN; +BOOL collect_connections(BOOL) DECLSPEC_HIDDEN; + /* used for netconnection.c stuff */ typedef struct { BOOL useSSL; int socketFD; void *ssl_s; + server_t *server; DWORD security_flags; -} WININET_NETCONNECTION; + + BOOL keep_alive; + DWORD64 keep_until; + struct list pool_entry; +} netconn_t; + +static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len) +{ + return HeapAlloc(GetProcessHeap(), 0, len); +} + +static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); +} + +static inline void * __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t len) +{ + return HeapReAlloc(GetProcessHeap(), 0, mem, len); +} + +static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len) +{ + return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len); +} + +static inline BOOL heap_free(void *mem) +{ + return HeapFree(GetProcessHeap(), 0, mem); +} static inline LPWSTR heap_strdupW(LPCWSTR str) { @@ -64,7 +118,7 @@ static inline LPWSTR heap_strdupW(LPCWSTR str) DWORD size; size = (strlenW(str)+1)*sizeof(WCHAR); - ret = HeapAlloc(GetProcessHeap(), 0, size); + ret = heap_alloc(size); if(ret) memcpy(ret, str, size); } @@ -84,7 +138,7 @@ static inline LPWSTR heap_strndupW(LPCWSTR str, UINT max_len) if(str[len] == '\0') break; - ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(len+1)); + ret = heap_alloc(sizeof(WCHAR)*(len+1)); if(ret) { memcpy(ret, str, sizeof(WCHAR)*len); ret[len] = '\0'; @@ -101,7 +155,7 @@ static inline WCHAR *heap_strdupAtoW(const char *str) DWORD len; len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + ret = heap_alloc(len*sizeof(WCHAR)); if(ret) MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); } @@ -115,7 +169,7 @@ static inline char *heap_strdupWtoA(LPCWSTR str) if(str) { DWORD size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL); - ret = HeapAlloc(GetProcessHeap(), 0, size); + ret = heap_alloc(size); if(ret) WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL); } @@ -177,6 +231,7 @@ struct _object_header_t WH_TYPE htype; const object_vtbl_t *vtbl; HINTERNET hInternet; + BOOL valid_handle; DWORD dwFlags; DWORD_PTR dwContext; DWORD dwError; @@ -192,27 +247,24 @@ struct _object_header_t typedef struct { object_header_t hdr; - LPWSTR lpszAgent; - LPWSTR lpszProxy; - LPWSTR lpszProxyBypass; - LPWSTR lpszProxyUsername; - LPWSTR lpszProxyPassword; - DWORD dwAccessType; + LPWSTR agent; + LPWSTR proxy; + LPWSTR proxyBypass; + LPWSTR proxyUsername; + LPWSTR proxyPassword; + DWORD accessType; } appinfo_t; - typedef struct { object_header_t hdr; - appinfo_t *lpAppInfo; - LPWSTR lpszHostName; /* the final destination of the request */ - LPWSTR lpszServerName; /* the name of the server we directly connect to */ - LPWSTR lpszUserName; - LPWSTR lpszPassword; - INTERNET_PORT nHostPort; /* the final destination port of the request */ - INTERNET_PORT nServerPort; /* the port of the server we directly connect to */ - struct sockaddr_storage socketAddress; - socklen_t sa_len; + appinfo_t *appInfo; + LPWSTR hostName; /* the final destination of the request */ + LPWSTR serverName; /* the name of the server we directly connect to */ + LPWSTR userName; + LPWSTR password; + INTERNET_PORT hostPort; /* the final destination port of the request */ + INTERNET_PORT serverPort; /* the port of the server we directly connect to */ } http_session_t; #define HDR_ISREQUEST 0x0001 @@ -230,37 +282,53 @@ typedef struct struct HttpAuthInfo; -typedef struct gzip_stream_t gzip_stream_t; +typedef struct data_stream_vtbl_t data_stream_vtbl_t; + +typedef struct { + const data_stream_vtbl_t *vtbl; +} data_stream_t; + +typedef struct { + data_stream_t data_stream; + DWORD content_length; + DWORD content_read; +} netconn_stream_t; + +#define READ_BUFFER_SIZE 8192 typedef struct { object_header_t hdr; - http_session_t *lpHttpSession; - LPWSTR lpszPath; - LPWSTR lpszVerb; - LPWSTR lpszRawHeaders; - WININET_NETCONNECTION netConnection; - LPWSTR lpszVersion; - LPWSTR lpszStatusText; - DWORD dwBytesToWrite; - DWORD dwBytesWritten; - HTTPHEADERW *pCustHeaders; + http_session_t *session; + LPWSTR path; + LPWSTR verb; + LPWSTR rawHeaders; + netconn_t *netconn; + DWORD security_flags; + LPWSTR version; + LPWSTR statusText; + DWORD bytesToWrite; + DWORD bytesWritten; + HTTPHEADERW *custHeaders; DWORD nCustHeaders; + FILETIME last_modified; HANDLE hCacheFile; - LPWSTR lpszCacheFile; - struct HttpAuthInfo *pAuthInfo; - struct HttpAuthInfo *pProxyAuthInfo; + LPWSTR cacheFile; + FILETIME expires; + struct HttpAuthInfo *authInfo; + struct HttpAuthInfo *proxyAuthInfo; CRITICAL_SECTION read_section; /* section to protect the following fields */ - DWORD dwContentLength; /* total number of bytes to be read */ - DWORD dwContentRead; /* bytes of the content read so far */ + DWORD contentLength; /* total number of bytes to be read */ BOOL read_chunked; /* are we reading in chunked mode? */ + BOOL read_gzip; /* are we reading in gzip mode? */ DWORD read_pos; /* current read position in read_buf */ DWORD read_size; /* valid data size in read_buf */ - BYTE read_buf[4096]; /* buffer for already read but not returned data */ + BYTE read_buf[READ_BUFFER_SIZE]; /* buffer for already read but not returned data */ BOOL decoding; - gzip_stream_t *gzip_stream; + data_stream_t *data_stream; + netconn_stream_t netconn_stream; } http_request_t; @@ -407,65 +475,63 @@ typedef struct WORKREQ } WORKREQUEST, *LPWORKREQUEST; -HINTERNET WININET_AllocHandle( object_header_t *info ); -object_header_t *WININET_GetObject( HINTERNET hinternet ); -object_header_t *WININET_AddRef( object_header_t *info ); -BOOL WININET_Release( object_header_t *info ); -BOOL WININET_FreeHandle( HINTERNET hinternet ); +void *alloc_object(object_header_t*,const object_vtbl_t*,size_t) DECLSPEC_HIDDEN; +object_header_t *get_handle_object( HINTERNET hinternet ) DECLSPEC_HIDDEN; +object_header_t *WININET_AddRef( object_header_t *info ) DECLSPEC_HIDDEN; +BOOL WININET_Release( object_header_t *info ) DECLSPEC_HIDDEN; -DWORD INET_QueryOption( object_header_t *, DWORD, void *, DWORD *, BOOL ); +DWORD INET_QueryOption( object_header_t *, DWORD, void *, DWORD *, BOOL ) DECLSPEC_HIDDEN; -time_t ConvertTimeString(LPCWSTR asctime); +time_t ConvertTimeString(LPCWSTR asctime) DECLSPEC_HIDDEN; HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, - DWORD dwInternalFlags); + DWORD dwInternalFlags) DECLSPEC_HIDDEN; DWORD HTTP_Connect(appinfo_t*,LPCWSTR, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, - DWORD dwInternalFlags, HINTERNET*); + DWORD dwInternalFlags, HINTERNET*) DECLSPEC_HIDDEN; BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort, - struct sockaddr *psa, socklen_t *sa_len); + struct sockaddr *psa, socklen_t *sa_len) DECLSPEC_HIDDEN; -void INTERNET_SetLastError(DWORD dwError); -DWORD INTERNET_GetLastError(void); -DWORD INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest); -LPSTR INTERNET_GetResponseBuffer(void); -LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen); +BOOL get_cookie(const WCHAR*,const WCHAR*,WCHAR*,DWORD*) DECLSPEC_HIDDEN; +BOOL set_cookie(const WCHAR*,const WCHAR*,const WCHAR*,const WCHAR*) DECLSPEC_HIDDEN; + +void INTERNET_SetLastError(DWORD dwError) DECLSPEC_HIDDEN; +DWORD INTERNET_GetLastError(void) DECLSPEC_HIDDEN; +DWORD INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest) DECLSPEC_HIDDEN; +LPSTR INTERNET_GetResponseBuffer(void) DECLSPEC_HIDDEN; +LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen) DECLSPEC_HIDDEN; VOID SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInfo, - DWORD dwStatusInfoLength); + DWORD dwStatusInfoLength) DECLSPEC_HIDDEN; VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInfo, - DWORD dwStatusInfoLength); -BOOL INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto, WCHAR *foundProxy, DWORD *foundProxyLen); + DWORD dwStatusInfoLength) DECLSPEC_HIDDEN; +BOOL INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto, WCHAR *foundProxy, DWORD *foundProxyLen) DECLSPEC_HIDDEN; -BOOL NETCON_connected(WININET_NETCONNECTION *connection); -DWORD NETCON_init(WININET_NETCONNECTION *connnection, BOOL useSSL); -void NETCON_unload(void); -DWORD NETCON_create(WININET_NETCONNECTION *connection, int domain, - int type, int protocol); -DWORD NETCON_close(WININET_NETCONNECTION *connection); -DWORD NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr, - unsigned int addrlen); -DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPWSTR hostname); -DWORD NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, int flags, - int *sent /* out */); -DWORD NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags, - int *recvd /* out */); -BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available); -LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection); -int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection); -DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value); +DWORD create_netconn(BOOL,server_t*,DWORD,netconn_t**) DECLSPEC_HIDDEN; +void free_netconn(netconn_t*) DECLSPEC_HIDDEN; +void NETCON_unload(void) DECLSPEC_HIDDEN; +DWORD NETCON_secure_connect(netconn_t *connection, LPWSTR hostname) DECLSPEC_HIDDEN; +DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags, + int *sent /* out */) DECLSPEC_HIDDEN; +DWORD NETCON_recv(netconn_t *connection, void *buf, size_t len, int flags, + int *recvd /* out */) DECLSPEC_HIDDEN; +BOOL NETCON_query_data_available(netconn_t *connection, DWORD *available) DECLSPEC_HIDDEN; +BOOL NETCON_is_alive(netconn_t*) DECLSPEC_HIDDEN; +LPCVOID NETCON_GetCert(netconn_t *connection) DECLSPEC_HIDDEN; +int NETCON_GetCipherStrength(netconn_t*) DECLSPEC_HIDDEN; +DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, int value) DECLSPEC_HIDDEN; #define sock_get_error(x) WSAGetLastError() -extern void URLCacheContainers_CreateDefaults(void); -extern void URLCacheContainers_DeleteAll(void); +extern void URLCacheContainers_CreateDefaults(void) DECLSPEC_HIDDEN; +extern void URLCacheContainers_DeleteAll(void) DECLSPEC_HIDDEN; #define MAX_REPLY_LEN 0x5B4 diff --git a/dll/win32/wininet/netconnection.c b/dll/win32/wininet/netconnection.c index 402cfd16a53..deca551283f 100644 --- a/dll/win32/wininet/netconnection.c +++ b/dll/win32/wininet/netconnection.c @@ -58,6 +58,9 @@ #ifdef HAVE_NETINET_IN_H # include #endif +#ifdef HAVE_NETINET_TCP_H +# include +#endif #ifdef HAVE_OPENSSL_SSL_H # include # include @@ -70,6 +73,7 @@ #include #include #include +#include #include "wine/library.h" #include "windef.h" @@ -101,16 +105,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet); #include -static CRITICAL_SECTION init_ssl_cs; -static CRITICAL_SECTION_DEBUG init_ssl_cs_debug = -{ - 0, 0, &init_ssl_cs, - { &init_ssl_cs_debug.ProcessLocksList, - &init_ssl_cs_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": init_ssl_cs") } -}; -static CRITICAL_SECTION init_ssl_cs = { &init_ssl_cs_debug, -1, 0, 0, 0, 0 }; - static void *OpenSSL_ssl_handle; static void *OpenSSL_crypto_handle; @@ -162,6 +156,7 @@ MAKE_FUNCPTR(ERR_free_strings); MAKE_FUNCPTR(ERR_get_error); MAKE_FUNCPTR(ERR_error_string); MAKE_FUNCPTR(X509_STORE_CTX_get_ex_data); +MAKE_FUNCPTR(X509_STORE_CTX_get_chain); MAKE_FUNCPTR(i2d_X509); MAKE_FUNCPTR(sk_num); MAKE_FUNCPTR(sk_value); @@ -200,7 +195,7 @@ static PCCERT_CONTEXT X509_to_cert_context(X509 *cert) */ if (!p) { - buffer = HeapAlloc(GetProcessHeap(),0,len); + buffer = heap_alloc(len); p = buffer; len = pi2d_X509(cert,&p); } @@ -248,7 +243,8 @@ static DWORD netconn_verify_cert(PCCERT_CONTEXT cert, HCERTSTORE store, CERT_TRUST_IS_REVOKED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE; - if (chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_TIME_VALID) + if (chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_TIME_VALID && + !(security_flags & SECURITY_FLAG_IGNORE_CERT_DATE_INVALID)) err = ERROR_INTERNET_SEC_CERT_DATE_INVALID; else if (chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_UNTRUSTED_ROOT && @@ -316,7 +312,7 @@ static int netconn_secure_verify(int preverify_ok, X509_STORE_CTX *ctx) BOOL ret = FALSE; HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); - WININET_NETCONNECTION *conn; + netconn_t *conn; ssl = pX509_STORE_CTX_get_ex_data(ctx, pSSL_get_ex_data_X509_STORE_CTX_idx()); @@ -327,13 +323,14 @@ static int netconn_secure_verify(int preverify_ok, X509_STORE_CTX *ctx) X509 *cert; int i; PCCERT_CONTEXT endCert = NULL; + struct stack_st *chain = (struct stack_st *)pX509_STORE_CTX_get_chain( ctx ); ret = TRUE; - for (i = 0; ret && i < psk_num((struct stack_st *)ctx->chain); i++) + for (i = 0; ret && i < psk_num(chain); i++) { PCCERT_CONTEXT context; - cert = (X509 *)psk_value((struct stack_st *)ctx->chain, i); + cert = (X509 *)psk_value(chain, i); if ((context = X509_to_cert_context(cert))) { if (i == 0) @@ -365,157 +362,206 @@ static int netconn_secure_verify(int preverify_ok, X509_STORE_CTX *ctx) #endif -DWORD NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL) +static CRITICAL_SECTION init_ssl_cs; +static CRITICAL_SECTION_DEBUG init_ssl_cs_debug = +{ + 0, 0, &init_ssl_cs, + { &init_ssl_cs_debug.ProcessLocksList, + &init_ssl_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": init_ssl_cs") } +}; +static CRITICAL_SECTION init_ssl_cs = { &init_ssl_cs_debug, -1, 0, 0, 0, 0 }; + +static DWORD init_openssl(void) { - connection->useSSL = FALSE; - connection->socketFD = -1; - if (useSSL) - { #if defined(SONAME_LIBSSL) && defined(SONAME_LIBCRYPTO) - int i; + int i; - TRACE("using SSL connection\n"); - EnterCriticalSection(&init_ssl_cs); - if (OpenSSL_ssl_handle) /* already initialized everything */ - { - LeaveCriticalSection(&init_ssl_cs); - return ERROR_SUCCESS; - } - OpenSSL_ssl_handle = wine_dlopen(SONAME_LIBSSL, RTLD_NOW, NULL, 0); - if (!OpenSSL_ssl_handle) - { - ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n", - SONAME_LIBSSL); - LeaveCriticalSection(&init_ssl_cs); - return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; - } - OpenSSL_crypto_handle = wine_dlopen(SONAME_LIBCRYPTO, RTLD_NOW, NULL, 0); - if (!OpenSSL_crypto_handle) - { - ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n", - SONAME_LIBCRYPTO); - LeaveCriticalSection(&init_ssl_cs); - return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; - } + if(OpenSSL_ssl_handle) + return ERROR_SUCCESS; - /* mmm nice ugly macroness */ + OpenSSL_ssl_handle = wine_dlopen(SONAME_LIBSSL, RTLD_NOW, NULL, 0); + if(!OpenSSL_ssl_handle) { + ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n", SONAME_LIBSSL); + return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; + } + + OpenSSL_crypto_handle = wine_dlopen(SONAME_LIBCRYPTO, RTLD_NOW, NULL, 0); + if(!OpenSSL_crypto_handle) { + ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n", SONAME_LIBCRYPTO); + return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; + } + + /* mmm nice ugly macroness */ #define DYNSSL(x) \ p##x = wine_dlsym(OpenSSL_ssl_handle, #x, NULL, 0); \ - if (!p##x) \ - { \ + if (!p##x) { \ ERR("failed to load symbol %s\n", #x); \ - LeaveCriticalSection(&init_ssl_cs); \ return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; \ } - DYNSSL(SSL_library_init); - DYNSSL(SSL_load_error_strings); - DYNSSL(SSLv23_method); - DYNSSL(SSL_CTX_free); - DYNSSL(SSL_CTX_new); - DYNSSL(SSL_new); - DYNSSL(SSL_free); - DYNSSL(SSL_set_fd); - DYNSSL(SSL_connect); - DYNSSL(SSL_shutdown); - DYNSSL(SSL_write); - DYNSSL(SSL_read); - DYNSSL(SSL_pending); - DYNSSL(SSL_get_error); - DYNSSL(SSL_get_ex_new_index); - DYNSSL(SSL_get_ex_data); - DYNSSL(SSL_set_ex_data); - DYNSSL(SSL_get_ex_data_X509_STORE_CTX_idx); - DYNSSL(SSL_get_peer_certificate); - DYNSSL(SSL_CTX_get_timeout); - DYNSSL(SSL_CTX_set_timeout); - DYNSSL(SSL_CTX_set_default_verify_paths); - DYNSSL(SSL_CTX_set_verify); - DYNSSL(SSL_get_current_cipher); - DYNSSL(SSL_CIPHER_get_bits); + DYNSSL(SSL_library_init); + DYNSSL(SSL_load_error_strings); + DYNSSL(SSLv23_method); + DYNSSL(SSL_CTX_free); + DYNSSL(SSL_CTX_new); + DYNSSL(SSL_new); + DYNSSL(SSL_free); + DYNSSL(SSL_set_fd); + DYNSSL(SSL_connect); + DYNSSL(SSL_shutdown); + DYNSSL(SSL_write); + DYNSSL(SSL_read); + DYNSSL(SSL_pending); + DYNSSL(SSL_get_error); + DYNSSL(SSL_get_ex_new_index); + DYNSSL(SSL_get_ex_data); + DYNSSL(SSL_set_ex_data); + DYNSSL(SSL_get_ex_data_X509_STORE_CTX_idx); + DYNSSL(SSL_get_peer_certificate); + DYNSSL(SSL_CTX_get_timeout); + DYNSSL(SSL_CTX_set_timeout); + DYNSSL(SSL_CTX_set_default_verify_paths); + DYNSSL(SSL_CTX_set_verify); + DYNSSL(SSL_get_current_cipher); + DYNSSL(SSL_CIPHER_get_bits); #undef DYNSSL #define DYNCRYPTO(x) \ p##x = wine_dlsym(OpenSSL_crypto_handle, #x, NULL, 0); \ - if (!p##x) \ - { \ + if (!p##x) { \ ERR("failed to load symbol %s\n", #x); \ - LeaveCriticalSection(&init_ssl_cs); \ return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; \ } - DYNCRYPTO(BIO_new_fp); - DYNCRYPTO(CRYPTO_num_locks); - DYNCRYPTO(CRYPTO_set_id_callback); - DYNCRYPTO(CRYPTO_set_locking_callback); - DYNCRYPTO(ERR_free_strings); - DYNCRYPTO(ERR_get_error); - DYNCRYPTO(ERR_error_string); - DYNCRYPTO(X509_STORE_CTX_get_ex_data); - DYNCRYPTO(i2d_X509); - DYNCRYPTO(sk_num); - DYNCRYPTO(sk_value); + + DYNCRYPTO(BIO_new_fp); + DYNCRYPTO(CRYPTO_num_locks); + DYNCRYPTO(CRYPTO_set_id_callback); + DYNCRYPTO(CRYPTO_set_locking_callback); + DYNCRYPTO(ERR_free_strings); + DYNCRYPTO(ERR_get_error); + DYNCRYPTO(ERR_error_string); + DYNCRYPTO(X509_STORE_CTX_get_ex_data); + DYNCRYPTO(X509_STORE_CTX_get_chain); + DYNCRYPTO(i2d_X509); + DYNCRYPTO(sk_num); + DYNCRYPTO(sk_value); #undef DYNCRYPTO - pSSL_library_init(); - pSSL_load_error_strings(); - pBIO_new_fp(stderr, BIO_NOCLOSE); /* FIXME: should use winedebug stuff */ + pSSL_library_init(); + pSSL_load_error_strings(); + pBIO_new_fp(stderr, BIO_NOCLOSE); /* FIXME: should use winedebug stuff */ - meth = pSSLv23_method(); - ctx = pSSL_CTX_new(meth); - if (!pSSL_CTX_set_default_verify_paths(ctx)) - { - ERR("SSL_CTX_set_default_verify_paths failed: %s\n", - pERR_error_string(pERR_get_error(), 0)); - LeaveCriticalSection(&init_ssl_cs); - return ERROR_OUTOFMEMORY; - } - hostname_idx = pSSL_get_ex_new_index(0, (void *)"hostname index", - NULL, NULL, NULL); - if (hostname_idx == -1) - { - ERR("SSL_get_ex_new_index failed; %s\n", - pERR_error_string(pERR_get_error(), 0)); - LeaveCriticalSection(&init_ssl_cs); - return ERROR_OUTOFMEMORY; - } - error_idx = pSSL_get_ex_new_index(0, (void *)"error index", - NULL, NULL, NULL); - if (error_idx == -1) - { - ERR("SSL_get_ex_new_index failed; %s\n", - pERR_error_string(pERR_get_error(), 0)); - LeaveCriticalSection(&init_ssl_cs); - return ERROR_OUTOFMEMORY; - } - conn_idx = pSSL_get_ex_new_index(0, (void *)"netconn index", - NULL, NULL, NULL); - if (conn_idx == -1) - { - ERR("SSL_get_ex_new_index failed; %s\n", - pERR_error_string(pERR_get_error(), 0)); - LeaveCriticalSection(&init_ssl_cs); - return ERROR_OUTOFMEMORY; - } - pSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, netconn_secure_verify); - - pCRYPTO_set_id_callback(ssl_thread_id); - num_ssl_locks = pCRYPTO_num_locks(); - ssl_locks = HeapAlloc(GetProcessHeap(), 0, num_ssl_locks * sizeof(CRITICAL_SECTION)); - if (!ssl_locks) - { - LeaveCriticalSection(&init_ssl_cs); - return ERROR_OUTOFMEMORY; - } - for (i = 0; i < num_ssl_locks; i++) - InitializeCriticalSection(&ssl_locks[i]); - pCRYPTO_set_locking_callback(ssl_lock_callback); - LeaveCriticalSection(&init_ssl_cs); -#else - FIXME("can't use SSL, not compiled in.\n"); - return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; -#endif + meth = pSSLv23_method(); + ctx = pSSL_CTX_new(meth); + if(!pSSL_CTX_set_default_verify_paths(ctx)) { + ERR("SSL_CTX_set_default_verify_paths failed: %s\n", + pERR_error_string(pERR_get_error(), 0)); + return ERROR_OUTOFMEMORY; } + + hostname_idx = pSSL_get_ex_new_index(0, (void *)"hostname index", NULL, NULL, NULL); + if(hostname_idx == -1) { + ERR("SSL_get_ex_new_index failed; %s\n", pERR_error_string(pERR_get_error(), 0)); + return ERROR_OUTOFMEMORY; + } + + error_idx = pSSL_get_ex_new_index(0, (void *)"error index", NULL, NULL, NULL); + if(error_idx == -1) { + ERR("SSL_get_ex_new_index failed; %s\n", pERR_error_string(pERR_get_error(), 0)); + return ERROR_OUTOFMEMORY; + } + + conn_idx = pSSL_get_ex_new_index(0, (void *)"netconn index", NULL, NULL, NULL); + if(conn_idx == -1) { + ERR("SSL_get_ex_new_index failed; %s\n", pERR_error_string(pERR_get_error(), 0)); + return ERROR_OUTOFMEMORY; + } + + pSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, netconn_secure_verify); + + pCRYPTO_set_id_callback(ssl_thread_id); + num_ssl_locks = pCRYPTO_num_locks(); + ssl_locks = HeapAlloc(GetProcessHeap(), 0, num_ssl_locks * sizeof(CRITICAL_SECTION)); + if(!ssl_locks) + return ERROR_OUTOFMEMORY; + + for(i = 0; i < num_ssl_locks; i++) + InitializeCriticalSection(&ssl_locks[i]); + pCRYPTO_set_locking_callback(ssl_lock_callback); + return ERROR_SUCCESS; +#else + FIXME("can't use SSL, not compiled in.\n"); + return ERROR_INTERNET_SECURITY_CHANNEL_ERROR; +#endif +} + +DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, netconn_t **ret) +{ + netconn_t *netconn; + int result, flag; + + if(useSSL) { + DWORD res; + + TRACE("using SSL connection\n"); + + EnterCriticalSection(&init_ssl_cs); + res = init_openssl(); + LeaveCriticalSection(&init_ssl_cs); + if(res != ERROR_SUCCESS) + return res; + } + + netconn = heap_alloc_zero(sizeof(*netconn)); + if(!netconn) + return ERROR_OUTOFMEMORY; + + netconn->useSSL = useSSL; + netconn->socketFD = -1; + netconn->security_flags = security_flags; + list_init(&netconn->pool_entry); + + assert(server->addr_len); + result = netconn->socketFD = socket(server->addr.ss_family, SOCK_STREAM, 0); + if(result != -1) { + result = connect(netconn->socketFD, (struct sockaddr*)&server->addr, server->addr_len); + if(result == -1) + closesocket(netconn->socketFD); + } + if(result == -1) { + heap_free(netconn); + return sock_get_error(errno); + } + +#ifdef TCP_NODELAY + flag = 1; + result = setsockopt(netconn->socketFD, IPPROTO_TCP, TCP_NODELAY, (void*)&flag, sizeof(flag)); + if(result < 0) + WARN("setsockopt(TCP_NODELAY) failed\n"); +#endif + + server_addref(server); + netconn->server = server; + + *ret = netconn; + return ERROR_SUCCESS; +} + +void free_netconn(netconn_t *netconn) +{ + server_release(netconn->server); + +#ifdef SONAME_LIBSSL + if (netconn->ssl_s) { + pSSL_shutdown(netconn->ssl_s); + pSSL_free(netconn->ssl_s); + } +#endif + + closesocket(netconn->socketFD); + heap_free(netconn); } void NETCON_unload(void) @@ -541,14 +587,6 @@ void NETCON_unload(void) #endif } -BOOL NETCON_connected(WININET_NETCONNECTION *connection) -{ - if (connection->socketFD == -1) - return FALSE; - else - return TRUE; -} - #if 0 /* translate a unix error code into a winsock one */ int sock_get_error( int err ) @@ -618,80 +656,32 @@ int sock_get_error( int err ) } #endif -/****************************************************************************** - * NETCON_create - * Basically calls 'socket()' - */ -DWORD NETCON_create(WININET_NETCONNECTION *connection, int domain, - int type, int protocol) -{ -#ifdef SONAME_LIBSSL - if (connection->useSSL) - return ERROR_NOT_SUPPORTED; -#endif - - connection->socketFD = socket(domain, type, protocol); - if (connection->socketFD == -1) - return sock_get_error(errno); - - return ERROR_SUCCESS; -} - -/****************************************************************************** - * NETCON_close - * Basically calls 'close()' unless we should use SSL - */ -DWORD NETCON_close(WININET_NETCONNECTION *connection) -{ - int result; - - if (!NETCON_connected(connection)) return ERROR_SUCCESS; - -#ifdef SONAME_LIBSSL - if (connection->useSSL) - { - pSSL_shutdown(connection->ssl_s); - pSSL_free(connection->ssl_s); - connection->ssl_s = NULL; - - connection->useSSL = FALSE; - } -#endif - - result = closesocket(connection->socketFD); - connection->socketFD = -1; - - if (result == -1) - return sock_get_error(errno); - return ERROR_SUCCESS; -} - /****************************************************************************** * NETCON_secure_connect * Initiates a secure connection over an existing plaintext connection. */ -DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPWSTR hostname) +DWORD NETCON_secure_connect(netconn_t *connection, LPWSTR hostname) { + void *ssl_s; DWORD res = ERROR_NOT_SUPPORTED; #ifdef SONAME_LIBSSL /* can't connect if we are already connected */ - if (connection->useSSL) + if (connection->ssl_s) { ERR("already connected\n"); return ERROR_INTERNET_CANNOT_CONNECT; } - connection->ssl_s = pSSL_new(ctx); - if (!connection->ssl_s) + ssl_s = pSSL_new(ctx); + if (!ssl_s) { ERR("SSL_new failed: %s\n", pERR_error_string(pERR_get_error(), 0)); - res = ERROR_OUTOFMEMORY; - goto fail; + return ERROR_OUTOFMEMORY; } - if (!pSSL_set_fd(connection->ssl_s, connection->socketFD)) + if (!pSSL_set_fd(ssl_s, connection->socketFD)) { ERR("SSL_set_fd failed: %s\n", pERR_error_string(pERR_get_error(), 0)); @@ -699,74 +689,50 @@ DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPWSTR hostname) goto fail; } - if (!pSSL_set_ex_data(connection->ssl_s, hostname_idx, hostname)) + if (!pSSL_set_ex_data(ssl_s, hostname_idx, hostname)) { ERR("SSL_set_ex_data failed: %s\n", pERR_error_string(pERR_get_error(), 0)); res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR; goto fail; } - if (!pSSL_set_ex_data(connection->ssl_s, conn_idx, connection)) + if (!pSSL_set_ex_data(ssl_s, conn_idx, connection)) { ERR("SSL_set_ex_data failed: %s\n", pERR_error_string(pERR_get_error(), 0)); res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR; goto fail; } - if (pSSL_connect(connection->ssl_s) <= 0) + if (pSSL_connect(ssl_s) <= 0) { - res = (DWORD_PTR)pSSL_get_ex_data(connection->ssl_s, error_idx); + res = (DWORD_PTR)pSSL_get_ex_data(ssl_s, error_idx); if (!res) res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR; ERR("SSL_connect failed: %d\n", res); goto fail; } - connection->useSSL = TRUE; + connection->ssl_s = ssl_s; return ERROR_SUCCESS; fail: - if (connection->ssl_s) + if (ssl_s) { - pSSL_shutdown(connection->ssl_s); - pSSL_free(connection->ssl_s); - connection->ssl_s = NULL; + pSSL_shutdown(ssl_s); + pSSL_free(ssl_s); } #endif return res; } -/****************************************************************************** - * NETCON_connect - * Connects to the specified address. - */ -DWORD NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr, - unsigned int addrlen) -{ - int result; - - result = connect(connection->socketFD, serv_addr, addrlen); - if (result == -1) - { - WARN("Unable to connect to host (%s)\n", strerror(errno)); - - closesocket(connection->socketFD); - connection->socketFD = -1; - return sock_get_error(errno); - } - - return ERROR_SUCCESS; -} - /****************************************************************************** * NETCON_send * Basically calls 'send()' unless we should use SSL * number of chars send is put in *sent */ -DWORD NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, int flags, +DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags, int *sent /* out */) { - if (!NETCON_connected(connection)) return ERROR_INTERNET_CONNECTION_ABORTED; if (!connection->useSSL) { *sent = send(connection->socketFD, msg, len, flags); @@ -777,6 +743,10 @@ DWORD NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len else { #ifdef SONAME_LIBSSL + if(!connection->ssl_s) { + FIXME("not connected\n"); + return ERROR_NOT_SUPPORTED; + } if (flags) FIXME("SSL_write doesn't support any flags (%08x)\n", flags); *sent = pSSL_write(connection->ssl_s, msg, len); @@ -794,31 +764,30 @@ DWORD NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len * Basically calls 'recv()' unless we should use SSL * number of chars received is put in *recvd */ -DWORD NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags, +DWORD NETCON_recv(netconn_t *connection, void *buf, size_t len, int flags, int *recvd /* out */) { *recvd = 0; - if (!NETCON_connected(connection)) return ERROR_INTERNET_CONNECTION_ABORTED; if (!len) return ERROR_SUCCESS; if (!connection->useSSL) { *recvd = recv(connection->socketFD, buf, len, flags); - if(!*recvd) - NETCON_close(connection); return *recvd == -1 ? sock_get_error(errno) : ERROR_SUCCESS; } else { #ifdef SONAME_LIBSSL + if(!connection->ssl_s) { + FIXME("not connected\n"); + return ERROR_NOT_SUPPORTED; + } *recvd = pSSL_read(connection->ssl_s, buf, len); /* Check if EOF was received */ if(!*recvd && (pSSL_get_error(connection->ssl_s, *recvd)==SSL_ERROR_ZERO_RETURN - || pSSL_get_error(connection->ssl_s, *recvd)==SSL_ERROR_SYSCALL)) { - NETCON_close(connection); + || pSSL_get_error(connection->ssl_s, *recvd)==SSL_ERROR_SYSCALL)) return ERROR_SUCCESS; - } return *recvd > 0 ? ERROR_SUCCESS : ERROR_INTERNET_CONNECTION_ABORTED; #else @@ -832,11 +801,9 @@ DWORD NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int * Returns the number of bytes of peeked data plus the number of bytes of * queued, but unread data. */ -BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available) +BOOL NETCON_query_data_available(netconn_t *connection, DWORD *available) { *available = 0; - if (!NETCON_connected(connection)) - return FALSE; if (!connection->useSSL) { @@ -853,19 +820,49 @@ BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *avail else { #ifdef SONAME_LIBSSL - *available = pSSL_pending(connection->ssl_s); + *available = connection->ssl_s ? pSSL_pending(connection->ssl_s) : 0; #endif } return TRUE; } -LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection) +BOOL NETCON_is_alive(netconn_t *netconn) +{ +#ifdef MSG_DONTWAIT + ssize_t len; + BYTE b; + + len = recv(netconn->socketFD, &b, 1, MSG_PEEK|MSG_DONTWAIT); + return len == 1 || (len == -1 && errno == EWOULDBLOCK); +#elif defined(__MINGW32__) || defined(_MSC_VER) + ULONG mode; + int len; + char b; + + mode = 1; + if(!ioctlsocket(netconn->socketFD, FIONBIO, &mode)) + return FALSE; + + len = recv(netconn->socketFD, &b, 1, MSG_PEEK); + + mode = 0; + if(!ioctlsocket(netconn->socketFD, FIONBIO, &mode)) + return FALSE; + + return len == 1 || (len == -1 && errno == WSAEWOULDBLOCK); +#else + FIXME("not supported on this platform\n"); + return TRUE; +#endif +} + +LPCVOID NETCON_GetCert(netconn_t *connection) { #ifdef SONAME_LIBSSL X509* cert; LPCVOID r = NULL; - if (!connection->useSSL) + if (!connection->ssl_s) return NULL; cert = pSSL_get_peer_certificate(connection->ssl_s); @@ -876,7 +873,7 @@ LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection) #endif } -int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection) +int NETCON_GetCipherStrength(netconn_t *connection) { #ifdef SONAME_LIBSSL #if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x0090707f) @@ -886,7 +883,7 @@ int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection) #endif int bits = 0; - if (!connection->useSSL) + if (!connection->ssl_s) return 0; cipher = pSSL_get_current_cipher(connection->ssl_s); if (!cipher) @@ -898,16 +895,11 @@ int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection) #endif } -DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value) +DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, int value) { int result; struct timeval tv; - /* FIXME: we should probably store the timeout in the connection to set - * when we do connect */ - if (!NETCON_connected(connection)) - return ERROR_SUCCESS; - /* value is in milliseconds, convert to struct timeval */ tv.tv_sec = value / 1000; tv.tv_usec = (value % 1000) * 1000; diff --git a/dll/win32/wininet/resource.h b/dll/win32/wininet/resource.h index 279c1123db8..256a374af08 100644 --- a/dll/win32/wininet/resource.h +++ b/dll/win32/wininet/resource.h @@ -21,6 +21,7 @@ #include #include +#define IDD_INVCERTDLG 0x398 #define IDD_AUTHDLG 0x399 #define IDD_PROXYDLG 0x400 @@ -30,5 +31,10 @@ #define IDC_PASSWORD 0x404 #define IDC_SAVEPASSWORD 0x405 #define IDC_SERVER 0x406 +#define IDC_CERT_ERROR 0x407 #define IDS_LANCONNECTION 0x500 +#define IDS_CERT_CA_INVALID 0x501 +#define IDS_CERT_DATE_INVALID 0x502 +#define IDS_CERT_CN_INVALID 0x503 +#define IDS_CERT_ERRORS 0x504 diff --git a/dll/win32/wininet/rsrc.rc b/dll/win32/wininet/rsrc.rc index b936ed9e843..24b8f3bb0b2 100644 --- a/dll/win32/wininet/rsrc.rc +++ b/dll/win32/wininet/rsrc.rc @@ -45,14 +45,16 @@ #include "wininet_Da.rc" #include "wininet_En.rc" #include "wininet_Es.rc" +#include "wininet_Eo.rc" #include "wininet_Fi.rc" +#include "wininet_He.rc" #include "wininet_Hu.rc" #include "wininet_It.rc" #include "wininet_Ko.rc" #include "wininet_Nl.rc" #include "wininet_Pl.rc" +#include "wininet_Sr.rc" #include "wininet_Sv.rc" -#include "wininet_Uk.rc" #include "wininet_Tr.rc" /* UTF-8 */ @@ -65,5 +67,6 @@ #include "wininet_Ro.rc" #include "wininet_Ru.rc" #include "wininet_Si.rc" +#include "wininet_Uk.rc" #include "wininet_Zh.rc" diff --git a/dll/win32/wininet/urlcache.c b/dll/win32/wininet/urlcache.c index 63a160d4a29..5d9034804c2 100644 --- a/dll/win32/wininet/urlcache.c +++ b/dll/win32/wininet/urlcache.c @@ -48,10 +48,12 @@ #include "wininet.h" #include "winineti.h" #include "winerror.h" -#include "internet.h" #include "winreg.h" #include "shlwapi.h" #include "shlobj.h" +#include "shellapi.h" + +#include "internet.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -96,8 +98,7 @@ typedef struct _URL_CACHEFILE_ENTRY WORD wExpiredDate; /* expire date in dos format */ WORD wExpiredTime; /* expire time in dos format */ DWORD dwUnknown1; /* usually zero */ - DWORD dwSizeLow; /* see INTERNET_CACHE_ENTRY_INFO::dwSizeLow */ - DWORD dwSizeHigh; /* see INTERNET_CACHE_ENTRY_INFO::dwSizeHigh */ + ULARGE_INTEGER size; /* see INTERNET_CACHE_ENTRY_INFO::dwSizeLow/High */ DWORD dwUnknown2; /* usually zero */ DWORD dwExemptDelta; /* see INTERNET_CACHE_ENTRY_INFO::dwExemptDelta */ DWORD dwUnknown3; /* usually 0x60 */ @@ -142,7 +143,7 @@ typedef struct _HASH_CACHEFILE_ENTRY typedef struct _DIRECTORY_DATA { - DWORD dwUnknown; + DWORD dwNumFiles; char filename[DIR_LENGTH]; } DIRECTORY_DATA; @@ -154,14 +155,10 @@ typedef struct _URLCACHE_HEADER DWORD dwIndexCapacityInBlocks; DWORD dwBlocksInUse; DWORD dwUnknown1; - DWORD dwCacheLimitLow; /* disk space limit for cache */ - DWORD dwCacheLimitHigh; /* disk space limit for cache */ - DWORD dwUnknown4; /* current disk space usage for cache */ - DWORD dwUnknown5; /* current disk space usage for cache */ - DWORD dwUnknown6; /* possibly a flag? */ - DWORD dwUnknown7; - BYTE DirectoryCount; /* number of directory_data's */ - BYTE Unknown8[3]; /* just padding? */ + ULARGE_INTEGER CacheLimit; + ULARGE_INTEGER CacheUsage; + ULARGE_INTEGER ExemptUsage; + DWORD DirectoryCount; /* number of directory_data's */ DIRECTORY_DATA directory_data[1]; /* first directory entry */ } URLCACHE_HEADER, *LPURLCACHE_HEADER; typedef const URLCACHE_HEADER *LPCURLCACHE_HEADER; @@ -227,8 +224,12 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) static const WCHAR wszIndex[] = {'i','n','d','e','x','.','d','a','t',0}; static const WCHAR wszMappingFormat[] = {'%','s','%','s','_','%','l','u',0}; - if (pContainer->hMapping) + WaitForSingleObject(pContainer->hMutex, INFINITE); + + if (pContainer->hMapping) { + ReleaseMutex(pContainer->hMutex); return ERROR_SUCCESS; + } strcpyW(wszFilePath, pContainer->path); strcatW(wszFilePath, wszIndex); @@ -243,14 +244,10 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) if (hFile == INVALID_HANDLE_VALUE) { TRACE("Could not open or create cache index file \"%s\"\n", debugstr_w(wszFilePath)); + ReleaseMutex(pContainer->hMutex); return GetLastError(); } - /* At this stage we need the mutex because we may be about to create the - * file. - */ - WaitForSingleObject(pContainer->hMutex, INFINITE); - dwFileSize = GetFileSize(hFile, NULL); if (dwFileSize == INVALID_FILE_SIZE) { @@ -313,8 +310,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) pHeader->dwFileSize = dwFileSize; pHeader->dwIndexCapacityInBlocks = NEWFILE_NUM_BLOCKS; /* 127MB - taken from default for Windows 2000 */ - pHeader->dwCacheLimitHigh = 0; - pHeader->dwCacheLimitLow = 0x07ff5400; + pHeader->CacheLimit.QuadPart = 0x07ff5400; /* Copied from a Windows 2000 cache index */ pHeader->DirectoryCount = 4; @@ -329,8 +325,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) (BYTE *) &dw, &len) == ERROR_SUCCESS && keytype == REG_DWORD) { - pHeader->dwCacheLimitHigh = (dw >> 22); - pHeader->dwCacheLimitLow = dw << 10; + pHeader->CacheLimit.QuadPart = (ULONGLONG)dw * 1024; } RegCloseKey(key); } @@ -347,12 +342,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) for (i = 0; !dwError && i < pHeader->DirectoryCount; ++i) { - /* The following values were copied from a Windows index. - * I don't know what the values are supposed to mean but - * have made them the same in the hope that this will - * be better for compatibility - */ - pHeader->directory_data[i].dwUnknown = (i > 1) ? 0xfe : 0xff; + pHeader->directory_data[i].dwNumFiles = 0; for (j = 0;; ++j) { int k; @@ -430,8 +420,6 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) } - ReleaseMutex(pContainer->hMutex); - wsprintfW(wszFilePath, wszMappingFormat, pContainer->path, wszIndex, dwFileSize); URLCache_PathToObjectName(wszFilePath, '_'); pContainer->hMapping = OpenFileMappingW(FILE_MAP_WRITE, FALSE, wszFilePath); @@ -441,9 +429,12 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) if (!pContainer->hMapping) { ERR("Couldn't create file mapping (error is %d)\n", GetLastError()); + ReleaseMutex(pContainer->hMutex); return GetLastError(); } + ReleaseMutex(pContainer->hMutex); + return ERROR_SUCCESS; } @@ -464,7 +455,7 @@ static void URLCacheContainer_CloseIndex(URLCACHECONTAINER * pContainer) static BOOL URLCacheContainers_AddContainer(LPCWSTR cache_prefix, LPCWSTR path, LPWSTR mutex_name) { - URLCACHECONTAINER * pContainer = HeapAlloc(GetProcessHeap(), 0, sizeof(URLCACHECONTAINER)); + URLCACHECONTAINER * pContainer = heap_alloc(sizeof(URLCACHECONTAINER)); int cache_prefix_len = strlenW(cache_prefix); if (!pContainer) @@ -482,7 +473,7 @@ static BOOL URLCacheContainers_AddContainer(LPCWSTR cache_prefix, LPCWSTR path, return FALSE; } - pContainer->cache_prefix = HeapAlloc(GetProcessHeap(), 0, (cache_prefix_len + 1) * sizeof(WCHAR)); + pContainer->cache_prefix = heap_alloc((cache_prefix_len + 1) * sizeof(WCHAR)); if (!pContainer->cache_prefix) { HeapFree(GetProcessHeap(), 0, pContainer->path); @@ -884,7 +875,7 @@ static BOOL URLCache_LocalFileNameToPathW( } nRequired = (path_len + DIR_LENGTH + file_name_len + 1) * sizeof(WCHAR); - if (nRequired < *lpBufferSize) + if (nRequired <= *lpBufferSize) { int dir_len; @@ -946,6 +937,18 @@ static BOOL URLCache_LocalFileNameToPathA( return FALSE; } +/* Just like DosDateTimeToFileTime, except that it also maps the special + * case of a DOS date/time of (0,0) to a filetime of (0,0). + */ +static void URLCache_DosDateTimeToFileTime(WORD fatdate, WORD fattime, + FILETIME *ft) +{ + if (!fatdate && !fattime) + ft->dwLowDateTime = ft->dwHighDateTime = 0; + else + DosDateTimeToFileTime(fatdate, fattime, ft); +} + /*********************************************************************** * URLCache_CopyEntry (Internal) * @@ -977,16 +980,16 @@ static DWORD URLCache_CopyEntry( lpCacheEntryInfo->u.dwExemptDelta = pUrlEntry->dwExemptDelta; lpCacheEntryInfo->dwHeaderInfoSize = pUrlEntry->dwHeaderInfoSize; lpCacheEntryInfo->dwHitRate = pUrlEntry->dwHitRate; - lpCacheEntryInfo->dwSizeHigh = pUrlEntry->dwSizeHigh; - lpCacheEntryInfo->dwSizeLow = pUrlEntry->dwSizeLow; + lpCacheEntryInfo->dwSizeHigh = pUrlEntry->size.u.HighPart; + lpCacheEntryInfo->dwSizeLow = pUrlEntry->size.u.LowPart; lpCacheEntryInfo->dwStructSize = sizeof(*lpCacheEntryInfo); lpCacheEntryInfo->dwUseCount = pUrlEntry->dwUseCount; - DosDateTimeToFileTime(pUrlEntry->wExpiredDate, pUrlEntry->wExpiredTime, &lpCacheEntryInfo->ExpireTime); + URLCache_DosDateTimeToFileTime(pUrlEntry->wExpiredDate, pUrlEntry->wExpiredTime, &lpCacheEntryInfo->ExpireTime); lpCacheEntryInfo->LastAccessTime.dwHighDateTime = pUrlEntry->LastAccessTime.dwHighDateTime; lpCacheEntryInfo->LastAccessTime.dwLowDateTime = pUrlEntry->LastAccessTime.dwLowDateTime; lpCacheEntryInfo->LastModifiedTime.dwHighDateTime = pUrlEntry->LastModifiedTime.dwHighDateTime; lpCacheEntryInfo->LastModifiedTime.dwLowDateTime = pUrlEntry->LastModifiedTime.dwLowDateTime; - DosDateTimeToFileTime(pUrlEntry->wLastSyncDate, pUrlEntry->wLastSyncTime, &lpCacheEntryInfo->LastSyncTime); + URLCache_DosDateTimeToFileTime(pUrlEntry->wLastSyncDate, pUrlEntry->wLastSyncTime, &lpCacheEntryInfo->LastSyncTime); } if ((dwRequiredSize % 4) && (dwRequiredSize < *lpdwBufferSize)) @@ -1076,6 +1079,17 @@ static DWORD URLCache_CopyEntry( return ERROR_SUCCESS; } +/* Just like FileTimeToDosDateTime, except that it also maps the special + * case of a filetime of (0,0) to a DOS date/time of (0,0). + */ +static void URLCache_FileTimeToDosDateTime(const FILETIME *ft, WORD *fatdate, + WORD *fattime) +{ + if (!ft->dwLowDateTime && !ft->dwHighDateTime) + *fatdate = *fattime = 0; + else + FileTimeToDosDateTime(ft, fatdate, fattime); +} /*********************************************************************** * URLCache_SetEntryInfo (Internal) @@ -1097,7 +1111,7 @@ static DWORD URLCache_SetEntryInfo(URL_CACHEFILE_ENTRY * pUrlEntry, const INTERN if (dwFieldControl & CACHE_ENTRY_EXEMPT_DELTA_FC) pUrlEntry->dwExemptDelta = lpCacheEntryInfo->u.dwExemptDelta; if (dwFieldControl & CACHE_ENTRY_EXPTIME_FC) - FIXME("CACHE_ENTRY_EXPTIME_FC unimplemented\n"); + URLCache_FileTimeToDosDateTime(&lpCacheEntryInfo->ExpireTime, &pUrlEntry->wExpiredDate, &pUrlEntry->wExpiredTime); if (dwFieldControl & CACHE_ENTRY_HEADERINFO_FC) FIXME("CACHE_ENTRY_HEADERINFO_FC unimplemented\n"); if (dwFieldControl & CACHE_ENTRY_HITRATE_FC) @@ -1105,7 +1119,7 @@ static DWORD URLCache_SetEntryInfo(URL_CACHEFILE_ENTRY * pUrlEntry, const INTERN if (dwFieldControl & CACHE_ENTRY_MODTIME_FC) pUrlEntry->LastModifiedTime = lpCacheEntryInfo->LastModifiedTime; if (dwFieldControl & CACHE_ENTRY_SYNCTIME_FC) - FileTimeToDosDateTime(&lpCacheEntryInfo->LastAccessTime, &pUrlEntry->wLastSyncDate, &pUrlEntry->wLastSyncTime); + URLCache_FileTimeToDosDateTime(&lpCacheEntryInfo->LastAccessTime, &pUrlEntry->wLastSyncDate, &pUrlEntry->wLastSyncTime); return ERROR_SUCCESS; } @@ -1456,25 +1470,102 @@ static BOOL URLCache_EnumHashTableEntries(LPCURLCACHE_HEADER pHeader, const HASH } /*********************************************************************** - * FreeUrlCacheSpaceA (WININET.@) + * URLCache_DeleteCacheDirectory (Internal) + * + * Erase a directory containing an URL cache. + * + * RETURNS + * TRUE success, FALSE failure/aborted. * */ -BOOL WINAPI FreeUrlCacheSpaceA(LPCSTR lpszCachePath, DWORD dwSize, DWORD dwFilter) +static BOOL URLCache_DeleteCacheDirectory(LPCWSTR lpszPath) { - FIXME("stub!\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + DWORD path_len; + WCHAR path[MAX_PATH + 1]; + SHFILEOPSTRUCTW shfos; + int ret; + + path_len = strlenW(lpszPath); + if (path_len >= MAX_PATH) + return FALSE; + strcpyW(path, lpszPath); + path[path_len + 1] = 0; /* double-NUL-terminate path */ + + shfos.hwnd = NULL; + shfos.wFunc = FO_DELETE; + shfos.pFrom = path; + shfos.pTo = NULL; + shfos.fFlags = 0; + shfos.fAnyOperationsAborted = FALSE; + ret = SHFileOperationW(&shfos); + if (ret) + ERR("SHFileOperationW on %s returned %i\n", debugstr_w(path), ret); + return !(ret || shfos.fAnyOperationsAborted); +} + +/*********************************************************************** + * FreeUrlCacheSpaceW (WININET.@) + * + * Frees up some cache. + * + * PARAMETERS + * lpszCachePath [I] Which volume to free up from, or NULL if you don't care. + * dwSize [I] How much space to free up. + * dwSizeType [I] How to interpret dwSize. + * + * RETURNS + * TRUE success. FALSE failure. + * + * IMPLEMENTATION + * This implementation just retrieves the path of the cache directory, and + * deletes its contents from the filesystem. The correct approach would + * probably be to implement and use {FindFirst,FindNext,Delete}UrlCacheGroup(). + */ +BOOL WINAPI FreeUrlCacheSpaceW(LPCWSTR lpszCachePath, DWORD dwSize, DWORD dwSizeType) +{ + URLCACHECONTAINER * pContainer; + + if (lpszCachePath != NULL || dwSize != 100 || dwSizeType != FCS_PERCENT_CACHE_SPACE) + { + FIXME("(%s, %x, %x): partial stub!\n", debugstr_w(lpszCachePath), dwSize, dwSizeType); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; + } + + LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry) + { + /* The URL cache has prefix L"" (unlike Cookies and History) */ + if (pContainer->cache_prefix[0] == 0) + { + BOOL ret_del; + DWORD ret_open; + WaitForSingleObject(pContainer->hMutex, INFINITE); + + /* unlock, delete, recreate and lock cache */ + URLCacheContainer_CloseIndex(pContainer); + ret_del = URLCache_DeleteCacheDirectory(pContainer->path); + ret_open = URLCacheContainer_OpenIndex(pContainer); + + ReleaseMutex(pContainer->hMutex); + return ret_del && (ret_open == ERROR_SUCCESS); + } + } return FALSE; } - /*********************************************************************** - * FreeUrlCacheSpaceW (WININET.@) +/*********************************************************************** + * FreeUrlCacheSpaceA (WININET.@) * + * See FreeUrlCacheSpaceW. */ -BOOL WINAPI FreeUrlCacheSpaceW(LPCWSTR lpszCachePath, DWORD dwSize, DWORD dwFilter) +BOOL WINAPI FreeUrlCacheSpaceA(LPCSTR lpszCachePath, DWORD dwSize, DWORD dwSizeType) { - FIXME("stub!\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + BOOL ret = FALSE; + LPWSTR path = heap_strdupAtoW(lpszCachePath); + if (lpszCachePath == NULL || path != NULL) + ret = FreeUrlCacheSpaceW(path, dwSize, dwSizeType); + heap_free(path); + return ret; } /*********************************************************************** @@ -1913,10 +2004,6 @@ BOOL WINAPI RetrieveUrlCacheEntryFileA( TRACE("Found URL: %s\n", (LPSTR)pUrlEntry + pUrlEntry->dwOffsetUrl); TRACE("Header info: %s\n", (LPBYTE)pUrlEntry + pUrlEntry->dwOffsetHeaderInfo); - pUrlEntry->dwHitRate++; - pUrlEntry->dwUseCount++; - URLCache_HashEntrySetUse(pHashEntry, pUrlEntry->dwUseCount); - error = URLCache_CopyEntry(pContainer, pHeader, lpCacheEntryInfo, lpdwCacheEntryInfoBufferSize, pUrlEntry, FALSE); @@ -1928,6 +2015,11 @@ BOOL WINAPI RetrieveUrlCacheEntryFileA( } TRACE("Local File Name: %s\n", debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName)); + pUrlEntry->dwHitRate++; + pUrlEntry->dwUseCount++; + URLCache_HashEntrySetUse(pHashEntry, pUrlEntry->dwUseCount); + GetSystemTimeAsFileTime(&pUrlEntry->LastAccessTime); + URLCacheContainer_UnlockIndex(pContainer, pHeader); return TRUE; @@ -2009,10 +2101,6 @@ BOOL WINAPI RetrieveUrlCacheEntryFileW( TRACE("Found URL: %s\n", (LPSTR)pUrlEntry + pUrlEntry->dwOffsetUrl); TRACE("Header info: %s\n", (LPBYTE)pUrlEntry + pUrlEntry->dwOffsetHeaderInfo); - pUrlEntry->dwHitRate++; - pUrlEntry->dwUseCount++; - URLCache_HashEntrySetUse(pHashEntry, pUrlEntry->dwUseCount); - error = URLCache_CopyEntry( pContainer, pHeader, @@ -2028,11 +2116,57 @@ BOOL WINAPI RetrieveUrlCacheEntryFileW( } TRACE("Local File Name: %s\n", debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName)); + pUrlEntry->dwHitRate++; + pUrlEntry->dwUseCount++; + URLCache_HashEntrySetUse(pHashEntry, pUrlEntry->dwUseCount); + GetSystemTimeAsFileTime(&pUrlEntry->LastAccessTime); + URLCacheContainer_UnlockIndex(pContainer, pHeader); return TRUE; } +static BOOL DeleteUrlCacheEntryInternal(LPURLCACHE_HEADER pHeader, + struct _HASH_ENTRY *pHashEntry) +{ + CACHEFILE_ENTRY * pEntry; + URL_CACHEFILE_ENTRY * pUrlEntry; + + pEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry); + if (pEntry->dwSignature != URL_SIGNATURE) + { + FIXME("Trying to delete entry of unknown format %s\n", + debugstr_an((LPCSTR)&pEntry->dwSignature, sizeof(DWORD))); + SetLastError(ERROR_FILE_NOT_FOUND); + return FALSE; + } + pUrlEntry = (URL_CACHEFILE_ENTRY *)pEntry; + if (pUrlEntry->CacheDir < pHeader->DirectoryCount) + { + if (pHeader->directory_data[pUrlEntry->CacheDir].dwNumFiles) + pHeader->directory_data[pUrlEntry->CacheDir].dwNumFiles--; + } + if (pUrlEntry->CacheEntryType & STICKY_CACHE_ENTRY) + { + if (pUrlEntry->size.QuadPart < pHeader->ExemptUsage.QuadPart) + pHeader->ExemptUsage.QuadPart -= pUrlEntry->size.QuadPart; + else + pHeader->ExemptUsage.QuadPart = 0; + } + else + { + if (pUrlEntry->size.QuadPart < pHeader->CacheUsage.QuadPart) + pHeader->CacheUsage.QuadPart -= pUrlEntry->size.QuadPart; + else + pHeader->CacheUsage.QuadPart = 0; + } + + URLCache_DeleteEntry(pHeader, pEntry); + + URLCache_DeleteEntryFromHash(pHashEntry); + return TRUE; +} + /*********************************************************************** * UnlockUrlCacheEntryFileA (WININET.@) * @@ -2450,8 +2584,7 @@ static BOOL CommitUrlCacheEntryInternal( DWORD dwOffsetLocalFileName = 0; DWORD dwOffsetHeader = 0; DWORD dwOffsetFileExtension = 0; - DWORD dwFileSizeLow = 0; - DWORD dwFileSizeHigh = 0; + LARGE_INTEGER file_size; BYTE cDirectory = 0; char achFile[MAX_PATH]; LPSTR lpszUrlNameA = NULL; @@ -2468,9 +2601,15 @@ static BOOL CommitUrlCacheEntryInternal( debugstr_w(lpszFileExtension), debugstr_w(lpszOriginalUrl)); + if (CacheEntryType & STICKY_CACHE_ENTRY && !lpszLocalFileName) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } if (lpszOriginalUrl) WARN(": lpszOriginalUrl ignored\n"); - + + file_size.QuadPart = 0; if (lpszLocalFileName) { HANDLE hFile; @@ -2483,8 +2622,7 @@ static BOOL CommitUrlCacheEntryInternal( } /* Get file size */ - dwFileSizeLow = GetFileSize(hFile, &dwFileSizeHigh); - if ((dwFileSizeLow == INVALID_FILE_SIZE) && (GetLastError() != NO_ERROR)) + if (!GetFileSizeEx(hFile, &file_size)) { ERR("couldn't get file size (error is %d)\n", GetLastError()); CloseHandle(hFile); @@ -2607,20 +2745,24 @@ static BOOL CommitUrlCacheEntryInternal( pUrlEntry->CacheDir = cDirectory; pUrlEntry->CacheEntryType = CacheEntryType; pUrlEntry->dwHeaderInfoSize = dwHeaderSize; - pUrlEntry->dwExemptDelta = 0; + if (CacheEntryType & STICKY_CACHE_ENTRY) + { + /* Sticky entries have a default exempt time of one day */ + pUrlEntry->dwExemptDelta = 86400; + } + else + pUrlEntry->dwExemptDelta = 0; pUrlEntry->dwHitRate = 0; pUrlEntry->dwOffsetFileExtension = dwOffsetFileExtension; pUrlEntry->dwOffsetHeaderInfo = dwOffsetHeader; pUrlEntry->dwOffsetLocalName = dwOffsetLocalFileName; pUrlEntry->dwOffsetUrl = DWORD_ALIGN(sizeof(*pUrlEntry)); - pUrlEntry->dwSizeHigh = 0; - pUrlEntry->dwSizeLow = dwFileSizeLow; - pUrlEntry->dwSizeHigh = dwFileSizeHigh; + pUrlEntry->size.QuadPart = file_size.QuadPart; pUrlEntry->dwUseCount = 0; GetSystemTimeAsFileTime(&pUrlEntry->LastAccessTime); pUrlEntry->LastModifiedTime = LastModifiedTime; - FileTimeToDosDateTime(&pUrlEntry->LastAccessTime, &pUrlEntry->wLastSyncDate, &pUrlEntry->wLastSyncTime); - FileTimeToDosDateTime(&ExpireTime, &pUrlEntry->wExpiredDate, &pUrlEntry->wExpiredTime); + URLCache_FileTimeToDosDateTime(&pUrlEntry->LastAccessTime, &pUrlEntry->wLastSyncDate, &pUrlEntry->wLastSyncTime); + URLCache_FileTimeToDosDateTime(&ExpireTime, &pUrlEntry->wExpiredDate, &pUrlEntry->wExpiredTime); pUrlEntry->wUnknownDate = pUrlEntry->wLastSyncDate; pUrlEntry->wUnknownTime = pUrlEntry->wLastSyncTime; @@ -2646,6 +2788,18 @@ static BOOL CommitUrlCacheEntryInternal( (DWORD)((LPBYTE)pUrlEntry - (LPBYTE)pHeader)); if (error != ERROR_SUCCESS) URLCache_DeleteEntry(pHeader, &pUrlEntry->CacheFileEntry); + else + { + if (pUrlEntry->CacheDir < pHeader->DirectoryCount) + pHeader->directory_data[pUrlEntry->CacheDir].dwNumFiles++; + if (CacheEntryType & STICKY_CACHE_ENTRY) + pHeader->ExemptUsage.QuadPart += file_size.QuadPart; + else + pHeader->CacheUsage.QuadPart += file_size.QuadPart; + if (pHeader->CacheUsage.QuadPart + pHeader->ExemptUsage.QuadPart > + pHeader->CacheLimit.QuadPart) + FIXME("file of size %s bytes fills cache\n", wine_dbgstr_longlong(file_size.QuadPart)); + } cleanup: URLCacheContainer_UnlockIndex(pContainer, pHeader); @@ -2855,7 +3009,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA( return FALSE; /* allocate handle storage space */ - pStream = HeapAlloc(GetProcessHeap(), 0, sizeof(STREAM_HANDLE) + strlen(lpszUrlName) * sizeof(CHAR)); + pStream = heap_alloc(sizeof(STREAM_HANDLE) + strlen(lpszUrlName) * sizeof(CHAR)); if (!pStream) { CloseHandle(hFile); @@ -2880,9 +3034,53 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamW( IN DWORD dwReserved ) { - FIXME( "(%s, %p, %p, %x, 0x%08x)\n", debugstr_w(lpszUrlName), lpCacheEntryInfo, + DWORD size; + int url_len; + /* NOTE: this is not the same as the way that the native + * version allocates 'stream' handles. I did it this way + * as it is much easier and no applications should depend + * on this behaviour. (Native version appears to allocate + * indices into a table) + */ + STREAM_HANDLE * pStream; + HANDLE hFile; + + TRACE( "(%s, %p, %p, %x, 0x%08x)\n", debugstr_w(lpszUrlName), lpCacheEntryInfo, lpdwCacheEntryInfoBufferSize, fRandomRead, dwReserved ); - return NULL; + + if (!RetrieveUrlCacheEntryFileW(lpszUrlName, + lpCacheEntryInfo, + lpdwCacheEntryInfoBufferSize, + dwReserved)) + { + return NULL; + } + + hFile = CreateFileW(lpCacheEntryInfo->lpszLocalFileName, + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + fRandomRead ? FILE_FLAG_RANDOM_ACCESS : 0, + NULL); + if (hFile == INVALID_HANDLE_VALUE) + return FALSE; + + /* allocate handle storage space */ + size = sizeof(STREAM_HANDLE); + url_len = WideCharToMultiByte(CP_ACP, 0, lpszUrlName, -1, NULL, 0, NULL, NULL); + size += url_len; + pStream = heap_alloc(size); + if (!pStream) + { + CloseHandle(hFile); + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + + pStream->hFile = hFile; + WideCharToMultiByte(CP_ACP, 0, lpszUrlName, -1, pStream->lpszUrl, url_len, NULL, NULL); + return pStream; } /*********************************************************************** @@ -2931,8 +3129,8 @@ BOOL WINAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName) URLCACHECONTAINER * pContainer; LPURLCACHE_HEADER pHeader; struct _HASH_ENTRY * pHashEntry; - CACHEFILE_ENTRY * pEntry; DWORD error; + BOOL ret; TRACE("(%s)\n", debugstr_a(lpszUrlName)); @@ -2961,14 +3159,11 @@ BOOL WINAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName) return FALSE; } - pEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry); - URLCache_DeleteEntry(pHeader, pEntry); - - URLCache_DeleteEntryFromHash(pHashEntry); + ret = DeleteUrlCacheEntryInternal(pHeader, pHashEntry); URLCacheContainer_UnlockIndex(pContainer, pHeader); - return TRUE; + return ret; } /*********************************************************************** @@ -2980,9 +3175,9 @@ BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName) URLCACHECONTAINER * pContainer; LPURLCACHE_HEADER pHeader; struct _HASH_ENTRY * pHashEntry; - CACHEFILE_ENTRY * pEntry; LPSTR urlA; DWORD error; + BOOL ret; TRACE("(%s)\n", debugstr_w(lpszUrlName)); @@ -3024,15 +3219,12 @@ BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName) return FALSE; } - pEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry); - URLCache_DeleteEntry(pHeader, pEntry); - - URLCache_DeleteEntryFromHash(pHashEntry); + ret = DeleteUrlCacheEntryInternal(pHeader, pHashEntry); URLCacheContainer_UnlockIndex(pContainer, pHeader); HeapFree(GetProcessHeap(), 0, urlA); - return TRUE; + return ret; } BOOL WINAPI DeleteUrlCacheContainerA(DWORD d1, DWORD d2) @@ -3165,7 +3357,7 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern, TRACE("(%s, %p, %p)\n", debugstr_a(lpszUrlSearchPattern), lpFirstCacheEntryInfo, lpdwFirstCacheEntryInfoBufferSize); - pEntryHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(*pEntryHandle)); + pEntryHandle = heap_alloc(sizeof(*pEntryHandle)); if (!pEntryHandle) return NULL; @@ -3204,7 +3396,7 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern, TRACE("(%s, %p, %p)\n", debugstr_w(lpszUrlSearchPattern), lpFirstCacheEntryInfo, lpdwFirstCacheEntryInfoBufferSize); - pEntryHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(*pEntryHandle)); + pEntryHandle = heap_alloc(sizeof(*pEntryHandle)); if (!pEntryHandle) return NULL; @@ -3232,19 +3424,15 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern, return pEntryHandle; } -/*********************************************************************** - * FindNextUrlCacheEntryA (WININET.@) - */ -BOOL WINAPI FindNextUrlCacheEntryA( +static BOOL FindNextUrlCacheEntryInternal( HANDLE hEnumHandle, LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo, - LPDWORD lpdwNextCacheEntryInfoBufferSize) + LPDWORD lpdwNextCacheEntryInfoBufferSize, + BOOL unicode) { URLCacheFindEntryHandle *pEntryHandle = (URLCacheFindEntryHandle *)hEnumHandle; URLCACHECONTAINER * pContainer; - TRACE("(%p, %p, %p)\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize); - if (pEntryHandle->dwMagic != URLCACHE_FIND_ENTRY_HANDLE_MAGIC) { SetLastError(ERROR_INVALID_HANDLE); @@ -3282,8 +3470,10 @@ BOOL WINAPI FindNextUrlCacheEntryA( continue; pUrlEntry = (const URL_CACHEFILE_ENTRY *)pEntry; - TRACE("Found URL: %s\n", (LPCSTR)pUrlEntry + pUrlEntry->dwOffsetUrl); - TRACE("Header info: %s\n", (LPCSTR)pUrlEntry + pUrlEntry->dwOffsetHeaderInfo); + TRACE("Found URL: %s\n", + debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetUrl)); + TRACE("Header info: %s\n", + debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetHeaderInfo)); error = URLCache_CopyEntry( pContainer, @@ -3291,14 +3481,15 @@ BOOL WINAPI FindNextUrlCacheEntryA( lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize, pUrlEntry, - FALSE /* not UNICODE */); + unicode); if (error != ERROR_SUCCESS) { URLCacheContainer_UnlockIndex(pContainer, pHeader); SetLastError(error); return FALSE; } - TRACE("Local File Name: %s\n", debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName)); + TRACE("Local File Name: %s\n", + debugstr_a((LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName)); /* increment the current index so that next time the function * is called the next entry is returned */ @@ -3315,6 +3506,20 @@ BOOL WINAPI FindNextUrlCacheEntryA( return FALSE; } +/*********************************************************************** + * FindNextUrlCacheEntryA (WININET.@) + */ +BOOL WINAPI FindNextUrlCacheEntryA( + HANDLE hEnumHandle, + LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo, + LPDWORD lpdwNextCacheEntryInfoBufferSize) +{ + TRACE("(%p, %p, %p)\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize); + + return FindNextUrlCacheEntryInternal(hEnumHandle, lpNextCacheEntryInfo, + lpdwNextCacheEntryInfoBufferSize, FALSE /* not UNICODE */); +} + /*********************************************************************** * FindNextUrlCacheEntryW (WININET.@) */ @@ -3324,9 +3529,11 @@ BOOL WINAPI FindNextUrlCacheEntryW( LPDWORD lpdwNextCacheEntryInfoBufferSize ) { - FIXME("(%p, %p, %p) stub\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + TRACE("(%p, %p, %p)\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize); + + return FindNextUrlCacheEntryInternal(hEnumHandle, + (LPINTERNET_CACHE_ENTRY_INFOA)lpNextCacheEntryInfo, + lpdwNextCacheEntryInfoBufferSize, TRUE /* UNICODE */); } /*********************************************************************** @@ -3456,8 +3663,6 @@ BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW CacheInfo, LPDW /*********************************************************************** * GetUrlCacheConfigInfoA (WININET.@) - * - * CacheInfo is some CACHE_CONFIG_INFO structure, with no MS info found by google */ BOOL WINAPI GetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA CacheInfo, LPDWORD size, DWORD bitmask) { @@ -3531,6 +3736,24 @@ DWORD WINAPI DeleteIE3Cache(HWND hWnd, HINSTANCE hInst, LPSTR lpszCmdLine, int n return 0; } +static BOOL IsUrlCacheEntryExpiredInternal(const URL_CACHEFILE_ENTRY *pUrlEntry, + FILETIME *pftLastModified) +{ + BOOL ret; + FILETIME now, expired; + + *pftLastModified = pUrlEntry->LastModifiedTime; + GetSystemTimeAsFileTime(&now); + URLCache_DosDateTimeToFileTime(pUrlEntry->wExpiredDate, + pUrlEntry->wExpiredTime, &expired); + /* If the expired time is 0, it's interpreted as not expired */ + if (!expired.dwLowDateTime && !expired.dwHighDateTime) + ret = FALSE; + else + ret = CompareFileTime(&expired, &now) < 0; + return ret; +} + /*********************************************************************** * IsUrlCacheEntryExpiredA (WININET.@) * @@ -3546,51 +3769,57 @@ BOOL WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD dwFlags, FILETIME* pftLas const CACHEFILE_ENTRY * pEntry; const URL_CACHEFILE_ENTRY * pUrlEntry; URLCACHECONTAINER * pContainer; - DWORD error; + BOOL expired; TRACE("(%s, %08x, %p)\n", debugstr_a(url), dwFlags, pftLastModified); - error = URLCacheContainers_FindContainerA(url, &pContainer); - if (error != ERROR_SUCCESS) + if (!url || !pftLastModified) + return TRUE; + if (dwFlags) + FIXME("unknown flags 0x%08x\n", dwFlags); + + /* Any error implies that the URL is expired, i.e. not in the cache */ + if (URLCacheContainers_FindContainerA(url, &pContainer)) { - SetLastError(error); - return FALSE; + memset(pftLastModified, 0, sizeof(*pftLastModified)); + return TRUE; } - error = URLCacheContainer_OpenIndex(pContainer); - if (error != ERROR_SUCCESS) + if (URLCacheContainer_OpenIndex(pContainer)) { - SetLastError(error); - return FALSE; + memset(pftLastModified, 0, sizeof(*pftLastModified)); + return TRUE; } if (!(pHeader = URLCacheContainer_LockIndex(pContainer))) - return FALSE; + { + memset(pftLastModified, 0, sizeof(*pftLastModified)); + return TRUE; + } if (!URLCache_FindHash(pHeader, url, &pHashEntry)) { URLCacheContainer_UnlockIndex(pContainer, pHeader); + memset(pftLastModified, 0, sizeof(*pftLastModified)); TRACE("entry %s not found!\n", url); - SetLastError(ERROR_FILE_NOT_FOUND); - return FALSE; + return TRUE; } pEntry = (const CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry); if (pEntry->dwSignature != URL_SIGNATURE) { URLCacheContainer_UnlockIndex(pContainer, pHeader); + memset(pftLastModified, 0, sizeof(*pftLastModified)); FIXME("Trying to retrieve entry of unknown format %s\n", debugstr_an((LPCSTR)&pEntry->dwSignature, sizeof(DWORD))); - SetLastError(ERROR_FILE_NOT_FOUND); - return FALSE; + return TRUE; } pUrlEntry = (const URL_CACHEFILE_ENTRY *)pEntry; - - DosDateTimeToFileTime(pUrlEntry->wExpiredDate, pUrlEntry->wExpiredTime, pftLastModified); + expired = IsUrlCacheEntryExpiredInternal(pUrlEntry, pftLastModified); URLCacheContainer_UnlockIndex(pContainer, pHeader); - return TRUE; + return expired; } /*********************************************************************** @@ -3608,51 +3837,65 @@ BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLa const CACHEFILE_ENTRY * pEntry; const URL_CACHEFILE_ENTRY * pUrlEntry; URLCACHECONTAINER * pContainer; - DWORD error; + BOOL expired; TRACE("(%s, %08x, %p)\n", debugstr_w(url), dwFlags, pftLastModified); - error = URLCacheContainers_FindContainerW(url, &pContainer); - if (error != ERROR_SUCCESS) + if (!url || !pftLastModified) + return TRUE; + if (dwFlags) + FIXME("unknown flags 0x%08x\n", dwFlags); + + /* Any error implies that the URL is expired, i.e. not in the cache */ + if (URLCacheContainers_FindContainerW(url, &pContainer)) { - SetLastError(error); - return FALSE; + memset(pftLastModified, 0, sizeof(*pftLastModified)); + return TRUE; } - error = URLCacheContainer_OpenIndex(pContainer); - if (error != ERROR_SUCCESS) + if (URLCacheContainer_OpenIndex(pContainer)) { - SetLastError(error); - return FALSE; + memset(pftLastModified, 0, sizeof(*pftLastModified)); + return TRUE; } if (!(pHeader = URLCacheContainer_LockIndex(pContainer))) - return FALSE; + { + memset(pftLastModified, 0, sizeof(*pftLastModified)); + return TRUE; + } if (!URLCache_FindHashW(pHeader, url, &pHashEntry)) { URLCacheContainer_UnlockIndex(pContainer, pHeader); + memset(pftLastModified, 0, sizeof(*pftLastModified)); TRACE("entry %s not found!\n", debugstr_w(url)); - SetLastError(ERROR_FILE_NOT_FOUND); - return FALSE; + return TRUE; + } + + if (!URLCache_FindHashW(pHeader, url, &pHashEntry)) + { + URLCacheContainer_UnlockIndex(pContainer, pHeader); + memset(pftLastModified, 0, sizeof(*pftLastModified)); + TRACE("entry %s not found!\n", debugstr_w(url)); + return TRUE; } pEntry = (const CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry); if (pEntry->dwSignature != URL_SIGNATURE) { URLCacheContainer_UnlockIndex(pContainer, pHeader); + memset(pftLastModified, 0, sizeof(*pftLastModified)); FIXME("Trying to retrieve entry of unknown format %s\n", debugstr_an((LPCSTR)&pEntry->dwSignature, sizeof(DWORD))); - SetLastError(ERROR_FILE_NOT_FOUND); - return FALSE; + return TRUE; } pUrlEntry = (const URL_CACHEFILE_ENTRY *)pEntry; - - DosDateTimeToFileTime(pUrlEntry->wExpiredDate, pUrlEntry->wExpiredTime, pftLastModified); + expired = IsUrlCacheEntryExpiredInternal(pUrlEntry, pftLastModified); URLCacheContainer_UnlockIndex(pContainer, pHeader); - return TRUE; + return expired; } /*********************************************************************** diff --git a/dll/win32/wininet/utility.c b/dll/win32/wininet/utility.c index 0639f40385e..c44aa6c1702 100644 --- a/dll/win32/wininet/utility.c +++ b/dll/win32/wininet/utility.c @@ -172,7 +172,7 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort, len = strlenW(lpszServerName); sz = WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, NULL, 0, NULL, NULL ); - if (!(name = HeapAlloc( GetProcessHeap(), 0, sz + 1 ))) return FALSE; + if (!(name = heap_alloc(sz + 1))) return FALSE; WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, name, sz, NULL, NULL ); name[sz] = 0; @@ -320,7 +320,7 @@ VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, case INTERNET_STATUS_NAME_RESOLVED: case INTERNET_STATUS_CONNECTING_TO_SERVER: case INTERNET_STATUS_CONNECTED_TO_SERVER: - lpvNewInfo = HeapAlloc(GetProcessHeap(), 0, strlen(lpvStatusInfo) + 1); + lpvNewInfo = heap_alloc(strlen(lpvStatusInfo) + 1); if (lpvNewInfo) strcpy(lpvNewInfo, lpvStatusInfo); break; case INTERNET_STATUS_RESOLVING_NAME: @@ -379,7 +379,7 @@ void SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext, if (lpvStatusInfo) { - lpvStatusInfo_copy = HeapAlloc(GetProcessHeap(), 0, dwStatusInfoLength); + lpvStatusInfo_copy = heap_alloc(dwStatusInfoLength); memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength); } diff --git a/dll/win32/wininet/wininet_Bg.rc b/dll/win32/wininet/wininet_Bg.rc index c2cd5550d5b..25461fc3ce2 100644 --- a/dll/win32/wininet/wininet_Bg.rc +++ b/dll/win32/wininet/wininet_Bg.rc @@ -20,7 +20,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -39,8 +39,3 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "LAN " -} diff --git a/dll/win32/wininet/wininet_Cs.rc b/dll/win32/wininet/wininet_Cs.rc index 7e0b214b75f..cbc2c5a1bb7 100644 --- a/dll/win32/wininet/wininet_Cs.rc +++ b/dll/win32/wininet/wininet_Cs.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT /* Czech strings in CP1250 */ -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Zadn sovho hesla" FONT 8, "MS Shell Dlg" diff --git a/dll/win32/wininet/wininet_Da.rc b/dll/win32/wininet/wininet_Da.rc index 6bde57d6851..767baec233a 100644 --- a/dll/win32/wininet/wininet_Da.rc +++ b/dll/win32/wininet/wininet_Da.rc @@ -1,5 +1,6 @@ /* * Copyright 2008 Jens Albretsen + * 2010 Thomas Larsen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,11 +19,13 @@ #include "resource.h" +#pragma code_page(65001) + LANGUAGE LANG_DANISH, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Skriv netvrkskodeord" +CAPTION "Skriv netværkskodeord" FONT 8, "MS Shell Dlg" { LTEXT "Skriv dit brugernavn og kodeord:", -1, 40, 6, 150, 15 @@ -40,7 +43,22 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Annuller", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Godkendelse Påkrævet" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "Lokal netvrksforbindelse" + LTEXT "Indtast venligst, dit brugernavn og adgangskode:", -1, 40, 6, 150, 15 + LTEXT "Server", -1, 40, 26, 50, 10 + LTEXT "Domæne", -1, 40, 46, 50, 10 + LTEXT "Bruger", -1, 40, 66, 50, 10 + LTEXT "Adgangskode", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Gem denne adgangskode (usikker)", 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 "Annuller", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_De.rc b/dll/win32/wininet/wininet_De.rc index 21dd6e4b5ec..893ec886286 100644 --- a/dll/win32/wininet/wininet_De.rc +++ b/dll/win32/wininet/wininet_De.rc @@ -1,6 +1,6 @@ /* * Copyright 2004 Henning Gerhardt - * Copyright 2009 André Hentschel + * Copyright 2009-2010 André Hentschel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,7 +23,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Netzwerkkennung eingeben" FONT 8, "MS Shell Dlg" @@ -43,7 +43,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Abbrechen", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Benutzeranmeldung" FONT 8, "MS Shell Dlg" @@ -63,7 +63,14 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Abbrechen", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Sicherheits Warnung" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "LAN Verbindung" + LTEXT "Es gibt ein Problem mit dem Zertifikat dieser Seite.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Möchten Sie dennoch fortfahren?", -1, 40, 46, 200, 20 + PUSHBUTTON "Ja", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Nein", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_En.rc b/dll/win32/wininet/wininet_En.rc index 92590c16548..5c303fc824a 100644 --- a/dll/win32/wininet/wininet_En.rc +++ b/dll/win32/wininet/wininet_En.rc @@ -20,7 +20,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Enter Network Password" FONT 8, "MS Shell Dlg" @@ -40,7 +40,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Authentication Required" FONT 8, "MS Shell Dlg" @@ -60,7 +60,14 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Security Warning" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "LAN Connection" + LTEXT "There is a problem with the certificate for this site.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Do you want to continue anyway?", -1, 40, 46, 200, 20 + PUSHBUTTON "Yes", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "No", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Eo.rc b/dll/win32/wininet/wininet_Eo.rc new file mode 100644 index 00000000000..8929e7ec0f2 --- /dev/null +++ b/dll/win32/wininet/wininet_Eo.rc @@ -0,0 +1,43 @@ +/* + * Wininet Resources - Esperanto Language Support + * + * Copyright 2006 Antonio Codazzi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "resource.h" + +LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT + +IDD_PROXYDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enmetu Retan Pasvorton" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Enmetu uzantonomon kaj pasvorton:", -1, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 + LTEXT "Realm", -1, 40, 46, 50, 10 + LTEXT "Uzanto", -1, 40, 66, 50, 10 + LTEXT "Pasvorto", -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 "&Storu pasvorton ( RISKE! )", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Bone", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Rezigni", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} diff --git a/dll/win32/wininet/wininet_Es.rc b/dll/win32/wininet/wininet_Es.rc index 01b8b730ecd..a9b6abd33c0 100644 --- a/dll/win32/wininet/wininet_Es.rc +++ b/dll/win32/wininet/wininet_Es.rc @@ -1,5 +1,5 @@ -/* - * Copyright 2003, 2005 Jos Manuel Ferrer Ortiz +/* + * Copyright 2003, 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 @@ -20,27 +20,42 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Introduzca contrasea de red" +CAPTION "Introduzca contraseña de red" FONT 8, "MS Shell Dlg" { - LTEXT "Por favor introduzca su nombre de usuario y contrasea:", -1, 40, 6, 150, 15 + LTEXT "Por favor introduzca su nombre de usuario y contraseña:", -1, 40, 6, 150, 15 LTEXT "Proxy", -1, 40, 26, 50, 10 LTEXT "Dominio", -1, 40, 46, 50, 10 LTEXT "Usuario", -1, 40, 66, 50, 10 - LTEXT "Contrasea", -1, 40, 86, 50, 10 + LTEXT "Contraseña", -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 "&Guardar esta contrasea (inseguro)", IDC_SAVEPASSWORD, + CHECKBOX "&Guardar esta contraseña (inseguro)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "Aceptar", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Autentificación Requerida" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "Conexin LAN" + LTEXT "Por favor introduzca su nombre de usuario y contraseña:", -1, 40, 6, 150, 15 + LTEXT "Servidor", -1, 40, 26, 50, 10 + LTEXT "Dominio", -1, 40, 46, 50, 10 + LTEXT "Usuario", -1, 40, 66, 50, 10 + LTEXT "Contraseña", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Guardar esta contraseña (inseguro)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Aceptar", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Fi.rc b/dll/win32/wininet/wininet_Fi.rc index 6ab43d49945..302d090a532 100644 --- a/dll/win32/wininet/wininet_Fi.rc +++ b/dll/win32/wininet/wininet_Fi.rc @@ -1,4 +1,4 @@ -/* +/* * Copyright 2005 Kimmo Myllyvirta * * This library is free software; you can redistribute it and/or @@ -20,27 +20,22 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Anna Verkon Salasana" +CAPTION "Anna verkon salasana" FONT 8, "MS Shell Dlg" { - LTEXT "Anna kyttjn nimi ja salasana:", -1, 40, 6, 150, 15 - LTEXT "Vlityspalvelin", -1, 40, 26, 50, 10 + LTEXT "Anna käyttäjän nimi ja salasana:", -1, 40, 6, 150, 15 + LTEXT "Välityspalvelin", -1, 40, 26, 50, 10 LTEXT "Alue", -1, 40, 46, 50, 10 - LTEXT "Kyttj", -1, 40, 66, 50, 10 + LTEXT "Käyttäjä", -1, 40, 66, 50, 10 LTEXT "Salasana", -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 "&Tallenna tm salasana (epturvallinen)", IDC_SAVEPASSWORD, + CHECKBOX "&Tallenna tämä salasana (epäturvallinen)", 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 "Peruuta", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "Lhiverkkoyhteys" -} diff --git a/dll/win32/wininet/wininet_Fr.rc b/dll/win32/wininet/wininet_Fr.rc index d78e4de8769..255b79dde03 100644 --- a/dll/win32/wininet/wininet_Fr.rc +++ b/dll/win32/wininet/wininet_Fr.rc @@ -5,7 +5,7 @@ * Copyright 2003 Mike McCormack for CodeWeavers * Copyright 2003 Vincent Béron * Copyright 2005 Jonathan Ernst - * Copyright 2009 Frédéric Delanoy + * Copyright 2009-2010 Frédéric Delanoy * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,7 +29,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 218, 150 +IDD_PROXYDLG DIALOG 36, 24, 218, 150 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Entrez le mot de passe réseau" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Annuler", IDCANCEL, 147, 128, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 218, 150 +IDD_AUTHDLG DIALOG 36, 24, 218, 150 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Authentification requise" FONT 8, "MS Shell Dlg" @@ -69,7 +69,14 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Annuler", IDCANCEL, 147, 128, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Alerte de sécurité" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "Connexion réseau local (LAN)" + LTEXT "Le certificat pour ce site pose problème.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Voulez-vous tout de même continuer ?", -1, 40, 46, 200, 20 + PUSHBUTTON "Oui", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Non", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_He.rc b/dll/win32/wininet/wininet_He.rc new file mode 100644 index 00000000000..4de3674097a --- /dev/null +++ b/dll/win32/wininet/wininet_He.rc @@ -0,0 +1,79 @@ +/* + * Copyright 2003 Mike McCormack for CodeWeavers + * Copyright 2010 Yaron Shahrabani + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "resource.h" + +#pragma code_page(65001) + +LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT + +IDD_PROXYDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_LAYOUTRTL +CAPTION "הזנת ססמת הרשת" +FONT 8, "MS Shell Dlg" +{ + LTEXT "נא להזין את שם המשתמש ואת הססמה שלך:", -1, 40, 6, 150, 15 + LTEXT "מתווך", -1, 40, 26, 50, 10 + LTEXT "תחום", -1, 40, 46, 50, 10 + LTEXT "משתמש", -1, 40, 66, 50, 10 + LTEXT "ססמה", -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 "&שמירת ססמה זו (לא מאובטח)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "אישור", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "ביטול", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_LAYOUTRTL +CAPTION "נדרש אימות" +FONT 8, "MS Shell Dlg" +{ + LTEXT "נא להזין את שם המשתמש ואת הססמה שלך:", -1, 40, 6, 150, 15 + LTEXT "שרת", -1, 40, 26, 50, 10 + LTEXT "תחום", -1, 40, 46, 50, 10 + LTEXT "שם משתמש", -1, 40, 66, 50, 10 + LTEXT "ססמה", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&שמירת ססמה זו (לא מאובטח)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "אישור", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "ביטול", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_LAYOUTRTL +CAPTION "אזהרת אבטחה" +FONT 8, "MS Shell Dlg" +{ + LTEXT "אירעה תקלה עם האישור לאתר זה.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "האם ברצונך להמשיך בכל זאת?", -1, 40, 46, 200, 20 + PUSHBUTTON "כן", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "לא", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP +} diff --git a/dll/win32/wininet/wininet_Hu.rc b/dll/win32/wininet/wininet_Hu.rc index 4ceb3771593..720c146dc6c 100644 --- a/dll/win32/wininet/wininet_Hu.rc +++ b/dll/win32/wininet/wininet_Hu.rc @@ -1,5 +1,5 @@ /* - * Copyright 2006 Andras Kovacs + * Copyright 2006-2010 Andras Kovacs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,27 +20,45 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +/* UTF-8 */ +#pragma code_page(65001) + +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Hlzati jelsz megadsa" +CAPTION "Hálózati jelszó megadása" FONT 8, "MS Shell Dlg" { - LTEXT "Krem adja meg a felhasznlnevet, s jelszt:", -1, 40, 6, 150, 15 + LTEXT "Kérem adja meg a felhasználónevet és jelszót:", -1, 40, 6, 150, 15 LTEXT "Proxy", -1, 40, 26, 50, 10 LTEXT "Csoport", -1, 40, 46, 50, 10 - LTEXT "Felhasznl", -1, 40, 66, 50, 10 - LTEXT "Jelsz", -1, 40, 86, 50, 10 + LTEXT "Felhasználó", -1, 40, 66, 50, 10 + LTEXT "Jelszó", -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 "&Jelsz mentse (nem biztonsgos)", IDC_SAVEPASSWORD, + CHECKBOX "&Jelszó mentése (nem biztonságos)", 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 "Mgse", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Mégse", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Hitelesítés szükséges" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "LAN kapcsolat" + LTEXT "Kérem adja meg a felhasználónevet és jelszót:", -1, 40, 6, 150, 15 + LTEXT "Kiszolgáló", -1, 40, 26, 50, 10 + LTEXT "Tartomány", -1, 40, 46, 50, 10 + LTEXT "Felhasználó", -1, 40, 66, 50, 10 + LTEXT "Jelszó", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "Jel&szó elmentése (nem biztonságos)", 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 "Mégse", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_It.rc b/dll/win32/wininet/wininet_It.rc index 0ea577abeb8..279f9915439 100644 --- a/dll/win32/wininet/wininet_It.rc +++ b/dll/win32/wininet/wininet_It.rc @@ -2,6 +2,7 @@ * Copyright 2003 Mike McCormack for CodeWeavers * Copyright 2003 Ivan Leo Puoti * Copyright 2006 Antonio Codazzi + * Copyright 2010 Luca Bennati * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,49 +21,59 @@ #include "resource.h" +/* UTF-8 */ +#pragma code_page(65001) + LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Inserire la password di rete" FONT 8, "MS Shell Dlg" { LTEXT "Inserire il nome utente e la password:", -1, 40, 6, 150, 15 LTEXT "Proxy", -1, 40, 26, 50, 10 - LTEXT "Realm", -1, 40, 46, 50, 10 + LTEXT "Dominio", -1, 40, 46, 50, 10 LTEXT "Utente", -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 "&Memorizza la password ( RISCHIOSO )", IDC_SAVEPASSWORD, + CHECKBOX "&Memorizza la password (non sicuro)", 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 "Ok", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Annulla", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Autenticazione richiesta" FONT 8, "MS Shell Dlg" { LTEXT "Inserire il nome utente e la password:", -1, 40, 6, 150, 15 LTEXT "Server", -1, 40, 26, 50, 10 - LTEXT "Realm", -1, 40, 46, 50, 10 + LTEXT "Dominio", -1, 40, 46, 50, 10 LTEXT "Utente", -1, 40, 66, 50, 10 LTEXT "Password", -1, 40, 86, 50, 10 LTEXT "", IDC_SERVER, 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 "&Memorizza la password (RISCHIOSO)", IDC_SAVEPASSWORD, + CHECKBOX "&Memorizza la password (non sicuro)", 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 "Ok", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Annulla", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Avviso di sicurezza" +FONT 8, "MS Shell Dlg" { -IDS_LANCONNECTION "Connessione LAN" + LTEXT "È presente un problema con il certificato per questo sito.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Vuoi continuare comunque?", -1, 40, 46, 200, 20 + PUSHBUTTON "Sì", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "No", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Ja.rc b/dll/win32/wininet/wininet_Ja.rc index 94e3e25c960..c0c75678f06 100644 --- a/dll/win32/wininet/wininet_Ja.rc +++ b/dll/win32/wininet/wininet_Ja.rc @@ -23,14 +23,14 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ネットワーク パスワードの入力" FONT 9, "MS Shell Dlg" { LTEXT "ユーザ名とパスワードを入力して下さい:", -1, 40, 6, 150, 15 LTEXT "プロキシ", -1, 40, 26, 50, 10 - LTEXT "地域", -1, 40, 46, 50, 10 + LTEXT "領域", -1, 40, 46, 50, 10 LTEXT "ユーザ名", -1, 40, 66, 50, 10 LTEXT "パスワード", -1, 40, 86, 50, 10 LTEXT "", IDC_PROXY, 80, 26, 150, 14, 0 @@ -43,7 +43,22 @@ FONT 9, "MS Shell Dlg" PUSHBUTTON "キャンセル", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "認証が必要です" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "LAN 接続" + LTEXT "ユーザ名とパスワードを入力して下さい:", -1, 40, 6, 150, 15 + LTEXT "サーバ", -1, 40, 26, 50, 10 + LTEXT "領域", -1, 40, 46, 50, 10 + LTEXT "ユーザ名", -1, 40, 66, 50, 10 + LTEXT "パスワード", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "パスワードを保存する(&S)(セキュアではありません)", 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 "キャンセル", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Ko.rc b/dll/win32/wininet/wininet_Ko.rc index 7e8fcaed3f7..f499cb237f5 100644 --- a/dll/win32/wininet/wininet_Ko.rc +++ b/dll/win32/wininet/wininet_Ko.rc @@ -1,6 +1,7 @@ /* - * Copyright 2005,2007 YunSong Hwang - * + * Copyright 2003 Mike McCormack for CodeWeavers + * Copyright 2005,2007,2010,2011 YunSong Hwang + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either @@ -18,29 +19,58 @@ #include "resource.h" +#pragma code_page(65001) + LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ʈũ ȣ Է" +CAPTION "네트워크 암호 입력" FONT 9, "MS Shell Dlg" { - LTEXT " ̸ ȣ ԷϽÿ:", -1, 40, 6, 150, 15 - LTEXT "Ͻ", -1, 40, 26, 50, 10 - LTEXT "Realm", -1, 40, 46, 50, 10 - LTEXT "", -1, 40, 66, 50, 10 - LTEXT "ȣ", -1, 40, 86, 50, 10 + LTEXT "당신의 사용자 이름과 암호를 입력하십시오:", -1, 40, 6, 150, 15 + LTEXT "프록시", -1, 40, 26, 50, 10 + LTEXT "영역", -1, 40, 46, 50, 10 + LTEXT "사용자", -1, 40, 66, 50, 10 + LTEXT "암호", -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 "ȣ Է(&S)(Ͻÿ)", IDC_SAVEPASSWORD, + CHECKBOX "암호 저장(&S)(안전하지 못함)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Ȯ", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "확인", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "취소", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "인증 필요" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION " " + LTEXT "당신의 사용자 이름과 암호를 입력하십시오:", -1, 40, 6, 150, 15 + LTEXT "서버", -1, 40, 26, 50, 10 + LTEXT "영역", -1, 40, 46, 50, 10 + LTEXT "사용자", -1, 40, 66, 50, 10 + LTEXT "암호", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "암호 저장(&S) (안전하지 못함)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "확인", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "취소", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "보안 경고" +FONT 8, "MS Shell Dlg" +{ + LTEXT "이 사이트의 인증서에 문제가 있습니다.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "그래도 계속 진행하겠습니까?", -1, 40, 46, 200, 20 + PUSHBUTTON "예", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "아니오", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Lt.rc b/dll/win32/wininet/wininet_Lt.rc index 4fcb8cfc8ad..ab048d92577 100644 --- a/dll/win32/wininet/wininet_Lt.rc +++ b/dll/win32/wininet/wininet_Lt.rc @@ -1,5 +1,5 @@ /* - * Copyright 2009 Aurimas Fišeras + * Copyright 2009-2010 Aurimas Fišeras * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,7 +23,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Įveskite tinklo slaptažodį" FONT 8, "MS Shell Dlg" @@ -43,7 +43,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Atsisakyti", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Reikalingas tapatumo nustatymas" FONT 8, "MS Shell Dlg" @@ -63,7 +63,14 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Atsisakyti", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Įspėjimas apie saugumą" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "Vietinio tinklo ryšys" + LTEXT "Yra nesklandumų su šios svetainės liudijimu.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Ar vistiek norite tęsti?", -1, 40, 46, 200, 20 + PUSHBUTTON "Taip", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Ne", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Nl.rc b/dll/win32/wininet/wininet_Nl.rc index 2849d9c630b..adb49e6236d 100644 --- a/dll/win32/wininet/wininet_Nl.rc +++ b/dll/win32/wininet/wininet_Nl.rc @@ -22,7 +22,9 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +#pragma code_page(65001) + +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Netwerkwachtwoord invoeren" FONT 8, "MS Shell Dlg" @@ -42,7 +44,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Annuleren", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Authenticatie vereist" FONT 8, "MS Shell Dlg" @@ -62,7 +64,14 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Annuleren", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Veiligheidswaarschuwing" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "LAN Verbinding" + LTEXT "Er is een probleem met het certificaat voor deze site.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Wilt u toch doorgaan?", -1, 40, 46, 200, 20 + PUSHBUTTON "Ja", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Nee", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_No.rc b/dll/win32/wininet/wininet_No.rc index b3fd6adc121..9caaa7c55e7 100644 --- a/dll/win32/wininet/wininet_No.rc +++ b/dll/win32/wininet/wininet_No.rc @@ -22,7 +22,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Skriv inn nettverkspassord" FONT 8, "MS Shell Dlg" @@ -42,7 +42,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Pålogging" FONT 8, "MS Shell Dlg" @@ -61,8 +61,3 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "Lokal nettverksforbindelse" -} diff --git a/dll/win32/wininet/wininet_Pl.rc b/dll/win32/wininet/wininet_Pl.rc index 610b5a275a1..4faa99397cb 100644 --- a/dll/win32/wininet/wininet_Pl.rc +++ b/dll/win32/wininet/wininet_Pl.rc @@ -1,6 +1,7 @@ -/* +/* * Copyright 2003 Mike McCormack for CodeWeavers * Copyright 2006 Mikolaj Zalewski + * Copyright 2010 £ukasz Wojni³owicz * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,27 +22,54 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Wprowad haso do sieci" +CAPTION "WprowadŸ has³o do sieci" FONT 8, "MS Shell Dlg" { - LTEXT "Prosz wprowadzi nazw uytkownika i haso:", -1, 40, 6, 150, 15 + LTEXT "Proszê wprowadziæ nazwê u¿ytkownika i has³o:", -1, 40, 6, 150, 15 LTEXT "Proxy", -1, 40, 26, 50, 10 LTEXT "Obszar", -1, 40, 46, 50, 10 - LTEXT "Uytkonik", -1, 40, 66, 50, 10 - LTEXT "Haso", -1, 40, 86, 50, 10 + LTEXT "U¿ytkownik", -1, 40, 66, 50, 10 + LTEXT "Has³o", -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 "&Zapamitaj to haso (nie bezpieczne)", IDC_SAVEPASSWORD, + CHECKBOX "&Zapamiêtaj to has³o (niebezpieczne)", 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 "Anuluj", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Wymagane uwierzytelnienie " +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "Poczenie LAN" + LTEXT "Proszê wprowadziæ nazwê u¿ytkownika i has³o:", -1, 40, 6, 150, 15 + LTEXT "Serwer", -1, 40, 26, 50, 10 + LTEXT "Obszar", -1, 40, 46, 50, 10 + LTEXT "U¿ytkownik", -1, 40, 66, 50, 10 + LTEXT "Has³o", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Zapamiêtaj to has³o (niebezpieczne)", 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 "Anuluj", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Ostrze¿enie o zabezpieczeniach" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Wyst¹pi³ problem z certyfikatem dla tej strony.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Czy mimo to chcesz kontynuowaæ?", -1, 40, 46, 200, 20 + PUSHBUTTON "Tak", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Nie", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Pt.rc b/dll/win32/wininet/wininet_Pt.rc index 92a6c9ad83b..28da452b1b2 100644 --- a/dll/win32/wininet/wininet_Pt.rc +++ b/dll/win32/wininet/wininet_Pt.rc @@ -2,6 +2,7 @@ * Copyright 2003 Marcelo Duarte * Copyright 2006-2007 Américo José Melo * Copyright 2009 Ricardo Filipe + * Copyright 2010 Gustavo Henrique Milaré * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,14 +25,14 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Entrar Senha da Rede" FONT 8, "MS Shell Dlg" { LTEXT "Por favor, entre com o nome de usuário e a senha:", -1, 40, 6, 150, 15 LTEXT "Proxy", -1, 40, 26, 50, 10 - LTEXT "Realm", -1, 40, 46, 50, 10 + LTEXT "Domínio", -1, 40, 46, 50, 10 LTEXT "Usuário", -1, 40, 66, 50, 10 LTEXT "Senha", -1, 40, 86, 50, 10 LTEXT "", IDC_PROXY, 80, 26, 150, 14, 0 @@ -46,7 +47,7 @@ FONT 8, "MS Shell Dlg" LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Indicar Senha da Rede" FONT 8, "MS Shell Dlg" @@ -66,7 +67,32 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 + +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN + +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Autenticação necessária" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Por favor insira o seu nome de usuário e senha:", -1, 40, 6, 150, 15 + LTEXT "Servidor", -1, 40, 26, 50, 10 + LTEXT "Domínio", -1, 40, 46, 50, 10 + LTEXT "Usuário", -1, 40, 66, 50, 10 + LTEXT "Senha", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Salvar esta senha (inseguro)", 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 "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE + +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Autenticação necessária" FONT 8, "MS Shell Dlg" @@ -85,17 +111,3 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } - -LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "Conexão LAN" -} - -LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "Ligação LAN" -} diff --git a/dll/win32/wininet/wininet_Ro.rc b/dll/win32/wininet/wininet_Ro.rc index 6ee9cddc517..8412035bc3b 100644 --- a/dll/win32/wininet/wininet_Ro.rc +++ b/dll/win32/wininet/wininet_Ro.rc @@ -23,7 +23,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL #pragma code_page(65001) -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Introducere parolă de rețea" FONT 8, "MS Shell Dlg" @@ -43,7 +43,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Renunță", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Autentificare necesară" FONT 8, "MS Shell Dlg" @@ -62,8 +62,3 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Renunță", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "Conexiune LAN" -} diff --git a/dll/win32/wininet/wininet_Ru.rc b/dll/win32/wininet/wininet_Ru.rc index ba8d0258912..dbe38f00984 100644 --- a/dll/win32/wininet/wininet_Ru.rc +++ b/dll/win32/wininet/wininet_Ru.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ввод сетевого пароля" FONT 8, "MS Shell Dlg" @@ -45,7 +45,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Отмена", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Требуется идентификация" FONT 8, "MS Shell Dlg" @@ -64,8 +64,3 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Отмена", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "Сетевое подключение" -} diff --git a/dll/win32/wininet/wininet_Si.rc b/dll/win32/wininet/wininet_Si.rc index fb677ff6d32..3bc0213af38 100644 --- a/dll/win32/wininet/wininet_Si.rc +++ b/dll/win32/wininet/wininet_Si.rc @@ -22,7 +22,7 @@ LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Vnos omrežnega gesla" FONT 8, "MS Shell Dlg" @@ -42,7 +42,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Prekliči", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -IDD_AUTHDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_AUTHDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Authentication Required" FONT 8, "MS Shell Dlg" @@ -61,8 +61,3 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "V redu", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Prekliči", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "LAN povezava" -} diff --git a/dll/win32/wininet/wininet_Sr.rc b/dll/win32/wininet/wininet_Sr.rc new file mode 100644 index 00000000000..37a57420514 --- /dev/null +++ b/dll/win32/wininet/wininet_Sr.rc @@ -0,0 +1,106 @@ +/* + * Copyright 2003 Mike McCormack for CodeWeavers + * Copyright 2010 Đorđe Vasiljević + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "resource.h" + +#pragma code_page(65001) + +LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC + +IDD_PROXYDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Унос мрежне лозинке" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Унесите своје корисничко име и лозинку:", -1, 40, 6, 150, 15 + LTEXT "Посредник", -1, 40, 26, 50, 10 + LTEXT "Домен", -1, 40, 46, 50, 10 + LTEXT "Корисничко име", -1, 40, 66, 50, 10 + LTEXT "Лозинка", -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 "&Сачувај ову лозинку (небезбедно)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "У реду", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Откажи", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Потврда идентитета" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Унесите своје корисничко име и лозинку:", -1, 40, 6, 150, 15 + LTEXT "Сервер", -1, 40, 26, 50, 10 + LTEXT "Домен", -1, 40, 46, 50, 10 + LTEXT "Корисничко име", -1, 40, 66, 50, 10 + LTEXT "Лозинка", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Сачувај ову лозинку (небезбедно)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "У реду", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Откажи", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN + +IDD_PROXYDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Unos mrežne lozinke" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Unesite svoje korisničko ime i lozinku:", -1, 40, 6, 150, 15 + LTEXT "Posrednik", -1, 40, 26, 50, 10 + LTEXT "Domen", -1, 40, 46, 50, 10 + LTEXT "Korisničko ime", -1, 40, 66, 50, 10 + LTEXT "Lozinka", -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 "&Sačuvaj ovu lozinku (nebezbedno)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "U redu", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Otkaži", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Potvrda identiteta" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Unesite svoje korisničko ime i lozinku:", -1, 40, 6, 150, 15 + LTEXT "Server", -1, 40, 26, 50, 10 + LTEXT "Domen", -1, 40, 46, 50, 10 + LTEXT "Korisničko ime", -1, 40, 66, 50, 10 + LTEXT "Lozinka", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Sačuvaj ovu lozinku (nebezbedno)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "U redu", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Otkaži", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} diff --git a/dll/win32/wininet/wininet_Sv.rc b/dll/win32/wininet/wininet_Sv.rc index 65252f400e2..50e57d0ed49 100644 --- a/dll/win32/wininet/wininet_Sv.rc +++ b/dll/win32/wininet/wininet_Sv.rc @@ -1,4 +1,4 @@ -/* +/* * Copyright 2007 Daniel Nylander * * This library is free software; you can redistribute it and/or @@ -20,27 +20,54 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ange ntverkslsenord" +CAPTION "Ange nätverkslösenord" FONT 8, "MS Shell Dlg" { - LTEXT "Ange ditt anvndarnamn och lsenord:", -1, 40, 6, 150, 15 + LTEXT "Ange ditt användarnamn och lösenord:", -1, 40, 6, 150, 15 LTEXT "Proxy", -1, 40, 26, 50, 10 - LTEXT "Domn", -1, 40, 46, 50, 10 - LTEXT "Anvndarnamn", -1, 40, 66, 50, 10 - LTEXT "Lsenord", -1, 40, 86, 50, 10 + LTEXT "Domän", -1, 40, 46, 50, 10 + LTEXT "Användare", -1, 40, 66, 50, 10 + LTEXT "Lösenord", -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 "&Spara detta lsenord (oskert)", IDC_SAVEPASSWORD, + CHECKBOX "&Spara detta lösenord (osäkert)", 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 "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Autentisering krävs" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "LAN-anslutning" + LTEXT "Ange ditt användarnamn och lösenord:", -1, 40, 6, 150, 15 + LTEXT "Server", -1, 40, 26, 50, 10 + LTEXT "Domän", -1, 40, 46, 50, 10 + LTEXT "Användare", -1, 40, 66, 50, 10 + LTEXT "Lösenord", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Spara detta lösenord (osäkert)", 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 "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} + +IDD_INVCERTDLG DIALOG 3, 24, 250, 86 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Säkerhetsvarning" +FONT 8, "MS Shell Dlg" +{ + LTEXT "Ett problem upptäcktes med certifikatet för denna site.", -1, 40, 6, 200, 20 + LTEXT "", IDC_CERT_ERROR, 40, 26, 200, 20 + LTEXT "Vill du fortsätta ändå?", -1, 40, 46, 200, 20 + PUSHBUTTON "Ja", IDOK, 40, 66, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Nej", IDCANCEL, 100, 66, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Tr.rc b/dll/win32/wininet/wininet_Tr.rc index bfd675e52a4..7d54a68408f 100644 --- a/dll/win32/wininet/wininet_Tr.rc +++ b/dll/win32/wininet/wininet_Tr.rc @@ -1,7 +1,7 @@ -/* +/* * Turkish Resources * - * Copyright 2006 Fatih Ac + * Copyright 2006 Fatih Aþýcý * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,27 +22,22 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "A Parolasn Girin" +CAPTION "Að Parolasýný Girin" FONT 8, "MS Shell Dlg" { - LTEXT "Ltfen kullanc adnz ve parolanz girin:", -1, 40, 6, 150, 15 + LTEXT "Lütfen kullanýcý adýnýzý ve parolanýzý girin:", -1, 40, 6, 150, 15 LTEXT "Proxy", -1, 40, 26, 50, 10 LTEXT "Realm", -1, 40, 46, 50, 10 - LTEXT "Kullanc", -1, 40, 66, 50, 10 + LTEXT "Kullanýcý", -1, 40, 66, 50, 10 LTEXT "Parola", -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 "Bu parolay &sakla (gvensiz)", IDC_SAVEPASSWORD, + CHECKBOX "Bu parolayý &sakla (güvensiz)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "Tamam", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "ptal", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP -} - -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "LAN Balants" + PUSHBUTTON "Ýptal", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Uk.rc b/dll/win32/wininet/wininet_Uk.rc index 6a61a4c22c8..3ab0ec34671 100644 --- a/dll/win32/wininet/wininet_Uk.rc +++ b/dll/win32/wininet/wininet_Uk.rc @@ -2,6 +2,7 @@ * wininet.dll (Ukrainian resources) * * Copyright 2006 Artem Reznikov + * Copyright 2010 Igor Paliychuk * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,29 +21,47 @@ #include "resource.h" +/* UTF-8 */ +#pragma code_page(65001) + LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " " +CAPTION "Введіть Мережний Пароль" FONT 8, "MS Shell Dlg" { - LTEXT " , ' :", -1, 40, 6, 150, 15 - LTEXT "", -1, 40, 26, 50, 10 - LTEXT "", -1, 40, 46, 50, 10 - LTEXT "", -1, 40, 66, 50, 10 - LTEXT "", -1, 40, 86, 50, 10 + LTEXT "Будь ласка, введіть Ваші ім'я та пароль:", -1, 40, 6, 150, 15 + LTEXT "Проксі", -1, 40, 26, 50, 10 + LTEXT "Область", -1, 40, 46, 50, 10 + LTEXT "Користувач", -1, 40, 66, 50, 10 + LTEXT "Пароль", -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 "& ()", IDC_SAVEPASSWORD, + CHECKBOX "&Зберегти цей пароль (небезпечно)", 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 "", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Скасувати", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Необхідна авторизація" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "ϳ " + LTEXT "Будь ласка, введіть Ваші ім'я та пароль:", -1, 40, 6, 150, 15 + LTEXT "Сервер", -1, 40, 26, 50, 10 + LTEXT "Область", -1, 40, 46, 50, 10 + LTEXT "Користувач", -1, 40, 66, 50, 10 + LTEXT "Пароль", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "&Зберегти цей пароль (небезпечно)", 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 "Скасувати", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/wininet/wininet_Zh.rc b/dll/win32/wininet/wininet_Zh.rc index 4d5a5502ece..c242fd4f512 100644 --- a/dll/win32/wininet/wininet_Zh.rc +++ b/dll/win32/wininet/wininet_Zh.rc @@ -2,6 +2,7 @@ * wininet (Simplified and Traditional Chinese Resources) * * Copyright 2008 Hongbo Ni + * Copyright 2010 Rex Tsai * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,7 +26,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "输入网络密码" FONT 9, "MS Shell Dlg" @@ -45,34 +46,44 @@ FONT 9, "MS Shell Dlg" PUSHBUTTON "取消", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE -{ - IDS_LANCONNECTION "局域网连接" -} - LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +IDD_PROXYDLG DIALOG 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "輸入網路密碼" FONT 9, "MS Shell Dlg" { - LTEXT "請輸入你的用戶名和密碼:", -1, 40, 6, 150, 15 - LTEXT "代理", -1, 40, 26, 50, 10 + LTEXT "請輸入您的帳號和密碼:", -1, 40, 6, 150, 15 + LTEXT "代理伺服器", -1, 40, 26, 50, 10 LTEXT "Realm", -1, 40, 46, 50, 10 - LTEXT "用戶", -1, 40, 66, 50, 10 + LTEXT "帳號", -1, 40, 66, 50, 10 LTEXT "密碼", -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 "儲存密碼(不安全)(&S)", IDC_SAVEPASSWORD, + CHECKBOX "儲存密碼 (不安全)(&S)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "確定", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "取消", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } -STRINGTABLE DISCARDABLE +IDD_AUTHDLG DIALOG 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "需要認證" +FONT 8, "MS Shell Dlg" { - IDS_LANCONNECTION "局域網連接" + LTEXT "請輸入您的帳號和密碼:", -1, 40, 6, 150, 15 + LTEXT "伺服器", -1, 40, 26, 50, 10 + LTEXT "Realm", -1, 40, 46, 50, 10 + LTEXT "帳號", -1, 40, 66, 50, 10 + LTEXT "密碼", -1, 40, 86, 50, 10 + LTEXT "", IDC_SERVER, 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 "儲存密碼 (不安全)(&S)", 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 } diff --git a/dll/win32/wininet/wininet_ros.diff b/dll/win32/wininet/wininet_ros.diff index a8721d6ec72..7aad769adcd 100644 --- a/dll/win32/wininet/wininet_ros.diff +++ b/dll/win32/wininet/wininet_ros.diff @@ -66,4 +66,29 @@ + if (select(0, &infd, NULL, NULL, &tv) > 0) { if (recv(nSocket, &lpszBuffer[nRecv], 1, 0) <= 0) - { \ No newline at end of file + { +Index: dll/win32/wininet/urlcache.c +=================================================================== +--- dll/win32/wininet/urlcache.c (revision 50814) ++++ dll/win32/wininet/urlcache.c (working copy) +@@ -527,6 +527,7 @@ + static const WCHAR HistoryPrefix[] = {'V','i','s','i','t','e','d',':',0}; + static const WCHAR CookieSuffix[] = {0}; + static const WCHAR CookiePrefix[] = {'C','o','o','k','i','e',':',0}; ++ static const WCHAR UserProfile[] = {'U','S','E','R','P','R','O','F','I','L','E',0}; + static const struct + { + int nFolder; /* CSIDL_* constant */ +@@ -540,6 +541,12 @@ + }; + DWORD i; + ++ if (GetEnvironmentVariableW(UserProfile, NULL, 0) == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) ++ { ++ TRACE("Environment variable 'USERPROFILE' does not exist!\n"); ++ return; ++ } ++ + for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++) + { + WCHAR wszCachePath[MAX_PATH]; diff --git a/dll/win32/winmm/winmm_Uk.rc b/dll/win32/winmm/winmm_Uk.rc index fa23cc7b959..eca92ad8d93 100644 --- a/dll/win32/winmm/winmm_Uk.rc +++ b/dll/win32/winmm/winmm_Uk.rc @@ -16,111 +16,114 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/* UTF-8 */ +#pragma code_page(65001) + STRINGTABLE LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT BEGIN /* MMSYS errors */ -MMSYSERR_NOERROR, " ." -MMSYSERR_ERROR, " ." -MMSYSERR_BADDEVICEID, " , ." -MMSYSERR_NOTENABLED, " ." -MMSYSERR_ALLOCATED, " . , , ." -MMSYSERR_INVALHANDLE, " ." -MMSYSERR_NODRIVER, " !\n" -MMSYSERR_NOMEM, " ' . ." -MMSYSERR_NOTSUPPORTED, " . Capabilities, , ." -MMSYSERR_BADERRNUM, " ." -MMSYSERR_INVALFLAG, " ." -MMSYSERR_INVALPARAM, " ." +MMSYSERR_NOERROR, "Указану команду виконано." +MMSYSERR_ERROR, "Невідома зовнішня помилка." +MMSYSERR_BADDEVICEID, "Указано код пристрою, який не використовується в системі." +MMSYSERR_NOTENABLED, "Драйвер не підключений." +MMSYSERR_ALLOCATED, "Указаний пристрій уже використовується. Зачекайте, поки він звільниться, і повторіть спробу." +MMSYSERR_INVALHANDLE, "Указано неправильний дескриптор пристрою." +MMSYSERR_NODRIVER, "У системі немає установлених драйверів !\n" +MMSYSERR_NOMEM, "Недостатньо пам'яті для виконання цього завдання. Закрийте один або декілька додатків і повторіть спробу." +MMSYSERR_NOTSUPPORTED, "Ця функція не підтримується. Скористайтеся функцією Capabilities, щоб одержати список функцій і повідомлень, які підтримує драйвер." +MMSYSERR_BADERRNUM, "Указаний номер помилки не визначений у системі." +MMSYSERR_INVALFLAG, "До системної функції передано неправильний прапор." +MMSYSERR_INVALPARAM, "До системної функції передано неправильний параметр." /* WAVE errors */ -WAVERR_BADFORMAT, " , . Capabilities, , ." -WAVERR_STILLPLAYING, " . ." -WAVERR_UNPREPARED, " . Prepare, , ." -WAVERR_SYNC, " WAVE_ALLOWSYNC. ." +WAVERR_BADFORMAT, "Указаний формат не підтримується, або його неможливо перетворити. Скористайтеся функцією Capabilities, щоб одержати список форматів, які підтримуються." +WAVERR_STILLPLAYING, "Неможливо виконати цю операцію під час відтворення даних із носія. Зупиніть відтворення даних або зачекайте на його закінчення." +WAVERR_UNPREPARED, "Заголовок звукозапису не підготований. Скористайтеся функцією Prepare, щоб підготувати його, і повторіть спробу." +WAVERR_SYNC, "Неможливо відкрити цей пристрій без використання прапорця WAVE_ALLOWSYNC. Установіть цей прапорець і повторіть спробу." /* MIDI errors */ -MIDIERR_UNPREPARED, " MIDI . Prepare, , ." -MIDIERR_STILLPLAYING, " . ." -MIDIERR_NOMAP, " MIDI. , , MIDIMAP.CFG ." -MIDIERR_NOTREADY, " . , , ." -MIDIERR_NODEVICE, " MIDI- , . MIDI Mapper." -MIDIERR_INVALIDSETUP, " MIDI . MIDIMAP.CFG SYSTEM ReactOS ." +MIDIERR_UNPREPARED, "Заголовок MIDI не підготовлений. Скористайтеся функцією Prepare, щоб підготувати його, і повторіть спробу." +MIDIERR_STILLPLAYING, "Неможливо виконати цю операцію під час відтворення даних із носія. Зупиніть відтворення даних або зачекайте на його закінчення." +MIDIERR_NOMAP, "Не знайдено таблиці пристроїв MIDI. Можливо, виникли проблеми з драйвером, або файл MIDIMAP.CFG пошкоджений або відсутній." +MIDIERR_NOTREADY, "Порт передає дані до пристрою. Зачекайте, поки дані не будуть передані, і повторіть спробу." +MIDIERR_NODEVICE, "Поточна настройка відповідності MIDI-пристроїв посилається на пристрій, не установлений у системі. Змініть параметри за допомогою MIDI Mapper." +MIDIERR_INVALIDSETUP, "Поточна настройка MIDI пошкоджена. Скопіюйте вихідний файл MIDIMAP.CFG до підпапки SYSTEM папки ReactOS і повторіть спробу." /* MCI errors */ -MCIERR_INVALID_DEVICE_ID, " MCI. , ." -MCIERR_UNRECOGNIZED_KEYWORD, " ." -MCIERR_UNRECOGNIZED_COMMAND, " ." -MCIERR_HARDWARE, " . , , ." -MCIERR_INVALID_DEVICE_NAME, " MCI." -MCIERR_OUT_OF_MEMORY, " ' . \n ." -MCIERR_DEVICE_OPEN, " ' . ." -MCIERR_CANNOT_LOAD_DRIVER, " ." -MCIERR_MISSING_COMMAND_STRING, " ." -MCIERR_PARAM_OVERFLOW, " . ." -MCIERR_MISSING_STRING_ARGUMENT, " . ." -MCIERR_BAD_INTEGER, " ." -MCIERR_PARSER_INTERNAL, " . , ." -MCIERR_DRIVER_INTERNAL, " . , ." -MCIERR_MISSING_PARAMETER, " . ." -MCIERR_UNSUPPORTED_FUNCTION, " MCI, , ." -MCIERR_FILE_NOT_FOUND, " . , ' ." -MCIERR_DEVICE_NOT_READY, " ." -MCIERR_INTERNAL, " MCI. ReactOS." -MCIERR_DRIVER, " . . ." -MCIERR_CANNOT_USE_ALL, " 'all' () ' ." -MCIERR_MULTIPLE, " . , ." -MCIERR_EXTENSION_NOT_FOUND, " ." -MCIERR_OUTOFRANGE, " ." -MCIERR_FLAGS_NOT_COMPATIBLE, " ." -MCIERR_FILE_NOT_SAVED, " . , , ' ." -MCIERR_DEVICE_TYPE_REQUIRED, " . , , ' ." -MCIERR_DEVICE_LOCKED, " . , ." -MCIERR_DUPLICATE_ALIAS, " . ." -MCIERR_BAD_CONSTANT, " ." -MCIERR_MUST_USE_SHAREABLE, " . , 'shareable' 'open'." -MCIERR_MISSING_DEVICE_NAME, " ' , . ." -MCIERR_BAD_TIME_FORMAT, " . MCI." -MCIERR_NO_CLOSING_QUOTE, " . ." -MCIERR_DUPLICATE_FLAGS, " . ." -MCIERR_INVALID_FILE, " MCI. , , ." -MCIERR_NULL_PARAMETER_BLOCK, " MCI ." -MCIERR_UNNAMED_RESOURCE, " . ' ." -MCIERR_NEW_REQUIRES_ALIAS, " 'new', ." -MCIERR_NOTIFY_ON_AUTO_OPEN, " 'notify' , ." -MCIERR_NO_ELEMENT_ALLOWED, " ' ." -MCIERR_NONAPPLICABLE_FUNCTION, " . ." -MCIERR_ILLEGAL_FOR_AUTO_OPEN, " , . , , ." -MCIERR_FILENAME_REQUIRED, "' . , 8 , ." -MCIERR_EXTRA_CHARACTERS, " , ." -MCIERR_DEVICE_NOT_INSTALLED, " . , ." -MCIERR_GET_CD, " MCI. '." -MCIERR_SET_CD, " MCI, ." -MCIERR_SET_DRIVE, " MCI, ." -MCIERR_DEVICE_LENGTH, " 79 ." -MCIERR_DEVICE_ORD_LENGTH, " 69 ." -MCIERR_NO_INTEGER, " . ." -MCIERR_WAVE_OUTPUTSINUSE, " , , . , , ." -MCIERR_WAVE_SETOUTPUTINUSE, " , . , , ." -MCIERR_WAVE_INPUTSINUSE, " , , . , , ." -MCIERR_WAVE_SETINPUTINUSE, " , . , , ." -MCIERR_WAVE_OUTPUTUNSPECIFIED, " - ." -MCIERR_WAVE_INPUTUNSPECIFIED, " - ." -MCIERR_WAVE_OUTPUTSUNSUITABLE, " , . , ." -MCIERR_WAVE_SETOUTPUTUNSUITABLE,", , ." -MCIERR_WAVE_INPUTSUNSUITABLE, " , . , ." -MCIERR_WAVE_SETINPUTUNSUITABLE, ", , ." -MCIERR_NO_WINDOW, " ." -MCIERR_CREATEWINDOW, " ." -MCIERR_FILE_READ, " . , , ." -MCIERR_FILE_WRITE, " . , ' ." -MCIERR_SEQ_DIV_INCOMPATIBLE, " "" "" SMPTE . ." -MCIERR_SEQ_NOMIDIPRESENT, " MIDI. , MIDI." -MCIERR_SEQ_PORT_INUSE, " MIDI . , , ." -MCIERR_SEQ_PORT_MAPNODEVICE, " MIDI- , . MIDI Mapper ." -MCIERR_SEQ_PORT_MISCERROR, " ." -MCIERR_SEQ_PORT_NONEXISTENT, " MIDI . , MIDI." -MCIERR_SEQ_PORTUNSPECIFIED, " MIDI." -MCIERR_SEQ_TIMER, " . ." +MCIERR_INVALID_DEVICE_ID, "Неправильний код пристрою MCI. Використайте код, який було повернуто після відкриття пристрою." +MCIERR_UNRECOGNIZED_KEYWORD, "Драйвер не може розпізнати вказаний параметр команди." +MCIERR_UNRECOGNIZED_COMMAND, "Драйвер не може розпізнати вказану команду." +MCIERR_HARDWARE, "Виникла проблема з пристроєм мультимедіа. Переконайтеся, що пристрій працює правильно, або зверніться до його виробника." +MCIERR_INVALID_DEVICE_NAME, "Указаний пристрій не відкритий або не розпізнається інтерфейсом MCI." +MCIERR_OUT_OF_MEMORY, "Недостатньо пам'яті для виконання цього завдання. \nЗакрийте один або декілька додатків і повторіть спробу." +MCIERR_DEVICE_OPEN, "Це ім'я пристрою вже використовується додатком як псевдонім. Задайте унікальний псевдонім." +MCIERR_CANNOT_LOAD_DRIVER, "Сталася невідома помилка під час завантаження вказаного драйвера пристрою." +MCIERR_MISSING_COMMAND_STRING, "Не вказана команда." +MCIERR_PARAM_OVERFLOW, "Довжина рядка виводу перевищує розмір буфера. Збільште розмір буфера." +MCIERR_MISSING_STRING_ARGUMENT, "Указана команда потребує текстовий параметр. Укажіть його." +MCIERR_BAD_INTEGER, "Указане ціле число непридатне для цієї команди." +MCIERR_PARSER_INTERNAL, "Драйвер пристрою повернув значення неприпустимого типу. Зверніться до виробника пристрою, щоб отримати новий драйвер." +MCIERR_DRIVER_INTERNAL, "Виникла проблема з драйвером пристрою. Зверніться до виробника пристрою, щоб отримати новий драйвер." +MCIERR_MISSING_PARAMETER, "Указана команда потребує параметр. Укажіть його." +MCIERR_UNSUPPORTED_FUNCTION, "Пристрій MCI, який використовується, не підтримує вказану команду." +MCIERR_FILE_NOT_FOUND, "Неможливо знайти вказаний файл. Перевірте, чи правильно вказані шлях та ім'я файлу." +MCIERR_DEVICE_NOT_READY, "Драйвер пристрою не готовий." +MCIERR_INTERNAL, "Сталася помилка під час ініціалізації MCI. Спробуйте перезапустити ReactOS." +MCIERR_DRIVER, "Виникла проблема із драйвером пристрою. Драйвер був закритий. Неможливо отримати код помилки." +MCIERR_CANNOT_USE_ALL, "Неможливо використовувати параметр 'all' (усі) як ім'я пристрою для вказаної команди." +MCIERR_MULTIPLE, "Сталося декілька помилок на різних пристроях. Щоб визначити джерело помилок, виконайте окремо кожну команду для кожного пристрою." +MCIERR_EXTENSION_NOT_FOUND, "Неможливо визначити тип пристрою за вказаним розширенням імені файлу." +MCIERR_OUTOFRANGE, "Указаний параметр має неприпустиме значення для вказаної команди." +MCIERR_FLAGS_NOT_COMPATIBLE, "Указані параметри неможливо використовувати одночасно." +MCIERR_FILE_NOT_SAVED, "Неможливо зберегти вказаний файл. Переконайтеся, що на диску достатньо вільного місця, або що комп'ютер ще підключений до мережі." +MCIERR_DEVICE_TYPE_REQUIRED, "Неможливо знайти вказаний пристрій. Переконайтеся, що він установлений, або що ім'я пристрою введено правильно." +MCIERR_DEVICE_LOCKED, "Указаний пристрій зараз закривається. Зачекайте декілька секунд, а потім повторіть спробу." +MCIERR_DUPLICATE_ALIAS, "Указаний псевдонім уже використовується в цьому додатку. Задайте унікальний псевдонім." +MCIERR_BAD_CONSTANT, "Указаний параметр неприпустимий для цієї команди." +MCIERR_MUST_USE_SHAREABLE, "Драйвер пристрою вже використовується. Щоб дозволити спільний доступ до драйвера, необхідно використовувати параметр 'shareable' із кожною командою 'open'." +MCIERR_MISSING_DEVICE_NAME, "Для вказаної команди потрібен псевдонім або ім'я файлу, драйвера або пристрою. Укажіть його." +MCIERR_BAD_TIME_FORMAT, "Указано невірне значення для формату часу. Припустимі формати вказані в документації з MCI." +MCIERR_NO_CLOSING_QUOTE, "При вводі значення параметра було пропущено закриваючий знак лапок. Введіть його." +MCIERR_DUPLICATE_FLAGS, "Параметр або значення вказані двічі. Укажіть його лише один раз." +MCIERR_INVALID_FILE, "Указаний файл не може бути відтворений на вибраному пристрої MCI. Можливо, файл пошкоджений, має неприпустимий формат." +MCIERR_NULL_PARAMETER_BLOCK, "До інтерфейсу MCI було передано пустий блок параметрів." +MCIERR_UNNAMED_RESOURCE, "Неможливо зберегти файл без імені. Введіть ім'я файлу." +MCIERR_NEW_REQUIRES_ALIAS, "Якщо використовується параметр 'new', необхідно вказати псевдонім." +MCIERR_NOTIFY_ON_AUTO_OPEN, "Прапор 'notify' неможливо використовувати для пристроїв, які відкриваються автоматично." +MCIERR_NO_ELEMENT_ALLOWED, "Неможливо використовувати ім'я файлу для вказаного пристрою." +MCIERR_NONAPPLICABLE_FUNCTION, "Неможливо виконати команди у вказаній послідовності. Змініть послідовність команд і повторіть спробу." +MCIERR_ILLEGAL_FOR_AUTO_OPEN, "Неможливо виконати вказану команду для пристрою, який відкривається автоматично. Зачекайте, поки пристрій не буде закрито, і повторіть спробу." +MCIERR_FILENAME_REQUIRED, "Ім'я файлу неправильне. Переконайтеся, що довжина імені файлу не перевищує 8 символів, після яких стоїть крапка й розширення." +MCIERR_EXTRA_CHARACTERS, "Неможливо вводити додаткові символи після рядка, забраного в лапки." +MCIERR_DEVICE_NOT_INSTALLED, "Указаний пристрій не установлений у системі. Скористайтесь пунктом Драйвери в Панелі керування, щоб установити пристрій." +MCIERR_GET_CD, "Неможливо отримати доступ до вказаного файлу або пристрою MCI. Спробуйте змінити каталог або перезавантажити комп'ютер." +MCIERR_SET_CD, "Неможливо отримати доступ до вказаного файлу або пристрою MCI, тому що додаток не може змінити папку." +MCIERR_SET_DRIVE, "Неможливо отримати доступ до вказаного файлу або пристрою MCI, тому що додаток не може змінити диск." +MCIERR_DEVICE_LENGTH, "Довжина імені пристрою або драйвера не може перевищувати 79 символів." +MCIERR_DEVICE_ORD_LENGTH, "Довжина імені пристрою або драйвера не може перевищувати 69 символів." +MCIERR_NO_INTEGER, "Указана команда потребує цілий параметр. Введіть його." +MCIERR_WAVE_OUTPUTSINUSE, "Усі пристрої, які можуть відтворювати файли поточного формату, зараз зайняті. Зачекайте, поки пристрій звільниться, і повторіть спробу." +MCIERR_WAVE_SETOUTPUTINUSE, "Неможливо ввімкнути режим відтворення для поточного звукового пристрою, тому що він зайнятий. Зачекайте, поки пристрій не звільниться, і повторіть спробу." +MCIERR_WAVE_INPUTSINUSE, "Усі пристрої, які можуть записувати файли поточного формату, зараз зайняті. Зачекайте, поки пристрій звільниться, і повторіть спробу." +MCIERR_WAVE_SETINPUTINUSE, "Неможливо ввімкнути режим запису для поточного звукового пристрою, тому що він зайнятий. Зачекайте, поки пристрій не звільниться, і повторіть спробу." +MCIERR_WAVE_OUTPUTUNSPECIFIED, "Можна використовувати будь-які сумісні пристрої відтворення звукових файлів." +MCIERR_WAVE_INPUTUNSPECIFIED, "Можна використовувати будь-які сумісні пристрої запису звукових файлів." +MCIERR_WAVE_OUTPUTSUNSUITABLE, "Не установлено жодного пристрою, який може відтворювати файли поточного формату. Скористайтесь пунктом Драйвери, щоб установити звуковий пристрій." +MCIERR_WAVE_SETOUTPUTUNSUITABLE,"Пристрій, на якому ви намагаєтесь відтворити звук, не розпізнає поточного формату файлу." +MCIERR_WAVE_INPUTSUNSUITABLE, "Не установлено жодного пристрою, який може записувати файли поточного формату. Скористайтесь пунктом Драйвери, щоб установити звуковий пристрій." +MCIERR_WAVE_SETINPUTUNSUITABLE, "Пристрій, на якому ви намагаєтеся записати звук, не розпізнає поточного формату файлу." +MCIERR_NO_WINDOW, "Немає вікна перегляду." +MCIERR_CREATEWINDOW, "Неможливо створити або використати вікно." +MCIERR_FILE_READ, "Неможливо прочитати вказаний файл. Переконайтеся, що файл не видалений, і перевірте підключення до диску або мережі." +MCIERR_FILE_WRITE, "Неможливо записати до вказаного файлу. Переконайтеся, що на диску є достатньо вільного простору та що комп'ютер ще підключений до мережі." +MCIERR_SEQ_DIV_INCOMPATIBLE, "Формати часу ""вказівник пісні"" та SMPTE взаємовиключні. Неможливо використовувати їх одночасно." +MCIERR_SEQ_NOMIDIPRESENT, "У системі немає установлених пристроїв MIDI. Скористайтесь пунктом Драйвери в Панелі керування, щоб установити драйвер MIDI." +MCIERR_SEQ_PORT_INUSE, "Указаний порт MIDI уже використовується. Зачекайте, поки він звільниться, і повторіть спробу." +MCIERR_SEQ_PORT_MAPNODEVICE, "Поточна настройка відповідності MIDI-пристроїв посилається на пристрій, не установлений у системі. Скористайтесь пунктом MIDI Mapper в Панелі керування для редагування установок." +MCIERR_SEQ_PORT_MISCERROR, "Сталася помилка із вказаним портом." +MCIERR_SEQ_PORT_NONEXISTENT, "Указаний пристрій MIDI не установлений у системі. Скористайтесь пунктом Драйвери в Панелі керування, щоб установити пристрій MIDI." +MCIERR_SEQ_PORTUNSPECIFIED, "У системі не указаний поточний порт MIDI." +MCIERR_SEQ_TIMER, "Усі таймери мультимедіа використовуються іншими додатками. Закрийте один із цих додатків і повторіть спробу." END diff --git a/dll/win32/winsta/CMakeLists.txt b/dll/win32/winsta/CMakeLists.txt index 2d46896145f..1b6ecef8477 100644 --- a/dll/win32/winsta/CMakeLists.txt +++ b/dll/win32/winsta/CMakeLists.txt @@ -12,12 +12,10 @@ list(APPEND SOURCE winsta.rc ${CMAKE_CURRENT_BINARY_DIR}/winsta.def) -add_library(winsta SHARED - ${CMAKE_CURRENT_BINARY_DIR}/winsta_winsta.h.gch - ${SOURCE}) +add_library(winsta SHARED ${SOURCE}) set_module_type(winsta win32dll) target_link_libraries(winsta wine) add_importlibs(winsta msvcrt kernel32 ntdll) -add_pch(winsta ${CMAKE_CURRENT_SOURCE_DIR}/winsta.h ${SOURCE}) +add_pch(winsta winsta.h) add_cd_file(TARGET winsta DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/wlanapi/CMakeLists.txt b/dll/win32/wlanapi/CMakeLists.txt index eeaa6894daf..777a117079f 100644 --- a/dll/win32/wlanapi/CMakeLists.txt +++ b/dll/win32/wlanapi/CMakeLists.txt @@ -17,7 +17,7 @@ target_link_libraries(wlanapi wine ${PSEH_LIB}) -add_importlibs(wlanapi rpcrt4 kernel32 ntdll) +add_importlibs(wlanapi rpcrt4 msvcrt kernel32 ntdll) add_importlib_target(wlanapi.spec) add_dependencies(wlanapi psdk) diff --git a/dll/win32/ws2_32/CMakeLists.txt b/dll/win32/ws2_32/CMakeLists.txt index a39c061f7d5..b2fdb3f6c63 100644 --- a/dll/win32/ws2_32/CMakeLists.txt +++ b/dll/win32/ws2_32/CMakeLists.txt @@ -23,14 +23,14 @@ list(APPEND SOURCE ws2_32.rc ${CMAKE_CURRENT_BINARY_DIR}/ws2_32.def) -add_library(ws2_32 SHARED ${CMAKE_CURRENT_BINARY_DIR}/ws2_32_ws2_32.h.gch ${SOURCE}) +add_library(ws2_32 SHARED ${SOURCE}) set_module_type(ws2_32 win32dll) target_link_libraries(ws2_32 wine) add_importlibs(ws2_32 user32 advapi32 dnsapi ws2help msvcrt kernel32 ntdll) -add_pch(ws2_32 ${CMAKE_CURRENT_SOURCE_DIR}/include/ws2_32.h ${SOURCE}) +add_pch(ws2_32 include/ws2_32.h) add_cd_file(TARGET ws2_32 DESTINATION reactos/system32 FOR all) add_importlib_target(ws2_32.spec) diff --git a/dll/win32/wsock32/CMakeLists.txt b/dll/win32/wsock32/CMakeLists.txt index 3018af1f173..f6d69c68174 100644 --- a/dll/win32/wsock32/CMakeLists.txt +++ b/dll/win32/wsock32/CMakeLists.txt @@ -2,7 +2,7 @@ set_unicode() spec2def(wsock32.dll wsock32.spec) -add_library(wsock32 SHARED stubs.c wsock32.rc wsock32.def ${CMAKE_CURRENT_BINARY_DIR}/wsock32.def) +add_library(wsock32 SHARED stubs.c wsock32.rc ${CMAKE_CURRENT_BINARY_DIR}/wsock32.def) set_module_type(wsock32 win32dll) diff --git a/drivers/CMakeLists.txt b/drivers/CMakeLists.txt index d0f3c19d2c3..3960ee1e993 100644 --- a/drivers/CMakeLists.txt +++ b/drivers/CMakeLists.txt @@ -14,4 +14,4 @@ add_subdirectory(storage) add_subdirectory(usb) add_subdirectory(video) add_subdirectory(wdm) -add_subdirectory(wmi) \ No newline at end of file +add_subdirectory(wmi) diff --git a/drivers/base/bootvid/CMakeLists.txt b/drivers/base/bootvid/CMakeLists.txt index 3c23c82e2e0..ded06a8e48f 100644 --- a/drivers/base/bootvid/CMakeLists.txt +++ b/drivers/base/bootvid/CMakeLists.txt @@ -16,14 +16,14 @@ list(APPEND SOURCE arm/bootdata.c) endif(ARCH MATCHES i386 OR ARCH MATCHES amd64) -add_library(bootvid SHARED ${CMAKE_CURRENT_BINARY_DIR}/bootvid_precomp.h.gch ${SOURCE}) +add_library(bootvid SHARED ${SOURCE}) set_entrypoint(bootvid 0) set_subsystem(bootvid native) set_image_base(bootvid 0x00010000) add_importlibs(bootvid ntoskrnl hal) -add_pch(bootvid ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(bootvid precomp.h) add_dependencies(bootvid psdk bugcodes) add_cd_file(TARGET bootvid DESTINATION reactos/system32 NO_CAB FOR all) add_importlib_target(bootvid.spec) diff --git a/drivers/base/bootvid/i386/vga.c b/drivers/base/bootvid/i386/vga.c index 1c80994c0e7..3c6d4ad8857 100644 --- a/drivers/base/bootvid/i386/vga.c +++ b/drivers/base/bootvid/i386/vga.c @@ -66,7 +66,7 @@ ULONG lookup[16] = ULONG TextColor = 0xF; ULONG curr_x = 0; ULONG curr_y = 0; -BOOLEAN NextLine = FALSE; +BOOLEAN CarriageReturn = FALSE; ULONG_PTR VgaRegisterBase = 0; ULONG_PTR VgaBase = 0; @@ -280,14 +280,8 @@ VOID NTAPI VgaScroll(ULONG Scroll) { - ULONG Top; - ULONG SourceOffset, DestOffset; - ULONG Offset; - ULONG i, j; - - /* Set memory positions of the scroll */ - SourceOffset = VgaBase + (ScrollRegion[1] * 80) + (ScrollRegion[0] >> 3); - DestOffset = SourceOffset + (Scroll * 80); + ULONG Top, RowSize, i; + PUCHAR OldPosition, NewPosition; /* Clear the 4 planes */ __outpw(0x3C4, 0xF02); @@ -297,50 +291,20 @@ VgaScroll(ULONG Scroll) /* Set Mode 1 */ ReadWriteMode(1); - - /* Save top and check if it's above the bottom */ - Top = ScrollRegion[1]; - if (Top > ScrollRegion[3]) return; + + RowSize = (ScrollRegion[2] - ScrollRegion[0] + 1) / 8; /* Start loop */ - do + for(Top = ScrollRegion[1]; Top <= ScrollRegion[3]; ++Top) { - /* Set number of bytes to loop and start offset */ - Offset = ScrollRegion[0] >> 3; - j = SourceOffset; - - /* Check if this is part of the scroll region */ - if (Offset <= (ScrollRegion[2] >> 3)) - { - /* Update position */ - i = DestOffset - SourceOffset; - - /* Loop the X axis */ - do - { - /* Write value in the new position so that we can do the scroll */ - WRITE_REGISTER_UCHAR(UlongToPtr(j), - READ_REGISTER_UCHAR(UlongToPtr(j + i))); - - /* Move to the next memory location to write to */ - j++; - - /* Move to the next byte in the region */ - Offset++; - - /* Make sure we don't go past the scroll region */ - } while (Offset <= (ScrollRegion[2] >> 3)); - } - - /* Move to the next line */ - SourceOffset += 80; - DestOffset += 80; - - /* Increase top */ - Top++; - - /* Make sure we don't go past the scroll region */ - } while (Top <= ScrollRegion[3]); + /* Calculate the position in memory for the row */ + OldPosition = (PUCHAR)VgaBase + (Top + Scroll) * 80 + ScrollRegion[0] / 8; + NewPosition = (PUCHAR)VgaBase + Top * 80 + ScrollRegion[0] / 8; + + /* Scroll the row */ + for(i = 0; i < RowSize; ++i) + WRITE_REGISTER_UCHAR(NewPosition + i, READ_REGISTER_UCHAR(OldPosition + i)); + } } VOID @@ -739,7 +703,7 @@ VOID NTAPI VidDisplayString(PUCHAR String) { - ULONG TopDelta = 14; + ULONG TopDelta = BOOTCHAR_HEIGHT + 1; /* Start looping the string */ while (*String) @@ -749,38 +713,40 @@ VidDisplayString(PUCHAR String) { /* Modify Y position */ curr_y += TopDelta; - if (curr_y >= ScrollRegion[3]) + if (curr_y + TopDelta >= ScrollRegion[3]) { /* Scroll the view */ VgaScroll(TopDelta); curr_y -= TopDelta; - + } + else + { /* Preserve row */ - PreserveRow(curr_y, TopDelta, TRUE); + PreserveRow(curr_y, TopDelta, FALSE); } /* Update current X */ curr_x = ScrollRegion[0]; - /* Preseve the current row */ - PreserveRow(curr_y, TopDelta, FALSE); + /* Do not clear line if "\r\n" is given */ + CarriageReturn = FALSE; } else if (*String == '\r') { /* Update current X */ curr_x = ScrollRegion[0]; - + /* Check if we're being followed by a new line */ - if (String[1] != '\n') NextLine = TRUE; + CarriageReturn = TRUE; } else { - /* Check if we had a \n\r last time */ - if (NextLine) + /* check if we had a '\r' last time */ + if (CarriageReturn) { - /* We did, preserve the current row */ + /* We did, clear the current row */ PreserveRow(curr_y, TopDelta, TRUE); - NextLine = FALSE; + CarriageReturn = FALSE; } /* Display this character */ @@ -788,18 +754,20 @@ VidDisplayString(PUCHAR String) curr_x += 8; /* Check if we should scroll */ - if (curr_x > ScrollRegion[2]) + if (curr_x + 8 > ScrollRegion[2]) { /* Update Y position and check if we should scroll it */ curr_y += TopDelta; - if (curr_y > ScrollRegion[3]) + if (curr_y + TopDelta > ScrollRegion[3]) { /* Do the scroll */ VgaScroll(TopDelta); curr_y -= TopDelta; - - /* Save the row */ - PreserveRow(curr_y, TopDelta, TRUE); + } + else + { + /* Preserve the current row */ + PreserveRow(curr_y, TopDelta, FALSE); } /* Update X */ diff --git a/drivers/base/kddll/CMakeLists.txt b/drivers/base/kddll/CMakeLists.txt index f46512ce02e..8083793ca03 100644 --- a/drivers/base/kddll/CMakeLists.txt +++ b/drivers/base/kddll/CMakeLists.txt @@ -10,8 +10,7 @@ add_library(kdcom SHARED set_entrypoint(kdcom 0) set_subsystem(kdcom native) set_image_base(kdcom 0x00010000) - add_importlibs(kdcom ntoskrnl hal) - add_dependencies(kdcom psdk bugcodes) add_importlib_target(kdcom.spec) +add_cd_file(TARGET kdcom DESTINATION reactos/system32 NO_CAB FOR all) diff --git a/drivers/base/kddll/kdcom.c b/drivers/base/kddll/kdcom.c index 343bce88004..1903e39d901 100644 --- a/drivers/base/kddll/kdcom.c +++ b/drivers/base/kddll/kdcom.c @@ -9,9 +9,6 @@ #include "kddll.h" #include "kdcom.h" -/* Define wait timeout value. */ -#define REPEAT_COUNT (1000 * 1000) - /* serial debug connection */ #define DEFAULT_DEBUG_PORT 2 /* COM2 */ #define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */ @@ -126,6 +123,10 @@ KdDebuggerInitialize0( /* Check if e have a LoaderBlock */ if (LoaderBlock) { + /* HACK */ + KdpDbgPrint = LoaderBlock->u.I386.CommonDataArea; + KDDBGPRINT("KdDebuggerInitialize0\n"); + /* Get the Command Line */ CommandLine = LoaderBlock->LoadOptions; @@ -248,7 +249,7 @@ KDP_STATUS NTAPI KdpReceiveByte(OUT PBYTE OutByte) { - ULONG Repeats = REPEAT_COUNT; + ULONG Repeats = KdpStallScaleFactor * 100; while (Repeats--) { diff --git a/drivers/base/kddll/kddll.c b/drivers/base/kddll/kddll.c index 43aca1d534a..027306daf85 100644 --- a/drivers/base/kddll/kddll.c +++ b/drivers/base/kddll/kddll.c @@ -6,7 +6,6 @@ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@ewactos.org) */ -//#define KDDEBUG /* uncomment to enable debugging this dll */ #include "kddll.h" /* GLOBALS ********************************************************************/ @@ -14,6 +13,8 @@ PFNDBGPRNT KdpDbgPrint = NULL; ULONG CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID; ULONG RemotePacketId = 0; +BOOLEAN KdpPhase1Complete = FALSE; +ULONG KdpStallScaleFactor = 10000; /* PRIVATE FUNCTIONS **********************************************************/ @@ -88,11 +89,10 @@ NTAPI KdDebuggerInitialize1( IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) { - // HACK: misuse this function to get a pointer to FrLdrDbgPrint - KdpDbgPrint = (PVOID)LoaderBlock; - KDDBGPRINT("KdDebuggerInitialize1\n"); + KdpStallScaleFactor = KeGetPcr()->StallScaleFactor * 100; + KdpPhase1Complete = TRUE; - return STATUS_NOT_IMPLEMENTED; + return STATUS_SUCCESS; } @@ -198,7 +198,7 @@ KdReceivePacket( switch (Packet.PacketType) { case PACKET_TYPE_KD_ACKNOWLEDGE: - /* Are we waiting for an ACK packet? */ + /* Are we waiting for an ACK packet? */ if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE && Packet.PacketId == (CurrentPacketId & ~SYNC_PACKET_ID)) { @@ -276,7 +276,7 @@ KdReceivePacket( if (MessageData) { /* Set the length of the message data */ - MessageData->Length = *DataLength; + MessageData->Length = (USHORT)*DataLength; /* Do we have data? */ if (MessageData->Length) @@ -359,7 +359,7 @@ KdSendPacket( /* Initialize a KD_PACKET */ Packet.PacketLeader = PACKET_LEADER; - Packet.PacketType = PacketType; + Packet.PacketType = (USHORT)PacketType; Packet.ByteCount = MessageHeader->Length; Packet.Checksum = KdpCalculateChecksum(MessageHeader->Buffer, MessageHeader->Length); diff --git a/drivers/base/kddll/kddll.h b/drivers/base/kddll/kddll.h index 50964141b8f..036f8b045ef 100644 --- a/drivers/base/kddll/kddll.h +++ b/drivers/base/kddll/kddll.h @@ -8,6 +8,8 @@ #pragma once +//#define KDDEBUG /* uncomment to enable debugging this dll */ + #define NOEXTAPI #include #define NDEBUG @@ -25,6 +27,8 @@ typedef UCHAR BYTE, *PBYTE; typedef ULONG (*PFNDBGPRNT)(const char *Format, ...); extern PFNDBGPRNT KdpDbgPrint; +extern BOOLEAN KdpPhase1Complete; +extern ULONG KdpStallScaleFactor; typedef enum { diff --git a/drivers/battery/battc/CMakeLists.txt b/drivers/battery/battc/CMakeLists.txt index 2cfea3ab8b0..79accddba83 100644 --- a/drivers/battery/battc/CMakeLists.txt +++ b/drivers/battery/battc/CMakeLists.txt @@ -1,7 +1,7 @@ add_definitions(-D_BATTERYCLASS_) -spec2def(batc.sys battc.spec) +spec2def(battc.sys battc.spec) add_library(battc SHARED battc.c diff --git a/drivers/bus/acpi/cmbatt/CMakeLists.txt b/drivers/bus/acpi/cmbatt/CMakeLists.txt index 461adfeba51..afef8697887 100644 --- a/drivers/bus/acpi/cmbatt/CMakeLists.txt +++ b/drivers/bus/acpi/cmbatt/CMakeLists.txt @@ -6,12 +6,12 @@ list(APPEND SOURCE cmbwmi.c cmbatt.rc) -add_library(cmbatt SHARED ${CMAKE_CURRENT_BINARY_DIR}/cmbatt_cmbatt.h.gch ${SOURCE}) +add_library(cmbatt SHARED ${SOURCE}) set_module_type(cmbatt kernelmodedriver) add_importlibs(cmbatt ntoskrnl hal battc wmilib) -add_pch(cmbatt ${CMAKE_CURRENT_SOURCE_DIR}/cmbatt.h ${SOURCE}) +add_pch(cmbatt cmbatt.h) add_cd_file(TARGET cmbatt DESTINATION reactos/system32/drivers FOR all) \ No newline at end of file diff --git a/drivers/bus/acpi/compbatt/CMakeLists.txt b/drivers/bus/acpi/compbatt/CMakeLists.txt index 00f05b73271..a1a3b7bc7b1 100644 --- a/drivers/bus/acpi/compbatt/CMakeLists.txt +++ b/drivers/bus/acpi/compbatt/CMakeLists.txt @@ -5,11 +5,11 @@ list(APPEND SOURCE comppnp.c compbatt.rc) -add_library(compbatt SHARED ${CMAKE_CURRENT_BINARY_DIR}/compbatt_compbatt.h.gch ${SOURCE}) +add_library(compbatt SHARED ${SOURCE}) set_module_type(compbatt kernelmodedriver) add_importlibs(compbatt ntoskrnl hal battc) -add_pch(compbatt ${CMAKE_CURRENT_SOURCE_DIR}/compbatt.h ${SOURCE}) +add_pch(compbatt compbatt.h) add_cd_file(TARGET compbatt DESTINATION reactos/system32/drivers FOR all) \ No newline at end of file diff --git a/drivers/bus/pci/fdo.c b/drivers/bus/pci/fdo.c index 8a81d7b66cf..5f9ed35f182 100644 --- a/drivers/bus/pci/fdo.c +++ b/drivers/bus/pci/fdo.c @@ -547,10 +547,6 @@ FdoPnpControl( case IRP_MN_QUERY_REMOVE_DEVICE: Status = STATUS_NOT_IMPLEMENTED; break; - - case IRP_MN_QUERY_STOP_DEVICE: - Status = STATUS_NOT_IMPLEMENTED; - break; #endif case IRP_MN_START_DEVICE: DPRINT("IRP_MN_START_DEVICE received\n"); @@ -561,12 +557,17 @@ FdoPnpControl( Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; - case IRP_MN_STOP_DEVICE: - /* Currently not supported */ + + case IRP_MN_QUERY_STOP_DEVICE: + /* We don't support stopping yet */ Status = STATUS_UNSUCCESSFUL; Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; + + case IRP_MN_STOP_DEVICE: + /* We can't fail this one so we fail the QUERY_STOP request that precedes it */ + break; #if 0 case IRP_MN_SURPRISE_REMOVAL: Status = STATUS_NOT_IMPLEMENTED; diff --git a/drivers/bus/pcix/CMakeLists.txt b/drivers/bus/pcix/CMakeLists.txt index a805c580883..af110680f0f 100644 --- a/drivers/bus/pcix/CMakeLists.txt +++ b/drivers/bus/pcix/CMakeLists.txt @@ -36,12 +36,12 @@ list(APPEND SOURCE utils.c pci.rc) -add_library(pcix SHARED ${CMAKE_CURRENT_BINARY_DIR}/pcix_pci.h.gch ${SOURCE}) +add_library(pcix SHARED ${SOURCE}) set_module_type(pcix kernelmodedriver) add_importlibs(pcix ntoskrnl hal) -add_pch(pcix ${CMAKE_CURRENT_SOURCE_DIR}/pci.h ${SOURCE}) +add_pch(pcix pci.h) add_dependencies(pcix pciclass) add_cd_file(TARGET pcix DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/filesystems/cdfs/CMakeLists.txt b/drivers/filesystems/cdfs/CMakeLists.txt index cc0fbc1b2f5..6aad25408bc 100644 --- a/drivers/filesystems/cdfs/CMakeLists.txt +++ b/drivers/filesystems/cdfs/CMakeLists.txt @@ -17,11 +17,11 @@ list(APPEND SOURCE volinfo.c cdfs.rc) -add_library(cdfs SHARED ${CMAKE_CURRENT_BINARY_DIR}/cdfs_cdfs.h.gch ${SOURCE}) +add_library(cdfs SHARED ${SOURCE}) set_module_type(cdfs kernelmodedriver) add_importlibs(cdfs ntoskrnl hal) -add_pch(cdfs ${CMAKE_CURRENT_SOURCE_DIR}/cdfs.h ${SOURCE}) +add_pch(cdfs cdfs.h) add_cd_file(TARGET cdfs DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/filesystems/cdfs/cdfs.h b/drivers/filesystems/cdfs/cdfs.h index 905a34e0c75..47d7d313041 100644 --- a/drivers/filesystems/cdfs/cdfs.h +++ b/drivers/filesystems/cdfs/cdfs.h @@ -143,7 +143,7 @@ typedef struct _CDINFO ULONG RootStart; ULONG RootSize; WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)]; - ULONG VolumeLabelLength; + USHORT VolumeLabelLength; ULONG SerialNumber; } CDINFO, *PCDINFO; diff --git a/drivers/filesystems/cdfs/common.c b/drivers/filesystems/cdfs/common.c index dd47a78a964..4dd9888492e 100644 --- a/drivers/filesystems/cdfs/common.c +++ b/drivers/filesystems/cdfs/common.c @@ -50,6 +50,7 @@ CdfsReadSectors(IN PDEVICE_OBJECT DeviceObject, PIRP Irp; NTSTATUS Status; +again: KeInitializeEvent(&Event, NotificationEvent, FALSE); @@ -102,14 +103,19 @@ CdfsReadSectors(IN PDEVICE_OBJECT DeviceObject, if (Status == STATUS_VERIFY_REQUIRED) { PDEVICE_OBJECT DeviceToVerify; - NTSTATUS NewStatus; DPRINT1("STATUS_VERIFY_REQUIRED\n"); DeviceToVerify = IoGetDeviceToVerify(PsGetCurrentThread()); IoSetDeviceToVerify(PsGetCurrentThread(), NULL); - NewStatus = IoVerifyVolume(DeviceToVerify, FALSE); - DPRINT1("IoVerifyVolume() returned (Status %lx)\n", NewStatus); + Status = IoVerifyVolume(DeviceToVerify, FALSE); + DPRINT1("IoVerifyVolume() returned (Status %lx)\n", Status); + + if (NT_SUCCESS(Status)) + { + DPRINT1("Volume verify succeeded; trying request again\n"); + goto again; + } } DPRINT("CdfsReadSectors() failed (Status %x)\n", Status); @@ -146,6 +152,7 @@ CdfsDeviceIoControl (IN PDEVICE_OBJECT DeviceObject, InputBuffer, InputBufferSize, OutputBuffer, OutputBufferSize, OutputBufferSize ? *OutputBufferSize : 0); +again: KeInitializeEvent (&Event, NotificationEvent, FALSE); DPRINT("Building device I/O control request ...\n"); @@ -191,7 +198,6 @@ CdfsDeviceIoControl (IN PDEVICE_OBJECT DeviceObject, if (Status == STATUS_VERIFY_REQUIRED) { PDEVICE_OBJECT DeviceToVerify; - NTSTATUS NewStatus; DPRINT1("STATUS_VERIFY_REQUIRED\n"); DeviceToVerify = IoGetDeviceToVerify(PsGetCurrentThread()); @@ -199,8 +205,14 @@ CdfsDeviceIoControl (IN PDEVICE_OBJECT DeviceObject, if (DeviceToVerify) { - NewStatus = IoVerifyVolume(DeviceToVerify, FALSE); - DPRINT1("IoVerifyVolume() returned (Status %lx)\n", NewStatus); + Status = IoVerifyVolume(DeviceToVerify, FALSE); + DPRINT1("IoVerifyVolume() returned (Status %lx)\n", Status); + } + + if (NT_SUCCESS(Status)) + { + DPRINT1("Volume verify succeeded; trying request again\n"); + goto again; } } diff --git a/drivers/filesystems/cdfs/create.c b/drivers/filesystems/cdfs/create.c index 2f088622262..d7a6440d820 100644 --- a/drivers/filesystems/cdfs/create.c +++ b/drivers/filesystems/cdfs/create.c @@ -40,7 +40,7 @@ CdfsMakeAbsoluteFilename(PFILE_OBJECT FileObject, PUNICODE_STRING RelativeFileName, PUNICODE_STRING AbsoluteFileName) { - ULONG Length; + USHORT Length; PFCB Fcb; NTSTATUS Status; diff --git a/drivers/filesystems/cdfs/dirctl.c b/drivers/filesystems/cdfs/dirctl.c index 0160c922321..8cf71a2d0dc 100644 --- a/drivers/filesystems/cdfs/dirctl.c +++ b/drivers/filesystems/cdfs/dirctl.c @@ -533,7 +533,7 @@ CdfsGetBothDirectoryInformation(PFCB Fcb, /* Copy short name */ ASSERT(Fcb->ShortNameU.Length / sizeof(WCHAR) <= 12); - Info->ShortNameLength = Fcb->ShortNameU.Length; + Info->ShortNameLength = (CCHAR)Fcb->ShortNameU.Length; RtlCopyMemory(Info->ShortName, Fcb->ShortNameU.Buffer, Fcb->ShortNameU.Length); return(STATUS_SUCCESS); diff --git a/drivers/filesystems/cdfs/finfo.c b/drivers/filesystems/cdfs/finfo.c index 25529f31607..07554c2890d 100644 --- a/drivers/filesystems/cdfs/finfo.c +++ b/drivers/filesystems/cdfs/finfo.c @@ -153,7 +153,7 @@ CdfsGetNameInformation(PFILE_OBJECT FileObject, ASSERT(Fcb != NULL); /* If buffer can't hold at least the file name length, bail out */ - if (*BufferLength < FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0])) + if (*BufferLength < (ULONG)FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0])) return STATUS_BUFFER_OVERFLOW; /* Calculate file name length in bytes */ diff --git a/drivers/filesystems/cdfs/fsctl.c b/drivers/filesystems/cdfs/fsctl.c index c0433db4768..c15e84f6381 100644 --- a/drivers/filesystems/cdfs/fsctl.c +++ b/drivers/filesystems/cdfs/fsctl.c @@ -46,7 +46,7 @@ CdfsGetPVDData(PUCHAR Buffer, PCDINFO CdInfo) { PPVD Pvd; - ULONG i; + USHORT i; PUCHAR pc; PWCHAR pw; @@ -566,6 +566,7 @@ CdfsFileSystemControl(PDEVICE_OBJECT DeviceObject, switch (Stack->MinorFunction) { + case IRP_MN_KERNEL_CALL: case IRP_MN_USER_FS_REQUEST: switch (Stack->Parameters.DeviceIoControl.IoControlCode) { diff --git a/drivers/filesystems/fastfat/CMakeLists.txt b/drivers/filesystems/fastfat/CMakeLists.txt index 5d8dd934611..af6a263e2a0 100644 --- a/drivers/filesystems/fastfat/CMakeLists.txt +++ b/drivers/filesystems/fastfat/CMakeLists.txt @@ -23,11 +23,11 @@ list(APPEND SOURCE volume.c vfatfs.rc) -add_library(fastfat SHARED ${CMAKE_CURRENT_BINARY_DIR}/fastfat_vfat.h.gch ${SOURCE}) +add_library(fastfat SHARED ${SOURCE}) set_module_type(fastfat kernelmodedriver) add_importlibs(fastfat ntoskrnl hal) -add_pch(fastfat ${CMAKE_CURRENT_SOURCE_DIR}/vfat.h ${SOURCE}) +add_pch(fastfat vfat.h) add_cd_file(TARGET fastfat DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/filesystems/fastfat/blockdev.c b/drivers/filesystems/fastfat/blockdev.c index f0ff0598c2e..b3d3a0e39d8 100644 --- a/drivers/filesystems/fastfat/blockdev.c +++ b/drivers/filesystems/fastfat/blockdev.c @@ -38,6 +38,10 @@ VfatReadWritePartialCompletion (IN PDEVICE_OBJECT DeviceObject, { IrpContext->Flags |= IRPCONTEXT_PENDINGRETURNED; } + else + { + IrpContext->Flags &= ~IRPCONTEXT_PENDINGRETURNED; + } if (!NT_SUCCESS(Irp->IoStatus.Status)) { IrpContext->Irp->IoStatus.Status = Irp->IoStatus.Status; @@ -67,6 +71,7 @@ VfatReadDisk (IN PDEVICE_OBJECT pDeviceObject, KEVENT event; NTSTATUS Status; +again: KeInitializeEvent (&event, NotificationEvent, FALSE); DPRINT ("VfatReadDisk(pDeviceObject %p, Offset %I64x, Length %d, Buffer %p)\n", @@ -104,6 +109,25 @@ VfatReadDisk (IN PDEVICE_OBJECT pDeviceObject, Status = IoStatus.Status; } + if (Status == STATUS_VERIFY_REQUIRED) + { + PDEVICE_OBJECT DeviceToVerify; + + DPRINT1 ("Media change detected!\n"); + + /* Find the device to verify and reset the thread field to empty value again. */ + DeviceToVerify = IoGetDeviceToVerify (PsGetCurrentThread ()); + IoSetDeviceToVerify (PsGetCurrentThread (), NULL); + Status = IoVerifyVolume (DeviceToVerify, + FALSE); + + if (NT_SUCCESS(Status)) + { + DPRINT1 ("Volume verification successful; Reissuing read request\n"); + goto again; + } + } + if (!NT_SUCCESS (Status)) { DPRINT ("IO failed!!! VfatReadDisk : Error code: %x\n", Status); @@ -134,6 +158,7 @@ VfatReadDiskPartial (IN PVFAT_IRP_CONTEXT IrpContext, Buffer = (PCHAR)MmGetMdlVirtualAddress(IrpContext->Irp->MdlAddress) + BufferOffset; +again: Irp = IoAllocateIrp(IrpContext->DeviceExt->StorageDevice->StackSize, TRUE); if (Irp == NULL) { @@ -190,6 +215,25 @@ VfatReadDiskPartial (IN PVFAT_IRP_CONTEXT IrpContext, Status = IrpContext->Irp->IoStatus.Status; } + if (Status == STATUS_VERIFY_REQUIRED) + { + PDEVICE_OBJECT DeviceToVerify; + + DPRINT1 ("Media change detected!\n"); + + /* Find the device to verify and reset the thread field to empty value again. */ + DeviceToVerify = IoGetDeviceToVerify (PsGetCurrentThread ()); + IoSetDeviceToVerify (PsGetCurrentThread (), NULL); + Status = IoVerifyVolume (DeviceToVerify, + FALSE); + + if (NT_SUCCESS(Status)) + { + DPRINT1 ("Volume verification successful; Reissuing read request\n"); + goto again; + } + } + DPRINT("%x\n", Status); return Status; } @@ -212,6 +256,7 @@ VfatWriteDiskPartial (IN PVFAT_IRP_CONTEXT IrpContext, Buffer = (PCHAR)MmGetMdlVirtualAddress(IrpContext->Irp->MdlAddress) + BufferOffset; +again: DPRINT ("Building asynchronous FSD Request...\n"); Irp = IoAllocateIrp(IrpContext->DeviceExt->StorageDevice->StackSize, TRUE); if (Irp == NULL) @@ -268,6 +313,25 @@ VfatWriteDiskPartial (IN PVFAT_IRP_CONTEXT IrpContext, Status = IrpContext->Irp->IoStatus.Status; } + if (Status == STATUS_VERIFY_REQUIRED) + { + PDEVICE_OBJECT DeviceToVerify; + + DPRINT1 ("Media change detected!\n"); + + /* Find the device to verify and reset the thread field to empty value again. */ + DeviceToVerify = IoGetDeviceToVerify (PsGetCurrentThread ()); + IoSetDeviceToVerify (PsGetCurrentThread (), NULL); + Status = IoVerifyVolume (DeviceToVerify, + FALSE); + + if (NT_SUCCESS(Status)) + { + DPRINT1 ("Volume verification successful; Reissuing write request\n"); + goto again; + } + } + return Status; } @@ -292,6 +356,7 @@ VfatBlockDeviceIoControl (IN PDEVICE_OBJECT DeviceObject, InputBuffer, InputBufferSize, OutputBuffer, OutputBufferSize, OutputBufferSize ? *OutputBufferSize : 0); +again: KeInitializeEvent (&Event, NotificationEvent, FALSE); DPRINT("Building device I/O control request ...\n"); @@ -328,6 +393,25 @@ VfatBlockDeviceIoControl (IN PDEVICE_OBJECT DeviceObject, Status = IoStatus.Status; } + + if (Status == STATUS_VERIFY_REQUIRED) + { + PDEVICE_OBJECT DeviceToVerify; + + DPRINT1 ("Media change detected!\n"); + + /* Find the device to verify and reset the thread field to empty value again. */ + DeviceToVerify = IoGetDeviceToVerify (PsGetCurrentThread ()); + IoSetDeviceToVerify (PsGetCurrentThread (), NULL); + Status = IoVerifyVolume (DeviceToVerify, + FALSE); + + if (NT_SUCCESS(Status)) + { + DPRINT1 ("Volume verification successful; Reissuing IOCTL request\n"); + goto again; + } + } if (OutputBufferSize) { diff --git a/drivers/filesystems/fastfat/create.c b/drivers/filesystems/fastfat/create.c index 1053413d945..864798a0a7a 100644 --- a/drivers/filesystems/fastfat/create.c +++ b/drivers/filesystems/fastfat/create.c @@ -372,20 +372,6 @@ VfatOpenFile ( 0, FALSE); - if (Status == STATUS_VERIFY_REQUIRED) - - { - PDEVICE_OBJECT DeviceToVerify; - - DPRINT ("Media change detected!\n"); - DPRINT ("Device %p\n", DeviceExt->StorageDevice); - - /* Find the device to verify and reset the thread field to empty value again. */ - DeviceToVerify = IoGetDeviceToVerify (PsGetCurrentThread ()); - IoSetDeviceToVerify (PsGetCurrentThread (), NULL); - Status = IoVerifyVolume (DeviceToVerify, - FALSE); - } if (!NT_SUCCESS(Status)) { DPRINT ("Status %lx\n", Status); diff --git a/drivers/filesystems/fastfat/fat.c b/drivers/filesystems/fastfat/fat.c index 8ff955a4fbd..b9157adf2e4 100644 --- a/drivers/filesystems/fastfat/fat.c +++ b/drivers/filesystems/fastfat/fat.c @@ -66,7 +66,7 @@ FAT16GetNextCluster(PDEVICE_EXTENSION DeviceExt, ChunkSize = CACHEPAGESIZE(DeviceExt); FATOffset = CurrentCluster * 2; Offset.QuadPart = ROUND_DOWN(FATOffset, ChunkSize); - if(!CcMapData(DeviceExt->FATFileObject, &Offset, ChunkSize, 1, &Context, &BaseAddress)) + if(!CcMapData(DeviceExt->FATFileObject, &Offset, ChunkSize, MAP_WAIT, &Context, &BaseAddress)) { return STATUS_UNSUCCESSFUL; } diff --git a/drivers/filesystems/fastfat/finfo.c b/drivers/filesystems/fastfat/finfo.c index cdadc87e4fa..61be39acbad 100644 --- a/drivers/filesystems/fastfat/finfo.c +++ b/drivers/filesystems/fastfat/finfo.c @@ -379,7 +379,7 @@ VfatGetNameInformation(PFILE_OBJECT FileObject, ASSERT(FCB != NULL); /* If buffer can't hold at least the file name length, bail out */ - if (*BufferLength < FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0])) + if (*BufferLength < (ULONG)FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0])) return STATUS_BUFFER_OVERFLOW; /* Save file name length, and as much file len, as buffer length allows */ diff --git a/drivers/filesystems/fastfat/fsctl.c b/drivers/filesystems/fastfat/fsctl.c index c6ec3044a62..6760ebfcbd9 100644 --- a/drivers/filesystems/fastfat/fsctl.c +++ b/drivers/filesystems/fastfat/fsctl.c @@ -841,6 +841,7 @@ NTSTATUS VfatFileSystemControl(PVFAT_IRP_CONTEXT IrpContext) switch (IrpContext->MinorFunction) { + case IRP_MN_KERNEL_CALL: case IRP_MN_USER_FS_REQUEST: switch(IrpContext->Stack->Parameters.DeviceIoControl.IoControlCode) { diff --git a/drivers/filesystems/fastfat/rw.c b/drivers/filesystems/fastfat/rw.c index bbcae945c83..5dd906b672a 100644 --- a/drivers/filesystems/fastfat/rw.c +++ b/drivers/filesystems/fastfat/rw.c @@ -537,7 +537,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext) PERESOURCE Resource = NULL; LARGE_INTEGER ByteOffset; PVOID Buffer; - PDEVICE_OBJECT DeviceToVerify; ULONG BytesPerSector; ASSERT(IrpContext); @@ -697,22 +696,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext) } Status = VfatReadFileData(IrpContext, Length, ByteOffset, &ReturnedLength); -/**/ - if (Status == STATUS_VERIFY_REQUIRED) - { - DPRINT("VfatReadFile returned STATUS_VERIFY_REQUIRED\n"); - DeviceToVerify = IoGetDeviceToVerify(PsGetCurrentThread()); - IoSetDeviceToVerify(PsGetCurrentThread(), DeviceToVerify); - Status = IoVerifyVolume (DeviceToVerify, FALSE); - - if (NT_SUCCESS(Status)) - { - Status = VfatReadFileData(IrpContext, Length, - ByteOffset, &ReturnedLength); - } - - } -/**/ if (NT_SUCCESS(Status)) { IrpContext->Irp->IoStatus.Information = ReturnedLength; diff --git a/drivers/filesystems/fastfat_new/CMakeLists.txt b/drivers/filesystems/fastfat_new/CMakeLists.txt index 57042c98d41..e25e5c853cc 100644 --- a/drivers/filesystems/fastfat_new/CMakeLists.txt +++ b/drivers/filesystems/fastfat_new/CMakeLists.txt @@ -24,7 +24,7 @@ list(APPEND SOURCE volume.c fastfat.rc) -add_library(fastfat_new SHARED ${CMAKE_CURRENT_BINARY_DIR}/fastfat_new_fastfat.h.gch ${SOURCE}) +add_library(fastfat_new SHARED ${SOURCE}) set_module_type(fastfat_new kernelmodedriver) @@ -34,4 +34,4 @@ target_link_libraries(fastfat_new add_importlibs(fastfat_new ntoskrnl hal) -add_pch(fastfat_new ${CMAKE_CURRENT_SOURCE_DIR}/fastfat.h ${SOURCE}) +add_pch(fastfat_new fastfat.h) diff --git a/drivers/filesystems/fastfat_new/fsctl.c b/drivers/filesystems/fastfat_new/fsctl.c index 540b417b8d8..fef6b239239 100644 --- a/drivers/filesystems/fastfat_new/fsctl.c +++ b/drivers/filesystems/fastfat_new/fsctl.c @@ -453,6 +453,7 @@ FatiFileSystemControl(PFAT_IRP_CONTEXT IrpContext, PIRP Irp) /* Dispatch depending on the minor function */ switch (IrpSp->MinorFunction) { + case IRP_MN_KERNEL_CALL: case IRP_MN_USER_FS_REQUEST: Status = FatUserFsCtrl(IrpContext, Irp); break; diff --git a/drivers/filesystems/msfs/CMakeLists.txt b/drivers/filesystems/msfs/CMakeLists.txt index ddf2bf5b112..62f79d5f55b 100644 --- a/drivers/filesystems/msfs/CMakeLists.txt +++ b/drivers/filesystems/msfs/CMakeLists.txt @@ -7,11 +7,11 @@ list(APPEND SOURCE rw.c msfs.rc) -add_library(msfs SHARED ${CMAKE_CURRENT_BINARY_DIR}/msfs_msfs.h.gch ${SOURCE}) +add_library(msfs SHARED ${SOURCE}) set_module_type(msfs kernelmodedriver) add_importlibs(msfs ntoskrnl hal) -add_pch(msfs ${CMAKE_CURRENT_SOURCE_DIR}/msfs.h ${SOURCE}) +add_pch(msfs msfs.h) add_cd_file(TARGET msfs DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/filesystems/npfs/CMakeLists.txt b/drivers/filesystems/npfs/CMakeLists.txt index 8f960fc81f7..b1d4c044782 100644 --- a/drivers/filesystems/npfs/CMakeLists.txt +++ b/drivers/filesystems/npfs/CMakeLists.txt @@ -9,11 +9,11 @@ list(APPEND SOURCE volume.c npfs.rc) -add_library(npfs SHARED ${CMAKE_CURRENT_BINARY_DIR}/npfs_npfs.h.gch ${SOURCE}) +add_library(npfs SHARED ${SOURCE}) target_link_libraries(npfs ${PSEH_LIB}) set_module_type(npfs kernelmodedriver) add_importlibs(npfs ntoskrnl hal) -add_pch(npfs ${CMAKE_CURRENT_SOURCE_DIR}/npfs.h ${SOURCE}) +add_pch(npfs npfs.h) add_cd_file(TARGET npfs DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/filesystems/npfs/create.c b/drivers/filesystems/npfs/create.c index 5a53f556300..42bcacc07c8 100644 --- a/drivers/filesystems/npfs/create.c +++ b/drivers/filesystems/npfs/create.c @@ -17,6 +17,76 @@ /* FUNCTIONS *****************************************************************/ +static +VOID +NpfsDeleteFcb(PNPFS_FCB Fcb) +{ + PNPFS_VCB Vcb = Fcb->Vcb; + + KeLockMutex(&Vcb->PipeListLock); + RemoveEntryList(&Fcb->PipeListEntry); + KeUnlockMutex(&Vcb->PipeListLock); + RtlFreeUnicodeString(&Fcb->PipeName); + ExFreePoolWithTag(Fcb, TAG_NPFS_FCB); +} + +static +PNPFS_CCB +NpfsAllocateCcb(CCB_TYPE Type, PNPFS_FCB Fcb) +{ + PNPFS_CCB Ccb; + + Ccb = ExAllocatePoolWithTag(NonPagedPool, sizeof(NPFS_CCB), TAG_NPFS_CCB); + if (!Ccb) + { + return NULL; + } + + RtlZeroMemory(Ccb, sizeof(NPFS_CCB)); + + Ccb->RefCount = 1; + Ccb->Type = Type; + Ccb->Fcb = Fcb; + Ccb->OtherSide = NULL; + + return Ccb; +} + +static +VOID +NpfsReferenceCcb(PNPFS_CCB Ccb) +{ + ASSERT(Ccb->RefCount > 0); + InterlockedIncrement((PLONG)&Ccb->RefCount); +} + +static +VOID +NpfsDereferenceCcb(PNPFS_CCB Ccb) +{ + /* Decrement reference count */ + ASSERT(Ccb->RefCount > 0); + if (InterlockedDecrement((PLONG)&Ccb->RefCount) == 0) + { + /* Its zero, delete CCB */ + ExFreePoolWithTag(Ccb, TAG_NPFS_CCB); + } +} + +static +VOID +NpfsCcbSetOtherSide(PNPFS_CCB Ccb, PNPFS_CCB OtherSide) +{ + /* Dereference old other side */ + if (Ccb->OtherSide) NpfsDereferenceCcb(Ccb->OtherSide); + + /* Reference the new other side */ + if (OtherSide) NpfsReferenceCcb(OtherSide); + + /* Set new value */ + Ccb->OtherSide = OtherSide; +} + PNPFS_FCB NpfsFindPipe(PNPFS_VCB Vcb, PUNICODE_STRING PipeName) @@ -114,18 +184,13 @@ NpfsOpenFileSystem(PNPFS_FCB Fcb, DPRINT("NpfsOpenFileSystem()\n"); - Ccb = ExAllocatePool(NonPagedPool, sizeof(NPFS_CCB)); + Ccb = NpfsAllocateCcb(CCB_DEVICE, Fcb); if (Ccb == NULL) { IoStatus->Status = STATUS_NO_MEMORY; return; } - RtlZeroMemory(Ccb, sizeof(NPFS_CCB)); - - Ccb->Type = CCB_DEVICE; - Ccb->Fcb = Fcb; - FileObject->FsContext = Fcb; FileObject->FsContext2 = Ccb; @@ -145,18 +210,13 @@ NpfsOpenRootDirectory(PNPFS_FCB Fcb, DPRINT("NpfsOpenRootDirectory()\n"); - Ccb = ExAllocatePool(NonPagedPool, sizeof(NPFS_CCB)); + Ccb = NpfsAllocateCcb(CCB_DIRECTORY, Fcb); if (Ccb == NULL) { IoStatus->Status = STATUS_NO_MEMORY; return; } - RtlZeroMemory(Ccb, sizeof(NPFS_CCB)); - - Ccb->Type = CCB_DIRECTORY; - Ccb->Fcb = Fcb; - FileObject->FsContext = Fcb; FileObject->FsContext2 = Ccb; @@ -244,8 +304,7 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject, * Step 1. Find the pipe we're trying to open. */ KeLockMutex(&Vcb->PipeListLock); - Fcb = NpfsFindPipe(Vcb, - &FileObject->FileName); + Fcb = NpfsFindPipe(Vcb, &FileObject->FileName); if (Fcb == NULL) { /* Not found, bail out with error. */ @@ -267,7 +326,7 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject, /* * Step 2. Create the client CCB. */ - ClientCcb = ExAllocatePool(NonPagedPool, sizeof(NPFS_CCB)); + ClientCcb = NpfsAllocateCcb(CCB_PIPE, Fcb); if (ClientCcb == NULL) { DPRINT("No memory!\n"); @@ -277,11 +336,8 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject, return STATUS_NO_MEMORY; } - ClientCcb->Type = CCB_PIPE; ClientCcb->Thread = (struct ETHREAD *)Irp->Tail.Overlay.Thread; - ClientCcb->Fcb = Fcb; ClientCcb->PipeEnd = FILE_PIPE_CLIENT_END; - ClientCcb->OtherSide = NULL; #ifndef USING_PROPER_NPFS_WAIT_SEMANTICS ClientCcb->PipeState = SpecialAccess ? 0 : FILE_PIPE_DISCONNECTED_STATE; #else @@ -294,11 +350,13 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject, /* Initialize data list. */ if (Fcb->OutboundQuota) { - ClientCcb->Data = ExAllocatePool(PagedPool, Fcb->OutboundQuota); + ClientCcb->Data = ExAllocatePoolWithTag(PagedPool, + Fcb->OutboundQuota, + TAG_NPFS_CCB_DATA); if (ClientCcb->Data == NULL) { DPRINT("No memory!\n"); - ExFreePool(ClientCcb); + NpfsDereferenceCcb(ClientCcb); KeUnlockMutex(&Fcb->CcbListLock); Irp->IoStatus.Status = STATUS_NO_MEMORY; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -367,10 +425,10 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject, DPRINT("No listening server CCB found!\n"); if (ClientCcb->Data) { - ExFreePool(ClientCcb->Data); + ExFreePoolWithTag(ClientCcb->Data, TAG_NPFS_CCB_DATA); } - ExFreePool(ClientCcb); + NpfsDereferenceCcb(ClientCcb); KeUnlockMutex(&Fcb->CcbListLock); Irp->IoStatus.Status = STATUS_OBJECT_PATH_NOT_FOUND; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -391,10 +449,10 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject, if (ClientCcb->Data) { - ExFreePool(ClientCcb->Data); + ExFreePoolWithTag(ClientCcb->Data, TAG_NPFS_CCB_DATA); } - ExFreePool(ClientCcb); + NpfsDereferenceCcb(ClientCcb); KeUnlockMutex(&Fcb->CcbListLock); Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; @@ -413,8 +471,8 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject, /* Connect to listening server side */ if (ServerCcb) { - ClientCcb->OtherSide = ServerCcb; - ServerCcb->OtherSide = ClientCcb; + NpfsCcbSetOtherSide(ClientCcb, ServerCcb); + NpfsCcbSetOtherSide(ServerCcb, ClientCcb); ClientCcb->PipeState = FILE_PIPE_CONNECTED_STATE; ServerCcb->PipeState = FILE_PIPE_CONNECTED_STATE; KeSetEvent(&ServerCcb->ConnectEvent, IO_NO_INCREMENT, FALSE); @@ -467,23 +525,12 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject, return STATUS_INVALID_PARAMETER; } - Ccb = ExAllocatePool(NonPagedPool, sizeof(NPFS_CCB)); - if (Ccb == NULL) - { - Irp->IoStatus.Status = STATUS_NO_MEMORY; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_NO_MEMORY; - } - - Ccb->Type = CCB_PIPE; - Ccb->Thread = (struct ETHREAD *)Irp->Tail.Overlay.Thread; KeLockMutex(&Vcb->PipeListLock); /* * First search for existing Pipe with the same name. */ - Fcb = NpfsFindPipe(Vcb, - &FileObject->FileName); + Fcb = NpfsFindPipe(Vcb, &FileObject->FileName); if (Fcb != NULL) { /* @@ -495,7 +542,6 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject, if (Fcb->CurrentInstances >= Fcb->MaximumInstances) { DPRINT("Out of instances.\n"); - ExFreePool(Ccb); Irp->IoStatus.Status = STATUS_INSTANCE_NOT_AVAILABLE; IoCompleteRequest(Irp, IO_NO_INCREMENT); return STATUS_INSTANCE_NOT_AVAILABLE; @@ -506,7 +552,6 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject, Fcb->PipeType != Buffer->NamedPipeType) { DPRINT("Asked for invalid pipe mode.\n"); - ExFreePool(Ccb); Irp->IoStatus.Status = STATUS_ACCESS_DENIED; IoCompleteRequest(Irp, IO_NO_INCREMENT); return STATUS_ACCESS_DENIED; @@ -515,11 +560,10 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject, else { NewPipe = TRUE; - Fcb = ExAllocatePool(NonPagedPool, sizeof(NPFS_FCB)); + Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(NPFS_FCB), TAG_NPFS_FCB); if (Fcb == NULL) { KeUnlockMutex(&Vcb->PipeListLock); - ExFreePool(Ccb); Irp->IoStatus.Status = STATUS_NO_MEMORY; Irp->IoStatus.Information = 0; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -530,12 +574,13 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject, Fcb->Vcb = Vcb; Fcb->PipeName.Length = FileObject->FileName.Length; Fcb->PipeName.MaximumLength = Fcb->PipeName.Length + sizeof(UNICODE_NULL); - Fcb->PipeName.Buffer = ExAllocatePool(NonPagedPool, Fcb->PipeName.MaximumLength); + Fcb->PipeName.Buffer = ExAllocatePoolWithTag(NonPagedPool, + Fcb->PipeName.MaximumLength, + TAG_NPFS_NAMEBLOCK); if (Fcb->PipeName.Buffer == NULL) { KeUnlockMutex(&Vcb->PipeListLock); - ExFreePool(Fcb); - ExFreePool(Ccb); + ExFreePoolWithTag(Fcb, TAG_NPFS_FCB); Irp->IoStatus.Status = STATUS_NO_MEMORY; Irp->IoStatus.Information = 0; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -623,20 +668,33 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject, KeUnlockMutex(&Vcb->PipeListLock); } + Ccb = NpfsAllocateCcb(CCB_PIPE, Fcb); + if (Ccb == NULL) + { + if (NewPipe) + { + NpfsDeleteFcb(Fcb); + } + + Irp->IoStatus.Status = STATUS_NO_MEMORY; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NO_MEMORY; + } + + Ccb->Thread = (struct ETHREAD *)Irp->Tail.Overlay.Thread; + if (Fcb->InboundQuota) { - Ccb->Data = ExAllocatePool(PagedPool, Fcb->InboundQuota); + Ccb->Data = ExAllocatePoolWithTag(PagedPool, + Fcb->InboundQuota, + TAG_NPFS_CCB_DATA); if (Ccb->Data == NULL) { - ExFreePool(Ccb); + NpfsDereferenceCcb(Ccb); if (NewPipe) { - KeLockMutex(&Vcb->PipeListLock); - RemoveEntryList(&Fcb->PipeListEntry); - KeUnlockMutex(&Vcb->PipeListLock); - RtlFreeUnicodeString(&Fcb->PipeName); - ExFreePool(Fcb); + NpfsDeleteFcb(Fcb); } Irp->IoStatus.Status = STATUS_NO_MEMORY; @@ -662,7 +720,6 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject, Ccb->Fcb = Fcb; Ccb->PipeEnd = FILE_PIPE_SERVER_END; Ccb->PipeState = FILE_PIPE_LISTENING_STATE; - Ccb->OtherSide = NULL; DPRINT("CCB: %p\n", Ccb); @@ -753,6 +810,8 @@ NpfsCleanup(PDEVICE_OBJECT DeviceObject, if ((Ccb->PipeState == FILE_PIPE_CONNECTED_STATE) && (Ccb->OtherSide)) { OtherSide = Ccb->OtherSide; + ASSERT(OtherSide->OtherSide == Ccb); + /* Lock the server first */ if (Server) { @@ -764,7 +823,11 @@ NpfsCleanup(PDEVICE_OBJECT DeviceObject, ExAcquireFastMutex(&OtherSide->DataListLock); ExAcquireFastMutex(&Ccb->DataListLock); } - OtherSide->OtherSide = NULL; + + /* Unlink FCBs */ + NpfsCcbSetOtherSide(OtherSide, NULL); + NpfsCcbSetOtherSide(Ccb, NULL); + /* * Signaling the write event. If is possible that an other * thread waits for an empty buffer. @@ -824,7 +887,7 @@ NpfsCleanup(PDEVICE_OBJECT DeviceObject, ExAcquireFastMutex(&Ccb->DataListLock); if (Ccb->Data) { - ExFreePool(Ccb->Data); + ExFreePoolWithTag(Ccb->Data, TAG_NPFS_CCB_DATA); Ccb->Data = NULL; Ccb->ReadPtr = NULL; Ccb->WritePtr = NULL; @@ -871,7 +934,7 @@ NpfsClose(PDEVICE_OBJECT DeviceObject, { DPRINT("Closing the file system!\n"); - ExFreePool(Ccb); + NpfsDereferenceCcb(Ccb); FileObject->FsContext = NULL; FileObject->FsContext2 = NULL; @@ -886,9 +949,10 @@ NpfsClose(PDEVICE_OBJECT DeviceObject, DPRINT("Closing the root directory!\n"); if (Ccb->u.Directory.SearchPattern.Buffer != NULL) - ExFreePool(Ccb->u.Directory.SearchPattern.Buffer); + ExFreePoolWithTag(Ccb->u.Directory.SearchPattern.Buffer, + TAG_NPFS_NAMEBLOCK); - ExFreePool(Ccb); + NpfsDereferenceCcb(Ccb); FileObject->FsContext = NULL; FileObject->FsContext2 = NULL; @@ -920,8 +984,9 @@ NpfsClose(PDEVICE_OBJECT DeviceObject, /* Disconnect the pipes */ if (Ccb->OtherSide) { - Ccb->OtherSide->OtherSide = NULL; - Ccb->OtherSide = NULL; + ASSERT(Ccb->OtherSide->OtherSide == Ccb); + NpfsCcbSetOtherSide(Ccb->OtherSide, NULL); + NpfsCcbSetOtherSide(Ccb, NULL); } ASSERT(Ccb->PipeState == FILE_PIPE_CLOSING_STATE); @@ -930,18 +995,14 @@ NpfsClose(PDEVICE_OBJECT DeviceObject, RemoveEntryList(&Ccb->CcbListEntry); - ExFreePool(Ccb); + NpfsDereferenceCcb(Ccb); KeUnlockMutex(&Fcb->CcbListLock); if (IsListEmpty(&Fcb->ServerCcbListHead) && IsListEmpty(&Fcb->ClientCcbListHead)) { - KeLockMutex(&Vcb->PipeListLock); - RemoveEntryList(&Fcb->PipeListEntry); - KeUnlockMutex(&Vcb->PipeListLock); - RtlFreeUnicodeString(&Fcb->PipeName); - ExFreePool(Fcb); + NpfsDeleteFcb(Fcb); FileObject->FsContext = NULL; } diff --git a/drivers/filesystems/npfs/dirctl.c b/drivers/filesystems/npfs/dirctl.c index ef7b1317774..87053e8aeb7 100644 --- a/drivers/filesystems/npfs/dirctl.c +++ b/drivers/filesystems/npfs/dirctl.c @@ -21,7 +21,7 @@ NpfsQueryDirectory(PNPFS_CCB Ccb, PULONG Size) { PIO_STACK_LOCATION Stack; - LONG BufferLength = 0; + ULONG BufferLength = 0; PUNICODE_STRING SearchPattern = NULL; FILE_INFORMATION_CLASS FileInformationClass; ULONG FileIndex = 0; @@ -71,7 +71,9 @@ NpfsQueryDirectory(PNPFS_CCB Ccb, if (SearchPattern != NULL) { Ccb->u.Directory.SearchPattern.Buffer = - ExAllocatePool(NonPagedPool, SearchPattern->Length + sizeof(WCHAR)); + ExAllocatePoolWithTag(NonPagedPool, + SearchPattern->Length + sizeof(WCHAR), + TAG_NPFS_NAMEBLOCK); if (Ccb->u.Directory.SearchPattern.Buffer == NULL) { return STATUS_INSUFFICIENT_RESOURCES; @@ -87,7 +89,9 @@ NpfsQueryDirectory(PNPFS_CCB Ccb, else { Ccb->u.Directory.SearchPattern.Buffer = - ExAllocatePool(NonPagedPool, 2 * sizeof(WCHAR)); + ExAllocatePoolWithTag(NonPagedPool, + 2 * sizeof(WCHAR), + TAG_NPFS_NAMEBLOCK); if (Ccb->u.Directory.SearchPattern.Buffer == NULL) { return STATUS_INSUFFICIENT_RESOURCES; diff --git a/drivers/filesystems/npfs/fsctrl.c b/drivers/filesystems/npfs/fsctrl.c index 4a325c28908..5e723b4db6b 100644 --- a/drivers/filesystems/npfs/fsctrl.c +++ b/drivers/filesystems/npfs/fsctrl.c @@ -441,7 +441,9 @@ NpfsWaitPipe2(PIRP Irp, /* Calculate the pipe name length and allocate the buffer */ PipeName.Length = WaitPipe->NameLength + sizeof(WCHAR); PipeName.MaximumLength = PipeName.Length + sizeof(WCHAR); - PipeName.Buffer = ExAllocatePool(NonPagedPool, PipeName.MaximumLength); + PipeName.Buffer = ExAllocatePoolWithTag(NonPagedPool, + PipeName.MaximumLength, + TAG_NPFS_NAMEBLOCK); if (PipeName.Buffer == NULL) { DPRINT1("Could not allocate memory for the pipe name!\n"); @@ -471,7 +473,7 @@ NpfsWaitPipe2(PIRP Irp, KeUnlockMutex(&Vcb->PipeListLock); /* Release the pipe name buffer */ - ExFreePool(PipeName.Buffer); + ExFreePoolWithTag(PipeName.Buffer, TAG_NPFS_NAMEBLOCK); /* Fail if not pipe was found */ if (Fcb == NULL) diff --git a/drivers/filesystems/npfs/npfs.c b/drivers/filesystems/npfs/npfs.c index dfe4ed9e4b1..58b0ffcee3b 100644 --- a/drivers/filesystems/npfs/npfs.c +++ b/drivers/filesystems/npfs/npfs.c @@ -86,13 +86,13 @@ DriverEntry(PDRIVER_OBJECT DriverObject, Vcb->MaxQuota = 64 * PAGE_SIZE; /* Create the device FCB */ - Fcb = ExAllocatePool(NonPagedPool, sizeof(NPFS_FCB)); + Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(NPFS_FCB), TAG_NPFS_FCB); Fcb->Type = FCB_DEVICE; Fcb->Vcb = Vcb; Vcb->DeviceFcb = Fcb; /* Create the root directory FCB */ - Fcb = ExAllocatePool(NonPagedPool, sizeof(NPFS_FCB)); + Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(NPFS_FCB), TAG_NPFS_FCB); Fcb->Type = FCB_DIRECTORY; Fcb->Vcb = Vcb; Vcb->RootFcb = Fcb; diff --git a/drivers/filesystems/npfs/npfs.h b/drivers/filesystems/npfs/npfs.h index b5435859641..5f8fabb8348 100644 --- a/drivers/filesystems/npfs/npfs.h +++ b/drivers/filesystems/npfs/npfs.h @@ -5,6 +5,12 @@ #include #include +#define TAG_NPFS_CCB 'cFpN' +#define TAG_NPFS_CCB_DATA 'iFpN' /* correct? */ +#define TAG_NPFS_FCB 'FFpN' +#define TAG_NPFS_NAMEBLOCK 'nFpN' +#define TAG_NPFS_THREAD_CONTEXT 'tFpN' + #define ROUND_DOWN(n, align) \ (((ULONG)n) & ~((align) - 1l)) @@ -87,6 +93,7 @@ typedef struct _NPFS_CCB ULONG PipeState; ULONG ReadDataAvailable; ULONG WriteQuotaAvailable; + ULONG RefCount; LIST_ENTRY ReadRequestListHead; diff --git a/drivers/filesystems/npfs/rw.c b/drivers/filesystems/npfs/rw.c index ea3449adb70..e8547f52a64 100644 --- a/drivers/filesystems/npfs/rw.c +++ b/drivers/filesystems/npfs/rw.c @@ -21,7 +21,7 @@ VOID HexDump(PUCHAR Buffer, ULONG Length) CHAR Line[65]; UCHAR ch; const char Hex[] = "0123456789ABCDEF"; - int i, j; + ULONG i, j; DbgPrint("---------------\n"); @@ -194,12 +194,11 @@ NpfsWaiterThread(PVOID InitContext) { /* it exist an other thread with empty wait slots, we can remove our thread from the list */ RemoveEntryList(&ThreadContext->ListEntry); - ThreadContext->Vcb->EmptyWaiterCount -= MAXIMUM_WAIT_OBJECTS - 1; + ExFreePoolWithTag(ThreadContext, TAG_NPFS_THREAD_CONTEXT); KeUnlockMutex(&ThreadContext->Vcb->PipeListLock); break; } } - ExFreePool(ThreadContext); } static NTSTATUS @@ -234,7 +233,9 @@ NpfsAddWaitingReadWriteRequest(IN PDEVICE_OBJECT DeviceObject, if (ListEntry == &Vcb->ThreadListHead) { - ThreadContext = ExAllocatePool(NonPagedPool, sizeof(NPFS_THREAD_CONTEXT)); + ThreadContext = ExAllocatePoolWithTag(NonPagedPool, + sizeof(NPFS_THREAD_CONTEXT), + TAG_NPFS_THREAD_CONTEXT); if (ThreadContext == NULL) { KeUnlockMutex(&Vcb->PipeListLock); @@ -257,7 +258,7 @@ NpfsAddWaitingReadWriteRequest(IN PDEVICE_OBJECT DeviceObject, (PVOID)ThreadContext); if (!NT_SUCCESS(Status)) { - ExFreePool(ThreadContext); + ExFreePoolWithTag(ThreadContext, TAG_NPFS_THREAD_CONTEXT); KeUnlockMutex(&Vcb->PipeListLock); return Status; } @@ -638,7 +639,7 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject, Buffer = (PVOID)((ULONG_PTR)Buffer + CopyLength); Length -= CopyLength; } - else + else { KeResetEvent(&Ccb->ReadEvent); diff --git a/drivers/filesystems/ntfs/CMakeLists.txt b/drivers/filesystems/ntfs/CMakeLists.txt index bef4973c8d9..172436e3bd8 100644 --- a/drivers/filesystems/ntfs/CMakeLists.txt +++ b/drivers/filesystems/ntfs/CMakeLists.txt @@ -17,11 +17,11 @@ list(APPEND SOURCE volinfo.c ntfs.rc) -add_library(ntfs SHARED ${CMAKE_CURRENT_BINARY_DIR}/ntfs_ntfs.h.gch ${SOURCE}) +add_library(ntfs SHARED ${SOURCE}) set_module_type(ntfs kernelmodedriver) add_importlibs(ntfs ntoskrnl hal) -add_pch(ntfs ${CMAKE_CURRENT_SOURCE_DIR}/ntfs.h ${SOURCE}) +add_pch(ntfs ntfs.h) add_cd_file(TARGET ntfs DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/filesystems/ntfs/fsctl.c b/drivers/filesystems/ntfs/fsctl.c index 0095ec1612c..ce63429d4df 100644 --- a/drivers/filesystems/ntfs/fsctl.c +++ b/drivers/filesystems/ntfs/fsctl.c @@ -483,8 +483,9 @@ NtfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject, switch (Stack->MinorFunction) { + case IRP_MN_KERNEL_CALL: case IRP_MN_USER_FS_REQUEST: - DPRINT("NTFS: IRP_MN_USER_FS_REQUEST\n"); + DPRINT("NTFS: IRP_MN_USER_FS_REQUEST/IRP_MN_KERNEL_CALL\n"); Status = STATUS_INVALID_DEVICE_REQUEST; break; diff --git a/drivers/input/i8042prt/pnp.c b/drivers/input/i8042prt/pnp.c index ef0d6a7f747..4001397a6ee 100644 --- a/drivers/input/i8042prt/pnp.c +++ b/drivers/input/i8042prt/pnp.c @@ -708,7 +708,6 @@ i8042Pnp( default: { ERR_(I8042PRT, "IRP_MJ_PNP / unknown minor function 0x%x\n", MinorFunction); - ASSERT(FALSE); return ForwardIrpAndForget(DeviceObject, Irp); } } diff --git a/drivers/network/afd/CMakeLists.txt b/drivers/network/afd/CMakeLists.txt index 22ef729c619..e0af27b0294 100644 --- a/drivers/network/afd/CMakeLists.txt +++ b/drivers/network/afd/CMakeLists.txt @@ -18,12 +18,12 @@ list(APPEND SOURCE afd/write.c afd.rc) -add_library(afd SHARED ${CMAKE_CURRENT_BINARY_DIR}/afd_afd.h.gch ${SOURCE}) +add_library(afd SHARED ${SOURCE}) target_link_libraries(afd ${PSEH_LIB}) set_module_type(afd kernelmodedriver) add_importlibs(afd ntoskrnl hal) -add_pch(afd ${CMAKE_CURRENT_SOURCE_DIR}/include/afd.h ${SOURCE}) +add_pch(afd include/afd.h) add_cd_file(TARGET afd DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/network/afd/afd/bind.c b/drivers/network/afd/afd/bind.c index 4d877a78e2d..91ee6e7cc04 100644 --- a/drivers/network/afd/afd/bind.c +++ b/drivers/network/afd/afd/bind.c @@ -13,20 +13,17 @@ #include "tdiconn.h" #include "debug.h" -NTSTATUS WarmSocketForBind(PAFD_FCB FCB) -{ +NTSTATUS WarmSocketForBind( PAFD_FCB FCB ) { NTSTATUS Status; AFD_DbgPrint(MID_TRACE,("Called (AF %d)\n", FCB->LocalAddress->Address[0].AddressType)); - if (!FCB->TdiDeviceName.Length || !FCB->TdiDeviceName.Buffer) - { + if( !FCB->TdiDeviceName.Length || !FCB->TdiDeviceName.Buffer ) { AFD_DbgPrint(MID_TRACE,("Null Device\n")); return STATUS_NO_SUCH_DEVICE; } - if (!FCB->LocalAddress) - { + if( !FCB->LocalAddress ) { AFD_DbgPrint(MID_TRACE,("No local address\n")); return STATUS_INVALID_PARAMETER; } @@ -40,14 +37,34 @@ NTSTATUS WarmSocketForBind(PAFD_FCB FCB) if (FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) { - Status = TdiQueryMaxDatagramLength(FCB->AddressFile.Object, - &FCB->Recv.Size); - if (NT_SUCCESS(Status)) + if (!FCB->Recv.Size) + { + Status = TdiQueryMaxDatagramLength(FCB->AddressFile.Object, + &FCB->Recv.Size); + } + + if (NT_SUCCESS(Status) && !FCB->Recv.Window) { FCB->Recv.Window = ExAllocatePool(PagedPool, FCB->Recv.Size); if (!FCB->Recv.Window) Status = STATUS_NO_MEMORY; } + + if (NT_SUCCESS(Status)) + { + Status = TdiReceiveDatagram(&FCB->ReceiveIrp.InFlightRequest, + FCB->AddressFile.Object, + 0, + FCB->Recv.Window, + FCB->Recv.Size, + FCB->AddressFrom, + &FCB->ReceiveIrp.Iosb, + PacketSocketRecvComplete, + FCB); + + /* We don't want to wait for this read to complete. */ + if( Status == STATUS_PENDING ) Status = STATUS_SUCCESS; + } } AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); @@ -55,66 +72,36 @@ NTSTATUS WarmSocketForBind(PAFD_FCB FCB) return Status; } -NTSTATUS -NTAPI +NTSTATUS NTAPI AfdBindSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, - PIO_STACK_LOCATION IrpSp) -{ + PIO_STACK_LOCATION IrpSp) { NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_BIND_DATA BindReq; AFD_DbgPrint(MID_TRACE,("Called\n")); - DbgPrint("[AFD, AfdBindSocket] Called\n"); - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); - - if (!(BindReq = (PAFD_BIND_DATA)LockRequest(Irp, IrpSp)) ) - return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); + if( !(BindReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, + Irp, 0 ); - if (FCB->LocalAddress ) - ExFreePool(FCB->LocalAddress); - FCB->LocalAddress = TaCopyTransportAddress(&BindReq->Address); + if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress ); + FCB->LocalAddress = TaCopyTransportAddress( &BindReq->Address ); - if (FCB->LocalAddress) - Status = TdiBuildConnectionInfo( &FCB->AddressFrom, - FCB->LocalAddress ); + if( FCB->LocalAddress ) + Status = TdiBuildConnectionInfo( &FCB->AddressFrom, + FCB->LocalAddress ); - if (NT_SUCCESS(Status)) - Status = WarmSocketForBind(FCB); - + if( NT_SUCCESS(Status) ) + Status = WarmSocketForBind( FCB ); AFD_DbgPrint(MID_TRACE,("FCB->Flags %x\n", FCB->Flags)); - if (!NT_SUCCESS(Status)) - return UnlockAndMaybeComplete(FCB, Status, Irp, 0); - - if (FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) - { - AFD_DbgPrint(MID_TRACE,("Calling TdiReceiveDatagram\n")); - - Status = TdiReceiveDatagram - ( &FCB->ReceiveIrp.InFlightRequest, - FCB->AddressFile.Object, - 0, - FCB->Recv.Window, - FCB->Recv.Size, - FCB->AddressFrom, - &FCB->ReceiveIrp.Iosb, - PacketSocketRecvComplete, - FCB ); - - /* We don't want to wait for this read to complete. */ - if (Status == STATUS_PENDING) - Status = STATUS_SUCCESS; - } - if (NT_SUCCESS(Status)) FCB->State = SOCKET_STATE_BOUND; - DbgPrint("[AFD, AfdBindSocket] Leaving\n"); - /* MSAFD relies on us returning the address file handle in the IOSB */ return UnlockAndMaybeComplete( FCB, Status, Irp, (ULONG_PTR)FCB->AddressFile.Handle ); } + diff --git a/drivers/network/afd/afd/connect.c b/drivers/network/afd/afd/connect.c index c208465dfec..38150d066e9 100644 --- a/drivers/network/afd/afd/connect.c +++ b/drivers/network/afd/afd/connect.c @@ -12,17 +12,15 @@ #include "tdiconn.h" #include "debug.h" -NTSTATUS -NTAPI +NTSTATUS NTAPI AfdGetConnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; UINT BufferSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (FCB->ConnectOptionsSize == 0) return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0); @@ -44,12 +42,11 @@ AfdSetConnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PVOID ConnectOptions = LockRequest(Irp, IrpSp); UINT ConnectOptionsSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!ConnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -63,8 +60,7 @@ AfdSetConnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->ConnectOptions = ExAllocatePool(PagedPool, ConnectOptionsSize); - if (!FCB->ConnectOptions) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->ConnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); RtlCopyMemory(FCB->ConnectOptions, ConnectOptions, @@ -81,12 +77,11 @@ AfdSetConnectOptionsSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; - PUINT ConnectOptionsSize = (PUINT)LockRequest(Irp, IrpSp); + PAFD_FCB FCB = FileObject->FsContext; + PUINT ConnectOptionsSize = LockRequest(Irp, IrpSp); UINT BufferSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!ConnectOptionsSize) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -102,33 +97,29 @@ AfdSetConnectOptionsSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->ConnectOptions = ExAllocatePool(PagedPool, *ConnectOptionsSize); - if (!FCB->ConnectOptions) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->ConnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); FCB->ConnectOptionsSize = *ConnectOptionsSize; return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, 0); } -NTSTATUS -NTAPI +NTSTATUS NTAPI AfdGetConnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; UINT BufferSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (FCB->ConnectDataSize == 0) return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0); ASSERT(FCB->ConnectData); - if (FCB->FilledConnectData < BufferSize) - BufferSize = FCB->FilledConnectData; + if (FCB->FilledConnectData < BufferSize) BufferSize = FCB->FilledConnectData; RtlCopyMemory(Irp->UserBuffer, FCB->ConnectData, @@ -143,12 +134,11 @@ AfdSetConnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PVOID ConnectData = LockRequest(Irp, IrpSp); UINT ConnectDataSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -162,10 +152,11 @@ AfdSetConnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->ConnectData = ExAllocatePool(PagedPool, ConnectDataSize); - if (!FCB->ConnectData) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); - RtlCopyMemory(FCB->ConnectData, ConnectData, ConnectDataSize); + RtlCopyMemory(FCB->ConnectData, + ConnectData, + ConnectDataSize); FCB->ConnectDataSize = ConnectDataSize; @@ -178,12 +169,11 @@ AfdSetConnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; - PUINT ConnectDataSize = (PUINT)LockRequest(Irp, IrpSp); + PAFD_FCB FCB = FileObject->FsContext; + PUINT ConnectDataSize = LockRequest(Irp, IrpSp); UINT BufferSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!ConnectDataSize) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -199,8 +189,7 @@ AfdSetConnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->ConnectData = ExAllocatePool(PagedPool, *ConnectDataSize); - if (!FCB->ConnectData) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->ConnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); FCB->ConnectDataSize = *ConnectDataSize; @@ -208,12 +197,10 @@ AfdSetConnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, } -NTSTATUS WarmSocketForConnection(PAFD_FCB FCB) -{ +NTSTATUS WarmSocketForConnection( PAFD_FCB FCB ) { NTSTATUS Status; - if (!FCB->TdiDeviceName.Length || !FCB->TdiDeviceName.Buffer) - { + if( !FCB->TdiDeviceName.Length || !FCB->TdiDeviceName.Buffer ) { AFD_DbgPrint(MID_TRACE,("Null Device\n")); return STATUS_NO_SUCH_DEVICE; } @@ -222,8 +209,7 @@ NTSTATUS WarmSocketForConnection(PAFD_FCB FCB) &FCB->Connection.Handle, &FCB->Connection.Object ); - if (NT_SUCCESS(Status)) - { + if( NT_SUCCESS(Status) ) { Status = TdiAssociateAddressFile( FCB->AddressFile.Handle, FCB->Connection.Object ); } @@ -231,36 +217,39 @@ NTSTATUS WarmSocketForConnection(PAFD_FCB FCB) return Status; } -NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) -{ +NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) { NTSTATUS Status; ASSERT(!FCB->Recv.Window); ASSERT(!FCB->Send.Window); - Status = TdiQueryMaxDatagramLength(FCB->Connection.Object, - &FCB->Send.Size); + if (!FCB->Recv.Size) + { + Status = TdiQueryMaxDatagramLength(FCB->Connection.Object, + &FCB->Recv.Size); + if (!NT_SUCCESS(Status)) + return Status; + } - DbgPrint("[AFD, MakeSocketIntoConnection] Called\n"); - - if (!NT_SUCCESS(Status)) - return Status; - - FCB->Recv.Size = FCB->Send.Size; + if (!FCB->Send.Size) + { + Status = TdiQueryMaxDatagramLength(FCB->Connection.Object, + &FCB->Send.Size); + if (!NT_SUCCESS(Status)) + return Status; + } /* Allocate the receive area and start receiving */ - FCB->Recv.Window = (PCHAR)ExAllocatePool(PagedPool, FCB->Recv.Size); - if (!FCB->Recv.Window) - return STATUS_NO_MEMORY; - - FCB->Send.Window = (PCHAR)ExAllocatePool(PagedPool, FCB->Send.Size); + { + FCB->Recv.Window = ExAllocatePool( PagedPool, FCB->Recv.Size ); + if( !FCB->Recv.Window ) return STATUS_NO_MEMORY; + } if (!FCB->Send.Window) { - ExFreePool( FCB->Recv.Window ); - FCB->Recv.Window = NULL; - return STATUS_NO_MEMORY; + FCB->Send.Window = ExAllocatePool( PagedPool, FCB->Send.Size ); + if( !FCB->Send.Window ) return STATUS_NO_MEMORY; } FCB->State = SOCKET_STATE_CONNECTED; @@ -274,27 +263,20 @@ NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) ReceiveComplete, FCB ); - if (Status == STATUS_PENDING) - Status = STATUS_SUCCESS; + if( Status == STATUS_PENDING ) Status = STATUS_SUCCESS; FCB->PollState |= AFD_EVENT_CONNECT | AFD_EVENT_SEND; FCB->PollStatus[FD_CONNECT_BIT] = STATUS_SUCCESS; FCB->PollStatus[FD_WRITE_BIT] = STATUS_SUCCESS; PollReeval( FCB->DeviceExt, FCB->FileObject ); - DbgPrint("[AFD, MakeSocketIntoConnection] Leaving\n"); - return Status; } -static -NTSTATUS -NTAPI -StreamSocketConnectComplete +static NTSTATUS NTAPI StreamSocketConnectComplete ( PDEVICE_OBJECT DeviceObject, PIRP Irp, - PVOID Context ) -{ + PVOID Context ) { NTSTATUS Status = Irp->IoStatus.Status; PAFD_FCB FCB = (PAFD_FCB)Context; PLIST_ENTRY NextIrpEntry; @@ -302,12 +284,10 @@ StreamSocketConnectComplete AFD_DbgPrint(MID_TRACE,("Called: FCB %x, FO %x\n", Context, FCB->FileObject)); - DbgPrint("[AFD, StreamSocketConnectComplete] Called: FCB 0x%x, FO 0x%x\n", - Context, FCB->FileObject); /* I was wrong about this before as we can have pending writes to a not * yet connected socket */ - if (!SocketAcquireStateLock(FCB)) + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n", @@ -316,70 +296,50 @@ StreamSocketConnectComplete ASSERT(FCB->ConnectIrp.InFlightRequest == Irp); FCB->ConnectIrp.InFlightRequest = NULL; - if (FCB->State == SOCKET_STATE_CLOSED) - { + if( FCB->State == SOCKET_STATE_CLOSED ) { /* Cleanup our IRP queue because the FCB is being destroyed */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_CONNECT])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_CONNECT]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; - NextIrp->IoStatus.Information = 0; - - if( NextIrp->MdlAddress ) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation(NextIrp)); - (void)IoSetCancelRoutine(NextIrp, NULL); - - IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_CONNECT] ) ) { + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_CONNECT]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; + NextIrp->IoStatus.Information = 0; + if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + (void)IoSetCancelRoutine(NextIrp, NULL); + IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } - - SocketStateUnlock( FCB ); - return STATUS_FILE_CLOSED; + SocketStateUnlock( FCB ); + return STATUS_FILE_CLOSED; } - if (!NT_SUCCESS(Irp->IoStatus.Status)) - { - FCB->PollState |= AFD_EVENT_CONNECT_FAIL; + if( !NT_SUCCESS(Irp->IoStatus.Status) ) { + FCB->PollState |= AFD_EVENT_CONNECT_FAIL; FCB->PollStatus[FD_CONNECT_BIT] = Irp->IoStatus.Status; - - AFD_DbgPrint(MID_TRACE,("[StreamSocketConnectComplete] Going to bound state\n")); - - FCB->State = SOCKET_STATE_BOUND; + AFD_DbgPrint(MID_TRACE,("Going to bound state\n")); + FCB->State = SOCKET_STATE_BOUND; PollReeval( FCB->DeviceExt, FCB->FileObject ); } /* Succeed pending irps on the FUNCTION_CONNECT list */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_CONNECT])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_CONNECT]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - - AFD_DbgPrint(MID_TRACE,("Completing connect %x\n", NextIrp)); - DbgPrint("[AFD, StreamSocketConnectComplete] Completing connect 0x%x with Status = 0x%x\n", NextIrp, Status); - - NextIrp->IoStatus.Status = Status; - NextIrp->IoStatus.Information = (NT_SUCCESS(Status) ? ((ULONG_PTR)FCB->Connection.Handle) : 0); - - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation(NextIrp)); - + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_CONNECT] ) ) { + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_CONNECT]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + AFD_DbgPrint(MID_TRACE,("Completing connect %x\n", NextIrp)); + NextIrp->IoStatus.Status = Status; + NextIrp->IoStatus.Information = NT_SUCCESS(Status) ? ((ULONG_PTR)FCB->Connection.Handle) : 0; + if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); (void)IoSetCancelRoutine(NextIrp, NULL); - IoCompleteRequest(NextIrp, IO_NETWORK_INCREMENT); + IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } - if (NT_SUCCESS(Status)) - { - DbgPrint("[AFD, StreamSocketConnectComplete] Making socket into connection\n"); - Status = MakeSocketIntoConnection(FCB); + if( NT_SUCCESS(Status) ) { + Status = MakeSocketIntoConnection( FCB ); - if (!NT_SUCCESS(Status)) - { - SocketStateUnlock(FCB); - return Status; - } + if( !NT_SUCCESS(Status) ) { + SocketStateUnlock( FCB ); + return Status; + } - FCB->FilledConnectData = MIN(FCB->ConnectReturnInfo->UserDataLength, - FCB->ConnectDataSize); + FCB->FilledConnectData = MIN(FCB->ConnectReturnInfo->UserDataLength, FCB->ConnectDataSize); if (FCB->FilledConnectData) { RtlCopyMemory(FCB->ConnectData, @@ -387,176 +347,163 @@ StreamSocketConnectComplete FCB->FilledConnectData); } - FCB->FilledConnectOptions = MIN(FCB->ConnectReturnInfo->OptionsLength, - FCB->ConnectOptionsSize); + FCB->FilledConnectOptions = MIN(FCB->ConnectReturnInfo->OptionsLength, FCB->ConnectOptionsSize); if (FCB->FilledConnectOptions) { RtlCopyMemory(FCB->ConnectOptions, - FCB->ConnectReturnInfo->Options, - FCB->FilledConnectOptions); + FCB->ConnectReturnInfo->Options, + FCB->FilledConnectOptions); } - if (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + if( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) { + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, + Tail.Overlay.ListEntry); + AFD_DbgPrint(MID_TRACE,("Launching send request %x\n", NextIrp)); + Status = AfdConnectedSocketWriteData + ( DeviceObject, + NextIrp, + IoGetCurrentIrpStackLocation( NextIrp ), + FALSE ); + } - AFD_DbgPrint(MID_TRACE,("Launching send request %x\n", NextIrp)); - - Status = AfdConnectedSocketWriteData(DeviceObject, - NextIrp, - IoGetCurrentIrpStackLocation( NextIrp ), - FALSE); - } - - if (Status == STATUS_PENDING) - Status = STATUS_SUCCESS; + if( Status == STATUS_PENDING ) + Status = STATUS_SUCCESS; } - SocketStateUnlock(FCB); + SocketStateUnlock( FCB ); AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - DbgPrint("[AFD, StreamSocketConnectComplete] Leaving. Status = 0x%x\n", Status); return Status; } /* Return the socket object for ths request only if it is a connected or stream type. */ -NTSTATUS -NTAPI +NTSTATUS NTAPI AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, - PIO_STACK_LOCATION IrpSp) -{ + PIO_STACK_LOCATION IrpSp) { NTSTATUS Status = STATUS_INVALID_PARAMETER; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_CONNECT_INFO ConnectReq; AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); - - if (!(ConnectReq = LockRequest(Irp, IrpSp))) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); + if( !(ConnectReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, + 0 ); AFD_DbgPrint(MID_TRACE,("Connect request:\n")); - DbgPrint("[AFD, AfdStreamSocketConnect] Connect request:\n"); #if 0 OskitDumpBuffer ( (PCHAR)ConnectReq, IrpSp->Parameters.DeviceIoControl.InputBufferLength ); #endif - if (FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) - { - if (FCB->RemoteAddress) - ExFreePool(FCB->RemoteAddress); - - FCB->RemoteAddress = TaCopyTransportAddress( &ConnectReq->RemoteAddress ); + if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS ) + { + if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress ); + FCB->RemoteAddress = + TaCopyTransportAddress( &ConnectReq->RemoteAddress ); - if (!FCB->RemoteAddress) - Status = STATUS_NO_MEMORY; - else - Status = STATUS_SUCCESS; + if( !FCB->RemoteAddress ) + Status = STATUS_NO_MEMORY; + else + Status = STATUS_SUCCESS; - return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); - } + return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); + } - switch (FCB->State) - { - case SOCKET_STATE_CONNECTED: - Status = STATUS_SUCCESS; - break; + switch( FCB->State ) { + case SOCKET_STATE_CONNECTED: + Status = STATUS_SUCCESS; + break; - case SOCKET_STATE_CONNECTING: - return LeaveIrpUntilLater( FCB, Irp, FUNCTION_CONNECT ); + case SOCKET_STATE_CONNECTING: + return LeaveIrpUntilLater( FCB, Irp, FUNCTION_CONNECT ); - case SOCKET_STATE_CREATED: - if (FCB->LocalAddress) ExFreePool(FCB->LocalAddress); - FCB->LocalAddress = TaBuildNullTransportAddress( - ConnectReq->RemoteAddress.Address[0].AddressType); + case SOCKET_STATE_CREATED: + if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress ); + FCB->LocalAddress = + TaBuildNullTransportAddress( ConnectReq->RemoteAddress.Address[0].AddressType ); - if (FCB->LocalAddress) - { - Status = WarmSocketForBind(FCB); + if( FCB->LocalAddress ) { + Status = WarmSocketForBind( FCB ); - if (NT_SUCCESS(Status)) - FCB->State = SOCKET_STATE_BOUND; - else - return UnlockAndMaybeComplete(FCB, Status, Irp, 0); - } - else - return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 ); + if( NT_SUCCESS(Status) ) + FCB->State = SOCKET_STATE_BOUND; + else + return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); + } else + return UnlockAndMaybeComplete + ( FCB, STATUS_NO_MEMORY, Irp, 0 ); - /* Drop through to SOCKET_STATE_BOUND */ + /* Drop through to SOCKET_STATE_BOUND */ - case SOCKET_STATE_BOUND: - if (FCB->RemoteAddress) - ExFreePool(FCB->RemoteAddress); - - FCB->RemoteAddress = TaCopyTransportAddress( &ConnectReq->RemoteAddress ); + case SOCKET_STATE_BOUND: + if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress ); + FCB->RemoteAddress = + TaCopyTransportAddress( &ConnectReq->RemoteAddress ); - if (!FCB->RemoteAddress) - { - Status = STATUS_NO_MEMORY; - break; - } + if( !FCB->RemoteAddress ) { + Status = STATUS_NO_MEMORY; + break; + } - Status = WarmSocketForConnection(FCB); + Status = WarmSocketForConnection( FCB ); - if (!NT_SUCCESS(Status)) - break; + if( !NT_SUCCESS(Status) ) + break; - if (FCB->ConnectReturnInfo) ExFreePool(FCB->ConnectReturnInfo); - Status = TdiBuildConnectionInfo(&FCB->ConnectReturnInfo, &ConnectReq->RemoteAddress); + if (FCB->ConnectReturnInfo) ExFreePool(FCB->ConnectReturnInfo); + Status = TdiBuildConnectionInfo + ( &FCB->ConnectReturnInfo, + &ConnectReq->RemoteAddress ); - if (NT_SUCCESS(Status)) - { - if (FCB->ConnectCallInfo) ExFreePool(FCB->ConnectCallInfo); - Status = TdiBuildConnectionInfo(&FCB->ConnectCallInfo, - &ConnectReq->RemoteAddress); - } - else - break; + if( NT_SUCCESS(Status) ) + { + if (FCB->ConnectCallInfo) ExFreePool(FCB->ConnectCallInfo); + Status = TdiBuildConnectionInfo(&FCB->ConnectCallInfo, + &ConnectReq->RemoteAddress); + } + else break; - if (NT_SUCCESS(Status)) - { - FCB->ConnectCallInfo->UserData = FCB->ConnectData; - FCB->ConnectCallInfo->UserDataLength = FCB->ConnectDataSize; - FCB->ConnectCallInfo->Options = FCB->ConnectOptions; - FCB->ConnectCallInfo->OptionsLength = FCB->ConnectOptionsSize; + + if( NT_SUCCESS(Status) ) { + FCB->ConnectCallInfo->UserData = FCB->ConnectData; + FCB->ConnectCallInfo->UserDataLength = FCB->ConnectDataSize; + FCB->ConnectCallInfo->Options = FCB->ConnectOptions; + FCB->ConnectCallInfo->OptionsLength = FCB->ConnectOptionsSize; - FCB->State = SOCKET_STATE_CONNECTING; + FCB->State = SOCKET_STATE_CONNECTING; - AFD_DbgPrint(MID_TRACE,("Queueing IRP %x\n", Irp)); - Status = QueueUserModeIrp(FCB, Irp, FUNCTION_CONNECT); - if (Status == STATUS_PENDING) - { - Status = TdiConnect(&FCB->ConnectIrp.InFlightRequest, - FCB->Connection.Object, - FCB->ConnectCallInfo, - FCB->ConnectReturnInfo, - &FCB->ConnectIrp.Iosb, - StreamSocketConnectComplete, - FCB); - } + AFD_DbgPrint(MID_TRACE,("Queueing IRP %x\n", Irp)); + Status = QueueUserModeIrp( FCB, Irp, FUNCTION_CONNECT ); + if (Status == STATUS_PENDING) + { + Status = TdiConnect( &FCB->ConnectIrp.InFlightRequest, + FCB->Connection.Object, + FCB->ConnectCallInfo, + FCB->ConnectReturnInfo, + &FCB->ConnectIrp.Iosb, + StreamSocketConnectComplete, + FCB ); + } - if (Status != STATUS_PENDING) - FCB->State = SOCKET_STATE_BOUND; + if (Status != STATUS_PENDING) + FCB->State = SOCKET_STATE_BOUND; - SocketStateUnlock(FCB); + SocketStateUnlock(FCB); - return Status; - } - break; + return Status; + } + break; - default: - AFD_DbgPrint(MID_TRACE,("Inappropriate socket state %d for connect\n", - FCB->State)); - DbgPrint("[AFD, AfdStreamSocketConnect] Inappropriate socket state %d for connect\n", - FCB->State); - break; + default: + AFD_DbgPrint(MID_TRACE,("Inappropriate socket state %d for connect\n", + FCB->State)); + break; } return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); diff --git a/drivers/network/afd/afd/context.c b/drivers/network/afd/afd/context.c index 4cc6e92de12..e58398d1727 100644 --- a/drivers/network/afd/afd/context.c +++ b/drivers/network/afd/afd/context.c @@ -12,25 +12,23 @@ #include "tdiconn.h" #include "debug.h" -NTSTATUS -NTAPI -AfdGetContext(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdGetContext( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_INVALID_PARAMETER; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; UINT ContextSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - if (FCB->ContextSize < ContextSize) - ContextSize = FCB->ContextSize; + if( FCB->ContextSize < ContextSize ) ContextSize = FCB->ContextSize; - if (FCB->Context) - { - RtlCopyMemory( Irp->UserBuffer, FCB->Context, ContextSize ); - Status = STATUS_SUCCESS; + if( FCB->Context ) { + RtlCopyMemory( Irp->UserBuffer, + FCB->Context, + ContextSize ); + Status = STATUS_SUCCESS; } AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); @@ -38,16 +36,14 @@ AfdGetContext(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) return UnlockAndMaybeComplete( FCB, Status, Irp, ContextSize ); } -NTSTATUS -NTAPI +NTSTATUS NTAPI AfdGetContextSize( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp ) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if (IrpSp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(ULONG)) return UnlockAndMaybeComplete(FCB, STATUS_BUFFER_TOO_SMALL, Irp, sizeof(ULONG)); @@ -59,31 +55,27 @@ AfdGetContextSize( PDEVICE_OBJECT DeviceObject, PIRP Irp, return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, sizeof(ULONG)); } -NTSTATUS -NTAPI -AfdSetContext(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdSetContext( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PVOID Context = LockRequest(Irp, IrpSp); - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if (!Context) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); - if (FCB->Context) - { - ExFreePool( FCB->Context ); - FCB->ContextSize = 0; + if( FCB->Context ) { + ExFreePool( FCB->Context ); + FCB->ContextSize = 0; } FCB->Context = ExAllocatePool( PagedPool, IrpSp->Parameters.DeviceIoControl.InputBufferLength ); - if ( !FCB->Context ) - return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 ); + if( !FCB->Context ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 ); FCB->ContextSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; diff --git a/drivers/network/afd/afd/info.c b/drivers/network/afd/afd/info.c index e92b9c49326..70e41a89115 100644 --- a/drivers/network/afd/afd/info.c +++ b/drivers/network/afd/afd/info.c @@ -13,154 +13,196 @@ #include "debug.h" #include "pseh/pseh2.h" -NTSTATUS -NTAPI -AfdGetInfo(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdGetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_SUCCESS; - PAFD_INFO InfoReq = (PAFD_INFO)LockRequest(Irp, IrpSp); + PAFD_INFO InfoReq = LockRequest(Irp, IrpSp); PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PLIST_ENTRY CurrentEntry; AFD_DbgPrint(MID_TRACE,("Called %x %x\n", InfoReq, InfoReq ? InfoReq->InformationClass : 0)); - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if (!InfoReq) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); - _SEH2_TRY - { - switch( InfoReq->InformationClass ) - { - case AFD_INFO_RECEIVE_WINDOW_SIZE: - InfoReq->Information.Ulong = FCB->Recv.Size; - break; + _SEH2_TRY { + switch( InfoReq->InformationClass ) { + case AFD_INFO_RECEIVE_WINDOW_SIZE: + InfoReq->Information.Ulong = FCB->Recv.Size; + break; - case AFD_INFO_SEND_WINDOW_SIZE: - InfoReq->Information.Ulong = FCB->Send.Size; - AFD_DbgPrint(MID_TRACE,("Send window size %d\n", FCB->Send.Size)); - break; + case AFD_INFO_SEND_WINDOW_SIZE: + InfoReq->Information.Ulong = FCB->Send.Size; + AFD_DbgPrint(MID_TRACE,("Send window size %d\n", FCB->Send.Size)); + break; - case AFD_INFO_GROUP_ID_TYPE: - InfoReq->Information.LargeInteger.u.HighPart = FCB->GroupType; - InfoReq->Information.LargeInteger.u.LowPart = FCB->GroupID; - AFD_DbgPrint(MID_TRACE, ("Group ID: %d Group Type: %d\n", FCB->GroupID, FCB->GroupType)); - break; + case AFD_INFO_GROUP_ID_TYPE: + InfoReq->Information.LargeInteger.u.HighPart = FCB->GroupType; + InfoReq->Information.LargeInteger.u.LowPart = FCB->GroupID; + AFD_DbgPrint(MID_TRACE, ("Group ID: %d Group Type: %d\n", FCB->GroupID, FCB->GroupType)); + break; - case AFD_INFO_BLOCKING_MODE: - InfoReq->Information.Ulong = FCB->BlockingMode; - break; + case AFD_INFO_BLOCKING_MODE: + InfoReq->Information.Boolean = FCB->NonBlocking; + break; + + case AFD_INFO_INLINING_MODE: + InfoReq->Information.Boolean = FCB->OobInline; + break; - case AFD_INFO_RECEIVE_CONTENT_SIZE: - /* Only touch InfoReq if a socket has been set up. - Behaviour was verified under WinXP SP2. */ - if(FCB->AddressFile.Object) - InfoReq->Information.Ulong = FCB->Recv.Content - FCB->Recv.BytesUsed; + case AFD_INFO_RECEIVE_CONTENT_SIZE: + /* Only touch InfoReq if a socket has been set up. + Behaviour was verified under WinXP SP2. */ + if(FCB->AddressFile.Object || FCB->Connection.Object) + InfoReq->Information.Ulong = FCB->Recv.Content - FCB->Recv.BytesUsed; - break; + break; - case AFD_INFO_SENDS_IN_PROGRESS: - InfoReq->Information.Ulong = 0; + case AFD_INFO_SENDS_IN_PROGRESS: + InfoReq->Information.Ulong = 0; - /* Count the queued sends */ - CurrentEntry = FCB->PendingIrpList[FUNCTION_SEND].Flink; - while (CurrentEntry != &FCB->PendingIrpList[FUNCTION_SEND]) - { - InfoReq->Information.Ulong++; - CurrentEntry = CurrentEntry->Flink; - } + /* Count the queued sends */ + CurrentEntry = FCB->PendingIrpList[FUNCTION_SEND].Flink; + while (CurrentEntry != &FCB->PendingIrpList[FUNCTION_SEND]) + { + InfoReq->Information.Ulong++; + CurrentEntry = CurrentEntry->Flink; + } - /* This needs to count too because when this is dispatched - * the user-mode IRP has already been completed and therefore - * will NOT be in our pending IRP list. We count this as one send - * outstanding although it could be multiple since we batch sends - * when waiting for the in flight request to return, so this number - * may not be accurate but it really doesn't matter that much since - * it's more or less a zero/non-zero comparison to determine whether - * we can shutdown the socket - */ - if (FCB->SendIrp.InFlightRequest) - InfoReq->Information.Ulong++; + /* This needs to count too because when this is dispatched + * the user-mode IRP has already been completed and therefore + * will NOT be in our pending IRP list. We count this as one send + * outstanding although it could be multiple since we batch sends + * when waiting for the in flight request to return, so this number + * may not be accurate but it really doesn't matter that much since + * it's more or less a zero/non-zero comparison to determine whether + * we can shutdown the socket + */ + if (FCB->SendIrp.InFlightRequest) + InfoReq->Information.Ulong++; + break; - break; - - default: - AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n", - InfoReq->InformationClass)); - Status = STATUS_INVALID_PARAMETER; - break; - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - AFD_DbgPrint(MID_TRACE,("Exception executing GetInfo\n")); + default: + AFD_DbgPrint(MID_TRACE,("Unknown info id %x\n", + InfoReq->InformationClass)); Status = STATUS_INVALID_PARAMETER; - } - _SEH2_END; + break; + } + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + AFD_DbgPrint(MID_TRACE,("Exception executing GetInfo\n")); + Status = STATUS_INVALID_PARAMETER; + } _SEH2_END; AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); } -NTSTATUS -NTAPI -AfdSetInfo(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdSetInfo( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_SUCCESS; - PAFD_INFO InfoReq = (PAFD_INFO)LockRequest(Irp, IrpSp); + PAFD_INFO InfoReq = LockRequest(Irp, IrpSp); PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; + PCHAR NewBuffer; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!InfoReq) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); - _SEH2_TRY - { - switch (InfoReq->InformationClass) - { - case AFD_INFO_BLOCKING_MODE: - AFD_DbgPrint(MID_TRACE,("Blocking mode set to %d\n", InfoReq->Information.Ulong)); - FCB->BlockingMode = InfoReq->Information.Ulong; - break; - default: - AFD_DbgPrint(MIN_TRACE,("Unknown request %d\n", InfoReq->InformationClass)); - break; - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = STATUS_INVALID_PARAMETER; - } - _SEH2_END; + _SEH2_TRY { + switch (InfoReq->InformationClass) { + case AFD_INFO_BLOCKING_MODE: + AFD_DbgPrint(MID_TRACE,("Blocking mode set to %d\n", InfoReq->Information.Boolean)); + FCB->NonBlocking = InfoReq->Information.Boolean; + break; + case AFD_INFO_INLINING_MODE: + FCB->OobInline = InfoReq->Information.Boolean; + break; + case AFD_INFO_RECEIVE_WINDOW_SIZE: + NewBuffer = ExAllocatePool(PagedPool, InfoReq->Information.Ulong); + if (NewBuffer) + { + if (FCB->Recv.Content > InfoReq->Information.Ulong) + FCB->Recv.Content = InfoReq->Information.Ulong; + + if (FCB->Recv.Window) + { + RtlCopyMemory(NewBuffer, + FCB->Recv.Window, + FCB->Recv.Content); + + ExFreePool(FCB->Recv.Window); + } + + FCB->Recv.Size = InfoReq->Information.Ulong; + FCB->Recv.Window = NewBuffer; + + Status = STATUS_SUCCESS; + } + else + { + Status = STATUS_NO_MEMORY; + } + break; + case AFD_INFO_SEND_WINDOW_SIZE: + NewBuffer = ExAllocatePool(PagedPool, InfoReq->Information.Ulong); + if (NewBuffer) + { + if (FCB->Send.BytesUsed > InfoReq->Information.Ulong) + FCB->Send.BytesUsed = InfoReq->Information.Ulong; + + if (FCB->Send.Window) + { + RtlCopyMemory(NewBuffer, + FCB->Send.Window, + FCB->Send.BytesUsed); + + ExFreePool(FCB->Send.Window); + } + + FCB->Send.Size = InfoReq->Information.Ulong; + FCB->Send.Window = NewBuffer; + + Status = STATUS_SUCCESS; + } + else + { + Status = STATUS_NO_MEMORY; + } + break; + default: + AFD_DbgPrint(MIN_TRACE,("Unknown request %d\n", InfoReq->InformationClass)); + break; + } + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + Status = STATUS_INVALID_PARAMETER; + } _SEH2_END; AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); return UnlockAndMaybeComplete(FCB, Status, Irp, 0); } -NTSTATUS -NTAPI -AfdGetSockName(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdGetSockName( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PMDL Mdl = NULL; - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - if (FCB->AddressFile.Object == NULL && FCB->Connection.Object == NULL) - { - return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0 ); + if( FCB->AddressFile.Object == NULL && FCB->Connection.Object == NULL ) { + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0 ); } Mdl = IoAllocateMdl @@ -170,52 +212,44 @@ AfdGetSockName(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) FALSE, NULL ); - if( Mdl != NULL ) - { - _SEH2_TRY - { - MmProbeAndLockPages( Mdl, Irp->RequestorMode, IoModifyAccess ); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n")); - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; + if( Mdl != NULL ) { + _SEH2_TRY { + MmProbeAndLockPages( Mdl, Irp->RequestorMode, IoModifyAccess ); + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n")); + Status = _SEH2_GetExceptionCode(); + } _SEH2_END; - if (NT_SUCCESS(Status)) - { - Status = TdiQueryInformation( - FCB->Connection.Object ? FCB->Connection.Object : FCB->AddressFile.Object, - TDI_QUERY_ADDRESS_INFO, - Mdl ); + if( NT_SUCCESS(Status) ) { + Status = TdiQueryInformation + ( FCB->Connection.Object ? FCB->Connection.Object : FCB->AddressFile.Object, + TDI_QUERY_ADDRESS_INFO, + Mdl ); } - } - else + } else Status = STATUS_INSUFFICIENT_RESOURCES; return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); } -NTSTATUS -NTAPI -AfdGetPeerName(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdGetPeerName( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PMDL Mdl = NULL; PTDI_CONNECTION_INFORMATION ConnInfo = NULL; - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); - if (FCB->RemoteAddress == NULL || FCB->Connection.Object == NULL) - { + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); + + if (FCB->RemoteAddress == NULL || FCB->Connection.Object == NULL) { return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0 ); } - if (NT_SUCCESS(Status = TdiBuildNullConnectionInfo(&ConnInfo, + if(NT_SUCCESS(Status = TdiBuildNullConnectionInfo + (&ConnInfo, FCB->RemoteAddress->Address[0].AddressType))) { Mdl = IoAllocateMdl(ConnInfo, @@ -227,16 +261,12 @@ AfdGetPeerName(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) if (Mdl) { - _SEH2_TRY - { - MmProbeAndLockPages(Mdl, Irp->RequestorMode, IoModifyAccess); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n")); - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; + _SEH2_TRY { + MmProbeAndLockPages(Mdl, Irp->RequestorMode, IoModifyAccess); + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n")); + Status = _SEH2_GetExceptionCode(); + } _SEH2_END; if (NT_SUCCESS(Status)) { @@ -246,11 +276,8 @@ AfdGetPeerName(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) if (NT_SUCCESS(Status)) { - if (IrpSp->Parameters.DeviceIoControl.OutputBufferLength >= - TaLengthOfTransportAddress(ConnInfo->RemoteAddress)) - RtlCopyMemory(Irp->UserBuffer, - ConnInfo->RemoteAddress, - TaLengthOfTransportAddress(ConnInfo->RemoteAddress)); + if (IrpSp->Parameters.DeviceIoControl.OutputBufferLength >= TaLengthOfTransportAddress(ConnInfo->RemoteAddress)) + RtlCopyMemory(Irp->UserBuffer, ConnInfo->RemoteAddress, TaLengthOfTransportAddress(ConnInfo->RemoteAddress)); else Status = STATUS_BUFFER_TOO_SMALL; } diff --git a/drivers/network/afd/afd/listen.c b/drivers/network/afd/afd/listen.c index 86d69540677..27dd572f641 100644 --- a/drivers/network/afd/afd/listen.c +++ b/drivers/network/afd/afd/listen.c @@ -12,15 +12,11 @@ #include "tdiconn.h" #include "debug.h" -static -NTSTATUS -SatisfyAccept -( PAFD_DEVICE_EXTENSION DeviceExt, - PIRP Irp, - PFILE_OBJECT NewFileObject, - PAFD_TDI_OBJECT_QELT Qelt ) -{ - PAFD_FCB FCB = (PAFD_FCB)NewFileObject->FsContext; +static NTSTATUS SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt, + PIRP Irp, + PFILE_OBJECT NewFileObject, + PAFD_TDI_OBJECT_QELT Qelt ) { + PAFD_FCB FCB = NewFileObject->FsContext; NTSTATUS Status; if( !SocketAcquireStateLock( FCB ) ) @@ -28,19 +24,17 @@ SatisfyAccept /* Transfer the connection to the new socket, launch the opening read */ AFD_DbgPrint(MID_TRACE,("Completing a real accept (FCB %x)\n", FCB)); - DbgPrint("[SatisfyAccept] Completing a real accept (FCB %x)\n", FCB); FCB->Connection = Qelt->Object; - if (FCB->RemoteAddress) - ExFreePool( FCB->RemoteAddress ); - - FCB->RemoteAddress = TaCopyTransportAddress(Qelt->ConnInfo->RemoteAddress); + if( FCB->RemoteAddress ) ExFreePool( FCB->RemoteAddress ); + FCB->RemoteAddress = + TaCopyTransportAddress( Qelt->ConnInfo->RemoteAddress ); - if (!FCB->RemoteAddress) - Status = STATUS_NO_MEMORY; + if( !FCB->RemoteAddress ) + Status = STATUS_NO_MEMORY; else - Status = MakeSocketIntoConnection( FCB ); + Status = MakeSocketIntoConnection( FCB ); if (NT_SUCCESS(Status)) Status = TdiBuildConnectionInfo(&FCB->ConnectCallInfo, FCB->RemoteAddress); @@ -51,10 +45,7 @@ SatisfyAccept return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); } -static -NTSTATUS -SatisfyPreAccept(PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt) -{ +static NTSTATUS SatisfyPreAccept( PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt ) { PAFD_RECEIVED_ACCEPT_DATA ListenReceive = (PAFD_RECEIVED_ACCEPT_DATA)Irp->AssociatedIrp.SystemBuffer; PTA_IP_ADDRESS IPAddr; @@ -65,11 +56,6 @@ SatisfyPreAccept(PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt) AFD_DbgPrint(MID_TRACE,("Socket Address (K) %x (U) %x\n", &ListenReceive->Address, Qelt->ConnInfo->RemoteAddress)); - DbgPrint("[SatisfyPreAccept] Called\n"); - DbgPrint("[SatisfyPreAccept] Giving SEQ %d to userland\n", Qelt->Seq); - DbgPrint("[SatisfyPreAccept] Socket Address (K) %x (U) %x\n", - &ListenReceive->Address, - Qelt->ConnInfo->RemoteAddress); TaCopyTransportAddressInPlace( &ListenReceive->Address, Qelt->ConnInfo->RemoteAddress ); @@ -96,57 +82,34 @@ SatisfyPreAccept(PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt) AFD_DbgPrint(MID_TRACE,("IPAddr->Address[0].Address[0].sin_addr %x\n", IPAddr->Address[0].Address[0].in_addr)); - DbgPrint("IPAddr->TAAddressCount %d\n", - IPAddr->TAAddressCount); - DbgPrint("IPAddr->Address[0].AddressType %d\n", - IPAddr->Address[0].AddressType); - DbgPrint("IPAddr->Address[0].AddressLength %d\n", - IPAddr->Address[0].AddressLength); - DbgPrint("IPAddr->Address[0].Address[0].sin_port %x\n", - IPAddr->Address[0].Address[0].sin_port); - DbgPrint("IPAddr->Address[0].Address[0].sin_addr %x\n", - IPAddr->Address[0].Address[0].in_addr); - - if ( Irp->MdlAddress ) - UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); + if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); Irp->IoStatus.Information = ((PCHAR)&IPAddr[1]) - ((PCHAR)ListenReceive); Irp->IoStatus.Status = STATUS_SUCCESS; (void)IoSetCancelRoutine(Irp, NULL); IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); - - DbgPrint("[SatisfyPreAccept] Leaving\n"); - return STATUS_SUCCESS; } -static -NTSTATUS -NTAPI -ListenComplete +static NTSTATUS NTAPI ListenComplete ( PDEVICE_OBJECT DeviceObject, PIRP Irp, - PVOID Context ) -{ + PVOID Context ) { NTSTATUS Status = STATUS_SUCCESS; PAFD_FCB FCB = (PAFD_FCB)Context; PAFD_TDI_OBJECT_QELT Qelt; PLIST_ENTRY NextIrpEntry; PIRP NextIrp; - DbgPrint("[AFD, ListenComplete] Called\n"); - - if ( !SocketAcquireStateLock( FCB ) ) + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; ASSERT(FCB->ListenIrp.InFlightRequest == Irp); FCB->ListenIrp.InFlightRequest = NULL; - if ( FCB->State == SOCKET_STATE_CLOSED ) - { + if( FCB->State == SOCKET_STATE_CLOSED ) { /* Cleanup our IRP queue because the FCB is being destroyed */ - while ( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_PREACCEPT] ) ) - { + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_PREACCEPT] ) ) { NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_PREACCEPT]); NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; @@ -169,8 +132,8 @@ ListenComplete FCB->ListenIrp.ConnectionCallInfo = NULL; } - SocketStateUnlock( FCB ); - return STATUS_FILE_CLOSED; + SocketStateUnlock( FCB ); + return STATUS_FILE_CLOSED; } AFD_DbgPrint(MID_TRACE,("Completing listen request.\n")); @@ -182,59 +145,47 @@ ListenComplete return Irp->IoStatus.Status; } - DbgPrint("[AFD, ListenComplete] Completing listen request.\n"); - DbgPrint("[AFD, ListenComplete] IoStatus was %x\n", FCB->ListenIrp.Iosb.Status); + Qelt = ExAllocatePool( NonPagedPool, sizeof(*Qelt) ); + if( !Qelt ) { + Status = STATUS_NO_MEMORY; + } else { + UINT AddressType = + FCB->LocalAddress->Address[0].AddressType; - Qelt = ExAllocatePool( NonPagedPool, sizeof(AFD_TDI_OBJECT_QELT) );//sizeof(*Qelt) ); - if (!Qelt) - { - Status = STATUS_NO_MEMORY; - } - else - { - UINT AddressType = FCB->LocalAddress->Address[0].AddressType; - - Qelt->Object = FCB->Connection; - Qelt->Seq = FCB->ConnSeq++; + Qelt->Object = FCB->Connection; + Qelt->Seq = FCB->ConnSeq++; AFD_DbgPrint(MID_TRACE,("Address Type: %d (RA %x)\n", AddressType, FCB->ListenIrp. ConnectionReturnInfo->RemoteAddress)); - DbgPrint("[AFD, ListenComplete] Address Type: %d (RA %x)\n", - AddressType, - FCB->ListenIrp. - ConnectionReturnInfo->RemoteAddress); - Status = TdiBuildNullConnectionInfo( &Qelt->ConnInfo, AddressType ); - if( NT_SUCCESS(Status) ) - { - TaCopyTransportAddressInPlace( Qelt->ConnInfo->RemoteAddress, + if( NT_SUCCESS(Status) ) { + TaCopyTransportAddressInPlace + ( Qelt->ConnInfo->RemoteAddress, FCB->ListenIrp.ConnectionReturnInfo->RemoteAddress ); InsertTailList( &FCB->PendingConnections, &Qelt->ListEntry ); } } /* Satisfy a pre-accept request if one is available */ - if (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_PREACCEPT] ) && - !IsListEmpty( &FCB->PendingConnections ) ) - { - PLIST_ENTRY PendingIrp = RemoveHeadList( &FCB->PendingIrpList[FUNCTION_PREACCEPT] ); - PLIST_ENTRY PendingConn = FCB->PendingConnections.Flink; - - SatisfyPreAccept( CONTAINING_RECORD( PendingIrp, IRP, - Tail.Overlay.ListEntry ), - CONTAINING_RECORD( PendingConn, AFD_TDI_OBJECT_QELT, - ListEntry ) ); + if( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_PREACCEPT] ) && + !IsListEmpty( &FCB->PendingConnections ) ) { + PLIST_ENTRY PendingIrp = + RemoveHeadList( &FCB->PendingIrpList[FUNCTION_PREACCEPT] ); + PLIST_ENTRY PendingConn = FCB->PendingConnections.Flink; + SatisfyPreAccept + ( CONTAINING_RECORD( PendingIrp, IRP, + Tail.Overlay.ListEntry ), + CONTAINING_RECORD( PendingConn, AFD_TDI_OBJECT_QELT, + ListEntry ) ); } /* Launch new accept socket */ - DbgPrint("[AFD, ListenComplete] Getting warm connection socket\n"); Status = WarmSocketForConnection( FCB ); if (NT_SUCCESS(Status)) { - DbgPrint("[AFD, ListenComplete] Done getting warm connection socket\n"); Status = TdiBuildNullConnectionInfoInPlace(FCB->ListenIrp.ConnectionCallInfo, FCB->LocalAddress->Address[0].AddressType); ASSERT(Status == STATUS_SUCCESS); @@ -243,7 +194,6 @@ ListenComplete FCB->LocalAddress->Address[0].AddressType); ASSERT(Status == STATUS_SUCCESS); - DbgPrint("[AFD, ListenComplete] callings TdiListen\n"); Status = TdiListen( &FCB->ListenIrp.InFlightRequest, FCB->Connection.Object, &FCB->ListenIrp.ConnectionCallInfo, @@ -257,45 +207,37 @@ ListenComplete } /* Trigger a select return if appropriate */ - if (!IsListEmpty( &FCB->PendingConnections)) - { - FCB->PollState |= AFD_EVENT_ACCEPT; + if( !IsListEmpty( &FCB->PendingConnections ) ) { + FCB->PollState |= AFD_EVENT_ACCEPT; FCB->PollStatus[FD_ACCEPT_BIT] = STATUS_SUCCESS; PollReeval( FCB->DeviceExt, FCB->FileObject ); - } - else + } else FCB->PollState &= ~AFD_EVENT_ACCEPT; SocketStateUnlock( FCB ); - DbgPrint("[AFD, ListenComplete] Leaving. Status = 0x%x\n", Status); - return Status; } NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, - PIO_STACK_LOCATION IrpSp) -{ + PIO_STACK_LOCATION IrpSp) { NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_LISTEN_DATA ListenReq; - AFD_DbgPrint(MID_TRACE,("Called on 0x%x\n", FCB)); - DbgPrint("[AfdListenSocket] Called on 0x%x\n", FCB); + AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if ( !SocketAcquireStateLock(FCB) ) - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - if ( !(ListenReq = (PAFD_LISTEN_DATA)LockRequest(Irp, IrpSp)) ) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if( !(ListenReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, + 0 ); - if (FCB->State != SOCKET_STATE_BOUND) - { - Status = STATUS_INVALID_PARAMETER; - AFD_DbgPrint(MID_TRACE,("Could not listen an unbound socket\n")); - DbgPrint("[AfdListenSocket] Could not listen an unbound socket\n"); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); + if( FCB->State != SOCKET_STATE_BOUND ) { + Status = STATUS_INVALID_PARAMETER; + AFD_DbgPrint(MID_TRACE,("Could not listen an unbound socket\n")); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); } FCB->DelayedAccept = ListenReq->UseDelayedAcceptance; @@ -305,18 +247,17 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, Status = WarmSocketForConnection( FCB ); AFD_DbgPrint(MID_TRACE,("Status from warmsocket %x\n", Status)); - DbgPrint("[AfdListenSocket] Status from warmsocket 0x%x\n", Status); - if (!NT_SUCCESS(Status)) - return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); + if( !NT_SUCCESS(Status) ) return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); - Status = TdiBuildNullConnectionInfo(&FCB->ListenIrp.ConnectionCallInfo, + Status = TdiBuildNullConnectionInfo + ( &FCB->ListenIrp.ConnectionCallInfo, FCB->LocalAddress->Address[0].AddressType ); - if (!NT_SUCCESS(Status)) - return UnlockAndMaybeComplete(FCB, Status, Irp, 0); + if (!NT_SUCCESS(Status)) return UnlockAndMaybeComplete(FCB, Status, Irp, 0); - Status = TdiBuildNullConnectionInfo(&FCB->ListenIrp.ConnectionReturnInfo, + Status = TdiBuildNullConnectionInfo + ( &FCB->ListenIrp.ConnectionReturnInfo, FCB->LocalAddress->Address[0].AddressType ); if (!NT_SUCCESS(Status)) @@ -336,138 +277,117 @@ NTSTATUS AfdListenSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, ListenComplete, FCB ); - if (Status == STATUS_PENDING) - Status = STATUS_SUCCESS; + if( Status == STATUS_PENDING ) + Status = STATUS_SUCCESS; AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - DbgPrint("[AfdListenSocket] Returning 0x%x\n", Status); - return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); } NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp, - PIO_STACK_LOCATION IrpSp ) -{ + PIO_STACK_LOCATION IrpSp ) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; NTSTATUS Status; AFD_DbgPrint(MID_TRACE,("Called\n")); - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - if (!IsListEmpty(&FCB->PendingConnections)) - { - PLIST_ENTRY PendingConn = FCB->PendingConnections.Flink; + if( !IsListEmpty( &FCB->PendingConnections ) ) { + PLIST_ENTRY PendingConn = FCB->PendingConnections.Flink; - /* We have a pending connection ... complete this irp right away */ - Status = SatisfyPreAccept(Irp, - CONTAINING_RECORD(PendingConn, AFD_TDI_OBJECT_QELT, ListEntry)); + /* We have a pending connection ... complete this irp right away */ + Status = SatisfyPreAccept + ( Irp, + CONTAINING_RECORD + ( PendingConn, AFD_TDI_OBJECT_QELT, ListEntry ) ); - AFD_DbgPrint(MID_TRACE,("Completed a wait for accept\n")); - DbgPrint("[AfdWaitForListen] Completed a wait for accept\n"); + AFD_DbgPrint(MID_TRACE,("Completed a wait for accept\n")); - if (!IsListEmpty(&FCB->PendingConnections)) + if ( !IsListEmpty( &FCB->PendingConnections ) ) { - FCB->PollState |= AFD_EVENT_ACCEPT; - FCB->PollStatus[FD_ACCEPT_BIT] = STATUS_SUCCESS; - PollReeval( FCB->DeviceExt, FCB->FileObject ); - } - else - FCB->PollState &= ~AFD_EVENT_ACCEPT; + FCB->PollState |= AFD_EVENT_ACCEPT; + FCB->PollStatus[FD_ACCEPT_BIT] = STATUS_SUCCESS; + PollReeval( FCB->DeviceExt, FCB->FileObject ); + } else + FCB->PollState &= ~AFD_EVENT_ACCEPT; - SocketStateUnlock( FCB ); - return Status; - } - else - { - AFD_DbgPrint(MID_TRACE,("Holding\n")); - DbgPrint("[AfdWaitForListen] Holding\n"); + SocketStateUnlock( FCB ); + return Status; + } else if (FCB->NonBlocking) { + AFD_DbgPrint(MID_TRACE,("No connection ready on a non-blocking socket\n")); + + return UnlockAndMaybeComplete(FCB, STATUS_CANT_WAIT, Irp, 0); + } else { + AFD_DbgPrint(MID_TRACE,("Holding\n")); - return LeaveIrpUntilLater( FCB, Irp, FUNCTION_PREACCEPT ); + return LeaveIrpUntilLater( FCB, Irp, FUNCTION_PREACCEPT ); } } NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp, - PIO_STACK_LOCATION IrpSp ) -{ + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; PAFD_DEVICE_EXTENSION DeviceExt = (PAFD_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; - PAFD_ACCEPT_DATA AcceptData = - (PAFD_ACCEPT_DATA)Irp->AssociatedIrp.SystemBuffer; + PAFD_FCB FCB = FileObject->FsContext; + PAFD_ACCEPT_DATA AcceptData = Irp->AssociatedIrp.SystemBuffer; PLIST_ENTRY PendingConn; AFD_DbgPrint(MID_TRACE,("Called\n")); - DbgPrint("[AfdAccept] Called...\n"); - if (!SocketAcquireStateLock(FCB)) - { - DbgPrint("[AfdAccept] Lost socket\n"); - return LostSocket( Irp ); - } + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - for (PendingConn = FCB->PendingConnections.Flink; - PendingConn != &FCB->PendingConnections; - PendingConn = PendingConn->Flink ) - { - PAFD_TDI_OBJECT_QELT PendingConnObj = - CONTAINING_RECORD( PendingConn, AFD_TDI_OBJECT_QELT, ListEntry ); + for( PendingConn = FCB->PendingConnections.Flink; + PendingConn != &FCB->PendingConnections; + PendingConn = PendingConn->Flink ) { + PAFD_TDI_OBJECT_QELT PendingConnObj = + CONTAINING_RECORD( PendingConn, AFD_TDI_OBJECT_QELT, ListEntry ); - AFD_DbgPrint(MID_TRACE,("Comparing Seq %d to Q %d\n", - AcceptData->SequenceNumber, - PendingConnObj->Seq)); - DbgPrint("[AfdAccept] Comparing Seq %d to Q %d\n", - AcceptData->SequenceNumber, - PendingConnObj->Seq); + AFD_DbgPrint(MID_TRACE,("Comparing Seq %d to Q %d\n", + AcceptData->SequenceNumber, + PendingConnObj->Seq)); - if (PendingConnObj->Seq == AcceptData->SequenceNumber) - { - PFILE_OBJECT NewFileObject = NULL; + if( PendingConnObj->Seq == AcceptData->SequenceNumber ) { + PFILE_OBJECT NewFileObject = NULL; - RemoveEntryList(PendingConn); + RemoveEntryList( PendingConn ); - Status = ObReferenceObjectByHandle( AcceptData->ListenHandle, - FILE_ALL_ACCESS, - NULL, - KernelMode, - (PVOID *)&NewFileObject, - NULL ); + Status = ObReferenceObjectByHandle + ( AcceptData->ListenHandle, + FILE_ALL_ACCESS, + NULL, + KernelMode, + (PVOID *)&NewFileObject, + NULL ); - if (!NT_SUCCESS(Status)) - return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); + if( !NT_SUCCESS(Status) ) return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); ASSERT(NewFileObject != FileObject); ASSERT(NewFileObject->FsContext != FCB); - /* We have a pending connection ... complete this irp right away */ - Status = SatisfyAccept( DeviceExt, Irp, NewFileObject, PendingConnObj ); + /* We have a pending connection ... complete this irp right away */ + Status = SatisfyAccept( DeviceExt, Irp, NewFileObject, PendingConnObj ); - ObDereferenceObject( NewFileObject ); + ObDereferenceObject( NewFileObject ); - AFD_DbgPrint(MID_TRACE,("Completed a wait for accept\n")); - DbgPrint("[AfdAccept] Completed a wait for accept\n"); + AFD_DbgPrint(MID_TRACE,("Completed a wait for accept\n")); - ExFreePool( PendingConnObj ); + ExFreePool( PendingConnObj ); - if (!IsListEmpty( &FCB->PendingConnections)) - { - FCB->PollState |= AFD_EVENT_ACCEPT; + if( !IsListEmpty( &FCB->PendingConnections ) ) { + FCB->PollState |= AFD_EVENT_ACCEPT; FCB->PollStatus[FD_ACCEPT_BIT] = STATUS_SUCCESS; - PollReeval(FCB->DeviceExt, FCB->FileObject); - } - else + PollReeval( FCB->DeviceExt, FCB->FileObject ); + } else FCB->PollState &= ~AFD_EVENT_ACCEPT; - SocketStateUnlock(FCB); - return Status; - } + SocketStateUnlock( FCB ); + return Status; + } } - DbgPrint("[AfdAccept] Done\n"); - return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0 ); } diff --git a/drivers/network/afd/afd/lock.c b/drivers/network/afd/afd/lock.c index e5528f85f9d..93b41e07ab2 100644 --- a/drivers/network/afd/afd/lock.c +++ b/drivers/network/afd/afd/lock.c @@ -21,8 +21,7 @@ PVOID GetLockedData(PIRP Irp, PIO_STACK_LOCATION IrpSp) } /* Lock a method_neither request so it'll be available from DISPATCH_LEVEL */ -PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) -{ +PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { BOOLEAN LockFailed = FALSE; ASSERT(!Irp->MdlAddress); @@ -41,27 +40,19 @@ PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) FALSE, FALSE, NULL ); - if( Irp->MdlAddress ) - { - _SEH2_TRY - { + if( Irp->MdlAddress ) { + _SEH2_TRY { MmProbeAndLockPages( Irp->MdlAddress, Irp->RequestorMode, IoModifyAccess ); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { LockFailed = TRUE; - } - _SEH2_END; + } _SEH2_END; - if (LockFailed) - { - IoFreeMdl(Irp->MdlAddress); + if( LockFailed ) { + IoFreeMdl( Irp->MdlAddress ); Irp->MdlAddress = NULL; return NULL; } - } - else - return NULL; + } else return NULL; break; case IRP_MJ_READ: @@ -75,27 +66,19 @@ PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) FALSE, FALSE, NULL ); - if (Irp->MdlAddress) - { - _SEH2_TRY - { - MmProbeAndLockPages(Irp->MdlAddress, Irp->RequestorMode, IoModifyAccess); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { + if( Irp->MdlAddress ) { + _SEH2_TRY { + MmProbeAndLockPages( Irp->MdlAddress, Irp->RequestorMode, IoModifyAccess ); + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { LockFailed = TRUE; - } - _SEH2_END; + } _SEH2_END; - if (LockFailed) - { - IoFreeMdl(Irp->MdlAddress); + if( LockFailed ) { + IoFreeMdl( Irp->MdlAddress ); Irp->MdlAddress = NULL; return NULL; } - } - else - return NULL; + } else return NULL; break; default: @@ -106,7 +89,7 @@ PVOID LockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) return GetLockedData(Irp, IrpSp); } -VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp) +VOID UnlockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { ASSERT(Irp->MdlAddress); MmUnlockPages( Irp->MdlAddress ); @@ -118,36 +101,28 @@ VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp) * treat the address buffer as an ordinary client buffer. It's only used * for datagrams. */ -PAFD_WSABUF -LockBuffers -( PAFD_WSABUF Buf, UINT Count, - PVOID AddressBuf, PINT AddressLen, - BOOLEAN Write, BOOLEAN LockAddress ) -{ +PAFD_WSABUF LockBuffers( PAFD_WSABUF Buf, UINT Count, + PVOID AddressBuf, PINT AddressLen, + BOOLEAN Write, BOOLEAN LockAddress ) { UINT i; /* Copy the buffer array so we don't lose it */ UINT Lock = LockAddress ? 2 : 0; UINT Size = sizeof(AFD_WSABUF) * (Count + Lock); - PAFD_WSABUF NewBuf = (PAFD_WSABUF)ExAllocatePool(PagedPool, Size * 2); + PAFD_WSABUF NewBuf = ExAllocatePool( PagedPool, Size * 2 ); BOOLEAN LockFailed = FALSE; PAFD_MAPBUF MapBuf; AFD_DbgPrint(MID_TRACE,("Called(%08x)\n", NewBuf)); - if (NewBuf) - { + if( NewBuf ) { RtlZeroMemory(NewBuf, Size * 2); - MapBuf = (PAFD_MAPBUF)(NewBuf + Count + Lock); + MapBuf = (PAFD_MAPBUF)(NewBuf + Count + Lock); - _SEH2_TRY - { - RtlCopyMemory(NewBuf, Buf, sizeof(AFD_WSABUF) * Count); - - if (LockAddress) - { - if (AddressBuf && AddressLen) - { + _SEH2_TRY { + RtlCopyMemory( NewBuf, Buf, sizeof(AFD_WSABUF) * Count ); + if( LockAddress ) { + if (AddressBuf && AddressLen) { NewBuf[Count].buf = AddressBuf; NewBuf[Count].len = *AddressLen; NewBuf[Count + 1].buf = (PVOID)AddressLen; @@ -155,68 +130,52 @@ LockBuffers } Count += 2; } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { AFD_DbgPrint(MIN_TRACE,("Access violation copying buffer info " "from userland (%x %x)\n", Buf, AddressLen)); - ExFreePool(NewBuf); + ExFreePool( NewBuf ); _SEH2_YIELD(return NULL); - } - _SEH2_END; + } _SEH2_END; - for (i = 0; i < Count; i++) - { - AFD_DbgPrint(MID_TRACE,("Locking buffer %d (%x:%d)\n", - i, NewBuf[i].buf, NewBuf[i].len)); + for( i = 0; i < Count; i++ ) { + AFD_DbgPrint(MID_TRACE,("Locking buffer %d (%x:%d)\n", + i, NewBuf[i].buf, NewBuf[i].len)); - if (NewBuf[i].buf && NewBuf[i].len) - { - MapBuf[i].Mdl = IoAllocateMdl( NewBuf[i].buf, - NewBuf[i].len, - FALSE, - FALSE, - NULL ); - } - else - { - MapBuf[i].Mdl = NULL; - continue; - } - - AFD_DbgPrint(MID_TRACE,("NewMdl @ %x\n", MapBuf[i].Mdl)); - - if (MapBuf[i].Mdl) - { - AFD_DbgPrint(MID_TRACE,("Probe and lock pages\n")); - _SEH2_TRY - { - MmProbeAndLockPages( MapBuf[i].Mdl, KernelMode, - Write ? IoModifyAccess : IoReadAccess ); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - LockFailed = TRUE; - } - _SEH2_END; - - AFD_DbgPrint(MID_TRACE,("MmProbeAndLock finished\n")); - - if (LockFailed) - { - IoFreeMdl( MapBuf[i].Mdl ); - MapBuf[i].Mdl = NULL; - ExFreePool( NewBuf ); - return NULL; - } - } - else - { - ExFreePool( NewBuf ); - return NULL; - } + if( NewBuf[i].buf && NewBuf[i].len ) { + MapBuf[i].Mdl = IoAllocateMdl( NewBuf[i].buf, + NewBuf[i].len, + FALSE, + FALSE, + NULL ); + } else { + MapBuf[i].Mdl = NULL; + continue; } + + AFD_DbgPrint(MID_TRACE,("NewMdl @ %x\n", MapBuf[i].Mdl)); + + if( MapBuf[i].Mdl ) { + AFD_DbgPrint(MID_TRACE,("Probe and lock pages\n")); + _SEH2_TRY { + MmProbeAndLockPages( MapBuf[i].Mdl, KernelMode, + Write ? IoModifyAccess : IoReadAccess ); + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + LockFailed = TRUE; + } _SEH2_END; + AFD_DbgPrint(MID_TRACE,("MmProbeAndLock finished\n")); + + if( LockFailed ) { + IoFreeMdl( MapBuf[i].Mdl ); + MapBuf[i].Mdl = NULL; + ExFreePool( NewBuf ); + return NULL; + } + } else { + ExFreePool( NewBuf ); + return NULL; + } + } } AFD_DbgPrint(MID_TRACE,("Leaving %x\n", NewBuf)); @@ -224,90 +183,75 @@ LockBuffers return NewBuf; } -VOID UnlockBuffers(PAFD_WSABUF Buf, UINT Count, BOOL Address) -{ +VOID UnlockBuffers( PAFD_WSABUF Buf, UINT Count, BOOL Address ) { UINT Lock = Address ? 2 : 0; PAFD_MAPBUF Map = (PAFD_MAPBUF)(Buf + Count + Lock); UINT i; - if (!Buf) - return; + if( !Buf ) return; - for (i=0; i < Count + Lock; i++) - { - if (Map[i].Mdl) - { - MmUnlockPages( Map[i].Mdl ); - IoFreeMdl( Map[i].Mdl ); - Map[i].Mdl = NULL; - } + for( i = 0; i < Count + Lock; i++ ) { + if( Map[i].Mdl ) { + MmUnlockPages( Map[i].Mdl ); + IoFreeMdl( Map[i].Mdl ); + Map[i].Mdl = NULL; + } } - ExFreePool(Buf); + ExFreePool( Buf ); Buf = NULL; } /* Produce a kernel-land handle array with handles replaced by object * pointers. This will allow the system to do proper alerting */ -PAFD_HANDLE LockHandles(PAFD_HANDLE HandleArray, UINT HandleCount) -{ +PAFD_HANDLE LockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ) { UINT i; NTSTATUS Status = STATUS_SUCCESS; - PAFD_HANDLE FileObjects = - (PAFD_HANDLE)ExAllocatePool(NonPagedPool, HandleCount * sizeof(AFD_HANDLE)); + PAFD_HANDLE FileObjects = ExAllocatePool + ( NonPagedPool, HandleCount * sizeof(AFD_HANDLE) ); - for (i=0; FileObjects && i < HandleCount; i++) - { - FileObjects[i].Status = 0; - FileObjects[i].Events = HandleArray[i].Events; + for( i = 0; FileObjects && i < HandleCount; i++ ) { + FileObjects[i].Status = 0; + FileObjects[i].Events = HandleArray[i].Events; FileObjects[i].Handle = 0; - - if (!HandleArray[i].Handle) - continue; - - if (NT_SUCCESS(Status)) - { - Status = ObReferenceObjectByHandle - ( (PVOID)HandleArray[i].Handle, - FILE_ALL_ACCESS, - NULL, - KernelMode, - (PVOID*)&FileObjects[i].Handle, - NULL ); - } + if( !HandleArray[i].Handle ) continue; + if( NT_SUCCESS(Status) ) { + Status = ObReferenceObjectByHandle + ( (PVOID)HandleArray[i].Handle, + FILE_ALL_ACCESS, + NULL, + KernelMode, + (PVOID*)&FileObjects[i].Handle, + NULL ); + } - if (!NT_SUCCESS(Status)) + if( !NT_SUCCESS(Status) ) FileObjects[i].Handle = 0; } - if (!NT_SUCCESS(Status)) - { - UnlockHandles(FileObjects, HandleCount); - return NULL; + if( !NT_SUCCESS(Status) ) { + UnlockHandles( FileObjects, HandleCount ); + return NULL; } return FileObjects; } -VOID UnlockHandles(PAFD_HANDLE HandleArray, UINT HandleCount) -{ +VOID UnlockHandles( PAFD_HANDLE HandleArray, UINT HandleCount ) { UINT i; - for (i = 0; i < HandleCount; i++) - { - if (HandleArray[i].Handle) - ObDereferenceObject( (PVOID)HandleArray[i].Handle ); + for( i = 0; i < HandleCount; i++ ) { + if( HandleArray[i].Handle ) + ObDereferenceObject( (PVOID)HandleArray[i].Handle ); } - ExFreePool(HandleArray); + ExFreePool( HandleArray ); HandleArray = NULL; } -BOOLEAN SocketAcquireStateLock(PAFD_FCB FCB) -{ - if (!FCB ) - return FALSE; +BOOLEAN SocketAcquireStateLock( PAFD_FCB FCB ) { + if( !FCB ) return FALSE; return !KeWaitForMutexObject(&FCB->Mutex, Executive, @@ -316,45 +260,30 @@ BOOLEAN SocketAcquireStateLock(PAFD_FCB FCB) NULL); } -VOID SocketStateUnlock(PAFD_FCB FCB) -{ +VOID SocketStateUnlock( PAFD_FCB FCB ) { KeReleaseMutex(&FCB->Mutex, FALSE); } -NTSTATUS -NTAPI -UnlockAndMaybeComplete -( PAFD_FCB FCB, - NTSTATUS Status, - PIRP Irp, - UINT Information ) -{ +NTSTATUS NTAPI UnlockAndMaybeComplete +( PAFD_FCB FCB, NTSTATUS Status, PIRP Irp, + UINT Information ) { Irp->IoStatus.Status = Status; Irp->IoStatus.Information = Information; - - if (Irp->MdlAddress) - UnlockRequest( Irp, IoGetCurrentIrpStackLocation(Irp)); - + if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); (void)IoSetCancelRoutine(Irp, NULL); - - SocketStateUnlock(FCB); - IoCompleteRequest(Irp, IO_NETWORK_INCREMENT); + SocketStateUnlock( FCB ); + IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); return Status; } -NTSTATUS LostSocket(PIRP Irp) -{ +NTSTATUS LostSocket( PIRP Irp ) { NTSTATUS Status = STATUS_FILE_CLOSED; AFD_DbgPrint(MIN_TRACE,("Called.\n")); - Irp->IoStatus.Information = 0; Irp->IoStatus.Status = Status; - - if (Irp->MdlAddress) - UnlockRequest(Irp, IoGetCurrentIrpStackLocation(Irp)); - IoCompleteRequest(Irp, IO_NO_INCREMENT); - + if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); + IoCompleteRequest( Irp, IO_NO_INCREMENT ); return Status; } @@ -386,15 +315,15 @@ NTSTATUS QueueUserModeIrp(PAFD_FCB FCB, PIRP Irp, UINT Function) * so we are to call the cancel routine ourselves right here to cancel the IRP * (which handles all the stuff we do above) and return STATUS_CANCELLED to the caller */ - AfdCancelHandler(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp); + AfdCancelHandler(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, + Irp); Status = STATUS_CANCELLED; } - + return Status; } -NTSTATUS LeaveIrpUntilLater(PAFD_FCB FCB, PIRP Irp, UINT Function) -{ +NTSTATUS LeaveIrpUntilLater( PAFD_FCB FCB, PIRP Irp, UINT Function ) { NTSTATUS Status; Status = QueueUserModeIrp(FCB, Irp, Function); diff --git a/drivers/network/afd/afd/main.c b/drivers/network/afd/afd/main.c index dc022559616..ab1bae17f99 100644 --- a/drivers/network/afd/afd/main.c +++ b/drivers/network/afd/afd/main.c @@ -25,31 +25,38 @@ DWORD DebugTraceLevel = 0; #endif /* DBG */ +void OskitDumpBuffer( PCHAR Data, UINT Len ) { + unsigned int i; + + for( i = 0; i < Len; i++ ) { + if( i && !(i & 0xf) ) DbgPrint( "\n" ); + if( !(i & 0xf) ) DbgPrint( "%08x: ", (UINT)(Data + i) ); + DbgPrint( " %02x", Data[i] & 0xff ); + } + DbgPrint("\n"); +} + /* FUNCTIONS */ -NTSTATUS -NTAPI +NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); -NTSTATUS -NTAPI +NTSTATUS NTAPI AfdGetDisconnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; UINT BufferSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (FCB->DisconnectOptionsSize == 0) return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0); ASSERT(FCB->DisconnectOptions); - if (FCB->FilledDisconnectOptions < BufferSize) - BufferSize = FCB->FilledDisconnectOptions; + if (FCB->FilledDisconnectOptions < BufferSize) BufferSize = FCB->FilledDisconnectOptions; RtlCopyMemory(Irp->UserBuffer, FCB->DisconnectOptions, @@ -64,12 +71,11 @@ AfdSetDisconnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PVOID DisconnectOptions = LockRequest(Irp, IrpSp); UINT DisconnectOptionsSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!DisconnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -83,9 +89,7 @@ AfdSetDisconnectOptions(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->DisconnectOptions = ExAllocatePool(PagedPool, DisconnectOptionsSize); - - if (!FCB->DisconnectOptions) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->DisconnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); RtlCopyMemory(FCB->DisconnectOptions, DisconnectOptions, @@ -102,12 +106,11 @@ AfdSetDisconnectOptionsSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; - PUINT DisconnectOptionsSize = (PUINT)LockRequest(Irp, IrpSp); + PAFD_FCB FCB = FileObject->FsContext; + PUINT DisconnectOptionsSize = LockRequest(Irp, IrpSp); UINT BufferSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!DisconnectOptionsSize) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -123,34 +126,29 @@ AfdSetDisconnectOptionsSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->DisconnectOptions = ExAllocatePool(PagedPool, *DisconnectOptionsSize); - - if (!FCB->DisconnectOptions) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->DisconnectOptions) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); FCB->DisconnectOptionsSize = *DisconnectOptionsSize; return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, 0); } -NTSTATUS -NTAPI +NTSTATUS NTAPI AfdGetDisconnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; UINT BufferSize = IrpSp->Parameters.DeviceIoControl.OutputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (FCB->DisconnectDataSize == 0) return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0); ASSERT(FCB->DisconnectData); - if (FCB->FilledDisconnectData < BufferSize) - BufferSize = FCB->FilledDisconnectData; + if (FCB->FilledDisconnectData < BufferSize) BufferSize = FCB->FilledDisconnectData; RtlCopyMemory(Irp->UserBuffer, FCB->DisconnectData, @@ -165,12 +163,11 @@ AfdSetDisconnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PVOID DisconnectData = LockRequest(Irp, IrpSp); UINT DisconnectDataSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!DisconnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -184,9 +181,7 @@ AfdSetDisconnectData(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->DisconnectData = ExAllocatePool(PagedPool, DisconnectDataSize); - - if (!FCB->DisconnectData) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->DisconnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); RtlCopyMemory(FCB->DisconnectData, DisconnectData, @@ -203,12 +198,11 @@ AfdSetDisconnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; - PUINT DisconnectDataSize = (PUINT)LockRequest(Irp, IrpSp); + PAFD_FCB FCB = FileObject->FsContext; + PUINT DisconnectDataSize = LockRequest(Irp, IrpSp); UINT BufferSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); if (!DisconnectDataSize) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); @@ -224,24 +218,20 @@ AfdSetDisconnectDataSize(PDEVICE_OBJECT DeviceObject, PIRP Irp, } FCB->DisconnectData = ExAllocatePool(PagedPool, *DisconnectDataSize); - - if (!FCB->DisconnectData) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if (!FCB->DisconnectData) return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); FCB->DisconnectDataSize = *DisconnectDataSize; return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, 0); } -static -NTSTATUS -NTAPI +static NTSTATUS NTAPI AfdGetTdiHandles(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; - PULONG HandleFlags = (PULONG)LockRequest(Irp, IrpSp); + PAFD_FCB FCB = FileObject->FsContext; + PULONG HandleFlags = LockRequest(Irp, IrpSp); PAFD_TDI_HANDLE_DATA HandleData = Irp->UserBuffer; if (!SocketAcquireStateLock(FCB)) return LostSocket(Irp); @@ -262,12 +252,9 @@ AfdGetTdiHandles(PDEVICE_OBJECT DeviceObject, PIRP Irp, return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, 0); } -static -NTSTATUS -NTAPI +static NTSTATUS NTAPI AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, - PIO_STACK_LOCATION IrpSp) -{ + PIO_STACK_LOCATION IrpSp) { PAFD_FCB FCB; PFILE_OBJECT FileObject; PAFD_DEVICE_EXTENSION DeviceExt; @@ -281,8 +268,6 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, AFD_DbgPrint(MID_TRACE, ("AfdCreate(DeviceObject %p Irp %p)\n", DeviceObject, Irp)); - DbgPrint("[AFD, AfdCreate] Called\n"); - DeviceExt = DeviceObject->DeviceExtension; FileObject = IrpSp->FileObject; Disposition = (IrpSp->Parameters.Create.Options >> 24) & 0xff; @@ -291,33 +276,28 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, EaInfo = Irp->AssociatedIrp.SystemBuffer; - if (EaInfo) - { - ConnectInfo = (PAFD_CREATE_PACKET)(EaInfo->EaName + EaInfo->EaNameLength + 1); - EaInfoValue = (PWCHAR)(((PCHAR)ConnectInfo) + sizeof(AFD_CREATE_PACKET)); + if( EaInfo ) { + ConnectInfo = (PAFD_CREATE_PACKET)(EaInfo->EaName + EaInfo->EaNameLength + 1); + EaInfoValue = (PWCHAR)(((PCHAR)ConnectInfo) + sizeof(AFD_CREATE_PACKET)); - EaLength = sizeof(FILE_FULL_EA_INFORMATION) + - EaInfo->EaNameLength + - EaInfo->EaValueLength; + EaLength = sizeof(FILE_FULL_EA_INFORMATION) + + EaInfo->EaNameLength + + EaInfo->EaValueLength; - AFD_DbgPrint(MID_TRACE,("EaInfo: %x, EaInfoValue: %x\n", - EaInfo, EaInfoValue)); + AFD_DbgPrint(MID_TRACE,("EaInfo: %x, EaInfoValue: %x\n", + EaInfo, EaInfoValue)); } AFD_DbgPrint(MID_TRACE,("About to allocate the new FCB\n")); - FCB = (PAFD_FCB)ExAllocatePool(NonPagedPool, sizeof(AFD_FCB)); - RtlZeroMemory(FCB, sizeof(AFD_FCB)); - - if (FCB == NULL) - { - Irp->IoStatus.Status = STATUS_NO_MEMORY; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_NO_MEMORY; + FCB = ExAllocatePool(NonPagedPool, sizeof(AFD_FCB)); + if( FCB == NULL ) { + Irp->IoStatus.Status = STATUS_NO_MEMORY; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_NO_MEMORY; } - AFD_DbgPrint(MID_TRACE,("Initializing the new FCB @ %x (FileObject %x Flags %x)\n", - FCB, FileObject, ConnectInfo ? ConnectInfo->EndpointFlags : 0)); + AFD_DbgPrint(MID_TRACE,("Initializing the new FCB @ %x (FileObject %x Flags %x)\n", FCB, FileObject, ConnectInfo ? ConnectInfo->EndpointFlags : 0)); RtlZeroMemory( FCB, sizeof( *FCB ) ); @@ -330,97 +310,79 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, FCB->AddressFile.Handle = INVALID_HANDLE_VALUE; FCB->Connection.Handle = INVALID_HANDLE_VALUE; - KeInitializeMutex(&FCB->Mutex, 0); + KeInitializeMutex( &FCB->Mutex, 0 ); - for (i=0; i < MAX_FUNCTIONS; i++) - { - InitializeListHead(&FCB->PendingIrpList[i]); + for( i = 0; i < MAX_FUNCTIONS; i++ ) { + InitializeListHead( &FCB->PendingIrpList[i] ); } - InitializeListHead(&FCB->DatagramList); - InitializeListHead(&FCB->PendingConnections); + InitializeListHead( &FCB->DatagramList ); + InitializeListHead( &FCB->PendingConnections ); AFD_DbgPrint(MID_TRACE,("%x: Checking command channel\n", FCB)); - if (ConnectInfo) - { - FCB->TdiDeviceName.Length = ConnectInfo->SizeOfTransportName; - FCB->TdiDeviceName.MaximumLength = FCB->TdiDeviceName.Length; - FCB->TdiDeviceName.Buffer = ExAllocatePool(NonPagedPool, FCB->TdiDeviceName.Length); - - RtlZeroMemory(FCB->TdiDeviceName.Buffer, FCB->TdiDeviceName.Length); + if( ConnectInfo ) { + FCB->TdiDeviceName.Length = ConnectInfo->SizeOfTransportName; + FCB->TdiDeviceName.MaximumLength = FCB->TdiDeviceName.Length; + FCB->TdiDeviceName.Buffer = + ExAllocatePool( NonPagedPool, FCB->TdiDeviceName.Length ); - if (!FCB->TdiDeviceName.Buffer) - { - ExFreePool(FCB); - AFD_DbgPrint(MID_TRACE,("Could not copy target string\n")); - Irp->IoStatus.Status = STATUS_NO_MEMORY; - - IoCompleteRequest(Irp, IO_NETWORK_INCREMENT); - return STATUS_NO_MEMORY; - } + if( !FCB->TdiDeviceName.Buffer ) { + ExFreePool(FCB); + AFD_DbgPrint(MID_TRACE,("Could not copy target string\n")); + Irp->IoStatus.Status = STATUS_NO_MEMORY; + IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); + return STATUS_NO_MEMORY; + } - RtlCopyMemory( FCB->TdiDeviceName.Buffer, - ConnectInfo->TransportName, - FCB->TdiDeviceName.Length ); + RtlCopyMemory( FCB->TdiDeviceName.Buffer, + ConnectInfo->TransportName, + FCB->TdiDeviceName.Length ); - AFD_DbgPrint(MID_TRACE,("Success: %s %wZ\n", - EaInfo->EaName, &FCB->TdiDeviceName)); - } - else - { - AFD_DbgPrint(MID_TRACE,("Success: Control connection\n")); + AFD_DbgPrint(MID_TRACE,("Success: %s %wZ\n", + EaInfo->EaName, &FCB->TdiDeviceName)); + } else { + AFD_DbgPrint(MID_TRACE,("Success: Control connection\n")); } FileObject->FsContext = FCB; - DbgPrint("FileObject->FsContext = 0x%x\n", FCB); /* It seems that UDP sockets are writable from inception */ - if (FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) - { + if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS ) { AFD_DbgPrint(MID_TRACE,("Packet oriented socket\n")); - /* A datagram socket is always sendable */ - FCB->PollState |= AFD_EVENT_SEND; + /* A datagram socket is always sendable */ + FCB->PollState |= AFD_EVENT_SEND; FCB->PollStatus[FD_WRITE_BIT] = STATUS_SUCCESS; PollReeval( FCB->DeviceExt, FCB->FileObject ); } - if (!NT_SUCCESS(Status)) - { - if (FCB->TdiDeviceName.Buffer) - ExFreePool( FCB->TdiDeviceName.Buffer); - ExFreePool(FCB); - FileObject->FsContext = NULL; + if( !NT_SUCCESS(Status) ) { + if( FCB->TdiDeviceName.Buffer ) ExFreePool( FCB->TdiDeviceName.Buffer ); + ExFreePool( FCB ); + FileObject->FsContext = NULL; } Irp->IoStatus.Status = Status; IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); - DbgPrint("[AFD, AfdCreate] Leaving. Status = 0x%x\n", Status); - return Status; } -static -NTSTATUS -NTAPI -AfdCleanupSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) +static NTSTATUS NTAPI +AfdCleanupSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PLIST_ENTRY CurrentEntry, NextEntry; UINT Function; PIRP CurrentIrp; - DbgPrint("[AFD, AfdCleanupSocket] Called\n"); - - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket(Irp); for (Function = 0; Function < MAX_FUNCTIONS; Function++) { - /* Cancel IRPs from MSAFD to AFD (pending IRPs) */ CurrentEntry = FCB->PendingIrpList[Function].Flink; while (CurrentEntry != &FCB->PendingIrpList[Function]) { @@ -436,32 +398,25 @@ AfdCleanupSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp KillSelectsForFCB( FCB->DeviceExt, FileObject, FALSE ); - DbgPrint("[AFD, AfdCleanupSocket] Leaving\n"); - return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, 0); } -static -NTSTATUS -NTAPI +static NTSTATUS NTAPI AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; UINT i; PAFD_IN_FLIGHT_REQUEST InFlightRequest[IN_FLIGHT_REQUESTS]; PAFD_TDI_OBJECT_QELT Qelt; PLIST_ENTRY QeltEntry; - AFD_DbgPrint(MID_TRACE, ("AfdClose(DeviceObject %p Irp %p)\n", DeviceObject, Irp)); - DbgPrint("[AFD, AfdCloseSocket] Called\n"); + AFD_DbgPrint(MID_TRACE, + ("AfdClose(DeviceObject %p Irp %p)\n", DeviceObject, Irp)); - if (!SocketAcquireStateLock(FCB)) - return STATUS_FILE_CLOSED; - - DbgPrint("[AFD, AfdCloseSocket] Setting closed state\n"); + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; FCB->State = SOCKET_STATE_CLOSED; @@ -470,17 +425,13 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, InFlightRequest[2] = &FCB->SendIrp; InFlightRequest[3] = &FCB->ConnectIrp; - DbgPrint("[AFD, AfdCloseSocket] Canceling in flight requests (AFD -> tcpip)\n"); - /* Cancel our pending _In Flight_ IRPs - That is IRPs from AFD -> tcpip*/ - for (i=0; i < IN_FLIGHT_REQUESTS; i++) - { - if (InFlightRequest[i]->InFlightRequest) - { - AFD_DbgPrint(MID_TRACE,("Cancelling in flight irp %d (%x)\n", - i, InFlightRequest[i]->InFlightRequest)); + /* Cancel our pending requests */ + for( i = 0; i < IN_FLIGHT_REQUESTS; i++ ) { + if( InFlightRequest[i]->InFlightRequest ) { + AFD_DbgPrint(MID_TRACE,("Cancelling in flight irp %d (%x)\n", + i, InFlightRequest[i]->InFlightRequest)); IoCancelIrp(InFlightRequest[i]->InFlightRequest); - } + } } KillSelectsForFCB( FCB->DeviceExt, FileObject, FALSE ); @@ -489,8 +440,7 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, ASSERT(IsListEmpty(&FCB->PendingIrpList[FUNCTION_SEND])); ASSERT(IsListEmpty(&FCB->PendingIrpList[FUNCTION_RECV])); ASSERT(IsListEmpty(&FCB->PendingIrpList[FUNCTION_PREACCEPT])); - - DbgPrint("[AFD, AfdCloseSocket] Closing all pending connections\n"); + ASSERT(IsListEmpty(&FCB->PendingIrpList[FUNCTION_DISCONNECT])); while (!IsListEmpty(&FCB->PendingConnections)) { @@ -505,86 +455,74 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, ExFreePool(Qelt); } - DbgPrint("[AFD, AfdCloseSocket] Doing final cleanups\n"); + SocketStateUnlock( FCB ); - SocketStateUnlock(FCB); + if( FCB->EventSelect ) + ObDereferenceObject( FCB->EventSelect ); - if (FCB->EventSelect) - ObDereferenceObject(FCB->EventSelect); + if( FCB->Context ) + ExFreePool( FCB->Context ); - if (FCB->Context) - ExFreePool(FCB->Context); + if( FCB->Recv.Window ) + ExFreePool( FCB->Recv.Window ); - if (FCB->Recv.Window) - ExFreePool(FCB->Recv.Window); + if( FCB->Send.Window ) + ExFreePool( FCB->Send.Window ); - if (FCB->Send.Window) - ExFreePool(FCB->Send.Window); + if( FCB->AddressFrom ) + ExFreePool( FCB->AddressFrom ); - if ( FCB->AddressFrom ) - ExFreePool(FCB->AddressFrom); - - if (FCB->ConnectCallInfo) - ExFreePool(FCB->ConnectCallInfo); + if( FCB->ConnectCallInfo ) + ExFreePool( FCB->ConnectCallInfo ); - if (FCB->ConnectReturnInfo) - ExFreePool(FCB->ConnectReturnInfo); + if( FCB->ConnectReturnInfo ) + ExFreePool( FCB->ConnectReturnInfo ); - if (FCB->ConnectData) - ExFreePool(FCB->ConnectData); + if( FCB->ConnectData ) + ExFreePool( FCB->ConnectData ); - if (FCB->DisconnectData) - ExFreePool(FCB->DisconnectData); + if( FCB->DisconnectData ) + ExFreePool( FCB->DisconnectData ); - if (FCB->ConnectOptions) - ExFreePool(FCB->ConnectOptions); + if( FCB->ConnectOptions ) + ExFreePool( FCB->ConnectOptions ); - if (FCB->DisconnectOptions) - ExFreePool(FCB->DisconnectOptions); + if( FCB->DisconnectOptions ) + ExFreePool( FCB->DisconnectOptions ); - if (FCB->LocalAddress) - ExFreePool(FCB->LocalAddress); + if( FCB->LocalAddress ) + ExFreePool( FCB->LocalAddress ); - if (FCB->RemoteAddress) - ExFreePool(FCB->RemoteAddress); + if( FCB->RemoteAddress ) + ExFreePool( FCB->RemoteAddress ); - if (FCB->Connection.Object) + if( FCB->Connection.Object ) { TdiDisassociateAddressFile(FCB->Connection.Object); - ObDereferenceObject(FCB->Connection.Object); + ObDereferenceObject(FCB->Connection.Object); } - if (FCB->AddressFile.Object) - ObDereferenceObject(FCB->AddressFile.Object); + if( FCB->AddressFile.Object ) + ObDereferenceObject(FCB->AddressFile.Object); - DbgPrint("[AFD, AfdCloseSocket] Closing FCB->AddressFile.Handle\n"); - - if (FCB->AddressFile.Handle != INVALID_HANDLE_VALUE) + if( FCB->AddressFile.Handle != INVALID_HANDLE_VALUE ) { if (ZwClose(FCB->AddressFile.Handle) == STATUS_INVALID_HANDLE) { - DbgPrint("[AFD, AfdCloseSocket] INVALID ADDRESS FILE HANDLE VALUE: %x %x\n", FCB->AddressFile.Handle, FCB->AddressFile.Object); + DbgPrint("INVALID ADDRESS FILE HANDLE VALUE: %x %x\n", FCB->AddressFile.Handle, FCB->AddressFile.Object); } - FCB->AddressFile.Handle = NULL; } - DbgPrint("[AFD, AfdCloseSocket] Closing FCB->Connection.Handle\n"); - - if (FCB->Connection.Handle != INVALID_HANDLE_VALUE) + if( FCB->Connection.Handle != INVALID_HANDLE_VALUE ) { if (ZwClose(FCB->Connection.Handle) == STATUS_INVALID_HANDLE) { - DbgPrint("[AFD, AfdCloseSocket] INVALID CONNECTION HANDLE VALUE: %x %x\n", FCB->Connection.Handle, FCB->Connection.Object); + DbgPrint("INVALID CONNECTION HANDLE VALUE: %x %x\n", FCB->Connection.Handle, FCB->Connection.Object); } - FCB->Connection.Handle = NULL; } - DbgPrint("[AFD, AfdCloseSocket] Freeing FCB->TdiDeviceName.Buffer\n"); - - if (FCB->TdiDeviceName.Buffer) - ExFreePool(FCB->TdiDeviceName.Buffer); - - DbgPrint("[AFD, AfdCloseSocket] Freeing FCB\n"); + if( FCB->TdiDeviceName.Buffer ) + ExFreePool(FCB->TdiDeviceName.Buffer); ExFreePool(FCB); @@ -593,7 +531,6 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, IoCompleteRequest(Irp, IO_NETWORK_INCREMENT); AFD_DbgPrint(MID_TRACE, ("Returning success.\n")); - DbgPrint("[AFD, AfdCloseSocket] Leaving\n"); return STATUS_SUCCESS; } @@ -692,7 +629,6 @@ DoDisconnect(PAFD_FCB FCB) FCB, FCB->ConnectCallInfo, FCB->ConnectReturnInfo); - if (Status != STATUS_PENDING) { FCB->DisconnectPending = FALSE; @@ -713,36 +649,35 @@ RetryDisconnectCompletion(PAFD_FCB FCB) } } -static -NTSTATUS -NTAPI -AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +static NTSTATUS NTAPI +AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp) { PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_DISCONNECT_INFO DisReq; NTSTATUS Status = STATUS_SUCCESS; USHORT Flags = 0; PLIST_ENTRY CurrentEntry; PIRP CurrentIrp; - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - if (!(DisReq = LockRequest(Irp, IrpSp))) - return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0); + if( !(DisReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, + Irp, 0 ); - if (DisReq->DisconnectType & AFD_DISCONNECT_SEND) + if( DisReq->DisconnectType & AFD_DISCONNECT_SEND ) Flags |= TDI_DISCONNECT_RELEASE; - if (DisReq->DisconnectType & AFD_DISCONNECT_RECV || - DisReq->DisconnectType & AFD_DISCONNECT_ABORT) + if( DisReq->DisconnectType & AFD_DISCONNECT_RECV || + DisReq->DisconnectType & AFD_DISCONNECT_ABORT ) Flags |= TDI_DISCONNECT_ABORT; if (!(FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS)) { - if (!FCB->ConnectCallInfo) - return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0); - + if( !FCB->ConnectCallInfo ) + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, + Irp, 0 ); + if (FCB->DisconnectPending) { if (FCB->DisconnectIrp.InFlightRequest) @@ -766,6 +701,7 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) } FCB->DisconnectFlags = Flags; + FCB->DisconnectTimeout = DisReq->Timeout; FCB->DisconnectPending = TRUE; Status = QueueUserModeIrp(FCB, Irp, FUNCTION_DISCONNECT); @@ -788,7 +724,6 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) return Status; } - } else { @@ -806,9 +741,7 @@ AfdDisconnect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); } -static -NTSTATUS -NTAPI +static NTSTATUS NTAPI AfdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); @@ -818,176 +751,173 @@ AfdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) #endif AFD_DbgPrint(MID_TRACE,("AfdDispatch: %d\n", IrpSp->MajorFunction)); - - if (IrpSp->MajorFunction != IRP_MJ_CREATE) - { - AFD_DbgPrint(MID_TRACE,("FO %x, IrpSp->FO %x\n", - FileObject, IrpSp->FileObject)); - ASSERT(FileObject == IrpSp->FileObject); + if( IrpSp->MajorFunction != IRP_MJ_CREATE) { + AFD_DbgPrint(MID_TRACE,("FO %x, IrpSp->FO %x\n", + FileObject, IrpSp->FileObject)); + ASSERT(FileObject == IrpSp->FileObject); } Irp->IoStatus.Information = 0; switch(IrpSp->MajorFunction) { - /* opening and closing handles to the device */ - case IRP_MJ_CREATE: - /* Mostly borrowed from the named pipe file system */ - return AfdCreateSocket(DeviceObject, Irp, IrpSp); + /* opening and closing handles to the device */ + case IRP_MJ_CREATE: + /* Mostly borrowed from the named pipe file system */ + return AfdCreateSocket(DeviceObject, Irp, IrpSp); - case IRP_MJ_CLOSE: - /* Ditto the borrowing */ - return AfdCloseSocket(DeviceObject, Irp, IrpSp); + case IRP_MJ_CLOSE: + /* Ditto the borrowing */ + return AfdCloseSocket(DeviceObject, Irp, IrpSp); - case IRP_MJ_CLEANUP: - return AfdCleanupSocket(DeviceObject, Irp, IrpSp); + case IRP_MJ_CLEANUP: + return AfdCleanupSocket(DeviceObject, Irp, IrpSp); - /* write data */ - case IRP_MJ_WRITE: - return AfdConnectedSocketWriteData( DeviceObject, Irp, IrpSp, TRUE ); + /* write data */ + case IRP_MJ_WRITE: + return AfdConnectedSocketWriteData( DeviceObject, Irp, IrpSp, TRUE ); - /* read data */ - case IRP_MJ_READ: - return AfdConnectedSocketReadData( DeviceObject, Irp, IrpSp, TRUE ); + /* read data */ + case IRP_MJ_READ: + return AfdConnectedSocketReadData( DeviceObject, Irp, IrpSp, TRUE ); - case IRP_MJ_DEVICE_CONTROL: - { - switch( IrpSp->Parameters.DeviceIoControl.IoControlCode ) - { - case IOCTL_AFD_BIND: - return AfdBindSocket( DeviceObject, Irp, IrpSp ); + case IRP_MJ_DEVICE_CONTROL: + { + switch( IrpSp->Parameters.DeviceIoControl.IoControlCode ) { + case IOCTL_AFD_BIND: + return AfdBindSocket( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_CONNECT: - return AfdStreamSocketConnect( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_CONNECT: + return AfdStreamSocketConnect( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_START_LISTEN: - return AfdListenSocket( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_START_LISTEN: + return AfdListenSocket( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_RECV: - return AfdConnectedSocketReadData( DeviceObject, Irp, IrpSp, - FALSE ); + case IOCTL_AFD_RECV: + return AfdConnectedSocketReadData( DeviceObject, Irp, IrpSp, + FALSE ); - case IOCTL_AFD_SELECT: - return AfdSelect( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_SELECT: + return AfdSelect( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_EVENT_SELECT: - return AfdEventSelect( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_EVENT_SELECT: + return AfdEventSelect( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_ENUM_NETWORK_EVENTS: - return AfdEnumEvents( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_ENUM_NETWORK_EVENTS: + return AfdEnumEvents( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_RECV_DATAGRAM: - return AfdPacketSocketReadData( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_RECV_DATAGRAM: + return AfdPacketSocketReadData( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_SEND: - return AfdConnectedSocketWriteData( DeviceObject, Irp, IrpSp, - FALSE ); + case IOCTL_AFD_SEND: + return AfdConnectedSocketWriteData( DeviceObject, Irp, IrpSp, + FALSE ); - case IOCTL_AFD_SEND_DATAGRAM: - return AfdPacketSocketWriteData( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_SEND_DATAGRAM: + return AfdPacketSocketWriteData( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_GET_INFO: - return AfdGetInfo( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_GET_INFO: + return AfdGetInfo( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_SET_INFO: - return AfdSetInfo( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_SET_INFO: + return AfdSetInfo( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_GET_CONTEXT_SIZE: - return AfdGetContextSize( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_GET_CONTEXT_SIZE: + return AfdGetContextSize( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_GET_CONTEXT: - return AfdGetContext( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_GET_CONTEXT: + return AfdGetContext( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_SET_CONTEXT: - return AfdSetContext( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_SET_CONTEXT: + return AfdSetContext( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_WAIT_FOR_LISTEN: - return AfdWaitForListen( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_WAIT_FOR_LISTEN: + return AfdWaitForListen( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_ACCEPT: - return AfdAccept( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_ACCEPT: + return AfdAccept( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_DISCONNECT: - return AfdDisconnect( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_DISCONNECT: + return AfdDisconnect( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_GET_SOCK_NAME: - return AfdGetSockName( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_GET_SOCK_NAME: + return AfdGetSockName( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_GET_PEER_NAME: - return AfdGetPeerName( DeviceObject, Irp, IrpSp ); + case IOCTL_AFD_GET_PEER_NAME: + return AfdGetPeerName( DeviceObject, Irp, IrpSp ); - case IOCTL_AFD_GET_CONNECT_DATA: - return AfdGetConnectData(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_GET_CONNECT_DATA: + return AfdGetConnectData(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_CONNECT_DATA: - return AfdSetConnectData(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_CONNECT_DATA: + return AfdSetConnectData(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_DISCONNECT_DATA: - return AfdSetDisconnectData(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_DISCONNECT_DATA: + return AfdSetDisconnectData(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_GET_DISCONNECT_DATA: - return AfdGetDisconnectData(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_GET_DISCONNECT_DATA: + return AfdGetDisconnectData(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_CONNECT_DATA_SIZE: - return AfdSetConnectDataSize(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_CONNECT_DATA_SIZE: + return AfdSetConnectDataSize(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_DISCONNECT_DATA_SIZE: - return AfdSetDisconnectDataSize(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_DISCONNECT_DATA_SIZE: + return AfdSetDisconnectDataSize(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_CONNECT_OPTIONS: - return AfdSetConnectOptions(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_CONNECT_OPTIONS: + return AfdSetConnectOptions(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_DISCONNECT_OPTIONS: - return AfdSetDisconnectOptions(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_DISCONNECT_OPTIONS: + return AfdSetDisconnectOptions(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_GET_CONNECT_OPTIONS: - return AfdGetConnectOptions(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_GET_CONNECT_OPTIONS: + return AfdGetConnectOptions(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_GET_DISCONNECT_OPTIONS: - return AfdGetDisconnectOptions(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_GET_DISCONNECT_OPTIONS: + return AfdGetDisconnectOptions(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_CONNECT_OPTIONS_SIZE: - return AfdSetConnectOptionsSize(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_CONNECT_OPTIONS_SIZE: + return AfdSetConnectOptionsSize(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_SET_DISCONNECT_OPTIONS_SIZE: - return AfdSetDisconnectOptionsSize(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_SET_DISCONNECT_OPTIONS_SIZE: + return AfdSetDisconnectOptionsSize(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_GET_TDI_HANDLES: - return AfdGetTdiHandles(DeviceObject, Irp, IrpSp); + case IOCTL_AFD_GET_TDI_HANDLES: + return AfdGetTdiHandles(DeviceObject, Irp, IrpSp); - case IOCTL_AFD_DEFER_ACCEPT: - DbgPrint("IOCTL_AFD_DEFER_ACCEPT is UNIMPLEMENTED!\n"); - break; + case IOCTL_AFD_DEFER_ACCEPT: + DbgPrint("IOCTL_AFD_DEFER_ACCEPT is UNIMPLEMENTED!\n"); + break; - case IOCTL_AFD_GET_PENDING_CONNECT_DATA: - DbgPrint("IOCTL_AFD_GET_PENDING_CONNECT_DATA is UNIMPLEMENTED!\n"); - break; + case IOCTL_AFD_GET_PENDING_CONNECT_DATA: + DbgPrint("IOCTL_AFD_GET_PENDING_CONNECT_DATA is UNIMPLEMENTED!\n"); + break; - case IOCTL_AFD_VALIDATE_GROUP: - DbgPrint("IOCTL_AFD_VALIDATE_GROUP is UNIMPLEMENTED!\n"); - break; + case IOCTL_AFD_VALIDATE_GROUP: + DbgPrint("IOCTL_AFD_VALIDATE_GROUP is UNIMPLEMENTED!\n"); + break; - default: - Status = STATUS_NOT_SUPPORTED; - DbgPrint("Unknown IOCTL (0x%x)\n", - IrpSp->Parameters.DeviceIoControl.IoControlCode); - break; - } - break; - } + default: + Status = STATUS_NOT_SUPPORTED; + DbgPrint("Unknown IOCTL (0x%x)\n", + IrpSp->Parameters.DeviceIoControl.IoControlCode); + break; + } + break; + } - /* unsupported operations */ - default: - { - Status = STATUS_NOT_IMPLEMENTED; - AFD_DbgPrint(MIN_TRACE, ("Irp: Unknown Major code was %x\n", - IrpSp->MajorFunction)); - break; - } +/* unsupported operations */ + default: + { + Status = STATUS_NOT_IMPLEMENTED; + AFD_DbgPrint(MIN_TRACE, + ("Irp: Unknown Major code was %x\n", + IrpSp->MajorFunction)); + break; + } } AFD_DbgPrint(MID_TRACE, ("Returning %x\n", Status)); - Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -1004,7 +934,7 @@ CleanupPendingIrp(PAFD_FCB FCB, PIRP Irp, PIO_STACK_LOCATION IrpSp, PAFD_ACTIVE_ if (IrpSp->Parameters.DeviceIoControl.IoControlCode == IOCTL_AFD_RECV || IrpSp->MajorFunction == IRP_MJ_READ) { - RecvReq = (PAFD_RECV_INFO)GetLockedData(Irp, IrpSp); + RecvReq = GetLockedData(Irp, IrpSp); UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, FALSE); } else if ((IrpSp->Parameters.DeviceIoControl.IoControlCode == IOCTL_AFD_SEND || @@ -1016,20 +946,19 @@ CleanupPendingIrp(PAFD_FCB FCB, PIRP Irp, PIO_STACK_LOCATION IrpSp, PAFD_ACTIVE_ } else if (IrpSp->Parameters.DeviceIoControl.IoControlCode == IOCTL_AFD_SELECT) { - PollReq = (PAFD_POLL_INFO)Irp->AssociatedIrp.SystemBuffer; + PollReq = Irp->AssociatedIrp.SystemBuffer; ZeroEvents(PollReq->Handles, PollReq->HandleCount); SignalSocket(Poll, NULL, PollReq, STATUS_CANCELLED); } } -VOID -NTAPI +VOID NTAPI AfdCancelHandler(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; ULONG Function, IoctlCode; PIRP CurrentIrp; PLIST_ENTRY CurrentEntry; @@ -1037,8 +966,6 @@ AfdCancelHandler(PDEVICE_OBJECT DeviceObject, KIRQL OldIrql; PAFD_ACTIVE_POLL Poll; - DbgPrint("[AFD, AfdCancelHandler] called\n"); - IoReleaseCancelSpinLock(Irp->CancelIrql); if (!SocketAcquireStateLock(FCB)) @@ -1068,62 +995,60 @@ AfdCancelHandler(PDEVICE_OBJECT DeviceObject, { case IOCTL_AFD_RECV: case IOCTL_AFD_RECV_DATAGRAM: - Function = FUNCTION_RECV; - break; + Function = FUNCTION_RECV; + break; case IOCTL_AFD_SEND: case IOCTL_AFD_SEND_DATAGRAM: - Function = FUNCTION_SEND; - break; + Function = FUNCTION_SEND; + break; case IOCTL_AFD_CONNECT: - Function = FUNCTION_CONNECT; - break; + Function = FUNCTION_CONNECT; + break; case IOCTL_AFD_WAIT_FOR_LISTEN: - Function = FUNCTION_PREACCEPT; - break; + Function = FUNCTION_PREACCEPT; + break; case IOCTL_AFD_SELECT: - KeAcquireSpinLock(&DeviceExt->Lock, &OldIrql); + KeAcquireSpinLock(&DeviceExt->Lock, &OldIrql); - CurrentEntry = DeviceExt->Polls.Flink; - while (CurrentEntry != &DeviceExt->Polls) + CurrentEntry = DeviceExt->Polls.Flink; + while (CurrentEntry != &DeviceExt->Polls) + { + Poll = CONTAINING_RECORD(CurrentEntry, AFD_ACTIVE_POLL, ListEntry); + + if (Irp == Poll->Irp) { - Poll = CONTAINING_RECORD(CurrentEntry, AFD_ACTIVE_POLL, ListEntry); - - if (Irp == Poll->Irp) - { - CleanupPendingIrp(FCB, Irp, IrpSp, Poll); - KeReleaseSpinLock(&DeviceExt->Lock, OldIrql); - SocketStateUnlock(FCB); - - DbgPrint("[AFD, AfdCancelHandler] Cancelled IRP\n"); - - return; - } - else - { - CurrentEntry = CurrentEntry->Flink; - } + CleanupPendingIrp(FCB, Irp, IrpSp, Poll); + KeReleaseSpinLock(&DeviceExt->Lock, OldIrql); + SocketStateUnlock(FCB); + return; } + else + { + CurrentEntry = CurrentEntry->Flink; + } + } - KeReleaseSpinLock(&DeviceExt->Lock, OldIrql); + KeReleaseSpinLock(&DeviceExt->Lock, OldIrql); - SocketStateUnlock(FCB); + SocketStateUnlock(FCB); - DbgPrint("WARNING!!! IRP cancellation race could lead to a process hang! (IOCTL_AFD_SELECT)\n"); - return; + DbgPrint("WARNING!!! IRP cancellation race could lead to a process hang! (IOCTL_AFD_SELECT)\n"); + return; + + case IOCTL_AFD_DISCONNECT: + Function = FUNCTION_DISCONNECT; + break; default: - ASSERT(FALSE); - UnlockAndMaybeComplete(FCB, STATUS_CANCELLED, Irp, 0); - return; + ASSERT(FALSE); + UnlockAndMaybeComplete(FCB, STATUS_CANCELLED, Irp, 0); + return; } - DbgPrint("[AFD, AfdCancelHandler] Cancelling MSAFD -> AFD IRPs\n"); - - /* Cancel IRPs from MSAFD to AFD (pending IRPs) */ CurrentEntry = FCB->PendingIrpList[Function].Flink; while (CurrentEntry != &FCB->PendingIrpList[Function]) { @@ -1147,15 +1072,12 @@ AfdCancelHandler(PDEVICE_OBJECT DeviceObject, DbgPrint("WARNING!!! IRP cancellation race could lead to a process hang! (Function: %d)\n", Function); } -static -VOID -NTAPI +static VOID NTAPI AfdUnload(PDRIVER_OBJECT DriverObject) { } -NTSTATUS -NTAPI +NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { PDEVICE_OBJECT DeviceObject; @@ -1172,18 +1094,19 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = AfdDispatch; DriverObject->DriverUnload = AfdUnload; - Status = IoCreateDevice(DriverObject, - sizeof(AFD_DEVICE_EXTENSION), - &wstrDeviceName, - FILE_DEVICE_NAMED_PIPE, - 0, - FALSE, - &DeviceObject ); + Status = IoCreateDevice + ( DriverObject, + sizeof(AFD_DEVICE_EXTENSION), + &wstrDeviceName, + FILE_DEVICE_NAMED_PIPE, + 0, + FALSE, + &DeviceObject ); /* failure */ - if (!NT_SUCCESS(Status)) + if(!NT_SUCCESS(Status)) { - return (Status); + return (Status); } DeviceExt = DeviceObject->DeviceExtension; diff --git a/drivers/network/afd/afd/read.c b/drivers/network/afd/afd/read.c index 74a224f5f47..cd4c6dae80f 100644 --- a/drivers/network/afd/afd/read.c +++ b/drivers/network/afd/afd/read.c @@ -26,9 +26,10 @@ #include "tdiconn.h" #include "debug.h" -static VOID HandleEOFOnIrp(PAFD_FCB FCB, NTSTATUS Status, ULONG_PTR Information) +static VOID HandleEOFOnIrp( PAFD_FCB FCB, NTSTATUS Status, ULONG_PTR Information ) { - if ((Status == STATUS_SUCCESS && !Information) || (!NT_SUCCESS(Status))) + if( ( Status == STATUS_SUCCESS && !Information ) || + ( !NT_SUCCESS( Status ) ) ) { /* The socket has been closed by the remote side */ FCB->PollState |= AFD_EVENT_ABORT; @@ -38,46 +39,77 @@ static VOID HandleEOFOnIrp(PAFD_FCB FCB, NTSTATUS Status, ULONG_PTR Information) } } -static BOOLEAN CantReadMore( PAFD_FCB FCB ) -{ +static BOOLEAN CantReadMore( PAFD_FCB FCB ) { UINT BytesAvailable = FCB->Recv.Content - FCB->Recv.BytesUsed; - return !BytesAvailable && (FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_ABORT)); + return !BytesAvailable && + (FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_ABORT)); } -static VOID RefillSocketBuffer( PAFD_FCB FCB ) +static BOOLEAN CheckUnlockExtraBuffers(PAFD_FCB FCB, PIO_STACK_LOCATION IrpSp) { - NTSTATUS Status; - - if (!FCB->ReceiveIrp.InFlightRequest && - !(FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_ABORT))) + if (FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) { + if (IrpSp->MajorFunction == IRP_MJ_READ) + { + /* read() call - no extra buffers */ + return FALSE; + } + else if (IrpSp->MajorFunction == IRP_MJ_DEVICE_CONTROL) + { + if (IrpSp->Parameters.DeviceIoControl.IoControlCode == IOCTL_AFD_RECV_DATAGRAM) + { + /* recvfrom() call - extra buffers */ + return TRUE; + } + else if (IrpSp->Parameters.DeviceIoControl.IoControlCode == IOCTL_AFD_RECV) + { + /* recv() call - no extra buffers */ + return FALSE; + } + else + { + /* Unknown IOCTL */ + ASSERT(FALSE); + return FALSE; + } + } + else + { + /* Unknown IRP_MJ code */ + ASSERT(FALSE); + return FALSE; + } + } + else + { + /* Connection-oriented never has extra buffers */ + return FALSE; + } +} + +static VOID RefillSocketBuffer( PAFD_FCB FCB ) { + if( !FCB->ReceiveIrp.InFlightRequest && + !(FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_ABORT)) ) { AFD_DbgPrint(MID_TRACE,("Replenishing buffer\n")); - Status = TdiReceive( &FCB->ReceiveIrp.InFlightRequest, - FCB->Connection.Object, - TDI_RECEIVE_NORMAL, - FCB->Recv.Window, - FCB->Recv.Size, - &FCB->ReceiveIrp.Iosb, - ReceiveComplete, - FCB ); - if (Status != STATUS_PENDING) - { - HandleEOFOnIrp(FCB, Status, FCB->ReceiveIrp.Iosb.Information); - } + TdiReceive( &FCB->ReceiveIrp.InFlightRequest, + FCB->Connection.Object, + TDI_RECEIVE_NORMAL, + FCB->Recv.Window, + FCB->Recv.Size, + &FCB->ReceiveIrp.Iosb, + ReceiveComplete, + FCB ); } } -static -NTSTATUS -TryToSatisfyRecvRequestFromBuffer -( PAFD_FCB FCB, - PAFD_RECV_INFO RecvReq, - PUINT TotalBytesCopied ) -{ +static NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB, + PAFD_RECV_INFO RecvReq, + PUINT TotalBytesCopied ) { UINT i, BytesToCopy = 0, FcbBytesCopied = FCB->Recv.BytesUsed, - BytesAvailable = FCB->Recv.Content - FCB->Recv.BytesUsed; + BytesAvailable = + FCB->Recv.Content - FCB->Recv.BytesUsed; PAFD_MAPBUF Map; *TotalBytesCopied = 0; @@ -85,24 +117,23 @@ TryToSatisfyRecvRequestFromBuffer AFD_DbgPrint(MID_TRACE,("Called, BytesAvailable = %d\n", BytesAvailable)); - if (CantReadMore(FCB)) - return STATUS_SUCCESS; - if (!BytesAvailable) - return STATUS_PENDING; + if( CantReadMore(FCB) ) return STATUS_SUCCESS; + if( !BytesAvailable ) return STATUS_PENDING; Map = (PAFD_MAPBUF)(RecvReq->BufferArray + RecvReq->BufferCount); AFD_DbgPrint(MID_TRACE,("Buffer Count: %d @ %x\n", RecvReq->BufferCount, RecvReq->BufferArray)); - for (i = 0; - RecvReq->BufferArray && BytesAvailable && i < RecvReq->BufferCount; - i++) - { - BytesToCopy = MIN(RecvReq->BufferArray[i].len, BytesAvailable); + for( i = 0; + RecvReq->BufferArray && + BytesAvailable && + i < RecvReq->BufferCount; + i++ ) { + BytesToCopy = + MIN( RecvReq->BufferArray[i].len, BytesAvailable ); - if (Map[i].Mdl) - { + if( Map[i].Mdl ) { Map[i].BufferAddress = MmMapLockedPages( Map[i].Mdl, KernelMode ); AFD_DbgPrint(MID_TRACE,("Buffer %d: %x:%d\n", @@ -126,8 +157,7 @@ TryToSatisfyRecvRequestFromBuffer } /* If there's nothing left in our buffer start a new request */ - if ( FCB->Recv.BytesUsed == FCB->Recv.Content ) - { + if( FCB->Recv.BytesUsed == FCB->Recv.Content ) { FCB->Recv.BytesUsed = FCB->Recv.Content = 0; FCB->PollState &= ~AFD_EVENT_RECEIVE; @@ -137,10 +167,7 @@ TryToSatisfyRecvRequestFromBuffer return STATUS_SUCCESS; } -static -NTSTATUS -ReceiveActivity(PAFD_FCB FCB, PIRP Irp) -{ +static NTSTATUS ReceiveActivity( PAFD_FCB FCB, PIRP Irp ) { PLIST_ENTRY NextIrpEntry; PIRP NextIrp; PIO_STACK_LOCATION NextIrpSp; @@ -156,39 +183,41 @@ ReceiveActivity(PAFD_FCB FCB, PIRP Irp) AFD_DbgPrint(MID_TRACE,("FCB %x Receive data waiting %d\n", FCB, FCB->Recv.Content)); - if (CantReadMore(FCB)) - { + if( CantReadMore( FCB ) ) { /* Success here means that we got an EOF. Complete a pending read * with zero bytes if we haven't yet overread, then kill the others. */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - NextIrpSp = IoGetCurrentIrpStackLocation(NextIrp); + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV] ) ) { + NextIrpEntry = + RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); + NextIrp = + CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); RecvReq = GetLockedData(NextIrp, NextIrpSp); AFD_DbgPrint(MID_TRACE,("Completing recv %x (%d)\n", NextIrp, TotalBytesCopied)); - UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, FALSE); - - //Status = NextIrp->IoStatus.Status = - // FCB->Overread ? STATUS_END_OF_FILE : STATUS_SUCCESS; - Status = NextIrp->IoStatus.Status = FCB->PollStatus[FD_CLOSE_BIT]; + UnlockBuffers( RecvReq->BufferArray, + RecvReq->BufferCount, FALSE ); + if (FCB->Overread && FCB->PollStatus[FD_CLOSE_BIT] == STATUS_SUCCESS) + { + /* Overread after a graceful disconnect so complete with an error */ + Status = STATUS_FILE_CLOSED; + } + else + { + /* Unexpected disconnect by the remote host or initial read after a graceful disconnnect */ + Status = FCB->PollStatus[FD_CLOSE_BIT]; + } + NextIrp->IoStatus.Status = Status; NextIrp->IoStatus.Information = 0; - - if (NextIrp == Irp) - RetStatus = Status; - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); - - (void)IoSetCancelRoutine(NextIrp, NULL); + if( NextIrp == Irp ) RetStatus = Status; + if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + (void)IoSetCancelRoutine(NextIrp, NULL); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); - //FCB->Overread = TRUE; + FCB->Overread = TRUE; } - } - else - { + } else { /* Kick the user that receive would be possible now */ /* XXX Not implemented yet */ @@ -197,62 +226,54 @@ ReceiveActivity(PAFD_FCB FCB, PIRP Irp) /*OskitDumpBuffer( FCB->Recv.Window, FCB->Recv.Content );*/ /* Try to clear some requests */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - NextIrpSp = IoGetCurrentIrpStackLocation(NextIrp); + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV] ) ) { + NextIrpEntry = + RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); + NextIrp = + CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); RecvReq = GetLockedData(NextIrp, NextIrpSp); AFD_DbgPrint(MID_TRACE,("RecvReq @ %x\n", RecvReq)); - Status = TryToSatisfyRecvRequestFromBuffer(FCB, RecvReq, &TotalBytesCopied); + Status = TryToSatisfyRecvRequestFromBuffer + ( FCB, RecvReq, &TotalBytesCopied ); - if (Status == STATUS_PENDING) - { + if( Status == STATUS_PENDING ) { AFD_DbgPrint(MID_TRACE,("Ran out of data for %x\n", NextIrp)); InsertHeadList(&FCB->PendingIrpList[FUNCTION_RECV], &NextIrp->Tail.Overlay.ListEntry); break; - } - else - { + } else { AFD_DbgPrint(MID_TRACE,("Completing recv %x (%d)\n", NextIrp, TotalBytesCopied)); UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, FALSE ); NextIrp->IoStatus.Status = Status; NextIrp->IoStatus.Information = TotalBytesCopied; - - if (NextIrp == Irp) - { + if( NextIrp == Irp ) { RetStatus = Status; RetBytesCopied = TotalBytesCopied; } - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); - - (void)IoSetCancelRoutine(NextIrp, NULL); + if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + (void)IoSetCancelRoutine(NextIrp, NULL); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } } } - if (FCB->Recv.Content - FCB->Recv.BytesUsed && - IsListEmpty(&FCB->PendingIrpList[FUNCTION_RECV])) - { + if( FCB->Recv.Content - FCB->Recv.BytesUsed && + IsListEmpty(&FCB->PendingIrpList[FUNCTION_RECV]) ) { FCB->PollState |= AFD_EVENT_RECEIVE; FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS; PollReeval( FCB->DeviceExt, FCB->FileObject ); - } - else + } else FCB->PollState &= ~AFD_EVENT_RECEIVE; AFD_DbgPrint(MID_TRACE,("RetStatus for irp %x is %x\n", Irp, RetStatus)); /* Sometimes we're called with a NULL Irp */ - if (Irp) - { + if( Irp ) { Irp->IoStatus.Status = RetStatus; Irp->IoStatus.Information = RetBytesCopied; } @@ -260,13 +281,10 @@ ReceiveActivity(PAFD_FCB FCB, PIRP Irp) return RetStatus; } -NTSTATUS -NTAPI -ReceiveComplete +NTSTATUS NTAPI ReceiveComplete ( PDEVICE_OBJECT DeviceObject, PIRP Irp, - PVOID Context ) -{ + PVOID Context ) { PAFD_FCB FCB = (PAFD_FCB)Context; PLIST_ENTRY NextIrpEntry; PIRP NextIrp; @@ -275,7 +293,7 @@ ReceiveComplete AFD_DbgPrint(MID_TRACE,("Called\n")); - if (!SocketAcquireStateLock(FCB)) + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; ASSERT(FCB->ReceiveIrp.InFlightRequest == Irp); @@ -284,33 +302,24 @@ ReceiveComplete FCB->Recv.Content = Irp->IoStatus.Information; FCB->Recv.BytesUsed = 0; - if (FCB->State == SOCKET_STATE_CLOSED) - { + if( FCB->State == SOCKET_STATE_CLOSED ) { AFD_DbgPrint(MIN_TRACE,("!!! CLOSING SOCK GOT A RECEIVE COMPLETE !!!\n")); - /* Cleanup our IRP queue because the FCB is being destroyed */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - NextIrpSp = IoGetCurrentIrpStackLocation(NextIrp); - RecvReq = GetLockedData(NextIrp, NextIrpSp); - NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; - NextIrp->IoStatus.Information = 0; - UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, FALSE); - - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); - - (void)IoSetCancelRoutine(NextIrp, NULL); - IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV] ) ) { + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrpSp = IoGetCurrentIrpStackLocation(NextIrp); + RecvReq = GetLockedData(NextIrp, NextIrpSp); + NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; + NextIrp->IoStatus.Information = 0; + UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, FALSE); + if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + (void)IoSetCancelRoutine(NextIrp, NULL); + IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } - - SocketStateUnlock( FCB ); - return STATUS_FILE_CLOSED; - } - else if (FCB->State == SOCKET_STATE_LISTENING) - { + SocketStateUnlock( FCB ); + return STATUS_FILE_CLOSED; + } else if( FCB->State == SOCKET_STATE_LISTENING ) { AFD_DbgPrint(MIN_TRACE,("!!! LISTENER GOT A RECEIVE COMPLETE !!!\n")); SocketStateUnlock( FCB ); return STATUS_INVALID_PARAMETER; @@ -325,52 +334,194 @@ ReceiveComplete return STATUS_SUCCESS; } -NTSTATUS -NTAPI -AfdConnectedSocketReadData -( PDEVICE_OBJECT DeviceObject, - PIRP Irp, - PIO_STACK_LOCATION IrpSp, - BOOLEAN Short ) -{ +static NTSTATUS NTAPI +SatisfyPacketRecvRequest( PAFD_FCB FCB, PIRP Irp, + PAFD_STORED_DATAGRAM DatagramRecv, + PUINT TotalBytesCopied ) { + NTSTATUS Status = STATUS_SUCCESS; + PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( Irp ); + PAFD_RECV_INFO RecvReq = + GetLockedData(Irp, IrpSp); + UINT BytesToCopy = 0, BytesAvailable = DatagramRecv->Len, AddrLen = 0; + PAFD_MAPBUF Map; + + Map = (PAFD_MAPBUF)(RecvReq->BufferArray + + RecvReq->BufferCount + + EXTRA_LOCK_BUFFERS); + + BytesToCopy = + MIN( RecvReq->BufferArray[0].len, BytesAvailable ); + + AFD_DbgPrint(MID_TRACE,("BytesToCopy: %d len %d\n", BytesToCopy, + RecvReq->BufferArray[0].len)); + + if( Map[0].Mdl ) { + /* Copy the address */ + if( Map[1].Mdl && Map[2].Mdl ) { + AFD_DbgPrint(MID_TRACE,("Checking TAAddressCount\n")); + + if( DatagramRecv->Address->TAAddressCount != 1 ) { + AFD_DbgPrint + (MID_TRACE, + ("Wierd address count %d\n", + DatagramRecv->Address->TAAddressCount)); + } + + AFD_DbgPrint(MID_TRACE,("Computing addr len\n")); + + AddrLen = MIN(DatagramRecv->Address->Address->AddressLength + + sizeof(USHORT), + RecvReq->BufferArray[1].len); + + AFD_DbgPrint(MID_TRACE,("Copying %d bytes of address\n", AddrLen)); + + Map[1].BufferAddress = MmMapLockedPages( Map[1].Mdl, KernelMode ); + + AFD_DbgPrint(MID_TRACE,("Done mapping, copying address\n")); + + RtlCopyMemory( Map[1].BufferAddress, + &DatagramRecv->Address->Address->AddressType, + AddrLen ); + + MmUnmapLockedPages( Map[1].BufferAddress, Map[1].Mdl ); + + AFD_DbgPrint(MID_TRACE,("Copying address len\n")); + + Map[2].BufferAddress = MmMapLockedPages( Map[2].Mdl, KernelMode ); + *((PINT)Map[2].BufferAddress) = AddrLen; + MmUnmapLockedPages( Map[2].BufferAddress, Map[2].Mdl ); + } + + AFD_DbgPrint(MID_TRACE,("Mapping data buffer pages\n")); + + Map[0].BufferAddress = MmMapLockedPages( Map[0].Mdl, KernelMode ); + + AFD_DbgPrint(MID_TRACE,("Buffer %d: %x:%d\n", + 0, + Map[0].BufferAddress, + BytesToCopy)); + + RtlCopyMemory( Map[0].BufferAddress, + DatagramRecv->Buffer, + BytesToCopy ); + + MmUnmapLockedPages( Map[0].BufferAddress, Map[0].Mdl ); + + *TotalBytesCopied = BytesToCopy; + } + + Status = Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Information = BytesToCopy; + + if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK)) + { + FCB->Recv.Content -= *TotalBytesCopied; + ExFreePool( DatagramRecv->Address ); + ExFreePool( DatagramRecv ); + } + + AFD_DbgPrint(MID_TRACE,("Done\n")); + + return Status; +} + +NTSTATUS NTAPI +AfdConnectedSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp, BOOLEAN Short) { NTSTATUS Status = STATUS_INVALID_PARAMETER; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_RECV_INFO RecvReq; UINT TotalBytesCopied = 0; + PAFD_STORED_DATAGRAM DatagramRecv; + PLIST_ENTRY ListEntry; AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - if (FCB->State != SOCKET_STATE_CONNECTED && FCB->State != SOCKET_STATE_CONNECTING) - { + if( !(FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) && + FCB->State != SOCKET_STATE_CONNECTED && + FCB->State != SOCKET_STATE_CONNECTING ) { AFD_DbgPrint(MID_TRACE,("Called recv on wrong kind of socket (s%x)\n", FCB->State)); return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0 ); } - - if (FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) - { - AFD_DbgPrint(MID_TRACE,("Receive on connection-less sockets not implemented\n")); - return UnlockAndMaybeComplete(FCB, STATUS_NOT_IMPLEMENTED, Irp, 0); + + if( !(RecvReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, + Irp, 0 ); + + AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags)); + + RecvReq->BufferArray = LockBuffers( RecvReq->BufferArray, + RecvReq->BufferCount, + NULL, NULL, + TRUE, FALSE ); + + if( !RecvReq->BufferArray ) { + return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION, + Irp, 0 ); } - if (!(RecvReq = LockRequest(Irp, IrpSp))) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); - - AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags)); - - RecvReq->BufferArray = LockBuffers( RecvReq->BufferArray, - RecvReq->BufferCount, - NULL, NULL, - TRUE, FALSE ); - - if (!RecvReq->BufferArray) + if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS ) { - return UnlockAndMaybeComplete(FCB, STATUS_ACCESS_VIOLATION, Irp, 0); + if( !IsListEmpty( &FCB->DatagramList ) ) { + ListEntry = RemoveHeadList( &FCB->DatagramList ); + DatagramRecv = CONTAINING_RECORD + ( ListEntry, AFD_STORED_DATAGRAM, ListEntry ); + if( DatagramRecv->Len > RecvReq->BufferArray[0].len && + !(RecvReq->TdiFlags & TDI_RECEIVE_PARTIAL) ) { + InsertHeadList( &FCB->DatagramList, + &DatagramRecv->ListEntry ); + Status = Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + Irp->IoStatus.Information = DatagramRecv->Len; + + if( !IsListEmpty( &FCB->DatagramList ) ) { + FCB->PollState |= AFD_EVENT_RECEIVE; + FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS; + PollReeval( FCB->DeviceExt, FCB->FileObject ); + } else + FCB->PollState &= ~AFD_EVENT_RECEIVE; + + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, FALSE ); + + return UnlockAndMaybeComplete + ( FCB, Status, Irp, Irp->IoStatus.Information ); + } else { + Status = SatisfyPacketRecvRequest + ( FCB, Irp, DatagramRecv, + (PUINT)&Irp->IoStatus.Information ); + + if (RecvReq->TdiFlags & TDI_RECEIVE_PEEK) + { + InsertHeadList(&FCB->DatagramList, + &DatagramRecv->ListEntry); + } + + if( !IsListEmpty( &FCB->DatagramList ) ) { + FCB->PollState |= AFD_EVENT_RECEIVE; + FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS; + PollReeval( FCB->DeviceExt, FCB->FileObject ); + } else + FCB->PollState &= ~AFD_EVENT_RECEIVE; + + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, FALSE ); + + return UnlockAndMaybeComplete + ( FCB, Status, Irp, Irp->IoStatus.Information ); + } + } else if( (RecvReq->AfdFlags & AFD_IMMEDIATE) || (FCB->NonBlocking) ) { + AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); + Status = STATUS_CANT_WAIT; + FCB->PollState &= ~AFD_EVENT_RECEIVE; + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, FALSE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); + } else { + FCB->PollState &= ~AFD_EVENT_RECEIVE; + return LeaveIrpUntilLater( FCB, Irp, FUNCTION_RECV ); + } } Irp->IoStatus.Status = STATUS_PENDING; @@ -383,23 +534,20 @@ AfdConnectedSocketReadData Status = ReceiveActivity( FCB, Irp ); - if (Status == STATUS_PENDING && (RecvReq->AfdFlags & AFD_IMMEDIATE)) - { + if( Status == STATUS_PENDING && + ((RecvReq->AfdFlags & AFD_IMMEDIATE) || (FCB->NonBlocking)) ) { AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); Status = STATUS_CANT_WAIT; TotalBytesCopied = 0; RemoveEntryList( &Irp->Tail.Overlay.ListEntry ); - UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, FALSE); - return UnlockAndMaybeComplete( FCB, Status, Irp, TotalBytesCopied); - } - else if (Status == STATUS_PENDING) - { + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, FALSE ); + return UnlockAndMaybeComplete( FCB, Status, Irp, + TotalBytesCopied ); + } else if( Status == STATUS_PENDING ) { AFD_DbgPrint(MID_TRACE,("Leaving read irp\n")); IoMarkIrpPending( Irp ); (void)IoSetCancelRoutine(Irp, AfdCancelHandler); - } - else - { + } else { AFD_DbgPrint(MID_TRACE,("Completed with status %x\n", Status)); } @@ -407,111 +555,13 @@ AfdConnectedSocketReadData return Status; } - -static -NTSTATUS -NTAPI -SatisfyPacketRecvRequest -( PAFD_FCB FCB, PIRP Irp, - PAFD_STORED_DATAGRAM DatagramRecv, - PUINT TotalBytesCopied ) -{ - NTSTATUS Status = STATUS_SUCCESS; - PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); - PAFD_RECV_INFO RecvReq = (PAFD_RECV_INFO)GetLockedData(Irp, IrpSp); - UINT BytesToCopy = 0, BytesAvailable = DatagramRecv->Len, AddrLen = 0; - PAFD_MAPBUF Map; - - Map = (PAFD_MAPBUF)(RecvReq->BufferArray + - RecvReq->BufferCount + - EXTRA_LOCK_BUFFERS); - - BytesToCopy = MIN(RecvReq->BufferArray[0].len, BytesAvailable); - - AFD_DbgPrint(MID_TRACE,("BytesToCopy: %d len %d\n", BytesToCopy, - RecvReq->BufferArray[0].len)); - - if (Map[0].Mdl) - { - /* Copy the address */ - if (Map[1].Mdl && Map[2].Mdl) - { - AFD_DbgPrint(MID_TRACE,("Checking TAAddressCount\n")); - - if (DatagramRecv->Address->TAAddressCount != 1) - { - AFD_DbgPrint - (MID_TRACE, - ("Wierd address count %d\n", - DatagramRecv->Address->TAAddressCount)); - } - - AFD_DbgPrint(MID_TRACE,("Computing addr len\n")); - - AddrLen = MIN(DatagramRecv->Address->Address->AddressLength + - sizeof(USHORT), - RecvReq->BufferArray[1].len); - - AFD_DbgPrint(MID_TRACE,("Copying %d bytes of address\n", AddrLen)); - - Map[1].BufferAddress = MmMapLockedPages( Map[1].Mdl, KernelMode ); - - AFD_DbgPrint(MID_TRACE,("Done mapping, copying address\n")); - - RtlCopyMemory( Map[1].BufferAddress, - &DatagramRecv->Address->Address->AddressType, - AddrLen ); - - MmUnmapLockedPages( Map[1].BufferAddress, Map[1].Mdl ); - - AFD_DbgPrint(MID_TRACE,("Copying address len\n")); - - Map[2].BufferAddress = MmMapLockedPages( Map[2].Mdl, KernelMode ); - *((PINT)Map[2].BufferAddress) = AddrLen; - MmUnmapLockedPages( Map[2].BufferAddress, Map[2].Mdl ); - } - - AFD_DbgPrint(MID_TRACE,("Mapping data buffer pages\n")); - - Map[0].BufferAddress = MmMapLockedPages( Map[0].Mdl, KernelMode ); - - AFD_DbgPrint(MID_TRACE,("Buffer %d: %x:%d\n", - 0, - Map[0].BufferAddress, - BytesToCopy)); - - RtlCopyMemory( Map[0].BufferAddress, - DatagramRecv->Buffer, - BytesToCopy ); - - MmUnmapLockedPages( Map[0].BufferAddress, Map[0].Mdl ); - - *TotalBytesCopied = BytesToCopy; - } - - Status = Irp->IoStatus.Status = STATUS_SUCCESS; - Irp->IoStatus.Information = BytesToCopy; - - if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK)) - { - ExFreePool( DatagramRecv->Address ); - ExFreePool( DatagramRecv ); - } - - AFD_DbgPrint(MID_TRACE,("Done\n")); - - return Status; -} - -NTSTATUS -NTAPI -PacketSocketRecvComplete -( PDEVICE_OBJECT DeviceObject, +NTSTATUS NTAPI +PacketSocketRecvComplete( + PDEVICE_OBJECT DeviceObject, PIRP Irp, - PVOID Context ) -{ + PVOID Context ) { NTSTATUS Status = STATUS_SUCCESS; - PAFD_FCB FCB = (PAFD_FCB)Context; + PAFD_FCB FCB = Context; PIRP NextIrp; PIO_STACK_LOCATION NextIrpSp; PLIST_ENTRY ListEntry; @@ -522,43 +572,37 @@ PacketSocketRecvComplete AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if (!SocketAcquireStateLock(FCB)) + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; ASSERT(FCB->ReceiveIrp.InFlightRequest == Irp); FCB->ReceiveIrp.InFlightRequest = NULL; - if ( FCB->State == SOCKET_STATE_CLOSED ) - { + if( FCB->State == SOCKET_STATE_CLOSED ) { /* Cleanup our IRP queue because the FCB is being destroyed */ - while ( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); - RecvReq = GetLockedData(NextIrp, NextIrpSp); - NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; - NextIrp->IoStatus.Information = 0; - UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, FALSE); - - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation(NextIrp)); - - (void)IoSetCancelRoutine(NextIrp, NULL); - IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV] ) ) { + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); + RecvReq = GetLockedData(NextIrp, NextIrpSp); + NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; + NextIrp->IoStatus.Information = 0; + UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, CheckUnlockExtraBuffers(FCB, NextIrpSp)); + if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + (void)IoSetCancelRoutine(NextIrp, NULL); + IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } /* Free all items on the datagram list */ - while (!IsListEmpty(&FCB->DatagramList)) - { - DatagramRecvEntry = RemoveHeadList(&FCB->DatagramList); - DatagramRecv = CONTAINING_RECORD(DatagramRecvEntry, AFD_STORED_DATAGRAM, ListEntry); - ExFreePool( DatagramRecv->Address ); - ExFreePool( DatagramRecv ); + while( !IsListEmpty( &FCB->DatagramList ) ) { + DatagramRecvEntry = RemoveHeadList(&FCB->DatagramList); + DatagramRecv = CONTAINING_RECORD(DatagramRecvEntry, AFD_STORED_DATAGRAM, ListEntry); + ExFreePool( DatagramRecv->Address ); + ExFreePool( DatagramRecv ); } - SocketStateUnlock(FCB); - return STATUS_FILE_CLOSED; + SocketStateUnlock( FCB ); + return STATUS_FILE_CLOSED; } if (Irp->IoStatus.Status != STATUS_SUCCESS) @@ -569,8 +613,7 @@ PacketSocketRecvComplete DatagramRecv = ExAllocatePool( NonPagedPool, DGSize ); - if (DatagramRecv) - { + if( DatagramRecv ) { DatagramRecv->Len = Irp->IoStatus.Information; RtlCopyMemory( DatagramRecv->Buffer, FCB->Recv.Window, DatagramRecv->Len ); @@ -579,29 +622,23 @@ PacketSocketRecvComplete DatagramRecv->Address = TaCopyTransportAddress( FCB->AddressFrom->RemoteAddress ); - if (!DatagramRecv->Address) - Status = STATUS_NO_MEMORY; + if( !DatagramRecv->Address ) Status = STATUS_NO_MEMORY; - } - else Status = STATUS_NO_MEMORY; + } else Status = STATUS_NO_MEMORY; - if (!NT_SUCCESS(Status)) - { - if (DatagramRecv) - ExFreePool(DatagramRecv); - SocketStateUnlock(FCB); + if( !NT_SUCCESS( Status ) ) { + if( DatagramRecv ) ExFreePool( DatagramRecv ); + SocketStateUnlock( FCB ); return Status; - } - else - { + } else { + FCB->Recv.Content += DatagramRecv->Len; InsertTailList( &FCB->DatagramList, &DatagramRecv->ListEntry ); } /* Satisfy as many requests as we can */ while( !IsListEmpty( &FCB->DatagramList ) && - !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV] ) ) - { + !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV] ) ) { AFD_DbgPrint(MID_TRACE,("Looping trying to satisfy request\n")); ListEntry = RemoveHeadList( &FCB->DatagramList ); DatagramRecv = CONTAINING_RECORD( ListEntry, AFD_STORED_DATAGRAM, @@ -614,20 +651,17 @@ PacketSocketRecvComplete AFD_DbgPrint(MID_TRACE,("RecvReq: %x, DatagramRecv: %x\n", RecvReq, DatagramRecv)); - if (DatagramRecv->Len > RecvReq->BufferArray[0].len && - !(RecvReq->TdiFlags & TDI_RECEIVE_PARTIAL)) - { + if( DatagramRecv->Len > RecvReq->BufferArray[0].len && + !(RecvReq->TdiFlags & TDI_RECEIVE_PARTIAL) ) { InsertHeadList( &FCB->DatagramList, &DatagramRecv->ListEntry ); Status = NextIrp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; NextIrp->IoStatus.Information = DatagramRecv->Len; - UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, CheckUnlockExtraBuffers(FCB, NextIrpSp) ); if ( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); (void)IoSetCancelRoutine(NextIrp, NULL); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); - } - else - { + } else { AFD_DbgPrint(MID_TRACE,("Satisfying\n")); Status = SatisfyPacketRecvRequest ( FCB, NextIrp, DatagramRecv, @@ -637,30 +671,24 @@ PacketSocketRecvComplete InsertHeadList(&FCB->DatagramList, &DatagramRecv->ListEntry); } - - AFD_DbgPrint(MID_TRACE,("Unlocking\n")); - UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); - - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + AFD_DbgPrint(MID_TRACE,("Unlocking\n")); + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, CheckUnlockExtraBuffers(FCB, NextIrpSp) ); + if ( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); AFD_DbgPrint(MID_TRACE,("Completing\n")); (void)IoSetCancelRoutine(NextIrp, NULL); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } } - if (!IsListEmpty( &FCB->DatagramList ) && IsListEmpty(&FCB->PendingIrpList[FUNCTION_RECV])) - { + if( !IsListEmpty( &FCB->DatagramList ) && IsListEmpty(&FCB->PendingIrpList[FUNCTION_RECV]) ) { AFD_DbgPrint(MID_TRACE,("Signalling\n")); FCB->PollState |= AFD_EVENT_RECEIVE; FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS; PollReeval( FCB->DeviceExt, FCB->FileObject ); - } - else + } else FCB->PollState &= ~AFD_EVENT_RECEIVE; - if (NT_SUCCESS(Irp->IoStatus.Status)) - { + if( NT_SUCCESS(Irp->IoStatus.Status) ) { /* Now relaunch the datagram request */ Status = TdiReceiveDatagram ( &FCB->ReceiveIrp.InFlightRequest, @@ -679,31 +707,27 @@ PacketSocketRecvComplete return STATUS_SUCCESS; } -NTSTATUS -NTAPI -AfdPacketSocketReadData -( PDEVICE_OBJECT DeviceObject, - PIRP Irp, - PIO_STACK_LOCATION IrpSp ) -{ +NTSTATUS NTAPI +AfdPacketSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_RECV_INFO_UDP RecvReq; PLIST_ENTRY ListEntry; PAFD_STORED_DATAGRAM DatagramRecv; AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); /* Check that the socket is bound */ - if (FCB->State != SOCKET_STATE_BOUND) + if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete ( FCB, STATUS_INVALID_PARAMETER, Irp, 0 ); - if ( !(RecvReq = LockRequest(Irp, IrpSp))) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if( !(RecvReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete + ( FCB, STATUS_NO_MEMORY, Irp, 0 ); AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags)); @@ -713,42 +737,37 @@ AfdPacketSocketReadData RecvReq->AddressLength, TRUE, TRUE ); - if (!RecvReq->BufferArray) - { - /* access violation in userspace */ - return UnlockAndMaybeComplete(FCB, STATUS_ACCESS_VIOLATION, Irp, 0); + if( !RecvReq->BufferArray ) { /* access violation in userspace */ + return UnlockAndMaybeComplete + ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0 ); } - if ( !IsListEmpty(&FCB->DatagramList)) - { + if( !IsListEmpty( &FCB->DatagramList ) ) { ListEntry = RemoveHeadList( &FCB->DatagramList ); - DatagramRecv = CONTAINING_RECORD(ListEntry, AFD_STORED_DATAGRAM, ListEntry); + DatagramRecv = CONTAINING_RECORD + ( ListEntry, AFD_STORED_DATAGRAM, ListEntry ); if( DatagramRecv->Len > RecvReq->BufferArray[0].len && - !(RecvReq->TdiFlags & TDI_RECEIVE_PARTIAL) ) - { + !(RecvReq->TdiFlags & TDI_RECEIVE_PARTIAL) ) { InsertHeadList( &FCB->DatagramList, &DatagramRecv->ListEntry ); Status = Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; Irp->IoStatus.Information = DatagramRecv->Len; - if ( !IsListEmpty(&FCB->DatagramList)) - { + if( !IsListEmpty( &FCB->DatagramList ) ) { FCB->PollState |= AFD_EVENT_RECEIVE; FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS; PollReeval( FCB->DeviceExt, FCB->FileObject ); - } - else + } else FCB->PollState &= ~AFD_EVENT_RECEIVE; UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); - return UnlockAndMaybeComplete(FCB, Status, Irp, Irp->IoStatus.Information); - } - else - { - Status = SatisfyPacketRecvRequest( - FCB, Irp, DatagramRecv, - (PUINT)&Irp->IoStatus.Information); + return UnlockAndMaybeComplete + ( FCB, Status, Irp, Irp->IoStatus.Information ); + } else { + Status = SatisfyPacketRecvRequest + ( FCB, Irp, DatagramRecv, + (PUINT)&Irp->IoStatus.Information ); if (RecvReq->TdiFlags & TDI_RECEIVE_PEEK) { @@ -756,31 +775,25 @@ AfdPacketSocketReadData &DatagramRecv->ListEntry); } - if (!IsListEmpty(&FCB->DatagramList)) - { + if( !IsListEmpty( &FCB->DatagramList ) ) { FCB->PollState |= AFD_EVENT_RECEIVE; FCB->PollStatus[FD_READ_BIT] = STATUS_SUCCESS; PollReeval( FCB->DeviceExt, FCB->FileObject ); - } - else + } else FCB->PollState &= ~AFD_EVENT_RECEIVE; UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); - return UnlockAndMaybeComplete(FCB, Status, Irp, Irp->IoStatus.Information); + return UnlockAndMaybeComplete + ( FCB, Status, Irp, Irp->IoStatus.Information ); } - } - else if (RecvReq->AfdFlags & AFD_IMMEDIATE) - { + } else if( (RecvReq->AfdFlags & AFD_IMMEDIATE) || (FCB->NonBlocking) ) { AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); Status = STATUS_CANT_WAIT; FCB->PollState &= ~AFD_EVENT_RECEIVE; - - UnlockBuffers(RecvReq->BufferArray, RecvReq->BufferCount, TRUE); + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); - } - else - { + } else { FCB->PollState &= ~AFD_EVENT_RECEIVE; return LeaveIrpUntilLater( FCB, Irp, FUNCTION_RECV ); } diff --git a/drivers/network/afd/afd/select.c b/drivers/network/afd/afd/select.c index 4ad10727f96..591d66ed975 100644 --- a/drivers/network/afd/afd/select.c +++ b/drivers/network/afd/afd/select.c @@ -12,8 +12,7 @@ #include "tdiconn.h" #include "debug.h" -static VOID PrintEvents(ULONG Events) -{ +static VOID PrintEvents( ULONG Events ) { #if DBG char *events_list[] = { "AFD_EVENT_RECEIVE", "AFD_EVENT_OOB_RECEIVE", @@ -34,35 +33,34 @@ static VOID PrintEvents(ULONG Events) #endif } -static VOID CopyBackStatus(PAFD_HANDLE HandleArray, UINT HandleCount) -{ +static VOID CopyBackStatus( PAFD_HANDLE HandleArray, + UINT HandleCount ) { UINT i; - for (i = 0; iIrp; @@ -70,18 +68,17 @@ VOID SignalSocket if (Poll) { - KeCancelTimer( &Poll->Timer ); - RemoveEntryList( &Poll->ListEntry ); - ExFreePool( Poll ); - } + KeCancelTimer( &Poll->Timer ); + RemoveEntryList( &Poll->ListEntry ); + ExFreePool( Poll ); + } Irp->IoStatus.Status = Status; Irp->IoStatus.Information = FIELD_OFFSET(AFD_POLL_INFO, Handles) + sizeof(AFD_HANDLE) * PollReq->HandleCount; - - CopyBackStatus( PollReq->Handles, PollReq->HandleCount); - for (i=0; i < PollReq->HandleCount; i++) - { + CopyBackStatus( PollReq->Handles, + PollReq->HandleCount ); + for( i = 0; i < PollReq->HandleCount; i++ ) { AFD_DbgPrint (MAX_TRACE, ("Handle(%x): Got %x,%x\n", @@ -89,25 +86,19 @@ VOID SignalSocket PollReq->Handles[i].Events, PollReq->Handles[i].Status)); } - UnlockHandles( AFD_HANDLES(PollReq), PollReq->HandleCount ); - if (Irp->MdlAddress) - UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); - + if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) ); AFD_DbgPrint(MID_TRACE,("Completing\n")); - (void)IoSetCancelRoutine(Irp, NULL); IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); - AFD_DbgPrint(MID_TRACE,("Done\n")); } static VOID SelectTimeout( PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, - PVOID SystemArgument2 ) -{ - PAFD_ACTIVE_POLL Poll = (PAFD_ACTIVE_POLL)DeferredContext; + PVOID SystemArgument2 ) { + PAFD_ACTIVE_POLL Poll = DeferredContext; PAFD_POLL_INFO PollReq; PIRP Irp; KIRQL OldIrql; @@ -130,8 +121,7 @@ static VOID SelectTimeout( PKDPC Dpc, VOID KillSelectsForFCB( PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject, - BOOLEAN OnlyExclusive ) -{ + BOOLEAN OnlyExclusive ) { KIRQL OldIrql; PLIST_ENTRY ListEntry; PAFD_ACTIVE_POLL Poll; @@ -141,53 +131,44 @@ VOID KillSelectsForFCB( PAFD_DEVICE_EXTENSION DeviceExt, UINT i; AFD_DbgPrint(MID_TRACE,("Killing selects that refer to %x\n", FileObject)); - DbgPrint("[AFD, KillSelectsForFCB] Called for FileObject->FsContext = 0x%x\n", FileObject->FsContext); KeAcquireSpinLock( &DeviceExt->Lock, &OldIrql ); ListEntry = DeviceExt->Polls.Flink; - while (ListEntry != &DeviceExt->Polls) - { - Poll = CONTAINING_RECORD(ListEntry, AFD_ACTIVE_POLL, ListEntry); - ListEntry = ListEntry->Flink; + while ( ListEntry != &DeviceExt->Polls ) { + Poll = CONTAINING_RECORD(ListEntry, AFD_ACTIVE_POLL, ListEntry); + ListEntry = ListEntry->Flink; Irp = Poll->Irp; PollReq = Irp->AssociatedIrp.SystemBuffer; HandleArray = AFD_HANDLES(PollReq); - DbgPrint("[AFD, KillSelectsForFCB] killing select 0x%x\n", Poll); - - for (i = 0; i < PollReq->HandleCount; i++) - { + for( i = 0; i < PollReq->HandleCount; i++ ) { AFD_DbgPrint(MAX_TRACE,("Req: %x, This %x\n", HandleArray[i].Handle, FileObject)); - - if ((PVOID)HandleArray[i].Handle == FileObject && - (!OnlyExclusive || (OnlyExclusive && Poll->Exclusive)) ) - { - DbgPrint("[AFD, KillSelectsForFCB] Zeroing events and signaling socket\n"); + if( (PVOID)HandleArray[i].Handle == FileObject && + (!OnlyExclusive || (OnlyExclusive && Poll->Exclusive)) ) { ZeroEvents( PollReq->Handles, PollReq->HandleCount ); SignalSocket( Poll, NULL, PollReq, STATUS_CANCELLED ); } - } + } } KeReleaseSpinLock( &DeviceExt->Lock, OldIrql ); AFD_DbgPrint(MID_TRACE,("Done\n")); - DbgPrint("[AFD, KillSelectsForFCB] Leaving\n"); } -NTSTATUS -NTAPI -AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_NO_MEMORY; PAFD_FCB FCB; PFILE_OBJECT FileObject; - PAFD_POLL_INFO PollReq = (PAFD_POLL_INFO)Irp->AssociatedIrp.SystemBuffer; + PAFD_POLL_INFO PollReq = Irp->AssociatedIrp.SystemBuffer; PAFD_DEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension; UINT CopySize = IrpSp->Parameters.DeviceIoControl.InputBufferLength; - UINT AllocSize = CopySize + sizeof(AFD_ACTIVE_POLL) - sizeof(AFD_POLL_INFO); + UINT AllocSize = + CopySize + sizeof(AFD_ACTIVE_POLL) - sizeof(AFD_POLL_INFO); KIRQL OldIrql; UINT i, Signalled = 0; ULONG Exclusive = PollReq->Exclusive; @@ -196,29 +177,21 @@ AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) PollReq->HandleCount, (INT)(PollReq->Timeout.QuadPart))); - DbgPrint("[AFD, AfdSelect] Called. HandleCount = %d, Timeout = %d\n", - PollReq->HandleCount, - (INT)(PollReq->Timeout.QuadPart)); - SET_AFD_HANDLES(PollReq, LockHandles( PollReq->Handles, PollReq->HandleCount )); - if (!AFD_HANDLES(PollReq)) - { - Irp->IoStatus.Status = STATUS_NO_MEMORY; - Irp->IoStatus.Information = 0; - IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); - return STATUS_NO_MEMORY; + if( !AFD_HANDLES(PollReq) ) { + Irp->IoStatus.Status = STATUS_NO_MEMORY; + Irp->IoStatus.Information = 0; + IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); + return STATUS_NO_MEMORY; } - if (Exclusive) - { - for (i = 0; iHandleCount; i++) - { - if (!AFD_HANDLES(PollReq)[i].Handle) - continue; + if( Exclusive ) { + for( i = 0; i < PollReq->HandleCount; i++ ) { + if( !AFD_HANDLES(PollReq)[i].Handle ) continue; - KillSelectsForFCB(DeviceExt, + KillSelectsForFCB( DeviceExt, (PFILE_OBJECT)AFD_HANDLES(PollReq)[i].Handle, TRUE ); } @@ -226,10 +199,8 @@ AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) KeAcquireSpinLock( &DeviceExt->Lock, &OldIrql ); - for (i=0; iHandleCount; i++) - { - if (!AFD_HANDLES(PollReq)[i].Handle) - continue; + for( i = 0; i < PollReq->HandleCount; i++ ) { + if( !AFD_HANDLES(PollReq)[i].Handle ) continue; FileObject = (PFILE_OBJECT)AFD_HANDLES(PollReq)[i].Handle; FCB = FileObject->FsContext; @@ -238,138 +209,127 @@ AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) PrintEvents( PollReq->Handles[i].Events ); AFD_DbgPrint(MID_TRACE,("\n")); - PollReq->Handles[i].Status = PollReq->Handles[i].Events & FCB->PollState; - if (PollReq->Handles[i].Status) - { + PollReq->Handles[i].Status = + PollReq->Handles[i].Events & FCB->PollState; + if( PollReq->Handles[i].Status ) { AFD_DbgPrint(MID_TRACE,("Signalling %x with %x\n", FCB, FCB->PollState)); Signalled++; } } - if (Signalled) - { + if( Signalled ) { Status = STATUS_SUCCESS; Irp->IoStatus.Status = Status; SignalSocket( NULL, Irp, PollReq, Status ); - } - else - { - PAFD_ACTIVE_POLL Poll = NULL; + } else { - Poll = ExAllocatePool( NonPagedPool, AllocSize ); + PAFD_ACTIVE_POLL Poll = NULL; - if (Poll) - { - Poll->Irp = Irp; - Poll->DeviceExt = DeviceExt; - Poll->Exclusive = Exclusive; + Poll = ExAllocatePool( NonPagedPool, AllocSize ); - KeInitializeTimerEx( &Poll->Timer, NotificationTimer ); + if (Poll){ + Poll->Irp = Irp; + Poll->DeviceExt = DeviceExt; + Poll->Exclusive = Exclusive; - KeInitializeDpc( (PRKDPC)&Poll->TimeoutDpc, - (PKDEFERRED_ROUTINE)SelectTimeout, - Poll ); + KeInitializeTimerEx( &Poll->Timer, NotificationTimer ); - InsertTailList( &DeviceExt->Polls, &Poll->ListEntry ); + KeInitializeDpc( (PRKDPC)&Poll->TimeoutDpc, + (PKDEFERRED_ROUTINE)SelectTimeout, + Poll ); - KeSetTimer( &Poll->Timer, PollReq->Timeout, &Poll->TimeoutDpc ); + InsertTailList( &DeviceExt->Polls, &Poll->ListEntry ); - DbgPrint("[AFD, AfdSelect] Marking IRP with STATUS_PENDING\n"); + KeSetTimer( &Poll->Timer, PollReq->Timeout, &Poll->TimeoutDpc ); - Status = STATUS_PENDING; - IoMarkIrpPending( Irp ); - (void)IoSetCancelRoutine(Irp, AfdCancelHandler); - } - else - { - AFD_DbgPrint(MAX_TRACE, ("FIXME: do something with the IRP!\n")); - Status = STATUS_NO_MEMORY; - } + Status = STATUS_PENDING; + IoMarkIrpPending( Irp ); + (void)IoSetCancelRoutine(Irp, AfdCancelHandler); + } else { + AFD_DbgPrint(MAX_TRACE, ("FIXME: do something with the IRP!\n")); + Status = STATUS_NO_MEMORY; + } } KeReleaseSpinLock( &DeviceExt->Lock, OldIrql ); AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - DbgPrint("[AFD, AfdSelect] Leaving. Status = 0x%x\n", Status); return Status; } -NTSTATUS -NTAPI -AfdEventSelect(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdEventSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { PFILE_OBJECT FileObject = IrpSp->FileObject; NTSTATUS Status = STATUS_NO_MEMORY; PAFD_EVENT_SELECT_INFO EventSelectInfo = (PAFD_EVENT_SELECT_INFO)LockRequest( Irp, IrpSp ); - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; - if (!SocketAcquireStateLock(FCB)) - { - return LostSocket(Irp); + if( !SocketAcquireStateLock( FCB ) ) { + return LostSocket( Irp ); } - if (!EventSelectInfo) - { - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if ( !EventSelectInfo ) { + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, + 0 ); } - AFD_DbgPrint(MID_TRACE,("Called (Event %x Triggers %x)\n", EventSelectInfo->EventObject, EventSelectInfo->Events)); - if (FCB->EventSelect) - ObDereferenceObject(FCB->EventSelect); + if( FCB->EventSelect ) ObDereferenceObject( FCB->EventSelect ); FCB->EventSelect = NULL; - if (EventSelectInfo->EventObject && EventSelectInfo->Events) - { - Status = ObReferenceObjectByHandle( - (PVOID)EventSelectInfo->EventObject, - FILE_ALL_ACCESS, - ExEventObjectType, - UserMode, - (PVOID *)&FCB->EventSelect, - NULL ); + if( EventSelectInfo->EventObject && EventSelectInfo->Events ) { + Status = ObReferenceObjectByHandle( (PVOID)EventSelectInfo-> + EventObject, + EVENT_ALL_ACCESS, + ExEventObjectType, + UserMode, + (PVOID *)&FCB->EventSelect, + NULL ); - if( !NT_SUCCESS(Status) ) - FCB->EventSelect = NULL; - else - FCB->EventSelectTriggers = EventSelectInfo->Events; - } - else - { + if( !NT_SUCCESS(Status) ) + FCB->EventSelect = NULL; + else + FCB->EventSelectTriggers = EventSelectInfo->Events; + } else { FCB->EventSelect = NULL; FCB->EventSelectTriggers = 0; - Status = STATUS_SUCCESS; + Status = STATUS_SUCCESS; + } + + if( FCB->EventSelect && (FCB->PollState & FCB->EventSelectTriggers) ) { + AFD_DbgPrint(MID_TRACE,("Setting event %x\n", FCB->EventSelect)); + KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE ); } AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status)); - return UnlockAndMaybeComplete(FCB, Status, Irp, 0); + return UnlockAndMaybeComplete( FCB, Status, Irp, + 0 ); } -NTSTATUS -NTAPI -AfdEnumEvents(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdEnumEvents( PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp ) { PFILE_OBJECT FileObject = IrpSp->FileObject; PAFD_ENUM_NETWORK_EVENTS_INFO EnumReq = (PAFD_ENUM_NETWORK_EVENTS_INFO)LockRequest( Irp, IrpSp ); - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; AFD_DbgPrint(MID_TRACE,("Called (FCB %x)\n", FCB)); - if (!SocketAcquireStateLock(FCB)) - { - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) { + return LostSocket( Irp ); } - if (!EnumReq) - { - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + if ( !EnumReq ) { + return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, + 0 ); } EnumReq->PollEvents = FCB->PollState; @@ -377,40 +337,37 @@ AfdEnumEvents(PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) FCB->PollStatus, sizeof(EnumReq->EventStatus) ); - return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, 0); + return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, + 0 ); } /* * * NOTE ALWAYS CALLED AT DISPATCH_LEVEL * * */ -static BOOLEAN UpdatePollWithFCB( PAFD_ACTIVE_POLL Poll, PFILE_OBJECT FileObject ) -{ +static BOOLEAN UpdatePollWithFCB( PAFD_ACTIVE_POLL Poll, PFILE_OBJECT FileObject ) { UINT i; PAFD_FCB FCB; UINT Signalled = 0; - PAFD_POLL_INFO PollReq = (PAFD_POLL_INFO)Poll->Irp->AssociatedIrp.SystemBuffer; + PAFD_POLL_INFO PollReq = Poll->Irp->AssociatedIrp.SystemBuffer; ASSERT( KeGetCurrentIrql() == DISPATCH_LEVEL ); - for (i = 0; i < PollReq->HandleCount; i++) - { - if ( !AFD_HANDLES(PollReq)[i].Handle ) - continue; + for( i = 0; i < PollReq->HandleCount; i++ ) { + if( !AFD_HANDLES(PollReq)[i].Handle ) continue; - FileObject = (PFILE_OBJECT)AFD_HANDLES(PollReq)[i].Handle; - FCB = FileObject->FsContext; + FileObject = (PFILE_OBJECT)AFD_HANDLES(PollReq)[i].Handle; + FCB = FileObject->FsContext; - PollReq->Handles[i].Status = PollReq->Handles[i].Events & FCB->PollState; - if (PollReq->Handles[i].Status) - { - AFD_DbgPrint(MID_TRACE,("Signalling %x with %x\n", FCB, FCB->PollState)); - Signalled++; - } + PollReq->Handles[i].Status = PollReq->Handles[i].Events & FCB->PollState; + if( PollReq->Handles[i].Status ) { + AFD_DbgPrint(MID_TRACE,("Signalling %x with %x\n", + FCB, FCB->PollState)); + Signalled++; + } } return Signalled ? 1 : 0; } -VOID PollReeval(PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject) -{ +VOID PollReeval( PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject ) { PAFD_ACTIVE_POLL Poll = NULL; PLIST_ENTRY ThePollEnt = NULL; PAFD_FCB FCB; @@ -425,35 +382,30 @@ VOID PollReeval(PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject) /* Take care of any event select signalling */ FCB = (PAFD_FCB)FileObject->FsContext; - if (!FCB) - { - KeReleaseSpinLock( &DeviceExt->Lock, OldIrql ); - return; + if( !FCB ) { + KeReleaseSpinLock( &DeviceExt->Lock, OldIrql ); + return; } /* Now signal normal select irps */ ThePollEnt = DeviceExt->Polls.Flink; - while (ThePollEnt != &DeviceExt->Polls) - { - Poll = CONTAINING_RECORD( ThePollEnt, AFD_ACTIVE_POLL, ListEntry ); - PollReq = Poll->Irp->AssociatedIrp.SystemBuffer; - AFD_DbgPrint(MID_TRACE,("Checking poll %x\n", Poll)); + while( ThePollEnt != &DeviceExt->Polls ) { + Poll = CONTAINING_RECORD( ThePollEnt, AFD_ACTIVE_POLL, ListEntry ); + PollReq = Poll->Irp->AssociatedIrp.SystemBuffer; + AFD_DbgPrint(MID_TRACE,("Checking poll %x\n", Poll)); - if (UpdatePollWithFCB(Poll, FileObject)) - { - ThePollEnt = ThePollEnt->Flink; - AFD_DbgPrint(MID_TRACE,("Signalling socket\n")); - SignalSocket( Poll, NULL, PollReq, STATUS_SUCCESS ); - } - else - ThePollEnt = ThePollEnt->Flink; + if( UpdatePollWithFCB( Poll, FileObject ) ) { + ThePollEnt = ThePollEnt->Flink; + AFD_DbgPrint(MID_TRACE,("Signalling socket\n")); + SignalSocket( Poll, NULL, PollReq, STATUS_SUCCESS ); + } else + ThePollEnt = ThePollEnt->Flink; } KeReleaseSpinLock( &DeviceExt->Lock, OldIrql ); - if ( FCB->EventSelect && (FCB->PollState & FCB->EventSelectTriggers) ) - { + if( FCB->EventSelect && (FCB->PollState & FCB->EventSelectTriggers) ) { AFD_DbgPrint(MID_TRACE,("Setting event %x\n", FCB->EventSelect)); KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE ); } diff --git a/drivers/network/afd/afd/tdi.c b/drivers/network/afd/afd/tdi.c index 21f50e9ee33..9a18dd21bdc 100644 --- a/drivers/network/afd/afd/tdi.c +++ b/drivers/network/afd/afd/tdi.c @@ -128,27 +128,21 @@ static NTSTATUS TdiOpenDevice( 0, /* Create options */ EaInfo, /* EA buffer */ EaLength); /* EA length */ - if (NT_SUCCESS(Status)) - { + if (NT_SUCCESS(Status)) { Status = ObReferenceObjectByHandle(*Handle, /* Handle to open file */ GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, /* Access mode */ IoFileObjectType, /* Object type */ KernelMode, /* Access mode */ (PVOID*)Object, /* Pointer to object */ NULL); /* Handle information */ - if (!NT_SUCCESS(Status)) - { + if (!NT_SUCCESS(Status)) { AFD_DbgPrint(MIN_TRACE, ("ObReferenceObjectByHandle() failed with status (0x%X).\n", Status)); ZwClose(*Handle); - } - else - { + } else { AFD_DbgPrint(MAX_TRACE, ("Got handle (0x%X) Object (0x%X)\n", *Handle, *Object)); } - } - else - { + } else { AFD_DbgPrint(MIN_TRACE, ("ZwCreateFile() failed with status (0x%X)\n", Status)); } @@ -336,15 +330,13 @@ NTSTATUS TdiConnect( ASSERT(*Irp == NULL); - if (!ConnectionObject) - { + if (!ConnectionObject) { AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n")); return STATUS_INVALID_PARAMETER; } DeviceObject = IoGetRelatedDeviceObject(ConnectionObject); - if (!DeviceObject) - { + if (!DeviceObject) { AFD_DbgPrint(MIN_TRACE, ("Bad device object.\n")); return STATUS_INVALID_PARAMETER; } @@ -393,15 +385,13 @@ NTSTATUS TdiAssociateAddressFile( AFD_DbgPrint(MAX_TRACE, ("Called. AddressHandle (0x%X) ConnectionObject (0x%X)\n", AddressHandle, ConnectionObject)); - if (!ConnectionObject) - { + if (!ConnectionObject) { AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n")); return STATUS_INVALID_PARAMETER; } DeviceObject = IoGetRelatedDeviceObject(ConnectionObject); - if (!DeviceObject) - { + if (!DeviceObject) { AFD_DbgPrint(MIN_TRACE, ("Bad device object.\n")); return STATUS_INVALID_PARAMETER; } @@ -493,20 +483,17 @@ NTSTATUS TdiListen { PDEVICE_OBJECT DeviceObject; - AFD_DbgPrint(MAX_TRACE, ("[AFD, TDIListen] Called\n")); - DbgPrint("[AFD, TDIListen] Called\n"); + AFD_DbgPrint(MAX_TRACE, ("Called\n")); ASSERT(*Irp == NULL); - if (!ConnectionObject) - { + if (!ConnectionObject) { AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n")); return STATUS_INVALID_PARAMETER; } DeviceObject = IoGetRelatedDeviceObject(ConnectionObject); - if (!DeviceObject) - { + if (!DeviceObject) { AFD_DbgPrint(MIN_TRACE, ("Bad device object.\n")); return STATUS_INVALID_PARAMETER; } @@ -1269,7 +1256,7 @@ NTSTATUS TdiDisconnect( ( TDI_DISCONNECT, /* Sub function */ DeviceObject, /* Device object */ TransportObject, /* File object */ - NULL, /* Event */ + NULL, /* Event */ Iosb ); /* Status */ if (!*Irp) { @@ -1278,7 +1265,7 @@ NTSTATUS TdiDisconnect( } TdiBuildDisconnect - (*Irp, /* I/O Request Packet */ + (*Irp, /* I/O Request Packet */ DeviceObject, /* Device object */ TransportObject, /* File object */ CompletionRoutine, /* Completion routine */ @@ -1289,7 +1276,7 @@ NTSTATUS TdiDisconnect( ReturnConnectionInfo); /* Indication of who disconnected */ TdiCall(*Irp, DeviceObject, NULL, Iosb); - + return STATUS_PENDING; } diff --git a/drivers/network/afd/afd/write.c b/drivers/network/afd/afd/write.c index 72be9e13952..ef01dd0a8da 100644 --- a/drivers/network/afd/afd/write.c +++ b/drivers/network/afd/afd/write.c @@ -12,14 +12,10 @@ #include "tdiconn.h" #include "debug.h" -static -NTSTATUS -NTAPI -SendComplete -( PDEVICE_OBJECT DeviceObject, - PIRP Irp, - PVOID Context ) -{ +static NTSTATUS NTAPI SendComplete +( PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PVOID Context ) { NTSTATUS Status = Irp->IoStatus.Status; PAFD_FCB FCB = (PAFD_FCB)Context; PLIST_ENTRY NextIrpEntry; @@ -27,7 +23,7 @@ SendComplete PIO_STACK_LOCATION NextIrpSp; PAFD_SEND_INFO SendReq = NULL; PAFD_MAPBUF Map; - UINT TotalBytesCopied = 0, SpaceAvail, i; + UINT TotalBytesCopied = 0, TotalBytesProcessed = 0, SpaceAvail, i; /* * The Irp parameter passed in is the IRP of the stream between AFD and @@ -42,47 +38,42 @@ SendComplete Irp->IoStatus.Status, Irp->IoStatus.Information)); - if (!SocketAcquireStateLock(FCB)) + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; ASSERT(FCB->SendIrp.InFlightRequest == Irp); FCB->SendIrp.InFlightRequest = NULL; /* Request is not in flight any longer */ - if (FCB->State == SOCKET_STATE_CLOSED) - { + if( FCB->State == SOCKET_STATE_CLOSED ) { /* Cleanup our IRP queue because the FCB is being destroyed */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); - SendReq = GetLockedData(NextIrp, NextIrpSp); - NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; - NextIrp->IoStatus.Information = 0; - UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); - - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); - - (void)IoSetCancelRoutine(NextIrp, NULL); - IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) { + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); + SendReq = GetLockedData(NextIrp, NextIrpSp); + NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; + NextIrp->IoStatus.Information = 0; + UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); + if( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + (void)IoSetCancelRoutine(NextIrp, NULL); + IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } - + RetryDisconnectCompletion(FCB); - - SocketStateUnlock(FCB); - return STATUS_FILE_CLOSED; + + SocketStateUnlock( FCB ); + return STATUS_FILE_CLOSED; } - if (!NT_SUCCESS(Status)) - { + if( !NT_SUCCESS(Status) ) { /* Complete all following send IRPs with error */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) { + NextIrpEntry = + RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); + NextIrp = + CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); SendReq = GetLockedData(NextIrp, NextIrpSp); @@ -93,13 +84,11 @@ SendComplete NextIrp->IoStatus.Status = Status; NextIrp->IoStatus.Information = 0; - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); - - (void)IoSetCancelRoutine(NextIrp, NULL); + if ( NextIrp->MdlAddress ) UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + (void)IoSetCancelRoutine(NextIrp, NULL); IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } - + RetryDisconnectCompletion(FCB); SocketStateUnlock( FCB ); @@ -110,12 +99,48 @@ SendComplete RtlMoveMemory( FCB->Send.Window, FCB->Send.Window + FCB->Send.BytesUsed, FCB->Send.BytesUsed - Irp->IoStatus.Information ); - FCB->Send.BytesUsed -= Irp->IoStatus.Information; - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + TotalBytesProcessed = 0; + while (!IsListEmpty(&FCB->PendingIrpList[FUNCTION_SEND]) && + TotalBytesProcessed != Irp->IoStatus.Information) { + NextIrpEntry = + RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); + NextIrp = + CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); + SendReq = GetLockedData(NextIrp, NextIrpSp); + Map = (PAFD_MAPBUF)(SendReq->BufferArray + SendReq->BufferCount); + + TotalBytesCopied = 0; + + for( i = 0; i < SendReq->BufferCount; i++ ) + TotalBytesCopied += SendReq->BufferArray[i].len; + + NextIrp->IoStatus.Status = Irp->IoStatus.Status; + NextIrp->IoStatus.Information = TotalBytesCopied; + + TotalBytesProcessed += TotalBytesCopied; + + (void)IoSetCancelRoutine(NextIrp, NULL); + + UnlockBuffers( SendReq->BufferArray, + SendReq->BufferCount, + FALSE ); + + if (NextIrp->MdlAddress) UnlockRequest(NextIrp, NextIrpSp); + + IoCompleteRequest(NextIrp, IO_NETWORK_INCREMENT); + } + + ASSERT(TotalBytesProcessed == Irp->IoStatus.Information); + + FCB->Send.BytesUsed -= TotalBytesProcessed; + + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) { + NextIrpEntry = + RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); + NextIrp = + CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); SendReq = GetLockedData(NextIrp, NextIrpSp); Map = (PAFD_MAPBUF)(SendReq->BufferArray + SendReq->BufferCount); @@ -125,8 +150,7 @@ SendComplete SpaceAvail = FCB->Send.Size - FCB->Send.BytesUsed; TotalBytesCopied = 0; - for (i = 0; iBufferCount; i++) - { + for( i = 0; i < SendReq->BufferCount; i++ ) { if (SpaceAvail < SendReq->BufferArray[i].len) { InsertHeadList(&FCB->PendingIrpList[FUNCTION_SEND], @@ -134,7 +158,8 @@ SendComplete NextIrp = NULL; break; } - Map[i].BufferAddress = MmMapLockedPages( Map[i].Mdl, KernelMode ); + Map[i].BufferAddress = + MmMapLockedPages( Map[i].Mdl, KernelMode ); RtlCopyMemory( FCB->Send.Window + FCB->Send.BytesUsed, Map[i].BufferAddress, @@ -149,25 +174,11 @@ SendComplete if (NextIrp != NULL) { FCB->Send.BytesUsed += TotalBytesCopied; - - NextIrp->IoStatus.Status = STATUS_SUCCESS; - NextIrp->IoStatus.Information = TotalBytesCopied; - - (void)IoSetCancelRoutine(NextIrp, NULL); - - UnlockBuffers( SendReq->BufferArray, - SendReq->BufferCount, - FALSE ); - - if (NextIrp->MdlAddress) - UnlockRequest(NextIrp, NextIrpSp); - - IoCompleteRequest(NextIrp, IO_NETWORK_INCREMENT); } else break; } - + if (FCB->Send.Size - FCB->Send.BytesUsed != 0) { FCB->PollState |= AFD_EVENT_SEND; @@ -180,7 +191,7 @@ SendComplete } /* Some data is still waiting */ - if (FCB->Send.BytesUsed) + if( FCB->Send.BytesUsed ) { Status = TdiSend( &FCB->SendIrp.InFlightRequest, FCB->Connection.Object, @@ -202,91 +213,96 @@ SendComplete return STATUS_SUCCESS; } -static -NTSTATUS -NTAPI -PacketSocketSendComplete -( PDEVICE_OBJECT DeviceObject, - PIRP Irp, - PVOID Context) -{ +static NTSTATUS NTAPI PacketSocketSendComplete +( PDEVICE_OBJECT DeviceObject, + PIRP Irp, + PVOID Context ) { PAFD_FCB FCB = (PAFD_FCB)Context; PLIST_ENTRY NextIrpEntry; PIRP NextIrp; + PAFD_SEND_INFO SendReq; AFD_DbgPrint(MID_TRACE,("Called, status %x, %d bytes used\n", Irp->IoStatus.Status, Irp->IoStatus.Information)); - if (!SocketAcquireStateLock(FCB)) + if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED; ASSERT(FCB->SendIrp.InFlightRequest == Irp); FCB->SendIrp.InFlightRequest = NULL; /* Request is not in flight any longer */ - if (Irp->IoStatus.Status == STATUS_SUCCESS) - { - FCB->PollState |= AFD_EVENT_SEND; - FCB->PollStatus[FD_WRITE_BIT] = STATUS_SUCCESS; - PollReeval( FCB->DeviceExt, FCB->FileObject ); - } - - if (FCB->State == SOCKET_STATE_CLOSED) - { + if( FCB->State == SOCKET_STATE_CLOSED ) { /* Cleanup our IRP queue because the FCB is being destroyed */ - while (!IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND])) - { - NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); - NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); - NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; - NextIrp->IoStatus.Information = 0; - - if (NextIrp->MdlAddress) - UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); - + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) { + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + SendReq = GetLockedData(NextIrp, IoGetCurrentIrpStackLocation(NextIrp)); + NextIrp->IoStatus.Status = STATUS_FILE_CLOSED; + NextIrp->IoStatus.Information = 0; (void)IoSetCancelRoutine(NextIrp, NULL); - IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); + UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); + UnlockRequest( NextIrp, IoGetCurrentIrpStackLocation( NextIrp ) ); + IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); } - - SocketStateUnlock( FCB ); - return STATUS_FILE_CLOSED; + SocketStateUnlock( FCB ); + return STATUS_FILE_CLOSED; } + + ASSERT(!IsListEmpty(&FCB->PendingIrpList[FUNCTION_SEND])); + + /* TDI spec guarantees FIFO ordering on IRPs */ + NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]); + NextIrp = CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + + SendReq = GetLockedData(NextIrp, IoGetCurrentIrpStackLocation(NextIrp)); + + NextIrp->IoStatus.Status = Irp->IoStatus.Status; + NextIrp->IoStatus.Information = Irp->IoStatus.Information; + + (void)IoSetCancelRoutine(NextIrp, NULL); + + UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); + + UnlockRequest(NextIrp, IoGetCurrentIrpStackLocation(NextIrp)); + + IoCompleteRequest(NextIrp, IO_NETWORK_INCREMENT); - SocketStateUnlock( FCB ); + FCB->PollState |= AFD_EVENT_SEND; + FCB->PollStatus[FD_WRITE_BIT] = STATUS_SUCCESS; + PollReeval(FCB->DeviceExt, FCB->FileObject); + + SocketStateUnlock(FCB); return STATUS_SUCCESS; } -NTSTATUS -NTAPI -AfdConnectedSocketWriteData -( PDEVICE_OBJECT DeviceObject, PIRP Irp, - PIO_STACK_LOCATION IrpSp, BOOLEAN Short ) -{ +NTSTATUS NTAPI +AfdConnectedSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp, BOOLEAN Short) { NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_SEND_INFO SendReq; - ULONG Information; UINT TotalBytesCopied = 0, i, SpaceAvail = 0; BOOLEAN NoSpace = FALSE; AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if (!SocketAcquireStateLock(FCB)) - return LostSocket( Irp ); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); - if (FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) + if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS ) { PAFD_SEND_INFO_UDP SendReq; PTDI_CONNECTION_INFORMATION TargetAddress; /* Check that the socket is bound */ - if (FCB->State != SOCKET_STATE_BOUND || !FCB->RemoteAddress) - return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0); + if( FCB->State != SOCKET_STATE_BOUND || !FCB->RemoteAddress ) + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, + 0 ); - if (!(SendReq = LockRequest(Irp, IrpSp))) + if( !(SendReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 ); /* Must lock buffers before handing off user data */ @@ -295,46 +311,48 @@ AfdConnectedSocketWriteData NULL, NULL, FALSE, FALSE ); - if ( !SendReq->BufferArray ) - { - return UnlockAndMaybeComplete(FCB, STATUS_ACCESS_VIOLATION, Irp, 0); + if( !SendReq->BufferArray ) { + return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION, + Irp, 0 ); } Status = TdiBuildConnectionInfo( &TargetAddress, FCB->RemoteAddress ); - if (NT_SUCCESS(Status)) + if( NT_SUCCESS(Status) ) { + FCB->PollState &= ~AFD_EVENT_SEND; + + Status = QueueUserModeIrp(FCB, Irp, FUNCTION_SEND); + if (Status == STATUS_PENDING) + { + TdiSendDatagram(&FCB->SendIrp.InFlightRequest, + FCB->AddressFile.Object, + SendReq->BufferArray[0].buf, + SendReq->BufferArray[0].len, + TargetAddress, + &FCB->SendIrp.Iosb, + PacketSocketSendComplete, + FCB); + } + + ExFreePool( TargetAddress ); + + SocketStateUnlock(FCB); + + return STATUS_PENDING; + } + else { - Status = TdiSendDatagram - ( &FCB->SendIrp.InFlightRequest, - FCB->AddressFile.Object, - SendReq->BufferArray[0].buf, - SendReq->BufferArray[0].len, - TargetAddress, - &FCB->SendIrp.Iosb, - PacketSocketSendComplete, - FCB ); - - ExFreePool( TargetAddress ); - } - - if (Status == STATUS_PENDING) - Status = STATUS_SUCCESS; - - AFD_DbgPrint(MID_TRACE,("Dismissing request: %x\n", Status)); - - /* Even if we were pended, we're done with the user buffer at this - * point. */ - Information = SendReq->BufferArray[0].len; - UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); - return UnlockAndMaybeComplete( FCB, Status, Irp, Information ); + UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); + } } - + if (FCB->DisconnectPending && (FCB->DisconnectFlags & TDI_DISCONNECT_RELEASE)) { /* We're pending a send shutdown so don't accept anymore sends */ return UnlockAndMaybeComplete(FCB, STATUS_FILE_CLOSED, Irp, 0); } - + if (FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_DISCONNECT)) { if (FCB->PollStatus[FD_CLOSE_BIT] == STATUS_SUCCESS) @@ -349,31 +367,29 @@ AfdConnectedSocketWriteData } } - if (!(SendReq = LockRequest(Irp, IrpSp))) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, TotalBytesCopied); + if( !(SendReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete + ( FCB, STATUS_NO_MEMORY, Irp, TotalBytesCopied ); SendReq->BufferArray = LockBuffers( SendReq->BufferArray, SendReq->BufferCount, NULL, NULL, FALSE, FALSE ); - if (!SendReq->BufferArray) - { - return UnlockAndMaybeComplete(FCB, STATUS_ACCESS_VIOLATION, Irp, 0); + if( !SendReq->BufferArray ) { + return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION, + Irp, 0 ); } AFD_DbgPrint(MID_TRACE,("Socket state %d\n", FCB->State)); - if (FCB->State != SOCKET_STATE_CONNECTED) - { - if (SendReq->AfdFlags & AFD_IMMEDIATE) - { + if( FCB->State != SOCKET_STATE_CONNECTED ) { + if( (SendReq->AfdFlags & AFD_IMMEDIATE) || (FCB->NonBlocking) ) { AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); - UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); - return UnlockAndMaybeComplete(FCB, STATUS_CANT_WAIT, Irp, 0); - } - else - { + UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); + return UnlockAndMaybeComplete + ( FCB, STATUS_CANT_WAIT, Irp, 0 ); + } else { AFD_DbgPrint(MID_TRACE,("Queuing request\n")); return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND ); } @@ -387,10 +403,8 @@ AfdConnectedSocketWriteData AFD_DbgPrint(MID_TRACE,("We can accept %d bytes\n", SpaceAvail)); - for (i = 0; - FCB->Send.BytesUsed < FCB->Send.Size && i < SendReq->BufferCount; - i++ ) - { + for( i = 0; FCB->Send.BytesUsed < FCB->Send.Size && + i < SendReq->BufferCount; i++ ) { if (SpaceAvail < SendReq->BufferArray[i].len) { @@ -400,6 +414,7 @@ AfdConnectedSocketWriteData return UnlockAndMaybeComplete(FCB, STATUS_BUFFER_OVERFLOW, Irp, 0); } + SpaceAvail += TotalBytesCopied; NoSpace = TRUE; break; } @@ -418,52 +433,11 @@ AfdConnectedSocketWriteData SpaceAvail -= SendReq->BufferArray[i].len; } - if (TotalBytesCopied == 0) - { + if( TotalBytesCopied == 0 ) { AFD_DbgPrint(MID_TRACE,("Empty send\n")); UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); - return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, TotalBytesCopied); - } - - if (!NoSpace) - { - UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); - FCB->Send.BytesUsed += TotalBytesCopied; - AFD_DbgPrint(MID_TRACE,("Completed %d bytes\n", TotalBytesCopied)); - } - else - { - FCB->PollState &= ~AFD_EVENT_SEND; - if (SendReq->AfdFlags & AFD_IMMEDIATE) - { - AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); - UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); - return UnlockAndMaybeComplete - ( FCB, STATUS_CANT_WAIT, Irp, 0 ); - } - else - { - AFD_DbgPrint(MID_TRACE,("Queuing request\n")); - return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND ); - } - } - - if (!FCB->SendIrp.InFlightRequest) - { - Status = TdiSend( &FCB->SendIrp.InFlightRequest, - FCB->Connection.Object, - 0, - FCB->Send.Window, - FCB->Send.BytesUsed, - &FCB->SendIrp.Iosb, - SendComplete, - FCB ); - - if (Status == STATUS_PENDING) - Status = STATUS_SUCCESS; - - AFD_DbgPrint(MID_TRACE,("Dismissing request: %x (%d)\n", - Status, TotalBytesCopied)); + return UnlockAndMaybeComplete + ( FCB, STATUS_SUCCESS, Irp, TotalBytesCopied ); } if (SpaceAvail) @@ -477,57 +451,81 @@ AfdConnectedSocketWriteData FCB->PollState &= ~AFD_EVENT_SEND; } - RetryDisconnectCompletion(FCB); - - return UnlockAndMaybeComplete(FCB, Status, Irp, TotalBytesCopied); + if (!NoSpace) + { + FCB->Send.BytesUsed += TotalBytesCopied; + AFD_DbgPrint(MID_TRACE,("Copied %d bytes\n", TotalBytesCopied)); + + Status = QueueUserModeIrp(FCB, Irp, FUNCTION_SEND); + if (Status == STATUS_PENDING && !FCB->SendIrp.InFlightRequest) + { + TdiSend(&FCB->SendIrp.InFlightRequest, + FCB->Connection.Object, + 0, + FCB->Send.Window, + FCB->Send.BytesUsed, + &FCB->SendIrp.Iosb, + SendComplete, + FCB); + } + SocketStateUnlock(FCB); + + return STATUS_PENDING; + } + else + { + FCB->PollState &= ~AFD_EVENT_SEND; + if( (SendReq->AfdFlags & AFD_IMMEDIATE) || (FCB->NonBlocking) ) { + AFD_DbgPrint(MID_TRACE,("Nonblocking\n")); + UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE ); + return UnlockAndMaybeComplete + ( FCB, STATUS_CANT_WAIT, Irp, 0 ); + } else { + AFD_DbgPrint(MID_TRACE,("Queuing request\n")); + return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND ); + } + } } -NTSTATUS -NTAPI -AfdPacketSocketWriteData -( PDEVICE_OBJECT DeviceObject, - PIRP Irp, - PIO_STACK_LOCATION IrpSp) -{ +NTSTATUS NTAPI +AfdPacketSocketWriteData(PDEVICE_OBJECT DeviceObject, PIRP Irp, + PIO_STACK_LOCATION IrpSp) { NTSTATUS Status = STATUS_SUCCESS; PTDI_CONNECTION_INFORMATION TargetAddress; PFILE_OBJECT FileObject = IrpSp->FileObject; - PAFD_FCB FCB = (PAFD_FCB)FileObject->FsContext; + PAFD_FCB FCB = FileObject->FsContext; PAFD_SEND_INFO_UDP SendReq; - ULONG Information; AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB)); - if (!SocketAcquireStateLock(FCB)) - return LostSocket(Irp); + if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); /* Check that the socket is bound */ - if ( FCB->State != SOCKET_STATE_BOUND && + if( FCB->State != SOCKET_STATE_BOUND && FCB->State != SOCKET_STATE_CREATED) - return UnlockAndMaybeComplete(FCB, STATUS_INVALID_PARAMETER, Irp, 0); - - if( !(SendReq = LockRequest(Irp, IrpSp))) - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + return UnlockAndMaybeComplete + ( FCB, STATUS_INVALID_PARAMETER, Irp, 0 ); + if( !(SendReq = LockRequest( Irp, IrpSp )) ) + return UnlockAndMaybeComplete + ( FCB, STATUS_NO_MEMORY, Irp, 0 ); if (FCB->State == SOCKET_STATE_CREATED) { - if (FCB->LocalAddress) - ExFreePool(FCB->LocalAddress); + if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress ); FCB->LocalAddress = - TaBuildNullTransportAddress( - ((PTRANSPORT_ADDRESS)SendReq->TdiConnection.RemoteAddress)->Address[0].AddressType); + TaBuildNullTransportAddress( ((PTRANSPORT_ADDRESS)SendReq->TdiConnection.RemoteAddress)-> + Address[0].AddressType ); - if (FCB->LocalAddress) - { + if( FCB->LocalAddress ) { Status = WarmSocketForBind( FCB ); - if (NT_SUCCESS(Status)) + if( NT_SUCCESS(Status) ) FCB->State = SOCKET_STATE_BOUND; else return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); - } - else - return UnlockAndMaybeComplete(FCB, STATUS_NO_MEMORY, Irp, 0); + } else + return UnlockAndMaybeComplete + ( FCB, STATUS_NO_MEMORY, Irp, 0 ); } SendReq->BufferArray = LockBuffers( SendReq->BufferArray, @@ -535,8 +533,9 @@ AfdPacketSocketWriteData NULL, NULL, FALSE, FALSE ); - if (!SendReq->BufferArray) - return UnlockAndMaybeComplete(FCB, STATUS_ACCESS_VIOLATION, Irp, 0); + if( !SendReq->BufferArray ) + return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION, + Irp, 0 ); AFD_DbgPrint (MID_TRACE,("RemoteAddress #%d Type %d\n", @@ -550,33 +549,32 @@ AfdPacketSocketWriteData /* Check the size of the Address given ... */ - if (NT_SUCCESS(Status)) - { + if( NT_SUCCESS(Status) ) { FCB->PollState &= ~AFD_EVENT_SEND; - Status = TdiSendDatagram - ( &FCB->SendIrp.InFlightRequest, - FCB->AddressFile.Object, - SendReq->BufferArray[0].buf, - SendReq->BufferArray[0].len, - TargetAddress, - &FCB->SendIrp.Iosb, - PacketSocketSendComplete, - FCB ); + Status = QueueUserModeIrp(FCB, Irp, FUNCTION_SEND); + if (Status == STATUS_PENDING) + { + TdiSendDatagram(&FCB->SendIrp.InFlightRequest, + FCB->AddressFile.Object, + SendReq->BufferArray[0].buf, + SendReq->BufferArray[0].len, + TargetAddress, + &FCB->SendIrp.Iosb, + PacketSocketSendComplete, + FCB); + } - ExFreePool(TargetAddress); + ExFreePool( TargetAddress ); + + SocketStateUnlock(FCB); + + return STATUS_PENDING; + } + else + { + UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); + return UnlockAndMaybeComplete( FCB, Status, Irp, 0 ); } - - if (Status == STATUS_PENDING) - Status = STATUS_SUCCESS; - - AFD_DbgPrint(MID_TRACE,("Dismissing request: %x\n", Status)); - - /* Even if we were pended, we're done with the user buffer at this - * point. */ - Information = SendReq->BufferArray[0].len; - UnlockBuffers(SendReq->BufferArray, SendReq->BufferCount, FALSE); - - return UnlockAndMaybeComplete( FCB, Status, Irp, Information ); } diff --git a/drivers/network/afd/include/afd.h b/drivers/network/afd/include/afd.h index 60bb609cc4f..aa9bcff6cea 100644 --- a/drivers/network/afd/include/afd.h +++ b/drivers/network/afd/include/afd.h @@ -173,8 +173,8 @@ typedef struct _AFD_STORED_DATAGRAM { } AFD_STORED_DATAGRAM, *PAFD_STORED_DATAGRAM; typedef struct _AFD_FCB { - BOOLEAN Locked, Critical, Overread; - UINT State, Flags, BlockingMode, GroupID, GroupType; + BOOLEAN Locked, Critical, Overread, NonBlocking, OobInline; + UINT State, Flags, GroupID, GroupType; KIRQL OldIrql; UINT LockCount; PVOID CurrentThread; @@ -308,11 +308,9 @@ PVOID GetLockedData( PIRP Irp, PIO_STACK_LOCATION IrpSp ); NTSTATUS LeaveIrpUntilLater( PAFD_FCB FCB, PIRP Irp, UINT Function ); NTSTATUS QueueUserModeIrp(PAFD_FCB FCB, PIRP Irp, UINT Function); -NTSTATUS LeaveIrpUntilLater(PAFD_FCB FCB, PIRP Irp, UINT Function); -NTSTATUS QueueUserModeIrp(PAFD_FCB FCB, PIRP Irp, UINT Function); - /* main.c */ +VOID OskitDumpBuffer( PCHAR Buffer, UINT Len ); VOID DestroySocket( PAFD_FCB FCB ); VOID NTAPI AfdCancelHandler(PDEVICE_OBJECT DeviceObject, PIRP Irp); diff --git a/drivers/network/ndis/CMakeLists.txt b/drivers/network/ndis/CMakeLists.txt index 60b7bcc52f1..f548a1b17d9 100644 --- a/drivers/network/ndis/CMakeLists.txt +++ b/drivers/network/ndis/CMakeLists.txt @@ -35,12 +35,12 @@ list(APPEND SOURCE ndis.rc ${CMAKE_CURRENT_BINARY_DIR}/ndis.def) -add_library(ndis SHARED ${CMAKE_CURRENT_BINARY_DIR}/ndis_ndissys.h.gch ${SOURCE}) +add_library(ndis SHARED ${SOURCE}) set_module_type(ndis kernelmodedriver) add_importlibs(ndis ntoskrnl hal) -add_pch(ndis ${CMAKE_CURRENT_SOURCE_DIR}/include/ndissys.h ${SOURCE}) +add_pch(ndis include/ndissys.h) add_cd_file(TARGET ndis DESTINATION reactos/system32/drivers FOR all) add_importlib_target(ndis.spec) diff --git a/drivers/network/tcpip/CMakeLists.txt b/drivers/network/tcpip/CMakeLists.txt index 30ec32176a8..30dac485c31 100644 --- a/drivers/network/tcpip/CMakeLists.txt +++ b/drivers/network/tcpip/CMakeLists.txt @@ -27,7 +27,7 @@ list(APPEND SOURCE tcpip.rc ${CMAKE_CURRENT_BINARY_DIR}/tcpip.def) -add_library(tcpip SHARED ${CMAKE_CURRENT_BINARY_DIR}/tcpip_precomp.h.gch ${SOURCE}) +add_library(tcpip SHARED ${SOURCE}) target_link_libraries(tcpip ip @@ -38,6 +38,6 @@ target_link_libraries(tcpip set_module_type(tcpip kernelmodedriver) add_importlibs(tcpip ndis ntoskrnl hal) -add_pch(tcpip ${CMAKE_CURRENT_SOURCE_DIR}/include/precomp.h ${SOURCE}) +add_pch(tcpip include/precomp.h) add_cd_file(TARGET tcpip DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/network/tcpip/include/titypes.h b/drivers/network/tcpip/include/titypes.h index 2ab4aa4141b..3d0a93d0075 100644 --- a/drivers/network/tcpip/include/titypes.h +++ b/drivers/network/tcpip/include/titypes.h @@ -13,7 +13,6 @@ */ #define ReferenceObject(Object) \ { \ - ASSERT(((Object)->RefCount) > 0); \ InterlockedIncrement(&((Object)->RefCount)); \ } @@ -23,7 +22,6 @@ */ #define DereferenceObject(Object) \ { \ - ASSERT(((Object)->RefCount) > 0); \ if (InterlockedDecrement(&((Object)->RefCount)) == 0) \ (((Object)->Free)(Object)); \ } @@ -35,7 +33,7 @@ { \ ReferenceObject(Object); \ KeAcquireSpinLock(&((Object)->Lock), Irql); \ - (Object)->OldIrql = *Irql; \ + memcpy(&(Object)->OldIrql, Irql, sizeof(KIRQL)); \ } /* @@ -268,6 +266,14 @@ typedef struct _CONNECTION_ENDPOINT { LIST_ENTRY ListenRequest; /* Queued listen requests */ LIST_ENTRY ReceiveRequest; /* Queued receive requests */ LIST_ENTRY SendRequest; /* Queued send requests */ + LIST_ENTRY ShutdownRequest;/* Queued shutdown requests */ + + /* Signals */ + UINT SignalState; /* Active signals from oskit */ + + /* Disconnect Timer */ + KTIMER DisconnectTimer; + KDPC DisconnectDpc; struct _CONNECTION_ENDPOINT *Next; /* Next connection in address file list */ } CONNECTION_ENDPOINT, *PCONNECTION_ENDPOINT; diff --git a/drivers/network/tcpip/tcpip/dispatch.c b/drivers/network/tcpip/tcpip/dispatch.c index fcc4a2dd244..6fa24c83cfc 100644 --- a/drivers/network/tcpip/tcpip/dispatch.c +++ b/drivers/network/tcpip/tcpip/dispatch.c @@ -13,21 +13,19 @@ #include -NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status ) -{ +NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status ) { KIRQL OldIrql; Irp->IoStatus.Status = Status; - if (Status == STATUS_PENDING) - IoMarkIrpPending( Irp ); - else - { + if( Status == STATUS_PENDING ) + IoMarkIrpPending( Irp ); + else { IoAcquireCancelSpinLock(&OldIrql); - (void)IoSetCancelRoutine( Irp, NULL ); + (void)IoSetCancelRoutine( Irp, NULL ); IoReleaseCancelSpinLock(OldIrql); - IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); + IoCompleteRequest( Irp, IO_NETWORK_INCREMENT ); } return Status; @@ -58,8 +56,7 @@ NTSTATUS DispPrepareIrpForCancel( IoAcquireCancelSpinLock(&OldIrql); - if (!Irp->Cancel && !TransContext->CancelIrps) - { + if (!Irp->Cancel && !TransContext->CancelIrps) { (void)IoSetCancelRoutine(Irp, CancelRoutine); IoReleaseCancelSpinLock(OldIrql); @@ -147,41 +144,42 @@ VOID NTAPI DispCancelRequest( #endif /* Try canceling the request */ - switch(MinorFunction) - { - case TDI_SEND: - case TDI_RECEIVE: - DequeuedIrp = TCPRemoveIRP( TranContext->Handle.ConnectionContext, Irp ); + switch(MinorFunction) { + case TDI_SEND: + case TDI_RECEIVE: + DequeuedIrp = TCPRemoveIRP( TranContext->Handle.ConnectionContext, Irp ); + break; + + case TDI_SEND_DATAGRAM: + if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { + TI_DbgPrint(MIN_TRACE, ("TDI_SEND_DATAGRAM, but no address file.\n")); break; + } - case TDI_SEND_DATAGRAM: - if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) - { - TI_DbgPrint(MIN_TRACE, ("TDI_SEND_DATAGRAM, but no address file.\n")); - break; - } + DequeuedIrp = DGRemoveIRP(TranContext->Handle.AddressHandle, Irp); + break; - DequeuedIrp = DGRemoveIRP(TranContext->Handle.AddressHandle, Irp); + case TDI_RECEIVE_DATAGRAM: + if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { + TI_DbgPrint(MIN_TRACE, ("TDI_RECEIVE_DATAGRAM, but no address file.\n")); break; + } - case TDI_RECEIVE_DATAGRAM: - if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) - { - TI_DbgPrint(MIN_TRACE, ("TDI_RECEIVE_DATAGRAM, but no address file.\n")); - break; - } + DequeuedIrp = DGRemoveIRP(TranContext->Handle.AddressHandle, Irp); + break; - DequeuedIrp = DGRemoveIRP(TranContext->Handle.AddressHandle, Irp); - break; + case TDI_CONNECT: + DequeuedIrp = TCPRemoveIRP(TranContext->Handle.ConnectionContext, Irp); + break; + + case TDI_DISCONNECT: + DequeuedIrp = TCPRemoveIRP(TranContext->Handle.ConnectionContext, Irp); + break; - case TDI_CONNECT: - DequeuedIrp = TCPRemoveIRP(TranContext->Handle.ConnectionContext, Irp); - break; - - default: - TI_DbgPrint(MIN_TRACE, ("Unknown IRP. MinorFunction (0x%X).\n", MinorFunction)); - ASSERT(FALSE); - break; + default: + TI_DbgPrint(MIN_TRACE, ("Unknown IRP. MinorFunction (0x%X).\n", MinorFunction)); + ASSERT(FALSE); + break; } if (DequeuedIrp) @@ -209,7 +207,6 @@ VOID NTAPI DispCancelListenRequest( IoReleaseCancelSpinLock(Irp->CancelIrql); TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - DbgPrint("[TCPIP, DispCancelListenRequest] Called\n"); IrpSp = IoGetCurrentIrpStackLocation(Irp); FileObject = IrpSp->FileObject; @@ -220,23 +217,20 @@ VOID NTAPI DispCancelListenRequest( #if DBG if (!Irp->Cancel) - { TI_DbgPrint(MIN_TRACE, ("Irp->Cancel is FALSE, should be TRUE.\n")); - DbgPrint("[TCPIP, DispCancelListenRequest] Irp->Cancel is FALSE, should be TRUE\n"); - } #endif /* Try canceling the request */ Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - if (TCPAbortListenForSocket(Connection->AddressFile->Listener, Connection)) + if (TCPAbortListenForSocket(Connection->AddressFile->Listener, + Connection)) { Irp->IoStatus.Information = 0; IRPFinish(Irp, STATUS_CANCELLED); } TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); - DbgPrint("[TCPIP, DispCancelListenRequest] Leaving\n"); } @@ -266,210 +260,106 @@ NTSTATUS DispTdiAssociateAddress( * Status of operation */ { - PTDI_REQUEST_KERNEL_ASSOCIATE Parameters; - PTRANSPORT_CONTEXT TranContext; - PIO_STACK_LOCATION IrpSp; - PCONNECTION_ENDPOINT Connection, LastConnection; - PFILE_OBJECT FileObject; - PADDRESS_FILE AddrFile = NULL; - NTSTATUS Status; - KIRQL OldIrql; + PTDI_REQUEST_KERNEL_ASSOCIATE Parameters; + PTRANSPORT_CONTEXT TranContext; + PIO_STACK_LOCATION IrpSp; + PCONNECTION_ENDPOINT Connection, LastConnection; + PFILE_OBJECT FileObject; + PADDRESS_FILE AddrFile = NULL; + NTSTATUS Status; + KIRQL OldIrql; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiAssociateAddress] Called\n")); - DbgPrint("[TCPIP, DispTdiAssociateAddress] Called\n"); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - IrpSp = IoGetCurrentIrpStackLocation(Irp); + IrpSp = IoGetCurrentIrpStackLocation(Irp); - /* Get associated connection endpoint file object. Quit if none exists */ + /* Get associated connection endpoint file object. Quit if none exists */ - TranContext = IrpSp->FileObject->FsContext; - if (!TranContext) - { - TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - return STATUS_INVALID_PARAMETER; - } + TranContext = IrpSp->FileObject->FsContext; + if (!TranContext) { + TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); + return STATUS_INVALID_PARAMETER; + } - Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - if (!Connection) - { - TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); - return STATUS_INVALID_PARAMETER; - } + Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; + if (!Connection) { + TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); + return STATUS_INVALID_PARAMETER; + } - Parameters = (PTDI_REQUEST_KERNEL_ASSOCIATE)&IrpSp->Parameters; + Parameters = (PTDI_REQUEST_KERNEL_ASSOCIATE)&IrpSp->Parameters; - Status = ObReferenceObjectByHandle( - Parameters->AddressHandle, - 0, - IoFileObjectType, - KernelMode, - (PVOID*)&FileObject, - NULL); + Status = ObReferenceObjectByHandle( + Parameters->AddressHandle, + 0, + IoFileObjectType, + KernelMode, + (PVOID*)&FileObject, + NULL); + if (!NT_SUCCESS(Status)) { + TI_DbgPrint(MID_TRACE, ("Bad address file object handle (0x%X): %x.\n", + Parameters->AddressHandle, Status)); + return STATUS_INVALID_PARAMETER; + } - if (!NT_SUCCESS(Status)) - { - TI_DbgPrint(MID_TRACE, ("Bad address file object handle (0x%X): %x.\n", - Parameters->AddressHandle, Status)); - return STATUS_INVALID_PARAMETER; - } - - LockObject(Connection, &OldIrql); - - if (Connection->AddressFile) - { - ObDereferenceObject(FileObject); - UnlockObject(Connection, OldIrql); - TI_DbgPrint(MID_TRACE, ("An address file is already asscociated.\n")); - return STATUS_INVALID_PARAMETER; - } - - if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) - { - ObDereferenceObject(FileObject); - UnlockObject(Connection, OldIrql); - TI_DbgPrint(MID_TRACE, ("Bad address file object. Magic (0x%X).\n", - FileObject->FsContext2)); - return STATUS_INVALID_PARAMETER; - } - - /* Get associated address file object. Quit if none exists */ - - TranContext = FileObject->FsContext; - if (!TranContext) - { - ObDereferenceObject(FileObject); - UnlockObject(Connection, OldIrql); - TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - return STATUS_INVALID_PARAMETER; - } - - AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle; - if (!AddrFile) - { - UnlockObject(Connection, OldIrql); - ObDereferenceObject(FileObject); - TI_DbgPrint(MID_TRACE, ("No address file object.\n")); - return STATUS_INVALID_PARAMETER; - } - - LockObjectAtDpcLevel(AddrFile); - - DbgPrint("[TCPIP, DispTdiAssociateAddress] Associating AddressFile = 0x%x with Connection = 0x%x\n", - AddrFile, Connection); - - /* Add connection endpoint to the address file */ - ReferenceObject(Connection); - if (AddrFile->Connection == NULL) - AddrFile->Connection = Connection; - else - { - LastConnection = AddrFile->Connection; - while (LastConnection->Next != NULL) - LastConnection = LastConnection->Next; - LastConnection->Next = Connection; - } - - ReferenceObject(AddrFile); - Connection->AddressFile = AddrFile; - - UnlockObjectFromDpcLevel(AddrFile); - UnlockObject(Connection, OldIrql); + LockObject(Connection, &OldIrql); + if (Connection->AddressFile) { ObDereferenceObject(FileObject); - - DbgPrint("[TCPIP, DispTdiAssociateAddress] Leaving\n"); - - return STATUS_SUCCESS; -} - -NTSTATUS DispTdiDisassociateAddress( - PIRP Irp) -/* - * FUNCTION: TDI_DISASSOCIATE_ADDRESS handler - * ARGUMENTS: - * Irp = Pointer to an I/O request packet - * RETURNS: - * Status of operation - */ -{ - PCONNECTION_ENDPOINT Connection, LastConnection; - PTRANSPORT_CONTEXT TranContext; - PIO_STACK_LOCATION IrpSp; - KIRQL OldIrql; - NTSTATUS Status; - - TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - DbgPrint("[TCPIP, DispTdiDisassociateAddress] Called\n"); - - IrpSp = IoGetCurrentIrpStackLocation(Irp); - - /* Get associated connection endpoint file object. Quit if none exists */ - - TranContext = IrpSp->FileObject->FsContext; - if (!TranContext) - { - TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - return STATUS_INVALID_PARAMETER; - } - - Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - if (!Connection) - { - TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); - return STATUS_INVALID_PARAMETER; - } - - LockObject(Connection, &OldIrql); - - if (!Connection->AddressFile) - { - UnlockObject(Connection, OldIrql); - TI_DbgPrint(MID_TRACE, ("No address file is asscociated.\n")); - return STATUS_INVALID_PARAMETER; - } - - LockObjectAtDpcLevel(Connection->AddressFile); - - /* Unlink this connection from the address file */ - if (Connection->AddressFile->Connection == Connection) - { - Connection->AddressFile->Connection = Connection->Next; - DereferenceObject(Connection); - Status = STATUS_SUCCESS; - } - else - { - LastConnection = Connection->AddressFile->Connection; - while (LastConnection->Next != Connection && LastConnection->Next != NULL) - LastConnection = LastConnection->Next; - if (LastConnection->Next == Connection) - { - LastConnection->Next = Connection->Next; - DereferenceObject(Connection); - Status = STATUS_SUCCESS; - } - else - { - Status = STATUS_INVALID_PARAMETER; - } - } - - UnlockObjectFromDpcLevel(Connection->AddressFile); - - if (Status == STATUS_SUCCESS) - { - DbgPrint("[TCPIP, DispTdiDisassociateAddress] Dissasociating AddressFile = 0x%x from Connection = 0x%x\n", - Connection->AddressFile, Connection); - /* Remove the address file from this connection */ - DereferenceObject(Connection->AddressFile); - Connection->AddressFile = NULL; - } - UnlockObject(Connection, OldIrql); + TI_DbgPrint(MID_TRACE, ("An address file is already asscociated.\n")); + return STATUS_INVALID_PARAMETER; + } - DbgPrint("[TCPIP, DispTdiDisassociateAddress] Leaving. Status = 0x%x\n", Status); + if (FileObject->FsContext2 != (PVOID)TDI_TRANSPORT_ADDRESS_FILE) { + ObDereferenceObject(FileObject); + UnlockObject(Connection, OldIrql); + TI_DbgPrint(MID_TRACE, ("Bad address file object. Magic (0x%X).\n", + FileObject->FsContext2)); + return STATUS_INVALID_PARAMETER; + } - return Status; + /* Get associated address file object. Quit if none exists */ + + TranContext = FileObject->FsContext; + if (!TranContext) { + ObDereferenceObject(FileObject); + UnlockObject(Connection, OldIrql); + TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); + return STATUS_INVALID_PARAMETER; + } + + AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle; + if (!AddrFile) { + UnlockObject(Connection, OldIrql); + ObDereferenceObject(FileObject); + TI_DbgPrint(MID_TRACE, ("No address file object.\n")); + return STATUS_INVALID_PARAMETER; + } + + LockObjectAtDpcLevel(AddrFile); + + ReferenceObject(AddrFile); + Connection->AddressFile = AddrFile; + + /* Add connection endpoint to the address file */ + ReferenceObject(Connection); + if (AddrFile->Connection == NULL) + AddrFile->Connection = Connection; + else + { + LastConnection = AddrFile->Connection; + while (LastConnection->Next != NULL) + LastConnection = LastConnection->Next; + LastConnection->Next = Connection; + } + + ObDereferenceObject(FileObject); + + UnlockObjectFromDpcLevel(AddrFile); + UnlockObject(Connection, OldIrql); + + return STATUS_SUCCESS; } @@ -483,63 +373,142 @@ NTSTATUS DispTdiConnect( * Status of operation */ { - PCONNECTION_ENDPOINT Connection; - PTDI_REQUEST_KERNEL Parameters; - PTRANSPORT_CONTEXT TranContext; - PIO_STACK_LOCATION IrpSp; - NTSTATUS Status; + PCONNECTION_ENDPOINT Connection; + PTDI_REQUEST_KERNEL Parameters; + PTRANSPORT_CONTEXT TranContext; + PIO_STACK_LOCATION IrpSp; + NTSTATUS Status; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiConnect] Called\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - IrpSp = IoGetCurrentIrpStackLocation(Irp); + IrpSp = IoGetCurrentIrpStackLocation(Irp); - /* Get associated connection endpoint file object. Quit if none exists */ + /* Get associated connection endpoint file object. Quit if none exists */ - TranContext = IrpSp->FileObject->FsContext; - if (!TranContext) - { - TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - Status = STATUS_INVALID_PARAMETER; - goto done; - } + TranContext = IrpSp->FileObject->FsContext; + if (!TranContext) { + TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); + Status = STATUS_INVALID_PARAMETER; + goto done; + } - Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - if (!Connection) - { - TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); - Status = STATUS_INVALID_PARAMETER; - goto done; - } + Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; + if (!Connection) { + TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); + Status = STATUS_INVALID_PARAMETER; + goto done; + } - Parameters = (PTDI_REQUEST_KERNEL)&IrpSp->Parameters; + Parameters = (PTDI_REQUEST_KERNEL)&IrpSp->Parameters; - Status = DispPrepareIrpForCancel(TranContext->Handle.ConnectionContext, - Irp, - DispCancelRequest); + Status = DispPrepareIrpForCancel(TranContext->Handle.ConnectionContext, + Irp, + DispCancelRequest); - if (NT_SUCCESS(Status)) - { - Status = TCPConnect( - TranContext->Handle.ConnectionContext, - Parameters->RequestConnectionInformation, - Parameters->ReturnConnectionInformation, - DispDataRequestComplete, - Irp ); - } + if (NT_SUCCESS(Status)) { + Status = TCPConnect( + TranContext->Handle.ConnectionContext, + Parameters->RequestConnectionInformation, + Parameters->ReturnConnectionInformation, + DispDataRequestComplete, + Irp ); + } - done: - if (Status != STATUS_PENDING) - { - DispDataRequestComplete(Irp, Status, 0); - } - else - IoMarkIrpPending(Irp); +done: + if (Status != STATUS_PENDING) { + DispDataRequestComplete(Irp, Status, 0); + } else + IoMarkIrpPending(Irp); - TI_DbgPrint(MAX_TRACE, ("[TCPIP, DispTdiConnect] TCP Connect returned %08x\n", Status)); + TI_DbgPrint(MAX_TRACE, ("TCP Connect returned %08x\n", Status)); - return Status; + return Status; } + +NTSTATUS DispTdiDisassociateAddress( + PIRP Irp) +/* + * FUNCTION: TDI_DISASSOCIATE_ADDRESS handler + * ARGUMENTS: + * Irp = Pointer to an I/O request packet + * RETURNS: + * Status of operation + */ +{ + PCONNECTION_ENDPOINT Connection, LastConnection; + PTRANSPORT_CONTEXT TranContext; + PIO_STACK_LOCATION IrpSp; + KIRQL OldIrql; + NTSTATUS Status; + + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); + + IrpSp = IoGetCurrentIrpStackLocation(Irp); + + /* Get associated connection endpoint file object. Quit if none exists */ + + TranContext = IrpSp->FileObject->FsContext; + if (!TranContext) { + TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); + return STATUS_INVALID_PARAMETER; + } + + Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; + if (!Connection) { + TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); + return STATUS_INVALID_PARAMETER; + } + + LockObject(Connection, &OldIrql); + + if (!Connection->AddressFile) { + UnlockObject(Connection, OldIrql); + TI_DbgPrint(MID_TRACE, ("No address file is asscociated.\n")); + return STATUS_INVALID_PARAMETER; + } + + LockObjectAtDpcLevel(Connection->AddressFile); + + /* Unlink this connection from the address file */ + if (Connection->AddressFile->Connection == Connection) + { + Connection->AddressFile->Connection = Connection->Next; + DereferenceObject(Connection); + Status = STATUS_SUCCESS; + } + else + { + LastConnection = Connection->AddressFile->Connection; + while (LastConnection->Next != Connection && LastConnection->Next != NULL) + LastConnection = LastConnection->Next; + if (LastConnection->Next == Connection) + { + LastConnection->Next = Connection->Next; + DereferenceObject(Connection); + Status = STATUS_SUCCESS; + } + else + { + Status = STATUS_INVALID_PARAMETER; + } + } + + UnlockObjectFromDpcLevel(Connection->AddressFile); + + if (Status == STATUS_SUCCESS) + { + /* Remove the address file from this connection */ + DereferenceObject(Connection->AddressFile); + Connection->AddressFile = NULL; + } + + UnlockObject(Connection, OldIrql); + + return Status; +} + + NTSTATUS DispTdiDisconnect( PIRP Irp) /* @@ -550,54 +519,50 @@ NTSTATUS DispTdiDisconnect( * Status of operation */ { - NTSTATUS Status; - PTDI_REQUEST_KERNEL_DISCONNECT DisReq; - PCONNECTION_ENDPOINT Connection; - PTRANSPORT_CONTEXT TranContext; - PIO_STACK_LOCATION IrpSp; + NTSTATUS Status; + PTDI_REQUEST_KERNEL_DISCONNECT DisReq; + PCONNECTION_ENDPOINT Connection; + PTRANSPORT_CONTEXT TranContext; + PIO_STACK_LOCATION IrpSp; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiDisconnect] Called\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - IrpSp = IoGetCurrentIrpStackLocation(Irp); - DisReq = (PTDI_REQUEST_KERNEL_DISCONNECT)&IrpSp->Parameters; + IrpSp = IoGetCurrentIrpStackLocation(Irp); + DisReq = (PTDI_REQUEST_KERNEL_DISCONNECT)&IrpSp->Parameters; - /* Get associated connection endpoint file object. Quit if none exists */ + /* Get associated connection endpoint file object. Quit if none exists */ - TranContext = IrpSp->FileObject->FsContext; - if (!TranContext) - { - TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - Status = STATUS_INVALID_PARAMETER; - goto done; - } + TranContext = IrpSp->FileObject->FsContext; + if (!TranContext) { + TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); + Status = STATUS_INVALID_PARAMETER; + goto done; + } - Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - if (!Connection) - { - TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); - Status = STATUS_INVALID_PARAMETER; - goto done; - } + Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; + if (!Connection) { + TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); + Status = STATUS_INVALID_PARAMETER; + goto done; + } - Status = TCPDisconnect( - TranContext->Handle.ConnectionContext, - DisReq->RequestFlags, - DisReq->RequestConnectionInformation, - DisReq->ReturnConnectionInformation, - DispDataRequestComplete, - Irp ); + Status = TCPDisconnect( + TranContext->Handle.ConnectionContext, + DisReq->RequestFlags, + DisReq->RequestConnectionInformation, + DisReq->ReturnConnectionInformation, + DispDataRequestComplete, + Irp ); - done: - if (Status != STATUS_PENDING) - { - DispDataRequestComplete(Irp, Status, 0); - } - else - IoMarkIrpPending(Irp); +done: + if (Status != STATUS_PENDING) { + DispDataRequestComplete(Irp, Status, 0); + } else + IoMarkIrpPending(Irp); - TI_DbgPrint(MAX_TRACE, ("[TCPIP, DispTdiDisconnect] TCP Disconnect returned %08x\n", Status)); + TI_DbgPrint(MAX_TRACE, ("TCP Disconnect returned %08x\n", Status)); - return Status; + return Status; } @@ -611,109 +576,102 @@ NTSTATUS DispTdiListen( * Status of operation */ { - PCONNECTION_ENDPOINT Connection; - PTDI_REQUEST_KERNEL Parameters; - PTRANSPORT_CONTEXT TranContext; - PIO_STACK_LOCATION IrpSp; - NTSTATUS Status = STATUS_SUCCESS; - KIRQL OldIrql; + PCONNECTION_ENDPOINT Connection; + PTDI_REQUEST_KERNEL Parameters; + PTRANSPORT_CONTEXT TranContext; + PIO_STACK_LOCATION IrpSp; + NTSTATUS Status = STATUS_SUCCESS; + KIRQL OldIrql; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiListen] Called\n")); - DbgPrint("[TCPIP, DispTdiListen] Called\n"); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - IrpSp = IoGetCurrentIrpStackLocation(Irp); + IrpSp = IoGetCurrentIrpStackLocation(Irp); - /* Get associated connection endpoint file object. Quit if none exists */ + /* Get associated connection endpoint file object. Quit if none exists */ - TranContext = IrpSp->FileObject->FsContext; - if (TranContext == NULL) + TranContext = IrpSp->FileObject->FsContext; + if (TranContext == NULL) { - TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - Status = STATUS_INVALID_PARAMETER; - goto done; + TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); + Status = STATUS_INVALID_PARAMETER; + goto done; } - Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - if (Connection == NULL) + Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; + if (Connection == NULL) { - TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); - Status = STATUS_INVALID_PARAMETER; - goto done; + TI_DbgPrint(MID_TRACE, ("No connection endpoint file object.\n")); + Status = STATUS_INVALID_PARAMETER; + goto done; } - Parameters = (PTDI_REQUEST_KERNEL)&IrpSp->Parameters; + Parameters = (PTDI_REQUEST_KERNEL)&IrpSp->Parameters; - Status = DispPrepareIrpForCancel - (TranContext->Handle.ConnectionContext, - Irp, - (PDRIVER_CANCEL)DispCancelListenRequest); + Status = DispPrepareIrpForCancel + (TranContext->Handle.ConnectionContext, + Irp, + (PDRIVER_CANCEL)DispCancelListenRequest); - LockObject(Connection, &OldIrql); + LockObject(Connection, &OldIrql); - if (Connection->AddressFile == NULL) - { - TI_DbgPrint(MID_TRACE, ("No associated address file\n")); - UnlockObject(Connection, OldIrql); - Status = STATUS_INVALID_PARAMETER; - goto done; - } + if (Connection->AddressFile == NULL) + { + TI_DbgPrint(MID_TRACE, ("No associated address file\n")); + UnlockObject(Connection, OldIrql); + Status = STATUS_INVALID_PARAMETER; + goto done; + } - LockObjectAtDpcLevel(Connection->AddressFile); + LockObjectAtDpcLevel(Connection->AddressFile); - /* Listening will require us to create a listening socket and store it in - * the address file. It will be signalled, and attempt to complete an irp - * when a new connection arrives. */ - /* The important thing to note here is that the irp we'll complete belongs - * to the socket to be accepted onto, not the listener */ - if ( NT_SUCCESS(Status) && !Connection->AddressFile->Listener ) - { - Connection->AddressFile->Listener = TCPAllocateConnectionEndpoint( NULL ); - DbgPrint("[TCPIP, DispTdiListen] Connection = 0x%x, Connection->AddressFile->Listener = 0x%x\n", - Connection, Connection->AddressFile->Listener); + /* Listening will require us to create a listening socket and store it in + * the address file. It will be signalled, and attempt to complete an irp + * when a new connection arrives. */ + /* The important thing to note here is that the irp we'll complete belongs + * to the socket to be accepted onto, not the listener */ + if( NT_SUCCESS(Status) && !Connection->AddressFile->Listener ) { + Connection->AddressFile->Listener = + TCPAllocateConnectionEndpoint( NULL ); - if ( !Connection->AddressFile->Listener ) - Status = STATUS_NO_MEMORY; + if( !Connection->AddressFile->Listener ) + Status = STATUS_NO_MEMORY; - if ( NT_SUCCESS(Status) ) - { - Connection->AddressFile->Listener->AddressFile = - Connection->AddressFile; + if( NT_SUCCESS(Status) ) { + Connection->AddressFile->Listener->AddressFile = + Connection->AddressFile; - Status = TCPSocket( Connection->AddressFile->Listener, - Connection->AddressFile->Family, - SOCK_STREAM, - Connection->AddressFile->Protocol ); - } + Status = TCPSocket( Connection->AddressFile->Listener, + Connection->AddressFile->Family, + SOCK_STREAM, + Connection->AddressFile->Protocol ); + } - if ( NT_SUCCESS(Status) ) - Status = TCPListen( Connection->AddressFile->Listener, 1024 ); - /* BACKLOG */ - } + if( NT_SUCCESS(Status) ) + Status = TCPListen( Connection->AddressFile->Listener, 1024 ); + /* BACKLOG */ + } - if (NT_SUCCESS(Status)) - { - Status = TCPAccept( (PTDI_REQUEST)Parameters, - Connection->AddressFile->Listener, - Connection, - DispDataRequestComplete, - Irp ); - } + if( NT_SUCCESS(Status) ) { + Status = TCPAccept + ( (PTDI_REQUEST)Parameters, + Connection->AddressFile->Listener, + Connection, + DispDataRequestComplete, + Irp ); + } - UnlockObjectFromDpcLevel(Connection->AddressFile); - UnlockObject(Connection, OldIrql); + UnlockObjectFromDpcLevel(Connection->AddressFile); + UnlockObject(Connection, OldIrql); done: - if (Status != STATUS_PENDING) - { - DispDataRequestComplete(Irp, Status, 0); - } - else - IoMarkIrpPending(Irp); + if (Status != STATUS_PENDING) { + DispDataRequestComplete(Irp, Status, 0); + } else + IoMarkIrpPending(Irp); - TI_DbgPrint(MID_TRACE,("[TCPIP, DispTdiListen] Leaving %x\n", Status)); - DbgPrint("[TCPIP, DispTdiListen] Leaving %x\n", Status); + TI_DbgPrint(MID_TRACE,("Leaving %x\n", Status)); - return Status; + return Status; } @@ -729,130 +687,126 @@ NTSTATUS DispTdiQueryInformation( * Status of operation */ { - PTDI_REQUEST_KERNEL_QUERY_INFORMATION Parameters; - PTRANSPORT_CONTEXT TranContext; - PIO_STACK_LOCATION IrpSp; + PTDI_REQUEST_KERNEL_QUERY_INFORMATION Parameters; + PTRANSPORT_CONTEXT TranContext; + PIO_STACK_LOCATION IrpSp; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiQueryInformation] Called\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); - IrpSp = IoGetCurrentIrpStackLocation(Irp); - Parameters = (PTDI_REQUEST_KERNEL_QUERY_INFORMATION)&IrpSp->Parameters; + IrpSp = IoGetCurrentIrpStackLocation(Irp); + Parameters = (PTDI_REQUEST_KERNEL_QUERY_INFORMATION)&IrpSp->Parameters; - TranContext = IrpSp->FileObject->FsContext; - if (!TranContext) - { - TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); - return STATUS_INVALID_PARAMETER; - } + TranContext = IrpSp->FileObject->FsContext; + if (!TranContext) { + TI_DbgPrint(MID_TRACE, ("Bad transport context.\n")); + return STATUS_INVALID_PARAMETER; + } - switch (Parameters->QueryType) - { - case TDI_QUERY_ADDRESS_INFO: - { - PTDI_ADDRESS_INFO AddressInfo; - PADDRESS_FILE AddrFile; - PTA_IP_ADDRESS Address; - PCONNECTION_ENDPOINT Endpoint = NULL; + switch (Parameters->QueryType) + { + case TDI_QUERY_ADDRESS_INFO: + { + PTDI_ADDRESS_INFO AddressInfo; + PADDRESS_FILE AddrFile; + PTA_IP_ADDRESS Address; + PCONNECTION_ENDPOINT Endpoint = NULL; - if (MmGetMdlByteCount(Irp->MdlAddress) < - (FIELD_OFFSET(TDI_ADDRESS_INFO, Address.Address[0].Address) + - sizeof(TDI_ADDRESS_IP))) - { - TI_DbgPrint(MID_TRACE, ("MDL buffer too small.\n")); - return STATUS_BUFFER_TOO_SMALL; - } - AddressInfo = (PTDI_ADDRESS_INFO)MmGetSystemAddressForMdl(Irp->MdlAddress); - Address = (PTA_IP_ADDRESS)&AddressInfo->Address; - - switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) - { - case TDI_TRANSPORT_ADDRESS_FILE: - AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle; - - Address->TAAddressCount = 1; - Address->Address[0].AddressLength = TDI_ADDRESS_LENGTH_IP; - Address->Address[0].AddressType = TDI_ADDRESS_TYPE_IP; - Address->Address[0].Address[0].sin_port = AddrFile->Port; - Address->Address[0].Address[0].in_addr = AddrFile->Address.Address.IPv4Address; - RtlZeroMemory( - &Address->Address[0].Address[0].sin_zero, - sizeof(Address->Address[0].Address[0].sin_zero)); - return STATUS_SUCCESS; - - case TDI_CONNECTION_FILE: - Endpoint = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - - Address->TAAddressCount = 1; - Address->Address[0].AddressLength = TDI_ADDRESS_LENGTH_IP; - Address->Address[0].AddressType = TDI_ADDRESS_TYPE_IP; - Address->Address[0].Address[0].sin_port = Endpoint->AddressFile->Port; - Address->Address[0].Address[0].in_addr = Endpoint->AddressFile->Address.Address.IPv4Address; - - RtlZeroMemory( - &Address->Address[0].Address[0].sin_zero, - sizeof(Address->Address[0].Address[0].sin_zero)); - - return STATUS_SUCCESS; - - default: - TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); - return STATUS_INVALID_PARAMETER; - } + if (MmGetMdlByteCount(Irp->MdlAddress) < + (FIELD_OFFSET(TDI_ADDRESS_INFO, Address.Address[0].Address) + + sizeof(TDI_ADDRESS_IP))) { + TI_DbgPrint(MID_TRACE, ("MDL buffer too small.\n")); + return STATUS_BUFFER_TOO_SMALL; } - case TDI_QUERY_CONNECTION_INFO: - { - PTDI_CONNECTION_INFORMATION AddressInfo; - PADDRESS_FILE AddrFile; - PCONNECTION_ENDPOINT Endpoint = NULL; + AddressInfo = (PTDI_ADDRESS_INFO)MmGetSystemAddressForMdl(Irp->MdlAddress); + Address = (PTA_IP_ADDRESS)&AddressInfo->Address; - if (MmGetMdlByteCount(Irp->MdlAddress) < - (FIELD_OFFSET(TDI_CONNECTION_INFORMATION, RemoteAddress) + - sizeof(PVOID))) { - TI_DbgPrint(MID_TRACE, ("MDL buffer too small (ptr).\n")); - return STATUS_BUFFER_TOO_SMALL; - } + switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) { + case TDI_TRANSPORT_ADDRESS_FILE: + AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle; - AddressInfo = (PTDI_CONNECTION_INFORMATION) - MmGetSystemAddressForMdl(Irp->MdlAddress); - - switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) - { - case TDI_TRANSPORT_ADDRESS_FILE: - AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle; - Endpoint = AddrFile ? AddrFile->Connection : NULL; - break; - - case TDI_CONNECTION_FILE: - Endpoint = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; - break; - - default: - TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); - return STATUS_INVALID_PARAMETER; - } - - if (!Endpoint) - { - TI_DbgPrint(MID_TRACE, ("No connection object.\n")); - return STATUS_INVALID_PARAMETER; - } - - return TCPGetSockAddress( Endpoint, AddressInfo->RemoteAddress, TRUE ); - } - - case TDI_QUERY_MAX_DATAGRAM_INFO: - { - PTDI_MAX_DATAGRAM_INFO MaxDatagramInfo = MmGetSystemAddressForMdl(Irp->MdlAddress); - - MaxDatagramInfo->MaxDatagramSize = 0xFFFF; + Address->TAAddressCount = 1; + Address->Address[0].AddressLength = TDI_ADDRESS_LENGTH_IP; + Address->Address[0].AddressType = TDI_ADDRESS_TYPE_IP; + Address->Address[0].Address[0].sin_port = AddrFile->Port; + Address->Address[0].Address[0].in_addr = AddrFile->Address.Address.IPv4Address; + RtlZeroMemory( + &Address->Address[0].Address[0].sin_zero, + sizeof(Address->Address[0].Address[0].sin_zero)); + return STATUS_SUCCESS; + case TDI_CONNECTION_FILE: + Endpoint = + (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; + + Address->TAAddressCount = 1; + Address->Address[0].AddressLength = TDI_ADDRESS_LENGTH_IP; + Address->Address[0].AddressType = TDI_ADDRESS_TYPE_IP; + Address->Address[0].Address[0].sin_port = Endpoint->AddressFile->Port; + Address->Address[0].Address[0].in_addr = Endpoint->AddressFile->Address.Address.IPv4Address; + RtlZeroMemory( + &Address->Address[0].Address[0].sin_zero, + sizeof(Address->Address[0].Address[0].sin_zero)); return STATUS_SUCCESS; - } - } - return STATUS_NOT_IMPLEMENTED; + default: + TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); + return STATUS_INVALID_PARAMETER; + } + } + + case TDI_QUERY_CONNECTION_INFO: + { + PTDI_CONNECTION_INFORMATION AddressInfo; + PADDRESS_FILE AddrFile; + PCONNECTION_ENDPOINT Endpoint = NULL; + + if (MmGetMdlByteCount(Irp->MdlAddress) < + (FIELD_OFFSET(TDI_CONNECTION_INFORMATION, RemoteAddress) + + sizeof(PVOID))) { + TI_DbgPrint(MID_TRACE, ("MDL buffer too small (ptr).\n")); + return STATUS_BUFFER_TOO_SMALL; + } + + AddressInfo = (PTDI_CONNECTION_INFORMATION) + MmGetSystemAddressForMdl(Irp->MdlAddress); + + switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) { + case TDI_TRANSPORT_ADDRESS_FILE: + AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle; + Endpoint = AddrFile ? AddrFile->Connection : NULL; + break; + + case TDI_CONNECTION_FILE: + Endpoint = + (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext; + break; + + default: + TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); + return STATUS_INVALID_PARAMETER; + } + + if (!Endpoint) { + TI_DbgPrint(MID_TRACE, ("No connection object.\n")); + return STATUS_INVALID_PARAMETER; + } + + return TCPGetSockAddress( Endpoint, AddressInfo->RemoteAddress, TRUE ); + } + + case TDI_QUERY_MAX_DATAGRAM_INFO: + { + PTDI_MAX_DATAGRAM_INFO MaxDatagramInfo = MmGetSystemAddressForMdl(Irp->MdlAddress); + + MaxDatagramInfo->MaxDatagramSize = 0xFFFF; + + return STATUS_SUCCESS; + } + } + + return STATUS_NOT_IMPLEMENTED; } @@ -872,7 +826,7 @@ NTSTATUS DispTdiReceive( NTSTATUS Status; ULONG BytesReceived = 0; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiReceive] Called.\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); IrpSp = IoGetCurrentIrpStackLocation(Irp); ReceiveInfo = (PTDI_REQUEST_KERNEL_RECEIVE)&(IrpSp->Parameters); @@ -917,7 +871,7 @@ done: } else IoMarkIrpPending(Irp); - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiReceive] Leaving. Status is (0x%X)\n", Status)); + TI_DbgPrint(DEBUG_IRP, ("Leaving. Status is (0x%X)\n", Status)); return Status; } @@ -940,7 +894,7 @@ NTSTATUS DispTdiReceiveDatagram( NTSTATUS Status; ULONG BytesReceived = 0; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiReceiveDatagram] Called\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); IrpSp = IoGetCurrentIrpStackLocation(Irp); DgramInfo = (PTDI_REQUEST_KERNEL_RECEIVEDG)&(IrpSp->Parameters); @@ -991,7 +945,7 @@ done: } else IoMarkIrpPending(Irp); - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiReceiveDatagram] Leaving. Status is (0x%X)\n", Status)); + TI_DbgPrint(DEBUG_IRP, ("Leaving. Status is (0x%X)\n", Status)); return Status; } @@ -1013,7 +967,7 @@ NTSTATUS DispTdiSend( NTSTATUS Status; ULONG BytesSent = 0; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSend] Called.\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); IrpSp = IoGetCurrentIrpStackLocation(Irp); SendInfo = (PTDI_REQUEST_KERNEL_SEND)&(IrpSp->Parameters); @@ -1063,7 +1017,7 @@ done: } else IoMarkIrpPending(Irp); - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSend] Leaving. Status is (0x%X)\n", Status)); + TI_DbgPrint(DEBUG_IRP, ("Leaving. Status is (0x%X)\n", Status)); return Status; } @@ -1085,7 +1039,7 @@ NTSTATUS DispTdiSendDatagram( PTRANSPORT_CONTEXT TranContext; NTSTATUS Status; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSendDatagram] Called.\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); IrpSp = IoGetCurrentIrpStackLocation(Irp); DgramInfo = (PTDI_REQUEST_KERNEL_SENDDG)&(IrpSp->Parameters); @@ -1147,7 +1101,7 @@ done: } else IoMarkIrpPending(Irp); - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSendDatagram] Leaving.\n")); + TI_DbgPrint(DEBUG_IRP, ("Leaving.\n")); return Status; } @@ -1169,7 +1123,7 @@ NTSTATUS DispTdiSetEventHandler(PIRP Irp) NTSTATUS Status; KIRQL OldIrql; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSetEventHandler] Called\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); IrpSp = IoGetCurrentIrpStackLocation(Irp); @@ -1312,7 +1266,6 @@ NTSTATUS DispTdiSetEventHandler(PIRP Irp) } UnlockObject(AddrFile, OldIrql); - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSetEventHandler] Leaving. Status = 0x%x\n", Status)); return Status; } @@ -1328,7 +1281,7 @@ NTSTATUS DispTdiSetInformation( * Status of operation */ { - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSetInformation] Called\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); return STATUS_NOT_IMPLEMENTED; } @@ -1397,27 +1350,26 @@ NTSTATUS DispTdiQueryInformationEx( PMDL OutputMdl = NULL; NTSTATUS Status = STATUS_SUCCESS; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiQueryInformationEx] Called.\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext; - switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) - { - case TDI_TRANSPORT_ADDRESS_FILE: - Request.Handle.AddressHandle = TranContext->Handle.AddressHandle; - break; + switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) { + case TDI_TRANSPORT_ADDRESS_FILE: + Request.Handle.AddressHandle = TranContext->Handle.AddressHandle; + break; - case TDI_CONNECTION_FILE: - Request.Handle.ConnectionContext = TranContext->Handle.ConnectionContext; - break; + case TDI_CONNECTION_FILE: + Request.Handle.ConnectionContext = TranContext->Handle.ConnectionContext; + break; - case TDI_CONTROL_CHANNEL_FILE: - Request.Handle.ControlChannel = TranContext->Handle.ControlChannel; - break; + case TDI_CONTROL_CHANNEL_FILE: + Request.Handle.ControlChannel = TranContext->Handle.ControlChannel; + break; - default: - TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); - return STATUS_INVALID_PARAMETER; + default: + TI_DbgPrint(MIN_TRACE, ("Invalid transport context\n")); + return STATUS_INVALID_PARAMETER; } InputBufferLength = IrpSp->Parameters.DeviceIoControl.InputBufferLength; @@ -1425,18 +1377,15 @@ NTSTATUS DispTdiQueryInformationEx( /* Validate parameters */ if ((InputBufferLength == sizeof(TCP_REQUEST_QUERY_INFORMATION_EX)) && - (OutputBufferLength != 0)) - { + (OutputBufferLength != 0)) { InputBuffer = (PTCP_REQUEST_QUERY_INFORMATION_EX) IrpSp->Parameters.DeviceIoControl.Type3InputBuffer; OutputBuffer = Irp->UserBuffer; QueryContext = ExAllocatePoolWithTag(NonPagedPool, sizeof(TI_QUERY_CONTEXT), QUERY_CONTEXT_TAG); - if (QueryContext) - { - _SEH2_TRY - { + if (QueryContext) { + _SEH2_TRY { InputMdl = IoAllocateMdl(InputBuffer, sizeof(TCP_REQUEST_QUERY_INFORMATION_EX), FALSE, TRUE, NULL); @@ -1444,8 +1393,7 @@ NTSTATUS DispTdiQueryInformationEx( OutputMdl = IoAllocateMdl(OutputBuffer, OutputBufferLength, FALSE, TRUE, NULL); - if (InputMdl && OutputMdl) - { + if (InputMdl && OutputMdl) { MmProbeAndLockPages(InputMdl, Irp->RequestorMode, IoModifyAccess); @@ -1459,18 +1407,13 @@ NTSTATUS DispTdiQueryInformationEx( RtlCopyMemory(&QueryContext->QueryInfo, InputBuffer, sizeof(TCP_REQUEST_QUERY_INFORMATION_EX)); - } - else + } else Status = STATUS_INSUFFICIENT_RESOURCES; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; + } _SEH2_END; - if (NT_SUCCESS(Status)) - { + if (NT_SUCCESS(Status)) { Size = MmGetMdlByteCount(OutputMdl); QueryContext->Irp = Irp; @@ -1484,7 +1427,7 @@ NTSTATUS DispTdiQueryInformationEx( &Size, &QueryContext->QueryInfo.Context); DispTdiQueryInformationExComplete(QueryContext, Status, Size); - TI_DbgPrint(MAX_TRACE, ("[TCPIP, DispTdiQueryInformationEx] Leaving. Status = (0x%X)\n", Status)); + TI_DbgPrint(MAX_TRACE, ("Leaving. Status = (0x%X)\n", Status)); return Status; } @@ -1504,74 +1447,61 @@ NTSTATUS DispTdiQueryInformationEx( } ExFreePoolWithTag(QueryContext, QUERY_CONTEXT_TAG); - } - else + } else Status = STATUS_INSUFFICIENT_RESOURCES; - } - else if( InputBufferLength == sizeof(TCP_REQUEST_QUERY_INFORMATION_EX) ) - { - /* Handle the case where the user is probing the buffer for length */ - TI_DbgPrint(MAX_TRACE, ("InputBufferLength %d OutputBufferLength %d\n", - InputBufferLength, OutputBufferLength)); + } else if( InputBufferLength == + sizeof(TCP_REQUEST_QUERY_INFORMATION_EX) ) { + /* Handle the case where the user is probing the buffer for length */ + TI_DbgPrint(MAX_TRACE, ("InputBufferLength %d OutputBufferLength %d\n", + InputBufferLength, OutputBufferLength)); InputBuffer = (PTCP_REQUEST_QUERY_INFORMATION_EX) IrpSp->Parameters.DeviceIoControl.Type3InputBuffer; - Size = 0; + Size = 0; - QueryContext = ExAllocatePoolWithTag(NonPagedPool, - sizeof(TI_QUERY_CONTEXT), QUERY_CONTEXT_TAG); - - if (!QueryContext) - return STATUS_INSUFFICIENT_RESOURCES; + QueryContext = ExAllocatePoolWithTag(NonPagedPool, sizeof(TI_QUERY_CONTEXT), QUERY_CONTEXT_TAG); + if (!QueryContext) return STATUS_INSUFFICIENT_RESOURCES; - _SEH2_TRY - { - InputMdl = IoAllocateMdl(InputBuffer, - sizeof(TCP_REQUEST_QUERY_INFORMATION_EX), - FALSE, TRUE, NULL); + _SEH2_TRY { + InputMdl = IoAllocateMdl(InputBuffer, + sizeof(TCP_REQUEST_QUERY_INFORMATION_EX), + FALSE, TRUE, NULL); - MmProbeAndLockPages(InputMdl, Irp->RequestorMode, - IoModifyAccess); + MmProbeAndLockPages(InputMdl, Irp->RequestorMode, + IoModifyAccess); - InputMdlLocked = TRUE; - Status = STATUS_SUCCESS; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - TI_DbgPrint(MAX_TRACE, ("Failed to acquire client buffer\n")); - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; + InputMdlLocked = TRUE; + Status = STATUS_SUCCESS; + } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + TI_DbgPrint(MAX_TRACE, ("Failed to acquire client buffer\n")); + Status = _SEH2_GetExceptionCode(); + } _SEH2_END; - if( !NT_SUCCESS(Status) || !InputMdl ) - { - if( InputMdl ) - IoFreeMdl( InputMdl ); - ExFreePoolWithTag(QueryContext, QUERY_CONTEXT_TAG); - TI_DbgPrint(MAX_TRACE, ("[TCPIP, DispTdiQueryInformationEx] Leaving. Status = (0x%X)\n", Status)); - return Status; - } + if( !NT_SUCCESS(Status) || !InputMdl ) { + if( InputMdl ) IoFreeMdl( InputMdl ); + ExFreePoolWithTag(QueryContext, QUERY_CONTEXT_TAG); + return Status; + } - RtlCopyMemory(&QueryContext->QueryInfo, - InputBuffer, sizeof(TCP_REQUEST_QUERY_INFORMATION_EX)); + RtlCopyMemory(&QueryContext->QueryInfo, + InputBuffer, sizeof(TCP_REQUEST_QUERY_INFORMATION_EX)); - QueryContext->Irp = Irp; - QueryContext->InputMdl = InputMdl; - QueryContext->OutputMdl = NULL; + QueryContext->Irp = Irp; + QueryContext->InputMdl = InputMdl; + QueryContext->OutputMdl = NULL; - Request.RequestNotifyObject = DispTdiQueryInformationExComplete; - Request.RequestContext = QueryContext; - Status = InfoTdiQueryInformationEx(&Request, - &QueryContext->QueryInfo.ID, - NULL, - &Size, - &QueryContext->QueryInfo.Context); - DispTdiQueryInformationExComplete(QueryContext, Status, Size); - } - else - Status = STATUS_INVALID_PARAMETER; + Request.RequestNotifyObject = DispTdiQueryInformationExComplete; + Request.RequestContext = QueryContext; + Status = InfoTdiQueryInformationEx(&Request, + &QueryContext->QueryInfo.ID, + NULL, + &Size, + &QueryContext->QueryInfo.Context); + DispTdiQueryInformationExComplete(QueryContext, Status, Size); + TI_DbgPrint(MAX_TRACE, ("Leaving. Status = (0x%X)\n", Status)); + } else Status = STATUS_INVALID_PARAMETER; - TI_DbgPrint(MIN_TRACE, ("[TCPIP, DispTdiQueryInformationEx] Leaving. Status = (0x%X)\n", Status)); + TI_DbgPrint(MIN_TRACE, ("Leaving. Status = (0x%X)\n", Status)); return Status; } @@ -1594,39 +1524,35 @@ NTSTATUS DispTdiSetInformationEx( TDI_REQUEST Request; TDI_STATUS Status; - TI_DbgPrint(DEBUG_IRP, ("[TCPIP, DispTdiSetInformationEx] Called.\n")); + TI_DbgPrint(DEBUG_IRP, ("Called.\n")); TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext; Info = (PTCP_REQUEST_SET_INFORMATION_EX)Irp->AssociatedIrp.SystemBuffer; - switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) - { - case TDI_TRANSPORT_ADDRESS_FILE: - Request.Handle.AddressHandle = TranContext->Handle.AddressHandle; - break; + switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) { + case TDI_TRANSPORT_ADDRESS_FILE: + Request.Handle.AddressHandle = TranContext->Handle.AddressHandle; + break; - case TDI_CONNECTION_FILE: - Request.Handle.ConnectionContext = TranContext->Handle.ConnectionContext; - break; + case TDI_CONNECTION_FILE: + Request.Handle.ConnectionContext = TranContext->Handle.ConnectionContext; + break; - case TDI_CONTROL_CHANNEL_FILE: - Request.Handle.ControlChannel = TranContext->Handle.ControlChannel; - break; + case TDI_CONTROL_CHANNEL_FILE: + Request.Handle.ControlChannel = TranContext->Handle.ControlChannel; + break; - default: - Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; - Irp->IoStatus.Information = 0; + default: + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + Irp->IoStatus.Information = 0; - TI_DbgPrint(DEBUG_IRP, - ("[TCPIP, DispTdiSetInformationEx] Leaving. Completing IRP at (0x%X).\n", - Irp)); + TI_DbgPrint(DEBUG_IRP, ("Completing IRP at (0x%X).\n", Irp)); - return Irp->IoStatus.Status; + return Irp->IoStatus.Status; } Status = DispPrepareIrpForCancel(TranContext, Irp, NULL); - if (NT_SUCCESS(Status)) - { + if (NT_SUCCESS(Status)) { Request.RequestNotifyObject = DispDataRequestComplete; Request.RequestContext = Irp; @@ -1634,10 +1560,6 @@ NTSTATUS DispTdiSetInformationEx( &Info->Buffer, Info->BufferSize); } - TI_DbgPrint(DEBUG_IRP, - ("[TCPIP, DispTdiSetInformationEx] Leaving. Completeing IRP at (0x%X).\n", - Irp)); - return Status; } @@ -1647,8 +1569,7 @@ NTSTATUS DispTdiSetInformationEx( * Later on, create an NTE context and NTE instance */ -NTSTATUS DispTdiSetIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) -{ +NTSTATUS DispTdiSetIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_DEVICE_DOES_NOT_EXIST; PIP_SET_ADDRESS IpAddrChange = (PIP_SET_ADDRESS)Irp->AssociatedIrp.SystemBuffer; @@ -1657,17 +1578,14 @@ NTSTATUS DispTdiSetIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) TI_DbgPrint(MID_TRACE,("Setting IP Address for adapter %d\n", IpAddrChange->NteIndex)); - ForEachInterface(IF) - { - TI_DbgPrint(MID_TRACE,("Looking at adapter %d\n", IF->Index)); + ForEachInterface(IF) { + TI_DbgPrint(MID_TRACE,("Looking at adapter %d\n", IF->Index)); - if( IF->Unicast.Address.IPv4Address == IpAddrChange->Address ) - { + if( IF->Unicast.Address.IPv4Address == IpAddrChange->Address ) { Status = STATUS_DUPLICATE_OBJECTID; break; } - if( IF->Index == IpAddrChange->NteIndex ) - { + if( IF->Index == IpAddrChange->NteIndex ) { IPRemoveInterfaceRoute( IF ); IF->Unicast.Type = IP_ADDRESS_V4; @@ -1675,8 +1593,9 @@ NTSTATUS DispTdiSetIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) IF->Netmask.Type = IP_ADDRESS_V4; IF->Netmask.Address.IPv4Address = IpAddrChange->Netmask; IF->Broadcast.Type = IP_ADDRESS_V4; - IF->Broadcast.Address.IPv4Address = - IF->Unicast.Address.IPv4Address | ~IF->Netmask.Address.IPv4Address; + IF->Broadcast.Address.IPv4Address = + IF->Unicast.Address.IPv4Address | + ~IF->Netmask.Address.IPv4Address; TI_DbgPrint(MID_TRACE,("New Unicast Address: %x\n", IF->Unicast.Address.IPv4Address)); @@ -1690,23 +1609,19 @@ NTSTATUS DispTdiSetIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) Irp->IoStatus.Information = IF->Index; break; } - } - EndFor(IF); + } EndFor(IF); Irp->IoStatus.Status = Status; return Status; } -NTSTATUS DispTdiDeleteIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) -{ +NTSTATUS DispTdiDeleteIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { NTSTATUS Status = STATUS_UNSUCCESSFUL; PUSHORT NteIndex = Irp->AssociatedIrp.SystemBuffer; IF_LIST_ITER(IF); - ForEachInterface(IF) - { - if( IF->Index == *NteIndex ) - { + ForEachInterface(IF) { + if( IF->Index == *NteIndex ) { IPRemoveInterfaceRoute( IF ); IF->Unicast.Type = IP_ADDRESS_V4; IF->Unicast.Address.IPv4Address = 0; @@ -1716,8 +1631,7 @@ NTSTATUS DispTdiDeleteIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) IF->Broadcast.Address.IPv4Address = 0; Status = STATUS_SUCCESS; } - } - EndFor(IF); + } EndFor(IF); Irp->IoStatus.Status = Status; return Status; diff --git a/drivers/network/tcpip/tcpip/fileobjs.c b/drivers/network/tcpip/tcpip/fileobjs.c index 704cfe78ffb..f7ead95d6cc 100644 --- a/drivers/network/tcpip/tcpip/fileobjs.c +++ b/drivers/network/tcpip/tcpip/fileobjs.c @@ -112,8 +112,7 @@ PADDRESS_FILE AddrSearchNext( TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql); - while (CurrentEntry != &AddressFileListHead) - { + while (CurrentEntry != &AddressFileListHead) { Current = CONTAINING_RECORD(CurrentEntry, ADDRESS_FILE, ListEntry); IPAddress = &Current->Address; @@ -154,66 +153,61 @@ VOID AddrFileFree( * Object = Pointer to address file object to free */ { - PADDRESS_FILE AddrFile = Object; - KIRQL OldIrql; - PDATAGRAM_RECEIVE_REQUEST ReceiveRequest; - PDATAGRAM_SEND_REQUEST SendRequest; - PLIST_ENTRY CurrentEntry; + PADDRESS_FILE AddrFile = Object; + KIRQL OldIrql; + PDATAGRAM_RECEIVE_REQUEST ReceiveRequest; + PDATAGRAM_SEND_REQUEST SendRequest; + PLIST_ENTRY CurrentEntry; - TI_DbgPrint(MID_TRACE, ("Called.\n")); - DbgPrint("[TCPIP, AddrFileFree] Called\n"); + TI_DbgPrint(MID_TRACE, ("Called.\n")); - /* We should not be associated with a connection here */ - ASSERT(!AddrFile->Connection); + /* We should not be associated with a connection here */ + ASSERT(!AddrFile->Connection); - /* Remove address file from the global list */ - TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql); - RemoveEntryList(&AddrFile->ListEntry); - TcpipReleaseSpinLock(&AddressFileListLock, OldIrql); + /* Remove address file from the global list */ + TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql); + RemoveEntryList(&AddrFile->ListEntry); + TcpipReleaseSpinLock(&AddressFileListLock, OldIrql); - /* FIXME: Kill TCP connections on this address file object */ + /* FIXME: Kill TCP connections on this address file object */ - /* Return pending requests with error */ + /* Return pending requests with error */ - TI_DbgPrint(DEBUG_ADDRFILE, ("Aborting receive requests on AddrFile at (0x%X).\n", AddrFile)); + TI_DbgPrint(DEBUG_ADDRFILE, ("Aborting receive requests on AddrFile at (0x%X).\n", AddrFile)); - /* Go through pending receive request list and cancel them all */ - while ((CurrentEntry = ExInterlockedRemoveHeadList(&AddrFile->ReceiveQueue, &AddrFile->Lock))) + /* Go through pending receive request list and cancel them all */ + while ((CurrentEntry = ExInterlockedRemoveHeadList(&AddrFile->ReceiveQueue, &AddrFile->Lock))) { + ReceiveRequest = CONTAINING_RECORD(CurrentEntry, DATAGRAM_RECEIVE_REQUEST, ListEntry); + (*ReceiveRequest->Complete)(ReceiveRequest->Context, STATUS_CANCELLED, 0); + /* ExFreePoolWithTag(ReceiveRequest, DATAGRAM_RECV_TAG); FIXME: WTF? */ + } + + TI_DbgPrint(DEBUG_ADDRFILE, ("Aborting send requests on address file at (0x%X).\n", AddrFile)); + + /* Go through pending send request list and cancel them all */ + while ((CurrentEntry = ExInterlockedRemoveHeadList(&AddrFile->ReceiveQueue, &AddrFile->Lock))) { + SendRequest = CONTAINING_RECORD(CurrentEntry, DATAGRAM_SEND_REQUEST, ListEntry); + (*SendRequest->Complete)(SendRequest->Context, STATUS_CANCELLED, 0); + ExFreePoolWithTag(SendRequest, DATAGRAM_SEND_TAG); + } + + /* Protocol specific handling */ + switch (AddrFile->Protocol) { + case IPPROTO_TCP: + if (AddrFile->Port) { - ReceiveRequest = CONTAINING_RECORD(CurrentEntry, DATAGRAM_RECEIVE_REQUEST, ListEntry); - (*ReceiveRequest->Complete)(ReceiveRequest->Context, STATUS_CANCELLED, 0); - /* ExFreePoolWithTag(ReceiveRequest, DATAGRAM_RECV_TAG); FIXME: WTF? */ + TCPFreePort(AddrFile->Port); } + break; - TI_DbgPrint(DEBUG_ADDRFILE, ("Aborting send requests on address file at (0x%X).\n", AddrFile)); + case IPPROTO_UDP: + UDPFreePort( AddrFile->Port ); + break; + } - /* Go through pending send request list and cancel them all */ - while ((CurrentEntry = ExInterlockedRemoveHeadList(&AddrFile->TransmitQueue, &AddrFile->Lock))) - { - SendRequest = CONTAINING_RECORD(CurrentEntry, DATAGRAM_SEND_REQUEST, ListEntry); - (*SendRequest->Complete)(SendRequest->Context, STATUS_CANCELLED, 0); - ExFreePoolWithTag(SendRequest, DATAGRAM_SEND_TAG); - } + RemoveEntityByContext(AddrFile); - /* Protocol specific handling */ - switch (AddrFile->Protocol) - { - case IPPROTO_TCP: - if (AddrFile->Port) - { - TCPFreePort(AddrFile->Port); - } - break; - - case IPPROTO_UDP: - UDPFreePort( AddrFile->Port ); - break; - } - - RemoveEntityByContext(AddrFile); - - ExFreePoolWithTag(Object, ADDR_FILE_TAG); - DbgPrint("[TCPIP, AddrFileFree] Leaving\n"); + ExFreePoolWithTag(Object, ADDR_FILE_TAG); } @@ -245,160 +239,153 @@ NTSTATUS FileOpenAddress( USHORT Protocol, PVOID Options) { - PADDRESS_FILE AddrFile; + PADDRESS_FILE AddrFile; - TI_DbgPrint(MID_TRACE, ("Called (Proto %d).\n", Protocol)); - DbgPrint("[TCPIP, FileOpenAddress] Called. Proto %d\n", Protocol); + TI_DbgPrint(MID_TRACE, ("Called (Proto %d).\n", Protocol)); - AddrFile = ExAllocatePoolWithTag(NonPagedPool, sizeof(ADDRESS_FILE), - ADDR_FILE_TAG); - if (!AddrFile) - { - TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); - return STATUS_INSUFFICIENT_RESOURCES; - } + AddrFile = ExAllocatePoolWithTag(NonPagedPool, sizeof(ADDRESS_FILE), + ADDR_FILE_TAG); + if (!AddrFile) { + TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); + return STATUS_INSUFFICIENT_RESOURCES; + } - RtlZeroMemory(AddrFile, sizeof(ADDRESS_FILE)); - DbgPrint("[TCPIP, FileOpenAddress] Allocated AddressFile = 0x%x, sizeof(ADDRESS_FILE) = %d\n", - AddrFile, sizeof(ADDRESS_FILE)); + RtlZeroMemory(AddrFile, sizeof(ADDRESS_FILE)); - AddrFile->RefCount = 1; - AddrFile->Free = AddrFileFree; + AddrFile->RefCount = 1; + AddrFile->Free = AddrFileFree; - /* Set our default options */ - AddrFile->TTL = 128; - AddrFile->DF = 0; - AddrFile->BCast = 1; - AddrFile->HeaderIncl = 1; + /* Set our default options */ + AddrFile->TTL = 128; + AddrFile->DF = 0; + AddrFile->BCast = 1; + AddrFile->HeaderIncl = 1; - /* Make sure address is a local unicast address or 0 */ - /* FIXME: IPv4 only */ - AddrFile->Family = Address->Address[0].AddressType; - AddrFile->Address.Address.IPv4Address = Address->Address[0].Address[0].in_addr; - AddrFile->Address.Type = IP_ADDRESS_V4; + /* Make sure address is a local unicast address or 0 */ + /* FIXME: IPv4 only */ + AddrFile->Family = Address->Address[0].AddressType; + AddrFile->Address.Address.IPv4Address = Address->Address[0].Address[0].in_addr; + AddrFile->Address.Type = IP_ADDRESS_V4; - if (!AddrIsUnspecified(&AddrFile->Address) && - !AddrLocateInterface(&AddrFile->Address)) - { - ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); - TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n", A2S(&AddrFile->Address))); - return STATUS_INVALID_ADDRESS; - } + if (!AddrIsUnspecified(&AddrFile->Address) && + !AddrLocateInterface(&AddrFile->Address)) { + ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); + TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n", A2S(&AddrFile->Address))); + return STATUS_INVALID_ADDRESS; + } - TI_DbgPrint(MID_TRACE, ("Opening address %s for communication (P=%d U=%d).\n", + TI_DbgPrint(MID_TRACE, ("Opening address %s for communication (P=%d U=%d).\n", A2S(&AddrFile->Address), Protocol, IPPROTO_UDP)); - /* Protocol specific handling */ - switch (Protocol) - { - case IPPROTO_TCP: - if (Address->Address[0].Address[0].sin_port) - { - /* The client specified an explicit port so we force a bind to this */ - AddrFile->Port = TCPAllocatePort(Address->Address[0].Address[0].sin_port); + /* Protocol specific handling */ + switch (Protocol) { + case IPPROTO_TCP: + if (Address->Address[0].Address[0].sin_port) + { + /* The client specified an explicit port so we force a bind to this */ + AddrFile->Port = TCPAllocatePort(Address->Address[0].Address[0].sin_port); - /* Check for bind success */ - if (AddrFile->Port == 0xffff) - { - ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); - return STATUS_ADDRESS_ALREADY_EXISTS; - } + /* Check for bind success */ + if (AddrFile->Port == 0xffff) + { + ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); + return STATUS_ADDRESS_ALREADY_EXISTS; + } - /* Sanity check */ - ASSERT(Address->Address[0].Address[0].sin_port == AddrFile->Port); - } - else if (!AddrIsUnspecified(&AddrFile->Address)) - { - / The client is trying to bind to a local address so allocate a port now too - AddrFile->Port = TCPAllocatePort(0); + /* Sanity check */ + ASSERT(Address->Address[0].Address[0].sin_port == AddrFile->Port); + } + else if (!AddrIsUnspecified(&AddrFile->Address)) + { + /* The client is trying to bind to a local address so allocate a port now too */ + AddrFile->Port = TCPAllocatePort(0); - // Check for bind success - if (AddrFile->Port == 0xffff) - { - ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); - return STATUS_ADDRESS_ALREADY_EXISTS; - } - } - else - { - /* The client wants an unspecified port with an unspecified address so we wait to see what the TCP library gives us */ - AddrFile->Port = 0; - } + /* Check for bind success */ + if (AddrFile->Port == 0xffff) + { + ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); + return STATUS_ADDRESS_ALREADY_EXISTS; + } + } + else + { + /* The client wants an unspecified port with an unspecified address so we wait to see what the TCP library gives us */ + AddrFile->Port = 0; + } - AddEntity(CO_TL_ENTITY, AddrFile, CO_TL_TCP); + AddEntity(CO_TL_ENTITY, AddrFile, CO_TL_TCP); - AddrFile->Send = NULL; /* TCPSendData */ - break; + AddrFile->Send = NULL; /* TCPSendData */ + break; - case IPPROTO_UDP: - TI_DbgPrint(MID_TRACE,("Allocating udp port\n")); - AddrFile->Port = - UDPAllocatePort(Address->Address[0].Address[0].sin_port); + case IPPROTO_UDP: + TI_DbgPrint(MID_TRACE,("Allocating udp port\n")); + AddrFile->Port = + UDPAllocatePort(Address->Address[0].Address[0].sin_port); - if ((Address->Address[0].Address[0].sin_port && - AddrFile->Port != Address->Address[0].Address[0].sin_port) || - AddrFile->Port == 0xffff) - { - ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); - return STATUS_ADDRESS_ALREADY_EXISTS; - } + if ((Address->Address[0].Address[0].sin_port && + AddrFile->Port != Address->Address[0].Address[0].sin_port) || + AddrFile->Port == 0xffff) + { + ExFreePoolWithTag(AddrFile, ADDR_FILE_TAG); + return STATUS_ADDRESS_ALREADY_EXISTS; + } - TI_DbgPrint(MID_TRACE,("Setting port %d (wanted %d)\n", - AddrFile->Port, - Address->Address[0].Address[0].sin_port)); + TI_DbgPrint(MID_TRACE,("Setting port %d (wanted %d)\n", + AddrFile->Port, + Address->Address[0].Address[0].sin_port)); - AddEntity(CL_TL_ENTITY, AddrFile, CL_TL_UDP); + AddEntity(CL_TL_ENTITY, AddrFile, CL_TL_UDP); - AddrFile->Send = UDPSendDatagram; - break; + AddrFile->Send = UDPSendDatagram; + break; - case IPPROTO_ICMP: - AddrFile->Port = 0; - AddrFile->Send = ICMPSendDatagram; + case IPPROTO_ICMP: + AddrFile->Port = 0; + AddrFile->Send = ICMPSendDatagram; - /* FIXME: Verify this */ - AddEntity(ER_ENTITY, AddrFile, ER_ICMP); - break; + /* FIXME: Verify this */ + AddEntity(ER_ENTITY, AddrFile, ER_ICMP); + break; - default: - /* Use raw IP for all other protocols */ - AddrFile->Port = 0; - AddrFile->Send = RawIPSendDatagram; + default: + /* Use raw IP for all other protocols */ + AddrFile->Port = 0; + AddrFile->Send = RawIPSendDatagram; - /* FIXME: Verify this */ - AddEntity(CL_TL_ENTITY, AddrFile, 0); - break; - } + /* FIXME: Verify this */ + AddEntity(CL_TL_ENTITY, AddrFile, 0); + break; + } - TI_DbgPrint(MID_TRACE, ("IP protocol number for address file object is %d.\n", + TI_DbgPrint(MID_TRACE, ("IP protocol number for address file object is %d.\n", Protocol)); - TI_DbgPrint(MID_TRACE, ("Port number for address file object is %d.\n", + TI_DbgPrint(MID_TRACE, ("Port number for address file object is %d.\n", WN2H(AddrFile->Port))); - /* Set protocol */ - AddrFile->Protocol = Protocol; + /* Set protocol */ + AddrFile->Protocol = Protocol; - /* Initialize receive and transmit queues */ - InitializeListHead(&AddrFile->ReceiveQueue); - InitializeListHead(&AddrFile->TransmitQueue); + /* Initialize receive and transmit queues */ + InitializeListHead(&AddrFile->ReceiveQueue); + InitializeListHead(&AddrFile->TransmitQueue); - /* Initialize spin lock that protects the address file object */ - KeInitializeSpinLock(&AddrFile->Lock); + /* Initialize spin lock that protects the address file object */ + KeInitializeSpinLock(&AddrFile->Lock); - /* Return address file object */ - Request->Handle.AddressHandle = AddrFile; + /* Return address file object */ + Request->Handle.AddressHandle = AddrFile; - /* Add address file to global list */ - ExInterlockedInsertTailList( - &AddressFileListHead, - &AddrFile->ListEntry, - &AddressFileListLock); + /* Add address file to global list */ + ExInterlockedInsertTailList( + &AddressFileListHead, + &AddrFile->ListEntry, + &AddressFileListLock); - TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); - DbgPrint("[TCPIP, FileOpenAddress] Leaving\n"); + TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); - return STATUS_SUCCESS; + return STATUS_SUCCESS; } @@ -409,35 +396,30 @@ NTSTATUS FileOpenAddress( * RETURNS: * Status of operation */ -NTSTATUS FileCloseAddress(PTDI_REQUEST Request) +NTSTATUS FileCloseAddress( + PTDI_REQUEST Request) { - PADDRESS_FILE AddrFile = Request->Handle.AddressHandle; - KIRQL OldIrql; + PADDRESS_FILE AddrFile = Request->Handle.AddressHandle; + KIRQL OldIrql; - DbgPrint("[TCPIP, FileCloseAddress] Called\n"); + if (!Request->Handle.AddressHandle) return STATUS_INVALID_PARAMETER; - if (!Request->Handle.AddressHandle) - return STATUS_INVALID_PARAMETER; + LockObject(AddrFile, &OldIrql); - LockObject(AddrFile, &OldIrql); + /* We have to close this listener because we started it */ + if( AddrFile->Listener ) + { + AddrFile->Listener->AddressFile = NULL; + TCPClose( AddrFile->Listener ); + } - /* We have to close this listener because we started it */ - if ( AddrFile->Listener ) - { - AddrFile->Listener->AddressFile = NULL; + UnlockObject(AddrFile, OldIrql); - //DbgPrint("[TCPIP, FileCloseAddress] Calling TCPClose( 0x%x )\n", AddrFile->Listener); - TCPClose( AddrFile->Listener ); - } + DereferenceObject(AddrFile); - UnlockObject(AddrFile, OldIrql); + TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); - DereferenceObject(AddrFile); - - TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); - DbgPrint("[TCPIP, FileCloseAddress] Leaving\n"); - - return STATUS_SUCCESS; + return STATUS_SUCCESS; } @@ -456,19 +438,15 @@ NTSTATUS FileOpenConnection( NTSTATUS Status; PCONNECTION_ENDPOINT Connection; - TI_DbgPrint(MID_TRACE, ("[TCPIP, FileOpenConnection] Called\n")); - //DbgPrint("[TCPIP, FileOpenConnection] Called\n"); + TI_DbgPrint(MID_TRACE, ("Called.\n")); Connection = TCPAllocateConnectionEndpoint( ClientContext ); - if (!Connection) - return STATUS_NO_MEMORY; + if( !Connection ) return STATUS_NO_MEMORY; Status = TCPSocket( Connection, AF_INET, SOCK_STREAM, IPPROTO_TCP ); - - if (!NT_SUCCESS(Status)) - { + if( !NT_SUCCESS(Status) ) { DereferenceObject( Connection ); return Status; } @@ -476,8 +454,7 @@ NTSTATUS FileOpenConnection( /* Return connection endpoint file object */ Request->Handle.ConnectionContext = Connection; - TI_DbgPrint(MAX_TRACE, ("[TCPIP, FileOpenConnection] Leaving\n")); - //DbgPrint("[TCPIP, FileOpenConnection] Leaving\n"); + TI_DbgPrint(MAX_TRACE, ("Leaving.\n")); return STATUS_SUCCESS; } @@ -498,8 +475,7 @@ NTSTATUS FileCloseConnection( Connection = Request->Handle.ConnectionContext; - if (!Connection) - return STATUS_INVALID_PARAMETER; + if (!Connection) return STATUS_INVALID_PARAMETER; TCPClose( Connection ); diff --git a/drivers/sac/directory.rbuild b/drivers/sac/directory.rbuild new file mode 100644 index 00000000000..cbcdcfd9011 --- /dev/null +++ b/drivers/sac/directory.rbuild @@ -0,0 +1,7 @@ + + + + + + + diff --git a/drivers/sac/driver/chanmgr.c b/drivers/sac/driver/chanmgr.c new file mode 100644 index 00000000000..1a655d92c02 --- /dev/null +++ b/drivers/sac/driver/chanmgr.c @@ -0,0 +1,176 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/chanmgr.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +ChanMgrInitialize( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrGetChannelIndex( + IN PSAC_CHANNEL Channel, + IN PULONG ChannelIndex + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrReleaseChannel( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrGetByHandle( + IN PSAC_CHANNEL_ID ChannelId, + OUT PSAC_CHANNEL pChannel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrGetByHandleAndFileObject( + IN PSAC_CHANNEL_ID ChannelId, + IN PFILE_OBJECT FileObject, + OUT PSAC_CHANNEL pChannel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrGetChannelByName( + IN PWCHAR Name, + OUT PSAC_CHANNEL pChannel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrGetByIndex( + IN ULONG TargetIndex, + IN PSAC_CHANNEL *TargetChannel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrGetNextActiveChannel( + IN PSAC_CHANNEL CurrentChannel, + IN PULONG TargetIndex, + OUT PSAC_CHANNEL *TargetChannel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +ChanMgrChannelDestroy( + IN PSAC_CHANNEL Channel + ) +{ + +} + +NTSTATUS +ChanMgrCloseChannel( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrReapChannel( + IN ULONG ChannelIndex + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrReapChannels( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrGetChannelCount( + OUT PULONG ChannelCount + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrIsFull( + OUT PBOOLEAN IsFull + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrShutdown( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +BOOLEAN +ChanMgrIsUniqueName( + IN PWCHAR ChannelName + ) +{ + return FALSE; +} + +NTSTATUS +ChanMgrGenerateUniqueCmdName( + IN PWCHAR ChannelName + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrCreateChannel( + OUT PSAC_CHANNEL *Channel, + IN PSAC_CHANNEL_ATTRIBUTES Attributes + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChanMgrCloseChannelsWithFileObject( + IN PFILE_OBJECT FileObject + ) +{ + return STATUS_NOT_IMPLEMENTED; +} diff --git a/drivers/sac/driver/channel.c b/drivers/sac/driver/channel.c new file mode 100644 index 00000000000..154097ebec0 --- /dev/null +++ b/drivers/sac/driver/channel.c @@ -0,0 +1,318 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/channel.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +BOOLEAN +ChannelIsValidType( + IN SAC_CHANNEL_TYPE ChannelType + ) +{ + return ((ChannelType >= VtUtf8) && (ChannelType <= Raw)); +} + +BOOLEAN +ChannelIsEqual( + IN PSAC_CHANNEL Channel, + IN PSAC_CHANNEL_ID ChannelId + ) +{ + return IsEqualGUIDAligned( + &Channel->ChannelId.ChannelGuid, + &ChannelId->ChannelGuid); +} + +NTSTATUS +ChannelInitializeVTable( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelDereferenceHandles( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelDestroy( + IN PSAC_CHANNEL Channel + ) +{ + CHECK_PARAMETER(Channel); + + return ChannelDereferenceHandles(Channel); +} + +NTSTATUS +ChannelOWrite( + IN PSAC_CHANNEL Channel, + IN PWCHAR Buffer, + IN ULONG BufferSize + ) +{ + NTSTATUS Status; + + CHECK_PARAMETER3(BufferSize < SAC_OBUFFER_SIZE); + + ChannelLockOBuffer(Channel); + + Status = Channel->OBufferWrite(Channel, Buffer, BufferSize); + + ChannelUnlockOBuffer(Channel); + + return Status; +} + +NTSTATUS +ChannelOFlush( + IN PSAC_CHANNEL Channel + ) +{ + NTSTATUS Status; + + ChannelLockOBuffer(Channel); + + Status = Channel->OBufferFlush(Channel); + + ChannelUnlockOBuffer(Channel); + + return Status; +} + +NTSTATUS +ChannelIWrite( + IN PSAC_CHANNEL Channel, + IN PWCHAR Buffer, + IN ULONG BufferSize + ) +{ + NTSTATUS Status; + + ChannelLockIBuffer(Channel); + + Status = Channel->IBufferWrite(Channel, Buffer, BufferSize); + + ChannelUnlockIBuffer(Channel); + + return Status; +} + +ULONG +ChannelIRead( + IN PSAC_CHANNEL Channel, + PWCHAR Buffer, + ULONG BufferSize, + OUT PULONG ResultBufferSize + ) +{ + NTSTATUS Status; + + ChannelLockIBuffer(Channel); + + Status = Channel->IBufferRead(Channel, Buffer, BufferSize, ResultBufferSize); + + ChannelUnlockIBuffer(Channel); + + return Status; +} + +NTSTATUS +ChannelIReadLast( + IN PSAC_CHANNEL Channel + ) +{ + NTSTATUS Status; + + ChannelLockIBuffer(Channel); + + Status = Channel->IBufferReadLast(Channel); + + ChannelUnlockIBuffer(Channel); + + return Status; +} + +ULONG +ChannelIBufferLength( + IN PSAC_CHANNEL Channel + ) +{ + NTSTATUS Length; + + ChannelLockOBuffer(Channel); + + Length = Channel->IBufferLength(Channel); + + ChannelUnlockOBuffer(Channel); + + return Length; +} + +NTSTATUS +ChannelGetName( + IN PSAC_CHANNEL Channel, + OUT PWCHAR *Name + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelSetName( + IN PSAC_CHANNEL Channel, + IN PWCHAR Name + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelGetDescription( + IN PSAC_CHANNEL Channel, + OUT PWCHAR *Description + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelSetDescription( + IN PSAC_CHANNEL Channel, + IN PWCHAR Description + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelSetStatus( + IN PSAC_CHANNEL Channel, + IN SAC_CHANNEL_STATUS ChannelStatus + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelGetStatus( + IN PSAC_CHANNEL Channel, + OUT PSAC_CHANNEL_STATUS ChannelStatus + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelGetApplicationType( + IN PSAC_CHANNEL Channel, + OUT PGUID ApplicationType + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +ChannelSetLockEvent( + IN PSAC_CHANNEL Channel + ) +{ + NTSTATUS Status; + + ChannelSetEvent(Channel, LockEvent); + + return Status; +} + +NTSTATUS +NTAPI +ChannelSetRedrawEvent( + IN PSAC_CHANNEL Channel + ) +{ + NTSTATUS Status; + + ChannelSetEvent(Channel, RedrawEvent); + + return Status; +} + +NTSTATUS +ChannelClearRedrawEvent( + IN PSAC_CHANNEL Channel + ) +{ + NTSTATUS Status; + + ChannelClearEvent(Channel, RedrawEvent); + + return Status; +} + +NTSTATUS +ChannelHasRedrawEvent( + IN PSAC_CHANNEL Channel, + OUT PBOOLEAN Present + ) +{ + CHECK_PARAMETER1(Channel); + CHECK_PARAMETER2(Present); + + *Present = Channel->Flags & SAC_CHANNEL_FLAG_REDRAW_EVENT; + + return STATUS_SUCCESS; +} + +BOOLEAN +ChannelIsActive( + IN PSAC_CHANNEL Channel + ) +{ + SAC_CHANNEL_STATUS ChannelStatus; + + if (!NT_SUCCESS(ChannelGetStatus(Channel, &ChannelStatus))) return FALSE; + + return (ChannelStatus == Active); +} + +BOOLEAN +ChannelIsClosed( + IN PSAC_CHANNEL Channel + ) +{ + return FALSE; +} + +NTSTATUS +ChannelCreate( + IN PSAC_CHANNEL Channel, + IN PSAC_CHANNEL_ATTRIBUTES Attributes, + IN SAC_CHANNEL_ID ChannelId + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ChannelClose( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} diff --git a/drivers/sac/driver/cmdchan.c b/drivers/sac/driver/cmdchan.c new file mode 100644 index 00000000000..de6e2953f2f --- /dev/null +++ b/drivers/sac/driver/cmdchan.c @@ -0,0 +1,60 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/cmdchan.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +CmdChannelCreate( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +CmdChannelDestroy( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +CmdChannelOWrite( + IN PSAC_CHANNEL Channel, + IN PWCHAR String, + IN ULONG Size + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +CmdChannelOFlush( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +CmdChannelORead( + IN PSAC_CHANNEL Channel, + IN PCHAR Buffer, + IN ULONG BufferSize, + OUT PULONG ByteCount + ) +{ + return STATUS_NOT_IMPLEMENTED; +} diff --git a/drivers/sac/driver/concmd.c b/drivers/sac/driver/concmd.c new file mode 100644 index 00000000000..42b87ca2795 --- /dev/null +++ b/drivers/sac/driver/concmd.c @@ -0,0 +1,243 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/concmd.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +GetTListInfo( + IN PVOID TListData, + IN ULONG InputSize, + IN ULONG TotalSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +PrintTListInfo( + IN PVOID TListData + ) +{ + +} + +VOID +PutMore( + OUT PBOOLEAN ScreenFull + ) +{ + +} + +BOOLEAN +RetrieveIpAddressFromString( + IN PWCHAR IpString, + OUT PULONG IpAddress + ) +{ + return FALSE; +} + +NTSTATUS +CallQueryIPIOCTL( + IN HANDLE DriverHandle, + IN PVOID DriverObject, + IN HANDLE WaitEvent, + IN PIO_STATUS_BLOCK IoStatusBlock, + IN PVOID InputBuffer, + IN ULONG InputBufferLength, + IN PVOID OutputBuffer, + IN ULONG OutputBufferLength, + IN BOOLEAN PrintMessage, + OUT PBOOLEAN MessagePrinted + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +DoFullInfoCommand( + VOID + ) +{ + +} + +VOID +DoPagingCommand( + VOID + ) +{ + +} + +VOID +DoSetTimeCommand( + IN PCHAR InputTime + ) +{ + +} + +VOID +DoKillCommand( + IN PCHAR KillString + ) +{ + +} + +VOID +DoLowerPriorityCommand( + IN PCHAR PrioString + ) +{ + +} + +VOID +DoRaisePriorityCommand( + IN PCHAR PrioString + ) +{ + +} + +VOID +DoLimitMemoryCommand( + IN PCHAR LimitString + ) +{ + +} + +VOID +DoRebootCommand( + IN BOOLEAN Reboot + ) +{ + +} + +VOID +DoCrashCommand( + VOID + ) +{ + +} + +VOID +DoMachineInformationCommand( + VOID + ) +{ + +} + +NTSTATUS +DoChannelListCommand( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +DoChannelCloseByNameCommand( + IN PCHAR Count + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +DoChannelCloseByIndexCommand( + IN ULONG ChannelIndex + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +DoChannelSwitchByNameCommand( + IN PCHAR Count + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +DoChannelSwitchByIndexCommand( + IN ULONG ChannelIndex + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +DoChannelCommand( + IN PCHAR ChannelString + ) +{ + +} + +VOID +DoCmdCommand( + VOID + ) +{ + +} + +VOID +DoLockCommand( + VOID + ) +{ + +} + +VOID +DoHelpCommand( + VOID + ) +{ + +} + +VOID +DoGetNetInfo( + IN BOOLEAN DoPrint + ) +{ + +} + +VOID +DoSetIpAddressCommand( + IN PCHAR IpString + ) +{ + +} + +VOID +DoTlistCommand( + VOID + ) +{ + +} \ No newline at end of file diff --git a/drivers/sac/driver/conmgr.c b/drivers/sac/driver/conmgr.c new file mode 100644 index 00000000000..a01819394af --- /dev/null +++ b/drivers/sac/driver/conmgr.c @@ -0,0 +1,191 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/conmgr.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +ConMgrShutdown( + VOID) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrDisplayFastChannelSwitchingInterface( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrSetCurrentChannel( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrDisplayCurrentChannel( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrAdvanceCurrentChannel( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +BOOLEAN +ConMgrIsWriteEnabled( + IN PSAC_CHANNEL Channel + ) +{ + return FALSE; +} + +VOID +SacPutString( + IN PWCHAR String + ) +{ + +} + +BOOLEAN +SacPutSimpleMessage( + IN ULONG MessageIndex + ) +{ + return FALSE; +} + +NTSTATUS +ConMgrChannelOWrite( + IN PSAC_CHANNEL Channel, + IN PVOID WriteBuffer + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrGetChannelCloseMessage( + IN PSAC_CHANNEL Channel, + IN NTSTATUS CloseStatus, + OUT PWCHAR OutputBuffer + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrWriteData( + IN PSAC_CHANNEL Channel, + IN PVOID Buffer, + IN ULONG BufferLength + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrFlushData( + IN PSAC_CHANNEL Channel + ) +{ + return FALSE; +} + +BOOLEAN +ConMgrIsSacChannel( + IN PSAC_CHANNEL Channel + ) +{ + return FALSE; +} + +NTSTATUS +ConMgrInitialize( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrResetCurrentChannel( + IN BOOLEAN KeepChannel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +ConMgrProcessInputLine( + VOID + ) +{ + +} + +VOID +ConMgrEventMessage( + IN PWCHAR EventMessage, + IN BOOLEAN LockHeld + ) +{ + +} + +BOOLEAN +ConMgrSimpleEventMessage( + IN ULONG MessageIndex, + IN BOOLEAN LockHeld + ) +{ + return FALSE; +} + +NTSTATUS +ConMgrChannelClose( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ConMgrHandleEvent( + IN ULONG EventCode, + IN PSAC_CHANNEL Channel, + OUT PVOID Data + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +ConMgrWorkerProcessEvents( + IN PSAC_CHANNEL Channel + ) +{ + +} diff --git a/drivers/sac/driver/data.c b/drivers/sac/driver/data.c new file mode 100644 index 00000000000..42ebd90662d --- /dev/null +++ b/drivers/sac/driver/data.c @@ -0,0 +1,58 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/data.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +ULONG SACDebug; + +/* FUNCTIONS ******************************************************************/ + +VOID +FreeGlobalData( + VOID + ) +{ + +} + +VOID +FreeDeviceData( + IN PDEVICE_OBJECT DeviceObject + ) +{ + +} + +NTSTATUS +WorkerThreadStartUp( + IN PVOID Context + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +BOOLEAN +InitializeDeviceData( + IN PDEVICE_OBJECT DeviceObject + ) +{ + return FALSE; +} + +BOOLEAN +InitializeGlobalData( + IN PUNICODE_STRING RegistryPath, + IN PDRIVER_OBJECT DriverObject + ) +{ + return FALSE; +} diff --git a/drivers/sac/driver/dispatch.c b/drivers/sac/driver/dispatch.c new file mode 100644 index 00000000000..58ffaca4115 --- /dev/null +++ b/drivers/sac/driver/dispatch.c @@ -0,0 +1,88 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/dispatch.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +NTAPI +DispatchDeviceControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +DispatchShutdownControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +DispatchCreate( + IN PSAC_DEVICE_EXTENSION DeviceExtension, + IN PIRP Irp + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +DispatchClose( + IN PSAC_DEVICE_EXTENSION DeviceExtension, + IN PIRP Irp + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +Dispatch( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +WorkerProcessEvents( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +TimerDpcRoutine( + IN PKDPC Dpc, + IN PVOID DeferredContext, + IN PVOID SystemArgument1, + IN PVOID SystemArgument2 + ) +{ + +} + +VOID +UnloadHandler( + IN PDRIVER_OBJECT DriverObject + ) +{ + +} diff --git a/drivers/sac/driver/init.c b/drivers/sac/driver/init.c new file mode 100644 index 00000000000..2be1425f38e --- /dev/null +++ b/drivers/sac/driver/init.c @@ -0,0 +1,93 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/init.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +DriverEntry( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath + ) +{ + HEADLESS_RSP_QUERY_INFO HeadlessInformation; + ULONG InfoSize; + NTSTATUS Status; + UNICODE_STRING DriverName; + PDEVICE_OBJECT DeviceObject; + PSAC_DEVICE_EXTENSION DeviceExtension; + PAGED_CODE(); + + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering.\n"); + + HeadlessDispatch( + HeadlessCmdQueryInformation, + NULL, + 0, + &HeadlessInformation, + &InfoSize + ); + if ((HeadlessInformation.Serial.TerminalType != HeadlessUndefinedPortType) && + ((HeadlessInformation.Serial.TerminalType != HeadlessSerialPort) || + (HeadlessInformation.Serial.TerminalAttached))) + { + RtlInitUnicodeString(&DriverName, L"\\Device\\SAC"); + + Status = IoCreateDevice( + DriverObject, + sizeof(SAC_DEVICE_EXTENSION), + &DriverName, + FILE_DEVICE_UNKNOWN, + FILE_DEVICE_SECURE_OPEN, + FALSE, + &DeviceObject + ); + if (NT_SUCCESS(Status)) + { + DeviceExtension = DeviceObject->DeviceExtension; + DeviceExtension->Initialized = FALSE; + + RtlFillMemoryUlong( + DriverObject->MajorFunction, + sizeof(DriverObject->MajorFunction) / sizeof(PVOID), + (ULONG_PTR)Dispatch); + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = + DispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = + DispatchShutdownControl; + DriverObject->FastIoDispatch = NULL; + DriverObject->DriverUnload = UnloadHandler; + + if (InitializeGlobalData(RegistryPath, DriverObject)) + { + if (InitializeDeviceData(DeviceObject)) + { + IoRegisterShutdownNotification(DeviceObject); + return Status; + } + } + + Status = STATUS_INSUFFICIENT_RESOURCES; + } + else + { + SAC_DBG(SAC_DBG_INIT, "unable to create device object: %X\n", Status); + } + + FreeGlobalData(); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting with status 0x%x\n", Status); + return Status; + } + + return STATUS_PORT_DISCONNECTED; +} diff --git a/drivers/sac/driver/memory.c b/drivers/sac/driver/memory.c new file mode 100644 index 00000000000..fb77febccf6 --- /dev/null +++ b/drivers/sac/driver/memory.c @@ -0,0 +1,306 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/memory.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +LONG TotalFrees, TotalBytesFreed, TotalAllocations, TotalBytesAllocated; +KSPIN_LOCK MemoryLock; +PSAC_MEMORY_LIST GlobalMemoryList; + +/* FUNCTIONS ******************************************************************/ + +BOOLEAN +InitializeMemoryManagement(VOID) +{ + PSAC_MEMORY_ENTRY Entry; + + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); + + GlobalMemoryList = ExAllocatePoolWithTagPriority( + NonPagedPool, + SAC_MEMORY_LIST_SIZE, + INITIAL_BLOCK_TAG, + HighPoolPriority); + if (GlobalMemoryList) + { + KeInitializeSpinLock(&MemoryLock); + + GlobalMemoryList->Signature = GLOBAL_MEMORY_SIGNATURE; + GlobalMemoryList->LocalDescriptor = + (PSAC_MEMORY_ENTRY)(GlobalMemoryList + 1); + GlobalMemoryList->Size = SAC_MEMORY_LIST_SIZE - sizeof(SAC_MEMORY_LIST); + + Entry = GlobalMemoryList->LocalDescriptor; + Entry->Signature = LOCAL_MEMORY_SIGNATURE; + Entry->Tag = FREE_POOL_TAG; + Entry->Size = GlobalMemoryList->Size - sizeof(SAC_MEMORY_ENTRY); + + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting with TRUE.\n"); + return TRUE; + } + + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting with FALSE. No pool.\n"); + return FALSE; +} + +VOID +FreeMemoryManagement( + VOID + ) +{ + PSAC_MEMORY_LIST Next; + KIRQL OldIrql; + + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); + + KeAcquireSpinLock(&MemoryLock, &OldIrql); + while (GlobalMemoryList) + { + ASSERT(GlobalMemoryList->Signature == GLOBAL_MEMORY_SIGNATURE); + + KeReleaseSpinLock(&MemoryLock, OldIrql); + + Next = GlobalMemoryList->Next; + + ExFreePoolWithTag(GlobalMemoryList, 0); + + KeAcquireSpinLock(&MemoryLock, &OldIrql); + GlobalMemoryList = Next; + } + + KeReleaseSpinLock(&MemoryLock, OldIrql); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting\n"); +} + +PVOID +MyAllocatePool( + IN SIZE_T PoolSize, + IN ULONG Tag, + IN PCHAR File, + IN ULONG Line + ) +{ + KIRQL OldIrql; + PSAC_MEMORY_LIST GlobalDescriptor, NewDescriptor; + PSAC_MEMORY_ENTRY LocalDescriptor, NextDescriptor; + ULONG GlobalSize, ActualSize; + PVOID Buffer; + + ASSERT("Tag != FREE_POOL_TAG"); + + SAC_DBG(SAC_DBG_MM, "Entering.\n"); + + OldIrql = KfAcquireSpinLock(&MemoryLock); + PoolSize = ALIGN_UP(PoolSize, ULONGLONG); + + GlobalDescriptor = GlobalMemoryList; + KeAcquireSpinLock(&MemoryLock, &OldIrql); + while (GlobalDescriptor) + { + ASSERT(GlobalMemoryList->Signature == GLOBAL_MEMORY_SIGNATURE); + + LocalDescriptor = GlobalDescriptor->LocalDescriptor; + + GlobalSize = GlobalDescriptor->Size; + while (GlobalSize) + { + ASSERT(LocalDescriptor->Signature == LOCAL_MEMORY_SIGNATURE); + + if ((LocalDescriptor->Tag == FREE_POOL_TAG) && + (LocalDescriptor->Size >= PoolSize)) + { + break; + } + + GlobalSize -= (LocalDescriptor->Size + sizeof(SAC_MEMORY_ENTRY)); + + LocalDescriptor = + (PSAC_MEMORY_ENTRY)((ULONG_PTR)LocalDescriptor + + LocalDescriptor->Size + + sizeof(SAC_MEMORY_ENTRY)); + } + + GlobalDescriptor = GlobalDescriptor->Next; + } + + if (!GlobalDescriptor) + { + KeReleaseSpinLock(&MemoryLock, OldIrql); + + ActualSize = min( + PAGE_SIZE, + PoolSize + sizeof(SAC_MEMORY_ENTRY) + sizeof(SAC_MEMORY_LIST)); + + SAC_DBG(SAC_DBG_MM, "Allocating new space.\n"); + + NewDescriptor = ExAllocatePoolWithTagPriority( + 0, + ActualSize, + ALLOC_BLOCK_TAG, + HighPoolPriority); + if (!NewDescriptor) + { + SAC_DBG(SAC_DBG_MM, "No more memory, returning NULL.\n"); + return NULL; + } + + KeAcquireSpinLock(&MemoryLock, &OldIrql); + + NewDescriptor->Signature = GLOBAL_MEMORY_SIGNATURE; + NewDescriptor->LocalDescriptor = (PSAC_MEMORY_ENTRY)(NewDescriptor + 1); + NewDescriptor->Size = ActualSize - 16; + NewDescriptor->Next = GlobalMemoryList; + + GlobalMemoryList = NewDescriptor; + + LocalDescriptor = NewDescriptor->LocalDescriptor; + LocalDescriptor->Signature = LOCAL_MEMORY_SIGNATURE; + LocalDescriptor->Tag = FREE_POOL_TAG; + LocalDescriptor->Size = + GlobalMemoryList->Size - sizeof(SAC_MEMORY_ENTRY); + } + + SAC_DBG(SAC_DBG_MM, "Found a good sized block.\n"); + ASSERT(LocalDescriptor->Tag == FREE_POOL_TAG); + ASSERT(LocalDescriptor->Signature == LOCAL_MEMORY_SIGNATURE); + + if (LocalDescriptor->Size > (PoolSize + sizeof(SAC_MEMORY_ENTRY))) + { + NextDescriptor = + (PSAC_MEMORY_ENTRY)((ULONG_PTR)LocalDescriptor + + PoolSize + + sizeof(SAC_MEMORY_ENTRY)); + if (NextDescriptor->Tag == FREE_POOL_TAG) + { + NextDescriptor->Tag = FREE_POOL_TAG; + NextDescriptor->Signature = LOCAL_MEMORY_SIGNATURE; + NextDescriptor->Size = + (LocalDescriptor->Size - PoolSize - sizeof(SAC_MEMORY_ENTRY)); + + LocalDescriptor->Size = PoolSize; + } + } + + LocalDescriptor->Tag = Tag; + KeReleaseSpinLock(&MemoryLock, OldIrql); + + InterlockedIncrement(&TotalAllocations); + InterlockedExchangeAdd(&TotalBytesAllocated, LocalDescriptor->Size); + SAC_DBG(1, "Returning block 0x%X.\n", LocalDescriptor); + + Buffer = LocalDescriptor + 1; + RtlZeroMemory(Buffer, PoolSize); + return Buffer; +} + +VOID +MyFreePool( + IN PVOID *Block + ) +{ + PSAC_MEMORY_ENTRY LocalDescriptor, NextDescriptor; + PSAC_MEMORY_ENTRY ThisDescriptor, FoundDescriptor; + ULONG GlobalSize, LocalSize; + PSAC_MEMORY_LIST GlobalDescriptor; + KIRQL OldIrql; + + LocalDescriptor = (PVOID)((ULONG_PTR)(*Block) - sizeof(SAC_MEMORY_ENTRY)); + + SAC_DBG(SAC_DBG_MM, "Entering with block 0x%X.\n", LocalDescriptor); + + ASSERT(LocalDescriptor->Size > 0); + ASSERT(LocalDescriptor->Signature == LOCAL_MEMORY_SIGNATURE); + + InterlockedIncrement(&TotalFrees); + + InterlockedExchangeAdd(&TotalBytesFreed, LocalDescriptor->Size); + + GlobalDescriptor = GlobalMemoryList; + KeAcquireSpinLock(&MemoryLock, &OldIrql); + while (GlobalDescriptor) + { + ASSERT(GlobalMemoryList->Signature == GLOBAL_MEMORY_SIGNATURE); + + FoundDescriptor = NULL; + + ThisDescriptor = GlobalDescriptor->LocalDescriptor; + + GlobalSize = GlobalDescriptor->Size; + while (GlobalSize) + { + ASSERT(ThisDescriptor->Signature == LOCAL_MEMORY_SIGNATURE); + + if (ThisDescriptor == LocalDescriptor) break; + + GlobalSize -= (ThisDescriptor->Size + sizeof(SAC_MEMORY_ENTRY)); + + ThisDescriptor = + (PSAC_MEMORY_ENTRY)((ULONG_PTR)ThisDescriptor + + ThisDescriptor->Size + + sizeof(SAC_MEMORY_ENTRY)); + } + + if (ThisDescriptor == LocalDescriptor) break; + + GlobalDescriptor = GlobalDescriptor->Next; + } + + if (!GlobalDescriptor) + { + KeReleaseSpinLock(&MemoryLock, OldIrql); + SAC_DBG(SAC_DBG_MM, "Could not find block.\n"); + return; + } + + ASSERT(ThisDescriptor->Signature == LOCAL_MEMORY_SIGNATURE); + + if (LocalDescriptor->Tag == FREE_POOL_TAG) + { + KeReleaseSpinLock(&MemoryLock, OldIrql); + SAC_DBG(SAC_DBG_MM, "Attempted to free something twice.\n"); + return; + } + + LocalSize = LocalDescriptor->Size; + LocalDescriptor->Tag = FREE_POOL_TAG; + + if (GlobalSize > (LocalSize + sizeof(SAC_MEMORY_ENTRY))) + { + NextDescriptor = + (PSAC_MEMORY_ENTRY)((ULONG_PTR)LocalDescriptor + + LocalSize + + sizeof(SAC_MEMORY_ENTRY)); + if (NextDescriptor->Tag == FREE_POOL_TAG) + { + NextDescriptor->Tag = 0; + NextDescriptor->Signature = 0; + + LocalDescriptor->Size += + (NextDescriptor->Size + sizeof(SAC_MEMORY_ENTRY)); + } + } + + if ((FoundDescriptor) && (FoundDescriptor->Tag == FREE_POOL_TAG)) + { + LocalDescriptor->Signature = 0; + LocalDescriptor->Tag = 0; + + FoundDescriptor->Size += + (LocalDescriptor->Size + sizeof(SAC_MEMORY_ENTRY)); + } + + KeReleaseSpinLock(&MemoryLock, OldIrql); + *Block = NULL; + + SAC_DBG(SAC_DBG_MM, "exiting.\n"); + return; +} diff --git a/drivers/sac/driver/rawchan.c b/drivers/sac/driver/rawchan.c new file mode 100644 index 00000000000..6a38bd0a97c --- /dev/null +++ b/drivers/sac/driver/rawchan.c @@ -0,0 +1,143 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/rawchan.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +RawChannelCreate( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RawChannelDestroy( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RawChannelORead( + IN PSAC_CHANNEL Channel, + IN PCHAR Buffer, + IN ULONG BufferSize, + OUT PULONG ByteCount + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RawChannelOEcho( + IN PSAC_CHANNEL Channel, + IN PWCHAR String, + IN ULONG Length + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RawChannelOWrite2( + IN PSAC_CHANNEL Channel, + IN PCHAR String, + IN ULONG Size + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RawChannelOFlush( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +ULONG +RawChannelGetIBufferIndex( + IN PSAC_CHANNEL Channel + ) +{ + return 0; +} + +VOID +RawChannelSetIBufferIndex( + IN PSAC_CHANNEL Channel, + IN ULONG BufferIndex + ) +{ + +} + +NTSTATUS +RawChannelOWrite( + IN PSAC_CHANNEL Channel, + IN PWCHAR String, + IN ULONG Length + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RawChannelIRead( + IN PSAC_CHANNEL Channel, + IN PCHAR Buffer, + IN ULONG BufferSize, + IN PULONG ReturnBufferSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RawChannelIBufferIsFull( + IN PSAC_CHANNEL Channel, + PBOOLEAN BufferStatus + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +ULONG +RawChannelIBufferLength( + IN PSAC_CHANNEL Channel + ) +{ + return 0; +} + +CHAR +RawChannelIReadLast( + IN PSAC_CHANNEL Channel + ) +{ + return 0; +} + +NTSTATUS +RawChannelIWrite( + IN PSAC_CHANNEL Channel, + IN PCHAR Buffer, + IN ULONG BufferSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} diff --git a/drivers/sac/driver/sacdrv.h b/drivers/sac/driver/sacdrv.h new file mode 100644 index 00000000000..0936712eb61 --- /dev/null +++ b/drivers/sac/driver/sacdrv.h @@ -0,0 +1,390 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/sacdrv.h + * PURPOSE: Header for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ +#include +#include + +#define SAC_DBG_ENTRY_EXIT 0x01 +#define SAC_DBG_INIT 0x04 +#define SAC_DBG_MM 0x1000 + +#define SAC_DBG(x, ...) \ + if (SACDebug & x) \ + { \ + DbgPrint("SAC %s: ", __FUNCTION__); \ + DbgPrint(__VA_ARGS__); \ + } + +#define CHECK_PARAMETER_WITH_STATUS(Parameter, Status) \ +{ \ + ASSERT((Parameter)); \ + if (!Parameter) \ + { \ + return Status; \ + } \ +} +#define CHECK_PARAMETER(x) \ + CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER) +#define CHECK_PARAMETER1(x) \ + CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER_1) +#define CHECK_PARAMETER2(x) \ + CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER_2) +#define CHECK_PARAMETER3(x) \ + CHECK_PARAMETER_WITH_STATUS(x, STATUS_INVALID_PARAMETER_3) +#define CHECK_ALLOCATION(x) \ + CHECK_PARAMETER_WITH_STATUS(x, STATUS_OUT_OF_MEMORY) + +#define SacAllocatePool(Length, Tag) \ + MyAllocatePool(Length, Tag, __FILE__, __LINE__) + +#define ChannelLock(Channel, x) \ +{ \ + KeWaitForSingleObject( \ + &(Channel)->x.Lock, \ + Executive, \ + KernelMode, \ + FALSE, \ + NULL); \ + ASSERT((Channel)->x.RefCount == 0); \ + InterlockedIncrement(&(Channel)->x.RefCount); \ +} + +#define ChannelUnlock(Channel, x) \ +{ \ + ASSERT((Channel)->x.RefCount == 1); \ + InterlockedDecrement(&(Channel)->x.RefCount); \ + KeReleaseSemaphore( \ + &(Channel)->x.Lock, \ + SEMAPHORE_INCREMENT, \ + 1, \ + FALSE); \ +} + +#define ChannelLockOBuffer(Channel) ChannelLock(Channel, ChannelOBufferLock); +#define ChannelUnlockOBuffer(Channel) ChannelUnlock(Channel, ChannelOBufferLock); +#define ChannelLockIBuffer(Channel) ChannelLock(Channel, ChannelIBufferLock); +#define ChannelUnlockIBuffer(Channel) ChannelUnlock(Channel, ChannelIBufferLock); +#define ChannelLockAttributes(Channel) ChannelLock(Channel, ChannelAttributesLock); +#define ChannelUnlockAttributes(Channel) ChannelUnlock(Channel, ChannelAttributesLock); + +#define ChannelInitializeEvent(Channel, Attributes, x) \ +{ \ + PVOID Object, WaitObject; \ + if (Attributes->x) \ + { \ + if (!VerifyEventWaitable(Attributes->x, &Object, &WaitObject)) \ + { \ + goto FailChannel; \ + } \ + Channel->x = Attributes->x; \ + Channel->x##ObjectBody = Object; \ + Channel->x##WaitObjectBody = WaitObject; \ + } \ +} + +#define ChannelSetEvent(Channel, x) \ +{ \ + ASSERT(Channel->x); \ + ASSERT(Channel->x##ObjectBody); \ + ASSERT(Channel->x##WaitObjectBody); \ + if (Channel->x) \ + { \ + KeSetEvent(Channel->x, EVENT_INCREMENT, FALSE); \ + Status = STATUS_SUCCESS; \ + } \ + else \ + { \ + Status = STATUS_UNSUCCESSFUL; \ + } \ +} + +#define ChannelClearEvent(Channel, x) \ +{ \ + ASSERT(Channel->x); \ + ASSERT(Channel->x##ObjectBody); \ + ASSERT(Channel->x##WaitObjectBody); \ + if (Channel->x) \ + { \ + KeClearEvent(Channel->x); \ + Status = STATUS_SUCCESS; \ + } \ + else \ + { \ + Status = STATUS_UNSUCCESSFUL; \ + } \ +} + +//Rcp? - sacdrv.sys - SAC Driver (Headless) +//RcpA - sacdrv.sys - Internal memory mgr alloc block +//RcpI - sacdrv.sys - Internal memory mgr initial heap block +//RcpS - sacdrv.sys - Security related block +#define GENERIC_TAG '?pcR' +#define ALLOC_BLOCK_TAG 'ApcR' +#define INITIAL_BLOCK_TAG 'IpcR' +#define SECURITY_BLOCK_TAG 'SpcR' +#define FREE_POOL_TAG 'FpcR' + +#define LOCAL_MEMORY_SIGNATURE 'SSEL' +#define GLOBAL_MEMORY_SIGNATURE 'DAEH' + +#define SAC_MEMORY_LIST_SIZE (1 * 1024 * 1024) + +#define SAC_OBUFFER_SIZE (2 * 1024) + +#define SAC_CHANNEL_FLAG_CLOSE_EVENT 0x2 +#define SAC_CHANNEL_FLAG_HAS_NEW_DATA_EVENT 0x4 +#define SAC_CHANNEL_FLAG_LOCK_EVENT 0x8 +#define SAC_CHANNEL_FLAG_REDRAW_EVENT 0x10 + +typedef struct _SAC_MEMORY_ENTRY +{ + ULONG Signature; + ULONG Tag; + ULONG Size; +} SAC_MEMORY_ENTRY, *PSAC_MEMORY_ENTRY; + +typedef struct _SAC_MEMORY_LIST +{ + ULONG Signature; + PSAC_MEMORY_ENTRY LocalDescriptor; + ULONG Size; + struct _SAC_MEMORY_LIST* Next; +} SAC_MEMORY_LIST, *PSAC_MEMORY_LIST; + +typedef enum _SAC_CHANNEL_TYPE +{ + VtUtf8, + Cmd, + Raw +} SAC_CHANNEL_TYPE; + +typedef enum _SAC_CHANNEL_STATUS +{ + Inactive, + Active +} SAC_CHANNEL_STATUS, *PSAC_CHANNEL_STATUS; + +typedef struct _SAC_CHANNEL_ID +{ + GUID ChannelGuid; + ULONG ChannelId; +} SAC_CHANNEL_ID, *PSAC_CHANNEL_ID; + +typedef struct _SAC_CHANNEL_LOCK +{ + LONG RefCount; + KSEMAPHORE Lock; +} SAC_CHANNEL_LOCK, *PSAC_CHANNEL_LOCK; + +struct _SAC_CHANNEL; + +typedef +NTSTATUS +(*PSAC_CHANNEL_CREATE)( + IN struct _SAC_CHANNEL* Channel + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_DESTROY)( + IN struct _SAC_CHANNEL* Channel + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_OREAD)( + IN struct _SAC_CHANNEL* Channel, + IN PCHAR Buffer, + IN ULONG BufferSize, + OUT PULONG ByteCount + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_OECHO)( + IN struct _SAC_CHANNEL* Channel, + IN PWCHAR String, + IN ULONG Length + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_OFLUSH)( + IN struct _SAC_CHANNEL* Channel + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_OWRITE)( + IN struct _SAC_CHANNEL* Channel, + IN PWCHAR String, + IN ULONG Length + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_IREAD)( + IN struct _SAC_CHANNEL* Channel, + IN PWCHAR Buffer, + IN ULONG BufferSize, + IN PULONG ReturnBufferSize + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_IBUFFER_FULL)( + IN struct _SAC_CHANNEL* Channel, + OUT PBOOLEAN BufferStatus + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_IBUFFER_LENGTH)( + IN struct _SAC_CHANNEL* Channel + ); + +typedef +CHAR +(*PSAC_CHANNEL_IREAD_LAST)( + IN struct _SAC_CHANNEL* Channel + ); + +typedef +NTSTATUS +(*PSAC_CHANNEL_IWRITE)( + IN struct _SAC_CHANNEL* Channel, + IN PCHAR Buffer, + IN ULONG BufferSize + ); + +typedef struct _SAC_CHANNEL +{ + ULONG Index; + SAC_CHANNEL_ID ChannelId; + HANDLE CloseEvent; + PVOID CloseEventObjectBody; + PKEVENT CloseEventWaitObjectBody; + HANDLE HasNewDataEvent; + PVOID HasNewDataEventObjectBody; + PKEVENT HasNewDataEventWaitObjectBody; + HANDLE LockEvent; + PVOID LockEventObjectBody; + PKEVENT LockEventWaitObjectBody; + HANDLE RedrawEvent; + PVOID RedrawEventObjectBody; + PKEVENT RedrawEventWaitObjectBody; + PFILE_OBJECT FileObject; + SAC_CHANNEL_TYPE ChannelType; + SAC_CHANNEL_STATUS ChannelStatus; + WCHAR NameBuffer[64 + 1]; + WCHAR DescriptionBuffer[256 + 1]; + ULONG Flags; + GUID ApplicationType; + BOOLEAN WriteEnabled; + ULONG IBufferIndex; + PVOID IBuffer; + BOOLEAN ChannelHasNewIBufferData; + UCHAR CursorRow; + UCHAR CursorCol; + UCHAR CursorY; + UCHAR CursorX; + UCHAR CursorVisible; + PVOID OBuffer; + ULONG OBufferIndex; + ULONG OBufferFirstGoodIndex; + BOOLEAN ChannelHasNewOBufferData; + PSAC_CHANNEL_CREATE ChannelCreate; + PSAC_CHANNEL_DESTROY ChannelDestroy; + PSAC_CHANNEL_OFLUSH OBufferFlush; + PSAC_CHANNEL_OECHO OBufferEcho; + PSAC_CHANNEL_OWRITE OBufferWrite; + PSAC_CHANNEL_OREAD OBufferRead; + PSAC_CHANNEL_OWRITE IBufferWrite; + PSAC_CHANNEL_IREAD IBufferRead; + PSAC_CHANNEL_IREAD_LAST IBufferReadLast; + PSAC_CHANNEL_IBUFFER_FULL IBufferIsFull; + PSAC_CHANNEL_IBUFFER_LENGTH IBufferLength; + SAC_CHANNEL_LOCK ChannelAttributeLock; + SAC_CHANNEL_LOCK ChannelOBufferLock; + SAC_CHANNEL_LOCK ChannelIBufferLock; +} SAC_CHANNEL, *PSAC_CHANNEL; + +typedef struct _SAC_DEVICE_EXTENSION +{ + PDEVICE_OBJECT DeviceObject; + BOOLEAN Initialized; + BOOLEAN Rundown; + BOOLEAN PriorityFail; + KPRIORITY PriorityBoost; + PEPROCESS Process; + KSPIN_LOCK Lock; + KEVENT RundownEvent; + KEVENT Event; + HANDLE WorkerThreadHandle; + KEVENT WorkerThreadEvent; + KTIMER Timer; + KDPC Dpc; + LIST_ENTRY List; +} SAC_DEVICE_EXTENSION, *PSAC_DEVICE_EXTENSION; + +typedef struct _SAC_CHANNEL_ATTRIBUTES +{ + SAC_CHANNEL_TYPE ChannelType; + WCHAR NameBuffer[64 + 1]; + WCHAR DescriptionBuffer[256 + 1]; + ULONG Flag; + PKEVENT CloseEvent; + PKEVENT HasNewDataEvent; + PKEVENT LockEvent; + PKEVENT RedrawEvent; + GUID ChannelId; +} SAC_CHANNEL_ATTRIBUTES, *PSAC_CHANNEL_ATTRIBUTES; + +NTSTATUS +Dispatch( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp +); + +NTSTATUS +NTAPI +DispatchDeviceControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp +); + +NTSTATUS +DispatchShutdownControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp +); + +VOID +UnloadHandler( + IN PDRIVER_OBJECT DriverObject +); + +VOID +FreeGlobalData( + VOID +); + +BOOLEAN +InitializeDeviceData( + IN PDEVICE_OBJECT DeviceObject +); + +BOOLEAN +InitializeGlobalData( + IN PUNICODE_STRING RegistryPath, + IN PDRIVER_OBJECT DriverObject +); + +extern ULONG SACDebug; + diff --git a/drivers/sac/driver/sacdrv.rbuild b/drivers/sac/driver/sacdrv.rbuild new file mode 100644 index 00000000000..8357c1d440c --- /dev/null +++ b/drivers/sac/driver/sacdrv.rbuild @@ -0,0 +1,29 @@ + + + + + . + ntoskrnl + hal + sacmsg + + + -mrtd + -fno-builtin + + + sacdrv.h + chanmgr.c + channel.c + cmdchan.c + concmd.c + conmgr.c + data.c + dispatch.c + init.c + memory.c + rawchan.c + util.c + vtutf8chan.c + sacdrv.rc + diff --git a/drivers/sac/driver/sacdrv.rc b/drivers/sac/driver/sacdrv.rc new file mode 100644 index 00000000000..ceb819a9005 --- /dev/null +++ b/drivers/sac/driver/sacdrv.rc @@ -0,0 +1,25 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/base/sac/driver/sacdrv.rc + * PURPOSE: Resource File for EMS SAC Driver + * PROGRAMMERS: ReactOS Portable Systems Group + */ +#include +#include + +// +// Version Data +// +#define VER_FILETYPE VFT_DRV +#define VER_FILESUBTYPE VFT2_DRV_SYSTEM +#define VER_FILEDESCRIPTION_STR "Windows SAC Driver" +#define VER_INTERNALNAME_STR "sacdrv.sys" +#define VER_ORIGINALFILENAME_STR "sacdrv.sys" +#define VER_LANGNEUTRAL +#include "common.ver" + +// +// Bug Codes and Bitmaps +// +#include "sacmsg.rc" diff --git a/drivers/sac/driver/util.c b/drivers/sac/driver/util.c new file mode 100644 index 00000000000..b40f058c592 --- /dev/null +++ b/drivers/sac/driver/util.c @@ -0,0 +1,239 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/util.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +ULONG +ConvertAnsiToUnicode( + IN PWCHAR pwch, + IN PCHAR pch, + IN ULONG length + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +BOOLEAN +IsCmdEventRegistrationProcess( + IN PFILE_OBJECT FileObject + ) +{ + return FALSE; +} + +VOID +InitializeCmdEventInfo( + VOID + ) +{ + +} + +BOOLEAN +VerifyEventWaitable( + IN PVOID Object, + OUT PVOID *WaitObject, + OUT PVOID *ActualWaitObject + ) +{ + return FALSE; +} + +NTSTATUS +InvokeUserModeService( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +SacFormatMessage( + IN PWCHAR FormattedString, + IN PWCHAR MessageString, + IN ULONG MessageSize + ) +{ + +} + +NTSTATUS +TearDownGlobalMessageTable( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +PWCHAR +GetMessage( + IN ULONG MessageIndex + ) +{ + return NULL; +} + +BOOLEAN +SacTranslateUtf8ToUnicode( + IN CHAR Utf8Char, + IN PCHAR UnicodeBuffer, + OUT PCHAR Utf8Value + ) +{ + return FALSE; +} + +BOOLEAN +SacTranslateUnicodeToUtf8( + IN PWCHAR SourceBuffer, + IN ULONG SourceBufferLength, + OUT PCHAR DestinationBuffer, + IN ULONG DestinationBufferSize, + IN ULONG UTF8Count, + OUT PULONG ProcessedCount + ) +{ + return FALSE; +} + +NTSTATUS +GetRegistryValueBuffer( + IN PCWSTR KeyName, + IN PWCHAR ValueName, + IN PKEY_VALUE_PARTIAL_INFORMATION ValueBuffer + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +SetRegistryValue( + IN PCWSTR KeyName, + IN PWCHAR ValueName, + IN ULONG Type, + IN PVOID Data, + IN ULONG DataSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +CopyRegistryValueData( + IN PVOID Dest, + IN PKEY_VALUE_PARTIAL_INFORMATION ValueBuffer + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +TranslateMachineInformationText( + IN PWCHAR Buffer) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +TranslateMachineInformationXML( + IN PWCHAR Buffer, + IN PWCHAR ExtraData + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +RegisterBlueScreenMachineInformation( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +VOID +FreeMachineInformation( + VOID + ) +{ + +} + +NTSTATUS +SerialBufferGetChar( + OUT PCHAR Char + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +GetCommandConsoleLaunchingPermission( + OUT PBOOLEAN Permission + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +ImposeSacCmdServiceStartTypePolicy( + VOID + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +CopyAndInsertStringAtInterval( + IN PWCHAR SourceStr, + IN ULONG Interval, + IN PWCHAR InsertStr, + OUT PWCHAR pDestStr + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +ULONG +GetMessageLineCount( + IN ULONG MessageIndex + ) +{ + return 0; +} + +NTSTATUS +RegisterSacCmdEvent( + IN PVOID Object, + IN PKEVENT SetupCmdEvent[] + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +UnregisterSacCmdEvent( + IN PFILE_OBJECT FileObject + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +UTF8EncodeAndSend( + IN PWCHAR String + ) +{ + return STATUS_NOT_IMPLEMENTED; +} diff --git a/drivers/sac/driver/vtutf8chan.c b/drivers/sac/driver/vtutf8chan.c new file mode 100644 index 00000000000..26f80d8b448 --- /dev/null +++ b/drivers/sac/driver/vtutf8chan.c @@ -0,0 +1,181 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/sac/driver/vtutf8chan.c + * PURPOSE: Driver for the Server Administration Console (SAC) for EMS + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include "sacdrv.h" + +/* GLOBALS ********************************************************************/ + +/* FUNCTIONS ******************************************************************/ + +NTSTATUS +VTUTF8ChannelCreate( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelDestroy( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelORead( + IN PSAC_CHANNEL Channel, + IN PCHAR Buffer, + IN ULONG BufferSize, + OUT PULONG ByteCount + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelOEcho( + IN PSAC_CHANNEL Channel, + IN PWCHAR String, + IN ULONG Size + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +BOOLEAN +VTUTF8ChannelScanForNumber( + IN PWCHAR String, + OUT PULONG Number + ) +{ + return FALSE; +} + +NTSTATUS +VTUTF8ChannelAnsiDispatch( + IN NTSTATUS Status, + IN ULONG AnsiCode, + IN PWCHAR Data, + IN ULONG Length + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelProcessAttributes( + IN PSAC_CHANNEL Channel, + IN UCHAR Attribute + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +ULONG +VTUTF8ChannelGetIBufferIndex( + IN PSAC_CHANNEL Channel + ) +{ + return 0; +} + +VOID +VTUTF8ChannelSetIBufferIndex( + IN PSAC_CHANNEL Channel, + IN ULONG BufferIndex + ) +{ + +} + +NTSTATUS +VTUTF8ChannelConsumeEscapeSequence( + IN PSAC_CHANNEL Channel, + IN PWCHAR String + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelOFlush( + IN PSAC_CHANNEL Channel + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelIRead( + IN PSAC_CHANNEL Channel, + IN PCHAR Buffer, + IN ULONG BufferSize, + IN PULONG ReturnBufferSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelIBufferIsFull( + IN PSAC_CHANNEL Channel, + OUT PBOOLEAN BufferStatus + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +WCHAR +VTUTF8ChannelIReadLast( + IN PSAC_CHANNEL Channel + ) +{ + return 0; +} + +ULONG +VTUTF8ChannelIBufferLength( + IN PSAC_CHANNEL Channel + ) +{ + return 0; +} + +NTSTATUS +VTUTF8ChannelOWrite2( + IN PSAC_CHANNEL Channel, + IN PWCHAR String, + IN ULONG Size + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelIWrite( + IN PSAC_CHANNEL Channel, + IN PCHAR Buffer, + IN ULONG BufferSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +VTUTF8ChannelOWrite( + IN PSAC_CHANNEL Channel, + IN PWCHAR String, + IN ULONG Length + ) +{ + return STATUS_NOT_IMPLEMENTED; +} diff --git a/drivers/storage/class/cdrom_new/cdrom_new.rbuild b/drivers/storage/class/cdrom_new/cdrom_new.rbuild index 3969aedb585..4e8d9fbed4e 100644 --- a/drivers/storage/class/cdrom_new/cdrom_new.rbuild +++ b/drivers/storage/class/cdrom_new/cdrom_new.rbuild @@ -1,7 +1,7 @@ - + ntoskrnl hal classpnp diff --git a/drivers/storage/fdc/CMakeLists.txt b/drivers/storage/fdc/CMakeLists.txt new file mode 100644 index 00000000000..fc6b28e7a12 --- /dev/null +++ b/drivers/storage/fdc/CMakeLists.txt @@ -0,0 +1,2 @@ + +add_subdirectory(fdc) diff --git a/drivers/storage/fdc/directory.rbuild b/drivers/storage/fdc/directory.rbuild new file mode 100644 index 00000000000..f270c6bb0bb --- /dev/null +++ b/drivers/storage/fdc/directory.rbuild @@ -0,0 +1,7 @@ + + + + + + + diff --git a/drivers/storage/fdc/fdc/CMakeLists.txt b/drivers/storage/fdc/fdc/CMakeLists.txt new file mode 100644 index 00000000000..51d6893438b --- /dev/null +++ b/drivers/storage/fdc/fdc/CMakeLists.txt @@ -0,0 +1,11 @@ + +add_library(fdc SHARED + fdc.c + fdo.c + pdo.c + fdc.rc) + +set_module_type(fdc kernelmodedriver) +add_importlibs(fdc hal ntoskrnl) + +add_cd_file(TARGET fdc DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/storage/fdc/fdc/SOURCES b/drivers/storage/fdc/fdc/SOURCES new file mode 100644 index 00000000000..7f4ef12c9a0 --- /dev/null +++ b/drivers/storage/fdc/fdc/SOURCES @@ -0,0 +1,5 @@ +TARGETNAME=fdc +TARGETTYPE=DRIVER +TARGETPATH=obj +SOURCES= fdc.c fdo.c pdo.c +MSC_WARNING_LEVEL=/W3 /WX diff --git a/drivers/storage/fdc/fdc/fdc.rbuild b/drivers/storage/fdc/fdc/fdc.rbuild new file mode 100644 index 00000000000..5a63730dc45 --- /dev/null +++ b/drivers/storage/fdc/fdc/fdc.rbuild @@ -0,0 +1,12 @@ + + + + + . + ntoskrnl + hal + fdc.c + fdo.c + pdo.c + fdc.rc + diff --git a/drivers/storage/floppy/floppy.c b/drivers/storage/floppy/floppy.c index 24e74400e0a..dd4bc70deff 100644 --- a/drivers/storage/floppy/floppy.c +++ b/drivers/storage/floppy/floppy.c @@ -1189,7 +1189,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) return STATUS_INSUFFICIENT_RESOURCES; } - if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, NULL, KernelMode, &QueueThreadObject, NULL) != STATUS_SUCCESS) + if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, PsThreadType, KernelMode, &QueueThreadObject, NULL) != STATUS_SUCCESS) { WARN_(FLOPPY, "Unable to reference returned thread handle; failing init\n"); return STATUS_UNSUCCESSFUL; diff --git a/drivers/storage/floppy/ioctl.c b/drivers/storage/floppy/ioctl.c index d172a4dfab3..7c1615c2376 100644 --- a/drivers/storage/floppy/ioctl.c +++ b/drivers/storage/floppy/ioctl.c @@ -126,7 +126,7 @@ DeviceIoctlPassive(PDRIVE_INFO DriveInfo, PIRP Irp) * Therefore if we see one below in the switch, we can return STATUS_SUCCESS * immediately. */ - if(DriveInfo->DeviceObject->Flags & DO_VERIFY_VOLUME && !(DriveInfo->DeviceObject->Flags & SL_OVERRIDE_VERIFY_VOLUME)) + if(DriveInfo->DeviceObject->Flags & DO_VERIFY_VOLUME && !(Stack->Flags & SL_OVERRIDE_VERIFY_VOLUME)) { INFO_(FLOPPY, "DeviceIoctl(): completing with STATUS_VERIFY_REQUIRED\n"); Irp->IoStatus.Status = STATUS_VERIFY_REQUIRED; diff --git a/drivers/storage/floppy/readwrite.c b/drivers/storage/floppy/readwrite.c index 49030d3c14d..e29d325cbba 100644 --- a/drivers/storage/floppy/readwrite.c +++ b/drivers/storage/floppy/readwrite.c @@ -454,7 +454,7 @@ ReadWritePassive(PDRIVE_INFO DriveInfo, PIRP Irp) * Check to see if the volume needs to be verified. If so, * we can get out of here quickly. */ - if(DeviceObject->Flags & DO_VERIFY_VOLUME && !(DeviceObject->Flags & SL_OVERRIDE_VERIFY_VOLUME)) + if(DeviceObject->Flags & DO_VERIFY_VOLUME && !(Stack->Flags & SL_OVERRIDE_VERIFY_VOLUME)) { INFO_(FLOPPY, "ReadWritePassive(): DO_VERIFY_VOLUME set; Completing with STATUS_VERIFY_REQUIRED\n"); Irp->IoStatus.Status = STATUS_VERIFY_REQUIRED; diff --git a/drivers/storage/ide/pciide/CMakeLists.txt b/drivers/storage/ide/pciide/CMakeLists.txt index 064c861fc24..89efccdf7c4 100644 --- a/drivers/storage/ide/pciide/CMakeLists.txt +++ b/drivers/storage/ide/pciide/CMakeLists.txt @@ -4,4 +4,4 @@ add_library(pciide SHARED pciide.c pciide.rc) set_module_type(pciide kernelmodedriver) add_importlibs(pciide pciidex ntoskrnl) -add_cd_file(TARGET pciide DESTINATION reactos/system32/drivers FOR all) +add_cd_file(TARGET pciide DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/storage/ide/pciidex/CMakeLists.txt b/drivers/storage/ide/pciidex/CMakeLists.txt index c81b63163c6..c3365ce51b9 100644 --- a/drivers/storage/ide/pciidex/CMakeLists.txt +++ b/drivers/storage/ide/pciidex/CMakeLists.txt @@ -15,5 +15,5 @@ add_library(pciidex SHARED ${SOURCE}) set_module_type(pciidex kernelmodedriver) add_importlibs(pciidex ntoskrnl) -add_cd_file(TARGET pciidex DESTINATION reactos/system32/drivers FOR all) +add_cd_file(TARGET pciidex DESTINATION reactos/system32/drivers NO_CAB FOR all) add_importlib_target(pciidex.spec) diff --git a/drivers/storage/ide/pciidex/fdo.c b/drivers/storage/ide/pciidex/fdo.c index ff140e1d19e..497842fd09e 100644 --- a/drivers/storage/ide/pciidex/fdo.c +++ b/drivers/storage/ide/pciidex/fdo.c @@ -402,7 +402,7 @@ PciIdeXFdoPnpDispatch( { ULONG MinorFunction; PIO_STACK_LOCATION Stack; - ULONG_PTR Information = 0; + ULONG_PTR Information = Irp->IoStatus.Information; NTSTATUS Status; Stack = IoGetCurrentIrpStackLocation(Irp); @@ -419,6 +419,12 @@ PciIdeXFdoPnpDispatch( Status = PciIdeXFdoStartDevice(DeviceObject, Irp); break; } + case IRP_MN_QUERY_REMOVE_DEVICE: /* 0x01 */ + { + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE\n"); + Status = STATUS_UNSUCCESSFUL; + break; + } case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */ { switch (Stack->Parameters.QueryDeviceRelations.Type) @@ -441,6 +447,13 @@ PciIdeXFdoPnpDispatch( } break; } + case IRP_MN_QUERY_PNP_DEVICE_STATE: /* 0x14 */ + { + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_PNP_DEVICE_STATE\n"); + Information |= PNP_DEVICE_NOT_DISABLEABLE; + Status = STATUS_SUCCESS; + break; + } case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* 0x0d */ { DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"); diff --git a/drivers/storage/ide/pciidex/miniport.c b/drivers/storage/ide/pciidex/miniport.c index a2ffc84302d..1eed359de9a 100644 --- a/drivers/storage/ide/pciidex/miniport.c +++ b/drivers/storage/ide/pciidex/miniport.c @@ -34,7 +34,6 @@ PciIdeXForwardOrIgnore( else { DPRINT1("PDO stub for major function 0x%lx\n", MajorFunction); - ASSERT(FALSE); Status = STATUS_NOT_SUPPORTED; } Irp->IoStatus.Information = 0; diff --git a/drivers/storage/ide/pciidex/pdo.c b/drivers/storage/ide/pciidex/pdo.c index c580077a78c..f79b00a5315 100644 --- a/drivers/storage/ide/pciidex/pdo.c +++ b/drivers/storage/ide/pciidex/pdo.c @@ -360,7 +360,7 @@ PciIdeXPdoPnpDispatch( { ULONG MinorFunction; PIO_STACK_LOCATION Stack; - ULONG_PTR Information = 0; + ULONG_PTR Information = Irp->IoStatus.Information; NTSTATUS Status; Stack = IoGetCurrentIrpStackLocation(Irp); @@ -404,6 +404,12 @@ PciIdeXPdoPnpDispatch( Status = STATUS_SUCCESS; break; } + case IRP_MN_QUERY_REMOVE_DEVICE: /* 0x01 */ + { + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE\n"); + Status = STATUS_UNSUCCESSFUL; + break; + } case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */ { switch (Stack->Parameters.QueryDeviceRelations.Type) @@ -441,7 +447,7 @@ PciIdeXPdoPnpDispatch( DeviceCapabilities->DockDevice = FALSE; DeviceCapabilities->UniqueID = FALSE; DeviceCapabilities->SilentInstall = FALSE; - DeviceCapabilities->RawDeviceOK = TRUE; + DeviceCapabilities->RawDeviceOK = FALSE; DeviceCapabilities->SurpriseRemovalOK = TRUE; DeviceCapabilities->HardwareDisabled = FALSE; /* FIXME */ //DeviceCapabilities->NoDisplayInUI = FALSE; /* FIXME */ @@ -485,6 +491,13 @@ PciIdeXPdoPnpDispatch( Status = PciIdeXPdoQueryId(DeviceObject, Irp, &Information); break; } + case IRP_MN_QUERY_PNP_DEVICE_STATE: /* 0x14 */ + { + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_PNP_DEVICE_STATE\n"); + Information |= PNP_DEVICE_NOT_DISABLEABLE; + Status = STATUS_SUCCESS; + break; + } case IRP_MN_QUERY_BUS_INFORMATION: /* 0x15 */ { PPNP_BUS_INFORMATION BusInfo; diff --git a/drivers/storage/ide/uniata/CMakeLists.txt b/drivers/storage/ide/uniata/CMakeLists.txt index 8052d7f0035..e5efe908570 100644 --- a/drivers/storage/ide/uniata/CMakeLists.txt +++ b/drivers/storage/ide/uniata/CMakeLists.txt @@ -1,6 +1,8 @@ include_directories(inc) +#add_definitions(-D_DEBUG) + set_cpp() set_rc_compiler() diff --git a/drivers/storage/ide/uniata/atapi.h b/drivers/storage/ide/uniata/atapi.h index 1252df9209b..e8cbffa012b 100644 --- a/drivers/storage/ide/uniata/atapi.h +++ b/drivers/storage/ide/uniata/atapi.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2002-2005 Alexandr A. Telyatnikov (Alter) +Copyright (c) 2002-2011 Alexandr A. Telyatnikov (Alter) Module Name: atapi.h @@ -66,7 +66,7 @@ extern "C" { #endif #ifdef USE_DBGPRINT_LOGGER -#include "inc\PostDbgMesg.h" +#include "inc/PostDbgMesg.h" #define DbgPrint DbgDump_Printf #define Connect_DbgPrint() {DbgDump_SetAutoReconnect(TRUE); DbgDump_Reconnect();} #else // USE_DBGPRINT_LOGGER @@ -92,14 +92,16 @@ ScsiDebugPrint( #else // SCSI_PORT_DBG_PRINT -//#ifndef USE_DBGPRINT_LOGGER -//ULONG -//_cdecl -//DbgPrint( -// PCH Format, -// ... -// ); -//#endif // USE_DBGPRINT_LOGGER +#ifndef USE_DBGPRINT_LOGGER +/* +ULONG +_cdecl +DbgPrint( + PCH Format, + ... + ); +*/ +#endif // USE_DBGPRINT_LOGGER #define PRINT_PREFIX @@ -243,8 +245,8 @@ typedef struct _IDE_REGISTERS_2 { #define DFLAGS_DWORDIO_ENABLED 0x0400 // Indicates that we should use 32-bit IO #define DFLAGS_WCACHE_ENABLED 0x0800 // Indicates that we use write cache #define DFLAGS_RCACHE_ENABLED 0x1000 // Indicates that we use read cache -#define DFLAGS_ORIG_GEOMETRY 0x2000 // -#define DFLAGS_REINIT_DMA 0x4000 // +#define DFLAGS_ORIG_GEOMETRY 0x2000 // +#define DFLAGS_REINIT_DMA 0x4000 // #define DFLAGS_HIDDEN 0x8000 // Hidden device, available only with special IOCTLs // via communication virtual device //#define DFLAGS_ 0x10000 // @@ -346,18 +348,20 @@ typedef struct _MODE_PARAMETER_HEADER_10 { #define IDE_COMMAND_DOOR_UNLOCK 0xDF #define IDE_COMMAND_STANDBY_IMMED 0xE0 // flush and spin down #define IDE_COMMAND_STANDBY 0xE2 // flush and spin down and enable autopowerdown timer +#define IDE_COMMAND_READ_PM 0xE4 // SATA PM #define IDE_COMMAND_SLEEP 0xE6 // flush, spin down and deactivate interface #define IDE_COMMAND_FLUSH_CACHE 0xE7 +#define IDE_COMMAND_WRITE_PM 0xE8 // SATA PM #define IDE_COMMAND_IDENTIFY 0xEC #define IDE_COMMAND_MEDIA_EJECT 0xED #define IDE_COMMAND_FLUSH_CACHE48 0xEA #define IDE_COMMAND_ENABLE_MEDIA_STATUS 0xEF -#define IDE_COMMAND_SET_FEATURES 0xEF /* features command, +#define IDE_COMMAND_SET_FEATURES 0xEF /* features command, IDE_COMMAND_ENABLE_MEDIA_STATUS */ #define IDE_COMMAND_READ_NATIVE_SIZE 0xF8 #define IDE_COMMAND_SET_NATIVE_SIZE 0xF9 -#define SCSIOP_ATA_PASSTHROUGH 0xCC // +#define SCSIOP_ATA_PASSTHROUGH 0xCC // // // IDE status definitions @@ -569,7 +573,7 @@ typedef struct _IDENTIFY_DATA { USHORT DoubleWordIo; // 60 48 USHORT Reserved62_0:8; // 62 49 - USHORT SupportDma:1; + USHORT SupportDma:1; USHORT SupportLba:1; USHORT DisableIordy:1; USHORT SupportIordy:1; @@ -587,11 +591,11 @@ typedef struct _IDENTIFY_DATA { #define IDENTIFY_CAPABILITIES_SUPPORT_QTAG 0x4000 #define IDENTIFY_CAPABILITIES_SUPPORT_IDMA 0x8000*/ - USHORT DeviceStandbyMin:1; // 64 50 + USHORT DeviceStandbyMin:1; // 64 50 USHORT Reserved50_1:13; USHORT DeviceCapability1:1; USHORT DeviceCapability0:1; -// USHORT Reserved2; +// USHORT Reserved2; UCHAR Vendor51; // 66 51 UCHAR PioCycleTimingMode; // 67 @@ -644,6 +648,7 @@ typedef struct _IDENTIFY_DATA { USHORT SataCapabilities; // 76 #define ATA_SATA_GEN1 0x0002 #define ATA_SATA_GEN2 0x0004 +#define ATA_SATA_GEN3 0x0008 #define ATA_SUPPORT_NCQ 0x0100 #define ATA_SUPPORT_IFPWRMNGTRCV 0x0200 @@ -678,12 +683,12 @@ typedef struct _IDENTIFY_DATA { USHORT Reserved_82_15:1; USHORT Microcode:1; // 83/86 - USHORT Queued:1; // - USHORT CFA:1; // - USHORT APM:1; // - USHORT Notify:1; // - USHORT Standby:1; // - USHORT Spinup:1; // + USHORT Queued:1; // + USHORT CFA:1; // + USHORT APM:1; // + USHORT Notify:1; // + USHORT Standby:1; // + USHORT Spinup:1; // USHORT Reserver_83_7:1; USHORT MaxSecurity:1; // USHORT AutoAcoustic:1; // @@ -707,7 +712,7 @@ typedef struct _IDENTIFY_DATA { USHORT UltraDMASupport : 8; // 88 USHORT UltraDMAActive : 8; - + USHORT EraseTime; // 89 USHORT EnhancedEraseTime; // 90 USHORT CurentAPMLevel; // 91 @@ -743,9 +748,9 @@ typedef struct _IDENTIFY_DATA { USHORT Reserved107[10]; // 107-116 ULONG LargeSectorSize; // 117-118 - + USHORT Reserved117[8]; // 119-126 - + USHORT RemovableStatus; // 127 USHORT SecurityStatus; // 128 @@ -775,7 +780,7 @@ typedef struct _IDENTIFY_DATA { UCHAR :1; UCHAR CmdProtocol:2; // 00 00 // USHORT GeneralConfiguration; // 00 - + USHORT NumberOfCylinders; // 02 USHORT Reserved1; // 04 USHORT NumberOfHeads; // 06 @@ -944,29 +949,6 @@ AtapiSoftReset( ULONG DeviceNumber ); -/*#define IdeHardReset(BaseIoAddress,result) \ -{\ - UCHAR statusByte;\ - ULONG i;\ - SelectDrive(BaseIoAddress,DeviceNumber); \ - AtapiWritePort1(&BaseIoAddress->AltStatus,IDE_DC_DISABLE_INTERRUPTS | IDE_DC_RESET_CONTROLLER );\ - ScsiPortStallExecution(50 * 1000);\ - AtapiWritePort1(&BaseIoAddress->AltStatus,IDE_DC_REENABLE_CONTROLLER);\ - // 5 seconds for reset \ - for (i = 0; i < 1000 * (1+11); i++) {\ - statusByte = AtapiReadPort1(&BaseIoAddress->AltStatus);\ - if (statusByte != IDE_STATUS_IDLE && statusByte != IDE_STATUS_SUCCESS) {\ - ScsiPortStallExecution((i<1000) ? 5 : 500);\ - } else {\ - break;\ - }\ - }\ - KdPrint2((PRINT_PREFIX "IdeHardReset: Status %x\n", statusByte)); \ - if (i == 1000*1000) {\ - result = FALSE;\ - }\ - result = TRUE;\ -}*/ #endif //USER_MODE @@ -1045,6 +1027,17 @@ AtapiInterrupt__( IN UCHAR c ); +UCHAR +NTAPI +AtapiCheckInterrupt__( + IN PVOID HwDeviceExtension, + IN UCHAR c + ); + +#define INTERRUPT_REASON_IGNORE 0 +#define INTERRUPT_REASON_OUR 1 +#define INTERRUPT_REASON_UNEXPECTED 2 + BOOLEAN NTAPI AtapiHwInitialize( @@ -1061,9 +1054,10 @@ IdeBuildSenseBuffer( VOID NTAPI IdeMediaStatus( - IN BOOLEAN EnableMSN, + BOOLEAN EnableMSN, IN PVOID HwDeviceExtension, - IN UCHAR Channel + IN ULONG lChannel, + IN ULONG DeviceNumber ); ULONG NTAPI @@ -1325,6 +1319,14 @@ UniataAnybodyHome( extern UCHAR AtaCommands48[256]; extern UCHAR AtaCommandFlags[256]; +/* + We need LBA48 when requested LBA or BlockCount are too large. + But for LBA-based commands we have *special* limitation +*/ +#define UniAta_need_lba48(command, lba, count, supp48) \ + ( ((AtaCommandFlags[command] & ATA_CMD_FLAG_LBAIOsupp) && (supp48) && (((lba+count) >= ATA_MAX_IOLBA28) || (count > 256)) ) || \ + (lba > ATA_MAX_LBA28) || (count > 255) ) + #ifdef _DEBUG #define PrintNtConsole _PrintNtConsole #else //_DEBUG diff --git a/drivers/storage/ide/uniata/badblock.h b/drivers/storage/ide/uniata/badblock.h index 5fa4bbb3b60..4e7183cb452 100644 --- a/drivers/storage/ide/uniata/badblock.h +++ b/drivers/storage/ide/uniata/badblock.h @@ -78,4 +78,4 @@ CheckIfBadBlock( IN ULONG count ); -#endif // _BADBLOCK_H_INCLUDED_ +#endif // _BADBLOCK_H_INCLUDED_ \ No newline at end of file diff --git a/drivers/storage/ide/uniata/bm_devs.h b/drivers/storage/ide/uniata/bm_devs.h index 672b22ae7fd..4eec3767a80 100644 --- a/drivers/storage/ide/uniata/bm_devs.h +++ b/drivers/storage/ide/uniata/bm_devs.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2002-2010 Alexandr A. Telyatnikov (Alter) +Copyright (c) 2002-2011 Alexandr A. Telyatnikov (Alter) Module Name: bm_devs.h @@ -245,11 +245,12 @@ typedef struct _BUSMASTER_CONTROLLER_INFORMATION { #define ATA_I82801JD_AH 0x3a028086 #define ATA_I82801JD_R1 0x3a058086 #define ATA_I82801JD_S2 0x3a068086 +/* #define ATA_I82801JI_S1 0x3a208086 #define ATA_I82801JI_AH 0x3a228086 #define ATA_I82801JI_R1 0x3a258086 #define ATA_I82801JI_S2 0x3a268086 - +*/ #define ATA_5Series_S1 0x3b208086 #define ATA_5Series_S2 0x3b218086 #define ATA_5Series_AH1 0x3b228086 @@ -554,7 +555,10 @@ typedef struct _BUSMASTER_CONTROLLER_INFORMATION { #define ATA_VIACX700 0x83241106 #define ATA_VIASATAIDE 0x53241106 #define ATA_VIAVX800 0x83531106 +#define ATA_VIASATAIDE2 0xc4091106 #define ATA_VIAVX855 0x84091106 +#define ATA_VIASATAIDE3 0x90011106 +#define ATA_VIAVX900 0x84101106 #define ATA_ITE_ID 0x1283 #define ATA_IT8172G 0x81721283 @@ -785,20 +789,20 @@ BUSMASTER_CONTROLLER_INFORMATION const BusMasterAdapters[] = { PCI_DEV_HW_SPEC_BM( 2923, 8086, 0x00, ATA_SA300, "Intel ICH9" , UNIATA_SATA | UNIATA_AHCI ), PCI_DEV_HW_SPEC_BM( 2925, 8086, 0x00, ATA_SA300, "Intel ICH9" , UNIATA_SATA | UNIATA_AHCI ), - PCI_DEV_HW_SPEC_BM( 3a20, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH | UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( 3a26, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH2 | UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( 3a22, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), - PCI_DEV_HW_SPEC_BM( 3a25, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), + PCI_DEV_HW_SPEC_BM( 3a20, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH | UNIATA_SATA ), + PCI_DEV_HW_SPEC_BM( 3a26, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH2 | UNIATA_SATA ), + PCI_DEV_HW_SPEC_BM( 3a22, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), + PCI_DEV_HW_SPEC_BM( 3a25, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), - PCI_DEV_HW_SPEC_BM( 3a00, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH | UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( 3a06, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH2 | UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( 3a02, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), - PCI_DEV_HW_SPEC_BM( 3a05, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), + PCI_DEV_HW_SPEC_BM( 3a00, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH | UNIATA_SATA ), + PCI_DEV_HW_SPEC_BM( 3a06, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH2 | UNIATA_SATA ), + PCI_DEV_HW_SPEC_BM( 3a02, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), + PCI_DEV_HW_SPEC_BM( 3a05, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), /* - PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH | UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH2 | UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), - PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), + PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH | UNIATA_SATA ), + PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , I6CH2 | UNIATA_SATA ), + PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), + PCI_DEV_HW_SPEC_BM( ????, 8086, 0x00, ATA_SA300, "Intel ICH10" , UNIATA_SATA | UNIATA_AHCI ), */ PCI_DEV_HW_SPEC_BM( 3b20, 8086, 0x00, ATA_SA300, "Intel 5 Series/3400" , I6CH | UNIATA_SATA ), PCI_DEV_HW_SPEC_BM( 3b21, 8086, 0x00, ATA_SA300, "Intel 5 Series/3400" , I6CH2 | UNIATA_SATA ), @@ -823,16 +827,16 @@ BUSMASTER_CONTROLLER_INFORMATION const BusMasterAdapters[] = { PCI_DEV_HW_SPEC_BM( 1c09, 8086, 0x00, ATA_SA300, "Intel Cougar Point" , I6CH2 | UNIATA_SATA ), // PCI_DEV_HW_SPEC_BM( 3200, 8086, 0x00, ATA_SA150, "Intel 31244" , UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( 3200, 8086, 0x00, ATA_UDMA5, "Intel SCH" , I1CH ), + PCI_DEV_HW_SPEC_BM( 3200, 8086, 0x00, ATA_UDMA5, "Intel SCH" , I1CH ), -/* - PCI_DEV_HW_SPEC_BM( 2360, 197b, 0x00, ATA_SA300, "JMB360" , 0 ), - PCI_DEV_HW_SPEC_BM( 2361, 197b, 0x00, ATA_SA300, "JMB361" , 0 ), - PCI_DEV_HW_SPEC_BM( 2363, 197b, 0x00, ATA_SA300, "JMB363" , 0 ), - PCI_DEV_HW_SPEC_BM( 2365, 197b, 0x00, ATA_SA300, "JMB365" , 0 ), - PCI_DEV_HW_SPEC_BM( 2366, 197b, 0x00, ATA_SA300, "JMB366" , 0 ), + + PCI_DEV_HW_SPEC_BM( 2360, 197b, 0x00, ATA_SA300, "JMB360" , UNIATA_SATA | UNIATA_AHCI ), + + PCI_DEV_HW_SPEC_BM( 2361, 197b, 0x00, ATA_UDMA6, "JMB361" , 0 ), + PCI_DEV_HW_SPEC_BM( 2363, 197b, 0x00, ATA_UDMA6, "JMB363" , 0 ), + PCI_DEV_HW_SPEC_BM( 2365, 197b, 0x00, ATA_UDMA6, "JMB365" , 0 ), + PCI_DEV_HW_SPEC_BM( 2366, 197b, 0x00, ATA_UDMA6, "JMB366" , 0 ), PCI_DEV_HW_SPEC_BM( 2368, 197b, 0x00, ATA_UDMA6, "JMB368" , 0 ), -*/ /* PCI_DEV_HW_SPEC_BM( 5040, 11ab, 0x00, ATA_SA150, "Marvell 88SX5040" , UNIATA_SATA ), PCI_DEV_HW_SPEC_BM( 5041, 11ab, 0x00, ATA_SA150, "Marvell 88SX5041" , UNIATA_SATA ), @@ -1073,5 +1077,11 @@ Ata_is_dev_listed( ((pciData)->BaseClass == PCI_DEV_CLASS_STORAGE && \ (pciData)->SubClass == PCI_DEV_SUBCLASS_IDE) +#define Ata_is_ahci_dev(pciData) \ + ((pciData)->BaseClass == PCI_DEV_CLASS_STORAGE && \ + (pciData)->SubClass == PCI_DEV_SUBCLASS_SATA && \ + (pciData)->ProgIf == PCI_DEV_PROGIF_AHCI_1_0 && \ + ((pciData)->u.type0.BaseAddresses[5] & ~0x7)) + #endif //__IDE_BUSMASTER_H__ diff --git a/drivers/storage/ide/uniata/bsmaster.h b/drivers/storage/ide/uniata/bsmaster.h index 0626b2c590b..ada2205aa1f 100644 --- a/drivers/storage/ide/uniata/bsmaster.h +++ b/drivers/storage/ide/uniata/bsmaster.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2002-2010 Alexandr A. Telyatnikov (Alter) +Copyright (c) 2002-2011 Alexandr A. Telyatnikov (Alter) Module Name: bsmaster.h @@ -83,6 +83,9 @@ Revision History: #define ATA_ALTIOSIZE 0x01 /* alternate registers size */ #define ATA_BMIOSIZE 0x20 #define ATA_PC98_BANKIOSIZE 0x01 +//#define ATA_MAX_LBA28 DEF_U64(0x0fffffff) +// Hitachi 1 Tb HDD didn't allow LBA28 with BCount > 1 beyond this LBA +#define ATA_MAX_IOLBA28 DEF_U64(0x0fffff80) #define ATA_MAX_LBA28 DEF_U64(0x0fffffff) #define ATA_DMA_ENTRIES 256 /* PAGESIZE/2/sizeof(BM_DMA_ENTRY)*/ @@ -109,6 +112,8 @@ typedef struct _BUSMASTER_CTX { #define PCI_DEV_SUBCLASS_ATA 0x05 #define PCI_DEV_SUBCLASS_SATA 0x06 +#define PCI_DEV_PROGIF_AHCI_1_0 0x01 + /* structure for holding DMA address data */ typedef struct BM_DMA_ENTRY { ULONG base; @@ -180,7 +185,11 @@ typedef struct _IDE_AHCI_REGISTERS { } CAP; #define AHCI_CAP_NOP_MASK 0x0000001f -#define AHCI_CAP_SPM 0x00010000 +#define AHCI_CAP_NCS_MASK 0x00001f00 +#define AHCI_CAP_PMD 0x00008000 +#define AHCI_CAP_SPM 0x00020000 +#define AHCI_CAP_SAM 0x00040000 +#define AHCI_CAP_SCLO 0x01000000 #define AHCI_CAP_S64A 0x80000000 // Global HBA Control @@ -231,6 +240,7 @@ typedef union _SATA_SSTATUS_REG { #define SStatus_SPD_NoDev 0x00 #define SStatus_SPD_Gen1 0x01 #define SStatus_SPD_Gen2 0x02 +#define SStatus_SPD_Gen3 0x03 ULONG IPM:4; // Interface Power Management @@ -261,6 +271,7 @@ typedef union _SATA_SCONTROL_REG { #define SControl_SPD_NoRestrict 0x00 #define SControl_SPD_LimGen1 0x01 #define SControl_SPD_LimGen2 0x02 +#define SControl_SPD_LimGen3 0x03 ULONG IPM:4; // Interface Power Management Transitions Allowed @@ -387,15 +398,37 @@ typedef union _AHCI_IS_REG { ULONG Reg; } AHCI_IS_REG, *PAHCI_IS_REG; +#define ATA_AHCI_P_IX_DHR 0x00000001 +#define ATA_AHCI_P_IX_PS 0x00000002 +#define ATA_AHCI_P_IX_DS 0x00000004 +#define ATA_AHCI_P_IX_SDB 0x00000008 +#define ATA_AHCI_P_IX_UF 0x00000010 +#define ATA_AHCI_P_IX_DP 0x00000020 +#define ATA_AHCI_P_IX_PC 0x00000040 +#define ATA_AHCI_P_IX_DI 0x00000080 + +#define ATA_AHCI_P_IX_PRC 0x00400000 +#define ATA_AHCI_P_IX_IPM 0x00800000 +#define ATA_AHCI_P_IX_OF 0x01000000 +#define ATA_AHCI_P_IX_INF 0x04000000 +#define ATA_AHCI_P_IX_IF 0x08000000 +#define ATA_AHCI_P_IX_HBD 0x10000000 +#define ATA_AHCI_P_IX_HBF 0x20000000 +#define ATA_AHCI_P_IX_TFE 0x40000000 +#define ATA_AHCI_P_IX_CPD 0x80000000 + +#define AHCI_CLB_ALIGNEMENT_MASK ((ULONGLONG)(1024-1)) +#define AHCI_FIS_ALIGNEMENT_MASK ((ULONGLONG)(256-1)) +#define AHCI_CMD_ALIGNEMENT_MASK ((ULONGLONG)(128-1)) typedef struct _IDE_AHCI_PORT_REGISTERS { union { struct { - ULONG CLB; // command list base address + ULONG CLB; // command list base address, 1K-aligned ULONG CLBU; // command list base address (upper 32bits) }; ULONGLONG CLB64; - }; + }; // 0x100 + 0x80*c + 0x0000 union { struct { @@ -403,12 +436,12 @@ typedef struct _IDE_AHCI_PORT_REGISTERS { ULONG FBU; // FIS base address (upper 32bits) }; ULONGLONG FB64; - }; + }; // 0x100 + 0x80*c + 0x0008 union { ULONG IS_Reg; // interrupt status AHCI_IS_REG IS; - }; + }; // 0x100 + 0x80*c + 0x0010 union { ULONG Reg; // interrupt enable @@ -434,7 +467,7 @@ typedef struct _IDE_AHCI_PORT_REGISTERS { ULONG TFEE:1;// Task File Error Enable ULONG CPDE:1;// Cold Port Detect Enable }; - } IE; + } IE; // 0x100 + 0x80*c + 0x0014 union { ULONG Reg; // command register @@ -472,7 +505,7 @@ typedef struct _IDE_AHCI_PORT_REGISTERS { #define SATA_CMD_ICC_Partial 0x02 #define SATA_CMD_ICC_Slumber 0x06 }; - } CMD; + } CMD; // 0x100 + 0x80*c + 0x0018 ULONG Reserved; @@ -489,7 +522,7 @@ typedef struct _IDE_AHCI_PORT_REGISTERS { UCHAR ERR; // Contains the latest copy of the task file error register. UCHAR Reserved[2]; }; - } TFD; + } TFD; // 0x100 + 0x80*c + 0x0020 union { ULONG Reg; // signature @@ -499,24 +532,25 @@ typedef struct _IDE_AHCI_PORT_REGISTERS { UCHAR LbaMid; UCHAR LbaHigh; }; - } SIG; + } SIG; // 0x100 + 0x80*c + 0x0024 union { ULONG SStatus; // SCR0 SATA_SSTATUS_REG SSTS; - }; + }; // 0x100 + 0x80*c + 0x0028 union { ULONG SControl; // SCR2 SATA_SCONTROL_REG SCTL; - }; + }; // 0x100 + 0x80*c + 0x002c union { ULONG SError; // SCR1 SATA_SERROR_REG SERR; - }; + }; // 0x100 + 0x80*c + 0x0030 union { ULONG SACT; // SCR3 ULONG SActive; // bitmask - }; - ULONG CI; // Command issue, bitmask + }; // 0x100 + 0x80*c + 0x0034 + + ULONG CI; // Command issue, bitmask, 0x100 + 0x80*c + 0x0038 // AHCI 1.1 union { @@ -525,7 +559,8 @@ typedef struct _IDE_AHCI_PORT_REGISTERS { USHORT PMN; // PM Notify, bitmask USHORT Reserved; }; - } SNTF; + } SNTF; // 0x100 + 0x80*c + 0x003c + ULONG FIS_Switching_Reserved[12]; UCHAR VendorSpec[16]; @@ -534,7 +569,39 @@ typedef struct _IDE_AHCI_PORT_REGISTERS { #define IDX_AHCI_P_CLB (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, CLB)) #define IDX_AHCI_P_FB (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, FB)) #define IDX_AHCI_P_IS (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, IS)) +#define IDX_AHCI_P_IE (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, IE)) #define IDX_AHCI_P_CI (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, CI)) +#define IDX_AHCI_P_TFD (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, TFD)) +#define IDX_AHCI_P_SIG (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SIG)) +#define IDX_AHCI_P_CMD (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, CMD)) + +#define IDX_AHCI_P_SNTF (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SNTF)) + +// AHCI commands ( -> IDX_AHCI_P_CMD) +#define ATA_AHCI_P_CMD_ST 0x00000001 +#define ATA_AHCI_P_CMD_SUD 0x00000002 +#define ATA_AHCI_P_CMD_POD 0x00000004 +#define ATA_AHCI_P_CMD_CLO 0x00000008 +#define ATA_AHCI_P_CMD_FRE 0x00000010 +#define ATA_AHCI_P_CMD_CCS_MASK 0x00001f00 +#define ATA_AHCI_P_CMD_ISS 0x00002000 +#define ATA_AHCI_P_CMD_FR 0x00004000 +#define ATA_AHCI_P_CMD_CR 0x00008000 +#define ATA_AHCI_P_CMD_CPS 0x00010000 +#define ATA_AHCI_P_CMD_PMA 0x00020000 +#define ATA_AHCI_P_CMD_HPCP 0x00040000 +#define ATA_AHCI_P_CMD_ISP 0x00080000 +#define ATA_AHCI_P_CMD_CPD 0x00100000 +#define ATA_AHCI_P_CMD_ATAPI 0x01000000 +#define ATA_AHCI_P_CMD_DLAE 0x02000000 +#define ATA_AHCI_P_CMD_ALPE 0x04000000 +#define ATA_AHCI_P_CMD_ASP 0x08000000 +#define ATA_AHCI_P_CMD_ICC_MASK 0xf0000000 +#define ATA_AHCI_P_CMD_NOOP 0x00000000 +#define ATA_AHCI_P_CMD_ACTIVE 0x10000000 +#define ATA_AHCI_P_CMD_PARTIAL 0x20000000 +#define ATA_AHCI_P_CMD_SLUMBER 0x60000000 + typedef struct _IDE_AHCI_PRD_ENTRY { union { @@ -559,21 +626,42 @@ typedef struct _IDE_AHCI_PRD_ENTRY { #define ATA_AHCI_DMA_ENTRIES (PAGE_SIZE/2/sizeof(IDE_AHCI_PRD_ENTRY)) /* 128 */ #define ATA_AHCI_MAX_TAGS 32 +#define AHCI_FIS_TYPE_ATA_H2D 0x27 +#define AHCI_FIS_TYPE_ATA_D2H 0x34 + +#define AHCI_FIS_COMM_PM (0x80 | AHCI_DEV_SEL_PM) + +#define AHCI_DEV_SEL_1 0x00 +#define AHCI_DEV_SEL_2 0x01 +#define AHCI_DEV_SEL_PM 0x0f + +/* 128-byte aligned */ typedef struct _IDE_AHCI_CMD { UCHAR cfis[64]; UCHAR acmd[32]; UCHAR Reserved[32]; - IDE_AHCI_PRD_ENTRY prd_tab[ATA_AHCI_DMA_ENTRIES]; + IDE_AHCI_PRD_ENTRY prd_tab[ATA_AHCI_DMA_ENTRIES]; // also 128-byte aligned } IDE_AHCI_CMD, *PIDE_AHCI_CMD; + +/* cmd_flags */ +#define ATA_AHCI_CMD_ATAPI 0x0020 +#define ATA_AHCI_CMD_WRITE 0x0040 +#define ATA_AHCI_CMD_PREFETCH 0x0080 +#define ATA_AHCI_CMD_RESET 0x0100 +#define ATA_AHCI_CMD_BIST 0x0200 +#define ATA_AHCI_CMD_CLR_BUSY 0x0400 + +/* 128-byte aligned */ typedef struct _IDE_AHCI_CMD_LIST { USHORT cmd_flags; USHORT prd_length; /* PRD entries */ ULONG bytecount; - ULONGLONG cmd_table_phys; /* 128byte aligned */ + ULONGLONG cmd_table_phys; /* points to IDE_AHCI_CMD */ ULONG Reserved[4]; } IDE_AHCI_CMD_LIST, *PIDE_AHCI_CMD_LIST; +/* 256-byte aligned */ typedef struct _IDE_AHCI_RCV_FIS { UCHAR dsfis[28]; UCHAR Reserved1[4]; @@ -586,6 +674,13 @@ typedef struct _IDE_AHCI_RCV_FIS { UCHAR Reserved4[96]; } IDE_AHCI_RCV_FIS, *PIDE_AHCI_RCV_FIS; +/* 1K-byte aligned */ +typedef struct _IDE_AHCI_CHANNEL_CTL_BLOCK { + IDE_AHCI_CMD_LIST cmd_list[ATA_AHCI_MAX_TAGS]; // 1K-size (32*32) + IDE_AHCI_RCV_FIS rcv_fis; + IDE_AHCI_CMD cmd; // for single internal comamnds w/o associated AtaReq +} IDE_AHCI_CHANNEL_CTL_BLOCK, *PIDE_AHCI_CHANNEL_CTL_BLOCK; + #define IsBusMaster(pciData) \ ( ((pciData)->Command & (PCI_ENABLE_BUS_MASTER/* | PCI_ENABLE_IO_SPACE*/)) == \ @@ -608,41 +703,54 @@ typedef union _ATA_REQ { // ULONG reqId; // serial struct { - union { + //union { - struct { - union _ATA_REQ* next_req; - union _ATA_REQ* prev_req; + struct { + union _ATA_REQ* next_req; + union _ATA_REQ* prev_req; - PSCSI_REQUEST_BLOCK Srb; // Current request on controller. + PSCSI_REQUEST_BLOCK Srb; // Current request on controller. - PUSHORT DataBuffer; // Data buffer pointer. - ULONG WordsLeft; // Data words left. - ULONG TransferLength; // Originally requested transfer length - LONGLONG lba; - ULONG WordsTransfered;// Data words already transfered. - ULONG bcount; + PUSHORT DataBuffer; // Data buffer pointer. + ULONG WordsLeft; // Data words left. + ULONG TransferLength; // Originally requested transfer length + LONGLONG lba; + ULONG WordsTransfered;// Data words already transfered. + ULONG bcount; - UCHAR retry; - UCHAR ttl; - // UCHAR tag; - UCHAR Flags; - UCHAR ReqState; + UCHAR retry; + UCHAR ttl; + // UCHAR tag; + UCHAR Flags; + UCHAR ReqState; - PSCSI_REQUEST_BLOCK OriginalSrb; // Mechanism Status Srb Data + PSCSI_REQUEST_BLOCK OriginalSrb; // Mechanism Status Srb Data - ULONG dma_entries; - union { + ULONG dma_entries; + union { + // for ATA + struct { ULONG dma_base; - ULONGLONG ahci_base64; // for AHCI - }; + ULONG dma_baseu; + } ata; + // for AHCI + struct { + ULONGLONG ahci_base64; + ULONGLONG in_lba; + PIDE_AHCI_CMD ahci_cmd_ptr; + ULONG in_bcount; + ULONG in_status; + USHORT io_cmd_flags; // out + + } ahci; }; - UCHAR padding_128b[128]; }; + //UCHAR padding_128b[128]; // Note: we assume, NT allocates block > 4k as PAGE-aligned + //}; struct { union { BM_DMA_ENTRY dma_tab[ATA_DMA_ENTRIES]; - IDE_AHCI_CMD ahci_cmd; // for AHCI + IDE_AHCI_CMD ahci_cmd0; // for AHCI, 128-byte aligned }; }; }; @@ -660,6 +768,7 @@ typedef union _ATA_REQ { #define REQ_FLAG_FORCE_DOWNRATE_LBA48 0x10 #define REQ_FLAG_DMA_DBUF 0x20 #define REQ_FLAG_DMA_DBUF_PRD 0x40 +#define REQ_FLAG_LBA48 0x80 // Request states #define REQ_STATE_NONE 0x00 @@ -810,10 +919,12 @@ typedef struct _HW_CHANNEL { PUCHAR DmaBuffer; // - PIDE_AHCI_CMD_LIST AHCI_CL; - ULONGLONG AHCI_CL_PhAddr; - PVOID AHCI_FIS; // is not actually used by UniATA now, but is required by AHCI controller - ULONGLONG AHCI_FIS_PhAddr; + PIDE_AHCI_CHANNEL_CTL_BLOCK AhciCtlBlock0; // unaligned + PIDE_AHCI_CHANNEL_CTL_BLOCK AhciCtlBlock; // 128-byte aligned + ULONGLONG AHCI_CTL_PhAddr; + IORES BaseIoAHCI_Port; + //PVOID AHCI_FIS; // is not actually used by UniATA now, but is required by AHCI controller + //ULONGLONG AHCI_FIS_PhAddr; // Note: in contrast to FBSD, we keep PRD and CMD item in AtaReq structure #ifdef QUEUE_STATISTICS @@ -841,6 +952,8 @@ typedef struct _HW_CHANNEL { #define CTRFLAGS_DSC_BSY 0x0080 #define CTRFLAGS_NO_SLAVE 0x0100 //#define CTRFLAGS_PATA 0x0200 +#define CTRFLAGS_AHCI_PM 0x0400 +#define CTRFLAGS_AHCI_PM2 0x0800 #define CTRFLAGS_PERMANENT (CTRFLAGS_DMA_RO | CTRFLAGS_NO_SLAVE) @@ -904,18 +1017,22 @@ typedef struct _HW_LU_EXTENSION { // Controller-specific LUN options union { /* for tricky controllers, those can change Logical-to-Physical LUN mapping. + mainly for mapping SATA ports to compatible PATA registers Treated as PHYSICAL port number, regardless of logical mapping. */ ULONG SATA_lun_map; }; struct _HW_DEVICE_EXTENSION* DeviceExtension; + struct _HW_CHANNEL* chan; + ULONG Lun; #ifdef IO_STATISTICS LONGLONG ModeErrorCount[MAX_RETRIES]; LONGLONG RecoverCount[MAX_RETRIES]; LONGLONG IoCount; + LONGLONG BlockIoCount; #endif//IO_STATISTICS } HW_LU_EXTENSION, *PHW_LU_EXTENSION; @@ -1007,6 +1124,7 @@ typedef struct _HW_DEVICE_EXTENSION { IORES BaseIoAHCI_0; //PIDE_AHCI_PORT_REGISTERS BaseIoAHCIPort[AHCI_MAX_PORT]; + ULONG AHCI_CAP; BOOLEAN opt_AtapiDmaZeroTransfer; // default FALSE BOOLEAN opt_AtapiDmaControlCmd; // default FALSE @@ -1201,7 +1319,7 @@ extern VOID NTAPI AtapiDmaReinit( IN PHW_DEVICE_EXTENSION deviceExtension, - IN ULONG ldev, + IN PHW_LU_EXTENSION LunExt, IN PATA_REQ AtaReq ); @@ -1209,7 +1327,7 @@ extern VOID NTAPI AtapiDmaInit__( IN PHW_DEVICE_EXTENSION deviceExtension, - IN ULONG ldev + IN PHW_LU_EXTENSION LunExt ); extern VOID @@ -1218,7 +1336,7 @@ AtapiDmaInit( IN PVOID HwDeviceExtension, IN ULONG DeviceNumber, IN ULONG lChannel, // logical channel, - // is always 0 except simplex-only controllers + // is always 0 except simplex-only and multi-channel controllers IN SCHAR apiomode, IN SCHAR wdmamode, IN SCHAR udmamode @@ -1376,7 +1494,7 @@ VOID DDKFASTAPI AtapiWritePort4( IN PHW_CHANNEL chan, - IN ULONG_PTR port, + IN ULONGIO_PTR port, IN ULONG data ); @@ -1384,7 +1502,7 @@ VOID DDKFASTAPI AtapiWritePort2( IN PHW_CHANNEL chan, - IN ULONG_PTR port, + IN ULONGIO_PTR port, IN USHORT data ); @@ -1392,7 +1510,7 @@ VOID DDKFASTAPI AtapiWritePort1( IN PHW_CHANNEL chan, - IN ULONG_PTR port, + IN ULONGIO_PTR port, IN UCHAR data ); @@ -1400,7 +1518,7 @@ VOID DDKFASTAPI AtapiWritePortEx4( IN PHW_CHANNEL chan, - IN ULONG_PTR port, + IN ULONGIO_PTR port, IN ULONG offs, IN ULONG data ); @@ -1409,7 +1527,7 @@ VOID DDKFASTAPI AtapiWritePortEx1( IN PHW_CHANNEL chan, - IN ULONG_PTR port, + IN ULONGIO_PTR port, IN ULONG offs, IN UCHAR data ); @@ -1418,28 +1536,28 @@ ULONG DDKFASTAPI AtapiReadPort4( IN PHW_CHANNEL chan, - IN ULONG_PTR port + IN ULONGIO_PTR port ); USHORT DDKFASTAPI AtapiReadPort2( IN PHW_CHANNEL chan, - IN ULONG_PTR port + IN ULONGIO_PTR port ); UCHAR DDKFASTAPI AtapiReadPort1( IN PHW_CHANNEL chan, - IN ULONG_PTR port + IN ULONGIO_PTR port ); ULONG DDKFASTAPI AtapiReadPortEx4( IN PHW_CHANNEL chan, - IN ULONG_PTR port, + IN ULONGIO_PTR port, IN ULONG offs ); @@ -1447,7 +1565,7 @@ UCHAR DDKFASTAPI AtapiReadPortEx1( IN PHW_CHANNEL chan, - IN ULONG_PTR port, + IN ULONGIO_PTR port, IN ULONG offs ); @@ -1455,7 +1573,7 @@ VOID DDKFASTAPI AtapiWriteBuffer4( IN PHW_CHANNEL chan, - IN ULONG_PTR _port, + IN ULONGIO_PTR _port, IN PVOID Buffer, IN ULONG Count, IN ULONG Timing @@ -1465,7 +1583,7 @@ VOID DDKFASTAPI AtapiWriteBuffer2( IN PHW_CHANNEL chan, - IN ULONG_PTR _port, + IN ULONGIO_PTR _port, IN PVOID Buffer, IN ULONG Count, IN ULONG Timing @@ -1475,7 +1593,7 @@ VOID DDKFASTAPI AtapiReadBuffer4( IN PHW_CHANNEL chan, - IN ULONG_PTR _port, + IN ULONGIO_PTR _port, IN PVOID Buffer, IN ULONG Count, IN ULONG Timing @@ -1485,7 +1603,7 @@ VOID DDKFASTAPI AtapiReadBuffer2( IN PHW_CHANNEL chan, - IN ULONG_PTR _port, + IN ULONGIO_PTR _port, IN PVOID Buffer, IN ULONG Count, IN ULONG Timing @@ -1496,8 +1614,8 @@ AtapiReadBuffer2( #define GET_LDEV2(P, T, L) (T)*/ #define GET_CHANNEL(Srb) (Srb->PathId) -#define GET_LDEV(Srb) (Srb->TargetId | (Srb->PathId << 1)) -#define GET_LDEV2(P, T, L) (T | ((P)<<1)) +//#define GET_LDEV(Srb) (Srb->TargetId | (Srb->PathId << 1)) +//#define GET_LDEV2(P, T, L) (T | ((P)<<1)) #define GET_CDEV(Srb) (Srb->TargetId) VOID @@ -1536,10 +1654,20 @@ UniataForgetDevice( extern ULONG SkipRaids; extern ULONG ForceSimplex; +extern BOOLEAN g_opt_AtapiDmaRawRead; extern BOOLEAN InDriverEntry; extern BOOLEAN g_opt_Verbose; +extern ULONG g_opt_VirtualMachine; + +#define VM_AUTO 0x00 +#define VM_NONE 0x01 +#define VM_VBOX 0x02 +#define VM_VMWARE 0x03 +#define VM_QEMU 0x04 + +#define VM_MAX_KNOWN VM_QEMU extern BOOLEAN WinVer_WDM_Model; diff --git a/drivers/storage/ide/uniata/config.h b/drivers/storage/ide/uniata/config.h index 17768e42a20..690acd4b0cd 100644 --- a/drivers/storage/ide/uniata/config.h +++ b/drivers/storage/ide/uniata/config.h @@ -87,9 +87,22 @@ /***************************************************/ /* ReactOS-specific defines */ -#ifdef DDKAPI +#ifdef __REACTOS__ #define USE_REACTOS_DDK -#endif //DDKAPI +#endif //__REACTOS__ + +#ifdef USE_REACTOS_DDK + #define ULONGIO_PTR ULONG_PTR + #define CRNT_ILK_TYPE + #define CRNT_ILK_PTYPE + #define REGRTL_STR_PTYPE +#else + #define ULONG_PTR ULONG + #define ULONGIO_PTR ULONG + #define CRNT_ILK_TYPE (PVOID) + #define CRNT_ILK_PTYPE (PVOID*) + #define REGRTL_STR_PTYPE (PWCHAR) +#endif //USE_REACTOS_DDK /* Are we under GNU C (mingw) ??? */ #if __GNUC__ >=3 @@ -116,15 +129,11 @@ #define DEF_I64(x) (x##I64) /* ReactOS-specific defines */ - #ifdef USE_REACTOS_DDK - #else //USE_REACTOS_DDK #define DDKAPI __stdcall #define DDKFASTAPI __fastcall #define DDKCDECLAPI _cdecl - #endif //DDKAPI - #define DECLSPEC_NAKED __declspec(naked) #endif //__GNUC__ diff --git a/drivers/storage/ide/uniata/id_ata.cpp b/drivers/storage/ide/uniata/id_ata.cpp index 07c44253e0e..92defcbc089 100644 --- a/drivers/storage/ide/uniata/id_ata.cpp +++ b/drivers/storage/ide/uniata/id_ata.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2002-2010 Alexandr A. Telyatnikov (Alter) +Copyright (c) 2002-2011 Alexandr A. Telyatnikov (Alter) Module Name: id_ata.cpp @@ -83,6 +83,14 @@ ULONG g_LogToDisplay = 0; ULONG g_WaitBusyInISR = 1; +ULONG g_opt_WaitBusyCount = 200; // 20000 +ULONG g_opt_WaitBusyDelay = 10; // 150 +ULONG g_opt_WaitDrqDelay = 10; // 100 +BOOLEAN g_opt_AtapiSendDisableIntr = 1; // 0 +BOOLEAN g_opt_AtapiDmaRawRead = 1; // 0 + +ULONG g_opt_VirtualMachine = 0; // Auto + BOOLEAN InDriverEntry = TRUE; BOOLEAN g_opt_Verbose = 0; @@ -160,14 +168,6 @@ AtapiAdapterControl( #endif //UNIATA_CORE -BOOLEAN -NTAPI -AtapiCheckInterrupt__( - IN PVOID HwDeviceExtension, - IN UCHAR c - ); - - #ifndef UNIATA_CORE BOOLEAN @@ -240,7 +240,7 @@ VOID \ DDKFASTAPI \ AtapiWritePort##sz( \ IN PHW_CHANNEL chan, \ - IN ULONG_PTR _port, \ + IN ULONGIO_PTR _port, \ IN _type data \ ) \ { \ @@ -274,7 +274,7 @@ VOID \ DDKFASTAPI \ AtapiWritePortEx##sz( \ IN PHW_CHANNEL chan, \ - IN ULONG_PTR _port, \ + IN ULONGIO_PTR _port, \ IN ULONG offs, \ IN _type data \ ) \ @@ -309,7 +309,7 @@ _type \ DDKFASTAPI \ AtapiReadPort##sz( \ IN PHW_CHANNEL chan, \ - IN ULONG_PTR _port \ + IN ULONGIO_PTR _port \ ) \ { \ PIORES res; \ @@ -343,7 +343,7 @@ _type \ DDKFASTAPI \ AtapiReadPortEx##sz( \ IN PHW_CHANNEL chan, \ - IN ULONG_PTR _port, \ + IN ULONGIO_PTR _port, \ IN ULONG offs \ ) \ { \ @@ -377,7 +377,7 @@ VOID \ DDKFASTAPI \ AtapiReadBuffer##sz( \ IN PHW_CHANNEL chan, \ - IN ULONG_PTR _port, \ + IN ULONGIO_PTR _port, \ IN PVOID Buffer, \ IN ULONG Count, \ IN ULONG Timing \ @@ -422,7 +422,7 @@ VOID \ DDKFASTAPI \ AtapiWriteBuffer##sz( \ IN PHW_CHANNEL chan, \ - IN ULONG_PTR _port, \ + IN ULONGIO_PTR _port, \ IN PVOID Buffer, \ IN ULONG Count, \ IN ULONG Timing \ @@ -546,11 +546,11 @@ WaitOnBaseBusy( ) { ULONG i; - UCHAR Status; - for (i=0; i<20000; i++) { + UCHAR Status = 0xff; + for (i=0; iDeviceExtension->HwFlags & UNIATA_AHCI) { + UniataAhciSoftReset(chan->DeviceExtension, chan->lChannel, DeviceNumber); + return; + } + GetBaseStatus(chan, statusByte2); KdPrint2((PRINT_PREFIX " statusByte2 %x:\n", statusByte2)); SelectDrive(chan, DeviceNumber); @@ -757,31 +762,52 @@ AtaCommand48( { PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; UCHAR statusByte; - ULONG ldev = lChannel*2 + DeviceNumber; ULONG i; PUCHAR plba; - KdPrint2((PRINT_PREFIX "AtaCommand48: cntrlr %#x:%#x ldev %#x, cmd %#x, lba %#I64x count %#x feature %#x\n", - deviceExtension->DevIndex, deviceExtension->Channel, ldev, command, lba, count, feature )); + KdPrint2((PRINT_PREFIX "AtaCommand48: cntrlr %#x:%#x dev %#x, cmd %#x, lba %#I64x count %#x feature %#x\n", + deviceExtension->DevIndex, deviceExtension->Channel, DeviceNumber, command, lba, count, feature )); - //if(!(deviceExtension->HwFlags & UNIATA_SATA)) { - SelectDrive(chan, DeviceNumber); + if(deviceExtension->HwFlags & UNIATA_AHCI) { + PIDE_AHCI_CMD AHCI_CMD = &(chan->AhciCtlBlock->cmd); - statusByte = WaitOnBusy(chan); + KdPrint3((" (ahci)\n")); - /* ready to issue command ? */ - if (statusByte & IDE_STATUS_BUSY) { - KdPrint2((PRINT_PREFIX " Returning BUSY status\n")); - return statusByte; + RtlZeroMemory(AHCI_CMD->cfis, sizeof(AHCI_CMD->cfis)); + + if(!UniataAhciSetupFIS_H2D(deviceExtension, DeviceNumber, lChannel, + &(AHCI_CMD->cfis[0]), + command, + lba, + count, + feature, + ATA_IMMEDIATE + )) { + return 0xff; } - //} + if(UniataAhciSendCommand(deviceExtension, lChannel, DeviceNumber, 0, 3000) == 0xff) { + KdPrint2((" timeout\n")); + return 0xff; + } + return IDE_STATUS_IDLE; + } + + SelectDrive(chan, DeviceNumber); + + statusByte = WaitOnBusy(chan); + + /* ready to issue command ? */ + if (statusByte & IDE_STATUS_BUSY) { + KdPrint2((PRINT_PREFIX " Returning BUSY status\n")); + return statusByte; + } // !!! We should not check ERROR condition here // ERROR bit may be asserted durring previous operation // and not cleared after SELECT //>>>>>> NV: 2006/08/03 if((AtaCommandFlags[command] & ATA_CMD_FLAG_LBAIOsupp) && - CheckIfBadBlock(&(deviceExtension->lun[ldev]), lba, count)) { + CheckIfBadBlock(chan->lun[DeviceNumber], lba, count)) { KdPrint3((PRINT_PREFIX ": artificial bad block, lba %#I64x count %#x\n", lba, count)); return IDE_STATUS_ERROR; //return SRB_STATUS_ERROR; @@ -789,10 +815,10 @@ AtaCommand48( //<<<<<< NV: 2006/08/03 /* only use 48bit addressing if needed because of the overhead */ - if ((lba >= ATA_MAX_LBA28 || count > 256) && - deviceExtension->lun[ldev].IdentifyData.FeaturesSupport.Address48) { + if (UniAta_need_lba48(command, lba, count, + chan->lun[DeviceNumber]->IdentifyData.FeaturesSupport.Address48)) { - KdPrint2((PRINT_PREFIX " ldev %#x USE_LBA_48\n", ldev )); + KdPrint2((PRINT_PREFIX " dev %#x USE_LBA_48\n", DeviceNumber )); /* translate command into 48bit version */ if(AtaCommandFlags[command] & ATA_CMD_FLAG_48supp) { command = AtaCommands48[command]; @@ -815,7 +841,7 @@ AtaCommand48( AtapiWritePort1(chan, IDX_IO1_o_CylinderHigh, (UCHAR)(plba[5])); AtapiWritePort1(chan, IDX_IO1_o_CylinderHigh, (UCHAR)(plba[2])); - //KdPrint2((PRINT_PREFIX "AtaCommand48: ldev %#x USE_LBA48 (2)\n", ldev )); + //KdPrint2((PRINT_PREFIX "AtaCommand48: dev %#x USE_LBA48 (2)\n", DeviceNumber )); AtapiWritePort1(chan, IDX_IO1_o_DriveSelect, IDE_USE_LBA | (DeviceNumber ? IDE_DRIVE_2 : IDE_DRIVE_1) ); } else { @@ -823,18 +849,18 @@ AtaCommand48( chan->ChannelCtrlFlags &= ~CTRFLAGS_LBA48; //if(feature || - // (deviceExtension->lun[ldev].DeviceFlags & (DFLAGS_ATAPI_DEVICE | DFLAGS_TAPE_DEVICE | DFLAGS_LBA_ENABLED))) { + // (chan->lun[DeviceNumber]->DeviceFlags & (DFLAGS_ATAPI_DEVICE | DFLAGS_TAPE_DEVICE | DFLAGS_LBA_ENABLED))) { AtapiWritePort1(chan, IDX_IO1_o_Feature, (UCHAR)feature); //} AtapiWritePort1(chan, IDX_IO1_o_BlockCount, (UCHAR)count); AtapiWritePort1(chan, IDX_IO1_o_BlockNumber, (UCHAR)plba[0]); AtapiWritePort1(chan, IDX_IO1_o_CylinderLow, (UCHAR)plba[1]); AtapiWritePort1(chan, IDX_IO1_o_CylinderHigh, (UCHAR)plba[2]); - if(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_LBA_ENABLED) { - //KdPrint2((PRINT_PREFIX "AtaCommand28: ldev %#x USE_LBA\n", ldev )); + if(chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_LBA_ENABLED) { + //KdPrint2((PRINT_PREFIX "AtaCommand28: dev %#x USE_LBA\n", DeviceNumber )); AtapiWritePort1(chan, IDX_IO1_o_DriveSelect, (UCHAR)(plba[3] & 0xf) | IDE_USE_LBA | (DeviceNumber ? IDE_DRIVE_SELECT_2 : IDE_DRIVE_SELECT_1) ); } else { - //KdPrint2((PRINT_PREFIX "AtaCommand28: ldev %#x USE_CHS\n", ldev )); + //KdPrint2((PRINT_PREFIX "AtaCommand28: dev %#x USE_CHS\n", DeviceNumber )); AtapiWritePort1(chan, IDX_IO1_o_DriveSelect, (UCHAR)(plba[3] & 0xf) | (DeviceNumber ? IDE_DRIVE_SELECT_2 : IDE_DRIVE_SELECT_1) ); } } @@ -936,10 +962,35 @@ AtaCommand( IN ULONG flags ) { - return AtaCommand48(deviceExtension, DeviceNumber, lChannel, - command, - (ULONG)sector | ((ULONG)cylinder << 8) | ((ULONG)(head & 0x0f) << 24), - count, feature, flags); + if(!(deviceExtension->HwFlags & UNIATA_AHCI)) { + return AtaCommand48(deviceExtension, DeviceNumber, lChannel, + command, + (ULONG)sector | ((ULONG)cylinder << 8) | ((ULONG)(head & 0x0f) << 24), + count, feature, flags); + } else { + PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; + PIDE_AHCI_CMD AHCI_CMD = &(chan->AhciCtlBlock->cmd); + + KdPrint3(("AtaCommand(ahci)\n")); + + RtlZeroMemory(AHCI_CMD->cfis, sizeof(AHCI_CMD->cfis)); + + if(!UniataAhciSetupFIS_H2D(deviceExtension, DeviceNumber, lChannel, + &(AHCI_CMD->cfis[0]), + command, + (ULONG)sector | ((ULONG)cylinder << 8) | ((ULONG)(head & 0x0f) << 24), + count, + feature, + ATA_IMMEDIATE + )) { + return 0xff; + } + if(UniataAhciSendCommand(deviceExtension, lChannel, DeviceNumber, 0, 3000) == 0xff) { + KdPrint2((" timeout\n")); + return 0xff; + } + return IDE_STATUS_IDLE; + } } // end AtaCommand() LONG @@ -1226,9 +1277,16 @@ IssueIdentify( UCHAR signatureLow, signatureHigh; BOOLEAN atapiDev = FALSE; - ULONG ldev = (lChannel * 2) + DeviceNumber; - PHW_LU_EXTENSION LunExt = &(deviceExtension->lun[ldev]); + PHW_LU_EXTENSION LunExt = chan->lun[DeviceNumber]; + if(chan->ChannelCtrlFlags & CTRFLAGS_AHCI_PM) { + if(chan->PmLunMap & (1 << DeviceNumber)) { + // OK + } else { + KdPrint2((PRINT_PREFIX "IssueIdentify: PM empty port\n")); + return FALSE; + } + } else if(DeviceNumber && (chan->ChannelCtrlFlags & CTRFLAGS_NO_SLAVE)) { KdPrint2((PRINT_PREFIX "IssueIdentify: NO SLAVE\n")); return FALSE; @@ -1238,13 +1296,17 @@ IssueIdentify( return FALSE; } - SelectDrive(chan, DeviceNumber); - AtapiStallExecution(10); - statusByte = WaitOnBusyLong(chan); - // Check that the status register makes sense. - GetBaseStatus(chan, statusByte2); + if(deviceExtension->HwFlags & UNIATA_AHCI) { + statusByte = WaitOnBusyLong(chan); + } else { + SelectDrive(chan, DeviceNumber); + AtapiStallExecution(10); + statusByte = WaitOnBusyLong(chan); + // Check that the status register makes sense. + GetBaseStatus(chan, statusByte2); - UniataDumpATARegs(chan); + UniataDumpATARegs(chan); + } if (Command == IDE_COMMAND_IDENTIFY) { // Mask status byte ERROR bits. @@ -1268,7 +1330,7 @@ IssueIdentify( if (signatureLow == ATAPI_MAGIC_LSB && signatureHigh == ATAPI_MAGIC_MSB) { // Device is Atapi. - KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (ldev %d)\n", ldev)); + KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (dev %d)\n", DeviceNumber)); return FALSE; } @@ -1294,7 +1356,7 @@ IssueIdentify( if (signatureLow == ATAPI_MAGIC_LSB && signatureHigh == ATAPI_MAGIC_MSB) { - KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (2) (ldev %d)\n", ldev)); + KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (2) (dev %d)\n", DeviceNumber)); // Device is Atapi. return FALSE; } @@ -1302,7 +1364,7 @@ IssueIdentify( statusByte = UniataIsIdle(deviceExtension, statusByte) & ~IDE_STATUS_INDEX; if (statusByte != IDE_STATUS_IDLE) { // Give up on this. - KdPrint2((PRINT_PREFIX "IssueIdentify: no dev (ldev %d)\n", ldev)); + KdPrint2((PRINT_PREFIX "IssueIdentify: no dev (dev %d)\n", DeviceNumber)); return FALSE; } } @@ -1318,7 +1380,7 @@ IssueIdentify( // if(deviceExtension->HwFlags & UNIATA_SATA) { if(UniataIsSATARangeAvailable(deviceExtension, lChannel)) { - j = 4; + j = 4; // skip old-style checks } else { j = 0; } @@ -1338,7 +1400,7 @@ IssueIdentify( if (signatureLow == ATAPI_MAGIC_LSB && signatureHigh == ATAPI_MAGIC_MSB) { - KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (3) (ldev %d)\n", ldev)); + KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (3) (dev %d)\n", DeviceNumber)); // Device is Atapi. return FALSE; } @@ -1354,7 +1416,7 @@ IssueIdentify( if (signatureLow == ATAPI_MAGIC_LSB && signatureHigh == ATAPI_MAGIC_MSB) { // Device is Atapi. - KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (4) (ldev %d)\n", ldev)); + KdPrint2((PRINT_PREFIX "IssueIdentify: this is ATAPI (4) (dev %d)\n", DeviceNumber)); return FALSE; } } else { @@ -1468,7 +1530,7 @@ IssueIdentify( if (deviceExtension->FullIdentifyData.RemovableStatus & 1) { // Determine if this drive supports the MSN functions. KdPrint2((PRINT_PREFIX "IssueIdentify: Marking drive %d as removable. SFE = %d\n", - ldev, + DeviceNumber, deviceExtension->FullIdentifyData.RemovableStatus)); LunExt->DeviceFlags |= DFLAGS_REMOVABLE_DRIVE; } @@ -1818,12 +1880,16 @@ SetDriveParameters( ) { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; - PIDENTIFY_DATA2 identifyData = &deviceExtension->lun[(lChannel * 2) + DeviceNumber].IdentifyData; + PIDENTIFY_DATA2 identifyData; + PHW_LU_EXTENSION LunExt; // ULONG i; UCHAR statusByte; UCHAR errorByte; - if(deviceExtension->lun[(lChannel * 2) + DeviceNumber].DeviceFlags & + LunExt = deviceExtension->chan[lChannel].lun[DeviceNumber]; + identifyData = &(LunExt->IdentifyData); + + if(LunExt->DeviceFlags & (DFLAGS_LBA_ENABLED | DFLAGS_ORIG_GEOMETRY)) return TRUE; @@ -1899,7 +1965,7 @@ AtapiResetController__( ULONG numberChannels = deviceExtension->NumberChannels; PHW_CHANNEL chan = NULL; ULONG i,j; - ULONG max_ldev; + ULONG MaxLuns; UCHAR statusByte; PSCSI_REQUEST_BLOCK CurSrb; ULONG ChannelCtrlFlags; @@ -1933,7 +1999,8 @@ AtapiResetController__( KdPrint2((PRINT_PREFIX "AtapiResetController: Reset channel %d\n", j)); chan = &deviceExtension->chan[j]; KdPrint2((PRINT_PREFIX " CompleteType %#x\n", CompleteType)); - max_ldev = (chan->ChannelCtrlFlags & CTRFLAGS_NO_SLAVE) ? 1 : 2; + //MaxLuns = (chan->ChannelCtrlFlags & CTRFLAGS_NO_SLAVE) ? 1 : 2; + MaxLuns = chan->NumberLuns; if(CompleteType != RESET_COMPLETE_NONE) { #ifndef UNIATA_CORE while((CurSrb = UniataGetCurRequest(chan))) { @@ -2016,130 +2083,141 @@ AtapiResetController__( CHECK_INTR_IDLE); // Reset controller - KdPrint2((PRINT_PREFIX " disable intr (0)\n")); - AtapiDisableInterrupts(deviceExtension, j); - KdPrint2((PRINT_PREFIX " done\n")); - switch(VendorID) { - case ATA_INTEL_ID: { - ULONG mask; - ULONG timeout; - if(!(ChipFlags & UNIATA_SATA)) - goto default_reset; - if(!UniataIsSATARangeAvailable(deviceExtension, j)) { - goto default_reset; - } + if(ChipFlags & UNIATA_AHCI) { + KdPrint2((PRINT_PREFIX " AHCI path\n")); + UniataAhciReset(HwDeviceExtension, j); + } else { + KdPrint2((PRINT_PREFIX " ATA path\n")); + KdPrint2((PRINT_PREFIX " disable intr (0)\n")); + AtapiDisableInterrupts(deviceExtension, j); + KdPrint2((PRINT_PREFIX " done\n")); + switch(VendorID) { + case ATA_INTEL_ID: { + ULONG mask; + ULONG timeout; + if(!(ChipFlags & UNIATA_SATA)) + goto default_reset; + if(!UniataIsSATARangeAvailable(deviceExtension, j)) { + goto default_reset; + } #if 0 - /* ICH6 & ICH7 in compat mode has 4 SATA ports as master/slave on 2 ch's */ - if(ChipFlags & UNIATA_AHCI) { - mask = 0x0005 << j; - } else { - /* ICH5 in compat mode has SATA ports as master/slave on 1 channel */ - GetPciConfig1(0x90, tmp8); - if(tmp8 & 0x04) { - mask = 0x0003; + /* ICH6 & ICH7 in compat mode has 4 SATA ports as master/slave on 2 ch's */ + if(ChipFlags & UNIATA_AHCI) { + mask = 0x0005 << j; } else { - mask = 0x0001 << j; + /* ICH5 in compat mode has SATA ports as master/slave on 1 channel */ + GetPciConfig1(0x90, tmp8); + if(tmp8 & 0x04) { + mask = 0x0003; + } else { + mask = 0x0001 << j; + } } - } #else - mask = 1 << chan->lun[0]->SATA_lun_map; - if (max_ldev > 1) { - mask |= (1 << chan->lun[1]->SATA_lun_map); - } + mask = 1 << chan->lun[0]->SATA_lun_map; + if (MaxLuns > 1) { + mask |= (1 << chan->lun[1]->SATA_lun_map); + } #endif - ChangePciConfig2(0x92, a & ~mask); - AtapiStallExecution(10); - ChangePciConfig2(0x92, a | mask); - timeout = 100; + ChangePciConfig2(0x92, a & ~mask); + AtapiStallExecution(10); + ChangePciConfig2(0x92, a | mask); + timeout = 100; - /* Wait up to 1 sec for "connect well". */ - if (ChipFlags & (I6CH | I6CH2)) - mask = mask << 8; - else - mask = mask << 4; + /* Wait up to 1 sec for "connect well". */ + if (ChipFlags & (I6CH | I6CH2)) + mask = mask << 8; + else + mask = mask << 4; - while (timeout--) { - AtapiStallExecution(10000); - GetPciConfig2(0x92, tmp16); - if ((tmp16 & mask) == mask) { + while (timeout--) { AtapiStallExecution(10000); - break; + GetPciConfig2(0x92, tmp16); + if ((tmp16 & mask) == mask) { + AtapiStallExecution(10000); + break; + } + } + break; } + case ATA_SIS_ID: + case ATA_NVIDIA_ID: { + KdPrint2((PRINT_PREFIX " SIS/nVidia\n")); + if(!(ChipFlags & UNIATA_SATA)) + goto default_reset; + break; } + case ATA_SILICON_IMAGE_ID: { + ULONG offset; + ULONG Channel = deviceExtension->Channel + j; + if(!(ChipFlags & UNIATA_SATA)) + goto default_reset; + offset = ((Channel & 1) << 7) + ((Channel & 2) << 8); + /* disable PHY state change interrupt */ + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + offset, 0); + + UniataSataClearErr(HwDeviceExtension, j, UNIATA_SATA_IGNORE_CONNECT, 0); + + /* reset controller part for this channel */ + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x48, + AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x48) | (0xc0 >> Channel)); + AtapiStallExecution(1000); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x48, + AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x48) & ~(0xc0 >> Channel)); + + + break; } + case ATA_PROMISE_ID: { + break; } + default: + if(ChipFlags & UNIATA_SATA) { + KdPrint2((PRINT_PREFIX " SATA generic reset\n")); + UniataSataClearErr(HwDeviceExtension, j, UNIATA_SATA_IGNORE_CONNECT, 0); + } +default_reset: + KdPrint2((PRINT_PREFIX " send reset\n")); + AtapiWritePort1(chan, IDX_IO2_o_Control, IDE_DC_DISABLE_INTERRUPTS | + IDE_DC_RESET_CONTROLLER ); + KdPrint2((PRINT_PREFIX " wait a little\n")); + AtapiStallExecution(10000); + // Disable interrupts + KdPrint2((PRINT_PREFIX " disable intr\n")); + AtapiDisableInterrupts(deviceExtension, j); + AtapiStallExecution(100); + KdPrint2((PRINT_PREFIX " re-enable intr\n")); + AtapiEnableInterrupts(deviceExtension, j); + KdPrint2((PRINT_PREFIX " wait a little (2)\n")); + AtapiStallExecution(100000); + KdPrint2((PRINT_PREFIX " done\n")); + + break; + } // end switch() + + //if(!(ChipFlags & UNIATA_SATA)) {} + if(!UniataIsSATARangeAvailable(deviceExtension, j)) { + // Reset DMA engine if active + KdPrint2((PRINT_PREFIX " check DMA engine\n")); + dma_status = GetDmaStatus(chan->DeviceExtension, chan->lChannel); + KdPrint2((PRINT_PREFIX " DMA status %#x\n", dma_status)); + if((ChannelCtrlFlags & CTRFLAGS_DMA_ACTIVE) || + (dma_status & BM_STATUS_INTR)) { + AtapiDmaDone(HwDeviceExtension, 0, j, NULL); } } - break; } - case ATA_SIS_ID: - case ATA_NVIDIA_ID: { - KdPrint2((PRINT_PREFIX " SIS/nVidia\n")); - if(!(ChipFlags & UNIATA_SATA)) - goto default_reset; - break; } - case ATA_SILICON_IMAGE_ID: { - ULONG offset; - ULONG Channel = deviceExtension->Channel + j; - if(!(ChipFlags & UNIATA_SATA)) - goto default_reset; - offset = ((Channel & 1) << 7) + ((Channel & 2) << 8); - /* disable PHY state change interrupt */ - AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x148 + offset, 0); - - UniataSataClearErr(HwDeviceExtension, j, UNIATA_SATA_IGNORE_CONNECT); - - /* reset controller part for this channel */ - AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48, - AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48) | (0xc0 >> Channel)); - AtapiStallExecution(1000); - AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48, - AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48) & ~(0xc0 >> Channel)); - - - break; } - case ATA_PROMISE_ID: { - break; } - default: - if(ChipFlags & UNIATA_SATA) { - KdPrint2((PRINT_PREFIX " SATA generic reset\n")); - UniataSataClearErr(HwDeviceExtension, j, UNIATA_SATA_IGNORE_CONNECT, 0); - } -default_reset: - KdPrint2((PRINT_PREFIX " send reset\n")); - AtapiWritePort1(chan, IDX_IO2_o_Control, IDE_DC_DISABLE_INTERRUPTS | - IDE_DC_RESET_CONTROLLER ); - KdPrint2((PRINT_PREFIX " wait a little\n")); - AtapiStallExecution(10000); - // Disable interrupts - KdPrint2((PRINT_PREFIX " disable intr\n")); - AtapiDisableInterrupts(deviceExtension, j); - AtapiStallExecution(100); - KdPrint2((PRINT_PREFIX " re-enable intr\n")); - AtapiEnableInterrupts(deviceExtension, j); - KdPrint2((PRINT_PREFIX " wait a little (2)\n")); - AtapiStallExecution(100000); - KdPrint2((PRINT_PREFIX " done\n")); - - break; - } // end switch() - - //if(!(ChipFlags & UNIATA_SATA)) { - if(!UniataIsSATARangeAvailable(deviceExtension, j)) { - // Reset DMA engine if active - KdPrint2((PRINT_PREFIX " check DMA engine\n")); - dma_status = GetDmaStatus(chan->DeviceExtension, chan->lChannel); - KdPrint2((PRINT_PREFIX " DMA status %#x\n", dma_status)); - if((ChannelCtrlFlags & CTRFLAGS_DMA_ACTIVE) || - (dma_status & BM_STATUS_INTR)) { - AtapiDmaDone(HwDeviceExtension, 0, j, NULL); - } - } + } // ATA vs AHCI // all these shall be performed inside AtapiHwInitialize__() ? #if 1 KdPrint2((PRINT_PREFIX " process connected devices\n")); // Do special processing for ATAPI and IDE disk devices. - for (i = 0; i < max_ldev; i++) { + for (i = 0; i < MaxLuns; i++) { // Check if device present. - if (!(deviceExtension->lun[i + (j * 2)].DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + if (!(chan->lun[i]->DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + if(ChipFlags & UNIATA_AHCI) { + // everything is done in UniataAhciReset() + KdPrint2((PRINT_PREFIX " device have gone\n")); + continue; + } #ifdef NAVO_TEST continue; #else //NAVO_TEST @@ -2151,9 +2229,23 @@ default_reset: continue; } } else { + if(ChipFlags & UNIATA_AHCI) { + // everything is done in UniataAhciReset() + KdPrint2((PRINT_PREFIX " found some device\n")); + + if(!IssueIdentify(HwDeviceExtension, + i, j, + (chan->lun[i]->DeviceFlags & DFLAGS_ATAPI_DEVICE) ? + IDE_COMMAND_ATAPI_IDENTIFY : IDE_COMMAND_IDENTIFY, + FALSE)) { + KdPrint2((PRINT_PREFIX " identify failed !\n")); + UniataForgetDevice(chan->lun[i]); + } + continue; + } if(!UniataAnybodyHome(HwDeviceExtension, j, i)) { KdPrint2((PRINT_PREFIX " device have gone\n")); - UniataForgetDevice(&(deviceExtension->lun[i + (j * 2)])); + UniataForgetDevice(chan->lun[i]); } #endif //NAVO_TEST } @@ -2166,10 +2258,10 @@ default_reset: KdPrint2((PRINT_PREFIX "no drive, status %#x\n", statusByte)); - UniataForgetDevice(&(deviceExtension->lun[i + (j * 2)])); + UniataForgetDevice(chan->lun[i]); } else // Check for ATAPI disk. - if (deviceExtension->lun[i + (j * 2)].DeviceFlags & DFLAGS_ATAPI_DEVICE) { + if (chan->lun[i]->DeviceFlags & DFLAGS_ATAPI_DEVICE) { // Issue soft reset and issue identify. GetStatus(chan, statusByte); KdPrint2((PRINT_PREFIX "AtapiResetController: Status before Atapi reset (%#x).\n", @@ -2216,7 +2308,7 @@ default_reset: GetBaseStatus(chan, statusByte); } // force DMA mode reinit - deviceExtension->lun[i + (j * 2)].DeviceFlags |= DFLAGS_REINIT_DMA; + chan->lun[i]->DeviceFlags |= DFLAGS_REINIT_DMA; } #endif //0 @@ -2229,7 +2321,7 @@ default_reset: // Call the HwInitialize routine to setup multi-block. AtapiHwInitialize__(deviceExtension, j); - } + } // for(channel) ScsiPortNotification(NextRequest, deviceExtension, NULL); return TRUE; @@ -2264,7 +2356,8 @@ MapError( UCHAR errorByte; UCHAR srbStatus = SRB_STATUS_SUCCESS; UCHAR scsiStatus; - ULONG ldev = GET_LDEV(Srb); + ULONG DeviceNumber = GET_CDEV(Srb); + PHW_LU_EXTENSION LunExt = chan->lun[DeviceNumber]; // Read the error register. @@ -2273,7 +2366,7 @@ MapError( "MapError: Error register is %#x\n", errorByte)); - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_ATAPI_DEVICE) { + if (LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE) { switch (errorByte >> 4) { case SCSI_SENSE_NO_SENSE: @@ -2411,7 +2504,7 @@ MapError( srbStatus |= SRB_STATUS_AUTOSENSE_VALID; } - deviceExtension->lun[ldev].ErrorCount++; + LunExt->ErrorCount++; } else if (errorByte & IDE_ERROR_END_OF_MEDIA) { @@ -2435,8 +2528,8 @@ MapError( srbStatus |= SRB_STATUS_AUTOSENSE_VALID; } - if (!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)){ - deviceExtension->lun[ldev].ErrorCount++; + if (!(LunExt->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)){ + LunExt->ErrorCount++; } } else if (errorByte & IDE_ERROR_ILLEGAL_LENGTH) { @@ -2501,7 +2594,7 @@ MapError( srbStatus |= SRB_STATUS_AUTOSENSE_VALID; } - deviceExtension->lun[ldev].ErrorCount++; + LunExt->ErrorCount++; } else if (errorByte & IDE_ERROR_MEDIA_CHANGE) { @@ -2531,8 +2624,8 @@ MapError( scsiStatus = SCSISTAT_CHECK_CONDITION; srbStatus = SRB_STATUS_ERROR; - if (!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)){ - deviceExtension->lun[ldev].ErrorCount++; + if (!(LunExt->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)){ + LunExt->ErrorCount++; } // Build sense buffer @@ -2551,14 +2644,14 @@ MapError( } } - if (deviceExtension->lun[ldev].ErrorCount >= MAX_ERRORS) { + if (LunExt->ErrorCount >= MAX_ERRORS) { // deviceExtension->DWordIO = FALSE; KdPrint2((PRINT_PREFIX "MapError: ErrorCount >= MAX_ERRORS\n")); - deviceExtension->lun[ldev].DeviceFlags &= ~DFLAGS_DWORDIO_ENABLED; - deviceExtension->lun[ldev].MaximumBlockXfer = 0; + LunExt->DeviceFlags &= ~DFLAGS_DWORDIO_ENABLED; + LunExt->MaximumBlockXfer = 0; BrutePoint(); KdPrint2((PRINT_PREFIX @@ -2586,10 +2679,10 @@ MapError( // Reprogram to not use Multi-sector. UCHAR statusByte; - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT && - !(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_ATAPI_DEVICE)) { + if (LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT && + !(LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE)) { - statusByte = AtaCommand(deviceExtension, ldev & 0x1, lChannel, IDE_COMMAND_SET_MULTIPLE, 0, 0, 0, 0, 0, ATA_WAIT_BASE_READY); + statusByte = AtaCommand(deviceExtension, DeviceNumber, lChannel, IDE_COMMAND_SET_MULTIPLE, 0, 0, 0, 0, 0, ATA_WAIT_BASE_READY); // Check for errors. Reset the value to 0 (disable MultiBlock) if the // command was aborted. @@ -2603,7 +2696,7 @@ MapError( errorByte)); // Adjust the devExt. value, if necessary. - deviceExtension->lun[ldev].MaximumBlockXfer = 0; + LunExt->MaximumBlockXfer = 0; BrutePoint(); } @@ -2679,11 +2772,11 @@ AtapiHwInitialize__( AtapiChipInit(deviceExtension, DEVNUM_NOT_SPECIFIED, lChannel); FindDevices(deviceExtension, 0, lChannel); - for (i = lChannel*2; i < (lChannel+1)*2; i++) { + for (i = 0; i < chan->NumberLuns; i++) { KdPrint3((PRINT_PREFIX "AtapiHwInitialize: lChannel %#x, dev %x\n", lChannel, i)); - LunExt = &(deviceExtension->lun[i]); + LunExt = chan->lun[i]; // skip empty slots if (!(LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT)) { continue; @@ -2696,10 +2789,10 @@ AtapiHwInitialize__( KdPrint2((PRINT_PREFIX "AtapiHwInitialize: IDE branch\n")); // Enable media status notification - IdeMediaStatus(TRUE,deviceExtension,(UCHAR)i); + IdeMediaStatus(TRUE,deviceExtension,lChannel,(UCHAR)i); // If supported, setup Multi-block transfers. - statusByte = AtaCommand(deviceExtension, i & 1, lChannel, + statusByte = AtaCommand(deviceExtension, i, lChannel, IDE_COMMAND_SET_MULTIPLE, 0, 0, 0, LunExt->MaximumBlockXfer, 0, ATA_WAIT_BASE_READY); @@ -2714,7 +2807,7 @@ AtapiHwInitialize__( statusByte, errorByte)); - statusByte = AtaCommand(deviceExtension, i & 1, lChannel, + statusByte = AtaCommand(deviceExtension, i, lChannel, IDE_COMMAND_SET_MULTIPLE, 0, 0, 0, LunExt->MaximumBlockXfer, 0, ATA_WAIT_BASE_READY); @@ -2741,7 +2834,7 @@ AtapiHwInitialize__( if(LunExt->opt_ReadCacheEnable) { KdPrint2((PRINT_PREFIX " Try Enable Read Cache\n")); // If supported, setup read/write cacheing - statusByte = AtaCommand(deviceExtension, i & 1, lChannel, + statusByte = AtaCommand(deviceExtension, i, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_ENAB_RCACHE, ATA_WAIT_BASE_READY); @@ -2756,7 +2849,7 @@ AtapiHwInitialize__( } } else { KdPrint2((PRINT_PREFIX " Disable Read Cache\n")); - statusByte = AtaCommand(deviceExtension, i & 1, lChannel, + statusByte = AtaCommand(deviceExtension, i, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_DIS_RCACHE, ATA_WAIT_BASE_READY); LunExt->DeviceFlags &= ~DFLAGS_RCACHE_ENABLED; @@ -2764,7 +2857,7 @@ AtapiHwInitialize__( if(LunExt->opt_WriteCacheEnable) { KdPrint2((PRINT_PREFIX " Try Enable Write Cache\n")); // If supported & allowed, setup write cacheing - statusByte = AtaCommand(deviceExtension, i & 1, lChannel, + statusByte = AtaCommand(deviceExtension, i, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_ENAB_WCACHE, ATA_WAIT_BASE_READY); // Check for errors. @@ -2778,7 +2871,7 @@ AtapiHwInitialize__( } } else { KdPrint2((PRINT_PREFIX " Disable Write Cache\n")); - statusByte = AtaCommand(deviceExtension, i & 1, lChannel, + statusByte = AtaCommand(deviceExtension, i, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_ENAB_WCACHE, ATA_WAIT_BASE_READY); LunExt->DeviceFlags &= ~DFLAGS_WCACHE_ENABLED; @@ -2831,7 +2924,7 @@ AtapiHwInitialize__( LunExt->TransferMode = (CHAR)PreferedMode; - AtapiDmaInit__(deviceExtension, i); + AtapiDmaInit__(deviceExtension, LunExt); LunExt->OrigTransferMode = LunExt->LimitedTransferMode = @@ -2893,12 +2986,15 @@ AtapiHwInitializeChanger( IN PMECHANICAL_STATUS_INFORMATION_HEADER MechanismStatus) { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; - ULONG ldev = GET_LDEV(Srb); + ULONG lChannel = GET_CHANNEL(Srb); + PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]); + ULONG DeviceNumber = GET_CDEV(Srb); + PHW_LU_EXTENSION LunExt = chan->lun[DeviceNumber]; if (MechanismStatus) { - deviceExtension->lun[ldev].DiscsPresent = MechanismStatus->NumberAvailableSlots; - if (deviceExtension->lun[ldev].DiscsPresent > 1) { - deviceExtension->lun[ldev].DeviceFlags |= DFLAGS_ATAPI_CHANGER; + LunExt->DiscsPresent = MechanismStatus->NumberAvailableSlots; + if (LunExt->DiscsPresent > 1) { + LunExt->DeviceFlags |= DFLAGS_ATAPI_CHANGER; } } return; @@ -2941,7 +3037,7 @@ AtapiParseArgumentString( return 0; } - // Calculate the string length. + // Calculate the string length and lower case all characters. cptr = String; while (*cptr++) { stringLength++; @@ -3202,9 +3298,10 @@ ReturnCallback: chan = &(deviceExtension->chan[c]); - if((ULONG)InterlockedCompareExchange(&chan->CheckIntr, - CHECK_INTR_ACTIVE, - CHECK_INTR_DETECTED) == CHECK_INTR_DETECTED) { + if((ULONG)CrNtInterlockedCompareExchange(CRNT_ILK_PTYPE &(chan->CheckIntr), + CRNT_ILK_TYPE CHECK_INTR_ACTIVE, + CRNT_ILK_TYPE CHECK_INTR_DETECTED) == CHECK_INTR_DETECTED) + { //ASSERT(!deviceExtension->simplexOnly); chan->DpcState = DPC_STATE_ISR; if(!AtapiInterrupt__(HwDeviceExtension, (UCHAR)c)) { @@ -3256,20 +3353,27 @@ AtapiInterrupt( ULONG i_res = 0; ULONG pass; BOOLEAN checked[AHCI_MAX_PORT]; + ULONG hIS; KdPrint2((PRINT_PREFIX "Intr: VendorID+DeviceID/Rev %#x/%#x\n", deviceExtension->DevID, deviceExtension->RevID)); + if(deviceExtension->HwFlags & UNIATA_AHCI) { + hIS = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_IS); + KdPrint2((PRINT_PREFIX "AtapiInterrupt2: AHCI: hIS=%x cntrlr %#x chan %#x\n",hIS, deviceExtension->DevIndex, deviceExtension->Channel)); + if(!hIS) { + return FALSE; + } + } + for(_c=0; _cNumberChannels; _c++) { checked[_c] = FALSE; } + // fc = -// atapiDev = (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_ATAPI_DEVICE) ? TRUE : FALSE; for(pass=0; pass<2; pass++) { for(_c=0; _cNumberChannels; _c++) { c = (_c+deviceExtension->FirstChannelToCheck) % deviceExtension->NumberChannels; - //non_empty_chan = (deviceExtension->lun[c*2].DeviceFlags | deviceExtension->lun[c*2+1].DeviceFlags) - // & DFLAGS_DEVICE_PRESENT; if(checked[c]) continue; @@ -3293,17 +3397,19 @@ AtapiInterrupt( // if (deviceExtension->chan[c].CheckIntr == CHECK_INTR_DETECTED) { // deviceExtension->chan[c].CheckIntr = CHECK_INTR_ACTIVE; // } - c_state = (ULONG)InterlockedCompareExchange(&(deviceExtension->chan[c].CheckIntr), - CHECK_INTR_ACTIVE, - CHECK_INTR_DETECTED); + c_state = + (ULONG)CrNtInterlockedCompareExchange(CRNT_ILK_PTYPE &(deviceExtension->chan[c].CheckIntr), + CRNT_ILK_TYPE CHECK_INTR_ACTIVE, + CRNT_ILK_TYPE CHECK_INTR_DETECTED); if(c_state == CHECK_INTR_IDLE) { // c_state = deviceExtension->chan[c].CheckIntr; // if (deviceExtension->chan[c].CheckIntr == CHECK_INTR_IDLE) { // deviceExtension->chan[c].CheckIntr = CHECK_INTR_ACTIVE // } - c_state = (ULONG)InterlockedCompareExchange(&(deviceExtension->chan[c].CheckIntr), - CHECK_INTR_ACTIVE, - CHECK_INTR_IDLE); + c_state = + (ULONG)CrNtInterlockedCompareExchange(CRNT_ILK_PTYPE &(deviceExtension->chan[c].CheckIntr), + CRNT_ILK_TYPE CHECK_INTR_ACTIVE, + CRNT_ILK_TYPE CHECK_INTR_IDLE); } } while(c_state == CHECK_INTR_CHECK); KdPrint2((PRINT_PREFIX "AtapiInterrupt(base): locked\n")); @@ -3316,7 +3422,7 @@ AtapiInterrupt( if((c_state == CHECK_INTR_DETECTED) || (i_res = AtapiCheckInterrupt__(deviceExtension, (UCHAR)c))) { - if(i_res == 2) { + if(i_res == INTERRUPT_REASON_UNEXPECTED) { KdPrint2((PRINT_PREFIX "AtapiInterrupt(base): Catch unexpected\n")); InterlockedExchange(&(deviceExtension->chan[c].CheckIntr), CHECK_INTR_IDLE); return TRUE; @@ -3377,6 +3483,7 @@ AtapiInterrupt2( BOOLEAN status = FALSE; ULONG c_count = 0; ULONG i_res; + ULONG hIS; // we should never get here for ISA/MCA if(!BMList[deviceExtension->DevIndex].Isr2Enable) { @@ -3384,6 +3491,14 @@ AtapiInterrupt2( return FALSE; } + if(deviceExtension->HwFlags & UNIATA_AHCI) { + hIS = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_IS); + KdPrint2((PRINT_PREFIX "AtapiInterrupt2: AHCI: hIS=%x cntrlr %#x chan %#x\n",hIS, deviceExtension->DevIndex, deviceExtension->Channel)); + if(!hIS) { + return FALSE; + } + } + for(c=0; cNumberChannels; c++) { KdPrint2((PRINT_PREFIX "AtapiInterrupt2: cntrlr %#x chan %#x\n",deviceExtension->DevIndex, c)); @@ -3392,9 +3507,10 @@ AtapiInterrupt2( continue; } - if((ULONG)CrNtInterlockedCompareExchange(&(deviceExtension->chan[c].CheckIntr), - CHECK_INTR_CHECK, - CHECK_INTR_IDLE) != CHECK_INTR_IDLE) { + if((ULONG)CrNtInterlockedCompareExchange(CRNT_ILK_PTYPE &(deviceExtension->chan[c].CheckIntr), + CRNT_ILK_TYPE CHECK_INTR_CHECK, + CRNT_ILK_TYPE CHECK_INTR_IDLE) != CHECK_INTR_IDLE) + { KdPrint2((PRINT_PREFIX "AtapiInterrupt2: !CHECK_INTR_IDLE\n")); // hunt on unexpected intr (Some devices generate double interrupts, // some controllers (at least CMD649) interrupt twice with small delay. @@ -3407,7 +3523,7 @@ AtapiInterrupt2( if((i_res = AtapiCheckInterrupt__(deviceExtension, (UCHAR)c))) { KdPrint2((PRINT_PREFIX "AtapiInterrupt2: intr\n")); - if(i_res == 2) { + if(i_res == INTERRUPT_REASON_UNEXPECTED) { KdPrint2((PRINT_PREFIX "AtapiInterrupt2: Catch unexpected\n")); InterlockedExchange(&(deviceExtension->chan[c].CheckIntr), CHECK_INTR_IDLE); return TRUE; @@ -3430,7 +3546,7 @@ AtapiInterrupt2( } KdPrint2((PRINT_PREFIX "AtapiInterrupt2: return %d\n", status)); return status; - + } // end AtapiInterrupt2() RETTYPE_XXableInterrupts @@ -3447,9 +3563,10 @@ AtapiInterruptDpc( if(!(deviceExtension->chan[c].ChannelCtrlFlags & CTRFLAGS_DPC_REQ)) { - if((ULONG)InterlockedCompareExchange(&(deviceExtension->chan[c].CheckIntr), - CHECK_INTR_ACTIVE, - CHECK_INTR_DETECTED) != CHECK_INTR_DETECTED) { + if((ULONG)CrNtInterlockedCompareExchange(CRNT_ILK_PTYPE &(deviceExtension->chan[c].CheckIntr), + CRNT_ILK_TYPE CHECK_INTR_ACTIVE, + CRNT_ILK_TYPE CHECK_INTR_DETECTED) != CHECK_INTR_DETECTED) + { continue; } @@ -3501,9 +3618,9 @@ AtapiEnableInterrupts__( } else { // check if other channel(s) interrupted // must do nothing in simplex mode - if((ULONG)CrNtInterlockedCompareExchange(&(chan->CheckIntr), - CHECK_INTR_ACTIVE, - CHECK_INTR_DETECTED) != CHECK_INTR_DETECTED) { + if((ULONG)CrNtInterlockedCompareExchange(CRNT_ILK_PTYPE &(chan->CheckIntr), + CRNT_ILK_TYPE CHECK_INTR_ACTIVE, + CRNT_ILK_TYPE CHECK_INTR_DETECTED) != CHECK_INTR_DETECTED) { continue; } //ASSERT(!deviceExtension->simplexOnly); @@ -3542,16 +3659,23 @@ AtapiEnableInterrupts( ) { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; - KdPrint2((PRINT_PREFIX "AtapiEnableInterrupts_%d: %d\n",c, deviceExtension->chan[c].DisableIntr)); + PHW_CHANNEL chan; if(c >= deviceExtension->NumberChannels) { + KdPrint2((PRINT_PREFIX "AtapiEnableInterrupts_%d: WRONG CHANNEL\n",c)); return; } - if(!InterlockedDecrement(&deviceExtension->chan[c].DisableIntr)) { - AtapiWritePort1(&deviceExtension->chan[c], IDX_IO2_o_Control, - IDE_DC_A_4BIT ); - deviceExtension->chan[c].ChannelCtrlFlags &= ~CTRFLAGS_INTR_DISABLED; + chan = &(deviceExtension->chan[c]); + KdPrint2((PRINT_PREFIX "AtapiEnableInterrupts_%d: %d\n",c, chan->DisableIntr)); + if(!InterlockedDecrement(&chan->DisableIntr)) { + if(deviceExtension->HwFlags & UNIATA_AHCI) { + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IE, 0); + } else { + AtapiWritePort1(chan, IDX_IO2_o_Control, + IDE_DC_A_4BIT ); + } + chan->ChannelCtrlFlags &= ~CTRFLAGS_INTR_DISABLED; } else { - AtapiWritePort1(&deviceExtension->chan[c], IDX_IO2_o_Control, + AtapiWritePort1(chan, IDX_IO2_o_Control, IDE_DC_DISABLE_INTERRUPTS /*| IDE_DC_A_4BIT*/ ); } return; @@ -3565,15 +3689,28 @@ AtapiDisableInterrupts( ) { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; - KdPrint2((PRINT_PREFIX "AtapiDisableInterrupts_%d: %d\n",c, deviceExtension->chan[c].DisableIntr)); - // mark channel as busy + PHW_CHANNEL chan; if(c >= deviceExtension->NumberChannels) { + KdPrint2((PRINT_PREFIX "AtapiDisableInterrupts_%d: WRONG CHANNEL\n",c)); return; } - if(InterlockedIncrement(&deviceExtension->chan[c].DisableIntr)) { - AtapiWritePort1(&deviceExtension->chan[c], IDX_IO2_o_Control, - IDE_DC_DISABLE_INTERRUPTS /*| IDE_DC_A_4BIT*/ ); - deviceExtension->chan[c].ChannelCtrlFlags |= CTRFLAGS_INTR_DISABLED; + chan = &(deviceExtension->chan[c]); + KdPrint2((PRINT_PREFIX "AtapiDisableInterrupts_%d: %d\n",c, chan->DisableIntr)); + // mark channel as busy + if(InterlockedIncrement(&chan->DisableIntr)) { + if(deviceExtension->HwFlags & UNIATA_AHCI) { + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IE, + (ATA_AHCI_P_IX_CPD | ATA_AHCI_P_IX_TFE | ATA_AHCI_P_IX_HBF | + ATA_AHCI_P_IX_HBD | ATA_AHCI_P_IX_IF | ATA_AHCI_P_IX_OF | + ((/*ch->pm_level == */0) ? ATA_AHCI_P_IX_PRC | ATA_AHCI_P_IX_PC : 0) | + ATA_AHCI_P_IX_DP | ATA_AHCI_P_IX_UF | ATA_AHCI_P_IX_SDB | + ATA_AHCI_P_IX_DS | ATA_AHCI_P_IX_PS | ATA_AHCI_P_IX_DHR) + ); + } else { + AtapiWritePort1(chan, IDX_IO2_o_Control, + IDE_DC_DISABLE_INTERRUPTS /*| IDE_DC_A_4BIT*/ ); + } + chan->ChannelCtrlFlags |= CTRFLAGS_INTR_DISABLED; } return; @@ -3619,6 +3756,12 @@ AtapiCheckInterrupt__( lChannel = c; Channel = (UCHAR)(deviceExtension->Channel + lChannel); + if((ChipFlags & UNIATA_AHCI) && + UniataIsSATARangeAvailable(deviceExtension, lChannel)) { + OurInterrupt = UniataAhciStatus(HwDeviceExtension, lChannel, -1); + return OurInterrupt; + } + if(chan->ChannelCtrlFlags & CTRFLAGS_DMA_ACTIVE) { DmaTransfer = TRUE; KdPrint2((PRINT_PREFIX " cntrlr %#x:%#x, lch %#x DmaTransfer = TRUE\n", deviceExtension->DevIndex, @@ -3636,12 +3779,6 @@ AtapiCheckInterrupt__( goto check_unknown; } - if((ChipFlags & UNIATA_AHCI) && - UniataIsSATARangeAvailable(deviceExtension, lChannel)) { - OurInterrupt = UniataAhciStatus(HwDeviceExtension, lChannel, -1); - return OurInterrupt; - } - // Attention ! // We can catch (BM_STATUS_ACTIVE + BM_STATUS_INTR) when operation is actually completed // Such behavior was observed with Intel ICH-xxx chips @@ -3653,13 +3790,13 @@ AtapiCheckInterrupt__( switch(ChipType) { case PROLD: case PRNEW: - status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x1c); + status = AtapiReadPortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x1c); if (!DmaTransfer) break; if (!(status & ((Channel) ? 0x00004000 : 0x00000400))) { KdPrint2((PRINT_PREFIX " Promise old/new unexpected\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } break; case PRTX: @@ -3669,23 +3806,23 @@ AtapiCheckInterrupt__( break; if(!(status & 0x20)) { KdPrint2((PRINT_PREFIX " Promise tx unexpected\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } break; case PRMIO: - status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x0040); + status = AtapiReadPortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x0040); if(ChipFlags & PRSATA) { - pr_status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x006c); - AtapiWritePortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x006c, pr_status & 0x000000ff); + pr_status = AtapiReadPortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x006c); + AtapiWritePortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x006c, pr_status & 0x000000ff); } if(pr_status & (0x11 << Channel)) { // TODO: reset channel KdPrint2((PRINT_PREFIX " Promise mio unexpected + reset req\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } if(!(status & (0x01 << Channel))) { KdPrint2((PRINT_PREFIX " Promise mio unexpected\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } AtapiWritePort4(chan, IDX_BM_DeviceSpecific0, 0x00000001); break; @@ -3702,11 +3839,11 @@ AtapiCheckInterrupt__( /* get and clear interrupt status */ if(ChipFlags & NVQ) { - pr_status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs); - AtapiWritePortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs, (0x0fUL << shift) | 0x00f000f0); + pr_status = AtapiReadPortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs); + AtapiWritePortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, (0x0fUL << shift) | 0x00f000f0); } else { - pr_status = AtapiReadPortEx1(chan,(ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs); - AtapiWritePortEx1(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs, (0x0f << shift)); + pr_status = AtapiReadPortEx1(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs); + AtapiWritePortEx1(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, (0x0f << shift)); } KdPrint2((PRINT_PREFIX " pr_status %x\n", pr_status)); @@ -3724,9 +3861,9 @@ AtapiCheckInterrupt__( if(!(pr_status & (0x01UL << shift))) { KdPrint2((PRINT_PREFIX " nVidia unexpected\n")); if(UniataSataClearErr(HwDeviceExtension, c, UNIATA_SATA_DO_CONNECT, 0)) { - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } else { - return FALSE; + return INTERRUPT_REASON_IGNORE; } } @@ -3746,11 +3883,11 @@ AtapiCheckInterrupt__( KdPrint2((PRINT_PREFIX " Sii DS0 %x\n", reg32)); if(reg32 == 0xffffffff) { KdPrint2((PRINT_PREFIX " Sii mio unexpected\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } if(!(reg32 & (BM_DS0_SII_DMA_SATA_IRQ | BM_DS0_SII_DMA_COMPLETE | BM_DS0_SII_IRQ | BM_DS0_SII_DMA_ENABLE | BM_DS0_SII_DMA_ERROR))) { KdPrint2((PRINT_PREFIX " Sii mio unexpected (2)\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } if(ChipFlags & UNIATA_SATA) { @@ -3761,7 +3898,7 @@ AtapiCheckInterrupt__( * SError bits are pending. Clear SError immediately. */ if(UniataSataClearErr(HwDeviceExtension, c, UNIATA_SATA_DO_CONNECT, 0)) { - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } } } @@ -3782,11 +3919,11 @@ AtapiCheckInterrupt__( KdPrint2((PRINT_PREFIX " 0x71 = %#x\n", reg8)); if (!(reg8 & (Channel ? 0x08 : 0x04))) { - return FALSE; + return INTERRUPT_REASON_IGNORE; } if (!DmaTransfer) { KdPrint2((PRINT_PREFIX " cmd our\n")); - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } SetPciConfig1(0x71, (Channel ? 0x08 : 0x04)); } @@ -3798,7 +3935,7 @@ AtapiCheckInterrupt__( //dma_status = GetDmaStatus(deviceExtension, lChannel); if (!((dma_status = GetDmaStatus(deviceExtension, lChannel)) & BM_STATUS_INTR)) { KdPrint2((PRINT_PREFIX " Acard unexpected\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } AtapiWritePort1(chan, IDX_BM_Status, dma_status | BM_STATUS_INTR); AtapiStallExecution(1); @@ -3812,11 +3949,11 @@ AtapiCheckInterrupt__( } else if(ChipFlags & UNIATA_SATA) { if(UniataSataClearErr(HwDeviceExtension, c, UNIATA_SATA_DO_CONNECT, 0)) { - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } if(!(chan->ChannelCtrlFlags & CTRFLAGS_NO_SLAVE)) { if(UniataSataClearErr(chan->DeviceExtension, chan->lChannel, UNIATA_SATA_IGNORE_CONNECT, 1)) { - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } } } @@ -3829,7 +3966,7 @@ AtapiCheckInterrupt__( } else if(ChipFlags & UNIATA_SATA) { if(UniataSataClearErr(HwDeviceExtension, c, UNIATA_SATA_DO_CONNECT, 0)) { - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } } } @@ -3841,16 +3978,16 @@ check_unknown: KdPrint2((PRINT_PREFIX " DmaTransfer + !BM_STATUS_INTR (%x)\n", dma_status)); if(dma_status & BM_STATUS_ERR) { KdPrint2((PRINT_PREFIX " DmaTransfer + BM_STATUS_ERR -> our\n")); - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } else { KdPrint2((PRINT_PREFIX " getting status...\n")); GetStatus(chan, statusByte); KdPrint2((PRINT_PREFIX " status %#x\n", statusByte)); if(statusByte & IDE_STATUS_ERROR) { KdPrint2((PRINT_PREFIX " IDE_STATUS_ERROR -> our\n", statusByte)); - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } else { - return FALSE; + return INTERRUPT_REASON_IGNORE; } } } @@ -3860,7 +3997,7 @@ check_unknown: KdPrint2((PRINT_PREFIX " clear unexpected DMA intr\n")); AtapiDmaDone(deviceExtension, DEVNUM_NOT_SPECIFIED ,lChannel, NULL); // catch it ! - OurInterrupt = 2; + OurInterrupt = INTERRUPT_REASON_UNEXPECTED; } } skip_dma_stat_check: @@ -3868,7 +4005,7 @@ skip_dma_stat_check: AtapiStallExecution(1); } - LunExt = &(deviceExtension->lun[c*2 + chan->cur_cdev]); + LunExt = chan->lun[chan->cur_cdev]; /* if drive is busy it didn't interrupt */ /* the exception is DCS + BSY state of ATAPI devices */ KdPrint2((PRINT_PREFIX " getting status...\n")); @@ -3891,15 +4028,15 @@ skip_dma_stat_check: KdPrint2((PRINT_PREFIX " ATAPI additional check\n")); } else { KdPrint2((PRINT_PREFIX " expecting intr + BUSY (3), non ATAPI\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } if((statusByte & ~IDE_STATUS_DRQ) != (IDE_STATUS_BUSY | IDE_STATUS_DRDY | IDE_STATUS_DSC)) { KdPrint3((PRINT_PREFIX " unexpected status, seems it is not our\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } if(!(LunExt->DeviceFlags & DFLAGS_INT_DRQ) && (statusByte & IDE_STATUS_DRQ)) { KdPrint3((PRINT_PREFIX " unexpected DRQ, seems it is not our\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } EarlyIntr = TRUE; @@ -3909,7 +4046,7 @@ skip_dma_stat_check: /* clear interrupt and get status */ GetBaseStatus(chan, statusByte); KdPrint3((PRINT_PREFIX " base status %#x (+BM_STATUS_INTR)\n", statusByte)); - return TRUE; + return INTERRUPT_REASON_OUR; } if(g_WaitBusyInISR) { @@ -3922,7 +4059,7 @@ skip_dma_stat_check: } if (statusByte & IDE_STATUS_BUSY) { KdPrint2((PRINT_PREFIX " still BUSY, seems it is not our\n")); - return FALSE; + return INTERRUPT_REASON_IGNORE; } } @@ -3974,7 +4111,7 @@ skip_dma_stat_check: //ASSERT(!chan->queue_depth || chan->cur_req); KdPrint2((PRINT_PREFIX "AtapiCheckInterrupt__: exit with TRUE\n")); - return TRUE; + return INTERRUPT_REASON_OUR; } // end AtapiCheckInterrupt__() @@ -4027,7 +4164,7 @@ AtapiInterrupt__( UCHAR TargetId; UCHAR Lun; UCHAR OldReqState = REQ_STATE_NONE; - ULONG ldev; + //ULONG ldev; PHW_LU_EXTENSION LunExt; lChannel = c; @@ -4042,9 +4179,9 @@ AtapiInterrupt__( } if (srb) { - PathId = srb->PathId; + PathId = srb->PathId; TargetId = srb->TargetId; - Lun = srb->Lun; + Lun = srb->Lun; } else { PathId = (UCHAR)c; TargetId = @@ -4052,9 +4189,9 @@ AtapiInterrupt__( goto enqueue_next_req; } - ldev = GET_LDEV2(PathId, TargetId, Lun); - DeviceNumber = (UCHAR)(ldev & 1); - LunExt = &(deviceExtension->lun[ldev]); + //ldev = GET_LDEV2(PathId, TargetId, Lun); + DeviceNumber = (UCHAR)(TargetId); + LunExt = chan->lun[DeviceNumber]; atapiDev = (LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE) ? TRUE : FALSE; KdPrint2((PRINT_PREFIX " dev_type %s\n", atapiDev ? "ATAPI" : "IDE")); @@ -4209,7 +4346,13 @@ ServiceInterrupt: } */ /* clear interrupt and get status */ - GetBaseStatus(chan, statusByte); + + if(deviceExtension->HwFlags & UNIATA_AHCI) { + UniataAhciEndTransaction(HwDeviceExtension, lChannel, DeviceNumber, srb); + statusByte = (UCHAR)(AtaReq->ahci.in_status & 0xff); + } else { + GetBaseStatus(chan, statusByte); + } if(atapiDev) { KdPrint3((PRINT_PREFIX "AtapiInterrupt: ATAPI Entered with status (%#x)\n", statusByte)); } else { @@ -4220,7 +4363,10 @@ ServiceInterrupt: KdPrint2((PRINT_PREFIX " operate like in DPC\n")); InDpc = TRUE; } - + + if(deviceExtension->HwFlags & UNIATA_AHCI) { + KdPrint3((PRINT_PREFIX " AHCI branch\n")); + } else if (!atapiDev) { // IDE if (statusByte & IDE_STATUS_BUSY) { @@ -4257,10 +4403,10 @@ try_dpc_wait: AtapiStallExecution(TimerValue); goto ServiceInterrupt; #endif //UNIATA_CORE - } else + } else if (InDpc && i == k) { // reset the controller. - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX " Resetting due to BUSY on entry - %#x.\n", statusByte)); goto IntrPrepareResetController; @@ -4277,7 +4423,7 @@ try_dpc_wait: AtapiStallExecution(10); } if (statusByte & IDE_STATUS_BUSY) { - //if(chan->ChannelCtrlFlags & CTRFLAGS_DSC_BSY) { + //if(chan->ChannelCtrlFlags & CTRFLAGS_DSC_BSY) {} KdPrint3((PRINT_PREFIX " BUSY on ATAPI device, waiting\n")); for(k=20; k; k--) { GetStatus(chan, statusByte); @@ -4315,7 +4461,7 @@ try_dpc_wait: } } - if(AtaReq && DmaTransfer) { + if(AtaReq && DmaTransfer && !(deviceExtension->HwFlags & UNIATA_AHCI)) { switch(OldReqState) { case REQ_STATE_EARLY_INTR: case REQ_STATE_DPC_WAIT_BUSY0: @@ -4333,7 +4479,11 @@ try_dpc_wait: if ((statusByte & IDE_STATUS_ERROR) || (dma_status & BM_STATUS_ERR)) { - error = AtapiReadPort1(chan, IDX_IO1_i_Error); + if(deviceExtension->HwFlags & UNIATA_AHCI) { + error = (UCHAR)((AtaReq->ahci.in_status >> 8) && 0xff); + } else { + error = AtapiReadPort1(chan, IDX_IO1_i_Error); + } KdPrint2((PRINT_PREFIX "AtapiInterrupt: Error %#x\n", error)); /* if(error & IDE_STATUS_CORRECTED_ERROR) { @@ -4364,7 +4514,7 @@ continue_err: for (k = atapiDev ? 0 : 200; k; k--) { GetStatus(chan, statusByte); if (!(statusByte & IDE_STATUS_DRQ)) { - AtapiStallExecution(100); + AtapiStallExecution(50); } else { break; } @@ -4431,10 +4581,15 @@ continue_err: deviceExtension->HbaCtrlFlags |= HBAFLAGS_DMA_DISABLED_LBA48; } else if(AtaReq->Flags & REQ_FLAG_FORCE_DOWNRATE) { - KdPrint2((PRINT_PREFIX "Some higher mode doesn't work right :((\n")); #ifdef IO_STATISTICS + KdPrint2((PRINT_PREFIX "Some higher mode doesn't work right :((\n")); + KdPrint2((PRINT_PREFIX "Recovery stats[%d]: %d vs %d\n", + AtaReq->retry, + chan->lun[DeviceNumber]->RecoverCount[AtaReq->retry], + chan->lun[DeviceNumber]->BlockIoCount + )); chan->lun[DeviceNumber]->RecoverCount[AtaReq->retry]++; - if(chan->lun[DeviceNumber]->RecoverCount[AtaReq->retry] >= chan->lun[DeviceNumber]->IoCount/3 || + if(chan->lun[DeviceNumber]->RecoverCount[AtaReq->retry] >= chan->lun[DeviceNumber]->BlockIoCount/3 || (deviceExtension->HwFlags & UNIATA_NO80CHK) ) { #else @@ -4446,6 +4601,10 @@ continue_err: } } #ifdef IO_STATISTICS + if(AtaReq->bcount) { + // we need stats for Read/Write operations + chan->lun[DeviceNumber]->BlockIoCount++; + } chan->lun[DeviceNumber]->IoCount++; #endif //IO_STATISTICS @@ -4547,6 +4706,10 @@ IntrPrepareResetController: } KdPrint2((PRINT_PREFIX "AtapiInterrupt: i-reason=%d, status=%#x\n", interruptReason, statusByte)); + if(deviceExtension->HwFlags & UNIATA_AHCI) { + KdPrint2((PRINT_PREFIX " AHCI path\n")); + goto ReturnEnableIntr; + } else if (interruptReason == 0x1 && (statusByte & IDE_STATUS_DRQ)) { // Write the packet. KdPrint3((PRINT_PREFIX "AtapiInterrupt: Writing Atapi packet.\n")); @@ -4556,7 +4719,7 @@ IntrPrepareResetController: if(chan->ChannelCtrlFlags & CTRFLAGS_DMA_OPERATION) { KdPrint2((PRINT_PREFIX "AtapiInterrupt: AtapiDmaStart().\n")); - AtapiDmaStart(HwDeviceExtension, ldev & 1, lChannel, srb); + AtapiDmaStart(HwDeviceExtension, DeviceNumber, lChannel, srb); } goto ReturnEnableIntr; @@ -4578,7 +4741,7 @@ IntrPrepareResetController: KdPrint2((PRINT_PREFIX "AtapiInterrupt: get W wordCount %#x\n", wordCount)); if (wordCount != AtaReq->WordsLeft) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiInterrupt: %d words requested; %d words xferred\n", AtaReq->WordsLeft, wordCount)); @@ -4587,7 +4750,7 @@ IntrPrepareResetController: // Verify this makes sense. if (wordCount > AtaReq->WordsLeft) { wordCount = AtaReq->WordsLeft; - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiInterrupt: Write underrun\n")); DataOverrun = TRUE; } @@ -4614,7 +4777,7 @@ IntrPrepareResetController: // Ensure that this is a write command. if (srb->SrbFlags & SRB_FLAGS_DATA_OUT) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiInterrupt: Write interrupt\n")); statusByte = WaitOnBusy(chan); @@ -4634,7 +4797,7 @@ IntrPrepareResetController: } } else { - KdPrint3((PRINT_PREFIX + KdPrint3((PRINT_PREFIX "AtapiInterrupt: Int reason %#x, but srb is for a write %#x.\n", interruptReason, srb)); @@ -4669,7 +4832,7 @@ IntrPrepareResetController: KdPrint2((PRINT_PREFIX "AtapiInterrupt: get R wordCount %#x\n", wordCount)); if (wordCount != AtaReq->WordsLeft) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiInterrupt: %d words requested; %d words xferred\n", AtaReq->WordsLeft, wordCount)); @@ -4709,7 +4872,7 @@ IntrPrepareResetController: statusByte = WaitOnBusy(chan); if (atapiDev || !(LunExt->DeviceFlags & DFLAGS_DWORDIO_ENABLED) /*!deviceExtension->DWordIO*/) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeIntr: Read %#x words\n", wordCount)); ReadBuffer(chan, @@ -4731,7 +4894,7 @@ IntrPrepareResetController: } } else { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeIntr: Read %#x Dwords\n", wordCount/2)); ReadBuffer2(chan, @@ -4924,7 +5087,7 @@ CompleteRequest: if (status == SRB_STATUS_DATA_OVERRUN) { // Check to see if we at least get mininum number of bytes if ((srb->DataTransferLength - AtaReq->WordsLeft) > - (offsetof (SENSE_DATA, AdditionalSenseLength) + sizeof(senseData->AdditionalSenseLength))) { + (FIELD_OFFSET (SENSE_DATA, AdditionalSenseLength) + sizeof(senseData->AdditionalSenseLength))) { status = SRB_STATUS_SUCCESS; } } @@ -5039,7 +5202,7 @@ PIO_wait_busy: if (i == 5*30) { // reset the controller. - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiInterrupt: Resetting due to BSY still up - %#x.\n", statusByte)); goto IntrPrepareResetController; @@ -5234,7 +5397,7 @@ IntrCompleteReq: KdPrint2((PRINT_PREFIX "AtapiInterrupt: Clear RDP\n")); chan->RDP = FALSE; goto CompleteRDP; - } + } AtapiStallExecution(50); } } @@ -5266,7 +5429,7 @@ reenqueue_req: NULL); } else { ScsiPortNotification(NextLuRequest, - deviceExtension, + deviceExtension, PathId, TargetId, Lun); @@ -5379,7 +5542,7 @@ IdeSendSmartCommand( if (regs->bCommandReg != SMART_CMD) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendSmartCommand: bCommandReg != SMART_CMD\n")); return SRB_STATUS_INVALID_REQUEST; } @@ -5403,7 +5566,7 @@ IdeSendSmartCommand( statusByte = WaitOnBusy(chan); if (statusByte & IDE_STATUS_BUSY) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendSmartCommand: Returning BUSY status\n")); return SRB_STATUS_BUSY; } @@ -5440,7 +5603,7 @@ IdeSendSmartCommand( statusByte = WaitOnBusy(chan); if (statusByte & IDE_STATUS_BUSY) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendSmartCommand: Returning BUSY status\n")); return SRB_STATUS_BUSY; } @@ -5486,8 +5649,6 @@ UniAtaCalculateLBARegs( USHORT cylinder; ULONG tmp; - (*max_bcount) = 0; - if(LunExt->DeviceFlags & DFLAGS_LBA_ENABLED) { if(LunExt->LimitedTransferMode >= ATA_DMA) { if(LunExt->DeviceExtension) { @@ -5512,6 +5673,7 @@ UniAtaCalculateLBARegs( KdPrint2((PRINT_PREFIX "UniAtaCalculateLBARegs: C:H:S=%#x:%#x:%#x, max_bc %#x\n", cylinder, drvSelect, sectorNumber, (*max_bcount))); } + (*max_bcount) = 0; return (ULONG)(sectorNumber&0xff) | (((ULONG)cylinder&0xffff)<<8) | (((ULONG)drvSelect&0xf)<<24); } // end UniAtaCalculateLBARegs() @@ -5574,8 +5736,8 @@ IdeReadWrite( PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]); PHW_LU_EXTENSION LunExt; PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension); - ULONG ldev = GET_LDEV(Srb); - UCHAR DeviceNumber = (UCHAR)(ldev & 1); + //ULONG ldev = GET_LDEV(Srb); + UCHAR DeviceNumber = GET_CDEV(Srb);; ULONG startingSector; ULONG max_bcount; ULONG wordCount = 0; @@ -5583,9 +5745,10 @@ IdeReadWrite( UCHAR cmd; ULONGLONG lba; BOOLEAN use_dma = FALSE; + ULONG fis_size; AtaReq->Flags |= REQ_FLAG_REORDERABLE_CMD; - LunExt = &deviceExtension->lun[ldev]; + LunExt = chan->lun[DeviceNumber]; if((CmdAction & CMD_ACTION_PREPARE) && (AtaReq->ReqState != REQ_STATE_READY_TO_TRANSFER)) { @@ -5650,7 +5813,35 @@ IdeReadWrite( use_dma = FALSE; } } + + if(use_dma && (deviceExtension->HwFlags & UNIATA_AHCI)) { + UniataAhciSetupCmdPtr(AtaReq); + KdPrint2((PRINT_PREFIX "AtapiSendCommand: setup AHCI FIS\n")); + RtlZeroMemory(&(AtaReq->ahci.ahci_cmd_ptr->cfis), sizeof(AtaReq->ahci_cmd0.cfis)); + + fis_size = UniataAhciSetupFIS_H2D(deviceExtension, DeviceNumber, lChannel, + &(AtaReq->ahci.ahci_cmd_ptr->cfis[0]), + (AtaReq->Flags & REQ_FLAG_READ) ? IDE_COMMAND_READ_DMA : /*IDE_COMMAND_WRITE_DMA*/ IDE_COMMAND_READ_DMA, + lba, + (USHORT)(AtaReq->bcount), + 0, + ATA_IMMEDIATE + ); + + if(!fis_size) { + KdPrint3((PRINT_PREFIX "AtapiSendCommand: AHCI !FIS\n")); + return SRB_STATUS_ERROR; + } + + AtaReq->ahci.io_cmd_flags = (USHORT)(((AtaReq->Flags & REQ_FLAG_READ) ? 0 : ATA_AHCI_CMD_WRITE) | + /*((LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE) ? (ATA_AHCI_CMD_ATAPI | ATA_AHCI_CMD_PREFETCH) : 0) |*/ + (fis_size / sizeof(ULONG)) | + (DeviceNumber << 12)); + KdPrint2((PRINT_PREFIX "IdeReadWrite ahci io flags %x: \n", AtaReq->ahci.io_cmd_flags)); + } + AtaReq->ReqState = REQ_STATE_READY_TO_TRANSFER; + } else { // exec_only KdPrint2((PRINT_PREFIX "IdeReadWrite (ExecOnly): \n")); lba = AtaReq->lba; @@ -5660,12 +5851,13 @@ IdeReadWrite( } } if(!(CmdAction & CMD_ACTION_EXEC)) { + return SRB_STATUS_PENDING; } // if this is queued request, reinit DMA and check // if DMA mode is still available - AtapiDmaReinit(deviceExtension, ldev, AtaReq); + AtapiDmaReinit(deviceExtension, LunExt, AtaReq); if (/*EnableDma &&*/ (LunExt->TransferMode >= ATA_DMA)) { use_dma = TRUE; @@ -5708,15 +5900,20 @@ IdeReadWrite( } } + // Send IO command. + KdPrint2((PRINT_PREFIX "IdeReadWrite: Lba %#I64x, Count %#x(%#x)\n", lba, ((Srb->DataTransferLength + 0x1FF) / 0x200), + ((wordCount*2 + DEV_BSIZE-1) / DEV_BSIZE))); if(use_dma) { chan->ChannelCtrlFlags |= CTRFLAGS_DMA_OPERATION; } else { chan->ChannelCtrlFlags &= ~CTRFLAGS_DMA_OPERATION; } - // Send IO command. - KdPrint2((PRINT_PREFIX "IdeReadWrite: Lba %#I64x, Count %#x(%#x)\n", lba, ((Srb->DataTransferLength + 0x1FF) / 0x200), - ((wordCount*2 + DEV_BSIZE-1) / DEV_BSIZE))); + if(use_dma && (deviceExtension->HwFlags & UNIATA_AHCI)) { + //AtapiDmaStart(HwDeviceExtension, DeviceNumber, lChannel, Srb); + UniataAhciBeginTransaction(HwDeviceExtension, DeviceNumber, lChannel, Srb); + return SRB_STATUS_PENDING; + } if ((Srb->SrbFlags & SRB_FLAGS_DATA_IN) || use_dma) { @@ -5777,7 +5974,7 @@ IdeReadWrite( // Write next DEV_BSIZE/2*N words. if (!(LunExt->DeviceFlags & DFLAGS_DWORDIO_ENABLED)) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeReadWrite: Write %#x words\n", wordCount)); WriteBuffer(chan, @@ -5787,7 +5984,7 @@ IdeReadWrite( } else { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeReadWrite: Write %#x Dwords\n", wordCount/2)); WriteBuffer2(chan, @@ -5832,7 +6029,8 @@ IdeVerify( PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]); PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension); PHW_LU_EXTENSION LunExt; - ULONG ldev = GET_LDEV(Srb); + //ULONG ldev = GET_LDEV(Srb); + ULONG DeviceNumber = GET_CDEV(Srb); UCHAR statusByte; ULONG startingSector; ULONG max_bcount; @@ -5841,7 +6039,7 @@ IdeVerify( USHORT sectorCount; ULONGLONG lba; - LunExt = &deviceExtension->lun[ldev]; + LunExt = chan->lun[DeviceNumber]; // Drive has these number sectors. if(!(sectors = (ULONG)(LunExt->NumOfSectors))) { sectors = LunExt->IdentifyData.SectorsPerTrack * @@ -5895,7 +6093,7 @@ IdeVerify( lba = UniAtaCalculateLBARegs(LunExt, startingSector, &max_bcount); - statusByte = AtaCommand48(deviceExtension, ldev & 0x01, GET_CHANNEL(Srb), + statusByte = AtaCommand48(deviceExtension, LunExt->Lun, GET_CHANNEL(Srb), IDE_COMMAND_VERIFY, lba, sectorCount, 0, ATA_IMMEDIATE); @@ -5934,13 +6132,18 @@ AtapiSendCommand( UCHAR lChannel = GET_CHANNEL(Srb); PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]); PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension); - ULONG ldev = GET_LDEV(Srb); + PHW_LU_EXTENSION LunExt; + //ULONG ldev = GET_LDEV(Srb); + ULONG DeviceNumber = GET_CDEV(Srb); ULONG i; ULONG flags; UCHAR statusByte,byteCountLow,byteCountHigh; BOOLEAN use_dma = FALSE; BOOLEAN dma_reinited = FALSE; BOOLEAN retried = FALSE; + ULONG fis_size; + + LunExt = chan->lun[DeviceNumber]; KdPrint3((PRINT_PREFIX "AtapiSendCommand: req state %#x, Action %x\n", AtaReq->ReqState, CmdAction)); if(AtaReq->ReqState < REQ_STATE_PREPARE_TO_TRANSFER) @@ -6024,7 +6227,7 @@ AtapiSendCommand( return SRB_STATUS_BUSY; } // - if (!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_CHANGER_INITED) && + if (!(LunExt->DeviceFlags & DFLAGS_CHANGER_INITED) && !AtaReq->OriginalSrb) { KdPrint2((PRINT_PREFIX "AtapiSendCommand: SRB_STATUS_BUSY (2)\n")); return SRB_STATUS_BUSY; @@ -6080,7 +6283,7 @@ GetLba: if(deviceExtension->opt_AtapiDmaReadWrite) { call_dma_setup: - if(AtapiDmaSetup(HwDeviceExtension, ldev & 1, lChannel, Srb, + if(AtapiDmaSetup(HwDeviceExtension, DeviceNumber, lChannel, Srb, (PUCHAR)(AtaReq->DataBuffer), Srb->DataTransferLength /*((Srb->DataTransferLength + DEV_BSIZE-1) & ~(DEV_BSIZE-1))*/ @@ -6114,7 +6317,7 @@ call_dma_setup: } // try setup DMA if(use_dma) { - if(!AtapiDmaSetup(HwDeviceExtension, ldev & 1, lChannel, Srb, + if(!AtapiDmaSetup(HwDeviceExtension, DeviceNumber, lChannel, Srb, (PUCHAR)(AtaReq->DataBuffer), Srb->DataTransferLength)) { KdPrint2((PRINT_PREFIX "AtapiSendCommand: no dma\n")); @@ -6127,14 +6330,43 @@ call_dma_setup: KdPrint2((PRINT_PREFIX "AtapiSendCommand: zero transfer, no DMA setup\n")); } + + if(deviceExtension->HwFlags & UNIATA_AHCI) { + UniataAhciSetupCmdPtr(AtaReq); + KdPrint2((PRINT_PREFIX "AtapiSendCommand: setup AHCI FIS\n")); + RtlZeroMemory(&(AtaReq->ahci.ahci_cmd_ptr->cfis), sizeof(AtaReq->ahci_cmd0.cfis)); + RtlCopyMemory(&(AtaReq->ahci.ahci_cmd_ptr->acmd), Srb->Cdb, 16); + + fis_size = UniataAhciSetupFIS_H2D(deviceExtension, DeviceNumber, lChannel, + &(AtaReq->ahci.ahci_cmd_ptr->cfis[0]), + IDE_COMMAND_ATAPI_PACKET /* command */, + 0 /* lba */, + (Srb->DataTransferLength >= 0x10000) ? (USHORT)(0xffff) : (USHORT)(Srb->DataTransferLength), + use_dma ? ATA_F_DMA : 0/* feature */, + ATA_IMMEDIATE /* flags */ + ); + + if(!fis_size) { + KdPrint3((PRINT_PREFIX "AtapiSendCommand: AHCI !FIS\n")); + return SRB_STATUS_ERROR; + } + + AtaReq->ahci.io_cmd_flags = (USHORT)(((AtaReq->Flags & REQ_FLAG_READ) ? 0 : ATA_AHCI_CMD_WRITE) | + /*((LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE) ? (ATA_AHCI_CMD_ATAPI | ATA_AHCI_CMD_PREFETCH) : 0) |*/ + (ATA_AHCI_CMD_ATAPI | ATA_AHCI_CMD_PREFETCH) | + (fis_size / sizeof(ULONG)) | + (DeviceNumber << 12)); + KdPrint2((PRINT_PREFIX "AtapiSendCommand ahci io flags %x: \n", AtaReq->ahci.io_cmd_flags)); + } + } else { if(AtaReq->Flags & REQ_FLAG_DMA_OPERATION) { // if this is queued request, reinit DMA and check // if DMA mode is still available KdPrint2((PRINT_PREFIX "AtapiSendCommand: AtapiDmaReinit() (1)\n")); - AtapiDmaReinit(deviceExtension, ldev, AtaReq); + AtapiDmaReinit(deviceExtension, LunExt, AtaReq); if (/*EnableDma &&*/ - (deviceExtension->lun[ldev].TransferMode >= ATA_DMA)) { + (LunExt->TransferMode >= ATA_DMA)) { KdPrint2((PRINT_PREFIX "AtapiSendCommand: use dma (2)\n")); use_dma = TRUE; } else { @@ -6159,13 +6391,13 @@ call_dma_setup: KdPrint2((PRINT_PREFIX "AtapiSendCommand: SCSIOP_REQUEST_SENSE -> no dma setup (2)\n")); use_dma = FALSE; AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION; - //AtapiDmaReinit(deviceExtension, ldev, AtaReq); + //AtapiDmaReinit(deviceExtension, LunExt, AtaReq); } if(AtaReq->TransferLength) { if(!dma_reinited) { KdPrint2((PRINT_PREFIX "AtapiSendCommand: AtapiDmaReinit()\n")); - AtapiDmaReinit(deviceExtension, ldev, AtaReq); + AtapiDmaReinit(deviceExtension, LunExt, AtaReq); if (/*EnableDma &&*/ - (deviceExtension->lun[ldev].TransferMode >= ATA_DMA)) { + (LunExt->TransferMode >= ATA_DMA)) { use_dma = TRUE; } else { AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION; @@ -6178,14 +6410,14 @@ call_dma_setup: AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION; if(!deviceExtension->opt_AtapiDmaZeroTransfer) { KdPrint2((PRINT_PREFIX "AtapiSendCommand: AtapiDmaReinit() to PIO\n")); - AtapiDmaReinit(deviceExtension, ldev, AtaReq); + AtapiDmaReinit(deviceExtension, LunExt, AtaReq); } } KdPrint2((PRINT_PREFIX "AtapiSendCommand: use_dma=%d\n", use_dma)); if(AtaReq->Flags & REQ_FLAG_DMA_OPERATION) { KdPrint2((PRINT_PREFIX " REQ_FLAG_DMA_OPERATION\n")); } - + KdPrint2((PRINT_PREFIX "AtapiSendCommand: CMD_ACTION_EXEC\n")); #ifndef UNIATA_CORE @@ -6195,7 +6427,7 @@ call_dma_setup: // initialize our device extension changer data. That's how we know how // many platters our target has. - if (!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_CHANGER_INITED) && + if (!(LunExt->DeviceFlags & DFLAGS_CHANGER_INITED) && !AtaReq->OriginalSrb) { ULONG srbStatus; @@ -6203,7 +6435,7 @@ call_dma_setup: KdPrint3((PRINT_PREFIX "AtapiSendCommand: BuildMechanismStatusSrb()\n")); // Set this flag now. If the device hangs on the mech. status // command, we will not have the chance to set it. - deviceExtension->lun[ldev].DeviceFlags |= DFLAGS_CHANGER_INITED; + LunExt->DeviceFlags |= DFLAGS_CHANGER_INITED; chan->MechStatusRetryCount = 3; AtaReq->OriginalSrb = Srb; @@ -6231,9 +6463,9 @@ call_dma_setup: Srb->Cdb[0], Srb->TargetId, Srb->Lun)); // Make sure command is to ATAPI device. - flags = deviceExtension->lun[ldev].DeviceFlags; + flags = LunExt->DeviceFlags; if(flags & (DFLAGS_SANYO_ATAPI_CHANGER | DFLAGS_ATAPI_CHANGER)) { - if((Srb->Lun) > (deviceExtension->lun[ldev].DiscsPresent - 1)) { + if((Srb->Lun) > (LunExt->DiscsPresent - 1)) { // Indicate no device found at this address. AtaReq->ReqState = REQ_STATE_TRANSFER_COMPLETE; @@ -6249,8 +6481,19 @@ call_dma_setup: return SRB_STATUS_SELECTION_TIMEOUT; } retry: + if(deviceExtension->HwFlags & UNIATA_AHCI) { + KdPrint2((PRINT_PREFIX "AtapiSendCommand: AHCI, begin transaction\n")); + if(use_dma) { + chan->ChannelCtrlFlags |= CTRFLAGS_DMA_OPERATION; + } else { + chan->ChannelCtrlFlags &= ~CTRFLAGS_DMA_OPERATION; + } + UniataAhciBeginTransaction(HwDeviceExtension, DeviceNumber, lChannel, Srb); + return SRB_STATUS_PENDING; + } + // Select device 0 or 1. - SelectDrive(chan, ldev & 0x1); + SelectDrive(chan, DeviceNumber); // Verify that controller is ready for next command. GetStatus(chan, statusByte); @@ -6320,13 +6563,13 @@ make_reset: AtapiDisableInterrupts(deviceExtension, lChannel); - AtapiSoftReset(chan, ldev & 1); + AtapiSoftReset(chan, DeviceNumber); KdPrint2((PRINT_PREFIX "AtapiSendCommand: Issued soft reset to Atapi device. \n")); // Re-initialize Atapi device. - CheckDevice(HwDeviceExtension, GET_CHANNEL(Srb), ldev & 1, TRUE); + CheckDevice(HwDeviceExtension, GET_CHANNEL(Srb), DeviceNumber, TRUE); /* - IssueIdentify(HwDeviceExtension, ldev & 1, GET_CHANNEL(Srb), + IssueIdentify(HwDeviceExtension, DeviceNumber, GET_CHANNEL(Srb), IDE_COMMAND_ATAPI_IDENTIFY, FALSE); */ // Inform the port driver that the bus has been reset. @@ -6406,37 +6649,40 @@ make_reset: KdPrint3((PRINT_PREFIX "AtapiSendCommand: return SRB_STATUS_PENDING (DRQ)\n")); return SRB_STATUS_PENDING; - } else { + } - // This device quickly sets DRQ when ready to receive the packet. + // This device quickly sets DRQ when ready to receive the packet. - KdPrint2((PRINT_PREFIX "AtapiSendCommand: Poll for int. to send packet. Status (%#x)\n", - statusByte)); + KdPrint2((PRINT_PREFIX "AtapiSendCommand: Poll for int. to send packet. Status (%#x)\n", + statusByte)); - chan->ExpectingInterrupt = TRUE; - AtaReq->ReqState = REQ_STATE_ATAPI_DO_NOTHING_INTR; - InterlockedExchange(&(chan->CheckIntr), - CHECK_INTR_IDLE); + chan->ExpectingInterrupt = TRUE; + AtaReq->ReqState = REQ_STATE_ATAPI_DO_NOTHING_INTR; + InterlockedExchange(&(chan->CheckIntr), + CHECK_INTR_IDLE); - //AtapiDisableInterrupts(deviceExtension, lChannel); + if(g_opt_AtapiSendDisableIntr) { + AtapiDisableInterrupts(deviceExtension, lChannel); + } - // Write ATAPI packet command. - AtapiWritePort1(chan, IDX_IO1_o_Command, IDE_COMMAND_ATAPI_PACKET); + // Write ATAPI packet command. + AtapiWritePort1(chan, IDX_IO1_o_Command, IDE_COMMAND_ATAPI_PACKET); - // Wait for DRQ. - WaitOnBusy(chan); - statusByte = WaitForDrq(chan); + // Wait for DRQ. + WaitOnBusy(chan); + statusByte = WaitForDrq(chan); - // Need to read status register and clear interrupt (if any) - GetBaseStatus(chan, statusByte); + // Need to read status register and clear interrupt (if any) + GetBaseStatus(chan, statusByte); - if (!(statusByte & IDE_STATUS_DRQ)) { + if (!(statusByte & IDE_STATUS_DRQ)) { + if(g_opt_AtapiSendDisableIntr) { AtapiEnableInterrupts(deviceExtension, lChannel); - KdPrint3((PRINT_PREFIX "AtapiSendCommand: DRQ never asserted (%#x)\n", statusByte)); - AtaReq->ReqState = REQ_STATE_TRANSFER_COMPLETE; - return SRB_STATUS_ERROR; } + KdPrint3((PRINT_PREFIX "AtapiSendCommand: DRQ never asserted (%#x)\n", statusByte)); + AtaReq->ReqState = REQ_STATE_TRANSFER_COMPLETE; + return SRB_STATUS_ERROR; } GetStatus(chan, statusByte); @@ -6453,7 +6699,9 @@ make_reset: GetBaseStatus(chan, statusByte); - //AtapiEnableInterrupts(deviceExtension, lChannel); + if(g_opt_AtapiSendDisableIntr) { + AtapiEnableInterrupts(deviceExtension, lChannel); + } WriteBuffer(chan, (PUSHORT)Srb->Cdb, @@ -6461,7 +6709,7 @@ make_reset: 0); if(chan->ChannelCtrlFlags & CTRFLAGS_DMA_OPERATION) { - AtapiDmaStart(HwDeviceExtension, ldev & 1, lChannel, Srb); + AtapiDmaStart(HwDeviceExtension, DeviceNumber, lChannel, Srb); } KdPrint3((PRINT_PREFIX "AtapiSendCommand: ExpectingInterrupt (%#x)\n", chan->ExpectingInterrupt)); @@ -6519,7 +6767,8 @@ IdeSendCommand( ULONG status; ULONG i; PMODE_PARAMETER_HEADER modeData; - ULONG ldev; + //ULONG ldev; + ULONG DeviceNumber; PATA_REQ AtaReq; SetCheckPoint(5); //ULONG __ebp__ = 0; @@ -6552,7 +6801,8 @@ IdeSendCommand( lChannel = GET_CHANNEL(Srb); chan = &(deviceExtension->chan[lChannel]); - ldev = GET_LDEV(Srb); + //ldev = GET_LDEV(Srb); + DeviceNumber = GET_CDEV(Srb); SetCheckPoint(0x40); if(AtaReq->ReqState < REQ_STATE_PREPARE_TO_TRANSFER) @@ -6589,10 +6839,9 @@ IdeSendCommand( // which support up to two devices. if ((Srb->Lun != 0) || (Srb->PathId >= deviceExtension->NumberChannels) || - (Srb->TargetId > 2) /*|| - (!deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT)*/) { + (Srb->TargetId > deviceExtension->NumberLuns)) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_INQUIRY rejected\n")); // Indicate no device found at this address. status = SRB_STATUS_SELECTION_TIMEOUT; @@ -6600,15 +6849,15 @@ IdeSendCommand( } else { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_INQUIRY ok\n")); PINQUIRYDATA inquiryData = (PINQUIRYDATA)(Srb->DataBuffer); - PIDENTIFY_DATA2 identifyData = &(deviceExtension->lun[ldev].IdentifyData); + PIDENTIFY_DATA2 identifyData = &(chan->lun[DeviceNumber]->IdentifyData); - if (!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT)) { - - if(!CheckDevice(HwDeviceExtension, lChannel, ldev & 1, FALSE)) { - KdPrint2((PRINT_PREFIX + if (!(chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + + if(!CheckDevice(HwDeviceExtension, lChannel, DeviceNumber, FALSE)) { + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_INQUIRY rejected (2)\n")); // Indicate no device found at this address. #ifndef NAVO_TEST @@ -6616,11 +6865,11 @@ IdeSendCommand( break; } } else { - if(!UniataAnybodyHome(HwDeviceExtension, lChannel, ldev & 1)) { - KdPrint2((PRINT_PREFIX + if(!UniataAnybodyHome(HwDeviceExtension, lChannel, DeviceNumber)) { + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_INQUIRY device have gone\n")); // Indicate no device found at this address. - UniataForgetDevice(&(deviceExtension->lun[ldev])); + UniataForgetDevice(chan->lun[DeviceNumber]); #endif //NAVO_TEST status = SRB_STATUS_SELECTION_TIMEOUT; break; @@ -6634,15 +6883,15 @@ IdeSendCommand( inquiryData->DeviceType = DIRECT_ACCESS_DEVICE; // Set the removable bit, if applicable. - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_REMOVABLE_DRIVE) { - KdPrint2((PRINT_PREFIX + if (chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_REMOVABLE_DRIVE) { + KdPrint2((PRINT_PREFIX "RemovableMedia\n")); inquiryData->RemovableMedia = 1; } // Set the Relative Addressing (LBA) bit, if applicable. - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_LBA_ENABLED) { + if (chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_LBA_ENABLED) { inquiryData->RelativeAddressing = 1; - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "RelativeAddressing\n")); } // Set the CommandQueue bit @@ -6677,9 +6926,9 @@ IdeSendCommand( // This is used to determine if the media is write-protected. // Since IDE does not support mode sense then we will modify just the portion we need // so the higher level driver can determine if media is protected. - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED) { + if (chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED) { - SelectDrive(chan, ldev & 0x1); + SelectDrive(chan, DeviceNumber); AtapiWritePort1(chan, IDX_IO1_o_Command,IDE_COMMAND_GET_MEDIA_STATUS); statusByte = WaitOnBusy(chan); @@ -6719,13 +6968,13 @@ IdeSendCommand( case SCSIOP_TEST_UNIT_READY: - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_TEST_UNIT_READY PATH:LUN:TID = %#x:%#x:%#x\n", Srb->PathId, Srb->Lun, Srb->TargetId)); - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED) { + if (chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED) { // Select device 0 or 1. - SelectDrive(chan, ldev & 0x1); + SelectDrive(chan, DeviceNumber); AtapiWritePort1(chan, IDX_IO1_o_Command,IDE_COMMAND_GET_MEDIA_STATUS); // Wait for busy. If media has not changed, return success @@ -6766,7 +7015,7 @@ IdeSendCommand( case SCSIOP_READ_CAPACITY: - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "** IdeSendCommand: SCSIOP_READ_CAPACITY PATH:LUN:TID = %#x:%#x:%#x\n", Srb->PathId, Srb->Lun, Srb->TargetId)); // Claim 512 byte blocks (big-endian). @@ -6775,10 +7024,10 @@ IdeSendCommand( MOV_DD_SWP( ((PREAD_CAPACITY_DATA)Srb->DataBuffer)->BytesPerBlock, i ); // Calculate last sector. - if(!(i = (ULONG)deviceExtension->lun[ldev].NumOfSectors)) { - i = deviceExtension->lun[ldev].IdentifyData.SectorsPerTrack * - deviceExtension->lun[ldev].IdentifyData.NumberOfHeads * - deviceExtension->lun[ldev].IdentifyData.NumberOfCylinders; + if(!(i = (ULONG)chan->lun[DeviceNumber]->NumOfSectors)) { + i = chan->lun[DeviceNumber]->IdentifyData.SectorsPerTrack * + chan->lun[DeviceNumber]->IdentifyData.NumberOfHeads * + chan->lun[DeviceNumber]->IdentifyData.NumberOfCylinders; } i--; @@ -6788,12 +7037,12 @@ IdeSendCommand( MOV_DD_SWP( ((PREAD_CAPACITY_DATA)Srb->DataBuffer)->LogicalBlockAddress, i ); - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "** IDE disk %#x - #sectors %#x, #heads %#x, #cylinders %#x\n", Srb->TargetId, - deviceExtension->lun[ldev].IdentifyData.SectorsPerTrack, - deviceExtension->lun[ldev].IdentifyData.NumberOfHeads, - deviceExtension->lun[ldev].IdentifyData.NumberOfCylinders)); + chan->lun[DeviceNumber]->IdentifyData.SectorsPerTrack, + chan->lun[DeviceNumber]->IdentifyData.NumberOfHeads, + chan->lun[DeviceNumber]->IdentifyData.NumberOfCylinders)); status = SRB_STATUS_SUCCESS; @@ -6801,7 +7050,7 @@ IdeSendCommand( case SCSIOP_VERIFY: - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_VERIFY PATH:LUN:TID = %#x:%#x:%#x\n", Srb->PathId, Srb->Lun, Srb->TargetId)); status = IdeVerify(HwDeviceExtension,Srb); @@ -6811,7 +7060,7 @@ IdeSendCommand( case SCSIOP_READ: case SCSIOP_WRITE: - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_%s PATH:LUN:TID = %#x:%#x:%#x\n", (Srb->Cdb[0] == SCSIOP_WRITE) ? "WRITE" : "READ", Srb->PathId, Srb->Lun, Srb->TargetId)); @@ -6823,7 +7072,7 @@ IdeSendCommand( case SCSIOP_START_STOP_UNIT: - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_START_STOP_UNIT PATH:LUN:TID = %#x:%#x:%#x\n", Srb->PathId, Srb->Lun, Srb->TargetId)); //Determine what type of operation we should perform @@ -6834,7 +7083,7 @@ IdeSendCommand( statusByte = WaitOnBaseBusy(chan); // Eject media, // first select device 0 or 1. - SelectDrive(chan, ldev & 0x1); + SelectDrive(chan, DeviceNumber); AtapiWritePort1(chan, IDX_IO1_o_Command,IDE_COMMAND_MEDIA_EJECT); } status = SRB_STATUS_SUCCESS; @@ -6846,7 +7095,7 @@ IdeSendCommand( statusByte = WaitOnBaseBusy(chan); - SelectDrive(chan, ldev & 0x1); + SelectDrive(chan, DeviceNumber); if (cdb->MEDIA_REMOVAL.Prevent == TRUE) { AtapiWritePort1(chan, IDX_IO1_o_Command,IDE_COMMAND_DOOR_LOCK); } else { @@ -6863,7 +7112,7 @@ IdeSendCommand( case SCSIOP_FLUSH_BUFFER: case SCSIOP_SYNCHRONIZE_CACHE: - SelectDrive(chan, ldev & 0x1); + SelectDrive(chan, DeviceNumber); AtapiWritePort1(chan, IDX_IO1_o_Command,IDE_COMMAND_FLUSH_CACHE); status = SRB_STATUS_SUCCESS; // status = SRB_STATUS_PENDING; @@ -6875,10 +7124,10 @@ IdeSendCommand( // this function makes sense buffers to report the results // of the original GET_MEDIA_STATUS command - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_REQUEST_SENSE PATH:LUN:TID = %#x:%#x:%#x\n", Srb->PathId, Srb->Lun, Srb->TargetId)); - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED) { + if (chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED) { status = IdeBuildSenseBuffer(HwDeviceExtension,Srb); break; } @@ -6891,7 +7140,7 @@ IdeSendCommand( PIDEREGS_EX regs; BOOLEAN use_dma = FALSE; ULONG to_lim; - + regs = (PIDEREGS_EX) &(Srb->Cdb[2]); lChannel = Srb->TargetId >> 1; @@ -6901,7 +7150,7 @@ IdeSendCommand( if((regs->bOpFlags & 1) == 0) { // execute ATA command - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: SCSIOP_START_STOP_UNIT PATH:LUN:TID = %#x:%#x:%#x\n", Srb->PathId, Srb->Lun, Srb->TargetId)); @@ -6942,7 +7191,7 @@ IdeSendCommand( AtapiWritePort1(chan, IDX_IO1_o_CylinderHigh, regs->bCylHighReg); } AtapiWritePort1(chan, IDX_IO1_o_Command, regs->bCommandReg); - + if(use_dma) { GetBaseStatus(chan, statusByte); if(statusByte & IDE_STATUS_ERROR) { @@ -7057,7 +7306,7 @@ passthrough_err: default: - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeSendCommand: Unsupported command %#x\n", Srb->Cdb[0])); @@ -7095,12 +7344,12 @@ NTAPI IdeMediaStatus( BOOLEAN EnableMSN, IN PVOID HwDeviceExtension, - UCHAR ldev + IN ULONG lChannel, + IN ULONG DeviceNumber ) { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; PHW_CHANNEL chan; - UCHAR lChannel = ldev >> 1; UCHAR statusByte,errorByte; chan = &(deviceExtension->chan[lChannel]); @@ -7108,10 +7357,10 @@ IdeMediaStatus( if (EnableMSN == TRUE){ // If supported enable Media Status Notification support - if ((deviceExtension->lun[ldev].DeviceFlags & DFLAGS_REMOVABLE_DRIVE)) { + if ((chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_REMOVABLE_DRIVE)) { // enable - statusByte = AtaCommand(deviceExtension, ldev & 1, lChannel, + statusByte = AtaCommand(deviceExtension, DeviceNumber, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_ENAB_MEDIASTAT, ATA_WAIT_BASE_READY); @@ -7119,12 +7368,12 @@ IdeMediaStatus( // Read the error register. errorByte = AtapiReadPort1(chan, IDX_IO1_i_Error); - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "IdeMediaStatus: Error enabling media status. Status %#x, error byte %#x\n", statusByte, errorByte)); } else { - deviceExtension->lun[ldev].DeviceFlags |= DFLAGS_MEDIA_STATUS_ENABLED; + chan->lun[DeviceNumber]->DeviceFlags |= DFLAGS_MEDIA_STATUS_ENABLED; KdPrint2((PRINT_PREFIX "IdeMediaStatus: Media Status Notification Supported\n")); chan->ReturningMediaStatus = 0; @@ -7134,12 +7383,12 @@ IdeMediaStatus( } else { // end if EnableMSN == TRUE // disable if previously enabled - if ((deviceExtension->lun[ldev].DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)) { + if ((chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)) { - statusByte = AtaCommand(deviceExtension, ldev & 1, lChannel, + statusByte = AtaCommand(deviceExtension, DeviceNumber, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_DIS_MEDIASTAT, ATA_WAIT_BASE_READY); - deviceExtension->lun[ldev].DeviceFlags &= ~DFLAGS_MEDIA_STATUS_ENABLED; + chan->lun[DeviceNumber]->DeviceFlags &= ~DFLAGS_MEDIA_STATUS_ENABLED; } @@ -7223,19 +7472,20 @@ NTAPI UniataUserDeviceReset( PHW_DEVICE_EXTENSION deviceExtension, PHW_LU_EXTENSION LunExt, - ULONG PathId, - ULONG ldev + ULONG PathId ) { + ULONG i; AtapiDisableInterrupts(deviceExtension, PathId); if (LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE) { KdPrint2((PRINT_PREFIX "UniataUserDeviceReset: Reset ATAPI\n")); - AtapiSoftReset(&(deviceExtension->chan[PathId]), ldev & 1); + AtapiSoftReset(&(deviceExtension->chan[PathId]), LunExt->Lun); } else { KdPrint2((PRINT_PREFIX "UniataUserDeviceReset: Reset IDE -> reset entire channel\n")); AtapiResetController__(deviceExtension, PathId, RESET_COMPLETE_NONE); - deviceExtension->chan[PathId].lun[0]->DeviceFlags |= DFLAGS_REINIT_DMA; - deviceExtension->chan[PathId].lun[1]->DeviceFlags |= DFLAGS_REINIT_DMA; + for(i=0; iNumberLuns; i++) { + deviceExtension->chan[PathId].lun[i]->DeviceFlags |= DFLAGS_REINIT_DMA; + } } LunExt->DeviceFlags |= DFLAGS_REINIT_DMA; // force PIO/DMA reinit AtapiEnableInterrupts(deviceExtension, PathId); @@ -7316,8 +7566,10 @@ AtapiStartIo__( PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; UCHAR lChannel; PHW_CHANNEL chan; + PHW_LU_EXTENSION LunExt; ULONG status; - ULONG ldev; + //ULONG ldev; + ULONG DeviceNumber; UCHAR PathId; UCHAR TargetId; UCHAR Lun; @@ -7336,7 +7588,7 @@ AtapiStartIo__( /* KeBugCheckEx(0xc000000e, (Srb->PathId<<16) | (Srb->TargetId<<8) | (Srb->Lun), - Srb->Function, + Srb->Function, TopLevel, 0x80000001); */ if(TopLevel && Srb && Srb->SrbExtension) { @@ -7347,13 +7599,15 @@ AtapiStartIo__( do { lChannel = GET_CHANNEL(Srb); - chan = &(deviceExtension->chan[lChannel]); - ldev = GET_LDEV(Srb); + //ldev = GET_LDEV(Srb); + chan = NULL; + LunExt = NULL; + DeviceNumber = GET_CDEV(Srb); //ASSERT(deviceExtension); //ASSERT(chan); - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "** AtapiStartIo: Function %#x, PATH:LUN:TID = %#x:%#x:%#x\n", Srb->Function, Srb->PathId, Srb->Lun, Srb->TargetId)); KdPrint2((PRINT_PREFIX " VendorID+DeviceID/Rev %#x/%#x\n", deviceExtension->DevID, deviceExtension->RevID)); @@ -7385,9 +7639,8 @@ AtapiStartIo__( commPort = TRUE; /* Pass IOCTL request down */ } else - if(GET_CDEV(Srb) >= 2 || - ldev >= deviceExtension->NumberChannels*2 || - lChannel >= deviceExtension->NumberChannels || + if(lChannel >= deviceExtension->NumberChannels || + Srb->TargetId /*DeviceNumber*/ >= deviceExtension->NumberLuns || Srb->Lun) { if(lChannel >= deviceExtension->NumberChannels) { @@ -7395,8 +7648,8 @@ AtapiStartIo__( } reject_srb: - //if(!CheckDevice(HwDeviceExtension, lChannel, ldev & 1, FALSE)) { - KdPrint3((PRINT_PREFIX + //if(!CheckDevice(HwDeviceExtension, lChannel, DeviceNumber, FALSE)) { + KdPrint3((PRINT_PREFIX "AtapiStartIo: SRB rejected\n")); // Indicate no device found at this address. KdPrint2((PRINT_PREFIX "SRB_STATUS_SELECTION_TIMEOUT\n")); @@ -7405,17 +7658,26 @@ reject_srb: //} } - atapiDev = (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_ATAPI_DEVICE) ? TRUE : FALSE; + if(!commPort) { + chan = &(deviceExtension->chan[lChannel]); + LunExt = chan->lun[DeviceNumber]; + if(!LunExt) { + goto reject_srb; + } + atapiDev = (LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE) ? TRUE : FALSE; + } else { + atapiDev = FALSE; + } #ifdef _DEBUG - if(!commPort && !(chan->lun[ldev & 1])) { + if(!commPort && !LunExt) { #if 0 PrintNtConsole("de = %#x, chan = %#x , dev %#x, nchan %#x\n", deviceExtension, - chan, ldev & 1, + chan, DeviceNumber, deviceExtension->NumberChannels); - PrintNtConsole("lchan = %#x, ldev %#x, cdev %#x, lun0 %#x\n", - lChannel, ldev, GET_CDEV(Srb), deviceExtension->chan[0].lun[0]); + PrintNtConsole("lchan = %#x, cdev %#x, lun0 %#x\n", + lChannel, GET_CDEV(Srb), deviceExtension->chan[0].lun[0]); PrintNtConsole("Function %#x, PATH:LUN:TID = %#x:%#x:%#x\n", Srb->Function, Srb->PathId, Srb->Lun, Srb->TargetId); #endif //0 @@ -7434,7 +7696,7 @@ reject_srb: case SRB_FUNCTION_EXECUTE_SCSI: - if(!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + if(!LunExt || !(LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT)) { if(Srb->Cdb[0] == SCSIOP_ATA_PASSTHROUGH) { // let passthrough go } else @@ -7442,8 +7704,8 @@ reject_srb: // let INQUIRY go } else { - //if(!CheckDevice(HwDeviceExtension, lChannel, ldev & 1, FALSE)) { - KdPrint2((PRINT_PREFIX + //if(!CheckDevice(HwDeviceExtension, lChannel, DeviceNumber, FALSE)) { + KdPrint2((PRINT_PREFIX "AtapiStartIo: EXECUTE_SCSI rejected (2)\n")); // Indicate no device found at this address. KdPrint2((PRINT_PREFIX "SRB_STATUS_SELECTION_TIMEOUT\n")); @@ -7486,14 +7748,14 @@ reject_srb: } /*KeBugCheckEx(0xc000000e, (Srb->PathId<<16) | (Srb->TargetId<<8) | (Srb->Lun), - Srb->Function, + Srb->Function, status, 0x80000001);*/ if(status == SRB_STATUS_BUSY) status = SRB_STATUS_PENDING; // Insert requests AFTER they have been initialized on // CMD_ACTION_PREPARE stage // we should not check TopLevel here (it is always TRUE) - //ASSERT(chan->lun[GET_LDEV(Srb) & 1]); + //ASSERT(chan->lun[GET_CDEV(Srb)]); UniataQueueRequest(chan, Srb); KdPrint2((PRINT_PREFIX "AtapiStartIo: Already have %d request(s)!\n", chan->queue_depth)); @@ -7506,7 +7768,7 @@ reject_srb: AtaReq = (PATA_REQ)(Srb->SrbExtension); KdPrint2((PRINT_PREFIX "TopLevel (3), AtaReq %#x\n", AtaReq)); //ASSERT(!AtaReq->Flags); - //ASSERT(chan->lun[GET_LDEV(Srb) & 1]); + //ASSERT(chan->lun[GET_CDEV(Srb)]); UniataQueueRequest(chan, Srb); // AtaReq = (PATA_REQ)(Srb->SrbExtension); //ASSERT(!AtaReq->Flags); @@ -7515,14 +7777,17 @@ reject_srb: } #ifndef NAVO_TEST - if(!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + if(!LunExt || !(LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + if(!LunExt) { + goto reject_srb; + } if(Srb->Cdb[0] == SCSIOP_INQUIRY) { - if(UniataAnybodyHome(deviceExtension, chan->lChannel, ldev & 1)) { - if(!CheckDevice(HwDeviceExtension, chan->lChannel, ldev & 1, TRUE)) { + if(UniataAnybodyHome(deviceExtension, chan->lChannel, DeviceNumber)) { + if(!CheckDevice(HwDeviceExtension, chan->lChannel, DeviceNumber, TRUE)) { goto reject_srb; } } - if(!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + if(!(LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT)) { goto reject_srb; } } else @@ -7557,7 +7822,7 @@ reject_srb: } /* KeBugCheckEx(0xc000000e, (Srb->PathId<<16) | (Srb->TargetId<<8) | (Srb->Lun), - Srb->Function, + Srb->Function, status, 0x80000002);*/ } @@ -7636,7 +7901,7 @@ reject_srb: // Note: reset is immediate command, it cannot be queued since it is usually used to // revert not- responding device to operational state KdPrint2((PRINT_PREFIX "AtapiStartIo: Reset device request received\n")); - UniataUserDeviceReset(deviceExtension, &(deviceExtension->lun[ldev]), lChannel, ldev); + UniataUserDeviceReset(deviceExtension, LunExt, lChannel); status = SRB_STATUS_SUCCESS; break; @@ -7666,9 +7931,9 @@ do_bus_reset: case SRB_FUNCTION_SHUTDOWN: KdPrint2((PRINT_PREFIX "AtapiStartIo: Shutdown\n")); - if(!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT)) { + if(!LunExt || !(LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT)) { KdPrint2((PRINT_PREFIX "AtapiStartIo: Shutdown - no such device\n")); - } + } else if(atapiDev) { // FLUSH ATAPI device - do nothing KdPrint2((PRINT_PREFIX "AtapiStartIo: Shutdown - ATAPI device\n")); @@ -7676,35 +7941,35 @@ do_bus_reset: // FLUSH IDE/ATA device KdPrint2((PRINT_PREFIX "AtapiStartIo: Shutdown - IDE device\n")); AtapiDisableInterrupts(deviceExtension, lChannel); - status = AtaCommand(deviceExtension, ldev & 1, GET_CHANNEL(Srb), + status = AtaCommand(deviceExtension, DeviceNumber, GET_CHANNEL(Srb), IDE_COMMAND_FLUSH_CACHE, 0, 0, 0, 0, 0, ATA_WAIT_IDLE); // If supported & allowed, reset write cacheing - if(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_WCACHE_ENABLED) { + if(LunExt->DeviceFlags & DFLAGS_WCACHE_ENABLED) { // Disable write cache - status = AtaCommand(deviceExtension, ldev & 1, lChannel, + status = AtaCommand(deviceExtension, DeviceNumber, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_DIS_WCACHE, ATA_WAIT_BASE_READY); // Check for errors. if (status & IDE_STATUS_ERROR) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiHwInitialize: Disable write cacheing on Device %d failed\n", - ldev)); + DeviceNumber)); } - deviceExtension->lun[ldev].DeviceFlags &= ~DFLAGS_WCACHE_ENABLED; + LunExt->DeviceFlags &= ~DFLAGS_WCACHE_ENABLED; // Re-enable write cache - status = AtaCommand(deviceExtension, ldev & 1, lChannel, + status = AtaCommand(deviceExtension, DeviceNumber, lChannel, IDE_COMMAND_SET_FEATURES, 0, 0, 0, 0, ATA_C_F_ENAB_WCACHE, ATA_WAIT_BASE_READY); // Check for errors. if (status & IDE_STATUS_ERROR) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiHwInitialize: Enable write cacheing on Device %d failed\n", - ldev)); - deviceExtension->lun[ldev].DeviceFlags &= ~DFLAGS_WCACHE_ENABLED; + DeviceNumber)); + LunExt->DeviceFlags &= ~DFLAGS_WCACHE_ENABLED; } else { - deviceExtension->lun[ldev].DeviceFlags |= DFLAGS_WCACHE_ENABLED; + LunExt->DeviceFlags |= DFLAGS_WCACHE_ENABLED; } } @@ -7736,10 +8001,10 @@ do_bus_reset: return FALSE; } - if (deviceExtension->lun[ldev].DeviceFlags & DFLAGS_ATAPI_DEVICE) { + if (LunExt->DeviceFlags & DFLAGS_ATAPI_DEVICE) { status = SRB_STATUS_SUCCESS; } else { - status = AtaCommand(deviceExtension, ldev & 1, GET_CHANNEL(Srb), + status = AtaCommand(deviceExtension, GET_CDEV(Srb), GET_CHANNEL(Srb), IDE_COMMAND_FLUSH_CACHE, 0, 0, 0, 0, 0, ATA_WAIT_INTR); if (status & IDE_STATUS_DRQ) { status = SRB_STATUS_SUCCESS; @@ -7792,7 +8057,7 @@ do_bus_reset: break; } - if (!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_DEVICE_PRESENT) || + if (!(LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT) || atapiDev) { status = SRB_STATUS_SELECTION_TIMEOUT; @@ -7809,12 +8074,12 @@ do_bus_reset: if (deviceExtension->NumberChannels == 1) { if (chan->PrimaryAddress) { - deviceNumber = 1 << ldev; + deviceNumber = 1 << DeviceNumber; } else { - deviceNumber = 4 << ldev; + deviceNumber = 4 << DeviceNumber; } } else { - deviceNumber = 1 << ldev; + deviceNumber = (1 << DeviceNumber) << lChannel; } versionParameters->bIDEDeviceMap = deviceNumber; @@ -7936,48 +8201,52 @@ do_bus_reset: if(!AtapiStringCmp( (PCHAR)(((PSRB_IO_CONTROL)(Srb->DataBuffer))->Signature),"-UNIATA-", sizeof("-UNIATA-")-1)) { PUNIATA_CTL AtaCtl = (PUNIATA_CTL)(Srb->DataBuffer); - ULONG ldev = GET_LDEV2(AtaCtl->addr.PathId, AtaCtl->addr.TargetId, 0); - PHW_LU_EXTENSION LunExt; + //ULONG ldev = GET_LDEV2(AtaCtl->addr.PathId, AtaCtl->addr.TargetId, 0); + ULONG DeviceNumber = AtaCtl->addr.TargetId; BOOLEAN bad_ldev; ULONG i; //chan = &(deviceExtension->chan[lChannel]); if(AtaCtl->addr.Lun || - ldev >= deviceExtension->NumberChannels*2 || + AtaCtl->addr.TargetId >= deviceExtension->NumberLuns || AtaCtl->addr.PathId >= deviceExtension->NumberChannels) { + chan = NULL; bad_ldev = TRUE; LunExt = NULL; } else { bad_ldev = FALSE; - LunExt = &(deviceExtension->lun[ldev]); lChannel = AtaCtl->addr.PathId; chan = &(deviceExtension->chan[lChannel]); + LunExt = chan->lun[DeviceNumber]; } - KdPrint2((PRINT_PREFIX "AtapiStartIo: -UNIATA- %#x, ldev %#x\n", AtaCtl->hdr.ControlCode, ldev)); + KdPrint2((PRINT_PREFIX "AtapiStartIo: -UNIATA- %#x, dev %#x\n", AtaCtl->hdr.ControlCode, DeviceNumber)); /* check for valid LUN */ switch (AtaCtl->hdr.ControlCode) { case IOCTL_SCSI_MINIPORT_UNIATA_FIND_DEVICES: case IOCTL_SCSI_MINIPORT_UNIATA_RESET_DEVICE: + // this would be BUS reset if(bad_ldev && (AtaCtl->addr.PathId >= deviceExtension->NumberChannels || AtaCtl->addr.TargetId != 0xff || AtaCtl->addr.Lun != 0 )) { if(AtaCtl->hdr.ControlCode == IOCTL_SCSI_MINIPORT_UNIATA_FIND_DEVICES && - ldev < deviceExtension->NumberChannels*2) { // AtaCtl->addr.TargetId != 0xff - LunExt = &(deviceExtension->lun[ldev]); + DeviceNumber < deviceExtension->NumberLuns) { // AtaCtl->addr.TargetId != 0xff + lChannel = AtaCtl->addr.PathId; + chan = &(deviceExtension->chan[lChannel]); + LunExt = chan->lun[DeviceNumber]; // OK } else { goto handle_bad_ldev; } + } else { + lChannel = AtaCtl->addr.PathId; + chan = &(deviceExtension->chan[lChannel]); } - // this would be BUS reset - lChannel = AtaCtl->addr.PathId; - chan = &(deviceExtension->chan[lChannel]); break; case IOCTL_SCSI_MINIPORT_UNIATA_DELETE_DEVICE: case IOCTL_SCSI_MINIPORT_UNIATA_SET_MAX_MODE: @@ -8034,7 +8303,7 @@ uata_ctl_queue: if(AtaCtl->FindDelDev.Flags & UNIATA_ADD_FLAGS_UNHIDE) { KdPrint2((PRINT_PREFIX "AtapiStartIo: unhide from further detection\n")); if(AtaCtl->addr.TargetId != 0xff) { - deviceExtension->lun[ldev].DeviceFlags &= ~DFLAGS_HIDDEN; + LunExt->DeviceFlags &= ~DFLAGS_HIDDEN; } else { } } @@ -8055,10 +8324,10 @@ uata_ctl_queue: KdPrint2((PRINT_PREFIX "AtapiStartIo: remove %#x:%#x\n", AtaCtl->addr.PathId, AtaCtl->addr.TargetId)); - deviceExtension->lun[ldev].DeviceFlags = 0; + LunExt->DeviceFlags = 0; if(AtaCtl->FindDelDev.Flags & UNIATA_REMOVE_FLAGS_HIDE) { KdPrint2((PRINT_PREFIX "AtapiStartIo: hide from further detection\n")); - deviceExtension->lun[ldev].DeviceFlags |= DFLAGS_HIDDEN; + LunExt->DeviceFlags |= DFLAGS_HIDDEN; } for(i=0; iFindDelDev.WaitForPhysicalLink && i<30; i++) { @@ -8088,10 +8357,10 @@ uata_ctl_queue: LunExt->DeviceFlags |= DFLAGS_REINIT_DMA; // force PIO/DMA reinit if(AtaCtl->SetMode.ApplyImmediately) { - AtapiDmaInit__(deviceExtension, ldev); + AtapiDmaInit__(deviceExtension, LunExt); } -/* deviceExtension->lun[ldev].TransferMode = - deviceExtension->lun[ldev].LimitedTransferMode = (UCHAR)(setTransferMode->Mode);*/ +/* LunExt->TransferMode = + LunExt->LimitedTransferMode = (UCHAR)(setTransferMode->Mode);*/ status = SRB_STATUS_SUCCESS; break; } @@ -8106,11 +8375,24 @@ uata_ctl_queue: status = SRB_STATUS_SUCCESS; break; } + case IOCTL_SCSI_MINIPORT_UNIATA_GET_VERSION: { + + KdPrint2((PRINT_PREFIX "AtapiStartIo: Get version\n")); + + AtaCtl->Version.Length = sizeof(GETDRVVERSION); + AtaCtl->Version.VersionMj = UNIATA_VER_MJ; + AtaCtl->Version.VersionMn = UNIATA_VER_MN; + AtaCtl->Version.SubVerMj = UNIATA_VER_SUB_MJ; + AtaCtl->Version.SubVerMn = UNIATA_VER_SUB_MN; + + status = SRB_STATUS_SUCCESS; + break; + } case IOCTL_SCSI_MINIPORT_UNIATA_ADAPTER_INFO: { KdPrint2((PRINT_PREFIX "AtapiStartIo: Get adapter info\n")); - AtaCtl->AdapterInfo.HeaderLength = offsetof(ADAPTERINFO, Chan); + AtaCtl->AdapterInfo.HeaderLength = FIELD_OFFSET(ADAPTERINFO, Chan); if(len < AtaCtl->AdapterInfo.HeaderLength + sizeof(AtaCtl->AdapterInfo.Chan)) { KdPrint2((PRINT_PREFIX "AtapiStartIo: Buffer too small: %#x < %#x\n", len, @@ -8137,11 +8419,13 @@ uata_ctl_queue: AtaCtl->AdapterInfo.InterruptMode = deviceExtension->InterruptMode; AtaCtl->AdapterInfo.BusInterruptVector = deviceExtension->BusInterruptVector; AtaCtl->AdapterInfo.NumberChannels = deviceExtension->NumberChannels; + AtaCtl->AdapterInfo.NumberLuns = (UCHAR)deviceExtension->NumberLuns; AtaCtl->AdapterInfo.AdapterInterfaceType = deviceExtension->AdapterInterfaceType; if(deviceExtension->FullDevName) { strncpy(AtaCtl->AdapterInfo.DeviceName, deviceExtension->FullDevName, 64); } AtaCtl->AdapterInfo.ChanInfoValid = FALSE; + AtaCtl->AdapterInfo.LunInfoValid = FALSE; RtlZeroMemory(&AtaCtl->AdapterInfo.Chan, sizeof(AtaCtl->AdapterInfo.Chan)); @@ -8149,7 +8433,7 @@ uata_ctl_queue: break; } case IOCTL_SCSI_MINIPORT_UNIATA_RESETBB: { - + KdPrint2((PRINT_PREFIX "AtapiStartIo: Forget BB list\n")); ForgetBadBlocks(LunExt); @@ -8164,7 +8448,7 @@ uata_ctl_queue: if(bad_ldev) { goto do_bus_reset; } else { - UniataUserDeviceReset(deviceExtension, LunExt, AtaCtl->addr.PathId, ldev); + UniataUserDeviceReset(deviceExtension, LunExt, AtaCtl->addr.PathId); } status = SRB_STATUS_SUCCESS; @@ -8206,7 +8490,7 @@ complete_req: if (status != SRB_STATUS_PENDING) { - KdPrint2((PRINT_PREFIX + KdPrint2((PRINT_PREFIX "AtapiStartIo: Srb %#x complete with status %#x\n", Srb, status)); @@ -8245,7 +8529,7 @@ complete_req: NULL); ScsiPortNotification(NextLuRequest, - deviceExtension, + deviceExtension, PathId, TargetId, Lun); @@ -8401,6 +8685,9 @@ DriverEntry( PUNICODE_STRING RegistryPath = (PUNICODE_STRING)Argument2; BOOLEAN ReEnter = FALSE; WCHAR a; +#ifndef USE_REACTOS_DDK + NTSTATUS status; +#endif PCONFIGURATION_INFORMATION GlobalConfig = IoGetConfigurationInformation(); BOOLEAN PrimaryClaimed = FALSE; @@ -8419,7 +8706,21 @@ DriverEntry( if(!SavedDriverObject) { SavedDriverObject = (PDRIVER_OBJECT)DriverObject; +#ifdef USE_REACTOS_DDK KdPrint(("UniATA Init: OS should be ReactOS\n")); + MajorVersion=0x04; + MinorVersion=0x01; + BuildNumber=1; +#else + // we are here for the 1st time + // init CrossNT and get OS version + if(!NT_SUCCESS(status = CrNtInit(SavedDriverObject, RegistryPath))) { + KdPrint(("UniATA Init: CrNtInit failed with status %#x\n", status)); + //HalDisplayString((PUCHAR)"DbgPrnHkInitialize: CrNtInit failed\n"); + return status; + } +#endif // USE_REACTOS_DDK + KdPrint(("UniATA Init: OS ver %x.%x (%d)\n", MajorVersion, MinorVersion, BuildNumber)); KeQuerySystemTime(&t0); do { @@ -8506,7 +8807,34 @@ DriverEntry( KdPrint2((PRINT_PREFIX "\n\nATAPI IDE enum supported BusMaster Devices\n")); if(!ReEnter) { + + g_opt_VirtualMachine = AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"VirtualMachineType", g_opt_VirtualMachine); + if(g_opt_VirtualMachine > VM_MAX_KNOWN) { + g_opt_VirtualMachine = 0; + } + if(AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"VirtualBox", (g_opt_VirtualMachine == VM_VBOX))) { + g_opt_VirtualMachine = VM_VBOX; + } + // Pre-scan PCI bus, also check if we are under VM UniataEnumBusMasterController(DriverObject, Argument2); + + switch(g_opt_VirtualMachine) { + case VM_VBOX: + // adjust options for VirtualBox + g_opt_WaitBusyCount = 20000; + g_opt_WaitBusyDelay = 150; + g_opt_WaitDrqDelay = 100; + g_opt_AtapiSendDisableIntr = 0; + g_opt_AtapiDmaRawRead = FALSE; + break; + } + + g_opt_WaitBusyCount = AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"WaitBusyCount", g_opt_WaitBusyCount); // 200 vs 20000 + g_opt_WaitBusyDelay = AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"WaitBusyDelay", g_opt_WaitBusyDelay); // 10 vs 150 + g_opt_WaitDrqDelay = AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"WaitDrqDelay", g_opt_WaitDrqDelay); // 10 vs 100 + g_opt_AtapiSendDisableIntr = (BOOLEAN)AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"AtapiSendDisableIntr", g_opt_AtapiSendDisableIntr); // 1 vs 0 + g_opt_AtapiDmaRawRead = (BOOLEAN)AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"AtapiDmaRawRead", g_opt_AtapiDmaRawRead); // 1 vs 0 + } // Look for legacy ISA-bridged PCI IDE controller (onboard) @@ -8540,6 +8868,8 @@ DriverEntry( if(g_opt_Verbose) { _PrintNtConsole("Init standard Dual-channel PCI ATA controller:"); } + + for(alt = 0; alt < (ULONG)(WinVer_WDM_Model ? 1 : 2) ; alt++) { for(c=0; c<2; c++) { @@ -8589,16 +8919,6 @@ DriverEntry( &hwInitializationData.comm, (PVOID)(i | (alt ? 0x80000000 : 0))); KdPrint2((PRINT_PREFIX "ScsiPortInitialize Status %#x\n", newStatus)); - if(newStatus == (ULONG)STATUS_DEVICE_DOES_NOT_EXIST && BMList[i].NeedAltInit) { - KdPrint2((PRINT_PREFIX "STATUS_DEVICE_DOES_NOT_EXIST, try workaround\n")); - hwInitializationData.comm.AdapterInterfaceType = Isa; - newStatus = ScsiPortInitialize(DriverObject, - Argument2, - &hwInitializationData.comm, - (PVOID)(i | 0x80000000)); - KdPrint2((PRINT_PREFIX "ScsiPortInitialize Status %#x (2)\n", newStatus)); - } - if (newStatus < statusToReturn) { statusToReturn = newStatus; } @@ -8661,7 +8981,7 @@ DriverEntry( /* KeBugCheckEx(0xc000000e, (i << 16) | BMList[0].ChanInitOk, - c, + c, newStatus, statusToReturn);*/ // Look for PCI IDE controller @@ -8701,6 +9021,20 @@ DriverEntry( &hwInitializationData.comm, (PVOID)i); KdPrint2((PRINT_PREFIX "ScsiPortInitialize Status %#x\n", newStatus)); + if(newStatus == (ULONG)STATUS_DEVICE_DOES_NOT_EXIST && BMList[i].NeedAltInit) { + // Note: this is actually a BUG in scsiport.sys + // It stops scanning PCI bus when reaches empty PCI Function inside Slot + // However, this PCI Slot may have higher non-empty Functions + // UniATA will perform all staff instead of ScsiPort under NT, + // but for ReactOS it is better to patch ScsiPort. + KdPrint2((PRINT_PREFIX "STATUS_DEVICE_DOES_NOT_EXIST, try workaround\n")); + hwInitializationData.comm.AdapterInterfaceType = Isa; + newStatus = ScsiPortInitialize(DriverObject, + Argument2, + &hwInitializationData.comm, + (PVOID)(i | 0x80000000)); + KdPrint2((PRINT_PREFIX "ScsiPortInitialize Status %#x (2)\n", newStatus)); + } if (newStatus < statusToReturn) statusToReturn = newStatus; @@ -9086,13 +9420,13 @@ AtapiRegCheckParameterValue( RtlZeroMemory(paramPath.Buffer, paramPath.MaximumLength); RtlAppendUnicodeToString(¶mPath, RegistryPath->Buffer); RtlAppendUnicodeToString(¶mPath, L"\\"); - RtlAppendUnicodeToString(¶mPath, PathSuffix); + RtlAppendUnicodeToString(¶mPath, REGRTL_STR_PTYPE PathSuffix); // Check for the Xxx value. RtlZeroMemory(parameters, (sizeof(RTL_QUERY_REGISTRY_TABLE)*ITEMS_TO_QUERY)); parameters[0].Flags = RTL_QUERY_REGISTRY_DIRECT; - parameters[0].Name = Name; + parameters[0].Name = REGRTL_STR_PTYPE Name; parameters[0].EntryContext = &doRun; parameters[0].DefaultType = REG_DWORD; parameters[0].DefaultData = &zero; @@ -9232,6 +9566,7 @@ _PrintNtConsole( dbg_print_tmp_buff[511] = 0; + KdPrint(((PCHAR)&(dbg_print_tmp_buff[0]))); HalDisplayString(dbg_print_tmp_buff); va_end(ap); diff --git a/drivers/storage/ide/uniata/id_badblock.cpp b/drivers/storage/ide/uniata/id_badblock.cpp index 2e3f7347197..0beb3dc0e1e 100644 --- a/drivers/storage/ide/uniata/id_badblock.cpp +++ b/drivers/storage/ide/uniata/id_badblock.cpp @@ -129,6 +129,10 @@ InitBadBlocks( { RTL_QUERY_REGISTRY_TABLE QueryTable[2]; // Main record and zero filled end of array marker WCHAR DevSerial[128]; +#ifdef _DEBUG + UCHAR cDevSerial[128]; + ULONG i; +#endif ULONG Length; PLIST_ENTRY link; PSBadBlockListItem cur; @@ -145,10 +149,10 @@ InitBadBlocks( QueryTable[0].QueryRoutine = BadBlockQueryRoutine; QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED; - QueryTable[0].Name = NULL; // If Name is NULL, the QueryRoutine function - // specified for this table entry is called - // for all values associated with the current - // registry key. + QueryTable[0].Name = NULL; // If Name is NULL, the QueryRoutine function + // specified for this table entry is called + // for all values associated with the current + // registry key. QueryTable[0].EntryContext = NULL; QueryTable[0].DefaultType = REG_NONE; QueryTable[0].DefaultData = 0; @@ -173,8 +177,13 @@ InitBadBlocks( Length++; Length += EncodeVendorStr(DevSerial+Length, LunExt->IdentifyData.SerialNumber, sizeof(LunExt->IdentifyData.SerialNumber)); +#ifdef _DEBUG KdPrint(( "LunExt %#x\n", LunExt)); - KdPrint(( "S/N:%S\n", DevSerial)); + for(i=0; inBadBlocks = 0; LunExt->arrBadBlocks = NULL; @@ -260,7 +269,7 @@ CheckIfBadBlock( for (ULONG i = 0; i < nBadBlocks; i++) { - if (lba + count > arrBadBlocks->m_lbaStart && + if (lba + count > arrBadBlocks->m_lbaStart && lba < arrBadBlocks->m_lbaEnd) { KdPrint(( "listed BB @ %I64x\n", lba)); return true; diff --git a/drivers/storage/ide/uniata/id_dma.cpp b/drivers/storage/ide/uniata/id_dma.cpp index 64d8d0be71e..083d8557753 100644 --- a/drivers/storage/ide/uniata/id_dma.cpp +++ b/drivers/storage/ide/uniata/id_dma.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2002-2010 Alexander A. Telyatnikov (Alter) +Copyright (c) 2002-2011 Alexander A. Telyatnikov (Alter) Module Name: id_dma.cpp @@ -185,28 +185,52 @@ err_1: if(deviceExtension->HwFlags & UNIATA_AHCI) { - if(chan->AHCI_CL) { + KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: AHCI\n" )); + if(chan->AhciCtlBlock) { + KdPrint2((PRINT_PREFIX " already initialized %x\n", chan->AhciCtlBlock)); return; } - chan->AHCI_CL = (PIDE_AHCI_CMD_LIST)MmAllocateContiguousMemory(sizeof(IDE_AHCI_CMD_LIST)*ATA_AHCI_MAX_TAGS+sizeof(IDE_AHCI_RCV_FIS), ph4gb); - if(chan->AHCI_CL) { - chan->AHCI_CL_PhAddr = AtapiVirtToPhysAddr(HwDeviceExtension, NULL, (PUCHAR)(chan->AHCI_CL), &i, &ph_addru); - if(!chan->AHCI_CL_PhAddr || !i || ((LONG)(chan->AHCI_CL_PhAddr) == -1)) { + // Need 1K-byte alignment + chan->AhciCtlBlock0 = (PIDE_AHCI_CHANNEL_CTL_BLOCK)MmAllocateContiguousMemory( + sizeof(IDE_AHCI_CHANNEL_CTL_BLOCK)+AHCI_CLB_ALIGNEMENT_MASK, + ph4gb); + if(chan->AhciCtlBlock0) { + union { + PUCHAR AhciCtlBlock; + ULONGLONG AhciCtlBlock64; + }; + AhciCtlBlock64 = 0; + AhciCtlBlock = (PUCHAR)chan->AhciCtlBlock0; + + KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: CLP BASE %I64x\n", AhciCtlBlock64)); + + AhciCtlBlock64 += AHCI_CLB_ALIGNEMENT_MASK; + AhciCtlBlock64 &= ~AHCI_CLB_ALIGNEMENT_MASK; + + KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: CLP BASE 1k-aligned %I64x\n", AhciCtlBlock64)); + + chan->AhciCtlBlock = (PIDE_AHCI_CHANNEL_CTL_BLOCK)AhciCtlBlock; + + chan->AHCI_CTL_PhAddr = AtapiVirtToPhysAddr(HwDeviceExtension, NULL, (PUCHAR)(chan->AhciCtlBlock), &i, &ph_addru); + KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: CLP Phys BASE %I64x\n", chan->AHCI_CTL_PhAddr)); + if(!chan->AHCI_CTL_PhAddr || !i || ((LONG)(chan->AHCI_CTL_PhAddr) == -1)) { KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: No AHCI CLP BASE\n" )); - chan->AHCI_CL = NULL; - chan->AHCI_CL_PhAddr = 0; + chan->AhciCtlBlock = NULL; + chan->AHCI_CTL_PhAddr = 0; return; } if(ph_addru) { KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: No AHCI CLP below 4Gb\n" )); - MmFreeContiguousMemory(chan->AHCI_CL); - chan->AHCI_CL = NULL; - chan->AHCI_CL_PhAddr = 0; + MmFreeContiguousMemory(chan->AhciCtlBlock0); + chan->AhciCtlBlock = NULL; + chan->AHCI_CTL_PhAddr = 0; return; } + } else { + KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: Can't alloc AHCI CLP\n")); } } - #endif //USE_OWN_DMA +#endif //USE_OWN_DMA return; } // end AtapiDmaAlloc() @@ -227,16 +251,16 @@ AtapiDmaSetup( PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]); PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension); BOOLEAN use_DB_IO = FALSE; - //BOOLEAN use_AHCI = FALSE; + BOOLEAN use_AHCI = (deviceExtension->HwFlags & UNIATA_AHCI) ? TRUE : FALSE; ULONG orig_count = count; - ULONG max_entries = (deviceExtension->HwFlags & UNIATA_AHCI) ? ATA_AHCI_DMA_ENTRIES : ATA_DMA_ENTRIES; + ULONG max_entries = use_AHCI ? ATA_AHCI_DMA_ENTRIES : ATA_DMA_ENTRIES; AtaReq->Flags &= ~REQ_FLAG_DMA_OPERATION; KdPrint2((PRINT_PREFIX "AtapiDmaSetup: mode %#x, data %x, count %x, lCh %x, dev %x\n", - deviceExtension->lun[lChannel*2+DeviceNumber].TransferMode, + chan->lun[DeviceNumber]->TransferMode, data, count, lChannel, DeviceNumber )); - if(deviceExtension->lun[lChannel*2+DeviceNumber].TransferMode < ATA_DMA) { + if(chan->lun[DeviceNumber]->TransferMode < ATA_DMA) { KdPrint2((PRINT_PREFIX "AtapiDmaSetup: Not DMA mode, assume this is just preparation\n" )); //return FALSE; } @@ -251,14 +275,20 @@ AtapiDmaSetup( return FALSE; } //KdPrint2((PRINT_PREFIX " checkpoint 3\n" )); - if((ULONG_PTR)data & deviceExtension->AlignmentMask) { + if((ULONG)data & deviceExtension->AlignmentMask) { KdPrint2((PRINT_PREFIX "AtapiDmaSetup: unaligned data: %#x (%#x)\n", data, deviceExtension->AlignmentMask)); return FALSE; } //KdPrint2((PRINT_PREFIX " checkpoint 4\n" )); - KdPrint2((PRINT_PREFIX " get Phys(PRD=%x)\n", &(AtaReq->dma_tab) )); - dma_base = AtapiVirtToPhysAddr(HwDeviceExtension, NULL, (PUCHAR)&(AtaReq->dma_tab) /*chan->dma_tab*/, &i, &dma_baseu); + if(use_AHCI) { + KdPrint2((PRINT_PREFIX " get Phys(AHCI_CMD=%x)\n", &(AtaReq->ahci.ahci_cmd_ptr->prd_tab) )); + dma_base = AtapiVirtToPhysAddr(HwDeviceExtension, NULL, (PUCHAR)&(AtaReq->ahci.ahci_cmd_ptr->prd_tab), &i, &dma_baseu); + AtaReq->ahci.ahci_base64 = NULL; // clear before setup + } else { + KdPrint2((PRINT_PREFIX " get Phys(PRD=%x)\n", &(AtaReq->dma_tab) )); + dma_base = AtapiVirtToPhysAddr(HwDeviceExtension, NULL, (PUCHAR)&(AtaReq->dma_tab) /*chan->dma_tab*/, &i, &dma_baseu); + } if(dma_baseu) { KdPrint2((PRINT_PREFIX "AtapiDmaSetup: SRB built-in PRD above 4Gb: %8.8x%8.8x\n", dma_baseu, dma_base)); if(!deviceExtension->Host64) { @@ -271,7 +301,7 @@ AtapiDmaSetup( KdPrint2((PRINT_PREFIX "AtapiDmaSetup: No BASE\n" )); return FALSE; } - AtaReq->dma_base = dma_base; + AtaReq->ata.dma_base = dma_base; // aliased to ahci_base64 KdPrint2((PRINT_PREFIX " get Phys(data=%x)\n", data )); dma_base = AtapiVirtToPhysAddr(HwDeviceExtension, Srb, data, &dma_count, &dma_baseu); @@ -283,26 +313,26 @@ retry_DB_IO: dma_base = chan->DB_IO_PhAddr; data = (PUCHAR)(chan->DB_IO); } else { - AtaReq->ahci_base64 = (ULONGLONG)dma_base | ((ULONGLONG)dma_baseu << 32); + AtaReq->ahci.ahci_base64 = (ULONGLONG)dma_base | ((ULONGLONG)dma_baseu << 32); } } else if(!dma_count || ((LONG)(dma_base) == -1)) { KdPrint2((PRINT_PREFIX "AtapiDmaSetup: No 1st block\n" )); //AtaReq->dma_base = NULL; - AtaReq->ahci_base64 = NULL; + AtaReq->ahci.ahci_base64 = NULL; return FALSE; } - dma_count = min(count, (PAGE_SIZE - ((ULONG_PTR)data & PAGE_MASK))); + dma_count = min(count, (PAGE_SIZE - ((ULONG)data & PAGE_MASK))); data += dma_count; count -= dma_count; i = 0; while (count) { - if(deviceExtension->HwFlags & UNIATA_AHCI) { - AtaReq->ahci_cmd.prd_tab[i].base = dma_base; - AtaReq->ahci_cmd.prd_tab[i].baseu = dma_baseu; - AtaReq->ahci_cmd.prd_tab[i].DBC = ((dma_count-1) & 0x3fffff); + if(use_AHCI) { + AtaReq->ahci.ahci_cmd_ptr->prd_tab[i].base = dma_base; + AtaReq->ahci.ahci_cmd_ptr->prd_tab[i].baseu = dma_baseu; + AtaReq->ahci.ahci_cmd_ptr->prd_tab[i].DBC = ((dma_count-1) & 0x3fffff); } else { AtaReq->dma_tab[i].base = dma_base; AtaReq->dma_tab[i].count = (dma_count & 0xffff); @@ -311,7 +341,7 @@ retry_DB_IO: if (i >= max_entries) { KdPrint2((PRINT_PREFIX "too many segments in DMA table\n" )); //AtaReq->dma_base = NULL; - AtaReq->ahci_base64 = NULL; + AtaReq->ahci.ahci_base64 = NULL; return FALSE; } KdPrint2((PRINT_PREFIX " get Phys(data[n]=%x)\n", data )); @@ -329,7 +359,7 @@ retry_DB_IO: } else if(!dma_count || !dma_base || ((LONG)(dma_base) == -1)) { //AtaReq->dma_base = NULL; - AtaReq->ahci_base64 = 0; + AtaReq->ahci.ahci_base64 = 0; KdPrint2((PRINT_PREFIX "AtapiDmaSetup: No NEXT block\n" )); return FALSE; } @@ -339,10 +369,10 @@ retry_DB_IO: count -= min(count, PAGE_SIZE); } KdPrint2((PRINT_PREFIX " set TERM\n" )); - if(deviceExtension->HwFlags & UNIATA_AHCI) { - AtaReq->ahci_cmd.prd_tab[i].base = dma_base; - AtaReq->ahci_cmd.prd_tab[i].baseu = dma_baseu; - AtaReq->ahci_cmd.prd_tab[i].DBC = ((dma_count-1) & 0x3fffff); + if(use_AHCI) { + AtaReq->ahci.ahci_cmd_ptr->prd_tab[i].base = dma_base; + AtaReq->ahci.ahci_cmd_ptr->prd_tab[i].baseu = dma_baseu; + AtaReq->ahci.ahci_cmd_ptr->prd_tab[i].DBC = ((dma_count-1) & 0x3fffff); } else { AtaReq->dma_tab[i].base = dma_base; AtaReq->dma_tab[i].count = (dma_count & 0xffff) | ATA_DMA_EOT; @@ -466,15 +496,15 @@ AtapiDmaStart( (Srb->SrbFlags & SRB_FLAGS_DATA_IN) ? "read" : "write", lChannel, DeviceNumber )); - if(!AtaReq->dma_base) { - KdPrint2((PRINT_PREFIX "AtapiDmaStart: *** !AtaReq->dma_base\n")); + if(!AtaReq->ata.dma_base) { + KdPrint2((PRINT_PREFIX "AtapiDmaStart: *** !AtaReq->ata.dma_base\n")); return; } if(AtaReq->Flags & REQ_FLAG_DMA_DBUF_PRD) { KdPrint2((PRINT_PREFIX " DBUF_PRD\n")); ASSERT(FALSE); if(deviceExtension->HwFlags & UNIATA_AHCI) { - RtlCopyMemory(chan->DB_PRD, &(AtaReq->ahci_cmd), sizeof(AtaReq->ahci_cmd)); + RtlCopyMemory(chan->DB_PRD, AtaReq->ahci.ahci_cmd_ptr, sizeof(AtaReq->ahci_cmd0)); } else { RtlCopyMemory(chan->DB_PRD, &(AtaReq->dma_tab), sizeof(AtaReq->dma_tab)); } @@ -495,10 +525,10 @@ AtapiDmaStart( if(ChipType == PRNEW) { ULONG Channel = deviceExtension->Channel + lChannel; if(chan->ChannelCtrlFlags & CTRFLAGS_LBA48) { - AtapiWritePortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11, - AtapiReadPortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) | + AtapiWritePortEx1(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11, + AtapiReadPortEx1(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) | (Channel ? 0x08 : 0x02)); - AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20), + AtapiWritePortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20), ((Srb->SrbFlags & SRB_FLAGS_DATA_IN) ? 0x05000000 : 0x06000000) | (Srb->DataTransferLength >> 1) ); } @@ -519,7 +549,7 @@ AtapiDmaStart( // set pointer to Pointer Table AtapiWritePort4(chan, IDX_BM_PRD_Table, - AtaReq->dma_base + AtaReq->ata.dma_base ); // set transfer direction AtapiWritePort1(chan, IDX_BM_Command, @@ -557,15 +587,20 @@ AtapiDmaDone( KdPrint2((PRINT_PREFIX "AtapiDmaDone: dev %d\n", DeviceNumber)); + if(deviceExtension->HwFlags & UNIATA_AHCI) { + KdPrint2((PRINT_PREFIX " ACHTUNG! should not be called for AHCI!\n")); + return 0xff; + } + switch(VendorID) { case ATA_PROMISE_ID: if(ChipType == PRNEW) { ULONG Channel = deviceExtension->Channel + lChannel; if(chan->ChannelCtrlFlags & CTRFLAGS_LBA48) { - AtapiWritePortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11, - AtapiReadPortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) & + AtapiWritePortEx1(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11, + AtapiReadPortEx1(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) & ~(Channel ? 0x08 : 0x02)); - AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20), + AtapiWritePortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20), 0 ); } @@ -604,23 +639,29 @@ VOID NTAPI AtapiDmaReinit( IN PHW_DEVICE_EXTENSION deviceExtension, - IN ULONG ldev, + IN PHW_LU_EXTENSION LunExt, IN PATA_REQ AtaReq ) { - PHW_LU_EXTENSION LunExt = &(deviceExtension->lun[ldev]); SCHAR apiomode; apiomode = (CHAR)AtaPioMode(&(LunExt->IdentifyData)); if(!(AtaReq->Flags & REQ_FLAG_DMA_OPERATION)) { KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: !(AtaReq->Flags & REQ_FLAG_DMA_OPERATION), fall to PIO on Device %d\n", ldev & 1)); + "AtapiDmaReinit: !(AtaReq->Flags & REQ_FLAG_DMA_OPERATION), fall to PIO on Device %d\n", LunExt->Lun)); goto limit_pio; } - if(!AtaReq->dma_base) { + if(deviceExtension->HwFlags & UNIATA_AHCI) { + if(!AtaReq->ahci.ahci_base64) { + KdPrint2((PRINT_PREFIX + "AtapiDmaReinit: no AHCI PRD, fall to PIO on Device %d\n", LunExt->Lun)); + goto limit_pio; + } + } else + if(!AtaReq->ata.dma_base) { KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: no PRD, fall to PIO on Device %d\n", ldev & 1)); + "AtapiDmaReinit: no PRD, fall to PIO on Device %d\n", LunExt->Lun)); goto limit_pio; } @@ -628,14 +669,14 @@ AtapiDmaReinit( (AtaReq->lba >= (LONGLONG)ATA_MAX_LBA28) && (LunExt->TransferMode > ATA_PIO5) ) { KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: FORCE_DOWNRATE on Device %d for LBA48\n", ldev & 1)); + "AtapiDmaReinit: FORCE_DOWNRATE on Device %d for LBA48\n", LunExt->Lun)); goto limit_lba48; } if(AtaReq->Flags & REQ_FLAG_FORCE_DOWNRATE) { KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: FORCE_DOWNRATE on Device %d\n", ldev & 1)); + "AtapiDmaReinit: FORCE_DOWNRATE on Device %d\n", LunExt->Lun)); if(AtaReq->lba >= (LONGLONG)ATA_MAX_LBA28) { limit_lba48: LunExt->DeviceFlags |= REQ_FLAG_FORCE_DOWNRATE_LBA48; @@ -645,16 +686,16 @@ limit_pio: (LunExt->TransferMode > ATA_PIO5) && (LunExt->TransferMode != ATA_PIO0+apiomode) ) { KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: set PIO mode on Device %d (%x -> %x)\n", ldev & 1, LunExt->TransferMode, ATA_PIO0+apiomode)); - AtapiDmaInit(deviceExtension, ldev & 1, ldev >> 1, + "AtapiDmaReinit: set PIO mode on Device %d (%x -> %x)\n", LunExt->Lun, LunExt->TransferMode, ATA_PIO0+apiomode)); + AtapiDmaInit(deviceExtension, LunExt->Lun, LunExt->chan->lChannel, apiomode, -1, -1 ); } else if(LunExt->LimitedTransferMode < LunExt->TransferMode) { KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: set PIO mode on Device %d (%x -> %x) (2)\n", ldev & 1, LunExt->TransferMode, LunExt->LimitedTransferMode)); - AtapiDmaInit(deviceExtension, ldev & 1, ldev >> 1, + "AtapiDmaReinit: set PIO mode on Device %d (%x -> %x) (2)\n", LunExt->Lun, LunExt->TransferMode, LunExt->LimitedTransferMode)); + AtapiDmaInit(deviceExtension, LunExt->Lun, LunExt->chan->lChannel, LunExt->LimitedTransferMode-ATA_PIO0, -1, -1 ); @@ -662,8 +703,8 @@ limit_pio: } else { KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: set MAX mode on Device %d\n", ldev & 1)); - AtapiDmaInit(deviceExtension, ldev & 1, ldev >> 1, + "AtapiDmaReinit: set MAX mode on Device %d\n", LunExt->Lun)); + AtapiDmaInit(deviceExtension, LunExt->Lun, LunExt->chan->lChannel, apiomode, min( retry_Wdma[AtaReq->retry], (CHAR)AtaWmode(&(LunExt->IdentifyData)) ), @@ -672,14 +713,14 @@ limit_pio: } // LunExt->DeviceFlags &= ~DFLAGS_FORCE_DOWNRATE; } else - if(/*!(deviceExtension->lun[ldev].DeviceFlags & DFLAGS_FORCE_DOWNRATE) &&*/ + if(/*!(LunExt->DeviceFlags & DFLAGS_FORCE_DOWNRATE) &&*/ (LunExt->LimitedTransferMode > LunExt->TransferMode) || (LunExt->DeviceFlags & DFLAGS_REINIT_DMA)) { // restore IO mode KdPrint2((PRINT_PREFIX - "AtapiDmaReinit: restore IO mode on Device %d\n", ldev & 1)); - AtapiDmaInit__(deviceExtension, ldev); + "AtapiDmaReinit: restore IO mode on Device %d\n", LunExt->Lun)); + AtapiDmaInit__(deviceExtension, LunExt); } } // end AtapiDmaReinit() @@ -687,14 +728,12 @@ VOID NTAPI AtapiDmaInit__( IN PHW_DEVICE_EXTENSION deviceExtension, - IN ULONG ldev + IN PHW_LU_EXTENSION LunExt ) { - PHW_LU_EXTENSION LunExt = &(deviceExtension->lun[ldev]); - if(LunExt->IdentifyData.SupportDma) { KdPrint2((PRINT_PREFIX - "AtapiDmaInit__: Set (U)DMA on Device %d\n", ldev & 1)); + "AtapiDmaInit__: Set (U)DMA on Device %d\n", LunExt->Lun)); /* for(i=AtaUmode(&(LunExt->IdentifyData)); i>=0; i--) { AtapiDmaInit(deviceExtension, ldev & 1, ldev >> 1, (CHAR)AtaPioMode(&(LunExt->IdentifyData)), @@ -707,14 +746,14 @@ AtapiDmaInit__( (CHAR)AtaWmode(&(LunExt->IdentifyData)), UDMA_MODE0+(CHAR)i ); }*/ - AtapiDmaInit(deviceExtension, ldev & 1, ldev >> 1, + AtapiDmaInit(deviceExtension, LunExt->Lun, LunExt->chan->lChannel, (CHAR)AtaPioMode(&(LunExt->IdentifyData)), (CHAR)AtaWmode(&(LunExt->IdentifyData)), (CHAR)AtaUmode(&(LunExt->IdentifyData)) ); } else { KdPrint2((PRINT_PREFIX - "AtapiDmaInit__: Set PIO on Device %d\n", ldev & 1)); - AtapiDmaInit(deviceExtension, ldev & 1, ldev >> 1, + "AtapiDmaInit__: Set PIO on Device %d\n", LunExt->Lun)); + AtapiDmaInit(deviceExtension, LunExt->Lun, LunExt->chan->lChannel, (CHAR)AtaPioMode(&(LunExt->IdentifyData)), -1, -1); } } // end AtapiDmaInit__() @@ -779,12 +818,12 @@ AtapiDmaInit( ULONG Channel = deviceExtension->Channel + lChannel; PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; //LONG statusByte = 0; - ULONG dev = Channel*2 + DeviceNumber; - ULONG ldev = lChannel*2 + DeviceNumber; + ULONG dev = Channel*2 + DeviceNumber; // for non-SATA/AHCI only! + ULONG ldev = lChannel*2 + DeviceNumber; // for non-SATA/AHCI only! ULONG slotNumber = deviceExtension->slotNumber; ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber; LONG i; - PHW_LU_EXTENSION LunExt = &(deviceExtension->lun[ldev]); + PHW_LU_EXTENSION LunExt = chan->lun[DeviceNumber]; ULONG VendorID = deviceExtension->DevID & 0xffff; //ULONG DeviceID = (deviceExtension->DevID >> 16) & 0xffff; @@ -878,7 +917,9 @@ AtapiDmaInit( if(LunExt->IdentifyData.SataCapabilities != 0x0000 && LunExt->IdentifyData.SataCapabilities != 0xffff) { //udmamode = min(udmamode, 6); - if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_SA150)) { + KdPrint2((PRINT_PREFIX "LunExt->LimitedTransferMode %x, LunExt->OrigTransferMode %x\n", + LunExt->LimitedTransferMode, LunExt->OrigTransferMode)); + if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, min(LunExt->LimitedTransferMode, LunExt->OrigTransferMode))) { return; } udmamode = min(udmamode, 5); @@ -1093,18 +1134,18 @@ set_new_acard: apiomode = 4; for(i=udmamode; i>=0; i--) { if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_UDMA0 + i)) { - AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_udmatiming[udmamode]); + AtapiWritePortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_udmatiming[udmamode]); return; } } for(i=wdmamode; i>=0; i--) { if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_WDMA0 + i)) { - AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_wdmatiming[wdmamode]); + AtapiWritePortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_wdmatiming[wdmamode]); return; } } if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_PIO0 + apiomode)) { - AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_piotiming[apiomode]); + AtapiWritePortEx4(chan, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_piotiming[apiomode]); return; } return; @@ -1317,12 +1358,13 @@ set_new_acard: for(i=udmamode; i>=0; i--) { if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_UDMA0 + i)) { + /* Set UDMA reference clock (33/66/133MHz). */ SetPciConfig1(0x48, reg48 | (0x0001 << dev)); if(!(ChipFlags & ICH4_FIX)) { SetPciConfig2(0x4a, (reg4a & ~(0x3 << (dev<<2))) | (0x01 + !(i & 0x01)) ); } - if(i >= 2) { + if(i >= 3) { reg54 |= (0x1 << dev); } else { reg54 &= ~(0x1 << dev); @@ -1369,19 +1411,18 @@ set_new_acard: GetPciConfig4(0x40, reg40); GetPciConfig1(0x44, reg44); - mask40 = 0x000000ff; - + /* Allow PIO/WDMA timing controls. */ + reg40 &= ~0x00ff00ff; + reg40 |= ~0x40774077; + /* Set PIO/WDMA timings. */ if(!(DeviceNumber & 1)) { mask40 |= 0x00003300; new40 = ((USHORT)(intel_timings[idx]) << 8); - //mask44 = 0x00; // already done on init - //new44 = 0x00; } else { mask44 = 0x0f; new44 = ((intel_timings[idx] & 0x30) >> 2) | (intel_timings[idx] & 0x03); } - new40 |= 0x00004077; if (Channel) { mask40 <<= 16; @@ -1905,6 +1946,33 @@ setup_drive_ite: AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_PIO0 + apiomode); } return; + case ATA_JMICRON_ID: { + + UCHAR reg40; + GetPciConfig1(0x40, reg40); + + if(reg40 & 0x08) { + // 80-pin check + udmamode = min(udmamode, 2); + } + /* Nothing to do to setup mode, the controller snoop SET_FEATURE cmd. */ + if(apiomode >= 4) + apiomode = 4; + for(i=udmamode; i>=0; i--) { + if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_UDMA0 + i)) { + return; + } + } + for(i=wdmamode; i>=0; i--) { + if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_WDMA0 + i)) { + return; + } + } + if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_PIO0 + apiomode)) { + return; + } + return; + break; } } try_generic_dma: @@ -1977,8 +2045,8 @@ cyrix_timing( case ATA_WDMA2: reg24 = 0x00002020; break; case ATA_UDMA2: reg24 = 0x00911030; break; } - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x20, reg20); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x24, reg24); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x20, reg20); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x24, reg24); } // cyrix_timing() VOID @@ -2244,4 +2312,3 @@ via82c_timing( SetPciConfig1(0x4b-dev, (FIT(active - 1, 0, 0xf) << 4) | FIT(recover - 1, 0, 0xf) ); } // end via82c_timing() - diff --git a/drivers/storage/ide/uniata/id_init.cpp b/drivers/storage/ide/uniata/id_init.cpp index 81265998761..89b5fde8413 100644 --- a/drivers/storage/ide/uniata/id_init.cpp +++ b/drivers/storage/ide/uniata/id_init.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004-2010 Alexandr A. Telyatnikov (Alter) +Copyright (c) 2004-2011 Alexandr A. Telyatnikov (Alter) Module Name: id_init.cpp @@ -63,16 +63,26 @@ UniataChipDetectChannels( KdPrint2((PRINT_PREFIX "UniataChipDetectChannels:\n" )); + if(ChipFlags & (UNIATA_SATA | UNIATA_AHCI)) { + if(!deviceExtension->NumberChannels) { + KdPrint2((PRINT_PREFIX "uninitialized SATA/AHCI port number -> 1\n")); + deviceExtension->NumberChannels = 1; + } + if(AtapiRegCheckDevValue(deviceExtension, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"IgnoreAhciPM", 1 /* DEBUG */)) { + KdPrint2((PRINT_PREFIX "SATA/AHCI w/o PM, max luns 1\n")); + deviceExtension->NumberLuns = 2; + //chan->ChannelCtrlFlags |= CTRFLAGS_NO_SLAVE; + } else { + KdPrint2((PRINT_PREFIX "SATA/AHCI -> possible PM, max luns %d\n", SATA_MAX_PM_UNITS)); + deviceExtension->NumberLuns = SATA_MAX_PM_UNITS; + //deviceExtension->NumberLuns = 1; + } + } if(deviceExtension->MasterDev) { KdPrint2((PRINT_PREFIX "MasterDev -> 1 chan\n")); deviceExtension->NumberChannels = 1; } - if(ChipFlags & (UNIATA_SATA | UNIATA_AHCI)) { - KdPrint2((PRINT_PREFIX "SATA/AHCI -> possible PM, max luns %d\n", SATA_MAX_PM_UNITS)); - //deviceExtension->NumberLuns = SATA_MAX_PM_UNITS; - } - switch(VendorID) { case ATA_ACER_LABS_ID: switch(deviceExtension->DevID) { @@ -118,7 +128,7 @@ UniataChipDetectChannels( KdPrint2((PRINT_PREFIX "New ATI PATA 1 chan\n")); break; } - break; + /* FALLTHROUGH */ case ATA_SILICON_IMAGE_ID: if(ChipFlags & SIIBUG) { @@ -151,7 +161,7 @@ UniataChipDetectChannels( /* 2 SATA without SATA registers on first channel + 1 PATA on second */ // do nothing, generic PATA INIT KdPrint2((PRINT_PREFIX "VIA SATA without SATA regs -> no PM\n")); - deviceExtension->NumberLuns = SATA_MAX_PM_UNITS; + deviceExtension->NumberLuns = 1; } break; case ATA_ITE_ID: @@ -246,8 +256,18 @@ UniataChipDetect( if(i != BMLIST_TERMINATOR) { DevTypeInfo = (PBUSMASTER_CONTROLLER_INFORMATION)&BusMasterAdapters[i]; } else { + if(Ata_is_ahci_dev(pciData)) { + KdPrint2((PRINT_PREFIX " AHCI candidate")); + + deviceExtension->NumberChannels = 0; + if(!UniataAhciDetect(HwDeviceExtension, pciData, ConfigInfo)) { + KdPrint2((PRINT_PREFIX " AHCI init failed - not detected\n")); + return STATUS_UNSUCCESSFUL; + } + KdPrint2((PRINT_PREFIX " unknown AHCI dev, addr %#x", deviceExtension->BaseIoAHCI_0.Addr)); + } unknown_dev: - KdPrint2((PRINT_PREFIX " unknown dev, BM addr %#x", BaseIoAddressBM)); + KdPrint2((PRINT_PREFIX " unknown dev, BM addr %#I64x", BaseIoAddressBM)); DevTypeInfo = NULL; KdPrint2((PRINT_PREFIX " MaxTransferMode %#x\n", deviceExtension->MaxTransferMode)); @@ -324,6 +344,7 @@ unknown_dev: PCI_DEV_HW_SPEC_BM( 8324, 1106, 0x00, ATA_SA150, "VIA CX700" , VIA133 | VIASATA), PCI_DEV_HW_SPEC_BM( 8353, 1106, 0x00, ATA_SA150, "VIA VX800" , VIA133 | VIASATA), PCI_DEV_HW_SPEC_BM( 8409, 1106, 0x00, ATA_UDMA6, "VIA VX855" , VIA133 | 0x00 ), + PCI_DEV_HW_SPEC_BM( 8410, 1106, 0x00, ATA_SA300, "VIA VX900" , VIA133 | VIASATA), PCI_DEV_HW_SPEC_BM( ffff, ffff, 0xff, BMLIST_TERMINATOR , NULL , BMLIST_TERMINATOR ) }; @@ -353,7 +374,9 @@ unknown_dev: // New chips have own DeviceId if(deviceExtension->DevID != ATA_VIA82C571 && deviceExtension->DevID != ATA_VIACX700IDE && - deviceExtension->DevID != ATA_VIASATAIDE) { + deviceExtension->DevID != ATA_VIASATAIDE && + deviceExtension->DevID != ATA_VIASATAIDE2 && + deviceExtension->DevID != ATA_VIASATAIDE3) { KdPrint2((PRINT_PREFIX "Via new\n")); break; } @@ -479,13 +502,24 @@ for_ugly_chips: ChipType = deviceExtension->HwFlags & CHIPTYPE_MASK; ChipFlags = deviceExtension->HwFlags & CHIPFLAG_MASK; + if(ChipFlags & UNIATA_AHCI) { + deviceExtension->NumberChannels = 0; + if(!UniataAhciDetect(HwDeviceExtension, pciData, ConfigInfo)) { + KdPrint2((PRINT_PREFIX " AHCI detect failed\n")); + return STATUS_UNSUCCESSFUL; + } + } else if(!UniataChipDetectChannels(HwDeviceExtension, pciData, DeviceNumber, ConfigInfo)) { return STATUS_UNSUCCESSFUL; } + // UniataAhciDetect() sets proper number of channels if(!UniataAllocateLunExt(deviceExtension, UNIATA_ALLOCATE_NEW_LUNS)) { return STATUS_UNSUCCESSFUL; } + if(ChipFlags & UNIATA_AHCI) { + } + switch(VendorID) { case ATA_ACER_LABS_ID: if(ChipFlags & UNIATA_SATA) { @@ -594,6 +628,7 @@ for_ugly_chips: case ATA_ATI_ID: KdPrint2((PRINT_PREFIX "ATI\n")); + /* FALLTHROUGH */ case ATA_SILICON_IMAGE_ID: { if(ChipFlags & SIIBUG) { @@ -718,7 +753,7 @@ for_ugly_chips: break; } case ATA_SIS_ID: { - //if(ChipType != SIS_SOUTH) { + //if(ChipType != SIS_SOUTH) {} BOOLEAN SIS_182=FALSE; if(!(ChipFlags & SIS_BASE)) { @@ -964,6 +999,7 @@ for_ugly_chips: } if(deviceExtension->MaxTransferMode >= ATA_SA150) { GetPciConfig1(0x90, tmp8); + KdPrint2((PRINT_PREFIX "Intel chip config: %x\n", tmp8)); /* SATA parts can be either compat or AHCI */ if(ChipFlags & UNIATA_AHCI) { @@ -991,6 +1027,7 @@ for_ugly_chips: chan = &deviceExtension->chan[c]; IsPata = FALSE; if(ChipFlags & ICH5) { + KdPrint2((PRINT_PREFIX "ICH5\n")); if ((tmp8 & 0x04) == 0) { chan->ChannelCtrlFlags |= CTRFLAGS_NO_SLAVE; } else if ((tmp8 & 0x02) == 0) { @@ -1006,11 +1043,13 @@ for_ugly_chips: } } else if(ChipFlags & I6CH2) { + KdPrint2((PRINT_PREFIX "I6CH2\n")); chan->ChannelCtrlFlags |= CTRFLAGS_NO_SLAVE; } else { + KdPrint2((PRINT_PREFIX "other Intel\n")); switch(tmp8 & 0x03) { case 2: - if(c!=0) { + if(c!=0) { // PATA IsPata = TRUE; } @@ -1029,8 +1068,8 @@ for_ugly_chips: KdPrint2((PRINT_PREFIX "PATA part\n")); } else { - if((ChipFlags & ICH5) && BaseMemAddress) { - KdPrint2((PRINT_PREFIX "ICH5 indexed\n")); + if(/*(ChipFlags & ICH5) &&*/ BaseMemAddress) { + KdPrint2((PRINT_PREFIX "BaseMemAddress[5] -> indexed\n")); chan->RegTranslation[IDX_INDEXED_ADDR].Addr = BaseMemAddress + 0; chan->RegTranslation[IDX_INDEXED_ADDR].MemIo = MemIo; chan->RegTranslation[IDX_INDEXED_DATA].Addr = BaseMemAddress + 4; @@ -1038,7 +1077,7 @@ for_ugly_chips: } if((ChipFlags & ICH5) || BaseMemAddress) { - KdPrint2((PRINT_PREFIX "i indexed\n")); + KdPrint2((PRINT_PREFIX "io indexed\n")); // Rather interesting way of register access... ChipType = INTEL_IDX; deviceExtension->HwFlags &= ~CHIPTYPE_MASK; @@ -1066,14 +1105,25 @@ for_ugly_chips: deviceExtension->MaximumDmaTransferLength = 63*1024; } break; - } - - if(ChipFlags & UNIATA_AHCI) { - if(AtapiRegCheckDevValue(NULL, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"IgnoreAhci", 1)) { - KdPrint((" AHCI excluded\n")); - return STATUS_UNSUCCESSFUL; + case ATA_JMICRON_ID: + /* New JMicron PATA controllers */ + GetPciConfig1(0xdf, tmp8); + if(tmp8 & 0x40) { + KdPrint((" Check JMicron AHCI\n")); + if(Ata_is_ahci_dev(pciData)) { + ChipFlags |= UNIATA_AHCI; + deviceExtension->HwFlags |= UNIATA_AHCI; + } else { + KdPrint((" JMicron PATA\n")); + } + } else { + /* set controller configuration to a combined setup we support */ + SetPciConfig4(0x40, 0x80c0a131); + SetPciConfig4(0x80, 0x01200000); + //KdPrint((" JMicron Combined (not supported yet)\n")); + //return STATUS_NOT_FOUND; } - return UniataAhciInit(HwDeviceExtension) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; + break; } return STATUS_SUCCESS; @@ -1372,7 +1422,7 @@ NTAPI UniAtaReadLunConfig( IN PHW_DEVICE_EXTENSION deviceExtension, IN ULONG channel, // physical channel - IN ULONG ldev + IN ULONG DeviceNumber ) { ULONG tmp32; @@ -1383,33 +1433,33 @@ UniAtaReadLunConfig( c = channel - deviceExtension->Channel; // logical channel chan = &deviceExtension->chan[c]; - ldev &= (deviceExtension->NumberLuns-1); - LunExt = &(deviceExtension->lun[c*deviceExtension->NumberLuns+ldev]); + DeviceNumber = (DeviceNumber % deviceExtension->NumberLuns); + LunExt = chan->lun[DeviceNumber]; - tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, ldev, L"ReadCacheEnable", 1); + tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, DeviceNumber, L"ReadCacheEnable", 1); LunExt->opt_ReadCacheEnable = tmp32 ? TRUE : FALSE; - tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, ldev, L"WriteCacheEnable", 1); + tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, DeviceNumber, L"WriteCacheEnable", 1); LunExt->opt_WriteCacheEnable = tmp32 ? TRUE : FALSE; - tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, ldev, L"MaxTransferMode", chan->MaxTransferMode); + tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, DeviceNumber, L"MaxTransferMode", chan->MaxTransferMode); LunExt->opt_MaxTransferMode = tmp32; - tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, ldev, L"PreferedTransferMode", 0xffffffff); + tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, DeviceNumber, L"PreferedTransferMode", 0xffffffff); LunExt->opt_PreferedTransferMode = tmp32; - tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, ldev, L"ReadOnly", 0); + tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, DeviceNumber, L"ReadOnly", 0); if(tmp32 <= 2) { LunExt->opt_ReadOnly = (UCHAR)tmp32; } - tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, ldev, L"GeomType", 0xffffffff); + tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, DeviceNumber, L"GeomType", 0xffffffff); if(tmp32 > 2) { tmp32 = 0xffffffff; } LunExt->opt_GeomType = tmp32; - tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, ldev, L"Hidden", 0); + tmp32 = AtapiRegCheckDevValue(deviceExtension, channel, DeviceNumber, L"Hidden", 0); if(tmp32) { LunExt->DeviceFlags |= DFLAGS_HIDDEN; } @@ -1448,7 +1498,7 @@ AtapiReadChipConfig( } deviceExtension->opt_AtapiDmaZeroTransfer = FALSE; deviceExtension->opt_AtapiDmaControlCmd = FALSE; - deviceExtension->opt_AtapiDmaRawRead = FALSE;//TRUE; // Disabling that for VirtualBox + deviceExtension->opt_AtapiDmaRawRead = g_opt_AtapiDmaRawRead; deviceExtension->opt_AtapiDmaReadWrite = TRUE; } @@ -1546,11 +1596,31 @@ AtapiChipInit( KdPrint2((PRINT_PREFIX "VendorID/DeviceID/Rev %#x/%#x/%#x\n", VendorID, DeviceID, RevID)); if(deviceExtension->UnknownDev) { - KdPrint2((PRINT_PREFIX " Unknown chip, exiting\n" )); + KdPrint2((PRINT_PREFIX " Unknown chip\n" )); //return TRUE; VendorID = 0xffffffff; } + + if(ChipFlags & UNIATA_AHCI) { + /* if BAR(5) is IO it should point to SATA interface registers */ + if(!deviceExtension->BaseIoAHCI_0.Addr) { + KdPrint2((PRINT_PREFIX " !BaseIoAHCI_0, exiting\n" )); + return FALSE; + } + if(c == CHAN_NOT_SPECIFIED) { + return UniataAhciInit(HwDeviceExtension); + } else + if(cNumberChannels) { + KdPrint2((PRINT_PREFIX " AHCI single channel init\n" )); + UniataAhciReset(HwDeviceExtension, c); + return TRUE; + } else { + KdPrint2((PRINT_PREFIX " AHCI non-existent channel\n" )); + return FALSE; + } + } + switch(VendorID) { // case ATA_ACARD_ID: // break; @@ -1653,7 +1723,7 @@ AtapiChipInit( KdPrint2((PRINT_PREFIX "Intel SATA\n")); if(ChipFlags & UNIATA_AHCI) { - KdPrint2((PRINT_PREFIX "Skip AHCI\n")); + KdPrint2((PRINT_PREFIX "Do nothing for AHCI\n")); break; } if(c == CHAN_NOT_SPECIFIED) { @@ -1736,7 +1806,7 @@ AtapiChipInit( } if(ChipType == INTEL_IDX) { - KdPrint2((PRINT_PREFIX "i indexed\n")); + KdPrint2((PRINT_PREFIX "io indexed\n")); //for(c=0; cNumberChannels; c++) { chan = &deviceExtension->chan[c]; UniataSataWritePort4(chan, IDX_SATA_SError, 0xffffffff, 0); @@ -1773,17 +1843,17 @@ AtapiChipInit( KdPrint2((PRINT_PREFIX "BaseIoAddressSATA_0=%x\n", deviceExtension->BaseIoAddressSATA_0.Addr)); if(ChipFlags & NVQ) { /* clear interrupt status */ - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, 0x00ff00ff); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, 0x00ff00ff); /* enable device and PHY state change interrupts */ - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs+4, 0x000d000d); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs+4, 0x000d000d); /* disable NCQ support */ - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0400, - AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0400) & 0xfffffff9); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0400, + AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0400) & 0xfffffff9); } else { /* clear interrupt status */ - AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, 0xff); + AtapiWritePortEx1(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, 0xff); /* enable device and PHY state change interrupts */ - AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs+1, 0xdd); + AtapiWritePortEx1(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs+1, 0xdd); } /* enable PCI interrupt */ ChangePciConfig2(offsetof(PCI_COMMON_CONFIG, Command), (a & ~0x0400)); @@ -1814,16 +1884,16 @@ AtapiChipInit( /* setup clocks */ if(c == CHAN_NOT_SPECIFIED) { // ATA_OUTB(ctlr->r_res1, 0x11, ATA_INB(ctlr->r_res1, 0x11) | 0x0a); - AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11, - AtapiReadPortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) | 0x0a ); + AtapiWritePortEx1(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11, + AtapiReadPortEx1(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) | 0x0a ); } /* FALLTHROUGH */ case PROLD: /* enable burst mode */ // ATA_OUTB(ctlr->r_res1, 0x1f, ATA_INB(ctlr->r_res1, 0x1f) | 0x01); if(c == CHAN_NOT_SPECIFIED) { - AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x1f, - AtapiReadPortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x1f) | 0x01 ); + AtapiWritePortEx1(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x1f, + AtapiReadPortEx1(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x1f) | 0x01 ); } else { // check 80-pin cable chan = &deviceExtension->chan[c]; @@ -1848,7 +1918,7 @@ AtapiChipInit( case PRMIO: if(c == CHAN_NOT_SPECIFIED) { if(ChipFlags & PRSATA) { - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x6c, 0x000000ff); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressBM_0),0x6c, 0x000000ff); } } else { chan = &deviceExtension->chan[c]; @@ -1927,16 +1997,16 @@ AtapiChipInit( unit10 = (c & 2); if(ChipFlags & SIINOSATAIRQ) { KdPrint2((PRINT_PREFIX "Disable broken SATA intr on c=%x\n", c)); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0); } } } else { if(ChipFlags & SIINOSATAIRQ) { KdPrint2((PRINT_PREFIX "Disable broken SATA intr on c=%x\n", c)); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0); } else { KdPrint2((PRINT_PREFIX "Enable SATA intr on c=%x\n", c)); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16)); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16)); } } } @@ -1946,16 +2016,16 @@ AtapiChipInit( // Enable 3rd and 4th channels if (ChipFlags & SII4CH) { KdPrint2((PRINT_PREFIX "SII4CH\n")); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0200, 0x00000002); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0200, 0x00000002); } } else { chan = &deviceExtension->chan[c]; /* dont block interrupts */ //ChangePciConfig4(0x48, (a & ~0x03c00000)); - tmp32 = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48, (1 << 22) << c); + tmp32 = AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48, (1 << 22) << c); // flush - tmp32 = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48); + tmp32 = AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48); /* Initialize FIFO PCI bus arbitration */ GetPciConfig1(offsetof(PCI_COMMON_CONFIG, CacheLineSize), tmp8); @@ -2171,7 +2241,7 @@ UniataInitMapBM( for(c=0; cNumberChannels; c++) { chan = &deviceExtension->chan[c]; for (i=0; iRegTranslation[IDX_BM_IO+i].Addr = BaseIoAddressBM_0 ? ((ULONG_PTR)BaseIoAddressBM_0 + i) : 0; + chan->RegTranslation[IDX_BM_IO+i].Addr = BaseIoAddressBM_0 ? ((ULONGIO_PTR)BaseIoAddressBM_0 + i) : 0; chan->RegTranslation[IDX_BM_IO+i].MemIo = MemIo; } if(BaseIoAddressBM_0) { @@ -2191,11 +2261,11 @@ UniataInitMapBase( ULONG i; for (i=0; iRegTranslation[IDX_IO1+i].Addr = BaseIoAddress1 ? ((ULONG_PTR)BaseIoAddress1 + i) : 0; + chan->RegTranslation[IDX_IO1+i].Addr = BaseIoAddress1 ? ((ULONGIO_PTR)BaseIoAddress1 + i) : 0; chan->RegTranslation[IDX_IO1+i].MemIo = FALSE; } for (i=0; iRegTranslation[IDX_IO2+i].Addr = BaseIoAddress2 ? ((ULONG_PTR)BaseIoAddress2 + i) : 0; + chan->RegTranslation[IDX_IO2+i].Addr = BaseIoAddress2 ? ((ULONGIO_PTR)BaseIoAddress2 + i) : 0; chan->RegTranslation[IDX_IO2+i].MemIo = FALSE; } UniataInitSyncBaseIO(chan); @@ -2234,6 +2304,8 @@ AtapiSetupLunPtrs( chan->NextDpcChan = -1; for(i=0; iNumberLuns; i++) { chan->lun[i]->DeviceExtension = deviceExtension; + chan->lun[i]->chan = chan; + chan->lun[i]->Lun = i; } } // end AtapiSetupLunPtrs() diff --git a/drivers/storage/ide/uniata/id_probe.cpp b/drivers/storage/ide/uniata/id_probe.cpp index 00eab9bec7b..26505f5fa1f 100644 --- a/drivers/storage/ide/uniata/id_probe.cpp +++ b/drivers/storage/ide/uniata/id_probe.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2002-2010 Alexandr A. Telyatnikov (Alter) +Copyright (c) 2002-2011 Alexandr A. Telyatnikov (Alter) Module Name: id_probe.cpp @@ -98,7 +98,7 @@ AtapiGetIoRange( IN ULONG length ) { - ULONG_PTR io_start = 0; + ULONGIO_PTR io_start = 0; KdPrint2((PRINT_PREFIX " AtapiGetIoRange:\n")); if(ConfigInfo->NumberOfAccessRanges <= rid) @@ -208,6 +208,7 @@ UniataCheckPCISubclass( break; case PCI_DEV_SUBCLASS_IDE: case PCI_DEV_SUBCLASS_ATA: + break; case PCI_DEV_SUBCLASS_SATA: break; default: @@ -250,6 +251,9 @@ UniataEnumBusMasterController__( ULONG DeviceID; ULONG dev_id; + USHORT SubVendorID; + USHORT SubSystemID; + ULONG i; ULONG pass=0; @@ -295,7 +299,7 @@ UniataEnumBusMasterController__( break; } // no device in this slot - if(busDataRead == 2) { + if(busDataRead == 2) { NeedPciAltInit = TRUE; continue; } @@ -310,10 +314,39 @@ UniataEnumBusMasterController__( BaseClass = pciData.BaseClass; SubClass = pciData.SubClass; dev_id = VendorID | (DeviceID << 16); + + SubVendorID = pciData.u.type0.SubVendorID; + SubSystemID = pciData.u.type0.SubSystemID; + + //KdPrint2((PRINT_PREFIX "DevId = %8.8X Class = %4.4X/%4.4X\n", dev_id, BaseClass, SubClass )); - if(BaseClass != PCI_DEV_CLASS_STORAGE) + if(VendorID == 0x80ee && DeviceID == 0xcafe) { + KdPrint2((PRINT_PREFIX "-- BusID: %#x:%#x:%#x - VirtualBox Guest Service\n",busNumber,slotNumber,funcNumber)); + if(g_opt_VirtualMachine == VM_AUTO) { + g_opt_VirtualMachine = VM_VBOX; + } + //continue; + } else + if((VendorID == 0x15ad) || + (SubVendorID == 0x15ad && SubSystemID == 0x1976)) { + KdPrint2((PRINT_PREFIX "-- BusID: %#x:%#x:%#x - VMWare\n",busNumber,slotNumber,funcNumber)); + if(g_opt_VirtualMachine == VM_AUTO) { + g_opt_VirtualMachine = VM_VMWARE; + } + //g_opt_VirtualBox = TRUE; + } else + if(SubVendorID == 0x1af4 && SubSystemID == 0x1100) { + KdPrint2((PRINT_PREFIX "-- BusID: %#x:%#x:%#x - QEmu\n",busNumber,slotNumber,funcNumber)); + if(g_opt_VirtualMachine == VM_AUTO) { + g_opt_VirtualMachine = VM_QEMU; + } + } + + + if(BaseClass != PCI_DEV_CLASS_STORAGE) { continue; + } KdPrint2((PRINT_PREFIX "-- BusID: %#x:%#x:%#x\n",busNumber,slotNumber,funcNumber)); KdPrint2((PRINT_PREFIX "Storage Class\n")); @@ -367,7 +400,8 @@ UniataEnumBusMasterController__( /* unknown chipsets, try generic DMA if it seems possible */ default: KdPrint2((PRINT_PREFIX "Default device\n")); - if(Ata_is_supported_dev(&pciData)) + if(Ata_is_supported_dev(&pciData) || + Ata_is_ahci_dev(&pciData)) found = TRUE; break; } @@ -825,6 +859,11 @@ UniataAllocateLunExt( } } + if(!deviceExtension->NumberLuns) { + KdPrint2((PRINT_PREFIX "default NumberLuns=2\n")); + deviceExtension->NumberLuns = 2; + } + deviceExtension->lun = (PHW_LU_EXTENSION)ExAllocatePool(NonPagedPool, sizeof(HW_LU_EXTENSION) * (deviceExtension->NumberChannels+1) * deviceExtension->NumberLuns); if (!deviceExtension->lun) { KdPrint2((PRINT_PREFIX "!deviceExtension->lun => SP_RETURN_ERROR\n")); @@ -900,7 +939,7 @@ UniataFindBusMasterController( ULONG dev_id; PCI_SLOT_NUMBER slotData; - ULONG_PTR i; + ULONG i; ULONG channel; ULONG c = 0; PUCHAR ioSpace; @@ -953,7 +992,7 @@ UniataFindBusMasterController( KdPrint2((PRINT_PREFIX "AdapterInterfaceType: Isa\n")); } if(InDriverEntry) { - i = (ULONG_PTR)Context; + i = (ULONG)Context; if(i & 0x80000000) { AltInit = TRUE; } @@ -969,7 +1008,7 @@ UniataFindBusMasterController( } if(i >= BMListLen) { KdPrint2((PRINT_PREFIX "unexpected device arrival\n")); - i = (ULONG_PTR)Context; + i = (ULONG)Context; if(FirstMasterOk) { channel = 1; } @@ -1104,12 +1143,16 @@ UniataFindBusMasterController( if (found) break; KdPrint2((PRINT_PREFIX "Default device\n")); - if(!Ata_is_supported_dev(&pciData)) { - KdPrint2((PRINT_PREFIX "!Ata_is_supported_dev => found = FALSE\n")); - found = FALSE; - } else { + if(Ata_is_supported_dev(&pciData)) { KdPrint2((PRINT_PREFIX "Ata_is_supported_dev\n")); found = TRUE; + } else + if(deviceExtension->HwFlags & UNIATA_AHCI) { + KdPrint2((PRINT_PREFIX "AHCI candidate\n")); + found = TRUE; + } else { + KdPrint2((PRINT_PREFIX "!Ata_is_supported_dev => found = FALSE\n")); + found = FALSE; } deviceExtension->UnknownDev = TRUE; break; @@ -1217,7 +1260,7 @@ UniataFindBusMasterController( BaseIoAddressBM_0, (*ConfigInfo->AccessRanges)[4].RangeInMemory ? TRUE : FALSE); deviceExtension->BusMaster = TRUE; - deviceExtension->BaseIoAddressBM_0.Addr = (ULONG_PTR)BaseIoAddressBM_0; + deviceExtension->BaseIoAddressBM_0.Addr = (ULONGIO_PTR)BaseIoAddressBM_0; if((*ConfigInfo->AccessRanges)[4].RangeInMemory) { deviceExtension->BaseIoAddressBM_0.MemIo = TRUE; } @@ -1233,7 +1276,7 @@ UniataFindBusMasterController( if(deviceExtension->BusMaster && !MasterDev) { KdPrint2((PRINT_PREFIX "IsBusMaster == TRUE && !MasterDev\n")); statusByte = AtapiReadPort1(&(deviceExtension->chan[0]), IDX_BM_Status); - KdPrint2((PRINT_PREFIX " statusByte = %x\n", statusByte)); + KdPrint2((PRINT_PREFIX " BM statusByte = %x\n", statusByte)); if(statusByte == 0xff) { KdPrint2((PRINT_PREFIX " invalid port ?\n")); /* @@ -1377,7 +1420,7 @@ UniataFindBusMasterController( KdPrint2((PRINT_PREFIX "update ConfigInfo->w2k\n")); _ConfigInfo->w2k.Dma64BitAddresses = 0; _ConfigInfo->w2k.ResetTargetSupported = TRUE; - _ConfigInfo->w2k.MaximumNumberOfLogicalUnits = 2; + _ConfigInfo->w2k.MaximumNumberOfLogicalUnits = (UCHAR)deviceExtension->NumberLuns; } // Save the Interrupe Mode for later use @@ -1454,6 +1497,9 @@ UniataFindBusMasterController( /* do extra channel-specific setups */ AtapiReadChipConfig(HwDeviceExtension, i, channel); //AtapiChipInit(HwDeviceExtension, i, channel); + if(deviceExtension->HwFlags & UNIATA_AHCI) { + KdPrint2((PRINT_PREFIX " No more setup for AHCI channel\n")); + } else if(deviceExtension->AltRegMap) { KdPrint2((PRINT_PREFIX " Non-standard registers layout\n")); } else { @@ -1598,7 +1644,8 @@ UniataFindBusMasterController( chan->RegTranslation[IDX_SATA_IO].Addr, chan->RegTranslation[IDX_SATA_IO].MemIo ? "mem" : "io")); - UniataDumpATARegs(chan); + if(!(deviceExtension->HwFlags & UNIATA_AHCI)) { + UniataDumpATARegs(chan); #ifndef UNIATA_CORE #ifdef UNIATA_INIT_ON_PROBE @@ -1644,6 +1691,7 @@ UniataFindBusMasterController( //#ifdef UNIATA_INIT_ON_PROBE // } #endif //UNIATA_INIT_ON_PROBE + } found = TRUE; chan->PrimaryAddress = FALSE; @@ -1796,7 +1844,7 @@ UniataFindFakeBusMasterController( ULONG dev_id; PCI_SLOT_NUMBER slotData; - ULONG_PTR i; + ULONG i; // PUCHAR ioSpace; // UCHAR statusByte; @@ -1818,7 +1866,7 @@ UniataFindFakeBusMasterController( *Again = FALSE; if(InDriverEntry) { - i = (ULONG_PTR)Context; + i = (ULONG)Context; } else { for(i=0; iSlotNumber && @@ -1910,14 +1958,7 @@ UniataFindFakeBusMasterController( goto exit_notfound; } - switch(SubClass) { - case PCI_DEV_SUBCLASS_IDE: - case PCI_DEV_SUBCLASS_RAID: - case PCI_DEV_SUBCLASS_ATA: - case PCI_DEV_SUBCLASS_SATA: - // ok - break; - default: + if(!UniataCheckPCISubclass(FALSE, BMList[i].RaidFlags, SubClass)) { KdPrint2((PRINT_PREFIX "Subclass not supported\n")); goto exit_notfound; } @@ -1954,12 +1995,12 @@ UniataFindFakeBusMasterController( if (found) break; KdPrint2((PRINT_PREFIX "Default device\n")); - if(!Ata_is_supported_dev(&pciData)) { - KdPrint2((PRINT_PREFIX "!Ata_is_supported_dev => found = FALSE\n")); - found = FALSE; - } else { + if(Ata_is_supported_dev(&pciData)) { KdPrint2((PRINT_PREFIX "Ata_is_supported_dev\n")); found = TRUE; + } else { + KdPrint2((PRINT_PREFIX "!Ata_is_supported_dev => found = FALSE\n")); + found = FALSE; } deviceExtension->UnknownDev = TRUE; break; @@ -2015,7 +2056,7 @@ UniataFindFakeBusMasterController( BaseIoAddressBM_0, (*ConfigInfo->AccessRanges)[4].RangeInMemory ? TRUE : FALSE); deviceExtension->BusMaster = TRUE; - deviceExtension->BaseIoAddressBM_0.Addr = (ULONG_PTR)BaseIoAddressBM_0; + deviceExtension->BaseIoAddressBM_0.Addr = (ULONGIO_PTR)BaseIoAddressBM_0; if((*ConfigInfo->AccessRanges)[4].RangeInMemory) { deviceExtension->BaseIoAddressBM_0.MemIo = TRUE; } @@ -2438,14 +2479,14 @@ AtapiFindController( ioSpace = (PUCHAR)ScsiPortGetDeviceBase(HwDeviceExtension, ConfigInfo->AdapterInterfaceType, ConfigInfo->SystemIoBusNumber, - ScsiPortConvertUlongToPhysicalAddress((ULONG_PTR)BaseIoAddress1 + 0x0E), + ScsiPortConvertUlongToPhysicalAddress((ULONGIO_PTR)BaseIoAddress1 + 0x0E), ATA_ALTIOSIZE, TRUE); } else { ioSpace = (PUCHAR)ScsiPortGetDeviceBase(HwDeviceExtension, ConfigInfo->AdapterInterfaceType, ConfigInfo->SystemIoBusNumber, - ScsiPortConvertUlongToPhysicalAddress((ULONG_PTR)BaseIoAddress1 + ATA_ALTOFFSET), + ScsiPortConvertUlongToPhysicalAddress((ULONGIO_PTR)BaseIoAddress1 + ATA_ALTOFFSET), ATA_ALTIOSIZE, TRUE); } @@ -2698,8 +2739,8 @@ UniataAnybodyHome( { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]); - ULONG ldev = GET_LDEV2(lChannel, deviceNumber, 0); - PHW_LU_EXTENSION LunExt = &(deviceExtension->lun[ldev]); + //ULONG ldev = GET_LDEV2(lChannel, deviceNumber, 0); + PHW_LU_EXTENSION LunExt = chan->lun[deviceNumber]; SATA_SSTATUS_REG SStatus; UCHAR signatureLow; @@ -2775,8 +2816,8 @@ CheckDevice( { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]); - ULONG ldev = GET_LDEV2(lChannel, deviceNumber, 0); - PHW_LU_EXTENSION LunExt = &(deviceExtension->lun[ldev]); + //ULONG ldev = GET_LDEV2(lChannel, deviceNumber, 0); + PHW_LU_EXTENSION LunExt; UCHAR signatureLow, signatureHigh; @@ -2786,6 +2827,21 @@ CheckDevice( KdPrint2((PRINT_PREFIX "CheckDevice: Device %#x\n", deviceNumber)); + + if(deviceNumber > chan->NumberLuns) { + return 0; + } + + LunExt = chan->lun[deviceNumber]; + + if(ResetDev && (deviceExtension->HwFlags & UNIATA_AHCI)) { + KdPrint2((PRINT_PREFIX "CheckDevice: reset AHCI dev\n")); + if(UniataAhciSoftReset(HwDeviceExtension, chan->lChannel, deviceNumber) == (ULONG)(-1)) { + KdPrint2((PRINT_PREFIX "CheckDevice: (no dev)\n")); + UniataForgetDevice(LunExt); + return 0; + } + } else if(ResetDev) { KdPrint2((PRINT_PREFIX "CheckDevice: reset dev\n")); @@ -2839,26 +2895,35 @@ CheckDevice( } } } - // Select the device. - SelectDrive(chan, deviceNumber); - if(!UniataAnybodyHome(HwDeviceExtension, lChannel, deviceNumber)) { - return 0; - } + if(deviceExtension->HwFlags & UNIATA_AHCI) { + RetVal = LunExt->DeviceFlags; + signatureLow = signatureHigh = 0; // make GCC happy + } else { + // Select the device. + SelectDrive(chan, deviceNumber); - statusByte = WaitOnBaseBusyLong(chan); + if(!UniataAnybodyHome(HwDeviceExtension, lChannel, deviceNumber)) { + return 0; + } - GetBaseStatus(chan, statusByte); - if(deviceExtension->HwFlags & UNIATA_SATA) { - UniataSataClearErr(HwDeviceExtension, lChannel, UNIATA_SATA_IGNORE_CONNECT, deviceNumber); - } + statusByte = WaitOnBaseBusyLong(chan); - KdPrint2((PRINT_PREFIX "CheckDevice: status %#x\n", statusByte)); - if(((statusByte | IDE_STATUS_BUSY) == 0xff) || - (statusByte & IDE_STATUS_BUSY)) { - KdPrint2((PRINT_PREFIX "CheckDevice: busy => return\n")); - UniataForgetDevice(LunExt); - return 0; + GetBaseStatus(chan, statusByte); + if(deviceExtension->HwFlags & UNIATA_SATA) { + UniataSataClearErr(HwDeviceExtension, lChannel, UNIATA_SATA_IGNORE_CONNECT, deviceNumber); + } + + KdPrint2((PRINT_PREFIX "CheckDevice: status %#x\n", statusByte)); + if(((statusByte | IDE_STATUS_BUSY) == 0xff) || + (statusByte & IDE_STATUS_BUSY)) { + KdPrint2((PRINT_PREFIX "CheckDevice: busy => return\n")); + UniataForgetDevice(LunExt); + return 0; + } + + signatureLow = AtapiReadPort1(chan, IDX_IO1_i_CylinderLow); + signatureHigh = AtapiReadPort1(chan, IDX_IO1_i_CylinderHigh); } // set default costs @@ -2866,9 +2931,22 @@ CheckDevice( LunExt->RwSwitchMCost = REORDER_MCOST_SWITCH_RW_HDD; LunExt->SeekBackMCost = REORDER_MCOST_SEEK_BACK_HDD; - signatureLow = AtapiReadPort1(chan, IDX_IO1_i_CylinderLow); - signatureHigh = AtapiReadPort1(chan, IDX_IO1_i_CylinderHigh); - + if(deviceExtension->HwFlags & UNIATA_AHCI) { + if(RetVal & DFLAGS_DEVICE_PRESENT) { + if(IssueIdentify(HwDeviceExtension, + deviceNumber, + lChannel, + (RetVal & DFLAGS_ATAPI_DEVICE) ? IDE_COMMAND_ATAPI_IDENTIFY : IDE_COMMAND_IDENTIFY, + FALSE)) { + // OK + KdPrint2((PRINT_PREFIX "CheckDevice: detected AHCI Device %#x\n", + deviceNumber)); + } else { + RetVal &= ~DFLAGS_ATAPI_DEVICE; + LunExt->DeviceFlags &= ~DFLAGS_ATAPI_DEVICE; + } + } + } else if (signatureLow == ATAPI_MAGIC_LSB && signatureHigh == ATAPI_MAGIC_MSB) { KdPrint2((PRINT_PREFIX "CheckDevice: ATAPI signature found\n")); @@ -2982,7 +3060,6 @@ FindDevices( //ULONG deviceNumber; ULONG i; UCHAR statusByte; - ULONG ldev; ULONG max_ldev; BOOLEAN AtapiOnly = FALSE; @@ -2995,24 +3072,31 @@ FindDevices( // Clear expecting interrupt flag and current SRB field. chan->ExpectingInterrupt = FALSE; // chan->CurrentSrb = NULL; - max_ldev = (chan->ChannelCtrlFlags & CTRFLAGS_NO_SLAVE) ? 1 : IDE_MAX_LUN_PER_CHAN; +// max_ldev = (chan->ChannelCtrlFlags & CTRFLAGS_NO_SLAVE) ? 1 : IDE_MAX_LUN_PER_CHAN; + max_ldev = (chan->ChannelCtrlFlags & CTRFLAGS_NO_SLAVE) ? 1 : deviceExtension->NumberLuns; KdPrint2((PRINT_PREFIX " max_ldev %d\n", max_ldev)); // Search for devices. for (i = 0; i < max_ldev; i++) { - AtapiDisableInterrupts(deviceExtension, Channel); + //AtapiDisableInterrupts(deviceExtension, Channel); if(Flags & UNIATA_FIND_DEV_UNHIDE) { - ldev = GET_LDEV2(Channel, i, 0); - deviceExtension->lun[ldev].DeviceFlags &= ~DFLAGS_HIDDEN; + chan->lun[i]->DeviceFlags &= ~DFLAGS_HIDDEN; } deviceResponded |= (CheckDevice(HwDeviceExtension, Channel, i, TRUE) != 0); + //AtapiEnableInterrupts(deviceExtension, Channel); + } + + if(chan->DeviceExtension->HwFlags & UNIATA_AHCI) { AtapiEnableInterrupts(deviceExtension, Channel); + KdPrint2((PRINT_PREFIX + "FindDevices: returning %d (AHCI)\n", + deviceResponded)); + return deviceResponded; } for (i = 0; i < max_ldev; i++) { - ldev = GET_LDEV2(Channel, i, 0); - LunExt = &(deviceExtension->lun[ldev]); + LunExt = chan->lun[i]; if (( LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT) && !(LunExt->DeviceFlags & DFLAGS_LBA_ENABLED) && @@ -3114,7 +3198,7 @@ FindDevices( i)); // Don't use this device as writes could cause corruption. LunExt->DeviceFlags &= ~DFLAGS_DEVICE_PRESENT; - UniataForgetDevice(&(deviceExtension->lun[ldev])); + UniataForgetDevice(LunExt); continue; } @@ -3145,8 +3229,7 @@ FindDevices( */ if(deviceResponded) { for (i = 0; i < max_ldev; i++) { - ldev = GET_LDEV2(Channel, i, 0); - LunExt = &(deviceExtension->lun[ldev]); + LunExt = chan->lun[i]; KdPrint2((PRINT_PREFIX "FindDevices: select %d dev to clear INTR\n", i)); @@ -3156,8 +3239,7 @@ FindDevices( "FindDevices: statusByte=%#x\n", statusByte)); } for (i = 0; i < max_ldev; i++) { - ldev = GET_LDEV2(Channel, i, 0); - LunExt = &(deviceExtension->lun[ldev]); + LunExt = chan->lun[i]; if(LunExt->DeviceFlags & DFLAGS_DEVICE_PRESENT) { // Make sure some device (master is preferred) is selected on exit. diff --git a/drivers/storage/ide/uniata/id_queue.cpp b/drivers/storage/ide/uniata/id_queue.cpp index 4753eb321cd..451054a3838 100644 --- a/drivers/storage/ide/uniata/id_queue.cpp +++ b/drivers/storage/ide/uniata/id_queue.cpp @@ -107,13 +107,13 @@ UniataQueueRequest( BOOLEAN reordered = FALSE; #endif //QUEUE_STATISTICS - PHW_LU_EXTENSION LunExt = chan->lun[GET_LDEV(Srb) & 1]; + PHW_LU_EXTENSION LunExt = chan->lun[GET_CDEV(Srb)]; AtaReq->Srb = Srb; /* #ifdef _DEBUG if(!LunExt) { - PrintNtConsole("q: chan = %#x, dev %#x\n", chan, GET_LDEV(Srb)); + PrintNtConsole("q: chan = %#x, dev %#x\n", chan, GET_CDEV(Srb)); int i; for(i=0; i<1000; i++) { AtapiStallExecution(5*1000); @@ -267,7 +267,7 @@ UniataRemoveRequest( PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension); //PHW_DEVICE_EXTENSION deviceExtension = chan->DeviceExtension; - ULONG cdev = GET_LDEV(Srb) & 1; + ULONG cdev = GET_CDEV(Srb); PHW_LU_EXTENSION LunExt = chan->lun[cdev]; if(!LunExt) diff --git a/drivers/storage/ide/uniata/id_queue.h b/drivers/storage/ide/uniata/id_queue.h index a697dec0a43..f292349456e 100644 --- a/drivers/storage/ide/uniata/id_queue.h +++ b/drivers/storage/ide/uniata/id_queue.h @@ -42,4 +42,4 @@ UniataGetNextChannel( IN PHW_CHANNEL chan ); -#endif //__UNIATA_COMMAND_QUEUE_SUPPORT__H__ +#endif //__UNIATA_COMMAND_QUEUE_SUPPORT__H__ \ No newline at end of file diff --git a/drivers/storage/ide/uniata/id_sata.cpp b/drivers/storage/ide/uniata/id_sata.cpp index e73ac56280e..0a658224870 100644 --- a/drivers/storage/ide/uniata/id_sata.cpp +++ b/drivers/storage/ide/uniata/id_sata.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2008-2010 Alexandr A. Telyatnikov (Alter) +Copyright (c) 2008-2011 Alexandr A. Telyatnikov (Alter) Module Name: id_probe.cpp @@ -66,8 +66,10 @@ UniataSataConnect( for(i=0; i<100; i++) { SStatus.Reg = UniataSataReadPort4(chan, IDX_SATA_SStatus, pm_port); if(SStatus.SPD == SStatus_SPD_Gen1 || - SStatus.SPD == SStatus_SPD_Gen2) { - deviceExtension->lun[lChannel*2].TransferMode = ATA_SA150 + (UCHAR)(SStatus.SPD - 1); + SStatus.SPD == SStatus_SPD_Gen2 || + SStatus.SPD == SStatus_SPD_Gen3) { + chan->lun[0]->TransferMode = ATA_SA150 + (UCHAR)(SStatus.SPD - 1); + KdPrint2((PRINT_PREFIX "SATA TransferMode %#x\n", chan->lun[0]->TransferMode)); break; } AtapiStallExecution(10000); @@ -91,7 +93,7 @@ UniataSataConnect( if (signatureLow == ATAPI_MAGIC_LSB && signatureHigh == ATAPI_MAGIC_MSB) { } */ - KdPrint2((PRINT_PREFIX "UniataSataConnect: OK, ATA status %x\n", Status)); + KdPrint2((PRINT_PREFIX "UniataSataConnect: OK, ATA status %#x\n", Status)); return IDE_STATUS_IDLE; } // end UniataSataConnect() @@ -100,7 +102,8 @@ NTAPI UniataSataPhyEnable( IN PVOID HwDeviceExtension, IN ULONG lChannel, // logical channel - IN ULONG pm_port /* for port multipliers */ + IN ULONG pm_port, /* for port multipliers */ + IN BOOLEAN doReset ) { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; @@ -116,9 +119,11 @@ UniataSataPhyEnable( } SControl.Reg = UniataSataReadPort4(chan, IDX_SATA_SControl, pm_port); - KdPrint2((PRINT_PREFIX "SControl %x\n", SControl.Reg)); + KdPrint2((PRINT_PREFIX "SControl %#x\n", SControl.Reg)); if(SControl.DET == SControl_DET_Idle) { - return UniataSataConnect(HwDeviceExtension, lChannel, pm_port); + if(!doReset) { + return UniataSataConnect(HwDeviceExtension, lChannel, pm_port); + } } for (retry = 0; retry < 10; retry++) { @@ -129,7 +134,7 @@ UniataSataPhyEnable( UniataSataWritePort4(chan, IDX_SATA_SControl, SControl.Reg, pm_port); AtapiStallExecution(100); SControl.Reg = UniataSataReadPort4(chan, IDX_SATA_SControl, pm_port); - KdPrint2((PRINT_PREFIX " SControl %8.8%x\n", SControl.Reg)); + KdPrint2((PRINT_PREFIX " SControl %8.8x\n", SControl.Reg)); if(SControl.DET == SControl_DET_Init) { break; } @@ -143,7 +148,7 @@ UniataSataPhyEnable( UniataSataWritePort4(chan, IDX_SATA_SControl, SControl.Reg, pm_port); AtapiStallExecution(100); SControl.Reg = UniataSataReadPort4(chan, IDX_SATA_SControl, pm_port); - KdPrint2((PRINT_PREFIX " SControl %8.8%x\n", SControl.Reg)); + KdPrint2((PRINT_PREFIX " SControl %8.8x\n", SControl.Reg)); if(SControl.DET == SControl_DET_Idle) { return UniataSataConnect(HwDeviceExtension, lChannel, pm_port); } @@ -176,10 +181,10 @@ UniataSataClearErr( SError.Reg = UniataSataReadPort4(chan, IDX_SATA_SError, pm_port); if(SStatus.Reg) { - KdPrint2((PRINT_PREFIX " SStatus %x\n", SStatus.Reg)); + KdPrint2((PRINT_PREFIX " SStatus %#x\n", SStatus.Reg)); } if(SError.Reg) { - KdPrint2((PRINT_PREFIX " SError %x\n", SError.Reg)); + KdPrint2((PRINT_PREFIX " SError %#x\n", SError.Reg)); /* clear error bits/interrupt */ UniataSataWritePort4(chan, IDX_SATA_SError, SError.Reg, pm_port); @@ -211,7 +216,7 @@ UniataSataEvent( { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; UCHAR Status; - ULONG ldev = lChannel*2 + (pm_port ? 1 : 0); + ULONG DeviceNumber = (pm_port ? 1 : 0); if(!UniataIsSATARangeAvailable(deviceExtension, lChannel)) { return FALSE; @@ -221,16 +226,16 @@ UniataSataEvent( case UNIATA_SATA_EVENT_ATTACH: KdPrint2((PRINT_PREFIX " CONNECTED\n")); Status = UniataSataConnect(HwDeviceExtension, lChannel, pm_port); - KdPrint2((PRINT_PREFIX " Status %x\n", Status)); + KdPrint2((PRINT_PREFIX " Status %#x\n", Status)); if(Status != IDE_STATUS_IDLE) { return FALSE; } - CheckDevice(HwDeviceExtension, lChannel, pm_port ? 1 : 0 /*dev*/, FALSE); + CheckDevice(HwDeviceExtension, lChannel, DeviceNumber /*dev*/, FALSE); return TRUE; break; case UNIATA_SATA_EVENT_DETACH: KdPrint2((PRINT_PREFIX " DISCONNECTED\n")); - UniataForgetDevice(&(deviceExtension->lun[ldev])); + UniataForgetDevice(deviceExtension->chan[lChannel].lun[DeviceNumber]); return TRUE; break; } @@ -239,6 +244,7 @@ UniataSataEvent( ULONG NTAPI +NTAPI UniataSataReadPort4( IN PHW_CHANNEL chan, IN ULONG io_port_ndx, @@ -248,6 +254,8 @@ UniataSataReadPort4( if(chan && (io_port_ndx < IDX_MAX_REG) && chan->RegTranslation[io_port_ndx].Proc) { + KdPrint3((PRINT_PREFIX " UniataSataReadPort4 %#x[%d]\n", io_port_ndx, pm_port)); + PHW_DEVICE_EXTENSION deviceExtension = chan->DeviceExtension; PVOID HwDeviceExtension = (PVOID)deviceExtension; ULONG slotNumber = deviceExtension->slotNumber; @@ -261,6 +269,7 @@ UniataSataReadPort4( p = pm_port ? 1 : 0; if(deviceExtension->HwFlags & ICH5) { offs = 0x50+chan->lun[p]->SATA_lun_map*0x10; + KdPrint3((PRINT_PREFIX " ICH5 way, offs %#x\n", offs)); switch(io_port_ndx) { case IDX_SATA_SStatus: offs += 0; @@ -279,6 +288,7 @@ UniataSataReadPort4( return offs; } else { offs = ((deviceExtension->Channel+chan->lChannel)*2+p) * 0x100; + KdPrint3((PRINT_PREFIX " def way, offs %#x\n", offs)); switch(io_port_ndx) { case IDX_SATA_SStatus: offs += 0; @@ -314,6 +324,8 @@ UniataSataWritePort4( if(chan && (io_port_ndx < IDX_MAX_REG) && chan->RegTranslation[io_port_ndx].Proc) { + KdPrint3((PRINT_PREFIX " UniataSataWritePort4 %#x[%d]\n", io_port_ndx, pm_port)); + PHW_DEVICE_EXTENSION deviceExtension = chan->DeviceExtension; PVOID HwDeviceExtension = (PVOID)deviceExtension; ULONG slotNumber = deviceExtension->slotNumber; @@ -327,6 +339,7 @@ UniataSataWritePort4( p = pm_port ? 1 : 0; if(deviceExtension->HwFlags & ICH5) { offs = 0x50+chan->lun[p]->SATA_lun_map*0x10; + KdPrint3((PRINT_PREFIX " ICH5 way, offs %#x\n", offs)); switch(io_port_ndx) { case IDX_SATA_SStatus: offs += 0; @@ -345,6 +358,7 @@ UniataSataWritePort4( return; } else { offs = ((deviceExtension->Channel+chan->lChannel)*2+p) * 0x100; + KdPrint3((PRINT_PREFIX " def way, offs %#x\n", offs)); switch(io_port_ndx) { case IDX_SATA_SStatus: offs += 0; @@ -368,6 +382,205 @@ UniataSataWritePort4( AtapiWritePort4(chan, io_port_ndx, data); } // end UniataSataWritePort4() +BOOLEAN +NTAPI +UniataSataReadPM( + IN PHW_CHANNEL chan, + IN ULONG DeviceNumber, + IN ULONG Reg, + OUT PULONG result + ) +{ + if(chan->DeviceExtension->HwFlags & UNIATA_AHCI) { + return UniataAhciReadPM(chan, DeviceNumber, Reg, result); + } + return FALSE; +} // end UniataSataReadPM() + +UCHAR +NTAPI +UniataSataWritePM( + IN PHW_CHANNEL chan, + IN ULONG DeviceNumber, + IN ULONG Reg, + IN ULONG value + ) +{ + if(chan->DeviceExtension->HwFlags & UNIATA_AHCI) { + return UniataAhciWritePM(chan, DeviceNumber, Reg, value); + } + return 0xff; +} // end UniataSataWritePM() + +ULONG +NTAPI +UniataSataSoftReset( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber + ) +{ + PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + + if(deviceExtension->HwFlags & UNIATA_AHCI) { + return UniataAhciSoftReset(HwDeviceExtension, lChannel, DeviceNumber); + } + return 0xffffffff; +} // end UniataSataSoftReset() + +VOID +UniataSataIdentifyPM( + IN PHW_CHANNEL chan + ) +{ + ULONG PM_DeviceId; + ULONG PM_RevId; + ULONG PM_Ports; + UCHAR i; + ULONG signature; + PHW_LU_EXTENSION LunExt; + + KdPrint((PRINT_PREFIX "UniataSataIdentifyPM:\n")); + + chan->PmLunMap = 0; + + /* get PM vendor & product data */ + if(!UniataSataReadPM(chan, AHCI_DEV_SEL_PM, 0, &PM_DeviceId)) { + KdPrint2((PRINT_PREFIX " error getting PM vendor data\n")); + return; + } + /* get PM revision data */ + if(!UniataSataReadPM(chan, AHCI_DEV_SEL_PM, 1, &PM_RevId)) { + KdPrint2((PRINT_PREFIX " error getting PM revison data\n")); + return; + } + /* get number of HW ports on the PM */ + if(!UniataSataReadPM(chan, AHCI_DEV_SEL_PM, 2, &PM_Ports)) { + KdPrint2((PRINT_PREFIX " error getting PM port info\n")); + return; + } + + PM_Ports &= 0x0000000f; + + switch(PM_DeviceId) { + case 0x37261095: + /* This PM declares 6 ports, while only 5 of them are real. + * Port 5 is enclosure management bridge port, which has implementation + * problems, causing probe faults. Hide it for now. */ + KdPrint2((PRINT_PREFIX " SiI 3726 (rev=%#x) Port Multiplier with %d (5) ports\n", + PM_RevId, PM_Ports)); + PM_Ports = 5; + break; + case 0x47261095: + /* This PM declares 7 ports, while only 5 of them are real. + * Port 5 is some fake "Config Disk" with 640 sectors size, + * port 6 is enclosure management bridge port. + * Both fake ports has implementation problems, causing + * probe faults. Hide them for now. */ + KdPrint2((PRINT_PREFIX " SiI 4726 (rev=%#x) Port Multiplier with %d (5) ports\n", + PM_RevId, PM_Ports)); + PM_Ports = 5; + break; + default: + KdPrint2((PRINT_PREFIX " Port Multiplier (id=%08x rev=%#x) with %d ports\n", + PM_DeviceId, PM_RevId, PM_Ports)); + break; + } + + // reset + for(i=0; ilun[i]; + + KdPrint2((PRINT_PREFIX " Port %d\n", i)); + if(UniataSataPhyEnable(chan->DeviceExtension, chan->lChannel, i, UNIATA_SATA_RESET_ENABLE) != IDE_STATUS_IDLE) { + LunExt->DeviceFlags &= ~DFLAGS_DEVICE_PRESENT; + continue; + } + /* + * XXX: I have no idea how to properly wait for PMP port hardreset + * completion. Without this delay soft reset does not completes + * successfully. + */ + AtapiStallExecution(1000000); + + signature = UniataSataSoftReset(chan->DeviceExtension, chan->lChannel, i); + KdPrint2((PRINT_PREFIX " signature %#x\n", signature)); + + LunExt->DeviceFlags |= DFLAGS_DEVICE_PRESENT; + chan->PmLunMap |= (1 << i); + /* figure out whats there */ + switch (signature >> 16) { + case 0x0000: + LunExt->DeviceFlags &= ~DFLAGS_ATAPI_DEVICE; + continue; + case 0xeb14: + LunExt->DeviceFlags |= DFLAGS_ATAPI_DEVICE; + continue; + } + + } + +} // end UniataSataIdentifyPM() + +#ifdef DBG +VOID +NTAPI +UniataDumpAhciRegs( + IN PHW_DEVICE_EXTENSION deviceExtension + ) +{ + ULONG j; + ULONG xReg; + + KdPrint2((PRINT_PREFIX + " AHCI Base: %#x MemIo %d Proc %d\n", + deviceExtension->BaseIoAHCI_0.Addr, + deviceExtension->BaseIoAHCI_0.MemIo, + deviceExtension->BaseIoAHCI_0.Proc)); + + for(j=0; j<=IDX_AHCI_VS; j+=sizeof(ULONG)) { + xReg = AtapiReadPortEx4(NULL, (ULONGIO_PTR)&deviceExtension->BaseIoAHCI_0, j); + KdPrint2((PRINT_PREFIX + " AHCI_%#x (%#x) = %#x\n", + j, + (deviceExtension->BaseIoAHCI_0.Addr+j), + xReg)); + } + return; +} // end UniataDumpAhciRegs() + + +VOID +NTAPI +UniataDumpAhciPortRegs( + IN PHW_CHANNEL chan + ) +{ + ULONG j; + ULONG xReg; + + KdPrint2((PRINT_PREFIX + " AHCI port %d Base: %#x MemIo %d Proc %d\n", + chan->lChannel, + chan->BaseIoAHCI_Port.Addr, + chan->BaseIoAHCI_Port.MemIo, + chan->BaseIoAHCI_Port.Proc)); + + for(j=0; j<=IDX_AHCI_P_SNTF; j+=sizeof(ULONG)) { + xReg = AtapiReadPortEx4(NULL, (ULONGIO_PTR)&chan->BaseIoAHCI_Port, j); + KdPrint2((PRINT_PREFIX + " AHCI%d_%#x (%#x) = %#x\n", + chan->lChannel, + j, + (chan->BaseIoAHCI_Port.Addr+j), + xReg)); + } + return; +} // end UniataDumpAhciPortRegs() +#endif //DBG + + BOOLEAN NTAPI UniataAhciInit( @@ -375,27 +588,31 @@ UniataAhciInit( ) { PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; - ULONG version; - ULONG c, i, n; + ULONG c, i; PHW_CHANNEL chan; ULONG offs; ULONG BaseMemAddress; ULONG PI; ULONG CAP; ULONG GHC; - BOOLEAN MemIo; - ULONGLONG base; + BOOLEAN MemIo = FALSE; + + KdPrint2((PRINT_PREFIX " UniataAhciInit:\n")); + +#ifdef DBG + UniataDumpAhciRegs(deviceExtension); +#endif //DBG /* reset AHCI controller */ - GHC = AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC); - KdPrint2((PRINT_PREFIX " reset AHCI controller, GHC %x\n", GHC)); - AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC, + GHC = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_GHC); + KdPrint2((PRINT_PREFIX " reset AHCI controller, GHC %#x\n", GHC)); + UniataAhciWriteHostPort4(deviceExtension, IDX_AHCI_GHC, GHC | AHCI_GHC_HR); for(i=0; i<1000; i++) { AtapiStallExecution(1000); - GHC = AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC); - KdPrint2((PRINT_PREFIX " AHCI GHC %x\n", GHC)); + GHC = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_GHC); + KdPrint2((PRINT_PREFIX " AHCI GHC %#x\n", GHC)); if(!(GHC & AHCI_GHC_HR)) { break; } @@ -406,60 +623,39 @@ UniataAhciInit( } /* enable AHCI mode */ - GHC = AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC); - KdPrint2((PRINT_PREFIX " enable AHCI mode, GHC %x\n", GHC)); - AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC, + GHC = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_GHC); + KdPrint2((PRINT_PREFIX " enable AHCI mode, GHC %#x\n", GHC)); + UniataAhciWriteHostPort4(deviceExtension, IDX_AHCI_GHC, GHC | AHCI_GHC_AE); - GHC = AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC); - KdPrint2((PRINT_PREFIX " AHCI GHC %x\n", GHC)); + GHC = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_GHC); + KdPrint2((PRINT_PREFIX " AHCI GHC %#x\n", GHC)); - - CAP = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_CAP); - PI = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_PI); - KdPrint2((PRINT_PREFIX " AHCI CAP %x\n", CAP)); + deviceExtension->AHCI_CAP = + CAP = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_CAP); + PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI); + KdPrint2((PRINT_PREFIX " AHCI CAP %#x\n", CAP)); if(CAP & AHCI_CAP_S64A) { KdPrint2((PRINT_PREFIX " AHCI 64bit\n")); deviceExtension->Host64 = TRUE; } + KdPrint2((PRINT_PREFIX " AHCI %d CMD slots\n", (CAP & AHCI_CAP_NCS_MASK) >> 8 )); + if(CAP & AHCI_CAP_PMD) { + KdPrint2((PRINT_PREFIX " AHCI multi-block PIO\n")); + } + if(CAP & AHCI_CAP_SAM) { + KdPrint2((PRINT_PREFIX " AHCI legasy SATA\n")); + } /* get the number of HW channels */ - PI = AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_PI); - KdPrint2((PRINT_PREFIX " AHCI PI %x\n", PI)); - for(i=PI, n=0; i; n++, i=i>>1); - deviceExtension->NumberChannels = - max((CAP & AHCI_CAP_NOP_MASK)+1, n); - - switch(deviceExtension->DevID) { - case ATA_M88SX6111: - deviceExtension->NumberChannels = 1; - break; - case ATA_M88SX6121: - deviceExtension->NumberChannels = 2; - break; - case ATA_M88SX6141: - case ATA_M88SX6145: - deviceExtension->NumberChannels = 4; - break; - } // switch() + PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI); + KdPrint2((PRINT_PREFIX " AHCI PI %#x\n", PI)); /* clear interrupts */ - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS, - AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS)); + UniataAhciWriteHostPort4(deviceExtension, IDX_AHCI_IS, + UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_IS)); /* enable AHCI interrupts */ - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC, - AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC) | AHCI_GHC_IE); - - version = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_VS); - KdPrint2((PRINT_PREFIX " AHCI version %x.%02x controller with %d ports (mask %x) detected\n", - ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f), - ((version >> 4) & 0xf0) + (version & 0x0f), - deviceExtension->NumberChannels, PI)); - - KdPrint2((PRINT_PREFIX " PM%s supported\n", - CAP & AHCI_CAP_SPM ? "" : " not")); - - deviceExtension->HwFlags |= UNIATA_SATA; - deviceExtension->HwFlags |= UNIATA_AHCI; + UniataAhciWriteHostPort4(deviceExtension, IDX_AHCI_GHC, + UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_GHC) | AHCI_GHC_IE); BaseMemAddress = deviceExtension->BaseIoAHCI_0.Addr; MemIo = deviceExtension->BaseIoAHCI_0.MemIo; @@ -468,6 +664,13 @@ UniataAhciInit( chan = &deviceExtension->chan[c]; offs = sizeof(IDE_AHCI_REGISTERS) + c*sizeof(IDE_AHCI_PORT_REGISTERS); + KdPrint2((PRINT_PREFIX " chan %d, offs %#x\n", c, offs)); + + AtapiSetupLunPtrs(chan, deviceExtension, c); + + chan->BaseIoAHCI_Port = deviceExtension->BaseIoAHCI_0; + chan->BaseIoAHCI_Port.Addr = BaseMemAddress + offs; + chan->RegTranslation[IDX_IO1_i_Status ].Addr = BaseMemAddress + offs + FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, TFD.STS); chan->RegTranslation[IDX_IO1_i_Status ].MemIo = MemIo; chan->RegTranslation[IDX_IO2_AltStatus] = chan->RegTranslation[IDX_IO1_i_Status]; @@ -493,21 +696,7 @@ UniataAhciInit( AtapiDmaAlloc(HwDeviceExtension, NULL, c); - base = chan->AHCI_CL_PhAddr; - if(!base) { - KdPrint2((PRINT_PREFIX " AHCI buffer allocation failed\n")); - return FALSE; - } - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_CLB, - (ULONG)(base & 0xffffffff)); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_CLB + 4, - (ULONG)((base >> 32) & 0xffffffff)); - - base = chan->AHCI_CL_PhAddr + ATA_AHCI_MAX_TAGS; - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_FB, - (ULONG)(base & 0xffffffff)); - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_FB + 4, - (ULONG)((base >> 32) & 0xffffffff)); + UniataAhciResume(chan); chan->ChannelCtrlFlags |= CTRFLAGS_NO_SLAVE; } @@ -515,6 +704,139 @@ UniataAhciInit( return TRUE; } // end UniataAhciInit() +BOOLEAN +NTAPI +UniataAhciDetect( + IN PVOID HwDeviceExtension, + IN PPCI_COMMON_CONFIG pciData, // optional + IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo + ) +{ + PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + //ULONG slotNumber = deviceExtension->slotNumber; + ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber; + ULONG version; + ULONG i, n; + ULONG PI; + ULONG CAP; + ULONG GHC; + ULONG NumberChannels; + ULONG v_Mn, v_Mj; + ULONG BaseMemAddress; + BOOLEAN MemIo; + + KdPrint2((PRINT_PREFIX " UniataAhciDetect:\n")); + + if(AtapiRegCheckDevValue(deviceExtension, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"IgnoreAhci", 1 /* DEBUG */)) { + KdPrint((" AHCI excluded\n")); + return FALSE; + } + BaseMemAddress = AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber, + 5, 0, 0x10); + if(!BaseMemAddress) { + KdPrint2((PRINT_PREFIX " AHCI init failed - no IoRange\n")); + return FALSE; + } + if(BaseMemAddress && (*ConfigInfo->AccessRanges)[5].RangeInMemory) { + KdPrint2((PRINT_PREFIX "MemIo\n")); + MemIo = TRUE; + } + deviceExtension->BaseIoAHCI_0.Addr = BaseMemAddress; + deviceExtension->BaseIoAHCI_0.MemIo = MemIo; + +#ifdef DBG + UniataDumpAhciRegs(deviceExtension); +#endif //DBG + + GHC = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_GHC); + if(GHC & AHCI_GHC_HR) { + KdPrint2((PRINT_PREFIX " AHCI in reset state\n")); + return FALSE; + } + + /* enable AHCI mode */ + GHC = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_GHC); + KdPrint2((PRINT_PREFIX " check AHCI mode, GHC %#x\n", GHC)); + if(!(GHC & AHCI_GHC_AE)) { + KdPrint2((PRINT_PREFIX " Non-AHCI GHC (!AE)\n")); + return FALSE; + } + + CAP = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_CAP); + KdPrint2((PRINT_PREFIX " AHCI CAP %#x\n", CAP)); + if(CAP & AHCI_CAP_S64A) { + KdPrint2((PRINT_PREFIX " AHCI 64bit\n")); + //deviceExtension->Host64 = TRUE; + } + + /* get the number of HW channels */ + PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI); + KdPrint2((PRINT_PREFIX " AHCI PI %#x\n", PI)); + for(i=PI, n=0; i; n++, i=i>>1); + NumberChannels = + max((CAP & AHCI_CAP_NOP_MASK)+1, n); + + KdPrint2((PRINT_PREFIX " Channels %d\n", n)); + + switch(deviceExtension->DevID) { + case ATA_M88SX6111: + NumberChannels = 1; + break; + case ATA_M88SX6121: + NumberChannels = 2; + break; + case ATA_M88SX6141: + case ATA_M88SX6145: + NumberChannels = 4; + break; + } // switch() + + if(!NumberChannels) { + KdPrint2((PRINT_PREFIX " Non-AHCI - NumberChannels=0\n")); + return FALSE; + } + + version = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_VS); + v_Mj = ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f); + v_Mn = ((version >> 4) & 0xf0) + (version & 0x0f); + + KdPrint2((PRINT_PREFIX " AHCI version %#x.%02x controller with %d ports (mask %#x) detected\n", + v_Mj, v_Mn, + NumberChannels, PI)); + + if(CAP & AHCI_CAP_SPM) { + KdPrint2((PRINT_PREFIX " PM supported\n")); + if(AtapiRegCheckDevValue(deviceExtension, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"IgnoreAhciPM", 1 /* DEBUG */)) { + KdPrint2((PRINT_PREFIX "SATA/AHCI w/o PM, max luns 1\n")); + deviceExtension->NumberLuns = 2; + //chan->ChannelCtrlFlags |= CTRFLAGS_NO_SLAVE; + } else { + KdPrint2((PRINT_PREFIX "SATA/AHCI -> possible PM, max luns %d\n", SATA_MAX_PM_UNITS)); + deviceExtension->NumberLuns = SATA_MAX_PM_UNITS; + //deviceExtension->NumberLuns = 1; + } + } else { + KdPrint2((PRINT_PREFIX " PM not supported -> 1 lun/chan\n")); + deviceExtension->NumberLuns = 1; + } + + if((v_Mj != 0x01) || (v_Mn > 0x20)) { + KdPrint2((PRINT_PREFIX " Unknown AHCI revision\n")); + if(AtapiRegCheckDevValue(deviceExtension, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"CheckAhciRevision", 1)) { + KdPrint((" AHCI revision excluded\n")); + return FALSE; + } + } + + deviceExtension->HwFlags |= UNIATA_SATA; + deviceExtension->HwFlags |= UNIATA_AHCI; + if(deviceExtension->NumberChannels < NumberChannels) { + deviceExtension->NumberChannels = NumberChannels; + } + + return TRUE; +} // end UniataAhciDetect() + UCHAR NTAPI UniataAhciStatus( @@ -531,27 +853,25 @@ UniataAhciStatus( AHCI_IS_REG IS; SATA_SSTATUS_REG SStatus; SATA_SERROR_REG SError; - ULONG offs = sizeof(IDE_AHCI_REGISTERS) + Channel*sizeof(IDE_AHCI_PORT_REGISTERS); - ULONG_PTR base; + //ULONG offs = sizeof(IDE_AHCI_REGISTERS) + Channel*sizeof(IDE_AHCI_PORT_REGISTERS); ULONG tag=0; KdPrint(("UniataAhciStatus:\n")); - hIS = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS); - KdPrint((" hIS %x\n", hIS)); + hIS = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_IS); + KdPrint((" hIS %#x\n", hIS)); hIS &= (1 << Channel); if(!hIS) { - return 0; + return INTERRUPT_REASON_IGNORE; } - base = (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0 + offs); - IS.Reg = AtapiReadPort4(chan, base + IDX_AHCI_P_IS); - CI = AtapiReadPort4(chan, base + IDX_AHCI_P_CI); + IS.Reg = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_IS); + CI = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CI); SStatus.Reg = AtapiReadPort4(chan, IDX_SATA_SStatus); SError.Reg = AtapiReadPort4(chan, IDX_SATA_SError); /* clear interrupt(s) */ - AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS, hIS); - AtapiWritePort4(chan, base + IDX_AHCI_P_IS, IS.Reg); + UniataAhciWriteHostPort4(deviceExtension, IDX_AHCI_IS, hIS); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IS, IS.Reg); AtapiWritePort4(chan, IDX_SATA_SError, SError.Reg); KdPrint((" AHCI: status=%08x sstatus=%08x error=%08x CI=%08x\n", @@ -569,16 +889,16 @@ UniataAhciStatus( UniataSataEvent(HwDeviceExtension, lChannel, UNIATA_SATA_EVENT_DETACH); } if(CI & (1 << tag)) { - return 1; + return INTERRUPT_REASON_OUR; } KdPrint((" AHCI: unexpected\n")); - return 2; + return INTERRUPT_REASON_UNEXPECTED; } // end UniataAhciStatus() ULONG NTAPI -UniataAhciSetupFIS( +UniataAhciSetupFIS_H2D( IN PHW_DEVICE_EXTENSION deviceExtension, IN ULONG DeviceNumber, IN ULONG lChannel, @@ -590,68 +910,902 @@ UniataAhciSetupFIS( IN ULONG flags ) { - ULONG ldev = lChannel*2 + DeviceNumber; ULONG i; PUCHAR plba; + BOOLEAN need48; + PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; - KdPrint2((PRINT_PREFIX " AHCI setup FIS\n" )); + KdPrint2((PRINT_PREFIX " AHCI setup FIS ch %d, dev %d\n", lChannel, DeviceNumber)); i = 0; plba = (PUCHAR)&lba; - if((AtaCommandFlags[command] & ATA_CMD_FLAG_LBAIOsupp) && - CheckIfBadBlock(&(deviceExtension->lun[ldev]), lba, count)) { - KdPrint3((PRINT_PREFIX ": artificial bad block, lba %#I64x count %#x\n", lba, count)); - return IDE_STATUS_ERROR; - //return SRB_STATUS_ERROR; - } + fis[0] = AHCI_FIS_TYPE_ATA_H2D; /* host to device */ + fis[1] = 0x80 | ((UCHAR)DeviceNumber & 0x0f); /* command FIS (note PM goes here) */ + fis[7] = IDE_USE_LBA; + fis[15] = IDE_DC_A_4BIT; - /* translate command into 48bit version */ - if ((lba >= ATA_MAX_LBA28 || count > 256) && - deviceExtension->lun[ldev].IdentifyData.FeaturesSupport.Address48) { - if(AtaCommandFlags[command] & ATA_CMD_FLAG_48supp) { - command = AtaCommands48[command]; + if(chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_ATAPI_DEVICE) { + fis[2] = IDE_COMMAND_ATAPI_PACKET; + if(feature & ATA_F_DMA) { + fis[3] = (UCHAR)(feature & 0xff); } else { - KdPrint2((PRINT_PREFIX " unhandled LBA48 command\n")); + fis[5] = (UCHAR)(count & 0xff); + fis[6] = (UCHAR)(count>>8) & 0xff; + } + } else { + + if((AtaCommandFlags[command] & ATA_CMD_FLAG_LBAIOsupp) && + CheckIfBadBlock(chan->lun[DeviceNumber], lba, count)) { + KdPrint3((PRINT_PREFIX ": artificial bad block, lba %#I64x count %#x\n", lba, count)); + //return IDE_STATUS_ERROR; + //return SRB_STATUS_ERROR; return 0; } - } - fis[0] = 0x27; /* host to device */ - fis[1] = 0x80; /* command FIS (note PM goes here) */ - fis[2] = command; - fis[3] = (UCHAR)feature; + need48 = UniAta_need_lba48(command, lba, count, + chan->lun[DeviceNumber]->IdentifyData.FeaturesSupport.Address48); - fis[4] = plba[0]; - fis[5] = plba[1]; - fis[6] = plba[2]; - fis[7] = IDE_USE_LBA | (DeviceNumber ? IDE_DRIVE_2 : IDE_DRIVE_1); - if ((lba >= ATA_MAX_LBA28 || count > 256) && - deviceExtension->lun[ldev].IdentifyData.FeaturesSupport.Address48) { - i++; - } else { + /* translate command into 48bit version */ + if(need48) { + if(AtaCommandFlags[command] & ATA_CMD_FLAG_48supp) { + command = AtaCommands48[command]; + } else { + KdPrint2((PRINT_PREFIX " unhandled LBA48 command\n")); + return 0; + } + } + + fis[2] = command; + fis[3] = (UCHAR)feature; + + fis[4] = plba[0]; + fis[5] = plba[1]; + fis[6] = plba[2]; + if(need48) { + i++; + } else { #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable:4333) // right shift by too large amount, data loss #endif - fis[7] |= (plba[3] >> 24) & 0x0f; + fis[7] |= IDE_DRIVE_1 | ((plba[3] >> 24) & 0x0f); #ifdef _MSC_VER #pragma warning(pop) #endif + } + + fis[8] = plba[3]; + fis[9] = plba[4]; + fis[10] = plba[5]; + fis[11] = (UCHAR)(feature>>8) & 0xff; + + fis[12] = (UCHAR)count & 0xff; + fis[13] = (UCHAR)(count>>8) & 0xff; + //fis[14] = 0x00; + } - fis[8] = plba[3]; - fis[9] = plba[4]; - fis[10] = plba[5]; - fis[11] = (UCHAR)(feature>>8) & 0xff; + KdDump(fis, 20); - fis[12] = (UCHAR)count & 0xff; - fis[13] = (UCHAR)(count>>8) & 0xff; - fis[14] = 0x00; - fis[15] = IDE_DC_A_4BIT; - - fis[16] = 0x00; - fis[17] = 0x00; - fis[18] = 0x00; - fis[19] = 0x00; return 20; -} // end UniataAhciSetupFIS() +} // end UniataAhciSetupFIS_H2D() + +UCHAR +NTAPI +UniataAhciSendCommand( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber, + IN ULONG flags, + IN ULONG timeout + ) +{ + PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; + //ULONG Channel = deviceExtension->Channel + lChannel; + //ULONG hIS; + ULONG CI = 0; + AHCI_IS_REG IS; + ULONG SError; + //SATA_SSTATUS_REG SStatus; + //SATA_SERROR_REG SError; + //ULONG offs = sizeof(IDE_AHCI_REGISTERS) + Channel*sizeof(IDE_AHCI_PORT_REGISTERS); + //ULONGIO_PTR base; + ULONG tag=0; + ULONG i; + + PIDE_AHCI_CMD_LIST AHCI_CL = &(chan->AhciCtlBlock->cmd_list[tag]); + + KdPrint(("UniataAhciSendCommand: lChan %d\n", chan->lChannel)); + + AHCI_CL->prd_length = 0; + AHCI_CL->cmd_flags = (20 / sizeof(ULONG)) | flags | (DeviceNumber << 12); + AHCI_CL->bytecount = 0; + AHCI_CL->cmd_table_phys = chan->AHCI_CTL_PhAddr + FIELD_OFFSET(IDE_AHCI_CHANNEL_CTL_BLOCK, cmd); + if(AHCI_CL->cmd_table_phys & AHCI_CMD_ALIGNEMENT_MASK) { + KdPrint2((PRINT_PREFIX " AHCI CMD address is not aligned (mask %#x)\n", (ULONG)AHCI_CMD_ALIGNEMENT_MASK)); + } + + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CI, ATA_AHCI_P_CMD_ST); + + for (i=0; i= timeout)) { + SError = AtapiReadPort4(chan, IDX_SATA_SError); + KdPrint((" AHCI: timeout, SError %#x\n", SError)); + return 0xff; + } + + return IDE_STATUS_IDLE; + +} // end UniataAhciSendCommand() + +ULONG +NTAPI +UniataAhciSoftReset( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber + ) +{ + PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; + //ULONG Channel = deviceExtension->Channel + lChannel; + //ULONG hIS; + //ULONG CI; + //AHCI_IS_REG IS; + //ULONG tag=0; + + KdPrint(("UniataAhciSoftReset: lChan %d\n", chan->lChannel)); + + PIDE_AHCI_CMD AHCI_CMD = &(chan->AhciCtlBlock->cmd); + PUCHAR RCV_FIS = &(chan->AhciCtlBlock->rcv_fis.rfis[0]); + +#ifdef DBG + UniataDumpAhciPortRegs(chan); +#endif // DBG + + /* kick controller into sane state */ + UniataAhciStop(chan); + UniataAhciCLO(chan); + UniataAhciStart(chan); + +#ifdef DBG + UniataDumpAhciPortRegs(chan); +#endif // DBG + + /* pull reset active */ + RtlZeroMemory(AHCI_CMD->cfis, sizeof(AHCI_CMD->cfis)); + AHCI_CMD->cfis[0] = AHCI_FIS_TYPE_ATA_H2D; + AHCI_CMD->cfis[1] = (UCHAR)DeviceNumber & 0x0f; + //AHCI_CMD->cfis[7] = IDE_USE_LBA | IDE_DRIVE_SELECT; + AHCI_CMD->cfis[15] = (IDE_DC_A_4BIT | IDE_DC_RESET_CONTROLLER); + + if(UniataAhciSendCommand(HwDeviceExtension, lChannel, DeviceNumber, ATA_AHCI_CMD_RESET | ATA_AHCI_CMD_CLR_BUSY, 100) == 0xff) { + KdPrint2((" timeout\n")); + return (ULONG)(-1); + } + AtapiStallExecution(50); + + /* pull reset inactive */ + RtlZeroMemory(AHCI_CMD->cfis, sizeof(AHCI_CMD->cfis)); + AHCI_CMD->cfis[0] = AHCI_FIS_TYPE_ATA_H2D; + AHCI_CMD->cfis[1] = (UCHAR)DeviceNumber & 0x0f; + //AHCI_CMD->cfis[7] = IDE_USE_LBA | IDE_DRIVE_SELECT; + AHCI_CMD->cfis[15] = (IDE_DC_A_4BIT); + if(UniataAhciSendCommand(HwDeviceExtension, lChannel, DeviceNumber, 0, 3000) == 0xff) { + KdPrint2((" timeout (2)\n")); + return (ULONG)(-1); + } + + UniataAhciWaitReady(chan, 1); + + KdDump(RCV_FIS, sizeof(chan->AhciCtlBlock->rcv_fis.rfis)); + + return UniataAhciUlongFromRFIS(RCV_FIS); + +} // end UniataAhciSoftReset() + +ULONG +NTAPI +UniataAhciWaitReady( + IN PHW_CHANNEL chan, + IN ULONG timeout + ) +{ + ULONG TFD; + ULONG i; + + KdPrint2(("UniataAhciWaitReady: lChan %d\n", chan->lChannel)); + + //base = (ULONGIO_PTR)(&deviceExtension->BaseIoAHCI_0 + offs); + + TFD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_TFD); + for(i=0; ichan[lChannel]; + //ULONG Channel = deviceExtension->Channel + lChannel; + ULONG TFD; + + + KdPrint(("UniataAhciHardReset: lChan %d\n", chan->lChannel)); + + (*signature) = 0xffffffff; + + UniataAhciStop(chan); + if(UniataSataPhyEnable(HwDeviceExtension, lChannel, 0/* dev0*/, UNIATA_SATA_RESET_ENABLE) == 0xff) { + KdPrint((" no PHY\n")); + return 0xff; + } + + /* Wait for clearing busy status. */ + TFD = UniataAhciWaitReady(chan, 15000); + if(TFD & (IDE_STATUS_DRQ | IDE_STATUS_BUSY)) { + KdPrint((" busy: TFD %#x\n", TFD)); + return TFD; + } + KdPrint((" TFD %#x\n", TFD)); + +#ifdef DBG + UniataDumpAhciPortRegs(chan); +#endif // DBG + + (*signature) = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_SIG); + KdPrint((" sig: %#x\n", *signature)); + + UniataAhciStart(chan); + + return 0; + +} // end UniataAhciHardReset() + +VOID +NTAPI +UniataAhciReset( + IN PVOID HwDeviceExtension, + IN ULONG lChannel + ) +{ + PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; + //ULONG Channel = deviceExtension->Channel + lChannel; + //ULONG offs = sizeof(IDE_AHCI_REGISTERS) + Channel*sizeof(IDE_AHCI_PORT_REGISTERS); + ULONG CAP; + //ULONGIO_PTR base; + ULONG signature; + ULONG i; + ULONG VendorID = deviceExtension->DevID & 0xffff; + + KdPrint(("UniataAhciReset: lChan %d\n", chan->lChannel)); + + //base = (ULONGIO_PTR)(&deviceExtension->BaseIoAHCI_0 + offs); + + /* Disable port interrupts */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IE, 0); + + if(UniataAhciHardReset(HwDeviceExtension, lChannel, &signature)) { + + KdPrint((" No devices in all LUNs\n")); + for (i=0; iNumberLuns; i++) { + // Zero device fields to ensure that if earlier devices were found, + // but not claimed, the fields are cleared. + UniataForgetDevice(chan->lun[i]); + } + + /* enable wanted port interrupts */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IE, + ATA_AHCI_P_IX_CPD | ATA_AHCI_P_IX_PRC | ATA_AHCI_P_IX_PC); + return; + } + + /* enable wanted port interrupts */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IE, + (ATA_AHCI_P_IX_CPD | ATA_AHCI_P_IX_TFE | ATA_AHCI_P_IX_HBF | + ATA_AHCI_P_IX_HBD | ATA_AHCI_P_IX_IF | ATA_AHCI_P_IX_OF | + ((/*ch->pm_level == */0) ? (ATA_AHCI_P_IX_PRC | ATA_AHCI_P_IX_PC) : 0) | + ATA_AHCI_P_IX_DP | ATA_AHCI_P_IX_UF | ATA_AHCI_P_IX_SDB | + ATA_AHCI_P_IX_DS | ATA_AHCI_P_IX_PS | ATA_AHCI_P_IX_DHR) ); + + /* + * Only probe for PortMultiplier if HW has support. + * Ignore Marvell, which is not working, + */ + CAP = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_CAP); + if ((CAP & AHCI_CAP_SPM) && + (VendorID != ATA_MARVELL_ID)) { + KdPrint((" check PM\n")); + signature = UniataAhciSoftReset(HwDeviceExtension, lChannel, AHCI_DEV_SEL_PM); + /* Workaround for some ATI chips, failing to soft-reset + * when port multiplicator supported, but absent. + * XXX: We can also check PxIS.IPMS==1 here to be sure. */ + if (signature == 0xffffffff) { + KdPrint((" re-check PM\n")); + signature = UniataAhciSoftReset(HwDeviceExtension, lChannel, 0); + } + } else { + signature = UniataAhciSoftReset(HwDeviceExtension, lChannel, 0); + } + + KdPrint((" signature %#x\n", signature)); + chan->lun[0]->DeviceFlags &= ~(DFLAGS_ATAPI_DEVICE | DFLAGS_DEVICE_PRESENT | CTRFLAGS_AHCI_PM); + switch (signature >> 16) { + case 0x0000: + KdPrint((" ATA dev\n")); + chan->lun[0]->DeviceFlags |= DFLAGS_DEVICE_PRESENT; + chan->PmLunMap = 0; + break; + case 0x9669: + KdPrint((" PM\n")); + if(deviceExtension->NumberLuns > 1) { + chan->ChannelCtrlFlags |= CTRFLAGS_AHCI_PM; + UniataSataIdentifyPM(chan); + } else { + KdPrint((" no PM supported (1 lun/chan)\n")); + } + break; + case 0xeb14: + KdPrint((" ATAPI dev\n")); + chan->lun[0]->DeviceFlags |= (DFLAGS_ATAPI_DEVICE | DFLAGS_DEVICE_PRESENT); + chan->PmLunMap = 0; + break; + default: /* SOS XXX */ + KdPrint((" default to ATA ???\n")); + chan->lun[0]->DeviceFlags |= DFLAGS_DEVICE_PRESENT; + chan->PmLunMap = 0; + } + + return; + +} // end UniataAhciReset() + +VOID +NTAPI +UniataAhciStartFR( + IN PHW_CHANNEL chan + ) +{ + ULONG CMD; + + KdPrint2(("UniataAhciStartFR: lChan %d\n", chan->lChannel)); + + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + KdPrint2((" CMD %#x\n", CMD)); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, CMD | ATA_AHCI_P_CMD_FRE); + + return; +} // end UniataAhciStartFR() + +VOID +NTAPI +UniataAhciStopFR( + IN PHW_CHANNEL chan + ) +{ + ULONG CMD; + ULONG i; + + KdPrint2(("UniataAhciStopFR: lChan %d\n", chan->lChannel)); + + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + KdPrint2((" CMD %#x\n", CMD)); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, CMD & ~ATA_AHCI_P_CMD_FRE); + + for(i=0; i<1000; i++) { + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + if(!(CMD & ATA_AHCI_P_CMD_FR)) { + KdPrint2((" final CMD %#x\n", CMD)); + return; + } + AtapiStallExecution(1000); + } + KdPrint2((" CMD %#x\n", CMD)); + KdPrint((" SError %#x\n", AtapiReadPort4(chan, IDX_SATA_SError))); + KdPrint2(("UniataAhciStopFR: timeout\n")); + return; +} // end UniataAhciStopFR() + +VOID +NTAPI +UniataAhciStart( + IN PHW_CHANNEL chan + ) +{ + ULONG IS, CMD; + SATA_SERROR_REG SError; + + KdPrint2(("UniataAhciStart: lChan %d\n", chan->lChannel)); + + /* clear SATA error register */ + SError.Reg = AtapiReadPort4(chan, IDX_SATA_SError); + + /* clear any interrupts pending on this channel */ + IS = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_IS); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IS, IS); + + KdPrint2((" SError %#x, IS %#x\n", SError.Reg, IS)); + + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + KdPrint2((" CMD %#x\n", CMD)); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, + CMD | + ATA_AHCI_P_CMD_ST | + ((chan->ChannelCtrlFlags & CTRFLAGS_AHCI_PM) ? ATA_AHCI_P_CMD_PMA : 0)); + + return; +} // end UniataAhciStart() + +VOID +NTAPI +UniataAhciCLO( + IN PHW_CHANNEL chan + ) +{ + //PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + //PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; + ULONG CAP, CMD; + //SATA_SERROR_REG SError; + ULONG i; + + KdPrint2(("UniataAhciCLO: lChan %d\n", chan->lChannel)); + + /* issue Command List Override if supported */ + //CAP = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_CAP); + CAP = chan->DeviceExtension->AHCI_CAP; + if(!(CAP & AHCI_CAP_SCLO)) { + return; + } + KdPrint2((" send CLO\n")); + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + CMD |= ATA_AHCI_P_CMD_CLO; + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, CMD); + + for(i=0; i<1000; i++) { + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + if(!(CMD & ATA_AHCI_P_CMD_CLO)) { + KdPrint2((" final CMD %#x\n", CMD)); + return; + } + AtapiStallExecution(1000); + } + KdPrint2((" CMD %#x\n", CMD)); + KdPrint2(("UniataAhciCLO: timeout\n")); + return; +} // end UniataAhciCLO() + +VOID +NTAPI +UniataAhciStop( + IN PHW_CHANNEL chan + ) +{ + ULONG CMD; + //SATA_SERROR_REG SError; + ULONG i; + + KdPrint2(("UniataAhciStop: lChan %d\n", chan->lChannel)); + + /* issue Command List Override if supported */ + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + CMD &= ~ATA_AHCI_P_CMD_ST; + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, CMD); + + for(i=0; i<1000; i++) { + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + if(!(CMD & ATA_AHCI_P_CMD_CR)) { + KdPrint2((" final CMD %#x\n", CMD)); + return; + } + AtapiStallExecution(1000); + } + KdPrint2((" CMD %#x\n", CMD)); + KdPrint((" SError %#x\n", AtapiReadPort4(chan, IDX_SATA_SError))); + KdPrint2(("UniataAhciStop: timeout\n")); + return; +} // end UniataAhciStop() + +UCHAR +NTAPI +UniataAhciBeginTransaction( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber, + IN PSCSI_REQUEST_BLOCK Srb + ) +{ + PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; + //ULONG Channel = deviceExtension->Channel + lChannel; + //ULONG hIS; + ULONG CMD; + //AHCI_IS_REG IS; + PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension); + //SATA_SSTATUS_REG SStatus; + //SATA_SERROR_REG SError; + //ULONG offs = sizeof(IDE_AHCI_REGISTERS) + Channel*sizeof(IDE_AHCI_PORT_REGISTERS); + //ULONGIO_PTR base; + ULONG tag=0; + //ULONG i; + + PIDE_AHCI_CMD_LIST AHCI_CL = &(chan->AhciCtlBlock->cmd_list[tag]); + + KdPrint2(("UniataAhciBeginTransaction: lChan %d\n", chan->lChannel)); + + if(AtaReq->dma_entries > (USHORT)0xffff) { + KdPrint2(("UniataAhciBeginTransaction too long DMA tab\n")); + return 0; + } + + AHCI_CL->prd_length = (USHORT)AtaReq->dma_entries; + AHCI_CL->cmd_flags = AtaReq->ahci.io_cmd_flags; + AHCI_CL->bytecount = 0; + AHCI_CL->cmd_table_phys = AtaReq->ahci.ahci_base64; + if(AHCI_CL->cmd_table_phys & AHCI_CMD_ALIGNEMENT_MASK) { + KdPrint2((PRINT_PREFIX " AHCI CMD address is not aligned (mask %#x)\n", (ULONG)AHCI_CMD_ALIGNEMENT_MASK)); + } + + CMD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_CMD); + KdPrint2((" CMD %#x\n", CMD)); + CMD &= ~ATA_AHCI_P_CMD_ATAPI; + KdPrint2((" send CMD %#x\n", CMD)); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, CMD); + + /* issue command to controller */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CI, ATA_AHCI_P_CMD_ST); + + if(!(chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_ATAPI_DEVICE)) { + // TODO: check if we send ATA_RESET and wait for ready of so. + if(AtaReq->ahci.ahci_cmd_ptr->cfis[2] == IDE_COMMAND_ATAPI_RESET) { + ULONG TFD; + ULONG i; + + for(i=0; i<1000000; i++) { + TFD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_TFD); + if(!(TFD & IDE_STATUS_BUSY)) { + break; + } + } + if(TFD & IDE_STATUS_BUSY) { + KdPrint2((" timeout\n")); + } + if(TFD & IDE_STATUS_ERROR) { + KdPrint2((" ERROR %#x\n", (UCHAR)(TFD >> 8))); + } + AtaReq->ahci.in_status = TFD; + + return 0x00; + } + } + + return IDE_STATUS_IDLE; + +} // end UniataAhciBeginTransaction() + +UCHAR +NTAPI +UniataAhciEndTransaction( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber, + IN PSCSI_REQUEST_BLOCK Srb + ) +{ + PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension; + PHW_CHANNEL chan = &deviceExtension->chan[lChannel]; + //ULONG Channel = deviceExtension->Channel + lChannel; + //ULONG hIS; + PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension); + ULONG TFD; + PUCHAR RCV_FIS = &(chan->AhciCtlBlock->rcv_fis.rfis[0]); + + KdPrint2(("UniataAhciEndTransaction: lChan %d\n", chan->lChannel)); + + TFD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_TFD); + KdPrint2((" TFD %#x\n", TFD)); + + if(TFD & IDE_STATUS_ERROR) { + KdPrint2((" ERROR %#x\n", (UCHAR)(TFD >> 8))); + } + AtaReq->ahci.in_status = TFD; + + //if (request->flags & ATA_R_CONTROL) { + + AtaReq->ahci.in_bcount = (ULONG)(RCV_FIS[12]) | ((ULONG)(RCV_FIS[13]) << 8); + AtaReq->ahci.in_lba = (ULONG)(RCV_FIS[4]) | ((ULONGLONG)(RCV_FIS[5]) << 8) | + ((ULONGLONG)(RCV_FIS[6]) << 16); + if(chan->ChannelCtrlFlags & CTRFLAGS_LBA48) { + AtaReq->ahci.in_lba |= ((ULONGLONG)(RCV_FIS[8]) << 24) | + ((ULONGLONG)(RCV_FIS[9]) << 32) | + ((ULONGLONG)(RCV_FIS[10]) << 40); + } else { + AtaReq->ahci.in_lba |= ((ULONGLONG)(RCV_FIS[8]) << 24) | + ((ULONGLONG)(RCV_FIS[9]) << 32) | + ((ULONGLONG)(RCV_FIS[7] & 0x0f) << 24); + } + + //} + + return 0; + +} // end UniataAhciEndTransaction() + +VOID +NTAPI +UniataAhciResume( + IN PHW_CHANNEL chan + ) +{ + ULONGLONG base; + + KdPrint2(("UniataAhciResume: lChan %d\n", chan->lChannel)); + +#ifdef DBG + UniataDumpAhciPortRegs(chan); +#endif // DBG + + /* Disable port interrupts */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IE, 0); + + /* setup work areas */ + base = chan->AHCI_CTL_PhAddr; + if(!base) { + KdPrint2((PRINT_PREFIX " AHCI buffer allocation failed\n")); + return; + } + KdPrint2((PRINT_PREFIX " AHCI CLB setup\n")); + if(base & AHCI_CLB_ALIGNEMENT_MASK) { + KdPrint2((PRINT_PREFIX " AHCI CLB address is not aligned (mask %#x)\n", (ULONG)AHCI_FIS_ALIGNEMENT_MASK)); + } + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CLB, + (ULONG)(base & 0xffffffff)); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CLB + 4, + (ULONG)((base >> 32) & 0xffffffff)); + + KdPrint2((PRINT_PREFIX " AHCI RCV FIS setup\n")); + base = chan->AHCI_CTL_PhAddr + FIELD_OFFSET(IDE_AHCI_CHANNEL_CTL_BLOCK, rcv_fis); + if(base & AHCI_FIS_ALIGNEMENT_MASK) { + KdPrint2((PRINT_PREFIX " AHCI FIS address is not aligned (mask %#x)\n", (ULONG)AHCI_FIS_ALIGNEMENT_MASK)); + } + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_FB, + (ULONG)(base & 0xffffffff)); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_FB + 4, + (ULONG)((base >> 32) & 0xffffffff)); + + /* activate the channel and power/spin up device */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, + (ATA_AHCI_P_CMD_ACTIVE | ATA_AHCI_P_CMD_POD | ATA_AHCI_P_CMD_SUD | + (((chan->ChannelCtrlFlags & CTRFLAGS_AHCI_PM)) ? ATA_AHCI_P_CMD_ALPE : 0) | + (((chan->ChannelCtrlFlags & CTRFLAGS_AHCI_PM2)) ? ATA_AHCI_P_CMD_ASP : 0 )) + ); + +#ifdef DBG + UniataDumpAhciPortRegs(chan); +#endif // DBG + + UniataAhciStartFR(chan); + UniataAhciStart(chan); + +#ifdef DBG + UniataDumpAhciPortRegs(chan); +#endif // DBG + + return; +} // end UniataAhciResume() + +#if 0 +VOID +NTAPI +UniataAhciSuspend( + IN PHW_CHANNEL chan + ) +{ + ULONGLONG base; + SATA_SCONTROL_REG SControl; + + KdPrint2(("UniataAhciSuspend:\n")); + + /* Disable port interrupts */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_IE, 0); + + /* Reset command register. */ + UniataAhciStop(chan); + UniataAhciStopFR(chan); + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, 0); + + /* Allow everything including partial and slumber modes. */ + UniataSataWritePort4(chan, IDX_SATA_SControl, 0, 0); + + /* Request slumber mode transition and give some time to get there. */ + UniataAhciWriteChannelPort4(chan, IDX_AHCI_P_CMD, ATA_AHCI_P_CMD_SLUMBER); + AtapiStallExecution(100); + + /* Disable PHY. */ + SControl.Reg = 0; + SControl.DET = SStatus_DET_Offline; + UniataSataWritePort4(chan, IDX_SATA_SControl, SControl.Reg, 0); + + return; +} // end UniataAhciSuspend() +#endif + +BOOLEAN +NTAPI +UniataAhciReadPM( + IN PHW_CHANNEL chan, + IN ULONG DeviceNumber, + IN ULONG Reg, + OUT PULONG result + ) +{ + //ULONG Channel = deviceExtension->Channel + lChannel; + //ULONG hIS; + //ULONG CI; + //AHCI_IS_REG IS; + //ULONG tag=0; + PIDE_AHCI_CMD AHCI_CMD = &(chan->AhciCtlBlock->cmd); + PUCHAR RCV_FIS = &(chan->AhciCtlBlock->rcv_fis.rfis[0]); + + KdPrint(("UniataAhciReadPM: lChan %d [%#x]\n", chan->lChannel, DeviceNumber)); + + if(DeviceNumber == DEVNUM_NOT_SPECIFIED) { + (*result) = UniataSataReadPort4(chan, Reg, 0); + return TRUE; + } + if(DeviceNumber < AHCI_DEV_SEL_PM) { + switch(Reg) { + case IDX_SATA_SStatus: + Reg = 0; break; + case IDX_SATA_SError: + Reg = 1; break; + case IDX_SATA_SControl: + Reg = 2; break; + default: + return FALSE; + } + } + + RtlZeroMemory(AHCI_CMD->cfis, sizeof(AHCI_CMD->cfis)); + AHCI_CMD->cfis[0] = AHCI_FIS_TYPE_ATA_H2D; + AHCI_CMD->cfis[1] = AHCI_FIS_COMM_PM; + AHCI_CMD->cfis[2] = IDE_COMMAND_READ_PM; + AHCI_CMD->cfis[3] = (UCHAR)Reg; + AHCI_CMD->cfis[7] = (UCHAR)(IDE_USE_LBA | DeviceNumber); + AHCI_CMD->cfis[15] = IDE_DC_A_4BIT; + + if(UniataAhciSendCommand(chan->DeviceExtension, chan->lChannel, DeviceNumber, 0, 10) == 0xff) { + KdPrint2((" PM read failed\n")); + return FALSE; + } + + KdDump(RCV_FIS, sizeof(chan->AhciCtlBlock->rcv_fis.rfis)); + + (*result) = UniataAhciUlongFromRFIS(RCV_FIS); + return TRUE; + +} // end UniataAhciReadPM() + +UCHAR +NTAPI +UniataAhciWritePM( + IN PHW_CHANNEL chan, + IN ULONG DeviceNumber, + IN ULONG Reg, + IN ULONG value + ) +{ + //ULONG Channel = deviceExtension->Channel + lChannel; + //ULONG hIS; + //ULONG CI; + //AHCI_IS_REG IS; + //ULONG tag=0; + ULONG TFD; + PIDE_AHCI_CMD AHCI_CMD = &(chan->AhciCtlBlock->cmd); + //PUCHAR RCV_FIS = &(chan->AhciCtlBlock->rcv_fis.rfis[0]); + + KdPrint(("UniataAhciWritePM: lChan %d [%#x] %#x\n", chan->lChannel, DeviceNumber, value)); + + if(DeviceNumber == DEVNUM_NOT_SPECIFIED) { + UniataSataWritePort4(chan, Reg, value, 0); + return 0; + } + if(DeviceNumber < AHCI_DEV_SEL_PM) { + switch(Reg) { + case IDX_SATA_SStatus: + Reg = 0; break; + case IDX_SATA_SError: + Reg = 1; break; + case IDX_SATA_SControl: + Reg = 2; break; + default: + return 0xff; + } + } + + RtlZeroMemory(AHCI_CMD->cfis, sizeof(AHCI_CMD->cfis)); + AHCI_CMD->cfis[0] = AHCI_FIS_TYPE_ATA_H2D; + AHCI_CMD->cfis[1] = AHCI_FIS_COMM_PM; + AHCI_CMD->cfis[2] = IDE_COMMAND_WRITE_PM; + AHCI_CMD->cfis[3] = (UCHAR)Reg; + AHCI_CMD->cfis[7] = (UCHAR)(IDE_USE_LBA | DeviceNumber); + + AHCI_CMD->cfis[12] = (UCHAR)(value & 0xff); + AHCI_CMD->cfis[4] = (UCHAR)((value >> 8) & 0xff); + AHCI_CMD->cfis[5] = (UCHAR)((value >> 16) & 0xff); + AHCI_CMD->cfis[6] = (UCHAR)((value >> 24) & 0xff); + + AHCI_CMD->cfis[15] = IDE_DC_A_4BIT; + + if(UniataAhciSendCommand(chan->DeviceExtension, chan->lChannel, DeviceNumber, 0, 100) == 0xff) { + KdPrint2((" PM write failed\n")); + return 0xff; + } + + TFD = UniataAhciReadChannelPort4(chan, IDX_AHCI_P_TFD); + + if(TFD & IDE_STATUS_ERROR) { + KdPrint2((" ERROR %#x\n", (UCHAR)(TFD >> 8))); + } + return (UCHAR)(TFD >> 8); + +} // end UniataAhciWritePM() + +VOID +UniataAhciSetupCmdPtr( +IN OUT PATA_REQ AtaReq + ) +{ + union { + PUCHAR prd_base; + ULONGLONG prd_base64; + }; + union { + PUCHAR prd_base0; + ULONGLONG prd_base64_0; + }; + ULONG d; + + prd_base64_0 = prd_base64 = 0; + prd_base = (PUCHAR)(&AtaReq->ahci_cmd0); + prd_base0 = prd_base; + + prd_base64 = (prd_base64 + max(FIELD_OFFSET(ATA_REQ, ahci_cmd0), AHCI_CMD_ALIGNEMENT_MASK)) & ~AHCI_CMD_ALIGNEMENT_MASK; + + d = (ULONG)(prd_base64 - prd_base64_0); + KdPrint2((PRINT_PREFIX " aligned %I64x, d=%x\n", prd_base64, d)); + + AtaReq->ahci.ahci_cmd_ptr = (PIDE_AHCI_CMD)prd_base64; + KdPrint2((PRINT_PREFIX " ahci_cmd_ptr %#x\n", AtaReq->ahci.ahci_cmd_ptr)); +} // end UniataAhciSetupCmdPtr() diff --git a/drivers/storage/ide/uniata/id_sata.h b/drivers/storage/ide/uniata/id_sata.h index a53fee91bdb..3ca9e0a293f 100644 --- a/drivers/storage/ide/uniata/id_sata.h +++ b/drivers/storage/ide/uniata/id_sata.h @@ -1,3 +1,36 @@ +/*++ + +Copyright (c) 2008-2011 Alexandr A. Telyatnikov (Alter) + +Module Name: + id_probe.cpp + +Abstract: + This module handles SATA-related staff + +Author: + Alexander A. Telyatnikov (Alter) + +Environment: + kernel mode only + +Notes: + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Revision History: + +--*/ + #ifndef __UNIATA_SATA__H__ #define __UNIATA_SATA__H__ @@ -9,12 +42,16 @@ UniataSataConnect( IN ULONG pm_port = 0 /* for port multipliers */ ); +#define UNIATA_SATA_RESET_ENABLE TRUE +#define UNIATA_SATA_FAST_ENABLE FALSE + UCHAR NTAPI UniataSataPhyEnable( IN PVOID HwDeviceExtension, IN ULONG lChannel, // logical channel - IN ULONG pm_port = 0 /* for port multipliers */ + IN ULONG pm_port = 0, /* for port multipliers */ + IN BOOLEAN doReset = UNIATA_SATA_FAST_ENABLE ); #define UNIATA_SATA_DO_CONNECT TRUE @@ -40,11 +77,28 @@ UniataSataEvent( IN ULONG Action, IN ULONG pm_port = 0 /* for port multipliers */ ); - +/* #define UniataIsSATARangeAvailable(deviceExtension, lChannel) \ ((deviceExtension->BaseIoAddressSATA_0.Addr || \ deviceExtension->BaseIoAHCI_0.Addr) && \ (deviceExtension->chan[lChannel].RegTranslation[IDX_SATA_SStatus].Addr)) +*/ +__inline +BOOLEAN +UniataIsSATARangeAvailable( + IN PHW_DEVICE_EXTENSION deviceExtension, + IN ULONG lChannel + ) +{ + // seems, check for deviceExtension->BaseIoAddressSATA_0.Addr and + // deviceExtension->BaseIoAHCI_0.Addr is not necessary now + if(deviceExtension->chan[lChannel].RegTranslation[IDX_SATA_SStatus].Addr || + deviceExtension->chan[lChannel].RegTranslation[IDX_SATA_SStatus].Proc) { + return TRUE; + } + return FALSE; +} // end UniataIsSATARangeAvailable() + ULONG NTAPI @@ -69,6 +123,14 @@ UniataAhciInit( IN PVOID HwDeviceExtension ); +BOOLEAN +NTAPI +UniataAhciDetect( + IN PVOID HwDeviceExtension, + IN PPCI_COMMON_CONFIG pciData, // optional + IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo + ); + UCHAR NTAPI UniataAhciStatus( @@ -79,7 +141,7 @@ UniataAhciStatus( ULONG NTAPI -UniataAhciSetupFIS( +UniataAhciSetupFIS_H2D( IN PHW_DEVICE_EXTENSION deviceExtension, IN ULONG DeviceNumber, IN ULONG lChannel, @@ -91,4 +153,165 @@ UniataAhciSetupFIS( IN ULONG flags ); +UCHAR +NTAPI +UniataAhciSendCommand( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber, + IN ULONG flags, + IN ULONG timeout + ); + +ULONG +NTAPI +UniataAhciSoftReset( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber + ); + +ULONG +NTAPI +UniataAhciWaitReady( + IN PHW_CHANNEL chan, + IN ULONG timeout + ); + +ULONG +NTAPI +UniataAhciHardReset( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + OUT PULONG signature + ); + +VOID +NTAPI +UniataAhciReset( + IN PVOID HwDeviceExtension, + IN ULONG lChannel + ); + +VOID +NTAPI +UniataAhciStartFR( + IN PHW_CHANNEL chan + ); + +VOID +NTAPI +UniataAhciStopFR( + IN PHW_CHANNEL chan + ); + +VOID +NTAPI +UniataAhciStart( + IN PHW_CHANNEL chan + ); + +VOID +NTAPI +UniataAhciCLO( + IN PHW_CHANNEL chan + ); + +VOID +NTAPI +UniataAhciStop( + IN PHW_CHANNEL chan + ); + + +__inline +ULONG +UniataAhciReadChannelPort4( + IN PHW_CHANNEL chan, + IN ULONG io_port_ndx + ) +{ + ULONG v = AtapiReadPortEx4(NULL, (ULONGIO_PTR)&((chan)->BaseIoAHCI_Port), io_port_ndx); + KdPrint3((PRINT_PREFIX "ReadChannelPort4 ch%d[%x] = %x\n", chan->lChannel, io_port_ndx, v)); + return v; +} // end UniataAhciReadChannelPort4() + +__inline +VOID +UniataAhciWriteChannelPort4( + IN PHW_CHANNEL chan, + IN ULONG io_port_ndx, + IN ULONG data + ) +{ + KdPrint3((PRINT_PREFIX "WriteChannelPort4 %x => ch%d[%x]\n", data, chan->lChannel, io_port_ndx)); + AtapiWritePortEx4(NULL, (ULONGIO_PTR)&((chan)->BaseIoAHCI_Port), io_port_ndx, data); +} // end UniataAhciWriteChannelPort4() + + +#define UniataAhciReadHostPort4(deviceExtension, io_port_ndx) \ + AtapiReadPortEx4(NULL, (ULONGIO_PTR)&((deviceExtension)->BaseIoAHCI_0), io_port_ndx) + +#define UniataAhciWriteHostPort4(deviceExtension, io_port_ndx, data) \ + AtapiWritePortEx4(NULL, (ULONGIO_PTR)&((deviceExtension)->BaseIoAHCI_0), io_port_ndx, data) + +UCHAR +NTAPI +UniataAhciBeginTransaction( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber, + IN PSCSI_REQUEST_BLOCK Srb + ); + +UCHAR +NTAPI +UniataAhciEndTransaction( + IN PVOID HwDeviceExtension, + IN ULONG lChannel, + IN ULONG DeviceNumber, + IN PSCSI_REQUEST_BLOCK Srb + ); + +VOID +NTAPI +UniataAhciResume( + IN PHW_CHANNEL chan + ); + +__inline +ULONG +UniataAhciUlongFromRFIS( + PUCHAR RCV_FIS + ) +{ + return ( (((ULONG)(RCV_FIS[6])) << 24) | + (((ULONG)(RCV_FIS[5])) << 16) | + (((ULONG)(RCV_FIS[4])) << 8) | + ((ULONG)(RCV_FIS[12])) ); +} + +BOOLEAN +NTAPI +UniataAhciReadPM( + IN PHW_CHANNEL chan, + IN ULONG DeviceNumber, + IN ULONG Reg, + OUT PULONG result + ); + +UCHAR +NTAPI +UniataAhciWritePM( + IN PHW_CHANNEL chan, + IN ULONG DeviceNumber, + IN ULONG Reg, + IN ULONG value + ); + +VOID +UniataAhciSetupCmdPtr( +IN OUT PATA_REQ AtaReq + ); + #endif //__UNIATA_SATA__H__ diff --git a/drivers/storage/ide/uniata/inc/CrNtStubs.h b/drivers/storage/ide/uniata/inc/CrNtStubs.h index 53030f062bb..4cef3ed0e9e 100644 --- a/drivers/storage/ide/uniata/inc/CrNtStubs.h +++ b/drivers/storage/ide/uniata/inc/CrNtStubs.h @@ -16,7 +16,9 @@ KeTestSpinLock,( ( SpinLock )) -#if 0 + +#ifndef USE_REACTOS_DDK + CROSSNT_DECL( LONG, __fastcall, @@ -62,13 +64,16 @@ InterlockedCompareExchange,( IN PVOID ExChange, IN PVOID Comperand )) -#endif -#define CrNtInterlockedIncrement InterlockedIncrement -#define CrNtInterlockedDecrement InterlockedDecrement -#define CrNtInterlockedExchangeAdd InterlockedExchangeAdd +#else + +#define CrNtInterlockedIncrement InterlockedIncrement +#define CrNtInterlockedDecrement InterlockedDecrement +#define CrNtInterlockedExchangeAdd InterlockedExchangeAdd #define CrNtInterlockedCompareExchange InterlockedCompareExchange +#endif // !USE_REACTOS_DDK + CROSSNT_DECL_EX("HAL.DLL", KIRQL,__stdcall, KeRaiseIrqlToDpcLevel,(),()) diff --git a/drivers/storage/ide/uniata/inc/CrossNt.h b/drivers/storage/ide/uniata/inc/CrossNt.h index eeab727cae6..a0c074f2caa 100644 --- a/drivers/storage/ide/uniata/inc/CrossNt.h +++ b/drivers/storage/ide/uniata/inc/CrossNt.h @@ -57,7 +57,13 @@ CrNtGetProcAddress( PCHAR pFunctionName ); -typedef BOOLEAN (__stdcall *ptrCrNtPsGetVersion)( +#ifdef __GNUC__ + #define DECL_FUNC_PTR(_type, _cconv, _name) _type _cconv ( * _name) +#else + #define DECL_FUNC_PTR(_type, _cconv, _name) _type (_cconv * _name) +#endif + +typedef DECL_FUNC_PTR(BOOLEAN, __stdcall, ptrCrNtPsGetVersion)( PULONG MajorVersion OPTIONAL, PULONG MinorVersion OPTIONAL, PULONG BuildNumber OPTIONAL, @@ -67,7 +73,7 @@ typedef BOOLEAN (__stdcall *ptrCrNtPsGetVersion)( extern "C" ptrCrNtPsGetVersion CrNtPsGetVersion; -typedef NTSTATUS (__stdcall *ptrCrNtNtQuerySystemInformation)( +typedef DECL_FUNC_PTR(NTSTATUS, __stdcall, ptrCrNtNtQuerySystemInformation)( IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, @@ -114,6 +120,8 @@ extern HANDLE g_hHal; // NT3.51 doesn't export strlen() and strcmp() // The same time, Release build doesn't depend no these functions since they are inlined +#ifndef USE_REACTOS_DDK + size_t __cdecl CrNtstrlen ( const char * str ); @@ -126,6 +134,8 @@ int __cdecl CrNtstrcmp ( #define strlen CrNtstrlen #define strcmp CrNtstrcmp +#endif // !USE_REACTOS_DDK + #endif //_DEBUG #define CROSSNT_DECL_API @@ -137,4 +147,4 @@ int __cdecl CrNtstrcmp ( }; // end extern "C" -#endif //__CROSS_VERSION_LIB_NT__H__ +#endif //__CROSS_VERSION_LIB_NT__H__ \ No newline at end of file diff --git a/drivers/storage/ide/uniata/inc/PostDbgMesg.h b/drivers/storage/ide/uniata/inc/PostDbgMesg.h index 5c30d729c0e..1b020610827 100644 --- a/drivers/storage/ide/uniata/inc/PostDbgMesg.h +++ b/drivers/storage/ide/uniata/inc/PostDbgMesg.h @@ -43,4 +43,4 @@ DbgDump_SetAutoReconnect( }; #endif //__cplusplus -#endif //__DBG_DUMP_TOOLS__H__ +#endif //__DBG_DUMP_TOOLS__H__ \ No newline at end of file diff --git a/drivers/storage/ide/uniata/inc/misc.h b/drivers/storage/ide/uniata/inc/misc.h index eeebfaf964e..c144d33fdda 100644 --- a/drivers/storage/ide/uniata/inc/misc.h +++ b/drivers/storage/ide/uniata/inc/misc.h @@ -1,10 +1,156 @@ #ifndef __CROSSNT_MISC__H__ #define __CROSSNT_MISC__H__ +#ifdef USE_REACTOS_DDK + /* The definitions look so crappy, because the code doesn't care whether the source is an array or an integer */ #define MOV_DD_SWP(a,b) ((a) = RtlUlongByteSwap(*(PULONG)&(b))) #define MOV_DW_SWP(a,b) ((a) = RtlUshortByteSwap(*(PUSHORT)&(b))) #define MOV_SWP_DW2DD(a,b) ((a) = RtlUshortByteSwap(*(PUSHORT)&(b))) +#else + +typedef void +(__fastcall *ptrMOV_DD_SWP)( + void* a, // ECX + void* b // EDX + ); +extern "C" ptrMOV_DD_SWP _MOV_DD_SWP; + +extern "C" +void +__fastcall +_MOV_DD_SWP_i486( + void* a, // ECX + void* b // EDX + ); + +extern "C" +void +__fastcall +_MOV_DD_SWP_i386( + void* a, // ECX + void* b // EDX + ); +#define MOV_DD_SWP(a,b) _MOV_DD_SWP(&(a),&(b)) + +/********************/ + +extern "C" +void +__fastcall +_MOV_DW_SWP( + void* a, // ECX + void* b // EDX + ); + +#define MOV_DW_SWP(a,b) _MOV_DW_SWP(&(a),&(b)) + +/********************/ + +typedef void +(__fastcall *ptrREVERSE_DD)( + void* a // ECX + ); +extern "C" ptrREVERSE_DD _REVERSE_DD; + +void +__fastcall +_REVERSE_DD_i486( + void* a // ECX + ); + +void +__fastcall +_REVERSE_DD_i386( + void* a // ECX + ); +#define REVERSE_DD(a,b) _REVERSE_DD(&(a),&(b)) + +/********************/ + +extern "C" +void +__fastcall +_REVERSE_DW( + void* a // ECX + ); + +#define REVERSE_DW(a) _REVERSE_DW(&(a)) + +/********************/ + +extern "C" +void +__fastcall +_MOV_DW2DD_SWP( + void* a, // ECX + void* b // EDX + ); + +#define MOV_DW2DD_SWP(a,b) _MOV_DW2DD_SWP(&(a),&(b)) + +/********************/ + +extern "C" +void +__fastcall +_MOV_SWP_DW2DD( + void* a, // ECX + void* b // EDX + ); + +#define MOV_SWP_DW2DD(a,b) _MOV_SWP_DW2DD(&(a),&(b)) + +/********************/ + +extern "C" +void +__fastcall +_MOV_MSF( + void* a, // ECX + void* b // EDX + ); +#define MOV_MSF(a,b) _MOV_MSF(&(a),&(b)) + +/********************/ + +typedef void +(__fastcall *ptrMOV_MSF_SWP)( + void* a, // ECX + void* b // EDX + ); +extern "C" ptrMOV_MSF_SWP _MOV_MSF_SWP; + +extern "C" +void +__fastcall +_MOV_MSF_SWP_i486( + void* a, // ECX + void* b // EDX + ); + +extern "C" +void +__fastcall +_MOV_MSF_SWP_i386( + void* a, // ECX + void* b // EDX + ); +#define MOV_MSF_SWP(a,b) _MOV_MSF_SWP(&(a),&(b)) + +/********************/ + +extern "C" +void +__fastcall +_XCHG_DD( + void* a, // ECX + void* b // EDX + ); +#define XCHG_DD(a,b) _XCHG_DD(&(a),&(b)) + +#endif //USE_REACTOS_DDK + #endif // __CROSSNT_MISC__H__ diff --git a/drivers/storage/ide/uniata/ntddk_ex.h b/drivers/storage/ide/uniata/ntddk_ex.h index e13ca480909..1c74fca7f21 100644 --- a/drivers/storage/ide/uniata/ntddk_ex.h +++ b/drivers/storage/ide/uniata/ntddk_ex.h @@ -1,15 +1,19 @@ #ifndef __NTDDK_EX__H__ #define __NTDDK_EX__H__ +//#ifndef USE_REACTOS_DDK #ifdef ASSERT #undef ASSERT #define ASSERT(x) ((void)0) -// #define ASSERT(x) if (!(x)) { RtlAssert("#x",__FILE__,__LINE__, ""); } -#endif +#endif //ASSERT +//#endif //USE_REACTOS_DDK -#ifndef FILE_CHARACTERISTIC_PNP_DEVICE // DDK 2003 + +#if !defined(FILE_CHARACTERISTIC_PNP_DEVICE) || defined(USE_REACTOS_DDK) // DDK 2003 + +#ifndef FILE_CHARACTERISTIC_PNP_DEVICE #define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800 -#endif // !FILE_CHARACTERISTIC_PNP_DEVICE +#endif typedef enum _SYSTEM_INFORMATION_CLASS { SystemBasicInformation, @@ -42,7 +46,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS { SystemUnloadGdiDriverInformation, SystemTimeAdjustmentInformation, SystemSummaryMemoryInformation, -#ifndef __REACTOS__ +#ifndef USE_REACTOS_DDK SystemNextEventIdInformation, SystemEventIdsInformation, SystemCrashDumpInformation, @@ -50,7 +54,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS { SystemMirrorMemoryInformation, SystemPerformanceTraceInformation, SystemObsolete0, -#endif +#endif // USE_REACTOS_DDK SystemExceptionInformation, SystemCrashDumpStateInformation, SystemKernelDebuggerInformation, @@ -60,17 +64,17 @@ typedef enum _SYSTEM_INFORMATION_CLASS { SystemPrioritySeperation, SystemPlugPlayBusInformation, SystemDockInformation, -#ifdef __REACTOS__ +#ifdef USE_REACTOS_DDK SystemPowerInformationNative, #elif defined IRP_MN_START_DEVICE SystemPowerInformationInfo, #else SystemPowerInformation, -#endif +#endif // USE_REACTOS_DDK SystemProcessorSpeedInformation, SystemCurrentTimeZoneInformation, SystemLookasideInformation, -#ifdef __REACTOS__ +#ifdef USE_REACTOS_DDK SystemTimeSlipNotification, SystemSessionCreate, SystemSessionDetach, @@ -124,9 +128,11 @@ typedef enum _SYSTEM_INFORMATION_CLASS { SystemPrefetchPathInformation, SystemVerifierFaultsInformation, MaxSystemInfoClass, -#endif //__REACTOS__ +#endif // USE_REACTOS_DDK } SYSTEM_INFORMATION_CLASS; +#endif // !defined(FILE_CHARACTERISTIC_PNP_DEVICE) || defined(USE_REACTOS_DDK) + NTSYSAPI NTSTATUS diff --git a/drivers/storage/ide/uniata/srb.h b/drivers/storage/ide/uniata/srb.h index 9c3e46f4c6f..abc926ea6b0 100644 --- a/drivers/storage/ide/uniata/srb.h +++ b/drivers/storage/ide/uniata/srb.h @@ -935,7 +935,7 @@ ScsiPortWriteRegisterBufferUlong( SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortConvertUlongToPhysicalAddress( - ULONG_PTR UlongAddress + ULONG UlongAddress ); SCSIPORT_API diff --git a/drivers/storage/ide/uniata/stdafx.h b/drivers/storage/ide/uniata/stdafx.h index 6ee3304681e..79fea8194d6 100644 --- a/drivers/storage/ide/uniata/stdafx.h +++ b/drivers/storage/ide/uniata/stdafx.h @@ -1,3 +1,5 @@ +#include "config.h" + extern "C" { #include @@ -22,13 +24,10 @@ extern "C" { #ifdef ExAllocatePool #undef ExAllocatePool #endif - -#define TAG_UNIATA 'Uata' - +#define TAG_UNIATA 'ataU' #define ExAllocatePool(a,b) ExAllocatePoolWithTag(a,b,TAG_UNIATA) #endif //UNIATA_CORE #include "badblock.h" - diff --git a/drivers/storage/ide/uniata/uata_ctl.h b/drivers/storage/ide/uniata/uata_ctl.h index 560b1d87fad..e377be310bc 100644 --- a/drivers/storage/ide/uniata/uata_ctl.h +++ b/drivers/storage/ide/uniata/uata_ctl.h @@ -63,6 +63,7 @@ extern "C" { #define IOCTL_SCSI_MINIPORT_UNIATA_RESETBB ((FILE_DEVICE_SCSI << 16) + 0x09a5) #define IOCTL_SCSI_MINIPORT_UNIATA_RESET_DEVICE ((FILE_DEVICE_SCSI << 16) + 0x09a6) #define IOCTL_SCSI_MINIPORT_UNIATA_REG_IO ((FILE_DEVICE_SCSI << 16) + 0x09a7) +#define IOCTL_SCSI_MINIPORT_UNIATA_GET_VERSION ((FILE_DEVICE_SCSI << 16) + 0x09a8) typedef struct _ADDREMOVEDEV { ULONG WaitForPhysicalLink; // us @@ -87,6 +88,15 @@ typedef struct _GETTRANSFERMODE { ULONG Reserved; } GETTRANSFERMODE, *PGETTRANSFERMODE; +typedef struct _GETDRVVERSION { + ULONG Length; + USHORT VersionMj; + USHORT VersionMn; + USHORT SubVerMj; + USHORT SubVerMn; + ULONG Reserved; +} GETDRVVERSION, *PGETDRVVERSION; + typedef struct _CHANINFO { ULONG MaxTransferMode; // may differ from Controller's value due to 40-pin cable ULONG ChannelCtrlFlags; @@ -131,9 +141,11 @@ typedef struct _ADAPTERINFO { // with so many broken PCI IDE controllers being sold, we have // to support them. ULONG NumberChannels; - BOOLEAN ChanInfoValid; - CHAR Reserved[3]; + + UCHAR NumberLuns; + BOOLEAN LunInfoValid; + CHAR Reserved; ULONG AdapterInterfaceType; @@ -264,6 +276,7 @@ typedef struct _UNIATA_CTL { ADAPTERINFO AdapterInfo; // IDENTIFY_DATA2 LunIdent; // ATA_PASS_THROUGH_DIRECT AtaDirect; + GETDRVVERSION Version; UNIATA_REG_IO_HDR RegIo; }; } UNIATA_CTL, *PUNIATA_CTL; diff --git a/drivers/storage/ide/uniata/uniata_ver.h b/drivers/storage/ide/uniata/uniata_ver.h index 381ae7b73db..d0a5d88c642 100644 --- a/drivers/storage/ide/uniata/uniata_ver.h +++ b/drivers/storage/ide/uniata/uniata_ver.h @@ -1,6 +1,10 @@ -#define UNIATA_VER_STR "40a5" -#define UNIATA_VER_DOT 0.40.1.5 -#define UNIATA_VER_DOT_COMMA 0,40,1,5 -#define UNIATA_VER_DOT_STR "0.40.1.5" -#define UNIATA_VER_YEAR 2010 -#define UNIATA_VER_YEAR_STR "2010" +#define UNIATA_VER_STR "41b2" +#define UNIATA_VER_DOT 0.41.2.2 +#define UNIATA_VER_MJ 0 +#define UNIATA_VER_MN 41 +#define UNIATA_VER_SUB_MJ 2 +#define UNIATA_VER_SUB_MN 2 +#define UNIATA_VER_DOT_COMMA 0,41,2,2 +#define UNIATA_VER_DOT_STR "0.41.2.2" +#define UNIATA_VER_YEAR 2011 +#define UNIATA_VER_YEAR_STR "2011" diff --git a/drivers/storage/scsiport/stubs.c b/drivers/storage/scsiport/stubs.c index 28070bc6e42..9c7aa0e0b6e 100644 --- a/drivers/storage/scsiport/stubs.c +++ b/drivers/storage/scsiport/stubs.c @@ -249,7 +249,7 @@ VOID NTAPI ScsiPortWriteRegisterUchar( IN PUCHAR Register, - IN ULONG Value) + IN UCHAR Value) { WRITE_REGISTER_UCHAR(Register, Value); } diff --git a/drivers/usb/CMakeLists.txt b/drivers/usb/CMakeLists.txt index 291a4290b86..a7eb481921d 100644 --- a/drivers/usb/CMakeLists.txt +++ b/drivers/usb/CMakeLists.txt @@ -1,5 +1,5 @@ -add_subdirectory(nt4compat) +#add_subdirectory(nt4compat) add_subdirectory(usbd) #add_subdirectory(usbehci) The USB branch has usbehci_new #add_subdirectory(usbhub) Compiles, just skipped in trunk diff --git a/drivers/usb/nt4compat/usbdriver/CMakeLists.txt b/drivers/usb/nt4compat/usbdriver/CMakeLists.txt index fcf92117880..2bf1365a6ee 100644 --- a/drivers/usb/nt4compat/usbdriver/CMakeLists.txt +++ b/drivers/usb/nt4compat/usbdriver/CMakeLists.txt @@ -25,11 +25,11 @@ list(APPEND SOURCE keyboard.c usbdriver.rc) -add_library(usbdriver SHARED ${CMAKE_CURRENT_BINARY_DIR}/usbdriver_usbdriver.h.gch ${SOURCE}) +add_library(usbdriver SHARED ${SOURCE}) set_module_type(usbdriver kernelmodedriver) add_importlibs(usbdriver ntoskrnl hal) -add_pch(usbdriver ${CMAKE_CURRENT_SOURCE_DIR}/usbdriver.h ${SOURCE}) +add_pch(usbdriver usbdriver.h) add_cd_file(TARGET usbdriver DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/video/displays/framebuf_new/CMakeLists.txt b/drivers/video/displays/framebuf_new/CMakeLists.txt index d78771398ae..8e7a39748f2 100644 --- a/drivers/video/displays/framebuf_new/CMakeLists.txt +++ b/drivers/video/displays/framebuf_new/CMakeLists.txt @@ -10,7 +10,7 @@ list(APPEND SOURCE framebuf_new.rc ${CMAKE_CURRENT_BINARY_DIR}/framebuf_new.def) -add_library(framebuf_new SHARED ${CMAKE_CURRENT_BINARY_DIR}/framebuf_new_driver.h.gch ${SOURCE}) +add_library(framebuf_new SHARED ${SOURCE}) if(ARCH MATCHES i386) if(MSVC) @@ -27,5 +27,5 @@ set_image_base(framebuf_new 0x00010000) target_link_libraries(framebuf_new libcntpr) add_importlibs(framebuf_new win32k) -add_pch(framebuf_new ${CMAKE_CURRENT_SOURCE_DIR}/driver.h ${SOURCE}) +add_pch(framebuf_new driver.h) add_dependencies(framebuf_new psdk bugcodes) diff --git a/drivers/video/miniport/vga/CMakeLists.txt b/drivers/video/miniport/vga/CMakeLists.txt index 52fe270c1d8..841879b3652 100644 --- a/drivers/video/miniport/vga/CMakeLists.txt +++ b/drivers/video/miniport/vga/CMakeLists.txt @@ -4,10 +4,10 @@ list(APPEND SOURCE vgamp.c vgamp.rc) -add_library(vgamp SHARED ${CMAKE_CURRENT_BINARY_DIR}/vgamp_vgamp.h.gch ${SOURCE}) +add_library(vgamp SHARED ${SOURCE}) set_module_type(vgamp kernelmodedriver) add_importlibs(vgamp videoprt) -add_pch(vgamp ${CMAKE_CURRENT_SOURCE_DIR}/vgamp.h ${SOURCE}) +add_pch(vgamp vgamp.h) add_cd_file(TARGET vgamp DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/video/miniport/vga_new/CMakeLists.txt b/drivers/video/miniport/vga_new/CMakeLists.txt index dba2632b9dc..3580a9cb701 100644 --- a/drivers/video/miniport/vga_new/CMakeLists.txt +++ b/drivers/video/miniport/vga_new/CMakeLists.txt @@ -7,7 +7,7 @@ list(APPEND SOURCE vbe.c vga.rc) -add_library(vga SHARED ${CMAKE_CURRENT_BINARY_DIR}/vga_vga.h.gch ${SOURCE}) +add_library(vga SHARED ${SOURCE}) target_link_libraries(vga libcntpr) @@ -20,6 +20,6 @@ endif() set_module_type(vga kernelmodedriver) add_importlibs(vga videoprt) -add_pch(vga ${CMAKE_CURRENT_SOURCE_DIR}/vga.h ${SOURCE}) +add_pch(vga vga.h) add_cd_file(TARGET vga DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/video/miniport/vmx_svga/CMakeLists.txt b/drivers/video/miniport/vmx_svga/CMakeLists.txt index 056fe513f51..3f97a72c218 100644 --- a/drivers/video/miniport/vmx_svga/CMakeLists.txt +++ b/drivers/video/miniport/vmx_svga/CMakeLists.txt @@ -1,9 +1,9 @@ list(APPEND SOURCE vmx_svga.c vmx_svga.rc) -add_library(vmx_svga SHARED ${CMAKE_CURRENT_BINARY_DIR}/vmx_svga_precomp.h.gch ${SOURCE}) +add_library(vmx_svga SHARED ${SOURCE}) set_module_type(vmx_svga kernelmodedriver) add_importlibs(vmx_svga ntoskrnl videoprt) -add_pch(vmx_svga ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) +add_pch(vmx_svga precomp.h) diff --git a/drivers/video/videoprt/CMakeLists.txt b/drivers/video/videoprt/CMakeLists.txt index 2485ada6020..1eea498eb64 100644 --- a/drivers/video/videoprt/CMakeLists.txt +++ b/drivers/video/videoprt/CMakeLists.txt @@ -23,11 +23,11 @@ list(APPEND SOURCE videoprt.rc ${CMAKE_CURRENT_BINARY_DIR}/videoprt.def) -add_library(videoprt SHARED ${CMAKE_CURRENT_BINARY_DIR}/videoprt_videoprt.h.gch ${SOURCE}) +add_library(videoprt SHARED ${SOURCE}) set_module_type(videoprt kernelmodedriver) add_importlibs(videoprt ntoskrnl hal) -add_pch(videoprt ${CMAKE_CURRENT_SOURCE_DIR}/videoprt.h ${SOURCE}) +add_pch(videoprt videoprt.h) add_cd_file(TARGET videoprt DESTINATION reactos/system32/drivers FOR all) add_importlib_target(videoprt.spec) diff --git a/drivers/video/videoprt/agp.c b/drivers/video/videoprt/agp.c index 768e6d92f0a..188ce2efe2a 100644 --- a/drivers/video/videoprt/agp.c +++ b/drivers/video/videoprt/agp.c @@ -29,7 +29,7 @@ NTSTATUS IopInitiatePnpIrp( PDEVICE_OBJECT DeviceObject, PIO_STATUS_BLOCK IoStatusBlock, - ULONG MinorFunction, + UCHAR MinorFunction, PIO_STACK_LOCATION Stack OPTIONAL) { PDEVICE_OBJECT TopDeviceObject; @@ -56,8 +56,8 @@ IopInitiatePnpIrp( IoStatusBlock); /* PNP IRPs are always initialized with a status code of - STATUS_NOT_IMPLEMENTED */ - Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; + STATUS_NOT_SUPPORTED */ + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; Irp->IoStatus.Information = 0; IrpSp = IoGetNextIrpStackLocation(Irp); diff --git a/drivers/video/videoprt/dma.c b/drivers/video/videoprt/dma.c index e35f63b9ecf..bc344aeb287 100644 --- a/drivers/video/videoprt/dma.c +++ b/drivers/video/videoprt/dma.c @@ -203,8 +203,7 @@ VideoPortFreeCommonBuffer(IN PVOID HwDeviceExtension, ASSERT(VpDmaAdapter->Adapter != NULL); ASSERT(VpDmaAdapter->MapRegisters != 0); - return VideoPortReleaseCommonBuffer(HwDeviceExtension, (PVP_DMA_ADAPTER)VpDmaAdapter, Length, LogicalAddress, VirtualAddress, CacheEnabled); - + VideoPortReleaseCommonBuffer(HwDeviceExtension, (PVP_DMA_ADAPTER)VpDmaAdapter, Length, LogicalAddress, VirtualAddress, CacheEnabled); } /* diff --git a/drivers/video/videoprt/int10.c b/drivers/video/videoprt/int10.c index 2b287133084..36c14dc43cb 100644 --- a/drivers/video/videoprt/int10.c +++ b/drivers/video/videoprt/int10.c @@ -60,8 +60,8 @@ IntInt10AllocateBuffer( return ERROR_NOT_ENOUGH_MEMORY; } - *Seg = (ULONG)MemoryAddress >> 4; - *Off = (ULONG)MemoryAddress & 0xF; + *Seg = (USHORT)((ULONG)MemoryAddress >> 4); + *Off = (USHORT)((ULONG)MemoryAddress & 0xF); INFO_(VIDEOPRT, "- Segment: %x\n", (ULONG)MemoryAddress >> 4); INFO_(VIDEOPRT, "- Offset: %x\n", (ULONG)MemoryAddress & 0xF); @@ -182,8 +182,8 @@ IntInt10CallBios( BiosArguments->Esi = BiosContext.Esi; BiosArguments->Edi = BiosContext.Edi; BiosArguments->Ebp = BiosContext.Ebp; - BiosArguments->SegDs = BiosContext.SegDs; - BiosArguments->SegEs = BiosContext.SegEs; + BiosArguments->SegDs = (USHORT)BiosContext.SegDs; + BiosArguments->SegEs = (USHORT)BiosContext.SegEs; /* Detach and return status */ IntDetachFromCSRSS(&CallingProcess, &ApcState); diff --git a/drivers/video/videoprt/interrupt.c b/drivers/video/videoprt/interrupt.c index 64d41e425f8..961e6ea9929 100644 --- a/drivers/video/videoprt/interrupt.c +++ b/drivers/video/videoprt/interrupt.c @@ -125,7 +125,7 @@ VideoPortEnableInterrupt(IN PVOID HwDeviceExtension) } /* Re-enable the interrupt and return */ - InterruptValid = HalEnableSystemInterrupt(DeviceExtension->InterruptVector, + InterruptValid = HalEnableSystemInterrupt((UCHAR)DeviceExtension->InterruptVector, 0, DeviceExtension->InterruptLevel); @@ -162,7 +162,7 @@ VideoPortDisableInterrupt(IN PVOID HwDeviceExtension) } /* Disable the interrupt and return */ - HalDisableSystemInterrupt(DeviceExtension->InterruptVector, + HalDisableSystemInterrupt((UCHAR)DeviceExtension->InterruptVector, 0); return NO_ERROR; #else diff --git a/drivers/video/videoprt/resource.c b/drivers/video/videoprt/resource.c index 1e4162de0c3..b83ca1fb950 100644 --- a/drivers/video/videoprt/resource.c +++ b/drivers/video/videoprt/resource.c @@ -79,7 +79,7 @@ IntVideoPortMapMemory( IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, - IN UCHAR InIoSpace, + IN ULONG InIoSpace, IN HANDLE ProcessHandle, OUT VP_STATUS *Status) { diff --git a/drivers/video/videoprt/videoprt.h b/drivers/video/videoprt/videoprt.h index eb2b8eee111..704c7d77b6a 100644 --- a/drivers/video/videoprt/videoprt.h +++ b/drivers/video/videoprt/videoprt.h @@ -116,7 +116,7 @@ NTSTATUS IopInitiatePnpIrp( PDEVICE_OBJECT DeviceObject, PIO_STATUS_BLOCK IoStatusBlock, - ULONG MinorFunction, + UCHAR MinorFunction, PIO_STACK_LOCATION Stack OPTIONAL); NTSTATUS NTAPI diff --git a/drivers/wdm/audio/drm/drmk/CMakeLists.txt b/drivers/wdm/audio/drm/drmk/CMakeLists.txt index 20bd61a8eee..eb70b994869 100644 --- a/drivers/wdm/audio/drm/drmk/CMakeLists.txt +++ b/drivers/wdm/audio/drm/drmk/CMakeLists.txt @@ -11,19 +11,17 @@ list(APPEND SOURCE add_library(drmk SHARED ${SOURCE}) if(NOT MSVC) - set_module_type(drmk kernelmodedriver) + set_module_type(drmk kernelmodedriver) else() - set_target_properties(drmk PROPERTIES SUFFIX ".sys") - set_subsystem(drmk native) + set_target_properties(drmk PROPERTIES SUFFIX ".sys") + set_subsystem(drmk native) set_image_base(drmk 0x00010000) add_linkerflag(drmk "/DRIVER") add_dependencies(drmk bugcodes) - target_link_libraries(drmk msvcsup) - add_dependencies(drmk psdk) + add_dependencies(drmk psdk) endif() set_entrypoint(drmk 0) add_importlibs(drmk ntoskrnl) add_importlib_target(drmk.spec) - add_cd_file(TARGET drmk DESTINATION reactos/system32/drivers FOR all) diff --git a/drivers/wmi/CMakeLists.txt b/drivers/wmi/CMakeLists.txt index 0ca4443efe6..c00a650c931 100644 --- a/drivers/wmi/CMakeLists.txt +++ b/drivers/wmi/CMakeLists.txt @@ -9,20 +9,18 @@ list(APPEND SOURCE add_library(wmilib SHARED ${SOURCE}) if(NOT MSVC) - set_module_type(wmilib kernelmodedriver) + set_module_type(wmilib kernelmodedriver) else() - set_target_properties(wmilib PROPERTIES SUFFIX ".sys") - set_subsystem(wmilib native) + set_target_properties(wmilib PROPERTIES SUFFIX ".sys") + set_subsystem(wmilib native) set_image_base(wmilib 0x00010000) add_linkerflag(wmilib "/DRIVER") add_dependencies(wmilib bugcodes) - target_link_libraries(wmilib msvcsup) - add_dependencies(wmilib psdk) + add_dependencies(wmilib psdk) endif() set_entrypoint(wmilib 0) set_target_properties(wmilib PROPERTIES SUFFIX ".sys") add_importlibs(wmilib ntoskrnl) add_importlib_target(wmilib.spec) - add_cd_file(TARGET wmilib DESTINATION reactos/system32/drivers FOR all) diff --git a/hal/halarm/omap3/halup.rbuild b/hal/halarm/omap3/halup.rbuild index 7486fa96116..c5bcbae27b5 100644 --- a/hal/halarm/omap3/halup.rbuild +++ b/hal/halarm/omap3/halup.rbuild @@ -2,7 +2,7 @@ - + include include diff --git a/hal/halx86/CMakeLists.txt b/hal/halx86/CMakeLists.txt index ebada96c389..13b14ccbc11 100644 --- a/hal/halx86/CMakeLists.txt +++ b/hal/halx86/CMakeLists.txt @@ -82,7 +82,6 @@ if(ARCH MATCHES i386) spec2def(hal.dll ../hal.spec) list(APPEND HAL_SOURCE - ${CMAKE_CURRENT_BINARY_DIR}/hal_hal.h.gch ${HAL_GENERIC_SOURCE} ${HAL_GENERIC_PCAT_SOURCE} ${HAL_GENERIC_UP_SOURCE} @@ -92,7 +91,7 @@ if(ARCH MATCHES i386) # hal add_library(hal SHARED ${HAL_SOURCE}) - add_pch(hal ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h ${HAL_SOURCE}) + add_pch(hal include/hal.h) add_dependencies(hal psdk bugcodes) set_entrypoint(hal HalInitSystem@8) diff --git a/hal/halx86/generic/i386/systimer.S b/hal/halx86/generic/i386/systimer.S index 8534f88a204..7a24e90cf75 100644 --- a/hal/halx86/generic/i386/systimer.S +++ b/hal/halx86/generic/i386/systimer.S @@ -62,7 +62,7 @@ _HalpCalibrateStallExecution@0: sub esp, 12 /* Save EFLAGS and kill interrupts */ - pushf + pushfd cli /* Get the current interrupt mask on the PICs */ diff --git a/hal/halx86/generic/i386/trap.S b/hal/halx86/generic/i386/trap.S index 8a4f4538144..d0e1c6cf1b5 100644 --- a/hal/halx86/generic/i386/trap.S +++ b/hal/halx86/generic/i386/trap.S @@ -24,7 +24,7 @@ PUBLIC @HalpExitToV86@4 @HalpExitToV86@4: /* Point esp to the iret frame and return */ lea esp, [ecx + KTRAP_FRAME_EIP] - iret + iretd /* Here starts the real mode code */ .code16 diff --git a/hal/halx86/generic/legacy/bus/bushndlr.c b/hal/halx86/generic/legacy/bus/bushndlr.c index 2ab551c610e..31ea9d592dc 100644 --- a/hal/halx86/generic/legacy/bus/bushndlr.c +++ b/hal/halx86/generic/legacy/bus/bushndlr.c @@ -36,7 +36,7 @@ HalpAllocateArray(IN ULONG ArraySize) /* Allocate the array */ Array = ExAllocatePoolWithTag(NonPagedPool, Size, - 'BusH'); + TAG_BUS_HANDLER); if (!Array) KeBugCheckEx(HAL_MEMORY_ALLOCATION, Size, 0, (ULONG_PTR)__FILE__, __LINE__); /* Initialize it */ @@ -263,7 +263,7 @@ HaliRegisterBusHandler(IN INTERFACE_TYPE InterfaceType, /* Allocate the bus handler */ Bus = ExAllocatePoolWithTag(NonPagedPool, sizeof(HAL_BUS_HANDLER) + ExtraData, - 'HsuB'); + TAG_BUS_HANDLER); if (!Bus) return STATUS_INSUFFICIENT_RESOURCES; /* Return the handler */ @@ -404,11 +404,11 @@ HaliRegisterBusHandler(IN INTERFACE_TYPE InterfaceType, //MmUnlockPagableImageSection(CodeHandle); /* Free all allocations */ - if (Bus) ExFreePool(Bus); - if (InterfaceArray) ExFreePool(InterfaceArray); - if (InterfaceBusNumberArray) ExFreePool(InterfaceBusNumberArray); - if (ConfigArray) ExFreePool(ConfigArray); - if (ConfigBusNumberArray) ExFreePool(ConfigBusNumberArray); + if (Bus) ExFreePoolWithTag(Bus, TAG_BUS_HANDLER); + if (InterfaceArray) ExFreePoolWithTag(InterfaceArray, TAG_BUS_HANDLER); + if (InterfaceBusNumberArray) ExFreePoolWithTag(InterfaceBusNumberArray, TAG_BUS_HANDLER); + if (ConfigArray) ExFreePoolWithTag(ConfigArray, TAG_BUS_HANDLER); + if (ConfigBusNumberArray) ExFreePoolWithTag(ConfigBusNumberArray, TAG_BUS_HANDLER); /* And we're done */ return Status; diff --git a/hal/halx86/generic/legacy/bus/pcibus.c b/hal/halx86/generic/legacy/bus/pcibus.c index ddb05cacf43..a2485ac328b 100644 --- a/hal/halx86/generic/legacy/bus/pcibus.c +++ b/hal/halx86/generic/legacy/bus/pcibus.c @@ -572,7 +572,7 @@ HalpGetISAFixedPCIIrq(IN PBUS_HANDLER BusHandler, if (PciData.VendorID == PCI_INVALID_VENDORID) return STATUS_UNSUCCESSFUL; /* Allocate the supported range structure */ - *Range = ExAllocatePoolWithTag(PagedPool, sizeof(SUPPORTED_RANGE), 'Hal '); + *Range = ExAllocatePoolWithTag(PagedPool, sizeof(SUPPORTED_RANGE), TAG_HAL); if (!*Range) return STATUS_INSUFFICIENT_RESOURCES; /* Set it up */ @@ -766,7 +766,7 @@ HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler, PagedPool, sizeof(CM_RESOURCE_LIST) + (ResourceCount - 1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR), - ' laH'); + TAG_HAL); if (NULL == *AllocatedResources) return STATUS_NO_MEMORY; @@ -1015,7 +1015,7 @@ HalpQueryPciRegistryInfo(VOID) sizeof(PCI_REGISTRY_INFO_INTERNAL) + (KeyInformation.Values * sizeof(PCI_CARD_DESCRIPTOR)), - ' laH'); + TAG_HAL); if (PciRegistryInfo) { /* Get the first card descriptor entry */ @@ -1069,7 +1069,7 @@ HalpQueryPciRegistryInfo(VOID) /* Just allocate the basic structure then */ PciRegistryInfo = ExAllocatePoolWithTag(NonPagedPool, sizeof(PCI_REGISTRY_INFO_INTERNAL), - ' laH'); + TAG_HAL); if (!PciRegistryInfo) return NULL; } @@ -1119,7 +1119,7 @@ HalpInitializePciStubs(VOID) MaxPciBusNumber = PciRegistryInfo->NoBuses - 1; /* Free the info structure */ - ExFreePool(PciRegistryInfo); + ExFreePoolWithTag(PciRegistryInfo, TAG_HAL); } /* Initialize the PCI lock */ diff --git a/hal/halx86/generic/legacy/bussupp.c b/hal/halx86/generic/legacy/bussupp.c index 013b8564d79..76aca8c098a 100644 --- a/hal/halx86/generic/legacy/bussupp.c +++ b/hal/halx86/generic/legacy/bussupp.c @@ -1096,7 +1096,7 @@ HalpInitializePciBus(VOID) HalpGetNMICrashFlag(); /* Free the registry data */ - ExFreePool(PciRegistryInfo); + ExFreePoolWithTag(PciRegistryInfo, TAG_HAL); /* Tell PnP if this hard supports correct decoding */ HalpMarkChipsetDecode(ExtendedAddressDecoding); @@ -1256,7 +1256,7 @@ HaliTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber); if (!(Handler) || !(Handler->TranslateBusAddress)) { - DPRINT1("No translator!\n"); + DPRINT1("No translator Interface: %x, Bus: %x, Handler: %x!\n", InterfaceType, BusNumber, Handler); return FALSE; } diff --git a/hal/halx86/generic/spinlock.c b/hal/halx86/generic/spinlock.c index 1aab8d5a314..c397bf09598 100644 --- a/hal/halx86/generic/spinlock.c +++ b/hal/halx86/generic/spinlock.c @@ -188,6 +188,10 @@ KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, /* Simply raise to synch */ KeRaiseIrql(SYNCH_LEVEL, OldIrql); + /* Add an explicit memory barrier to prevent the compiler from reordering + memory accesses across the borders of spinlocks */ + KeMemoryBarrierWithoutFence(); + /* Always return true on UP Machines */ return TRUE; } @@ -208,6 +212,10 @@ KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, /* Simply raise to dispatch */ KeRaiseIrql(DISPATCH_LEVEL, OldIrql); + /* Add an explicit memory barrier to prevent the compiler from reordering + memory accesses across the borders of spinlocks */ + KeMemoryBarrierWithoutFence(); + /* Always return true on UP Machines */ return TRUE; } diff --git a/hal/halx86/include/hal.h b/hal/halx86/include/hal.h index 33aaa83b763..701c374620b 100644 --- a/hal/halx86/include/hal.h +++ b/hal/halx86/include/hal.h @@ -45,6 +45,9 @@ #include "internal/i386/intrin_i.h" #endif +#define TAG_HAL ' laH' +#define TAG_BUS_HANDLER 'BusH' + /* Internal HAL Headers */ #include "apic.h" #include "bus.h" diff --git a/hal/halx86/include/halp.h b/hal/halx86/include/halp.h index c7b921fb75c..6db35ab056d 100644 --- a/hal/halx86/include/halp.h +++ b/hal/halx86/include/halp.h @@ -11,8 +11,8 @@ #define PAGE_UNLOCKED_FUNCTION PLACE_IN_SECTION("pagepo") #else #define INIT_FUNCTION -#define PAGE_LOCKED_FUNCTION -#define PAGE_UNLOCKED_FUNCTION +#define PAGE_LOCKED_FUNCTION +#define PAGE_UNLOCKED_FUNCTION #endif #ifdef _MSC_VER @@ -158,7 +158,7 @@ typedef enum _TIMER_CHANNELS typedef union _TIMER_CONTROL_PORT_REGISTER { - struct + struct { UCHAR BcdMode:1; TIMER_OPERATING_MODES OperatingMode:3; @@ -178,7 +178,7 @@ typedef union _TIMER_CONTROL_PORT_REGISTER #define SYSTEM_CONTROL_PORT_B 0x61 typedef union _SYSTEM_CONTROL_PORT_B_REGISTER { - struct + struct { UCHAR Timer2GateToSpeaker:1; UCHAR SpeakerDataEnable:1; @@ -269,12 +269,12 @@ typedef enum _I8259_EOI_MODE // typedef union _I8259_ICW1 { - struct + struct { UCHAR NeedIcw4:1; - I8259_ICW1_OPERATING_MODE OperatingMode:1; - I8259_ICW1_INTERVAL Interval:1; - I8259_ICW1_INTERRUPT_MODE InterruptMode:1; + UCHAR OperatingMode:1; + UCHAR Interval:1; + UCHAR InterruptMode:1; UCHAR Init:1; UCHAR InterruptVectorAddress:3; }; @@ -283,7 +283,7 @@ typedef union _I8259_ICW1 typedef union _I8259_ICW2 { - struct + struct { UCHAR Sbz:3; UCHAR InterruptVector:5; @@ -295,7 +295,7 @@ typedef union _I8259_ICW3 { union { - struct + struct { UCHAR SlaveIrq0:1; UCHAR SlaveIrq1:1; @@ -306,7 +306,7 @@ typedef union _I8259_ICW3 UCHAR SlaveIrq6:1; UCHAR SlaveIrq7:1; }; - struct + struct { UCHAR SlaveId:3; UCHAR Reserved:5; @@ -317,11 +317,11 @@ typedef union _I8259_ICW3 typedef union _I8259_ICW4 { - struct + struct { - I8259_ICW4_SYSTEM_MODE SystemMode:1; - I8259_ICW4_EOI_MODE EoiMode:1; - I8259_ICW4_BUFFERED_MODE BufferedMode:2; + UCHAR SystemMode:1; + UCHAR EoiMode:1; + UCHAR BufferedMode:2; UCHAR SpecialFullyNestedMode:1; UCHAR Reserved:3; }; @@ -334,7 +334,7 @@ typedef union _I8259_OCW2 { UCHAR IrqNumber:3; UCHAR Sbz:2; - I8259_EOI_MODE EoiMode:3; + UCHAR EoiMode:3; }; UCHAR Bits; } I8259_OCW2, *PI8259_OCW2; @@ -343,7 +343,7 @@ typedef union _I8259_OCW3 { struct { - I8259_READ_REQUEST ReadRequest:2; + UCHAR ReadRequest:2; UCHAR PollCommand:1; UCHAR Sbo:1; UCHAR Sbz:1; @@ -423,7 +423,7 @@ typedef struct _PIC_MASK UCHAR Slave; }; USHORT Both; - }; + }; } PIC_MASK, *PPIC_MASK; typedef @@ -527,7 +527,7 @@ HalpHardwareInterruptLevel( // #define HalAddressToPde(x) (PHARDWARE_PTE)MiAddressToPde(x) #define HalAddressToPte(x) (PHARDWARE_PTE)MiAddressToPte(x) - + typedef struct _IDTUsageFlags { UCHAR Flags; @@ -740,7 +740,7 @@ HalpAllocPhysicalMemory( IN ULONG PageCount, IN BOOLEAN Aligned ); - + PVOID NTAPI HalpMapPhysicalMemory64( @@ -748,13 +748,13 @@ HalpMapPhysicalMemory64( IN ULONG PageCount ); -NTSTATUS +NTSTATUS NTAPI HalpOpenRegistryKey( IN PHANDLE KeyHandle, IN HANDLE RootKey, IN PUNICODE_STRING KeyName, - IN ACCESS_MASK DesiredAccess, + IN ACCESS_MASK DesiredAccess, IN BOOLEAN Create ); diff --git a/include/asm/CMakeLists.txt b/include/asm/CMakeLists.txt index 32f70eb9393..f7dc16511e7 100644 --- a/include/asm/CMakeLists.txt +++ b/include/asm/CMakeLists.txt @@ -16,9 +16,11 @@ elseif(ARCH MATCHES amd64) set(_filename ksamd64) endif() +get_target_property(genincdata_dll genincdata LOCATION) + add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_filename}.inc - COMMAND native-geninc ${CMAKE_CURRENT_BINARY_DIR}/genincdata.dll ${CMAKE_CURRENT_BINARY_DIR}/${_filename}.inc ${OPT_MS} + COMMAND native-geninc ${genincdata_dll} ${CMAKE_CURRENT_BINARY_DIR}/${_filename}.inc ${OPT_MS} DEPENDS genincdata) add_custom_target(asm diff --git a/include/asm/asm.inc b/include/asm/asm.inc index be640020053..6f0b0925177 100644 --- a/include/asm/asm.inc +++ b/include/asm/asm.inc @@ -35,27 +35,29 @@ rip = 0 name PROC FRAME _name: ENDM +#define FUNC .PROC /* ... and .ENDP, replacing ENDP */ .ENDP MACRO name name ENDP ENDM +#define ENDFUNC .ENDP /* MASM doesn't have an ASCII macro */ -.ASCII MACRO text +.ASCII MACRO text:VARARG + DB text +ENDM +.ascii MACRO text:VARARG DB text ENDM /* MASM doesn't have an ASCIZ macro */ -.ASCIZ MACRO text - DB text, 0 +.ASCIZ MACRO text:VARARG + DB text + DB 0 ENDM - -#define lgdt lgdt fword ptr ds: - -#define lidt lidt fword ptr ds: - -ljmp MACRO segment, offset +.asciz MACRO text:VARARG + DB text DB 0 ENDM @@ -70,11 +72,12 @@ ENDM .code16 MACRO ASSUME nothing - .text16 SEGMENT use16 + .text SEGMENT use16 + .586P ENDM .endcode16 MACRO - .text16 ENDS + .text ENDS ENDM .bss MACRO @@ -115,13 +118,12 @@ ENDM .fill MACRO count, size, value REPEAT count - if (size == 1) + if (size EQ 1) DB value - elseif (size == 2) + elseif (size EQ 2) DW value - elseif (size == 4) + elseif (size EQ 4) DD value - else endif ENDM ENDM @@ -145,9 +147,23 @@ ENDM UNIMPLEMENTED MACRO name ENDM +absolute MACRO address + __absolute__address__ = address +ENDM + +resb MACRO name, size + name = __absolute__address__ + __absolute__address__ = __absolute__address__ + size +ENDM + + /* We need this to distinguish repeat from macros */ #define ENDR ENDM +#define CR 13 +#define LF 10 +#define NUL 0 + #else /***********************************************************************/ /* Force intel syntax */ @@ -263,6 +279,15 @@ code = 1 .macro .endprolog .endm +.macro absolute address + __absolute__address__ = \address +ENDM + +.macro resb name, size + \name = __absolute__address__ + __absolute__address__ = __absolute__address__ + \size +ENDM + .macro UNIMPLEMENTED2 file, line, func jmp 3f @@ -286,4 +311,8 @@ code = 1 #define else .else #define elseif .elseif +#define CR "\r" +#define LF "\n" +#define NUL "\0" + #endif diff --git a/include/asm/syscalls.inc b/include/asm/syscalls.inc index a0d2832c844..96784e5a2e4 100644 --- a/include/asm/syscalls.inc +++ b/include/asm/syscalls.inc @@ -11,7 +11,7 @@ ENDM MACRO(STUBCODE_K, SyscallId, StackBytes) mov eax, SyscallId lea edx, [esp + 4] - pushf + pushfd push KGDT_R0_CODE call _KiSystemService ret StackBytes diff --git a/include/crt/crtdefs.h b/include/crt/crtdefs.h index 832769e12d4..e43972ec9aa 100644 --- a/include/crt/crtdefs.h +++ b/include/crt/crtdefs.h @@ -52,7 +52,7 @@ #ifndef _CRTIMP #ifdef CRTDLL /* Defined for ntdll, crtdll, msvcrt, etc */ - #define _CRTIMP __declspec(dllexport) + #define _CRTIMP #elif defined(_DLL) #define _CRTIMP __declspec(dllimport) #else /* !CRTDLL && !_DLL */ diff --git a/include/crt/excpt.h b/include/crt/excpt.h index d0d3ef077de..456e20c3cde 100644 --- a/include/crt/excpt.h +++ b/include/crt/excpt.h @@ -44,18 +44,17 @@ typedef enum _EXCEPTION_DISPOSITION _CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext); #endif -#ifdef _MSC_VER // HACK!!! +#ifdef _MSC_VER #define GetExceptionCode _exception_code #define exception_code _exception_code #define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info #define exception_info (struct _EXCEPTION_POINTERS *)_exception_info #define AbnormalTermination _abnormal_termination #define abnormal_termination _abnormal_termination -#endif - unsigned long __cdecl _exception_code(void); void *__cdecl _exception_info(void); int __cdecl _abnormal_termination(void); +#endif #define EXCEPTION_EXECUTE_HANDLER 1 #define EXCEPTION_CONTINUE_SEARCH 0 diff --git a/include/crt/math.h b/include/crt/math.h index 94c0d6541c3..83a1ea2e1f9 100644 --- a/include/crt/math.h +++ b/include/crt/math.h @@ -6,7 +6,7 @@ #ifndef _INC_MATH #define _INC_MATH -#include +#include "crtdefs.h" struct exception; diff --git a/include/crt/mingw32/intrin_x86.h b/include/crt/mingw32/intrin_x86.h index a92f2b307ef..0f94927c17a 100644 --- a/include/crt/mingw32/intrin_x86.h +++ b/include/crt/mingw32/intrin_x86.h @@ -911,7 +911,7 @@ __INTRIN_INLINE unsigned int _rotr(unsigned int value, int shift) __INTRIN_INLINE unsigned char _rotr8(unsigned char value, unsigned char shift) { unsigned char retval; - __asm__("rorb %b[shift], %b[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift)); + __asm__("rorb %b[shift], %b[retval]" : [retval] "=qm" (retval) : "[retval]" (value), [shift] "Nc" (shift)); return retval; } diff --git a/include/crt/process.h b/include/crt/process.h index 591032f4d9d..c1bacb20788 100644 --- a/include/crt/process.h +++ b/include/crt/process.h @@ -112,7 +112,7 @@ extern "C" { int (__cdecl *__cdecl _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void); #ifdef _DECL_DLLMAIN -#ifdef _WINDOWS_ +#ifdef _WIN32 WINBOOL WINAPI DllMain(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); WINBOOL WINAPI _CRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); WINBOOL WINAPI _wCRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); diff --git a/include/ddk/msports.h b/include/ddk/msports.h new file mode 100644 index 00000000000..02b812e0e64 --- /dev/null +++ b/include/ddk/msports.h @@ -0,0 +1,62 @@ +#ifndef _MSPORTS_ +#define _MSPORTS_ + +#ifdef __cplusplus +extern "C" { +#endif + +DECLARE_HANDLE(HCOMDB); +typedef HCOMDB *PHCOMDB; +#define HCOMDB_INVALID_HANDLE_VALUE ((HCOMDB)INVALID_HANDLE_VALUE) + +/* Limits for ComDBResizeDatabase NewSize */ +#define COMDB_MIN_PORTS_ARBITRATED 256 +#define COMDB_MAX_PORTS_ARBITRATED 4096 + +/* ReportType flags for ComDBGetCurrentPortUsage */ +#define CDB_REPORT_BITS 0x0 +#define CDB_REPORT_BYTES 0x1 + +LONG +WINAPI +ComDBClaimNextFreePort(IN HCOMDB hComDB, + OUT LPDWORD ComNumber); + +LONG +WINAPI +ComDBClaimPort(IN HCOMDB hComDB, + IN DWORD ComNumber, + IN BOOL ForceClaim, + OUT PBOOL Forced); + +LONG +WINAPI +ComDBClose(IN HCOMDB hComDB); + +LONG +WINAPI +ComDBGetCurrentPortUsage(IN HCOMDB hComDB, + OUT PBYTE Buffer, + IN DWORD BufferSize, + IN DWORD ReportType, + OUT LPDWORD MaxPortsReported); + +LONG +WINAPI +ComDBOpen(OUT HCOMDB *phComDB); + +LONG +WINAPI +ComDBReleasePort(IN HCOMDB hComDB, + IN DWORD ComNumber); + +LONG +WINAPI +ComDBResizeDatabase(IN HCOMDB hComDB, + IN DWORD NewSize); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSPORTS_ */ diff --git a/include/ddk/ntifs.h b/include/ddk/ntifs.h index a82cd79053a..8c4f1a1bbad 100644 --- a/include/ddk/ntifs.h +++ b/include/ddk/ntifs.h @@ -7344,7 +7344,7 @@ FsRtlAddBaseMcbEntry( IN LONGLONG SectorCount); NTKERNELAPI -VOID +BOOLEAN NTAPI FsRtlRemoveBaseMcbEntry( IN PBASE_MCB Mcb, diff --git a/include/ddk/srb.h b/include/ddk/srb.h index cddc8295e17..e4cefc1636e 100644 --- a/include/ddk/srb.h +++ b/include/ddk/srb.h @@ -883,7 +883,7 @@ VOID NTAPI ScsiPortWriteRegisterUchar( IN PUCHAR Register, - IN ULONG Value); + IN UCHAR Value); SCSIPORTAPI VOID diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 8da3a5ab485..18c1be79f02 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -170,7 +170,7 @@ typedef struct _DMA_ADAPTER *PADAPTER_OBJECT; #elif defined(_WDM_INCLUDED_) typedef struct _DMA_ADAPTER *PADAPTER_OBJECT; #else -typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; +typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; #endif #ifndef DEFINE_GUIDEX @@ -191,7 +191,7 @@ typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; #ifdef __cplusplus inline int IsEqualGUIDAligned(REFGUID guid1, REFGUID guid2) { - return ( (*(PLONGLONG)(&guid1) == *(PLONGLONG)(&guid2)) && + return ( (*(PLONGLONG)(&guid1) == *(PLONGLONG)(&guid2)) && (*((PLONGLONG)(&guid1) + 1) == *((PLONGLONG)(&guid2) + 1)) ); } #else @@ -1204,11 +1204,12 @@ typedef enum _KSPIN_LOCK_QUEUE_NUMBER { #endif /* defined(_AMD64_) */ typedef VOID -(NTAPI *PKDEFERRED_ROUTINE)( +(NTAPI KDEFERRED_ROUTINE)( IN struct _KDPC *Dpc, IN PVOID DeferredContext OPTIONAL, IN PVOID SystemArgument1 OPTIONAL, IN PVOID SystemArgument2 OPTIONAL); +typedef KDEFERRED_ROUTINE *PKDEFERRED_ROUTINE; typedef enum _KDPC_IMPORTANCE { LowImportance, @@ -7718,6 +7719,8 @@ KeMemoryBarrier(VOID) #endif } +#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() + NTHALAPI KIRQL NTAPI @@ -7875,6 +7878,21 @@ typedef XSAVE_FORMAT XMM_SAVE_AREA32, *PXMM_SAVE_AREA32; #define KeGetDcacheFillSize() 1L #define YieldProcessor _mm_pause +#define FastFence __faststorefence +#define LoadFence _mm_lfence +#define MemoryFence _mm_mfence +#define StoreFence _mm_sfence +#define LFENCE_ACQUIRE() LoadFence() + +FORCEINLINE +VOID +KeMemoryBarrier(VOID) +{ + FastFence(); + LFENCE_ACQUIRE(); +} + +#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() FORCEINLINE KIRQL @@ -9772,8 +9790,8 @@ KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock) } #endif -NTKERNELAPI //DECLSPEC_NORETURN +NTKERNELAPI VOID NTAPI KeBugCheckEx( @@ -13290,14 +13308,14 @@ ExInterlockedFlushSList( #if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_) NTKERNELAPI -PSINGLE_LIST_ENTRY +PSINGLE_LIST_ENTRY FASTCALL ExInterlockedPopEntrySList( IN PSLIST_HEADER ListHead, IN PKSPIN_LOCK Lock); NTKERNELAPI -PSINGLE_LIST_ENTRY +PSINGLE_LIST_ENTRY FASTCALL ExInterlockedPushEntrySList( IN PSLIST_HEADER ListHead, diff --git a/include/dxsdk/CMakeLists.txt b/include/dxsdk/CMakeLists.txt index 98789cdc56a..9a842b81c13 100644 --- a/include/dxsdk/CMakeLists.txt +++ b/include/dxsdk/CMakeLists.txt @@ -1,4 +1,6 @@ +include_directories(${REACTOS_SOURCE_DIR}/include/psdk) + list(APPEND SOURCE amstream.idl amvideo.idl diff --git a/include/host/config.h b/include/host/config.h index 0a30629b42c..6c4180fdede 100644 --- a/include/host/config.h +++ b/include/host/config.h @@ -1,8 +1,6 @@ /* include/config.h. Generated by configure. */ /* include/config.h.in. Generated from configure.ac by autoheader. */ -#include "reactos/buildno.h" - #define __WINE_CONFIG_H #define HAVE_SPAWNVP 1 @@ -125,7 +123,7 @@ #define PACKAGE_TARNAME "ReactOS" /* Define to the version of this package. */ -#define PACKAGE_VERSION KERNEL_VERSION_STR +#define PACKAGE_VERSION "" /* Define to the full name and version of this package. */ #define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION diff --git a/include/host/nls.h b/include/host/nls.h index d9f79136c74..46ccd23cccc 100644 --- a/include/host/nls.h +++ b/include/host/nls.h @@ -9,7 +9,7 @@ #ifndef _HOST_NLS_H #define _HOST_NLS_H -#include +#include typedef DWORD LCID; diff --git a/include/host/typedefs.h b/include/host/typedefs.h index 07146c48220..6bbe25f8633 100644 --- a/include/host/typedefs.h +++ b/include/host/typedefs.h @@ -70,7 +70,7 @@ typedef WORD LANGID; #define MAXUSHORT USHRT_MAX /* Widely used structures */ -#include +#include typedef struct _RTL_BITMAP { ULONG SizeOfBitMap; @@ -112,7 +112,7 @@ typedef struct _UNICODE_STRING USHORT MaximumLength; PWSTR Buffer; } UNICODE_STRING, *PUNICODE_STRING; -#include +#include /* List Functions */ static __inline @@ -170,7 +170,7 @@ RemoveEntryList( { PLIST_ENTRY OldFlink; PLIST_ENTRY OldBlink; - + OldFlink = Entry->Flink; OldBlink = Entry->Blink; OldFlink->Blink = OldBlink; @@ -185,7 +185,7 @@ RemoveHeadList( { PLIST_ENTRY Flink; PLIST_ENTRY Entry; - + Entry = ListHead->Flink; Flink = Entry->Flink; ListHead->Flink = Flink; @@ -200,7 +200,7 @@ RemoveTailList( { PLIST_ENTRY Blink; PLIST_ENTRY Entry; - + Entry = ListHead->Blink; Blink = Entry->Blink; ListHead->Blink = Blink; diff --git a/include/host/wcsfuncs.h b/include/host/wcsfuncs.h deleted file mode 100644 index c07679aa34a..00000000000 --- a/include/host/wcsfuncs.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - PROJECT: ReactOS - LICENSE: GPL v2 or any later version - FILE: include/host/wcsfuncs.h - PURPOSE: Header for the "host_wcsfuncs" static library - COPYRIGHT: Copyright 2008 Colin Finck -*/ - -#ifndef _HOST_WCSFUNCS_H -#define _HOST_WCSFUNCS_H - -#ifdef USE_HOST_WCSFUNCS - /* Function prototypes */ - -#else - /* Map str*W functions to wcs* function */ - - #define isspaceW iswspace - #define strchrW wcschr - #define strcmpiW _wcsicmp - #define strcpyW wcscpy - #define strlenW wcslen - #define strncmpW wcsncmp - #define strtolW wcstol - #define strtoulW wcstoul - -#endif - -#endif diff --git a/include/host/wine/unicode.h b/include/host/wine/unicode.h new file mode 100644 index 00000000000..f553f64a444 --- /dev/null +++ b/include/host/wine/unicode.h @@ -0,0 +1,325 @@ +/* + * Wine internal Unicode definitions + * + * Copyright 2000 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINE_UNICODE_H +#define __WINE_WINE_UNICODE_H + +#include +#include +#include + +// Definitions copied from +// We only want to include host headers, so we define them manually +#define C1_UPPER 1 +#define C1_LOWER 2 +#define C1_DIGIT 4 +#define C1_SPACE 8 +#define C1_PUNCT 16 +#define C1_CNTRL 32 +#define C1_BLANK 64 +#define C1_XDIGIT 128 +#define C1_ALPHA 256 +#define MB_COMPOSITE 2 +#define MB_ERR_INVALID_CHARS 8 +#define MB_USEGLYPHCHARS 0x04 +#define WC_COMPOSITECHECK 512 +#define WC_DISCARDNS 16 +#define WC_DEFAULTCHAR 64 +#define WC_NO_BEST_FIT_CHARS 1024 +#define WC_ERR_INVALID_CHARS 0x0080 + +#ifdef __WINE_WINE_TEST_H +#error This file should not be used in Wine tests +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef WINE_UNICODE_API +#define WINE_UNICODE_API +#endif + +#ifndef WINE_UNICODE_INLINE +#define WINE_UNICODE_INLINE static inline +#endif + +/* code page info common to SBCS and DBCS */ +struct cp_info +{ + unsigned int codepage; /* codepage id */ + unsigned int char_size; /* char size (1 or 2 bytes) */ + WCHAR def_char; /* default char value (can be double-byte) */ + WCHAR def_unicode_char; /* default Unicode char value */ + const char *name; /* code page name */ +}; + +struct sbcs_table +{ + struct cp_info info; + const WCHAR *cp2uni; /* code page -> Unicode map */ + const WCHAR *cp2uni_glyphs; /* code page -> Unicode map with glyph chars */ + const unsigned char *uni2cp_low; /* Unicode -> code page map */ + const unsigned short *uni2cp_high; +}; + +struct dbcs_table +{ + struct cp_info info; + const WCHAR *cp2uni; /* code page -> Unicode map */ + const unsigned char *cp2uni_leadbytes; + const unsigned short *uni2cp_low; /* Unicode -> code page map */ + const unsigned short *uni2cp_high; + unsigned char lead_bytes[12]; /* lead bytes ranges */ +}; + +union cptable +{ + struct cp_info info; + struct sbcs_table sbcs; + struct dbcs_table dbcs; +}; + +extern const union cptable *wine_cp_get_table( unsigned int codepage ); +extern const union cptable *wine_cp_enum_table( unsigned int index ); + +extern int wine_cp_mbstowcs( const union cptable *table, int flags, + const char *src, int srclen, + WCHAR *dst, int dstlen ); +extern int wine_cp_wcstombs( const union cptable *table, int flags, + const WCHAR *src, int srclen, + char *dst, int dstlen, const char *defchar, int *used ); +extern int wine_cpsymbol_mbstowcs( const char *src, int srclen, WCHAR *dst, int dstlen ); +extern int wine_cpsymbol_wcstombs( const WCHAR *src, int srclen, char *dst, int dstlen ); +extern int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int dstlen ); +extern int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int dstlen ); + +extern int wine_compare_string( int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2 ); +extern int wine_get_sortkey( int flags, const WCHAR *src, int srclen, char *dst, int dstlen ); +extern int wine_fold_string( int flags, const WCHAR *src, int srclen , WCHAR *dst, int dstlen ); + +extern int strcmpiW( const WCHAR *str1, const WCHAR *str2 ); +extern int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ); +extern int memicmpW( const WCHAR *str1, const WCHAR *str2, int n ); +extern WCHAR *strstrW( const WCHAR *str, const WCHAR *sub ); +extern long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base ); +extern unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base ); +extern int sprintfW( WCHAR *str, const WCHAR *format, ... ); +extern int snprintfW( WCHAR *str, size_t len, const WCHAR *format, ... ); +extern int vsprintfW( WCHAR *str, const WCHAR *format, va_list valist ); +extern int vsnprintfW( WCHAR *str, size_t len, const WCHAR *format, va_list valist ); + +WINE_UNICODE_INLINE int wine_is_dbcs_leadbyte( const union cptable *table, unsigned char ch ) +{ + return (table->info.char_size == 2) && (table->dbcs.cp2uni_leadbytes[ch]); +} + +WINE_UNICODE_INLINE WCHAR tolowerW( WCHAR ch ) +{ + extern WINE_UNICODE_API const WCHAR wine_casemap_lower[]; + return ch + wine_casemap_lower[wine_casemap_lower[ch >> 8] + (ch & 0xff)]; +} + +WINE_UNICODE_INLINE WCHAR toupperW( WCHAR ch ) +{ + extern WINE_UNICODE_API const WCHAR wine_casemap_upper[]; + return ch + wine_casemap_upper[wine_casemap_upper[ch >> 8] + (ch & 0xff)]; +} + +/* the character type contains the C1_* flags in the low 12 bits */ +/* and the C2_* type in the high 4 bits */ +WINE_UNICODE_INLINE unsigned short get_char_typeW( WCHAR ch ) +{ + extern WINE_UNICODE_API const unsigned short wine_wctype_table[]; + return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)]; +} + +WINE_UNICODE_INLINE int iscntrlW( WCHAR wc ) +{ + return get_char_typeW(wc) & C1_CNTRL; +} + +WINE_UNICODE_INLINE int ispunctW( WCHAR wc ) +{ + return get_char_typeW(wc) & C1_PUNCT; +} + +WINE_UNICODE_INLINE int isspaceW( WCHAR wc ) +{ + return get_char_typeW(wc) & C1_SPACE; +} + +WINE_UNICODE_INLINE int isdigitW( WCHAR wc ) +{ + return get_char_typeW(wc) & C1_DIGIT; +} + +WINE_UNICODE_INLINE int isxdigitW( WCHAR wc ) +{ + return get_char_typeW(wc) & C1_XDIGIT; +} + +WINE_UNICODE_INLINE int islowerW( WCHAR wc ) +{ + return get_char_typeW(wc) & C1_LOWER; +} + +WINE_UNICODE_INLINE int isupperW( WCHAR wc ) +{ + return get_char_typeW(wc) & C1_UPPER; +} + +WINE_UNICODE_INLINE int isalnumW( WCHAR wc ) +{ + return get_char_typeW(wc) & (C1_ALPHA|C1_DIGIT|C1_LOWER|C1_UPPER); +} + +WINE_UNICODE_INLINE int isalphaW( WCHAR wc ) +{ + return get_char_typeW(wc) & (C1_ALPHA|C1_LOWER|C1_UPPER); +} + +WINE_UNICODE_INLINE int isgraphW( WCHAR wc ) +{ + return get_char_typeW(wc) & (C1_ALPHA|C1_PUNCT|C1_DIGIT|C1_LOWER|C1_UPPER); +} + +WINE_UNICODE_INLINE int isprintW( WCHAR wc ) +{ + return get_char_typeW(wc) & (C1_ALPHA|C1_BLANK|C1_PUNCT|C1_DIGIT|C1_LOWER|C1_UPPER); +} + +/* some useful string manipulation routines */ + +WINE_UNICODE_INLINE unsigned int strlenW( const WCHAR *str ) +{ + const WCHAR *s = str; + while (*s) s++; + return (unsigned int)(s - str); +} + +WINE_UNICODE_INLINE WCHAR *strcpyW( WCHAR *dst, const WCHAR *src ) +{ + WCHAR *p = dst; + while ((*p++ = *src++)); + return dst; +} + +/* strncpy doesn't do what you think, don't use it */ +#define strncpyW(d,s,n) error do_not_use_strncpyW_use_lstrcpynW_or_memcpy_instead + +WINE_UNICODE_INLINE int strcmpW( const WCHAR *str1, const WCHAR *str2 ) +{ + while (*str1 && (*str1 == *str2)) { str1++; str2++; } + return *str1 - *str2; +} + +WINE_UNICODE_INLINE int strncmpW( const WCHAR *str1, const WCHAR *str2, int n ) +{ + if (n <= 0) return 0; + while ((--n > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; } + return *str1 - *str2; +} + +WINE_UNICODE_INLINE WCHAR *strcatW( WCHAR *dst, const WCHAR *src ) +{ + strcpyW( dst + strlenW(dst), src ); + return dst; +} + +WINE_UNICODE_INLINE WCHAR *strchrW( const WCHAR *str, WCHAR ch ) +{ + do { if (*str == ch) return (WCHAR *)(ULONG_PTR)str; } while (*str++); + return NULL; +} + +WINE_UNICODE_INLINE WCHAR *strrchrW( const WCHAR *str, WCHAR ch ) +{ + WCHAR *ret = NULL; + do { if (*str == ch) ret = (WCHAR *)(ULONG_PTR)str; } while (*str++); + return ret; +} + +WINE_UNICODE_INLINE WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept ) +{ + for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)(ULONG_PTR)str; + return NULL; +} + +WINE_UNICODE_INLINE size_t strspnW( const WCHAR *str, const WCHAR *accept ) +{ + const WCHAR *ptr; + for (ptr = str; *ptr; ptr++) if (!strchrW( accept, *ptr )) break; + return ptr - str; +} + +WINE_UNICODE_INLINE size_t strcspnW( const WCHAR *str, const WCHAR *reject ) +{ + const WCHAR *ptr; + for (ptr = str; *ptr; ptr++) if (strchrW( reject, *ptr )) break; + return ptr - str; +} + +WINE_UNICODE_INLINE WCHAR *strlwrW( WCHAR *str ) +{ + WCHAR *ret = str; + while ((*str = tolowerW(*str))) str++; + return ret; +} + +WINE_UNICODE_INLINE WCHAR *struprW( WCHAR *str ) +{ + WCHAR *ret = str; + while ((*str = toupperW(*str))) str++; + return ret; +} + +WINE_UNICODE_INLINE WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n ) +{ + const WCHAR *end; + for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) return (WCHAR *)(ULONG_PTR)ptr; + return NULL; +} + +WINE_UNICODE_INLINE WCHAR *memrchrW( const WCHAR *ptr, WCHAR ch, size_t n ) +{ + const WCHAR *end; + WCHAR *ret = NULL; + for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) ret = (WCHAR *)(ULONG_PTR)ptr; + return ret; +} + +WINE_UNICODE_INLINE long int atolW( const WCHAR *str ) +{ + return strtolW( str, (WCHAR **)0, 10 ); +} + +WINE_UNICODE_INLINE int atoiW( const WCHAR *str ) +{ + return (int)atolW( str ); +} + +#undef WINE_UNICODE_INLINE + +#ifdef __cplusplus +} +#endif + +#endif /* __WINE_WINE_UNICODE_H */ diff --git a/include/ndk/amd64/ketypes.h b/include/ndk/amd64/ketypes.h index 9a9ee6f39cc..06f9f70fd73 100644 --- a/include/ndk/amd64/ketypes.h +++ b/include/ndk/amd64/ketypes.h @@ -945,6 +945,7 @@ typedef struct _KSWITCH_FRAME ULONG64 Return; } KSWITCH_FRAME, *PKSWITCH_FRAME; +#if 0 typedef struct _KTIMER_TABLE_ENTRY { ULONG_PTR Lock; @@ -957,6 +958,7 @@ typedef struct _KTIMER_TABLE KTIMER* TimerExpiry[64]; KTIMER_TABLE_ENTRY TimerEntries[256]; } KTIMER_TABLE, *PKTIMER_TABLE; +#endif // // Inline function to get current KPRCB diff --git a/include/ndk/cmtypes.h b/include/ndk/cmtypes.h index 36840f6a140..cff31f86f6b 100644 --- a/include/ndk/cmtypes.h +++ b/include/ndk/cmtypes.h @@ -110,6 +110,12 @@ typedef enum _CM_SHARE_DISPOSITION #define CM_RESOURCE_DMA_TYPE_B 0x0020 #define CM_RESOURCE_DMA_TYPE_F 0x0040 +// +// Interrupt Resource Descriptor Flags +// +#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000 +#define CM_RESOURCE_INTERRUPT_LATCHED 0x0001 + // // NtInitializeRegistry Flags // diff --git a/include/ndk/mmtypes.h b/include/ndk/mmtypes.h index f7c553446db..1c1f4409706 100644 --- a/include/ndk/mmtypes.h +++ b/include/ndk/mmtypes.h @@ -342,7 +342,7 @@ typedef struct _MMPTE { union { - ULONG Long; + ULONG_PTR Long; HARDWARE_PTE Flush; MMPTE_HARDWARE Hard; MMPTE_PROTOTYPE Proto; @@ -704,7 +704,7 @@ typedef struct _MMVAD // // Long VAD used in section and private allocations // -typedef struct _MMVAD_LONG +typedef struct _MMVAD_LONG { union { diff --git a/include/psdk/CMakeLists.txt b/include/psdk/CMakeLists.txt index 199c00a94aa..668f03c51e5 100644 --- a/include/psdk/CMakeLists.txt +++ b/include/psdk/CMakeLists.txt @@ -1,4 +1,8 @@ +add_definitions(-D_MIDL_USE_GUIDDEF_) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + list(APPEND SOURCE # access.idl activaut.idl @@ -113,3 +117,6 @@ add_idl_headers(psdk ${SOURCE}) add_typelib(stdole2 stdole2.idl) add_iid_library(wuguid wuapi.idl) +add_iid_library(xml_uuids msxml2.idl) + +generate_idl_iids(wincodec.idl) diff --git a/include/psdk/basetsd.h b/include/psdk/basetsd.h index a1130e09647..62b9e9943e4 100644 --- a/include/psdk/basetsd.h +++ b/include/psdk/basetsd.h @@ -77,10 +77,18 @@ #if defined(_WIN64) #define __int3264 __int64 +typedef __int64 SHANDLE_PTR; +typedef unsigned __int64 HANDLE_PTR; +typedef unsigned int UHALF_PTR, *PUHALF_PTR; +typedef int HALF_PTR, *PHALF_PTR; #define ADDRESS_TAG_BIT 0x40000000000UI64 #else /* !_WIN64 */ #define __int3264 __int32 #define ADDRESS_TAG_BIT 0x80000000UL +typedef unsigned short UHALF_PTR, *PUHALF_PTR; +typedef short HALF_PTR, *PHALF_PTR; +typedef long SHANDLE_PTR; +typedef unsigned long HANDLE_PTR; #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) ) #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) ) #define ULongToHandle( h) ((HANDLE)(ULONG_PTR) (h)) @@ -134,9 +142,6 @@ typedef __int64 INT_PTR, *PINT_PTR; typedef unsigned __int64 UINT_PTR, *PUINT_PTR; typedef __int64 LONG_PTR, *PLONG_PTR; typedef unsigned __int64 ULONG_PTR, *PULONG_PTR; -typedef unsigned __int64 HANDLE_PTR; -typedef unsigned int UHALF_PTR, *PUHALF_PTR; -typedef int HALF_PTR, *PHALF_PTR; #if !defined(__midl) && !defined(__WIDL__) static inline unsigned long HandleToUlong(const void* h ) @@ -183,14 +188,6 @@ typedef unsigned long UINT_PTR, *PUINT_PTR; typedef unsigned long ULONG_PTR, *PULONG_PTR; #endif -typedef unsigned short UHALF_PTR, *PUHALF_PTR; -typedef short HALF_PTR, *PHALF_PTR; - -#ifndef HANDLE_PTR_DEFINED -#define HANDLE_PTR_DEFINED - typedef unsigned long HANDLE_PTR; -#endif - #endif /* !_WIN64 */ typedef ULONG_PTR SIZE_T, *PSIZE_T; diff --git a/include/psdk/exdisp.idl b/include/psdk/exdisp.idl index 54dd1df9961..9343ee9b37c 100644 --- a/include/psdk/exdisp.idl +++ b/include/psdk/exdisp.idl @@ -224,7 +224,7 @@ interface IWebBrowserApp : IWebBrowser [id(302)] HRESULT PutProperty([in] BSTR Property, [in] VARIANT vtValue); [id(303)] HRESULT GetProperty([in] BSTR Property, [out, retval] VARIANT *pvtValue); [id(0), propget] HRESULT Name([out, retval] BSTR* Name); - [id(DISPID_HWND), propget] HRESULT HWND([out, retval] long *pHWND); + [id(DISPID_HWND), propget] HRESULT HWND([out, retval] SHANDLE_PTR *pHWND); [id(400), propget] HRESULT FullName([out, retval] BSTR* FullName); [id(401), propget] HRESULT Path([out, retval] BSTR* Path); [id(402), propget] HRESULT Visible([out, retval] VARIANT_BOOL* pBool); diff --git a/include/psdk/msxml2.idl b/include/psdk/msxml2.idl index d91ba4761a7..ee145aaabc2 100644 --- a/include/psdk/msxml2.idl +++ b/include/psdk/msxml2.idl @@ -107,9 +107,9 @@ interface ISchemaNotation; cpp_quote("#define DOMDocument DOMDocument2") cpp_quote("#define CLSID_DOMDocument CLSID_DOMDocument2") -cpp_quote("#ifndef __WIDL_XMLDOM_H") -typedef enum tagDOMNodeType -{ +cpp_quote("#if !defined(__WIDL_XMLDOM_H) && !defined(__xmldom_h__)") +typedef enum tagDOMNodeType +{ NODE_INVALID = 0, NODE_ELEMENT = 1, NODE_ATTRIBUTE = 2, diff --git a/include/psdk/msxml6.idl b/include/psdk/msxml6.idl index 45cef98825f..e045cd8cccc 100644 --- a/include/psdk/msxml6.idl +++ b/include/psdk/msxml6.idl @@ -113,7 +113,7 @@ interface ISchemaNotation; cpp_quote("#define DOMDocument DOMDocument2") cpp_quote("#define CLSID_DOMDocument CLSID_DOMDocument2") -cpp_quote("#ifndef __WIDL_XMLDOM_H") +cpp_quote("#if !defined(__WIDL_XMLDOM_H) && !defined(__xmldom_h__)") typedef enum tagDOMNodeType { NODE_INVALID = 0, diff --git a/include/psdk/setupapi.h b/include/psdk/setupapi.h index 066d78d477e..e8bec8c3e43 100644 --- a/include/psdk/setupapi.h +++ b/include/psdk/setupapi.h @@ -522,8 +522,13 @@ extern "C" { #define SPDRP_EXCLUSIVE 26 #define SPDRP_CHARACTERISTICS 27 #define SPDRP_ADDRESS 28 -#define SPDRP_UI_NUMBER_DESC_FORMAT 30 -#define SPDRP_MAXIMUM_PROPERTY 31 +#define SPDRP_UI_NUMBER_DESC_FORMAT 29 +#define SPDRP_DEVICE_POWER_DATA 30 +#define SPDRP_REMOVAL_POLICY 31 +#define SPDRP_REMOVAL_POLICY_HW_DEFAULT 32 +#define SPDRP_REMOVAL_POLICY_OVERRIDE 33 +#define SPDRP_INSTALL_STATE 34 +#define SPDRP_MAXIMUM_PROPERTY 35 #define SPDSL_IGNORE_DISK 1 #define SPDSL_DISALLOW_NEGATIVE_ADJUST 2 diff --git a/include/psdk/urlmon.idl b/include/psdk/urlmon.idl index d2a46a08cc2..2ea4063a7d9 100644 --- a/include/psdk/urlmon.idl +++ b/include/psdk/urlmon.idl @@ -1511,13 +1511,27 @@ typedef enum _tagINTERNETFEATURELIST FEATURE_DISABLE_TELNET_PROTOCOL, FEATURE_FEEDS, FEATURE_BLOCK_INPUT_PROMPTS, - FEATURE_DOMSTORAGE, - FEATURE_XDOMAINREQUEST, - FEATURE_DATAURI, - FEATURE_AJAX_CONNECTIONSERVICES, FEATURE_ENTRY_COUNT } INTERNETFEATURELIST; +cpp_quote("#define SET_FEATURE_ON_THREAD 0x00000001") +cpp_quote("#define SET_FEATURE_ON_PROCESS 0x00000002") +cpp_quote("#define SET_FEATURE_IN_REGISTRY 0x00000004") +cpp_quote("#define SET_FEATURE_ON_THREAD_LOCALMACHINE 0x00000008") +cpp_quote("#define SET_FEATURE_ON_THREAD_INTRANET 0x00000010") +cpp_quote("#define SET_FEATURE_ON_THREAD_TRUSTED 0x00000020") +cpp_quote("#define SET_FEATURE_ON_THREAD_INTERNET 0x00000040") +cpp_quote("#define SET_FEATURE_ON_THREAD_RESTRICTED 0x00000080") + +cpp_quote("#define GET_FEATURE_FROM_THREAD 0x00000001") +cpp_quote("#define GET_FEATURE_FROM_PROCESS 0x00000002") +cpp_quote("#define GET_FEATURE_FROM_REGISTRY 0x00000004") +cpp_quote("#define GET_FEATURE_FROM_THREAD_LOCALMACHINE 0x00000008") +cpp_quote("#define GET_FEATURE_FROM_THREAD_INTRANET 0x00000010") +cpp_quote("#define GET_FEATURE_FROM_THREAD_TRUSTED 0x00000020") +cpp_quote("#define GET_FEATURE_FROM_THREAD_INTERNET 0x00000040") +cpp_quote("#define GET_FEATURE_FROM_THREAD_RESTRICTED 0x00000080") + typedef struct _tagPROTOCOLFILTERDATA { DWORD cbSize; IInternetProtocolSink *pProtocolSink; @@ -1839,16 +1853,16 @@ cpp_quote("HRESULT WINAPI CreateIUriBuilder(IUri*,DWORD,DWORD_PTR,IUriBuilder**) ] interface IUriBuilderFactory : IUnknown { - HRESULT CreateInitializedIUriBuilder( - [in] DWORD dwFlags, - [in] DWORD_PTR dwReserved, - [out] IUriBuilder **ppIUriBuilder); - HRESULT CreateIUriBuilder( [in] DWORD dwFlags, [in] DWORD_PTR dwReserved, [out] IUriBuilder **ppIUriBuilder); -}; + + HRESULT CreateInitializedIUriBuilder( + [in] DWORD dwFlags, + [in] DWORD_PTR dwReserved, + [out] IUriBuilder **ppIUriBuilder); +} /***************************************************************************** * IInternetProtocolEx interface @@ -1964,6 +1978,7 @@ cpp_quote("HRESULT WINAPI CoInternetParseIUri(IUri*,PARSEACTION,DWORD,LPWSTR,DWO cpp_quote("HRESULT WINAPI CoInternetQueryInfo(LPCWSTR,QUERYOPTION,DWORD,LPVOID,DWORD,DWORD*,DWORD);") cpp_quote("HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST,DWORD,BOOL);") cpp_quote("HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR,LPWSTR*,PSUACTION,DWORD);") +cpp_quote("HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri*,IUri**,PSUACTION,DWORD_PTR);") cpp_quote("HRESULT WINAPI CreateFormatEnumerator(UINT,FORMATETC*,IEnumFORMATETC**);") cpp_quote("HRESULT WINAPI GetSoftwareUpdateInfo( LPCWSTR szDistUnit, LPSOFTDISTINFO psdi);") cpp_quote("HRESULT WINAPI FaultInIEFeature(HWND,uCLSSPEC*,QUERYCONTEXT*,DWORD);") diff --git a/include/psdk/windows.h b/include/psdk/windows.h index 569b693abf8..323964cd918 100644 --- a/include/psdk/windows.h +++ b/include/psdk/windows.h @@ -52,21 +52,11 @@ #include #include #include -#ifndef _WINNLS_H #include -#endif -#ifndef _WINVER_H #include -#endif -#ifndef _WINNETWK_H #include -#endif -#ifndef _WINREG_H #include -#endif -#ifndef _WINSVC_H #include -#endif #ifndef WIN32_LEAN_AND_MEAN #include diff --git a/include/psdk/winhttp.h b/include/psdk/winhttp.h index 17fc38a8f02..68bec0a433d 100644 --- a/include/psdk/winhttp.h +++ b/include/psdk/winhttp.h @@ -429,6 +429,11 @@ typedef int INTERNET_SCHEME, *LPINTERNET_SCHEME; #define WINHTTP_CALLBACK_STATUS_FLAG_CERT_WRONG_USAGE 0x00000040 #define WINHTTP_CALLBACK_STATUS_FLAG_SECURITY_CHANNEL_ERROR 0x80000000 +#define WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 0x00000008 +#define WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 0x00000020 +#define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 0x00000080 +#define WINHTTP_FLAG_SECURE_PROTOCOL_ALL (WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 | WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1) + #define WINHTTP_AUTH_SCHEME_BASIC 0x00000001 #define WINHTTP_AUTH_SCHEME_NTLM 0x00000002 #define WINHTTP_AUTH_SCHEME_PASSPORT 0x00000004 diff --git a/include/psdk/wininet.h b/include/psdk/wininet.h index a0ec4082d12..ce09821218a 100644 --- a/include/psdk/wininet.h +++ b/include/psdk/wininet.h @@ -591,9 +591,13 @@ BOOLAPI InternetUnlockRequestFile(HANDLE); #define INTERNET_OPTION_CODEPAGE_PATH 100 #define INTERNET_OPTION_CODEPAGE_EXTRA 101 #define INTERNET_OPTION_IDN 102 +#define INTERNET_OPTION_MAX_CONNS_PER_PROXY 103 +#define INTERNET_OPTION_SUPPRESS_SERVER_AUTH 104 +#define INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT 105 + #define INTERNET_FIRST_OPTION INTERNET_OPTION_CALLBACK -#define INTERNET_LAST_OPTION INTERNET_OPTION_DATAFILE_EXT +#define INTERNET_LAST_OPTION INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT #define INTERNET_PRIORITY_FOREGROUND 1000 #define INTERNET_HANDLE_TYPE_INTERNET 1 @@ -1442,6 +1446,7 @@ INTERNETAPI DWORD WINAPI PrivacyGetZonePreferenceW(DWORD,DWORD,LPDWORD,LPWSTR,LP #define ERROR_INTERNET_RETRY_DIALOG (INTERNET_ERROR_BASE + 50) #define ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR (INTERNET_ERROR_BASE + 52) #define ERROR_INTERNET_INSERT_CDROM (INTERNET_ERROR_BASE + 53) +#define ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED (INTERNET_ERROR_BASE + 54) #define ERROR_INTERNET_SEC_CERT_ERRORS (INTERNET_ERROR_BASE + 55) #define ERROR_INTERNET_SEC_CERT_NO_REV (INTERNET_ERROR_BASE + 56) #define ERROR_INTERNET_SEC_CERT_REV_FAILED (INTERNET_ERROR_BASE + 57) @@ -1655,6 +1660,16 @@ BOOLAPI DeleteUrlCacheEntryA(LPCSTR); BOOLAPI DeleteUrlCacheEntryW(LPCWSTR); #define DeleteUrlCacheEntry WINELIB_NAME_AW(DeleteUrlCacheEntry) +/* FCS_ flags and FreeUrlCacheSpace are no longer documented */ +#define FCS_PERCENT_CACHE_SPACE 0 /* guessed value */ +#define FCS_PERCENT_DISK_SPACE 1 /* guessed value */ +#define FCS_ABSOLUTE_SIZE 2 /* guessed value */ + +BOOLAPI FreeUrlCacheSpaceA(LPCSTR ,DWORD ,DWORD); +BOOLAPI FreeUrlCacheSpaceW(LPCWSTR ,DWORD ,DWORD); +#define FreeUrlCacheSpace WINELIB_NAME_AW(FreeUrlCacheSpace) + + INTERNETAPI DWORD WINAPI InternetDialA(HWND ,LPSTR ,DWORD ,DWORD_PTR* ,DWORD); INTERNETAPI DWORD WINAPI InternetDialW(HWND ,LPWSTR ,DWORD ,DWORD_PTR* ,DWORD); #define InternetDial WINELIB_NAME_AW(InternetDial) diff --git a/include/psdk/winineti.h b/include/psdk/winineti.h index 27efa50a42b..6419204ecca 100644 --- a/include/psdk/winineti.h +++ b/include/psdk/winineti.h @@ -46,15 +46,15 @@ typedef struct _INTERNET_CACHE_CONFIG_INFOA BOOL fPerUser; DWORD dwSyncMode; DWORD dwNumCachePaths; - union + __C89_NAMELESS union { - struct + __C89_NAMELESS struct { CHAR CachePath[MAX_PATH]; DWORD dwCacheSize; - } DUMMYSTRUCTNAME; + } __C89_NAMELESSSTRUCTNAME; INTERNET_CACHE_CONFIG_PATH_ENTRYA CachePaths[ANYSIZE_ARRAY]; - } DUMYUNIONNAME; + } __C89_NAMELESSUNIONNAME; DWORD dwNormalUsage; DWORD dwExemptUsage; } INTERNET_CACHE_CONFIG_INFOA, *LPINTERNET_CACHE_CONFIG_INFOA; @@ -68,15 +68,15 @@ typedef struct _INTERNET_CACHE_CONFIG_INFOW BOOL fPerUser; DWORD dwSyncMode; DWORD dwNumCachePaths; - union + __C89_NAMELESS union { - struct + __C89_NAMELESS struct { WCHAR CachePath[MAX_PATH]; DWORD dwCacheSize; - } DUMMYSTRUCTNAME; + } __C89_NAMELESSSTRUCTNAME; INTERNET_CACHE_CONFIG_PATH_ENTRYW CachePaths[ANYSIZE_ARRAY]; - } ; + } __C89_NAMELESSUNIONNAME; DWORD dwNormalUsage; DWORD dwExemptUsage; } INTERNET_CACHE_CONFIG_INFOW, *LPINTERNET_CACHE_CONFIG_INFOW; @@ -84,6 +84,26 @@ typedef struct _INTERNET_CACHE_CONFIG_INFOW DECL_WINELIB_TYPE_AW(INTERNET_CACHE_CONFIG_INFO) DECL_WINELIB_TYPE_AW(LPINTERNET_CACHE_CONFIG_INFO) +typedef enum { + WININET_SYNC_MODE_NEVER = 0, + WININET_SYNC_MODE_ON_EXPIRY, + WININET_SYNC_MODE_ONCE_PER_SESSION, + WININET_SYNC_MODE_ALWAYS, + WININET_SYNC_MODE_AUTOMATIC, + WININET_SYNC_MODE_DEFAULT = WININET_SYNC_MODE_AUTOMATIC +} WININET_SYNC_MODE; + +/* Flags for GetUrlCacheConfigInfoA/W and SetUrlCacheConfigInfoA/W */ +#define CACHE_CONFIG_FORCE_CLEANUP_FC 0x00000020 +#define CACHE_CONFIG_DISK_CACHE_PATHS_FC 0x00000040 +#define CACHE_CONFIG_SYNC_MODE_FC 0x00000080 +#define CACHE_CONFIG_CONTENT_PATHS_FC 0x00000100 +#define CACHE_CONFIG_COOKIES_PATHS_FC 0x00000200 +#define CACHE_CONFIG_HISTORY_PATHS_FC 0x00000400 +#define CACHE_CONFIG_QUOTA_FC 0x00000800 +#define CACHE_CONFIG_USER_MODE_FC 0x00001000 +#define CACHE_CONFIG_CONTENT_USAGE_FC 0x00002000 +#define CACHE_CONFIG_STICKY_CONTENT_USAGE_FC 0x00004000 #ifdef __cplusplus extern "C" { diff --git a/include/psdk/winnetwk.h b/include/psdk/winnetwk.h index c391472adce..d489da8b01a 100644 --- a/include/psdk/winnetwk.h +++ b/include/psdk/winnetwk.h @@ -1,5 +1,5 @@ -#ifndef _WINNETWK_H -#define _WINNETWK_H +#ifndef _WINNETWK_ +#define _WINNETWK_ #ifdef __cplusplus extern "C" { diff --git a/include/psdk/winnls.h b/include/psdk/winnls.h index 2bb65024bb8..42822203bd9 100644 --- a/include/psdk/winnls.h +++ b/include/psdk/winnls.h @@ -1,5 +1,5 @@ -#ifndef _WINNLS_H -#define _WINNLS_H +#ifndef _WINNLS_ +#define _WINNLS_ #ifdef __cplusplus extern "C" { @@ -132,6 +132,9 @@ extern "C" { #define LOCALE_SYSTEM_DEFAULT 0x800 #define LOCALE_USER_DEFAULT 0x400 +#define LOCALE_IREADINGLAYOUT 0x0070 +#define LOCALE_INEUTRAL 0x0071 + #define LOCALE_IDEFAULTUNIXCODEPAGE 0x1030 /* Wine extension */ #define NORM_IGNORECASE 1 diff --git a/include/psdk/winreg.h b/include/psdk/winreg.h index 32f9ceb101f..92999ca7e4c 100644 --- a/include/psdk/winreg.h +++ b/include/psdk/winreg.h @@ -1,5 +1,5 @@ -#ifndef _WINREG_H -#define _WINREG_H +#ifndef _WINREG_ +#define _WINREG_ #ifdef __cplusplus extern "C" { diff --git a/include/psdk/winsvc.h b/include/psdk/winsvc.h index 389f951f54c..8a66503beee 100644 --- a/include/psdk/winsvc.h +++ b/include/psdk/winsvc.h @@ -1,5 +1,5 @@ -#ifndef _WINSVC_H -#define _WINSVC_H +#ifndef _WINSVC_ +#define _WINSVC_ #ifdef __cplusplus extern "C" { diff --git a/include/psdk/winuser.h b/include/psdk/winuser.h index 4cebd7a2c34..15ee3b0a678 100644 --- a/include/psdk/winuser.h +++ b/include/psdk/winuser.h @@ -577,8 +577,8 @@ extern "C" { #define SB_BOTTOM 7 #define SB_TOP 6 #define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0) -#define MAKEINTRESOURCEA(i) (LPSTR)((ULONG_PTR)((WORD)(i))) -#define MAKEINTRESOURCEW(i) (LPWSTR)((ULONG_PTR)((WORD)(i))) +#define MAKEINTRESOURCEA(i) ((LPSTR)(ULONG_PTR)LOWORD(i)) +#define MAKEINTRESOURCEW(i) ((LPWSTR)(ULONG_PTR)LOWORD(i)) #ifndef XFree86Server # define RT_CURSOR MAKEINTRESOURCE(1) # define RT_FONT MAKEINTRESOURCE(8) diff --git a/include/psdk/winver.h b/include/psdk/winver.h index af93d6ebbb8..56b9fa8c8f3 100644 --- a/include/psdk/winver.h +++ b/include/psdk/winver.h @@ -1,5 +1,5 @@ -#ifndef _WINVER_H -#define _WINVER_H +#ifndef VER_H +#define VER_H #ifdef __cplusplus extern "C" { diff --git a/include/reactos/idl/pnp.idl b/include/reactos/idl/pnp.idl index b776e6d4a78..074d7539a7f 100644 --- a/include/reactos/idl/pnp.idl +++ b/include/reactos/idl/pnp.idl @@ -467,7 +467,7 @@ interface pnp /* Function 27 */ DWORD PNP_SetClassRegProp( [in] handle_t hBinding, - [in, string, ref] LPWSTR *pszClassGuid, + [in, string, ref] LPWSTR pszClassGuid, [in] DWORD ulProperty, [in] DWORD ulDataType, [in, size_is(ulLength)] BYTE *Buffer, diff --git a/include/reactos/ks386.inc b/include/reactos/ks386.inc index a4272847a9f..f3791133cca 100644 --- a/include/reactos/ks386.inc +++ b/include/reactos/ks386.inc @@ -456,6 +456,7 @@ TeInstrumentation = 0xf2c TeGdiBatchCount = 0xf70 TeGuaranteedStackBytes = 0xf78 TeFlsData = 0xfb4 +TeSafeThunkCall = 0xfb8 ThreadEnvironmentBlockLength = 0xfbc /* TIME_FIELDS */ diff --git a/include/reactos/libs/libjpeg/jmorecfg.h b/include/reactos/libs/libjpeg/jmorecfg.h index ce741f84c6e..b543a04fd55 100644 --- a/include/reactos/libs/libjpeg/jmorecfg.h +++ b/include/reactos/libs/libjpeg/jmorecfg.h @@ -23,10 +23,6 @@ #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ -#if (defined (_MSC_VER) && (_MSC_VER >= 800)) -#define HAVE_UNSIGNED_CHAR -#define EXTERN(type) extern type __cdecl -#endif /* * Maximum number of components (color channels) allowed in JPEG image. diff --git a/include/reactos/libs/libjpeg/jpeglib.h b/include/reactos/libs/libjpeg/jpeglib.h index 5039d4bf4c4..1eb1fac033f 100644 --- a/include/reactos/libs/libjpeg/jpeglib.h +++ b/include/reactos/libs/libjpeg/jpeglib.h @@ -2,7 +2,7 @@ * jpeglib.h * * Copyright (C) 1991-1998, Thomas G. Lane. - * Modified 2002-2009 by Guido Vollbeding. + * Modified 2002-2010 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -33,11 +33,13 @@ extern "C" { #endif #endif -/* Version ID for the JPEG library. +/* Version IDs for the JPEG library. * Might be useful for tests like "#if JPEG_LIB_VERSION >= 80". */ -#define JPEG_LIB_VERSION 80 /* Version 8.0 */ +#define JPEG_LIB_VERSION 80 /* Compatibility version 8.0 */ +#define JPEG_LIB_VERSION_MAJOR 8 +#define JPEG_LIB_VERSION_MINOR 3 /* Various constants determining the sizes of things. diff --git a/include/reactos/libs/libjpeg/jversion.h b/include/reactos/libs/libjpeg/jversion.h index 70c8b6fe176..e868538c884 100644 --- a/include/reactos/libs/libjpeg/jversion.h +++ b/include/reactos/libs/libjpeg/jversion.h @@ -1,7 +1,7 @@ /* * jversion.h * - * Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. + * Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -9,6 +9,6 @@ */ -#define JVERSION "8b 16-May-2010" +#define JVERSION "8c 16-Jan-2011" -#define JCOPYRIGHT "Copyright (C) 2010, Thomas G. Lane, Guido Vollbeding" +#define JCOPYRIGHT "Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding" diff --git a/include/reactos/libs/libmpg123/optimize.h b/include/reactos/libs/libmpg123/optimize.h index 620c3ad7daa..99f132ccba9 100644 --- a/include/reactos/libs/libmpg123/optimize.h +++ b/include/reactos/libs/libmpg123/optimize.h @@ -58,7 +58,11 @@ enum optcla decclass(const enum optdec); /* this is included in mpg123.h, which includes config.h */ #ifdef CCALIGN +#ifdef _MSC_VER +#define ALIGNED(a) __declspec(align(a)) +#else #define ALIGNED(a) __attribute__((aligned(a))) +#endif #else #define ALIGNED(a) #endif diff --git a/include/reactos/libs/libpng/png.h b/include/reactos/libs/libpng/png.h index 842f3fc951b..0af42b170ec 100644 --- a/include/reactos/libs/libpng/png.h +++ b/include/reactos/libs/libpng/png.h @@ -1,26 +1,26 @@ /* png.h - header file for PNG reference library * - * libpng version 1.4.3 - June 26, 2010 - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * libpng version 1.5.2 - March 31, 2011 + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This code is released under the libpng license (See LICENSE, below) * * Authors and maintainers: - * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat - * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.4.3 - June 26, 2010: Glenn - * See also "Contributing Authors", below. + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.5.2 - March 31, 2011: Glenn + * See also "Contributing Authors", below. * * Note about libpng version numbers: * - * Due to various miscommunications, unforeseen code incompatibilities - * and occasional factors outside the authors' control, version numbering - * on the library has not always been consistent and straightforward. - * The following table summarizes matters since version 0.89c, which was - * the first widely used release: + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: * * source png.h png.h shared-lib * version string int version @@ -137,35 +137,40 @@ * 1.4.1beta01-03 14 10401 14.so.14.1[.0] * 1.4.1rc01 14 10401 14.so.14.1[.0] * 1.4.1beta04-12 14 10401 14.so.14.1[.0] - * 1.4.1rc02-04 14 10401 14.so.14.1[.0] * 1.4.1 14 10401 14.so.14.1[.0] - * 1.4.2beta01 14 10402 14.so.14.2[.0] - * 1.4.2rc02-06 14 10402 14.so.14.2[.0] * 1.4.2 14 10402 14.so.14.2[.0] - * 1.4.3beta01-05 14 10403 14.so.14.3[.0] - * 1.4.3rc01-03 14 10403 14.so.14.3[.0] * 1.4.3 14 10403 14.so.14.3[.0] + * 1.4.4 14 10404 14.so.14.4[.0] + * 1.5.0beta01-58 15 10500 15.so.15.0[.0] + * 1.5.0rc01-07 15 10500 15.so.15.0[.0] + * 1.5.0 15 10500 15.so.15.0[.0] + * 1.5.1beta01-11 15 10501 15.so.15.1[.0] + * 1.5.1rc01-02 15 10501 15.so.15.1[.0] + * 1.5.1 15 10501 15.so.15.1[.0] + * 1.5.2beta01-03 15 10502 15.so.15.2[.0] + * 1.5.2rc01-03 15 10502 15.so.15.2[.0] + * 1.5.2 15 10502 15.so.15.2[.0] * - * Henceforth the source version will match the shared-library major - * and minor numbers; the shared-library major version number will be - * used for changes in backward compatibility, as it is intended. The - * PNG_LIBPNG_VER macro, which is not used within libpng but is available - * for applications, is an unsigned integer of the form xyyzz corresponding - * to the source version x.y.z (leading zeros in y and z). Beta versions - * were given the previous public release number plus a letter, until - * version 1.0.6j; from then on they were given the upcoming public - * release number plus "betaNN" or "rcN". + * Henceforth the source version will match the shared-library major + * and minor numbers; the shared-library major version number will be + * used for changes in backward compatibility, as it is intended. The + * PNG_LIBPNG_VER macro, which is not used within libpng but is available + * for applications, is an unsigned integer of the form xyyzz corresponding + * to the source version x.y.z (leading zeros in y and z). Beta versions + * were given the previous public release number plus a letter, until + * version 1.0.6j; from then on they were given the upcoming public + * release number plus "betaNN" or "rcN". * - * Binary incompatibility exists only when applications make direct access - * to the info_ptr or png_ptr members through png.h, and the compiled - * application is loaded with a different version of the library. + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. * - * DLLNUM will change each time there are forward or backward changes - * in binary compatibility (e.g., when a new feature is added). + * DLLNUM will change each time there are forward or backward changes + * in binary compatibility (e.g., when a new feature is added). * - * See libpng.txt or libpng.3 for more information. The PNG specification - * is available as a W3C Recommendation and as an ISO Specification, - * +# endif + + /* Need the time information for converting tIME chunks, it + * defines struct tm: + */ +# ifdef PNG_CONVERT_tIME_SUPPORTED + /* "time.h" functions are not supported on all operating systems */ +# include +# endif +# endif + +/* Machine specific configuration. */ +# include "pngconf.h" +#endif /* * Added at libpng-1.2.8 @@ -414,13 +444,13 @@ * StringFileInfo block must contain a SpecialBuild string. */ -#ifdef PNG_USER_PRIVATEBUILD +#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ # define PNG_LIBPNG_BUILD_TYPE \ - (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) #else # ifdef PNG_LIBPNG_SPECIALBUILD # define PNG_LIBPNG_BUILD_TYPE \ - (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) # else # define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) # endif @@ -433,20 +463,61 @@ extern "C" { #endif /* __cplusplus */ -/* This file is arranged in several sections. The first section contains - * structure and type definitions. The second section contains the external - * library functions, while the third has the internal library functions, - * which applications aren't expected to use directly. - */ - -/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */ -#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) /* Version information for C files, stored in png.c. This had better match * the version above. */ #define png_libpng_ver png_get_header_ver(NULL) -#endif /* PNG_NO_EXTERN */ +/* This file is arranged in several sections: + * + * 1. Any configuration options that can be specified by for the application + * code when it is built. (Build time configuration is in pnglibconf.h) + * 2. Type definitions (base types are defined in pngconf.h), structure + * definitions. + * 3. Exported library functions. + * + * The library source code has additional files (principally pngpriv.h) that + * allow configuration of the library. + */ +/* Section 1: run time configuration + * See pnglibconf.h for build time configuration + * + * Run time configuration allows the application to choose between + * implementations of certain arithmetic APIs. The default is set + * at build time and recorded in pnglibconf.h, but it is safe to + * override these (and only these) settings. Note that this won't + * change what the library does, only application code, and the + * settings can (and probably should) be made on a per-file basis + * by setting the #defines before including png.h + * + * Use macros to read integers from PNG data or use the exported + * functions? + * PNG_USE_READ_MACROS: use the macros (see below) Note that + * the macros evaluate their argument multiple times. + * PNG_NO_USE_READ_MACROS: call the relevant library function. + * + * Use the alternative algorithm for compositing alpha samples that + * does not use division? + * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' + * algorithm. + * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. + * + * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is + * false? + * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error + * APIs to png_warning. + * Otherwise the calls are mapped to png_error. + */ + +/* Section 2: type definitions, including structures and compile time + * constants. + * See pngconf.h for base types that vary by machine/system + */ + +/* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +typedef char* png_libpng_version_1_5_2; /* Three color definitions. The order of the red, green, and blue, (and the * exact size) is not important, although the size of the fields need to @@ -459,6 +530,7 @@ typedef struct png_color_struct png_byte blue; } png_color; typedef png_color FAR * png_colorp; +typedef PNG_CONST png_color FAR * png_const_colorp; typedef png_color FAR * FAR * png_colorpp; typedef struct png_color_16_struct @@ -470,6 +542,7 @@ typedef struct png_color_16_struct png_uint_16 gray; /* for use in grayscale files */ } png_color_16; typedef png_color_16 FAR * png_color_16p; +typedef PNG_CONST png_color_16 FAR * png_const_color_16p; typedef png_color_16 FAR * FAR * png_color_16pp; typedef struct png_color_8_struct @@ -481,6 +554,7 @@ typedef struct png_color_8_struct png_byte alpha; /* for alpha channel files */ } png_color_8; typedef png_color_8 FAR * png_color_8p; +typedef PNG_CONST png_color_8 FAR * png_const_color_8p; typedef png_color_8 FAR * FAR * png_color_8pp; /* @@ -496,6 +570,7 @@ typedef struct png_sPLT_entry_struct png_uint_16 frequency; } png_sPLT_entry; typedef png_sPLT_entry FAR * png_sPLT_entryp; +typedef PNG_CONST png_sPLT_entry FAR * png_const_sPLT_entryp; typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp; /* When the depth of the sPLT palette is 8 bits, the color and alpha samples @@ -511,6 +586,7 @@ typedef struct png_sPLT_struct png_int_32 nentries; /* number of palette entries */ } png_sPLT_t; typedef png_sPLT_t FAR * png_sPLT_tp; +typedef PNG_CONST png_sPLT_t FAR * png_const_sPLT_tp; typedef png_sPLT_t FAR * FAR * png_sPLT_tpp; #ifdef PNG_TEXT_SUPPORTED @@ -533,15 +609,14 @@ typedef struct png_text_struct png_charp text; /* comment, may be an empty string (ie "") or a NULL pointer */ png_size_t text_length; /* length of the text string */ -#ifdef PNG_iTXt_SUPPORTED png_size_t itxt_length; /* length of the itxt string */ png_charp lang; /* language code, 0-79 characters or a NULL pointer */ png_charp lang_key; /* keyword translated UTF-8 string, 0 or more chars or a NULL pointer */ -#endif } png_text; typedef png_text FAR * png_textp; +typedef PNG_CONST png_text FAR * png_const_textp; typedef png_text FAR * FAR * png_textpp; #endif @@ -571,10 +646,11 @@ typedef struct png_time_struct png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ } png_time; typedef png_time FAR * png_timep; +typedef PNG_CONST png_time FAR * png_const_timep; typedef png_time FAR * FAR * png_timepp; #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ - defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) /* png_unknown_chunk is a structure to hold queued chunks for which there is * no specific support. The idea is that we can use this to queue * up private chunks for output even though the library doesn't actually @@ -591,312 +667,13 @@ typedef struct png_unknown_chunk_t } png_unknown_chunk; typedef png_unknown_chunk FAR * png_unknown_chunkp; +typedef PNG_CONST png_unknown_chunk FAR * png_const_unknown_chunkp; typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; #endif -/* png_info is a structure that holds the information in a PNG file so - * that the application can find out the characteristics of the image. - * If you are reading the file, this structure will tell you what is - * in the PNG file. If you are writing the file, fill in the information - * you want to put into the PNG file, then call png_write_info(). - * The names chosen should be very close to the PNG specification, so - * consult that document for information about the meaning of each field. - * - * With libpng < 0.95, it was only possible to directly set and read the - * the values in the png_info_struct, which meant that the contents and - * order of the values had to remain fixed. With libpng 0.95 and later, - * however, there are now functions that abstract the contents of - * png_info_struct from the application, so this makes it easier to use - * libpng with dynamic libraries, and even makes it possible to use - * libraries that don't have all of the libpng ancillary chunk-handing - * functionality. - * - * In any case, the order of the parameters in png_info_struct should NOT - * be changed for as long as possible to keep compatibility with applications - * that use the old direct-access method with png_info_struct. - * - * The following members may have allocated storage attached that should be - * cleaned up before the structure is discarded: palette, trans, text, - * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, - * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these - * are automatically freed when the info structure is deallocated, if they were - * allocated internally by libpng. This behavior can be changed by means - * of the png_data_freer() function. - * - * More allocation details: all the chunk-reading functions that - * change these members go through the corresponding png_set_* - * functions. A function to clear these members is available: see - * png_free_data(). The png_set_* functions do not depend on being - * able to point info structure members to any of the storage they are - * passed (they make their own copies), EXCEPT that the png_set_text - * functions use the same storage passed to them in the text_ptr or - * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns - * functions do not make their own copies. - */ -typedef struct png_info_struct -{ - /* the following are necessary for every PNG file */ - png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ - png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ - png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ - below) */ - png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed - row */ - png_colorp palette PNG_DEPSTRUCT; /* array of color values - (valid & PNG_INFO_PLTE) */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in - "palette" (PLTE) */ - png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette - color (tRNS) */ - png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel - (from IHDR) */ - png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below - (from IHDR) */ - /* The following three should have been named *_method not *_type */ - png_byte compression_type PNG_DEPSTRUCT; /* must be - PNG_COMPRESSION_TYPE_BASE (IHDR) */ - png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE - (from IHDR) */ - png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, - PNG_INTERLACE_ADAM7 */ - - /* The following is informational only on read, and not used on writes. */ - png_byte channels PNG_DEPSTRUCT; /* number of data channels per - pixel (1, 2, 3, 4) */ - png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ - png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for - future use */ - png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng - from start of file */ - - /* The rest of the data is optional. If you are reading, check the - * valid field to see if the information in these are valid. If you - * are writing, set the valid field to those chunks you want written, - * and initialize the appropriate fields below. - */ - -#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) - /* The gAMA chunk describes the gamma characteristics of the system - * on which the image was created, normally in the range [1.0, 2.5]. - * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. - */ - float gamma PNG_DEPSTRUCT; /* gamma value of image, - if (valid & PNG_INFO_gAMA) */ -#endif - -#ifdef PNG_sRGB_SUPPORTED - /* GR-P, 0.96a */ - /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent - [0, 1, 2, or 3] */ -#endif - -#ifdef PNG_TEXT_SUPPORTED - /* The tEXt, and zTXt chunks contain human-readable textual data in - * uncompressed, compressed, and optionally compressed forms, respectively. - * The data in "text" is an array of pointers to uncompressed, - * null-terminated C strings. Each chunk has a keyword that describes the - * textual data contained in that chunk. Keywords are not required to be - * unique, and the text string may be empty. Any number of text chunks may - * be in an image. - */ - int num_text PNG_DEPSTRUCT; /* number of comments read/to write */ - int max_text PNG_DEPSTRUCT; /* current size of text array */ - png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */ -#endif /* PNG_TEXT_SUPPORTED */ - -#ifdef PNG_tIME_SUPPORTED - /* The tIME chunk holds the last time the displayed image data was - * modified. See the png_time struct for the contents of this struct. - */ - png_time mod_time PNG_DEPSTRUCT; -#endif - -#ifdef PNG_sBIT_SUPPORTED - /* The sBIT chunk specifies the number of significant high-order bits - * in the pixel data. Values are in the range [1, bit_depth], and are - * only specified for the channels in the pixel data. The contents of - * the low-order bits is not specified. Data is valid if - * (valid & PNG_INFO_sBIT) is non-zero. - */ - png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */ -#endif - -#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ -defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The tRNS chunk supplies transparency data for paletted images and - * other image types that don't need a full alpha channel. There are - * "num_trans" transparency values for a paletted image, stored in the - * same order as the palette colors, starting from index 0. Values - * for the data are in the range [0, 255], ranging from fully transparent - * to fully opaque, respectively. For non-paletted images, there is a - * single color specified that should be treated as fully transparent. - * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. - */ - png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted - image */ - png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for - non-palette image */ -#endif - -#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The bKGD chunk gives the suggested image background color if the - * display program does not have its own background color and the image - * is needs to composited onto a background before display. The colors - * in "background" are normally in the same color space/depth as the - * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. - */ - png_color_16 background PNG_DEPSTRUCT; -#endif - -#ifdef PNG_oFFs_SUPPORTED - /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards - * and downwards from the top-left corner of the display, page, or other - * application-specific co-ordinate space. See the PNG_OFFSET_ defines - * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. - */ - png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */ - png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */ - png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */ -#endif - -#ifdef PNG_pHYs_SUPPORTED - /* The pHYs chunk gives the physical pixel density of the image for - * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ - * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. - */ - png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ - png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ - png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see - PNG_RESOLUTION_ below) */ -#endif - -#ifdef PNG_hIST_SUPPORTED - /* The hIST chunk contains the relative frequency or importance of the - * various palette entries, so that a viewer can intelligently select a - * reduced-color palette, if required. Data is an array of "num_palette" - * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) - * is non-zero. - */ - png_uint_16p hist PNG_DEPSTRUCT; -#endif - -#ifdef PNG_cHRM_SUPPORTED - /* The cHRM chunk describes the CIE color characteristics of the monitor - * on which the PNG was created. This data allows the viewer to do gamut - * mapping of the input image to ensure that the viewer sees the same - * colors in the image as the creator. Values are in the range - * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. - */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - float x_white PNG_DEPSTRUCT; - float y_white PNG_DEPSTRUCT; - float x_red PNG_DEPSTRUCT; - float y_red PNG_DEPSTRUCT; - float x_green PNG_DEPSTRUCT; - float y_green PNG_DEPSTRUCT; - float x_blue PNG_DEPSTRUCT; - float y_blue PNG_DEPSTRUCT; -#endif -#endif - -#ifdef PNG_pCAL_SUPPORTED - /* The pCAL chunk describes a transformation between the stored pixel - * values and original physical data values used to create the image. - * The integer range [0, 2^bit_depth - 1] maps to the floating-point - * range given by [pcal_X0, pcal_X1], and are further transformed by a - * (possibly non-linear) transformation function given by "pcal_type" - * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ - * defines below, and the PNG-Group's PNG extensions document for a - * complete description of the transformations and how they should be - * implemented, and for a description of the ASCII parameter strings. - * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. - */ - png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ - png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ - png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ - png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical - units */ - png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing - parameter values */ - png_byte pcal_type PNG_DEPSTRUCT; /* equation type - (see PNG_EQUATION_ below) */ - png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given - in pcal_params */ -#endif - -/* New members added in libpng-1.0.6 */ - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is - responsible for freeing */ - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ - defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) - /* Storage for unknown chunks that the library doesn't recognize. */ - png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; - png_size_t unknown_chunks_num PNG_DEPSTRUCT; -#endif - -#ifdef PNG_iCCP_SUPPORTED - /* iCCP chunk data. */ - png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ - png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium - profile data */ - /* Note to maintainer: should be png_bytep */ - png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ - png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ -#endif - -#ifdef PNG_sPLT_SUPPORTED - /* Data on sPLT chunks (there may be more than one). */ - png_sPLT_tp splt_palettes PNG_DEPSTRUCT; - png_uint_32 splt_palettes_num PNG_DEPSTRUCT; -#endif - -#ifdef PNG_sCAL_SUPPORTED - /* The sCAL chunk describes the actual physical dimensions of the - * subject matter of the graphic. The chunk contains a unit specification - * a byte value, and two ASCII strings representing floating-point - * values. The values are width and height corresponsing to one pixel - * in the image. This external representation is converted to double - * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. - */ - png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */ - double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */ -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */ - png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */ -#endif -#endif - -#ifdef PNG_INFO_IMAGE_SUPPORTED - /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) - non-zero */ - /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ - png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ -#endif - -#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) - png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, - if (valid & PNG_INFO_gAMA) */ -#endif - -#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) - png_fixed_point int_x_white PNG_DEPSTRUCT; - png_fixed_point int_y_white PNG_DEPSTRUCT; - png_fixed_point int_x_red PNG_DEPSTRUCT; - png_fixed_point int_y_red PNG_DEPSTRUCT; - png_fixed_point int_x_green PNG_DEPSTRUCT; - png_fixed_point int_y_green PNG_DEPSTRUCT; - png_fixed_point int_x_blue PNG_DEPSTRUCT; - png_fixed_point int_y_blue PNG_DEPSTRUCT; -#endif - -} png_info; - +typedef struct png_info_def png_info; typedef png_info FAR * png_infop; +typedef PNG_CONST png_info FAR * png_const_infop; typedef png_info FAR * FAR * png_infopp; /* Maximum positive integer used in PNG is (2^31)-1 */ @@ -904,6 +681,12 @@ typedef png_info FAR * FAR * png_infopp; #define PNG_UINT_32_MAX ((png_uint_32)(-1)) #define PNG_SIZE_MAX ((png_size_t)(-1)) +/* These are constants for fixed point values encoded in the + * PNG specification manner (x100000) + */ +#define PNG_FP_1 100000 +#define PNG_FP_HALF 50000 + /* These describe the color_type field in png_info. */ /* color type masks */ #define PNG_COLOR_MASK_PALETTE 1 @@ -998,11 +781,11 @@ typedef png_info FAR * FAR * png_infopp; */ typedef struct png_row_info_struct { - png_uint_32 width; /* width of row */ - png_size_t rowbytes; /* number of bytes in row */ - png_byte color_type; /* color type of row */ - png_byte bit_depth; /* bit depth of row */ - png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_uint_32 width; /* width of row */ + png_size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ png_byte pixel_depth; /* bits per pixel (depth * channels) */ } png_row_info; @@ -1013,46 +796,74 @@ typedef png_row_info FAR * FAR * png_row_infopp; * that allow the user to override the default I/O functions with his or her * own. The png_error_ptr type should match that of user-supplied warning * and error functions, while the png_rw_ptr type should match that of the - * user read/write data functions. + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. */ typedef struct png_struct_def png_struct; +typedef PNG_CONST png_struct FAR * png_const_structp; typedef png_struct FAR * png_structp; -typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp)); -typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t)); -typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp)); -typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32, - int)); -typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, - int)); +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, - png_infop)); -typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); -typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, - png_uint_32, int)); +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp, - png_row_infop, png_bytep)); +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, - png_unknown_chunkp)); +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); +typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); #endif + #ifdef PNG_SETJMP_SUPPORTED /* This must match the function definition in , and the * application must include this before png.h to obtain the definition - * of jmp_buf. + * of jmp_buf. The function is required to be PNG_NORETURN. (Note that + * PNG_PTR_NORETURN is used here because current versions of the Microsoft + * C compiler do not support the PNG_NORETURN attribute on a pointer.) + * + * If you get a type warning from the compiler when linking against this line + * then your compiler has 'longjmp' that does not match the requirements of the + * compiler that built libpng. You will have to write a wrapper function for + * your compiler's longjmp and call png_set_longjmp_fn directly (not via the + * png_jmpbuf macro.) + * + * If you get a warning here while building the library you will need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! */ -typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int)); +typedef PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), + PNG_PTR_NORETURN); #endif /* Transform masks for the high-level interface */ @@ -1080,447 +891,85 @@ typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int)); #define PNG_FLAG_MNG_FILTER_64 0x04 #define PNG_ALL_MNG_FEATURES 0x05 -typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_alloc_size_t)); -typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); - -/* The structure that holds the information to read and write PNG files. - * The only people who need to care about what is inside of this are the - * people who will be modifying the library for their own special needs. - * It should NOT be accessed directly by an application, except to store - * the jmp_buf. +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. */ - -struct png_struct_def -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */ - png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto - function. */ -#endif - png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing - errors and aborting */ - png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing - warnings */ - png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for - error functions */ - png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing - output data */ - png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading - input data */ - png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct - for I/O functions */ - -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read - transform */ -#endif - -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write - transform */ -#endif - -/* These were added in libpng-1.0.2 */ -#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct - for user transform */ - png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user - transformed pixels */ - png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user - transformed pixels */ -#endif -#endif - - png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in - the PNG file */ - png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various - things to libpng */ - png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations - to perform */ - - z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression - structure (below) */ - png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ - png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ - int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ - int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ - int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window - bits */ - int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory - level */ - int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression - strategy */ - - png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ - png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ - png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ - png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ - png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ -#if 0 /* Replaced with the following in libpng-1.4.1 */ - png_size_t irowbytes PNG_DEPSTRUCT; -#endif -/* Added in libpng-1.4.1 */ -#ifdef PNG_USER_LIMITS_SUPPORTED - /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk - * can occupy when decompressed. 0 means unlimited. - * We will change the typedef from png_size_t to png_alloc_size_t - * in libpng-1.6.0 - */ - png_alloc_size_t user_chunk_malloc_max PNG_DEPSTRUCT; -#endif - png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced - row in pixels */ - png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ - png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous - (unfiltered) row */ - png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current - (unfiltered) row */ - png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row - when filtering */ - png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row - when filtering */ - png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row - when filtering */ - png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row - when filtering */ - png_row_info row_info PNG_DEPSTRUCT; /* used for transformation - routines */ - - png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ - png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ - png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in - palette */ - png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ - png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current - chunk */ - png_byte compression PNG_DEPSTRUCT; /* file compression type - (always 0) */ - png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ - png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, - PNG_INTERLACE_ADAM7 */ - png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ - png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see - PNG_FILTER_ below ) */ - png_byte color_type PNG_DEPSTRUCT; /* color type of file */ - png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ - png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ - png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ - png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ - png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ - png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from - start of file */ - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) - png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel - expansion */ -#endif - -#ifdef PNG_bKGD_SUPPORTED - png_byte background_gamma_type PNG_DEPSTRUCT; -# ifdef PNG_FLOATING_POINT_SUPPORTED - float background_gamma PNG_DEPSTRUCT; -# endif - png_color_16 background PNG_DEPSTRUCT; /* background color in - screen gamma space */ -#ifdef PNG_READ_GAMMA_SUPPORTED - png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized - to gamma 1.0 */ -#endif -#endif /* PNG_bKGD_SUPPORTED */ - -#ifdef PNG_WRITE_FLUSH_SUPPORTED - png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing - output */ - png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, - 0 - no flush */ - png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since - last flush */ -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits - 16-bit gamma */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - float gamma PNG_DEPSTRUCT; /* file gamma value */ - float screen_gamma PNG_DEPSTRUCT; /* screen gamma value - (display_exponent) */ -#endif -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit - depth files */ - png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ - png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ - png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit - depth files */ - png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to - screen */ - png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) - png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each - available channel */ -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) - png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit - tranformation */ -#endif - -#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ - || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for - paletted files */ - png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for - non-paletted files */ -#endif - - png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each - row is decoded */ - png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each - row is encoded */ -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header - data fully read */ - png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each - prog. row is decoded */ - png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image - is complete */ - png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in - save_buffer */ - png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously - read data */ - png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in - current_buffer */ - png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently - used data */ - png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input - chunk */ - png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in - input data */ - png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now - in save_buffer */ - png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of - save_buffer */ - png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of - available input data */ - png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now - in current_buffer */ - int process_mode PNG_DEPSTRUCT; /* what push library - is currently doing */ - int cur_palette PNG_DEPSTRUCT; /* current push library - palette index */ - -# ifdef PNG_TEXT_SUPPORTED - png_size_t current_text_size PNG_DEPSTRUCT; /* current size of - text input data */ - png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left - to read in input */ - png_charp current_text PNG_DEPSTRUCT; /* current text chunk - buffer */ - png_charp current_text_ptr PNG_DEPSTRUCT; /* current location - in current_text */ -# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* For the Borland special 64K segment handler */ - png_bytepp offset_table_ptr PNG_DEPSTRUCT; - png_bytep offset_table PNG_DEPSTRUCT; - png_uint_16 offset_table_number PNG_DEPSTRUCT; - png_uint_16 offset_table_count PNG_DEPSTRUCT; - png_uint_16 offset_table_count_free PNG_DEPSTRUCT; -#endif - -#ifdef PNG_READ_QUANTIZE_SUPPORTED - png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for quantizing */ - png_bytep quantize_index PNG_DEPSTRUCT; /* index translation for palette - files */ -#endif - -#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) - png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ -#endif - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row - filter selection */ - png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights - for previous rows */ - png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of - previous row(s) */ - png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous - line(s) */ - png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for - previous line(s) */ - png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter - calculation cost */ - png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter - calculation cost */ -#endif - -#ifdef PNG_TIME_RFC1123_SUPPORTED - png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ -#endif - -/* New members added in libpng-1.0.6 */ - - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is - responsible for freeing */ - -#ifdef PNG_USER_CHUNKS_SUPPORTED - png_voidp user_chunk_ptr PNG_DEPSTRUCT; - png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read - chunk handler */ -#endif - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - int num_chunk_list PNG_DEPSTRUCT; - png_bytep chunk_list PNG_DEPSTRUCT; -#endif - -/* New members added in libpng-1.0.3 */ -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED - png_byte rgb_to_gray_status PNG_DEPSTRUCT; - /* These were changed from png_byte in libpng-1.0.6 */ - png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; - png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; - png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ -#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ - defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ - defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -/* Changed from png_byte to png_uint_32 at version 1.2.0 */ - png_uint_32 mng_features_permitted PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.7 */ -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_fixed_point int_gamma PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ -#ifdef PNG_MNG_FEATURES_SUPPORTED - png_byte filter_type PNG_DEPSTRUCT; -#endif - -/* New members added in libpng-1.2.0 */ - -/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ -#ifdef PNG_USER_MEM_SUPPORTED - png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for - mem functions */ - png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for - allocating memory */ - png_free_ptr free_fn PNG_DEPSTRUCT; /* function for - freeing memory */ -#endif - -/* New member added in libpng-1.0.13 and 1.2.0 */ - png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current - (unfiltered) row */ - -#ifdef PNG_READ_QUANTIZE_SUPPORTED -/* The following three members were added at version 1.0.14 and 1.2.4 */ - png_bytep quantize_sort PNG_DEPSTRUCT; /* working sort array */ - png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original - index currently is - in the palette */ - png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index - points to this - palette color */ -#endif - -/* New members added in libpng-1.0.16 and 1.2.6 */ - png_byte compression_type PNG_DEPSTRUCT; - -#ifdef PNG_USER_LIMITS_SUPPORTED - png_uint_32 user_width_max PNG_DEPSTRUCT; - png_uint_32 user_height_max PNG_DEPSTRUCT; - /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown - * chunks that can be stored (0 means unlimited). - */ - png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.25 and 1.2.17 */ -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED - /* Storage for unknown chunk that the library doesn't recognize. */ - png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; -#endif - -/* New members added in libpng-1.2.26 */ - png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; - png_uint_32 old_prev_row_size PNG_DEPSTRUCT; - -/* New member added in libpng-1.2.30 */ - png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ - -#ifdef PNG_IO_STATE_SUPPORTED -/* New member added in libpng-1.4.0 */ - png_uint_32 io_state PNG_DEPSTRUCT; -#endif -}; - - -/* This triggers a compiler error in png.c, if png.c and png.h - * do not agree upon the version number. - */ -typedef png_structp version_1_4_3; +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); typedef png_struct FAR * FAR * png_structpp; -/* Here are the function definitions most commonly used. This is not - * the place to find out how to use libpng. See libpng.txt for the +/* Section 3: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the * full explanation, see example.c for the summary. This just provides * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes */ /* Returns the version number of the library */ -extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void)); +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); /* Tell lib we have already handled the first magic bytes. * Handling more than 8 bytes from the beginning of the file is an error. */ -extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, - int num_bytes)); +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structp png_ptr, int num_bytes)); /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a * PNG file. Returns zero if the supplied bytes match the 8-byte PNG * signature, and non-zero otherwise. Having num_to_check == 0 or * start > 7 will always fail (ie return non-zero). */ -extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, - png_size_t num_to_check)); +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, + png_size_t num_to_check)); /* Simple signature checking function. This is the same as calling * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). */ -#define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n)) +#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) /* Allocate and initialize png_ptr struct for reading, and any other memory. */ -extern PNG_EXPORT(png_structp,png_create_read_struct) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); /* Allocate and initialize png_ptr struct for writing, and any other memory */ -extern PNG_EXPORT(png_structp,png_create_write_struct) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); -extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size) - PNGARG((png_structp png_ptr)); +PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size, + (png_const_structp png_ptr)); -extern PNG_EXPORT(void,png_set_compression_buffer_size) - PNGARG((png_structp png_ptr, png_size_t size)); +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr, + png_size_t size)); /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp * match up. @@ -1533,288 +982,316 @@ extern PNG_EXPORT(void,png_set_compression_buffer_size) * allocated by the library - the call will return NULL on a mismatch * indicating an ABI mismatch. */ -extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) - PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t - jmp_buf_size)); +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); # define png_jmpbuf(png_ptr) \ - (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) + (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) #else # define png_jmpbuf(png_ptr) \ - (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) #endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_structp png_ptr, int val), + PNG_NORETURN); #ifdef PNG_READ_SUPPORTED /* Reset the compression stream */ -extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); +PNG_EXPORT(10, int, png_reset_zstream, (png_structp png_ptr)); #endif /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ #ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_structp,png_create_read_struct_2) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; -extern PNG_EXPORT(png_structp,png_create_write_struct_2) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); #endif /* Write the PNG file signature. */ -extern PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr)); +PNG_EXPORT(13, void, png_write_sig, (png_structp png_ptr)); /* Write a PNG chunk - size, type, (optional) data, CRC. */ -extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_bytep data, png_size_t length)); +PNG_EXPORT(14, void, png_write_chunk, (png_structp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, png_size_t length)); /* Write the start of a PNG chunk - length and chunk name. */ -extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_uint_32 length)); +PNG_EXPORT(15, void, png_write_chunk_start, (png_structp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); /* Write the data of a PNG chunk started with png_write_chunk_start(). */ -extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); +PNG_EXPORT(16, void, png_write_chunk_data, (png_structp png_ptr, + png_const_bytep data, png_size_t length)); /* Finish a chunk started with png_write_chunk_start() (includes CRC). */ -extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); +PNG_EXPORT(17, void, png_write_chunk_end, (png_structp png_ptr)); /* Allocate and initialize the info structure */ -extern PNG_EXPORT(png_infop,png_create_info_struct) - PNGARG((png_structp png_ptr)) PNG_ALLOCATED; +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_structp png_ptr), + PNG_ALLOCATED); -extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, +PNG_EXPORT(19, void, png_info_init_3, (png_infopp info_ptr, png_size_t png_info_struct_size)); /* Writes all the PNG information before the image. */ -extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr)); -extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structp png_ptr, png_infop info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the information before the actual image data. */ -extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +PNG_EXPORT(22, void, png_read_info, + (png_structp png_ptr, png_infop info_ptr)); #endif #ifdef PNG_TIME_RFC1123_SUPPORTED -extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) - PNGARG((png_structp png_ptr, png_timep ptime)); +PNG_EXPORT(23, png_const_charp, png_convert_to_rfc1123, + (png_structp png_ptr, + png_const_timep ptime)); #endif #ifdef PNG_CONVERT_tIME_SUPPORTED /* Convert from a struct tm to png_time */ -extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, - struct tm FAR * ttime)); +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + PNG_CONST struct tm FAR * ttime)); /* Convert from time_t to png_time. Uses gmtime() */ -extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, - time_t ttime)); +PNG_EXPORT(25, void, png_convert_from_time_t, + (png_timep ptime, time_t ttime)); #endif /* PNG_CONVERT_tIME_SUPPORTED */ #ifdef PNG_READ_EXPAND_SUPPORTED /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ -extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp - png_ptr)); -extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(26, void, png_set_expand, (png_structp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structp png_ptr)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16 bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structp png_ptr)); #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* Use blue, green, red order for pixels. */ -extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(30, void, png_set_bgr, (png_structp png_ptr)); #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Expand the grayscale to 24-bit RGB if necessary. */ -extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structp png_ptr)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* Reduce RGB to grayscale. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, - int error_action, double red, double green )); -#endif -extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, - int error_action, png_fixed_point red, png_fixed_point green )); -extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp - png_ptr)); +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr, + int error_action, double red, double green)); +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)); + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structp + png_ptr)); #endif -extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, - png_colorp palette)); +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED -extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structp png_ptr)); #endif #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structp png_ptr)); #endif #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ -extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, - png_uint_32 filler, int flags)); +PNG_EXPORT(39, void, png_set_filler, (png_structp png_ptr, png_uint_32 filler, + int flags)); /* The values of the PNG_FILLER_ defines should NOT be changed */ -#define PNG_FILLER_BEFORE 0 -#define PNG_FILLER_AFTER 1 +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ -extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr, - png_uint_32 filler, int flags)); +PNG_EXPORT(40, void, png_set_add_alpha, + (png_structp png_ptr, png_uint_32 filler, + int flags)); #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) /* Swap bytes in 16-bit depth files. */ -extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); +PNG_EXPORT(41, void, png_set_swap, (png_structp png_ptr)); #endif #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ -extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); +PNG_EXPORT(42, void, png_set_packing, (png_structp png_ptr)); #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ -extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); +PNG_EXPORT(43, void, png_set_packswap, (png_structp png_ptr)); #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) /* Converts files to legal bit depths. */ -extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, - png_color_8p true_bits)); +PNG_EXPORT(44, void, png_set_shift, (png_structp png_ptr, png_const_color_8p + true_bits)); #endif #if defined(PNG_READ_INTERLACING_SUPPORTED) || \ defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* Have the code handle the interlacing. Returns the number of passes. */ -extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) /* Invert monochrome files */ -extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); +PNG_EXPORT(46, void, png_set_invert_mono, (png_structp png_ptr)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED /* Handle alpha and tRNS by replacing with a background color. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, - png_color_16p background_color, int background_gamma_code, - int need_expand, double background_gamma)); +PNG_FP_EXPORT(47, void, png_set_background, (png_structp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)); +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)); #endif -#define PNG_BACKGROUND_GAMMA_UNKNOWN 0 -#define PNG_BACKGROUND_GAMMA_SCREEN 1 -#define PNG_BACKGROUND_GAMMA_FILE 2 -#define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 #endif #ifdef PNG_READ_16_TO_8_SUPPORTED /* Strip the second byte of information from a 16-bit depth file. */ -extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); +PNG_EXPORT(48, void, png_set_strip_16, (png_structp png_ptr)); #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED /* Turn on quantizing, and reduce the palette to the number of colors - * available. Prior to libpng-1.4.2, this was png_set_dither(). + * available. */ -extern PNG_EXPORT(void,png_set_quantize) PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette, int maximum_colors, - png_uint_16p histogram, int full_quantize)); +PNG_EXPORT(49, void, png_set_quantize, + (png_structp png_ptr, png_colorp palette, + int num_palette, int maximum_colors, png_const_uint_16p histogram, + int full_quantize)); #endif -/* This migration aid will be removed from libpng-1.5.0 */ -#define png_set_dither png_set_quantize #ifdef PNG_READ_GAMMA_SUPPORTED -/* Handle gamma correction. Screen_gamma=(display_exponent) */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, - double screen_gamma, double default_file_gamma)); -#endif -#endif +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) +/* Handle gamma correction. Screen_gamma=(display_exponent) */ +PNG_FP_EXPORT(50, void, png_set_gamma, + (png_structp png_ptr, double screen_gamma, + double default_file_gamma)); +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structp png_ptr, + png_fixed_point screen_gamma, png_fixed_point default_file_gamma)); +#endif #ifdef PNG_WRITE_FLUSH_SUPPORTED /* Set how many lines between output flushes - 0 for no flushing */ -extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); +PNG_EXPORT(51, void, png_set_flush, (png_structp png_ptr, int nrows)); /* Flush the current PNG output buffer */ -extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); +PNG_EXPORT(52, void, png_write_flush, (png_structp png_ptr)); #endif /* Optional update palette with requested transformations */ -extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); +PNG_EXPORT(53, void, png_start_read_image, (png_structp png_ptr)); /* Optional call to update the users info structure */ -extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +PNG_EXPORT(54, void, png_read_update_info, + (png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. */ -extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); +PNG_EXPORT(55, void, png_read_rows, (png_structp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read a row of data. */ -extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, - png_bytep row, - png_bytep display_row)); +PNG_EXPORT(56, void, png_read_row, (png_structp png_ptr, png_bytep row, + png_bytep display_row)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the whole image into memory at once. */ -extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, - png_bytepp image)); +PNG_EXPORT(57, void, png_read_image, (png_structp png_ptr, png_bytepp image)); #endif /* Write a row of image data */ -extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, - png_bytep row)); +PNG_EXPORT(58, void, png_write_row, + (png_structp png_ptr, png_const_bytep row)); -/* Write a few rows of image data */ -extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_uint_32 num_rows)); +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structp png_ptr, png_bytepp row, + png_uint_32 num_rows)); /* Write the image data */ -extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, - png_bytepp image)); +PNG_EXPORT(60, void, png_write_image, + (png_structp png_ptr, png_bytepp image)); /* Write the end of the PNG file. */ -extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +PNG_EXPORT(61, void, png_write_end, + (png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the end of the PNG file. */ -extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); +PNG_EXPORT(62, void, png_read_end, (png_structp png_ptr, png_infop info_ptr)); #endif /* Free any memory associated with the png_info_struct */ -extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, - png_infopp info_ptr_ptr)); +PNG_EXPORT(63, void, png_destroy_info_struct, (png_structp png_ptr, + png_infopp info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp - png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_write_struct) - PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); /* Set the libpng method of handling chunk CRC errors */ -extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, - int crit_action, int ancil_action)); +PNG_EXPORT(66, void, png_set_crc_action, + (png_structp png_ptr, int crit_action, int ancil_action)); -/* Values for png_set_crc_action() to say how to handle CRC errors in +/* Values for png_set_crc_action() say how to handle CRC errors in * ancillary and critical chunks, and whether to use the data contained * therein. Note that it is impossible to "discard" data in a critical * chunk. For versions prior to 0.90, the action was always error/quit, @@ -1841,8 +1318,8 @@ extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, /* Set the filtering method(s) used by libpng. Currently, the only valid * value for "method" is 0. */ -extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, - int filters)); +PNG_EXPORT(67, void, png_set_filter, + (png_structp png_ptr, int method, int filters)); /* Flags for png_set_filter() to say which filters to use. The flags * are chosen so that they don't conflict with real filter types @@ -1897,11 +1374,13 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, * the weights and costs are set to 1.0, this degenerates the WEIGHTED method * to the UNWEIGHTED method, but with added encoding time/computation. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, - int heuristic_method, int num_weights, png_doublep filter_weights, - png_doublep filter_costs)); -#endif +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)); +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structp png_ptr, + int heuristic_method, int num_weights, png_const_fixed_point_p + filter_weights, png_const_fixed_point_p filter_costs)); #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ /* Heuristic used for row filter selection. These defines should NOT be @@ -1919,34 +1398,33 @@ extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, * for PNG images, and do considerably fewer caclulations. In the future, * these values may not correspond directly to the zlib compression levels. */ -extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, - int level)); +PNG_EXPORT(69, void, png_set_compression_level, + (png_structp png_ptr, int level)); -extern PNG_EXPORT(void,png_set_compression_mem_level) - PNGARG((png_structp png_ptr, int mem_level)); +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structp png_ptr, + int mem_level)); -extern PNG_EXPORT(void,png_set_compression_strategy) - PNGARG((png_structp png_ptr, int strategy)); +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structp png_ptr, + int strategy)); -extern PNG_EXPORT(void,png_set_compression_window_bits) - PNGARG((png_structp png_ptr, int window_bits)); +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structp png_ptr, + int window_bits)); -extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, - int method)); +PNG_EXPORT(73, void, png_set_compression_method, (png_structp png_ptr, + int method)); /* These next functions are called for input/output, memory, and error * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, * and call standard C I/O routines such as fread(), fwrite(), and * fprintf(). These functions can be made to use other I/O routines * at run time for those applications that need to handle I/O in a - * different manner by calling png_set_???_fn(). See libpng.txt for + * different manner by calling png_set_???_fn(). See libpng-manual.txt for * more information. */ #ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, - png_FILE_p fp)); +PNG_EXPORT(74, void, png_init_io, (png_structp png_ptr, png_FILE_p fp)); #endif /* Replace the (error and abort), and warning functions with user @@ -1957,11 +1435,12 @@ extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, * default function will be used. */ -extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); +PNG_EXPORT(75, void, png_set_error_fn, + (png_structp png_ptr, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warning_fn)); /* Return the user pointer associated with the error functions */ -extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structp png_ptr)); /* Replace the default data output functions with a user supplied one(s). * If buffered output is not used, then output_flush_fn can be set to NULL. @@ -1973,101 +1452,137 @@ extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); * default flush function, which uses the standard *FILE structure, will * be used. */ -extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); +PNG_EXPORT(77, void, png_set_write_fn, (png_structp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); /* Replace the default data input function with a user supplied one. */ -extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr read_data_fn)); +PNG_EXPORT(78, void, png_set_read_fn, (png_structp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); /* Return the user pointer associated with the I/O functions */ -extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, - png_read_status_ptr read_row_fn)); +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structp png_ptr, + png_read_status_ptr read_row_fn)); -extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, - png_write_status_ptr write_row_fn)); +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp png_ptr, + png_write_status_ptr write_row_fn)); #ifdef PNG_USER_MEM_SUPPORTED /* Replace the default memory allocation functions with user supplied one(s). */ -extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, - png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +PNG_EXPORT(82, void, png_set_mem_fn, (png_structp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* Return the user pointer associated with the memory functions */ -extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structp png_ptr)); #endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr read_user_transform_fn)); +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structp png_ptr, + png_user_transform_ptr read_user_transform_fn)); #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED -extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr write_user_transform_fn)); +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structp png_ptr, + png_user_transform_ptr write_user_transform_fn)); #endif -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp - png_ptr, png_voidp user_transform_ptr, int user_transform_depth, - int user_transform_channels)); +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); /* Return the user pointer associated with the user transform functions */ -extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr) - PNGARG((png_structp png_ptr)); +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structp)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, - png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); -extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp - png_ptr)); +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp png_ptr)); #endif #ifdef PNG_PROGRESSIVE_READ_SUPPORTED /* Sets the function callbacks for the push reader, and a pointer to a * user-defined structure available to the callback functions. */ -extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, - png_voidp progressive_ptr, - png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, - png_progressive_end_ptr end_fn)); +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); /* Returns the user pointer associated with the push read functions */ -extern PNG_EXPORT(png_voidp,png_get_progressive_ptr) - PNGARG((png_structp png_ptr)); +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (png_const_structp png_ptr)); /* Function to be called when data becomes available */ -extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); +PNG_EXPORT(92, void, png_process_data, + (png_structp png_ptr, png_infop info_ptr, + png_bytep buffer, png_size_t buffer_size)); -/* Function that combines rows. Not very much different than the - * png_combine_row() call. Is this even used????? +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. */ -extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, - png_bytep old_row, png_bytep new_row)); +PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structp)); + +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_structp png_ptr, + png_bytep old_row, png_const_bytep new_row)); #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ -extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, - png_alloc_size_t size)) PNG_ALLOCATED; +PNG_EXPORTA(94, png_voidp, png_malloc, + (png_structp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED); /* Added at libpng version 1.4.0 */ -extern PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr, - png_alloc_size_t size)) PNG_ALLOCATED; +PNG_EXPORTA(95, png_voidp, png_calloc, + (png_structp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED); /* Added at libpng version 1.2.4 */ -extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, - png_alloc_size_t size)) PNG_ALLOCATED; +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_structp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); /* Frees a pointer allocated by png_malloc() */ -extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); +PNG_EXPORT(97, void, png_free, (png_structp png_ptr, png_voidp ptr)); /* Free data that was allocated internally */ -extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 free_me, int num)); +PNG_EXPORT(98, void, png_free_data, + (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)); + /* Reassign responsibility for freeing existing data, whether allocated * by libpng or by the application */ -extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, - png_infop info_ptr, int freer, png_uint_32 mask)); +PNG_EXPORT(99, void, png_data_freer, + (png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask)); + /* Assignments for png_data_freer */ #define PNG_DESTROY_WILL_FREE_DATA 1 #define PNG_SET_WILL_FREE_DATA 1 @@ -2088,46 +1603,56 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ #ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, - png_alloc_size_t size)) PNG_ALLOCATED; -extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, - png_voidp ptr)); +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_structp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +PNG_EXPORT(101, void, png_free_default, (png_structp png_ptr, png_voidp ptr)); #endif -#ifndef PNG_NO_ERROR_TEXT +#ifdef PNG_ERROR_TEXT_SUPPORTED /* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)) PNG_NORETURN; +PNG_EXPORTA(102, void, png_error, + (png_structp png_ptr, png_const_charp error_message), + PNG_NORETURN); /* The same, but the chunk name is prepended to the error string. */ -extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)) PNG_NORETURN; +PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr, + png_const_charp error_message), PNG_NORETURN); #else /* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; +PNG_EXPORTA(104, void, png_err, (png_structp png_ptr), PNG_NORETURN); #endif /* Non-fatal error in libpng. Can continue, but may have a problem. */ -extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); +PNG_EXPORT(105, void, png_warning, (png_structp png_ptr, + png_const_charp warning_message)); /* Non-fatal error in libpng, chunk name is prepended to message. */ -extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); +PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr, + png_const_charp warning_message)); #ifdef PNG_BENIGN_ERRORS_SUPPORTED /* Benign error in libpng. Can continue, but may have a problem. * User can choose whether to handle as a fatal error or as a warning. */ -extern PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); +# undef png_benign_error +PNG_EXPORT(107, void, png_benign_error, (png_structp png_ptr, + png_const_charp warning_message)); /* Same, chunk name is prepended to message. */ -extern PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); +# undef png_chunk_benign_error +PNG_EXPORT(108, void, png_chunk_benign_error, (png_structp png_ptr, + png_const_charp warning_message)); -extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp - png_ptr, int allowed)); +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif #endif /* The png_set_ functions are for storing values in the png_info_struct. @@ -2143,258 +1668,268 @@ extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp * png_info_struct. */ /* Returns "flag" if chunk data is valid in info_ptr. */ -extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, -png_infop info_ptr, png_uint_32 flag)); +PNG_EXPORT(110, png_uint_32, png_get_valid, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_32 flag)); /* Returns number of bytes needed to hold a transformed row. */ -extern PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr, + png_const_infop info_ptr)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* Returns row_pointers, which is an array of pointers to scanlines that was * returned from png_read_png(). */ -extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_EXPORT(112, png_bytepp, png_get_rows, + (png_const_structp png_ptr, png_const_infop info_ptr)); /* Set row_pointers, which is an array of pointers to scanlines for use * by png_write_png(). */ -extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytepp row_pointers)); +PNG_EXPORT(113, void, png_set_rows, (png_structp png_ptr, + png_infop info_ptr, png_bytepp row_pointers)); #endif /* Returns number of color channels in image. */ -extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_EXPORT(114, png_byte, png_get_channels, + (png_const_structp png_ptr, png_const_infop info_ptr)); #ifdef PNG_EASY_ACCESS_SUPPORTED /* Returns image width in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr, + png_const_infop info_ptr)); /* Returns image height in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr, + png_const_infop info_ptr)); /* Returns image bit_depth. */ -extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(117, png_byte, png_get_bit_depth, + (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image color_type. */ -extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); /* Returns image filter_type. */ -extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); /* Returns image interlace_type. */ -extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); /* Returns image compression_type. */ -extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr, + png_const_infop info_ptr)); /* Returns image resolution in pixels per meter, from pHYs chunk data. */ -extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns pixel aspect ratio, computed from pHYs chunk data. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -#endif +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ -extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structp png_ptr, png_const_infop info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structp png_ptr, png_const_infop info_ptr)); #endif /* PNG_EASY_ACCESS_SUPPORTED */ /* Returns pointer to signature string read from PNG header */ -extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_EXPORT(130, png_const_bytep, png_get_signature, + (png_const_structp png_ptr, png_infop info_ptr)); #ifdef PNG_bKGD_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p *background)); +PNG_EXPORT(131, png_uint_32, png_get_bKGD, + (png_const_structp png_ptr, png_infop info_ptr, + png_color_16p *background)); #endif #ifdef PNG_bKGD_SUPPORTED -extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p background)); +PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr, + png_const_color_16p background)); #endif #ifdef PNG_cHRM_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *white_x, double *white_y, double *red_x, - double *red_y, double *green_x, double *green_y, double *blue_x, - double *blue_y)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point - *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, - png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point - *int_blue_x, png_fixed_point *int_blue_y)); +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr, + png_const_infop info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)); +#ifdef PNG_FIXED_POINT_SUPPORTED /* Otherwise not implemented */ +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structp png_ptr, + png_const_infop info_ptr, png_fixed_point *int_white_x, + png_fixed_point *int_white_y, png_fixed_point *int_red_x, + png_fixed_point *int_red_y, png_fixed_point *int_green_x, + png_fixed_point *int_green_y, png_fixed_point *int_blue_x, + png_fixed_point *int_blue_y)); #endif #endif #ifdef PNG_cHRM_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double white_x, double white_y, double red_x, - double red_y, double green_x, double green_y, double blue_x, double blue_y)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); -#endif +PNG_FP_EXPORT(135, void, png_set_cHRM, + (png_structp png_ptr, png_infop info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)); +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); #endif #ifdef PNG_gAMA_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *file_gamma)); -#endif -extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point *int_file_gamma)); +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, + (png_const_structp png_ptr, png_const_infop info_ptr, + double *file_gamma)); +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_fixed_point *int_file_gamma)); #endif #ifdef PNG_gAMA_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double file_gamma)); -#endif -extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_file_gamma)); +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_structp png_ptr, + png_infop info_ptr, double file_gamma)); +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_file_gamma)); #endif #ifdef PNG_hIST_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p *hist)); +PNG_EXPORT(141, png_uint_32, png_get_hIST, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_16p *hist)); #endif #ifdef PNG_hIST_SUPPORTED -extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p hist)); +PNG_EXPORT(142, void, png_set_hIST, (png_structp png_ptr, + png_infop info_ptr, png_const_uint_16p hist)); #endif -extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, - int *bit_depth, int *color_type, int *interlace_method, - int *compression_method, int *filter_method)); +PNG_EXPORT(143, png_uint_32, png_get_IHDR, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, + int *interlace_method, int *compression_method, int *filter_method)); -extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_method, int compression_method, - int filter_method)); +PNG_EXPORT(144, void, png_set_IHDR, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, + int interlace_method, int compression_method, int filter_method)); #ifdef PNG_oFFs_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, - int *unit_type)); +PNG_EXPORT(145, png_uint_32, png_get_oFFs, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)); #endif #ifdef PNG_oFFs_SUPPORTED -extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, - int unit_type)); +PNG_EXPORT(146, void, png_set_oFFs, + (png_structp png_ptr, png_infop info_ptr, + png_int_32 offset_x, png_int_32 offset_y, int unit_type)); #endif #ifdef PNG_pCAL_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, - int *type, int *nparams, png_charp *units, png_charpp *params)); +PNG_EXPORT(147, png_uint_32, png_get_pCAL, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, + int *nparams, + png_charp *units, png_charpp *params)); #endif #ifdef PNG_pCAL_SUPPORTED -extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, - int type, int nparams, png_charp units, png_charpp params)); +PNG_EXPORT(148, void, png_set_pCAL, (png_structp png_ptr, + png_infop info_ptr, + png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, + int nparams, png_const_charp units, png_charpp params)); #endif #ifdef PNG_pHYs_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); +PNG_EXPORT(149, png_uint_32, png_get_pHYs, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif #ifdef PNG_pHYs_SUPPORTED -extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +PNG_EXPORT(150, void, png_set_pHYs, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 res_x, png_uint_32 res_y, int unit_type)); #endif -extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp *palette, int *num_palette)); +PNG_EXPORT(151, png_uint_32, png_get_PLTE, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_colorp *palette, int *num_palette)); -extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp palette, int num_palette)); +PNG_EXPORT(152, void, png_set_PLTE, + (png_structp png_ptr, png_infop info_ptr, + png_const_colorp palette, int num_palette)); #ifdef PNG_sBIT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p *sig_bit)); +PNG_EXPORT(153, png_uint_32, png_get_sBIT, + (png_const_structp png_ptr, png_infop info_ptr, + png_color_8p *sig_bit)); #endif #ifdef PNG_sBIT_SUPPORTED -extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p sig_bit)); +PNG_EXPORT(154, void, png_set_sBIT, + (png_structp png_ptr, png_infop info_ptr, png_const_color_8p sig_bit)); #endif #ifdef PNG_sRGB_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *intent)); +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr, + png_const_infop info_ptr, int *file_srgb_intent)); #endif #ifdef PNG_sRGB_SUPPORTED -extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); -extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); +PNG_EXPORT(156, void, png_set_sRGB, + (png_structp png_ptr, png_infop info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr, + png_infop info_ptr, int srgb_intent)); #endif #ifdef PNG_iCCP_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charpp name, int *compression_type, - png_charpp profile, png_uint_32 *proflen)); - /* Note to maintainer: profile should be png_bytepp */ +PNG_EXPORT(158, png_uint_32, png_get_iCCP, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_charpp name, int *compression_type, png_bytepp profile, + png_uint_32 *proflen)); #endif #ifdef PNG_iCCP_SUPPORTED -extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp name, int compression_type, - png_charp profile, png_uint_32 proflen)); - /* Note to maintainer: profile should be png_bytep */ +PNG_EXPORT(159, void, png_set_iCCP, + (png_structp png_ptr, png_infop info_ptr, + png_const_charp name, int compression_type, png_const_bytep profile, + png_uint_32 proflen)); #endif #ifdef PNG_sPLT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_sPLT_tpp entries)); +PNG_EXPORT(160, png_uint_32, png_get_sPLT, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_sPLT_tpp entries)); #endif #ifdef PNG_sPLT_SUPPORTED -extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_sPLT_tp entries, int nentries)); +PNG_EXPORT(161, void, png_set_sPLT, + (png_structp png_ptr, png_infop info_ptr, + png_const_sPLT_tp entries, int nentries)); #endif #ifdef PNG_TEXT_SUPPORTED /* png_get_text also returns the number of text chunks in *num_text */ -extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp *text_ptr, int *num_text)); +PNG_EXPORT(162, png_uint_32, png_get_text, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_textp *text_ptr, int *num_text)); #endif /* Note while png_set_text() will accept a structure whose text, @@ -2405,59 +1940,64 @@ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, */ #ifdef PNG_TEXT_SUPPORTED -extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)); +PNG_EXPORT(163, void, png_set_text, + (png_structp png_ptr, png_infop info_ptr, + png_const_textp text_ptr, int num_text)); #endif #ifdef PNG_tIME_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep *mod_time)); +PNG_EXPORT(164, png_uint_32, png_get_tIME, + (png_const_structp png_ptr, png_infop info_ptr, png_timep *mod_time)); #endif #ifdef PNG_tIME_SUPPORTED -extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep mod_time)); +PNG_EXPORT(165, void, png_set_tIME, + (png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time)); #endif #ifdef PNG_tRNS_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep *trans_alpha, int *num_trans, - png_color_16p *trans_color)); -#endif - -#ifdef PNG_tRNS_SUPPORTED -extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep trans_alpha, int num_trans, - png_color_16p trans_color)); +PNG_EXPORT(166, png_uint_32, png_get_tRNS, + (png_const_structp png_ptr, png_infop info_ptr, + png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)); #endif #ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, + (png_structp png_ptr, png_infop info_ptr, + png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); #endif #ifdef PNG_sCAL_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *unit, double *width, double *height)); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); -#endif +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, + (png_const_structp png_ptr, png_const_infop info_ptr, + int *unit, double *width, double *height)); +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_structp png_ptr, png_const_infop info_ptr, int *unit, + png_fixed_point *width, + png_fixed_point *height)); #endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structp png_ptr, png_const_infop info_ptr, + int *unit, png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, + (png_structp png_ptr, png_infop info_ptr, + int unit, double width, double height)); +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_structp png_ptr, + png_infop info_ptr, int unit, png_fixed_point width, + png_fixed_point height)); +PNG_EXPORT(171, void, png_set_sCAL_s, + (png_structp png_ptr, png_infop info_ptr, + int unit, png_const_charp swidth, png_const_charp sheight)); #endif /* PNG_sCAL_SUPPORTED */ -#ifdef PNG_sCAL_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, int unit, double width, double height)); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, - png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); -#endif -#endif -#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */ - #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED /* Provide a list of chunks and how they are to be handled, if the built-in handling or default unknown chunk handling is not desired. Any chunks not @@ -2468,48 +2008,49 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, = 2: keep only if safe-to-copy = 3: keep even if unsafe-to-copy */ -extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp - png_ptr, int keep, png_bytep chunk_list, int num_chunks)); -PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep - chunk_name)); +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, + (png_structp png_ptr, int keep, + png_const_bytep chunk_list, int num_chunks)); +PNG_EXPORT(173, int, png_handle_as_unknown, (png_structp png_ptr, + png_const_bytep chunk_name)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); -extern PNG_EXPORT(void, png_set_unknown_chunk_location) - PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); -extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp - png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr, + png_infop info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_structp png_ptr, png_infop info_ptr, int chunk, int location)); +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr, + png_const_infop info_ptr, png_unknown_chunkpp entries)); #endif /* Png_free_data() will turn off the "valid" flag for anything it frees. * If you need to turn it off for a chunk that your application has freed, * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ -extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, - png_infop info_ptr, int mask)); +PNG_EXPORT(177, void, png_set_invalid, + (png_structp png_ptr, png_infop info_ptr, int mask)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ -extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, - png_infop info_ptr, - int transforms, - png_voidp params)); -extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, - png_infop info_ptr, - int transforms, - png_voidp params)); +PNG_EXPORT(178, void, png_read_png, (png_structp png_ptr, png_infop info_ptr, + int transforms, png_voidp params)); +PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr, + int transforms, png_voidp params)); #endif -extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp - png_ptr)); -extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp - png_ptr, png_uint_32 mng_features_permitted)); +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr, + png_uint_32 mng_features_permitted)); #endif /* For use in png_set_keep_unknown, added to version 1.2.6 */ @@ -2522,74 +2063,136 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp * messages before passing them to the error or warning handler. */ #ifdef PNG_ERROR_NUMBERS_SUPPORTED -extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp - png_ptr, png_uint_32 strip_mode)); +PNG_EXPORT(185, void, png_set_strip_error_numbers, + (png_structp png_ptr, + png_uint_32 strip_mode)); #endif /* Added in libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED -extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp - png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); -extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp - png_ptr)); -extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp - png_ptr)); +PNG_EXPORT(186, void, png_set_user_limits, (png_structp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structp png_ptr)); /* Added in libpng-1.4.0 */ -extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp - png_ptr, png_uint_32 user_chunk_cache_max)); -extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max) - PNGARG((png_structp png_ptr)); +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structp png_ptr)); /* Added in libpng-1.4.1 */ -extern PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp - png_ptr, png_alloc_size_t user_chunk_cache_max)); -extern PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max) - PNGARG((png_structp png_ptr)); +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structp png_ptr)); #endif -#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) -PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(png_uint_32,png_get_x_pixels_per_inch) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(png_uint_32,png_get_y_pixels_per_inch) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structp png_ptr, png_const_infop info_ptr)); -PNG_EXPORT(float,png_get_x_offset_inches) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structp png_ptr, png_const_infop info_ptr)); +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_structp png_ptr, png_const_infop info_ptr)); +#endif -PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr, -png_infop info_ptr)); +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr, + png_const_infop info_ptr)); +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_structp png_ptr, png_const_infop info_ptr)); +#endif -#ifdef PNG_pHYs_SUPPORTED -PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr, -png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); -#endif /* PNG_pHYs_SUPPORTED */ -#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr, + png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* PNG_pHYs_SUPPORTED */ +#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */ /* Added in libpng-1.4.0 */ #ifdef PNG_IO_STATE_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr)); +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_structp png_ptr)); -extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) - PNGARG((png_structp png_ptr)); +PNG_EXPORTA(200, png_const_bytep, png_get_io_chunk_name, + (png_structp png_ptr), PNG_DEPRECATED); +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structp png_ptr)); /* The flags returned by png_get_io_state() are the following: */ -#define PNG_IO_NONE 0x0000 /* no I/O at this moment */ -#define PNG_IO_READING 0x0001 /* currently reading */ -#define PNG_IO_WRITING 0x0002 /* currently writing */ -#define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ -#define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ -#define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ -#define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ -#define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ -#define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ #endif /* ?PNG_IO_STATE_SUPPORTED */ -/* Maintainer: Put new public prototypes here ^, in libpng.3, and project - * defs +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) + +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \ + (((yIn)<>(((7-(off))-(pass))<<2)) & 0xFU) | \ + ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED /* With these routines we avoid an integer divide, which will be slower on @@ -2604,7 +2207,7 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] */ - /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ # define png_composite(composite, fg, alpha, bg) \ { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ @@ -2622,75 +2225,80 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name) #else /* Standard method using integer division */ -# define png_composite(composite, fg, alpha, bg) \ - (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ - (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ - (png_uint_16)127) / 255) +# define png_composite(composite, fg, alpha, bg) \ + (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + (png_uint_16)127) / 255) # define png_composite_16(composite, fg, alpha, bg) \ (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ - (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ - (png_uint_32)32767) / (png_uint_32)65535L) + (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ + (png_uint_32)32767) / (png_uint_32)65535L) #endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_structp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + #ifdef PNG_USE_READ_MACROS /* Inline macros to do direct reads of bytes from the input buffer. * The png_get_int_32() routine assumes we are using two's complement * format for negative values, which is almost certainly true. */ -/* We could make special-case BIG_ENDIAN macros that do direct reads here */ # define png_get_uint_32(buf) \ (((png_uint_32)(*(buf)) << 24) + \ ((png_uint_32)(*((buf) + 1)) << 16) + \ ((png_uint_32)(*((buf) + 2)) << 8) + \ ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ # define png_get_uint_16(buf) \ - (((png_uint_32)(*(buf)) << 8) + \ - ((png_uint_32)(*((buf) + 1)))) -#ifdef PNG_GET_INT_32_SUPPORTED + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + # define png_get_int_32(buf) \ - (((png_int_32)(*(buf)) << 24) + \ - ((png_int_32)(*((buf) + 1)) << 16) + \ - ((png_int_32)(*((buf) + 2)) << 8) + \ - ((png_int_32)(*((buf) + 3)))) + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \ + : (png_int_32)png_get_uint_32(buf))) #endif -#else -extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); -extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); -#ifdef PNG_GET_INT_32_SUPPORTED -extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); -#endif -#endif -extern PNG_EXPORT(png_uint_32,png_get_uint_31) - PNGARG((png_structp png_ptr, png_bytep buf)); -/* No png_get_int_16 -- may be added if there's a real need for it. */ -/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ -extern PNG_EXPORT(void,png_save_uint_32) - PNGARG((png_bytep buf, png_uint_32 i)); -extern PNG_EXPORT(void,png_save_int_32) - PNGARG((png_bytep buf, png_int_32 i)); - -/* Place a 16-bit number into a buffer in PNG byte order. - * The parameter is declared unsigned int, not png_uint_16, - * just to avoid potential problems on pre-ANSI C compilers. +/* Maintainer: Put new public prototypes here ^, in libpng.3, and project + * defs */ -extern PNG_EXPORT(void,png_save_uint_16) - PNGARG((png_bytep buf, unsigned int i)); -/* No png_save_int_16 -- may be added if there's a real need for it. */ -/* ************************************************************************* */ - -/* Various modes of operation. Note that after an init, mode is set to - * zero automatically when the structure is created. +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) Maintainer, remember to add an entry to + * scripts/symbols.def as well. */ -#define PNG_HAVE_IHDR 0x01 -#define PNG_HAVE_PLTE 0x02 -#define PNG_HAVE_IDAT 0x04 -#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */ -#define PNG_HAVE_IEND 0x10 -#define PNG_HAVE_gAMA 0x20 -#define PNG_HAVE_cHRM 0x40 +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(221); +#endif #ifdef __cplusplus } diff --git a/include/reactos/libs/libpng/pngconf.h b/include/reactos/libs/libpng/pngconf.h index 0c1065cfb47..c82fa5866c1 100644 --- a/include/reactos/libs/libpng/pngconf.h +++ b/include/reactos/libs/libpng/pngconf.h @@ -1,9 +1,9 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.4.3 - June 26, 2010 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * libpng version 1.5.2 - March 31, 2011 + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -22,282 +22,57 @@ #ifndef PNGCONF_H #define PNGCONF_H -#ifndef PNG_NO_LIMITS_H -# include -#endif - -/* Added at libpng-1.2.9 */ - -/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" - * script. +#ifndef PNG_BUILDING_SYMBOL_TABLE +/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C + * definition file for machine specific limits, this may impact the + * correctness of the definitons below (see uses of INT_MAX). */ -#ifdef PNG_CONFIGURE_LIBPNG -# ifdef HAVE_CONFIG_H -# include "config.h" -# endif -#endif - -/* - * Added at libpng-1.2.8 - * - * PNG_USER_CONFIG has to be defined on the compiler command line. This - * includes the resource compiler for Windows DLL configurations. - */ -#ifdef PNG_USER_CONFIG -# ifndef PNG_USER_PRIVATEBUILD -# define PNG_USER_PRIVATEBUILD -# endif -# include "pngusr.h" -#endif - -/* - * If you create a private DLL you need to define in "pngusr.h" the followings: - * #define PNG_USER_PRIVATEBUILD - * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons." - * #define PNG_USER_DLLFNAME_POSTFIX - * e.g. // private DLL "libpng13gx.dll" - * #define PNG_USER_DLLFNAME_POSTFIX "gx" - * - * The following macros are also at your disposal if you want to complete the - * DLL VERSIONINFO structure. - * - PNG_USER_VERSIONINFO_COMMENTS - * - PNG_USER_VERSIONINFO_COMPANYNAME - * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS - */ - -#ifdef __STDC__ -# ifdef SPECIALBUILD -# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\ - are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.") +# ifndef PNG_NO_LIMITS_H +# include # endif -# ifdef PRIVATEBUILD -# pragma message("PRIVATEBUILD is deprecated.\ - Use PNG_USER_PRIVATEBUILD instead.") -# define PNG_USER_PRIVATEBUILD PRIVATEBUILD -# endif -#endif /* __STDC__ */ - -/* End of material added to libpng-1.2.8 */ - -#ifndef PNG_VERSION_INFO_ONLY - -/* This is the size of the compression buffer, and thus the size of - * an IDAT chunk. Make this whatever size you feel is best for your - * machine. One of these will be allocated per png_struct. When this - * is full, it writes the data to the disk, and does some other - * calculations. Making this an extremely small size will slow - * the library down, but you may want to experiment to determine - * where it becomes significant, if you are concerned with memory - * usage. Note that zlib allocates at least 32Kb also. For readers, - * this describes the size of the buffer available to read the data in. - * Unless this gets smaller than the size of a row (compressed), - * it should not make much difference how big this is. +/* For the memory copy APIs (i.e. the standard definitions of these), + * because this file defines png_memcpy and so on the base APIs must + * be defined here. */ - -#ifndef PNG_ZBUF_SIZE -# define PNG_ZBUF_SIZE 8192 -#endif - -/* Enable if you want a write-only libpng */ - -#ifndef PNG_NO_READ_SUPPORTED -# define PNG_READ_SUPPORTED -#endif - -/* Enable if you want a read-only libpng */ - -#ifndef PNG_NO_WRITE_SUPPORTED -# define PNG_WRITE_SUPPORTED -#endif - -/* Enabled in 1.4.0. */ -#ifdef PNG_ALLOW_BENIGN_ERRORS -# define png_benign_error png_warning -# define png_chunk_benign_error png_chunk_warning -#else -# ifndef PNG_BENIGN_ERRORS_SUPPORTED -# define png_benign_error png_error -# define png_chunk_benign_error png_chunk_error -# endif -#endif - -/* Added at libpng version 1.4.0 */ -#if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED) -# define PNG_WARNINGS_SUPPORTED -#endif - -/* Added at libpng version 1.4.0 */ -#if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED) -# define PNG_ERROR_TEXT_SUPPORTED -#endif - -/* Added at libpng version 1.4.0 */ -#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED) -# define PNG_CHECK_cHRM_SUPPORTED -#endif - -/* Added at libpng version 1.4.0 */ -#if !defined(PNG_NO_ALIGNED_MEMORY) && !defined(PNG_ALIGNED_MEMORY_SUPPORTED) -# define PNG_ALIGNED_MEMORY_SUPPORTED -#endif - -/* Enabled by default in 1.2.0. You can disable this if you don't need to - support PNGs that are embedded in MNG datastreams */ -#ifndef PNG_NO_MNG_FEATURES -# ifndef PNG_MNG_FEATURES_SUPPORTED -# define PNG_MNG_FEATURES_SUPPORTED -# endif -#endif - -/* Added at libpng version 1.4.0 */ -#ifndef PNG_NO_FLOATING_POINT_SUPPORTED -# ifndef PNG_FLOATING_POINT_SUPPORTED -# define PNG_FLOATING_POINT_SUPPORTED -# endif -#endif - -/* Added at libpng-1.4.0beta49 for testing (this test is no longer used - in libpng and png_calloc() is always present) - */ -#define PNG_CALLOC_SUPPORTED - -/* If you are running on a machine where you cannot allocate more - * than 64K of memory at once, uncomment this. While libpng will not - * normally need that much memory in a chunk (unless you load up a very - * large file), zlib needs to know how big of a chunk it can use, and - * libpng thus makes sure to check any memory allocation to verify it - * will fit into memory. -#define PNG_MAX_MALLOC_64K - */ -#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) -# define PNG_MAX_MALLOC_64K -#endif - -/* Special munging to support doing things the 'cygwin' way: - * 'Normal' png-on-win32 defines/defaults: - * PNG_BUILD_DLL -- building dll - * PNG_USE_DLL -- building an application, linking to dll - * (no define) -- building static library, or building an - * application and linking to the static lib - * 'Cygwin' defines/defaults: - * PNG_BUILD_DLL -- (ignored) building the dll - * (no define) -- (ignored) building an application, linking to the dll - * PNG_STATIC -- (ignored) building the static lib, or building an - * application that links to the static lib. - * ALL_STATIC -- (ignored) building various static libs, or building an - * application that links to the static libs. - * Thus, - * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and - * this bit of #ifdefs will define the 'correct' config variables based on - * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but - * unnecessary. - * - * Also, the precedence order is: - * ALL_STATIC (since we can't #undef something outside our namespace) - * PNG_BUILD_DLL - * PNG_STATIC - * (nothing) == PNG_USE_DLL - * - * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent - * of auto-import in binutils, we no longer need to worry about - * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore, - * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes - * to __declspec() stuff. However, we DO need to worry about - * PNG_BUILD_DLL and PNG_STATIC because those change some defaults - * such as CONSOLE_IO. - */ -#ifdef __CYGWIN__ -# ifdef ALL_STATIC -# ifdef PNG_BUILD_DLL -# undef PNG_BUILD_DLL -# endif -# ifdef PNG_USE_DLL -# undef PNG_USE_DLL -# endif -# ifdef PNG_DLL -# undef PNG_DLL -# endif -# ifndef PNG_STATIC -# define PNG_STATIC -# endif +# ifdef BSD +# include # else -# ifdef PNG_BUILD_DLL -# ifdef PNG_STATIC -# undef PNG_STATIC -# endif -# ifdef PNG_USE_DLL -# undef PNG_USE_DLL -# endif -# ifndef PNG_DLL -# define PNG_DLL -# endif -# else -# ifdef PNG_STATIC -# ifdef PNG_USE_DLL -# undef PNG_USE_DLL -# endif -# ifdef PNG_DLL -# undef PNG_DLL -# endif -# else -# ifndef PNG_USE_DLL -# define PNG_USE_DLL -# endif -# ifndef PNG_DLL -# define PNG_DLL -# endif -# endif -# endif +# include # endif -#endif -/* This protects us against compilers that run on a windowing system - * and thus don't have or would rather us not use the stdio types: - * stdin, stdout, and stderr. The only one currently used is stderr - * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will - * prevent these from being compiled and used. #defining PNG_NO_STDIO - * will also prevent these, plus will prevent the entire set of stdio - * macros and functions (FILE *, printf, etc.) from being compiled and used, - * unless (PNG_DEBUG > 0) has been #defined. - * - * #define PNG_NO_CONSOLE_IO - * #define PNG_NO_STDIO +/* For png_FILE_p - this provides the standard definition of a + * FILE */ - -#if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED) -# define PNG_STDIO_SUPPORTED -#endif - - -#ifdef PNG_BUILD_DLL -# if !defined(PNG_CONSOLE_IO_SUPPORTED) && !defined(PNG_NO_CONSOLE_IO) -# define PNG_NO_CONSOLE_IO -# endif -#endif - -# ifdef PNG_NO_STDIO -# ifndef PNG_NO_CONSOLE_IO -# define PNG_NO_CONSOLE_IO -# endif -# ifdef PNG_DEBUG -# if (PNG_DEBUG > 0) -# include -# endif -# endif -# else +# ifdef PNG_STDIO_SUPPORTED # include # endif - -#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED) -# define PNG_CONSOLE_IO_SUPPORTED #endif -/* This macro protects us against machines that don't have function +/* This controls optimization of the reading of 16 and 32 bit values + * from PNG files. It can be set on a per-app-file basis - it + * just changes whether a macro is used to the function is called. + * The library builder sets the default, if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro protects us against machines that don't have function * prototypes (ie K&R style headers). If your compiler does not handle * function prototypes, define this macro and use the included ansi2knr. * I've always been able to use _NO_PROTO as the indicator, but you may @@ -306,142 +81,399 @@ */ #ifndef PNGARG -#ifdef OF /* zlib prototype munger */ -# define PNGARG(arglist) OF(arglist) -#else +# ifdef OF /* zlib prototype munger */ +# define PNGARG(arglist) OF(arglist) +# else -#ifdef _NO_PROTO -# define PNGARG(arglist) () -#else -# define PNGARG(arglist) arglist -#endif /* _NO_PROTO */ +# ifdef _NO_PROTO +# define PNGARG(arglist) () +# else +# define PNGARG(arglist) arglist +# endif /* _NO_PROTO */ -#endif /* OF */ +# endif /* OF */ #endif /* PNGARG */ -/* Try to determine if we are compiling on a Mac. Note that testing for - * just __MWERKS__ is not good enough, because the Codewarrior is now used - * on non-Mac platforms. +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows sytems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. */ -#ifndef MACOS -# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ - defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) -# define MACOS + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows/x86 systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\ + defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\ + ( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\ + defined(_M_X64) || defined(_M_IA64) ) + /* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes + * builds under Cygwin or MinGW. Also includes Watcom builds but these need + * special treatment because they are not compatible with GCC or Visual C + * because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) + ERROR: PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed +# endif + +# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ + (defined(__BORLANDC__) && __BORLANDC__ < 0x500) + /* older Borland and MSC + * compilers used '__export' and required this to be after + * the type. + */ +# ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP +# endif +# define PNG_DLL_EXPORT __export +# else /* newer compiler */ +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif +# endif /* compiler */ + +#else /* !Windows/x86 */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* The default for PNG_IMPEXP depends on whether the library is + * being built or used. + */ +#ifndef PNG_IMPEXP +# ifdef PNGLIB_BUILD + /* Building the library */ +# if (defined(DLL_EXPORT)/*from libtool*/ ||\ + defined(_WINDLL) || defined(_DLL) || defined(__DLL__) ||\ + defined(_USRDLL) ||\ + defined(PNG_BUILD_DLL)) && defined(PNG_DLL_EXPORT) + /* Building a DLL. */ +# define PNG_IMPEXP PNG_DLL_EXPORT +# endif /* DLL */ +# else + /* Using the library */ +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP # endif #endif -/* Enough people need this for various reasons to include it here */ -#if !defined(MACOS) && !defined(RISCOS) -# include +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) + */ +#ifndef PNG_FUNCTION +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args #endif -/* PNG_SETJMP_NOT_SUPPORTED and PNG_NO_SETJMP_SUPPORTED are deprecated. */ -#if !defined(PNG_NO_SETJMP) && \ - !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED) -# define PNG_SETJMP_SUPPORTED +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type #endif -#ifdef PNG_SETJMP_SUPPORTED -/* This is an attempt to force a single setjmp behaviour on Linux. If - * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ +#ifndef PNG_EXPORTA + +# define PNG_EXPORTA(ordinal, type, name, args, attributes)\ + PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \ + extern attributes) +#endif + +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + +#define PNG_EXPORT(ordinal, type, name, args)\ + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. * - * You can bypass this test if you know that your application uses exactly - * the same setjmp.h that was included when libpng was built. Only define - * PNG_SKIP_SETJMP_CHECK while building your application, prior to the - * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK - * while building a separate libpng library for general use. + * Added at libpng-1.2.41. */ -# ifndef PNG_SKIP_SETJMP_CHECK -# ifdef __linux__ -# ifdef _BSD_SOURCE -# define PNG_SAVE_BSD_SOURCE -# undef _BSD_SOURCE -# endif -# ifdef _SETJMP_H - /* If you encounter a compiler error here, see the explanation - * near the end of INSTALL. - */ - __pngconf.h__ in libpng already includes setjmp.h; - __dont__ include it again.; -# endif -# endif /* __linux__ */ -# endif /* PNG_SKIP_SETJMP_CHECK */ +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif - /* Include setjmp.h for error handling */ -# include - -# ifdef __linux__ -# ifdef PNG_SAVE_BSD_SOURCE -# ifdef _BSD_SOURCE -# undef _BSD_SOURCE -# endif -# define _BSD_SOURCE -# undef PNG_SAVE_BSD_SOURCE +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. + */ +# if defined(__GNUC__) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# ifndef PNG_PTR_NORETURN + /* It's not enough to have the compiler be the correct compiler at + * this point - it's necessary for the library (which defines + * the type of the library longjmp) to also be the GNU library. + * This is because many systems use the GNU compiler with a + * non-GNU libc implementation. Min/GW headers are also compatible + * with GCC as well as uclibc, so it seems best to exclude known + * problem libcs here rather than just including known libcs. + * + * NOTE: this relies on the only use of PNG_PTR_NORETURN being with + * the system longjmp. If the same type is used elsewhere then this + * will need to be changed. + */ +# if !defined(__CYGWIN__) +# define PNG_PTR_NORETURN __attribute__((__noreturn__)) +# endif +# endif +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) # endif -# endif /* __linux__ */ -#endif /* PNG_SETJMP_SUPPORTED */ -#ifdef BSD -# include -#else -# include -#endif + /* This specifically protects structure members that should only be + * accessed from within the library, therefore should be empty during + * a library build. + */ +# ifndef PNGLIB_BUILD +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif +# endif /* PNGLIB_BUILD */ +# endif /* __GNUC__ */ -/* Other defines for things like memory and the like can go here. */ +# if defined(_MSC_VER) && (_MSC_VER >= 1300) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* not supported */ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_PTR_NORETURN +# define PNG_PTR_NORETURN /* not supported */ +# endif +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __declspec(restrict) +# endif -/* This controls how fine the quantizing gets. As this allocates - * a largish chunk of memory (32K), those who are not as concerned - * with quantizing quality can decrease some or all of these. - */ + /* This specifically protects structure members that should only be + * accessed from within the library, therefore should be empty during + * a library build. + */ +# ifndef PNGLIB_BUILD +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif +# endif /* PNGLIB_BUILD */ +# endif /* _MSC_VER */ +#endif /* PNG_PEDANTIC_WARNINGS */ -/* Prior to libpng-1.4.2, these were PNG_DITHER_*_BITS - * These migration aids will be removed from libpng-1.5.0. - */ -#ifdef PNG_DITHER_RED_BITS -# define PNG_QUANTIZE_RED_BITS PNG_DITHER_RED_BITS +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ #endif -#ifdef PNG_DITHER_GREEN_BITS -# define PNG_QUANTIZE_GREEN_BITS PNG_DITHER_GREEN_BITS +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ #endif -#ifdef PNG_DITHER_BLUE_BITS -# define PNG_QUANTIZE_BLUE_BITS PNG_DITHER_BLUE_BITS +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ #endif - -#ifndef PNG_QUANTIZE_RED_BITS -# define PNG_QUANTIZE_RED_BITS 5 +#ifndef PNG_PTR_NORETURN +# define PNG_PTR_NORETURN /* This function does not return */ #endif -#ifndef PNG_QUANTIZE_GREEN_BITS -# define PNG_QUANTIZE_GREEN_BITS 5 +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ #endif -#ifndef PNG_QUANTIZE_BLUE_BITS -# define PNG_QUANTIZE_BLUE_BITS 5 +#ifndef PNG_DEPSTRUCT +# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ #endif - -/* This controls how fine the gamma correction becomes when you - * are only interested in 8 bits anyway. Increasing this value - * results in more memory being used, and more pow() functions - * being called to fill in the gamma tables. Don't set this value - * less then 8, and even that may not work (I haven't tested it). - */ - -#ifndef PNG_MAX_GAMMA_8 -# define PNG_MAX_GAMMA_8 11 +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ #endif - -/* This controls how much a difference in gamma we can tolerate before - * we actually start doing gamma conversion. - */ -#ifndef PNG_GAMMA_THRESHOLD -# define PNG_GAMMA_THRESHOLD 0.05 +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args) +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args) +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif #endif /* The following uses const char * instead of char * for error * and warning message functions, so some compilers won't complain. * If you do not want to use const, define PNG_NO_CONST here. + * + * This should not change how the APIs are called, so it can be done + * on a per-file basis in the application. */ - #ifndef PNG_CONST # ifndef PNG_NO_CONST # define PNG_CONST const @@ -450,646 +482,6 @@ # endif #endif -/* The following defines give you the ability to remove code from the - * library that you will not be using. I wish I could figure out how to - * automate this, but I can't do that without making it seriously hard - * on the users. So if you are not using an ability, change the #define - * to and #undef, and that part of the library will not be compiled. If - * your linker can't find a function, you may want to make sure the - * ability is defined here. Some of these depend upon some others being - * defined. I haven't figured out all the interactions here, so you may - * have to experiment awhile to get everything to compile. If you are - * creating or using a shared library, you probably shouldn't touch this, - * as it will affect the size of the structures, and this will cause bad - * things to happen if the library and/or application ever change. - */ - -/* Any features you will not be using can be undef'ed here */ - -/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user - * to turn it off with PNG_NO_READ|WRITE_TRANSFORMS on the compile line, - * then pick and choose which ones to define without having to edit this - * file. It is safe to use the PNG_NO_READ|WRITE_TRANSFORMS - * if you only want to have a png-compliant reader/writer but don't need - * any of the extra transformations. This saves about 80 kbytes in a - * typical installation of the library. (PNG_NO_* form added in version - * 1.0.1c, for consistency; PNG_*_TRANSFORMS_NOT_SUPPORTED deprecated in - * 1.4.0) - */ - -/* Ignore attempt to turn off both floating and fixed point support */ -#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ - !defined(PNG_NO_FIXED_POINT_SUPPORTED) -# define PNG_FIXED_POINT_SUPPORTED -#endif - -#ifdef PNG_READ_SUPPORTED - -/* PNG_READ_TRANSFORMS_NOT_SUPPORTED is deprecated. */ -#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \ - !defined(PNG_NO_READ_TRANSFORMS) -# define PNG_READ_TRANSFORMS_SUPPORTED -#endif - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -# ifndef PNG_NO_READ_EXPAND -# define PNG_READ_EXPAND_SUPPORTED -# endif -# ifndef PNG_NO_READ_SHIFT -# define PNG_READ_SHIFT_SUPPORTED -# endif -# ifndef PNG_NO_READ_PACK -# define PNG_READ_PACK_SUPPORTED -# endif -# ifndef PNG_NO_READ_BGR -# define PNG_READ_BGR_SUPPORTED -# endif -# ifndef PNG_NO_READ_SWAP -# define PNG_READ_SWAP_SUPPORTED -# endif -# ifndef PNG_NO_READ_PACKSWAP -# define PNG_READ_PACKSWAP_SUPPORTED -# endif -# ifndef PNG_NO_READ_INVERT -# define PNG_READ_INVERT_SUPPORTED -# endif -# ifndef PNG_NO_READ_QUANTIZE - /* Prior to libpng-1.4.0 this was PNG_READ_DITHER_SUPPORTED */ -# ifndef PNG_NO_READ_DITHER /* This migration aid will be removed */ -# define PNG_READ_QUANTIZE_SUPPORTED -# endif -# endif -# ifndef PNG_NO_READ_BACKGROUND -# define PNG_READ_BACKGROUND_SUPPORTED -# endif -# ifndef PNG_NO_READ_16_TO_8 -# define PNG_READ_16_TO_8_SUPPORTED -# endif -# ifndef PNG_NO_READ_FILLER -# define PNG_READ_FILLER_SUPPORTED -# endif -# ifndef PNG_NO_READ_GAMMA -# define PNG_READ_GAMMA_SUPPORTED -# endif -# ifndef PNG_NO_READ_GRAY_TO_RGB -# define PNG_READ_GRAY_TO_RGB_SUPPORTED -# endif -# ifndef PNG_NO_READ_SWAP_ALPHA -# define PNG_READ_SWAP_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_READ_INVERT_ALPHA -# define PNG_READ_INVERT_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_READ_STRIP_ALPHA -# define PNG_READ_STRIP_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_READ_USER_TRANSFORM -# define PNG_READ_USER_TRANSFORM_SUPPORTED -# endif -# ifndef PNG_NO_READ_RGB_TO_GRAY -# define PNG_READ_RGB_TO_GRAY_SUPPORTED -# endif -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - -/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */ -#if !defined(PNG_NO_PROGRESSIVE_READ) && \ - !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */ -# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ -#endif /* about interlacing capability! You'll */ - /* still have interlacing unless you change the following define: */ - -#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ - -/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */ -#if !defined(PNG_NO_SEQUENTIAL_READ) && \ - !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \ - !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED) -# define PNG_SEQUENTIAL_READ_SUPPORTED -#endif - -#ifndef PNG_NO_READ_COMPOSITE_NODIV -# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */ -# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ -# endif -#endif - -#if !defined(PNG_NO_GET_INT_32) || defined(PNG_READ_oFFS_SUPPORTED) || \ - defined(PNG_READ_pCAL_SUPPORTED) -# ifndef PNG_GET_INT_32_SUPPORTED -# define PNG_GET_INT_32_SUPPORTED -# endif -#endif - -#endif /* PNG_READ_SUPPORTED */ - -#ifdef PNG_WRITE_SUPPORTED - -/* PNG_WRITE_TRANSFORMS_NOT_SUPPORTED is deprecated. */ -#if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ - !defined(PNG_NO_WRITE_TRANSFORMS) -# define PNG_WRITE_TRANSFORMS_SUPPORTED -#endif - -#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED -# ifndef PNG_NO_WRITE_SHIFT -# define PNG_WRITE_SHIFT_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_PACK -# define PNG_WRITE_PACK_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_BGR -# define PNG_WRITE_BGR_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_SWAP -# define PNG_WRITE_SWAP_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_PACKSWAP -# define PNG_WRITE_PACKSWAP_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_INVERT -# define PNG_WRITE_INVERT_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_FILLER -# define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */ -# endif -# ifndef PNG_NO_WRITE_SWAP_ALPHA -# define PNG_WRITE_SWAP_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_INVERT_ALPHA -# define PNG_WRITE_INVERT_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_USER_TRANSFORM -# define PNG_WRITE_USER_TRANSFORM_SUPPORTED -# endif -#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ - -#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \ - !defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* This is not required for PNG-compliant encoders, but can cause - * trouble if left undefined - */ -# define PNG_WRITE_INTERLACING_SUPPORTED -#endif - -#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ - !defined(PNG_WRITE_WEIGHTED_FILTER) && \ - defined(PNG_FLOATING_POINT_SUPPORTED) -# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED -#endif - -#ifndef PNG_NO_WRITE_FLUSH -# define PNG_WRITE_FLUSH_SUPPORTED -#endif - -#if !defined(PNG_NO_SAVE_INT_32) || defined(PNG_WRITE_oFFS_SUPPORTED) || \ - defined(PNG_WRITE_pCAL_SUPPORTED) -# ifndef PNG_SAVE_INT_32_SUPPORTED -# define PNG_SAVE_INT_32_SUPPORTED -# endif -#endif - -#endif /* PNG_WRITE_SUPPORTED */ - -#define PNG_NO_ERROR_NUMBERS - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -# ifndef PNG_NO_USER_TRANSFORM_PTR -# define PNG_USER_TRANSFORM_PTR_SUPPORTED -# endif -#endif - -#if defined(PNG_STDIO_SUPPORTED) && !defined(PNG_TIME_RFC1123_SUPPORTED) -# define PNG_TIME_RFC1123_SUPPORTED -#endif - -/* This adds extra functions in pngget.c for accessing data from the - * info pointer (added in version 0.99) - * png_get_image_width() - * png_get_image_height() - * png_get_bit_depth() - * png_get_color_type() - * png_get_compression_type() - * png_get_filter_type() - * png_get_interlace_type() - * png_get_pixel_aspect_ratio() - * png_get_pixels_per_meter() - * png_get_x_offset_pixels() - * png_get_y_offset_pixels() - * png_get_x_offset_microns() - * png_get_y_offset_microns() - */ -#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED) -# define PNG_EASY_ACCESS_SUPPORTED -#endif - -/* Added at libpng-1.2.0 */ -#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) -# define PNG_USER_MEM_SUPPORTED -#endif - -/* Added at libpng-1.2.6 */ -#ifndef PNG_NO_SET_USER_LIMITS -# ifndef PNG_SET_USER_LIMITS_SUPPORTED -# define PNG_SET_USER_LIMITS_SUPPORTED -# endif - /* Feature added at libpng-1.4.0, this flag added at 1.4.1 */ -# ifndef PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED -# define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED -# endif - /* Feature added at libpng-1.4.1, this flag added at 1.4.1 */ -# ifndef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED -# define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED -# endif -#endif - -/* Added at libpng-1.2.43 */ -#ifndef PNG_USER_LIMITS_SUPPORTED -# ifndef PNG_NO_USER_LIMITS -# define PNG_USER_LIMITS_SUPPORTED -# endif -#endif - -/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter - * how large, set these two limits to 0x7fffffffL - */ -#ifndef PNG_USER_WIDTH_MAX -# define PNG_USER_WIDTH_MAX 1000000L -#endif -#ifndef PNG_USER_HEIGHT_MAX -# define PNG_USER_HEIGHT_MAX 1000000L -#endif - -/* Added at libpng-1.2.43. To accept all valid PNGs no matter - * how large, set these two limits to 0. - */ -#ifndef PNG_USER_CHUNK_CACHE_MAX -# define PNG_USER_CHUNK_CACHE_MAX 0 -#endif - -/* Added at libpng-1.2.43 */ -#ifndef PNG_USER_CHUNK_MALLOC_MAX -# define PNG_USER_CHUNK_MALLOC_MAX 0 -#endif - -/* Added at libpng-1.4.0 */ -#if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED) -# define PNG_IO_STATE_SUPPORTED -#endif - -#ifndef PNG_LITERAL_SHARP -# define PNG_LITERAL_SHARP 0x23 -#endif -#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET -# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b -#endif -#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET -# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d -#endif -#ifndef PNG_STRING_NEWLINE -#define PNG_STRING_NEWLINE "\n" -#endif - -/* These are currently experimental features, define them if you want */ - -/* Very little testing */ -/* -#ifdef PNG_READ_SUPPORTED -# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -# endif -#endif -*/ - -/* This is only for PowerPC big-endian and 680x0 systems */ -/* some testing */ -/* -#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED -# define PNG_READ_BIG_ENDIAN_SUPPORTED -#endif -*/ - -#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) -# define PNG_USE_READ_MACROS -#endif - -/* Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING */ - -#if !defined(PNG_NO_POINTER_INDEXING) && \ - !defined(PNG_POINTER_INDEXING_SUPPORTED) -# define PNG_POINTER_INDEXING_SUPPORTED -#endif - - -/* Any chunks you are not interested in, you can undef here. The - * ones that allocate memory may be expecially important (hIST, - * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info - * a bit smaller. - */ - -/* The size of the png_text structure changed in libpng-1.0.6 when - * iTXt support was added. iTXt support was turned off by default through - * libpng-1.2.x, to support old apps that malloc the png_text structure - * instead of calling png_set_text() and letting libpng malloc it. It - * was turned on by default in libpng-1.4.0. - */ - -/* PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */ -#if defined(PNG_READ_SUPPORTED) && \ - !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ - !defined(PNG_NO_READ_ANCILLARY_CHUNKS) -# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED -#endif - -/* PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */ -#if defined(PNG_WRITE_SUPPORTED) && \ - !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ - !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS) -# define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED -#endif - -#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED - -#ifdef PNG_NO_READ_TEXT -# define PNG_NO_READ_iTXt -# define PNG_NO_READ_tEXt -# define PNG_NO_READ_zTXt -#endif - -#ifndef PNG_NO_READ_bKGD -# define PNG_READ_bKGD_SUPPORTED -# define PNG_bKGD_SUPPORTED -#endif -#ifndef PNG_NO_READ_cHRM -# define PNG_READ_cHRM_SUPPORTED -# define PNG_cHRM_SUPPORTED -#endif -#ifndef PNG_NO_READ_gAMA -# define PNG_READ_gAMA_SUPPORTED -# define PNG_gAMA_SUPPORTED -#endif -#ifndef PNG_NO_READ_hIST -# define PNG_READ_hIST_SUPPORTED -# define PNG_hIST_SUPPORTED -#endif -#ifndef PNG_NO_READ_iCCP -# define PNG_READ_iCCP_SUPPORTED -# define PNG_iCCP_SUPPORTED -#endif -#ifndef PNG_NO_READ_iTXt -# ifndef PNG_READ_iTXt_SUPPORTED -# define PNG_READ_iTXt_SUPPORTED -# endif -# ifndef PNG_iTXt_SUPPORTED -# define PNG_iTXt_SUPPORTED -# endif -#endif -#ifndef PNG_NO_READ_oFFs -# define PNG_READ_oFFs_SUPPORTED -# define PNG_oFFs_SUPPORTED -#endif -#ifndef PNG_NO_READ_pCAL -# define PNG_READ_pCAL_SUPPORTED -# define PNG_pCAL_SUPPORTED -#endif -#ifndef PNG_NO_READ_sCAL -# define PNG_READ_sCAL_SUPPORTED -# define PNG_sCAL_SUPPORTED -#endif -#ifndef PNG_NO_READ_pHYs -# define PNG_READ_pHYs_SUPPORTED -# define PNG_pHYs_SUPPORTED -#endif -#ifndef PNG_NO_READ_sBIT -# define PNG_READ_sBIT_SUPPORTED -# define PNG_sBIT_SUPPORTED -#endif -#ifndef PNG_NO_READ_sPLT -# define PNG_READ_sPLT_SUPPORTED -# define PNG_sPLT_SUPPORTED -#endif -#ifndef PNG_NO_READ_sRGB -# define PNG_READ_sRGB_SUPPORTED -# define PNG_sRGB_SUPPORTED -#endif -#ifndef PNG_NO_READ_tEXt -# define PNG_READ_tEXt_SUPPORTED -# define PNG_tEXt_SUPPORTED -#endif -#ifndef PNG_NO_READ_tIME -# define PNG_READ_tIME_SUPPORTED -# define PNG_tIME_SUPPORTED -#endif -#ifndef PNG_NO_READ_tRNS -# define PNG_READ_tRNS_SUPPORTED -# define PNG_tRNS_SUPPORTED -#endif -#ifndef PNG_NO_READ_zTXt -# define PNG_READ_zTXt_SUPPORTED -# define PNG_zTXt_SUPPORTED -#endif -#ifndef PNG_NO_READ_OPT_PLTE -# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */ -#endif /* optional PLTE chunk in RGB and RGBA images */ -#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \ - defined(PNG_READ_zTXt_SUPPORTED) -# define PNG_READ_TEXT_SUPPORTED -# define PNG_TEXT_SUPPORTED -#endif - -#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ - -#ifndef PNG_NO_READ_UNKNOWN_CHUNKS -# ifndef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED -# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED -# endif -# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED -# define PNG_UNKNOWN_CHUNKS_SUPPORTED -# endif -# ifndef PNG_READ_USER_CHUNKS_SUPPORTED -# define PNG_READ_USER_CHUNKS_SUPPORTED -# endif -#endif -#ifndef PNG_NO_READ_USER_CHUNKS -# ifndef PNG_READ_USER_CHUNKS_SUPPORTED -# define PNG_READ_USER_CHUNKS_SUPPORTED -# endif -# ifndef PNG_USER_CHUNKS_SUPPORTED -# define PNG_USER_CHUNKS_SUPPORTED -# endif -#endif -#ifndef PNG_NO_HANDLE_AS_UNKNOWN -# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED -# endif -#endif - -#ifdef PNG_WRITE_SUPPORTED -#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED - -#ifdef PNG_NO_WRITE_TEXT -# define PNG_NO_WRITE_iTXt -# define PNG_NO_WRITE_tEXt -# define PNG_NO_WRITE_zTXt -#endif -#ifndef PNG_NO_WRITE_bKGD -# define PNG_WRITE_bKGD_SUPPORTED -# ifndef PNG_bKGD_SUPPORTED -# define PNG_bKGD_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_cHRM -# define PNG_WRITE_cHRM_SUPPORTED -# ifndef PNG_cHRM_SUPPORTED -# define PNG_cHRM_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_gAMA -# define PNG_WRITE_gAMA_SUPPORTED -# ifndef PNG_gAMA_SUPPORTED -# define PNG_gAMA_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_hIST -# define PNG_WRITE_hIST_SUPPORTED -# ifndef PNG_hIST_SUPPORTED -# define PNG_hIST_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_iCCP -# define PNG_WRITE_iCCP_SUPPORTED -# ifndef PNG_iCCP_SUPPORTED -# define PNG_iCCP_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_iTXt -# ifndef PNG_WRITE_iTXt_SUPPORTED -# define PNG_WRITE_iTXt_SUPPORTED -# endif -# ifndef PNG_iTXt_SUPPORTED -# define PNG_iTXt_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_oFFs -# define PNG_WRITE_oFFs_SUPPORTED -# ifndef PNG_oFFs_SUPPORTED -# define PNG_oFFs_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_pCAL -# define PNG_WRITE_pCAL_SUPPORTED -# ifndef PNG_pCAL_SUPPORTED -# define PNG_pCAL_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sCAL -# define PNG_WRITE_sCAL_SUPPORTED -# ifndef PNG_sCAL_SUPPORTED -# define PNG_sCAL_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_pHYs -# define PNG_WRITE_pHYs_SUPPORTED -# ifndef PNG_pHYs_SUPPORTED -# define PNG_pHYs_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sBIT -# define PNG_WRITE_sBIT_SUPPORTED -# ifndef PNG_sBIT_SUPPORTED -# define PNG_sBIT_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sPLT -# define PNG_WRITE_sPLT_SUPPORTED -# ifndef PNG_sPLT_SUPPORTED -# define PNG_sPLT_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sRGB -# define PNG_WRITE_sRGB_SUPPORTED -# ifndef PNG_sRGB_SUPPORTED -# define PNG_sRGB_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_tEXt -# define PNG_WRITE_tEXt_SUPPORTED -# ifndef PNG_tEXt_SUPPORTED -# define PNG_tEXt_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_tIME -# define PNG_WRITE_tIME_SUPPORTED -# ifndef PNG_tIME_SUPPORTED -# define PNG_tIME_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_tRNS -# define PNG_WRITE_tRNS_SUPPORTED -# ifndef PNG_tRNS_SUPPORTED -# define PNG_tRNS_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_zTXt -# define PNG_WRITE_zTXt_SUPPORTED -# ifndef PNG_zTXt_SUPPORTED -# define PNG_zTXt_SUPPORTED -# endif -#endif -#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ - defined(PNG_WRITE_zTXt_SUPPORTED) -# define PNG_WRITE_TEXT_SUPPORTED -# ifndef PNG_TEXT_SUPPORTED -# define PNG_TEXT_SUPPORTED -# endif -#endif - -#ifdef PNG_WRITE_tIME_SUPPORTED -# ifndef PNG_NO_CONVERT_tIME -# ifndef _WIN32_WCE -/* The "tm" structure is not supported on WindowsCE */ -# ifndef PNG_CONVERT_tIME_SUPPORTED -# define PNG_CONVERT_tIME_SUPPORTED -# endif -# endif -# endif -#endif - -#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ - -#ifndef PNG_NO_WRITE_FILTER -# ifndef PNG_WRITE_FILTER_SUPPORTED -# define PNG_WRITE_FILTER_SUPPORTED -# endif -#endif - -#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS -# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED -# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED -# define PNG_UNKNOWN_CHUNKS_SUPPORTED -# endif -#endif -#ifndef PNG_NO_HANDLE_AS_UNKNOWN -# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED -# endif -#endif -#endif /* PNG_WRITE_SUPPORTED */ - -/* Turn this off to disable png_read_png() and - * png_write_png() and leave the row_pointers member - * out of the info structure. - */ -#ifndef PNG_NO_INFO_IMAGE -# define PNG_INFO_IMAGE_SUPPORTED -#endif - -/* Need the time information for converting tIME chunks */ -#ifdef PNG_CONVERT_tIME_SUPPORTED - /* "time.h" functions are not supported on WindowsCE */ -# include -#endif - /* Some typedefs to get us started. These should be safe on most of the * common platforms. The typedefs should be at least as large as the * numbers suggest (a png_uint_32 must be at least 32 bits long), but they @@ -1110,11 +502,11 @@ typedef short png_int_16; typedef unsigned char png_byte; #ifdef PNG_NO_SIZE_T - typedef unsigned int png_size_t; +typedef unsigned int png_size_t; #else - typedef size_t png_size_t; +typedef size_t png_size_t; #endif -#define png_sizeof(x) sizeof(x) +#define png_sizeof(x) (sizeof (x)) /* The following is needed for medium model support. It cannot be in the * pngpriv.h header. Needs modification for other compilers besides @@ -1134,20 +526,20 @@ typedef unsigned char png_byte; # else # define LDATA 0 # endif - /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ + /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) -# define PNG_MAX_MALLOC_64K +# define PNG_MAX_MALLOC_64K /* only used in build */ # if (LDATA != 1) # ifndef FAR # define FAR __far # endif # define USE_FAR_KEYWORD # endif /* LDATA != 1 */ - /* Possibly useful for moving data out of default segment. - * Uncomment it if you want. Could also define FARDATA as - * const if your compiler supports it. (SJT) -# define FARDATA FAR - */ + /* Possibly useful for moving data out of default segment. + * Uncomment it if you want. Could also define FARDATA as + * const if your compiler supports it. (SJT) +# define FARDATA FAR + */ # endif /* __WIN32__, __FLAT__, __CYGWIN__ */ #endif /* __BORLANDC__ */ @@ -1177,26 +569,37 @@ typedef unsigned char png_byte; #endif /* Typedef for floating-point numbers that are converted - to fixed-point with a multiple of 100,000, e.g., int_gamma */ + * to fixed-point with a multiple of 100,000, e.g., gamma + */ typedef png_int_32 png_fixed_point; /* Add typedefs for pointers */ -typedef void FAR * png_voidp; -typedef png_byte FAR * png_bytep; -typedef png_uint_32 FAR * png_uint_32p; -typedef png_int_32 FAR * png_int_32p; -typedef png_uint_16 FAR * png_uint_16p; -typedef png_int_16 FAR * png_int_16p; -typedef PNG_CONST char FAR * png_const_charp; -typedef char FAR * png_charp; -typedef png_fixed_point FAR * png_fixed_point_p; +typedef void FAR * png_voidp; +typedef PNG_CONST void FAR * png_const_voidp; +typedef png_byte FAR * png_bytep; +typedef PNG_CONST png_byte FAR * png_const_bytep; +typedef png_uint_32 FAR * png_uint_32p; +typedef PNG_CONST png_uint_32 FAR * png_const_uint_32p; +typedef png_int_32 FAR * png_int_32p; +typedef PNG_CONST png_int_32 FAR * png_const_int_32p; +typedef png_uint_16 FAR * png_uint_16p; +typedef PNG_CONST png_uint_16 FAR * png_const_uint_16p; +typedef png_int_16 FAR * png_int_16p; +typedef PNG_CONST png_int_16 FAR * png_const_int_16p; +typedef char FAR * png_charp; +typedef PNG_CONST char FAR * png_const_charp; +typedef png_fixed_point FAR * png_fixed_point_p; +typedef PNG_CONST png_fixed_point FAR * png_const_fixed_point_p; +typedef png_size_t FAR * png_size_tp; +typedef PNG_CONST png_size_t FAR * png_const_size_tp; -#ifndef PNG_NO_STDIO -typedef FILE * png_FILE_p; +#ifdef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; #endif #ifdef PNG_FLOATING_POINT_SUPPORTED -typedef double FAR * png_doublep; +typedef double FAR * png_doublep; +typedef PNG_CONST double FAR * png_const_doublep; #endif /* Pointers to pointers; i.e. arrays */ @@ -1215,269 +618,6 @@ typedef double FAR * FAR * png_doublepp; /* Pointers to pointers to pointers; i.e., pointer to array */ typedef char FAR * FAR * FAR * png_charppp; -/* Define PNG_BUILD_DLL if the module being built is a Windows - * LIBPNG DLL. - * - * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL. - * It is equivalent to Microsoft predefined macro _DLL that is - * automatically defined when you compile using the share - * version of the CRT (C Run-Time library) - * - * The cygwin mods make this behavior a little different: - * Define PNG_BUILD_DLL if you are building a dll for use with cygwin - * Define PNG_STATIC if you are building a static library for use with cygwin, - * -or- if you are building an application that you want to link to the - * static library. - * PNG_USE_DLL is defined by default (no user action needed) unless one of - * the other flags is defined. - */ - -#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) -# define PNG_DLL -#endif - -#ifdef __CYGWIN__ -# undef PNGAPI -# define PNGAPI __cdecl -# undef PNG_IMPEXP -# define PNG_IMPEXP -#endif - -#define PNG_USE_LOCAL_ARRAYS /* Not used in libpng, defined for legacy apps */ - -/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", - * you may get warnings regarding the linkage of png_zalloc and png_zfree. - * Don't ignore those warnings; you must also reset the default calling - * convention in your compiler to match your PNGAPI, and you must build - * zlib and your applications the same way you build libpng. - */ - -#if defined(__MINGW32__) && !defined(PNG_MODULEDEF) -# ifndef PNG_NO_MODULEDEF -# define PNG_NO_MODULEDEF -# endif -#endif - -#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF) -# define PNG_IMPEXP -#endif - -#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \ - (( defined(_Windows) || defined(_WINDOWS) || \ - defined(WIN32) || defined(_WIN32) || defined(__WIN32__) )) - -# ifndef PNGAPI -# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) -# define PNGAPI __cdecl -# else -# define PNGAPI _cdecl -# endif -# endif - -# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \ - 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */) -# define PNG_IMPEXP -# endif - -# ifndef PNG_IMPEXP - -# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol -# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol - - /* Borland/Microsoft */ -# if defined(_MSC_VER) || defined(__BORLANDC__) -# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) -# define PNG_EXPORT PNG_EXPORT_TYPE1 -# else -# define PNG_EXPORT PNG_EXPORT_TYPE2 -# ifdef PNG_BUILD_DLL -# define PNG_IMPEXP __export -# else -# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in VC++ */ -# endif /* Exists in Borland C++ for - C++ classes (== huge) */ -# endif -# endif - -# ifndef PNG_IMPEXP -# ifdef PNG_BUILD_DLL -# define PNG_IMPEXP __declspec(dllexport) -# else -# define PNG_IMPEXP __declspec(dllimport) -# endif -# endif -# endif /* PNG_IMPEXP */ -#else /* !(DLL || non-cygwin WINDOWS) */ -# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) -# ifndef PNGAPI -# define PNGAPI _System -# endif -# else -# if 0 /* ... other platforms, with other meanings */ -# endif -# endif -#endif - -#ifndef PNGAPI -# define PNGAPI -#endif -#ifndef PNG_IMPEXP -# define PNG_IMPEXP -#endif - -#ifdef PNG_BUILDSYMS -# ifndef PNG_EXPORT -# define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END -# endif -#endif - -#ifndef PNG_EXPORT -# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol -#endif - -/* Support for compiler specific function attributes. These are used - * so that where compiler support is available incorrect use of API - * functions in png.h will generate compiler warnings. - * - * Added at libpng-1.2.41. - */ - -#ifndef PNG_NO_PEDANTIC_WARNINGS -# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED -# define PNG_PEDANTIC_WARNINGS_SUPPORTED -# endif -#endif - -#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED -/* Support for compiler specific function attributes. These are used - * so that where compiler support is available incorrect use of API - * functions in png.h will generate compiler warnings. Added at libpng - * version 1.2.41. - */ -# ifdef __GNUC__ -# ifndef PNG_USE_RESULT -# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) -# endif -# ifndef PNG_NORETURN -# define PNG_NORETURN __attribute__((__noreturn__)) -# endif -# ifndef PNG_ALLOCATED -# define PNG_ALLOCATED __attribute__((__malloc__)) -# endif - - /* This specifically protects structure members that should only be - * accessed from within the library, therefore should be empty during - * a library build. - */ -# ifndef PNG_DEPRECATED -# define PNG_DEPRECATED __attribute__((__deprecated__)) -# endif -# ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT __attribute__((__deprecated__)) -# endif -# ifndef PNG_PRIVATE -# if 0 /* Doesn't work so we use deprecated instead*/ -# define PNG_PRIVATE \ - __attribute__((warning("This function is not exported by libpng."))) -# else -# define PNG_PRIVATE \ - __attribute__((__deprecated__)) -# endif -# endif /* PNG_PRIVATE */ -# endif /* __GNUC__ */ -#endif /* PNG_PEDANTIC_WARNINGS */ - -#ifndef PNG_DEPRECATED -# define PNG_DEPRECATED /* Use of this function is deprecated */ -#endif -#ifndef PNG_USE_RESULT -# define PNG_USE_RESULT /* The result of this function must be checked */ -#endif -#ifndef PNG_NORETURN -# define PNG_NORETURN /* This function does not return */ -#endif -#ifndef PNG_ALLOCATED -# define PNG_ALLOCATED /* The result of the function is new memory */ -#endif -#ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ -#endif -#ifndef PNG_PRIVATE -# define PNG_PRIVATE /* This is a private libpng function */ -#endif - -/* Users may want to use these so they are not private. Any library - * functions that are passed far data must be model-independent. - */ - -/* memory model/platform independent fns */ -#ifndef PNG_ABORT -# ifdef _WINDOWS_ -# define PNG_ABORT() ExitProcess(0) -# else -# define PNG_ABORT() abort() -# endif -#endif - -#ifdef USE_FAR_KEYWORD -/* Use this to make far-to-near assignments */ -# define CHECK 1 -# define NOCHECK 0 -# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) -# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) -# define png_strcpy _fstrcpy -# define png_strncpy _fstrncpy /* Added to v 1.2.6 */ -# define png_strlen _fstrlen -# define png_memcmp _fmemcmp /* SJT: added */ -# define png_memcpy _fmemcpy -# define png_memset _fmemset -# define png_sprintf sprintf -#else -# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ -# define CVT_PTR(ptr) (ptr) -# define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strcpy lstrcpyA -# define png_strncpy lstrcpynA -# define png_strlen lstrlenA -# define png_memcmp memcmp -# define png_memcpy CopyMemory -# define png_memset memset -# define png_sprintf wsprintfA -# else -# define CVT_PTR(ptr) (ptr) -# define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strcpy strcpy -# define png_strncpy strncpy /* Added to v 1.2.6 */ -# define png_strlen strlen -# define png_memcmp memcmp /* SJT: added */ -# define png_memcpy memcpy -# define png_memset memset -# define png_sprintf sprintf -# ifndef PNG_NO_SNPRINTF -# ifdef _MSC_VER -# define png_snprintf _snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 _snprintf -# define png_snprintf6 _snprintf -# else -# define png_snprintf snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 snprintf -# define png_snprintf6 snprintf -# endif -# else - /* You don't have or don't want to use snprintf(). Caution: Using - * sprintf instead of snprintf exposes your application to accidental - * or malevolent buffer overflows. If you don't have snprintf() - * as a general rule you should provide one (you can get one from - * Portable OpenSSH). - */ -# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) -# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2) -# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ - sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) -# endif -# endif -#endif - /* png_alloc_size_t is guaranteed to be no smaller than png_size_t, * and no smaller than png_uint_32. Casts from png_size_t or png_uint_32 * to png_alloc_size_t are not necessary; in fact, it is recommended @@ -1488,38 +628,22 @@ typedef char FAR * FAR * FAR * png_charppp; * to encounter practical situations that require such conversions. */ #if defined(__TURBOC__) && !defined(__FLAT__) -# define png_mem_alloc farmalloc -# define png_mem_free farfree typedef unsigned long png_alloc_size_t; #else # if defined(_MSC_VER) && defined(MAXSEG_64K) -# define png_mem_alloc(s) halloc(s, 1) -# define png_mem_free hfree typedef unsigned long png_alloc_size_t; # else -# if defined(_WINDOWS_) && (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) -# define png_mem_alloc(s) HeapAlloc(GetProcessHeap(), 0, s) -# define png_mem_free(p) HeapFree(GetProcessHeap(), 0, p) - typedef DWORD png_alloc_size_t; + /* This is an attempt to detect an old Windows system where (int) is + * actually 16 bits, in that case png_malloc must have an argument with a + * bigger size to accomodate the requirements of the library. + */ +# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \ + (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) + typedef DWORD png_alloc_size_t; # else -# define png_mem_alloc malloc -# define png_mem_free free typedef png_size_t png_alloc_size_t; # endif # endif #endif -/* End of memory model/platform independent support */ - -/* Just a little check that someone hasn't tried to define something - * contradictory. - */ -#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) -# undef PNG_ZBUF_SIZE -# define PNG_ZBUF_SIZE 65536L -#endif - - -/* Added at libpng-1.2.8 */ -#endif /* PNG_VERSION_INFO_ONLY */ #endif /* PNGCONF_H */ diff --git a/include/reactos/libs/libpng/pngdebug.h b/include/reactos/libs/libpng/pngdebug.h new file mode 100644 index 00000000000..984bc28f47b --- /dev/null +++ b/include/reactos/libs/libpng/pngdebug.h @@ -0,0 +1,471 @@ + +/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + * + * png_debug[1-2]?(level, message ,arg{0-2}) + * Expands to a statement (either a simple expression or a compound + * do..while(0) statement) that outputs a message with parameter + * substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG + * is undefined, 0 or 1 every png_debug expands to a simple expression + * (actually ((void)0)). + * + * level: level of detail of message, starting at 0. A level 'n' + * message is preceded by 'n' tab characters (not implemented + * on Microsoft compilers unless PNG_DEBUG_FILE is also + * defined, to allow debug DLL compilation with no standard IO). + * message: a printf(3) style text string. A trailing '\n' is added + * to the message. + * arg: 0 to 2 arguments for printf(3) style substitution in message. + */ +#ifndef PNGDEBUG_H +#define PNGDEBUG_H +/* These settings control the formatting of messages in png.c and pngerror.c */ +/* Moved to pngdebug.h at 1.5.0 */ +# ifndef PNG_LITERAL_SHARP +# define PNG_LITERAL_SHARP 0x23 +# endif +# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET +# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b +# endif +# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET +# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d +# endif +# ifndef PNG_STRING_NEWLINE +# define PNG_STRING_NEWLINE "\n" +# endif + +#ifdef PNG_DEBUG +# if (PNG_DEBUG > 0) +# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +# include +# if (PNG_DEBUG > 1) +# ifndef _DEBUG +# define _DEBUG +# endif +# ifndef png_debug +# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) +# endif +# endif +# else /* PNG_DEBUG_FILE || !_MSC_VER */ +# ifndef PNG_STDIO_SUPPORTED +# include /* not included yet */ +# endif +# ifndef PNG_DEBUG_FILE +# define PNG_DEBUG_FILE stderr +# endif /* PNG_DEBUG_FILE */ + +# if (PNG_DEBUG > 1) +/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on + * non-ISO compilers + */ +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ + } while (0) +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } while (0) +# endif +# endif /* __STDC __ */ +# endif /* (PNG_DEBUG > 1) */ + +# endif /* _MSC_VER */ +# endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +# define png_debug(l, m) ((void)0) +#endif +#ifndef png_debug1 +# define png_debug1(l, m, p1) ((void)0) +#endif +#ifndef png_debug2 +# define png_debug2(l, m, p1, p2) ((void)0) +#endif +#endif /* PNGDEBUG_H */ + +/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + * + * png_debug[1-2]?(level, message ,arg{0-2}) + * Expands to a statement (either a simple expression or a compound + * do..while(0) statement) that outputs a message with parameter + * substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG + * is undefined, 0 or 1 every png_debug expands to a simple expression + * (actually ((void)0)). + * + * level: level of detail of message, starting at 0. A level 'n' + * message is preceded by 'n' tab characters (not implemented + * on Microsoft compilers unless PNG_DEBUG_FILE is also + * defined, to allow debug DLL compilation with no standard IO). + * message: a printf(3) style text string. A trailing '\n' is added + * to the message. + * arg: 0 to 2 arguments for printf(3) style substitution in message. + */ +#ifndef PNGDEBUG_H +#define PNGDEBUG_H +/* These settings control the formatting of messages in png.c and pngerror.c */ +/* Moved to pngdebug.h at 1.5.0 */ +# ifndef PNG_LITERAL_SHARP +# define PNG_LITERAL_SHARP 0x23 +# endif +# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET +# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b +# endif +# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET +# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d +# endif +# ifndef PNG_STRING_NEWLINE +# define PNG_STRING_NEWLINE "\n" +# endif + +#ifdef PNG_DEBUG +# if (PNG_DEBUG > 0) +# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +# include +# if (PNG_DEBUG > 1) +# ifndef _DEBUG +# define _DEBUG +# endif +# ifndef png_debug +# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) +# endif +# endif +# else /* PNG_DEBUG_FILE || !_MSC_VER */ +# ifndef PNG_STDIO_SUPPORTED +# include /* not included yet */ +# endif +# ifndef PNG_DEBUG_FILE +# define PNG_DEBUG_FILE stderr +# endif /* PNG_DEBUG_FILE */ + +# if (PNG_DEBUG > 1) +/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on + * non-ISO compilers + */ +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ + } while (0) +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } while (0) +# endif +# endif /* __STDC __ */ +# endif /* (PNG_DEBUG > 1) */ + +# endif /* _MSC_VER */ +# endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +# define png_debug(l, m) ((void)0) +#endif +#ifndef png_debug1 +# define png_debug1(l, m, p1) ((void)0) +#endif +#ifndef png_debug2 +# define png_debug2(l, m, p1, p2) ((void)0) +#endif +#endif /* PNGDEBUG_H */ + +/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + * + * png_debug[1-2]?(level, message ,arg{0-2}) + * Expands to a statement (either a simple expression or a compound + * do..while(0) statement) that outputs a message with parameter + * substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG + * is undefined, 0 or 1 every png_debug expands to a simple expression + * (actually ((void)0)). + * + * level: level of detail of message, starting at 0. A level 'n' + * message is preceded by 'n' tab characters (not implemented + * on Microsoft compilers unless PNG_DEBUG_FILE is also + * defined, to allow debug DLL compilation with no standard IO). + * message: a printf(3) style text string. A trailing '\n' is added + * to the message. + * arg: 0 to 2 arguments for printf(3) style substitution in message. + */ +#ifndef PNGDEBUG_H +#define PNGDEBUG_H +/* These settings control the formatting of messages in png.c and pngerror.c */ +/* Moved to pngdebug.h at 1.5.0 */ +# ifndef PNG_LITERAL_SHARP +# define PNG_LITERAL_SHARP 0x23 +# endif +# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET +# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b +# endif +# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET +# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d +# endif +# ifndef PNG_STRING_NEWLINE +# define PNG_STRING_NEWLINE "\n" +# endif + +#ifdef PNG_DEBUG +# if (PNG_DEBUG > 0) +# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +# include +# if (PNG_DEBUG > 1) +# ifndef _DEBUG +# define _DEBUG +# endif +# ifndef png_debug +# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) +# endif +# endif +# else /* PNG_DEBUG_FILE || !_MSC_VER */ +# ifndef PNG_STDIO_SUPPORTED +# include /* not included yet */ +# endif +# ifndef PNG_DEBUG_FILE +# define PNG_DEBUG_FILE stderr +# endif /* PNG_DEBUG_FILE */ + +# if (PNG_DEBUG > 1) +/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on + * non-ISO compilers + */ +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ + } while (0) +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } while (0) +# endif +# endif /* __STDC __ */ +# endif /* (PNG_DEBUG > 1) */ + +# endif /* _MSC_VER */ +# endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +# define png_debug(l, m) ((void)0) +#endif +#ifndef png_debug1 +# define png_debug1(l, m, p1) ((void)0) +#endif +#ifndef png_debug2 +# define png_debug2(l, m, p1, p2) ((void)0) +#endif +#endif /* PNGDEBUG_H */ diff --git a/include/reactos/libs/libpng/pnginfo.h b/include/reactos/libs/libpng/pnginfo.h new file mode 100644 index 00000000000..1b82efb8c9b --- /dev/null +++ b/include/reactos/libs/libpng/pnginfo.h @@ -0,0 +1,810 @@ + +/* pnginfo.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + + /* png_info is a structure that holds the information in a PNG file so + * that the application can find out the characteristics of the image. + * If you are reading the file, this structure will tell you what is + * in the PNG file. If you are writing the file, fill in the information + * you want to put into the PNG file, using png_set_*() functions, then + * call png_write_info(). + * + * The names chosen should be very close to the PNG specification, so + * consult that document for information about the meaning of each field. + * + * With libpng < 0.95, it was only possible to directly set and read the + * the values in the png_info_struct, which meant that the contents and + * order of the values had to remain fixed. With libpng 0.95 and later, + * however, there are now functions that abstract the contents of + * png_info_struct from the application, so this makes it easier to use + * libpng with dynamic libraries, and even makes it possible to use + * libraries that don't have all of the libpng ancillary chunk-handing + * functionality. In libpng-1.5.0 this was moved into a separate private + * file that is not visible to applications. + * + * The following members may have allocated storage attached that should be + * cleaned up before the structure is discarded: palette, trans, text, + * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, + * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these + * are automatically freed when the info structure is deallocated, if they were + * allocated internally by libpng. This behavior can be changed by means + * of the png_data_freer() function. + * + * More allocation details: all the chunk-reading functions that + * change these members go through the corresponding png_set_* + * functions. A function to clear these members is available: see + * png_free_data(). The png_set_* functions do not depend on being + * able to point info structure members to any of the storage they are + * passed (they make their own copies), EXCEPT that the png_set_text + * functions use the same storage passed to them in the text_ptr or + * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns + * functions do not make their own copies. + */ +#ifndef PNGINFO_H +#define PNGINFO_H + +struct png_info_def +{ + /* the following are necessary for every PNG file */ + png_uint_32 width; /* width of image in pixels (from IHDR) */ + png_uint_32 height; /* height of image in pixels (from IHDR) */ + png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ + png_size_t rowbytes; /* bytes needed to hold an untransformed row */ + png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ + png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following is informational only on read, and not used on writes. */ + png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte spare_byte; /* to align the data, and for future use */ + png_byte signature[8]; /* magic bytes read by libpng from start of file */ + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#if defined(PNG_gAMA_SUPPORTED) + /* The gAMA chunk describes the gamma characteristics of the system + * on which the image was created, normally in the range [1.0, 2.5]. + * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. + */ + png_fixed_point gamma; +#endif + +#ifdef PNG_sRGB_SUPPORTED + /* GR-P, 0.96a */ + /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ + png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ +#endif + +#ifdef PNG_TEXT_SUPPORTED + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text; /* number of comments read or comments to write */ + int max_text; /* current size of text array */ + png_textp text; /* array of comments read or comments to write */ +#endif /* PNG_TEXT_SUPPORTED */ + +#ifdef PNG_tIME_SUPPORTED + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time; +#endif + +#ifdef PNG_sBIT_SUPPORTED + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans; /* alpha values for paletted image */ + png_bytep trans_alpha; /* alpha values for paletted image */ + png_color_16 trans_color; /* transparent color for non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background; +#endif + +#ifdef PNG_oFFs_SUPPORTED + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset; /* x offset on page */ + png_int_32 y_offset; /* y offset on page */ + png_byte offset_unit_type; /* offset units type */ +#endif + +#ifdef PNG_pHYs_SUPPORTED + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit; /* vertical pixel density */ + png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ +#endif + +#ifdef PNG_hIST_SUPPORTED + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist; +#endif + +#ifdef PNG_cHRM_SUPPORTED + /* The cHRM chunk describes the CIE color characteristics of the monitor + * on which the PNG was created. This data allows the viewer to do gamut + * mapping of the input image to ensure that the viewer sees the same + * colors in the image as the creator. Values are in the range + * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. + */ + png_fixed_point x_white; + png_fixed_point y_white; + png_fixed_point x_red; + png_fixed_point y_red; + png_fixed_point x_green; + png_fixed_point y_green; + png_fixed_point x_blue; + png_fixed_point y_blue; +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose; /* pCAL chunk description string */ + png_int_32 pcal_X0; /* minimum value */ + png_int_32 pcal_X1; /* maximum value */ + png_charp pcal_units; /* Latin-1 string giving physical units */ + png_charpp pcal_params; /* ASCII strings containing parameter values */ + png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams; /* number of parameters given in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks; + int unknown_chunks_num; +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* iCCP chunk data. */ + png_charp iccp_name; /* profile name */ + png_bytep iccp_profile; /* International Color Consortium profile data */ + png_uint_32 iccp_proflen; /* ICC profile data length */ + png_byte iccp_compression; /* Always zero */ +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes; + png_uint_32 splt_palettes_num; +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is + * non-zero. + */ + png_byte scal_unit; /* unit of physical scale */ + png_charp scal_s_width; /* string containing height */ + png_charp scal_s_height; /* string containing width */ +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers; /* the image bits */ +#endif + +}; +#endif /* PNGINFO_H */ + +/* pnginfo.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + + /* png_info is a structure that holds the information in a PNG file so + * that the application can find out the characteristics of the image. + * If you are reading the file, this structure will tell you what is + * in the PNG file. If you are writing the file, fill in the information + * you want to put into the PNG file, using png_set_*() functions, then + * call png_write_info(). + * + * The names chosen should be very close to the PNG specification, so + * consult that document for information about the meaning of each field. + * + * With libpng < 0.95, it was only possible to directly set and read the + * the values in the png_info_struct, which meant that the contents and + * order of the values had to remain fixed. With libpng 0.95 and later, + * however, there are now functions that abstract the contents of + * png_info_struct from the application, so this makes it easier to use + * libpng with dynamic libraries, and even makes it possible to use + * libraries that don't have all of the libpng ancillary chunk-handing + * functionality. In libpng-1.5.0 this was moved into a separate private + * file that is not visible to applications. + * + * The following members may have allocated storage attached that should be + * cleaned up before the structure is discarded: palette, trans, text, + * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, + * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these + * are automatically freed when the info structure is deallocated, if they were + * allocated internally by libpng. This behavior can be changed by means + * of the png_data_freer() function. + * + * More allocation details: all the chunk-reading functions that + * change these members go through the corresponding png_set_* + * functions. A function to clear these members is available: see + * png_free_data(). The png_set_* functions do not depend on being + * able to point info structure members to any of the storage they are + * passed (they make their own copies), EXCEPT that the png_set_text + * functions use the same storage passed to them in the text_ptr or + * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns + * functions do not make their own copies. + */ +#ifndef PNGINFO_H +#define PNGINFO_H + +struct png_info_def +{ + /* the following are necessary for every PNG file */ + png_uint_32 width; /* width of image in pixels (from IHDR) */ + png_uint_32 height; /* height of image in pixels (from IHDR) */ + png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ + png_size_t rowbytes; /* bytes needed to hold an untransformed row */ + png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ + png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following is informational only on read, and not used on writes. */ + png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte spare_byte; /* to align the data, and for future use */ + png_byte signature[8]; /* magic bytes read by libpng from start of file */ + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#if defined(PNG_gAMA_SUPPORTED) + /* The gAMA chunk describes the gamma characteristics of the system + * on which the image was created, normally in the range [1.0, 2.5]. + * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. + */ + png_fixed_point gamma; +#endif + +#ifdef PNG_sRGB_SUPPORTED + /* GR-P, 0.96a */ + /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ + png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ +#endif + +#ifdef PNG_TEXT_SUPPORTED + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text; /* number of comments read or comments to write */ + int max_text; /* current size of text array */ + png_textp text; /* array of comments read or comments to write */ +#endif /* PNG_TEXT_SUPPORTED */ + +#ifdef PNG_tIME_SUPPORTED + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time; +#endif + +#ifdef PNG_sBIT_SUPPORTED + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans; /* alpha values for paletted image */ + png_bytep trans_alpha; /* alpha values for paletted image */ + png_color_16 trans_color; /* transparent color for non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background; +#endif + +#ifdef PNG_oFFs_SUPPORTED + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset; /* x offset on page */ + png_int_32 y_offset; /* y offset on page */ + png_byte offset_unit_type; /* offset units type */ +#endif + +#ifdef PNG_pHYs_SUPPORTED + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit; /* vertical pixel density */ + png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ +#endif + +#ifdef PNG_hIST_SUPPORTED + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist; +#endif + +#ifdef PNG_cHRM_SUPPORTED + /* The cHRM chunk describes the CIE color characteristics of the monitor + * on which the PNG was created. This data allows the viewer to do gamut + * mapping of the input image to ensure that the viewer sees the same + * colors in the image as the creator. Values are in the range + * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. + */ + png_fixed_point x_white; + png_fixed_point y_white; + png_fixed_point x_red; + png_fixed_point y_red; + png_fixed_point x_green; + png_fixed_point y_green; + png_fixed_point x_blue; + png_fixed_point y_blue; +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose; /* pCAL chunk description string */ + png_int_32 pcal_X0; /* minimum value */ + png_int_32 pcal_X1; /* maximum value */ + png_charp pcal_units; /* Latin-1 string giving physical units */ + png_charpp pcal_params; /* ASCII strings containing parameter values */ + png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams; /* number of parameters given in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks; + int unknown_chunks_num; +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* iCCP chunk data. */ + png_charp iccp_name; /* profile name */ + png_bytep iccp_profile; /* International Color Consortium profile data */ + png_uint_32 iccp_proflen; /* ICC profile data length */ + png_byte iccp_compression; /* Always zero */ +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes; + png_uint_32 splt_palettes_num; +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is + * non-zero. + */ + png_byte scal_unit; /* unit of physical scale */ + png_charp scal_s_width; /* string containing height */ + png_charp scal_s_height; /* string containing width */ +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers; /* the image bits */ +#endif + +}; +#endif /* PNGINFO_H */ + +/* pnginfo.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + + /* png_info is a structure that holds the information in a PNG file so + * that the application can find out the characteristics of the image. + * If you are reading the file, this structure will tell you what is + * in the PNG file. If you are writing the file, fill in the information + * you want to put into the PNG file, using png_set_*() functions, then + * call png_write_info(). + * + * The names chosen should be very close to the PNG specification, so + * consult that document for information about the meaning of each field. + * + * With libpng < 0.95, it was only possible to directly set and read the + * the values in the png_info_struct, which meant that the contents and + * order of the values had to remain fixed. With libpng 0.95 and later, + * however, there are now functions that abstract the contents of + * png_info_struct from the application, so this makes it easier to use + * libpng with dynamic libraries, and even makes it possible to use + * libraries that don't have all of the libpng ancillary chunk-handing + * functionality. In libpng-1.5.0 this was moved into a separate private + * file that is not visible to applications. + * + * The following members may have allocated storage attached that should be + * cleaned up before the structure is discarded: palette, trans, text, + * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, + * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these + * are automatically freed when the info structure is deallocated, if they were + * allocated internally by libpng. This behavior can be changed by means + * of the png_data_freer() function. + * + * More allocation details: all the chunk-reading functions that + * change these members go through the corresponding png_set_* + * functions. A function to clear these members is available: see + * png_free_data(). The png_set_* functions do not depend on being + * able to point info structure members to any of the storage they are + * passed (they make their own copies), EXCEPT that the png_set_text + * functions use the same storage passed to them in the text_ptr or + * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns + * functions do not make their own copies. + */ +#ifndef PNGINFO_H +#define PNGINFO_H + +struct png_info_def +{ + /* the following are necessary for every PNG file */ + png_uint_32 width; /* width of image in pixels (from IHDR) */ + png_uint_32 height; /* height of image in pixels (from IHDR) */ + png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ + png_size_t rowbytes; /* bytes needed to hold an untransformed row */ + png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ + png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following is informational only on read, and not used on writes. */ + png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte spare_byte; /* to align the data, and for future use */ + png_byte signature[8]; /* magic bytes read by libpng from start of file */ + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#if defined(PNG_gAMA_SUPPORTED) + /* The gAMA chunk describes the gamma characteristics of the system + * on which the image was created, normally in the range [1.0, 2.5]. + * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. + */ + png_fixed_point gamma; +#endif + +#ifdef PNG_sRGB_SUPPORTED + /* GR-P, 0.96a */ + /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ + png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ +#endif + +#ifdef PNG_TEXT_SUPPORTED + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text; /* number of comments read or comments to write */ + int max_text; /* current size of text array */ + png_textp text; /* array of comments read or comments to write */ +#endif /* PNG_TEXT_SUPPORTED */ + +#ifdef PNG_tIME_SUPPORTED + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time; +#endif + +#ifdef PNG_sBIT_SUPPORTED + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans; /* alpha values for paletted image */ + png_bytep trans_alpha; /* alpha values for paletted image */ + png_color_16 trans_color; /* transparent color for non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background; +#endif + +#ifdef PNG_oFFs_SUPPORTED + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset; /* x offset on page */ + png_int_32 y_offset; /* y offset on page */ + png_byte offset_unit_type; /* offset units type */ +#endif + +#ifdef PNG_pHYs_SUPPORTED + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit; /* vertical pixel density */ + png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ +#endif + +#ifdef PNG_hIST_SUPPORTED + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist; +#endif + +#ifdef PNG_cHRM_SUPPORTED + /* The cHRM chunk describes the CIE color characteristics of the monitor + * on which the PNG was created. This data allows the viewer to do gamut + * mapping of the input image to ensure that the viewer sees the same + * colors in the image as the creator. Values are in the range + * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. + */ + png_fixed_point x_white; + png_fixed_point y_white; + png_fixed_point x_red; + png_fixed_point y_red; + png_fixed_point x_green; + png_fixed_point y_green; + png_fixed_point x_blue; + png_fixed_point y_blue; +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose; /* pCAL chunk description string */ + png_int_32 pcal_X0; /* minimum value */ + png_int_32 pcal_X1; /* maximum value */ + png_charp pcal_units; /* Latin-1 string giving physical units */ + png_charpp pcal_params; /* ASCII strings containing parameter values */ + png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams; /* number of parameters given in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks; + int unknown_chunks_num; +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* iCCP chunk data. */ + png_charp iccp_name; /* profile name */ + png_bytep iccp_profile; /* International Color Consortium profile data */ + png_uint_32 iccp_proflen; /* ICC profile data length */ + png_byte iccp_compression; /* Always zero */ +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes; + png_uint_32 splt_palettes_num; +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is + * non-zero. + */ + png_byte scal_unit; /* unit of physical scale */ + png_charp scal_s_width; /* string containing height */ + png_charp scal_s_height; /* string containing width */ +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers; /* the image bits */ +#endif + +}; +#endif /* PNGINFO_H */ diff --git a/include/reactos/libs/libpng/pnglibconf.h b/include/reactos/libs/libpng/pnglibconf.h new file mode 100644 index 00000000000..77bb98e8d73 --- /dev/null +++ b/include/reactos/libs/libpng/pnglibconf.h @@ -0,0 +1,543 @@ + +/* libpng STANDARD API DEFINITION */ + +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.5.0 - last changed on February 11, 2011 */ + +/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Derived from: scripts/pnglibconf.dfa */ +/* If you edit this file by hand you must obey the rules expressed in */ +/* pnglibconf.dfa with respect to the dependencies between the following */ +/* symbols. It is much better to generate a new file using */ +/* scripts/libpngconf.mak */ + +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* settings */ +#define PNG_API_RULE 0 +#define PNG_CALLOC_SUPPORTED +#define PNG_COST_SHIFT 3 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_sCAL_PRECISION 5 +#define PNG_USER_CHUNK_CACHE_MAX 0 +#define PNG_USER_CHUNK_MALLOC_MAX 0 +#define PNG_USER_HEIGHT_MAX 1000000L +#define PNG_USER_WIDTH_MAX 1000000L +#define PNG_WEIGHT_SHIFT 8 +#define PNG_ZBUF_SIZE 8192 +/* end of settings */ +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGN_MEMORY_SUPPORTED +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_CHECK_cHRM_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_zTXt_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ +/* end of options */ +#endif /* PNGLCONF_H */ + +/* libpng STANDARD API DEFINITION */ + +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.5.0 - last changed on February 11, 2011 */ + +/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Derived from: scripts/pnglibconf.dfa */ +/* If you edit this file by hand you must obey the rules expressed in */ +/* pnglibconf.dfa with respect to the dependencies between the following */ +/* symbols. It is much better to generate a new file using */ +/* scripts/libpngconf.mak */ + +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* settings */ +#define PNG_API_RULE 0 +#define PNG_CALLOC_SUPPORTED +#define PNG_COST_SHIFT 3 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_sCAL_PRECISION 5 +#define PNG_USER_CHUNK_CACHE_MAX 0 +#define PNG_USER_CHUNK_MALLOC_MAX 0 +#define PNG_USER_HEIGHT_MAX 1000000L +#define PNG_USER_WIDTH_MAX 1000000L +#define PNG_WEIGHT_SHIFT 8 +#define PNG_ZBUF_SIZE 8192 +/* end of settings */ +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGN_MEMORY_SUPPORTED +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_CHECK_cHRM_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_zTXt_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ +/* end of options */ +#endif /* PNGLCONF_H */ + +/* libpng STANDARD API DEFINITION */ + +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.5.0 - last changed on February 11, 2011 */ + +/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Derived from: scripts/pnglibconf.dfa */ +/* If you edit this file by hand you must obey the rules expressed in */ +/* pnglibconf.dfa with respect to the dependencies between the following */ +/* symbols. It is much better to generate a new file using */ +/* scripts/libpngconf.mak */ + +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* settings */ +#define PNG_API_RULE 0 +#define PNG_CALLOC_SUPPORTED +#define PNG_COST_SHIFT 3 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_sCAL_PRECISION 5 +#define PNG_USER_CHUNK_CACHE_MAX 0 +#define PNG_USER_CHUNK_MALLOC_MAX 0 +#define PNG_USER_HEIGHT_MAX 1000000L +#define PNG_USER_WIDTH_MAX 1000000L +#define PNG_WEIGHT_SHIFT 8 +#define PNG_ZBUF_SIZE 8192 +/* end of settings */ +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGN_MEMORY_SUPPORTED +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_CHECK_cHRM_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_zTXt_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ +/* end of options */ +#endif /* PNGLCONF_H */ diff --git a/include/reactos/libs/libpng/pngpriv.h b/include/reactos/libs/libpng/pngpriv.h index 19b797c7447..a7e3b527270 100644 --- a/include/reactos/libs/libpng/pngpriv.h +++ b/include/reactos/libs/libpng/pngpriv.h @@ -1,12 +1,13 @@ /* pngpriv.h - private declarations for use inside libpng * - * libpng version 1.4.3 - June 26, 2010 * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2010 Glenn Randers-Pehrson + * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * + * Last changed in libpng 1.5.2 [March 31, 2011] + * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h @@ -24,25 +25,132 @@ #ifndef PNGPRIV_H #define PNGPRIV_H -#ifndef PNG_VERSION_INFO_ONLY - +/* This is required for the definition of abort(), used as a last ditch + * error handler when all else fails. + */ #include +#define PNGLIB_BUILD +#ifdef PNG_USER_CONFIG +# include "pngusr.h" + /* These should have been defined in pngusr.h */ +# ifndef PNG_USER_PRIVATEBUILD +# define PNG_USER_PRIVATEBUILD "Custom libpng build" +# endif +# ifndef PNG_USER_DLLFNAME_POSTFIX +# define PNG_USER_DLLFNAME_POSTFIX "Cb" +# endif +#endif +#include "png.h" +#include "pnginfo.h" +#include "pngstruct.h" + +/* This is used for 16 bit gamma tables - only the top level pointers are const, + * this could be changed: + */ +typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; + +/* Added at libpng-1.2.9 */ +/* Moved to pngpriv.h at libpng-1.5.0 */ + +/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" + * script. We may need it here to get the correct configuration on things + * like limits. + */ +#ifdef PNG_CONFIGURE_LIBPNG +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif +#endif + +/* Moved to pngpriv.h at libpng-1.5.0 */ +/* NOTE: some of these may have been used in external applications as + * these definitions were exposed in pngconf.h prior to 1.5. + */ + +/* If you are running on a machine where you cannot allocate more + * than 64K of memory at once, uncomment this. While libpng will not + * normally need that much memory in a chunk (unless you load up a very + * large file), zlib needs to know how big of a chunk it can use, and + * libpng thus makes sure to check any memory allocation to verify it + * will fit into memory. + * + * zlib provides 'MAXSEG_64K' which, if defined, indicates the + * same limit and pngconf.h (already included) sets the limit + * if certain operating systems are detected. + */ +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) +# define PNG_MAX_MALLOC_64K +#endif + +#ifndef PNG_UNUSED +/* Unused formal parameter warnings are silenced using the following macro + * which is expected to have no bad effects on performance (optimizing + * compilers will probably remove it entirely). Note that if you replace + * it with something other than whitespace, you must include the terminating + * semicolon. + */ +# define PNG_UNUSED(param) (void)param; +#endif + +/* Just a little check that someone hasn't tried to define something + * contradictory. + */ +#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) +# undef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 65536L +#endif + +/* If warnings or errors are turned off the code is disabled + * or redirected here. + */ +#ifndef PNG_WARNINGS_SUPPORTED +# define png_warning(s1,s2) ((void)0) +# define png_chunk_warning(s1,s2) ((void)0) +#endif +#ifndef PNG_ERROR_TEXT_SUPPORTED +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +# define png_fixed_error(s1,s2) png_err(s1) +#endif + +#ifndef PNG_EXTERN /* The functions exported by PNG_EXTERN are internal functions, which * aren't usually used outside the library (as far as I know), so it is * debatable if they should be exported at all. In the future, when it * is possible to have run-time registry of chunk-handling functions, - * some of these will be made available again. -#define PNG_EXTERN extern + * some of these might be made available again. +# define PNG_EXTERN extern */ -#define PNG_EXTERN +# define PNG_EXTERN +#endif + +/* Some fixed point APIs are still required even if not exported because + * they get used by the corresponding floating point APIs. This magic + * deals with this: + */ +#ifdef PNG_FIXED_POINT_SUPPORTED +# define PNGFAPI PNGAPI +#else +# define PNGFAPI /* PRIVATE */ +#endif /* Other defines specific to compilers can go here. Try to keep * them inside an appropriate ifdef/endif pair for portability. */ +#if defined(PNG_FLOATING_POINT_SUPPORTED) ||\ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) + /* png.c requires the following ANSI-C constants if the conversion of + * floating point to ASCII is implemented therein: + * + * DBL_DIG Maximum number of decimal digits (can be set to any constant) + * DBL_MIN Smallest normalized fp number (can be set to an arbitrary value) + * DBL_MAX Maximum floating point number (can be set to an arbitrary value) + */ +# include -#ifdef PNG_FLOATING_POINT_SUPPORTED -# ifdef MACOS +# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ + defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) /* We need to check that hasn't already been included earlier * as it seems it doesn't agree with , yet we should really use * if possible. @@ -61,11 +169,6 @@ # endif #endif -/* Codewarrior on NT has linking problems without this. */ -#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) -# define PNG_ALWAYS_EXTERN -#endif - /* This provides the non-ANSI (far) memory allocation routines. */ #if defined(__TURBOC__) && defined(__MSDOS__) # include @@ -75,12 +178,88 @@ #if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ defined(_WIN32) || defined(__WIN32__) # include /* defines _WINDOWS_ macro */ -/* I have no idea why is this necessary... */ -# ifdef _MSC_VER -# include +#endif + +/* Moved here around 1.5.0beta36 from pngconf.h */ +/* Users may want to use these so they are not private. Any library + * functions that are passed far data must be model-independent. + */ + +/* Memory model/platform independent fns */ +#ifndef PNG_ABORT +# ifdef _WINDOWS_ +# define PNG_ABORT() ExitProcess(0) +# else +# define PNG_ABORT() abort() # endif #endif +#ifdef USE_FAR_KEYWORD +/* Use this to make far-to-near assignments */ +# define CHECK 1 +# define NOCHECK 0 +# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) +# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) +# define png_strcpy _fstrcpy +# define png_strncpy _fstrncpy /* Added to v 1.2.6 */ +# define png_strlen _fstrlen +# define png_memcmp _fmemcmp /* SJT: added */ +# define png_memcpy _fmemcpy +# define png_memset _fmemset +# define png_sprintf sprintf +#else +# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ +# define CVT_PTR(ptr) (ptr) +# define CVT_PTR_NOCHECK(ptr) (ptr) +# define png_strcpy lstrcpyA +# define png_strncpy lstrcpynA +# define png_strlen lstrlenA +# define png_memcmp memcmp +# define png_memcpy CopyMemory +# define png_memset memset +# define png_sprintf wsprintfA +# else +# define CVT_PTR(ptr) (ptr) +# define CVT_PTR_NOCHECK(ptr) (ptr) +# define png_strcpy strcpy +# define png_strncpy strncpy /* Added to v 1.2.6 */ +# define png_strlen strlen +# define png_memcmp memcmp /* SJT: added */ +# define png_memcpy memcpy +# define png_memset memset +# define png_sprintf sprintf +# endif +#endif +/* End of memory model/platform independent support */ + +#ifndef PNG_NO_SNPRINTF +# ifdef _MSC_VER +# define png_snprintf _snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 _snprintf +# define png_snprintf6 _snprintf +# else +# define png_snprintf snprintf /* Added to v 1.2.19 */ +# define png_snprintf2 snprintf +# define png_snprintf6 snprintf +# endif +#else + /* You don't have or don't want to use snprintf(). Caution: Using + * sprintf instead of snprintf exposes your application to accidental + * or malevolent buffer overflows. If you don't have snprintf() + * as a general rule you should provide one (you can get one from + * Portable OpenSSH). + */ +# define png_snprintf(s1,n,fmt,x1) png_sprintf(s1,fmt,x1) +# define png_snprintf2(s1,n,fmt,x1,x2) png_sprintf(s1,fmt,x1,x2) +# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ + png_sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) +#endif +/* End of 1.5.0beta36 move from pngconf.h */ + +/* CONSTANTS and UTILITY MACROS + * These are used internally by libpng and not exposed in the API + */ + /* Various modes of operation. Note that after an init, mode is set to * zero automatically when the structure is created. */ @@ -106,10 +285,10 @@ #define PNG_SHIFT 0x0008 #define PNG_SWAP_BYTES 0x0010 #define PNG_INVERT_MONO 0x0020 -#define PNG_QUANTIZE 0x0040 /* formerly PNG_DITHER */ +#define PNG_QUANTIZE 0x0040 #define PNG_BACKGROUND 0x0080 #define PNG_BACKGROUND_EXPAND 0x0100 - /* 0x0200 unused */ +#define PNG_EXPAND_16 0x0200 /* Added to libpng 1.5.2 */ #define PNG_16_TO_8 0x0400 #define PNG_RGBA 0x0800 #define PNG_EXPAND 0x1000 @@ -138,9 +317,7 @@ #define PNG_STRUCT_INFO 0x0002 /* Scaling factor for filter heuristic weighting calculations */ -#define PNG_WEIGHT_SHIFT 8 #define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) -#define PNG_COST_SHIFT 3 #define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) /* Flags for the png_ptr->flags rather than declaring a byte for each one */ @@ -165,8 +342,8 @@ #define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L #define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L #define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L -#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ -#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ + /* 0x200000L unused */ + /* 0x400000L unused */ #define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */ /* 0x1000000L unused */ /* 0x2000000L unused */ @@ -185,6 +362,18 @@ #define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ PNG_FLAG_CRC_CRITICAL_MASK) +/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib + * can handle at once. This type need be no larger than 16 bits (so maximum of + * 65535), this define allows us to discover how big it is, but limited by the + * maximuum for png_size_t. The value can be overriden in a library build + * (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably + * lower value (e.g. 255 works). A lower value may help memory usage (slightly) + * and may even improve performance on some systems (and degrade it on others.) + */ +#ifndef ZLIB_IO_MAX +# define ZLIB_IO_MAX ((uInt)-1) +#endif + /* Save typing and make code easier to understand */ #define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ @@ -203,7 +392,46 @@ * integers, "value" a variable. Added to libpng-1.2.6 JB */ #define PNG_OUT_OF_RANGE(value, ideal, delta) \ - ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) + ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) + +/* Conversions between fixed and floating point, only defined if + * required (to make sure the code doesn't accidentally use float + * when it is supposedly disabled.) + */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +/* The floating point conversion can't overflow, though it can and + * does lose accuracy relative to the original fixed point value. + * In practice this doesn't matter because png_fixed_point only + * stores numbers with very low precision. The png_ptr and s + * arguments are unused by default but are there in case error + * checking becomes a requirement. + */ +#define png_float(png_ptr, fixed, s) (.00001 * (fixed)) + +/* The fixed point conversion performs range checking and evaluates + * its argument multiple times, so must be used with care. The + * range checking uses the PNG specification values for a signed + * 32 bit fixed point value except that the values are deliberately + * rounded-to-zero to an integral value - 21474 (21474.83 is roughly + * (2^31-1) * 100000). 's' is a string that describes the value being + * converted. + * + * NOTE: this macro will raise a png_error if the range check fails, + * therefore it is normally only appropriate to use this on values + * that come from API calls or other sources where an out of range + * error indicates a programming error, not a data error! + * + * NOTE: by default this is off - the macro is not used - because the + * function call saves a lot of code. + */ +#ifdef PNG_FIXED_POINT_MACRO_SUPPORTED +#define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\ + ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0)) +#else +PNG_EXTERN png_fixed_point png_fixed PNGARG((png_structp png_ptr, double fp, + png_const_charp text)); +#endif +#endif /* Constant strings for known chunk types. If you need to add a chunk, * define the name here, and add an invocation of the macro wherever it's @@ -245,70 +473,78 @@ extern "C" { */ /* Allocate memory for an internal libpng struct */ -PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); +PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct,PNGARG((int type)), + PNG_ALLOCATED); /* Free memory from internal libpng struct */ PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); -PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr - malloc_fn, png_voidp mem_ptr)); +PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct_2, + PNGARG((int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)), + PNG_ALLOCATED); PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, - png_free_ptr free_fn, png_voidp mem_ptr)); + png_free_ptr free_fn, png_voidp mem_ptr)); /* Free any memory that info_ptr points to and reset struct. */ PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)); /* Function to allocate memory for zlib. PNGAPI is disallowed. */ -PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); +PNG_EXTERN PNG_FUNCTION(voidpf,png_zalloc,PNGARG((voidpf png_ptr, uInt items, + uInt size)),PNG_ALLOCATED); /* Function to free memory for zlib. PNGAPI is disallowed. */ PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); -/* Next four functions are used internally as callbacks. PNGAPI is required - * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */ +/* Next four functions are used internally as callbacks. PNGCBAPI is required + * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3, changed to + * PNGCBAPI at 1.5.0 + */ -PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); +PNG_EXTERN void PNGCBAPI png_default_read_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); +PNG_EXTERN void PNGCBAPI png_push_fill_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t length)); #endif -PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); +PNG_EXTERN void PNGCBAPI png_default_write_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); #ifdef PNG_WRITE_FLUSH_SUPPORTED -#ifdef PNG_STDIO_SUPPORTED -PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); -#endif +# ifdef PNG_STDIO_SUPPORTED +PNG_EXTERN void PNGCBAPI png_default_flush PNGARG((png_structp png_ptr)); +# endif #endif /* Reset the CRC variable */ PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); /* Write the "data" buffer to whatever output you are using */ -PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); +PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, + png_const_bytep data, png_size_t length)); + +/* Read and check the PNG file signature */ +PNG_EXTERN void png_read_sig PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Read the chunk header (length + type name) */ PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); /* Read data from whatever input you are using into the "data" buffer */ PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); + png_size_t length)); /* Read bytes into buf, and update png_ptr->crc */ PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, - png_size_t length)); + png_size_t length)); /* Decompress data in a chunk that uses compression */ #if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, - int comp_type, png_size_t chunklength, png_size_t prefix_length, - png_size_t *data_length)); + int comp_type, png_size_t chunklength, png_size_t prefix_length, + png_size_t *data_length)); #endif /* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ @@ -321,8 +557,8 @@ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); * passing a maximum of 64K on systems that have this as a memory limit, * since this is the maximum buffer size we can specify. */ -PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, - png_size_t length)); +PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, + png_const_bytep ptr, png_size_t length)); #ifdef PNG_WRITE_FLUSH_SUPPORTED PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); @@ -334,138 +570,132 @@ PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); * information. */ PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, - png_uint_32 height, - int bit_depth, int color_type, int compression_method, int filter_method, - int interlace_method)); + png_uint_32 height, + int bit_depth, int color_type, int compression_method, int filter_method, + int interlace_method)); -PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, - png_uint_32 num_pal)); +PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, + png_const_colorp palette, png_uint_32 num_pal)); PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); + png_size_t length)); PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); #ifdef PNG_WRITE_gAMA_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED +# endif +# ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point file_gamma)); -#endif +# endif #endif #ifdef PNG_WRITE_sBIT_SUPPORTED -PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, - int color_type)); +PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, + png_const_color_8p sbit, int color_type)); #endif #ifdef PNG_WRITE_cHRM_SUPPORTED -#ifdef PNG_FLOATING_POINT_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, - double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y)); -#endif + double white_x, double white_y, + double red_x, double red_y, double green_x, double green_y, + double blue_x, double blue_y)); +# endif PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, - png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); #endif #ifdef PNG_WRITE_sRGB_SUPPORTED PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, - int intent)); + int intent)); #endif #ifdef PNG_WRITE_iCCP_SUPPORTED PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, - png_charp name, int compression_type, - png_charp profile, int proflen)); + png_const_charp name, int compression_type, + png_const_charp profile, int proflen)); /* Note to maintainer: profile should be png_bytep */ #endif #ifdef PNG_WRITE_sPLT_SUPPORTED PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, - png_sPLT_tp palette)); + png_const_sPLT_tp palette)); #endif #ifdef PNG_WRITE_tRNS_SUPPORTED -PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, - png_color_16p values, int number, int color_type)); +PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, + png_const_bytep trans, png_const_color_16p values, int number, + int color_type)); #endif #ifdef PNG_WRITE_bKGD_SUPPORTED PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, - png_color_16p values, int color_type)); + png_const_color_16p values, int color_type)); #endif #ifdef PNG_WRITE_hIST_SUPPORTED -PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, - int num_hist)); +PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, + png_const_uint_16p hist, int num_hist)); #endif #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, - png_charp key, png_charpp new_key)); + png_const_charp key, png_charpp new_key)); #endif #ifdef PNG_WRITE_tEXt_SUPPORTED -PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len)); +PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_const_charp key, + png_const_charp text, png_size_t text_len)); #endif #ifdef PNG_WRITE_zTXt_SUPPORTED -PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len, int compression)); +PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_const_charp key, + png_const_charp text, png_size_t text_len, int compression)); #endif #ifdef PNG_WRITE_iTXt_SUPPORTED PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, - int compression, png_charp key, png_charp lang, png_charp lang_key, - png_charp text)); + int compression, png_const_charp key, png_const_charp lang, + png_const_charp lang_key, png_const_charp text)); #endif #ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)); + png_infop info_ptr, png_const_textp text_ptr, int num_text)); #endif #ifdef PNG_WRITE_oFFs_SUPPORTED PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, - png_int_32 x_offset, png_int_32 y_offset, int unit_type)); + png_int_32 x_offset, png_int_32 y_offset, int unit_type)); #endif #ifdef PNG_WRITE_pCAL_SUPPORTED PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, - png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params)); + png_int_32 X0, png_int_32 X1, int type, int nparams, + png_const_charp units, png_charpp params)); #endif #ifdef PNG_WRITE_pHYs_SUPPORTED PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, - png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, - int unit_type)); + png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, + int unit_type)); #endif #ifdef PNG_WRITE_tIME_SUPPORTED PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, - png_timep mod_time)); + png_const_timep mod_time)); #endif #ifdef PNG_WRITE_sCAL_SUPPORTED -#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) -PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, - int unit, double width, double height)); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, - int unit, png_charp width, png_charp height)); -#endif -#endif + int unit, png_const_charp width, png_const_charp height)); #endif /* Called when finished processing a row of data */ @@ -474,20 +704,15 @@ PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); /* Internal use only. Called before first row of data */ PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); -#ifdef PNG_READ_GAMMA_SUPPORTED -PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr, - png_byte bit_depth)); -#endif - /* Combine a row of data, dealing with alpha, etc. if requested */ PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, - int mask)); + int mask)); #ifdef PNG_READ_INTERLACING_SUPPORTED /* Expand an interlaced row */ /* OLD pre-1.0.9 interface: PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass, png_uint_32 transformations)); + png_bytep row, int pass, png_uint_32 transformations)); */ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); #endif @@ -497,20 +722,21 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); #ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Grab pixels out of a row for an interlaced pass */ PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass)); + png_bytep row, int pass)); #endif /* Unfilter a row */ PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, - png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); + png_row_infop row_info, png_bytep row, png_const_bytep prev_row, + int filter)); /* Choose the best filter to use and filter the row data */ PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, - png_row_infop row_info)); + png_row_infop row_info)); /* Write out the filtered row. */ PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, - png_bytep filtered_row)); + png_bytep filtered_row)); /* Finish a row while reading, dealing with interlacing passes, etc. */ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); @@ -518,88 +744,97 @@ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); /* Optional call to update the users info structure */ PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)); /* These are the functions that do the transformations */ #ifdef PNG_READ_FILLER_SUPPORTED PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 filler, png_uint_32 flags)); + png_bytep row, png_uint_32 filler, png_uint_32 flags)); #endif #ifdef PNG_READ_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)); #endif #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)); #endif #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)); #endif #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)); #endif #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 flags)); +PNG_EXTERN void png_do_strip_channel PNGARG((png_row_infop row_info, + png_bytep row, int at_start)); #endif +#ifdef PNG_16BIT_SUPPORTED #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); +PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, + png_bytep row)); +#endif #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ defined(PNG_WRITE_PACKSWAP_SUPPORTED) -PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); +PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, + png_bytep row)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED -PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop - row_info, png_bytep row)); +PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, + png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)); #endif #ifdef PNG_READ_PACK_SUPPORTED -PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); +PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, + png_bytep row)); #endif #ifdef PNG_READ_SHIFT_SUPPORTED -PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p sig_bits)); +PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_8p sig_bits)); #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); +PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, + png_bytep row)); #endif #ifdef PNG_READ_16_TO_8_SUPPORTED -PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); +PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, + png_bytep row)); #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info, - png_bytep row, png_bytep palette_lookup, png_bytep quantize_lookup)); + png_bytep row, png_const_bytep palette_lookup, + png_const_bytep quantize_lookup)); # ifdef PNG_CORRECT_PALETTE_SUPPORTED PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette)); + png_colorp palette, int num_palette)); # endif #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); +PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, + png_bytep row)); #endif #ifdef PNG_WRITE_PACK_SUPPORTED @@ -608,35 +843,43 @@ PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, #endif #ifdef PNG_WRITE_SHIFT_SUPPORTED -PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p bit_depth)); +PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_8p bit_depth)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED -#ifdef PNG_READ_GAMMA_SUPPORTED -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_color, png_color_16p background, - png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift)); -#else -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_color, png_color_16p background)); -#endif +# ifdef PNG_READ_GAMMA_SUPPORTED +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_16p trans_color, + png_const_color_16p background, png_const_color_16p background_1, + png_const_bytep gamma_table, png_const_bytep gamma_from_1, + png_const_bytep gamma_to_1, png_const_uint_16pp gamma_16, + png_const_uint_16pp gamma_16_from_1, png_const_uint_16pp gamma_16_to_1, + int gamma_shift)); +# else +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, + png_bytep row, png_const_color_16p trans_color, + png_const_color_16p background)); +# endif #endif #ifdef PNG_READ_GAMMA_SUPPORTED -PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift)); +PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, + png_bytep row, png_const_bytep gamma_table, + png_const_uint_16pp gamma_16_table, int gamma_shift)); #endif #ifdef PNG_READ_EXPAND_SUPPORTED PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, - png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); + png_bytep row, png_const_colorp palette, png_const_bytep trans, + int num_trans)); PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, - png_bytep row, png_color_16p trans_value)); + png_bytep row, png_const_color_16p trans_color)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +PNG_EXTERN void png_do_expand_16 PNGARG((png_row_infop row_info, + png_bytep row)); #endif /* The following decodes the appropriate chunks, and does error correction, @@ -645,102 +888,102 @@ PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, /* Decode the IHDR chunk */ PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #ifdef PNG_READ_bKGD_SUPPORTED PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_cHRM_SUPPORTED PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_gAMA_SUPPORTED PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_hIST_SUPPORTED PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_iCCP_SUPPORTED -extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); +PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); #endif /* PNG_READ_iCCP_SUPPORTED */ #ifdef PNG_READ_iTXt_SUPPORTED PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_oFFs_SUPPORTED PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_pCAL_SUPPORTED PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_pHYs_SUPPORTED PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_sBIT_SUPPORTED PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_sCAL_SUPPORTED PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_sPLT_SUPPORTED -extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); +PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); #endif /* PNG_READ_sPLT_SUPPORTED */ #ifdef PNG_READ_sRGB_SUPPORTED PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_tEXt_SUPPORTED PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_tIME_SUPPORTED PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_tRNS_SUPPORTED PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif #ifdef PNG_READ_zTXt_SUPPORTED PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); + png_uint_32 length)); #endif PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); + png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, - png_bytep chunk_name)); + png_const_bytep chunk_name)); /* Handle the transformations for reading and writing */ PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); @@ -750,19 +993,19 @@ PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, - png_uint_32 length)); + png_uint_32 length)); PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); + png_bytep buffer, png_size_t buffer_length)); PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); + png_bytep buffer, png_size_t buffer_length)); PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); @@ -772,185 +1015,232 @@ PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, - png_infop info_ptr)); + png_infop info_ptr)); PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); -#ifdef PNG_READ_tEXt_SUPPORTED +# ifdef PNG_READ_tEXt_SUPPORTED PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); + png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif -#ifdef PNG_READ_zTXt_SUPPORTED + png_infop info_ptr)); +# endif +# ifdef PNG_READ_zTXt_SUPPORTED PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); + png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif -#ifdef PNG_READ_iTXt_SUPPORTED + png_infop info_ptr)); +# endif +# ifdef PNG_READ_iTXt_SUPPORTED PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); + png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif + png_infop info_ptr)); +# endif #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ #ifdef PNG_MNG_FEATURES_SUPPORTED PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)); PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); + png_bytep row)); #endif /* Added at libpng version 1.4.0 */ -#ifdef PNG_cHRM_SUPPORTED +#ifdef PNG_CHECK_cHRM_SUPPORTED PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, - png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); #endif -#ifdef PNG_cHRM_SUPPORTED #ifdef PNG_CHECK_cHRM_SUPPORTED /* Added at libpng version 1.2.34 and 1.4.0 */ +/* Currently only used by png_check_cHRM_fixed */ PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, - unsigned long *hi_product, unsigned long *lo_product)); -#endif + unsigned long *hi_product, unsigned long *lo_product)); #endif /* Added at libpng version 1.4.0 */ PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, - png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_type, int compression_type, - int filter_type)); + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type)); /* Free all memory used by the read (old method - NOT DLL EXPORTED) */ -extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, - png_infop end_info_ptr)); +PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr, + png_infop info_ptr, png_infop end_info_ptr)); /* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ -extern void png_write_destroy PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr)); #ifdef USE_FAR_KEYWORD /* memory model conversion function */ -extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, - int check)); +PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr, png_voidp ptr, + int check)); #endif /* USE_FAR_KEYWORD */ -/* Define PNG_DEBUG at compile time for debugging information. Higher - * numbers for PNG_DEBUG mean more debugging information. This has - * only been added since version 0.95 so it is not implemented throughout - * libpng yet, but more support will be added as needed. - */ -#ifdef PNG_DEBUG -#if (PNG_DEBUG > 0) -#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) -#include -#if (PNG_DEBUG > 1) -#ifndef _DEBUG -# define _DEBUG +#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) +PNG_EXTERN PNG_FUNCTION(void, png_fixed_error, (png_structp png_ptr, + png_const_charp name),PNG_NORETURN); #endif -#ifndef png_debug -#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) -#endif -#ifndef png_debug1 -#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) -#endif -#ifndef png_debug2 -#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) -#endif -#endif -#else /* PNG_DEBUG_FILE || !_MSC_VER */ -#ifndef PNG_DEBUG_FILE -#define PNG_DEBUG_FILE stderr -#endif /* PNG_DEBUG_FILE */ -#if (PNG_DEBUG > 1) -/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on - * non-ISO compilers +/* ASCII to FP interfaces, currently only implemented if sCAL + * support is required. */ -# ifdef __STDC__ -# ifndef png_debug -# define png_debug(l,m) \ - { \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ - } -# endif -# ifndef png_debug1 -# define png_debug1(l,m,p1) \ - { \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ - } -# endif -# ifndef png_debug2 -# define png_debug2(l,m,p1,p2) \ - { \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ - } -# endif -# else /* __STDC __ */ -# ifndef png_debug -# define png_debug(l,m) \ - { \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format); \ - } -# endif -# ifndef png_debug1 -# define png_debug1(l,m,p1) \ - { \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format,p1); \ - } -# endif -# ifndef png_debug2 -# define png_debug2(l,m,p1,p2) \ - { \ - int num_tabs=l; \ - char format[256]; \ - snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ - m,PNG_STRING_NEWLINE); \ - fprintf(PNG_DEBUG_FILE,format,p1,p2); \ - } -# endif -# endif /* __STDC __ */ -#endif /* (PNG_DEBUG > 1) */ +#if defined(PNG_READ_sCAL_SUPPORTED) +/* MAX_DIGITS is actually the maximum number of characters in an sCAL + * width or height, derived from the precision (number of significant + * digits - a build time settable option) and assumpitions about the + * maximum ridiculous exponent. + */ +#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/) -#endif /* _MSC_VER */ -#endif /* (PNG_DEBUG > 0) */ -#endif /* PNG_DEBUG */ -#ifndef png_debug -#define png_debug(l, m) +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_ascii_from_fp PNGARG((png_structp png_ptr, png_charp ascii, + png_size_t size, double fp, unsigned int precision)); +#endif /* FLOATING_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr, + png_charp ascii, png_size_t size, png_fixed_point fp)); +#endif /* FIXED_POINT */ +#endif /* READ_sCAL */ + +#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) +/* An internal API to validate the format of a floating point number. + * The result is the index of the next character. If the number is + * not valid it will be the index of a character in the supposed number. + * + * The format of a number is defined in the PNG extensions specification + * and this API is strictly conformant to that spec, not anyone elses! + * + * The format as a regular expression is: + * + * [+-]?[0-9]+.?([Ee][+-]?[0-9]+)? + * + * or: + * + * [+-]?.[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)? + * + * The complexity is that either integer or fraction must be present and the + * fraction is permitted to have no digits only if the integer is present. + * + * NOTE: The dangling E problem. + * There is a PNG valid floating point number in the following: + * + * PNG floating point numb1.ers are not greedy. + * + * Working this out requires *TWO* character lookahead (because of the + * sign), the parser does not do this - it will fail at the 'r' - this + * doesn't matter for PNG sCAL chunk values, but it requires more care + * if the value were ever to be embedded in something more complex. Use + * ANSI-C strtod if you need the lookahead. + */ +/* State table for the parser. */ +#define PNG_FP_INTEGER 0 /* before or in integer */ +#define PNG_FP_FRACTION 1 /* before or in fraction */ +#define PNG_FP_EXPONENT 2 /* before or in exponent */ +#define PNG_FP_STATE 3 /* mask for the above */ +#define PNG_FP_SAW_SIGN 4 /* Saw +/- in current state */ +#define PNG_FP_SAW_DIGIT 8 /* Saw a digit in current state */ +#define PNG_FP_SAW_DOT 16 /* Saw a dot in current state */ +#define PNG_FP_SAW_E 32 /* Saw an E (or e) in current state */ +#define PNG_FP_SAW_ANY 60 /* Saw any of the above 4 */ +#define PNG_FP_WAS_VALID 64 /* Preceding substring is a valid fp number */ +#define PNG_FP_INVALID 128 /* Available for callers as a distinct value */ + +/* Result codes for the parser (boolean - true meants ok, false means + * not ok yet.) + */ +#define PNG_FP_MAYBE 0 /* The number may be valid in the future */ +#define PNG_FP_OK 1 /* The number is valid */ + +/* The actual parser. This can be called repeatedly, it updates + * the index into the string and the state variable (which must + * be initialzed to 0). It returns a result code, as above. There + * is no point calling the parser any more if it fails to advance to + * the end of the string - it is stuck on an invalid character (or + * terminated by '\0'). + * + * Note that the pointer will consume an E or even an E+ then leave + * a 'maybe' state even though a preceding integer.fraction is valid. + * The PNG_FP_WAS_VALID flag indicates that a preceding substring was + * a valid number. It's possible to recover from this by calling + * the parser again (from the start, with state 0) but with a string + * that omits the last character (i.e. set the size to the index of + * the problem character.) This has not been tested within libpng. + */ +PNG_EXTERN int png_check_fp_number PNGARG((png_const_charp string, + png_size_t size, int *statep, png_size_tp whereami)); + +/* This is the same but it checks a complete string and returns true + * only if it just contains a floating point number. + */ +PNG_EXTERN int png_check_fp_string PNGARG((png_const_charp string, + png_size_t size)); +#endif /* pCAL || sCAL */ + +#if defined(PNG_READ_GAMMA_SUPPORTED) ||\ + defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED) +/* Added at libpng version 1.5.0 */ +/* This is a utility to provide a*times/div (rounded) and indicate + * if there is an overflow. The result is a boolean - false (0) + * for overflow, true (1) if no overflow, in which case *res + * holds the result. + */ +PNG_EXTERN int png_muldiv PNGARG((png_fixed_point_p res, png_fixed_point a, + png_int_32 multiplied_by, png_int_32 divided_by)); #endif -#ifndef png_debug1 -#define png_debug1(l, m, p1) + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) +/* Same deal, but issue a warning on overflow and return 0. */ +PNG_EXTERN png_fixed_point png_muldiv_warn PNGARG((png_structp png_ptr, + png_fixed_point a, png_int_32 multiplied_by, png_int_32 divided_by)); #endif -#ifndef png_debug2 -#define png_debug2(l, m, p1, p2) + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* Calculate a reciprocal - used for gamma values. This returns + * 0 if the argument is 0 in order to maintain an undefined value, + * there are no warnings. + */ +PNG_EXTERN png_fixed_point png_reciprocal PNGARG((png_fixed_point a)); + +/* The same but gives a reciprocal of the product of two fixed point + * values. Accuracy is suitable for gamma calculations but this is + * not exact - use png_muldiv for that. + */ +PNG_EXTERN png_fixed_point png_reciprocal2 PNGARG((png_fixed_point a, + png_fixed_point b)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* Internal fixed point gamma correction. These APIs are called as + * required to convert single values - they don't need to be fast, + * they are not used when processing image pixel values. + * + * While the input is an 'unsigned' value it must actually be the + * correct bit value - 0..255 or 0..65535 as required. + */ +PNG_EXTERN png_uint_16 png_gamma_correct PNGARG((png_structp png_ptr, + unsigned int value, png_fixed_point gamma_value)); +PNG_EXTERN int png_gamma_significant PNGARG((png_fixed_point gamma_value)); +PNG_EXTERN png_uint_16 png_gamma_16bit_correct PNGARG((unsigned int value, + png_fixed_point gamma_value)); +PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value, + png_fixed_point gamma_value)); +PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr, + int bit_depth)); #endif /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ + +#include "pngdebug.h" + #ifdef __cplusplus } #endif -#endif /* PNG_VERSION_INFO_ONLY */ #endif /* PNGPRIV_H */ diff --git a/include/reactos/libs/libpng/pngstruct.h b/include/reactos/libs/libpng/pngstruct.h new file mode 100644 index 00000000000..ed6723dee77 --- /dev/null +++ b/include/reactos/libs/libpng/pngstruct.h @@ -0,0 +1,924 @@ + +/* pngstruct.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The structure that holds the information to read and write PNG files. + * The only people who need to care about what is inside of this are the + * people who will be modifying the library for their own special needs. + * It should NOT be accessed directly by an application. + */ + +#ifndef PNGSTRUCT_H +#define PNGSTRUCT_H +/* zlib.h defines the structure z_stream, an instance of which is included + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ +#include "zlib.h" + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf png_jmpbuf; /* used in png_error */ + png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ +#endif + png_error_ptr error_fn; /* function for printing errors and aborting */ + png_error_ptr warning_fn; /* function for printing warnings */ + png_voidp error_ptr; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn; /* function for writing output data */ + png_rw_ptr read_data_fn; /* function for reading input data */ + png_voidp io_ptr; /* ptr to application struct for I/O functions */ + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr; /* user supplied struct for user transform */ + png_byte user_transform_depth; /* bit depth of user transformed pixels */ + png_byte user_transform_channels; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode; /* tells us where we are in the PNG file */ + png_uint_32 flags; /* flags indicating various things to libpng */ + png_uint_32 transformations; /* which transformations to perform */ + + z_stream zstream; /* pointer to decompression structure (below) */ + png_bytep zbuf; /* buffer for zlib */ + uInt zbuf_size; /* size of zbuf (typically 65536) */ + int zlib_level; /* holds zlib compression level */ + int zlib_method; /* holds zlib compression method */ + int zlib_window_bits; /* holds zlib compression window bits */ + int zlib_mem_level; /* holds zlib compression memory level */ + int zlib_strategy; /* holds zlib compression strategy */ + + png_uint_32 width; /* width of image in pixels */ + png_uint_32 height; /* height of image in pixels */ + png_uint_32 num_rows; /* number of rows in current pass */ + png_uint_32 usr_width; /* width of row at start of write */ + png_size_t rowbytes; /* size of row in bytes */ + png_uint_32 iwidth; /* width of current interlaced row in pixels */ + png_uint_32 row_number; /* current row in interlace pass */ + png_bytep prev_row; /* buffer to save previous (unfiltered) row */ + png_bytep row_buf; /* buffer to save current (unfiltered) row */ + png_bytep sub_row; /* buffer to save "sub" row when filtering */ + png_bytep up_row; /* buffer to save "up" row when filtering */ + png_bytep avg_row; /* buffer to save "avg" row when filtering */ + png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ + png_row_info row_info; /* used for transformation routines */ + + png_uint_32 idat_size; /* current IDAT size for read */ + png_uint_32 crc; /* current chunk CRC value */ + png_colorp palette; /* palette from the input file */ + png_uint_16 num_palette; /* number of color entries in palette */ + png_uint_16 num_trans; /* number of transparency values */ + png_byte chunk_name[5]; /* null-terminated name of current chunk */ + png_byte compression; /* file compression type (always 0) */ + png_byte filter; /* file filter type (always 0) */ + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass; /* current interlace pass (0 - 6) */ + png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte color_type; /* color type of file */ + png_byte bit_depth; /* bit depth of file */ + png_byte usr_bit_depth; /* bit depth of users row */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte channels; /* number of channels in file */ + png_byte usr_channels; /* channels at start of write */ + png_byte sig_bytes; /* magic bytes read/written from start of file */ + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) + png_uint_16 filler; /* filler bytes for pixel expansion */ +#endif + +#ifdef PNG_bKGD_SUPPORTED + png_byte background_gamma_type; + png_fixed_point background_gamma; + png_color_16 background; /* background color in screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1; /* background normalized to gamma 1.0 */ +#endif +#endif /* PNG_bKGD_SUPPORTED */ + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn; /* Function for flushing output */ + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows; /* number of rows written since last flush */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ + png_fixed_point gamma; /* file gamma value */ + png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep gamma_table; /* gamma table for 8-bit depth files */ + png_bytep gamma_from_1; /* converts from 1.0 to screen */ + png_bytep gamma_to_1; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit; /* significant bits in each available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift; /* shift for significant bit tranformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans_alpha; /* alpha values for paletted files */ + png_color_16 trans_color; /* transparent color for non-paletted files */ +#endif + + png_read_status_ptr read_row_fn; /* called after each row is decoded */ + png_write_status_ptr write_row_fn; /* called after each row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn; /* called after header data fully read */ + png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */ + png_progressive_end_ptr end_fn; /* called after image is complete */ + png_bytep save_buffer_ptr; /* current location in save_buffer */ + png_bytep save_buffer; /* buffer for previously read data */ + png_bytep current_buffer_ptr; /* current location in current_buffer */ + png_bytep current_buffer; /* buffer for recently used data */ + png_uint_32 push_length; /* size of current input chunk */ + png_uint_32 skip_length; /* bytes to skip in input data */ + png_size_t save_buffer_size; /* amount of data now in save_buffer */ + png_size_t save_buffer_max; /* total size of save_buffer */ + png_size_t buffer_size; /* total amount of available input data */ + png_size_t current_buffer_size; /* amount of data now in current_buffer */ + int process_mode; /* what push library is currently doing */ + int cur_palette; /* current push library palette index */ + +# ifdef PNG_TEXT_SUPPORTED + png_size_t current_text_size; /* current size of text input data */ + png_size_t current_text_left; /* how much text left to read in input */ + png_charp current_text; /* current text chunk buffer */ + png_charp current_text_ptr; /* current location in current_text */ +# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* For the Borland special 64K segment handler */ + png_bytepp offset_table_ptr; + png_bytep offset_table; + png_uint_16 offset_table_number; + png_uint_16 offset_table_count; + png_uint_16 offset_table_count_free; +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_bytep palette_lookup; /* lookup table for quantizing */ + png_bytep quantize_index; /* index translation for palette files */ +#endif + +#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) + png_uint_16p hist; /* histogram */ +#endif + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_byte heuristic_method; /* heuristic for row filter selection */ + png_byte num_prev_filters; /* number of weights for previous rows */ + png_bytep prev_filters; /* filter type(s) of previous row(s) */ + png_uint_16p filter_weights; /* weight(s) for previous line(s) */ + png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ + png_uint_16p filter_costs; /* relative filter calculation cost */ + png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + png_charp time_buffer; /* String to hold RFC 1123 time text */ +#endif + +/* New members added in libpng-1.0.6 */ + + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr; + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#endif + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int num_chunk_list; + png_bytep chunk_list; +#endif + +/* New members added in libpng-1.0.3 */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff; + png_uint_16 rgb_to_gray_green_coeff; + png_uint_16 rgb_to_gray_blue_coeff; +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ + defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type; +#endif + +/* New members added in libpng-1.2.0 */ + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn; /* function for allocating memory */ + png_free_ptr free_fn; /* function for freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep quantize_sort; /* working sort array */ + png_bytep index_to_palette; /* where the original index currently is + in the palette */ + png_bytep palette_to_index; /* which original index points to this + palette color */ +#endif + +/* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type; + +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max; + png_uint_32 user_height_max; + + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max; + + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + */ + png_alloc_size_t user_chunk_malloc_max; +#endif + +/* New member added in libpng-1.0.25 and 1.2.17 */ +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED + /* Storage for unknown chunk that the library doesn't recognize. */ + png_unknown_chunk unknown_chunk; +#endif + +/* New members added in libpng-1.2.26 */ + png_size_t old_big_row_buf_size; + png_size_t old_prev_row_size; + +/* New member added in libpng-1.2.30 */ + png_charp chunkdata; /* buffer for reading chunk data */ + +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state; +#endif +}; +#endif /* PNGSTRUCT_H */ + +/* pngstruct.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The structure that holds the information to read and write PNG files. + * The only people who need to care about what is inside of this are the + * people who will be modifying the library for their own special needs. + * It should NOT be accessed directly by an application. + */ + +#ifndef PNGSTRUCT_H +#define PNGSTRUCT_H +/* zlib.h defines the structure z_stream, an instance of which is included + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ +#include "zlib.h" + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf png_jmpbuf; /* used in png_error */ + png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ +#endif + png_error_ptr error_fn; /* function for printing errors and aborting */ + png_error_ptr warning_fn; /* function for printing warnings */ + png_voidp error_ptr; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn; /* function for writing output data */ + png_rw_ptr read_data_fn; /* function for reading input data */ + png_voidp io_ptr; /* ptr to application struct for I/O functions */ + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr; /* user supplied struct for user transform */ + png_byte user_transform_depth; /* bit depth of user transformed pixels */ + png_byte user_transform_channels; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode; /* tells us where we are in the PNG file */ + png_uint_32 flags; /* flags indicating various things to libpng */ + png_uint_32 transformations; /* which transformations to perform */ + + z_stream zstream; /* pointer to decompression structure (below) */ + png_bytep zbuf; /* buffer for zlib */ + uInt zbuf_size; /* size of zbuf (typically 65536) */ + int zlib_level; /* holds zlib compression level */ + int zlib_method; /* holds zlib compression method */ + int zlib_window_bits; /* holds zlib compression window bits */ + int zlib_mem_level; /* holds zlib compression memory level */ + int zlib_strategy; /* holds zlib compression strategy */ + + png_uint_32 width; /* width of image in pixels */ + png_uint_32 height; /* height of image in pixels */ + png_uint_32 num_rows; /* number of rows in current pass */ + png_uint_32 usr_width; /* width of row at start of write */ + png_size_t rowbytes; /* size of row in bytes */ + png_uint_32 iwidth; /* width of current interlaced row in pixels */ + png_uint_32 row_number; /* current row in interlace pass */ + png_bytep prev_row; /* buffer to save previous (unfiltered) row */ + png_bytep row_buf; /* buffer to save current (unfiltered) row */ + png_bytep sub_row; /* buffer to save "sub" row when filtering */ + png_bytep up_row; /* buffer to save "up" row when filtering */ + png_bytep avg_row; /* buffer to save "avg" row when filtering */ + png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ + png_row_info row_info; /* used for transformation routines */ + + png_uint_32 idat_size; /* current IDAT size for read */ + png_uint_32 crc; /* current chunk CRC value */ + png_colorp palette; /* palette from the input file */ + png_uint_16 num_palette; /* number of color entries in palette */ + png_uint_16 num_trans; /* number of transparency values */ + png_byte chunk_name[5]; /* null-terminated name of current chunk */ + png_byte compression; /* file compression type (always 0) */ + png_byte filter; /* file filter type (always 0) */ + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass; /* current interlace pass (0 - 6) */ + png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte color_type; /* color type of file */ + png_byte bit_depth; /* bit depth of file */ + png_byte usr_bit_depth; /* bit depth of users row */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte channels; /* number of channels in file */ + png_byte usr_channels; /* channels at start of write */ + png_byte sig_bytes; /* magic bytes read/written from start of file */ + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) + png_uint_16 filler; /* filler bytes for pixel expansion */ +#endif + +#ifdef PNG_bKGD_SUPPORTED + png_byte background_gamma_type; + png_fixed_point background_gamma; + png_color_16 background; /* background color in screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1; /* background normalized to gamma 1.0 */ +#endif +#endif /* PNG_bKGD_SUPPORTED */ + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn; /* Function for flushing output */ + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows; /* number of rows written since last flush */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ + png_fixed_point gamma; /* file gamma value */ + png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep gamma_table; /* gamma table for 8-bit depth files */ + png_bytep gamma_from_1; /* converts from 1.0 to screen */ + png_bytep gamma_to_1; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit; /* significant bits in each available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift; /* shift for significant bit tranformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans_alpha; /* alpha values for paletted files */ + png_color_16 trans_color; /* transparent color for non-paletted files */ +#endif + + png_read_status_ptr read_row_fn; /* called after each row is decoded */ + png_write_status_ptr write_row_fn; /* called after each row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn; /* called after header data fully read */ + png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */ + png_progressive_end_ptr end_fn; /* called after image is complete */ + png_bytep save_buffer_ptr; /* current location in save_buffer */ + png_bytep save_buffer; /* buffer for previously read data */ + png_bytep current_buffer_ptr; /* current location in current_buffer */ + png_bytep current_buffer; /* buffer for recently used data */ + png_uint_32 push_length; /* size of current input chunk */ + png_uint_32 skip_length; /* bytes to skip in input data */ + png_size_t save_buffer_size; /* amount of data now in save_buffer */ + png_size_t save_buffer_max; /* total size of save_buffer */ + png_size_t buffer_size; /* total amount of available input data */ + png_size_t current_buffer_size; /* amount of data now in current_buffer */ + int process_mode; /* what push library is currently doing */ + int cur_palette; /* current push library palette index */ + +# ifdef PNG_TEXT_SUPPORTED + png_size_t current_text_size; /* current size of text input data */ + png_size_t current_text_left; /* how much text left to read in input */ + png_charp current_text; /* current text chunk buffer */ + png_charp current_text_ptr; /* current location in current_text */ +# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* For the Borland special 64K segment handler */ + png_bytepp offset_table_ptr; + png_bytep offset_table; + png_uint_16 offset_table_number; + png_uint_16 offset_table_count; + png_uint_16 offset_table_count_free; +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_bytep palette_lookup; /* lookup table for quantizing */ + png_bytep quantize_index; /* index translation for palette files */ +#endif + +#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) + png_uint_16p hist; /* histogram */ +#endif + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_byte heuristic_method; /* heuristic for row filter selection */ + png_byte num_prev_filters; /* number of weights for previous rows */ + png_bytep prev_filters; /* filter type(s) of previous row(s) */ + png_uint_16p filter_weights; /* weight(s) for previous line(s) */ + png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ + png_uint_16p filter_costs; /* relative filter calculation cost */ + png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + png_charp time_buffer; /* String to hold RFC 1123 time text */ +#endif + +/* New members added in libpng-1.0.6 */ + + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr; + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#endif + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int num_chunk_list; + png_bytep chunk_list; +#endif + +/* New members added in libpng-1.0.3 */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff; + png_uint_16 rgb_to_gray_green_coeff; + png_uint_16 rgb_to_gray_blue_coeff; +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ + defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type; +#endif + +/* New members added in libpng-1.2.0 */ + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn; /* function for allocating memory */ + png_free_ptr free_fn; /* function for freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep quantize_sort; /* working sort array */ + png_bytep index_to_palette; /* where the original index currently is + in the palette */ + png_bytep palette_to_index; /* which original index points to this + palette color */ +#endif + +/* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type; + +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max; + png_uint_32 user_height_max; + + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max; + + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + */ + png_alloc_size_t user_chunk_malloc_max; +#endif + +/* New member added in libpng-1.0.25 and 1.2.17 */ +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED + /* Storage for unknown chunk that the library doesn't recognize. */ + png_unknown_chunk unknown_chunk; +#endif + +/* New members added in libpng-1.2.26 */ + png_size_t old_big_row_buf_size; + png_size_t old_prev_row_size; + +/* New member added in libpng-1.2.30 */ + png_charp chunkdata; /* buffer for reading chunk data */ + +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state; +#endif +}; +#endif /* PNGSTRUCT_H */ + +/* pngstruct.h - header file for PNG reference library + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The structure that holds the information to read and write PNG files. + * The only people who need to care about what is inside of this are the + * people who will be modifying the library for their own special needs. + * It should NOT be accessed directly by an application. + */ + +#ifndef PNGSTRUCT_H +#define PNGSTRUCT_H +/* zlib.h defines the structure z_stream, an instance of which is included + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ +#include "zlib.h" + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf png_jmpbuf; /* used in png_error */ + png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ +#endif + png_error_ptr error_fn; /* function for printing errors and aborting */ + png_error_ptr warning_fn; /* function for printing warnings */ + png_voidp error_ptr; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn; /* function for writing output data */ + png_rw_ptr read_data_fn; /* function for reading input data */ + png_voidp io_ptr; /* ptr to application struct for I/O functions */ + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr; /* user supplied struct for user transform */ + png_byte user_transform_depth; /* bit depth of user transformed pixels */ + png_byte user_transform_channels; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode; /* tells us where we are in the PNG file */ + png_uint_32 flags; /* flags indicating various things to libpng */ + png_uint_32 transformations; /* which transformations to perform */ + + z_stream zstream; /* pointer to decompression structure (below) */ + png_bytep zbuf; /* buffer for zlib */ + uInt zbuf_size; /* size of zbuf (typically 65536) */ + int zlib_level; /* holds zlib compression level */ + int zlib_method; /* holds zlib compression method */ + int zlib_window_bits; /* holds zlib compression window bits */ + int zlib_mem_level; /* holds zlib compression memory level */ + int zlib_strategy; /* holds zlib compression strategy */ + + png_uint_32 width; /* width of image in pixels */ + png_uint_32 height; /* height of image in pixels */ + png_uint_32 num_rows; /* number of rows in current pass */ + png_uint_32 usr_width; /* width of row at start of write */ + png_size_t rowbytes; /* size of row in bytes */ + png_uint_32 iwidth; /* width of current interlaced row in pixels */ + png_uint_32 row_number; /* current row in interlace pass */ + png_bytep prev_row; /* buffer to save previous (unfiltered) row */ + png_bytep row_buf; /* buffer to save current (unfiltered) row */ + png_bytep sub_row; /* buffer to save "sub" row when filtering */ + png_bytep up_row; /* buffer to save "up" row when filtering */ + png_bytep avg_row; /* buffer to save "avg" row when filtering */ + png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ + png_row_info row_info; /* used for transformation routines */ + + png_uint_32 idat_size; /* current IDAT size for read */ + png_uint_32 crc; /* current chunk CRC value */ + png_colorp palette; /* palette from the input file */ + png_uint_16 num_palette; /* number of color entries in palette */ + png_uint_16 num_trans; /* number of transparency values */ + png_byte chunk_name[5]; /* null-terminated name of current chunk */ + png_byte compression; /* file compression type (always 0) */ + png_byte filter; /* file filter type (always 0) */ + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass; /* current interlace pass (0 - 6) */ + png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte color_type; /* color type of file */ + png_byte bit_depth; /* bit depth of file */ + png_byte usr_bit_depth; /* bit depth of users row */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte channels; /* number of channels in file */ + png_byte usr_channels; /* channels at start of write */ + png_byte sig_bytes; /* magic bytes read/written from start of file */ + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) + png_uint_16 filler; /* filler bytes for pixel expansion */ +#endif + +#ifdef PNG_bKGD_SUPPORTED + png_byte background_gamma_type; + png_fixed_point background_gamma; + png_color_16 background; /* background color in screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1; /* background normalized to gamma 1.0 */ +#endif +#endif /* PNG_bKGD_SUPPORTED */ + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn; /* Function for flushing output */ + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows; /* number of rows written since last flush */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ + png_fixed_point gamma; /* file gamma value */ + png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep gamma_table; /* gamma table for 8-bit depth files */ + png_bytep gamma_from_1; /* converts from 1.0 to screen */ + png_bytep gamma_to_1; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit; /* significant bits in each available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift; /* shift for significant bit tranformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans_alpha; /* alpha values for paletted files */ + png_color_16 trans_color; /* transparent color for non-paletted files */ +#endif + + png_read_status_ptr read_row_fn; /* called after each row is decoded */ + png_write_status_ptr write_row_fn; /* called after each row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn; /* called after header data fully read */ + png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */ + png_progressive_end_ptr end_fn; /* called after image is complete */ + png_bytep save_buffer_ptr; /* current location in save_buffer */ + png_bytep save_buffer; /* buffer for previously read data */ + png_bytep current_buffer_ptr; /* current location in current_buffer */ + png_bytep current_buffer; /* buffer for recently used data */ + png_uint_32 push_length; /* size of current input chunk */ + png_uint_32 skip_length; /* bytes to skip in input data */ + png_size_t save_buffer_size; /* amount of data now in save_buffer */ + png_size_t save_buffer_max; /* total size of save_buffer */ + png_size_t buffer_size; /* total amount of available input data */ + png_size_t current_buffer_size; /* amount of data now in current_buffer */ + int process_mode; /* what push library is currently doing */ + int cur_palette; /* current push library palette index */ + +# ifdef PNG_TEXT_SUPPORTED + png_size_t current_text_size; /* current size of text input data */ + png_size_t current_text_left; /* how much text left to read in input */ + png_charp current_text; /* current text chunk buffer */ + png_charp current_text_ptr; /* current location in current_text */ +# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* For the Borland special 64K segment handler */ + png_bytepp offset_table_ptr; + png_bytep offset_table; + png_uint_16 offset_table_number; + png_uint_16 offset_table_count; + png_uint_16 offset_table_count_free; +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_bytep palette_lookup; /* lookup table for quantizing */ + png_bytep quantize_index; /* index translation for palette files */ +#endif + +#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) + png_uint_16p hist; /* histogram */ +#endif + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_byte heuristic_method; /* heuristic for row filter selection */ + png_byte num_prev_filters; /* number of weights for previous rows */ + png_bytep prev_filters; /* filter type(s) of previous row(s) */ + png_uint_16p filter_weights; /* weight(s) for previous line(s) */ + png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ + png_uint_16p filter_costs; /* relative filter calculation cost */ + png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + png_charp time_buffer; /* String to hold RFC 1123 time text */ +#endif + +/* New members added in libpng-1.0.6 */ + + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr; + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#endif + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int num_chunk_list; + png_bytep chunk_list; +#endif + +/* New members added in libpng-1.0.3 */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff; + png_uint_16 rgb_to_gray_green_coeff; + png_uint_16 rgb_to_gray_blue_coeff; +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ + defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type; +#endif + +/* New members added in libpng-1.2.0 */ + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn; /* function for allocating memory */ + png_free_ptr free_fn; /* function for freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep quantize_sort; /* working sort array */ + png_bytep index_to_palette; /* where the original index currently is + in the palette */ + png_bytep palette_to_index; /* which original index points to this + palette color */ +#endif + +/* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type; + +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max; + png_uint_32 user_height_max; + + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max; + + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + */ + png_alloc_size_t user_chunk_malloc_max; +#endif + +/* New member added in libpng-1.0.25 and 1.2.17 */ +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED + /* Storage for unknown chunk that the library doesn't recognize. */ + png_unknown_chunk unknown_chunk; +#endif + +/* New members added in libpng-1.2.26 */ + png_size_t old_big_row_buf_size; + png_size_t old_prev_row_size; + +/* New member added in libpng-1.2.30 */ + png_charp chunkdata; /* buffer for reading chunk data */ + +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state; +#endif +}; +#endif /* PNGSTRUCT_H */ diff --git a/include/reactos/libs/libxml/HTMLparser.h b/include/reactos/libs/libxml/HTMLparser.h index cde0ac6d763..fbcc811e0e6 100644 --- a/include/reactos/libs/libxml/HTMLparser.h +++ b/include/reactos/libs/libxml/HTMLparser.h @@ -177,6 +177,7 @@ XMLPUBFUN void XMLCALL */ typedef enum { HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */ + HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */ HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ diff --git a/include/reactos/libs/libxml/Makefile.am b/include/reactos/libs/libxml/Makefile.am index bf03a3b2228..cf9297aad66 100644 --- a/include/reactos/libs/libxml/Makefile.am +++ b/include/reactos/libs/libxml/Makefile.am @@ -51,7 +51,4 @@ xmlinc_HEADERS = \ xmlsave.h \ schematron.h -install-exec-hook: - $(mkinstalldirs) $(DESTDIR)$(xmlincdir) - EXTRA_DIST = xmlversion.h.in diff --git a/include/reactos/libs/libxml/Makefile.in b/include/reactos/libs/libxml/Makefile.in index ea503c3d495..6e219c735eb 100644 --- a/include/reactos/libs/libxml/Makefile.in +++ b/include/reactos/libs/libxml/Makefile.in @@ -14,7 +14,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -34,9 +33,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = include/libxml -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/xmlversion.h.in $(xmlinc_HEADERS) +subdir = include +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -44,38 +42,53 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = xmlversion.h +CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(xmlincdir)" -HEADERS = $(xmlinc_HEADERS) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -153,6 +166,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -201,6 +215,7 @@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ +WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@ WITH_C14N = @WITH_C14N@ WITH_CATALOG = @WITH_CATALOG@ WITH_DEBUG = @WITH_DEBUG@ @@ -209,6 +224,7 @@ WITH_FTP = @WITH_FTP@ WITH_HTML = @WITH_HTML@ WITH_HTTP = @WITH_HTTP@ WITH_ICONV = @WITH_ICONV@ +WITH_ICU = @WITH_ICU@ WITH_ISO8859X = @WITH_ISO8859X@ WITH_LEGACY = @WITH_LEGACY@ WITH_MEM_DEBUG = @WITH_MEM_DEBUG@ @@ -279,7 +295,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -296,58 +311,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xmlincdir = $(includedir)/libxml2/libxml -xmlinc_HEADERS = \ - SAX.h \ - entities.h \ - encoding.h \ - parser.h \ - parserInternals.h \ - xmlerror.h \ - HTMLparser.h \ - HTMLtree.h \ - debugXML.h \ - tree.h \ - list.h \ - hash.h \ - xpath.h \ - xpathInternals.h \ - xpointer.h \ - xinclude.h \ - xmlIO.h \ - xmlmemory.h \ - nanohttp.h \ - nanoftp.h \ - uri.h \ - valid.h \ - xlink.h \ - xmlversion.h \ - DOCBparser.h \ - catalog.h \ - threads.h \ - globals.h \ - c14n.h \ - xmlautomata.h \ - xmlregexp.h \ - xmlmodule.h \ - xmlschemas.h \ - schemasInternals.h \ - xmlschemastypes.h \ - xmlstring.h \ - xmlunicode.h \ - xmlreader.h \ - relaxng.h \ - dict.h \ - SAX2.h \ - xmlexports.h \ - xmlwriter.h \ - chvalid.h \ - pattern.h \ - xmlsave.h \ - schematron.h - -EXTRA_DIST = xmlversion.h.in -all: all-am +SUBDIRS = libxml +EXTRA_DIST = win32config.h wsockcompat.h +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -359,9 +325,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/libxml/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu include/libxml/Makefile + $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -380,34 +346,82 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -xmlversion.h: $(top_builddir)/config.status $(srcdir)/xmlversion.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -install-xmlincHEADERS: $(xmlinc_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(xmlincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlincdir)" - @list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlincdir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlincdir)" || exit $$?; \ - done -uninstall-xmlincHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(xmlincdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(xmlincdir)" && rm -f $$files +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -419,10 +433,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -441,7 +468,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -491,22 +518,48 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(xmlincdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -523,92 +576,90 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: -install-data-am: install-xmlincHEADERS +install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am + +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: -uninstall-am: uninstall-xmlincHEADERS +uninstall-am: -.MAKE: install-am install-exec-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - install-xmlincHEADERS installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-xmlincHEADERS + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am -install-exec-hook: - $(mkinstalldirs) $(DESTDIR)$(xmlincdir) - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/include/reactos/libs/libxml/encoding.h b/include/reactos/libs/libxml/encoding.h index c74b25f3cbb..3a3b9b2d820 100644 --- a/include/reactos/libs/libxml/encoding.h +++ b/include/reactos/libs/libxml/encoding.h @@ -27,6 +27,9 @@ #ifdef LIBXML_ICONV_ENABLED #include #endif +#ifdef LIBXML_ICU_ENABLED +#include +#endif #ifdef __cplusplus extern "C" { #endif @@ -125,6 +128,13 @@ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, * Block defining the handlers for non UTF-8 encodings. * If iconv is supported, there are two extra fields. */ +#ifdef LIBXML_ICU_ENABLED +struct _uconv_t { + UConverter *uconv; /* for conversion between an encoding and UTF-16 */ + UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */ +}; +typedef struct _uconv_t uconv_t; +#endif typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; @@ -136,6 +146,10 @@ struct _xmlCharEncodingHandler { iconv_t iconv_in; iconv_t iconv_out; #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + uconv_t *uconv_in; + uconv_t *uconv_out; +#endif /* LIBXML_ICU_ENABLED */ }; #ifdef __cplusplus diff --git a/include/reactos/libs/libxml/nanoftp.h b/include/reactos/libs/libxml/nanoftp.h index e3c28a01424..397bbba74f6 100644 --- a/include/reactos/libs/libxml/nanoftp.h +++ b/include/reactos/libs/libxml/nanoftp.h @@ -7,7 +7,7 @@ * * Author: Daniel Veillard */ - + #ifndef __NANO_FTP_H__ #define __NANO_FTP_H__ @@ -15,12 +15,31 @@ #ifdef LIBXML_FTP_ENABLED +/* Needed for portability to Windows 64 bits */ +#if defined(__MINGW32__) || defined(_WIN32_WCE) +#include +#else +/** + * SOCKET: + * + * macro used to provide portability of code to windows sockets + */ +#define SOCKET int +/** + * INVALID_SOCKET: + * + * macro used to provide portability of code to windows sockets + * the value to be used when the socket is not valid + */ +#define INVALID_SOCKET (-1) +#endif + #ifdef __cplusplus extern "C" { #endif /** - * ftpListCallback: + * ftpListCallback: * @userData: user provided data for the callback * @filename: the file name (including "->" when links are shown) * @attrib: the attribute string @@ -44,7 +63,7 @@ typedef void (*ftpListCallback) (void *userData, const char *month, int day, int hour, int minute); /** - * ftpDataCallback: + * ftpDataCallback: * @userData: the user provided context * @data: the data received * @len: its size in bytes @@ -60,78 +79,78 @@ typedef void (*ftpDataCallback) (void *userData, */ XMLPUBFUN void XMLCALL xmlNanoFTPInit (void); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlNanoFTPCleanup (void); /* * Creating/freeing contexts. */ -XMLPUBFUN void * XMLCALL +XMLPUBFUN void * XMLCALL xmlNanoFTPNewCtxt (const char *URL); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlNanoFTPFreeCtxt (void * ctx); -XMLPUBFUN void * XMLCALL +XMLPUBFUN void * XMLCALL xmlNanoFTPConnectTo (const char *server, int port); /* * Opening/closing session connections. */ -XMLPUBFUN void * XMLCALL +XMLPUBFUN void * XMLCALL xmlNanoFTPOpen (const char *URL); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPConnect (void *ctx); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPClose (void *ctx); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPQuit (void *ctx); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlNanoFTPScanProxy (const char *URL); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlNanoFTPProxy (const char *host, int port, const char *user, const char *passwd, int type); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPUpdateURL (void *ctx, const char *URL); /* * Rather internal commands. */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPGetResponse (void *ctx); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPCheckResponse (void *ctx); /* * CD/DIR/GET handlers. */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPCwd (void *ctx, const char *directory); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPDele (void *ctx, const char *file); -XMLPUBFUN int XMLCALL +XMLPUBFUN SOCKET XMLCALL xmlNanoFTPGetConnection (void *ctx); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPCloseConnection(void *ctx); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPList (void *ctx, ftpListCallback callback, void *userData, const char *filename); -XMLPUBFUN int XMLCALL +XMLPUBFUN SOCKET XMLCALL xmlNanoFTPGetSocket (void *ctx, const char *filename); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPGet (void *ctx, ftpDataCallback callback, void *userData, const char *filename); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlNanoFTPRead (void *ctx, void *dest, int len); diff --git a/include/reactos/libs/libxml/parser.h b/include/reactos/libs/libxml/parser.h index dd79c426f23..47b3df15251 100644 --- a/include/reactos/libs/libxml/parser.h +++ b/include/reactos/libs/libxml/parser.h @@ -1222,6 +1222,7 @@ typedef enum { XML_WITH_DEBUG_MEM = 29, XML_WITH_DEBUG_RUN = 30, XML_WITH_ZLIB = 31, + XML_WITH_ICU = 32, XML_WITH_NONE = 99999 /* just to be sure of allocation size */ } xmlFeature; @@ -1232,4 +1233,3 @@ XMLPUBFUN int XMLCALL } #endif #endif /* __XML_PARSER_H__ */ - diff --git a/include/reactos/libs/libxml/xmlsave.h b/include/reactos/libs/libxml/xmlsave.h index 4201b4d13dc..fb329b22dbc 100644 --- a/include/reactos/libs/libxml/xmlsave.h +++ b/include/reactos/libs/libxml/xmlsave.h @@ -33,7 +33,8 @@ typedef enum { XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */ XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */ XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */ - XML_SAVE_AS_HTML = 1<<6 /* force HTML serialization on XML doc */ + XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */ + XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */ } xmlSaveOption; diff --git a/include/reactos/libs/libxml/xmlversion.h b/include/reactos/libs/libxml/xmlversion.h index a2fadbc6b79..b96855d5c89 100644 --- a/include/reactos/libs/libxml/xmlversion.h +++ b/include/reactos/libs/libxml/xmlversion.h @@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.7.7" +#define LIBXML_DOTTED_VERSION "2.7.8" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 10203 */ -#define LIBXML_VERSION 20707 +#define LIBXML_VERSION 20708 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "10203" */ -#define LIBXML_VERSION_STRING "20707" +#define LIBXML_VERSION_STRING "20708" /** * LIBXML_VERSION_EXTRA: * * extra version information, used to show a CVS compilation */ -#define LIBXML_VERSION_EXTRA "-GITv2.7.6-36-g06c93b7" +#define LIBXML_VERSION_EXTRA "-GITv2.7.7-40-g82143f4" /** * LIBXML_TEST_VERSION: @@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20707); +#define LIBXML_TEST_VERSION xmlCheckVersion(20708); #ifndef VMS #if 0 @@ -268,6 +268,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #define LIBXML_ICONV_ENABLED #endif +/** + * LIBXML_ICU_ENABLED: + * + * Whether icu support is available + */ +#if 0 +#define LIBXML_ICU_ENABLED +#endif + /** * LIBXML_ISO8859X_ENABLED: * diff --git a/include/reactos/libs/libxml/xmlversion.h.in b/include/reactos/libs/libxml/xmlversion.h.in index 4739f3ab9ad..95856541617 100644 --- a/include/reactos/libs/libxml/xmlversion.h.in +++ b/include/reactos/libs/libxml/xmlversion.h.in @@ -268,6 +268,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #define LIBXML_ICONV_ENABLED #endif +/** + * LIBXML_ICU_ENABLED: + * + * Whether icu support is available + */ +#if @WITH_ICU@ +#define LIBXML_ICU_ENABLED +#endif + /** * LIBXML_ISO8859X_ENABLED: * diff --git a/include/reactos/mc/ntiologc.mc b/include/reactos/mc/ntiologc.mc new file mode 100644 index 00000000000..675f6cacbb1 --- /dev/null +++ b/include/reactos/mc/ntiologc.mc @@ -0,0 +1,365 @@ +; +; iologmsg.mc MESSAGE resources for iologmsg.dll +; + +MessageIdTypedef=NTSTATUS + +SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS + Informational=0x1:STATUS_SEVERITY_INFORMATIONAL + Warning=0x2:STATUS_SEVERITY_WARNING + Error=0x3:STATUS_SEVERITY_ERROR + ) + +FacilityNames=(RpcRuntime=0x2:FACILITY_RPC_RUNTIME + RpcStubs=0x3:FACILITY_RPC_STUBS + IO=0x4:FACILITY_IO_ERROR_CODE + MCA=0x5:FACILITY_MCA_ERROR_CODE + ) + +LanguageNames=(English=0x409:MSG00409) + + +; +; message definitions +; + +; Facility=IO + +; IO Error messages + +MessageId=1 +Severity=Success +Facility=IO +SymbolicName=IO_ERR_RETRY_SUCCEEDED +Language=English +A retry succeeded. +. + +MessageId=2 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_INSUFFICIENT_RESOURCES +Language=English +Insufficient resources. +. + +MessageId=3 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_CONFIGURATION_ERROR +Language=English +Driver or device is incorrectly configured for %1. +. + +MessageId=4 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_DRIVER_ERROR +Language=English +Driver detected an internal error in its data structures for %1. +. + +MessageId=5 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_PARITY +Language=English +A parity error was detected on %1. +. + +MessageId=6 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_SEEK_ERROR +Language=English +The device, %1, had a seek error. +. + +MessageId=7 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_BAD_BLOCK +Language=English +The device, %1, has a bad block. +. + +MessageId=8 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_OVERRUN_ERROR +Language=English +An overrun occurred on %1. +. + +MessageId=9 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_TIMEOUT +Language=English +The device, %1, did not respond within the timeout period. +. + +MessageId=10 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_SEQUENCE +Language=English +The driver detected an unexpected sequence by the device, %1. +. + +MessageId=11 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_CONTROLLER_ERROR +Language=English +The driver detected a controller error on %1. +. + +MessageId=12 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_INTERNAL_ERROR +Language=English +The driver detected an internal driver error on %1. +. + +MessageId=13 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_INCORRECT_IRQL +Language=English +The driver was configured with an incorrect interrupt for %1. +. + +MessageId=14 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_INVALID_IOBASE +Language=English +The driver was configured with an invalid I/O base address for %1. +. + +MessageId=15 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_NOT_READY +Language=English +Insufficient resources. +. + +MessageId=16 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_INVALID_REQUEST +Language=English +The request is incorrectly formatted for %1. +. + +MessageId=17 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_VERSION +Language=English +The wrong version of the driver has been loaded. +. + +MessageId=18 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_LAYERED_FAILURE +Language=English +The driver beneath this one has failed in some way for %1. +. + +MessageId=19 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_RESET +Language=English +The device, %1, has been reset. +. + +MessageId=20 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_PROTOCOL +Language=English +A transport driver received a frame which violated the protocol. +. + +MessageId=21 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_MEMORY_CONFLICT_DETECTED +Language=English +A conflict has been detected between two drivers which claimed two overlapping +memory regions. +Driver %2, with device <%3>, claimed a memory range with starting address +in data address 0x28 and 0x2c, and length in data address 0x30. +. + +MessageId=22 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_PORT_CONFLICT_DETECTED +Language=English +A conflict has been detected between two drivers which claimed two overlapping +Io port regions. +Driver %2, with device <%3>, claimed an IO port range with starting address +in data address 0x28 and 0x2c, and length in data address 0x30. +. + +MessageId=23 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_DMA_CONFLICT_DETECTED +Language=English +A conflict has been detected between two drivers which claimed equivalent DMA +channels. +Driver %2, with device <%3>, claimed the DMA Channel in data address 0x28, with +optinal port in data address 0x2c. +. + +MessageId=24 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_IRQ_CONFLICT_DETECTED +Language=English +A conflict has been detected between two drivers which claimed equivalent IRQs. +Driver %2, with device <%3>, claimed an interrupt with Level in data address +0x28, vector in data address 0x2c and Affinity in data address 0x30. +. + +MessageId=25 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_BAD_FIRMWARE +Language=English +Insufficient resources. +The driver has detected a device with old or out-of-date firmware. The +device will not be used. +. + +MessageId=26 +Severity=Warning +Facility=IO +SymbolicName=IO_WRN_BAD_FIRMWARE +Language=English +The driver has detected that device %1 has old or out-of-date firmware. +Reduced performance may result. +. + +MessageId=27 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_DMA_RESOURCE_CONFLICT +Language=English +The device could not allocate one or more required resources due to conflicts +with other devices. The device DMA setting of '%2' could not be +satisified due to a conflict with Driver '%3'. +. + +MessageId=28 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_INTERRUPT_RESOURCE_CONFLICT +Language=English +The device could not allocate one or more required resources due to conflicts +with other devices. The device interrupt setting of '%2' could not be +satisified due to a conflict with Driver '%3'. +. + +MessageId=29 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_MEMORY_RESOURCE_CONFLICT +Language=English +The device could not allocate one or more required resources due to conflicts +with other devices. The device memory setting of '%2' could not be +satisified due to a conflict with Driver '%3'. +. + +MessageId=30 +Severity=Error +Facility=IO +SymbolicName=IO_ERR_PORT_RESOURCE_CONFLICT +Language=English +The device could not allocate one or more required resources due to conflicts +with other devices. The device port setting of '%2' could not be +satisified due to a conflict with Driver '%3'. +. + +MessageId=31 +Severity=Error +Facility=IO +SymbolicName=IO_BAD_BLOCK_WITH_NAME +Language=English +The file %2 on device %1 contains a bad disk block. +. + +MessageId=32 +Severity=Warning +Facility=IO +SymbolicName=IO_WRITE_CACHE_ENABLED +Language=English +The driver detected that the device %1 has its write cache enabled. Data corruption may occur. +. + +MessageId=33 +Severity=Warning +Facility=IO +SymbolicName=IO_RECOVERED_VIA_ECC +Language=English +Data was recovered using error correction code on device %1. +. + +MessageId=34 +Severity=Warning +Facility=IO +SymbolicName=IO_WRITE_CACHE_DISABLED +Language=English +The driver disabled the write cache on device %1. +. + +MessageId=36 +Severity=Informational +Facility=IO +SymbolicName=IO_FILE_QUOTA_THRESHOLD +Language=English +A user hit their quota threshold on volume %2. +. + +MessageId=37 +Severity=Informational +Facility=IO +SymbolicName=IO_FILE_QUOTA_LIMIT +Language=English +A user hit their quota limit on volume %2. +. + +MessageId=38 +Severity=Informational +Facility=IO +SymbolicName=IO_FILE_QUOTA_STARTED +Language=English +The system has started rebuilding the user disk quota information on +device %1 with label "%2". +. + +MessageId=39 +Severity=Informational +Facility=IO +SymbolicName=IO_FILE_QUOTA_SUCCEEDED +Language=English +The system has successfully rebuilt the user disk quota information on +device %1 with label "%2". +. + +MessageId=40 +Severity=Warning +Facility=IO +SymbolicName=IO_FILE_QUOTA_FAILED +Language=English +The system has encounted an error rebuilding the user disk quota +information on device %1 with label "%2". +. diff --git a/include/reactos/mc/sacmsg.mc b/include/reactos/mc/sacmsg.mc new file mode 100644 index 00000000000..dce4a07f41f --- /dev/null +++ b/include/reactos/mc/sacmsg.mc @@ -0,0 +1,707 @@ +MessageId=1 +SymbolicName=SACDRV_1 +Language=English +Computer is booting, SAC started and initialized.\n\nUse the \"ch -?\" command for information about using channels.\nUse the \"?\" command for general help. +. + +MessageId=2 +SymbolicName=SACDRV_2 +Language=English + +. + +MessageId=3 +SymbolicName=SACDRV_3 +Language=English +SAC>%0 +. + +MessageId=4 +SymbolicName=SACDRV_4 +Language=English +The SAC is unavailable, it was directly unloaded. +. + +MessageId=5 +SymbolicName=SACDRV_5 +Language=English +The SAC will become unavailable soon. The computer is shutting down.\n +. + +MessageId=6 +SymbolicName=SACDRV_6 +Language=English +A parameter was incorrect or missing. Try the 'help' command for more details. +. + +MessageId=7 +SymbolicName=SACDRV_7 +Language=English +Thread information is now ON. +. + +MessageId=8 +SymbolicName=SACDRV_8 +Language=English +Thread information is now OFF. +. + +MessageId=9 +SymbolicName=SACDRV_9 +Language=English +Paging is now ON. +. + +MessageId=10 +SymbolicName=SACDRV_10 +Language=English +Paging is now OFF. +. + +MessageId=11 +SymbolicName=SACDRV_11 +Language=English +Paging is now OFF. +. + +MessageId=12 +SymbolicName=SACDRV_12 +Language=English +d Dump the current kernel log. +. + +MessageId=13 +SymbolicName=SACDRV_13 +Language=English +f Toggle detailed or abbreviated tlist info. +. + +MessageId=14 +SymbolicName=SACDRV_14 +Language=English +? or help Display this list. +. + +MessageId=15 +SymbolicName=SACDRV_15 +Language=English +i List all IP network numbers and their IP addresses. +. + +MessageId=16 +SymbolicName=SACDRV_16 +Language=English +i <#> Set IP addr., subnet and gateway. +. + +MessageId=18 +SymbolicName=SACDRV_18 +Language=English +k Kill the given process. +. + +MessageId=19 +SymbolicName=SACDRV_19 +Language=English +l Lower the priority of a process to the lowest possible. +. + +MessageId=20 +SymbolicName=SACDRV_20 +Language=English +m Limit the memory usage of a process to . +. + +MessageId=21 +SymbolicName=SACDRV_21 +Language=English +p Toggle paging the display. +. + +MessageId=22 +SymbolicName=SACDRV_22 +Language=English +r Raise the priority of a process by one. +. + +MessageId=23 +SymbolicName=SACDRV_23 +Language=English +s Display the current time and date (24 hour clock used). +. + +MessageId=24 +SymbolicName=SACDRV_24 +Language=English +s mm/dd/yyyy hh:mm Set the current time and date (24 hour clock used). +. + +MessageId=25 +SymbolicName=SACDRV_25 +Language=English +t Tlist. +. + +MessageId=27 +SymbolicName=SACDRV_27 +Language=English +restart Restart the system immediately. +. + +MessageId=28 +SymbolicName=SACDRV_28 +Language=English +shutdown Shutdown the system immediately. +. + +MessageId=29 +SymbolicName=SACDRV_29 +Language=English +crashdump Crash the system. You must have crash dump enabled. +. + +MessageId=31 +SymbolicName=SACDRV_31 +Language=English +id Display the computer identification information. +. + +MessageId=32 +SymbolicName=SACDRV_32 +Language=English +lock Lock access to Command Prompt channels. +. + +MessageId=48 +SymbolicName=SACDRV_48 +Language=English +Failed with status 0x%%X. +. + +MessageId=49 +SymbolicName=SACDRV_49 +Language=English +Date: %%02d/%%02d/%%02d Time (GMT): %%02d:%%02d:%%02d:%%04d +. + +MessageId=50 +SymbolicName=SACDRV_50 +Language=English +SAC could not retrieve the IP Address. +. + +MessageId=51 +SymbolicName=SACDRV_51 +Language=English +SAC could not clear the existing IP Address. +. + +MessageId=52 +SymbolicName=SACDRV_52 +Language=English +SAC could not set the IP Address. +. + +MessageId=54 +SymbolicName=SACDRV_54 +Language=English +SAC successfully set the IP Address, subnet mask, and gateway. +. + +MessageId=55 +SymbolicName=SACDRV_55 +Language=English +SAC failed to terminate the process. +. + +MessageId=56 +SymbolicName=SACDRV_56 +Language=English +SAC successfully terminated the process. +. + +MessageId=57 +SymbolicName=SACDRV_57 +Language=English +SAC failed to lower the process priority. +. + +MessageId=58 +SymbolicName=SACDRV_58 +Language=English +SAC successfully lowered the process priority. +. + +MessageId=59 +SymbolicName=SACDRV_59 +Language=English +SAC failed to raise the process priority. +. + +MessageId=60 +SymbolicName=SACDRV_60 +Language=English +SAC successfully raised the process priority. +. + +MessageId=61 +SymbolicName=SACDRV_61 +Language=English +SAC failed to limit the available process memory. +. + +MessageId=62 +SymbolicName=SACDRV_62 +Language=English +SAC successfully limited the available process memory. +. + +MessageId=63 +SymbolicName=SACDRV_63 +Language=English +SAC cannot raise the priority of a process that was not previously lowered. +. + +MessageId=64 +SymbolicName=SACDRV_64 +Language=English +SAC cannot raise the process priority any higher. +. + +MessageId=65 +SymbolicName=SACDRV_65 +Language=English +SAC failed to shutdown the system. +. + +MessageId=66 +SymbolicName=SACDRV_66 +Language=English +SAC failed to restart the system. +. + +MessageId=67 +SymbolicName=SACDRV_67 +Language=English +SAC failed to crashdump the system. +. + +MessageId=68 +SymbolicName=SACDRV_68 +Language=English +SAC failed to retrieve the task list. +. + +MessageId=69 +SymbolicName=SACDRV_69 +Language=English +memory: %%4ld kb uptime:%%3ld %%2ld:%%02ld:%%02ld.%%03ld\n\n +. + +MessageId=70 +SymbolicName=SACDRV_70 +Language=English +No pagefile in use. +. + +MessageId=71 +SymbolicName=SACDRV_71 +Language=English +PageFile: %%wZ +. + +MessageId=72 +SymbolicName=SACDRV_72 +Language=English + Current Size: %%6ld kb Total Used: %%6ld kb Peak Used %%6ld kb +. + +MessageId=73 +SymbolicName=SACDRV_73 +Language=English +\n Memory:%%7ldK Avail:%%7ldK TotalWs:%%7ldK InRam Kernel:%%5ldK P:%%5ldK +. + +MessageId=74 +SymbolicName=SACDRV_74 +Language=English + Commit:%%7ldK/%%7ldK Limit:%%7ldK Peak:%%7ldK Pool N:%%5ldK P:%%5ldK +. + +MessageId=75 +SymbolicName=SACDRV_75 +Language=English + User Time Kernel Time Ws Faults Commit Pri Hnd Thd Pid Name +. + +MessageId=76 +SymbolicName=SACDRV_76 +Language=English + %%6ld %%8ld File Cache +. + +MessageId=77 +SymbolicName=SACDRV_77 +Language=English +%%3ld:%%02ld:%%02ld.%%03ld %%3ld:%%02ld:%%02ld.%%03ld%%6ld %%8ld %%7ld %%2ld %%4ld %%3ld %%4ld %%wZ +. + +MessageId=78 +SymbolicName=SACDRV_78 +Language=English +%%3ld:%%02ld:%%02ld.%%03ld %%3ld:%%02ld:%%02ld.%%03ld +. + +MessageId=79 +SymbolicName=SACDRV_79 +Language=English +pid:%%3lx pri:%%2ld Hnd:%%5ld Pf:%%7ld Ws:%%7ldK %%wZ +. + +MessageId=80 +SymbolicName=SACDRV_80 +Language=English + tid pri Ctx Swtch StrtAddr User Time Kernel Time State +. + +MessageId=81 +SymbolicName=SACDRV_81 +Language=English + %%3lx %%2ld %%9ld %%p %%2ld:%%02ld:%%02ld.%%03ld %%2ld:%%02ld:%%02ld.%%03ld %%s%%s +. + +MessageId=82 +SymbolicName=SACDRV_82 +Language=English +----Press for more---- +. + +MessageId=83 +SymbolicName=SACDRV_83 +Language=English +SAC is retrieving IP Addresses... +. + +MessageId=84 +SymbolicName=SACDRV_84 +Language=English +Could not retrieve IP Address(es). +. + +MessageId=85 +SymbolicName=SACDRV_85 +Language=English +There are no IP Addresses available. +. + +MessageId=86 +SymbolicName=SACDRV_86 +Language=English +Net: %%d, Ip=%%d.%%d.%%d.%%d Subnet=%%d.%%d.%%d.%%d Gateway=%%d.%%d.%%d.%%d +. + +MessageId=87 +SymbolicName=SACDRV_87 +Language=English +Date: %%02d/%%02d/%%02d Time (GMT): %%02d:%%02d +. + +MessageId=88 +SymbolicName=SACDRV_88 +Language=English +The year is restricted from 1980 to 2099. +. + +MessageId=89 +SymbolicName=SACDRV_89 +Language=English +That process has been killed and is being cleaned up by the system. +. + +MessageId=90 +SymbolicName=SACDRV_90 +Language=English +A duplicate process id is being cleaned up by the system. Try the \ncommand again in a few seconds. +. + +MessageId=92 +SymbolicName=SACDRV_92 +Language=English + Computer Name: %%ws +. + +MessageId=93 +SymbolicName=SACDRV_93 +Language=English + Computer GUID: %%ws +. + +MessageId=94 +SymbolicName=SACDRV_94 +Language=English + Processor Architecture: %%ws +. + +MessageId=95 +SymbolicName=SACDRV_95 +Language=English + Build Number: %%ws +. + +MessageId=96 +SymbolicName=SACDRV_96 +Language=English + Product: %%ws +. + +MessageId=97 +SymbolicName=SACDRV_97 +Language=English + Applied Service Pack: %%ws +. + +MessageId=98 +SymbolicName=SACDRV_98 +Language=English +None%0 +. + +MessageId=99 +SymbolicName=SACDRV_99 +Language=English + Version Number: %%ws +. + +MessageId=100 +SymbolicName=SACDRV_100 +Language=English +Windows Server 2003 Datacenter Edition%0 +. + +MessageId=101 +SymbolicName=SACDRV_101 +Language=English +Windows Server 2003 Embedded%0 +. + +MessageId=102 +SymbolicName=SACDRV_102 +Language=English +Windows Server 2003 Enterprise Edition%0 +. + +MessageId=103 +SymbolicName=SACDRV_103 +Language=English +Windows Server 2003%0 +. + +MessageId=104 +SymbolicName=SACDRV_104 +Language=English +Computer identification information is unavailable. +. + +MessageId=105 +SymbolicName=SACDRV_105 +Language=English +Unrecognized command. Try the 'help' command for more details. +. + +MessageId=106 +SymbolicName=SACDRV_106 +Language=English +Error: The SAC channel cannot be closed. +. + +MessageId=107 +SymbolicName=SACDRV_107 +Language=English +Error: Could not find a channel with that name. +. + +MessageId=108 +SymbolicName=SACDRV_108 +Language=English +Channel List\n \n(Use \"ch -?\" for information on using channels)\n\n# Status Channel Name +. + +MessageId=109 +SymbolicName=SACDRV_109 +Language=English +EVENT: A new channel has been created. Use \"ch -?\" for channel help.\nChannel: %%s +. + +MessageId=110 +SymbolicName=SACDRV_110 +Language=English +EVENT: A channel has been closed.\nChannel: %%s +. + +MessageId=111 +SymbolicName=SACDRV_111 +Language=English +Name: %%s\nDescription: %%s\nType: %%s\nChannel GUID: %%08lx-%%04x-%%04x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x\nApplication Type GUID: %%08lx-%%04x-%%04x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x\n\nPress for next channel.\nPress 0 to return to the SAC channel.\nUse any other key to view this channel.\n +. + +MessageId=112 +SymbolicName=SACDRV_112 +Language=English +ch Channel management commands. Use ch -? for more help. +. + +MessageId=113 +SymbolicName=SACDRV_113 +Language=English + Time since last reboot: %%d:%%02d:%%02d +. + +MessageId=114 +SymbolicName=SACDRV_114 +Language=English +SAC preparing to restart the system. +. + +MessageId=115 +SymbolicName=SACDRV_115 +Language=English +SAC preparing to shutdown the system. +. + +MessageId=116 +SymbolicName=SACDRV_116 +Language=English +Error! Failed to remove channel! \n\nPlease contact your system administrator.\n +. + +MessageId=119 +SymbolicName=SACDRV_119 +Language=English +cmd Create a Command Prompt channel. +. + +MessageId=120 +SymbolicName=SACDRV_120 +Language=English +Timeout: Unable to launch a Command Prompt. The service responsible for \n launching Command Prompt channels has timed out. This may be \n because the service is malfunctioning or is unresponsive. +. + +MessageId=121 +SymbolicName=SACDRV_121 +Language=English +The Command Prompt session was successfully launched. +. + +MessageId=128 +SymbolicName=SACDRV_128 +Language=English +Error: The SAC Command Console session failed to be created. +. + +MessageId=131 +SymbolicName=SACDRV_131 +Language=English +Error: Unable to launch a Command Prompt. The service responsible for launching\n Command Prompt channels has not yet registered. This may be because the\n service is not yet started, is disabled by the administrator, is\n malfunctioning or is unresponsive. +. + +MessageId=132 +SymbolicName=SACDRV_132 +Language=English +EVENT: The CMD command is now available. +. + +MessageId=133 +SymbolicName=SACDRV_133 +Language=English +EVENT: The CMD command is unavailable. +. + +MessageId=134 +SymbolicName=SACDRV_134 +Language=English +EVENT: An attempt was made to close a channel but failed.\nChannel: %%s +. + +MessageId=135 +SymbolicName=SACDRV_135 +Language=English +EVENT: An attempt to close a channel failed because it is already closed.\nChannel: %%s +. + +MessageId=136 +SymbolicName=SACDRV_136 +Language=English +Channel management commands:\n\nch List all channels.\n\nStatus Legend: (AB)\nA: Channel operational status\n 'A' = Channel is active.\n 'I' = Channel is inactive.\nB: Channel Type\n 'V' = VT-UTF8 emulation.\n 'R' = Raw - no emulation.\n\nch -si <#> Switch to a channel by its number.\nch -sn Switch to a channel by its name.\nch -ci <#> Close a channel by its number.\nch -cn Close a channel by its name.\n\nPress to select a channel.\nPress 0 to return to the SAC channel. +. + +MessageId=137 +SymbolicName=SACDRV_137 +Language=English +Error: There is no channel present at the specified index. +. + +MessageId=144 +SymbolicName=SACDRV_144 +Language=English +SAC%0 +. + +MessageId=145 +SymbolicName=SACDRV_145 +Language=English +Special Administration Console%0 +. + +MessageId=146 +SymbolicName=SACDRV_146 +Language=English +Command Prompt%0 +. + +MessageId=147 +SymbolicName=SACDRV_147 +Language=English +Locked access to all Command Prompt channels. +. + +MessageId=148 +SymbolicName=SACDRV_148 +Language=English +Launching of Command Prompt channels is disabled. +. + +MessageId=149 +SymbolicName=SACDRV_149 +Language=English +The specified subnet mask is invalid. +. + +MessageId=150 +SymbolicName=SACDRV_150 +Language=English +Error, missing network interface number. +. + +MessageId=151 +SymbolicName=SACDRV_151 +Language=English +The specified IP address is invalid. +. + +MessageId=152 +SymbolicName=SACDRV_152 +Language=English +The specified gateway IP address is invalid. +. + +MessageId=153 +SymbolicName=SACDRV_153 +Language=English +not yet initialized%0 +. + +MessageId=154 +SymbolicName=SACDRV_154 +Language=English +The maximum number of channels has been reached. +. diff --git a/include/reactos/rossym.h b/include/reactos/rossym.h index 1f7bf2f660a..785299f8779 100644 --- a/include/reactos/rossym.h +++ b/include/reactos/rossym.h @@ -10,6 +10,15 @@ #ifndef REACTOS_ROSSYM_H_INCLUDED #define REACTOS_ROSSYM_H_INCLUDED +#define ROSSYM_SECTION_NAME ".rossym" + +typedef struct _ROSSYM_HEADER { + unsigned long SymbolsOffset; + unsigned long SymbolsLength; + unsigned long StringsOffset; + unsigned long StringsLength; +} ROSSYM_HEADER, *PROSSYM_HEADER; + typedef struct _ROSSYM_ENTRY { ULONG_PTR Address; ULONG FunctionOffset; @@ -27,7 +36,7 @@ enum _ROSSYM_REGNAME { ROSSYM_X86_ESI, ROSSYM_X86_EDI, - ROSSYM_X64_RAX = 0, + ROSSYM_X64_RAX = 0, ROSSYM_X64_RDX, ROSSYM_X64_RCX, ROSSYM_X64_RBX, @@ -85,17 +94,42 @@ typedef struct _ROSSYM_CALLBACKS { BOOLEAN (*MemGetProc)(PVOID FileContext, ULONG_PTR *Target, PVOID SourceMem, ULONG Size); } ROSSYM_CALLBACKS, *PROSSYM_CALLBACKS; +#ifdef __ROS_CMAKE__ +typedef struct _ROSSYM_OWN_FILECONTEXT { + BOOLEAN (*ReadFileProc)(PVOID FileContext, PVOID Buffer, ULONG Size); + BOOLEAN (*SeekFileProc)(PVOID FileContext, ULONG_PTR Position); +} ROSSYM_OWN_FILECONTEXT, *PROSSYM_OWN_FILECONTEXT; + struct Dwarf; typedef struct Dwarf *PROSSYM_INFO; +#else +typedef struct _ROSSYM_INFO *PROSSYM_INFO; +#endif VOID RosSymInit(PROSSYM_CALLBACKS Callbacks); +#ifndef __ROS_CMAKE__ +VOID RosSymInitKernelMode(VOID); +#endif VOID RosSymInitUserMode(VOID); +BOOLEAN RosSymCreateFromRaw(PVOID RawData, ULONG_PTR DataSize, + PROSSYM_INFO *RosSymInfo); +BOOLEAN RosSymCreateFromMem(PVOID ImageStart, ULONG_PTR ImageSize, + PROSSYM_INFO *RosSymInfo); BOOLEAN RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo); -BOOLEAN RosSymGetAddressInformation -(PROSSYM_INFO RosSymInfo, - ULONG_PTR RelativeAddress, - PROSSYM_LINEINFO RosSymLineInfo); +ULONG RosSymGetRawDataLength(PROSSYM_INFO RosSymInfo); +VOID RosSymGetRawData(PROSSYM_INFO RosSymInfo, PVOID RawData); +#ifdef __ROS_CMAKE__ +BOOLEAN RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo, + ULONG_PTR RelativeAddress, + PROSSYM_LINEINFO RosSymLineInfo); +#else +BOOLEAN RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo, + ULONG_PTR RelativeAddress, + ULONG *LineNumber, + char *FileName, + char *FunctionName); +#endif VOID RosSymFreeInfo(PROSSYM_LINEINFO RosSymLineInfo); VOID RosSymDelete(PROSSYM_INFO RosSymInfo); diff --git a/include/reactos/undocuser.h b/include/reactos/undocuser.h index 0fe8a816c1a..9209b29d848 100644 --- a/include/reactos/undocuser.h +++ b/include/reactos/undocuser.h @@ -82,6 +82,9 @@ #define LN_LOCK_WORKSTATION 0x5 #define LN_UNLOCK_WORKSTATION 0x6 #define LN_MESSAGE_BEEP 0x9 +#define LN_START_SCREENSAVE 0xA + +#define STARTF_SCRNSAVER 0x80000000 #define CW_USEDEFAULT16 ((short)0x8000) diff --git a/include/reactos/version.rc b/include/reactos/version.rc index 9dca3cf6252..8f11454e5a0 100644 --- a/include/reactos/version.rc +++ b/include/reactos/version.rc @@ -20,7 +20,7 @@ #define REACTOS_DEFAULT_STR_COMPANY_NAME "ReactOS Development Team\0" #define REACTOS_DEFAULT_STR_DESCRIPTION "ReactOS Core Component\0" #define REACTOS_DEFAULT_STR_INTERNAL_NAME "\0" -#define REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT "Copyright 1998-" COPYRIGHT_YEAR " ReactOS Team\0" +#define REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT "Copyright 1998-"COPYRIGHT_YEAR" ReactOS Team\0" #define REACTOS_DEFAULT_STR_PRODUCT_NAME "ReactOS Operating System\0" /* Set defaults for everything, unless overridden */ diff --git a/include/reactos/win32k/ntgdibad.h b/include/reactos/win32k/ntgdibad.h index 3bbc3338c7e..1539ef5b8c8 100644 --- a/include/reactos/win32k/ntgdibad.h +++ b/include/reactos/win32k/ntgdibad.h @@ -111,19 +111,6 @@ NtGdiSetWindowOrgEx ( LPPOINT Point ); -/* Use SetDIBitsToDevice in gdi32. */ -INT -APIENTRY -NtGdiSetDIBits ( - HDC hDC, - HBITMAP hBitmap, - UINT StartScan, - UINT ScanLines, - CONST VOID * Bits, - CONST BITMAPINFO * bmi, - UINT ColorUse - ); - #endif /* WIN32K_NTGDI_BAD_INCLUDED */ diff --git a/include/reactos/win32k/ntuser.h b/include/reactos/win32k/ntuser.h index 432390a5fc7..2cb5987f4a0 100644 --- a/include/reactos/win32k/ntuser.h +++ b/include/reactos/win32k/ntuser.h @@ -3146,12 +3146,6 @@ NtUserBuildMenuItemList( ULONG nBufSize, DWORD Reserved); - -/* Should be done in usermode and use NtUserGetCPD. */ -ULONG_PTR -NTAPI -NtUserGetClassLong(HWND hWnd, INT Offset, BOOL Ansi); - UINT NTAPI NtUserGetMenuDefaultItem( @@ -3159,11 +3153,6 @@ NtUserGetMenuDefaultItem( UINT fByPos, UINT gmdiFlags); -BOOL -NTAPI -NtUserGetLastInputInfo( - PLASTINPUTINFO plii); - BOOL NTAPI NtUserGetMinMaxInfo( diff --git a/include/reactos/wine/CMakeLists.txt b/include/reactos/wine/CMakeLists.txt index d74cd51349e..54c4099bd23 100644 --- a/include/reactos/wine/CMakeLists.txt +++ b/include/reactos/wine/CMakeLists.txt @@ -1,9 +1,8 @@ -add_idl_headers(wineheaders itss.idl wined3d.idl) +add_idl_headers(wineheaders itss.idl) add_idl_headers(winesdk epm.idl irot.idl) add_rpc_library(epmrpc epm.idl) add_rpc_library(irotrpc irot.idl) -add_iid_library(wined3d_guid wined3d.idl) add_iid_library(itss_guid itss.idl) \ No newline at end of file diff --git a/include/reactos/wine/commctrl.h b/include/reactos/wine/commctrl.h index a4b5f511f6f..0d2e2cada7d 100644 --- a/include/reactos/wine/commctrl.h +++ b/include/reactos/wine/commctrl.h @@ -29,6 +29,19 @@ static const WCHAR DRAGLISTMSGSTRINGW[] = { 'c','o','m','m','c','t','r','l', '_','D','r','a','g','L','i','s','t','M','s','g',0 }; #endif +#define ListView_InsertItemA(hwnd,pitem) \ + (INT)SNDMSGA((hwnd),LVM_INSERTITEMA,0,(LPARAM)(const LVITEMA *)(pitem)) +#define ListView_InsertItemW(hwnd,pitem) \ + (INT)SNDMSGW((hwnd),LVM_INSERTITEMW,0,(LPARAM)(const LVITEMW *)(pitem)) + +#ifdef __cplusplus +#define SNDMSGA ::SendMessageA +#define SNDMSGW ::SendMessageW +#else +#define SNDMSGA SendMessageA +#define SNDMSGW SendMessageW +#endif + #define FLATSB_CLASSA "flatsb_class32" #if defined(__GNUC__) # define FLATSB_CLASSW (const WCHAR []){ 'f','l','a','t','s','b','_', \ diff --git a/include/reactos/wine/config.h b/include/reactos/wine/config.h index 6973c336a46..40a6d559f0f 100644 --- a/include/reactos/wine/config.h +++ b/include/reactos/wine/config.h @@ -1020,6 +1020,8 @@ #else #define __ASM_DEFINE_FUNC(name,suffix,code) asm(".text\n\t.align 4\n\t.globl " #name suffix "\n\t.def " #name suffix "; .scl 2; .type 32; .endef\n" #name suffix ":\n\t.cfi_startproc\n\t" code "\n\t.cfi_endproc"); #endif +#else +#define __ASM_DEFINE_FUNC(name,suffix,code) #endif /* Define to a macro to generate an assembly function directive */ diff --git a/include/reactos/wine/port.h b/include/reactos/wine/port.h index a1050121ab2..2853a42bb41 100644 --- a/include/reactos/wine/port.h +++ b/include/reactos/wine/port.h @@ -57,19 +57,19 @@ # endif #endif -#ifndef HAVE_MODE_T +#if !defined(HAVE_MODE_T) && !defined(_MODE_T) typedef int mode_t; #endif -#ifndef HAVE_OFF_T +#if !defined(HAVE_OFF_T) && !defined(_OFF_T) typedef long off_t; #endif -#ifndef HAVE_PID_T +#if !defined(HAVE_PID_T) && !defined(_PID_T) typedef int pid_t; #endif -#ifndef HAVE_SIZE_T +#if !defined(HAVE_SIZE_T) && !defined(_SIZE_T) typedef unsigned int size_t; #endif -#ifndef HAVE_SSIZE_T +#if !defined(HAVE_SSIZE_T) && !defined(_SSIZE_T) typedef int ssize_t; #endif //#ifndef HAVE_SOCKLEN_T @@ -176,6 +176,8 @@ struct statfs; "\tnop\n" \ "\t.section \".text\",#alloc,#execinstr\n" ); } \ static void func(void) +#elif defined(_M_AMD64) +#pragma message("You must define the DECL_GLOBAL_CONSTRUCTOR macro for amd64") #else # error You must define the DECL_GLOBAL_CONSTRUCTOR macro for your platform #endif @@ -319,6 +321,17 @@ extern int spawnvp(int mode, const char *cmdname, const char * const argv[]); #endif /* __i386___ && __GNUC__ */ +#if defined(_MSC_VER) +__forceinline +int +ffs(int mask) +{ + long index; + if (_BitScanForward(&index, mask) == 0) return 0; + return index; +} +#endif + #else /* NO_LIBWINE_PORT */ #define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable diff --git a/include/reactos/wine/test.h b/include/reactos/wine/test.h index 035b0375942..22d64ce7570 100644 --- a/include/reactos/wine/test.h +++ b/include/reactos/wine/test.h @@ -488,7 +488,7 @@ const char *wine_dbgstr_wn( const WCHAR *str, int n ) case '\\': *dst++ = '\\'; *dst++ = '\\'; break; default: if (c >= ' ' && c <= 126) - *dst++ = c; + *dst++ = (char)c; else { *dst++ = '\\'; @@ -610,4 +610,7 @@ int main( int argc, char **argv ) #endif /* STANDALONE */ +// hack for ntdll winetest (this is defined in excpt.h) +#undef exception_info + #endif /* __WINE_WINE_TEST_H */ diff --git a/include/reactos/wine/unicode.h b/include/reactos/wine/unicode.h index 9e301888e41..1c742610d04 100644 --- a/include/reactos/wine/unicode.h +++ b/include/reactos/wine/unicode.h @@ -1,5 +1,12 @@ -#ifndef _WINE_UNICODE_H -#define _WINE_UNICODE_H +/* + * PROJECT: ReactOS + * LICENSE: LGPL v2.1 or any later version + * PURPOSE: Map Wine's Unicode functions to native wcs* functions wherever possible + * AUTHORS: ? + */ + +#ifndef __WINE_WINE_UNICODE_H +#define __WINE_WINE_UNICODE_H #include #include @@ -9,6 +16,14 @@ #include #include +#ifndef WINE_UNICODE_API +#define WINE_UNICODE_API +#endif + +#ifndef WINE_UNICODE_INLINE +#define WINE_UNICODE_INLINE static inline +#endif + #define memicmpW(s1,s2,n) _wcsnicmp((const wchar_t *)(s1),(const wchar_t *)(s2),(n)) #define strlenW(s) wcslen((const wchar_t *)(s)) #define strcpyW(d,s) wcscpy((wchar_t *)(d),(const wchar_t *)(s)) @@ -25,6 +40,7 @@ #define strncmpiW(s1,s2,n) _wcsnicmp((const wchar_t *)(s1),(const wchar_t *)(s2),(n)) #define strtoulW(s1,s2,b) wcstoul((const wchar_t *)(s1),(wchar_t **)(s2),(b)) #define strspnW(str, accept) wcsspn((const wchar_t *)(str), (const wchar_t *)(accept)) +#define strpbrkW(str, accept) wcspbrk((const wchar_t *)(str), (const wchar_t *)(accept)) #define tolowerW(n) towlower((n)) #define toupperW(n) towupper((n)) #define islowerW(n) iswlower((n)) @@ -45,28 +61,6 @@ #define vsnprintfW _vsnwprintf #define isprintW iswprint -#ifndef WINE_UNICODE_API -# if defined(_MSC_VER) -# define WINE_UNICODE_API __declspec(dllimport) -# else -# define WINE_UNICODE_API __attribute__((dllimport)) -# endif -#endif - -#ifndef __VALIST -#ifdef __GNUC__ -#define __VALIST __gnuc_va_list -#else -#define __VALIST char* -#endif -#endif /* defined __VALIST */ - -static __inline WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept ) -{ - for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)str; - return NULL; -} - static __inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n ) { const WCHAR *end; diff --git a/include/reactos/wine/wined3d.h b/include/reactos/wine/wined3d.h new file mode 100644 index 00000000000..ed269f006e9 --- /dev/null +++ b/include/reactos/wine/wined3d.h @@ -0,0 +1,2547 @@ +/* + * Copyright 2002-2003 The wine-d3d team + * Copyright 2002-2003 Jason Edmeades + * Copyright 2002-2003 Raphael Junqueira + * Copyright 2005 Oliver Stieber + * Copyright 2006 Stefan Dösinger + * Copyright 2006 Stefan Dösinger for CodeWeavers + * Copyright 2007 Henri Verbeet + * Copyright 2008 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WINED3D_H +#define __WINE_WINED3D_H + +#define WINED3D_OK S_OK + +#define _FACWINED3D 0x876 +#define MAKE_WINED3DSTATUS(code) MAKE_HRESULT(0, _FACWINED3D, code) +#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159) + +#define MAKE_WINED3DHRESULT(code) MAKE_HRESULT(1, _FACWINED3D, code) +#define WINED3DERR_WRONGTEXTUREFORMAT MAKE_WINED3DHRESULT(2072) +#define WINED3DERR_UNSUPPORTEDCOLOROPERATION MAKE_WINED3DHRESULT(2073) +#define WINED3DERR_UNSUPPORTEDCOLORARG MAKE_WINED3DHRESULT(2074) +#define WINED3DERR_UNSUPPORTEDALPHAOPERATION MAKE_WINED3DHRESULT(2075) +#define WINED3DERR_UNSUPPORTEDALPHAARG MAKE_WINED3DHRESULT(2076) +#define WINED3DERR_TOOMANYOPERATIONS MAKE_WINED3DHRESULT(2077) +#define WINED3DERR_CONFLICTINGTEXTUREFILTER MAKE_WINED3DHRESULT(2078) +#define WINED3DERR_UNSUPPORTEDFACTORVALUE MAKE_WINED3DHRESULT(2079) +#define WINED3DERR_CONFLICTINGRENDERSTATE MAKE_WINED3DHRESULT(2081) +#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_WINED3DHRESULT(2082) +#define WINED3DERR_CONFLICTINGTEXTUREPALETTE MAKE_WINED3DHRESULT(2086) +#define WINED3DERR_DRIVERINTERNALERROR MAKE_WINED3DHRESULT(2087) +#define WINED3DERR_NOTFOUND MAKE_WINED3DHRESULT(2150) +#define WINED3DERR_MOREDATA MAKE_WINED3DHRESULT(2151) +#define WINED3DERR_DEVICELOST MAKE_WINED3DHRESULT(2152) +#define WINED3DERR_DEVICENOTRESET MAKE_WINED3DHRESULT(2153) +#define WINED3DERR_NOTAVAILABLE MAKE_WINED3DHRESULT(2154) +#define WINED3DERR_OUTOFVIDEOMEMORY MAKE_WINED3DHRESULT(380) +#define WINED3DERR_INVALIDDEVICE MAKE_WINED3DHRESULT(2155) +#define WINED3DERR_INVALIDCALL MAKE_WINED3DHRESULT(2156) +#define WINED3DERR_DRIVERINVALIDCALL MAKE_WINED3DHRESULT(2157) +#define WINED3DERR_WASSTILLDRAWING MAKE_WINED3DHRESULT(540) +#define WINEDDERR_NOTAOVERLAYSURFACE MAKE_WINED3DHRESULT(580) +#define WINEDDERR_NOTLOCKED MAKE_WINED3DHRESULT(584) +#define WINEDDERR_NODC MAKE_WINED3DHRESULT(586) +#define WINEDDERR_DCALREADYCREATED MAKE_WINED3DHRESULT(620) +#define WINEDDERR_NOTFLIPPABLE MAKE_WINED3DHRESULT(582) +#define WINEDDERR_SURFACEBUSY MAKE_WINED3DHRESULT(430) +#define WINEDDERR_INVALIDRECT MAKE_WINED3DHRESULT(150) +#define WINEDDERR_NOCLIPLIST MAKE_WINED3DHRESULT(205) +#define WINEDDERR_OVERLAYNOTVISIBLE MAKE_WINED3DHRESULT(577) + +typedef DWORD WINED3DCOLOR; + +typedef enum _WINED3DLIGHTTYPE +{ + WINED3DLIGHT_POINT = 1, + WINED3DLIGHT_SPOT = 2, + WINED3DLIGHT_DIRECTIONAL = 3, + WINED3DLIGHT_PARALLELPOINT = 4, /* D3D7 */ + WINED3DLIGHT_GLSPOT = 5, /* D3D7 */ + WINED3DLIGHT_FORCE_DWORD = 0x7fffffff +} WINED3DLIGHTTYPE; + +typedef enum _WINED3DPRIMITIVETYPE +{ + WINED3DPT_UNDEFINED = 0, + WINED3DPT_POINTLIST = 1, + WINED3DPT_LINELIST = 2, + WINED3DPT_LINESTRIP = 3, + WINED3DPT_TRIANGLELIST = 4, + WINED3DPT_TRIANGLESTRIP = 5, + WINED3DPT_TRIANGLEFAN = 6, + WINED3DPT_LINELIST_ADJ = 10, + WINED3DPT_LINESTRIP_ADJ = 11, + WINED3DPT_TRIANGLELIST_ADJ = 12, + WINED3DPT_TRIANGLESTRIP_ADJ = 13, + WINED3DPT_FORCE_DWORD = 0x7fffffff +} WINED3DPRIMITIVETYPE; + +typedef enum _WINED3DDEVTYPE +{ + WINED3DDEVTYPE_HAL = 1, + WINED3DDEVTYPE_REF = 2, + WINED3DDEVTYPE_SW = 3, + WINED3DDEVTYPE_NULLREF = 4, + WINED3DDEVTYPE_FORCE_DWORD = 0xffffffff +} WINED3DDEVTYPE; + +typedef enum _WINED3DDEGREETYPE +{ + WINED3DDEGREE_LINEAR = 1, + WINED3DDEGREE_QUADRATIC = 2, + WINED3DDEGREE_CUBIC = 3, + WINED3DDEGREE_QUINTIC = 5, + WINED3DDEGREE_FORCE_DWORD = 0x7fffffff +} WINED3DDEGREETYPE; + +#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \ + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ + ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) + +enum wined3d_format_id +{ + WINED3DFMT_UNKNOWN, + WINED3DFMT_B8G8R8_UNORM, + WINED3DFMT_B5G5R5X1_UNORM, + WINED3DFMT_B4G4R4A4_UNORM, + WINED3DFMT_B2G3R3_UNORM, + WINED3DFMT_B2G3R3A8_UNORM, + WINED3DFMT_B4G4R4X4_UNORM, + WINED3DFMT_R8G8B8X8_UNORM, + WINED3DFMT_B10G10R10A2_UNORM, + WINED3DFMT_P8_UINT_A8_UNORM, + WINED3DFMT_P8_UINT, + WINED3DFMT_L8_UNORM, + WINED3DFMT_L8A8_UNORM, + WINED3DFMT_L4A4_UNORM, + WINED3DFMT_R5G5_SNORM_L6_UNORM, + WINED3DFMT_R8G8_SNORM_L8X8_UNORM, + WINED3DFMT_R10G11B11_SNORM, + WINED3DFMT_R10G10B10_SNORM_A2_UNORM, + WINED3DFMT_D16_LOCKABLE, + WINED3DFMT_D32_UNORM, + WINED3DFMT_S1_UINT_D15_UNORM, + WINED3DFMT_X8D24_UNORM, + WINED3DFMT_S4X4_UINT_D24_UNORM, + WINED3DFMT_L16_UNORM, + WINED3DFMT_S8_UINT_D24_FLOAT, + WINED3DFMT_VERTEXDATA, + WINED3DFMT_R8G8_SNORM_Cx, + WINED3DFMT_R32G32B32A32_TYPELESS, + WINED3DFMT_R32G32B32A32_FLOAT, + WINED3DFMT_R32G32B32A32_UINT, + WINED3DFMT_R32G32B32A32_SINT, + WINED3DFMT_R32G32B32_TYPELESS, + WINED3DFMT_R32G32B32_FLOAT, + WINED3DFMT_R32G32B32_UINT, + WINED3DFMT_R32G32B32_SINT, + WINED3DFMT_R16G16B16A16_TYPELESS, + WINED3DFMT_R16G16B16A16_FLOAT, + WINED3DFMT_R16G16B16A16_UNORM, + WINED3DFMT_R16G16B16A16_UINT, + WINED3DFMT_R16G16B16A16_SNORM, + WINED3DFMT_R16G16B16A16_SINT, + WINED3DFMT_R32G32_TYPELESS, + WINED3DFMT_R32G32_FLOAT, + WINED3DFMT_R32G32_UINT, + WINED3DFMT_R32G32_SINT, + WINED3DFMT_R32G8X24_TYPELESS, + WINED3DFMT_D32_FLOAT_S8X24_UINT, + WINED3DFMT_R32_FLOAT_X8X24_TYPELESS, + WINED3DFMT_X32_TYPELESS_G8X24_UINT, + WINED3DFMT_R10G10B10A2_TYPELESS, + WINED3DFMT_R10G10B10A2_UNORM, + WINED3DFMT_R10G10B10A2_UINT, + WINED3DFMT_R10G10B10A2_SNORM, + WINED3DFMT_R11G11B10_FLOAT, + WINED3DFMT_R8G8B8A8_TYPELESS, + WINED3DFMT_R8G8B8A8_UNORM, + WINED3DFMT_R8G8B8A8_UNORM_SRGB, + WINED3DFMT_R8G8B8A8_UINT, + WINED3DFMT_R8G8B8A8_SNORM, + WINED3DFMT_R8G8B8A8_SINT, + WINED3DFMT_R16G16_TYPELESS, + WINED3DFMT_R16G16_FLOAT, + WINED3DFMT_R16G16_UNORM, + WINED3DFMT_R16G16_UINT, + WINED3DFMT_R16G16_SNORM, + WINED3DFMT_R16G16_SINT, + WINED3DFMT_R32_TYPELESS, + WINED3DFMT_D32_FLOAT, + WINED3DFMT_R32_FLOAT, + WINED3DFMT_R32_UINT, + WINED3DFMT_R32_SINT, + WINED3DFMT_R24G8_TYPELESS, + WINED3DFMT_D24_UNORM_S8_UINT, + WINED3DFMT_R24_UNORM_X8_TYPELESS, + WINED3DFMT_X24_TYPELESS_G8_UINT, + WINED3DFMT_R8G8_TYPELESS, + WINED3DFMT_R8G8_UNORM, + WINED3DFMT_R8G8_UINT, + WINED3DFMT_R8G8_SNORM, + WINED3DFMT_R8G8_SINT, + WINED3DFMT_R16_TYPELESS, + WINED3DFMT_R16_FLOAT, + WINED3DFMT_D16_UNORM, + WINED3DFMT_R16_UNORM, + WINED3DFMT_R16_UINT, + WINED3DFMT_R16_SNORM, + WINED3DFMT_R16_SINT, + WINED3DFMT_R8_TYPELESS, + WINED3DFMT_R8_UNORM, + WINED3DFMT_R8_UINT, + WINED3DFMT_R8_SNORM, + WINED3DFMT_R8_SINT, + WINED3DFMT_A8_UNORM, + WINED3DFMT_R1_UNORM, + WINED3DFMT_R9G9B9E5_SHAREDEXP, + WINED3DFMT_R8G8_B8G8_UNORM, + WINED3DFMT_G8R8_G8B8_UNORM, + WINED3DFMT_BC1_TYPELESS, + WINED3DFMT_BC1_UNORM, + WINED3DFMT_BC1_UNORM_SRGB, + WINED3DFMT_BC2_TYPELESS, + WINED3DFMT_BC2_UNORM, + WINED3DFMT_BC2_UNORM_SRGB, + WINED3DFMT_BC3_TYPELESS, + WINED3DFMT_BC3_UNORM, + WINED3DFMT_BC3_UNORM_SRGB, + WINED3DFMT_BC4_TYPELESS, + WINED3DFMT_BC4_UNORM, + WINED3DFMT_BC4_SNORM, + WINED3DFMT_BC5_TYPELESS, + WINED3DFMT_BC5_UNORM, + WINED3DFMT_BC5_SNORM, + WINED3DFMT_B5G6R5_UNORM, + WINED3DFMT_B5G5R5A1_UNORM, + WINED3DFMT_B8G8R8A8_UNORM, + WINED3DFMT_B8G8R8X8_UNORM, + /* FOURCC formats. */ + WINED3DFMT_UYVY = WINEMAKEFOURCC('U','Y','V','Y'), + WINED3DFMT_YUY2 = WINEMAKEFOURCC('Y','U','Y','2'), + WINED3DFMT_YV12 = WINEMAKEFOURCC('Y','V','1','2'), + WINED3DFMT_DXT1 = WINEMAKEFOURCC('D','X','T','1'), + WINED3DFMT_DXT2 = WINEMAKEFOURCC('D','X','T','2'), + WINED3DFMT_DXT3 = WINEMAKEFOURCC('D','X','T','3'), + WINED3DFMT_DXT4 = WINEMAKEFOURCC('D','X','T','4'), + WINED3DFMT_DXT5 = WINEMAKEFOURCC('D','X','T','5'), + WINED3DFMT_MULTI2_ARGB8 = WINEMAKEFOURCC('M','E','T','1'), + WINED3DFMT_G8R8_G8B8 = WINEMAKEFOURCC('G','R','G','B'), + WINED3DFMT_R8G8_B8G8 = WINEMAKEFOURCC('R','G','B','G'), + WINED3DFMT_ATI2N = WINEMAKEFOURCC('A','T','I','2'), + WINED3DFMT_INST = WINEMAKEFOURCC('I','N','S','T'), + WINED3DFMT_NVDB = WINEMAKEFOURCC('N','V','D','B'), + WINED3DFMT_NVHU = WINEMAKEFOURCC('N','V','H','U'), + WINED3DFMT_NVHS = WINEMAKEFOURCC('N','V','H','S'), + WINED3DFMT_INTZ = WINEMAKEFOURCC('I','N','T','Z'), + WINED3DFMT_NULL = WINEMAKEFOURCC('N','U','L','L'), + + WINED3DFMT_FORCE_DWORD = 0xffffffff +}; + +typedef enum _WINED3DRENDERSTATETYPE +{ + WINED3DRS_ANTIALIAS = 2, /* d3d7 */ + WINED3DRS_TEXTUREPERSPECTIVE = 4, /* d3d7 */ + WINED3DRS_WRAPU = 5, /* d3d7 */ + WINED3DRS_WRAPV = 6, /* d3d7 */ + WINED3DRS_ZENABLE = 7, + WINED3DRS_FILLMODE = 8, + WINED3DRS_SHADEMODE = 9, + WINED3DRS_LINEPATTERN = 10, /* d3d7, d3d8 */ + WINED3DRS_MONOENABLE = 11, /* d3d7 */ + WINED3DRS_ROP2 = 12, /* d3d7 */ + WINED3DRS_PLANEMASK = 13, /* d3d7 */ + WINED3DRS_ZWRITEENABLE = 14, + WINED3DRS_ALPHATESTENABLE = 15, + WINED3DRS_LASTPIXEL = 16, + WINED3DRS_SRCBLEND = 19, + WINED3DRS_DESTBLEND = 20, + WINED3DRS_CULLMODE = 22, + WINED3DRS_ZFUNC = 23, + WINED3DRS_ALPHAREF = 24, + WINED3DRS_ALPHAFUNC = 25, + WINED3DRS_DITHERENABLE = 26, + WINED3DRS_ALPHABLENDENABLE = 27, + WINED3DRS_FOGENABLE = 28, + WINED3DRS_SPECULARENABLE = 29, + WINED3DRS_ZVISIBLE = 30, /* d3d7, d3d8 */ + WINED3DRS_SUBPIXEL = 31, /* d3d7 */ + WINED3DRS_SUBPIXELX = 32, /* d3d7 */ + WINED3DRS_STIPPLEDALPHA = 33, /* d3d7 */ + WINED3DRS_FOGCOLOR = 34, + WINED3DRS_FOGTABLEMODE = 35, + WINED3DRS_FOGSTART = 36, + WINED3DRS_FOGEND = 37, + WINED3DRS_FOGDENSITY = 38, + WINED3DRS_STIPPLEENABLE = 39, /* d3d7 */ + WINED3DRS_EDGEANTIALIAS = 40, /* d3d7, d3d8 */ + WINED3DRS_COLORKEYENABLE = 41, /* d3d7 */ + WINED3DRS_MIPMAPLODBIAS = 46, /* d3d7 */ + WINED3DRS_RANGEFOGENABLE = 48, + WINED3DRS_ANISOTROPY = 49, /* d3d7 */ + WINED3DRS_FLUSHBATCH = 50, /* d3d7 */ + WINED3DRS_TRANSLUCENTSORTINDEPENDENT = 51, /* d3d7 */ + WINED3DRS_STENCILENABLE = 52, + WINED3DRS_STENCILFAIL = 53, + WINED3DRS_STENCILZFAIL = 54, + WINED3DRS_STENCILPASS = 55, + WINED3DRS_STENCILFUNC = 56, + WINED3DRS_STENCILREF = 57, + WINED3DRS_STENCILMASK = 58, + WINED3DRS_STENCILWRITEMASK = 59, + WINED3DRS_TEXTUREFACTOR = 60, + WINED3DRS_WRAP0 = 128, + WINED3DRS_WRAP1 = 129, + WINED3DRS_WRAP2 = 130, + WINED3DRS_WRAP3 = 131, + WINED3DRS_WRAP4 = 132, + WINED3DRS_WRAP5 = 133, + WINED3DRS_WRAP6 = 134, + WINED3DRS_WRAP7 = 135, + WINED3DRS_CLIPPING = 136, + WINED3DRS_LIGHTING = 137, + WINED3DRS_EXTENTS = 138, /* d3d7 */ + WINED3DRS_AMBIENT = 139, + WINED3DRS_FOGVERTEXMODE = 140, + WINED3DRS_COLORVERTEX = 141, + WINED3DRS_LOCALVIEWER = 142, + WINED3DRS_NORMALIZENORMALS = 143, + WINED3DRS_COLORKEYBLENDENABLE = 144, /* d3d7 */ + WINED3DRS_DIFFUSEMATERIALSOURCE = 145, + WINED3DRS_SPECULARMATERIALSOURCE = 146, + WINED3DRS_AMBIENTMATERIALSOURCE = 147, + WINED3DRS_EMISSIVEMATERIALSOURCE = 148, + WINED3DRS_VERTEXBLEND = 151, + WINED3DRS_CLIPPLANEENABLE = 152, + WINED3DRS_SOFTWAREVERTEXPROCESSING = 153, /* d3d8 */ + WINED3DRS_POINTSIZE = 154, + WINED3DRS_POINTSIZE_MIN = 155, + WINED3DRS_POINTSPRITEENABLE = 156, + WINED3DRS_POINTSCALEENABLE = 157, + WINED3DRS_POINTSCALE_A = 158, + WINED3DRS_POINTSCALE_B = 159, + WINED3DRS_POINTSCALE_C = 160, + WINED3DRS_MULTISAMPLEANTIALIAS = 161, + WINED3DRS_MULTISAMPLEMASK = 162, + WINED3DRS_PATCHEDGESTYLE = 163, + WINED3DRS_PATCHSEGMENTS = 164, /* d3d8 */ + WINED3DRS_DEBUGMONITORTOKEN = 165, + WINED3DRS_POINTSIZE_MAX = 166, + WINED3DRS_INDEXEDVERTEXBLENDENABLE = 167, + WINED3DRS_COLORWRITEENABLE = 168, + WINED3DRS_TWEENFACTOR = 170, + WINED3DRS_BLENDOP = 171, + WINED3DRS_POSITIONDEGREE = 172, + WINED3DRS_NORMALDEGREE = 173, + WINED3DRS_SCISSORTESTENABLE = 174, + WINED3DRS_SLOPESCALEDEPTHBIAS = 175, + WINED3DRS_ANTIALIASEDLINEENABLE = 176, + WINED3DRS_MINTESSELLATIONLEVEL = 178, + WINED3DRS_MAXTESSELLATIONLEVEL = 179, + WINED3DRS_ADAPTIVETESS_X = 180, + WINED3DRS_ADAPTIVETESS_Y = 181, + WINED3DRS_ADAPTIVETESS_Z = 182, + WINED3DRS_ADAPTIVETESS_W = 183, + WINED3DRS_ENABLEADAPTIVETESSELLATION = 184, + WINED3DRS_TWOSIDEDSTENCILMODE = 185, + WINED3DRS_CCW_STENCILFAIL = 186, + WINED3DRS_CCW_STENCILZFAIL = 187, + WINED3DRS_CCW_STENCILPASS = 188, + WINED3DRS_CCW_STENCILFUNC = 189, + WINED3DRS_COLORWRITEENABLE1 = 190, + WINED3DRS_COLORWRITEENABLE2 = 191, + WINED3DRS_COLORWRITEENABLE3 = 192, + WINED3DRS_BLENDFACTOR = 193, + WINED3DRS_SRGBWRITEENABLE = 194, + WINED3DRS_DEPTHBIAS = 195, + WINED3DRS_WRAP8 = 198, + WINED3DRS_WRAP9 = 199, + WINED3DRS_WRAP10 = 200, + WINED3DRS_WRAP11 = 201, + WINED3DRS_WRAP12 = 202, + WINED3DRS_WRAP13 = 203, + WINED3DRS_WRAP14 = 204, + WINED3DRS_WRAP15 = 205, + WINED3DRS_SEPARATEALPHABLENDENABLE = 206, + WINED3DRS_SRCBLENDALPHA = 207, + WINED3DRS_DESTBLENDALPHA = 208, + WINED3DRS_BLENDOPALPHA = 209, + WINED3DRS_FORCE_DWORD = 0x7fffffff +} WINED3DRENDERSTATETYPE; +#define WINEHIGHEST_RENDER_STATE WINED3DRS_BLENDOPALPHA + +typedef enum _WINED3DBLEND +{ + WINED3DBLEND_ZERO = 1, + WINED3DBLEND_ONE = 2, + WINED3DBLEND_SRCCOLOR = 3, + WINED3DBLEND_INVSRCCOLOR = 4, + WINED3DBLEND_SRCALPHA = 5, + WINED3DBLEND_INVSRCALPHA = 6, + WINED3DBLEND_DESTALPHA = 7, + WINED3DBLEND_INVDESTALPHA = 8, + WINED3DBLEND_DESTCOLOR = 9, + WINED3DBLEND_INVDESTCOLOR = 10, + WINED3DBLEND_SRCALPHASAT = 11, + WINED3DBLEND_BOTHSRCALPHA = 12, + WINED3DBLEND_BOTHINVSRCALPHA = 13, + WINED3DBLEND_BLENDFACTOR = 14, + WINED3DBLEND_INVBLENDFACTOR = 15, + WINED3DBLEND_FORCE_DWORD = 0x7fffffff +} WINED3DBLEND; + +typedef enum _WINED3DBLENDOP +{ + WINED3DBLENDOP_ADD = 1, + WINED3DBLENDOP_SUBTRACT = 2, + WINED3DBLENDOP_REVSUBTRACT = 3, + WINED3DBLENDOP_MIN = 4, + WINED3DBLENDOP_MAX = 5, + WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff +} WINED3DBLENDOP; + +typedef enum _WINED3DVERTEXBLENDFLAGS +{ + WINED3DVBF_DISABLE = 0, + WINED3DVBF_1WEIGHTS = 1, + WINED3DVBF_2WEIGHTS = 2, + WINED3DVBF_3WEIGHTS = 3, + WINED3DVBF_TWEENING = 255, + WINED3DVBF_0WEIGHTS = 256 +} WINED3DVERTEXBLENDFLAGS; + +typedef enum _WINED3DCMPFUNC +{ + WINED3DCMP_NEVER = 1, + WINED3DCMP_LESS = 2, + WINED3DCMP_EQUAL = 3, + WINED3DCMP_LESSEQUAL = 4, + WINED3DCMP_GREATER = 5, + WINED3DCMP_NOTEQUAL = 6, + WINED3DCMP_GREATEREQUAL = 7, + WINED3DCMP_ALWAYS = 8, + WINED3DCMP_FORCE_DWORD = 0x7fffffff +} WINED3DCMPFUNC; + +typedef enum _WINED3DZBUFFERTYPE +{ + WINED3DZB_FALSE = 0, + WINED3DZB_TRUE = 1, + WINED3DZB_USEW = 2, + WINED3DZB_FORCE_DWORD = 0x7fffffff +} WINED3DZBUFFERTYPE; + +typedef enum _WINED3DFOGMODE +{ + WINED3DFOG_NONE = 0, + WINED3DFOG_EXP = 1, + WINED3DFOG_EXP2 = 2, + WINED3DFOG_LINEAR = 3, + WINED3DFOG_FORCE_DWORD = 0x7fffffff +} WINED3DFOGMODE; + +typedef enum _WINED3DSHADEMODE +{ + WINED3DSHADE_FLAT = 1, + WINED3DSHADE_GOURAUD = 2, + WINED3DSHADE_PHONG = 3, + WINED3DSHADE_FORCE_DWORD = 0x7fffffff +} WINED3DSHADEMODE; + +typedef enum _WINED3DFILLMODE +{ + WINED3DFILL_POINT = 1, + WINED3DFILL_WIREFRAME = 2, + WINED3DFILL_SOLID = 3, + WINED3DFILL_FORCE_DWORD = 0x7fffffff +} WINED3DFILLMODE; + +typedef enum _WINED3DCULL +{ + WINED3DCULL_NONE = 1, + WINED3DCULL_CW = 2, + WINED3DCULL_CCW = 3, + WINED3DCULL_FORCE_DWORD = 0x7fffffff +} WINED3DCULL; + +typedef enum _WINED3DSTENCILOP +{ + WINED3DSTENCILOP_KEEP = 1, + WINED3DSTENCILOP_ZERO = 2, + WINED3DSTENCILOP_REPLACE = 3, + WINED3DSTENCILOP_INCRSAT = 4, + WINED3DSTENCILOP_DECRSAT = 5, + WINED3DSTENCILOP_INVERT = 6, + WINED3DSTENCILOP_INCR = 7, + WINED3DSTENCILOP_DECR = 8, + WINED3DSTENCILOP_FORCE_DWORD = 0x7fffffff +} WINED3DSTENCILOP; + +typedef enum _WINED3DMATERIALCOLORSOURCE +{ + WINED3DMCS_MATERIAL = 0, + WINED3DMCS_COLOR1 = 1, + WINED3DMCS_COLOR2 = 2, + WINED3DMCS_FORCE_DWORD = 0x7fffffff +} WINED3DMATERIALCOLORSOURCE; + +typedef enum _WINED3DPATCHEDGESTYLE +{ + WINED3DPATCHEDGE_DISCRETE = 0, + WINED3DPATCHEDGE_CONTINUOUS = 1, + WINED3DPATCHEDGE_FORCE_DWORD = 0x7fffffff +} WINED3DPATCHEDGESTYLE; + +typedef enum _WINED3DBACKBUFFER_TYPE +{ + WINED3DBACKBUFFER_TYPE_MONO = 0, + WINED3DBACKBUFFER_TYPE_LEFT = 1, + WINED3DBACKBUFFER_TYPE_RIGHT = 2, + WINED3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff +} WINED3DBACKBUFFER_TYPE; + +typedef enum _WINED3DSWAPEFFECT +{ + WINED3DSWAPEFFECT_DISCARD = 1, + WINED3DSWAPEFFECT_FLIP = 2, + WINED3DSWAPEFFECT_COPY = 3, + WINED3DSWAPEFFECT_COPY_VSYNC = 4, + WINED3DSWAPEFFECT_FORCE_DWORD = 0xffffffff +} WINED3DSWAPEFFECT; + +typedef enum _WINED3DSAMPLERSTATETYPE +{ + WINED3DSAMP_ADDRESSU = 1, + WINED3DSAMP_ADDRESSV = 2, + WINED3DSAMP_ADDRESSW = 3, + WINED3DSAMP_BORDERCOLOR = 4, + WINED3DSAMP_MAGFILTER = 5, + WINED3DSAMP_MINFILTER = 6, + WINED3DSAMP_MIPFILTER = 7, + WINED3DSAMP_MIPMAPLODBIAS = 8, + WINED3DSAMP_MAXMIPLEVEL = 9, + WINED3DSAMP_MAXANISOTROPY = 10, + WINED3DSAMP_SRGBTEXTURE = 11, + WINED3DSAMP_ELEMENTINDEX = 12, + WINED3DSAMP_DMAPOFFSET = 13, + WINED3DSAMP_FORCE_DWORD = 0x7fffffff, +} WINED3DSAMPLERSTATETYPE; +#define WINED3D_HIGHEST_SAMPLER_STATE WINED3DSAMP_DMAPOFFSET + +typedef enum _WINED3DMULTISAMPLE_TYPE +{ + WINED3DMULTISAMPLE_NONE = 0, + WINED3DMULTISAMPLE_NONMASKABLE = 1, + WINED3DMULTISAMPLE_2_SAMPLES = 2, + WINED3DMULTISAMPLE_3_SAMPLES = 3, + WINED3DMULTISAMPLE_4_SAMPLES = 4, + WINED3DMULTISAMPLE_5_SAMPLES = 5, + WINED3DMULTISAMPLE_6_SAMPLES = 6, + WINED3DMULTISAMPLE_7_SAMPLES = 7, + WINED3DMULTISAMPLE_8_SAMPLES = 8, + WINED3DMULTISAMPLE_9_SAMPLES = 9, + WINED3DMULTISAMPLE_10_SAMPLES = 10, + WINED3DMULTISAMPLE_11_SAMPLES = 11, + WINED3DMULTISAMPLE_12_SAMPLES = 12, + WINED3DMULTISAMPLE_13_SAMPLES = 13, + WINED3DMULTISAMPLE_14_SAMPLES = 14, + WINED3DMULTISAMPLE_15_SAMPLES = 15, + WINED3DMULTISAMPLE_16_SAMPLES = 16, + WINED3DMULTISAMPLE_FORCE_DWORD = 0xffffffff +} WINED3DMULTISAMPLE_TYPE; + +typedef enum _WINED3DTEXTURESTAGESTATETYPE +{ + WINED3DTSS_COLOROP = 0, + WINED3DTSS_COLORARG1 = 1, + WINED3DTSS_COLORARG2 = 2, + WINED3DTSS_ALPHAOP = 3, + WINED3DTSS_ALPHAARG1 = 4, + WINED3DTSS_ALPHAARG2 = 5, + WINED3DTSS_BUMPENVMAT00 = 6, + WINED3DTSS_BUMPENVMAT01 = 7, + WINED3DTSS_BUMPENVMAT10 = 8, + WINED3DTSS_BUMPENVMAT11 = 9, + WINED3DTSS_TEXCOORDINDEX = 10, + WINED3DTSS_BUMPENVLSCALE = 11, + WINED3DTSS_BUMPENVLOFFSET = 12, + WINED3DTSS_TEXTURETRANSFORMFLAGS = 13, + WINED3DTSS_COLORARG0 = 14, + WINED3DTSS_ALPHAARG0 = 15, + WINED3DTSS_RESULTARG = 16, + WINED3DTSS_CONSTANT = 17, + WINED3DTSS_FORCE_DWORD = 0x7fffffff +} WINED3DTEXTURESTAGESTATETYPE; +#define WINED3D_HIGHEST_TEXTURE_STATE WINED3DTSS_CONSTANT + +typedef enum _WINED3DTEXTURETRANSFORMFLAGS +{ + WINED3DTTFF_DISABLE = 0, + WINED3DTTFF_COUNT1 = 1, + WINED3DTTFF_COUNT2 = 2, + WINED3DTTFF_COUNT3 = 3, + WINED3DTTFF_COUNT4 = 4, + WINED3DTTFF_PROJECTED = 256, + WINED3DTTFF_FORCE_DWORD = 0x7fffffff +} WINED3DTEXTURETRANSFORMFLAGS; + +typedef enum _WINED3DTEXTUREOP +{ + WINED3DTOP_DISABLE = 1, + WINED3DTOP_SELECTARG1 = 2, + WINED3DTOP_SELECTARG2 = 3, + WINED3DTOP_MODULATE = 4, + WINED3DTOP_MODULATE2X = 5, + WINED3DTOP_MODULATE4X = 6, + WINED3DTOP_ADD = 7, + WINED3DTOP_ADDSIGNED = 8, + WINED3DTOP_ADDSIGNED2X = 9, + WINED3DTOP_SUBTRACT = 10, + WINED3DTOP_ADDSMOOTH = 11, + WINED3DTOP_BLENDDIFFUSEALPHA = 12, + WINED3DTOP_BLENDTEXTUREALPHA = 13, + WINED3DTOP_BLENDFACTORALPHA = 14, + WINED3DTOP_BLENDTEXTUREALPHAPM = 15, + WINED3DTOP_BLENDCURRENTALPHA = 16, + WINED3DTOP_PREMODULATE = 17, + WINED3DTOP_MODULATEALPHA_ADDCOLOR = 18, + WINED3DTOP_MODULATECOLOR_ADDALPHA = 19, + WINED3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, + WINED3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, + WINED3DTOP_BUMPENVMAP = 22, + WINED3DTOP_BUMPENVMAPLUMINANCE = 23, + WINED3DTOP_DOTPRODUCT3 = 24, + WINED3DTOP_MULTIPLYADD = 25, + WINED3DTOP_LERP = 26, + WINED3DTOP_FORCE_DWORD = 0x7fffffff, +} WINED3DTEXTUREOP; + +typedef enum _WINED3DTEXTUREADDRESS +{ + WINED3DTADDRESS_WRAP = 1, + WINED3DTADDRESS_MIRROR = 2, + WINED3DTADDRESS_CLAMP = 3, + WINED3DTADDRESS_BORDER = 4, + WINED3DTADDRESS_MIRRORONCE = 5, + WINED3DTADDRESS_FORCE_DWORD = 0x7fffffff +} WINED3DTEXTUREADDRESS; + +typedef enum _WINED3DTRANSFORMSTATETYPE +{ + WINED3DTS_VIEW = 2, + WINED3DTS_PROJECTION = 3, + WINED3DTS_TEXTURE0 = 16, + WINED3DTS_TEXTURE1 = 17, + WINED3DTS_TEXTURE2 = 18, + WINED3DTS_TEXTURE3 = 19, + WINED3DTS_TEXTURE4 = 20, + WINED3DTS_TEXTURE5 = 21, + WINED3DTS_TEXTURE6 = 22, + WINED3DTS_TEXTURE7 = 23, + WINED3DTS_WORLD = 256, /*WINED3DTS_WORLDMATRIX(0)*/ + WINED3DTS_WORLD1 = 257, + WINED3DTS_WORLD2 = 258, + WINED3DTS_WORLD3 = 259, + WINED3DTS_FORCE_DWORD = 0x7fffffff +} WINED3DTRANSFORMSTATETYPE; + +#define WINED3DTS_WORLDMATRIX(index) (WINED3DTRANSFORMSTATETYPE)(index + 256) + +typedef enum _WINED3DBASISTYPE +{ + WINED3DBASIS_BEZIER = 0, + WINED3DBASIS_BSPLINE = 1, + WINED3DBASIS_INTERPOLATE = 2, + WINED3DBASIS_FORCE_DWORD = 0x7fffffff +} WINED3DBASISTYPE; + +typedef enum _WINED3DCUBEMAP_FACES +{ + WINED3DCUBEMAP_FACE_POSITIVE_X = 0, + WINED3DCUBEMAP_FACE_NEGATIVE_X = 1, + WINED3DCUBEMAP_FACE_POSITIVE_Y = 2, + WINED3DCUBEMAP_FACE_NEGATIVE_Y = 3, + WINED3DCUBEMAP_FACE_POSITIVE_Z = 4, + WINED3DCUBEMAP_FACE_NEGATIVE_Z = 5, + WINED3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff +} WINED3DCUBEMAP_FACES; + +typedef enum _WINED3DTEXTUREFILTERTYPE +{ + WINED3DTEXF_NONE = 0, + WINED3DTEXF_POINT = 1, + WINED3DTEXF_LINEAR = 2, + WINED3DTEXF_ANISOTROPIC = 3, + WINED3DTEXF_FLATCUBIC = 4, + WINED3DTEXF_GAUSSIANCUBIC = 5, + WINED3DTEXF_PYRAMIDALQUAD = 6, + WINED3DTEXF_GAUSSIANQUAD = 7, + WINED3DTEXF_FORCE_DWORD = 0x7fffffff +} WINED3DTEXTUREFILTERTYPE; + +typedef enum _WINED3DRESOURCETYPE +{ + WINED3DRTYPE_SURFACE = 1, + WINED3DRTYPE_VOLUME = 2, + WINED3DRTYPE_TEXTURE = 3, + WINED3DRTYPE_VOLUMETEXTURE = 4, + WINED3DRTYPE_CUBETEXTURE = 5, + WINED3DRTYPE_BUFFER = 6, + WINED3DRTYPE_FORCE_DWORD = 0x7fffffff +} WINED3DRESOURCETYPE; +#define WINED3DRTYPECOUNT WINED3DRTYPE_BUFFER + +typedef enum _WINED3DPOOL +{ + WINED3DPOOL_DEFAULT = 0, + WINED3DPOOL_MANAGED = 1, + WINED3DPOOL_SYSTEMMEM = 2, + WINED3DPOOL_SCRATCH = 3, + WINED3DPOOL_FORCE_DWORD = 0x7fffffff +} WINED3DPOOL; + +typedef enum _WINED3DQUERYTYPE +{ + WINED3DQUERYTYPE_VCACHE = 4, + WINED3DQUERYTYPE_RESOURCEMANAGER = 5, + WINED3DQUERYTYPE_VERTEXSTATS = 6, + WINED3DQUERYTYPE_EVENT = 8, + WINED3DQUERYTYPE_OCCLUSION = 9, + WINED3DQUERYTYPE_TIMESTAMP = 10, + WINED3DQUERYTYPE_TIMESTAMPDISJOINT = 11, + WINED3DQUERYTYPE_TIMESTAMPFREQ = 12, + WINED3DQUERYTYPE_PIPELINETIMINGS = 13, + WINED3DQUERYTYPE_INTERFACETIMINGS = 14, + WINED3DQUERYTYPE_VERTEXTIMINGS = 15, + WINED3DQUERYTYPE_PIXELTIMINGS = 16, + WINED3DQUERYTYPE_BANDWIDTHTIMINGS = 17, + WINED3DQUERYTYPE_CACHEUTILIZATION = 18 +} WINED3DQUERYTYPE; + +#define WINED3DISSUE_BEGIN (1 << 1) +#define WINED3DISSUE_END (1 << 0) +#define WINED3DGETDATA_FLUSH (1 << 0) + +typedef enum _WINED3DSTATEBLOCKTYPE +{ + WINED3DSBT_INIT = 0, + WINED3DSBT_ALL = 1, + WINED3DSBT_PIXELSTATE = 2, + WINED3DSBT_VERTEXSTATE = 3, + WINED3DSBT_RECORDED = 4, /* WineD3D private */ + WINED3DSBT_FORCE_DWORD = 0xffffffff +} WINED3DSTATEBLOCKTYPE; + +typedef enum _WINED3DDECLMETHOD +{ + WINED3DDECLMETHOD_DEFAULT = 0, + WINED3DDECLMETHOD_PARTIALU = 1, + WINED3DDECLMETHOD_PARTIALV = 2, + WINED3DDECLMETHOD_CROSSUV = 3, + WINED3DDECLMETHOD_UV = 4, + WINED3DDECLMETHOD_LOOKUP = 5, + WINED3DDECLMETHOD_LOOKUPPRESAMPLED = 6 +} WINED3DDECLMETHOD; + +typedef enum _WINED3DDECLUSAGE +{ + WINED3DDECLUSAGE_POSITION = 0, + WINED3DDECLUSAGE_BLENDWEIGHT = 1, + WINED3DDECLUSAGE_BLENDINDICES = 2, + WINED3DDECLUSAGE_NORMAL = 3, + WINED3DDECLUSAGE_PSIZE = 4, + WINED3DDECLUSAGE_TEXCOORD = 5, + WINED3DDECLUSAGE_TANGENT = 6, + WINED3DDECLUSAGE_BINORMAL = 7, + WINED3DDECLUSAGE_TESSFACTOR = 8, + WINED3DDECLUSAGE_POSITIONT = 9, + WINED3DDECLUSAGE_COLOR = 10, + WINED3DDECLUSAGE_FOG = 11, + WINED3DDECLUSAGE_DEPTH = 12, + WINED3DDECLUSAGE_SAMPLE = 13 +} WINED3DDECLUSAGE; + +typedef enum _WINED3DSURFTYPE +{ + SURFACE_UNKNOWN = 0, /* Default / Unknown surface type */ + SURFACE_OPENGL, /* OpenGL surface: Renders using libGL, needed for 3D */ + SURFACE_GDI, /* User surface. No 3D, DirectDraw rendering with GDI */ +} WINED3DSURFTYPE; + +enum wined3d_sysval_semantic +{ + WINED3D_SV_DEPTH = 0xffffffff, + WINED3D_SV_TARGET0 = 0, + WINED3D_SV_TARGET1 = 1, + WINED3D_SV_TARGET2 = 2, + WINED3D_SV_TARGET3 = 3, + WINED3D_SV_TARGET4 = 4, + WINED3D_SV_TARGET5 = 5, + WINED3D_SV_TARGET6 = 6, + WINED3D_SV_TARGET7 = 7, +}; + +#define WINED3DCOLORWRITEENABLE_RED (1 << 0) +#define WINED3DCOLORWRITEENABLE_GREEN (1 << 1) +#define WINED3DCOLORWRITEENABLE_BLUE (1 << 2) +#define WINED3DCOLORWRITEENABLE_ALPHA (1 << 3) + +#define WINED3DADAPTER_DEFAULT 0 +#define WINED3DENUM_NO_WHQL_LEVEL 2 +#define WINED3DPRESENT_BACK_BUFFER_MAX 3 + +#define WINED3DTSS_TCI_PASSTHRU 0x00000 +#define WINED3DTSS_TCI_CAMERASPACENORMAL 0x10000 +#define WINED3DTSS_TCI_CAMERASPACEPOSITION 0x20000 +#define WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x30000 +#define WINED3DTSS_TCI_SPHEREMAP 0x40000 + +#define WINED3DTA_SELECTMASK 0x0000000f +#define WINED3DTA_DIFFUSE 0x00000000 +#define WINED3DTA_CURRENT 0x00000001 +#define WINED3DTA_TEXTURE 0x00000002 +#define WINED3DTA_TFACTOR 0x00000003 +#define WINED3DTA_SPECULAR 0x00000004 +#define WINED3DTA_TEMP 0x00000005 +#define WINED3DTA_CONSTANT 0x00000006 +#define WINED3DTA_COMPLEMENT 0x00000010 +#define WINED3DTA_ALPHAREPLICATE 0x00000020 + +#define WINED3DPRESENTFLAG_LOCKABLE_BACKBUFFER 0x00000001 +#define WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL 0x00000002 +#define WINED3DPRESENTFLAG_DEVICECLIP 0x00000004 +#define WINED3DPRESENTFLAG_VIDEO 0x00000010 +#define WINED3DPRESENTFLAG_NOAUTOROTATE 0x00000020 +#define WINED3DPRESENTFLAG_UNPRUNEDMODE 0x00000040 + +#define WINED3DDP_MAXTEXCOORD 8 + +#define WINED3DUSAGE_RENDERTARGET 0x00000001 +#define WINED3DUSAGE_DEPTHSTENCIL 0x00000002 +#define WINED3DUSAGE_WRITEONLY 0x00000008 +#define WINED3DUSAGE_SOFTWAREPROCESSING 0x00000010 +#define WINED3DUSAGE_DONOTCLIP 0x00000020 +#define WINED3DUSAGE_POINTS 0x00000040 +#define WINED3DUSAGE_RTPATCHES 0x00000080 +#define WINED3DUSAGE_NPATCHES 0x00000100 +#define WINED3DUSAGE_DYNAMIC 0x00000200 +#define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400 +#define WINED3DUSAGE_DMAP 0x00004000 +#define WINED3DUSAGE_MASK 0x00004fff +#define WINED3DUSAGE_STATICDECL 0x40000000 +#define WINED3DUSAGE_OVERLAY 0x80000000 + +#define WINED3DUSAGE_QUERY_LEGACYBUMPMAP 0x00008000 +#define WINED3DUSAGE_QUERY_FILTER 0x00020000 +#define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING 0x00080000 +#define WINED3DUSAGE_QUERY_SRGBREAD 0x00010000 +#define WINED3DUSAGE_QUERY_SRGBWRITE 0x00040000 +#define WINED3DUSAGE_QUERY_VERTEXTEXTURE 0x00100000 +#define WINED3DUSAGE_QUERY_WRAPANDMIP 0x00200000 +#define WINED3DUSAGE_QUERY_MASK 0x003f8000 + +#define WINED3DLOCK_READONLY 0x0010 +#define WINED3DLOCK_NOSYSLOCK 0x0800 +#define WINED3DLOCK_NOOVERWRITE 0x1000 +#define WINED3DLOCK_DISCARD 0x2000 +#define WINED3DLOCK_DONOTWAIT 0x4000 +#define WINED3DLOCK_NO_DIRTY_UPDATE 0x8000 + +#define WINED3DPRESENT_RATE_DEFAULT 0x00000000 + +#define WINED3DPRESENT_INTERVAL_DEFAULT 0x00000000 +#define WINED3DPRESENT_INTERVAL_ONE 0x00000001 +#define WINED3DPRESENT_INTERVAL_TWO 0x00000002 +#define WINED3DPRESENT_INTERVAL_THREE 0x00000004 +#define WINED3DPRESENT_INTERVAL_FOUR 0x00000008 +#define WINED3DPRESENT_INTERVAL_IMMEDIATE 0x80000000 + +#define WINED3DMAXUSERCLIPPLANES 32 +#define WINED3DCLIPPLANE0 (1 << 0) +#define WINED3DCLIPPLANE1 (1 << 1) +#define WINED3DCLIPPLANE2 (1 << 2) +#define WINED3DCLIPPLANE3 (1 << 3) +#define WINED3DCLIPPLANE4 (1 << 4) +#define WINED3DCLIPPLANE5 (1 << 5) + +/* FVF (Flexible Vertex Format) codes */ +#define WINED3DFVF_RESERVED0 0x0001 +#define WINED3DFVF_POSITION_MASK 0x400e +#define WINED3DFVF_XYZ 0x0002 +#define WINED3DFVF_XYZRHW 0x0004 +#define WINED3DFVF_XYZB1 0x0006 +#define WINED3DFVF_XYZB2 0x0008 +#define WINED3DFVF_XYZB3 0x000a +#define WINED3DFVF_XYZB4 0x000c +#define WINED3DFVF_XYZB5 0x000e +#define WINED3DFVF_XYZW 0x4002 +#define WINED3DFVF_NORMAL 0x0010 +#define WINED3DFVF_PSIZE 0x0020 +#define WINED3DFVF_DIFFUSE 0x0040 +#define WINED3DFVF_SPECULAR 0x0080 +#define WINED3DFVF_TEXCOUNT_MASK 0x0f00 +#define WINED3DFVF_TEXCOUNT_SHIFT 8 +#define WINED3DFVF_TEX0 0x0000 +#define WINED3DFVF_TEX1 0x0100 +#define WINED3DFVF_TEX2 0x0200 +#define WINED3DFVF_TEX3 0x0300 +#define WINED3DFVF_TEX4 0x0400 +#define WINED3DFVF_TEX5 0x0500 +#define WINED3DFVF_TEX6 0x0600 +#define WINED3DFVF_TEX7 0x0700 +#define WINED3DFVF_TEX8 0x0800 +#define WINED3DFVF_LASTBETA_UBYTE4 0x1000 +#define WINED3DFVF_LASTBETA_D3DCOLOR 0x8000 +#define WINED3DFVF_RESERVED2 0x6000 + +#define WINED3DFVF_TEXTUREFORMAT1 3 +#define WINED3DFVF_TEXTUREFORMAT2 0 +#define WINED3DFVF_TEXTUREFORMAT3 1 +#define WINED3DFVF_TEXTUREFORMAT4 2 +#define WINED3DFVF_TEXCOORDSIZE1(idx) (WINED3DFVF_TEXTUREFORMAT1 << (idx * 2 + 16)) +#define WINED3DFVF_TEXCOORDSIZE2(idx) (WINED3DFVF_TEXTUREFORMAT2 << (idx * 2 + 16)) +#define WINED3DFVF_TEXCOORDSIZE3(idx) (WINED3DFVF_TEXTUREFORMAT3 << (idx * 2 + 16)) +#define WINED3DFVF_TEXCOORDSIZE4(idx) (WINED3DFVF_TEXTUREFORMAT4 << (idx * 2 + 16)) + +/* Clear flags */ +#define WINED3DCLEAR_TARGET 0x00000001 +#define WINED3DCLEAR_ZBUFFER 0x00000002 +#define WINED3DCLEAR_STENCIL 0x00000004 + +/* Stream source flags */ +#define WINED3DSTREAMSOURCE_INDEXEDDATA (1 << 30) +#define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30) + +/* SetPrivateData flags */ +#define WINED3DSPD_IUNKNOWN 0x00000001 + +/* IWineD3D::CreateDevice behaviour flags */ +#define WINED3DCREATE_FPU_PRESERVE 0x00000002 +#define WINED3DCREATE_PUREDEVICE 0x00000010 +#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020 +#define WINED3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040 +#define WINED3DCREATE_MIXED_VERTEXPROCESSING 0x00000080 +#define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100 +#define WINED3DCREATE_ADAPTERGROUP_DEVICE 0x00000200 + +/* VTF defines */ +#define WINED3DDMAPSAMPLER 0x100 +#define WINED3DVERTEXTEXTURESAMPLER0 (WINED3DDMAPSAMPLER + 1) +#define WINED3DVERTEXTEXTURESAMPLER1 (WINED3DDMAPSAMPLER + 2) +#define WINED3DVERTEXTEXTURESAMPLER2 (WINED3DDMAPSAMPLER + 3) +#define WINED3DVERTEXTEXTURESAMPLER3 (WINED3DDMAPSAMPLER + 4) + +#define WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD 0x00000020 +#define WINED3DCAPS3_LINEAR_TO_SRGB_PRESENTATION 0x00000080 +#define WINED3DCAPS3_COPY_TO_VIDMEM 0x00000100 +#define WINED3DCAPS3_COPY_TO_SYSTEMMEM 0x00000200 +#define WINED3DCAPS3_RESERVED 0x8000001f + +#define WINED3DDEVCAPS2_STREAMOFFSET 0x00000001 +#define WINED3DDEVCAPS2_DMAPNPATCH 0x00000002 +#define WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH 0x00000004 +#define WINED3DDEVCAPS2_ADAPTIVETESSNPATCH 0x00000008 +#define WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES 0x00000010 +#define WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH 0x00000020 +#define WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET 0x00000040 + +#define WINED3DDTCAPS_UBYTE4 0x00000001 +#define WINED3DDTCAPS_UBYTE4N 0x00000002 +#define WINED3DDTCAPS_SHORT2N 0x00000004 +#define WINED3DDTCAPS_SHORT4N 0x00000008 +#define WINED3DDTCAPS_USHORT2N 0x00000010 +#define WINED3DDTCAPS_USHORT4N 0x00000020 +#define WINED3DDTCAPS_UDEC3 0x00000040 +#define WINED3DDTCAPS_DEC3N 0x00000080 +#define WINED3DDTCAPS_FLOAT16_2 0x00000100 +#define WINED3DDTCAPS_FLOAT16_4 0x00000200 + +#define WINED3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffff +#define WINED3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000 +#define WINED3DFVFCAPS_PSIZE 0x00100000 + +#define WINED3DLINECAPS_TEXTURE 0x00000001 +#define WINED3DLINECAPS_ZTEST 0x00000002 +#define WINED3DLINECAPS_BLEND 0x00000004 +#define WINED3DLINECAPS_ALPHACMP 0x00000008 +#define WINED3DLINECAPS_FOG 0x00000010 +#define WINED3DLINECAPS_ANTIALIAS 0x00000020 + +#define WINED3DMAX30SHADERINSTRUCTIONS 32768 +#define WINED3DMIN30SHADERINSTRUCTIONS 512 + +#define WINED3DPBLENDCAPS_ZERO 0x00000001 +#define WINED3DPBLENDCAPS_ONE 0x00000002 +#define WINED3DPBLENDCAPS_SRCCOLOR 0x00000004 +#define WINED3DPBLENDCAPS_INVSRCCOLOR 0x00000008 +#define WINED3DPBLENDCAPS_SRCALPHA 0x00000010 +#define WINED3DPBLENDCAPS_INVSRCALPHA 0x00000020 +#define WINED3DPBLENDCAPS_DESTALPHA 0x00000040 +#define WINED3DPBLENDCAPS_INVDESTALPHA 0x00000080 +#define WINED3DPBLENDCAPS_DESTCOLOR 0x00000100 +#define WINED3DPBLENDCAPS_INVDESTCOLOR 0x00000200 +#define WINED3DPBLENDCAPS_SRCALPHASAT 0x00000400 +#define WINED3DPBLENDCAPS_BOTHSRCALPHA 0x00000800 +#define WINED3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000 +#define WINED3DPBLENDCAPS_BLENDFACTOR 0x00002000 + +#define WINED3DPCMPCAPS_NEVER 0x00000001 +#define WINED3DPCMPCAPS_LESS 0x00000002 +#define WINED3DPCMPCAPS_EQUAL 0x00000004 +#define WINED3DPCMPCAPS_LESSEQUAL 0x00000008 +#define WINED3DPCMPCAPS_GREATER 0x00000010 +#define WINED3DPCMPCAPS_NOTEQUAL 0x00000020 +#define WINED3DPCMPCAPS_GREATEREQUAL 0x00000040 +#define WINED3DPCMPCAPS_ALWAYS 0x00000080 + +#define WINED3DPMISCCAPS_MASKZ 0x00000002 +#define WINED3DPMISCCAPS_LINEPATTERNREP 0x00000004 +#define WINED3DPMISCCAPS_CULLNONE 0x00000010 +#define WINED3DPMISCCAPS_CULLCW 0x00000020 +#define WINED3DPMISCCAPS_CULLCCW 0x00000040 +#define WINED3DPMISCCAPS_COLORWRITEENABLE 0x00000080 +#define WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100 +#define WINED3DPMISCCAPS_CLIPTLVERTS 0x00000200 +#define WINED3DPMISCCAPS_TSSARGTEMP 0x00000400 +#define WINED3DPMISCCAPS_BLENDOP 0x00000800 +#define WINED3DPMISCCAPS_NULLREFERENCE 0x00001000 +#define WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS 0x00004000 +#define WINED3DPMISCCAPS_PERSTAGECONSTANT 0x00008000 +#define WINED3DPMISCCAPS_FOGANDSPECULARALPHA 0x00010000 +#define WINED3DPMISCCAPS_SEPARATEALPHABLEND 0x00020000 +#define WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS 0x00040000 +#define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000 +#define WINED3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000 + +#define WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH 24 +#define WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH 0 +#define WINED3DPS20_MAX_NUMTEMPS 32 +#define WINED3DPS20_MIN_NUMTEMPS 12 +#define WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH 4 +#define WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH 0 +#define WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS 512 +#define WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS 96 + +#define WINED3DPS20CAPS_ARBITRARYSWIZZLE 0x00000001 +#define WINED3DPS20CAPS_GRADIENTINSTRUCTIONS 0x00000002 +#define WINED3DPS20CAPS_PREDICATION 0x00000004 +#define WINED3DPS20CAPS_NODEPENDENTREADLIMIT 0x00000008 +#define WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT 0x00000010 + +#define WINED3DPTADDRESSCAPS_WRAP 0x00000001 +#define WINED3DPTADDRESSCAPS_MIRROR 0x00000002 +#define WINED3DPTADDRESSCAPS_CLAMP 0x00000004 +#define WINED3DPTADDRESSCAPS_BORDER 0x00000008 +#define WINED3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010 +#define WINED3DPTADDRESSCAPS_MIRRORONCE 0x00000020 + +#define WINED3DSTENCILCAPS_KEEP 0x00000001 +#define WINED3DSTENCILCAPS_ZERO 0x00000002 +#define WINED3DSTENCILCAPS_REPLACE 0x00000004 +#define WINED3DSTENCILCAPS_INCRSAT 0x00000008 +#define WINED3DSTENCILCAPS_DECRSAT 0x00000010 +#define WINED3DSTENCILCAPS_INVERT 0x00000020 +#define WINED3DSTENCILCAPS_INCR 0x00000040 +#define WINED3DSTENCILCAPS_DECR 0x00000080 +#define WINED3DSTENCILCAPS_TWOSIDED 0x00000100 + +#define WINED3DTEXOPCAPS_DISABLE 0x00000001 +#define WINED3DTEXOPCAPS_SELECTARG1 0x00000002 +#define WINED3DTEXOPCAPS_SELECTARG2 0x00000004 +#define WINED3DTEXOPCAPS_MODULATE 0x00000008 +#define WINED3DTEXOPCAPS_MODULATE2X 0x00000010 +#define WINED3DTEXOPCAPS_MODULATE4X 0x00000020 +#define WINED3DTEXOPCAPS_ADD 0x00000040 +#define WINED3DTEXOPCAPS_ADDSIGNED 0x00000080 +#define WINED3DTEXOPCAPS_ADDSIGNED2X 0x00000100 +#define WINED3DTEXOPCAPS_SUBTRACT 0x00000200 +#define WINED3DTEXOPCAPS_ADDSMOOTH 0x00000400 +#define WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800 +#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000 +#define WINED3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000 +#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000 +#define WINED3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000 +#define WINED3DTEXOPCAPS_PREMODULATE 0x00010000 +#define WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000 +#define WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000 +#define WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000 +#define WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000 +#define WINED3DTEXOPCAPS_BUMPENVMAP 0x00200000 +#define WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000 +#define WINED3DTEXOPCAPS_DOTPRODUCT3 0x00800000 +#define WINED3DTEXOPCAPS_MULTIPLYADD 0x01000000 +#define WINED3DTEXOPCAPS_LERP 0x02000000 + +#define WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH 24 +#define WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH 0 +#define WINED3DVS20_MAX_NUMTEMPS 32 +#define WINED3DVS20_MIN_NUMTEMPS 12 +#define WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH 4 +#define WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH 1 + +#define WINED3DVS20CAPS_PREDICATION 0x00000001 + +#define WINED3DCAPS2_NO2DDURING3DSCENE 0x00000002 +#define WINED3DCAPS2_FULLSCREENGAMMA 0x00020000 +#define WINED3DCAPS2_CANRENDERWINDOWED 0x00080000 +#define WINED3DCAPS2_CANCALIBRATEGAMMA 0x00100000 +#define WINED3DCAPS2_RESERVED 0x02000000 +#define WINED3DCAPS2_CANMANAGERESOURCE 0x10000000 +#define WINED3DCAPS2_DYNAMICTEXTURES 0x20000000 +#define WINED3DCAPS2_CANAUTOGENMIPMAP 0x40000000 + +#define WINED3DPRASTERCAPS_DITHER 0x00000001 +#define WINED3DPRASTERCAPS_ROP2 0x00000002 +#define WINED3DPRASTERCAPS_XOR 0x00000004 +#define WINED3DPRASTERCAPS_PAT 0x00000008 +#define WINED3DPRASTERCAPS_ZTEST 0x00000010 +#define WINED3DPRASTERCAPS_SUBPIXEL 0x00000020 +#define WINED3DPRASTERCAPS_SUBPIXELX 0x00000040 +#define WINED3DPRASTERCAPS_FOGVERTEX 0x00000080 +#define WINED3DPRASTERCAPS_FOGTABLE 0x00000100 +#define WINED3DPRASTERCAPS_STIPPLE 0x00000200 +#define WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400 +#define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800 +#define WINED3DPRASTERCAPS_ANTIALIASEDGES 0x00001000 +#define WINED3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000 +#define WINED3DPRASTERCAPS_ZBIAS 0x00004000 +#define WINED3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000 +#define WINED3DPRASTERCAPS_FOGRANGE 0x00010000 +#define WINED3DPRASTERCAPS_ANISOTROPY 0x00020000 +#define WINED3DPRASTERCAPS_WBUFFER 0x00040000 +#define WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000 +#define WINED3DPRASTERCAPS_WFOG 0x00100000 +#define WINED3DPRASTERCAPS_ZFOG 0x00200000 +#define WINED3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000 +#define WINED3DPRASTERCAPS_SCISSORTEST 0x01000000 +#define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS 0x02000000 +#define WINED3DPRASTERCAPS_DEPTHBIAS 0x04000000 +#define WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x08000000 + +#define WINED3DPSHADECAPS_COLORFLATMONO 0x00000001 +#define WINED3DPSHADECAPS_COLORFLATRGB 0x00000002 +#define WINED3DPSHADECAPS_COLORGOURAUDMONO 0x00000004 +#define WINED3DPSHADECAPS_COLORGOURAUDRGB 0x00000008 +#define WINED3DPSHADECAPS_COLORPHONGMONO 0x00000010 +#define WINED3DPSHADECAPS_COLORPHONGRGB 0x00000020 +#define WINED3DPSHADECAPS_SPECULARFLATMONO 0x00000040 +#define WINED3DPSHADECAPS_SPECULARFLATRGB 0x00000080 +#define WINED3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100 +#define WINED3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200 +#define WINED3DPSHADECAPS_SPECULARPHONGMONO 0x00000400 +#define WINED3DPSHADECAPS_SPECULARPHONGRGB 0x00000800 +#define WINED3DPSHADECAPS_ALPHAFLATBLEND 0x00001000 +#define WINED3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000 +#define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000 +#define WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000 +#define WINED3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000 +#define WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000 +#define WINED3DPSHADECAPS_FOGFLAT 0x00040000 +#define WINED3DPSHADECAPS_FOGGOURAUD 0x00080000 +#define WINED3DPSHADECAPS_FOGPHONG 0x00100000 + +#define WINED3DPTEXTURECAPS_PERSPECTIVE 0x00000001 +#define WINED3DPTEXTURECAPS_POW2 0x00000002 +#define WINED3DPTEXTURECAPS_ALPHA 0x00000004 +#define WINED3DPTEXTURECAPS_TRANSPARENCY 0x00000008 +#define WINED3DPTEXTURECAPS_BORDER 0x00000010 +#define WINED3DPTEXTURECAPS_SQUAREONLY 0x00000020 +#define WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040 +#define WINED3DPTEXTURECAPS_ALPHAPALETTE 0x00000080 +#define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100 +#define WINED3DPTEXTURECAPS_PROJECTED 0x00000400 +#define WINED3DPTEXTURECAPS_CUBEMAP 0x00000800 +#define WINED3DPTEXTURECAPS_COLORKEYBLEND 0x00001000 +#define WINED3DPTEXTURECAPS_VOLUMEMAP 0x00002000 +#define WINED3DPTEXTURECAPS_MIPMAP 0x00004000 +#define WINED3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000 +#define WINED3DPTEXTURECAPS_MIPCUBEMAP 0x00010000 +#define WINED3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000 +#define WINED3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000 +#define WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x00200000 + +#define WINED3DPTFILTERCAPS_NEAREST 0x00000001 +#define WINED3DPTFILTERCAPS_LINEAR 0x00000002 +#define WINED3DPTFILTERCAPS_MIPNEAREST 0x00000004 +#define WINED3DPTFILTERCAPS_MIPLINEAR 0x00000008 +#define WINED3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010 +#define WINED3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020 +#define WINED3DPTFILTERCAPS_MINFPOINT 0x00000100 +#define WINED3DPTFILTERCAPS_MINFLINEAR 0x00000200 +#define WINED3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400 +#define WINED3DPTFILTERCAPS_MIPFPOINT 0x00010000 +#define WINED3DPTFILTERCAPS_MIPFLINEAR 0x00020000 +#define WINED3DPTFILTERCAPS_MAGFPOINT 0x01000000 +#define WINED3DPTFILTERCAPS_MAGFLINEAR 0x02000000 +#define WINED3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000 +#define WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x08000000 +#define WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000 + +#define WINED3DVTXPCAPS_TEXGEN 0x00000001 +#define WINED3DVTXPCAPS_MATERIALSOURCE7 0x00000002 +#define WINED3DVTXPCAPS_VERTEXFOG 0x00000004 +#define WINED3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008 +#define WINED3DVTXPCAPS_POSITIONALLIGHTS 0x00000010 +#define WINED3DVTXPCAPS_LOCALVIEWER 0x00000020 +#define WINED3DVTXPCAPS_TWEENING 0x00000040 +#define WINED3DVTXPCAPS_TEXGEN_SPHEREMAP 0x00000100 +#define WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x00000200 + +#define WINED3DCURSORCAPS_COLOR 0x00000001 +#define WINED3DCURSORCAPS_LOWRES 0x00000002 + +#define WINED3DDEVCAPS_FLOATTLVERTEX 0x00000001 +#define WINED3DDEVCAPS_SORTINCREASINGZ 0x00000002 +#define WINED3DDEVCAPS_SORTDECREASINGZ 0X00000004 +#define WINED3DDEVCAPS_SORTEXACT 0x00000008 +#define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010 +#define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020 +#define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040 +#define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080 +#define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100 +#define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200 +#define WINED3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400 +#define WINED3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800 +#define WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000 +#define WINED3DDEVCAPS_DRAWPRIMITIVES2 0x00002000 +#define WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000 +#define WINED3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000 +#define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000 +#define WINED3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000 +#define WINED3DDEVCAPS_HWRASTERIZATION 0x00080000 +#define WINED3DDEVCAPS_PUREDEVICE 0x00100000 +#define WINED3DDEVCAPS_QUINTICRTPATCHES 0x00200000 +#define WINED3DDEVCAPS_RTPATCHES 0x00400000 +#define WINED3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000 +#define WINED3DDEVCAPS_NPATCHES 0x01000000 + +/* dwDDFX */ +/* arithmetic stretching along y axis */ +#define WINEDDBLTFX_ARITHSTRETCHY 0x00000001 +/* mirror on y axis */ +#define WINEDDBLTFX_MIRRORLEFTRIGHT 0x00000002 +/* mirror on x axis */ +#define WINEDDBLTFX_MIRRORUPDOWN 0x00000004 +/* do not tear */ +#define WINEDDBLTFX_NOTEARING 0x00000008 +/* 180 degrees clockwise rotation */ +#define WINEDDBLTFX_ROTATE180 0x00000010 +/* 270 degrees clockwise rotation */ +#define WINEDDBLTFX_ROTATE270 0x00000020 +/* 90 degrees clockwise rotation */ +#define WINEDDBLTFX_ROTATE90 0x00000040 +/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */ +#define WINEDDBLTFX_ZBUFFERRANGE 0x00000080 +/* add dwZBufferBaseDest to every source z value before compare */ +#define WINEDDBLTFX_ZBUFFERBASEDEST 0x00000100 + +/* dwFlags for Blt* */ +#define WINEDDBLT_ALPHADEST 0x00000001 +#define WINEDDBLT_ALPHADESTCONSTOVERRIDE 0x00000002 +#define WINEDDBLT_ALPHADESTNEG 0x00000004 +#define WINEDDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008 +#define WINEDDBLT_ALPHAEDGEBLEND 0x00000010 +#define WINEDDBLT_ALPHASRC 0x00000020 +#define WINEDDBLT_ALPHASRCCONSTOVERRIDE 0x00000040 +#define WINEDDBLT_ALPHASRCNEG 0x00000080 +#define WINEDDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100 +#define WINEDDBLT_ASYNC 0x00000200 +#define WINEDDBLT_COLORFILL 0x00000400 +#define WINEDDBLT_DDFX 0x00000800 +#define WINEDDBLT_DDROPS 0x00001000 +#define WINEDDBLT_KEYDEST 0x00002000 +#define WINEDDBLT_KEYDESTOVERRIDE 0x00004000 +#define WINEDDBLT_KEYSRC 0x00008000 +#define WINEDDBLT_KEYSRCOVERRIDE 0x00010000 +#define WINEDDBLT_ROP 0x00020000 +#define WINEDDBLT_ROTATIONANGLE 0x00040000 +#define WINEDDBLT_ZBUFFER 0x00080000 +#define WINEDDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000 +#define WINEDDBLT_ZBUFFERDESTOVERRIDE 0x00200000 +#define WINEDDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000 +#define WINEDDBLT_ZBUFFERSRCOVERRIDE 0x00800000 +#define WINEDDBLT_WAIT 0x01000000 +#define WINEDDBLT_DEPTHFILL 0x02000000 +#define WINEDDBLT_DONOTWAIT 0x08000000 + +/* dwTrans for BltFast */ +#define WINEDDBLTFAST_NOCOLORKEY 0x00000000 +#define WINEDDBLTFAST_SRCCOLORKEY 0x00000001 +#define WINEDDBLTFAST_DESTCOLORKEY 0x00000002 +#define WINEDDBLTFAST_WAIT 0x00000010 +#define WINEDDBLTFAST_DONOTWAIT 0x00000020 + +/* DDSURFACEDESC.dwFlags */ +#define WINEDDSD_CAPS 0x00000001 +#define WINEDDSD_HEIGHT 0x00000002 +#define WINEDDSD_WIDTH 0x00000004 +#define WINEDDSD_PITCH 0x00000008 +#define WINEDDSD_BACKBUFFERCOUNT 0x00000020 +#define WINEDDSD_ZBUFFERBITDEPTH 0x00000040 +#define WINEDDSD_ALPHABITDEPTH 0x00000080 +#define WINEDDSD_LPSURFACE 0x00000800 +#define WINEDDSD_PIXELFORMAT 0x00001000 +#define WINEDDSD_CKDESTOVERLAY 0x00002000 +#define WINEDDSD_CKDESTBLT 0x00004000 +#define WINEDDSD_CKSRCOVERLAY 0x00008000 +#define WINEDDSD_CKSRCBLT 0x00010000 +#define WINEDDSD_MIPMAPCOUNT 0x00020000 +#define WINEDDSD_REFRESHRATE 0x00040000 +#define WINEDDSD_LINEARSIZE 0x00080000 +#define WINEDDSD_TEXTURESTAGE 0x00100000 +#define WINEDDSD_FVF 0x00200000 +#define WINEDDSD_SRCVBHANDLE 0x00400000 +#define WINEDDSD_ALL 0x007ff9ee + +/* Set/Get Colour Key Flags */ +#define WINEDDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */ +#define WINEDDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */ +#define WINEDDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */ +#define WINEDDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */ +#define WINEDDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */ + +/* dwFlags for GetBltStatus */ +#define WINEDDGBS_CANBLT 0x00000001 +#define WINEDDGBS_ISBLTDONE 0x00000002 + +/* dwFlags for GetFlipStatus */ +#define WINEDDGFS_CANFLIP 0x00000001 +#define WINEDDGFS_ISFLIPDONE 0x00000002 + +/* dwFlags for Flip */ +#define WINEDDFLIP_WAIT 0x00000001 +#define WINEDDFLIP_EVEN 0x00000002 /* only valid for overlay */ +#define WINEDDFLIP_ODD 0x00000004 /* only valid for overlay */ +#define WINEDDFLIP_NOVSYNC 0x00000008 +#define WINEDDFLIP_STEREO 0x00000010 +#define WINEDDFLIP_DONOTWAIT 0x00000020 +#define WINEDDFLIP_INTERVAL2 0x02000000 +#define WINEDDFLIP_INTERVAL3 0x03000000 +#define WINEDDFLIP_INTERVAL4 0x04000000 + +#define WINEDDOVER_ALPHADEST 0x00000001 +#define WINEDDOVER_ALPHADESTCONSTOVERRIDE 0x00000002 +#define WINEDDOVER_ALPHADESTNEG 0x00000004 +#define WINEDDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008 +#define WINEDDOVER_ALPHAEDGEBLEND 0x00000010 +#define WINEDDOVER_ALPHASRC 0x00000020 +#define WINEDDOVER_ALPHASRCCONSTOVERRIDE 0x00000040 +#define WINEDDOVER_ALPHASRCNEG 0x00000080 +#define WINEDDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100 +#define WINEDDOVER_HIDE 0x00000200 +#define WINEDDOVER_KEYDEST 0x00000400 +#define WINEDDOVER_KEYDESTOVERRIDE 0x00000800 +#define WINEDDOVER_KEYSRC 0x00001000 +#define WINEDDOVER_KEYSRCOVERRIDE 0x00002000 +#define WINEDDOVER_SHOW 0x00004000 +#define WINEDDOVER_ADDDIRTYRECT 0x00008000 +#define WINEDDOVER_REFRESHDIRTYRECTS 0x00010000 +#define WINEDDOVER_REFRESHALL 0x00020000 +#define WINEDDOVER_DDFX 0x00080000 +#define WINEDDOVER_AUTOFLIP 0x00100000 +#define WINEDDOVER_BOB 0x00200000 +#define WINEDDOVER_OVERRIDEBOBWEAVE 0x00400000 +#define WINEDDOVER_INTERLEAVED 0x00800000 + +/* DirectDraw Caps */ +#define WINEDDSCAPS_RESERVED1 0x00000001 +#define WINEDDSCAPS_ALPHA 0x00000002 +#define WINEDDSCAPS_BACKBUFFER 0x00000004 +#define WINEDDSCAPS_COMPLEX 0x00000008 +#define WINEDDSCAPS_FLIP 0x00000010 +#define WINEDDSCAPS_FRONTBUFFER 0x00000020 +#define WINEDDSCAPS_OFFSCREENPLAIN 0x00000040 +#define WINEDDSCAPS_OVERLAY 0x00000080 +#define WINEDDSCAPS_PALETTE 0x00000100 +#define WINEDDSCAPS_PRIMARYSURFACE 0x00000200 +#define WINEDDSCAPS_PRIMARYSURFACELEFT 0x00000400 +#define WINEDDSCAPS_SYSTEMMEMORY 0x00000800 +#define WINEDDSCAPS_TEXTURE 0x00001000 +#define WINEDDSCAPS_3DDEVICE 0x00002000 +#define WINEDDSCAPS_VIDEOMEMORY 0x00004000 +#define WINEDDSCAPS_VISIBLE 0x00008000 +#define WINEDDSCAPS_WRITEONLY 0x00010000 +#define WINEDDSCAPS_ZBUFFER 0x00020000 +#define WINEDDSCAPS_OWNDC 0x00040000 +#define WINEDDSCAPS_LIVEVIDEO 0x00080000 +#define WINEDDSCAPS_HWCODEC 0x00100000 +#define WINEDDSCAPS_MODEX 0x00200000 +#define WINEDDSCAPS_MIPMAP 0x00400000 +#define WINEDDSCAPS_RESERVED2 0x00800000 +#define WINEDDSCAPS_ALLOCONLOAD 0x04000000 +#define WINEDDSCAPS_VIDEOPORT 0x08000000 +#define WINEDDSCAPS_LOCALVIDMEM 0x10000000 +#define WINEDDSCAPS_NONLOCALVIDMEM 0x20000000 +#define WINEDDSCAPS_STANDARDVGAMODE 0x40000000 +#define WINEDDSCAPS_OPTIMIZED 0x80000000 + +#define WINEDDCKEYCAPS_DESTBLT 0x00000001 +#define WINEDDCKEYCAPS_DESTBLTCLRSPACE 0x00000002 +#define WINEDDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004 +#define WINEDDCKEYCAPS_DESTBLTYUV 0x00000008 +#define WINEDDCKEYCAPS_DESTOVERLAY 0x00000010 +#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020 +#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040 +#define WINEDDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080 +#define WINEDDCKEYCAPS_DESTOVERLAYYUV 0x00000100 +#define WINEDDCKEYCAPS_SRCBLT 0x00000200 +#define WINEDDCKEYCAPS_SRCBLTCLRSPACE 0x00000400 +#define WINEDDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800 +#define WINEDDCKEYCAPS_SRCBLTYUV 0x00001000 +#define WINEDDCKEYCAPS_SRCOVERLAY 0x00002000 +#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000 +#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000 +#define WINEDDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000 +#define WINEDDCKEYCAPS_SRCOVERLAYYUV 0x00020000 +#define WINEDDCKEYCAPS_NOCOSTOVERLAY 0x00040000 + +#define WINEDDFXCAPS_BLTALPHA 0x00000001 +#define WINEDDFXCAPS_OVERLAYALPHA 0x00000004 +#define WINEDDFXCAPS_BLTARITHSTRETCHYN 0x00000010 +#define WINEDDFXCAPS_BLTARITHSTRETCHY 0x00000020 +#define WINEDDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040 +#define WINEDDFXCAPS_BLTMIRRORUPDOWN 0x00000080 +#define WINEDDFXCAPS_BLTROTATION 0x00000100 +#define WINEDDFXCAPS_BLTROTATION90 0x00000200 +#define WINEDDFXCAPS_BLTSHRINKX 0x00000400 +#define WINEDDFXCAPS_BLTSHRINKXN 0x00000800 +#define WINEDDFXCAPS_BLTSHRINKY 0x00001000 +#define WINEDDFXCAPS_BLTSHRINKYN 0x00002000 +#define WINEDDFXCAPS_BLTSTRETCHX 0x00004000 +#define WINEDDFXCAPS_BLTSTRETCHXN 0x00008000 +#define WINEDDFXCAPS_BLTSTRETCHY 0x00010000 +#define WINEDDFXCAPS_BLTSTRETCHYN 0x00020000 +#define WINEDDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000 +#define WINEDDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008 +#define WINEDDFXCAPS_OVERLAYSHRINKX 0x00080000 +#define WINEDDFXCAPS_OVERLAYSHRINKXN 0x00100000 +#define WINEDDFXCAPS_OVERLAYSHRINKY 0x00200000 +#define WINEDDFXCAPS_OVERLAYSHRINKYN 0x00400000 +#define WINEDDFXCAPS_OVERLAYSTRETCHX 0x00800000 +#define WINEDDFXCAPS_OVERLAYSTRETCHXN 0x01000000 +#define WINEDDFXCAPS_OVERLAYSTRETCHY 0x02000000 +#define WINEDDFXCAPS_OVERLAYSTRETCHYN 0x04000000 +#define WINEDDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000 +#define WINEDDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000 + +#define WINEDDCAPS_3D 0x00000001 +#define WINEDDCAPS_ALIGNBOUNDARYDEST 0x00000002 +#define WINEDDCAPS_ALIGNSIZEDEST 0x00000004 +#define WINEDDCAPS_ALIGNBOUNDARYSRC 0x00000008 +#define WINEDDCAPS_ALIGNSIZESRC 0x00000010 +#define WINEDDCAPS_ALIGNSTRIDE 0x00000020 +#define WINEDDCAPS_BLT 0x00000040 +#define WINEDDCAPS_BLTQUEUE 0x00000080 +#define WINEDDCAPS_BLTFOURCC 0x00000100 +#define WINEDDCAPS_BLTSTRETCH 0x00000200 +#define WINEDDCAPS_GDI 0x00000400 +#define WINEDDCAPS_OVERLAY 0x00000800 +#define WINEDDCAPS_OVERLAYCANTCLIP 0x00001000 +#define WINEDDCAPS_OVERLAYFOURCC 0x00002000 +#define WINEDDCAPS_OVERLAYSTRETCH 0x00004000 +#define WINEDDCAPS_PALETTE 0x00008000 +#define WINEDDCAPS_PALETTEVSYNC 0x00010000 +#define WINEDDCAPS_READSCANLINE 0x00020000 +#define WINEDDCAPS_STEREOVIEW 0x00040000 +#define WINEDDCAPS_VBI 0x00080000 +#define WINEDDCAPS_ZBLTS 0x00100000 +#define WINEDDCAPS_ZOVERLAYS 0x00200000 +#define WINEDDCAPS_COLORKEY 0x00400000 +#define WINEDDCAPS_ALPHA 0x00800000 +#define WINEDDCAPS_COLORKEYHWASSIST 0x01000000 +#define WINEDDCAPS_NOHARDWARE 0x02000000 +#define WINEDDCAPS_BLTCOLORFILL 0x04000000 +#define WINEDDCAPS_BANKSWITCHED 0x08000000 +#define WINEDDCAPS_BLTDEPTHFILL 0x10000000 +#define WINEDDCAPS_CANCLIP 0x20000000 +#define WINEDDCAPS_CANCLIPSTRETCHED 0x40000000 +#define WINEDDCAPS_CANBLTSYSMEM 0x80000000 + +#define WINEDDCAPS2_CERTIFIED 0x00000001 +#define WINEDDCAPS2_NO2DDURING3DSCENE 0x00000002 +#define WINEDDCAPS2_VIDEOPORT 0x00000004 +#define WINEDDCAPS2_AUTOFLIPOVERLAY 0x00000008 +#define WINEDDCAPS2_CANBOBINTERLEAVED 0x00000010 +#define WINEDDCAPS2_CANBOBNONINTERLEAVED 0x00000020 +#define WINEDDCAPS2_COLORCONTROLOVERLAY 0x00000040 +#define WINEDDCAPS2_COLORCONTROLPRIMARY 0x00000080 +#define WINEDDCAPS2_CANDROPZ16BIT 0x00000100 +#define WINEDDCAPS2_NONLOCALVIDMEM 0x00000200 +#define WINEDDCAPS2_NONLOCALVIDMEMCAPS 0x00000400 +#define WINEDDCAPS2_NOPAGELOCKREQUIRED 0x00000800 +#define WINEDDCAPS2_WIDESURFACES 0x00001000 +#define WINEDDCAPS2_CANFLIPODDEVEN 0x00002000 +#define WINEDDCAPS2_CANBOBHARDWARE 0x00004000 +#define WINEDDCAPS2_COPYFOURCC 0x00008000 +#define WINEDDCAPS2_PRIMARYGAMMA 0x00020000 +#define WINEDDCAPS2_CANRENDERWINDOWED 0x00080000 +#define WINEDDCAPS2_CANCALIBRATEGAMMA 0x00100000 +#define WINEDDCAPS2_FLIPINTERVAL 0x00200000 +#define WINEDDCAPS2_FLIPNOVSYNC 0x00400000 +#define WINEDDCAPS2_CANMANAGETEXTURE 0x00800000 +#define WINEDDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000 +#define WINEDDCAPS2_STEREO 0x02000000 +#define WINEDDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000 + +/* DDCAPS.d */ +#define WINEDDPCAPS_4BIT 0x00000001 +#define WINEDDPCAPS_8BITENTRIES 0x00000002 +#define WINEDDPCAPS_8BIT 0x00000004 +#define WINEDDPCAPS_INITIALIZE 0x00000008 +#define WINEDDPCAPS_PRIMARYSURFACE 0x00000010 +#define WINEDDPCAPS_PRIMARYSURFACELEFT 0x00000020 +#define WINEDDPCAPS_ALLOW256 0x00000040 +#define WINEDDPCAPS_VSYNC 0x00000080 +#define WINEDDPCAPS_1BIT 0x00000100 +#define WINEDDPCAPS_2BIT 0x00000200 +#define WINEDDPCAPS_ALPHA 0x00000400 + +typedef struct _WINED3DDISPLAYMODE +{ + UINT Width; + UINT Height; + UINT RefreshRate; + enum wined3d_format_id Format; +} WINED3DDISPLAYMODE; + +typedef struct _WINED3DCOLORVALUE +{ + float r; + float g; + float b; + float a; +} WINED3DCOLORVALUE; + +typedef struct _WINED3DVECTOR +{ + float x; + float y; + float z; +} WINED3DVECTOR; + +typedef struct _WINED3DMATRIX +{ + union + { + struct + { + float _11, _12, _13, _14; + float _21, _22, _23, _24; + float _31, _32, _33, _34; + float _41, _42, _43, _44; + } DUMMYSTRUCTNAME; + float m[4][4]; + } DUMMYUNIONNAME; +} WINED3DMATRIX; + +typedef struct _WINED3DLIGHT +{ + WINED3DLIGHTTYPE Type; + WINED3DCOLORVALUE Diffuse; + WINED3DCOLORVALUE Specular; + WINED3DCOLORVALUE Ambient; + WINED3DVECTOR Position; + WINED3DVECTOR Direction; + float Range; + float Falloff; + float Attenuation0; + float Attenuation1; + float Attenuation2; + float Theta; + float Phi; +} WINED3DLIGHT; + +typedef struct _WINED3DMATERIAL +{ + WINED3DCOLORVALUE Diffuse; + WINED3DCOLORVALUE Ambient; + WINED3DCOLORVALUE Specular; + WINED3DCOLORVALUE Emissive; + float Power; +} WINED3DMATERIAL; + +typedef struct _WINED3DVIEWPORT +{ + DWORD X; + DWORD Y; + DWORD Width; + DWORD Height; + float MinZ; + float MaxZ; +} WINED3DVIEWPORT; + +typedef struct _WINED3DGAMMARAMP +{ + WORD red[256]; + WORD green[256]; + WORD blue[256]; +} WINED3DGAMMARAMP; + +typedef struct _WINED3DLINEPATTERN +{ + WORD wRepeatFactor; + WORD wLinePattern; +} WINED3DLINEPATTERN; + +typedef struct _WINEDD3DRECTPATCH_INFO +{ + UINT StartVertexOffsetWidth; + UINT StartVertexOffsetHeight; + UINT Width; + UINT Height; + UINT Stride; + WINED3DBASISTYPE Basis; + WINED3DDEGREETYPE Degree; +} WINED3DRECTPATCH_INFO; + +typedef struct _WINED3DTRIPATCH_INFO +{ + UINT StartVertexOffset; + UINT NumVertices; + WINED3DBASISTYPE Basis; + WINED3DDEGREETYPE Degree; +} WINED3DTRIPATCH_INFO; + +typedef struct _WINED3DADAPTER_IDENTIFIER +{ + char *driver; + UINT driver_size; + char *description; + UINT description_size; + char *device_name; + UINT device_name_size; + LARGE_INTEGER driver_version; + DWORD vendor_id; + DWORD device_id; + DWORD subsystem_id; + DWORD revision; + GUID device_identifier; + DWORD whql_level; + LUID adapter_luid; + SIZE_T video_memory; +} WINED3DADAPTER_IDENTIFIER; + +typedef struct _WINED3DPRESENT_PARAMETERS +{ + UINT BackBufferWidth; + UINT BackBufferHeight; + enum wined3d_format_id BackBufferFormat; + UINT BackBufferCount; + WINED3DMULTISAMPLE_TYPE MultiSampleType; + DWORD MultiSampleQuality; + WINED3DSWAPEFFECT SwapEffect; + HWND hDeviceWindow; + BOOL Windowed; + BOOL EnableAutoDepthStencil; + enum wined3d_format_id AutoDepthStencilFormat; + DWORD Flags; + UINT FullScreen_RefreshRateInHz; + UINT PresentationInterval; + BOOL AutoRestoreDisplayMode; +} WINED3DPRESENT_PARAMETERS; + +struct wined3d_resource_desc +{ + WINED3DRESOURCETYPE resource_type; + enum wined3d_format_id format; + WINED3DMULTISAMPLE_TYPE multisample_type; + UINT multisample_quality; + DWORD usage; + WINED3DPOOL pool; + UINT width; + UINT height; + UINT depth; + UINT size; +}; + +typedef struct _WINED3DCLIPSTATUS +{ + DWORD ClipUnion; + DWORD ClipIntersection; +} WINED3DCLIPSTATUS; + +typedef struct _WINED3DVERTEXELEMENT +{ + enum wined3d_format_id format; + WORD input_slot; + WORD offset; + UINT output_slot; /* D3D 8 & 10 */ + BYTE method; + BYTE usage; + BYTE usage_idx; +} WINED3DVERTEXELEMENT; + +typedef struct _WINED3DDEVICE_CREATION_PARAMETERS +{ + UINT AdapterOrdinal; + WINED3DDEVTYPE DeviceType; + HWND hFocusWindow; + DWORD BehaviorFlags; +} WINED3DDEVICE_CREATION_PARAMETERS; + +typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS +{ + float MaxBandwidthUtilized; + float FrontEndUploadMemoryUtilizedPercent; + float VertexRateUtilizedPercent; + float TriangleSetupRateUtilizedPercent; + float FillRateUtilizedPercent; +} WINED3DDEVINFO_BANDWIDTHTIMINGS; + +typedef struct _WINED3DDEVINFO_CACHEUTILIZATION +{ + float TextureCacheHitRate; + float PostTransformVertexCacheHitRate; +} WINED3DDEVINFO_CACHEUTILIZATION; + +typedef struct _WINED3DDEVINFO_INTERFACETIMINGS +{ + float WaitingForGPUToUseApplicationResourceTimePercent; + float WaitingForGPUToAcceptMoreCommandsTimePercent; + float WaitingForGPUToStayWithinLatencyTimePercent; + float WaitingForGPUExclusiveResourceTimePercent; + float WaitingForGPUOtherTimePercent; +} WINED3DDEVINFO_INTERFACETIMINGS; + +typedef struct _WINED3DDEVINFO_PIPELINETIMINGS +{ + float VertexProcessingTimePercent; + float PixelProcessingTimePercent; + float OtherGPUProcessingTimePercent; + float GPUIdleTimePercent; +} WINED3DDEVINFO_PIPELINETIMINGS; + +typedef struct _WINED3DDEVINFO_STAGETIMINGS +{ + float MemoryProcessingPercent; + float ComputationProcessingPercent; +} WINED3DDEVINFO_STAGETIMINGS; + +typedef struct _WINED3DRASTER_STATUS +{ + BOOL InVBlank; + UINT ScanLine; +} WINED3DRASTER_STATUS; + +typedef struct WINED3DRESOURCESTATS +{ + BOOL bThrashing; + DWORD ApproxBytesDownloaded; + DWORD NumEvicts; + DWORD NumVidCreates; + DWORD LastPri; + DWORD NumUsed; + DWORD NumUsedInVidMem; + DWORD WorkingSet; + DWORD WorkingSetBytes; + DWORD TotalManaged; + DWORD TotalBytes; +} WINED3DRESOURCESTATS; + +typedef struct _WINED3DDEVINFO_RESOURCEMANAGER +{ + WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT]; +} WINED3DDEVINFO_RESOURCEMANAGER; + +typedef struct _WINED3DDEVINFO_VERTEXSTATS +{ + DWORD NumRenderedTriangles; + DWORD NumExtraClippingTriangles; +} WINED3DDEVINFO_VERTEXSTATS; + +typedef struct _WINED3DLOCKED_RECT +{ + INT Pitch; + void *pBits; +} WINED3DLOCKED_RECT; + +typedef struct _WINED3DLOCKED_BOX +{ + INT RowPitch; + INT SlicePitch; + void *pBits; +} WINED3DLOCKED_BOX; + +typedef struct _WINED3DBOX +{ + UINT Left; + UINT Top; + UINT Right; + UINT Bottom; + UINT Front; + UINT Back; +} WINED3DBOX; + +/*Vertex cache optimization hints.*/ +typedef struct WINED3DDEVINFO_VCACHE +{ + DWORD Pattern; /* Must be a 4 char code FOURCC (e.g. CACH) */ + DWORD OptMethod; /* 0 to get the longest strips, 1 vertex cache */ + DWORD CacheSize; /* Cache size to use (only valid if OptMethod==1) */ + DWORD MagicNumber; /* Internal for deciding when to restart strips, + non user modifiable (only valid if OptMethod==1) */ +} WINED3DDEVINFO_VCACHE; + +typedef struct WineDirect3DStridedData +{ + enum wined3d_format_id format; /* Format of the data */ + const BYTE *lpData; /* Pointer to start of data */ + DWORD dwStride; /* Stride between occurrences of this data */ +} WineDirect3DStridedData; + +typedef struct WineDirect3DVertexStridedData +{ + WineDirect3DStridedData position; + WineDirect3DStridedData normal; + WineDirect3DStridedData diffuse; + WineDirect3DStridedData specular; + WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD]; + BOOL position_transformed; +} WineDirect3DVertexStridedData; + +typedef struct _WINED3DVSHADERCAPS2_0 +{ + DWORD Caps; + INT DynamicFlowControlDepth; + INT NumTemps; + INT StaticFlowControlDepth; +} WINED3DVSHADERCAPS2_0; + +typedef struct _WINED3DPSHADERCAPS2_0 +{ + DWORD Caps; + INT DynamicFlowControlDepth; + INT NumTemps; + INT StaticFlowControlDepth; + INT NumInstructionSlots; +} WINED3DPSHADERCAPS2_0; + +typedef struct _WINEDDCAPS +{ + DWORD Caps; + DWORD Caps2; + DWORD CKeyCaps; + DWORD FXCaps; + DWORD FXAlphaCaps; + DWORD PalCaps; + DWORD SVCaps; + DWORD SVBCaps; + DWORD SVBCKeyCaps; + DWORD SVBFXCaps; + DWORD VSBCaps; + DWORD VSBCKeyCaps; + DWORD VSBFXCaps; + DWORD SSBCaps; + DWORD SSBCKeyCaps; + DWORD SSBFXCaps; + DWORD ddsCaps; + DWORD StrideAlign; +} WINEDDCAPS; + +typedef struct _WINED3DCAPS +{ + WINED3DDEVTYPE DeviceType; + UINT AdapterOrdinal; + + DWORD Caps; + DWORD Caps2; + DWORD Caps3; + DWORD PresentationIntervals; + + DWORD CursorCaps; + DWORD DevCaps; + DWORD PrimitiveMiscCaps; + DWORD RasterCaps; + DWORD ZCmpCaps; + DWORD SrcBlendCaps; + DWORD DestBlendCaps; + DWORD AlphaCmpCaps; + DWORD ShadeCaps; + DWORD TextureCaps; + DWORD TextureFilterCaps; + DWORD CubeTextureFilterCaps; + DWORD VolumeTextureFilterCaps; + DWORD TextureAddressCaps; + DWORD VolumeTextureAddressCaps; + DWORD LineCaps; + + DWORD MaxTextureWidth; + DWORD MaxTextureHeight; + DWORD MaxVolumeExtent; + DWORD MaxTextureRepeat; + DWORD MaxTextureAspectRatio; + DWORD MaxAnisotropy; + float MaxVertexW; + + float GuardBandLeft; + float GuardBandTop; + float GuardBandRight; + float GuardBandBottom; + + float ExtentsAdjust; + DWORD StencilCaps; + + DWORD FVFCaps; + DWORD TextureOpCaps; + DWORD MaxTextureBlendStages; + DWORD MaxSimultaneousTextures; + + DWORD VertexProcessingCaps; + DWORD MaxActiveLights; + DWORD MaxUserClipPlanes; + DWORD MaxVertexBlendMatrices; + DWORD MaxVertexBlendMatrixIndex; + + float MaxPointSize; + + DWORD MaxPrimitiveCount; + DWORD MaxVertexIndex; + DWORD MaxStreams; + DWORD MaxStreamStride; + + DWORD VertexShaderVersion; + DWORD MaxVertexShaderConst; + + DWORD PixelShaderVersion; + float PixelShader1xMaxValue; + + /* DX 9 */ + DWORD DevCaps2; + + float MaxNpatchTessellationLevel; + DWORD Reserved5; /* undocumented */ + + UINT MasterAdapterOrdinal; + UINT AdapterOrdinalInGroup; + UINT NumberOfAdaptersInGroup; + DWORD DeclTypes; + DWORD NumSimultaneousRTs; + DWORD StretchRectFilterCaps; + WINED3DVSHADERCAPS2_0 VS20Caps; + WINED3DPSHADERCAPS2_0 PS20Caps; + DWORD VertexTextureFilterCaps; + DWORD MaxVShaderInstructionsExecuted; + DWORD MaxPShaderInstructionsExecuted; + DWORD MaxVertexShader30InstructionSlots; + DWORD MaxPixelShader30InstructionSlots; + DWORD Reserved2; /* Not in the microsoft headers but documented */ + DWORD Reserved3; + + WINEDDCAPS DirectDrawCaps; +} WINED3DCAPS; + +/* DirectDraw types */ + +typedef struct _WINEDDCOLORKEY +{ + DWORD dwColorSpaceLowValue; /* low boundary of color space that is to + * be treated as Color Key, inclusive */ + DWORD dwColorSpaceHighValue; /* high boundary of color space that is + * to be treated as Color Key, inclusive */ +} WINEDDCOLORKEY,*LPWINEDDCOLORKEY; + +typedef struct _WINEDDBLTFX +{ + DWORD dwSize; /* size of structure */ + DWORD dwDDFX; /* FX operations */ + DWORD dwROP; /* Win32 raster operations */ + DWORD dwDDROP; /* Raster operations new for DirectDraw */ + DWORD dwRotationAngle; /* Rotation angle for blt */ + DWORD dwZBufferOpCode; /* ZBuffer compares */ + DWORD dwZBufferLow; /* Low limit of Z buffer */ + DWORD dwZBufferHigh; /* High limit of Z buffer */ + DWORD dwZBufferBaseDest; /* Destination base value */ + DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */ + union + { + DWORD dwZDestConst; /* Constant to use as Z buffer for dest */ + struct wined3d_surface *lpDDSZBufferDest; /* Surface to use as Z buffer for dest */ + } DUMMYUNIONNAME1; + DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */ + union + { + DWORD dwZSrcConst; /* Constant to use as Z buffer for src */ + struct wined3d_surface *lpDDSZBufferSrc; /* Surface to use as Z buffer for src */ + } DUMMYUNIONNAME2; + DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ + DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */ + DWORD dwReserved; + DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ + union + { + DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */ + struct wined3d_surface *lpDDSAlphaDest; /* Surface to use as Alpha Channel */ + } DUMMYUNIONNAME3; + DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ + union + { + DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */ + struct wined3d_surface *lpDDSAlphaSrc; /* Surface to use as Alpha Channel */ + } DUMMYUNIONNAME4; + union + { + DWORD dwFillColor; /* color in RGB or Palettized */ + DWORD dwFillDepth; /* depth value for z-buffer */ + DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */ + struct wined3d_surface *lpDDSPattern; /* Surface to use as pattern */ + } DUMMYUNIONNAME5; + WINEDDCOLORKEY ddckDestColorkey; /* DestColorkey override */ + WINEDDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */ +} WINEDDBLTFX,*LPWINEDDBLTFX; + +typedef struct _WINEDDOVERLAYFX +{ + DWORD dwSize; /* size of structure */ + DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ + DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */ + DWORD dwReserved; + DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ + union + { + DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */ + struct wined3d_surface *lpDDSAlphaDest; /* Surface to use as alpha channel for dest */ + } DUMMYUNIONNAME1; + DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ + union + { + DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */ + struct wined3d_surface *lpDDSAlphaSrc; /* Surface to use as alpha channel for src */ + } DUMMYUNIONNAME2; + WINEDDCOLORKEY dckDestColorkey; /* DestColorkey override */ + WINEDDCOLORKEY dckSrcColorkey; /* SrcColorkey override */ + DWORD dwDDFX; /* Overlay FX */ + DWORD dwFlags; /* flags */ +} WINEDDOVERLAYFX; + +struct wined3d_buffer_desc +{ + UINT byte_width; + DWORD usage; + UINT bind_flags; + UINT cpu_access_flags; + UINT misc_flags; +}; + +struct wined3d_shader_signature_element +{ + const char *semantic_name; + UINT semantic_idx; + enum wined3d_sysval_semantic sysval_semantic; + DWORD component_type; + UINT register_idx; + DWORD mask; +}; + +struct wined3d_shader_signature +{ + UINT element_count; + struct wined3d_shader_signature_element *elements; + char *string_data; +}; + +struct wined3d_parent_ops +{ + void (__stdcall *wined3d_object_destroyed)(void *parent); +}; + +struct wined3d; +struct wined3d_buffer; +struct wined3d_clipper; +struct wined3d_device; +struct wined3d_palette; +struct wined3d_query; +struct wined3d_rendertarget_view; +struct wined3d_resource; +struct wined3d_shader; +struct wined3d_stateblock; +struct wined3d_surface; +struct wined3d_swapchain; +struct wined3d_texture; +struct wined3d_vertex_declaration; +struct wined3d_volume; + +struct wined3d_device_parent +{ + const struct wined3d_device_parent_ops *ops; +}; + +struct wined3d_device_parent_ops +{ + void (__cdecl *wined3d_device_created)(struct wined3d_device_parent *device_parent, struct wined3d_device *device); + HRESULT (__cdecl *create_surface)(struct wined3d_device_parent *device_parent, void *container_parent, + UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage, WINED3DPOOL pool, + UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface); + HRESULT (__cdecl *create_rendertarget)(struct wined3d_device_parent *device_parent, void *container_parent, + UINT width, UINT height, enum wined3d_format_id format_id, WINED3DMULTISAMPLE_TYPE multisample_type, + DWORD multisample_quality, BOOL lockable, struct wined3d_surface **surface); + HRESULT (__cdecl *create_depth_stencil)(struct wined3d_device_parent *device_parent, + UINT width, UINT height, enum wined3d_format_id format_id, WINED3DMULTISAMPLE_TYPE multisample_type, + DWORD multisample_quality, BOOL discard, struct wined3d_surface **surface); + HRESULT (__cdecl *create_volume)(struct wined3d_device_parent *device_parent, void *container_parent, + UINT width, UINT height, UINT depth, enum wined3d_format_id format_id, WINED3DPOOL pool, DWORD usage, + struct wined3d_volume **volume); + HRESULT (__cdecl *create_swapchain)(struct wined3d_device_parent *device_parent, + WINED3DPRESENT_PARAMETERS *present_parameters, struct wined3d_swapchain **swapchain); +}; + +typedef HRESULT (__stdcall *D3DCB_ENUMRESOURCES)(struct wined3d_resource *resource, void *pData); + +void __stdcall wined3d_mutex_lock(void); +void __stdcall wined3d_mutex_unlock(void); + +HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, + enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id); +HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT adaper_idx, + WINED3DDEVTYPE device_type, enum wined3d_format_id adapter_format_id, DWORD usage, + WINED3DRESOURCETYPE resource_type, enum wined3d_format_id check_format_id, + WINED3DSURFTYPE surface_type); +HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, enum wined3d_format_id source_format_id, + enum wined3d_format_id target_format_id); +HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, enum wined3d_format_id surface_format_id, BOOL windowed, + WINED3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels); +HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, enum wined3d_format_id display_format_id, + enum wined3d_format_id backbuffer_format_id, BOOL windowed); +struct wined3d * __cdecl wined3d_create(UINT dxVersion, void *parent); +ULONG __cdecl wined3d_decref(struct wined3d *wined3d); +HRESULT __cdecl wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT adapter_idx, + enum wined3d_format_id format_id, UINT mode_idx, WINED3DDISPLAYMODE *mode); +UINT __cdecl wined3d_get_adapter_count(const struct wined3d *wined3d); +HRESULT __cdecl wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDISPLAYMODE *mode); +HRESULT __cdecl wined3d_get_adapter_identifier(const struct wined3d *wined3d, UINT adapter_idx, + DWORD flags, WINED3DADAPTER_IDENTIFIER *identifier); +UINT __cdecl wined3d_get_adapter_mode_count(const struct wined3d *wined3d, + UINT adapter_idx, enum wined3d_format_id format_id); +HMONITOR __cdecl wined3d_get_adapter_monitor(const struct wined3d *wined3d, UINT adapter_idx); +HRESULT __cdecl wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, WINED3DCAPS *caps); +void * __cdecl wined3d_get_parent(const struct wined3d *wined3d); +ULONG __cdecl wined3d_incref(struct wined3d *wined3d); +HRESULT __cdecl wined3d_register_software_device(struct wined3d *wined3d, void *init_function); + +HRESULT __cdecl wined3d_buffer_create(struct wined3d_device *device, struct wined3d_buffer_desc *desc, + const void *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer); +HRESULT __cdecl wined3d_buffer_create_ib(struct wined3d_device *device, UINT length, DWORD usage, WINED3DPOOL pool, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer); +HRESULT __cdecl wined3d_buffer_create_vb(struct wined3d_device *device, UINT length, DWORD usage, WINED3DPOOL pool, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer); +ULONG __cdecl wined3d_buffer_decref(struct wined3d_buffer *buffer); +HRESULT __cdecl wined3d_buffer_free_private_data(struct wined3d_buffer *buffer, REFGUID guid); +void * __cdecl wined3d_buffer_get_parent(const struct wined3d_buffer *buffer); +DWORD __cdecl wined3d_buffer_get_priority(const struct wined3d_buffer *buffer); +HRESULT __cdecl wined3d_buffer_get_private_data(const struct wined3d_buffer *buffer, + REFGUID guid, void *data, DWORD *data_size); +struct wined3d_resource * __cdecl wined3d_buffer_get_resource(struct wined3d_buffer *buffer); +ULONG __cdecl wined3d_buffer_incref(struct wined3d_buffer *buffer); +HRESULT __cdecl wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UINT size, BYTE **data, DWORD flags); +void __cdecl wined3d_buffer_preload(struct wined3d_buffer *buffer); +DWORD __cdecl wined3d_buffer_set_priority(struct wined3d_buffer *buffer, DWORD new_priority); +HRESULT __cdecl wined3d_buffer_set_private_data(struct wined3d_buffer *buffer, + REFGUID guid, const void *data, DWORD data_size, DWORD flags); +void __cdecl wined3d_buffer_unmap(struct wined3d_buffer *buffer); + +struct wined3d_clipper * __cdecl wined3d_clipper_create(void); +ULONG __cdecl wined3d_clipper_decref(struct wined3d_clipper *clipper); +HRESULT __cdecl wined3d_clipper_get_clip_list(const struct wined3d_clipper *clipper, + const RECT *rect, RGNDATA *clip_list, DWORD *clip_list_size); +HRESULT __cdecl wined3d_clipper_get_window(const struct wined3d_clipper *clipper, HWND *hwnd); +ULONG __cdecl wined3d_clipper_incref(struct wined3d_clipper *clipper); +HRESULT __cdecl wined3d_clipper_is_clip_list_changed(const struct wined3d_clipper *clipper, BOOL *changed); +HRESULT __cdecl wined3d_clipper_set_clip_list(struct wined3d_clipper *clipper, const RGNDATA *clip_list, DWORD flags); +HRESULT __cdecl wined3d_clipper_set_window(struct wined3d_clipper *clipper, DWORD flags, HWND hwnd); + +HRESULT __cdecl wined3d_device_acquire_focus_window(struct wined3d_device *device, HWND window); +HRESULT __cdecl wined3d_device_begin_scene(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_begin_stateblock(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_clear(struct wined3d_device *device, DWORD rect_count, const RECT *rects, DWORD flags, + WINED3DCOLOR color, float z, DWORD stencil); +void __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *device, + struct wined3d_rendertarget_view *rendertarget_view, const WINED3DCOLORVALUE *color); +HRESULT __cdecl wined3d_device_color_fill(struct wined3d_device *device, struct wined3d_surface *surface, + const RECT *rect, const WINED3DCOLORVALUE *color); +HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, + WINED3DDEVTYPE device_type, HWND focus_window, DWORD behaviour_flags, + struct wined3d_device_parent *device_parent, struct wined3d_device **device); +ULONG __cdecl wined3d_device_decref(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_delete_patch(struct wined3d_device *device, UINT handle); +HRESULT __cdecl wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count); +HRESULT __cdecl wined3d_device_draw_indexed_primitive_strided(struct wined3d_device *device, UINT index_count, + const WineDirect3DVertexStridedData *strided_data, UINT vertex_count, const void *index_data, + enum wined3d_format_id index_data_format_id); +HRESULT __cdecl wined3d_device_draw_indexed_primitive_up(struct wined3d_device *device, + UINT index_count, const void *index_data, enum wined3d_format_id index_data_format_id, + const void *stream_data, UINT stream_stride); +HRESULT __cdecl wined3d_device_draw_primitive(struct wined3d_device *device, UINT start_vertex, UINT vertex_count); +HRESULT __cdecl wined3d_device_draw_primitive_strided(struct wined3d_device *device, + UINT vertex_count, const WineDirect3DVertexStridedData *strided_data); +HRESULT __cdecl wined3d_device_draw_primitive_up(struct wined3d_device *device, + UINT vertex_count, const void *stream_data, UINT stream_stride); +HRESULT __cdecl wined3d_device_draw_rect_patch(struct wined3d_device *device, UINT handle, + const float *num_segs, const WINED3DRECTPATCH_INFO *rect_patch_info); +HRESULT __cdecl wined3d_device_draw_tri_patch(struct wined3d_device *device, UINT handle, + const float *num_segs, const WINED3DTRIPATCH_INFO *tri_patch_info); +HRESULT __cdecl wined3d_device_end_scene(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_end_stateblock(struct wined3d_device *device, struct wined3d_stateblock **stateblock); +HRESULT __cdecl wined3d_device_enum_resources(struct wined3d_device *device, D3DCB_ENUMRESOURCES callback, void *data); +HRESULT __cdecl wined3d_device_evict_managed_resources(struct wined3d_device *device); +UINT __cdecl wined3d_device_get_available_texture_mem(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_get_back_buffer(struct wined3d_device *device, UINT swapchain_idx, + UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, struct wined3d_surface **backbuffer); +INT __cdecl wined3d_device_get_base_vertex_index(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_get_clip_plane(struct wined3d_device *device, UINT plane_idx, float *plane); +HRESULT __cdecl wined3d_device_get_clip_status(struct wined3d_device *device, WINED3DCLIPSTATUS *clip_status); +HRESULT __cdecl wined3d_device_get_creation_parameters(struct wined3d_device *device, + WINED3DDEVICE_CREATION_PARAMETERS *creation_parameters); +HRESULT __cdecl wined3d_device_get_current_texture_palette(struct wined3d_device *device, UINT *palette_idx); +HRESULT __cdecl wined3d_device_get_depth_stencil(struct wined3d_device *device, + struct wined3d_surface **depth_stencil); +HRESULT __cdecl wined3d_device_get_device_caps(struct wined3d_device *device, WINED3DCAPS *caps); +HRESULT __cdecl wined3d_device_get_display_mode(struct wined3d_device *device, + UINT swapchain_idx, WINED3DDISPLAYMODE *mode); +HRESULT __cdecl wined3d_device_get_front_buffer_data(struct wined3d_device *device, + UINT swapchain_idx, struct wined3d_surface *dst_surface); +void __cdecl wined3d_device_get_gamma_ramp(struct wined3d_device *device, UINT swapchain_idx, WINED3DGAMMARAMP *ramp); +HRESULT __cdecl wined3d_device_get_index_buffer(struct wined3d_device *device, struct wined3d_buffer **index_buffer); +HRESULT __cdecl wined3d_device_get_light(struct wined3d_device *device, UINT light_idx, WINED3DLIGHT *light); +HRESULT __cdecl wined3d_device_get_light_enable(struct wined3d_device *device, UINT light_idx, BOOL *enable); +HRESULT __cdecl wined3d_device_get_material(struct wined3d_device *device, WINED3DMATERIAL *material); +float __cdecl wined3d_device_get_npatch_mode(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_get_palette_entries(struct wined3d_device *device, + UINT palette_idx, PALETTEENTRY *entries); +struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(struct wined3d_device *device); +void __cdecl wined3d_device_get_primitive_type(struct wined3d_device *device, WINED3DPRIMITIVETYPE *primitive_topology); +HRESULT __cdecl wined3d_device_get_ps_consts_b(struct wined3d_device *device, + UINT start_register, BOOL *constants, UINT bool_count); +HRESULT __cdecl wined3d_device_get_ps_consts_f(struct wined3d_device *device, + UINT start_register, float *constants, UINT vector4f_count); +HRESULT __cdecl wined3d_device_get_ps_consts_i(struct wined3d_device *device, + UINT start_register, int *constants, UINT vector4i_count); +HRESULT __cdecl wined3d_device_get_raster_status(struct wined3d_device *device, + UINT swapchain_idx, WINED3DRASTER_STATUS *raster_status); +HRESULT __cdecl wined3d_device_get_render_state(struct wined3d_device *device, + WINED3DRENDERSTATETYPE state, DWORD *value); +HRESULT __cdecl wined3d_device_get_render_target(struct wined3d_device *device, + UINT render_target_idx, struct wined3d_surface **render_target); +HRESULT __cdecl wined3d_device_get_sampler_state(struct wined3d_device *device, + UINT sampler_idx, WINED3DSAMPLERSTATETYPE state, DWORD *value); +HRESULT __cdecl wined3d_device_get_scissor_rect(struct wined3d_device *device, RECT *rect); +BOOL __cdecl wined3d_device_get_software_vertex_processing(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_get_stream_source(struct wined3d_device *device, + UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride); +HRESULT __cdecl wined3d_device_get_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT *divider); +HRESULT __cdecl wined3d_device_get_surface_from_dc(struct wined3d_device *device, + HDC dc, struct wined3d_surface **surface); +HRESULT __cdecl wined3d_device_get_swapchain(struct wined3d_device *device, + UINT swapchain_idx, struct wined3d_swapchain **swapchain); +UINT __cdecl wined3d_device_get_swapchain_count(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_get_texture(struct wined3d_device *device, + UINT stage, struct wined3d_texture **texture); +HRESULT __cdecl wined3d_device_get_texture_stage_state(struct wined3d_device *device, + UINT stage, WINED3DTEXTURESTAGESTATETYPE state, DWORD *value); +HRESULT __cdecl wined3d_device_get_transform(struct wined3d_device *device, + WINED3DTRANSFORMSTATETYPE state, WINED3DMATRIX *matrix); +HRESULT __cdecl wined3d_device_get_vertex_declaration(struct wined3d_device *device, + struct wined3d_vertex_declaration **declaration); +struct wined3d_shader * __cdecl wined3d_device_get_vertex_shader(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_get_viewport(struct wined3d_device *device, WINED3DVIEWPORT *viewport); +HRESULT __cdecl wined3d_device_get_vs_consts_b(struct wined3d_device *device, + UINT start_register, BOOL *constants, UINT bool_count); +HRESULT __cdecl wined3d_device_get_vs_consts_f(struct wined3d_device *device, + UINT start_register, float *constants, UINT vector4f_count); +HRESULT __cdecl wined3d_device_get_vs_consts_i(struct wined3d_device *device, + UINT start_register, int *constants, UINT vector4i_count); +HRESULT __cdecl wined3d_device_get_wined3d(struct wined3d_device *device, struct wined3d **d3d); +ULONG __cdecl wined3d_device_incref(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_init_3d(struct wined3d_device *device, WINED3DPRESENT_PARAMETERS *present_parameters); +HRESULT __cdecl wined3d_device_init_gdi(struct wined3d_device *device, WINED3DPRESENT_PARAMETERS *present_parameters); +HRESULT __cdecl wined3d_device_multiply_transform(struct wined3d_device *device, + WINED3DTRANSFORMSTATETYPE state, const WINED3DMATRIX *matrix); +HRESULT __cdecl wined3d_device_present(struct wined3d_device *device, const RECT *src_rect, + const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region); +HRESULT __cdecl wined3d_device_process_vertices(struct wined3d_device *device, + UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer, + struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf); +void __cdecl wined3d_device_release_focus_window(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_reset(struct wined3d_device *device, WINED3DPRESENT_PARAMETERS *present_parameters); +void __cdecl wined3d_device_restore_fullscreen_window(struct wined3d_device *device, HWND window); +HRESULT __cdecl wined3d_device_set_base_vertex_index(struct wined3d_device *device, INT base_index); +HRESULT __cdecl wined3d_device_set_clip_plane(struct wined3d_device *device, UINT plane_idx, const float *plane); +HRESULT __cdecl wined3d_device_set_clip_status(struct wined3d_device *device, const WINED3DCLIPSTATUS *clip_status); +HRESULT __cdecl wined3d_device_set_current_texture_palette(struct wined3d_device *device, UINT palette_idx); +void __cdecl wined3d_device_set_cursor_position(struct wined3d_device *device, + int x_screen_space, int y_screen_space, DWORD flags); +HRESULT __cdecl wined3d_device_set_cursor_properties(struct wined3d_device *device, + UINT x_hotspot, UINT y_hotspot, struct wined3d_surface *cursor_surface); +HRESULT __cdecl wined3d_device_set_depth_stencil(struct wined3d_device *device, struct wined3d_surface *depth_stencil); +HRESULT __cdecl wined3d_device_set_dialog_box_mode(struct wined3d_device *device, BOOL enable_dialogs); +HRESULT __cdecl wined3d_device_set_display_mode(struct wined3d_device *device, + UINT swapchain_idx, const WINED3DDISPLAYMODE *mode); +void __cdecl wined3d_device_set_gamma_ramp(struct wined3d_device *device, + UINT swapchain_idx, DWORD flags, const WINED3DGAMMARAMP *ramp); +HRESULT __cdecl wined3d_device_set_index_buffer(struct wined3d_device *device, + struct wined3d_buffer *index_buffer, enum wined3d_format_id format_id); +HRESULT __cdecl wined3d_device_set_light(struct wined3d_device *device, UINT light_idx, const WINED3DLIGHT *light); +HRESULT __cdecl wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable); +HRESULT __cdecl wined3d_device_set_material(struct wined3d_device *device, const WINED3DMATERIAL *material); +void __cdecl wined3d_device_set_multithreaded(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments); +HRESULT __cdecl wined3d_device_set_palette_entries(struct wined3d_device *device, + UINT palette_idx, const PALETTEENTRY *entries); +HRESULT __cdecl wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader); +void __cdecl wined3d_device_set_primitive_type(struct wined3d_device *device, WINED3DPRIMITIVETYPE primitive_topology); +HRESULT __cdecl wined3d_device_set_ps_consts_b(struct wined3d_device *device, + UINT start_register, const BOOL *constants, UINT bool_count); +HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device, + UINT start_register, const float *constants, UINT vector4f_count); +HRESULT __cdecl wined3d_device_set_ps_consts_i(struct wined3d_device *device, + UINT start_register, const int *constants, UINT vector4i_count); +HRESULT __cdecl wined3d_device_set_render_state(struct wined3d_device *device, + WINED3DRENDERSTATETYPE state, DWORD value); +HRESULT __cdecl wined3d_device_set_render_target(struct wined3d_device *device, + UINT render_target_idx, struct wined3d_surface *render_target, BOOL set_viewport); +HRESULT __cdecl wined3d_device_set_sampler_state(struct wined3d_device *device, + UINT sampler_idx, WINED3DSAMPLERSTATETYPE state, DWORD value); +HRESULT __cdecl wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect); +HRESULT __cdecl wined3d_device_set_software_vertex_processing(struct wined3d_device *device, BOOL software); +HRESULT __cdecl wined3d_device_set_stream_source(struct wined3d_device *device, + UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride); +HRESULT __cdecl wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider); +HRESULT __cdecl wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture); +HRESULT __cdecl wined3d_device_set_texture_stage_state(struct wined3d_device *device, + UINT stage, WINED3DTEXTURESTAGESTATETYPE state, DWORD value); +HRESULT __cdecl wined3d_device_set_transform(struct wined3d_device *device, + WINED3DTRANSFORMSTATETYPE state, const WINED3DMATRIX *matrix); +HRESULT __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device, + struct wined3d_vertex_declaration *declaration); +HRESULT __cdecl wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader); +HRESULT __cdecl wined3d_device_set_viewport(struct wined3d_device *device, const WINED3DVIEWPORT *viewport); +HRESULT __cdecl wined3d_device_set_vs_consts_b(struct wined3d_device *device, + UINT start_register, const BOOL *constants, UINT bool_count); +HRESULT __cdecl wined3d_device_set_vs_consts_f(struct wined3d_device *device, + UINT start_register, const float *constants, UINT vector4f_count); +HRESULT __cdecl wined3d_device_set_vs_consts_i(struct wined3d_device *device, + UINT start_register, const int *constants, UINT vector4i_count); +void __cdecl wined3d_device_setup_fullscreen_window(struct wined3d_device *device, HWND window, UINT w, UINT h); +BOOL __cdecl wined3d_device_show_cursor(struct wined3d_device *device, BOOL show); +HRESULT __cdecl wined3d_device_uninit_3d(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_uninit_gdi(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_update_surface(struct wined3d_device *device, struct wined3d_surface *src_surface, + const RECT *src_rect, struct wined3d_surface *dst_surface, const POINT *dst_point); +HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device, + struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture); +HRESULT __cdecl wined3d_device_validate_device(struct wined3d_device *device, DWORD *num_passes); + +HRESULT __cdecl wined3d_palette_create(struct wined3d_device *device, DWORD flags, + const PALETTEENTRY *entries, void *parent, struct wined3d_palette **palette); +ULONG __cdecl wined3d_palette_decref(struct wined3d_palette *palette); +HRESULT __cdecl wined3d_palette_get_entries(const struct wined3d_palette *palette, + DWORD flags, DWORD start, DWORD count, PALETTEENTRY *entries); +DWORD __cdecl wined3d_palette_get_flags(const struct wined3d_palette *palette); +void * __cdecl wined3d_palette_get_parent(const struct wined3d_palette *palette); +ULONG __cdecl wined3d_palette_incref(struct wined3d_palette *palette); +HRESULT __cdecl wined3d_palette_set_entries(struct wined3d_palette *palette, + DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries); + +HRESULT __cdecl wined3d_query_create(struct wined3d_device *device, + WINED3DQUERYTYPE type, struct wined3d_query **query); +ULONG __cdecl wined3d_query_decref(struct wined3d_query *query); +HRESULT __cdecl wined3d_query_get_data(struct wined3d_query *query, void *data, UINT data_size, DWORD flags); +UINT __cdecl wined3d_query_get_data_size(const struct wined3d_query *query); +WINED3DQUERYTYPE __cdecl wined3d_query_get_type(const struct wined3d_query *query); +ULONG __cdecl wined3d_query_incref(struct wined3d_query *query); +HRESULT __cdecl wined3d_query_issue(struct wined3d_query *query, DWORD flags); + +void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource, + struct wined3d_resource_desc *desc); +void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resource); + +HRESULT __cdecl wined3d_rendertarget_view_create(struct wined3d_resource *resource, + void *parent, struct wined3d_rendertarget_view **rendertarget_view); +ULONG __cdecl wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *view); +void * __cdecl wined3d_rendertarget_view_get_parent(const struct wined3d_rendertarget_view *view); +struct wined3d_resource * __cdecl wined3d_rendertarget_view_get_resource(const struct wined3d_rendertarget_view *view); +ULONG __cdecl wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *view); + +HRESULT __cdecl wined3d_shader_create_gs(struct wined3d_device *device, const DWORD *byte_code, + const struct wined3d_shader_signature *output_signature, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader); +HRESULT __cdecl wined3d_shader_create_ps(struct wined3d_device *device, const DWORD *byte_code, + const struct wined3d_shader_signature *output_signature, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader); +HRESULT __cdecl wined3d_shader_create_vs(struct wined3d_device *device, const DWORD *byte_code, + const struct wined3d_shader_signature *output_signature, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader); +ULONG __cdecl wined3d_shader_decref(struct wined3d_shader *shader); +HRESULT __cdecl wined3d_shader_get_byte_code(const struct wined3d_shader *shader, + void *byte_code, UINT *byte_code_size); +void * __cdecl wined3d_shader_get_parent(const struct wined3d_shader *shader); +ULONG __cdecl wined3d_shader_incref(struct wined3d_shader *shader); +HRESULT __cdecl wined3d_shader_set_local_constants_float(struct wined3d_shader *shader, + UINT start_idx, const float *src_data, UINT vector4f_count); + +HRESULT __cdecl wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock); +HRESULT __cdecl wined3d_stateblock_capture(struct wined3d_stateblock *stateblock); +HRESULT __cdecl wined3d_stateblock_create(struct wined3d_device *device, + WINED3DSTATEBLOCKTYPE type, struct wined3d_stateblock **stateblock); +ULONG __cdecl wined3d_stateblock_decref(struct wined3d_stateblock *stateblock); +ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock); + +HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, + const WINEDDBLTFX *blt_fx, WINED3DTEXTUREFILTERTYPE filter); +HRESULT __cdecl wined3d_surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y, + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD trans); +HRESULT __cdecl wined3d_surface_create(struct wined3d_device *device, UINT width, UINT height, + enum wined3d_format_id format_id, BOOL lockable, BOOL discard, UINT level, DWORD usage, WINED3DPOOL pool, + WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_surface **surface); +ULONG __cdecl wined3d_surface_decref(struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_flip(struct wined3d_surface *surface, struct wined3d_surface *override, DWORD flags); +HRESULT __cdecl wined3d_surface_free_private_data(struct wined3d_surface *surface, REFGUID guid); +HRESULT __cdecl wined3d_surface_get_blt_status(const struct wined3d_surface *surface, DWORD flags); +struct wined3d_clipper * __cdecl wined3d_surface_get_clipper(const struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_get_flip_status(const struct wined3d_surface *surface, DWORD flags); +HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y); +struct wined3d_palette * __cdecl wined3d_surface_get_palette(const struct wined3d_surface *surface); +void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface); +DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface); +DWORD __cdecl wined3d_surface_get_priority(const struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_get_private_data(const struct wined3d_surface *surface, + REFGUID guid, void *data, DWORD *data_size); +struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc); +ULONG __cdecl wined3d_surface_incref(struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_is_lost(const struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_map(struct wined3d_surface *surface, + WINED3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags); +void __cdecl wined3d_surface_preload(struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc); +HRESULT __cdecl wined3d_surface_restore(struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_set_clipper(struct wined3d_surface *surface, struct wined3d_clipper *clipper); +HRESULT __cdecl wined3d_surface_set_color_key(struct wined3d_surface *surface, + DWORD flags, const WINEDDCOLORKEY *color_key); +HRESULT __cdecl wined3d_surface_set_format(struct wined3d_surface *surface, enum wined3d_format_id format_id); +HRESULT __cdecl wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem); +HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y); +HRESULT __cdecl wined3d_surface_set_palette(struct wined3d_surface *surface, struct wined3d_palette *palette); +DWORD __cdecl wined3d_surface_set_priority(struct wined3d_surface *surface, DWORD new_priority); +HRESULT __cdecl wined3d_surface_set_private_data(struct wined3d_surface *surface, + REFGUID guid, const void *data, DWORD data_size, DWORD flags); +HRESULT __cdecl wined3d_surface_unmap(struct wined3d_surface *surface); +HRESULT __cdecl wined3d_surface_update_overlay(struct wined3d_surface *surface, const RECT *src_rect, + struct wined3d_surface *dst_surface, const RECT *dst_rect, DWORD flags, const WINEDDOVERLAYFX *fx); +HRESULT __cdecl wined3d_surface_update_overlay_z_order(struct wined3d_surface *surface, + DWORD flags, struct wined3d_surface *ref); + +HRESULT __cdecl wined3d_swapchain_create(struct wined3d_device *device, + WINED3DPRESENT_PARAMETERS *present_parameters, WINED3DSURFTYPE surface_type, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain); +ULONG __cdecl wined3d_swapchain_decref(struct wined3d_swapchain *swapchain); +HRESULT __cdecl wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain *swapchain, + UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, struct wined3d_surface **backbuffer); +struct wined3d_device * __cdecl wined3d_swapchain_get_device(const struct wined3d_swapchain *swapchain); +HRESULT __cdecl wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain, + WINED3DDISPLAYMODE *mode); +HRESULT __cdecl wined3d_swapchain_get_front_buffer_data(const struct wined3d_swapchain *swapchain, + struct wined3d_surface *dst_surface); +HRESULT __cdecl wined3d_swapchain_get_gamma_ramp(const struct wined3d_swapchain *swapchain, + WINED3DGAMMARAMP *ramp); +void * __cdecl wined3d_swapchain_get_parent(const struct wined3d_swapchain *swapchain); +HRESULT __cdecl wined3d_swapchain_get_present_parameters(const struct wined3d_swapchain *swapchain, + WINED3DPRESENT_PARAMETERS *present_parameters); +HRESULT __cdecl wined3d_swapchain_get_raster_status(const struct wined3d_swapchain *swapchain, + WINED3DRASTER_STATUS *raster_status); +ULONG __cdecl wined3d_swapchain_incref(struct wined3d_swapchain *swapchain); +HRESULT __cdecl wined3d_swapchain_present(struct wined3d_swapchain *swapchain, + const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, + const RGNDATA *dirty_region, DWORD flags); +HRESULT __cdecl wined3d_swapchain_set_gamma_ramp(const struct wined3d_swapchain *swapchain, + DWORD flags, const WINED3DGAMMARAMP *ramp); +HRESULT __cdecl wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window); + +HRESULT __cdecl wined3d_texture_add_dirty_region(struct wined3d_texture *texture, + UINT layer, const WINED3DBOX *dirty_region); +HRESULT __cdecl wined3d_texture_create_2d(struct wined3d_device *device, UINT width, UINT height, + UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture); +HRESULT __cdecl wined3d_texture_create_3d(struct wined3d_device *device, UINT width, UINT height, UINT depth, + UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture); +HRESULT __cdecl wined3d_texture_create_cube(struct wined3d_device *device, UINT edge_length, + UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture); +ULONG __cdecl wined3d_texture_decref(struct wined3d_texture *texture); +HRESULT __cdecl wined3d_texture_free_private_data(struct wined3d_texture *texture, REFGUID guid); +void __cdecl wined3d_texture_generate_mipmaps(struct wined3d_texture *texture); +WINED3DTEXTUREFILTERTYPE __cdecl wined3d_texture_get_autogen_filter_type(const struct wined3d_texture *texture); +DWORD __cdecl wined3d_texture_get_level_count(const struct wined3d_texture *texture); +DWORD __cdecl wined3d_texture_get_lod(const struct wined3d_texture *texture); +void * __cdecl wined3d_texture_get_parent(const struct wined3d_texture *texture); +DWORD __cdecl wined3d_texture_get_priority(const struct wined3d_texture *texture); +HRESULT __cdecl wined3d_texture_get_private_data(const struct wined3d_texture *texture, + REFGUID guid, void *data, DWORD *data_size); +struct wined3d_resource * __cdecl wined3d_texture_get_sub_resource(struct wined3d_texture *texture, + UINT sub_resource_idx); +WINED3DRESOURCETYPE __cdecl wined3d_texture_get_type(const struct wined3d_texture *texture); +ULONG __cdecl wined3d_texture_incref(struct wined3d_texture *texture); +void __cdecl wined3d_texture_preload(struct wined3d_texture *texture); +HRESULT __cdecl wined3d_texture_set_autogen_filter_type(struct wined3d_texture *texture, + WINED3DTEXTUREFILTERTYPE filter_type); +DWORD __cdecl wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod); +DWORD __cdecl wined3d_texture_set_priority(struct wined3d_texture *texture, DWORD priority); +HRESULT __cdecl wined3d_texture_set_private_data(struct wined3d_texture *texture, + REFGUID guid, const void *data, DWORD data_size, DWORD flags); + +HRESULT __cdecl wined3d_vertex_declaration_create(struct wined3d_device *device, + const WINED3DVERTEXELEMENT *elements, UINT element_count, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration); +HRESULT __cdecl wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, + DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, + struct wined3d_vertex_declaration **declaration); +ULONG __cdecl wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration); +void * __cdecl wined3d_vertex_declaration_get_parent(const struct wined3d_vertex_declaration *declaration); +ULONG __cdecl wined3d_vertex_declaration_incref(struct wined3d_vertex_declaration *declaration); + +HRESULT __cdecl wined3d_volume_create(struct wined3d_device *device, UINT width, UINT height, UINT depth, + DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent, + const struct wined3d_parent_ops *parent_ops, struct wined3d_volume **volume); +ULONG __cdecl wined3d_volume_decref(struct wined3d_volume *volume); +HRESULT __cdecl wined3d_volume_free_private_data(struct wined3d_volume *volume, REFGUID guid); +struct wined3d_volume * __cdecl wined3d_volume_from_resource(struct wined3d_resource *resource); +void * __cdecl wined3d_volume_get_parent(const struct wined3d_volume *volume); +DWORD __cdecl wined3d_volume_get_priority(const struct wined3d_volume *volume); +HRESULT __cdecl wined3d_volume_get_private_data(const struct wined3d_volume *volume, + REFGUID guid, void *data, DWORD *data_size); +struct wined3d_resource * __cdecl wined3d_volume_get_resource(struct wined3d_volume *volume); +ULONG __cdecl wined3d_volume_incref(struct wined3d_volume *volume); +HRESULT __cdecl wined3d_volume_map(struct wined3d_volume *volume, + WINED3DLOCKED_BOX *locked_box, const WINED3DBOX *box, DWORD flags); +void __cdecl wined3d_volume_preload(struct wined3d_volume *volume); +DWORD __cdecl wined3d_volume_set_priority(struct wined3d_volume *volume, DWORD new_priority); +HRESULT __cdecl wined3d_volume_set_private_data(struct wined3d_volume *volume, + REFGUID guid, const void *data, DWORD data_size, DWORD flags); +HRESULT __cdecl wined3d_volume_unmap(struct wined3d_volume *volume); + +#endif /* __WINE_WINED3D_H */ diff --git a/include/reactos/wine/wined3d.idl b/include/reactos/wine/wined3d.idl deleted file mode 100644 index 99f29763b72..00000000000 --- a/include/reactos/wine/wined3d.idl +++ /dev/null @@ -1,3388 +0,0 @@ -/* - * Copyright 2002-2003 The wine-d3d team - * Copyright 2002-2003 Jason Edmeades - * Copyright 2002-2003 Raphael Junqueira - * Copyright 2005 Oliver Stieber - * Copyright 2006 Stefan Dösinger - * Copyright 2006 Stefan Dösinger for CodeWeavers - * Copyright 2007 Henri Verbeet - * Copyright 2008 Henri Verbeet for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -import "unknwn.idl"; - -cpp_quote("#if 0") -typedef HANDLE HMONITOR; - -typedef struct _RGNDATAHEADER -{ - DWORD dwSize; - DWORD iType; - DWORD nCount; - DWORD nRgnSize; - RECT rcBound; -} RGNDATAHEADER; - -typedef struct _RGNDATA -{ - RGNDATAHEADER rdh; - char Buffer[1]; -} RGNDATA; - -typedef struct _LUID -{ - DWORD LowPart; - LONG HighPart; -} LUID, *PLUID; -cpp_quote("#endif") - -cpp_quote("#define WINED3D_OK S_OK") - -const UINT _FACWINED3D = 0x876; -cpp_quote("#define MAKE_WINED3DSTATUS(code) MAKE_HRESULT(0, _FACWINED3D, code)") -cpp_quote("#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159)") - -cpp_quote("#define MAKE_WINED3DHRESULT(code) MAKE_HRESULT(1, _FACWINED3D, code)") -cpp_quote("#define WINED3DERR_WRONGTEXTUREFORMAT MAKE_WINED3DHRESULT(2072)") -cpp_quote("#define WINED3DERR_UNSUPPORTEDCOLOROPERATION MAKE_WINED3DHRESULT(2073)") -cpp_quote("#define WINED3DERR_UNSUPPORTEDCOLORARG MAKE_WINED3DHRESULT(2074)") -cpp_quote("#define WINED3DERR_UNSUPPORTEDALPHAOPERATION MAKE_WINED3DHRESULT(2075)") -cpp_quote("#define WINED3DERR_UNSUPPORTEDALPHAARG MAKE_WINED3DHRESULT(2076)") -cpp_quote("#define WINED3DERR_TOOMANYOPERATIONS MAKE_WINED3DHRESULT(2077)") -cpp_quote("#define WINED3DERR_CONFLICTINGTEXTUREFILTER MAKE_WINED3DHRESULT(2078)") -cpp_quote("#define WINED3DERR_UNSUPPORTEDFACTORVALUE MAKE_WINED3DHRESULT(2079)") -cpp_quote("#define WINED3DERR_CONFLICTINGRENDERSTATE MAKE_WINED3DHRESULT(2081)") -cpp_quote("#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_WINED3DHRESULT(2082)") -cpp_quote("#define WINED3DERR_CONFLICTINGTEXTUREPALETTE MAKE_WINED3DHRESULT(2086)") -cpp_quote("#define WINED3DERR_DRIVERINTERNALERROR MAKE_WINED3DHRESULT(2087)") -cpp_quote("#define WINED3DERR_NOTFOUND MAKE_WINED3DHRESULT(2150)") -cpp_quote("#define WINED3DERR_MOREDATA MAKE_WINED3DHRESULT(2151)") -cpp_quote("#define WINED3DERR_DEVICELOST MAKE_WINED3DHRESULT(2152)") -cpp_quote("#define WINED3DERR_DEVICENOTRESET MAKE_WINED3DHRESULT(2153)") -cpp_quote("#define WINED3DERR_NOTAVAILABLE MAKE_WINED3DHRESULT(2154)") -cpp_quote("#define WINED3DERR_OUTOFVIDEOMEMORY MAKE_WINED3DHRESULT(380)") -cpp_quote("#define WINED3DERR_INVALIDDEVICE MAKE_WINED3DHRESULT(2155)") -cpp_quote("#define WINED3DERR_INVALIDCALL MAKE_WINED3DHRESULT(2156)") -cpp_quote("#define WINED3DERR_DRIVERINVALIDCALL MAKE_WINED3DHRESULT(2157)") -cpp_quote("#define WINED3DERR_WASSTILLDRAWING MAKE_WINED3DHRESULT(540)") -cpp_quote("#define WINEDDERR_NOTAOVERLAYSURFACE MAKE_WINED3DHRESULT(580)") -cpp_quote("#define WINEDDERR_NOTLOCKED MAKE_WINED3DHRESULT(584)") -cpp_quote("#define WINEDDERR_NODC MAKE_WINED3DHRESULT(586)") -cpp_quote("#define WINEDDERR_DCALREADYCREATED MAKE_WINED3DHRESULT(620)") -cpp_quote("#define WINEDDERR_NOTFLIPPABLE MAKE_WINED3DHRESULT(582)") -cpp_quote("#define WINEDDERR_SURFACEBUSY MAKE_WINED3DHRESULT(430)") -cpp_quote("#define WINEDDERR_INVALIDRECT MAKE_WINED3DHRESULT(150)") -cpp_quote("#define WINEDDERR_NOCLIPLIST MAKE_WINED3DHRESULT(205)") -cpp_quote("#define WINEDDERR_OVERLAYNOTVISIBLE MAKE_WINED3DHRESULT(577)") - -typedef DWORD WINED3DCOLOR; - -typedef enum _WINED3DLIGHTTYPE -{ - WINED3DLIGHT_POINT = 1, - WINED3DLIGHT_SPOT = 2, - WINED3DLIGHT_DIRECTIONAL = 3, - WINED3DLIGHT_PARALLELPOINT = 4, /* D3D7 */ - WINED3DLIGHT_GLSPOT = 5, /* D3D7 */ - WINED3DLIGHT_FORCE_DWORD = 0x7fffffff -} WINED3DLIGHTTYPE; - -typedef enum _WINED3DPRIMITIVETYPE -{ - WINED3DPT_UNDEFINED = 0, - WINED3DPT_POINTLIST = 1, - WINED3DPT_LINELIST = 2, - WINED3DPT_LINESTRIP = 3, - WINED3DPT_TRIANGLELIST = 4, - WINED3DPT_TRIANGLESTRIP = 5, - WINED3DPT_TRIANGLEFAN = 6, - WINED3DPT_LINELIST_ADJ = 10, - WINED3DPT_LINESTRIP_ADJ = 11, - WINED3DPT_TRIANGLELIST_ADJ = 12, - WINED3DPT_TRIANGLESTRIP_ADJ = 13, - WINED3DPT_FORCE_DWORD = 0x7fffffff -} WINED3DPRIMITIVETYPE; - -typedef enum _WINED3DDEVTYPE -{ - WINED3DDEVTYPE_HAL = 1, - WINED3DDEVTYPE_REF = 2, - WINED3DDEVTYPE_SW = 3, - WINED3DDEVTYPE_NULLREF = 4, - WINED3DDEVTYPE_FORCE_DWORD = 0xffffffff -} WINED3DDEVTYPE; - -typedef enum _WINED3DDEGREETYPE -{ - WINED3DDEGREE_LINEAR = 1, - WINED3DDEGREE_QUADRATIC = 2, - WINED3DDEGREE_CUBIC = 3, - WINED3DDEGREE_QUINTIC = 5, - WINED3DDEGREE_FORCE_DWORD = 0x7fffffff -} WINED3DDEGREETYPE; - -enum wined3d_format_id -{ - WINED3DFMT_UNKNOWN, - WINED3DFMT_B8G8R8_UNORM, - WINED3DFMT_B5G5R5X1_UNORM, - WINED3DFMT_B4G4R4A4_UNORM, - WINED3DFMT_B2G3R3_UNORM, - WINED3DFMT_B2G3R3A8_UNORM, - WINED3DFMT_B4G4R4X4_UNORM, - WINED3DFMT_R8G8B8X8_UNORM, - WINED3DFMT_B10G10R10A2_UNORM, - WINED3DFMT_P8_UINT_A8_UNORM, - WINED3DFMT_P8_UINT, - WINED3DFMT_L8_UNORM, - WINED3DFMT_L8A8_UNORM, - WINED3DFMT_L4A4_UNORM, - WINED3DFMT_R5G5_SNORM_L6_UNORM, - WINED3DFMT_R8G8_SNORM_L8X8_UNORM, - WINED3DFMT_R10G11B11_SNORM, - WINED3DFMT_R10G10B10_SNORM_A2_UNORM, - WINED3DFMT_D16_LOCKABLE, - WINED3DFMT_D32_UNORM, - WINED3DFMT_S1_UINT_D15_UNORM, - WINED3DFMT_X8D24_UNORM, - WINED3DFMT_S4X4_UINT_D24_UNORM, - WINED3DFMT_L16_UNORM, - WINED3DFMT_S8_UINT_D24_FLOAT, - WINED3DFMT_VERTEXDATA, - WINED3DFMT_R8G8_SNORM_Cx, - WINED3DFMT_R32G32B32A32_TYPELESS, - WINED3DFMT_R32G32B32A32_FLOAT, - WINED3DFMT_R32G32B32A32_UINT, - WINED3DFMT_R32G32B32A32_SINT, - WINED3DFMT_R32G32B32_TYPELESS, - WINED3DFMT_R32G32B32_FLOAT, - WINED3DFMT_R32G32B32_UINT, - WINED3DFMT_R32G32B32_SINT, - WINED3DFMT_R16G16B16A16_TYPELESS, - WINED3DFMT_R16G16B16A16_FLOAT, - WINED3DFMT_R16G16B16A16_UNORM, - WINED3DFMT_R16G16B16A16_UINT, - WINED3DFMT_R16G16B16A16_SNORM, - WINED3DFMT_R16G16B16A16_SINT, - WINED3DFMT_R32G32_TYPELESS, - WINED3DFMT_R32G32_FLOAT, - WINED3DFMT_R32G32_UINT, - WINED3DFMT_R32G32_SINT, - WINED3DFMT_R32G8X24_TYPELESS, - WINED3DFMT_D32_FLOAT_S8X24_UINT, - WINED3DFMT_R32_FLOAT_X8X24_TYPELESS, - WINED3DFMT_X32_TYPELESS_G8X24_UINT, - WINED3DFMT_R10G10B10A2_TYPELESS, - WINED3DFMT_R10G10B10A2_UNORM, - WINED3DFMT_R10G10B10A2_UINT, - WINED3DFMT_R10G10B10A2_SNORM, - WINED3DFMT_R11G11B10_FLOAT, - WINED3DFMT_R8G8B8A8_TYPELESS, - WINED3DFMT_R8G8B8A8_UNORM, - WINED3DFMT_R8G8B8A8_UNORM_SRGB, - WINED3DFMT_R8G8B8A8_UINT, - WINED3DFMT_R8G8B8A8_SNORM, - WINED3DFMT_R8G8B8A8_SINT, - WINED3DFMT_R16G16_TYPELESS, - WINED3DFMT_R16G16_FLOAT, - WINED3DFMT_R16G16_UNORM, - WINED3DFMT_R16G16_UINT, - WINED3DFMT_R16G16_SNORM, - WINED3DFMT_R16G16_SINT, - WINED3DFMT_R32_TYPELESS, - WINED3DFMT_D32_FLOAT, - WINED3DFMT_R32_FLOAT, - WINED3DFMT_R32_UINT, - WINED3DFMT_R32_SINT, - WINED3DFMT_R24G8_TYPELESS, - WINED3DFMT_D24_UNORM_S8_UINT, - WINED3DFMT_R24_UNORM_X8_TYPELESS, - WINED3DFMT_X24_TYPELESS_G8_UINT, - WINED3DFMT_R8G8_TYPELESS, - WINED3DFMT_R8G8_UNORM, - WINED3DFMT_R8G8_UINT, - WINED3DFMT_R8G8_SNORM, - WINED3DFMT_R8G8_SINT, - WINED3DFMT_R16_TYPELESS, - WINED3DFMT_R16_FLOAT, - WINED3DFMT_D16_UNORM, - WINED3DFMT_R16_UNORM, - WINED3DFMT_R16_UINT, - WINED3DFMT_R16_SNORM, - WINED3DFMT_R16_SINT, - WINED3DFMT_R8_TYPELESS, - WINED3DFMT_R8_UNORM, - WINED3DFMT_R8_UINT, - WINED3DFMT_R8_SNORM, - WINED3DFMT_R8_SINT, - WINED3DFMT_A8_UNORM, - WINED3DFMT_R1_UNORM, - WINED3DFMT_R9G9B9E5_SHAREDEXP, - WINED3DFMT_R8G8_B8G8_UNORM, - WINED3DFMT_G8R8_G8B8_UNORM, - WINED3DFMT_BC1_TYPELESS, - WINED3DFMT_BC1_UNORM, - WINED3DFMT_BC1_UNORM_SRGB, - WINED3DFMT_BC2_TYPELESS, - WINED3DFMT_BC2_UNORM, - WINED3DFMT_BC2_UNORM_SRGB, - WINED3DFMT_BC3_TYPELESS, - WINED3DFMT_BC3_UNORM, - WINED3DFMT_BC3_UNORM_SRGB, - WINED3DFMT_BC4_TYPELESS, - WINED3DFMT_BC4_UNORM, - WINED3DFMT_BC4_SNORM, - WINED3DFMT_BC5_TYPELESS, - WINED3DFMT_BC5_UNORM, - WINED3DFMT_BC5_SNORM, - WINED3DFMT_B5G6R5_UNORM, - WINED3DFMT_B5G5R5A1_UNORM, - WINED3DFMT_B8G8R8A8_UNORM, - WINED3DFMT_B8G8R8X8_UNORM, - /* FOURCC formats. */ - WINED3DFMT_UYVY = 0x59565955, /* UYVY */ - WINED3DFMT_YUY2 = 0x32595559, /* YUY2 */ - WINED3DFMT_YV12 = 0x32315659, /* YV12 */ - WINED3DFMT_DXT1 = 0x31545844, /* DXT1 */ - WINED3DFMT_DXT2 = 0x32545844, /* DXT2 */ - WINED3DFMT_DXT3 = 0x33545844, /* DXT3 */ - WINED3DFMT_DXT4 = 0x34545844, /* DXT4 */ - WINED3DFMT_DXT5 = 0x35545844, /* DXT5 */ - WINED3DFMT_MULTI2_ARGB8 = 0x3154454d, /* MET1 */ - WINED3DFMT_G8R8_G8B8 = 0x42475247, /* GRGB */ - WINED3DFMT_R8G8_B8G8 = 0x47424752, /* RGBG */ - WINED3DFMT_ATI2N = 0x32495441, /* ATI2 */ - WINED3DFMT_INST = 0x54534e49, /* INST */ - WINED3DFMT_NVDB = 0x4244564e, /* NVDB */ - WINED3DFMT_NVHU = 0x5548564e, /* NVHU */ - WINED3DFMT_NVHS = 0x5348564e, /* NVHS */ - - WINED3DFMT_FORCE_DWORD = 0xffffffff -}; - -typedef enum _WINED3DRENDERSTATETYPE -{ - WINED3DRS_ANTIALIAS = 2, /* d3d7 */ - WINED3DRS_TEXTUREPERSPECTIVE = 4, /* d3d7 */ - WINED3DRS_WRAPU = 5, /* d3d7 */ - WINED3DRS_WRAPV = 6, /* d3d7 */ - WINED3DRS_ZENABLE = 7, - WINED3DRS_FILLMODE = 8, - WINED3DRS_SHADEMODE = 9, - WINED3DRS_LINEPATTERN = 10, /* d3d7, d3d8 */ - WINED3DRS_MONOENABLE = 11, /* d3d7 */ - WINED3DRS_ROP2 = 12, /* d3d7 */ - WINED3DRS_PLANEMASK = 13, /* d3d7 */ - WINED3DRS_ZWRITEENABLE = 14, - WINED3DRS_ALPHATESTENABLE = 15, - WINED3DRS_LASTPIXEL = 16, - WINED3DRS_SRCBLEND = 19, - WINED3DRS_DESTBLEND = 20, - WINED3DRS_CULLMODE = 22, - WINED3DRS_ZFUNC = 23, - WINED3DRS_ALPHAREF = 24, - WINED3DRS_ALPHAFUNC = 25, - WINED3DRS_DITHERENABLE = 26, - WINED3DRS_ALPHABLENDENABLE = 27, - WINED3DRS_FOGENABLE = 28, - WINED3DRS_SPECULARENABLE = 29, - WINED3DRS_ZVISIBLE = 30, /* d3d7, d3d8 */ - WINED3DRS_SUBPIXEL = 31, /* d3d7 */ - WINED3DRS_SUBPIXELX = 32, /* d3d7 */ - WINED3DRS_STIPPLEDALPHA = 33, /* d3d7 */ - WINED3DRS_FOGCOLOR = 34, - WINED3DRS_FOGTABLEMODE = 35, - WINED3DRS_FOGSTART = 36, - WINED3DRS_FOGEND = 37, - WINED3DRS_FOGDENSITY = 38, - WINED3DRS_STIPPLEENABLE = 39, /* d3d7 */ - WINED3DRS_EDGEANTIALIAS = 40, /* d3d7, d3d8 */ - WINED3DRS_COLORKEYENABLE = 41, /* d3d7 */ - WINED3DRS_MIPMAPLODBIAS = 46, /* d3d7 */ - WINED3DRS_ZBIAS = 47, /* d3d7, d3d8 */ - WINED3DRS_RANGEFOGENABLE = 48, - WINED3DRS_ANISOTROPY = 49, /* d3d7 */ - WINED3DRS_FLUSHBATCH = 50, /* d3d7 */ - WINED3DRS_TRANSLUCENTSORTINDEPENDENT = 51, /* d3d7 */ - WINED3DRS_STENCILENABLE = 52, - WINED3DRS_STENCILFAIL = 53, - WINED3DRS_STENCILZFAIL = 54, - WINED3DRS_STENCILPASS = 55, - WINED3DRS_STENCILFUNC = 56, - WINED3DRS_STENCILREF = 57, - WINED3DRS_STENCILMASK = 58, - WINED3DRS_STENCILWRITEMASK = 59, - WINED3DRS_TEXTUREFACTOR = 60, - WINED3DRS_WRAP0 = 128, - WINED3DRS_WRAP1 = 129, - WINED3DRS_WRAP2 = 130, - WINED3DRS_WRAP3 = 131, - WINED3DRS_WRAP4 = 132, - WINED3DRS_WRAP5 = 133, - WINED3DRS_WRAP6 = 134, - WINED3DRS_WRAP7 = 135, - WINED3DRS_CLIPPING = 136, - WINED3DRS_LIGHTING = 137, - WINED3DRS_EXTENTS = 138, /* d3d7 */ - WINED3DRS_AMBIENT = 139, - WINED3DRS_FOGVERTEXMODE = 140, - WINED3DRS_COLORVERTEX = 141, - WINED3DRS_LOCALVIEWER = 142, - WINED3DRS_NORMALIZENORMALS = 143, - WINED3DRS_COLORKEYBLENDENABLE = 144, /* d3d7 */ - WINED3DRS_DIFFUSEMATERIALSOURCE = 145, - WINED3DRS_SPECULARMATERIALSOURCE = 146, - WINED3DRS_AMBIENTMATERIALSOURCE = 147, - WINED3DRS_EMISSIVEMATERIALSOURCE = 148, - WINED3DRS_VERTEXBLEND = 151, - WINED3DRS_CLIPPLANEENABLE = 152, - WINED3DRS_SOFTWAREVERTEXPROCESSING = 153, /* d3d8 */ - WINED3DRS_POINTSIZE = 154, - WINED3DRS_POINTSIZE_MIN = 155, - WINED3DRS_POINTSPRITEENABLE = 156, - WINED3DRS_POINTSCALEENABLE = 157, - WINED3DRS_POINTSCALE_A = 158, - WINED3DRS_POINTSCALE_B = 159, - WINED3DRS_POINTSCALE_C = 160, - WINED3DRS_MULTISAMPLEANTIALIAS = 161, - WINED3DRS_MULTISAMPLEMASK = 162, - WINED3DRS_PATCHEDGESTYLE = 163, - WINED3DRS_PATCHSEGMENTS = 164, /* d3d8 */ - WINED3DRS_DEBUGMONITORTOKEN = 165, - WINED3DRS_POINTSIZE_MAX = 166, - WINED3DRS_INDEXEDVERTEXBLENDENABLE = 167, - WINED3DRS_COLORWRITEENABLE = 168, - WINED3DRS_TWEENFACTOR = 170, - WINED3DRS_BLENDOP = 171, - WINED3DRS_POSITIONDEGREE = 172, - WINED3DRS_NORMALDEGREE = 173, - WINED3DRS_SCISSORTESTENABLE = 174, - WINED3DRS_SLOPESCALEDEPTHBIAS = 175, - WINED3DRS_ANTIALIASEDLINEENABLE = 176, - WINED3DRS_MINTESSELLATIONLEVEL = 178, - WINED3DRS_MAXTESSELLATIONLEVEL = 179, - WINED3DRS_ADAPTIVETESS_X = 180, - WINED3DRS_ADAPTIVETESS_Y = 181, - WINED3DRS_ADAPTIVETESS_Z = 182, - WINED3DRS_ADAPTIVETESS_W = 183, - WINED3DRS_ENABLEADAPTIVETESSELLATION = 184, - WINED3DRS_TWOSIDEDSTENCILMODE = 185, - WINED3DRS_CCW_STENCILFAIL = 186, - WINED3DRS_CCW_STENCILZFAIL = 187, - WINED3DRS_CCW_STENCILPASS = 188, - WINED3DRS_CCW_STENCILFUNC = 189, - WINED3DRS_COLORWRITEENABLE1 = 190, - WINED3DRS_COLORWRITEENABLE2 = 191, - WINED3DRS_COLORWRITEENABLE3 = 192, - WINED3DRS_BLENDFACTOR = 193, - WINED3DRS_SRGBWRITEENABLE = 194, - WINED3DRS_DEPTHBIAS = 195, - WINED3DRS_WRAP8 = 198, - WINED3DRS_WRAP9 = 199, - WINED3DRS_WRAP10 = 200, - WINED3DRS_WRAP11 = 201, - WINED3DRS_WRAP12 = 202, - WINED3DRS_WRAP13 = 203, - WINED3DRS_WRAP14 = 204, - WINED3DRS_WRAP15 = 205, - WINED3DRS_SEPARATEALPHABLENDENABLE = 206, - WINED3DRS_SRCBLENDALPHA = 207, - WINED3DRS_DESTBLENDALPHA = 208, - WINED3DRS_BLENDOPALPHA = 209, - WINED3DRS_FORCE_DWORD = 0x7fffffff -} WINED3DRENDERSTATETYPE; -const UINT WINEHIGHEST_RENDER_STATE = WINED3DRS_BLENDOPALPHA; - -typedef enum _WINED3DBLEND -{ - WINED3DBLEND_ZERO = 1, - WINED3DBLEND_ONE = 2, - WINED3DBLEND_SRCCOLOR = 3, - WINED3DBLEND_INVSRCCOLOR = 4, - WINED3DBLEND_SRCALPHA = 5, - WINED3DBLEND_INVSRCALPHA = 6, - WINED3DBLEND_DESTALPHA = 7, - WINED3DBLEND_INVDESTALPHA = 8, - WINED3DBLEND_DESTCOLOR = 9, - WINED3DBLEND_INVDESTCOLOR = 10, - WINED3DBLEND_SRCALPHASAT = 11, - WINED3DBLEND_BOTHSRCALPHA = 12, - WINED3DBLEND_BOTHINVSRCALPHA = 13, - WINED3DBLEND_BLENDFACTOR = 14, - WINED3DBLEND_INVBLENDFACTOR = 15, - WINED3DBLEND_FORCE_DWORD = 0x7fffffff -} WINED3DBLEND; - -typedef enum _WINED3DBLENDOP -{ - WINED3DBLENDOP_ADD = 1, - WINED3DBLENDOP_SUBTRACT = 2, - WINED3DBLENDOP_REVSUBTRACT = 3, - WINED3DBLENDOP_MIN = 4, - WINED3DBLENDOP_MAX = 5, - WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff -} WINED3DBLENDOP; - -typedef enum _WINED3DVERTEXBLENDFLAGS -{ - WINED3DVBF_DISABLE = 0, - WINED3DVBF_1WEIGHTS = 1, - WINED3DVBF_2WEIGHTS = 2, - WINED3DVBF_3WEIGHTS = 3, - WINED3DVBF_TWEENING = 255, - WINED3DVBF_0WEIGHTS = 256 -} WINED3DVERTEXBLENDFLAGS; - -typedef enum _WINED3DCMPFUNC -{ - WINED3DCMP_NEVER = 1, - WINED3DCMP_LESS = 2, - WINED3DCMP_EQUAL = 3, - WINED3DCMP_LESSEQUAL = 4, - WINED3DCMP_GREATER = 5, - WINED3DCMP_NOTEQUAL = 6, - WINED3DCMP_GREATEREQUAL = 7, - WINED3DCMP_ALWAYS = 8, - WINED3DCMP_FORCE_DWORD = 0x7fffffff -} WINED3DCMPFUNC; - -typedef enum _WINED3DZBUFFERTYPE -{ - WINED3DZB_FALSE = 0, - WINED3DZB_TRUE = 1, - WINED3DZB_USEW = 2, - WINED3DZB_FORCE_DWORD = 0x7fffffff -} WINED3DZBUFFERTYPE; - -typedef enum _WINED3DFOGMODE -{ - WINED3DFOG_NONE = 0, - WINED3DFOG_EXP = 1, - WINED3DFOG_EXP2 = 2, - WINED3DFOG_LINEAR = 3, - WINED3DFOG_FORCE_DWORD = 0x7fffffff -} WINED3DFOGMODE; - -typedef enum _WINED3DSHADEMODE -{ - WINED3DSHADE_FLAT = 1, - WINED3DSHADE_GOURAUD = 2, - WINED3DSHADE_PHONG = 3, - WINED3DSHADE_FORCE_DWORD = 0x7fffffff -} WINED3DSHADEMODE; - -typedef enum _WINED3DFILLMODE -{ - WINED3DFILL_POINT = 1, - WINED3DFILL_WIREFRAME = 2, - WINED3DFILL_SOLID = 3, - WINED3DFILL_FORCE_DWORD = 0x7fffffff -} WINED3DFILLMODE; - -typedef enum _WINED3DCULL -{ - WINED3DCULL_NONE = 1, - WINED3DCULL_CW = 2, - WINED3DCULL_CCW = 3, - WINED3DCULL_FORCE_DWORD = 0x7fffffff -} WINED3DCULL; - -typedef enum _WINED3DSTENCILOP -{ - WINED3DSTENCILOP_KEEP = 1, - WINED3DSTENCILOP_ZERO = 2, - WINED3DSTENCILOP_REPLACE = 3, - WINED3DSTENCILOP_INCRSAT = 4, - WINED3DSTENCILOP_DECRSAT = 5, - WINED3DSTENCILOP_INVERT = 6, - WINED3DSTENCILOP_INCR = 7, - WINED3DSTENCILOP_DECR = 8, - WINED3DSTENCILOP_FORCE_DWORD = 0x7fffffff -} WINED3DSTENCILOP; - -typedef enum _WINED3DMATERIALCOLORSOURCE -{ - WINED3DMCS_MATERIAL = 0, - WINED3DMCS_COLOR1 = 1, - WINED3DMCS_COLOR2 = 2, - WINED3DMCS_FORCE_DWORD = 0x7fffffff -} WINED3DMATERIALCOLORSOURCE; - -typedef enum _WINED3DPATCHEDGESTYLE -{ - WINED3DPATCHEDGE_DISCRETE = 0, - WINED3DPATCHEDGE_CONTINUOUS = 1, - WINED3DPATCHEDGE_FORCE_DWORD = 0x7fffffff -} WINED3DPATCHEDGESTYLE; - -typedef enum _WINED3DBACKBUFFER_TYPE -{ - WINED3DBACKBUFFER_TYPE_MONO = 0, - WINED3DBACKBUFFER_TYPE_LEFT = 1, - WINED3DBACKBUFFER_TYPE_RIGHT = 2, - WINED3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff -} WINED3DBACKBUFFER_TYPE; - -typedef enum _WINED3DSWAPEFFECT -{ - WINED3DSWAPEFFECT_DISCARD = 1, - WINED3DSWAPEFFECT_FLIP = 2, - WINED3DSWAPEFFECT_COPY = 3, - WINED3DSWAPEFFECT_COPY_VSYNC = 4, - WINED3DSWAPEFFECT_FORCE_DWORD = 0xffffffff -} WINED3DSWAPEFFECT; - -typedef enum _WINED3DSAMPLERSTATETYPE -{ - WINED3DSAMP_ADDRESSU = 1, - WINED3DSAMP_ADDRESSV = 2, - WINED3DSAMP_ADDRESSW = 3, - WINED3DSAMP_BORDERCOLOR = 4, - WINED3DSAMP_MAGFILTER = 5, - WINED3DSAMP_MINFILTER = 6, - WINED3DSAMP_MIPFILTER = 7, - WINED3DSAMP_MIPMAPLODBIAS = 8, - WINED3DSAMP_MAXMIPLEVEL = 9, - WINED3DSAMP_MAXANISOTROPY = 10, - WINED3DSAMP_SRGBTEXTURE = 11, - WINED3DSAMP_ELEMENTINDEX = 12, - WINED3DSAMP_DMAPOFFSET = 13, - WINED3DSAMP_FORCE_DWORD = 0x7fffffff, -} WINED3DSAMPLERSTATETYPE; -const UINT WINED3D_HIGHEST_SAMPLER_STATE = WINED3DSAMP_DMAPOFFSET; - -typedef enum _WINED3DMULTISAMPLE_TYPE -{ - WINED3DMULTISAMPLE_NONE = 0, - WINED3DMULTISAMPLE_NONMASKABLE = 1, - WINED3DMULTISAMPLE_2_SAMPLES = 2, - WINED3DMULTISAMPLE_3_SAMPLES = 3, - WINED3DMULTISAMPLE_4_SAMPLES = 4, - WINED3DMULTISAMPLE_5_SAMPLES = 5, - WINED3DMULTISAMPLE_6_SAMPLES = 6, - WINED3DMULTISAMPLE_7_SAMPLES = 7, - WINED3DMULTISAMPLE_8_SAMPLES = 8, - WINED3DMULTISAMPLE_9_SAMPLES = 9, - WINED3DMULTISAMPLE_10_SAMPLES = 10, - WINED3DMULTISAMPLE_11_SAMPLES = 11, - WINED3DMULTISAMPLE_12_SAMPLES = 12, - WINED3DMULTISAMPLE_13_SAMPLES = 13, - WINED3DMULTISAMPLE_14_SAMPLES = 14, - WINED3DMULTISAMPLE_15_SAMPLES = 15, - WINED3DMULTISAMPLE_16_SAMPLES = 16, - WINED3DMULTISAMPLE_FORCE_DWORD = 0xffffffff -} WINED3DMULTISAMPLE_TYPE; - -typedef enum _WINED3DTEXTURESTAGESTATETYPE -{ - WINED3DTSS_COLOROP = 0, - WINED3DTSS_COLORARG1 = 1, - WINED3DTSS_COLORARG2 = 2, - WINED3DTSS_ALPHAOP = 3, - WINED3DTSS_ALPHAARG1 = 4, - WINED3DTSS_ALPHAARG2 = 5, - WINED3DTSS_BUMPENVMAT00 = 6, - WINED3DTSS_BUMPENVMAT01 = 7, - WINED3DTSS_BUMPENVMAT10 = 8, - WINED3DTSS_BUMPENVMAT11 = 9, - WINED3DTSS_TEXCOORDINDEX = 10, - WINED3DTSS_BUMPENVLSCALE = 11, - WINED3DTSS_BUMPENVLOFFSET = 12, - WINED3DTSS_TEXTURETRANSFORMFLAGS = 13, - WINED3DTSS_COLORARG0 = 14, - WINED3DTSS_ALPHAARG0 = 15, - WINED3DTSS_RESULTARG = 16, - WINED3DTSS_CONSTANT = 17, - WINED3DTSS_FORCE_DWORD = 0x7fffffff -} WINED3DTEXTURESTAGESTATETYPE; -const UINT WINED3D_HIGHEST_TEXTURE_STATE = WINED3DTSS_CONSTANT; - -typedef enum _WINED3DTEXTURETRANSFORMFLAGS -{ - WINED3DTTFF_DISABLE = 0, - WINED3DTTFF_COUNT1 = 1, - WINED3DTTFF_COUNT2 = 2, - WINED3DTTFF_COUNT3 = 3, - WINED3DTTFF_COUNT4 = 4, - WINED3DTTFF_PROJECTED = 256, - WINED3DTTFF_FORCE_DWORD = 0x7fffffff -} WINED3DTEXTURETRANSFORMFLAGS; - -typedef enum _WINED3DTEXTUREOP -{ - WINED3DTOP_DISABLE = 1, - WINED3DTOP_SELECTARG1 = 2, - WINED3DTOP_SELECTARG2 = 3, - WINED3DTOP_MODULATE = 4, - WINED3DTOP_MODULATE2X = 5, - WINED3DTOP_MODULATE4X = 6, - WINED3DTOP_ADD = 7, - WINED3DTOP_ADDSIGNED = 8, - WINED3DTOP_ADDSIGNED2X = 9, - WINED3DTOP_SUBTRACT = 10, - WINED3DTOP_ADDSMOOTH = 11, - WINED3DTOP_BLENDDIFFUSEALPHA = 12, - WINED3DTOP_BLENDTEXTUREALPHA = 13, - WINED3DTOP_BLENDFACTORALPHA = 14, - WINED3DTOP_BLENDTEXTUREALPHAPM = 15, - WINED3DTOP_BLENDCURRENTALPHA = 16, - WINED3DTOP_PREMODULATE = 17, - WINED3DTOP_MODULATEALPHA_ADDCOLOR = 18, - WINED3DTOP_MODULATECOLOR_ADDALPHA = 19, - WINED3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, - WINED3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, - WINED3DTOP_BUMPENVMAP = 22, - WINED3DTOP_BUMPENVMAPLUMINANCE = 23, - WINED3DTOP_DOTPRODUCT3 = 24, - WINED3DTOP_MULTIPLYADD = 25, - WINED3DTOP_LERP = 26, - WINED3DTOP_FORCE_DWORD = 0x7fffffff, -} WINED3DTEXTUREOP; - -typedef enum _WINED3DTEXTUREADDRESS -{ - WINED3DTADDRESS_WRAP = 1, - WINED3DTADDRESS_MIRROR = 2, - WINED3DTADDRESS_CLAMP = 3, - WINED3DTADDRESS_BORDER = 4, - WINED3DTADDRESS_MIRRORONCE = 5, - WINED3DTADDRESS_FORCE_DWORD = 0x7fffffff -} WINED3DTEXTUREADDRESS; - -typedef enum _WINED3DTRANSFORMSTATETYPE -{ - WINED3DTS_VIEW = 2, - WINED3DTS_PROJECTION = 3, - WINED3DTS_TEXTURE0 = 16, - WINED3DTS_TEXTURE1 = 17, - WINED3DTS_TEXTURE2 = 18, - WINED3DTS_TEXTURE3 = 19, - WINED3DTS_TEXTURE4 = 20, - WINED3DTS_TEXTURE5 = 21, - WINED3DTS_TEXTURE6 = 22, - WINED3DTS_TEXTURE7 = 23, - WINED3DTS_WORLD = 256, /*WINED3DTS_WORLDMATRIX(0)*/ - WINED3DTS_WORLD1 = 257, - WINED3DTS_WORLD2 = 258, - WINED3DTS_WORLD3 = 259, - WINED3DTS_FORCE_DWORD = 0x7fffffff -} WINED3DTRANSFORMSTATETYPE; -cpp_quote("#define WINED3DTS_WORLDMATRIX(index) (WINED3DTRANSFORMSTATETYPE)(index + 256)") - -typedef enum _WINED3DBASISTYPE -{ - WINED3DBASIS_BEZIER = 0, - WINED3DBASIS_BSPLINE = 1, - WINED3DBASIS_INTERPOLATE = 2, - WINED3DBASIS_FORCE_DWORD = 0x7fffffff -} WINED3DBASISTYPE; - -typedef enum _WINED3DCUBEMAP_FACES -{ - WINED3DCUBEMAP_FACE_POSITIVE_X = 0, - WINED3DCUBEMAP_FACE_NEGATIVE_X = 1, - WINED3DCUBEMAP_FACE_POSITIVE_Y = 2, - WINED3DCUBEMAP_FACE_NEGATIVE_Y = 3, - WINED3DCUBEMAP_FACE_POSITIVE_Z = 4, - WINED3DCUBEMAP_FACE_NEGATIVE_Z = 5, - WINED3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff -} WINED3DCUBEMAP_FACES; - -typedef enum _WINED3DTEXTUREFILTERTYPE -{ - WINED3DTEXF_NONE = 0, - WINED3DTEXF_POINT = 1, - WINED3DTEXF_LINEAR = 2, - WINED3DTEXF_ANISOTROPIC = 3, - WINED3DTEXF_FLATCUBIC = 4, - WINED3DTEXF_GAUSSIANCUBIC = 5, - WINED3DTEXF_PYRAMIDALQUAD = 6, - WINED3DTEXF_GAUSSIANQUAD = 7, - WINED3DTEXF_FORCE_DWORD = 0x7fffffff -} WINED3DTEXTUREFILTERTYPE; - -typedef enum _WINED3DRESOURCETYPE -{ - WINED3DRTYPE_SURFACE = 1, - WINED3DRTYPE_VOLUME = 2, - WINED3DRTYPE_TEXTURE = 3, - WINED3DRTYPE_VOLUMETEXTURE = 4, - WINED3DRTYPE_CUBETEXTURE = 5, - WINED3DRTYPE_BUFFER = 6, - WINED3DRTYPE_FORCE_DWORD = 0x7fffffff -} WINED3DRESOURCETYPE; -const UINT WINED3DRTYPECOUNT = WINED3DRTYPE_BUFFER + 1; - -typedef enum _WINED3DPOOL -{ - WINED3DPOOL_DEFAULT = 0, - WINED3DPOOL_MANAGED = 1, - WINED3DPOOL_SYSTEMMEM = 2, - WINED3DPOOL_SCRATCH = 3, - WINED3DPOOL_FORCE_DWORD = 0x7fffffff -} WINED3DPOOL; - -typedef enum _WINED3DQUERYTYPE -{ - WINED3DQUERYTYPE_VCACHE = 4, - WINED3DQUERYTYPE_RESOURCEMANAGER = 5, - WINED3DQUERYTYPE_VERTEXSTATS = 6, - WINED3DQUERYTYPE_EVENT = 8, - WINED3DQUERYTYPE_OCCLUSION = 9, - WINED3DQUERYTYPE_TIMESTAMP = 10, - WINED3DQUERYTYPE_TIMESTAMPDISJOINT = 11, - WINED3DQUERYTYPE_TIMESTAMPFREQ = 12, - WINED3DQUERYTYPE_PIPELINETIMINGS = 13, - WINED3DQUERYTYPE_INTERFACETIMINGS = 14, - WINED3DQUERYTYPE_VERTEXTIMINGS = 15, - WINED3DQUERYTYPE_PIXELTIMINGS = 16, - WINED3DQUERYTYPE_BANDWIDTHTIMINGS = 17, - WINED3DQUERYTYPE_CACHEUTILIZATION = 18 -} WINED3DQUERYTYPE; - -const UINT WINED3DISSUE_BEGIN = (1 << 1); -const UINT WINED3DISSUE_END = (1 << 0); -const UINT WINED3DGETDATA_FLUSH = (1 << 0); - -typedef enum _WINED3DSTATEBLOCKTYPE -{ - WINED3DSBT_INIT = 0, - WINED3DSBT_ALL = 1, - WINED3DSBT_PIXELSTATE = 2, - WINED3DSBT_VERTEXSTATE = 3, - WINED3DSBT_RECORDED = 4, /* WineD3D private */ - WINED3DSBT_FORCE_DWORD = 0xffffffff -} WINED3DSTATEBLOCKTYPE; - -typedef enum _WINED3DDECLMETHOD -{ - WINED3DDECLMETHOD_DEFAULT = 0, - WINED3DDECLMETHOD_PARTIALU = 1, - WINED3DDECLMETHOD_PARTIALV = 2, - WINED3DDECLMETHOD_CROSSUV = 3, - WINED3DDECLMETHOD_UV = 4, - WINED3DDECLMETHOD_LOOKUP = 5, - WINED3DDECLMETHOD_LOOKUPPRESAMPLED = 6 -} WINED3DDECLMETHOD; - -typedef enum _WINED3DDECLUSAGE -{ - WINED3DDECLUSAGE_POSITION = 0, - WINED3DDECLUSAGE_BLENDWEIGHT = 1, - WINED3DDECLUSAGE_BLENDINDICES = 2, - WINED3DDECLUSAGE_NORMAL = 3, - WINED3DDECLUSAGE_PSIZE = 4, - WINED3DDECLUSAGE_TEXCOORD = 5, - WINED3DDECLUSAGE_TANGENT = 6, - WINED3DDECLUSAGE_BINORMAL = 7, - WINED3DDECLUSAGE_TESSFACTOR = 8, - WINED3DDECLUSAGE_POSITIONT = 9, - WINED3DDECLUSAGE_COLOR = 10, - WINED3DDECLUSAGE_FOG = 11, - WINED3DDECLUSAGE_DEPTH = 12, - WINED3DDECLUSAGE_SAMPLE = 13 -} WINED3DDECLUSAGE; - -typedef enum _WINED3DSURFTYPE -{ - SURFACE_UNKNOWN = 0, /* Default / Unknown surface type */ - SURFACE_OPENGL, /* OpenGL surface: Renders using libGL, needed for 3D */ - SURFACE_GDI, /* User surface. No 3D, DirectDraw rendering with GDI */ -} WINED3DSURFTYPE; - -enum wined3d_sysval_semantic -{ - WINED3D_SV_DEPTH = 0xffffffff, - WINED3D_SV_TARGET0 = 0, - WINED3D_SV_TARGET1 = 1, - WINED3D_SV_TARGET2 = 2, - WINED3D_SV_TARGET3 = 3, - WINED3D_SV_TARGET4 = 4, - WINED3D_SV_TARGET5 = 5, - WINED3D_SV_TARGET6 = 6, - WINED3D_SV_TARGET7 = 7, -}; - -const UINT WINED3DCOLORWRITEENABLE_RED = (1<<0); -const UINT WINED3DCOLORWRITEENABLE_GREEN = (1<<1); -const UINT WINED3DCOLORWRITEENABLE_BLUE = (1<<2); -const UINT WINED3DCOLORWRITEENABLE_ALPHA = (1<<3); - -const UINT WINED3DADAPTER_DEFAULT = 0; -const UINT WINED3DENUM_NO_WHQL_LEVEL = 2; -const UINT WINED3DPRESENT_BACK_BUFFER_MAX = 3; - -const UINT WINED3DTSS_TCI_PASSTHRU = 0x00000; -const UINT WINED3DTSS_TCI_CAMERASPACENORMAL = 0x10000; -const UINT WINED3DTSS_TCI_CAMERASPACEPOSITION = 0x20000; -const UINT WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR = 0x30000; -const UINT WINED3DTSS_TCI_SPHEREMAP = 0x40000; - -const UINT WINED3DTA_SELECTMASK = 0x0000000f; -const UINT WINED3DTA_DIFFUSE = 0x00000000; -const UINT WINED3DTA_CURRENT = 0x00000001; -const UINT WINED3DTA_TEXTURE = 0x00000002; -const UINT WINED3DTA_TFACTOR = 0x00000003; -const UINT WINED3DTA_SPECULAR = 0x00000004; -const UINT WINED3DTA_TEMP = 0x00000005; -const UINT WINED3DTA_CONSTANT = 0x00000006; -const UINT WINED3DTA_COMPLEMENT = 0x00000010; -const UINT WINED3DTA_ALPHAREPLICATE = 0x00000020; - -const UINT WINED3DPRESENTFLAG_LOCKABLE_BACKBUFFER = 0x00000001; -const UINT WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL = 0x00000002; -const UINT WINED3DPRESENTFLAG_DEVICECLIP = 0x00000004; -const UINT WINED3DPRESENTFLAG_VIDEO = 0x00000010; -const UINT WINED3DPRESENTFLAG_NOAUTOROTATE = 0x00000020; -const UINT WINED3DPRESENTFLAG_UNPRUNEDMODE = 0x00000040; - -const UINT WINED3DDP_MAXTEXCOORD = 8; - -const UINT WINED3DUSAGE_RENDERTARGET = 0x00000001; -const UINT WINED3DUSAGE_DEPTHSTENCIL = 0x00000002; -const UINT WINED3DUSAGE_WRITEONLY = 0x00000008; -const UINT WINED3DUSAGE_SOFTWAREPROCESSING = 0x00000010; -const UINT WINED3DUSAGE_DONOTCLIP = 0x00000020; -const UINT WINED3DUSAGE_POINTS = 0x00000040; -const UINT WINED3DUSAGE_RTPATCHES = 0x00000080; -const UINT WINED3DUSAGE_NPATCHES = 0x00000100; -const UINT WINED3DUSAGE_DYNAMIC = 0x00000200; -const UINT WINED3DUSAGE_AUTOGENMIPMAP = 0x00000400; -const UINT WINED3DUSAGE_DMAP = 0x00004000; -const UINT WINED3DUSAGE_MASK = 0x00004fff; -const UINT WINED3DUSAGE_STATICDECL = 0x40000000; -const UINT WINED3DUSAGE_OVERLAY = 0x80000000; - -const UINT WINED3DUSAGE_QUERY_LEGACYBUMPMAP = 0x00008000; -const UINT WINED3DUSAGE_QUERY_FILTER = 0x00020000; -const UINT WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING = 0x00080000; -const UINT WINED3DUSAGE_QUERY_SRGBREAD = 0x00010000; -const UINT WINED3DUSAGE_QUERY_SRGBWRITE = 0x00040000; -const UINT WINED3DUSAGE_QUERY_VERTEXTEXTURE = 0x00100000; -const UINT WINED3DUSAGE_QUERY_WRAPANDMIP = 0x00200000; -const UINT WINED3DUSAGE_QUERY_MASK = 0x003f8000; - -const UINT WINED3DLOCK_READONLY = 0x0010; -const UINT WINED3DLOCK_NOSYSLOCK = 0x0800; -const UINT WINED3DLOCK_NOOVERWRITE = 0x1000; -const UINT WINED3DLOCK_DISCARD = 0x2000; -const UINT WINED3DLOCK_DONOTWAIT = 0x4000; -const UINT WINED3DLOCK_NO_DIRTY_UPDATE = 0x8000; - -const UINT WINED3DPRESENT_RATE_DEFAULT = 0x000000000; - -const UINT WINED3DPRESENT_INTERVAL_DEFAULT = 0x00000000; -const UINT WINED3DPRESENT_INTERVAL_ONE = 0x00000001; -const UINT WINED3DPRESENT_INTERVAL_TWO = 0x00000002; -const UINT WINED3DPRESENT_INTERVAL_THREE = 0x00000004; -const UINT WINED3DPRESENT_INTERVAL_FOUR = 0x00000008; -const UINT WINED3DPRESENT_INTERVAL_IMMEDIATE = 0x80000000; - -const UINT WINED3DMAXUSERCLIPPLANES = 32; -const UINT WINED3DCLIPPLANE0 = (1 << 0); -const UINT WINED3DCLIPPLANE1 = (1 << 1); -const UINT WINED3DCLIPPLANE2 = (1 << 2); -const UINT WINED3DCLIPPLANE3 = (1 << 3); -const UINT WINED3DCLIPPLANE4 = (1 << 4); -const UINT WINED3DCLIPPLANE5 = (1 << 5); - -/* FVF (Flexible Vertex Format) codes */ -const UINT WINED3DFVF_RESERVED0 = 0x0001; -const UINT WINED3DFVF_POSITION_MASK = 0x400e; -const UINT WINED3DFVF_XYZ = 0x0002; -const UINT WINED3DFVF_XYZRHW = 0x0004; -const UINT WINED3DFVF_XYZB1 = 0x0006; -const UINT WINED3DFVF_XYZB2 = 0x0008; -const UINT WINED3DFVF_XYZB3 = 0x000a; -const UINT WINED3DFVF_XYZB4 = 0x000c; -const UINT WINED3DFVF_XYZB5 = 0x000e; -const UINT WINED3DFVF_XYZW = 0x4002; -const UINT WINED3DFVF_NORMAL = 0x0010; -const UINT WINED3DFVF_PSIZE = 0x0020; -const UINT WINED3DFVF_DIFFUSE = 0x0040; -const UINT WINED3DFVF_SPECULAR = 0x0080; -const UINT WINED3DFVF_TEXCOUNT_MASK = 0x0f00; -const UINT WINED3DFVF_TEXCOUNT_SHIFT = 8; -const UINT WINED3DFVF_TEX0 = 0x0000; -const UINT WINED3DFVF_TEX1 = 0x0100; -const UINT WINED3DFVF_TEX2 = 0x0200; -const UINT WINED3DFVF_TEX3 = 0x0300; -const UINT WINED3DFVF_TEX4 = 0x0400; -const UINT WINED3DFVF_TEX5 = 0x0500; -const UINT WINED3DFVF_TEX6 = 0x0600; -const UINT WINED3DFVF_TEX7 = 0x0700; -const UINT WINED3DFVF_TEX8 = 0x0800; -const UINT WINED3DFVF_LASTBETA_UBYTE4 = 0x1000; -const UINT WINED3DFVF_LASTBETA_D3DCOLOR = 0x8000; -const UINT WINED3DFVF_RESERVED2 = 0x6000; - -const UINT WINED3DFVF_TEXTUREFORMAT1 = 3; -const UINT WINED3DFVF_TEXTUREFORMAT2 = 0; -const UINT WINED3DFVF_TEXTUREFORMAT3 = 1; -const UINT WINED3DFVF_TEXTUREFORMAT4 = 2; -cpp_quote("#define WINED3DFVF_TEXCOORDSIZE1(CoordIndex) (WINED3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))") -cpp_quote("#define WINED3DFVF_TEXCOORDSIZE2(CoordIndex) (WINED3DFVF_TEXTUREFORMAT2)") -cpp_quote("#define WINED3DFVF_TEXCOORDSIZE3(CoordIndex) (WINED3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))") -cpp_quote("#define WINED3DFVF_TEXCOORDSIZE4(CoordIndex) (WINED3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))") - -/* Clear flags */ -const UINT WINED3DCLEAR_TARGET = 0x00000001; -const UINT WINED3DCLEAR_ZBUFFER = 0x00000002; -const UINT WINED3DCLEAR_STENCIL = 0x00000004; - -/* Stream source flags */ -const UINT WINED3DSTREAMSOURCE_INDEXEDDATA = (1 << 30); -const UINT WINED3DSTREAMSOURCE_INSTANCEDATA = (2 << 30); - -/* SetPrivateData flags */ -const UINT WINED3DSPD_IUNKNOWN = 0x00000001; - -/* IWineD3D::CreateDevice behaviour flags */ -const UINT WINED3DCREATE_FPU_PRESERVE = 0x00000002; -const UINT WINED3DCREATE_PUREDEVICE = 0x00000010; -const UINT WINED3DCREATE_SOFTWARE_VERTEXPROCESSING = 0x00000020; -const UINT WINED3DCREATE_HARDWARE_VERTEXPROCESSING = 0x00000040; -const UINT WINED3DCREATE_MIXED_VERTEXPROCESSING = 0x00000080; -const UINT WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT = 0x00000100; -const UINT WINED3DCREATE_ADAPTERGROUP_DEVICE = 0x00000200; - -/* VTF defines */ -const UINT WINED3DDMAPSAMPLER = 0x100; -const UINT WINED3DVERTEXTEXTURESAMPLER0 = (WINED3DDMAPSAMPLER + 1); -const UINT WINED3DVERTEXTEXTURESAMPLER1 = (WINED3DDMAPSAMPLER + 2); -const UINT WINED3DVERTEXTEXTURESAMPLER2 = (WINED3DDMAPSAMPLER + 3); -const UINT WINED3DVERTEXTEXTURESAMPLER3 = (WINED3DDMAPSAMPLER + 4); - -const UINT WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD = 0x00000020; -const UINT WINED3DCAPS3_LINEAR_TO_SRGB_PRESENTATION = 0x00000080; -const UINT WINED3DCAPS3_COPY_TO_VIDMEM = 0x00000100; -const UINT WINED3DCAPS3_COPY_TO_SYSTEMMEM = 0x00000200; -const UINT WINED3DCAPS3_RESERVED = 0x8000001f; - -const UINT WINED3DDEVCAPS2_STREAMOFFSET = 0x00000001; -const UINT WINED3DDEVCAPS2_DMAPNPATCH = 0x00000002; -const UINT WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH = 0x00000004; -const UINT WINED3DDEVCAPS2_ADAPTIVETESSNPATCH = 0x00000008; -const UINT WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES = 0x00000010; -const UINT WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH = 0x00000020; -const UINT WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET = 0x00000040; - -const UINT WINED3DDTCAPS_UBYTE4 = 0x00000001; -const UINT WINED3DDTCAPS_UBYTE4N = 0x00000002; -const UINT WINED3DDTCAPS_SHORT2N = 0x00000004; -const UINT WINED3DDTCAPS_SHORT4N = 0x00000008; -const UINT WINED3DDTCAPS_USHORT2N = 0x00000010; -const UINT WINED3DDTCAPS_USHORT4N = 0x00000020; -const UINT WINED3DDTCAPS_UDEC3 = 0x00000040; -const UINT WINED3DDTCAPS_DEC3N = 0x00000080; -const UINT WINED3DDTCAPS_FLOAT16_2 = 0x00000100; -const UINT WINED3DDTCAPS_FLOAT16_4 = 0x00000200; - -const UINT WINED3DFVFCAPS_TEXCOORDCOUNTMASK = 0x0000ffff; -const UINT WINED3DFVFCAPS_DONOTSTRIPELEMENTS = 0x00080000; -const UINT WINED3DFVFCAPS_PSIZE = 0x00100000; - -const UINT WINED3DLINECAPS_TEXTURE = 0x00000001; -const UINT WINED3DLINECAPS_ZTEST = 0x00000002; -const UINT WINED3DLINECAPS_BLEND = 0x00000004; -const UINT WINED3DLINECAPS_ALPHACMP = 0x00000008; -const UINT WINED3DLINECAPS_FOG = 0x00000010; -const UINT WINED3DLINECAPS_ANTIALIAS = 0x00000020; - -const UINT WINED3DMAX30SHADERINSTRUCTIONS = 32768; -const UINT WINED3DMIN30SHADERINSTRUCTIONS = 512; - -const UINT WINED3DPBLENDCAPS_ZERO = 0x00000001; -const UINT WINED3DPBLENDCAPS_ONE = 0x00000002; -const UINT WINED3DPBLENDCAPS_SRCCOLOR = 0x00000004; -const UINT WINED3DPBLENDCAPS_INVSRCCOLOR = 0x00000008; -const UINT WINED3DPBLENDCAPS_SRCALPHA = 0x00000010; -const UINT WINED3DPBLENDCAPS_INVSRCALPHA = 0x00000020; -const UINT WINED3DPBLENDCAPS_DESTALPHA = 0x00000040; -const UINT WINED3DPBLENDCAPS_INVDESTALPHA = 0x00000080; -const UINT WINED3DPBLENDCAPS_DESTCOLOR = 0x00000100; -const UINT WINED3DPBLENDCAPS_INVDESTCOLOR = 0x00000200; -const UINT WINED3DPBLENDCAPS_SRCALPHASAT = 0x00000400; -const UINT WINED3DPBLENDCAPS_BOTHSRCALPHA = 0x00000800; -const UINT WINED3DPBLENDCAPS_BOTHINVSRCALPHA = 0x00001000; -const UINT WINED3DPBLENDCAPS_BLENDFACTOR = 0x00002000; - -const UINT WINED3DPCMPCAPS_NEVER = 0x00000001; -const UINT WINED3DPCMPCAPS_LESS = 0x00000002; -const UINT WINED3DPCMPCAPS_EQUAL = 0x00000004; -const UINT WINED3DPCMPCAPS_LESSEQUAL = 0x00000008; -const UINT WINED3DPCMPCAPS_GREATER = 0x00000010; -const UINT WINED3DPCMPCAPS_NOTEQUAL = 0x00000020; -const UINT WINED3DPCMPCAPS_GREATEREQUAL = 0x00000040; -const UINT WINED3DPCMPCAPS_ALWAYS = 0x00000080; - -const UINT WINED3DPMISCCAPS_MASKZ = 0x00000002; -const UINT WINED3DPMISCCAPS_LINEPATTERNREP = 0x00000004; -const UINT WINED3DPMISCCAPS_CULLNONE = 0x00000010; -const UINT WINED3DPMISCCAPS_CULLCW = 0x00000020; -const UINT WINED3DPMISCCAPS_CULLCCW = 0x00000040; -const UINT WINED3DPMISCCAPS_COLORWRITEENABLE = 0x00000080; -const UINT WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS = 0x00000100; -const UINT WINED3DPMISCCAPS_CLIPTLVERTS = 0x00000200; -const UINT WINED3DPMISCCAPS_TSSARGTEMP = 0x00000400; -const UINT WINED3DPMISCCAPS_BLENDOP = 0x00000800; -const UINT WINED3DPMISCCAPS_NULLREFERENCE = 0x00001000; -const UINT WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS = 0x00004000; -const UINT WINED3DPMISCCAPS_PERSTAGECONSTANT = 0x00008000; -const UINT WINED3DPMISCCAPS_FOGANDSPECULARALPHA = 0x00010000; -const UINT WINED3DPMISCCAPS_SEPARATEALPHABLEND = 0x00020000; -const UINT WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS = 0x00040000; -const UINT WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING = 0x00080000; -const UINT WINED3DPMISCCAPS_FOGVERTEXCLAMPED = 0x00100000; - -const UINT WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH = 24; -const UINT WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0; -const UINT WINED3DPS20_MAX_NUMTEMPS = 32; -const UINT WINED3DPS20_MIN_NUMTEMPS = 12; -const UINT WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH = 4; -const UINT WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH = 0; -const UINT WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS = 512; -const UINT WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS = 96; - -const UINT WINED3DPS20CAPS_ARBITRARYSWIZZLE = 0x00000001; -const UINT WINED3DPS20CAPS_GRADIENTINSTRUCTIONS = 0x00000002; -const UINT WINED3DPS20CAPS_PREDICATION = 0x00000004; -const UINT WINED3DPS20CAPS_NODEPENDENTREADLIMIT = 0x00000008; -const UINT WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT = 0x00000010; - -const UINT WINED3DPTADDRESSCAPS_WRAP = 0x00000001; -const UINT WINED3DPTADDRESSCAPS_MIRROR = 0x00000002; -const UINT WINED3DPTADDRESSCAPS_CLAMP = 0x00000004; -const UINT WINED3DPTADDRESSCAPS_BORDER = 0x00000008; -const UINT WINED3DPTADDRESSCAPS_INDEPENDENTUV = 0x00000010; -const UINT WINED3DPTADDRESSCAPS_MIRRORONCE = 0x00000020; - -const UINT WINED3DSTENCILCAPS_KEEP = 0x00000001; -const UINT WINED3DSTENCILCAPS_ZERO = 0x00000002; -const UINT WINED3DSTENCILCAPS_REPLACE = 0x00000004; -const UINT WINED3DSTENCILCAPS_INCRSAT = 0x00000008; -const UINT WINED3DSTENCILCAPS_DECRSAT = 0x00000010; -const UINT WINED3DSTENCILCAPS_INVERT = 0x00000020; -const UINT WINED3DSTENCILCAPS_INCR = 0x00000040; -const UINT WINED3DSTENCILCAPS_DECR = 0x00000080; -const UINT WINED3DSTENCILCAPS_TWOSIDED = 0x00000100; - -const UINT WINED3DTEXOPCAPS_DISABLE = 0x00000001; -const UINT WINED3DTEXOPCAPS_SELECTARG1 = 0x00000002; -const UINT WINED3DTEXOPCAPS_SELECTARG2 = 0x00000004; -const UINT WINED3DTEXOPCAPS_MODULATE = 0x00000008; -const UINT WINED3DTEXOPCAPS_MODULATE2X = 0x00000010; -const UINT WINED3DTEXOPCAPS_MODULATE4X = 0x00000020; -const UINT WINED3DTEXOPCAPS_ADD = 0x00000040; -const UINT WINED3DTEXOPCAPS_ADDSIGNED = 0x00000080; -const UINT WINED3DTEXOPCAPS_ADDSIGNED2X = 0x00000100; -const UINT WINED3DTEXOPCAPS_SUBTRACT = 0x00000200; -const UINT WINED3DTEXOPCAPS_ADDSMOOTH = 0x00000400; -const UINT WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA = 0x00000800; -const UINT WINED3DTEXOPCAPS_BLENDTEXTUREALPHA = 0x00001000; -const UINT WINED3DTEXOPCAPS_BLENDFACTORALPHA = 0x00002000; -const UINT WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM = 0x00004000; -const UINT WINED3DTEXOPCAPS_BLENDCURRENTALPHA = 0x00008000; -const UINT WINED3DTEXOPCAPS_PREMODULATE = 0x00010000; -const UINT WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR = 0x00020000; -const UINT WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA = 0x00040000; -const UINT WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR = 0x00080000; -const UINT WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA = 0x00100000; -const UINT WINED3DTEXOPCAPS_BUMPENVMAP = 0x00200000; -const UINT WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE = 0x00400000; -const UINT WINED3DTEXOPCAPS_DOTPRODUCT3 = 0x00800000; -const UINT WINED3DTEXOPCAPS_MULTIPLYADD = 0x01000000; -const UINT WINED3DTEXOPCAPS_LERP = 0x02000000; - -const UINT WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH = 24; -const UINT WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0; -const UINT WINED3DVS20_MAX_NUMTEMPS = 32; -const UINT WINED3DVS20_MIN_NUMTEMPS = 12; -const UINT WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH = 4; -const UINT WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH = 1; - -const UINT WINED3DVS20CAPS_PREDICATION = 0x00000001; - -const UINT WINED3DCAPS2_NO2DDURING3DSCENE = 0x00000002; -const UINT WINED3DCAPS2_FULLSCREENGAMMA = 0x00020000; -const UINT WINED3DCAPS2_CANRENDERWINDOWED = 0x00080000; -const UINT WINED3DCAPS2_CANCALIBRATEGAMMA = 0x00100000; -const UINT WINED3DCAPS2_RESERVED = 0x02000000; -const UINT WINED3DCAPS2_CANMANAGERESOURCE = 0x10000000; -const UINT WINED3DCAPS2_DYNAMICTEXTURES = 0x20000000; -const UINT WINED3DCAPS2_CANAUTOGENMIPMAP = 0x40000000; - -const UINT WINED3DPRASTERCAPS_DITHER = 0x00000001; -const UINT WINED3DPRASTERCAPS_ROP2 = 0x00000002; -const UINT WINED3DPRASTERCAPS_XOR = 0x00000004; -const UINT WINED3DPRASTERCAPS_PAT = 0x00000008; -const UINT WINED3DPRASTERCAPS_ZTEST = 0x00000010; -const UINT WINED3DPRASTERCAPS_SUBPIXEL = 0x00000020; -const UINT WINED3DPRASTERCAPS_SUBPIXELX = 0x00000040; -const UINT WINED3DPRASTERCAPS_FOGVERTEX = 0x00000080; -const UINT WINED3DPRASTERCAPS_FOGTABLE = 0x00000100; -const UINT WINED3DPRASTERCAPS_STIPPLE = 0x00000200; -const UINT WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT = 0x00000400; -const UINT WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT = 0x00000800; -const UINT WINED3DPRASTERCAPS_ANTIALIASEDGES = 0x00001000; -const UINT WINED3DPRASTERCAPS_MIPMAPLODBIAS = 0x00002000; -const UINT WINED3DPRASTERCAPS_ZBIAS = 0x00004000; -const UINT WINED3DPRASTERCAPS_ZBUFFERLESSHSR = 0x00008000; -const UINT WINED3DPRASTERCAPS_FOGRANGE = 0x00010000; -const UINT WINED3DPRASTERCAPS_ANISOTROPY = 0x00020000; -const UINT WINED3DPRASTERCAPS_WBUFFER = 0x00040000; -const UINT WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT = 0x00080000; -const UINT WINED3DPRASTERCAPS_WFOG = 0x00100000; -const UINT WINED3DPRASTERCAPS_ZFOG = 0x00200000; -const UINT WINED3DPRASTERCAPS_COLORPERSPECTIVE = 0x00400000; -const UINT WINED3DPRASTERCAPS_SCISSORTEST = 0x01000000; -const UINT WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS = 0x02000000; -const UINT WINED3DPRASTERCAPS_DEPTHBIAS = 0x04000000; -const UINT WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE = 0x08000000; - -const UINT WINED3DPSHADECAPS_COLORFLATMONO = 0x00000001; -const UINT WINED3DPSHADECAPS_COLORFLATRGB = 0x00000002; -const UINT WINED3DPSHADECAPS_COLORGOURAUDMONO = 0x00000004; -const UINT WINED3DPSHADECAPS_COLORGOURAUDRGB = 0x00000008; -const UINT WINED3DPSHADECAPS_COLORPHONGMONO = 0x00000010; -const UINT WINED3DPSHADECAPS_COLORPHONGRGB = 0x00000020; -const UINT WINED3DPSHADECAPS_SPECULARFLATMONO = 0x00000040; -const UINT WINED3DPSHADECAPS_SPECULARFLATRGB = 0x00000080; -const UINT WINED3DPSHADECAPS_SPECULARGOURAUDMONO = 0x00000100; -const UINT WINED3DPSHADECAPS_SPECULARGOURAUDRGB = 0x00000200; -const UINT WINED3DPSHADECAPS_SPECULARPHONGMONO = 0x00000400; -const UINT WINED3DPSHADECAPS_SPECULARPHONGRGB = 0x00000800; -const UINT WINED3DPSHADECAPS_ALPHAFLATBLEND = 0x00001000; -const UINT WINED3DPSHADECAPS_ALPHAFLATSTIPPLED = 0x00002000; -const UINT WINED3DPSHADECAPS_ALPHAGOURAUDBLEND = 0x00004000; -const UINT WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED = 0x00008000; -const UINT WINED3DPSHADECAPS_ALPHAPHONGBLEND = 0x00010000; -const UINT WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED = 0x00020000; -const UINT WINED3DPSHADECAPS_FOGFLAT = 0x00040000; -const UINT WINED3DPSHADECAPS_FOGGOURAUD = 0x00080000; -const UINT WINED3DPSHADECAPS_FOGPHONG = 0x00100000; - -const UINT WINED3DPTEXTURECAPS_PERSPECTIVE = 0x00000001; -const UINT WINED3DPTEXTURECAPS_POW2 = 0x00000002; -const UINT WINED3DPTEXTURECAPS_ALPHA = 0x00000004; -const UINT WINED3DPTEXTURECAPS_TRANSPARENCY = 0x00000008; -const UINT WINED3DPTEXTURECAPS_BORDER = 0x00000010; -const UINT WINED3DPTEXTURECAPS_SQUAREONLY = 0x00000020; -const UINT WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE = 0x00000040; -const UINT WINED3DPTEXTURECAPS_ALPHAPALETTE = 0x00000080; -const UINT WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL = 0x00000100; -const UINT WINED3DPTEXTURECAPS_PROJECTED = 0x00000400; -const UINT WINED3DPTEXTURECAPS_CUBEMAP = 0x00000800; -const UINT WINED3DPTEXTURECAPS_COLORKEYBLEND = 0x00001000; -const UINT WINED3DPTEXTURECAPS_VOLUMEMAP = 0x00002000; -const UINT WINED3DPTEXTURECAPS_MIPMAP = 0x00004000; -const UINT WINED3DPTEXTURECAPS_MIPVOLUMEMAP = 0x00008000; -const UINT WINED3DPTEXTURECAPS_MIPCUBEMAP = 0x00010000; -const UINT WINED3DPTEXTURECAPS_CUBEMAP_POW2 = 0x00020000; -const UINT WINED3DPTEXTURECAPS_VOLUMEMAP_POW2 = 0x00040000; -const UINT WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV = 0x00200000; - -const UINT WINED3DPTFILTERCAPS_NEAREST = 0x00000001; -const UINT WINED3DPTFILTERCAPS_LINEAR = 0x00000002; -const UINT WINED3DPTFILTERCAPS_MIPNEAREST = 0x00000004; -const UINT WINED3DPTFILTERCAPS_MIPLINEAR = 0x00000008; -const UINT WINED3DPTFILTERCAPS_LINEARMIPNEAREST = 0x00000010; -const UINT WINED3DPTFILTERCAPS_LINEARMIPLINEAR = 0x00000020; -const UINT WINED3DPTFILTERCAPS_MINFPOINT = 0x00000100; -const UINT WINED3DPTFILTERCAPS_MINFLINEAR = 0x00000200; -const UINT WINED3DPTFILTERCAPS_MINFANISOTROPIC = 0x00000400; -const UINT WINED3DPTFILTERCAPS_MIPFPOINT = 0x00010000; -const UINT WINED3DPTFILTERCAPS_MIPFLINEAR = 0x00020000; -const UINT WINED3DPTFILTERCAPS_MAGFPOINT = 0x01000000; -const UINT WINED3DPTFILTERCAPS_MAGFLINEAR = 0x02000000; -const UINT WINED3DPTFILTERCAPS_MAGFANISOTROPIC = 0x04000000; -const UINT WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD = 0x08000000; -const UINT WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD = 0x10000000; - -const UINT WINED3DVTXPCAPS_TEXGEN = 0x00000001; -const UINT WINED3DVTXPCAPS_MATERIALSOURCE7 = 0x00000002; -const UINT WINED3DVTXPCAPS_VERTEXFOG = 0x00000004; -const UINT WINED3DVTXPCAPS_DIRECTIONALLIGHTS = 0x00000008; -const UINT WINED3DVTXPCAPS_POSITIONALLIGHTS = 0x00000010; -const UINT WINED3DVTXPCAPS_LOCALVIEWER = 0x00000020; -const UINT WINED3DVTXPCAPS_TWEENING = 0x00000040; -const UINT WINED3DVTXPCAPS_TEXGEN_SPHEREMAP = 0x00000100; -const UINT WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER = 0x00000200; - -const UINT WINED3DCURSORCAPS_COLOR = 0x00000001; -const UINT WINED3DCURSORCAPS_LOWRES = 0x00000002; - -const UINT WINED3DDEVCAPS_FLOATTLVERTEX = 0x00000001; -const UINT WINED3DDEVCAPS_SORTINCREASINGZ = 0x00000002; -const UINT WINED3DDEVCAPS_SORTDECREASINGZ = 0X00000004; -const UINT WINED3DDEVCAPS_SORTEXACT = 0x00000008; -const UINT WINED3DDEVCAPS_EXECUTESYSTEMMEMORY = 0x00000010; -const UINT WINED3DDEVCAPS_EXECUTEVIDEOMEMORY = 0x00000020; -const UINT WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY = 0x00000040; -const UINT WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY = 0x00000080; -const UINT WINED3DDEVCAPS_TEXTURESYSTEMMEMORY = 0x00000100; -const UINT WINED3DDEVCAPS_TEXTUREVIDEOMEMORY = 0x00000200; -const UINT WINED3DDEVCAPS_DRAWPRIMTLVERTEX = 0x00000400; -const UINT WINED3DDEVCAPS_CANRENDERAFTERFLIP = 0x00000800; -const UINT WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM = 0x00001000; -const UINT WINED3DDEVCAPS_DRAWPRIMITIVES2 = 0x00002000; -const UINT WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES = 0x00004000; -const UINT WINED3DDEVCAPS_DRAWPRIMITIVES2EX = 0x00008000; -const UINT WINED3DDEVCAPS_HWTRANSFORMANDLIGHT = 0x00010000; -const UINT WINED3DDEVCAPS_CANBLTSYSTONONLOCAL = 0x00020000; -const UINT WINED3DDEVCAPS_HWRASTERIZATION = 0x00080000; -const UINT WINED3DDEVCAPS_PUREDEVICE = 0x00100000; -const UINT WINED3DDEVCAPS_QUINTICRTPATCHES = 0x00200000; -const UINT WINED3DDEVCAPS_RTPATCHES = 0x00400000; -const UINT WINED3DDEVCAPS_RTPATCHHANDLEZERO = 0x00800000; -const UINT WINED3DDEVCAPS_NPATCHES = 0x01000000; - -/* dwDDFX */ -/* arithmetic stretching along y axis */ -const UINT WINEDDBLTFX_ARITHSTRETCHY = 0x00000001; -/* mirror on y axis */ -const UINT WINEDDBLTFX_MIRRORLEFTRIGHT = 0x00000002; -/* mirror on x axis */ -const UINT WINEDDBLTFX_MIRRORUPDOWN = 0x00000004; -/* do not tear */ -const UINT WINEDDBLTFX_NOTEARING = 0x00000008; -/* 180 degrees clockwise rotation */ -const UINT WINEDDBLTFX_ROTATE180 = 0x00000010; -/* 270 degrees clockwise rotation */ -const UINT WINEDDBLTFX_ROTATE270 = 0x00000020; -/* 90 degrees clockwise rotation */ -const UINT WINEDDBLTFX_ROTATE90 = 0x00000040; -/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */ -const UINT WINEDDBLTFX_ZBUFFERRANGE = 0x00000080; -/* add dwZBufferBaseDest to every source z value before compare */ -const UINT WINEDDBLTFX_ZBUFFERBASEDEST = 0x00000100; - -/* dwFlags for Blt* */ -const UINT WINEDDBLT_ALPHADEST = 0x00000001; -const UINT WINEDDBLT_ALPHADESTCONSTOVERRIDE = 0x00000002; -const UINT WINEDDBLT_ALPHADESTNEG = 0x00000004; -const UINT WINEDDBLT_ALPHADESTSURFACEOVERRIDE = 0x00000008; -const UINT WINEDDBLT_ALPHAEDGEBLEND = 0x00000010; -const UINT WINEDDBLT_ALPHASRC = 0x00000020; -const UINT WINEDDBLT_ALPHASRCCONSTOVERRIDE = 0x00000040; -const UINT WINEDDBLT_ALPHASRCNEG = 0x00000080; -const UINT WINEDDBLT_ALPHASRCSURFACEOVERRIDE = 0x00000100; -const UINT WINEDDBLT_ASYNC = 0x00000200; -const UINT WINEDDBLT_COLORFILL = 0x00000400; -const UINT WINEDDBLT_DDFX = 0x00000800; -const UINT WINEDDBLT_DDROPS = 0x00001000; -const UINT WINEDDBLT_KEYDEST = 0x00002000; -const UINT WINEDDBLT_KEYDESTOVERRIDE = 0x00004000; -const UINT WINEDDBLT_KEYSRC = 0x00008000; -const UINT WINEDDBLT_KEYSRCOVERRIDE = 0x00010000; -const UINT WINEDDBLT_ROP = 0x00020000; -const UINT WINEDDBLT_ROTATIONANGLE = 0x00040000; -const UINT WINEDDBLT_ZBUFFER = 0x00080000; -const UINT WINEDDBLT_ZBUFFERDESTCONSTOVERRIDE = 0x00100000; -const UINT WINEDDBLT_ZBUFFERDESTOVERRIDE = 0x00200000; -const UINT WINEDDBLT_ZBUFFERSRCCONSTOVERRIDE = 0x00400000; -const UINT WINEDDBLT_ZBUFFERSRCOVERRIDE = 0x00800000; -const UINT WINEDDBLT_WAIT = 0x01000000; -const UINT WINEDDBLT_DEPTHFILL = 0x02000000; -const UINT WINEDDBLT_DONOTWAIT = 0x08000000; - -/* dwTrans for BltFast */ -const UINT WINEDDBLTFAST_NOCOLORKEY = 0x00000000; -const UINT WINEDDBLTFAST_SRCCOLORKEY = 0x00000001; -const UINT WINEDDBLTFAST_DESTCOLORKEY = 0x00000002; -const UINT WINEDDBLTFAST_WAIT = 0x00000010; -const UINT WINEDDBLTFAST_DONOTWAIT = 0x00000020; - -/* DDSURFACEDESC.dwFlags */ -const UINT WINEDDSD_CAPS = 0x00000001; -const UINT WINEDDSD_HEIGHT = 0x00000002; -const UINT WINEDDSD_WIDTH = 0x00000004; -const UINT WINEDDSD_PITCH = 0x00000008; -const UINT WINEDDSD_BACKBUFFERCOUNT = 0x00000020; -const UINT WINEDDSD_ZBUFFERBITDEPTH = 0x00000040; -const UINT WINEDDSD_ALPHABITDEPTH = 0x00000080; -const UINT WINEDDSD_LPSURFACE = 0x00000800; -const UINT WINEDDSD_PIXELFORMAT = 0x00001000; -const UINT WINEDDSD_CKDESTOVERLAY = 0x00002000; -const UINT WINEDDSD_CKDESTBLT = 0x00004000; -const UINT WINEDDSD_CKSRCOVERLAY = 0x00008000; -const UINT WINEDDSD_CKSRCBLT = 0x00010000; -const UINT WINEDDSD_MIPMAPCOUNT = 0x00020000; -const UINT WINEDDSD_REFRESHRATE = 0x00040000; -const UINT WINEDDSD_LINEARSIZE = 0x00080000; -const UINT WINEDDSD_TEXTURESTAGE = 0x00100000; -const UINT WINEDDSD_FVF = 0x00200000; -const UINT WINEDDSD_SRCVBHANDLE = 0x00400000; -const UINT WINEDDSD_ALL = 0x007ff9ee; - -/* Set/Get Colour Key Flags */ -const UINT WINEDDCKEY_COLORSPACE = 0x00000001; /* Struct is single colour space */ -const UINT WINEDDCKEY_DESTBLT = 0x00000002; /* To be used as dest for blt */ -const UINT WINEDDCKEY_DESTOVERLAY = 0x00000004; /* To be used as dest for CK overlays */ -const UINT WINEDDCKEY_SRCBLT = 0x00000008; /* To be used as src for blt */ -const UINT WINEDDCKEY_SRCOVERLAY = 0x00000010; /* To be used as src for CK overlays */ - -/* dwFlags for GetBltStatus */ -const UINT WINEDDGBS_CANBLT = 0x00000001; -const UINT WINEDDGBS_ISBLTDONE = 0x00000002; - -/* dwFlags for GetFlipStatus */ -const UINT WINEDDGFS_CANFLIP = 0x00000001; -const UINT WINEDDGFS_ISFLIPDONE = 0x00000002; - -/* dwFlags for Flip */ -const UINT WINEDDFLIP_WAIT = 0x00000001; -const UINT WINEDDFLIP_EVEN = 0x00000002; /* only valid for overlay */ -const UINT WINEDDFLIP_ODD = 0x00000004; /* only valid for overlay */ -const UINT WINEDDFLIP_NOVSYNC = 0x00000008; -const UINT WINEDDFLIP_STEREO = 0x00000010; -const UINT WINEDDFLIP_DONOTWAIT = 0x00000020; -const UINT WINEDDFLIP_INTERVAL2 = 0x02000000; -const UINT WINEDDFLIP_INTERVAL3 = 0x03000000; -const UINT WINEDDFLIP_INTERVAL4 = 0x04000000; - -const UINT WINEDDOVER_ALPHADEST = 0x00000001; -const UINT WINEDDOVER_ALPHADESTCONSTOVERRIDE = 0x00000002; -const UINT WINEDDOVER_ALPHADESTNEG = 0x00000004; -const UINT WINEDDOVER_ALPHADESTSURFACEOVERRIDE = 0x00000008; -const UINT WINEDDOVER_ALPHAEDGEBLEND = 0x00000010; -const UINT WINEDDOVER_ALPHASRC = 0x00000020; -const UINT WINEDDOVER_ALPHASRCCONSTOVERRIDE = 0x00000040; -const UINT WINEDDOVER_ALPHASRCNEG = 0x00000080; -const UINT WINEDDOVER_ALPHASRCSURFACEOVERRIDE = 0x00000100; -const UINT WINEDDOVER_HIDE = 0x00000200; -const UINT WINEDDOVER_KEYDEST = 0x00000400; -const UINT WINEDDOVER_KEYDESTOVERRIDE = 0x00000800; -const UINT WINEDDOVER_KEYSRC = 0x00001000; -const UINT WINEDDOVER_KEYSRCOVERRIDE = 0x00002000; -const UINT WINEDDOVER_SHOW = 0x00004000; -const UINT WINEDDOVER_ADDDIRTYRECT = 0x00008000; -const UINT WINEDDOVER_REFRESHDIRTYRECTS = 0x00010000; -const UINT WINEDDOVER_REFRESHALL = 0x00020000; -const UINT WINEDDOVER_DDFX = 0x00080000; -const UINT WINEDDOVER_AUTOFLIP = 0x00100000; -const UINT WINEDDOVER_BOB = 0x00200000; -const UINT WINEDDOVER_OVERRIDEBOBWEAVE = 0x00400000; -const UINT WINEDDOVER_INTERLEAVED = 0x00800000; - -/* DirectDraw Caps */ -const UINT WINEDDSCAPS_RESERVED1 = 0x00000001; -const UINT WINEDDSCAPS_ALPHA = 0x00000002; -const UINT WINEDDSCAPS_BACKBUFFER = 0x00000004; -const UINT WINEDDSCAPS_COMPLEX = 0x00000008; -const UINT WINEDDSCAPS_FLIP = 0x00000010; -const UINT WINEDDSCAPS_FRONTBUFFER = 0x00000020; -const UINT WINEDDSCAPS_OFFSCREENPLAIN = 0x00000040; -const UINT WINEDDSCAPS_OVERLAY = 0x00000080; -const UINT WINEDDSCAPS_PALETTE = 0x00000100; -const UINT WINEDDSCAPS_PRIMARYSURFACE = 0x00000200; -const UINT WINEDDSCAPS_PRIMARYSURFACELEFT = 0x00000400; -const UINT WINEDDSCAPS_SYSTEMMEMORY = 0x00000800; -const UINT WINEDDSCAPS_TEXTURE = 0x00001000; -const UINT WINEDDSCAPS_3DDEVICE = 0x00002000; -const UINT WINEDDSCAPS_VIDEOMEMORY = 0x00004000; -const UINT WINEDDSCAPS_VISIBLE = 0x00008000; -const UINT WINEDDSCAPS_WRITEONLY = 0x00010000; -const UINT WINEDDSCAPS_ZBUFFER = 0x00020000; -const UINT WINEDDSCAPS_OWNDC = 0x00040000; -const UINT WINEDDSCAPS_LIVEVIDEO = 0x00080000; -const UINT WINEDDSCAPS_HWCODEC = 0x00100000; -const UINT WINEDDSCAPS_MODEX = 0x00200000; -const UINT WINEDDSCAPS_MIPMAP = 0x00400000; -const UINT WINEDDSCAPS_RESERVED2 = 0x00800000; -const UINT WINEDDSCAPS_ALLOCONLOAD = 0x04000000; -const UINT WINEDDSCAPS_VIDEOPORT = 0x08000000; -const UINT WINEDDSCAPS_LOCALVIDMEM = 0x10000000; -const UINT WINEDDSCAPS_NONLOCALVIDMEM = 0x20000000; -const UINT WINEDDSCAPS_STANDARDVGAMODE = 0x40000000; -const UINT WINEDDSCAPS_OPTIMIZED = 0x80000000; - -const UINT WINEDDCKEYCAPS_DESTBLT = 0x00000001; -const UINT WINEDDCKEYCAPS_DESTBLTCLRSPACE = 0x00000002; -const UINT WINEDDCKEYCAPS_DESTBLTCLRSPACEYUV = 0x00000004; -const UINT WINEDDCKEYCAPS_DESTBLTYUV = 0x00000008; -const UINT WINEDDCKEYCAPS_DESTOVERLAY = 0x00000010; -const UINT WINEDDCKEYCAPS_DESTOVERLAYCLRSPACE = 0x00000020; -const UINT WINEDDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = 0x00000040; -const UINT WINEDDCKEYCAPS_DESTOVERLAYONEACTIVE = 0x00000080; -const UINT WINEDDCKEYCAPS_DESTOVERLAYYUV = 0x00000100; -const UINT WINEDDCKEYCAPS_SRCBLT = 0x00000200; -const UINT WINEDDCKEYCAPS_SRCBLTCLRSPACE = 0x00000400; -const UINT WINEDDCKEYCAPS_SRCBLTCLRSPACEYUV = 0x00000800; -const UINT WINEDDCKEYCAPS_SRCBLTYUV = 0x00001000; -const UINT WINEDDCKEYCAPS_SRCOVERLAY = 0x00002000; -const UINT WINEDDCKEYCAPS_SRCOVERLAYCLRSPACE = 0x00004000; -const UINT WINEDDCKEYCAPS_SRCOVERLAYCLRSPACEYUV = 0x00008000; -const UINT WINEDDCKEYCAPS_SRCOVERLAYONEACTIVE = 0x00010000; -const UINT WINEDDCKEYCAPS_SRCOVERLAYYUV = 0x00020000; -const UINT WINEDDCKEYCAPS_NOCOSTOVERLAY = 0x00040000; - -const UINT WINEDDFXCAPS_BLTALPHA = 0x00000001; -const UINT WINEDDFXCAPS_OVERLAYALPHA = 0x00000004; -const UINT WINEDDFXCAPS_BLTARITHSTRETCHYN = 0x00000010; -const UINT WINEDDFXCAPS_BLTARITHSTRETCHY = 0x00000020; -const UINT WINEDDFXCAPS_BLTMIRRORLEFTRIGHT = 0x00000040; -const UINT WINEDDFXCAPS_BLTMIRRORUPDOWN = 0x00000080; -const UINT WINEDDFXCAPS_BLTROTATION = 0x00000100; -const UINT WINEDDFXCAPS_BLTROTATION90 = 0x00000200; -const UINT WINEDDFXCAPS_BLTSHRINKX = 0x00000400; -const UINT WINEDDFXCAPS_BLTSHRINKXN = 0x00000800; -const UINT WINEDDFXCAPS_BLTSHRINKY = 0x00001000; -const UINT WINEDDFXCAPS_BLTSHRINKYN = 0x00002000; -const UINT WINEDDFXCAPS_BLTSTRETCHX = 0x00004000; -const UINT WINEDDFXCAPS_BLTSTRETCHXN = 0x00008000; -const UINT WINEDDFXCAPS_BLTSTRETCHY = 0x00010000; -const UINT WINEDDFXCAPS_BLTSTRETCHYN = 0x00020000; -const UINT WINEDDFXCAPS_OVERLAYARITHSTRETCHY = 0x00040000; -const UINT WINEDDFXCAPS_OVERLAYARITHSTRETCHYN = 0x00000008; -const UINT WINEDDFXCAPS_OVERLAYSHRINKX = 0x00080000; -const UINT WINEDDFXCAPS_OVERLAYSHRINKXN = 0x00100000; -const UINT WINEDDFXCAPS_OVERLAYSHRINKY = 0x00200000; -const UINT WINEDDFXCAPS_OVERLAYSHRINKYN = 0x00400000; -const UINT WINEDDFXCAPS_OVERLAYSTRETCHX = 0x00800000; -const UINT WINEDDFXCAPS_OVERLAYSTRETCHXN = 0x01000000; -const UINT WINEDDFXCAPS_OVERLAYSTRETCHY = 0x02000000; -const UINT WINEDDFXCAPS_OVERLAYSTRETCHYN = 0x04000000; -const UINT WINEDDFXCAPS_OVERLAYMIRRORLEFTRIGHT = 0x08000000; -const UINT WINEDDFXCAPS_OVERLAYMIRRORUPDOWN = 0x10000000; - -const UINT WINEDDCAPS_3D = 0x00000001; -const UINT WINEDDCAPS_ALIGNBOUNDARYDEST = 0x00000002; -const UINT WINEDDCAPS_ALIGNSIZEDEST = 0x00000004; -const UINT WINEDDCAPS_ALIGNBOUNDARYSRC = 0x00000008; -const UINT WINEDDCAPS_ALIGNSIZESRC = 0x00000010; -const UINT WINEDDCAPS_ALIGNSTRIDE = 0x00000020; -const UINT WINEDDCAPS_BLT = 0x00000040; -const UINT WINEDDCAPS_BLTQUEUE = 0x00000080; -const UINT WINEDDCAPS_BLTFOURCC = 0x00000100; -const UINT WINEDDCAPS_BLTSTRETCH = 0x00000200; -const UINT WINEDDCAPS_GDI = 0x00000400; -const UINT WINEDDCAPS_OVERLAY = 0x00000800; -const UINT WINEDDCAPS_OVERLAYCANTCLIP = 0x00001000; -const UINT WINEDDCAPS_OVERLAYFOURCC = 0x00002000; -const UINT WINEDDCAPS_OVERLAYSTRETCH = 0x00004000; -const UINT WINEDDCAPS_PALETTE = 0x00008000; -const UINT WINEDDCAPS_PALETTEVSYNC = 0x00010000; -const UINT WINEDDCAPS_READSCANLINE = 0x00020000; -const UINT WINEDDCAPS_STEREOVIEW = 0x00040000; -const UINT WINEDDCAPS_VBI = 0x00080000; -const UINT WINEDDCAPS_ZBLTS = 0x00100000; -const UINT WINEDDCAPS_ZOVERLAYS = 0x00200000; -const UINT WINEDDCAPS_COLORKEY = 0x00400000; -const UINT WINEDDCAPS_ALPHA = 0x00800000; -const UINT WINEDDCAPS_COLORKEYHWASSIST = 0x01000000; -const UINT WINEDDCAPS_NOHARDWARE = 0x02000000; -const UINT WINEDDCAPS_BLTCOLORFILL = 0x04000000; -const UINT WINEDDCAPS_BANKSWITCHED = 0x08000000; -const UINT WINEDDCAPS_BLTDEPTHFILL = 0x10000000; -const UINT WINEDDCAPS_CANCLIP = 0x20000000; -const UINT WINEDDCAPS_CANCLIPSTRETCHED = 0x40000000; -const UINT WINEDDCAPS_CANBLTSYSMEM = 0x80000000; - -const UINT WINEDDCAPS2_CERTIFIED = 0x00000001; -const UINT WINEDDCAPS2_NO2DDURING3DSCENE = 0x00000002; -const UINT WINEDDCAPS2_VIDEOPORT = 0x00000004; -const UINT WINEDDCAPS2_AUTOFLIPOVERLAY = 0x00000008; -const UINT WINEDDCAPS2_CANBOBINTERLEAVED = 0x00000010; -const UINT WINEDDCAPS2_CANBOBNONINTERLEAVED = 0x00000020; -const UINT WINEDDCAPS2_COLORCONTROLOVERLAY = 0x00000040; -const UINT WINEDDCAPS2_COLORCONTROLPRIMARY = 0x00000080; -const UINT WINEDDCAPS2_CANDROPZ16BIT = 0x00000100; -const UINT WINEDDCAPS2_NONLOCALVIDMEM = 0x00000200; -const UINT WINEDDCAPS2_NONLOCALVIDMEMCAPS = 0x00000400; -const UINT WINEDDCAPS2_NOPAGELOCKREQUIRED = 0x00000800; -const UINT WINEDDCAPS2_WIDESURFACES = 0x00001000; -const UINT WINEDDCAPS2_CANFLIPODDEVEN = 0x00002000; -const UINT WINEDDCAPS2_CANBOBHARDWARE = 0x00004000; -const UINT WINEDDCAPS2_COPYFOURCC = 0x00008000; -const UINT WINEDDCAPS2_PRIMARYGAMMA = 0x00020000; -const UINT WINEDDCAPS2_CANRENDERWINDOWED = 0x00080000; -const UINT WINEDDCAPS2_CANCALIBRATEGAMMA = 0x00100000; -const UINT WINEDDCAPS2_FLIPINTERVAL = 0x00200000; -const UINT WINEDDCAPS2_FLIPNOVSYNC = 0x00400000; -const UINT WINEDDCAPS2_CANMANAGETEXTURE = 0x00800000; -const UINT WINEDDCAPS2_TEXMANINNONLOCALVIDMEM = 0x01000000; -const UINT WINEDDCAPS2_STEREO = 0x02000000; -const UINT WINEDDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL = 0x04000000; - -/* DDCAPS.d */ -const UINT WINEDDPCAPS_4BIT = 0x00000001; -const UINT WINEDDPCAPS_8BITENTRIES = 0x00000002; -const UINT WINEDDPCAPS_8BIT = 0x00000004; -const UINT WINEDDPCAPS_INITIALIZE = 0x00000008; -const UINT WINEDDPCAPS_PRIMARYSURFACE = 0x00000010; -const UINT WINEDDPCAPS_PRIMARYSURFACELEFT = 0x00000020; -const UINT WINEDDPCAPS_ALLOW256 = 0x00000040; -const UINT WINEDDPCAPS_VSYNC = 0x00000080; -const UINT WINEDDPCAPS_1BIT = 0x00000100; -const UINT WINEDDPCAPS_2BIT = 0x00000200; -const UINT WINEDDPCAPS_ALPHA = 0x00000400; - -typedef struct _WINED3DDISPLAYMODE -{ - UINT Width; - UINT Height; - UINT RefreshRate; - enum wined3d_format_id Format; -} WINED3DDISPLAYMODE; - -typedef struct _WINED3DCOLORVALUE -{ - float r; - float g; - float b; - float a; -} WINED3DCOLORVALUE; - -typedef struct _WINED3DVECTOR -{ - float x; - float y; - float z; -} WINED3DVECTOR; - -typedef struct _WINED3DMATRIX -{ - union - { - struct - { - float _11, _12, _13, _14; - float _21, _22, _23, _24; - float _31, _32, _33, _34; - float _41, _42, _43, _44; - } DUMMYSTRUCTNAME; - float m[4][4]; - } DUMMYUNIONNAME; -} WINED3DMATRIX; - -typedef struct _WINED3DLIGHT -{ - WINED3DLIGHTTYPE Type; - WINED3DCOLORVALUE Diffuse; - WINED3DCOLORVALUE Specular; - WINED3DCOLORVALUE Ambient; - WINED3DVECTOR Position; - WINED3DVECTOR Direction; - float Range; - float Falloff; - float Attenuation0; - float Attenuation1; - float Attenuation2; - float Theta; - float Phi; -} WINED3DLIGHT; - -typedef struct _WINED3DMATERIAL -{ - WINED3DCOLORVALUE Diffuse; - WINED3DCOLORVALUE Ambient; - WINED3DCOLORVALUE Specular; - WINED3DCOLORVALUE Emissive; - float Power; -} WINED3DMATERIAL; - -typedef struct _WINED3DVIEWPORT -{ - DWORD X; - DWORD Y; - DWORD Width; - DWORD Height; - float MinZ; - float MaxZ; -} WINED3DVIEWPORT; - -typedef struct _WINED3DGAMMARAMP -{ - WORD red[256]; - WORD green[256]; - WORD blue[256]; -} WINED3DGAMMARAMP; - -typedef struct _WINED3DLINEPATTERN -{ - WORD wRepeatFactor; - WORD wLinePattern; -} WINED3DLINEPATTERN; - -typedef struct _WINEDD3DRECTPATCH_INFO -{ - UINT StartVertexOffsetWidth; - UINT StartVertexOffsetHeight; - UINT Width; - UINT Height; - UINT Stride; - WINED3DBASISTYPE Basis; - WINED3DDEGREETYPE Degree; -} WINED3DRECTPATCH_INFO; - -typedef struct _WINED3DTRIPATCH_INFO -{ - UINT StartVertexOffset; - UINT NumVertices; - WINED3DBASISTYPE Basis; - WINED3DDEGREETYPE Degree; -} WINED3DTRIPATCH_INFO; - -typedef struct _WINED3DADAPTER_IDENTIFIER -{ - char *driver; - UINT driver_size; - char *description; - UINT description_size; - char *device_name; - UINT device_name_size; - LARGE_INTEGER driver_version; - DWORD vendor_id; - DWORD device_id; - DWORD subsystem_id; - DWORD revision; - GUID device_identifier; - DWORD whql_level; - LUID adapter_luid; - SIZE_T video_memory; -} WINED3DADAPTER_IDENTIFIER; - -typedef struct _WINED3DPRESENT_PARAMETERS -{ - UINT BackBufferWidth; - UINT BackBufferHeight; - enum wined3d_format_id BackBufferFormat; - UINT BackBufferCount; - WINED3DMULTISAMPLE_TYPE MultiSampleType; - DWORD MultiSampleQuality; - WINED3DSWAPEFFECT SwapEffect; - HWND hDeviceWindow; - BOOL Windowed; - BOOL EnableAutoDepthStencil; - enum wined3d_format_id AutoDepthStencilFormat; - DWORD Flags; - UINT FullScreen_RefreshRateInHz; - UINT PresentationInterval; - BOOL AutoRestoreDisplayMode; -} WINED3DPRESENT_PARAMETERS; - -typedef struct _WINED3DSURFACE_DESC -{ - enum wined3d_format_id format; - WINED3DRESOURCETYPE resource_type; - DWORD usage; - WINED3DPOOL pool; - UINT size; - WINED3DMULTISAMPLE_TYPE multisample_type; - DWORD multisample_quality; - UINT width; - UINT height; -} WINED3DSURFACE_DESC; - -typedef struct _WINED3DVOLUME_DESC -{ - enum wined3d_format_id Format; - WINED3DRESOURCETYPE Type; - DWORD Usage; - WINED3DPOOL Pool; - UINT Size; - UINT Width; - UINT Height; - UINT Depth; -} WINED3DVOLUME_DESC; - -typedef struct _WINED3DCLIPSTATUS -{ - DWORD ClipUnion; - DWORD ClipIntersection; -} WINED3DCLIPSTATUS; - -typedef struct _WINED3DVERTEXELEMENT -{ - enum wined3d_format_id format; - WORD input_slot; - WORD offset; - UINT output_slot; /* D3D 8 & 10 */ - BYTE method; - BYTE usage; - BYTE usage_idx; -} WINED3DVERTEXELEMENT; - -typedef struct _WINED3DDEVICE_CREATION_PARAMETERS -{ - UINT AdapterOrdinal; - WINED3DDEVTYPE DeviceType; - HWND hFocusWindow; - DWORD BehaviorFlags; -} WINED3DDEVICE_CREATION_PARAMETERS; - -typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS -{ - float MaxBandwidthUtilized; - float FrontEndUploadMemoryUtilizedPercent; - float VertexRateUtilizedPercent; - float TriangleSetupRateUtilizedPercent; - float FillRateUtilizedPercent; -} WINED3DDEVINFO_BANDWIDTHTIMINGS; - -typedef struct _WINED3DDEVINFO_CACHEUTILIZATION -{ - float TextureCacheHitRate; - float PostTransformVertexCacheHitRate; -} WINED3DDEVINFO_CACHEUTILIZATION; - -typedef struct _WINED3DDEVINFO_INTERFACETIMINGS -{ - float WaitingForGPUToUseApplicationResourceTimePercent; - float WaitingForGPUToAcceptMoreCommandsTimePercent; - float WaitingForGPUToStayWithinLatencyTimePercent; - float WaitingForGPUExclusiveResourceTimePercent; - float WaitingForGPUOtherTimePercent; -} WINED3DDEVINFO_INTERFACETIMINGS; - -typedef struct _WINED3DDEVINFO_PIPELINETIMINGS -{ - float VertexProcessingTimePercent; - float PixelProcessingTimePercent; - float OtherGPUProcessingTimePercent; - float GPUIdleTimePercent; -} WINED3DDEVINFO_PIPELINETIMINGS; - -typedef struct _WINED3DDEVINFO_STAGETIMINGS -{ - float MemoryProcessingPercent; - float ComputationProcessingPercent; -} WINED3DDEVINFO_STAGETIMINGS; - -typedef struct _WINED3DRASTER_STATUS -{ - BOOL InVBlank; - UINT ScanLine; -} WINED3DRASTER_STATUS; - -typedef struct WINED3DRESOURCESTATS -{ - BOOL bThrashing; - DWORD ApproxBytesDownloaded; - DWORD NumEvicts; - DWORD NumVidCreates; - DWORD LastPri; - DWORD NumUsed; - DWORD NumUsedInVidMem; - DWORD WorkingSet; - DWORD WorkingSetBytes; - DWORD TotalManaged; - DWORD TotalBytes; -} WINED3DRESOURCESTATS; - -typedef struct _WINED3DDEVINFO_RESOURCEMANAGER -{ - WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT]; -} WINED3DDEVINFO_RESOURCEMANAGER; - -typedef struct _WINED3DDEVINFO_VERTEXSTATS -{ - DWORD NumRenderedTriangles; - DWORD NumExtraClippingTriangles; -} WINED3DDEVINFO_VERTEXSTATS; - -typedef struct _WINED3DLOCKED_RECT -{ - INT Pitch; - void *pBits; -} WINED3DLOCKED_RECT; - -typedef struct _WINED3DLOCKED_BOX -{ - INT RowPitch; - INT SlicePitch; - void *pBits; -} WINED3DLOCKED_BOX; - -typedef struct _WINED3DBOX -{ - UINT Left; - UINT Top; - UINT Right; - UINT Bottom; - UINT Front; - UINT Back; -} WINED3DBOX; - -/*Vertex cache optimization hints.*/ -typedef struct WINED3DDEVINFO_VCACHE -{ - DWORD Pattern; /* Must be a 4 char code FOURCC (e.g. CACH) */ - DWORD OptMethod; /* 0 to get the longest strips, 1 vertex cache */ - DWORD CacheSize; /* Cache size to use (only valid if OptMethod==1) */ - DWORD MagicNumber; /* Internal for deciding when to restart strips, - non user modifiable (only valid if OptMethod==1) */ -} WINED3DDEVINFO_VCACHE; - -typedef struct _WINED3DBUFFER_DESC -{ - WINED3DRESOURCETYPE Type; - DWORD Usage; - WINED3DPOOL Pool; - UINT Size; -} WINED3DBUFFER_DESC; - -typedef struct WineDirect3DStridedData -{ - enum wined3d_format_id format; /* Format of the data */ - const BYTE *lpData; /* Pointer to start of data */ - DWORD dwStride; /* Stride between occurrences of this data */ -} WineDirect3DStridedData; - -typedef struct WineDirect3DVertexStridedData -{ - WineDirect3DStridedData position; - WineDirect3DStridedData normal; - WineDirect3DStridedData diffuse; - WineDirect3DStridedData specular; - WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD]; - BOOL position_transformed; -} WineDirect3DVertexStridedData; - -typedef struct _WINED3DVSHADERCAPS2_0 -{ - DWORD Caps; - INT DynamicFlowControlDepth; - INT NumTemps; - INT StaticFlowControlDepth; -} WINED3DVSHADERCAPS2_0; - -typedef struct _WINED3DPSHADERCAPS2_0 -{ - DWORD Caps; - INT DynamicFlowControlDepth; - INT NumTemps; - INT StaticFlowControlDepth; - INT NumInstructionSlots; -} WINED3DPSHADERCAPS2_0; - -typedef struct _WINEDDCAPS -{ - DWORD Caps; - DWORD Caps2; - DWORD CKeyCaps; - DWORD FXCaps; - DWORD FXAlphaCaps; - DWORD PalCaps; - DWORD SVCaps; - DWORD SVBCaps; - DWORD SVBCKeyCaps; - DWORD SVBFXCaps; - DWORD VSBCaps; - DWORD VSBCKeyCaps; - DWORD VSBFXCaps; - DWORD SSBCaps; - DWORD SSBCKeyCaps; - DWORD SSBFXCaps; - DWORD ddsCaps; - DWORD StrideAlign; -} WINEDDCAPS; - -typedef struct _WINED3DCAPS -{ - WINED3DDEVTYPE DeviceType; - UINT AdapterOrdinal; - - DWORD Caps; - DWORD Caps2; - DWORD Caps3; - DWORD PresentationIntervals; - - DWORD CursorCaps; - DWORD DevCaps; - DWORD PrimitiveMiscCaps; - DWORD RasterCaps; - DWORD ZCmpCaps; - DWORD SrcBlendCaps; - DWORD DestBlendCaps; - DWORD AlphaCmpCaps; - DWORD ShadeCaps; - DWORD TextureCaps; - DWORD TextureFilterCaps; - DWORD CubeTextureFilterCaps; - DWORD VolumeTextureFilterCaps; - DWORD TextureAddressCaps; - DWORD VolumeTextureAddressCaps; - DWORD LineCaps; - - DWORD MaxTextureWidth; - DWORD MaxTextureHeight; - DWORD MaxVolumeExtent; - DWORD MaxTextureRepeat; - DWORD MaxTextureAspectRatio; - DWORD MaxAnisotropy; - float MaxVertexW; - - float GuardBandLeft; - float GuardBandTop; - float GuardBandRight; - float GuardBandBottom; - - float ExtentsAdjust; - DWORD StencilCaps; - - DWORD FVFCaps; - DWORD TextureOpCaps; - DWORD MaxTextureBlendStages; - DWORD MaxSimultaneousTextures; - - DWORD VertexProcessingCaps; - DWORD MaxActiveLights; - DWORD MaxUserClipPlanes; - DWORD MaxVertexBlendMatrices; - DWORD MaxVertexBlendMatrixIndex; - - float MaxPointSize; - - DWORD MaxPrimitiveCount; - DWORD MaxVertexIndex; - DWORD MaxStreams; - DWORD MaxStreamStride; - - DWORD VertexShaderVersion; - DWORD MaxVertexShaderConst; - - DWORD PixelShaderVersion; - float PixelShader1xMaxValue; - - /* DX 9 */ - DWORD DevCaps2; - - float MaxNpatchTessellationLevel; - DWORD Reserved5; /* undocumented */ - - UINT MasterAdapterOrdinal; - UINT AdapterOrdinalInGroup; - UINT NumberOfAdaptersInGroup; - DWORD DeclTypes; - DWORD NumSimultaneousRTs; - DWORD StretchRectFilterCaps; - WINED3DVSHADERCAPS2_0 VS20Caps; - WINED3DPSHADERCAPS2_0 PS20Caps; - DWORD VertexTextureFilterCaps; - DWORD MaxVShaderInstructionsExecuted; - DWORD MaxPShaderInstructionsExecuted; - DWORD MaxVertexShader30InstructionSlots; - DWORD MaxPixelShader30InstructionSlots; - DWORD Reserved2; /* Not in the microsoft headers but documented */ - DWORD Reserved3; - - WINEDDCAPS DirectDrawCaps; -} WINED3DCAPS; - -/* DirectDraw types */ - -typedef struct _WINEDDCOLORKEY -{ - DWORD dwColorSpaceLowValue; /* low boundary of color space that is to - * be treated as Color Key, inclusive */ - DWORD dwColorSpaceHighValue; /* high boundary of color space that is - * to be treated as Color Key, inclusive */ -} WINEDDCOLORKEY,*LPWINEDDCOLORKEY; - -typedef struct _WINEDDBLTFX -{ - DWORD dwSize; /* size of structure */ - DWORD dwDDFX; /* FX operations */ - DWORD dwROP; /* Win32 raster operations */ - DWORD dwDDROP; /* Raster operations new for DirectDraw */ - DWORD dwRotationAngle; /* Rotation angle for blt */ - DWORD dwZBufferOpCode; /* ZBuffer compares */ - DWORD dwZBufferLow; /* Low limit of Z buffer */ - DWORD dwZBufferHigh; /* High limit of Z buffer */ - DWORD dwZBufferBaseDest; /* Destination base value */ - DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */ - union - { - DWORD dwZDestConst; /* Constant to use as Z buffer for dest */ - struct IWineD3DSurface *lpDDSZBufferDest; /* Surface to use as Z buffer for dest */ - } DUMMYUNIONNAME1; - DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */ - union - { - DWORD dwZSrcConst; /* Constant to use as Z buffer for src */ - struct IWineD3DSurface *lpDDSZBufferSrc; /* Surface to use as Z buffer for src */ - } DUMMYUNIONNAME2; - DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ - DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */ - DWORD dwReserved; - DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ - union - { - DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */ - struct IWineD3DSurface *lpDDSAlphaDest; /* Surface to use as Alpha Channel */ - } DUMMYUNIONNAME3; - DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ - union - { - DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */ - struct IWineD3DSurface *lpDDSAlphaSrc; /* Surface to use as Alpha Channel */ - } DUMMYUNIONNAME4; - union - { - DWORD dwFillColor; /* color in RGB or Palettized */ - DWORD dwFillDepth; /* depth value for z-buffer */ - DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */ - struct IWineD3DSurface *lpDDSPattern; /* Surface to use as pattern */ - } DUMMYUNIONNAME5; - WINEDDCOLORKEY ddckDestColorkey; /* DestColorkey override */ - WINEDDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */ -} WINEDDBLTFX,*LPWINEDDBLTFX; - -typedef struct _WINEDDOVERLAYFX -{ - DWORD dwSize; /* size of structure */ - DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ - DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */ - DWORD dwReserved; - DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ - union - { - DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */ - struct IWineD3DSurface *lpDDSAlphaDest; /* Surface to use as alpha channel for dest */ - } DUMMYUNIONNAME1; - DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ - union - { - DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */ - struct IWineD3DSurface *lpDDSAlphaSrc; /* Surface to use as alpha channel for src */ - } DUMMYUNIONNAME2; - WINEDDCOLORKEY dckDestColorkey; /* DestColorkey override */ - WINEDDCOLORKEY dckSrcColorkey; /* SrcColorkey override */ - DWORD dwDDFX; /* Overlay FX */ - DWORD dwFlags; /* flags */ -} WINEDDOVERLAYFX; - -struct wined3d_buffer_desc -{ - UINT byte_width; - DWORD usage; - UINT bind_flags; - UINT cpu_access_flags; - UINT misc_flags; -}; - -struct wined3d_shader_signature_element -{ - const char *semantic_name; - UINT semantic_idx; - enum wined3d_sysval_semantic sysval_semantic; - DWORD component_type; - UINT register_idx; - DWORD mask; -}; - -struct wined3d_shader_signature -{ - UINT element_count; - struct wined3d_shader_signature_element *elements; - char *string_data; -}; - -struct wined3d_parent_ops -{ - void (__stdcall *wined3d_object_destroyed)(void *parent); -}; - -interface IWineD3DResource; -interface IWineD3DSurface; -interface IWineD3DVolume; -interface IWineD3DSwapChain; -interface IWineD3DDevice; - -[ - object, - local, - uuid(aeb62dfc-bdcb-4f02-9519-1eeea00c15cd) -] -interface IWineD3DDeviceParent : IUnknown -{ - void WineD3DDeviceCreated( - [in] IWineD3DDevice *device - ); - - HRESULT CreateSurface( - [in] IUnknown *superior, - [in] UINT width, - [in] UINT height, - [in] enum wined3d_format_id format_id, - [in] DWORD usage, - [in] WINED3DPOOL pool, - [in] UINT level, - [in] WINED3DCUBEMAP_FACES face, - [out] IWineD3DSurface **surface - ); - - HRESULT CreateRenderTarget( - [in] IUnknown *superior, - [in] UINT width, - [in] UINT height, - [in] enum wined3d_format_id format_id, - [in] WINED3DMULTISAMPLE_TYPE multisample_type, - [in] DWORD multisample_quality, - [in] BOOL lockable, - [out] IWineD3DSurface **surface - ); - - HRESULT CreateDepthStencilSurface( - [in] UINT width, - [in] UINT height, - [in] enum wined3d_format_id format_id, - [in] WINED3DMULTISAMPLE_TYPE multisample_type, - [in] DWORD multisample_quality, - [in] BOOL discard, - [out] IWineD3DSurface **surface - ); - - HRESULT CreateVolume( - [in] IUnknown *superior, - [in] UINT width, - [in] UINT height, - [in] UINT depth, - [in] enum wined3d_format_id format_id, - [in] WINED3DPOOL pool, - [in] DWORD usage, - [out] IWineD3DVolume **volume - ); - - HRESULT CreateSwapChain( - [in, out] WINED3DPRESENT_PARAMETERS *present_parameters, - [out] IWineD3DSwapChain **swapchain - ); -} -typedef ULONG (__stdcall *D3DCB_DESTROYSWAPCHAINFN)(IWineD3DSwapChain *pSwapChain); -typedef HRESULT (__stdcall *D3DCB_ENUMRESOURCES)(IWineD3DResource *resource, void *pData); - -[ - object, - local, - uuid(46799311-8e0e-40ce-b2ec-ddb99f18fcb4) -] -interface IWineD3DBase : IUnknown -{ - void *GetParent( - ); -} - -[ - object, - local, - uuid(108f9c44-6f30-11d9-c687-00046142c14f) -] -interface IWineD3D : IWineD3DBase -{ - UINT GetAdapterCount( - ); - HRESULT RegisterSoftwareDevice( - [in] void *pInitializeFunction - ); - HMONITOR GetAdapterMonitor( - [in] UINT adapter_idx - ); - UINT GetAdapterModeCount( - [in] UINT adapter_idx, - [in] enum wined3d_format_id format_id - ); - HRESULT EnumAdapterModes( - [in] UINT adapter_idx, - [in] enum wined3d_format_id format_id, - [in] UINT mode_idx, - [out] WINED3DDISPLAYMODE *mode - ); - HRESULT GetAdapterDisplayMode( - [in] UINT adapter_idx, - [out] WINED3DDISPLAYMODE *mode - ); - HRESULT GetAdapterIdentifier( - [in] UINT adapter_idx, - [in] DWORD flags, - [out] WINED3DADAPTER_IDENTIFIER *identifier - ); - HRESULT CheckDeviceMultiSampleType( - [in] UINT adapter_idx, - [in] WINED3DDEVTYPE device_type, - [in] enum wined3d_format_id surface_format_id, - [in] BOOL windowed, - [in] WINED3DMULTISAMPLE_TYPE multisample_type, - [out] DWORD *quality_levels - ); - HRESULT CheckDepthStencilMatch( - [in] UINT adapter_idx, - [in] WINED3DDEVTYPE device_type, - [in] enum wined3d_format_id adapter_format_id, - [in] enum wined3d_format_id render_target_format_id, - [in] enum wined3d_format_id depth_stencil_format_id - ); - HRESULT CheckDeviceType( - [in] UINT adapter_idx, - [in] WINED3DDEVTYPE device_type, - [in] enum wined3d_format_id display_format_id, - [in] enum wined3d_format_id backbuffer_format_id, - [in] BOOL windowed - ); - HRESULT CheckDeviceFormat( - [in] UINT adaper_idx, - [in] WINED3DDEVTYPE device_type, - [in] enum wined3d_format_id adapter_format_id, - [in] DWORD usage, - [in] WINED3DRESOURCETYPE resource_type, - [in] enum wined3d_format_id check_format, - [in] WINED3DSURFTYPE surface_type - ); - HRESULT CheckDeviceFormatConversion( - [in] UINT adapter_idx, - [in] WINED3DDEVTYPE device_type, - [in] enum wined3d_format_id source_format_id, - [in] enum wined3d_format_id target_format_id - ); - HRESULT GetDeviceCaps( - [in] UINT adapter_idx, - [in] WINED3DDEVTYPE device_type, - [out] WINED3DCAPS *caps - ); - HRESULT CreateDevice( - [in] UINT adapter_idx, - [in] WINED3DDEVTYPE device_type, - [in] HWND focus_window, - [in] DWORD behaviour_flags, - [in] IWineD3DDeviceParent *device_parent, - [out] IWineD3DDevice **device - ); -} - -[ - object, - local, - uuid(1f3bfb34-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DResource : IWineD3DBase -{ - HRESULT SetPrivateData( - [in] REFGUID guid, - [in] const void *data, - [in] DWORD data_size, - [in] DWORD flags - ); - HRESULT GetPrivateData( - [in] REFGUID guid, - [out] void *data, - [in, out] DWORD *data_size - ); - HRESULT FreePrivateData( - [in] REFGUID guid - ); - DWORD SetPriority( - [in] DWORD new_priority - ); - DWORD GetPriority( - ); - void PreLoad( - ); - void UnLoad( - ); - WINED3DRESOURCETYPE GetType( - ); -} - -[ - object, - local, - uuid(f7d8abf4-fb93-43e4-9c96-4618cf9b3cbc) -] -interface IWineD3DRendertargetView : IWineD3DBase -{ - HRESULT GetResource( - [out] IWineD3DResource **resource - ); -} - -[ - object, - local, - uuid(f756720c-32b9-4439-b5a3-1d6c97037d9e) -] -interface IWineD3DPalette : IWineD3DBase -{ - HRESULT GetEntries( - [in] DWORD flags, - [in] DWORD start, - [in] DWORD count, - [out] PALETTEENTRY *entries - ); - HRESULT GetCaps( - [out] DWORD *caps - ); - HRESULT SetEntries( - [in] DWORD flags, - [in] DWORD start, - [in] DWORD count, - [in] const PALETTEENTRY *entries - ); -} - -[ - object, - local, - uuid(8f2bceb1-d338-488c-ab7f-0ec980bf5d2d) -] -interface IWineD3DClipper : IUnknown -{ - HRESULT GetClipList( - [in] const RECT *rect, - [out] RGNDATA *clip_list, - [in, out] DWORD *clip_list_size - ); - HRESULT GetHWnd( - [out] HWND *hwnd - ); - HRESULT IsClipListChanged( - [out] BOOL *changed - ); - HRESULT SetClipList( - [in] const RGNDATA *clip_list, - [in] DWORD flags - ); - HRESULT SetHWnd( - [in] DWORD flags, - [in] HWND hwnd - ); -} - -[ - object, - local, - uuid(37cd5526-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DSurface : IWineD3DResource -{ - void GetDesc( - [out] WINED3DSURFACE_DESC *desc - ); - HRESULT LockRect( - [out] WINED3DLOCKED_RECT *locked_rect, - [in] const RECT *rect, - [in] DWORD flags - ); - HRESULT UnlockRect( - ); - HRESULT GetDC( - [out] HDC *dc - ); - HRESULT ReleaseDC( - [in] HDC dc - ); - HRESULT Flip( - [in] IWineD3DSurface *override, - [in] DWORD flags - ); - HRESULT Blt( - [in] const RECT *dst_rect, - [in] IWineD3DSurface *src_surface, - [in] const RECT *src_rect, - [in] DWORD flags, - [in] const WINEDDBLTFX *blt_fx, - [in] WINED3DTEXTUREFILTERTYPE filter - ); - HRESULT GetBltStatus( - [in] DWORD flags - ); - HRESULT GetFlipStatus( - [in] DWORD flags - ); - HRESULT IsLost( - ); - HRESULT Restore( - ); - HRESULT BltFast( - [in] DWORD dst_x, - [in] DWORD dst_y, - [in] IWineD3DSurface *src_surface, - [in] const RECT *src_rect, - [in] DWORD trans - ); - HRESULT GetPalette( - [out] IWineD3DPalette **palette - ); - HRESULT SetPalette( - [in] IWineD3DPalette *palette - ); - HRESULT RealizePalette( - ); - HRESULT SetColorKey( - [in] DWORD flags, - [in] const WINEDDCOLORKEY *color_key - ); - DWORD GetPitch( - ); - HRESULT SetMem( - [in] void *mem - ); - HRESULT SetOverlayPosition( - [in] LONG x, - [in] LONG y - ); - HRESULT GetOverlayPosition( - [out] LONG *x, - [out] LONG *y - ); - HRESULT UpdateOverlayZOrder( - [in] DWORD flags, - [in] IWineD3DSurface *ref - ); - HRESULT UpdateOverlay( - [in] const RECT *src_rect, - [in] IWineD3DSurface *dst_surface, - [in] const RECT *dst_rect, - [in] DWORD flags, - [in] const WINEDDOVERLAYFX *fx - ); - HRESULT SetClipper( - [in] IWineD3DClipper *clipper - ); - HRESULT GetClipper( - [out] IWineD3DClipper **clipper - ); - HRESULT LoadTexture( - [in] BOOL srgb_mode - ); - void BindTexture( - [in] BOOL srgb - ); - const void *GetData( - ); - HRESULT SetFormat( - [in] enum wined3d_format_id format_id - ); - HRESULT PrivateSetup( - ); - WINED3DSURFTYPE GetImplType( - ); - HRESULT DrawOverlay( - ); -} - -[ - object, - local, - uuid(24769ed8-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DVolume : IWineD3DResource -{ - void GetDesc( - [out] WINED3DVOLUME_DESC *desc - ); - HRESULT LockBox( - [out] WINED3DLOCKED_BOX *locked_box, - [in] const WINED3DBOX *box, - [in] DWORD flags - ); - HRESULT UnlockBox( - ); - HRESULT LoadTexture( - [in] int gl_level, - [in] BOOL srgb_mode - ); -} - -[ - object, - local, - uuid(3c2aebf6-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DBaseTexture : IWineD3DResource -{ - DWORD SetLOD( - [in] DWORD new_lod - ); - DWORD GetLOD( - ); - DWORD GetLevelCount( - ); - HRESULT SetAutoGenFilterType( - WINED3DTEXTUREFILTERTYPE filter_type - ); - WINED3DTEXTUREFILTERTYPE GetAutoGenFilterType( - ); - void GenerateMipSubLevels( - ); - BOOL SetDirty( - BOOL dirty - ); - BOOL GetDirty( - ); - HRESULT BindTexture( - [in] BOOL srgb - ); - BOOL IsCondNP2( - ); -} - -[ - object, - local, - uuid(3e72cc1c-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DTexture : IWineD3DBaseTexture -{ - HRESULT GetLevelDesc( - [in] UINT level, - [out] WINED3DSURFACE_DESC *desc - ); - HRESULT GetSurfaceLevel( - [in] UINT level, - [out] IWineD3DSurface **surface - ); - HRESULT LockRect( - [in] UINT level, - [out] WINED3DLOCKED_RECT *locked_rect, - [in] const RECT *rect, - [in] DWORD flags - ); - HRESULT UnlockRect( - [in] UINT level - ); - HRESULT AddDirtyRect( - [in] const RECT *dirty_rect - ); -} - -[ - object, - local, - uuid(41752900-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DCubeTexture : IWineD3DBaseTexture -{ - HRESULT GetLevelDesc( - [in] UINT level, - [out] WINED3DSURFACE_DESC *desc - ); - HRESULT GetCubeMapSurface( - [in] WINED3DCUBEMAP_FACES face, - [in] UINT level, - [out] IWineD3DSurface **surface - ); - HRESULT LockRect( - [in] WINED3DCUBEMAP_FACES face, - [in] UINT level, - [out] WINED3DLOCKED_RECT *locked_rect, - [in] const RECT *rect, - [in] DWORD flags - ); - HRESULT UnlockRect( - [in] WINED3DCUBEMAP_FACES face, - [in] UINT level - ); - HRESULT AddDirtyRect( - [in] WINED3DCUBEMAP_FACES face, - [in] const RECT *dirty_rect - ); -} - -[ - object, - local, - uuid(7b39470c-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DVolumeTexture : IWineD3DBaseTexture -{ - HRESULT GetLevelDesc( - [in] UINT level, - [out] WINED3DVOLUME_DESC *desc - ); - HRESULT GetVolumeLevel( - [in] UINT level, - [out] IWineD3DVolume **volume - ); - HRESULT LockBox( - [in] UINT level, - [out] WINED3DLOCKED_BOX *locked_box, - [in] const WINED3DBOX *box, - [in] DWORD flags - ); - HRESULT UnlockBox( - [in] UINT level - ); - HRESULT AddDirtyBox( - [in] const WINED3DBOX *dirty_box - ); -} - -[ - object, - local, - uuid(7cd55be6-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DVertexDeclaration : IWineD3DBase -{ -} - -[ - object, - local, - uuid(83b073ce-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DStateBlock : IUnknown -{ - HRESULT Capture( - ); - HRESULT Apply( - ); -} - -[ - object, - local, - uuid(905ddbac-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DQuery : IUnknown -{ - HRESULT GetData( - [out] void *data, - [in] DWORD data_size, - [in] DWORD flags - ); - DWORD GetDataSize( - ); - WINED3DQUERYTYPE GetType( - ); - HRESULT Issue( - DWORD flags - ); -} - -[ - object, - local, - uuid(34d01b10-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DSwapChain : IWineD3DBase -{ - void Destroy( - ); - HRESULT GetDevice( - [out] IWineD3DDevice **device - ); - HRESULT Present( - [in] const RECT *src_rect, - [in] const RECT *dst_rect, - [in] HWND dst_window_override, - [in] const RGNDATA *dirty_region, - [in] DWORD flags - ); - HRESULT SetDestWindowOverride( - [in] HWND window - ); - HRESULT GetFrontBufferData( - [in] IWineD3DSurface *dst_surface - ); - HRESULT GetBackBuffer( - [in] UINT backbuffer_idx, - [in] WINED3DBACKBUFFER_TYPE backbuffer_type, - [out] IWineD3DSurface **backbuffer - ); - HRESULT GetRasterStatus( - [out] WINED3DRASTER_STATUS *raster_status - ); - HRESULT GetDisplayMode( - [out] WINED3DDISPLAYMODE *mode - ); - HRESULT GetPresentParameters( - [out] WINED3DPRESENT_PARAMETERS *present_parameters - ); - HRESULT SetGammaRamp( - [in] DWORD flags, - [in] const WINED3DGAMMARAMP *ramp - ); - HRESULT GetGammaRamp( - [out] WINED3DGAMMARAMP *ramp - ); -} - -[ - object, - local, - uuid(b3f028e8-1a40-4ab3-9292-5bf6cfd80209) -] -interface IWineD3DBuffer : IWineD3DResource -{ - HRESULT Map( - [in] UINT offset, - [in] UINT size, - [out] BYTE **data, - [in] DWORD flags - ); - HRESULT Unmap( - ); - void GetDesc( - [out] WINED3DBUFFER_DESC *desc - ); -} - -[ - object, - local, - uuid(eac93065-a4df-446f-86a1-9ef2bca40a3c) -] -interface IWineD3DBaseShader : IWineD3DBase -{ - HRESULT GetFunction( - [out] void *data, - [in, out] UINT *data_size - ); -} - -[ - object, - local, - uuid(7f7a2b60-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DVertexShader : IWineD3DBaseShader -{ - HRESULT SetLocalConstantsF( - [in] UINT start_idx, - [in] const float *src_data, - [in] UINT vector4f_count - ); -} - -[ - object, - local, - uuid(8276c113-388b-49d1-ad8b-c9dd8bcbabcd) -] -interface IWineD3DGeometryShader : IWineD3DBaseShader -{ -} - -[ - object, - local, - uuid(818503da-6f30-11d9-c687-00046142c14f) -] -interface IWineD3DPixelShader : IWineD3DBaseShader -{ -} - -[ - object, - local, - uuid(6d10a2ce-09d0-4a53-a427-11388f9f8ca5) -] -interface IWineD3DDevice : IUnknown -{ - HRESULT CreateBuffer( - [in] struct wined3d_buffer_desc *desc, - [in] const void *data, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DBuffer **buffer - ); - HRESULT CreateVertexBuffer( - [in] UINT length, - [in] DWORD usage, - [in] WINED3DPOOL pool, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DBuffer **vertex_buffer - ); - HRESULT CreateIndexBuffer( - [in] UINT length, - [in] DWORD usage, - [in] WINED3DPOOL pool, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DBuffer **index_buffer - ); - HRESULT CreateStateBlock( - [in] WINED3DSTATEBLOCKTYPE type, - [out] IWineD3DStateBlock **stateblock - ); - HRESULT CreateSurface( - [in] UINT width, - [in] UINT height, - [in] enum wined3d_format_id format_id, - [in] BOOL lockable, - [in] BOOL discard, - [in] UINT level, - [in] DWORD usage, - [in] WINED3DPOOL pool, - [in] WINED3DMULTISAMPLE_TYPE multisample_type, - [in] DWORD multisample_quality, - [in] WINED3DSURFTYPE surface_type, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DSurface **surface - ); - HRESULT CreateRendertargetView( - [in] IWineD3DResource *resource, - [in] void *parent, - [out] IWineD3DRendertargetView **rendertarget_view - ); - HRESULT CreateTexture( - [in] UINT width, - [in] UINT height, - [in] UINT levels, - [in] DWORD usage, - [in] enum wined3d_format_id format_id, - [in] WINED3DPOOL pool, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DTexture **texture - ); - HRESULT CreateVolumeTexture( - [in] UINT width, - [in] UINT height, - [in] UINT depth, - [in] UINT levels, - [in] DWORD usage, - [in] enum wined3d_format_id format_id, - [in] WINED3DPOOL pool, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DVolumeTexture **texture - ); - HRESULT CreateVolume( - [in] UINT width, - [in] UINT height, - [in] UINT depth, - [in] DWORD usage, - [in] enum wined3d_format_id format_id, - [in] WINED3DPOOL pool, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DVolume **volume - ); - HRESULT CreateCubeTexture( - [in] UINT edge_length, - [in] UINT levels, - [in] DWORD usage, - [in] enum wined3d_format_id format_id, - [in] WINED3DPOOL pool, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DCubeTexture **texture - ); - HRESULT CreateQuery( - [in] WINED3DQUERYTYPE type, - [out] IWineD3DQuery **query - ); - HRESULT CreateSwapChain( - [in] WINED3DPRESENT_PARAMETERS *present_parameters, - [in] WINED3DSURFTYPE surface_type, - [in] void *parent, - [out] IWineD3DSwapChain **swapchain - ); - HRESULT CreateVertexDeclaration( - [in] const WINED3DVERTEXELEMENT *elements, - [in] UINT element_count, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DVertexDeclaration **declaration - ); - HRESULT CreateVertexDeclarationFromFVF( - [in] DWORD fvf, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DVertexDeclaration **declaration - ); - HRESULT CreateVertexShader( - [in] const DWORD *function, - [in] const struct wined3d_shader_signature *output_signature, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DVertexShader **shader - ); - HRESULT CreateGeometryShader( - [in] const DWORD *byte_code, - [in] const struct wined3d_shader_signature *output_signature, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DGeometryShader **shader - ); - HRESULT CreatePixelShader( - [in] const DWORD *function, - [in] const struct wined3d_shader_signature *output_signature, - [in] void *parent, - [in] const struct wined3d_parent_ops *parent_ops, - [out] IWineD3DPixelShader **shader - ); - HRESULT CreatePalette( - [in] DWORD flags, - [in] const PALETTEENTRY *palette_entry, - [in] void *parent, - [out] IWineD3DPalette **palette - ); - HRESULT Init3D( - [in] WINED3DPRESENT_PARAMETERS *present_parameters - ); - HRESULT InitGDI( - [in] WINED3DPRESENT_PARAMETERS *present_parameters - ); - HRESULT Uninit3D( - [in] D3DCB_DESTROYSWAPCHAINFN destroy_swapchain_callback - ); - HRESULT UninitGDI( - [in] D3DCB_DESTROYSWAPCHAINFN destroy_swapchain_callback - ); - void SetMultithreaded( - ); - HRESULT EvictManagedResources( - ); - UINT GetAvailableTextureMem( - ); - HRESULT GetBackBuffer( - [in] UINT swapchain_idx, - [in] UINT backbuffer_idx, - [in] WINED3DBACKBUFFER_TYPE backbuffer_type, - [out] IWineD3DSurface **backbuffer - ); - HRESULT GetCreationParameters( - [out] WINED3DDEVICE_CREATION_PARAMETERS *creation_parameters - ); - HRESULT GetDeviceCaps( - [out] WINED3DCAPS *caps - ); - HRESULT GetDirect3D( - [out] IWineD3D** d3d - ); - HRESULT GetDisplayMode( - [in] UINT swapchain_idx, - [out] WINED3DDISPLAYMODE *mode - ); - HRESULT SetDisplayMode( - [in] UINT swapchain_idx, - [in] const WINED3DDISPLAYMODE *mode - ); - UINT GetNumberOfSwapChains( - ); - HRESULT GetRasterStatus( - [in] UINT swapchain_idx, - [out] WINED3DRASTER_STATUS *raster_status - ); - HRESULT GetSwapChain( - [in] UINT swapchain_idx, - [out] IWineD3DSwapChain **swapchain - ); - HRESULT Reset( - [in] WINED3DPRESENT_PARAMETERS *present_parameters - ); - HRESULT SetDialogBoxMode( - [in] BOOL enable_dialogs - ); - HRESULT SetCursorProperties( - [in] UINT x_hotspot, - [in] UINT y_hotspot, - [in] IWineD3DSurface *cursor_surface - ); - void SetCursorPosition( - [in] int x_screen_space, - [in] int y_screen_space, - [in] DWORD flags - ); - BOOL ShowCursor( - [in] BOOL show - ); - HRESULT SetClipPlane( - [in] DWORD plane_idx, - [in] const float *plane - ); - HRESULT GetClipPlane( - [in] DWORD plane_idx, - [out] float *plane - ); - HRESULT SetClipStatus( - [in] const WINED3DCLIPSTATUS *clip_status - ); - HRESULT GetClipStatus( - [out] WINED3DCLIPSTATUS *clip_status - ); - HRESULT SetCurrentTexturePalette( - [in] UINT palette_number - ); - HRESULT GetCurrentTexturePalette( - [out] UINT *palette_number - ); - HRESULT SetDepthStencilSurface( - [in] IWineD3DSurface *depth_stencil - ); - HRESULT GetDepthStencilSurface( - [out] IWineD3DSurface **depth_stencil - ); - void SetGammaRamp( - [in] UINT swapchain_idx, - [in] DWORD flags, - [in] const WINED3DGAMMARAMP *ramp - ); - void GetGammaRamp( - [in] UINT swapchain_idx, - [out] WINED3DGAMMARAMP *ramp - ); - HRESULT SetIndexBuffer( - [in] IWineD3DBuffer *index_buffer, - [in] enum wined3d_format_id format_id - ); - HRESULT GetIndexBuffer( - [out] IWineD3DBuffer **index_buffer - ); - HRESULT SetBaseVertexIndex( - [in] INT base_index - ); - HRESULT GetBaseVertexIndex( - [out] INT *base_index - ); - HRESULT SetLight( - [in] DWORD light_idx, - [in] const WINED3DLIGHT *light - ); - HRESULT GetLight( - [in] DWORD light_idx, - [out] WINED3DLIGHT *light - ); - HRESULT SetLightEnable( - [in] DWORD light_idx, - [in] BOOL enable - ); - HRESULT GetLightEnable( - [in] DWORD light_idx, - [out] BOOL *enable - ); - HRESULT SetMaterial( - [in] const WINED3DMATERIAL *material - ); - HRESULT GetMaterial( - [out] WINED3DMATERIAL *material - ); - HRESULT SetNPatchMode( - [in] float segments - ); - float GetNPatchMode( - ); - HRESULT SetPaletteEntries( - [in] UINT palette_number, - [in] const PALETTEENTRY *entries - ); - HRESULT GetPaletteEntries( - [in] UINT palette_number, - [out] PALETTEENTRY *entries - ); - HRESULT SetPixelShader( - [in] IWineD3DPixelShader *shader - ); - IWineD3DPixelShader *GetPixelShader( - ); - HRESULT SetPixelShaderConstantB( - [in] UINT start_register, - [in] const BOOL *constants, - [in] UINT bool_count - ); - HRESULT GetPixelShaderConstantB( - [in] UINT start_register, - [out] BOOL *constants, - [in] UINT bool_count - ); - HRESULT SetPixelShaderConstantI( - [in] UINT start_register, - [in] const int *constants, - [in] UINT vector4i_count - ); - HRESULT GetPixelShaderConstantI( - [in] UINT start_register, - [out] int *constants, - [in] UINT vector4i_count - ); - HRESULT SetPixelShaderConstantF( - [in] UINT start_register, - [in] const float *constants, - [in] UINT vector4f_count - ); - HRESULT GetPixelShaderConstantF( - [in] UINT start_register, - [out] float *constants, - [in] UINT vector4f_count - ); - HRESULT SetRenderState( - [in] WINED3DRENDERSTATETYPE state, - [in] DWORD value - ); - HRESULT GetRenderState( - [in] WINED3DRENDERSTATETYPE state, - [out] DWORD *value - ); - HRESULT SetRenderTarget( - [in] DWORD render_target_idx, - [in] IWineD3DSurface *render_target, - [in] BOOL set_viewport - ); - HRESULT GetRenderTarget( - [in] DWORD render_target_idx, - [out] IWineD3DSurface **render_target - ); - HRESULT SetSamplerState( - [in] DWORD sampler_idx, - [in] WINED3DSAMPLERSTATETYPE state, - [in] DWORD value - ); - HRESULT GetSamplerState( - [in] DWORD sampler_idx, - [in] WINED3DSAMPLERSTATETYPE state, - [out] DWORD *value - ); - HRESULT SetScissorRect( - [in] const RECT *rect - ); - HRESULT GetScissorRect( - [out] RECT *rect - ); - HRESULT SetSoftwareVertexProcessing( - [in] BOOL software - ); - BOOL GetSoftwareVertexProcessing( - ); - HRESULT SetStreamSource( - [in] UINT stream_idx, - [in] IWineD3DBuffer *buffer, - [in] UINT offset, - [in] UINT stride - ); - HRESULT GetStreamSource( - [in] UINT stream_idx, - [out] IWineD3DBuffer **buffer, - [out] UINT *offset, - [out] UINT *stride - ); - HRESULT SetStreamSourceFreq( - [in] UINT stream_idx, - [in] UINT divider - ); - HRESULT GetStreamSourceFreq( - [in] UINT stream_idx, - [out] UINT *divider - ); - HRESULT SetTexture( - [in] DWORD stage, - [in] IWineD3DBaseTexture *texture - ); - HRESULT GetTexture( - [in] DWORD stage, - [out] IWineD3DBaseTexture **texture - ); - HRESULT SetTextureStageState( - [in] DWORD stage, - [in] WINED3DTEXTURESTAGESTATETYPE state, - [in] DWORD value - ); - HRESULT GetTextureStageState( - [in] DWORD stage, - [in] WINED3DTEXTURESTAGESTATETYPE state, - [out] DWORD *value - ); - HRESULT SetTransform( - [in] WINED3DTRANSFORMSTATETYPE state, - [in] const WINED3DMATRIX *matrix - ); - HRESULT GetTransform( - [in] WINED3DTRANSFORMSTATETYPE state, - [out] WINED3DMATRIX *matrix - ); - HRESULT SetVertexDeclaration( - [in] IWineD3DVertexDeclaration *declaration - ); - HRESULT GetVertexDeclaration( - [out] IWineD3DVertexDeclaration **declaration - ); - HRESULT SetVertexShader( - [in] IWineD3DVertexShader *shader - ); - IWineD3DVertexShader *GetVertexShader( - ); - HRESULT SetVertexShaderConstantB( - [in] UINT start_register, - [in] const BOOL *constants, - [in] UINT bool_count - ); - HRESULT GetVertexShaderConstantB( - [in] UINT start_register, - [out] BOOL *constants, - [in] UINT bool_count - ); - HRESULT SetVertexShaderConstantI( - [in] UINT start_register, - [in] const int *constants, - [in] UINT vector4i_count - ); - HRESULT GetVertexShaderConstantI( - [in] UINT start_register, - [out] int *constants, - [in] UINT vector4i_count - ); - HRESULT SetVertexShaderConstantF( - [in] UINT start_register, - [in] const float *constants, - [in] UINT vector4f_count - ); - HRESULT GetVertexShaderConstantF( - [in] UINT start_register, - [out] float *constants, - [in] UINT vector4f_count - ); - HRESULT SetViewport( - [in] const WINED3DVIEWPORT *viewport - ); - HRESULT GetViewport( - [out] WINED3DVIEWPORT *viewport - ); - HRESULT MultiplyTransform( - [in] WINED3DTRANSFORMSTATETYPE state, - [in] const WINED3DMATRIX *matrix - ); - HRESULT ValidateDevice( - [out] DWORD *num_passes - ); - HRESULT ProcessVertices( - [in] UINT src_start_idx, - [in] UINT dst_idx, - [in] UINT vertex_count, - [in] IWineD3DBuffer *dest_buffer, - [in] IWineD3DVertexDeclaration *declaration, - [in] DWORD flags, - [in] DWORD DestFVF - ); - HRESULT BeginStateBlock( - ); - HRESULT EndStateBlock( - [out] IWineD3DStateBlock **stateblock - ); - HRESULT BeginScene( - ); - HRESULT EndScene( - ); - HRESULT Present( - [in] const RECT *src_rect, - [in] const RECT *dst_rect, - [in] HWND dst_window_override, - [in] const RGNDATA *dirty_region - ); - HRESULT Clear( - [in] DWORD rect_count, - [in] const RECT *rects, - [in] DWORD flags, - [in] WINED3DCOLOR color, - [in] float z, - [in] DWORD stencil - ); - void ClearRendertargetView( - [in] IWineD3DRendertargetView *rendertarget_view, - [in] const WINED3DCOLORVALUE *color - ); - void SetPrimitiveType( - [in] WINED3DPRIMITIVETYPE primitive_topology - ); - void GetPrimitiveType( - [out] WINED3DPRIMITIVETYPE *primitive_topology - ); - HRESULT DrawPrimitive( - [in] UINT start_vertex, - [in] UINT vertex_count - ); - HRESULT DrawIndexedPrimitive( - [in] UINT start_idx, - [in] UINT index_count - ); - HRESULT DrawPrimitiveUP( - [in] UINT vertex_count, - [in] const void *stream_data, - [in] UINT stream_stride - ); - HRESULT DrawIndexedPrimitiveUP( - [in] UINT index_count, - [in] const void *index_data, - [in] enum wined3d_format_id index_data_format_id, - [in] const void *stream_data, - [in] UINT stream_stride - ); - HRESULT DrawPrimitiveStrided( - [in] UINT vertex_count, - [in] const WineDirect3DVertexStridedData *strided_data - ); - HRESULT DrawIndexedPrimitiveStrided( - [in] UINT index_count, - [in] const WineDirect3DVertexStridedData *strided_data, - [in] UINT vertex_count, - [in] const void *index_data, - [in] enum wined3d_format_id index_data_format_id - ); - HRESULT DrawRectPatch( - [in] UINT handle, - [in] const float *num_segs, - [in] const WINED3DRECTPATCH_INFO *rect_patch_info - ); - HRESULT DrawTriPatch( - [in] UINT handle, - [in] const float *num_segs, - [in] const WINED3DTRIPATCH_INFO *tri_patch_info - ); - HRESULT DeletePatch( - [in] UINT handle - ); - HRESULT ColorFill( - [in] IWineD3DSurface *surface, - [in] const RECT *rect, - [in] const WINED3DCOLORVALUE *color - ); - HRESULT UpdateTexture( - [in] IWineD3DBaseTexture *src_texture, - [in] IWineD3DBaseTexture *dst_texture - ); - HRESULT UpdateSurface( - [in] IWineD3DSurface *src_surface, - [in] const RECT *src_rect, - [in] IWineD3DSurface *dst_surface, - [in] const POINT *dst_point - ); - HRESULT GetFrontBufferData( - [in] UINT swapchain_idx, - [in] IWineD3DSurface *dst_surface - ); - HRESULT EnumResources( - [in] D3DCB_ENUMRESOURCES callback, - [in] void *data - ); - HRESULT GetSurfaceFromDC( - [in] HDC dc, - [out] IWineD3DSurface **surface - ); - HRESULT AcquireFocusWindow( - [in] HWND window - ); - void ReleaseFocusWindow( - ); -} - -#ifdef __midl -IWineD3D * __stdcall WineDirect3DCreate(UINT dxVersion, void *parent); -IWineD3DClipper * __stdcall WineDirect3DCreateClipper(void); -void __stdcall wined3d_mutex_lock(void); -void __stdcall wined3d_mutex_unlock(void); -#else -IWineD3D *WineDirect3DCreate(UINT dxVersion, void *parent); -IWineD3DClipper *WineDirect3DCreateClipper(void); -void wined3d_mutex_lock(void); -void wined3d_mutex_unlock(void); -#endif - diff --git a/include/xdk/amd64/ke.h b/include/xdk/amd64/ke.h index f63add4d7b6..3eaee6fd400 100644 --- a/include/xdk/amd64/ke.h +++ b/include/xdk/amd64/ke.h @@ -45,6 +45,22 @@ typedef XSAVE_FORMAT XMM_SAVE_AREA32, *PXMM_SAVE_AREA32; #define KeGetDcacheFillSize() 1L #define YieldProcessor _mm_pause +#define FastFence __faststorefence +#define LoadFence _mm_lfence +#define MemoryFence _mm_mfence +#define StoreFence _mm_sfence +#define LFENCE_ACQUIRE() LoadFence() + +FORCEINLINE +VOID +KeMemoryBarrier(VOID) +{ + // FIXME: Do we really need lfence after the __faststorefence ? + FastFence(); + LFENCE_ACQUIRE(); +} + +#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() FORCEINLINE KIRQL diff --git a/include/xdk/exfuncs.h b/include/xdk/exfuncs.h index 433909c0af2..4c3dd7dc890 100644 --- a/include/xdk/exfuncs.h +++ b/include/xdk/exfuncs.h @@ -131,14 +131,14 @@ ExInterlockedFlushSList( #if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_) NTKERNELAPI -PSINGLE_LIST_ENTRY +PSINGLE_LIST_ENTRY FASTCALL ExInterlockedPopEntrySList( IN PSLIST_HEADER ListHead, IN PKSPIN_LOCK Lock); NTKERNELAPI -PSINGLE_LIST_ENTRY +PSINGLE_LIST_ENTRY FASTCALL ExInterlockedPushEntrySList( IN PSLIST_HEADER ListHead, diff --git a/include/xdk/kefuncs.h b/include/xdk/kefuncs.h index ae37e3a4409..7574f4c0b6d 100644 --- a/include/xdk/kefuncs.h +++ b/include/xdk/kefuncs.h @@ -161,7 +161,7 @@ KeQuerySystemTime( OUT PLARGE_INTEGER CurrentTime); #endif /* !_M_AMD64 */ -#if !defined(_X86_) +#if !defined(_X86_) && !defined(_M_ARM) NTKERNELAPI KIRQL NTAPI @@ -207,7 +207,7 @@ KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock) } #endif -DECLSPEC_NORETURN +//DECLSPEC_NORETURN NTKERNELAPI VOID NTAPI diff --git a/include/xdk/ketypes.h b/include/xdk/ketypes.h index 86046749953..1d06cc87593 100644 --- a/include/xdk/ketypes.h +++ b/include/xdk/ketypes.h @@ -640,11 +640,12 @@ typedef enum _KSPIN_LOCK_QUEUE_NUMBER { #endif /* defined(_AMD64_) */ typedef VOID -(NTAPI *PKDEFERRED_ROUTINE)( +(NTAPI KDEFERRED_ROUTINE)( IN struct _KDPC *Dpc, IN PVOID DeferredContext OPTIONAL, IN PVOID SystemArgument1 OPTIONAL, IN PVOID SystemArgument2 OPTIONAL); +typedef KDEFERRED_ROUTINE *PKDEFERRED_ROUTINE; typedef enum _KDPC_IMPORTANCE { LowImportance, @@ -1017,7 +1018,7 @@ typedef VOID typedef enum _TIMER_SET_INFORMATION_CLASS { TimerSetCoalescableTimer, - MaxTimerInfoClass + MaxTimerInfoClass } TIMER_SET_INFORMATION_CLASS; #if (NTDDI_VERSION >= NTDDI_WIN7) diff --git a/include/xdk/mmfuncs.h b/include/xdk/mmfuncs.h index f3a0cea81c2..02902e33eab 100644 --- a/include/xdk/mmfuncs.h +++ b/include/xdk/mmfuncs.h @@ -118,6 +118,7 @@ $if (_WDMDDK_) ((PVOID) ((PCHAR) ((_Mdl)->StartVa) + (_Mdl)->ByteOffset)) #define MmGetProcedureAddress(Address) (Address) +#define MmLockPagableCodeSection(Address) MmLockPagableDataSection(Address) /* PVOID MmGetSystemAddressForMdl( * IN PMDL Mdl); diff --git a/include/xdk/wdm.template.h b/include/xdk/wdm.template.h index 19fc2f237a8..94e21e6c96d 100644 --- a/include/xdk/wdm.template.h +++ b/include/xdk/wdm.template.h @@ -170,7 +170,7 @@ typedef struct _DMA_ADAPTER *PADAPTER_OBJECT; #elif defined(_WDM_INCLUDED_) typedef struct _DMA_ADAPTER *PADAPTER_OBJECT; #else -typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; +typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; #endif #ifndef DEFINE_GUIDEX @@ -191,7 +191,7 @@ typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; #ifdef __cplusplus inline int IsEqualGUIDAligned(REFGUID guid1, REFGUID guid2) { - return ( (*(PLONGLONG)(&guid1) == *(PLONGLONG)(&guid2)) && + return ( (*(PLONGLONG)(&guid1) == *(PLONGLONG)(&guid2)) && (*((PLONGLONG)(&guid1) + 1) == *((PLONGLONG)(&guid2) + 1)) ); } #else diff --git a/include/xdk/x86/ke.h b/include/xdk/x86/ke.h index 96743803284..003d560044a 100644 --- a/include/xdk/x86/ke.h +++ b/include/xdk/x86/ke.h @@ -59,6 +59,8 @@ KeMemoryBarrier(VOID) #endif } +#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier() + NTHALAPI KIRQL NTAPI diff --git a/lib/3rdparty/CMakeLists.txt b/lib/3rdparty/CMakeLists.txt index 55fc71342bd..9c4760fa4e0 100644 --- a/lib/3rdparty/CMakeLists.txt +++ b/lib/3rdparty/CMakeLists.txt @@ -10,6 +10,5 @@ add_subdirectory(libmpg123) add_subdirectory(libsamplerate) add_subdirectory(libwine) add_subdirectory(libxml2) -add_subdirectory(mingw) add_subdirectory(stlport) add_subdirectory(zlib) diff --git a/lib/3rdparty/freetype/CMakeLists.txt b/lib/3rdparty/freetype/CMakeLists.txt index 578f46dc8e0..35ad946b1e2 100644 --- a/lib/3rdparty/freetype/CMakeLists.txt +++ b/lib/3rdparty/freetype/CMakeLists.txt @@ -1,8 +1,7 @@ add_definitions( -D__NTDRIVER__ - -DFT2_BUILD_LIBRARY - -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER) + -DFT2_BUILD_LIBRARY) include_directories(include) diff --git a/lib/3rdparty/libsamplerate/CMakeLists.txt b/lib/3rdparty/libsamplerate/CMakeLists.txt index d1864e1f763..136ae5c8668 100644 --- a/lib/3rdparty/libsamplerate/CMakeLists.txt +++ b/lib/3rdparty/libsamplerate/CMakeLists.txt @@ -6,4 +6,4 @@ list(APPEND SOURCE src_zoh.c) add_library(libsamplerate ${SOURCE}) -add_dependencies(libsamplerate psdk) \ No newline at end of file +add_dependencies(libsamplerate psdk) diff --git a/lib/3rdparty/libxml2/CMakeLists.txt b/lib/3rdparty/libxml2/CMakeLists.txt index e8c3ea20a95..39ed9e74ab1 100644 --- a/lib/3rdparty/libxml2/CMakeLists.txt +++ b/lib/3rdparty/libxml2/CMakeLists.txt @@ -1,7 +1,5 @@ -include_directories( - . - include) +include_directories(include) add_definitions( -D__MINGW32__ diff --git a/lib/3rdparty/libxml2/HTMLparser.c b/lib/3rdparty/libxml2/HTMLparser.c index 42dc776ae58..4d43b93d371 100644 --- a/lib/3rdparty/libxml2/HTMLparser.c +++ b/lib/3rdparty/libxml2/HTMLparser.c @@ -2887,9 +2887,11 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { } if ((!(IS_CHAR_CH(cur))) && (!((cur == 0) && (ctxt->progressive)))) { - htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR, - "Invalid char in CDATA 0x%X\n", cur); - NEXT; + htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR, + "Invalid char in CDATA 0x%X\n", cur); + if (ctxt->input->cur < ctxt->input->end) { + NEXT; + } } if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) { @@ -3275,7 +3277,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { val = val * 16 + (CUR - 'A') + 10; else { htmlParseErr(ctxt, XML_ERR_INVALID_HEX_CHARREF, - "htmlParseCharRef: missing semicolumn\n", + "htmlParseCharRef: missing semicolon\n", NULL, NULL); break; } @@ -3290,7 +3292,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) { val = val * 10 + (CUR - '0'); else { htmlParseErr(ctxt, XML_ERR_INVALID_DEC_CHARREF, - "htmlParseCharRef: missing semicolumn\n", + "htmlParseCharRef: missing semicolon\n", NULL, NULL); break; } @@ -4670,7 +4672,7 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) { if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) ctxt->sax->endDocument(ctxt->userData); - if (ctxt->myDoc != NULL) { + if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL)) { dtd = xmlGetIntSubset(ctxt->myDoc); if (dtd == NULL) ctxt->myDoc->intSubset = @@ -5609,7 +5611,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { int idx; xmlChar val; - idx = htmlParseLookupSequence(ctxt, '<', '/', 0, 0, 1); + idx = htmlParseLookupSequence(ctxt, '<', '/', 0, 0, 0); if (idx < 0) goto done; val = in->cur[idx + 2]; @@ -6451,6 +6453,7 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt) ctxt->wellFormed = 1; ctxt->nsWellFormed = 1; + ctxt->disableSAX = 0; ctxt->valid = 1; ctxt->vctxt.userData = ctxt; ctxt->vctxt.error = xmlParserValidityError; @@ -6530,6 +6533,10 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) ctxt->options |= XML_PARSE_HUGE; options -= XML_PARSE_HUGE; } + if (options & HTML_PARSE_NODEFDTD) { + ctxt->options |= HTML_PARSE_NODEFDTD; + options -= HTML_PARSE_NODEFDTD; + } ctxt->dictNames = 0; return (options); } diff --git a/lib/3rdparty/libxml2/Makefile.am b/lib/3rdparty/libxml2/Makefile.am index 967afbdb57d..b8cbb4a6a3c 100644 --- a/lib/3rdparty/libxml2/Makefile.am +++ b/lib/3rdparty/libxml2/Makefile.am @@ -1213,9 +1213,9 @@ DOC_MODULE=libxml2-$(VERSION) EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples install-data-local: - $(mkinstalldirs) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + @MKDIR_P@ $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - $(mkinstalldirs) $(DESTDIR)$(EXAMPLES_DIR) + @MKDIR_P@ $(DESTDIR)$(EXAMPLES_DIR) -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) diff --git a/lib/3rdparty/libxml2/Makefile.in b/lib/3rdparty/libxml2/Makefile.in index df1b84a841c..1e0e461c9f8 100644 --- a/lib/3rdparty/libxml2/Makefile.in +++ b/lib/3rdparty/libxml2/Makefile.in @@ -52,7 +52,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/libxml-2.0.pc.in $(srcdir)/libxml.spec.in \ $(srcdir)/xml2-config.in $(top_srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL NEWS TODO acconfig.h config.guess \ - config.sub depcomp install-sh ltmain.sh missing mkinstalldirs + config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -62,7 +62,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = libxml2.spec xml2-config libxml-2.0.pc \ libxml-2.0-uninstalled.pc @@ -418,6 +418,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -466,6 +467,7 @@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ +WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@ WITH_C14N = @WITH_C14N@ WITH_CATALOG = @WITH_CATALOG@ WITH_DEBUG = @WITH_DEBUG@ @@ -474,6 +476,7 @@ WITH_FTP = @WITH_FTP@ WITH_HTML = @WITH_HTML@ WITH_HTTP = @WITH_HTTP@ WITH_ICONV = @WITH_ICONV@ +WITH_ICU = @WITH_ICU@ WITH_ISO8859X = @WITH_ISO8859X@ WITH_LEGACY = @WITH_LEGACY@ WITH_MEM_DEBUG = @WITH_MEM_DEBUG@ @@ -544,7 +547,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -2700,9 +2702,9 @@ xml2Conf.sh: xml2Conf.sh.in Makefile && mv xml2Conf.tmp xml2Conf.sh install-data-local: - $(mkinstalldirs) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + @MKDIR_P@ $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) -@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) - $(mkinstalldirs) $(DESTDIR)$(EXAMPLES_DIR) + @MKDIR_P@ $(DESTDIR)$(EXAMPLES_DIR) -@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR) -@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR) -@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR) diff --git a/lib/3rdparty/libxml2/SAX2.c b/lib/3rdparty/libxml2/SAX2.c index 84c1f00481c..c0482c0b681 100644 --- a/lib/3rdparty/libxml2/SAX2.c +++ b/lib/3rdparty/libxml2/SAX2.c @@ -2242,8 +2242,12 @@ xmlSAX2StartElementNs(void *ctx, if ((URI != NULL) && (prefix == pref)) ret->ns = ns; } else { - xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); - return; + /* + * any out of memory error would already have been raised + * but we can't be garanteed it's the actual error due to the + * API, best is to skip in this case + */ + continue; } #ifdef LIBXML_VALID_ENABLED if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed && diff --git a/lib/3rdparty/libxml2/catalog.c b/lib/3rdparty/libxml2/catalog.c index af84b7c4bc6..f33a0aa9909 100644 --- a/lib/3rdparty/libxml2/catalog.c +++ b/lib/3rdparty/libxml2/catalog.c @@ -997,18 +997,15 @@ xmlLoadFileContent(const char *filename) } #ifdef HAVE_STAT len = read(fd, content, size); + close(fd); #else len = fread(content, 1, size, fd); + fclose(fd); #endif if (len < 0) { xmlFree(content); return (NULL); } -#ifdef HAVE_STAT - close(fd); -#else - fclose(fd); -#endif content[len] = 0; return(content); diff --git a/lib/3rdparty/libxml2/config.h.in b/lib/3rdparty/libxml2/config.h.in index 6f45c6ca503..d60f3627cd7 100644 --- a/lib/3rdparty/libxml2/config.h.in +++ b/lib/3rdparty/libxml2/config.h.in @@ -274,6 +274,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/lib/3rdparty/libxml2/configure b/lib/3rdparty/libxml2/configure index 91011e5ec01..605e8c4c359 100644 --- a/lib/3rdparty/libxml2/configure +++ b/lib/3rdparty/libxml2/configure @@ -1,18 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. +# Generated by GNU Autoconf 2.66. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -20,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -44,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -55,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -78,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -94,15 +89,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -114,12 +109,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -131,7 +130,256 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -145,8 +393,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -166,295 +418,19 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -471,8 +447,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -482,29 +457,18 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -534,7 +498,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -553,10 +517,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -569,161 +533,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -738,7 +555,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -746,6 +562,7 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="entities.c" # Factoring default headers for most tests. @@ -805,6 +622,7 @@ XML_LIBDIR XML_CFLAGS CYGWIN_EXTRA_PYTHON_LIBADD CYGWIN_EXTRA_LDFLAGS +WIN32_EXTRA_PYTHON_LIBADD WIN32_EXTRA_LDFLAGS WIN32_EXTRA_LIBADD WITH_RUN_DEBUG @@ -819,6 +637,7 @@ WITH_SCHEMAS TEST_SCHEMATRON WITH_SCHEMATRON WITH_ISO8859X +WITH_ICU WITH_ICONV WITH_OUTPUT TEST_XPATH @@ -894,7 +713,6 @@ OTOOL LIPO NMEDIT DSYMUTIL -lt_ECHO RANLIB AR LN_S @@ -1004,6 +822,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -1033,6 +852,7 @@ with_html_dir with_html_subdir with_http with_iconv +with_icu with_iso8859x with_legacy with_mem_debug @@ -1179,8 +999,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1206,8 +1025,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1411,8 +1229,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1428,8 +1245,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1459,17 +1275,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1486,15 +1302,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1517,8 +1331,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1532,8 +1345,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1548,11 +1361,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1591,13 +1402,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1637,7 +1446,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1729,6 +1538,7 @@ Optional Packages: $PACKAGE-$VERSION/html --with-http add the HTTP support (on) --with-iconv[=DIR] add ICONV support (on) + --with-icu add ICU support (off) --with-iso8859x add ISO8859X support if no iconv (on) --with-legacy add deprecated APIs for compatibility (on) --with-mem-debug add the memory debugging module (off) @@ -1762,13 +1572,14 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1832,21 +1643,372 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.66 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -1882,8 +2044,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1920,9 +2082,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1938,13 +2100,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1956,11 +2118,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1969,13 +2129,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1994,11 +2154,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2011,11 +2169,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2029,11 +2185,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2047,46 +2201,53 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2097,19 +2258,23 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -2117,7 +2282,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -2132,11 +2297,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -2146,17 +2311,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -2168,35 +2333,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2225,9 +2375,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2241,35 +2389,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2285,28 +2425,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2325,7 +2461,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=7 -LIBXML_MICRO_VERSION=7 +LIBXML_MICRO_VERSION=8 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -2382,10 +2518,10 @@ am__api_version='1.11' # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2393,11 +2529,11 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2434,7 +2570,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -2450,7 +2586,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2461,7 +2597,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 @@ -2472,15 +2608,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2502,11 +2634,8 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -2515,13 +2644,10 @@ then # Ok. : else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" @@ -2549,7 +2675,7 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi @@ -2570,9 +2696,9 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2583,24 +2709,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2610,9 +2736,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2623,24 +2749,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2649,7 +2775,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2662,10 +2788,10 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then + if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2673,7 +2799,7 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do + for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( @@ -2685,11 +2811,12 @@ do esac done done -done + done IFS=$as_save_IFS fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2697,11 +2824,10 @@ fi # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" @@ -2714,9 +2840,9 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2727,24 +2853,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2752,11 +2878,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2764,7 +2890,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2774,11 +2900,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2798,9 +2924,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2865,9 +2989,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2878,24 +3002,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2905,9 +3029,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2918,24 +3042,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2944,7 +3068,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2958,9 +3082,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2971,24 +3095,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2998,9 +3122,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3012,18 +3136,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -3042,10 +3166,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3057,9 +3181,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3070,24 +3194,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3101,9 +3225,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3114,24 +3238,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3144,7 +3268,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -3155,57 +3279,37 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3221,8 +3325,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3238,17 +3342,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3265,7 +3369,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3284,84 +3388,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3376,32 +3437,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3413,17 +3525,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3436,31 +3548,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3474,37 +3578,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3513,20 +3596,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3537,35 +3616,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3576,36 +3631,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3616,42 +3647,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3668,18 +3674,14 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3736,32 +3738,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3772,17 +3751,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3801,7 +3782,7 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= @@ -3829,12 +3810,12 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -3854,9 +3835,9 @@ fi depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -3964,7 +3945,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -3979,112 +3960,21 @@ else fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4099,11 +3989,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4112,78 +3998,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -4195,7 +4037,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -4206,11 +4048,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4219,87 +4057,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4310,9 +4101,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_RM+set}" = set; then +if test "${ac_cv_path_RM+set}" = set; then : $as_echo_n "(cached) " >&6 else case $RM in @@ -4325,14 +4116,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_RM" && ac_cv_path_RM="/bin/rm" @@ -4341,19 +4132,19 @@ esac fi RM=$ac_cv_path_RM if test -n "$RM"; then - { $as_echo "$as_me:$LINENO: result: $RM" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MV+set}" = set; then +if test "${ac_cv_path_MV+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MV in @@ -4366,14 +4157,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_MV" && ac_cv_path_MV="/bin/mv" @@ -4382,19 +4173,19 @@ esac fi MV=$ac_cv_path_MV if test -n "$MV"; then - { $as_echo "$as_me:$LINENO: result: $MV" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5 $as_echo "$MV" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "tar", so it can be a program name with args. set dummy tar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TAR+set}" = set; then +if test "${ac_cv_path_TAR+set}" = set; then : $as_echo_n "(cached) " >&6 else case $TAR in @@ -4407,14 +4198,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="/bin/tar" @@ -4423,19 +4214,19 @@ esac fi TAR=$ac_cv_path_TAR if test -n "$TAR"; then - { $as_echo "$as_me:$LINENO: result: $TAR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 $as_echo "$TAR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PERL+set}" = set; then +if test "${ac_cv_path_PERL+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PERL in @@ -4448,14 +4239,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/bin/perl" @@ -4464,19 +4255,19 @@ esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then - { $as_echo "$as_me:$LINENO: result: $PERL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "wget", so it can be a program name with args. set dummy wget; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_WGET+set}" = set; then +if test "${ac_cv_path_WGET+set}" = set; then : $as_echo_n "(cached) " >&6 else case $WGET in @@ -4489,14 +4280,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_WGET" && ac_cv_path_WGET="/usr/bin/wget" @@ -4505,19 +4296,19 @@ esac fi WGET=$ac_cv_path_WGET if test -n "$WGET"; then - { $as_echo "$as_me:$LINENO: result: $WGET" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5 $as_echo "$WGET" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xmllint", so it can be a program name with args. set dummy xmllint; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XMLLINT+set}" = set; then +if test "${ac_cv_path_XMLLINT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $XMLLINT in @@ -4530,14 +4321,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT="/usr/bin/xmllint" @@ -4546,19 +4337,19 @@ esac fi XMLLINT=$ac_cv_path_XMLLINT if test -n "$XMLLINT"; then - { $as_echo "$as_me:$LINENO: result: $XMLLINT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 $as_echo "$XMLLINT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XSLTPROC+set}" = set; then +if test "${ac_cv_path_XSLTPROC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $XSLTPROC in @@ -4571,14 +4362,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="/usr/bin/xsltproc" @@ -4587,40 +4378,36 @@ esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then - { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 $as_echo "$XSLTPROC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 $as_echo_n "checking for function prototypes... " >&6; } if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define PROTOTYPES 1 -_ACEOF +$as_echo "#define PROTOTYPES 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define __PROTOTYPES 1 -_ACEOF +$as_echo "#define __PROTOTYPES 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4631,7 +4418,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue @@ -4651,7 +4438,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -4666,26 +4453,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4699,7 +4484,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue @@ -4719,7 +4504,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -4734,12 +4519,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4747,21 +4530,17 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4776,48 +4555,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4827,18 +4581,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4848,14 +4598,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4882,118 +4628,33 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5011,146 +4672,12 @@ else fi # Ensure some checks needed by ansi2knr itself. - for ac_header in string.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STRING_H 1 _ACEOF fi @@ -5158,20 +4685,18 @@ fi done -test "x$U" != "x" && { { $as_echo "$as_me:$LINENO: error: Compiler not ANSI compliant" >&5 -$as_echo "$as_me: error: Compiler not ANSI compliant" >&2;} - { (exit 1); exit 1; }; } +test "x$U" != "x" && as_fn_error $? "Compiler not ANSI compliant" "$LINENO" 5 enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then +if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then @@ -5182,24 +4707,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then - { $as_echo "$as_me:$LINENO: result: $AS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5209,9 +4734,9 @@ if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then @@ -5222,24 +4747,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5248,7 +4773,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5261,9 +4786,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -5274,24 +4799,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5301,9 +4826,9 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -5314,24 +4839,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5340,7 +4865,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5353,9 +4878,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -5366,24 +4891,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5393,9 +4918,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -5406,24 +4931,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5432,7 +4957,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5467,14 +4992,14 @@ test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -macro_version='2.2.6b' -macro_revision='1.3017' +macro_version='2.2.10' +macro_revision='1.3175' @@ -5490,9 +5015,78 @@ macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`print -r -- -n 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then +if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5500,7 +5094,7 @@ else ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= + { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5509,7 +5103,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue @@ -5529,7 +5123,7 @@ case `"$ac_path_SED" --version 2>&1` in $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" @@ -5544,19 +5138,17 @@ esac $ac_path_SED_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5574,9 +5166,9 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then +if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -5590,7 +5182,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue @@ -5610,7 +5202,7 @@ case `"$ac_path_FGREP" --version 2>&1` in $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" @@ -5625,12 +5217,10 @@ esac $ac_path_FGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -5638,7 +5228,7 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5664,7 +5254,7 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -5673,7 +5263,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -5703,13 +5293,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then +if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -5740,18 +5330,16 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then +if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -5764,7 +5352,7 @@ case `$LD -v 2>&1 &5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5776,9 +5364,9 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then +if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -5825,20 +5413,23 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then +if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -5849,24 +5440,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5876,13 +5467,13 @@ fi fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -5893,24 +5484,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5923,7 +5514,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5931,6 +5522,15 @@ esac fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -5943,44 +5543,44 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then +if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5953: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5956: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5959: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then +if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 @@ -6013,6 +5613,11 @@ else lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -6077,8 +5682,8 @@ else # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -6098,10 +5703,10 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6115,7 +5720,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no @@ -6125,17 +5730,17 @@ xsi_shell=no && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } @@ -6170,14 +5775,14 @@ esac -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then +if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in @@ -6206,9 +5811,9 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -6219,24 +5824,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6246,9 +5851,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -6259,24 +5864,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6285,7 +5890,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6302,9 +5907,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then +if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -6346,16 +5951,18 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -6385,6 +5992,10 @@ gnu*) lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -6393,11 +6004,11 @@ hpux10.20* | hpux11*) lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -6419,7 +6030,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -6498,7 +6109,7 @@ tpf*) esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method @@ -6518,9 +6129,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then +if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6531,24 +6142,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6558,9 +6169,9 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6571,24 +6182,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6597,7 +6208,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6623,9 +6234,9 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6636,24 +6247,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6663,9 +6274,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -6676,24 +6287,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6702,7 +6313,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6722,9 +6333,9 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then +if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6735,24 +6346,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6762,9 +6373,9 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6775,24 +6386,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6801,7 +6412,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6835,6 +6446,18 @@ if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + @@ -6879,9 +6502,9 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -6997,18 +6620,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7061,11 +6684,11 @@ _LT_EOF lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -7099,10 +6722,10 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi @@ -7128,7 +6751,7 @@ fi # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -7140,11 +6763,11 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -7158,12 +6781,12 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7161 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -7197,11 +6820,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -7250,9 +6873,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then +if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -7261,11 +6884,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7276,38 +6895,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7315,7 +6909,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -7325,11 +6919,11 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in @@ -7355,9 +6949,9 @@ need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -7368,24 +6962,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7395,9 +6989,9 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -7408,24 +7002,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7434,7 +7028,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7447,9 +7041,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then +if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -7460,24 +7054,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7487,9 +7081,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -7500,24 +7094,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7526,7 +7120,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7539,9 +7133,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then +if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -7552,24 +7146,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7579,9 +7173,9 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -7592,24 +7186,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7618,7 +7212,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7631,9 +7225,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then +if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -7644,24 +7238,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7671,9 +7265,9 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -7684,24 +7278,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7710,7 +7304,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7723,9 +7317,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then +if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -7736,24 +7330,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7763,9 +7357,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -7776,24 +7370,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7802,7 +7396,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7838,9 +7432,9 @@ fi - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then +if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -7865,22 +7459,18 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7891,43 +7481,50 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no + lt_cv_ld_exported_symbols_list=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if test "${lt_cv_ld_force_load+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -7955,7 +7552,7 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -7963,62 +7560,13 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } ;; esac - for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -8027,6 +7575,8 @@ done + + # Set options @@ -8036,7 +7586,7 @@ done # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8067,7 +7617,7 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -8099,7 +7649,7 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then +if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default @@ -8115,7 +7665,7 @@ test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -8175,6 +7725,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + test -z "$LN_S" && LN_S="ln -s" @@ -8196,9 +7747,9 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then +if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -8211,7 +7762,7 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -8226,19 +7777,6 @@ _ACEOF - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -8251,23 +7789,6 @@ aix3*) ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -8296,7 +7817,7 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -8304,9 +7825,9 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8357,10 +7878,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8370,9 +7891,9 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8423,10 +7944,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8505,11 +8026,16 @@ if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -8525,15 +8051,15 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8528: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8532: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -8542,7 +8068,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then @@ -8562,7 +8088,7 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then @@ -8611,6 +8137,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -8653,6 +8185,13 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -8694,7 +8233,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -8715,7 +8254,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -8727,26 +8266,26 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; esac ;; esac @@ -8777,7 +8316,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -8834,7 +8373,7 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } @@ -8846,9 +8385,9 @@ $as_echo "$lt_prog_compiler_pic" >&6; } # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -8864,15 +8403,15 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8867: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8871: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -8881,7 +8420,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then @@ -8905,9 +8444,9 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then +if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -8920,7 +8459,7 @@ else if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -8933,7 +8472,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then @@ -8948,9 +8487,9 @@ fi - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8969,16 +8508,16 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8972: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8976: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -8995,7 +8534,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9003,9 +8542,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9024,16 +8563,16 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9027: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9031: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -9050,7 +8589,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9059,7 +8598,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -9067,10 +8606,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -9083,7 +8622,7 @@ fi - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= @@ -9146,7 +8685,33 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -9164,6 +8729,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -9179,11 +8745,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -9219,6 +8786,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -9240,6 +8808,11 @@ _LT_EOF fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -9255,7 +8828,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -9269,11 +8842,12 @@ _LT_EOF tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -9284,13 +8858,17 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -9306,17 +8884,17 @@ _LT_EOF fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -9437,8 +9015,10 @@ _LT_EOF else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -9525,11 +9105,7 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9540,27 +9116,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9574,20 +9130,13 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' @@ -9596,11 +9145,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9611,27 +9156,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9645,16 +9170,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -9662,8 +9180,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -9702,7 +9225,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. @@ -9718,7 +9241,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -9726,7 +9253,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -9792,7 +9319,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' @@ -9811,7 +9338,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -9832,7 +9359,46 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if test "${lt_cv_prog_compiler__b+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + ;; esac fi @@ -9860,52 +9426,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int foo(void) {} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +if ac_fn_c_try_link "$LINENO"; then : + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -9967,17 +9507,17 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -9987,13 +9527,13 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -10157,7 +9697,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi fi -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no @@ -10194,46 +9734,52 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -10396,7 +9942,7 @@ esac - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then @@ -10404,16 +9950,23 @@ if test "$GCC" = yes; then darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -10426,7 +9979,7 @@ if test "$GCC" = yes; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -10446,7 +9999,13 @@ BEGIN {RS=" "; FS="/|\n";} { if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -10534,7 +10093,7 @@ amigaos*) m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -10587,23 +10146,12 @@ cygwin* | mingw* | pw32* | cegcc*) cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' @@ -10703,6 +10251,19 @@ gnu*) hardcode_into_libs=yes ;; +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. @@ -10745,8 +10306,10 @@ hpux9* | hpux10* | hpux11*) soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -10804,7 +10367,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -10813,16 +10376,17 @@ linux* | k*bsd*-gnu) finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10833,43 +10397,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -10881,8 +10421,9 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -11082,7 +10623,7 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no @@ -11184,7 +10725,12 @@ fi - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || @@ -11209,7 +10755,7 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || @@ -11254,18 +10800,14 @@ else darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11283,43 +10825,18 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -11332,106 +10849,18 @@ fi ;; *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11449,145 +10878,32 @@ return shl_load (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11605,57 +10921,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then +if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11673,57 +10960,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then +if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11741,43 +10999,18 @@ return dld_link (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11816,9 +11049,9 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then +if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11827,7 +11060,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11830 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11868,7 +11101,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +void fnord () __attribute__((visibility("default"))); +#endif + +void fnord () { int i=42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11877,7 +11116,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -11886,11 +11129,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11907,14 +11150,14 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then +if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11923,7 +11166,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11926 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11964,7 +11207,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +void fnord () __attribute__((visibility("default"))); +#endif + +void fnord () { int i=42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11973,7 +11222,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -11982,11 +11235,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -12003,7 +11256,7 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi @@ -12042,12 +11295,12 @@ fi striplib= old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough @@ -12056,15 +11309,15 @@ else if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac @@ -12082,12 +11335,12 @@ fi # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no @@ -12108,14 +11361,14 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -12161,7 +11414,7 @@ else esac fi - if test -n "$VERSION_SCRIPT_FLAGS"; then + if test -z "$VERSION_SCRIPT_FLAGS"; then USE_VERSION_SCRIPT_TRUE= USE_VERSION_SCRIPT_FALSE='#' else @@ -12176,55 +11429,55 @@ _ldflags="${LDFLAGS}" # Check whether --with-c14n was given. -if test "${with_c14n+set}" = set; then +if test "${with_c14n+set}" = set; then : withval=$with_c14n; fi # Check whether --with-catalog was given. -if test "${with_catalog+set}" = set; then +if test "${with_catalog+set}" = set; then : withval=$with_catalog; fi # Check whether --with-debug was given. -if test "${with_debug+set}" = set; then +if test "${with_debug+set}" = set; then : withval=$with_debug; fi # Check whether --with-docbook was given. -if test "${with_docbook+set}" = set; then +if test "${with_docbook+set}" = set; then : withval=$with_docbook; fi # Check whether --with-fexceptions was given. -if test "${with_fexceptions+set}" = set; then +if test "${with_fexceptions+set}" = set; then : withval=$with_fexceptions; fi # Check whether --with-ftp was given. -if test "${with_ftp+set}" = set; then +if test "${with_ftp+set}" = set; then : withval=$with_ftp; fi # Check whether --with-history was given. -if test "${with_history+set}" = set; then +if test "${with_history+set}" = set; then : withval=$with_history; fi # Check whether --with-html was given. -if test "${with_html+set}" = set; then +if test "${with_html+set}" = set; then : withval=$with_html; fi # Check whether --with-html-dir was given. -if test "${with_html_dir+set}" = set; then +if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; HTML_DIR=$withval else HTML_DIR='$(datadir)/doc' @@ -12233,7 +11486,7 @@ fi # Check whether --with-html-subdir was given. -if test "${with_html_subdir+set}" = set; then +if test "${with_html_subdir+set}" = set; then : withval=$with_html_subdir; test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval" else HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html" @@ -12242,73 +11495,79 @@ fi # Check whether --with-http was given. -if test "${with_http+set}" = set; then +if test "${with_http+set}" = set; then : withval=$with_http; fi # Check whether --with-iconv was given. -if test "${with_iconv+set}" = set; then +if test "${with_iconv+set}" = set; then : withval=$with_iconv; fi +# Check whether --with-icu was given. +if test "${with_icu+set}" = set; then : + withval=$with_icu; +fi + + # Check whether --with-iso8859x was given. -if test "${with_iso8859x+set}" = set; then +if test "${with_iso8859x+set}" = set; then : withval=$with_iso8859x; fi # Check whether --with-legacy was given. -if test "${with_legacy+set}" = set; then +if test "${with_legacy+set}" = set; then : withval=$with_legacy; fi # Check whether --with-mem_debug was given. -if test "${with_mem_debug+set}" = set; then +if test "${with_mem_debug+set}" = set; then : withval=$with_mem_debug; fi # Check whether --with-minimum was given. -if test "${with_minimum+set}" = set; then +if test "${with_minimum+set}" = set; then : withval=$with_minimum; fi # Check whether --with-output was given. -if test "${with_output+set}" = set; then +if test "${with_output+set}" = set; then : withval=$with_output; fi # Check whether --with-pattern was given. -if test "${with_pattern+set}" = set; then +if test "${with_pattern+set}" = set; then : withval=$with_pattern; fi # Check whether --with-push was given. -if test "${with_push+set}" = set; then +if test "${with_push+set}" = set; then : withval=$with_push; fi # Check whether --with-python was given. -if test "${with_python+set}" = set; then +if test "${with_python+set}" = set; then : withval=$with_python; fi # Check whether --with-reader was given. -if test "${with_reader+set}" = set; then +if test "${with_reader+set}" = set; then : withval=$with_reader; fi # Check whether --with-readline was given. -if test "${with_readline+set}" = set; then +if test "${with_readline+set}" = set; then : withval=$with_readline; if test "$withval" != "no" -a "$withval" != "yes"; then RDL_DIR=$withval @@ -12320,91 +11579,91 @@ fi # Check whether --with-regexps was given. -if test "${with_regexps+set}" = set; then +if test "${with_regexps+set}" = set; then : withval=$with_regexps; fi # Check whether --with-run_debug was given. -if test "${with_run_debug+set}" = set; then +if test "${with_run_debug+set}" = set; then : withval=$with_run_debug; fi # Check whether --with-sax1 was given. -if test "${with_sax1+set}" = set; then +if test "${with_sax1+set}" = set; then : withval=$with_sax1; fi # Check whether --with-schemas was given. -if test "${with_schemas+set}" = set; then +if test "${with_schemas+set}" = set; then : withval=$with_schemas; fi # Check whether --with-schematron was given. -if test "${with_schematron+set}" = set; then +if test "${with_schematron+set}" = set; then : withval=$with_schematron; fi # Check whether --with-threads was given. -if test "${with_threads+set}" = set; then +if test "${with_threads+set}" = set; then : withval=$with_threads; fi # Check whether --with-thread-alloc was given. -if test "${with_thread_alloc+set}" = set; then +if test "${with_thread_alloc+set}" = set; then : withval=$with_thread_alloc; fi # Check whether --with-tree was given. -if test "${with_tree+set}" = set; then +if test "${with_tree+set}" = set; then : withval=$with_tree; fi # Check whether --with-valid was given. -if test "${with_valid+set}" = set; then +if test "${with_valid+set}" = set; then : withval=$with_valid; fi # Check whether --with-writer was given. -if test "${with_writer+set}" = set; then +if test "${with_writer+set}" = set; then : withval=$with_writer; fi # Check whether --with-xinclude was given. -if test "${with_xinclude+set}" = set; then +if test "${with_xinclude+set}" = set; then : withval=$with_xinclude; fi # Check whether --with-xpath was given. -if test "${with_xpath+set}" = set; then +if test "${with_xpath+set}" = set; then : withval=$with_xpath; fi # Check whether --with-xptr was given. -if test "${with_xptr+set}" = set; then +if test "${with_xptr+set}" = set; then : withval=$with_xptr; fi # Check whether --with-modules was given. -if test "${with_modules+set}" = set; then +if test "${with_modules+set}" = set; then : withval=$with_modules; fi # Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then +if test "${with_zlib+set}" = set; then : withval=$with_zlib; if test "$withval" != "no" -a "$withval" != "yes"; then Z_DIR=$withval @@ -12416,13 +11675,13 @@ fi # Check whether --with-coverage was given. -if test "${with_coverage+set}" = set; then +if test "${with_coverage+set}" = set; then : withval=$with_coverage; fi # Check whether --enable-rebuild-docs was given. -if test "${enable_rebuild_docs+set}" = set; then +if test "${enable_rebuild_docs+set}" = set; then : enableval=$enable_rebuild_docs; fi @@ -12602,159 +11861,21 @@ WITH_ZLIB=0 if test "$with_zlib" = "no"; then echo "Disabling compression support" else - -for ac_header in zlib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_header in zlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_ZLIB_H 1 _ACEOF - { $as_echo "$as_me:$LINENO: checking for gzread in -lz" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 $as_echo_n "checking for gzread in -lz... " >&6; } -if test "${ac_cv_lib_z_gzread+set}" = set; then +if test "${ac_cv_lib_z_gzread+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12772,48 +11893,21 @@ return gzread (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_gzread=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_z_gzread=no + ac_cv_lib_z_gzread=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzread" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 $as_echo "$ac_cv_lib_z_gzread" >&6; } -if test "x$ac_cv_lib_z_gzread" = x""yes; then +if test "x$ac_cv_lib_z_gzread" = x""yes; then : -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBZ 1 -_ACEOF +$as_echo "#define HAVE_LIBZ 1" >>confdefs.h WITH_ZLIB=1 if test "x${Z_DIR}" != "x"; then @@ -12844,24 +11938,15 @@ LDFLAGS=${_ldflags} echo Checking headers - - - - - ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\"" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> @@ -12875,41 +11960,17 @@ return 0; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF @@ -12920,17 +11981,13 @@ fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then +if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12955,70 +12012,39 @@ for ac_lib in '' dir; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then - : +if test "${ac_cv_search_opendir+set}" = set; then : + else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then +if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -13043,70 +12069,39 @@ for ac_lib in '' x; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then - : +if test "${ac_cv_search_opendir+set}" = set; then : + else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -13121,48 +12116,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -13172,18 +12142,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -13193,14 +12159,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -13227,4275 +12189,419 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi - for ac_header in fcntl.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_FCNTL_H 1 _ACEOF fi done - for ac_header in unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_UNISTD_H 1 _ACEOF fi done - for ac_header in ctype.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" +if test "x$ac_cv_header_ctype_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_CTYPE_H 1 _ACEOF fi done - for ac_header in dirent.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DIRENT_H 1 _ACEOF fi done - for ac_header in errno.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_ERRNO_H 1 _ACEOF fi done - for ac_header in malloc.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_MALLOC_H 1 _ACEOF fi done - for ac_header in stdarg.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" +if test "x$ac_cv_header_stdarg_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STDARG_H 1 _ACEOF fi done - for ac_header in sys/stat.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_STAT_H 1 _ACEOF fi done - for ac_header in sys/types.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_TYPES_H 1 _ACEOF fi done - for ac_header in stdint.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STDINT_H 1 _ACEOF fi done - for ac_header in inttypes.h.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h.h" "ac_cv_header_inttypes_h_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_INTTYPES_H_H 1 _ACEOF fi done - for ac_header in time.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" +if test "x$ac_cv_header_time_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_TIME_H 1 _ACEOF fi done - for ac_header in ansidecl.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "ansidecl.h" "ac_cv_header_ansidecl_h" "$ac_includes_default" +if test "x$ac_cv_header_ansidecl_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_ANSIDECL_H 1 _ACEOF fi done - for ac_header in ieeefp.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default" +if test "x$ac_cv_header_ieeefp_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_IEEEFP_H 1 _ACEOF fi done - for ac_header in nan.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "nan.h" "ac_cv_header_nan_h" "$ac_includes_default" +if test "x$ac_cv_header_nan_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_NAN_H 1 _ACEOF fi done - for ac_header in math.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" +if test "x$ac_cv_header_math_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_MATH_H 1 _ACEOF fi done - for ac_header in limits.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LIMITS_H 1 _ACEOF fi done - for ac_header in fp_class.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "fp_class.h" "ac_cv_header_fp_class_h" "$ac_includes_default" +if test "x$ac_cv_header_fp_class_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_FP_CLASS_H 1 _ACEOF fi done - for ac_header in float.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" +if test "x$ac_cv_header_float_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_FLOAT_H 1 _ACEOF fi done - for ac_header in stdlib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STDLIB_H 1 _ACEOF fi done - for ac_header in sys/socket.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_TYPES_H +do : + ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "#if HAVE_SYS_TYPES_H # include # endif - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +" +if test "x$ac_cv_header_sys_socket_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_SOCKET_H 1 _ACEOF fi done - for ac_header in netinet/in.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_TYPES_H +do : + ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#if HAVE_SYS_TYPES_H # include # endif - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +" +if test "x$ac_cv_header_netinet_in_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_NETINET_IN_H 1 _ACEOF fi done - for ac_header in arpa/inet.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_TYPES_H +do : + ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "#if HAVE_SYS_TYPES_H # include # endif #if HAVE_ARPA_INET_H # include # endif - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +" +if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_ARPA_INET_H 1 _ACEOF fi done - for ac_header in netdb.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_NETDB_H 1 _ACEOF fi done - for ac_header in sys/time.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_TIME_H 1 _ACEOF fi done - for ac_header in sys/select.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_select_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_SELECT_H 1 _ACEOF fi done - for ac_header in poll.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default" +if test "x$ac_cv_header_poll_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_POLL_H 1 _ACEOF fi done - for ac_header in sys/mman.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mman_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_MMAN_H 1 _ACEOF fi done - for ac_header in sys/timeb.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_TIMEB_H 1 _ACEOF fi done - for ac_header in signal.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SIGNAL_H 1 _ACEOF fi done - for ac_header in arpa/nameser.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_TYPES_H +do : + ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#if HAVE_SYS_TYPES_H # include # endif - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +" +if test "x$ac_cv_header_arpa_nameser_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_ARPA_NAMESER_H 1 _ACEOF fi done - for ac_header in resolv.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_TYPES_H +do : + ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#if HAVE_SYS_TYPES_H # include # endif #if HAVE_NETINET_IN_H @@ -17505,338 +12611,34 @@ cat >>conftest.$ac_ext <<_ACEOF # include # endif - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +" +if test "x$ac_cv_header_resolv_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_RESOLV_H 1 _ACEOF fi done - for ac_header in dl.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default" +if test "x$ac_cv_header_dl_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DL_H 1 _ACEOF fi done - for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -17847,118 +12649,24 @@ done echo Checking libraries - for ac_func in strftime -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" +if test "x$ac_cv_func_strftime" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. -{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } -if test "${ac_cv_lib_intl_strftime+set}" = set; then +if test "${ac_cv_lib_intl_strftime+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -17976,46 +12684,19 @@ return strftime (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_intl_strftime=no + ac_cv_lib_intl_strftime=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test "x$ac_cv_lib_intl_strftime" = x""yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_STRFTIME 1 -_ACEOF +if test "x$ac_cv_lib_intl_strftime" = x""yes; then : + $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi @@ -18023,102 +12704,11 @@ fi fi done - - - for ac_func in strdup strndup strerror -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -18126,104 +12716,11 @@ _ACEOF fi done - - - - - for ac_func in finite isnand fp_class class fpclass -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -18231,103 +12728,11 @@ _ACEOF fi done - - - - for ac_func in strftime localtime gettimeofday ftime -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -18335,102 +12740,11 @@ _ACEOF fi done - - - for ac_func in stat _stat signal -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -18439,107 +12753,11 @@ fi done - - - - - - - - for ac_func in printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -18550,13 +12768,9 @@ fi done -{ $as_echo "$as_me:$LINENO: checking for va_copy" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 $as_echo_n "checking for va_copy... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include va_list ap1,ap2; @@ -18568,54 +12782,23 @@ va_copy(ap1,ap2); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : have_va_copy=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_va_copy=no + have_va_copy=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $have_va_copy" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_va_copy" >&5 $as_echo "$have_va_copy" >&6; } if test x"$have_va_copy" = x"yes"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_VA_COPY 1 -_ACEOF +$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: checking for __va_copy" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5 $as_echo_n "checking for __va_copy... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include va_list ap1,ap2; @@ -18627,60 +12810,29 @@ __va_copy(ap1,ap2); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : have___va_copy=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have___va_copy=no + have___va_copy=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $have___va_copy" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have___va_copy" >&5 $as_echo "$have___va_copy" >&6; } if test x"$have___va_copy" = x"yes"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE___VA_COPY 1 -_ACEOF +$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h fi fi -{ $as_echo "$as_me:$LINENO: checking for library containing gethostent" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostent" >&5 $as_echo_n "checking for library containing gethostent... " >&6; } -if test "${ac_cv_search_gethostent+set}" = set; then +if test "${ac_cv_search_gethostent+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -18705,69 +12857,38 @@ for ac_lib in '' nsl; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostent=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_gethostent+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_gethostent+set}" = set; then : break fi done -if test "${ac_cv_search_gethostent+set}" = set; then - : +if test "${ac_cv_search_gethostent+set}" = set; then : + else ac_cv_search_gethostent=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostent" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostent" >&5 $as_echo "$ac_cv_search_gethostent" >&6; } ac_res=$ac_cv_search_gethostent -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 $as_echo_n "checking for library containing setsockopt... " >&6; } -if test "${ac_cv_search_setsockopt+set}" = set; then +if test "${ac_cv_search_setsockopt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -18792,69 +12913,38 @@ for ac_lib in '' socket net network; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_setsockopt=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_setsockopt+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_setsockopt+set}" = set; then : break fi done -if test "${ac_cv_search_setsockopt+set}" = set; then - : +if test "${ac_cv_search_setsockopt+set}" = set; then : + else ac_cv_search_setsockopt=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5 $as_echo "$ac_cv_search_setsockopt" >&6; } ac_res=$ac_cv_search_setsockopt -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking for library containing connect" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing connect" >&5 $as_echo_n "checking for library containing connect... " >&6; } -if test "${ac_cv_search_connect+set}" = set; then +if test "${ac_cv_search_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -18879,63 +12969,36 @@ for ac_lib in '' inet; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_connect=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_connect+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_connect+set}" = set; then : break fi done -if test "${ac_cv_search_connect+set}" = set; then - : +if test "${ac_cv_search_connect+set}" = set; then : + else ac_cv_search_connect=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_connect" >&5 $as_echo "$ac_cv_search_connect" >&6; } ac_res=$ac_cv_search_connect -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking for type of socket length (socklen_t)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of socket length (socklen_t)" >&5 $as_echo_n "checking for type of socket length (socklen_t)... " >&6; } cat > conftest.$ac_ext < @@ -18946,10 +13009,10 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL) ; return 0; } EOF -if { (eval echo configure:18949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:13012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* - { $as_echo "$as_me:$LINENO: result: socklen_t *" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: socklen_t *" >&5 $as_echo "socklen_t *" >&6; } XML_SOCKLEN_T=socklen_t else @@ -18958,7 +13021,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -18969,10 +13032,10 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL) ; return 0; } EOF -if { (eval echo configure:18972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:13035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* - { $as_echo "$as_me:$LINENO: result: size_t *" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t *" >&5 $as_echo "size_t *" >&6; } XML_SOCKLEN_T=size_t else @@ -18981,7 +13044,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -18992,10 +13055,10 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (int *)NULL) ; return 0; } EOF -if { (eval echo configure:18995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:13058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* - { $as_echo "$as_me:$LINENO: result: int *" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: int *" >&5 $as_echo "int *" >&6; } XML_SOCKLEN_T=int else @@ -19003,7 +13066,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* - { $as_echo "$as_me:$LINENO: WARNING: could not determine" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine" >&5 $as_echo "$as_me: WARNING: could not determine" >&2;} XML_SOCKLEN_T="int" fi @@ -19019,10 +13082,10 @@ _ACEOF -{ $as_echo "$as_me:$LINENO: checking whether to enable IPv6" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IPv6" >&5 $as_echo_n "checking whether to enable IPv6... " >&6; } # Check whether --enable-ipv6 was given. -if test "${enable_ipv6+set}" = set; then +if test "${enable_ipv6+set}" = set; then : enableval=$enable_ipv6; else enable_ipv6=yes @@ -19034,11 +13097,7 @@ then fi if test $enable_ipv6 = yes; then have_ipv6=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19055,52 +13114,25 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : have_ipv6=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_ipv6=no + have_ipv6=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $have_ipv6" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipv6" >&5 $as_echo "$have_ipv6" >&6; } if test $have_ipv6 = yes; then -cat >>confdefs.h <<\_ACEOF -#define SUPPORT_IP6 /**/ -_ACEOF +$as_echo "#define SUPPORT_IP6 /**/" >>confdefs.h have_broken_ss_family=no - { $as_echo "$as_me:$LINENO: checking struct sockaddr::ss_family" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr::ss_family" >&5 $as_echo_n "checking struct sockaddr::ss_family... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19117,44 +13149,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : have_ss_family=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_ss_family=no + have_ss_family=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $have_ss_family" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ss_family" >&5 $as_echo "$have_ss_family" >&6; } if test x$have_ss_family = xno ; then - { $as_echo "$as_me:$LINENO: checking broken struct sockaddr::ss_family" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking broken struct sockaddr::ss_family" >&5 $as_echo_n "checking broken struct sockaddr::ss_family... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19171,158 +13178,45 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : have_broken_ss_family=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_broken_ss_family=no + have_broken_ss_family=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $have_broken_ss_family" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_broken_ss_family" >&5 $as_echo "$have_broken_ss_family" >&6; } if test x$have_broken_ss_family = xyes ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_BROKEN_SS_FAMILY /**/ -_ACEOF +$as_echo "#define HAVE_BROKEN_SS_FAMILY /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define ss_family __ss_family -_ACEOF +$as_echo "#define ss_family __ss_family" >>confdefs.h else - { $as_echo "$as_me:$LINENO: WARNING: ss_family and __ss_family not found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ss_family and __ss_family not found" >&5 $as_echo "$as_me: WARNING: ss_family and __ss_family not found" >&2;} fi fi have_getaddrinfo=no - { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -$as_echo_n "checking for getaddrinfo... " >&6; } -if test "${ac_cv_func_getaddrinfo+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. - For example, HP-UX 11i declares gettimeofday. */ -#define getaddrinfo innocuous_getaddrinfo - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getaddrinfo (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getaddrinfo - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getaddrinfo (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo -choke me -#endif - -int -main () -{ -return getaddrinfo (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_getaddrinfo=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getaddrinfo=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -$as_echo "$ac_cv_func_getaddrinfo" >&6; } -if test "x$ac_cv_func_getaddrinfo" = x""yes; then + ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = x""yes; then : have_getaddrinfo=yes fi if test $have_getaddrinfo != yes; then for lib in bsd socket inet; do as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_getaddrinfo" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for getaddrinfo in -l$lib" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -l$lib" >&5 $as_echo_n "checking for getaddrinfo in -l$lib... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Lib+set}\"" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lib $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -19340,47 +13234,19 @@ return getaddrinfo (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + eval "$as_ac_Lib=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break fi @@ -19389,119 +13255,27 @@ fi if test $have_getaddrinfo = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETADDRINFO /**/ -_ACEOF +$as_echo "#define HAVE_GETADDRINFO /**/" >>confdefs.h fi fi fi -{ $as_echo "$as_me:$LINENO: checking for isnan" >&5 -$as_echo_n "checking for isnan... " >&6; } -if test "${ac_cv_func_isnan+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define isnan to an innocuous variant, in case declares isnan. - For example, HP-UX 11i declares gettimeofday. */ -#define isnan innocuous_isnan +ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan" +if test "x$ac_cv_func_isnan" = x""yes; then : -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char isnan (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef isnan - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char isnan (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_isnan || defined __stub___isnan -choke me -#endif - -int -main () -{ -return isnan (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_isnan=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_isnan=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isnan" >&5 -$as_echo "$ac_cv_func_isnan" >&6; } -if test "x$ac_cv_func_isnan" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISNAN /**/ -_ACEOF +$as_echo "#define HAVE_ISNAN /**/" >>confdefs.h else - { $as_echo "$as_me:$LINENO: checking for isnan in -lm" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan in -lm" >&5 $as_echo_n "checking for isnan in -lm... " >&6; } -if test "${ac_cv_lib_m_isnan+set}" = set; then +if test "${ac_cv_lib_m_isnan+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -19519,157 +13293,40 @@ return isnan (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_isnan=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_isnan=no + ac_cv_lib_m_isnan=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_isnan" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_isnan" >&5 $as_echo "$ac_cv_lib_m_isnan" >&6; } -if test "x$ac_cv_lib_m_isnan" = x""yes; then +if test "x$ac_cv_lib_m_isnan" = x""yes; then : -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISNAN /**/ -_ACEOF +$as_echo "#define HAVE_ISNAN /**/" >>confdefs.h fi fi -{ $as_echo "$as_me:$LINENO: checking for isinf" >&5 -$as_echo_n "checking for isinf... " >&6; } -if test "${ac_cv_func_isinf+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define isinf to an innocuous variant, in case declares isinf. - For example, HP-UX 11i declares gettimeofday. */ -#define isinf innocuous_isinf +ac_fn_c_check_func "$LINENO" "isinf" "ac_cv_func_isinf" +if test "x$ac_cv_func_isinf" = x""yes; then : -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char isinf (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef isinf - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char isinf (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_isinf || defined __stub___isinf -choke me -#endif - -int -main () -{ -return isinf (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_isinf=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_isinf=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5 -$as_echo "$ac_cv_func_isinf" >&6; } -if test "x$ac_cv_func_isinf" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISINF /**/ -_ACEOF +$as_echo "#define HAVE_ISINF /**/" >>confdefs.h else - { $as_echo "$as_me:$LINENO: checking for isinf in -lm" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf in -lm" >&5 $as_echo_n "checking for isinf in -lm... " >&6; } -if test "${ac_cv_lib_m_isinf+set}" = set; then +if test "${ac_cv_lib_m_isinf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -19687,47 +13344,20 @@ return isinf (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_isinf=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_isinf=no + ac_cv_lib_m_isinf=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_isinf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_isinf" >&5 $as_echo "$ac_cv_lib_m_isinf" >&6; } -if test "x$ac_cv_lib_m_isinf" = x""yes; then +if test "x$ac_cv_lib_m_isinf" = x""yes; then : -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISINF /**/ -_ACEOF +$as_echo "#define HAVE_ISINF /**/" >>confdefs.h fi @@ -19805,21 +13435,26 @@ if test "$with_python" != "no" ; then echo Found python in $with_python/bin/python PYTHON="$with_python/bin/python" else - if test -x "$with_python" - then - echo Found python in $with_python - PYTHON="$with_python" - else - if test -x "$PYTHON" - then - echo Found python in environment PYTHON=$PYTHON - with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` - else - # Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args. + if test -x "$with_python/python.exe" + then + echo Found python in $with_python/python.exe + PYTHON="$with_python/python.exe" + else + if test -x "$with_python" + then + echo Found python in $with_python + PYTHON="$with_python" + else + if test -x "$PYTHON" + then + echo Found python in environment PYTHON=$PYTHON + with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` + else + # Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args. set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then +if test "${ac_cv_path_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -19832,14 +13467,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -19847,14 +13482,15 @@ esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then - { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + fi fi fi fi @@ -19881,7 +13517,14 @@ fi PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else - echo could not find python$PYTHON_VERSION/Python.h + if test -r $with_python/include/Python.h -a \ + -d $with_python/lib/site-packages + then + PYTHON_INCLUDES=$with_python/include + PYTHON_SITE_PACKAGES=$with_python/lib/site-packages + else + echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h + fi fi fi if test ! -d "$PYTHON_SITE_PACKAGES" @@ -19925,18 +13568,14 @@ if test "$with_modules" != "no" ; then case "$host" in *-*-cygwin*) MODULE_EXTENSION=".dll" - { $as_echo "$as_me:$LINENO: checking for dlopen in -lcygwin" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lcygwin" >&5 $as_echo_n "checking for dlopen in -lcygwin... " >&6; } -if test "${ac_cv_lib_cygwin_dlopen+set}" = set; then +if test "${ac_cv_lib_cygwin_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcygwin $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -19954,50 +13593,23 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cygwin_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_cygwin_dlopen=no + ac_cv_lib_cygwin_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cygwin_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cygwin_dlopen" >&5 $as_echo "$ac_cv_lib_cygwin_dlopen" >&6; } -if test "x$ac_cv_lib_cygwin_dlopen" = x""yes; then +if test "x$ac_cv_lib_cygwin_dlopen" = x""yes; then : WITH_MODULES=1 MODULE_PLATFORM_LIBS= -cat >>confdefs.h <<\_ACEOF -#define HAVE_DLOPEN /**/ -_ACEOF +$as_echo "#define HAVE_DLOPEN /**/" >>confdefs.h fi @@ -20008,107 +13620,19 @@ fi WITH_MODULES=1 ;; *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : libxml_have_shl_load=yes else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20126,149 +13650,36 @@ return shl_load (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : MODULE_PLATFORM_LIBS="-ldld" libxml_have_shl_load=yes else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : libxml_have_dlopen=yes else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20286,43 +13697,18 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : MODULE_PLATFORM_LIBS="-ldl" libxml_have_dlopen=yes @@ -20339,9 +13725,7 @@ fi MODULE_EXTENSION=".sl" WITH_MODULES=1 -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHLLOAD /**/ -_ACEOF +$as_echo "#define HAVE_SHLLOAD /**/" >>confdefs.h fi @@ -20357,9 +13741,7 @@ _ACEOF WITH_MODULES=1 -cat >>confdefs.h <<\_ACEOF -#define HAVE_DLOPEN /**/ -_ACEOF +$as_echo "#define HAVE_DLOPEN /**/" >>confdefs.h fi ;; @@ -20431,146 +13813,16 @@ if test "$with_threads" = "no" ; then else echo Enabling multithreaded support if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then - if test "${ac_cv_header_pthread_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 -$as_echo_n "checking for pthread.h... " >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -$as_echo "$ac_cv_header_pthread_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5 -$as_echo_n "checking pthread.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5 -$as_echo_n "checking pthread.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 -$as_echo_n "checking for pthread.h... " >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_pthread_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -$as_echo "$ac_cv_header_pthread_h" >&6; } - -fi -if test "x$ac_cv_header_pthread_h" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for pthread_join in -lpthread" >&5 + ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 $as_echo_n "checking for pthread_join in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_join+set}" = set; then +if test "${ac_cv_lib_pthread_pthread_join+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20588,54 +13840,25 @@ return pthread_join (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_join=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_join=no + ac_cv_lib_pthread_pthread_join=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_join" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_join" >&5 $as_echo "$ac_cv_lib_pthread_pthread_join" >&6; } -if test "x$ac_cv_lib_pthread_pthread_join" = x""yes; then +if test "x$ac_cv_lib_pthread_pthread_join" = x""yes; then : THREAD_LIBS="-lpthread" -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBPTHREAD /**/ -_ACEOF +$as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD_H /**/ -_ACEOF +$as_echo "#define HAVE_PTHREAD_H /**/" >>confdefs.h WITH_THREADS="1" fi @@ -20700,18 +13923,14 @@ if test "$with_history" = "yes" ; then unset tcap for termlib in ncurses curses termcap terminfo termlib; do as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tputs" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for tputs in -l${termlib}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -l${termlib}" >&5 $as_echo_n "checking for tputs in -l${termlib}... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Lib+set}\"" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${termlib} $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20729,193 +13948,35 @@ return tputs (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + eval "$as_ac_Lib=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : tcap="-l$termlib" fi test -n "$tcap" && break done - if test "${ac_cv_header_readline_history_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for readline/history.h" >&5 -$as_echo_n "checking for readline/history.h... " >&6; } -if test "${ac_cv_header_readline_history_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 -$as_echo "$ac_cv_header_readline_history_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking readline/history.h usability" >&5 -$as_echo_n "checking readline/history.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking readline/history.h presence" >&5 -$as_echo_n "checking readline/history.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: readline/history.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: readline/history.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: readline/history.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: readline/history.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: readline/history.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: readline/history.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: readline/history.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/history.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: readline/history.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for readline/history.h" >&5 -$as_echo_n "checking for readline/history.h... " >&6; } -if test "${ac_cv_header_readline_history_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_readline_history_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_history_h" >&5 -$as_echo "$ac_cv_header_readline_history_h" >&6; } - -fi -if test "x$ac_cv_header_readline_history_h" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for append_history in -lhistory" >&5 + ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" +if test "x$ac_cv_header_readline_history_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lhistory" >&5 $as_echo_n "checking for append_history in -lhistory... " >&6; } -if test "${ac_cv_lib_history_append_history+set}" = set; then +if test "${ac_cv_lib_history_append_history+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhistory $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20933,195 +13994,38 @@ return append_history (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_history_append_history=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_history_append_history=no + ac_cv_lib_history_append_history=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_history_append_history" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_history_append_history" >&5 $as_echo "$ac_cv_lib_history_append_history" >&6; } -if test "x$ac_cv_lib_history_append_history" = x""yes; then +if test "x$ac_cv_lib_history_append_history" = x""yes; then : RDL_LIBS="-lhistory" -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBHISTORY /**/ -_ACEOF +$as_echo "#define HAVE_LIBHISTORY /**/" >>confdefs.h fi fi - if test "${ac_cv_header_readline_readline_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for readline/readline.h" >&5 -$as_echo_n "checking for readline/readline.h... " >&6; } -if test "${ac_cv_header_readline_readline_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 -$as_echo "$ac_cv_header_readline_readline_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking readline/readline.h usability" >&5 -$as_echo_n "checking readline/readline.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking readline/readline.h presence" >&5 -$as_echo_n "checking readline/readline.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: readline/readline.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for readline/readline.h" >&5 -$as_echo_n "checking for readline/readline.h... " >&6; } -if test "${ac_cv_header_readline_readline_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_readline_readline_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_readline_readline_h" >&5 -$as_echo "$ac_cv_header_readline_readline_h" >&6; } - -fi -if test "x$ac_cv_header_readline_readline_h" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 + ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" +if test "x$ac_cv_header_readline_readline_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then +if test "${ac_cv_lib_readline_readline+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $tcap $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -21139,49 +14043,22 @@ return readline (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_readline_readline=no + ac_cv_lib_readline_readline=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = x""yes; then +if test "x$ac_cv_lib_readline_readline" = x""yes; then : RDL_LIBS="-lreadline $RDL_LIBS $tcap" -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBREADLINE /**/ -_ACEOF +$as_echo "#define HAVE_LIBREADLINE /**/" >>confdefs.h fi @@ -21447,141 +14324,11 @@ else ICONV_LIBS="-L$with_iconv/lib" fi - if test "${ac_cv_header_iconv_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for iconv.h" >&5 -$as_echo_n "checking for iconv.h... " >&6; } -if test "${ac_cv_header_iconv_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 -$as_echo "$ac_cv_header_iconv_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking iconv.h usability" >&5 -$as_echo_n "checking iconv.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking iconv.h presence" >&5 -$as_echo_n "checking iconv.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for iconv.h" >&5 -$as_echo_n "checking for iconv.h... " >&6; } -if test "${ac_cv_header_iconv_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_iconv_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 -$as_echo "$ac_cv_header_iconv_h" >&6; } - -fi -if test "x$ac_cv_header_iconv_h" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for iconv" >&5 + ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" +if test "x$ac_cv_header_iconv_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -21595,39 +14342,16 @@ iconv (cd, NULL, NULL, NULL, NULL); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_ICONV=1 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5 $as_echo_n "checking for iconv in -liconv... " >&6; } _ldflags="${LDFLAGS}" @@ -21635,11 +14359,7 @@ $as_echo_n "checking for iconv in -liconv... " >&6; } LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" LIBS="${LIBS} -liconv" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -21653,69 +14373,38 @@ iconv (cd, NULL, NULL, NULL, NULL); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_ICONV=1 ICONV_LIBS="${ICONV_LIBS} -liconv" LIBS="${_libs}" LDFLAGS="${_ldflags}" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LIBS="${_libs}" LDFLAGS="${_ldflags}" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test "$WITH_ICONV" = "1" ; then - { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } - if test "${xml_cv_iconv_arg2+set}" = set; then + if test "${xml_cv_iconv_arg2+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -21737,38 +14426,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : xml_cv_iconv_arg2="" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xml_cv_iconv_arg2="const" + xml_cv_iconv_arg2="const" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" - { $as_echo "$as_me:$LINENO: result: ${xml_xxx:- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${xml_xxx:- }$xml_cv_iconv_decl" >&5 $as_echo "${xml_xxx:- }$xml_cv_iconv_decl" >&6; } @@ -21793,6 +14461,23 @@ XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" XML_LIBTOOLLIBS="libxml2.la" +WITH_ICU=0 +if test "$with_icu" != "yes" ; then + echo Disabling ICU support +else + ICU_CONFIG=icu-config + if ${ICU_CONFIG} --cflags >/dev/null 2>&1 + then + ICU_LIBS=`icu-config --ldflags` + LDFLAGS="$LDFLAGS $ICU_LIBS" + WITH_ICU=1 + echo Enabling ICU support + else + as_fn_error $? "libicu config program icu-config not found" "$LINENO" 5 + fi +fi + + WITH_ISO8859X=1 if test "$WITH_ICONV" != "1" ; then if test "$with_iso8859x" = "no" ; then @@ -21882,26 +14567,25 @@ WIN32_EXTRA_LIBADD= WIN32_EXTRA_LDFLAGS= CYGWIN_EXTRA_LDFLAGS= CYGWIN_EXTRA_PYTHON_LIBADD= +WIN32_EXTRA_PYTHON_LIBADD= case "$host" in *-*-mingw*) CPPFLAGS="$CPPFLAGS -DWIN32" WIN32_EXTRA_LIBADD="-lws2_32" WIN32_EXTRA_LDFLAGS="-no-undefined" -cat >>confdefs.h <<\_ACEOF -#define _WINSOCKAPI_ 1 -_ACEOF +$as_echo "#define _WINSOCKAPI_ 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define snprintf _snprintf -_ACEOF +$as_echo "#define snprintf _snprintf" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define vsnprintf _vsnprintf -_ACEOF +$as_echo "#define vsnprintf _vsnprintf" >>confdefs.h + if test "${PYTHON}" != "" + then + WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython${PYTHON_VERSION//./}" + fi ;; *-*-cygwin*) CYGWIN_EXTRA_LDFLAGS="-no-undefined" @@ -21916,6 +14600,7 @@ esac + if test "$with_coverage" = "yes" -a "${GCC}" = "yes" then echo Enabling code coverage for GCC @@ -21983,13 +14668,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -21997,8 +14682,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -22021,11 +14706,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -22045,8 +14730,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -22062,55 +14747,38 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_VERSION_SCRIPT_TRUE}" && test -z "${USE_VERSION_SCRIPT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"USE_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"USE_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"USE_VERSION_SCRIPT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${REBUILD_DOCS_TRUE}" && test -z "${REBUILD_DOCS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"REBUILD_DOCS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"REBUILD_DOCS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"REBUILD_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_PYTHON_TRUE}" && test -z "${WITH_PYTHON_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"WITH_PYTHON\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"WITH_PYTHON\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"WITH_PYTHON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_TRIO_SOURCES_TRUE}" && test -z "${WITH_TRIO_SOURCES_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"WITH_TRIO_SOURCES\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"WITH_TRIO_SOURCES\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"WITH_TRIO_SOURCES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -22120,17 +14788,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -22138,23 +14807,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -22162,7 +14823,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -22173,7 +14840,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -22196,13 +14863,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -22212,15 +14872,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -22232,12 +14892,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -22249,7 +14913,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -22263,8 +15009,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -22284,76 +15034,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -22382,8 +15081,56 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -22402,10 +15149,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -22420,13 +15167,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -22458,13 +15211,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -22483,16 +15238,17 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.66, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -22528,6 +15284,8 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -22535,20 +15293,19 @@ do case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -22556,11 +15313,10 @@ Try \`$0 --help' for more information." >&2 ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -22611,133 +15367,148 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. -for var in SED \ +for var in AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ +ECHO \ +SED \ GREP \ EGREP \ FGREP \ @@ -22760,8 +15531,6 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ @@ -22791,12 +15560,13 @@ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -22823,9 +15593,9 @@ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -22833,12 +15603,6 @@ sys_lib_dlsearch_path_spec; do esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -22887,9 +15651,7 @@ do "libxml-2.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES libxml-2.0-uninstalled.pc" ;; "python/setup.py") CONFIG_FILES="$CONFIG_FILES python/setup.py" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -22916,7 +15678,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -22927,11 +15689,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -22939,8 +15697,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' -' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -22957,24 +15720,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -22996,7 +15753,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -23010,7 +15767,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -23063,22 +15820,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -23106,9 +15869,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -23193,9 +15954,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -23208,9 +15967,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -23238,12 +15995,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -23254,7 +16009,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -23267,9 +16022,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -23297,47 +16050,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -23394,7 +16107,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -23404,12 +16116,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -23419,7 +16130,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -23448,26 +16159,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -23478,25 +16185,19 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -23534,7 +16235,7 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -23629,47 +16330,7 @@ $as_echo X"$file" | q } s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done @@ -23697,7 +16358,8 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -23730,13 +16392,13 @@ available_tags="" # ### BEGIN LIBTOOL CONFIG # Assembler program. -AS=$AS +AS=$lt_AS # DLL creation program. -DLLTOOL=$DLLTOOL +DLLTOOL=$lt_DLLTOOL # Object dumper program. -OBJDUMP=$OBJDUMP +OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version @@ -23754,6 +16416,12 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -23803,10 +16471,6 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -23825,6 +16489,9 @@ RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -23846,12 +16513,6 @@ global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name # The name of the directory that contains temporary libtool files. objdir=$objdir -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -23914,6 +16575,9 @@ library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -23953,6 +16617,10 @@ striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -24212,7 +16880,7 @@ _LT_EOF func_dirname () { # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else @@ -24223,7 +16891,7 @@ func_dirname () # func_basename file func_basename () { - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` + func_basename_result=`$ECHO "${1}" | $SED "$basename"` } @@ -24236,10 +16904,8 @@ func_basename () func_stripname () { case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } @@ -24250,20 +16916,20 @@ my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` + func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_xform libobj-or-source func_xform () { - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... @@ -24322,15 +16988,12 @@ _LT_EOF done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -24351,10 +17014,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/lib/3rdparty/libxml2/configure.in b/lib/3rdparty/libxml2/configure.in index 17c11cde682..59d0629e658 100644 --- a/lib/3rdparty/libxml2/configure.in +++ b/lib/3rdparty/libxml2/configure.in @@ -1,4 +1,5 @@ dnl Process this file with autoconf to produce a configure script. +AC_PREREQ(2.59) AC_INIT(entities.c) AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) @@ -6,7 +7,7 @@ AC_CANONICAL_HOST LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=7 -LIBXML_MICRO_VERSION=7 +LIBXML_MICRO_VERSION=8 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -52,6 +53,7 @@ AM_INIT_AUTOMAKE(libxml2, $VERSION) dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL +AC_PROG_MKDIR_P AC_PROG_CPP AC_PATH_PROG(RM, rm, /bin/rm) AC_PATH_PROG(MV, mv, /bin/mv) @@ -82,7 +84,7 @@ else esac fi AC_SUBST(VERSION_SCRIPT_FLAGS) -AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"]) +AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -z "$VERSION_SCRIPT_FLAGS"]) dnl dnl We process the AC_ARG_WITH first so that later we can modify @@ -126,6 +128,8 @@ AC_ARG_WITH(http, [ --with-http add the HTTP support (on)]) AC_ARG_WITH(iconv, [ --with-iconv[[=DIR]] add ICONV support (on)]) +AC_ARG_WITH(icu, +[ --with-icu add ICU support (off)]) AC_ARG_WITH(iso8859x, [ --with-iso8859x add ISO8859X support if no iconv (on)]) AC_ARG_WITH(legacy, @@ -702,17 +706,23 @@ if test "$with_python" != "no" ; then echo Found python in $with_python/bin/python PYTHON="$with_python/bin/python" else - if test -x "$with_python" - then - echo Found python in $with_python - PYTHON="$with_python" - else - if test -x "$PYTHON" - then - echo Found python in environment PYTHON=$PYTHON - with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` - else - AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) + if test -x "$with_python/python.exe" + then + echo Found python in $with_python/python.exe + PYTHON="$with_python/python.exe" + else + if test -x "$with_python" + then + echo Found python in $with_python + PYTHON="$with_python" + else + if test -x "$PYTHON" + then + echo Found python in environment PYTHON=$PYTHON + with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` + else + AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) + fi fi fi fi @@ -739,7 +749,14 @@ if test "$with_python" != "no" ; then PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else - echo could not find python$PYTHON_VERSION/Python.h + if test -r $with_python/include/Python.h -a \ + -d $with_python/lib/site-packages + then + PYTHON_INCLUDES=$with_python/include + PYTHON_SITE_PACKAGES=$with_python/lib/site-packages + else + echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h + fi fi fi if test ! -d "$PYTHON_SITE_PACKAGES" @@ -1306,6 +1323,23 @@ XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS" XML_LIBTOOLLIBS="libxml2.la" AC_SUBST(WITH_ICONV) +WITH_ICU=0 +if test "$with_icu" != "yes" ; then + echo Disabling ICU support +else + ICU_CONFIG=icu-config + if ${ICU_CONFIG} --cflags >/dev/null 2>&1 + then + ICU_LIBS=`icu-config --ldflags` + LDFLAGS="$LDFLAGS $ICU_LIBS" + WITH_ICU=1 + echo Enabling ICU support + else + AC_MSG_ERROR([libicu config program icu-config not found]) + fi +fi +AC_SUBST(WITH_ICU) + WITH_ISO8859X=1 if test "$WITH_ICONV" != "1" ; then if test "$with_iso8859x" = "no" ; then @@ -1395,6 +1429,7 @@ WIN32_EXTRA_LIBADD= WIN32_EXTRA_LDFLAGS= CYGWIN_EXTRA_LDFLAGS= CYGWIN_EXTRA_PYTHON_LIBADD= +WIN32_EXTRA_PYTHON_LIBADD= case "$host" in *-*-mingw*) CPPFLAGS="$CPPFLAGS -DWIN32" @@ -1403,6 +1438,10 @@ case "$host" in AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation]) AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around]) AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around]) + if test "${PYTHON}" != "" + then + WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython${PYTHON_VERSION//./}" + fi ;; *-*-cygwin*) CYGWIN_EXTRA_LDFLAGS="-no-undefined" @@ -1414,6 +1453,7 @@ case "$host" in esac AC_SUBST(WIN32_EXTRA_LIBADD) AC_SUBST(WIN32_EXTRA_LDFLAGS) +AC_SUBST(WIN32_EXTRA_PYTHON_LIBADD) AC_SUBST(CYGWIN_EXTRA_LDFLAGS) AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD) diff --git a/lib/3rdparty/libxml2/debugXML.c b/lib/3rdparty/libxml2/debugXML.c index 415889a657e..c26217a3f31 100644 --- a/lib/3rdparty/libxml2/debugXML.c +++ b/lib/3rdparty/libxml2/debugXML.c @@ -2941,7 +2941,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, xmlGenericError(xmlGenericErrorContext, "Write command requires a filename argument\n"); else - xmlShellWrite(ctxt, arg, NULL, NULL); + xmlShellWrite(ctxt, arg, ctxt->node, NULL); #endif /* LIBXML_OUTPUT_ENABLED */ } else if (!strcmp(command, "grep")) { xmlShellGrep(ctxt, arg, ctxt->node, NULL); diff --git a/lib/3rdparty/libxml2/encoding.c b/lib/3rdparty/libxml2/encoding.c index b86a547e403..d1140bf2dcc 100644 --- a/lib/3rdparty/libxml2/encoding.c +++ b/lib/3rdparty/libxml2/encoding.c @@ -1,7 +1,7 @@ /* * encoding.c : implements the encoding conversion functions needed for XML * - * Related specs: + * Related specs: * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies * rfc2781 UTF-16, an encoding of ISO 10646, P. Hoffman, F. Yergeau * [ISO-10646] UTF-8 and UTF-16 in Annexes @@ -58,7 +58,7 @@ static xmlCharEncodingAliasPtr xmlCharEncodingAliases = NULL; static int xmlCharEncodingAliasesNb = 0; static int xmlCharEncodingAliasesMax = 0; -#ifdef LIBXML_ICONV_ENABLED +#if defined(LIBXML_ICONV_ENABLED) || defined(LIBXML_ICU_ENABLED) #if 0 #define DEBUG_ENCODING /* Define this to get encoding traces */ #endif @@ -97,6 +97,54 @@ xmlEncodingErr(xmlParserErrors error, const char *msg, const char *val) NULL, 0, val, NULL, NULL, 0, 0, msg, val); } +#ifdef LIBXML_ICU_ENABLED +static uconv_t* +openIcuConverter(const char* name, int toUnicode) +{ + UErrorCode status = U_ZERO_ERROR; + uconv_t *conv = (uconv_t *) xmlMalloc(sizeof(uconv_t)); + if (conv == NULL) + return NULL; + + conv->uconv = ucnv_open(name, &status); + if (U_FAILURE(status)) + goto error; + + status = U_ZERO_ERROR; + if (toUnicode) { + ucnv_setToUCallBack(conv->uconv, UCNV_TO_U_CALLBACK_STOP, + NULL, NULL, NULL, &status); + } + else { + ucnv_setFromUCallBack(conv->uconv, UCNV_FROM_U_CALLBACK_STOP, + NULL, NULL, NULL, &status); + } + if (U_FAILURE(status)) + goto error; + + status = U_ZERO_ERROR; + conv->utf8 = ucnv_open("UTF-8", &status); + if (U_SUCCESS(status)) + return conv; + +error: + if (conv->uconv) + ucnv_close(conv->uconv); + xmlFree(conv); + return NULL; +} + +static void +closeIcuConverter(uconv_t *conv) +{ + if (conv != NULL) { + ucnv_close(conv->uconv); + ucnv_close(conv->utf8); + xmlFree(conv); + } +} +#endif /* LIBXML_ICU_ENABLED */ + /************************************************************************ * * * Conversions To/From UTF8 encoding * @@ -135,12 +183,12 @@ asciiToUTF8(unsigned char* out, int *outlen, break; if (c < 0x80) { *out++ = c; - } else { + } else { *outlen = out - outstart; *inlen = processed - base; return(-1); } - + processed = (const unsigned char*) in; } *outlen = out - outstart; @@ -206,7 +254,7 @@ UTF8Toascii(unsigned char* out, int *outlen, if (inend - in < trailing) { break; - } + } for ( ; trailing; trailing--) { if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) @@ -263,19 +311,19 @@ isolat1ToUTF8(unsigned char* out, int *outlen, outend = out + *outlen; inend = in + (*inlen); instop = inend; - - while (in < inend && out < outend - 1) { - if (*in >= 0x80) { + + while ((in < inend) && (out < outend - 1)) { + if (*in >= 0x80) { *out++ = (((*in) >> 6) & 0x1F) | 0xC0; - *out++ = ((*in) & 0x3F) | 0x80; + *out++ = ((*in) & 0x3F) | 0x80; ++in; } - if (instop - in > outend - out) instop = in + (outend - out); - while (in < instop && *in < 0x80) { + if ((instop - in) > (outend - out)) instop = in + (outend - out); + while ((in < instop) && (*in < 0x80)) { *out++ = *in++; } - } - if (in < inend && out < outend && *in < 0x80) { + } + if ((in < inend) && (out < outend) && (*in < 0x80)) { *out++ = *in++; } *outlen = out - outstart; @@ -379,7 +427,7 @@ UTF8Toisolat1(unsigned char* out, int *outlen, if (inend - in < trailing) { break; - } + } for ( ; trailing; trailing--) { if (in >= inend) @@ -487,7 +535,7 @@ UTF16LEToUTF8(unsigned char* out, int *outlen, else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; } else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; } - + for ( ; bits >= 0; bits-= 6) { if (out >= outend) break; @@ -512,7 +560,7 @@ UTF16LEToUTF8(unsigned char* out, int *outlen, * block of chars out. * * Returns the number of bytes written, or -1 if lack of space, or -2 - * if the transcoding failed. + * if the transcoding failed. */ static int UTF8ToUTF16LE(unsigned char* outb, int *outlen, @@ -558,7 +606,7 @@ UTF8ToUTF16LE(unsigned char* outb, int *outlen, if (inend - in < trailing) { break; - } + } for ( ; trailing; trailing--) { if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) @@ -621,7 +669,7 @@ UTF8ToUTF16LE(unsigned char* outb, int *outlen, * block of chars out. * * Returns the number of bytes written, or -1 if lack of space, or -2 - * if the transcoding failed. + * if the transcoding failed. */ static int UTF8ToUTF16(unsigned char* outb, int *outlen, @@ -693,7 +741,7 @@ UTF16BEToUTF8(unsigned char* out, int *outlen, in++; } else { c= *in++; - } + } if ((c & 0xFC00) == 0xD800) { /* surrogates */ if (in >= inend) { /* (in > inend) shouldn't happens */ *outlen = out - outstart; @@ -723,15 +771,15 @@ UTF16BEToUTF8(unsigned char* out, int *outlen, } /* assertion: c is a single UTF-4 value */ - if (out >= outend) + if (out >= outend) break; if (c < 0x80) { *out++= c; bits= -6; } else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; } else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; } else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; } - + for ( ; bits >= 0; bits-= 6) { - if (out >= outend) + if (out >= outend) break; *out++= ((c >> bits) & 0x3F) | 0x80; } @@ -754,7 +802,7 @@ UTF16BEToUTF8(unsigned char* out, int *outlen, * block of chars out. * * Returns the number of byte written, or -1 by lack of space, or -2 - * if the transcoding failed. + * if the transcoding failed. */ static int UTF8ToUTF16BE(unsigned char* outb, int *outlen, @@ -800,7 +848,7 @@ UTF8ToUTF16BE(unsigned char* outb, int *outlen, if (inend - in < trailing) { break; - } + } for ( ; trailing; trailing--) { if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) break; @@ -864,13 +912,13 @@ UTF8ToUTF16BE(unsigned char* outb, int *outlen, * * Guess the encoding of the entity using the first bytes of the entity content * according to the non-normative appendix F of the XML-1.0 recommendation. - * + * * Returns one of the XML_CHAR_ENCODING_... values. */ xmlCharEncoding xmlDetectCharEncoding(const unsigned char* in, int len) { - if (in == NULL) + if (in == NULL) return(XML_CHAR_ENCODING_NONE); if (len >= 4) { if ((in[0] == 0x00) && (in[1] == 0x00) && @@ -951,7 +999,7 @@ xmlCleanupEncodingAliases(void) { * @alias: the alias name as parsed, in UTF-8 format (ASCII actually) * * Lookup an encoding name for the given alias. - * + * * Returns NULL if not found, otherwise the original name */ const char * @@ -989,7 +1037,7 @@ xmlGetEncodingAlias(const char *alias) { * * Registers an alias @alias for an encoding named @name. Existing alias * will be overwritten. - * + * * Returns 0 in case of success, -1 in case of error */ int @@ -1009,13 +1057,13 @@ xmlAddEncodingAlias(const char *name, const char *alias) { if (xmlCharEncodingAliases == NULL) { xmlCharEncodingAliasesNb = 0; xmlCharEncodingAliasesMax = 20; - xmlCharEncodingAliases = (xmlCharEncodingAliasPtr) + xmlCharEncodingAliases = (xmlCharEncodingAliasPtr) xmlMalloc(xmlCharEncodingAliasesMax * sizeof(xmlCharEncodingAlias)); if (xmlCharEncodingAliases == NULL) return(-1); } else if (xmlCharEncodingAliasesNb >= xmlCharEncodingAliasesMax) { xmlCharEncodingAliasesMax *= 2; - xmlCharEncodingAliases = (xmlCharEncodingAliasPtr) + xmlCharEncodingAliases = (xmlCharEncodingAliasPtr) xmlRealloc(xmlCharEncodingAliases, xmlCharEncodingAliasesMax * sizeof(xmlCharEncodingAlias)); } @@ -1046,7 +1094,7 @@ xmlAddEncodingAlias(const char *name, const char *alias) { * @alias: the alias name as parsed, in UTF-8 format (ASCII actually) * * Unregisters an encoding alias @alias - * + * * Returns 0 in case of success, -1 in case of error */ int @@ -1081,7 +1129,7 @@ xmlDelEncodingAlias(const char *alias) { * Compare the string to the encoding schemes already known. Note * that the comparison is case insensitive accordingly to the section * [XML] 4.3.3 Character Encoding in Entities. - * + * * Returns one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE * if not recognized. */ @@ -1118,7 +1166,7 @@ xmlParseCharEncoding(const char* name) */ if (!strcmp(upper, "UTF-16")) return(XML_CHAR_ENCODING_UTF16LE); if (!strcmp(upper, "UTF16")) return(XML_CHAR_ENCODING_UTF16LE); - + if (!strcmp(upper, "ISO-10646-UCS-2")) return(XML_CHAR_ENCODING_UCS2); if (!strcmp(upper, "UCS-2")) return(XML_CHAR_ENCODING_UCS2); if (!strcmp(upper, "UCS2")) return(XML_CHAR_ENCODING_UCS2); @@ -1131,7 +1179,7 @@ xmlParseCharEncoding(const char* name) if (!strcmp(upper, "UCS-4")) return(XML_CHAR_ENCODING_UCS4LE); if (!strcmp(upper, "UCS4")) return(XML_CHAR_ENCODING_UCS4LE); - + if (!strcmp(upper, "ISO-8859-1")) return(XML_CHAR_ENCODING_8859_1); if (!strcmp(upper, "ISO-LATIN-1")) return(XML_CHAR_ENCODING_8859_1); if (!strcmp(upper, "ISO LATIN 1")) return(XML_CHAR_ENCODING_8859_1); @@ -1254,7 +1302,7 @@ static xmlCharEncodingHandlerPtr xmlDefaultCharEncodingHandler = NULL; * Returns the xmlCharEncodingHandlerPtr created (or NULL in case of error). */ xmlCharEncodingHandlerPtr -xmlNewCharEncodingHandler(const char *name, +xmlNewCharEncodingHandler(const char *name, xmlCharEncodingInputFunc input, xmlCharEncodingOutputFunc output) { xmlCharEncodingHandlerPtr handler; @@ -1299,6 +1347,7 @@ xmlNewCharEncodingHandler(const char *name, xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n"); return(NULL); } + memset(handler, 0, sizeof(xmlCharEncodingHandler)); handler->input = input; handler->output = output; handler->name = up; @@ -1306,7 +1355,11 @@ xmlNewCharEncodingHandler(const char *name, #ifdef LIBXML_ICONV_ENABLED handler->iconv_in = NULL; handler->iconv_out = NULL; -#endif /* LIBXML_ICONV_ENABLED */ +#endif +#ifdef LIBXML_ICU_ENABLED + handler->uconv_in = NULL; + handler->uconv_out = NULL; +#endif /* * registers and returns the handler. @@ -1330,7 +1383,7 @@ xmlNewCharEncodingHandler(const char *name, void xmlInitCharEncodingHandlers(void) { unsigned short int tst = 0x1234; - unsigned char *ptr = (unsigned char *) &tst; + unsigned char *ptr = (unsigned char *) &tst; if (handlers != NULL) return; @@ -1350,9 +1403,9 @@ xmlInitCharEncodingHandlers(void) { } xmlNewCharEncodingHandler("UTF-8", UTF8ToUTF8, UTF8ToUTF8); #ifdef LIBXML_OUTPUT_ENABLED - xmlUTF16LEHandler = + xmlUTF16LEHandler = xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, UTF8ToUTF16LE); - xmlUTF16BEHandler = + xmlUTF16BEHandler = xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, UTF8ToUTF16BE); xmlNewCharEncodingHandler("UTF-16", UTF16LEToUTF8, UTF8ToUTF16); xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, UTF8Toisolat1); @@ -1362,16 +1415,16 @@ xmlInitCharEncodingHandlers(void) { xmlNewCharEncodingHandler("HTML", NULL, UTF8ToHtml); #endif #else - xmlUTF16LEHandler = + xmlUTF16LEHandler = xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, NULL); - xmlUTF16BEHandler = + xmlUTF16BEHandler = xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, NULL); xmlNewCharEncodingHandler("UTF-16", UTF16LEToUTF8, NULL); xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, NULL); xmlNewCharEncodingHandler("ASCII", asciiToUTF8, NULL); xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, NULL); #endif /* LIBXML_OUTPUT_ENABLED */ -#ifndef LIBXML_ICONV_ENABLED +#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED) #ifdef LIBXML_ISO8859X_ENABLED xmlRegisterCharEncodingHandlersISO8859x (); #endif @@ -1550,10 +1603,10 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) { handler = xmlFindCharEncodingHandler("EUC-JP"); if (handler != NULL) return(handler); break; - default: + default: break; } - + #ifdef DEBUG_ENCODING xmlGenericError(xmlGenericErrorContext, "No handler found for encoding %d\n", enc); @@ -1578,6 +1631,10 @@ xmlFindCharEncodingHandler(const char *name) { xmlCharEncodingHandlerPtr enc; iconv_t icv_in, icv_out; #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + xmlCharEncodingHandlerPtr encu; + uconv_t *ucv_in, *ucv_out; +#endif /* LIBXML_ICU_ENABLED */ char upper[100]; int i; @@ -1632,6 +1689,7 @@ xmlFindCharEncodingHandler(const char *name) { iconv_close(icv_out); return(NULL); } + memset(enc, 0, sizeof(xmlCharEncodingHandler)); enc->name = xmlMemStrdup(name); enc->input = NULL; enc->output = NULL; @@ -1647,6 +1705,36 @@ xmlFindCharEncodingHandler(const char *name) { "iconv : problems with filters for '%s'\n", name); } #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + /* check whether icu can handle this */ + ucv_in = openIcuConverter(name, 1); + ucv_out = openIcuConverter(name, 0); + if (ucv_in != NULL && ucv_out != NULL) { + encu = (xmlCharEncodingHandlerPtr) + xmlMalloc(sizeof(xmlCharEncodingHandler)); + if (encu == NULL) { + closeIcuConverter(ucv_in); + closeIcuConverter(ucv_out); + return(NULL); + } + memset(encu, 0, sizeof(xmlCharEncodingHandler)); + encu->name = xmlMemStrdup(name); + encu->input = NULL; + encu->output = NULL; + encu->uconv_in = ucv_in; + encu->uconv_out = ucv_out; +#ifdef DEBUG_ENCODING + xmlGenericError(xmlGenericErrorContext, + "Found ICU converter handler for encoding %s\n", name); +#endif + return encu; + } else if (ucv_in != NULL || ucv_out != NULL) { + closeIcuConverter(ucv_in); + closeIcuConverter(ucv_out); + xmlEncodingErr(XML_ERR_INTERNAL_ERROR, + "ICU converter : problems with filters for '%s'\n", name); + } +#endif /* LIBXML_ICU_ENABLED */ #ifdef DEBUG_ENCODING xmlGenericError(xmlGenericErrorContext, @@ -1684,12 +1772,12 @@ xmlFindCharEncodingHandler(const char *name) { * @in: a pointer to an array of ISO Latin 1 chars * @inlen: the length of @in * - * Returns 0 if success, or + * Returns 0 if success, or * -1 by lack of space, or * -2 if the transcoding fails (for *in is not valid utf8 string or * the result of transformation can't fit into the encoding we want), or * -3 if there the last byte can't form a single output char. - * + * * The value of @inlen after return is the number of octets consumed * as the return value is positive, else unpredictable. * The value of @outlen after return is the number of ocetes consumed. @@ -1735,6 +1823,75 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen, } #endif /* LIBXML_ICONV_ENABLED */ +/************************************************************************ + * * + * ICU based generic conversion functions * + * * + ************************************************************************/ + +#ifdef LIBXML_ICU_ENABLED +/** + * xmlUconvWrapper: + * @cd: ICU uconverter data structure + * @toUnicode : non-zero if toUnicode. 0 otherwise. + * @out: a pointer to an array of bytes to store the result + * @outlen: the length of @out + * @in: a pointer to an array of ISO Latin 1 chars + * @inlen: the length of @in + * + * Returns 0 if success, or + * -1 by lack of space, or + * -2 if the transcoding fails (for *in is not valid utf8 string or + * the result of transformation can't fit into the encoding we want), or + * -3 if there the last byte can't form a single output char. + * + * The value of @inlen after return is the number of octets consumed + * as the return value is positive, else unpredictable. + * The value of @outlen after return is the number of ocetes consumed. + */ +static int +xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen, + const unsigned char *in, int *inlen) { + const char *ucv_in = (const char *) in; + char *ucv_out = (char *) out; + UErrorCode err = U_ZERO_ERROR; + + if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL)) { + if (outlen != NULL) *outlen = 0; + return(-1); + } + + /* + * TODO(jungshik) + * 1. is ucnv_convert(To|From)Algorithmic better? + * 2. had we better use an explicit pivot buffer? + * 3. error returned comes from 'fromUnicode' only even + * when toUnicode is true ! + */ + if (toUnicode) { + /* encoding => UTF-16 => UTF-8 */ + ucnv_convertEx(cd->utf8, cd->uconv, &ucv_out, ucv_out + *outlen, + &ucv_in, ucv_in + *inlen, NULL, NULL, NULL, NULL, + 0, TRUE, &err); + } else { + /* UTF-8 => UTF-16 => encoding */ + ucnv_convertEx(cd->uconv, cd->utf8, &ucv_out, ucv_out + *outlen, + &ucv_in, ucv_in + *inlen, NULL, NULL, NULL, NULL, + 0, TRUE, &err); + } + *inlen = ucv_in - (const char*) in; + *outlen = ucv_out - (char *) out; + if (U_SUCCESS(err)) + return 0; + if (err == U_BUFFER_OVERFLOW_ERROR) + return -1; + if (err == U_INVALID_CHAR_FOUND || err == U_ILLEGAL_CHAR_FOUND) + return -2; + /* if (err == U_TRUNCATED_CHAR_FOUND) */ + return -3; +} +#endif /* LIBXML_ICU_ENABLED */ + /************************************************************************ * * * The real API used by libxml for on-the-fly conversion * @@ -1810,6 +1967,16 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out, if (ret == -1) ret = -3; } #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + else if (handler->uconv_in != NULL) { + ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use], + &written, in->content, &toconv); + xmlBufferShrink(in, toconv); + out->use += written; + out->content[out->use] = 0; + if (ret == -1) ret = -3; + } +#endif /* LIBXML_ICU_ENABLED */ #ifdef DEBUG_ENCODING switch (ret) { case 0: @@ -1915,6 +2082,17 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out, ret = -3; } #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + else if (handler->uconv_in != NULL) { + ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use], + &written, in->content, &toconv); + xmlBufferShrink(in, toconv); + out->use += written; + out->content[out->use] = 0; + if (ret == -1) + ret = -3; + } +#endif /* LIBXML_ICU_ENABLED */ switch (ret) { case 0: #ifdef DEBUG_ENCODING @@ -1940,7 +2118,7 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out, case -2: { char buf[50]; - snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X", + snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X", in->content[0], in->content[1], in->content[2], in->content[3]); buf[49] = 0; @@ -1962,15 +2140,15 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out, * @handler: char enconding transformation data structure * @out: an xmlBuffer for the output. * @in: an xmlBuffer for the input - * + * * Generic front-end for the encoding handler output function - * a first call with @in == NULL has to be made firs to initiate the + * a first call with @in == NULL has to be made firs to initiate the * output in case of non-stateless encoding needing to initiate their * state or the output (like the BOM in UTF16). * In case of UTF8 sequence conversion errors for the given encoder, * the content will be automatically remapped to a CharRef sequence. - * - * Returns the number of byte written if success, or + * + * Returns the number of byte written if success, or * -1 general error * -2 if the transcoding fails (for *in is not valid utf8 string or * the result of transformation can't fit into the encoding we want), or @@ -1988,7 +2166,7 @@ xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out, if (out == NULL) return(-1); retry: - + written = out->size - out->use; if (written > 0) @@ -2015,6 +2193,15 @@ retry: out->content[out->use] = 0; } #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + else if (handler->uconv_out != NULL) { + ret = xmlUconvWrapper(handler->uconv_out, 0, + &out->content[out->use], + &written, NULL, &toconv); + out->use += written; + out->content[out->use] = 0; + } +#endif /* LIBXML_ICU_ENABLED */ #ifdef DEBUG_ENCODING xmlGenericError(xmlGenericErrorContext, "initialized encoder\n"); @@ -2039,7 +2226,7 @@ retry: xmlBufferShrink(in, toconv); out->use += written; writtentot += written; - } + } out->content[out->use] = 0; } #ifdef LIBXML_ICONV_ENABLED @@ -2061,6 +2248,26 @@ retry: } } #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + else if (handler->uconv_out != NULL) { + ret = xmlUconvWrapper(handler->uconv_out, 0, + &out->content[out->use], + &written, in->content, &toconv); + xmlBufferShrink(in, toconv); + out->use += written; + writtentot += written; + out->content[out->use] = 0; + if (ret == -1) { + if (written > 0) { + /* + * Can be a limitation of iconv + */ + goto retry; + } + ret = -3; + } + } +#endif /* LIBXML_ICU_ENABLED */ else { xmlEncodingErr(XML_I18N_NO_OUTPUT, "xmlCharEncOutFunc: no output function !\n", NULL); @@ -2122,7 +2329,7 @@ retry: } else { char buf[50]; - snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X", + snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X", in->content[0], in->content[1], in->content[2], in->content[3]); buf[49] = 0; @@ -2141,7 +2348,7 @@ retry: /** * xmlCharEncCloseFunc: * @handler: char enconding transformation data structure - * + * * Generic front-end for encoding handler close function * * Returns 0 if success, or -1 in case of error @@ -2149,6 +2356,7 @@ retry: int xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { int ret = 0; + int tofree = 0; if (handler == NULL) return(-1); if (handler->name == NULL) return(-1); #ifdef LIBXML_ICONV_ENABLED @@ -2157,9 +2365,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { * and the associated icon resources. */ if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { - if (handler->name != NULL) - xmlFree(handler->name); - handler->name = NULL; + tofree = 1; if (handler->iconv_out != NULL) { if (iconv_close(handler->iconv_out)) ret = -1; @@ -2170,9 +2376,28 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { ret = -1; handler->iconv_in = NULL; } - xmlFree(handler); } #endif /* LIBXML_ICONV_ENABLED */ +#ifdef LIBXML_ICU_ENABLED + if ((handler->uconv_out != NULL) || (handler->uconv_in != NULL)) { + tofree = 1; + if (handler->uconv_out != NULL) { + closeIcuConverter(handler->uconv_out); + handler->uconv_out = NULL; + } + if (handler->uconv_in != NULL) { + closeIcuConverter(handler->uconv_in); + handler->uconv_in = NULL; + } + } +#endif + if (tofree) { + /* free up only dynamic handlers iconv/uconv */ + if (handler->name != NULL) + xmlFree(handler->name); + handler->name = NULL; + xmlFree(handler); + } #ifdef DEBUG_ENCODING if (ret) xmlGenericError(xmlGenericErrorContext, @@ -2202,7 +2427,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { long xmlByteConsumed(xmlParserCtxtPtr ctxt) { xmlParserInputPtr in; - + if (ctxt == NULL) return(-1); in = ctxt->input; if (in == NULL) return(-1); @@ -2247,6 +2472,23 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) { unused += written; cur += toconv; } while (ret == -2); +#endif +#ifdef LIBXML_ICU_ENABLED + } else if (handler->uconv_out != NULL) { + do { + toconv = in->end - cur; + written = 32000; + ret = xmlUconvWrapper(handler->uconv_out, 0, &convbuf[0], + &written, cur, &toconv); + if (ret < 0) { + if (written > 0) + ret = -2; + else + return(-1); + } + unused += written; + cur += toconv; + } while (ret == -2); #endif } else { /* could not find a converter */ @@ -2260,7 +2502,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) { return(in->consumed + (in->cur - in->base)); } -#ifndef LIBXML_ICONV_ENABLED +#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED) #ifdef LIBXML_ISO8859X_ENABLED /** @@ -2286,6 +2528,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen, const unsigned char* outstart = out; const unsigned char* inend; const unsigned char* instart = in; + const unsigned char* processed = in; if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (xlattable == NULL)) @@ -2302,81 +2545,82 @@ UTF8ToISO8859x(unsigned char* out, int *outlen, while (in < inend) { unsigned char d = *in++; if (d < 0x80) { - *out++ = d; + *out++ = d; } else if (d < 0xC0) { /* trailing byte in leading position */ *outlen = out - outstart; - *inlen = in - instart - 1; + *inlen = processed - instart; return(-2); } else if (d < 0xE0) { unsigned char c; if (!(in < inend)) { /* trailing byte not in input buffer */ *outlen = out - outstart; - *inlen = in - instart - 1; - return(-2); + *inlen = processed - instart; + return(-3); } c = *in++; if ((c & 0xC0) != 0x80) { /* not a trailing byte */ *outlen = out - outstart; - *inlen = in - instart - 2; + *inlen = processed - instart; return(-2); } - c = c & 0x3F; + c = c & 0x3F; d = d & 0x1F; d = xlattable [48 + c + xlattable [d] * 64]; if (d == 0) { /* not in character set */ *outlen = out - outstart; - *inlen = in - instart - 2; + *inlen = processed - instart; return(-2); } - *out++ = d; + *out++ = d; } else if (d < 0xF0) { unsigned char c1; unsigned char c2; if (!(in < inend - 1)) { /* trailing bytes not in input buffer */ *outlen = out - outstart; - *inlen = in - instart - 1; - return(-2); + *inlen = processed - instart; + return(-3); } c1 = *in++; if ((c1 & 0xC0) != 0x80) { /* not a trailing byte (c1) */ *outlen = out - outstart; - *inlen = in - instart - 2; + *inlen = processed - instart; return(-2); } c2 = *in++; if ((c2 & 0xC0) != 0x80) { /* not a trailing byte (c2) */ *outlen = out - outstart; - *inlen = in - instart - 2; + *inlen = processed - instart; return(-2); } - c1 = c1 & 0x3F; - c2 = c2 & 0x3F; + c1 = c1 & 0x3F; + c2 = c2 & 0x3F; d = d & 0x0F; - d = xlattable [48 + c2 + xlattable [48 + c1 + + d = xlattable [48 + c2 + xlattable [48 + c1 + xlattable [32 + d] * 64] * 64]; if (d == 0) { /* not in character set */ *outlen = out - outstart; - *inlen = in - instart - 3; + *inlen = processed - instart; return(-2); } - *out++ = d; + *out++ = d; } else { /* cannot transcode >= U+010000 */ *outlen = out - outstart; - *inlen = in - instart - 1; + *inlen = processed - instart; return(-2); } + processed = in; } *outlen = out - outstart; - *inlen = in - instart; + *inlen = processed - instart; return(*outlen); } @@ -2410,16 +2654,16 @@ ISO8859xToUTF8(unsigned char* out, int *outlen, outend = out + *outlen; inend = in + *inlen; instop = inend; - c = *in; - while (in < inend && out < outend - 1) { - if (c >= 0x80) { - c = unicodetable [c - 0x80]; + + while ((in < inend) && (out < outend - 2)) { + if (*in >= 0x80) { + c = unicodetable [*in - 0x80]; if (c == 0) { /* undefined code point */ *outlen = out - outstart; *inlen = in - instart; return (-1); - } + } if (c < 0x800) { *out++ = ((c >> 6) & 0x1F) | 0xC0; *out++ = (c & 0x3F) | 0x80; @@ -2427,48 +2671,47 @@ ISO8859xToUTF8(unsigned char* out, int *outlen, *out++ = ((c >> 12) & 0x0F) | 0xE0; *out++ = ((c >> 6) & 0x3F) | 0x80; *out++ = (c & 0x3F) | 0x80; - } + } ++in; - c = *in; } - if (instop - in > outend - out) instop = in + (outend - out); - while (c < 0x80 && in < instop) { - *out++ = c; - ++in; - c = *in; + if (instop - in > outend - out) instop = in + (outend - out); + while ((*in < 0x80) && (in < instop)) { + *out++ = *in++; } - } - if (in < inend && out < outend && c < 0x80) { - *out++ = c; - ++in; + } + if ((in < inend) && (out < outend) && (*in < 0x80)) { + *out++ = *in++; + } + if ((in < inend) && (out < outend) && (*in < 0x80)) { + *out++ = *in++; } *outlen = out - outstart; *inlen = in - instart; return (*outlen); } - + /************************************************************************ * Lookup tables for ISO-8859-2..ISO-8859-16 transcoding * ************************************************************************/ static unsigned short const xmlunicodetable_ISO8859_2 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, - 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b, - 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, - 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, - 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, - 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, - 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, - 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, - 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, - 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, - 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, - 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, + 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b, + 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, + 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, + 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, + 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, + 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, + 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, + 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, + 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, + 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, + 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9, }; static unsigned char const xmltranscodetable_ISO8859_2 [48 + 6 * 64] = { @@ -2502,22 +2745,22 @@ static unsigned char const xmltranscodetable_ISO8859_2 [48 + 6 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_3 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7, - 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b, - 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, - 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0x0000, 0x017c, - 0x00c0, 0x00c1, 0x00c2, 0x0000, 0x00c4, 0x010a, 0x0108, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x0000, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, - 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x0000, 0x00e4, 0x010b, 0x0109, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x0000, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, - 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7, + 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b, + 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, + 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0x0000, 0x017c, + 0x00c0, 0x00c1, 0x00c2, 0x0000, 0x00c4, 0x010a, 0x0108, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x0000, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, + 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x0000, 0x00e4, 0x010b, 0x0109, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x0000, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, + 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9, }; static unsigned char const xmltranscodetable_ISO8859_3 [48 + 7 * 64] = { @@ -2555,22 +2798,22 @@ static unsigned char const xmltranscodetable_ISO8859_3 [48 + 7 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_4 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, - 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af, - 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, - 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b, - 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, - 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a, - 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df, - 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, - 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b, - 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, + 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af, + 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, + 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b, + 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, + 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a, + 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, + 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df, + 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, + 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b, + 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9, }; static unsigned char const xmltranscodetable_ISO8859_4 [48 + 6 * 64] = { @@ -2604,22 +2847,22 @@ static unsigned char const xmltranscodetable_ISO8859_4 [48 + 6 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_5 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, - 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, + 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, + 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, + 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f, }; static unsigned char const xmltranscodetable_ISO8859_5 [48 + 6 * 64] = { @@ -2653,22 +2896,22 @@ static unsigned char const xmltranscodetable_ISO8859_5 [48 + 6 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_6 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, - 0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, - 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, - 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, - 0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, - 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, - 0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, + 0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, + 0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, + 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, + 0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }; static unsigned char const xmltranscodetable_ISO8859_6 [48 + 5 * 64] = { @@ -2698,22 +2941,22 @@ static unsigned char const xmltranscodetable_ISO8859_6 [48 + 5 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_7 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x2018, 0x2019, 0x00a3, 0x0000, 0x0000, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x0000, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7, - 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f, - 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, - 0x03a0, 0x03a1, 0x0000, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, - 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, - 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, - 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x2018, 0x2019, 0x00a3, 0x0000, 0x0000, 0x00a6, 0x00a7, + 0x00a8, 0x00a9, 0x0000, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7, + 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, + 0x03a0, 0x03a1, 0x0000, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, + 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, + 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, + 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, + 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, + 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000, }; static unsigned char const xmltranscodetable_ISO8859_7 [48 + 7 * 64] = { @@ -2751,22 +2994,22 @@ static unsigned char const xmltranscodetable_ISO8859_7 [48 + 7 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_8 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017, - 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, - 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, - 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, - 0x05e8, 0x05e9, 0x05ea, 0x0000, 0x0000, 0x200e, 0x200f, 0x0000, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, + 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, + 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017, + 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, + 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, + 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, + 0x05e8, 0x05e9, 0x05ea, 0x0000, 0x0000, 0x200e, 0x200f, 0x0000, }; static unsigned char const xmltranscodetable_ISO8859_8 [48 + 7 * 64] = { @@ -2804,22 +3047,22 @@ static unsigned char const xmltranscodetable_ISO8859_8 [48 + 7 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_9 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, + 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, + 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff, }; static unsigned char const xmltranscodetable_ISO8859_9 [48 + 5 * 64] = { @@ -2849,22 +3092,22 @@ static unsigned char const xmltranscodetable_ISO8859_9 [48 + 5 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_10 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7, - 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a, - 0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7, - 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b, - 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, - 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf, - 0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168, - 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, - 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, - 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7, + 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a, + 0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7, + 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b, + 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, + 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf, + 0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168, + 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, + 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, + 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef, + 0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, + 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138, }; static unsigned char const xmltranscodetable_ISO8859_10 [48 + 7 * 64] = { @@ -2902,22 +3145,22 @@ static unsigned char const xmltranscodetable_ISO8859_10 [48 + 7 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_11 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, - 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, - 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, - 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, - 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, - 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, - 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, - 0x0e38, 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e3f, - 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, - 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, - 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, - 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, + 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, + 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, + 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, + 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, + 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, + 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, + 0x0e38, 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e3f, + 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, + 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, + 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, + 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x0000, 0x0000, 0x0000, 0x0000, }; static unsigned char const xmltranscodetable_ISO8859_11 [48 + 6 * 64] = { @@ -2951,22 +3194,22 @@ static unsigned char const xmltranscodetable_ISO8859_11 [48 + 6 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_13 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, - 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, - 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, - 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, - 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, - 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, - 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, - 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, - 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, - 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, - 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, + 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, + 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, + 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, + 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, + 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, + 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, + 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, + 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, + 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, + 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019, }; static unsigned char const xmltranscodetable_ISO8859_13 [48 + 7 * 64] = { @@ -3004,22 +3247,22 @@ static unsigned char const xmltranscodetable_ISO8859_13 [48 + 7 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_14 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, - 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178, - 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56, - 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, + 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178, + 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56, + 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a, + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, + 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff, }; static unsigned char const xmltranscodetable_ISO8859_14 [48 + 10 * 64] = { @@ -3069,22 +3312,22 @@ static unsigned char const xmltranscodetable_ISO8859_14 [48 + 10 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_15 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, - 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, - 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, + 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, + 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf, + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff, }; static unsigned char const xmltranscodetable_ISO8859_15 [48 + 6 * 64] = { @@ -3118,22 +3361,22 @@ static unsigned char const xmltranscodetable_ISO8859_15 [48 + 6 * 64] = { }; static unsigned short const xmlunicodetable_ISO8859_16 [128] = { - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, - 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b, - 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, - 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, - 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a, - 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, - 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff, + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, + 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, + 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b, + 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, + 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, + 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, + 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a, + 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df, + 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, + 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, + 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff, }; static unsigned char const xmltranscodetable_ISO8859_16 [48 + 9 * 64] = { @@ -3332,4 +3575,3 @@ xmlRegisterCharEncodingHandlersISO8859x (void) { #define bottom_encoding #include "elfgcchack.h" - diff --git a/lib/3rdparty/libxml2/include/Makefile.in b/lib/3rdparty/libxml2/include/Makefile.in index c0d974c75a3..6e219c735eb 100644 --- a/lib/3rdparty/libxml2/include/Makefile.in +++ b/lib/3rdparty/libxml2/include/Makefile.in @@ -42,7 +42,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -166,6 +166,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -214,6 +215,7 @@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ WGET = @WGET@ WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@ WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@ +WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@ WITH_C14N = @WITH_C14N@ WITH_CATALOG = @WITH_CATALOG@ WITH_DEBUG = @WITH_DEBUG@ @@ -222,6 +224,7 @@ WITH_FTP = @WITH_FTP@ WITH_HTML = @WITH_HTML@ WITH_HTTP = @WITH_HTTP@ WITH_ICONV = @WITH_ICONV@ +WITH_ICU = @WITH_ICU@ WITH_ISO8859X = @WITH_ISO8859X@ WITH_LEGACY = @WITH_LEGACY@ WITH_MEM_DEBUG = @WITH_MEM_DEBUG@ @@ -292,7 +295,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ diff --git a/lib/3rdparty/libxml2/libxml2.spec b/lib/3rdparty/libxml2/libxml2.spec index 94a2a3f9d4c..42fa672138c 100644 --- a/lib/3rdparty/libxml2/libxml2.spec +++ b/lib/3rdparty/libxml2/libxml2.spec @@ -1,6 +1,6 @@ Summary: Library providing XML and HTML support Name: libxml2 -Version: 2.7.7 +Version: 2.7.8 Release: 1 License: MIT Group: Development/Libraries @@ -127,6 +127,6 @@ rm -fr %{buildroot} %doc doc/python.html %changelog -* Mon Mar 15 2010 Daniel Veillard -- upstream release 2.7.7 see http://xmlsoft.org/news.html +* Thu Nov 4 2010 Daniel Veillard +- upstream release 2.7.8 see http://xmlsoft.org/news.html diff --git a/lib/3rdparty/libxml2/ltmain.sh b/lib/3rdparty/libxml2/ltmain.sh index a72f2fd78bf..d8efb57b1d7 100644 --- a/lib/3rdparty/libxml2/ltmain.sh +++ b/lib/3rdparty/libxml2/ltmain.sh @@ -1,9 +1,10 @@ # Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6b +# libtool (GNU libtool) 2.2.10 # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -32,50 +33,54 @@ # # Provide generalized library-building support services. # -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory # -# MODE-ARGS vary depending on the MODE. +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b -# automake: $automake_version -# autoconf: $autoconf_version +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.10 +# automake: $automake_version +# autoconf: $autoconf_version # # Report bugs to . -PROGRAM=ltmain.sh +PROGRAM=libtool PACKAGE=libtool -VERSION=2.2.6b +VERSION=2.2.10 TIMESTAMP="" -package_revision=1.3017 +package_revision=1.3175 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -91,10 +96,15 @@ fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + # NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES @@ -107,15 +117,24 @@ do lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL $lt_unset CDPATH +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" : ${CP="cp -f"} -: ${ECHO="echo"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} @@ -159,32 +178,168 @@ basename="s,^.*/,," func_dirname_and_basename () { # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # Generated shell functions inserted here. -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} # The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac # Make sure we have an absolute path for reexecution: case $progpath in @@ -258,6 +413,13 @@ func_verbose () : } +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + # func_error arg... # Echo program name prefixed message to standard error. func_error () @@ -326,9 +488,9 @@ func_mkdir_p () case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do @@ -378,7 +540,7 @@ func_mktempdir () func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $ECHO "X$my_tmpdir" | $Xsed + $ECHO "$my_tmpdir" } @@ -392,7 +554,7 @@ func_quote_for_eval () { case $1 in *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac @@ -419,7 +581,7 @@ func_quote_for_expand () { case $1 in *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ + my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; @@ -489,14 +651,19 @@ func_show_eval_locale () } - - - # func_version # Echo version message to standard output and exit. func_version () { - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ @@ -509,19 +676,20 @@ func_version () # Echo short help message to standard output and exit. func_usage () { - $SED -n '/^# Usage:/,/# -h/ { + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" - $ECHO + echo $ECHO "run \`$progname --help | more' for full usage" exit $? } -# func_help -# Echo long help message to standard output and exit. +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { @@ -538,7 +706,10 @@ func_help () s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" - exit $? + ret=$? + if test -z "$1"; then + exit $ret + fi } # func_missing_arg argname @@ -546,7 +717,7 @@ func_help () # exit_cmd. func_missing_arg () { - func_error "missing argument for $1" + func_error "missing argument for $1." exit_cmd=exit } @@ -556,29 +727,6 @@ exit_cmd=: -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null; then + case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -1867,6 +2067,11 @@ func_mode_install () # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac # We need to accept at least all the BSD install flags. dest= @@ -1876,8 +2081,10 @@ func_mode_install () install_type= isdir=no stripme= + no_mode=: for arg do + arg2= if test -n "$dest"; then files="$files $dest" dest=$arg @@ -1887,10 +2094,9 @@ func_mode_install () case $arg in -d) isdir=yes ;; -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac + if $install_cp; then :; else + prev=$arg + fi ;; -g | -m | -o) prev=$arg @@ -1904,6 +2110,10 @@ func_mode_install () *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi prev= else dest=$arg @@ -1915,6 +2125,10 @@ func_mode_install () # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + install_shared_prog="$install_shared_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -1923,6 +2137,13 @@ func_mode_install () test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" + fi + fi + if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" @@ -2010,7 +2231,7 @@ func_mode_install () if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -2023,9 +2244,9 @@ func_mode_install () if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" @@ -2043,7 +2264,7 @@ func_mode_install () test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in @@ -2183,7 +2404,7 @@ func_mode_install () if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no @@ -2202,7 +2423,7 @@ func_mode_install () file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" @@ -2221,7 +2442,7 @@ func_mode_install () } else # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi @@ -2323,6 +2544,10 @@ func_generate_dlsyms () extern \"C\" { #endif +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + /* External symbol declarations for the compiler. */\ " @@ -2332,7 +2557,7 @@ extern \"C\" { $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" @@ -2371,7 +2596,7 @@ extern \"C\" { eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -2415,10 +2640,10 @@ extern \"C\" { if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { @@ -2428,7 +2653,7 @@ typedef struct { " case $host in *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" @@ -2441,7 +2666,7 @@ typedef struct { lt_dlsym_const=const ;; esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist @@ -2457,7 +2682,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] = eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; @@ -2515,16 +2740,16 @@ static const void *lt_preloaded_setup() { case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; @@ -2538,8 +2763,8 @@ static const void *lt_preloaded_setup() { # really was required. # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } @@ -2549,6 +2774,7 @@ static const void *lt_preloaded_setup() { # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug @@ -2559,8 +2785,9 @@ func_win32_libid () win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ @@ -2598,7 +2825,18 @@ func_extract_an_archive () $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else @@ -2669,7 +2907,7 @@ func_extract_archives () darwin_file= darwin_files= for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ @@ -2684,25 +2922,30 @@ func_extract_archives () func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } - -# func_emit_wrapper_part1 [arg=no] +# func_emit_wrapper [arg=no] # -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () { - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi + func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL @@ -2718,7 +2961,6 @@ func_emit_wrapper_part1 () # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible @@ -2749,31 +2991,132 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ " - $ECHO "\ + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then @@ -2783,30 +3126,13 @@ else esac fi - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then @@ -2814,7 +3140,7 @@ func_emit_wrapper_part2 () fi # remove .libs from thisdir case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi @@ -2877,7 +3203,7 @@ func_emit_wrapper_part2 () # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " @@ -2894,64 +3220,18 @@ func_emit_wrapper_part2 () $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} # func_to_host_path arg @@ -2978,23 +3258,19 @@ func_emit_wrapper () func_to_host_path () { func_to_host_path_result="$1" - if test -n "$1" ; then + if test -n "$1"; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` + func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` + func_to_host_path_result=`cygpath -w "$1" | + $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero @@ -3006,17 +3282,17 @@ func_to_host_path () # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. - func_to_host_path_result="" + func_to_host_path_result= fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" - func_error " '$1'" + func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" @@ -3049,30 +3325,24 @@ func_to_host_path () func_to_host_pathlist () { func_to_host_pathlist_result="$1" - if test -n "$1" ; then + if test -n "$1"; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` + func_stripname : : "$1" + func_to_host_pathlist_tmp1=$func_stripname_result case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` + func_to_host_pathlist_result=` + ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | $SED -e "$lt_sed_naive_backslashify"` ;; * ) @@ -3088,18 +3358,17 @@ func_to_host_pathlist () if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + func_append func_to_host_pathlist_result ";$func_to_host_path_result" fi fi fi - IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac - if test -z "$func_to_host_pathlist_result" ; then + if test -z "$func_to_host_pathlist_result"; then func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" + func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression @@ -3116,7 +3385,7 @@ func_to_host_pathlist () ;; esac case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + *: ) func_append func_to_host_pathlist_result ";" ;; esac ;; @@ -3141,31 +3410,23 @@ func_emit_cwrapperexe_src () This wrapper executable should never be moved out of the build directory. If it is, it will not operate correctly. - - Currently, it simply execs the wrapper *script* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. */ EOF cat <<"EOF" +#ifdef _MSC_VER +# define _CRT_SECURE_NO_DEPRECATE 1 +#endif #include #include #ifdef _MSC_VER # include # include # include -# define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif # endif #endif #include @@ -3177,6 +3438,44 @@ int setenv (const char *, const char *, int); #include #include +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) @@ -3192,14 +3491,7 @@ int setenv (const char *, const char *, int); # define S_IXGRP 0 #endif -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - +/* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' @@ -3230,10 +3522,6 @@ int setenv (const char *, const char *, int); # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - #ifndef FOPEN_WB # define FOPEN_WB "w" #endif @@ -3246,22 +3534,13 @@ int setenv (const char *, const char *, int); if (stale) { free ((void *) stale); stale = 0; } \ } while (0) -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; #else -# define LTWRAPPER_DEBUGPRINTF(args) +static int lt_debug = 0; #endif -const char *program_name = NULL; +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); @@ -3271,32 +3550,18 @@ char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); EOF - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); } EOF @@ -3560,11 +3782,14 @@ EOF mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; @@ -3586,7 +3811,7 @@ xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) - lt_fatal ("Memory exhausted"); + lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } @@ -3620,8 +3845,8 @@ check_executable (const char *path) { struct stat st; - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3638,8 +3863,8 @@ make_executable (const char *path) int rval = 0; struct stat st; - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3665,8 +3890,8 @@ find_executable (const char *wrapper) int tmp_len; char *concat_name; - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; @@ -3719,7 +3944,8 @@ find_executable (const char *wrapper) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -3744,7 +3970,8 @@ find_executable (const char *wrapper) } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); @@ -3770,8 +3997,9 @@ chase_symlinks (const char *pathspec) int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) @@ -3793,8 +4021,9 @@ chase_symlinks (const char *pathspec) } else { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); @@ -3807,7 +4036,8 @@ chase_symlinks (const char *pathspec) tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { - lt_fatal ("Could not follow symlinks for %s", pathspec); + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif @@ -3833,11 +4063,25 @@ strendzap (char *str, const char *pat) return str; } +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + static void -lt_error_core (int exit_status, const char *mode, +lt_error_core (int exit_status, const char *file, + int line, const char *mode, const char *message, va_list ap) { - fprintf (stderr, "%s: %s: ", program_name, mode); + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); @@ -3846,20 +4090,32 @@ lt_error_core (int exit_status, const char *mode, } void -lt_fatal (const char *message, ...) +lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + void lt_setenv (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ @@ -3904,95 +4160,12 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) return new_value; } -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - void lt_update_exe_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4011,9 +4184,9 @@ lt_update_exe_path (const char *name, const char *value) void lt_update_lib_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4023,11 +4196,152 @@ lt_update_lib_path (const char *name, const char *value) } } +EOF + case $host_os in + mingw*) + cat <<"EOF" +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' + + cat <<"EOF" +} EOF } # end: func_emit_cwrapperexe_src +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + # func_mode_link arg... func_mode_link () { @@ -4072,6 +4386,7 @@ func_mode_link () new_inherited_linker_flags= avoid_version=no + bindir= dlfiles= dlprefiles= dlself=no @@ -4164,6 +4479,11 @@ func_mode_link () esac case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. @@ -4425,6 +4745,11 @@ func_mode_link () continue ;; + -bindir) + prev=bindir + continue + ;; + -dlopen) prev=dlfiles continue @@ -4503,7 +4828,7 @@ func_mode_link () esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; @@ -4522,7 +4847,7 @@ func_mode_link () -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -4708,7 +5033,7 @@ func_mode_link () for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" + arg="$arg $func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" @@ -4754,18 +5079,19 @@ func_mode_link () arg="$func_quote_for_eval_result" ;; - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" @@ -4925,7 +5251,7 @@ func_mode_link () if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi @@ -5048,7 +5374,8 @@ func_mode_link () # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + func_basename "$deplib" + deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; @@ -5227,7 +5554,7 @@ func_mode_link () match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi @@ -5237,15 +5564,15 @@ func_mode_link () ;; esac if test "$valid_a_lib" != yes; then - $ECHO + echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" @@ -5318,7 +5645,7 @@ func_mode_link () # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; @@ -5326,7 +5653,7 @@ func_mode_link () esac done fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then @@ -5580,7 +5907,7 @@ func_mode_link () fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO + echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else @@ -5683,9 +6010,9 @@ func_mode_link () if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi @@ -5825,21 +6152,21 @@ func_mode_link () # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $ECHO + echo $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module @@ -5893,6 +6220,7 @@ func_mode_link () if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do + path= case $deplib in -L*) path="$deplib" ;; *.la) @@ -5958,7 +6286,7 @@ func_mode_link () compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" @@ -6126,7 +6454,7 @@ func_mode_link () if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" @@ -6194,7 +6522,7 @@ func_mode_link () age="$number_minor" revision="$number_revision" ;; - freebsd-aout|freebsd-elf|sunos) + freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" @@ -6428,14 +6756,14 @@ func_mode_link () oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then @@ -6476,7 +6804,7 @@ func_mode_link () if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) @@ -6561,13 +6889,13 @@ EOF newdeplibs="$newdeplibs $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which I believe you do not have" - $ECHO "*** because a test_compile did reveal that the linker did not use it for" - $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which I believe you do not have" + echo "*** because a test_compile did reveal that the linker did not use it for" + echo "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ;; @@ -6604,22 +6932,22 @@ EOF newdeplibs="$newdeplibs $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because a test_compile did reveal that the linker did not use this one" - $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because a test_compile did reveal that the linker did not use this one" + echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning! Library $i is needed by this library but I was not able to" - $ECHO "*** make it link in! You will probably need to install it or some" - $ECHO "*** library that it depends on before this library will be fully" - $ECHO "*** functional. Installing it before continuing would be even better." + echo "*** make it link in! You will probably need to install it or some" + echo "*** library that it depends on before this library will be fully" + echo "*** functional. Installing it before continuing would be even better." fi ;; *) @@ -6665,7 +6993,7 @@ EOF potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | @@ -6680,12 +7008,12 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else @@ -6723,7 +7051,7 @@ EOF potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" @@ -6734,12 +7062,12 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else @@ -6757,25 +7085,25 @@ EOF ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO + case $tmp_deplibs in + *[!\ \ ]*) + echo if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + echo "*** Warning: inter-library dependencies are not supported in this platform." else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." + echo "*** Warning: inter-library dependencies are not known to be supported." fi - $ECHO "*** All declared inter-library dependencies are being dropped." + echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes - fi + ;; + esac ;; esac versuffix=$versuffix_save @@ -6787,23 +7115,23 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" @@ -6813,16 +7141,16 @@ EOF build_libtool_libs=no fi else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module @@ -6839,9 +7167,9 @@ EOF # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -6963,7 +7291,7 @@ EOF done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= @@ -7029,7 +7357,7 @@ EOF if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then @@ -7130,7 +7458,8 @@ EOF save_libobjs=$libobjs fi save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + func_basename "$output" + output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. @@ -7143,12 +7472,12 @@ EOF if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output + echo 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done - $ECHO ')' >> $output + echo ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk @@ -7190,17 +7519,19 @@ EOF # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext - objlist=$obj + objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result @@ -7210,7 +7541,8 @@ EOF # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi @@ -7269,7 +7601,7 @@ EOF if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then @@ -7434,7 +7766,7 @@ EOF if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -7445,7 +7777,7 @@ EOF fi # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' @@ -7505,8 +7837,8 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac @@ -7523,8 +7855,8 @@ EOF esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -7661,8 +7993,8 @@ EOF if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" @@ -7674,15 +8006,15 @@ EOF wrappers_required=yes case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no @@ -7691,7 +8023,7 @@ EOF esac if test "$wrappers_required" = no; then # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -7738,7 +8070,7 @@ EOF # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit @@ -7757,7 +8089,7 @@ EOF if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -7769,7 +8101,7 @@ EOF fi # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname @@ -7793,18 +8125,7 @@ EOF fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -7925,7 +8246,7 @@ EOF done | sort | sort -uc >/dev/null 2>&1); then : else - $ECHO "copying selected object files to avoid basename conflicts..." + echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" @@ -8036,7 +8357,7 @@ EOF done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -8121,9 +8442,27 @@ EOF fi $RM $output # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; esac $ECHO > $output "\ # $outputname - a libtool library file diff --git a/lib/3rdparty/libxml2/nanoftp.c b/lib/3rdparty/libxml2/nanoftp.c index a54b85b3a54..a7ca5b6b047 100644 --- a/lib/3rdparty/libxml2/nanoftp.c +++ b/lib/3rdparty/libxml2/nanoftp.c @@ -78,7 +78,9 @@ #if defined(__MINGW32__) || defined(_WIN32_WCE) +#ifndef _WINSOCKAPI_ #define _WINSOCKAPI_ +#endif #include #include #undef XML_SOCKLEN_T @@ -92,7 +94,6 @@ #if !defined(__BEOS__) || defined(__HAIKU__) #define closesocket(s) close(s) #endif -#define SOCKET int #endif #ifdef __BEOS__ @@ -484,7 +485,7 @@ xmlNanoFTPNewCtxt(const char *URL) { ret->returnValue = 0; ret->controlBufIndex = 0; ret->controlBufUsed = 0; - ret->controlFd = -1; + ret->controlFd = INVALID_SOCKET; unescaped = xmlURIUnescapeString(URL, 0, NULL); if (unescaped != NULL) { @@ -511,8 +512,8 @@ xmlNanoFTPFreeCtxt(void * ctx) { if (ctxt->protocol != NULL) xmlFree(ctxt->protocol); if (ctxt->path != NULL) xmlFree(ctxt->path); ctxt->passive = 1; - if (ctxt->controlFd >= 0) closesocket(ctxt->controlFd); - ctxt->controlFd = -1; + if (ctxt->controlFd != INVALID_SOCKET) closesocket(ctxt->controlFd); + ctxt->controlFd = INVALID_SOCKET; ctxt->controlBufIndex = -1; ctxt->controlBufUsed = -1; xmlFree(ctxt); @@ -567,7 +568,7 @@ xmlNanoFTPGetMore(void *ctx) { int len; int size; - if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1); + if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1); if ((ctxt->controlBufIndex < 0) || (ctxt->controlBufIndex > FTP_BUF_SIZE)) { #ifdef DEBUG_FTP @@ -619,8 +620,8 @@ xmlNanoFTPGetMore(void *ctx) { if ((len = recv(ctxt->controlFd, &ctxt->controlBuf[ctxt->controlBufIndex], size, 0)) < 0) { __xmlIOErr(XML_FROM_FTP, 0, "recv failed"); - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } #ifdef DEBUG_FTP @@ -648,7 +649,7 @@ xmlNanoFTPReadResponse(void *ctx) { int len; int res = -1, cur = -1; - if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1); + if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1); get_more: /* @@ -737,7 +738,7 @@ xmlNanoFTPCheckResponse(void *ctx) { fd_set rfd; struct timeval tv; - if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1); + if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1); tv.tv_sec = 0; tv.tv_usec = 0; FD_ZERO(&rfd); @@ -826,7 +827,7 @@ xmlNanoFTPQuit(void *ctx) { char buf[200]; int len, res; - if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1); + if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1); snprintf(buf, sizeof(buf), "QUIT\r\n"); len = strlen(buf); @@ -951,7 +952,7 @@ xmlNanoFTPConnect(void *ctx) { addrlen = sizeof (struct sockaddr_in); } - if (ctxt->controlFd < 0) { + if (ctxt->controlFd == INVALID_SOCKET) { __xmlIOErr(XML_FROM_FTP, 0, "socket failed"); return(-1); } @@ -962,8 +963,8 @@ xmlNanoFTPConnect(void *ctx) { if (connect(ctxt->controlFd, (struct sockaddr *) &ctxt->ftpAddr, addrlen) < 0) { __xmlIOErr(XML_FROM_FTP, 0, "Failed to create a connection"); - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } @@ -972,8 +973,8 @@ xmlNanoFTPConnect(void *ctx) { */ res = xmlNanoFTPGetResponse(ctxt); if (res != 2) { - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } @@ -1030,7 +1031,7 @@ xmlNanoFTPConnect(void *ctx) { if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); closesocket(ctxt->controlFd); - ctxt->controlFd = -1; + ctxt->controlFd = INVALID_SOCKET; return(res); } res = xmlNanoFTPGetResponse(ctxt); @@ -1052,13 +1053,13 @@ xmlNanoFTPConnect(void *ctx) { if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); closesocket(ctxt->controlFd); - ctxt->controlFd = -1; + ctxt->controlFd = INVALID_SOCKET; return(res); } res = xmlNanoFTPGetResponse(ctxt); if (res > 3) { closesocket(ctxt->controlFd); - ctxt->controlFd = -1; + ctxt->controlFd = INVALID_SOCKET; return(-1); } break; @@ -1069,7 +1070,7 @@ xmlNanoFTPConnect(void *ctx) { case -1: default: closesocket(ctxt->controlFd); - ctxt->controlFd = -1; + ctxt->controlFd = INVALID_SOCKET; return(-1); } } @@ -1092,8 +1093,8 @@ xmlNanoFTPConnect(void *ctx) { res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(res); } res = xmlNanoFTPGetResponse(ctxt); @@ -1103,8 +1104,8 @@ xmlNanoFTPConnect(void *ctx) { break; } if (proxyType == 1) { - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } case 2: @@ -1123,8 +1124,8 @@ xmlNanoFTPConnect(void *ctx) { res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(res); } res = xmlNanoFTPGetResponse(ctxt); @@ -1145,8 +1146,8 @@ xmlNanoFTPConnect(void *ctx) { res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(res); } res = xmlNanoFTPGetResponse(ctxt); @@ -1156,8 +1157,8 @@ xmlNanoFTPConnect(void *ctx) { return(0); } if (proxyType == 2) { - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } case 3: @@ -1166,8 +1167,8 @@ xmlNanoFTPConnect(void *ctx) { * send the code or at least the sequence in use. */ default: - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } } @@ -1176,8 +1177,8 @@ xmlNanoFTPConnect(void *ctx) { */ res = xmlNanoFTPSendUser(ctxt); if (res < 0) { - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } res = xmlNanoFTPGetResponse(ctxt); @@ -1191,14 +1192,14 @@ xmlNanoFTPConnect(void *ctx) { case 5: case -1: default: - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } res = xmlNanoFTPSendPasswd(ctxt); if (res < 0) { - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } res = xmlNanoFTPGetResponse(ctxt); @@ -1213,8 +1214,8 @@ xmlNanoFTPConnect(void *ctx) { case 5: case -1: default: - closesocket(ctxt->controlFd); ctxt->controlFd = -1; - ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; + ctxt->controlFd = INVALID_SOCKET; return(-1); } @@ -1270,7 +1271,7 @@ xmlNanoFTPCwd(void *ctx, const char *directory) { int len; int res; - if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1); + if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1); if (directory == NULL) return 0; /* @@ -1319,7 +1320,7 @@ xmlNanoFTPDele(void *ctx, const char *file) { int len; int res; - if ((ctxt == NULL) || (ctxt->controlFd < 0) || (file == NULL)) return(-1); + if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET) || (file == NULL)) return(-1); if (file == NULL) return (0); /* @@ -1362,7 +1363,7 @@ xmlNanoFTPDele(void *ctx, const char *file) { * Returns -1 incase of error, 0 otherwise */ -int +SOCKET xmlNanoFTPGetConnection(void *ctx) { xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx; char buf[200], *cur; @@ -1377,7 +1378,7 @@ xmlNanoFTPGetConnection(void *ctx) { #endif XML_SOCKLEN_T dataAddrLen; - if (ctxt == NULL) return(-1); + if (ctxt == NULL) return INVALID_SOCKET; memset (&dataAddr, 0, sizeof(dataAddr)); #ifdef SUPPORT_IP6 @@ -1393,9 +1394,9 @@ xmlNanoFTPGetConnection(void *ctx) { dataAddrLen = sizeof (struct sockaddr_in); } - if (ctxt->dataFd < 0) { + if (ctxt->dataFd == INVALID_SOCKET) { __xmlIOErr(XML_FROM_FTP, 0, "socket failed"); - return (-1); + return INVALID_SOCKET; } if (ctxt->passive) { @@ -1412,19 +1413,19 @@ xmlNanoFTPGetConnection(void *ctx) { res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(res); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } res = xmlNanoFTPReadResponse(ctx); if (res != 2) { if (res == 5) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(-1); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } else { /* * retry with an active connection */ - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; ctxt->passive = 0; } } @@ -1435,10 +1436,10 @@ xmlNanoFTPGetConnection(void *ctx) { if (sscanf (cur, "%u", &temp[0]) != 1) { __xmlIOErr(XML_FROM_FTP, XML_FTP_EPSV_ANSWER, "Invalid answer to EPSV\n"); - if (ctxt->dataFd != -1) { - closesocket (ctxt->dataFd); ctxt->dataFd = -1; + if (ctxt->dataFd != INVALID_SOCKET) { + closesocket (ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; } - return (-1); + return INVALID_SOCKET; } memcpy (&((struct sockaddr_in6 *)&dataAddr)->sin6_addr, &((struct sockaddr_in6 *)&ctxt->ftpAddr)->sin6_addr, sizeof(struct in6_addr)); ((struct sockaddr_in6 *)&dataAddr)->sin6_port = htons (temp[0]); @@ -1450,10 +1451,10 @@ xmlNanoFTPGetConnection(void *ctx) { &temp[3], &temp[4], &temp[5]) != 6) { __xmlIOErr(XML_FROM_FTP, XML_FTP_PASV_ANSWER, "Invalid answer to PASV\n"); - if (ctxt->dataFd != -1) { - closesocket (ctxt->dataFd); ctxt->dataFd = -1; + if (ctxt->dataFd != INVALID_SOCKET) { + closesocket (ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; } - return (-1); + return INVALID_SOCKET; } for (i=0; i<6; i++) ad[i] = (unsigned char) (temp[i] & 0xff); memcpy (&((struct sockaddr_in *)&dataAddr)->sin_addr, &ad[0], 4); @@ -1462,8 +1463,8 @@ xmlNanoFTPGetConnection(void *ctx) { if (connect(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) { __xmlIOErr(XML_FROM_FTP, 0, "Failed to create a data connection"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return (-1); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } } else { getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen); @@ -1476,15 +1477,15 @@ xmlNanoFTPGetConnection(void *ctx) { if (bind(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) { __xmlIOErr(XML_FROM_FTP, 0, "bind failed"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return (-1); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen); if (listen(ctxt->dataFd, 1) < 0) { __xmlIOErr(XML_FROM_FTP, 0, "listen failed"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return (-1); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } #ifdef SUPPORT_IP6 if ((ctxt->ftpAddr).ss_family == AF_INET6) { @@ -1513,13 +1514,13 @@ xmlNanoFTPGetConnection(void *ctx) { res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(res); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } res = xmlNanoFTPGetResponse(ctxt); if (res != 2) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(-1); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } } return(ctxt->dataFd); @@ -1542,9 +1543,9 @@ xmlNanoFTPCloseConnection(void *ctx) { fd_set rfd, efd; struct timeval tv; - if ((ctxt == NULL) || (ctxt->controlFd < 0)) return(-1); + if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; tv.tv_sec = 15; tv.tv_usec = 0; FD_ZERO(&rfd); @@ -1556,7 +1557,7 @@ xmlNanoFTPCloseConnection(void *ctx) { #ifdef DEBUG_FTP perror("select"); #endif - closesocket(ctxt->controlFd); ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; return(-1); } if (res == 0) { @@ -1564,11 +1565,11 @@ xmlNanoFTPCloseConnection(void *ctx) { xmlGenericError(xmlGenericErrorContext, "xmlNanoFTPCloseConnection: timeout\n"); #endif - closesocket(ctxt->controlFd); ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; } else { res = xmlNanoFTPGetResponse(ctxt); if (res != 2) { - closesocket(ctxt->controlFd); ctxt->controlFd = -1; + closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET; return(-1); } } @@ -1729,7 +1730,7 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, if (xmlNanoFTPCwd(ctxt, ctxt->path) < 1) return(-1); ctxt->dataFd = xmlNanoFTPGetConnection(ctxt); - if (ctxt->dataFd == -1) + if (ctxt->dataFd == INVALID_SOCKET) return(-1); snprintf(buf, sizeof(buf), "LIST -L\r\n"); } else { @@ -1738,7 +1739,7 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, return(-1); } ctxt->dataFd = xmlNanoFTPGetConnection(ctxt); - if (ctxt->dataFd == -1) + if (ctxt->dataFd == INVALID_SOCKET) return(-1); snprintf(buf, sizeof(buf), "LIST -L %s\r\n", filename); } @@ -1750,12 +1751,12 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; return(res); } res = xmlNanoFTPReadResponse(ctxt); if (res != 1) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; return(-res); } @@ -1771,18 +1772,18 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, #ifdef DEBUG_FTP perror("select"); #endif - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; return(-1); } if (res == 0) { res = xmlNanoFTPCheckResponse(ctxt); if (res < 0) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + ctxt->dataFd = INVALID_SOCKET; return(-1); } if (res == 2) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; return(0); } @@ -1791,8 +1792,8 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, if ((len = recv(ctxt->dataFd, &buf[indx], sizeof(buf) - (indx + 1), 0)) < 0) { __xmlIOErr(XML_FROM_FTP, 0, "recv"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + ctxt->dataFd = INVALID_SOCKET; return(-1); } #ifdef DEBUG_FTP @@ -1824,18 +1825,18 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, */ -int +SOCKET xmlNanoFTPGetSocket(void *ctx, const char *filename) { xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx; char buf[300]; int res, len; if (ctx == NULL) - return(-1); + return INVALID_SOCKET; if ((filename == NULL) && (ctxt->path == NULL)) - return(-1); + return INVALID_SOCKET; ctxt->dataFd = xmlNanoFTPGetConnection(ctxt); - if (ctxt->dataFd == -1) - return(-1); + if (ctxt->dataFd == INVALID_SOCKET) + return INVALID_SOCKET; snprintf(buf, sizeof(buf), "TYPE I\r\n"); len = strlen(buf); @@ -1845,13 +1846,13 @@ xmlNanoFTPGetSocket(void *ctx, const char *filename) { res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(res); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } res = xmlNanoFTPReadResponse(ctxt); if (res != 2) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(-res); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } if (filename == NULL) snprintf(buf, sizeof(buf), "RETR %s\r\n", ctxt->path); @@ -1865,13 +1866,13 @@ xmlNanoFTPGetSocket(void *ctx, const char *filename) { res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { __xmlIOErr(XML_FROM_FTP, 0, "send failed"); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(res); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } res = xmlNanoFTPReadResponse(ctxt); if (res != 1) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - return(-res); + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + return INVALID_SOCKET; } return(ctxt->dataFd); } @@ -1903,7 +1904,7 @@ xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData, return(-1); if (callback == NULL) return(-1); - if (xmlNanoFTPGetSocket(ctxt, filename) < 0) + if (xmlNanoFTPGetSocket(ctxt, filename) == INVALID_SOCKET) return(-1); do { @@ -1916,18 +1917,18 @@ xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData, #ifdef DEBUG_FTP perror("select"); #endif - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; return(-1); } if (res == 0) { res = xmlNanoFTPCheckResponse(ctxt); if (res < 0) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; - ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; + ctxt->dataFd = INVALID_SOCKET; return(-1); } if (res == 2) { - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; return(0); } @@ -1936,7 +1937,7 @@ xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData, if ((len = recv(ctxt->dataFd, buf, sizeof(buf), 0)) < 0) { __xmlIOErr(XML_FROM_FTP, 0, "recv failed"); callback(userData, buf, len); - closesocket(ctxt->dataFd); ctxt->dataFd = -1; + closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; return(-1); } callback(userData, buf, len); @@ -1962,7 +1963,7 @@ xmlNanoFTPRead(void *ctx, void *dest, int len) { xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx; if (ctx == NULL) return(-1); - if (ctxt->dataFd < 0) return(0); + if (ctxt->dataFd == INVALID_SOCKET) return(0); if (dest == NULL) return(-1); if (len <= 0) return(0); @@ -1990,7 +1991,7 @@ xmlNanoFTPRead(void *ctx, void *dest, int len) { void* xmlNanoFTPOpen(const char *URL) { xmlNanoFTPCtxtPtr ctxt; - int sock; + SOCKET sock; xmlNanoFTPInit(); if (URL == NULL) return(NULL); @@ -2003,7 +2004,7 @@ xmlNanoFTPOpen(const char *URL) { return(NULL); } sock = xmlNanoFTPGetSocket(ctxt, ctxt->path); - if (sock < 0) { + if (sock == INVALID_SOCKET) { xmlNanoFTPFreeCtxt(ctxt); return(NULL); } @@ -2026,14 +2027,14 @@ xmlNanoFTPClose(void *ctx) { if (ctxt == NULL) return(-1); - if (ctxt->dataFd >= 0) { + if (ctxt->dataFd != INVALID_SOCKET) { closesocket(ctxt->dataFd); - ctxt->dataFd = -1; + ctxt->dataFd = INVALID_SOCKET; } - if (ctxt->controlFd >= 0) { + if (ctxt->controlFd != INVALID_SOCKET) { xmlNanoFTPQuit(ctxt); closesocket(ctxt->controlFd); - ctxt->controlFd = -1; + ctxt->controlFd = INVALID_SOCKET; } xmlNanoFTPFreeCtxt(ctxt); return(0); diff --git a/lib/3rdparty/libxml2/nanohttp.c b/lib/3rdparty/libxml2/nanohttp.c index 542c4eac943..f6694575328 100644 --- a/lib/3rdparty/libxml2/nanohttp.c +++ b/lib/3rdparty/libxml2/nanohttp.c @@ -75,18 +75,18 @@ #ifdef VMS #include #define XML_SOCKLEN_T unsigned int -#define SOCKET int #endif #if defined(__MINGW32__) || defined(_WIN32_WCE) +#ifndef _WINSOCKAPI_ #define _WINSOCKAPI_ +#endif #include #include #undef XML_SOCKLEN_T #define XML_SOCKLEN_T unsigned int #endif - #include #include #include @@ -103,6 +103,7 @@ #define closesocket(s) close(s) #endif #define SOCKET int +#define INVALID_SOCKET (-1) #endif #ifdef __BEOS__ @@ -114,9 +115,6 @@ #ifndef XML_SOCKLEN_T #define XML_SOCKLEN_T unsigned int #endif -#ifndef SOCKET -#define SOCKET int -#endif #ifdef STANDALONE #define DEBUG_HTTP @@ -196,10 +194,10 @@ static int socket_errno(void) { #ifdef SUPPORT_IP6 static int have_ipv6(void) { - int s; + SOCKET s; s = socket (AF_INET6, SOCK_STREAM, 0); - if (s != -1) { + if (s != INVALID_SOCKET) { close (s); return (1); } @@ -393,7 +391,7 @@ xmlNanoHTTPNewCtxt(const char *URL) { memset(ret, 0, sizeof(xmlNanoHTTPCtxt)); ret->port = 80; ret->returnValue = 0; - ret->fd = -1; + ret->fd = INVALID_SOCKET; ret->ContentLength = -1; xmlNanoHTTPScanURL(ret, URL); @@ -430,8 +428,8 @@ xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) { #endif ctxt->state = XML_NANO_HTTP_NONE; - if (ctxt->fd >= 0) closesocket(ctxt->fd); - ctxt->fd = -1; + if (ctxt->fd != INVALID_SOCKET) closesocket(ctxt->fd); + ctxt->fd = INVALID_SOCKET; xmlFree(ctxt); } @@ -842,7 +840,7 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { * Returns -1 in case of failure, the file descriptor number otherwise */ -static int +static SOCKET xmlNanoHTTPConnectAttempt(struct sockaddr *addr) { #ifndef HAVE_POLL_H @@ -870,12 +868,12 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); addrlen = sizeof(struct sockaddr_in); } - if (s == -1) { + if (s == INVALID_SOCKET) { #ifdef DEBUG_HTTP perror("socket"); #endif __xmlIOErr(XML_FROM_HTTP, 0, "socket failed\n"); - return (-1); + return INVALID_SOCKET; } #ifdef _WINSOCKAPI_ { @@ -916,7 +914,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) #endif __xmlIOErr(XML_FROM_HTTP, 0, "error setting non-blocking IO\n"); closesocket(s); - return (-1); + return INVALID_SOCKET; } #endif /* !__BEOS__ */ #endif /* !VMS */ @@ -931,7 +929,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) __xmlIOErr(XML_FROM_HTTP, 0, "error connecting to HTTP server"); closesocket(s); - return (-1); + return INVALID_SOCKET; } } #ifndef HAVE_POLL_H @@ -944,7 +942,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) #endif #ifndef _WINSOCKAPI_ if (s > FD_SETSIZE) - return -1; + return INVALID_SOCKET; #endif FD_ZERO(&wfd); FD_SET(s, &wfd); @@ -972,12 +970,12 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) /* Time out */ __xmlIOErr(XML_FROM_HTTP, 0, "Connect attempt timed out"); closesocket(s); - return (-1); + return INVALID_SOCKET; case -1: /* Ermm.. ?? */ __xmlIOErr(XML_FROM_HTTP, 0, "Connect failed"); closesocket(s); - return (-1); + return INVALID_SOCKET; } #ifndef HAVE_POLL_H @@ -998,7 +996,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) 0) { /* Solaris error code */ __xmlIOErr(XML_FROM_HTTP, 0, "getsockopt failed\n"); - return (-1); + return INVALID_SOCKET; } #endif if (status) { @@ -1006,13 +1004,13 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) "Error connecting to remote host"); closesocket(s); errno = status; - return (-1); + return INVALID_SOCKET; } } else { /* pbm */ __xmlIOErr(XML_FROM_HTTP, 0, "select failed\n"); closesocket(s); - return (-1); + return INVALID_SOCKET; } return (s); @@ -1029,7 +1027,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) * Returns -1 in case of failure, the file descriptor number otherwise */ -static int +static SOCKET xmlNanoHTTPConnectHost(const char *host, int port) { struct hostent *h; @@ -1042,7 +1040,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) struct sockaddr_in6 sockin6; #endif int i; - int s; + SOCKET s; memset (&sockin, 0, sizeof(sockin)); #ifdef SUPPORT_IP6 @@ -1073,7 +1071,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) status = getaddrinfo (host, NULL, &hints, &result); if (status) { __xmlIOErr(XML_FROM_HTTP, 0, "getaddrinfo failed\n"); - return (-1); + return INVALID_SOCKET; } for (res = result; res; res = res->ai_next) { @@ -1081,7 +1079,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) if (res->ai_addrlen > sizeof(sockin)) { __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); freeaddrinfo (result); - return (-1); + return INVALID_SOCKET; } memcpy (&sockin, res->ai_addr, res->ai_addrlen); sockin.sin_port = htons (port); @@ -1091,7 +1089,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) if (res->ai_addrlen > sizeof(sockin6)) { __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); freeaddrinfo (result); - return (-1); + return INVALID_SOCKET; } memcpy (&sockin6, res->ai_addr, res->ai_addrlen); sockin6.sin6_port = htons (port); @@ -1101,7 +1099,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) continue; /* for */ s = xmlNanoHTTPConnectAttempt (addr); - if (s != -1) { + if (s != INVALID_SOCKET) { freeaddrinfo (result); return (s); } @@ -1155,7 +1153,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) #else __xmlIOErr(XML_FROM_HTTP, 0, "Failed to resolve host"); #endif - return (-1); + return INVALID_SOCKET; } for (i = 0; h->h_addr_list[i]; i++) { @@ -1163,7 +1161,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) /* A records (IPv4) */ if ((unsigned int) h->h_length > sizeof(ia)) { __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); - return (-1); + return INVALID_SOCKET; } memcpy (&ia, h->h_addr_list[i], h->h_length); sockin.sin_family = h->h_addrtype; @@ -1175,7 +1173,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) /* AAAA records (IPv6) */ if ((unsigned int) h->h_length > sizeof(ia6)) { __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); - return (-1); + return INVALID_SOCKET; } memcpy (&ia6, h->h_addr_list[i], h->h_length); sockin6.sin6_family = h->h_addrtype; @@ -1187,7 +1185,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) break; /* for */ s = xmlNanoHTTPConnectAttempt (addr); - if (s != -1) + if (s != INVALID_SOCKET) return (s); } } @@ -1198,7 +1196,7 @@ xmlNanoHTTPConnectHost(const char *host, int port) "xmlNanoHTTPConnectHost: unable to connect to '%s'.\n", host); #endif - return (-1); + return INVALID_SOCKET; } @@ -1342,7 +1340,8 @@ xmlNanoHTTPMethodRedir(const char *URL, const char *method, const char *input, const char *headers, int ilen ) { xmlNanoHTTPCtxtPtr ctxt; char *bp, *p; - int blen, ret; + int blen; + SOCKET ret; int nbRedirects = 0; char *redirURL = NULL; #ifdef DEBUG_HTTP @@ -1386,7 +1385,7 @@ retry: blen = strlen(ctxt->hostname); ret = xmlNanoHTTPConnectHost(ctxt->hostname, ctxt->port); } - if (ret < 0) { + if (ret == INVALID_SOCKET) { xmlNanoHTTPFreeCtxt(ctxt); if (redirURL != NULL) xmlFree(redirURL); return(NULL); diff --git a/lib/3rdparty/libxml2/parser.c b/lib/3rdparty/libxml2/parser.c index 85e759969a1..d1c7888a9fc 100644 --- a/lib/3rdparty/libxml2/parser.c +++ b/lib/3rdparty/libxml2/parser.c @@ -953,6 +953,12 @@ xmlHasFeature(xmlFeature feature) return(1); #else return(0); +#endif + case XML_WITH_ICU: +#ifdef LIBXML_ICU_ENABLED + return(1); +#else + return(0); #endif default: break; @@ -1297,60 +1303,182 @@ xmlCleanSpecialAttr(xmlParserCtxtPtr ctxt) * [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ * [38] Subcode ::= ([a-z] | [A-Z])+ * + * The current REC reference the sucessors of RFC 1766, currently 5646 + * + * http://www.rfc-editor.org/rfc/rfc5646.txt + * langtag = language + * ["-" script] + * ["-" region] + * *("-" variant) + * *("-" extension) + * ["-" privateuse] + * language = 2*3ALPHA ; shortest ISO 639 code + * ["-" extlang] ; sometimes followed by + * ; extended language subtags + * / 4ALPHA ; or reserved for future use + * / 5*8ALPHA ; or registered language subtag + * + * extlang = 3ALPHA ; selected ISO 639 codes + * *2("-" 3ALPHA) ; permanently reserved + * + * script = 4ALPHA ; ISO 15924 code + * + * region = 2ALPHA ; ISO 3166-1 code + * / 3DIGIT ; UN M.49 code + * + * variant = 5*8alphanum ; registered variants + * / (DIGIT 3alphanum) + * + * extension = singleton 1*("-" (2*8alphanum)) + * + * ; Single alphanumerics + * ; "x" reserved for private use + * singleton = DIGIT ; 0 - 9 + * / %x41-57 ; A - W + * / %x59-5A ; Y - Z + * / %x61-77 ; a - w + * / %x79-7A ; y - z + * + * it sounds right to still allow Irregular i-xxx IANA and user codes too + * The parser below doesn't try to cope with extension or privateuse + * that could be added but that's not interoperable anyway + * * Returns 1 if correct 0 otherwise **/ int xmlCheckLanguageID(const xmlChar * lang) { - const xmlChar *cur = lang; + const xmlChar *cur = lang, *nxt; if (cur == NULL) return (0); if (((cur[0] == 'i') && (cur[1] == '-')) || - ((cur[0] == 'I') && (cur[1] == '-'))) { + ((cur[0] == 'I') && (cur[1] == '-')) || + ((cur[0] == 'x') && (cur[1] == '-')) || + ((cur[0] == 'X') && (cur[1] == '-'))) { /* - * IANA code + * Still allow IANA code and user code which were coming + * from the previous version of the XML-1.0 specification + * it's deprecated but we should not fail */ cur += 2; - while (((cur[0] >= 'A') && (cur[0] <= 'Z')) || /* non input consuming */ - ((cur[0] >= 'a') && (cur[0] <= 'z'))) - cur++; - } else if (((cur[0] == 'x') && (cur[1] == '-')) || - ((cur[0] == 'X') && (cur[1] == '-'))) { - /* - * User code - */ - cur += 2; - while (((cur[0] >= 'A') && (cur[0] <= 'Z')) || /* non input consuming */ - ((cur[0] >= 'a') && (cur[0] <= 'z'))) - cur++; - } else if (((cur[0] >= 'A') && (cur[0] <= 'Z')) || - ((cur[0] >= 'a') && (cur[0] <= 'z'))) { - /* - * ISO639 - */ - cur++; - if (((cur[0] >= 'A') && (cur[0] <= 'Z')) || - ((cur[0] >= 'a') && (cur[0] <= 'z'))) - cur++; - else - return (0); - } else - return (0); - while (cur[0] != 0) { /* non input consuming */ - if (cur[0] != '-') - return (0); - cur++; - if (((cur[0] >= 'A') && (cur[0] <= 'Z')) || - ((cur[0] >= 'a') && (cur[0] <= 'z'))) - cur++; - else - return (0); - while (((cur[0] >= 'A') && (cur[0] <= 'Z')) || /* non input consuming */ + while (((cur[0] >= 'A') && (cur[0] <= 'Z')) || ((cur[0] >= 'a') && (cur[0] <= 'z'))) cur++; + return(cur[0] == 0); } + nxt = cur; + while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) || + ((nxt[0] >= 'a') && (nxt[0] <= 'z'))) + nxt++; + if (nxt - cur >= 4) { + /* + * Reserved + */ + if ((nxt - cur > 8) || (nxt[0] != 0)) + return(0); + return(1); + } + if (nxt - cur < 2) + return(0); + /* we got an ISO 639 code */ + if (nxt[0] == 0) + return(1); + if (nxt[0] != '-') + return(0); + + nxt++; + cur = nxt; + /* now we can have extlang or script or region or variant */ + if ((nxt[0] >= '0') && (nxt[0] <= '9')) + goto region_m49; + + while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) || + ((nxt[0] >= 'a') && (nxt[0] <= 'z'))) + nxt++; + if (nxt - cur == 4) + goto script; + if (nxt - cur == 2) + goto region; + if ((nxt - cur >= 5) && (nxt - cur <= 8)) + goto variant; + if (nxt - cur != 3) + return(0); + /* we parsed an extlang */ + if (nxt[0] == 0) + return(1); + if (nxt[0] != '-') + return(0); + + nxt++; + cur = nxt; + /* now we can have script or region or variant */ + if ((nxt[0] >= '0') && (nxt[0] <= '9')) + goto region_m49; + + while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) || + ((nxt[0] >= 'a') && (nxt[0] <= 'z'))) + nxt++; + if (nxt - cur == 2) + goto region; + if ((nxt - cur >= 5) && (nxt - cur <= 8)) + goto variant; + if (nxt - cur != 4) + return(0); + /* we parsed a script */ +script: + if (nxt[0] == 0) + return(1); + if (nxt[0] != '-') + return(0); + + nxt++; + cur = nxt; + /* now we can have region or variant */ + if ((nxt[0] >= '0') && (nxt[0] <= '9')) + goto region_m49; + + while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) || + ((nxt[0] >= 'a') && (nxt[0] <= 'z'))) + nxt++; + + if ((nxt - cur >= 5) && (nxt - cur <= 8)) + goto variant; + if (nxt - cur != 2) + return(0); + /* we parsed a region */ +region: + if (nxt[0] == 0) + return(1); + if (nxt[0] != '-') + return(0); + + nxt++; + cur = nxt; + /* now we can just have a variant */ + while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) || + ((nxt[0] >= 'a') && (nxt[0] <= 'z'))) + nxt++; + + if ((nxt - cur < 5) || (nxt - cur > 8)) + return(0); + + /* we parsed a variant */ +variant: + if (nxt[0] == 0) + return(1); + if (nxt[0] != '-') + return(0); + /* extensions and private use subtags not checked */ return (1); + +region_m49: + if (((nxt[1] >= '0') && (nxt[1] <= '9')) && + ((nxt[2] >= '0') && (nxt[2] <= '9'))) { + nxt += 3; + goto region; + } + return(0); } /************************************************************************ @@ -6609,7 +6737,7 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, xmlDetectSAX2(ctxt); GROW; - if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) && + if ((ctxt->encoding == NULL) && (ctxt->input->end - ctxt->input->cur >= 4)) { xmlChar start[4]; xmlCharEncoding enc; @@ -10105,7 +10233,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator); - if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) && + if ((ctxt->encoding == NULL) && ((ctxt->input->end - ctxt->input->cur) >= 4)) { /* * Get the 4 first bytes and decode the charset @@ -11567,7 +11695,7 @@ xmldecl_done: * if size is greater than len. Otherwise, memmove in xmlBufferAdd * will blindly copy extra bytes from memory. */ - if (size > len) { + if ((unsigned int) size > len) { remain = size - len; size = len; } else { @@ -14004,8 +14132,8 @@ xmlInitParser(void) { __xmlGlobalInitMutexLock(); if (xmlParserInitialized == 0) { #endif - xmlInitGlobals(); xmlInitThreads(); + xmlInitGlobals(); if ((xmlGenericError == xmlGenericErrorDefaultFunc) || (xmlGenericError == NULL)) initGenericErrorDefaultFunc(NULL); diff --git a/lib/3rdparty/libxml2/testapi.c b/lib/3rdparty/libxml2/testapi.c index da6ce1bcd1c..df14820aa18 100644 --- a/lib/3rdparty/libxml2/testapi.c +++ b/lib/3rdparty/libxml2/testapi.c @@ -11639,32 +11639,8 @@ static int test_xmlNanoFTPGetConnection(void) { int test_ret = 0; -#if defined(LIBXML_FTP_ENABLED) - int mem_base; - int ret_val; - void * ctx; /* an FTP context */ - int n_ctx; - - for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) { - mem_base = xmlMemBlocks(); - ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0); - - ret_val = xmlNanoFTPGetConnection(ctx); - desret_int(ret_val); - call_tests++; - des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0); - xmlResetLastError(); - if (mem_base != xmlMemBlocks()) { - printf("Leak of %d blocks found in xmlNanoFTPGetConnection", - xmlMemBlocks() - mem_base); - test_ret++; - printf(" %d", n_ctx); - printf("\n"); - } - } - function_tests++; -#endif + /* missing type support */ return(test_ret); } @@ -11707,39 +11683,8 @@ static int test_xmlNanoFTPGetSocket(void) { int test_ret = 0; -#if defined(LIBXML_FTP_ENABLED) - int mem_base; - int ret_val; - void * ctx; /* an FTP context */ - int n_ctx; - const char * filename; /* the file to retrieve (or NULL if path is in context). */ - int n_filename; - - for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) { - for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) { - mem_base = xmlMemBlocks(); - ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0); - filename = gen_filepath(n_filename, 1); - - ret_val = xmlNanoFTPGetSocket(ctx, filename); - desret_int(ret_val); - call_tests++; - des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0); - des_filepath(n_filename, filename, 1); - xmlResetLastError(); - if (mem_base != xmlMemBlocks()) { - printf("Leak of %d blocks found in xmlNanoFTPGetSocket", - xmlMemBlocks() - mem_base); - test_ret++; - printf(" %d", n_ctx); - printf(" %d", n_filename); - printf("\n"); - } - } - } - function_tests++; -#endif + /* missing type support */ return(test_ret); } @@ -12043,7 +11988,7 @@ static int test_nanoftp(void) { int test_ret = 0; - if (quiet == 0) printf("Testing nanoftp : 16 of 22 functions ...\n"); + if (quiet == 0) printf("Testing nanoftp : 14 of 22 functions ...\n"); test_ret += test_xmlNanoFTPCheckResponse(); test_ret += test_xmlNanoFTPCleanup(); test_ret += test_xmlNanoFTPCloseConnection(); diff --git a/lib/3rdparty/libxml2/threads.c b/lib/3rdparty/libxml2/threads.c index 98fd2c23f2e..1eeac0e1765 100644 --- a/lib/3rdparty/libxml2/threads.c +++ b/lib/3rdparty/libxml2/threads.c @@ -439,7 +439,8 @@ __xmlGlobalInitMutexLock(void) /* Make sure the global init lock is initialized and then lock it. */ #ifdef HAVE_PTHREAD_H /* The mutex is statically initialized, so we just lock it. */ - pthread_mutex_lock(&global_init_lock); + if (pthread_mutex_lock) + pthread_mutex_lock(&global_init_lock); #elif defined HAVE_WIN32_THREADS LPCRITICAL_SECTION cs; @@ -508,7 +509,8 @@ void __xmlGlobalInitMutexUnlock(void) { #ifdef HAVE_PTHREAD_H - pthread_mutex_unlock(&global_init_lock); + if (pthread_mutex_unlock) + pthread_mutex_unlock(&global_init_lock); #elif defined HAVE_WIN32_THREADS if (global_init_lock != NULL) { LeaveCriticalSection(global_init_lock); diff --git a/lib/3rdparty/libxml2/tree.c b/lib/3rdparty/libxml2/tree.c index 1e1a23a10e7..24db82af787 100644 --- a/lib/3rdparty/libxml2/tree.c +++ b/lib/3rdparty/libxml2/tree.c @@ -721,8 +721,19 @@ xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix) { if ((node != NULL) && (node->type != XML_ELEMENT_NODE)) return(NULL); - if ((prefix != NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) - return(NULL); + if ((prefix != NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) { + /* xml namespace is predefined, no need to add it */ + if (xmlStrEqual(href, XML_XML_NAMESPACE)) + return(NULL); + + /* + * Problem, this is an attempt to bind xml prefix to a wrong + * namespace, which breaks + * Namespace constraint: Reserved Prefixes and Namespace Names + * from XML namespace. But documents authors may not care in + * their context so let's proceed. + */ + } /* * Allocate a new Namespace and fill the fields. diff --git a/lib/3rdparty/libxml2/uri.c b/lib/3rdparty/libxml2/uri.c index 950e177bd62..1ae5768b537 100644 --- a/lib/3rdparty/libxml2/uri.c +++ b/lib/3rdparty/libxml2/uri.c @@ -127,7 +127,7 @@ static void xmlCleanURI(xmlURIPtr uri); (((*(p) == '!')) || ((*(p) == '$')) || ((*(p) == '&')) || \ ((*(p) == '(')) || ((*(p) == ')')) || ((*(p) == '*')) || \ ((*(p) == '+')) || ((*(p) == ',')) || ((*(p) == ';')) || \ - ((*(p) == '='))) + ((*(p) == '=')) || ((*(p) == '\''))) /* * gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" diff --git a/lib/3rdparty/libxml2/xmllint.c b/lib/3rdparty/libxml2/xmllint.c index 2a75e3bd53d..b7af32f090f 100644 --- a/lib/3rdparty/libxml2/xmllint.c +++ b/lib/3rdparty/libxml2/xmllint.c @@ -162,6 +162,9 @@ static int html = 0; static int xmlout = 0; #endif static int htmlout = 0; +#if defined(LIBXML_HTML_ENABLED) +static int nodefdtd = 0; +#endif #ifdef LIBXML_PUSH_ENABLED static int push = 0; #endif /* LIBXML_PUSH_ENABLED */ @@ -2507,14 +2510,14 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { htmlSaveFile(output ? output : "-", doc); } else if (encoding != NULL) { - if ( format ) { + if (format == 1) { htmlSaveFileFormat(output ? output : "-", doc, encoding, 1); } else { htmlSaveFileFormat(output ? output : "-", doc, encoding, 0); } } - else if (format) { + else if (format == 1) { htmlSaveFileFormat(output ? output : "-", doc, NULL, 1); } else { @@ -2586,13 +2589,13 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { int len; if (encoding != NULL) { - if ( format ) { + if (format == 1) { xmlDocDumpFormatMemoryEnc(doc, &result, &len, encoding, 1); } else { xmlDocDumpMemoryEnc(doc, &result, &len, encoding); } } else { - if (format) + if (format == 1) xmlDocDumpFormatMemory(doc, &result, &len, 1); else xmlDocDumpMemory(doc, &result, &len); @@ -2611,7 +2614,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { xmlSaveFile(output ? output : "-", doc); } else if (oldout) { if (encoding != NULL) { - if ( format ) { + if (format == 1) { ret = xmlSaveFormatFileEnc(output ? output : "-", doc, encoding, 1); } @@ -2624,7 +2627,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { output ? output : "-"); progresult = XMLLINT_ERR_OUT; } - } else if (format) { + } else if (format == 1) { ret = xmlSaveFormatFile(output ? output : "-", doc, 1); if (ret < 0) { fprintf(stderr, "failed save to %s\n", @@ -2653,8 +2656,10 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) { xmlSaveCtxtPtr ctxt; int saveOpts = 0; - if (format) + if (format == 1) saveOpts |= XML_SAVE_FORMAT; + else if (format == 2) + saveOpts |= XML_SAVE_WSNONSIG; #if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED) if (xmlout) @@ -2995,6 +3000,7 @@ static void usage(const char *name) { #ifdef LIBXML_HTML_ENABLED printf("\t--html : use the HTML parser\n"); printf("\t--xmlout : force to use the XML serializer when using --html\n"); + printf("\t--nodefdtd : do not default HTML doctype\n"); #endif #ifdef LIBXML_PUSH_ENABLED printf("\t--push : use the push mode of the parser\n"); @@ -3010,6 +3016,10 @@ static void usage(const char *name) { printf("\t--format : reformat/reindent the input\n"); printf("\t--encode encoding : output in the given encoding\n"); printf("\t--dropdtd : remove the DOCTYPE of the input docs\n"); + printf("\t--pretty STYLE : pretty-print in a particular style\n"); + printf("\t 0 Do not pretty print\n"); + printf("\t 1 Format the XML content, as --format\n"); + printf("\t 2 Add whitespace inside tags, preserving content\n"); #endif /* LIBXML_OUTPUT_ENABLED */ printf("\t--c14n : save in W3C canonical format v1.0 (with comments)\n"); printf("\t--c14n11 : save in W3C canonical format v1.1 (with comments)\n"); @@ -3157,6 +3167,10 @@ main(int argc, char **argv) { else if ((!strcmp(argv[i], "-xmlout")) || (!strcmp(argv[i], "--xmlout"))) { xmlout++; + } else if ((!strcmp(argv[i], "-nodefdtd")) || + (!strcmp(argv[i], "--nodefdtd"))) { + nodefdtd++; + options |= HTML_PARSE_NODEFDTD; } #endif /* LIBXML_HTML_ENABLED */ else if ((!strcmp(argv[i], "-loaddtd")) || @@ -3326,10 +3340,21 @@ main(int argc, char **argv) { (!strcmp(argv[i], "--format"))) { noblanks++; #ifdef LIBXML_OUTPUT_ENABLED - format++; + format = 1; #endif /* LIBXML_OUTPUT_ENABLED */ xmlKeepBlanksDefault(0); } + else if ((!strcmp(argv[i], "-pretty")) || + (!strcmp(argv[i], "--pretty"))) { + i++; +#ifdef LIBXML_OUTPUT_ENABLED + format = atoi(argv[i]); +#endif /* LIBXML_OUTPUT_ENABLED */ + if (format == 1) { + noblanks++; + xmlKeepBlanksDefault(0); + } + } #ifdef LIBXML_READER_ENABLED else if ((!strcmp(argv[i], "-stream")) || (!strcmp(argv[i], "--stream"))) { @@ -3616,6 +3641,11 @@ main(int argc, char **argv) { i++; continue; } + if ((!strcmp(argv[i], "-pretty")) || + (!strcmp(argv[i], "--pretty"))) { + i++; + continue; + } if ((!strcmp(argv[i], "-schema")) || (!strcmp(argv[i], "--schema"))) { i++; diff --git a/lib/3rdparty/libxml2/xmlreader.c b/lib/3rdparty/libxml2/xmlreader.c index c2afac7f1cb..97c71abbf39 100644 --- a/lib/3rdparty/libxml2/xmlreader.c +++ b/lib/3rdparty/libxml2/xmlreader.c @@ -1709,9 +1709,9 @@ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) * * Reads the contents of the current node, including child nodes and markup. * - * Returns a string containing the XML content, or NULL if the current node - * is neither an element nor attribute, or has no child nodes. The - * string must be deallocated by the caller. + * Returns a string containing the node and any XML content, or NULL if the + * current node cannot be serialized. The string must be deallocated + * by the caller. */ xmlChar * xmlTextReaderReadOuterXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) @@ -1726,7 +1726,11 @@ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) if (xmlTextReaderExpand(reader) == NULL) { return NULL; } - node = xmlDocCopyNode(node, doc, 1); + if (node->type == XML_DTD_NODE) { + node = (xmlNodePtr) xmlCopyDtd((xmlDtdPtr) node); + } else { + node = xmlDocCopyNode(node, doc, 1); + } buff = xmlBufferCreate(); if (xmlNodeDump(buff, doc, node, 0, 0) == -1) { xmlFreeNode(node); diff --git a/lib/3rdparty/libxml2/xmlsave.c b/lib/3rdparty/libxml2/xmlsave.c index aaa5da8af6d..ddf7143c10b 100644 --- a/lib/3rdparty/libxml2/xmlsave.c +++ b/lib/3rdparty/libxml2/xmlsave.c @@ -408,6 +408,8 @@ xmlNewSaveCtxt(const char *encoding, int options) ret->options = options; if (options & XML_SAVE_FORMAT) ret->format = 1; + else if (options & XML_SAVE_WSNONSIG) + ret->format = 2; return(ret); } @@ -500,32 +502,90 @@ static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur); void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur); static int xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur); +/** + * xmlOutputBufferWriteWSNonSig: + * @ctxt: The save context + * @extra: Number of extra indents to apply to ctxt->level + * + * Write out formatting for non-significant whitespace output. + */ +static void +xmlOutputBufferWriteWSNonSig(xmlSaveCtxtPtr ctxt, int extra) +{ + int i; + if ((ctxt == NULL) || (ctxt->buf == NULL)) + return; + xmlOutputBufferWrite(ctxt->buf, 1, "\n"); + for (i = 0; i < (ctxt->level + extra); i += ctxt->indent_nr) { + xmlOutputBufferWrite(ctxt->buf, ctxt->indent_size * + ((ctxt->level + extra - i) > ctxt->indent_nr ? + ctxt->indent_nr : (ctxt->level + extra - i)), + ctxt->indent); + } +} + /** * xmlNsDumpOutput: * @buf: the XML buffer output * @cur: a namespace + * @ctxt: the output save context. Optional. * * Dump a local Namespace definition. * Should be called in the context of attributes dumps. + * If @ctxt is supplied, @buf should be its buffer. */ static void -xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { +xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) { if ((cur == NULL) || (buf == NULL)) return; if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) { if (xmlStrEqual(cur->prefix, BAD_CAST "xml")) return; + if (ctxt != NULL && ctxt->format == 2) + xmlOutputBufferWriteWSNonSig(ctxt, 2); + else + xmlOutputBufferWrite(buf, 1, " "); + /* Within the context of an element attributes */ if (cur->prefix != NULL) { - xmlOutputBufferWrite(buf, 7, " xmlns:"); + xmlOutputBufferWrite(buf, 6, "xmlns:"); xmlOutputBufferWriteString(buf, (const char *)cur->prefix); } else - xmlOutputBufferWrite(buf, 6, " xmlns"); + xmlOutputBufferWrite(buf, 5, "xmlns"); xmlOutputBufferWrite(buf, 1, "="); xmlBufferWriteQuotedString(buf->buffer, cur->href); } } +/** + * xmlNsDumpOutputCtxt + * @ctxt: the save context + * @cur: a namespace + * + * Dump a local Namespace definition to a save context. + * Should be called in the context of attribute dumps. + */ +static void +xmlNsDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { + xmlNsDumpOutput(ctxt->buf, cur, ctxt); +} + +/** + * xmlNsListDumpOutputCtxt + * @ctxt: the save context + * @cur: the first namespace + * + * Dump a list of local namespace definitions to a save context. + * Should be called in the context of attribute dumps. + */ +static void +xmlNsListDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { + while (cur != NULL) { + xmlNsDumpOutput(ctxt->buf, cur, ctxt); + cur = cur->next; + } +} + /** * xmlNsListDumpOutput: * @buf: the XML buffer output @@ -537,7 +597,7 @@ xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { while (cur != NULL) { - xmlNsDumpOutput(buf, cur); + xmlNsDumpOutput(buf, cur, NULL); cur = cur->next; } } @@ -612,7 +672,10 @@ xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { if (cur == NULL) return; buf = ctxt->buf; if (buf == NULL) return; - xmlOutputBufferWrite(buf, 1, " "); + if (ctxt->format == 2) + xmlOutputBufferWriteWSNonSig(ctxt, 2); + else + xmlOutputBufferWrite(buf, 1, " "); if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); xmlOutputBufferWrite(buf, 1, ":"); @@ -656,7 +719,7 @@ xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { if (cur == NULL) return; buf = ctxt->buf; while (cur != NULL) { - if ((ctxt->format) && (xmlIndentTreeOutput) && + if ((ctxt->format == 1) && (xmlIndentTreeOutput) && ((cur->type == XML_ELEMENT_NODE) || (cur->type == XML_COMMENT_NODE) || (cur->type == XML_PI_NODE))) @@ -665,7 +728,7 @@ xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { ctxt->indent_nr : ctxt->level), ctxt->indent); xmlNodeDumpOutputInternal(ctxt, cur); - if (ctxt->format) { + if (ctxt->format == 1) { xmlOutputBufferWrite(buf, 1, "\n"); } cur = cur->next; @@ -808,13 +871,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { xmlOutputBufferWrite(buf, 2, "name); if (cur->content != NULL) { - xmlOutputBufferWrite(buf, 1, " "); + if (ctxt->format == 2) + xmlOutputBufferWriteWSNonSig(ctxt, 0); + else + xmlOutputBufferWrite(buf, 1, " "); xmlOutputBufferWriteString(buf, (const char *)cur->content); } xmlOutputBufferWrite(buf, 2, "?>"); } else { xmlOutputBufferWrite(buf, 2, "name); + if (ctxt->format == 2) + xmlOutputBufferWriteWSNonSig(ctxt, 0); xmlOutputBufferWrite(buf, 2, "?>"); } return; @@ -862,7 +930,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { return; } if (cur->type == XML_NAMESPACE_DECL) { - xmlNsDumpOutput(buf, (xmlNsPtr) cur); + xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur); return; } @@ -887,26 +955,30 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { xmlOutputBufferWriteString(buf, (const char *)cur->name); if (cur->nsDef) - xmlNsListDumpOutput(buf, cur->nsDef); + xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); if (cur->properties != NULL) xmlAttrListDumpOutput(ctxt, cur->properties); if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) && (cur->children == NULL) && ((ctxt->options & XML_SAVE_NO_EMPTY) == 0)) { + if (ctxt->format == 2) + xmlOutputBufferWriteWSNonSig(ctxt, 0); xmlOutputBufferWrite(buf, 2, "/>"); ctxt->format = format; return; } + if (ctxt->format == 2) + xmlOutputBufferWriteWSNonSig(ctxt, 1); xmlOutputBufferWrite(buf, 1, ">"); if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); } if (cur->children != NULL) { - if (ctxt->format) xmlOutputBufferWrite(buf, 1, "\n"); + if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n"); if (ctxt->level >= 0) ctxt->level++; xmlNodeListDumpOutput(ctxt, cur->children); if (ctxt->level > 0) ctxt->level--; - if ((xmlIndentTreeOutput) && (ctxt->format)) + if ((xmlIndentTreeOutput) && (ctxt->format == 1)) xmlOutputBufferWrite(buf, ctxt->indent_size * (ctxt->level > ctxt->indent_nr ? ctxt->indent_nr : ctxt->level), @@ -919,6 +991,8 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { } xmlOutputBufferWriteString(buf, (const char *)cur->name); + if (ctxt->format == 2) + xmlOutputBufferWriteWSNonSig(ctxt, 0); xmlOutputBufferWrite(buf, 1, ">"); ctxt->format = format; } @@ -1254,14 +1328,14 @@ xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { if (cur == NULL) return; buf = ctxt->buf; while (cur != NULL) { - if ((ctxt->format) && (xmlIndentTreeOutput) && + if ((ctxt->format == 1) && (xmlIndentTreeOutput) && (cur->type == XML_ELEMENT_NODE)) xmlOutputBufferWrite(buf, ctxt->indent_size * (ctxt->level > ctxt->indent_nr ? ctxt->indent_nr : ctxt->level), ctxt->indent); xhtmlNodeDumpOutput(ctxt, cur); - if (ctxt->format) { + if (ctxt->format == 1) { xmlOutputBufferWrite(buf, 1, "\n"); } cur = cur->next; @@ -1410,7 +1484,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { xmlOutputBufferWriteString(buf, (const char *)cur->name); if (cur->nsDef) - xmlNsListDumpOutput(buf, cur->nsDef); + xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); if ((xmlStrEqual(cur->name, BAD_CAST "html") && (cur->ns == NULL) && (cur->nsDef == NULL))) { /* @@ -1458,7 +1532,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { } else { if (addmeta == 1) { xmlOutputBufferWrite(buf, 1, ">"); - if (ctxt->format) { + if (ctxt->format == 1) { xmlOutputBufferWrite(buf, 1, "\n"); if (xmlIndentTreeOutput) xmlOutputBufferWrite(buf, ctxt->indent_size * @@ -1473,7 +1547,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { xmlOutputBufferWrite(buf, 5, "UTF-8"); } xmlOutputBufferWrite(buf, 4, "\" />"); - if (ctxt->format) + if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n"); } else { xmlOutputBufferWrite(buf, 1, ">"); @@ -1493,7 +1567,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { } xmlOutputBufferWrite(buf, 1, ">"); if (addmeta == 1) { - if (ctxt->format) { + if (ctxt->format == 1) { xmlOutputBufferWrite(buf, 1, "\n"); if (xmlIndentTreeOutput) xmlOutputBufferWrite(buf, ctxt->indent_size * @@ -1588,13 +1662,13 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { if (cur->children != NULL) { int indent = ctxt->format; - if (format) xmlOutputBufferWrite(buf, 1, "\n"); + if (format == 1) xmlOutputBufferWrite(buf, 1, "\n"); if (ctxt->level >= 0) ctxt->level++; ctxt->format = format; xhtmlNodeListDumpOutput(ctxt, cur->children); if (ctxt->level > 0) ctxt->level--; ctxt->format = indent; - if ((xmlIndentTreeOutput) && (format)) + if ((xmlIndentTreeOutput) && (format == 1)) xmlOutputBufferWrite(buf, ctxt->indent_size * (ctxt->level > ctxt->indent_nr ? ctxt->indent_nr : ctxt->level), @@ -2132,7 +2206,7 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, ctxt.doc = doc; ctxt.buf = buf; ctxt.level = level; - ctxt.format = format; + ctxt.format = format ? 1 : 0; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); ctxt.options |= XML_SAVE_AS_XML; @@ -2218,7 +2292,7 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr, ctxt.doc = out_doc; ctxt.buf = out_buff; ctxt.level = 0; - ctxt.format = format; + ctxt.format = format ? 1 : 0; ctxt.encoding = (const xmlChar *) txt_encoding; xmlSaveCtxtInit(&ctxt); ctxt.options |= XML_SAVE_AS_XML; @@ -2337,7 +2411,7 @@ xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) { ctxt.doc = cur; ctxt.buf = buf; ctxt.level = 0; - ctxt.format = format; + ctxt.format = format ? 1 : 0; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); ctxt.options |= XML_SAVE_AS_XML; @@ -2427,7 +2501,7 @@ xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, ctxt.doc = cur; ctxt.buf = buf; ctxt.level = 0; - ctxt.format = format; + ctxt.format = format ? 1 : 0; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); ctxt.options |= XML_SAVE_AS_XML; @@ -2482,7 +2556,7 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur, ctxt.doc = cur; ctxt.buf = buf; ctxt.level = 0; - ctxt.format = format; + ctxt.format = format ? 1 : 0; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); ctxt.options |= XML_SAVE_AS_XML; diff --git a/lib/3rdparty/libxml2/xmlschemas.c b/lib/3rdparty/libxml2/xmlschemas.c index 9c86c756e84..5de7ca5ba16 100644 --- a/lib/3rdparty/libxml2/xmlschemas.c +++ b/lib/3rdparty/libxml2/xmlschemas.c @@ -26811,6 +26811,11 @@ xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt) vctxt->skipDepth = 0; return(ret); } + /* + * Augment the IDC definitions for the main schema and all imported ones + * NOTE: main schema is the first in the imported list + */ + xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt); } if (vctxt->depth > 0) { /* diff --git a/lib/3rdparty/libxml2/xmlschemastypes.c b/lib/3rdparty/libxml2/xmlschemastypes.c index 1ce21e10bf1..1a5454c2497 100644 --- a/lib/3rdparty/libxml2/xmlschemastypes.c +++ b/lib/3rdparty/libxml2/xmlschemastypes.c @@ -2389,9 +2389,11 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, normOnTheFly); break; case XML_SCHEMAS_FLOAT: - case XML_SCHEMAS_DOUBLE:{ + case XML_SCHEMAS_DOUBLE: { const xmlChar *cur = value; int neg = 0; + int digits_before = 0; + int digits_after = 0; if (normOnTheFly) while IS_WSP_BLANK_CH(*cur) cur++; @@ -2464,12 +2466,17 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, goto return1; while ((*cur >= '0') && (*cur <= '9')) { cur++; + digits_before++; } if (*cur == '.') { cur++; - while ((*cur >= '0') && (*cur <= '9')) + while ((*cur >= '0') && (*cur <= '9')) { cur++; + digits_after++; + } } + if ((digits_before == 0) && (digits_after == 0)) + goto return1; if ((*cur == 'e') || (*cur == 'E')) { cur++; if ((*cur == '-') || (*cur == '+')) diff --git a/lib/3rdparty/libxml2/xpath.c b/lib/3rdparty/libxml2/xpath.c index 8482c40b958..4d6826d7779 100644 --- a/lib/3rdparty/libxml2/xpath.c +++ b/lib/3rdparty/libxml2/xpath.c @@ -8106,9 +8106,17 @@ xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL); - if (cur != NULL && cur->children != NULL) - return cur->children ; - if (cur == NULL) cur = ctxt->context->node; + if ((cur != NULL) && (cur->type != XML_ATTRIBUTE_NODE) && + (cur->type != XML_NAMESPACE_DECL) && (cur->children != NULL)) + return(cur->children); + + if (cur == NULL) { + cur = ctxt->context->node; + if (cur->type == XML_NAMESPACE_DECL) + return(NULL); + if (cur->type == XML_ATTRIBUTE_NODE) + cur = cur->parent; + } if (cur == NULL) return(NULL) ; /* ERROR */ if (cur->next != NULL) return(cur->next) ; do { @@ -8162,8 +8170,13 @@ xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL); - if (cur == NULL) + if (cur == NULL) { cur = ctxt->context->node; + if (cur->type == XML_NAMESPACE_DECL) + return(NULL); + if (cur->type == XML_ATTRIBUTE_NODE) + return(cur->parent); + } if (cur == NULL) return (NULL); if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE)) @@ -8207,8 +8220,8 @@ xmlXPathNextPrecedingInternal(xmlXPathParserContextPtr ctxt, cur = ctxt->context->node; if (cur == NULL) return (NULL); - if (cur->type == XML_NAMESPACE_DECL) - cur = (xmlNodePtr)((xmlNsPtr)cur)->next; + if (cur->type == XML_NAMESPACE_DECL) + return (NULL); ctxt->ancestor = cur->parent; } if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE)) @@ -10067,15 +10080,23 @@ xmlXPathCompNumber(xmlXPathParserContextPtr ctxt) } #endif if (CUR == '.') { + int v, frac = 0; + double fraction = 0; + NEXT; if (((CUR < '0') || (CUR > '9')) && (!ok)) { XP_ERROR(XPATH_NUMBER_ERROR); } - while ((CUR >= '0') && (CUR <= '9')) { - mult /= 10; - ret = ret + (CUR - '0') * mult; + while ((CUR >= '0') && (CUR <= '9') && (frac < MAX_FRAC)) { + v = (CUR - '0'); + fraction = fraction * 10 + v; + frac = frac + 1; NEXT; } + fraction /= my_pow10[frac]; + ret = ret + fraction; + while ((CUR >= '0') && (CUR <= '9')) + NEXT; } if ((CUR == 'e') || (CUR == 'E')) { NEXT; @@ -11249,7 +11270,10 @@ xmlXPathCompStep(xmlXPathParserContextPtr ctxt) { } } - CHECK_ERROR; + if (ctxt->error != XPATH_EXPRESSION_OK) { + xmlFree(name); + return; + } name = xmlXPathCompNodeTest(ctxt, &test, &type, &prefix, name); if (test == 0) @@ -12655,7 +12679,7 @@ xmlXPathCompOpEvalFirst(xmlXPathParserContextPtr ctxt, return (total); #ifdef XP_OPTIMIZED_FILTER_FIRST case XPATH_OP_FILTER: - total =+ xmlXPathCompOpEvalFilterFirst(ctxt, op, first); + total += xmlXPathCompOpEvalFilterFirst(ctxt, op, first); return (total); #endif default: diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e1f8fd7b9ba..e0064c0b596 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -16,7 +16,7 @@ add_subdirectory(lsalib) add_subdirectory(ppcmmu) add_subdirectory(pseh) add_subdirectory(recyclebin) -add_subdirectory(rossym) +add_subdirectory(rossym_new) add_subdirectory(rtl) add_subdirectory(sdk) add_subdirectory(smlib) @@ -24,7 +24,6 @@ add_subdirectory(tdilib) else() -add_subdirectory(host/wcsfuncs) add_subdirectory(3rdparty/zlib) endif() diff --git a/lib/atl/atlcom.h b/lib/atl/atlcom.h index c86a67560b6..cc0b8737ca8 100644 --- a/lib/atl/atlcom.h +++ b/lib/atl/atlcom.h @@ -369,10 +369,16 @@ public: \ reinterpret_cast(&_CComChainData::data), \ _Chain}, -#define DECLARE_REGISTRY_RESOURCEID(x)\ - static HRESULT WINAPI UpdateRegistry(BOOL bRegister)\ - {\ - return ATL::_pAtlModule->UpdateRegistryFromResource(x, bRegister); \ +#define DECLARE_NO_REGISTRY()\ + static HRESULT WINAPI UpdateRegistry(BOOL /*bRegister*/) \ + { \ + return S_OK; \ + } + +#define DECLARE_REGISTRY_RESOURCEID(x) \ + static HRESULT WINAPI UpdateRegistry(BOOL bRegister) \ + { \ + return ATL::_pAtlModule->UpdateRegistryFromResource(x, bRegister); \ } #define DECLARE_NOT_AGGREGATABLE(x) \ @@ -841,8 +847,8 @@ public: newArray = reinterpret_cast(realloc(m_ppUnk, newSize * sizeof(IUnknown *))); if (newArray == NULL) return 0; - memset(&m_ppUnk[m_nSize], 0, (newSize - m_nSize) * sizeof(IUnknown *)); m_ppUnk = newArray; + memset(&m_ppUnk[m_nSize], 0, (newSize - m_nSize) * sizeof(IUnknown *)); m_nSize = newSize; m_ppUnk[m_nSize] = pUnk; return m_nSize + 1; @@ -862,6 +868,15 @@ public: return FALSE; } +private: + CComDynamicUnkArray &operator = (const CComDynamicUnkArray &) + { + return *this; + } + + CComDynamicUnkArray(const CComDynamicUnkArray &) + { + } }; struct _ATL_CONNMAP_ENTRY diff --git a/lib/atl/atlwin.h b/lib/atl/atlwin.h index c74dbbd8447..fa5550e38c8 100644 --- a/lib/atl/atlwin.h +++ b/lib/atl/atlwin.h @@ -24,7 +24,7 @@ #define GCCU(x) x __attribute__((unused)) #define Unused(x) #else -#define GCCU(x) x +#define GCCU(x) (x) #define Unused(x) (x); #endif // __GNUC__ @@ -353,6 +353,11 @@ public: return ::ShowWindow(m_hWnd, nCmdShow); } + BOOL UpdateWindow() + { + ATLASSERT(::IsWindow(m_hWnd)); + return ::UpdateWindow(m_hWnd); + } }; _declspec(selectany) RECT CWindow::rcDefault = { CW_USEDEFAULT, CW_USEDEFAULT, 0, 0 }; @@ -770,6 +775,8 @@ struct _ATL_WNDCLASSINFOW ATOM Register(WNDPROC *p) { + if (m_wc.hInstance == NULL) + m_wc.hInstance = _AtlBaseModule.GetModuleInstance(); if (m_atom == 0) m_atom = RegisterClassEx(&m_wc); return m_atom; diff --git a/lib/atl/statreg.h b/lib/atl/statreg.h index 2da4f2c8cf4..895ac82bc3b 100644 --- a/lib/atl/statreg.h +++ b/lib/atl/statreg.h @@ -89,13 +89,26 @@ public: rep_list *new_rep; new_rep = reinterpret_cast(HeapAlloc(GetProcessHeap(), 0, sizeof(rep_list))); + if (new_rep == NULL) + return E_OUTOFMEMORY; new_rep->key_len = lstrlenW(key); new_rep->key = reinterpret_cast(HeapAlloc(GetProcessHeap(), 0, (new_rep->key_len + 1) * sizeof(OLECHAR))); + if (new_rep->key == NULL) + { + HeapFree(GetProcessHeap(), 0, new_rep); + return E_OUTOFMEMORY; + } memcpy(new_rep->key, key, (new_rep->key_len + 1) * sizeof(OLECHAR)); len = lstrlenW(item) + 1; new_rep->item = reinterpret_cast(HeapAlloc(GetProcessHeap(), 0, len * sizeof(OLECHAR))); + if (new_rep->item == NULL) + { + HeapFree(GetProcessHeap(), 0, new_rep->key); + HeapFree(GetProcessHeap(), 0, new_rep); + return E_OUTOFMEMORY; + } memcpy(new_rep->item, item, len * sizeof(OLECHAR)); new_rep->next = m_rep; @@ -205,25 +218,34 @@ private: return RegDeleteKey(parentKey, subKeyName); } - void strbuf_init(strbuf *buf) + HRESULT strbuf_init(strbuf *buf) { buf->str = reinterpret_cast(HeapAlloc(GetProcessHeap(), 0, 128 * sizeof(WCHAR))); + if (buf->str == NULL) + return E_OUTOFMEMORY; buf->alloc = 128; buf->len = 0; + return S_OK; } - void strbuf_write(LPCOLESTR str, strbuf *buf, int len) + HRESULT strbuf_write(LPCOLESTR str, strbuf *buf, int len) { + LPOLESTR newBuffer; + if (len == -1) len = lstrlenW(str); - if (buf->len+len+1 >= buf->alloc) + if (buf->len + len + 1 >= buf->alloc) { buf->alloc = (buf->len + len) * 2; - buf->str = reinterpret_cast(HeapReAlloc(GetProcessHeap(), 0, buf->str, buf->alloc * sizeof(WCHAR))); + newBuffer = reinterpret_cast(HeapReAlloc(GetProcessHeap(), 0, buf->str, buf->alloc * sizeof(WCHAR))); + if (newBuffer == NULL) + return E_OUTOFMEMORY; + buf->str = newBuffer; } memcpy(buf->str + buf->len, str, len * sizeof(OLECHAR)); buf->len += len; buf->str[buf->len] = '\0'; + return S_OK; } @@ -242,11 +264,18 @@ private: { filelen = GetFileSize(file, NULL); regstra = reinterpret_cast(HeapAlloc(GetProcessHeap(), 0, filelen)); + if (regstra == NULL) + return E_OUTOFMEMORY; lres = ReadFile(file, regstra, filelen, NULL, NULL); if (lres == ERROR_SUCCESS) { len = MultiByteToWideChar(CP_ACP, 0, regstra, filelen, NULL, 0) + 1; regstrw = reinterpret_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR))); + if (regstra == NULL) + { + HeapFree(GetProcessHeap(), 0, regstra); + return E_OUTOFMEMORY; + } MultiByteToWideChar(CP_ACP, 0, regstra, filelen, regstrw, len); regstrw[len - 1] = '\0'; @@ -291,6 +320,8 @@ private: { len = MultiByteToWideChar(CP_ACP, 0, reinterpret_cast(regstra), reslen, NULL, 0) + 1; regstrw = reinterpret_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR))); + if (regstrw == NULL) + return E_OUTOFMEMORY; MultiByteToWideChar(CP_ACP, 0, reinterpret_cast(regstra), reslen, regstrw, len); regstrw[len - 1] = '\0'; @@ -316,7 +347,9 @@ private: strbuf buf; HRESULT hResult; - strbuf_init(&buf); + hResult = strbuf_init(&buf); + if (FAILED(hResult)) + return hResult; hResult = do_preprocess(data, &buf); if (SUCCEEDED(hResult)) { @@ -334,12 +367,15 @@ private: LPCOLESTR iter; LPCOLESTR iter2; rep_list *rep_iter; + HRESULT hResult; iter2 = data; iter = wcschr(data, '%'); while (iter) { - strbuf_write(iter2, buf, static_cast(iter - iter2)); + hResult = strbuf_write(iter2, buf, static_cast(iter - iter2)); + if (FAILED(hResult)) + return hResult; iter2 = ++iter; if (!*iter2) @@ -349,7 +385,11 @@ private: return DISP_E_EXCEPTION; if (iter == iter2) - strbuf_write(_T("%"), buf, 1); + { + hResult = strbuf_write(_T("%"), buf, 1); + if (FAILED(hResult)) + return hResult; + } else { for (rep_iter = m_rep; rep_iter; rep_iter = rep_iter->next) @@ -360,14 +400,18 @@ private: if (!rep_iter) return DISP_E_EXCEPTION; - strbuf_write(rep_iter->item, buf, -1); + hResult = strbuf_write(rep_iter->item, buf, -1); + if (FAILED(hResult)) + return hResult; } iter2 = ++iter; iter = wcschr(iter, '%'); } - strbuf_write(iter2, buf, -1); + hResult = strbuf_write(iter2, buf, -1); + if (FAILED(hResult)) + return hResult; return S_OK; } @@ -376,6 +420,7 @@ private: { LPCOLESTR iter; LPCOLESTR iter2; + HRESULT hResult; iter2 = *str; buf->len = 0; @@ -392,7 +437,9 @@ private: if (*iter == '}' || *iter == '=') { - strbuf_write(iter++, buf, 1); + hResult = strbuf_write(iter++, buf, 1); + if (FAILED(hResult)) + return hResult; } else if (*iter == '\'') { @@ -403,14 +450,18 @@ private: *str = iter; return DISP_E_EXCEPTION; } - strbuf_write(iter2, buf, static_cast(iter - iter2)); + hResult = strbuf_write(iter2, buf, static_cast(iter - iter2)); + if (FAILED(hResult)) + return hResult; iter++; } else { while (*iter && !iswspace(*iter)) iter++; - strbuf_write(iter2, buf, static_cast(iter - iter2)); + hResult = strbuf_write(iter2, buf, static_cast(iter - iter2)); + if (FAILED(hResult)) + return hResult; } while (iswspace(*iter)) @@ -419,6 +470,18 @@ private: return S_OK; } + inline unsigned int HexToBin(char a) + { + if (a >= '0' && a <= '9') + return a - 0x30; + if (a >= 'A' && a <= 'F') + return a - 'A' + 10; + if (a >= 'a' && a <= 'f') + return a - 'a' + 10; + ATLASSERT(false); + return 0; + } + HRESULT do_process_key(LPCOLESTR *pstr, HKEY parent_key, strbuf *buf, BOOL do_register) { LPCOLESTR iter; @@ -446,7 +509,9 @@ private: hres = get_word(&iter, buf); if (FAILED(hres)) return hres; - strbuf_init(&name); + hres = strbuf_init(&name); + if (FAILED(hres)) + return hres; while(buf->str[1] || buf->str[0] != '}') { @@ -463,7 +528,7 @@ private: if (key_type != NORMAL) { hres = get_word(&iter, buf); - if(FAILED(hres)) + if (FAILED(hres)) break; } @@ -472,7 +537,9 @@ private: if (key_type == IS_VAL) { hkey = parent_key; - strbuf_write(buf->str, &name, -1); + hres = strbuf_write(buf->str, &name, -1); + if (FAILED(hres)) + return hres; } else if (key_type == DO_DELETE) { @@ -492,7 +559,9 @@ private: } else if (key_type != IS_VAL && key_type != DO_DELETE) { - strbuf_write(buf->str, &name, -1); + hres = strbuf_write(buf->str, &name, -1); + if (FAILED(hres)) + return hres; lres = RegOpenKey(parent_key, buf->str, &hkey); if (lres != ERROR_SUCCESS) { @@ -521,31 +590,50 @@ private: lres = RegSetValueEx(hkey, name.len ? name.str : NULL, 0, REG_SZ, (PBYTE)buf->str, (lstrlenW(buf->str) + 1) * sizeof(WCHAR)); if (lres != ERROR_SUCCESS) - { hres = HRESULT_FROM_WIN32(lres); + break; + case 'e': + hres = get_word(&iter, buf); + if (FAILED(hres)) break; - } + lres = RegSetValueEx(hkey, name.len ? name.str : NULL, 0, REG_EXPAND_SZ, (PBYTE)buf->str, + (lstrlenW(buf->str) + 1) * sizeof(WCHAR)); + if (lres != ERROR_SUCCESS) + hres = HRESULT_FROM_WIN32(lres); break; case 'd': { + hres = get_word(&iter, buf); + if (FAILED(hres)) + break; WCHAR *end; DWORD dw; - if(*iter == '0' && iter[1] == 'x') - { - iter += 2; - dw = wcstol(iter, &end, 16); - } + if ((buf->str[0] == '0' && buf->str[1] == 'x') || (buf->str[0] == '&' && buf->str[1] == 'H')) + dw = wcstoul(&buf->str[2], &end, 16); else - { - dw = wcstol(iter, &end, 10); - } - iter = end; + dw = wcstol(&buf->str[0], &end, 10); lres = RegSetValueEx(hkey, name.len ? name.str : NULL, 0, REG_DWORD, (PBYTE)&dw, sizeof(dw)); if (lres != ERROR_SUCCESS) - { hres = HRESULT_FROM_WIN32(lres); + break; + } + case 'b': + { + DWORD count; + DWORD curIndex; + + hres = get_word(&iter, buf); + if (FAILED(hres)) break; - } + count = buf->len; + if ((count & 1) != 0) + return DISP_E_EXCEPTION; + count = count / 2; + for (curIndex = 0; curIndex < count; curIndex++) + buf->str[curIndex] = (HexToBin(buf->str[curIndex * 2]) << 4) | HexToBin(buf->str[curIndex * 2 + 1]); + lres = RegSetValueEx(hkey, name.len ? name.str : NULL, 0, REG_BINARY, (PBYTE)buf->str, count); + if (lres != ERROR_SUCCESS) + hres = HRESULT_FROM_WIN32(lres); break; } default: @@ -628,9 +716,10 @@ private: }; iter = data; - hResult = S_OK; - strbuf_init(&buf); + hResult = strbuf_init(&buf); + if (FAILED(hResult)) + return hResult; hResult = get_word(&iter, &buf); if (FAILED(hResult)) return hResult; diff --git a/lib/cmlib/CMakeLists.txt b/lib/cmlib/CMakeLists.txt index 0de4e4de151..38c1b530a59 100644 --- a/lib/cmlib/CMakeLists.txt +++ b/lib/cmlib/CMakeLists.txt @@ -17,7 +17,6 @@ if(CMAKE_CROSSCOMPILING) add_dependencies(cmlib bugcodes) else() add_definitions( - -DWINE_UNICODE_API= -D__NO_CTYPE_INLINES -DCMLIB_HOST) add_library(cmlibhost ${SOURCE}) diff --git a/lib/cmlib/cmdata.h b/lib/cmlib/cmdata.h index 61629c6398a..bce6e2aa80f 100644 --- a/lib/cmlib/cmdata.h +++ b/lib/cmlib/cmdata.h @@ -46,11 +46,7 @@ // #define VALUE_COMP_NAME 0x0001 -#ifdef CMLIB_HOST -#include -#else #include -#endif // // For memory-mapped Hives @@ -154,11 +150,7 @@ typedef struct _CM_KEY_SECURITY UCHAR Data[ANYSIZE_ARRAY]; } CM_KEY_SECURITY, *PCM_KEY_SECURITY; -#ifdef CMLIB_HOST -#include -#else #include -#endif // // Generic Index Entry diff --git a/lib/cmlib/cmlib.h b/lib/cmlib/cmlib.h index e472fd35c4f..5fb85060130 100644 --- a/lib/cmlib/cmlib.h +++ b/lib/cmlib/cmlib.h @@ -13,8 +13,7 @@ #define _CMLIB_DEBUG_ 1 #ifdef CMLIB_HOST - #include - #include + #include #include #include @@ -69,9 +68,6 @@ #define PWORK_QUEUE_ITEM PVOID #define EX_PUSH_LOCK PULONG_PTR - /* For */ - #define USE_HOST_WCSFUNCS - #define CMLTRACE(x, ...) #else // @@ -89,12 +85,14 @@ #endif #include - #undef DECLSPEC_IMPORT - #define DECLSPEC_IMPORT #include + + /* Prevent inclusion of Windows headers through */ + #define _WINDEF_ + #define _WINBASE_ + #define _WINNLS_ #endif -#include // // These define the Debug Masks Supported @@ -121,6 +119,7 @@ #define CMAPI NTAPI +#include #include #include "hivedata.h" #include "cmdata.h" @@ -311,8 +310,8 @@ CmCreateRootNode( VOID CMAPI CmPrepareHive( PHHIVE RegistryHive); - - + + BOOLEAN CMAPI HvTrackCellRef( diff --git a/lib/cmlib/hivedata.h b/lib/cmlib/hivedata.h index 7bd8845048d..b15c92636cf 100644 --- a/lib/cmlib/hivedata.h +++ b/lib/cmlib/hivedata.h @@ -100,11 +100,7 @@ typedef enum Volatile = 1 } HSTORAGE_TYPE; -#ifdef CMLIB_HOST -#include -#else #include -#endif /** * @name HBASE_BLOCK @@ -188,11 +184,7 @@ typedef struct _HCELL LONG Size; } HCELL, *PHCELL; -#ifdef CMLIB_HOST -#include -#else #include -#endif struct _HHIVE; diff --git a/lib/drivers/CMakeLists.txt b/lib/drivers/CMakeLists.txt index 37649221f73..1d1e3812b84 100644 --- a/lib/drivers/CMakeLists.txt +++ b/lib/drivers/CMakeLists.txt @@ -3,5 +3,4 @@ add_subdirectory(chew) add_subdirectory(csq) add_subdirectory(ip) add_subdirectory(lwip) -add_subdirectory(oskittcp) add_subdirectory(sound) diff --git a/lib/drivers/ip/network/icmp.c b/lib/drivers/ip/network/icmp.c index 4f1ee993ec0..708381ff4bf 100644 --- a/lib/drivers/ip/network/icmp.c +++ b/lib/drivers/ip/network/icmp.c @@ -228,6 +228,8 @@ NTSTATUS ICMPSendDatagram( FreeNdisPacket(Packet.NdisPacket); return Status; } + + *DataUsed = DataSize; TI_DbgPrint(MID_TRACE,("Leaving\n")); diff --git a/lib/drivers/ip/transport/rawip/rawip.c b/lib/drivers/ip/transport/rawip/rawip.c index 6b441e42935..e36f7a57bb4 100644 --- a/lib/drivers/ip/transport/rawip/rawip.c +++ b/lib/drivers/ip/transport/rawip/rawip.c @@ -261,6 +261,8 @@ NTSTATUS RawIPSendDatagram( FreeNdisPacket(Packet.NdisPacket); return Status; } + + *DataUsed = DataSize; TI_DbgPrint(MID_TRACE,("Leaving\n")); diff --git a/lib/drivers/ip/transport/tcp/tcp.c b/lib/drivers/ip/transport/tcp/tcp.c index 4aadf50c5f8..9e13543524c 100644 --- a/lib/drivers/ip/transport/tcp/tcp.c +++ b/lib/drivers/ip/transport/tcp/tcp.c @@ -57,6 +57,7 @@ PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint( PVOID ClientContext ) InitializeListHead(&Connection->ListenRequest); InitializeListHead(&Connection->ReceiveRequest); InitializeListHead(&Connection->SendRequest); + InitializeListHead(&Connection->ShutdownRequest); /* Save client context pointer */ Connection->ClientContext = ClientContext; diff --git a/lib/drivers/ip/transport/udp/udp.c b/lib/drivers/ip/transport/udp/udp.c index 0dcf7b2cb5b..5547323ae42 100644 --- a/lib/drivers/ip/transport/udp/udp.c +++ b/lib/drivers/ip/transport/udp/udp.c @@ -234,6 +234,8 @@ NTSTATUS UDPSendDatagram( FreeNdisPacket(Packet.NdisPacket); return Status; } + + *DataUsed = DataSize; return STATUS_SUCCESS; } diff --git a/lib/drivers/oskittcp/include/oskitfreebsd.h b/lib/drivers/oskittcp/include/oskitfreebsd.h index f7d48504d5f..e84222709f7 100644 --- a/lib/drivers/oskittcp/include/oskitfreebsd.h +++ b/lib/drivers/oskittcp/include/oskitfreebsd.h @@ -17,21 +17,8 @@ extern void oskittcp_die(const char *file, int line); #define ovbcopy(src,dst,n) memmove(dst,src,n) #define bzero(x,y) memset(x,0,y) #define bcopy(src,dst,n) memcpy(dst,src,n) -#ifdef _MSC_VER -static __inline void panic ( const char* fmt, ... ) -{ - va_list arg; - va_start(arg, fmt); - printf ( "oskit PANIC: " ); - vprintf ( fmt, arg ); - va_end(arg); - // TODO FIXME - print stack trace... - oskittcp_die("",-1); -} -#else//_MSC_VER #define panic(...) do { printf(__VA_ARGS__); \ oskittcp_die(__FILE__,__LINE__); } while(0) -#endif//_MSC_VER #define kmem_malloc(x,y,z) malloc(y,0,0) #endif//_OSKITFREEBSD_H diff --git a/lib/drivers/oskittcp/oskittcp/interface.c b/lib/drivers/oskittcp/oskittcp/interface.c index 9205757f8c8..d28ffa2e148 100644 --- a/lib/drivers/oskittcp/oskittcp/interface.c +++ b/lib/drivers/oskittcp/oskittcp/interface.c @@ -118,6 +118,8 @@ void InitializeSocketFlags(struct socket *so) { so->so_state |= SS_NBIO; so->so_options |= SO_DONTROUTE; + so->so_snd.sb_flags |= SB_SEL; + so->so_rcv.sb_flags |= SB_SEL; } /* From uipc_syscalls.c */ @@ -148,6 +150,9 @@ int OskitTCPRecv( void *connection, OSK_UINT Len, OSK_UINT *OutLen, OSK_UINT Flags ) { +#if DBG + struct socket *so = connection; +#endif struct uio uio = { 0 }; struct iovec iov = { 0 }; int error = 0; @@ -157,7 +162,7 @@ int OskitTCPRecv( void *connection, return OSK_ESHUTDOWN; OS_DbgPrint(OSK_MID_TRACE, - ("so->so_state %x\n", ((struct socket *)connection)->so_state)); + ("so->so_state %x\n", so->so_state)); if( Flags & OSK_MSG_OOB ) tcp_flags |= MSG_OOB; if( Flags & OSK_MSG_DONTWAIT ) tcp_flags |= MSG_DONTWAIT; @@ -372,8 +377,9 @@ int OskitTCPAccept( void *socket, inp = so ? (struct inpcb *)so->so_pcb : NULL; if( inp && name ) { - ((struct sockaddr_in *)AddrOut)->sin_addr.s_addr = - inp->inp_faddr.s_addr; + ((struct sockaddr_in *)AddrOut)->sin_len = sizeof(struct sockaddr_in); + ((struct sockaddr_in *)AddrOut)->sin_family = AF_INET; + ((struct sockaddr_in *)AddrOut)->sin_addr = inp->inp_faddr; ((struct sockaddr_in *)AddrOut)->sin_port = inp->inp_fport; } diff --git a/lib/drivers/oskittcp/oskittcp/sleep.c b/lib/drivers/oskittcp/oskittcp/sleep.c index e6779fd6675..a15154e53b3 100644 --- a/lib/drivers/oskittcp/oskittcp/sleep.c +++ b/lib/drivers/oskittcp/oskittcp/sleep.c @@ -31,11 +31,13 @@ void wakeup( struct socket *so, void *token ) { OS_DbgPrint(OSK_MID_TRACE,("Socket accepting q\n")); flags |= SEL_ACCEPT; } - if( so->so_rcv.sb_cc > 0 ) { + if( (so->so_rcv.sb_cc > 0 && (so->so_state & SS_ISCONNECTED)) || + (so->so_state & SS_CANTRCVMORE)) { OS_DbgPrint(OSK_MID_TRACE,("Socket readable\n")); flags |= SEL_READ; } - if( 0 < sbspace(&so->so_snd) ) { + if( (0 < sbspace(&so->so_snd) && (so->so_state & SS_ISCONNECTED)) || + (so->so_state & SS_CANTSENDMORE)) { OS_DbgPrint(OSK_MID_TRACE,("Socket writeable\n")); flags |= SEL_WRITE; } @@ -51,7 +53,7 @@ void wakeup( struct socket *so, void *token ) { if( OtcpEvent.SocketState ) OtcpEvent.SocketState( OtcpEvent.ClientData, so, - so ? so->so_connection : 0, + so->so_connection, flags ); if( OtcpEvent.Wakeup ) diff --git a/lib/drivers/oskittcp/oskittcp/uipc_socket.c b/lib/drivers/oskittcp/oskittcp/uipc_socket.c index 2bd3c7a4e45..8cad81cccd6 100644 --- a/lib/drivers/oskittcp/oskittcp/uipc_socket.c +++ b/lib/drivers/oskittcp/oskittcp/uipc_socket.c @@ -610,7 +610,7 @@ restart: if ((so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) == 0 && (so->so_proto->pr_flags & PR_CONNREQUIRED)) { printf("so: %x\n", so); - __asm__("int3"); + __debugbreak(); error = ENOTCONN; goto release; } @@ -826,7 +826,13 @@ soshutdown(so, how) { register struct protosw *pr = so->so_proto; +#ifndef __REACTOS__ + /* Reads are always killed whether we want + * them stopped or not. We don't want this + * happening on ROS so this code is commented out + */ how++; +#endif if (how & FREAD) sorflush(so); if (how & FWRITE) diff --git a/lib/fslib/vfatlib/fat12.c b/lib/fslib/vfatlib/fat12.c index 58725223777..b9f8bad46f2 100644 --- a/lib/fslib/vfatlib/fat12.c +++ b/lib/fslib/vfatlib/fat12.c @@ -56,11 +56,11 @@ Fat12WriteBootSector(IN HANDLE FileHandle, { IO_STATUS_BLOCK IoStatusBlock; NTSTATUS Status; - PUCHAR NewBootSector; + PFAT16_BOOT_SECTOR NewBootSector; LARGE_INTEGER FileOffset; /* Allocate buffer for new bootsector */ - NewBootSector = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap (), + NewBootSector = (PFAT16_BOOT_SECTOR)RtlAllocateHeap(RtlGetProcessHeap (), 0, BootSector->BytesPerSector); if (NewBootSector == NULL) @@ -70,10 +70,13 @@ Fat12WriteBootSector(IN HANDLE FileHandle, memset(NewBootSector, 0, BootSector->BytesPerSector); /* Copy FAT16 BPB to new bootsector */ - memcpy((NewBootSector + 3), + memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], 59); /* FAT16 BPB length (up to (not including) Res2) */ + /* Write the boot sector signature */ + NewBootSector->Signature1 = 0xAA550000; + /* Write sector 0 */ FileOffset.QuadPart = 0ULL; Status = NtWriteFile(FileHandle, @@ -289,8 +292,16 @@ Fat12Format(IN HANDLE FileHandle, /* Calculate cluster size */ if (ClusterSize == 0) { - /* 4KB Cluster (Harddisk only) */ - ClusterSize = 4096; + if (DiskGeometry->MediaType == FixedMedia) + { + /* 4KB Cluster (Harddisk only) */ + ClusterSize = 4096; + } + else + { + /* 512 byte cluster (floppy) */ + ClusterSize = 512; + } } SectorCount = PartitionInfo->PartitionLength.QuadPart >> @@ -312,7 +323,7 @@ Fat12Format(IN HANDLE FileHandle, BootSector.Heads = DiskGeometry->TracksPerCylinder; BootSector.HiddenSectors = PartitionInfo->HiddenSectors; BootSector.SectorsHuge = (SectorCount >= 0x10000) ? (unsigned long)SectorCount : 0; - BootSector.Drive = 0xff; /* No BIOS boot drive available */ + BootSector.Drive = DiskGeometry->MediaType == FixedMedia ? 0x80 : 0x00; BootSector.ExtBootSignature = 0x29; BootSector.VolumeID = CalcVolumeSerialNumber(); if ((Label == NULL) || (Label->Buffer == NULL)) diff --git a/lib/fslib/vfatlib/fat16.c b/lib/fslib/vfatlib/fat16.c index 1194de905e7..8cd7551d938 100644 --- a/lib/fslib/vfatlib/fat16.c +++ b/lib/fslib/vfatlib/fat16.c @@ -56,11 +56,11 @@ Fat16WriteBootSector(IN HANDLE FileHandle, { IO_STATUS_BLOCK IoStatusBlock; NTSTATUS Status; - PUCHAR NewBootSector; + PFAT16_BOOT_SECTOR NewBootSector; LARGE_INTEGER FileOffset; /* Allocate buffer for new bootsector */ - NewBootSector = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap(), + NewBootSector = (PFAT16_BOOT_SECTOR)RtlAllocateHeap(RtlGetProcessHeap(), 0, BootSector->BytesPerSector); if (NewBootSector == NULL) @@ -70,10 +70,13 @@ Fat16WriteBootSector(IN HANDLE FileHandle, memset(NewBootSector, 0, BootSector->BytesPerSector); /* Copy FAT16 BPB to new bootsector */ - memcpy((NewBootSector + 3), + memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], 59); /* FAT16 BPB length (up to (not including) Res2) */ + /* Write the boot sector signature */ + NewBootSector->Signature1 = 0xAA550000; + /* Write sector 0 */ FileOffset.QuadPart = 0ULL; Status = NtWriteFile(FileHandle, @@ -327,7 +330,7 @@ Fat16Format(IN HANDLE FileHandle, BootSector.Heads = DiskGeometry->TracksPerCylinder; BootSector.HiddenSectors = PartitionInfo->HiddenSectors; BootSector.SectorsHuge = (SectorCount >= 0x10000) ? (unsigned long)SectorCount : 0; - BootSector.Drive = 0xff; /* No BIOS boot drive available */ + BootSector.Drive = DiskGeometry->MediaType == FixedMedia ? 0x80 : 0x00; BootSector.ExtBootSignature = 0x29; BootSector.VolumeID = CalcVolumeSerialNumber(); if ((Label == NULL) || (Label->Buffer == NULL)) diff --git a/lib/fslib/vfatlib/fat32.c b/lib/fslib/vfatlib/fat32.c index 9be3e050b12..0137fabe70c 100644 --- a/lib/fslib/vfatlib/fat32.c +++ b/lib/fslib/vfatlib/fat32.c @@ -56,11 +56,11 @@ Fat32WriteBootSector(IN HANDLE FileHandle, { IO_STATUS_BLOCK IoStatusBlock; NTSTATUS Status; - PUCHAR NewBootSector; + PFAT32_BOOT_SECTOR NewBootSector; LARGE_INTEGER FileOffset; /* Allocate buffer for new bootsector */ - NewBootSector = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap(), + NewBootSector = (PFAT32_BOOT_SECTOR)RtlAllocateHeap(RtlGetProcessHeap(), 0, BootSector->BytesPerSector); if (NewBootSector == NULL) @@ -70,10 +70,13 @@ Fat32WriteBootSector(IN HANDLE FileHandle, memset(NewBootSector, 0, BootSector->BytesPerSector); /* Copy FAT32 BPB to new bootsector */ - memcpy((NewBootSector + 3), + memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], 87); /* FAT32 BPB length (up to (not including) Res2) */ + /* Write the boot sector signature */ + NewBootSector->Signature1 = 0xAA550000; + /* Write sector 0 */ FileOffset.QuadPart = 0ULL; Status = NtWriteFile(FileHandle, @@ -405,7 +408,7 @@ Fat32Format(IN HANDLE FileHandle, BootSector.RootCluster = 2; BootSector.FSInfoSector = 1; BootSector.BootBackup = 6; - BootSector.Drive = 0xff; /* No BIOS boot drive available */ + BootSector.Drive = DiskGeometry->MediaType == FixedMedia ? 0x80 : 0x00; BootSector.ExtBootSignature = 0x29; BootSector.VolumeID = CalcVolumeSerialNumber (); if ((Label == NULL) || (Label->Buffer == NULL)) diff --git a/lib/fslib/vfatlib/vfatlib.c b/lib/fslib/vfatlib/vfatlib.c index 58738e68f54..e46501c0fba 100644 --- a/lib/fslib/vfatlib/vfatlib.c +++ b/lib/fslib/vfatlib/vfatlib.c @@ -32,7 +32,7 @@ VfatFormat(IN PUNICODE_STRING DriveRoot, HANDLE FileHandle; PARTITION_INFORMATION PartitionInfo; FORMAT_CONTEXT Context; - NTSTATUS Status; + NTSTATUS Status, LockStatus; DPRINT("VfatFormat(DriveRoot '%wZ')\n", DriveRoot); @@ -127,6 +127,58 @@ VfatFormat(IN PUNICODE_STRING DriveRoot, PartitionInfo.RewritePartition = FALSE; PartitionInfo.RecognizedPartition = FALSE; } + + /* If it already has a FAT FS, we'll use that type. + * If it doesn't, we will determine the FAT type based on size and offset */ + if (PartitionInfo.PartitionType != PARTITION_FAT_12 && + PartitionInfo.PartitionType != PARTITION_FAT_16 && + PartitionInfo.PartitionType != PARTITION_HUGE && + PartitionInfo.PartitionType != PARTITION_XINT13 && + PartitionInfo.PartitionType != PARTITION_FAT32 && + PartitionInfo.PartitionType != PARTITION_FAT32_XINT13) + { + /* Determine the correct type based upon size and offset (copied from usetup) */ + if (PartitionInfo.PartitionLength.QuadPart < (4200LL * 1024LL)) + { + /* FAT12 CHS partition (disk is smaller than 4.1MB) */ + PartitionInfo.PartitionType = PARTITION_FAT_12; + } + else if (PartitionInfo.StartingOffset.QuadPart < (1024LL * 255LL * 63LL * 512LL)) + { + /* Partition starts below the 8.4GB boundary ==> CHS partition */ + + if (PartitionInfo.PartitionLength.QuadPart < (32LL * 1024LL * 1024LL)) + { + /* FAT16 CHS partition (partiton size < 32MB) */ + PartitionInfo.PartitionType = PARTITION_FAT_16; + } + else if (PartitionInfo.PartitionLength.QuadPart < (512LL * 1024LL * 1024LL)) + { + /* FAT16 CHS partition (partition size < 512MB) */ + PartitionInfo.PartitionType = PARTITION_HUGE; + } + else + { + /* FAT32 CHS partition (partition size >= 512MB) */ + PartitionInfo.PartitionType = PARTITION_FAT32; + } + } + else + { + /* Partition starts above the 8.4GB boundary ==> LBA partition */ + + if (PartitionInfo.PartitionLength.QuadPart < (512LL * 1024LL * 1024LL)) + { + /* FAT16 LBA partition (partition size < 512MB) */ + PartitionInfo.PartitionType = PARTITION_XINT13; + } + else + { + /* FAT32 LBA partition (partition size >= 512MB) */ + PartitionInfo.PartitionType = PARTITION_FAT32_XINT13; + } + } + } DPRINT("PartitionType 0x%x\n", PartitionInfo.PartitionType); DPRINT("StartingOffset %I64d\n", PartitionInfo.StartingOffset.QuadPart); @@ -143,6 +195,21 @@ VfatFormat(IN PUNICODE_STRING DriveRoot, Callback (PROGRESS, 0, (PVOID)&Context.Percent); } + LockStatus = NtFsControlFile(FileHandle, + NULL, + NULL, + NULL, + &Iosb, + FSCTL_LOCK_VOLUME, + NULL, + 0, + NULL, + 0); + if (!NT_SUCCESS(LockStatus)) + { + DPRINT1("WARNING: Failed to lock volume for formatting! Format may fail! (Status: 0x%x)\n", LockStatus); + } + if (PartitionInfo.PartitionType == PARTITION_FAT_12) { /* FAT12 */ @@ -184,6 +251,21 @@ VfatFormat(IN PUNICODE_STRING DriveRoot, Status = STATUS_INVALID_PARAMETER; } + LockStatus = NtFsControlFile(FileHandle, + NULL, + NULL, + NULL, + &Iosb, + FSCTL_UNLOCK_VOLUME, + NULL, + 0, + NULL, + 0); + if (!NT_SUCCESS(LockStatus)) + { + DPRINT1("Failed to unlock volume (Status: 0x%x)\n", LockStatus); + } + NtClose(FileHandle); if (Callback != NULL) diff --git a/lib/fslib/vfatxlib/CMakeLists.txt b/lib/fslib/vfatxlib/CMakeLists.txt index 94ba818ea7b..4c66fd64599 100644 --- a/lib/fslib/vfatxlib/CMakeLists.txt +++ b/lib/fslib/vfatxlib/CMakeLists.txt @@ -1,4 +1,8 @@ add_library(vfatxlib fatx.c vfatxlib.c) -add_dependencies(vfatxlib psdk) +if(NOT MSVC) + target_link_libraries(vfatxlib -lgcc) +endif() + +add_dependencies(vfatxlib psdk) diff --git a/lib/host/wcsfuncs/CMakeLists.txt b/lib/host/wcsfuncs/CMakeLists.txt deleted file mode 100644 index 5f16bcbfbbd..00000000000 --- a/lib/host/wcsfuncs/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -add_library(host_wcsfuncs wcsfuncs.c) diff --git a/lib/host/wcsfuncs/wcsfuncs.c b/lib/host/wcsfuncs/wcsfuncs.c deleted file mode 100644 index 58dafe13cd3..00000000000 --- a/lib/host/wcsfuncs/wcsfuncs.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - PROJECT: ReactOS - LICENSE: GPL v2 or any later version - FILE: lib/host/wcsfuncs/wcsfuncs.c - PURPOSE: Reimplemented wide-character string functions for host tools (to be independent of the host wchar_t size) - COPYRIGHT: Copyright 2008 Colin Finck -*/ - -#include - -/* Function implementations */ -SIZE_T utf16_wcslen(PCWSTR str) -{ - SIZE_T i; - - for(i = 0; str[i]; i++); - - return i; -} - - -SIZE_T strlenW(PCWSTR str) -{ - SIZE_T i; - - for(i = 0; str[i]; i++); - - return i; -} - - -PWSTR utf16_wcschr(PWSTR str, WCHAR c) -{ - SIZE_T i; - - for(i = 0; str[i] && str[i] != c; i++); - - if(str[i]) - return &str[i]; - else - return NULL; -} - -PWSTR strchrW(PWSTR str, WCHAR c) -{ - SIZE_T i; - - for(i = 0; str[i] && str[i] != c; i++); - - if(str[i]) - return &str[i]; - else - return NULL; -} - -INT utf16_wcsncmp(PCWSTR string1, PCWSTR string2, size_t count) -{ - while(count--) - { - if(*string1 != *string2) - return 1; - - if(*string1 == 0) - return 0; - - string1++; - string2++; - } - - return 0; -} - -INT strncmpW(PCWSTR string1, PCWSTR string2, size_t count) -{ - while(count--) - { - if(*string1 != *string2) - return 1; - - if(*string1 == 0) - return 0; - - string1++; - string2++; - } - - return 0; -} diff --git a/lib/inflib/builddep.h b/lib/inflib/builddep.h index 8c38864be9c..d123ab313b6 100644 --- a/lib/inflib/builddep.h +++ b/lib/inflib/builddep.h @@ -8,7 +8,7 @@ /* Definitions native to the host on which we're building */ -#include +#include #include #include diff --git a/lib/inflib/inflib.mak b/lib/inflib/inflib.mak index fa23df27d8f..8a4bf38d274 100644 --- a/lib/inflib/inflib.mak +++ b/lib/inflib/inflib.mak @@ -32,7 +32,7 @@ INFLIB_HOST_OBJECTS = \ INFLIB_HOST_CFLAGS = -O3 -Wall -Wpointer-arith -Wconversion \ -Wstrict-prototypes -Wmissing-prototypes -DINFLIB_HOST \ - -Iinclude/reactos -Iinclude $(HOST_CFLAGS) + -Iinclude/host -Iinclude $(HOST_CFLAGS) $(INFLIB_HOST_TARGET): $(INFLIB_HOST_OBJECTS) | $(INFLIB_OUT) $(ECHO_HOSTAR) diff --git a/lib/newinflib/CMakeLists.txt b/lib/newinflib/CMakeLists.txt index 901bd996132..bc57ae6b649 100644 --- a/lib/newinflib/CMakeLists.txt +++ b/lib/newinflib/CMakeLists.txt @@ -5,7 +5,7 @@ list(APPEND GLOBAL_FILES infput.c) if(CMAKE_CROSSCOMPILING) - list(APPEND SOURCE + list(APPEND SOURCE infrosgen.c infrosget.c infrosput.c) @@ -13,15 +13,15 @@ if(CMAKE_CROSSCOMPILING) add_library(inflib ${GLOBAL_FILES} ${SOURCE}) add_dependencies(inflib psdk) else() - list(APPEND SOURCE + list(APPEND SOURCE infhostgen.c infhostget.c infhostput.c infhostrtl.c) - add_definitions(-DWINE_UNICODE_API= -D__NO_CTYPE_INLINES -DINFLIB_HOST -DUSE_HOST_WCSFUNCS) + add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST) if(NOT MSVC) - add_definitions(-Wpointer-arith -Wwrite-strings) + add_compiler_flags(-Wpointer-arith -Wwrite-strings) endif() add_library(inflibhost ${GLOBAL_FILES} ${SOURCE}) target_link_libraries(inflibhost unicode) diff --git a/lib/newinflib/builddep.h b/lib/newinflib/builddep.h index 51b4d4850d7..398cb88e236 100644 --- a/lib/newinflib/builddep.h +++ b/lib/newinflib/builddep.h @@ -8,8 +8,7 @@ /* Definitions native to the host on which we're building */ -#include -#include +#include #include #include @@ -82,6 +81,6 @@ extern PVOID InfpHeap; #endif /* INFLIB_HOST */ -#include +#include /* EOF */ diff --git a/lib/pseh/CMakeLists.txt b/lib/pseh/CMakeLists.txt index 23207e13a8a..be835b2c266 100644 --- a/lib/pseh/CMakeLists.txt +++ b/lib/pseh/CMakeLists.txt @@ -14,14 +14,22 @@ if(NOT MSVC) endif() add_library(pseh ${SOURCE}) + target_link_libraries(pseh chkstk) add_dependencies(pseh psdk) else() - list(APPEND SOURCE - dummy.c - i386/seh.s - i386/seh_prolog.s) + if(ARCH MATCHES i386) + list(APPEND SOURCE + dummy.c + i386/seh.s + i386/seh_prolog.s) + elseif(ARCH MATCHES amd64) + list(APPEND SOURCE + dummy.c + amd64/seh.s + amd64/seh_prolog.s) + endif() add_library(pseh ${SOURCE}) add_dependencies(pseh asm) diff --git a/lib/pseh/amd64/seh.s b/lib/pseh/amd64/seh.s new file mode 100644 index 00000000000..14df30687df --- /dev/null +++ b/lib/pseh/amd64/seh.s @@ -0,0 +1,52 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS CRT + * FILE: lib/pseh/amd64/seh.S + * PURPOSE: SEH Support for the CRT + * PROGRAMMERS: + */ + +/* INCLUDES ******************************************************************/ + +#include + +#define DISPOSITION_DISMISS 0 +#define DISPOSITION_CONTINUE_SEARCH 1 +#define DISPOSITION_COLLIDED_UNWIND 3 + +#define EXCEPTION_EXIT_UNWIND 4 +#define EXCEPTION_UNWINDING 2 + + +EXTERN RtlUnwind:PROC + +/* GLOBALS *******************************************************************/ + +PUBLIC _global_unwind2 +PUBLIC _local_unwind2 +PUBLIC _abnormal_termination +PUBLIC _except_handler2 +PUBLIC _except_handler3 + +/* FUNCTIONS *****************************************************************/ + +.code +_unwind_handler: + ret + +_global_unwind2: + ret + +_abnormal_termination: + ret + +_local_unwind2: + ret + +_except_handler2: + ret + +_except_handler3: + ret + +END diff --git a/lib/pseh/amd64/seh_prolog.s b/lib/pseh/amd64/seh_prolog.s new file mode 100644 index 00000000000..d03063534d7 --- /dev/null +++ b/lib/pseh/amd64/seh_prolog.s @@ -0,0 +1,25 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS CRT + * FILE: lib/pseh/amd64/seh_prolog.S + * PURPOSE: SEH Support for MSVC + * PROGRAMMERS: Timo Kreuzer + */ + +/* INCLUDES ******************************************************************/ + +#include + +EXTERN _except_handler3:PROC + +.code + +PUBLIC _SEH_prolog +_SEH_prolog: + + +PUBLIC _SEH_epilog +_SEH_epilog: + ret + +END diff --git a/lib/rossym/CMakeLists.txt b/lib/rossym/CMakeLists.txt index 73387942ae8..2b05860e247 100644 --- a/lib/rossym/CMakeLists.txt +++ b/lib/rossym/CMakeLists.txt @@ -5,6 +5,7 @@ else() add_definitions(-D_NTSYSTEM_) list(APPEND SOURCE delete.c + dwarf386.c dwarfabbrev.c dwarfaranges.c dwarfcfa.c @@ -15,7 +16,9 @@ list(APPEND SOURCE dwarfpubnames.c find.c fromfile.c + iofile.c init.c + initkm.c initum.c pe.c zwfile.c) diff --git a/lib/rossym_new/CMakeLists.txt b/lib/rossym_new/CMakeLists.txt new file mode 100644 index 00000000000..73387942ae8 --- /dev/null +++ b/lib/rossym_new/CMakeLists.txt @@ -0,0 +1,24 @@ + +if(MSVC) +add_library(rossym dummy.c) +else() +add_definitions(-D_NTSYSTEM_) +list(APPEND SOURCE + delete.c + dwarfabbrev.c + dwarfaranges.c + dwarfcfa.c + dwarfinfo.c + dwarfget.c + dwarfopen.c + dwarfpc.c + dwarfpubnames.c + find.c + fromfile.c + init.c + initum.c + pe.c + zwfile.c) +add_library(rossym ${SOURCE}) +add_dependencies(rossym psdk bugcodes) +endif() diff --git a/lib/rossym_new/compat.h b/lib/rossym_new/compat.h new file mode 100644 index 00000000000..375b498fa3e --- /dev/null +++ b/lib/rossym_new/compat.h @@ -0,0 +1,43 @@ +#ifndef _LIBMACH_COMPAT_H_ +#define _LIBMACH_COMPAT_H_ + +/* BSD like types */ +typedef signed char schar; +typedef unsigned char uchar; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef unsigned long long uvlong; + +typedef unsigned short u16int; +typedef short s16int; +typedef unsigned int u32int; +typedef int s32int; +typedef unsigned long long u64int; +typedef long long s64int; + +#ifndef _WIN32 +typedef ulong size_t; +#endif + +#define offsetof(x,y) FIELD_OFFSET(x,y) +#define nil (0) + +#define nelem(arr) (sizeof((arr)[0]) / sizeof((arr))) + +int readn(void *fd, char *buf, ulong len); +int seek(void *fd, ulong off, int mode); + +void *RosSymAllocMemZero(ulong num, ulong size); +void *RosSymRealloc(void *mem, ulong newsize); +void xfree(void *v); + +#define werrstr(str, ...) DPRINT(str "\n" ,##__VA_ARGS__) +//#define werrstr(x, ...) printf("(%s:%d) " x "\n",__FILE__,__LINE__,##__VA_ARGS__) + +#define malloc(x) RosSymAllocMem(x) +#define mallocz(x,y) RosSymAllocMemZero(x,y) +#define free(x) xfree(x) +#define USED(x) (*((char *)&(x)) ^= 0) +#define memset(x,y,z) RtlZeroMemory(x,z) + +#endif/*_LIBMACH_COMPAT_H_*/ diff --git a/lib/rossym_new/delete.c b/lib/rossym_new/delete.c new file mode 100644 index 00000000000..1e6fe8393e2 --- /dev/null +++ b/lib/rossym_new/delete.c @@ -0,0 +1,28 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/delete.c + * PURPOSE: Free rossym info + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include + +#define NDEBUG +#include + +#include "rossympriv.h" +#include "pe.h" +#include "dwarf.h" + +VOID +RosSymDelete(PROSSYM_INFO RosSymInfo) +{ + dwarfclose(RosSymInfo); +} + +/* EOF */ diff --git a/lib/rossym_new/dummy.c b/lib/rossym_new/dummy.c new file mode 100644 index 00000000000..99611230dfd --- /dev/null +++ b/lib/rossym_new/dummy.c @@ -0,0 +1,40 @@ + +#include +#include + +#define NDEBUG +#include + +BOOLEAN +RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo) +{ + return FALSE; +} + +VOID +RosSymDelete(PROSSYM_INFO RosSymInfo) +{ +} + +VOID +RosSymFreeInfo(PROSSYM_LINEINFO LineInfo) +{ +} + +BOOLEAN +RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo, + ULONG_PTR RelativeAddress, + PROSSYM_LINEINFO RosSymLineInfo) +{ + return FALSE; +} + +VOID +RosSymInit(PROSSYM_CALLBACKS Callbacks) +{ +} + +VOID +RosSymInitKernelMode(VOID) +{ +} diff --git a/lib/rossym_new/dwarf.h b/lib/rossym_new/dwarf.h new file mode 100644 index 00000000000..7308d7deab0 --- /dev/null +++ b/lib/rossym_new/dwarf.h @@ -0,0 +1,487 @@ +#include "compat.h" + +typedef struct Dwarf Dwarf; +typedef struct DwarfAttrs DwarfAttrs; +typedef struct DwarfBlock DwarfBlock; +typedef struct DwarfBuf DwarfBuf; +typedef struct DwarfExpr DwarfExpr; +typedef struct DwarfSym DwarfSym; +typedef struct DwarfStack DwarfStack; +typedef struct DwarfParam DwarfParam; +typedef union DwarfVal DwarfVal; + +enum +{ + TagArrayType = 0x01, + TagClassType = 0x02, + TagEntryPoint = 0x03, + TagEnumerationType = 0x04, + TagFormalParameter = 0x05, + TagImportedDeclaration = 0x08, + TagLabel = 0x0A, + TagLexDwarfBlock = 0x0B, + TagMember = 0x0D, + TagPointerType = 0x0F, + TagReferenceType = 0x10, + TagCompileUnit = 0x11, + TagStringType = 0x12, + TagStructType = 0x13, + TagSubroutineType = 0x15, + TagTypedef = 0x16, + TagUnionType = 0x17, + TagUnspecifiedParameters = 0x18, + TagVariant = 0x19, + TagCommonDwarfBlock = 0x1A, + TagCommonInclusion = 0x1B, + TagInheritance = 0x1C, + TagInlinedSubroutine = 0x1D, + TagModule = 0x1E, + TagPtrToMemberType = 0x1F, + TagSetType = 0x20, + TagSubrangeType = 0x21, + TagWithStmt = 0x22, + TagAccessDeclaration = 0x23, + TagBaseType = 0x24, + TagCatchDwarfBlock = 0x25, + TagConstType = 0x26, + TagConstant = 0x27, + TagEnumerator = 0x28, + TagFileType = 0x29, + TagFriend = 0x2A, + TagNamelist = 0x2B, + TagNamelistItem = 0x2C, + TagPackedType = 0x2D, + TagSubprogram = 0x2E, + TagTemplateTypeParameter = 0x2F, + TagTemplateValueParameter = 0x30, + TagThrownType = 0x31, + TagTryDwarfBlock = 0x32, + TagVariantPart = 0x33, + TagVariable = 0x34, + TagVolatileType = 0x35, + TagDwarfProcedure = 0x36, + TagRestrictType = 0x37, + TagInterfaceType = 0x38, + TagNamespace = 0x39, + TagImportedModule = 0x3A, + TagUnspecifiedType = 0x3B, + TagPartialUnit = 0x3C, + TagImportedUnit = 0x3D, + TagMutableType = 0x3E, + + TypeAddress = 0x01, + TypeBoolean = 0x02, + TypeComplexFloat = 0x03, + TypeFloat = 0x04, + TypeSigned = 0x05, + TypeSignedChar = 0x06, + TypeUnsigned = 0x07, + TypeUnsignedChar = 0x08, + TypeImaginaryFloat = 0x09, + + AccessPublic = 0x01, + AccessProtected = 0x02, + AccessPrivate = 0x03, + + VisLocal = 0x01, + VisExported = 0x02, + VisQualified = 0x03, + + VirtNone = 0x00, + VirtVirtual = 0x01, + VirtPureVirtual = 0x02, + + LangC89 = 0x0001, + LangC = 0x0002, + LangAda83 = 0x0003, + LangCplusplus = 0x0004, + LangCobol74 = 0x0005, + LangCobol85 = 0x0006, + LangFortran77 = 0x0007, + LangFortran90 = 0x0008, + LangPascal83 = 0x0009, + LangModula2 = 0x000A, + LangJava = 0x000B, + LangC99 = 0x000C, + LangAda95 = 0x000D, + LangFortran95 = 0x000E, + LangPLI = 0x000F, + /* 0x8000-0xFFFF reserved */ + + IdCaseSensitive = 0x00, + IdCaseUpper = 0x01, + IdCaseLower = 0x02, + IdCaseInsensitive = 0x03, + + CallingNormal = 0x01, + CallingProgram = 0x02, + CallingNocall = 0x03, + /* 0x40-0xFF reserved */ + + InNone = 0x00, + InInlined = 0x01, + InDeclaredNotInlined = 0x02, + InDeclaredInlined = 0x03, + + OrderRowMajor = 0x00, + OrderColumnMajor = 0x01, + + DiscLabel = 0x00, + DiscRange = 0x01, + + TReference = 1<<0, + TBlock = 1<<1, + TConstant = 1<<2, + TString = 1<<3, + TFlag = 1<<4, + TAddress = 1<<5, + + OpAddr = 0x03, /* 1 op, const addr */ + OpDeref = 0x06, + OpConst1u = 0x08, /* 1 op, 1 byte const */ + OpConst1s = 0x09, /* " signed */ + OpConst2u = 0x0A, /* 1 op, 2 byte const */ + OpConst2s = 0x0B, /* " signed */ + OpConst4u = 0x0C, /* 1 op, 4 byte const */ + OpConst4s = 0x0D, /* " signed */ + OpConst8u = 0x0E, /* 1 op, 8 byte const */ + OpConst8s = 0x0F, /* " signed */ + OpConstu = 0x10, /* 1 op, LEB128 const */ + OpConsts = 0x11, /* " signed */ + OpDup = 0x12, + OpDrop = 0x13, + OpOver = 0x14, + OpPick = 0x15, /* 1 op, 1 byte stack index */ + OpSwap = 0x16, + OpRot = 0x17, + OpXderef = 0x18, + OpAbs = 0x19, + OpAnd = 0x1A, + OpDiv = 0x1B, + OpMinus = 0x1C, + OpMod = 0x1D, + OpMul = 0x1E, + OpNeg = 0x1F, + OpNot = 0x20, + OpOr = 0x21, + OpPlus = 0x22, + OpPlusUconst = 0x23, /* 1 op, ULEB128 addend */ + OpShl = 0x24, + OpShr = 0x25, + OpShra = 0x26, + OpXor = 0x27, + OpSkip = 0x2F, /* 1 op, signed 2-byte constant */ + OpBra = 0x28, /* 1 op, signed 2-byte constant */ + OpEq = 0x29, + OpGe = 0x2A, + OpGt = 0x2B, + OpLe = 0x2C, + OpLt = 0x2D, + OpNe = 0x2E, + OpLit0 = 0x30, + /* OpLitN = OpLit0 + N for N = 0..31 */ + OpReg0 = 0x50, + /* OpRegN = OpReg0 + N for N = 0..31 */ + OpBreg0 = 0x70, /* 1 op, signed LEB128 constant */ + /* OpBregN = OpBreg0 + N for N = 0..31 */ + OpRegx = 0x90, /* 1 op, ULEB128 register */ + OpFbreg = 0x91, /* 1 op, SLEB128 offset */ + OpBregx = 0x92, /* 2 op, ULEB128 reg, SLEB128 off */ + OpPiece = 0x93, /* 1 op, ULEB128 size of piece */ + OpDerefSize = 0x94, /* 1-byte size of data retrieved */ + OpXderefSize = 0x95, /* 1-byte size of data retrieved */ + OpNop = 0x96, + /* next four new in Dwarf v3 */ + OpPushObjAddr = 0x97, + OpCall2 = 0x98, /* 2-byte offset of DIE */ + OpCall4 = 0x99, /* 4-byte offset of DIE */ + OpCallRef = 0x9A /* 4- or 8- byte offset of DIE */ + /* 0xE0-0xFF reserved for user-specific */ +}; + +struct DwarfBlock +{ + uchar *data; + ulong len; +}; + +struct DwarfParam +{ + char *name; + ulong unit; + ulong type; + ulong loctype; + ulong fde, len; + ulong value; +}; + +/* not for consumer use */ +struct DwarfBuf +{ + Dwarf *d; + uchar *p; + uchar *ep; + uint addrsize; +}; + +union DwarfVal +{ + char *s; + ulong c; + ulong r; + DwarfBlock b; +}; + +struct DwarfAttrs +{ + ulong tag; + uchar haskids; + + /* whether we have it, along with type */ + struct { + uchar abstractorigin; + uchar accessibility; + uchar addrclass; + uchar basetypes; + uchar bitoffset; + uchar bitsize; + uchar bytesize; + uchar calling; + uchar commonref; + uchar compdir; + uchar constvalue; + uchar containingtype; + uchar count; + uchar datamemberloc; + uchar declcolumn; + uchar declfile; + uchar declline; + uchar defaultvalue; + uchar discr; + uchar discrlist; + uchar discrvalue; + uchar encoding; + uchar framebase; + uchar friend; + uchar highpc; + uchar entrypc; + uchar identifiercase; + uchar import; + uchar inlined; + uchar isartificial; + uchar isdeclaration; + uchar isexternal; + uchar isoptional; + uchar isprototyped; + uchar isvarparam; + uchar language; + uchar location; + uchar lowerbound; + uchar lowpc; + uchar macroinfo; + uchar name; + uchar namelistitem; + uchar ordering; + uchar priority; + uchar producer; + uchar ranges; + uchar returnaddr; + uchar segment; + uchar sibling; + uchar specification; + uchar startscope; + uchar staticlink; + uchar stmtlist; + uchar stridesize; + uchar stringlength; + uchar type; + uchar upperbound; + uchar uselocation; + uchar virtuality; + uchar visibility; + uchar vtableelemloc; + } have; + + ulong abstractorigin; + ulong accessibility; + ulong addrclass; + ulong basetypes; + ulong bitoffset; + ulong bitsize; + ulong bytesize; + ulong calling; + ulong commonref; + char* compdir; + DwarfVal constvalue; + ulong containingtype; + ulong count; + DwarfVal datamemberloc; + ulong declcolumn; + ulong declfile; + ulong declline; + ulong defaultvalue; + ulong discr; + DwarfBlock discrlist; + ulong discrvalue; + ulong encoding; + DwarfVal framebase; + ulong friend; + ulong highpc; + ulong entrypc; + ulong identifiercase; + ulong import; + ulong inlined; + uchar isartificial; + uchar isdeclaration; + uchar isexternal; + uchar isoptional; + uchar isprototyped; + uchar isvarparam; + ulong language; + DwarfVal location; + ulong lowerbound; + ulong lowpc; + ulong macroinfo; + char* name; + DwarfBlock namelistitem; + ulong ordering; + ulong priority; + char* producer; + ulong ranges; + DwarfVal returnaddr; + DwarfVal segment; + ulong sibling; + ulong specification; + ulong startscope; + DwarfVal staticlink; + ulong stmtlist; + ulong stridesize; + DwarfVal stringlength; + ulong type; + ulong upperbound; + DwarfVal uselocation; + ulong virtuality; + ulong visibility; + DwarfVal vtableelemloc; +}; + +enum +{ + RuleUndef, + RuleSame, + RuleCfaOffset, + RuleRegister, + RuleRegOff, + RuleLocation +}; +struct DwarfExpr +{ + int type; + long offset; + ulong reg; + DwarfBlock loc; +}; + +struct DwarfSym +{ + DwarfAttrs attrs; + +/* not for consumer use... */ + uint num; + DwarfBuf b; + int depth; + ulong unit, childoff, nextunit; + ulong aoff; +}; + +struct _Pe; +Dwarf *dwarfopen(struct _Pe *elf); +void dwarfclose(Dwarf*); +int dwarfaddrtounit(Dwarf*, ulong, ulong*); +int dwarflookupfn(Dwarf*, ulong, ulong, DwarfSym*); +int dwarflookupname(Dwarf*, char*, DwarfSym*); +int dwarflookupnameinunit(Dwarf*, ulong, char*, DwarfSym*); +int dwarflookupsubname(Dwarf*, DwarfSym*, char*, DwarfSym*); +int dwarflookuptag(Dwarf*, ulong, ulong, DwarfSym*); +int dwarfenumunit(Dwarf*, ulong, DwarfSym*); +int dwarfseeksym(Dwarf*, ulong, ulong, DwarfSym*); +int dwarfenum(Dwarf*, DwarfSym*); +int dwarfnextsym(Dwarf*, DwarfSym*); +int dwarfnextsymat(Dwarf*, DwarfSym *parent, DwarfSym *child); +int dwarfpctoline(Dwarf*, DwarfSym *proc, ulong, char**, char**, ulong *); +int dwarfgetarg(Dwarf *d, const char *name, DwarfBuf *locbuf, ulong cfa, PROSSYM_REGISTERS registers, ulong *value); +int dwarfgettype(Dwarf *d, DwarfSym *param, DwarfSym *type); + +ulong dwarfget1(DwarfBuf*); +ulong dwarfget2(DwarfBuf*); +ulong dwarfget4(DwarfBuf*); +uvlong dwarfget8(DwarfBuf*); +ulong dwarfget128(DwarfBuf*); +long dwarfget128s(DwarfBuf*); +ulong dwarfgetaddr(DwarfBuf*); +int dwarfgetn(DwarfBuf*, uchar*, int); +uchar *dwarfgetnref(DwarfBuf*, ulong); +char *dwarfgetstring(DwarfBuf*); +int dwarfcomputecfa(Dwarf *d, DwarfExpr *cfa, PROSSYM_REGISTERS registers, ulong *cfaLocation); +int dwarfregunwind(Dwarf *d, ulong pc, ulong fde, DwarfExpr *cfa, PROSSYM_REGISTERS registers); +int dwarfargvalue(Dwarf *d, DwarfSym *proc, ulong pc, ulong cfa, PROSSYM_REGISTERS registers, DwarfParam *parameters); +int dwarfgetparams(Dwarf *d, DwarfSym *s, ulong pc, int pnum, DwarfParam *paramblocks); + +typedef struct DwarfAbbrev DwarfAbbrev; +typedef struct DwarfAttr DwarfAttr; + +struct DwarfAttr +{ + ulong name; + ulong form; +}; + +struct DwarfAbbrev +{ + ulong num; + ulong tag; + uchar haskids; + DwarfAttr *attr; + int nattr; +}; + +struct _Pe; + +struct Dwarf +{ + struct _Pe *pe; + + char **reg; + int nreg; + int addrsize; + DwarfBlock abbrev; + DwarfBlock aranges; + DwarfBlock frame; + DwarfBlock info; + DwarfBlock line; + DwarfBlock pubnames; + DwarfBlock pubtypes; + DwarfBlock ranges; + DwarfBlock str; + DwarfBlock loc; + + /* little cache */ + struct { + DwarfAbbrev *a; + int na; + ulong off; + } acache; +}; + +struct DwarfStack +{ + ulong storage[16]; // own storage + ulong *data; + ulong length, max; +}; + +DwarfAbbrev *dwarfgetabbrev(Dwarf*, ulong, ulong); + +int dwarfgetinfounit(Dwarf*, ulong, DwarfBlock*); + +#define MAXIMUM_DWARF_NAME_SIZE 64 diff --git a/lib/rossym_new/dwarf386.c b/lib/rossym_new/dwarf386.c new file mode 100644 index 00000000000..80a594b01a7 --- /dev/null +++ b/lib/rossym_new/dwarf386.c @@ -0,0 +1,25 @@ +#if 0 +#include +#include +#include +#include "elf.h" +#endif +#include "dwarf.h" + +char* +dwarf386regs[] = +{ + "AX", + "CX", + "DX", + "BX", + "SP", + "BP", + "SI", + "DI", +}; + +int dwarf386nregs = nelem(dwarf386regs); + + + diff --git a/lib/rossym_new/dwarfabbrev.c b/lib/rossym_new/dwarfabbrev.c new file mode 100644 index 00000000000..365d44232d4 --- /dev/null +++ b/lib/rossym_new/dwarfabbrev.c @@ -0,0 +1,143 @@ +/* + * Dwarf abbreviation parsing code. + * + * The convention here is that calling dwarfgetabbrevs relinquishes + * access to any abbrevs returned previously. Will have to add + * explicit reference counting if this turns out not to be acceptable. + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "rossym.h" +#include "rossympriv.h" +#include "dwarf.h" + +static int parseabbrevs(Dwarf*, ulong, DwarfAbbrev*, DwarfAttr*, int*, int*); +DwarfAbbrev *dwarfgetabbrev(Dwarf*, ulong, ulong); + +static int +loadabbrevs(Dwarf *d, ulong off, DwarfAbbrev **aa) +{ + int nattr, nabbrev; + DwarfAbbrev *abbrev; + DwarfAttr *attr; + + if(d->acache.off == off && d->acache.na){ + *aa = d->acache.a; + return d->acache.na; + } + + /* two passes - once to count, then allocate, then a second to copy */ + if(parseabbrevs(d, off, nil, nil, &nabbrev, &nattr) < 0) { + return -1; + } + + abbrev = malloc(nabbrev*sizeof(DwarfAbbrev) + nattr*sizeof(DwarfAttr)); + attr = (DwarfAttr*)(abbrev+nabbrev); + + if(parseabbrevs(d, off, abbrev, attr, nil, nil) < 0){ + free(abbrev); + return -1; + } + + free(d->acache.a); + d->acache.a = abbrev; + d->acache.na = nabbrev; + d->acache.off = off; + + *aa = abbrev; + return nabbrev; +} + +static int +parseabbrevs(Dwarf *d, ulong off, DwarfAbbrev *abbrev, DwarfAttr *attr, int *pnabbrev, int *pnattr) +{ + int i, nabbrev, nattr, haskids; + ulong num, tag, name, form; + DwarfBuf b; + + if(off >= d->abbrev.len){ + werrstr("bad abbrev section offset 0x%lux >= 0x%lux", off, d->abbrev.len); + return -1; + } + + memset(&b, 0, sizeof b); + b.p = d->abbrev.data + off; + b.ep = d->abbrev.data + d->abbrev.len; + + nabbrev = 0; + nattr = 0; + for(;;){ + if(b.p == nil){ + werrstr("malformed abbrev data"); + return -1; + } + num = dwarfget128(&b); + if(num == 0) + break; + tag = dwarfget128(&b); + DPRINT("num %d tag %x @ %x", num, tag, b.p - d->abbrev.data); + haskids = dwarfget1(&b); + for(i=0;; i++){ + name = dwarfget128(&b); + form = dwarfget128(&b); + assert(form < 0x3000); + if(name == 0 && form == 0) + break; + if(attr){ + attr[i].name = name; + attr[i].form = form; + } + } + if(abbrev){ + abbrev->num = num; + abbrev->tag = tag; + abbrev->haskids = haskids; + abbrev->attr = attr; + abbrev->nattr = i; + abbrev++; + attr += i; + } + nabbrev++; + nattr += i; + } + if(pnabbrev) + *pnabbrev = nabbrev; + if(pnattr) + *pnattr = nattr; + return 0; +} + +static DwarfAbbrev* +findabbrev(DwarfAbbrev *a, int na, ulong num) +{ + int i; + + for(i=0; i +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "dwarf.h" + +int +dwarfaddrtounit(Dwarf *d, ulong addr, ulong *unit) +{ + DwarfBuf b; + int segsize, i; + ulong len, id, off, base, size; + uchar *start, *end; + + memset(&b, 0, sizeof b); + b.d = d; + b.p = d->aranges.data; + b.ep = b.p + d->aranges.len; + + while(b.p < b.ep){ + start = b.p; + len = dwarfget4(&b); + if (!len) { b.ep = b.p - 4; return -1; } + if((id = dwarfget2(&b)) != 2){ + if(b.p == nil){ + underflow: + werrstr("buffer underflow reading address ranges header"); + }else + werrstr("bad dwarf version 0x%x in address ranges header", id); + return -1; + } + off = dwarfget4(&b); + b.addrsize = dwarfget1(&b); + if(d->addrsize == 0) + d->addrsize = b.addrsize; + segsize = dwarfget1(&b); + USED(segsize); /* what am i supposed to do with this? */ + if(b.p == nil) + goto underflow; + if((i = (b.p-start) % (2*b.addrsize)) != 0) + b.p += 2*b.addrsize - i; + end = start+4+len; + while(b.p!=nil && b.pline mapping, but it's a different machine. + * The expressions to generate the old values are similar in function to the + * ``dwarf expressions'' used for locations in the code, but of course not + * the same encoding. + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "pe.h" +#include "dwarf.h" + +#define trace 1 + +typedef struct State State; +struct State +{ + ulong loc; + ulong endloc; + ulong iquantum; + ulong dquantum; + char *augmentation; + int version; + ulong rareg; + DwarfBuf init; + DwarfExpr *cfa; + DwarfExpr *ra; + DwarfExpr *r; + DwarfExpr *initr; + int nr; + DwarfExpr **stack; + int nstack; +}; + +static int findfde(Dwarf*, ulong, State*, DwarfBuf*); +static int dexec(DwarfBuf*, State*, int); + +int +dwarfunwind(Dwarf *d, ulong pc, DwarfExpr *cfa, DwarfExpr *ra, DwarfExpr *r, int nr) +{ + int i, ret; + DwarfBuf fde, b; + DwarfExpr *initr; + State s; + + initr = mallocz(nr*sizeof(initr[0]), 1); + if(initr == 0) + return -1; + + memset(&s, 0, sizeof s); + s.loc = 0; + s.cfa = cfa; + s.ra = ra; + s.r = r; + s.nr = nr; + + if(findfde(d, pc, &s, &fde) < 0){ + free(initr); + return -1; + } + + memset(r, 0, nr*sizeof(r[0])); + for(i=0; iframe.data == nil){ + werrstr("no frame debugging information"); + return -1; + } + b.d = d; + b.p = d->frame.data; + b.ep = b.p + d->frame.len; + b.addrsize = d->addrsize; + if(b.addrsize == 0) + b.addrsize = 4; /* where should i find this? */ + + for(; b.p < b.ep; b.p = next){ + if((i = (b.p - d->frame.data) % b.addrsize)) + b.p += b.addrsize - i; + len = dwarfget4(&b); + if(len > b.ep-b.p){ + werrstr("bad length in cie/fde header"); + return -1; + } + next = b.p+len; + id = dwarfget4(&b); + if(id == 0xFFFFFFFF){ /* CIE */ + vers = dwarfget1(&b); + if (trace) werrstr("CIE len %x id %x vers %x", len, id, vers); + if(vers != 1 && vers != 2 && vers != 3){ + if(++nbad == 1) + werrstr("unknown cie version %d (wanted 1-3)", vers); + continue; + } + aug = dwarfgetstring(&b); + if(aug && *aug){ + if(++nbad == 1) + werrstr("unknown augmentation: %s", aug); + continue; + } + s->iquantum = dwarfget128(&b); + s->dquantum = dwarfget128s(&b); + s->rareg = dwarfget128(&b); + if(s->rareg > s->nr){ + werrstr("return address is register %d but only have %d registers", + s->rareg, s->nr); + return -1; + } + s->init.p = b.p; + s->init.ep = next; + }else{ /* FDE */ + base = dwarfgetaddr(&b); + size = dwarfgetaddr(&b); + if (trace) werrstr("FDE: base %x-%x (want pc %x)", base, base+size, pc); + fde->p = b.p; + fde->ep = next; + s->loc = base; + s->endloc = base+size; + if(base <= pc && pc < base+size) + return 0; + } + } + werrstr("cannot find call frame information for pc 0x%lx", pc); + return -1; + +} + +static int +checkreg(State *s, long r) +{ + if(r < 0 || r >= s->nr){ + werrstr("bad register number 0x%lx", r); + return -1; + } + return 0; +} + +static int +dexec(DwarfBuf *b, State *s, int locstop) +{ + int c; + long arg1, arg2; + DwarfExpr *e; + + for(;;){ + if(b->p == b->ep){ + if(s->initr) + s->loc = s->endloc; + werrstr("end dexec"); + return 0; + } + c = dwarfget1(b); + if(b->p == nil){ + werrstr("ran out of instructions during cfa program"); + if(trace) werrstr("%r"); + return -1; + } + if(trace) werrstr("+ loc=0x%x op 0x%x ", s->loc, c); + switch(c>>6){ + case 1: /* advance location */ + arg1 = c&0x3F; + advance: + if(trace) werrstr("loc += %ld", arg1*s->iquantum); + s->loc += arg1 * s->iquantum; + if(locstop) + return 0; + continue; + + case 2: /* offset rule */ + arg1 = c&0x3F; + arg2 = dwarfget128(b); + offset: + if(trace) werrstr("r%ld += %ld", arg1, arg2*s->dquantum); + if(checkreg(s, arg1) < 0) + return -1; + s->r[arg1].type = RuleCfaOffset; + s->r[arg1].offset = arg2 * s->dquantum; + continue; + + case 3: /* restore initial setting */ + arg1 = c&0x3F; + restore: + if(trace) werrstr("r%ld = init", arg1); + if(checkreg(s, arg1) < 0) + return -1; + s->r[arg1] = s->initr[arg1]; + continue; + } + + switch(c){ + case 0: /* nop */ + if(trace) werrstr("nop"); + continue; + + case 0x01: /* set location */ + s->loc = dwarfgetaddr(b); + if(trace) werrstr("loc = 0x%lx", s->loc); + if(locstop) + return 0; + continue; + + case 0x02: /* advance loc1 */ + arg1 = dwarfget1(b); + goto advance; + + case 0x03: /* advance loc2 */ + arg1 = dwarfget2(b); + goto advance; + + case 0x04: /* advance loc4 */ + arg1 = dwarfget4(b); + goto advance; + + case 0x05: /* offset extended */ + arg1 = dwarfget128(b); + arg2 = dwarfget128(b); + goto offset; + + case 0x06: /* restore extended */ + arg1 = dwarfget128(b); + goto restore; + + case 0x07: /* undefined */ + arg1 = dwarfget128(b); + if(trace) werrstr("r%ld = undef", arg1); + if(checkreg(s, arg1) < 0) + return -1; + s->r[arg1].type = RuleUndef; + continue; + + case 0x08: /* same value */ + arg1 = dwarfget128(b); + if(trace) werrstr("r%ld = same", arg1); + if(checkreg(s, arg1) < 0) + return -1; + s->r[arg1].type = RuleSame; + continue; + + case 0x09: /* register */ + arg1 = dwarfget128(b); + arg2 = dwarfget128(b); + if(trace) werrstr("r%ld = r%ld", arg1, arg2); + if(checkreg(s, arg1) < 0 || checkreg(s, arg2) < 0) + return -1; + s->r[arg1].type = RuleRegister; + s->r[arg1].reg = arg2; + continue; + + case 0x0A: /* remember state */ + e = malloc(s->nr*sizeof(e[0])); + if(trace) werrstr("push"); + if(e == nil) + return -1; + void *newstack = malloc(s->nstack*sizeof(s->stack[0])); + RtlMoveMemory(newstack, s->stack, s->nstack*sizeof(s->stack[0])); + if (newstack) { + free(s->stack); + s->stack = newstack; + } else { + free(e); + return -1; + } + if(b->p == nil){ + free(e); + return -1; + } + s->stack[s->nstack++] = e; + memmove(e, s->r, s->nr*sizeof(e[0])); + continue; + + case 0x0B: /* restore state */ + if(trace) werrstr("pop"); + if(s->nstack == 0){ + werrstr("restore state underflow"); + return -1; + } + e = s->stack[s->nstack-1]; + memmove(s->r, e, s->nr*sizeof(e[0])); + free(e); + s->nstack--; + continue; + + case 0x0C: /* def cfa */ + arg1 = dwarfget128(b); + arg2 = dwarfget128(b); + defcfa: + if(trace) werrstr("cfa %ld(r%ld)", arg2, arg1); + if(checkreg(s, arg1) < 0) + return -1; + s->cfa->type = RuleRegOff; + s->cfa->reg = arg1; + s->cfa->offset = arg2; + continue; + + case 0x0D: /* def cfa register */ + arg1 = dwarfget128(b); + if(trace) werrstr("cfa reg r%ld", arg1); + if(s->cfa->type != RuleRegOff){ + werrstr("change CFA register but CFA not in register+offset form"); + return -1; + } + if(checkreg(s, arg1) < 0) + return -1; + s->cfa->reg = arg1; + continue; + + case 0x0E: /* def cfa offset */ + arg1 = dwarfget128(b); + cfaoffset: + if(trace) werrstr("cfa off %ld", arg1); + if(s->cfa->type != RuleRegOff){ + werrstr("change CFA offset but CFA not in register+offset form"); + return -1; + } + s->cfa->offset = arg1; + continue; + + case 0x0F: /* def cfa expression */ + if(trace) werrstr("cfa expr"); + s->cfa->type = RuleLocation; + s->cfa->loc.len = dwarfget128(b); + s->cfa->loc.data = dwarfgetnref(b, s->cfa->loc.len); + continue; + + case 0x10: /* def reg expression */ + arg1 = dwarfget128(b); + if(trace) werrstr("reg expr r%ld", arg1); + if(checkreg(s, arg1) < 0) + return -1; + s->r[arg1].type = RuleLocation; + s->r[arg1].loc.len = dwarfget128(b); + s->r[arg1].loc.data = dwarfgetnref(b, s->r[arg1].loc.len); + continue; + + case 0x11: /* offset extended */ + arg1 = dwarfget128(b); + arg2 = dwarfget128s(b); + goto offset; + + case 0x12: /* cfa sf */ + arg1 = dwarfget128(b); + arg2 = dwarfget128s(b); + goto defcfa; + + case 0x13: /* cfa offset sf */ + arg1 = dwarfget128s(b); + goto cfaoffset; + + default: /* unknown */ + werrstr("unknown opcode 0x%x in cfa program", c); + return -1; + } + } + /* not reached */ +} + +int dwarfcomputecfa(Dwarf *d, DwarfExpr *cfa, PROSSYM_REGISTERS registers, ulong *cfaLocation) +{ + switch (cfa->type) { + case RuleRegOff: + *cfaLocation = registers->Registers[cfa->reg] + cfa->offset; + werrstr("cfa reg %d (%x) offset %x = %x", cfa->reg, (ulong)registers->Registers[cfa->reg], cfa->offset, cfaLocation); + break; + default: + werrstr("cfa->type %x", cfa->type); + return -1; + } + + return 0; +} + +int dwarfregunwind(Dwarf *d, ulong pc, ulong fde, DwarfExpr *cfa, PROSSYM_REGISTERS registers) +{ + int i; + State s = { }; + DwarfExpr initr[sizeof(registers->Registers) / sizeof(registers->Registers[0])] = { }; + DwarfExpr r[sizeof(registers->Registers) / sizeof(registers->Registers[0])] = { }; + DwarfExpr ra; + + int nr = s.nr = sizeof(registers->Registers) / sizeof(registers->Registers[0]); + s.initr = initr; + s.r = r; + for (i = 0; i < sizeof(r) / sizeof(r[0]); i++) { + r[i].type = RuleRegister; + r[i].offset = registers->Registers[i]; + r[i].reg = i; + } + + int res = dwarfunwind(d, pc, cfa, &ra, initr, sizeof(initr) / sizeof(initr[0])); + if (res == -1) return -1; + + ulong cfaLocation; + + if (dwarfcomputecfa(d, cfa, registers, &cfaLocation) == -1) + return -1; + + for (i = 0; i < nr; i++) { + switch (r[i].type) { + case RuleUndef: + werrstr("Undefined register slot %d", i); + assert(FALSE); + break; + case RuleSame: + break; + case RuleRegister: + registers->Registers[i] = registers->Registers[r[i].reg]; + break; + case RuleRegOff: { + BOOLEAN success = + RosSymCallbacks.MemGetProc + (d->pe->fd, + ®isters->Registers[i], + r[i].offset + registers->Registers[r[i].reg], + d->addrsize); + if (!success) return -1; + } break; + case RuleCfaOffset: + { + BOOLEAN success = + RosSymCallbacks.MemGetProc + (d->pe->fd, + ®isters->Registers[i], + r[i].offset + cfaLocation, + d->addrsize); + werrstr("reg[%d] = %x: cfa offset (cfa %x, offset %x) -> @%x", i, (ulong)registers->Registers[i], cfaLocation, initr[i].offset, r[i].offset + cfaLocation); + if (!success) return -1; + } break; + default: + werrstr("We don't yet support cfa rule %d in slot %d", r[i].type, i); + assert(FALSE); + break; + } + } + + ulong cfaSpace[4]; + for (i = 0; i < sizeof(cfaSpace) / sizeof(cfaSpace[0]); i++) { + RosSymCallbacks.MemGetProc + (d->pe->fd, &cfaSpace[i], cfaLocation + (i * 4), d->addrsize); + } + werrstr("CFA(%x) [%08x, %08x, %08x, %08x]", + cfaLocation, cfaSpace[0], cfaSpace[1], cfaSpace[2], cfaSpace[3]); + + return 0; +} diff --git a/lib/rossym_new/dwarfdump.c b/lib/rossym_new/dwarfdump.c new file mode 100644 index 00000000000..94f0cd3575b --- /dev/null +++ b/lib/rossym_new/dwarfdump.c @@ -0,0 +1,143 @@ +#if 0 +#include +#include +#include +#include "elf.h" +#endif +#include "dwarf.h" +#include "pe.h" + +void printrules(Dwarf *d, ulong pc); +//int exprfmt(Fmt*); + +void +usage(void) +{ + fprint(2, "usage: dwarfdump file\n"); + exits("usage"); +} + +void +main(int argc, char **argv) +{ + int c; + Pe *pe; + Dwarf *d; + DwarfSym s; + char *cdir, *dir, *file; + ulong line, mtime, length; + + if(argc != 2) + usage(); + +#if 0 + fmtinstall('R', exprfmt); + fmtinstall('H', encodefmt); +#endif + + if((pe = peopen(argv[1])) == nil) + sysfatal("elfopen %s: %r", argv[1]); + if((d=dwarfopen(pe)) == nil) + sysfatal("dwarfopen: %r"); + + if(dwarfenum(d, &s) < 0) + sysfatal("dwarfenumall: %r"); + + while(dwarfnextsym(d, &s) == 1){ + switch(s.attrs.tag){ + case TagCompileUnit: + print("compileunit %s\n", s.attrs.name); + break; + case TagSubprogram: + c = 't'; + goto sym; + case TagVariable: + c = 'd'; + goto sym; + case TagConstant: + c = 'c'; + goto sym; + case TagFormalParameter: + if(!s.attrs.name) + break; + c = 'p'; + sym: + if(s.attrs.isexternal) + c += 'A' - 'a'; + print("%c %s", c, s.attrs.name); + if(s.attrs.have.lowpc) + print(" 0x%lux-0x%lux", s.attrs.lowpc, s.attrs.highpc); + switch(s.attrs.have.location){ + case TBlock: + print(" @ %.*H", s.attrs.location.b.len, s.attrs.location.b.data); + break; + case TConstant: + print(" @ 0x%lux", s.attrs.location.c); + break; + } + if(s.attrs.have.ranges) + print(" ranges@0x%lux", s.attrs.ranges); + print("\n"); + if(s.attrs.have.lowpc){ + if(dwarfpctoline(d, s.attrs.lowpc, &cdir, &dir, &file, &line, &mtime, &length) < 0) + print("\tcould not find source: %r\n"); + else if(dir == nil) + print("\t%s/%s:%lud mtime=%lud length=%lud\n", + cdir, file, line, mtime, length); + else + print("\t%s/%s/%s:%lud mtime=%lud length=%lud\n", + cdir, dir, file, line, mtime, length); + + if(0) printrules(d, s.attrs.lowpc); + if(0) printrules(d, (s.attrs.lowpc+s.attrs.highpc)/2); + } + break; + } + } + exits(0); +} + +void +printrules(Dwarf *d, ulong pc) +{ + int i; + DwarfExpr r[10]; + DwarfExpr cfa, ra; + + if(dwarfunwind(d, pc, &cfa, &ra, r, nelem(r)) < 0) + print("\tcannot unwind from pc 0x%lux: %r\n", pc); + + print("\tpc=0x%lux cfa=%R ra=%R", pc, &cfa, &ra); + for(i=0; iargs, DwarfExpr*)) == nil) + return fmtstrcpy(fmt, ""); + + switch(e->type){ + case RuleUndef: + return fmtstrcpy(fmt, "undef"); + case RuleSame: + return fmtstrcpy(fmt, "same"); + case RuleCfaOffset: + return fmtprint(fmt, "%ld(cfa)", e->offset); + case RuleRegister: + return fmtprint(fmt, "r%ld", e->reg); + case RuleRegOff: + return fmtprint(fmt, "%ld(r%ld)", e->offset, e->reg); + case RuleLocation: + return fmtprint(fmt, "l.%.*H", e->loc.len, e->loc.data); + default: + return fmtprint(fmt, "?%d", e->type); + } +} +#endif diff --git a/lib/rossym_new/dwarfeval.c b/lib/rossym_new/dwarfeval.c new file mode 100644 index 00000000000..6d0233fed6c --- /dev/null +++ b/lib/rossym_new/dwarfeval.c @@ -0,0 +1,61 @@ + OpAddr = 0x03, /* 1 op, const addr */ + OpDeref = 0x06, + OpConst1u = 0x08, /* 1 op, 1 byte const */ + OpConst1s = 0x09, /* " signed */ + OpConst2u = 0x0A, /* 1 op, 2 byte const */ + OpConst2s = 0x0B, /* " signed */ + OpConst4u = 0x0C, /* 1 op, 4 byte const */ + OpConst4s = 0x0D, /* " signed */ + OpConst8u = 0x0E, /* 1 op, 8 byte const */ + OpConst8s = 0x0F, /* " signed */ + OpConstu = 0x10, /* 1 op, LEB128 const */ + OpConsts = 0x11, /* " signed */ + OpDup = 0x12, + OpDrop = 0x13, + OpOver = 0x14, + OpPick = 0x15, /* 1 op, 1 byte stack index */ + OpSwap = 0x16, + OpRot = 0x17, + OpXderef = 0x18, + OpAbs = 0x19, + OpAnd = 0x1A, + OpDiv = 0x1B, + OpMinus = 0x1C, + OpMod = 0x1D, + OpMul = 0x1E, + OpNeg = 0x1F, + OpNot = 0x20, + OpOr = 0x21, + OpPlus = 0x22, + OpPlusUconst = 0x23, /* 1 op, ULEB128 addend */ + OpShl = 0x24, + OpShr = 0x25, + OpShra = 0x26, + OpXor = 0x27, + OpSkip = 0x2F, /* 1 op, signed 2-byte constant */ + OpBra = 0x28, /* 1 op, signed 2-byte constant */ + OpEq = 0x29, + OpGe = 0x2A, + OpGt = 0x2B, + OpLe = 0x2C, + OpLt = 0x2D, + OpNe = 0x2E, + OpLit0 = 0x30, + /* OpLitN = OpLit0 + N for N = 0..31 */ + OpReg0 = 0x50, + /* OpRegN = OpReg0 + N for N = 0..31 */ + OpBreg0 = 0x70, /* 1 op, signed LEB128 constant */ + /* OpBregN = OpBreg0 + N for N = 0..31 */ + OpRegx = 0x90, /* 1 op, ULEB128 register */ + OpFbreg = 0x91, /* 1 op, SLEB128 offset */ + OpBregx = 0x92, /* 2 op, ULEB128 reg, SLEB128 off */ + OpPiece = 0x93, /* 1 op, ULEB128 size of piece */ + OpDerefSize = 0x94, /* 1-byte size of data retrieved */ + OpXderefSize = 0x95, /* 1-byte size of data retrieved */ + OpNop = 0x96, + /* next four new in Dwarf v3 */ + OpPushObjAddr = 0x97, + OpCall2 = 0x98, /* 2-byte offset of DIE */ + OpCall4 = 0x99, /* 4-byte offset of DIE */ + OpCallRef = 0x9A, /* 4- or 8- byte offset of DIE */ + /* 0xE0-0xFF reserved for user-specific */ diff --git a/lib/rossym_new/dwarfget.c b/lib/rossym_new/dwarfget.c new file mode 100644 index 00000000000..7787163a21b --- /dev/null +++ b/lib/rossym_new/dwarfget.c @@ -0,0 +1,225 @@ +/* + * Dwarf data format parsing routines. + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "dwarf.h" +#include "pe.h" + +ulong +dwarfget1(DwarfBuf *b) +{ + if(b->p==nil || b->p+1 > b->ep){ + b->p = nil; + return 0; + } + return *b->p++; +} + +int +dwarfgetn(DwarfBuf *b, uchar *a, int n) +{ + if(b->p==nil || b->p+n > b->ep){ + b->p = nil; + memset(a, 0, n); + return -1; + } + memmove(a, b->p, n); + b->p += n; + return 0; +} + +uchar* +dwarfgetnref(DwarfBuf *b, ulong n) +{ + uchar *p; + + if(b->p==nil || b->p+n > b->ep){ + b->p = nil; + return nil; + } + p = b->p; + b->p += n; + return p; +} + +char* +dwarfgetstring(DwarfBuf *b) +{ + char *s; + + if(b->p == nil) + return nil; + s = (char*)b->p; + while(b->p < b->ep && *b->p) + b->p++; + if(b->p >= b->ep){ + b->p = nil; + return nil; + } + b->p++; + return s; +} + +void +dwarfskip(DwarfBuf *b, int n) +{ + if(b->p==nil || b->p+n > b->ep) + b->p = nil; + else + b->p += n; +} + +ulong +dwarfget2(DwarfBuf *b) +{ + ulong v; + + if(b->p==nil || b->p+2 > b->ep){ + b->p = nil; + return 0; + } + v = b->d->pe->e2(b->p); + b->p += 2; + return v; +} + +ulong +dwarfget4(DwarfBuf *b) +{ + ulong v; + + if(b->p==nil || b->p+4 > b->ep){ + b->p = nil; + return 0; + } + v = b->d->pe->e4(b->p); + b->p += 4; + return v; +} + +uvlong +dwarfget8(DwarfBuf *b) +{ + uvlong v; + + if(b->p==nil || b->p+8 > b->ep){ + b->p = nil; + return 0; + } + v = b->d->pe->e8(b->p); + b->p += 8; + return v; +} + +ulong +dwarfgetaddr(DwarfBuf *b) +{ + static int nbad; + + if(b->addrsize == 0) + b->addrsize = b->d->addrsize; + + switch(b->addrsize){ + case 1: + return dwarfget1(b); + case 2: + return dwarfget2(b); + case 4: + return dwarfget4(b); + case 8: + return dwarfget8(b); + default: + if(++nbad == 1) + werrstr("dwarf: unexpected address size %lud in dwarfgetaddr", b->addrsize); + b->p = nil; + return 0; + } +} + +int n1, n2, n3, n4, n5; + +/* An inline function picks off the calls to dwarfget128 for 1-byte encodings, + * more than by far the common case (99.999% on most binaries!). */ +ulong +dwarfget128(DwarfBuf *b) +{ + static int nbad; + ulong c, d; + + if(b->p == nil) + return 0; + c = *b->p++; + if(!(c&0x80)) +{n1++; + return c; +} + c &= ~0x80; + d = *b->p++; + c |= (d&0x7F)<<7; + if(!(d&0x80)) +{n2++; + return c; +} + d = *b->p++; + c |= (d&0x7F)<<14; + if(!(d&0x80)) +{n3++; + return c; +} + d = *b->p++; + c |= (d&0x7F)<<21; + if(!(d&0x80)) +{n4++; + return c; +} + d = *b->p++; + c |= (d&0x7F)<<28; + if(!(d&0x80)) +{n5++; + return c; +} + while(b->pep && *b->p&0x80) + b->p++; + if(++nbad == 1) + werrstr("dwarf: overflow during parsing of uleb128 integer"); + return c; +} + +long +dwarfget128s(DwarfBuf *b) +{ + int nb, c; + ulong v; + static int nbad; + + v = 0; + nb = 0; + if(b->p==nil) + return 0; + while(b->pep){ + c = *b->p++; + v |= (c & 0x7F)< 8*sizeof(ulong)){ + if(0) + if(++nbad == 1) + werrstr("dwarf: overflow during parsing of sleb128 integer: got %d bits", nb); + } + return v; +} + + diff --git a/lib/rossym_new/dwarfinfo.c b/lib/rossym_new/dwarfinfo.c new file mode 100644 index 00000000000..397702f1180 --- /dev/null +++ b/lib/rossym_new/dwarfinfo.c @@ -0,0 +1,983 @@ +/* + * Dwarf info parse and search. + */ + +#define NTOSAPI +#include +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "dwarf.h" +#include "pe.h" +#include + +enum +{ + DwarfAttrSibling = 0x01, + DwarfAttrLocation = 0x02, + DwarfAttrName = 0x03, + DwarfAttrOrdering = 0x09, + DwarfAttrByteSize = 0x0B, + DwarfAttrBitOffset = 0x0C, + DwarfAttrBitSize = 0x0D, + DwarfAttrStmtList = 0x10, + DwarfAttrLowpc = 0x11, + DwarfAttrHighpc = 0x12, + DwarfAttrLanguage = 0x13, + DwarfAttrDiscr = 0x15, + DwarfAttrDiscrValue = 0x16, + DwarfAttrVisibility = 0x17, + DwarfAttrImport = 0x18, + DwarfAttrStringLength = 0x19, + DwarfAttrCommonRef = 0x1A, + DwarfAttrCompDir = 0x1B, + DwarfAttrConstValue = 0x1C, + DwarfAttrContainingType = 0x1D, + DwarfAttrDefaultValue = 0x1E, + DwarfAttrInline = 0x20, + DwarfAttrIsOptional = 0x21, + DwarfAttrLowerBound = 0x22, + DwarfAttrProducer = 0x25, + DwarfAttrPrototyped = 0x27, + DwarfAttrReturnAddr = 0x2A, + DwarfAttrStartScope = 0x2C, + DwarfAttrStrideSize = 0x2E, + DwarfAttrUpperBound = 0x2F, + DwarfAttrAbstractOrigin = 0x31, + DwarfAttrAccessibility = 0x32, + DwarfAttrAddrClass = 0x33, + DwarfAttrArtificial = 0x34, + DwarfAttrBaseTypes = 0x35, + DwarfAttrCalling = 0x36, + DwarfAttrCount = 0x37, + DwarfAttrDataMemberLoc = 0x38, + DwarfAttrDeclColumn = 0x39, + DwarfAttrDeclFile = 0x3A, + DwarfAttrDeclLine = 0x3B, + DwarfAttrDeclaration = 0x3C, + DwarfAttrDiscrList = 0x3D, + DwarfAttrEncoding = 0x3E, + DwarfAttrExternal = 0x3F, + DwarfAttrFrameBase = 0x40, + DwarfAttrFriend = 0x41, + DwarfAttrIdentifierCase = 0x42, + DwarfAttrMacroInfo = 0x43, + DwarfAttrNamelistItem = 0x44, + DwarfAttrPriority = 0x45, + DwarfAttrSegment = 0x46, + DwarfAttrSpecification = 0x47, + DwarfAttrStaticLink = 0x48, + DwarfAttrType = 0x49, + DwarfAttrUseLocation = 0x4A, + DwarfAttrVarParam = 0x4B, + DwarfAttrVirtuality = 0x4C, + DwarfAttrVtableElemLoc = 0x4D, + DwarfAttrAllocated = 0x4E, + DwarfAttrAssociated = 0x4F, + DwarfAttrDataLocation = 0x50, + DwarfAttrStride = 0x51, + DwarfAttrEntrypc = 0x52, + DwarfAttrUseUTF8 = 0x53, + DwarfAttrExtension = 0x54, + DwarfAttrRanges = 0x55, + DwarfAttrTrampoline = 0x56, + DwarfAttrCallColumn = 0x57, + DwarfAttrCallFile = 0x58, + DwarfAttrCallLine = 0x59, + DwarfAttrDescription = 0x5A, + DwarfAttrMax, + + FormAddr = 0x01, + FormDwarfBlock2 = 0x03, + FormDwarfBlock4 = 0x04, + FormData2 = 0x05, + FormData4 = 0x06, + FormData8 = 0x07, + FormString = 0x08, + FormDwarfBlock = 0x09, + FormDwarfBlock1 = 0x0A, + FormData1 = 0x0B, + FormFlag = 0x0C, + FormSdata = 0x0D, + FormStrp = 0x0E, + FormUdata = 0x0F, + FormRefAddr = 0x10, + FormRef1 = 0x11, + FormRef2 = 0x12, + FormRef4 = 0x13, + FormRef8 = 0x14, + FormRefUdata = 0x15, + FormIndirect = 0x16 +}; + +static int parseattrs(Dwarf *d, DwarfBuf*, ulong, ulong, DwarfAbbrev*, DwarfAttrs*); +static int getulong(DwarfBuf*, int, ulong, ulong*, int*); +static int getuchar(DwarfBuf*, int, uchar*); +static int getstring(Dwarf *d, DwarfBuf*, int, char**); +static int getblock(DwarfBuf*, int, DwarfBlock*); +static int skipform(Dwarf *d, DwarfBuf*, int); + +int +dwarflookupnameinunit(Dwarf *d, ulong unit, char *name, DwarfSym *s) +{ + DwarfSym compunit = { }; + if(dwarfenumunit(d, unit, &compunit) < 0) + return -1; + while(dwarfnextsymat(d, &compunit, s) == 1) + if(s->attrs.name && strcmp(s->attrs.name, name) == 0) + return 0; + werrstr("symbol '%s' not found", name); + return -1; +} + +int +dwarflookupsubname(Dwarf *d, DwarfSym *parent, char *name, DwarfSym *s) +{ + *s = *parent; + while(dwarfnextsymat(d, parent, s)) + if(s->attrs.name && strcmp(s->attrs.name, name) == 0) + return 0; + werrstr("symbol '%s' not found", name); + return -1; +} + +int +dwarflookupchildtag(Dwarf *d, DwarfSym *parent, ulong tag, DwarfSym *s) +{ + int rsym = dwarfnextsymat(d, parent, s); + while (rsym == 0 && s->attrs.tag != tag) { + if (s->attrs.haskids) { + DwarfSym p = *s; + int csym = dwarflookupchildtag(d, &p, tag, s); + if (csym == 0) { + return csym; + } + } + rsym = dwarfnextsym(d, s); + } + return rsym; +} + +int +dwarflookuptag(Dwarf *d, ulong unit, ulong tag, DwarfSym *s) +{ + DwarfSym compunit = { }; + if (dwarfenumunit(d, unit, &compunit) < 0) { + return -1; + } + do { + if (compunit.attrs.tag == tag) { + *s = compunit; + return 0; + } + if (dwarflookupchildtag(d, &compunit, tag, s) == 0) + return 0; + } while(dwarfnextsym(d, &compunit) == 0); + werrstr("symbol with tag 0x%lux not found", tag); + return -1; +} + +int +dwarfseeksym(Dwarf *d, ulong unit, ulong off, DwarfSym *s) +{ + DwarfSym compunit = { }; + if(dwarfenumunit(d, unit, &compunit) < 0) + return -1; + s->b.p = d->info.data + unit + off; + if(dwarfnextsymat(d, &compunit, s) == -1) + return -1; + werrstr("dwarfseeksym: unit %x off %x, tag %x", unit, off, s->attrs.tag); + return 0; +} + +int +dwarflookupfn(Dwarf *d, ulong unit, ulong pc, DwarfSym *s) +{ + DwarfSym compunit = { }; + if(dwarfenumunit(d, unit, &compunit) < 0) + return -1; + while(dwarfnextsymat(d, &compunit, s) == 0){ + if(s->attrs.tag != TagSubprogram) + continue; + if(s->attrs.lowpc <= pc && pc < s->attrs.highpc) + return 0; + } + werrstr("fn containing pc 0x%lux not found", pc); + return -1; +} + +int +dwarfenumunit(Dwarf *d, ulong unit, DwarfSym *s) +{ + int i; + ulong aoff, len; + + if(unit >= d->info.len){ + werrstr("dwarf unit address 0x%x >= 0x%x out of range", unit, d->info.len); + return -1; + } + memset(s, 0, sizeof *s); + memset(&s->b, 0, sizeof s->b); + + s->b.d = d; + s->b.p = d->info.data + unit; + s->b.ep = d->info.data + d->info.len; + len = dwarfget4(&s->b); + s->unit = unit; + s->nextunit = unit + 4 + len; + s->b.ep = d->info.data + s->nextunit; + + if(s->b.ep - s->b.p < len){ + badheader: + werrstr("bad dwarf unit header at unit 0x%lux end %x start %x len %x", unit, s->b.ep - d->info.data, s->b.p - d->info.data, len); + return -1; + } + s->b.ep = s->b.p+len; + if((i=dwarfget2(&s->b)) != 2) + goto badheader; + aoff = dwarfget4(&s->b); + s->b.addrsize = dwarfget1(&s->b); + if(d->addrsize == 0) + d->addrsize = s->b.addrsize; + if(s->b.p == nil) + goto badheader; + + s->aoff = aoff; + + return dwarfnextsym(d, s); +} + +int +dwarfnextsym(Dwarf *d, DwarfSym *s) +{ + ulong num; + DwarfAbbrev *a; + + num = dwarfget128(&s->b); + s->num = num; + if(num == 0){ + return -1; + } + + a = dwarfgetabbrev(d, s->aoff, num); + if(a == nil){ + werrstr("getabbrev %ud %ud for %ud,%ud", s->aoff, num, s->unit); + return -1; + } + + if(parseattrs(d, &s->b, s->attrs.tag, s->unit, a, &s->attrs) < 0) { + return -1; + } + + if (s->attrs.haskids) { + DwarfSym childSkip = { }; + s->childoff = s->b.p - d->info.data; + int r = dwarfnextsymat(d, s, &childSkip); + while (r == 0) { + r = dwarfnextsym(d, &childSkip); + } + s->b = childSkip.b; + } else { + s->childoff = 0; + } + return 0; +} + +int +dwarfnextsymat(Dwarf *d, DwarfSym *parent, DwarfSym *child) +{ + uint sib; + + if (!parent->attrs.haskids || !parent->childoff) + return -1; + + child->unit = parent->unit; + child->aoff = parent->aoff; + child->depth = parent->depth + 1; + if(child->attrs.have.sibling){ + sib = child->attrs.sibling; + if(sib < d->info.len && d->info.data+sib > child->b.p) + child->b.p = d->info.data+sib; + else if (sib >= d->info.len) { + werrstr("sibling reported as out of bounds %d vs %d", sib, d->info.len); + return -1; + } else if (d->info.data+sib+parent->unit < child->b.p) { + werrstr("subsequent sibling is listed before prev %d vs %d", sib+parent->unit, child->b.p - d->info.data); + return -1; + } + } + + // Uninitialized + if (!child->b.d) { + child->b = parent->b; + child->b.p = parent->childoff + parent->b.d->info.data; + } + + return dwarfnextsym(d, child); +} + +typedef struct Parse Parse; +struct Parse { + int name; + int off; + int haveoff; + int type; +}; + +#define OFFSET(x) offsetof(DwarfAttrs, x), offsetof(DwarfAttrs, have.x) + +static Parse plist[] = { /* Font Tab 4 */ + { DwarfAttrAbstractOrigin, OFFSET(abstractorigin), TReference }, + { DwarfAttrAccessibility, OFFSET(accessibility), TConstant }, + { DwarfAttrAddrClass, OFFSET(addrclass), TConstant }, + { DwarfAttrArtificial, OFFSET(isartificial), TFlag }, + { DwarfAttrBaseTypes, OFFSET(basetypes), TReference }, + { DwarfAttrBitOffset, OFFSET(bitoffset), TConstant }, + { DwarfAttrBitSize, OFFSET(bitsize), TConstant }, + { DwarfAttrByteSize, OFFSET(bytesize), TConstant }, + { DwarfAttrCalling, OFFSET(calling), TConstant }, + { DwarfAttrCommonRef, OFFSET(commonref), TReference }, + { DwarfAttrCompDir, OFFSET(compdir), TString }, + { DwarfAttrConstValue, OFFSET(constvalue), TString|TConstant|TBlock }, + { DwarfAttrContainingType, OFFSET(containingtype), TReference }, + { DwarfAttrCount, OFFSET(count), TConstant|TReference }, + { DwarfAttrDataMemberLoc, OFFSET(datamemberloc), TBlock|TConstant|TReference }, + { DwarfAttrDeclColumn, OFFSET(declcolumn), TConstant }, + { DwarfAttrDeclFile, OFFSET(declfile), TConstant }, + { DwarfAttrDeclLine, OFFSET(declline), TConstant }, + { DwarfAttrDeclaration, OFFSET(isdeclaration), TFlag }, + { DwarfAttrDefaultValue, OFFSET(defaultvalue), TReference }, + { DwarfAttrDiscr, OFFSET(discr), TReference }, + { DwarfAttrDiscrList, OFFSET(discrlist), TBlock }, + { DwarfAttrDiscrValue, OFFSET(discrvalue), TConstant }, + { DwarfAttrEncoding, OFFSET(encoding), TConstant }, + { DwarfAttrExternal, OFFSET(isexternal), TFlag }, + { DwarfAttrFrameBase, OFFSET(framebase), TBlock|TConstant }, + { DwarfAttrFriend, OFFSET(friend), TReference }, + { DwarfAttrHighpc, OFFSET(highpc), TAddress }, + { DwarfAttrEntrypc, OFFSET(entrypc), TAddress }, + { DwarfAttrIdentifierCase, OFFSET(identifiercase), TConstant }, + { DwarfAttrImport, OFFSET(import), TReference }, + { DwarfAttrInline, OFFSET(inlined), TConstant }, + { DwarfAttrIsOptional, OFFSET(isoptional), TFlag }, + { DwarfAttrLanguage, OFFSET(language), TConstant }, + { DwarfAttrLocation, OFFSET(location), TReference|TBlock }, + { DwarfAttrLowerBound, OFFSET(lowerbound), TConstant|TReference }, + { DwarfAttrLowpc, OFFSET(lowpc), TAddress }, + { DwarfAttrMacroInfo, OFFSET(macroinfo), TConstant }, + { DwarfAttrName, OFFSET(name), TString }, + { DwarfAttrNamelistItem, OFFSET(namelistitem), TBlock }, + { DwarfAttrOrdering, OFFSET(ordering), TConstant }, + { DwarfAttrPriority, OFFSET(priority), TReference }, + { DwarfAttrProducer, OFFSET(producer), TString }, + { DwarfAttrPrototyped, OFFSET(isprototyped), TFlag }, + { DwarfAttrRanges, OFFSET(ranges), TReference }, + { DwarfAttrReturnAddr, OFFSET(returnaddr), TBlock|TConstant }, + { DwarfAttrSegment, OFFSET(segment), TBlock|TConstant }, + { DwarfAttrSibling, OFFSET(sibling), TReference }, + { DwarfAttrSpecification, OFFSET(specification), TReference }, + { DwarfAttrStartScope, OFFSET(startscope), TConstant }, + { DwarfAttrStaticLink, OFFSET(staticlink), TBlock|TConstant }, + { DwarfAttrStmtList, OFFSET(stmtlist), TConstant }, + { DwarfAttrStrideSize, OFFSET(stridesize), TConstant }, + { DwarfAttrStringLength, OFFSET(stringlength), TBlock|TConstant }, + { DwarfAttrType, OFFSET(type), TReference }, + { DwarfAttrUpperBound, OFFSET(upperbound), TConstant|TReference }, + { DwarfAttrUseLocation, OFFSET(uselocation), TBlock|TConstant }, + { DwarfAttrVarParam, OFFSET(isvarparam), TFlag }, + { DwarfAttrVirtuality, OFFSET(virtuality), TConstant }, + { DwarfAttrVisibility, OFFSET(visibility), TConstant }, + { DwarfAttrVtableElemLoc, OFFSET(vtableelemloc), TBlock|TReference }, + { } +}; + +static Parse ptab[DwarfAttrMax]; + +static int +parseattrs(Dwarf *d, DwarfBuf *b, ulong tag, ulong unit, DwarfAbbrev *a, DwarfAttrs *attrs) +{ + int i, f, n, got; + static int nbad; + void *v; + + /* initialize ptab first time through for quick access */ + if(ptab[DwarfAttrName].name != DwarfAttrName) + for(i=0; plist[i].name; i++) + ptab[plist[i].name] = plist[i]; + + memset(attrs, 0, sizeof *attrs); + attrs->tag = a->tag; + attrs->haskids = a->haskids; + + for(i=0; inattr; i++){ + n = a->attr[i].name; + f = a->attr[i].form; + if(n < 0 || n >= DwarfAttrMax || ptab[n].name==0) { + if (skipform(d, b, f) < 0) { + if(++nbad == 1) + werrstr("dwarf parse attrs: cannot skip form %d", f); + return -1; + } + continue; + } + v = (char*)attrs + ptab[n].off; + got = 0; + if(f == FormIndirect) + f = dwarfget128(b); + if((ptab[n].type&(TConstant|TReference|TAddress)) + && getulong(b, f, unit, v, &got) >= 0) + ; + else if((ptab[n].type&TFlag) && getuchar(b, f, v) >= 0) + got = TFlag; + else if((ptab[n].type&TString) && getstring(d, b, f, v) >= 0) + got = TString; + else if((ptab[n].type&TBlock) && getblock(b, f, v) >= 0) + got = TBlock; + else { + if(skipform(d, b, f) < 0){ + if(++nbad == 1) + werrstr("dwarf parse attrs: cannot skip form %d", f); + return -1; + } + } +#if 0 + if(got == TBlock && (ptab[n].type&TConstant)) + got = constblock(b->d, v, v); +#endif + *((uchar*)attrs+ptab[n].haveoff) = got; + } + return 0; +} + +static int +getulong(DwarfBuf *b, int form, ulong unit, ulong *u, int *type) +{ + static int nbad; + uvlong uv; + + switch(form){ + default: + return -1; + + /* addresses */ + case FormAddr: + *type = TAddress; + *u = dwarfgetaddr(b); + return 0; + + /* references */ + case FormRefAddr: + /* absolute ref in .debug_info */ + *type = TReference; + *u = dwarfgetaddr(b); + return 0; + case FormRef1: + *u = dwarfget1(b); + goto relativeref; + case FormRef2: + *u = dwarfget2(b); + goto relativeref; + case FormRef4: + *u = dwarfget4(b); + goto relativeref; + case FormRef8: + *u = dwarfget8(b); + goto relativeref; + case FormRefUdata: + *u = dwarfget128(b); + relativeref: + *u += unit; + *type = TReference; + return 0; + + /* constants */ + case FormData1: + *u = dwarfget1(b); + goto constant; + case FormData2: + *u = dwarfget2(b); + goto constant; + case FormData4: + *u = dwarfget4(b); + goto constant; + case FormData8: + uv = dwarfget8(b); + *u = uv; + if(uv != *u && ++nbad == 1) + werrstr("dwarf: truncating 64-bit attribute constants"); + goto constant; + case FormSdata: + *u = dwarfget128s(b); + goto constant; + case FormUdata: + *u = dwarfget128(b); + constant: + *type = TConstant; + return 0; + } +} + +static int +getuchar(DwarfBuf *b, int form, uchar *u) +{ + switch(form){ + default: + return -1; + + case FormFlag: + *u = dwarfget1(b); + return 0; + } +} + +static int +getstring(Dwarf *d, DwarfBuf *b, int form, char **s) +{ + static int nbad; + ulong u, x; + + switch(form){ + default: + return -1; + + case FormString: + x = b->p - d->info.data; + *s = dwarfgetstring(b); + for (u = 0; (*s)[u]; u++) { + assert(isprint((*s)[u])); + } + return 0; + + case FormStrp: + u = dwarfget4(b); + if(u >= b->d->str.len){ + if(++nbad == 1) + werrstr("dwarf: bad string pointer 0x%lux in attribute", u); + /* don't return error - maybe can proceed */ + *s = nil; + }else + *s = (char*)b->d->str.data + u; + return 0; + + } +} + +static int +getblock(DwarfBuf *b, int form, DwarfBlock *bl) +{ + ulong n; + + switch(form){ + default: + return -1; + case FormDwarfBlock: + n = dwarfget128(b); + goto copyn; + case FormDwarfBlock1: + n = dwarfget1(b); + goto copyn; + case FormDwarfBlock2: + n = dwarfget2(b); + goto copyn; + case FormDwarfBlock4: + n = dwarfget4(b); + copyn: + bl->data = dwarfgetnref(b, n); + bl->len = n; + if(bl->data == nil) + return -1; + return 0; + } +} + +/* last resort */ +static int +skipform(Dwarf *d, DwarfBuf *b, int form) +{ + int type; + DwarfVal val; + + if(getulong(b, form, 0, &val.c, &type) < 0 + && getuchar(b, form, (uchar*)&val) < 0 + && getstring(d, b, form, &val.s) < 0 + && getblock(b, form, &val.b) < 0) + return -1; + return 0; +} + +void stackinit(DwarfStack *stack) +{ + memset(stack, 0, sizeof(*stack)); + stack->data = stack->storage; + stack->length = 0; stack->max = sizeof(stack->storage) / sizeof(stack->storage[0]); +} + +void stackpush(DwarfStack *stack, ulong value) +{ + if (stack->length == stack->max) { + ulong *newstack = malloc(sizeof(ulong)*stack->max*2); + memcpy(newstack, stack->data, sizeof(ulong)*stack->length); + if (stack->data != stack->storage) + free(stack->data); + stack->data = newstack; + stack->max *= 2; + } + werrstr("stack[%d] = %x", stack->length, value); + stack->data[stack->length++] = value; +} + +ulong stackpop(DwarfStack *stack) +{ + ASSERT(stack->length > 0); + ulong val = stack->data[--stack->length]; + werrstr("pop stack[%d] -> %x", stack->length, val); + return val; +} + +void stackfree(DwarfStack *stack) +{ + if (stack->data != stack->storage) + free(stack->data); +} + +// Returns -1 on failure +int dwarfgetarg(Dwarf *d, const char *name, DwarfBuf *buf, ulong cfa, PROSSYM_REGISTERS registers, ulong *result) +{ + int ret = 0; + DwarfStack stack = { }; + stackinit(&stack); + while (buf->p < buf->ep) { + int opcode = dwarfget1(buf); + werrstr("opcode %x", opcode); + switch (opcode) { + case 0: + buf->p = buf->ep; + break; + case OpAddr: + if (d->addrsize == 4) { + stackpush(&stack, dwarfget4(buf)); + break; + } else { + werrstr("%s: we only support 4 byte addrs", name); + goto fatal; + } + case OpConst1s: { + signed char c = dwarfget1(buf); + stackpush(&stack, c); + } break; + case OpConst1u: + stackpush(&stack, dwarfget1(buf)); + break; + case OpConst2s: { + signed short s = dwarfget2(buf); + stackpush(&stack, s); + } break; + case OpConst2u: + stackpush(&stack, dwarfget2(buf)); + break; + case OpConst4s: { + signed int i = dwarfget4(buf); + stackpush(&stack, i); + } break; + case OpConst4u: + stackpush(&stack, dwarfget4(buf)); + break; + case OpConst8s: + case OpConst8u: + werrstr("const 8 not yet supported"); + goto fatal; + case OpConsts: + stackpush(&stack, dwarfget128s(buf)); + break; + case OpConstu: + stackpush(&stack, dwarfget128(buf)); + break; + case OpDup: { + ulong popped = stackpop(&stack); + stackpush(&stack, popped); + stackpush(&stack, popped); + } break; + case OpDrop: + stackpop(&stack); + break; + case OpOver: { + if (stack.length < 2) goto fatal; + stackpush(&stack, stack.data[stack.length-2]); + } break; + case OpPick: { + ulong arg = dwarfget1(buf); + if (arg >= stack.length) goto fatal; + arg = stack.data[stack.length-1-arg]; + stackpush(&stack, arg); + } break; + case OpSwap: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b); + stackpush(&stack, a); + } break; + case OpRot: { + ulong a = stackpop(&stack), b = stackpop(&stack), c = stackpop(&stack); + stackpush(&stack, b); + stackpush(&stack, c); + stackpush(&stack, a); + } break; + case OpXderef: + case OpXderefSize: + werrstr("Xderef not yet supported"); + goto fatal; + case OpAbs: { + long a = stackpop(&stack); + stackpush(&stack, a < 0 ? -a : a); + } break; + case OpAnd: + stackpush(&stack, stackpop(&stack) & stackpop(&stack)); + break; + case OpDiv: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b / a); + } break; + case OpMinus: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b - a); + } break; + case OpMod: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b % a); + } break; + case OpMul: + stackpush(&stack, stackpop(&stack) * stackpop(&stack)); + break; + case OpNeg: + stackpush(&stack, -stackpop(&stack)); + break; + case OpNot: + stackpush(&stack, ~stackpop(&stack)); + break; + case OpOr: + stackpush(&stack, stackpop(&stack) | stackpop(&stack)); + break; + case OpPlus: + stackpush(&stack, stackpop(&stack) + stackpop(&stack)); + break; + case OpPlusUconst: + stackpush(&stack, stackpop(&stack) + dwarfget128(buf)); + break; + case OpShl: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b << a); + } break; + case OpShr: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b >> a); + } break; + case OpShra: { + ulong a = stackpop(&stack); + long b = stackpop(&stack); + if (b < 0) + b = -(-b >> a); + else + b = b >> a; + stackpush(&stack, b); + } break; + case OpXor: + stackpush(&stack, stackpop(&stack) ^ stackpop(&stack)); + break; + case OpSkip: + buf->p += dwarfget2(buf); + break; + case OpBra: { + ulong a = dwarfget2(buf); + if (stackpop(&stack)) + buf->p += a; + } break; + case OpEq: + stackpush(&stack, stackpop(&stack) == stackpop(&stack)); + break; + case OpGe: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b >= a); + } break; + case OpGt: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b > a); + } break; + case OpLe: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b <= a); + } break; + case OpLt: { + ulong a = stackpop(&stack), b = stackpop(&stack); + stackpush(&stack, b < a); + } break; + case OpNe: + stackpush(&stack, stackpop(&stack) != stackpop(&stack)); + break; + case OpNop: + break; + case OpDeref: { + ulong val, addr = stackpop(&stack); + if (!RosSymCallbacks.MemGetProc + (d->pe->fd, + &val, + addr, + d->addrsize)) + goto fatal; + stackpush(&stack, val); + } break; + case OpDerefSize: { + ulong val, addr = stackpop(&stack), size = dwarfget1(buf); + if (!RosSymCallbacks.MemGetProc + (d->pe->fd, + &val, + addr, + size)) + goto fatal; + stackpush(&stack, val); + } break; + case OpFbreg: { + ulong val, addr = cfa, offset = dwarfget128s(buf); + werrstr("FBREG cfa %x offset %x", cfa, offset); + if (!RosSymCallbacks.MemGetProc + (d->pe->fd, + &val, + addr+offset, + d->addrsize)) + goto fatal; + stackpush(&stack, val); + } break; + case OpPiece: + werrstr("OpPiece not supported"); + goto fatal; + default: + if (opcode >= OpLit0 && opcode < OpReg0) + stackpush(&stack, opcode - OpLit0); + else if (opcode >= OpReg0 && opcode < OpBreg0) { + ulong reg = opcode - OpReg0; + werrstr("REG[%d] value %x", reg, (ulong)registers->Registers[reg]); + stackpush(&stack, registers->Registers[reg]); + } else if (opcode >= OpBreg0 && opcode < OpRegx) { + ulong val, + reg = opcode - OpBreg0, + addr = registers->Registers[reg], + offset = dwarfget128s(buf); + werrstr("BREG[%d] reg %x offset %x", reg, addr, offset); + if (!RosSymCallbacks.MemGetProc + (d->pe->fd, + &val, + addr + offset, + d->addrsize)) + goto fatal; + stackpush(&stack, val); + } else { + werrstr("opcode %x not supported", opcode); + goto fatal; + } + break; + } + } + if (stack.length < 1) goto fatal; + *result = stackpop(&stack); + werrstr("%s: value %x", name, *result); + goto finish; + +fatal: + ret = -1; + +finish: + stackfree(&stack); + return ret; +} + +int dwarfargvalue(Dwarf *d, DwarfSym *proc, ulong pc, ulong cfa, PROSSYM_REGISTERS registers, DwarfParam *parameter) +{ + int gotarg; + DwarfSym unit = { }; + + if (dwarfenumunit(d, proc->unit, &unit) == -1) + return -1; + + werrstr("lookup in unit %x-%x, pc %x", unit.attrs.lowpc, unit.attrs.highpc, pc); + pc -= unit.attrs.lowpc; + + werrstr("paramblock %s -> unit %x type %x fde %x len %d registers %x", + parameter->name, + parameter->unit, + parameter->type, + parameter->fde, + parameter->len, + registers); + + // Seek our range in loc + DwarfBuf locbuf; + DwarfBuf instream = { }; + + locbuf.d = d; + locbuf.addrsize = d->addrsize; + + if (parameter->loctype == TConstant) { + locbuf.p = d->loc.data + parameter->fde; + locbuf.ep = d->loc.data + d->loc.len; + ulong start, end, len; + do { + len = 0; + start = dwarfget4(&locbuf); + end = dwarfget4(&locbuf); + if (start && end) { + len = dwarfget2(&locbuf); + instream = locbuf; + instream.ep = instream.p + len; + locbuf.p = instream.ep; + } + werrstr("ip %x s %x e %x (%x bytes)", pc, start, end, len); + } while (start && end && (start > pc || end <= pc)); + } else if (parameter->loctype == TBlock) { + instream = locbuf; + instream.p = (void *)parameter->fde; + instream.ep = instream.p + parameter->len; + } else { + werrstr("Wrong block type for parameter %s", parameter->name); + return -1; + } + + gotarg = dwarfgetarg(d, parameter->name, &instream, cfa, registers, ¶meter->value); + if (gotarg == -1) + return -1; + + return 0; +} + +int +dwarfgetparams(Dwarf *d, DwarfSym *s, ulong pc, int pnum, DwarfParam *paramblocks) +{ + int ip = 0; + DwarfSym param = { }; + int res = dwarfnextsymat(d, s, ¶m); + while (res == 0 && ip < pnum) { + if (param.attrs.tag == TagFormalParameter && + param.attrs.have.name && + param.attrs.have.location) { + paramblocks[ip].name = malloc(strlen(param.attrs.name)+1); + strcpy(paramblocks[ip].name, param.attrs.name); + paramblocks[ip].unit = param.unit; + paramblocks[ip].type = param.attrs.type; + paramblocks[ip].loctype = param.attrs.have.location; + paramblocks[ip].len = param.attrs.location.b.len; + paramblocks[ip].fde = param.attrs.location.b.data; + werrstr("param[%d] block %s -> type %x loctype %x fde %x len %x", + ip, + paramblocks[ip].name, + paramblocks[ip].type, + paramblocks[ip].loctype, + paramblocks[ip].fde, + paramblocks[ip].len); + ip++; + } + res = dwarfnextsymat(d, s, ¶m); + } + return ip; +} diff --git a/lib/rossym_new/dwarfopen.c b/lib/rossym_new/dwarfopen.c new file mode 100644 index 00000000000..b3ea2cd18d6 --- /dev/null +++ b/lib/rossym_new/dwarfopen.c @@ -0,0 +1,72 @@ +#define NTOSAPI +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "dwarf.h" +#include "pe.h" + +/* Adapted for PE */ + +Dwarf* +dwarfopen(Pe *pe) +{ + Dwarf *d; + + if(pe == nil){ + werrstr("nil pe passed to dwarfopen"); + return nil; + } + + d = mallocz(sizeof(Dwarf), 1); + if(d == nil) + return nil; + + d->pe = pe; + if(pe->loadsection(pe, ".debug_abbrev", &d->abbrev) < 0 + || pe->loadsection(pe, ".debug_aranges", &d->aranges) < 0 + || pe->loadsection(pe, ".debug_line", &d->line) < 0 + || pe->loadsection(pe, ".debug_pubnames", &d->pubnames) < 0 + || pe->loadsection(pe, ".debug_info", &d->info) < 0 + || pe->loadsection(pe, ".debug_loc", &d->loc) < 0) + goto err; + pe->loadsection(pe, ".debug_frame", &d->frame); + pe->loadsection(pe, ".debug_ranges", &d->ranges); + pe->loadsection(pe, ".debug_str", &d->str); + + return d; + +err: + DPRINT("Failed to open dwarf\n"); + free(d->abbrev.data); + free(d->aranges.data); + free(d->frame.data); + free(d->line.data); + free(d->pubnames.data); + free(d->ranges.data); + free(d->str.data); + free(d->info.data); + free(d->loc.data); + free(d); + return nil; +} + +void +dwarfclose(Dwarf *d) +{ + free(d->abbrev.data); + free(d->aranges.data); + free(d->frame.data); + free(d->line.data); + free(d->pubnames.data); + free(d->ranges.data); + free(d->str.data); + free(d->info.data); + pefree(d->pe); + free(d); +} + diff --git a/lib/rossym_new/dwarfpc.c b/lib/rossym_new/dwarfpc.c new file mode 100644 index 00000000000..ec41e10d16c --- /dev/null +++ b/lib/rossym_new/dwarfpc.c @@ -0,0 +1,415 @@ +/* + * Dwarf pc to source line conversion. + * + * Maybe should do the reverse here, but what should the interface look like? + * One possibility is to use the Plan 9 line2addr interface: + * + * long line2addr(ulong line, ulong basepc) + * + * which returns the smallest pc > basepc with line number line (ignoring file name). + * + * The encoding may be small, but it sure isn't simple! + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "dwarf.h" +#include "pe.h" + +#define trace 0 + +enum +{ + Isstmt = 1<<0, + BasicDwarfBlock = 1<<1, + EndSequence = 1<<2, + PrologueEnd = 1<<3, + EpilogueBegin = 1<<4 +}; + +typedef struct State State; +struct State +{ + ulong addr; + ulong file; + ulong line; + ulong column; + ulong flags; + ulong isa; +}; + +int +dwarfpctoline(Dwarf *d, DwarfSym *proc, ulong pc, char **file, char **function, ulong *line) +{ + char *cdir; + uchar *prog, *opcount, *end, *dirs; + ulong off, unit, len, vers, x, start, lastline; + int i, first, firstline, op, a, l, quantum, isstmt, linebase, linerange, opcodebase, nf; + char *files, *s; + DwarfBuf b; + DwarfSym sym; + State emit, cur, reset; + char **f, **newf; + + f = nil; + memset(proc, 0, sizeof(*proc)); + + int runit = dwarfaddrtounit(d, pc, &unit); + if (runit < 0) + return -1; + int rtag = dwarflookuptag(d, unit, TagCompileUnit, &sym); + if (rtag < 0) + return -1; + + if(!sym.attrs.have.stmtlist){ + werrstr("no line mapping information for 0x%x", pc); + return -1; + } + off = sym.attrs.stmtlist; + if(off >= d->line.len){ + werrstr("bad stmtlist"); + goto bad; + } + + if(trace) werrstr("unit 0x%x stmtlist 0x%x", unit, sym.attrs.stmtlist); + + memset(&b, 0, sizeof b); + b.d = d; + b.p = d->line.data + off; + b.ep = b.p + d->line.len; + b.addrsize = sym.b.addrsize; /* should i get this from somewhere else? */ + + len = dwarfget4(&b); + if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){ + werrstr("bad len"); + goto bad; + } + + b.ep = b.p+len; + vers = dwarfget2(&b); + if(vers != 2){ + werrstr("bad dwarf version 0x%x", vers); + return -1; + } + + len = dwarfget4(&b); + if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){ + werrstr("another bad len"); + goto bad; + } + prog = b.p+len; + + quantum = dwarfget1(&b); + isstmt = dwarfget1(&b); + linebase = (schar)dwarfget1(&b); + linerange = (schar)dwarfget1(&b); + opcodebase = dwarfget1(&b); + + opcount = b.p-1; + dwarfgetnref(&b, opcodebase-1); + if(b.p == nil){ + werrstr("bad opcode chart"); + goto bad; + } + + /* just skip the files and dirs for now; we'll come back */ + dirs = b.p; + while (b.p && *b.p) + dwarfgetstring(&b); + dwarfget1(&b); + + files = (char*)b.p; + while(b.p!=nil && *b.p!=0){ + dwarfgetstring(&b); + dwarfget128(&b); + dwarfget128(&b); + dwarfget128(&b); + } + dwarfget1(&b); + + /* move on to the program */ + if(b.p == nil || b.p > prog){ + werrstr("bad header"); + goto bad; + } + b.p = prog; + + reset.addr = 0; + reset.file = 1; + reset.line = 1; + reset.column = 0; + reset.flags = isstmt ? Isstmt : 0; + reset.isa = 0; + + cur = reset; + emit = reset; + nf = 0; + start = 0; + if(trace) werrstr("program @ %lu ... %.*H opbase = %d", b.p - d->line.data, b.ep-b.p, b.p, opcodebase); + first = 1; + while(b.p != nil){ + firstline = 0; + op = dwarfget1(&b); + if(trace) werrstr("\tline %lu, addr 0x%x, op %d %.10H", cur.line, cur.addr, op, b.p); + if(op >= opcodebase){ + a = (op - opcodebase) / linerange; + l = (op - opcodebase) % linerange + linebase; + cur.line += l; + cur.addr += a * quantum; + if(trace) werrstr(" +%d,%d", a, l); + emit: + if(first){ + if(cur.addr > pc){ + werrstr("found wrong line mapping 0x%x for pc 0x%x", cur.addr, pc); + /* This is an overzealous check. gcc can produce discontiguous ranges + and reorder statements, so it's possible for a future line to start + ahead of pc and still find a matching one. */ + /*goto out;*/ + firstline = 1; + } + first = 0; + start = cur.addr; + } + if(cur.addr > pc && !firstline) + break; + if(b.p == nil){ + werrstr("buffer underflow in line mapping"); + goto out; + } + emit = cur; + if(emit.flags & EndSequence){ + werrstr("found wrong line mapping 0x%x-0x%x for pc 0x%x", start, cur.addr, pc); + goto out; + } + cur.flags &= ~(BasicDwarfBlock|PrologueEnd|EpilogueBegin); + }else{ + switch(op){ + case 0: /* extended op code */ + if(trace) werrstr(" ext"); + len = dwarfget128(&b); + end = b.p+len; + if(b.p == nil || end > b.ep || end < b.p || len < 1) + goto bad; + switch(dwarfget1(&b)){ + case 1: /* end sequence */ + if(trace) werrstr(" end"); + cur.flags |= EndSequence; + goto emit; + case 2: /* set address */ + cur.addr = dwarfgetaddr(&b); + if(trace) werrstr(" set pc 0x%x", cur.addr); + break; + case 3: /* define file */ + newf = malloc(nf+1*sizeof(f[0])); + if (newf) + RtlMoveMemory(newf, f, nf*sizeof(f[0])); + if(newf == nil) + goto out; + free(f); + f = newf; + f[nf++] = s = dwarfgetstring(&b); + DPRINT1("str %s", s); + dwarfget128(&b); + dwarfget128(&b); + dwarfget128(&b); + if(trace) werrstr(" def file %s", s); + break; + } + if(b.p == nil || b.p > end) + goto bad; + b.p = end; + break; + case 1: /* emit */ + if(trace) werrstr(" emit"); + goto emit; + case 2: /* advance pc */ + a = dwarfget128(&b); + if(trace) werrstr(" advance pc + %lu", a*quantum); + cur.addr += a * quantum; + break; + case 3: /* advance line */ + l = dwarfget128s(&b); + if(trace) werrstr(" advance line + %ld", l); + cur.line += l; + break; + case 4: /* set file */ + if(trace) werrstr(" set file"); + cur.file = dwarfget128s(&b); + break; + case 5: /* set column */ + if(trace) werrstr(" set column"); + cur.column = dwarfget128(&b); + break; + case 6: /* negate stmt */ + if(trace) werrstr(" negate stmt"); + cur.flags ^= Isstmt; + break; + case 7: /* set basic block */ + if(trace) werrstr(" set basic block"); + cur.flags |= BasicDwarfBlock; + break; + case 8: /* const add pc */ + a = (255 - opcodebase) / linerange * quantum; + if(trace) werrstr(" const add pc + %d", a); + cur.addr += a; + break; + case 9: /* fixed advance pc */ + a = dwarfget2(&b); + if(trace) werrstr(" fixed advance pc + %d", a); + cur.addr += a; + break; + case 10: /* set prologue end */ + if(trace) werrstr(" set prologue end"); + cur.flags |= PrologueEnd; + break; + case 11: /* set epilogue begin */ + if(trace) werrstr(" set epilogue begin"); + cur.flags |= EpilogueBegin; + break; + case 12: /* set isa */ + if(trace) werrstr(" set isa"); + cur.isa = dwarfget128(&b); + break; + default: /* something new - skip it */ + if(trace) werrstr(" unknown %d", opcount[op]); + for(i=0; i 0 && b.p!=nil && *b.p!=0; i--){ + dwarfgetstring(&b); + dwarfget128(&b); + dwarfget128(&b); + dwarfget128(&b); + } + if(b.p == nil){ + werrstr("problem parsing file data second time (cannot happen)"); + goto bad; + } + if(*b.p == 0){ + if(i >= nf){ + werrstr("bad file index in mapping data"); + goto bad; + } + b.p = (uchar*)f[i]; + } + s = dwarfgetstring(&b); + *file = s; + i = dwarfget128(&b); /* directory */ + x = dwarfget128(&b); + x = dwarfget128(&b); + + /* fetch dir name */ + cdir = sym.attrs.have.compdir ? sym.attrs.compdir : 0; + + char *dwarfdir; + dwarfdir = nil; + b.p = dirs; + for (x = 1; b.p && *b.p; x++) { + dwarfdir = dwarfgetstring(&b); + if (x == i) break; + } + + if (!cdir && dwarfdir) + cdir = dwarfdir; + + char *filefull = malloc(strlen(cdir) + strlen(*file) + 2); + strcpy(filefull, cdir); + strcat(filefull, "/"); + strcat(filefull, *file); + *file = filefull; + + *function = nil; + lastline = 0; + + runit = dwarfaddrtounit(d, pc, &unit); + if (runit == 0) { + DwarfSym compunit = { }; + int renum = dwarfenumunit(d, unit, &compunit); + if (renum < 0) + return -1; + renum = dwarfnextsymat(d, &compunit, proc); + while (renum == 0) { + if (proc->attrs.tag == TagSubprogram && + proc->attrs.have.name) + { + if (proc->attrs.lowpc <= pc && proc->attrs.highpc > pc) { + *function = malloc(strlen(proc->attrs.name)+1); + strcpy(*function, proc->attrs.name); + goto done; + } + } + renum = dwarfnextsym(d, proc); + } + } + + // Next search by declaration + runit = dwarfaddrtounit(d, pc, &unit); + if (runit == 0) { + DwarfSym compunit = { }; + int renum = dwarfenumunit(d, unit, &compunit); + if (renum < 0) + return -1; + renum = dwarfnextsymat(d, &compunit, proc); + while (renum == 0) { + if (proc->attrs.tag == TagSubprogram && + proc->attrs.have.name && + proc->attrs.declfile == emit.file) + { + if (proc->attrs.declline <= *line && + proc->attrs.declline > lastline) { + free(*function); + *function = malloc(strlen(proc->attrs.name)+1); + strcpy(*function, proc->attrs.name); + goto done; + } + lastline = proc->attrs.declline; + } + renum = dwarfnextsym(d, proc); + } + } + + /* free at last, free at last */ +done: + free(f); + return 0; +bad: + werrstr("corrupted line mapping for 0x%x", pc); +out: + free(f); + return -1; +} + +VOID RosSymFreeInfo(PROSSYM_LINEINFO LineInfo) +{ + int i; + free(LineInfo->FileName); + LineInfo->FileName = NULL; + free(LineInfo->FunctionName); + LineInfo->FunctionName = NULL; + for (i = 0; i < sizeof(LineInfo->Parameters)/sizeof(LineInfo->Parameters[0]); i++) + free(LineInfo->Parameters[i].ValueName); +} diff --git a/lib/rossym_new/dwarfpubnames.c b/lib/rossym_new/dwarfpubnames.c new file mode 100644 index 00000000000..8a8d802b797 --- /dev/null +++ b/lib/rossym_new/dwarfpubnames.c @@ -0,0 +1,81 @@ +#define NTOSAPI +#include +#include +#include + +#define NDEBUG +#include + +#include "dwarf.h" + +static int +_dwarfnametounit(Dwarf *d, char *name, DwarfBlock *bl, DwarfSym *s) +{ + int vers; + ulong len, unit, off; + uchar *next; + char *str; + DwarfBuf b; + + b.d = d; + b.p = bl->data; + b.ep = b.p + bl->len; + + while(b.p < b.ep){ + len = dwarfget4(&b); + if(len > b.ep-b.p){ + werrstr("bad length in dwarf name header"); + return -1; + } + next = b.p + len; + vers = dwarfget2(&b); + if(vers != 1 && vers != 2){ + werrstr("bad version %d in dwarf name header", vers); + return -1; + } + unit = dwarfget4(&b); + dwarfget4(&b); /* unit length */ + while(b.p < next){ + off = dwarfget4(&b); + if(off == 0) + break; + str = dwarfgetstring(&b); + if(strcmp(str, name) == 0){ + if(dwarfenumunit(d, unit, s) < 0) + return -1; + if(unit + off >= s->b.ep - d->info.data){ + werrstr("bad offset in name entry"); + return -1; + } + s->b.p = d->info.data + unit + off; + if(dwarfnextsym(d, s) < 0) + return -1; + if(s->attrs.name==nil || strcmp(s->attrs.name, name)!=0){ + werrstr("unexpected name %#q in lookup for %#q", s->attrs.name, name); + return -1; + } + return 0; + } + } + b.p = next; + } + werrstr("unknown name '%s'", name); + return -1; +} + +int +dwarflookupname(Dwarf *d, char *name, DwarfSym *sym) +{ + return _dwarfnametounit(d, name, &d->pubnames, sym); +} + +/* + +int +dwarflookuptype(Dwarf *d, char *name, DwarfSym *sym) +{ + return _dwarfnametounit(d, name, &d->pubtypes, sym); +} + + */ + diff --git a/lib/rossym_new/find.c b/lib/rossym_new/find.c new file mode 100644 index 00000000000..9cc5aeeeece --- /dev/null +++ b/lib/rossym_new/find.c @@ -0,0 +1,131 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/find.c + * PURPOSE: Find symbol info for an address + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ +/* + * Parts of this file based on work Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +#include "rossym.h" +#include "dwarf.h" +#include "pe.h" + +BOOLEAN +RosSymGetAddressInformation +(PROSSYM_INFO RosSymInfo, + ULONG_PTR RelativeAddress, + PROSSYM_LINEINFO RosSymLineInfo) +{ + ROSSYM_REGISTERS registers; + DwarfParam params[sizeof(RosSymLineInfo->Parameters)/sizeof(RosSymLineInfo->Parameters[0])]; + DwarfSym proc = { }; + int i; + int res = dwarfpctoline + (RosSymInfo, + &proc, + RelativeAddress + RosSymInfo->pe->imagebase, + &RosSymLineInfo->FileName, + &RosSymLineInfo->FunctionName, + &RosSymLineInfo->LineNumber); + if (res == -1) { + werrstr("Could not get basic function info"); + return FALSE; + } + + if (!(RosSymLineInfo->Flags & ROSSYM_LINEINFO_HAS_REGISTERS)) + return TRUE; + + registers = RosSymLineInfo->Registers; + + DwarfExpr cfa = { }; + ulong cfaLocation; + if (dwarfregunwind + (RosSymInfo, + RelativeAddress + RosSymInfo->pe->imagebase, + proc.attrs.framebase.c, + &cfa, + ®isters) == -1) { + werrstr("Can't get cfa location for %s", RosSymLineInfo->FunctionName); + return TRUE; + } + + res = dwarfgetparams + (RosSymInfo, + &proc, + RelativeAddress + RosSymInfo->pe->imagebase, + sizeof(params)/sizeof(params[0]), + params); + + if (res == -1) { + werrstr("%s: could not get params at all", RosSymLineInfo->FunctionName); + RosSymLineInfo->NumParams = 0; + return TRUE; + } + + werrstr("%s: res %d", RosSymLineInfo->FunctionName, res); + RosSymLineInfo->NumParams = res; + + res = dwarfcomputecfa(RosSymInfo, &cfa, ®isters, &cfaLocation); + if (res == -1) { + werrstr("%s: could not get our own cfa", RosSymLineInfo->FunctionName); + return TRUE; + } + + for (i = 0; i < RosSymLineInfo->NumParams; i++) { + werrstr("Getting arg %s, unit %x, type %x", + params[i].name, params[i].unit, params[i].type); + res = dwarfargvalue + (RosSymInfo, + &proc, + RelativeAddress + RosSymInfo->pe->imagebase, + cfaLocation, + ®isters, + ¶ms[i]); + if (res == -1) { RosSymLineInfo->NumParams = i; return TRUE; } + werrstr("%s: %x", params[i].name, params[i].value); + RosSymLineInfo->Parameters[i].ValueName = malloc(strlen(params[i].name)+1); + strcpy(RosSymLineInfo->Parameters[i].ValueName, params[i].name); + free(params[i].name); + RosSymLineInfo->Parameters[i].Value = params[i].value; + } + + return TRUE; +} + +/* EOF */ diff --git a/lib/rossym_new/fromfile.c b/lib/rossym_new/fromfile.c new file mode 100644 index 00000000000..c26ea3e2a80 --- /dev/null +++ b/lib/rossym_new/fromfile.c @@ -0,0 +1,163 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/fromfile.c + * PURPOSE: Creating rossym info from a file + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include +#include "rossympriv.h" +#include "pe.h" +#include + +#include "dwarf.h" + +#define NDEBUG +#include + +#define SYMBOL_SIZE 18 + +extern NTSTATUS RosSymStatus; + +BOOLEAN +RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo) +{ + IMAGE_DOS_HEADER DosHeader; + IMAGE_NT_HEADERS NtHeaders; + PIMAGE_SECTION_HEADER SectionHeaders; + unsigned SectionIndex; + unsigned SymbolTable, NumSymbols; + + /* Load DOS header */ + if (! RosSymSeekFile(FileContext, 0)) + { + werrstr("Could not rewind file\n"); + return FALSE; + } + if (! RosSymReadFile(FileContext, &DosHeader, sizeof(IMAGE_DOS_HEADER))) + { + werrstr("Failed to read DOS header %x\n", RosSymStatus); + return FALSE; + } + if (! ROSSYM_IS_VALID_DOS_HEADER(&DosHeader)) + { + werrstr("Image doesn't have a valid DOS header\n"); + return FALSE; + } + + /* Load NT headers */ + if (! RosSymSeekFile(FileContext, DosHeader.e_lfanew)) + { + werrstr("Failed seeking to NT headers\n"); + return FALSE; + } + if (! RosSymReadFile(FileContext, &NtHeaders, sizeof(IMAGE_NT_HEADERS))) + { + werrstr("Failed to read NT headers\n"); + return FALSE; + } + if (! ROSSYM_IS_VALID_NT_HEADERS(&NtHeaders)) + { + werrstr("Image doesn't have a valid PE header\n"); + return FALSE; + } + + SymbolTable = NtHeaders.FileHeader.PointerToSymbolTable; + NumSymbols = NtHeaders.FileHeader.NumberOfSymbols; + + if (!NumSymbols) + { + werrstr("Image doesn't have debug symbols\n"); + return FALSE; + } + + DPRINT("SymbolTable %x NumSymbols %x\n", SymbolTable, NumSymbols); + + /* Load section headers */ + if (! RosSymSeekFile(FileContext, (char *) IMAGE_FIRST_SECTION(&NtHeaders) - + (char *) &NtHeaders + DosHeader.e_lfanew)) + { + werrstr("Failed seeking to section headers\n"); + return FALSE; + } + DPRINT("Alloc section headers\n"); + SectionHeaders = RosSymAllocMem(NtHeaders.FileHeader.NumberOfSections + * sizeof(IMAGE_SECTION_HEADER)); + if (NULL == SectionHeaders) + { + werrstr("Failed to allocate memory for %u section headers\n", + NtHeaders.FileHeader.NumberOfSections); + return FALSE; + } + if (! RosSymReadFile(FileContext, SectionHeaders, + NtHeaders.FileHeader.NumberOfSections + * sizeof(IMAGE_SECTION_HEADER))) + { + RosSymFreeMem(SectionHeaders); + werrstr("Failed to read section headers\n"); + return FALSE; + } + + // Convert names to ANSI_STRINGs + for (SectionIndex = 0; SectionIndex < NtHeaders.FileHeader.NumberOfSections; + SectionIndex++) + { + ANSI_STRING astr; + if (SectionHeaders[SectionIndex].Name[0] != '/') { + DPRINT("Short name string %d, %s\n", SectionIndex, SectionHeaders[SectionIndex].Name); + astr.Buffer = RosSymAllocMem(IMAGE_SIZEOF_SHORT_NAME); + memcpy(astr.Buffer, SectionHeaders[SectionIndex].Name, IMAGE_SIZEOF_SHORT_NAME); + astr.MaximumLength = IMAGE_SIZEOF_SHORT_NAME; + astr.Length = GetStrnlen(astr.Buffer, IMAGE_SIZEOF_SHORT_NAME); + } else { + UNICODE_STRING intConv; + NTSTATUS Status; + ULONG StringOffset; + + Status = RtlCreateUnicodeStringFromAsciiz(&intConv, (PCSZ)SectionHeaders[SectionIndex].Name + 1); + if (!NT_SUCCESS(Status)) goto freeall; + Status = RtlUnicodeStringToInteger(&intConv, 10, &StringOffset); + RtlFreeUnicodeString(&intConv); + if (!NT_SUCCESS(Status)) goto freeall; + if (!RosSymSeekFile(FileContext, SymbolTable + NumSymbols * SYMBOL_SIZE + StringOffset)) + goto freeall; + astr.Buffer = RosSymAllocMem(MAXIMUM_DWARF_NAME_SIZE); + if (!RosSymReadFile(FileContext, astr.Buffer, MAXIMUM_DWARF_NAME_SIZE)) + goto freeall; + astr.Length = GetStrnlen(astr.Buffer, MAXIMUM_DWARF_NAME_SIZE); + astr.MaximumLength = MAXIMUM_DWARF_NAME_SIZE; + DPRINT("Long name %d, %s\n", SectionIndex, astr.Buffer); + } + *ANSI_NAME_STRING(&SectionHeaders[SectionIndex]) = astr; + } + + DPRINT("Done with sections\n"); + Pe *pe = RosSymAllocMem(sizeof(*pe)); + pe->fd = FileContext; + pe->e2 = peget2; + pe->e4 = peget4; + pe->e8 = peget8; + pe->nsections = NtHeaders.FileHeader.NumberOfSections; + pe->sect = SectionHeaders; + pe->imagebase = pe->loadbase = NtHeaders.OptionalHeader.ImageBase; + pe->imagesize = NtHeaders.OptionalHeader.SizeOfImage; + pe->loadsection = loaddisksection; + *RosSymInfo = dwarfopen(pe); + + return TRUE; + +freeall: + for (SectionIndex = 0; SectionIndex < NtHeaders.FileHeader.NumberOfSections; + SectionIndex++) + RtlFreeAnsiString(ANSI_NAME_STRING(&SectionHeaders[SectionIndex])); + RosSymFreeMem(SectionHeaders); + + return FALSE; +} + +/* EOF */ diff --git a/lib/rossym_new/frommem.c b/lib/rossym_new/frommem.c new file mode 100644 index 00000000000..2e201d27a48 --- /dev/null +++ b/lib/rossym_new/frommem.c @@ -0,0 +1,160 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/frommem.c + * PURPOSE: Creating rossym info from an in-memory image + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "dwarf.h" +#include "pe.h" + +BOOLEAN +RosSymCreateFromMem(PVOID ImageStart, ULONG_PTR ImageSize, PROSSYM_INFO *RosSymInfo) +{ + ANSI_STRING AnsiNameString = { }; + PIMAGE_DOS_HEADER DosHeader; + PIMAGE_NT_HEADERS NtHeaders; + PIMAGE_SECTION_HEADER SectionHeaders; + ULONG SectionIndex; + unsigned SymbolTable, NumSymbols; + + /* Check if MZ header is valid */ + DosHeader = (PIMAGE_DOS_HEADER) ImageStart; + if (ImageSize < sizeof(IMAGE_DOS_HEADER) + || ! ROSSYM_IS_VALID_DOS_HEADER(DosHeader)) + { + DPRINT1("Image doesn't have a valid DOS header\n"); + return FALSE; + } + + /* Locate NT header */ + NtHeaders = (PIMAGE_NT_HEADERS)((char *) ImageStart + DosHeader->e_lfanew); + if (ImageSize < DosHeader->e_lfanew + sizeof(IMAGE_NT_HEADERS) + || ! ROSSYM_IS_VALID_NT_HEADERS(NtHeaders)) + { + DPRINT1("Image doesn't have a valid PE header\n"); + return FALSE; + } + + SymbolTable = NtHeaders->FileHeader.PointerToSymbolTable; + NumSymbols = NtHeaders->FileHeader.NumberOfSymbols; + + /* Search for the section header */ + ULONG SectionHeaderSize = NtHeaders->FileHeader.NumberOfSections * sizeof(IMAGE_SECTION_HEADER); + SectionHeaders = RosSymAllocMem(SectionHeaderSize); + RtlCopyMemory(SectionHeaders, IMAGE_FIRST_SECTION(NtHeaders), SectionHeaderSize); + + // Convert names to ANSI_STRINGs + for (SectionIndex = 0; SectionIndex < NtHeaders->FileHeader.NumberOfSections; + SectionIndex++) + { + if (SectionHeaders[SectionIndex].Name[0] != '/') { + AnsiNameString.Buffer = RosSymAllocMem(IMAGE_SIZEOF_SHORT_NAME); + RtlCopyMemory(AnsiNameString.Buffer, SectionHeaders[SectionIndex].Name, IMAGE_SIZEOF_SHORT_NAME); + AnsiNameString.MaximumLength = IMAGE_SIZEOF_SHORT_NAME; + AnsiNameString.Length = GetStrnlen(AnsiNameString.Buffer, IMAGE_SIZEOF_SHORT_NAME); + } else { + UNICODE_STRING intConv; + NTSTATUS Status; + ULONG StringOffset; + + Status = RtlCreateUnicodeStringFromAsciiz(&intConv, (PCSZ)SectionHeaders[SectionIndex].Name + 1); + if (!NT_SUCCESS(Status)) goto freeall; + Status = RtlUnicodeStringToInteger(&intConv, 10, &StringOffset); + RtlFreeUnicodeString(&intConv); + if (!NT_SUCCESS(Status)) goto freeall; + ULONG VirtualOffset = pefindrva(SectionHeaders, NtHeaders->FileHeader.NumberOfSections, SymbolTable+(NumSymbols*SYMBOL_SIZE)+StringOffset); + if (!VirtualOffset) goto freeall; + AnsiNameString.Buffer = RosSymAllocMem(MAXIMUM_DWARF_NAME_SIZE); + if (!AnsiNameString.Buffer) goto freeall; + PCHAR StringTarget = ((PCHAR)ImageStart)+VirtualOffset; + PCHAR EndOfImage = ((PCHAR)ImageStart) + NtHeaders->OptionalHeader.SizeOfImage; + if (StringTarget >= EndOfImage) goto freeall; + ULONG PossibleStringLength = EndOfImage - StringTarget; + if (PossibleStringLength > MAXIMUM_DWARF_NAME_SIZE) + PossibleStringLength = MAXIMUM_DWARF_NAME_SIZE; + RtlCopyMemory(AnsiNameString.Buffer, StringTarget, PossibleStringLength); + AnsiNameString.Length = strlen(AnsiNameString.Buffer); + AnsiNameString.MaximumLength = MAXIMUM_DWARF_NAME_SIZE; + } + memcpy + (&SectionHeaders[SectionIndex], + &AnsiNameString, + sizeof(AnsiNameString)); + } + + Pe *pe = RosSymAllocMem(sizeof(*pe)); + pe->fd = ImageStart; + pe->e2 = peget2; + pe->e4 = peget4; + pe->e8 = peget8; + pe->loadbase = (ULONG)ImageStart; + pe->imagebase = NtHeaders->OptionalHeader.ImageBase; + pe->imagesize = NtHeaders->OptionalHeader.SizeOfImage; + pe->nsections = NtHeaders->FileHeader.NumberOfSections; + pe->sect = SectionHeaders; + pe->nsymbols = NtHeaders->FileHeader.NumberOfSymbols; + pe->symtab = malloc(pe->nsymbols * sizeof(CoffSymbol)); + PSYMENT SymbolData = (PSYMENT) + (((PCHAR)ImageStart) + + pefindrva + (pe->sect, + pe->nsections, + NtHeaders->FileHeader.PointerToSymbolTable)); + int i, j; + for (i = 0, j = 0; i < pe->nsymbols; i++) { + if ((SymbolData[i].e_scnum < 1) || + (SymbolData[i].e_sclass != C_EXT && + SymbolData[i].e_sclass != C_STAT)) + continue; + int section = SymbolData[i].e_scnum - 1; + if (SymbolData[i].e.e.e_zeroes) { + pe->symtab[j].name = malloc(sizeof(SymbolData[i].e.e_name)+1); + strcpy(pe->symtab[j].name, SymbolData[i].e.e_name); + } else { + PCHAR SymbolName = ((PCHAR)ImageStart) + + pefindrva + (pe->sect, + pe->nsections, + NtHeaders->FileHeader.PointerToSymbolTable + + (NtHeaders->FileHeader.NumberOfSymbols * 18) + + SymbolData[i].e.e.e_offset); + pe->symtab[j].name = malloc(strlen(SymbolName)+1); + strcpy(pe->symtab[j].name, SymbolName); + } + if (pe->symtab[j].name[0] == '.') { + free(pe->symtab[j].name); + continue; + } + pe->symtab[j].address = pe->sect[section].VirtualAddress + SymbolData[i].e_value; + j++; + } + pe->nsymbols = j; + pe->loadsection = loadmemsection; + *RosSymInfo = dwarfopen(pe); + + return !!*RosSymInfo; + +freeall: + if (AnsiNameString.Buffer) RosSymFreeMem(AnsiNameString.Buffer); + for (SectionIndex = 0; SectionIndex < NtHeaders->FileHeader.NumberOfSections; + SectionIndex++) + RtlFreeAnsiString(ANSI_NAME_STRING(&SectionHeaders[SectionIndex])); + RosSymFreeMem(SectionHeaders); + + return FALSE; +} + +/* EOF */ diff --git a/lib/rossym_new/fromraw.c b/lib/rossym_new/fromraw.c new file mode 100644 index 00000000000..ae484252424 --- /dev/null +++ b/lib/rossym_new/fromraw.c @@ -0,0 +1,55 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/frommem.c + * PURPOSE: Creating rossym info from an in-memory image + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +BOOLEAN +RosSymCreateFromRaw(PVOID RawData, ULONG_PTR DataSize, PROSSYM_INFO *RosSymInfo) +{ + PROSSYM_HEADER RosSymHeader; + + RosSymHeader = (PROSSYM_HEADER) RawData; + if (RosSymHeader->SymbolsOffset < sizeof(ROSSYM_HEADER) + || RosSymHeader->StringsOffset < RosSymHeader->SymbolsOffset + RosSymHeader->SymbolsLength + || DataSize < RosSymHeader->StringsOffset + RosSymHeader->StringsLength + || 0 != (RosSymHeader->SymbolsLength % sizeof(ROSSYM_ENTRY))) + { + DPRINT1("Invalid ROSSYM_HEADER\n"); + return FALSE; + } + + /* Copy */ + *RosSymInfo = RosSymAllocMem(sizeof(ROSSYM_INFO) + RosSymHeader->SymbolsLength + + RosSymHeader->StringsLength + 1); + if (NULL == *RosSymInfo) + { + DPRINT1("Failed to allocate memory for rossym\n"); + return FALSE; + } + (*RosSymInfo)->Symbols = (PROSSYM_ENTRY)((char *) *RosSymInfo + sizeof(ROSSYM_INFO)); + (*RosSymInfo)->SymbolsCount = RosSymHeader->SymbolsLength / sizeof(ROSSYM_ENTRY); + (*RosSymInfo)->Strings = (PCHAR) *RosSymInfo + sizeof(ROSSYM_INFO) + RosSymHeader->SymbolsLength; + (*RosSymInfo)->StringsLength = RosSymHeader->StringsLength; + memcpy((*RosSymInfo)->Symbols, (char *) RosSymHeader + RosSymHeader->SymbolsOffset, + RosSymHeader->SymbolsLength); + memcpy((*RosSymInfo)->Strings, (char *) RosSymHeader + RosSymHeader->StringsOffset, + RosSymHeader->StringsLength); + /* Make sure the last string is null terminated, we allocated an extra byte for that */ + (*RosSymInfo)->Strings[(*RosSymInfo)->StringsLength] = '\0'; + + return TRUE; +} + +/* EOF */ diff --git a/lib/rossym_new/getraw.c b/lib/rossym_new/getraw.c new file mode 100644 index 00000000000..1f11057a38e --- /dev/null +++ b/lib/rossym_new/getraw.c @@ -0,0 +1,43 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/getraw.c + * PURPOSE: Convert rossym info to raw external format + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +ULONG +RosSymGetRawDataLength(PROSSYM_INFO RosSymInfo) +{ + return sizeof(ROSSYM_HEADER) + + RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY) + + RosSymInfo->StringsLength; +} + +VOID +RosSymGetRawData(PROSSYM_INFO RosSymInfo, PVOID RawData) +{ + PROSSYM_HEADER RosSymHeader; + + RosSymHeader = (PROSSYM_HEADER) RawData; + RosSymHeader->SymbolsOffset = sizeof(ROSSYM_HEADER); + RosSymHeader->SymbolsLength = RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY); + RosSymHeader->StringsOffset = RosSymHeader->SymbolsOffset + RosSymHeader->SymbolsLength; + RosSymHeader->StringsLength = RosSymInfo->StringsLength; + + memcpy((char *) RawData + RosSymHeader->SymbolsOffset, RosSymInfo->Symbols, + RosSymHeader->SymbolsLength); + memcpy((char *) RawData + RosSymHeader->StringsOffset, RosSymInfo->Strings, + RosSymHeader->StringsLength); +} + +/* EOF */ diff --git a/lib/rossym_new/init.c b/lib/rossym_new/init.c new file mode 100644 index 00000000000..80be79a1ee0 --- /dev/null +++ b/lib/rossym_new/init.c @@ -0,0 +1,22 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/data.c + * PURPOSE: Definition of external variables + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#include +#include +#include "rossympriv.h" + +ROSSYM_CALLBACKS RosSymCallbacks; + +VOID +RosSymInit(PROSSYM_CALLBACKS Callbacks) +{ + RosSymCallbacks = *Callbacks; +} + +/* EOF */ diff --git a/lib/rossym_new/initkm.c b/lib/rossym_new/initkm.c new file mode 100644 index 00000000000..4f1c07111a3 --- /dev/null +++ b/lib/rossym_new/initkm.c @@ -0,0 +1,48 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/initkm.c + * PURPOSE: Initialize library for use in kernel mode + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#include +#undef DECLSPEC_IMPORT +#define DECLSPEC_IMPORT +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +#define TAG_ROSSYM 'MYSR' + +static PVOID +RosSymAllocMemKM(ULONG_PTR Size) +{ + return ExAllocatePoolWithTag(NonPagedPool, Size, TAG_ROSSYM); +} + +static VOID +RosSymFreeMemKM(PVOID Area) +{ + ExFreePool(Area); +} + +VOID +RosSymInitKernelMode(VOID) +{ + static ROSSYM_CALLBACKS KmCallbacks = + { + RosSymAllocMemKM, + RosSymFreeMemKM, + RosSymIoReadFile, + RosSymIoSeekFile + }; + + RosSymInit(&KmCallbacks); +} + +/* EOF */ diff --git a/lib/rossym_new/initum.c b/lib/rossym_new/initum.c new file mode 100644 index 00000000000..eb59c0f185e --- /dev/null +++ b/lib/rossym_new/initum.c @@ -0,0 +1,54 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/initum.c + * PURPOSE: Initialize library for use in user mode + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define WIN32_NO_STATUS +#include +#include +#include "rossympriv.h" +#define NTOS_MODE_USER +#include +#include + +#define NDEBUG +#include + +static PVOID +RosSymAllocMemUM(ULONG_PTR Size) +{ + return RtlAllocateHeap(RtlGetProcessHeap(), 0, Size); +} + +static VOID +RosSymFreeMemUM(PVOID Area) +{ + RtlFreeHeap(RtlGetProcessHeap(), 0, Area); +} + +static BOOLEAN +RosSymGetMemUM(ULONG_PTR *Target, PVOID SourceMem, ULONG Size) +{ + return FALSE; +} + +VOID +RosSymInitUserMode(VOID) +{ + static ROSSYM_CALLBACKS KmCallbacks = + { + RosSymAllocMemUM, + RosSymFreeMemUM, + RosSymZwReadFile, + RosSymZwSeekFile, + RosSymGetMemUM + }; + + RosSymInit(&KmCallbacks); +} + +/* EOF */ diff --git a/lib/rossym_new/iofile.c b/lib/rossym_new/iofile.c new file mode 100644 index 00000000000..97069c50076 --- /dev/null +++ b/lib/rossym_new/iofile.c @@ -0,0 +1,34 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/zwfile.c + * PURPOSE: File I/O using native functions + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +NTSTATUS RosSymStatus; + +BOOLEAN +RosSymIoReadFile(PVOID FileContext, PVOID Buffer, ULONG Size) +{ + PROSSYM_OWN_FILECONTEXT OwnContext = (PROSSYM_OWN_FILECONTEXT)FileContext; + return OwnContext->ReadFileProc(FileContext, Buffer, Size); +} + +BOOLEAN +RosSymIoSeekFile(PVOID FileContext, ULONG_PTR Position) +{ + PROSSYM_OWN_FILECONTEXT OwnContext = (PROSSYM_OWN_FILECONTEXT)FileContext; + return OwnContext->SeekFileProc(FileContext, Position); +} + +/* EOF */ diff --git a/lib/rossym_new/pe.c b/lib/rossym_new/pe.c new file mode 100644 index 00000000000..cace420fec2 --- /dev/null +++ b/lib/rossym_new/pe.c @@ -0,0 +1,138 @@ +#define NTOSAPI +#include +#include +#include +#include "rossympriv.h" +#include + +#define NDEBUG +#include + +#include "dwarf.h" +#include "pe.h" +#include "rossympriv.h" + +PeSect *pesection(Pe *pe, const char *name) +{ + int i; + ANSI_STRING WantName; + RtlInitAnsiString(&WantName, name); + DPRINT("Searching for section %s\n", name); + for (i = 0; i < pe->nsections; i++) { + PANSI_STRING AnsiString = ANSI_NAME_STRING(&pe->sect[i]); + if (WantName.Length == AnsiString->Length && + !memcmp(AnsiString->Buffer, name, WantName.Length)) { + DPRINT("Found %s (%d) @ %x (%x)\n", name, i, + ((PCHAR)pe->imagebase)+pe->sect[i].VirtualAddress, + pe->sect[i].SizeOfRawData); + return &pe->sect[i]; + } + } + DPRINT("%s not found\n", name); + return nil; +} + +u16int peget2(const unsigned char *ptr) { + return *((u16int*)ptr); +} + +u32int peget4(const unsigned char *ptr) { + return *((u32int*)ptr); +} + +u64int peget8(const unsigned char *ptr) { + return *((u64int*)ptr); +} + +int readn(void *filectx, char *buffer, ulong size) { + return RosSymReadFile(filectx, buffer, size); +} + +int seek(void *filectx, ulong position, int origin) { + assert(origin == 0); + return RosSymSeekFile(filectx, position); +} + +static int +readblock(void *fd, DwarfBlock *b, ulong off, ulong len) +{ + b->data = malloc(len); + if(b->data == nil) + return -1; + if(!seek(fd, off, 0) || !readn(fd, (char *)b->data, len)){ + free(b->data); + b->data = nil; + return -1; + } + b->len = len; + return 0; +} + +int +loaddisksection(Pe *pe, char *name, DwarfBlock *b) +{ + PeSect *s; + if((s = pesection(pe, name)) == nil) + return -1; + return readblock(pe->fd, b, s->PointerToRawData, s->SizeOfRawData); +} + +int +loadmemsection(Pe *pe, char *name, DwarfBlock *b) +{ + PeSect *s; + + if((s = pesection(pe, name)) == nil) + return -1; + DPRINT("Loading section %s (ImageBase %x RVA %x)\n", name, pe->fd, s->VirtualAddress); + b->data = RosSymAllocMem(s->SizeOfRawData); + b->len = s->SizeOfRawData; + PCHAR DataSource = ((char *)pe->fd) + s->VirtualAddress; + DPRINT("Copying to %x from %x (%x)\n", DataSource, b->data, b->len); + RtlCopyMemory(b->data, DataSource, s->SizeOfRawData); + + return s->SizeOfRawData; +} + +void *RosSymAllocMemZero(ulong size, ulong count) { + void *res = RosSymAllocMem(size * count); + if (res) memset(res, 0, size * count); + return res; +} + +int GetStrnlen(const char *string, int maxlen) { + int i; + for (i = 0; i < maxlen && string[i]; i++); + return i; +} + +void pefree(Pe *pe) { + int i; + for (i = 0; i < pe->nsections; i++) { + RtlFreeAnsiString(ANSI_NAME_STRING(&pe->sect[i])); + } + free(pe->sect); + free(pe); +} + +void xfree(void *v) { + if (v) RosSymFreeMem(v); +} + +ulong pefindrva(struct _IMAGE_SECTION_HEADER *SectionHeaders, int NumberOfSections, ulong TargetPhysical) { + int i; + DPRINT("Finding RVA for Physical %x\n", TargetPhysical); + for (i = 0; i < NumberOfSections; i++) { + DPRINT("Section %d name %s Raw %x Virt %x\n", + i, + ANSI_NAME_STRING(&SectionHeaders[i])->Buffer, + SectionHeaders[i].PointerToRawData, + SectionHeaders[i].VirtualAddress); + if (TargetPhysical >= SectionHeaders[i].PointerToRawData && + TargetPhysical < SectionHeaders[i].PointerToRawData + SectionHeaders[i].SizeOfRawData) { + DPRINT("RVA %x\n", TargetPhysical - SectionHeaders[i].PointerToRawData + SectionHeaders[i].VirtualAddress); + return TargetPhysical - SectionHeaders[i].PointerToRawData + SectionHeaders[i].VirtualAddress; + } + } + return nil; +} diff --git a/lib/rossym_new/pe.h b/lib/rossym_new/pe.h new file mode 100644 index 00000000000..6b5bbdaa8f4 --- /dev/null +++ b/lib/rossym_new/pe.h @@ -0,0 +1,31 @@ +#ifndef _LIBMACH_PE_H_ +#define _LIBMACH_PE_H_ + +#include "compat.h" + +struct DwarfBlock; +typedef struct _IMAGE_SECTION_HEADER PeSect; + +typedef struct _Pe { + void *fd; + u16int (*e2)(const unsigned char *data); + u32int (*e4)(const unsigned char *data); + u64int (*e8)(const unsigned char *data); + ulong imagebase, imagesize, loadbase; + int (*loadsection)(struct _Pe *pe, char *name, struct DwarfBlock *b); + int nsections; + struct _IMAGE_SECTION_HEADER *sect; +} Pe; + +Pe *peopen(const char *name); +int loaddisksection(struct _Pe *pe, char *name, struct DwarfBlock *b); +u16int peget2(const unsigned char *ptr); +u32int peget4(const unsigned char *ptr); +u64int peget8(const unsigned char *ptr); +void pefree(struct _Pe *pe); +ulong pefindrva(struct _IMAGE_SECTION_HEADER *SectionHeader, int NumberOfSections, ulong TargetPhysical); +int GetStrnlen(const char *string, int maxlen); + +#define ANSI_NAME_STRING(s) ((PANSI_STRING)((s)->Name)) + +#endif/*_LIBMACH_PE_H_*/ diff --git a/lib/rossym_new/rossympriv.h b/lib/rossym_new/rossympriv.h new file mode 100644 index 00000000000..1a604ef3f47 --- /dev/null +++ b/lib/rossym_new/rossympriv.h @@ -0,0 +1,30 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/rossympriv.h + * PURPOSE: Private header for rossym + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#pragma once + +#define HIGHBIT 0x80000000 + +extern ROSSYM_CALLBACKS RosSymCallbacks; + +#define RosSymAllocMem(Size) (*RosSymCallbacks.AllocMemProc)(Size) +#define RosSymFreeMem(Area) (*RosSymCallbacks.FreeMemProc)(Area) +#define RosSymReadFile(FileContext, Buffer, Size) (*RosSymCallbacks.ReadFileProc)((FileContext), (Buffer), (Size)) +#define RosSymSeekFile(FileContext, Position) (*RosSymCallbacks.SeekFileProc)((FileContext), (Position)) +#define RosSymGetMem(TargetAddress, Address, Size) (*RosSymCallbacks.MemGetProc)((TargetAddress), (Address), (Size)) + +extern BOOLEAN RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size); +extern BOOLEAN RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position); + +#define ROSSYM_IS_VALID_DOS_HEADER(DosHeader) (IMAGE_DOS_SIGNATURE == (DosHeader)->e_magic \ + && 0L != (DosHeader)->e_lfanew) +#define ROSSYM_IS_VALID_NT_HEADERS(NtHeaders) (IMAGE_NT_SIGNATURE == (NtHeaders)->Signature \ + && IMAGE_NT_OPTIONAL_HDR_MAGIC == (NtHeaders)->OptionalHeader.Magic) + +/* EOF */ diff --git a/lib/rossym_new/zwfile.c b/lib/rossym_new/zwfile.c new file mode 100644 index 00000000000..a6ce196c632 --- /dev/null +++ b/lib/rossym_new/zwfile.c @@ -0,0 +1,54 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/zwfile.c + * PURPOSE: File I/O using native functions + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +NTSTATUS RosSymStatus; + +BOOLEAN +RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size) +{ + //NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + + RosSymStatus = ZwReadFile(*((HANDLE *) FileContext), + 0, 0, 0, + &IoStatusBlock, + Buffer, + Size, + 0, 0); + + return NT_SUCCESS(RosSymStatus) && IoStatusBlock.Information == Size; +} + +BOOLEAN +RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position) +{ + //NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + FILE_POSITION_INFORMATION NewPosition; + + NewPosition.CurrentByteOffset.u.HighPart = 0; + NewPosition.CurrentByteOffset.u.LowPart = Position; + RosSymStatus = ZwSetInformationFile(*((HANDLE *) FileContext), + &IoStatusBlock, + (PVOID) &NewPosition, + sizeof(FILE_POSITION_INFORMATION), + FilePositionInformation); + + return NT_SUCCESS(RosSymStatus); +} + +/* EOF */ diff --git a/lib/rtl/CMakeLists.txt b/lib/rtl/CMakeLists.txt index 64194389eac..da0f979d2dd 100644 --- a/lib/rtl/CMakeLists.txt +++ b/lib/rtl/CMakeLists.txt @@ -97,6 +97,6 @@ elseif(ARCH MATCHES powerpc) powerpc/thread.c) endif() -add_library(rtl ${CMAKE_CURRENT_BINARY_DIR}/rtl_rtl.h.gch ${SOURCE}) -add_pch(rtl ${CMAKE_CURRENT_SOURCE_DIR}/rtl.h ${SOURCE}) +add_library(rtl ${SOURCE}) +add_pch(rtl rtl.h) add_dependencies(rtl psdk asm) diff --git a/lib/rtl/actctx.c b/lib/rtl/actctx.c index 2abea6e172c..71a5459a52c 100644 --- a/lib/rtl/actctx.c +++ b/lib/rtl/actctx.c @@ -2736,6 +2736,10 @@ NTAPI RtlAllocateActivationContextStack(IN PVOID *Context) { PACTIVATION_CONTEXT_STACK ContextStack; + + /* FIXME: Check if it's already allocated */ + //if (*Context) return STATUS_SUCCESS; + ContextStack = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (ACTIVATION_CONTEXT_STACK) ); if (!ContextStack) { @@ -2798,7 +2802,16 @@ RtlActivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTE /* Return pointer to the activation frame */ return &Frame->Frame; #else - return NULL; + + RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame = &Frame->Frame; + + frame->Previous = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame; + frame->ActivationContext = Context; + frame->Flags = 0; + + NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame = frame; + + return STATUS_SUCCESS; #endif } @@ -2806,7 +2819,6 @@ PRTL_ACTIVATION_CONTEXT_STACK_FRAME FASTCALL RtlDeactivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame) { -#if NEW_NTDLL_LOADER RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame, *top; /* find the right frame */ @@ -2820,9 +2832,6 @@ RtlDeactivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CON NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame = frame->Previous; return frame; -#else - return NULL; -#endif } diff --git a/lib/rtl/bitmap.c b/lib/rtl/bitmap.c index 42c03abe2b0..6e88bd9188b 100644 --- a/lib/rtl/bitmap.c +++ b/lib/rtl/bitmap.c @@ -152,11 +152,11 @@ RtlFindMostSignificantBit(ULONGLONG Value) if (BitScanReverse(&Position, Value >> 32)) { - return Position + 32; + return (CCHAR)(Position + 32); } else if (BitScanReverse(&Position, (ULONG)Value)) { - return Position; + return (CCHAR)Position; } return -1; @@ -170,11 +170,11 @@ RtlFindLeastSignificantBit(ULONGLONG Value) if (BitScanForward(&Position, (ULONG)Value)) { - return Position; + return (CCHAR)Position; } else if (BitScanForward(&Position, Value >> 32)) { - return Position + 32; + return (CCHAR)(Position + 32); } return -1; @@ -187,9 +187,6 @@ RtlInitializeBitMap( IN PULONG BitMapBuffer, IN ULONG SizeOfBitMap) { - // FIXME: some bugger here! - //ASSERT(SizeOfBitMap > 0); - /* Setup the bitmap header */ BitMapHeader->SizeOfBitMap = SizeOfBitMap; BitMapHeader->Buffer = BitMapBuffer; @@ -212,7 +209,7 @@ RtlSetAllBits( IN OUT PRTL_BITMAP BitMapHeader) { ULONG LengthInUlongs; - + LengthInUlongs = (BitMapHeader->SizeOfBitMap + 31) >> 5; RtlFillMemoryUlong(BitMapHeader->Buffer, LengthInUlongs << 2, ~0); } @@ -481,7 +478,7 @@ RtlFindSetBits( IN ULONG NumberToFind, IN ULONG HintIndex) { - ULONG CurrentBit, CurrentLength; + ULONG CurrentBit, Margin, CurrentLength; /* Check for valid parameters */ if (!BitMapHeader || NumberToFind > BitMapHeader->SizeOfBitMap) @@ -495,12 +492,15 @@ RtlFindSetBits( return HintIndex; } + /* First margin is end of bitmap */ + Margin = BitMapHeader->SizeOfBitMap; + +retry: /* Start with hint index, length is 0 */ CurrentBit = HintIndex; - CurrentLength = 0; /* Loop until something is found or the end is reached */ - while (CurrentBit + NumberToFind <= BitMapHeader->SizeOfBitMap) + while (CurrentBit + NumberToFind <= Margin) { /* Search for the next set run, by skipping a clear run */ CurrentBit += RtlpGetLengthOfRunClear(BitMapHeader, @@ -522,6 +522,15 @@ RtlFindSetBits( CurrentBit += CurrentLength; } + /* Did we start at a hint? */ + if (HintIndex) + { + /* Retry at the start */ + Margin = min(HintIndex + NumberToFind, BitMapHeader->SizeOfBitMap); + HintIndex = 0; + goto retry; + } + /* Nothing found */ return MAXULONG; } @@ -641,7 +650,7 @@ RtlFindClearRuns( for (Run = 0; Run < SizeOfRunArray; Run++) { /* Look for a run */ - NumberOfBits = RtlFindNextForwardRunClear(BitMapHeader, + NumberOfBits = RtlFindNextForwardRunClear(BitMapHeader, FromIndex, &StartingIndex); @@ -672,7 +681,7 @@ RtlFindClearRuns( while (1) { /* Look for a run */ - NumberOfBits = RtlFindNextForwardRunClear(BitMapHeader, + NumberOfBits = RtlFindNextForwardRunClear(BitMapHeader, FromIndex, &StartingIndex); @@ -716,7 +725,7 @@ RtlFindLongestRunClear( while (1) { /* Look for a run */ - NumberOfBits = RtlFindNextForwardRunClear(BitMapHeader, + NumberOfBits = RtlFindNextForwardRunClear(BitMapHeader, FromIndex, &Index); @@ -749,7 +758,7 @@ RtlFindLongestRunSet( while (1) { /* Look for a run */ - NumberOfBits = RtlFindNextForwardRunSet(BitMapHeader, + NumberOfBits = RtlFindNextForwardRunSet(BitMapHeader, FromIndex, &Index); diff --git a/lib/rtl/heap.c b/lib/rtl/heap.c index 59e1fa7d97f..119ba4a3879 100644 --- a/lib/rtl/heap.c +++ b/lib/rtl/heap.c @@ -571,7 +571,7 @@ RtlpFindAndCommitPages(PHEAP Heap, PLIST_ENTRY Current; ULONG_PTR Address = 0; PHEAP_UCR_DESCRIPTOR UcrDescriptor, PreviousUcr = NULL; - PHEAP_ENTRY FirstEntry, LastEntry, PreviousLastEntry; + PHEAP_ENTRY FirstEntry, LastEntry; NTSTATUS Status; DPRINT("RtlpFindAndCommitPages(%p %p %x %p)\n", Heap, Segment, *Size, Address); @@ -619,40 +619,17 @@ RtlpFindAndCommitPages(PHEAP Heap, /* Calculate first and last entries */ FirstEntry = (PHEAP_ENTRY)Address; - if ((Segment->LastEntryInSegment->Flags & HEAP_ENTRY_LAST_ENTRY) && - (ULONG_PTR)(Segment->LastEntryInSegment + Segment->LastEntryInSegment->Size) == (ULONG_PTR)UcrDescriptor->Address) - { - LastEntry = Segment->LastEntryInSegment; - } + /* Go through the entries to find the last one */ + if (PreviousUcr) + LastEntry = (PHEAP_ENTRY)((ULONG_PTR)PreviousUcr->Address + PreviousUcr->Size); else + LastEntry = &Segment->Entry; + + while (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) { - /* Go through the entries to find the last one */ - - if (PreviousUcr) - LastEntry = (PHEAP_ENTRY)((ULONG_PTR)PreviousUcr->Address + PreviousUcr->Size); - else - LastEntry = Segment->FirstEntry; - - while (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) - { - PreviousLastEntry = LastEntry; - LastEntry += LastEntry->Size; - - if ((ULONG_PTR)LastEntry >= (ULONG_PTR)Segment->LastValidEntry || - LastEntry->Size == 0) - { - if (LastEntry == (PHEAP_ENTRY)Address) - { - /* Found it */ - LastEntry = PreviousLastEntry; - break; - } - - DPRINT1("Last entry not found in a committed range near to %p\n", PreviousLastEntry); - return NULL; - } - } + LastEntry += LastEntry->Size; } + ASSERT((LastEntry + LastEntry->Size) == FirstEntry); /* Unmark it as a last entry */ LastEntry->Flags &= ~HEAP_ENTRY_LAST_ENTRY; @@ -663,20 +640,28 @@ RtlpFindAndCommitPages(PHEAP Heap, DPRINT("Updating UcrDescriptor %p, new Address %p, size %d\n", UcrDescriptor, UcrDescriptor->Address, UcrDescriptor->Size); + + /* Set various first entry fields*/ + FirstEntry->SegmentOffset = LastEntry->SegmentOffset; + FirstEntry->Size = *Size >> HEAP_ENTRY_SHIFT; + FirstEntry->PreviousSize = LastEntry->Size; /* Check if anything left in this UCR */ if (UcrDescriptor->Size == 0) { /* It's fully exhausted */ - if (UcrDescriptor->Address == Segment->LastValidEntry) + + /* Check if this is the end of the segment */ + if(UcrDescriptor->Address == Segment->LastValidEntry) { FirstEntry->Flags = HEAP_ENTRY_LAST_ENTRY; - Segment->LastEntryInSegment = FirstEntry; } else { FirstEntry->Flags = 0; - Segment->LastEntryInSegment = Segment->FirstEntry; + /* Update field of next entry */ + ASSERT((FirstEntry + FirstEntry->Size)->PreviousSize == 0); + (FirstEntry + FirstEntry->Size)->PreviousSize = FirstEntry->Size; } /* This UCR needs to be removed because it became useless */ @@ -688,18 +673,8 @@ RtlpFindAndCommitPages(PHEAP Heap, else { FirstEntry->Flags = HEAP_ENTRY_LAST_ENTRY; - Segment->LastEntryInSegment = FirstEntry; } - - /* Set various first entry fields*/ - FirstEntry->SegmentOffset = LastEntry->SegmentOffset; - FirstEntry->Size = *Size >> HEAP_ENTRY_SHIFT; - FirstEntry->PreviousSize = LastEntry->Size; - - /* Update previous size */ - if (!(FirstEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) - (FirstEntry + FirstEntry->Size)->PreviousSize = FirstEntry->Size; - + /* We're done */ return (PHEAP_FREE_ENTRY)FirstEntry; } @@ -820,9 +795,6 @@ RtlpDeCommitFreeBlock(PHEAP Heap, FreeEntry->Size = PrecedingSize; Heap->TotalFreeSize += PrecedingSize; - /* Set last entry in the segment to this entry */ - Segment->LastEntryInSegment = (PHEAP_ENTRY)FreeEntry; - /* Insert it into the free list */ RtlpInsertFreeBlockHelper(Heap, FreeEntry, PrecedingSize, FALSE); } @@ -830,12 +802,6 @@ RtlpDeCommitFreeBlock(PHEAP Heap, { /* Adjust preceding in use entry */ PrecedingInUseEntry->Flags |= HEAP_ENTRY_LAST_ENTRY; - Segment->LastEntryInSegment = PrecedingInUseEntry; - } else if ((ULONG_PTR)Segment->LastEntryInSegment >= DecommitBase && - ((PCHAR)Segment->LastEntryInSegment < ((PCHAR)DecommitBase + DecommitSize))) - { - /* Update this segment's last entry */ - Segment->LastEntryInSegment = Segment->FirstEntry; } /* Now the next one */ @@ -941,9 +907,6 @@ RtlpInitializeHeapSegment(PHEAP Heap, HeapEntry->PreviousSize = Segment->Entry.Size; HeapEntry->SegmentOffset = SegmentIndex; - /* Set last entry in segment */ - Segment->LastEntryInSegment = HeapEntry; - /* Insert it */ RtlpInsertFreeBlock(Heap, (PHEAP_FREE_ENTRY)HeapEntry, (PHEAP_ENTRY)UncommittedBase - HeapEntry); @@ -1108,10 +1071,6 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, /* Copy flags */ CurrentEntry->Flags = FreeEntry->Flags & HEAP_ENTRY_LAST_ENTRY; - /* Update last entry in the segment */ - if (CurrentEntry->Flags & HEAP_ENTRY_LAST_ENTRY) - Heap->Segments[CurrentEntry->SegmentOffset]->LastEntryInSegment = (PHEAP_ENTRY)CurrentEntry; - /* Advance FreeEntry and update sizes */ FreeEntry = CurrentEntry; *FreeSize = *FreeSize + CurrentEntry->Size; @@ -1145,10 +1104,6 @@ RtlpCoalesceFreeBlocks (PHEAP Heap, /* Copy flags */ FreeEntry->Flags = NextEntry->Flags & HEAP_ENTRY_LAST_ENTRY; - /* Update last entry in the segment */ - if (FreeEntry->Flags & HEAP_ENTRY_LAST_ENTRY) - Heap->Segments[FreeEntry->SegmentOffset]->LastEntryInSegment = (PHEAP_ENTRY)FreeEntry; - /* Remove next entry now */ RtlpRemoveFreeBlock(Heap, NextEntry, FALSE, FALSE); @@ -1894,12 +1849,6 @@ RtlpSplitEntry(PHEAP Heap, /* Reset flags of the free entry */ FreeFlags = 0; - - /* Update last entry in segment */ - if (SplitBlock->Flags & HEAP_ENTRY_LAST_ENTRY) - { - Heap->Segments[SplitBlock->SegmentOffset]->LastEntryInSegment = (PHEAP_ENTRY)SplitBlock; - } } } @@ -2535,9 +2484,7 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, /* Either update previous size of the next entry or mark it as a last entry in the segment*/ - if (RememberFlags & HEAP_ENTRY_LAST_ENTRY) - Heap->Segments[InUseEntry->SegmentOffset]->LastEntryInSegment = InUseEntry; - else + if (!(RememberFlags & HEAP_ENTRY_LAST_ENTRY)) (InUseEntry + InUseEntry->Size)->PreviousSize = InUseEntry->Size; } else @@ -2551,8 +2498,7 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, /* Update the following block or set the last entry in the segment */ if (RememberFlags & HEAP_ENTRY_LAST_ENTRY) { - /* Set last entry and set flags and size */ - Heap->Segments[InUseEntry->SegmentOffset]->LastEntryInSegment = InUseEntry; + /* Set flags and size */ UnusedEntry->Flags = RememberFlags; UnusedEntry->Size = FreeSize; @@ -2597,9 +2543,7 @@ RtlpGrowBlockInPlace (IN PHEAP Heap, /* Fine for a dedicated list */ UnusedEntry->Size = FreeSize; - if (RememberFlags & HEAP_ENTRY_LAST_ENTRY) - Heap->Segments[UnusedEntry->SegmentOffset]->LastEntryInSegment = (PHEAP_ENTRY)UnusedEntry; - else + if (!(RememberFlags & HEAP_ENTRY_LAST_ENTRY)) ((PHEAP_ENTRY)UnusedEntry + FreeSize)->PreviousSize = FreeSize; /* Insert it back and update total size */ @@ -2752,7 +2696,7 @@ RtlReAllocateHeap(HANDLE HeapPtr, { RtlEnterHeapLock(Heap->LockVariable); HeapLocked = TRUE; - Flags ^= HEAP_NO_SERIALIZE; + Flags &= ~HEAP_NO_SERIALIZE; } /* Get the pointer to the in-use entry */ @@ -2918,9 +2862,6 @@ RtlReAllocateHeap(HANDLE HeapPtr, /* Is that the last entry */ if (FreeFlags & HEAP_ENTRY_LAST_ENTRY) { - /* Update segment's last entry */ - Heap->Segments[SplitBlock->SegmentOffset]->LastEntryInSegment = (PHEAP_ENTRY)SplitBlock; - /* Set its size and insert it to the list */ SplitBlock->Size = (USHORT)FreeSize; RtlpInsertFreeBlockHelper(Heap, SplitBlock, FreeSize, FALSE); @@ -2968,10 +2909,6 @@ RtlReAllocateHeap(HANDLE HeapPtr, /* Update previous size of the next entry */ ((PHEAP_FREE_ENTRY)((PHEAP_ENTRY)SplitBlock + FreeSize))->PreviousSize = FreeSize; } - else - { - Heap->Segments[SplitBlock->SegmentOffset]->LastEntryInSegment = (PHEAP_ENTRY)SplitBlock; - } /* Insert the new one back and update total size */ RtlpInsertFreeBlockHelper(Heap, SplitBlock, FreeSize, FALSE); diff --git a/lib/rtl/heap.h b/lib/rtl/heap.h index f00a8daedea..ac130eade7d 100644 --- a/lib/rtl/heap.h +++ b/lib/rtl/heap.h @@ -277,7 +277,6 @@ typedef struct _HEAP_SEGMENT USHORT SegmentAllocatorBackTraceIndex; USHORT Reserved; LIST_ENTRY UCRSegmentList; - PHEAP_ENTRY LastEntryInSegment; //FIXME: non-Vista } HEAP_SEGMENT, *PHEAP_SEGMENT; typedef struct _HEAP_UCR_DESCRIPTOR diff --git a/lib/rtl/workitem.c b/lib/rtl/workitem.c index c74aea8b48d..cb6c83ab35a 100644 --- a/lib/rtl/workitem.c +++ b/lib/rtl/workitem.c @@ -45,7 +45,7 @@ static LONG ThreadPoolIOWorkerThreads; static LONG ThreadPoolIOWorkerThreadsRequests; static LONG ThreadPoolIOWorkerThreadsLongRequests; -#define IsThreadPoolInitialized() ((volatile LONG)ThreadPoolInitialized == 1) +#define IsThreadPoolInitialized() (*((volatile LONG*)&ThreadPoolInitialized) == 1) static NTSTATUS RtlpInitializeThreadPool(VOID) @@ -614,8 +614,8 @@ Wait: /* FIXME - figure out an effective method to determine if it's appropriate to lower the number of threads. For now let's always terminate if there's at least one thread and no queued items. */ - Terminate = ((volatile LONG)ThreadPoolIOWorkerThreads - (volatile LONG)ThreadPoolIOWorkerThreadsLongRequests >= WORKERTHREAD_CREATION_THRESHOLD) && - ((volatile LONG)ThreadPoolIOWorkerThreadsRequests == 0); + Terminate = (*((volatile LONG*)&ThreadPoolIOWorkerThreads) - *((volatile LONG*)&ThreadPoolIOWorkerThreadsLongRequests) >= WORKERTHREAD_CREATION_THRESHOLD) && + (*((volatile LONG*)&ThreadPoolIOWorkerThreadsRequests) == 0); if (Terminate) { @@ -718,7 +718,7 @@ RtlpWorkerThreadProc(IN PVOID Parameter) { /* FIXME - we might want to optimize this */ if (TimeoutCount++ > 2 && - (volatile LONG)ThreadPoolWorkerThreads - (volatile LONG)ThreadPoolWorkerThreadsLongRequests >= WORKERTHREAD_CREATION_THRESHOLD) + *((volatile LONG*)&ThreadPoolWorkerThreads) - *((volatile LONG*)&ThreadPoolWorkerThreadsLongRequests) >= WORKERTHREAD_CREATION_THRESHOLD) { Terminate = TRUE; } @@ -819,7 +819,7 @@ RtlQueueWorkItem(IN WORKERCALLBACKFUNC Function, /* Grow the thread pool */ Status = RtlpStartWorkerThread(RtlpIoWorkerThreadProc); - if (!NT_SUCCESS(Status) && (volatile LONG)ThreadPoolIOWorkerThreads != 0) + if (!NT_SUCCESS(Status) && *((volatile LONG*)&ThreadPoolIOWorkerThreads) != 0) { /* We failed to create the thread, but there's at least one there so we can at least queue the request */ @@ -846,7 +846,7 @@ RtlQueueWorkItem(IN WORKERCALLBACKFUNC Function, /* Grow the thread pool */ Status = RtlpStartWorkerThread(RtlpWorkerThreadProc); - if (!NT_SUCCESS(Status) && (volatile LONG)ThreadPoolWorkerThreads != 0) + if (!NT_SUCCESS(Status) && *((volatile LONG*)&ThreadPoolWorkerThreads) != 0) { /* We failed to create the thread, but there's at least one there so we can at least queue the request */ diff --git a/lib/sdk/crt/CMakeLists.txt b/lib/sdk/crt/CMakeLists.txt index 094d377da77..7d86713a2f6 100644 --- a/lib/sdk/crt/CMakeLists.txt +++ b/lib/sdk/crt/CMakeLists.txt @@ -3,630 +3,27 @@ include_directories(include) add_definitions(-D_CRTBLD) -list(APPEND CRT_SOURCE - conio/cgets.c - conio/cputs.c - conio/getch.c - conio/getche.c - conio/kbhit.c - conio/putch.c - conio/ungetch.c - direct/chdir.c - direct/chdrive.c - direct/getcwd.c - direct/getdcwd.c - direct/getdfree.c - direct/getdrive.c - direct/mkdir.c - direct/rmdir.c - direct/wchdir.c - direct/wgetcwd.c - direct/wgetdcwd.c - direct/wmkdir.c - direct/wrmdir.c - except/abnorter.c - except/checkesp.c - except/cpp.c - except/cppexcept.c - except/except.c - except/matherr.c - except/xcptfil.c - float/chgsign.c - float/copysign.c - float/fpclass.c - float/fpecode.c - float/isnan.c - float/nafter.c - float/scalb.c - locale/locale.c - math/acos.c - math/adjust.c - math/asin.c - math/cabs.c - math/cosf.c - math/cosh.c - math/div.c - math/fdivbug.c - math/frexp.c - math/huge_val.c - math/hypot.c - math/ldiv.c - math/logf.c - math/modf.c - math/powf.c - math/rand.c - math/sqrtf.c - math/s_modf.c - math/sinf.c - math/sinh.c - math/tanh.c - mbstring/hanzen.c - mbstring/ischira.c - mbstring/iskana.c - mbstring/iskmoji.c - mbstring/iskpun.c - mbstring/islead.c - mbstring/islwr.c - mbstring/ismbal.c - mbstring/ismbaln.c - mbstring/ismbc.c - mbstring/ismbgra.c - mbstring/ismbkaln.c - mbstring/ismblead.c - mbstring/ismbpri.c - mbstring/ismbpun.c - mbstring/ismbtrl.c - mbstring/isuppr.c - mbstring/jistojms.c - mbstring/jmstojis.c - mbstring/mbbtype.c - mbstring/mbccpy.c - mbstring/mbclen.c - mbstring/mbscat.c - mbstring/mbschr.c - mbstring/mbscmp.c - mbstring/mbscoll.c - mbstring/mbscpy.c - mbstring/mbscspn.c - mbstring/mbsdec.c - mbstring/mbsdup.c - mbstring/mbsicmp.c - mbstring/mbsicoll.c - mbstring/mbsinc.c - mbstring/mbslen.c - mbstring/mbslwr.c - mbstring/mbsncat.c - mbstring/mbsnccnt.c - mbstring/mbsncmp.c - mbstring/mbsncoll.c - mbstring/mbsncpy.c - mbstring/mbsnextc.c - mbstring/mbsnicmp.c - mbstring/mbsnicoll.c - mbstring/mbsninc.c - mbstring/mbsnset.c - mbstring/mbspbrk.c - mbstring/mbsrchr.c - mbstring/mbsrev.c - mbstring/mbsset.c - mbstring/mbsspn.c - mbstring/mbsspnp.c - mbstring/mbsstr.c - mbstring/mbstok.c - mbstring/mbstrlen.c - mbstring/mbsupr.c - mem/memcmp.c - mem/memccpy.c - mem/memicmp.c - misc/amsg.c - misc/assert.c - misc/environ.c - misc/getargs.c - misc/i10output.c - misc/initterm.c - misc/lock.c - misc/purecall.c - misc/stubs.c - misc/tls.c - printf/_cprintf.c - printf/_snprintf.c - printf/_snwprintf.c - printf/_vcprintf.c - printf/_vsnprintf.c - printf/_vsnwprintf.c - printf/fprintf.c - printf/fwprintf.c - printf/printf.c - printf/sprintf.c - printf/streamout.c - printf/swprintf.c - printf/vfprintf.c - printf/vfwprintf.c - printf/vprintf.c - printf/vsprintf.c - printf/vswprintf.c - printf/vwprintf.c - printf/wprintf.c - printf/wstreamout.c - process/_cwait.c - process/_system.c - process/dll.c - process/process.c - process/procid.c - process/thread.c - process/threadid.c - process/threadx.c - process/wprocess.c - search/bsearch.c - search/lfind.c - search/lsearch.c - signal/signal.c - signal/xcptinfo.c - stdio/_flsbuf.c - stdio/_flswbuf.c - stdio/access.c - stdio/file.c - stdio/find.c - stdio/find64.c - stdio/findi64.c - stdio/fmode.c - stdio/lock_file.c - stdio/perror.c - stdio/popen.c - stdio/stat.c - stdio/stat64.c - stdio/waccess.c - stdio/wfind.c - stdio/wfind64.c - stdio/wfindi64.c - stdio/wpopen.c - stdio/wstat.c - stdio/wstat64.c - stdlib/_exit.c - stdlib/abort.c - stdlib/atexit.c - stdlib/ecvt.c - stdlib/errno.c - stdlib/fcvt.c - stdlib/fcvtbuf.c - stdlib/fullpath.c - stdlib/gcvt.c - stdlib/getenv.c - stdlib/makepath.c - stdlib/makepath_s.c - stdlib/mbtowc.c - stdlib/mbstowcs.c - stdlib/obsol.c - stdlib/putenv.c - stdlib/qsort.c - stdlib/rot.c - stdlib/senv.c - stdlib/swab.c - stdlib/wfulpath.c - stdlib/wputenv.c - stdlib/wsenv.c - stdlib/wmakpath.c - stdlib/wmakpath_s.c - string/atof.c - string/atoi.c - string/atoi64.c - string/atol.c - string/ctype.c - string/itoa.c - string/itow.c - string/lasttok.c - string/scanf.c - string/splitp.c - string/strcoll.c - string/strcspn.c - string/strdup.c - string/strerror.c - string/stricmp.c - string/string.c - string/strlwr.c - string/strncoll.c - string/strnicmp.c - string/strpbrk.c - string/strrev.c - string/strset.c - string/strspn.c - string/strstr.c - string/strtod.c - string/strtoi64.c - string/strtok.c - string/strtol.c - string/strtoul.c - string/strtoull.c - string/strupr.c - string/strxfrm.c - string/wcs.c - string/wcstol.c - string/wcstoul.c - string/wsplitp.c - string/wtoi.c - string/wtoi64.c - string/wtol.c - sys_stat/systime.c - time/asctime.c - time/clock.c - time/ctime32.c - time/ctime64.c - time/ctime.c - time/difftime32.c - time/difftime64.c - time/difftime.c - time/ftime32.c - time/ftime64.c - time/ftime.c - time/futime32.c - time/futime64.c - time/futime.c - time/gmtime.c - time/localtime32.c - time/localtime64.c - time/localtime.c - time/mktime.c - time/strdate.c - time/strftime.c - time/strtime.c - time/time32.c - time/time64.c - time/time.c - time/timezone.c - time/tzname.c - time/utime32.c - time/utime64.c - time/utime.c - time/wasctime.c - time/wcsftime.c - time/wctime32.c - time/wctime64.c - time/wctime.c - time/wstrdate.c - time/wstrtime.c - time/wutime32.c - time/wutime64.c - time/wutime.c - wstring/wcscoll.c - wstring/wcscspn.c - wstring/wcsicmp.c - wstring/wcslwr.c - wstring/wcsnicmp.c - wstring/wcsspn.c - wstring/wcsstr.c - wstring/wcstok.c - wstring/wcsupr.c - wstring/wcsxfrm.c - wstring/wlasttok.c - wine/heap.c - wine/undname.c) - if(ARCH MATCHES i386) - list(APPEND CRT_SOURCE - except/i386/chkstk_asm.s - except/i386/prolog.s - except/i386/seh.s - except/i386/seh_prolog.s - except/i386/unwind.c - float/i386/clearfp.c - float/i386/cntrlfp.c - float/i386/fpreset.c - float/i386/logb.c - float/i386/statfp.c - setjmp/i386/setjmp.s) + list(APPEND CHKSTK_SOURCE except/i386/chkstk_asm.s) + if(NOT MSVC) + list(APPEND CHKSTK_SOURCE except/i386/chkstk_ms.s) + endif() elseif(ARCH MATCHES amd64) - list(APPEND CRT_SOURCE - except/amd64/chkstk_asm.s - except/amd64/seh.s - float/i386/clearfp.c - float/i386/cntrlfp.c - float/i386/fpreset.c - float/i386/logb.c - float/i386/statfp.c - setjmp/amd64/setjmp.s) + list(APPEND CHKSTK_SOURCE except/amd64/chkstk_asm.s) + if(NOT MSVC) + list(APPEND CHKSTK_SOURCE except/amd64/chkstk_ms.s) + endif() +elseif(ARCH MATCHES powerpc) + list(APPEND CHKSTK_SOURCE except/powerpc/chkstk_asm.s) endif() -if(ARCH MATCHES i386) - list(APPEND CRT_SOURCE - math/i386/alldiv_asm.s - math/i386/alldvrm_asm.s - math/i386/allmul_asm.s - math/i386/allrem_asm.s - math/i386/allshl_asm.s - math/i386/allshr_asm.s - math/i386/atan_asm.s - math/i386/aulldiv_asm.s - math/i386/aulldvrm_asm.s - math/i386/aullrem_asm.s - math/i386/aullshr_asm.s - math/i386/ceil_asm.s - math/i386/ceilf.S - math/i386/cos_asm.s - math/i386/fabs_asm.s - math/i386/floor_asm.s - math/i386/floorf.S - math/i386/ftol_asm.s - math/i386/ftol2_asm.s - math/i386/log_asm.s - math/i386/log10_asm.s - math/i386/pow_asm.s - math/i386/sin_asm.s - math/i386/sqrt_asm.s - math/i386/tan_asm.s - math/i386/atan2_asm.s - math/i386/ci.c - math/i386/exp_asm.s - math/i386/fmod_asm.s - math/i386/fmodf_asm.s - math/i386/ldexp.c - mem/i386/memchr_asm.s - mem/i386/memmove_asm.s - mem/i386/memset_asm.s - misc/i386/readcr4.S - string/i386/strcat_asm.s - string/i386/strchr_asm.s - string/i386/strcmp_asm.s - string/i386/strcpy_asm.s - string/i386/strlen_asm.s - string/i386/strncat_asm.s - string/i386/strncmp_asm.s - string/i386/strncpy_asm.s - string/i386/strnlen_asm.s - string/i386/strrchr_asm.s - string/i386/wcscat_asm.s - string/i386/wcschr_asm.s - string/i386/wcscmp_asm.s - string/i386/wcscpy_asm.s - string/i386/wcslen_asm.s - string/i386/wcsncat_asm.s - string/i386/wcsncmp_asm.s - string/i386/wcsncpy_asm.s - string/i386/wcsnlen_asm.s - string/i386/wcsrchr_asm.s) -else() - list(APPEND CRT_SOURCE - math/stubs.c - mem/memchr.c - mem/memcpy.c - mem/memmove.c - mem/memset.c - string/strcat.c - string/strchr.c - string/strcmp.c - string/strcpy.c - string/strlen.c - string/strncat.c - string/strncmp.c - string/strncpy.c - string/strnlen.c - string/strrchr.c - string/wcscat.c - string/wcschr.c - string/wcscmp.c - string/wcscpy.c - string/wcslen.c - string/wcsncat.c - string/wcsncmp.c - string/wcsncpy.c - string/wcsnlen.c - string/wcsrchr.c) -endif() +add_library(chkstk ${CHKSTK_SOURCE}) +add_dependencies(chkstk asm) -if(ARCH MATCHES amd64) - list(APPEND CRT_SOURCE - math/cos.c - math/sin.c - math/amd64/alldiv.S - math/amd64/atan.S - math/amd64/atan2.S - math/amd64/ceil.S - math/amd64/ceilf.S - math/amd64/exp.S - math/amd64/fabs.S - math/amd64/floor.S - math/amd64/floorf.S - math/amd64/fmod.S - math/amd64/fmodf.S - math/amd64/ldexp.S - math/amd64/log.S - math/amd64/log10.S - math/amd64/pow.S - math/amd64/sqrt.S - math/amd64/sqrtf.S - math/amd64/tan.S) -endif() - -add_library(crt ${CMAKE_CURRENT_BINARY_DIR}/crt_precomp.h.gch ${CRT_SOURCE}) - -set_property(TARGET crt PROPERTY COMPILE_DEFINITIONS __MINGW_IMPORT=extern USE_MSVCRT_PREFIX _MSVCRT_LIB_ _MSVCRT_ _MT) -add_pch(crt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${CRT_SOURCE}) -add_dependencies(crt psdk asm) - -list(APPEND LIBCNTPR_SOURCE - float/isnan.c - math/abs.c - math/div.c - math/labs.c - math/rand_nt.c - mbstring/mbstrlen.c - mem/memccpy.c - mem/memcmp.c - mem/memicmp.c - printf/_snprintf.c - printf/_snwprintf.c - printf/_vcprintf.c - printf/_vsnprintf.c - printf/_vsnwprintf.c - printf/sprintf.c - printf/streamout.c - printf/swprintf.c - printf/vprintf.c - printf/vsprintf.c - printf/vswprintf.c - printf/wstreamout.c - search/bsearch.c - search/lfind.c - stdlib/qsort.c - string/ctype.c - string/scanf.c - string/strcspn.c - string/stricmp.c - string/strnicmp.c - string/strlwr.c - string/strrev.c - string/strset.c - string/strstr.c - string/strupr.c - string/strpbrk.c - string/strspn.c - string/atoi64.c - string/atoi.c - string/atol.c - string/itoa.c - string/itow.c - string/mbstowcs_nt.c - string/splitp.c - string/strtol.c - string/strtoul.c - string/strtoull.c - string/wcs.c - string/wcstol.c - string/wcstombs_nt.c - string/wcstoul.c - string/wsplitp.c - string/wtoi64.c - string/wtoi.c - string/wtol.c - wstring/wcsicmp.c - wstring/wcslwr.c - wstring/wcsnicmp.c - wstring/wcsupr.c - wstring/wcscspn.c - wstring/wcsspn.c - wstring/wcsstr.c) - -if(ARCH MATCHES i386) - list(APPEND LIBCNTPR_SOURCE - except/i386/chkstk_asm.s - except/i386/seh.s - except/i386/seh_prolog.s - setjmp/i386/setjmp.s - math/i386/alldiv_asm.s - math/i386/alldvrm_asm.s - math/i386/allmul_asm.s - math/i386/allrem_asm.s - math/i386/allshl_asm.s - math/i386/allshr_asm.s - math/i386/atan_asm.s - math/i386/aulldiv_asm.s - math/i386/aulldvrm_asm.s - math/i386/aullrem_asm.s - math/i386/aullshr_asm.s - math/i386/ceil_asm.s - math/i386/cos_asm.s - math/i386/fabs_asm.s - math/i386/floor_asm.s - math/i386/ftol_asm.s - math/i386/ftol2_asm.s - math/i386/log_asm.s - math/i386/log10_asm.s - math/i386/pow_asm.s - math/i386/sin_asm.s - math/i386/sqrt_asm.s - math/i386/tan_asm.s - math/i386/ci.c - misc/i386/readcr4.S) -elseif(ARCH MATCHES amd64) - list(APPEND LIBCNTPR_SOURCE - except/amd64/chkstk_asm.s - except/amd64/seh.s - setjmp/amd64/setjmp.s - math/cos.c - math/sin.c - math/amd64/alldiv.S - math/amd64/atan.S - math/amd64/atan2.S - math/amd64/ceil.S - math/amd64/exp.S - math/amd64/fabs.S - math/amd64/floor.S - math/amd64/fmod.S - math/amd64/ldexp.S - math/amd64/log.S - math/amd64/log10.S - math/amd64/pow.S - math/amd64/sqrt.S - math/amd64/tan.S) -endif() - -if(ARCH MATCHES i386) - list(APPEND LIBCNTPR_SOURCE - mem/i386/memchr_asm.s - mem/i386/memmove_asm.s - mem/i386/memset_asm.s - string/i386/strcat_asm.s - string/i386/strchr_asm.s - string/i386/strcmp_asm.s - string/i386/strcpy_asm.s - string/i386/strlen_asm.s - string/i386/strncat_asm.s - string/i386/strncmp_asm.s - string/i386/strncpy_asm.s - string/i386/strnlen_asm.s - string/i386/strrchr_asm.s - string/i386/wcscat_asm.s - string/i386/wcschr_asm.s - string/i386/wcscmp_asm.s - string/i386/wcscpy_asm.s - string/i386/wcslen_asm.s - string/i386/wcsncat_asm.s - string/i386/wcsncmp_asm.s - string/i386/wcsncpy_asm.s - string/i386/wcsnlen_asm.s - string/i386/wcsrchr_asm.s) -else() - list(APPEND LIBCNTPR_SOURCE - mem/memchr.c - mem/memcpy.c - mem/memmove.c - mem/memset.c - string/strcat.c - string/strchr.c - string/strcmp.c - string/strcpy.c - string/strlen.c - string/strncat.c - string/strncmp.c - string/strncpy.c - string/strnlen.c - string/strrchr.c - string/wcscat.c - string/wcschr.c - string/wcscmp.c - string/wcscpy.c - string/wcslen.c - string/wcsncat.c - string/wcsncmp.c - string/wcsncpy.c - string/wcsnlen.c - string/wcsrchr.c) -endif() - -add_library(libcntpr ${LIBCNTPR_SOURCE}) -set_property(TARGET libcntpr PROPERTY COMPILE_DEFINITIONS NO_RTL_INLINES _NTSYSTEM_ _NTDLLBUILD_ _LIBCNT_ __CRT__NO_INLINE) -add_dependencies(libcntpr psdk asm) - -if(MSVC) -# This is a temporary solution until we have proper crt libs - list(APPEND MSVCSUP_SOURCE - misc/fltused.c - except/i386/chkstk_asm.s - math/i386/ci.c - math/i386/ftol2_asm.S) - - add_library(msvcsup ${MSVCSUP_SOURCE}) - add_dependencies(msvcsup psdk asm) -endif() +include(crt.cmake) +include(libcntpr.cmake) +include(msvcrtex.cmake) +include(oldnames.cmake) add_library(user32_wsprintf printf/streamout.c @@ -641,3 +38,7 @@ add_library(user32_wsprintf string/wcstombs_nt.c) set_property(TARGET user32_wsprintf PROPERTY COMPILE_DEFINITIONS _USER32_WSPRINTF) + +add_library(getopt misc/getopt.c) +set_property(TARGET getopt PROPERTY COMPILE_DEFINITIONS _DLL __USE_CRTIMP) +add_dependencies(getopt psdk) diff --git a/lib/sdk/crt/crt.cmake b/lib/sdk/crt/crt.cmake new file mode 100644 index 00000000000..5f9c01caa39 --- /dev/null +++ b/lib/sdk/crt/crt.cmake @@ -0,0 +1,436 @@ +list(APPEND CRT_SOURCE + conio/cgets.c + conio/cputs.c + conio/getch.c + conio/getche.c + conio/kbhit.c + conio/putch.c + conio/ungetch.c + direct/chdir.c + direct/chdrive.c + direct/getcwd.c + direct/getdcwd.c + direct/getdfree.c + direct/getdrive.c + direct/mkdir.c + direct/rmdir.c + direct/wchdir.c + direct/wgetcwd.c + direct/wgetdcwd.c + direct/wmkdir.c + direct/wrmdir.c + except/abnorter.c + except/checkesp.c + except/cpp.c + except/cppexcept.c + except/except.c + except/matherr.c + except/xcptfil.c + float/chgsign.c + float/copysign.c + float/fpclass.c + float/fpecode.c + float/isnan.c + float/nafter.c + float/scalb.c + locale/locale.c + math/acos.c + math/adjust.c + math/asin.c + math/cabs.c + math/cosf.c + math/cosh.c + math/div.c + math/fdivbug.c + math/frexp.c + math/huge_val.c + math/hypot.c + math/ldiv.c + math/logf.c + math/modf.c + math/powf.c + math/rand.c + math/sqrtf.c + math/s_modf.c + math/sinf.c + math/sinh.c + math/tanh.c + mbstring/hanzen.c + mbstring/ischira.c + mbstring/iskana.c + mbstring/iskmoji.c + mbstring/iskpun.c + mbstring/islead.c + mbstring/islwr.c + mbstring/ismbal.c + mbstring/ismbaln.c + mbstring/ismbc.c + mbstring/ismbgra.c + mbstring/ismbkaln.c + mbstring/ismblead.c + mbstring/ismbpri.c + mbstring/ismbpun.c + mbstring/ismbtrl.c + mbstring/isuppr.c + mbstring/jistojms.c + mbstring/jmstojis.c + mbstring/mbbtype.c + mbstring/mbccpy.c + mbstring/mbclen.c + mbstring/mbscat.c + mbstring/mbschr.c + mbstring/mbscmp.c + mbstring/mbscoll.c + mbstring/mbscpy.c + mbstring/mbscspn.c + mbstring/mbsdec.c + mbstring/mbsdup.c + mbstring/mbsicmp.c + mbstring/mbsicoll.c + mbstring/mbsinc.c + mbstring/mbslen.c + mbstring/mbslwr.c + mbstring/mbsncat.c + mbstring/mbsnccnt.c + mbstring/mbsncmp.c + mbstring/mbsncoll.c + mbstring/mbsncpy.c + mbstring/mbsnextc.c + mbstring/mbsnicmp.c + mbstring/mbsnicoll.c + mbstring/mbsninc.c + mbstring/mbsnset.c + mbstring/mbspbrk.c + mbstring/mbsrchr.c + mbstring/mbsrev.c + mbstring/mbsset.c + mbstring/mbsspn.c + mbstring/mbsspnp.c + mbstring/mbsstr.c + mbstring/mbstok.c + mbstring/mbstrlen.c + mbstring/mbsupr.c + mem/memcmp.c + mem/memccpy.c + mem/memicmp.c + misc/amsg.c + misc/assert.c + misc/environ.c + misc/getargs.c + misc/i10output.c + misc/initterm.c + misc/lock.c + misc/purecall.c + misc/stubs.c + misc/tls.c + printf/_cprintf.c + printf/_snprintf.c + printf/_snwprintf.c + printf/_vcprintf.c + printf/_vsnprintf.c + printf/_vsnwprintf.c + printf/fprintf.c + printf/fwprintf.c + printf/printf.c + printf/sprintf.c + printf/streamout.c + printf/swprintf.c + printf/vfprintf.c + printf/vfwprintf.c + printf/vprintf.c + printf/vsprintf.c + printf/vswprintf.c + printf/vwprintf.c + printf/wprintf.c + printf/wstreamout.c + process/_cwait.c + process/_system.c + process/dll.c + process/process.c + process/procid.c + process/thread.c + process/threadid.c + process/threadx.c + process/wprocess.c + search/bsearch.c + search/lfind.c + search/lsearch.c + signal/signal.c + signal/xcptinfo.c + stdio/_flsbuf.c + stdio/_flswbuf.c + stdio/access.c + stdio/file.c + stdio/find.c + stdio/find64.c + stdio/findi64.c + stdio/fmode.c + stdio/lock_file.c + stdio/perror.c + stdio/popen.c + stdio/stat.c + stdio/stat64.c + stdio/waccess.c + stdio/wfind.c + stdio/wfind64.c + stdio/wfindi64.c + stdio/wpopen.c + stdio/wstat.c + stdio/wstat64.c + stdlib/_exit.c + stdlib/abort.c + stdlib/atexit.c + stdlib/ecvt.c + stdlib/errno.c + stdlib/fcvt.c + stdlib/fcvtbuf.c + stdlib/fullpath.c + stdlib/gcvt.c + stdlib/getenv.c + stdlib/makepath.c + stdlib/makepath_s.c + stdlib/mbtowc.c + stdlib/mbstowcs.c + stdlib/obsol.c + stdlib/putenv.c + stdlib/qsort.c + stdlib/rot.c + stdlib/senv.c + stdlib/swab.c + stdlib/wfulpath.c + stdlib/wputenv.c + stdlib/wsenv.c + stdlib/wmakpath.c + stdlib/wmakpath_s.c + string/atof.c + string/atoi.c + string/atoi64.c + string/atol.c + string/ctype.c + string/itoa.c + string/itow.c + string/lasttok.c + string/scanf.c + string/splitp.c + string/strcoll.c + string/strcspn.c + string/strdup.c + string/strerror.c + string/stricmp.c + string/string.c + string/strlwr.c + string/strncoll.c + string/strnicmp.c + string/strpbrk.c + string/strrev.c + string/strset.c + string/strspn.c + string/strstr.c + string/strtod.c + string/strtoi64.c + string/strtok.c + string/strtol.c + string/strtoul.c + string/strtoull.c + string/strupr.c + string/strxfrm.c + string/wcs.c + string/wcstol.c + string/wcstoul.c + string/wsplitp.c + string/wtoi.c + string/wtoi64.c + string/wtol.c + sys_stat/systime.c + time/asctime.c + time/clock.c + time/ctime32.c + time/ctime64.c + time/ctime.c + time/difftime32.c + time/difftime64.c + time/difftime.c + time/ftime32.c + time/ftime64.c + time/ftime.c + time/futime32.c + time/futime64.c + time/futime.c + time/gmtime.c + time/localtime32.c + time/localtime64.c + time/localtime.c + time/mktime.c + time/strdate.c + time/strftime.c + time/strtime.c + time/time32.c + time/time64.c + time/time.c + time/timezone.c + time/tzname.c + time/utime32.c + time/utime64.c + time/utime.c + time/wasctime.c + time/wcsftime.c + time/wctime32.c + time/wctime64.c + time/wctime.c + time/wstrdate.c + time/wstrtime.c + time/wutime32.c + time/wutime64.c + time/wutime.c + wstring/wcscoll.c + wstring/wcscspn.c + wstring/wcsicmp.c + wstring/wcslwr.c + wstring/wcsnicmp.c + wstring/wcsspn.c + wstring/wcsstr.c + wstring/wcstok.c + wstring/wcsupr.c + wstring/wcsxfrm.c + wstring/wlasttok.c + wine/heap.c + wine/undname.c) + +if(ARCH MATCHES i386) + list(APPEND CRT_SOURCE + except/i386/prolog.s + except/i386/seh.s + except/i386/seh_prolog.s + except/i386/unwind.c + float/i386/clearfp.c + float/i386/cntrlfp.c + float/i386/fpreset.c + float/i386/logb.c + float/i386/statfp.c + setjmp/i386/setjmp.s) +elseif(ARCH MATCHES amd64) + list(APPEND CRT_SOURCE + except/amd64/seh.s + float/i386/clearfp.c + float/i386/cntrlfp.c + float/i386/fpreset.c + float/i386/logb.c + float/i386/statfp.c + setjmp/amd64/setjmp.s) +endif() + +if(ARCH MATCHES i386) + list(APPEND CRT_SOURCE + math/i386/alldiv_asm.s + math/i386/alldvrm_asm.s + math/i386/allmul_asm.s + math/i386/allrem_asm.s + math/i386/allshl_asm.s + math/i386/allshr_asm.s + math/i386/atan_asm.s + math/i386/aulldiv_asm.s + math/i386/aulldvrm_asm.s + math/i386/aullrem_asm.s + math/i386/aullshr_asm.s + math/i386/ceil_asm.s + math/i386/ceilf.S + math/i386/cos_asm.s + math/i386/fabs_asm.s + math/i386/floor_asm.s + math/i386/floorf.S + math/i386/ftol_asm.s + math/i386/ftol2_asm.s + math/i386/log_asm.s + math/i386/log10_asm.s + math/i386/pow_asm.s + math/i386/sin_asm.s + math/i386/sqrt_asm.s + math/i386/tan_asm.s + math/i386/atan2_asm.s + math/i386/ci.c + math/i386/exp_asm.s + math/i386/fmod_asm.s + math/i386/fmodf_asm.s + math/i386/ldexp.c + mem/i386/memchr_asm.s + mem/i386/memmove_asm.s + mem/i386/memset_asm.s + misc/i386/readcr4.S + string/i386/strcat_asm.s + string/i386/strchr_asm.s + string/i386/strcmp_asm.s + string/i386/strcpy_asm.s + string/i386/strlen_asm.s + string/i386/strncat_asm.s + string/i386/strncmp_asm.s + string/i386/strncpy_asm.s + string/i386/strnlen_asm.s + string/i386/strrchr_asm.s + string/i386/wcscat_asm.s + string/i386/wcschr_asm.s + string/i386/wcscmp_asm.s + string/i386/wcscpy_asm.s + string/i386/wcslen_asm.s + string/i386/wcsncat_asm.s + string/i386/wcsncmp_asm.s + string/i386/wcsncpy_asm.s + string/i386/wcsnlen_asm.s + string/i386/wcsrchr_asm.s) +else() + list(APPEND CRT_SOURCE + math/stubs.c + mem/memchr.c + mem/memcpy.c + mem/memmove.c + mem/memset.c + string/strcat.c + string/strchr.c + string/strcmp.c + string/strcpy.c + string/strlen.c + string/strncat.c + string/strncmp.c + string/strncpy.c + string/strnlen.c + string/strrchr.c + string/wcscat.c + string/wcschr.c + string/wcscmp.c + string/wcscpy.c + string/wcslen.c + string/wcsncat.c + string/wcsncmp.c + string/wcsncpy.c + string/wcsnlen.c + string/wcsrchr.c) +endif() + +if(ARCH MATCHES amd64) + list(APPEND CRT_SOURCE + math/cos.c + math/sin.c + math/amd64/alldiv.S + math/amd64/atan.S + math/amd64/atan2.S + math/amd64/ceil.S + math/amd64/ceilf.S + math/amd64/exp.S + math/amd64/fabs.S + math/amd64/floor.S + math/amd64/floorf.S + math/amd64/fmod.S + math/amd64/fmodf.S + math/amd64/ldexp.S + math/amd64/log.S + math/amd64/log10.S + math/amd64/pow.S + math/amd64/sqrt.S + math/amd64/sqrtf.S + math/amd64/tan.S) +endif() + +add_library(crt ${CRT_SOURCE}) +target_link_libraries(crt chkstk) +set_property(TARGET crt PROPERTY COMPILE_DEFINITIONS __MINGW_IMPORT=extern USE_MSVCRT_PREFIX _MSVCRT_LIB_ _MSVCRT_ _MT) +add_pch(crt precomp.h) +add_dependencies(crt psdk asm) diff --git a/lib/sdk/crt/except/amd64/chkstk_asm.s b/lib/sdk/crt/except/amd64/chkstk_asm.s index 113b45bc100..421ab55a772 100644 --- a/lib/sdk/crt/except/amd64/chkstk_asm.s +++ b/lib/sdk/crt/except/amd64/chkstk_asm.s @@ -13,22 +13,20 @@ /* CODE **********************************************************************/ .code64 -PUBLIC MsgUnimplemented MsgUnimplemented: -.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n" + .ascii "Unimplemented", CR, LF, NUL - -FUNC _chkstk +FUNC __chkstk .endprolog UNIMPLEMENTED chkstk ret -ENDFUNC _chkstk +ENDFUNC __chkstk -FUNC _alloca_probe +FUNC __alloca_probe .endprolog UNIMPLEMENTED alloca_probe ret -ENDFUNC _alloca_probe +ENDFUNC __alloca_probe END /* EOF */ diff --git a/lib/sdk/crt/except/amd64/chkstk_ms.s b/lib/sdk/crt/except/amd64/chkstk_ms.s new file mode 100644 index 00000000000..dbf9eb2e691 --- /dev/null +++ b/lib/sdk/crt/except/amd64/chkstk_ms.s @@ -0,0 +1,51 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of _chkstk and _alloca_probe + * PROGRAMMERS Richard Henderson + * Kai Tietz + * Timo Kreuzer (timo.kreuzer@reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include +#define PAGE_SIZE 4096 + +/* CODE **********************************************************************/ +.code64 + +PUBLIC ___chkstk_ms + + //cfi_startproc() +___chkstk_ms: + push rcx /* save temps */ + //cfi_push(%rcx) + push rax + //cfi_push(%rax) + + cmp rax, PAGE_SIZE /* > 4k ?*/ + lea rcx, [rsp + 24] /* point past return addr */ + jb l_LessThanAPage + +l_MoreThanAPage: + sub rcx, PAGE_SIZE /* yes, move pointer down 4k */ + or byte ptr [rcx], 0 /* probe there */ + sub rax, PAGE_SIZE /* decrement count */ + + cmp rax, PAGE_SIZE + ja l_MoreThanAPage /* and do it again */ + +l_LessThanAPage: + sub rcx, rax + or byte ptr [rcx], 0 /* less than 4k, just peek here */ + + pop rax + //cfi_pop(%rax) + pop rcx + //cfi_pop(%rcx) + ret + //cfi_endproc() + +END +/* EOF */ diff --git a/lib/sdk/crt/except/cppexcept.c b/lib/sdk/crt/except/cppexcept.c index 17d6715d7f9..99f6a3cfbde 100644 --- a/lib/sdk/crt/except/cppexcept.c +++ b/lib/sdk/crt/except/cppexcept.c @@ -41,24 +41,40 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame EXCEPTION_REGISTRATION_RECORD* nested_frame, int nested_trylevel ); /* call a function with a given ebp */ -static inline void *call_ebp_func( void *func, void *ebp ) -{ - void *ret; - int dummy; #ifdef _MSC_VER -#pragma message ("call_ebp_func is unimplemented for MSC") +#pragma warning(disable:4731) // don't warn about modification of ebp +#endif +static inline void *call_ebp_func( void *func, void *_ebp ) +{ + void *result; +#ifdef _MSC_VER + __asm + { + mov eax, func + push ebx + push ebp + mov ebp, _ebp + call eax + pop ebp + pop ebx + mov result, eax + } #else + int dummy; __asm__ __volatile__ ("pushl %%ebx\n\t" "pushl %%ebp\n\t" "movl %4,%%ebp\n\t" "call *%%eax\n\t" "popl %%ebp\n\t" "popl %%ebx" - : "=a" (ret), "=S" (dummy), "=D" (dummy) - : "0" (func), "1" (ebp) : "ecx", "edx", "memory" ); + : "=a" (result), "=S" (dummy), "=D" (dummy) + : "0" (func), "1" (_ebp) : "ecx", "edx", "memory" ); #endif - return ret; + return result; } +#ifdef _MSC_VER +#pragma warning(default:4731) +#endif /* call a copy constructor */ static inline void call_copy_ctor( void *func, void *this, void *src, int has_vbase ) diff --git a/lib/sdk/crt/except/i386/chkstk_ms.s b/lib/sdk/crt/except/i386/chkstk_ms.s new file mode 100644 index 00000000000..dac2ae799d9 --- /dev/null +++ b/lib/sdk/crt/except/i386/chkstk_ms.s @@ -0,0 +1,59 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Stack checker + * PROGRAMERS: KJK::Hyperion + * Richard Henderson + * Kai Tietz + * Timo Kreuzer + */ + +#include +#include + +#define PAGE_SIZE 4096 + +PUBLIC ___chkstk_ms +.code + +/* Special version, that does only probe and not allocate */ +___chkstk_ms: + + /* EAX = size to be allocated */ + /* save the ECX and EAX register */ + push ecx + push eax + + /* ECX = top of the previous stack frame */ + lea ecx, [esp + 12] + + /* probe the desired memory, page by page */ + cmp eax, PAGE_SIZE + jl .l_LessThanAPage + +.l_MoreThanAPage: + + /* raise the top of the stack by a page and probe */ + sub ecx, PAGE_SIZE + test [ecx], eax + + /* loop if still more than a page must be probed */ + sub eax, PAGE_SIZE + cmp eax, PAGE_SIZE + jge .l_MoreThanAPage + +.l_LessThanAPage: + + /* raise the top of the stack by EAX bytes (size % 4096) and probe */ + sub ecx, eax + test [ecx], eax + + /* restore ECX and EAX */ + pop eax + pop ecx + + /* return */ + ret + +/* EOF */ +END diff --git a/lib/sdk/crt/include/internal/mingw-w64/internal.h b/lib/sdk/crt/include/internal/mingw-w64/internal.h new file mode 100644 index 00000000000..7f58a3d540d --- /dev/null +++ b/lib/sdk/crt/include/internal/mingw-w64/internal.h @@ -0,0 +1,187 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _INC_INTERNAL +#define _INC_INTERNAL + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#pragma pack(push,_CRT_PACKING) + +#ifndef __INTERNAL_FUNC_DEFINED +#define __INTERNAL_FUNC_DEFINED + typedef void (__cdecl *_PVFV)(void); + typedef int (__cdecl *_PIFV)(void); + typedef void (__cdecl *_PVFI)(int); +#endif + +#if defined (SPECIAL_CRTEXE) && (defined (_DLL) || defined (__GNUC__)) + extern int _commode; +#else + _CRTIMP extern int _commode; +#endif + +#define __IOINFO_TM_ANSI 0 +#define __IOINFO_TM_UTF8 1 +#define __IOINFO_TM_UTF16LE 2 + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4214) +#pragma warning(disable:4820) +#endif + + typedef struct { + intptr_t osfhnd; + char osfile; + char pipech; + int lockinitflag; + CRITICAL_SECTION lock; + char textmode : 7; + char unicode : 1; + char pipech2[2]; + } ioinfo; + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#define IOINFO_ARRAY_ELTS (1 << 5) + +#define _pioinfo(i) (__pioinfo[(i) >> 5] + ((i) & (IOINFO_ARRAY_ELTS - 1))) +#define _osfile(i) (_pioinfo(i)->osfile) +#define _pipech2(i) (_pioinfo(i)->pipech2) +#define _textmode(i) (_pioinfo(i)->textmode) +#define _tm_unicode(i) (_pioinfo(i)->unicode) +#define _pioinfo_safe(i) ((((i) != -1) && ((i) != -2)) ? _pioinfo(i) : &__badioinfo) +#define _osfhnd_safe(i) (_pioinfo_safe(i)->osfhnd) +#define _osfile_safe(i) (_pioinfo_safe(i)->osfile) +#define _pipech_safe(i) (_pioinfo_safe(i)->pipech) +#define _pipech2_safe(i) (_pioinfo_safe(i)->pipech2) +#define _textmode_safe(i) (_pioinfo_safe(i)->textmode) +#define _tm_unicode_safe(i) (_pioinfo_safe(i)->unicode) + +#ifndef __badioinfo + extern ioinfo ** __MINGW_IMP_SYMBOL(__badioinfo)[]; +#define __badioinfo (* __MINGW_IMP_SYMBOL(__badioinfo)) +#endif + +#ifndef __pioinfo + extern ioinfo ** __MINGW_IMP_SYMBOL(__pioinfo)[]; +#define __pioinfo (* __MINGW_IMP_SYMBOL(__pioinfo)) +#endif + +#define _NO_CONSOLE_FILENO (intptr_t)-2 + +#ifndef _FILE_DEFINED +#define _FILE_DEFINED + struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + int _flag; + int _file; + int _charbuf; + int _bufsiz; + char *_tmpfname; + }; + typedef struct _iobuf FILE; +#endif + +#if !defined (_FILEX_DEFINED) && defined (_WINDOWS_) +#define _FILEX_DEFINED + typedef struct { + FILE f; + CRITICAL_SECTION lock; + } _FILEX; +#endif + + extern int _dowildcard; + extern int _newmode; + +#ifndef __winitenv +extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv); +#define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv)) +#endif + +#ifndef __initenv +extern char *** __MINGW_IMP_SYMBOL(__initenv); +#define __initenv (* __MINGW_IMP_SYMBOL(__initenv)) +#endif + +#ifndef _acmdln +extern char ** __MINGW_IMP_SYMBOL(_acmdln); +#define _acmdln (* __MINGW_IMP_SYMBOL(_acmdln)) +/* _CRTIMP extern char *_acmdln; */ +#endif + +#ifndef _wcmdln +extern char ** __MINGW_IMP_SYMBOL(_wcmdln); +#define _wcmdln (* __MINGW_IMP_SYMBOL(_wcmdln)) +/* __CRTIMP extern wchar_t *_wcmdln; */ +#endif + + _CRTIMP void __cdecl _amsg_exit(int); + + int __CRTDECL _setargv(void); + int __CRTDECL __setargv(void); + int __CRTDECL _wsetargv(void); + int __CRTDECL __wsetargv(void); + + int __CRTDECL main(int _Argc, char **_Argv, char **_Env); + int __CRTDECL wmain(int _Argc, wchar_t **_Argv, wchar_t **_Env); + +#ifndef _STARTUP_INFO_DEFINED +#define _STARTUP_INFO_DEFINED + typedef struct { + int newmode; + } _startupinfo; +#endif + + _CRTIMP int __cdecl __getmainargs(int * _Argc, char *** _Argv, char ***_Env, int _DoWildCard, _startupinfo *_StartInfo); + _CRTIMP int __cdecl __wgetmainargs(int * _Argc, wchar_t ***_Argv, wchar_t ***_Env, int _DoWildCard, _startupinfo *_StartInfo); + +#define _CONSOLE_APP 1 +#define _GUI_APP 2 + + typedef enum __enative_startup_state { + __uninitialized, __initializing, __initialized + } __enative_startup_state; + + extern volatile __enative_startup_state __native_startup_state; + extern volatile void *__native_startup_lock; + + extern volatile unsigned int __native_dllmain_reason; + extern volatile unsigned int __native_vcclrit_reason; + + _CRTIMP void __cdecl __set_app_type (int); + + typedef LONG NTSTATUS; + +#include +#include + + void * __cdecl _encode_pointer(void *); + void * __cdecl _encoded_null(); + void * __cdecl _decode_pointer(void *); + + BOOL __cdecl _ValidateImageBase (PBYTE pImageBase); + PIMAGE_SECTION_HEADER __cdecl _FindPESection (PBYTE pImageBase, DWORD_PTR rva); + BOOL __cdecl _IsNonwritableInCurrentImage (PBYTE pTarget); + +#ifdef __cplusplus +} +#endif + +#pragma pack(pop) +#endif diff --git a/lib/sdk/crt/include/internal/mingw-w64/oscalls.h b/lib/sdk/crt/include/internal/mingw-w64/oscalls.h new file mode 100644 index 00000000000..81356767001 --- /dev/null +++ b/lib/sdk/crt/include/internal/mingw-w64/oscalls.h @@ -0,0 +1,60 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _INC_OSCALLS +#define _INC_OSCALLS + +#ifndef _CRTBLD +#error ERROR: Use of C runtime library internal header file. +#endif + +#include + +#ifdef NULL +#undef NULL +#endif + +#define NOMINMAX + +#define _WIN32_FUSION 0x0100 +#include + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4214) +#endif + +typedef struct _FTIME +{ + unsigned short twosecs : 5; + unsigned short minutes : 6; + unsigned short hours : 5; +} FTIME; + +typedef FTIME *PFTIME; + +typedef struct _FDATE +{ + unsigned short day : 5; + unsigned short month : 4; + unsigned short year : 7; +} FDATE; + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +typedef FDATE *PFDATE; + +#endif diff --git a/lib/sdk/crt/include/internal/mingw-w64/sect_attribs.h b/lib/sdk/crt/include/internal/mingw-w64/sect_attribs.h new file mode 100644 index 00000000000..4d1a24f2173 --- /dev/null +++ b/lib/sdk/crt/include/internal/mingw-w64/sect_attribs.h @@ -0,0 +1,72 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#if defined(_MSC_VER) + +#if defined(_M_IA64) || defined(_M_AMD64) +#define _ATTRIBUTES +#else +#define _ATTRIBUTES read +#endif + +/* Reference list of existing section for msvcrt. */ +#pragma section(".CRTMP$XCA",long,_ATTRIBUTES) +#pragma section(".CRTMP$XCZ",long,_ATTRIBUTES) +#pragma section(".CRTMP$XIA",long,_ATTRIBUTES) +#pragma section(".CRTMP$XIZ",long,_ATTRIBUTES) + +#pragma section(".CRTMA$XCA",long,_ATTRIBUTES) +#pragma section(".CRTMA$XCZ",long,_ATTRIBUTES) +#pragma section(".CRTMA$XIA",long,_ATTRIBUTES) +#pragma section(".CRTMA$XIZ",long,_ATTRIBUTES) + +#pragma section(".CRTVT$XCA",long,_ATTRIBUTES) +#pragma section(".CRTVT$XCZ",long,_ATTRIBUTES) + +#pragma section(".CRT$XCA",long,_ATTRIBUTES) +#pragma section(".CRT$XCAA",long,_ATTRIBUTES) +#pragma section(".CRT$XCC",long,_ATTRIBUTES) +#pragma section(".CRT$XCZ",long,_ATTRIBUTES) +#pragma section(".CRT$XDA",long,_ATTRIBUTES) +#pragma section(".CRT$XDC",long,_ATTRIBUTES) +#pragma section(".CRT$XDZ",long,_ATTRIBUTES) +#pragma section(".CRT$XIA",long,_ATTRIBUTES) +#pragma section(".CRT$XIAA",long,_ATTRIBUTES) +#pragma section(".CRT$XIC",long,_ATTRIBUTES) +#pragma section(".CRT$XID",long,_ATTRIBUTES) +#pragma section(".CRT$XIY",long,_ATTRIBUTES) +#pragma section(".CRT$XIZ",long,_ATTRIBUTES) +#pragma section(".CRT$XLA",long,_ATTRIBUTES) +#pragma section(".CRT$XLC",long,_ATTRIBUTES) +#pragma section(".CRT$XLD",long,_ATTRIBUTES) +#pragma section(".CRT$XLZ",long,_ATTRIBUTES) +#pragma section(".CRT$XPA",long,_ATTRIBUTES) +#pragma section(".CRT$XPX",long,_ATTRIBUTES) +#pragma section(".CRT$XPXA",long,_ATTRIBUTES) +#pragma section(".CRT$XPZ",long,_ATTRIBUTES) +#pragma section(".CRT$XTA",long,_ATTRIBUTES) +#pragma section(".CRT$XTB",long,_ATTRIBUTES) +#pragma section(".CRT$XTX",long,_ATTRIBUTES) +#pragma section(".CRT$XTZ",long,_ATTRIBUTES) +#pragma section(".rdata$T",long,read) +#pragma section(".rtc$IAA",long,read) +#pragma section(".rtc$IZZ",long,read) +#pragma section(".rtc$TAA",long,read) +#pragma section(".rtc$TZZ",long,read) +/* for tlssup.c: */ +#pragma section(".tls",long,read,write) +#pragma section(".tls$AAA",long,read,write) +#pragma section(".tls$ZZZ",long,read,write) +#endif /* _MSC_VER */ + +#if defined(_MSC_VER) +#define _CRTALLOC(x) __declspec(allocate(x)) +#elif defined(__GNUC__) +#define _CRTALLOC(x) __attribute__ ((section (x) )) +#else +#error Your compiler is not supported. +#endif + diff --git a/lib/sdk/crt/libcntpr.cmake b/lib/sdk/crt/libcntpr.cmake new file mode 100644 index 00000000000..011b9c3e3d5 --- /dev/null +++ b/lib/sdk/crt/libcntpr.cmake @@ -0,0 +1,177 @@ + +list(APPEND LIBCNTPR_SOURCE + float/isnan.c + math/abs.c + math/div.c + math/labs.c + math/rand_nt.c + mbstring/mbstrlen.c + mem/memccpy.c + mem/memcmp.c + mem/memicmp.c + printf/_snprintf.c + printf/_snwprintf.c + printf/_vcprintf.c + printf/_vsnprintf.c + printf/_vsnwprintf.c + printf/sprintf.c + printf/streamout.c + printf/swprintf.c + printf/vprintf.c + printf/vsprintf.c + printf/vswprintf.c + printf/wstreamout.c + search/bsearch.c + search/lfind.c + stdlib/qsort.c + string/ctype.c + string/scanf.c + string/strcspn.c + string/stricmp.c + string/strnicmp.c + string/strlwr.c + string/strrev.c + string/strset.c + string/strstr.c + string/strupr.c + string/strpbrk.c + string/strspn.c + string/atoi64.c + string/atoi.c + string/atol.c + string/itoa.c + string/itow.c + string/mbstowcs_nt.c + string/splitp.c + string/strtol.c + string/strtoul.c + string/strtoull.c + string/wcs.c + string/wcstol.c + string/wcstombs_nt.c + string/wcstoul.c + string/wsplitp.c + string/wtoi64.c + string/wtoi.c + string/wtol.c + wstring/wcsicmp.c + wstring/wcslwr.c + wstring/wcsnicmp.c + wstring/wcsupr.c + wstring/wcscspn.c + wstring/wcsspn.c + wstring/wcsstr.c) + +if(ARCH MATCHES i386) + list(APPEND LIBCNTPR_SOURCE + except/i386/chkstk_asm.s + except/i386/seh.s + except/i386/seh_prolog.s + setjmp/i386/setjmp.s + math/i386/alldiv_asm.s + math/i386/alldvrm_asm.s + math/i386/allmul_asm.s + math/i386/allrem_asm.s + math/i386/allshl_asm.s + math/i386/allshr_asm.s + math/i386/atan_asm.s + math/i386/aulldiv_asm.s + math/i386/aulldvrm_asm.s + math/i386/aullrem_asm.s + math/i386/aullshr_asm.s + math/i386/ceil_asm.s + math/i386/cos_asm.s + math/i386/fabs_asm.s + math/i386/floor_asm.s + math/i386/ftol_asm.s + math/i386/ftol2_asm.s + math/i386/log_asm.s + math/i386/log10_asm.s + math/i386/pow_asm.s + math/i386/sin_asm.s + math/i386/sqrt_asm.s + math/i386/tan_asm.s + math/i386/ci.c + misc/i386/readcr4.S) + if(NOT MSVC) + list(APPEND LIBCNTPR_SOURCE except/i386/chkstk_ms.s) + endif() +elseif(ARCH MATCHES amd64) + list(APPEND LIBCNTPR_SOURCE + except/amd64/chkstk_asm.s + except/amd64/seh.s + setjmp/amd64/setjmp.s + math/cos.c + math/sin.c + math/amd64/alldiv.S + math/amd64/atan.S + math/amd64/atan2.S + math/amd64/ceil.S + math/amd64/exp.S + math/amd64/fabs.S + math/amd64/floor.S + math/amd64/fmod.S + math/amd64/ldexp.S + math/amd64/log.S + math/amd64/log10.S + math/amd64/pow.S + math/amd64/sqrt.S + math/amd64/tan.S) +endif() + +if(ARCH MATCHES i386) + list(APPEND LIBCNTPR_SOURCE + mem/i386/memchr_asm.s + mem/i386/memmove_asm.s + mem/i386/memset_asm.s + string/i386/strcat_asm.s + string/i386/strchr_asm.s + string/i386/strcmp_asm.s + string/i386/strcpy_asm.s + string/i386/strlen_asm.s + string/i386/strncat_asm.s + string/i386/strncmp_asm.s + string/i386/strncpy_asm.s + string/i386/strnlen_asm.s + string/i386/strrchr_asm.s + string/i386/wcscat_asm.s + string/i386/wcschr_asm.s + string/i386/wcscmp_asm.s + string/i386/wcscpy_asm.s + string/i386/wcslen_asm.s + string/i386/wcsncat_asm.s + string/i386/wcsncmp_asm.s + string/i386/wcsncpy_asm.s + string/i386/wcsnlen_asm.s + string/i386/wcsrchr_asm.s) +else() + list(APPEND LIBCNTPR_SOURCE + mem/memchr.c + mem/memcpy.c + mem/memmove.c + mem/memset.c + string/strcat.c + string/strchr.c + string/strcmp.c + string/strcpy.c + string/strlen.c + string/strncat.c + string/strncmp.c + string/strncpy.c + string/strnlen.c + string/strrchr.c + string/wcscat.c + string/wcschr.c + string/wcscmp.c + string/wcscpy.c + string/wcslen.c + string/wcsncat.c + string/wcsncmp.c + string/wcsncpy.c + string/wcsnlen.c + string/wcsrchr.c) +endif() + +add_library(libcntpr ${LIBCNTPR_SOURCE}) +set_property(TARGET libcntpr PROPERTY COMPILE_DEFINITIONS NO_RTL_INLINES _NTSYSTEM_ _NTDLLBUILD_ _LIBCNT_ __CRT__NO_INLINE) +add_dependencies(libcntpr psdk asm) diff --git a/lib/sdk/crt/math/amd64/fabs.S b/lib/sdk/crt/math/amd64/fabs.S index 84452dc1942..0900acceed9 100644 --- a/lib/sdk/crt/math/amd64/fabs.S +++ b/lib/sdk/crt/math/amd64/fabs.S @@ -18,4 +18,8 @@ _fabs: UNIMPLEMENTED fabs ret +#ifdef _USE_ML +ALIAS = <_fabs> +#endif + END diff --git a/lib/sdk/crt/misc/getopt.c b/lib/sdk/crt/misc/getopt.c new file mode 100644 index 00000000000..cd759b2ff6a --- /dev/null +++ b/lib/sdk/crt/misc/getopt.c @@ -0,0 +1,394 @@ +#include +#include +#include +#include +#include +#include +#include + +#define REPLACE_GETOPT + +#define _DIAGASSERT(x) do {} while (0) + +#ifdef REPLACE_GETOPT +#ifdef __weak_alias +__weak_alias(getopt,_getopt) +#endif +int opterr = 1; +int optind = 1; +int optopt = '?'; +int optreset; +char *optarg; +#endif + +#ifdef __weak_alias +__weak_alias(getopt_long,_getopt_long) +#endif + +#ifndef __CYGWIN__ +#define __progname __argv[0] +#else +extern char __declspec(dllimport) *__progname; +#endif + +#define IGNORE_FIRST (*options == '-' || *options == '+') +#define PRINT_ERROR ((opterr) && ((*options != ':') || (IGNORE_FIRST && options[1] != ':'))) + +#ifndef IS_POSIXLY_CORRECT +#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) +#endif + +#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) + +#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') + +#define BADCH (int)'?' +#define BADARG ((IGNORE_FIRST && options[1] == ':') || (*options == ':') ? (int)':' : (int)'?') +#define INORDER (int)1 + +static char EMSG[1]; + +static int getopt_internal (int,char * const *,const char *); +static int gcd (int,int); +static void permute_args (int,int,int,char * const *); + +static char *place = EMSG; + +static int nonopt_start = -1; +static int nonopt_end = -1; + +static const char recargchar[] = "option requires an argument -- %c"; +static const char recargstring[] = "option requires an argument -- %s"; +static const char ambig[] = "ambiguous option -- %.*s"; +static const char noarg[] = "option doesn't take an argument -- %.*s"; +static const char illoptchar[] = "unknown option -- %c"; +static const char illoptstring[] = "unknown option -- %s"; + +static void +_vwarnx(const char *fmt,va_list ap) +{ + (void)fprintf(stderr,"%s: ",__progname); + if (fmt != NULL) + (void)vfprintf(stderr,fmt,ap); + (void)fprintf(stderr,"\n"); +} + +static void +warnx(const char *fmt,...) +{ + va_list ap; + va_start(ap,fmt); + _vwarnx(fmt,ap); + va_end(ap); +} + +static int +gcd(a,b) + int a; + int b; +{ + int c; + + c = a % b; + while (c != 0) { + a = b; + b = c; + c = a % b; + } + + return b; +} + +static void +permute_args(panonopt_start,panonopt_end,opt_end,nargv) + int panonopt_start; + int panonopt_end; + int opt_end; + char * const *nargv; +{ + int cstart,cyclelen,i,j,ncycle,nnonopts,nopts,pos; + char *swap; + + _DIAGASSERT(nargv != NULL); + + nnonopts = panonopt_end - panonopt_start; + nopts = opt_end - panonopt_end; + ncycle = gcd(nnonopts,nopts); + cyclelen = (opt_end - panonopt_start) / ncycle; + + for (i = 0; i < ncycle; i++) { + cstart = panonopt_end+i; + pos = cstart; + for (j = 0; j < cyclelen; j++) { + if (pos >= panonopt_end) + pos -= nnonopts; + else + pos += nopts; + swap = nargv[pos]; + + ((char **) nargv)[pos] = nargv[cstart]; + + ((char **)nargv)[cstart] = swap; + } + } +} + +static int +getopt_internal(nargc,nargv,options) + int nargc; + char * const *nargv; + const char *options; +{ + char *oli; + int optchar; + + _DIAGASSERT(nargv != NULL); + _DIAGASSERT(options != NULL); + + optarg = NULL; + + if (optind == 0) + optind = 1; + + if (optreset) + nonopt_start = nonopt_end = -1; +start: + if (optreset || !*place) { + optreset = 0; + if (optind >= nargc) { + place = EMSG; + if (nonopt_end != -1) { + + permute_args(nonopt_start,nonopt_end,optind,nargv); + optind -= nonopt_end - nonopt_start; + } + else if (nonopt_start != -1) { + + optind = nonopt_start; + } + nonopt_start = nonopt_end = -1; + return -1; + } + if ((*(place = nargv[optind]) != '-') + || (place[1] == '\0')) { + place = EMSG; + if (IN_ORDER) { + + optarg = nargv[optind++]; + return INORDER; + } + if (!PERMUTE) { + + return -1; + } + + if (nonopt_start == -1) + nonopt_start = optind; + else if (nonopt_end != -1) { + permute_args(nonopt_start,nonopt_end,optind,nargv); + nonopt_start = optind - + (nonopt_end - nonopt_start); + nonopt_end = -1; + } + optind++; + + goto start; + } + if (nonopt_start != -1 && nonopt_end == -1) + nonopt_end = optind; + if (place[1] && *++place == '-') { + place++; + return -2; + } + } + if ((optchar = (int)*place++) == (int)':' || + (oli = strchr(options + (IGNORE_FIRST ? 1 : 0),optchar)) == NULL) { + + if (!*place) + ++optind; + if (PRINT_ERROR) + warnx(illoptchar,optchar); + optopt = optchar; + return BADCH; + } + if (optchar == 'W' && oli[1] == ';') { + + if (*place) + return -2; + + if (++optind >= nargc) { + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar,optchar); + optopt = optchar; + return BADARG; + } else + place = nargv[optind]; + + return -2; + } + if (*++oli != ':') { + if (!*place) + ++optind; + } else { + optarg = NULL; + if (*place) + optarg = place; + + else if (oli[1] != ':') { + if (++optind >= nargc) { + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar,optchar); + optopt = optchar; + return BADARG; + } else + optarg = nargv[optind]; + } + place = EMSG; + ++optind; + } + + return optchar; +} + +#ifdef REPLACE_GETOPT + +int +getopt(nargc,nargv,options) + int nargc; + char * const *nargv; + const char *options; +{ + int retval; + + _DIAGASSERT(nargv != NULL); + _DIAGASSERT(options != NULL); + + if ((retval = getopt_internal(nargc,nargv,options)) == -2) { + ++optind; + + if (nonopt_end != -1) { + permute_args(nonopt_start,nonopt_end,optind,nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + retval = -1; + } + return retval; +} +#endif + +int +getopt_long(nargc,nargv,options,long_options,idx) + int nargc; + char * const *nargv; + const char *options; + const struct option *long_options; + int *idx; +{ + int retval; + + _DIAGASSERT(nargv != NULL); + _DIAGASSERT(options != NULL); + _DIAGASSERT(long_options != NULL); + + if ((retval = getopt_internal(nargc,nargv,options)) == -2) { + char *current_argv,*has_equal; + size_t current_argv_len; + int i,match; + + current_argv = place; + match = -1; + + optind++; + place = EMSG; + + if (*current_argv == '\0') { + + if (nonopt_end != -1) { + permute_args(nonopt_start,nonopt_end,optind,nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + return -1; + } + if ((has_equal = strchr(current_argv,'=')) != NULL) { + + current_argv_len = has_equal - current_argv; + has_equal++; + } else + current_argv_len = strlen(current_argv); + + for (i = 0; long_options[i].name; i++) { + + if (strncmp(current_argv,long_options[i].name,current_argv_len)) + continue; + + if (strlen(long_options[i].name) == + (unsigned)current_argv_len) { + + match = i; + break; + } + if (match == -1) + match = i; + else { + + if (PRINT_ERROR) + warnx(ambig,(int)current_argv_len,current_argv); + optopt = 0; + return BADCH; + } + } + if (match != -1) { + if (long_options[match].has_arg == no_argument + && has_equal) { + if (PRINT_ERROR) + warnx(noarg,(int)current_argv_len,current_argv); + + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + return BADARG; + } + if (long_options[match].has_arg == required_argument || + long_options[match].has_arg == optional_argument) { + if (has_equal) + optarg = has_equal; + else if (long_options[match].has_arg == + required_argument) { + + optarg = nargv[optind++]; + } + } + if ((long_options[match].has_arg == required_argument) + && (optarg == NULL)) { + + if (PRINT_ERROR) + warnx(recargstring,current_argv); + + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + --optind; + return BADARG; + } + } else { + if (PRINT_ERROR) + warnx(illoptstring,current_argv); + optopt = 0; + return BADCH; + } + if (long_options[match].flag) { + *long_options[match].flag = long_options[match].val; + retval = 0; + } else + retval = long_options[match].val; + if (idx) + *idx = match; + } + return retval; +} diff --git a/lib/sdk/crt/misc/ofmt_stub.c b/lib/sdk/crt/misc/ofmt_stub.c new file mode 100644 index 00000000000..73e206dcf2b --- /dev/null +++ b/lib/sdk/crt/misc/ofmt_stub.c @@ -0,0 +1,6 @@ + +int _get_output_format(void) +{ + return 0; +} + diff --git a/lib/sdk/crt/moldname-msvcrt.def b/lib/sdk/crt/moldname-msvcrt.def new file mode 100644 index 00000000000..af6661fada4 --- /dev/null +++ b/lib/sdk/crt/moldname-msvcrt.def @@ -0,0 +1,121 @@ +LIBRARY msvcrt.dll + +EXPORTS +access==_access +chdir==_chdir +chmod==_chmod +chsize==_chsize +close==_close +creat==_creat +cwait==_cwait +daylight==_daylight +dup==_dup +dup2==_dup2 +ecvt==_ecvt +eof==_eof +execl==_execl +execle==_execle +execlp==_execlp +execlpe==_execlpe +execv==_execv +execve==_execve +execvp==_execvp +execvpe==_execvpe +fcvt==_fcvt +fdopen==_fdopen +fgetchar==_fgetchar +fgetwchar==_fgetwchar +filelength==_filelength +fileno==_fileno +fpreset==_fpreset +fputchar==_fputchar +fputwchar==_fputwchar +fstat==_fstat +ftime==_ftime +gcvt==_gcvt +getch==_getch +getche==_getche +getcwd==_getcwd +getpid==_getpid +getw==_getw +heapwalk==_heapwalk +isatty==_isatty +itoa==_itoa +kbhit==_kbhit +lfind==_lfind +lsearch==_lsearch +lseek==_lseek +ltoa==_ltoa +memccpy==_memccpy +memicmp==_memicmp +mkdir==_mkdir +mktemp==_mktemp +open==_open +pclose==_pclose +popen==_popen +putch==_putch +putenv==_putenv +putw==_putw +read==_read +rmdir==_rmdir +rmtmp==_rmtmp +searchenv==_searchenv +setmode==_setmode +snprintf=_snprintf +sopen==_sopen +spawnl==_spawnl +spawnle==_spawnle +spawnlp==_spawnlp +spawnlpe==_spawnlpe +spawnv==_spawnv +spawnve==_spawnve +spawnvp==_spawnvp +spawnvpe==_spawnvpe +stat==_stat +strcmpi==_strcmpi +strdup==_strdup +stricmp==_stricmp +stricoll==_stricoll +strlwr==_strlwr +strnicmp==_strnicmp +strnset==_strnset +strrev==_strrev +strset==_strset +strupr==_strupr +swab==_swab +tell==_tell +tempnam==_tempnam +timezone==_timezone +tzname==_tzname +tzset==_tzset +umask==_umask +ungetch==_ungetch +unlink==_unlink +utime==_utime +wcsdup==_wcsdup +wcsicmp==_wcsicmp +wcsicoll==_wcsicoll +wcslwr==_wcslwr +wcsnicmp==_wcsnicmp +wcsnset==_wcsnset +wcsrev==_wcsrev +wcsset==_wcsset +wcsupr==_wcsupr +wpopen==_wpopen +write==_write +; non-ANSI functions declared in math.h +j0==_j0 +j1==_j1 +jn==_jn +y0==_y0 +y1==_y1 +yn==_yn +chgsign==_chgsign +scalb==_scalb +finite==_finite +fpclass==_fpclass +; C99 functions +cabs==_cabs +hypot==_hypot +logb==_logb +nextafter==_nextafter diff --git a/lib/sdk/crt/msvcrtex.cmake b/lib/sdk/crt/msvcrtex.cmake new file mode 100644 index 00000000000..9099448f55e --- /dev/null +++ b/lib/sdk/crt/msvcrtex.cmake @@ -0,0 +1,73 @@ + +include_directories(include/internal/mingw-w64) + +if(NOT MSVC) + add_compiler_flags(-Wno-main) +endif() + +list(APPEND MSVCRTEX_SOURCE + startup/crtexe.c + startup/wcrtexe.c + startup/crt_handler.c + startup/crtdll.c + startup/_newmode.c + startup/wildcard.c + startup/tlssup.c + startup/mingw_helpers.c + startup/natstart.c + startup/charmax.c + startup/merr.c + startup/atonexit.c + startup/txtmode.c + startup/pesect.c + startup/tlsmcrt.c + startup/tlsthrd.c + startup/tlsmthread.c + startup/cinitexe.c + startup/gs_support.c + startup/dll_argv.c + startup/dllargv.c + startup/wdllargv.c + startup/crt0_c.c + startup/crt0_w.c + startup/dllentry.c + misc/fltused.c + misc/ofmt_stub.c +) + +if(NOT MSVC) +list(APPEND MSVCRTEX_SOURCE + startup/pseudo-reloc.c + startup/pseudo-reloc-list.c) +endif() + +if(ARCH MATCHES i386) +list(APPEND MSVCRTEX_SOURCE + except/i386/chkstk_asm.s + except/i386/chkstk_ms.s + math/i386/ci.c + math/i386/ftol2_asm.s + math/i386/alldiv_asm.s +) +elseif(ARCH MATCHES amd64) +list(APPEND MSVCRTEX_SOURCE + except/amd64/chkstk_asm.s + except/amd64/chkstk_ms.s + math/amd64/alldiv.S) +endif() + +if(MSVC) + list(APPEND MSVCRTEX_SOURCE startup/mscmain.c) +else() + list(APPEND MSVCRTEX_SOURCE startup/gccmain.c) +endif() + +add_library(msvcrtex ${MSVCRTEX_SOURCE}) +set_target_properties(msvcrtex PROPERTIES COMPILE_DEFINITIONS _M_CEE_PURE) +set_source_files_properties(startup/crtdll.c PROPERTIES COMPILE_DEFINITIONS CRTDLL) + +if(NOT MSVC) + target_link_libraries(msvcrtex oldnames) +endif() + +add_dependencies(msvcrtex psdk asm) diff --git a/lib/sdk/crt/oldnames.cmake b/lib/sdk/crt/oldnames.cmake new file mode 100644 index 00000000000..4a57ae79c2a --- /dev/null +++ b/lib/sdk/crt/oldnames.cmake @@ -0,0 +1,10 @@ +if(NOT MSVC) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/liboldnames.a + COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_SOURCE_DIR}/moldname-msvcrt.def --kill-at --output-lib ${CMAKE_CURRENT_BINARY_DIR}/liboldnames.a + COMMAND ${MINGW_PREFIX}ar -rc ${CMAKE_CURRENT_BINARY_DIR}/liboldnames.a) + + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/liboldnames.a PROPERTIES GENERATED TRUE) + + add_custom_target(oldnames ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/liboldnames.a) +endif() diff --git a/lib/sdk/crt/printf/streamout.c b/lib/sdk/crt/printf/streamout.c index 66aae271dd5..798e298e4ba 100644 --- a/lib/sdk/crt/printf/streamout.c +++ b/lib/sdk/crt/printf/streamout.c @@ -73,7 +73,7 @@ enum #ifndef _USER32_WSPRINTF void -#ifdef _LIBCNT +#ifdef _LIBCNT_ /* Due to restrictions in kernel mode regarding the use of floating point, we prevent it from being inlined */ __declspec(noinline) diff --git a/lib/sdk/crt/startup/_newmode.c b/lib/sdk/crt/startup/_newmode.c new file mode 100644 index 00000000000..f2fa3966f70 --- /dev/null +++ b/lib/sdk/crt/startup/_newmode.c @@ -0,0 +1,7 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +int _newmode = 0; diff --git a/lib/sdk/crt/startup/atonexit.c b/lib/sdk/crt/startup/atonexit.c new file mode 100644 index 00000000000..442be353d88 --- /dev/null +++ b/lib/sdk/crt/startup/atonexit.c @@ -0,0 +1,59 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#undef CRTDLL +#ifndef _DLL +#define _DLL +#endif + +#include +#include +#include +#include +#include +#include + +#define _EXIT_LOCK1 8 + + void __cdecl _lock (int _File); + void __cdecl _unlock (int _File); + +_PVFV *__onexitbegin; +_PVFV *__onexitend; + +extern _CRTIMP _onexit_t __dllonexit (_onexit_t, _PVFV**, _PVFV**); +extern _onexit_t (__cdecl * __MINGW_IMP_SYMBOL(_onexit)) (_onexit_t func); + +/* Choose a different name to prevent name conflicts. The CRT one works fine. */ +_onexit_t __cdecl mingw_onexit(_onexit_t func); + +_onexit_t __cdecl mingw_onexit(_onexit_t func) +{ + _PVFV *onexitbegin; + _PVFV *onexitend; + _onexit_t retval; + + onexitbegin = (_PVFV *) _decode_pointer (__onexitbegin); + + if (onexitbegin == (_PVFV *) -1) + return (* __MINGW_IMP_SYMBOL(_onexit)) (func); + _lock (_EXIT_LOCK1); + onexitbegin = (_PVFV *) _decode_pointer (__onexitbegin); + onexitend = (_PVFV *) _decode_pointer (__onexitend); + + retval = __dllonexit (func, &onexitbegin, &onexitend); + + __onexitbegin = (_PVFV *) _encode_pointer (onexitbegin); + __onexitend = (_PVFV *) _encode_pointer (onexitend); + _unlock (_EXIT_LOCK1); + return retval; +} + +int __cdecl +atexit (_PVFV func) +{ + return (mingw_onexit((_onexit_t)func) == NULL) ? -1 : 0; +} diff --git a/lib/sdk/crt/startup/charmax.c b/lib/sdk/crt/startup/charmax.c new file mode 100644 index 00000000000..fbd10c4b923 --- /dev/null +++ b/lib/sdk/crt/startup/charmax.c @@ -0,0 +1,21 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include + +__declspec(dllimport) int __lconv_init (void); + +int mingw_initcharmax = 0; + +int _charmax = 255; + +static int my_lconv_init(void) +{ + return __lconv_init(); +} + +_CRTALLOC(".CRT$XIC") _PIFV __mingw_pinit = my_lconv_init; diff --git a/lib/sdk/crt/startup/cinitexe.c b/lib/sdk/crt/startup/cinitexe.c new file mode 100644 index 00000000000..ee441ed77f9 --- /dev/null +++ b/lib/sdk/crt/startup/cinitexe.c @@ -0,0 +1,13 @@ +#include +#include + +#ifdef _MSC_VER +#pragma comment(linker, "/merge:.CRT=.rdata") +#endif + +typedef void (__cdecl *_PVFV)(void); + +_CRTALLOC(".CRT$XIA") _PVFV __xi_a[] = { NULL }; +_CRTALLOC(".CRT$XIZ") _PVFV __xi_z[] = { NULL }; +_CRTALLOC(".CRT$XCA") _PVFV __xc_a[] = { NULL }; +_CRTALLOC(".CRT$XCZ") _PVFV __xc_z[] = { NULL }; diff --git a/lib/sdk/crt/startup/crt0_c.c b/lib/sdk/crt/startup/crt0_c.c new file mode 100644 index 00000000000..165eee10825 --- /dev/null +++ b/lib/sdk/crt/startup/crt0_c.c @@ -0,0 +1,20 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include + +extern HINSTANCE __mingw_winmain_hInstance; +extern LPSTR __mingw_winmain_lpCmdLine; +extern DWORD __mingw_winmain_nShowCmd; + +/*ARGSUSED*/ +int main (int __UNUSED_PARAM(flags), + char ** __UNUSED_PARAM(cmdline), + char ** __UNUSED_PARAM(inst)) +{ + return (int) WinMain (__mingw_winmain_hInstance, NULL, + __mingw_winmain_lpCmdLine, __mingw_winmain_nShowCmd); +} diff --git a/lib/sdk/crt/startup/crt0_w.c b/lib/sdk/crt/startup/crt0_w.c new file mode 100644 index 00000000000..9f46e38a9cb --- /dev/null +++ b/lib/sdk/crt/startup/crt0_w.c @@ -0,0 +1,25 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#include + +/* Do the UNICODE prototyping of WinMain. Be aware that in winbase.h WinMain is a macro + defined to wWinMain. */ +int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPWSTR lpCmdLine,int nShowCmd); + +extern HINSTANCE __mingw_winmain_hInstance; +extern LPWSTR __mingw_winmain_lpCmdLine; +extern DWORD __mingw_winmain_nShowCmd; + +int wmain (int, wchar_t **, wchar_t **); + +/*ARGSUSED*/ +int wmain (int __UNUSED_PARAM(flags), + wchar_t ** __UNUSED_PARAM(cmdline), + wchar_t ** __UNUSED_PARAM(inst)) +{ + return (int) wWinMain (__mingw_winmain_hInstance, NULL, + __mingw_winmain_lpCmdLine, __mingw_winmain_nShowCmd); +} diff --git a/lib/sdk/crt/startup/crt_handler.c b/lib/sdk/crt/startup/crt_handler.c new file mode 100644 index 00000000000..5d7dc22bebd --- /dev/null +++ b/lib/sdk/crt/startup/crt_handler.c @@ -0,0 +1,290 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined (_WIN64) && defined (__ia64__) +#error FIXME: Unsupported __ImageBase implementation. +#else +#ifndef _MSC_VER +#define __ImageBase __MINGW_LSYMBOL(_image_base__) +#endif +/* This symbol is defined by the linker. */ +extern IMAGE_DOS_HEADER __ImageBase; +#endif + +#pragma pack(push,1) +typedef struct _UNWIND_INFO { + BYTE VersionAndFlags; + BYTE PrologSize; + BYTE CountOfUnwindCodes; + BYTE FrameRegisterAndOffset; + ULONG AddressOfExceptionHandler; +} UNWIND_INFO,*PUNWIND_INFO; +#pragma pack(pop) + +PIMAGE_SECTION_HEADER _FindPESectionByName (const char *); +PIMAGE_SECTION_HEADER _FindPESectionExec (size_t); +PBYTE _GetPEImageBase (void); + +int __mingw_init_ehandler (void); +extern void _fpreset (void); + +#if defined(_WIN64) && !defined(_MSC_VER) +EXCEPTION_DISPOSITION __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *); + +#define MAX_PDATA_ENTRIES 32 +static RUNTIME_FUNCTION emu_pdata[MAX_PDATA_ENTRIES]; +static UNWIND_INFO emu_xdata[MAX_PDATA_ENTRIES]; + +int +__mingw_init_ehandler (void) +{ + static int was_here = 0; + size_t e = 0; + PIMAGE_SECTION_HEADER pSec; + PBYTE _ImageBase = _GetPEImageBase (); + + if (was_here || !_ImageBase) + return was_here; + was_here = 1; + if (_FindPESectionByName (".pdata") != NULL) + return 1; + + /* Allocate # of e tables and entries. */ + memset (emu_pdata, 0, sizeof (RUNTIME_FUNCTION) * MAX_PDATA_ENTRIES); + memset (emu_xdata, 0, sizeof (UNWIND_INFO) * MAX_PDATA_ENTRIES); + + e = 0; + /* Fill tables and entries. */ + while (e < MAX_PDATA_ENTRIES && (pSec = _FindPESectionExec (e)) != NULL) + { + emu_xdata[e].VersionAndFlags = 9; /* UNW_FLAG_EHANDLER | UNW_VERSION */ + emu_xdata[e].AddressOfExceptionHandler = + (DWORD)(size_t) ((LPBYTE)__mingw_SEH_error_handler - _ImageBase); + emu_pdata[e].BeginAddress = pSec->VirtualAddress; + emu_pdata[e].EndAddress = pSec->VirtualAddress + pSec->Misc.VirtualSize; + emu_pdata[e].UnwindData = + (DWORD)(size_t)((LPBYTE)&emu_xdata[e] - _ImageBase); + ++e; + } +#ifdef _DEBUG_CRT + if (!e || e > MAX_PDATA_ENTRIES) + abort (); +#endif + /* RtlAddFunctionTable. */ + if (e != 0) + RtlAddFunctionTable (emu_pdata, e, (DWORD64)_ImageBase); + return 1; +} + +extern void _fpreset (void); + +EXCEPTION_DISPOSITION +__mingw_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord, + void *EstablisherFrame __attribute__ ((unused)), + struct _CONTEXT* ContextRecord __attribute__ ((unused)), + void *DispatcherContext __attribute__ ((unused))) +{ + EXCEPTION_DISPOSITION action = ExceptionContinueSearch; /* EXCEPTION_CONTINUE_SEARCH; */ + void (*old_handler) (int); + int reset_fpu = 0; + + switch (ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + /* test if the user has set SIGSEGV */ + old_handler = signal (SIGSEGV, SIG_DFL); + if (old_handler == SIG_IGN) + { + /* this is undefined if the signal was raised by anything other + than raise (). */ + signal (SIGSEGV, SIG_IGN); + action = 0; //EXCEPTION_CONTINUE_EXECUTION; + } + else if (old_handler != SIG_DFL) + { + /* This means 'old' is a user defined function. Call it */ + (*old_handler) (SIGSEGV); + action = 0; // EXCEPTION_CONTINUE_EXECUTION; + } + else + action = 4; /* EXCEPTION_EXECUTE_HANDLER; */ + break; + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_PRIV_INSTRUCTION: + /* test if the user has set SIGILL */ + old_handler = signal (SIGILL, SIG_DFL); + if (old_handler == SIG_IGN) + { + /* this is undefined if the signal was raised by anything other + than raise (). */ + signal (SIGILL, SIG_IGN); + action = 0; // EXCEPTION_CONTINUE_EXECUTION; + } + else if (old_handler != SIG_DFL) + { + /* This means 'old' is a user defined function. Call it */ + (*old_handler) (SIGILL); + action = 0; // EXCEPTION_CONTINUE_EXECUTION; + } + else + action = 4; /* EXCEPTION_EXECUTE_HANDLER;*/ + break; + case EXCEPTION_FLT_INVALID_OPERATION: + case EXCEPTION_FLT_DIVIDE_BY_ZERO: + case EXCEPTION_FLT_DENORMAL_OPERAND: + case EXCEPTION_FLT_OVERFLOW: + case EXCEPTION_FLT_UNDERFLOW: + case EXCEPTION_FLT_INEXACT_RESULT: + reset_fpu = 1; + /* fall through. */ + + case EXCEPTION_INT_DIVIDE_BY_ZERO: + /* test if the user has set SIGFPE */ + old_handler = signal (SIGFPE, SIG_DFL); + if (old_handler == SIG_IGN) + { + signal (SIGFPE, SIG_IGN); + if (reset_fpu) + _fpreset (); + action = 0; // EXCEPTION_CONTINUE_EXECUTION; + } + else if (old_handler != SIG_DFL) + { + /* This means 'old' is a user defined function. Call it */ + (*old_handler) (SIGFPE); + action = 0; // EXCEPTION_CONTINUE_EXECUTION; + } + break; + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_FLT_STACK_CHECK: + case EXCEPTION_INT_OVERFLOW: + case EXCEPTION_INVALID_HANDLE: + /*case EXCEPTION_POSSIBLE_DEADLOCK: */ + action = 0; // EXCEPTION_CONTINUE_EXECUTION; + break; + default: + break; + } + return action; +} + +#endif + +LPTOP_LEVEL_EXCEPTION_FILTER __mingw_oldexcpt_handler = NULL; + +long CALLBACK +_gnu_exception_handler (EXCEPTION_POINTERS *exception_data); + +#define GCC_MAGIC (('G' << 16) | ('C' << 8) | 'C' | (1U << 29)) + +long CALLBACK +_gnu_exception_handler (EXCEPTION_POINTERS *exception_data) +{ + void (*old_handler) (int); + long action = EXCEPTION_CONTINUE_SEARCH; + int reset_fpu = 0; + +#ifdef __SEH__ + if ((exception_data->ExceptionRecord->ExceptionCode & 0x20ffffff) == GCC_MAGIC) + { + if ((exception_data->ExceptionRecord->ExceptionFlags & EXCEPTION_NONCONTINUABLE) == 0) + return EXCEPTION_CONTINUE_EXECUTION; + } +#endif + + switch (exception_data->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + /* test if the user has set SIGSEGV */ + old_handler = signal (SIGSEGV, SIG_DFL); + if (old_handler == SIG_IGN) + { + /* this is undefined if the signal was raised by anything other + than raise (). */ + signal (SIGSEGV, SIG_IGN); + action = EXCEPTION_CONTINUE_EXECUTION; + } + else if (old_handler != SIG_DFL) + { + /* This means 'old' is a user defined function. Call it */ + (*old_handler) (SIGSEGV); + action = EXCEPTION_CONTINUE_EXECUTION; + } + break; + + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_PRIV_INSTRUCTION: + /* test if the user has set SIGILL */ + old_handler = signal (SIGILL, SIG_DFL); + if (old_handler == SIG_IGN) + { + /* this is undefined if the signal was raised by anything other + than raise (). */ + signal (SIGILL, SIG_IGN); + action = EXCEPTION_CONTINUE_EXECUTION; + } + else if (old_handler != SIG_DFL) + { + /* This means 'old' is a user defined function. Call it */ + (*old_handler) (SIGILL); + action = EXCEPTION_CONTINUE_EXECUTION; + } + break; + + case EXCEPTION_FLT_INVALID_OPERATION: + case EXCEPTION_FLT_DIVIDE_BY_ZERO: + case EXCEPTION_FLT_DENORMAL_OPERAND: + case EXCEPTION_FLT_OVERFLOW: + case EXCEPTION_FLT_UNDERFLOW: + case EXCEPTION_FLT_INEXACT_RESULT: + reset_fpu = 1; + /* fall through. */ + + case EXCEPTION_INT_DIVIDE_BY_ZERO: + /* test if the user has set SIGFPE */ + old_handler = signal (SIGFPE, SIG_DFL); + if (old_handler == SIG_IGN) + { + signal (SIGFPE, SIG_IGN); + if (reset_fpu) + _fpreset (); + action = EXCEPTION_CONTINUE_EXECUTION; + } + else if (old_handler != SIG_DFL) + { + /* This means 'old' is a user defined function. Call it */ + (*old_handler) (SIGFPE); + action = EXCEPTION_CONTINUE_EXECUTION; + } + break; +#ifdef _WIN64 + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_FLT_STACK_CHECK: + case EXCEPTION_INT_OVERFLOW: + case EXCEPTION_INVALID_HANDLE: + /*case EXCEPTION_POSSIBLE_DEADLOCK: */ + action = EXCEPTION_CONTINUE_EXECUTION; + break; +#endif + default: + break; + } + + if (action == EXCEPTION_CONTINUE_SEARCH && __mingw_oldexcpt_handler) + action = (*__mingw_oldexcpt_handler)(exception_data); + return action; +} diff --git a/lib/sdk/crt/startup/crtdll.c b/lib/sdk/crt/startup/crtdll.c new file mode 100644 index 00000000000..6fa17a821f8 --- /dev/null +++ b/lib/sdk/crt/startup/crtdll.c @@ -0,0 +1,223 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifdef CRTDLL +#undef CRTDLL +#ifndef _DLL +#define _DLL +#endif + +#include +#include +#include +#include +#define _DECL_DLLMAIN +#include +#include + +#ifndef _CRTIMP +#ifdef CRTDLL +#define _CRTIMP __declspec(dllexport) +#else +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else +#define _CRTIMP +#endif +#endif +#endif +#include +#include + +extern void __cdecl _initterm(_PVFV *,_PVFV *); + +#if defined(__GNUC__) +extern void __main (void); +extern void _pei386_runtime_relocator (void); +#endif + +extern _CRTALLOC(".CRT$XIA") _PIFV __xi_a[]; +extern _CRTALLOC(".CRT$XIZ") _PIFV __xi_z[]; +extern _CRTALLOC(".CRT$XCA") _PVFV __xc_a[]; +extern _CRTALLOC(".CRT$XCZ") _PVFV __xc_z[]; + +/* TLS initialization hook. */ +extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback; + +static int __proc_attached = 0; + +extern _PVFV *__onexitbegin; +extern _PVFV *__onexitend; + +extern int mingw_app_type; + +extern WINBOOL WINAPI DllMain (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved); + +extern WINBOOL WINAPI DllEntryPoint (HANDLE, DWORD, LPVOID); + +static int pre_c_init (void); + +_CRTALLOC(".CRT$XIAA") _PIFV pcinit = pre_c_init; + +static int +pre_c_init (void) +{ + _PVFV *onexitbegin; + + onexitbegin = (_PVFV *) malloc (32 * sizeof (_PVFV)); + __onexitend = __onexitbegin = (_PVFV *) _encode_pointer (onexitbegin); + + if (onexitbegin == NULL) + return 1; + *onexitbegin = (_PVFV) NULL; + return 0; +} + +WINBOOL WINAPI _CRT_INIT (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) +{ + if (dwReason == DLL_PROCESS_DETACH) + { + if (__proc_attached > 0) + __proc_attached--; + else + return FALSE; + } + if (dwReason == DLL_PROCESS_ATTACH) + { + void *lock_free = NULL; + void *fiberid = ((PNT_TIB)NtCurrentTeb ())->StackBase; + int nested = FALSE; + + while ((lock_free = InterlockedCompareExchangePointer ((volatile PVOID *) &__native_startup_lock, + fiberid, 0)) != 0) + { + if (lock_free == fiberid) + { + nested = TRUE; + break; + } + Sleep(1000); + } + if (__native_startup_state != __uninitialized) + { + _amsg_exit(31); + } + else + { + __native_startup_state = __initializing; + + _initterm ((_PVFV *) (void *) __xi_a, (_PVFV *) (void *) __xi_z); + _initterm (__xc_a,__xc_z); + __native_startup_state = __initialized; + } + if (! nested) + { + (void) InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0); + } + if (__dyn_tls_init_callback != NULL) + { + __dyn_tls_init_callback (hDllHandle, DLL_THREAD_ATTACH, lpreserved); + } + __proc_attached++; + } + else if (dwReason == DLL_PROCESS_DETACH) + { + void *lock_free = NULL; + while ((lock_free = InterlockedCompareExchangePointer ((volatile PVOID *) &__native_startup_lock,(PVOID) 1, 0)) != 0) + { + Sleep(1000); + } + if(__native_startup_state!=__initialized) + { + _amsg_exit (31); + } + else + { + _PVFV * onexitbegin = (_PVFV *) _decode_pointer (__onexitbegin); + if (onexitbegin) + { + _PVFV *onexitend = (_PVFV *) _decode_pointer (__onexitend); + while (--onexitend >= onexitbegin) + if (*onexitend != NULL) + (**onexitend) (); + free (onexitbegin); + __onexitbegin = __onexitend = (_PVFV *) NULL; + } + __native_startup_state = __uninitialized; + (void) InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0); + } + } + return TRUE; +} + +static WINBOOL __DllMainCRTStartup (HANDLE, DWORD, LPVOID); + +WINBOOL WINAPI DllMainCRTStartup (HANDLE, DWORD, LPVOID); +int __mingw_init_ehandler (void); + +WINBOOL WINAPI +DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) +{ + mingw_app_type = 0; + if (dwReason == DLL_PROCESS_ATTACH) + { + __security_init_cookie (); +#ifdef _WIN64 + __mingw_init_ehandler (); +#endif + } + return __DllMainCRTStartup (hDllHandle, dwReason, lpreserved); +} + +__declspec(noinline) WINBOOL +__DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) +{ + WINBOOL retcode = TRUE; + + __native_dllmain_reason = dwReason; + if (dwReason == DLL_PROCESS_DETACH && __proc_attached == 0) + { + retcode = FALSE; + goto i__leave; + } +#if defined(__GNUC__) + _pei386_runtime_relocator (); +#endif + if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH) + { + retcode = _CRT_INIT (hDllHandle, dwReason, lpreserved); + if (!retcode) + goto i__leave; + retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved); + if (! retcode) + { + if (dwReason == DLL_PROCESS_ATTACH) + _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + goto i__leave; + } + } + if (dwReason == DLL_PROCESS_ATTACH) +#if defined(__GNUC__) + __main (); +#endif + retcode = DllMain(hDllHandle,dwReason,lpreserved); + if (dwReason == DLL_PROCESS_ATTACH && ! retcode) + { + DllMain (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + DllEntryPoint (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + _CRT_INIT (hDllHandle, DLL_PROCESS_DETACH, lpreserved); + } + if (dwReason == DLL_PROCESS_DETACH || dwReason == DLL_THREAD_DETACH) + { + retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved); + if (_CRT_INIT (hDllHandle, dwReason, lpreserved) == FALSE) + retcode = FALSE; + } +i__leave: + __native_dllmain_reason = UINT_MAX; + return retcode ; +} +#endif diff --git a/lib/sdk/crt/startup/crtexe.c b/lib/sdk/crt/startup/crtexe.c new file mode 100644 index 00000000000..8d15e29ebc3 --- /dev/null +++ b/lib/sdk/crt/startup/crtexe.c @@ -0,0 +1,459 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#undef CRTDLL +#ifndef _DLL +#define _DLL +#endif + +#define SPECIAL_CRTEXE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef __winitenv +extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv); +#define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv)) +#endif + +#ifndef __initenv +extern char *** __MINGW_IMP_SYMBOL(__initenv); +#define __initenv (* __MINGW_IMP_SYMBOL(__initenv)) +#endif + +/* Hack, for bug in ld. Will be removed soon. */ +#if defined(__GNUC__) +#define __ImageBase __MINGW_LSYMBOL(_image_base__) +#endif + +/* This symbol is defined by ld. */ +extern IMAGE_DOS_HEADER __ImageBase; + +extern void _fpreset (void); +#define SPACECHAR _T(' ') +#define DQUOTECHAR _T('\"') + +__declspec(dllimport) void __setusermatherr(int (__cdecl *)(struct _exception *)); + +extern int * __MINGW_IMP_SYMBOL(_fmode); +extern int * __MINGW_IMP_SYMBOL(_commode); + +#undef _fmode +extern int _fmode; +extern int * __MINGW_IMP_SYMBOL(_commode); +#define _commode (* __MINGW_IMP_SYMBOL(_commode)) +extern int _dowildcard; + +#if defined(__GNUC__) +int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0; +#else +int __declspec(selectany) _MINGW_INSTALL_DEBUG_MATHERR = 0; +#endif + +extern int __defaultmatherr; + +extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *); + +static int __cdecl check_managed_app (void); + +extern _CRTALLOC(".CRT$XIA") _PIFV __xi_a[]; +extern _CRTALLOC(".CRT$XIZ") _PIFV __xi_z[]; +extern _CRTALLOC(".CRT$XCA") _PVFV __xc_a[]; +extern _CRTALLOC(".CRT$XCZ") _PVFV __xc_z[]; + +/* TLS initialization hook. */ +extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback; + +extern _PVFV *__onexitbegin; +extern _PVFV *__onexitend; + +extern int mingw_app_type; + +HINSTANCE __mingw_winmain_hInstance; +_TCHAR *__mingw_winmain_lpCmdLine; +DWORD __mingw_winmain_nShowCmd; + +static int argc; + +#if defined(__GNUC__) +extern void __main(void); +extern void _pei386_runtime_relocator (void); +#endif + +#ifdef WPRFLAG +static wchar_t **argv; +static wchar_t **envp; +#else +static char **argv; +static char **envp; +#endif + +static int argret; +static int mainret=0; +static int managedapp; +static int has_cctor = 0; +static _startupinfo startinfo; +extern LPTOP_LEVEL_EXCEPTION_FILTER __mingw_oldexcpt_handler; + + +long CALLBACK _gnu_exception_handler (EXCEPTION_POINTERS * exception_data); +#ifdef WPRFLAG +static void duplicate_ppstrings (int ac, wchar_t ***av); +#else +static void duplicate_ppstrings (int ac, char ***av); +#endif + +static int __cdecl pre_c_init (void); +static void __cdecl pre_cpp_init (void); +static void __cdecl __mingw_prepare_except_for_msvcr80_and_higher (void); +_CRTALLOC(".CRT$XIAA") _PIFV __declspec(selectany) mingw_pcinit = pre_c_init; +_CRTALLOC(".CRT$XCAA") _PVFV __declspec(selectany) mingw_pcppinit = pre_cpp_init; + +static int __cdecl +pre_c_init (void) +{ + managedapp = check_managed_app (); + if (mingw_app_type) + __set_app_type(_GUI_APP); + else + __set_app_type (_CONSOLE_APP); + __onexitbegin = __onexitend = (_PVFV *) _encode_pointer ((_PVFV *)(-1)); + + * __MINGW_IMP_SYMBOL(_fmode) = _fmode; + * __MINGW_IMP_SYMBOL(_commode) = _commode; + +#ifdef WPRFLAG + _wsetargv(); +#else + _setargv(); +#endif + if (_MINGW_INSTALL_DEBUG_MATHERR) + { + __setusermatherr (_matherr); + } + + if (__globallocalestatus == -1) + { + } + return 0; +} + +static void __cdecl +pre_cpp_init (void) +{ + startinfo.newmode = _newmode; + +#ifdef WPRFLAG + argret = __wgetmainargs(&argc,&argv,&envp,_dowildcard,&startinfo); +#else + argret = __getmainargs(&argc,&argv,&envp,_dowildcard,&startinfo); +#endif +} + +static int __tmainCRTStartup (void); + +int WinMainCRTStartup (void); + +int WinMainCRTStartup (void) +{ + int ret = 255; +#ifdef __SEH__ + asm ("\t.l_startw:\n" + "\t.seh_handler __C_specific_handler, @except\n" + "\t.seh_handlerdata\n" + "\t.long 1\n" + "\t.rva .l_startw, .l_endw, _gnu_exception_handler ,.l_endw\n" + "\t.text" + ); +#endif + mingw_app_type = 1; + __security_init_cookie (); + ret = __tmainCRTStartup (); +#ifdef __SEH__ + asm ("\tnop\n" + "\t.l_endw: nop\n"); +#endif + return ret; +} + +int mainCRTStartup (void); + +#ifdef _WIN64 +int __mingw_init_ehandler (void); +#endif + +int mainCRTStartup (void) +{ + int ret = 255; +#ifdef __SEH__ + asm ("\t.l_start:\n" + "\t.seh_handler __C_specific_handler, @except\n" + "\t.seh_handlerdata\n" + "\t.long 1\n" + "\t.rva .l_start, .l_end, _gnu_exception_handler ,.l_end\n" + "\t.text" + ); +#endif + mingw_app_type = 0; + __security_init_cookie (); + ret = __tmainCRTStartup (); +#ifdef __SEH__ + asm ("\tnop\n" + "\t.l_end: nop\n"); +#endif + return ret; +} + +static +__declspec(noinline) int +__tmainCRTStartup (void) +{ + _TCHAR *lpszCommandLine = NULL; + STARTUPINFO StartupInfo; + WINBOOL inDoubleQuote = FALSE; + memset (&StartupInfo, 0, sizeof (STARTUPINFO)); + +#if !defined(_WIN64) && defined(__GNUC__) + /* We need to make sure that this function is build with frame-pointer + and that we align the stack to 16 bytes for the sake of SSE ops in main + or in functions inlined into main. */ + lpszCommandLine = (_TCHAR *) alloca (32); + memset (lpszCommandLine, 0xcc, 32); + asm __volatile__ ("andl $-16, %%esp" : : : "%esp"); +#endif + + if (mingw_app_type) + GetStartupInfo (&StartupInfo); + { + void *lock_free = NULL; + void *fiberid = ((PNT_TIB)NtCurrentTeb())->StackBase; + int nested = FALSE; + while((lock_free = InterlockedCompareExchangePointer ((volatile PVOID *) &__native_startup_lock, + fiberid, 0)) != 0) + { + if (lock_free == fiberid) + { + nested = TRUE; + break; + } + Sleep(1000); + } + if (__native_startup_state == __initializing) + { + _amsg_exit (31); + } + else if (__native_startup_state == __uninitialized) + { + __native_startup_state = __initializing; + _initterm ((_PVFV *)(void *)__xi_a, (_PVFV *)(void *) __xi_z); + } + else + has_cctor = 1; + + if (__native_startup_state == __initializing) + { + _initterm (__xc_a, __xc_z); + __native_startup_state = __initialized; + } + _ASSERTE(__native_startup_state == __initialized); + if (! nested) + (VOID)InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0); + + if (__dyn_tls_init_callback != NULL) + __dyn_tls_init_callback (NULL, DLL_THREAD_ATTACH, NULL); + +#if defined(__GNUC__) + _pei386_runtime_relocator (); +#endif + __mingw_oldexcpt_handler = SetUnhandledExceptionFilter (_gnu_exception_handler); +#if defined(_WIN64) && !defined(_MSC_VER) + __mingw_init_ehandler (); +#endif + __mingw_prepare_except_for_msvcr80_and_higher (); + + _fpreset (); + + if (mingw_app_type) + { +#ifdef WPRFLAG + lpszCommandLine = (_TCHAR *) _wcmdln; +#else + lpszCommandLine = (char *) _acmdln; +#endif + while (*lpszCommandLine > SPACECHAR || (*lpszCommandLine && inDoubleQuote)) + { + if (*lpszCommandLine == DQUOTECHAR) + inDoubleQuote = !inDoubleQuote; +#ifdef _MBCS + if (_ismbblead (*lpszCommandLine)) + { + if (lpszCommandLine) /* FIXME: Why this check? Should I check for *lpszCommandLine != 0 too? */ + lpszCommandLine++; + } +#endif + ++lpszCommandLine; + } + while (*lpszCommandLine && (*lpszCommandLine <= SPACECHAR)) + lpszCommandLine++; + + __mingw_winmain_hInstance = (HINSTANCE) &__ImageBase; + __mingw_winmain_lpCmdLine = lpszCommandLine; + __mingw_winmain_nShowCmd = StartupInfo.dwFlags & STARTF_USESHOWWINDOW ? + StartupInfo.wShowWindow : SW_SHOWDEFAULT; + } + duplicate_ppstrings (argc, &argv); +#if defined(__GNUC__) + __main (); +#endif +#ifdef WPRFLAG + __winitenv = envp; + /* C++ initialization. + gcc inserts this call automatically for a function called main, but not for wmain. */ + mainret = wmain (argc, argv, envp); +#else + __initenv = envp; + mainret = main (argc, argv, envp); +#endif + if (!managedapp) + exit (mainret); + + if (has_cctor == 0) + _cexit (); + } + return mainret; +} + +extern int mingw_initltsdrot_force; +extern int mingw_initltsdyn_force; +extern int mingw_initltssuo_force; +extern int mingw_initcharmax; + +static int __cdecl +check_managed_app (void) +{ + PIMAGE_DOS_HEADER pDOSHeader; + PIMAGE_NT_HEADERS pPEHeader; + PIMAGE_OPTIONAL_HEADER32 pNTHeader32; + PIMAGE_OPTIONAL_HEADER64 pNTHeader64; + + /* Force to be linked. */ + mingw_initltsdrot_force=1; + mingw_initltsdyn_force=1; + mingw_initltssuo_force=1; + mingw_initcharmax=1; + + pDOSHeader = (PIMAGE_DOS_HEADER) &__ImageBase; + if (pDOSHeader->e_magic != IMAGE_DOS_SIGNATURE) + return 0; + + pPEHeader = (PIMAGE_NT_HEADERS)((char *)pDOSHeader + pDOSHeader->e_lfanew); + if (pPEHeader->Signature != IMAGE_NT_SIGNATURE) + return 0; + + pNTHeader32 = (PIMAGE_OPTIONAL_HEADER32) &pPEHeader->OptionalHeader; + switch (pNTHeader32->Magic) + { + case IMAGE_NT_OPTIONAL_HDR32_MAGIC: + if (pNTHeader32->NumberOfRvaAndSizes <= IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR) + return 0; + return !! pNTHeader32->DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress; + case IMAGE_NT_OPTIONAL_HDR64_MAGIC: + pNTHeader64 = (PIMAGE_OPTIONAL_HEADER64)pNTHeader32; + if (pNTHeader64->NumberOfRvaAndSizes <= IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR) + return 0; + return !! pNTHeader64->DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress; + } + return 0; +} + +#ifdef WPRFLAG +static size_t wbytelen(const wchar_t *p) +{ + size_t ret = 1; + while (*p!=0) { + ret++,++p; + } + return ret*2; +} +static void duplicate_ppstrings (int ac, wchar_t ***av) +{ + wchar_t **avl; + int i; + wchar_t **n = (wchar_t **) malloc (sizeof (wchar_t *) * (ac + 1)); + + avl=*av; + for (i=0; i < ac; i++) + { + int l = wbytelen (avl[i]); + n[i] = (wchar_t *) malloc (l); + memcpy (n[i], avl[i], l); + } + n[i] = NULL; + *av = n; +} +#else +static void duplicate_ppstrings (int ac, char ***av) +{ + char **avl; + int i; + char **n = (char **) malloc (sizeof (char *) * (ac + 1)); + + avl=*av; + for (i=0; i < ac; i++) + { + int l = strlen (avl[i]) + 1; + n[i] = (char *) malloc (l); + memcpy (n[i], avl[i], l); + } + n[i] = NULL; + *av = n; +} +#endif + +#ifdef __MINGW_SHOW_INVALID_PARAMETER_EXCEPTION +#define __UNUSED_PARAM_1(x) x +#else +#define __UNUSED_PARAM_1 __UNUSED_PARAM +#endif +static void +__mingw_invalidParameterHandler (const wchar_t * __UNUSED_PARAM_1(expression), + const wchar_t * __UNUSED_PARAM_1(function), + const wchar_t * __UNUSED_PARAM_1(file), + unsigned int __UNUSED_PARAM_1(line), + uintptr_t __UNUSED_PARAM(pReserved)) +{ +#ifdef __MINGW_SHOW_INVALID_PARAMETER_EXCEPTION + wprintf(L"Invalid parameter detected in function %s. File: %s Line: %d\n", function, file, line); + wprintf(L"Expression: %s\n", expression); +#endif +} + +static void __cdecl +__mingw_prepare_except_for_msvcr80_and_higher (void) +{ + _invalid_parameter_handler (*fIPH)(_invalid_parameter_handler) = NULL; + HMODULE hmsv = GetModuleHandleA ("msvcr80.dll"); + if(!hmsv) + hmsv = GetModuleHandleA ("msvcr70.dll"); + if (!hmsv) + hmsv = GetModuleHandleA ("msvcrt.dll"); + if (!hmsv) + hmsv = LoadLibraryA ("msvcrt.dll"); + if (!hmsv) + return; + fIPH = (_invalid_parameter_handler (*)(_invalid_parameter_handler)) + GetProcAddress (hmsv, "_set_invalid_parameter_handler"); + if (fIPH) + (*fIPH)(__mingw_invalidParameterHandler); +} diff --git a/lib/sdk/crt/startup/dll_argv.c b/lib/sdk/crt/startup/dll_argv.c new file mode 100644 index 00000000000..06abb8dfddf --- /dev/null +++ b/lib/sdk/crt/startup/dll_argv.c @@ -0,0 +1,25 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifdef CRTDLL +#undef CRTDLL +#endif + +#include + +extern int _dowildcard; + +#ifdef WPRFLAG +int __CRTDECL +__wsetargv (void) +#else +int __CRTDECL +__setargv (void) +#endif +{ + _dowildcard = 1; + return 0; +} diff --git a/lib/sdk/crt/startup/dllargv.c b/lib/sdk/crt/startup/dllargv.c new file mode 100644 index 00000000000..769b8353685 --- /dev/null +++ b/lib/sdk/crt/startup/dllargv.c @@ -0,0 +1,22 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifdef CRTDLL +#undef CRTDLL +#endif + +#include + +#ifdef WPRFLAG +int __CRTDECL +_wsetargv (void) +#else +int __CRTDECL +_setargv (void) +#endif +{ + return 0; +} diff --git a/lib/sdk/crt/startup/dllentry.c b/lib/sdk/crt/startup/dllentry.c new file mode 100644 index 00000000000..d2ed1b57315 --- /dev/null +++ b/lib/sdk/crt/startup/dllentry.c @@ -0,0 +1,18 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#define _DECL_DLLMAIN +#include + +BOOL WINAPI DllEntryPoint (HANDLE, DWORD, LPVOID); + +BOOL WINAPI DllEntryPoint (HANDLE __UNUSED_PARAM(hDllHandle), + DWORD __UNUSED_PARAM(dwReason), + LPVOID __UNUSED_PARAM(lpreserved)) +{ + return TRUE; +} diff --git a/lib/sdk/crt/startup/gccmain.c b/lib/sdk/crt/startup/gccmain.c new file mode 100644 index 00000000000..a0e0483ff72 --- /dev/null +++ b/lib/sdk/crt/startup/gccmain.c @@ -0,0 +1,60 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include +#include + +typedef void (*func_ptr) (void); +extern func_ptr __CTOR_LIST__[]; +extern func_ptr __DTOR_LIST__[]; + +void __do_global_dtors (void); +void __do_global_ctors (void); +void __main (void); + +void +__do_global_dtors (void) +{ + static func_ptr *p = __DTOR_LIST__ + 1; + + while (*p) + { + (*(p)) (); + p++; + } +} + +void +__do_global_ctors (void) +{ + unsigned long nptrs = (unsigned long) (ptrdiff_t) __CTOR_LIST__[0]; + unsigned long i; + + if (nptrs == (unsigned long) -1) + { + for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++); + } + + for (i = nptrs; i >= 1; i--) + { + __CTOR_LIST__[i] (); + } + + atexit (__do_global_dtors); +} + +static int initialized = 0; + +void +__main (void) +{ + if (!initialized) + { + initialized = 1; + __do_global_ctors (); + } +} diff --git a/lib/sdk/crt/startup/gs_support.c b/lib/sdk/crt/startup/gs_support.c new file mode 100644 index 00000000000..8151fc3b542 --- /dev/null +++ b/lib/sdk/crt/startup/gs_support.c @@ -0,0 +1,147 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#define WIN32_NO_STATUS +#include /* abort () */ +#include +#undef WIN32_NO_STATUS +#include /* STATUS macros */ +#ifdef _WIN64 +#include +#endif + +#ifdef _WIN64 +#define DEFAULT_SECURITY_COOKIE 0x00002B992DDFA232ll +#else +#define DEFAULT_SECURITY_COOKIE 0xBB40E64E +#endif + +/* Externals. */ + +typedef LONG NTSTATUS; /* same as in ntdef.h / winternl.h */ + +#define UNW_FLAG_NHANDLER 0x00 + +typedef union +{ + unsigned __int64 ft_scalar; + FILETIME ft_struct; +} FT; + +static EXCEPTION_RECORD GS_ExceptionRecord; +static CONTEXT GS_ContextRecord; + +static const EXCEPTION_POINTERS GS_ExceptionPointers = { + &GS_ExceptionRecord,&GS_ContextRecord +}; + +DECLSPEC_SELECTANY UINT_PTR __security_cookie = DEFAULT_SECURITY_COOKIE; +DECLSPEC_SELECTANY UINT_PTR __security_cookie_complement = ~(DEFAULT_SECURITY_COOKIE); + +void __cdecl __security_init_cookie (void); + +void __cdecl +__security_init_cookie (void) +{ + UINT_PTR cookie; + FT systime = { 0, }; + LARGE_INTEGER perfctr; + + if (__security_cookie != DEFAULT_SECURITY_COOKIE) + { + __security_cookie_complement = ~__security_cookie; + return; + } + + GetSystemTimeAsFileTime (&systime.ft_struct); +#ifdef _WIN64 + cookie = systime.ft_scalar; +#else + cookie = systime.ft_struct.dwLowDateTime; + cookie ^= systime.ft_struct.dwHighDateTime; +#endif + + cookie ^= GetCurrentProcessId (); + cookie ^= GetCurrentThreadId (); + cookie ^= GetTickCount (); + + QueryPerformanceCounter (&perfctr); +#ifdef _WIN64 + cookie ^= perfctr.QuadPart; +#else + cookie ^= perfctr.LowPart; + cookie ^= perfctr.HighPart; +#endif + +#ifdef _WIN64 + cookie &= 0x0000ffffffffffffll; +#endif + + if (cookie == DEFAULT_SECURITY_COOKIE) + cookie = DEFAULT_SECURITY_COOKIE + 1; + __security_cookie = cookie; + __security_cookie_complement = ~cookie; +} + + +#if defined(__GNUC__) /* wrap msvc intrinsics onto gcc builtins */ +#undef _ReturnAddress +#undef _AddressOfReturnAddress +#define _ReturnAddress() __builtin_return_address(0) +#define _AddressOfReturnAddress() __builtin_frame_address (0) +#endif /* __GNUC__ */ + +__declspec(noreturn) void __cdecl __report_gsfailure (ULONGLONG); + +__declspec(noreturn) void __cdecl +__report_gsfailure (ULONGLONG StackCookie) +{ + volatile UINT_PTR cookie[2] __MINGW_ATTRIB_UNUSED; +#ifdef _WIN64 + ULONG64 controlPC, imgBase, establisherFrame; + PRUNTIME_FUNCTION fctEntry; + PVOID hndData; + + RtlCaptureContext (&GS_ContextRecord); + controlPC = GS_ContextRecord.Rip; + fctEntry = RtlLookupFunctionEntry (controlPC, &imgBase, NULL); + if (fctEntry != NULL) + { + RtlVirtualUnwind (UNW_FLAG_NHANDLER, imgBase, controlPC, fctEntry, + &GS_ContextRecord, &hndData, &establisherFrame, NULL); + } + else +#endif /* _WIN64 */ + { +#ifdef _WIN64 + GS_ContextRecord.Rip = (ULONGLONG) _ReturnAddress(); + GS_ContextRecord.Rsp = (ULONGLONG) _AddressOfReturnAddress() + 8; +#else + GS_ContextRecord.Eip = (DWORD) _ReturnAddress(); + GS_ContextRecord.Esp = (DWORD) _AddressOfReturnAddress() + 4; +#endif /* _WIN64 */ + } + +#ifdef _WIN64 + GS_ExceptionRecord.ExceptionAddress = (PVOID) GS_ContextRecord.Rip; + GS_ContextRecord.Rcx = StackCookie; +#else + GS_ExceptionRecord.ExceptionAddress = (PVOID) GS_ContextRecord.Eip; + GS_ContextRecord.Ecx = StackCookie; +#endif /* _WIN64 */ + GS_ExceptionRecord.ExceptionCode = STATUS_STACK_BUFFER_OVERRUN; + GS_ExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE; + cookie[0] = __security_cookie; + cookie[1] = __security_cookie_complement; + SetUnhandledExceptionFilter (NULL); + UnhandledExceptionFilter ((EXCEPTION_POINTERS *) &GS_ExceptionPointers); + TerminateProcess (GetCurrentProcess (), STATUS_STACK_BUFFER_OVERRUN); + abort(); +} + diff --git a/lib/sdk/crt/startup/merr.c b/lib/sdk/crt/startup/merr.c new file mode 100644 index 00000000000..2728cdbcf6d --- /dev/null +++ b/lib/sdk/crt/startup/merr.c @@ -0,0 +1,78 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include +#include + +int __defaultmatherr = 0; + +typedef int (__cdecl *fUserMathErr)(struct _exception *); +static fUserMathErr stUserMathErr; + +void __mingw_raise_matherr (int typ, const char *name, double a1, double a2, + double rslt) +{ + struct _exception ex; + if (!stUserMathErr) + return; + ex.type = typ; + ex.name = name; + ex.arg1 = a1; + ex.arg2 = a2; + ex.retval = rslt; + (*stUserMathErr)(&ex); +} + +#undef __setusermatherr + +void __mingw_setusermatherr (int (__cdecl *f)(struct _exception *)) +{ + stUserMathErr = f; + __setusermatherr (f); +} + +int __CRTDECL +_matherr (struct _exception *pexcept) +{ + const char * type; + + switch(pexcept->type) + { + case _DOMAIN: + type = "Argument domain error (DOMAIN)"; + break; + + case _SING: + type = "Argument singularity (SIGN)"; + break; + + case _OVERFLOW: + type = "Overflow range error (OVERFLOW)"; + break; + + case _PLOSS: + type = "Partial loss of significance (PLOSS)"; + break; + + case _TLOSS: + type = "Total loss of significance (TLOSS)"; + break; + + case _UNDERFLOW: + type = "The result is too small to be represented (UNDERFLOW)"; + break; + + default: + type = "Unknown error"; + break; + } + + fprintf(stderr, "_matherr(): %s in %s(%g, %g) (retval=%g)\n", + type, pexcept->name, pexcept->arg1, pexcept->arg2, pexcept->retval); + return 0; +} + diff --git a/lib/sdk/crt/startup/mingw_helpers.c b/lib/sdk/crt/startup/mingw_helpers.c new file mode 100644 index 00000000000..b1bafd35653 --- /dev/null +++ b/lib/sdk/crt/startup/mingw_helpers.c @@ -0,0 +1,31 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback; + +void * __cdecl +_decode_pointer (void *codedptr) +{ + return (void *) codedptr; +} + +void * __cdecl +_encode_pointer (void *ptr) +{ + return ptr; +} + +/* 0:console, 1:windows. */ +int mingw_app_type = 0; diff --git a/lib/sdk/crt/startup/mscmain.c b/lib/sdk/crt/startup/mscmain.c new file mode 100644 index 00000000000..361d04a7691 --- /dev/null +++ b/lib/sdk/crt/startup/mscmain.c @@ -0,0 +1,43 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include + +int _fltused; + +void +__do_global_dtors (void) +{ + +} + +void +__do_global_ctors (void) +{ + +} + +BOOL +WINAPI +_CRT_INIT0(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) +{ + return TRUE; +} + +static int initialized = 0; + +void +__main (void) +{ + if (!initialized) + { + initialized = 1; + __do_global_ctors (); + } +} + + diff --git a/lib/sdk/crt/startup/natstart.c b/lib/sdk/crt/startup/natstart.c new file mode 100644 index 00000000000..1122d19f3de --- /dev/null +++ b/lib/sdk/crt/startup/natstart.c @@ -0,0 +1,14 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include + +_PGLOBAL +volatile unsigned int __native_dllmain_reason = UINT_MAX; +volatile unsigned int __native_vcclrit_reason = UINT_MAX; +volatile __enative_startup_state __native_startup_state; +volatile void *__native_startup_lock; diff --git a/lib/sdk/crt/startup/pesect.c b/lib/sdk/crt/startup/pesect.c new file mode 100644 index 00000000000..c24061fbe61 --- /dev/null +++ b/lib/sdk/crt/startup/pesect.c @@ -0,0 +1,186 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include +#include + +#if defined (_WIN64) && defined (__ia64__) +#error FIXME: Unsupported __ImageBase implementation. +#else +/* Hack, for bug in ld. Will be removed soon. */ +#ifndef _MSC_VER +#define __ImageBase __MINGW_LSYMBOL(_image_base__) +#endif +/* This symbol is defined by the linker. */ +extern IMAGE_DOS_HEADER __ImageBase; +#endif + +WINBOOL _ValidateImageBase (PBYTE); + +WINBOOL +_ValidateImageBase (PBYTE pImageBase) +{ + PIMAGE_DOS_HEADER pDOSHeader; + PIMAGE_NT_HEADERS pNTHeader; + PIMAGE_OPTIONAL_HEADER pOptHeader; + + pDOSHeader = (PIMAGE_DOS_HEADER) pImageBase; + if (pDOSHeader->e_magic != IMAGE_DOS_SIGNATURE) + return FALSE; + pNTHeader = (PIMAGE_NT_HEADERS) ((PBYTE) pDOSHeader + pDOSHeader->e_lfanew); + if (pNTHeader->Signature != IMAGE_NT_SIGNATURE) + return FALSE; + pOptHeader = (PIMAGE_OPTIONAL_HEADER) &pNTHeader->OptionalHeader; + if (pOptHeader->Magic != IMAGE_NT_OPTIONAL_HDR_MAGIC) + return FALSE; + return TRUE; +} + +PIMAGE_SECTION_HEADER _FindPESection (PBYTE, DWORD_PTR); + +PIMAGE_SECTION_HEADER +_FindPESection (PBYTE pImageBase, DWORD_PTR rva) +{ + PIMAGE_NT_HEADERS pNTHeader; + PIMAGE_SECTION_HEADER pSection; + unsigned int iSection; + + pNTHeader = (PIMAGE_NT_HEADERS) (pImageBase + ((PIMAGE_DOS_HEADER) pImageBase)->e_lfanew); + + for (iSection = 0, pSection = IMAGE_FIRST_SECTION (pNTHeader); + iSection < pNTHeader->FileHeader.NumberOfSections; + ++iSection,++pSection) + { + if (rva >= pSection->VirtualAddress + && rva < pSection->VirtualAddress + pSection->Misc.VirtualSize) + return pSection; + } + return NULL; +} + +PIMAGE_SECTION_HEADER _FindPESectionByName (const char *); + +PIMAGE_SECTION_HEADER +_FindPESectionByName (const char *pName) +{ + PBYTE pImageBase; + PIMAGE_NT_HEADERS pNTHeader; + PIMAGE_SECTION_HEADER pSection; + unsigned int iSection; + + /* Long names aren't supported. */ + if (strlen (pName) > IMAGE_SIZEOF_SHORT_NAME) + return NULL; + + pImageBase = (PBYTE) &__ImageBase; + if (! _ValidateImageBase (pImageBase)) + return NULL; + + pNTHeader = (PIMAGE_NT_HEADERS) (pImageBase + ((PIMAGE_DOS_HEADER) pImageBase)->e_lfanew); + + for (iSection = 0, pSection = IMAGE_FIRST_SECTION (pNTHeader); + iSection < pNTHeader->FileHeader.NumberOfSections; + ++iSection,++pSection) + { + if (!strncmp ((char *) &pSection->Name[0], pName, IMAGE_SIZEOF_SHORT_NAME)) + return pSection; + } + return NULL; +} + +int __mingw_GetSectionCount (void); +PIMAGE_SECTION_HEADER __mingw_GetSectionForAddress (LPVOID p); + +PIMAGE_SECTION_HEADER +__mingw_GetSectionForAddress (LPVOID p) +{ + PBYTE pImageBase; + DWORD_PTR rva; + + pImageBase = (PBYTE) &__ImageBase; + if (! _ValidateImageBase (pImageBase)) + return NULL; + + rva = (DWORD_PTR) (((PBYTE) p) - pImageBase); + return _FindPESection (pImageBase, rva); +} + +int +__mingw_GetSectionCount (void) +{ + PBYTE pImageBase; + PIMAGE_NT_HEADERS pNTHeader; + + pImageBase = (PBYTE) &__ImageBase; + if (! _ValidateImageBase (pImageBase)) + return 0; + + pNTHeader = (PIMAGE_NT_HEADERS) (pImageBase + ((PIMAGE_DOS_HEADER) pImageBase)->e_lfanew); + + return (int) pNTHeader->FileHeader.NumberOfSections; +} + + +PIMAGE_SECTION_HEADER _FindPESectionExec (size_t); + +PIMAGE_SECTION_HEADER +_FindPESectionExec (size_t eNo) +{ + PBYTE pImageBase; + PIMAGE_NT_HEADERS pNTHeader; + PIMAGE_SECTION_HEADER pSection; + unsigned int iSection; + + pImageBase = (PBYTE) &__ImageBase; + if (! _ValidateImageBase (pImageBase)) + return NULL; + + pNTHeader = (PIMAGE_NT_HEADERS) (pImageBase + ((PIMAGE_DOS_HEADER) pImageBase)->e_lfanew); + + for (iSection = 0, pSection = IMAGE_FIRST_SECTION (pNTHeader); + iSection < pNTHeader->FileHeader.NumberOfSections; + ++iSection,++pSection) + { + if ((pSection->Characteristics & IMAGE_SCN_MEM_EXECUTE) != 0) + { + if (!eNo) + return pSection; + --eNo; + } + } + return NULL; +} + +PBYTE _GetPEImageBase (void); + +PBYTE +_GetPEImageBase (void) +{ + PBYTE pImageBase; + pImageBase = (PBYTE) &__ImageBase; + if (! _ValidateImageBase (pImageBase)) + return NULL; + return pImageBase; +} + +WINBOOL _IsNonwritableInCurrentImage (PBYTE); + +WINBOOL +_IsNonwritableInCurrentImage (PBYTE pTarget) +{ + PBYTE pImageBase; + DWORD_PTR rvaTarget; + PIMAGE_SECTION_HEADER pSection; + + pImageBase = (PBYTE) &__ImageBase; + if (! _ValidateImageBase (pImageBase)) + return FALSE; + rvaTarget = pTarget - pImageBase; + pSection = _FindPESection (pImageBase, rvaTarget); + if (pSection == NULL) + return FALSE; + return (pSection->Characteristics & IMAGE_SCN_MEM_WRITE) == 0; +} diff --git a/lib/sdk/crt/startup/pseudo-reloc-list.c b/lib/sdk/crt/startup/pseudo-reloc-list.c new file mode 100644 index 00000000000..4ce46bbb29b --- /dev/null +++ b/lib/sdk/crt/startup/pseudo-reloc-list.c @@ -0,0 +1,8 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +char __RUNTIME_PSEUDO_RELOC_LIST_END__ = 0; +char __RUNTIME_PSEUDO_RELOC_LIST__ = 0; diff --git a/lib/sdk/crt/startup/pseudo-reloc.c b/lib/sdk/crt/startup/pseudo-reloc.c new file mode 100644 index 00000000000..61cc7123176 --- /dev/null +++ b/lib/sdk/crt/startup/pseudo-reloc.c @@ -0,0 +1,473 @@ +/* pseudo-reloc.c + + Contributed by Egor Duda + Modified by addition of runtime_pseudo_reloc version 2 + by Kai Tietz + + THIS SOFTWARE IS NOT COPYRIGHTED + + This source code is offered for use in the public domain. You may + use, modify or distribute it freely. + + This code is distributed in the hope that it will be useful but + WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY + DISCLAMED. This includes but is not limited to warrenties of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#include +#include +#include +#include +#include + +#if defined(__CYGWIN__) +#include +#include +#include +/* copied from winsup.h */ +# define NO_COPY __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy"))) +/* custom status code: */ +#define STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION ((NTSTATUS) 0xe0000269) +#define SHORT_MSG_BUF_SZ 128 +#else +# define NO_COPY +#endif + +#ifdef __GNUC__ +#define ATTRIBUTE_NORETURN __attribute__ ((noreturn)) +#else +#define ATTRIBUTE_NORETURN +#endif + +#ifndef __MINGW_LSYMBOL +#define __MINGW_LSYMBOL(sym) sym +#endif + +extern char __RUNTIME_PSEUDO_RELOC_LIST__; +extern char __RUNTIME_PSEUDO_RELOC_LIST_END__; +#ifndef _MSC_VER +#define __ImageBase __MINGW_LSYMBOL(_image_base__) +#endif +extern char __ImageBase; + +void _pei386_runtime_relocator (void); + +/* v1 relocation is basically: + * *(base + .target) += .addend + * where (base + .target) is always assumed to point + * to a DWORD (4 bytes). + */ +typedef struct { + DWORD addend; + DWORD target; +} runtime_pseudo_reloc_item_v1; + +/* v2 relocation is more complex. In effect, it is + * *(base + .target) += *(base + .sym) - (base + .sym) + * with care taken in both reading, sign extension, and writing + * because .flags may indicate that (base + .target) may point + * to a BYTE, WORD, DWORD, or QWORD (w64). + */ +typedef struct { + DWORD sym; + DWORD target; + DWORD flags; +} runtime_pseudo_reloc_item_v2; + +typedef struct { + DWORD magic1; + DWORD magic2; + DWORD version; +} runtime_pseudo_reloc_v2; + +static void ATTRIBUTE_NORETURN +__report_error (const char *msg, ...) +{ +#ifdef __CYGWIN__ + /* This function is used to print short error messages + * to stderr, which may occur during DLL initialization + * while fixing up 'pseudo' relocations. This early, we + * may not be able to use cygwin stdio functions, so we + * use the win32 WriteFile api. This should work with both + * normal win32 console IO handles, redirected ones, and + * cygwin ptys. + */ + char buf[SHORT_MSG_BUF_SZ]; + wchar_t module[MAX_PATH]; + char * posix_module = NULL; + static const char UNKNOWN_MODULE[] = ": "; + static const size_t UNKNOWN_MODULE_LEN = sizeof (UNKNOWN_MODULE) - 1; + static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: "; + static const size_t CYGWIN_FAILURE_MSG_LEN = sizeof (CYGWIN_FAILURE_MSG) - 1; + DWORD len; + DWORD done; + va_list args; + HANDLE errh = GetStdHandle (STD_ERROR_HANDLE); + ssize_t modulelen = GetModuleFileNameW (NULL, module, sizeof (module)); + + if (errh == INVALID_HANDLE_VALUE) + cygwin_internal (CW_EXIT_PROCESS, + STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION, + 1); + + if (modulelen > 0) + posix_module = cygwin_create_path (CCP_WIN_W_TO_POSIX, module); + + va_start (args, msg); + len = (DWORD) vsnprintf (buf, SHORT_MSG_BUF_SZ, msg, args); + va_end (args); + buf[SHORT_MSG_BUF_SZ-1] = '\0'; /* paranoia */ + + if (posix_module) + { + WriteFile (errh, (PCVOID)CYGWIN_FAILURE_MSG, + CYGWIN_FAILURE_MSG_LEN, &done, NULL); + WriteFile (errh, (PCVOID)posix_module, + strlen(posix_module), &done, NULL); + WriteFile (errh, (PCVOID)": ", 2, &done, NULL); + WriteFile (errh, (PCVOID)buf, len, &done, NULL); + free (posix_module); + } + else + { + WriteFile (errh, (PCVOID)CYGWIN_FAILURE_MSG, + CYGWIN_FAILURE_MSG_LEN, &done, NULL); + WriteFile (errh, (PCVOID)UNKNOWN_MODULE, + UNKNOWN_MODULE_LEN, &done, NULL); + WriteFile (errh, (PCVOID)buf, len, &done, NULL); + } + WriteFile (errh, (PCVOID)"\n", 1, &done, NULL); + + cygwin_internal (CW_EXIT_PROCESS, + STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION, + 1); + /* not reached, but silences noreturn warning */ + abort (); +#else + va_list argp; + va_start (argp, msg); +# ifdef __MINGW64_VERSION_MAJOR + fprintf (stderr, "Mingw-w64 runtime failure:\n"); +# else + fprintf (stderr, "Mingw runtime failure:\n"); +# endif + vfprintf (stderr, msg, argp); + va_end (argp); + abort (); +#endif +} + +/* For mingw-w64 we have additional helpers to get image information + on runtime. This allows us to cache for pseudo-relocation pass + the temporary access of code/read-only sections. + This step speeds up pseudo-relocation pass. */ +#ifdef __MINGW64_VERSION_MAJOR +extern int __mingw_GetSectionCount (void); +extern PIMAGE_SECTION_HEADER __mingw_GetSectionForAddress (LPVOID p); +extern PBYTE _GetPEImageBase (void); + +typedef struct sSecInfo { + /* Keeps altered section flags, or zero if nothing was changed. */ + DWORD old_protect; + PBYTE sec_start; + PIMAGE_SECTION_HEADER hash; +} sSecInfo; + +static sSecInfo *the_secs = NULL; +static int maxSections = 0; + +static void +mark_section_writable (LPVOID addr) +{ + MEMORY_BASIC_INFORMATION b; + PIMAGE_SECTION_HEADER h; + int i; + + for (i = 0; i < maxSections; i++) + { + if (the_secs[i].sec_start <= ((LPBYTE) addr) + && ((LPBYTE) addr) < (the_secs[i].sec_start + the_secs[i].hash->Misc.VirtualSize)) + return; + } + h = __mingw_GetSectionForAddress (addr); + if (!h) + { + __report_error ("Address %p has no image-section", addr); + return; + } + the_secs[i].hash = h; + the_secs[i].old_protect = 0; + the_secs[i].sec_start = _GetPEImageBase () + h->VirtualAddress; + + if (!VirtualQuery (the_secs[i].sec_start, &b, sizeof(b))) + { + __report_error (" VirtualQuery failed for %d bytes at address %p", + (int) h->Misc.VirtualSize, the_secs[i].sec_start); + return; + } + + if (b.Protect != PAGE_EXECUTE_READWRITE && b.Protect != PAGE_READWRITE) + VirtualProtect (b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, + &the_secs[i].old_protect); + ++maxSections; + return; +} + +static void +restore_modified_sections (void) +{ + int i; + MEMORY_BASIC_INFORMATION b; + DWORD oldprot; + + for (i = 0; i < maxSections; i++) + { + if (the_secs[i].old_protect == 0) + continue; + if (!VirtualQuery (the_secs[i].sec_start, &b, sizeof(b))) + { + __report_error (" VirtualQuery failed for %d bytes at address %p", + (int) the_secs[i].hash->Misc.VirtualSize, + the_secs[i].sec_start); + return; + } + VirtualProtect (b.BaseAddress, b.RegionSize, the_secs[i].old_protect, + &oldprot); + } +} + +#endif /* __MINGW64_VERSION_MAJOR */ + +/* This function temporarily marks the page containing addr + * writable, before copying len bytes from *src to *addr, and + * then restores the original protection settings to the page. + * + * Using this function eliminates the requirement with older + * pseudo-reloc implementations, that sections containing + * pseudo-relocs (such as .text and .rdata) be permanently + * marked writable. This older behavior sabotaged any memory + * savings achieved by shared libraries on win32 -- and was + * slower, too. However, on cygwin as of binutils 2.20 the + * .text section is still marked writable, and the .rdata section + * is folded into the (writable) .data when --enable-auto-import. + */ +static void +__write_memory (void *addr, const void *src, size_t len) +{ +#ifndef __MINGW64_VERSION_MAJOR + MEMORY_BASIC_INFORMATION b; + DWORD oldprot; +#endif /* ! __MINGW64_VERSION_MAJOR */ + + if (!len) + return; + +#ifndef __MINGW64_VERSION_MAJOR + if (!VirtualQuery (addr, &b, sizeof(b))) + { + __report_error (" VirtualQuery failed for %d bytes at address %p", + (int) sizeof(b), addr); + } + + /* Temporarily allow write access to read-only protected memory. */ + if (b.Protect != PAGE_EXECUTE_READWRITE && b.Protect != PAGE_READWRITE) + VirtualProtect (b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, + &oldprot); +#else /* ! __MINGW64_VERSION_MAJOR */ + mark_section_writable ((LPVOID) addr); +#endif /* __MINGW64_VERSION_MAJOR */ + + /* write the data. */ + memcpy (addr, src, len); + /* Restore original protection. */ +#ifndef __MINGW64_VERSION_MAJOR + if (b.Protect != PAGE_EXECUTE_READWRITE && b.Protect != PAGE_READWRITE) + VirtualProtect (b.BaseAddress, b.RegionSize, oldprot, &oldprot); +#endif /* !__MINGW64_VERSION_MAJOR */ +} + +#define RP_VERSION_V1 0 +#define RP_VERSION_V2 1 + +static void +do_pseudo_reloc (void * start, void * end, void * base) +{ + ptrdiff_t addr_imp, reldata; + ptrdiff_t reloc_target = (ptrdiff_t) ((char *)end - (char*)start); + runtime_pseudo_reloc_v2 *v2_hdr = (runtime_pseudo_reloc_v2 *) start; + runtime_pseudo_reloc_item_v2 *r; + + /* A valid relocation list will contain at least one entry, and + * one v1 data structure (the smallest one) requires two DWORDs. + * So, if the relocation list is smaller than 8 bytes, bail. + */ + if (reloc_target < 8) + return; + + /* Check if this is the old pseudo relocation version. */ + /* There are two kinds of v1 relocation lists: + * 1) With a (v2-style) version header. In this case, the + * first entry in the list is a 3-DWORD structure, with + * value: + * { 0, 0, RP_VERSION_V1 } + * In this case, we skip to the next entry in the list, + * knowing that all elements after the head item can + * be cast to runtime_pseudo_reloc_item_v1. + * 2) Without a (v2-style) version header. In this case, the + * first element in the list IS an actual v1 relocation + * record, which is two DWORDs. Because there will never + * be a case where a v1 relocation record has both + * addend == 0 and target == 0, this case will not be + * confused with the prior one. + * All current binutils, when generating a v1 relocation list, + * use the second (e.g. original) form -- that is, without the + * v2-style version header. + */ + if (reloc_target >= 12 + && v2_hdr->magic1 == 0 && v2_hdr->magic2 == 0 + && v2_hdr->version == RP_VERSION_V1) + { + /* We have a list header item indicating that the rest + * of the list contains v1 entries. Move the pointer to + * the first true v1 relocation record. By definition, + * that v1 element will not have both addend == 0 and + * target == 0 (and thus, when interpreted as a + * runtime_pseudo_reloc_v2, it will not have both + * magic1 == 0 and magic2 == 0). + */ + v2_hdr++; + } + + if (v2_hdr->magic1 != 0 || v2_hdr->magic2 != 0) + { + /************************* + * Handle v1 relocations * + *************************/ + runtime_pseudo_reloc_item_v1 * o; + for (o = (runtime_pseudo_reloc_item_v1 *) v2_hdr; + o < (runtime_pseudo_reloc_item_v1 *)end; + o++) + { + DWORD newval; + reloc_target = (ptrdiff_t) base + o->target; + newval = (*((DWORD*) reloc_target)) + o->addend; + __write_memory ((void *) reloc_target, &newval, sizeof(DWORD)); + } + return; + } + + /* If we got this far, then we have relocations of version 2 or newer */ + + /* Check if this is a known version. */ + if (v2_hdr->version != RP_VERSION_V2) + { + __report_error (" Unknown pseudo relocation protocol version %d.\n", + (int) v2_hdr->version); + return; + } + + /************************* + * Handle v2 relocations * + *************************/ + + /* Walk over header. */ + r = (runtime_pseudo_reloc_item_v2 *) &v2_hdr[1]; + + for (; r < (runtime_pseudo_reloc_item_v2 *) end; r++) + { + /* location where new address will be written */ + reloc_target = (ptrdiff_t) base + r->target; + + /* get sym pointer. It points either to the iat entry + * of the referenced element, or to the stub function. + */ + addr_imp = (ptrdiff_t) base + r->sym; + addr_imp = *((ptrdiff_t *) addr_imp); + + /* read existing relocation value from image, casting to the + * bitsize indicated by the 8 LSBs of flags. If the value is + * negative, manually sign-extend to ptrdiff_t width. Raise an + * error if the bitsize indicated by the 8 LSBs of flags is not + * supported. + */ + switch ((r->flags & 0xff)) + { + case 8: + reldata = (ptrdiff_t) (*((unsigned char *)reloc_target)); + if ((reldata & 0x80) != 0) + reldata |= ~((ptrdiff_t) 0xff); + break; + case 16: + reldata = (ptrdiff_t) (*((unsigned short *)reloc_target)); + if ((reldata & 0x8000) != 0) + reldata |= ~((ptrdiff_t) 0xffff); + break; + case 32: + reldata = (ptrdiff_t) (*((unsigned int *)reloc_target)); +#ifdef _WIN64 + if ((reldata & 0x80000000) != 0) + reldata |= ~((ptrdiff_t) 0xffffffff); +#endif + break; +#ifdef _WIN64 + case 64: + reldata = (ptrdiff_t) (*((unsigned long long *)reloc_target)); + break; +#endif + default: + reldata=0; + __report_error (" Unknown pseudo relocation bit size %d.\n", + (int) (r->flags & 0xff)); + break; + } + + /* Adjust the relocation value */ + reldata -= ((ptrdiff_t) base + r->sym); + reldata += addr_imp; + + /* Write the new relocation value back to *reloc_target */ + switch ((r->flags & 0xff)) + { + case 8: + __write_memory ((void *) reloc_target, &reldata, 1); + break; + case 16: + __write_memory ((void *) reloc_target, &reldata, 2); + break; + case 32: + __write_memory ((void *) reloc_target, &reldata, 4); + break; +#ifdef _WIN64 + case 64: + __write_memory ((void *) reloc_target, &reldata, 8); + break; +#endif + } + } +} + +void +_pei386_runtime_relocator (void) +{ + static NO_COPY int was_init = 0; +#ifdef __MINGW64_VERSION_MAJOR + int mSecs; +#endif /* __MINGW64_VERSION_MAJOR */ + + if (was_init) + return; + ++was_init; +#ifdef __MINGW64_VERSION_MAJOR + mSecs = __mingw_GetSectionCount (); + the_secs = (sSecInfo *) alloca (sizeof (sSecInfo) * (size_t) mSecs); + maxSections = 0; +#endif /* __MINGW64_VERSION_MAJOR */ + + do_pseudo_reloc (&__RUNTIME_PSEUDO_RELOC_LIST__, + &__RUNTIME_PSEUDO_RELOC_LIST_END__, + &__MINGW_LSYMBOL(_image_base__)); +#ifdef __MINGW64_VERSION_MAJOR + restore_modified_sections (); +#endif /* __MINGW64_VERSION_MAJOR */ +} diff --git a/lib/sdk/crt/startup/tlsmcrt.c b/lib/sdk/crt/startup/tlsmcrt.c new file mode 100644 index 00000000000..c5c01d9b8a6 --- /dev/null +++ b/lib/sdk/crt/startup/tlsmcrt.c @@ -0,0 +1,44 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + * + * Written by Kai Tietz + */ + +/* We support TLS cleanup code in any case. If shared version of libgcc is used _CRT_MT has value 1, + otherwise + we do tls cleanup in runtime and _CRT_MT has value 2. */ +int _CRT_MT = 2; + +// HACK around broken imports from libmingwex, until RosBE64 is updated +#ifdef _M_AMD64 + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +int __mingwthr_key_dtor (DWORD key, void (*dtor)(void *)); +int __mingwthr_remove_key_dtor (DWORD key); + +extern int ___w64_mingwthr_remove_key_dtor (DWORD key); +extern int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *)); + +int +__mingwthr_remove_key_dtor (DWORD key) +{ + return ___w64_mingwthr_remove_key_dtor (key); +} + +int +__mingwthr_key_dtor (DWORD key, void (*dtor)(void *)) +{ + if (dtor) + return ___w64_mingwthr_add_key_dtor (key, dtor); + + return 0; +} +#endif + diff --git a/lib/sdk/crt/startup/tlsmthread.c b/lib/sdk/crt/startup/tlsmthread.c new file mode 100644 index 00000000000..c018abfd21e --- /dev/null +++ b/lib/sdk/crt/startup/tlsmthread.c @@ -0,0 +1,59 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + * + * Written by Kai Tietz + */ +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +int __mingwthr_key_dtor (DWORD key, void (*dtor)(void *)); +int __mingwthr_remove_key_dtor (DWORD key); + +extern int ___w64_mingwthr_remove_key_dtor (DWORD key); +extern int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *)); + + +#ifndef _WIN64 +#define MINGWM10_DLL "mingwm10.dll" +typedef int (*fMTRemoveKeyDtor)(DWORD key); +typedef int (*fMTKeyDtor)(DWORD key, void (*dtor)(void *)); +extern fMTRemoveKeyDtor __mingw_gMTRemoveKeyDtor; +extern fMTKeyDtor __mingw_gMTKeyDtor; +extern int __mingw_usemthread_dll; +#endif + +int +__mingwthr_remove_key_dtor (DWORD key) +{ +#ifndef _WIN64 + if (!__mingw_usemthread_dll) +#endif + return ___w64_mingwthr_remove_key_dtor (key); +#ifndef _WIN64 + if (__mingw_gMTRemoveKeyDtor) + return (*__mingw_gMTRemoveKeyDtor) (key); + return 0; +#endif +} + +int +__mingwthr_key_dtor (DWORD key, void (*dtor)(void *)) +{ + if (dtor) + { +#ifndef _WIN64 + if (!__mingw_usemthread_dll) +#endif + return ___w64_mingwthr_add_key_dtor (key, dtor); +#ifndef _WIN64 + if (__mingw_gMTKeyDtor) + return (*__mingw_gMTKeyDtor) (key, dtor); +#endif + } + return 0; +} diff --git a/lib/sdk/crt/startup/tlssup.c b/lib/sdk/crt/startup/tlssup.c new file mode 100644 index 00000000000..3a0e63518d0 --- /dev/null +++ b/lib/sdk/crt/startup/tlssup.c @@ -0,0 +1,215 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + * + * Written by Kai Tietz + */ + +#ifdef CRTDLL +#undef CRTDLL +#endif + +#include + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +#include +#include +#include +#ifndef _WIN64 +#include /* for _winmajor */ +#endif + +#ifndef __INTERNAL_FUNC_DEFINED +#define __INTERNAL_FUNC_DEFINED +typedef void (__cdecl *_PVFV)(void); +typedef int (__cdecl *_PIFV)(void); +typedef void (__cdecl *_PVFI)(int); +#endif + +extern WINBOOL __mingw_TLScallback (HANDLE hDllHandle, DWORD reason, LPVOID reserved); + +#define FUNCS_PER_NODE 30 + +typedef struct TlsDtorNode { + int count; + struct TlsDtorNode *next; + _PVFV funcs[FUNCS_PER_NODE]; +} TlsDtorNode; + +ULONG _tls_index = 0; + +/* TLS raw template data start and end. */ +_CRTALLOC(".tls$AAA") char _tls_start = 0; +_CRTALLOC(".tls$ZZZ") char _tls_end = 0; + +_CRTALLOC(".CRT$XLA") PIMAGE_TLS_CALLBACK __xl_a = 0; +_CRTALLOC(".CRT$XLZ") PIMAGE_TLS_CALLBACK __xl_z = 0; + +_CRTALLOC(".tls") const IMAGE_TLS_DIRECTORY _tls_used = { + (ULONG_PTR) &_tls_start+1, (ULONG_PTR) &_tls_end, + (ULONG_PTR) &_tls_index, (ULONG_PTR) (&__xl_a+1), + (ULONG) 0, (ULONG) 0 +}; + +#ifndef __CRT_THREAD +#ifdef HAVE_ATTRIBUTE_THREAD +#define __CRT_THREAD __declspec(thread) +#else +#define __CRT_THREAD __thread +#endif +#endif + +#define DISABLE_MS_TLS 1 + +static _CRTALLOC(".CRT$XDA") _PVFV __xd_a = 0; +static _CRTALLOC(".CRT$XDZ") _PVFV __xd_z = 0; + +#if !defined (DISABLE_MS_TLS) +static __CRT_THREAD TlsDtorNode *dtor_list; +static __CRT_THREAD TlsDtorNode dtor_list_head; +#endif + +extern int _CRT_MT; + +#ifndef _WIN64 +#define MINGWM10_DLL "mingwm10.dll" +typedef int (*fMTRemoveKeyDtor)(DWORD key); +typedef int (*fMTKeyDtor)(DWORD key, void (*dtor)(void *)); +fMTRemoveKeyDtor __mingw_gMTRemoveKeyDtor; +fMTKeyDtor __mingw_gMTKeyDtor; +int __mingw_usemthread_dll; +static HANDLE __mingw_mthread_hdll; +#endif + +BOOL WINAPI __dyn_tls_init (HANDLE, DWORD, LPVOID); + +BOOL WINAPI +__dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) +{ + _PVFV *pfunc; + uintptr_t ps; + +#ifndef _WIN64 + if (_winmajor < 4) + { + __mingw_usemthread_dll = 1; + __mingw_mthread_hdll = LoadLibrary (MINGWM10_DLL); + if (__mingw_mthread_hdll != NULL) + { + __mingw_gMTRemoveKeyDtor = (fMTRemoveKeyDtor) GetProcAddress (__mingw_mthread_hdll, "__mingwthr_remove_key_dtor"); + __mingw_gMTKeyDtor = (fMTKeyDtor) GetProcAddress (__mingw_mthread_hdll, "__mingwthr_key_dtor"); + } + if (__mingw_mthread_hdll == NULL || !__mingw_gMTRemoveKeyDtor || !__mingw_gMTKeyDtor) + { + __mingw_gMTKeyDtor = NULL; + __mingw_gMTRemoveKeyDtor = NULL; + if (__mingw_mthread_hdll) + FreeLibrary (__mingw_mthread_hdll); + __mingw_mthread_hdll = NULL; + _CRT_MT = 0; + return TRUE; + } + _CRT_MT = 1; + return TRUE; + } +#endif + /* We don't let us trick here. */ + if (_CRT_MT != 2) + _CRT_MT = 2; + + if (dwReason != DLL_THREAD_ATTACH) + { + if (dwReason == DLL_PROCESS_ATTACH) + __mingw_TLScallback (hDllHandle, dwReason, lpreserved); + return TRUE; + } + + ps = (uintptr_t) &__xd_a; + ps += sizeof (uintptr_t); + for ( ; ps != (uintptr_t) &__xd_z; ps += sizeof (uintptr_t)) + { + pfunc = (_PVFV *) ps; + if (*pfunc != NULL) + (*pfunc)(); + } + return TRUE; +} + +const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback = (const PIMAGE_TLS_CALLBACK) __dyn_tls_init; +_CRTALLOC(".CRT$XLC") PIMAGE_TLS_CALLBACK __xl_c = (PIMAGE_TLS_CALLBACK) __dyn_tls_init; + +int __cdecl __tlregdtor (_PVFV); + +int __cdecl +__tlregdtor (_PVFV func) +{ + if (!func) + return 0; +#if !defined (DISABLE_MS_TLS) + if (dtor_list == NULL) + { + dtor_list = &dtor_list_head; + dtor_list_head.count = 0; + } + else if (dtor_list->count == FUNCS_PER_NODE) + { + TlsDtorNode *pnode = (TlsDtorNode *) malloc (sizeof (TlsDtorNode)); + if (pnode == NULL) + return -1; + pnode->count = 0; + pnode->next = dtor_list; + dtor_list = pnode; + + dtor_list->count = 0; + } + dtor_list->funcs[dtor_list->count++] = func; +#endif + return 0; +} + +static BOOL WINAPI +__dyn_tls_dtor (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) +{ +#if !defined (DISABLE_MS_TLS) + TlsDtorNode *pnode, *pnext; + int i; +#endif + + if (dwReason != DLL_THREAD_DETACH && dwReason != DLL_PROCESS_DETACH) + return TRUE; + /* As TLS variables are detroyed already by DLL_THREAD_DETACH + call, we have to avoid access on the possible DLL_PROCESS_DETACH + call the already destroyed TLS vars. + TODO: The used local thread based variables have to be handled + manually, so that we can control their lifetime here. */ +#if !defined (DISABLE_MS_TLS) + if (dwReason != DLL_PROCESS_DETACH) + { + for (pnode = dtor_list; pnode != NULL; pnode = pnext) + { + for (i = pnode->count - 1; i >= 0; --i) + { + if (pnode->funcs[i] != NULL) + (*pnode->funcs[i])(); + } + pnext = pnode->next; + if (pnext != NULL) + free ((void *) pnode); + } + } +#endif + __mingw_TLScallback (hDllHandle, dwReason, lpreserved); + return TRUE; +} + +_CRTALLOC(".CRT$XLD") PIMAGE_TLS_CALLBACK __xl_d = (PIMAGE_TLS_CALLBACK) __dyn_tls_dtor; + + +int mingw_initltsdrot_force = 0; +int mingw_initltsdyn_force = 0; +int mingw_initltssuo_force = 0; diff --git a/lib/sdk/crt/startup/tlsthrd.c b/lib/sdk/crt/startup/tlsthrd.c new file mode 100644 index 00000000000..6fbd47a5dd3 --- /dev/null +++ b/lib/sdk/crt/startup/tlsthrd.c @@ -0,0 +1,148 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + * + * Written by Kai Tietz + * + * This file is used by if gcc is built with --enable-threads=win32. + * + * Based on version created by Mumit Khan + * + */ + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +WINBOOL __mingw_TLScallback (HANDLE hDllHandle, DWORD reason, LPVOID reserved); +int ___w64_mingwthr_remove_key_dtor (DWORD key); +int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *)); + +/* To protect the thread/key association data structure modifications. */ +static CRITICAL_SECTION __mingwthr_cs; +static volatile int __mingwthr_cs_init = 0; + +typedef struct __mingwthr_key __mingwthr_key_t; + +/* The list of threads active with key/dtor pairs. */ +struct __mingwthr_key { + DWORD key; + void (*dtor)(void *); + __mingwthr_key_t volatile *next; +}; + + +static __mingwthr_key_t volatile *key_dtor_list; + +int +___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *)) +{ + __mingwthr_key_t *new_key; + + if (__mingwthr_cs_init == 0) + return 0; + new_key = (__mingwthr_key_t *) calloc (1, sizeof (__mingwthr_key_t)); + if (new_key == NULL) + return -1; + + new_key->key = key; + new_key->dtor = dtor; + + EnterCriticalSection (&__mingwthr_cs); + + new_key->next = key_dtor_list; + key_dtor_list = new_key; + + LeaveCriticalSection (&__mingwthr_cs); + return 0; +} + +int +___w64_mingwthr_remove_key_dtor (DWORD key) +{ + __mingwthr_key_t volatile *prev_key; + __mingwthr_key_t volatile *cur_key; + + if (__mingwthr_cs_init == 0) + return 0; + + EnterCriticalSection (&__mingwthr_cs); + + prev_key = NULL; + cur_key = key_dtor_list; + + while (cur_key != NULL) + { + if ( cur_key->key == key) + { + if (prev_key == NULL) + key_dtor_list = cur_key->next; + else + prev_key->next = cur_key->next; + + free ((void*)cur_key); + break; + } + prev_key = cur_key; + cur_key = cur_key->next; + } + + LeaveCriticalSection (&__mingwthr_cs); + return 0; +} + +static void +__mingwthr_run_key_dtors (void) +{ + __mingwthr_key_t volatile *keyp; + + if (__mingwthr_cs_init == 0) + return; + EnterCriticalSection (&__mingwthr_cs); + + for (keyp = key_dtor_list; keyp; ) + { + LPVOID value = TlsGetValue (keyp->key); + if (GetLastError () == ERROR_SUCCESS) + { + if (value) + (*keyp->dtor) (value); + } + keyp = keyp->next; + } + + LeaveCriticalSection (&__mingwthr_cs); +} + +WINBOOL +__mingw_TLScallback (HANDLE __UNUSED_PARAM(hDllHandle), + DWORD reason, + LPVOID __UNUSED_PARAM(reserved)) +{ + switch (reason) + { + case DLL_PROCESS_ATTACH: + if (__mingwthr_cs_init == 0) + InitializeCriticalSection (&__mingwthr_cs); + __mingwthr_cs_init = 1; + break; + case DLL_PROCESS_DETACH: + __mingwthr_run_key_dtors(); + if (__mingwthr_cs_init == 1) + { + __mingwthr_cs_init = 0; + DeleteCriticalSection (&__mingwthr_cs); + } + break; + case DLL_THREAD_ATTACH: + break; + case DLL_THREAD_DETACH: + __mingwthr_run_key_dtors(); + break; + } + return TRUE; +} + diff --git a/lib/sdk/crt/startup/txtmode.c b/lib/sdk/crt/startup/txtmode.c new file mode 100644 index 00000000000..0c700ee1a19 --- /dev/null +++ b/lib/sdk/crt/startup/txtmode.c @@ -0,0 +1,13 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include + +/* Set default file mode to text */ + +/* Is this correct? Default value of _fmode in msvcrt.dll is 0. */ + +int _fmode = _O_TEXT; diff --git a/lib/sdk/crt/startup/wcrtexe.c b/lib/sdk/crt/startup/wcrtexe.c new file mode 100644 index 00000000000..d7556a61462 --- /dev/null +++ b/lib/sdk/crt/startup/wcrtexe.c @@ -0,0 +1,13 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#define WPRFLAG +#define UNICODE +#define _UNICODE +#define mainCRTStartup wmainCRTStartup +#define WinMainCRTStartup wWinMainCRTStartup + +#include "crtexe.c" diff --git a/lib/sdk/crt/startup/wdllargv.c b/lib/sdk/crt/startup/wdllargv.c new file mode 100644 index 00000000000..ad561e73692 --- /dev/null +++ b/lib/sdk/crt/startup/wdllargv.c @@ -0,0 +1,3 @@ + +#define WPRFLAG +#include "dllargv.c" diff --git a/lib/sdk/crt/startup/wildcard.c b/lib/sdk/crt/startup/wildcard.c new file mode 100644 index 00000000000..f996577bf27 --- /dev/null +++ b/lib/sdk/crt/startup/wildcard.c @@ -0,0 +1,33 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +/* _dowildcard is an int that controls the globbing of the command line. + * If _dowildcard is non-zero, the command line will be globbed: *.* + * will be expanded to be all files in the startup directory. + * + * In the mingw-w64 library the _dowildcard variable is defined as being + * 0, therefore command line globbing is DISABLED by default. To turn it + * on and to leave wildcard command line processing MS's globbing code, + * include a line in one of your source modules defining _dowildcard and + * setting it to -1, like so: + * int _dowildcard = -1; + * + * Alternatively, the mingw-w64 library can be configured using the + * --enable-wildcard option and compiled thusly upon which the resulting + * library will have _dowildcard as -1 and command line globbing will be + * enabled by default. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef __ENABLE_GLOBBING +#define __ENABLE_GLOBBING 0 /* -1 */ +#endif + +int _dowildcard = __ENABLE_GLOBBING; + diff --git a/lib/sdk/crt/stdio/_flsbuf.c b/lib/sdk/crt/stdio/_flsbuf.c index c2b7df29d4c..8eeeba1125a 100644 --- a/lib/sdk/crt/stdio/_flsbuf.c +++ b/lib/sdk/crt/stdio/_flsbuf.c @@ -24,6 +24,9 @@ _flsbuf(int ch, FILE *stream) return EOF; } + /* Always reset _cnt */ + stream->_cnt = 0; + /* Check if this was a read buffer */ if (stream->_flag & _IOREAD) { @@ -31,7 +34,6 @@ _flsbuf(int ch, FILE *stream) if (!(stream->_flag & _IOEOF)) { stream->_flag |= _IOERR; - stream->_cnt = 0; return EOF; } @@ -43,16 +45,17 @@ _flsbuf(int ch, FILE *stream) stream->_flag &= ~(_IOREAD|_IOEOF); stream->_flag |= _IOWRT; - /* If we have no buffer, try to allocate one */ - if (!stream->_base && stream != stdout && stream != stderr) + /* Check if should get a buffer */ + if (!(stream->_flag & _IONBF) && stream != stdout && stream != stderr) { - alloc_buffer(stream); + /* If we have no buffer, try to allocate one */ + if (!stream->_base) alloc_buffer(stream); } - /* Check if we have a buffer now */ - if (stream->_base) + /* Check if we can use a buffer now */ + if (stream->_base && !(stream->_flag & _IONBF)) { - /* We have one, check if there is something to write */ + /* We can, check if there is something to write */ count = stream->_ptr - stream->_base; if (count > 0) written = _write(stream->_file, stream->_base, count); diff --git a/lib/sdk/crt/string/splitp.c b/lib/sdk/crt/string/splitp.c index ea41fb08c03..b12cee28ce5 100644 --- a/lib/sdk/crt/string/splitp.c +++ b/lib/sdk/crt/string/splitp.c @@ -1,3 +1,10 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: BSD - See COPYING.ARM in the top level directory + * PURPOSE: CRT: implementation of _splitpath / _wsplitpath + * PROGRAMMERS: Timo Kreuzer + */ + #include #include @@ -6,64 +13,74 @@ */ void _tsplitpath(const _TCHAR* path, _TCHAR* drive, _TCHAR* dir, _TCHAR* fname, _TCHAR* ext) { - _TCHAR* tmp_drive = NULL; - _TCHAR* tmp_dir = NULL; - _TCHAR* tmp_ext = NULL; + const _TCHAR *src, *dir_start, *file_start = 0, *ext_start = 0; - tmp_drive = (_TCHAR*)_tcschr(path,':'); - if (drive) + /* Truncate all output strings */ + if (drive) drive[0] = '\0'; + if (dir) dir[0] = '\0'; + if (fname) fname[0] = '\0'; + if (ext) ext[0] = '\0'; + + /* Check parameter */ + if (!path) { - if (tmp_drive) - { - _tcsncpy(drive,tmp_drive-1,2); - *(drive+2) = 0; - } - else - { - *drive = 0; - } - } - if (!tmp_drive) - { - tmp_drive = (_TCHAR*)path - 1; +#ifndef _LIBCNT_ + __set_errno(EINVAL); +#endif + return; } - tmp_dir = (_TCHAR*)_tcsrchr(path,'\\'); - if (dir) + /* Skip '\\?\' prefix */ + if ((path[0] == '\\') && (path[1] == '\\') && + (path[2] == '?') && (path[3] == '\\')) path += 4; + + if (path[0] == '\0') return; + + /* Check if we have a drive letter (only 1 char supported) */ + if (path[1] == ':') { - if (tmp_dir) + if (drive) { - _tcsncpy(dir,tmp_drive+1,tmp_dir-tmp_drive); - *(dir+(tmp_dir-tmp_drive)) = 0; - } - else - { - *dir =0; + drive[0] = path[0]; + drive[1] = ':'; + drive[2] = '\0'; } + path += 2; + } + + /* Scan the rest of the string */ + dir_start = path; + while (*path != '\0') + { + /* Remember last path seperator and last dot */ + if ((*path == '\\') || (*path == '/')) file_start = path + 1; + if (*path == '.') ext_start = path; + path++; } - /* If the dot is before the last dir separator, it's part - * of a directory name, not the start of the extension */ - if (!tmp_ext || tmp_ext < tmp_dir) + /* Check if we got a file name / extension */ + if (!file_start) file_start = path; + if (!ext_start || ext_start < file_start) ext_start = path; + + if (dir) { - tmp_ext = (_TCHAR*)path+_tcslen(path); - } - if (ext) - { - _tcscpy(ext,tmp_ext); + src = dir_start; + while (src < file_start) *dir++ = *src++; + *dir = '\0'; } - if (fname) + if (fname) { - if (tmp_dir) - { - _tcsncpy(fname,tmp_dir+1,tmp_ext-tmp_dir-1); - *(fname+(tmp_ext-tmp_dir-1)) = 0; - } - else - { - _tcsncpy(fname,tmp_drive+1,tmp_ext-tmp_drive-1); - *(fname+(tmp_ext-path))=0; - } + src = file_start; + while (src < ext_start) *fname++ = *src++; + *fname = '\0'; + } + + if (ext) + { + src = ext_start; + while (*src != '\0') *ext++ = *src++; + *ext = '\0'; } } + diff --git a/lib/sdk/uuid/uuid.c b/lib/sdk/uuid/uuid.c new file mode 100644 index 00000000000..afa9847af62 --- /dev/null +++ b/lib/sdk/uuid/uuid.c @@ -0,0 +1,176 @@ +/* + * GUID definitions + * + * Copyright 2000 Alexandre Julliard + * Copyright 2000 Francois Gouget + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#define COM_NO_WINDOWS_H +#include "windef.h" +#include "initguid.h" + +/* GUIDs defined in uuids.lib */ + +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); + +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" + +#define USE_COM_CONTEXT_DEF +#include "objbase.h" +#include "servprov.h" + +#include "oleauto.h" +#include "oleidl.h" +#include "objidl.h" +#include "olectl.h" + +#include "ocidl.h" +#include "ctxtcall.h" + +#include "docobj.h" +#include "exdisp.h" + +#include "shdeprecated.h" +#include "shlguid.h" +#include "shlguid_undoc.h" +#include "shlobj.h" +#include "shldisp.h" +#include "comcat.h" +#include "urlmon.h" +#define _NO_AUTHOR_GUIDS +#include "activaut.h" +#include "activdbg.h" +#define _NO_SCRIPT_GUIDS +#include "activscp.h" +#include "dispex.h" +#include "mlang.h" +#include "mshtml.h" +#include "mshtmhst.h" +#include "richole.h" +#include "xmldom.h" +#include "xmldso.h" +#include "downloadmgr.h" +#include "objsel.h" +#include "hlink.h" +#include "optary.h" +#include "indexsrv.h" +#include "htiframe.h" +#include "urlhist.h" +#include "hlguids.h" +#include "dimm.h" +#include "isguids.h" +#include "objsafe.h" +#include "perhist.h" +#include "netcon.h" +#include "netfw.h" +#include "msctf.h" +#include "sensevts.h" +#include "ocmm.h" +#include "commoncontrols.h" + +/* FIXME: cguids declares GUIDs but does not define their values */ + +/* other GUIDs */ + +#if 0 /* FIXME */ +#include "uuids.h" +#endif + +/* the GUID for these interfaces are already defined by dxguid.c */ +#define __IReferenceClock_INTERFACE_DEFINED__ +#define __IKsPropertySet_INTERFACE_DEFINED__ +#if 0 /* FIXME */ +#include "strmif.h" +#endif +#if 0 /* FIXME */ +#include "control.h" +#endif + +/* GUIDs not declared in an exported header file */ +DEFINE_GUID(IID_IDirectPlaySP, 0x0c9f6360,0xcc61,0x11cf,0xac,0xec,0x00,0xaa,0x00,0x68,0x86,0xe3); +DEFINE_GUID(IID_ISFHelper, 0x1fe68efb,0x1874,0x9812,0x56,0xdc,0x00,0x00,0x00,0x00,0x00,0x00); +DEFINE_GUID(IID_IDPLobbySP, 0x5a4e5a20,0x2ced,0x11d0,0xa8,0x89,0x00,0xa0,0xc9,0x05,0x43,0x3c); +DEFINE_GUID(IID_IProxyManager, 0x00000008,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b); +DEFINE_GUID(IID_IEnumNetConnection, 0xC08956A0,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnection, 0xC08956A1,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnectionManager, 0xC08956A2,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnectionConnectUi, 0xC08956A3,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnectionPropertyUi, 0xC08956A4,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetLanConnectionUiInfo, 0xC08956A6,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_IEnumNetCfgComponent, 0xC0E8AE92,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfg, 0xC0E8AE93,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfgComponent, 0xC0E8AE99,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfgComponentBindings, 0xC0E8AE9E,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfgLock, 0xC0E8AE9F,0x306E,0x11D1,0xAA,0xCF,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetConnectionPropertyUi2, 0xC08956B9,0x1CD3,0x11D1,0xB1,0xC5,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(IID_INetCfgPnpReconfigCallback,0x8D84BD35,0xE227,0x11D2,0xB7,0x00,0x00,0xA0,0xC9,0x8A,0x6A,0x85); +DEFINE_GUID(IID_INetCfgComponentPropertyUi,0x932238E0,0xBEA1,0x11D0,0x92,0x98,0x00,0xC0,0x4f,0xC9,0x9D,0xCF); +DEFINE_GUID(IID_INetCfgComponentControl, 0x932238DF,0xBEA1,0x11D0,0x92,0x98,0x00,0xC0,0x4f,0xC9,0x9D,0xCF); + +DEFINE_GUID(FMTID_SummaryInformation,0xF29F85E0,0x4FF9,0x1068,0xAB,0x91,0x08,0x00,0x2B,0x27,0xB3,0xD9); +DEFINE_GUID(FMTID_DocSummaryInformation,0xD5CDD502,0x2E9C,0x101B,0x93,0x97,0x08,0x00,0x2B,0x2C,0xF9,0xAE); +DEFINE_GUID(FMTID_UserDefinedProperties,0xD5CDD505,0x2E9C,0x101B,0x93,0x97,0x08,0x00,0x2B,0x2C,0xF9,0xAE); + +/* COM CLSIDs not declared in an exported header file */ +DEFINE_GUID(CLSID_StdMarshal, 0x00000017,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_IdentityUnmarshal, 0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSGenObject, 0x0000030c,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSClientSite, 0x0000030d,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSClassObject, 0x0000030e,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSInPlaceActive, 0x0000030f,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSInPlaceFrame, 0x00000310,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSDragDrop, 0x00000311,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSBindCtx, 0x00000312,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_PSEnumerators, 0x00000313,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_Picture_Metafile, 0x00000315,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_StaticMetafile, 0x00000315,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_Picture_Dib, 0x00000316,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_StaticDib, 0x00000316,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_Picture_EnhMetafile, 0x00000319,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_DCOMAccessControl, 0x0000031d,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_StdGlobalInterfaceTable,0x00000323,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_ComBinding, 0x00000328,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_StdEvent, 0x0000032b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_ManualResetEvent, 0x0000032c,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_SynchronizeContainer, 0x0000032d,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_InProcFreeMarshaler, 0x0000033a,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529a9e6b,0x6587,0x4f23,0xab,0x9e,0x9c,0x7d,0x68,0x3e,0x3c,0x50); +DEFINE_GUID(CLSID_TF_InputProcessorProfiles, 0x33c53a50,0xf456,0x4884,0xb0,0x49,0x85,0xfd,0x64,0x3e,0xcf,0xed); +DEFINE_GUID(CLSID_TF_CategoryMgr, 0xA4B544A1,0x438D,0x4B41,0x93,0x25,0x86,0x95,0x23,0xE2,0xD6,0xC7); +DEFINE_GUID(CLSID_TF_LangBarMgr, 0xebb08c45,0x6c4a,0x4fdc,0xae,0x53,0x4e,0xb8,0xc4,0xc7,0xdb,0x8e); +DEFINE_GUID(CLSID_TF_DisplayAttributeMgr, 0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53); +DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x00,0x60,0x97,0xc9,0xa0,0x90); +DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745c63,0xb2f0,0x4784,0x8b,0x67,0x5e,0x12,0xc8,0x70,0x1a,0x31); +DEFINE_GUID(GUID_TFCAT_TIP_SPEECH, 0xB5A73CD1,0x8355,0x426B,0xA1,0x61,0x25,0x98,0x08,0xF2,0x6B,0x14); +DEFINE_GUID(GUID_TFCAT_TIP_HANDWRITING, 0x246ecb87,0xc2f2,0x4abe,0x90,0x5b,0xc8,0xb3,0x8a,0xdd,0x2c,0x43); +DEFINE_GUID(CLSID_ConnectionManager, 0xBA126AD1,0x2166,0x11D1,0xB1,0xD0,0x0,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(CLSID_CNetCfg, 0x5B035261,0x40F9,0x11D1,0xAA,0xEC,0x00,0x80,0x5F,0xC1,0x27,0x0E); +DEFINE_GUID(GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER, 0x046B8C80,0x1647,0x40F7,0x9B,0x21,0xB9,0x3B,0x81,0xAA,0xBC,0x1B); +DEFINE_GUID(GUID_COMPARTMENT_KEYBOARD_DISABLED, 0x71a5b253,0x1951,0x466b,0x9f,0xbc,0x9c,0x88,0x08,0xfa,0x84,0xf2); +DEFINE_GUID(GUID_COMPARTMENT_KEYBOARD_OPENCLOSE, 0x58273aad,0x01bb,0x4164,0x95,0xc6,0x75,0x5b,0xa0,0xb5,0x16,0x2d); +DEFINE_GUID(GUID_COMPARTMENT_HANDWRITING_OPENCLOSE, 0xf9ae2c6b,0x1866,0x4361,0xaf,0x72,0x7a,0xa3,0x09,0x48,0x89,0x0e); +DEFINE_GUID(GUID_COMPARTMENT_SPEECH_DISABLED, 0x56c5c607,0x0703,0x4e59,0x8e,0x52,0xcb,0xc8,0x4e,0x8b,0xbe,0x35); +DEFINE_GUID(GUID_COMPARTMENT_SPEECH_OPENCLOSE, 0x544d6a63,0xe2e8,0x4752,0xbb,0xd1,0x00,0x09,0x60,0xbc,0xa0,0x83); +DEFINE_GUID(GUID_COMPARTMENT_SPEECH_GLOBALSTATE, 0x2a54fe8e,0x0d08,0x460c,0xa7,0x5d,0x87,0x03,0x5f,0xf4,0x36,0xc5); +DEFINE_GUID(GUID_COMPARTMENT_PERSISTMENUENABLED, 0x575f3783,0x70c8,0x47c8,0xae,0x5d,0x91,0xa0,0x1a,0x1f,0x75,0x92); +DEFINE_GUID(GUID_COMPARTMENT_EMPTYCONTEXT, 0xd7487dbf,0x804e,0x41c5,0x89,0x4d,0xad,0x96,0xfd,0x4e,0xea,0x13); +DEFINE_GUID(GUID_COMPARTMENT_TIPUISTATUS, 0x148ca3ec,0x0366,0x401c,0x8d,0x75,0xed,0x97,0x8d,0x85,0xfb,0xc9); diff --git a/lib/smlib/CMakeLists.txt b/lib/smlib/CMakeLists.txt index 1151b92dde7..ca5c16de4cd 100644 --- a/lib/smlib/CMakeLists.txt +++ b/lib/smlib/CMakeLists.txt @@ -1,6 +1,4 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) - include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) list(APPEND SOURCE diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt index 11cec93f2c2..2d73e925757 100644 --- a/media/doc/3rd Party Files.txt +++ b/media/doc/3rd Party Files.txt @@ -3,51 +3,56 @@ Files synched with Wine can be found in /media/doc/README.WINE Other Things synched with other projects: Title: RedHat Liberation Fonts -Version: 1.06 -Actual Version: 1.06 +Used Version: 1.06 +Latest Version: 1.06 Website: https://www.redhat.com/promo/fonts/ Title: DejaVu Fonts -Version: 2.31 -Actual Version: 2.32 +Used Version: 2.33 +Latest Version: 2.33 Website: http://dejavu.sourceforge.net Title: DXTN OpenGL Compression Libs -Version: 1.1 -Actual Version: 1.1 +Used Version: 1.1 +Latest Version: 1.1 Website: http://www.geocities.com/dborca/opengl/tc.html Title: FreeType -Version: 2.3.5 -Actual Version: 2.4.2 +Used Version: 2.4.4 +Latest Version: 2.4.4 Website: http://www.freetype.org Title: Mesa3D -Version: 7.4 -Actual Version: 7.8.2 +Used Version: 7.4 +Latest Version: 7.8.2 Website: http://www.mesa3d.org Title: GNU adns -Version: 1.0 REV 5 -Actual Version: 1.0 REV 5 +Used Version: 1.0 REV 5 +Latest Version: 1.0 REV 5 Website: http://www.chiark.greenend.org.uk/~ian/adns | http://adns.jgaa.com Title: BZip2 -Version: 1.0.5 -Actual Version: 1.0.5 +Used Version: 1.0.5 +Latest Version: 1.0.5 Website: http://www.bzip.org Title: Expat -Version: 2.0 -Actual Version: 2.0.1 +Used Version: 2.0 +Latest Version: 2.0.1 Website: http://expat.sourceforge.net Title: LibXML -Version: 2.7.6 -Actual Version: 2.7.7 +Used Version: 2.7.6 +Latest Version: 2.7.7 Website: http://xmlsoft.org Title: ZLib -Version: 1.2.3 -Actual Version: 1.2.5 +Used Version: 1.2.3 +Latest Version: 1.2.5 Website: http://www.zlib.net + +Title: GNU FreeFont +Used Version: 2010-09-19 +Latest Version: 2010-09-19 +Website: http://savannah.gnu.org/projects/freefont/ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 1385a5967a6..47db38e01dd 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -187,6 +187,8 @@ reactos/dll/win32/xinput1_3 # Autosync reactos/dll/win32/xinput9_1_0 # Autosync reactos/dll/win32/xmllite # Autosync +reactos/dll/cpl/inetcpl # Synced to Wine-1.3.21 + ReactOS shares the following programs with Winehq. reactos/base/applications/cmdutils/xcopy # Autosync diff --git a/media/fonts/DejaVuSans-Bold.ttf b/media/fonts/DejaVuSans-Bold.ttf index 7b29accc131..0f4d5e9d484 100644 Binary files a/media/fonts/DejaVuSans-Bold.ttf and b/media/fonts/DejaVuSans-Bold.ttf differ diff --git a/media/fonts/DejaVuSans-BoldOblique.ttf b/media/fonts/DejaVuSans-BoldOblique.ttf index b5440d95e79..48f06a863ad 100644 Binary files a/media/fonts/DejaVuSans-BoldOblique.ttf and b/media/fonts/DejaVuSans-BoldOblique.ttf differ diff --git a/media/fonts/DejaVuSans-Oblique.ttf b/media/fonts/DejaVuSans-Oblique.ttf index e233295c464..44856388dae 100644 Binary files a/media/fonts/DejaVuSans-Oblique.ttf and b/media/fonts/DejaVuSans-Oblique.ttf differ diff --git a/media/fonts/DejaVuSans.ttf b/media/fonts/DejaVuSans.ttf index a36615b2081..27cff476ef3 100644 Binary files a/media/fonts/DejaVuSans.ttf and b/media/fonts/DejaVuSans.ttf differ diff --git a/media/fonts/DejaVuSansMono-Bold.ttf b/media/fonts/DejaVuSansMono-Bold.ttf index 98bb6f62e21..09d42796a1e 100644 Binary files a/media/fonts/DejaVuSansMono-Bold.ttf and b/media/fonts/DejaVuSansMono-Bold.ttf differ diff --git a/media/fonts/DejaVuSansMono-BoldOblique.ttf b/media/fonts/DejaVuSansMono-BoldOblique.ttf index 42bbcdee974..0344c22709d 100644 Binary files a/media/fonts/DejaVuSansMono-BoldOblique.ttf and b/media/fonts/DejaVuSansMono-BoldOblique.ttf differ diff --git a/media/fonts/DejaVuSansMono-Oblique.ttf b/media/fonts/DejaVuSansMono-Oblique.ttf index d6ab52298c1..bc16d51bd50 100644 Binary files a/media/fonts/DejaVuSansMono-Oblique.ttf and b/media/fonts/DejaVuSansMono-Oblique.ttf differ diff --git a/media/fonts/DejaVuSansMono.ttf b/media/fonts/DejaVuSansMono.ttf index b464c52ade0..7260bd65e0d 100644 Binary files a/media/fonts/DejaVuSansMono.ttf and b/media/fonts/DejaVuSansMono.ttf differ diff --git a/media/fonts/DejaVuSerif-Bold.ttf b/media/fonts/DejaVuSerif-Bold.ttf index 8c53b1a1124..afa2d5ec3d0 100644 Binary files a/media/fonts/DejaVuSerif-Bold.ttf and b/media/fonts/DejaVuSerif-Bold.ttf differ diff --git a/media/fonts/DejaVuSerif-BoldItalic.ttf b/media/fonts/DejaVuSerif-BoldItalic.ttf index 688c2b70f71..ce9443eaead 100644 Binary files a/media/fonts/DejaVuSerif-BoldItalic.ttf and b/media/fonts/DejaVuSerif-BoldItalic.ttf differ diff --git a/media/fonts/DejaVuSerif-Italic.ttf b/media/fonts/DejaVuSerif-Italic.ttf index b2ed04a1230..c1864a3071c 100644 Binary files a/media/fonts/DejaVuSerif-Italic.ttf and b/media/fonts/DejaVuSerif-Italic.ttf differ diff --git a/media/fonts/DejaVuSerif.ttf b/media/fonts/DejaVuSerif.ttf index 19eba334572..ed53a2967c9 100644 Binary files a/media/fonts/DejaVuSerif.ttf and b/media/fonts/DejaVuSerif.ttf differ diff --git a/media/fonts/FreeMono.ttf b/media/fonts/FreeMono.ttf index 3c83d04087f..7485f9e4c84 100644 Binary files a/media/fonts/FreeMono.ttf and b/media/fonts/FreeMono.ttf differ diff --git a/media/fonts/FreeMonoBold.ttf b/media/fonts/FreeMonoBold.ttf index 3dbb7a9ac76..3bce6129aea 100644 Binary files a/media/fonts/FreeMonoBold.ttf and b/media/fonts/FreeMonoBold.ttf differ diff --git a/media/fonts/FreeMonoBoldOblique.ttf b/media/fonts/FreeMonoBoldOblique.ttf index 1776b2cca94..ffcf71a640f 100644 Binary files a/media/fonts/FreeMonoBoldOblique.ttf and b/media/fonts/FreeMonoBoldOblique.ttf differ diff --git a/media/fonts/FreeMonoOblique.ttf b/media/fonts/FreeMonoOblique.ttf index 8aed4a5ffbb..8992c2cf947 100644 Binary files a/media/fonts/FreeMonoOblique.ttf and b/media/fonts/FreeMonoOblique.ttf differ diff --git a/media/fonts/doc/DejaVu_AUTHORS.txt b/media/fonts/doc/DejaVu_AUTHORS.txt index db4f0fb2a7c..48073dad73f 100644 --- a/media/fonts/doc/DejaVu_AUTHORS.txt +++ b/media/fonts/doc/DejaVu_AUTHORS.txt @@ -1,5 +1,6 @@ abysta at yandex.ru Adrian Schroeter +Aleksey Chalabyan Andrey Valentinovich Panov Ben Laenen Besarion Gugushvili @@ -20,6 +21,8 @@ James Crippen John Karp Keenan Pepper Lars Naesbye Christensen +Lior Halphon +MaEr Mashrab Kuvatov Max Berger Mederic Boquien @@ -28,20 +31,23 @@ MihailJP Misu Moldovan Nguyen Thai Ngoc Duy Nicolas Mailhot +Norayr Chilingarian Ognyan Kulev Ondrej Koala Vacha Peter Cernak Remy Oudompheng Roozbeh Pournader +Rouben Hakobian Sahak Petrosyan Sander Vesik Stepan Roh Stephen Hartke Steve Tinney Tavmjong Bah +Thomas Henlich Tim May Valentin Stoykov Vasek Stodulka Wesley Transue -$Id: AUTHORS 2379 2010-05-27 08:14:08Z ben_laenen $ +$Id: AUTHORS 2461 2011-02-18 16:38:20Z ben_laenen $ diff --git a/media/fonts/doc/DejaVu_NEWS.txt b/media/fonts/doc/DejaVu_NEWS.txt index a84852e73ac..87e3d5e53a0 100644 --- a/media/fonts/doc/DejaVu_NEWS.txt +++ b/media/fonts/doc/DejaVu_NEWS.txt @@ -1,3 +1,85 @@ +Changes from 2.32 to 2.33 + +* added Old Italic block to Sans (by MaEr) +* added U+051E, U+051F to Sans (by MaEr) +* added U+01BA, U+0372-U+0373, U+0376-U+0377, U+03CF, U+1D00-U+1D01, + U+1D03-U+1D07, U+1D0A-U+1D13, U+1D15, U+1D18-U+1D1C, U+1D20-U+1D2B, + U+1D2F, U+1D3D, U+1D5C-U+1D61, U+1D66-U+1D6B, U+1DB8, U+1E9C-U+1E9D, + U+1EFA-U+1EFB, U+2C60-U+2C61, U+2C63, U+A726-U+A73C, U+A73E-U+A73F, + U+A746-U+A747, U+A74A-U+A74B, U+A74E+U+A74F, U+A768-U+A769, U+A77B-U+A77C, + U+A780-U+A787, U+A790-U+A791, U+A7FA-U+A7FF to Serif (by Gee Fung Sit 薛至峰) +* added alternate forms to U+014A and U+01B7 in Serif (by Gee Fung Sit 薛至峰) +* typographical improvements to U+0166-U+0167, U+0197, U+01B5-U+01B6, U+01BB, + U+0222-U+0223, U+023D, U+0250-U+0252, U+026E, U+0274, U+028F, U+029F, + U+02A3-U+02A5, U+02AB, U+03FE-U+03FF, U+1D02, U+1D14, U+1D1D-U+1D1F, U+1D3B, + U+1D43-U+1D46, U+1D59, U+1D9B, U+2C71, U+2C73 in Serif (by Gee Fung Sit 薛至峰) +* fixed bugs #31762 and #34700 plus other small fixes (wrong direction, + duplicate points, etc.) for Sans and Serif (by Gee Fung Sit 薛至峰) +* added U+204B to Mono (by Gee Fung Sit 薛至峰) +* added U+26E2 to Sans (by Gee Fung Sit 薛至峰) +* added Playing Cards block (U+1F0A0-U+1F0DF) to Sans (by Gee Fung Sit 薛至峰) +* emoticons in Sans: replace U+2639-U+263B with better versions, add + U+1F601-U+1F610, U+1F612-U+1F614, U+1F616, U+1F618, U+1F61A, U+1F61C-U+1F61E, + U+1F620-U+1F624, U+1F625, U+1F628-U+1F62B, U+1F62D, U+1F630-U+1F633, + U+1F635-U+1F640 (by Ben Laenen and Denis Jacquerye) +* added U+A78E, U+A790-U+A791 to Sans and Mono (by Denis Jacquerye) +* added U+A7FA to Sans (by Denis Jacquerye) +* subscripts: added U+2095-U+209C to Sans, Serif and Mono, adjusted + U+1D49-U+1D4A in Sans and Mono (by Denis Jacquerye) +* added U+0243 to Mono (by Denis Jacquerye) +* adjusted U+0307 to match dot of i, replaced dotaccent U+02D9 with U+0307 in +most dependencies in Sans (by Denis Jacquerye) +* adjusted anchors of f and added them to long s in Sans (by Denis Jacquerye) +* added anchors to precomposed dependencies of D and d (by Denis Jacquerye) +* added debug glyphs U+F002 and U+F003 which will show current point size (by + Ben Laenen) +* use correct version for Serbian italic be (by Eugeniy Meshcheryakov) +* added pictograms U+1F42D-U+1F42E, U+1F431, U+1F435 (by Denis Jacquerye) +* improved Hebrew in Sans (by Lior Halphon) +* improved Armenian in Sans, and added Armenian in Serif and Mono (by Rouben + Hakobian (Tarumian), Aleksey Chalabyan and Norayr Chilingarian) +* remove "locl" feature for Romanian for S/T/s/t with cedilla/comma accent (by + Ben Laenen) +* replace wrong "dflt" script tag in Mono with "DFLT" (by Ben Laenen) + +Changes from 2.31 to 2.32 + +* added to Sans: Latin small letter p with stroke (U+1D7D), Latin capital + letter p with stroke through descender (U+A750), Latin small letter p with + stroke through descender (U+A751), Latin capital letter thorn with stroke + (U+A764), Latin small letter thorn with stroke (U+A765), Latin capital letter + thorn with stroke through descender (U+A766), Latin small letter thorn with + stroke through descender (U+A767), Latin capital letter q with stroke through + descender (U+A756), Latin small letter q with stroke through descender + (U+A757), Latin capital letter p with flourish (U+A752), Latin small letter p + with flourish (U+A753) (by Ben Laenen) +* add new Indian rupee symbol (U+20B9) to Sans, Serif and Mono (although + standardization in Unicode not complete yet, UTC did assign this code point) + (by Ben Laenen) +* Sans: adjusted U+0E3F, U+20AB, U+20AD-U+20AE, U+20B1, U+20B5, U+20B8 to have + them take up the same width as digits (by Gee Fung Sit 薛至峰) +* added U+23E8 to Sans (by Thomas Henlich) +* fixed numerous bugs (#22579, #28189, #28977, N'Ko in Windows, fixed U+FB4F, + anchors for U+0332-U+0333, made extensions in Misc. Technical connect, and + other small fixes) (by Gee Fung Sit 薛至峰) +* added looptail g as stylistic variant to Serif (by Gee Fung Sit 薛至峰) +* added the remaining precomposed characters in Latin Extended Additional in + Serif (by Gee Fung Sit 薛至峰) +* added Georgian Mkhedruli (U+10D0-U+10FC) to Sans ExtraLight (by Besarion + Gugushvili) +* fix spacing in hinting of U+042E (Ю) in Mono (by Ben Laenen) +* replaced U+2650 and minor changes to U+2640-U+2642, U+2699, U+26A2-U+26A5, + U+26B2-U+26B5, U+26B8 in Sans (by Gee Fung Sit 薛至峰) +* added U+1E9C-U+1E9D, U+1EFA-U+1EFB, U+2028-U+2029, U+20B8, U+2150-U+2152, + U+2189, U+26C0-U+26C3, U+A722-U+A725, U+1F030-U+1F093 to Sans (by Gee Fung + Sit 薛至峰) +* added U+1E9C-U+1E9E, U+1EFA-U+1EFB, U+2028-U+2029, U+20B8, U+2181-U+2182, + U+2185 U+A722-U+A725, to Sans ExtraLight (by Gee Fung Sit 薛至峰) +* added U+20B8, U+22A2-U+22A5, U+A722-U+A725 to Mono (by Gee Fung Sit 薛至峰) +* added U+02CD, U+01BF, U+01F7, U+0222-U+0223, U+0243-U+0244, U+0246-U+024F, + U+2150-U+2152, U+2189, U+239B-U+23AD and U+A73D to Serif (by Gee Fung Sit + 薛至峰) + Changes from 2.30 to 2.31 * fixed bug where Serif Condensed Italic wouldn't get proper subfamily tags (by @@ -1230,4 +1312,4 @@ Changes from 0.9 to 0.9.1: - proper caron shape for dcaron and tcaron - minor visual changes -$Id: NEWS 2378 2010-05-27 08:11:33Z ben_laenen $ +$Id: NEWS 2471 2011-02-27 14:25:15Z ben_laenen $ diff --git a/media/fonts/doc/DejaVu_README.txt b/media/fonts/doc/DejaVu_README.txt index 64c9cac20e4..0f2079a9f38 100644 --- a/media/fonts/doc/DejaVu_README.txt +++ b/media/fonts/doc/DejaVu_README.txt @@ -1,4 +1,4 @@ -DejaVu fonts 2.31 (c)2004-2010 DejaVu fonts team +DejaVu fonts 2.33 (c)2004-2011 DejaVu fonts team ------------------------------------------------ The DejaVu fonts are a font family based on the Bitstream Vera Fonts @@ -56,4 +56,4 @@ U+213C-U+2140, U+2295-U+2298, U+2308-U+230B, U+26A2-U+26B1, U+2701-U+2704, U+2706-U+2709, U+270C-U+274B, U+2758-U+275A, U+2761-U+2775, U+2780-U+2794, U+2798-U+27AF, U+27B1-U+27BE, U+FB05-U+FB06 -$Id: README 2377 2010-05-27 08:02:08Z ben_laenen $ +$Id: README 2471 2011-02-27 14:25:15Z ben_laenen $ diff --git a/media/fonts/doc/DejaVu_langcover.txt b/media/fonts/doc/DejaVu_langcover.txt index 1673d9fef09..f503448771f 100644 --- a/media/fonts/doc/DejaVu_langcover.txt +++ b/media/fonts/doc/DejaVu_langcover.txt @@ -1,5 +1,5 @@ This is the language coverage file for DejaVu fonts -($Id: langcover.txt 2383 2010-05-27 09:23:21Z ben_laenen $) +($Id$) Sans Serif Sans Mono aa Afar 100% (62/62) 100% (62/62) 100% (62/62) @@ -8,13 +8,13 @@ af Afrikaans 100% (69/69) 100% (69/69) ak Akan 100% (73/73) 100% (73/73) 100% (73/73) am Amharic (0/264) (0/264) (0/264) an Aragonese 100% (66/66) 100% (66/66) 100% (66/66) -ar Arabic 100% (36/36) (0/36) 100% (36/36) +ar Arabic 100% (125/125) (0/125) 100% (125/125) as Assamese (0/64) (0/64) (0/64) ast Asturian/Bable/Leonese/Asturleonese 100% (66/66) 100% (66/66) 100% (66/66) av Avaric 100% (67/67) 100% (67/67) 100% (67/67) ay Aymara 100% (60/60) 100% (60/60) 100% (60/60) az-az Azerbaijani in Azerbaijan 100% (66/66) 100% (66/66) 100% (66/66) -az-ir Azerbaijani in Iran 100% (40/40) (0/40) 100% (40/40) +az-ir Azerbaijani in Iran 100% (130/130) (0/130) 100% (130/130) ba Bashkir 100% (82/82) 100% (82/82) 97% (80/82) be Byelorussian 100% (68/68) 100% (68/68) 100% (68/68) ber-dz Berber in Algeria 100% (70/70) 100% (70/70) 100% (70/70) @@ -54,7 +54,7 @@ eo Esperanto 100% (64/64) 100% (64/64) es Spanish 100% (66/66) 100% (66/66) 100% (66/66) et Estonian 100% (64/64) 100% (64/64) 100% (64/64) eu Basque 100% (56/56) 100% (56/56) 100% (56/56) -fa Persian 100% (40/40) (0/40) 100% (40/40) +fa Persian 100% (129/129) (0/129) 100% (129/129) fat Fanti 100% (73/73) 100% (73/73) 100% (73/73) ff Fulah (Fula) 100% (62/62) 100% (62/62) 100% (62/62) fi Finnish 100% (62/62) 100% (62/62) 100% (62/62) @@ -81,7 +81,7 @@ hr Croatian 100% (62/62) 100% (62/62) hsb Upper Sorbian 100% (72/72) 100% (72/72) 100% (72/72) ht Haitian/Haitian Creole 100% (56/56) 100% (56/56) 100% (56/56) hu Hungarian 100% (70/70) 100% (70/70) 100% (70/70) -hy Armenian 100% (77/77) (0/77) (0/77) +hy Armenian 100% (77/77) 100% (77/77) 100% (77/77) hz Herero 100% (57/57) 100% (57/57) 100% (57/57) ia Interlingua 100% (52/52) 100% (52/52) 100% (52/52) id Indonesian 100% (54/54) 100% (54/54) 100% (54/54) @@ -106,8 +106,8 @@ km Central Khmer (0/63) (0/63) kn Kannada (0/70) (0/70) (0/70) ko Korean (0/2443) (0/2443) (0/2443) kok Kokani (Devanagari script) (0/68) (0/68) (0/68) -kr Kanuri 100% (56/56) 96% (54/56) 100% (56/56) -ks Kashmiri 97% (43/44) (0/44) 93% (41/44) +kr Kanuri 100% (56/56) 100% (56/56) 100% (56/56) +ks Kashmiri 98% (143/145) (0/145) 97% (141/145) ku-am Kurdish in Armenia 100% (64/64) 100% (64/64) 100% (64/64) ku-iq Kurdish in Iraq 100% (32/32) (0/32) 87% (28/32) ku-ir Kurdish in Iran 100% (32/32) (0/32) 87% (28/32) @@ -118,7 +118,7 @@ kw Cornish 100% (64/64) 100% (64/64) kwm Kwambi 100% (52/52) 100% (52/52) 100% (52/52) ky Kirgiz 100% (70/70) 100% (70/70) 100% (70/70) la Latin 100% (68/68) 100% (68/68) 100% (68/68) -lah Lahnda 97% (43/44) (0/44) 93% (41/44) +lah Lahnda 98% (143/145) (0/145) 97% (141/145) lb Luxembourgish (Letzeburgesch) 100% (75/75) 100% (75/75) 100% (75/75) lez Lezghian (Lezgian) 100% (67/67) 100% (67/67) 100% (67/67) lg Ganda 100% (54/54) 100% (54/54) 100% (54/54) @@ -158,12 +158,10 @@ or Oriya (0/68) (0/68) os Ossetic 100% (66/66) 100% (66/66) 100% (66/66) ota Ottoman Turkish 100% (37/37) (0/37) 97% (36/37) pa Panjabi/Punjabi (0/63) (0/63) (0/63) -pa-pk Panjabi/Punjabi in Pakistan 97% (43/44) (0/44) 93% (41/44) +pa-pk Panjabi/Punjabi in Pakistan 98% (143/145) (0/145) 97% (141/145) pap-an Papiamento in Netherlands Antilles 100% (72/72) 100% (72/72) 100% (72/72) pap-aw Papiamento in Aruba 100% (54/54) 100% (54/54) 100% (54/54) -pes Western Farsi 100% (40/40) (0/40) 100% (40/40) pl Polish 100% (70/70) 100% (70/70) 100% (70/70) -prs Dari/Eastern Farsi 100% (40/40) (0/40) 100% (40/40) ps-af Pashto in Afghanistan 95% (47/49) (0/49) 77% (38/49) ps-pk Pashto in Pakistan 93% (46/49) (0/49) 75% (37/49) pt Portuguese 100% (82/82) 100% (82/82) 100% (82/82) @@ -219,12 +217,12 @@ tt Tatar 100% (76/76) 100% (76/76) tw Twi 100% (73/73) 100% (73/73) 100% (73/73) ty Tahitian 100% (65/65) 100% (65/65) 100% (65/65) tyv Tuvinian 100% (70/70) 100% (70/70) 100% (70/70) -ug Uighur 100% (36/36) (0/36) 100% (36/36) +ug Uighur 100% (125/125) (0/125) 100% (125/125) uk Ukrainian 100% (72/72) 100% (72/72) 100% (72/72) -ur Urdu 97% (43/44) (0/44) 93% (41/44) +ur Urdu 98% (143/145) (0/145) 97% (141/145) uz Uzbek 100% (52/52) 100% (52/52) 100% (52/52) ve Venda 100% (62/62) 100% (62/62) 100% (62/62) -vi Vietnamese 100% (194/194) 77% (150/194) 76% (148/194) +vi Vietnamese 100% (194/194) 100% (194/194) 76% (148/194) vo Volapuk 100% (54/54) 100% (54/54) 100% (54/54) vot Votic 100% (62/62) 100% (62/62) 100% (62/62) wa Walloon 100% (70/70) 100% (70/70) 100% (70/70) diff --git a/media/fonts/doc/DejaVu_status.txt b/media/fonts/doc/DejaVu_status.txt index 084667c173b..e860ef48db6 100644 --- a/media/fonts/doc/DejaVu_status.txt +++ b/media/fonts/doc/DejaVu_status.txt @@ -1,5 +1,5 @@ This is the status file for DejaVu fonts -($Id: status.txt 2383 2010-05-27 09:23:21Z ben_laenen $) +($Id: status.txt 2425 2010-08-22 16:07:31Z moyogo $) original = present in original Bitstream Vera 1.10 = added in DejaVu fonts @@ -381,12 +381,12 @@ U+01b6 uni01B6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+01b7 uni01B7 2.3 U+01b8 uni01B8 2.3 U+01b9 uni01B9 2.3 -U+01ba uni01BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+01ba uni01BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+01bb uni01BB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+01bc uni01BC 2.3 U+01bd uni01BD 2.3 U+01be uni01BE 2.3 -U+01bf uni01BF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+01bf uni01BF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+01c0 uni01C0 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+01c1 uni01C1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+01c2 uni01C2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) @@ -442,7 +442,7 @@ U+01f3 uni01F3 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+01f4 uni01F4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+01f5 uni01F5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+01f6 uni01F6 2.3 -U+01f7 uni01F7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+01f7 uni01F7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+01f8 uni01F8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+01f9 uni01F9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+01fa Aringacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) @@ -485,8 +485,8 @@ U+021e uni021E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+021f uni021F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+0220 uni0220 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.16 (Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.18 (Sans Mono, Sans Mono Bold) 2.23 (Serif Italic Condensed) U+0221 uni0221 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0222 uni0222 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0223 uni0223 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+0222 uni0222 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0223 uni0223 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+0224 uni0224 2.3 U+0225 uni0225 2.3 U+0226 uni0226 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) @@ -518,19 +518,19 @@ U+023f uni023F 2.3 U+0240 uni0240 2.3 U+0241 uni0241 2.3 U+0242 uni0242 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+0243 uni0243 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0244 uni0244 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+0243 uni0243 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+0244 uni0244 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+0245 uni0245 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0246 uni0246 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0247 uni0247 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0248 uni0248 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0249 uni0249 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+024a uni024A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+024b uni024B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans ExtraLight) -U+024c uni024C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+024d uni024D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+024e uni024E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+024f uni024F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) +U+0246 uni0246 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0247 uni0247 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0248 uni0248 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0249 uni0249 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+024a uni024A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+024b uni024B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+024c uni024C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+024d uni024D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+024e uni024E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+024f uni024F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+0250 uni0250 1.14 U+0251 uni0251 1.14 U+0252 uni0252 1.14 @@ -656,7 +656,7 @@ U+02c9 uni02C9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+02ca uni02CA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) U+02cb uni02CB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) U+02cc uni02CC 2.0 -U+02cd uni02CD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+02cd uni02CD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+02ce uni02CE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) U+02cf uni02CF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) U+02d0 uni02D0 1.14 @@ -785,12 +785,12 @@ U+0361 uni0361 2.0 U+0362 uni0362 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+0370 uni0370 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+0371 uni0371 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0372 uni0372 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+0373 uni0373 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) +U+0372 uni0372 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0373 uni0373 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+0374 uni0374 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+0375 uni0375 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0376 uni0376 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+0377 uni0377 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) +U+0376 uni0376 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0377 uni0377 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+037a uni037A 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+037b uni037B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+037c uni037C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) @@ -868,7 +868,7 @@ U+03cb upsilondieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Conde U+03cc omicrontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+03cd upsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+03ce omegatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cf uni03CF 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) +U+03cf uni03CF 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+03d0 uni03D0 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+03d1 theta1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+03d2 Upsilon1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) @@ -1203,98 +1203,100 @@ U+051a uni051A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Conde U+051b uni051B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+051c uni051C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+051d uni051D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) +U+051e uni051E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+051f uni051F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+0520 uni0520 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+0521 uni0521 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+0522 uni0522 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+0523 uni0523 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+0524 uni0524 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+0525 uni0525 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0531 uni0531 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0532 uni0532 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0533 uni0533 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0534 uni0534 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0535 uni0535 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0536 uni0536 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0537 uni0537 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0538 uni0538 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0539 uni0539 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+053a uni053A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+053b uni053B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+053c uni053C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+053d uni053D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+053e uni053E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+053f uni053F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0540 uni0540 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0541 uni0541 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0542 uni0542 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0543 uni0543 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0544 uni0544 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0545 uni0545 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0546 uni0546 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0547 uni0547 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0548 uni0548 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+0549 uni0549 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+054a uni054A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+054b uni054B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+054c uni054C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+054d uni054D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+054e uni054E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+054f uni054F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0550 uni0550 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0551 uni0551 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0552 uni0552 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0553 uni0553 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+0554 uni0554 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0555 uni0555 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0556 uni0556 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0559 uni0559 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+055a uni055A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+055b uni055B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+055c uni055C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+055d uni055D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+055e uni055E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+055f uni055F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0561 uni0561 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+0562 uni0562 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0563 uni0563 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0564 uni0564 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0565 uni0565 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0566 uni0566 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0567 uni0567 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0568 uni0568 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0569 uni0569 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+056a uni056A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+056b uni056B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+056c uni056C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+056d uni056D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+056e uni056E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+056f uni056F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+0570 uni0570 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0571 uni0571 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0572 uni0572 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0573 uni0573 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0574 uni0574 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0575 uni0575 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0576 uni0576 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0577 uni0577 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0578 uni0578 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0579 uni0579 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+057a uni057A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+057b uni057B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+057c uni057C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+057d uni057D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+057e uni057E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+057f uni057F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+0580 uni0580 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0581 uni0581 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0582 uni0582 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0583 uni0583 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+0584 uni0584 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0585 uni0585 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+0586 uni0586 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0587 uni0587 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0589 uni0589 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) -U+058a uni058A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+0531 uni0531 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0532 uni0532 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0533 uni0533 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0534 uni0534 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0535 uni0535 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0536 uni0536 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0537 uni0537 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0538 uni0538 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0539 uni0539 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+053a uni053A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+053b uni053B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+053c uni053C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+053d uni053D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+053e uni053E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+053f uni053F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0540 uni0540 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0541 uni0541 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0542 uni0542 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0543 uni0543 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0544 uni0544 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0545 uni0545 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0546 uni0546 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0547 uni0547 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0548 uni0548 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0549 uni0549 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+054a uni054A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+054b uni054B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+054c uni054C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+054d uni054D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+054e uni054E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+054f uni054F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0550 uni0550 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0551 uni0551 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0552 uni0552 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0553 uni0553 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0554 uni0554 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0555 uni0555 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0556 uni0556 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0559 uni0559 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+055a uni055A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+055b uni055B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+055c uni055C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+055d uni055D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+055e uni055E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+055f uni055F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0561 uni0561 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0562 uni0562 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0563 uni0563 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0564 uni0564 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0565 uni0565 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0566 uni0566 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0567 uni0567 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0568 uni0568 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0569 uni0569 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+056a uni056A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+056b uni056B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+056c uni056C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+056d uni056D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+056e uni056E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+056f uni056F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0570 uni0570 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0571 uni0571 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0572 uni0572 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0573 uni0573 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0574 uni0574 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0575 uni0575 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0576 uni0576 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0577 uni0577 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0578 uni0578 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0579 uni0579 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+057a uni057A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+057b uni057B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+057c uni057C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+057d uni057D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+057e uni057E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+057f uni057F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0580 uni0580 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0581 uni0581 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0582 uni0582 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0583 uni0583 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0584 uni0584 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0585 uni0585 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0586 uni0586 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0587 uni0587 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+0589 uni0589 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+058a uni058A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+05b0 uni05B0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+05b1 uni05B1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+05b2 uni05B2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) @@ -1668,51 +1670,51 @@ U+10c2 uni10C2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condense U+10c3 uni10C3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+10c4 uni10C4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+10c5 uni10C5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d0 uni10D0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d1 uni10D1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d2 uni10D2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d3 uni10D3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d4 uni10D4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d5 uni10D5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d6 uni10D6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d7 uni10D7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d8 uni10D8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d9 uni10D9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10da uni10DA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10db uni10DB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10dc uni10DC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10dd uni10DD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10de uni10DE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10df uni10DF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e0 uni10E0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e1 uni10E1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e2 uni10E2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e3 uni10E3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e4 uni10E4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e5 uni10E5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e6 uni10E6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e7 uni10E7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e8 uni10E8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10e9 uni10E9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ea uni10EA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10eb uni10EB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ec uni10EC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ed uni10ED 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ee uni10EE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ef uni10EF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f0 uni10F0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f1 uni10F1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f2 uni10F2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f3 uni10F3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f4 uni10F4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f5 uni10F5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f6 uni10F6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f7 uni10F7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f8 uni10F8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10f9 uni10F9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10fa uni10FA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10fb uni10FB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10fc uni10FC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) +U+10d0 uni10D0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d1 uni10D1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d2 uni10D2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d3 uni10D3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d4 uni10D4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d5 uni10D5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d6 uni10D6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d7 uni10D7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d8 uni10D8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10d9 uni10D9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10da uni10DA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10db uni10DB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10dc uni10DC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10dd uni10DD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10de uni10DE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10df uni10DF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e0 uni10E0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e1 uni10E1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e2 uni10E2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e3 uni10E3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e4 uni10E4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e5 uni10E5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e6 uni10E6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e7 uni10E7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e8 uni10E8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10e9 uni10E9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10ea uni10EA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10eb uni10EB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10ec uni10EC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10ed uni10ED 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10ee uni10EE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10ef uni10EF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f0 uni10F0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f1 uni10F1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f2 uni10F2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f3 uni10F3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f4 uni10F4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f5 uni10F5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f6 uni10F6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f7 uni10F7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f8 uni10F8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10f9 uni10F9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10fa uni10FA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10fb uni10FB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+10fc uni10FC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) U+1401 uni1401 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+1402 uni1402 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+1403 uni1403 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) @@ -2146,50 +2148,54 @@ U+1699 uni1699 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condense U+169a uni169A 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) U+169b uni169B 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) U+169c uni169C 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1d00 uni1D00 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d01 uni1D01 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1d00 uni1D00 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d01 uni1D01 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d02 uni1D02 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d03 uni1D03 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d04 uni1D04 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d05 uni1D05 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d06 uni1D06 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d07 uni1D07 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1d03 uni1D03 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d04 uni1D04 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d05 uni1D05 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d06 uni1D06 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d07 uni1D07 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d08 uni1D08 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+1d09 uni1D09 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d0a uni1D0A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d0b uni1D0B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d0c uni1D0C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d0d uni1D0D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d0e uni1D0E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d0f uni1D0F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d10 uni1D10 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d11 uni1D11 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d12 uni1D12 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d13 uni1D13 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) +U+1d0a uni1D0A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d0b uni1D0B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d0c uni1D0C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d0d uni1D0D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d0e uni1D0E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d0f uni1D0F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d10 uni1D10 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d11 uni1D11 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d12 uni1D12 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d13 uni1D13 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d14 uni1D14 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) +U+1d15 uni1D15 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d16 uni1D16 2.3 U+1d17 uni1D17 2.3 -U+1d18 uni1D18 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d19 uni1D19 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+1d1a uni1D1A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+1d1b uni1D1B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d1c uni1D1C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1d18 uni1D18 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d19 uni1D19 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d1a uni1D1A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d1b uni1D1B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d1c uni1D1C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d1d uni1D1D 2.3 U+1d1e uni1D1E 2.3 U+1d1f uni1D1F 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+1d20 uni1D20 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d21 uni1D21 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d22 uni1D22 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d23 uni1D23 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d26 uni1D26 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d27 uni1D27 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d28 uni1D28 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+1d29 uni1D29 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d2a uni1D2A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d2b uni1D2B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) +U+1d20 uni1D20 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d21 uni1D21 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d22 uni1D22 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d23 uni1D23 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d24 uni1D24 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d25 uni1D25 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d26 uni1D26 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d27 uni1D27 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d28 uni1D28 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d29 uni1D29 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d2a uni1D2A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d2b uni1D2B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d2c uni1D2C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d2d uni1D2D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d2e uni1D2E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) +U+1d2f uni1D2F 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d30 uni1D30 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d31 uni1D31 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d32 uni1D32 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) @@ -2203,7 +2209,7 @@ U+1d39 uni1D39 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Obliq U+1d3a uni1D3A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d3b uni1D3B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d3c uni1D3C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3d uni1D3D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono Oblique) +U+1d3d uni1D3D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d3e uni1D3E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d3f uni1D3F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d40 uni1D40 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) @@ -2234,23 +2240,26 @@ U+1d58 uni1D58 2.3 U+1d59 uni1D59 2.3 U+1d5a uni1D5A 2.3 U+1d5b uni1D5B 2.3 -U+1d5d uni1D5D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d5e uni1D5E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d5f uni1D5F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d60 uni1D60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d61 uni1D61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) +U+1d5c uni1D5C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d5d uni1D5D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d5e uni1D5E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d5f uni1D5F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d60 uni1D60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d61 uni1D61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d62 uni1D62 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d63 uni1D63 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d64 uni1D64 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d65 uni1D65 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d66 uni1D66 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d67 uni1D67 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d68 uni1D68 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d69 uni1D69 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+1d6a uni1D6A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) +U+1d66 uni1D66 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d67 uni1D67 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d68 uni1D68 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d69 uni1D69 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d6a uni1D6A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1d6b uni1D6B 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1d77 uni1D77 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1d78 uni1D78 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+1d7b uni1D7B 2.3 +U+1d7d uni1D7D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+1d85 uni1D85 2.3 U+1d9b uni1D9B 2.3 U+1d9c uni1D9C 2.3 @@ -2281,7 +2290,7 @@ U+1db4 uni1DB4 2.3 U+1db5 uni1DB5 2.3 U+1db6 uni1DB6 2.3 U+1db7 uni1DB7 2.3 -U+1db8 uni1DB8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) +U+1db8 uni1DB8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1db9 uni1DB9 2.3 U+1dba uni1DBA 2.3 U+1dbb uni1DBB 2.3 @@ -2341,8 +2350,8 @@ U+1e2a uni1E2A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+1e2b uni1E2B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1e2c uni1E2C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1e2d uni1E2D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2e uni1E2E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1e2f uni1E2F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) +U+1e2e uni1E2E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1e2f uni1E2F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1e30 uni1E30 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1e31 uni1E31 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1e32 uni1E32 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) @@ -2373,8 +2382,8 @@ U+1e4a uni1E4A 1.13 U+1e4b uni1E4B 1.13 U+1e4c uni1E4C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+1e4d uni1E4D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1e4e uni1E4E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1e4f uni1E4F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) +U+1e4e uni1E4E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1e4f uni1E4F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1e50 uni1E50 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1e51 uni1E51 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1e52 uni1E52 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) @@ -2395,10 +2404,10 @@ U+1e60 uni1E60 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+1e61 uni1E61 2.1 U+1e62 uni1E62 2.1 U+1e63 uni1E63 2.1 -U+1e64 uni1E64 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+1e65 uni1E65 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+1e66 uni1E66 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1e67 uni1E67 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) +U+1e64 uni1E64 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1e65 uni1E65 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1e66 uni1E66 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1e67 uni1E67 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1e68 uni1E68 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1e69 uni1E69 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1e6a uni1E6A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) @@ -2451,20 +2460,22 @@ U+1e98 uni1E98 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+1e99 uni1E99 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+1e9a uni1E9A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1e9b uni1E9B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e9e uni1E9E 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) +U+1e9c uni1E9C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1e9d uni1E9D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1e9e uni1E9E 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.32 (Sans ExtraLight) U+1e9f uni1E9F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+1ea0 uni1EA0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1ea1 uni1EA1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1ea2 uni1EA2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1ea3 uni1EA3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ea4 uni1EA4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ea5 uni1EA5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ea6 uni1EA6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ea7 uni1EA7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ea8 uni1EA8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ea9 uni1EA9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1eaa uni1EAA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1eab uni1EAB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) +U+1ea4 uni1EA4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ea5 uni1EA5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ea6 uni1EA6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ea7 uni1EA7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ea8 uni1EA8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ea9 uni1EA9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eaa uni1EAA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eab uni1EAB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1eac uni1EAC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+1ead uni1EAD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+1eae uni1EAE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) @@ -2483,14 +2494,14 @@ U+1eba uni1EBA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+1ebb uni1EBB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1ebc uni1EBC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1ebd uni1EBD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ebe uni1EBE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ebf uni1EBF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ec0 uni1EC0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ec1 uni1EC1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ec2 uni1EC2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ec3 uni1EC3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ec4 uni1EC4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ec5 uni1EC5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) +U+1ebe uni1ebe 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ebf uni1ebF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ec0 uni1EC0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ec1 uni1EC1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ec2 uni1EC2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ec3 uni1EC3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ec4 uni1EC4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ec5 uni1EC5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1ec6 uni1EC6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+1ec7 uni1EC7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+1ec8 uni1EC8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) @@ -2501,40 +2512,40 @@ U+1ecc uni1ECC 2.2 U+1ecd uni1ECD 2.2 U+1ece uni1ECE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1ecf uni1ECF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ed0 uni1ED0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ed1 uni1ED1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ed2 uni1ED2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ed3 uni1ED3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ed4 uni1ED4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ed5 uni1ED5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ed6 uni1ED6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ed7 uni1ED7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) +U+1ed0 uni1ED0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ed1 uni1ED1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ed2 uni1ED2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ed3 uni1ED3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ed4 uni1ED4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ed5 uni1ED5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ed6 uni1ED6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ed7 uni1ED7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1ed8 uni1ED8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+1ed9 uni1ED9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eda uni1EDA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1edb uni1EDB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1edc uni1EDC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1edd uni1EDD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ede uni1EDE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1edf uni1EDF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1ee0 uni1EE0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ee1 uni1EE1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ee2 uni1EE2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ee3 uni1EE3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+1eda uni1EDA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1edb uni1EDB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1edc uni1EDC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1edd uni1EDD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ede uni1EDE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1edf uni1EDF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ee0 uni1EE0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ee1 uni1EE1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ee2 uni1EE2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ee3 uni1EE3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1ee4 uni1EE4 2.2 U+1ee5 uni1EE5 2.2 U+1ee6 uni1EE6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1ee7 uni1EE7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ee8 uni1EE8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ee9 uni1EE9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eea uni1EEA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eeb uni1EEB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eec uni1EEC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1eed uni1EED 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+1eee uni1EEE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eef uni1EEF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ef0 uni1EF0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ef1 uni1EF1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+1ee8 uni1EE8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ee9 uni1EE9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eea uni1EEA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eeb uni1EEB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eec uni1EEC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eed uni1EED 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eee uni1EEE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1eef uni1EEF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ef0 uni1EF0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1ef1 uni1EF1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1ef2 Ygrave 1.2 U+1ef3 ygrave 1.2 U+1ef4 uni1EF4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) @@ -2543,6 +2554,8 @@ U+1ef6 uni1EF6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+1ef7 uni1EF7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1ef8 uni1EF8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+1ef9 uni1EF9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) +U+1efa uni1EFA 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+1efb uni1EFB 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+1f00 uni1F00 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1f01 uni1F01 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) U+1f02 uni1F02 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) @@ -2816,6 +2829,8 @@ U+2024 onedotenleader 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+2025 twodotenleader 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+2026 ellipsis original U+2027 uni2027 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+2028 uni2028 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) +U+2029 uni2029 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) U+202a uni202A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+202b uni202B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+202c uni202C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) @@ -2849,7 +2864,7 @@ U+2047 uni2047 2.0 U+2048 uni2048 2.0 U+2049 uni2049 2.0 U+204a uni204A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+204b uni204B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) +U+204b uni204B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+204c uni204C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+204d uni204D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+204e uni204E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) @@ -2915,6 +2930,14 @@ U+2091 uni2091 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Obliq U+2092 uni2092 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+2093 uni2093 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) U+2094 uni2094 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) +U+2095 uni2095 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2096 uni2096 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2097 uni2097 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2098 uni2098 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2099 uni2099 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+209a uni209A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+209b uni209B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+209c uni209C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+20a0 uni20A0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+20a1 colonmonetary 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+20a2 uni20A2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) @@ -2937,6 +2960,8 @@ U+20b2 uni20B2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Obliq U+20b3 uni20B3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+20b4 uni20B4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+20b5 uni20B5 2.2 +U+20b8 uni20B8 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) +U+20b9 uni20B9 2.32 U+20d0 uni20D0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) U+20d1 uni20D1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) U+20d6 uni20D6 2.8 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) @@ -3019,6 +3044,9 @@ U+2148 uni2148 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Obliq U+2149 uni2149 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) U+214b uni214B 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+214e uni214E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+2150 uni2150 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2151 uni2151 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2152 uni2152 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+2153 onethird 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+2154 twothirds 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+2155 uni2155 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) @@ -3065,10 +3093,12 @@ U+217d uni217D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+217e uni217E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+217f uni217F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+2180 uni2180 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2181 uni2181 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2182 uni2182 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) +U+2181 uni2181 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) +U+2182 uni2182 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) U+2183 uni2183 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+2184 uni2184 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) +U+2185 uni2185 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2189 uni2189 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+2190 arrowleft 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+2191 arrowup 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) U+2192 arrowright 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) @@ -3343,10 +3373,10 @@ U+229e uni229E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+229f uni229F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+22a0 uni22A0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+22a1 uni22A1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a2 uni22A2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a3 uni22A3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a4 uni22A4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a5 perpendicular 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) +U+22a2 uni22A2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+22a3 uni22A3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+22a4 uni22A4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) +U+22a5 perpendicular 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+22a6 uni22A6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+22a7 uni22A7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+22a8 uni22A8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) @@ -3539,30 +3569,31 @@ U+238a uni238A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Obli U+238b uni238B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) U+2394 uni2394 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) U+2395 uni2395 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+239b uni239B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+239c uni239C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+239d uni239D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+239e uni239E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+239f uni239F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a0 uni23A0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a1 uni23A1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a2 uni23A2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a3 uni23A3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a4 uni23A4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a5 uni23A5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a6 uni23A6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a7 uni23A7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a8 uni23A8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23a9 uni23A9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23aa uni23AA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23ab uni23AB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23ac uni23AC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23ad uni23AD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) +U+239b uni239B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+239c uni239C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+239d uni239D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+239e uni239E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+239f uni239F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a0 uni23A0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a1 uni23A1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a2 uni23A2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a3 uni23A3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a4 uni23A4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a5 uni23A5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a6 uni23A6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a7 uni23A7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a8 uni23A8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23a9 uni23A9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23aa uni23AA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23ab uni23AB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23ac uni23AC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+23ad uni23AD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+23ae uni23AE 2.3 U+23ce uni23CE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) U+23cf uni23CF 2.3 U+23e3 uni23E3 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) U+23e5 uni23E5 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) +U+23e8 uni23E8 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+2422 uni2422 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+2423 uni2423 1.6 U+2460 uni2460 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) @@ -4013,6 +4044,11 @@ U+26b5 uni26B5 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Conde U+26b6 uni26B6 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+26b7 uni26B7 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+26b8 uni26B8 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+26c0 uni26C0 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+26c1 uni26C1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+26c2 uni26C2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+26c3 uni26C3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+26e2 uni26E2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+2701 uni2701 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) U+2702 uni2702 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) U+2703 uni2703 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) @@ -4717,10 +4753,10 @@ U+2b23 uni2B23 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Conde U+2b24 uni2B24 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) U+2b53 uni2B53 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) U+2b54 uni2B54 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2c60 uni2C60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c61 uni2C61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) +U+2c60 uni2C60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+2c61 uni2C61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+2c62 uni2C62 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c63 uni2C63 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) +U+2c63 uni2C63 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+2c64 uni2C64 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) U+2c65 uni2C65 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) U+2c66 uni2C66 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) @@ -4962,50 +4998,80 @@ U+a71c uniA71C 2.27 U+a71d uniA71D 2.27 U+a71e uniA71E 2.27 U+a71f uniA71F 2.27 -U+a726 uniA726 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+a727 uniA727 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+a728 uniA728 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a729 uniA729 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a72a uniA72A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a72b uniA72B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a730 uniA730 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a731 uniA731 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a732 uniA732 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a733 uniA733 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a734 uniA734 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a735 uniA735 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a736 uniA736 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a737 uniA737 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a738 uniA738 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a739 uniA739 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a73a uniA73A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a73b uniA73B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a73c uniA73C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a73d uniA73D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a73e uniA73E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a73f uniA73F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a746 uniA746 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a747 uniA747 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) +U+a722 uniA722 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) +U+a723 uniA723 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) +U+a724 uniA724 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) +U+a725 uniA725 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) +U+a726 uniA726 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a727 uniA727 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a728 uniA728 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a729 uniA729 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a72a uniA72A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a72b uniA72B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a72c uniA72C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a72d uniA72D 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a72e uniA72E 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a72f uniA72F 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a730 uniA730 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a731 uniA731 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a732 uniA732 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a733 uniA733 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a734 uniA734 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a735 uniA735 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a736 uniA736 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a737 uniA737 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a738 uniA738 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a739 uniA739 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a73a uniA73A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a73b uniA73B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a73c uniA73C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a73d uniA73D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a73e uniA73E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a73f uniA73F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a746 uniA746 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a747 uniA747 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+a748 uniA748 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+a749 uniA749 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a74a uniA74A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a74b uniA74B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a74e uniA74E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a74f uniA74F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a780 uniA780 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a781 uniA781 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a782 uniA782 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a783 uniA783 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a74a uniA74A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a74b uniA74B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a74e uniA74E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a74f uniA74F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a750 uniA750 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a751 uniA751 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a752 uniA752 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a753 uniA753 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a756 uniA756 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a757 uniA757 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a764 uniA764 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a765 uniA765 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a766 uniA766 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a767 uniA767 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+a768 uniA768 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a769 uniA769 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a77b uniA77B 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a77c uniA77C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a780 uniA780 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a781 uniA781 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a782 uniA782 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a783 uniA783 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a784 uniA784 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a785 uniA785 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a786 uniA786 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a787 uniA787 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+a789 uniA789 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) U+a78a uniA78A 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) U+a78b uniA78B 2.26 U+a78c uniA78C 2.26 U+a78d uniA78D 2.31 -U+a7fb uniA7FB 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a7fc uniA7FC 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a7fd uniA7FD 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a7fe uniA7FE 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a7ff uniA7FF 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) +U+a78e uniA78E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) +U+a790 uniA790 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a791 uniA791 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a7fa uniA7FA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a7fb uniA7FB 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a7fc uniA7FC 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a7fd uniA7FD 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a7fe uniA7FE 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) +U+a7ff uniA7FF 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) U+e000 uniE000 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) U+e001 uniE001 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) U+e002 uniE002 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) @@ -5036,8 +5102,36 @@ U+e01a uniE01A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+e01b uniE01B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+e01c uniE01C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+e01d uniE01D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef00 uni02E5.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef01 uni02E6.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef02 uni02E7.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef03 uni02E8.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef04 uni02E9.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef05 uni02E5.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef06 uni02E6.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef07 uni02E7.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef08 uni02E8.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef09 uni02E9.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef0a uni02E5.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef0b uni02E6.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef0c uni02E7.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef0d uni02E8.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef0e uni02E9.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef0f uni02E5.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef10 uni02E6.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef11 uni02E7.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef12 uni02E8.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef13 uni02E9.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef14 uni02E5.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef15 uni02E6.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef16 uni02E7.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef17 uni02E8.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef18 uni02E9.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+ef19 stem 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+f000 uniF000 2.10 (Sans) 2.11 (Sans Condensed) U+f001 uniF001 2.10 (Sans) 2.11 (Sans Condensed) +U+f002 uniF002 2.33 (Sans, Sans Condensed) +U+f003 uniF003 2.33 (Sans, Sans Condensed) U+f208 uniF208 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+f20a uniF20A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+f215 uniF215 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) @@ -5132,17 +5226,21 @@ U+fb33 uniFB33 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Conden U+fb34 uniFB34 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb35 uniFB35 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb36 uniFB36 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb37 uniFB37 2.11 (Sans Condensed Oblique, Sans Oblique) +U+fb37 uniFB37 2.11 (Sans Condensed Oblique, Sans Oblique) 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique) U+fb38 uniFB38 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb39 uniFB39 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb3a uniFB3A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb3b uniFB3B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb3c uniFB3C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+fb3d uniFB3D 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb3e uniFB3E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+fb3f uniFB3F 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb40 uniFB40 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb41 uniFB41 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+fb42 uniFB42 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb43 uniFB43 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb44 uniFB44 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+fb45 uniFB45 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb46 uniFB46 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb47 uniFB47 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+fb48 uniFB48 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) @@ -5417,6 +5515,41 @@ U+fffa uniFFFA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Conde U+fffb uniFFFB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+fffc uniFFFC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) U+fffd uniFFFD 1.12 +U+10300 u10300 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10301 u10301 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10302 u10302 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10303 u10303 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10304 u10304 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10305 u10305 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10306 u10306 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10307 u10307 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10308 u10308 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10309 u10309 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1030a u1030A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1030b u1030B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1030c u1030C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1030d u1030D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1030e u1030E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1030f u1030F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10310 u10310 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10311 u10311 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10312 u10312 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10313 u10313 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10314 u10314 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10315 u10315 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10316 u10316 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10317 u10317 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10318 u10318 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10319 u10319 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1031a u1031A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1031b u1031B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1031c u1031C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1031d u1031D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1031e u1031E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10320 u10320 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10321 u10321 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10322 u10322 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+10323 u10323 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+1d300 u1D300 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+1d301 u1D301 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) U+1d302 u1D302 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) @@ -6308,3 +6441,217 @@ U+1d7fc u1D7FC 2.23 (Sans Mono) U+1d7fd u1D7FD 2.23 (Sans Mono) U+1d7fe u1D7FE 2.23 (Sans Mono) U+1d7ff u1D7FF 2.23 (Sans Mono) +U+1f030 u1F030 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f031 u1F031 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f032 u1F032 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f033 u1F033 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f034 u1F034 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f035 u1F035 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f036 u1F036 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f037 u1F037 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f038 u1F038 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f039 u1F039 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f03a u1F03A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f03b u1F03B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f03c u1F03C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f03d u1F03D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f03e u1F03E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f03f u1F03F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f040 u1F040 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f041 u1F041 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f042 u1F042 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f043 u1F043 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f044 u1F044 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f045 u1F045 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f046 u1F046 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f047 u1F047 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f048 u1F048 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f049 u1F049 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f04a u1F04A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f04b u1F04B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f04c u1F04C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f04d u1F04D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f04e u1F04E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f04f u1F04F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f050 u1F050 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f051 u1F051 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f052 u1F052 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f053 u1F053 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f054 u1F054 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f055 u1F055 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f056 u1F056 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f057 u1F057 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f058 u1F058 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f059 u1F059 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f05a u1F05A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f05b u1F05B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f05c u1F05C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f05d u1F05D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f05e u1F05E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f05f u1F05F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f060 u1F060 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f061 u1F061 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f062 u1F062 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f063 u1F063 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f064 u1F064 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f065 u1F065 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f066 u1F066 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f067 u1F067 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f068 u1F068 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f069 u1F069 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f06a u1F06A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f06b u1F06B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f06c u1F06C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f06d u1F06D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f06e u1F06E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f06f u1F06F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f070 u1F070 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f071 u1F071 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f072 u1F072 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f073 u1F073 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f074 u1F074 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f075 u1F075 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f076 u1F076 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f077 u1F077 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f078 u1F078 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f079 u1F079 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f07a u1F07A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f07b u1F07B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f07c u1F07C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f07d u1F07D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f07e u1F07E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f07f u1F07F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f080 u1F080 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f081 u1F081 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f082 u1F082 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f083 u1F083 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f084 u1F084 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f085 u1F085 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f086 u1F086 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f087 u1F087 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f088 u1F088 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f089 u1F089 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f08a u1F08A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f08b u1F08B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f08c u1F08C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f08d u1F08D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f08e u1F08E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f08f u1F08F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f090 u1F090 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f091 u1F091 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f092 u1F092 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f093 u1F093 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a0 u1F0A0 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a1 u1F0A1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a2 u1F0A2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a3 u1F0A3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a4 u1F0A4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a5 u1F0A5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a6 u1F0A6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a7 u1F0A7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a8 u1F0A8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0a9 u1F0A9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0aa u1F0AA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0ab u1F0AB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0ac u1F0AC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0ad u1F0AD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0ae u1F0AE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b1 u1F0B1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b2 u1F0B2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b3 u1F0B3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b4 u1F0B4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b5 u1F0B5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b6 u1F0B6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b7 u1F0B7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b8 u1F0B8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0b9 u1F0B9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0ba u1F0BA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0bb u1F0BB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0bc u1F0BC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0bd u1F0BD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0be u1F0BE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c1 u1F0C1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c2 u1F0C2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c3 u1F0C3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c4 u1F0C4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c5 u1F0C5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c6 u1F0C6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c7 u1F0C7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c8 u1F0C8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0c9 u1F0C9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0ca u1F0CA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0cb u1F0CB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0cc u1F0CC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0cd u1F0CD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0ce u1F0CE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0cf u1F0CF 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d1 u1F0D1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d2 u1F0D2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d3 u1F0D3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d4 u1F0D4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d5 u1F0D5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d6 u1F0D6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d7 u1F0D7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d8 u1F0D8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0d9 u1F0D9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0da u1F0DA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0db u1F0DB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0dc u1F0DC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0dd u1F0DD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0de u1F0DE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f0df u1F0DF 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f42d u1F42D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f42e u1F42E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f431 u1F431 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f435 u1F435 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f601 u1F601 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f602 u1F602 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f603 u1F603 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f604 u1F604 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f605 u1F605 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f606 u1F606 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f607 u1F607 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f608 u1F608 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f609 u1F609 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f60a u1F60A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f60b u1F60B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f60c u1F60C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f60d u1F60D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f60e u1F60E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f60f u1F60F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f610 u1F610 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f612 u1F612 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f613 u1F613 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f614 u1F614 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f616 u1F616 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f618 u1F618 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f61a u1F61A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f61c u1F61C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f61d u1F61D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f61e u1F61E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f620 u1F620 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f621 u1F621 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f622 u1F622 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f623 u1F623 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f625 u1F625 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f628 u1F628 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f629 u1F629 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f62a u1F62A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f62b u1F62B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f62d u1F62D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f630 u1F630 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f631 u1F631 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f632 u1F632 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f633 u1F633 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f635 u1F635 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f636 u1F636 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f637 u1F637 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f638 u1F638 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f639 u1F639 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f63a u1F63A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f63b u1F63B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f63c u1F63C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f63d u1F63D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f63e u1F63E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f63f u1F63F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) +U+1f640 u1F640 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) diff --git a/media/fonts/doc/DejaVu_unicover.txt b/media/fonts/doc/DejaVu_unicover.txt index 81ce70338e9..42c212253f8 100644 --- a/media/fonts/doc/DejaVu_unicover.txt +++ b/media/fonts/doc/DejaVu_unicover.txt @@ -1,5 +1,5 @@ This is the Unicode coverage file for DejaVu fonts -($Id: unicover.txt 2383 2010-05-27 09:23:21Z ben_laenen $) +($Id$) Control and similar characters are discounted from totals. @@ -7,38 +7,39 @@ Control and similar characters are discounted from totals. U+0000 Basic Latin 100% (95/95) 100% (95/95) 100% (95/95) U+0080 Latin-1 Supplement 100% (96/96) 100% (96/96) 100% (96/96) U+0100 Latin Extended-A 100% (128/128) 100% (128/128) 100% (128/128) -U+0180 Latin Extended-B 100% (208/208) 91% (191/208) 86% (179/208) +U+0180 Latin Extended-B 100% (208/208) 100% (208/208) 86% (180/208) U+0250 IPA Extensions 100% (96/96) 100% (96/96) 100% (96/96) -U+02b0 Spacing Modifier Letters 78% (63/80) 56% (45/80) 60% (48/80) +U+02b0 Spacing Modifier Letters 78% (63/80) 57% (46/80) 60% (48/80) U+0300 Combining Diacritical Marks 83% (93/112) 60% (68/112) 59% (67/112) -U+0370 Greek and Coptic 100% (134/134) 85% (115/134) 82% (110/134) +U+0370 Greek and Coptic 100% (134/134) 89% (120/134) 82% (110/134) U+0400 Cyrillic 100% (256/256) 78% (200/256) 70% (180/256) -U+0500 Cyrillic Supplement 94% (36/38) 26% (10/38) 15% (6/38) -U+0530 Armenian 100% (86/86) (0/86) (0/86) +U+0500 Cyrillic Supplement 95% (38/40) 25% (10/40) 15% (6/40) +U+0530 Armenian 100% (86/86) 100% (86/86) 100% (86/86) U+0590 Hebrew 62% (54/87) (0/87) (0/87) -U+0600 Arabic 64% (161/250) (0/250) 39% (99/250) +U+0600 Arabic 63% (161/252) (0/252) 39% (99/252) U+0700 Syriac (0/77) (0/77) (0/77) U+0750 Arabic Supplement (0/48) (0/48) (0/48) U+0780 Thaana (0/50) (0/50) (0/50) U+07c0 NKo 91% (54/59) (0/59) (0/59) U+0800 Samaritan (0/61) (0/61) (0/61) -U+0900 Devanagari (0/117) (0/117) (0/117) +U+0840 Mandaic (0/29) (0/29) (0/29) +U+0900 Devanagari (0/127) (0/127) (0/127) U+0980 Bengali (0/92) (0/92) (0/92) U+0a00 Gurmukhi (0/79) (0/79) (0/79) U+0a80 Gujarati (0/83) (0/83) (0/83) -U+0b00 Oriya (0/84) (0/84) (0/84) +U+0b00 Oriya (0/90) (0/90) (0/90) U+0b80 Tamil (0/72) (0/72) (0/72) U+0c00 Telugu (0/93) (0/93) (0/93) U+0c80 Kannada (0/86) (0/86) (0/86) -U+0d00 Malayalam (0/95) (0/95) (0/95) +U+0d00 Malayalam (0/98) (0/98) (0/98) U+0d80 Sinhala (0/80) (0/80) (0/80) U+0e00 Thai 1% (1/87) (0/87) (0/87) U+0e80 Lao 100% (65/65) (0/65) 70% (46/65) -U+0f00 Tibetan (0/205) (0/205) (0/205) +U+0f00 Tibetan (0/211) (0/211) (0/211) U+1000 Myanmar (0/160) (0/160) (0/160) U+10a0 Georgian 100% (83/83) 100% (83/83) 54% (45/83) U+1100 Hangul Jamo (0/256) (0/256) (0/256) -U+1200 Ethiopic (0/356) (0/356) (0/356) +U+1200 Ethiopic (0/358) (0/358) (0/358) U+1380 Ethiopic Supplement (0/26) (0/26) (0/26) U+13a0 Cherokee (0/85) (0/85) (0/85) U+1400 Unified Canadian Aboriginal Syllabics 63% (404/640) (0/640) (0/640) @@ -59,32 +60,33 @@ U+1a00 Buginese (0/30) (0/30) U+1a20 Tai Tham (0/127) (0/127) (0/127) U+1b00 Balinese (0/121) (0/121) (0/121) U+1b80 Sundanese (0/55) (0/55) (0/55) +U+1bc0 Batak (0/56) (0/56) (0/56) U+1c00 Lepcha (0/74) (0/74) (0/74) U+1c50 Ol Chiki (0/48) (0/48) (0/48) U+1cd0 Vedic Extensions (0/35) (0/35) (0/35) -U+1d00 Phonetic Extensions 82% (105/128) 48% (62/128) 48% (62/128) -U+1d80 Phonetic Extensions Supplement 59% (38/64) 57% (37/64) 57% (37/64) -U+1dc0 Combining Diacritical Marks Supplement 14% (6/42) 14% (6/42) (0/42) -U+1e00 Latin Extended Additional 96% (248/256) 76% (196/256) 71% (182/256) +U+1d00 Phonetic Extensions 82% (106/128) 86% (111/128) 48% (62/128) +U+1d80 Phonetic Extensions Supplement 59% (38/64) 59% (38/64) 57% (37/64) +U+1dc0 Combining Diacritical Marks Supplement 13% (6/43) 13% (6/43) (0/43) +U+1e00 Latin Extended Additional 98% (252/256) 98% (252/256) 71% (182/256) U+1f00 Greek Extended 100% (233/233) 100% (233/233) 100% (233/233) -U+2000 General Punctuation 98% (105/107) 81% (87/107) 47% (51/107) -U+2070 Superscripts and Subscripts 100% (34/34) 100% (34/34) 100% (34/34) -U+20a0 Currency Symbols 88% (22/25) 24% (6/25) 88% (22/25) +U+2000 General Punctuation 100% (107/107) 81% (87/107) 48% (52/107) +U+2070 Superscripts and Subscripts 100% (42/42) 100% (42/42) 100% (42/42) +U+20a0 Currency Symbols 92% (24/26) 26% (7/26) 92% (24/26) U+20d0 Combining Diacritical Marks for Symbols 21% (7/33) (0/33) (0/33) U+2100 Letterlike Symbols 93% (75/80) 40% (32/80) 21% (17/80) -U+2150 Number Forms 86% (50/58) 86% (50/58) 22% (13/58) +U+2150 Number Forms 94% (55/58) 94% (55/58) 22% (13/58) U+2190 Arrows 100% (112/112) 100% (112/112) 100% (112/112) -U+2200 Mathematical Operators 100% (256/256) 39% (100/256) 60% (155/256) -U+2300 Miscellaneous Technical 27% (64/233) 6% (16/233) 50% (117/233) +U+2200 Mathematical Operators 100% (256/256) 39% (100/256) 62% (159/256) +U+2300 Miscellaneous Technical 26% (65/244) 14% (35/244) 47% (117/244) U+2400 Control Pictures 5% (2/39) 2% (1/39) 2% (1/39) U+2440 Optical Character Recognition (0/11) (0/11) (0/11) U+2460 Enclosed Alphanumerics 6% (10/160) (0/160) (0/160) U+2500 Box Drawing 100% (128/128) 100% (128/128) 100% (128/128) U+2580 Block Elements 100% (32/32) 100% (32/32) 100% (32/32) U+25a0 Geometric Shapes 100% (96/96) 100% (96/96) 100% (96/96) -U+2600 Miscellaneous Symbols 72% (182/250) 12% (30/250) 59% (149/250) -U+2700 Dingbats 99% (174/175) 0% (1/175) 82% (144/175) -U+27c0 Miscellaneous Mathematical Symbols-A 20% (9/44) 11% (5/44) 11% (5/44) +U+2600 Miscellaneous Symbols 73% (187/256) 11% (30/256) 58% (149/256) +U+2700 Dingbats 91% (174/191) 0% (1/191) 75% (144/191) +U+27c0 Miscellaneous Mathematical Symbols-A 19% (9/46) 10% (5/46) 10% (5/46) U+27f0 Supplemental Arrows-A 100% (16/16) 100% (16/16) (0/16) U+2800 Braille Patterns 100% (256/256) 100% (256/256) (0/256) U+2900 Supplemental Arrows-B 4% (6/128) 100% (128/128) (0/128) @@ -92,10 +94,10 @@ U+2980 Miscellaneous Mathematical Symbols-B 10% (13/128) 0% (1/128) U+2a00 Supplemental Mathematical Operators 28% (72/256) 1% (4/256) 0% (1/256) U+2b00 Miscellaneous Symbols and Arrows 40% (35/87) 31% (27/87) 10% (9/87) U+2c00 Glagolitic (0/94) (0/94) (0/94) -U+2c60 Latin Extended-C 96% (31/32) 71% (23/32) 43% (14/32) +U+2c60 Latin Extended-C 96% (31/32) 81% (26/32) 43% (14/32) U+2c80 Coptic (0/121) (0/121) (0/121) U+2d00 Georgian Supplement (0/38) 100% (38/38) (0/38) -U+2d30 Tifinagh 100% (55/55) (0/55) (0/55) +U+2d30 Tifinagh 96% (55/57) (0/57) (0/57) U+2d80 Ethiopic Extended (0/79) (0/79) (0/79) U+2de0 Cyrillic Extended-A (0/32) (0/32) (0/32) U+2e00 Supplemental Punctuation 12% (6/50) 12% (6/50) 12% (6/50) @@ -108,7 +110,7 @@ U+30a0 Katakana (0/96) (0/96) U+3100 Bopomofo (0/41) (0/41) (0/41) U+3130 Hangul Compatibility Jamo (0/94) (0/94) (0/94) U+3190 Kanbun (0/16) (0/16) (0/16) -U+31a0 Bopomofo Extended (0/24) (0/24) (0/24) +U+31a0 Bopomofo Extended (0/27) (0/27) (0/27) U+31c0 CJK Strokes (0/36) (0/36) (0/36) U+31f0 Katakana Phonetic Extensions (0/16) (0/16) (0/16) U+3200 Enclosed CJK Letters and Months (0/254) (0/254) (0/254) @@ -120,10 +122,10 @@ U+a000 Yi Syllables (0/1165) (0/1165) U+a490 Yi Radicals (0/55) (0/55) (0/55) U+a4d0 Lisu (0/48) (0/48) (0/48) U+a500 Vai (0/300) (0/300) (0/300) -U+a640 Cyrillic Extended-B 39% (31/78) 12% (10/78) (0/78) +U+a640 Cyrillic Extended-B 38% (31/80) 12% (10/80) (0/80) U+a6a0 Bamum (0/88) (0/88) (0/88) U+a700 Modifier Tone Letters 62% (20/32) 62% (20/32) 62% (20/32) -U+a720 Latin Extended-D 37% (43/114) 1% (2/114) 5% (6/114) +U+a720 Latin Extended-D 48% (62/129) 42% (55/129) 10% (14/129) U+a800 Syloti Nagri (0/44) (0/44) (0/44) U+a830 Common Indic Number Forms (0/10) (0/10) (0/10) U+a840 Phags-pa (0/56) (0/56) (0/56) @@ -136,6 +138,7 @@ U+a980 Javanese (0/91) (0/91) U+aa00 Cham (0/83) (0/83) (0/83) U+aa60 Myanmar Extended-A (0/28) (0/28) (0/28) U+aa80 Tai Viet (0/72) (0/72) (0/72) +U+ab00 Ethiopic Extended-A (0/33) (0/33) (0/33) U+abc0 Meetei Mayek (0/56) (0/56) (0/56) U+ac00 Hangul Syllables (0/0) (0/0) (0/0) U+d7b0 Hangul Jamo Extended-B (0/72) (0/72) (0/72) @@ -145,7 +148,7 @@ U+dc00 Low Surrogates (0/0) (0/0) U+e000 Private Use Area (0/0) (0/0) (0/0) U+f900 CJK Compatibility Ideographs (0/470) (0/470) (0/470) U+fb00 Alphabetic Presentation Forms 100% (58/58) 12% (7/58) 3% (2/58) -U+fb50 Arabic Presentation Forms-A 16% (98/595) (0/595) 12% (72/595) +U+fb50 Arabic Presentation Forms-A 16% (98/611) (0/611) 11% (72/611) U+fe00 Variation Selectors 100% (16/16) 100% (16/16) (0/16) U+fe10 Vertical Forms (0/10) (0/10) (0/10) U+fe20 Combining Half Marks 57% (4/7) (0/7) (0/7) @@ -162,7 +165,7 @@ U+10190 Ancient Symbols (0/12) (0/12) U+101d0 Phaistos Disc (0/46) (0/46) (0/46) U+10280 Lycian (0/29) (0/29) (0/29) U+102a0 Carian (0/49) (0/49) (0/49) -U+10300 Old Italic (0/35) (0/35) (0/35) +U+10300 Old Italic 100% (35/35) (0/35) (0/35) U+10330 Gothic (0/27) (0/27) (0/27) U+10380 Ugaritic (0/31) (0/31) (0/31) U+103a0 Old Persian (0/50) (0/50) (0/50) @@ -180,10 +183,13 @@ U+10b40 Inscriptional Parthian (0/30) (0/30) U+10b60 Inscriptional Pahlavi (0/27) (0/27) (0/27) U+10c00 Old Turkic (0/73) (0/73) (0/73) U+10e60 Rumi Numeral Symbols (0/31) (0/31) (0/31) +U+11000 Brahmi (0/108) (0/108) (0/108) U+11080 Kaithi (0/66) (0/66) (0/66) U+12000 Cuneiform (0/879) (0/879) (0/879) U+12400 Cuneiform Numbers and Punctuation (0/103) (0/103) (0/103) U+13000 Egyptian Hieroglyphs (0/1071) (0/1071) (0/1071) +U+16800 Bamum Supplement (0/569) (0/569) (0/569) +U+1b000 Kana Supplement (0/2) (0/2) (0/2) U+1d000 Byzantine Musical Symbols (0/246) (0/246) (0/246) U+1d100 Musical Symbols (0/220) (0/220) (0/220) U+1d200 Ancient Greek Musical Notation (0/70) (0/70) (0/70) @@ -191,11 +197,17 @@ U+1d300 Tai Xuan Jing Symbols 100% (87/87) (0/87) U+1d360 Counting Rod Numerals (0/18) (0/18) (0/18) U+1d400 Mathematical Alphanumeric Symbols 11% (117/996) 5% (55/996) 6% (62/996) U+1f000 Mahjong Tiles (0/44) (0/44) (0/44) -U+1f030 Domino Tiles (0/100) (0/100) (0/100) -U+1f100 Enclosed Alphanumeric Supplement (0/63) (0/63) (0/63) -U+1f200 Enclosed Ideographic Supplement (0/44) (0/44) (0/44) +U+1f030 Domino Tiles 100% (100/100) (0/100) (0/100) +U+1f0a0 Playing Cards 100% (59/59) (0/59) (0/59) +U+1f100 Enclosed Alphanumeric Supplement (0/169) (0/169) (0/169) +U+1f200 Enclosed Ideographic Supplement (0/57) (0/57) (0/57) +U+1f300 Miscellaneous Symbols And Pictographs 0% (4/529) (0/529) (0/529) +U+1f600 Emoticons 80% (51/63) (0/63) (0/63) +U+1f680 Transport And Map Symbols (0/70) (0/70) (0/70) +U+1f700 Alchemical Symbols (0/116) (0/116) (0/116) U+20000 CJK Unified Ideographs Extension B (0/0) (0/0) (0/0) U+2a700 CJK Unified Ideographs Extension C (0/0) (0/0) (0/0) +U+2b740 CJK Unified Ideographs Extension D (0/0) (0/0) (0/0) U+2f800 CJK Compatibility Ideographs Supplement (0/542) (0/542) (0/542) U+e0000 Tags (0/98) (0/98) (0/98) U+e0100 Variation Selectors Supplement (0/240) (0/240) (0/240) diff --git a/media/fonts/doc/FreeFont_AUTHORS.txt b/media/fonts/doc/FreeFont_AUTHORS.txt new file mode 100644 index 00000000000..b4819582821 --- /dev/null +++ b/media/fonts/doc/FreeFont_AUTHORS.txt @@ -0,0 +1,235 @@ +-*- mode:text; coding:utf-8; -*- + GNU FreeFont Authors + ==================== + +The FreeFont collection is being maintained by + Steve White +The folowing list cites the other contributors that contributed to +particular ISO 10646 blocks. + +* URW++ Design & Development GmbH + + Basic Latin (U+0041-U+007A) + Latin-1 Supplement (U+00C0-U+00FF) (most) + Latin Extended-A (U+0100-U+017F) + Spacing Modifier Letters (U+02B0-U+02FF) + Mathematical Operators (U+2200-U+22FF) (parts) + Block Elements (U+2580-U+259F) + Dingbats (U+2700-U+27BF) + +* Yannis Haralambous and John + Plaice + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Greek (U+0370-U+03FF) + Armenian (U+0530-U+058F) + Hebrew (U+0590-U+05FF) + Arabic (U+0600-U+06FF) + Currency Symbols (U+20A0-U+20CF) + Arabic Presentation Forms-A (U+FB50-U+FDFF) + Arabic Presentation Forms-B (U+FE70-U+FEFF) + +* Yannis Haralambous and Wellcome Institute + + Sinhala (U+0D80-U+0DFF) + +* Young U. Ryu + + Arrows (U+2190-U+21FF) + Mathematical Symbols (U+2200-U+22FF) + Mathematical Alphanumeric Symbols (U+1D400-U+1D7FF) + +* Valek Filippov + + Cyrillic (U+0400-U+04FF) + +* Wadalab Kanji Comittee + + Hiragana (U+3040-U+309F) + Katakana (U+30A0-U+30FF) + +* Angelo Haritsis + + Greek (U+0370-U+03FF) + +* Yannis Haralambous and Virach Sornlertlamvanich + + Thai (U+0E00-U+0E7F) + +* Shaheed R. Haque + + Bengali (U+0980-U+09FF) + +* Sam Stepanyan + + Armenian (U+0530-U+058F) + +* Mohamed Ishan + + Thaana (U+0780-U+07BF) + +* Sushant Kumar Dash + + Oriya (U+0B00-U+0B7F) + +* Harsh Kumar + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + +* Prasad A. Chodavarapu + + Telugu (U+0C00-U+0C7F) + +* Frans Velthuis and Anshuman Pandey + + + Devanagari (U+0900-U+097F) + +* Hardip Singh Pannu + + Gurmukhi (U+0A00-U+0A7F) + +* Jeroen Hellingman + + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + +* Thomas Ridgeway + + Tamil (U+0B80-U+0BFF) + +* Berhanu Beyene <1beyene AT informatik.uni-hamburg.de>, + Prof. Dr. Manfred Kudlek , Olaf + Kummer , and Jochen Metzinger + + Ethiopic (U+1200-U+137F) + +* Maxim Iorsh + + Hebrew (U+0590-U+05FF) + +* Vyacheslav Dikonov + + Syriac (U+0700-U+074A) + Braille (U+2800-U+28FF) + +* Panayotis Katsaloulis + + Greek Extended (U+1F00-U+1FFF) + +* M.S. Sridhar + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Tamil (U+0B80-U+0BFF) + Telugu (U+0C00-U+0C7F) + Kannada (U+0C80-U+0CFF) + Malayalam (U+0D00-U+0D7F) + +* DMS Electronics, The Sri Lanka Tipitaka Project, and Noah Levitt + + + Sinhala (U+0D80-U+0DFF) + +* Dan Shurovich Chirkov + + Cyrillic (U+0400-U+04FF) + +* Abbas Izad + + Arabic (U+0600-U+06FF) + Arabic Presentation Forms-A (U+FB50-U+FDFF) + Arabic Presentation Forms-B (U+FE70-U+FEFF) + +* Denis Jacquerye + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + +* K.H. Hussain and R. Chitrajan + + Malayalam (U+0D00-U+0D7F) + +* Solaiman Karim and Omi Azad + + Bengali (U+0980-U+09FF) + +* Sonali Sonania and Monika Shah + + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + +* Pravin Satpute , Bageshri Salvi + , Rahul Bhalerao and Sandeep Shedmake + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + Tamil (U+0B80-U+0BFF) + +* Kulbir Singh Thind + + Gurmukhi (U+0A00-U+0A7F) + +* Gia Shervashidze + + Georgian (U+10A0-U+10FF) + +* Daniel Johnson + + Armenian (serif) (U+0530-U+058F) + Cherokee (U+13A0-U+13FF) + Unified Canadian Aboriginal Syllabics (U+1400-U+167F) + UCAS Extended (U+18B0-U+18F5) + Tifinagh (U+2D30-U+2D7F) + Vai (U+A500-U+A62B) + Latin Extended-D (Mayanist letters) (U+A720-U+A7FF) + Kayah Li (U+A900-U+A92F) + Osmanya (U+10480-U+104a7) + +* George Douros + + Gothic (U+10330-U+1034F) + Phoenecian (U+10900-U+1091F) + Byzantine Musical Symbols (U+1D000-U+1D0FF) + Western Musical Symbols (U+1D100-U+1D1DF) + Mathematical Alphanumeric Symbols (U+1D400-U+1D7FF) + Mah Jong Tiles (U+1F000-U+1F02B) + Dominoes (U+1F030-U+1F093) + +* Steve White + Glagolitic (U+2C00-U+2C5F) + Coptic (U+2C80-U+2CFF) + +* Pavel Skrylev is responsible for + Cyrillic Extended-A (U+2DEO-U+2DFF) + as well as many of the additions to + Cyrillic Extended-B (U+A640-U+A65F) + +* Mark Williamson + Made the MPH 2 Damase font, from which + Hanuno (U+1720-U+173F) + Buginese (U+1A00-U+1A1F) + Tai Le (U+1950-U+197F) + Ugaritic (U+10380-U+1039F) + Old Persian (U+103A0-U+103DF) + + +* Primo Peterlin + maintained FreeFont for several years, and is thanked for all his work. + +Please see the CREDITS file for details on who contributed particular +subsets of the glyphs in font files. + +-------------------------------------------------------------------------- +$Id: AUTHORS,v 1.23 2010/09/11 13:24:11 Stevan_White Exp $ diff --git a/media/fonts/doc/FreeFont_COPYING.txt b/media/fonts/doc/FreeFont_COPYING.txt new file mode 100644 index 00000000000..94a9ed024d3 --- /dev/null +++ b/media/fonts/doc/FreeFont_COPYING.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/media/fonts/doc/FreeFont_CREDITS.txt b/media/fonts/doc/FreeFont_CREDITS.txt new file mode 100644 index 00000000000..edc0b31f30f --- /dev/null +++ b/media/fonts/doc/FreeFont_CREDITS.txt @@ -0,0 +1,582 @@ +-*- mode:text; coding:utf-8; -*- + GNU FreeFont Credits + ==================== + +This file lists contributors and contributions to the GNU FreeFont project. + + +* URW++ Design & Development GmbH + +URW++ donated a set of 35 core PostScript Type 1 fonts to the +Ghostscript project , to be available +under the terms of GNU General Public License (GPL). + + Basic Latin (U+0041-U+007A) + Latin-1 Supplement (U+00C0-U+00FF) + Latin Extended-A (U+0100-U+017F) + Spacing Modifier Letters (U+02B0-U+02FF) + Mathematical Operators (U+2200-U+22FF) + Block Elements (U+2580-U+259F) + Dingbats (U+2700-U+27BF) + + +* Yannis Haralambous and John + Plaice + +Yannis Haralambous and John Plaice are the authors of Omega typesetting +system, . Omega is an extension of TeX. +Its first release, aims primarily at improving TeX's multilingual abilities. +In Omega all characters and pointers into data-structures are 16-bit wide, +instead of 8-bit, thereby eliminating many of the trivial limitations of TeX. +Omega also allows multiple input and output character sets, and uses +programmable filters to translate from one encoding to another, to perform +contextual analysis, etc. Internally, Omega uses the universal 16-bit Unicode +standard character set, based on ISO-10646. These improvements not only make +it a lot easier for TeX users to cope with multiple or complex languages, +like Arabic, Indic, Khmer, Chinese, Japanese or Korean, in one document, but +will also form the basis for future developments in other areas, such as +native color support and hypertext features. ... Fonts for UT1 (omlgc family) +and UT2 (omah family) are under development: these fonts are in PostScript +format and visually close to Times and Helvetica font families. +Omega fonts are available subject to GPL + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Greek (U+0370-U+03FF) + Armenian (U+0530-U+058F) + Hebrew (U+0590-U+05FF) + Arabic (U+0600-U+06FF) + Currency Symbols (U+20A0-U+20CF) + Arabic Presentation Forms-A (U+FB50-U+FDFF) + Arabic Presentation Forms-B (U+FE70-U+FEFF) + +Current info: + +* Valek Filippov + +Valek Filippov added Cyrillic glyphs and composite Latin Extended A to +the whole set of the abovementioned URW set of 35 PostScript core fonts, +. The fonts are available under GPL. + + Latin Extended-A (U+0100-U+017F) + Cyrillic (U+0400-U+04FF) + + +* Wadalab Kanji Comittee + +Between April 1990 and March 1992, Wadalab Kanji Comittee put together +a series of scalable font files with Japanese scripts, in four forms: +Sai Micho, Chu Mincho, Cho Kaku and Saimaru. The font files are +written in custom file format, while tools for conversion into +Metafont and PostScript Type 1 are also supplied. The Wadalab Kanji +Comittee has later been dismissed, and the resulting files can be now +found on the FTP server of the Depertment of Mathematical Engineering +and Information Physics, Faculty of Engineering, University of Tokyo +. + + Hiragana (U+3040-U+309F) + Katakana (U+30A0-U+30FF) + + +* Young U. Ryu + +Young Ryu is the author of Txfonts, a set of mathematical symbols +designed to accompany text typeset in Times or its variants. In the +documentation, Young adresses the design of mathematical symbols: "The +Adobe Times fonts are thicker than the CM fonts. Designing math fonts +for Times based on the rule thickness of Times = , , + , / , < , +etc. would result in too thick math symbols, in my opinion. In the TX +fonts, these glyphs are thinner than those of original Times +fonts. That is, the rule thickness of these glyphs is around 85% of +that of the Times fonts, but still thicker than that of the CM fonts." +TX fonts are are distributed under the GNU public license (GPL). +. + + Arrows (U+2190-U+21FF) + Mathematical Symbols (U+2200-U+22FF) + + +* Angelo Haritsis + +Angelo Haritsis has compiled a set of Greek Type 1 fonts, available on +. +The glyphs from this source has been used to compose Greek glyphs in +FreeSans and FreeMono. + +Angelo's licence says: "You can enjoy free use of these fonts for +educational or commercial purposes. All derived works should include +this paragraph. If you want to change something please let me have +your changes (via email) so that they can go into the next +version. You can also send comments etc to the above address." + + Greek (U+0370-U+03FF) + + +* Yannis Haralambous and Virach Sornlertlamvanich + +In 1999, Yannis Haralambous and Virach Sornlertlamvanich made a set of +glyphs covering the Thai national standard Nf3, in both upright and +slanted shape. The collection of glyphs have been made part of GNU +intlfonts 1.2 package and is available under the GPL at +. + + Thai (U+0E00-U+0E7F) + +* Shaheed R. Haque + +Shaheed Haque has developed a basic set of basic Bengali glyphs +(without ligatures), using ISO10646 encoding. They are available under +the XFree86 license at . + +Copyright (C) 2001 S.R.Haque . All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL S.R.HAQUE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of S.R.Haque shall not be +used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from +S.R.Haque. + + Bengali (U+0980-U+09FF) + + +* Sam Stepanyan + +Sam Stepanyan created a set of Armenian sans serif glyphs visually +compatible with Helvetica or Arial. Available on +. On +2002-01-24, Sam writes: "Arial Armenian font is free for +non-commercial use, so it is OK to use under GPL license." + + Armenian (U+0530-U+058F) + + +* Mohamed Ishan + +Mohamed Ishan has started a Thaana Unicode Project + and among other things created a +couple of Thaana fonts, available under FDL or BDF license. + + Thaana (U+0780-U+07BF) + + +* Sushant Kumar Dash (*) + +Sushant Dash has created a font in his mother tongue, Oriya. As he +states on his web page : +"Please feel free to foreword this mail to your Oriya friends. No +copyright law is applied for this font. It is totally free!!! Feel +free to modify this using any font editing tools. This is designed for +people like me, who are away from Orissa and want to write letters +home using Computers, but suffer due to unavailability of Oriya +fonts.(Or the cost of the available packages are too much)." + + Oriya (U+0B00-U+0B7F) + + +* Harsh Kumar + +Harsh Kumar has started BharatBhasha - +an effort to provide "FREE software, Tutorial, Source Codes +etc. available for working in Hindi, Marathi, Gujarati, Gurmukhi and +Bangla. You can type text, write Web pages or develop Indian Languages +Applications on Windows and on Linux. We also offer FREE help to +users, enthusiasts and software developers for their work in Indian +languages." + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + + +* Prasad A. Chodavarapu + +Prasad A. Chodavarapu created Tikkana, a Telugu font available in Type +1 and TrueType format on . +Tikkana exceeds the Unicode Telugu range with some composite glyphs. +Available under the GNU General Public License. + + Telugu (U+0C00-U+0C7F) + + +* Frans Velthuis and Anshuman Pandey + + +In 1991, Frans Velthuis from the Groningen University, The +Netherlands, released a Devanagari font as Metafont source, available +under the terms of GNU GPL. Later, Anshuman Pandey from the Washington +University, Seattle, USA, took over the maintenance of font. Fonts can +be found on CTAN, . I +converted the font to Type 1 format using Pter Szab's TeXtrace +program and removed some +redundant control points with PfaEdit. + + Devanagari (U+0900-U+097F) + + +* Hardip Singh Pannu + +In 1991, Hardip Singh Pannu has created a free Gurmukhi TrueType font, +available as regular, bold, oblique and bold oblique form. Its license +says "Please remember that these fonts are copyrighted (by me) and are +for non-profit use only." + + Gurmukhi (U+0A00-U+0A7F) + + +* Jeroen Hellingman + +Jeroen Hellingman created a set of Malayalam metafonts in 1994, and a +set of Oriya metafonts in 1996. Malayalam fonts were created as +uniform stroke only, while Oriya metafonts exist in both uniform and +modulated stroke. From private communication: "It is my intention to +release the fonts under GPL, but not all copies around have this +notice on them." Metafonts can be found on CTAN, + and +. + + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + + +* Thomas Ridgeway <> (*) + +Thomas Ridgeway, then at the Humanities And Arts Computing Center, +Washington University, Seattle, USA, (now defunct), created a Tamil +metafont in 1990. Anshuman Pandey from the same university took over +the maintenance of font. Fonts can be found at CTAN, +. + + Tamil (U+0B80-U+0BFF) + + +* Berhanu Beyene <1beyene AT informatik.uni-hamburg.de>, + Prof. Dr. Manfred Kudlek , Olaf + Kummer , and Jochen Metzinger + +Beyene, Kudlek, Kummer and Metzinger from the Theoretical Foundations +of Computer Science, University of Hamburg, prepared a set of Ethiopic +metafonts, found on +. They also +maintain home page on the Ethiopic font project, +, +and can be reached at . The current +version of fonts is 0.7 (1998), and they are released under GNU GPL. I +converted the fonts to Type 1 format using Pter Szab's TeXtrace-A +program and removed some +redundant control points with PfaEdit. + + Ethiopic (U+1200-U+137F) + + +* Maxim Iorsh + +In 2002, Maxim Iorsh started the Culmus project, aiming at providing +Hebrew-speaking Linux and Unix community with a basic collection of +Hebrew fonts for X Windows. The fonts are visually compatible with +URW++ Century Schoolbook L, URW++ Nimbus Sans L and URW++ Nimbus Mono +L families, respectively, and are released under GNU GPL license. See +also . + + Hebrew (U+0590-U+05FF) + + +* Panayotis Katsaloulis + +Panayotis Katsaloulis helped fixing Greek accents in the Greek +Extended area. + + Greek Extended (U+1F00-U+1FFF) + + +* Vyacheslav Dikonov + +Vyacheslav Dikonov made a Braille unicode font that could be merged +with the UCS fonts to fill the 2800-28FF range completely. (uniform +scaling is possible to adapt it to any cell size). He also contributed +a free syriac font, whose glyphs (about half of them) are borrowed +from the "Carlo Ator" font freely downloadable from +. Vyacheslav also filled in a few missing +spots in the U+2000-U+27FF area, e.g. the box drawing section, sets of +subscript and superscript digits and capital Roman numbers. + + Syriac (U+0700-U+074A) + Box Drawing (U+2500-U+257F) + Braille (U+2800-U+28FF) + + +* M.S. Sridhar + +M/S Cyberscape Multimedia Limited, Mumbai, developers of Akruti +Software for Indian Languages (http://www.akruti.com/), have released +a set of TTF fonts for nine Indian scripts (Devanagari, Gujarati, +Telugu, Tamil, Malayalam, Kannada, Bengali, Oriya, and Gurumukhi) +under the GNU General Public License (GPL). You can download the fonts +from the Free Software Foundation of India WWW site +(http://www.gnu.org.in/akruti-fonts/) or from the Akruti website. + +For any further information or assistance regarding these fonts, +please contact mssridhar AT vsnl.com. + + Devanagari (U+0900-U+097F) + Bengali (U+0980-U+09FF) + Gurmukhi (U+0A00-U+0A7F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Tamil (U+0B80-U+0BFF) + Telugu (U+0C00-U+0C7F) + Kannada (U+0C80-U+0CFF) + Malayalam (U+0D00-U+0D7F) + + +* DMS Electronics, The Sri Lanka Tipitaka Project, and Noah Levitt + + +Noah Levitt found out that the Sinhalese fonts available on the site + are released under GNU GPL, or, +precisely, "Public Domain under GNU Licence + Produced by DMS +Electronics for The Sri Lanka Tipitaka Project" (taken from the font +comment), and took the effort of recoding the font to Unicode. + +These glyphs were later replaced by those from the LKLUG font + + +Finally the range was completely replaced by glyphs from the sinh TeX +font, with much help and advice from Harshula Jayasuriya. + + Sinhala (U+0D80-U+0DFF) + + +* Daniel Shurovich Chirkov + +Dan Chirkov updated the FreeSerif font with the missing Cyrillic +glyphs needed for conformance to Unicode 3.2. The effort is part of +the Slavjanskij package for Mac OS X, +. + + Cyrillic (U+0400-U+04FF) + + +* Denis Jacquerye + +Denis Jacquerye added new glyphs and corrected existing ones in the +Latin Extended-B and IPA Extensions ranges. + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + + +* K.H. Hussain and R. Chitrajan + +`Rachana' in Malayalam means `to write', `to create'. Rachana Akshara Vedi, +a team of socially committed information technology professionals and +philologists, has applied developments in computer technology and desktop +publishing to resurrect the Malayalam language from the disorder, +fragmentation and degeneration it had suffered since the attempt to adapt +the Malayalam script for using with a regular mechanical typewriter, which +took place in 1967-69. K.H. Hussein at the Kerala Forest Research Institute +has released "Rachana Normal" fonts with approximately 900 glyphs required +to typeset traditional Malayalam. R. Chitrajan apparently encoded the +glyphs in the OpenType table. + +In 2008, the Malayalam ranges in FreeSerif were updated under the advise +and supervision of Hiran Venugopalan of Swathanthra Malayalam Computing, +to reflect the revised edition Rachana_04. + + Malayalam (U+0D00-U+0D7F) + + +* Solaiman Karim + + Bengali (U+0980-U+09FF) + +Solaiman Karim has developed several OpenType Bangla fonts and +released them under GNU GPL on . + + +* Sonali Sonania and Monika Shah + + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + +Glyphs were drawn by Cyberscape Multimedia Ltd., #101,Mahalakshmi +Mansion 21st Main 22nd "A" Cross Banashankari 2nd stage Banglore +560070, India. Converted to OTF by IndicTrans Team, Powai, Mumbai, +lead by Prof. Jitendra Shah. Maintained by Monika Shah and Sonali +Sonania of janabhaaratii Team, C-DAC, Mumbai. This font is released +under GPL by Dr. Alka Irani and Prof Jitendra Shah, janabhaaratii +Team, C-DAC, Mumabi. janabhaaratii is localisation project at C-DAC +Mumbai (formerly National Centre for Software Technology); funded by +TDIL, Govt. of India. Contact:monika_shah AT lycos.com, +sonalisonania AT yahoo.com, jitendras AT vsnl.com, alka AT ncst.ernet.in. +website: www.janabhaaratii.org.in. + + +* Pravin Satpute , Bageshri Salvi + , Rahul Bhalerao and Sandeep Shedmake + + Devanagari (U+0900-U+097F) + Gujarati (U+0A80-U+0AFF) + Oriya (U+0B00-U+0B7F) + Malayalam (U+0D00-U+0D7F) + Tamil (U+0B80-U+0BFF) + +In December 2005 the team at www.gnowledge.org released a set of two +Unicode pan-Indic fonts: "Samyak" and "Samyak Sans". "Samyak" font +belongs to serif style and is an original work of the team; "Samyak +Sans" font belongs to sans serif style and is actually a compilation +of already released Indic fonts (Gargi, Padma, Mukti, Utkal, Akruti +and ThendralUni). Both fonts are based on Unicode standard. You can +download the font files (released under GNU/GPL License) from +http://www.gnowledge.org/Gnoware/localization/font.htm + + +* Kulbir Singh Thind + + Gurmukhi (U+0A00-U+0A7F) + +Dr. Kulbir Singh Thind designed a set of Gurmukhi Unicode fonts, +AnmolUni and AnmolUni-Bold, which are available under the terms of GNU +Generel Public Licens from the Punjabu Computing Resource Center, +http://guca.sourceforge.net/typography/fonts/anmoluni/. + + +* Gia Shervashidze + + Georgian (U+10A0-U+10FF) + +Starting in mid-1990s, Gia Shervashidze designed many +Unicode-compliant Georgian fonts: Times New Roman Georgian, Arial +Georgian, Courier New Georgian. His work on Georgian localization can +be reached at http://www.gia.ge/. + + +* Primo Peterlin + +Primo Peterlin filled in missing glyphs here and there (e.g. Latin +Extended-B and IPA Extensions ranges in the FreeMono familiy), and +created the following UCS blocks: + + Latin Extended-B (U+0180-U+024F) + IPA Extensions (U+0250-U+02AF) + Arrows (U+2190-U+21FF) + Box Drawing (U+2500-U+257F) + Block Elements (U+2580-U+259F) + Geometrical Shapes (U+25A0-U+25FF) + +* Mark Williamson + +Made the MPH 2 Damase font, from which + Hanuno (U+1720-U+173F) + Buginese (U+1A00-U+1A1F) + Tai Le (U+1950-U+197F) + Ugaritic (U+10380-U+1039F) + Old Persian (U+103A0-U+103DF) + +* Jacob Poon + +Submitted a very thorough survey of glyph problems and other suggestions. + +* Alexey Kryukov + +Made the TemporaLCGUni fonts, based on the URW++ fonts, from which at one +point FreeSerif Cyrillic, and some of the Greek, was drawn. He also provided +valuable direction about Cyrillic and Greek typesetting. + +* George Douros + +The creator of several fonts focusing on ancient scripts and symbols. +Many of the glyphs are created by making outlines from scanned images +of ancient sources. + + Aegean: Phoenecian + Analecta: Gothic (U+10330-U+1034F) + Musical: Byzantine & Western + Unicode: many Miscellaneous Symbols, Miscellaneous Technical, + supplemental Symbols, and Mathematical Alphanumeric symbols, + Mah Jong, and the outline of the Domino. + +* Daniel Johnson + +Created by hand a Cherokee range specially for FreeFont to be "in line with +the classic Cherokee typefaces used in 19th century printing", but also to +fit well with ranges previously in FreeFont. Then he made Unified Canadian +Syllabics in Sans, and a Cherokee and Kayah Li in Mono! And never to be +outdone by himself, then did UCAS Extended and Osmanya.... What next? + + Armenian (serif) (U+0530-U+058F) + Cherokee (U+13A0-U+13FF) + Unified Canadian Aboriginal Syllabics (U+1400-U+167F) + UCAS Extended (U+18B0-U+18F5) + Kayah Li (U+A900-U+A92F) + Tifinagh (U+2D30-U+2D7F) + Vai (U+A500-U+A62B) + Latin Extended-D (Mayanist letters) (U+A720-U+A7FF) + Osmanya (U+10480-U+104a7) + +* Yannis Haralambous and Wellcome Institute + +In 1994, The Wellcome Library + The Wellcome Institute for the History of Medicine + 183 Euston Road, London NW1 2BE, England. +commissioned Mr. Haralambous to produce a Sinhalese font for them. + +We have received 03/09 official notice from Robert Kiley, Head of e-Strategy +for the Wellcome Library, that Yannis' font could be included in GNU +FreeFont under its GNU license. + +Thanks to Dominik Wujastyk, for providing us with feedback and contacts +to repsonsible people at the Trust. + + Sinhala (U+0D80-U+0DFF) + +* The Sinhala font project http://sinhala.sourceforge.net/ + +The Sinhala font project has taken the glyphs from Yannis Haralambous' +Sinhala font, to produce a Unicode TrueType font, LKLUG. These glyphs +were for a while included in FreeFont. + + Sinhala (U+0D80-U+0DFF) + +* Steve White + +Filled in a lot of missing characters, got some font features working, +left fingerprints almost everywhere, and is responsible for these blocks: + + Glagolitic (U+2C00-U+2C5F) + Coptic (U+2C80-U+2CFF) + +* Pavel Skrylev is responsible for + Cyrillic Extended-A (U+2DEO-U+2DFF) + as well as many of the additions to + Cyrillic Extended-B (U+A640-U+A65F) + +Notes: + +*: The glyph collection looks license-compatible, but its author has + not yet replied and agreed on their work being used in part of + this glyph collection. + +-------------------------------------------------------------------------- +$Id: CREDITS,v 1.28 2010/09/11 13:24:11 Stevan_White Exp $ diff --git a/media/fonts/doc/FreeFont_ChangeLog.txt b/media/fonts/doc/FreeFont_ChangeLog.txt new file mode 100644 index 00000000000..6de5342798e --- /dev/null +++ b/media/fonts/doc/FreeFont_ChangeLog.txt @@ -0,0 +1,6325 @@ +$Id: ChangeLog,v 1.257 2010/09/19 13:15:07 Stevan_White Exp $ +2010-09-19 Stevan_White + * FreeSerif.sfd: + + Sinhala: Fixed one lookup table mistake, and a couple of glpyh + omissions, that Harshula pointed out. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Sans: Applied Daniel Johnsons improvement to capital Eng to Sans, as + described in previous commits. + + * FreeSerif.sfd, FreeSerifBold.sfd: + + Coptic: added alphabet to bold. Accent marks not working -- a mystery. + Some tweeks in medium face as well. + + glyph cleanup -- points too close, some glyphs outside bounding boxes. + +2010-09-17 Stevan_White + * FreeSerif.sfd: + + Sinhala: tightened up left side of na and derivatives. + tighened up left sides of u, lla, na, dha, ndha, nya, jnya + tightened up some of the vowel conjuncts, and left side of nna. + +2010-09-16 Stevan_White + * FreeSerif.sfd: + + Coptic: fiddled about with letter forms, striving for a kind of + consistency. + + Sinhala: Harshula noticed four incorrect combined forms. Fixed these. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Latin Extended-A: Applied Daniel Johnson's patch that made two versions + of capital Eng. His explanation: + ' + http://en.wikipedia.org/wiki/%C5%8A + + The form of capital Eng currently in all three FreeFont faces + is that used by the Sami people, resembling a capital N with a + hooked right descender. + However, the form preferred for African and Amerindian + languages resembles a tall lowercase n with a hook that almost + meets the left vertical. (See wikipedia link above for a + visual.) + + Recommend moving the existing Sami-style Eng to a PUA or + non-Unicode slot, creating African-style Eng at U+014A, and + adding a LOCL table with substitution rules for + Inari Sami (ISM), Lule Sami (LSM), + Northern Sami (NSM) and Skolt Sami (SKS). + ' + Latin Extended-B: Also in his patch: + added U+0220 (Latin Capital Letter N with long leg) + +2010-09-15 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin for Sami: Daniel Johnson's patch added alternative form of Eng for + African languages and a 'local' table for the Sami form. + + * FreeSerif.sfd: + + Sinhala: regularized kundaliya a bit. + re-named a few more ligature glyphs, for consistency + + * FreeSans.sfd: + + Put stray lookup into its proper subtable. + + Gurmukhi: improved some names of ligature glyphs, and found one + apparently doubled table entry (kagurmukhi_nuktagurmukhi.nukt now + gur_ka.nukt) + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Various measures to fix problems FontForge Find Problems reports under + ATT, including a mass glyph rename of Sinhala ligatures. + +2010-09-15 Stevan_White + * to0ls/GenerateTrueType: + + prev. commit had one space too many + +2010-09-14 Stevan_White + * tools-- GenerateMacTT, GenerateOpenType, GenerateTrueType, checkGlyphNumbers.py, findBackLayers.py, hex_range.py, isMonoMono.py, ligatureLookups.py, nameBySlot.py, range_report.py, ranges.py, validate.py, OpenType.py: + + Added license and other tags to python files. + +2010-09-13 Stevan_White + * tools/OpenType.py: + + updated some Web links. + + * FreeMono.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Cyrillic: A few more old letters. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Supplemental Punctuation: One character for consistency with other faces. + +2010-09-12 Stevan_White + * FreeMono.sfd, FreeSans.sfd: + + Control Pictures: Added because it was easy. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Alphabetic Presentation Forms: filled out range in sans faces. + + * FreeMono.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd: + + Cleared hints. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Dozens of measures to pass general validation tests, including + . cleanup of many glyphs for extrema and self-intersection problmes + . re-naming glyphs whose PS names are too long. + . removing blank glyphs + . giving Unicode points to glyphs missing them. + + There are still a few lookup table issues in FreeSerif and FreeSans though. + + * FreeSerif.sfd: + + Re-named some of the Sinhala lookups in somewhat better way. + Control Pictures: added a bunch (but... is it worth it?) + + * tools/nameBySlot.py: + + Corrected output for high Unicode. + + * tools/checkGlyphNumbers.py: + + Made aware of special TrueType slots. + + * tools/range_report.py: + + Added a Private Use total and better explanation of totals generally. + Some code clean-up. + +2010-09-11 Stevan_White + * tools/OpenType.py: + + made not to complain about extra TrueType characters. + + * FreeSerif.sfd: + + Coptic: Widened bowl of Khei. + Deepened descenders of small letters to same depth as in Latin + Expanded bowl of Fei and fei to resemble other samples. + +2010-09-10 Stevan_White + * FreeSerif.sfd: + + Cyrillic: mostly positioning of marks for old Cyrillic alphabets + + Coptic: Replaced acoptic with something more dramatic, fiddled with + kerning, tidied some other letters + +2010-09-09 Stevan_White + * FreeSerifBold.sfd, FreeSans.sfd, FreeSerif.sfd: + + Block Elements: replaced long-missing shade blocks + +2010-09-08 Stevan_White + * tools/range_report.py: + + More explanation in output. + + * tools/range_report.py, OpenType.py: + + another consistency check + added UCAS Extended range + +2010-09-07 Stevan_White + * FreeSerif.sfd: + + Buginese: lookup tables and glyphs to re-order vowels, courtesy of + Mohammad Anwari. + + Sinhala: complete replacement of range with glyphs extracted more + directly from Yannis Haralambous' sinha TeX font (last version was + also derived from this font, but had undergone detrimental processing). + Implements "rak" glyphs using three GSUB lookup steps. + + * FreeSans.sfd: + + Osmanya: courtesy of Daniel Johnson. + + Note this script is slanted in every sample I've seen. That is + justification enough that the glyphs in this range look slated, + although the face isn't oblique. + + UCAS Extended: by Daniel Johnson + +2010-09-05 Stevan_White + * FreeSerif.sfd: + + Fix for FontForge warning (v 20090923) + + "On Windows many apps will have problems with this font's kerning, + because because 58 of its glyph kern pairs cannot be mapped to + unicode-BMP kern pairs" + + This was due to kern tables for the Musical Symbols range, which isn't + in the Unicode Basic Multilingual Plane. + + Removed this lookup. Might consider another way to position these + symbols. + +2010-08-30 Stevan_White + * FreeSerif.sfd: + + Sinhala: patch by Harshula Jayasuriya to correct the writing system + direction in some lookups. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Currency Symbols: additions and tweeking + +2010-08-24 Stevan_White + * FreeSerif.sfd: + + Sinhala: added one ligature glyph, from Harshula Jayasuriya + +2010-08-20 Stevan_White + * FreeSerif.sfd: + + Resolves class of validation problems in Sinhala: Bad Glyph Name. + + This is a FontForge bug, that appears when certain types of problems + occur in the glyph contours. Probably an arithmetic error causes some + corruption. + + Corrected missing extrema in recent Latin Extended-D range + + Sinhala: re-did previous patch using a more recent one. + Un-did some other glyph changes that didn't help much anyway. + + * FreeMono.sfd: + + Named letters in several ranges... should write a script for this... + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added full GNU copyright announcement to TT Names. + Updated Copyright date. + + * FreeSerif.sfd: + + Sinhala: Applied a patch from Harshula Jayasuriya, improving glyph + names. + I tried to tidy up some of the glyphs, but it's a big job... + + Latin Extended B: fixed one case of missing extrema + +2010-08-18 Stevan_White + * FreeSerif.sfd: + + Latin Extended-D: yet a few more easily made letters + + Latin Extended-D: made a few more letters + +2010-08-09 Stevan_White + * FreeSerif.sfd: + + Supplemental Arrows-A: completed + + Arrows: completed + +2010-08-04 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd: + + Combining Diacritics: some additions in BoldOblique, corrections in + other faces. + Several improvements to Greek letter forms in BoldOblique + +2010-08-03 Stevan_White + * FreeMonoBold.sfd: + + Arrows, a few math operators, and one more combining diacritical + + * FreeMono.sfd, FreeMonoBold.sfd: + + Added some combining diacriticals to bold, touched up some spacing + modifiers. + Minor corrections to roman. + + * FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Marks, spacing modifier letters: corrected placement of marks, + added some spacing modifier letters and combining marks. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Better Vietnamese support, using 'ccmp' and 'mark' lookup tables. + MonoBoldOblique: added Extended Latin ranges + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Vietnamese: Much adjustment of horn letters, + also general adjustement of marks + +2010-08-02 Stevan_White + * FreeSerif.sfd: + + Vietnamese: inadvertently broke the main face. This fixes it. + + * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Vietamese: In roman and sans, lookups are basically functional now. + Used 'ccmp' Ligature Substitution to form stacked marks (inasmuch as + glyphs for the stacked Unicode codepoints are available) + Adjusted positioning of some marks. + Named many letters and combining marks. + + roman italic. Re-designed horn of O and U. Other roman faces could also + benefit from a horn job. + + * FreeMono.sfd, FreeSerif.sfd: + + roman: correction to one math operator + mono: Mathematical Operators complete (up to some pre-5.2 Unicode version) + + * FreeMono.sfd: + + Mathematical Symbols: range nearly finished + + * tools/OpenType.py: + + Correction regarding NKo range. + + * tools/range_report.py: + + made not to complain about special TrueType slots 0x00, 0x01, 0x0D + +2010-08-01 Stevan_White + * FreeMono.sfd, FreeSerif.sfd: + + roman: corrected direction of 2 math operators + mono: added several math operators + + Worked on mark positioning for Vietnamese, Cyrillic + +2010-07-30 Stevan_White + * FreeMono.sfd: + + Reduced height of two-part Summation symbols + https://savannah.gnu.org/bugs/?23064 + + Corrected U+2626 Orthodox Cross + https://savannah.gnu.org/bugs/?27579#discussion + + * FreeSerif.sfd: + + Added some Miscellaneous Technical Symbols + +2010-07-29 Stevan_White + * FreeSerif.sfd: + + Put in some scan lines 23BA-23BD, based on 2500, as discussed in + https://savannah.gnu.org/bugs/?23064 + I still have no idea what the application for these glyphs would be... + +2010-07-17 Stevan_White + * FreeSerif.sfd: + + added mark anchors for acute, grave in cyrillic (other faces already + had them) + +2010-07-13 Stevan_White + * FreeMono.sfd: + + Made germandbls (ess-zet) a bit wider, moved a bit to left + +2010-07-10 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Resolves bug 30344: "Greek Final Sigma could be shortened" + https://savannah.gnu.org/bugs/index.php?30344 + Problem only affected roman, but touched up other faces anyway. + +2010-05-30 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin-extended-B: fiddled with some of the horizontal strokes + +2010-05-29 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin: accents on ogonek letters (for Navaho) + a little adjustment of apostrophe (Navaho, Hawaiian) + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin mark problems + * low dots in bold uneven + * ring in bold smaller than in roman, and not heavier + * apostrophe in italic too far to right (Navaho, Hawaiian) + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin: fixed problems with various marks: ogonek, hook, comma below, + some kerning, esp. of non-ascii characters + + * FreeSans.sfd, FreeSerif.sfd: + + Sans: made dot accents same height as i-dot, kerned y with comma + Both: made low comma accent lower, smaller (esp. for Romanian) + +2010-05-27 Stevan_White + * FreeSans.sfd: + + Latin: make caron of more uniform height + + Latin: i was somehow displaced, dotlessi was much too wide for Turkish + + * FreeSans.sfd, FreeSansOblique.sfd: + + Latin: made ring accent heavier, esp. for Swedish + + +2010-05-10 Stevan_White + * FreeSans.sfd, FreeSerif.sfd: + + Latin: kerning tweeks + +2010-05-09 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + As discussed in freefont-bugs mailing list, Thu, May 6, 2010 + "FreeMono affected by OS X 10.6 nested character references bug" + reduced reference nesting in multiple quote characters, as a courtesy + to Mac OS 10.6 users, who suffer from a bug. + +2010-05-04 Stevan_White + * FreeSerif.sfd: + + Latin: kerning tweeks + +2010-05-03 Stevan_White + * FreeSerifBold.sfd: + + Latin: spacing of round small letters, kerning tweeks, fiddled with + ligatures + +2010-04-17 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Daniel Johnson improved Cherokee Da + +2010-04-10 Stevan_White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Emboldened underscore and related glyphs. Resolves issue 22999 + https://savannah.gnu.org/bugs/index.php?22999 + Low line (005F) in bold fonts do not have heavier weight + +2010-04-09 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Serif: Added Thai TTF names + +2010-04-08 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Corrected some language names + A bit o kerning + + * FreeSerifBold.sfd: + + Fixed problem with name. This should be the same as before the revision + except for the fix. + The KDE font installer was saying this face was incorrectly named + Free Serif Bold Italic, but this wasn't quite correct. One of the other + language names said it was named Free Serif Halvfett Kursiv, which + conflicted with that language name for the real Free Serif Bold Italic. + + Regression: for some unknown reason, previous release gets built so + that my system thinks it is Free Serif Bold Italic. + This is a mystery. There is nothing about Italic in the file. + +2010-04-06 Stevan_White + * Makefile: + + Made graceful in absence of Fontforge + +2010-03-29 Stevan_White + * FreeSerifBold.sfd: + + Adjusted some accent marks, named a few characters + +2010-03-25 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + added Ukrainian TTF names + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + added bahasa indonesian TTF names + +2010-03-21 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added several TTF Names. (Need to check with native speakers.) + +2010-03-20 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Fill out TTF Names tables regarding font names + +2010-03-19 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Removed TTF Names for 'sample text' and all 'license URL' except English, + 1) in response to FontForge complain that large names tables conflict + with recent Windows patches + 2) because they are redundant and inappropriate + (Hope to post the list of sample texts elsewhere, because I like the idea.) + +2010-03-02 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Latin standard ligatures: in non-bold, promoted dlig to liga. + Put standard Dutch IJ in all; Adjusted spacing a bit + +2010-02-28 Stevan_White + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Cyrillic: further revision of spacing, in direction of loosening. + bold ze was strangely thin; made bolder. + +2010-02-27 Stevan_White + * FreeSerif.sfd: + + Cyrillic: reviewed spacing of whole range, generally loosened slightly + tidied a couple of ugly glyphs + +2010-02-09 Stevan_White + * FreeSerifBoldItalic.sfd: + + tweeks to kerning in Latin + + * FreeSerifBold.sfd: + + Tweeks to kerning in Latin + +2010-01-28 Stevan_White + * tools/isMonoMono.py: + + Implement FontForge handling of magic characters + .notdef, .null, nonmarkingreturn + at + 0x0000 0x0001 0x000D + +2010-01-27 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Improved magic characters for FreeMono, inserted them for other faces + https://savannah.gnu.org/bugs/index.php?28742 + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Added at 0x0000 0x0001 0x000D characters + .notdef .null nonmarkingreturn + These are NOT UNICODE they are to satisfy an essentially undocumented + "feature" of FontForge, ( in source tottf.c, AssignNotdefNull() ) + And a funny strong suggestion of TrueType fonts, that they begin with + three special characters (evidently different from encoding slots) + http://www.microsoft.com/typography/otspec/recom.htm + + FontForge looks for these glyphs in certain places and copies them. + Otherwise, apparently, it will find a glyph elsewhere (unclear how) and + copy it there, possibly resulting in something quite wrong + (such as a non-monospace font). + + The three are copied to the end of TTF fonts (only one to the end of OTF + fonts) + +2009-12-31 Stevan_White + * FreeSans.sfd: + + Tamil: deletd Unicode range due to absence of necessary ligatures + + * FreeSerifBold.sfd: + + Cyrillic tweek to spacing + +2009-12-29 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd: + + Gurmukhi: added 2 characters to complete range + + * FreeSans.sfd, FreeSerif.sfd: + + Devanagari: filled out sans, some corrections in serif + + * FreeSerif.sfd: + + Devanagari: Drew and constructed glyphs to complete range. + +2009-12-28 Stevan_White + * OpenType.py: + + Added/corrected some ranges + +2009-12-27 Stevan_White + * tools -- CheckConformance.pl, GenerateTrueType, MES-1.lst, MES-1.txt, MES-2.lst, MES-2.txt, MES-3B.lst, MES-3B.txt, WGL4.lst, mes-list-expand.pl: + + disabled build of Mac TT + + * tools/ligatureLookups.py: + + better sanity check + + * tools/range_report.py: + + more generic title + + * tools/OpenType.py: + + correction to Tamil + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Resolves bug #23049 + Replacement character (U+FFFD) not properly styled + https://savannah.gnu.org/bugs/index.php?23049 + + * FreeSerif.sfd: + + Devanagari: added letters, completing Unicode range + + * FreeSerif.sfd: + + Tamil: added 2 monster glyphs, completing range + (0bc1-2 still questionable) + +2009-12-26 Stevan_White + * FreeSerif.sfd: + + Indic ranges: named lots of characters + Tamil: corrected and added a few letters + + Tamil: added digits + + Tamil: a few more symbols. Only a couple of monster signs still + missing, and a couple of marks seem just wrong... + + Malayalam: completed Unicode range, also moving some Chillu letters from + Private Use area to Unicode, and re-establishing ligatures + + * FreeSans.sfd: + + Tamil: completed digits, added some other chars + +2009-12-25 Stevan_White + * FreeSans.sfd: + + Indic ranges, esp. + Devanagari: added several new Unicode (not yet complete) + tidied letters + Bengali: tidying, made some refs + +2009-12-24 Stevan_White + * FreeSans.sfd: + + Indic ranges: named most of the Unicode characters + Tried to improve a few bad names for ligatures + in Private Use Area + Made a few references: not clearly an improvement. + This stuff is still a mess... + + Devanagari: added an obviously missing nukta ligature + + Gujarati: added some subvocalic letters for Sanskrit. Quality is low. + + Filled out Geometric Shapes. + + * tools/ligatureLookups.py: + + fixed syntax error + + * tools/LigatureList.pl: + + no longer relevant. + +2009-12-23 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + cosmetic re-name and re-order of lookups + + * tools/OpenType.py: + + removed links to disappeared web pages + +2009-12-22 Stevan_White + * FreeMonoOblique.sfd: + + Diagonal Fractions lookup didn't make much sense in mono anyway, + much less in just one style. + +2009-12-20 Stevan_White + * FreeSerif.sfd: + + split Diagonal Fractions lookup into two tables + + re-encoded some characters + adjusted some marks + corrected two wrongly-placed glyphs in Phonetic Extensions Supplement + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + General Punctuation: Got rid of deprecated subrange 0x206A-0x206F + + * tools/range_report.py: + + corrected script name + + * tools/OpenType.py: + + numerous changes, some reflecting changes to Unicode standard + +2009-12-14 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Unicode 5.2 corrections of Abkhasian letters from Daniel Johnson. + Got rid of some old glyph names. + +2009-12-06 Stevan_White + * FreeSans.sfd, FreeSansOblique.sfd: + + Cherokee: fixed previous commit of a partial, and old range in + medium weight + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Cherokee, courtesy of Daniel Johnson. + +2009-11-20 Stevan_White + * FreeSans.sfd: + + New glyphs for Unified Canadian Aboriginal Syllabics as defined in Unicode 5.2 + by Daniel Johnson + +2009-11-14 Stevan_White + * FreeSerif.sfd: + + Resolves bug #27842: FreeSerif U+1F016 (Mahjong Tile Seven of Bamboos) Wrong + https://savannah.gnu.org/bugs/?27842 + has one extra bamboo in it for a total of eight. + The bamboo on the top left needs to be removed + + Resolves bug #27579: Orthodox cross has wrong glyph + http://savannah.gnu.org/bugs/?27579 + U+2626 Orthodox Cross should slope downwards from left to right. + +2009-11-13 Stevan_White + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Cyrillic: corrections to Abkhazian letters by Daniel Johnson + +2009-11-05 Stevan_White + * FreeSerif.sfd: + + Cyrillic: corrections to Abkhazian letters by Daniel Johnson + +2009-10-16 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Cyrillic: tweeks to brev, based on Unicode 5.2 samples + +2009-10-08 Stevan_White + * FreeSerif.sfd: + + Currency Symbols: tidied + + Number Forms: three new vulgar fractions + + Currency Symbols: added "Tenga" of Kazakhstan + + Latin Extended: corrected a couple of wrong bearings + some fiddling with Vienamese letters with hook + +2009-10-01 Stevan_White + * FreeSerif.sfd: + + added missing accent + +2009-09-17 Stevan_White + * FreeSerif.sfd: + + Latin kerning: gave qj positive kerning (it must happen sometimes) + + Latin kerning: differentiated grave and dieresis vowels in some combos. + (also, adieresis hadn't been kerned at all...) + + Made ref of one Sinhala letter + +2009-07-30 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd: + + kerning + +2009-07-26 Stevan_White + * FreeSansBold.sfd: + + kerning + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + added some space in diaeresis + did some kerning + + * FreeSansBold.sfd: + + Revert serious mistake with previous commit: had somehow set splines + quadratic. + Here, the GaspTable from that commit is preserved, + However there were evidently numerous other changes that weren't + documented, and these are lost. + +2009-07-12 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added GASP tables for control of hinting/smoothing (anti-alising) of + TrueType. + Now the values are better suited to the EM size of the fonts. + Further adjustment (based say on stem width) might still be profitable. + + * FreeSans.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + More tweeks on accents, especially Maltese letters. + +2009-07-11 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Maltese Hbar, hbar, Improved, made more consistent. + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin: various corrections and tweeks for consistency in accented letters. + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + more space to accent on lcaron + tightened DZ etc ligatures + in SerifItalic faces made references etc in Spacing Modifiers and Combining + further kerning + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + kerning + Sans: decided dots and some other marks needed more room. + +2009-07-10 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + IPA. Phonetics: tweeks + + * FreeSerif.sfd: + + Tweeked some math symbols + + * FreeSans.sfd, FreeSansOblique.sfd: + + Letterlike: additions + + * FreeMonoOblique.sfd: + + IPA + + * FreeSerifBoldItalic.sfd: + + Another IPA symbol + + * FreeSerifBoldItalic.sfd: + + IPA and Spacing Modifier Letters: added a few + +2009-07-09 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Latin: various horizontal spacing and positioning issues + Replaced Tz and tz ligatures with the originals of Danial Johnson. + (range is "Mayanist" and despite Unicode samples, current usage + uses normal z in glyph) + Put stylized Tz tz in a discretionary ligature lookup. + +2009-07-08 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Cyrillic yi_yi Ukrainian ligature + Latin various pointwise cleanup, made some references, horizontal adjustments + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Cyrillic: Special ligature for Ukrainian yi_yi, also some kerning + +2009-07-07 Stevan_White + * FreeSerif.sfd: + + Latin: kerning; made accents on i tighter to avoid collisions + +2009-07-05 Stevan_White + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Made lookup tables for Dutch IJ + + Re-did Dutch digraph IJ in bold faces as "broken-U", because I + thought it was cool and nobody was there to stop me. + + * FreeSerif.sfd: + + Corrected ligatures Tz tz; put them in special lookup + Latin Extended Additional: added medevalist letters, completing range + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Cyrillic: added yi_yi ligature for Ukrainian in roman. Not sure + if it's right. + Latin: kerning. Added longs_t ligature, and historic ligature tables + IPA: in bolditalic, added a letter or two + + * FreeSerif.sfd: + + Kerning for hbar + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Kerning for Western Slavic languages + Added a couple of IPA to BI + +2009-07-04 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Combined letters ae, oe, ij had incorrect horizontal spacing + + * FreeMono.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Combining Diacritical Marks for Symbols: additions and fiddling. + Also related circles, arrows. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Letterlike Symbols: various additions and adjustments + Number Forms: Completed range in serif roman. Adjusted spacing + of Latin numerals in serif faces. + Diacritics for Symbols: various additions + Geometric shapes: thought it best for circle to be round even in + oblique faces. It's a choice of course. + Added to several faces. + Made all to pass tests (except Sinhala) + +2009-07-02 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Letterlike Symbols: more additions, adjustments + Also fiddled with some math symbols in Sans faces + + * FreeSans.sfd, FreeSansOblique.sfd: + + Letterlike Symbols; additions and adjustments + Note: Pango is rendering very strangely: many glyphs in the font are + being stolen from some other fonts instead: All the script in + blackletter, and some others as well. Is there a cache in the system + somewhere? Or what? + +2009-06-28 Stevan_White + * FreeSerif.sfd: + + Modified glyph. From patch by Pavel Skrylev. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Superscritps and Subscripts: made glyphs to complete range in all faces + + * FreeSans.sfd, FreeSansOblique.sfd: + + Added some combining marks for symbols and Blackboard Bold letters to + letterlike symbols + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Various adjustments regarding superscript and subscript characters in + several ranges. + +2009-06-27 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + More fiddling with super/subscripts + Tidied points in Serif to make fontforge "wrong direction" complaint + in scaled reference go away. + Made some other references in basic latin ranges. + + * FreeSerif.sfd: + + Superscripts and subscripts (in various ranges): tried to systematize + sizing and vertical placement. Note: most letters are still simply + scaled. + This is practical maintenance-wise, but isn't typographically optimal. + + * FreeSerif.sfd: + + Cyrillic Extended A: altered mark positions + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Phonetic Extensions: various corrections and fiddling + Changed Blues values in FreeSerifBoldItalic + +2009-06-25 Stevan_White + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Combining Diacritical Marks for Symbols: added to bold oblique + added placement mark to many + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + IPA Extensions: completed in bold and boldoblique, completing range for face. + + All faces: deleted 'cvt', 'prep', 'fpgm' TrueType tables, because + FontForge was complaining about them (legacy hinting that could + interfere, possibly lower quality code, etc) + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + IPA Extensions: made several characters + + * FreeSerif.sfd, FreeSerifBold.sfd: + + IPA Extensions: completed range in bold + +2009-06-23 Stevan_White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Spacing Modifiers: added a couple + Combining Diacriticals: brought range to par with FreeSans + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Same correction as for FreeSerif + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Corrected descender of 027f + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + IPA and related: made lots of additional glyphs + +2009-06-22 Stevan_White + * FreeSerif.sfd: + + Latin: further clean-up + +2009-06-21 Stevan_White + * FreeSerif.sfd: + + General pointwise clean-up of Latin and Latin Extended. + No visible changes were intended besides changed policy on + horizontal placement of some horned letters + + * FreeSerif.sfd: + + Latin Extended-C: constructed glyphs to complete range. + Latin Extended-D: constructed a bunch of glyphs; some related changes elsewhere. + +2009-06-20 Stevan_White + * FreeSerif.sfd: + + Latin Extended-C: added most of range + + Modifier Tone Letters: added glyphs to complete range. + This should also complete all the IPA/Phonetic extenseions ranges. + + Phonetic Extensions Supplement: added letters completing range + Note the superscript ones are simply scaled, so stem width is + not quite right... + +2009-06-19 Stevan_White + * FreeSerif.sfd: + + Phonetic Extensions: made letters to complete range + +2009-06-18 Stevan_White + * FreeSans.sfd: + + IPA Extensions: clean-up, fix some horizontal spacing issues + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Some glyph problems clean-up, made to pass validate (BlueValues) + +2009-06-17 Stevan_White + * FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + IPA Extensions: Improved spacing and horizontal positioning + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Georgian: added missing letter + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + IPA: made curls on some glyphs more distinct. + note horizontal placement in BO is chaotic--needs work + +2009-06-14 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: various experiments with lookups. + calt: should have allowed isolatef forms of combining marks, + (but can't see application support...) + aalt, hist: for alterntative characters + Added some historical glyphs + Math Alphanumeric: some clean-up. + +2009-06-11 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: various tweeks. Failed attempt to use 'isol' + lookup to put isolated combining marks above the baseline. + + More fiddling with mark placement, strengthened ornamental endings + + mkmk positioning of augmentation dot + +2009-06-10 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: combining marks above and below notes now working + somewhat + +2009-06-08 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: more adjustments of size and placement + +2009-06-07 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: mostly work on lookups. Made tablature symbols + thinner. + +2009-06-06 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: more fiddling with sizes and positions + + Byzantine Musical Symbols: minor clean-ups + + Fixed some ATT problems with 'kern' lookups for Cyrillic + +2009-06-05 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: many changes to glyph positions and shapes + +2009-05-28 Stevan_White + * FreeSerif.sfd: + + Cyrillic: additions and re-naming by Pavel Skrylev. + * Added Cyrillic-B Ext glyphs, and Cyrillic-A Ext glyphs. + * Added cyr_above anchor to all cyrillic glyphs, some glyphs + was changed + * To all Cyrillic letters I've given proper names based on old + Slavic language which is source of all modern slavic languages. + + (the naming is contentious, and there are a couple of technical + problems...under consideration) + +2009-05-27 Stevan_White + * FreeSerif.sfd: + + Musical Symbols: + Scaled up accidentals a bit. + Reduced width of repeated figure marks + Reduced width of caesura even more + Tried to implement mark positioning...not working everywhere + made references + +2009-05-26 Stevan_White + * FreeSerif.sfd: + + Made all letterlike glyph parts more like those from Serif and + Serif Italic. + (Except for Ped. U+1d1ae) + +2009-05-20 Stevan_White + * FreeSerif.sfd: + + Corrected DPOS lookup for Music range to be in script 'musi' + + Western Musical Symbols: fiddling + Miscellaneous Symbols: re-design of musical flat symbol. + +2009-05-19 Stevan_White + * FreeSerif.sfd: + + Western Musical Symbols: Revised horizontal placement of notes. + Altered many combining symbols to be more like Unicode sample. + Corrected many symbols that should be spacing but had 0 width. + Raised many symbols that were far lower than in Unicode + samples. + +2009-05-18 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + U+0354 and U+0355 (combining left/right arrowhead below) were switched + +2009-05-11 Stevan_White + * FreeSans.sfd, FreeSerif.sfd: + + Hebrew: Moved vowel below mark for esh (05e8) and dalet (05d3) as + recommended in bug report #25887 + "FreeSans Hebrew most nonspacing marks are spacing" + https://savannah.gnu.org/bugs/?25887 + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Put PS Private BlueScale back to default. (Was really experiment to + alleviate excessive overshoot. Didn't work and FontForge complained.) + + * FreeSerif.sfd: + + Geometric Shapes: made two 'bullet' shapes to be consistent with 'bullet' + Blues values: put Std VH W into Stem Snap values + + * FreeSans.sfd: + + More Geometric Shapes. also worked on character widths. + +2009-05-09 Stevan_White + * FreeSans.sfd: + + More Geometric Shapes + +2009-05-02 Stevan_White + * FreeSansOblique.sfd: + + Had misplaced Tifinagh range. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + The rest of Tifinagh, courtesy of Daniel Johnson. + + a few adjustments. + +2009-05-01 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Explicitly disabled PS Private dictionary entry BlueFuzz + as recommended in Adobe Type 1 Font Format, sect. 5.8. + + * FreeSans.sfd: + + Tifinagh range, courtesy of Daniel Johnson. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Adjusted PS Private values according to understanding of + Adobe Type 1 Font Format (Ch. 5, Private Dictionary) + + Not completely clear on BlueScale, and StemSnap values are still a + mystery. (FontForge 'guess' seems to do little or nothing, and I + don't know where these values came from) + + Original hope was to improve appearance of overshoot in Sans, but it + seems that my renderers ignore this information. + + * tools/ranges.py: + + Corrections for Georgian and Tifinagh ranges + +2009-04-28 Stevan_White + * FreeSans.sfd: + + More Geometric Shapes + +2009-04-27 Stevan_White + * FreeSans.sfd: + + Added U+25D0-3 (half-black circles) + Note the Geometric Shapes range is still in poor shape in Sans. + +2009-04-25 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Serif: fiddled with mark positioning in Cyrillic and Glagolitic + Non-roman faces: Added 'mark' positioning for Cyrillic + +2009-04-14 Stevan_White + * FreeSerif.sfd: + + Cyrillic Extended-B more additions. Now has all except payerok + punctuation and Old Abkhasian letters. + +2009-04-13 Stevan_White + * FreeSerif.sfd: + + Cyrillic Extended-B a few more letters + + * FreeSans.sfd, FreeSerif.sfd: + + kerning: tweeks + +2009-04-11 Stevan_White + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Georgian: additions and improvements. + Serif now has full compliment. + Note uppercase is questionable, being a simple scaling... + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Latin Extended-D added u+a788-c + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin Extended-D + corrected slots for Mayanist letters in roman + added modifier letters u+a788-c + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Latin Extended-D Mayanist letters by Daniel Johnson + + * tools/ranges.py: + + Corrected Vai range + +2009-04-10 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Letterlike Symbols: additions and improvements + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Letterlike Symbols: additions, improvements + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Reconsidered numeral 1. Made angle more like other angles in font. + +2009-04-09 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Increased angle of hook on numeral 'one', to improve distinction from + letter 'l' at small point sizes. (Noticed that on some systems, even + at 12 point the distinction had not been obvious.) + +2009-03-29 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + General Punctuation: Adjust position, shape of quotes, fiddle with + others. + + * FreeSans.sfd: + + Kerning: Had grouped letters with round bowls on left (e,c,0,d,q) + together, but now see the original Nimbus fonts had left bounds that + vary by 10 EM or more, which is quite visible. I am correcting a + flaw in the original font in a very difficult and complex way. + It would be much better to make the bounds of these similar letters + to be equal. + To do: same for punctuation, copy to other styles of Sans. + + * FreeSerif.sfd: + + Kerning tweeks. + +2009-03-22 Stevan_White + * FreeMono.sfd: + + clean-up of some of the basic Nimbus glyphs + + * FreeSans.sfd, FreeSerif.sfd: + + Hebrew: more work on lookups regarding vowel marks + + * FreeSans.sfd: + + Hebrew: vowel mark positioning + +2009-03-16 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + re-named some lookup tables (Sinhala, Hebrew) + +2009-03-15 Stevan_White + * FreeSerif.sfd: + + Georgian: point-wise cleanup + note: doubts about spacing and glyph bounds in capitals + + * FreeSerif.sfd: + + Greek Extended: corrected u+1fd3 + +2009-03-13 Stevan_White + * FreeSerif.sfd: + + Cyrillic (and extensions) various tweeks to old Cyrillic letters, + spacing. + +2009-03-07 Stevan_White + * FreeMonoBoldOblique.sfd: + + correct direction braceleft + + * FreeSerif.sfd: + + Glagolitic: tweeks + + * FreeMonoBold.sfd: + + correct direction of braceleft + +2009-03-05 Stevan_White + * FreeSerif.sfd: + + Glagolitic: more fiddling. Raised small letters so their tops are + even with the tops of the big letters, which is more in line with + their "hanging" nature, and with most manuscripts. + +2009-03-04 Stevan_White + * tools/ranges.py: + + ranges for Sinhala + +2009-03-03 Stevan_White + * FreeSerif.sfd: + + Glagolitic: More tweeks. Added Djervi (I think) + +2009-03-02 Stevan_White + * FreeSerif.sfd: + + Glagolitic: tweeks + +2009-02-28 Stevan_White + * FreeSerif.sfd: + + Sinhala: replaced U+0DD0-1 with ones from sinha font + + Glagolitic: Additions, improvements (Note: the characters still missing + I simply haven't yet recognized in a manuscript or found in an on-line + HTML encoded text. I would like to see real ones rather than copying + out of the Unicode samples.) + + Cyrillic Extended-B: Assembled Monograph Uk, uk. See discussion + http://en.wikipedia.org/wiki/Uk_(Cyrillic) + +2009-02-27 Stevan_White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made braces more distinctive. + +2009-02-26 Stevan_White + * FreeMono.sfd: + + ASCII: Accentuated braces (for better readability in terminals) + +2009-02-24 Stevan_White + * FreeSerif.sfd: + + Cherokee: Daniel improved U+13d2 + + Sinhala: Copied most Unicode glyphs directly from Yannis Haralambous + sinhala MetaFont files. These are: all but 0dd0 0dd1 0df4. + Gave Unicode characters names, based on a transliteration scheme from + Harshula. + The auxiliary Sinhala are all from the LKLUG font. + +2009-02-23 Stevan_White + * FreeSerif.sfd: + + Copied glyphs from LKLUG font, as discussed with Harshula Jayasuriya. + http://sinhala.cvs.sourceforge.net/viewvc/sinhala/sinhala/fonts/ + + This font is derived from a Metafont font: This package was + originally developed by Yannis Haralambous (Yannis.Haralambous at + univ-lille1 fr), with funding from the Wellcome Institute for the + History of Medicine, 183 Euston Road, London NW1 2BE, England (Contact + person: Dominik Wujastyk (D.Wujastyk at ucl ac uk)), which is using + the font in its Catalogue of Sinhala Manuscript. The original package + was available by ftp at ftp.bcc.ac.uk in: + /pub/users/ucgadkw/indology/software/sinhala1-TeX.zip + + The hope is to eventually pull glyphs directly from the original MF + files. + +2009-02-21 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + tidying previous commits + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Serif: Revised letter spacing in Armenian. + Serif roman: Added initial version of Glagolitic (by me) + +2009-02-18 Stevan_White + * FreeSerif.sfd: + + Armenian: spacing changes + Sinhala: deleted range, for usual reasons: + It doesn't even contain the full set of Unicode letters, and Sinhala + requires auxiliary characters and lookup tables for proper + representation. + (Found what I think are the originals at + http://www.mettanet.org/fonts/ ) + +2009-02-12 Stevan_White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + SerifBoldItalic - Armenian oblique from Daniel Johnson's bold version + Added ligatures (by Daniel) and lookup tables. + + * FreeSerifItalic.sfd: + + Armenian: Made oblique version of Daniel Johnson's range + + * FreeSerifBold.sfd: + + Armenian by Daniel Johnson + + * FreeSerif.sfd: + + Improvements of a couple of Armenian characters, from Daniel Johnson. + + * tools-- GenerateOpenType, GenerateTrueType, checkGlyphNumbers.py, findBackLayers.py, isMonoMono.py, range_report.py, ranges.py, validate.py: + + Changed /usr/local/bin/fontforge to /usr/bin/fontforge + (to work with the update-alternatives mechanism, whereby a link is made + /usr/bin/fontforge -> /etc/alternatives/fontforge -> preferred binary ) + +2009-02-07 Stevan_White + * FreeSerifItalic.sfd: + + Latin: Kerning. Fixed some missing extrema + Made some more delicate italic IPA letters + +2009-02-06 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Latin: kerning + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Adjusted ff etc ligatures in Italic + +2009-02-05 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Thai sample text (means something like + Mr Sangkapan who sells bottles was picked up by the police because he + stole the wash of ms. .....) + +2009-02-04 Stevan_White + * FreeSans.sfd: + + Vai range, by Daniel Johnson + + * FreeSerifBoldItalic.sfd: + + Latin: kerning + +2009-02-03 Stevan_White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Latin: kerning + +2009-01-26 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made nu distinct from v. + Remedies bug #25376: https://savannah.gnu.org/bugs/?25376 + greek letter 'nu' [U+03bd] same as latin 'v' [U+0076] in FreeMono + +2009-01-22 Stevan_White + * FreeSans.sfd: + + Kerning. Need to copy to other faces + + Arabic ligatures: turned on "ignore combining marks" on advice of + Khaled Hosny. + +2009-01-20 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Drew U+1e9C-F in Latin Extended Additional (including capital ess-zet) + +2009-01-19 Stevan_White + * FreeMono.sfd: + + Update of Kayah Li from Daniel Johnson + +2009-01-18 Stevan_White + * FreeSerif.sfd: + + Latin: kerning + + Coptic: Laula to be same height as Phi Psi (higher than other letters). + Dei and dei also to be higher letters, adjusted widths too. + + Unified Canadian Aboriginal Syllabics: moved the non-Unicode letter + part glyphs ucas.ring ucas.horizline ucas.shortvert ucas.righttack + ucas.lefttack to the Private Use area + 59664-59668 + Technique was to edit the SFD file directly: It seems the encoding + slot for the glyph is the first field of the "Encoding:" line for + the character. + + * FreeMono.sfd: + + Cherokee: improvements from D. Johnson. + +2009-01-17 Stevan_White + * FreeSerif.sfd: + + Cyrillic: Kerning. + + Re-linked Ezh/Yogh and re-made reversed Ezh. + +2009-01-16 Stevan_White + * FreeSerif.sfd: + + Fiddled with Coptic glyphs: Longer tail on Shei, less droopy Alfa. + Made Armenian Aiw to be a link to Phi (on Daniel Johnson's advice ) + + * FreeMono.sfd: + + Kayah Li by Daniel Johnson + + Cherokee, by Daniel Johnson + + Made references of some Armenian punctuation, + Made primereversed to be really the reverse of prime. + + Removed hints + + * tools/ranges.py: + + corrected Unified Canadian Aboriginal Syllabics + +2009-01-13 Stevan_White + * FreeSans.sfd: + + named some Armenian letters + + * FreeSerif.sfd: + + Armenian range by Daniel Johnson, with ligatures. + +2009-01-12 Stevan_White + * FreeSerif.sfd: + + Coptic: Raised top of laula above common top, as it appears in most + other fonts. Makes it easier to distinguish from alfa. + A little more space around Iauda and iauda. + Kerned Dei. + +2009-01-11 Stevan_White + * FreeSerif.sfd: + + Coptic: Made capital Alpha is distinct in printed form. + Made more angular vida with flattened top and bottom. + Made small hori more curvy. + More fiddling with Hori, made Kapa much wider. + + Reduced width of small letter straight stems to match small letters + in Latin. + Kerning for capitals. + + Revised: + Added a few dialectic letters and kai symbol + Removed many "ear" serifs, preferring a slashing continuation of + long decenders and diagonals as in some manuscripts + Made Kai and kai not to go below baseline + Made Psi a little broader + Made small khei distinct from cap, + Revised Hori and hori. + Some of this toward https://savannah.gnu.org/bugs/?25289 + + Greek: Made archaic letters u+0370-3 (understand are used for + old numbering) + +2009-01-08 Stevan_White + * FreeSerif.sfd: + + Various alterations to Coptic: Re-worked K and M, added kern table. + +2009-01-07 Stevan_White + * FreeSans.sfd: + + Daniel Johnson's fix of TT reference transformation bug in + Unified Canadian Aboriginal Syllabics, + +2009-01-06 Stevan_White + * FreeSans.sfd: + + Unified Canadian Aboriginal Syllabics range, courtesy of Daniel Johnson. + +2009-01-04 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added 2009 to copyright dates + + * FreeSans.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added some TrueType names + +2009-01-04 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added 2009 to copyright dates + + * AUTHORS, CREDITS: + + Removed Glagolitic range author + + * FreeSans.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added some TrueType names + +2009-01-01 Stevan_White + * FreeSerif.sfd: + + Removed Glagolitic range, since have not (yet) received OK from author. + + Added some TrueType Names + +2008-12-31 Stevan_White + * COPYING: + + Updated license to GPL v3 + +2008-12-30 Stevan_White + * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Oblique versions of Daniel Johnson's Cherokee. + + * FreeSerifBold.sfd: + + Cherokee Bold range from Daniel Johnson. + +2008-12-27 Stevan_White + * isMonoMono.py: + + 900 EM -> 800 + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd: + + Made glyphs to lie between -200 and 800 EM + + * isMonoMono.py: + + check that glyphs lie in vertical bounding boxes + + * FreeMono.sfd, FreeSerif.sfd: + + Extensible bracket characters didn't exactly line up. Fixed. + Mono: a couple of glyphs had gotten out of their bounding boxes again. + + * tools/isMonoMono.py: + + 900 EM -> 800 + + check that glyphs lie in vertical bounding boxes + +2008-12-26 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Final pre-release cleanup + + * FreeSerif.sfd: + + Buginese vowel u was misnamed + + * FreeMono.sfd: + + Yatcyrillic somehow was a mark character ... fixed + + * FreeSans.sfd, FreeSansOblique.sfd: + + Had to un-link references in + Sans: uni02B2, uni02B5 + SansOblique: uni0363 + because validation of the TTF file said the glyph + "is drawn in wrong direction" + I would have preferred to have understand this... + + * Makefile: + + Added quick test for FontForge version. + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd: + + Removed kerning tables (?? what were they doing here anyway??) + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Kerning tables for Thai. + Handles one common case: short letter followed by a tall one with + an overhang to the left. + + * tools/ranges.py: + + some changes to explanatory text + +2008-12-25 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + More putzing with kerning tables + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Copied kerning classes + Serif -> SerifBold + SerifItalic -> SerifBoldItalic + Sans -> SansOblique SansBold SansBoldOblique + Some associated naming of characters, etc + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Additions and correction in Spacing Modifier letters and IPA Extensions + +2008-12-23 Stevan_White + * FreeSerif.sfd: + + Applied patch to Cherokee range + +2008-12-20 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Fixed kern classes that end in space (crashes FontForge) + + * FreeSerifItalic.sfd, FreeSerif.sfd: + + kerning + +2008-12-19 Stevan_White + * FreeSerifItalic.sfd: + + kerning + + * FreeSerif.sfd: + + kerning + Some adjustments to Glagolitc spacing, mark positioning + +2008-12-18 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + +2008-12-17 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + +2008-12-11 Stevan_White + * FreeSans.sfd, FreeSerif.sfd: + + kerning + +2008-12-10 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd: + + kerning + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd: + + kerning + +2008-12-09 Stevan_White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + +2008-12-08 Stevan_White + * FreeSansOblique.sfd: + + Slanted small final sigma. Remedies + bug #24993: U+03C2 "Greek small letter final sigma" not slanted in + Free Sans Oblique + https://savannah.gnu.org/bugs/index.php?24993 + +2008-12-07 Stevan_White + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + kerning, etc + +2008-12-06 Stevan_White + * FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + kerning + Tweek in Sans having to do with addition of Latin Extended + +2008-12-05 Stevan_White + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Tweeks to Latin Extended Additional + + * FreeSansBoldOblique.sfd: + + Added Latin Extended Additional range + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Extra space at end of kern class names has bad effect on FornForge + script that try to run through kern classes. Some FontForge call + corrupts memory. + Got rid of extra space. + +2008-12-02 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Replaced U+0387 GREEK ANO TELEIA with top dot of colon. + See bug #24987: U+0387 GREEK ANO TELEIA too low + https://savannah.gnu.org/bugs/index.php?24987 + + * FreeSerif.sfd: + + more kerning in Cyrillic (broke into two tables of classes) + +2008-12-01 Stevan_White + * FreeSerif.sfd: + + tweeks to kernin + + * FreeSerifBoldItalic.sfd: + + kerning + +2008-11-30 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Kerning for Latin and Cyrillic fairly complete in Serif faces. + Complete in sense that it looks pretty good under Pango for + English French German Spanish Polish Czech Latvian + But have not done Vietnamese (will require many more entries). + I adjust roman and italic, then copy tables by hand to bold and + bolditalic. + Misgiving: bolditalic is much too crammed + Overall, I may have over-kerned. (A difficult temptation to master.) + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + kerning + In Serif, modified widths of some extended latin glyphs + +2008-11-29 Stevan_White + * FreeSerif.sfd: + + Broke Latin kerning subtable into four, hoping it will be easier to + understand and maintain. + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, + FreeSerifItalic.sfd, FreeSerifBold.sfd, FreeSansOblique.sfd, + FreeSans.sfd: + + kerninig + +2008-11-28 Stevan_White + * FreeSans.sfd, FreeSerif.sfd: + + more kerning; + made guillemot narrower + + * FreeSansOblique.sfd, FreeSerif.sfd: + + previous commit was incomplete + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Adjusted width of single quotes (and apostrophe) to be "punctuation width" + More fiddling with kerning. + +2008-11-27 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + much fiddling with kerning + +2008-11-26 Stevan_White + * FreeSerifBold.sfd: + + Basic kerning, named main Cyrillic letters + + * FreeSerifItalic.sfd: + + Basic Cyrillic kerning + + * FreeSerif.sfd: + + Tweeks to Cyrillic kerning + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd, Makefile: + + Much fiddling with kerning, tables, and generating fonts whose kerning + tables work with OpenOffice. + + * tools/GenerateTrueType: + + Made to include old-style kerning + Converted to Python + +2008-11-24 Stevan_White + * FreeSerif.sfd: + + regularized padding in Miscellaneous symbols. + At least within related ranges tried to make similar. + Made to validate + +2008-11-23 Stevan_White + * FreeSerif.sfd: + + Filled out Miscellaneous Symbols. Used George Douros' Unicode font. + Completed Miscellaneous Symbols, with some drawings from George Douros' + Unicode Symbols, and some of mine. + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Replaced Greek Exteded psili and dasia with scaled versions of the + "bent quote" mark. I think it's distinctive enough, but not so silly. + + Remedies bug #22997: Mono: Greek Extended psili is ugly + https://savannah.gnu.org/bugs/?22997 + + * FreeSerif.sfd: + + Made some recycling symbols + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Finished with Hebrew Pointed letters in all faces. + + * tools/range_report: + + preferred to keep the file ending + +2008-11-22 Stevan_White + * FreeSans.sfd: + + Fiddled with Hebrew Pointed letters + + * FreeSerifItalic.sfd: + + Marks for Vietnamese + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Letter pe had strange thick middle ear that looked awful. lamed had ben + bumped at some point. Fixed. Adjusted some of the points. + +2008-11-21 Stevan_White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + repairs to Pointed Hebrew + + * FreeSerif.sfd: + + Numeral line positioning marks for Gothic + + * FreeSerifItalic.sfd: + + Added Combining Marks for Symbols (some question about obliqueness of + some symbols) + Cleaned up some empty glyphs in Pointed Hebrew. + +2008-11-20 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Provided Hebrew pointed letters, with lookups, for all Serif faces. + +2008-11-19 Stevan_White + * FreeSerifBoldItalic.sfd: + + renamed Hebrew lookups + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Completed Hebrew in Bold faces. + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + More tweeks to Hebrew points + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Adjustments corrections and additions to Hebrew points + +2008-11-18 Stevan_White + * FreeSansBold.sfd: + + Cleaned out a lot of ridiculous kernings + +2008-11-17 Stevan_White + * FreeSansBoldOblique.sfd: + + fiddled with Armenian ligatures + + * FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added Armenian (with ligatures) to BoldOblique + Fiddled with character spacing + +2008-11-16 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added U+01f9 and paragraph end marker to Georgian + Fiddled with Armenian ligatures + +2008-11-15 Stevan_White + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Another pass at letter spacing in Cyrillic. + Also went through ancient letters. + + Added Georgian paragraph separator 10FB + Added Georgian turned gan 10F9 (because it was easy) + + Re-worked letter spacing through modern Cyrillic range. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd: + + Letter spacing + +2008-11-14 Stevan_White + * FreeSerif.sfd: + + Added several characters to Cyrillic Extended-B + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Made Cyrillic hooked e U+04BC-F to look less goofy. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Based on assertion on Pechatnyj Dvor's web site, Cyrillic Fita + U+0472-3 and "Barred O" U+04E8-9 are different styles the same letter, + and the fact that the tilde in the O never looked good in Sans, I + made them all barred O's. + + * FreeSerif.sfd: + + Added Cyrillic Yn, yn (U+a65e-f) + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Synced up Cyrillic and Combining Diacritics ranges, + Couple of tweeks in Gujarati to make TT validate + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Changes to older Cyrillic letters, in response to further information. + Made omegas, omegas with titlo, and OT to all be of the same size and + shape in Serif. + Un-linked Cyrillic Psi and psi from Greek, made squarer versions. + + Some more Cyrillic diacritical marks in Sans. Re-worked U+04bc-f . + Experimenting with mark positioning for Cyrillic + +2008-11-12 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Strove to make Euro look more like the EC logo design, while making + glyph fit better with the design of its face. Bug #3576: Euro design + https://savannah.gnu.org/bugs/?23576 + + * FreeSans.sfd, FreeSerif.sfd: + + Adjustments mostly to GPOS tables having to do with Vietnamese marks. + The WAZU Vietnamese test page looks pretty good in Sans now. + Still not thrilled with below-dot when it appears with a mark over + e.g. U+0102. Pango positions one or the other but not both. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Extensive modification of GPOS lookup tables for mark positioning. + I think they're now all functional (except styled Mono faces have none). + Also added lots of marks to faces that didn't have them, and also + fiddled with Combining Diacritical Marks. + +2008-11-10 Stevan_White + * FreeSerif.sfd: + + Made one combining mark really combining + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made a few combining characters to be zero-width in Mono, + Added them to other styles. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Figured out why below marks in Thai weren't working in the lowest + letters. I think Pango and other font renderers ignore 'blwm'. + However, 'mark' works. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Tweeks to Thai marks + +2008-11-09 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Several bugfixes in Thai, mostly having to do with mark placement and + ligatures. Implemented ru-saraaa and lu-saraaa with ligatures. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + added and named dottedcircle (used by Pango to render + combining mark base) + + * FreeSerif.sfd: + + Tweeks to Coptic, after viewing more papyrus samples and web pages. + + * FreeSerif.sfd: + + Weight of Coptic small letters made to match that of Latin and Greek ones. + +2008-11-08 Stevan_White + * FreeSerif.sfd: + + Made Coptic to comply better with + http://www.wazu.jp/gallery/Test_Coptic.html + Made a flourish at foot of letters with long diagonal. + + More tweeks to Coptic; put in a mark lookup table. + + Note: for small letters I made scaled references to captials. + Results in those letters looking quite light next to the capitals and + next to small Latin letters. Also, there are a few variant forms for + capitals (Unicode samples don't show this). It would be good to + re-work + + Added Coptic alphabet in u+2C80-2CB1 and u+03E2-u+03EF, drawn/built by + me, based on Unicode samples, TeX font copte, and scans at WikiPedia. + +2008-11-07 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Further tweeks to dieresis in Greek and Cyrillic + + * FreeSerif.sfd: + + replaced Greek I dieresis with references, tweeked height of dieresis. + +2008-11-04 Stevan_White + * FreeSerif.sfd: + + Added a few Cyrillic Extended-B letters seen in web pages while looking + for Glagolitic text. + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Added a few old Cyrillic characters. + + * FreeSerif.sfd: + + Several corrections and tweeks to Glagolitic. + Still missing six slots from Unicode, but don't see them in the TeX + fonts. + On the other hand, several on-line Glagolitic pages (bibles etc) don't + seem to use these. Maybe it's OK as-is. + +2008-11-03 Stevan_White + * FreeSerif.sfd: + + Added lowercase range to Glagolitic, as a facile scaling of the + uppercase. + + Added letter to Glagolitic, scaled range. + +2008-11-02 Stevan_White + * FreeSerif.sfd: + + Replaced fraktur bold from Mathematical Alphanumeric Symbols with that + from TX Fonts by Young Ryu. + One concern: letter k is damaged (in both medium and bold). I just + hacked something up. + + Added Glagolitic "round type" font (Croation capitols only) from the + collection of Croatian fonts for LaTeX by Darko Zubrinic + ftp://ftp.dante.de/tex-archive/languages/croatian/ + http://www.tug.org/TUGboat/Articles/tb17-1/tb50zubr.pdf + + Several letters are missing besides the small letters. + + * FreeSerifBoldItalic.sfd: + + A couple of Thai references got obliqued twice. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + By popular demand, removed 'ears' from Greek Upsilon and Psi. + Copied resulting glyphs to Serif Mathematical Alphanumeric Symbols. + + * FreeSerif.sfd: + + Some pointwise cleanup of main Tamil range + + Tried some things with lookups. Didn't make much headway. + +2008-11-01 Stevan_White + * FreeMono.sfd: + + somehow made a letter with wrong width + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added similar lookups and ligatures to Thai ranges. + + * FreeSerif.sfd: + + Lookups now work no worse than those for other Thai fonts, at least + in Pango. Still perplexed by behaviour of "Required" lookups. + + For Thai, made ligatures and lookups for yoying and thothan combined + with a lower vowel. These work well. + Attempted looksups for saraaa with ru and lu, and for saraam. + Not working. + + Cleaned up a few of the Bengali ligatures + + * FreeSerifBold.sfd: + + Tweek Thai + +2008-10-31 Stevan_White + * FreeSerif.sfd: + + Fixed ligatures and mark positioning for Hanuno. + Problem with ligatures: Gnome pango doesn't do 'rlig', only 'liga' + + * FreeSerifItalic.sfd: + + Changed lookup table scripts for Devanagari and Bengali. + Find Problems -> ATT found several problems showing lookups acting on + glyphs that weren't listed in the script ranges, including dev2, bng2 + (why not deva and beng, I don't know). + + danda and doubledanda of Devanagari I understand are to be shared among + Indic scripts. So included bng2 and dev2 in the 'aalt' table for those. + + The 'init' and 'half' tables for Bengali made active for bng2. + + The 'locl' table for Bengali didn't do anything I could see: It mapped + the Devanagari danda to itself, and the doubledanda to itself. Deleted. + + Cleaned up some kern tables. + adjustments of under 5 EM are invisible. Some others I just didn't like. + Some were putting a letter beneath another, with is wrong. + + * FreeSerifBoldItalic.sfd: + + Added Thai + + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Changes to mark positioning lookups, esp. in Italic. + Widened numerals in Bold + +2008-10-27 Stevan_White + * FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Tweeks regarding Armenian and lookups + + * FreeSansBold.sfd: + + Added Armenian ligatures FB13-FB17 with lookups + Also made a historical ligature ('hlig') table for u+0587. + + Toward bug #15183: missing characters from Armenian range + https://savannah.gnu.org/bugs/index.php?15183 + + * FreeSansOblique.sfd: + + Added Armenian ligatures, lookups. Cleaned up contours. + + * FreeSans.sfd: + + Added 5 Armenian ligatures to U+FB13 FB17, and made corresponding + 'liga' lookup. Found there one ligature u+0587 that according to + http://en.wikipedia.org/wiki/Armenian_alphabet + + "in new orthography the ? character is not a typographical ligature anymore, and must never be treated as such. It is a distinct letter and has its place in the new alphabetic sequence." + So moved this out of the 'liga' lookup and into a new 'hlig' lookup. + +2008-10-26 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Lots of improvements to Thai. + Completely revised letter spacing in Italic, and fiddled with combining + marks in all. + Still aren't working quite right, especially in Italic. + Still need to work over digits (in Bold they aren't even bold yet) + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Bold Thai : added (painstakingly) constructed glyphs, lookups + roman Thai: tweeks + Italic Thai: tweeks (Note this still has multiple problems) + +2008-10-25 Stevan_White + * FreeSerif.sfd: + + WAZU says + http://www.wazu.jp/gallery/Fonts_Hanunoo.html + + MPH 2B Damase doesn't support the consonant-vowel ligatures necessary + to render Buhid writing. + + OK, so I made 'mark' lookups for combining marks and a bunch of + ligatures in an 'rlig' lookup. The latter still not working: + don't know why. + + Made page to match the example of the combining forms at + http://www.omniglot.com/writing/hanunoo.htm + +2008-10-24 Stevan_White + * FreeSerif.sfd: + + Removed some marks from Mathematical Alphanumeric Symbols + + * FreeSerif.sfd: + + Tweeked combining marks for Vietnamese. Made to satisfy + WAZU JAPAN Comprehensive Unicode Test Page for Vietnamese + http://www.wazu.jp/gallery/Test_Vietnamese.html + Could still use some tweeking... + + * FreeSerif.sfd: + + Added marks for composition of Vietnamese + + * FreeMono.sfd, FreeSerif.sfd: + + Put "below" combining mark on lots of vowels and derivatives, + for Vietnamese. + Named a bunch of composit Latin, expecting to make substitutions. + +2008-10-23 Stevan_White + * FreeSerif.sfd: + + Thai spacing alterations based on advice of a native speaker. + +2008-10-22 Stevan_White + * FreeSerif.sfd: + + re-named Thai lookups according to order + +2008-10-21 Stevan_White + * FreeSans.sfd: + + Cleanup of glyphs in Gujarati, Devanagari. + + Note: Serious problem with Sans GPOS abvm in Devanagari + "'abvm' Above Base Mark in Devanagari subtable" "gujr-0" + But all the characters that list gujr-0 are in Gujarati. + Not sure how this got broken or how to fix it. + + * FreeSerif.sfd: + + Fiddled with Thai mark positioning: passes my tests now OK. + Made a few more references in Math Symbols; more regularization of + stroke. + + * FreeSerif.sfd: + + Added mark class for Vietnamese "horn" + Several references made in General Punctuation, Arrows + + * FreeMono.sfd: + + added some Combining Diacritical Marks + +2008-10-20 Stevan_White + * FreeSerif.sfd: + + Made some references from serifed Latin capitals to Greek counterparts. + + * FreeSerif.sfd: + + Made a few repeated glyphs into references in Musical Symbols + + * tools/ranges.py, tools/validate.py: + + tweeked some ranges, format of output + +2008-10-19 Stevan_White + * FreeSerif.sfd: + + Moved several glypns from Mathematical Alphanumeric Symbols to + Letterlike Symbols. + Couple tweeks in Mathematical Symbols. + + * FreeMono.sfd, FreeSerif.sfd: + + Fiddling with Mathematical Symbols. + In Serif, trying to make stroke width more consistent. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd: + + Added some Greek symbols in Mono and Sans to make a little more regular + and correspond better with TeX. + Tweek of serif. + + * FreeSansBold.sfd: + + a few more improvements. + + One problem with the Mathematical Alphanumeric area is, one must + remember to change it any time another face is altered... + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerifBold.sfd: + + Several improvements and additions to Sans faces (mostly in Greek) from + experience of pasting into FreeSerif Mathematical Alphanumeric Symbols. + + * FreeSerif.sfd: + + Replaced most of Mathematical Alphanumeric Symbols + roman italic bold (latin and greek) + gothic italic bold (latin and greek) + typewriter + and numerals + with glyphs from FreeFont. These were scaled to uniform height. + + Remains: Blackboard Bold, Fraktur, Calligraphic, Script + + * FreeSerif.sfd: + + Tidied lookup table names for Malayalam + + * FreeSerif.sfd: + + Applied Malayalam patch from Hiran Venugopalan + + * FreeMono.sfd: + + Added/corrected many Mathematical Symbols + + * FreeSansOblique.sfd: + + more IPA + +2008-10-18 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made lots more IPA and Phonetic Extensions + Note: fontforge is reporting an error in a few glyphs made by scaling + another, that the glyphs are drawn in the wrong direction--only in + TrueType though. Suspect a FontForge bug. + + Added several Combining Diacritical Marks + +2008-10-17 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made several Spacing Modifier Letters, Combining Diacritical Marks, + and IPA and Phonetic Extensions + +2008-10-16 Stevan_White + * tools/ranges.py: + + un-grayed totals rows + + Fiddled Cyrillic + made output prettier + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added some Superscripts and Subscripts + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Finished off Superscripts and subscripts + + Completed General Punctuation for Mono faces + + Added some General Punctuation + +2008-10-15 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + more Letterlike Symbols, Currency Symbols + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made some Combining Diacritical Marks for Symbols, Letterlike Symbols + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Added some General Punctuation + +2008-10-14 Stevan_White + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added double slanted hyphen, made General Punctuaton Supplement like + Serif's + + * FreeSansBoldOblique.sfd: + + Filled out Greek Extended + + * FreeMono.sfd, FreeSerifItalic.sfd: + + fixes to last 2 commits + + * FreeSerifItalic.sfd: + + Last character to General Punctuation + + * FreeMono.sfd: + + Built some Enclosed Alphanumerics (1-10) + + * FreeSerif.sfd: + + Copied in Daniel Johnson's changes to Cherokee. + +2008-10-12 Stevan_White + * FreeSerif.sfd: + + Included Daniel Johnson's Cherokee glyphs. + +2008-10-05 Stevan_White + * FreeMono.sfd: + + Further corrections to diaresis in Cyrillic -- legibility in small sizes + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSerif.sfd: + + Regularized placement of diaresis in Cyrillic + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added same set of glyphs to Cyrillic Supplement + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added some of the easier letters from Cyrillic Supplement + +2008-10-04 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSerifItalic.sfd: + + Finished high Cyrillic range for MonoBold and MonoBoldOblique. + (Remaining: historic ranges, Cyrillic extensions) + Tweeked others. + + * FreeMonoBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Serif*Italic: Added last Abkhazian letters to Cyrillic + MonoBold: tweek + +2008-10-03 Stevan_White + * FreeMono.sfd, FreeMonoOblique.sfd, FreeSerif.sfd, FreeSerifBoldItalic.sfd: + + Mono: Some additions to historic letters + + * FreeSerif.sfd: + + Added some punctuation and combining numeric marks from + Cyrillic Extended B + + * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Various technical tweeks, mostly concerning recent additions. + Also did a bit more "Points too close" and "irrelevant control points". + Cyrillic millions redesign meant could not maintain use of refrences + for it. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More high Cyrillic + Included old Cyrillic millions combining mark in Sans, changed design + in Serif + +2008-10-02 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + More high Cyrillic + + * FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd: + + More high Cyrillic glyphs + + * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More glyphs in high Cyrillic. Remains only some whose form I'm unsure + of in italic. + + * FreeSerifBoldItalic.sfd: + + More glyphs in higher Cyrillic range + + * FreeSerifItalic.sfd: + + Same process of tightening el, em, ge (but a P.S. to previous commit: + also did ya, ze for SerifBold.) + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + BoldItalic: Tightened up spacing on left of el, em, ge (could go + farther, but it is partly a problem with glyph design... + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More additions to Cyrillic. Finished SerifBold except for Nivkh + additions. + Used references on number combining forms. + +2008-09-30 Stevan_White + * FreeSerif.sfd: + + Added four (obsolete) Chuvash letters to Cyrillic Supplement + - completing it. + +2008-09-29 Stevan_White + * FreeSerif.sfd: + + Greek adjustments + Adjusted spacing of kappa slightly + Got rid of ears on Psi, following similar request for Upsilon. + +2008-09-28 Stevan_White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Adding and fiddling with Spacing Modifiers and Combining Diacriticals + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Revisions of several Combining Diacritical marks + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + A few Combining Diacriticals and Spacing Modifiers + + MonoBoldOblique: Primarily filling out Spacing Modifier Letters + others: little fixes found along the way + +2008-09-27 Stevan_White + * FreeSerif.sfd: + + Replaced Malayalam range with that from Rachana_04 found on + Swathanthra Malayalam Computing project page + http://savannah.nongnu.org/projects/smc/ + Besides scaling and converting to cubic, performed much clean-up of + glyphs, added an r2 character, and re-named a bunch of characters. + +2008-09-23 Stevan_White + * tools/ranges.py: + + Corrections and additions to several ranges, + put extra row in table with character totals + +2008-09-22 Stevan_White + * FreeSerif.sfd: + + Filled in as much of Phonetic Extensions as I could without artistic + abilities. + Note 1D48-9 are not references due to apparent FontForge bug, that says + scaled references go in wrong direction. + + * FreeSerif.sfd: + + Cleaup of some Bengali glyphs. + Note many of the ligatures remain very very messy. + + * Makefile: + + added more validations + made to work with GenerateOpenType + + * FreeSerif.sfd: + + Built two more easy Phonetic Extensions + + * FreeSerif.sfd: + + Built some Phonetic Extensions letters, those with middle tilde + + * tools/GenerateOpenType: + + Replaced bash version with Python + +2008-09-21 Stevan_White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Added lots of Spacing Modifier Letters and Combining Diacritical Marks. + + * FreeMono.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSerif.sfd: + + Wrote script to check if glyph encodings were in stated ranges, fixed + most discrepancies. + + There were a bunch of incompletely deleted characters in several faces. + + Sans: found several other problems in the process + # Tamil + Four slots labelled 0BDA-D have glyphs, not in Unicode. also 0BE1 + I think they are misplaced; added 0010 to each of them + + # Devanagari + Slot labelled U+093B is not in Unicode--can't find glyph: deleted + likewise 094F (may have been meant to be 0954) + 0955, 0973-0976 + + 0954 should be a combining mark, but it appears on the wrong side of 0. + 0971 was just wrong--made into simple dot. + 0972 is also wrong--made my own Candra A. + + # Gujarati + Slots labelled 0AE4-5 are not in Unicode; seem not to belong at all. + Deleted. 2800 is a dup of 2790. Deleted + + Serif: phillipine_double u1736 was misplaced + + A bunch of the Math Alphanumeric symbols are empty in the standard, + because they're represented elsewhere. These should be deleted + First need to make style consistent with existing symbols. + + * FreeSerif.sfd: + + Applied patch from Daniel J + Remedies bug + FreeSerif: Missing glyphs with palatal hook + https://savannah.gnu.org/bugs/index.php?24298 + Adding several letters to Phoenetic Extensions range U+1D80-BF + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made four characters U+200C-F to be zero-width + Remedy to bug #23593: Mono 0-width chars: zero-width or space? + https://savannah.gnu.org/bugs/index.php?23593 + + * FreeSerif.sfd: + + Made Mahjong tiles to take up less space using references + Cleaned up several validation problems + +2008-09-20 Stevan_White + * tools/checkGlyphNumbers.py: + + included other Private Use Ranges + +2008-09-19 Stevan_White + * FreeSerif.sfd: + + Added several Hebrew Alphabetic Presentation Forms (some easy ones), to + make its coverage the same as Serif Bold. + + * FreeSerifBold.sfd: + + Re-encoded. + Deleted several glyphs in Hebrew Alphabetic Presentation Forms that + didn't correspond valid Unicode + + * FreeMonoBold.sfd, FreeSans.sfd, FreeSerifItalic.sfd: + + Ran script to find mis-numbered glyphs. Several were simply typos, + some offset by one. + + * FreeSansOblique.sfd: + + Numerous cases of glyphs in Private Use area incorrectly assigned + Unicode numbers and names. Gave all -1 for Unicode and named like + "slot.XXXX". + + * FreeSerif.sfd: + + Adapted Mahjong Tiles from George Douros' Unicode Symbols font. + + * FreeSerif.sfd: + + Added Domino Tiles. Domino outline is copied from George Douros' + Unicode Symbols, but the rest I preferred to do with references. + +2008-09-19 Stevan_White + * tools/ranges.py: + + corrected and simplified calculation of whether OS/2 bit is set. + Now works mostly perfectly, except for some high Unicode ranges... + + * tools/GenerateOpenType: + + Made to output old-style kerning tables for Windows + (FontForge complains though) + + * tools/GenerateTrueType: + + Made to hint before instructing: FontForge bases TT instructions on hints + although hints are not put into TrueType fonts. + + * tools/hex_range.py: + + cosmetic tweek + + * tools/isMonoMono.py: + + re-worked to take a list of files as input + + * tools/ranges.py: + + re-structured code and corrected a few ranges + +2008-09-18 Stevan_White + * FreeSerif.sfd: + + Adapted Mathematical Alphanumeric Symbols from George Douros' Unicode + Symbols font. + + * FreeMonoBoldOblique.sfd: + + This one got away from me--I don't know what I did. + Looks like some small contour edits. + + * FreeSansBoldOblique.sfd: + + Fixed one mis-numberd character in Latin Extended-B + + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Fixed several mis-numbered characters. + + * FreeSansBold.sfd: + + SansBold: one Georgian letter with no name, one Zapf Dingbat was + unnumbered + ATT test shows a bunch of problems with Gurmukhi and 'blwf' table + indeed shows those letters at 0x10000+ + Sans names them like uni0A30_uni0A4D.blwf: they are in range + ECC6 to ED06 + + I meant to move this range into Private Use in last release, and + missed it. So now it is moved, into same range as Sans. + + Both Sans and SansBold in nukt table for Gurmukhi have duplicate + entries for uni0A15 uni0A3C. Deleted dups. + + * FreeMonoOblique.sfd: + + fixed a number of Unassigned Code Points in Greek Extended + + * FreeSansOblique.sfd: + + mis-numbered Combining Diacritics + + * FreeSansOblique.sfd: + + Several chars in Latin Extended hadn't been named. + One spurious letter in Letterlike Symbols + +2008-09-16 Stevan_White + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd: + + Lots of additions: unless otherwise noted, they are from George Duros' + fonts Analecta, Music, and Unicode (haven't got final confirmation of + the eligibility of these glyphs, so this is just for testing.) + + Added some combining marks, fiddled a bit. In both Serif & Mono, tried + to get a key symbol characters to fit inside the key combining mark + + Serif + Got rid of ears on Upsilon + Added: + # Gothic + # Western & Byzantine Musical Symbols + + # Misc Symbols, Misc Technical Symbols (drew many myself) + # Supplemental Symbols and Arrows + + Mono + Added: + # lotsa Misc Technical Symbols + # OCR Symbols + # drew many Supplemental Symbols and Arrows, Misc Technical + + Sans + Added # Phoenecian + Made a few Letterlike Symbols; Made Re and Im to be sans-serif. + +2008-09-11 Stevan_White + * FreeSerif.sfd: + + Removed pointless entries from Latin kern table + + Tidied points in Sinhala + +2008-09-07 Stevan_White + * FreeSerif.sfd: + + Tidied up Tamil ligatures EEA8-EEAB to fix TT build warning + "MonotonicFindAlong: Never found our spline." + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, Makefile: + + + Added APL characters to FreeMono (why?...) + + Fixed several last-minute problems, including + + Serif: Tweeked GPOS mark table for Cyrillic + Sans: Added a GPOS table for Cyrillic (but several diacritics missing) + + Serif, Mono: tweeked some bugs in extensible brackets & integrals + + Serif: Vietnamese o circumflex: accent was a bit high. fixed. + + MonoBoldOblique OTF build + uni213b intersects self + + Generation of TT fonts complains about several things to stderr, + including: + + SerifBold: "There exists a 'fpgm' code that seems incompatible with FontForge's. Instructions generated will be of lower quality. If legacy hinting is to be scrapped, it is suggested to clear the `fpgm` and repeat autoinstructing. It will be then possible to append user's code to FontForge's 'fpgm', but due to possible future updates, it is extremely advised to use high numbers for user's functions." + Probably has been there since I first copied the TT instructions in. + Just repeated the copying process carefully, and the warning went away. + + Serif: "FindMatchingHVEdge fell into an impossible position" + fixed a bunch of point too close + + REMAINING PROBLEM in Serif TT build + "MonotonicFindAlong: Never found our spline." + fixed several bad TT matrices-- there are several more + fixed many "control points too close" no luck + +2008-09-03 Stevan_White + * FreeSans.sfd, FreeSansOblique.sfd: + + Added/corrected some Misc. Symbols by copying from Serif. + Note this is only a stopgap solution. Want real sans-serif symbols. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added minimal Miscellaneous Symbols: card suites and some musical notes. + Note not happy with shapes...some I just drew. Sans isn't really sans. + + Fixed one APL symbol in Mono so it verified in OTF version + +2008-08-31 Stevan_White + * FreeMono.sfd: + + Built set of APL symbols. + +2008-08-30 Stevan_White + * FreeSans.sfd: + + Un-linked references in uni02B2 and uni02B5, because when validating the + TrueType version, FontForge gave an error "is drawn in wrong direction". + I suspect a bug in FontForge. Other similar glyphs make no errors. + + Fixed missing extrema in TrueType. + These were the last cases being reported by validate in all the faces. + + * FreeSerifItalic.sfd: + + fixed last missing extrema in TrueType + + * Makefile: + + restructured validation to look in a directory + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd: + + Fixed missing extrema in TrueType versions + + * isMonoMono.py, validate.py: + + restructured validation to look in a directory + +2008-08-15 Stevan_White + * FreeSans.sfd: + + Same problem with uni0A83 as with bn_llikaar. Just made zero-width. + +2008-08-14 Stevan_White + * FreeSans.sfd, FreeSansOblique.sfd: + + Glyph bn_llikaar, U+09E3 BENGALI VOWEL SIGN VOCALIC LL, + has right bound positioned far into the negative. Causes a warning in + FontForge when opening OTF version. + Comparing with other fonts supporting Bengali, found no others that + do this. + Serif makes glyph width 0 (which sounds right according to Unicode) + and puts glyph wholly to left of 0. But, I haven't found this letter + in text anywhere. I wonder if it is really used in writing. + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Further TrueType validation fixes. + Sans still has two glyps in wrong direction. + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Fixed more TrueType problems...all missing extrema in TTF validation + +2008-08-13 Stevan_White + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + fixed all the TrueType validation problems of type "intersects itself" + and all but two of the "wrong directions", as well as a lot of + "missing extrema". But there remain hundreds of missing extrema in the + TrueType version. + Also, bn_llikaar in Sans and Oblique still has a problem in OTF version. + + * FreeMono.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd: + + Made .ttf files to validate. Other faces have many more problems still. + +2008-08-12 Stevan_White + * FreeMonoOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Continuing to make OTF versions validate. + + * FreeMonoOblique.sfd: + lots of missing points at extrema + * FreeSerif.sfd: + 12 wrong directions, 1 missing extrema + * FreeSerifItalic.sfd: + many missing points at extrema, 1 self-intersecting + + What was wrong: in several oblique cases, an already-italic glyph was + made more italic, thereby fouling up extrema (although why it passed + validation in the SFD I don't know). Some glyphs were + overly-complicated with many near points. Cleaned up, rounded to int. + + Remaining problem: OTF FreeSansOblique FreeSans. one Bengali glyph in + each whose advance width and htmx don't match. + + Moral of story: validate the OTF and TTF versions too before a release. + + * FreeSansOblique.sfd: + + Reverse a mistake from last commit: somehow this file was converted to + quadratic, or something. + + * tools/GenerateTrueType: + + For TrueType, one puts in Instructions, not Hints. + This vastly improves look of TrueType fonts in Windows. + +2008-08-11 Stevan_White + * FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Found that SFD files that validated produced OpenType files that don't. + These represent the easy fixes. Some were result of conversion to + quadratic; some shouldn't have validated in the SFD... + + * MonoBoldOblique: uni0250 missing pts at extrema [reference glyph rotated...] + * Sans: uni0AC4 wrong direction [simplified, rounded to int] + * SansOblique: uni01EA wrong direction [rounded to int] + * SerifBold: uni023f wrong direction [round to int] + * SerifBoldItalic: uni0245 missing pts at extrema [ungrouped ref, added extrema] + +2008-08-06 Stevan_White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd: + + Re-set font metrics, which were somehow making uneven vertical spacing. + +2008-06-22 Steve White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Made to validate + + * ranges.py: + + Brought more into line with OpenType + Added some ranges + Fixed bug with ranges outside of font + + * CREDITS: + + 3 new ranges + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Cyrillic: tweeked accents for consistency, and for readability in small + sizes. + + * FreeSerif.sfd: + + Thanna range: tweeking + + Thaana range: Scaled up by about 15%, raised by 100EM, tightened + some of the diacritics to get inside 900 to -300 EM limits. + + * FreeSans.sfd: + + Added Old Persian and Ugaritic from MPH2BDamase font. + +2008-06-21 Steve White + * FreeSerif.sfd: + + Added Tai Le range adapted from MPH2BDamase font. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Added some ancient Greek numerals from Tempora to high Unicode area, + (partly just to show it can now be done.) + + * FreeSerifItalic.sfd: + + Couple of tweeks putting glyphs above -300EM. + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Surgery to Thai letter 'tho than', u+0e10, to push it above -300 EM. + This makes Thai range completely between 900 and -300 EM. + + * FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Many auxilary characters (esp. for Malayalam, Bengla, and Tamil) + representing ligatures and alternative forms without their own Unicode, + were moved from + ranges above 0xFFFF (which ought to have been slots for other defined + Unicode ranges) into the Private Use area. + + In Serif, I segregated the scripts, in Sans it was hard to see where one + began and another ended, so I moved them en masse. + + Note several problems with wrongly-named characters: + I already re-named glyph570 and glyph582. + But there are others with names starting with A... + + * FreeSansBold.sfd, FreeSansOblique.sfd: + + Fixed (I hope the last) problem with scripts in lookups + Find Problems -> ATT (all selected) finds multiple issues, + + * FreeSansBold.sfd: + In addition to script 'guru', added 'gur2' to the scripts for these + lookups + 'nukt' Nukta forms in Gurmukhi + 'blwf' Below Base Forms in Gurmukhi + 'pstf' Post Base Forms in Gurmukhi + 'blws' Below Base Substitutions in Gurmukhi + 'abvs' Above Base Substitutions in Gurmukhi + 'psts' Post Base Substitutions in Gurmukhi + + * FreeSansOblique.sfd: + In addition to script 'beng', added 'bng2' to the scripts for the lookup + 'half' Half Forms in Bengali + + Moreover, the lookup + 'aalt' Access All Alternates in Latin + contains only Bengali letters. + Re-named as Bengali, made to work on beng, bng2 scripts + +2008-06-20 Steve White + * FreeSerif.sfd: + + Scaled Sinhala range. + Remedies bug #23656: Sinhala letters over-sized + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Mostly messing with Greek Extended accents again. + re-positioned ypogegrammani on advice of Alexey Kryukov + Put prosgegrammani beneath main letters in Mono, to make narrower glyphs + Implemented more distinction between tonos and acute. + +2008-06-19 Steve White + * FreeMonoBoldOblique.sfd: + + Completed fit of Mono to 800 to -200 EM. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd: + + Set Metrics to recommended values + + * FreeMonoOblique.sfd: + + Now Mono Oblique, as well as roman and Bold, are within 800 to -200 EM. + Just BoldOblique to go. + + * FreeMono.sfd, FreeMonoBold.sfd: + + More toward fitting to 800 to -200 EM. + Basically, reduced Georgian by 92%. + Also made an over-all offset, so Georgian is somehow centered (Bold...I + guess I already did this in roman). + Want to also do an emboldening to make stroke like rest of font, but + current FontForge has a nasty crash that loses data on this function. + + * FreeMono.sfd: + + In effort to make fit in 800 to -200 EM, + Scaled Georgian by 92%, centered on 600 wide box. + Next: Embolden a bit. + +2008-06-18 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Toward making all glyphs lie between -200 and 800 EM. + Numerous small changes, especially raising descenders of some Hebrew + letters. + Georgian remains a problem + +2008-06-13 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Moved prosgegrammeni up to baseline, + (and then moved all references down to baseline) + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added Control Picture "blank" to all faces. + Switched U+0222-3 from TemporaLGCUni + +2008-06-11 Steve White + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More fiddling with Greek Extended accents + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Tweeks to accents etc in Greek Extended and Cyrillic + +2008-06-10 Steve White + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Fixed a few big horizontal spacing problems + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Implemented TemporaLCGUni glyphs in Cyrillic ranges. + Added a breve_cyrillic for the moustache breve mark. + +2008-06-08 Steve White + * FreeSerif.sfd: + + Replaced most of Cyrillic range with TemporaLGCUni. + Remodelled many of the derived Cyrillic characters after these. + Fiddled globally with spacing of small letters. + Unclear on diacritics 485-6, unhappy with breve. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Started implementing TemporaLCGUni in Greek ranges. + + Replaced 3DC-3E1 from Tempora, because I thought they looked nicer and + more like the other existing FreeFont glyphs. + Replaced 3DA-B from Tempora, because they look more like Unicode + samples, and nicer. + Added 03f3-4, 03F7-F. + Prefer my own lunate epsilon. + Replaced Phi and Omega from Tempora. + These plainly fit the other FreeFont glyphs better than the origninals. + (How did this happen?) + + In bold, replaced U+03D7 + + Copied lbbar u+2114 + + Small italic greek--replaced most except phi, psi, omega + + Based on new information, broke the identification of oxia with Latin + acute. + +2008-06-07 Steve White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Efforts to control heights of characters + +2008-06-06 Steve White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made to validate + +2008-06-05 Steve White + * FreeSans.sfd: + + Fixed undefined character in kerning classes + +2008-06-04 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + tweeks and additions to General Punctuation + +2008-06-03 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansOblique.sfd: + + Completed/tweeked Number Forms + + * FreeMono.sfd, FreeSerif.sfd: + + Added some Miscellaneous Technical symbols + +2008-06-02 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Tweeks...mostly Letterlike + +2008-06-01 Steve White + * FreeMono.sfd, FreeSerif.sfd: + + Added Box Drawing characters to Serif. + Tweeked a glyph in Mono + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Added several glyphs to Letterlike Characters + +2008-05-31 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Validation pass + + SansOblique and SansBoldOblique had validation problem with BlueValues + Private Dictionary + Elements in BlueValues/OtherBlues array are disordered + Elements in BlueValues/OtherBlues array are too close + (Change BlueFuzz) + StemSnapV does not contain StdVW value. + So I ordered the array, and based on other slanted fonts, + removed StemSnapV. + + Note however, I still think the two top Blues lines are too close + But I don't even know what the second-to-top line is meant to do. + + * FreeSerif.sfd: + + Added to Block Elements, Geometric Shapes + Made to validate + +2008-05-29 Steve White + * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Looking at special symbols. + Drew several Miscellaneous Symbols in Mono and Serif + > Completed/corrected planetary symbols, added Dice, + some other easy ones + > Completed Dingbats in Serif (using URW Dingbats) + Added some Block Elements to Serif + +2008-05-26 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More changes stemming from J. Poon's report. + +2008-05-25 Steve White + * FreeSerif.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Height surgery on SerifBoldItalic. + More fiddling with accents in others. + + * FreeSerifItalic.sfd: + + More height surgery. Only a few left in Benglai and Thai + + * FreeSerifBold.sfd: + + Re-applied surgery to make glyphs between 900 and -300EM + + *** Regression + Inadvertently un-linked all references in SerifBold in r1.83. + This reverses that error (but also un-does the surgery mentioned there) + + * FreeSerifBold.sfd, FreeSerifItalic.sfd: + + Applied surgery to make Latin letters go under 900EM. + One exception yet... + +2008-05-24 Steve White + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Serif: much fiddling with accents in Latin ranges. + Re-thought some glyphs (there are still a few messy ones, especially + in bold) + Checked horizontal spacing...fixed a number of problems. + +2008-05-23 Steve White + * FreeSansBold.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Made Latin Extended-B coverage consistent across Serif; cleaned up some + glyphs + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Filled more of General Punctuation in Sans and Serif + Made all agree on coverage of Latin Extended Additional + +2008-05-22 Steve White + * FreeSans.sfd, FreeSansBold.sfd, FreeSansOblique.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Added Latin Extended Additional to SansOblique. + Made Latin Extended Additional coverage consistent across Sans, B, I + Made Latin Extended-B coverage same in SerifBold. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeSansBold.sfd: + + Mono* made Latin-B coverage consistent across faces + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Made set of Latin Extended-B consistent across Sans faces + + * FreeSans.sfd, FreeSansBold.sfd: + + More filling in General Punctuation + + * FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Another bunch of J. Poon's reports + also, filling in some Combining Diacriticals, Spacing Modifiers, and + General Punctuation in bold faces + +2008-05-21 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Mucking about with mark tables in Thai (Serif) + Other faces: Making changes from J. Poon's report + +2008-05-20 Steve White + * CREDITS: + + Mark Williamson + Jacob Poon + + * Makefile: + + added tests target + +2008-05-18 Steve White + * ranges.py: + + Put table explanation back in + + Improved behaviour for high Unicode + + * FreeSans.sfd: + + Revision of kerning + + * FreeSerif.sfd: + + Made Latin kerning a little more reasonable: + reduced many excessive kerns (some had letters apparently + overlapping, which shouldn't happen) + made kerns increment by 5EM for ease of reading + got rid of kerns too small to be seen + + * FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerifBold.sfd: + + Made to verify + +2008-05-13 Steve White + * FreeSerif.sfd: + + Made to validate + + * FreeSerif.sfd: + + Gurmukhi: filled range in Serif, taking glyphs from the original + Punjabi font by Hardip Singh Pannu + http://members.aol.com/hspannu/punjabi.html (file pb_win95.exe) + +2008-05-12 Steve White + * FreeSans.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Hebrew, basic. Some faces missing punctuation marks, added. + + * FreeMono.sfd, FreeSans.sfd: + + Armenian: Sans tried to make verticals and horizontals of more uniform + width both, finddled with punctuation + + * FreeMonoOblique.sfd: + + made to validate + + * FreeMonoBold.sfd: + + made to validate + + * FreeSans.sfd, FreeSansBold.sfd: + + Armenian in Sans: regularized letter spacing + + * FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd: + + Armenian: fill out ranges and clean up + SansBold especially had a lot of incorrect references. + Now all the ranges with Armenian at least share the same set of + characters. + + * FreeMono.sfd: + + Fixed glyph with wrong width. + +2008-05-11 Steve White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerifItalic.sfd: + + 1) made to validate + 2) Mono: copied in Spacing Modifier Letters (glyphs not yet named) + 3) SerifItalic: Filled in General Punctuation + + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made to validate, and pass all other FontForge tests. + Expedient: rounded everything to int + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Made to have the same Greek Symbols, + Made to validate + + * FreeSans.sfd, FreeSansBold.sfd: + + Made Greek Symbols as full as rest of Sans. Changed a name in Sans. + + * FreeMonoOblique.sfd: + + Made Greek as full as other faces + Made to validate + + * FreeSansBold.sfd: + + Deleted seven orphaned Arabic characters; looks like somebody started, + didn't get very far, putting Arabic in bold. + + Deleted orphaned Arabic glyph from Arabic Presentation forms-B + + * FreeSerifBold.sfd: + + Deleted the single Arabic character: it was clearly there by mistake. + + * FreeSansOblique.sfd: + + Made Greek Symbols as full as rest of Sans + + Tweeks to Armenian + + Comment from previous commit of FreeSans was meant for FreeSansOblique. + In FreeSans, only tweeked a few letters during putting more characters + in this face. + + Filled in Spacing Modifier Letters, increased General Punctuation. + + * FreeSans.sfd: + + Filled in Spacing Modifier Letters, increased General Punctuation + + * FreeMono.sfd: + + Made Armenian as full as other roman faces. + + Completed Spacing Modifier Letters + Added a couple of Greek Punctuation + + added more Spacing Modifier Letters + +2008-05-10 Steve White + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Did same process of scaling and sizing for Thai in Sans as in Serif. + Added mark tables to Sans. Improvement, but there are questions... + + * FreeSans.sfd: + + Tidied some Gurmukhi glyphs, validated. + + Deleted ranges for Oriya, Kannada, on account of + 1) they only contained a subset of the consonant glyphs of the scripts, + few if any vowels, and had no ligature lookups as required + 2) Kannada was based on the Akurti fonts, which have copyright issues. + + See + bug #23225: Oriya range only partial + bug #23224: Kannada range only partial + + * FreeMonoBoldOblique.sfd: + + Made metrics like rest of Mono + +2008-05-09 Steve White + * ranges.py: + + More info on range intervals + + * FreeSerif.sfd: + + Deleted Telugu range. + It didn't represent a complete writing system for the language. + + See notes at https://savannah.gnu.org/bugs/index.php?23202 + Serif: Telugu range missing many characters; many wrong + + Got a copy of the original Tikkana font, + Copied in remaining consonants and vowels that I could find there. + I think one vowel 0C55 is missing according to unicode). + Strangely, the Telugu digits are alo missing. + In Tikkana, the default "checkmark" structural mark is missing from many + consonants, according to Unicode, but is a separate glyph. I put + the checkmark on. + This, and scaled up by 150% and cleaned up intersecting glyphs and + many unnecessary points. + +2008-05-08 Steve White + * FreeSerif.sfd: + + Filled out Telugu consonants. + Vowels still need to be done + +2008-05-07 Steve White + * FreeSerif.sfd: + + Operated on Latin glyphs with stacked accents to make them fit under + 900EM. + Scaled Telugu bu 150%. + +2008-05-06 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeSansBold.sfd, FreeSerif.sfd: + + Corrected further fontforge "find problems" + Added some math characters to FreeSerif + +2008-05-05 Steve White + * FreeSansBold.sfd: + + Made to validate, and fixed bad TT transformations + +2008-05-04 Steve White + * FreeMono.sfd, FreeSerif.sfd: + + Mainly TeX additions trying to satisfy Markus Kuhn's TeX-as-Unicode page + + * FreeMono.sfd: + + Adjusted heights of extensible brackets + + Fixed problems with extensible brackets, thanks to Markus Kuhn's page + http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt + + * ranges.py: + + fiddled with ranges, doc + + made some ranges more correct? + + fixed some bugs in ranges + better error reporting + + Got rid of Unicode 1.1 references + + made to use OpenType table + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd: + + made to validate + +2008-05-03 Steve White + * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Removed digits from Private Use Area. + See bug 23050. + + * FreeMono.sfd, FreeSans.sfd: + + Completed General Punctuation + + * FreeSans.sfd: + + Completed IPA Extensions + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd: + + More work on Superscripts and Subscripts, Spacing Modifiers. + Sans is now complete in both. + Added Pfennig to Sans and Mono. + + * ranges.py: + + Restructure text output + Rearrangement and cosmetic ...except I had broken it. now fixed + Seems to be in a useful form at this point. + More docs, date + + * FreeSerif.sfd: + + Added a hand-drawn old German Pfennig to Currency Symbols + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifItalic.sfd: + + Further additions to General Punctuation, Super and Sub Scripts, + Spacing Modifiers, etc. + +2008-05-02 Steve White + * FreeSans.sfd: + + additions to Spacing Modifiers, IPA + + * FreeSerifItalic.sfd: + + Shortening stacked accents to maintain readability when clipped + +2008-05-01 Steve White + * FreeSans.sfd: + + Additions to Spacing Modifiers and changes to Combining Diacritics + + * FreeSerif.sfd: + + Made sure all the half rings in Combining Diacriticals and Spacing + Modifiers were really half rings (J. Poon had complained about this) + + Filled out General Punctuation + Some work on Spacing Modifiers + + Filled out Mathematical Operators + still needs lots of work + Made to validate + + Filled out Latin Extended B + Added some letters with curls to Latin Extended B + More fiddling with Latin Extended B accents + +2008-04-30 Steve White + * FreeSerif.sfd: + + Added Hanuno script, with characters based on those in + font MPH2BDamase, on request from the maintainer of that font, + http://packages.debian.org/sid/ttf-mph-2b-damase + + Glyphs are simple vector strokes. Could be a little more uniform. + + Added Buginese script "Lontara", with characters based on those in + font MPH2BDamase, on request from the maintainer of that font, + http://packages.debian.org/sid/ttf-mph-2b-damase + + Note the glyphs are pretty rough, clearly a digitization of handwriting. + I just cleaned them up, and corrected discrepancies with Unicode, + and compared with some pictorial samples of the script I could find. + +2008-04-29 Steve White + * ranges.py: + + Improved look a lot--still unhappy with some ranges + OS/2 seems sometimes bang-on, sometimes unrelated to anything (including + fontforge's OS/2 listing) + + * FreeSerif.sfd: + + Much fiddling with Tamil range. + First scaled to 78% (avoiding the references) + This gets it in the ballpark height-wise. [A bit taller than the Latin + letters, but the stroke is narrower, but then the glyphs are busier.] + Then had to re-align combined references, the trickiest being the + halants. + Checked with other fonts with Tamil text. + +2008-04-28 Steve White + * FreeSans.sfd, FreeSerif.sfd: + + Cleanup of control points in Arabic and Thaana + + * FreeSerif.sfd: + + Cleanup of missing extrema in Arabic and Thaana + + Many changes to Thai, trying to make the script fit between some lines, + so accents won't get clipped, etc. + Also, stroke weight was heavier than that of Latin. + + Scaled whole thing by 93%. + Shrank the tallest letters 0E42-4 to get them under 900EM. + Shaved off top of maiek. + Fiddled with positioning of all accents. + Made positioning tables for accents. + Note: unclear these are working correctly + + Fixed a bug having to do with character replacements for characters + named 'ng' and 'nj'; these names had been taken on by other characters. + + Made to validate + + Unicode positions of two Cyrillic Extended characters were switched. + Fiddled with a couple of Cyrillic combining diacritics + +2008-04-27 Steve White + * FreeSans.sfd: + + bugfix: a left harpoon mysteriously appeared to the left of letter p! + +2008-04-26 Steve White + * FreeMono.sfd: + + Made to validate + + * FreeSans.sfd: + + Made to validate + + Toward J. Poons report + Made 032B more like proper double-arches (and distinct fro 033C seagull) + Made 032b more like a seagull + + * FreeSans.sfd, FreeSansBold.sfd: + + Sans: fiddling with widths and terminators of math symbols, + toward J. Poon's report + R & B: removed u+2741 because it didn't match the Unicode description + + * FreeMono.sfd: + + Extensible parenthesis symbols weight/terminators + Toward bug # 23064: https://savannah.gnu.org/bugs/index.php?23064 + Rounded a bunch of terminators + +2008-04-22 Steve White + * FreeSerif.sfd: + + Small alignment problem in Greek Extended + + One more tweek to spacing in Cyrillic Extended + + Corrected spacing in Cyrillic Supplement + + Added Cyrillic Supplement letters for + Enets, Khanty, Chukchi, Itelmen, Mordvin, Kurdish, Aleut + + Added Cyrillic letters for Nivkh (completing Cyrillic range) + More tightening of accents in Latin Extended. + + * FreeSans.sfd: + + Fiddled with math--consequences of changing the "similar" operator + + More tightening of accents + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Adjustments to h and k with caron and cedilla in Latin A and B + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd: + + FreeSerifBold: deleted 3 dotted Hebrew letters in Private/Corporate use + (E801-3). They weren't ligatures or in any other lookup, and they + weren't present in FreeSerif. + + * FreeSansBold: + Unlinked and deleted F6C3, which called itself commaaccent. + Made some new spacing and non-spacing accents to make up for it. + + * FreeSansBoldOblique: + Made references of many Latin Extended. + Also corrected several wrong ones. + + * Freeserif: + Re-named commaaccent + +2008-04-21 Steve White + * FreeMono.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSerif.sfd, FreeSerifBold.sfd: + + Deleted Hiragana and Katakana ranges, as discussed on bugs list. + Cleaned up some encoding issues, unnamed glyphs + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Roman: added 'sine' -- not beautiful, but I liked drawing it + All: Made special lookup for Dutch ligatures 'IJ' and 'ij' + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Roman: ffi etc Latin ligatures from 'liga' to 'dlig' (these weren't + really ligatures anyway, and only looked very bad when used. + Retain for condensed type. + Others: deleted Latin 'liga' table altogether + BoldOblique : added j to ij ligature + + Toward J. Poon's Report: + Except for issues of terminators not always vertical or horizontal, + and a few things that were too hard or I was unsure of. + +2008-04-20 Steve White + * FreeSerif.sfd: + + Futzing with accents in Latin Extended Additional and Latin Extended-B + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Added primemod character, referenced by Greek number sign + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Following J. Poon's report, disconnected NJ (01CA) + +2008-04-19 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + First pass throught J. Poon's bug list. + See bug reports for details. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made underscore slanted in Oblique faces, made all to be width of + space character. + Towards J. Poon's report. + Disturbed that xterm and some other apps put small space between + characters when none was called for. + + * FreeMono.sfd, FreeMonoBold.sfd, FreeSans.sfd, FreeSansOblique.sfd: + + Corrections on Currency Symbols + + * FreeMono.sfd, FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More corrections, additions to Currency Symbols + + * FreeSans.sfd, FreeSerif.sfd: + + Filled out and corrected Currency Symbols + +2008-04-18 Steve White + * FreeSans.sfd, FreeSerif.sfd: + + Adjustments to Combining Marks for Symbols + Additions to range in Sans, and re-structured its marks table so that + "middle" can apply to any range + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Made reference between combining koronis and lenis of Greek Extended. + In Serif, re-worked combining marks lookup tables, added anchors in + Latin, moved so without marks they work in kedit (but now I'm doubting + kedit does a reasonable thing...what is a better application for + testing this?) + +2008-04-16 Steve White + * FreeSerifItalic.sfd: + + Adjusting of spacing and accents in Greek + + * FreeMono.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansOblique.sfd, FreeSerif.sfd: + + Much futzing with Greek letter spacing and accents. + Added lenis to FreeMono. + + * FreeMono.sfd, FreeSerif.sfd: + + Adjusted spacing of dots of Greek dieresistonons in Serif + Whipped up something for Greek kappascript in Mono (could use revision) + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Raised dots on double-dotted Cyrillic i, to match that of i and j. + +2008-04-14 Steve White + * FreeMono.sfd: + + Corrected 27e6-7 "white bracket" + Note it is probably a FontForge bug these symbols aren't showing up. + FontForge thinks they are in Supplemental Arrows, but they should be + in Supplemental Math-A + + Named some Greek characters + + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd: + + Spacing of some Cyrillic characters + +2008-04-13 Steve White + * FreeSerif.sfd: + + Some fiddling with accents + 'yogh' was too wide + + * FreeSansBold.sfd, FreeSansOblique.sfd: + + Character spacing was chaos--tried to improve. BoldOblique also needs + it. + + * FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd: + + Completed the fix of bug #12798, Greek glyphs with accents to side + Much mucking with accents here, and fixed a few things that were just + wrong. + +2008-04-12 Steve White + * FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Made Mono curly quotes "bent" + + * FreeMono.sfd: + + More fiddling with Greek accents + Made quotes "bent" + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Adjustments on Greek diaresistonos etc. + Adjustments in Serif on combining marks for symbols + + * FreeSerif.sfd: + + More additions to Combining marks for Symbols + + Additions to Combining marks for Symbols -- now mostly full. + Lots of adjustments to middle anchor point in Latin to make big circle + (nearly) encircle preceding latter + +2008-04-11 Steve White + * FreeMono.sfd: + + Bugfix: + Had indroduce a glyph of width other than 600, making kterminal not + recognize it as a monospace font. + +2008-04-10 Steve White + * FreeSans.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More messing with accents. + Further to bug #12798, Greek glyphs with accents to side + Much messing with glyphs in Greek Extended range + +2008-04-09 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSerif.sfd: + + Revisited Latin-1 and Latin-A accents. + Glyph B7 was called "periodcentered", but Unicode callse it Mid Dot, + and the description doesn't refer to the period. I made it like the + dot accent. throughout, and referred L-dot to it. + + Also double-checked "commaaccent" characters (some in Unicode called + cedilla, but the Unicode example shows a comma...mystery) + + Also the funny IPA upside-down f often had two bars, incorrectly. + + To do: go through rest of Serif, and Sans + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Completed re-structuring of stacked Latin accents in Mono. + Also: lots of associated adjustments of Greek Extended accents. + (Trying to at least center extremely wide characters on their box) + Repaired some victems of "find overlaps" sweeps + Worked on glyphs with apostrope/comma parts + Corrected a few wrong glyphs. + + Trying out a "bent quotes" solution to making primes distinct from + quotes. + +2008-04-08 Steve White + * FreeMonoOblique.sfd: + + Toward reducing overall height + Did similar process as for Mono, fixing a few errors along the way. + Also the Greek Extended range was very messed up vertical and + horizontally. + Horizonal spacing of the heavily accented Greek is a real problem in + Mono... + To do: + revisit "commaaccent" characters in all faces: do some have + edillas? + some Hebrew glyphs are a little low + Georgian generally is way out of bounds + +2008-04-07 Steve White + * INSTALL: + + Various updates and corrections, tweeked formatting + + * FreeMonoBold.sfd: + + Tweeking of accents + +2008-04-06 Steve White + * FreeMono.sfd, FreeMonoBold.sfd: + + Re-worked accents in FreeMonoBold.sfd to make Latin ranges lie between + 800 and -200 EM, as with FreeMono. + + * FreeMono.sfd: + + Latin Extended ranges: Implemented new policy of shortening the letters + of the characters with the highest-stacked accents. + + At this point all the Latin glyphs lie betweeen 800 and -200 EM. + + Also checked for readability of all the Latin extended letters in xterm. + (Issue: it chops letters outside their bounding boxes; many accents had + been a bit outside. Made sure that if they were chopped, they were at + least still recognizable.) + +2008-04-05 Steve White + * FreeMono.sfd: + + Following exchange about Mono on freefont-bugs with Joe Wells, who + > doesn't like the curly quote marks + > wants combining diacritics to work + > wants tight line spacing + + Trying to reduce font height: + > exclamdown was below -200 + > Throughout Extended Greek, ypogegrammeni were too low. Shortened + glyph, and raised all references. + > Lots of messing with Latin Extended ranges to make glyphs mostly + fit into 800 height. Mostly succeeded. A couple will get chopped. + > Messed with "commaaccent" glyphs, which were very low + > Cyrillic 04B1 had a tail that was incorrectly low + > Much mucking with Georgian range. Moved up by 95 (read that Georgian + is written as though centered between two horizontal lines, rather than + as sitting on a baseline) There are still a few very high glyphs. + + FontForge U+0122 called Gcommaaccent, glyph looks like that, but + Unicode says it's Gcedilla. Made the ones called cedilla by Unicode + to be cedillas + + Note bug in Unicode: standard for 0122, 0123, 0136, 0137, 013B, 013C, + 0145, 0146, 0156, 0157 all talk about cedilla, say to make it with + cedilla, but example shows comma. + + By the way: + > Got rid of commaaccent and dotlessj in Corporate Use + > Replaced shadedark, with little squares now not overlapping. + > Corrected IPA symbol 'ts' 02A6, added 02a8, 02a9, 02aa, 02ab, 02ac, + 02ad, 02ae, 02af + + (so many changes...the CVS server was down...) + + * FreeSerif.sfd: + + Re-named arabic and hebrew characters + Big adjustment to comma-accents. Mostly effects Greek Extended. + Made such accents to be like comma, rather than like Russian apostrophe + (and de-referenced that symbol) + +2008-04-04 Steve White + * FreeMono.sfd, FreeSerif.sfd: + + Raised dot on superscript i (2071) -- more distinct at small sizes + + * FreeMono.sfd: + + added two IPA symbols + +2008-04-02 Steve White + * FreeSerif.sfd: + + fixed a few more control points too close + + Fixed names of languages in ligature table for latn "w/i". + This fixes a crash when FontForge opened the ttf table + + Motivated by bug crashing FontForge when opening ttf file, + started cleanup of useless control points. Not finished. + Got partway through Sinhala + +2008-03-31 Steve White + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoOblique.sfd, FreeSans.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Fixed various "Find Problems", including glyphs with mixed-up names, + and bad TT matrices. (lots more bad TT matrices remain) + + * FreeSerif.sfd: + + Re-named a bunch of Cyrillic letters + + * FreeSerif.sfd: + + Put above mark on Cyrillic i and double-dot i for Slavonic number forms + +2008-03-30 Steve White + * FreeSans.sfd: + + Tightened spacing on glyphs of last commit + + * FreeSans.sfd, FreeSerif.sfd: + + Concerning bug #16120, Include upper case Wynn and upper case Yogh + Adapted Herman Miller's Thyromanes letters 01F7 021C 021D for Serif + Drew my own versions for Sans. + + * FreeSerif.sfd: + + Added 04F6,7 + + * FreeSerif.sfd, FreeSerifItalic.sfd: + + Made more Cyrillic diacritics really combine. + Made a mark lookup just for Cyrillic diacritics, + Marked most of the unadorned Cyrillic alphabet. + + Still not clear on correct shapes for some of the marks. + + * FreeMono.sfd, FreeMonoOblique.sfd: + + Tweeks to accents + +2008-03-29 Steve White + * FreeSans.sfd, FreeSerifItalic.sfd: + + Small adjustments in Cyrillic + + * FreeSerif.sfd: + + Corrected small palochka + Made Cyrillic combining hundred-thousands and millions really combine + Named some combining diacriticals + + * FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd: + + Mostly adjusted horizontal spacing of mono oblique faces + + * FreeMono.sfd, FreeMonoBold.sfd, FreeMonoBoldOblique.sfd, FreeMonoOblique.sfd, FreeSansBold.sfd, FreeSansBoldOblique.sfd, FreeSansOblique.sfd, FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + More cleanup of Cyrillic ranges + + Completely re-did horizontal spacing of SerifItalic and SerifBoldItalic. + See bug #17912, poor kerning in Cyrillic oblique... + https://savannah.gnu.org/bugs/index.php?17912 + It looked like chaos to me. + Only so much can be done: the font is flawed. + But I think the changes make text readable in these faces. + + There were dozens of incorrect glyphs in higher-numbered characters. + I deleted all those I found. No glyph is better than a wrong glyph. + + Futzt with accents, shooting for consistency and readability. + + A maintenance thing: making correct references (acyrillic vs a, + although they may be the same glyph) I made a lot of headway, but + it isn't finished. + + Likewise, a large fraction of these are compound characters, which can + be made with references, resulting in easier maintenance, reduced + likelihood of errors, and smaller files. I replaced many. + + * FreeSerif.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Cyrillic italic + Added italic, bolditalic + 0493, 04a7, 04AD + because their form clearly varies in italic. But was just guessing... + + * FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Cyrillic italic + + Added italic, bolditalic + 0493, 04AD + because their form clearly varies in italic. + But was just guessing as to exact form. + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Overhaul of Cyrillic + + Italic, BoldItalic + added small yat for bug #22588 (note Times New Roman doesn't use + alternate form in Italic) + + All forms of Serif have big problems in Cyrillic. + + The ugliest is in roman. The letters, even of the Russian alphabet, are + of inconsistent height (awfully, small 0438 (ii) 0446 (tse)) + and they vary from the height of Latin + and they vary from the height of italic and bold. + They are a mish-mash of letters from several fonts, of similar (but not + quite identical) weight, and similar, (but not quite identical) size. + + I think the best solution would be to identify the face that best + matches Latin, and fill the range with that. I think this is possible + because the rarer letters seem to be better: the common letters are the + ones that are wrong. + + For now, I just increased the sized of 0438 and 0446, and 048a, 048b, + also 0459 (lje) 045A (nje) 0464 (dje) + + Other issues + +2008-03-27 Steve White + * FreeSerifBoldItalic.sfd: + + Moving all Greek capitals with accent so they don't cover previous + letter. Remedies bug #12798 + + * FreeSerif.sfd, FreeSerifBold.sfd, FreeSerifBoldItalic.sfd, FreeSerifItalic.sfd: + + Various tweeks to accented Latin letters. + Connected O-ogonek correctly + + * FreeSerifItalic.sfd: + + Accents of numerous accented Latin letters got shifted in a previous + commit. This fixes it. + + * FreeSerif.sfd: + + Adjusted combining tack left and right (0318-0319) to be above -300 EM. + + * FreeSans.sfd, FreeSerif.sfd: + + Added some "middle" marks for positioning of diacritics + + * FreeSans.sfd: + + Copied 4 enclosing combining diacriticals from Serif 20DD - 20E0 + + * FreeSerif.sfd: + + Adjusted and added some enclosing diacritics 20DD - 20E0 + In response to Debian bug #472566 + ttf-freefont: U+20DD COMBINING ENCOLSING CIRCLE doesn't combine + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472566 + +2008-03-26 Steve White + * FreeSerif.sfd: + + Lowered a few over-high Latin accents + + * FreeSansBold: + + Devangari--only digits 1 and 2, and nothing else. Deleted + + * FreeMonoBold, FreeMonoOblique, + FreeSerifBold, FreeSeriftalic, FreeSerifBoldItalic, + FreeSansOblique, FreeSansBold, FreeSansBoldOblique: + + Got rid of dotlessj, comma in Corporate Use + Single Substitution lookup, ccmp table + Made proper dotlessj, re-linked j-circumflex + + Note: + FreeSansBold has a commaaccent in Corporate Use, used by several other + characers. Haven't done anything about this. + +2008-03-25 Steve White + * FreeSerif.sfd: + + Added/corrected glyphs for yeh hamza in Arabic, + Added init and medi lookups for yeh hamza. + +2008-03-24 Steve White + * FreeSerif.sfd: + + Added isolated and final forms for + 0629 teh marbuta + 0624 waw hamza + 0626 yeh hamza + 0649 alef maksura + A previous commit had added lookups that referred to these, + + More fiddling with super/subscripts + + * Makefile, Makefile, GenerateTrueType: + + Scripts and Make targets to generate OpenType fonts and zip file + + * maintenance.txt: + + Added gnupload and info about tagging + +2008-03-23 Steve White + * FreeSerif.sfd: + + Last of Find Problems -> ATT + 'mark' Latin lookup: afii10026 is in 'cyrl', also afii10074 + Upper and lower Cyrillic i. Just removed mark from both letters. + + 'half' Bengali lookup Khanda_Ta is in 'bng2'. Added bng2 to lookup + Added TtTable etc + + Clean-up of Points too Close through to end of font. + This episode completes the paths/points clean-up of Serif. + But note: many ranges, esp. Ethiopic, Japanese, and Indic, have way + too many points, resulting in lumpiness. + + At this point, FontForge can convert splines to quadratic, auto-hint, + and auto-instrument without segfault. + + * Makefile, sfd/Makefile, tools/GenerateTrueType: + + Alterations to build process: added a Makefile, and made to work + on my system. Now auto-hints before generating TrueType. + +2008-03-22 Steve White + * sfd/FreeSans.sfd: + Lots of additions of math characters. Should complete for + LaTeX 2e, except for extensible brackets. + +2008-03-21 Steve White + * *.sfd: + + Regularized stacking of accents in Latin Extended Additional + Changed name of 00B5 from 'mu' to 'micro', + 2206 from 'Delta' to 'Delta.math', + 0308 from 'diaerisis' to 'diaerisiscomb' + + * FreeMono.sfd: + + additions to IPA + + * FreeMonoBoldOblique.sfd: + + Moved dotlessj from Corporate Use, + Deleted commaaccent there + Fixed mis-named glyphs tcommaaccent, Tcommaaccent + Changed name of 030A from 'dieresis' to 'ringcomb' + + * FreeSans.sfd: + + Added some arrows, and a couple of blackboard bold characters + + Several characters in U+F600 Corporate Use range + dotlessj, onefitted, commaaccent + + dotlessj referred to by: jcircumflex, uni01F0: + renamed it to uFFFF, re-linked others by hand + + commaaccent + http://diacritics.typo.cz/index.php?id=9 + should be u+0326 but wasn't linked to anything + + * FreeSansBold.sfd: + + U+0617 etc: read glyphs "4GWglm". It should be Arabic. Deleted + + * FreeSansBold.sfd, FreeSansOblique.sfd, FreeSansBoldOblique.sfd: + + Removed bogus glyphs for 200C 200D, ZWJ and ZWNJ + + * FreeSerif.sfd: + + Split lookup for ligatures in latin into two classes; + ff, ffl, fl which are appropriate for all languages, + and fi, ffi, which are not appropriate in Turkish (due to distinction + between short and long i) + Needs to be done for other faces. + + Filled set of extensible brackets in Miscellaneous Technical + + Think IPA is now complete. + +2008-03-18 Steve White + * FreeSans.sfd: + + clean-up of all path issues and points too close + +2008-03-18 Steve White + * FreeSans.sfd: + + Something was causing crashing effects in Windows. Cleanup of + problems eventually made it go away. Now works well. + + Cleaned up many "points too close" + + Cleaned up all ATT problems, of which there were many and various. + + # Incorrectly labelled zero-width joiner used in a ligature + + # Incorrect substitution of dotlessi and dotlessj with i and j was + somehow connected with FontForge crash. Attemts to remove the + substitution would damage a 'ccmp' table; subsequent changes would + result in FontForge crashing on save, and truncating the sfd file. + Surgically removed with vi. + + # A couple of Indic lookups had incorrect script DFLT; one had 'latn'. + + # Don't understand why there are scripts named + dev2 bng2 grj2 gur2 when there are already deva beng gurj guru + But anyway, lots of 'vatu' 'pres' 'haln' and 'liga' lookups contained + characters in the '2' scripts but were lablled only for the 'non-2' + ones. Added the '2' scripts to all these lookups. Suspect a mistake. + + Note: several of these problems are repeated in other Sans faces. + +2008-03-16 Steve White + * FreeMono.sfd: + + Cleanup of many path problems "points too close" + + Strove to make accents Latin Extended range legible at small sizes + + Named some unnamed characters; removed a duplicate + + At this point, all fonts are passing FontForge Validate. + +2008-03-15 Steve White + * FreeSerif.sfd: + + CJK punctuation: made some of the very high glyphs smaller (under 900EM) + The brackets in Sans were very ugly, and not even Sans-serif. + Serif: added extensible square brackets, diddled with integral + corrected direction of some added glyphs + + Several bugs having to do with missing glyphs in Tamil range. + Also a buggy ligature in Devangari. + + Shortened names of many lookup tables + + Futzt with some combining diacriticals + + Added extensible square brackets. + + * FreeSans.sfd: + + Changed names of a bunch of glyphs with invalid + TrueType names, in range 0x1025f+ (not real Unicode). + Took pains to retain information contained in the names. + Wonder if these glyphs have ever been of any use. + + CJK Punctuation: brackets were hand-drawn and very ugly. Improved. + + * *.sfd: + + Set OS/2 Metrics back to absolute 900/300. Offsets are not + interpreted uniformly. + + Cleanup of many path problems up to extrema and self-intersecting + + Ordered PS Blue values. + +2008-03-14 Steve White + * FreeSerif.sfd: + + Got rid of mixed references and contours + Cleanup of many path problems "points too close" + + Started clean-up to satisfy FontForge Validate + + Changed names of three glyphs in the + Tamil ligatures range...all clearly bugs. + + * FreeSans.sfd: + + Added slanted-hyphen + + * *.sfd: + + Unified OS/2 Metrics + Added Grid Fit + +2008-03-13 Steve White + * FreeSans.sfd: + + Rearranged PS BluesValues so they were in increasing order, + Made all 20 in width. + +2008-03-12 Steve White + * FreeSans.sfd, FreeMono.sfd: + + Added TrueType hinting tables. + Fixed glyphs that didn't convert well to quadratics + Got rid of mixed contours and refs + + * FreeSerifBold.sfd: + + Cleanup of path problems + +2008-03-11 Steve White + * FreeMonoOblique.sfd: + + Cleanup of path problems + +2008-03-09 Steve White + * FreeSerif.sfd: + + Corrected L-dot + Further cleanup of path/ref problems + + Found several ligatures that referred to a missing glyph "ZWJ". + Took this to mean the "zero width joiner" u+200D + + * *.sfd: + + Changed OS/2 metrics to be absolute 900/300 + + * FreeSerifItalic.sfd: + + Added Greek lunate epsilon + + * FreeMono.sfd: + + Many additions in math range + Reduced size of binary union, intersection, vee, wedge + Corrected empty set + Corrected logical 'assert' relations, etc. 22a2-22af + Efforts to make Math glyphs legible at small point sizes + + * FreeSans.sfd: + + Added Greek lunate epsilon and rho symbol + Unstacked more stacked diacriticals + + Further cleanup of path/reference problems + +2008-03-08 Steve White + * FreeSans.sfd, FreeSerif.sfd: + + Added some "n-ary" Math operators + + * FreeSerif.sfd: + + Further clean-up of path problems...up to Ethiopic + > Started adding and correcting Math operators for LaTeX 2e + > Corrected n-ary union, intersection, and spikes to be larger + than the binary operators + > Made (many of) the operators based on + - = to use those + symbols directly (by reference or copying). + > Added lunate epsilon + > Corrected empty set + > Tightened up spacing of some other technical characters + > Worked on some more math operators involving = + > triangle + > Several arrows + > Supplemental Arrows-A + + * FreeSans.sfd: + + Clean-up of font paths + Open self-intersecting outermost-clockwise missing-extrema + also flipped references (unlinked) + + Added Greek lunate epsilon and rho symbol + +2008-03-06 Steve White + * sfd/FreeSerif.sfd: Shortened and thickened the combining hook mark, + U+0309, to make more like Unicode samples. + Also see (bug #22499) un-stacked incorrectly stacked accents + +2008-03-05 Steve White + * sfd/FreeSerif.sfd: vertical lines: combining diacritical marks + corrected 0300 030D 0329 0348 (were rendered as straight apostrophes) + Spacing Modifier letters added 02C8 02CC + 02B9 02Ba prime and double-prime + Fixed positioning U+1EC8, 9, I with hook above + +2008-03-03 Steve White + * sfd/FreeSerif.sfd: TT strings updates. + updated Copyright to 2008 + Added Vendor URL as the Savannah freefont site + * sfd/FreeMono.sfd: A standard pangram as the Sample Text for Russian + It reads: In the thickets of the South once there was a citrus + ...--yes, but a fake specimen! + * sfd/*.sfd: Set the OS/2 Sup/Sub settings, which by default looked + like random trash. + +2008-03-02 Steve White + * sfd/FreeSerif.sfd: began cleanup of problems given by FontForge + "Find Problems" feature. (bug #22454) + +2008-03-01 Steve White + * sfd/FreeSerif.sfd: made Arabic work for text display (bug #22329) + Added required contextual replacement tables, + Made a few missing characters, + * sfd/*.sfd: Removde all back layers from glyphs that had them. + +2008-02-27 Steve White + * sfd/FreeSans.sfd: filled in Combining Diacriticals + * sfd/FreeSerif.sfd: shifted whole Arabic range down by 200EM. + +2008-02-26 Steve White + * sfd/FreeSerif.sfd: enabled DPOS table. + +2008-02-24 Steve White + * sfd/*.sfd: Much fiddling with the "combining diacriticals" + range 0300-036F. Made to align with medium-size lowercase + preceding character if not using DPOS table. + +2008-02-23 Steve White + * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug #21784) Filled + in set of HTML 4 Character Entities. + + * sfd/FreeSerif.sfd, FreeSans.sfd, FreeMono.sfd: (bug #18413) + undertie too low -- went on to tidy other similar characters in + Combining Diacriticals range. + +2008-02-21 Steve White + * sfd/*.sfd: Moved capital Greek letters with tonos so tonos doesn't + cover preceding letter (bug #12798) + + * sfd/FreeSerif.sfd, FreeSans.sfd: (bug #13370) made extended + integrals to line up. + +2008-02-20 Steve White + * sfd/*.sfd: started removing glyphs with back layers (printing bug) + * sfd/*.sfd: adjusted vulgar fractions (bug #17756) + * sfd/*.sfd: adjusted numerical superscripts (bug #20278) + +2008-02-18 Steve White + * sfd/FreeSerif.sfd: Offset Hiragana and Katakana ranges (bug #22326) + * sfd/FreeSerif.sfd: U+30FB, KATAKANA MIDDLE DOT to be full width + (bug #18326) + + * sfd/FreeSerif.sfd: Re-promoted + ff ffi ffl fi fl + as standard ligatures in Latin. + +2008-02-17 Steve White + * sfd/*.sfd: committed to FontForge Spline Font Database (SFD) 2 + format. + +2008-02-10 Steve White + * sfd/*.sfd: brought into line with Debian ttf-freefont + Deleted a couple of patches, and applied those applied to Debian. + +2006-09-20 Primoz Peterlin + + * INSTALL: added installation procedure for MacOS X, courtesy + Philipp Kempgen. + +2006-05-04 Primoz Peterlin + + * sfd/FreeMono.sfd: deleted Russian sample text, which did not + conform to UTF-7. + +2006-04-15 Primoz Peterlin + + * sfd/FreeSerif.sfd: corrected U+10D3. + + * sfd/FreeSans.sfd: ligature U+FB06 (LATIN SMALL LIGATURE S T) + changed from mandatory ("liga") to discretionary ("dlig") (bug + #16253). + + * sfd/FreeMono.sfd: deleted incomplete glyph U+FB06 (LATIN SMALL + LIGATURE S T); deleted U+FB00, U+FB01, U+FB02, U+FB05 as + ligatures (bug #16253). + + * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBoldOblique.sfd: added + U+FB00; deleted U+FB01, U+FB02 as ligatures (bug #16253). + + * sfd/FreeMonoBold.sfd: deleted U+FB00, U+FB01, U+FB02 as + ligatures (bug #16253). + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd: added Georgian letters, donated by + Gia Shervashidze + +2006-02-22 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd: ligature U+FB4F + changed from mandatory ("liga") to discretionary ("dlig"). This is + respons to Bug#349657: [bug #15792] Freefont Alef and Lamed + combine + +2006-02-21 Primoz Peterlin + + * sfd/FreeSerifBold.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd, + sfd/FreeSansBold.sfd: ligature U+FB4F changed from mandatory + ("liga") to discretionary ("dlig"). This is respons to Bug#349657: + [bug #15792] Freefont Alef and Lamed combine + + * sfd/FreeSerif.sfd: corrected bug#275759: [bug #15790] FreeSerif + glyphs for U+2198/U+2199 were reversed. + +2006-02-15 Denis Jacquerye + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: removed ij + and IJ ligatures. + +2006-02-10 Primoz Peterlin + + * sfd/FreeSerif.sfd: added small Georgian letters (mkhedruli), + donated by Gia Shervashidze + + * AUTHORS: Added Gia Shervashidze + + * CREDITS: Added Gia Shervashidze + +2006-01-26 Primoz Peterlin + + * notes/maintenance.txt: Added information on the Makefile now + used; username for FTP login is anonymous. + + * sfd/FreeSansBold.sfd: added U+0569, U+0571, U+0579, U+057B, + U+0586. Armenian small letters completed. + + * sfd/FreeSerif.sfd: added U+0297, U+02AD-02AF. IPA Extensions + section is now complete. Copied a dozen of glyphs from Omega IPA + to Phonetic Extension section. + +2006-01-25 Primoz Peterlin + + * sfd/FreeSans.sfd: added U+01A, U+01A3, U+01A6, U+01B2, U+01BA, + U+01BB, U+01BE, U+01BF. + + * sfd/FreeSans.sfd: aligned small Armenian letters to x-height in + response to bug #15480. Armenian in Free Sans needs a major + cleanup. + +2006-01-24 Primoz Peterlin + + * sfd/FreeSerif.sfd: changed U+0452, U+045B. Cleanup: U+0460, + U+0461, U+04Bc, U+04BD, U+0508. + + * sfd/FreeSansOblique.sfd: replaced accented chars in Latin-1 and + Latin Extended-B sections with references, where possible. + + * sfd/FreeSerif.sfd: changed U+0285. + +2006-01-23 Primoz Peterlin + + * sfd/FreeSans.sfd: added U+0195, U+01AA, U+0297, U+03D7, + U+03F0. Several flipped references replaced by outlines. + + * sfd/FreeSansOblique.sfd: Latin Extended-B section more or less + brought in sync with FreeSans. + + * sfd/FreeMonoBoldOblique.sfd: added glyphs from FreeMonoBold in + the Latin Extended-B and IPA Extensions sections. + + * sfd/FreeSerifBold.sfd: Added U+0224, U+0225. Changed U+01B7, + U+01B8, U+04E0, U+0452, U+045B. Replaced accented characters in + the Cyrillic region with references. + +2006-01-21 Primoz Peterlin + + * sfd/FreeSans.sfd: added U+0255, U+0264, U+0277, U+0286, + U+029D. Changed U+0261. Deleted spurious glyphs in the control + code area. + +2006-01-19 Primoz Peterlin + + * sfd/FreeSans.sfd: replaced Hardip Pannu Singh's Gurmukhi with + AnmolUni by Kulbir Singh Thind. + +2006-01-17 Primoz Peterlin + + * sfd/FreeSansBold.sfd: Added U+018D, U+0194, U+01B5, U+01B6, + U+01BE, U+0262, U+02A2. + + * sfd/FreeSansBold.sfd: Changed U+0261 in order to distinguish it + from U+0067. Changed U+0251, U+0252. + + * sfd/FreeSerifBold.sfd: Small changes in the Cyrillic + section. Added U+0183, U+018C. + + * sfd/FreeSans.sfd: Added U+2045, U+2046. + + * sfd/FreeSansBold.sfd: Filled in the Gurkmukhi part with the + AnmolUni-Bold by Kulbir Singh Thind. Also some minor corrections + in the Cyrillic part. + + * CREDITS: Added Kulbir Singh Thind. + + * AUTHORS: Added Kulbir Singh Thind. + +2006-01-14 Primoz Peterlin + + * sfd/FreeSerif.sfd: Thomas Ridgeway's Tamil characters replaced + by the ones released by the Samyak font project. + + * CREDITS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao + and Sandeep Shedmake + + * AUTHORS: Added Pravin Satpute, Bageshri Salvi, Rahul Bhalerao + and Sandeep Shedmake + +2006-01-08 Primoz Peterlin + + * sfd/FreeSansBold.sfd, sfd/FreeMonoBoldOblique.sfd: minor changes. + +2006-01-05 Denis Jacquerye + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd: added cedi sign U+20B5, Ghanaian + currency + +2005-12-29 Primoz Peterlin + + * sfd/FreeSans.sfd: minor cleanup in the Gujarati part. + +2005-12-22 Primoz Peterlin + + * sfd/FreeSans.sfd: Devanagari and Gujarati parts cleared; once + again merged with Gargi 1.9 and Padmaa 0.6, this time correctly so + that the anchor points survived the merger. + +2005-12-16 Primoz Peterlin + + * sfd/FreeSans.sfd: added U+0577. + +2005-12-15 Primoz Peterlin + + * sfd/FreeSans.sfd: added U+0559, U+055F, U+2024. + + * sfd/FreeSansBold.sfd: added U+056E, U+0573. + +2005-12-14 Primoz Peterlin + + * sfd/FreeSans.sfd: Merged with Gargi 1.9 and Padmaa 0.6, + courtesy Monika Shah and Sonali Sonania from C-DAC, Mumbai. + + * CREDITS: Added Monika Shah and Sonali Sonania. + + * AUTHORS: Added Monika Shah and Sonali Sonania. + +2005-12-13 Primoz Peterlin + + * sfd/FreeSans.sfd - Removed Sinhala glyphs. + + * sfd/FreeSerif.sfd - Added Sinhala glyphs, formerly in FreeSans. + +2005-12-09 Primoz Peterlin + + * sfd/FreeSerif.sfd: added U+20AF, U+211E. Changed U+20AC (EURO + SIGN). + + * tools/freefont-ttf.spec: Added specification file for building + RPM package, courtesy Rok Papez. + + * sfd/FreeSerifBold.sfd: added more glyphs from Txfonts to the + Arrows and Mathematical Symbols ranges. + + * sfd/FreeSerifBoldItalic.sfd: added U+03F5 from Txfonts. + +2005-12-08 Primoz Peterlin + + * sfd/FreeSans.sfd: added U+0567, U+056A, U+056C, U+0582. + + * sfd/FreeSerifBold.sfd: copied Box Drawing range from FreeSans. + + * sfd/FreeSerifBold.sfd: added glyphs from Txfonts to the Arrows + and Mathematical Symbols ranges. + + * sfd/FreeSerif.sfd: added U+2259-225A, U+22BA, U+2308-230B, + U+2322-2323. Cyrillic composite characters replaced with + references. + +2005-12-07 Primoz Peterlin + + * sfd/FreeSerifBold.sfd: added U+025A, U+025D, U+026B, U+029B, + U+02AE, U+02AF, U+02DE. + + * sfd/FreeSerifBold.sfd: updated Hebrew part with Drugulin font + from the Culmus project. + + * sfd/FreeSerif.sfd: added U+207A-207C, U+208A-208C, U+2215-2216. + + * sfd/FreeSans.sfd: added U+2320 TOP HALF INTEGRAL, U+23AE + INTEGRAL EXTENSION, U+2321 BOTTOM HALF INTEGRAL (bug #13370). + +2005-12-07 Primoz Peterlin + + * sfd/FreeSerifBold.sfd: added U+0294-0296, U+02A1-02A2. Started + adding "below" anchors. Performed hinting on characters that were + not hinted "en masse". + +2005-12-06 Primoz Peterlin + + * sfd/FreeSans.sfd: fixed some more metrics problems in the + Extended Greek area; performed hinting on characters that were not + hinted "en masse". + + * Makefile: clean also signature files. + + * sfd/FreeMonoBoldOblique.sfd, sfd/FreeMonoBold.sfd: cosmetic + changes; cleaning background of referenced composed characters. + +2005-12-05 Panayotis Katsaloulis + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd: Some changes to the greek glyphs, + mostly having to do with "tonos" (accent) + +2005-12-05 Primoz Peterlin + + * sfd/FreeSans.sfd: minor cosmetic changes. + + * sfd/FreeSans.sfd: adjusted widths of characters in the Extended + Greek range; accents are not any more considerably overhanging on + the left side. Added U+1EDA-1EE3, U+1EE8-1EF1. + + * sfd/FreeSans.sfd: continued working on Extended Greek range; + metrics still not finished. + +2005-12-03 Primoz Peterlin + + * sfd/FreeSans.sfd: fixed combined Greek accents (bug + #12800). Width of characters still need to be adjusted as in + FreeSerif. + + * sfd/FreeSerif.sfd: fixed positions of Greek accents (bug #12798). + + * CREDITS: Added Panayotis Katsaloulis. + + * AUTHORS: Added Panayotis Katsaloulis. + + * Makefile: minor changes; now creating also a tarfile with sfds. + +2005-12-01 Primoz Peterlin + + * sfd/FreeSerifItalic.sfd: added U+0183, U+018C, U+01C0, U+01C1, + U+01C3, U+01E0, U+01E1, U+01F8, U+01F9. + + * Makefile: created a Makefile to assist building. + + * README: an update. + + * COPYING: added GNU General Public License, version 2. + + * tools/GenerateTrueType: wrote a FontForge script for conversion + to TrueType. + + * sfd/FreeSerif.sfd: merged with SolaimanLipi Bangla OpenType font + from www.ekushey.org, courtesy Solaiman Karim. + + * sfd/FreeSerifItalic.sfd: merged with SolaimanLipi Bangla + OpenType font from www.ekushey.org, slanted by 15.5 degrees. + + * sfd/FreeSans.sfd: merged with Rupali Bangla OpenType font from + www.ekushey.org + + * sfd/FreeSansOblique.sfd: merged with Rupali Bangla OpenType font from + www.ekushey.org, slanted by 12 degrees. + + * CREDITS: added Solaiman Karim + + * AUTHORS: added Solaiman Karim + +2005-11-30 Primoz Peterlin + + * sfd/FreeSerif.sfd: merged with the Rachana Normal. + + * AUTHORS: added K.H. Hussain and R. Chitrajan + + * CREDITS: added K.H. Hussain and R. Chitrajan + +2005-11-23 Primoz Peterlin + + * sfd/FreeSans.sfd - cleaned some background images. + + * sfd/FreeSans.sfd - added U+01A0-01A1, U+01AF-01B0, U+026E, + U+028F, U+0291, U+02A3-02A5, U+031B. Modified U+0198. + +2005-11-22 Primoz Peterlin + + * sfd/FreeSans.sfd - added U+2504-250B. + + * sfd/FreeSans.sfd - added U+2591-25A1, U+25A3-25A5, U+25AA, U+25AC. + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - added U+0263. + +2005-11-21 Primoz Peterlin + + * sfd/FreeMono.sfd - corrected positions of some Greek diacritics + on page 0x1F. + + * sfd/FreeMonoOblique.sfd - working on bringing it in sync with + FreeMono.sfd. + + * sfd/FreeSerifBoldItalic.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Added a couple of + glyphs in the IPA Extensions region. + + * sfd/FreeSansBold.sfd - added U+0574, U+0576. Removed overlaps. + +2005-11-20 Primoz Peterlin + + * sfd/FreeSerif.sfd - added U+02AA-02AC, U+02B0-02B2. + +2005-11-19 Primoz Peterlin + + * sfd/FreeSans.sfd - added U+01B7-01B9, U+0196, U+019A, U+01C3, + U+0224-0225, U+025E, U+029A, U+2422. Changed U+0184-0185, U+0192, + U+01B4, U+0282, U+0284. + +2005-11-18 Primoz Peterlin + + * sfd/FreeSerif.sfd - added U+02EE, U+207F. + + * sfd/FreeSans.sfd - started Box Drawing area. + +2005-11-17 Primoz Peterlin + + * sfd/FreeSerifBold.sfd - added glyphs from the Omega project to + Latin Extended-B, IPA Extensions and Greek ranges. + + * sfd/FreeSerifBoldItalic.sfd - added glyphs from the Omega + project to Latin Extended-B, IPA Extensions and Greek ranges. + + * sfd/FreeSerifItalic.sfd - added glyphs from the Omega + project to Latin Extended-B, IPA Extensions and Greek ranges. + + * sfd/FreeSerifItalic.sfd - added U+018B, U+025C, U+0265, U+026F, + U+0279, U+0287, U+028C-028E, U+029E. + + * sfd/FreeSerifBoldItalic.sfd - added U+1EDA-1EE3, U+1EE8-1EF1, + U+2190-219B, U+219E-21A8, U+21B9-21BA, U+21C4-21CA, U+21E4-21E5, + U+2669-266F. MES-1 compliant. + + * sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - added U+FFFD. + + * sfd/FreeSerif.sfd - removed overlaps in Latin Extended-B and IPA + Extensions ranges. + +2005-11-16 Primoz Peterlin + + * sfd/FreeSerifItalic.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. + + * sfd/papers/eurotex2003/freefont.tex, + sfd/papers/eurotex2003/freefont.bib - Revised version, sent back + by Karl Berry on 20050110, that should match the one published in + TUGboat. + + * sfd/FreeSerifItalic.sfd - started added accent anchors. Added a + handful of Greek letters from Omega font collection. + + * sfd/FreeSerif.sfd - added a handful of letters in the Latin + Extended-B and IPA Extension ranges from the Omega font collection. + +2005-11-16 Denis Jacquerye + + * sfd/FreeSerif.sfd - moved U+0263 to U+0264; added U+0263 + + * sfd/FreeSerifItalic.sfd - fixe U+01EE; added U+01B7-U+01B9 + +2005-11-16 Primoz Peterlin + + * sfd/FreeSans.sfd - Made small Greek letters the same height as + Latin and Cyrillic ones and replaced them with references, where + applicable. + + * sfd/FreeSerif.sfd - replaced Greek letters with references, + where applicable. Added U+03D7, U+03F0-03F2. + + * sfd/FreeSerif.sfd - added U+0255, U+025A, U+025D, U+025F, + U+0262-0263, U+026B-026C, U+0274, U+0276-0277, U+028F, U+0291, + U+029D. + + * sfd/FreeMonoOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Added U+F6BE. + + * sfd/FreeSansOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. + + * sfd/FreeSans.sfd - changed U+01A5. + +2005-11-16 Primoz Peterlin + + * sfd/FreeSans.sfd - applied the sequence suggested by Werner + Lemberg for reducing redundant points. Replaced accented glyphs in + the Latin-1 and Latin Extended-A areas with references. Made + capital Greek letters the same height as Latin and Cyrillic ones + and replaced them with references, where applicable. + +2005-11-15 Denis Jacquerye + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSansOblique.sfd - fixed + U+026A, it was a dotlessi and therefore like U+0069 when + accented. + +2005-11-15 Primoz Peterlin + + * sfd/FreeMonoBold.sfd - corrected Greek tonos (slanted instead of + a vertical line). + + * sfd/FreeMonoBoldOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Replaced accented + glyphs in the Latin-1 and Latin Extended-A areas with references. + +2005-11-14 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Added 2005 in copyright info. + + * sfd/FreeSansBoldOblique.sfd - applied the sequence suggested by + Werner Lemberg for reducing redundant points. Replaced accented + glyphs in the Latin-1 area with references. + + * sfd/FreeSansBoldOblique.sfd - added U+0180, U+0184, U+0185, + U+0195, U+01A0-01A2, U+01AF-01B0, U+025E, U+026E, U+0292, + U+0294-0296, U+029A, U+02A1, U+2126-2127, U+2190-219B, + U+219E-21A8, U+21C4-21CA, U+2669-266F. MES-1 compliant. + + * sfd/FreeMono.sfd - Replaced accented glyphs in the Greek and + Cyrillic areas with references. + + * sfd/FreeMonoBold.sfd - applied the sequence suggested by Werner + Lemberg for reducing redundant points. Replaced accented glyphs in + the Latin-1 and Latin Extended-A areas with references. + +2005-11-14 Primoz Peterlin + + * sfd/FreeSerif.sfd - applied the sequence suggested by Werner + Lemberg for reducing redundant points. + + * sfd/FreeSansBold.sfd - added U+219A, U+219B, U+2669-266F. + + * sfd/FreeSerifBold.sfd - added U+2669-266F. + +2005-11-12 Primoz Peterlin + + * sfd/FreeSansBold.sfd - added U+0180, U+0181, U+0183, U+0187, + U+0188, U+018A, U+018C, U+018D, U+0193, U+019C, U+01A0, U+01A1, + U+01AC, U+01AF, U+01B0, U+025C, U+0260, U+026E, U+0277, U+0281, + U+0284. + +2005-11-11 Primoz Peterlin + + * sfd/FreeSansBold.sfd - added U+195, U+1A6, U+025E, U+026E, + U+029A, U+0313, U+0314, U+0342, U+0344, U+0345. Started adding + accent anchors. + + * sfd/FreeMono.sfd - applied the sequence for reducing redundant + points, suggested by Werner Lemberg. + + * sfd/FreeMono.sfd - corrected Greek letters (using tonos instead + of a vertical line). Added U+026E, U+F6BE. Accented characters in + Latin 1, Latin Extended A and partly Latin Extended B replaced by + references. + + * sfd/FreeSerifBold.sfd - applied the sequence for reducing + redundant points, suggested by Werner Lemberg. Added U+01A5, + U+02A0, U+2190-219B, U+219E-21A8, U+21B8, U+21B9, U+21C4-21CA, + U+21E4, U+21E5. + +2005-11-10 Primoz Peterlin + + * sfd/FreeSansOblique - changed U+0192, U+01A5; added U+01C0-01C3. + + * sfd/FreeSansBold.sfd - replaced glyphs with references in the + Cyrillic area. Removed U+04A8, U+04A9. Added U+04C5, U+04C6, + U+04C9, U+04CA, U+04CD, U+04CE, U+0535, U+053F, U+0546, U+0565, + U+0584, U+0587, U+0589. + +2005-11-10 Denis Jacquerye + + * sfd/FreeSans.sfd - added U+028A-U+028B + + * sfd/FreeSansOblique - added U+028A-U+028B, U+0276, + U+0292, U+0294-U+0296, U+0298-U+0299 and U+029B; fixed some + other glyphs + +2005-11-10 Primoz Peterlin + + * sfd/FreeSerif.sfd - added U+01A6. Simplified outlines in the + ASCII range. + + * sfd/FreeSansBold.sfd - added U+00A0, U+00AD, U+0531, U+2126, + U+2190-2199, U+219E-21A8, U+21C4-21CA. + + * sfd/FreeSansBold.sfd - applied the sequence for reducing + redundant points, suggested by Werner Lemberg. Added automatically + constructed accented characters in page 0x1E. + +2005-11-09 Primoz Peterlin + + * sfd/FreeSerif.sfd - added U+0183, U+018C. + + * sfd/FreeSans.sfd - added U+1EA2, U+1EA3, U+1EA8, U+1EA9, U+1EB2, + U+1EB3, U+1EBA, U+1EBB, U+1EC2, U+1EC3, U+1EC8, U+1EC9, U+1ECE, + U+1ECF, U+1ED4, U+1ED5, U+1EE6, U+1EE7, U+1EF6, U+1EF7, U+220A, + U+220B, U+220D, U+2272, U+2273, U+2282, U+2283. + + * sfd/FreeSerifItalic.sfd - changed U+03D5. + + * sfd/FreeSerifBoldItalic.sfd - changed U+03C6; added U+2070, + U+2075-2079, U+207F, U+2080, U+2085-2089, U+2155-217F. + + * sfd/FreeSerif.sfd - added U+0184, U+0185, U+018D, U+0195, + U+0197, U+019A, U+019B, U+01A0, U+01A1, U+01AC, U+01B5, U+01B6, + U+01C0, U+01C1, U+01C3, U+01F6, U+0294-0296, U+1E9A, U+1EDA-1EE3, + U+1EE8-1EF1. + +2005-11-07 Primoz Peterlin + + * sfd/FreeSansBold.sfd - added U+0562, U+056D. U+0575. + + * sfd/FreeMono.sfd - added U+0589. + +2005-11-06 Primoz Peterlin + + * sfd/FreeSans.sfd - added U+0278, U+03D5, U+2248. Corrected + U+2071, U+222E, U+2242, U+2243 in response to bug reports + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276118 + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276120 + + * sfd/FreeMono.sfd - added U+2227, U+2228, U+2262. Corrected + U+2299-229D in response to bug report + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276121 + + * sfd/FreeMonoBold.sfd - added U+2010, U+2012 in response to bug + report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289032 + Swapped U+03C6 (Greek small letter phi) and U+03D5 (Greek phi + symbol) in order to conform to Unicode standard. Simplified glyph + shapes in ASCII range. Started adding "above" and "below" anchors. + +2005-11-05 Primoz Peterlin + + * sfd/FreeSerif.sfd - accented letters in Latin Extended-A + replaced by references wherever possible. + + * sfd/FreeSerif.sfd - added U+0180, U+0181, U+0187, U+0188, + U+018A, U+0193, U+019C, U+01A4, U+01A5, U+01A7, U+01A8, U+01AF, + U+01B0, U+026E, U+0270, U+0278, U+0280, U+0281, U+028B, U+0299, + U+029C, U+029F. + +2005-11-03 Primoz Peterlin + + * sfd/FreeSansBold.sfd - added U+0180, U+0184, U+0185, U+0192, + U+019B, U+01A0-01A2, U+01AF, U+01B0, U+01EE, U+01EF, U+0292, + U+0294-0296, U+02A1, U+0532, U+054C, U+057C, U+222B. Changed + U+014B, U+01A5, U+01B4, U+03BB. + + * sfd/FreeSans.sfd - added U+04C5, U+04C6, U+04C9, U+04CA, U+04D, + U+04CE. + + * sfd/FreeSansBold.sfd - cleaner Arabic outlines. Added U+01E4, + U+01E5. + +2005-11-02 Primoz Peterlin + + * sfd/FreeSansBold.sfd - started Armenian; added U+0538, U+0542, + U+0544, U+0548, U+054D, U+054F, U+0550, U+0553, U+0555, U+0561, + U+0563, U+0564, U+0566, U+0568 U+056B, U+056F, U+0570, U+0572, + U+0578, U+057A, U+057D-057F, U+0580, U+0581, U+0583, U+0585. + + * sfd/FreeMono.sfd - swapped U+03C6 (Greek small letter phi) and + U+03D5 (Greek phi symbol) in order to conform to Unicode standard. + Added U+04C5, U+04C6, U+04C9, U+04CA, U+04D, U+04CE. + +2005-11-01 Primoz Peterlin + + * sfd/FreeSansBold.sfd - modified U+019C. + + * sfd/FreeSansBoldOblique.sfd - added U+00A0, U+00AD, U+019C, + U+01B7, U+01B8, U+0275, U+0278, U+0298, U+2012, U+2015, + U+2070-207F, U+2080-208E, U+2153-217F, U+2213, U+2215. + +2005-10-31 Primoz Peterlin + + * sfd/FreeSerif.sfd - added U+0199, U+01AB, U+0265, U+0282, + U+0288, U+028C-028E, U+0290, U+029E, U+02A0. + +2005-10-28 Primoz Peterlin + + * sfd/FreeSerifBold.sfd - added U+019E, U+01AB, U+01AD, U+01B1, + U+0256, U+025F, U+0265, U+0269, U+026F, U+0270, U+0279-027F, + U+0282, U+0287, U+0288, U+028C-028E, U+0290. + + * sfd/FreeSerifBold.sfd - added U+2070, U+2075-2079, U+2080, + U+2085-2089, U+2153-215E, U+2113-2115, U+2119. + + * sfd/FreeSerifBold.sfd - added U+0199, U+019B, U+01B8, U+01B9, + U+01BE, U+01C0, U+0262, U+0274, U+0278, U+0280, U+028F, U+0298, + U+0299, U+029C, U+029E, U+029F, U+2012, U+2015, U+2016, U+2129, + U+2217. + +2005-10-27 Primoz Peterlin + + * sfd/FreeSans.sfd - added U+018D, U+0194, U+019B, U+019C, U+01B5, + U+01B6, U+0295, U+0296, U+029B, U+02A2, U+0472, U+0473, U+2114, + U+2119. + + * sfd/FreeSerifItalic.sfd - minor cleanup in the superscript range + (U+2070-2079). + + * sfd/FreeSansBold.sfd - added subscripts and superscripts + (U+2070-208F), completed fractions (U+2152-215F) and Roman + numerals (U+2160-217F). + + * sfd/FreeSerifBold.sfd - added U+018B, U+018E, U+018F, U+0191, + U+019D, U+01A7, U+01A8, U+01AE, U+0253, U+0266, U+0267, U+026A, + U+0271-0273, U+0283, U+0285. + +2005-10-26 Primoz Peterlin + + * sfd/FreeSans.sfd - added "above" anchors to selected Cyrillic + characters. Added U+0294, U+02A1. + + * sfd/FreeMono.sfd - added U+2011, U+2012, U+203B, U+204A, U+2071, + U+2129, U+2232, U+2233. Changed and/or corrected U+2106, U+211E, + U+2126, U+2127, U+2153-215F, U+2202. + + * sfd/FreeMono.sfd - a try to imitate Denis' work on adding + anchors by adding "above" anchor to a couple of basic Latin + characters. + + * sfd/FreeSansBold.sfd - added U+0278, U+0298. Cleaned up outlines + of most Greek letters. + + * sfd/FreeSansBold.sfd - Added U+2010-2012, U+2015, U+2032, + U+203C, U+2047-2049. + + * sfd/FreeSans.sfd - Added U+01C0-01C2, U+0276, U+0292, + U+0298. Changed U+0251, U+0294, U+02A1. + +2005-10-25 Primoz Peterlin + + * sfd/FreeSerifItalic.sfd - added U+00A0, U+00AD, U+2010-2012, + U+2015, U+2126, U+2127, U+2153-215E, U+2160-217F, U+2190-2193, + U+2669-266F. FreeSerifItalic is now MES-1 compliant. + + * sfd/FreeSerif.sfd - added U+0191, U+019D, U+01AE, U+027E, + U+027F, U+0283, U+0285. + + * sfd/FreeSerif.sfd - added U+019E, U+01AD, U+01B8, U+01B9, + U+0253, U+0256, U+0257, U+025C, U+0260, U+0266, U+0267, U+0269, + U+026D, U+0271-0273, U+0279-027D. + + * sfd/FreeSerifBoldItalic.sfd - added U+00A0, U+00AD, U+2010-2012, + U+2015, U+2032-2034, U+203C, U+2047-204A, U+2074, U+2081-2084, + U+2126, U+2153, U+2154, U+215F, U+2215. Corrected positions of + diacritics on U+0200-0217. + + * sfd/FreeSansOblique.sfd, sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBoldOblique.sfd, + sfd/FreeMonoBold.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd sfd/FreeSerifBoldItalic.sfd - brought in + sync with Valek Filipov's urw-fonts-1.0.7pre41. + + * sfd/FreeSansOblique.sfd - added U+00A0, U+2011-2012, U+2015, + U+2070, U+2071, U+2074-2079, U+2080-2089, U+2126, U+2153-215F, + U+2190-2195, U+2215, U+266A. FreeSansOblique is now MES-1 + compliant. + +2005-10-24 Denis Jacquerye + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - added + ccmp for i and j to be substituted with dotless i or j when + followed by above diacritic + +2005-10-24 Primoz Peterlin + + * sfd/FreeSans.sfd - added U+2011, U+2012, U+2015. FreeSans is now + MES-1 conformant. + +2005-10-23 Denis Jacquerye + + * sfd/FreeSans.sfd - added above, below, abovemk and belowmk + anchors for diacritics placement to many Basic Latin characters, + some Latin Extented A and B, and some IPA characters; fixed a + couple of precomposed characters to have diacritics at the same + height as similar characters. + +2005-10-21 Primoz Peterlin + + * sfd/FreeSerif.sfd - added U+02B9, U+02BA, U+02CD, U+2017, + U+2036, U+2037, U+203C, U+203E, U+2047-204A. + +2005-10-20 Primoz Peterlin + + * sfd/FreeSerifBold.sfd - added U+0182, U+0189, U+0192, U+019F, + U+01A9, U+01B7, U+01C4-01CC, U+01E0-1E2, U+01F0-01F3, U+F6BE. + Corrected position of diacritics on U+0200-0217. + + * sfd/FreeSerif.sfd - added U+00A0, U+00AD, U+0182, U+0189, + U+018B, U+018E, U+018F, U+0192, U+019F, U+01A9, U+01B1, U+01B7, + U+01DD, U+2010-2013, U+2015. FreeSerif is now MES-1 conformant. + +2005-10-19 Denis Jacquerye + + * sfd/FreeSerif.sfd - added U+0268, U+026A, U+0289, U+0292; and + anchor "above" to more base glyphs. + + * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBoldItalic.sfd - added U+0250-0252, U+0258-0259, + U+0261, U+0268, U+026A, U+0279, U+0289 + + * sfd/FreeSerifBold.sfd - added anchor "above" to marks + U+0300-0314, and to base glyphs (vowels). + +2005-10-18 Denis Jacquerye + + * sfd/FreeSerif.sfd - added anchor "above" to marks U+0300-0314, + and bases vowel of the U+0041-007A range, U+00E6, U+0186, U+0190, + U+0254 and U+025B; fixed Latin-1 Supplement block accented glyphs + to use references. + +2005-10-17 Primoz Peterlin + + * sfd/FreeSansBold.sfd - added U+01B7, U+01B8, U+0275. + +2005-10-16 Denis Jacquerye + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added some Latin + Extended-B African letters: U+0181, U+018A, U+0197-0198, U+01A4, + U+01AC, U+01B1, U+01B3-01B4; + + * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added Latin + Extended-B U+0187, 018E-018F, U+0191, U+0193, U+0197-0199, + U+019D-019F, U+01AB-01AE; correcting width of non-space + Combining Diacrtical Marks; added more glyphs to IPA Extensions + to match non Bold + + * sfd/FreeSansBoldOblique.sfd - added many accented glyphs to + Latin Extended-B + +2005-10-15 Denis Jacquerye + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - added IPA Extensions + U+0262,U+0274,U+0280-0281, U+0299, U+029F, and Spacing Modifier + Letters U+02C9-02CB; fixed U+0287,029E height to baseline; added + stroke to U+0268 + + * sfd/FreeSansOblique.sfd - fixed skew on U+027F + + * sfd/FreeSansBold.sfd, sfd/FreeSansBoldOblique.sfd - added to Latin + Extended-B U+01A7-01A8, IPA Extensions U+0251-0253, U+0256-0257, + U+0261, U+0265-026A, U+026F-0273, U+0289, U+028C-028E + + * sfd/FreeSansBoldOblique.sfd - added to Latin extended-B U+0189, + U+01A8, U+01B1, U+0283, U+02C9 and Spacing Modifiers U+02C9-02CB + +2005-10-14 Primoz Peterlin + + * sfd/FreeSansBold.sfd - Added a couple of composite glyphs, + mostly in the IPA and Latin Extended B ranges. + +2005-10-13 Denis Jacquerye + + * FreeSans.sfd - removed overlap and simplified U+0187, 0191, + 0193, 01A5, 01AE, 0260, 0271, 0272, 0273, 027B; fixed diacritics + placement on U+0200-0217; fixed glyph for U+0283 to correct esh + without stroke; added U+025F and fixed U+025F from it; fixed + height of glyph at U+0285; arranged U+027E,027F to make more + distinguishable from U+0072. + + * FreeSansOblique.sfd - added the corrected or new glyphs from + FreeSans; diacritics on U+200-0217 will need height readjustements. + + * FreeSansBold.sfd, FreeSansBoldOblique.sfd - added U+0186, 0190, + 0250, 0254, 0258, 0259, 025B, 025C + +2005-10-13 Primoz Peterlin + + * sfd/FreeSerif.sfd - Minor changes: U+22A2, U+22A3, U+22A6, U+23AE. + Added U+0250, U+0251, U+0258, U+0259, U+0275. + + * sfd/FreeSerifItalic.sfd - Added glyphs U+222B-U+222F, U+2320, + U+2321. Fixed diacritics on U+0200-U+0217. + +2005-10-12 Denis Jacquerye + + * sfd/FreeSerif.sfd - Corrected diacritics position on + U+01D5-01D9,01DB,01EA-01ED,0200-0217 and U+022A. + + * sfd/FreeSerif.sfd, sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBoldItalic.sfd - added U+0186,0190,0254 and U+025B. + +2005-10-11 Primoz Peterlin + + * sfd/FreeSerif.sfd - Fixed bug #13399 (glyphs for U+0360 and + U+0361 were swapped). + + * sfd/FreeSerif.sfd - Attempt to correct bug #13370: INTEGRAL + EXTENSION does not align with TOP/BOTTOM HALF INTEGRAL; added + glyph U+23AE. + +2005-05-16 Primoz Peterlin + + * sfd/FreeMono.sfd - Corrected shapes for Cross of Lorraine and + Cross of Jerusalem. + +2005-04-07 Primoz Peterlin + + * sfd/FreeSansBold.sfd - Added some combining accents, just to + test the a version of FontForge. + +2003-12-05 Primoz Peterlin + + * sfd/FreeMono.sfd - Some composite Latin characters rebuilt, as + they had accents 600 points to the left due to changes on October + 2. Some other minor changes in the mathematics area. + +2003-10-08 Primoz Peterlin + + * sfd/FreeMonoOblique.sfd, sfd/FreeSerifBoldItalic.sfd, + FreeSerifItalic.sfd - applied Josef Segur's corrections from + Oct. 5. + +2003-10-02 Primoz Peterlin + + * sfd/FreeSerif.sfd - Abbas Izad's contributed Arabic/Farsi + characters added. + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Combining characters (U+0300 - + U+036F) moved left, so that they have negative horizontal values + and zero advance width. + +2003-09-15 Primoz Peterlin + + * sfd/FreeSerifBold.sfd, sfd/FreeSerifItalic.sfd - Started working + on super- and subscripts. + +2003-09-12 Primoz Peterlin + + * sfd/FreeSans.sfd, sfd/FreeSerif.sfd - Added some missing + Hiragana and Katakana characters. + + * sfd/FreeSansBold.sfd - Cleared background characters in Latin + Extended-A. Added some automatically constructed characters in + Latin Extended-B. Started with superscripts and subscripts. + + * sfd/FreeSans.sfd - Subscript numerals (U+2080-U+2089) completed. + +2003-05-19 Primoz Peterlin + + * sfd/FreeSerif.sfd - Thai characters po pla and bo baimai + swapped; Thai character fongman corrected; all courtesy Theppitak + Karoonboonyanan. + +2003-05-17 Panayotis Katsaloulis + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - Full support + of all ancient greek glyphs + +2003-05-15 Primoz Peterlin + + * tools/KerningNumerals.pl - A Perl script for moving kerning + information from ASCII numerals (U+0030...) to characters in the + Adobe corporate use area (U+F6xx). + + * sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBoldOblique.sfd - Created kerned numerals in the Adobe + corporate use area (U+F6xx) and moved kerning information from + ASCII numerals to the kerned numerals. + +2003-05-14 Primoz Peterlin + + * sfd/FreeSans.sfd - First approximation of super- and subscript + numerals and vulgar fractions. + + * sfd/FreeSerif.sfd - Super- and subscript numerals complete, + vulgar fractions completed and redone as references rather than + outlines. + +2003-05-12 Primoz Peterlin + + * sfd/FreeSerif.sfd - Clean-up of the Cyrillic letters added on + March 27; super- and subscripts, vulgar fractions. + +2003-05-09 Primoz Peterlin + + * sfd/FreeMonoBold.sfd - Added a couple of characters to + the Latin Extended-B area and the IPA extensions area. + +2003-05-08 Primoz Peterlin + + * sfd/FreeSerifBoldItalic.sfd - Added a couple of characters to + the Latin Extended-B area. + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - ASCII + numerals now monospaced; kerned numerals moved to Adobe corporate + use area + (U+F6xx). + +2003-05-07 Primoz Peterlin + + * sfd/FreeSerif.sfd - Roman numerals now more complete. + + * sfd/FreeSansOblique.sfd, sfd/FreeSansBoldOblique.sfd - Accented + characters added in the Latin Extended-B area. + + * sfd/FreeSans.sfd - Greek accents added in the Greek Extended + area, characters added in the Latin Extended-B area, Roman + numerals added. + + * sfd/FreeMonoOblique.sfd - Kerning pairs removed (what were they + doing in a monospaced font, anyway?). + + * sfd/FreeMonoBoldOblique.sfd - Additions in Latin Extended-B and + Basic Greek. + + * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBoldOblique.sfd - Major cleanup (fixed widths, open + paths, path directions (clockwise/counter-clockwise), points + rounded to integer values; outlines simplified etc.) + +2003-05-06 Primoz Peterlin + + * tools/OS2UnicodeRange - A simple script to display OS/2 Unicode + range table in TrueType fonts. + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd - ASCII numerals now + monospaced; kerned numerals moved to Adobe corporate use area + (U+F6xx). FreeSans is done, FreeSansBold half-way. + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Added 2003 in copyright info. + +2003-03-27 Primoz Peterlin + + * sfd/FreeSerif.sfd - Cyrillic and Cyrillic Supplement blocks + brought to conformance with Unicode 3.2, courtesy Daniel Shurovich + Chirkov. + +2003-03-19 Primoz Peterlin + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd - somewhat wider + germandbls (U+00DF), due to complaints by Walter Schmidt. + +2003-03-18 Primoz Peterlin + + * sfd/FreeSans.sfd - Added Sinhala glyphs from the Tipitaka + project , recoded to Unicode by Noah Levitt. + +2003-02-19 Primoz Peterlin + + * sfd/FreeSans.sfd - Minor changes on mathematical operators. + +2003-02-18 Primoz Peterlin + + * sfd/FreeMono.sfd - minor cleanup of glyph backgrounds; changed + integral signs (U+222B - U+2230) + +2003-02-05 Primoz Peterlin + + * sfd/FreeSans.sfd - added a couple of glyphs in the IPA and + African Latin ranges. + +2003-01-30 Primoz Peterlin + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd - Corrected Maltese Hbar (U+0126) + and/or hbar (U+0127). + +2003-01-28 Primoz Peterlin + + * sfd/FreeSerifItalic.sfd - Corrected Maltese hbar (U+0127). + +2002-12-18 Primoz Peterlin + + * tools/ConvertFont - PfaEdit script for converting SFD files to + TrueType fonts. + + * sfd/FreeSans.sfd - Added Tamil and Kannada glyphs from the + Akruti Indic fonts. + +2002-12-17 Primoz Peterlin + + * sfd/FreeSans.sfd - Added Devanagari and Gujarati glyphs from the + Akruti Indic fonts. + + * www/index.html - Added information on Rogier van Dalen's tools. + + * AUTHORS - Added M.S. Sridhar. + + * CREDITS - Correct spelling of Culmus project. Added M.S. Sridhar. + +2002-12-06 Primoz Peterlin + + * sfd/FreeMono.sfd - Added Braille glyphs, courtesy Vyacheslav + Dikonov. + + * sfd/FreeSans.sfd - Added Unicode Syriac glyphs, courtesy + Vyacheslav Dikonov. + +2002-10-11 Primoz Peterlin + + * www/index.html - Added information on the availability of the + Debian GNU/Linux package. + + * sfd/FreeSerif.sfd, sfd/FreeSans.sfd - added some kern pairs + beyond Latin-1 area. + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - re-introduced + all the emtpy glyph slots (changes from Sep 23 made PfaEdit + crash). + +2002-09-23 Primoz Peterlin + + * sfd/FreeSerif.sfd, sfd/FreeSerifItalic.sfd, + sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd - imported + kerning information from the URW++ AFM files + +2002-09-11 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoOblique.sfd - updated Hebrew parts to comply with + Culmus v0.6. + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansOblique.sfd - Added Danilo Segan's Serbian Cyrillic + glyphs; updated Hebrew parts to comply with Culmus v0.6. + +2002-09-09 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansOblique.sfd - Updated Cyrillic part to match + Filippov's 1.0.7pre14 + + * sfd/FreeSansOblique.sfd - added Sam Stepanyan's Armenian glyphs + from FreeSans (skewed for 12 degrees). + +2002-09-06 Primoz Peterlin + + * sfd/FreeSans.sfd, sfd/FreeSansOblique.sfd, + sfd/FreeSansBold.sfd, sfd/FreeSansOblique.sfd - Added Maxim + Iorsh's Hebrew characters. + +2002-08-29 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, + sfd/FreeMonoBold.sfd, sfd/FreeMonoOblique.sfd - Added Maxim + Iorsh's Hebrew characters. + + * AUTHORS, CREDITS - Added Maxim Iorsh as author. + +2002-08-28 Primoz Peterlin + + * www/index.html - Added information of Microsoft's withdrawal of + freely available Unicode TrueType fonts + + * www/resources.html - Added link to Maxim Iorsh's Culmus project. + +2002-07-26 Primoz Peterlin + + * sfd/FreeMono.sfd - Added a couple of characters (Arrows area). + +2002-06-11 Primoz Peterlin + + * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning + perispomeni in Greek politoniko. + +2002-05-23 Primoz Peterlin + + * sfd/FreeMono.sfd - Applied Michalis Kabrianis's patch concerning + psili in Greek politoniko. Also added two working variants of + chars in the IPA range. + +2002-05-15 Primoz Peterlin + + * sfd/FreeSans.sfd, sfd/FreeSansBold.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifBold.sfd - Deleted explicit ".notdef" character with + no contours. + +2002-05-14 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - The new version of PfaEdit saves + correctly formed Panose and LineGap lines. + + * sfd/FreeSansBoldOblique.sfd - Filled-in the missing TTFWidth and + TTFWeight values. + +2002-05-09 Primoz Peterlin + + * sfd/FreeSans.sfd - Added diacritics to the Spacing Modifier + Letters and Combining Diacritical Marks areas. Added composed + glyphs to the Latin Extended-B area. + +2002-05-07 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Updated Panose information with data + provided by Josef W. Segur. Updated TTF headers with English and + Slovenian text. + +2002-04-30 Primoz Peterlin + + * sfd/FreeMonoBold.sfd - Working on Greek small letters. Several + minor changes (lower carons etc.) + +2002-04-29 Primoz Peterlin + + * FreeMonoBoldOblique.sfd - Started adding Greek. + + * sfd/FreeMonoBold.sfd - Added glyphs in the Geometrical Shapes + and Miscellaneous Symbols area. Harmonizing Greek with Latin. Done + with capitals. + + * sfd/FreeMono.sfd - Deleted the explicit .notdef character. Added + one glyph to the Geometrical Shapes area, which is now completed; + added three glyphs to the Miscellaneous Symbols area. Harmonizing + Greek with Latin. Done with the capitals. + +2002-04-26 Primoz Peterlin + + * sfd/FreeSans.sfd - Adjusted accent positions on several glyphs + in the Latin Extended-A area. + +2002-04-25 Primoz Peterlin + + * sfd/FreeMonoBold.sfd - Box Drawing area completed. Added a + couple of glyphs in the Geometrical Shapes area. + + * sfd/FreeMono.sfd - Small corrections in the Box Drawing area. + +2002-04-24 Primoz Peterlin + + * sfd/FreeMono.sfd - Box Drawing area completed. + +2002-04-23 Primoz Peterlin + + * tools/WGL4.lst - corrected. + + * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Box Drawing + area. + +2002-04-22 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoBold.sfd - Working on Latin + Extended-B and Greek. + +2002-04-19 Primoz Peterlin + + * sfd/FreeSerif.sfd - Somewhat cleaner chess figures. + + * tools/MES-2.txt, tools/MES-2.lst - Corrected list (it is not + 203C-203E, it is 203C and 203E). + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd, sfd/FreeSans.sfd, + sfd/FreeSansOblique.sfd, sfd/FreeSansBold.sfd, + sfd/FreeSansBoldOblique.sfd, sfd/FreeSerif.sfd, + sfd/FreeSerifItalic.sfd, sfd/FreeSerifBold.sfd, + sfd/FreeSerifBoldItalic.sfd - Changed "Family Name" from Free to + FreeSerif, FreeSans and FreeMono, as appropriate. Changed Font + Modifiers from MonoBold etc. to Bold, Italic, Oblique, BoldOblique + and BoldItalic. + +2002-04-18 Primoz Peterlin + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd, sfd/FreeMonoBold.sfd, + sfd/FreeMonoBoldOblique.sfd - Corrected metrics; now all character + widths are set to 600. + +2002-04-17 Primoz Peterlin + + * sfd/FreeSerif.sfd - Corrected glyphs in the Box Drawing area and + Block Elements area, which should extend through the ascender *and + descender* height. + + * sfd/FreeMonoBold.sfd - Continued working on harmonizing Greek + letters with Latin and Cyrillic. + + * sfd/FreeMonoBold.sfd - Added some box drawing characters. + +2002-04-16 Primoz Peterlin + + * www/design-notes.html - Updated notes on stroke width for + symbols in Free Mono Bold. + + * sfd/FreeMono.sfd - Added a handful of characters in the + Miscellaneous Symbols area. + + * sfd/FreeMonoBoldOblique.sfd - Added subscripts, superscripts and + vulgar fractions. + + * sfd/FreeMonoBold.sfd - Started harmonizing Greek letters with + Latin and Cyrillic. + + * sfd/FreeMonoBold.sfd - Added subscripts, superscripts and vulgar + fractions. + +2002-04-15 Primoz Peterlin + + * www/design-notes.html - Updated notes on super-/subscripts in + Free Mono Bold. Separate subsections for Free Mono regular and + Free Mono Bold. + +2002-04-12 Primoz Peterlin + + * sfd/FreeSerif.sfd - Added Ethiopian glyphs, converted from the + Metafont sources from TGI, Universitt Hamburg (authors Berhanu + Beyene, Prof. Dr. Manfred Kudlek, Olaf Kummer, and Jochen + Metzinger) using Szabo's TeXtrace and retouched using + PfaEdit. Ethiopian metafonts are released under GNU GPL, + . + + * sfd/FreeMonoBold.sfd - Added 40 characters, mostly in the Latin + Extended-B and IPA Extensions areas. + +2002-04-11 Primoz Peterlin + + * sfd/FreeMono.sfd - Added a handful of characters in the Latin + Extended-B, IPA Extensions, Currency Symbols and Miscellaneous + Symbols areas. + +2002-04-09 Primoz Peterlin + + * sfd/FreeMono.sfd - Correcting accent positioning in the Extended + Greek area; adding a couple of characters here and there. Still 20 + characters short of MES-2 conformance. + +2002-04-08 Primoz Peterlin + + * sfd/FreeMono.sfd - Added some characters in the Arrows area; + more or less completed Extended Greek area (accents still need to + be fine-tuned). + +2002-04-05 Primoz Peterlin + + * sfd/FreeMono.sfd - Modern non-Russian Cyrilic mostly completed. + + * sfd/FreeMonoOblique.sfd - Synchronized with FreeMono. + + * sfd/FreeSerif.sfd - Added Thomas Ridgeway's Tamil characters + (converted from Metafont and edited somehwat). + +2002-04-04 Primoz Peterlin + + * sfd/FreeMonoOblique.sfd - Armenian letters added. + + * sfd/FreeMonoBold.sfd - Serbian Cyrillic letters dje, tshe, lje + and nje corrected. + + * sfd/FreeMono.sfd - Serbian Cyrillic letters dje and tshe + corrected. Some other non-Russian Cyrillic letters modified and + "welded together". + +2002-04-03 Primoz Peterlin + + * sfd/FreeMono.sfd - Added more or less complete Armenian + area. The glyphs are a tidied-up version based on the Armenian + Courier on the . Now we have + 1673 characters. + +2002-03-28 Primoz Peterlin + + * sfd/FreeMono.sfd - Added some mathematical symbols. + +2002-03-26 Primoz Peterlin + + * sfd/FreeSans.sfd - took H.S. Pannu's Gurmukhi from FreeSerif. It + actually fits to FreeSans much better. It seems I'll have to look + for another Gurmukhi font with modulated stroke for FreeSerif. + + * sfd/FreeSerifItalic.sfd - replaced existing Hebrew glyphs by + those from FreeSerif (slanted for 15.5 degrees). + + * sfd/FreeSerif.sfd - Added dotted Hebrew letters. Changed barred H. + + * sfd/FreeMono.sfd - Completed vulgar fractions; minor changes in + Greek; added some mathematical operators. + + * sfd/FreeMonoBold.sfd - added 12 characters to Latin Extended-B + and IPA Extensions areas (total 984). + +2002-03-25 Primoz Peterlin + + * sfd/FreeMonoBold.sfd - started adding Latin Extended-B and IPA + Extensions. + + * sfd/FreeMono.sfd - Minor cosmetic changes; cleaning up Greek + (removing redundant control points), added some non-European + Cyrillic glyphs as a test. + +2002-03-22 Primoz Peterlin + + * sfd/FreeMono.sfd - Some minor modifications; letters in Latin + Extended-B area "welded" together. + +2002-03-20 Primoz Peterlin + + * www/index.html - finally linked the resources and design notes + pages. + + * www/design-notes.html - added scaling information for super- and + subscript numerals in FreeMono. + +2002-03-19 Primoz Peterlin + + * sfd/FreeMono.sfd - the Latin Extended-B and IPA Extension area + characters moved from FreeMono and skewed for 12 degrees. + +2002-03-18 Primoz Peterlin + + * sfd/FreeMono.sfd - added a dozen or two of new characters, in + particular in the Latin Extended-B and IPA Extension area. + +2002-03-15 Primoz Peterlin + + * sfd/FreeMono.sfd - added a dozen of two of new characters, in + particular in the IPA Extension area. + + * www/design-notes.html - Corrected data for x-height in FreeMono; + information on constructing small caps. + +2002-03-14 Primoz Peterlin + + * sfd/FreeMono.sfd - added three smiley characters to the + Miscallaneous Symbols area. + +2002-03-10 Primoz Peterlin + + * sfd/FreeSerif.sfd - Anshuman Pandey has only converted Gurmukhi + from TrueType to Metafont; the original author of Gurkmukhi font + is Hardip Singh Pannu . + Got the permission from him to include the Gurmukhi glyph set. + +2002-03-08 Primoz Peterlin + + * sfd/FreeSerif.sfd - Added some more glyphs in the Mathematical + Symbols area to a total number of 3374. + +2002-03-06 Primoz Peterlin + + * sfd/FreeSerif.sfd - Added a basic Gurmukhi set. + + * www/design-notes.html - started a page on design notes + + * sfd/FreeMono.sfd - realized that glyphs in the Box Drawing area + and Block Elements area should extend through the ascender *and + descender* height, and corrected it. + + * sfd/FreeMono.sfd, sfd/FreeMonoOblique.sfd - added some musical + glyphs, linking "no-break space" to space, "soft hyphen" to + hyphen-minus etc. + +2002-03-05 Primoz Peterlin + + * tools/WGL4.lst - Added Windows Glyph List 4.0 + + * tools/LigatureList.pl - Wrote a Perl script, which lists the + GSUB list (ligature list) of a OpenType font. + + * sfd/FreeSerifBold.sfd, sfd/FreeSerifBoldItalic.sfd, + sfd/FreeSerifItalic.sfd - auxilliary Hebrew glyphs added. They are + too light compared with Latin and will be substituted with better + ones. + +2002-03-04 Primoz Peterlin + + * sfd/FreeSerif.sfd - Added some more glyphs to the Mathematical + Operators area (page 0x22). + + * sfd/FreeSerif.sfd - Incomplete and fragmentary support for + Devanagari, originating from Harsh Kumar's Shusha fonts was + replaced by Frans Velthuis' Devanagari metafont, now maintained by + Anshuman Pandey and available under + GPL. Until I figure out how to provide glyph substitution table in + OpenType, only the Unicode part is there. + +2002-02-28 Primoz Peterlin + + * ChangeLog file created + + * sfd/FreeSerif.sfd - Added some Telugu glyphs to page 0x0C, + courtesy Prasad A. Chodavarapu + + * sfd/FreeSerif.sfd - Added some glyphs to the Miscellaneous + Symbols page (0x26). + +2002-02-26 Primoz Peterlin + + * mailing lists freefont-announce and freefont-bugs created + +2002-02-25 Primoz Peterlin + + * sfd/FreeSerif.sfd - Added a couple of glyphs in Mathematics + Operators area. + + * sfd/FreeMono.sfd + - Added some more glyphs, in particular in the Mathematical + Operators section. + - Changed FamilyName to Free, FontName to FreeMono, and Full name + to "Free Monospaced". + +2002-02-20 Primoz Peterlin + + * sfd/ directory added containing FreeSerif, FreeSans and FreeMono + families. + + * tools/ directory added containing lists with characters required + for MES (Multilinguag European Subset) compliance. + + * tools/mes-list-expand.pl created - a Perl script for expanding MES + ranges into simple one-char-per-line format + + * tools/CheckConformance.pl created - a Perl script for checking + conformance of a font file with a given coded character set + + * homepage created + +2002-02-19 Primoz Peterlin + + * freefont (Free UCS Scalable Fonts) project approved on + savannah.gnu.org: diff --git a/media/fonts/doc/FreeFont_readme.txt b/media/fonts/doc/FreeFont_readme.txt index 96e4a4db86d..8c970cbcf4c 100644 --- a/media/fonts/doc/FreeFont_readme.txt +++ b/media/fonts/doc/FreeFont_readme.txt @@ -63,7 +63,7 @@ Licensing Free UCS scalable fonts 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 +by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. The fonts are distributed in the hope that they will be useful, but @@ -105,4 +105,4 @@ Primoz Peterlin, Steve White Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/ -$Id: README,v 1.5 2008/08/30 09:30:09 Stevan_White Exp $ +$Id: README,v 1.7 2009/01/13 08:43:23 Stevan_White Exp $ diff --git a/media/inf/CMakeLists.txt b/media/inf/CMakeLists.txt index f21f8eb15ba..6fa1b41cb32 100644 --- a/media/inf/CMakeLists.txt +++ b/media/inf/CMakeLists.txt @@ -5,6 +5,7 @@ list(APPEND INF_FILES bda.inf cdrom.inf cpu.inf + disk.inf display.inf fdc.inf font.inf @@ -23,6 +24,7 @@ list(APPEND INF_FILES nettcpip.inf ports.inf scsi.inf + unknown.inf usb.inf usbport.inf usbstor.inf diff --git a/media/inf/disk.inf b/media/inf/disk.inf new file mode 100644 index 00000000000..64ef86f0679 Binary files /dev/null and b/media/inf/disk.inf differ diff --git a/media/inf/hdc.inf b/media/inf/hdc.inf index a9bd9f54fd3..88efbc0e5ff 100644 Binary files a/media/inf/hdc.inf and b/media/inf/hdc.inf differ diff --git a/media/inf/ports.inf b/media/inf/ports.inf index 198bf980a56..4589d3b1113 100644 Binary files a/media/inf/ports.inf and b/media/inf/ports.inf differ diff --git a/media/inf/syssetup.inf.tpl b/media/inf/syssetup.inf.tpl index f1c7ff67ce6..5b49de62995 100644 --- a/media/inf/syssetup.inf.tpl +++ b/media/inf/syssetup.inf.tpl @@ -16,6 +16,7 @@ ClassGUID={00000000-0000-0000-0000-000000000000} ; we use a separate one to keep things clean battery.inf cdrom.inf +disk.inf display.inf fdc.inf hdc.inf @@ -25,6 +26,7 @@ msmouse.inf NET_NIC.inf ports.inf scsi.inf +unknown.inf usbport.inf audio.inf ks.inf diff --git a/media/inf/unknown.inf b/media/inf/unknown.inf new file mode 100644 index 00000000000..65494da18d9 Binary files /dev/null and b/media/inf/unknown.inf differ diff --git a/ntoskrnl/CMakeLists.txt b/ntoskrnl/CMakeLists.txt index ce0f992935d..2640133433b 100644 --- a/ntoskrnl/CMakeLists.txt +++ b/ntoskrnl/CMakeLists.txt @@ -279,7 +279,6 @@ if(ARCH MATCHES i386) ex/i386/interlck_asm.S ex/i386/fastinterlck_asm.S ex/i386/ioport.S - ke/freeldr.c ke/i386/abios.c ke/i386/cpu.c ke/i386/context.c @@ -390,7 +389,7 @@ if(NOT _WINKD_) endif() if(DBG OR KDBG) - list(APPEND SOURCE kdbg/kdb_symbols.c) + list(APPEND SOURCE kdbg/kdb_symbols.cmake.c) endif() list(APPEND SOURCE @@ -421,9 +420,13 @@ else() # _WINKD_ endif() -add_executable(ntoskrnl ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl_ntoskrnl.h.gch ${SOURCE}) +add_executable(ntoskrnl ${SOURCE}) -set_entrypoint(ntoskrnl KiSystemStartup@4) +if (ARCH MATCHES i386) + set_entrypoint(ntoskrnl KiSystemStartup@4) +else() + set_entrypoint(ntoskrnl KiSystemStartup) +endif() set_subsystem(ntoskrnl native) if(MSVC) @@ -445,11 +448,10 @@ target_link_libraries(ntoskrnl add_importlibs(ntoskrnl hal kdcom bootvid) -add_pch(ntoskrnl ${CMAKE_CURRENT_SOURCE_DIR}/include/ntoskrnl.h ${SOURCE}) +add_pch(ntoskrnl include/ntoskrnl.h) add_dependencies(ntoskrnl psdk bugcodes asm) add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all) add_importlib_target(ntoskrnl.spec) add_library(ntdllsys ntdll.S) -set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE C) diff --git a/ntoskrnl/cache/newcc.h b/ntoskrnl/cache/newcc.h index ab93976f724..cbe95caa7c9 100644 --- a/ntoskrnl/cache/newcc.h +++ b/ntoskrnl/cache/newcc.h @@ -75,7 +75,7 @@ CcInitializeCacheManager(VOID); VOID NTAPI -CcShutdownSystem(); +CcShutdownSystem(VOID); VOID NTAPI diff --git a/ntoskrnl/cache/section/data.c b/ntoskrnl/cache/section/data.c index 4e2d81bcc32..bfa58827d6c 100644 --- a/ntoskrnl/cache/section/data.c +++ b/ntoskrnl/cache/section/data.c @@ -307,7 +307,7 @@ MmFinalizeSegment(PMM_CACHE_SECTION_SEGMENT Segment) MmUnlockCacheSectionSegment(Segment); } DPRINTC("Segment %x destroy\n", Segment); - ExFreePool(Segment); + ExFreePoolWithTag(Segment, TAG_MM_SECTION_SEGMENT); } NTSTATUS diff --git a/ntoskrnl/cache/section/io.c b/ntoskrnl/cache/section/io.c index 4d59412451a..951bd23445f 100644 --- a/ntoskrnl/cache/section/io.c +++ b/ntoskrnl/cache/section/io.c @@ -71,16 +71,17 @@ MiSimpleReadComplete PIRP Irp, PVOID Context) { + PMDL Mdl = Irp->MdlAddress; + /* Unlock MDL Pages, page 167. */ DPRINT("MiSimpleReadComplete %x\n", Irp); - PMDL Mdl = Irp->MdlAddress; while (Mdl) { DPRINT("MDL Unlock %x\n", Mdl); MmUnlockPages(Mdl); Mdl = Mdl->Next; } - + /* Check if there's an MDL */ while ((Mdl = Irp->MdlAddress)) { @@ -95,11 +96,13 @@ MiSimpleReadComplete NTSTATUS NTAPI MiSimpleRead -(PFILE_OBJECT FileObject, +(PFILE_OBJECT FileObject, PLARGE_INTEGER FileOffset, - PVOID Buffer, + PVOID Buffer, ULONG Length, +#ifdef __ROS_CMAKE__ BOOLEAN Paging, +#endif PIO_STATUS_BLOCK ReadStatus) { NTSTATUS Status; @@ -107,21 +110,21 @@ MiSimpleRead KEVENT ReadWait; PDEVICE_OBJECT DeviceObject; PIO_STACK_LOCATION IrpSp; - + ASSERT(FileObject); ASSERT(FileOffset); ASSERT(Buffer); ASSERT(ReadStatus); - + DeviceObject = MmGetDeviceObjectForFile(FileObject); ReadStatus->Status = STATUS_INTERNAL_ERROR; ReadStatus->Information = 0; - + ASSERT(DeviceObject); DPRINT - ("PAGING READ: FileObject %x <%wZ> Offset %08x%08x Length %d\n", - &FileObject, + ("PAGING READ: FileObject %x <%wZ> Offset %08x%08x Length %d\n", + &FileObject, &FileObject->FileName, FileOffset->HighPart, FileOffset->LowPart, @@ -136,14 +139,18 @@ MiSimpleRead Length, FileOffset, ReadStatus); - + if (!Irp) { return STATUS_NO_MEMORY; } - + +#ifndef __ROS_CMAKE__ + Irp->Flags |= IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE | IRP_SYNCHRONOUS_API; +#else Irp->Flags |= (Paging ? IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE : 0) | IRP_SYNCHRONOUS_API; - +#endif + Irp->UserEvent = &ReadWait; Irp->Tail.Overlay.OriginalFileObject = FileObject; Irp->Tail.Overlay.Thread = PsGetCurrentThread(); @@ -151,7 +158,10 @@ MiSimpleRead IrpSp->Control |= SL_INVOKE_ON_SUCCESS | SL_INVOKE_ON_ERROR; IrpSp->FileObject = FileObject; IrpSp->CompletionRoutine = MiSimpleReadComplete; + +#ifdef __ROS_CMAKE__ ObReferenceObject(FileObject); +#endif Status = IoCallDriver(DeviceObject, Irp); if (Status == STATUS_PENDING) @@ -159,10 +169,10 @@ MiSimpleRead DPRINT1("KeWaitForSingleObject(&ReadWait)\n"); if (!NT_SUCCESS (KeWaitForSingleObject - (&ReadWait, - Suspended, - KernelMode, - FALSE, + (&ReadWait, + Suspended, + KernelMode, + FALSE, NULL))) { DPRINT1("Warning: Failed to wait for synchronous IRP\n"); @@ -170,10 +180,10 @@ MiSimpleRead return Status; } } - + DPRINT("Paging IO Done: %08x\n", ReadStatus->Status); - Status = - ReadStatus->Status == STATUS_END_OF_FILE ? + Status = + ReadStatus->Status == STATUS_END_OF_FILE ? STATUS_SUCCESS : ReadStatus->Status; return Status; } @@ -181,9 +191,9 @@ MiSimpleRead NTSTATUS NTAPI _MiSimpleWrite -(PFILE_OBJECT FileObject, +(PFILE_OBJECT FileObject, PLARGE_INTEGER FileOffset, - PVOID Buffer, + PVOID Buffer, ULONG Length, PIO_STATUS_BLOCK ReadStatus, const char *File, @@ -194,24 +204,24 @@ _MiSimpleWrite KEVENT ReadWait; PDEVICE_OBJECT DeviceObject; PIO_STACK_LOCATION IrpSp; - + ASSERT(FileObject); ASSERT(FileOffset); ASSERT(Buffer); ASSERT(ReadStatus); - + ObReferenceObject(FileObject); DeviceObject = MmGetDeviceObjectForFile(FileObject); ASSERT(DeviceObject); - + DPRINT - ("PAGING WRITE: FileObject %x Offset %x Length %d (%s:%d)\n", - &FileObject, + ("PAGING WRITE: FileObject %x Offset %x Length %d (%s:%d)\n", + &FileObject, FileOffset->LowPart, Length, File, Line); - + KeInitializeEvent(&ReadWait, NotificationEvent, FALSE); Irp = IoBuildAsynchronousFsdRequest @@ -221,15 +231,15 @@ _MiSimpleWrite Length, FileOffset, ReadStatus); - + if (!Irp) { ObDereferenceObject(FileObject); return STATUS_NO_MEMORY; } - + Irp->Flags = IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE | IRP_SYNCHRONOUS_API; - + Irp->UserEvent = &ReadWait; Irp->Tail.Overlay.OriginalFileObject = FileObject; Irp->Tail.Overlay.Thread = PsGetCurrentThread(); @@ -237,7 +247,7 @@ _MiSimpleWrite IrpSp->Control |= SL_INVOKE_ON_SUCCESS | SL_INVOKE_ON_ERROR; IrpSp->FileObject = FileObject; IrpSp->CompletionRoutine = MiSimpleReadComplete; - + DPRINT("Call Driver\n"); Status = IoCallDriver(DeviceObject, Irp); DPRINT("Status %x\n", Status); @@ -249,10 +259,10 @@ _MiSimpleWrite DPRINT1("KeWaitForSingleObject(&ReadWait)\n"); if (!NT_SUCCESS (KeWaitForSingleObject - (&ReadWait, - Suspended, - KernelMode, - FALSE, + (&ReadWait, + Suspended, + KernelMode, + FALSE, NULL))) { DPRINT1("Warning: Failed to wait for synchronous IRP\n"); @@ -260,7 +270,7 @@ _MiSimpleWrite return Status; } } - + DPRINT("Paging IO Done: %08x\n", ReadStatus->Status); return ReadStatus->Status; } @@ -286,11 +296,11 @@ _MiWriteBackPage if (!PageBuffer) return STATUS_NO_MEMORY; - OldIrql = KfRaiseIrql(DISPATCH_LEVEL); + KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); Hyperspace = MmCreateHyperspaceMapping(Page); RtlCopyMemory(PageBuffer, Hyperspace, PAGE_SIZE); MmDeleteHyperspaceMapping(Hyperspace); - KfLowerIrql(OldIrql); + KeLowerIrql(OldIrql); DPRINT1("MiWriteBackPage(%wZ,%08x%08x,%s:%d)\n", &FileObject->FileName, FileOffset->u.HighPart, FileOffset->u.LowPart, File, Line); Status = MiSimpleWrite @@ -301,7 +311,7 @@ _MiWriteBackPage &Iosb); ExFreePool(PageBuffer); - + if (!NT_SUCCESS(Status)) { DPRINT1("MiSimpleWrite failed (%x)\n", Status); diff --git a/ntoskrnl/cache/section/newmm.h b/ntoskrnl/cache/section/newmm.h index e1b0511cff9..39e390dda87 100644 --- a/ntoskrnl/cache/section/newmm.h +++ b/ntoskrnl/cache/section/newmm.h @@ -181,7 +181,9 @@ MiSimpleRead PLARGE_INTEGER FileOffset, PVOID Buffer, ULONG Length, +#ifdef __ROS_CMAKE__ BOOLEAN Paging, +#endif PIO_STATUS_BLOCK ReadStatus); NTSTATUS diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c index 7e3d401d488..7162b6ab74e 100644 --- a/ntoskrnl/cc/copy.c +++ b/ntoskrnl/cc/copy.c @@ -255,7 +255,7 @@ WriteCacheSegment(PCACHE_SEGMENT CacheSeg) // MmGlobalPageDirectory and the real system PDE directory. What a mess... // { - int i = 0; + ULONG i = 0; do { MmGetPfnForProcess(NULL, (PVOID)((ULONG_PTR)CacheSeg->BaseAddress + (i << PAGE_SHIFT))); diff --git a/ntoskrnl/config/cmboot.c b/ntoskrnl/config/cmboot.c index 1416c4dfe01..6af7e3c16f6 100644 --- a/ntoskrnl/config/cmboot.c +++ b/ntoskrnl/config/cmboot.c @@ -12,7 +12,11 @@ #include "ntoskrnl.h" #define NDEBUG #include "debug.h" - + +/* GLOBALS ********************************************************************/ + +extern ULONG InitSafeBootMode; + /* FUNCTIONS ******************************************************************/ HCELL_INDEX @@ -383,6 +387,7 @@ CmpFindDrivers(IN PHHIVE Hive, IN PLIST_ENTRY DriverListHead) { HCELL_INDEX ServicesCell, ControlCell, GroupOrderCell, DriverCell; + HCELL_INDEX SafeBootCell = HCELL_NIL; UNICODE_STRING Name; ULONG i; WCHAR Buffer[128]; @@ -416,6 +421,31 @@ CmpFindDrivers(IN PHHIVE Hive, GroupOrderCell = CmpFindSubKeyByName(Hive, Node, &Name); if (GroupOrderCell == HCELL_NIL) return FALSE; + /* Get Safe Boot cell */ + if(InitSafeBootMode) + { + /* Open the Safe Boot key */ + RtlInitUnicodeString(&Name, L"SafeBoot"); + Node = HvGetCell(Hive, ControlCell); + ASSERT(Node); + SafeBootCell = CmpFindSubKeyByName(Hive, Node, &Name); + if (SafeBootCell == HCELL_NIL) return FALSE; + + /* Open the correct start key (depending on the mode) */ + Node = HvGetCell(Hive, SafeBootCell); + ASSERT(Node); + switch(InitSafeBootMode) + { + /* NOTE: Assumes MINIMAL (1) and DSREPAIR (3) load same items */ + case 1: + case 3: RtlInitUnicodeString(&Name, L"Minimal"); break; + case 2: RtlInitUnicodeString(&Name, L"Network"); break; + default: return FALSE; + } + SafeBootCell = CmpFindSubKeyByName(Hive, Node, &Name); + if(SafeBootCell == HCELL_NIL) return FALSE; + } + /* Build the root registry path */ RtlInitEmptyUnicodeString(&KeyPath, Buffer, sizeof(Buffer)); RtlAppendUnicodeToString(&KeyPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"); @@ -425,8 +455,9 @@ CmpFindDrivers(IN PHHIVE Hive, DriverCell = CmpFindSubKeyByNumber(Hive, ServicesNode, i); while (DriverCell != HCELL_NIL) { - /* Make sure it's a driver of this start type */ - if (CmpIsLoadType(Hive, DriverCell, LoadType)) + /* Make sure it's a driver of this start type AND is "safe" to load */ + if (CmpIsLoadType(Hive, DriverCell, LoadType) && + CmpIsSafe(Hive, SafeBootCell, DriverCell)) { /* Add it to the list */ CmpAddDriverToList(Hive, @@ -687,4 +718,106 @@ CmpResolveDriverDependencies(IN PLIST_ENTRY DriverListHead) return TRUE; } +BOOLEAN +NTAPI +INIT_FUNCTION +CmpIsSafe(IN PHHIVE Hive, + IN HCELL_INDEX SafeBootCell, + IN HCELL_INDEX DriverCell) +{ + PCM_KEY_NODE SafeBootNode; + PCM_KEY_NODE DriverNode; + PCM_KEY_VALUE KeyValue; + HCELL_INDEX CellIndex; + ULONG Length = 0; + UNICODE_STRING Name; + PWCHAR OriginalName; + ASSERT(Hive->ReleaseCellRoutine == NULL); + + /* Driver key node (mandatory) */ + ASSERT(DriverCell != HCELL_NIL); + DriverNode = HvGetCell(Hive, DriverCell); + ASSERT(DriverNode); + + /* Safe boot key node (optional but return TRUE if not present) */ + if(SafeBootCell == HCELL_NIL) return TRUE; + SafeBootNode = HvGetCell(Hive, SafeBootCell); + if(!SafeBootNode) return FALSE; + + /* Search by the name from the group */ + RtlInitUnicodeString(&Name, L"Group"); + CellIndex = CmpFindValueByName(Hive, DriverNode, &Name); + if(CellIndex != HCELL_NIL) + { + KeyValue = HvGetCell(Hive, CellIndex); + ASSERT(KeyValue); + if (KeyValue->Type == REG_SZ || KeyValue->Type == REG_EXPAND_SZ) + { + /* Compose the search 'key' */ + Name.Buffer = (PWCHAR)CmpValueToData(Hive, KeyValue, &Length); + if (!Name.Buffer) return FALSE; + Name.Length = Length - sizeof(UNICODE_NULL); + Name.MaximumLength = Name.Length; + /* Search for corresponding key in the Safe Boot key */ + CellIndex = CmpFindSubKeyByName(Hive, SafeBootNode, &Name); + if(CellIndex != HCELL_NIL) return TRUE; + } + } + + /* Group has not been found - find driver name */ + Name.Length = DriverNode->Flags & KEY_COMP_NAME ? + CmpCompressedNameSize(DriverNode->Name, + DriverNode->NameLength) : + DriverNode->NameLength; + Name.MaximumLength = Name.Length; + /* Now allocate the buffer for it and copy the name */ + Name.Buffer = CmpAllocate(Name.Length, FALSE, TAG_CM); + if (!Name.Buffer) return FALSE; + if (DriverNode->Flags & KEY_COMP_NAME) + { + /* Compressed name */ + CmpCopyCompressedName(Name.Buffer, + Name.Length, + DriverNode->Name, + DriverNode->NameLength); + } + else + { + /* Normal name */ + RtlCopyMemory(Name.Buffer, DriverNode->Name, DriverNode->NameLength); + } + CellIndex = CmpFindSubKeyByName(Hive, SafeBootNode, &Name); + RtlFreeUnicodeString(&Name); + if(CellIndex != HCELL_NIL) return TRUE; + + /* Not group or driver name - search by image name */ + RtlInitUnicodeString(&Name, L"ImagePath"); + CellIndex = CmpFindValueByName(Hive, DriverNode, &Name); + if(CellIndex != HCELL_NIL) + { + KeyValue = HvGetCell(Hive, CellIndex); + ASSERT(KeyValue); + if (KeyValue->Type == REG_SZ || KeyValue->Type == REG_EXPAND_SZ) + { + /* Compose the search 'key' */ + OriginalName = (PWCHAR)CmpValueToData(Hive, KeyValue, &Length); + if (!OriginalName) return FALSE; + /* Get the base image file name */ + Name.Buffer = wcsrchr(OriginalName, L'\\'); + if (!Name.Buffer) return FALSE; + ++Name.Buffer; + /* Length of the base name must be >=1 */ + Name.Length = Length - ((PUCHAR)Name.Buffer - (PUCHAR)OriginalName) + - sizeof(UNICODE_NULL); + if(Name.Length < 1) return FALSE; + Name.MaximumLength = Name.Length; + /* Search for corresponding key in the Safe Boot key */ + CellIndex = CmpFindSubKeyByName(Hive, SafeBootNode, &Name); + if(CellIndex != HCELL_NIL) return TRUE; + } + } + /* Nothing found - nothing else to search */ + return FALSE; +} + /* EOF */ diff --git a/ntoskrnl/config/cmindex.c b/ntoskrnl/config/cmindex.c index 6cc3b75f195..ace3b54e79a 100644 --- a/ntoskrnl/config/cmindex.c +++ b/ntoskrnl/config/cmindex.c @@ -1166,7 +1166,7 @@ CmpSplitLeaf(IN PHHIVE Hive, PCM_KEY_INDEX IndexKey, LeafKey, NewKey; PCM_KEY_FAST_INDEX FastLeaf; HCELL_INDEX LeafCell, NewCell; - ULONG FirstHalf, LastHalf; + USHORT FirstHalf, LastHalf; ULONG EntrySize, TotalSize; /* Get the cell */ @@ -1290,7 +1290,7 @@ CmpSplitLeaf(IN PHHIVE Hive, } /* Shift the data inside the root key */ - if (RootSelect < (IndexKey->Count - 1)) + if ((RootSelect + 1) < IndexKey->Count) { RtlMoveMemory(&IndexKey->List[RootSelect + 2], &IndexKey->List[RootSelect + 1], @@ -1425,7 +1425,7 @@ CmpSelectLeaf(IN PHHIVE Hive, } /* No, it doesn't fit, check the next adjacent leaf */ - if (SubKeyIndex < (IndexKey->Count - 1)) + if ((SubKeyIndex + 1) < IndexKey->Count) { /* Yes, there is space */ LeafCell = IndexKey->List[SubKeyIndex + 1]; diff --git a/ntoskrnl/config/cmsysini.c b/ntoskrnl/config/cmsysini.c index 164b45fa668..8159383ecbf 100644 --- a/ntoskrnl/config/cmsysini.c +++ b/ntoskrnl/config/cmsysini.c @@ -1938,4 +1938,154 @@ CmShutdownSystem(VOID) CmpDoFlushAll(TRUE); } +VOID +NTAPI +CmpSetVersionData(VOID) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING KeyName; + UNICODE_STRING ValueName; + UNICODE_STRING ValueData; + HANDLE SoftwareKeyHandle = NULL; + HANDLE MicrosoftKeyHandle = NULL; + HANDLE WindowsNtKeyHandle = NULL; + HANDLE CurrentVersionKeyHandle = NULL; + WCHAR Buffer[128]; + NTSTATUS Status; + + /* Open the 'CurrentVersion' key */ + RtlInitUnicodeString(&KeyName, + L"\\REGISTRY\\MACHINE\\SOFTWARE"); + + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + Status = NtCreateKey(&SoftwareKeyHandle, + KEY_CREATE_SUB_KEY, + &ObjectAttributes, + 0, + NULL, + 0, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create key %wZ (Status: %08lx)\n", &KeyName, Status); + return; + } + + /* Open the 'CurrentVersion' key */ + RtlInitUnicodeString(&KeyName, + L"Microsoft"); + + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_CASE_INSENSITIVE, + SoftwareKeyHandle, + NULL); + + Status = NtCreateKey(&MicrosoftKeyHandle, + KEY_CREATE_SUB_KEY, + &ObjectAttributes, + 0, + NULL, + 0, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create key %wZ (Status: %08lx)\n", &KeyName, Status); + goto done; + } + + /* Open the 'CurrentVersion' key */ + RtlInitUnicodeString(&KeyName, + L"Windows NT"); + + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_CASE_INSENSITIVE, + MicrosoftKeyHandle, + NULL); + + Status = NtCreateKey(&WindowsNtKeyHandle, + KEY_CREATE_SUB_KEY, + &ObjectAttributes, + 0, + NULL, + 0, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create key %wZ (Status: %08lx)\n", &KeyName, Status); + goto done; + } + + /* Open the 'CurrentVersion' key */ + RtlInitUnicodeString(&KeyName, + L"CurrentVersion"); + + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_CASE_INSENSITIVE, + WindowsNtKeyHandle, + NULL); + + Status = NtCreateKey(&CurrentVersionKeyHandle, + KEY_CREATE_SUB_KEY | KEY_SET_VALUE, + &ObjectAttributes, + 0, + NULL, + 0, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create key %wZ (Status: %08lx)\n", &KeyName, Status); + goto done; + } + + /* Set the 'CurrentType' value */ + RtlInitUnicodeString(&ValueName, + L"CurrentType"); + +#ifdef CONFIG_SMP + wcscpy(Buffer, L"Multiprocessor"); +#else + wcscpy(Buffer, L"Uniprocessor"); +#endif + + wcscat(Buffer, L" "); + +#if (DBG == 1) + wcscat(Buffer, L"Checked"); +#else + wcscat(Buffer, L"Free"); +#endif + + RtlInitUnicodeString(&ValueData, + Buffer); + + NtSetValueKey(CurrentVersionKeyHandle, + &ValueName, + 0, + REG_SZ, + ValueData.Buffer, + ValueData.Length + sizeof(WCHAR)); + +done:; + /* Close the keys */ + if (CurrentVersionKeyHandle != NULL) + NtClose(CurrentVersionKeyHandle); + + if (WindowsNtKeyHandle != NULL) + NtClose(WindowsNtKeyHandle); + + if (MicrosoftKeyHandle != NULL) + NtClose(MicrosoftKeyHandle); + + if (SoftwareKeyHandle != NULL) + NtClose(SoftwareKeyHandle); +} + /* EOF */ diff --git a/ntoskrnl/config/ntapi.c b/ntoskrnl/config/ntapi.c index 0e76f7cd743..95f61166ddc 100644 --- a/ntoskrnl/config/ntapi.c +++ b/ntoskrnl/config/ntapi.c @@ -937,8 +937,8 @@ NtInitializeRegistry(IN USHORT Flag) /* Initialize the hives and lazy flusher */ CmpCmdInit(SetupBoot); - /* FIXME: Save version data */ - //CmpSetVersionData(); + /* Save version data */ + CmpSetVersionData(); /* Release the registry lock */ //CmpUnlockRegistry(); diff --git a/ntoskrnl/ex/atom.c b/ntoskrnl/ex/atom.c index e2b6d784792..29e6a3dd954 100644 --- a/ntoskrnl/ex/atom.c +++ b/ntoskrnl/ex/atom.c @@ -172,7 +172,8 @@ NtAddAtom(IN PWSTR AtomName, } /* If we captured anything, free it */ - if ((CapturedName) && (CapturedName != AtomName)) ExFreePool(CapturedName); + if ((CapturedName) && (CapturedName != AtomName)) + ExFreePoolWithTag(CapturedName, TAG_ATOM); /* Return to caller */ return Status; @@ -321,7 +322,8 @@ NtFindAtom(IN PWSTR AtomName, } /* If we captured anything, free it */ - if ((CapturedName) && (CapturedName != AtomName)) ExFreePool(CapturedName); + if ((CapturedName) && (CapturedName != AtomName)) + ExFreePoolWithTag(CapturedName, TAG_ATOM); /* Return to caller */ return Status; diff --git a/ntoskrnl/ex/callback.c b/ntoskrnl/ex/callback.c index 202e2944e3e..15a30aecfdf 100644 --- a/ntoskrnl/ex/callback.c +++ b/ntoskrnl/ex/callback.c @@ -77,7 +77,7 @@ NTAPI ExFreeCallBack(IN PEX_CALLBACK_ROUTINE_BLOCK CallbackBlock) { /* Just free it from memory */ - ExFreePool(CallbackBlock); + ExFreePoolWithTag(CallbackBlock, CALLBACK_TAG); } VOID @@ -602,7 +602,7 @@ ExRegisterCallback(IN PCALLBACK_OBJECT CallbackObject, KeReleaseSpinLock(&CallbackObject->Lock, OldIrql); /* Free the registration */ - ExFreePool(CallbackRegistration); + ExFreePoolWithTag(CallbackRegistration, CALLBACK_TAG); CallbackRegistration = NULL; /* Dereference the object */ @@ -676,7 +676,7 @@ ExUnregisterCallback(IN PVOID CallbackRegistrationHandle) KeReleaseSpinLock(&CallbackObject->Lock, OldIrql); /* Delete this registration */ - ExFreePool(CallbackRegistration); + ExFreePoolWithTag(CallbackRegistration, CALLBACK_TAG); /* Remove the reference */ ObDereferenceObject(CallbackObject); diff --git a/ntoskrnl/ex/handle.c b/ntoskrnl/ex/handle.c index 755bc5d59b2..1fe2bb12846 100644 --- a/ntoskrnl/ex/handle.c +++ b/ntoskrnl/ex/handle.c @@ -132,7 +132,7 @@ ExpAllocateTablePagedPool(IN PEPROCESS Process OPTIONAL, PVOID Buffer; /* Do the allocation */ - Buffer = ExAllocatePoolWithTag(PagedPool, Size, 'btbO'); + Buffer = ExAllocatePoolWithTag(PagedPool, Size, TAG_OBJECT_TABLE); if (Buffer) { /* Clear the memory */ @@ -157,7 +157,7 @@ ExpAllocateTablePagedPoolNoZero(IN PEPROCESS Process OPTIONAL, PVOID Buffer; /* Do the allocation */ - Buffer = ExAllocatePoolWithTag(PagedPool, Size, 'btbO'); + Buffer = ExAllocatePoolWithTag(PagedPool, Size, TAG_OBJECT_TABLE); if (Buffer) { /* Check if we have a process to charge quota */ @@ -178,7 +178,7 @@ ExpFreeTablePagedPool(IN PEPROCESS Process OPTIONAL, IN SIZE_T Size) { /* Free the buffer */ - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_OBJECT_TABLE); if (Process) { /* FIXME: Release quota */ @@ -273,7 +273,7 @@ ExpFreeHandleTable(IN PHANDLE_TABLE HandleTable) } /* Free the actual table and check if we need to release quota */ - ExFreePool(HandleTable); + ExFreePoolWithTag(HandleTable, TAG_OBJECT_TABLE); if (Process) { /* FIXME: TODO */ @@ -345,7 +345,7 @@ ExpAllocateHandleTable(IN PEPROCESS Process OPTIONAL, /* Allocate the table */ HandleTable = ExAllocatePoolWithTag(PagedPool, sizeof(HANDLE_TABLE), - 'btbO'); + TAG_OBJECT_TABLE); if (!HandleTable) return NULL; /* Check if we have a process */ @@ -362,7 +362,7 @@ ExpAllocateHandleTable(IN PEPROCESS Process OPTIONAL, if (!HandleTableTable) { /* Failed, free the table */ - ExFreePool(HandleTable); + ExFreePoolWithTag(HandleTable, TAG_OBJECT_TABLE); return NULL; } diff --git a/ntoskrnl/ex/harderr.c b/ntoskrnl/ex/harderr.c index 2b4aeed3274..c1035da6960 100644 --- a/ntoskrnl/ex/harderr.c +++ b/ntoskrnl/ex/harderr.c @@ -640,7 +640,7 @@ NtRaiseHardError(IN NTSTATUS ErrorStatus, _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Free captured buffer */ - if (SafeParams) ExFreePool(SafeParams); + if (SafeParams) ExFreePoolWithTag(SafeParams, TAG_ERR); /* Return the exception code */ _SEH2_YIELD(return _SEH2_GetExceptionCode()); @@ -676,7 +676,7 @@ NtRaiseHardError(IN NTSTATUS ErrorStatus, if (PreviousMode != KernelMode) { /* That means we have a buffer to free */ - if (SafeParams) ExFreePool(SafeParams); + if (SafeParams) ExFreePoolWithTag(SafeParams, TAG_ERR); /* Enter SEH Block for return */ _SEH2_TRY diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c index 302d1fff48a..ab2283d58aa 100644 --- a/ntoskrnl/ex/init.c +++ b/ntoskrnl/ex/init.c @@ -244,7 +244,7 @@ ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Allocate the a new buffer since loader memory will be freed */ ExpNlsTableBase = ExAllocatePoolWithTag(NonPagedPool, ExpNlsTableSize, - 'iltR'); + TAG_RTLI); if (!ExpNlsTableBase) KeBugCheck(PHASE0_INITIALIZATION_FAILED); /* Copy the codepage data in its new location. */ @@ -334,7 +334,7 @@ ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock) RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); /* Free the previously allocated buffer and set the new location */ - ExFreePoolWithTag(ExpNlsTableBase, 'iltR'); + ExFreePoolWithTag(ExpNlsTableBase, TAG_RTLI); ExpNlsTableBase = SectionBase; /* Initialize the NLS Tables */ @@ -1313,7 +1313,7 @@ Phase1InitializationDiscard(IN PVOID Context) size_t Remaining; PRTL_USER_PROCESS_INFORMATION ProcessInfo; KEY_VALUE_PARTIAL_INFORMATION KeyPartialInfo; - UNICODE_STRING KeyName, DebugString; + UNICODE_STRING KeyName; OBJECT_ATTRIBUTES ObjectAttributes; HANDLE KeyHandle, OptionHandle; PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL; @@ -1321,7 +1321,7 @@ Phase1InitializationDiscard(IN PVOID Context) /* Allocate the initialization buffer */ InitBuffer = ExAllocatePoolWithTag(NonPagedPool, sizeof(INIT_BUFFER), - 'tinI'); + TAG_INIT); if (!InitBuffer) { /* Bugcheck */ @@ -1792,7 +1792,10 @@ Phase1InitializationDiscard(IN PVOID Context) &KeyPartialInfo, sizeof(KeyPartialInfo), &Length); - if (!NT_SUCCESS(Status)) AlternateShell = FALSE; + if (!(NT_SUCCESS(Status) || Status == STATUS_BUFFER_OVERFLOW)) + { + AlternateShell = FALSE; + } } /* Create the option key */ @@ -1901,39 +1904,37 @@ Phase1InitializationDiscard(IN PVOID Context) /* Initialize Power Subsystem in Phase 1*/ if (!PoInitSystem(1)) KeBugCheck(INTERNAL_POWER_ERROR); + /* Update progress bar */ + InbvUpdateProgressBar(90); + /* Initialize the Process Manager at Phase 1 */ if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS1_INITIALIZATION_FAILED); - /* Update progress bar */ - InbvUpdateProgressBar(85); - /* Make sure nobody touches the loader block again */ if (LoaderBlock == KeLoaderBlock) KeLoaderBlock = NULL; LoaderBlock = Context = NULL; /* Update progress bar */ - InbvUpdateProgressBar(90); + InbvUpdateProgressBar(100); + + /* Clean the screen */ + if (InbvBootDriverInstalled) FinalizeBootLogo(); + + /* Allow strings to be displayed */ + InbvEnableDisplayString(TRUE); /* Launch initial process */ DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); ProcessInfo = &InitBuffer->ProcessInfo; ExpLoadInitialProcess(InitBuffer, &ProcessParameters, &Environment); - /* Update progress bar */ - InbvUpdateProgressBar(100); - - /* Allow strings to be displayed */ - InbvEnableDisplayString(TRUE); - - /* Wait 5 seconds for it to initialize */ + /* Wait 5 seconds for initial process to initialize */ Timeout.QuadPart = Int32x32To64(5, -10000000); Status = ZwWaitForSingleObject(ProcessInfo->ProcessHandle, FALSE, &Timeout); - if (InbvBootDriverInstalled) FinalizeBootLogo(); if (Status == STATUS_SUCCESS) { /* Failed, display error */ - RtlInitUnicodeString(&DebugString, L"INIT: Session Manager terminated."); - ZwDisplayString(&DebugString); + DPRINT1("INIT: Session Manager terminated.\n"); /* Bugcheck the system if SMSS couldn't initialize */ KeBugCheck(SESSION5_INITIALIZATION_FAILED); @@ -1961,7 +1962,7 @@ Phase1InitializationDiscard(IN PVOID Context) ExpInitializationPhase++; /* Free the boot buffer */ - ExFreePool(InitBuffer); + ExFreePoolWithTag(InitBuffer, TAG_INIT); DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); } diff --git a/ntoskrnl/ex/profile.c b/ntoskrnl/ex/profile.c index f931edfb9b5..adf8221efe6 100644 --- a/ntoskrnl/ex/profile.c +++ b/ntoskrnl/ex/profile.c @@ -54,7 +54,7 @@ ExpDeleteProfile(PVOID ObjectBody) /* Unmap the Locked Buffer */ MmUnmapLockedPages(Profile->LockedBufferAddress, Profile->Mdl); MmUnlockPages(Profile->Mdl); - ExFreePool(Profile->Mdl); + IoFreeMdl(Profile->Mdl); } /* Check if a Process is associated and reference it */ @@ -368,7 +368,7 @@ NtStartProfile(IN HANDLE ProfileHandle) } /* Allocate the Mdl Structure */ - Profile->Mdl = MmCreateMdl(NULL, Profile->Buffer, Profile->BufferSize); + Profile->Mdl = IoAllocateMdl(Profile->Buffer, Profile->BufferSize, FALSE, FALSE, NULL); /* Protect this in SEH as we might raise an exception */ _SEH2_TRY @@ -381,7 +381,7 @@ NtStartProfile(IN HANDLE ProfileHandle) /* Release our lock, free the buffer, dereference and return */ KeReleaseMutex(&ExpProfileMutex, FALSE); ObDereferenceObject(Profile); - ExFreePool(ProfileObject); + ExFreePoolWithTag(ProfileObject, TAG_PROFILE); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -449,7 +449,7 @@ NtStopProfile(IN HANDLE ProfileHandle) /* Unlock the Buffer */ MmUnmapLockedPages(Profile->LockedBufferAddress, Profile->Mdl); MmUnlockPages(Profile->Mdl); - ExFreePool(Profile->ProfileObject); + ExFreePoolWithTag(Profile->ProfileObject, TAG_PROFILE); /* Clear the Locked Buffer pointer, meaning the Object is Stopped */ Profile->LockedBufferAddress = NULL; diff --git a/ntoskrnl/ex/resource.c b/ntoskrnl/ex/resource.c index 1ea2ec0d7b4..cf179ffca0c 100644 --- a/ntoskrnl/ex/resource.c +++ b/ntoskrnl/ex/resource.c @@ -13,8 +13,8 @@ #include /* Macros for reading resource flags */ -#define IsExclusiveWaiting(r) (r->NumberOfExclusiveWaiters) -#define IsSharedWaiting(r) (r->NumberOfSharedWaiters) +#define IsExclusiveWaiting(r) (r->NumberOfExclusiveWaiters > 0) +#define IsSharedWaiting(r) (r->NumberOfSharedWaiters > 0) #define IsOwnedExclusive(r) (r->Flag & ResourceOwnedExclusive) #define IsBoostAllowed(r) (!(r->Flag & ResourceHasDisabledPriorityBoost)) @@ -220,7 +220,7 @@ ExpAllocateExclusiveWaiterEvent(IN PERESOURCE Resource, { /* Someone already set it, free our event */ DPRINT1("WARNING: Handling race condition\n"); - ExFreePool(Event); + ExFreePoolWithTag(Event, TAG_RESOURCE_EVENT); } break; @@ -280,7 +280,7 @@ ExpAllocateSharedWaiterSemaphore(IN PERESOURCE Resource, { /* Someone already set it, free our semaphore */ DPRINT1("WARNING: Handling race condition\n"); - ExFreePool(Semaphore); + ExFreePoolWithTag(Semaphore, TAG_RESOURCE_SEMAPHORE); } break; @@ -356,7 +356,7 @@ ExpExpandResourceOwnerTable(IN PERESOURCE Resource, { /* Resource changed while we weren't holding the lock; bail out */ ExReleaseResourceLock(Resource, LockHandle); - ExFreePool(Table); + ExFreePoolWithTag(Table, TAG_RESOURCE_TABLE); } else { @@ -380,7 +380,7 @@ ExpExpandResourceOwnerTable(IN PERESOURCE Resource, ExReleaseResourceLock(Resource, LockHandle); /* Free the old table */ - if (Owner) ExFreePool(Owner); + if (Owner) ExFreePoolWithTag(Owner, TAG_RESOURCE_TABLE); /* Set the resource index */ if (!OldSize) OldSize = 1; @@ -1473,9 +1473,9 @@ ExDeleteResourceLite(IN PERESOURCE Resource) KeReleaseInStackQueuedSpinLock(&LockHandle); /* Free every structure */ - if (Resource->OwnerTable) ExFreePool(Resource->OwnerTable); - if (Resource->SharedWaiters) ExFreePool(Resource->SharedWaiters); - if (Resource->ExclusiveWaiters) ExFreePool(Resource->ExclusiveWaiters); + if (Resource->OwnerTable) ExFreePoolWithTag(Resource->OwnerTable, TAG_RESOURCE_TABLE); + if (Resource->SharedWaiters) ExFreePoolWithTag(Resource->SharedWaiters, TAG_RESOURCE_SEMAPHORE); + if (Resource->ExclusiveWaiters) ExFreePoolWithTag(Resource->ExclusiveWaiters, TAG_RESOURCE_EVENT); /* Return success */ return STATUS_SUCCESS; diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c index 483c92057ea..ca006177891 100644 --- a/ntoskrnl/ex/sysinfo.c +++ b/ntoskrnl/ex/sysinfo.c @@ -1465,8 +1465,9 @@ QSI_DEF(SystemExceptionInformation) PSYSTEM_EXCEPTION_INFORMATION ExceptionInformation = (PSYSTEM_EXCEPTION_INFORMATION)Buffer; PKPRCB Prcb; - ULONG i, AlignmentFixupCount = 0, ExceptionDispatchCount = 0; + ULONG AlignmentFixupCount = 0, ExceptionDispatchCount = 0; ULONG FloatingEmulationCount = 0, ByteWordEmulationCount = 0; + CHAR i; /* Check size of a buffer, it must match our expectations */ if (sizeof(SYSTEM_EXCEPTION_INFORMATION) != Size) @@ -1523,8 +1524,9 @@ QSI_DEF(SystemContextSwitchInformation) { PSYSTEM_CONTEXT_SWITCH_INFORMATION ContextSwitchInformation = (PSYSTEM_CONTEXT_SWITCH_INFORMATION)Buffer; - ULONG ContextSwitches, i; + ULONG ContextSwitches; PKPRCB Prcb; + CHAR i; /* Check size of a buffer, it must match our expectations */ if (sizeof(SYSTEM_CONTEXT_SWITCH_INFORMATION) != Size) diff --git a/ntoskrnl/fstub/disksup.c b/ntoskrnl/fstub/disksup.c index c4a67c3413f..05cc18f79bc 100644 --- a/ntoskrnl/fstub/disksup.c +++ b/ntoskrnl/fstub/disksup.c @@ -159,7 +159,7 @@ xHalpGetRDiskCount(VOID) BOOLEAN First = TRUE; ULONG Count; - DirectoryInfo = ExAllocatePool(PagedPool, 2 * PAGE_SIZE); + DirectoryInfo = ExAllocatePoolWithTag(PagedPool, 2 * PAGE_SIZE, TAG_FILE_SYSTEM); if (DirectoryInfo == NULL) { return 0; @@ -178,7 +178,7 @@ xHalpGetRDiskCount(VOID) if (!NT_SUCCESS(Status)) { DPRINT1("ZwOpenDirectoryObject for %wZ failed, status=%lx\n", &ArcName, Status); - ExFreePool(DirectoryInfo); + ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM); return 0; } @@ -223,7 +223,7 @@ xHalpGetRDiskCount(VOID) } } } - ExFreePool(DirectoryInfo); + ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM); return RDiskCount; } @@ -377,8 +377,8 @@ xHalQueryDriveLayout(IN PUNICODE_STRING DeviceName, PDRIVE_LAYOUT_INFORMATION Buffer; /* Allocate a partition list for a single entry. */ - Buffer = ExAllocatePool(NonPagedPool, - sizeof(DRIVE_LAYOUT_INFORMATION)); + Buffer = ExAllocatePoolWithTag(NonPagedPool, + sizeof(DRIVE_LAYOUT_INFORMATION), TAG_FILE_SYSTEM); if (Buffer != NULL) { RtlZeroMemory(Buffer, @@ -446,13 +446,13 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, DPRINT("RDiskCount %d\n", RDiskCount); - Buffer1 = (PWSTR)ExAllocatePool(PagedPool, - 64 * sizeof(WCHAR)); - Buffer2 = (PWSTR)ExAllocatePool(PagedPool, - 32 * sizeof(WCHAR)); + Buffer1 = (PWSTR)ExAllocatePoolWithTag(PagedPool, + 64 * sizeof(WCHAR), TAG_FILE_SYSTEM); + Buffer2 = (PWSTR)ExAllocatePoolWithTag(PagedPool, + 32 * sizeof(WCHAR), TAG_FILE_SYSTEM); - PartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION)ExAllocatePool(PagedPool, - sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(REG_DISK_MOUNT_INFO)); + PartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION)ExAllocatePoolWithTag(PagedPool, + sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(REG_DISK_MOUNT_INFO), TAG_FILE_SYSTEM); if (!Buffer1 || !Buffer2 || !PartialInformation) return; @@ -528,13 +528,13 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, /* Initialize layout array */ if (ConfigInfo->DiskCount == 0) goto end_assign_disks; - LayoutArray = ExAllocatePool(NonPagedPool, - ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION)); + LayoutArray = ExAllocatePoolWithTag(NonPagedPool, + ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION), TAG_FILE_SYSTEM); if (!LayoutArray) { - ExFreePool(PartialInformation); - ExFreePool(Buffer2); - ExFreePool(Buffer1); + ExFreePoolWithTag(PartialInformation, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer2, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer1, TAG_FILE_SYSTEM); if (hKey) ZwClose(hKey); } @@ -896,9 +896,9 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, for (i = 0; i < ConfigInfo->DiskCount; i++) { if (LayoutArray[i] != NULL) - ExFreePool(LayoutArray[i]); + ExFreePoolWithTag(LayoutArray[i], TAG_FILE_SYSTEM); } - ExFreePool(LayoutArray); + ExFreePoolWithTag(LayoutArray, TAG_FILE_SYSTEM); end_assign_disks: /* Assign floppy drives */ @@ -948,9 +948,9 @@ end_assign_disks: /* Anything else to do? */ - ExFreePool(PartialInformation); - ExFreePool(Buffer2); - ExFreePool(Buffer1); + ExFreePoolWithTag(PartialInformation, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer2, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer1, TAG_FILE_SYSTEM); if (hKey) { ZwClose(hKey); @@ -1249,8 +1249,8 @@ xHalGetPartialGeometry(IN PDEVICE_OBJECT DeviceObject, Cleanup: /* Free all the pointers */ if (Event) ExFreePoolWithTag(Event, TAG_FILE_SYSTEM); - if (IoStatusBlock) ExFreePool(IoStatusBlock); - if (DiskGeometry) ExFreePool(DiskGeometry); + if (IoStatusBlock) ExFreePoolWithTag(IoStatusBlock, TAG_FILE_SYSTEM); + if (DiskGeometry) ExFreePoolWithTag(DiskGeometry, TAG_FILE_SYSTEM); return; } @@ -1425,7 +1425,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, { /* EZ Drive found, bias the offset */ IsEzDrive = TRUE; - ExFreePool(MbrBuffer); + ExFreePoolWithTag(MbrBuffer, TAG_FILE_SYSTEM); Offset.QuadPart = 512; } @@ -1843,7 +1843,7 @@ xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, { /* EZ Drive found, bias the offset */ IsEzDrive = TRUE; - ExFreePool(MbrBuffer); + ExFreePoolWithTag(MbrBuffer, TAG_FILE_SYSTEM); Offset.QuadPart = 512; } @@ -1995,7 +1995,7 @@ xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, } while (i < PartitionNumber); /* Everything done, cleanup */ - if (Buffer) ExFreePool(Buffer); + if (Buffer) ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM); return Status; } @@ -2043,7 +2043,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, { /* EZ Drive found, bias the offset */ IsEzDrive = TRUE; - ExFreePool(MbrBuffer); + ExFreePoolWithTag(MbrBuffer, TAG_FILE_SYSTEM); Offset.QuadPart = 512; } diff --git a/ntoskrnl/fstub/fstubex.c b/ntoskrnl/fstub/fstubex.c index 5f99ce82995..6035ed8fd32 100644 --- a/ntoskrnl/fstub/fstubex.c +++ b/ntoskrnl/fstub/fstubex.c @@ -893,7 +893,7 @@ FstubReadHeaderEFI(IN PDISK_INFORMATION Disk, /* Allocate a buffer to read a sector on the disk */ Sector = ExAllocatePoolWithTag(NonPagedPool, Disk->SectorSize, - 'BtsF'); + TAG_FSTUB); if (!Sector) { DPRINT("EFI::Lacking resources!\n"); @@ -911,7 +911,7 @@ FstubReadHeaderEFI(IN PDISK_INFORMATION Disk, (PUSHORT)Sector); if (!NT_SUCCESS(Status)) { - ExFreePoolWithTag(Sector, 'BtsF'); + ExFreePoolWithTag(Sector, TAG_FSTUB); DPRINT("EFI::Failed reading sector for partition entry!\n"); return Status; } @@ -931,7 +931,7 @@ FstubReadHeaderEFI(IN PDISK_INFORMATION Disk, (PUSHORT)Sector); if (!NT_SUCCESS(Status)) { - ExFreePoolWithTag(Sector, 'BtsF'); + ExFreePoolWithTag(Sector, TAG_FSTUB); DPRINT("EFI::Failed reading sector for partition entry!\n"); return Status; } @@ -944,7 +944,7 @@ FstubReadHeaderEFI(IN PDISK_INFORMATION Disk, } /* Finally, release memory */ - ExFreePoolWithTag(Sector, 'BtsF'); + ExFreePoolWithTag(Sector, TAG_FSTUB); /* Compare checksums */ if (PreviousCRC32 == EFIHeader->PartitionEntryCRC32) diff --git a/ntoskrnl/fstub/translate.c b/ntoskrnl/fstub/translate.c index 839e6f01488..3fa15e0c091 100644 --- a/ntoskrnl/fstub/translate.c +++ b/ntoskrnl/fstub/translate.c @@ -40,10 +40,9 @@ FstubTranslateResource(IN OUT PVOID Context OPTIONAL, IN PDEVICE_OBJECT PhysicalDeviceObject, OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target) { - INT k; KIRQL Irql; KAFFINITY Affinity; - ULONG MinimumVector, Vector; + ULONG MinimumVector, Vector, k; PIO_RESOURCE_DESCRIPTOR Alternative; NTSTATUS Status = STATUS_UNSUCCESSFUL; PAGED_CODE(); diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c index 98aff194e3f..dc5f2419516 100644 --- a/ntoskrnl/inbv/inbv.c +++ b/ntoskrnl/inbv/inbv.c @@ -10,16 +10,16 @@ KSPIN_LOCK BootDriverLock; KIRQL InbvOldIrql; INBV_DISPLAY_STATE InbvDisplayState; -BOOLEAN InbvBootDriverInstalled; -BOOLEAN InbvDisplayDebugStrings; +BOOLEAN InbvBootDriverInstalled = FALSE; +BOOLEAN InbvDisplayDebugStrings = FALSE; INBV_DISPLAY_STRING_FILTER InbvDisplayFilter; ULONG ProgressBarLeft, ProgressBarTop; -BOOLEAN ShowProgressBar; +BOOLEAN ShowProgressBar = FALSE; INBV_PROGRESS_STATE InbvProgressState; INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters; ULONG ResourceCount; PUCHAR ResourceList[64]; -BOOLEAN SysThreadCreated; +BOOLEAN SysThreadCreated = FALSE; ROT_BAR_TYPE RotBarSelection; ULONG PltRotBarStatus; BT_PROGRESS_INDICATOR InbvProgressIndicator = {0, 25, 0}; @@ -576,7 +576,7 @@ NtDisplayString(IN PUNICODE_STRING DisplayString) VOID NTAPI INIT_FUNCTION -DisplayBootBitmap(IN BOOLEAN SosMode) +DisplayBootBitmap(IN BOOLEAN TextMode) { PVOID Header, Band, Text, Screen; ROT_BAR_TYPE TempRotBarSelection = RB_UNSPECIFIED; @@ -591,9 +591,9 @@ DisplayBootBitmap(IN BOOLEAN SosMode) InbvReleaseLock(); } - /* Check if this is SOS mode */ + /* Check if this is text mode */ ShowProgressBar = FALSE; - if (SosMode) + if (TextMode) { /* Check if this is a server OS */ if (SharedUserData->NtProductType == NtProductWinNt) @@ -696,6 +696,9 @@ DisplayBootBitmap(IN BOOLEAN SosMode) /* Draw the progress bar bit */ // if (Bar) InbvBitBlt(Bar, 0, 0); + + /* Set filter which will draw text display if needed */ + InbvInstallDisplayStringFilter(DisplayFilter); } /* Do we have a system thread? */ @@ -709,6 +712,30 @@ DisplayBootBitmap(IN BOOLEAN SosMode) } } +VOID +NTAPI +INIT_FUNCTION +DisplayFilter(PCHAR *String) +{ + /* Windows hack to skip first dots */ + static BOOLEAN DotHack = TRUE; + + /* If "." is given set *String to empty string */ + if(DotHack && strcmp(*String, ".") == 0) + *String = ""; + + if(**String) + { + /* Remove the filter */ + InbvInstallDisplayStringFilter(NULL); + + DotHack = FALSE; + + /* Draw text screen */ + DisplayBootBitmap(TRUE); + } +} + VOID NTAPI INIT_FUNCTION diff --git a/ntoskrnl/include/internal/amd64/intrin_i.h b/ntoskrnl/include/internal/amd64/intrin_i.h index d3dca40eaf2..bbfaff7e251 100644 --- a/ntoskrnl/include/internal/amd64/intrin_i.h +++ b/ntoskrnl/include/internal/amd64/intrin_i.h @@ -104,8 +104,6 @@ static __inline__ __attribute__((always_inline)) void __str(unsigned short *Dest #elif defined(_MSC_VER) -#define UNIMPLEMENTED DbgPrint("%s is unimplemented!!!\n", __FUNCTION__); - void __lgdt(void *Source); void __sgdt(void *Destination); diff --git a/ntoskrnl/include/internal/amd64/mm.h b/ntoskrnl/include/internal/amd64/mm.h index 38380cfd90e..8c5db54af6f 100644 --- a/ntoskrnl/include/internal/amd64/mm.h +++ b/ntoskrnl/include/internal/amd64/mm.h @@ -142,6 +142,9 @@ MiIsPdeForAddressValid(PVOID Address) (MiAddressToPde(Address)->u.Hard.Valid)); } +#define MiPdeToPte(PDE) ((PMMPTE)MiPteToAddress(PDE)) +#define MiPteToPde(PTE) ((PMMPDE)MiAddressToPte(PTE)) + #define ADDR_TO_PAGE_TABLE(v) (((ULONG_PTR)(v)) / (512 * PAGE_SIZE)) #define ADDR_TO_PDE_OFFSET(v) ((((ULONG_PTR)(v)) / (512 * PAGE_SIZE))) #define ADDR_TO_PTE_OFFSET(v) ((((ULONG_PTR)(v)) % (512 * PAGE_SIZE)) / PAGE_SIZE) diff --git a/ntoskrnl/include/internal/cm.h b/ntoskrnl/include/internal/cm.h index 9a0dd907585..c70e9c064ae 100644 --- a/ntoskrnl/include/internal/cm.h +++ b/ntoskrnl/include/internal/cm.h @@ -1529,6 +1529,12 @@ CmSetLazyFlushState( IN BOOLEAN Enable ); +VOID +NTAPI +CmpSetVersionData( + VOID +); + // // Driver List Routines // @@ -1563,6 +1569,13 @@ CmpResolveDriverDependencies( IN PLIST_ENTRY DriverListHead ); +BOOLEAN +NTAPI +CmpIsSafe( + IN PHHIVE Hive, + IN HCELL_INDEX SafeBootCell, + IN HCELL_INDEX DriverCell); + // // Global variables accessible from all of Cm // diff --git a/ntoskrnl/include/internal/ex.h b/ntoskrnl/include/internal/ex.h index 85a726b0cd8..548dd90a9b5 100644 --- a/ntoskrnl/include/internal/ex.h +++ b/ntoskrnl/include/internal/ex.h @@ -480,7 +480,7 @@ ULONG ExGetCountFastReference(IN EX_FAST_REF FastRef) { /* Return the reference count */ - return FastRef.RefCnt; + return (ULONG)FastRef.RefCnt; } FORCEINLINE diff --git a/ntoskrnl/include/internal/hdl.h b/ntoskrnl/include/internal/hdl.h index c38aa3fe666..d93b520fa3c 100644 --- a/ntoskrnl/include/internal/hdl.h +++ b/ntoskrnl/include/internal/hdl.h @@ -7,6 +7,7 @@ */ #define _HDL_ #include +#include // // Define this if you want debugging support @@ -150,6 +151,38 @@ typedef enum _HEADLESS_CMD HeadlessCmdPutData } HEADLESS_CMD, *PHEADLESS_CMD; +typedef enum _HEADLESS_TERM_PORT_TYPE +{ + HeadlessUndefinedPortType = 0, + HeadlessSerialPort +} HEADLESS_TERM_PORT_TYPE, *PHEADLESS_TERM_PORT_TYPE; + +typedef enum _HEADLESS_TERM_SERIAL_PORT +{ + SerialPortUndefined = 0, + ComPort1, + ComPort2, + ComPort3, + ComPort4 +} HEADLESS_TERM_SERIAL_PORT, *PHEADLESS_TERM_SERIAL_PORT; + +typedef struct _HEADLESS_RSP_QUERY_INFO +{ + HEADLESS_TERM_PORT_TYPE PortType; + union + { + struct + { + BOOLEAN TerminalAttached; + BOOLEAN UsedBiosSettings; + HEADLESS_TERM_SERIAL_PORT TerminalPort; + PUCHAR TerminalPortBaseAddress; + ULONG TerminalBaudRate; + UCHAR TerminalType; + } Serial; + }; +} HEADLESS_RSP_QUERY_INFO, *PHEADLESS_RSP_QUERY_INFO; + typedef struct _HEADLESS_CMD_PUT_STRING { UCHAR String[1]; diff --git a/ntoskrnl/include/internal/i386/asmmacro.S b/ntoskrnl/include/internal/i386/asmmacro.S index 920885be86a..aeb67fcd417 100644 --- a/ntoskrnl/include/internal/i386/asmmacro.S +++ b/ntoskrnl/include/internal/i386/asmmacro.S @@ -329,7 +329,7 @@ PUBLIC @&Name&@4 if (Flags AND KI_RESTORE_EFLAGS) /* Restore EFLAGS */ - popf + popfd endif @@ -343,7 +343,7 @@ PUBLIC @&Name&@4 elseif (Flags AND KI_EXIT_IRET) /* Return with iret */ - iret + iretd elseif (Flags AND KI_EXIT_JMP) diff --git a/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h index 7aa98846ca5..8e701abac7c 100644 --- a/ntoskrnl/include/internal/i386/ke.h +++ b/ntoskrnl/include/internal/i386/ke.h @@ -600,13 +600,6 @@ KiDispatchException2Args(IN NTSTATUS Code, // // Performs a system call // -NTSTATUS -FORCEINLINE -KiSystemCallTrampoline(IN PVOID Handler, - IN PVOID Arguments, - IN ULONG StackBytes) -{ - NTSTATUS Result; /* * This sequence does a RtlCopyMemory(Stack - StackBytes, Arguments, StackBytes) @@ -624,6 +617,14 @@ KiSystemCallTrampoline(IN PVOID Handler, * */ #ifdef __GNUC__ +NTSTATUS +FORCEINLINE +KiSystemCallTrampoline(IN PVOID Handler, + IN PVOID Arguments, + IN ULONG StackBytes) +{ + NTSTATUS Result; + __asm__ __volatile__ ( "subl %1, %%esp\n" @@ -639,25 +640,32 @@ KiSystemCallTrampoline(IN PVOID Handler, "r"(Handler) : "%esp", "%esi", "%edi" ); + return Result; +} #elif defined(_MSC_VER) +NTSTATUS +FORCEINLINE +KiSystemCallTrampoline(IN PVOID Handler, + IN PVOID Arguments, + IN ULONG StackBytes) +{ __asm { mov ecx, StackBytes - mov edx, Arguments + mov esi, Arguments + mov eax, Handler sub esp, ecx mov edi, esp - mov esi, edx shr ecx, 2 rep movsd - call Handler - mov Result, eax + call eax } + /* Return with result in EAX */ +} #else #error Unknown Compiler #endif - return Result; -} // // Checks for pending APCs @@ -699,6 +707,7 @@ KiCheckForApcDelivery(IN PKTRAP_FRAME TrapFrame) // // Converts a base thread to a GUI thread // +#ifdef __GNUC__ NTSTATUS FORCEINLINE KiConvertToGuiThread(VOID) @@ -722,7 +731,6 @@ KiConvertToGuiThread(VOID) * on its merry way. * */ -#ifdef __GNUC__ __asm__ __volatile__ ( "movl %%ebp, %1\n" @@ -735,22 +743,15 @@ KiConvertToGuiThread(VOID) : : "%esp", "%ecx", "%edx", "memory" ); + return Result; +} #elif defined(_MSC_VER) - NTSTATUS NTAPI PsConvertToGuiThread(VOID); - __asm - { - mov StackFrame, ebp - sub StackFrame, esp - call PsConvertToGuiThread - add StackFrame, esp - mov ebp, StackFrame - mov Result, eax - } +NTSTATUS +NTAPI +KiConvertToGuiThread(VOID); #else #error Unknown Compiler #endif - return Result; -} // // Switches from boot loader to initial kernel stack @@ -803,7 +804,7 @@ KiIret(VOID) #elif defined(_MSC_VER) __asm { - iret + iretd } #else #error Unsupported compiler diff --git a/ntoskrnl/include/internal/inbv.h b/ntoskrnl/include/internal/inbv.h index 9d9e737e690..d8446aa2305 100644 --- a/ntoskrnl/include/internal/inbv.h +++ b/ntoskrnl/include/internal/inbv.h @@ -42,7 +42,13 @@ InbvEnableBootDriver( VOID NTAPI DisplayBootBitmap( - IN BOOLEAN SosMode + IN BOOLEAN TextMode +); + +VOID +NTAPI +DisplayFilter( + IN PCHAR *String ); VOID diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h index 8edb68e75be..2649e3ed564 100644 --- a/ntoskrnl/include/internal/io.h +++ b/ntoskrnl/include/internal/io.h @@ -600,6 +600,11 @@ IopFreeDeviceNode( IN PDEVICE_NODE DeviceNode ); +NTSTATUS +NTAPI +IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode, + PDEVICE_CAPABILITIES DeviceCaps); + NTSTATUS NTAPI IopSynchronousCall( @@ -691,6 +696,11 @@ IopCreateRegistryKeyEx( OUT PULONG Disposition OPTIONAL ); + +NTSTATUS +IopTraverseDeviceTree( + PDEVICETREE_TRAVERSE_CONTEXT Context); + // // PnP Routines // @@ -785,6 +795,16 @@ IopStartDevice( IN PDEVICE_NODE DeviceNode ); +NTSTATUS +IopStopDevice( + IN PDEVICE_NODE DeviceNode +); + +NTSTATUS +IopRemoveDevice( + IN PDEVICE_NODE DeviceNode +); + PVPB NTAPI IopCheckVpbMounted( @@ -823,7 +843,7 @@ IopCreateVpb( VOID NTAPI -IopDereferenceVpb( +IopDereferenceVpbAndFree( IN PVPB Vpb ); @@ -854,8 +874,15 @@ IopDereferenceDeviceObject( NTSTATUS NTAPI -IoGetRelatedTargetDevice(IN PFILE_OBJECT FileObject, - OUT PDEVICE_OBJECT *DeviceObject +IoGetRelatedTargetDevice( + IN PFILE_OBJECT FileObject, + OUT PDEVICE_OBJECT *DeviceObject +); + +VOID +NTAPI +IopUnloadDevice( + IN PDEVICE_OBJECT DeviceObject ); // diff --git a/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h index 096416ac14c..22729be76ef 100644 --- a/ntoskrnl/include/internal/kd.h +++ b/ntoskrnl/include/internal/kd.h @@ -76,13 +76,20 @@ KdbSymProcessSymbols( BOOLEAN KdbSymPrintAddress( IN PVOID Address, - IN PKTRAP_FRAME Context); + IN PKTRAP_FRAME Context +); NTSTATUS KdbSymGetAddressInformation( IN PROSSYM_INFO RosSymInfo, IN ULONG_PTR RelativeAddress, +#ifdef __ROS_CMAKE__ IN PROSSYM_LINEINFO RosSymLineInfo +#else + OUT PULONG LineNumber OPTIONAL, + OUT PCH FileName OPTIONAL, + OUT PCH FunctionName OPTIONAL +#endif ); #endif diff --git a/ntoskrnl/include/internal/ke_x.h b/ntoskrnl/include/internal/ke_x.h index 2c05bfe25bf..8b0ef980b23 100644 --- a/ntoskrnl/include/internal/ke_x.h +++ b/ntoskrnl/include/internal/ke_x.h @@ -8,7 +8,7 @@ #ifndef _M_ARM FORCEINLINE -UCHAR +KPROCESSOR_MODE KeGetPreviousMode(VOID) { /* Return the current mode */ diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h index 02fa7e9d6d6..eec33616a54 100644 --- a/ntoskrnl/include/internal/mm.h +++ b/ntoskrnl/include/internal/mm.h @@ -1140,7 +1140,7 @@ MiGetPfnEntry(IN PFN_NUMBER Pfn) if (Pfn > MmHighestPhysicalPage) return NULL; /* Make sure this page actually has a PFN entry */ - if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, Pfn))) return NULL; + if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, (ULONG)Pfn))) return NULL; /* Get the entry */ Page = &MmPfnDatabase[Pfn]; diff --git a/ntoskrnl/include/internal/ntoskrnl.h b/ntoskrnl/include/internal/ntoskrnl.h index ceb4800423f..7e1d8ef250f 100644 --- a/ntoskrnl/include/internal/ntoskrnl.h +++ b/ntoskrnl/include/internal/ntoskrnl.h @@ -59,6 +59,7 @@ #define KeReleaseGuardedMutexUnsafe _KeReleaseGuardedMutexUnsafe #define KeTryToAcquireGuardedMutex _KeTryToAcquireGuardedMutex +#include "tag.h" #include "ke.h" #include "ob.h" #include "mm.h" @@ -83,7 +84,6 @@ #endif #include "dbgk.h" #include "spinlock.h" -#include "tag.h" #include "test.h" #include "inbv.h" #include "vdm.h" diff --git a/ntoskrnl/include/internal/ob_x.h b/ntoskrnl/include/internal/ob_x.h index aa9d59cd05d..d3966ed1a3e 100644 --- a/ntoskrnl/include/internal/ob_x.h +++ b/ntoskrnl/include/internal/ob_x.h @@ -136,7 +136,7 @@ ObpDereferenceNameInfo(IN POBJECT_HEADER_NAME_INFO HeaderNameInfo) if (HeaderNameInfo->Name.Buffer) { /* We can get rid of the object name now */ - ExFreePool(HeaderNameInfo->Name.Buffer); + ExFreePoolWithTag(HeaderNameInfo->Name.Buffer, OB_NAME_TAG); RtlInitEmptyUnicodeString(&HeaderNameInfo->Name, NULL, 0); } diff --git a/ntoskrnl/include/internal/po.h b/ntoskrnl/include/internal/po.h index 86e25595164..903812fb6ce 100644 --- a/ntoskrnl/include/internal/po.h +++ b/ntoskrnl/include/internal/po.h @@ -291,7 +291,8 @@ PoVolumeDevice( NTSTATUS NTAPI PopSetSystemPowerState( - SYSTEM_POWER_STATE PowerState + SYSTEM_POWER_STATE PowerState, + POWER_ACTION PowerAction ); VOID diff --git a/ntoskrnl/include/internal/spinlock.h b/ntoskrnl/include/internal/spinlock.h index 6d1ca71c231..6b38fb9c158 100644 --- a/ntoskrnl/include/internal/spinlock.h +++ b/ntoskrnl/include/internal/spinlock.h @@ -21,6 +21,10 @@ KxAcquireSpinLock(IN PKSPIN_LOCK SpinLock) { /* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */ UNREFERENCED_PARAMETER(SpinLock); + + /* Add an explicit memory barrier to prevent the compiler from reordering + memory accesses across the borders of spinlocks */ + KeMemoryBarrierWithoutFence(); } // @@ -32,6 +36,10 @@ KxReleaseSpinLock(IN PKSPIN_LOCK SpinLock) { /* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */ UNREFERENCED_PARAMETER(SpinLock); + + /* Add an explicit memory barrier to prevent the compiler from reordering + memory accesses across the borders of spinlocks */ + KeMemoryBarrierWithoutFence(); } #else diff --git a/ntoskrnl/include/internal/tag.h b/ntoskrnl/include/internal/tag.h index 244665c2c99..fa3526e46eb 100644 --- a/ntoskrnl/include/internal/tag.h +++ b/ntoskrnl/include/internal/tag.h @@ -8,11 +8,21 @@ /* formely located in include/callback.h */ #define CALLBACK_TAG 'KBLC' +/* formely located in dbg/dbgkobj.c */ +#define TAG_DEBUG_EVENT 'EgbD' + /* formerly located in ex/resource.c */ #define TAG_RESOURCE_TABLE 'aTeR' #define TAG_RESOURCE_EVENT 'aTeR' #define TAG_RESOURCE_SEMAPHORE 'aTeR' +/* formerly located in ex/handle.c */ +#define TAG_OBJECT_TABLE 'btbO' + +/* formerly located in ex/init.c */ +#define TAG_INIT 'tinI' +#define TAG_RTLI 'iltR' + /* formerly located in fs/notify.c */ #define FSRTL_NOTIFY_TAG 'ITON' @@ -92,6 +102,7 @@ #define TAG_DRIVER_MEM 'MVRD' /* drvm */ #define TAG_MODULE_OBJECT 'omlk' /* klmo - kernel ldr module object */ #define TAG_LDR_WSTR 'swlk' /* klws - kernel ldr wide string */ +#define TAG_LDR_IMPORTS 'klim' /* klim - kernel ldr imports */ /* formerly located in lpc/connect */ #define TAG_LPC_CONNECT_MESSAGE 'CCPL' @@ -101,6 +112,7 @@ /* formerly located in mm/marea.c */ #define TAG_MAREA 'ERAM' +#define TAG_MVAD 'VADM' /* formerly located in mm/pageop.c */ #define TAG_MM_PAGEOP 'POPM' @@ -114,6 +126,9 @@ /* formerly located in mm/rmap.c */ #define TAG_RMAP 'PAMR' +/* formerly located in mm/ARM3/section.c */ +#define TAG_MM ' mM' + /* formerly located in mm/section.c */ #define TAG_MM_SECTION_SEGMENT 'SSMM' #define TAG_SECTION_PAGE_TABLE 'TPSM' @@ -123,6 +138,9 @@ #define TAG_SYMLINK_TTARGET 'TTYS' #define TAG_SYMLINK_TARGET 'TMYS' +/* formerly located in ob/obsdcach.c */ +#define TAG_OB_SD_CACHE 'cSbO' + /* Object Manager Tags */ #define OB_NAME_TAG 'mNbO' #define OB_DIR_TAG 'iDbO' @@ -153,6 +171,11 @@ /* formerly located in se/sd.c */ #define TAG_SD 'dSeS' +/* formerly located in se/token.c */ +#define TAG_TOKEN_USERS 'uKOT' +#define TAG_TOKEN_PRIVILAGES 'pKOT' +#define TAG_TOKEN_ACL 'kDOT' + /* LPC Tags */ #define TAG_LPC_MESSAGE 'McpL' #define TAG_LPC_ZONE 'ZcpL' diff --git a/ntoskrnl/include/internal/trap_x.h b/ntoskrnl/include/internal/trap_x.h index 09d17ed94e3..dadd25d61fa 100644 --- a/ntoskrnl/include/internal/trap_x.h +++ b/ntoskrnl/include/internal/trap_x.h @@ -34,7 +34,7 @@ FORCEINLINE KiUserTrap(IN PKTRAP_FRAME TrapFrame) { /* Anything else but Ring 0 is Ring 3 */ - return (TrapFrame->SegCs & MODE_MASK); + return !!(TrapFrame->SegCs & MODE_MASK); } // diff --git a/ntoskrnl/include/ntoskrnl.h b/ntoskrnl/include/ntoskrnl.h index 40c03b89d1d..ed37af715e6 100644 --- a/ntoskrnl/include/ntoskrnl.h +++ b/ntoskrnl/include/ntoskrnl.h @@ -17,6 +17,7 @@ #ifdef _M_AMD64 #define IoAllocateAdapterChannel _IoAllocateAdapterChannel #define KeGetCurrentThread _KeGetCurrentThread +#define RtlFillMemoryUlong _RtlFillMemoryUlong #endif /* Version Data */ diff --git a/ntoskrnl/io/iomgr/device.c b/ntoskrnl/io/iomgr/device.c index 738ec9744b3..97643b680f8 100644 --- a/ntoskrnl/io/iomgr/device.c +++ b/ntoskrnl/io/iomgr/device.c @@ -19,9 +19,10 @@ ULONG IopDeviceObjectNumber = 0; LIST_ENTRY ShutdownListHead, LastChanceShutdownListHead; KSPIN_LOCK ShutdownListLock; -extern LIST_ENTRY IopDiskFsListHead; -extern LIST_ENTRY IopCdRomFsListHead; -extern LIST_ENTRY IopTapeFsListHead; +extern LIST_ENTRY IopDiskFileSystemQueueHead; +extern LIST_ENTRY IopCdRomFileSystemQueueHead; +extern LIST_ENTRY IopTapeFileSystemQueueHead; +extern ERESOURCE IopDatabaseResource; /* PRIVATE FUNCTIONS **********************************************************/ @@ -48,9 +49,12 @@ NTAPI IopDeleteDevice(IN PVOID ObjectBody) { PDEVICE_OBJECT DeviceObject = ObjectBody; + PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); PAGED_CODE(); - - /* TODO: Delete Device Node */ + + /* Cleanup and free the device node */ + if (DeviceNode) + IopFreeDeviceNode(DeviceNode); /* Dereference the driver object, referenced in IoCreateDevice */ if (DeviceObject->DriverObject) @@ -184,14 +188,17 @@ IoShutdownSystem(IN ULONG Phase) } else if (Phase == 1) { + /* Acquire resource forever */ + ExAcquireResourceExclusiveLite(&IopDatabaseResource, TRUE); + /* Shutdown disk file systems */ - IopShutdownBaseFileSystems(&IopDiskFsListHead); + IopShutdownBaseFileSystems(&IopDiskFileSystemQueueHead); /* Shutdown cdrom file systems */ - IopShutdownBaseFileSystems(&IopCdRomFsListHead); + IopShutdownBaseFileSystems(&IopCdRomFileSystemQueueHead); /* Shutdown tape filesystems */ - IopShutdownBaseFileSystems(&IopTapeFsListHead); + IopShutdownBaseFileSystems(&IopTapeFileSystemQueueHead); /* Loop last-chance shutdown notifications */ ListEntry = ExInterlockedRemoveHeadList(&LastChanceShutdownListHead, diff --git a/ntoskrnl/io/iomgr/driver.c b/ntoskrnl/io/iomgr/driver.c index f273111ce56..79b4ab73391 100644 --- a/ntoskrnl/io/iomgr/driver.c +++ b/ntoskrnl/io/iomgr/driver.c @@ -310,51 +310,65 @@ IopLoadServiceModule( return STATUS_UNSUCCESSFUL; } - /* Open CurrentControlSet */ - RtlInitUnicodeString(&CCSName, - L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services"); - Status = IopOpenRegistryKeyEx(&CCSKey, NULL, &CCSName, KEY_READ); - if (!NT_SUCCESS(Status)) + if (ExpInTextModeSetup) { - DPRINT1("ZwOpenKey() failed with Status %08X\n", Status); - return Status; - } + /* We have no registry, but luckily we know where all the drivers are */ - /* Open service key */ - Status = IopOpenRegistryKeyEx(&ServiceKey, CCSKey, ServiceName, KEY_READ); - if (!NT_SUCCESS(Status)) + /* ServiceStart < 4 is all that matters */ + ServiceStart = 0; + + /* IopNormalizeImagePath will do all of the work for us if we give it an empty string */ + ServiceImagePath.Length = ServiceImagePath.MaximumLength = 0; + ServiceImagePath.Buffer = NULL; + } + else { - DPRINT1("ZwOpenKey() failed with Status %08X\n", Status); + /* Open CurrentControlSet */ + RtlInitUnicodeString(&CCSName, + L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services"); + Status = IopOpenRegistryKeyEx(&CCSKey, NULL, &CCSName, KEY_READ); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwOpenKey() failed with Status %08X\n", Status); + return Status; + } + + /* Open service key */ + Status = IopOpenRegistryKeyEx(&ServiceKey, CCSKey, ServiceName, KEY_READ); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ZwOpenKey() failed with Status %08X\n", Status); + ZwClose(CCSKey); + return Status; + } + + /* + * Get information about the service. + */ + + RtlZeroMemory(QueryTable, sizeof(QueryTable)); + + RtlInitUnicodeString(&ServiceImagePath, NULL); + + QueryTable[0].Name = L"Start"; + QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT; + QueryTable[0].EntryContext = &ServiceStart; + + QueryTable[1].Name = L"ImagePath"; + QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT; + QueryTable[1].EntryContext = &ServiceImagePath; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, + (PWSTR)ServiceKey, QueryTable, NULL, NULL); + + ZwClose(ServiceKey); ZwClose(CCSKey); - return Status; - } - /* - * Get information about the service. - */ - - RtlZeroMemory(QueryTable, sizeof(QueryTable)); - - RtlInitUnicodeString(&ServiceImagePath, NULL); - - QueryTable[0].Name = L"Start"; - QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT; - QueryTable[0].EntryContext = &ServiceStart; - - QueryTable[1].Name = L"ImagePath"; - QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT; - QueryTable[1].EntryContext = &ServiceImagePath; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, - (PWSTR)ServiceKey, QueryTable, NULL, NULL); - - ZwClose(ServiceKey); - ZwClose(CCSKey); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("RtlQueryRegistryValues() failed (Status %x)\n", Status); - return Status; + if (!NT_SUCCESS(Status)) + { + DPRINT1("RtlQueryRegistryValues() failed (Status %x)\n", Status); + return Status; + } } /* @@ -369,20 +383,20 @@ IopLoadServiceModule( return Status; } - /* - * Case for disabled drivers - */ + /* + * Case for disabled drivers + */ - if (ServiceStart >= 4) - { - /* FIXME: Check if it is the right status code */ - Status = STATUS_PLUGPLAY_NO_DEVICE; - } - else - { - DPRINT("Loading module\n"); - Status = MmLoadSystemImage(&ServiceImagePath, NULL, NULL, 0, (PVOID)ModuleObject, &BaseAddress); - } + if (ServiceStart >= 4) + { + /* FIXME: Check if it is the right status code */ + Status = STATUS_PLUGPLAY_NO_DEVICE; + } + else + { + DPRINT("Loading module\n"); + Status = MmLoadSystemImage(&ServiceImagePath, NULL, NULL, 0, (PVOID)ModuleObject, &BaseAddress); + } ExFreePool(ServiceImagePath.Buffer); diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c index 43686de19d6..745a964cd9c 100644 --- a/ntoskrnl/io/iomgr/file.c +++ b/ntoskrnl/io/iomgr/file.c @@ -408,7 +408,8 @@ IopParseDevice(IN PVOID ParseObject, if (!(DirectOpen) && !(RemainingName->Length) && !(OpenPacket->RelatedFileObject) && - ((wcsstr(CompleteName->Buffer, L"Harddisk"))) && + ((wcsstr(CompleteName->Buffer, L"Harddisk")) || + (wcsstr(CompleteName->Buffer, L"Floppy"))) && !(UseDummyFile)) { DPRINT1("Using IopParseDevice() hack. Requested invalid attributes: %lx\n", @@ -479,7 +480,7 @@ IopParseDevice(IN PVOID ParseObject, { /* Dereference the device and VPB, then fail */ IopDereferenceDeviceObject(OriginalDeviceObject, FALSE); - if (Vpb) IopDereferenceVpb(Vpb); + if (Vpb) IopDereferenceVpbAndFree(Vpb); return STATUS_INSUFFICIENT_RESOURCES; } @@ -577,7 +578,7 @@ IopParseDevice(IN PVOID ParseObject, /* Dereference the device and VPB */ IopDereferenceDeviceObject(OriginalDeviceObject, FALSE); - if (Vpb) IopDereferenceVpb(Vpb); + if (Vpb) IopDereferenceVpbAndFree(Vpb); /* We failed, return status */ OpenPacket->FinalStatus = Status; @@ -687,7 +688,7 @@ IopParseDevice(IN PVOID ParseObject, /* Dereference the device object and VPB */ IopDereferenceDeviceObject(OriginalDeviceObject, FALSE); - if (Vpb) IopDereferenceVpb(Vpb); + if (Vpb) IopDereferenceVpbAndFree(Vpb); /* Clear the FO and dereference it */ FileObject->DeviceObject = NULL; @@ -762,7 +763,7 @@ IopParseDevice(IN PVOID ParseObject, if (FileObject->FileName.Length) { /* Free it */ - ExFreePool(FileObject->FileName.Buffer); + ExFreePoolWithTag(FileObject->FileName.Buffer, TAG_IO_NAME); FileObject->FileName.Length = 0; } @@ -783,7 +784,7 @@ IopParseDevice(IN PVOID ParseObject, IopDereferenceDeviceObject(OriginalDeviceObject, FALSE); /* Unless the driver cancelled the open, dereference the VPB */ - if (!(OpenCancelled) && (Vpb)) IopDereferenceVpb(Vpb); + if (!(OpenCancelled) && (Vpb)) IopDereferenceVpbAndFree(Vpb); /* Set the status and return */ OpenPacket->FinalStatus = Status; @@ -806,7 +807,7 @@ IopParseDevice(IN PVOID ParseObject, if (OwnerDevice != DeviceObject) { /* We have to de-reference the VPB we had associated */ - if (Vpb) IopDereferenceVpb(Vpb); + if (Vpb) IopDereferenceVpbAndFree(Vpb); /* And re-associate with the actual one */ Vpb = FileObject->Vpb; @@ -868,7 +869,7 @@ IopParseDevice(IN PVOID ParseObject, } /* Free our buffer */ - ExFreePool(FileBasicInfo); + ExFreePoolWithTag(FileBasicInfo, TAG_IO); } else { @@ -1331,7 +1332,7 @@ IopQueryNameFile(IN PVOID ObjectBody, if (!NT_SUCCESS(Status) && (Status != STATUS_INFO_LENGTH_MISMATCH)) { /* Free the buffer and fail */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return Status; } @@ -1375,7 +1376,7 @@ IopQueryNameFile(IN PVOID ObjectBody, if (NT_ERROR(Status)) { /* Fail on errors only, allow warnings */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return Status; } @@ -1386,7 +1387,7 @@ IopQueryNameFile(IN PVOID ObjectBody, *ReturnLength += LocalFileInfo->FileNameLength; /* Free the allocated buffer and return failure */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return STATUS_BUFFER_OVERFLOW; } @@ -1414,7 +1415,7 @@ IopQueryNameFile(IN PVOID ObjectBody, sizeof(UNICODE_NULL); /* Free buffer and return */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return Status; } @@ -1908,7 +1909,7 @@ IoCreateFile(OUT PHANDLE FileHandle, if (OpenPacket.FileObject->FileName.Length) { /* It had a name, free it */ - ExFreePool(OpenPacket.FileObject->FileName.Buffer); + ExFreePoolWithTag(OpenPacket.FileObject->FileName.Buffer, TAG_IO_NAME); } /* Clear the device object to invalidate the FO, and dereference */ diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c index 22e8710a4e3..49976c68855 100644 --- a/ntoskrnl/io/iomgr/iofunc.c +++ b/ntoskrnl/io/iomgr/iofunc.c @@ -370,7 +370,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle, StackPtr->MajorFunction = IsDevIoCtl ? IRP_MJ_DEVICE_CONTROL : IRP_MJ_FILE_SYSTEM_CONTROL; - StackPtr->MinorFunction = 0; + StackPtr->MinorFunction = 0; /* Minor function 0 is IRP_MN_USER_FS_REQUEST */ StackPtr->Control = 0; StackPtr->Flags = 0; StackPtr->Parameters.DeviceIoControl.Type3InputBuffer = NULL; diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c index 38e72ec10cb..c390029ebe7 100644 --- a/ntoskrnl/io/iomgr/iomgr.c +++ b/ntoskrnl/io/iomgr/iomgr.c @@ -52,19 +52,17 @@ extern LIST_ENTRY ShutdownListHead; extern LIST_ENTRY LastChanceShutdownListHead; extern KSPIN_LOCK ShutdownListLock; extern POBJECT_TYPE IoAdapterObjectType; -ERESOURCE IopDatabaseResource; -extern ERESOURCE FileSystemListLock; +extern ERESOURCE IopDatabaseResource; ERESOURCE IopSecurityResource; -extern KGUARDED_MUTEX FsChangeNotifyListLock; extern KGUARDED_MUTEX PnpNotifyListLock; -extern LIST_ENTRY IopDiskFsListHead; -extern LIST_ENTRY IopCdRomFsListHead; -extern LIST_ENTRY IopTapeFsListHead; -extern LIST_ENTRY IopNetworkFsListHead; +extern LIST_ENTRY IopDiskFileSystemQueueHead; +extern LIST_ENTRY IopCdRomFileSystemQueueHead; +extern LIST_ENTRY IopTapeFileSystemQueueHead; +extern LIST_ENTRY IopNetworkFileSystemQueueHead; extern LIST_ENTRY DriverBootReinitListHead; extern LIST_ENTRY DriverReinitListHead; extern LIST_ENTRY PnpNotifyListHead; -extern LIST_ENTRY FsChangeNotifyListHead; +extern LIST_ENTRY IopFsNotifyChangeQueueHead; extern LIST_ENTRY IopErrorLogListHead; extern LIST_ENTRY IopTimerQueueHead; extern KDPC IopTimerDpc; @@ -450,20 +448,18 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Initialize all locks and lists */ ExInitializeResource(&IopDatabaseResource); - ExInitializeResource(&FileSystemListLock); ExInitializeResource(&IopSecurityResource); - KeInitializeGuardedMutex(&FsChangeNotifyListLock); KeInitializeGuardedMutex(&PnpNotifyListLock); - InitializeListHead(&IopDiskFsListHead); - InitializeListHead(&IopCdRomFsListHead); - InitializeListHead(&IopTapeFsListHead); - InitializeListHead(&IopNetworkFsListHead); + InitializeListHead(&IopDiskFileSystemQueueHead); + InitializeListHead(&IopCdRomFileSystemQueueHead); + InitializeListHead(&IopTapeFileSystemQueueHead); + InitializeListHead(&IopNetworkFileSystemQueueHead); InitializeListHead(&DriverBootReinitListHead); InitializeListHead(&DriverReinitListHead); InitializeListHead(&PnpNotifyListHead); InitializeListHead(&ShutdownListHead); InitializeListHead(&LastChanceShutdownListHead); - InitializeListHead(&FsChangeNotifyListHead); + InitializeListHead(&IopFsNotifyChangeQueueHead); InitializeListHead(&IopErrorLogListHead); KeInitializeSpinLock(&IoStatisticsLock); KeInitializeSpinLock(&DriverReinitListLock); @@ -484,10 +480,18 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) KeSetTimerEx(&IopTimer, ExpireTime, 1000, &IopTimerDpc); /* Create Object Types */ - if (!IopCreateObjectTypes()) return FALSE; + if (!IopCreateObjectTypes()) + { + DPRINT1("IopCreateObjectTypes failed!\n"); + return FALSE; + } /* Create Object Directories */ - if (!IopCreateRootDirectories()) return FALSE; + if (!IopCreateRootDirectories()) + { + DPRINT1("IopCreateRootDirectories failed!\n"); + return FALSE; + } /* Initialize PnP manager */ IopInitializePlugPlayServices(); @@ -515,10 +519,19 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) IopLoaderBlock = NULL; /* Create ARC names for boot devices */ - if (!NT_SUCCESS(IopCreateArcNames(LoaderBlock))) return FALSE; + Status = IopCreateArcNames(LoaderBlock); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IopCreateArcNames failed: %lx\n", Status); + return FALSE; + } /* Mark the system boot partition */ - if (!IopMarkBootPartition(LoaderBlock)) return FALSE; + if (!IopMarkBootPartition(LoaderBlock)) + { + DPRINT1("IopMarkBootPartition failed!\n"); + return FALSE; + } /* Initialize PnP root relations */ IopEnumerateDevice(IopRootDeviceNode->PhysicalDeviceObject); @@ -543,7 +556,11 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Convert SystemRoot from ARC to NT path */ Status = IopReassignSystemRoot(LoaderBlock, &NtBootPath); - if (!NT_SUCCESS(Status)) return FALSE; + if (!NT_SUCCESS(Status)) + { + DPRINT1("IopReassignSystemRoot failed: %lx\n", Status); + return FALSE; + } /* Set the ANSI_STRING for the root path */ RootString.MaximumLength = NtSystemRoot.MaximumLength / sizeof(WCHAR); @@ -554,7 +571,11 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Convert the path into the ANSI_STRING */ Status = RtlUnicodeStringToAnsiString(&RootString, &NtSystemRoot, FALSE); - if (!NT_SUCCESS(Status)) return FALSE; + if (!NT_SUCCESS(Status)) + { + DPRINT1("RtlUnicodeStringToAnsiString failed: %lx\n", Status); + return FALSE; + } /* Assign drive letters */ IoAssignDriveLetters(LoaderBlock, @@ -564,10 +585,19 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Update system root */ Status = RtlAnsiStringToUnicodeString(&NtSystemRoot, &RootString, FALSE); - if (!NT_SUCCESS(Status)) return FALSE; + if (!NT_SUCCESS(Status)) + { + DPRINT1("RtlAnsiStringToUnicodeString failed: %lx\n", Status); + return FALSE; + } /* Load the System DLL and its Entrypoints */ - if (!NT_SUCCESS(PsLocateSystemDll())) return FALSE; + Status = PsLocateSystemDll(); + if (!NT_SUCCESS(Status)) + { + DPRINT1("PsLocateSystemDll failed: %lx\n", Status); + return FALSE; + } /* Return success */ return TRUE; diff --git a/ntoskrnl/io/iomgr/iorsrce.c b/ntoskrnl/io/iomgr/iorsrce.c index 948db34e673..db227cf5c61 100644 --- a/ntoskrnl/io/iomgr/iorsrce.c +++ b/ntoskrnl/io/iomgr/iorsrce.c @@ -701,7 +701,7 @@ IopStoreSystemPartitionInformation(IN PUNICODE_STRING NtSystemPartitionDeviceNam UNICODE_STRING LinkTarget, KeyName; OBJECT_ATTRIBUTES ObjectAttributes; HANDLE LinkHandle, RegistryHandle, KeyHandle; - WCHAR LinkTargetBuffer[256], KeyNameBuffer[sizeof("SystemPartition")]; + WCHAR LinkTargetBuffer[256], KeyNameBuffer[sizeof(L"SystemPartition") / sizeof(WCHAR)]; UNICODE_STRING CmRegistryMachineSystemName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM"); ASSERT(NtSystemPartitionDeviceName->MaximumLength >= NtSystemPartitionDeviceName->Length + sizeof(WCHAR)); diff --git a/ntoskrnl/io/iomgr/remlock.c b/ntoskrnl/io/iomgr/remlock.c index 55eaff47d23..0764861eba7 100644 --- a/ntoskrnl/io/iomgr/remlock.c +++ b/ntoskrnl/io/iomgr/remlock.c @@ -5,6 +5,7 @@ * PURPOSE: Remove Lock Support * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) * Filip Navara (navaraf@reactos.org) + * Pierre Schweitzer (pierre.schweitzer@reactos.org) */ /* INCLUDES ******************************************************************/ @@ -13,6 +14,15 @@ #define NDEBUG #include +typedef struct _IO_REMOVE_LOCK_TRACKING_BLOCK +{ + PIO_REMOVE_LOCK_TRACKING_BLOCK Next; + PVOID Tag; + LARGE_INTEGER LockMoment; + LPCSTR File; + ULONG Line; +} IO_REMOVE_LOCK_TRACKING_BLOCK; + /* FUNCTIONS *****************************************************************/ /* @@ -29,26 +39,34 @@ IoInitializeRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; PAGED_CODE(); - /* Check if this is a debug lock */ - if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) - { - /* Clear the lock */ - RtlZeroMemory(Lock, RemlockSize); + ASSERT(HighWatermark < MAXLONG); - /* Setup debug parameters */ - Lock->Dbg.HighWatermark = HighWatermark; - Lock->Dbg.MaxLockedTicks = MaxLockedMinutes * 600000000; - Lock->Dbg.AllocateTag = AllocateTag; - KeInitializeSpinLock(&Lock->Dbg.Spin); - } - else + /* If no lock given, nothing to do */ + if (!Lock) { - /* Otherwise, setup a free block */ - Lock->Common.Removed = FALSE; - Lock->Common.IoCount = 1; - KeInitializeEvent(&Lock->Common.RemoveEvent, - SynchronizationEvent, - FALSE); + return; + } + + switch (RemlockSize) + { + /* Check if this is a debug lock */ + case (sizeof(IO_REMOVE_LOCK_DBG_BLOCK) + sizeof(IO_REMOVE_LOCK_COMMON_BLOCK)): + /* Setup debug parameters */ + Lock->Dbg.Signature = 'COLR'; + Lock->Dbg.HighWatermark = HighWatermark; + Lock->Dbg.MaxLockedTicks = KeQueryTimeIncrement() * MaxLockedMinutes * 600000000; + Lock->Dbg.AllocateTag = AllocateTag; + KeInitializeSpinLock(&(Lock->Dbg.Spin)); + Lock->Dbg.LowMemoryCount = 0; + Lock->Dbg.Blocks = NULL; + + case sizeof(IO_REMOVE_LOCK_COMMON_BLOCK): + /* Setup a free block */ + Lock->Common.Removed = FALSE; + Lock->Common.IoCount = 1; + KeInitializeEvent(&Lock->Common.RemoveEvent, + SynchronizationEvent, + FALSE); } } @@ -63,27 +81,52 @@ IoAcquireRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN ULONG Line, IN ULONG RemlockSize) { + KIRQL OldIrql; + LONG LockValue; + PIO_REMOVE_LOCK_TRACKING_BLOCK TrackingBlock; PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; /* Increase the lock count */ - InterlockedIncrement(&Lock->Common.IoCount); + LockValue = InterlockedIncrement(&(Lock->Common.IoCount)); + ASSERT(LockValue > 0); if (!Lock->Common.Removed) { /* Check what kind of lock this is */ - if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) + if (RemlockSize == (sizeof(IO_REMOVE_LOCK_DBG_BLOCK) + sizeof(IO_REMOVE_LOCK_COMMON_BLOCK))) { - /* FIXME: Not yet supported */ - DPRINT1("UNIMPLEMENTED\n"); - ASSERT(FALSE); + ASSERT(Lock->Dbg.HighWatermark == 0 || LockValue <= Lock->Dbg.HighWatermark); + + /* Allocate a tracking block */ + TrackingBlock = ExAllocatePoolWithTag(NonPagedPool, sizeof(IO_REMOVE_LOCK_TRACKING_BLOCK), Lock->Dbg.AllocateTag); + if (!TrackingBlock) + { + /* Keep count of failures for lock release and missing tags */ + InterlockedIncrement(&(Lock->Dbg.LowMemoryCount)); + } + else + { + /* Initialize block */ + RtlZeroMemory(TrackingBlock, sizeof(IO_REMOVE_LOCK_TRACKING_BLOCK)); + TrackingBlock->Tag = Tag; + TrackingBlock->File = File; + TrackingBlock->Line = Line; + KeQueryTickCount(&(TrackingBlock->LockMoment)); + + /* Queue the block */ + KeAcquireSpinLock(&(Lock->Dbg.Spin), &OldIrql); + TrackingBlock->Next = Lock->Dbg.Blocks; + Lock->Dbg.Blocks = TrackingBlock; + KeReleaseSpinLock(&(Lock->Dbg.Spin), OldIrql); + } } } else { /* Otherwise, decrement the count and check if it's gone */ - if (!InterlockedDecrement(&Lock->Common.IoCount)) + if (!InterlockedDecrement(&(Lock->Common.IoCount))) { /* Signal the event */ - KeSetEvent(&Lock->Common.RemoveEvent, IO_NO_INCREMENT, FALSE); + KeSetEvent(&(Lock->Common.RemoveEvent), IO_NO_INCREMENT, FALSE); } /* Return pending delete */ @@ -103,21 +146,86 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN PVOID Tag, IN ULONG RemlockSize) { + KIRQL OldIrql; + LONG LockValue; + BOOLEAN TagFound; + LARGE_INTEGER CurrentMoment; + PIO_REMOVE_LOCK_TRACKING_BLOCK TrackingBlock; + PIO_REMOVE_LOCK_TRACKING_BLOCK *TrackingBlockLink; PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; /* Check what kind of lock this is */ - if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) + if (RemlockSize == (sizeof(IO_REMOVE_LOCK_DBG_BLOCK) + sizeof(IO_REMOVE_LOCK_COMMON_BLOCK))) { - /* FIXME: Not yet supported */ - DPRINT1("UNIMPLEMENTED\n"); - ASSERT(FALSE); + /* Acquire blocks queue */ + KeAcquireSpinLock(&(Lock->Dbg.Spin), &OldIrql); + + /* Get the release moment */ + KeQueryTickCount(&CurrentMoment); + + /* Start browsing tracking blocks to find a block that would match given tag */ + TagFound = FALSE; + TrackingBlock = Lock->Dbg.Blocks; + TrackingBlockLink = &(Lock->Dbg.Blocks); + while (TrackingBlock != NULL) + { + /* First of all, check if the lock was locked for too long */ + if (TrackingBlock->LockMoment.QuadPart && + CurrentMoment.QuadPart - TrackingBlock->LockMoment.QuadPart > Lock->Dbg.MaxLockedTicks) + { + DPRINT("Lock %#08lx (with tag %#08lx) was supposed to be held at max %I64d ticks but lasted longer\n", + Lock, TrackingBlock->Tag, Lock->Dbg.MaxLockedTicks); + DPRINT("Lock was acquired in file %s at line %d\n", TrackingBlock->File, TrackingBlock->Line); + ASSERT(FALSE); + } + + /* Check if this is the first matching tracking block */ + if ((TagFound == FALSE) && (TrackingBlock->Tag == Tag)) + { + /* Unlink this tracking block, and free it */ + TagFound = TRUE; + *TrackingBlockLink = TrackingBlock->Next; + ExFreePoolWithTag(TrackingBlock, Lock->Dbg.AllocateTag); + TrackingBlock = *TrackingBlockLink; + } + else + { + /* Go to the next tracking block */ + TrackingBlockLink = &(TrackingBlock->Next); + TrackingBlock = TrackingBlock->Next; + } + } + + /* We're done, release queue lock */ + KeReleaseSpinLock(&(Lock->Dbg.Spin), OldIrql); + + /* If we didn't find any matching block */ + if (TagFound == FALSE) + { + /* Check if it was because we were low in memory + * If yes, then ignore, that's normal + */ + if (InterlockedDecrement(&(Lock->Dbg.LowMemoryCount)) < 0) + { + /* Otherwise signal the issue, it shouldn't happen */ + InterlockedIncrement(&(Lock->Dbg.LowMemoryCount)); + DPRINT("Failed finding block for tag: %#08lx\n", Tag); + ASSERT(FALSE); + } + } } /* Decrement the lock count */ - if (!InterlockedDecrement(&Lock->Common.IoCount)) + LockValue = InterlockedDecrement(&(Lock->Common.IoCount)); + ASSERT(LockValue >= 0); + + if (!LockValue) { + /* Someone should be waiting... */ + ASSERT(Lock->Common.Removed); + /* Signal the event */ - KeSetEvent(&Lock->Common.RemoveEvent, IO_NO_INCREMENT, FALSE); + KeSetEvent(&(Lock->Common.RemoveEvent), IO_NO_INCREMENT, FALSE); } } @@ -130,15 +238,21 @@ IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock, IN PVOID Tag, IN ULONG RemlockSize) { + LONG LockValue; + PIO_REMOVE_LOCK_TRACKING_BLOCK TrackingBlock; PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock; PAGED_CODE(); /* Remove the lock and decrement the count */ Lock->Common.Removed = TRUE; + LockValue = InterlockedDecrement(&Lock->Common.IoCount); + ASSERT(LockValue > 0); + + /* If we are still > 0, then wait for the others to remove lock */ if (InterlockedDecrement(&Lock->Common.IoCount) > 0) { /* Wait for it */ - KeWaitForSingleObject(&Lock->Common.RemoveEvent, + KeWaitForSingleObject(&(Lock->Common.RemoveEvent), Executive, KernelMode, FALSE, @@ -146,11 +260,22 @@ IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock, } /* Check what kind of lock this is */ - if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK)) + if (RemlockSize == (sizeof(IO_REMOVE_LOCK_DBG_BLOCK) + sizeof(IO_REMOVE_LOCK_COMMON_BLOCK))) { - /* FIXME: Not yet supported */ - DPRINT1("UNIMPLEMENTED\n"); - ASSERT(FALSE); + /* A block must be remaining */ + ASSERT(Lock->Dbg.Blocks); + + /* Get it */ + TrackingBlock = Lock->Dbg.Blocks; + /* Tag should match */ + if (TrackingBlock->Tag != Tag) + { + DPRINT("Last tracking block tag invalid! Expected: %x, having: %x\n", Tag, TrackingBlock->Tag); + ASSERT(TrackingBlock->Tag != Tag); + } + + /* Release block */ + ExFreePoolWithTag(Lock->Dbg.Blocks, Lock->Dbg.AllocateTag); } } diff --git a/ntoskrnl/io/iomgr/util.c b/ntoskrnl/io/iomgr/util.c index e2c0bcee0c1..c1164977a67 100644 --- a/ntoskrnl/io/iomgr/util.c +++ b/ntoskrnl/io/iomgr/util.c @@ -166,8 +166,7 @@ IoCheckEaBufferValidity(IN PFILE_FULL_EA_INFORMATION EaBuffer, OUT PULONG ErrorOffset) { PFILE_FULL_EA_INFORMATION EaBufferEnd; - ULONG NextEaBufferOffset; - LONG IntEaLength; + ULONG NextEaBufferOffset, IntEaLength; PAGED_CODE(); diff --git a/ntoskrnl/io/iomgr/volume.c b/ntoskrnl/io/iomgr/volume.c index 606f8fd3b35..f7d17dd3df7 100644 --- a/ntoskrnl/io/iomgr/volume.c +++ b/ntoskrnl/io/iomgr/volume.c @@ -6,6 +6,7 @@ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) * Herv Poussineau (hpoussin@reactos.org) * Eric Kohl + * Pierre Schweitzer (pierre.schweitzer@reactos.org) */ /* INCLUDES *****************************************************************/ @@ -21,14 +22,60 @@ /* GLOBALS ******************************************************************/ -ERESOURCE FileSystemListLock; -LIST_ENTRY IopDiskFsListHead, IopNetworkFsListHead; -LIST_ENTRY IopCdRomFsListHead, IopTapeFsListHead; -KGUARDED_MUTEX FsChangeNotifyListLock; -LIST_ENTRY FsChangeNotifyListHead; +ERESOURCE IopDatabaseResource; +LIST_ENTRY IopDiskFileSystemQueueHead, IopNetworkFileSystemQueueHead; +LIST_ENTRY IopCdRomFileSystemQueueHead, IopTapeFileSystemQueueHead; +LIST_ENTRY IopFsNotifyChangeQueueHead; +ULONG IopFsRegistrationOps; /* PRIVATE FUNCTIONS *********************************************************/ +/* + * @halfplemented + */ +VOID +NTAPI +IopDecrementDeviceObjectRef(IN PDEVICE_OBJECT DeviceObject, + IN BOOLEAN UnloadIfUnused) +{ + KIRQL OldIrql; + + /* Acquire lock */ + OldIrql = KeAcquireQueuedSpinLock(LockQueueIoDatabaseLock); + ASSERT(DeviceObject->ReferenceCount > 0); + + if (--DeviceObject->ReferenceCount > 0) + { + KeReleaseQueuedSpinLock(LockQueueIoDatabaseLock, OldIrql); + return; + } + + /* Here, DO is not referenced any longer, check if we have to unload it */ + if (UnloadIfUnused || IoGetDevObjExtension(DeviceObject)->ExtensionFlags & + (DOE_UNLOAD_PENDING | DOE_DELETE_PENDING | DOE_REMOVE_PENDING)) + { + /* Unload the driver */ + IopUnloadDevice(DeviceObject); + } + + /* Release lock */ + KeReleaseQueuedSpinLock(LockQueueIoDatabaseLock, OldIrql); +} + +/* + * @implemented + */ +VOID +NTAPI +IopDecrementDeviceObjectHandleCount(IN PDEVICE_OBJECT DeviceObject) +{ + /* Just decrease reference count */ + IopDecrementDeviceObjectRef(DeviceObject, FALSE); +} + +/* + * @implemented + */ PVPB NTAPI IopCheckVpbMounted(IN POPEN_PACKET OpenPacket, @@ -100,6 +147,9 @@ IopCheckVpbMounted(IN POPEN_PACKET OpenPacket, return Vpb; } +/* + * @implemented + */ NTSTATUS NTAPI IopCreateVpb(IN PDEVICE_OBJECT DeviceObject) @@ -110,7 +160,7 @@ IopCreateVpb(IN PDEVICE_OBJECT DeviceObject) Vpb = ExAllocatePoolWithTag(NonPagedPool, sizeof(VPB), TAG_VPB); - if (!Vpb) return STATUS_UNSUCCESSFUL; + if (!Vpb) return STATUS_INSUFFICIENT_RESOURCES; /* Clear it so we don't waste time manually */ RtlZeroMemory(Vpb, sizeof(VPB)); @@ -125,9 +175,12 @@ IopCreateVpb(IN PDEVICE_OBJECT DeviceObject) return STATUS_SUCCESS; } +/* + * @implemented + */ VOID NTAPI -IopDereferenceVpb(IN PVPB Vpb) +IopDereferenceVpbAndFree(IN PVPB Vpb) { KIRQL OldIrql; @@ -136,21 +189,30 @@ IopDereferenceVpb(IN PVPB Vpb) Vpb->ReferenceCount--; /* Check if we're out of references */ - if (!Vpb->ReferenceCount) + if (!Vpb->ReferenceCount && Vpb->RealDevice->Vpb == Vpb && + !(Vpb->Flags & VPB_PERSISTENT)) { - /* FIXME: IMPLEMENT CLEANUP! */ - ASSERT(FALSE); - } + /* Release VPB lock */ + IoReleaseVpbSpinLock(OldIrql); - /* Release VPB lock */ - IoReleaseVpbSpinLock(OldIrql); + /* And free VPB */ + ExFreePoolWithTag(Vpb, TAG_VPB); + } + else + { + /* Release VPB lock */ + IoReleaseVpbSpinLock(OldIrql); + } } +/* + * @implemented + */ BOOLEAN NTAPI -IopReferenceVpbForVerify(IN PDEVICE_OBJECT DeviceObject, - OUT PDEVICE_OBJECT *FileSystemObject, - OUT PVPB *Vpb) +IopReferenceVerifyVpb(IN PDEVICE_OBJECT DeviceObject, + OUT PDEVICE_OBJECT *FileSystemObject, + OUT PVPB *Vpb) { KIRQL OldIrql; PVPB LocalVpb; @@ -181,9 +243,9 @@ IopReferenceVpbForVerify(IN PDEVICE_OBJECT DeviceObject, PVPB NTAPI -IopInitializeVpbForMount(IN PDEVICE_OBJECT DeviceObject, - IN PDEVICE_OBJECT AttachedDeviceObject, - IN BOOLEAN Raw) +IopMountInitializeVpb(IN PDEVICE_OBJECT DeviceObject, + IN PDEVICE_OBJECT AttachedDeviceObject, + IN BOOLEAN Raw) { KIRQL OldIrql; PVPB Vpb; @@ -212,20 +274,20 @@ IopInitializeVpbForMount(IN PDEVICE_OBJECT DeviceObject, return Vpb; } +/* + * @implemented + */ VOID -NTAPI +FORCEINLINE IopNotifyFileSystemChange(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN DriverActive) { PFS_CHANGE_NOTIFY_ENTRY ChangeEntry; PLIST_ENTRY ListEntry; - /* Acquire the notification lock */ - KeAcquireGuardedMutex(&FsChangeNotifyListLock); - /* Loop the list */ - ListEntry = FsChangeNotifyListHead.Flink; - while (ListEntry != &FsChangeNotifyListHead) + ListEntry = IopFsNotifyChangeQueueHead.Flink; + while (ListEntry != &IopFsNotifyChangeQueueHead) { /* Get the entry */ ChangeEntry = CONTAINING_RECORD(ListEntry, @@ -238,11 +300,47 @@ IopNotifyFileSystemChange(IN PDEVICE_OBJECT DeviceObject, /* Go to the next entry */ ListEntry = ListEntry->Flink; } - - /* Release the lock */ - KeReleaseGuardedMutex(&FsChangeNotifyListLock); } +/* + * @implemented + */ +ULONG +FASTCALL +IopInterlockedIncrementUlong(IN KSPIN_LOCK_QUEUE_NUMBER Queue, + IN PULONG Ulong) +{ + KIRQL Irql; + ULONG OldValue; + + Irql = KeAcquireQueuedSpinLock(Queue); + OldValue = (*Ulong)++; + KeReleaseQueuedSpinLock(Queue, Irql); + + return OldValue; +} + +/* + * @implemented + */ +ULONG +FASTCALL +IopInterlockedDecrementUlong(IN KSPIN_LOCK_QUEUE_NUMBER Queue, + IN PULONG Ulong) +{ + KIRQL Irql; + ULONG OldValue; + + Irql = KeAcquireQueuedSpinLock(Queue); + OldValue = (*Ulong)--; + KeReleaseQueuedSpinLock(Queue, Irql); + + return OldValue; +} + +/* + * @implemented + */ VOID NTAPI IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) @@ -254,9 +352,6 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) KEVENT Event; NTSTATUS Status; - /* Lock the FS List and initialize an event to wait on */ - KeEnterCriticalRegion(); - ExAcquireResourceSharedLite(&FileSystemListLock,TRUE); KeInitializeEvent(&Event, NotificationEvent, FALSE); /* Get the first entry and start looping */ @@ -268,6 +363,9 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) DEVICE_OBJECT, Queue.ListEntry); + ObReferenceObject(DeviceObject); + IopInterlockedIncrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount); + /* Check if we're attached */ if (DeviceObject->AttachedDevice) { @@ -293,18 +391,20 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) /* Reset the event */ KeClearEvent(&Event); + IopDecrementDeviceObjectRef(DeviceObject, FALSE); + ObDereferenceObject(DeviceObject); + /* Go to the next entry */ ListEntry = ListEntry->Flink; } - - /* Release the lock */ - ExReleaseResourceLite(&FileSystemListLock); - KeLeaveCriticalRegion(); } +/* + * @implemented + */ VOID NTAPI -IopLoadFileSystem(IN PDEVICE_OBJECT DeviceObject) +IopLoadFileSystemDriver(IN PDEVICE_OBJECT DeviceObject) { IO_STATUS_BLOCK IoStatusBlock; PIO_STACK_LOCATION StackPtr; @@ -347,8 +447,14 @@ IopLoadFileSystem(IN PDEVICE_OBJECT DeviceObject) KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); } } + + /* Dereference DO - FsRec? - Comment out call, since it breaks up 2nd stage boot, needs more research. */ +// IopDecrementDeviceObjectRef(AttachedDeviceObject, TRUE); } +/* + * @implemented + */ NTSTATUS NTAPI IopMountVolume(IN PDEVICE_OBJECT DeviceObject, @@ -366,7 +472,7 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, LIST_ENTRY LocalList; PDEVICE_OBJECT AttachedDeviceObject = DeviceObject; PDEVICE_OBJECT FileSystemDeviceObject, ParentFsDeviceObject; - ULONG FsStackOverhead; + ULONG FsStackOverhead, RegistrationOps; PAGED_CODE(); /* Check if the device isn't already locked */ @@ -387,7 +493,7 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, /* Acquire the FS Lock*/ KeEnterCriticalRegion(); - ExAcquireResourceSharedLite(&FileSystemListLock, TRUE); + ExAcquireResourceSharedLite(&IopDatabaseResource, TRUE); /* Make sure we weren't already mounted */ if (!(DeviceObject->Vpb->Flags & (VPB_MOUNTED | VPB_REMOVE_PENDING))) @@ -411,17 +517,17 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, (DeviceObject->DeviceType == FILE_DEVICE_VIRTUAL_DISK)) { /* Use the disk list */ - FsList = &IopDiskFsListHead; + FsList = &IopDiskFileSystemQueueHead; } else if (DeviceObject->DeviceType == FILE_DEVICE_CD_ROM) { /* Use the CD-ROM list */ - FsList = &IopCdRomFsListHead; + FsList = &IopCdRomFileSystemQueueHead; } else { /* It's gotta be a tape... */ - FsList = &IopTapeFsListHead; + FsList = &IopTapeFileSystemQueueHead; } /* Now loop the fs list until one of the file systems accepts us */ @@ -502,6 +608,13 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, StackPtr->Parameters.MountVolume.DeviceObject = AttachedDeviceObject; + /* Save registration operations */ + RegistrationOps = IopFsRegistrationOps; + + /* Release locks */ + IopInterlockedIncrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount); + ExReleaseResourceLite(&IopDatabaseResource); + /* Call the driver */ Status = IoCallDriver(FileSystemDeviceObject, Irp); if (Status == STATUS_PENDING) @@ -515,14 +628,17 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, Status = IoStatusBlock.Status; } + ExAcquireResourceSharedLite(&IopDatabaseResource, TRUE); + IopInterlockedDecrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount); + /* Check if mounting was successful */ if (NT_SUCCESS(Status)) { /* Mount the VPB */ - *Vpb = IopInitializeVpbForMount(DeviceObject, - AttachedDeviceObject, - (DeviceObject->Vpb->Flags & - VPB_RAW_MOUNT)); + *Vpb = IopMountInitializeVpb(DeviceObject, + AttachedDeviceObject, + (DeviceObject->Vpb->Flags & + VPB_RAW_MOUNT)); } else { @@ -534,11 +650,22 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, break; } + /* If there were registration operations in the meanwhile */ + if (RegistrationOps != IopFsRegistrationOps) + { + /* We need to setup a local list to pickup where we left */ + LocalList.Flink = FsList->Flink; + ListEntry = &LocalList; + + Status = STATUS_UNRECOGNIZED_VOLUME; + } + /* Otherwise, check if we need to load the FS driver */ if (Status == STATUS_FS_DRIVER_REQUIRED) { /* We need to release the lock */ - ExReleaseResourceLite(&FileSystemListLock); + IopInterlockedIncrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount); + ExReleaseResourceLite(&IopDatabaseResource); /* Release the device lock if we're holding it */ if (!DeviceIsLocked) @@ -546,8 +673,11 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, KeSetEvent(&DeviceObject->DeviceLock, 0, FALSE); } + /* Leave critical section */ + KeLeaveCriticalRegion(); + /* Load the FS */ - IopLoadFileSystem(ParentFsDeviceObject); + IopLoadFileSystemDriver(ParentFsDeviceObject); /* Check if the device isn't already locked */ if (!DeviceIsLocked) @@ -569,7 +699,8 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, } /* Reacquire the lock */ - ExAcquireResourceSharedLite(&FileSystemListLock, TRUE); + KeEnterCriticalRegion(); + ExAcquireResourceSharedLite(&IopDatabaseResource, TRUE); /* When we released the lock, make sure nobody beat us */ if (DeviceObject->Vpb->Flags & VPB_MOUNTED) @@ -593,7 +724,7 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, * file system. */ if (!(AllowRawMount) && - (Status != STATUS_UNRECOGNIZED_VOLUME) && + (Status != STATUS_UNRECOGNIZED_VOLUME) && (FsRtlIsTotalDeviceFailure(Status))) { /* Break out and give up */ @@ -620,7 +751,7 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, } /* Release the FS lock */ - ExReleaseResourceLite(&FileSystemListLock); + ExReleaseResourceLite(&IopDatabaseResource); KeLeaveCriticalRegion(); /* Release the device lock if we're holding it */ @@ -628,7 +759,8 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, /* Check if we failed to mount the boot partition */ if ((!NT_SUCCESS(Status)) && - (DeviceObject->Flags & DO_SYSTEM_BOOT_PARTITION)) + (DeviceObject->Flags & DO_SYSTEM_BOOT_PARTITION) && + ExpInitializationPhase < 2) { /* Bugcheck the system */ KeBugCheckEx(INACCESSIBLE_BOOT_DEVICE, @@ -642,19 +774,96 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject, return Status; } +/* + * @implemented + */ +VOID +NTAPI +IopNotifyAlreadyRegisteredFileSystems(IN PLIST_ENTRY ListHead, + IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine, + BOOLEAN SkipRawFs) +{ + PLIST_ENTRY ListEntry; + PDEVICE_OBJECT DeviceObject; + + /* Browse the whole list */ + ListEntry = ListHead->Flink; + while (ListEntry != ListHead) + { + /* Check if we reached rawfs and if we have to skip it */ + if (ListEntry->Flink == ListHead && SkipRawFs) + { + return; + } + + /* Otherwise, get DO and notify */ + DeviceObject = CONTAINING_RECORD(ListEntry, + DEVICE_OBJECT, + Queue.ListEntry); + + DriverNotificationRoutine(DeviceObject, TRUE); + + /* Go to the next entry */ + ListEntry = ListEntry->Flink; + } +} + /* PUBLIC FUNCTIONS **********************************************************/ /* - * @unimplemented + * @implemented */ NTSTATUS NTAPI -IoEnumerateRegisteredFiltersList(IN PDRIVER_OBJECT *DriverObjectList, +IoEnumerateRegisteredFiltersList(OUT PDRIVER_OBJECT *DriverObjectList, IN ULONG DriverObjectListSize, OUT PULONG ActualNumberDriverObjects) { - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; + PLIST_ENTRY ListEntry; + NTSTATUS Status = STATUS_SUCCESS; + PFS_CHANGE_NOTIFY_ENTRY ChangeEntry; + ULONG ListSize = 0, MaximumSize = DriverObjectListSize / sizeof(PDRIVER_OBJECT); + + /* Acquire the FS lock */ + KeEnterCriticalRegion(); + ExAcquireResourceExclusiveLite(&IopDatabaseResource, TRUE); + + /* Browse the whole list */ + ListEntry = IopFsNotifyChangeQueueHead.Flink; + while (ListEntry != &IopFsNotifyChangeQueueHead) + { + ChangeEntry = CONTAINING_RECORD(ListEntry, + FS_CHANGE_NOTIFY_ENTRY, + FsChangeNotifyList); + + /* If buffer is still big enough */ + if (ListSize < MaximumSize) + { + /* Reference the driver object */ + ObReferenceObject(ChangeEntry->DriverObject); + /* And pass it to the caller */ + DriverObjectList[ListSize] = ChangeEntry->DriverObject; + } + else + { + Status = STATUS_BUFFER_TOO_SMALL; + } + + /* Increase size counter */ + ListSize++; + + /* Go to the next entry */ + ListEntry = ListEntry->Flink; + } + + /* Return list size */ + *ActualNumberDriverObjects = ListSize; + + /* Release the FS lock */ + ExReleaseResourceLite(&IopDatabaseResource); + KeLeaveCriticalRegion(); + + return Status; } /* @@ -669,20 +878,21 @@ IoVerifyVolume(IN PDEVICE_OBJECT DeviceObject, PIO_STACK_LOCATION StackPtr; KEVENT Event; PIRP Irp; - NTSTATUS Status = STATUS_SUCCESS, VpbStatus; + NTSTATUS Status, VpbStatus; PDEVICE_OBJECT FileSystemDeviceObject; PVPB Vpb, NewVpb; BOOLEAN WasNotMounted = TRUE; /* Wait on the device lock */ - KeWaitForSingleObject(&DeviceObject->DeviceLock, - Executive, - KernelMode, - FALSE, - NULL); + Status = KeWaitForSingleObject(&DeviceObject->DeviceLock, + Executive, + KernelMode, + FALSE, + NULL); + ASSERT(Status == STATUS_SUCCESS); /* Reference the VPB */ - if (IopReferenceVpbForVerify(DeviceObject, &FileSystemDeviceObject, &Vpb)) + if (IopReferenceVerifyVpb(DeviceObject, &FileSystemDeviceObject, &Vpb)) { /* Initialize the event */ KeInitializeEvent(&Event, NotificationEvent, FALSE); @@ -698,7 +908,11 @@ IoVerifyVolume(IN PDEVICE_OBJECT DeviceObject, /* Allocate the IRP */ Irp = IoAllocateIrp(FileSystemDeviceObject->StackSize, FALSE); - if (!Irp) return STATUS_INSUFFICIENT_RESOURCES; + if (!Irp) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + goto Release; + } /* Set it up */ Irp->UserIosb = &IoStatusBlock; @@ -726,28 +940,37 @@ IoVerifyVolume(IN PDEVICE_OBJECT DeviceObject, } /* Dereference the VPB */ - IopDereferenceVpb(Vpb); + IopDereferenceVpbAndFree(Vpb); } /* Check if we had the wrong volume or didn't mount at all */ - if ((Status == STATUS_WRONG_VOLUME) || (WasNotMounted)) + if (Status == STATUS_WRONG_VOLUME) { /* Create a VPB */ VpbStatus = IopCreateVpb(DeviceObject); if (NT_SUCCESS(VpbStatus)) { + PoVolumeDevice(DeviceObject); + /* Mount it */ VpbStatus = IopMountVolume(DeviceObject, AllowRawMount, TRUE, FALSE, &NewVpb); + + /* If we got a new VPB, dereference it */ + if (NewVpb) + { + IopInterlockedDecrementUlong(LockQueueIoVpbLock, &NewVpb->ReferenceCount); + } } /* If we failed, remove the verify flag */ if (!NT_SUCCESS(VpbStatus)) DeviceObject->Flags &= ~DO_VERIFY_VOLUME; } +Release: /* Signal the device lock and return */ KeSetEvent(&DeviceObject->DeviceLock, IO_NO_INCREMENT, FALSE); return Status; @@ -765,28 +988,28 @@ IoRegisterFileSystem(IN PDEVICE_OBJECT DeviceObject) /* Acquire the FS lock */ KeEnterCriticalRegion(); - ExAcquireResourceExclusiveLite(&FileSystemListLock, TRUE); + ExAcquireResourceExclusiveLite(&IopDatabaseResource, TRUE); /* Check what kind of FS this is */ if (DeviceObject->DeviceType == FILE_DEVICE_DISK_FILE_SYSTEM) { /* Use the disk list */ - FsList = &IopDiskFsListHead; + FsList = &IopDiskFileSystemQueueHead; } else if (DeviceObject->DeviceType == FILE_DEVICE_NETWORK_FILE_SYSTEM) { /* Use the network device list */ - FsList = &IopNetworkFsListHead; + FsList = &IopNetworkFileSystemQueueHead; } else if (DeviceObject->DeviceType == FILE_DEVICE_CD_ROM_FILE_SYSTEM) { /* Use the CD-ROM list */ - FsList = &IopCdRomFsListHead; + FsList = &IopCdRomFileSystemQueueHead; } else if (DeviceObject->DeviceType == FILE_DEVICE_TAPE_FILE_SYSTEM) { /* Use the tape list */ - FsList = &IopTapeFsListHead; + FsList = &IopTapeFileSystemQueueHead; } /* Make sure that we have a valid list */ @@ -805,15 +1028,21 @@ IoRegisterFileSystem(IN PDEVICE_OBJECT DeviceObject) } } + /* Update operations counter */ + IopFsRegistrationOps++; + /* Clear the initializing flag */ DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; - /* Release the FS Lock */ - ExReleaseResourceLite(&FileSystemListLock); - KeLeaveCriticalRegion(); - /* Notify file systems of the addition */ IopNotifyFileSystemChange(DeviceObject, TRUE); + + /* Release the FS Lock */ + ExReleaseResourceLite(&IopDatabaseResource); + KeLeaveCriticalRegion(); + + /* Ensure driver won't be unloaded */ + IopInterlockedIncrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount); } /* @@ -827,17 +1056,26 @@ IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject) /* Acquire the FS lock */ KeEnterCriticalRegion(); - ExAcquireResourceExclusiveLite(&FileSystemListLock, TRUE); + ExAcquireResourceExclusiveLite(&IopDatabaseResource, TRUE); - /* Simply remove the entry */ - RemoveEntryList(&DeviceObject->Queue.ListEntry); + /* Simply remove the entry - if queued */ + if (DeviceObject->Queue.ListEntry.Flink) + { + RemoveEntryList(&DeviceObject->Queue.ListEntry); + } /* And notify all registered file systems */ IopNotifyFileSystemChange(DeviceObject, FALSE); + /* Update operations counter */ + IopFsRegistrationOps++; + /* Then release the lock */ - ExReleaseResourceLite(&FileSystemListLock); + ExReleaseResourceLite(&IopDatabaseResource); KeLeaveCriticalRegion(); + + /* Decrease reference count to allow unload */ + IopInterlockedDecrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount); } /* @@ -846,25 +1084,62 @@ IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject) NTSTATUS NTAPI IoRegisterFsRegistrationChange(IN PDRIVER_OBJECT DriverObject, - IN PDRIVER_FS_NOTIFICATION FSDNotificationProc) + IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine) { PFS_CHANGE_NOTIFY_ENTRY Entry; PAGED_CODE(); + /* Acquire the list lock */ + KeEnterCriticalRegion(); + ExAcquireResourceExclusiveLite(&IopDatabaseResource, TRUE); + + /* Check if that driver is already registered (successive calls) + * See MSDN note: http://msdn.microsoft.com/en-us/library/ff548499%28v=vs.85%29.aspx + */ + if (!IsListEmpty(&IopFsNotifyChangeQueueHead)) + { + Entry = CONTAINING_RECORD(IopFsNotifyChangeQueueHead.Blink, + FS_CHANGE_NOTIFY_ENTRY, + FsChangeNotifyList); + + if (Entry->DriverObject == DriverObject && + Entry->FSDNotificationProc == DriverNotificationRoutine) + { + /* Release the lock */ + ExReleaseResourceLite(&IopDatabaseResource); + + return STATUS_DEVICE_ALREADY_ATTACHED; + } + } + /* Allocate a notification entry */ Entry = ExAllocatePoolWithTag(PagedPool, sizeof(FS_CHANGE_NOTIFY_ENTRY), TAG_FS_CHANGE_NOTIFY); - if (!Entry) return(STATUS_INSUFFICIENT_RESOURCES); + if (!Entry) + { + /* Release the lock */ + ExReleaseResourceLite(&IopDatabaseResource); + + return STATUS_INSUFFICIENT_RESOURCES; + } /* Save the driver object and notification routine */ Entry->DriverObject = DriverObject; - Entry->FSDNotificationProc = FSDNotificationProc; + Entry->FSDNotificationProc = DriverNotificationRoutine; /* Insert it into the notification list */ - KeAcquireGuardedMutex(&FsChangeNotifyListLock); - InsertTailList(&FsChangeNotifyListHead, &Entry->FsChangeNotifyList); - KeReleaseGuardedMutex(&FsChangeNotifyListLock); + InsertTailList(&IopFsNotifyChangeQueueHead, &Entry->FsChangeNotifyList); + + /* Start notifying all already present FS */ + IopNotifyAlreadyRegisteredFileSystems(&IopNetworkFileSystemQueueHead, DriverNotificationRoutine, FALSE); + IopNotifyAlreadyRegisteredFileSystems(&IopCdRomFileSystemQueueHead, DriverNotificationRoutine, TRUE); + IopNotifyAlreadyRegisteredFileSystems(&IopDiskFileSystemQueueHead, DriverNotificationRoutine, TRUE); + IopNotifyAlreadyRegisteredFileSystems(&IopTapeFileSystemQueueHead, DriverNotificationRoutine, TRUE); + + /* Release the lock */ + ExReleaseResourceLite(&IopDatabaseResource); + KeLeaveCriticalRegion(); /* Reference the driver */ ObReferenceObject(DriverObject); @@ -884,11 +1159,12 @@ IoUnregisterFsRegistrationChange(IN PDRIVER_OBJECT DriverObject, PAGED_CODE(); /* Acquire the list lock */ - KeAcquireGuardedMutex(&FsChangeNotifyListLock); + KeEnterCriticalRegion(); + ExAcquireResourceExclusiveLite(&IopDatabaseResource, TRUE); /* Loop the list */ - NextEntry = FsChangeNotifyListHead.Flink; - while (NextEntry != &FsChangeNotifyListHead) + NextEntry = IopFsNotifyChangeQueueHead.Flink; + while (NextEntry != &IopFsNotifyChangeQueueHead) { /* Get the entry */ ChangeEntry = CONTAINING_RECORD(NextEntry, @@ -910,7 +1186,10 @@ IoUnregisterFsRegistrationChange(IN PDRIVER_OBJECT DriverObject, } /* Release the lock and dereference the driver */ - KeReleaseGuardedMutex(&FsChangeNotifyListLock); + ExReleaseResourceLite(&IopDatabaseResource); + KeLeaveCriticalRegion(); + + /* Dereference the driver */ ObDereferenceObject(DriverObject); } @@ -937,14 +1216,56 @@ IoReleaseVpbSpinLock(IN KIRQL Irql) } /* - * @unimplemented + * @implemented */ NTSTATUS NTAPI IoSetSystemPartition(IN PUNICODE_STRING VolumeNameString) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + NTSTATUS Status; + HANDLE RootHandle, KeyHandle; + UNICODE_STRING HKLMSystem, KeyString; + WCHAR Buffer[sizeof(L"SystemPartition") / sizeof(WCHAR)]; + + RtlInitUnicodeString(&HKLMSystem, L"\\REGISTRY\\MACHINE\\SYSTEM"); + + /* Open registry to save data (HKLM\SYSTEM) */ + Status = IopOpenRegistryKeyEx(&RootHandle, 0, &HKLMSystem, KEY_ALL_ACCESS); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Create or open Setup subkey */ + KeyString.Buffer = Buffer; + KeyString.Length = sizeof(L"Setup") - sizeof(UNICODE_NULL); + KeyString.MaximumLength = sizeof(L"Setup"); + RtlCopyMemory(Buffer, L"Setup", sizeof(L"Setup")); + Status = IopCreateRegistryKeyEx(&KeyHandle, + RootHandle, + &KeyString, + KEY_ALL_ACCESS, + REG_OPTION_NON_VOLATILE, + NULL); + ZwClose(RootHandle); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Store caller value */ + KeyString.Length = sizeof(L"SystemPartition") - sizeof(UNICODE_NULL); + KeyString.MaximumLength = sizeof(L"SystemPartition"); + RtlCopyMemory(Buffer, L"SystemPartition", sizeof(L"SystemPartition")); + Status = ZwSetValueKey(KeyHandle, + &KeyString, + 0, + REG_SZ, + VolumeNameString->Buffer, + VolumeNameString->Length + sizeof(UNICODE_NULL)); + ZwClose(KeyHandle); + + return Status; } /* diff --git a/ntoskrnl/io/pnpmgr/plugplay.c b/ntoskrnl/io/pnpmgr/plugplay.c index 9c01544bcbf..bd52f4d4a87 100644 --- a/ntoskrnl/io/pnpmgr/plugplay.c +++ b/ntoskrnl/io/pnpmgr/plugplay.c @@ -551,10 +551,20 @@ IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData) DeviceNode = IopGetDeviceNode(DeviceObject); - /* FIXME: we should stop the device, before starting it again */ +#if 0 + /* Remove the device */ + if (DeviceNode->Flags & DNF_ENUMERATED) + { + Status = IopRemoveDevice(DeviceNode); + if (!NT_SUCCESS(Status)) + { + DPRINT1("WARNING: Ignoring failed IopRemoveDevice() for %wZ (likely a driver bug)\n", &DeviceNode->InstancePath); + } + } +#endif - /* Start the device */ - IopDeviceNodeClearFlag(DeviceNode, DNF_DISABLED); + /* Reenumerate the device and its children */ + DeviceNode->Flags &= ~DNF_DISABLED; Status = IopActionConfigureChildServices(DeviceNode, DeviceNode->Parent); if (NT_SUCCESS(Status)) diff --git a/ntoskrnl/io/pnpmgr/pnpmgr.c b/ntoskrnl/io/pnpmgr/pnpmgr.c index 0d8a1995d82..5130067b289 100644 --- a/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -45,6 +45,12 @@ IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath, IN ULONG CreateOptions, OUT PHANDLE Handle); +VOID +IopCancelPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject); + +NTSTATUS +IopPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject); + PDEVICE_NODE FASTCALL IopGetDeviceNode(PDEVICE_OBJECT DeviceObject) @@ -125,6 +131,90 @@ IopInitializeDevice(PDEVICE_NODE DeviceNode, return STATUS_SUCCESS; } +static +NTSTATUS +NTAPI +IopSendEject(IN PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + PVOID Dummy; + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_EJECT; + + return IopSynchronousCall(DeviceObject, &Stack, &Dummy); +} + +static +VOID +NTAPI +IopSendSurpriseRemoval(IN PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + PVOID Dummy; + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_SURPRISE_REMOVAL; + + /* Drivers should never fail a IRP_MN_SURPRISE_REMOVAL request */ + IopSynchronousCall(DeviceObject, &Stack, &Dummy); +} + +static +NTSTATUS +NTAPI +IopQueryRemoveDevice(IN PDEVICE_OBJECT DeviceObject) +{ + PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); + IO_STACK_LOCATION Stack; + PVOID Dummy; + NTSTATUS Status; + + ASSERT(DeviceNode); + + IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVE_PENDING, + &DeviceNode->InstancePath); + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_QUERY_REMOVE_DEVICE; + + Status = IopSynchronousCall(DeviceObject, &Stack, &Dummy); + + IopNotifyPlugPlayNotification(DeviceObject, + EventCategoryTargetDeviceChange, + &GUID_TARGET_DEVICE_QUERY_REMOVE, + NULL, + NULL); + + if (!NT_SUCCESS(Status)) + { + DPRINT1("Removal vetoed by %wZ\n", &DeviceNode->InstancePath); + IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVAL_VETOED, + &DeviceNode->InstancePath); + } + + return Status; +} + +static +NTSTATUS +NTAPI +IopQueryStopDevice(IN PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + PVOID Dummy; + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_QUERY_STOP_DEVICE; + + return IopSynchronousCall(DeviceObject, &Stack, &Dummy); +} + +static VOID NTAPI IopSendRemoveDevice(IN PDEVICE_OBJECT DeviceObject) @@ -138,6 +228,50 @@ IopSendRemoveDevice(IN PDEVICE_OBJECT DeviceObject) /* Drivers should never fail a IRP_MN_REMOVE_DEVICE request */ IopSynchronousCall(DeviceObject, &Stack, &Dummy); + + IopNotifyPlugPlayNotification(DeviceObject, + EventCategoryTargetDeviceChange, + &GUID_TARGET_DEVICE_REMOVE_COMPLETE, + NULL, + NULL); +} + +static +VOID +NTAPI +IopCancelRemoveDevice(IN PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + PVOID Dummy; + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_CANCEL_REMOVE_DEVICE; + + /* Drivers should never fail a IRP_MN_CANCEL_REMOVE_DEVICE request */ + IopSynchronousCall(DeviceObject, &Stack, &Dummy); + + IopNotifyPlugPlayNotification(DeviceObject, + EventCategoryTargetDeviceChange, + &GUID_TARGET_DEVICE_REMOVE_CANCELLED, + NULL, + NULL); +} + +static +VOID +NTAPI +IopSendStopDevice(IN PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + PVOID Dummy; + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_STOP_DEVICE; + + /* Drivers should never fail a IRP_MN_STOP_DEVICE request */ + IopSynchronousCall(DeviceObject, &Stack, &Dummy); } VOID @@ -148,34 +282,29 @@ IopStartDevice2(IN PDEVICE_OBJECT DeviceObject) PDEVICE_NODE DeviceNode; NTSTATUS Status; PVOID Dummy; + DEVICE_CAPABILITIES DeviceCapabilities; /* Get the device node */ DeviceNode = IopGetDeviceNode(DeviceObject); + ASSERT(!(DeviceNode->Flags & DNF_DISABLED)); + /* Build the I/O stack locaiton */ RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); Stack.MajorFunction = IRP_MJ_PNP; Stack.MinorFunction = IRP_MN_START_DEVICE; - /* Check if we didn't already report the resources */ - if (!(DeviceNode->Flags & DNF_RESOURCE_REPORTED)) - { - /* Report them */ - Stack.Parameters.StartDevice.AllocatedResources = - DeviceNode->ResourceList; - Stack.Parameters.StartDevice.AllocatedResourcesTranslated = - DeviceNode->ResourceListTranslated; - } - - /* I don't think we set this flag yet */ - ASSERT(!(DeviceNode->Flags & DNF_STOPPED)); - + Stack.Parameters.StartDevice.AllocatedResources = + DeviceNode->ResourceList; + Stack.Parameters.StartDevice.AllocatedResourcesTranslated = + DeviceNode->ResourceListTranslated; + /* Do the call */ Status = IopSynchronousCall(DeviceObject, &Stack, &Dummy); if (!NT_SUCCESS(Status)) { /* Send an IRP_MN_REMOVE_DEVICE request */ - IopSendRemoveDevice(DeviceObject); + IopRemoveDevice(DeviceNode); /* Set the appropriate flag */ DeviceNode->Flags |= DNF_START_FAILED; @@ -184,8 +313,20 @@ IopStartDevice2(IN PDEVICE_OBJECT DeviceObject) return; } + DPRINT("Sending IRP_MN_QUERY_CAPABILITIES to device stack (after start)\n"); + + Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status); + } + + /* Invalidate device state so IRP_MN_QUERY_PNP_DEVICE_STATE is sent */ + IoInvalidateDeviceState(DeviceObject); + /* Otherwise, mark us as started */ DeviceNode->Flags |= DNF_STARTED; + DeviceNode->Flags &= ~DNF_STOPPED; /* We now need enumeration */ DeviceNode->Flags |= DNF_NEED_ENUMERATION_ONLY; @@ -204,9 +345,6 @@ IopStartAndEnumerateDevice(IN PDEVICE_NODE DeviceNode) ASSERT((DeviceNode->Flags & (DNF_RESOURCE_ASSIGNED | DNF_RESOURCE_REPORTED | DNF_NO_RESOURCE_REQUIRED))); - ASSERT((!(DeviceNode->Flags & (DNF_HAS_PROBLEM | - DNF_STARTED | - DNF_START_REQUEST_PENDING)))); /* Get the device object */ DeviceObject = DeviceNode->PhysicalDeviceObject; @@ -234,7 +372,6 @@ IopStartAndEnumerateDevice(IN PDEVICE_NODE DeviceNode) { /* Enumerate us */ IoSynchronousInvalidateDeviceRelations(DeviceObject, BusRelations); - IopDeviceNodeClearFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY); Status = STATUS_SUCCESS; } else @@ -247,6 +384,24 @@ IopStartAndEnumerateDevice(IN PDEVICE_NODE DeviceNode) return Status; } +NTSTATUS +IopStopDevice( + PDEVICE_NODE DeviceNode) +{ + NTSTATUS Status; + + DPRINT("Stopping device: %wZ\n", &DeviceNode->InstancePath); + + Status = IopQueryStopDevice(DeviceNode->PhysicalDeviceObject); + if (!NT_SUCCESS(Status)) + { + IopSendStopDevice(DeviceNode->PhysicalDeviceObject); + return STATUS_SUCCESS; + } + + return Status; +} + NTSTATUS IopStartDevice( PDEVICE_NODE DeviceNode) @@ -256,11 +411,8 @@ IopStartDevice( UNICODE_STRING KeyName; OBJECT_ATTRIBUTES ObjectAttributes; - if (DeviceNode->Flags & (DNF_STARTED | DNF_START_REQUEST_PENDING)) - { - /* Nothing to do here */ + if (DeviceNode->Flags & DNF_DISABLED) return STATUS_SUCCESS; - } Status = IopAssignDeviceResources(DeviceNode); if (!NT_SUCCESS(Status)) @@ -307,6 +459,9 @@ IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode, { IO_STATUS_BLOCK StatusBlock; IO_STACK_LOCATION Stack; + NTSTATUS Status; + HANDLE InstanceKey; + UNICODE_STRING ValueName; /* Set up the Header */ RtlZeroMemory(DeviceCaps, sizeof(DEVICE_CAPABILITIES)); @@ -320,10 +475,49 @@ IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode, Stack.Parameters.DeviceCapabilities.Capabilities = DeviceCaps; /* Send the IRP */ - return IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, - &StatusBlock, - IRP_MN_QUERY_CAPABILITIES, - &Stack); + Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject, + &StatusBlock, + IRP_MN_QUERY_CAPABILITIES, + &Stack); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IRP_MN_QUERY_CAPABILITIES failed with status 0x%x\n", Status); + return Status; + } + + DeviceNode->CapabilityFlags = *(PULONG)((ULONG_PTR)&DeviceCaps->Version + sizeof(DeviceCaps->Version)); + + if (DeviceCaps->NoDisplayInUI) + DeviceNode->UserFlags |= DNUF_DONT_SHOW_IN_UI; + else + DeviceNode->UserFlags &= DNUF_DONT_SHOW_IN_UI; + + Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0, &InstanceKey); + if (NT_SUCCESS(Status)) + { + /* Set 'Capabilities' value */ + RtlInitUnicodeString(&ValueName, L"Capabilities"); + Status = ZwSetValueKey(InstanceKey, + &ValueName, + 0, + REG_DWORD, + (PVOID)&DeviceNode->CapabilityFlags, + sizeof(ULONG)); + + /* Set 'UINumber' value */ + if (DeviceCaps->UINumber != MAXULONG) + { + RtlInitUnicodeString(&ValueName, L"UINumber"); + Status = ZwSetValueKey(InstanceKey, + &ValueName, + 0, + REG_DWORD, + &DeviceCaps->UINumber, + sizeof(ULONG)); + } + } + + return Status; } static VOID NTAPI @@ -1227,7 +1421,7 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status); } - DPRINT("Sending IRP_MN_QUERY_CAPABILITIES to device stack\n"); + DPRINT("Sending IRP_MN_QUERY_CAPABILITIES to device stack (after enumeration)\n"); Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities); if (!NT_SUCCESS(Status)) @@ -1235,7 +1429,15 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, DPRINT("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status); } - DeviceNode->CapabilityFlags = *(PULONG)((ULONG_PTR)&DeviceCapabilities + 4); + /* This bit is only check after enumeration */ + if (DeviceCapabilities.HardwareDisabled) + { + /* FIXME: Cleanup device */ + DeviceNode->Flags |= DNF_DISABLED; + return STATUS_SUCCESS; + } + else + DeviceNode->Flags &= ~DNF_DISABLED; if (!DeviceCapabilities.UniqueID) { @@ -1297,29 +1499,6 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, DPRINT1("Failed to create the instance key! (Status %lx)\n", Status); } - { - /* Set 'Capabilities' value */ - RtlInitUnicodeString(&ValueName, L"Capabilities"); - Status = ZwSetValueKey(InstanceKey, - &ValueName, - 0, - REG_DWORD, - (PVOID)&DeviceNode->CapabilityFlags, - sizeof(ULONG)); - - /* Set 'UINumber' value */ - if (DeviceCapabilities.UINumber != MAXULONG) - { - RtlInitUnicodeString(&ValueName, L"UINumber"); - Status = ZwSetValueKey(InstanceKey, - &ValueName, - 0, - REG_DWORD, - &DeviceCapabilities.UINumber, - sizeof(ULONG)); - } - } - DPRINT("Sending IRP_MN_QUERY_ID.BusQueryHardwareIDs to device stack\n"); Stack.Parameters.QueryId.IdType = BusQueryHardwareIDs; @@ -1566,6 +1745,44 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, return STATUS_SUCCESS; } +static +VOID +IopHandleDeviceRemoval( + IN PDEVICE_NODE DeviceNode, + IN PDEVICE_RELATIONS DeviceRelations) +{ + PDEVICE_NODE Child = DeviceNode->Child, NextChild; + ULONG i; + BOOLEAN Found; + + while (Child != NULL) + { + NextChild = Child->Sibling; + Found = FALSE; + + for (i = 0; i < DeviceRelations->Count; i++) + { + if (IopGetDeviceNode(DeviceRelations->Objects[i]) == Child) + { + Found = TRUE; + break; + } + } + + if (!Found) + { + IopSendSurpriseRemoval(Child->PhysicalDeviceObject); + + /* Tell the user-mode PnP manager that a device was removed */ + IopQueueTargetDeviceEvent(&GUID_DEVICE_SURPRISE_REMOVAL, + &Child->InstancePath); + + IopSendRemoveDevice(Child->PhysicalDeviceObject); + } + + Child = NextChild; + } +} NTSTATUS IopEnumerateDevice( @@ -1583,11 +1800,14 @@ IopEnumerateDevice( DPRINT("DeviceObject 0x%p\n", DeviceObject); - DPRINT("Sending GUID_DEVICE_ARRIVAL\n"); + if (DeviceNode->Flags & DNF_NEED_ENUMERATION_ONLY) + { + DeviceNode->Flags &= ~DNF_NEED_ENUMERATION_ONLY; - /* Report the device to the user-mode pnp manager */ - IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL, - &DeviceNode->InstancePath); + DPRINT("Sending GUID_DEVICE_ARRIVAL\n"); + IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL, + &DeviceNode->InstancePath); + } DPRINT("Sending IRP_MN_QUERY_DEVICE_RELATIONS to device stack\n"); @@ -1613,6 +1833,11 @@ IopEnumerateDevice( } DPRINT("Got %u PDOs\n", DeviceRelations->Count); + + /* + * Send removal IRPs for devices that have disappeared + */ + IopHandleDeviceRemoval(DeviceNode, DeviceRelations); /* * Create device nodes for all discovered devices @@ -3041,33 +3266,6 @@ PnpBusTypeGuidGet(IN USHORT Index, return Status; } -NTSTATUS -NTAPI -PpIrpQueryCapabilities(IN PDEVICE_OBJECT DeviceObject, - OUT PDEVICE_CAPABILITIES DeviceCaps) -{ - PVOID Dummy; - IO_STACK_LOCATION Stack; - - PAGED_CODE(); - - /* Set up the Header */ - RtlZeroMemory(DeviceCaps, sizeof(DEVICE_CAPABILITIES)); - DeviceCaps->Size = sizeof(DEVICE_CAPABILITIES); - DeviceCaps->Version = 1; - DeviceCaps->Address = -1; - DeviceCaps->UINumber = -1; - - /* Set up the Stack */ - RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); - Stack.MajorFunction = IRP_MJ_PNP; - Stack.MinorFunction = IRP_MN_QUERY_CAPABILITIES; - Stack.Parameters.DeviceCapabilities.Capabilities = DeviceCaps; - - /* Send the IRP */ - return IopSynchronousCall(DeviceObject, &Stack, &Dummy); -} - NTSTATUS NTAPI PnpDeviceObjectToDeviceInstance(IN PDEVICE_OBJECT DeviceObject, @@ -3327,7 +3525,7 @@ IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, case DevicePropertyAddress: /* Query the device caps */ - Status = PpIrpQueryCapabilities(DeviceObject, &DeviceCaps); + Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps); if (!NT_SUCCESS(Status) || (DeviceCaps.Address == MAXULONG)) return STATUS_OBJECT_NAME_NOT_FOUND; @@ -3465,13 +3663,114 @@ IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, } /* - * @unimplemented + * @implemented */ VOID NTAPI IoInvalidateDeviceState(IN PDEVICE_OBJECT PhysicalDeviceObject) { - UNIMPLEMENTED; + PDEVICE_NODE DeviceNode = IopGetDeviceNode(PhysicalDeviceObject); + IO_STACK_LOCATION Stack; + ULONG PnPFlags; + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_QUERY_PNP_DEVICE_STATE; + + Status = IopSynchronousCall(PhysicalDeviceObject, &Stack, (PVOID*)&PnPFlags); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IRP_MN_QUERY_PNP_DEVICE_STATE failed with status 0x%x\n", Status); + return; + } + + if (PnPFlags & PNP_DEVICE_NOT_DISABLEABLE) + DeviceNode->UserFlags |= DNUF_NOT_DISABLEABLE; + else + DeviceNode->UserFlags &= ~DNUF_NOT_DISABLEABLE; + + if (PnPFlags & PNP_DEVICE_DONT_DISPLAY_IN_UI) + DeviceNode->UserFlags |= DNUF_DONT_SHOW_IN_UI; + else + DeviceNode->UserFlags &= ~DNUF_DONT_SHOW_IN_UI; + + if ((PnPFlags & PNP_DEVICE_REMOVED) || + ((PnPFlags & PNP_DEVICE_FAILED) && !(PnPFlags & PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED))) + { + /* Surprise removal */ + + IopSendSurpriseRemoval(PhysicalDeviceObject); + + /* Tell the user-mode PnP manager that a device was removed */ + IopQueueTargetDeviceEvent(&GUID_DEVICE_SURPRISE_REMOVAL, + &DeviceNode->InstancePath); + + IopSendRemoveDevice(PhysicalDeviceObject); + } + else if ((PnPFlags & PNP_DEVICE_FAILED) && (PnPFlags & PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED)) + { + /* Stop for resource rebalance */ + + if (NT_SUCCESS(IopQueryStopDevice(PhysicalDeviceObject))) + { + IopSendStopDevice(PhysicalDeviceObject); + + DeviceNode->Flags &= ~(DNF_STARTED | DNF_START_REQUEST_PENDING); + DeviceNode->Flags |= DNF_STOPPED; + } + } + + /* Resource rebalance */ + if (PnPFlags & PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED) + { + DPRINT("Sending IRP_MN_QUERY_RESOURCES to device stack\n"); + + Status = IopInitiatePnpIrp(PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_RESOURCES, + NULL); + if (NT_SUCCESS(Status) && IoStatusBlock.Information) + { + DeviceNode->BootResources = + (PCM_RESOURCE_LIST)IoStatusBlock.Information; + IopDeviceNodeSetFlag(DeviceNode, DNF_HAS_BOOT_CONFIG); + } + else + { + DPRINT("IopInitiatePnpIrp() failed (Status %x) or IoStatusBlock.Information=NULL\n", Status); + DeviceNode->BootResources = NULL; + } + + DPRINT("Sending IRP_MN_QUERY_RESOURCE_REQUIREMENTS to device stack\n"); + + Status = IopInitiatePnpIrp(PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_RESOURCE_REQUIREMENTS, + NULL); + if (NT_SUCCESS(Status)) + { + DeviceNode->ResourceRequirements = + (PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information; + } + else + { + DPRINT("IopInitiatePnpIrp() failed (Status %08lx)\n", Status); + DeviceNode->ResourceRequirements = NULL; + } + + /* IRP_MN_FILTER_RESOURCE_REQUIREMENTS is called indirectly by IopStartDevice */ + if (IopStartDevice(DeviceNode) != STATUS_SUCCESS) + { + DPRINT1("Restart after resource rebalance failed\n"); + + DeviceNode->Flags &= ~(DNF_STARTED | DNF_START_REQUEST_PENDING); + DeviceNode->Flags |= DNF_START_FAILED; + + IopRemoveDevice(DeviceNode); + } + } } /** @@ -3629,14 +3928,379 @@ IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, return Status; } +static +NTSTATUS +IopQueryRemoveChildDevices(PDEVICE_NODE ParentDeviceNode) +{ + PDEVICE_NODE ChildDeviceNode, NextDeviceNode, FailedRemoveDevice; + NTSTATUS Status; + KIRQL OldIrql; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + Status = IopPrepareDeviceForRemoval(ChildDeviceNode->PhysicalDeviceObject); + if (!NT_SUCCESS(Status)) + { + FailedRemoveDevice = ChildDeviceNode; + goto cleanup; + } + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = NextDeviceNode; + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + return STATUS_SUCCESS; + +cleanup: + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + IopCancelPrepareDeviceForRemoval(ChildDeviceNode->PhysicalDeviceObject); + + /* IRP_MN_CANCEL_REMOVE_DEVICE is also sent to the device + * that failed the IRP_MN_QUERY_REMOVE_DEVICE request */ + if (ChildDeviceNode == FailedRemoveDevice) + return Status; + + ChildDeviceNode = NextDeviceNode; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + return Status; +} + +static +VOID +IopSendRemoveChildDevices(PDEVICE_NODE ParentDeviceNode) +{ + PDEVICE_NODE ChildDeviceNode, NextDeviceNode; + KIRQL OldIrql; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + IopSendRemoveDevice(ChildDeviceNode->PhysicalDeviceObject); + + ChildDeviceNode = NextDeviceNode; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); +} + +static +VOID +IopCancelRemoveChildDevices(PDEVICE_NODE ParentDeviceNode) +{ + PDEVICE_NODE ChildDeviceNode, NextDeviceNode; + KIRQL OldIrql; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + IopCancelPrepareDeviceForRemoval(ChildDeviceNode->PhysicalDeviceObject); + + ChildDeviceNode = NextDeviceNode; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); +} + +static +NTSTATUS +IopQueryRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations) +{ + /* This function DOES NOT dereference the device objects on SUCCESS + * but it DOES dereference device objects on FAILURE */ + + ULONG i, j; + NTSTATUS Status; + + for (i = 0; i < DeviceRelations->Count; i++) + { + Status = IopPrepareDeviceForRemoval(DeviceRelations->Objects[i]); + if (!NT_SUCCESS(Status)) + { + j = i; + goto cleanup; + } + } + + return STATUS_SUCCESS; + +cleanup: + /* IRP_MN_CANCEL_REMOVE_DEVICE is also sent to the device + * that failed the IRP_MN_QUERY_REMOVE_DEVICE request */ + for (i = 0; i <= j; i++) + { + IopCancelPrepareDeviceForRemoval(DeviceRelations->Objects[i]); + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + for (; i < DeviceRelations->Count; i++) + { + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + ExFreePool(DeviceRelations); + + return Status; +} + +static +VOID +IopSendRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations) +{ + /* This function DOES dereference the device objects in all cases */ + + ULONG i; + + for (i = 0; i < DeviceRelations->Count; i++) + { + IopSendRemoveDevice(DeviceRelations->Objects[i]); + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + + ExFreePool(DeviceRelations); +} + +static +VOID +IopCancelRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations) +{ + /* This function DOES dereference the device objects in all cases */ + + ULONG i; + + for (i = 0; i < DeviceRelations->Count; i++) + { + IopCancelPrepareDeviceForRemoval(DeviceRelations->Objects[i]); + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + + ExFreePool(DeviceRelations); +} + +VOID +IopCancelPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + IO_STATUS_BLOCK IoStatusBlock; + PDEVICE_RELATIONS DeviceRelations; + NTSTATUS Status; + + IopCancelRemoveDevice(DeviceObject); + + Stack.Parameters.QueryDeviceRelations.Type = RemovalRelations; + + Status = IopInitiatePnpIrp(DeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_RELATIONS, + &Stack); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); + DeviceRelations = NULL; + } + else + { + DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; + } + + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); +} + +NTSTATUS +IopPrepareDeviceForRemoval(IN PDEVICE_OBJECT DeviceObject) +{ + PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); + IO_STACK_LOCATION Stack; + IO_STATUS_BLOCK IoStatusBlock; + PDEVICE_RELATIONS DeviceRelations; + NTSTATUS Status; + + if (DeviceNode->UserFlags & DNUF_NOT_DISABLEABLE) + { + DPRINT1("Removal not allowed for %wZ\n", &DeviceNode->InstancePath); + return STATUS_UNSUCCESSFUL; + } + + if (IopQueryRemoveDevice(DeviceObject) != STATUS_SUCCESS) + { + DPRINT1("Removal vetoed by failing the query remove request\n"); + + IopCancelRemoveDevice(DeviceObject); + + return STATUS_UNSUCCESSFUL; + } + + Stack.Parameters.QueryDeviceRelations.Type = RemovalRelations; + + Status = IopInitiatePnpIrp(DeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_RELATIONS, + &Stack); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); + DeviceRelations = NULL; + } + else + { + DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; + } + + if (DeviceRelations) + { + Status = IopQueryRemoveDeviceRelations(DeviceRelations); + if (!NT_SUCCESS(Status)) + return Status; + } + + Status = IopQueryRemoveChildDevices(DeviceNode); + if (!NT_SUCCESS(Status)) + { + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); + return Status; + } + + if (DeviceRelations) + IopSendRemoveDeviceRelations(DeviceRelations); + IopSendRemoveChildDevices(DeviceNode); + + return STATUS_SUCCESS; +} + +NTSTATUS +IopRemoveDevice(PDEVICE_NODE DeviceNode) +{ + NTSTATUS Status; + + DPRINT("Removing device: %wZ\n", &DeviceNode->InstancePath); + + Status = IopPrepareDeviceForRemoval(DeviceNode->PhysicalDeviceObject); + if (NT_SUCCESS(Status)) + { + IopSendRemoveDevice(DeviceNode->PhysicalDeviceObject); + IopQueueTargetDeviceEvent(&GUID_DEVICE_SAFE_REMOVAL, + &DeviceNode->InstancePath); + DeviceNode->Flags |= DNF_WILL_BE_REMOVED; + return STATUS_SUCCESS; + } + + return Status; +} + /* - * @unimplemented + * @implemented */ VOID NTAPI IoRequestDeviceEject(IN PDEVICE_OBJECT PhysicalDeviceObject) { - UNIMPLEMENTED; + PDEVICE_NODE DeviceNode = IopGetDeviceNode(PhysicalDeviceObject); + PDEVICE_RELATIONS DeviceRelations; + IO_STATUS_BLOCK IoStatusBlock; + IO_STACK_LOCATION Stack; + DEVICE_CAPABILITIES Capabilities; + NTSTATUS Status; + + IopQueueTargetDeviceEvent(&GUID_DEVICE_KERNEL_INITIATED_EJECT, + &DeviceNode->InstancePath); + + if (IopQueryDeviceCapabilities(DeviceNode, &Capabilities) != STATUS_SUCCESS) + { + goto cleanup; + } + + Stack.Parameters.QueryDeviceRelations.Type = EjectionRelations; + + Status = IopInitiatePnpIrp(PhysicalDeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_RELATIONS, + &Stack); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); + DeviceRelations = NULL; + } + else + { + DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; + } + + if (DeviceRelations) + { + Status = IopQueryRemoveDeviceRelations(DeviceRelations); + if (!NT_SUCCESS(Status)) + goto cleanup; + } + + Status = IopQueryRemoveChildDevices(DeviceNode); + if (!NT_SUCCESS(Status)) + { + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); + goto cleanup; + } + + if (IopPrepareDeviceForRemoval(PhysicalDeviceObject) != STATUS_SUCCESS) + { + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); + IopCancelRemoveChildDevices(DeviceNode); + goto cleanup; + } + + if (DeviceRelations) + IopSendRemoveDeviceRelations(DeviceRelations); + IopSendRemoveChildDevices(DeviceNode); + + if (Capabilities.EjectSupported) + { + if (IopSendEject(PhysicalDeviceObject) != STATUS_SUCCESS) + { + goto cleanup; + } + } + else + { + DeviceNode->Flags |= DNF_DISABLED; + } + + IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT, + &DeviceNode->InstancePath); + + return; + +cleanup: + IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT_VETOED, + &DeviceNode->InstancePath); } /* @@ -3702,7 +4366,7 @@ IoSynchronousInvalidateDeviceRelations( } /* - * @unimplemented + * @implemented */ BOOLEAN NTAPI @@ -3712,6 +4376,11 @@ IoTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress) { - UNIMPLEMENTED; - return FALSE; + /* FIXME: Notify the resource arbiter */ + + return HalTranslateBusAddress(InterfaceType, + BusNumber, + BusAddress, + AddressSpace, + TranslatedAddress); } diff --git a/ntoskrnl/io/pnpmgr/pnpnotify.c b/ntoskrnl/io/pnpmgr/pnpnotify.c index 6e43d7143cf..372ba30b64b 100644 --- a/ntoskrnl/io/pnpmgr/pnpnotify.c +++ b/ntoskrnl/io/pnpmgr/pnpnotify.c @@ -23,6 +23,7 @@ typedef struct _PNP_NOTIFY_ENTRY PVOID Context; UNICODE_STRING Guid; PFILE_OBJECT FileObject; + PDRIVER_OBJECT DriverObject; PDRIVER_NOTIFICATION_CALLBACK_ROUTINE PnpNotificationProc; } PNP_NOTIFY_ENTRY, *PPNP_NOTIFY_ENTRY; @@ -118,7 +119,6 @@ IopNotifyPlugPlayNotification( NotificationInfos->Version = 1; NotificationInfos->Size = sizeof(TARGET_DEVICE_REMOVAL_NOTIFICATION); RtlCopyMemory(&NotificationInfos->Event, Event, sizeof(GUID)); - NotificationInfos->FileObject = (PFILE_OBJECT)EventCategoryData1; } else { @@ -176,22 +176,21 @@ IopNotifyPlugPlayNotification( } case EventCategoryTargetDeviceChange: { - if (Event != &GUID_PNP_CUSTOM_NOTIFICATION) - { - if (ChangeEntry->FileObject == (PFILE_OBJECT)EventCategoryData1) - CallCurrentEntry = TRUE; - } - else - { - Status = IoGetRelatedTargetDevice(ChangeEntry->FileObject, &EntryDeviceObject); - if (NT_SUCCESS(Status)) - { - if (DeviceObject == EntryDeviceObject) - { - ((PTARGET_DEVICE_CUSTOM_NOTIFICATION)NotificationStructure)->FileObject = ChangeEntry->FileObject; - CallCurrentEntry = TRUE; - } - } + Status = IoGetRelatedTargetDevice(ChangeEntry->FileObject, &EntryDeviceObject); + if (NT_SUCCESS(Status)) + { + if (DeviceObject == EntryDeviceObject) + { + if (Event == &GUID_PNP_CUSTOM_NOTIFICATION) + { + ((PTARGET_DEVICE_CUSTOM_NOTIFICATION)NotificationStructure)->FileObject = ChangeEntry->FileObject; + } + else + { + ((PTARGET_DEVICE_REMOVAL_NOTIFICATION)NotificationStructure)->FileObject = ChangeEntry->FileObject; + } + CallCurrentEntry = TRUE; + } } } default: @@ -319,6 +318,7 @@ IoRegisterPlugPlayNotification(IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory, Entry->PnpNotificationProc = CallbackRoutine; Entry->EventCategory = EventCategory; Entry->Context = Context; + Entry->DriverObject = DriverObject; switch (EventCategory) { case EventCategoryDeviceInterfaceChange: @@ -377,9 +377,14 @@ IoUnregisterPlugPlayNotification(IN PVOID NotificationEntry) DPRINT("__FUNCTION__(NotificationEntry %p) called\n", Entry); KeAcquireGuardedMutex(&PnpNotifyListLock); - RtlFreeUnicodeString(&Entry->Guid); RemoveEntryList(&Entry->PnpNotifyList); KeReleaseGuardedMutex(&PnpNotifyListLock); + RtlFreeUnicodeString(&Entry->Guid); + + ObDereferenceObject(Entry->DriverObject); + + ExFreePoolWithTag(Entry, TAG_PNP_NOTIFY); + return STATUS_SUCCESS; } diff --git a/ntoskrnl/io/pnpmgr/pnpres.c b/ntoskrnl/io/pnpmgr/pnpres.c index ac1884e2d11..ee0fdca8b99 100644 --- a/ntoskrnl/io/pnpmgr/pnpres.c +++ b/ntoskrnl/io/pnpmgr/pnpres.c @@ -758,6 +758,13 @@ IopTranslateDeviceResources( DPRINT1("Failed to translate port resource (Start: 0x%I64x)\n", DescriptorRaw->u.Port.Start.QuadPart); goto cleanup; } + + if (AddressSpace == 0) + { + /* This is actually a memory resource */ + DescriptorRaw->Type = CmResourceTypeMemory; + DescriptorTranslated->Type = CmResourceTypeMemory; + } break; } case CmResourceTypeInterrupt: @@ -793,6 +800,13 @@ IopTranslateDeviceResources( DPRINT1("Failed to translate memory resource (Start: 0xI64x)\n", DescriptorRaw->u.Memory.Start.QuadPart); goto cleanup; } + + if (AddressSpace != 0) + { + /* This is actually an I/O port resource */ + DescriptorRaw->Type = CmResourceTypePort; + DescriptorTranslated->Type = CmResourceTypePort; + } } case CmResourceTypeDma: diff --git a/ntoskrnl/io/pnpmgr/pnputil.c b/ntoskrnl/io/pnpmgr/pnputil.c index f274f3db679..9bbccaca5ee 100644 --- a/ntoskrnl/io/pnpmgr/pnputil.c +++ b/ntoskrnl/io/pnpmgr/pnputil.c @@ -178,7 +178,7 @@ PnpRegSzToString(IN PWCHAR RegSzData, for (p = RegSzData; p < pp; p++) if (!*p) break; /* Return it */ - if (StringLength) *StringLength = p - RegSzData; + if (StringLength) *StringLength = (p - RegSzData) * sizeof(WCHAR); return TRUE; } diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c index 4c18d4c721d..5dc2ee39858 100644 --- a/ntoskrnl/kd/kdio.c +++ b/ntoskrnl/kd/kdio.c @@ -29,7 +29,19 @@ KD_PORT_INFORMATION SerialPortInfo = { DEFAULT_DEBUG_PORT, DEFAULT_DEBUG_BAUD_RA /* Current Port in use. FIXME: Do we support more then one? */ ULONG KdpPort; -/* DEBUG LOG FUNCTIONS *******************************************************/ +#define KdpScreenLineLenght 80 +CHAR KdpScreenLineBuffer[KdpScreenLineLenght + 1] = ""; +ULONG KdpScreenLineBufferPos = 0, KdpScreenLineLength = 0; + +const ULONG KdpDmesgBufferSize = 128 * 1024; // 512*1024; // 5*1024*1024; +PCHAR KdpDmesgBuffer = NULL; +volatile ULONG KdpDmesgCurrentPosition = 0; +volatile ULONG KdpDmesgFreeBytes = 0; +volatile ULONG KdbDmesgTotalWritten = 0; +KSPIN_LOCK KdpDmesgLogSpinLock; +volatile BOOLEAN KdbpIsInDmesgMode = FALSE; + +/* FILE DEBUG LOG FUNCTIONS **************************************************/ VOID NTAPI @@ -45,8 +57,14 @@ KdpLoggerThread(PVOID Context) KeWaitForSingleObject(&KdpLoggerThreadEvent, 0, KernelMode, FALSE, NULL); /* Bug */ + /* Keep KdpCurrentPosition and KdpFreeBytes values in local + * variables to avoid their possible change from Producer part, + * KdpPrintToLogFile function + */ end = KdpCurrentPosition; num = KdpFreeBytes; + + /* Now securely calculate values, based on local variables */ beg = (end + num) % KdpBufferSize; num = KdpBufferSize - num; @@ -144,6 +162,7 @@ KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable, IO_STATUS_BLOCK Iosb; HANDLE ThreadHandle; KPRIORITY Priority; + SIZE_T MemSizeMBs; if (!KdpDebugMode.File) return; @@ -171,6 +190,8 @@ KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable, /* Display separator + ReactOS version at start of the debug log */ DPRINT1("---------------------------------------------------------------\n"); DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n"); + MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024; + DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs); } else if (BootPhase == 2) { @@ -272,6 +293,7 @@ NTAPI KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase) { + SIZE_T MemSizeMBs; if (!KdpDebugMode.Serial) return; if (BootPhase == 0) @@ -297,6 +319,8 @@ KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable, /* Display separator + ReactOS version at start of the debug log */ DPRINT1("-----------------------------------------------------\n"); DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n"); + MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024; + DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs); DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions); DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, KeLoaderBlock->NtHalPathName, @@ -311,13 +335,121 @@ KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable, /* SCREEN FUNCTIONS **********************************************************/ +/* + * Screen debug logger function KdpScreenPrint() writes text messages into + * KdpDmesgBuffer, using it as a circular buffer. KdpDmesgBuffer contents could + * be later (re)viewed using dmesg command of kdbg. KdpScreenPrint() protects + * KdpDmesgBuffer from simultaneous writes by use of KdpDmesgLogSpinLock. + */ VOID NTAPI KdpScreenPrint(LPSTR Message, ULONG Length) { - /* Call HAL */ - HalDisplayString(Message); + ULONG beg, end, num; + KIRQL OldIrql; + PCHAR pch = (PCHAR) Message; + + while (*pch) + { + if(*pch == '\b') + { + /* HalDisplayString does not support '\b'. Workaround it and use '\r' */ + if(KdpScreenLineLength > 0) + { + /* Remove last character from buffer */ + KdpScreenLineBuffer[--KdpScreenLineLength] = '\0'; + KdpScreenLineBufferPos = KdpScreenLineLength; + + /* Clear row and print line again */ + HalDisplayString("\r"); + HalDisplayString(KdpScreenLineBuffer); + } + } + else + { + KdpScreenLineBuffer[KdpScreenLineLength++] = *pch; + KdpScreenLineBuffer[KdpScreenLineLength] = '\0'; + } + + if(*pch == '\n' || KdpScreenLineLength == KdpScreenLineLenght) + { + /* Print buffered characters */ + if(KdpScreenLineBufferPos != KdpScreenLineLength) + HalDisplayString(KdpScreenLineBuffer + KdpScreenLineBufferPos); + + /* Clear line buffer */ + KdpScreenLineBuffer[0] = '\0'; + KdpScreenLineLength = KdpScreenLineBufferPos = 0; + } + + ++pch; + } + + /* Print buffered characters */ + if(KdpScreenLineBufferPos != KdpScreenLineLength) + { + HalDisplayString(KdpScreenLineBuffer + KdpScreenLineBufferPos); + KdpScreenLineBufferPos = KdpScreenLineLength; + } + + /* Dmesg: store Message in the buffer to show it later */ + if (KdbpIsInDmesgMode) + return; + + if (KdpDmesgBuffer == NULL) + return; + + /* Acquire the printing spinlock without waiting at raised IRQL */ + while (TRUE) + { + /* Wait when the spinlock becomes available */ + while (!KeTestSpinLock(&KdpDmesgLogSpinLock)); + + /* Spinlock was free, raise IRQL */ + KeRaiseIrql(HIGH_LEVEL, &OldIrql); + + /* Try to get the spinlock */ + if (KeTryToAcquireSpinLockAtDpcLevel(&KdpDmesgLogSpinLock)) + break; + + /* Someone else got the spinlock, lower IRQL back */ + KeLowerIrql(OldIrql); + } + + /* Invariant: always_true(KdpDmesgFreeBytes == KdpDmesgBufferSize); + * set num to min(KdpDmesgFreeBytes, Length). + */ + num = (Length < KdpDmesgFreeBytes) ? Length : KdpDmesgFreeBytes; + beg = KdpDmesgCurrentPosition; + if (num != 0) + { + end = (beg + num) % KdpDmesgBufferSize; + if (end > beg) + { + RtlCopyMemory(KdpDmesgBuffer + beg, Message, Length); + } + else + { + RtlCopyMemory(KdpDmesgBuffer + beg, Message, KdpDmesgBufferSize - beg); + RtlCopyMemory(KdpDmesgBuffer, Message + (KdpDmesgBufferSize - beg), end); + } + KdpDmesgCurrentPosition = end; + + /* Counting the total bytes written */ + KdbDmesgTotalWritten += num; + } + + /* Release spinlock */ + KiReleaseSpinLock(&KdpDmesgLogSpinLock); + + /* Lower IRQL */ + KeLowerIrql(OldIrql); + + /* Optional step(?): find out a way to notify about buffer exhaustion, + * and possibly fall into kbd to use dmesg command: user will read + * debug messages before they will be wiped over by next writes. + */ } VOID @@ -325,6 +457,7 @@ NTAPI KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase) { + SIZE_T MemSizeMBs; if (!KdpDebugMode.Screen) return; if (BootPhase == 0) @@ -336,6 +469,30 @@ KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable, /* Register as a Provider */ InsertTailList(&KdProviders, &DispatchTable->KdProvidersList); } + else if (BootPhase == 1) + { + /* Allocate a buffer for dmesg log buffer. +1 for terminating null, + * see kdbp_cli.c:KdbpCmdDmesg()/2 + */ + KdpDmesgBuffer = ExAllocatePool(NonPagedPool, KdpDmesgBufferSize + 1); + RtlZeroMemory(KdpDmesgBuffer, KdpDmesgBufferSize + 1); + KdpDmesgFreeBytes = KdpDmesgBufferSize; + KdbDmesgTotalWritten = 0; + + /* Initialize spinlock */ + KeInitializeSpinLock(&KdpDmesgLogSpinLock); + + /* Display separator + ReactOS version at start of the debug log */ + DPRINT1("-----------------------------------------------------\n"); + DPRINT1("ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n"); + MemSizeMBs = MmNumberOfPhysicalPages * PAGE_SIZE / 1024 / 1024; + DPRINT1("%u System Processor [%u MB Memory]\n", KeNumberProcessors, MemSizeMBs); + DPRINT1("Command Line: %s\n", KeLoaderBlock->LoadOptions); + DPRINT1("ARC Paths: %s %s %s %s\n", KeLoaderBlock->ArcBootDeviceName, + KeLoaderBlock->NtHalPathName, + KeLoaderBlock->ArcHalDeviceName, + KeLoaderBlock->NtBootPathName); + } else if (BootPhase == 2) { HalDisplayString("\n Screen debugging enabled\n\n"); diff --git a/ntoskrnl/kd64/kddata.c b/ntoskrnl/kd64/kddata.c index 3d2be608f59..901ffb21a7c 100644 --- a/ntoskrnl/kd64/kddata.c +++ b/ntoskrnl/kd64/kddata.c @@ -356,7 +356,7 @@ PULONG KdComponentTable[104] = &Kd_ENDOFTABLE_Mask, }; -ULONG KdComponentTableSize = sizeof(KdComponentTable); +ULONG KdComponentTableSize = sizeof(KdComponentTable) / sizeof(KdComponentTable[0]); // // Debugger Data diff --git a/ntoskrnl/kdbg/i386/kdb_help.S b/ntoskrnl/kdbg/i386/kdb_help.S index e586f14c5e7..9884c66e1c5 100644 --- a/ntoskrnl/kdbg/i386/kdb_help.S +++ b/ntoskrnl/kdbg/i386/kdb_help.S @@ -116,7 +116,7 @@ _KdbEnter: /* * Return to the caller. */ - iret + iretd PUBLIC _KdbpStackSwitchAndCall@8 diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c index 6d349f1658e..9f9d6c1d3bd 100644 --- a/ntoskrnl/kdbg/kdb_cli.c +++ b/ntoskrnl/kdbg/kdb_cli.c @@ -42,6 +42,13 @@ #define KEY_SCAN_UP 72 #define KEY_SCAN_DOWN 80 +/* Scan codes of keyboard keys: */ +#define KEYSC_END 0x004f +#define KEYSC_PAGEUP 0x0049 +#define KEYSC_PAGEDOWN 0x0051 +#define KEYSC_HOME 0x0047 +#define KEYSC_ARROWUP 0x0048 + #define KDB_ENTER_CONDITION_TO_STRING(cond) \ ((cond) == KdbDoNotEnter ? "never" : \ ((cond) == KdbEnterAlways ? "always" : \ @@ -81,6 +88,7 @@ static BOOLEAN KdbpCmdBugCheck(ULONG Argc, PCHAR Argv[]); static BOOLEAN KdbpCmdFilter(ULONG Argc, PCHAR Argv[]); static BOOLEAN KdbpCmdSet(ULONG Argc, PCHAR Argv[]); static BOOLEAN KdbpCmdHelp(ULONG Argc, PCHAR Argv[]); +static BOOLEAN KdbpCmdDmesg(ULONG Argc, PCHAR Argv[]); /* GLOBALS *******************************************************************/ @@ -101,6 +109,15 @@ static LONG KdbNumberOfColsTerminal = -1; PCHAR KdbInitFileBuffer = NULL; /* Buffer where KDBinit file is loaded into during initialization */ BOOLEAN KdbpBugCheckRequested = FALSE; +/* Vars for dmesg */ +/* defined in ../kd/kdio.c, declare here: */ +extern volatile BOOLEAN KdbpIsInDmesgMode; +extern const ULONG KdpDmesgBufferSize; +extern PCHAR KdpDmesgBuffer; +extern volatile ULONG KdpDmesgCurrentPosition; +extern volatile ULONG KdpDmesgFreeBytes; +extern volatile ULONG KdbDmesgTotalWritten; + static const struct { PCHAR Name; @@ -150,6 +167,8 @@ static const struct { "bugcheck", "bugcheck", "Bugchecks the system.", KdbpCmdBugCheck }, { "filter", "filter [error|warning|trace|info|level]+|-[componentname|default]", "Enable/disable debug channels", KdbpCmdFilter }, { "set", "set [var] [value]", "Sets var to value or displays value of var.", KdbpCmdSet }, + { "dmesg", "dmesg", "Display debug messages on screen, with navigation on pages.", KdbpCmdDmesg }, + { "kmsg", "kmsg", "Kernel dmesg. Alias for dmesg.", KdbpCmdDmesg }, { "help", "help", "Display help screen.", KdbpCmdHelp } }; @@ -1895,6 +1914,58 @@ KdbpCmdBugCheck( return FALSE; } +VOID +KdbpPager( + IN PCHAR Buffer, + IN ULONG BufLength); + +/*!\brief Display debug messages on screen, with paging. + * + * Keys for per-page view: Home, End, PageUp, Arrow Up, PageDown, + * all others are as PageDown. + */ +static BOOLEAN +KdbpCmdDmesg( + ULONG Argc, + PCHAR Argv[]) +{ + ULONG beg, end; + + KdbpIsInDmesgMode = TRUE; /* Toggle logging flag */ + if (!KdpDmesgBuffer) + { + KdbpPrint("Dmesg: error, buffer is not allocated! /DEBUGPORT=SCREEN kernel param required for dmesg.\n"); + return TRUE; + } + + KdbpPrint("*** Dmesg *** TotalWritten=%lu, BufferSize=%lu, CurrentPosition=%lu\n", + KdbDmesgTotalWritten, KdpDmesgBufferSize, KdpDmesgCurrentPosition); + + // Pass data to the pager: + end = KdpDmesgCurrentPosition; + beg = (end + KdpDmesgFreeBytes) % KdpDmesgBufferSize; + + // no roll-overs, and overwritten=lost bytes + if (KdbDmesgTotalWritten <= KdpDmesgBufferSize) + { + // show buffer (KdpDmesgBuffer + beg, num) + KdbpPager(KdpDmesgBuffer, KdpDmesgCurrentPosition); + } + else + { + // show 2 buffers: (KdpDmesgBuffer + beg, KdpDmesgBufferSize - beg) + // and: (KdpDmesgBuffer, end) + KdbpPager(KdpDmesgBuffer + beg, KdpDmesgBufferSize - beg); + KdbpPrint("*** Dmesg: buffer rollup ***\n"); + KdbpPager(KdpDmesgBuffer, end); + } + KdbpPrint("*** Dmesg: end of output ***\n"); + + KdbpIsInDmesgMode = FALSE; /* Toggle logging flag */ + + return TRUE; +} + /*!\brief Sets or displays a config variables value. */ static BOOLEAN @@ -2110,6 +2181,7 @@ KdbpCmdHelp( * * \note Doesn't correctly handle \\t and terminal escape sequences when calculating the * number of lines required to print a single line from the Buffer in the terminal. + * Prints maximum 4096 chars, because of its buffer size. */ VOID KdbpPrint( @@ -2215,12 +2287,12 @@ KdbpPrint( if (KdbNumberOfRowsTerminal <= 0) { /* Set number of rows to the default. */ - KdbNumberOfRowsTerminal = 24; + KdbNumberOfRowsTerminal = 23; //24; //Mna.: 23 for SCREEN debugport } else if (KdbNumberOfColsTerminal <= 0) { /* Set number of cols to the default. */ - KdbNumberOfColsTerminal = 80; + KdbNumberOfColsTerminal = 75; //80; //Mna.: 75 for SCREEN debugport } } @@ -2256,6 +2328,7 @@ KdbpPrint( DbgPrint("\n"); DbgPrint("--- Press q to abort, any other key to continue ---"); + RowsPrintedByTerminal++; /* added by Mna. */ if (KdbDebugState & KD_DEBUG_KDSERIAL) c = KdbpGetCharSerial(); @@ -2337,6 +2410,350 @@ KdbpPrint( } } +/** memrchr(), explicitly defined, since was absent in MinGW of RosBE. */ +/* + * Reverse memchr() + * Find the last occurrence of 'c' in the buffer 's' of size 'n'. + */ +void * +memrchr(const void *s, int c, size_t n) +{ + const unsigned char *cp; + + if (n != 0) + { + cp = (unsigned char *)s + n; + do + { + if (*(--cp) == (unsigned char)c) + return (void *)cp; + } while (--n != 0); + } + return NULL; +} + +/*!\brief Calculate pointer position for N lines upper of current position. + * + * \param Buffer Characters buffer to operate on. + * \param BufLength Buffer size. + * + * \note Calculate pointer position for N lines upper of current displaying + * position within the given buffer. + * + * Used by KdbpPager(). + * Now N lines count is hardcoded to KdbNumberOfRowsTerminal. + */ +PCHAR +CountOnePageUp(PCHAR Buffer, ULONG BufLength, PCHAR pCurPos) +{ + PCHAR p; + // p0 is initial guess of Page Start + ULONG p0len = KdbNumberOfRowsTerminal * KdbNumberOfColsTerminal; + PCHAR p0 = pCurPos - p0len; + PCHAR prev_p = p0, p1; + ULONG j; + + if (pCurPos < Buffer) + pCurPos = Buffer; + ASSERT(pCurPos <= Buffer + BufLength); + + p = memrchr(p0, '\n', p0len); + if (NULL == p) + p = p0; + for (j = KdbNumberOfRowsTerminal; j--; ) + { + p1 = memrchr(p0, '\n', p-p0); + prev_p = p; + p = p1; + if (NULL == p) + { + p = prev_p; + if (NULL == p) + p = p0; + break; + } + int linesCnt = (KdbNumberOfColsTerminal+prev_p-p-2) / KdbNumberOfColsTerminal; + if (linesCnt > 1) + j -= linesCnt-1; + } + + ASSERT(p != 0); + ++p; + return p; +} + +/*!\brief Prints the given string with, page by page. + * + * \param Buffer Characters buffer to print. + * \param BufferLen Buffer size. + * + * \note Doesn't correctly handle \\t and terminal escape sequences when calculating the + * number of lines required to print a single line from the Buffer in the terminal. + * Maximum length of buffer is limited only by memory size. + * + * Note: BufLength should be greater then (KdbNumberOfRowsTerminal * KdbNumberOfColsTerminal). + * + */ +VOID +KdbpPager( + IN PCHAR Buffer, + IN ULONG BufLength) +{ + static CHAR InBuffer[4096]; + static BOOLEAN TerminalInitialized = FALSE; + static BOOLEAN TerminalConnected = FALSE; + static BOOLEAN TerminalReportsSize = TRUE; + CHAR c = '\0'; + PCHAR p, p2; + ULONG Length; + ULONG i, j; + LONG RowsPrintedByTerminal; + ULONG ScanCode; + + if( BufLength == 0) + return; + + /* Check if the user has aborted output of the current command */ + if (KdbOutputAborted) + return; + + /* Initialize the terminal */ + if (!TerminalInitialized) + { + DbgPrint("\x1b[7h"); /* Enable linewrap */ + + /* Query terminal type */ + /*DbgPrint("\x1b[Z");*/ + DbgPrint("\x05"); + + TerminalInitialized = TRUE; + Length = 0; + KeStallExecutionProcessor(100000); + + for (;;) + { + c = KdbpTryGetCharSerial(5000); + if (c == -1) + break; + + InBuffer[Length++] = c; + if (Length >= (sizeof (InBuffer) - 1)) + break; + } + + InBuffer[Length] = '\0'; + if (Length > 0) + TerminalConnected = TRUE; + } + + /* Get number of rows and columns in terminal */ + if ((KdbNumberOfRowsTerminal < 0) || (KdbNumberOfColsTerminal < 0) || + (KdbNumberOfRowsPrinted) == 0) /* Refresh terminal size each time when number of rows printed is 0 */ + { + if ((KdbDebugState & KD_DEBUG_KDSERIAL) && TerminalConnected && TerminalReportsSize) + { + /* Try to query number of rows from terminal. A reply looks like "\x1b[8;24;80t" */ + TerminalReportsSize = FALSE; + KeStallExecutionProcessor(100000); + DbgPrint("\x1b[18t"); + c = KdbpTryGetCharSerial(5000); + + if (c == KEY_ESC) + { + c = KdbpTryGetCharSerial(5000); + if (c == '[') + { + Length = 0; + + for (;;) + { + c = KdbpTryGetCharSerial(5000); + if (c == -1) + break; + + InBuffer[Length++] = c; + if (isalpha(c) || Length >= (sizeof (InBuffer) - 1)) + break; + } + + InBuffer[Length] = '\0'; + if (InBuffer[0] == '8' && InBuffer[1] == ';') + { + for (i = 2; (i < Length) && (InBuffer[i] != ';'); i++); + + if (Buffer[i] == ';') + { + Buffer[i++] = '\0'; + + /* Number of rows is now at Buffer + 2 and number of cols at Buffer + i */ + KdbNumberOfRowsTerminal = strtoul(InBuffer + 2, NULL, 0); + KdbNumberOfColsTerminal = strtoul(InBuffer + i, NULL, 0); + TerminalReportsSize = TRUE; + } + } + } + /* Clear further characters */ + while ((c = KdbpTryGetCharSerial(5000)) != -1); + } + } + + if (KdbNumberOfRowsTerminal <= 0) + { + /* Set number of rows to the default. */ + KdbNumberOfRowsTerminal = 24; + } + else if (KdbNumberOfColsTerminal <= 0) + { + /* Set number of cols to the default. */ + KdbNumberOfColsTerminal = 80; + } + } + + /* Get the string */ + p = Buffer; + + while (p[0] != '\0') + { + if ( p > Buffer+BufLength) + { + DbgPrint("Dmesg: error, p > Buffer+BufLength,d=%d", p - (Buffer+BufLength)); + return; + } + i = strcspn(p, "\n"); + + // Are we out of buffer? + if (p + i > Buffer + BufLength) + // Leaving pager function: + break; + + /* Calculate the number of lines which will be printed in the terminal + * when outputting the current line + */ + if (i > 0) + RowsPrintedByTerminal = (i + KdbNumberOfColsPrinted - 1) / KdbNumberOfColsTerminal; + else + RowsPrintedByTerminal = 0; + + if (p[i] == '\n') + RowsPrintedByTerminal++; + + /*DbgPrint("!%d!%d!%d!%d!", KdbNumberOfRowsPrinted, KdbNumberOfColsPrinted, i, RowsPrintedByTerminal);*/ + + /* Display a prompt if we printed one screen full of text */ + if (KdbNumberOfRowsTerminal > 0 && + (LONG)(KdbNumberOfRowsPrinted + RowsPrintedByTerminal) >= KdbNumberOfRowsTerminal) + { + if (KdbNumberOfColsPrinted > 0) + DbgPrint("\n"); + + DbgPrint("--- Press q to abort, e/End,h/Home,u/PgUp, other key/PgDn ---"); + RowsPrintedByTerminal++; + + if (KdbDebugState & KD_DEBUG_KDSERIAL) + c = KdbpGetCharSerial(); + else + c = KdbpGetCharKeyboard(&ScanCode); + + if (c == '\r') + { + /* Try to read '\n' which might follow '\r' - if \n is not received here + * it will be interpreted as "return" when the next command should be read. + */ + if (KdbDebugState & KD_DEBUG_KDSERIAL) + c = KdbpTryGetCharSerial(5); + else + c = KdbpTryGetCharKeyboard(&ScanCode, 5); + } + + //DbgPrint("\n"); //Consize version: don't show pressed key + DbgPrint(" '%c'/scan=%04x\n", c, ScanCode); // Shows pressed key + + if (c == 'q') + { + KdbOutputAborted = TRUE; + return; + } + if ( ScanCode == KEYSC_END || c=='e') + { + PCHAR pBufEnd = Buffer + BufLength; + p = CountOnePageUp(Buffer, BufLength, pBufEnd); + i = strcspn(p, "\n"); + } + else if (ScanCode == KEYSC_PAGEUP || c=='u') + { + p = CountOnePageUp(Buffer, BufLength, p); + i = strcspn(p, "\n"); + } + else if (ScanCode == KEYSC_HOME || c=='h') + { + p = Buffer; + i = strcspn(p, "\n"); + } + else if (ScanCode == KEYSC_ARROWUP) + { + p = CountOnePageUp(Buffer, BufLength, p); + i = strcspn(p, "\n"); + } + + KdbNumberOfRowsPrinted = 0; + KdbNumberOfColsPrinted = 0; + } + + /* Insert a NUL after the line and print only the current line. */ + if (p[i] == '\n' && p[i + 1] != '\0') + { + c = p[i + 1]; + p[i + 1] = '\0'; + } + else + { + c = '\0'; + } + + /* Remove escape sequences from the line if there's no terminal connected */ + if (!TerminalConnected) + { + while ((p2 = strrchr(p, '\x1b'))) /* Look for escape character */ + { + if (p2[1] == '[') + { + j = 2; + while (!isalpha(p2[j++])); + strcpy(p2, p2 + j); + } + else + { + strcpy(p2, p2 + 1); + } + } + } + + // The main printing of the current line: + DbgPrint(p); + + // restore not null char with saved: + if (c != '\0') + p[i + 1] = c; + + /* Set p to the start of the next line and + * remember the number of rows/cols printed + */ + p += i; + if (p[0] == '\n') + { + p++; + KdbNumberOfColsPrinted = 0; + } + else + { + ASSERT(p[0] == '\0'); + KdbNumberOfColsPrinted += i; + } + + KdbNumberOfRowsPrinted += RowsPrintedByTerminal; + } +} + /*!\brief Appends a command to the command history * * \param Command Pointer to the command to append to the history. @@ -2701,6 +3118,9 @@ KdbpCliMainLoop( /* Main loop */ do { + /* Reset the number of rows/cols printed */ + KdbNumberOfRowsPrinted = KdbNumberOfColsPrinted = 0; + /* Print the prompt */ KdbpPrint("kdb:> "); diff --git a/ntoskrnl/kdbg/kdb_symbols.c b/ntoskrnl/kdbg/kdb_symbols.c index 98176e36757..7d23f6c8cb4 100644 --- a/ntoskrnl/kdbg/kdb_symbols.c +++ b/ntoskrnl/kdbg/kdb_symbols.c @@ -404,6 +404,7 @@ KdbpSymAddCachedFile( IN PROSSYM_INFO RosSymInfo) { PIMAGE_SYMBOL_INFO_CACHE CacheEntry; + KIRQL Irql; DPRINT("Adding symbol file: RosSymInfo = %p\n", RosSymInfo); @@ -420,7 +421,9 @@ KdbpSymAddCachedFile( ASSERT(CacheEntry->FileName.Buffer); CacheEntry->RefCount = 1; CacheEntry->RosSymInfo = RosSymInfo; - InsertTailList(&SymbolFileListHead, &CacheEntry->ListEntry); /* FIXME: Lock list? */ + KeAcquireSpinLock(&SymbolFileListLock, &Irql); + InsertTailList(&SymbolFileListHead, &CacheEntry->ListEntry); + KeReleaseSpinLock(&SymbolFileListLock, Irql); } /*! \brief Remove a symbol file (reference) from the cache. diff --git a/ntoskrnl/kdbg/kdb_symbols.cmake.c b/ntoskrnl/kdbg/kdb_symbols.cmake.c new file mode 100644 index 00000000000..2d43732b20f --- /dev/null +++ b/ntoskrnl/kdbg/kdb_symbols.cmake.c @@ -0,0 +1,718 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/dbg/kdb_symbols.c + * PURPOSE: Getting symbol information... + * + * PROGRAMMERS: David Welch (welch@cwcom.net) + * Colin Finck (colin@reactos.org) + */ + +/* INCLUDES *****************************************************************/ + +#include + +#define NDEBUG +#include "../cache/section/newmm.h" +#include + +/* GLOBALS ******************************************************************/ + +typedef struct _IMAGE_SYMBOL_INFO_CACHE +{ + LIST_ENTRY ListEntry; + ULONG RefCount; + UNICODE_STRING FileName; + PROSSYM_INFO RosSymInfo; +} +IMAGE_SYMBOL_INFO_CACHE, *PIMAGE_SYMBOL_INFO_CACHE; + +typedef struct _ROSSYM_KM_OWN_CONTEXT { + LARGE_INTEGER FileOffset; + PFILE_OBJECT FileObject; +} ROSSYM_KM_OWN_CONTEXT, *PROSSYM_KM_OWN_CONTEXT; + +static BOOLEAN LoadSymbols; +static LIST_ENTRY SymbolFileListHead; +static KSPIN_LOCK SymbolFileListLock; +static PROSSYM_INFO KdbpRosSymInfo; +static ULONG_PTR KdbpImageBase; +BOOLEAN KdbpSymbolsInitialized = FALSE; + +/* FUNCTIONS ****************************************************************/ + +static BOOLEAN +KdbpSeekSymFile(PVOID FileContext, ULONG_PTR Target) +{ + PROSSYM_KM_OWN_CONTEXT Context = (PROSSYM_KM_OWN_CONTEXT)FileContext; + Context->FileOffset.QuadPart = Target; + return TRUE; +} + +static BOOLEAN +KdbpReadSymFile(PVOID FileContext, PVOID Buffer, ULONG Length) +{ + PROSSYM_KM_OWN_CONTEXT Context = (PROSSYM_KM_OWN_CONTEXT)FileContext; + IO_STATUS_BLOCK Iosb; + NTSTATUS Status = MiSimpleRead + (Context->FileObject, + &Context->FileOffset, + Buffer, + Length, + FALSE, + &Iosb); + return NT_SUCCESS(Status); +} + +static PROSSYM_KM_OWN_CONTEXT +KdbpCaptureFileForSymbols(PFILE_OBJECT FileObject) +{ + PROSSYM_KM_OWN_CONTEXT Context = ExAllocatePool(NonPagedPool, sizeof(*Context)); + if (!Context) return NULL; + ObReferenceObject(FileObject); + Context->FileOffset.QuadPart = 0; + Context->FileObject = FileObject; + return Context; +} + +static VOID +KdbpReleaseFileForSymbols(PROSSYM_KM_OWN_CONTEXT Context) +{ + ObDereferenceObject(Context->FileObject); + ExFreePool(Context); +} + +static BOOLEAN +KdbpSymSearchModuleList( + IN PLIST_ENTRY current_entry, + IN PLIST_ENTRY end_entry, + IN PLONG Count, + IN PVOID Address, + IN LPCWSTR Name, + IN INT Index, + OUT PLDR_DATA_TABLE_ENTRY* pLdrEntry) +{ + while (current_entry && current_entry != end_entry) + { + *pLdrEntry = CONTAINING_RECORD(current_entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); + + if ((Address && Address >= (PVOID)(*pLdrEntry)->DllBase && Address < (PVOID)((ULONG_PTR)(*pLdrEntry)->DllBase + (*pLdrEntry)->SizeOfImage)) || + (Name && !_wcsnicmp((*pLdrEntry)->BaseDllName.Buffer, Name, (*pLdrEntry)->BaseDllName.Length / sizeof(WCHAR))) || + (Index >= 0 && (*Count)++ == Index)) + { + return TRUE; + } + + current_entry = current_entry->Flink; + } + + return FALSE; +} + +/*! \brief Find a module... + * + * \param Address If \a Address is not NULL the module containing \a Address + * is searched. + * \param Name If \a Name is not NULL the module named \a Name will be + * searched. + * \param Index If \a Index is >= 0 the Index'th module will be returned. + * \param pLdrEntry Pointer to a PLDR_DATA_TABLE_ENTRY which is filled. + * + * \retval TRUE Module was found, \a pLdrEntry was filled. + * \retval FALSE No module was found. + */ +BOOLEAN +KdbpSymFindModule( + IN PVOID Address OPTIONAL, + IN LPCWSTR Name OPTIONAL, + IN INT Index OPTIONAL, + OUT PLDR_DATA_TABLE_ENTRY* pLdrEntry) +{ + LONG Count = 0; + PEPROCESS CurrentProcess; + + /* First try to look up the module in the kernel module list. */ + if(KdbpSymSearchModuleList(PsLoadedModuleList.Flink, + &PsLoadedModuleList, + &Count, + Address, + Name, + Index, + pLdrEntry)) + { + return TRUE; + } + + /* That didn't succeed. Try the module list of the current process now. */ + CurrentProcess = PsGetCurrentProcess(); + + if(!CurrentProcess || !CurrentProcess->Peb || !CurrentProcess->Peb->Ldr) + return FALSE; + + return KdbpSymSearchModuleList(CurrentProcess->Peb->Ldr->InLoadOrderModuleList.Flink, + &CurrentProcess->Peb->Ldr->InLoadOrderModuleList, + &Count, + Address, + Name, + Index, + pLdrEntry); +} + +/*! \brief Print address... + * + * Tries to lookup line number, file name and function name for the given + * address and prints it. + * If no such information is found the address is printed in the format + * , otherwise the format will be + * + * + * \retval TRUE Module containing \a Address was found, \a Address was printed. + * \retval FALSE No module containing \a Address was found, nothing was printed. + */ +BOOLEAN +KdbSymPrintAddress( + IN PVOID Address, + IN PKTRAP_FRAME Context) +{ + int i; + PMEMORY_AREA MemoryArea = NULL; + PROS_SECTION_OBJECT SectionObject; + PLDR_DATA_TABLE_ENTRY LdrEntry; + PROSSYM_KM_OWN_CONTEXT FileContext; + ULONG_PTR RelativeAddress; + NTSTATUS Status; + ROSSYM_LINEINFO LineInfo = {0}; + + struct { + enum _ROSSYM_REGNAME regname; + size_t ctx_offset; + } regmap[] = { + { ROSSYM_X86_EDX, FIELD_OFFSET(KTRAP_FRAME, Edx) }, + { ROSSYM_X86_EAX, FIELD_OFFSET(KTRAP_FRAME, Eax) }, + { ROSSYM_X86_ECX, FIELD_OFFSET(KTRAP_FRAME, Ecx) }, + { ROSSYM_X86_EBX, FIELD_OFFSET(KTRAP_FRAME, Ebx) }, + { ROSSYM_X86_ESI, FIELD_OFFSET(KTRAP_FRAME, Esi) }, + { ROSSYM_X86_EDI, FIELD_OFFSET(KTRAP_FRAME, Edi) }, + { ROSSYM_X86_EBP, FIELD_OFFSET(KTRAP_FRAME, Ebp) }, + { ROSSYM_X86_ESP, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp) } + }; + + if (Context) + { + DPRINT("Has Context %x (EBP %x)\n", Context, Context->Ebp); + LineInfo.Flags = ROSSYM_LINEINFO_HAS_REGISTERS; + + for (i = 0; i < sizeof(regmap) / sizeof(regmap[0]); i++) { + memcpy + (&LineInfo.Registers.Registers[regmap[i].regname], + ((PCHAR)Context)+regmap[i].ctx_offset, + sizeof(ULONG_PTR)); + DPRINT("DWARF REG[%d] -> %x\n", regmap[i].regname, LineInfo.Registers.Registers[regmap[i].regname]); + } + } + + if (!KdbpSymbolsInitialized || !KdbpSymFindModule(Address, NULL, -1, &LdrEntry)) + return FALSE; + + RelativeAddress = (ULONG_PTR)Address - (ULONG_PTR)LdrEntry->DllBase; + Status = KdbSymGetAddressInformation + (LdrEntry->PatchInformation, + RelativeAddress, + &LineInfo); + + if (NT_SUCCESS(Status)) + { + DbgPrint("<%wZ:%x (%s:%d (%s))>", + &LdrEntry->BaseDllName, RelativeAddress, LineInfo.FileName, LineInfo.LineNumber, LineInfo.FunctionName); + if (Context) + { + int i; + char *comma = ""; + DbgPrint("("); + for (i = 0; i < LineInfo.NumParams; i++) { + DbgPrint + ("%s%s=%llx", + comma, + LineInfo.Parameters[i].ValueName, + LineInfo.Parameters[i].Value); + comma = ","; + } + DbgPrint(")"); + } + + return TRUE; + } + else if (Address < MmSystemRangeStart) + { + MemoryArea = MmLocateMemoryAreaByAddress(&PsGetCurrentProcess()->Vm, Address); + if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_SECTION_VIEW) + { + goto end; + } + SectionObject = MemoryArea->Data.SectionData.Section; + if (!(SectionObject->AllocationAttributes & SEC_IMAGE)) goto end; + if (MemoryArea->StartingAddress != (PVOID)KdbpImageBase) + { + if (KdbpRosSymInfo) + { + RosSymDelete(KdbpRosSymInfo); + KdbpRosSymInfo = NULL; + KdbpImageBase = 0; + } + + if ((FileContext = KdbpCaptureFileForSymbols(SectionObject->FileObject))) + { + if (RosSymCreateFromFile(FileContext, &KdbpRosSymInfo)) + KdbpImageBase = (ULONG_PTR)MemoryArea->StartingAddress; + + KdbpReleaseFileForSymbols(FileContext); + } + } + + if (KdbpRosSymInfo) + { + RelativeAddress = (ULONG_PTR)Address - KdbpImageBase; + RosSymFreeInfo(&LineInfo); + Status = KdbSymGetAddressInformation + (KdbpRosSymInfo, + RelativeAddress, + &LineInfo); + if (NT_SUCCESS(Status)) + { + DbgPrint + ("<%wZ:%x (%s:%d (%s))>", + &SectionObject->FileObject->FileName, + RelativeAddress, + LineInfo.FileName, + LineInfo.LineNumber, + LineInfo.FunctionName); + + if (Context) + { + int i; + char *comma = ""; + DbgPrint("("); + for (i = 0; i < LineInfo.NumParams; i++) { + DbgPrint + ("%s%s=%llx", + comma, + LineInfo.Parameters[i].ValueName, + LineInfo.Parameters[i].Value); + comma = ","; + } + DbgPrint(")"); + } + + return TRUE; + } + } + } + +end: + DbgPrint("<%wZ:%x>", &LdrEntry->BaseDllName, RelativeAddress); + + return TRUE; +} + + +/*! \brief Get information for an address (source file, line number, + * function name) + * + * \param SymbolInfo Pointer to ROSSYM_INFO. + * \param RelativeAddress Relative address to look up. + * \param LineNumber Pointer to an ULONG which is filled with the line + * number (can be NULL) + * \param FileName Pointer to an array of CHARs which gets filled with + * the filename (can be NULL) + * \param FunctionName Pointer to an array of CHARs which gets filled with + * the function name (can be NULL) + * + * \returns NTSTATUS error code. + * \retval STATUS_SUCCESS At least one of the requested informations was found. + * \retval STATUS_UNSUCCESSFUL None of the requested information was found. + */ +NTSTATUS +KdbSymGetAddressInformation( + IN PROSSYM_INFO RosSymInfo, + IN ULONG_PTR RelativeAddress, + IN PROSSYM_LINEINFO LineInfo) +{ + if (!KdbpSymbolsInitialized || + !RosSymInfo || + !RosSymGetAddressInformation(RosSymInfo, RelativeAddress, LineInfo)) + { + return STATUS_UNSUCCESSFUL; + } + + return STATUS_SUCCESS; +} + +/*! \brief Find cached symbol file. + * + * Looks through the list of cached symbol files and tries to find an already + * loaded one. + * + * \param FileName FileName of the symbol file to look for. + * + * \returns A pointer to the cached symbol info. + * \retval NULL No cached info found. + * + * \sa KdbpSymAddCachedFile + */ +static PROSSYM_INFO +KdbpSymFindCachedFile( + IN PUNICODE_STRING FileName) +{ + PIMAGE_SYMBOL_INFO_CACHE Current; + PLIST_ENTRY CurrentEntry; + KIRQL Irql; + + KeAcquireSpinLock(&SymbolFileListLock, &Irql); + + CurrentEntry = SymbolFileListHead.Flink; + while (CurrentEntry != (&SymbolFileListHead)) + { + Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry); + + if (RtlEqualUnicodeString(&Current->FileName, FileName, TRUE)) + { + Current->RefCount++; + KeReleaseSpinLock(&SymbolFileListLock, Irql); + DPRINT("Found cached file!\n"); + return Current->RosSymInfo; + } + + CurrentEntry = CurrentEntry->Flink; + } + + KeReleaseSpinLock(&SymbolFileListLock, Irql); + + DPRINT("Cached file not found!\n"); + return NULL; +} + +/*! \brief Add a symbol file to the cache. + * + * \param FileName Filename of the symbol file. + * \param RosSymInfo Pointer to the symbol info. + * + * \sa KdbpSymRemoveCachedFile + */ +static VOID +KdbpSymAddCachedFile( + IN PUNICODE_STRING FileName, + IN PROSSYM_INFO RosSymInfo) +{ + PIMAGE_SYMBOL_INFO_CACHE CacheEntry; + + DPRINT("Adding symbol file: RosSymInfo = %p\n", RosSymInfo); + + /* allocate entry */ + CacheEntry = ExAllocatePoolWithTag(NonPagedPool, sizeof (IMAGE_SYMBOL_INFO_CACHE), TAG_KDBS); + ASSERT(CacheEntry); + RtlZeroMemory(CacheEntry, sizeof (IMAGE_SYMBOL_INFO_CACHE)); + + /* fill entry */ + CacheEntry->FileName.Buffer = ExAllocatePoolWithTag(NonPagedPool, + FileName->Length, + TAG_KDBS); + RtlCopyUnicodeString(&CacheEntry->FileName, FileName); + ASSERT(CacheEntry->FileName.Buffer); + CacheEntry->RefCount = 1; + CacheEntry->RosSymInfo = RosSymInfo; + InsertTailList(&SymbolFileListHead, &CacheEntry->ListEntry); /* FIXME: Lock list? */ +} + +/*! \brief Remove a symbol file (reference) from the cache. + * + * Tries to find a cache entry matching the given symbol info and decreases + * it's reference count. If the refcount is 0 after decreasing it the cache + * entry will be removed from the list and freed. + * + * \param RosSymInfo Pointer to the symbol info. + * + * \sa KdbpSymAddCachedFile + */ +static VOID +KdbpSymRemoveCachedFile( + IN PROSSYM_INFO RosSymInfo) +{ + PIMAGE_SYMBOL_INFO_CACHE Current; + PLIST_ENTRY CurrentEntry; + KIRQL Irql; + + KeAcquireSpinLock(&SymbolFileListLock, &Irql); + + CurrentEntry = SymbolFileListHead.Flink; + while (CurrentEntry != (&SymbolFileListHead)) + { + Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry); + + if (Current->RosSymInfo == RosSymInfo) /* found */ + { + ASSERT(Current->RefCount > 0); + Current->RefCount--; + if (Current->RefCount < 1) + { + RemoveEntryList(&Current->ListEntry); + RosSymDelete(Current->RosSymInfo); + ExFreePool(Current); + } + + KeReleaseSpinLock(&SymbolFileListLock, Irql); + return; + } + + CurrentEntry = CurrentEntry->Flink; + } + + KeReleaseSpinLock(&SymbolFileListLock, Irql); +} + +/*! \brief Loads a symbol file. + * + * \param FileName Filename of the symbol file to load. + * \param RosSymInfo Pointer to a ROSSYM_INFO which gets filled. + * + * \sa KdbpSymUnloadModuleSymbols + */ +static VOID +KdbpSymLoadModuleSymbols( + IN PUNICODE_STRING FileName, + OUT PROSSYM_INFO *RosSymInfo) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE FileHandle; + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + PFILE_OBJECT FileObject; + PROSSYM_KM_OWN_CONTEXT FileContext; + + /* Allow KDB to break on module load */ + KdbModuleLoaded(FileName); + + if (!LoadSymbols) + { + *RosSymInfo = NULL; + return; + } + + /* Try to find cached (already loaded) symbol file */ + *RosSymInfo = KdbpSymFindCachedFile(FileName); + if (*RosSymInfo) + { + DPRINT("Found cached symbol file %wZ\n", FileName); + return; + } + + /* Open the file */ + InitializeObjectAttributes(&ObjectAttributes, + FileName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + DPRINT("Attempting to open image: %wZ\n", FileName); + + Status = ZwOpenFile(&FileHandle, + FILE_READ_ACCESS, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ|FILE_SHARE_WRITE, + FILE_SYNCHRONOUS_IO_NONALERT); + if (!NT_SUCCESS(Status)) + { + DPRINT("Could not open image file: %wZ\n", FileName); + return; + } + + DPRINT("Loading symbols from %wZ...\n", FileName); + + Status = ObReferenceObjectByHandle + (FileHandle, + FILE_READ_DATA|SYNCHRONIZE, + NULL, + KernelMode, + (PVOID*)&FileObject, + NULL); + + if (!NT_SUCCESS(Status)) + { + DPRINT("Could not get the file object\n"); + ZwClose(FileHandle); + return; + } + + if ((FileContext = KdbpCaptureFileForSymbols(FileObject))) + { + if (RosSymCreateFromFile(FileContext, RosSymInfo)) + { + /* add file to cache */ + KdbpSymAddCachedFile(FileName, *RosSymInfo); + DPRINT("Installed symbols: %wZ %p\n", FileName, *RosSymInfo); + } + KdbpReleaseFileForSymbols(FileContext); + } + + ObDereferenceObject(FileObject); + ZwClose(FileHandle); +} + +VOID +KdbSymProcessSymbols( + IN PLDR_DATA_TABLE_ENTRY LdrEntry) +{ + if (!LoadSymbols) + { + LdrEntry->PatchInformation = NULL; + return; + } + + /* Remove symbol info if it already exists */ + if (LdrEntry->PatchInformation) + KdbpSymRemoveCachedFile(LdrEntry->PatchInformation); + + /* Error loading symbol info, try to load it from file */ + KdbpSymLoadModuleSymbols(&LdrEntry->FullDllName, + (PROSSYM_INFO*)&LdrEntry->PatchInformation); + + /* It already added symbols to cache */ + DPRINT("Installed symbols: %wZ@%p-%p %p\n", + &LdrEntry->BaseDllName, + LdrEntry->DllBase, + (PVOID)(LdrEntry->SizeOfImage + (ULONG_PTR)LdrEntry->DllBase), + LdrEntry->PatchInformation); +} + +VOID +NTAPI +KdbDebugPrint( + PCH Message, + ULONG Length) +{ + /* Nothing here */ +} + +static PVOID KdbpSymAllocMem(ULONG_PTR size) +{ + return ExAllocatePoolWithTag(NonPagedPool, size, 'RSYM'); +} + +static VOID KdbpSymFreeMem(PVOID Area) +{ + return ExFreePool(Area); +} + +static BOOLEAN KdbpSymReadMem(PVOID FileContext, PVOID TargetDebug, PVOID SourceMem, ULONG Size) +{ + return NT_SUCCESS(KdbpSafeReadMemory(TargetDebug, SourceMem, Size)); +} + +static ROSSYM_CALLBACKS KdbpRosSymCallbacks = { + KdbpSymAllocMem, KdbpSymFreeMem, + KdbpReadSymFile, KdbpSeekSymFile, + KdbpSymReadMem +}; + +/*! \brief Initializes the KDB symbols implementation. + * + * \param DispatchTable Pointer to the KD dispatch table + * \param BootPhase Phase of initialization + */ +VOID +NTAPI +KdbInitialize( + PKD_DISPATCH_TABLE DispatchTable, + ULONG BootPhase) +{ + PCHAR p1, p2; + SHORT Found = FALSE; + CHAR YesNo; + PLDR_DATA_TABLE_ENTRY LdrEntry; + + DPRINT("KdbSymInit() BootPhase=%d\n", BootPhase); + + LoadSymbols = FALSE; + +#if DBG + /* Load symbols only if we have 96Mb of RAM or more */ + if (MmNumberOfPhysicalPages >= 0x6000) + LoadSymbols = TRUE; +#endif + + if (BootPhase == 0) + { + /* Write out the functions that we support for now */ + DispatchTable->KdpInitRoutine = KdpKdbgInit; + DispatchTable->KdpPrintRoutine = KdbDebugPrint; + + /* Register as a Provider */ + InsertTailList(&KdProviders, &DispatchTable->KdProvidersList); + + /* Perform actual initialization of symbol module */ + //NtoskrnlModuleObject->PatchInformation = NULL; + //LdrHalModuleObject->PatchInformation = NULL; + + InitializeListHead(&SymbolFileListHead); + KeInitializeSpinLock(&SymbolFileListLock); + + /* Check the command line for /LOADSYMBOLS, /NOLOADSYMBOLS, + * /LOADSYMBOLS={YES|NO}, /NOLOADSYMBOLS={YES|NO} */ + ASSERT(KeLoaderBlock); + p1 = KeLoaderBlock->LoadOptions; + while('\0' != *p1 && NULL != (p2 = strchr(p1, '/'))) + { + p2++; + Found = 0; + if (0 == _strnicmp(p2, "LOADSYMBOLS", 11)) + { + Found = +1; + p2 += 11; + } + else if (0 == _strnicmp(p2, "NOLOADSYMBOLS", 13)) + { + Found = -1; + p2 += 13; + } + if (0 != Found) + { + while (isspace(*p2)) + { + p2++; + } + if ('=' == *p2) + { + p2++; + while (isspace(*p2)) + { + p2++; + } + YesNo = toupper(*p2); + if ('N' == YesNo || 'F' == YesNo || '0' == YesNo) + { + Found = -1 * Found; + } + } + LoadSymbols = (0 < Found); + } + p1 = p2; + } + + RosSymInit(&KdbpRosSymCallbacks); + } + else if (BootPhase == 3) + { + /* Load symbols for NTOSKRNL.EXE. + It is always the first module in PsLoadedModuleList. KeLoaderBlock can't be used here as its content is just temporary. */ + LdrEntry = CONTAINING_RECORD(PsLoadedModuleList.Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); + KdbSymProcessSymbols(LdrEntry); + + /* Also load them for HAL.DLL. */ + LdrEntry = CONTAINING_RECORD(PsLoadedModuleList.Flink->Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); + KdbSymProcessSymbols(LdrEntry); + + KdbpSymbolsInitialized = TRUE; + } +} + +/* EOF */ diff --git a/ntoskrnl/ke/amd64/boot.S b/ntoskrnl/ke/amd64/boot.S index 4efbef3f94a..03da69ede75 100644 --- a/ntoskrnl/ke/amd64/boot.S +++ b/ntoskrnl/ke/amd64/boot.S @@ -8,7 +8,6 @@ /* INCLUDES ******************************************************************/ #include - #include EXTERN KiInitializeKernelAndGotoIdleLoop:PROC @@ -19,7 +18,6 @@ EXTERN KiInitializeKernelAndGotoIdleLoop:PROC /* FUNCTIONS *****************************************************************/ .code64 -.text /** * VOID diff --git a/ntoskrnl/ke/amd64/ctxswitch.S b/ntoskrnl/ke/amd64/ctxswitch.S index 1c9b13e5737..b0c52c233bc 100644 --- a/ntoskrnl/ke/amd64/ctxswitch.S +++ b/ntoskrnl/ke/amd64/ctxswitch.S @@ -10,7 +10,6 @@ /* INCLUDES ******************************************************************/ #include - #include /* FUNCTIONS ****************************************************************/ @@ -166,7 +165,7 @@ KiSwapContext: mov [rsp+0], rbp /* Get the PCR */ - mov rbx, gs:[KPCR_SELF] + mov rbx, gs:[PcSelf] /* Get the current thread */ mov rdi, rcx diff --git a/ntoskrnl/ke/amd64/spinlock.c b/ntoskrnl/ke/amd64/spinlock.c index 9c485fd8d43..ae19862c255 100644 --- a/ntoskrnl/ke/amd64/spinlock.c +++ b/ntoskrnl/ke/amd64/spinlock.c @@ -23,14 +23,14 @@ KIRQL KeAcquireSpinLockRaiseToSynch(PKSPIN_LOCK SpinLock) { -#ifndef CONFIG_SMP KIRQL OldIrql; - /* Simply raise to dispatch */ - KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); + + /* Raise to sync */ + KeRaiseIrql(SYNCH_LEVEL, &OldIrql); + + /* Acquire the lock and return */ + KxAcquireSpinLock(SpinLock); return OldIrql; -#else - UNIMPLEMENTED; -#endif } /* @@ -40,14 +40,14 @@ KIRQL NTAPI KeAcquireSpinLockRaiseToDpc(PKSPIN_LOCK SpinLock) { -#ifndef CONFIG_SMP KIRQL OldIrql; - /* Simply raise to dispatch */ + + /* Raise to dispatch */ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); + + /* Acquire the lock and return */ + KxAcquireSpinLock(SpinLock); return OldIrql; -#else - UNIMPLEMENTED; -#endif } /* @@ -58,12 +58,9 @@ NTAPI KeReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL OldIrql) { -#ifndef CONFIG_SMP - /* Simply lower IRQL back */ + /* Release the lock and lower IRQL back */ + KxReleaseSpinLock(SpinLock); KeLowerIrql(OldIrql); -#else - UNIMPLEMENTED; -#endif } /* @@ -72,14 +69,14 @@ KeReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber) { -#ifndef CONFIG_SMP KIRQL OldIrql; - /* Simply raise to dispatch */ + + /* Raise to dispatch */ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); + + /* Acquire the lock */ + KxAcquireSpinLock(KeGetCurrentPrcb()->LockQueue[LockNumber].Lock); // HACK return OldIrql; -#else - UNIMPLEMENTED; -#endif } /* @@ -88,14 +85,14 @@ KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber) KIRQL KeAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber) { -#ifndef CONFIG_SMP KIRQL OldIrql; - /* Simply raise to dispatch */ - KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); + + /* Raise to synch */ + KeRaiseIrql(SYNCH_LEVEL, &OldIrql); + + /* Acquire the lock */ + KxAcquireSpinLock(KeGetCurrentPrcb()->LockQueue[LockNumber].Lock); // HACK return OldIrql; -#else - UNIMPLEMENTED; -#endif } /* @@ -105,14 +102,18 @@ VOID KeAcquireInStackQueuedSpinLock(IN PKSPIN_LOCK SpinLock, IN PKLOCK_QUEUE_HANDLE LockHandle) { -#ifndef CONFIG_SMP - /* Simply raise to dispatch */ + /* Set up the lock */ + LockHandle->LockQueue.Next = NULL; + LockHandle->LockQueue.Lock = SpinLock; + + /* Raise to dispatch */ KeRaiseIrql(DISPATCH_LEVEL, &LockHandle->OldIrql); -#else - UNIMPLEMENTED; -#endif + + /* Acquire the lock */ + KxAcquireSpinLock(LockHandle->LockQueue.Lock); // HACK } + /* * @implemented */ @@ -120,14 +121,18 @@ VOID KeAcquireInStackQueuedSpinLockRaiseToSynch(IN PKSPIN_LOCK SpinLock, IN PKLOCK_QUEUE_HANDLE LockHandle) { -#ifndef CONFIG_SMP - /* Simply raise to synch */ + /* Set up the lock */ + LockHandle->LockQueue.Next = NULL; + LockHandle->LockQueue.Lock = SpinLock; + + /* Raise to synch */ KeRaiseIrql(SYNCH_LEVEL, &LockHandle->OldIrql); -#else - UNIMPLEMENTED; -#endif + + /* Acquire the lock */ + KxAcquireSpinLock(LockHandle->LockQueue.Lock); // HACK } + /* * @implemented */ @@ -135,28 +140,26 @@ VOID KeReleaseQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, IN KIRQL OldIrql) { -#ifndef CONFIG_SMP - /* Simply lower IRQL back */ + /* Release the lock */ + KxReleaseSpinLock(KeGetCurrentPrcb()->LockQueue[LockNumber].Lock); // HACK + + /* Lower IRQL back */ KeLowerIrql(OldIrql); -#else - UNIMPLEMENTED; -#endif } + /* * @implemented */ VOID KeReleaseInStackQueuedSpinLock(IN PKLOCK_QUEUE_HANDLE LockHandle) { -#ifndef CONFIG_SMP /* Simply lower IRQL back */ + KxReleaseSpinLock(LockHandle->LockQueue.Lock); // HACK KeLowerIrql(LockHandle->OldIrql); -#else - UNIMPLEMENTED; -#endif } + /* * @implemented */ @@ -168,10 +171,15 @@ KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, /* Simply raise to dispatch */ KeRaiseIrql(DISPATCH_LEVEL, OldIrql); + /* Add an explicit memory barrier to prevent the compiler from reordering + memory accesses across the borders of spinlocks */ + KeMemoryBarrierWithoutFence(); + /* Always return true on UP Machines */ return TRUE; #else UNIMPLEMENTED; + ASSERT(FALSE); #endif } @@ -186,10 +194,15 @@ KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, /* Simply raise to dispatch */ KeRaiseIrql(DISPATCH_LEVEL, OldIrql); + /* Add an explicit memory barrier to prevent the compiler from reordering + memory accesses across the borders of spinlocks */ + KeMemoryBarrierWithoutFence(); + /* Always return true on UP Machines */ return TRUE; #else UNIMPLEMENTED; + ASSERT(FALSE); #endif } diff --git a/ntoskrnl/ke/amd64/trap.S b/ntoskrnl/ke/amd64/trap.S index e0831d24f1e..4c41a877102 100644 --- a/ntoskrnl/ke/amd64/trap.S +++ b/ntoskrnl/ke/amd64/trap.S @@ -259,7 +259,6 @@ ENDM /* FUNCTIONS *****************************************************************/ -.text .code64 ALIGN 8 @@ -907,6 +906,8 @@ PUBLIC KiUnexpectedInterrupt .ENDP KiUnexpectedInterrupt #ifdef _MSC_VER +#undef lgdt +#undef lidt //void __lgdt(void *Source); PUBLIC __lgdt diff --git a/ntoskrnl/ke/freeldr.c b/ntoskrnl/ke/freeldr.c deleted file mode 100644 index 2e0d17ce178..00000000000 --- a/ntoskrnl/ke/freeldr.c +++ /dev/null @@ -1,1416 +0,0 @@ -/* - * PROJECT: ReactOS Kernel - * LICENSE: GPL - See COPYING in the top level directory - * FILE: ntoskrnl/ke/freeldr.c - * PURPOSE: FreeLDR Bootstrap Support - * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) - */ - -/* INCLUDES *****************************************************************/ - -#if !defined(_X86_) - -#include -#define NDEBUG -#include - -#if defined(_PPC_) -#include -#define KERNEL_RVA(x) RVA(x,0x80800000) -#define KERNEL_DESCRIPTOR_PAGE(x) (((ULONG_PTR)x + KernelBase) >> PAGE_SHIFT) -#else -#define KERNEL_RVA(x) RVA(x,KSEG0_BASE) -#define KERNEL_DESCRIPTOR_PAGE(x) (((ULONG_PTR)x &~ KSEG0_BASE) >> PAGE_SHIFT) -#endif - -typedef struct _BIOS_MEMORY_DESCRIPTOR -{ - ULONG BlockBase; - ULONG BlockSize; -} BIOS_MEMORY_DESCRIPTOR, *PBIOS_MEMORY_DESCRIPTOR; - -/* GLOBALS *******************************************************************/ - -/* FreeLDR Loader Data */ -PROS_LOADER_PARAMETER_BLOCK KeRosLoaderBlock; -ADDRESS_RANGE KeMemoryMap[64]; -ULONG KeMemoryMapRangeCount; - -/* NT Loader Module/Descriptor Count */ -ULONG BldrCurrentMd; -ULONG BldrCurrentMod; - -/* NT Loader Data. Eats up about 100KB! */ -LOADER_PARAMETER_BLOCK BldrLoaderBlock; // 0x0000 -LOADER_PARAMETER_EXTENSION BldrExtensionBlock; // 0x0060 -CHAR BldrCommandLine[256]; // 0x00DC -CHAR BldrArcBootPath[64]; // 0x01DC -CHAR BldrArcHalPath[64]; // 0x021C -CHAR BldrNtHalPath[64]; // 0x025C -CHAR BldrNtBootPath[64]; // 0x029C -LDR_DATA_TABLE_ENTRY BldrModules[64]; // 0x02DC -MEMORY_ALLOCATION_DESCRIPTOR BldrMemoryDescriptors[60]; // 0x14DC -WCHAR BldrModuleStrings[64][260]; // 0x19DC -WCHAR BldrModuleStringsFull[64][260]; // 0x9BDC -NLS_DATA_BLOCK BldrNlsDataBlock; // 0x11DDC -SETUP_LOADER_BLOCK BldrSetupBlock; // 0x11DE8 -ARC_DISK_INFORMATION BldrArcDiskInfo; // 0x12134 -CHAR BldrArcNames[32][256]; // 0x1213C -ARC_DISK_SIGNATURE BldrDiskInfo[32]; // 0x1413C -CHAR BldrArcHwBuffer[16 * 1024]; // 0x1843C - -/* BIOS Memory Map */ -BIOS_MEMORY_DESCRIPTOR BiosMemoryDescriptors[16] = { { 0, 0 }, }; -PBIOS_MEMORY_DESCRIPTOR BiosMemoryDescriptorList = BiosMemoryDescriptors; - -/* ARC Memory Map */ -ULONG NumberDescriptors = 0; -MEMORY_DESCRIPTOR MDArray[60] = { { 0, 0, 0 }, }; - -#if defined(_X86_) - -/* The Boot TSS */ -KTSS KiBootTss; - -/* Old boot style IDT */ -KIDTENTRY KiBootIdt[256]; - -/* The Boot GDT */ -KGDTENTRY KiBootGdt[256] = -{ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_NULL */ - {0xffff, 0x0000, {{0x00, 0x9b, 0xcf, 0x00}}}, /* KGDT_R0_CODE */ - {0xffff, 0x0000, {{0x00, 0x93, 0xcf, 0x00}}}, /* KGDT_R0_DATA */ - {0xffff, 0x0000, {{0x00, 0xfb, 0xcf, 0x00}}}, /* KGDT_R3_CODE */ - {0xffff, 0x0000, {{0x00, 0xf3, 0xcf, 0x00}}}, /* KGDT_R3_DATA*/ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_TSS */ - {0x0001, 0xf000, {{0xdf, 0x93, 0xc0, 0xff}}}, /* KGDT_R0_PCR */ - {0x0fff, 0x0000, {{0x00, 0xf3, 0x40, 0x00}}}, /* KGDT_R3_TEB */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_UNUSED */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_LDT */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_DF_TSS */ - {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}} /* KGDT_NMI_TSS */ -}; - -/* GDT Descriptor */ -KDESCRIPTOR KiGdtDescriptor = {0, sizeof(KiBootGdt) - 1, (ULONG)KiBootGdt}; - -#endif - -/* FUNCTIONS *****************************************************************/ - -PMEMORY_ALLOCATION_DESCRIPTOR -NTAPI -KiRosGetMdFromArray(VOID) -{ - /* Return the next MD from the list, but make sure we don't overflow */ - if (BldrCurrentMd > 60) ASSERT(FALSE); - return &BldrMemoryDescriptors[BldrCurrentMd++]; -} - -VOID -NTAPI -KiRosAddBiosBlock(ULONG Address, - ULONG Size) -{ - PBIOS_MEMORY_DESCRIPTOR BiosBlock = BiosMemoryDescriptorList; - - /* Loop our BIOS Memory Descriptor List */ - while (BiosBlock->BlockSize > 0) - { - /* Check if we've found a matching head block */ - if (Address + Size == BiosBlock->BlockBase) - { - /* Simply enlarge and rebase it */ - BiosBlock->BlockBase = Address; - BiosBlock->BlockSize += Size; - break; - } - - /* Check if we've found a matching tail block */ - if (Address == (BiosBlock->BlockBase + BiosBlock->BlockSize)) - { - /* Simply enlarge it */ - BiosBlock->BlockSize += Size; - break; - } - - /* Nothing suitable found, try the next block */ - BiosBlock++; - } - - /* No usable blocks found, found a free block instead */ - if (!BiosBlock->BlockSize) - { - /* Write our data */ - BiosBlock->BlockBase = Address; - BiosBlock->BlockSize = Size; - - /* Create a new block and mark it as the end of the array */ - BiosBlock++; - BiosBlock->BlockBase = BiosBlock->BlockSize = 0L; - } -} - -VOID -NTAPI -KiRosBuildBiosMemoryMap(VOID) -{ - ULONG BlockBegin, BlockEnd; - ULONG j; - - /* Loop the BIOS Memory Map */ - for (j = 0; j < KeMemoryMapRangeCount; j++) - { - /* Get the start and end addresses */ - BlockBegin = KeMemoryMap[j].BaseAddrLow; - BlockEnd = KeMemoryMap[j].BaseAddrLow + KeMemoryMap[j].LengthLow - 1; - - /* Make sure this isn't a > 4GB descriptor */ - if (!KeMemoryMap[j].BaseAddrHigh) - { - /* Make sure we don't overflow */ - if (BlockEnd < BlockBegin) BlockEnd = 0xFFFFFFFF; - - /* Check if this is free memory */ - if (KeMemoryMap[j].Type == 1) - { - /* Add it to our BIOS descriptors */ - KiRosAddBiosBlock(BlockBegin, BlockEnd - BlockBegin + 1); - } - } - } -} - -NTSTATUS -NTAPI -KiRosAllocateArcDescriptor(IN ULONG PageBegin, - IN ULONG PageEnd, - IN MEMORY_TYPE MemoryType) -{ - ULONG i; - - /* Loop all our descriptors */ - for (i = 0; i < NumberDescriptors; i++) - { - /* Attempt to fing a free block that describes our region */ - if ((MDArray[i].MemoryType == MemoryFree) && - (MDArray[i].BasePage <= PageBegin) && - (MDArray[i].BasePage + MDArray[i].PageCount > PageBegin) && - (MDArray[i].BasePage + MDArray[i].PageCount >= PageEnd)) - { - /* Found one! */ - break; - } - } - - /* Check if we found no free blocks, and fail if so */ - if (i == NumberDescriptors) return ENOMEM; - - /* Check if the block has our base address */ - if (MDArray[i].BasePage == PageBegin) - { - /* Check if it also has our ending address */ - if ((MDArray[i].BasePage + MDArray[i].PageCount) == PageEnd) - { - /* Then convert this region into our new memory type */ - MDArray[i].MemoryType = MemoryType; - } - else - { - /* Otherwise, make sure we have enough descriptors */ - if (NumberDescriptors == 60) return ENOMEM; - - /* Cut this descriptor short */ - MDArray[i].BasePage = PageEnd; - MDArray[i].PageCount -= (PageEnd - PageBegin); - - /* And allocate a new descriptor for our memory range */ - MDArray[NumberDescriptors].BasePage = PageBegin; - MDArray[NumberDescriptors].PageCount = PageEnd - PageBegin; - MDArray[NumberDescriptors].MemoryType = MemoryType; - NumberDescriptors++; - } - } - else if ((MDArray[i].BasePage + MDArray[i].PageCount) == PageEnd) - { - /* This block has our end address, make sure we have a free block */ - if (NumberDescriptors == 60) return ENOMEM; - - /* Rebase this descriptor */ - MDArray[i].PageCount = PageBegin - MDArray[i].BasePage; - - /* And allocate a new descriptor for our memory range */ - MDArray[NumberDescriptors].BasePage = PageBegin; - MDArray[NumberDescriptors].PageCount = PageEnd - PageBegin; - MDArray[NumberDescriptors].MemoryType = MemoryType; - NumberDescriptors++; - } - else - { - /* We'll need two descriptors, make sure they're available */ - if ((NumberDescriptors + 1) >= 60) return ENOMEM; - - /* Allocate a free memory descriptor for what follows us */ - MDArray[NumberDescriptors].BasePage = PageEnd; - MDArray[NumberDescriptors].PageCount = MDArray[i].PageCount - - (PageEnd - MDArray[i].BasePage); - MDArray[NumberDescriptors].MemoryType = MemoryFree; - NumberDescriptors++; - - /* Cut down the current free descriptor */ - MDArray[i].PageCount = PageBegin - MDArray[i].BasePage; - - /* Allocate a new memory descriptor for our memory range */ - MDArray[NumberDescriptors].BasePage = PageBegin; - MDArray[NumberDescriptors].PageCount = PageEnd - PageBegin; - MDArray[NumberDescriptors].MemoryType = MemoryType; - NumberDescriptors++; - } - - /* Everything went well */ - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -KiRosConfigureArcDescriptor(IN ULONG PageBegin, - IN ULONG PageEnd, - IN TYPE_OF_MEMORY MemoryType) -{ - ULONG i; - ULONG BlockBegin, BlockEnd; - MEMORY_TYPE BlockType; - BOOLEAN Combined = FALSE; - - /* If this descriptor seems bogus, just return */ - if (PageEnd <= PageBegin) return STATUS_SUCCESS; - - /* Loop every ARC descriptor, trying to find one we can modify */ - for (i = 0; i < NumberDescriptors; i++) - { - /* Get its settings */ - BlockBegin = MDArray[i].BasePage; - BlockEnd = MDArray[i].BasePage + MDArray[i].PageCount; - BlockType = MDArray[i].MemoryType; - - /* Check if we can fit inside this block */ - if (BlockBegin < PageBegin) - { - /* Check if we are larger then it */ - if ((BlockEnd > PageBegin) && (BlockEnd <= PageEnd)) - { - /* Make it end where we start */ - BlockEnd = PageBegin; - } - - /* Check if it ends after we do */ - if (BlockEnd > PageEnd) - { - /* Make sure we can allocate a descriptor */ - if (NumberDescriptors == 60) return ENOMEM; - - /* Create a descriptor for whatever memory we're not part of */ - MDArray[NumberDescriptors].MemoryType = BlockType; - MDArray[NumberDescriptors].BasePage = PageEnd; - MDArray[NumberDescriptors].PageCount = BlockEnd - PageEnd; - NumberDescriptors++; - - /* The next block ending is now where we begin */ - BlockEnd = PageBegin; - } - } - else - { - /* Check if the blog begins inside our range */ - if (BlockBegin < PageEnd) - { - /* Check if it ends before we do */ - if (BlockEnd < PageEnd) - { - /* Then make it disappear */ - BlockEnd = BlockBegin; - } - else - { - /* Otherwise make it start where we end */ - BlockBegin = PageEnd; - } - } - } - - /* Check if the block matches us, and we haven't tried combining yet */ - if (((TYPE_OF_MEMORY)BlockType == MemoryType) && !(Combined)) - { - /* Check if it starts where we end */ - if (BlockBegin == PageEnd) - { - /* Make it start with us, and combine us */ - BlockBegin = PageBegin; - Combined = TRUE; - } - else if (BlockEnd == PageBegin) - { - /* Otherwise, it ends where we begin, combine its ending */ - BlockEnd = PageEnd; - Combined = TRUE; - } - } - - /* Check the original block data matches with what we came up with */ - if ((MDArray[i].BasePage == BlockBegin) && - (MDArray[i].PageCount == BlockEnd - BlockBegin)) - { - /* Then skip it */ - continue; - } - - /* Otherwise, set our new settings for this block */ - MDArray[i].BasePage = BlockBegin; - MDArray[i].PageCount = BlockEnd - BlockBegin; - - /* Check if we are killing the block */ - if (BlockBegin == BlockEnd) - { - /* Delete this block and restart the loop properly */ - NumberDescriptors--; - if (i < NumberDescriptors) MDArray[i] = MDArray[NumberDescriptors]; - i--; - } - } - - /* If we got here without combining, we need to allocate a new block */ - if (!(Combined) && (MemoryType < LoaderMaximum)) - { - /* Make sure there's enough descriptors */ - if (NumberDescriptors == 60) return ENOMEM; - - /* Allocate a new block with our data */ - MDArray[NumberDescriptors].MemoryType = MemoryType; - MDArray[NumberDescriptors].BasePage = PageBegin; - MDArray[NumberDescriptors].PageCount = PageEnd - PageBegin; - NumberDescriptors++; - } - - /* Changes complete, return success */ - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -KiRosBuildOsMemoryMap(VOID) -{ - PBIOS_MEMORY_DESCRIPTOR MdBlock; - ULONG BlockStart, BlockEnd, BiasedStart, BiasedEnd, PageStart, PageEnd; - NTSTATUS Status = STATUS_SUCCESS; - ULONG BiosPage = 0xA0; - - /* Loop the BIOS Memory Descriptor List */ - MdBlock = BiosMemoryDescriptorList; - while (MdBlock->BlockSize) - { - /* Get the statrt and end addresses */ - BlockStart = MdBlock->BlockBase; - BlockEnd = BlockStart + MdBlock->BlockSize - 1; - - /* Align them to page boundaries */ - BiasedStart = BlockStart & (PAGE_SIZE - 1); - if (BiasedStart) BlockStart = BlockStart + PAGE_SIZE - BiasedStart; - BiasedEnd = (BlockEnd + 1) & (ULONG)(PAGE_SIZE - 1); - if (BiasedEnd) BlockEnd -= BiasedEnd; - - /* Get the actual page numbers */ - PageStart = BlockStart >> PAGE_SHIFT; - PageEnd = (BlockEnd + 1) >> PAGE_SHIFT; - - /* If we're starting at page 0, then put the BIOS page at the end */ - if (!PageStart) BiosPage = PageEnd; - - /* Check if we did any alignment */ - if (BiasedStart) - { - /* Mark that region as reserved */ - Status = KiRosConfigureArcDescriptor(PageStart - 1, - PageStart, - MemorySpecialMemory); - if (Status != STATUS_SUCCESS) break; - } - - /* Check if we did any alignment */ - if (BiasedEnd) - { - /* Mark that region as reserved */ - Status = KiRosConfigureArcDescriptor(PageEnd - 1, - PageEnd, - MemorySpecialMemory); - if (Status != STATUS_SUCCESS) break; - - /* If the bios page was the last page, use the next one instead */ - if (BiosPage == PageEnd) BiosPage += 1; - } - - /* Check if the page is below the 16MB Memory hole */ - if (PageEnd <= 0xFC0) - { - /* It is, mark the memory a free */ - Status = KiRosConfigureArcDescriptor(PageStart, - PageEnd, - LoaderFree); - } - else if (PageStart >= 0x1000) - { - /* It's over 16MB, so that memory gets marked as reserve */ - Status = KiRosConfigureArcDescriptor(PageStart, - PageEnd, - LoaderFree); - } - else - { - /* Check if it starts below the memory hole */ - if (PageStart < 0xFC0) - { - /* Mark that part as free */ - Status = KiRosConfigureArcDescriptor(PageStart, - 0xFC0, - MemoryFree); - if (Status != STATUS_SUCCESS) break; - - /* And update the page start for the code below */ - PageStart = 0xFC0; - } - - /* Any code in the memory hole region ends up as reserve */ - Status = KiRosConfigureArcDescriptor(PageStart, - PageEnd, - LoaderFree); - } - - /* If we failed, break out, otherwise, go to the next BIOS block */ - if (Status != STATUS_SUCCESS) break; - MdBlock++; - } - - /* If anything failed until now, return error code */ - if (Status != STATUS_SUCCESS) return Status; - -#if defined(_X86_) - /* Set the top 16MB region as reserved */ - Status = KiRosConfigureArcDescriptor(0xFC0, 0x1000, MemorySpecialMemory); - if (Status != STATUS_SUCCESS) return Status; - - /* Setup the BIOS region as reserved */ - KiRosConfigureArcDescriptor(0xA0, 0x100, LoaderMaximum); - KiRosConfigureArcDescriptor(BiosPage, 0x100, MemoryFirmwarePermanent); - - /* Build an entry for the IVT */ - Status = KiRosAllocateArcDescriptor(0, 1, MemoryFirmwarePermanent); - if (Status != STATUS_SUCCESS) return Status; -#endif - - /* Build an entry for the KPCR and KUSER_SHARED_DATA */ - Status = KiRosAllocateArcDescriptor(1, 3, LoaderStartupPcrPage); - if (Status != STATUS_SUCCESS) return Status; - - /* Build an entry for the PDE and return the status */ - Status = KiRosAllocateArcDescriptor(KeRosLoaderBlock-> - PageDirectoryStart >> PAGE_SHIFT, - KeRosLoaderBlock-> - PageDirectoryEnd >> PAGE_SHIFT, - LoaderMemoryData); - return Status; -} - -#if defined(_X86_) -VOID -NTAPI -KiRosBuildReservedMemoryMap(VOID) -{ - ULONG j; - ULONG BlockBegin, BlockEnd, BiasedPage; - - /* Loop the BIOS Memory Map */ - for (j = 0; j < KeMemoryMapRangeCount; j++) - { - /* Get the start and end addresses */ - BlockBegin = KeMemoryMap[j].BaseAddrLow; - BlockEnd = BlockBegin + KeMemoryMap[j].LengthLow - 1; - - /* Make sure it wasn't a > 4GB descriptor */ - if (!KeMemoryMap[j].BaseAddrHigh) - { - /* Make sure it doesn't overflow */ - if (BlockEnd < BlockBegin) BlockEnd = 0xFFFFFFFF; - - /* Check if this was free memory */ - if (KeMemoryMap[j].Type == 1) - { - /* Get the page-aligned addresses */ - BiasedPage = BlockBegin & (PAGE_SIZE - 1); - BlockBegin >>= PAGE_SHIFT; - if (BiasedPage) BlockBegin++; - BlockEnd = (BlockEnd >> PAGE_SHIFT) + 1; - - /* Check if the block is within the 16MB memory hole */ - if ((BlockBegin < 0xFC0) && (BlockEnd >= 0xFC0)) - { - /* Don't allow it to cross this boundary */ - BlockBegin = 0xFC0; - } - - /* Check if the boundary is across 16MB */ - if ((BlockEnd > 0xFFF) && (BlockBegin <= 0xFFF)) - { - /* Don't let it cross */ - BlockEnd = 0xFFF; - } - - /* Check if the block describes the memory hole */ - if ((BlockBegin >= 0xFC0) && (BlockEnd <= 0xFFF)) - { - /* Set this region as temporary */ - KiRosConfigureArcDescriptor(BlockBegin, - BlockEnd, - MemoryFirmwareTemporary); - } - } - else - { - /* Get the page-aligned addresses */ - BlockBegin >>= PAGE_SHIFT; - BiasedPage = (BlockEnd + 1) & (PAGE_SIZE - 1); - BlockEnd >>= PAGE_SHIFT; - if (BiasedPage) BlockEnd++; - - /* Set this memory as reserved */ - KiRosConfigureArcDescriptor(BlockBegin, - BlockEnd + 1, - MemorySpecialMemory); - } - } - } -} -#endif - -VOID -NTAPI -KiRosInsertNtDescriptor(IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor) -{ - PLIST_ENTRY ListHead, PreviousEntry, NextEntry; - PMEMORY_ALLOCATION_DESCRIPTOR Descriptor = NULL, NextDescriptor = NULL; - - /* Loop the memory descriptor list */ - ListHead = &KeLoaderBlock->MemoryDescriptorListHead; - PreviousEntry = ListHead; - NextEntry = ListHead->Flink; - while (NextEntry != ListHead) - { - /* Get the current descriptor and check if it's below ours */ - NextDescriptor = CONTAINING_RECORD(NextEntry, - MEMORY_ALLOCATION_DESCRIPTOR, - ListEntry); - if (NewDescriptor->BasePage < NextDescriptor->BasePage) break; - - /* It isn't, save the previous entry and descriptor, and try again */ - PreviousEntry = NextEntry; - Descriptor = NextDescriptor; - NextEntry = NextEntry->Flink; - } - - /* So we found the right spot to insert. Is this free memory? */ - if (NewDescriptor->MemoryType != LoaderFree) - { - /* It isn't, so insert us before the last descriptor */ - InsertHeadList(PreviousEntry, &NewDescriptor->ListEntry); - } - else - { - /* We're free memory. Check if the entry we found is also free memory */ - if ((PreviousEntry != ListHead) && - ((Descriptor->MemoryType == LoaderFree) || - (Descriptor->MemoryType == LoaderReserve)) && - ((Descriptor->BasePage + Descriptor->PageCount) == - NewDescriptor->BasePage)) - { - /* It's free memory, and we're right after it. Enlarge that block */ - Descriptor->PageCount += NewDescriptor->PageCount; - NewDescriptor = Descriptor; - } - else - { - /* Our range scan't be combined, so just insert us separately */ - InsertHeadList(PreviousEntry, &NewDescriptor->ListEntry); - } - - /* Check if we merged with an existing free memory block */ - if ((NextEntry != ListHead) && - ((NextDescriptor->MemoryType == LoaderFree) || - (NextDescriptor->MemoryType == LoaderReserve)) && - ((NewDescriptor->BasePage + NewDescriptor->PageCount) == - NextDescriptor->BasePage)) - { - /* Update our own block */ - NewDescriptor->PageCount += NextDescriptor->PageCount; - - /* Remove the next block */ - RemoveEntryList(&NextDescriptor->ListEntry); - } - } -} - -NTSTATUS -NTAPI -KiRosBuildNtDescriptor(IN PMEMORY_ALLOCATION_DESCRIPTOR MemoryDescriptor, - IN MEMORY_TYPE MemoryType, - IN ULONG BasePage, - IN ULONG PageCount) -{ - PMEMORY_ALLOCATION_DESCRIPTOR Descriptor, NextDescriptor = NULL; - LONG Delta; - TYPE_OF_MEMORY CurrentType; - BOOLEAN UseNext; - - /* Check how many pages we'll be consuming */ - Delta = BasePage - MemoryDescriptor->BasePage; - if (!(Delta) && (PageCount == MemoryDescriptor->PageCount)) - { - /* We can simply convert the current descriptor into our new type */ - MemoryDescriptor->MemoryType = MemoryType; - } - else - { - /* Get the current memory type of the descriptor, and reserve it */ - CurrentType = MemoryDescriptor->MemoryType; - MemoryDescriptor->MemoryType = LoaderSpecialMemory; - - /* Check if we'll need another descriptor for what's left of memory */ - UseNext = ((BasePage != MemoryDescriptor->BasePage) && - (Delta + PageCount != MemoryDescriptor->PageCount)); - - /* Get a descriptor */ - Descriptor = KiRosGetMdFromArray(); - if (!Descriptor) return STATUS_INSUFFICIENT_RESOURCES; - - /* Check if we are using another descriptor */ - if (UseNext) - { - /* Allocate that one too */ - NextDescriptor = KiRosGetMdFromArray(); - if (!NextDescriptor) return STATUS_INSUFFICIENT_RESOURCES; - } - - /* Build the descriptor we got */ - Descriptor->MemoryType = MemoryType; - Descriptor->BasePage = BasePage; - Descriptor->PageCount = PageCount; - - /* Check if we're starting at the same place as the old one */ - if (BasePage == MemoryDescriptor->BasePage) - { - /* Simply decrease the old descriptor and rebase it */ - MemoryDescriptor->BasePage += PageCount; - MemoryDescriptor->PageCount -= PageCount; - MemoryDescriptor->MemoryType = CurrentType; - } - else if (Delta + PageCount == MemoryDescriptor->PageCount) - { - /* We finish where the old one did, shorten it */ - MemoryDescriptor->PageCount -= PageCount; - MemoryDescriptor->MemoryType = CurrentType; - } - else - { - /* We're inside the current block, mark our free region */ - NextDescriptor->MemoryType = LoaderFree; - NextDescriptor->BasePage = BasePage + PageCount; - NextDescriptor->PageCount = MemoryDescriptor->PageCount - - (PageCount + Delta); - - /* And cut down the current descriptor */ - MemoryDescriptor->PageCount = Delta; - MemoryDescriptor->MemoryType = CurrentType; - - /* Finally, insert our new free descriptor into the list */ - KiRosInsertNtDescriptor(NextDescriptor); - } - - /* Insert the descriptor we allocated */ - KiRosInsertNtDescriptor(Descriptor); - } - - /* Return success */ - return STATUS_SUCCESS; -} - -PMEMORY_ALLOCATION_DESCRIPTOR -NTAPI -KiRosFindNtDescriptor(IN ULONG BasePage) -{ - PMEMORY_ALLOCATION_DESCRIPTOR MdBlock = NULL; - PLIST_ENTRY NextEntry, ListHead; - - /* Scan the memory descriptor list */ - ListHead = &KeLoaderBlock->MemoryDescriptorListHead; - NextEntry = ListHead->Flink; - while (NextEntry != ListHead) - { - /* Get the current descriptor */ - MdBlock = CONTAINING_RECORD(NextEntry, - MEMORY_ALLOCATION_DESCRIPTOR, - ListEntry); - - /* Check if it can contain our memory range */ - if ((MdBlock->BasePage <= BasePage) && - (MdBlock->BasePage + MdBlock->PageCount > BasePage)) - { - /* It can, break out */ - break; - } - - /* Go to the next descriptor */ - NextEntry = NextEntry->Flink; - } - - /* Return the descriptor we found, if any */ - return MdBlock; -} - -NTSTATUS -NTAPI -KiRosAllocateNtDescriptor(IN TYPE_OF_MEMORY MemoryType, - IN ULONG BasePage, - IN ULONG PageCount, - IN ULONG Alignment, - OUT PULONG ReturnedBase) -{ - PMEMORY_ALLOCATION_DESCRIPTOR MdBlock; - ULONG AlignedBase, AlignedLimit; - PMEMORY_ALLOCATION_DESCRIPTOR ActiveMdBlock; - ULONG ActiveAlignedBase = 0; - PLIST_ENTRY NextEntry, ListHead; - - /* If no information was given, make some assumptions */ - if (!Alignment) Alignment = 1; - if (!PageCount) PageCount = 1; - - /* Start looking for a matching descvriptor */ - do - { - /* Calculate the limit of the range */ - AlignedLimit = PageCount + BasePage; - - /* Find a descriptor that already contains our base address */ - MdBlock = KiRosFindNtDescriptor(BasePage); - - if (MdBlock) - { - /* If it contains our limit as well, break out early */ - if ((MdBlock->PageCount + MdBlock->BasePage) >= AlignedLimit) break; - } - - /* Loop the memory list */ - ActiveMdBlock = NULL; - ListHead = &KeLoaderBlock->MemoryDescriptorListHead; - NextEntry = ListHead->Flink; - while (NextEntry != ListHead) - { - /* Get the current descriptors */ - MdBlock = CONTAINING_RECORD(NextEntry, - MEMORY_ALLOCATION_DESCRIPTOR, - ListEntry); - - /* Align the base address and our limit */ - AlignedBase = (MdBlock->BasePage + (Alignment - 1)) &~ Alignment; - AlignedLimit = MdBlock->PageCount - - AlignedBase + - MdBlock->BasePage; - - /* Check if this is a free block that can satisfy us */ - if ((MdBlock->MemoryType == LoaderFree) && - (AlignedLimit <= MdBlock->PageCount) && - (PageCount <= AlignedLimit)) - { - /* It is, stop searching */ - ActiveMdBlock = MdBlock; - ActiveAlignedBase = AlignedBase; - break; - } - - /* Try the next block */ - NextEntry = NextEntry->Flink; - } - - /* See if we came up with an adequate block */ - if (ActiveMdBlock) - { - /* Generate a descriptor in it */ - *ReturnedBase = AlignedBase; - return KiRosBuildNtDescriptor(ActiveMdBlock, - MemoryType, - ActiveAlignedBase, - PageCount); - } - } while (TRUE); - - /* We found a matching block, generate a descriptor with it */ - *ReturnedBase = BasePage; - return KiRosBuildNtDescriptor(MdBlock, MemoryType, BasePage, PageCount); -} - -NTSTATUS -NTAPI -KiRosBuildArcMemoryList(VOID) -{ - PMEMORY_ALLOCATION_DESCRIPTOR Descriptor; - MEMORY_DESCRIPTOR *Memory; - ULONG i; - - /* Loop all BIOS Memory Descriptors */ - for (i = 0; i < NumberDescriptors; i++) - { - /* Get the current descriptor */ - Memory = &MDArray[i]; - - /* Allocate an NT Memory Descriptor */ - Descriptor = KiRosGetMdFromArray(); - if (!Descriptor) return ENOMEM; - - /* Copy the memory type */ - Descriptor->MemoryType = Memory->MemoryType; - if (Memory->MemoryType == MemoryFreeContiguous) - { - /* Convert this to free */ - Descriptor->MemoryType = LoaderFree; - } - else if (Memory->MemoryType == MemorySpecialMemory) - { - /* Convert this to special memory */ - Descriptor->MemoryType = LoaderSpecialMemory; - } - - /* Copy the range data */ - Descriptor->BasePage = Memory->BasePage; - Descriptor->PageCount = Memory->PageCount; - - /* Insert the descriptor */ - if (Descriptor->PageCount) KiRosInsertNtDescriptor(Descriptor); - } - - /* All went well */ - return STATUS_SUCCESS; -} - -VOID -NTAPI -KiRosFixupComponentTree(IN PCONFIGURATION_COMPONENT_DATA p, - IN ULONG i) -{ - PCONFIGURATION_COMPONENT pp; - - /* Loop each entry */ - while (p) - { - /* Grab the component entry */ - pp = &p->ComponentEntry; - - /* Fixup the pointers */ - if (pp->Identifier) pp->Identifier = (PVOID)((ULONG_PTR)pp->Identifier + i); - if (p->ConfigurationData) p->ConfigurationData = (PVOID)((ULONG_PTR)p->ConfigurationData + i); - if (p->Parent) p->Parent = (PVOID)((ULONG_PTR)p->Parent + i); - if (p->Sibling) p->Sibling = (PVOID)((ULONG_PTR)p->Sibling + i); - if (p->Child) p->Child = (PVOID)((ULONG_PTR)p->Child + i); - - /* Check if we have a child */ - if (p->Child) KiRosFixupComponentTree(p->Child, i); - - /* Get to the next entry */ - p = p->Sibling; - } -} - -VOID -NTAPI -KiRosFrldrLpbToNtLpb(IN PROS_LOADER_PARAMETER_BLOCK RosLoaderBlock, - IN PLOADER_PARAMETER_BLOCK *NtLoaderBlock) -{ - PLOADER_PARAMETER_BLOCK LoaderBlock; - PLDR_DATA_TABLE_ENTRY LdrEntry; - PLOADER_MODULE RosEntry = NULL; - ULONG i, j, ModSize; - PVOID ModStart; - PCHAR DriverName; - PCHAR BootPath, HalPath; - CHAR CommandLine[256]; - PARC_DISK_SIGNATURE RosDiskInfo, ArcDiskInfo; - PIMAGE_NT_HEADERS NtHeader; - WCHAR PathToDrivers[] = L"\\SystemRoot\\System32\\drivers\\"; - WCHAR PathToSystem32[] = L"\\SystemRoot\\System32\\"; - WCHAR PathSetup[] = L"\\SystemRoot\\"; - CHAR DriverNameLow[256]; - ULONG Base; - size_t Remaining; - WCHAR *StringEnd; -#if defined(_PPC_) - ULONG KernelBase = RosLoaderBlock->ModsAddr[0].ModStart; -#endif - - /* Set the NT Loader block and initialize it */ - *NtLoaderBlock = KeLoaderBlock = LoaderBlock = &BldrLoaderBlock; - RtlZeroMemory(LoaderBlock, sizeof(LOADER_PARAMETER_BLOCK)); - - /* Set the NLS Data block */ - LoaderBlock->NlsData = &BldrNlsDataBlock; - - /* Set the ARC Data block */ - LoaderBlock->ArcDiskInformation = &BldrArcDiskInfo; - - /* Assume this is from FreeLDR's SetupLdr */ - LoaderBlock->SetupLdrBlock = &BldrSetupBlock; - - /* Setup the list heads */ - InitializeListHead(&LoaderBlock->LoadOrderListHead); - InitializeListHead(&LoaderBlock->MemoryDescriptorListHead); - InitializeListHead(&LoaderBlock->BootDriverListHead); - InitializeListHead(&LoaderBlock->ArcDiskInformation->DiskSignatureListHead); - - /* Build the free memory map, which uses BIOS Descriptors */ - KiRosBuildBiosMemoryMap(); - - /* Build entries for ReactOS memory ranges, which uses ARC Descriptors */ - KiRosBuildOsMemoryMap(); - -#if defined(_X86_) - /* Build entries for the reserved map, which uses ARC Descriptors */ - KiRosBuildReservedMemoryMap(); -#endif - - /* Now convert the BIOS and ARC Descriptors into NT Memory Descirptors */ - KiRosBuildArcMemoryList(); - - /* Loop boot driver list */ - for (i = 0; i < RosLoaderBlock->ModsCount; i++) - { - /* Get the ROS loader entry */ - RosEntry = &RosLoaderBlock->ModsAddr[i]; - DriverName = (PCHAR)RosEntry->String; - ModStart = (PVOID)RosEntry->ModStart; - ModSize = RosEntry->ModEnd - (ULONG_PTR)ModStart; - -#if defined(_PPC_) - ModStart -= KernelBase; -#endif - - /* Check if this is any of the NLS files */ - if (!_stricmp(DriverName, "ansi.nls")) - { - /* ANSI Code page */ - LoaderBlock->NlsData->AnsiCodePageData = KERNEL_RVA(ModStart); - - /* Create an MD for it */ - KiRosAllocateNtDescriptor(LoaderNlsData, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - continue; - } - else if (!_stricmp(DriverName, "oem.nls")) - { - /* OEM Code page */ - LoaderBlock->NlsData->OemCodePageData = KERNEL_RVA(ModStart); - - /* Create an MD for it */ - KiRosAllocateNtDescriptor(LoaderNlsData, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - continue; - } - else if (!_stricmp(DriverName, "casemap.nls")) - { - /* Unicode Code page */ - LoaderBlock->NlsData->UnicodeCodePageData = KERNEL_RVA(ModStart); - - /* Create an MD for it */ - KiRosAllocateNtDescriptor(LoaderNlsData, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - continue; - } - - /* Check if this is the SYSTEM hive */ - if (!(_stricmp(DriverName, "system")) || - !(_stricmp(DriverName, "system.hiv"))) - { - /* Save registry data */ - LoaderBlock->RegistryBase = KERNEL_RVA(ModStart); - LoaderBlock->RegistryLength = ModSize; - - /* Disable setup mode */ - LoaderBlock->SetupLdrBlock = NULL; - - /* Create an MD for it */ - KiRosAllocateNtDescriptor(LoaderRegistryData, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - continue; - } - - /* Check if this is the HARDWARE hive */ - if (!(_stricmp(DriverName, "hardware")) || - !(_stricmp(DriverName, "hardware.hiv"))) - { - /* Create an MD for it */ - KiRosAllocateNtDescriptor(LoaderRegistryData, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - continue; - } - - /* Check if this is the kernel */ - if (!(_stricmp(DriverName, "ntoskrnl.exe"))) - { - /* Create an MD for it */ - KiRosAllocateNtDescriptor(LoaderSystemCode, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - } - else if (!(_stricmp(DriverName, "hal.dll"))) - { - /* Create an MD for the HAL */ - KiRosAllocateNtDescriptor(LoaderHalCode, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - } - else - { - /* Create an MD for any driver */ - KiRosAllocateNtDescriptor(LoaderBootDriver, - KERNEL_DESCRIPTOR_PAGE(ModStart), - (ModSize + PAGE_SIZE - 1)>> PAGE_SHIFT, - 0, - &Base); - } - -#if defined(_PPC_) - ModStart += 0x80800000; -#endif - - /* Lowercase the drivername so we can check its extension later */ - strcpy(DriverNameLow, DriverName); - _strlwr(DriverNameLow); - - /* Setup the loader entry */ - LdrEntry = &BldrModules[i]; - RtlZeroMemory(LdrEntry, sizeof(LDR_DATA_TABLE_ENTRY)); - - /* Convert driver name from ANSI to Unicode */ - for (j = 0; j < strlen(DriverName); j++) - { - BldrModuleStrings[i][j] = DriverName[j]; - } - - /* Setup driver name */ - RtlInitUnicodeString(&LdrEntry->BaseDllName, BldrModuleStrings[i]); - - /* Construct a correct full name */ - BldrModuleStringsFull[i][0] = 0; - LdrEntry->FullDllName.MaximumLength = sizeof(BldrModuleStringsFull[i]); - LdrEntry->FullDllName.Length = 0; - LdrEntry->FullDllName.Buffer = BldrModuleStringsFull[i]; - - /* Guess the path */ - if (LoaderBlock->SetupLdrBlock) - { - UNICODE_STRING TempString; - RtlInitUnicodeString(&TempString, PathSetup); - RtlAppendUnicodeStringToString(&LdrEntry->FullDllName, &TempString); - } - else if (strstr(DriverNameLow, ".dll") || strstr(DriverNameLow, ".exe")) - { - UNICODE_STRING TempString; - RtlInitUnicodeString(&TempString, PathToSystem32); - RtlAppendUnicodeStringToString(&LdrEntry->FullDllName, &TempString); - } - else /* .sys */ - { - UNICODE_STRING TempString; - RtlInitUnicodeString(&TempString, PathToDrivers); - RtlAppendUnicodeStringToString(&LdrEntry->FullDllName, &TempString); - } - - /* Append base name of the driver */ - RtlAppendUnicodeStringToString(&LdrEntry->FullDllName, &LdrEntry->BaseDllName); - - /* Copy data from Freeldr Module Entry */ - LdrEntry->DllBase = ModStart; - LdrEntry->SizeOfImage = ModSize; - - /* Copy additional data */ - NtHeader = RtlImageNtHeader(ModStart); - LdrEntry->EntryPoint = RVA(ModStart, - NtHeader-> - OptionalHeader.AddressOfEntryPoint); - - /* Initialize other data */ - LdrEntry->LoadCount = 1; - LdrEntry->Flags = LDRP_IMAGE_DLL | - LDRP_ENTRY_PROCESSED; - if (RosEntry->Reserved) LdrEntry->Flags |= LDRP_ENTRY_INSERTED; - - /* Check if this is HAL */ - if (!(_stricmp(DriverName, "hal.dll"))) - { - /* Check if there is a second entry already */ - if (LoaderBlock->LoadOrderListHead.Flink->Flink != - &LoaderBlock->LoadOrderListHead) - { - PLIST_ENTRY OldSecondEntry; - - /* Get the second entry */ - OldSecondEntry = - LoaderBlock->LoadOrderListHead.Flink->Flink; - - /* Set up our entry correctly */ - LdrEntry->InLoadOrderLinks.Flink = OldSecondEntry; - LdrEntry->InLoadOrderLinks.Blink = OldSecondEntry->Blink; - - /* Make the first entry (always the kernel) point to us */ - LoaderBlock->LoadOrderListHead.Flink->Flink = - &LdrEntry->InLoadOrderLinks; - - /* Make the old entry point back to us and continue looping */ - OldSecondEntry->Blink = &LdrEntry->InLoadOrderLinks; - continue; - } - } - - /* Insert it into the loader block */ - InsertTailList(&LoaderBlock->LoadOrderListHead, - &LdrEntry->InLoadOrderLinks); - } - - /* Now mark the remainder of the FreeLDR 6MB area as "in use" */ - KiRosAllocateNtDescriptor(LoaderMemoryData, - KERNEL_DESCRIPTOR_PAGE(RosEntry->ModEnd), - KERNEL_DESCRIPTOR_PAGE((0x80800000 + 0x600000)) - - KERNEL_DESCRIPTOR_PAGE(RosEntry->ModEnd), - 0, - &Base); - - /* Check if we have a ramdisk */ - if ((RosLoaderBlock->RdAddr) && (RosLoaderBlock->RdLength)) - { - /* Build a descriptor for it */ - KiRosAllocateNtDescriptor(LoaderXIPRom, - KERNEL_DESCRIPTOR_PAGE(RosLoaderBlock->RdAddr), - (RosLoaderBlock->RdLength + PAGE_SIZE - 1) >> PAGE_SHIFT, - 0, - &Base); - } - - /* Setup command line */ - LoaderBlock->LoadOptions = BldrCommandLine; - strcpy(BldrCommandLine, RosLoaderBlock->CommandLine); - - /* Setup the extension block */ - LoaderBlock->Extension = &BldrExtensionBlock; - LoaderBlock->Extension->Size = sizeof(LOADER_PARAMETER_EXTENSION); - LoaderBlock->Extension->MajorVersion = 5; - LoaderBlock->Extension->MinorVersion = 2; - - /* FreeLDR hackllocates 1536 static pages for the initial boot images */ - LoaderBlock->Extension->LoaderPagesSpanned = 1536 * PAGE_SIZE; - - /* ReactOS always boots the kernel at 0x80800000 (just like NT 5.2) */ - LoaderBlock->Extension->LoaderPagesSpanned += 0x80800000 - KSEG0_BASE; - - /* Now convert to pages */ - LoaderBlock->Extension->LoaderPagesSpanned /= PAGE_SIZE; - - /* Check if FreeLdr detected a ACPI table */ - if (RosLoaderBlock->Flags & MB_FLAGS_ACPI_TABLE) - { - /* Set the pointer to something for compatibility */ - LoaderBlock->Extension->AcpiTable = (PVOID)1; - } - - /* Now setup the setup block if we have one */ - if (LoaderBlock->SetupLdrBlock) - { - /* All we'll setup right now is the flag for text-mode setup */ - LoaderBlock->SetupLdrBlock->Flags = SETUPLDR_TEXT_MODE; - } - - /* Make a copy of the command line */ - strcpy(CommandLine, LoaderBlock->LoadOptions); - - /* Find the first \, separating the ARC path from NT path */ - BootPath = strchr(CommandLine, '\\'); - *BootPath = ANSI_NULL; - RtlStringCbCopyA(BldrArcBootPath, sizeof(BldrArcBootPath), CommandLine); - LoaderBlock->ArcBootDeviceName = BldrArcBootPath; - - /* The rest of the string is the NT path */ - HalPath = strchr(BootPath + 1, ' '); - *HalPath = ANSI_NULL; - Remaining = sizeof(BldrNtBootPath); - RtlStringCbCopyExA(BldrNtBootPath, Remaining, "\\", &StringEnd, &Remaining, 0); - RtlStringCbCopyExA(StringEnd, Remaining, BootPath + 1, &StringEnd, &Remaining, 0); - RtlStringCbCopyA(StringEnd, Remaining, "\\"); - LoaderBlock->NtBootPathName = BldrNtBootPath; - - /* Set the HAL paths */ - RtlStringCbCopyA(BldrArcHalPath, sizeof(BldrArcHalPath), BldrArcBootPath); - LoaderBlock->ArcHalDeviceName = BldrArcHalPath; - strcpy(BldrNtHalPath, "\\"); - LoaderBlock->NtHalPathName = BldrNtHalPath; - - /* Use this new command line */ - RtlStringCbCopyA(LoaderBlock->LoadOptions, 255, HalPath + 2); - - /* Parse it and change every slash to a space */ - BootPath = LoaderBlock->LoadOptions; - do {if (*BootPath == '/') *BootPath = ' ';} while (*BootPath++); - - /* Now let's loop ARC disk information */ - for (i = 0; i < RosLoaderBlock->DrivesCount; i++) - { - /* Get the ROS loader entry */ - RosDiskInfo = &RosLoaderBlock->DrivesAddr[i]; - - /* Get the ARC structure */ - ArcDiskInfo = &BldrDiskInfo[i]; - - /* Copy the data over */ - ArcDiskInfo->Signature = RosDiskInfo->Signature; - ArcDiskInfo->CheckSum = RosDiskInfo->CheckSum; - - /* Copy the ARC Name */ - strcpy(BldrArcNames[i], RosDiskInfo->ArcName); - ArcDiskInfo->ArcName = BldrArcNames[i]; - - /* Insert into the list */ - InsertTailList(&LoaderBlock->ArcDiskInformation->DiskSignatureListHead, - &ArcDiskInfo->ListEntry); - } - - /* Copy the ARC Hardware Tree */ - RtlCopyMemory(BldrArcHwBuffer, (PVOID)RosLoaderBlock->ArchExtra, 16 * 1024); - LoaderBlock->ConfigurationRoot = (PVOID)BldrArcHwBuffer; - - /* Apply fixups */ - KiRosFixupComponentTree(LoaderBlock->ConfigurationRoot, - (ULONG_PTR)BldrArcHwBuffer - - RosLoaderBlock->ArchExtra); -} - -VOID -NTAPI -KiSetupSyscallHandler(); - -VOID -NTAPI -KiRosPrepareForSystemStartup(IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock) -{ - PLOADER_PARAMETER_BLOCK NtLoaderBlock; - ULONG size, i = 0, *ent; -#if defined(_X86_) - PKTSS Tss; - PKGDTENTRY TssEntry; - KDESCRIPTOR IdtDescriptor; - - __sidt(&IdtDescriptor.Limit); - RtlCopyMemory(KiBootIdt, (PVOID)IdtDescriptor.Base, IdtDescriptor.Limit + 1); - IdtDescriptor.Base = (ULONG)&KiBootIdt; - IdtDescriptor.Limit = sizeof(KiBootIdt) - 1; - - /* Load the GDT and IDT */ - Ke386SetGlobalDescriptorTable(&KiGdtDescriptor.Limit); - __lidt(&IdtDescriptor.Limit); - - /* Initialize the boot TSS */ - Tss = &KiBootTss; - TssEntry = &KiBootGdt[KGDT_TSS / sizeof(KGDTENTRY)]; - TssEntry->HighWord.Bits.Type = I386_TSS; - TssEntry->HighWord.Bits.Pres = 1; - TssEntry->HighWord.Bits.Dpl = 0; - TssEntry->BaseLow = (USHORT)((ULONG_PTR)Tss & 0xFFFF); - TssEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)Tss >> 16); - TssEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)Tss >> 24); - - /* Set the TSS selector */ - Ke386SetTr(KGDT_TSS); -#endif - -#if defined(_M_PPC) - // Zero bats. We might have residual bats set that will interfere with - // our mapping of ofwldr. - for (i = 0; i < 4; i++) - { - SetBat(i, 0, 0, 0); SetBat(i, 1, 0, 0); - } - KiSetupSyscallHandler(); - DbgPrint("Kernel Power (%08x)\n", LoaderBlock); - DbgPrint("ArchExtra (%08x)!\n", LoaderBlock->ArchExtra); -#endif - - /* Save pointer to ROS Block */ - KeRosLoaderBlock = LoaderBlock; - - /* Save memory manager data */ - KeMemoryMapRangeCount = 0; - if (LoaderBlock->Flags & MB_FLAGS_MMAP_INFO) - { - /* We have a memory map from the nice BIOS */ - ent = ((PULONG)(LoaderBlock->MmapAddr - sizeof(ULONG))); - size = *ent; - i = 0; - - /* Map it until we run out of size */ - while (i < LoaderBlock->MmapLength) - { - /* Copy into the Kernel Memory Map */ - memcpy (&KeMemoryMap[KeMemoryMapRangeCount], - (PVOID)(LoaderBlock->MmapAddr + i), - sizeof(ADDRESS_RANGE)); - - /* Increase Memory Map Count */ - KeMemoryMapRangeCount++; - - /* Increase Size */ - i += size; - } - - /* Save data */ - LoaderBlock->MmapLength = KeMemoryMapRangeCount * sizeof(ADDRESS_RANGE); - LoaderBlock->MmapAddr = (ULONG)KeMemoryMap; - } - else - { - /* Nothing from BIOS */ - LoaderBlock->MmapLength = 0; - LoaderBlock->MmapAddr = (ULONG)KeMemoryMap; - } - - /* Convert the loader block */ - KiRosFrldrLpbToNtLpb(KeRosLoaderBlock, &NtLoaderBlock); - -#if defined(_M_PPC) - DbgPrint("Finished KiRosFrldrLpbToNtLpb\n"); -#endif - - /* Do general System Startup */ - KiSystemStartup(NtLoaderBlock); -} -#endif diff --git a/ntoskrnl/ke/i386/kiinit.c b/ntoskrnl/ke/i386/kiinit.c index 45b25ed7ec6..49b2362c3d0 100644 --- a/ntoskrnl/ke/i386/kiinit.c +++ b/ntoskrnl/ke/i386/kiinit.c @@ -690,10 +690,7 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Boot cycles timestamp */ BootCycles = __rdtsc(); -#if !defined(_X86_) - /* Check if we are being booted from FreeLDR */ - if (!((ULONG_PTR)LoaderBlock & 0x80000000)) KiRosPrepareForSystemStartup((PROS_LOADER_PARAMETER_BLOCK)LoaderBlock); -#endif + /* Save the loader block and get the current CPU */ KeLoaderBlock = LoaderBlock; Cpu = KeNumberProcessors; diff --git a/ntoskrnl/ke/i386/trap.s b/ntoskrnl/ke/i386/trap.s index f3c99c48c77..73d1cbcf71d 100644 --- a/ntoskrnl/ke/i386/trap.s +++ b/ntoskrnl/ke/i386/trap.s @@ -156,4 +156,24 @@ KiTrapExitStub KiEditedTrapReturn, (KI_RESTORE_VOLATILES OR KI_RESTORE_EF KiTrapExitStub KiTrapReturn, (KI_RESTORE_VOLATILES OR KI_RESTORE_SEGMENTS OR KI_EXIT_IRET) KiTrapExitStub KiTrapReturnNoSegments, (KI_RESTORE_VOLATILES OR KI_EXIT_IRET) +#ifdef _MSC_VER +EXTERN _PsConvertToGuiThread@0:PROC + +PUBLIC _KiConvertToGuiThread@0 +_KiConvertToGuiThread@0: + /* Calculate the stack frame offset in ebx */ + mov ebx, ebp + sub ebx, esp + + /* Call the worker function */ + call _PsConvertToGuiThread@0 + + /* Adjust ebp to the new stack */ + mov ebp, esp + add ebp, ebx + + /* return to the caller */ + ret +#endif + END diff --git a/ntoskrnl/ke/i386/traphdlr.c b/ntoskrnl/ke/i386/traphdlr.c index c3f5893d1e8..1f5cd46bf4b 100644 --- a/ntoskrnl/ke/i386/traphdlr.c +++ b/ntoskrnl/ke/i386/traphdlr.c @@ -42,7 +42,7 @@ UCHAR KiTrapIoTable[] = 0xEE, /* OUT */ 0xEF, /* OUT */ 0x6E, /* OUTS */ - 0x6F, /* OUTS */ + 0x6F, /* OUTS */ }; PFAST_SYSTEM_CALL_EXIT KiFastCallExitHandler; @@ -143,7 +143,7 @@ KiServiceExit(IN PKTRAP_FRAME TrapFrame, KiCommonExit(TrapFrame, 0); /* Restore previous mode */ - KeGetCurrentThread()->PreviousMode = TrapFrame->PreviousPreviousMode; + KeGetCurrentThread()->PreviousMode = (CCHAR)TrapFrame->PreviousPreviousMode; /* Check for user mode exit */ if (TrapFrame->SegCs & MODE_MASK) @@ -174,7 +174,7 @@ KiServiceExit2(IN PKTRAP_FRAME TrapFrame) KiCommonExit(TrapFrame, 0); /* Restore previous mode */ - KeGetCurrentThread()->PreviousMode = TrapFrame->PreviousPreviousMode; + KeGetCurrentThread()->PreviousMode = (CCHAR)TrapFrame->PreviousPreviousMode; /* Check if this was a V8086 trap */ if (TrapFrame->EFlags & EFLAGS_V86_MASK) KiTrapReturnNoSegments(TrapFrame); @@ -213,7 +213,7 @@ KiDebugHandler(IN PKTRAP_FRAME TrapFrame, Parameter1, Parameter2, Parameter3, - TrapFrame); + TrapFrame); } DECLSPEC_NORETURN @@ -463,7 +463,7 @@ KiTrap02(VOID) // // Note that in reality, we are already on the NMI tss -- we just need to // update the PCR to reflect this - // + // PCR->TSS = NmiTss; __writeeflags(__readeflags() &~ EFLAGS_NESTED_TASK); TssGdt->HighWord.Bits.Dpl = 0; @@ -527,7 +527,7 @@ KiTrap02(VOID) // Although the CPU disabled NMIs, we just did a BIOS Call, which could've // totally changed things. // - // We have to make sure we're still in our original NMI -- a nested NMI + // We have to make sure we're still in our original NMI -- a nested NMI // will point back to the NMI TSS, and in that case we're hosed. // if (PCR->TSS->Backlink != KGDT_NMI_TSS) @@ -652,7 +652,7 @@ KiTrap06Handler(IN PKTRAP_FRAME TrapFrame) { /* Should only happen in VDM mode */ UNIMPLEMENTED; - while (TRUE); + while (TRUE); } /* Bring IRQL back */ @@ -910,7 +910,7 @@ KiTrap0DHandler(IN PKTRAP_FRAME TrapFrame) { /* Should only happen in VDM mode */ UNIMPLEMENTED; - while (TRUE); + while (TRUE); } /* Bring IRQL back */ @@ -933,7 +933,7 @@ KiTrap0DHandler(IN PKTRAP_FRAME TrapFrame) /* Enable interrupts and check error code */ _enable(); if (!TrapFrame->ErrCode) - { + { /* FIXME: Use SEH */ Instructions = (PUCHAR)TrapFrame->Eip; @@ -1047,7 +1047,7 @@ KiTrap0DHandler(IN PKTRAP_FRAME TrapFrame) TrapFrame); } - /* + /* * Check for a fault during checking of the user instruction. * * Note that the SEH handler will catch invalid EIP, but we could be dealing @@ -1059,7 +1059,7 @@ KiTrap0DHandler(IN PKTRAP_FRAME TrapFrame) { /* Not implemented */ UNIMPLEMENTED; - while (TRUE); + while (TRUE); } /* @@ -1100,7 +1100,7 @@ KiTrap0DHandler(IN PKTRAP_FRAME TrapFrame) if (Instructions[0] == 0xCF) { /* - * Some evil shit is going on here -- this is not the SS:ESP you're + * Some evil shit is going on here -- this is not the SS:ESP you're * looking for! Instead, this is actually CS:EIP you're looking at! * Why? Because part of the trap frame actually corresponds to the IRET * stack during the trap exit! @@ -1121,8 +1121,8 @@ KiTrap0DHandler(IN PKTRAP_FRAME TrapFrame) /* So since we're not dealing with the above case, check for RDMSR/WRMSR */ if ((Instructions[0] == 0xF) && // 2-byte opcode - (((Instructions[1] >> 8) == 0x30) || // RDMSR - ((Instructions[2] >> 8) == 0x32))) // WRMSR + ((Instructions[1] == 0x32) || // RDMSR + (Instructions[1] == 0x30))) // WRMSR { /* Unknown CPU MSR, so raise an access violation */ KiDispatchException0Args(STATUS_ACCESS_VIOLATION, @@ -1211,7 +1211,7 @@ KiTrap0EHandler(IN PKTRAP_FRAME TrapFrame) { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + while (TRUE); } /* Check for syscall fault */ @@ -1496,7 +1496,7 @@ KiSystemCall(IN PKTRAP_FRAME TrapFrame, /* Save previous mode */ TrapFrame->PreviousPreviousMode = Thread->PreviousMode; - /* Save the SEH chain and terminate it for now */ + /* Save the SEH chain and terminate it for now */ TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList; KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END; @@ -1533,7 +1533,7 @@ KiSystemCall(IN PKTRAP_FRAME TrapFrame, goto ExitCall; } - /* Convert us to a GUI thread -- must wrap in ASM to get new EBP */ + /* Convert us to a GUI thread -- must wrap in ASM to get new EBP */ Result = KiConvertToGuiThread(); if (!NT_SUCCESS(Result)) { @@ -1541,7 +1541,7 @@ KiSystemCall(IN PKTRAP_FRAME TrapFrame, //SetLastWin32Error(RtlNtStatusToDosError(Result)); goto ExitCall; } - + /* Reload trap frame and descriptor table pointer from new stack */ TrapFrame = *(volatile PVOID*)&Thread->TrapFrame; DescriptorTable = (PVOID)(*(volatile ULONG_PTR*)&Thread->ServiceTable + Offset); diff --git a/ntoskrnl/ke/i386/usercall_asm.S b/ntoskrnl/ke/i386/usercall_asm.S index a5ab6c914e3..341cefd9bee 100644 --- a/ntoskrnl/ke/i386/usercall_asm.S +++ b/ntoskrnl/ke/i386/usercall_asm.S @@ -13,7 +13,7 @@ #include EXTERN _MmGrowKernelStack@4:PROC -EXTERN _KeUserCallbackDispatcher:PROC +EXTERN _KeUserCallbackDispatcher:DWORD EXTERN @KiServiceExit@8:PROC EXTERN _KeGetCurrentIrql@0:PROC EXTERN _KeBugCheckEx@20:PROC @@ -190,7 +190,7 @@ DontBias: /* Get user-mode dispatcher address and set it as EIP */ SetEip: - mov eax, _KeUserCallbackDispatcher + mov eax, dword ptr [_KeUserCallbackDispatcher] mov [esp+KTRAP_FRAME_EIP], eax /* Set the exception list */ diff --git a/ntoskrnl/ke/queue.c b/ntoskrnl/ke/queue.c index 30819786b73..90345ddc785 100644 --- a/ntoskrnl/ke/queue.c +++ b/ntoskrnl/ke/queue.c @@ -247,7 +247,7 @@ KeRemoveQueue(IN PKQUEUE Queue, PKTIMER Timer = &Thread->Timer; BOOLEAN Swappable; PLARGE_INTEGER OriginalDueTime = Timeout; - LARGE_INTEGER DueTime, NewDueTime, InterruptTime; + LARGE_INTEGER DueTime = {{0}}, NewDueTime, InterruptTime; ULONG Hand = 0; ASSERT_QUEUE(Queue); ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); diff --git a/ntoskrnl/ke/thrdschd.c b/ntoskrnl/ke/thrdschd.c index d100c3b8900..14e22ba137d 100644 --- a/ntoskrnl/ke/thrdschd.c +++ b/ntoskrnl/ke/thrdschd.c @@ -696,6 +696,28 @@ KiSetAffinityThread(IN PKTHREAD Thread, return OldAffinity; } +// +// This macro exists because NtYieldExecution locklessly attempts to read from +// the KPRCB's ready summary, and the usual way of going through KeGetCurrentPrcb +// would require getting fs:1C first (or gs), and then doing another dereference. +// In an attempt to minimize the amount of instructions and potential race/tear +// that could happen, Windows seems to define this as a macro that directly acceses +// the ready summary through a single fs: read by going through the KPCR's PrcbData. +// +// See http://research.microsoft.com/en-us/collaboration/global/asia-pacific/ +// programs/trk_case4_process-thread_management.pdf +// +// We need this per-arch because sometimes it's Prcb and sometimes PrcbData, and +// because on x86 it's FS, and on x64 it's GS (not sure what it is on ARM/PPC). +// +#ifdef _M_IX86 +#define KiGetCurrentReadySummary() __readfsdword(FIELD_OFFSET(KIPCR, PrcbData.ReadySummary)) +#elif _M_AMD64 +#define KiGetCurrentReadySummary() __readgsdword(FIELD_OFFSET(KIPCR, Prcb.ReadySummary)) +#else +#error Implement me! +#endif + /* * @implemented */ @@ -703,16 +725,23 @@ NTSTATUS NTAPI NtYieldExecution(VOID) { - NTSTATUS Status = STATUS_NO_YIELD_PERFORMED; + NTSTATUS Status; KIRQL OldIrql; - PKPRCB Prcb = KeGetCurrentPrcb(); - PKTHREAD Thread = KeGetCurrentThread(), NextThread; + PKPRCB Prcb; + PKTHREAD Thread, NextThread; + + /* NB: No instructions (other than entry code) should preceed this line */ /* Fail if there's no ready summary */ - if (!Prcb->ReadySummary) return Status; + if (!KiGetCurrentReadySummary()) return STATUS_NO_YIELD_PERFORMED; - /* Raise IRQL to synch */ + /* Now get the current thread, set the status... */ + Status = STATUS_NO_YIELD_PERFORMED; + Thread = KeGetCurrentThread(); + + /* Raise IRQL to synch and get the KPRCB now */ OldIrql = KeRaiseIrqlToSynchLevel(); + Prcb = KeGetCurrentPrcb(); /* Now check if there's still a ready summary */ if (Prcb->ReadySummary) diff --git a/ntoskrnl/ke/wait.c b/ntoskrnl/ke/wait.c index 3fc51062ba4..79e350b6447 100644 --- a/ntoskrnl/ke/wait.c +++ b/ntoskrnl/ke/wait.c @@ -413,7 +413,7 @@ KeWaitForSingleObject(IN PVOID Object, PKTIMER Timer = &Thread->Timer; NTSTATUS WaitStatus; BOOLEAN Swappable; - LARGE_INTEGER DueTime, NewDueTime, InterruptTime; + LARGE_INTEGER DueTime = {{0}}, NewDueTime, InterruptTime; PLARGE_INTEGER OriginalDueTime = Timeout; ULONG Hand = 0; @@ -580,7 +580,7 @@ KeWaitForMultipleObjects(IN ULONG Count, NTSTATUS WaitStatus = STATUS_SUCCESS; BOOLEAN Swappable; PLARGE_INTEGER OriginalDueTime = Timeout; - LARGE_INTEGER DueTime, NewDueTime, InterruptTime; + LARGE_INTEGER DueTime = {{0}}, NewDueTime, InterruptTime; ULONG Index, Hand = 0; /* Make sure the Wait Count is valid */ diff --git a/ntoskrnl/mm/ARM3/contmem.c b/ntoskrnl/mm/ARM3/contmem.c index 8fd906e9897..bb5f6ea0ac7 100644 --- a/ntoskrnl/mm/ARM3/contmem.c +++ b/ntoskrnl/mm/ARM3/contmem.c @@ -430,7 +430,7 @@ MiAllocateContiguousMemory(IN SIZE_T NumberOfBytes, // // No such luck // - ExFreePool(BaseAddress); + ExFreePoolWithTag(BaseAddress, 'mCmM'); } } @@ -472,7 +472,7 @@ MiFreeContiguousMemory(IN PVOID BaseAddress) // // It did, so just use the pool to free this // - ExFreePool(BaseAddress); + ExFreePoolWithTag(BaseAddress, 'mCmM'); return; } diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index eb5bc01692f..4d07a9ea7a0 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -452,7 +452,7 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, PLIST_ENTRY ListHead; PPOOL_HEADER Entry, NextEntry, FragmentEntry; KIRQL OldIrql; - ULONG BlockSize, i; + USHORT BlockSize, i; // // Some sanity checks @@ -495,7 +495,8 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType, // request would've been treated as a POOL_MAX_ALLOC earlier and resulted in // the direct allocation of pages. // - i = (NumberOfBytes + sizeof(POOL_HEADER) + (POOL_BLOCK_SIZE - 1)) / POOL_BLOCK_SIZE; + i = (USHORT)((NumberOfBytes + sizeof(POOL_HEADER) + (POOL_BLOCK_SIZE - 1)) + / POOL_BLOCK_SIZE); // // Loop in the free lists looking for a block if this size. Start with the @@ -736,7 +737,7 @@ ExAllocatePool(POOL_TYPE PoolType, // // Use a default tag of "None" // - return ExAllocatePoolWithTag(PoolType, NumberOfBytes, 'enoN'); + return ExAllocatePoolWithTag(PoolType, NumberOfBytes, TAG_NONE); } /* @@ -748,7 +749,7 @@ ExFreePoolWithTag(IN PVOID P, IN ULONG TagToFree) { PPOOL_HEADER Entry, NextEntry; - ULONG BlockSize; + USHORT BlockSize; KIRQL OldIrql; POOL_TYPE PoolType; PPOOL_DESCRIPTOR PoolDesc; @@ -788,6 +789,15 @@ ExFreePoolWithTag(IN PVOID P, // OldIrql = ExLockPool(PoolDesc); + // + // Check block tag + // + if (TagToFree && TagToFree != Entry->PoolTag) + { + DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", (char*)&TagToFree, (char*)&Entry->PoolTag); + KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Entry->PoolTag, TagToFree); + } + // // Check if the next allocation is at the end of the page // diff --git a/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h index 7b24a18062d..048b9f3e8a0 100644 --- a/ntoskrnl/mm/ARM3/miarm.h +++ b/ntoskrnl/mm/ARM3/miarm.h @@ -244,7 +244,7 @@ extern const ULONG MmProtectToValue[32]; // Returns the color of a page // #define MI_GET_PAGE_COLOR(x) ((x) & MmSecondaryColorMask) -#define MI_GET_NEXT_COLOR(x) (MI_GET_PAGE_COLOR(++MmSystemPageColor)) +#define MI_GET_NEXT_COLOR() (MI_GET_PAGE_COLOR(++MmSystemPageColor)) #define MI_GET_NEXT_PROCESS_COLOR(x) (MI_GET_PAGE_COLOR(++(x)->NextPageColor)) #ifndef _M_AMD64 diff --git a/ntoskrnl/mm/ARM3/miavl.h b/ntoskrnl/mm/ARM3/miavl.h index da698d6f70c..b16c84eea67 100644 --- a/ntoskrnl/mm/ARM3/miavl.h +++ b/ntoskrnl/mm/ARM3/miavl.h @@ -20,7 +20,7 @@ * * The other difference is that the AVL package for Rtl has custom callbacks for * comparison purposes (which would access some internal, opaque, user data) while - * the Mm package stores the user-data inline as StartingVpn and EndingVpn. So + * the Mm package stores the user-data inline as StartingVpn and EndingVpn. So * when a compare is being made, RtlpAvlCompareRoutine is called, which will either * perform the Mm work, or call the user-specified callback in the Rtl case. */ @@ -54,7 +54,7 @@ RtlpAvlCompareRoutine(IN PRTL_AVL_TABLE Table, { return GenericEqual; } - else + else { return GenericGreaterThan; } @@ -80,7 +80,7 @@ SCHAR FORCEINLINE RtlBalance(IN PRTL_BALANCED_LINKS Node) { - return Node->u1.Balance; + return (SCHAR)Node->u1.Balance; } PRTL_BALANCED_LINKS diff --git a/ntoskrnl/mm/ARM3/mmdbg.c b/ntoskrnl/mm/ARM3/mmdbg.c index ae476a78ab2..8d80e174f4d 100644 --- a/ntoskrnl/mm/ARM3/mmdbg.c +++ b/ntoskrnl/mm/ARM3/mmdbg.c @@ -17,6 +17,8 @@ #ifndef _WINKD_ #define KdpDprintf DPRINT +#elif defined(NDEBUG) +#define KdpDprintf(...) #endif /* GLOBALS ********************************************************************/ diff --git a/ntoskrnl/mm/ARM3/mminit.c b/ntoskrnl/mm/ARM3/mminit.c index 650b67b47ee..74831fe508a 100644 --- a/ntoskrnl/mm/ARM3/mminit.c +++ b/ntoskrnl/mm/ARM3/mminit.c @@ -1087,7 +1087,7 @@ MiCreateMemoryEvent(IN PUNICODE_STRING Name, FALSE); CleanUp: /* Free the DACL */ - ExFreePool(Dacl); + ExFreePoolWithTag(Dacl, 'lcaD'); /* Check if this is the success path */ if (NT_SUCCESS(Status)) @@ -1533,7 +1533,7 @@ MmInitializeMemoryLimits(IN PLOADER_PARAMETER_BLOCK LoaderBlock, RtlCopyMemory(NewBuffer->Run, Buffer->Run, sizeof(PHYSICAL_MEMORY_RUN) * Run); - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, 'lMmM'); // // Now use the new buffer diff --git a/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c index f3f2b6c129f..646f77cb205 100644 --- a/ntoskrnl/mm/ARM3/pagfault.c +++ b/ntoskrnl/mm/ARM3/pagfault.c @@ -583,10 +583,19 @@ MiDispatchFault(IN BOOLEAN StoreInstruction, } // - // The PTE must be invalid, but not totally blank + // The PTE must be invalid // ASSERT(TempPte.u.Hard.Valid == 0); - ASSERT(TempPte.u.Long != 0); + + /* Check if the PTE is completely empty */ + if (TempPte.u.Long == 0) + { + KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA, + (ULONG_PTR)Address, + StoreInstruction, + (ULONG_PTR)TrapInformation, + 2); + } // // No prototype, transition or page file software PTEs in ARM3 yet @@ -727,11 +736,6 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction, // Writing to a read-only page (the stuff ARM3 works with is write, // so again, moot point). // - if (StoreInstruction) - { - DPRINT1("Should NEVER happen on ARM3!!!\n"); - return STATUS_ACCESS_VIOLATION; - } // // Otherwise, the PDE was probably invalid, and all is good now @@ -776,11 +780,6 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction, // Writing to a read-only page (the stuff ARM3 works with is write, // so again, moot point. // - if (StoreInstruction) - { - DPRINT1("Should NEVER happen on ARM3!!!\n"); - return STATUS_ACCESS_VIOLATION; - } /* Release the working set */ MiUnlockWorkingSet(CurrentThread, WorkingSet); diff --git a/ntoskrnl/mm/ARM3/pool.c b/ntoskrnl/mm/ARM3/pool.c index f22091b5848..89817aa26b7 100644 --- a/ntoskrnl/mm/ARM3/pool.c +++ b/ntoskrnl/mm/ARM3/pool.c @@ -864,7 +864,7 @@ MiFreePoolPages(IN PVOID StartingVa) // // Clear the allocation and free bits // - RtlClearBit(MmPagedPoolInfo.EndOfPagedPoolBitmap, i); + RtlClearBit(MmPagedPoolInfo.EndOfPagedPoolBitmap, End); RtlClearBits(MmPagedPoolInfo.PagedPoolAllocationMap, i, NumberOfPages); // diff --git a/ntoskrnl/mm/ARM3/section.c b/ntoskrnl/mm/ARM3/section.c index eee56cbf783..af122899a76 100644 --- a/ntoskrnl/mm/ARM3/section.c +++ b/ntoskrnl/mm/ARM3/section.c @@ -177,7 +177,7 @@ MiInitializeSystemSpaceMap(IN PVOID InputSession OPTIONAL) BitmapSize = sizeof(RTL_BITMAP) + ((((MmSystemViewSize / MI_SYSTEM_VIEW_BUCKET_SIZE) + 31) / 32) * sizeof(ULONG)); Session->SystemSpaceBitMap = ExAllocatePoolWithTag(NonPagedPool, BitmapSize, - ' mM'); + TAG_MM); ASSERT(Session->SystemSpaceBitMap); RtlInitializeBitMap(Session->SystemSpaceBitMap, (PULONG)(Session->SystemSpaceBitMap + 1), @@ -198,7 +198,7 @@ MiInitializeSystemSpaceMap(IN PVOID InputSession OPTIONAL) /* Allocate and zero the view table */ Session->SystemSpaceViewTable = ExAllocatePoolWithTag(NonPagedPool, AllocSize, - ' mM'); + TAG_MM); ASSERT(Session->SystemSpaceViewTable != NULL); RtlZeroMemory(Session->SystemSpaceViewTable, AllocSize); @@ -948,7 +948,7 @@ MmGetFileNameForFileObject(IN PFILE_OBJECT FileObject, ULONG ReturnLength; /* Allocate memory for our structure */ - ObjectNameInfo = ExAllocatePoolWithTag(PagedPool, 1024, ' mM'); + ObjectNameInfo = ExAllocatePoolWithTag(PagedPool, 1024, TAG_MM); if (!ObjectNameInfo) return STATUS_NO_MEMORY; /* Query the name */ @@ -960,7 +960,7 @@ MmGetFileNameForFileObject(IN PFILE_OBJECT FileObject, { /* Failed, free memory */ DPRINT1("Name query failed\n"); - ExFreePoolWithTag(ObjectNameInfo, ' mM'); + ExFreePoolWithTag(ObjectNameInfo, TAG_MM); *ModuleName = NULL; return Status; } @@ -1088,7 +1088,7 @@ NotSection: ModuleNameInformation->Name.Buffer); /* Free temp taged buffer from MmGetFileNameForFileObject() */ - ExFreePoolWithTag(ModuleNameInformation, ' mM'); + ExFreePoolWithTag(ModuleNameInformation, TAG_MM); DPRINT("Found ModuleName %S by address %p\n", ModuleName->Buffer, Address); } diff --git a/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c index 2ca28005d9c..51d5cec2839 100644 --- a/ntoskrnl/mm/ARM3/sysldr.c +++ b/ntoskrnl/mm/ARM3/sysldr.c @@ -336,7 +336,7 @@ MmCallDllInitialize(IN PLDR_DATA_TABLE_ENTRY LdrEntry, Status = DllInit(&RegPath); /* Clean up */ - ExFreePool(RegPath.Buffer); + ExFreePoolWithTag(RegPath.Buffer, TAG_LDR_WSTR); /* Return status value which DllInitialize returned */ return Status; @@ -427,7 +427,7 @@ MiDereferenceImports(IN PLOAD_IMPORTS ImportList) !((ULONG_PTR)LdrEntry->LoadedImports & MM_SYSLDR_SINGLE_ENTRY)) { /* Free them */ - ExFreePool(CurrentImports); + ExFreePoolWithTag(CurrentImports, TAG_LDR_IMPORTS); } } else @@ -458,7 +458,7 @@ MiClearImports(IN PLDR_DATA_TABLE_ENTRY LdrEntry) } /* Otherwise, free the import list */ - ExFreePool(LdrEntry->LoadedImports); + ExFreePoolWithTag(LdrEntry->LoadedImports, TAG_LDR_IMPORTS); LdrEntry->LoadedImports = MM_SYSLDR_BOOT_LOADED; } @@ -948,7 +948,7 @@ MmUnloadSystemImage(IN PVOID ImageHandle) if (LdrEntry->FullDllName.Buffer) { /* Free it */ - ExFreePool(LdrEntry->FullDllName.Buffer); + ExFreePoolWithTag(LdrEntry->FullDllName.Buffer, TAG_LDR_WSTR); } /* Check if we had a section */ @@ -959,7 +959,7 @@ MmUnloadSystemImage(IN PVOID ImageHandle) } /* Free the entry */ - ExFreePool(LdrEntry); + ExFreePoolWithTag(LdrEntry, TAG_MODULE_OBJECT); } /* Release the system lock and return */ @@ -1022,7 +1022,7 @@ MiResolveImageReferences(IN PVOID ImageBase, LoadedImportsSize = ImportCount * sizeof(PVOID) + sizeof(SIZE_T); LoadedImports = ExAllocatePoolWithTag(PagedPool, LoadedImportsSize, - 'TDmM'); + TAG_LDR_IMPORTS); if (LoadedImports) { /* Zero it */ @@ -1059,7 +1059,7 @@ MiResolveImageReferences(IN PVOID ImageBase, { /* It's not, it's importing stuff it shouldn't be! */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return STATUS_PROCEDURE_NOT_FOUND; } @@ -1073,7 +1073,7 @@ MiResolveImageReferences(IN PVOID ImageBase, { /* This is not kernel code */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return STATUS_PROCEDURE_NOT_FOUND; } @@ -1098,7 +1098,7 @@ MiResolveImageReferences(IN PVOID ImageBase, { /* Failed */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return Status; } @@ -1153,7 +1153,7 @@ CheckDllState: sizeof(UNICODE_NULL); DllName.Buffer = ExAllocatePoolWithTag(NonPagedPool, DllName.MaximumLength, - 'TDmM'); + TAG_LDR_WSTR); if (DllName.Buffer) { /* Setup the base length and copy it */ @@ -1177,7 +1177,7 @@ CheckDllState: if (NT_SUCCESS(Status)) { /* We can free the DLL Name */ - ExFreePool(DllName.Buffer); + ExFreePoolWithTag(DllName.Buffer, TAG_LDR_WSTR); } else { @@ -1219,7 +1219,7 @@ CheckDllState: /* Cleanup and return */ RtlFreeUnicodeString(&NameString); MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return Status; } @@ -1252,7 +1252,7 @@ CheckDllState: { /* Cleanup and return */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); DPRINT1("Warning: Driver failed to load, %S not found\n", *MissingDriver); return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND; } @@ -1282,7 +1282,7 @@ CheckDllState: { /* Cleanup and return */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return Status; } @@ -1315,13 +1315,13 @@ CheckDllState: if (!ImportCount) { /* Free the list and set it to no imports */ - ExFreePoolWithTag(LoadedImports, 'TDmM'); + ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); LoadedImports = MM_SYSLDR_NO_IMPORTS; } else if (ImportCount == 1) { /* Just one entry, we can free the table and only use our entry */ - ExFreePoolWithTag(LoadedImports, 'TDmM'); + ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); LoadedImports = (PLOAD_IMPORTS)ImportEntry; } else if (ImportCount != LoadedImports->Count) @@ -1330,7 +1330,7 @@ CheckDllState: LoadedImportsSize = ImportCount * sizeof(PVOID) + sizeof(SIZE_T); NewImports = ExAllocatePoolWithTag(PagedPool, LoadedImportsSize, - 'TDmM'); + TAG_LDR_IMPORTS); if (NewImports) { /* Set count */ @@ -1349,7 +1349,7 @@ CheckDllState: } /* Free the old copy */ - ExFreePoolWithTag(LoadedImports, 'TDmM'); + ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); LoadedImports = NewImports; } } @@ -1625,7 +1625,7 @@ MiBuildImportsForBootDrivers(VOID) if (!(HalEntry) || (!KernelEntry)) return STATUS_NOT_FOUND; /* Allocate the list */ - EntryArray = ExAllocatePoolWithTag(PagedPool, Modules * sizeof(PVOID), 'TDmM'); + EntryArray = ExAllocatePoolWithTag(PagedPool, Modules * sizeof(PVOID), TAG_LDR_IMPORTS); if (!EntryArray) return STATUS_INSUFFICIENT_RESOURCES; /* Loop the loaded module list again */ @@ -1773,7 +1773,7 @@ MiBuildImportsForBootDrivers(VOID) LoadedImportsSize = ImportSize * sizeof(PVOID) + sizeof(SIZE_T); LoadedImports = ExAllocatePoolWithTag(PagedPool, LoadedImportsSize, - 'TDmM'); + TAG_LDR_IMPORTS); ASSERT(LoadedImports); /* Save the count */ @@ -1805,7 +1805,7 @@ MiBuildImportsForBootDrivers(VOID) } /* Free the initial array */ - ExFreePool(EntryArray); + ExFreePoolWithTag(EntryArray, TAG_LDR_IMPORTS); /* FIXME: Might not need to keep the HAL/Kernel imports around */ @@ -1923,7 +1923,7 @@ MiInitializeLoadedModuleList(IN PLOADER_PARAMETER_BLOCK LoaderBlock) EntrySize = sizeof(LDR_DATA_TABLE_ENTRY) + LdrEntry->BaseDllName.MaximumLength + sizeof(UNICODE_NULL); - NewEntry = ExAllocatePoolWithTag(NonPagedPool, EntrySize, TAG_LDR_WSTR); + NewEntry = ExAllocatePoolWithTag(NonPagedPool, EntrySize, TAG_MODULE_OBJECT); if (!NewEntry) return FALSE; /* Copy the entry over */ @@ -2086,7 +2086,7 @@ MiWriteProtectSystemImage(IN PVOID ImageBase) PIMAGE_NT_HEADERS NtHeaders; PIMAGE_SECTION_HEADER Section; PFN_NUMBER DriverPages; - ULONG CurrentProtection, SectionProtection, CombinedProtection, ProtectionMask; + ULONG CurrentProtection, SectionProtection, CombinedProtection = 0, ProtectionMask; ULONG Sections, Size; ULONG_PTR BaseAddress, CurrentAddress; PMMPTE PointerPte, StartPte, LastPte, CurrentPte, ComboPte = NULL; @@ -2561,7 +2561,7 @@ MmLoadSystemImage(IN PUNICODE_STRING FileName, } /* Allocate a buffer we'll use for names */ - Buffer = ExAllocatePoolWithTag(NonPagedPool, MAX_PATH, 'nLmM'); + Buffer = ExAllocatePoolWithTag(NonPagedPool, MAX_PATH, TAG_LDR_WSTR); if (!Buffer) return STATUS_INSUFFICIENT_RESOURCES; /* Check for a separator */ @@ -2906,7 +2906,7 @@ LoaderScan: if (LdrEntry->FullDllName.Buffer) { /* Free it */ - ExFreePool(LdrEntry->FullDllName.Buffer); + ExFreePoolWithTag(LdrEntry->FullDllName.Buffer, TAG_LDR_WSTR); } /* Free the entry itself */ @@ -3004,7 +3004,7 @@ Quickie: /* if (NamePrefix) ExFreePool(PrefixName.Buffer); */ /* Free the name buffer and return status */ - ExFreePoolWithTag(Buffer, 'nLmM'); + ExFreePoolWithTag(Buffer, TAG_LDR_WSTR); return Status; } diff --git a/ntoskrnl/mm/marea.c b/ntoskrnl/mm/marea.c index dc50d13f723..86c9b015243 100644 --- a/ntoskrnl/mm/marea.c +++ b/ntoskrnl/mm/marea.c @@ -377,7 +377,7 @@ MmInsertMemoryArea( PMMVAD Vad; ASSERT(marea->Type == MEMORY_AREA_VIRTUAL_MEMORY || marea->Type == MEMORY_AREA_SECTION_VIEW); - Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), 'Fake'); + Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), TAG_MVAD); ASSERT(Vad); RtlZeroMemory(Vad, sizeof(MMVAD)); Vad->StartingVpn = PAGE_ROUND_DOWN(marea->StartingAddress) >> PAGE_SHIFT; @@ -776,7 +776,7 @@ MmFreeMemoryArea( MiRemoveNode(MemoryArea->Vad, &Process->VadRoot); } - ExFreePool(MemoryArea->Vad); + ExFreePoolWithTag(MemoryArea->Vad, TAG_MVAD); MemoryArea->Vad = NULL; } } diff --git a/ntoskrnl/ob/oblink.c b/ntoskrnl/ob/oblink.c index 3648aa797a5..af95e487ac5 100644 --- a/ntoskrnl/ob/oblink.c +++ b/ntoskrnl/ob/oblink.c @@ -374,7 +374,7 @@ ObpParseSymbolicLink(IN PVOID ParsedObject, POBJECT_SYMBOLIC_LINK SymlinkObject = (POBJECT_SYMBOLIC_LINK)ParsedObject; PUNICODE_STRING TargetPath; PWSTR NewTargetPath; - ULONG LengthUsed, MaximumLength; + ULONG LengthUsed, MaximumLength, TempLength; NTSTATUS Status; PAGED_CODE(); @@ -411,9 +411,39 @@ ObpParseSymbolicLink(IN PVOID ParsedObject, return STATUS_OBJECT_TYPE_MISMATCH; } + /* Check if this symlink is bound to a specific object */ + if (SymlinkObject->LinkTargetObject) + { + UNIMPLEMENTED; + } + /* Set the target path and length */ TargetPath = &SymlinkObject->LinkTarget; - LengthUsed = TargetPath->Length + RemainingName->Length; + TempLength = TargetPath->Length; + + /* + * Strip off the extra trailing '\', if we don't do this we will end up + * adding a extra '\' between TargetPath and RemainingName + * causing caller's like ObpLookupObjectName() to fail. + */ + if (TempLength && RemainingName->Length) + { + /* The target and remaining names aren't empty, so check for slashes */ + if ((TargetPath->Buffer[TempLength / sizeof(WCHAR) - 1] == + OBJ_NAME_PATH_SEPARATOR) && + (RemainingName->Buffer[0] == OBJ_NAME_PATH_SEPARATOR)) + { + /* Reduce the length by one to cut off the extra '\' */ + TempLength -= sizeof(OBJ_NAME_PATH_SEPARATOR); + } + } + + /* Calculate the new length */ + LengthUsed = TempLength + RemainingName->Length; + + /* Check if it's not too much */ + if (LengthUsed > 0xFFF0) + return STATUS_NAME_TOO_LONG; /* Optimization: check if the new name is shorter */ if (FullPath->MaximumLength <= LengthUsed) @@ -436,13 +466,13 @@ ObpParseSymbolicLink(IN PVOID ParsedObject, if (RemainingName->Length) { /* Copy the new path */ - RtlMoveMemory((PVOID)((ULONG_PTR)NewTargetPath + TargetPath->Length), + RtlMoveMemory((PVOID)((ULONG_PTR)NewTargetPath + TempLength), RemainingName->Buffer, RemainingName->Length); } /* Copy the target path and null-terminate it */ - RtlCopyMemory(NewTargetPath, TargetPath->Buffer, TargetPath->Length); + RtlCopyMemory(NewTargetPath, TargetPath->Buffer, TempLength); NewTargetPath[LengthUsed / sizeof(WCHAR)] = UNICODE_NULL; /* If the optimization didn't work, free the old buffer */ diff --git a/ntoskrnl/ob/obname.c b/ntoskrnl/ob/obname.c index e4f7e184985..6d0efd32695 100644 --- a/ntoskrnl/ob/obname.c +++ b/ntoskrnl/ob/obname.c @@ -544,7 +544,7 @@ ParseFromRoot: } /* Reparse */ - while (Reparse) + while (Reparse && MaxReparse) { /* Get the name */ RemainingName = *ObjectName; @@ -694,7 +694,7 @@ ParseFromRoot: ObjectHeader))) { /* Either couldn't allocate the name, or insert failed */ - if (NewName) ExFreePool(NewName); + if (NewName) ExFreePoolWithTag(NewName, OB_NAME_TAG); /* Fail due to memory reasons */ Status = STATUS_INSUFFICIENT_RESOURCES; @@ -795,6 +795,7 @@ ReparseObject: { /* Reparse again */ Reparse = TRUE; + --MaxReparse; /* Start over from root if we got sent back there */ if ((Status == STATUS_REPARSE_OBJECT) || diff --git a/ntoskrnl/ob/obsdcach.c b/ntoskrnl/ob/obsdcach.c index 52e5a8d5096..840298e3a61 100644 --- a/ntoskrnl/ob/obsdcach.c +++ b/ntoskrnl/ob/obsdcach.c @@ -132,7 +132,7 @@ ObpCreateCacheEntry(IN PSECURITY_DESCRIPTOR SecurityDescriptor, /* Calculate the memory we'll need to allocate and allocate it */ CacheSize = Length + (sizeof(SECURITY_DESCRIPTOR_HEADER) - sizeof(QUAD)); - SdHeader = ExAllocatePoolWithTag(PagedPool, CacheSize, 'cSbO'); + SdHeader = ExAllocatePoolWithTag(PagedPool, CacheSize, TAG_OB_SD_CACHE); if (!SdHeader) return NULL; /* Setup the header */ diff --git a/ntoskrnl/po/poshtdwn.c b/ntoskrnl/po/poshtdwn.c index 919ffd4eefb..54e27e25063 100644 --- a/ntoskrnl/po/poshtdwn.c +++ b/ntoskrnl/po/poshtdwn.c @@ -84,6 +84,7 @@ PopShutdownSystem(IN POWER_ACTION SystemAction) /* Try platform driver first, then legacy */ //PopInvokeSystemStateHandler(PowerStateShutdownReset, NULL); + PopSetSystemPowerState(PowerSystemShutdown, SystemAction); HalReturnToFirmware(HalRebootRoutine); break; @@ -102,7 +103,7 @@ PopShutdownSystem(IN POWER_ACTION SystemAction) //PopInvokeSystemStateHandler(PowerStateShutdownOff, NULL); /* ReactOS Hack */ - PopSetSystemPowerState(PowerSystemShutdown); + PopSetSystemPowerState(PowerSystemShutdown, SystemAction); PopShutdownHandler(); /* If that didn't work, call the HAL */ diff --git a/ntoskrnl/po/power.c b/ntoskrnl/po/power.c index a4f45c0f38c..85839a9ce67 100644 --- a/ntoskrnl/po/power.c +++ b/ntoskrnl/po/power.c @@ -23,6 +23,13 @@ typedef struct _REQUEST_POWER_ITEM PVOID Context; } REQUEST_POWER_ITEM, *PREQUEST_POWER_ITEM; +typedef struct _POWER_STATE_TRAVERSE_CONTEXT +{ + SYSTEM_POWER_STATE SystemPowerState; + POWER_ACTION PowerAction; + PDEVICE_OBJECT PowerDevice; +} POWER_STATE_TRAVERSE_CONTEXT, *PPOWER_STATE_TRAVERSE_CONTEXT; + PDEVICE_NODE PopSystemPowerDeviceNode = NULL; BOOLEAN PopAcpiPresent = FALSE; POP_POWER_ACTION PopAction; @@ -64,53 +71,33 @@ PopCleanupPowerState(IN PPOWER_STATE PowerState) } NTSTATUS -NTAPI -PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState) +PopSendQuerySystemPowerState(PDEVICE_OBJECT DeviceObject, SYSTEM_POWER_STATE SystemState, POWER_ACTION PowerAction) { - IO_STATUS_BLOCK IoStatusBlock; - PDEVICE_OBJECT DeviceObject; - PIO_STACK_LOCATION IrpSp; - PDEVICE_OBJECT Fdo; - NTSTATUS Status; KEVENT Event; + IO_STATUS_BLOCK IoStatusBlock; + PIO_STACK_LOCATION IrpSp; PIRP Irp; - - if (!PopAcpiPresent) return STATUS_NOT_IMPLEMENTED; - - Status = IopGetSystemPowerDeviceObject(&DeviceObject); - if (!NT_SUCCESS(Status)) - { - DPRINT1("No system power driver available\n"); - return STATUS_UNSUCCESSFUL; - } - - Fdo = IoGetAttachedDeviceReference(DeviceObject); - - if (Fdo == DeviceObject) - { - DPRINT("An FDO was not attached\n"); - return STATUS_UNSUCCESSFUL; - } - + NTSTATUS Status; + KeInitializeEvent(&Event, NotificationEvent, FALSE); - + Irp = IoBuildSynchronousFsdRequest(IRP_MJ_POWER, - Fdo, + DeviceObject, NULL, 0, NULL, &Event, &IoStatusBlock); - + IrpSp = IoGetNextIrpStackLocation(Irp); - IrpSp->MinorFunction = IRP_MN_SET_POWER; + IrpSp->MinorFunction = IRP_MN_QUERY_POWER; IrpSp->Parameters.Power.Type = SystemPowerState; - IrpSp->Parameters.Power.State.SystemState = PowerState; - - DPRINT("Calling ACPI driver"); - Status = PoCallDriver(Fdo, Irp); + IrpSp->Parameters.Power.State.SystemState = SystemState; + IrpSp->Parameters.Power.ShutdownType = PowerAction; + + Status = PoCallDriver(DeviceObject, Irp); if (Status == STATUS_PENDING) { KeWaitForSingleObject(&Event, @@ -118,10 +105,176 @@ PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState) KernelMode, FALSE, NULL); - Status = IoStatusBlock.Status; + Status = IoStatusBlock.Status; } + + return Status; +} - ObDereferenceObject(Fdo); +NTSTATUS +PopSendSetSystemPowerState(PDEVICE_OBJECT DeviceObject, SYSTEM_POWER_STATE SystemState, POWER_ACTION PowerAction) +{ + KEVENT Event; + IO_STATUS_BLOCK IoStatusBlock; + PIO_STACK_LOCATION IrpSp; + PIRP Irp; + NTSTATUS Status; + + KeInitializeEvent(&Event, + NotificationEvent, + FALSE); + + Irp = IoBuildSynchronousFsdRequest(IRP_MJ_POWER, + DeviceObject, + NULL, + 0, + NULL, + &Event, + &IoStatusBlock); + + IrpSp = IoGetNextIrpStackLocation(Irp); + IrpSp->MinorFunction = IRP_MN_SET_POWER; + IrpSp->Parameters.Power.Type = SystemPowerState; + IrpSp->Parameters.Power.State.SystemState = SystemState; + IrpSp->Parameters.Power.ShutdownType = PowerAction; + + Status = PoCallDriver(DeviceObject, Irp); + if (Status == STATUS_PENDING) + { + KeWaitForSingleObject(&Event, + Executive, + KernelMode, + FALSE, + NULL); + Status = IoStatusBlock.Status; + } + + return Status; +} + +NTSTATUS +PopQuerySystemPowerStateTraverse(PDEVICE_NODE DeviceNode, + PVOID Context) +{ + PPOWER_STATE_TRAVERSE_CONTEXT PowerStateContext = Context; + NTSTATUS Status; + + DPRINT("PopQuerySystemPowerStateTraverse(%p, %p)\n", DeviceNode, Context); + + if (DeviceNode == IopRootDeviceNode) + return STATUS_SUCCESS; + + if (DeviceNode->Flags & DNF_LEGACY_DRIVER) + return STATUS_SUCCESS; + + Status = PopSendQuerySystemPowerState(DeviceNode->PhysicalDeviceObject, + PowerStateContext->SystemPowerState, + PowerStateContext->PowerAction); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Device '%wZ' failed IRP_MN_QUERY_POWER\n", &DeviceNode->InstancePath); + } + +#if 0 + return Status; +#else + return STATUS_SUCCESS; +#endif +} + +NTSTATUS +PopSetSystemPowerStateTraverse(PDEVICE_NODE DeviceNode, + PVOID Context) +{ + PPOWER_STATE_TRAVERSE_CONTEXT PowerStateContext = Context; + NTSTATUS Status; + + DPRINT("PopSetSystemPowerStateTraverse(%p, %p)\n", DeviceNode, Context); + + if (DeviceNode == IopRootDeviceNode) + return STATUS_SUCCESS; + + if (DeviceNode->PhysicalDeviceObject == PowerStateContext->PowerDevice) + return STATUS_SUCCESS; + + if (DeviceNode->Flags & DNF_LEGACY_DRIVER) + return STATUS_SUCCESS; + + Status = PopSendSetSystemPowerState(DeviceNode->PhysicalDeviceObject, + PowerStateContext->SystemPowerState, + PowerStateContext->PowerAction); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Device '%wZ' failed IRP_MN_SET_POWER\n", &DeviceNode->InstancePath); + } + +#if 0 + return Status; +#else + return STATUS_SUCCESS; +#endif +} + +NTSTATUS +NTAPI +PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState, POWER_ACTION PowerAction) +{ + PDEVICE_OBJECT DeviceObject; + PDEVICE_OBJECT Fdo; + NTSTATUS Status; + DEVICETREE_TRAVERSE_CONTEXT Context; + POWER_STATE_TRAVERSE_CONTEXT PowerContext; + + Status = IopGetSystemPowerDeviceObject(&DeviceObject); + if (!NT_SUCCESS(Status)) + { + DPRINT1("No system power driver available\n"); + Fdo = NULL; + } + else + { + Fdo = IoGetAttachedDeviceReference(DeviceObject); + if (Fdo == DeviceObject) + { + DPRINT("An FDO was not attached\n"); + return STATUS_UNSUCCESSFUL; + } + } + + /* Set up context */ + PowerContext.PowerAction = PowerAction; + PowerContext.SystemPowerState = PowerState; + PowerContext.PowerDevice = Fdo; + + /* Query for system power change */ + IopInitDeviceTreeTraverseContext(&Context, + IopRootDeviceNode, + PopQuerySystemPowerStateTraverse, + &PowerContext); + + Status = IopTraverseDeviceTree(&Context); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Query system power state failed; changing state anyway\n"); + } + + /* Set system power change */ + IopInitDeviceTreeTraverseContext(&Context, + IopRootDeviceNode, + PopSetSystemPowerStateTraverse, + &PowerContext); + + IopTraverseDeviceTree(&Context); + + if (!PopAcpiPresent) return STATUS_NOT_IMPLEMENTED; + + if (Fdo != NULL) + { + if (PowerAction != PowerActionShutdownReset) + PopSendSetSystemPowerState(Fdo, PowerState, PowerAction); + + ObDereferenceObject(Fdo); + } return Status; } @@ -421,7 +574,7 @@ PoRequestPowerIrp(IN PDEVICE_OBJECT DeviceObject, *pIrp = Irp; IoSetCompletionRoutine(Irp, PopRequestPowerIrpCompletion, RequestPowerItem, TRUE, TRUE, TRUE); - IoCallDriver(TopDeviceObject, Irp); + PoCallDriver(TopDeviceObject, Irp); /* Always return STATUS_PENDING. The completion routine * will call CompletionFunction and complete the Irp. diff --git a/ntoskrnl/se/acl.c b/ntoskrnl/se/acl.c index 35e4a7520e9..2c4532d270c 100644 --- a/ntoskrnl/se/acl.c +++ b/ntoskrnl/se/acl.c @@ -311,7 +311,7 @@ SepCaptureAcl(IN PACL InputAcl, _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Free the ACL and return the exception code */ - ExFreePool(NewAcl); + ExFreePoolWithTag(NewAcl, TAG_ACL); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -361,7 +361,7 @@ SepReleaseAcl(IN PACL CapturedAcl, (AccessMode != KernelMode || (AccessMode == KernelMode && CaptureIfKernel))) { - ExFreePool(CapturedAcl); + ExFreePoolWithTag(CapturedAcl, TAG_ACL); } } diff --git a/ntoskrnl/se/sd.c b/ntoskrnl/se/sd.c index 0e0eadcea36..d58a6eab7ee 100644 --- a/ntoskrnl/se/sd.c +++ b/ntoskrnl/se/sd.c @@ -686,7 +686,7 @@ Offset += ROUND_UP(Type##Size, sizeof(ULONG)); \ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* We failed to copy the data to the new descriptor */ - ExFreePool(NewDescriptor); + ExFreePoolWithTag(NewDescriptor, TAG_SD); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -1248,7 +1248,7 @@ SeDeassignSecurity(PSECURITY_DESCRIPTOR *SecurityDescriptor) if (*SecurityDescriptor != NULL) { - ExFreePool(*SecurityDescriptor); + ExFreePoolWithTag(*SecurityDescriptor, TAG_SD); *SecurityDescriptor = NULL; } diff --git a/ntoskrnl/se/sid.c b/ntoskrnl/se/sid.c index 93b8bde6d16..aefa07cd6e9 100644 --- a/ntoskrnl/se/sid.c +++ b/ntoskrnl/se/sid.c @@ -60,34 +60,34 @@ VOID NTAPI FreeInitializedSids(VOID) { - if (SeNullSid) ExFreePool(SeNullSid); - if (SeWorldSid) ExFreePool(SeWorldSid); - if (SeLocalSid) ExFreePool(SeLocalSid); - if (SeCreatorOwnerSid) ExFreePool(SeCreatorOwnerSid); - if (SeCreatorGroupSid) ExFreePool(SeCreatorGroupSid); - if (SeCreatorOwnerServerSid) ExFreePool(SeCreatorOwnerServerSid); - if (SeCreatorGroupServerSid) ExFreePool(SeCreatorGroupServerSid); - if (SeNtAuthoritySid) ExFreePool(SeNtAuthoritySid); - if (SeDialupSid) ExFreePool(SeDialupSid); - if (SeNetworkSid) ExFreePool(SeNetworkSid); - if (SeBatchSid) ExFreePool(SeBatchSid); - if (SeInteractiveSid) ExFreePool(SeInteractiveSid); - if (SeServiceSid) ExFreePool(SeServiceSid); - if (SePrincipalSelfSid) ExFreePool(SePrincipalSelfSid); - if (SeLocalSystemSid) ExFreePool(SeLocalSystemSid); - if (SeAuthenticatedUserSid) ExFreePool(SeAuthenticatedUserSid); - if (SeRestrictedCodeSid) ExFreePool(SeRestrictedCodeSid); - if (SeAliasAdminsSid) ExFreePool(SeAliasAdminsSid); - if (SeAliasUsersSid) ExFreePool(SeAliasUsersSid); - if (SeAliasGuestsSid) ExFreePool(SeAliasGuestsSid); - if (SeAliasPowerUsersSid) ExFreePool(SeAliasPowerUsersSid); - if (SeAliasAccountOpsSid) ExFreePool(SeAliasAccountOpsSid); - if (SeAliasSystemOpsSid) ExFreePool(SeAliasSystemOpsSid); - if (SeAliasPrintOpsSid) ExFreePool(SeAliasPrintOpsSid); - if (SeAliasBackupOpsSid) ExFreePool(SeAliasBackupOpsSid); - if (SeAuthenticatedUsersSid) ExFreePool(SeAuthenticatedUsersSid); - if (SeRestrictedSid) ExFreePool(SeRestrictedSid); - if (SeAnonymousLogonSid) ExFreePool(SeAnonymousLogonSid); + if (SeNullSid) ExFreePoolWithTag(SeNullSid, TAG_SID); + if (SeWorldSid) ExFreePoolWithTag(SeWorldSid, TAG_SID); + if (SeLocalSid) ExFreePoolWithTag(SeLocalSid, TAG_SID); + if (SeCreatorOwnerSid) ExFreePoolWithTag(SeCreatorOwnerSid, TAG_SID); + if (SeCreatorGroupSid) ExFreePoolWithTag(SeCreatorGroupSid, TAG_SID); + if (SeCreatorOwnerServerSid) ExFreePoolWithTag(SeCreatorOwnerServerSid, TAG_SID); + if (SeCreatorGroupServerSid) ExFreePoolWithTag(SeCreatorGroupServerSid, TAG_SID); + if (SeNtAuthoritySid) ExFreePoolWithTag(SeNtAuthoritySid, TAG_SID); + if (SeDialupSid) ExFreePoolWithTag(SeDialupSid, TAG_SID); + if (SeNetworkSid) ExFreePoolWithTag(SeNetworkSid, TAG_SID); + if (SeBatchSid) ExFreePoolWithTag(SeBatchSid, TAG_SID); + if (SeInteractiveSid) ExFreePoolWithTag(SeInteractiveSid, TAG_SID); + if (SeServiceSid) ExFreePoolWithTag(SeServiceSid, TAG_SID); + if (SePrincipalSelfSid) ExFreePoolWithTag(SePrincipalSelfSid, TAG_SID); + if (SeLocalSystemSid) ExFreePoolWithTag(SeLocalSystemSid, TAG_SID); + if (SeAuthenticatedUserSid) ExFreePoolWithTag(SeAuthenticatedUserSid, TAG_SID); + if (SeRestrictedCodeSid) ExFreePoolWithTag(SeRestrictedCodeSid, TAG_SID); + if (SeAliasAdminsSid) ExFreePoolWithTag(SeAliasAdminsSid, TAG_SID); + if (SeAliasUsersSid) ExFreePoolWithTag(SeAliasUsersSid, TAG_SID); + if (SeAliasGuestsSid) ExFreePoolWithTag(SeAliasGuestsSid, TAG_SID); + if (SeAliasPowerUsersSid) ExFreePoolWithTag(SeAliasPowerUsersSid, TAG_SID); + if (SeAliasAccountOpsSid) ExFreePoolWithTag(SeAliasAccountOpsSid, TAG_SID); + if (SeAliasSystemOpsSid) ExFreePoolWithTag(SeAliasSystemOpsSid, TAG_SID); + if (SeAliasPrintOpsSid) ExFreePoolWithTag(SeAliasPrintOpsSid, TAG_SID); + if (SeAliasBackupOpsSid) ExFreePoolWithTag(SeAliasBackupOpsSid, TAG_SID); + if (SeAuthenticatedUsersSid) ExFreePoolWithTag(SeAuthenticatedUsersSid, TAG_SID); + if (SeRestrictedSid) ExFreePoolWithTag(SeRestrictedSid, TAG_SID); + if (SeAnonymousLogonSid) ExFreePoolWithTag(SeAnonymousLogonSid, TAG_SID); } BOOLEAN @@ -306,7 +306,7 @@ SepCaptureSid(IN PSID InputSid, _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Free the SID and return the exception code */ - ExFreePool(NewSid); + ExFreePoolWithTag(NewSid, TAG_SID); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -357,7 +357,7 @@ SepReleaseSid(IN PSID CapturedSid, (AccessMode != KernelMode || (AccessMode == KernelMode && CaptureIfKernel))) { - ExFreePool(CapturedSid); + ExFreePoolWithTag(CapturedSid, TAG_SID); } } diff --git a/ntoskrnl/se/token.c b/ntoskrnl/se/token.c index d13bc1a0f4f..d70e27710b6 100644 --- a/ntoskrnl/se/token.c +++ b/ntoskrnl/se/token.c @@ -293,7 +293,7 @@ SepDuplicateToken(PTOKEN Token, AccessToken->UserAndGroups = (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'uKOT'); + TAG_TOKEN_USERS); EndMem = &AccessToken->UserAndGroups[AccessToken->UserAndGroupCount]; @@ -320,7 +320,7 @@ SepDuplicateToken(PTOKEN Token, AccessToken->Privileges = (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'pKOT'); + TAG_TOKEN_PRIVILAGES); for (i = 0; i < AccessToken->PrivilegeCount; i++) { @@ -335,7 +335,7 @@ SepDuplicateToken(PTOKEN Token, AccessToken->DefaultDacl = (PACL) ExAllocatePoolWithTag(PagedPool, Token->DefaultDacl->AclSize, - 'kDOT'); + TAG_TOKEN_ACL); memcpy(AccessToken->DefaultDacl, Token->DefaultDacl, Token->DefaultDacl->AclSize); @@ -460,13 +460,13 @@ SepDeleteToken(PVOID ObjectBody) PTOKEN AccessToken = (PTOKEN)ObjectBody; if (AccessToken->UserAndGroups) - ExFreePool(AccessToken->UserAndGroups); + ExFreePoolWithTag(AccessToken->UserAndGroups, TAG_TOKEN_USERS); if (AccessToken->Privileges) - ExFreePool(AccessToken->Privileges); + ExFreePoolWithTag(AccessToken->Privileges, TAG_TOKEN_PRIVILAGES); if (AccessToken->DefaultDacl) - ExFreePool(AccessToken->DefaultDacl); + ExFreePoolWithTag(AccessToken->DefaultDacl, TAG_TOKEN_ACL); } @@ -639,7 +639,7 @@ SepCreateToken(OUT PHANDLE TokenHandle, AccessToken->UserAndGroups = (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'uKOT'); + TAG_TOKEN_USERS); EndMem = &AccessToken->UserAndGroups[AccessToken->UserAndGroupCount]; @@ -675,7 +675,7 @@ SepCreateToken(OUT PHANDLE TokenHandle, AccessToken->Privileges = (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'pKOT'); + TAG_TOKEN_PRIVILAGES); if (PreviousMode != KernelMode) { @@ -704,7 +704,7 @@ SepCreateToken(OUT PHANDLE TokenHandle, AccessToken->DefaultDacl = (PACL) ExAllocatePoolWithTag(PagedPool, DefaultDacl->AclSize, - 'kDOT'); + TAG_TOKEN_ACL); memcpy(AccessToken->DefaultDacl, DefaultDacl, DefaultDacl->AclSize); @@ -1720,7 +1720,7 @@ NtSetInformationToken(IN HANDLE TokenHandle, /* Free the previous dacl if present */ if(Token->DefaultDacl != NULL) { - ExFreePool(Token->DefaultDacl); + ExFreePoolWithTag(Token->DefaultDacl, TAG_TOKEN_ACL); } /* Set the new dacl */ @@ -1732,7 +1732,7 @@ NtSetInformationToken(IN HANDLE TokenHandle, /* Clear and free the default dacl if present */ if (Token->DefaultDacl != NULL) { - ExFreePool(Token->DefaultDacl); + ExFreePoolWithTag(Token->DefaultDacl, TAG_TOKEN_ACL); Token->DefaultDacl = NULL; } } @@ -2478,7 +2478,7 @@ NtOpenThreadTokenEx(IN HANDLE ThreadHandle, PreviousMode, &hToken); } - if (Dacl) ExFreePool(Dacl); + if (Dacl) ExFreePoolWithTag(Dacl, TAG_TOKEN_ACL); if (OpenAsSelf) { diff --git a/subsystems/ntvdm/CMakeLists.txt b/subsystems/ntvdm/CMakeLists.txt index a64fd05ee4e..2346970488e 100644 --- a/subsystems/ntvdm/CMakeLists.txt +++ b/subsystems/ntvdm/CMakeLists.txt @@ -9,11 +9,7 @@ add_executable(ntvdm set_module_type(ntvdm win32cui) -target_link_libraries(ntvdm - mingw_main - mingw_common) - -add_importlibs(ntvdm ntdll user32 gdi32 advapi32 kernel32 msvcrt) +add_importlibs(ntvdm ntdll user32 gdi32 advapi32 msvcrt kernel32) add_dependencies(ntvdm ndk bugcodes) -add_cd_file(TARGET ntvdm DESTINATION reactos/system32 FOR all) \ No newline at end of file +add_cd_file(TARGET ntvdm DESTINATION reactos/system32 FOR all) diff --git a/subsystems/ntvdm/lang/pl-PL.rc b/subsystems/ntvdm/lang/pl-PL.rc index 046b4d5dbcc..30c3186d441 100644 --- a/subsystems/ntvdm/lang/pl-PL.rc +++ b/subsystems/ntvdm/lang/pl-PL.rc @@ -1,14 +1,14 @@ -#include "resource.h" /* -* translated by xrogers (http://rogers.cyberdusk.pl/) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -*/ - + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN STRING_WelcomeMsg, "Wirtualna maszyna DOS dla ReactOS.\n" -STRING_PromptMsg, "Wcinij r aby uruchomi, s aby wyczy lub q, aby zakoczy." +STRING_PromptMsg, "Wciśnij r aby uruchomić, s aby wyłączyć lub q, aby zakończyć." END diff --git a/subsystems/ntvdm/lang/ru-RU.rc b/subsystems/ntvdm/lang/ru-RU.rc index b185e68ffe4..35f78578d70 100644 --- a/subsystems/ntvdm/lang/ru-RU.rc +++ b/subsystems/ntvdm/lang/ru-RU.rc @@ -8,6 +8,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_WelcomeMsg, " DOS ReactOS.\n" -STRING_PromptMsg, " r , s q ." +STRING_WelcomeMsg, "Виртуальная машина поддержки DOS для ReactOS.\n" +STRING_PromptMsg, "Введите r для запуска, s для выключения или q выхода." END diff --git a/subsystems/ntvdm/lang/uk-UA.rc b/subsystems/ntvdm/lang/uk-UA.rc index 6cb86f82f80..2db3dc5991a 100644 --- a/subsystems/ntvdm/lang/uk-UA.rc +++ b/subsystems/ntvdm/lang/uk-UA.rc @@ -13,6 +13,6 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE BEGIN -STRING_WelcomeMsg, "ϳ DOS ReactOS.\n" -STRING_PromptMsg, " r , s q, ." +STRING_WelcomeMsg, "Підтримка віртуальної машини DOS у ReactOS.\n" +STRING_PromptMsg, "Введіть r для запуску, s для закриття або q, щоб вийти зараз." END diff --git a/subsystems/ntvdm/rsrc.rc b/subsystems/ntvdm/rsrc.rc index 5c3792d2c80..20dd735e539 100644 --- a/subsystems/ntvdm/rsrc.rc +++ b/subsystems/ntvdm/rsrc.rc @@ -14,10 +14,13 @@ #include "lang/ja-JP.rc" #include "lang/no-NO.rc" #include "lang/th-TH.rc" -#include "lang/uk-UA.rc" -#include "lang/pl-PL.rc" #include "lang/pt-BR.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/zh-CN.rc" #include "lang/zh-TW.rc" + +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/subsystems/win32/csrss/csrsrv/CMakeLists.txt b/subsystems/win32/csrss/csrsrv/CMakeLists.txt index 34944902ed3..26989823cf9 100644 --- a/subsystems/win32/csrss/csrsrv/CMakeLists.txt +++ b/subsystems/win32/csrss/csrsrv/CMakeLists.txt @@ -13,7 +13,7 @@ list(APPEND SOURCE init.c ${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def) -add_library(csrsrv SHARED ${CMAKE_CURRENT_BINARY_DIR}/csrsrv_srv.h.gch ${SOURCE}) +add_library(csrsrv SHARED ${SOURCE}) target_link_libraries(csrsrv ${PSEH_LIB}) @@ -26,7 +26,7 @@ endif() add_importlibs(csrsrv ntdll smdll) -add_pch(csrsrv ${CMAKE_CURRENT_SOURCE_DIR}/srv.h ${SOURCE}) +add_pch(csrsrv srv.h) add_dependencies(csrsrv psdk bugcodes) add_cd_file(TARGET csrsrv DESTINATION reactos/system32 FOR all) diff --git a/subsystems/win32/csrss/win32csr/CMakeLists.txt b/subsystems/win32/csrss/win32csr/CMakeLists.txt index 20f278a69e3..8b694222473 100644 --- a/subsystems/win32/csrss/win32csr/CMakeLists.txt +++ b/subsystems/win32/csrss/win32csr/CMakeLists.txt @@ -1,4 +1,3 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) include_directories( BEFORE . @@ -19,7 +18,7 @@ list(APPEND SOURCE desktopbg.c dllmain.c exitros.c - file.c + file.c guiconsole.c handle.c harderror.c @@ -28,7 +27,7 @@ list(APPEND SOURCE win32csr.rc ${CMAKE_CURRENT_BINARY_DIR}/win32csr.def) -add_library(win32csr SHARED ${CMAKE_CURRENT_BINARY_DIR}/win32csr_w32csr.h.gch ${SOURCE}) +add_library(win32csr SHARED ${SOURCE}) target_link_libraries(win32csr win32ksys @@ -38,7 +37,7 @@ set_module_type(win32csr win32dll) add_importlibs(win32csr user32 gdi32 advapi32 psapi msvcrt kernel32 ntdll) -add_pch(win32csr ${CMAKE_CURRENT_SOURCE_DIR}/w32csr.h ${SOURCE}) +add_pch(win32csr w32csr.h) add_dependencies(win32csr bugcodes) add_cd_file(TARGET win32csr DESTINATION reactos/system32 FOR all) diff --git a/subsystems/win32/csrss/win32csr/coninput.c b/subsystems/win32/csrss/win32csr/coninput.c index 30470c70673..26c054e659c 100644 --- a/subsystems/win32/csrss/win32csr/coninput.c +++ b/subsystems/win32/csrss/win32csr/coninput.c @@ -323,6 +323,15 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode) } } } + else + { + if ((ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED) || KeyState[VK_MENU] & 0x80) && + (VirtualKeyCode == VK_ESCAPE || VirtualKeyCode == VK_TAB || VirtualKeyCode == VK_SPACE)) + { + DefWindowProcW( msg->hwnd, msg->message, msg->wParam, msg->lParam); + return; + } + } if (NULL == Console) { @@ -356,7 +365,7 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode) er.Event.KeyEvent.bKeyDown && ((er.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) || (er.Event.KeyEvent.wVirtualKeyCode == 'C')) && - (er.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))) + (er.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) || KeyState[VK_CONTROL] & 0x80)) { PCSRSS_PROCESS_DATA current; PLIST_ENTRY current_entry; diff --git a/subsystems/win32/csrss/win32csr/file.c b/subsystems/win32/csrss/win32csr/file.c index 982e8feec54..6bbf7fb0398 100644 --- a/subsystems/win32/csrss/win32csr/file.c +++ b/subsystems/win32/csrss/win32csr/file.c @@ -98,17 +98,6 @@ CSR_API(CsrDefineDosDevice) RequestLinkTarget = &Request->Data.DefineDosDeviceRequest.TargetName; - /* - * Strip off any trailing '\', if we leave a trailing slash the drive remains non-accessible. - * So working around it for now. - * FIXME: Need to fix this in the object manager ObpLookupObjectName()??, and remove this when the its fixed. - */ - while (RequestLinkTarget->Length >= sizeof(WCHAR) && - RequestLinkTarget->Buffer[(RequestLinkTarget->Length/sizeof(WCHAR)) - 1] == L'\\') - { - RequestLinkTarget->Length -= sizeof(WCHAR); - } - lpBuffer = (PWSTR) RtlAllocateHeap(Win32CsrApiHeap, HEAP_ZERO_MEMORY, RequestDeviceName.MaximumLength + 5 * sizeof(WCHAR)); diff --git a/subsystems/win32/csrss/win32csr/lang/cs-CZ.rc b/subsystems/win32/csrss/win32csr/lang/cs-CZ.rc new file mode 100644 index 00000000000..283cdfe48c3 --- /dev/null +++ b/subsystems/win32/csrss/win32csr/lang/cs-CZ.rc @@ -0,0 +1,63 @@ +/* FILE: subsystems/win32/csrss/win32csr/lang/cs-CZ.rc + * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) + * UPDATED: 2011-04-09 + */ + +LANGUAGE LANG_CZECH, SUBLANG_DEFAULT + +IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Ukonit program - " +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Probh ukonen programu... ekejte, prosm",IDC_STATIC,7,7,186,11 + CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, + 7,20,186,13 + LTEXT "IPokud zvolte okamit ukonen programu, vechna neuloen data budou ztracena. Kliknutm na Ukonit okamit ukonte program.", + IDC_STATIC,7,40,186,26 + DEFPUSHBUTTON "&Ukonit okamit",IDC_END_NOW,150,71,43,17 +END + +IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Ukonit program - " +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "Storno",IDCANCEL,142,98,43,17 + PUSHBUTTON "&Ukonit okamit",IDC_END_NOW,78,98,43,17 + LTEXT "Tento program neodpovd",IDC_STATIC,7,7,178,8 + LTEXT "Kliknutm na Storno se lze vrtit do systmu ReactOS a ovit stav programu", + IDC_STATIC,7,26,178,16 + LTEXT "Pokud zvolte okamit ukonen programu, vechna neuloen data budou ztracena. Kliknutm na Ukonit okamit ukonte program.", + IDC_STATIC,7,53,178,26 +END + +IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 +STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE +EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE +END + +STRINGTABLE +BEGIN + IDS_EDIT "Upravit" + IDS_MARK "Oznait" + IDS_COPY "Koprovat\tEnter" + IDS_PASTE "Vloit" + IDS_SELECTALL "Oznait ve" + IDS_SCROLL "Posunout" + IDS_FIND "Najt..." + IDS_DEFAULTS "Vchoz" + IDS_PROPERTIES "Vlastnosti" + IDS_SCROLLHERE "Posunout sem" + IDS_SCROLLTOP "Posunout na zatek" + IDS_SCROLLBOTTOM "Posunout na konec" + IDS_SCROLLPAGE_UP "O strnku ve" + IDS_SCROLLPAGE_DOWN "O strnku ne" + IDS_SCROLLUP "Posunout nahoru" + IDS_SCROLLDOWN "Posunout dol" + + IDS_COMMAND_PROMPT "Pkazov dek" +END diff --git a/subsystems/win32/csrss/win32csr/lang/pl-PL.rc b/subsystems/win32/csrss/win32csr/lang/pl-PL.rc index 3d9d5d2a318..1fdbfbeec8a 100644 --- a/subsystems/win32/csrss/win32csr/lang/pl-PL.rc +++ b/subsystems/win32/csrss/win32csr/lang/pl-PL.rc @@ -1,35 +1,37 @@ /* -* translated by xrogers (http://rogers.cyberdusk.pl/) -* xxrogers@users.sourceforge.net -* https://sourceforge.net/projects/reactospl -* translation update by Olaf Siejka (Caemyr), Apr 2011 -*/ + * translated by xrogers + * xxrogers@users.sourceforge.net + * https://sourceforge.net/projects/reactospl + * translation update by Olaf Siejka (Caemyr), Apr 2011 + * UTF-8 conversion by Caemyr (May, 2011) + */ + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Zakocz program - " +CAPTION "Zakończ program - " FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Trwa zamykanie programu... Prosz czeka",IDC_STATIC,7,7,186,11 - CONTROL "Postp",IDC_PROGRESS,"msctls_progress32",WS_BORDER, + LTEXT "Trwa zamykanie programu... Proszę czekać",IDC_STATIC,7,7,186,11 + CONTROL "Postęp",IDC_PROGRESS,"msctls_progress32",WS_BORDER, 7,20,186,13 - LTEXT "Jeli zdecydujesz si zamkn program natychmiastowo, utracisz wszelkie niezapisane dane. Aby zakoczy program, wcinij Zakocz teraz.", + LTEXT "Jeśli zdecydujesz się zamknąć program natychmiastowo, utracisz wszelkie niezapisane dane. Aby zakończyć program, wciśnij Zakończ teraz.", IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Zakocz teraz",IDC_END_NOW,150,71,43,17 + DEFPUSHBUTTON "&Zakończ teraz",IDC_END_NOW,150,71,43,17 END IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Zakocz program - " +CAPTION "Zakończ program - " FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "Anuluj",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Zakocz teraz",IDC_END_NOW,78,98,43,17 + PUSHBUTTON "&Zakończ teraz",IDC_END_NOW,78,98,43,17 LTEXT "Wybrany program nie odpowiada",IDC_STATIC,7,7,178,8 - LTEXT "Aby powrci do ReactOS i sprawdzi status programu, kliknij Anuluj", + LTEXT "Aby powrócić do ReactOS i sprawdzić status programu, kliknij Anuluj", IDC_STATIC,7,26,178,16 - LTEXT "Jeli zdecydujesz si zamkn program natychmiastowo, utracisz wszelkie niezapisane dane. Aby zakoczy program, wcinij Zakocz teraz.", + LTEXT "Jeśli zdecydujesz się zamknąć program natychmiastowo, utracisz wszelkie niezapisane dane. Aby zakończyć program, wciśnij Zakończ teraz.", IDC_STATIC,7,53,178,26 END @@ -45,20 +47,20 @@ STRINGTABLE BEGIN IDS_EDIT "Edytuj" IDS_MARK "Zaznacz" - IDS_COPY "Kopiuj\tWejd" + IDS_COPY "Kopiuj\tWejdź" IDS_PASTE "Wklej" IDS_SELECTALL "Zaznacz wszystko" - IDS_SCROLL "Przewi" - IDS_FIND "Znajd..." - IDS_DEFAULTS "Ustawienia domylne" - IDS_PROPERTIES "Waciwoci" - IDS_SCROLLHERE "Przewi tutaj" - IDS_SCROLLTOP "Przewi na pocztek" - IDS_SCROLLBOTTOM "Przewi na koniec" + IDS_SCROLL "Przewiń" + IDS_FIND "Znajdź..." + IDS_DEFAULTS "Ustawienia domyślne" + IDS_PROPERTIES "Właściwości" + IDS_SCROLLHERE "Przewiń tutaj" + IDS_SCROLLTOP "Przewiń na początek" + IDS_SCROLLBOTTOM "Przewiń na koniec" IDS_SCROLLPAGE_UP "Poprzednia strona" - IDS_SCROLLPAGE_DOWN "Nastpna strona" - IDS_SCROLLUP "Przewi do gry" - IDS_SCROLLDOWN "Przewi na d" + IDS_SCROLLPAGE_DOWN "Następna strona" + IDS_SCROLLUP "Przewiń do góry" + IDS_SCROLLDOWN "Przewiń na dół" IDS_COMMAND_PROMPT "Wiersz polecenia" END diff --git a/subsystems/win32/csrss/win32csr/lang/ru-RU.rc b/subsystems/win32/csrss/win32csr/lang/ru-RU.rc index 207fa1f4bab..a8acd99f5e0 100644 --- a/subsystems/win32/csrss/win32csr/lang/ru-RU.rc +++ b/subsystems/win32/csrss/win32csr/lang/ru-RU.rc @@ -2,28 +2,28 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " +CAPTION "Завершение программы - " FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ... ",IDC_STATIC,7,7,186,11 + LTEXT "Завершение программы... Пажалуйста подождите",IDC_STATIC,7,7,186,11 CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, 7,20,186,13 - LTEXT " , . """"", + LTEXT "Если вы завершите программу сейчас, то вы можете потерять несохраненные данные. Чтобы завешить программу сейчас нажмите ""Завершить""", IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&",IDC_END_NOW,150,71,43,17 + DEFPUSHBUTTON "&Завешить",IDC_END_NOW,150,71,43,17 END IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " +CAPTION "Завершение программы - " FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "",IDCANCEL,142,98,43,17 - PUSHBUTTON "&",IDC_END_NOW,78,98,43,17 - LTEXT " ",IDC_STATIC,7,7,178,8 - LTEXT " ReactOS """"", + DEFPUSHBUTTON "Отмена",IDCANCEL,142,98,43,17 + PUSHBUTTON "&Завершить",IDC_END_NOW,78,98,43,17 + LTEXT "Эта программа не отвечает",IDC_STATIC,7,7,178,8 + LTEXT "Для возврата в ReactOS и сохранения данных нажмите ""Отмена""", IDC_STATIC,7,26,178,16 - LTEXT " , . """"", + LTEXT "Если вы завершите программу сейчас, то вы можете потерять несохраненные данные. Чтобы завешить программу сейчас нажмите ""Завершить""", IDC_STATIC,7,53,178,26 END @@ -37,21 +37,21 @@ END STRINGTABLE BEGIN - IDS_EDIT "" - IDS_MARK "" - IDS_COPY "\tEnter" - IDS_PASTE "" - IDS_SELECTALL " " - IDS_SCROLL "" - IDS_FIND "..." - IDS_DEFAULTS "" - IDS_PROPERTIES "" + IDS_EDIT "Изменить" + IDS_MARK "Пометить" + IDS_COPY "Копировать\tEnter" + IDS_PASTE "Вставить" + IDS_SELECTALL "Выделить все" + IDS_SCROLL "Прокрутить" + IDS_FIND "Искать..." + IDS_DEFAULTS "Умолчания" + IDS_PROPERTIES "Свойства" IDS_SCROLLHERE "Scroll Here" IDS_SCROLLTOP "Scroll Top" - IDS_SCROLLBOTTOM " " - IDS_SCROLLPAGE_UP " " - IDS_SCROLLPAGE_DOWN " " - IDS_SCROLLUP " " + IDS_SCROLLBOTTOM "Прокрутить вниз" + IDS_SCROLLPAGE_UP "Вверх страницы" + IDS_SCROLLPAGE_DOWN "Вниз страницы" + IDS_SCROLLUP "Прокрутить вверх" IDS_SCROLLDOWN "Scroll Down" IDS_COMMAND_PROMPT "Command Prompt" diff --git a/subsystems/win32/csrss/win32csr/lang/uk-UA.rc b/subsystems/win32/csrss/win32csr/lang/uk-UA.rc index f419341da73..8b6e67bf543 100644 --- a/subsystems/win32/csrss/win32csr/lang/uk-UA.rc +++ b/subsystems/win32/csrss/win32csr/lang/uk-UA.rc @@ -10,28 +10,28 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " +CAPTION "Завершення програми - " FONT 8, "MS Shell Dlg" BEGIN - LTEXT " ... ",IDC_STATIC,7,7,186,11 - CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER, + LTEXT "Завершення програми... Зачекайте",IDC_STATIC,7,7,186,11 + CONTROL "Прогрес",IDC_PROGRESS,"msctls_progress32",WS_BORDER, 7,20,186,13 - LTEXT " , . , ' '", + LTEXT "Якщо завершити програму негайно, то можна втратити всі незбережені дані. Щоб завершити програму зараз, натисніть 'Завершити зараз'", IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "& ",IDC_END_NOW,150,71,43,17 + DEFPUSHBUTTON "&Завершити зараз",IDC_END_NOW,150,71,43,17 END IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " +CAPTION "Завершення програми - " FONT 8, "MS Shell Dlg" BEGIN - DEFPUSHBUTTON "",IDCANCEL,142,98,43,17 - PUSHBUTTON "& ",IDC_END_NOW,78,98,43,17 - LTEXT " ",IDC_STATIC,7,7,178,8 - LTEXT " ReactOS , ''", + DEFPUSHBUTTON "Скасувати",IDCANCEL,142,98,43,17 + PUSHBUTTON "&Завершити зараз",IDC_END_NOW,78,98,43,17 + LTEXT "Ця програма не відповідає",IDC_STATIC,7,7,178,8 + LTEXT "Щоб повернутися у ReactOS і перевірити стан програми, натисніть 'Скасувати'", IDC_STATIC,7,26,178,16 - LTEXT " , . , ' '", + LTEXT "Якщо завершити програму негайно, то можна втратити всі незбережені дані. Щоб завершити програму зараз, натисніть 'Завершити зараз'", IDC_STATIC,7,53,178,26 END @@ -45,22 +45,22 @@ END STRINGTABLE BEGIN - IDS_EDIT "" - IDS_MARK "" - IDS_COPY "\tEnter" - IDS_PASTE "" - IDS_SELECTALL " " - IDS_SCROLL "" - IDS_FIND "..." - IDS_DEFAULTS "" - IDS_PROPERTIES "" - IDS_SCROLLHERE " " - IDS_SCROLLTOP " " - IDS_SCROLLBOTTOM " " - IDS_SCROLLPAGE_UP " " - IDS_SCROLLPAGE_DOWN " " - IDS_SCROLLUP " " - IDS_SCROLLDOWN " " + IDS_EDIT "Редагувати" + IDS_MARK "Виділити" + IDS_COPY "Копіювати\tEnter" + IDS_PASTE "Вставити" + IDS_SELECTALL "Виділити все" + IDS_SCROLL "Прокрутити" + IDS_FIND "Знайти..." + IDS_DEFAULTS "Замовчування" + IDS_PROPERTIES "Властивості" + IDS_SCROLLHERE "Прокрутити сюди" + IDS_SCROLLTOP "Прокрутити на початок" + IDS_SCROLLBOTTOM "Прокрутити на кінець" + IDS_SCROLLPAGE_UP "Попередня сотрінка" + IDS_SCROLLPAGE_DOWN "Наступна сторінка" + IDS_SCROLLUP "Прокрутити догори" + IDS_SCROLLDOWN "Прокрутити донизу" - IDS_COMMAND_PROMPT " " + IDS_COMMAND_PROMPT "Командний рядок" END diff --git a/subsystems/win32/csrss/win32csr/rsrc.rc b/subsystems/win32/csrss/win32csr/rsrc.rc index bf2ce4067a4..027eb6cf51a 100644 --- a/subsystems/win32/csrss/win32csr/rsrc.rc +++ b/subsystems/win32/csrss/win32csr/rsrc.rc @@ -6,6 +6,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 1 ICON DISCARDABLE res/terminal.ico #include "lang/bg-BG.rc" +#include "lang/cs-CZ.rc" #include "lang/de-DE.rc" #include "lang/el-GR.rc" #include "lang/en-US.rc" @@ -15,11 +16,13 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" -#include "lang/pl-PL.rc" -#include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" -#include "lang/uk-UA.rc" #include "lang/zh-CN.rc" #include "lang/zh-TW.rc" +// UTF-8 +#pragma code_page(65001) +#include "lang/pl-PL.rc" +#include "lang/ru-RU.rc" +#include "lang/uk-UA.rc" diff --git a/subsystems/win32/win32k/CMakeLists.txt b/subsystems/win32/win32k/CMakeLists.txt index da0d3cba119..649880cf4b9 100644 --- a/subsystems/win32/win32k/CMakeLists.txt +++ b/subsystems/win32/win32k/CMakeLists.txt @@ -182,7 +182,6 @@ list(APPEND SOURCE endif() add_library(win32k SHARED - ${CMAKE_CURRENT_BINARY_DIR}/win32k_pch.h.gch ${CMAKE_CURRENT_BINARY_DIR}/win32k.def ${SOURCE}) @@ -194,8 +193,9 @@ target_link_libraries(win32k libcntpr) add_importlibs(win32k ntoskrnl hal ftfd) -add_pch(win32k ${CMAKE_CURRENT_SOURCE_DIR}/pch.h ${SOURCE}) +add_pch(win32k pch.h) add_cd_file(TARGET win32k DESTINATION reactos/system32 FOR all) add_importlib_target(win32k.spec) add_library(win32ksys sys-stubs.S) +set_source_files_properties(sys-stubs.S PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/w32ksvc.h) diff --git a/subsystems/win32/win32k/dib/stretchblt.c b/subsystems/win32/win32k/dib/stretchblt.c index 45a5b8f826b..914d6722a9a 100644 --- a/subsystems/win32/win32k/dib/stretchblt.c +++ b/subsystems/win32/win32k/dib/stretchblt.c @@ -43,11 +43,11 @@ BOOLEAN DIB_XXBPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFOBJ *Ma LONG PatternX = 0, PatternY = 0; - ASSERT(IS_VALID_ROP4(ROP)); - BOOL UsesSource = ROP4_USES_SOURCE(ROP); BOOL UsesPattern = ROP4_USES_PATTERN(ROP); + ASSERT(IS_VALID_ROP4(ROP)); + fnDest_GetPixel = DibFunctionsForBitmapFormat[DestSurf->iBitmapFormat].DIB_GetPixel; fnDest_PutPixel = DibFunctionsForBitmapFormat[DestSurf->iBitmapFormat].DIB_PutPixel; diff --git a/subsystems/win32/win32k/include/brush.h b/subsystems/win32/win32k/include/brush.h index 7d3a73f9791..f4705ceb832 100644 --- a/subsystems/win32/win32k/include/brush.h +++ b/subsystems/win32/win32k/include/brush.h @@ -129,3 +129,5 @@ PVOID FASTCALL AllocateObjectAttr(VOID); VOID FASTCALL FreeObjectAttr(PVOID); BOOL FASTCALL IntGdiSetBrushOwner(PBRUSH,DWORD); +BOOL FASTCALL GreSetBrushOwner(HBRUSH,DWORD); + diff --git a/subsystems/win32/win32k/include/cursoricon.h b/subsystems/win32/win32k/include/cursoricon.h index f60023c5805..2b3d703bb97 100644 --- a/subsystems/win32/win32k/include/cursoricon.h +++ b/subsystems/win32/win32k/include/cursoricon.h @@ -71,8 +71,6 @@ PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon); BOOL UserSetCursorPos( INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook); -int UserShowCursor(BOOL bShow); - PSYSTEM_CURSORINFO IntGetSysCursorInfo(VOID); #define IntReleaseCurIconObject(CurIconObj) \ diff --git a/subsystems/win32/win32k/include/msgqueue.h b/subsystems/win32/win32k/include/msgqueue.h index fd11f162409..691c814f1ce 100644 --- a/subsystems/win32/win32k/include/msgqueue.h +++ b/subsystems/win32/win32k/include/msgqueue.h @@ -1,6 +1,7 @@ #pragma once #include "hook.h" +#include "cursoricon.h" #define MSQ_HUNG 5000 #define MSQ_NORMAL 0 @@ -59,8 +60,6 @@ typedef struct _USER_MESSAGE_QUEUE LIST_ENTRY PostedMessagesListHead; /* Queue for hardware messages for the queue. */ LIST_ENTRY HardwareMessagesListHead; - /* Lock for the hardware message list. */ - KMUTEX HardwareLock; /* True if a WM_MOUSEMOVE is pending */ BOOLEAN MouseMoved; /* Current WM_MOUSEMOVE message */ @@ -111,6 +110,11 @@ typedef struct _USER_MESSAGE_QUEUE /* state of each key */ UCHAR KeyState[256]; + /* showing cursor counter (value>=0 - cursor visible, value<0 - cursor hidden) */ + INT ShowingCursor; + /* cursor object */ + PCURICON_OBJECT CursorObject; + /* messages that are currently dispatched by other threads */ LIST_ENTRY DispatchingMessagesHead; /* messages that are currently dispatched by this message queue, required for cleanup */ @@ -322,4 +326,10 @@ UINT FASTCALL GetWakeMask(UINT, UINT); VOID FASTCALL MsqWakeQueue(PUSER_MESSAGE_QUEUE,DWORD,BOOL); VOID FASTCALL ClearMsgBitsMask(PUSER_MESSAGE_QUEUE,UINT); +int UserShowCursor(BOOL bShow); +PCURICON_OBJECT +FASTCALL +UserSetCursor(PCURICON_OBJECT NewCursor, + BOOL ForceChange); + /* EOF */ diff --git a/subsystems/win32/win32k/include/window.h b/subsystems/win32/win32k/include/window.h index 44e6a8c86db..6b5d2f25898 100644 --- a/subsystems/win32/win32k/include/window.h +++ b/subsystems/win32/win32k/include/window.h @@ -28,6 +28,21 @@ BOOL FASTCALL UserUpdateUiState(PWND Wnd, WPARAM wParam); #define HAS_THINFRAME(Style, ExStyle) \ (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP)))) +#define HAS_BIGFRAME(style,exStyle) \ + (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \ + ((exStyle) & WS_EX_DLGMODALFRAME)) + +#define HAS_STATICOUTERFRAME(style,exStyle) \ + (((exStyle) & (WS_EX_STATICEDGE|WS_EX_DLGMODALFRAME)) == \ + WS_EX_STATICEDGE) + +#define HAS_ANYFRAME(style,exStyle) \ + (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \ + ((exStyle) & WS_EX_DLGMODALFRAME) || \ + !((style) & (WS_CHILD | WS_POPUP))) + +#define HAS_MENU(pWnd,style) ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && pWnd->IDMenu) + #define IntIsDesktopWindow(WndObj) \ (WndObj->spwndParent == NULL) @@ -112,5 +127,6 @@ PWND FASTCALL co_UserCreateWindowEx(CREATESTRUCTW*, PUNICODE_STRING, PLARGE_STRI WNDPROC FASTCALL IntGetWindowProc(PWND,BOOL); BOOL FASTCALL IntEnableWindow(HWND,BOOL); +DWORD FASTCALL GetNCHitEx(PWND pWnd, POINT pt); /* EOF */ diff --git a/subsystems/win32/win32k/main/dllmain.c b/subsystems/win32/win32k/main/dllmain.c index caa5ee314ed..d6d2147934d 100644 --- a/subsystems/win32/win32k/main/dllmain.c +++ b/subsystems/win32/win32k/main/dllmain.c @@ -23,6 +23,7 @@ PSECTION_OBJECT GlobalUserHeapSection = NULL; PSERVERINFO gpsi = NULL; // Global User Server Information. SHORT gusLanguageID; +PPROCESSINFO ppiScrnSaver; extern ULONG_PTR Win32kSSDT[]; extern UCHAR Win32kSSPT[]; @@ -63,6 +64,7 @@ Win32kProcessCallback(struct _EPROCESS *Process, SIZE_T ViewSize = 0; LARGE_INTEGER Offset; PVOID UserBase = NULL; + PRTL_USER_PROCESS_PARAMETERS pParams = NULL; NTSTATUS Status; extern PSECTION_OBJECT GlobalUserHeapSection; DPRINT("Creating W32 process PID:%d at IRQ level: %lu\n", Process->UniqueProcessId, KeGetCurrentIrql()); @@ -109,11 +111,19 @@ Win32kProcessCallback(struct _EPROCESS *Process, /* map the gdi handle table to user land */ Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(Process); Process->Peb->GdiDCAttributeList = GDI_BATCH_LIMIT; + pParams = Process->Peb->ProcessParameters; } Win32Process->peProcess = Process; /* setup process flags */ - Win32Process->W32PF_flags = 0; + Win32Process->W32PF_flags = W32PF_THREADCONNECTED; + + if ( pParams && + pParams->WindowFlags & STARTF_SCRNSAVER ) + { + ppiScrnSaver = Win32Process; + Win32Process->W32PF_flags |= W32PF_SCREENSAVER; + } /* Create pools for GDI object attributes */ Win32Process->pPoolDcAttr = GdiPoolCreate(sizeof(DC_ATTR), 'acdG'); @@ -128,6 +138,8 @@ Win32kProcessCallback(struct _EPROCESS *Process, DPRINT("Destroying W32 process PID:%d at IRQ level: %lu\n", Process->UniqueProcessId, KeGetCurrentIrql()); Win32Process->W32PF_flags |= W32PF_TERMINATED; + if (ppiScrnSaver == Win32Process) ppiScrnSaver = NULL; + /* Notify logon application to restart shell if needed */ if(Win32Process->rpdeskStartup->pDeskInfo) { diff --git a/subsystems/win32/win32k/misc/registry.c b/subsystems/win32/win32k/misc/registry.c index 455aa3f8a36..a572b9ec3e6 100644 --- a/subsystems/win32/win32k/misc/registry.c +++ b/subsystems/win32/win32k/misc/registry.c @@ -84,16 +84,14 @@ RegQueryValue( cbDataSize = cbInfoSize - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); + /* Note: STATUS_BUFFER_OVERFLOW is not a success */ if (NT_SUCCESS(Status)) { /* Did we get the right type */ if (pInfo->Type == ulType) { - /* Copy the contents to the caller. Make sure strings are null terminated */ - if (ulType == REG_SZ || ulType == REG_MULTI_SZ || ulType == REG_EXPAND_SZ) - RtlStringCbCopyNW((LPWSTR)pvData, *pcbValue, (LPWSTR)pInfo->Data, cbDataSize); - else - RtlCopyMemory(pvData, pInfo->Data, cbDataSize); + /* Copy the contents to the caller */ + RtlCopyMemory(pvData, pInfo->Data, cbDataSize); } else Status = STATUS_OBJECT_TYPE_MISMATCH; diff --git a/subsystems/win32/win32k/ntuser/accelerator.c b/subsystems/win32/win32k/ntuser/accelerator.c index 06240449ffc..778b18c7159 100644 --- a/subsystems/win32/win32k/ntuser/accelerator.c +++ b/subsystems/win32/win32k/ntuser/accelerator.c @@ -35,6 +35,10 @@ #define NDEBUG #include +UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget ); +HMENU FASTCALL IntGetSubMenu( HMENU hMenu, int nPos); +UINT FASTCALL IntGetMenuState( HMENU hMenu, UINT uId, UINT uFlags); + /* FUNCTIONS *****************************************************************/ INIT_FUNCTION @@ -102,16 +106,14 @@ co_IntTranslateAccelerator( return FALSE; } - DPRINT("NtUserGetKeyState(VK_SHIFT) = 0x%x\n", - UserGetKeyState(VK_SHIFT)); - DPRINT("NtUserGetKeyState(VK_CONTROL) = 0x%x\n", - UserGetKeyState(VK_CONTROL)); - DPRINT("NtUserGetKeyState(VK_MENU) = 0x%x\n", - UserGetKeyState(VK_MENU)); + DPRINT("NtUserGetKeyState(VK_CONTROL) = 0x%x\n",UserGetKeyState(VK_CONTROL)); + DPRINT("NtUserGetKeyState(VK_MENU) = 0x%x\n",UserGetKeyState(VK_MENU)); + DPRINT("NtUserGetKeyState(VK_SHIFT) = 0x%x\n",UserGetKeyState(VK_SHIFT)); if (UserGetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL; if (UserGetKeyState(VK_MENU) & 0x8000) mask |= FALT; if (UserGetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT; + DPRINT("Mask 0x%x\n",mask); if (message == WM_CHAR || message == WM_SYSCHAR) { @@ -129,7 +131,7 @@ co_IntTranslateAccelerator( wParam, 0xff & HIWORD(lParam)); if (mask == (fVirt & (FSHIFT | FCONTROL | FALT))) goto found; - DPRINT("but incorrect SHIFT/CTRL/ALT-state\n"); + DPRINT("but incorrect SHIFT/CTRL/ALT-state mask %x fVirt %x\n",mask,fVirt); } else { @@ -152,20 +154,13 @@ co_IntTranslateAccelerator( found: if (message == WM_KEYUP || message == WM_SYSKEYUP) mesg = 1; - else if (IntGetCaptureWindow()) - mesg = 2; - else if (Window->style & WS_DISABLED) - mesg = 3; else { -#if 0 HMENU hMenu, hSubMenu, hSysMenu; UINT uSysStat = (UINT)-1, uStat = (UINT)-1, nPos; PMENU_OBJECT MenuObject, SubMenu; - MENU_ITEM MenuItem; + PMENU_ITEM MenuItem; -// hMenu = (UserGetWindowLongW(hWnd, GWL_STYLE) & WS_CHILD) ? 0 : GetMenu(hWnd); -// hSysMenu = get_win_sys_menu(hWnd); hMenu = (Window->style & WS_CHILD) ? 0 : (HMENU)Window->IDMenu; hSysMenu = Window->SystemMenu; MenuObject = IntGetMenuObject(Window->SystemMenu); @@ -173,41 +168,8 @@ found: /* find menu item and ask application to initialize it */ /* 1. in the system menu */ hSubMenu = hSysMenu; -// nPos = cmd; -// if(MENU_FindItem(&hSubMenu, &nPos, MF_BYCOMMAND)) - nPos = IntGetMenuItemByFlag( MenuObject, - cmd, - MF_BYCOMMAND, - &SubMenu, - &MenuItem, - NULL); - - if (MenuItem && (nPos != (UINT)-1)) + if (MenuObject) { - hSubMenu = MenuItem.hSubMenu; - - if (IntGetCaptureWindow()) - mesg = 2; - if (Window->style & WS_DISABLED) - mesg = 3; - else - { - co_IntSendMessage(hWnd, WM_INITMENU, (WPARAM)hSysMenu, 0L); - if(hSubMenu != hSysMenu) - { - nPos = MENU_FindSubMenu(&hSysMenu, hSubMenu); - DPRINT("hSysMenu = %p, hSubMenu = %p, nPos = %d\n", hSysMenu, hSubMenu, nPos); - co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, TRUE)); - } - uSysStat = GetMenuState(GetSubMenu(hSysMenu, 0), cmd, MF_BYCOMMAND); - } - } - else /* 2. in the window's menu */ - { - MenuObject = IntGetMenuObject(hMenu); - hSubMenu = hMenu; -// nPos = cmd; -// if(MENU_FindItem(&hSubMenu, &nPos, MF_BYCOMMAND)) nPos = IntGetMenuItemByFlag( MenuObject, cmd, MF_BYCOMMAND, @@ -217,24 +179,58 @@ found: if (MenuItem && (nPos != (UINT)-1)) { + hSubMenu = MenuItem->hSubMenu; + if (IntGetCaptureWindow()) mesg = 2; if (Window->style & WS_DISABLED) mesg = 3; else - { - co_IntSendMessage(hWnd, WM_INITMENU, (WPARAM)hMenu, 0L); - if(hSubMenu != hMenu) + { + co_IntSendMessage(hWnd, WM_INITMENU, (WPARAM)hSysMenu, 0L); + if (hSubMenu != hSysMenu) { - nPos = MENU_FindSubMenu(&hMenu, hSubMenu); - DPRINT("hMenu = %p, hSubMenu = %p, nPos = %d\n", hMenu, hSubMenu, nPos); - co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, FALSE)); + nPos = IntFindSubMenu(&hSysMenu, hSubMenu); + DPRINT("hSysMenu = %p, hSubMenu = %p, nPos = %d\n", hSysMenu, hSubMenu, nPos); + co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, TRUE)); + } + uSysStat = IntGetMenuState(IntGetSubMenu(hSysMenu, 0), cmd, MF_BYCOMMAND); + } + } + else /* 2. in the window's menu */ + { + MenuObject = IntGetMenuObject(hMenu); + hSubMenu = hMenu; + if (MenuObject) + { + nPos = IntGetMenuItemByFlag( MenuObject, + cmd, + MF_BYCOMMAND, + &SubMenu, + &MenuItem, + NULL); + + if (MenuItem && (nPos != (UINT)-1)) + { + if (IntGetCaptureWindow()) + mesg = 2; + if (Window->style & WS_DISABLED) + mesg = 3; + else + { + co_IntSendMessage(hWnd, WM_INITMENU, (WPARAM)hMenu, 0L); + if (hSubMenu != hMenu) + { + nPos = IntFindSubMenu(&hMenu, hSubMenu); + DPRINT("hMenu = %p, hSubMenu = %p, nPos = %d\n", hMenu, hSubMenu, nPos); + co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, FALSE)); + } + uStat = IntGetMenuState(hMenu, cmd, MF_BYCOMMAND); + } } - uStat = GetMenuState(hMenu, cmd, MF_BYCOMMAND); } } } - if (mesg == 0) { if (uSysStat != (UINT)-1) @@ -264,10 +260,6 @@ found: } } } -#else - DPRINT1("Menu search not implemented\n"); - mesg = WM_COMMAND; -#endif } if (mesg == WM_COMMAND) @@ -291,7 +283,7 @@ found: * #5: it's a menu option, but window is iconic * #6: it's a menu option, but disabled */ - DPRINT(", but won't send WM_{SYS}COMMAND, reason is #%d\n", mesg); + DPRINT1(", but won't send WM_{SYS}COMMAND, reason is #%d\n", mesg); if (mesg == 0) { DPRINT1(" unknown reason - please report!"); @@ -434,8 +426,6 @@ CLEANUP: END_CLEANUP; } - - BOOLEAN APIENTRY NtUserDestroyAcceleratorTable( @@ -473,7 +463,6 @@ CLEANUP: END_CLEANUP; } - int APIENTRY NtUserTranslateAccelerator( diff --git a/subsystems/win32/win32k/ntuser/cursoricon.c b/subsystems/win32/win32k/ntuser/cursoricon.c index f749bda6dbd..0b3c419ed1f 100644 --- a/subsystems/win32/win32k/ntuser/cursoricon.c +++ b/subsystems/win32/win32k/ntuser/cursoricon.c @@ -63,7 +63,7 @@ InitCursorImpl() gSysCursorInfo.bClipped = FALSE; gSysCursorInfo.LastBtnDown = 0; gSysCursorInfo.CurrentCursorObject = NULL; - gSysCursorInfo.ShowingCursor = 0; + gSysCursorInfo.ShowingCursor = -1; gSysCursorInfo.ClickLockActive = FALSE; gSysCursorInfo.ClickLockTime = 0; @@ -99,80 +99,14 @@ PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon) return CurIcon; } -PCURICON_OBJECT -FASTCALL -UserSetCursor( - PCURICON_OBJECT NewCursor, - BOOL ForceChange) -{ - PSYSTEM_CURSORINFO CurInfo; - PCURICON_OBJECT OldCursor; - HDC hdcScreen; - - CurInfo = IntGetSysCursorInfo(); - - OldCursor = CurInfo->CurrentCursorObject; - - /* Is the new cursor the same as the old cursor? */ - if (OldCursor == NewCursor) - { - /* Nothing to to do in this case */ - return OldCursor; - } - - /* Get the screen DC */ - if(!(hdcScreen = IntGetScreenDC())) - { - return (HCURSOR)0; - } - - /* Do we have a new cursor? */ - if (NewCursor) - { - CurInfo->ShowingCursor = 1; - CurInfo->CurrentCursorObject = NewCursor; - - /* Call GDI to set the new screen cursor */ - GreSetPointerShape(hdcScreen, - NewCursor->IconInfo.hbmMask, - NewCursor->IconInfo.hbmColor, - NewCursor->IconInfo.xHotspot, - NewCursor->IconInfo.yHotspot, - gpsi->ptCursor.x, - gpsi->ptCursor.y); - } - else - { - /* Check if were diplaying a cursor */ - if (OldCursor && CurInfo->ShowingCursor) - { - /* Remove the cursor */ - GreMovePointer(hdcScreen, -1, -1); - DPRINT("Removing pointer!\n"); - } - - CurInfo->CurrentCursorObject = NULL; - CurInfo->ShowingCursor = 0; - } - - /* Return the old cursor */ - return OldCursor; -} - BOOL UserSetCursorPos( INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook) { PWND DesktopWindow; PSYSTEM_CURSORINFO CurInfo; - HDC hDC; MSG Msg; RECTL rcClip; POINT pt; - if(!(hDC = IntGetScreenDC())) - { - return FALSE; - } - if(!(DesktopWindow = UserGetDesktopWindow())) { return FALSE; @@ -194,58 +128,19 @@ BOOL UserSetCursorPos( INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Ho pt.x = x; pt.y = y; - /* 3. Generate a mouse move message, this sets the htEx and Track Window too. */ + /* 1. Generate a mouse move message, this sets the htEx and Track Window too. */ Msg.message = WM_MOUSEMOVE; Msg.wParam = CurInfo->ButtonsDown; Msg.lParam = MAKELPARAM(x, y); Msg.pt = pt; co_MsqInsertMouseMessage(&Msg, flags, dwExtraInfo, Hook); - /* 1. Store the new cursor position */ + /* 2. Store the new cursor position */ gpsi->ptCursor = pt; - /* 2. Move the mouse pointer */ - GreMovePointer(hDC, x, y); - return TRUE; } -/* Called from NtUserCallOneParam with Routine ONEPARAM_ROUTINE_SHOWCURSOR - * User32 macro NtUserShowCursor */ -int UserShowCursor(BOOL bShow) -{ - PSYSTEM_CURSORINFO CurInfo = IntGetSysCursorInfo(); - HDC hdcScreen; - - if (!(hdcScreen = IntGetScreenDC())) - { - return 0; /* No mouse */ - } - - if (bShow == FALSE) - { - /* Check if were diplaying a cursor */ - if (CurInfo->ShowingCursor == 1) - { - /* Remove the pointer */ - GreMovePointer(hdcScreen, -1, -1); - DPRINT("Removing pointer!\n"); - } - CurInfo->ShowingCursor--; - } - else - { - if (CurInfo->ShowingCursor == 0) - { - /*Show the pointer*/ - GreMovePointer(hdcScreen, gpsi->ptCursor.x, gpsi->ptCursor.y); - } - CurInfo->ShowingCursor++; - } - - return CurInfo->ShowingCursor; -} - /* * We have to register that this object is in use by the current * process. The only way to do that seems to be to walk the list @@ -621,7 +516,7 @@ NtUserGetCursorInfo( CurIcon = (PCURICON_OBJECT)CurInfo->CurrentCursorObject; SafeCi.cbSize = sizeof(CURSORINFO); - SafeCi.flags = ((CurInfo->ShowingCursor && CurIcon) ? CURSOR_SHOWING : 0); + SafeCi.flags = ((CurIcon && CurInfo->ShowingCursor >= 0) ? CURSOR_SHOWING : 0); SafeCi.hCursor = (CurIcon ? (HCURSOR)CurIcon->Self : (HCURSOR)0); SafeCi.ptScreenPos = gpsi->ptCursor; diff --git a/subsystems/win32/win32k/ntuser/defwnd.c b/subsystems/win32/win32k/ntuser/defwnd.c index c2560749508..470df873eaf 100644 --- a/subsystems/win32/win32k/ntuser/defwnd.c +++ b/subsystems/win32/win32k/ntuser/defwnd.c @@ -115,6 +115,7 @@ DefWndHandleSysCommand(PWND pWnd, WPARAM wParam, LPARAM lParam) { case SC_SCREENSAVE: DPRINT1("Screensaver Called!\n"); + UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 0); // always lParam 0 == not Secure break; default: @@ -214,5 +215,207 @@ IntDefWindowProc( return lResult; } +static HICON NC_IconForWindow( PWND pWnd ) +{ + HICON hIcon = 0; + + if (!pWnd->pcls || pWnd->fnid == FNID_DESKTOP) return hIcon; + if (!hIcon) hIcon = pWnd->pcls->hIconSm; + if (!hIcon) hIcon = pWnd->pcls->hIcon; + + if (!hIcon && pWnd->style & DS_MODALFRAME) + { // Fake it out for now, we use it as a test. + hIcon = (HICON)1; + /* FIXME: Need to setup Registry System Cursor & Icons via Callbacks at init time! */ + if (!hIcon) hIcon = gpsi->hIconSmWindows; // Both are IDI_WINLOGO Small + if (!hIcon) hIcon = gpsi->hIcoWindows; // Reg size. + } + return hIcon; +} + +DWORD FASTCALL +GetNCHitEx(PWND pWnd, POINT pt) +{ + RECT rcWindow, rcClient; + DWORD Style, ExStyle; + + if (!pWnd) return HTNOWHERE; + + rcClient.left = rcClient.top = rcWindow.left = rcWindow.top = 0; + rcWindow.right = pWnd->rcWindow.right; + rcWindow.bottom = pWnd->rcWindow.bottom; + rcClient.right = pWnd->rcClient.right; + rcClient.bottom = pWnd->rcClient.bottom; + + if (!IntPtInRect(&rcWindow, pt)) return HTNOWHERE; + + Style = pWnd->style; + ExStyle = pWnd->ExStyle; + + if (Style & WS_MINIMIZE) return HTCAPTION; + + if (IntPtInRect( &rcClient, pt )) return HTCLIENT; + + /* Check borders */ + if (HAS_THICKFRAME( Style, ExStyle )) + { + RECTL_vInflateRect(&rcWindow, -UserGetSystemMetrics(SM_CXFRAME), -UserGetSystemMetrics(SM_CYFRAME) ); + if (!IntPtInRect(&rcWindow, pt)) + { + /* Check top sizing border */ + if (pt.y < rcWindow.top) + { + if (pt.x < rcWindow.left+UserGetSystemMetrics(SM_CXSIZE)) return HTTOPLEFT; + if (pt.x >= rcWindow.right-UserGetSystemMetrics(SM_CXSIZE)) return HTTOPRIGHT; + return HTTOP; + } + /* Check bottom sizing border */ + if (pt.y >= rcWindow.bottom) + { + if (pt.x < rcWindow.left+UserGetSystemMetrics(SM_CXSIZE)) return HTBOTTOMLEFT; + if (pt.x >= rcWindow.right-UserGetSystemMetrics(SM_CXSIZE)) return HTBOTTOMRIGHT; + return HTBOTTOM; + } + /* Check left sizing border */ + if (pt.x < rcWindow.left) + { + if (pt.y < rcWindow.top+UserGetSystemMetrics(SM_CYSIZE)) return HTTOPLEFT; + if (pt.y >= rcWindow.bottom-UserGetSystemMetrics(SM_CYSIZE)) return HTBOTTOMLEFT; + return HTLEFT; + } + /* Check right sizing border */ + if (pt.x >= rcWindow.right) + { + if (pt.y < rcWindow.top+UserGetSystemMetrics(SM_CYSIZE)) return HTTOPRIGHT; + if (pt.y >= rcWindow.bottom-UserGetSystemMetrics(SM_CYSIZE)) return HTBOTTOMRIGHT; + return HTRIGHT; + } + } + } + else /* No thick frame */ + { + if (HAS_DLGFRAME( Style, ExStyle )) + RECTL_vInflateRect(&rcWindow, -UserGetSystemMetrics(SM_CXDLGFRAME), -UserGetSystemMetrics(SM_CYDLGFRAME)); + else if (HAS_THINFRAME( Style, ExStyle )) + RECTL_vInflateRect(&rcWindow, -UserGetSystemMetrics(SM_CXBORDER), -UserGetSystemMetrics(SM_CYBORDER)); + if (!IntPtInRect( &rcWindow, pt )) return HTBORDER; + } + + /* Check caption */ + + if ((Style & WS_CAPTION) == WS_CAPTION) + { + if (ExStyle & WS_EX_TOOLWINDOW) + rcWindow.top += UserGetSystemMetrics(SM_CYSMCAPTION) - 1; + else + rcWindow.top += UserGetSystemMetrics(SM_CYCAPTION) - 1; + if (!IntPtInRect( &rcWindow, pt )) + { + BOOL min_or_max_box = (Style & WS_MAXIMIZEBOX) || + (Style & WS_MINIMIZEBOX); + if (ExStyle & WS_EX_LAYOUTRTL) + { + /* Check system menu */ + if ((Style & WS_SYSMENU) && !(ExStyle & WS_EX_TOOLWINDOW) && NC_IconForWindow(pWnd)) + { + rcWindow.right -= UserGetSystemMetrics(SM_CYCAPTION) - 1; + if (pt.x > rcWindow.right) return HTSYSMENU; + } + + /* Check close button */ + if (Style & WS_SYSMENU) + { + rcWindow.left += UserGetSystemMetrics(SM_CYCAPTION); + if (pt.x < rcWindow.left) return HTCLOSE; + } + + /* Check maximize box */ + /* In win95 there is automatically a Maximize button when there is a minimize one*/ + if (min_or_max_box && !(ExStyle & WS_EX_TOOLWINDOW)) + { + rcWindow.left += UserGetSystemMetrics(SM_CXSIZE); + if (pt.x < rcWindow.left) return HTMAXBUTTON; + } + + /* Check minimize box */ + if (min_or_max_box && !(ExStyle & WS_EX_TOOLWINDOW)) + { + rcWindow.left += UserGetSystemMetrics(SM_CXSIZE); + if (pt.x < rcWindow.left) return HTMINBUTTON; + } + } + else + { + /* Check system menu */ + if ((Style & WS_SYSMENU) && !(ExStyle & WS_EX_TOOLWINDOW) && NC_IconForWindow(pWnd)) + { + rcWindow.left += UserGetSystemMetrics(SM_CYCAPTION) - 1; + if (pt.x < rcWindow.left) return HTSYSMENU; + } + + /* Check close button */ + if (Style & WS_SYSMENU) + { + rcWindow.right -= UserGetSystemMetrics(SM_CYCAPTION); + if (pt.x > rcWindow.right) return HTCLOSE; + } + + /* Check maximize box */ + /* In win95 there is automatically a Maximize button when there is a minimize one*/ + if (min_or_max_box && !(ExStyle & WS_EX_TOOLWINDOW)) + { + rcWindow.right -= UserGetSystemMetrics(SM_CXSIZE); + if (pt.x > rcWindow.right) return HTMAXBUTTON; + } + + /* Check minimize box */ + if (min_or_max_box && !(ExStyle & WS_EX_TOOLWINDOW)) + { + rcWindow.right -= UserGetSystemMetrics(SM_CXSIZE); + if (pt.x > rcWindow.right) return HTMINBUTTON; + } + } + return HTCAPTION; + } + } + + /* Check menu bar */ + + if (HAS_MENU( pWnd, Style ) && (pt.y < rcClient.top) && + (pt.x >= rcClient.left) && (pt.x < rcClient.right)) + return HTMENU; + + /* Check vertical scroll bar */ + + if (ExStyle & WS_EX_LAYOUTRTL) ExStyle ^= WS_EX_LEFTSCROLLBAR; + if (Style & WS_VSCROLL) + { + if((ExStyle & WS_EX_LEFTSCROLLBAR) != 0) + rcClient.left -= UserGetSystemMetrics(SM_CXVSCROLL); + else + rcClient.right += UserGetSystemMetrics(SM_CXVSCROLL); + if (IntPtInRect( &rcClient, pt )) return HTVSCROLL; + } + + /* Check horizontal scroll bar */ + + if (Style & WS_HSCROLL) + { + rcClient.bottom += UserGetSystemMetrics(SM_CYHSCROLL); + if (IntPtInRect( &rcClient, pt )) + { + /* Check size box */ + if ((Style & WS_VSCROLL) && + ((((ExStyle & WS_EX_LEFTSCROLLBAR) != 0) && (pt.x <= rcClient.left + UserGetSystemMetrics(SM_CXVSCROLL))) || + (((ExStyle & WS_EX_LEFTSCROLLBAR) == 0) && (pt.x >= rcClient.right - UserGetSystemMetrics(SM_CXVSCROLL))))) + return HTSIZE; + return HTHSCROLL; + } + } + + /* Has to return HTNOWHERE if nothing was found + Could happen when a window has a customized non client area */ + return HTNOWHERE; +} /* EOF */ diff --git a/subsystems/win32/win32k/ntuser/desktop.c b/subsystems/win32/win32k/ntuser/desktop.c index 3dbfdcf117e..b10e238fcf4 100644 --- a/subsystems/win32/win32k/ntuser/desktop.c +++ b/subsystems/win32/win32k/ntuser/desktop.c @@ -1346,6 +1346,7 @@ NtUserPaintDesktop(HDC hDC) HWND hWndDesktop; BOOL doPatBlt = TRUE; PWND WndDesktop; + static WCHAR s_wszSafeMode[] = L"Safe Mode"; int len; COLORREF color_old; UINT align_old; @@ -1367,133 +1368,132 @@ NtUserPaintDesktop(HDC hDC) RETURN(FALSE); } - DesktopBrush = (HBRUSH)WndDesktop->pcls->hbrBackground; + if (!UserGetSystemMetrics(SM_CLEANBOOT)) + { + DesktopBrush = (HBRUSH)WndDesktop->pcls->hbrBackground; + /* + * Paint desktop background + */ + if (WinSta->hbmWallpaper != NULL) + { + SIZE sz; + int x, y; + HDC hWallpaperDC; - /* - * Paint desktop background - */ + sz.cx = WndDesktop->rcWindow.right - WndDesktop->rcWindow.left; + sz.cy = WndDesktop->rcWindow.bottom - WndDesktop->rcWindow.top; - if (WinSta->hbmWallpaper != NULL) - { - PWND DeskWin; - - DeskWin = UserGetWindowObject(hWndDesktop); - - if (DeskWin) - { - SIZE sz; - int x, y; - HDC hWallpaperDC; - - sz.cx = DeskWin->rcWindow.right - DeskWin->rcWindow.left; - sz.cy = DeskWin->rcWindow.bottom - DeskWin->rcWindow.top; - - if (WinSta->WallpaperMode == wmStretch || - WinSta->WallpaperMode == wmTile) - { - x = 0; - y = 0; - } - else - { - /* Find the upper left corner, can be negtive if the bitmap is bigger then the screen */ - x = (sz.cx / 2) - (WinSta->cxWallpaper / 2); - y = (sz.cy / 2) - (WinSta->cyWallpaper / 2); - } - - hWallpaperDC = NtGdiCreateCompatibleDC(hDC); - if(hWallpaperDC != NULL) - { - HBITMAP hOldBitmap; - - /* fill in the area that the bitmap is not going to cover */ - if (x > 0 || y > 0) + if (WinSta->WallpaperMode == wmStretch || + WinSta->WallpaperMode == wmTile) { - /* FIXME - clip out the bitmap - can be replaced with "NtGdiPatBlt(hDC, x, y, WinSta->cxWallpaper, WinSta->cyWallpaper, PATCOPY | DSTINVERT);" - once we support DSTINVERT */ - PreviousBrush = NtGdiSelectBrush(hDC, DesktopBrush); - NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY); - NtGdiSelectBrush(hDC, PreviousBrush); - } - - /*Do not fill the background after it is painted no matter the size of the picture */ - doPatBlt = FALSE; - - hOldBitmap = NtGdiSelectBitmap(hWallpaperDC, WinSta->hbmWallpaper); - - if (WinSta->WallpaperMode == wmStretch) - { - if(Rect.right && Rect.bottom) - NtGdiStretchBlt(hDC, - x, - y, - sz.cx, - sz.cy, - hWallpaperDC, - 0, - 0, - WinSta->cxWallpaper, - WinSta->cyWallpaper, - SRCCOPY, - 0); - - } - else if (WinSta->WallpaperMode == wmTile) - { - /* paint the bitmap across the screen then down */ - for(y = 0; y < Rect.bottom; y += WinSta->cyWallpaper) - { - for(x = 0; x < Rect.right; x += WinSta->cxWallpaper) - { - NtGdiBitBlt(hDC, - x, - y, - WinSta->cxWallpaper, - WinSta->cyWallpaper, - hWallpaperDC, - 0, - 0, - SRCCOPY, - 0, - 0); - } - } + x = 0; + y = 0; } else { - NtGdiBitBlt(hDC, - x, - y, - WinSta->cxWallpaper, - WinSta->cyWallpaper, - hWallpaperDC, - 0, - 0, - SRCCOPY, - 0, - 0); + /* Find the upper left corner, can be negtive if the bitmap is bigger then the screen */ + x = (sz.cx / 2) - (WinSta->cxWallpaper / 2); + y = (sz.cy / 2) - (WinSta->cyWallpaper / 2); } - NtGdiSelectBitmap(hWallpaperDC, hOldBitmap); - NtGdiDeleteObjectApp(hWallpaperDC); - } - } - } - /* Back ground is set to none, clear the screen */ - if (doPatBlt) - { + hWallpaperDC = NtGdiCreateCompatibleDC(hDC); + if(hWallpaperDC != NULL) + { + HBITMAP hOldBitmap; + + /* fill in the area that the bitmap is not going to cover */ + if (x > 0 || y > 0) + { + /* FIXME - clip out the bitmap + can be replaced with "NtGdiPatBlt(hDC, x, y, WinSta->cxWallpaper, WinSta->cyWallpaper, PATCOPY | DSTINVERT);" + once we support DSTINVERT */ + PreviousBrush = NtGdiSelectBrush(hDC, DesktopBrush); + NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY); + NtGdiSelectBrush(hDC, PreviousBrush); + } + + /*Do not fill the background after it is painted no matter the size of the picture */ + doPatBlt = FALSE; + + hOldBitmap = NtGdiSelectBitmap(hWallpaperDC, WinSta->hbmWallpaper); + + if (WinSta->WallpaperMode == wmStretch) + { + if(Rect.right && Rect.bottom) + NtGdiStretchBlt(hDC, + x, + y, + sz.cx, + sz.cy, + hWallpaperDC, + 0, + 0, + WinSta->cxWallpaper, + WinSta->cyWallpaper, + SRCCOPY, + 0); + + } + else if (WinSta->WallpaperMode == wmTile) + { + /* paint the bitmap across the screen then down */ + for(y = 0; y < Rect.bottom; y += WinSta->cyWallpaper) + { + for(x = 0; x < Rect.right; x += WinSta->cxWallpaper) + { + NtGdiBitBlt(hDC, + x, + y, + WinSta->cxWallpaper, + WinSta->cyWallpaper, + hWallpaperDC, + 0, + 0, + SRCCOPY, + 0, + 0); + } + } + } + else + { + NtGdiBitBlt(hDC, + x, + y, + WinSta->cxWallpaper, + WinSta->cyWallpaper, + hWallpaperDC, + 0, + 0, + SRCCOPY, + 0, + 0); + } + NtGdiSelectBitmap(hWallpaperDC, hOldBitmap); + NtGdiDeleteObjectApp(hWallpaperDC); + } + } + } + else + { + /* Black desktop background in Safe Mode */ + DesktopBrush = StockObjects[BLACK_BRUSH]; + } + + /* Back ground is set to none, clear the screen */ + if (doPatBlt) + { PreviousBrush = NtGdiSelectBrush(hDC, DesktopBrush); NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY); NtGdiSelectBrush(hDC, PreviousBrush); - } + } /* * Display system version on the desktop background */ - if (g_PaintDesktopVersion) + if (g_PaintDesktopVersion||UserGetSystemMetrics(SM_CLEANBOOT)) { static WCHAR s_wszVersion[256] = {0}; RECTL rect; @@ -1519,7 +1519,29 @@ NtUserPaintDesktop(HDC hDC) align_old = IntGdiSetTextAlign(hDC, TA_RIGHT); mode_old = IntGdiSetBkMode(hDC, TRANSPARENT); - GreExtTextOutW(hDC, rect.right-16, rect.bottom-48, 0, NULL, s_wszVersion, len, NULL, 0); + if(!UserGetSystemMetrics(SM_CLEANBOOT)) + { + GreExtTextOutW(hDC, rect.right-16, rect.bottom-48, 0, NULL, s_wszVersion, len, NULL, 0); + } + else + { + /* Safe Mode */ + /* Version information text in top center */ + IntGdiSetTextAlign(hDC, TA_CENTER|TA_TOP); + GreExtTextOutW(hDC, (rect.right+rect.left)/2, rect.top, 0, NULL, s_wszVersion, len, NULL, 0); + /* Safe Mode text in corners */ + len = wcslen(s_wszSafeMode); + IntGdiSetTextAlign(hDC, TA_RIGHT|TA_TOP); + GreExtTextOutW(hDC, rect.right, rect.top, 0, NULL, s_wszSafeMode, len, NULL, 0); + IntGdiSetTextAlign(hDC, TA_RIGHT|TA_BASELINE); + GreExtTextOutW(hDC, rect.right, rect.bottom, 0, NULL, s_wszSafeMode, len, NULL, 0); + IntGdiSetTextAlign(hDC, TA_LEFT|TA_TOP); + GreExtTextOutW(hDC, rect.left, rect.top, 0, NULL, s_wszSafeMode, len, NULL, 0); + IntGdiSetTextAlign(hDC, TA_LEFT|TA_BASELINE); + GreExtTextOutW(hDC, rect.left, rect.bottom, 0, NULL, s_wszSafeMode, len, NULL, 0); + + } + IntGdiSetBkMode(hDC, mode_old); IntGdiSetTextAlign(hDC, align_old); diff --git a/subsystems/win32/win32k/ntuser/display.c b/subsystems/win32/win32k/ntuser/display.c index 76c0d25f315..b5ea068167a 100644 --- a/subsystems/win32/win32k/ntuser/display.c +++ b/subsystems/win32/win32k/ntuser/display.c @@ -634,7 +634,6 @@ NtUserEnumDisplaySettings( BOOL APIENTRY UserClipCursor(RECTL *prcl); VOID APIENTRY UserRedrawDesktop(); -HCURSOR FASTCALL UserSetCursor(PCURICON_OBJECT NewCursor, BOOL ForceChange); LONG APIENTRY diff --git a/subsystems/win32/win32k/ntuser/input.c b/subsystems/win32/win32k/ntuser/input.c index 604ede7cabc..48b06297255 100644 --- a/subsystems/win32/win32k/ntuser/input.c +++ b/subsystems/win32/win32k/ntuser/input.c @@ -18,6 +18,7 @@ extern BYTE gQueueKeyStateTable[]; extern NTSTATUS Win32kInitWin32Thread(PETHREAD Thread); +extern PPROCESSINFO ppiScrnSaver; /* GLOBALS *******************************************************************/ @@ -27,6 +28,7 @@ PTHREADINFO ptiMouse; PKTIMER MasterTimer = NULL; PATTACHINFO gpai = NULL; +static DWORD LastInputTick = 0; static HANDLE MouseDeviceHandle; static HANDLE MouseThreadHandle; static CLIENT_ID MouseThreadId; @@ -59,50 +61,52 @@ DWORD IntLastInputTick(BOOL LastInputTickSetGet); DWORD IntLastInputTick(BOOL LastInputTickSetGet) { - static DWORD LastInputTick = 0; - if (LastInputTickSetGet == TRUE) - { - LARGE_INTEGER TickCount; - KeQueryTickCount(&TickCount); - LastInputTick = TickCount.u.LowPart * (KeQueryTimeIncrement() / 10000); - } - return LastInputTick; + if (LastInputTickSetGet == TRUE) + { + LARGE_INTEGER TickCount; + KeQueryTickCount(&TickCount); + LastInputTick = MsqCalculateMessageTime(&TickCount); + if (gpsi) gpsi->dwLastRITEventTickCount = LastInputTick; + } + return LastInputTick; } -BOOL -APIENTRY -NtUserGetLastInputInfo(PLASTINPUTINFO plii) + +VOID FASTCALL DoTheScreenSaver(VOID) { - BOOL ret = TRUE; + LARGE_INTEGER TickCount; + DWORD Test, TO; - UserEnterShared(); + if (gspv.iScrSaverTimeout > 0) // Zero means Off. + { + KeQueryTickCount(&TickCount); + Test = MsqCalculateMessageTime(&TickCount); + Test = Test - LastInputTick; + TO = 1000 * gspv.iScrSaverTimeout; + if (Test > TO) + { + DPRINT("Screensaver Message Start! Tick %d Timeout %d \n", Test, gspv.iScrSaverTimeout); - _SEH2_TRY - { - if (ProbeForReadUint(&plii->cbSize) != sizeof(LASTINPUTINFO)) - { - EngSetLastError(ERROR_INVALID_PARAMETER); - ret = FALSE; - _SEH2_LEAVE; - } - - ProbeForWrite(plii, sizeof(LASTINPUTINFO), sizeof(DWORD)); - - plii->dwTime = IntLastInputTick(FALSE); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - SetLastNtError(_SEH2_GetExceptionCode()); - ret = FALSE; - } - _SEH2_END; - - UserLeave(); - - return ret; + if (ppiScrnSaver) // We are or we are not the screensaver, prevent reentry... + { + if (!(ppiScrnSaver->W32PF_flags & W32PF_IDLESCREENSAVER)) + { + ppiScrnSaver->W32PF_flags |= W32PF_IDLESCREENSAVER; + DPRINT1("Screensaver is Idle\n"); + } + } + else + { + PUSER_MESSAGE_QUEUE ForegroundQueue = IntGetFocusMessageQueue(); + if (ForegroundQueue && ForegroundQueue->ActiveWindow) + UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 1); // lParam 1 == Secure + else + UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 0); + } + } + } } - VOID FASTCALL ProcessMouseInputData(PMOUSE_INPUT_DATA Data, ULONG InputCount) { @@ -482,7 +486,7 @@ static VOID APIENTRY co_IntKeyboardSendAltKeyMsg() { DPRINT1("co_IntKeyboardSendAltKeyMsg\n"); -// co_MsqPostKeyboardMessage(WM_SYSCOMMAND,SC_KEYMENU,0); This sends everything into a msg loop! +// co_MsqPostKeyboardMessage(WM_SYSCOMMAND,SC_KEYMENU,0); // This sends everything into a msg loop! } static VOID APIENTRY @@ -769,7 +773,7 @@ KeyboardThreadMain(PVOID StartContext) (KeyInput.MakeCode == LastMakeCode)) { RepeatCount++; - lParam |= (1 << 30); + lParam |= (KF_REPEAT << 16); } else { @@ -782,7 +786,7 @@ KeyboardThreadMain(PVOID StartContext) { LastFlags = 0; LastMakeCode = 0; /* Should never match */ - lParam |= (1 << 30) | (1 << 31); + lParam |= (KF_UP << 16) | (KF_REPEAT << 16); } lParam |= RepeatCount; @@ -790,11 +794,11 @@ KeyboardThreadMain(PVOID StartContext) lParam |= (KeyInput.MakeCode & 0xff) << 16; if (KeyInput.Flags & KEY_E0) - lParam |= (1 << 24); + lParam |= (KF_EXTENDED << 16); if (ModifierState & MOD_ALT) { - lParam |= (1 << 29); // wine -> (HIWORD(lParam) & KEYDATA_ALT) #define KEYDATA_ALT 0x2000 + lParam |= (KF_ALTDOWN << 16); if (!(KeyInput.Flags & KEY_BREAK)) msg.message = WM_SYSKEYDOWN; @@ -821,6 +825,10 @@ KeyboardThreadMain(PVOID StartContext) { keyboardLayout = ((PTHREADINFO)FocusThread->Tcb.Win32Thread)->KeyboardLayout; } + if ( FocusQueue->QF_flags & QF_DIALOGACTIVE ) + lParam |= (KF_DLGMODE << 16); + if ( FocusQueue->MenuOwner )//FocusQueue->MenuState ) // MenuState needs a start flag... + lParam |= (KF_MENUMODE << 16); } if (!keyboardLayout) { @@ -860,6 +868,11 @@ KeyboardThreadMain(PVOID StartContext) /* There is no focused window to receive a keyboard message */ continue; } + if ( msg.wParam == VK_F10 ) // Bypass this key before it is in the queue. + { + if (msg.message == WM_KEYUP) msg.message = WM_SYSKEYUP; + if (msg.message == WM_KEYDOWN) msg.message = WM_SYSKEYDOWN; + } /* * Post a keyboard message. */ @@ -1260,8 +1273,14 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected) Msg.wParam = wVk; flags = LOBYTE(ki->wScan); + FocusMessageQueue = IntGetFocusMessageQueue(); + if (ki->dwFlags & KEYEVENTF_EXTENDEDKEY) flags |= KF_EXTENDED; /* FIXME: set KF_DLGMODE and KF_MENUMODE when needed */ + if ( FocusMessageQueue && FocusMessageQueue->QF_flags & QF_DIALOGACTIVE ) + flags |= KF_DLGMODE; + if ( FocusMessageQueue && FocusMessageQueue->MenuOwner )//FocusMessageQueue->MenuState ) // MenuState needs a start flag... + flags |= KF_MENUMODE; /* strip left/right for menu, control, shift */ switch (wVk) @@ -1328,38 +1347,6 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected) Msg.lParam = MAKELPARAM(1 /* repeat count */, ki->wScan); } - FocusMessageQueue = IntGetFocusMessageQueue(); - - Msg.hwnd = 0; - - if (FocusMessageQueue && (FocusMessageQueue->FocusWindow != (HWND)0)) - Msg.hwnd = FocusMessageQueue->FocusWindow; - - if (!ki->time) - { - KeQueryTickCount(&LargeTickCount); - Msg.time = MsqCalculateMessageTime(&LargeTickCount); - } - else - Msg.time = ki->time; - - /* All messages have to contain the cursor point. */ - Msg.pt = gpsi->ptCursor; - - KbdHookData.vkCode = vk_hook; - KbdHookData.scanCode = ki->wScan; - KbdHookData.flags = flags >> 8; - if (Injected) KbdHookData.flags |= LLKHF_INJECTED; - KbdHookData.time = Msg.time; - KbdHookData.dwExtraInfo = ki->dwExtraInfo; - if (co_HOOK_CallHooks(WH_KEYBOARD_LL, HC_ACTION, Msg.message, (LPARAM) &KbdHookData)) - { - DPRINT1("Kbd msg %d wParam %d lParam 0x%08x dropped by WH_KEYBOARD_LL hook\n", - Msg.message, vk_hook, Msg.lParam); - - return FALSE; - } - if (!(ki->dwFlags & KEYEVENTF_UNICODE)) { if (ki->dwFlags & KEYEVENTF_KEYUP) @@ -1381,6 +1368,36 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected) Msg.lParam = MAKELPARAM(1 /* repeat count */, flags); } + Msg.hwnd = 0; + + if (FocusMessageQueue && (FocusMessageQueue->FocusWindow != (HWND)0)) + Msg.hwnd = FocusMessageQueue->FocusWindow; + + if (!ki->time) + { + KeQueryTickCount(&LargeTickCount); + Msg.time = MsqCalculateMessageTime(&LargeTickCount); + } + else + Msg.time = ki->time; + + /* All messages have to contain the cursor point. */ + Msg.pt = gpsi->ptCursor; + + KbdHookData.vkCode = vk_hook; + KbdHookData.scanCode = ki->wScan; + KbdHookData.flags = (flags & (KF_EXTENDED | KF_ALTDOWN | KF_UP)) >> 8; + if (Injected) KbdHookData.flags |= LLKHF_INJECTED; + KbdHookData.time = Msg.time; + KbdHookData.dwExtraInfo = ki->dwExtraInfo; + if (co_HOOK_CallHooks(WH_KEYBOARD_LL, HC_ACTION, Msg.message, (LPARAM) &KbdHookData)) + { + DPRINT1("Kbd msg %d wParam %d lParam 0x%08x dropped by WH_KEYBOARD_LL hook\n", + Msg.message, vk_hook, Msg.lParam); + + return FALSE; + } + if (FocusMessageQueue == NULL) { DPRINT("No focus message queue\n"); @@ -1395,7 +1412,6 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected) FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE; - Msg.pt = gpsi->ptCursor; // Post to hardware queue, based on the first part of wine "some GetMessage tests" // in test_PeekMessage() MsqPostMessage(FocusMessageQueue, &Msg, TRUE, QS_KEY); diff --git a/subsystems/win32/win32k/ntuser/keyboard.c b/subsystems/win32/win32k/ntuser/keyboard.c index 0583b0c9841..93e2d2fb150 100644 --- a/subsystems/win32/win32k/ntuser/keyboard.c +++ b/subsystems/win32/win32k/ntuser/keyboard.c @@ -341,8 +341,13 @@ DWORD FASTCALL UserGetAsyncKeyState(DWORD key) { ret = ((DWORD)(gQueueKeyStateTable[key] & KS_DOWN_BIT) << 8 ) | (gQueueKeyStateTable[key] & KS_LOCK_BIT); + if ( ret & 0x8000 ) + ret |= 0xFFFF0000; // If down, windows returns 0xFFFF8000. + } + else + { + EngSetLastError(ERROR_INVALID_PARAMETER); } - return ret; } @@ -355,19 +360,19 @@ WORD FASTCALL get_key_state(void) if (gpsi->aiSysMet[SM_SWAPBUTTON]) { - if (UserGetAsyncKeyState(VK_RBUTTON) & 0x80) ret |= MK_LBUTTON; - if (UserGetAsyncKeyState(VK_LBUTTON) & 0x80) ret |= MK_RBUTTON; + if (gQueueKeyStateTable[VK_RBUTTON] & 0x80) ret |= MK_LBUTTON; + if (gQueueKeyStateTable[VK_LBUTTON] & 0x80) ret |= MK_RBUTTON; } else { - if (UserGetAsyncKeyState(VK_LBUTTON) & 0x80) ret |= MK_LBUTTON; - if (UserGetAsyncKeyState(VK_RBUTTON) & 0x80) ret |= MK_RBUTTON; + if (gQueueKeyStateTable[VK_LBUTTON] & 0x80) ret |= MK_LBUTTON; + if (gQueueKeyStateTable[VK_RBUTTON] & 0x80) ret |= MK_RBUTTON; } - if (UserGetAsyncKeyState(VK_MBUTTON) & 0x80) ret |= MK_MBUTTON; - if (UserGetAsyncKeyState(VK_SHIFT) & 0x80) ret |= MK_SHIFT; - if (UserGetAsyncKeyState(VK_CONTROL) & 0x80) ret |= MK_CONTROL; - if (UserGetAsyncKeyState(VK_XBUTTON1) & 0x80) ret |= MK_XBUTTON1; - if (UserGetAsyncKeyState(VK_XBUTTON2) & 0x80) ret |= MK_XBUTTON2; + if (gQueueKeyStateTable[VK_MBUTTON] & 0x80) ret |= MK_MBUTTON; + if (gQueueKeyStateTable[VK_SHIFT] & 0x80) ret |= MK_SHIFT; + if (gQueueKeyStateTable[VK_CONTROL] & 0x80) ret |= MK_CONTROL; + if (gQueueKeyStateTable[VK_XBUTTON1] & 0x80) ret |= MK_XBUTTON1; + if (gQueueKeyStateTable[VK_XBUTTON2] & 0x80) ret |= MK_XBUTTON2; return ret; } @@ -401,9 +406,17 @@ IntTranslateKbdMessage(LPMSG lpMsg, WCHAR wp[2] = { 0 }; MSG NewMsg = { 0 }; PKBDTABLES keyLayout; + PWND pWndMsg; BOOL Result = FALSE; - pti = PsGetCurrentThreadWin32Thread(); + pWndMsg = UserGetWindowObject(lpMsg->hwnd); + if (!pWndMsg) // Must have a window! + { + DPRINT1("No Window for Translate.\n"); + return FALSE; + } + + pti = pWndMsg->head.pti; keyLayout = pti->KeyboardLayout->KBTables; if( !keyLayout ) return FALSE; @@ -416,6 +429,8 @@ IntTranslateKbdMessage(LPMSG lpMsg, /* All messages have to contain the cursor point. */ NewMsg.pt = gpsi->ptCursor; + DPRINT("IntTranslateKbdMessage %s\n", lpMsg->message == WM_SYSKEYDOWN ? "WM_SYSKEYDOWN" : "WM_KEYDOWN"); + switch (lpMsg->wParam) { case VK_PACKET: @@ -427,9 +442,13 @@ IntTranslateKbdMessage(LPMSG lpMsg, return TRUE; } - UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff, - gQueueKeyStateTable, wp, 2, 0, - keyLayout ); + UState = ToUnicodeInner( lpMsg->wParam, + HIWORD(lpMsg->lParam) & 0xff, + gQueueKeyStateTable, + wp, + 2, + 0, + keyLayout ); if (UState == 1) { @@ -482,7 +501,7 @@ IntTranslateKbdMessage(LPMSG lpMsg, MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY); Result = TRUE; } - + DPRINT("IntTranslateKbdMessage E %s\n", NewMsg.message == WM_CHAR ? "WM_CHAR" : "WM_SYSCHAR"); return Result; } @@ -839,6 +858,8 @@ W32kKeyProcessMessage(LPMSG Msg, * * Shift and the LP_EXT_BIT cancel. */ ScanCode = (Msg->lParam >> 16) & 0xff; + DPRINT("ScanCode %04x\n",ScanCode); + BaseMapping = Msg->wParam = IntMapVirtualKeyEx( ScanCode, 1, KeyboardLayout ); if( Prefix == 0 ) diff --git a/subsystems/win32/win32k/ntuser/menu.c b/subsystems/win32/win32k/ntuser/menu.c index 2c2a18f001c..3550c63a0a0 100644 --- a/subsystems/win32/win32k/ntuser/menu.c +++ b/subsystems/win32/win32k/ntuser/menu.c @@ -1467,6 +1467,83 @@ UserInsertMenuItem( return FALSE; } +UINT FASTCALL IntGetMenuState( HMENU hMenu, UINT uId, UINT uFlags) +{ + PMENU_OBJECT MenuObject, SubMenu; + PMENU_ITEM mi; + + if (!(MenuObject = UserGetMenuObject(hMenu))) + { + return (UINT)-1; + } + + if (IntGetMenuItemByFlag(MenuObject, uId, uFlags, &SubMenu, &mi, NULL)) + { + if (mi->hSubMenu) + { + if (SubMenu) + { + UINT nSubItems = SubMenu->MenuInfo.MenuItemCount; + return (nSubItems << 8) | ((mi->fState | mi->fType) & 0xff); + } + else + return (UINT)-1; + } + return (mi->fType | mi->fState); + } + return (UINT)-1; +} + +HMENU FASTCALL IntGetSubMenu( HMENU hMenu, int nPos) +{ + PMENU_OBJECT MenuObject, SubMenu; + + if (!(MenuObject = UserGetMenuObject(hMenu))) + { + return NULL; + } + if (IntGetMenuItemByFlag(MenuObject, nPos, MF_BYPOSITION, &SubMenu, NULL, NULL)) + { + return SubMenu ? UserHMGetHandle(SubMenu) : NULL; + } + return NULL; +} + +UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget ) +{ + PMENU_OBJECT MenuObject; + PMENU_ITEM mi; + UINT i; + + if ( (*hMenu) == (HMENU)0xffff || !(MenuObject = UserGetMenuObject(*hMenu)) ) + return NO_SELECTED_ITEM; + + for (i = 0; i < MenuObject->MenuInfo.MenuItemCount; i++) + { + if (!IntGetMenuItemByFlag(MenuObject, i, MF_BYPOSITION, NULL, &mi, NULL)) + { + return NO_SELECTED_ITEM; + } + + if (!(mi->fType & MF_POPUP)) continue; + + if (mi->hSubMenu == hSubTarget) + { + return i; + } + else + { + HMENU hsubmenu = mi->hSubMenu; + UINT pos = IntFindSubMenu(&hsubmenu, hSubTarget ); + if (pos != NO_SELECTED_ITEM) + { + *hMenu = hsubmenu; + return pos; + } + } + } + return NO_SELECTED_ITEM; +} /* FUNCTIONS *****************************************************************/ @@ -1787,8 +1864,8 @@ NtUserGetMenuBarInfo( } Rect.left = Offset.x; Rect.right = Offset.x + MenuObject->MenuInfo.Width; - Rect.top = Offset.y; - Rect.bottom = Offset.y + MenuObject->MenuInfo.Height; + Rect.bottom = Offset.y; + Rect.top = Offset.y - MenuObject->MenuInfo.Height; kmbi.rcBar = Rect; DPRINT("Rect top = %d bottom = %d left = %d right = %d \n", Rect.top, Rect.bottom, Rect.left, Rect.right); @@ -1973,7 +2050,6 @@ NtUserGetMenuItemRect( UINT uItem, PRECTL lprcItem) { - ROSMENUINFO mi; PWND ReferenceWnd; LONG XMove, YMove; RECTL Rect; @@ -1997,15 +2073,12 @@ NtUserGetMenuItemRect( if(!hWnd) { - if(!UserMenuInfo(Menu, &mi, FALSE)) - RETURN( FALSE); - if(mi.Wnd == 0) - RETURN( FALSE); + hWnd = Menu->MenuInfo.Wnd; } if (lprcItem == NULL) RETURN( FALSE); - if (!(ReferenceWnd = UserGetWindowObject(mi.Wnd))) RETURN( FALSE); + if (!(ReferenceWnd = UserGetWindowObject(hWnd))) RETURN( FALSE); if(MenuItem->fType & MF_POPUP) { diff --git a/subsystems/win32/win32k/ntuser/metric.c b/subsystems/win32/win32k/ntuser/metric.c index e8829570a16..060f0df11be 100644 --- a/subsystems/win32/win32k/ntuser/metric.c +++ b/subsystems/win32/win32k/ntuser/metric.c @@ -23,9 +23,21 @@ BOOL FASTCALL InitMetrics(VOID) { - INT *piSysMet; + INT *piSysMet = gpsi->aiSysMet; ULONG Width, Height; + /* note: used for the SM_CLEANBOOT metric */ + DWORD dwValue = 0; + HKEY hKey = 0; + + /* Clean boot */ + piSysMet[SM_CLEANBOOT] = 0; // fallback value of 0 (normal mode) + if(NT_SUCCESS(RegOpenKey(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Option", &hKey))) + { + if(RegReadDWORD(hKey, L"OptionValue", &dwValue)) piSysMet[SM_CLEANBOOT] = (INT)dwValue; + ZwClose(hKey); + } + /* FIXME: HACK, due to missing PDEV on first init */ if (!pPrimarySurface) { @@ -38,8 +50,6 @@ InitMetrics(VOID) Height = pPrimarySurface->gdiinfo.ulVertRes; } - piSysMet = gpsi->aiSysMet; - /* Screen sizes */ piSysMet[SM_CXSCREEN] = Width; piSysMet[SM_CYSCREEN] = Height; @@ -146,7 +156,6 @@ InitMetrics(VOID) piSysMet[SM_SLOWMACHINE] = 0; piSysMet[SM_SECURE] = 0; piSysMet[SM_DBCSENABLED] = 0; - piSysMet[SM_CLEANBOOT] = 0; piSysMet[SM_SHOWSOUNDS] = gspv.bShowSounds; piSysMet[SM_MIDEASTENABLED] = 0; piSysMet[SM_CMONITORS] = 1; diff --git a/subsystems/win32/win32k/ntuser/misc.c b/subsystems/win32/win32k/ntuser/misc.c index a36403e49c1..92f50b402c0 100644 --- a/subsystems/win32/win32k/ntuser/misc.c +++ b/subsystems/win32/win32k/ntuser/misc.c @@ -150,6 +150,32 @@ NtUserGetThreadState( return ret; } +DWORD +APIENTRY +NtUserSetThreadState( + DWORD Set, + DWORD Flags) +{ + PTHREADINFO pti; + DWORD Ret = 0; + // Test the only flags user can change. + if (Set & ~(QF_FF10STATUS|QF_DIALOGACTIVE|QF_TABSWITCHING|QF_FMENUSTATUS|QF_FMENUSTATUSBREAK)) return 0; + if (Flags & ~(QF_FF10STATUS|QF_DIALOGACTIVE|QF_TABSWITCHING|QF_FMENUSTATUS|QF_FMENUSTATUSBREAK)) return 0; + UserEnterExclusive(); + pti = PsGetCurrentThreadWin32Thread(); + if (pti->MessageQueue) + { + Ret = pti->MessageQueue->QF_flags; // Get the queue flags. + if (Set) + pti->MessageQueue->QF_flags |= (Set&Flags); // Set the queue flags. + else + { + if (Flags) pti->MessageQueue->QF_flags &= ~Flags; // Clr the queue flags. + } + } + UserLeave(); + return Ret; +} UINT APIENTRY diff --git a/subsystems/win32/win32k/ntuser/msgqueue.c b/subsystems/win32/win32k/ntuser/msgqueue.c index e34d0a3101b..35ed255edaa 100644 --- a/subsystems/win32/win32k/ntuser/msgqueue.c +++ b/subsystems/win32/win32k/ntuser/msgqueue.c @@ -17,6 +17,8 @@ #define NDEBUG #include +VOID FASTCALL DoTheScreenSaver(VOID); + /* GLOBALS *******************************************************************/ static PAGED_LOOKASIDE_LIST MessageLookasideList; @@ -41,6 +43,183 @@ MsqInitializeImpl(VOID) return(STATUS_SUCCESS); } +PWND FASTCALL +IntChildrenWindowFromPoint(PWND pWndTop, INT x, INT y) +{ + PWND pWnd, pWndChild; + + if (!(pWndTop->style & WS_VISIBLE)) return NULL; + if ((pWndTop->style & WS_DISABLED)) return NULL; + if (!IntPtInWindow(pWndTop, x, y)) return NULL; + + if (x - pWndTop->rcClient.left < pWndTop->rcClient.right && + y - pWndTop->rcClient.top < pWndTop->rcClient.bottom ) + { + for (pWnd = pWndTop->spwndChild; + pWnd != NULL; + pWnd = pWnd->spwndNext) + { + if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED ) + { + DPRINT("The Window is in DESTROY!\n"); + continue; + } + + pWndChild = IntChildrenWindowFromPoint(pWnd, x, y); + + if (pWndChild) + { + return pWndChild; + } + } + } + return pWndTop; +} + +PWND FASTCALL +IntTopLevelWindowFromPoint(INT x, INT y) +{ + PWND pWnd, pwndDesktop; + + /* Get the desktop window */ + pwndDesktop = UserGetDesktopWindow(); + if (!pwndDesktop) + return NULL; + + /* Loop all top level windows */ + for (pWnd = pwndDesktop->spwndChild; + pWnd != NULL; + pWnd = pWnd->spwndNext) + { + if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED) + { + DPRINT("The Window is in DESTROY!\n"); + continue; + } + + if ((pWnd->style & WS_VISIBLE) && IntPtInWindow(pWnd, x, y)) + return pWnd; + } + + /* Window has not been found */ + return NULL; +} + +PCURICON_OBJECT +FASTCALL +UserSetCursor( + PCURICON_OBJECT NewCursor, + BOOL ForceChange) +{ + PCURICON_OBJECT OldCursor; + HDC hdcScreen; + PTHREADINFO pti; + PUSER_MESSAGE_QUEUE MessageQueue; + PWND pWnd; + + pti = PsGetCurrentThreadWin32Thread(); + MessageQueue = pti->MessageQueue; + + /* Get the screen DC */ + if(!(hdcScreen = IntGetScreenDC())) + { + return (HCURSOR)0; + } + + OldCursor = MessageQueue->CursorObject; + + /* Check if cursors are different */ + if (OldCursor == NewCursor) + return OldCursor; + + /* Update cursor for this message queue */ + MessageQueue->CursorObject = NewCursor; + + /* If cursor is not visible we have nothing to do */ + if (MessageQueue->ShowingCursor < 0) + return OldCursor; + + /* Update cursor if this message queue controls it */ + pWnd = IntTopLevelWindowFromPoint(gpsi->ptCursor.x, gpsi->ptCursor.y); + if (pWnd && pWnd->head.pti->MessageQueue == MessageQueue) + { + if (NewCursor) + { + /* Call GDI to set the new screen cursor */ + GreSetPointerShape(hdcScreen, + NewCursor->IconInfo.hbmMask, + NewCursor->IconInfo.hbmColor, + NewCursor->IconInfo.xHotspot, + NewCursor->IconInfo.yHotspot, + gpsi->ptCursor.x, + gpsi->ptCursor.y); + } + else /* Note: OldCursor != NewCursor so we have to hide cursor */ + { + /* Remove the cursor */ + GreMovePointer(hdcScreen, -1, -1); + DPRINT("Removing pointer!\n"); + } + IntGetSysCursorInfo()->CurrentCursorObject = NewCursor; + } + + /* Return the old cursor */ + return OldCursor; +} + +/* Called from NtUserCallOneParam with Routine ONEPARAM_ROUTINE_SHOWCURSOR + * User32 macro NtUserShowCursor */ +int UserShowCursor(BOOL bShow) +{ + HDC hdcScreen; + PTHREADINFO pti; + PUSER_MESSAGE_QUEUE MessageQueue; + PWND pWnd; + + if (!(hdcScreen = IntGetScreenDC())) + { + return -1; /* No mouse */ + } + + pti = PsGetCurrentThreadWin32Thread(); + MessageQueue = pti->MessageQueue; + + /* Update counter */ + MessageQueue->ShowingCursor += bShow ? 1 : -1; + + /* Check for trivial cases */ + if ((bShow && MessageQueue->ShowingCursor != 0) || + (!bShow && MessageQueue->ShowingCursor != -1)) + { + /* Note: w don't update global info here because it is used only + internally to check if cursor is visible */ + return MessageQueue->ShowingCursor; + } + + /* Check if cursor is above window owned by this MessageQueue */ + pWnd = IntTopLevelWindowFromPoint(gpsi->ptCursor.x, gpsi->ptCursor.y); + if (pWnd && pWnd->head.pti->MessageQueue == MessageQueue) + { + if (bShow) + { + /* Show the pointer */ + GreMovePointer(hdcScreen, gpsi->ptCursor.x, gpsi->ptCursor.y); + DPRINT("Showing pointer!\n"); + } + else + { + /* Remove the pointer */ + GreMovePointer(hdcScreen, -1, -1); + DPRINT("Removing pointer!\n"); + } + + /* Update global info */ + IntGetSysCursorInfo()->ShowingCursor = MessageQueue->ShowingCursor; + } + + return MessageQueue->ShowingCursor; +} + DWORD FASTCALL UserGetKeyState(DWORD key) { DWORD ret = 0; @@ -56,7 +235,10 @@ DWORD FASTCALL UserGetKeyState(DWORD key) if (MessageQueue->KeyState[key] & KS_DOWN_BIT) ret |= 0xFF00; // If down, windows returns 0xFF80. } - + else + { + EngSetLastError(ERROR_INVALID_PARAMETER); + } return ret; } @@ -302,13 +484,15 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook MSLLHOOKSTRUCT MouseHookData; PDESKTOP pDesk; PWND pwnd, pwndDesktop; + HDC hdcScreen; + PSYSTEM_CURSORINFO CurInfo; KeQueryTickCount(&LargeTickCount); Msg->time = MsqCalculateMessageTime(&LargeTickCount); MouseHookData.pt.x = LOWORD(Msg->lParam); MouseHookData.pt.y = HIWORD(Msg->lParam); - switch(Msg->message) + switch (Msg->message) { case WM_MOUSEWHEEL: MouseHookData.mouseData = MAKELONG(0, GET_WHEEL_DELTA_WPARAM(Msg->wParam)); @@ -339,57 +523,80 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook /* Get the desktop window */ pwndDesktop = UserGetDesktopWindow(); - if(!pwndDesktop) - return; - - /* Set hit somewhere on the desktop */ + if (!pwndDesktop) return; pDesk = pwndDesktop->head.rpdesk; - pDesk->htEx = HTNOWHERE; - pDesk->spwndTrack = pwndDesktop; /* Check if the mouse is captured */ Msg->hwnd = IntGetCaptureWindow(); - if(Msg->hwnd != NULL) + if (Msg->hwnd != NULL) { pwnd = UserGetWindowObject(Msg->hwnd); - if ((pwnd->style & WS_VISIBLE) && - IntPtInWindow(pwnd, Msg->pt.x, Msg->pt.y)) - { - pDesk->htEx = HTCLIENT; - pDesk->spwndTrack = pwnd; - } } else { - /* Loop all top level windows to find which one should receive input */ - for( pwnd = pwndDesktop->spwndChild; - pwnd != NULL; - pwnd = pwnd->spwndNext ) - { - if ( pwnd->state2 & WNDS2_INDESTROY || pwnd->state & WNDS_DESTROYED ) - { - DPRINT("The Window is in DESTROY!\n"); - continue; - } - - if((pwnd->style & WS_VISIBLE) && - IntPtInWindow(pwnd, Msg->pt.x, Msg->pt.y)) - { - Msg->hwnd = pwnd->head.h; - pDesk->htEx = HTCLIENT; - pDesk->spwndTrack = pwnd; - break; - } - } + pwnd = IntTopLevelWindowFromPoint(Msg->pt.x, Msg->pt.y); + if (pwnd) Msg->hwnd = pwnd->head.h; } - /* Check if we found a window */ - if(Msg->hwnd != NULL && pwnd != NULL) + if (pwnd) { - if(Msg->message == WM_MOUSEMOVE) + PWND pwndTrack = IntChildrenWindowFromPoint(pwnd, Msg->pt.x, Msg->pt.y); + + if ( pDesk->spwndTrack != pwndTrack && pDesk->dwDTFlags & (DF_TME_LEAVE|DF_TME_HOVER) ) + { + if ( pDesk->dwDTFlags & DF_TME_LEAVE ) + UserPostMessage( UserHMGetHandle(pDesk->spwndTrack), + (pDesk->htEx != HTCLIENT) ? WM_NCMOUSELEAVE : WM_MOUSELEAVE, + 0, 0); + + if ( pDesk->dwDTFlags & DF_TME_HOVER ) + IntKillTimer(UserHMGetHandle(pDesk->spwndTrack), ID_EVENT_SYSTIMER_MOUSEHOVER, TRUE); + + pDesk->dwDTFlags &= ~(DF_TME_LEAVE|DF_TME_HOVER); + } + pDesk->spwndTrack = pwndTrack; + pDesk->htEx = GetNCHitEx(pDesk->spwndTrack, Msg->pt); + } + + hdcScreen = IntGetScreenDC(); + CurInfo = IntGetSysCursorInfo(); + + /* Check if we found a window */ + if (Msg->hwnd != NULL && pwnd != NULL) + { + if (Msg->message == WM_MOUSEMOVE) { - /* Mouse move is a special case*/ - MsqPostMouseMove(pwnd->head.pti->MessageQueue, Msg); + PUSER_MESSAGE_QUEUE MessageQueue = pwnd->head.pti->MessageQueue; + + /* Check if cursor should be visible */ + if(hdcScreen && + MessageQueue->CursorObject && + MessageQueue->ShowingCursor >= 0) + { + /* Check if shape has changed */ + if(CurInfo->CurrentCursorObject != MessageQueue->CursorObject) + { + /* Call GDI to set the new screen cursor */ + GreSetPointerShape(hdcScreen, + MessageQueue->CursorObject->IconInfo.hbmMask, + MessageQueue->CursorObject->IconInfo.hbmColor, + MessageQueue->CursorObject->IconInfo.xHotspot, + MessageQueue->CursorObject->IconInfo.yHotspot, + gpsi->ptCursor.x, + gpsi->ptCursor.y); + } else + GreMovePointer(hdcScreen, Msg->pt.x, Msg->pt.y); + } + /* Check if w have to hide cursor */ + else if (CurInfo->ShowingCursor >= 0) + GreMovePointer(hdcScreen, -1, -1); + + /* Update global cursor info */ + CurInfo->ShowingCursor = MessageQueue->ShowingCursor; + CurInfo->CurrentCursorObject = MessageQueue->CursorObject; + + /* Mouse move is a special case */ + MsqPostMouseMove(MessageQueue, Msg); } else { @@ -397,6 +604,12 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook MsqPostMessage(pwnd->head.pti->MessageQueue, Msg, TRUE, QS_MOUSEBUTTON); } } + else if (hdcScreen) + { + /* always show cursor on background; FIXME: set default pointer */ + GreMovePointer(hdcScreen, Msg->pt.x, Msg->pt.y); + CurInfo->ShowingCursor = 0; + } /* Do GetMouseMovePointsEx FIFO. */ MouseHistoryOfMoves[gcur_count].x = Msg->pt.x; @@ -1340,10 +1553,6 @@ BOOL co_IntProcessKeyboardMessage(MSG* Msg, BOOL* RemoveMessages) case VK_LMENU: case VK_RMENU: Msg->wParam = VK_MENU; break; - case VK_F10: - if (Msg->message == WM_KEYUP) Msg->message = WM_SYSKEYUP; - if (Msg->message == WM_KEYDOWN) Msg->message = WM_SYSKEYDOWN; - break; } } @@ -1461,9 +1670,17 @@ co_MsqPeekHardwareMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, if (IsListEmpty(CurrentEntry)) break; if (!CurrentMessage) break; CurrentEntry = CurrentMessage->ListEntry.Flink; - - if ( (( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && (CurrentMessage->QS_Flags & QSflags)) || - ( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) +/* + MSDN: + 1: any window that belongs to the current thread, and any messages on the current thread's message queue whose hwnd value is NULL. + 2: retrieves only messages on the current thread's message queue whose hwnd value is NULL. + 3: handle to the window whose messages are to be retrieved. + */ + if ( ( !Window || // 1 + ( Window == HWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2 + ( Window != HWND_BOTTOM && Window->head.h == CurrentMessage->Msg.hwnd ) ) && // 3 + ( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) || + ( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) ) { msg = CurrentMessage->Msg; @@ -1574,7 +1791,7 @@ VOID CALLBACK HungAppSysTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { - //DoTheScreenSaver(); + DoTheScreenSaver(); DPRINT("HungAppSysTimerProc\n"); // Process list of windows that are hung and waiting. } @@ -1592,13 +1809,14 @@ MsqInitializeMessageQueue(struct _ETHREAD *Thread, PUSER_MESSAGE_QUEUE MessageQu InitializeListHead(&MessageQueue->HardwareMessagesListHead); InitializeListHead(&MessageQueue->DispatchingMessagesHead); InitializeListHead(&MessageQueue->LocalDispatchingMessagesHead); - KeInitializeMutex(&MessageQueue->HardwareLock, 0); MessageQueue->QuitPosted = FALSE; MessageQueue->QuitExitCode = 0; KeQueryTickCount(&LargeTickCount); MessageQueue->LastMsgRead = LargeTickCount.u.LowPart; MessageQueue->FocusWindow = NULL; MessageQueue->NewMessagesHandle = NULL; + MessageQueue->ShowingCursor = 0; + MessageQueue->CursorObject = NULL; Status = ZwCreateEvent(&MessageQueue->NewMessagesHandle, EVENT_ALL_ACCESS, NULL, SynchronizationEvent, FALSE); @@ -1754,6 +1972,18 @@ MsqCleanupMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue) MessageQueue->nCntsQBits[QSRosPostMessage] = 0; MessageQueue->nCntsQBits[QSRosSendMessage] = 0; MessageQueue->nCntsQBits[QSRosHotKey] = 0; + + if (MessageQueue->CursorObject) + { + PCURICON_OBJECT pCursor = MessageQueue->CursorObject; + + /* Change to another cursor if we going to dereference current one */ + if (IntGetSysCursorInfo()->CurrentCursorObject == pCursor) + UserSetCursor(NULL, TRUE); + + UserDereferenceObject(pCursor); + } + } PUSER_MESSAGE_QUEUE FASTCALL @@ -1980,5 +2210,4 @@ NtUserSetKeyboardState(LPBYTE lpKeyState) return ret; } - /* EOF */ diff --git a/subsystems/win32/win32k/ntuser/ntstubs.c b/subsystems/win32/win32k/ntuser/ntstubs.c index 281fe7190a1..f9168806404 100644 --- a/subsystems/win32/win32k/ntuser/ntstubs.c +++ b/subsystems/win32/win32k/ntuser/ntstubs.c @@ -527,17 +527,6 @@ NtUserSetSysColors( return Ret; } -DWORD -APIENTRY -NtUserSetThreadState( - DWORD Unknown0, - DWORD Unknown1) -{ - UNIMPLEMENTED - - return 0; -} - DWORD APIENTRY NtUserUpdateInputContext( diff --git a/subsystems/win32/win32k/ntuser/ntuser.c b/subsystems/win32/win32k/ntuser/ntuser.c index 2e9d7eb9b47..b28c24ac55a 100644 --- a/subsystems/win32/win32k/ntuser/ntuser.c +++ b/subsystems/win32/win32k/ntuser/ntuser.c @@ -92,6 +92,10 @@ UserInitialize( HANDLE hPowerRequestEvent, HANDLE hMediaRequestEvent) { + static const DWORD wPattern55AA[] = /* 32 bit aligned */ + { 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa, + 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa }; + HBITMAP hPattern55AABitmap = NULL; NTSTATUS Status; // Set W32PF_Flags |= (W32PF_READSCREENACCESSGRANTED | W32PF_IOWINSTA) @@ -125,6 +129,14 @@ UserInitialize( CsrInit(); + if (gpsi->hbrGray == NULL) + { + hPattern55AABitmap = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)wPattern55AA); + gpsi->hbrGray = IntGdiCreatePatternBrush(hPattern55AABitmap); + GreDeleteObject(hPattern55AABitmap); + GreSetBrushOwner(gpsi->hbrGray, GDI_OBJ_HMGR_PUBLIC); + } + return STATUS_SUCCESS; } diff --git a/subsystems/win32/win32k/ntuser/object.c b/subsystems/win32/win32k/ntuser/object.c index bcf791e6b0c..142f5600d9a 100644 --- a/subsystems/win32/win32k/ntuser/object.c +++ b/subsystems/win32/win32k/ntuser/object.c @@ -54,7 +54,7 @@ __inline static HANDLE entry_to_handle(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) { PUSER_HANDLE_ENTRY entry; - + PPROCESSINFO ppi = PsGetCurrentProcessWin32Process(); DPRINT("handles used %i\n",gpsi->cHandleEntries); if (ht->freelist) @@ -63,6 +63,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) ht->freelist = entry->ptr; gpsi->cHandleEntries++; + ppi->UserHandleCount++; return entry; } @@ -70,7 +71,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) { /**/ int i, iFree = 0, iWindow = 0, iMenu = 0, iCursorIcon = 0, - iHook = 0, iCallProc = 0, iAccel = 0, iMonitor = 0, iTimer = 0; + iHook = 0, iCallProc = 0, iAccel = 0, iMonitor = 0, iTimer = 0, iEvent = 0, iSMWP = 0; /**/ DPRINT1("Out of user handles! Used -> %i, NM_Handle -> %d\n", gpsi->cHandleEntries, ht->nb_handles); //#if 0 @@ -105,12 +106,17 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) case otTimer: iTimer++; break; + case otEvent: + iEvent++; + break; + case otSMWP: + iSMWP++; default: break; } } - DPRINT1("Handle Count by Type:\n Free = %d Window = %d Menu = %d CursorIcon = %d Hook = %d\n CallProc = %d Accel = %d Monitor = %d Timer = %d\n", - iFree, iWindow, iMenu, iCursorIcon, iHook, iCallProc, iAccel, iMonitor, iTimer ); + DPRINT1("Handle Count by Type:\n Free = %d Window = %d Menu = %d CursorIcon = %d Hook = %d\n CallProc = %d Accel = %d Monitor = %d Timer = %d Event = %d SMWP = %d\n", + iFree, iWindow, iMenu, iCursorIcon, iHook, iCallProc, iAccel, iMonitor, iTimer, iEvent, iSMWP ); //#endif return NULL; #if 0 @@ -132,6 +138,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) entry->generation = 1; gpsi->cHandleEntries++; + ppi->UserHandleCount++; return entry; } @@ -147,6 +154,7 @@ VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes) __inline static void *free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY entry) { + PPROCESSINFO ppi = PsGetCurrentProcessWin32Process(); void *ret; ret = entry->ptr; entry->ptr = ht->freelist; @@ -156,6 +164,7 @@ __inline static void *free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY ht->freelist = entry; gpsi->cHandleEntries--; + ppi->UserHandleCount--; return ret; } diff --git a/subsystems/win32/win32k/ntuser/sysparams.c b/subsystems/win32/win32k/ntuser/sysparams.c index c1ac0effdda..440abb29162 100644 --- a/subsystems/win32/win32k/ntuser/sysparams.c +++ b/subsystems/win32/win32k/ntuser/sysparams.c @@ -59,6 +59,7 @@ static const WCHAR* VAL_HOVERHEIGHT = L"MouseHoverHeight"; static const WCHAR* KEY_DESKTOP = L"Control Panel\\Desktop"; static const WCHAR* VAL_SCRTO = L"ScreenSaveTimeOut"; +static const WCHAR* VAL_SCRNSV = L"SCRNSAVE.EXE"; static const WCHAR* VAL_SCRACT = L"ScreenSaveActive"; static const WCHAR* VAL_GRID = L"GridGranularity"; static const WCHAR* VAL_DRAG = L"DragFullWindows"; @@ -136,6 +137,20 @@ SpiLoadUserPrefMask(DWORD dValue) return Result; } +static +DWORD +SpiLoadTimeOut(VOID) +{ // Must have the string! + WCHAR szApplicationName[MAX_PATH]; + RtlZeroMemory(&szApplicationName, sizeof(szApplicationName)); + if (!RegReadUserSetting(KEY_DESKTOP, VAL_SCRNSV, REG_SZ, &szApplicationName, sizeof(szApplicationName))) + { + return 0; + } + if (wcslen(szApplicationName) == 0) return 0; + return SpiLoadInt(KEY_DESKTOP, VAL_SCRTO, 0); +} + static INT SpiLoadMouse(PCWSTR pwszValue, INT iValue) @@ -280,7 +295,7 @@ SpiUpdatePerUserSystemParameters() gspv.bDropShadow = 1; gspv.dwMenuShowDelay = 100; - gspv.iScrSaverTimeout = 10; + gspv.iScrSaverTimeout = SpiLoadTimeOut(); gspv.bScrSaverActive = FALSE; gspv.bScrSaverRunning = FALSE; #if(WINVER >= 0x0600) diff --git a/subsystems/win32/win32k/ntuser/vis.c b/subsystems/win32/win32k/ntuser/vis.c index 78939bd4025..71ebbf94033 100644 --- a/subsystems/win32/win32k/ntuser/vis.c +++ b/subsystems/win32/win32k/ntuser/vis.c @@ -156,12 +156,12 @@ co_VIS_WindowLayoutChanged( ASSERT_REFS_CO(Wnd); - Temp = IntSysCreateRectRgn(0, 0, 0, 0); - NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY); - Parent = Wnd->spwndParent; if(Parent) { + Temp = IntSysCreateRectRgn(0, 0, 0, 0); + + NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY); NtGdiOffsetRgn(Temp, Wnd->rcWindow.left - Parent->rcClient.left, Wnd->rcWindow.top - Parent->rcClient.top); @@ -171,8 +171,9 @@ co_VIS_WindowLayoutChanged( RDW_FRAME | RDW_ERASE | RDW_INVALIDATE | RDW_ALLCHILDREN); UserDerefObjectCo(Parent); + + GreDeleteObject(Temp); } - GreDeleteObject(Temp); } /* EOF */ diff --git a/subsystems/win32/win32k/ntuser/windc.c b/subsystems/win32/win32k/ntuser/windc.c index 5265ba24624..a225e52fe3e 100644 --- a/subsystems/win32/win32k/ntuser/windc.c +++ b/subsystems/win32/win32k/ntuser/windc.c @@ -730,7 +730,7 @@ DceFreeWindowDCE(PWND Window) else { DPRINT1("Not POWNED or CLASSDC hwndCurrent -> %x \n", pDCE->hwndCurrent); - //ASSERT(FALSE); + // ASSERT(FALSE); /* bug 5320 */ } } else diff --git a/subsystems/win32/win32k/ntuser/winpos.c b/subsystems/win32/win32k/ntuser/winpos.c index 3e397d84827..eff6d368886 100644 --- a/subsystems/win32/win32k/ntuser/winpos.c +++ b/subsystems/win32/win32k/ntuser/winpos.c @@ -982,7 +982,6 @@ co_WinPosSetWindowPos( int RgnType; HDC Dc; RECTL CopyRect; - RECTL TempRect; PWND Ancestor; ASSERT_REFS_CO(Window); @@ -1008,13 +1007,6 @@ co_WinPosSetWindowPos( co_WinPosDoWinPosChanging(Window, &WinPos, &NewWindowRect, &NewClientRect); - /* Fix up the flags. */ - if (!WinPosFixupFlags(&WinPos, Window)) - { - EngSetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - /* Does the window still exist? */ if (!IntIsWindow(WinPos.hwnd)) { @@ -1022,6 +1014,13 @@ co_WinPosSetWindowPos( return FALSE; } + /* Fix up the flags. */ + if (!WinPosFixupFlags(&WinPos, Window)) + { + EngSetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + Ancestor = UserGetAncestor(Window, GA_PARENT); if ( (WinPos.flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) != SWP_NOZORDER && @@ -1033,17 +1032,18 @@ co_WinPosSetWindowPos( if (!(WinPos.flags & SWP_NOREDRAW)) { /* Compute the visible region before the window position is changed */ - if (!(WinPos.flags & (SWP_NOREDRAW | SWP_SHOWWINDOW)) && + if (!(WinPos.flags & SWP_SHOWWINDOW) && (WinPos.flags & (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_HIDEWINDOW | SWP_FRAMECHANGED)) != (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER)) { - VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE); + VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, + (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); VisRgn = NULL; if ( VisBefore != NULL && (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBefore, NULL)) && - REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION ) + REGION_Complexity(VisRgn) == NULLREGION ) { RGNOBJAPI_Unlock(VisRgn); GreDeleteObject(VisBefore); @@ -1084,8 +1084,8 @@ co_WinPosSetWindowPos( /* FIXME: Actually do something with WVR_VALIDRECTS */ - if ( NewClientRect.left != OldClientRect.left || - NewClientRect.top != OldClientRect.top) + if (NewClientRect.left != OldClientRect.left || + NewClientRect.top != OldClientRect.top) { WinPosInternalMoveWindow(Window, NewClientRect.left - OldClientRect.left, @@ -1095,7 +1095,7 @@ co_WinPosSetWindowPos( Window->rcWindow = NewWindowRect; Window->rcClient = NewClientRect; - if (!(WinPos.flags & SWP_SHOWWINDOW) && (WinPos.flags & SWP_HIDEWINDOW)) + if (WinPos.flags & SWP_HIDEWINDOW) { /* Clear the update region */ co_UserRedrawWindow( Window, @@ -1103,20 +1103,16 @@ co_WinPosSetWindowPos( 0, RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN); - if ((Window->style & WS_VISIBLE) && - Window->spwndParent == UserGetDesktopWindow()) - { + if (Window->spwndParent == UserGetDesktopWindow()) co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (LPARAM)Window->head.h); - } + Window->style &= ~WS_VISIBLE; } else if (WinPos.flags & SWP_SHOWWINDOW) { - if (!(Window->style & WS_VISIBLE) && - Window->spwndParent == UserGetDesktopWindow() ) - { + if (Window->spwndParent == UserGetDesktopWindow()) co_IntShellHookNotify(HSHELL_WINDOWCREATED, (LPARAM)Window->head.h); - } + Window->style |= WS_VISIBLE; } @@ -1132,12 +1128,13 @@ co_WinPosSetWindowPos( if (!(WinPos.flags & SWP_NOREDRAW)) { /* Determine the new visible region */ - VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE); + VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, + (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE); VisRgn = NULL; if ( VisAfter != NULL && (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisAfter, NULL)) && - REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION ) + REGION_Complexity(VisRgn) == NULLREGION ) { RGNOBJAPI_Unlock(VisRgn); GreDeleteObject(VisAfter); @@ -1311,15 +1308,13 @@ co_WinPosSetWindowPos( if (VisBefore != NULL) { ExposedRgn = IntSysCreateRectRgn(0, 0, 0, 0); - NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY); + RgnType = NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY); NtGdiOffsetRgn( ExposedRgn, OldWindowRect.left - NewWindowRect.left, OldWindowRect.top - NewWindowRect.top); if (VisAfter != NULL) RgnType = NtGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF); - else - RgnType = SIMPLEREGION; if (RgnType != ERROR && RgnType != NULLREGION) { @@ -1367,6 +1362,17 @@ co_WinPosSetWindowPos( IntNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, pWnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI); } + if(IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y)) + { + /* Generate mouse move message */ + MSG msg; + msg.message = WM_MOUSEMOVE; + msg.wParam = IntGetSysCursorInfo()->ButtonsDown; + msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y); + msg.pt = gpsi->ptCursor; + co_MsqInsertMouseMessage(&msg, 0, 0, TRUE); + } + return TRUE; } @@ -1624,6 +1630,7 @@ co_WinPosSearchChildren( if(pwndChild != NULL) { /* We found a window. Don't send any more WM_NCHITTEST messages */ + ExFreePool(List); UserDereferenceObject(ScopeWin); return pwndChild; } @@ -1793,6 +1800,7 @@ BOOL FASTCALL IntEndDeferWindowPosEx( HDWP hdwp ) winpos->pos.flags); } ExFreePoolWithTag(pDWP->acvr, USERTAG_SWP); + UserDereferenceObject(pDWP); UserDeleteObject(hdwp, otSMWP); return res; } diff --git a/subsystems/win32/win32k/objects/bitmaps.c b/subsystems/win32/win32k/objects/bitmaps.c index 28dc28afb9a..1768f6cfb8c 100644 --- a/subsystems/win32/win32k/objects/bitmaps.c +++ b/subsystems/win32/win32k/objects/bitmaps.c @@ -80,7 +80,6 @@ GreCreateBitmapEx( IN FLONG flags) { PSURFACE psurf; - SURFOBJ *pso; HBITMAP hbmp; /* Verify format */ @@ -94,9 +93,8 @@ GreCreateBitmapEx( return NULL; } - /* Get the handle for the bitmap and the surfobj */ + /* Get the handle for the bitmap */ hbmp = (HBITMAP)psurf->SurfObj.hsurf; - pso = &psurf->SurfObj; /* The infamous RLE hack */ if (iFormat == BMF_4RLE || iFormat == BMF_8RLE) @@ -144,6 +142,7 @@ GreCreateBitmapEx( /* Creates a DDB surface, * as in CreateCompatibleBitmap or CreateBitmap. + * Note that each scanline must be 32bit aligned! */ HBITMAP APIENTRY @@ -162,7 +161,7 @@ GreCreateBitmap( 0, /* no bitmap flags */ 0, /* auto size */ pvBits, - DDB_SURFACE /* DDB */); + DDB_SURFACE /* DDB */); } HBITMAP diff --git a/subsystems/win32/win32k/objects/brush.c b/subsystems/win32/win32k/objects/brush.c index f72d7d1ddf7..f9658e56d05 100644 --- a/subsystems/win32/win32k/objects/brush.c +++ b/subsystems/win32/win32k/objects/brush.c @@ -61,6 +61,19 @@ IntGdiSetBrushOwner(PBRUSH pbr, ULONG ulOwner) return TRUE; } +BOOL +FASTCALL +GreSetBrushOwner(HBRUSH hBrush, ULONG ulOwner) +{ + BOOL Ret; + PBRUSH pbrush; + + pbrush = BRUSH_ShareLockBrush(hBrush); + Ret = IntGdiSetBrushOwner(pbrush, ulOwner); + BRUSH_ShareUnlockBrush(pbrush); + return Ret; +} + BOOL NTAPI BRUSH_bAllocBrushAttr(PBRUSH pbr) diff --git a/subsystems/win32/win32k/objects/dibobj.c b/subsystems/win32/win32k/objects/dibobj.c index fdc8f92b416..71d9c611a5c 100644 --- a/subsystems/win32/win32k/objects/dibobj.c +++ b/subsystems/win32/win32k/objects/dibobj.c @@ -321,71 +321,6 @@ cleanup: return result; } -// FIXME by Removing NtGdiSetDIBits!!! -// This is a victim of the Win32k Initialization BUG!!!!! -// Converts a DIB to a device-dependent bitmap -INT -APIENTRY -NtGdiSetDIBits( - HDC hDC, - HBITMAP hBitmap, - UINT StartScan, - UINT ScanLines, - CONST VOID *Bits, - CONST BITMAPINFO *bmi, - UINT ColorUse) -{ - PDC Dc = NULL; - INT Ret; - NTSTATUS Status = STATUS_SUCCESS; - - if (!Bits) return 0; - - _SEH2_TRY - { - ProbeForRead(&bmi->bmiHeader.biSize, sizeof(DWORD), 1); - ProbeForRead(bmi, bmi->bmiHeader.biSize, 1); - ProbeForRead(bmi, DIB_BitmapInfoSize(bmi, ColorUse), 1); - ProbeForRead(Bits, - DIB_GetDIBImageBytes(bmi->bmiHeader.biWidth, - ScanLines, - bmi->bmiHeader.biBitCount), - 1); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END - - if (!NT_SUCCESS(Status)) - { - return 0; - } - - /* Lock DC if asked to */ - if(ColorUse == DIB_PAL_COLORS) - { - Dc = DC_LockDc(hDC); - if (NULL == Dc) - { - EngSetLastError(ERROR_INVALID_HANDLE); - return 0; - } - if (Dc->dctype == DC_TYPE_INFO) - { - DC_UnlockDc(Dc); - return 0; - } - } - - Ret = IntSetDIBits(Dc, hBitmap, StartScan, ScanLines, Bits, bmi, ColorUse); - - if(Dc) DC_UnlockDc(Dc); - - return Ret; -} - W32KAPI INT APIENTRY diff --git a/subsystems/win32/win32k/objects/freetype.c b/subsystems/win32/win32k/objects/freetype.c index 994d513f32f..1c3a9259582 100644 --- a/subsystems/win32/win32k/objects/freetype.c +++ b/subsystems/win32/win32k/objects/freetype.c @@ -1569,8 +1569,8 @@ ftGdiGetGlyphOutline( // FT_Set_Pixel_Sizes(ft_face, // TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, /* FIXME should set character height if neg */ -// (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : -// TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); +// (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? +// dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))); TEXTOBJ_UnlockText(TextObj); @@ -2165,9 +2165,8 @@ TextIntGetTextExtentPoint(PDC dc, error = FT_Set_Pixel_Sizes(face, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, /* FIXME should set character height if neg */ - (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); + (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? + dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))); if (error) { DPRINT1("Error in setting pixel sizes: %u\n", error); @@ -2228,7 +2227,8 @@ TextIntGetTextExtentPoint(PDC dc, IntUnLockFreeType; Size->cx = (TotalWidth + 32) >> 6; - Size->cy = (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight); + Size->cy = (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? + dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); Size->cy = EngMulDiv(Size->cy, dc->ppdev->gdiinfo.ulLogPixelsY, 72); return TRUE; @@ -2452,9 +2452,8 @@ ftGdiGetTextMetricsW( Error = FT_Set_Pixel_Sizes(Face, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, /* FIXME should set character height if neg */ - (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); + (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? + dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))); IntUnLockFreeType; if (0 != Error) { @@ -3304,9 +3303,8 @@ GreExtTextOutW( face, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, /* FIXME should set character height if neg */ - (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); + (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? + dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))); if (error) { DPRINT1("Error in setting pixel sizes: %u\n", error); @@ -3396,13 +3394,13 @@ GreExtTextOutW( previous = 0; - if (pdcattr->lTextAlign & TA_RIGHT) + if ((pdcattr->lTextAlign & TA_CENTER) == TA_CENTER) { - RealXStart -= TextWidth; + RealXStart -= TextWidth / 2; } else { - RealXStart -= TextWidth / 2; + RealXStart -= TextWidth; } } @@ -3843,8 +3841,8 @@ NtGdiGetCharABCWidthsW( FT_Set_Pixel_Sizes(face, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, /* FIXME should set character height if neg */ - (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); + (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? + dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))); for (i = FirstChar; i < FirstChar+Count; i++) { @@ -4010,9 +4008,8 @@ NtGdiGetCharWidthW( FT_Set_Pixel_Sizes(face, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, /* FIXME should set character height if neg */ - (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); + (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? + dc->ppdev->devinfo.lfDefaultFont.lfHeight : abs(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))); for (i = FirstChar; i < FirstChar+Count; i++) { diff --git a/subsystems/win32/win32k/objects/gdipool.c b/subsystems/win32/win32k/objects/gdipool.c index c78c789e215..2c9862b365d 100644 --- a/subsystems/win32/win32k/objects/gdipool.c +++ b/subsystems/win32/win32k/objects/gdipool.c @@ -139,6 +139,13 @@ GdiPoolAllocate( /* Get a free section */ ple = pPool->leReadyList.Flink; pSection = CONTAINING_RECORD(ple, GDI_POOL_SECTION, leReadyLink); + if (pSection->cAllocCount >= pPool->cSlotsPerSection) + { + DPRINT1("pSection->cAllocCount=%ld, pPool->cSlotsPerSection=%ld\n", + pSection->cAllocCount, pPool->cSlotsPerSection); + DBG_DUMP_EVENT_LIST(&pPool->slhLog); + ASSERT(FALSE); + } ASSERT(pSection->cAllocCount < pPool->cSlotsPerSection); } else diff --git a/subsystems/win32/win32k/w32ksvc.db b/subsystems/win32/win32k/w32ksvc.db index 0ff90f786d8..e797b044a97 100644 --- a/subsystems/win32/win32k/w32ksvc.db +++ b/subsystems/win32/win32k/w32ksvc.db @@ -675,7 +675,6 @@ NtGdiDrawStream 3 # # #ReactOS specific syscalls -NtGdiSetDIBits 7 NtGdiSetViewportOrgEx 4 NtGdiSetWindowOrgEx 4 NtGdiGetFontFamilyInfo 4 @@ -684,7 +683,6 @@ NtGdiOffsetWindowOrgEx 4 # NtUserBuildMenuItemList 4 NtUserGetMenuDefaultItem 3 -NtUserGetLastInputInfo 1 NtUserGetMinMaxInfo 3 NtUserGetMonitorInfo 2 NtUserMenuInfo 3 diff --git a/subsystems/win32/win32k/w32ksvc.h b/subsystems/win32/win32k/w32ksvc.h index 27b727cb5d9..1bd678d0570 100644 --- a/subsystems/win32/win32k/w32ksvc.h +++ b/subsystems/win32/win32k/w32ksvc.h @@ -675,7 +675,6 @@ SVC_(GdiDrawStream, 3) // ReactOS, specific, syscalls) -SVC_(GdiSetDIBits, 7) SVC_(GdiSetViewportOrgEx, 4) SVC_(GdiSetWindowOrgEx, 4) SVC_(GdiGetFontFamilyInfo, 4) @@ -684,7 +683,6 @@ SVC_(GdiOffsetWindowOrgEx, 4) SVC_(UserBuildMenuItemList, 4) SVC_(UserGetMenuDefaultItem, 3) -SVC_(UserGetLastInputInfo, 1) SVC_(UserGetMinMaxInfo, 3) SVC_(UserGetMonitorInfo, 2) SVC_(UserMenuInfo, 3) diff --git a/toolchain-mingw32.cmake b/toolchain-gcc.cmake similarity index 67% rename from toolchain-mingw32.cmake rename to toolchain-gcc.cmake index 4a0ca3324c4..d760592e1ab 100644 --- a/toolchain-mingw32.cmake +++ b/toolchain-gcc.cmake @@ -24,16 +24,15 @@ else() set(CCACHE "" CACHE STRING "ccache") endif() -# the name of the target operating system +# The name of the target operating system set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_PROCESSOR i686) -# which compilers to use for C and C++ +# Which compilers to use for C and C++ set(CMAKE_C_COMPILER ${CCACHE} ${MINGW_PREFIX}gcc) set(CMAKE_CXX_COMPILER ${CCACHE} ${MINGW_PREFIX}g++) set(CMAKE_RC_COMPILER ${MINGW_PREFIX}windres) set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc) -set(CMAKE_ASM_COMPILE_OBJECT " -x assembler-with-cpp -o -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm -D__ASM__ -c ") if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows) set(CMAKE_AR ${MINGW_PREFIX}ar) @@ -42,15 +41,10 @@ if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows) set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY}) endif() -# Use stdcall fixups, and don't link with anything by default unless we say so +# Don't link with anything by default unless we say so set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries") #MARK_AS_ADVANCED(CLEAR CMAKE_CXX_STANDARD_LIBRARIES) set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "Standard C++ Libraries") -if(ARCH MATCHES i386) - set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--disable-auto-import") -#-Wl,-T,${REACTOS_SOURCE_DIR}/global.lds -elseif(ARCH MATCHES amd64) - set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--disable-auto-import") -endif() +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--disable-auto-import") diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 00000000000..7110733642e --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,21 @@ + +#add_executable(pefixup pefixup.c) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() + +add_subdirectory(cabman) +add_subdirectory(cdmake) +add_subdirectory(gendib) +add_subdirectory(geninc) +add_subdirectory(mkhive) +add_subdirectory(obj2bin) +add_subdirectory(spec2def) +add_subdirectory(unicode) + +if(NOT MSVC) +add_subdirectory(widl) +add_subdirectory(wpp) +add_subdirectory(wrc) +endif() diff --git a/tools/cabman/cabinet.cxx b/tools/cabman/cabinet.cxx new file mode 100644 index 00000000000..7cc8bd5dd5b --- /dev/null +++ b/tools/cabman/cabinet.cxx @@ -0,0 +1,3752 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS cabinet manager + * FILE: tools/cabman/cabinet.cpp + * PURPOSE: Cabinet routines + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) + * Colin Finck + * NOTES: Define CAB_READ_ONLY for read only version + * REVISIONS: + * CSH 21/03-2001 Created + * CSH 15/08-2003 Made it portable + * CF 04/05-2007 Made it compatible with 64-bit operating systems + * TODO: + * - Checksum of datablocks should be calculated + * - EXTRACT.EXE complains if a disk is created manually + * - Folders that are created manually and span disks will result in a damaged cabinet + */ +#include +#include +#include +#if !defined(_WIN32) +# include +# include +# include +#endif +#include "cabinet.h" +#include "raw.h" +#include "mszip.h" + +#if defined(_WIN32) +#define GetSizeOfFile(handle) _GetSizeOfFile(handle) +static LONG _GetSizeOfFile(FILEHANDLE handle) +{ + ULONG size = GetFileSize(handle, NULL); + if (size == INVALID_FILE_SIZE) + return -1; + + return size; +} +#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread) +static bool _ReadFileData(FILEHANDLE handle, void* buffer, ULONG size, PULONG bytesread) +{ + return ReadFile(handle, buffer, size, (LPDWORD)bytesread, NULL) != 0; +} +#else +#define GetSizeOfFile(handle) _GetSizeOfFile(handle) +static LONG _GetSizeOfFile(FILEHANDLE handle) +{ + LONG size; + fseek(handle, 0, SEEK_END); + size = ftell(handle); + fseek(handle, 0, SEEK_SET); + return size; +} +#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread) +static bool _ReadFileData(FILEHANDLE handle, void* buffer, ULONG size, PULONG bytesread) +{ + *bytesread = fread(buffer, 1, size, handle); + return *bytesread == size; +} +#endif + +#ifndef CAB_READ_ONLY + +#if 0 +#if DBG + +void DumpBuffer(void* Buffer, ULONG Size) +{ + FILEHANDLE FileHandle; + ULONG BytesWritten; + + /* Create file, overwrite if it already exists */ + FileHandle = CreateFile("dump.bin", // Create this file + GENERIC_WRITE, // Open for writing + 0, // No sharing + NULL, // No security + CREATE_ALWAYS, // Create or overwrite + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (FileHandle == INVALID_HANDLE_VALUE) + { + DPRINT(MID_TRACE, ("ERROR OPENING '%u'.\n", (UINT)GetLastError())); + return; + } + + if (!WriteFile(FileHandle, Buffer, Size, &BytesWritten, NULL)) + { + DPRINT(MID_TRACE, ("ERROR WRITING '%u'.\n", (UINT)GetLastError())); + } + + CloseFile(FileHandle); +} + +#endif /* DBG */ +#endif + +/* CCFDATAStorage */ + +CCFDATAStorage::CCFDATAStorage() +/* + * FUNCTION: Default constructor + */ +{ + FileCreated = false; +} + + +CCFDATAStorage::~CCFDATAStorage() +/* + * FUNCTION: Default destructor + */ +{ + ASSERT(!FileCreated); +} + + +ULONG CCFDATAStorage::Create(const char* FileName) +/* + * FUNCTION: Creates the file + * ARGUMENTS: + * FileName = Pointer to name of file + * RETURNS: + * Status of operation + */ +{ + ASSERT(!FileCreated); + +#if defined(_WIN32) + if (GetTempPath(MAX_PATH, FullName) == 0) + return CAB_STATUS_CANNOT_CREATE; + + strcat(FullName, FileName); + + /* Create file, overwrite if it already exists */ + FileHandle = CreateFile(FullName, // Create this file + GENERIC_READ | GENERIC_WRITE, // Open for reading/writing + 0, // No sharing + NULL, // No security + CREATE_ALWAYS, // Create or overwrite + FILE_FLAG_SEQUENTIAL_SCAN | // Optimize for sequential scans + FILE_FLAG_DELETE_ON_CLOSE | // Delete file when closed + FILE_ATTRIBUTE_TEMPORARY, // Temporary file + NULL); // No attribute template + if (FileHandle == INVALID_HANDLE_VALUE) + { + DPRINT(MID_TRACE, ("ERROR '%u'.\n", (UINT)GetLastError())); + return CAB_STATUS_CANNOT_CREATE; + } +#else /* !_WIN32 */ + /*if (tmpnam(FullName) == NULL)*/ + if ((FileHandle = tmpfile()) == NULL) + return CAB_STATUS_CANNOT_CREATE; + /* + FileHandle = fopen(FullName, "w+b"); + if (FileHandle == NULL) { + DPRINT(MID_TRACE, ("ERROR '%i'.\n", errno)); + return CAB_STATUS_CANNOT_CREATE; + } + */ +#endif + + FileCreated = true; + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCFDATAStorage::Destroy() +/* + * FUNCTION: Destroys the file + * RETURNS: + * Status of operation + */ +{ + ASSERT(FileCreated); + + CloseFile(FileHandle); + + FileCreated = false; + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCFDATAStorage::Truncate() +/* + * FUNCTION: Truncate the scratch file to zero bytes + * RETURNS: + * Status of operation + */ +{ +#if defined(_WIN32) + if( SetFilePointer(FileHandle, 0, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER ) + return CAB_STATUS_FAILURE; + if (!SetEndOfFile(FileHandle)) + return CAB_STATUS_FAILURE; +#else /* !_WIN32 */ + fclose(FileHandle); + FileHandle = tmpfile(); + if (FileHandle == NULL) + { + DPRINT(MID_TRACE, ("ERROR '%i'.\n", errno)); + return CAB_STATUS_FAILURE; + } +#endif + return CAB_STATUS_SUCCESS; +} + + +ULONG CCFDATAStorage::Position() +/* + * FUNCTION: Returns current position in file + * RETURNS: + * Current position + */ +{ +#if defined(_WIN32) + return SetFilePointer(FileHandle, 0, NULL, FILE_CURRENT); +#else + return (ULONG)ftell(FileHandle); +#endif +} + + +ULONG CCFDATAStorage::Seek(LONG Position) +/* + * FUNCTION: Seeks to an absolute position + * ARGUMENTS: + * Position = Absolute position to seek to + * RETURNS: + * Status of operation + */ +{ +#if defined(_WIN32) + if( SetFilePointer(FileHandle, + Position, + NULL, + FILE_BEGIN) == INVALID_SET_FILE_POINTER ) + return CAB_STATUS_FAILURE; + else + return CAB_STATUS_SUCCESS; +#else + if (fseek(FileHandle, (off_t)Position, SEEK_SET) != 0) + return CAB_STATUS_FAILURE; + else + return CAB_STATUS_SUCCESS; +#endif +} + + +ULONG CCFDATAStorage::ReadBlock(PCFDATA Data, void* Buffer, PULONG BytesRead) +/* + * FUNCTION: Reads a CFDATA block from the file + * ARGUMENTS: + * Data = Pointer to CFDATA block for the buffer + * Buffer = Pointer to buffer to store data read + * BytesWritten = Pointer to buffer to write number of bytes read + * RETURNS: + * Status of operation + */ +{ +#if defined(_WIN32) + if (!ReadFile(FileHandle, Buffer, Data->CompSize, (LPDWORD)BytesRead, NULL)) + return CAB_STATUS_CANNOT_READ; +#else + + *BytesRead = fread(Buffer, 1, Data->CompSize, FileHandle); + if (*BytesRead != Data->CompSize) + return CAB_STATUS_CANNOT_READ; +#endif + return CAB_STATUS_SUCCESS; +} + + +ULONG CCFDATAStorage::WriteBlock(PCFDATA Data, void* Buffer, PULONG BytesWritten) +/* + * FUNCTION: Writes a CFDATA block to the file + * ARGUMENTS: + * Data = Pointer to CFDATA block for the buffer + * Buffer = Pointer to buffer with data to write + * BytesWritten = Pointer to buffer to write number of bytes written + * RETURNS: + * Status of operation + */ +{ +#if defined(_WIN32) + if (!WriteFile(FileHandle, Buffer, Data->CompSize, (LPDWORD)BytesWritten, NULL)) + return CAB_STATUS_CANNOT_WRITE; +#else + *BytesWritten = fwrite(Buffer, 1, Data->CompSize, FileHandle); + if (*BytesWritten != Data->CompSize) + return CAB_STATUS_CANNOT_WRITE; +#endif + return CAB_STATUS_SUCCESS; +} + +#endif /* CAB_READ_ONLY */ + + +/* CCabinet */ + +CCabinet::CCabinet() +/* + * FUNCTION: Default constructor + */ +{ + *CabinetName = '\0'; + *CabinetPrev = '\0'; + *DiskPrev = '\0'; + *CabinetNext = '\0'; + *DiskNext = '\0'; + *DestPath = '\0'; + *CabinetReservedFile = '\0'; + + FileOpen = false; + CabinetReservedFileBuffer = NULL; + CabinetReservedFileSize = 0; + + FolderListHead = NULL; + FolderListTail = NULL; + FileListHead = NULL; + FileListTail = NULL; + CriteriaListHead = NULL; + CriteriaListTail = NULL; + + Codec = NULL; + CodecId = -1; + CodecSelected = false; + + OutputBuffer = NULL; + InputBuffer = NULL; + MaxDiskSize = 0; + BlockIsSplit = false; + ScratchFile = NULL; + + FolderUncompSize = 0; + BytesLeftInBlock = 0; + ReuseBlock = false; + CurrentDataNode = NULL; +} + + +CCabinet::~CCabinet() +/* + * FUNCTION: Default destructor + */ +{ + if (CabinetReservedFileBuffer != NULL) + { + FreeMemory(CabinetReservedFileBuffer); + CabinetReservedFileBuffer = NULL; + CabinetReservedFileSize = 0; + } + + if (CodecSelected) + delete Codec; +} + +bool CCabinet::IsSeparator(char Char) +/* + * FUNCTION: Determines if a character is a separator + * ARGUMENTS: + * Char = Character to check + * RETURNS: + * Whether it is a separator + */ +{ + if ((Char == '\\') || (Char == '/')) + return true; + else + return false; +} + +char* CCabinet::ConvertPath(char* Path, bool Allocate) +/* + * FUNCTION: Replaces \ or / with the one used by the host environment + * ARGUMENTS: + * Path = Pointer to string with pathname + * Allocate = Specifies whether to allocate memory for the new + * string or to change the existing buffer + * RETURNS: + * Pointer to new path + */ +{ + char *newpath; + int i; + + if (Allocate) + newpath = strdup(Path); + else + newpath = Path; + + i = 0; + while (Path[i] != 0) + { +#if defined(_WIN32) + if (Path[i] == '/') + newpath[i] = '\\'; + else +#else + if (Path[i] == '\\') + newpath[i] = '/'; + else +#endif + newpath[i] = Path[i]; + + i++; + } + newpath[i] = 0; + + return(newpath); +} + + +char* CCabinet::GetFileName(char* Path) +/* + * FUNCTION: Returns a pointer to file name + * ARGUMENTS: + * Path = Pointer to string with pathname + * RETURNS: + * Pointer to filename + */ +{ + ULONG i, j; + + j = i = (Path[0] ? (Path[1] == ':' ? 2 : 0) : 0); + + while (Path [i++]) + if (IsSeparator(Path [i - 1])) + j = i; + + return Path + j; +} + + +void CCabinet::RemoveFileName(char* Path) +/* + * FUNCTION: Removes a file name from a path + * ARGUMENTS: + * Path = Pointer to string with path + */ +{ + char* FileName; + ULONG i; + + i = (Path [0] ? (Path[1] == ':' ? 2 : 0) : 0); + FileName = GetFileName(Path + i); + + if ((FileName != (Path + i)) && (IsSeparator(FileName [-1]))) + FileName--; + if ((FileName == (Path + i)) && (IsSeparator(FileName [0]))) + FileName++; + FileName[0] = 0; +} + + +bool CCabinet::NormalizePath(char* Path, + ULONG Length) +/* + * FUNCTION: Normalizes a path + * ARGUMENTS: + * Path = Pointer to string with pathname + * Length = Number of bytes in Path + * RETURNS: + * true if there was enough room in Path, or false + */ +{ + ULONG n; + bool OK = true; + + if ((n = (ULONG)strlen(Path)) && + (!IsSeparator(Path[n - 1])) && + (OK = ((n + 1) < Length))) + { + Path[n] = DIR_SEPARATOR_CHAR; + Path[n + 1] = 0; + } + return OK; +} + + +char* CCabinet::GetCabinetName() +/* + * FUNCTION: Returns pointer to cabinet file name + * RETURNS: + * Pointer to string with name of cabinet + */ +{ + return CabinetName; +} + + +void CCabinet::SetCabinetName(char* FileName) +/* + * FUNCTION: Sets cabinet file name + * ARGUMENTS: + * FileName = Pointer to string with name of cabinet + */ +{ + strcpy(CabinetName, FileName); +} + + +void CCabinet::SetDestinationPath(char* DestinationPath) +/* + * FUNCTION: Sets destination path + * ARGUMENTS: + * DestinationPath = Pointer to string with name of destination path + */ +{ + strcpy(DestPath, DestinationPath); + ConvertPath(DestPath, false); + if (strlen(DestPath) > 0) + NormalizePath(DestPath, MAX_PATH); +} + +ULONG CCabinet::AddSearchCriteria(char* SearchCriteria) +/* + * FUNCTION: Adds a criteria to the search criteria list + * ARGUMENTS: + * SearchCriteria = String with the search criteria to add + * RETURNS: + * Status of operation + */ +{ + PSEARCH_CRITERIA Criteria; + + // Add the criteria to the list of search criteria + Criteria = (PSEARCH_CRITERIA)AllocateMemory(sizeof(SEARCH_CRITERIA)); + if(!Criteria) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + Criteria->Prev = CriteriaListTail; + Criteria->Next = NULL; + + if(CriteriaListTail) + CriteriaListTail->Next = Criteria; + else + CriteriaListHead = Criteria; + + CriteriaListTail = Criteria; + + // Set the actual criteria string + Criteria->Search = (char*)AllocateMemory(strlen(SearchCriteria) + 1); + if (!Criteria->Search) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + strcpy(Criteria->Search, SearchCriteria); + + return CAB_STATUS_SUCCESS; +} + +void CCabinet::DestroySearchCriteria() +/* + * FUNCTION: Destroys the list with the search criteria + */ +{ + PSEARCH_CRITERIA Criteria; + PSEARCH_CRITERIA NextCriteria; + + Criteria = CriteriaListHead; + + while(Criteria) + { + NextCriteria = Criteria->Next; + + FreeMemory(Criteria->Search); + FreeMemory(Criteria); + + Criteria = NextCriteria; + } + + CriteriaListHead = NULL; + CriteriaListTail = NULL; +} + +bool CCabinet::HasSearchCriteria() +/* + * FUNCTION: Returns whether we have search criteria + * RETURNS: + * Whether we have search criteria or not. + */ +{ + return (CriteriaListHead != NULL); +} + +bool CCabinet::SetCompressionCodec(char* CodecName) +/* + * FUNCTION: Selects the codec to use for compression + * ARGUMENTS: + * CodecName = Pointer to a string with the name of the codec + */ +{ + if( !strcasecmp(CodecName, "raw") ) + SelectCodec(CAB_CODEC_RAW); + else if( !strcasecmp(CodecName, "mszip") ) + SelectCodec(CAB_CODEC_MSZIP); + else + { + printf("Invalid codec specified!\n"); + return false; + } + + return true; +} + +char* CCabinet::GetDestinationPath() +/* + * FUNCTION: Returns destination path + * RETURNS: + * Pointer to string with name of destination path + */ +{ + return DestPath; +} + + +bool CCabinet::SetCabinetReservedFile(char* FileName) +/* + * FUNCTION: Sets cabinet reserved file + * ARGUMENTS: + * FileName = Pointer to string with name of cabinet reserved file + */ +{ + FILEHANDLE FileHandle; + ULONG BytesRead; + +#if defined(_WIN32) + FileHandle = CreateFile(ConvertPath(FileName, true), // Open this file + GENERIC_READ, // Open for reading + FILE_SHARE_READ, // Share for reading + NULL, // No security + OPEN_EXISTING, // Existing file only + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (FileHandle == INVALID_HANDLE_VALUE) + { + DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n")); + return false; + } +#else /* !_WIN32 */ + FileHandle = fopen(ConvertPath(FileName, true), "rb"); + if (FileHandle == NULL) + { + DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n")); + return false; + } +#endif + + CabinetReservedFileSize = GetSizeOfFile(FileHandle); + if (CabinetReservedFileSize == (ULONG)-1) + { + DPRINT(MIN_TRACE, ("Cannot read from cabinet reserved file.\n")); + return false; + } + + if (CabinetReservedFileSize == 0) + { + CloseFile(FileHandle); + return false; + } + + CabinetReservedFileBuffer = AllocateMemory(CabinetReservedFileSize); + if (!CabinetReservedFileBuffer) + { + CloseFile(FileHandle); + return false; + } + + if (!ReadFileData(FileHandle, CabinetReservedFileBuffer, CabinetReservedFileSize, &BytesRead)) + { + CloseFile(FileHandle); + return false; + } + + CloseFile(FileHandle); + + strcpy(CabinetReservedFile, FileName); + + return true; +} + + +char* CCabinet::GetCabinetReservedFile() +/* + * FUNCTION: Returns cabionet reserved file + * RETURNS: + * Pointer to string with name of cabinet reserved file + */ +{ + return CabinetReservedFile; +} + + +ULONG CCabinet::GetCurrentDiskNumber() +/* + * FUNCTION: Returns current disk number + * RETURNS: + * Current disk number + */ +{ + return CurrentDiskNumber; +} + + +ULONG CCabinet::Open() +/* + * FUNCTION: Opens a cabinet file + * RETURNS: + * Status of operation + */ +{ + PCFFOLDER_NODE FolderNode; + ULONG Status; + ULONG Index; + + if (!FileOpen) + { + ULONG BytesRead; + ULONG Size; + + OutputBuffer = AllocateMemory(CAB_BLOCKSIZE + 12); // This should be enough + if (!OutputBuffer) + return CAB_STATUS_NOMEMORY; + +#if defined(_WIN32) + FileHandle = CreateFile(CabinetName, // Open this file + GENERIC_READ, // Open for reading + FILE_SHARE_READ, // Share for reading + NULL, // No security + OPEN_EXISTING, // Existing file only + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + + if (FileHandle == INVALID_HANDLE_VALUE) + { + DPRINT(MID_TRACE, ("Cannot open file.\n")); + return CAB_STATUS_CANNOT_OPEN; + } +#else /* !_WIN32 */ + FileHandle = fopen(CabinetName, "rb"); + if (FileHandle == NULL) + { + DPRINT(MID_TRACE, ("Cannot open file.\n")); + return CAB_STATUS_CANNOT_OPEN; + } +#endif + + FileOpen = true; + + /* Load CAB header */ + if ((Status = ReadBlock(&CABHeader, sizeof(CFHEADER), &BytesRead)) + != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + + /* Check header */ + if ((BytesRead != sizeof(CFHEADER)) || + (CABHeader.Signature != CAB_SIGNATURE ) || + (CABHeader.Version != CAB_VERSION ) || + (CABHeader.FolderCount == 0 ) || + (CABHeader.FileCount == 0 ) || + (CABHeader.FileTableOffset < sizeof(CFHEADER))) + { + CloseCabinet(); + DPRINT(MID_TRACE, ("File has invalid header.\n")); + return CAB_STATUS_INVALID_CAB; + } + + Size = 0; + + /* Read/skip any reserved bytes */ + if (CABHeader.Flags & CAB_FLAG_RESERVE) + { + if ((Status = ReadBlock(&Size, sizeof(ULONG), &BytesRead)) + != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + CabinetReserved = Size & 0xFFFF; + FolderReserved = (Size >> 16) & 0xFF; + DataReserved = (Size >> 24) & 0xFF; + +#if defined(_WIN32) + if (SetFilePointer(FileHandle, CabinetReserved, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER) + { + DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError())); + return CAB_STATUS_FAILURE; + } +#else + if (fseek(FileHandle, (off_t)CabinetReserved, SEEK_CUR) != 0) + { + DPRINT(MIN_TRACE, ("fseek() failed.\n")); + return CAB_STATUS_FAILURE; + } +#endif + } + + if ((CABHeader.Flags & CAB_FLAG_HASPREV) > 0) + { + /* Read name of previous cabinet */ + Status = ReadString(CabinetPrev, 256); + if (Status != CAB_STATUS_SUCCESS) + return Status; + /* Read label of previous disk */ + Status = ReadString(DiskPrev, 256); + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + else + { + strcpy(CabinetPrev, ""); + strcpy(DiskPrev, ""); + } + + if ((CABHeader.Flags & CAB_FLAG_HASNEXT) > 0) + { + /* Read name of next cabinet */ + Status = ReadString(CabinetNext, 256); + if (Status != CAB_STATUS_SUCCESS) + return Status; + /* Read label of next disk */ + Status = ReadString(DiskNext, 256); + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + else + { + strcpy(CabinetNext, ""); + strcpy(DiskNext, ""); + } + + /* Read all folders */ + for (Index = 0; Index < CABHeader.FolderCount; Index++) + { + FolderNode = NewFolderNode(); + if (!FolderNode) + { + DPRINT(MIN_TRACE, ("Insufficient resources.\n")); + return CAB_STATUS_NOMEMORY; + } + + if (Index == 0) + FolderNode->UncompOffset = FolderUncompSize; + + FolderNode->Index = Index; + + if ((Status = ReadBlock(&FolderNode->Folder, + sizeof(CFFOLDER), &BytesRead)) != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + } + + /* Read file entries */ + Status = ReadFileTable(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("ReadFileTable() failed (%u).\n", (UINT)Status)); + return Status; + } + + /* Read data blocks for all folders */ + FolderNode = FolderListHead; + while (FolderNode != NULL) + { + Status = ReadDataBlocks(FolderNode); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("ReadDataBlocks() failed (%u).\n", (UINT)Status)); + return Status; + } + FolderNode = FolderNode->Next; + } + } + return CAB_STATUS_SUCCESS; +} + + +void CCabinet::Close() +/* + * FUNCTION: Closes the cabinet file + */ +{ + if (FileOpen) + { + CloseFile(FileHandle); + FileOpen = false; + } +} + + +ULONG CCabinet::FindFirst(PCAB_SEARCH Search) +/* + * FUNCTION: Finds the first file in the cabinet that matches a search criteria + * ARGUMENTS: + * Search = Pointer to search structure + * RETURNS: + * Status of operation + */ +{ + RestartSearch = false; + Search->Next = FileListHead; + return FindNext(Search); +} + + +ULONG CCabinet::FindNext(PCAB_SEARCH Search) +/* + * FUNCTION: Finds next file in the cabinet that matches a search criteria + * ARGUMENTS: + * Search = Pointer to search structure + * RETURNS: + * Status of operation + */ +{ + bool bFound = false; + PSEARCH_CRITERIA Criteria; + ULONG Status; + + if (RestartSearch) + { + Search->Next = FileListHead; + + /* Skip split files already extracted */ + while ((Search->Next) && + (Search->Next->File.FileControlID > CAB_FILE_MAX_FOLDER) && + (Search->Next->File.FileOffset <= LastFileOffset)) + { + DPRINT(MAX_TRACE, ("Skipping file (%s) FileOffset (0x%X) LastFileOffset (0x%X).\n", + Search->Next->FileName, (UINT)Search->Next->File.FileOffset, (UINT)LastFileOffset)); + Search->Next = Search->Next->Next; + } + + RestartSearch = false; + } + + /* Check each search criteria against each file */ + while(Search->Next) + { + // Some features (like displaying cabinets) don't require search criteria, so we can just break here. + // If a feature requires it, handle this in the ParseCmdline() function in "main.cxx". + if(!CriteriaListHead) + break; + + Criteria = CriteriaListHead; + + while(Criteria) + { + if(MatchFileNamePattern(Search->Next->FileName, Criteria->Search)) + { + bFound = true; + break; + } + + Criteria = Criteria->Next; + } + + if(bFound) + break; + + Search->Next = Search->Next->Next; + } + + if (!Search->Next) + { + if (strlen(DiskNext) > 0) + { + CloseCabinet(); + + SetCabinetName(CabinetNext); + + OnDiskChange(CabinetNext, DiskNext); + + Status = Open(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + + Search->Next = FileListHead; + if (!Search->Next) + return CAB_STATUS_NOFILE; + } + else + return CAB_STATUS_NOFILE; + } + + Search->File = &Search->Next->File; + Search->FileName = Search->Next->FileName; + Search->Next = Search->Next->Next; + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::ExtractFile(char* FileName) +/* + * FUNCTION: Extracts a file from the cabinet + * ARGUMENTS: + * FileName = Pointer to buffer with name of file + * RETURNS + * Status of operation + */ +{ + ULONG Size; + ULONG Offset; + ULONG BytesRead; + ULONG BytesToRead; + ULONG BytesWritten; + ULONG BytesSkipped; + ULONG BytesToWrite; + ULONG TotalBytesRead; + ULONG CurrentOffset; + PUCHAR Buffer; + PUCHAR CurrentBuffer; + FILEHANDLE DestFile; + PCFFILE_NODE File; + CFDATA CFData; + ULONG Status; + bool Skip; +#if defined(_WIN32) + FILETIME FileTime; +#endif + CHAR DestName[MAX_PATH]; + CHAR TempName[MAX_PATH]; + + Status = LocateFile(FileName, &File); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MID_TRACE, ("Cannot locate file (%u).\n", (UINT)Status)); + return Status; + } + + LastFileOffset = File->File.FileOffset; + + switch (CurrentFolderNode->Folder.CompressionType & CAB_COMP_MASK) + { + case CAB_COMP_NONE: + SelectCodec(CAB_CODEC_RAW); + break; + + case CAB_COMP_MSZIP: + SelectCodec(CAB_CODEC_MSZIP); + break; + + default: + return CAB_STATUS_UNSUPPCOMP; + } + + DPRINT(MAX_TRACE, ("Extracting file at uncompressed offset (0x%X) Size (%u bytes) AO (0x%X) UO (0x%X).\n", + (UINT)File->File.FileOffset, + (UINT)File->File.FileSize, + (UINT)File->DataBlock->AbsoluteOffset, + (UINT)File->DataBlock->UncompOffset)); + + strcpy(DestName, DestPath); + strcat(DestName, FileName); + + /* Create destination file, fail if it already exists */ +#if defined(_WIN32) + DestFile = CreateFile(DestName, // Create this file + GENERIC_WRITE, // Open for writing + 0, // No sharing + NULL, // No security + CREATE_NEW, // New file only + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (DestFile == INVALID_HANDLE_VALUE) + { + /* If file exists, ask to overwrite file */ + if (((Status = GetLastError()) == ERROR_FILE_EXISTS) && + (OnOverwrite(&File->File, FileName))) + { + /* Create destination file, overwrite if it already exists */ + DestFile = CreateFile(DestName, // Create this file + GENERIC_WRITE, // Open for writing + 0, // No sharing + NULL, // No security + TRUNCATE_EXISTING, // Truncate the file + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (DestFile == INVALID_HANDLE_VALUE) + return CAB_STATUS_CANNOT_CREATE; + } + else + { + if (Status == ERROR_FILE_EXISTS) + return CAB_STATUS_FILE_EXISTS; + else + return CAB_STATUS_CANNOT_CREATE; + } + } +#else /* !_WIN32 */ + DestFile = fopen(DestName, "rb"); + if (DestFile != NULL) + { + fclose(DestFile); + /* If file exists, ask to overwrite file */ + if (OnOverwrite(&File->File, FileName)) + { + DestFile = fopen(DestName, "w+b"); + if (DestFile == NULL) + return CAB_STATUS_CANNOT_CREATE; + } + else + return CAB_STATUS_FILE_EXISTS; + } + else + { + DestFile = fopen(DestName, "w+b"); + if (DestFile == NULL) + return CAB_STATUS_CANNOT_CREATE; + } +#endif +#if defined(_WIN32) + if (!DosDateTimeToFileTime(File->File.FileDate, File->File.FileTime, &FileTime)) + { + CloseFile(DestFile); + DPRINT(MIN_TRACE, ("DosDateTimeToFileTime() failed (%u).\n", (UINT)GetLastError())); + return CAB_STATUS_CANNOT_WRITE; + } + + SetFileTime(DestFile, NULL, &FileTime, NULL); +#else + //DPRINT(MIN_TRACE, ("FIXME: DosDateTimeToFileTime\n")); +#endif + SetAttributesOnFile(DestName, File->File.Attributes); + + Buffer = (PUCHAR)AllocateMemory(CAB_BLOCKSIZE + 12); // This should be enough + if (!Buffer) + { + CloseFile(DestFile); + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + /* Call OnExtract event handler */ + OnExtract(&File->File, FileName); + + /* Search to start of file */ +#if defined(_WIN32) + Offset = SetFilePointer(FileHandle, + File->DataBlock->AbsoluteOffset, + NULL, + FILE_BEGIN); + if (Offset == INVALID_SET_FILE_POINTER) + { + DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError())); + return CAB_STATUS_INVALID_CAB; + } +#else + if (fseek(FileHandle, (off_t)File->DataBlock->AbsoluteOffset, SEEK_SET) != 0) + { + DPRINT(MIN_TRACE, ("fseek() failed.\n")); + return CAB_STATUS_FAILURE; + } + Offset = ftell(FileHandle); +#endif + + Size = File->File.FileSize; + Offset = File->File.FileOffset; + CurrentOffset = File->DataBlock->UncompOffset; + + Skip = true; + + ReuseBlock = (CurrentDataNode == File->DataBlock); + if (Size > 0) + { + do + { + DPRINT(MAX_TRACE, ("CO (0x%X) ReuseBlock (%u) Offset (0x%X) Size (%d) BytesLeftInBlock (%d)\n", + (UINT)File->DataBlock->UncompOffset, (UINT)ReuseBlock, (UINT)Offset, (UINT)Size, + (UINT)BytesLeftInBlock)); + + if (/*(CurrentDataNode != File->DataBlock) &&*/ (!ReuseBlock) || (BytesLeftInBlock <= 0)) + { + DPRINT(MAX_TRACE, ("Filling buffer. ReuseBlock (%u)\n", (UINT)ReuseBlock)); + + CurrentBuffer = Buffer; + TotalBytesRead = 0; + do + { + DPRINT(MAX_TRACE, ("Size (%u bytes).\n", (UINT)Size)); + + if (((Status = ReadBlock(&CFData, sizeof(CFDATA), &BytesRead)) != + CAB_STATUS_SUCCESS) || (BytesRead != sizeof(CFDATA))) + { + CloseFile(DestFile); + FreeMemory(Buffer); + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + + DPRINT(MAX_TRACE, ("Data block: Checksum (0x%X) CompSize (%u bytes) UncompSize (%u bytes)\n", + (UINT)CFData.Checksum, + CFData.CompSize, + CFData.UncompSize)); + + ASSERT(CFData.CompSize <= CAB_BLOCKSIZE + 12); + + BytesToRead = CFData.CompSize; + + DPRINT(MAX_TRACE, ("Read: (0x%lX,0x%lX).\n", + (unsigned long)CurrentBuffer, (unsigned long)Buffer)); + + if (((Status = ReadBlock(CurrentBuffer, BytesToRead, &BytesRead)) != + CAB_STATUS_SUCCESS) || (BytesToRead != BytesRead)) + { + CloseFile(DestFile); + FreeMemory(Buffer); + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + + /* FIXME: Does not work with files generated by makecab.exe */ +/* + if (CFData.Checksum != 0) + { + ULONG Checksum = ComputeChecksum(CurrentBuffer, BytesRead, 0); + if (Checksum != CFData.Checksum) + { + CloseFile(DestFile); + FreeMemory(Buffer); + DPRINT(MIN_TRACE, ("Bad checksum (is 0x%X, should be 0x%X).\n", + Checksum, CFData.Checksum)); + return CAB_STATUS_INVALID_CAB; + } + } +*/ + TotalBytesRead += BytesRead; + + CurrentBuffer += BytesRead; + + if (CFData.UncompSize == 0) + { + if (strlen(DiskNext) == 0) + return CAB_STATUS_NOFILE; + + /* CloseCabinet() will destroy all file entries so in case + FileName refers to the FileName field of a CFFOLDER_NODE + structure, we have to save a copy of the filename */ + strcpy(TempName, FileName); + + CloseCabinet(); + + SetCabinetName(CabinetNext); + + OnDiskChange(CabinetNext, DiskNext); + + Status = Open(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + + /* The first data block of the file will not be + found as it is located in the previous file */ + Status = LocateFile(TempName, &File); + if (Status == CAB_STATUS_NOFILE) + { + DPRINT(MID_TRACE, ("Cannot locate file (%u).\n", (UINT)Status)); + return Status; + } + + /* The file is continued in the first data block in the folder */ + File->DataBlock = CurrentFolderNode->DataListHead; + + /* Search to start of file */ +#if defined(_WIN32) + if( SetFilePointer(FileHandle, + File->DataBlock->AbsoluteOffset, + NULL, + FILE_BEGIN) == INVALID_SET_FILE_POINTER ) + { + DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError())); + return CAB_STATUS_INVALID_CAB; + } +#else + if (fseek(FileHandle, (off_t)File->DataBlock->AbsoluteOffset, SEEK_SET) != 0) + { + DPRINT(MIN_TRACE, ("fseek() failed.\n")); + return CAB_STATUS_INVALID_CAB; + } +#endif + + DPRINT(MAX_TRACE, ("Continuing extraction of file at uncompressed offset (0x%X) Size (%u bytes) AO (0x%X) UO (0x%X).\n", + (UINT)File->File.FileOffset, + (UINT)File->File.FileSize, + (UINT)File->DataBlock->AbsoluteOffset, + (UINT)File->DataBlock->UncompOffset)); + + CurrentDataNode = File->DataBlock; + ReuseBlock = true; + + RestartSearch = true; + } + } while (CFData.UncompSize == 0); + + DPRINT(MAX_TRACE, ("TotalBytesRead (%u).\n", (UINT)TotalBytesRead)); + + Status = Codec->Uncompress(OutputBuffer, Buffer, TotalBytesRead, &BytesToWrite); + if (Status != CS_SUCCESS) + { + CloseFile(DestFile); + FreeMemory(Buffer); + DPRINT(MID_TRACE, ("Cannot uncompress block.\n")); + if (Status == CS_NOMEMORY) + return CAB_STATUS_NOMEMORY; + return CAB_STATUS_INVALID_CAB; + } + + if (BytesToWrite != CFData.UncompSize) + { + DPRINT(MID_TRACE, ("BytesToWrite (%u) != CFData.UncompSize (%d)\n", + (UINT)BytesToWrite, CFData.UncompSize)); + return CAB_STATUS_INVALID_CAB; + } + + BytesLeftInBlock = BytesToWrite; + } + else + { + DPRINT(MAX_TRACE, ("Using same buffer. ReuseBlock (%u)\n", (UINT)ReuseBlock)); + + BytesToWrite = BytesLeftInBlock; + + DPRINT(MAX_TRACE, ("Seeking to absolute offset 0x%X.\n", + (UINT)(CurrentDataNode->AbsoluteOffset + sizeof(CFDATA) + CurrentDataNode->Data.CompSize))); + + if (((Status = ReadBlock(&CFData, sizeof(CFDATA), &BytesRead)) != + CAB_STATUS_SUCCESS) || (BytesRead != sizeof(CFDATA))) + { + CloseFile(DestFile); + FreeMemory(Buffer); + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + + DPRINT(MAX_TRACE, ("CFData.CompSize 0x%X CFData.UncompSize 0x%X.\n", + CFData.CompSize, CFData.UncompSize)); + + /* Go to next data block */ +#if defined(_WIN32) + if( SetFilePointer(FileHandle, + CurrentDataNode->AbsoluteOffset + sizeof(CFDATA) + + CurrentDataNode->Data.CompSize, + NULL, + FILE_BEGIN) == INVALID_SET_FILE_POINTER ) + { + DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError())); + return CAB_STATUS_INVALID_CAB; + } +#else + if (fseek(FileHandle, (off_t)CurrentDataNode->AbsoluteOffset + sizeof(CFDATA) + + CurrentDataNode->Data.CompSize, SEEK_SET) != 0) + { + DPRINT(MIN_TRACE, ("fseek() failed.\n")); + return CAB_STATUS_INVALID_CAB; + } +#endif + + ReuseBlock = false; + } + + if (Skip) + BytesSkipped = (Offset - CurrentOffset); + else + BytesSkipped = 0; + + BytesToWrite -= BytesSkipped; + + if (Size < BytesToWrite) + BytesToWrite = Size; + + DPRINT(MAX_TRACE, ("Offset (0x%X) CurrentOffset (0x%X) ToWrite (%u) Skipped (%u)(%u) Size (%u).\n", + (UINT)Offset, + (UINT)CurrentOffset, + (UINT)BytesToWrite, + (UINT)BytesSkipped, (UINT)Skip, + (UINT)Size)); + +#if defined(_WIN32) + if (!WriteFile(DestFile, (void*)((PUCHAR)OutputBuffer + BytesSkipped), + BytesToWrite, (LPDWORD)&BytesWritten, NULL) || + (BytesToWrite != BytesWritten)) + { + DPRINT(MIN_TRACE, ("Status 0x%X.\n", (UINT)GetLastError())); +#else + BytesWritten = BytesToWrite; + if (fwrite((void*)((PUCHAR)OutputBuffer + BytesSkipped), + BytesToWrite, 1, DestFile) < 1) + { +#endif + CloseFile(DestFile); + FreeMemory(Buffer); + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } + Size -= BytesToWrite; + + CurrentOffset += BytesToWrite; + + /* Don't skip any more bytes */ + Skip = false; + } while (Size > 0); + } + + CloseFile(DestFile); + + FreeMemory(Buffer); + + return CAB_STATUS_SUCCESS; +} + +bool CCabinet::IsCodecSelected() +/* + * FUNCTION: Returns the value of CodecSelected + * RETURNS: + * Whether a codec is selected + */ +{ + return CodecSelected; +} + +void CCabinet::SelectCodec(LONG Id) +/* + * FUNCTION: Selects codec engine to use + * ARGUMENTS: + * Id = Codec identifier + */ +{ + if (CodecSelected) + { + if (Id == CodecId) + return; + + CodecSelected = false; + delete Codec; + } + + switch (Id) + { + case CAB_CODEC_RAW: + Codec = new CRawCodec(); + break; + + case CAB_CODEC_MSZIP: + Codec = new CMSZipCodec(); + break; + + default: + return; + } + + CodecId = Id; + CodecSelected = true; +} + + +#ifndef CAB_READ_ONLY + +/* CAB write methods */ + +ULONG CCabinet::NewCabinet() +/* + * FUNCTION: Creates a new cabinet + * RETURNS: + * Status of operation + */ +{ + ULONG Status; + + CurrentDiskNumber = 0; + + OutputBuffer = AllocateMemory(CAB_BLOCKSIZE + 12); // This should be enough + InputBuffer = AllocateMemory(CAB_BLOCKSIZE + 12); // This should be enough + if ((!OutputBuffer) || (!InputBuffer)) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + CurrentIBuffer = InputBuffer; + CurrentIBufferSize = 0; + + CABHeader.Signature = CAB_SIGNATURE; + CABHeader.Reserved1 = 0; // Not used + CABHeader.CabinetSize = 0; // Not yet known + CABHeader.Reserved2 = 0; // Not used + CABHeader.Reserved3 = 0; // Not used + CABHeader.Version = CAB_VERSION; + CABHeader.FolderCount = 0; // Not yet known + CABHeader.FileCount = 0; // Not yet known + CABHeader.Flags = 0; // Not yet known + // FIXME: Should be random + CABHeader.SetID = 0x534F; + CABHeader.CabinetNumber = 0; + + + TotalFolderSize = 0; + TotalFileSize = 0; + + DiskSize = sizeof(CFHEADER); + + InitCabinetHeader(); + + // NextFolderNumber is 0-based + NextFolderNumber = 0; + + CurrentFolderNode = NULL; + Status = NewFolder(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + + CurrentFolderNode->Folder.DataOffset = DiskSize - TotalHeaderSize; + + ScratchFile = new CCFDATAStorage; + if (!ScratchFile) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + Status = ScratchFile->Create("~CAB.tmp"); + + CreateNewFolder = false; + + CreateNewDisk = false; + + PrevCabinetNumber = 0; + + return Status; +} + + +ULONG CCabinet::NewDisk() +/* + * FUNCTION: Forces a new disk to be created + * RETURNS: + * Status of operation + */ +{ + // NextFolderNumber is 0-based + NextFolderNumber = 1; + + CreateNewDisk = false; + + DiskSize = sizeof(CFHEADER) + TotalFolderSize + TotalFileSize; + + InitCabinetHeader(); + + CurrentFolderNode->TotalFolderSize = 0; + + CurrentFolderNode->Folder.DataBlockCount = 0; + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::NewFolder() +/* + * FUNCTION: Forces a new folder to be created + * RETURNS: + * Status of operation + */ +{ + DPRINT(MAX_TRACE, ("Creating new folder.\n")); + + CurrentFolderNode = NewFolderNode(); + if (!CurrentFolderNode) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + switch (CodecId) { + case CAB_CODEC_RAW: + CurrentFolderNode->Folder.CompressionType = CAB_COMP_NONE; + break; + + case CAB_CODEC_MSZIP: + CurrentFolderNode->Folder.CompressionType = CAB_COMP_MSZIP; + break; + + default: + return CAB_STATUS_UNSUPPCOMP; + } + + /* FIXME: This won't work if no files are added to the new folder */ + + DiskSize += sizeof(CFFOLDER); + + TotalFolderSize += sizeof(CFFOLDER); + + NextFolderNumber++; + + CABHeader.FolderCount++; + + LastBlockStart = 0; + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::WriteFileToScratchStorage(PCFFILE_NODE FileNode) +/* + * FUNCTION: Writes a file to the scratch file + * ARGUMENTS: + * FileNode = Pointer to file node + * RETURNS: + * Status of operation + */ +{ + ULONG BytesToRead; + ULONG BytesRead; + ULONG Status; + ULONG Size; + + if (!ContinueFile) + { + /* Try to open file */ +#if defined(_WIN32) + SourceFile = CreateFile( + FileNode->FileName, // Open this file + GENERIC_READ, // Open for reading + FILE_SHARE_READ, // Share for reading + NULL, // No security + OPEN_EXISTING, // File must exist + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (SourceFile == INVALID_HANDLE_VALUE) + { + DPRINT(MID_TRACE, ("File not found (%s).\n", FileNode->FileName)); + return CAB_STATUS_NOFILE; + } +#else /* !_WIN32 */ + SourceFile = fopen(FileNode->FileName, "rb"); + if (SourceFile == NULL) + { + DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n")); + return CAB_STATUS_NOFILE; + } +#endif + + if (CreateNewFolder) + { + /* There is always a new folder after + a split file is completely stored */ + Status = NewFolder(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + CreateNewFolder = false; + } + + /* Call OnAdd event handler */ + OnAdd(&FileNode->File, FileNode->FileName); + + TotalBytesLeft = FileNode->File.FileSize; + + FileNode->File.FileOffset = CurrentFolderNode->UncompOffset; + CurrentFolderNode->UncompOffset += TotalBytesLeft; + FileNode->File.FileControlID = (USHORT)(NextFolderNumber - 1); + CurrentFolderNode->Commit = true; + PrevCabinetNumber = CurrentDiskNumber; + + Size = sizeof(CFFILE) + (ULONG)strlen(GetFileName(FileNode->FileName)) + 1; + CABHeader.FileTableOffset += Size; + TotalFileSize += Size; + DiskSize += Size; + } + + FileNode->Commit = true; + + if (TotalBytesLeft > 0) + { + do + { + if (TotalBytesLeft > (ULONG)CAB_BLOCKSIZE - CurrentIBufferSize) + BytesToRead = CAB_BLOCKSIZE - CurrentIBufferSize; + else + BytesToRead = TotalBytesLeft; + + if (!ReadFileData(SourceFile, CurrentIBuffer, BytesToRead, &BytesRead) || (BytesToRead != BytesRead)) + { + DPRINT(MIN_TRACE, ("Cannot read from file. BytesToRead (%u) BytesRead (%u) CurrentIBufferSize (%u).\n", + (UINT)BytesToRead, (UINT)BytesRead, (UINT)CurrentIBufferSize)); + return CAB_STATUS_INVALID_CAB; + } + + CurrentIBuffer = (unsigned char*)CurrentIBuffer + BytesRead; + CurrentIBufferSize += (USHORT)BytesRead; + + if (CurrentIBufferSize == CAB_BLOCKSIZE) + { + Status = WriteDataBlock(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + TotalBytesLeft -= BytesRead; + } while ((TotalBytesLeft > 0) && (!CreateNewDisk)); + } + + if (TotalBytesLeft == 0) + { + CloseFile(SourceFile); + FileNode->Delete = true; + + if (FileNode->File.FileControlID > CAB_FILE_MAX_FOLDER) + { + FileNode->File.FileControlID = CAB_FILE_CONTINUED; + CurrentFolderNode->Delete = true; + + if ((CurrentIBufferSize > 0) || (CurrentOBufferSize > 0)) + { + Status = WriteDataBlock(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + + CreateNewFolder = true; + } + } + else + { + if (FileNode->File.FileControlID <= CAB_FILE_MAX_FOLDER) + FileNode->File.FileControlID = CAB_FILE_SPLIT; + else + FileNode->File.FileControlID = CAB_FILE_PREV_NEXT; + } + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::WriteDisk(ULONG MoreDisks) +/* + * FUNCTION: Forces the current disk to be written + * ARGUMENTS: + * MoreDisks = true if there is one or more disks after this disk + * RETURNS: + * Status of operation + */ +{ + PCFFILE_NODE FileNode; + ULONG Status; + + ContinueFile = false; + FileNode = FileListHead; + while (FileNode != NULL) + { + Status = WriteFileToScratchStorage(FileNode); + if (Status != CAB_STATUS_SUCCESS) + return Status; + + if (CreateNewDisk) + { + /* A data block could span more than two + disks if MaxDiskSize is very small */ + while (CreateNewDisk) + { + DPRINT(MAX_TRACE, ("Creating new disk.\n")); + CommitDisk(true); + CloseDisk(); + NewDisk(); + + ContinueFile = true; + CreateNewDisk = false; + + DPRINT(MAX_TRACE, ("First on new disk. CurrentIBufferSize (%u) CurrentOBufferSize (%u).\n", + (UINT)CurrentIBufferSize, (UINT)CurrentOBufferSize)); + + if ((CurrentIBufferSize > 0) || (CurrentOBufferSize > 0)) + { + Status = WriteDataBlock(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + } + } + else + { + ContinueFile = false; + FileNode = FileNode->Next; + } + } + + if ((CurrentIBufferSize > 0) || (CurrentOBufferSize > 0)) + { + /* A data block could span more than two + disks if MaxDiskSize is very small */ + + ASSERT(CreateNewDisk == false); + + do + { + if (CreateNewDisk) + { + DPRINT(MID_TRACE, ("Creating new disk 2.\n")); + CommitDisk(true); + CloseDisk(); + NewDisk(); + CreateNewDisk = false; + + ASSERT(FileNode == FileListHead); + } + + if ((CurrentIBufferSize > 0) || (CurrentOBufferSize > 0)) + { + Status = WriteDataBlock(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + } while (CreateNewDisk); + } + CommitDisk(MoreDisks); + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::CommitDisk(ULONG MoreDisks) +/* + * FUNCTION: Commits the current disk + * ARGUMENTS: + * MoreDisks = true if there is one or more disks after this disk + * RETURNS: + * Status of operation + */ +{ + PCFFOLDER_NODE FolderNode; + ULONG Status; + + OnCabinetName(CurrentDiskNumber, CabinetName); + + /* Create file, fail if it already exists */ +#if defined(_WIN32) + FileHandle = CreateFile(CabinetName, // Create this file + GENERIC_WRITE, // Open for writing + 0, // No sharing + NULL, // No security + CREATE_NEW, // New file only + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (FileHandle == INVALID_HANDLE_VALUE) + { + ULONG Status; + /* If file exists, ask to overwrite file */ + if (((Status = GetLastError()) == ERROR_FILE_EXISTS) && + (OnOverwrite(NULL, CabinetName))) + { + + /* Create cabinet file, overwrite if it already exists */ + FileHandle = CreateFile(CabinetName, // Create this file + GENERIC_WRITE, // Open for writing + 0, // No sharing + NULL, // No security + TRUNCATE_EXISTING, // Truncate the file + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (FileHandle == INVALID_HANDLE_VALUE) + return CAB_STATUS_CANNOT_CREATE; + } + else + { + if (Status == ERROR_FILE_EXISTS) + return CAB_STATUS_FILE_EXISTS; + else + return CAB_STATUS_CANNOT_CREATE; + } + } +#else /* !_WIN32 */ + FileHandle = fopen(CabinetName, "rb"); + if (FileHandle != NULL) + { + fclose(FileHandle); + /* If file exists, ask to overwrite file */ + if (OnOverwrite(NULL, CabinetName)) + { + FileHandle = fopen(CabinetName, "w+b"); + if (FileHandle == NULL) + return CAB_STATUS_CANNOT_CREATE; + } + else + return CAB_STATUS_FILE_EXISTS; + + } + else + { + FileHandle = fopen(CabinetName, "w+b"); + if (FileHandle == NULL) + return CAB_STATUS_CANNOT_CREATE; + } +#endif + + WriteCabinetHeader(MoreDisks != 0); + + Status = WriteFolderEntries(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + + /* Write file entries */ + WriteFileEntries(); + + /* Write data blocks */ + FolderNode = FolderListHead; + while (FolderNode != NULL) + { + if (FolderNode->Commit) + { + Status = CommitDataBlocks(FolderNode); + if (Status != CAB_STATUS_SUCCESS) + return Status; + /* Remove data blocks for folder */ + DestroyDataNodes(FolderNode); + } + FolderNode = FolderNode->Next; + } + + CloseFile(FileHandle); + + ScratchFile->Truncate(); + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::CloseDisk() +/* + * FUNCTION: Closes the current disk + * RETURNS: + * Status of operation + */ +{ + DestroyDeletedFileNodes(); + + /* Destroy folder nodes that are completely stored */ + DestroyDeletedFolderNodes(); + + CurrentDiskNumber++; + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::CloseCabinet() +/* + * FUNCTION: Closes the current cabinet + * RETURNS: + * Status of operation + */ +{ + ULONG Status; + + DestroyFileNodes(); + + DestroyFolderNodes(); + + if (InputBuffer) + { + FreeMemory(InputBuffer); + InputBuffer = NULL; + } + + if (OutputBuffer) + { + FreeMemory(OutputBuffer); + OutputBuffer = NULL; + } + + Close(); + + if (ScratchFile) + { + Status = ScratchFile->Destroy(); + delete ScratchFile; + return Status; + } + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::AddFile(char* FileName) +/* + * FUNCTION: Adds a file to the current disk + * ARGUMENTS: + * FileName = Pointer to string with file name (full path) + * RETURNS: + * Status of operation + */ +{ + FILEHANDLE SrcFile; + PCFFILE_NODE FileNode; + char* NewFileName; + + NewFileName = (char*)AllocateMemory(strlen(FileName) + 1); + if (!NewFileName) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + strcpy(NewFileName, FileName); + ConvertPath(NewFileName, false); + + /* Try to open file */ +#if defined(_WIN32) + SrcFile = CreateFile( + NewFileName, // Open this file + GENERIC_READ, // Open for reading + FILE_SHARE_READ, // Share for reading + NULL, // No security + OPEN_EXISTING, // File must exist + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (SrcFile == INVALID_HANDLE_VALUE) + { + DPRINT(MID_TRACE, ("File not found (%s).\n", NewFileName)); + FreeMemory(NewFileName); + return CAB_STATUS_CANNOT_OPEN; + } +#else /* !_WIN32 */ + SrcFile = fopen(NewFileName, "rb"); + if (SrcFile == NULL) + { + DPRINT(MID_TRACE, ("File not found (%s).\n", NewFileName)); + FreeMemory(NewFileName); + return CAB_STATUS_CANNOT_OPEN; + } +#endif + + FileNode = NewFileNode(); + if (!FileNode) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + FreeMemory(NewFileName); + return CAB_STATUS_NOMEMORY; + } + + FileNode->FolderNode = CurrentFolderNode; + FileNode->FileName = NewFileName; + + /* FIXME: Check for and handle large files (>= 2GB) */ + FileNode->File.FileSize = GetSizeOfFile(SrcFile); + if (FileNode->File.FileSize == (ULONG)-1) + { + DPRINT(MIN_TRACE, ("Cannot read from file.\n")); + FreeMemory(NewFileName); + return CAB_STATUS_CANNOT_READ; + } + + if (GetFileTimes(SrcFile, FileNode) != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read file times.\n")); + FreeMemory(NewFileName); + return CAB_STATUS_CANNOT_READ; + } + + if (GetAttributesOnFile(FileNode) != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read file attributes.\n")); + FreeMemory(NewFileName); + return CAB_STATUS_CANNOT_READ; + } + + CloseFile(SrcFile); + + return CAB_STATUS_SUCCESS; +} + +bool CCabinet::CreateSimpleCabinet() +/* + * FUNCTION: Create a simple cabinet based on the files in the criteria list + */ +{ + bool bRet = false; + char* pszFile; + char szFilePath[MAX_PATH]; + char szFile[MAX_PATH]; + PSEARCH_CRITERIA Criteria; + ULONG Status; + +#if defined(_WIN32) + HANDLE hFind; + WIN32_FIND_DATA FindFileData; +#else + DIR* dirp; + struct dirent* dp; + struct stat stbuf; +#endif + + // Initialize a new cabinet + Status = NewCabinet(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot create cabinet (%u).\n", (UINT)Status)); + goto cleanup; + } + + // Add each file in the criteria list + Criteria = CriteriaListHead; + + while(Criteria) + { + // Store the file path with a trailing slash in szFilePath + ConvertPath(Criteria->Search, false); + pszFile = strrchr(Criteria->Search, DIR_SEPARATOR_CHAR); + + if(pszFile) + { + // Set the pointer to the start of the file name, not the slash + pszFile++; + + strncpy(szFilePath, Criteria->Search, pszFile - Criteria->Search); + szFilePath[pszFile - Criteria->Search] = 0; + } + else + { + pszFile = Criteria->Search; + +#if defined(_WIN32) + szFilePath[0] = 0; +#else + // needed for opendir() + strcpy(szFilePath, "./"); +#endif + } + +#if defined(_WIN32) + // Windows: Use the easy FindFirstFile/FindNextFile API for getting all files and checking them against the pattern + hFind = FindFirstFile(Criteria->Search, &FindFileData); + + // Don't stop if a search criteria is not found + if(hFind == INVALID_HANDLE_VALUE && GetLastError() != ERROR_FILE_NOT_FOUND) + { + DPRINT(MIN_TRACE, ("FindFirstFile failed, Criteria: %s, error code is %u\n", Criteria->Search, (UINT)GetLastError())); + goto cleanup; + } + + do + { + if(!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) + { + strcpy(szFile, szFilePath); + strcat(szFile, FindFileData.cFileName); + + Status = AddFile(szFile); + + if(Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot add file to cabinet (%u).\n", (UINT)Status)); + goto cleanup; + } + } + } + while(FindNextFile(hFind, &FindFileData)); + + FindClose(hFind); +#else + // Unix: Use opendir/readdir to loop through all entries, stat to check if it's a file and MatchFileNamePattern to match the file against the pattern + dirp = opendir(szFilePath); + + if(dirp) + { + while( (dp = readdir(dirp)) ) + { + strcpy(szFile, szFilePath); + strcat(szFile, dp->d_name); + + if(stat(szFile, &stbuf) == 0) + { + if(stbuf.st_mode != S_IFDIR) + { + if(MatchFileNamePattern(dp->d_name, pszFile)) + { + Status = AddFile(szFile); + + if(Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot add file to cabinet (%u).\n", (UINT)Status)); + goto cleanup; + } + } + } + } + else + { + DPRINT(MIN_TRACE, ("stat failed, error code is %i\n", errno)); + goto cleanup; + } + } + + closedir(dirp); + } +#endif + + Criteria = Criteria->Next; + } + + Status = WriteDisk(false); + if (Status == CAB_STATUS_SUCCESS) + Status = CloseDisk(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot write disk (%u).\n", (UINT)Status)); + goto cleanup; + } + + CloseCabinet(); + bRet = true; + +cleanup: + DestroySearchCriteria(); + return bRet; +} + +void CCabinet::SetMaxDiskSize(ULONG Size) +/* + * FUNCTION: Sets the maximum size of the current disk + * ARGUMENTS: + * Size = Maximum size of current disk (0 means no maximum size) + */ +{ + MaxDiskSize = Size; +} + +#endif /* CAB_READ_ONLY */ + + +/* Default event handlers */ + +bool CCabinet::OnOverwrite(PCFFILE File, + char* FileName) +/* + * FUNCTION: Called when extracting a file and it already exists + * ARGUMENTS: + * File = Pointer to CFFILE for file being extracted + * FileName = Pointer to buffer with name of file (full path) + * RETURNS + * true if the file should be overwritten, false if not + */ +{ + return false; +} + + +void CCabinet::OnExtract(PCFFILE File, + char* FileName) +/* + * FUNCTION: Called just before extracting a file + * ARGUMENTS: + * File = Pointer to CFFILE for file being extracted + * FileName = Pointer to buffer with name of file (full path) + */ +{ +} + + +void CCabinet::OnDiskChange(char* CabinetName, + char* DiskLabel) +/* + * FUNCTION: Called when a new disk is to be processed + * ARGUMENTS: + * CabinetName = Pointer to buffer with name of cabinet + * DiskLabel = Pointer to buffer with label of disk + */ +{ +} + + +#ifndef CAB_READ_ONLY + +void CCabinet::OnAdd(PCFFILE File, + char* FileName) +/* + * FUNCTION: Called just before adding a file to a cabinet + * ARGUMENTS: + * File = Pointer to CFFILE for file being added + * FileName = Pointer to buffer with name of file (full path) + */ +{ +} + + +bool CCabinet::OnDiskLabel(ULONG Number, char* Label) +/* + * FUNCTION: Called when a disk needs a label + * ARGUMENTS: + * Number = Cabinet number that needs a label + * Label = Pointer to buffer to place label of disk + * RETURNS: + * true if a disk label was returned, false if not + */ +{ + return false; +} + + +bool CCabinet::OnCabinetName(ULONG Number, char* Name) +/* + * FUNCTION: Called when a cabinet needs a name + * ARGUMENTS: + * Number = Disk number that needs a name + * Name = Pointer to buffer to place name of cabinet + * RETURNS: + * true if a cabinet name was returned, false if not + */ +{ + return false; +} + +#endif /* CAB_READ_ONLY */ + +PCFFOLDER_NODE CCabinet::LocateFolderNode(ULONG Index) +/* + * FUNCTION: Locates a folder node + * ARGUMENTS: + * Index = Folder index + * RETURNS: + * Pointer to folder node or NULL if the folder node was not found + */ +{ + PCFFOLDER_NODE Node; + + switch (Index) + { + case CAB_FILE_SPLIT: + return FolderListTail; + + case CAB_FILE_CONTINUED: + case CAB_FILE_PREV_NEXT: + return FolderListHead; + } + + Node = FolderListHead; + while (Node != NULL) + { + if (Node->Index == Index) + return Node; + Node = Node->Next; + } + return NULL; +} + + +ULONG CCabinet::GetAbsoluteOffset(PCFFILE_NODE File) +/* + * FUNCTION: Returns the absolute offset of a file + * ARGUMENTS: + * File = Pointer to CFFILE_NODE structure for file + * RETURNS: + * Status of operation + */ +{ + PCFDATA_NODE Node; + + DPRINT(MAX_TRACE, ("FileName '%s' FileOffset (0x%X) FileSize (%u).\n", + File->FileName, + (UINT)File->File.FileOffset, + (UINT)File->File.FileSize)); + + Node = CurrentFolderNode->DataListHead; + while (Node != NULL) + { + DPRINT(MAX_TRACE, ("GetAbsoluteOffset(): Comparing (0x%X, 0x%X) (%u).\n", + (UINT)Node->UncompOffset, + (UINT)(Node->UncompOffset + Node->Data.UncompSize), + (UINT)Node->Data.UncompSize)); + + /* Node->Data.UncompSize will be 0 if the block is split + (ie. it is the last block in this cabinet) */ + if ((Node->Data.UncompSize == 0) || + ((File->File.FileOffset >= Node->UncompOffset) && + (File->File.FileOffset < Node->UncompOffset + + Node->Data.UncompSize))) + { + File->DataBlock = Node; + return CAB_STATUS_SUCCESS; + } + + Node = Node->Next; + } + return CAB_STATUS_INVALID_CAB; +} + + +ULONG CCabinet::LocateFile(char* FileName, + PCFFILE_NODE *File) +/* + * FUNCTION: Locates a file in the cabinet + * ARGUMENTS: + * FileName = Pointer to string with name of file to locate + * File = Address of pointer to CFFILE_NODE structure to fill + * RETURNS: + * Status of operation + * NOTES: + * Current folder is set to the folder of the file + */ +{ + PCFFILE_NODE Node; + ULONG Status; + + DPRINT(MAX_TRACE, ("FileName '%s'\n", FileName)); + + Node = FileListHead; + while (Node != NULL) + { + if (strcasecmp(FileName, Node->FileName) == 0) + { + CurrentFolderNode = LocateFolderNode(Node->File.FileControlID); + if (!CurrentFolderNode) + { + DPRINT(MID_TRACE, ("Folder with index number (%u) not found.\n", + Node->File.FileControlID)); + return CAB_STATUS_INVALID_CAB; + } + + if (Node->DataBlock == NULL) + Status = GetAbsoluteOffset(Node); + else + Status = CAB_STATUS_SUCCESS; + + *File = Node; + return Status; + } + Node = Node->Next; + } + return CAB_STATUS_NOFILE; +} + + +ULONG CCabinet::ReadString(char* String, LONG MaxLength) +/* + * FUNCTION: Reads a NULL-terminated string from the cabinet + * ARGUMENTS: + * String = Pointer to buffer to place string + * MaxLength = Maximum length of string + * RETURNS: + * Status of operation + */ +{ + ULONG BytesRead; + ULONG Status; + LONG Size; + bool Found; + + Found = false; + + Status = ReadBlock(String, MaxLength, &BytesRead); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + + // Find the terminating NULL character + for (Size = 0; Size < MaxLength; Size++) + { + if (String[Size] == '\0') + { + Found = true; + break; + } + } + + if (!Found) + { + DPRINT(MIN_TRACE, ("Filename in the cabinet file is too long.\n")); + return CAB_STATUS_INVALID_CAB; + } + + // Compute the offset of the next CFFILE. + // We have to subtract from the current offset here, because we read MaxLength characters above and most-probably the file name isn't MaxLength characters long. + // + 1 to skip the terminating NULL character as well. + Size = -(MaxLength - Size) + 1; + +#if defined(_WIN32) + if( SetFilePointer(FileHandle, + (LONG)Size, + NULL, + FILE_CURRENT) == INVALID_SET_FILE_POINTER ) + { + DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError())); + return CAB_STATUS_INVALID_CAB; + } +#else + if (fseek(FileHandle, (off_t)Size, SEEK_CUR) != 0) + { + DPRINT(MIN_TRACE, ("fseek() failed.\n")); + return CAB_STATUS_INVALID_CAB; + } +#endif + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::ReadFileTable() +/* + * FUNCTION: Reads the file table from the cabinet file + * RETURNS: + * Status of operation + */ +{ + ULONG i; + ULONG Status; + ULONG BytesRead; + PCFFILE_NODE File; + + DPRINT(MAX_TRACE, ("Reading file table at absolute offset (0x%X).\n", + (UINT)CABHeader.FileTableOffset)); + + /* Seek to file table */ +#if defined(_WIN32) + if( SetFilePointer(FileHandle, + CABHeader.FileTableOffset, + NULL, + FILE_BEGIN) == INVALID_SET_FILE_POINTER ) + { + DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError())); + return CAB_STATUS_INVALID_CAB; + } +#else + if (fseek(FileHandle, (off_t)CABHeader.FileTableOffset, SEEK_SET) != 0) + { + DPRINT(MIN_TRACE, ("fseek() failed.\n")); + return CAB_STATUS_INVALID_CAB; + } +#endif + + for (i = 0; i < CABHeader.FileCount; i++) + { + File = NewFileNode(); + if (!File) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + if ((Status = ReadBlock(&File->File, sizeof(CFFILE), + &BytesRead)) != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + + File->FileName = (char*)AllocateMemory(MAX_PATH); + if (!File->FileName) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + /* Read file name */ + Status = ReadString(File->FileName, MAX_PATH); + if (Status != CAB_STATUS_SUCCESS) + return Status; + + DPRINT(MAX_TRACE, ("Found file '%s' at uncompressed offset (0x%X). Size (%u bytes) ControlId (0x%X).\n", + File->FileName, + (UINT)File->File.FileOffset, + (UINT)File->File.FileSize, + File->File.FileControlID)); + + } + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::ReadDataBlocks(PCFFOLDER_NODE FolderNode) +/* + * FUNCTION: Reads all CFDATA blocks for a folder from the cabinet file + * ARGUMENTS: + * FolderNode = Pointer to CFFOLDER_NODE structure for folder + * RETURNS: + * Status of operation + */ +{ + ULONG AbsoluteOffset; + ULONG UncompOffset; + PCFDATA_NODE Node; + ULONG BytesRead; + ULONG Status; + ULONG i; + + DPRINT(MAX_TRACE, ("Reading data blocks for folder (%u) at absolute offset (0x%X).\n", + (UINT)FolderNode->Index, (UINT)FolderNode->Folder.DataOffset)); + + AbsoluteOffset = FolderNode->Folder.DataOffset; + UncompOffset = FolderNode->UncompOffset; + + for (i = 0; i < FolderNode->Folder.DataBlockCount; i++) + { + Node = NewDataNode(FolderNode); + if (!Node) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + /* Seek to data block */ +#if defined(_WIN32) + if( SetFilePointer(FileHandle, + AbsoluteOffset, + NULL, + FILE_BEGIN) == INVALID_SET_FILE_POINTER ) + { + DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError())); + return CAB_STATUS_INVALID_CAB; + } +#else + if (fseek(FileHandle, (off_t)AbsoluteOffset, SEEK_SET) != 0) + { + DPRINT(MIN_TRACE, ("fseek() failed.\n")); + return CAB_STATUS_INVALID_CAB; + } +#endif + + if ((Status = ReadBlock(&Node->Data, sizeof(CFDATA), + &BytesRead)) != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read from file (%u).\n", (UINT)Status)); + return CAB_STATUS_INVALID_CAB; + } + + DPRINT(MAX_TRACE, ("AbsOffset (0x%X) UncompOffset (0x%X) Checksum (0x%X) CompSize (%u) UncompSize (%u).\n", + (UINT)AbsoluteOffset, + (UINT)UncompOffset, + (UINT)Node->Data.Checksum, + Node->Data.CompSize, + Node->Data.UncompSize)); + + Node->AbsoluteOffset = AbsoluteOffset; + Node->UncompOffset = UncompOffset; + + AbsoluteOffset += sizeof(CFDATA) + Node->Data.CompSize; + UncompOffset += Node->Data.UncompSize; + } + + FolderUncompSize = UncompOffset; + + return CAB_STATUS_SUCCESS; +} + + +PCFFOLDER_NODE CCabinet::NewFolderNode() +/* + * FUNCTION: Creates a new folder node + * RETURNS: + * Pointer to node if there was enough free memory available, otherwise NULL + */ +{ + PCFFOLDER_NODE Node; + + Node = (PCFFOLDER_NODE)AllocateMemory(sizeof(CFFOLDER_NODE)); + if (!Node) + return NULL; + + memset(Node, 0, sizeof(CFFOLDER_NODE)); + + Node->Folder.CompressionType = CAB_COMP_NONE; + + Node->Prev = FolderListTail; + + if (FolderListTail != NULL) + FolderListTail->Next = Node; + else + FolderListHead = Node; + + FolderListTail = Node; + + return Node; +} + + +PCFFILE_NODE CCabinet::NewFileNode() +/* + * FUNCTION: Creates a new file node + * ARGUMENTS: + * FolderNode = Pointer to folder node to bind file to + * RETURNS: + * Pointer to node if there was enough free memory available, otherwise NULL + */ +{ + PCFFILE_NODE Node; + + Node = (PCFFILE_NODE)AllocateMemory(sizeof(CFFILE_NODE)); + if (!Node) + return NULL; + + memset(Node, 0, sizeof(CFFILE_NODE)); + + Node->Prev = FileListTail; + + if (FileListTail != NULL) + FileListTail->Next = Node; + else + FileListHead = Node; + + FileListTail = Node; + + return Node; +} + + +PCFDATA_NODE CCabinet::NewDataNode(PCFFOLDER_NODE FolderNode) +/* + * FUNCTION: Creates a new data block node + * ARGUMENTS: + * FolderNode = Pointer to folder node to bind data block to + * RETURNS: + * Pointer to node if there was enough free memory available, otherwise NULL + */ +{ + PCFDATA_NODE Node; + + Node = (PCFDATA_NODE)AllocateMemory(sizeof(CFDATA_NODE)); + if (!Node) + return NULL; + + memset(Node, 0, sizeof(CFDATA_NODE)); + + Node->Prev = FolderNode->DataListTail; + + if (FolderNode->DataListTail != NULL) + FolderNode->DataListTail->Next = Node; + else + FolderNode->DataListHead = Node; + + FolderNode->DataListTail = Node; + + return Node; +} + + +void CCabinet::DestroyDataNodes(PCFFOLDER_NODE FolderNode) +/* + * FUNCTION: Destroys data block nodes bound to a folder node + * ARGUMENTS: + * FolderNode = Pointer to folder node + */ +{ + PCFDATA_NODE PrevNode; + PCFDATA_NODE NextNode; + + NextNode = FolderNode->DataListHead; + while (NextNode != NULL) + { + PrevNode = NextNode->Next; + FreeMemory(NextNode); + NextNode = PrevNode; + } + FolderNode->DataListHead = NULL; + FolderNode->DataListTail = NULL; +} + + +void CCabinet::DestroyFileNodes() +/* + * FUNCTION: Destroys file nodes + */ +{ + PCFFILE_NODE PrevNode; + PCFFILE_NODE NextNode; + + NextNode = FileListHead; + while (NextNode != NULL) + { + PrevNode = NextNode->Next; + if (NextNode->FileName) + FreeMemory(NextNode->FileName); + FreeMemory(NextNode); + NextNode = PrevNode; + } + FileListHead = NULL; + FileListTail = NULL; +} + + +void CCabinet::DestroyDeletedFileNodes() +/* + * FUNCTION: Destroys file nodes that are marked for deletion + */ +{ + PCFFILE_NODE CurNode; + PCFFILE_NODE NextNode; + + CurNode = FileListHead; + while (CurNode != NULL) + { + NextNode = CurNode->Next; + + if (CurNode->Delete) + { + if (CurNode->Prev != NULL) + CurNode->Prev->Next = CurNode->Next; + else + { + FileListHead = CurNode->Next; + if (FileListHead) + FileListHead->Prev = NULL; + } + + if (CurNode->Next != NULL) + CurNode->Next->Prev = CurNode->Prev; + else + { + FileListTail = CurNode->Prev; + if (FileListTail) + FileListTail->Next = NULL; + } + + DPRINT(MAX_TRACE, ("Deleting file: '%s'\n", CurNode->FileName)); + + TotalFileSize -= (sizeof(CFFILE) + (ULONG)strlen(GetFileName(CurNode->FileName)) + 1); + + if (CurNode->FileName) + FreeMemory(CurNode->FileName); + FreeMemory(CurNode); + } + CurNode = NextNode; + } +} + + +void CCabinet::DestroyFolderNodes() +/* + * FUNCTION: Destroys folder nodes + */ +{ + PCFFOLDER_NODE PrevNode; + PCFFOLDER_NODE NextNode; + + NextNode = FolderListHead; + while (NextNode != NULL) + { + PrevNode = NextNode->Next; + DestroyDataNodes(NextNode); + FreeMemory(NextNode); + NextNode = PrevNode; + } + FolderListHead = NULL; + FolderListTail = NULL; +} + + +void CCabinet::DestroyDeletedFolderNodes() +/* + * FUNCTION: Destroys folder nodes that are marked for deletion + */ +{ + PCFFOLDER_NODE CurNode; + PCFFOLDER_NODE NextNode; + + CurNode = FolderListHead; + while (CurNode != NULL) + { + NextNode = CurNode->Next; + + if (CurNode->Delete) + { + if (CurNode->Prev != NULL) + CurNode->Prev->Next = CurNode->Next; + else + { + FolderListHead = CurNode->Next; + if (FolderListHead) + FolderListHead->Prev = NULL; + } + + if (CurNode->Next != NULL) + CurNode->Next->Prev = CurNode->Prev; + else + { + FolderListTail = CurNode->Prev; + if (FolderListTail) + FolderListTail->Next = NULL; + } + + DestroyDataNodes(CurNode); + FreeMemory(CurNode); + + TotalFolderSize -= sizeof(CFFOLDER); + } + CurNode = NextNode; + } +} + + +ULONG CCabinet::ComputeChecksum(void* Buffer, + ULONG Size, + ULONG Seed) +/* + * FUNCTION: Computes checksum for data block + * ARGUMENTS: + * Buffer = Pointer to data buffer + * Size = Length of data buffer + * Seed = Previously computed checksum + * RETURNS: + * Checksum of buffer + */ +{ + int UlongCount; // Number of ULONGs in block + ULONG Checksum; // Checksum accumulator + unsigned char* pb; + ULONG ul; + + /* FIXME: Doesn't seem to be correct. EXTRACT.EXE + won't accept checksums computed by this routine */ + + DPRINT(MIN_TRACE, ("Checksumming buffer (0x%p) Size (%u)\n", Buffer, (UINT)Size)); + + UlongCount = Size / 4; // Number of ULONGs + Checksum = Seed; // Init checksum + pb = (unsigned char*)Buffer; // Start at front of data block + + /* Checksum integral multiple of ULONGs */ + while (UlongCount-- > 0) + { + /* NOTE: Build ULONG in big/little-endian independent manner */ + ul = *pb++; // Get low-order byte + ul |= (((ULONG)(*pb++)) << 8); // Add 2nd byte + ul |= (((ULONG)(*pb++)) << 16); // Add 3nd byte + ul |= (((ULONG)(*pb++)) << 24); // Add 4th byte + + Checksum ^= ul; // Update checksum + } + + /* Checksum remainder bytes */ + ul = 0; + switch (Size % 4) + { + case 3: + ul |= (((ULONG)(*pb++)) << 16); // Add 3rd byte + case 2: + ul |= (((ULONG)(*pb++)) << 8); // Add 2nd byte + case 1: + ul |= *pb++; // Get low-order byte + default: + break; + } + Checksum ^= ul; // Update checksum + + /* Return computed checksum */ + return Checksum; +} + + +ULONG CCabinet::ReadBlock(void* Buffer, + ULONG Size, + PULONG BytesRead) +/* + * FUNCTION: Read a block of data from file + * ARGUMENTS: + * Buffer = Pointer to data buffer + * Size = Length of data buffer + * BytesRead = Pointer to ULONG that on return will contain + * number of bytes read + * RETURNS: + * Status of operation + */ +{ + if (!ReadFileData(FileHandle, Buffer, Size, BytesRead)) + return CAB_STATUS_INVALID_CAB; + return CAB_STATUS_SUCCESS; +} + +bool CCabinet::MatchFileNamePattern(char* FileName, char* Pattern) +/* + * FUNCTION: Matches a wildcard character pattern against a file + * ARGUMENTS: + * FileName = The file name to check + * Pattern = The pattern + * RETURNS: + * Whether the pattern matches the file + * + * COPYRIGHT: + * This function is based on Busybox code, Copyright (C) 1998 by Erik Andersen, released under GPL2 or any later version. + * Adapted from code written by Ingo Wilken. + * Original location: http://www.busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/utility.c?rev=5&view=markup + */ +{ + char* retryPattern = NULL; + char* retryFileName = NULL; + char ch; + + while (*FileName || *Pattern) + { + ch = *Pattern++; + + switch (ch) + { + case '*': + retryPattern = Pattern; + retryFileName = FileName; + break; + + case '?': + if (*FileName++ == '\0') + return false; + + break; + + default: + if (*FileName == ch) + { + if (*FileName) + FileName++; + break; + } + + if (*FileName) + { + Pattern = retryPattern; + FileName = ++retryFileName; + break; + } + + return false; + } + + if (!Pattern) + return false; + } + + return true; +} + +#ifndef CAB_READ_ONLY + +ULONG CCabinet::InitCabinetHeader() +/* + * FUNCTION: Initializes cabinet header and optional fields + * RETURNS: + * Status of operation + */ +{ + ULONG TotalSize; + ULONG Size; + + CABHeader.FileTableOffset = 0; // Not known yet + CABHeader.FolderCount = 0; // Not known yet + CABHeader.FileCount = 0; // Not known yet + CABHeader.Flags = 0; // Not known yet + + CABHeader.CabinetNumber = (USHORT)CurrentDiskNumber; + + if ((CurrentDiskNumber > 0) && (OnCabinetName(PrevCabinetNumber, CabinetPrev))) + { + CABHeader.Flags |= CAB_FLAG_HASPREV; + if (!OnDiskLabel(PrevCabinetNumber, DiskPrev)) + strcpy(CabinetPrev, ""); + } + + if (OnCabinetName(CurrentDiskNumber + 1, CabinetNext)) + { + CABHeader.Flags |= CAB_FLAG_HASNEXT; + if (!OnDiskLabel(CurrentDiskNumber + 1, DiskNext)) + strcpy(DiskNext, ""); + } + + TotalSize = 0; + + if ((CABHeader.Flags & CAB_FLAG_HASPREV) > 0) + { + + DPRINT(MAX_TRACE, ("CabinetPrev '%s'.\n", CabinetPrev)); + + /* Calculate size of name of previous cabinet */ + TotalSize += (ULONG)strlen(CabinetPrev) + 1; + + /* Calculate size of label of previous disk */ + TotalSize += (ULONG)strlen(DiskPrev) + 1; + } + + if ((CABHeader.Flags & CAB_FLAG_HASNEXT) > 0) + { + + DPRINT(MAX_TRACE, ("CabinetNext '%s'.\n", CabinetNext)); + + /* Calculate size of name of next cabinet */ + Size = (ULONG)strlen(CabinetNext) + 1; + TotalSize += Size; + NextFieldsSize = Size; + + /* Calculate size of label of next disk */ + Size = (ULONG)strlen(DiskNext) + 1; + TotalSize += Size; + NextFieldsSize += Size; + } + else + NextFieldsSize = 0; + + /* Add cabinet reserved area size if present */ + if (CabinetReservedFileSize > 0) + { + CABHeader.Flags |= CAB_FLAG_RESERVE; + TotalSize += CabinetReservedFileSize; + TotalSize += sizeof(ULONG); /* For CabinetResSize, FolderResSize, and FileResSize fields */ + } + + DiskSize += TotalSize; + + TotalHeaderSize = sizeof(CFHEADER) + TotalSize; + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::WriteCabinetHeader(bool MoreDisks) +/* + * FUNCTION: Writes the cabinet header and optional fields + * ARGUMENTS: + * MoreDisks = true if next cabinet name should be included + * RETURNS: + * Status of operation + */ +{ + PCFFOLDER_NODE FolderNode; + PCFFILE_NODE FileNode; + ULONG BytesWritten; + ULONG Size; + + if (MoreDisks) + { + CABHeader.Flags |= CAB_FLAG_HASNEXT; + Size = TotalHeaderSize; + } + else + { + CABHeader.Flags &= ~CAB_FLAG_HASNEXT; + DiskSize -= NextFieldsSize; + Size = TotalHeaderSize - NextFieldsSize; + } + + /* Set absolute folder offsets */ + BytesWritten = Size + TotalFolderSize + TotalFileSize; + CABHeader.FolderCount = 0; + FolderNode = FolderListHead; + while (FolderNode != NULL) + { + FolderNode->Folder.DataOffset = BytesWritten; + + BytesWritten += FolderNode->TotalFolderSize; + + CABHeader.FolderCount++; + + FolderNode = FolderNode->Next; + } + + /* Set absolute offset of file table */ + CABHeader.FileTableOffset = Size + TotalFolderSize; + + /* Count number of files to be committed */ + CABHeader.FileCount = 0; + FileNode = FileListHead; + while (FileNode != NULL) + { + if (FileNode->Commit) + CABHeader.FileCount++; + FileNode = FileNode->Next; + } + + CABHeader.CabinetSize = DiskSize; + + /* Write header */ +#if defined(_WIN32) + if (!WriteFile(FileHandle, &CABHeader, sizeof(CFHEADER), (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = sizeof(CFHEADER); + if (fwrite(&CABHeader, sizeof(CFHEADER), 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + + /* Write per-cabinet reserved area if present */ + if (CABHeader.Flags & CAB_FLAG_RESERVE) + { + ULONG ReservedSize; + + ReservedSize = CabinetReservedFileSize & 0xffff; + ReservedSize |= (0 << 16); /* Folder reserved area size */ + ReservedSize |= (0 << 24); /* Folder reserved area size */ +#if defined(_WIN32) + if (!WriteFile(FileHandle, &ReservedSize, sizeof(ULONG), (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = sizeof(ULONG); + if (fwrite(&ReservedSize, sizeof(ULONG), 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + +#if defined(_WIN32) + if (!WriteFile(FileHandle, CabinetReservedFileBuffer, CabinetReservedFileSize, (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = CabinetReservedFileSize; + if (fwrite(CabinetReservedFileBuffer, CabinetReservedFileSize, 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + } + + if ((CABHeader.Flags & CAB_FLAG_HASPREV) > 0) + { + DPRINT(MAX_TRACE, ("CabinetPrev '%s'.\n", CabinetPrev)); + + /* Write name of previous cabinet */ + Size = (ULONG)strlen(CabinetPrev) + 1; +#if defined(_WIN32) + if (!WriteFile(FileHandle, CabinetPrev, Size, (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = Size; + if (fwrite(CabinetPrev, Size, 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + + DPRINT(MAX_TRACE, ("DiskPrev '%s'.\n", DiskPrev)); + + /* Write label of previous disk */ + Size = (ULONG)strlen(DiskPrev) + 1; +#if defined(_WIN32) + if (!WriteFile(FileHandle, DiskPrev, Size, (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = Size; + if (fwrite(DiskPrev, Size, 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + } + + if ((CABHeader.Flags & CAB_FLAG_HASNEXT) > 0) + { + DPRINT(MAX_TRACE, ("CabinetNext '%s'.\n", CabinetNext)); + + /* Write name of next cabinet */ + Size = (ULONG)strlen(CabinetNext) + 1; +#if defined(_WIN32) + if (!WriteFile(FileHandle, CabinetNext, Size, (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = Size; + if (fwrite(CabinetNext, Size, 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + + DPRINT(MAX_TRACE, ("DiskNext '%s'.\n", DiskNext)); + + /* Write label of next disk */ + Size = (ULONG)strlen(DiskNext) + 1; +#if defined(_WIN32) + if (!WriteFile(FileHandle, DiskNext, Size, (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = Size; + if (fwrite(DiskNext, Size, 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + } + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::WriteFolderEntries() +/* + * FUNCTION: Writes folder entries + * RETURNS: + * Status of operation + */ +{ + PCFFOLDER_NODE FolderNode; + ULONG BytesWritten; + + DPRINT(MAX_TRACE, ("Writing folder table.\n")); + + FolderNode = FolderListHead; + while (FolderNode != NULL) + { + if (FolderNode->Commit) + { + DPRINT(MAX_TRACE, ("Writing folder entry. CompressionType (0x%X) DataBlockCount (%d) DataOffset (0x%X).\n", + FolderNode->Folder.CompressionType, FolderNode->Folder.DataBlockCount, (UINT)FolderNode->Folder.DataOffset)); + +#if defined(_WIN32) + if (!WriteFile(FileHandle, + &FolderNode->Folder, + sizeof(CFFOLDER), + (LPDWORD)&BytesWritten, + NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = sizeof(CFFOLDER); + if (fwrite(&FolderNode->Folder, sizeof(CFFOLDER), 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + } + FolderNode = FolderNode->Next; + } + + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::WriteFileEntries() +/* + * FUNCTION: Writes file entries for all files + * RETURNS: + * Status of operation + */ +{ + PCFFILE_NODE File; + ULONG BytesWritten; + bool SetCont = false; + + DPRINT(MAX_TRACE, ("Writing file table.\n")); + + File = FileListHead; + while (File != NULL) + { + if (File->Commit) + { + /* Remove any continued files that ends in this disk */ + if (File->File.FileControlID == CAB_FILE_CONTINUED) + File->Delete = true; + + /* The file could end in the last (split) block and should therefore + appear in the next disk too */ + + if ((File->File.FileOffset + File->File.FileSize >= LastBlockStart) && + (File->File.FileControlID <= CAB_FILE_MAX_FOLDER) && (BlockIsSplit)) + { + File->File.FileControlID = CAB_FILE_SPLIT; + File->Delete = false; + SetCont = true; + } + + DPRINT(MAX_TRACE, ("Writing file entry. FileControlID (0x%X) FileOffset (0x%X) FileSize (%u) FileName (%s).\n", + File->File.FileControlID, (UINT)File->File.FileOffset, (UINT)File->File.FileSize, File->FileName)); + +#if defined(_WIN32) + if (!WriteFile(FileHandle, + &File->File, + sizeof(CFFILE), + (LPDWORD)&BytesWritten, + NULL)) + return CAB_STATUS_CANNOT_WRITE; +#else + BytesWritten = sizeof(CFFILE); + if (fwrite(&File->File, sizeof(CFFILE), 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + +#if defined(_WIN32) + if (!WriteFile(FileHandle, + GetFileName(File->FileName), + (DWORD)strlen(GetFileName(File->FileName)) + 1, + (LPDWORD)&BytesWritten, + NULL)) + return CAB_STATUS_CANNOT_WRITE; +#else + BytesWritten = strlen(GetFileName(File->FileName)) + 1; + if (fwrite(GetFileName(File->FileName), strlen(GetFileName(File->FileName)) + 1, 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + + if (SetCont) + { + File->File.FileControlID = CAB_FILE_CONTINUED; + SetCont = false; + } + } + + File = File->Next; + } + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::CommitDataBlocks(PCFFOLDER_NODE FolderNode) +/* + * FUNCTION: Writes data blocks to the cabinet + * ARGUMENTS: + * FolderNode = Pointer to folder node containing the data blocks + * RETURNS: + * Status of operation + */ +{ + PCFDATA_NODE DataNode; + ULONG BytesWritten; + ULONG BytesRead; + ULONG Status; + + DataNode = FolderNode->DataListHead; + if (DataNode != NULL) + Status = ScratchFile->Seek(DataNode->ScratchFilePosition); + + while (DataNode != NULL) + { + DPRINT(MAX_TRACE, ("Reading block at (0x%X) CompSize (%u) UncompSize (%u).\n", + (UINT)DataNode->ScratchFilePosition, + DataNode->Data.CompSize, + DataNode->Data.UncompSize)); + + /* InputBuffer is free for us to use here, so we use it and avoid a + memory allocation. OutputBuffer can't be used here because it may + still contain valid data (if a data block spans two or more disks) */ + Status = ScratchFile->ReadBlock(&DataNode->Data, InputBuffer, &BytesRead); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot read from scratch file (%u).\n", (UINT)Status)); + return Status; + } + +#if defined(_WIN32) + if (!WriteFile(FileHandle, &DataNode->Data, + sizeof(CFDATA), (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = sizeof(CFDATA); + if (fwrite(&DataNode->Data, sizeof(CFDATA), 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + +#if defined(_WIN32) + if (!WriteFile(FileHandle, InputBuffer, + DataNode->Data.CompSize, (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#else + BytesWritten = DataNode->Data.CompSize; + if (fwrite(InputBuffer, DataNode->Data.CompSize, 1, FileHandle) < 1) + { + DPRINT(MIN_TRACE, ("Cannot write to file.\n")); + return CAB_STATUS_CANNOT_WRITE; + } +#endif + + DataNode = DataNode->Next; + } + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::WriteDataBlock() +/* + * FUNCTION: Writes the current data block to the scratch file + * RETURNS: + * Status of operation + */ +{ + ULONG Status; + ULONG BytesWritten; + PCFDATA_NODE DataNode; + + if (!BlockIsSplit) + { + Status = Codec->Compress(OutputBuffer, + InputBuffer, + CurrentIBufferSize, + &TotalCompSize); + + DPRINT(MAX_TRACE, ("Block compressed. CurrentIBufferSize (%u) TotalCompSize(%u).\n", + (UINT)CurrentIBufferSize, (UINT)TotalCompSize)); + + CurrentOBuffer = OutputBuffer; + CurrentOBufferSize = TotalCompSize; + } + + DataNode = NewDataNode(CurrentFolderNode); + if (!DataNode) + { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + return CAB_STATUS_NOMEMORY; + } + + DiskSize += sizeof(CFDATA); + + if (MaxDiskSize > 0) + /* Disk size is limited */ + BlockIsSplit = (DiskSize + CurrentOBufferSize > MaxDiskSize); + else + BlockIsSplit = false; + + if (BlockIsSplit) + { + DataNode->Data.CompSize = (USHORT)(MaxDiskSize - DiskSize); + DataNode->Data.UncompSize = 0; + CreateNewDisk = true; + } + else + { + DataNode->Data.CompSize = (USHORT)CurrentOBufferSize; + DataNode->Data.UncompSize = (USHORT)CurrentIBufferSize; + } + + DataNode->Data.Checksum = 0; + DataNode->ScratchFilePosition = ScratchFile->Position(); + + // FIXME: MAKECAB.EXE does not like this checksum algorithm + //DataNode->Data.Checksum = ComputeChecksum(CurrentOBuffer, DataNode->Data.CompSize, 0); + + DPRINT(MAX_TRACE, ("Writing block. Checksum (0x%X) CompSize (%u) UncompSize (%u).\n", + (UINT)DataNode->Data.Checksum, + DataNode->Data.CompSize, + DataNode->Data.UncompSize)); + + Status = ScratchFile->WriteBlock(&DataNode->Data, + CurrentOBuffer, &BytesWritten); + if (Status != CAB_STATUS_SUCCESS) + return Status; + + DiskSize += BytesWritten; + + CurrentFolderNode->TotalFolderSize += (BytesWritten + sizeof(CFDATA)); + CurrentFolderNode->Folder.DataBlockCount++; + + CurrentOBuffer = (unsigned char*)CurrentOBuffer + DataNode->Data.CompSize; + CurrentOBufferSize -= DataNode->Data.CompSize; + + LastBlockStart += DataNode->Data.UncompSize; + + if (!BlockIsSplit) + { + CurrentIBufferSize = 0; + CurrentIBuffer = InputBuffer; + } + + return CAB_STATUS_SUCCESS; +} + +#if !defined(_WIN32) + +void CCabinet::ConvertDateAndTime(time_t* Time, + PUSHORT DosDate, + PUSHORT DosTime) +/* + * FUNCTION: Returns file times of a file + * ARGUMENTS: + * FileHandle = File handle of file to get file times from + * File = Pointer to CFFILE node for file + * RETURNS: + * Status of operation + */ +{ + struct tm *timedef; + + timedef = localtime(Time); + + DPRINT(MAX_TRACE, ("day: %d, mon: %d, year:%d, hour: %d, min: %d, sec: %d\n", + timedef->tm_mday, timedef->tm_mon, timedef->tm_year, + timedef->tm_sec, timedef->tm_min, timedef->tm_hour)); + + *DosDate = ((timedef->tm_mday + 1) << 0) + | ((timedef->tm_mon + 1) << 5) + | (((timedef->tm_year + 1900) - 1980) << 9); + + *DosTime = (timedef->tm_sec << 0) + | (timedef->tm_min << 5) + | (timedef->tm_hour << 11); +} + +#endif // !_WIN32 + + +ULONG CCabinet::GetFileTimes(FILEHANDLE FileHandle, PCFFILE_NODE File) +/* + * FUNCTION: Returns file times of a file + * ARGUMENTS: + * FileHandle = File handle of file to get file times from + * File = Pointer to CFFILE node for file + * RETURNS: + * Status of operation + */ +{ +#if defined(_WIN32) + FILETIME FileTime; + + if (GetFileTime(FileHandle, NULL, NULL, &FileTime)) + FileTimeToDosDateTime(&FileTime, + &File->File.FileDate, + &File->File.FileTime); +#else + struct stat stbuf; + char buf[MAX_PATH]; + + // Check for an absolute path + if (IsSeparator(File->FileName[0])) + strcpy(buf, File->FileName); + else + { + if (!getcwd(buf, sizeof(buf))) + return CAB_STATUS_CANNOT_READ; + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, File->FileName); + } + + if (stat(buf, &stbuf) == -1) + return CAB_STATUS_CANNOT_READ; + + ConvertDateAndTime(&stbuf.st_mtime, &File->File.FileDate, &File->File.FileTime); +#endif + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::GetAttributesOnFile(PCFFILE_NODE File) +/* + * FUNCTION: Returns attributes on a file + * ARGUMENTS: + * File = Pointer to CFFILE node for file + * RETURNS: + * Status of operation + */ +{ +#if defined(_WIN32) + LONG Attributes; + + Attributes = GetFileAttributes(File->FileName); + if (Attributes == -1) + return CAB_STATUS_CANNOT_READ; + + // 0x37 = READONLY | HIDDEN | SYSTEM | DIRECTORY | ARCHIVE + // The IDs for these attributes are the same in the CAB file and under Windows + // If the file has any other attributes, strip them off by the logical AND. + File->File.Attributes = (USHORT)(Attributes & 0x37); +#else + struct stat stbuf; + char buf[MAX_PATH]; + + // Check for an absolute path + if (IsSeparator(File->FileName[0])) + strcpy(buf, File->FileName); + else + { + if (!getcwd(buf, sizeof(buf))) + return CAB_STATUS_CANNOT_READ; + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, File->FileName); + } + + if (stat(buf, &stbuf) == -1) + return CAB_STATUS_CANNOT_READ; + +#if 0 + File->File.Attributes |= CAB_ATTRIB_READONLY; + File->File.Attributes |= CAB_ATTRIB_HIDDEN; + File->File.Attributes |= CAB_ATTRIB_SYSTEM; +#endif + + if (stbuf.st_mode & S_IFDIR) + File->File.Attributes |= CAB_ATTRIB_DIRECTORY; + + File->File.Attributes |= CAB_ATTRIB_ARCHIVE; + +#endif + return CAB_STATUS_SUCCESS; +} + + +ULONG CCabinet::SetAttributesOnFile(char* FileName, USHORT FileAttributes) +/* + * FUNCTION: Sets attributes on a file + * ARGUMENTS: + * FileName = File name with path + * FileAttributes = Attributes of that file + * RETURNS: + * Status of operation + */ +{ +#if defined(_WIN32) + // 0x37 = READONLY | HIDDEN | SYSTEM | DIRECTORY | ARCHIVE + // The IDs for these attributes are the same in the CAB file and under Windows + // If the file has any other attributes, strip them off by the logical AND. + SetFileAttributes(FileName, (DWORD)(FileAttributes & 0x37)); + + return CAB_STATUS_SUCCESS; +#else + //DPRINT(MIN_TRACE, ("FIXME: SetAttributesOnFile() is unimplemented\n")); + return CAB_STATUS_SUCCESS; +#endif +} + +#endif /* CAB_READ_ONLY */ + +/* EOF */ diff --git a/tools/cabman/cabinet.h b/tools/cabman/cabinet.h new file mode 100644 index 00000000000..cf62ae91157 --- /dev/null +++ b/tools/cabman/cabinet.h @@ -0,0 +1,499 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS cabinet manager + * FILE: tools/cabman/cabinet.h + * PURPOSE: Cabinet definitions + */ + +#pragma once + +#if defined(_WIN32) +#include +#else +#include +#include +#include +#include +#include +#include +#ifndef MAX_PATH +#define MAX_PATH 260 +#endif +#endif + +#include +#include +#include + +#if defined(_WIN32) +#define DIR_SEPARATOR_CHAR '\\' +#define DIR_SEPARATOR_STRING "\\" + +#define strcasecmp _stricmp +#define strdup _strdup + +#define AllocateMemory(size) HeapAlloc(GetProcessHeap(), 0, size) +#define FreeMemory(buffer) HeapFree(GetProcessHeap(), 0, buffer) +#define FILEHANDLE HANDLE +#define CloseFile(handle) CloseHandle(handle) +#else +#define DIR_SEPARATOR_CHAR '/' +#define DIR_SEPARATOR_STRING "/" + +#define AllocateMemory(size) malloc(size) +#define FreeMemory(buffer) free(buffer) +#define CloseFile(handle) fclose(handle) +#define FILEHANDLE FILE* +#endif + +/* Debugging */ + +#define NORMAL_MASK 0x000000FF +#define SPECIAL_MASK 0xFFFFFF00 +#define MIN_TRACE 0x00000001 +#define MID_TRACE 0x00000002 +#define MAX_TRACE 0x00000003 + +#define DEBUG_MEMORY 0x00000100 + +#if DBG + +extern ULONG DebugTraceLevel; + +#undef DPRINT +#define DPRINT(_t_, _x_) \ + if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \ + ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \ + printf("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \ + printf _x_ ; \ + } + +#undef ASSERT +#define ASSERT(_b_) { \ + if (!(_b_)) { \ + printf("(%s:%d)(%s) ASSERTION: ", __FILE__, __LINE__, __FUNCTION__); \ + printf(#_b_); \ + exit(0); \ + } \ +} + +#else /* DBG */ + +#undef DPRINT +#define DPRINT(_t_, _x_) do { } while(0) + +#undef ASSERT +#define ASSERT(_x_) + +#endif /* DBG */ + + +/* Cabinet constants */ + +#define CAB_SIGNATURE 0x4643534D // "MSCF" +#define CAB_VERSION 0x0103 +#define CAB_BLOCKSIZE 32768 + +#define CAB_COMP_MASK 0x00FF +#define CAB_COMP_NONE 0x0000 +#define CAB_COMP_MSZIP 0x0001 +#define CAB_COMP_QUANTUM 0x0002 +#define CAB_COMP_LZX 0x0003 + +#define CAB_FLAG_HASPREV 0x0001 +#define CAB_FLAG_HASNEXT 0x0002 +#define CAB_FLAG_RESERVE 0x0004 + +#define CAB_ATTRIB_READONLY 0x0001 +#define CAB_ATTRIB_HIDDEN 0x0002 +#define CAB_ATTRIB_SYSTEM 0x0004 +#define CAB_ATTRIB_VOLUME 0x0008 +#define CAB_ATTRIB_DIRECTORY 0x0010 +#define CAB_ATTRIB_ARCHIVE 0x0020 +#define CAB_ATTRIB_EXECUTE 0x0040 +#define CAB_ATTRIB_UTF_NAME 0x0080 + +#define CAB_FILE_MAX_FOLDER 0xFFFC +#define CAB_FILE_CONTINUED 0xFFFD +#define CAB_FILE_SPLIT 0xFFFE +#define CAB_FILE_PREV_NEXT 0xFFFF + + +/* Cabinet structures */ + +typedef struct _CFHEADER +{ + ULONG Signature; // File signature 'MSCF' (CAB_SIGNATURE) + ULONG Reserved1; // Reserved field + ULONG CabinetSize; // Cabinet file size + ULONG Reserved2; // Reserved field + ULONG FileTableOffset; // Offset of first CFFILE + ULONG Reserved3; // Reserved field + USHORT Version; // Cabinet version (CAB_VERSION) + USHORT FolderCount; // Number of folders + USHORT FileCount; // Number of files + USHORT Flags; // Cabinet flags (CAB_FLAG_*) + USHORT SetID; // Cabinet set id + USHORT CabinetNumber; // Zero-based cabinet number +/* Optional fields (depends on Flags) + USHORT CabinetResSize // Per-cabinet reserved area size + char FolderResSize // Per-folder reserved area size + char FileResSize // Per-file reserved area size + char CabinetReserved[] // Per-cabinet reserved area + char CabinetPrev[] // Name of previous cabinet file + char DiskPrev[] // Name of previous disk + char CabinetNext[] // Name of next cabinet file + char DiskNext[] // Name of next disk + */ +} CFHEADER, *PCFHEADER; + + +typedef struct _CFFOLDER +{ + ULONG DataOffset; // Absolute offset of first CFDATA block in this folder + USHORT DataBlockCount; // Number of CFDATA blocks in this folder in this cabinet + USHORT CompressionType; // Type of compression used for all CFDATA blocks in this folder +/* Optional fields (depends on Flags) + char FolderReserved[] // Per-folder reserved area + */ +} CFFOLDER, *PCFFOLDER; + + +typedef struct _CFFILE +{ + ULONG FileSize; // Uncompressed file size in bytes + ULONG FileOffset; // Uncompressed offset of file in the folder + USHORT FileControlID; // File control ID (CAB_FILE_*) + USHORT FileDate; // File date stamp, as used by DOS + USHORT FileTime; // File time stamp, as used by DOS + USHORT Attributes; // File attributes (CAB_ATTRIB_*) + /* After this is the NULL terminated filename */ +} CFFILE, *PCFFILE; + + +typedef struct _CFDATA +{ + ULONG Checksum; // Checksum of CFDATA entry + USHORT CompSize; // Number of compressed bytes in this block + USHORT UncompSize; // Number of uncompressed bytes in this block +/* Optional fields (depends on Flags) + char DataReserved[] // Per-datablock reserved area + */ +} CFDATA, *PCFDATA; + +typedef struct _CFDATA_NODE +{ + struct _CFDATA_NODE *Next; + struct _CFDATA_NODE *Prev; + ULONG ScratchFilePosition; // Absolute offset in scratch file + ULONG AbsoluteOffset; // Absolute offset in cabinet + ULONG UncompOffset; // Uncompressed offset in folder + CFDATA Data; +} CFDATA_NODE, *PCFDATA_NODE; + +typedef struct _CFFOLDER_NODE +{ + struct _CFFOLDER_NODE *Next; + struct _CFFOLDER_NODE *Prev; + ULONG UncompOffset; // File size accumulator + ULONG AbsoluteOffset; + ULONG TotalFolderSize; // Total size of folder in current disk + PCFDATA_NODE DataListHead; + PCFDATA_NODE DataListTail; + ULONG Index; + bool Commit; // true if the folder should be committed + bool Delete; // true if marked for deletion + CFFOLDER Folder; +} CFFOLDER_NODE, *PCFFOLDER_NODE; + +typedef struct _CFFILE_NODE +{ + struct _CFFILE_NODE *Next; + struct _CFFILE_NODE *Prev; + CFFILE File; + char* FileName; + PCFDATA_NODE DataBlock; // First data block of file. NULL if not known + bool Commit; // true if the file data should be committed + bool Delete; // true if marked for deletion + PCFFOLDER_NODE FolderNode; // Folder this file belong to +} CFFILE_NODE, *PCFFILE_NODE; + +typedef struct _SEARCH_CRITERIA +{ + struct _SEARCH_CRITERIA *Next; // Pointer to next search criteria + struct _SEARCH_CRITERIA *Prev; // Pointer to previous search criteria + char* Search; // The actual search criteria +} SEARCH_CRITERIA, *PSEARCH_CRITERIA; + +typedef struct _CAB_SEARCH +{ + PCFFILE_NODE Next; // Pointer to next node + PCFFILE File; // Pointer to current CFFILE + char* FileName; // Current filename +} CAB_SEARCH, *PCAB_SEARCH; + + +/* Constants */ + +/* Status codes */ +#define CAB_STATUS_SUCCESS 0x00000000 +#define CAB_STATUS_FAILURE 0x00000001 +#define CAB_STATUS_NOMEMORY 0x00000002 +#define CAB_STATUS_CANNOT_OPEN 0x00000003 +#define CAB_STATUS_CANNOT_CREATE 0x00000004 +#define CAB_STATUS_CANNOT_READ 0x00000005 +#define CAB_STATUS_CANNOT_WRITE 0x00000006 +#define CAB_STATUS_FILE_EXISTS 0x00000007 +#define CAB_STATUS_INVALID_CAB 0x00000008 +#define CAB_STATUS_NOFILE 0x00000009 +#define CAB_STATUS_UNSUPPCOMP 0x0000000A + + + +/* Codecs */ + +class CCABCodec { +public: + /* Default constructor */ + CCABCodec() {}; + /* Default destructor */ + virtual ~CCABCodec() {}; + /* Compresses a data block */ + virtual ULONG Compress(void* OutputBuffer, + void* InputBuffer, + ULONG InputLength, + PULONG OutputLength) = 0; + /* Uncompresses a data block */ + virtual ULONG Uncompress(void* OutputBuffer, + void* InputBuffer, + ULONG InputLength, + PULONG OutputLength) = 0; +}; + + +/* Codec status codes */ +#define CS_SUCCESS 0x0000 /* All data consumed */ +#define CS_NOMEMORY 0x0001 /* Not enough free memory */ +#define CS_BADSTREAM 0x0002 /* Bad data stream */ + + +/* Codec indentifiers */ +#define CAB_CODEC_RAW 0x00 +#define CAB_CODEC_LZX 0x01 +#define CAB_CODEC_MSZIP 0x02 + + + +/* Classes */ + +#ifndef CAB_READ_ONLY + +class CCFDATAStorage { +public: + /* Default constructor */ + CCFDATAStorage(); + /* Default destructor */ + virtual ~CCFDATAStorage(); + ULONG Create(const char* FileName); + ULONG Destroy(); + ULONG Truncate(); + ULONG Position(); + ULONG Seek(LONG Position); + ULONG ReadBlock(PCFDATA Data, void* Buffer, PULONG BytesRead); + ULONG WriteBlock(PCFDATA Data, void* Buffer, PULONG BytesWritten); +private: + char FullName[MAX_PATH]; + bool FileCreated; + FILEHANDLE FileHandle; +}; + +#endif /* CAB_READ_ONLY */ + +class CCabinet { +public: + /* Default constructor */ + CCabinet(); + /* Default destructor */ + virtual ~CCabinet(); + /* Determines if a character is a separator */ + bool IsSeparator(char Char); + /* Replaces \ or / with the one used be the host environment */ + char* ConvertPath(char* Path, bool Allocate); + /* Returns a pointer to the filename part of a fully qualified filename */ + char* GetFileName(char* Path); + /* Removes a filename from a fully qualified filename */ + void RemoveFileName(char* Path); + /* Normalizes a path */ + bool NormalizePath(char* Path, ULONG Length); + /* Returns name of cabinet file */ + char* GetCabinetName(); + /* Sets the name of the cabinet file */ + void SetCabinetName(char* FileName); + /* Sets destination path for extracted files */ + void SetDestinationPath(char* DestinationPath); + /* Sets cabinet reserved file */ + bool SetCabinetReservedFile(char* FileName); + /* Returns cabinet reserved file */ + char* GetCabinetReservedFile(); + /* Returns destination path */ + char* GetDestinationPath(); + /* Returns zero-based current disk number */ + ULONG GetCurrentDiskNumber(); + /* Opens the current cabinet file */ + ULONG Open(); + /* Closes the current open cabinet file */ + void Close(); + /* Locates the first file in the current cabinet file that matches a search criteria */ + ULONG FindFirst(PCAB_SEARCH Search); + /* Locates the next file in the current cabinet file */ + ULONG FindNext(PCAB_SEARCH Search); + /* Extracts a file from the current cabinet file */ + ULONG ExtractFile(char* FileName); + /* Select codec engine to use */ + void SelectCodec(LONG Id); + /* Returns whether a codec engine is selected */ + bool IsCodecSelected(); + /* Adds a search criteria for adding files to a simple cabinet, displaying files in a cabinet or extracting them */ + ULONG AddSearchCriteria(char* SearchCriteria); + /* Destroys the search criteria list */ + void DestroySearchCriteria(); + /* Returns whether we have search criteria */ + bool HasSearchCriteria(); + +#ifndef CAB_READ_ONLY + /* Creates a simple cabinet based on the search criteria data */ + bool CreateSimpleCabinet(); + /* Sets the codec to use for compression (based on a string value) */ + bool SetCompressionCodec(char* CodecName); + /* Creates a new cabinet file */ + ULONG NewCabinet(); + /* Forces a new disk to be created */ + ULONG NewDisk(); + /* Forces a new folder to be created */ + ULONG NewFolder(); + /* Writes a file to scratch storage */ + ULONG WriteFileToScratchStorage(PCFFILE_NODE FileNode); + /* Forces the current disk to be written */ + ULONG WriteDisk(ULONG MoreDisks); + /* Commits the current disk */ + ULONG CommitDisk(ULONG MoreDisks); + /* Closes the current disk */ + ULONG CloseDisk(); + /* Closes the current cabinet */ + ULONG CloseCabinet(); + /* Adds a file to the current disk */ + ULONG AddFile(char* FileName); + /* Sets the maximum size of the current disk */ + void SetMaxDiskSize(ULONG Size); +#endif /* CAB_READ_ONLY */ + + /* Default event handlers */ + + /* Handler called when a file is about to be overridden */ + virtual bool OnOverwrite(PCFFILE Entry, char* FileName); + /* Handler called when a file is about to be extracted */ + virtual void OnExtract(PCFFILE Entry, char* FileName); + /* Handler called when a new disk is to be processed */ + virtual void OnDiskChange(char* CabinetName, char* DiskLabel); +#ifndef CAB_READ_ONLY + /* Handler called when a file is about to be added */ + virtual void OnAdd(PCFFILE Entry, char* FileName); + /* Handler called when a cabinet need a name */ + virtual bool OnCabinetName(ULONG Number, char* Name); + /* Handler called when a disk needs a label */ + virtual bool OnDiskLabel(ULONG Number, char* Label); +#endif /* CAB_READ_ONLY */ +private: + PCFFOLDER_NODE LocateFolderNode(ULONG Index); + ULONG GetAbsoluteOffset(PCFFILE_NODE File); + ULONG LocateFile(char* FileName, PCFFILE_NODE *File); + ULONG ReadString(char* String, LONG MaxLength); + ULONG ReadFileTable(); + ULONG ReadDataBlocks(PCFFOLDER_NODE FolderNode); + PCFFOLDER_NODE NewFolderNode(); + PCFFILE_NODE NewFileNode(); + PCFDATA_NODE NewDataNode(PCFFOLDER_NODE FolderNode); + void DestroyDataNodes(PCFFOLDER_NODE FolderNode); + void DestroyFileNodes(); + void DestroyDeletedFileNodes(); + void DestroyFolderNodes(); + void DestroyDeletedFolderNodes(); + ULONG ComputeChecksum(void* Buffer, ULONG Size, ULONG Seed); + ULONG ReadBlock(void* Buffer, ULONG Size, PULONG BytesRead); + bool MatchFileNamePattern(char* FileName, char* Pattern); +#ifndef CAB_READ_ONLY + ULONG InitCabinetHeader(); + ULONG WriteCabinetHeader(bool MoreDisks); + ULONG WriteFolderEntries(); + ULONG WriteFileEntries(); + ULONG CommitDataBlocks(PCFFOLDER_NODE FolderNode); + ULONG WriteDataBlock(); + ULONG GetAttributesOnFile(PCFFILE_NODE File); + ULONG SetAttributesOnFile(char* FileName, USHORT FileAttributes); + ULONG GetFileTimes(FILEHANDLE FileHandle, PCFFILE_NODE File); +#if !defined(_WIN32) + void ConvertDateAndTime(time_t* Time, PUSHORT DosDate, PUSHORT DosTime); +#endif +#endif /* CAB_READ_ONLY */ + ULONG CurrentDiskNumber; // Zero based disk number + char CabinetName[256]; // Filename of current cabinet + char CabinetPrev[256]; // Filename of previous cabinet + char DiskPrev[256]; // Label of cabinet in file CabinetPrev + char CabinetNext[256]; // Filename of next cabinet + char DiskNext[256]; // Label of cabinet in file CabinetNext + ULONG TotalHeaderSize; // Size of header and optional fields + ULONG NextFieldsSize; // Size of next cabinet name and next disk label + ULONG TotalFolderSize; // Size of all folder entries + ULONG TotalFileSize; // Size of all file entries + ULONG FolderUncompSize; // Uncompressed size of folder + ULONG BytesLeftInBlock; // Number of bytes left in current block + bool ReuseBlock; + char DestPath[MAX_PATH]; + char CabinetReservedFile[MAX_PATH]; + void* CabinetReservedFileBuffer; + ULONG CabinetReservedFileSize; + FILEHANDLE FileHandle; + bool FileOpen; + CFHEADER CABHeader; + ULONG CabinetReserved; + ULONG FolderReserved; + ULONG DataReserved; + PCFFOLDER_NODE FolderListHead; + PCFFOLDER_NODE FolderListTail; + PCFFOLDER_NODE CurrentFolderNode; + PCFDATA_NODE CurrentDataNode; + PCFFILE_NODE FileListHead; + PCFFILE_NODE FileListTail; + PSEARCH_CRITERIA CriteriaListHead; + PSEARCH_CRITERIA CriteriaListTail; + CCABCodec *Codec; + LONG CodecId; + bool CodecSelected; + void* InputBuffer; + void* CurrentIBuffer; // Current offset in input buffer + ULONG CurrentIBufferSize; // Bytes left in input buffer + void* OutputBuffer; + ULONG TotalCompSize; // Total size of current CFDATA block + void* CurrentOBuffer; // Current offset in output buffer + ULONG CurrentOBufferSize; // Bytes left in output buffer + ULONG BytesLeftInCabinet; + bool RestartSearch; + ULONG LastFileOffset; // Uncompressed offset of last extracted file +#ifndef CAB_READ_ONLY + ULONG LastBlockStart; // Uncompressed offset of last block in folder + ULONG MaxDiskSize; + ULONG DiskSize; + ULONG PrevCabinetNumber; // Previous cabinet number (where split file starts) + bool CreateNewDisk; + bool CreateNewFolder; + + CCFDATAStorage *ScratchFile; + FILEHANDLE SourceFile; + bool ContinueFile; + ULONG TotalBytesLeft; + bool BlockIsSplit; // true if current data block is split + ULONG NextFolderNumber; // Zero based folder number +#endif /* CAB_READ_ONLY */ +}; + +/* EOF */ diff --git a/tools/cabman/dfp.cxx b/tools/cabman/dfp.cxx new file mode 100644 index 00000000000..72e14fdcd85 --- /dev/null +++ b/tools/cabman/dfp.cxx @@ -0,0 +1,1395 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS cabinet manager + * FILE: tools/cabman/dfp.cpp + * PURPOSE: Directive file parser + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) + * Colin Finck + * NOTES: The directive file format is similar to the + * directive file format used by Microsoft's MAKECAB + * REVISIONS: + * CSH 21/03-2001 Created + * CSH 15/08-2003 Made it portable + * CF 04/05-2007 Made it compatible with 64-bit operating systems + */ +#include +#include +#include "cabinet.h" +#include "dfp.h" + + +#if defined(_WIN32) +#define GetSizeOfFile(handle) _GetSizeOfFile(handle) +static LONG _GetSizeOfFile(FILEHANDLE handle) +{ + ULONG size = GetFileSize(handle, NULL); + if (size == INVALID_FILE_SIZE) + return -1; + + return size; +} +#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread) +static BOOL _ReadFileData(FILEHANDLE handle, void* buffer, ULONG size, PULONG bytesread) +{ + return ReadFile(handle, buffer, size, (LPDWORD)bytesread, NULL); +} +#else +#define GetSizeOfFile(handle) _GetSizeOfFile(handle) +static LONG _GetSizeOfFile(FILEHANDLE handle) +{ + LONG size; + fseek(handle, 0, SEEK_END); + size = ftell(handle); + fseek(handle, 0, SEEK_SET); + return size; +} +#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread) +static bool _ReadFileData(FILEHANDLE handle, void* buffer, ULONG size, PULONG bytesread) +{ + *bytesread = fread(buffer, 1, size, handle); + return *bytesread == size; +} +#endif + +/* CDFParser */ + +CDFParser::CDFParser() +/* + * FUNCTION: Default constructor + */ +{ + InfFileOnly = false; + DontGenerateInf = false; + + FileBuffer = NULL; + FileLoaded = false; + CurrentOffset = 0; + CurrentLine = 0; + CabinetCreated = false; + DiskCreated = false; + FolderCreated = false; + CabinetName = NULL; + DiskLabel = NULL; + MaxDiskSize = NULL; + + MaxDiskSizeAllSet = false; + CabinetNameTemplateSet = false; + DiskLabelTemplateSet = false; + InfFileNameSet = false; + + InfModeEnabled = false; + InfFileHandle = NULL; + + strcpy(FileRelativePath, ""); +} + +CDFParser::~CDFParser() +/* + * FUNCTION: Default destructor + */ +{ + PCABINET_NAME CNPrev; + PCABINET_NAME CNNext; + PDISK_NUMBER DNPrev; + PDISK_NUMBER DNNext; + + if (FileBuffer) + FreeMemory(FileBuffer); + CNNext = CabinetName; + while (CNNext != NULL) + { + CNPrev = CNNext->Next; + FreeMemory(CNNext); + CNNext = CNPrev; + } + CNNext = DiskLabel; + while (CNNext != NULL) + { + CNPrev = CNNext->Next; + FreeMemory(CNNext); + CNNext = CNPrev; + } + DNNext = MaxDiskSize; + while (DNNext != NULL) + { + DNPrev = DNNext->Next; + FreeMemory(DNNext); + DNNext = DNPrev; + } + + if (InfFileHandle != NULL) + CloseFile(InfFileHandle); +} + +void CDFParser::WriteInfLine(char* InfLine) +{ + char buf[MAX_PATH]; + char eolbuf[2]; + char* destpath; +#if defined(_WIN32) + ULONG BytesWritten; +#endif + + if (DontGenerateInf) + return; + + if (InfFileHandle == NULL) + { + if (!InfFileNameSet) + /* FIXME: Use cabinet name with extension .inf */ + return; + + destpath = GetDestinationPath(); + if (strlen(destpath) > 0) + { + strcpy(buf, destpath); + strcat(buf, InfFileName); + } + else + strcpy(buf, InfFileName); + + /* Create .inf file, overwrite if it already exists */ +#if defined(_WIN32) + InfFileHandle = CreateFile(buf, // Create this file + GENERIC_WRITE, // Open for writing + 0, // No sharing + NULL, // No security + CREATE_ALWAYS, // Create or overwrite + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (InfFileHandle == INVALID_HANDLE_VALUE) + { + DPRINT(MID_TRACE, ("Error creating '%u'.\n", (UINT)GetLastError())); + return; + } +#else /* !_WIN32 */ + InfFileHandle = fopen(buf, "wb"); + if (InfFileHandle == NULL) + { + DPRINT(MID_TRACE, ("Error creating '%i'.\n", errno)); + return; + } +#endif + } + +#if defined(_WIN32) + if (!WriteFile(InfFileHandle, InfLine, (DWORD)strlen(InfLine), (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MID_TRACE, ("ERROR WRITING '%u'.\n", (UINT)GetLastError())); + return; + } +#else + if (fwrite(InfLine, strlen(InfLine), 1, InfFileHandle) < 1) + return; +#endif + + eolbuf[0] = 0x0d; + eolbuf[1] = 0x0a; + +#if defined(_WIN32) + if (!WriteFile(InfFileHandle, eolbuf, sizeof(eolbuf), (LPDWORD)&BytesWritten, NULL)) + { + DPRINT(MID_TRACE, ("ERROR WRITING '%u'.\n", (UINT)GetLastError())); + return; + } +#else + if (fwrite(eolbuf, 1, sizeof(eolbuf), InfFileHandle) < 1) + return; +#endif +} + + +ULONG CDFParser::Load(char* FileName) +/* + * FUNCTION: Loads a directive file into memory + * ARGUMENTS: + * FileName = Pointer to name of directive file + * RETURNS: + * Status of operation + */ +{ + ULONG BytesRead; + LONG FileSize; + + if (FileLoaded) + return CAB_STATUS_SUCCESS; + + /* Create cabinet file, overwrite if it already exists */ +#if defined(_WIN32) + FileHandle = CreateFile(FileName, // Create this file + GENERIC_READ, // Open for reading + 0, // No sharing + NULL, // No security + OPEN_EXISTING, // Open the file + FILE_ATTRIBUTE_NORMAL, // Normal file + NULL); // No attribute template + if (FileHandle == INVALID_HANDLE_VALUE) + return CAB_STATUS_CANNOT_OPEN; +#else /* !_WIN32 */ + FileHandle = fopen(FileName, "rb"); + if (FileHandle == NULL) + return CAB_STATUS_CANNOT_OPEN; +#endif + + FileSize = GetSizeOfFile(FileHandle); + if (FileSize == -1) + { + CloseFile(FileHandle); + return CAB_STATUS_CANNOT_OPEN; + } + + FileBufferSize = (ULONG)FileSize; + + FileBuffer = (char*)AllocateMemory(FileBufferSize); + if (!FileBuffer) + { + CloseFile(FileHandle); + return CAB_STATUS_NOMEMORY; + } + + if (!ReadFileData(FileHandle, FileBuffer, FileBufferSize, &BytesRead)) + { + CloseFile(FileHandle); + FreeMemory(FileBuffer); + FileBuffer = NULL; + return CAB_STATUS_CANNOT_READ; + } + + CloseFile(FileHandle); + + FileLoaded = true; + + DPRINT(MAX_TRACE, ("File (%u bytes)\n", (UINT)FileBufferSize)); + + return CAB_STATUS_SUCCESS; +} + + +ULONG CDFParser::Parse() +/* + * FUNCTION: Parses a loaded directive file + * RETURNS: + * Status of operation + */ +{ + bool Command; + ULONG Status; + + if (!FileLoaded) + return CAB_STATUS_NOFILE; + + while (ReadLine()) + { + Command = false; + + if (InfModeEnabled) + { + bool WriteLine = true; + while (CurrentToken != TokenEnd) + { + switch (CurrentToken) + { + case TokenIdentifier: + if (Command) + { + /* Command */ + Status = PerformCommand(); + if (Status == CAB_STATUS_FAILURE) + WriteLine = true; + else + if (!InfModeEnabled) + WriteLine = false; + + CurrentToken = TokenEnd; + continue; + } + else + { + WriteLine = true; + CurrentToken = TokenEnd; + continue; + } + break; + + case TokenSpace: + break; + + case TokenPeriod: + Command = true; + break; + + default: + WriteLine = true; + CurrentToken = TokenEnd; + continue; + } + NextToken(); + } + if (WriteLine) + WriteInfLine(Line); + } + else + { + while (CurrentToken != TokenEnd) + { + switch (CurrentToken) + { + case TokenInteger: + sprintf(CurrentString, "%u", (UINT)CurrentInteger); + case TokenIdentifier: + case TokenString: + if (Command) + { + /* Command */ + Status = PerformCommand(); + + if (Status == CAB_STATUS_FAILURE) + { + printf("Directive file contains errors at line %u.\n", (UINT)CurrentLine); + DPRINT(MID_TRACE, ("Error while executing command.\n")); + } + + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + else + { + /* File copy */ + Status = PerformFileCopy(); + + if (Status != CAB_STATUS_SUCCESS) + { + printf("Directive file contains errors at line %u.\n", (UINT)CurrentLine); + DPRINT(MID_TRACE, ("Error while copying file.\n")); + } + + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + break; + + case TokenSpace: + break; + + case TokenSemi: + CurrentToken = TokenEnd; + continue; + + case TokenPeriod: + Command = true; + break; + + default: + printf("Directive file contains errors at line %u.\n", (UINT)CurrentLine); + DPRINT(MID_TRACE, ("Token is (%u).\n", (UINT)CurrentToken)); + return CAB_STATUS_SUCCESS; + } + NextToken(); + } + } + } + + if (!InfFileOnly) + { + printf("\nWriting cabinet. This may take a while...\n\n"); + + if (DiskCreated) + { + Status = WriteDisk(false); + if (Status == CAB_STATUS_SUCCESS) + Status = CloseDisk(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot write disk (%u).\n", (UINT)Status)); + return Status; + } + } + + if (CabinetCreated) + { + Status = CloseCabinet(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot close cabinet (%u).\n", (UINT)Status)); + return Status; + } + } + + printf("\nDone.\n"); + } + + return CAB_STATUS_SUCCESS; +} + + +void CDFParser::SetFileRelativePath(char* Path) +/* + * FUNCTION: Sets path where files in the .dff is assumed relative to + * ARGUMENTS: + * Path = Pointer to string with path + */ +{ + strcpy(FileRelativePath, Path); + ConvertPath(FileRelativePath, false); + if (strlen(FileRelativePath) > 0) + NormalizePath(FileRelativePath, MAX_PATH); +} + + +bool CDFParser::OnDiskLabel(ULONG Number, char* Label) +/* + * FUNCTION: Called when a disk needs a label + * ARGUMENTS: + * Number = Cabinet number that needs a label + * Label = Pointer to buffer to place label of disk + * RETURNS: + * true if a disk label was returned, false if not + */ +{ + char Buffer[20]; + ULONG i; + int j; + char ch; + + Number += 1; + + DPRINT(MID_TRACE, ("Giving disk (%u) a label...\n", (UINT)Number)); + + if (GetDiskName(&DiskLabel, Number, Label)) + return true; + + if (DiskLabelTemplateSet) + { + j = 0; + strcpy(Label, ""); + for (i = 0; i < strlen(DiskLabelTemplate); i++) + { + ch = DiskLabelTemplate[i]; + if (ch == '*') + { + sprintf(Buffer, "%u", (UINT)Number); + strcat(Label, Buffer); + j += (LONG)strlen(Buffer); + } + else + { + Label[j] = ch; + j++; + } + Label[j] = '\0'; + } + + DPRINT(MID_TRACE, ("Giving disk (%s) as a label...\n", Label)); + + return true; + } + else + return false; +} + + +bool CDFParser::OnCabinetName(ULONG Number, char* Name) +/* + * FUNCTION: Called when a cabinet needs a name + * ARGUMENTS: + * Number = Disk number that needs a name + * Name = Pointer to buffer to place name of cabinet + * RETURNS: + * true if a cabinet name was returned, false if not + */ +{ + char Buffer[MAX_PATH]; + ULONG i; + int j; + char ch; + + Number += 1; + + DPRINT(MID_TRACE, ("Giving cabinet (%u) a name...\n", (UINT)Number)); + + if (GetDiskName(&CabinetName, Number, Buffer)) + { + strcpy(Name, GetDestinationPath()); + strcat(Name, Buffer); + return true; + } + + if (CabinetNameTemplateSet) + { + strcpy(Name, GetDestinationPath()); + j = (LONG)strlen(Name); + for (i = 0; i < strlen(CabinetNameTemplate); i++) + { + ch = CabinetNameTemplate[i]; + if (ch == '*') + { + sprintf(Buffer, "%u", (UINT)Number); + strcat(Name, Buffer); + j += (LONG)strlen(Buffer); + } + else + { + Name[j] = ch; + j++; + } + Name[j] = '\0'; + } + + DPRINT(MID_TRACE, ("Giving cabinet (%s) as a name...\n", Name)); + return true; + } + else + return false; +} + + +bool CDFParser::SetDiskName(PCABINET_NAME *List, ULONG Number, char* String) +/* + * FUNCTION: Sets an entry in a list + * ARGUMENTS: + * List = Address of pointer to list + * Number = Disk number + * String = Pointer to string + * RETURNS: + * false if there was not enough free memory available + */ +{ + PCABINET_NAME CN; + + CN = *List; + while (CN != NULL) + { + if (CN->DiskNumber == Number) + { + strcpy(CN->Name, String); + return true; + } + CN = CN->Next; + } + + CN = (PCABINET_NAME)AllocateMemory(sizeof(CABINET_NAME)); + if (!CN) + return false; + + CN->DiskNumber = Number; + strcpy(CN->Name, String); + + CN->Next = *List; + *List = CN; + + return true; +} + + +bool CDFParser::GetDiskName(PCABINET_NAME *List, ULONG Number, char* String) +/* + * FUNCTION: Returns an entry in a list + * ARGUMENTS: + * List = Address of pointer to list + * Number = Disk number + * String = Address of buffer to copy string to + * RETURNS: + * false if there was not enough free memory available + */ +{ + PCABINET_NAME CN; + + CN = *List; + while (CN != NULL) + { + if (CN->DiskNumber == Number) + { + strcpy(String, CN->Name); + return true; + } + CN = CN->Next; + } + + return false; +} + + +bool CDFParser::SetDiskNumber(PDISK_NUMBER *List, ULONG Number, ULONG Value) +/* + * FUNCTION: Sets an entry in a list + * ARGUMENTS: + * List = Address of pointer to list + * Number = Disk number + * Value = Value to set + * RETURNS: + * false if there was not enough free memory available + */ +{ + PDISK_NUMBER DN; + + DN = *List; + while (DN != NULL) + { + if (DN->DiskNumber == Number) + { + DN->Number = Value; + return true; + } + DN = DN->Next; + } + + DN = (PDISK_NUMBER)AllocateMemory(sizeof(DISK_NUMBER)); + if (!DN) + return false; + + DN->DiskNumber = Number; + DN->Number = Value; + + DN->Next = *List; + *List = DN; + + return true; +} + + +bool CDFParser::GetDiskNumber(PDISK_NUMBER *List, ULONG Number, PULONG Value) +/* + * FUNCTION: Returns an entry in a list + * ARGUMENTS: + * List = Address of pointer to list + * Number = Disk number + * Value = Address of buffer to place value + * RETURNS: + * true if the entry was found + */ +{ + PDISK_NUMBER DN; + + DN = *List; + while (DN != NULL) + { + if (DN->DiskNumber == Number) + { + *Value = DN->Number; + return true; + } + DN = DN->Next; + } + + return false; +} + + +bool CDFParser::DoDiskLabel(ULONG Number, char* Label) +/* + * FUNCTION: Sets the label of a disk + * ARGUMENTS: + * Number = Disk number + * Label = Pointer to label of disk + * RETURNS: + * false if there was not enough free memory available + */ +{ + DPRINT(MID_TRACE, ("Setting label of disk (%u) to '%s'\n", (UINT)Number, Label)); + + return SetDiskName(&DiskLabel, Number, Label); +} + + +void CDFParser::DoDiskLabelTemplate(char* Template) +/* + * FUNCTION: Sets a disk label template to use + * ARGUMENTS: + * Template = Pointer to disk label template + */ +{ + DPRINT(MID_TRACE, ("Setting disk label template to '%s'\n", Template)); + + strcpy(DiskLabelTemplate, Template); + DiskLabelTemplateSet = true; +} + + +bool CDFParser::DoCabinetName(ULONG Number, char* Name) +/* + * FUNCTION: Sets the name of a cabinet + * ARGUMENTS: + * Number = Disk number + * Name = Pointer to name of cabinet + * RETURNS: + * false if there was not enough free memory available + */ +{ + DPRINT(MID_TRACE, ("Setting name of cabinet (%u) to '%s'\n", (UINT)Number, Name)); + + return SetDiskName(&CabinetName, Number, Name); +} + + +void CDFParser::DoCabinetNameTemplate(char* Template) +/* + * FUNCTION: Sets a cabinet name template to use + * ARGUMENTS: + * Template = Pointer to cabinet name template + */ +{ + DPRINT(MID_TRACE, ("Setting cabinet name template to '%s'\n", Template)); + + strcpy(CabinetNameTemplate, Template); + CabinetNameTemplateSet = true; +} + + +ULONG CDFParser::DoMaxDiskSize(bool NumberValid, ULONG Number) +/* + * FUNCTION: Sets the maximum disk size + * ARGUMENTS: + * NumberValid = true if disk number is valid + * Number = Disk number + * RETURNS: + * Status of operation + * NOTES: + * Standard sizes are 2.88M, 1.44M, 1.25M, 1.2M, 720K, 360K, and CDROM + */ +{ + ULONG A, B, Value; + + if (IsNextToken(TokenInteger, true)) + { + A = CurrentInteger; + + if (IsNextToken(TokenPeriod, false)) + { + if (!IsNextToken(TokenInteger, false)) + return CAB_STATUS_FAILURE; + + B = CurrentInteger; + + } + else + B = 0; + + if (CurrentToken == TokenIdentifier) + { + switch (CurrentString[0]) + { + case 'K': + if (B != 0) + return CAB_STATUS_FAILURE; + + if (A == 720) + /* 720K disk */ + Value = 730112; + else if (A == 360) + /* 360K disk */ + Value = 362496; + else + return CAB_STATUS_FAILURE; + break; + + case 'M': + if (A == 1) + { + if (B == 44) + /* 1.44M disk */ + Value = 1457664; + else if (B == 25) + /* 1.25M disk */ + Value = 1300000; // FIXME: Value? + else if (B == 2) + /* 1.2M disk */ + Value = 1213952; + else + return CAB_STATUS_FAILURE; + } + else if (A == 2) + { + if (B == 88) + /* 2.88M disk */ + Value = 2915328; + else + return CAB_STATUS_FAILURE; + } + else + return CAB_STATUS_FAILURE; + break; + + default: + DPRINT(MID_TRACE, ("Bad suffix (%c)\n", CurrentString[0])); + return CAB_STATUS_FAILURE; + } + } + else + Value = A; + } + else + { + if ((CurrentToken != TokenString) && + (strcasecmp(CurrentString, "CDROM") != 0)) + return CAB_STATUS_FAILURE; + /* CDROM */ + Value = 640*1024*1024; // FIXME: Correct size for CDROM? + } + + if (NumberValid) + return (SetDiskNumber(&MaxDiskSize, Number, Value)? + CAB_STATUS_SUCCESS : CAB_STATUS_FAILURE); + + MaxDiskSizeAll = Value; + MaxDiskSizeAllSet = true; + + SetMaxDiskSize(Value); + + return CAB_STATUS_SUCCESS; +} + + +void CDFParser::DoInfFileName(char* FileName) +/* + * FUNCTION: Sets filename of the generated .inf file + * ARGUMENTS: + * FileName = Pointer to .inf filename + */ +{ + DPRINT(MID_TRACE, ("Setting .inf filename to '%s'\n", FileName)); + + strcpy(InfFileName, FileName); + InfFileNameSet = true; +} + +ULONG CDFParser::SetupNewDisk() +/* + * FUNCTION: Sets up parameters for a new disk + * RETURNS: + * Status of operation + */ +{ + ULONG Value; + + if (!GetDiskNumber(&MaxDiskSize, GetCurrentDiskNumber(), &Value)) + { + if (MaxDiskSizeAllSet) + Value = MaxDiskSizeAll; + else + Value = 0; + } + SetMaxDiskSize(Value); + + return CAB_STATUS_SUCCESS; +} + + +ULONG CDFParser::PerformSetCommand() +/* + * FUNCTION: Performs a set variable command + * RETURNS: + * Status of operation + */ +{ + SETTYPE SetType; + bool NumberValid = false; + ULONG Number = 0; + + if (!IsNextToken(TokenIdentifier, true)) + return CAB_STATUS_FAILURE; + + if (strcasecmp(CurrentString, "DiskLabel") == 0) + SetType = stDiskLabel; + else if (strcasecmp(CurrentString, "DiskLabelTemplate") == 0) + SetType = stDiskLabelTemplate; + else if (strcasecmp(CurrentString, "CabinetName") == 0) + SetType = stCabinetName; + else if (strcasecmp(CurrentString, "CabinetNameTemplate") == 0) + SetType = stCabinetNameTemplate; + else if (strcasecmp(CurrentString, "MaxDiskSize") == 0) + SetType = stMaxDiskSize; + else if (strcasecmp(CurrentString, "InfFileName") == 0) + SetType = stInfFileName; + else + return CAB_STATUS_FAILURE; + + if ((SetType == stDiskLabel) || (SetType == stCabinetName)) + { + if (!IsNextToken(TokenInteger, false)) + return CAB_STATUS_FAILURE; + Number = CurrentInteger; + + if (!IsNextToken(TokenEqual, true)) + return CAB_STATUS_FAILURE; + } + else if (SetType == stMaxDiskSize) + { + if (IsNextToken(TokenInteger, false)) + { + NumberValid = true; + Number = CurrentInteger; + } + else + { + NumberValid = false; + while (CurrentToken == TokenSpace) + NextToken(); + if (CurrentToken != TokenEqual) + return CAB_STATUS_FAILURE; + } + } + else if (!IsNextToken(TokenEqual, true)) + return CAB_STATUS_FAILURE; + + if (SetType != stMaxDiskSize) + { + if (!IsNextToken(TokenString, true)) + return CAB_STATUS_FAILURE; + } + + switch (SetType) + { + case stDiskLabel: + if (!DoDiskLabel(Number, CurrentString)) + DPRINT(MIN_TRACE, ("Not enough available free memory.\n")); + return CAB_STATUS_SUCCESS; + + case stCabinetName: + if (!DoCabinetName(Number, CurrentString)) + DPRINT(MIN_TRACE, ("Not enough available free memory.\n")); + return CAB_STATUS_SUCCESS; + + case stDiskLabelTemplate: + DoDiskLabelTemplate(CurrentString); + return CAB_STATUS_SUCCESS; + + case stCabinetNameTemplate: + DoCabinetNameTemplate(CurrentString); + return CAB_STATUS_SUCCESS; + + case stMaxDiskSize: + return DoMaxDiskSize(NumberValid, Number); + + case stInfFileName: + DoInfFileName(CurrentString); + return CAB_STATUS_SUCCESS; + + default: + return CAB_STATUS_FAILURE; + } +} + + +ULONG CDFParser::PerformNewCommand() +/* + * FUNCTION: Performs a new disk|cabinet|folder command + * RETURNS: + * Status of operation + */ +{ + NEWTYPE NewType; + ULONG Status; + + if (!IsNextToken(TokenIdentifier, true)) + return CAB_STATUS_FAILURE; + + if (strcasecmp(CurrentString, "Disk") == 0) + NewType = ntDisk; + else if (strcasecmp(CurrentString, "Cabinet") == 0) + NewType = ntCabinet; + else if (strcasecmp(CurrentString, "Folder") == 0) + NewType = ntFolder; + else + return CAB_STATUS_FAILURE; + + switch (NewType) + { + case ntDisk: + if (DiskCreated) + { + Status = WriteDisk(true); + if (Status == CAB_STATUS_SUCCESS) + Status = CloseDisk(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot write disk (%u).\n", (UINT)Status)); + return CAB_STATUS_SUCCESS; + } + DiskCreated = false; + } + + Status = NewDisk(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot create disk (%u).\n", (UINT)Status)); + return CAB_STATUS_SUCCESS; + } + DiskCreated = true; + SetupNewDisk(); + return CAB_STATUS_SUCCESS; + + case ntCabinet: + if (DiskCreated) + { + Status = WriteDisk(true); + if (Status == CAB_STATUS_SUCCESS) + Status = CloseDisk(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot write disk (%u).\n", (UINT)Status)); + return CAB_STATUS_SUCCESS; + } + DiskCreated = false; + } + + Status = NewCabinet(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot create cabinet (%u).\n", (UINT)Status)); + return CAB_STATUS_SUCCESS; + } + DiskCreated = true; + SetupNewDisk(); + return CAB_STATUS_SUCCESS; + + case ntFolder: + Status = NewFolder(); + ASSERT(Status == CAB_STATUS_SUCCESS); + return CAB_STATUS_SUCCESS; + + default: + return CAB_STATUS_FAILURE; + } +} + + +ULONG CDFParser::PerformInfBeginCommand() +/* + * FUNCTION: Begins inf mode + * RETURNS: + * Status of operation + */ +{ + InfModeEnabled = true; + return CAB_STATUS_SUCCESS; +} + + +ULONG CDFParser::PerformInfEndCommand() +/* + * FUNCTION: Begins inf mode + * RETURNS: + * Status of operation + */ +{ + InfModeEnabled = false; + return CAB_STATUS_SUCCESS; +} + + +ULONG CDFParser::PerformCommand() +/* + * FUNCTION: Performs a command + * RETURNS: + * Status of operation + */ +{ + if (strcasecmp(CurrentString, "Set") == 0) + return PerformSetCommand(); + if (strcasecmp(CurrentString, "New") == 0) + return PerformNewCommand(); + if (strcasecmp(CurrentString, "InfBegin") == 0) + return PerformInfBeginCommand(); + if (strcasecmp(CurrentString, "InfEnd") == 0) + return PerformInfEndCommand(); + + return CAB_STATUS_FAILURE; +} + + +ULONG CDFParser::PerformFileCopy() +/* + * FUNCTION: Performs a file copy + * RETURNS: + * Status of operation + */ +{ + ULONG Status; + ULONG i, j; + char ch; + char SrcName[MAX_PATH]; + char DstName[MAX_PATH]; + char InfLine[MAX_PATH]; + char Options[128]; + char BaseFilename[MAX_PATH]; + + *SrcName = '\0'; + *DstName = '\0'; + *Options = '\0'; + + // source file + i = CurrentChar; + while ((i < LineLength) && + ((ch = Line[i]) != ' ') && + (ch != 0x09) && + (ch != ';')) + { + CurrentString[i] = ch; + i++; + } + CurrentString[i] = '\0'; + CurrentToken = TokenString; + CurrentChar = i + 1; + strcpy(BaseFilename, CurrentString); + strcat(SrcName, BaseFilename); + + // destination + SkipSpaces(); + + if (CurrentToken != TokenEnd) + { + j = (ULONG)strlen(CurrentString); i = 0; + while ((CurrentChar + i < LineLength) && + ((ch = Line[CurrentChar + i]) != ' ') && + (ch != 0x09) && + (ch != ';')) + { + CurrentString[j + i] = ch; + i++; + } + CurrentString[j + i] = '\0'; + CurrentToken = TokenString; + CurrentChar += i + 1; + strcpy(DstName, CurrentString); + } + + // options (it may be empty) + SkipSpaces (); + + if (CurrentToken != TokenEnd) + { + j = (ULONG)strlen(CurrentString); i = 0; + while ((CurrentChar + i < LineLength) && + ((ch = Line[CurrentChar + i]) != ' ') && + (ch != 0x09) && + (ch != ';')) + { + CurrentString[j + i] = ch; + i++; + } + CurrentString[j + i] = '\0'; + CurrentToken = TokenString; + CurrentChar += i + 1; + strcpy(Options, CurrentString); + } + + if (!CabinetCreated) + { + DPRINT(MID_TRACE, ("Creating cabinet.\n")); + + Status = NewCabinet(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot create cabinet (%u).\n", (UINT)Status)); + printf("Cannot create cabinet.\n"); + return CAB_STATUS_FAILURE; + } + CabinetCreated = true; + + DPRINT(MID_TRACE, ("Creating disk.\n")); + + Status = NewDisk(); + if (Status != CAB_STATUS_SUCCESS) + { + DPRINT(MIN_TRACE, ("Cannot create disk (%u).\n", (UINT)Status)); + printf("Cannot create disk.\n"); + return CAB_STATUS_FAILURE; + } + DiskCreated = true; + SetupNewDisk(); + } + + DPRINT(MID_TRACE, ("Adding file: '%s' destination: '%s'.\n", SrcName, DstName)); + + Status = AddFile(SrcName); + if (Status == CAB_STATUS_CANNOT_OPEN) + { + strcpy(SrcName, FileRelativePath); + strcat(SrcName, BaseFilename); + Status = AddFile(SrcName); + } + switch (Status) + { + case CAB_STATUS_SUCCESS: + sprintf(InfLine, "%s=%s", GetFileName(SrcName), DstName); + WriteInfLine(InfLine); + break; + + case CAB_STATUS_CANNOT_OPEN: + if (strstr(Options,"optional")) + { + Status = CAB_STATUS_SUCCESS; + printf("Optional file does not exist: %s.\n", SrcName); + } + else + printf("File does not exist: %s.\n", SrcName); + + break; + + case CAB_STATUS_NOMEMORY: + printf("Insufficient memory to add file: %s.\n", SrcName); + break; + + default: + printf("Cannot add file: %s (%u).\n", SrcName, (UINT)Status); + break; + } + return Status; +} + + +void CDFParser::SkipSpaces() +/* + * FUNCTION: Skips any spaces in the current line + */ +{ + NextToken(); + while (CurrentToken == TokenSpace) + NextToken(); +} + + +bool CDFParser::IsNextToken(DFP_TOKEN Token, bool NoSpaces) +/* + * FUNCTION: Checks if next token equals Token + * ARGUMENTS: + * Token = Token to compare with + * SkipSp = true if spaces should be skipped + * RETURNS: + * false if next token is diffrent from Token + */ +{ + if (NoSpaces) + SkipSpaces(); + else + NextToken(); + return (CurrentToken == Token); +} + + +bool CDFParser::ReadLine() +/* + * FUNCTION: Reads the next line into the line buffer + * RETURNS: + * true if there is a new line, false if not + */ +{ + ULONG i, j; + char ch; + + if (CurrentOffset >= FileBufferSize) + return false; + + i = 0; + while (((j = CurrentOffset + i) < FileBufferSize) && (i < 127) && + ((ch = FileBuffer[j]) != 0x0D && (ch = FileBuffer[j]) != 0x0A)) + { + Line[i] = ch; + i++; + } + + Line[i] = '\0'; + LineLength = i; + + if ((FileBuffer[CurrentOffset + i] == 0x0D) && (FileBuffer[CurrentOffset + i + 1] == 0x0A)) + CurrentOffset++; + + CurrentOffset += i + 1; + + CurrentChar = 0; + + CurrentLine++; + + NextToken(); + + return true; +} + + +void CDFParser::NextToken() +/* + * FUNCTION: Reads the next token from the current line + */ +{ + ULONG i; + char ch = ' '; + + if (CurrentChar >= LineLength) + { + CurrentToken = TokenEnd; + return; + } + + switch (Line[CurrentChar]) + { + case ' ': + case 0x09: + CurrentToken = TokenSpace; + break; + + case ';': + CurrentToken = TokenSemi; + break; + + case '=': + CurrentToken = TokenEqual; + break; + + case '.': + CurrentToken = TokenPeriod; + break; + + case '\\': + CurrentToken = TokenBackslash; + break; + + case '"': + i = 0; + while ((CurrentChar + i + 1 < LineLength) && + ((ch = Line[CurrentChar + i + 1]) != '"')) + { + CurrentString[i] = ch; + i++; + } + CurrentString[i] = '\0'; + CurrentToken = TokenString; + CurrentChar += i + 2; + return; + + default: + i = 0; + while ((CurrentChar + i < LineLength) && + ((ch = Line[CurrentChar + i]) >= '0') && (ch <= '9')) + { + CurrentString[i] = ch; + i++; + } + if (i > 0) + { + CurrentString[i] = '\0'; + CurrentInteger = atoi(CurrentString); + CurrentToken = TokenInteger; + CurrentChar += i; + return; + } + i = 0; + while (((CurrentChar + i < LineLength) && + (((ch = Line[CurrentChar + i]) >= 'a') && (ch <= 'z'))) || + ((ch >= 'A') && (ch <= 'Z')) || (ch == '_')) + { + CurrentString[i] = ch; + i++; + } + if (i > 0) + { + CurrentString[i] = '\0'; + CurrentToken = TokenIdentifier; + CurrentChar += i; + return; + } + CurrentToken = TokenEnd; + } + CurrentChar++; +} + +/* EOF */ diff --git a/tools/cdmake/cdmake.c b/tools/cdmake/cdmake.c new file mode 100644 index 00000000000..4f6ff6488b0 --- /dev/null +++ b/tools/cdmake/cdmake.c @@ -0,0 +1,1685 @@ +/* + * CD-ROM Maker + * by Philip J. Erdelsky + * pje@acm.org + * http://www.alumni.caltech.edu/~pje/ + * + * ElTorito-Support + * by Eric Kohl + * + * Linux port + * by Casper S. Hornstrup + * chorns@users.sourceforge.net + * + * Joliet support + * by Filip Navara + * xnavara@volny.cz + * Limitations: + * - No Joliet file name validations + * - Very bad ISO file name generation + * + * + * convert long filename to iso9660 file name by Magnus Olsen + * magnus@greatlord.com + * + * $Id$ + */ + +/* According to his website, this file was released into the public domain by Phillip J. Erdelsky */ + +#include +#include +#include +#include +#include +#include +#ifdef _WIN32 +# include +# include +#else +# if defined(__FreeBSD__) || defined(__APPLE__) +# include +# else +# include +# endif // __FreeBSD__ +# include +# include +# include +# include +#endif // _WIN32 +#include +#include +#include +#ifndef _WIN32 +#ifndef MAX_PATH +#define MAX_PATH 260 +#endif +#define DIR_SEPARATOR_CHAR '/' +#define DIR_SEPARATOR_STRING "/" +#else +#define DIR_SEPARATOR_CHAR '\\' +#define DIR_SEPARATOR_STRING "\\" +#endif + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; +typedef int BOOL; + +const BOOL TRUE = 1; +const BOOL FALSE = 0; + +// file system parameters + +#define MAX_LEVEL 8 +#define MAX_NAME_LENGTH 64 +#define MAX_CDNAME_LENGTH 8 +#define MAX_EXTENSION_LENGTH 10 +#define MAX_CDEXTENSION_LENGTH 3 +#define SECTOR_SIZE 2048 +#define BUFFER_SIZE (8 * SECTOR_SIZE) + +const BYTE HIDDEN_FLAG = 1; +const BYTE DIRECTORY_FLAG = 2; + + +struct cd_image +{ + FILE *file; + DWORD sector; // sector to receive next byte + int offset; // offset of next byte in sector + int count; // number of bytes in buffer + char filespecs[128]; + BYTE *buffer; +}; + +typedef struct date_and_time +{ + BYTE second; + BYTE minute; + BYTE hour; + BYTE day; + BYTE month; + WORD year; +} DATE_AND_TIME, *PDATE_AND_TIME; + +typedef struct directory_record +{ + struct directory_record *next_in_directory; + struct directory_record *next_in_path_table; /* directory record only */ + struct directory_record *next_in_memory; + struct directory_record *first_record; /* directory record only */ + struct directory_record *parent; + BYTE flags; + char name[MAX_NAME_LENGTH+1]; + char name_on_cd[MAX_CDNAME_LENGTH+1]; + char extension[MAX_EXTENSION_LENGTH+1]; + char extension_on_cd[MAX_CDEXTENSION_LENGTH+1]; + char *joliet_name; + DATE_AND_TIME date_and_time; + DWORD sector; + DWORD size; + DWORD joliet_sector; + DWORD joliet_size; + unsigned level; /* directory record only */ + WORD path_table_index; /* directory record only */ +} DIR_RECORD, *PDIR_RECORD; + + +typedef enum directory_record_type +{ + DOT_RECORD, + DOT_DOT_RECORD, + SUBDIRECTORY_RECORD, + FILE_RECORD +} DIR_RECORD_TYPE, *PDIR_RECORD_TYPE; + + +PDIR_RECORD sort_linked_list(PDIR_RECORD, + unsigned, int (*)(PDIR_RECORD, PDIR_RECORD)); + + +static char DIRECTORY_TIMESTAMP[] = "~Y$'KOR$.3K&"; + +static jmp_buf error; +static struct cd_image cd; + +char volume_label[32]; +DIR_RECORD root; +char source[512]; +char *end_source; +enum {QUIET, NORMAL, VERBOSE} verbosity; +BOOL show_progress; +DWORD size_limit; +BOOL accept_punctuation_marks; + +DWORD total_sectors; +DWORD path_table_size; +DWORD little_endian_path_table_sector; +DWORD big_endian_path_table_sector; +DWORD number_of_files; +DWORD bytes_in_files; +DWORD unused_bytes_at_ends_of_files; +DWORD number_of_directories; +DWORD bytes_in_directories; + +char bootimage[512]; +BOOL eltorito; +DWORD boot_catalog_sector; +DWORD boot_image_sector; +WORD boot_image_size; // counted in 512 byte sectors + +BOOL joliet; +DWORD joliet_path_table_size; +DWORD joliet_little_endian_path_table_sector; +DWORD joliet_big_endian_path_table_sector; + +/*----------------------------------------------------------------------------- +This function edits a 32-bit unsigned number into a comma-delimited form, such +as 4,294,967,295 for the largest possible number, and returns a pointer to a +static buffer containing the result. It suppresses leading zeros and commas, +but optionally pads the result with blanks at the left so the result is always +exactly 13 characters long (excluding the terminating zero). + +CAUTION: A statement containing more than one call on this function, such as +printf("%s, %s", edit_with_commas(a), edit_with_commas(b)), will produce +incorrect results because all calls use the same static bufffer. +-----------------------------------------------------------------------------*/ + +static char *edit_with_commas(DWORD x, BOOL pad) +{ + static char s[14]; + unsigned i = 13; + do + { + if (i % 4 == 2) s[--i] = ','; + s[--i] = (char)(x % 10 + '0'); + } while ((x/=10) != 0); + if (pad) + { + while (i > 0) s[--i] = ' '; + } + return s + i; +} + +/*----------------------------------------------------------------------------- +This function releases all allocated memory blocks. +-----------------------------------------------------------------------------*/ + +static void release_memory(void) +{ + while (root.next_in_memory != NULL) + { + struct directory_record *next = + root.next_in_memory->next_in_memory; + if (joliet) + free (root.joliet_name); + free (root.next_in_memory); + root.next_in_memory = next; + } + if (cd.buffer != NULL) + { + free (cd.buffer); + cd.buffer = NULL; + } +} + +/*----------------------------------------------------------------------------- +This function edits and displays an error message and then jumps back to the +error exit point in main(). +-----------------------------------------------------------------------------*/ + +void error_exit ( const char* fmt, ... ) +{ + va_list arg; + + va_start(arg, fmt); + vprintf(fmt, arg); + va_end(arg); + printf("\n"); + if (cd.file != NULL) + fclose(cd.file); + release_memory(); + exit(1); +} + +/*----------------------------------------------------------------------------- +This function, which is called only on the second pass, and only when the +buffer is not empty, flushes the buffer to the CD-ROM image. +-----------------------------------------------------------------------------*/ + +static void flush_buffer(void) +{ + if (fwrite(cd.buffer, cd.count, 1, cd.file) < 1) + error_exit("File write error"); + cd.count = 0; + if (show_progress) + { + printf("\r%s ", + edit_with_commas((total_sectors - cd.sector) * SECTOR_SIZE, TRUE)); + } +} + +/*----------------------------------------------------------------------------- +This function writes a single byte to the CD-ROM image. On the first pass (in +which cd.handle < 0), it does not actually write anything but merely updates +the file pointer as though the byte had been written. +-----------------------------------------------------------------------------*/ + +static void write_byte(BYTE x) +{ + if (cd.file != NULL) + { + cd.buffer[cd.count] = x; + if (++cd.count == BUFFER_SIZE) + flush_buffer(); + } + if (++cd.offset == SECTOR_SIZE) + { + cd.sector++; + cd.offset = 0; + } +} + +/*----------------------------------------------------------------------------- +These functions write a word or double word to the CD-ROM image with the +specified endianity. +-----------------------------------------------------------------------------*/ + +static void write_little_endian_word(WORD x) +{ + write_byte((BYTE)x); + write_byte((BYTE)(x >> 8)); +} + +static void write_big_endian_word(WORD x) +{ + write_byte((BYTE)(x >> 8)); + write_byte((BYTE)x); +} + +static void write_both_endian_word(WORD x) +{ + write_little_endian_word(x); + write_big_endian_word(x); +} + +static void write_little_endian_dword(DWORD x) +{ + write_byte((BYTE)x); + write_byte((BYTE)(x >> 8)); + write_byte((BYTE)(x >> 16)); + write_byte((BYTE)(x >> 24)); +} + +static void write_big_endian_dword(DWORD x) +{ + write_byte((BYTE)(x >> 24)); + write_byte((BYTE)(x >> 16)); + write_byte((BYTE)(x >> 8)); + write_byte((BYTE)x); +} + +static void write_both_endian_dword(DWORD x) +{ + write_little_endian_dword(x); + write_big_endian_dword(x); +} + +/*----------------------------------------------------------------------------- +This function writes enough zeros to fill out the end of a sector, and leaves +the file pointer at the beginning of the next sector. If the file pointer is +already at the beginning of a sector, it writes nothing. +-----------------------------------------------------------------------------*/ + +static void fill_sector(void) +{ + while (cd.offset != 0) + write_byte(0); +} + +/*----------------------------------------------------------------------------- +This function writes a string to the CD-ROM image. The terminating \0 is not +written. +-----------------------------------------------------------------------------*/ + +static void write_string(char *s) +{ + while (*s != 0) + write_byte(*s++); +} + +/*----------------------------------------------------------------------------- +This function writes a ansi string as a big endian unicode string to the CD-ROM +image. The terminating \0 is not written. +-----------------------------------------------------------------------------*/ + +static void write_string_as_big_endian_unicode(char *s) +{ + while (*s != 0) + { + write_byte(0); + write_byte(*s++); + } +} + +/*----------------------------------------------------------------------------- +This function writes a block of identical bytes to the CD-ROM image. +-----------------------------------------------------------------------------*/ + +static void write_block(unsigned count, BYTE value) +{ + while (count != 0) + { + write_byte(value); + count--; + } +} + +/*----------------------------------------------------------------------------- +This function writes a block of identical bige endian words to the CD-ROM image. +-----------------------------------------------------------------------------*/ + +static void write_word_block(unsigned count, WORD value) +{ + while (count != 0) + { + write_big_endian_word(value); + count--; + } +} + +/*----------------------------------------------------------------------------- +This function writes a directory record to the CD_ROM image. +-----------------------------------------------------------------------------*/ + +static void +write_directory_record(PDIR_RECORD d, + DIR_RECORD_TYPE DirType, + BOOL joliet) +{ + unsigned identifier_size; + unsigned record_size; + + if (joliet) + { + if (DirType == DOT_RECORD || DirType == DOT_DOT_RECORD) + identifier_size = 1; + else + identifier_size = strlen(d->joliet_name) * 2; + } + else + { + switch (DirType) + { + case DOT_RECORD: + case DOT_DOT_RECORD: + identifier_size = 1; + break; + case SUBDIRECTORY_RECORD: + /*printf ( "Subdir: %s\n", d->name_on_cd );*/ + identifier_size = strlen(d->name_on_cd); + break; + case FILE_RECORD: + /*printf ( "File: %s.%s -> %s.%s\n", d->name, d->extension, d->name_on_cd, d->extension_on_cd );*/ + identifier_size = strlen(d->name_on_cd) + 2; + if (d->extension_on_cd[0] != 0) + identifier_size += 1 + strlen(d->extension_on_cd); + break; + default: + identifier_size = 1; + break; + } + } + record_size = 33 + identifier_size; + if ((identifier_size & 1) == 0) + record_size++; + if (cd.offset + record_size > SECTOR_SIZE) + fill_sector(); + write_byte((BYTE)record_size); + write_byte(0); // number of sectors in extended attribute record + if (joliet) + { + write_both_endian_dword(d->joliet_sector); + write_both_endian_dword(d->joliet_size); + } + else + { + write_both_endian_dword(d->sector); + write_both_endian_dword(d->size); + } + write_byte((BYTE)(d->date_and_time.year - 1900)); + write_byte(d->date_and_time.month); + write_byte(d->date_and_time.day); + write_byte(d->date_and_time.hour); + write_byte(d->date_and_time.minute); + write_byte(d->date_and_time.second); + write_byte(0); // GMT offset + write_byte(d->flags); + write_byte(0); // file unit size for an interleaved file + write_byte(0); // interleave gap size for an interleaved file + write_both_endian_word((WORD) 1); // volume sequence number + write_byte((BYTE)identifier_size); + switch (DirType) + { + case DOT_RECORD: + write_byte(0); + break; + case DOT_DOT_RECORD: + write_byte(1); + break; + case SUBDIRECTORY_RECORD: + if (joliet) + write_string_as_big_endian_unicode(d->joliet_name); + else + write_string(d->name_on_cd); + break; + case FILE_RECORD: + if (joliet) + { + write_string_as_big_endian_unicode(d->joliet_name); + } + else + { + write_string(d->name_on_cd); + if (d->extension_on_cd[0] != 0) + { + write_byte('.'); + write_string(d->extension_on_cd); + } + write_string(";1"); + } + break; + } + if ((identifier_size & 1) == 0) + write_byte(0); +} + +/*----------------------------------------------------------------------------- +This function converts the date and time words from an ffblk structure and +puts them into a date_and_time structure. +-----------------------------------------------------------------------------*/ + +static void convert_date_and_time(PDATE_AND_TIME dt, time_t *time) +{ + struct tm *timedef; + + timedef = localtime(time); + + dt->second = timedef->tm_sec; + dt->minute = timedef->tm_min; + dt->hour = timedef->tm_hour; + dt->day = timedef->tm_mday; + dt->month = timedef->tm_mon + 1; + dt->year = timedef->tm_year + 1900; +} + +/*----------------------------------------------------------------------------- +This function checks the specified character, if necessary, and +generates an error if it is a punctuation mark other than an underscore. +It also converts small letters to capital letters and returns the +result. +-----------------------------------------------------------------------------*/ + +static int check_for_punctuation(int c, const char *name) +{ + c = toupper(c & 0xFF); + if (!accept_punctuation_marks && !isalnum(c) && c != '_') + error_exit("Punctuation mark in %s", name); + return c; +} + +#if _WIN32 +#define strcasecmp stricmp +#endif//_WIN32 + +/*----------------------------------------------------------------------------- +This function checks to see if there's a cdname conflict. +-----------------------------------------------------------------------------*/ + +int cdname_exists ( PDIR_RECORD d ) +{ + PDIR_RECORD p = d->parent->first_record; + while ( p ) + { + if ( p != d + && !strcasecmp ( p->name_on_cd, d->name_on_cd ) + && !strcasecmp ( p->extension_on_cd, d->extension_on_cd ) ) + return 1; + p = p->next_in_directory; + } + return 0; +} + +void parse_filename_into_dirrecord ( const char* filename, PDIR_RECORD d, BOOL dir ) +{ + const char *s = filename; + char *t = d->name_on_cd; + char *n = d->name; + int joliet_length; + int filename_counter; + filename_counter = 1; + while (*s != 0) + { + if (*s == '.') + { + s++; + break; + } + + if ( (size_t)(t-d->name_on_cd) < sizeof(d->name_on_cd)-1 ) + *t++ = check_for_punctuation(*s, filename); + else if (!joliet) + error_exit ("'%s' is not ISO-9660, aborting...", filename ); + if ( (size_t)(n-d->name) < sizeof(d->name)-1 ) + *n++ = *s; + else if (!joliet) + error_exit ( "'%s' is not ISO-9660, aborting...", filename ); + s++; + } + if (strlen(s) > MAX_EXTENSION_LENGTH) + { + error_exit ( "'%s' has too long extension for cdmake, aborting...", filename ); + } + *t = 0; + strcpy(d->extension, s); + t = d->extension_on_cd; + while ( *s != 0 ) + { + if ( (size_t)(t-d->extension_on_cd) < sizeof(d->extension_on_cd)-1 ) + *t++ = check_for_punctuation(*s, filename); + else if (!joliet) + error_exit ( "'%s' is not ISO-9660, aborting...", filename ); + s++; + } + *t = 0; + *n = 0; + + if ( dir ) + { + if (d->extension[0] != 0) + { + if (!joliet) + error_exit("Directory with extension %s", filename); + } + d->flags = DIRECTORY_FLAG; + } else + d->flags = 0; + + + filename_counter = 1; + while ( cdname_exists ( d ) ) + { + + // the file name must be least 8 char long + if (strlen(d->name_on_cd)<8) + error_exit ( "'%s' is a duplicate file name, aborting...", filename ); + + if ((d->name_on_cd[8] == '.') && (strlen(d->name_on_cd) < 13)) + error_exit ( "'%s' is a duplicate file name, aborting...", filename ); + + // max 255 times for equal short filename + if (filename_counter>255) error_exit ( "'%s' is a duplicate file name, aborting...", filename ); + d->name_on_cd[8] = '~'; + memset(&d->name_on_cd[9],0,5); + sprintf(&d->name_on_cd[9],"%d",filename_counter); + filename_counter++; + + } + + if ( joliet ) + { + joliet_length = strlen(filename); + if (joliet_length > 64) + error_exit ( "'%s' is not Joliet, aborting...", filename ); + d->joliet_name = malloc(joliet_length + 1); + strcpy(d->joliet_name, filename); + } +} + +/*----------------------------------------------------------------------------- +This function creates a new directory record with the information from the +specified ffblk. It links it into the beginning of the directory list +for the specified parent and returns a pointer to the new record. +-----------------------------------------------------------------------------*/ + +#if _WIN32 + +/* Win32 version */ +PDIR_RECORD +new_directory_record (struct _finddata_t *f, + PDIR_RECORD parent) +{ + PDIR_RECORD d; + + d = malloc(sizeof(DIR_RECORD)); + if (d == NULL) + error_exit("Insufficient memory"); + memset ( d, 0, sizeof(DIR_RECORD) ); + d->next_in_memory = root.next_in_memory; + root.next_in_memory = d; + + /* I need the parent set before calling parse_filename_into_dirrecord(), + because that functions checks for duplicate file names*/ + d->parent = parent; + parse_filename_into_dirrecord ( f->name, d, f->attrib & _A_SUBDIR ); + + convert_date_and_time(&d->date_and_time, &f->time_write); + d->flags |= f->attrib & _A_HIDDEN ? HIDDEN_FLAG : 0; + d->size = d->joliet_size = f->size; + d->next_in_directory = parent->first_record; + parent->first_record = d; + return d; +} + +#else + +/* Linux version */ +PDIR_RECORD +new_directory_record (struct dirent *entry, + struct stat *stbuf, + PDIR_RECORD parent) +{ + PDIR_RECORD d; + /* + char *s; + char *t; + char *n; + */ + + d = malloc(sizeof(DIR_RECORD)); + if (d == NULL) + error_exit("Insufficient memory"); + memset ( d, 0, sizeof(DIR_RECORD) ); + d->next_in_memory = root.next_in_memory; + root.next_in_memory = d; + + /* I need the parent set before calling parse_filename_into_dirrecord(), + because that functions checks for duplicate file names*/ + d->parent = parent; +#ifdef HAVE_D_TYPE + parse_filename_into_dirrecord ( entry->d_name, d, entry->d_type == DT_DIR ); +#else + parse_filename_into_dirrecord ( entry->d_name, d, S_ISDIR(stbuf->st_mode) ); +#endif + + convert_date_and_time(&d->date_and_time, &stbuf->st_mtime); + d->flags |= entry->d_name[0] == '.' ? HIDDEN_FLAG : 0; + d->size = d->joliet_size = stbuf->st_size; + d->next_in_directory = parent->first_record; + parent->first_record = d; + return d; +} + +#endif + +/*----------------------------------------------------------------------------- +This function compares two directory records according to the ISO9660 rules +for directory sorting and returns a negative value if p is before q, or a +positive value if p is after q. +-----------------------------------------------------------------------------*/ + +static int compare_directory_order(PDIR_RECORD p, PDIR_RECORD q) +{ + int n = strcmp(p->name_on_cd, q->name_on_cd); + if (n == 0) + n = strcmp(p->extension_on_cd, q->extension_on_cd); + return n; +} + +/*----------------------------------------------------------------------------- +This function compares two directory records (which must represent +directories) according to the ISO9660 rules for path table sorting and returns +a negative value if p is before q, or a positive vlaue if p is after q. +-----------------------------------------------------------------------------*/ + +static int compare_path_table_order(PDIR_RECORD p, PDIR_RECORD q) +{ + int n = p->level - q->level; + if (p == q) + return 0; + if (n == 0) + { + n = compare_path_table_order(p->parent, q->parent); + if (n == 0) + n = compare_directory_order(p, q); + } + return n; +} + +/*----------------------------------------------------------------------------- +This function appends the specified string to the buffer source[]. +-----------------------------------------------------------------------------*/ + +static void append_string_to_source(char *s) +{ + while (*s != 0) + *end_source++ = *s++; +} + +/*----------------------------------------------------------------------------- +This function scans all files from the current source[] (which must end in \, +and represents a directory already in the database as d), +and puts the appropriate directory records into the database in memory, with +the specified root. It calls itself recursively to scan all subdirectories. +-----------------------------------------------------------------------------*/ + +#ifdef _WIN32 + +static void +make_directory_records (PDIR_RECORD d) +{ + PDIR_RECORD new_d; + struct _finddata_t f; + char *old_end_source; + int findhandle; + + d->first_record = NULL; + strcpy(end_source, "*.*"); + + findhandle =_findfirst(source, &f); + if (findhandle != 0) + { + do + { + if ((f.attrib & (_A_HIDDEN | _A_SUBDIR)) == 0 && f.name[0] != '.') + { + if (strcmp(f.name, DIRECTORY_TIMESTAMP) == 0) + { + convert_date_and_time(&d->date_and_time, &f.time_write); + } + else + { + if (verbosity == VERBOSE) + { + old_end_source = end_source; + strcpy(end_source, f.name); + printf("%d: file %s\n", d->level, source); + end_source = old_end_source; + } + (void) new_directory_record(&f, d); + } + } + } + while (_findnext(findhandle, &f) == 0); + + _findclose(findhandle); + } + + strcpy(end_source, "*.*"); + findhandle= _findfirst(source, &f); + if (findhandle) + { + do + { + if (f.attrib & _A_SUBDIR && f.name[0] != '.') + { + old_end_source = end_source; + append_string_to_source(f.name); + *end_source++ = DIR_SEPARATOR_CHAR; + if (verbosity == VERBOSE) + { + *end_source = 0; + printf("%d: directory %s\n", d->level + 1, source); + } + if (d->level < MAX_LEVEL) + { + new_d = new_directory_record(&f, d); + new_d->next_in_path_table = root.next_in_path_table; + root.next_in_path_table = new_d; + new_d->level = d->level + 1; + make_directory_records(new_d); + } + else + { + error_exit("Directory is nested too deep"); + } + end_source = old_end_source; + } + } + while (_findnext(findhandle, &f) == 0); + + _findclose(findhandle); + } + + // sort directory + d->first_record = sort_linked_list(d->first_record, 0, compare_directory_order); +} + +#else + +/* Linux version */ +static void +make_directory_records (PDIR_RECORD d) +{ + PDIR_RECORD new_d; + DIR *dirp; + struct dirent *entry; + char *old_end_source; + struct stat stbuf; + char buf[MAX_PATH]; + + d->first_record = NULL; + +#ifdef HAVE_D_TYPE + dirp = opendir(source); + if (dirp != NULL) + { + while ((entry = readdir (dirp)) != NULL) + { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; // skip self and parent + + if (entry->d_type == DT_REG) // normal file + { + // Check for an absolute path + if (source[0] == DIR_SEPARATOR_CHAR) + { + strcpy(buf, source); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, entry->d_name); + } + else + { + if (!getcwd(buf, sizeof(buf))) + error_exit("Can't get CWD: %s\n", strerror(errno)); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, source); + strcat(buf, entry->d_name); + } + + if (stat(buf, &stbuf) == -1) + { + error_exit("Can't access '%s' (%s)\n", buf, strerror(errno)); + return; + } + + if (strcmp(entry->d_name, DIRECTORY_TIMESTAMP) == 0) + { + convert_date_and_time(&d->date_and_time, &stbuf.st_ctime); + } + else + { + if (verbosity == VERBOSE) + { + printf("%d: file %s\n", d->level, buf); + } + (void) new_directory_record(entry, &stbuf, d); + } + } + } + closedir(dirp); + } + else + { + error_exit("Can't open %s\n", source); + return; + } + + dirp = opendir(source); + if (dirp != NULL) + { + while ((entry = readdir (dirp)) != NULL) + { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; // skip self and parent + + if (entry->d_type == DT_DIR) // directory + { + old_end_source = end_source; + append_string_to_source(entry->d_name); + *end_source++ = DIR_SEPARATOR_CHAR; + *end_source = 0; + if (verbosity == VERBOSE) + { + printf("%d: directory %s\n", d->level + 1, source); + } + if (d->level < MAX_LEVEL) + { + // Check for an absolute path + if (source[0] == DIR_SEPARATOR_CHAR) + { + strcpy(buf, source); + } + else + { + if (!getcwd(buf, sizeof(buf))) + error_exit("Can't get CWD: %s\n", strerror(errno)); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, source); + } + + if (stat(buf, &stbuf) == -1) + { + error_exit("Can't access '%s' (%s)\n", buf, strerror(errno)); + return; + } + new_d = new_directory_record(entry, &stbuf, d); + new_d->next_in_path_table = root.next_in_path_table; + root.next_in_path_table = new_d; + new_d->level = d->level + 1; + make_directory_records(new_d); + } + else + { + error_exit("Directory is nested too deep"); + } + end_source = old_end_source; + *end_source = 0; + } + } + closedir(dirp); + } + else + { + error_exit("Can't open %s\n", source); + return; + } + +#else + + dirp = opendir(source); + if (dirp != NULL) + { + while ((entry = readdir (dirp)) != NULL) + { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; // skip self and parent + + // Check for an absolute path + if (source[0] == DIR_SEPARATOR_CHAR) + { + strcpy(buf, source); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, entry->d_name); + } + else + { + if (!getcwd(buf, sizeof(buf))) + error_exit("Can't get CWD: %s\n", strerror(errno)); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, source); + strcat(buf, entry->d_name); + } + + if (stat(buf, &stbuf) == -1) + { + error_exit("Can't access '%s' (%s)\n", buf, strerror(errno)); + return; + } + + if (S_ISDIR(stbuf.st_mode)) + { + old_end_source = end_source; + append_string_to_source(entry->d_name); + *end_source++ = DIR_SEPARATOR_CHAR; + *end_source = 0; + if (verbosity == VERBOSE) + { + printf("%d: directory %s\n", d->level + 1, source); + } + + if (d->level < MAX_LEVEL) + { + new_d = new_directory_record(entry, &stbuf, d); + new_d->next_in_path_table = root.next_in_path_table; + root.next_in_path_table = new_d; + new_d->level = d->level + 1; + make_directory_records(new_d); + } + else + { + error_exit("Directory is nested too deep"); + } + + end_source = old_end_source; + *end_source = 0; + } + else if (S_ISREG(stbuf.st_mode)) + { + if (strcmp(entry->d_name, DIRECTORY_TIMESTAMP) == 0) + { + convert_date_and_time(&d->date_and_time, &stbuf.st_ctime); + } + else + { + if (verbosity == VERBOSE) + { + printf("%d: file %s\n", d->level, buf); + } + (void) new_directory_record(entry, &stbuf, d); + } + } + } + closedir (dirp); + } + else + { + error_exit("Can't open %s\n", source); + return; + } + +#endif + + // sort directory + d->first_record = sort_linked_list(d->first_record, 0, compare_directory_order); +} + +#endif + +/*----------------------------------------------------------------------------- +This function loads the file specifications for the file or directory +corresponding to the specified directory record into the source[] buffer. It +is recursive. +-----------------------------------------------------------------------------*/ + +static void get_file_specifications(PDIR_RECORD d) +{ + if (d != &root) + { + get_file_specifications(d->parent); + if (d->joliet_name == NULL) + append_string_to_source(d->name); + else + append_string_to_source(d->joliet_name); + + if (((d->flags & DIRECTORY_FLAG) == 0 || joliet) && d->extension[0] != 0) + { + if (d->joliet_name == NULL) + { + *end_source++ = '.'; + append_string_to_source(d->extension); + } + } + if (d->flags & DIRECTORY_FLAG) + *end_source++ = DIR_SEPARATOR_CHAR; + } +} + +static void pass(void) +{ + PDIR_RECORD d; + PDIR_RECORD q; + unsigned int i; + char *t; + unsigned int index; + unsigned int name_length; + DWORD size; + DWORD number_of_sectors; + char *old_end_source; + int n; + FILE *file; + + // first 16 sectors are zeros + + write_block(16 * SECTOR_SIZE, 0); + + // Primary Volume Descriptor + + write_string("\1CD001\1"); + write_byte(0); + write_block(32, ' '); // system identifier + + t = volume_label; + for (i = 0; i < 32; i++) + write_byte( (BYTE)( (*t != 0) ? toupper(*t++) : ' ' ) ); + + write_block(8, 0); + write_both_endian_dword(total_sectors); + write_block(32, 0); + write_both_endian_word((WORD) 1); // volume set size + write_both_endian_word((WORD) 1); // volume sequence number + write_both_endian_word((WORD) 2048); // sector size + write_both_endian_dword(path_table_size); + write_little_endian_dword(little_endian_path_table_sector); + write_little_endian_dword((DWORD) 0); // second little endian path table + write_big_endian_dword(big_endian_path_table_sector); + write_big_endian_dword((DWORD) 0); // second big endian path table + write_directory_record(&root, DOT_RECORD, FALSE); + write_block(128, ' '); // volume set identifier + write_block(128, ' '); // publisher identifier + write_block(128, ' '); // data preparer identifier + write_block(128, ' '); // application identifier + write_block(37, ' '); // copyright file identifier + write_block(37, ' '); // abstract file identifier + write_block(37, ' '); // bibliographic file identifier + write_string("0000000000000000"); // volume creation + write_byte(0); + write_string("0000000000000000"); // most recent modification + write_byte(0); + write_string("0000000000000000"); // volume expires + write_byte(0); + write_string("0000000000000000"); // volume is effective + write_byte(0); + write_byte(1); + write_byte(0); + fill_sector(); + + + // Boot Volume Descriptor + + if (eltorito == TRUE) + { + write_byte(0); + write_string("CD001\1"); + write_string("EL TORITO SPECIFICATION"); // identifier + write_block(9, 0); // padding + write_block(32, 0); // unused + write_little_endian_dword(boot_catalog_sector); // pointer to boot catalog + fill_sector(); + } + + // Supplementary Volume Descriptor + + if (joliet) + { + write_string("\2CD001\1"); + write_byte(0); + + write_word_block(16, L' '); // system identifier + + t = volume_label; + for (i = 0; i < 16; i++) + write_big_endian_word( (BYTE)( (*t != 0) ? *t++ : ' ' ) ); + + write_block(8, 0); + write_both_endian_dword(total_sectors); + write_string("%/E"); + write_block(29, 0); + write_both_endian_word((WORD) 1); // volume set size + write_both_endian_word((WORD) 1); // volume sequence number + write_both_endian_word((WORD) 2048); // sector size + write_both_endian_dword(joliet_path_table_size); + write_little_endian_dword(joliet_little_endian_path_table_sector); + write_little_endian_dword((DWORD) 0); // second little endian path table + write_big_endian_dword(joliet_big_endian_path_table_sector); + write_big_endian_dword((DWORD) 0); // second big endian path table + write_directory_record(&root, DOT_RECORD, TRUE); + write_word_block(64, ' '); // volume set identifier + write_word_block(64, ' '); // publisher identifier + write_word_block(64, ' '); // data preparer identifier + write_word_block(64, ' '); // application identifier + write_block(37, ' '); // copyright file identifier + write_block(37, ' '); // abstract file identifier + write_block(37, ' '); // bibliographic file identifier + write_string("0000000000000000"); // volume creation + write_byte(0); + write_string("0000000000000000"); // most recent modification + write_byte(0); + write_string("0000000000000000"); // volume expires + write_byte(0); + write_string("0000000000000000"); // volume is effective + write_byte(0); + write_byte(1); + write_byte(0); + fill_sector(); + } + + + // Volume Descriptor Set Terminator + write_string("\377CD001\1"); + fill_sector(); + + // Boot Catalog + if (eltorito == TRUE) + { + boot_catalog_sector = cd.sector; + + // Validation entry + write_byte(1); + write_byte(0); // x86 boot code + write_little_endian_word(0); // reserved + write_string("ReactOS Foundation"); + write_block(6, 0); // padding + write_little_endian_word(0x62E); // checksum + write_little_endian_word(0xAA55); // signature + + // default entry + write_byte(0x88); // bootable + write_byte(0); // no emulation + write_big_endian_word(0); // load segment = default (0x07c0) + write_byte(0); // partition type + write_byte(0); // unused + write_little_endian_word(boot_image_size); // sector count + write_little_endian_dword(boot_image_sector); // sector + + fill_sector(); + } + + // Boot Image + if (eltorito == TRUE) + { + boot_image_sector = cd.sector; + + file = fopen(bootimage, "rb"); + if (file == NULL) + error_exit("Can't open %s\n", bootimage); + fseek(file, 0, SEEK_END); + size = ftell(file); + fseek(file, 0, SEEK_SET); + if (size == 0 || (size % 2048)) + { + fclose(file); + error_exit("Invalid boot image size (%lu bytes)\n", size); + } + boot_image_size = size / 512; + while (size > 0) + { + n = BUFFER_SIZE - cd.count; + if ((DWORD) n > size) + n = size; + if (fread (cd.buffer + cd.count, n, 1, file) < 1) + { + fclose(file); + error_exit("Read error in file %s\n", bootimage); + } + cd.count += n; + if (cd.count == BUFFER_SIZE) + flush_buffer(); + cd.sector += n / SECTOR_SIZE; + cd.offset += n % SECTOR_SIZE; + size -= n; + } + fclose(file); +// fill_sector(); + } + + // Little Endian Path Table + little_endian_path_table_sector = cd.sector; + write_byte(1); + write_byte(0); // number of sectors in extended attribute record + write_little_endian_dword(root.sector); + write_little_endian_word((WORD) 1); + write_byte(0); + write_byte(0); + + index = 1; + root.path_table_index = 1; + for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) + { + name_length = strlen(d->name_on_cd); + write_byte((BYTE)name_length); + write_byte(0); // number of sectors in extended attribute record + write_little_endian_dword(d->sector); + write_little_endian_word(d->parent->path_table_index); + write_string(d->name_on_cd); + if (name_length & 1) + write_byte(0); + d->path_table_index = ++index; + } + + path_table_size = (cd.sector - little_endian_path_table_sector) * + SECTOR_SIZE + cd.offset; + fill_sector(); + + // Big Endian Path Table + + big_endian_path_table_sector = cd.sector; + write_byte(1); + write_byte(0); // number of sectors in extended attribute record + write_big_endian_dword(root.sector); + write_big_endian_word((WORD) 1); + write_byte(0); + write_byte(0); + + for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) + { + name_length = strlen(d->name_on_cd); + write_byte((BYTE)name_length); + write_byte(0); // number of sectors in extended attribute record + write_big_endian_dword(d->sector); + write_big_endian_word(d->parent->path_table_index); + write_string(d->name_on_cd); + if (name_length & 1) + write_byte(0); + } + fill_sector(); + + if (joliet) + { + // Little Endian Path Table + + joliet_little_endian_path_table_sector = cd.sector; + write_byte(1); + write_byte(0); // number of sectors in extended attribute record + write_little_endian_dword(root.joliet_sector); + write_little_endian_word((WORD) 1); + write_byte(0); + write_byte(0); + + for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) + { + name_length = strlen(d->joliet_name) * 2; + write_byte((BYTE)name_length); + write_byte(0); // number of sectors in extended attribute record + write_little_endian_dword(d->joliet_sector); + write_little_endian_word(d->parent->path_table_index); + write_string_as_big_endian_unicode(d->joliet_name); + } + + joliet_path_table_size = (cd.sector - joliet_little_endian_path_table_sector) * + SECTOR_SIZE + cd.offset; + fill_sector(); + + // Big Endian Path Table + + joliet_big_endian_path_table_sector = cd.sector; + write_byte(1); + write_byte(0); // number of sectors in extended attribute record + write_big_endian_dword(root.joliet_sector); + write_big_endian_word((WORD) 1); + write_byte(0); + write_byte(0); + + for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) + { + name_length = strlen(d->joliet_name) * 2; + write_byte((BYTE)name_length); + write_byte(0); // number of sectors in extended attribute record + write_big_endian_dword(d->joliet_sector); + write_big_endian_word(d->parent->path_table_index); + write_string_as_big_endian_unicode(d->joliet_name); + } + fill_sector(); + } + + // directories and files + for (d = &root; d != NULL; d = d->next_in_path_table) + { + // write directory + d->sector = cd.sector; + write_directory_record(d, DOT_RECORD, FALSE); + write_directory_record(d == &root ? d : d->parent, DOT_DOT_RECORD, FALSE); + for (q = d->first_record; q != NULL; q = q->next_in_directory) + { + write_directory_record(q, + q->flags & DIRECTORY_FLAG ? SUBDIRECTORY_RECORD : FILE_RECORD, + FALSE); + } + fill_sector(); + d->size = (cd.sector - d->sector) * SECTOR_SIZE; + + // write directory for joliet + if (joliet) + { + d->joliet_sector = cd.sector; + write_directory_record(d, DOT_RECORD, TRUE); + write_directory_record(d == &root ? d : d->parent, DOT_DOT_RECORD, TRUE); + for (q = d->first_record; q != NULL; q = q->next_in_directory) + { + write_directory_record(q, + q->flags & DIRECTORY_FLAG ? SUBDIRECTORY_RECORD : FILE_RECORD, + TRUE); + } + fill_sector(); + d->joliet_size = (cd.sector - d->joliet_sector) * SECTOR_SIZE; + bytes_in_directories += d->joliet_size; + } + + number_of_directories++; + bytes_in_directories += d->size; + + // write file data + for (q = d->first_record; q != NULL; q = q->next_in_directory) + { + if ((q->flags & DIRECTORY_FLAG) == 0) + { + q->sector = q->joliet_sector = cd.sector; + size = q->size; + if (cd.file == NULL) + { + number_of_sectors = (size + SECTOR_SIZE - 1) / SECTOR_SIZE; + cd.sector += number_of_sectors; + number_of_files++; + bytes_in_files += size; + unused_bytes_at_ends_of_files += + number_of_sectors * SECTOR_SIZE - size; + } + else + { + old_end_source = end_source; + get_file_specifications(q); + *end_source = 0; + if (verbosity == VERBOSE) + printf("Writing %s\n", source); + file = fopen(source, "rb"); + if (file == NULL) + error_exit("Can't open %s\n", source); + fseek(file, 0, SEEK_SET); + while (size > 0) + { + n = BUFFER_SIZE - cd.count; + if ((DWORD) n > size) + n = size; + if (fread (cd.buffer + cd.count, n, 1, file) < 1) + { + fclose(file); + error_exit("Read error in file %s\n", source); + } + cd.count += n; + if (cd.count == BUFFER_SIZE) + flush_buffer(); + cd.sector += n / SECTOR_SIZE; + cd.offset += n % SECTOR_SIZE; + size -= n; + } + fclose(file); + end_source = old_end_source; + fill_sector(); + } + } + } + } + + total_sectors = (DWORD)cd.sector; +} + +static char HELP[] = + "CDMAKE [-q] [-v] [-p] [-s N] [-m] [-b bootimage] [-j] source volume image\n" + "\n" + " source specifications of base directory containing all files to\n" + " be written to CD-ROM image\n" + " volume volume label\n" + " image image file or device\n" + " -q quiet mode - display nothing but error messages\n" + " -v verbose mode - display file information as files are\n" + " scanned and written - overrides -p option\n" + " -p show progress while writing\n" + " -s N abort operation before beginning write if image will be\n" + " larger than N megabytes (i.e. 1024*1024*N bytes)\n" + " -m accept punctuation marks other than underscores in\n" + " names and extensions\n" + " -b bootimage create bootable ElTorito CD-ROM using 'no emulation' mode\n" + " -j generate Joliet filename records\n"; + +/*----------------------------------------------------------------------------- +Program execution starts here. +-----------------------------------------------------------------------------*/ + +int main(int argc, char **argv) +{ + BOOL q_option = FALSE; + BOOL v_option = FALSE; + int i; + char *t; + + if (argc < 2) + { + puts(HELP); + return 1; + } + + if (setjmp(error)) + return 1; + + // initialize root directory + + cd.buffer = malloc (BUFFER_SIZE); + if (cd.buffer == NULL) + error_exit("Insufficient memory"); + + memset(&root, 0, sizeof(root)); + root.level = 1; + root.flags = DIRECTORY_FLAG; + + // initialize CD-ROM write buffer + + cd.file = NULL; + cd.filespecs[0] = 0; + + // initialize parameters + + verbosity = NORMAL; + size_limit = 0; + show_progress = FALSE; + accept_punctuation_marks = FALSE; + source[0] = 0; + volume_label[0] = 0; + + eltorito = FALSE; + + // scan command line arguments + + for (i = 1; i < argc; i++) + { + if (memcmp(argv[i], "-s", 2) == 0) + { + t = argv[i] + 2; + if (*t == 0) + { + if (++i < argc) + t = argv[i]; + else + error_exit("Missing size limit parameter"); + } + while (isdigit(*t)) + size_limit = size_limit * 10 + *t++ - '0'; + if (size_limit < 1 || size_limit > 800) + error_exit("Invalid size limit"); + size_limit <<= 9; // convert megabyte to sector count + } + else if (strcmp(argv[i], "-q") == 0) + q_option = TRUE; + else if (strcmp(argv[i], "-v") == 0) + v_option = TRUE; + else if (strcmp(argv[i], "-p") == 0) + show_progress = TRUE; + else if (strcmp(argv[i], "-m") == 0) + accept_punctuation_marks = TRUE; + else if (strcmp(argv[i], "-j") == 0) + joliet = TRUE; + else if (strcmp(argv[i], "-b") == 0) + { + strcpy(bootimage, argv[++i]); + eltorito = TRUE; + } + else if (i + 2 < argc) + { + strcpy(source, argv[i++]); + strncpy(volume_label, argv[i++], sizeof(volume_label) - 1); + strcpy(cd.filespecs, argv[i]); + } + else + error_exit("Missing command line argument"); + } + if (v_option) + { + show_progress = FALSE; + verbosity = VERBOSE; + } + else if (q_option) + { + verbosity = QUIET; + show_progress = FALSE; + } + if (source[0] == 0) + error_exit("Missing source directory"); + if (volume_label[0] == 0) + error_exit("Missing volume label"); + if (cd.filespecs[0] == 0) + error_exit("Missing image file specifications"); + + + // set source[] and end_source to source directory, with a terminating directory separator + + end_source = source + strlen(source); + if (end_source[-1] == ':') + *end_source++ = '.'; + if (end_source[-1] != DIR_SEPARATOR_CHAR) + *end_source++ = DIR_SEPARATOR_CHAR; + + // scan all files and create directory structure in memory + + make_directory_records(&root); + + // sort path table entries + + root.next_in_path_table = sort_linked_list(root.next_in_path_table, 1, + compare_path_table_order); + + // initialize CD-ROM write buffer + + cd.file = NULL; + cd.sector = 0; + cd.offset = 0; + cd.count = 0; + + // make non-writing pass over directory structure to obtain the proper + // sector numbers and offsets and to determine the size of the image + + number_of_files = bytes_in_files = number_of_directories = + bytes_in_directories = unused_bytes_at_ends_of_files =0; + pass(); + + if (verbosity >= NORMAL) + { + printf("%s bytes ", edit_with_commas(bytes_in_files, TRUE)); + printf("in %s files\n", edit_with_commas(number_of_files, FALSE)); + printf("%s unused bytes at ends of files\n", + edit_with_commas(unused_bytes_at_ends_of_files, TRUE)); + printf("%s bytes ", edit_with_commas(bytes_in_directories, TRUE)); + printf("in %s directories\n", + edit_with_commas(number_of_directories, FALSE)); + printf("%s other bytes\n", edit_with_commas(root.sector * SECTOR_SIZE, TRUE)); + puts("-------------"); + printf("%s total bytes\n", + edit_with_commas(total_sectors * SECTOR_SIZE, TRUE)); + puts("============="); + } + + if (size_limit != 0 && total_sectors > size_limit) + error_exit("Size limit exceeded"); + + // re-initialize CD-ROM write buffer + + cd.file = fopen(cd.filespecs, "w+b"); + if (cd.file == NULL) + error_exit("Can't open image file %s", cd.filespecs); + cd.sector = 0; + cd.offset = 0; + cd.count = 0; + + + // make writing pass over directory structure + + pass(); + + if (cd.count > 0) + flush_buffer(); + if (show_progress) + printf("\r \n"); + if (fclose(cd.file) != 0) + { + cd.file = NULL; + error_exit("File write error in image file %s", cd.filespecs); + } + + if (verbosity >= NORMAL) + puts("CD-ROM image made successfully"); + + release_memory(); + return 0; +} + + +/* EOF */ diff --git a/tools/kbdtool/kbdtool.h b/tools/kbdtool/kbdtool.h new file mode 100644 index 00000000000..7ccac685927 --- /dev/null +++ b/tools/kbdtool/kbdtool.h @@ -0,0 +1,93 @@ +/* + * PROJECT: ReactOS Build Tools [Keyboard Layout Compiler] + * LICENSE: BSD - See COPYING.BSD in the top level directory + * FILE: tools/kbdtool/kbdtool.h + * PURPOSE: Main Header File + * PROGRAMMERS: ReactOS Foundation + */ + +/* INCLUDES *******************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#define KEYWORD_COUNT 17 + +#define CHAR_NORMAL_KEY 0 +#define CHAR_DEAD_KEY 1 +#define CHAR_OTHER_KEY 2 +#define CHAR_INVALID_KEY 3 +#define CHAR_LIGATURE_KEY 4 + +typedef struct tagKEYNAME +{ + ULONG Code; + PCHAR Name; + struct tagKEYNAME* Next; +} KEYNAME, *PKEYNAME; + +typedef struct tagSCVK +{ + USHORT ScanCode; + USHORT VirtualKey; + PCHAR Name; + BOOLEAN Processed; +} SCVK, *PSCVK; + +typedef struct tagVKNAME +{ + ULONG VirtualKey; + PCHAR Name; +} VKNAME, *PVKNAME; + +typedef struct tagLAYOUTENTRY +{ + USHORT ScanCode; + UCHAR VirtualKey; + UCHAR OriginalVirtualKey; + ULONG Cap; + ULONG StateCount; + ULONG CharData[8]; + ULONG DeadCharData[8]; + UCHAR LigatureCharData[8]; + ULONG OtherCharData[8]; + struct LAYOUTENTRY* CapData; + PCHAR Name; + ULONG Processed; + ULONG LineCount; +} LAYOUTENTRY, *PLAYOUTENTRY; + +typedef struct tagLAYOUT +{ + LAYOUTENTRY Entry[110]; +} LAYOUT, *PLAYOUT; + +PCHAR +getVKName( + IN ULONG VirtualKey, + IN BOOLEAN Prefix +); + +extern BOOLEAN Verbose, UnicodeFile, SanityCheck, FallbackDriver; +extern PCHAR gpszFileName; +extern FILE* gfpInput; +extern VKNAME VKName[]; +extern VKNAME Modifiers[]; +extern SCVK ScVk[]; +extern PCHAR StateLabel[]; +extern PCHAR CapState[]; +extern LAYOUT g_Layout; +extern CHAR gVKeyName[32]; +extern CHAR gKBDName[10]; +extern CHAR gCopyright[256]; +extern CHAR gDescription[256]; +extern CHAR gCompany[256]; +extern CHAR gLocaleName[256]; +extern ULONG gVersion, gSubVersion; + +/* EOF */ diff --git a/tools/mkhive/CMakeLists.txt b/tools/mkhive/CMakeLists.txt new file mode 100644 index 00000000000..13e04297c1d --- /dev/null +++ b/tools/mkhive/CMakeLists.txt @@ -0,0 +1,18 @@ + +add_definitions(-DMKHIVE_HOST) + +include_directories( + ${REACTOS_SOURCE_DIR}/lib/newinflib + ${REACTOS_SOURCE_DIR}/lib/cmlib + ${REACTOS_SOURCE_DIR}/lib/rtl) + +list(APPEND SOURCE + binhive.c + cmi.c + mkhive.c + reginf.c + registry.c + rtl.c) + +add_executable(mkhive ${SOURCE}) +target_link_libraries(mkhive unicode cmlibhost inflibhost) diff --git a/tools/mkhive/mkhive.h b/tools/mkhive/mkhive.h new file mode 100644 index 00000000000..eb45beee6c4 --- /dev/null +++ b/tools/mkhive/mkhive.h @@ -0,0 +1,136 @@ +/* + * ReactOS kernel + * Copyright (C) 2003, 2006 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS hive maker + * FILE: tools/mkhive/mkhive.h + * PURPOSE: Hive maker + * PROGRAMMER: Eric Kohl + * Herv Poussineau + */ + +#pragma once + +#include +#include + +#include + +// Definitions copied from +// We only want to include host headers, so we define them manually +#define STATUS_SUCCESS ((NTSTATUS)0x00000000) +#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001) +#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002) +#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000D) +#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017) +#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009A) +#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034) +#define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0) +#define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005) + +unsigned char BitScanForward(ULONG * Index, unsigned long Mask); +unsigned char BitScanReverse(ULONG * const Index, unsigned long Mask); +#define RtlFillMemoryUlong(dst, len, val) memset(dst, val, len) + +NTSTATUS NTAPI +RtlAnsiStringToUnicodeString( + IN OUT PUNICODE_STRING UniDest, + IN PANSI_STRING AnsiSource, + IN BOOLEAN AllocateDestinationString); +VOID NTAPI +RtlInitAnsiString( + IN OUT PANSI_STRING DestinationString, + IN PCSTR SourceString); +VOID NTAPI +RtlInitUnicodeString( + IN OUT PUNICODE_STRING DestinationString, + IN PCWSTR SourceString); +WCHAR NTAPI +RtlUpcaseUnicodeChar( + IN WCHAR Source); + +LONG WINAPI +RegQueryValueExW( + IN HKEY hKey, + IN LPCWSTR lpValueName, + IN PULONG lpReserved, + OUT PULONG lpType, + OUT PUCHAR lpData, + OUT PSIZE_T lpcbData); + +LONG WINAPI +RegSetValueExW( + IN HKEY hKey, + IN LPCWSTR lpValueName OPTIONAL, + IN ULONG Reserved, + IN ULONG dwType, + IN const UCHAR* lpData, + IN USHORT cbData); + +LONG WINAPI +RegDeleteKeyW( + IN HKEY hKey, + IN LPCWSTR lpSubKey); + +LONG WINAPI +RegDeleteValueW( + IN HKEY hKey, + IN LPCWSTR lpValueName OPTIONAL); + +LONG WINAPI +RegCreateKeyW( + IN HKEY hKey, + IN LPCWSTR lpSubKey, + OUT PHKEY phkResult); + +LONG WINAPI +RegOpenKeyW( + IN HKEY hKey, + IN LPCWSTR lpSubKey, + OUT PHKEY phkResult); + +#define CMLIB_HOST +#include +#include +#include "reginf.h" +#include "cmi.h" +#include "registry.h" +#include "binhive.h" + +#define HIVE_NO_FILE 2 +#define VERIFY_REGISTRY_HIVE(hive) +extern LIST_ENTRY CmiHiveListHead; +#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) + +#ifndef max +#define max(a, b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef min +#define min(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifdef _WIN32 +#define strncasecmp _strnicmp +#define strcasecmp _stricmp +#else +#include +#endif//_WIN32 + + +/* EOF */ diff --git a/tools/nandflash/nandflash.h b/tools/nandflash/nandflash.h new file mode 100644 index 00000000000..59f68448a75 --- /dev/null +++ b/tools/nandflash/nandflash.h @@ -0,0 +1,21 @@ +/* + * PROJECT: OMAP3 NAND Flashing Utility + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: tools/nandflash/nandflash.h + * PURPOSE: Flashes OmapLDR, FreeLDR and a Root FS into a NAND image + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include +#include +#include +#include + +/* NAND Image Sizes */ +#define NAND_PAGE_SIZE (2 * 1024) // 2 KB +#define NAND_OOB_SIZE 64 // 64 bytes +#define NAND_PAGES ((256 * 1024 * 1024) / NAND_PAGE_SIZE) // 256 MB + +/* EOF */ diff --git a/tools/obj2bin/CMakeLists.txt b/tools/obj2bin/CMakeLists.txt new file mode 100644 index 00000000000..83edc3254d7 --- /dev/null +++ b/tools/obj2bin/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(obj2bin obj2bin.c) diff --git a/tools/obj2bin/obj2bin.c b/tools/obj2bin/obj2bin.c new file mode 100644 index 00000000000..344a44ec519 --- /dev/null +++ b/tools/obj2bin/obj2bin.c @@ -0,0 +1,158 @@ +#include +#include +#include +#include "../pecoff.h" + +static +void +Usage(void) +{ + printf("Converts a coff object file into a raw binary file.\n" + "Syntax: obj2bin \n"); +} + +static +void +RelocateSection( + char *pData, + IMAGE_SECTION_HEADER *pSectionHeader, + PIMAGE_SYMBOL pSymbols, + unsigned int iOffset) +{ + unsigned int i, nOffset; + PIMAGE_RELOCATION pReloc; + char *pSection; + WORD *p16; + DWORD *p32; + + pSection = pData + pSectionHeader->PointerToRawData; + + /* Calculate pointer to relocation table */ + pReloc = (PIMAGE_RELOCATION)(pData + pSectionHeader->PointerToRelocations); + + /* Loop all relocations */ + for (i = 0; i < pSectionHeader->NumberOfRelocations; i++) + { + nOffset = pReloc->VirtualAddress - pSectionHeader->VirtualAddress; + + if (nOffset > pSectionHeader->SizeOfRawData) continue; + + switch (pReloc->Type) + { + case IMAGE_REL_I386_ABSOLUTE: + case 16: + p16 = (void*)(pSection + nOffset); + *p16 += (WORD)(pSymbols[pReloc->SymbolTableIndex].Value + iOffset); + break; + + case IMAGE_REL_I386_DIR32: + p32 = (void*)(pSection + nOffset); + *p32 += (DWORD)(pSymbols[pReloc->SymbolTableIndex].Value + iOffset); + break; + + default: + printf("Unknown relocatation type %ld address %ld\n", + pReloc->Type, pReloc->VirtualAddress); + } + + pReloc++; + } +} + +int main(int argc, char *argv[]) +{ + char *pszSourceFile; + char *pszDestFile; + unsigned long nFileSize, nBaseAddress; + FILE *pSourceFile, *pDestFile; + IMAGE_FILE_HEADER *pFileHeader; + IMAGE_SECTION_HEADER *pSectionHeader; + unsigned int i; + char *pData; + PIMAGE_SYMBOL pSymbols; + + if ((argc != 4) || (strcmp(argv[1], "--help") == 0)) + { + Usage(); + return -1; + } + + pszSourceFile = argv[1]; + pszDestFile = argv[2]; + nBaseAddress = strtol(argv[3], 0, 16); + + pSourceFile = fopen(pszSourceFile, "rb"); + if (!pSourceFile) + { + fprintf(stderr, "Couldn't open source file '%s'\n", pszSourceFile); + return -2; + } + + /* Get file size */ + fseek(pSourceFile, 0, SEEK_END); + nFileSize = ftell(pSourceFile); + rewind(pSourceFile); + + /* Allocate memory for the file */ + pData = malloc(nFileSize); + if (!pData) + { + fprintf(stderr, "Failed to allocate %ld bytes\n", nFileSize); + return -3; + } + + /* Read the whole source file */ + if (!fread(pData, nFileSize, 1, pSourceFile)) + { + fprintf(stderr, "Failed to read source file: %ld\n", nFileSize); + return -4; + } + + /* Close source file */ + fclose(pSourceFile); + + /* Open the destination file */ + pDestFile = fopen(pszDestFile, "wb"); + if (!pszDestFile) + { + fprintf(stderr, "Couldn't open dest file '%s'\n", pszDestFile); + return -5; + } + + /* Calculate table pointers */ + pFileHeader = (IMAGE_FILE_HEADER*)pData; + pSymbols = (void*)(pData + pFileHeader->PointerToSymbolTable); + pSectionHeader = (void*)(((char*)(pFileHeader + 1)) + pFileHeader->SizeOfOptionalHeader); + + /* Loop all sections */ + for (i = 0; i < pFileHeader->NumberOfSections; i++) + { + /* Check if this is '.text' section */ + if ((strcmp(pSectionHeader->Name, ".text") == 0) && + (pSectionHeader->SizeOfRawData != 0)) + { + RelocateSection(pData, + pSectionHeader, + pSymbols, + nBaseAddress); + + /* Write the section to the destination file */ + if (!fwrite(pData + pSectionHeader->PointerToRawData, + pSectionHeader->SizeOfRawData, 1, pDestFile)) + { + fprintf(stderr, "Failed to write data %ld\n", + pSectionHeader->SizeOfRawData); + return -6; + } + + nBaseAddress += pSectionHeader->SizeOfRawData; + } + + pSectionHeader++; + } + + fclose(pDestFile); + + return 0; +} + diff --git a/tools/pecoff.h b/tools/pecoff.h new file mode 100644 index 00000000000..ff0bfdf3e36 --- /dev/null +++ b/tools/pecoff.h @@ -0,0 +1,246 @@ +#pragma once + +#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x010b +#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x020b + +#define IMAGE_DOS_MAGIC 0x5a4d +#define IMAGE_PE_MAGIC 0x00004550 +#define IMAGE_SIZEOF_SHORT_NAME 8 + +#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 +#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 + +#define IMAGE_FILE_MACHINE_I386 0x14c +#define IMAGE_FILE_MACHINE_AMD64 0x8664 +#define IMAGE_FILE_MACHINE_IA64 0x0200 + +#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 + +#define IMAGE_SCN_TYPE_NOLOAD 0x00000002 +#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 +#define IMAGE_SCN_CNT_CODE 0x00000020 +#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 +#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 +#define IMAGE_SCN_LNK_OTHER 0x00000100 +#define IMAGE_SCN_LNK_INFO 0x00000200 +#define IMAGE_SCN_LNK_REMOVE 0x00000800 +#define IMAGE_SCN_NO_DEFER_SPEC_EXC 0x00004000 +#define IMAGE_SCN_GPREL 0x00008000 +#define IMAGE_SCN_MEM_PURGEABLE 0x00020000 +#define IMAGE_SCN_MEM_LOCKED 0x00040000 +#define IMAGE_SCN_MEM_PRELOAD 0x00080000 +#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 +#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 +#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 +#define IMAGE_SCN_MEM_SHARED 0x10000000 +#define IMAGE_SCN_MEM_EXECUTE 0x20000000 +#define IMAGE_SCN_MEM_READ 0x40000000 +#define IMAGE_SCN_MEM_WRITE 0x80000000 + +#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 + +#define IMAGE_REL_I386_ABSOLUTE 0x0001 +#define IMAGE_REL_I386_DIR32 0x0006 + +typedef unsigned char BYTE; +typedef unsigned char UCHAR; +typedef unsigned short WORD; +typedef short SHORT; +typedef unsigned short USHORT; +typedef unsigned long long ULONGLONG; + +#if defined(__x86_64__) && !defined(_WIN64) +typedef signed int LONG; +typedef unsigned int ULONG; +typedef unsigned int DWORD; +#else +typedef signed long LONG; +typedef unsigned long ULONG; +typedef unsigned long DWORD; +#endif +#if defined(_WIN64) +typedef unsigned __int64 ULONG_PTR; +#else +#if defined(__x86_64__) && !defined(_WIN64) +typedef unsigned int ULONG_PTR; +#else +typedef unsigned long ULONG_PTR; +#endif +#endif + +#pragma pack(push,2) +typedef struct _IMAGE_DOS_HEADER { + WORD e_magic; + WORD e_cblp; + WORD e_cp; + WORD e_crlc; + WORD e_cparhdr; + WORD e_minalloc; + WORD e_maxalloc; + WORD e_ss; + WORD e_sp; + WORD e_csum; + WORD e_ip; + WORD e_cs; + WORD e_lfarlc; + WORD e_ovno; + WORD e_res[4]; + WORD e_oemid; + WORD e_oeminfo; + WORD e_res2[10]; + LONG e_lfanew; +} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER; +#pragma pack(pop) + +#pragma pack(push,4) +typedef struct _IMAGE_FILE_HEADER { + WORD Machine; + WORD NumberOfSections; + DWORD TimeDateStamp; + DWORD PointerToSymbolTable; + DWORD NumberOfSymbols; + WORD SizeOfOptionalHeader; + WORD Characteristics; +} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER; +#pragma pack(pop) + +typedef struct _IMAGE_DATA_DIRECTORY { + DWORD VirtualAddress; + DWORD Size; +} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY; + +typedef struct _IMAGE_OPTIONAL_HEADER32 { + WORD Magic; + BYTE MajorLinkerVersion; + BYTE MinorLinkerVersion; + DWORD SizeOfCode; + DWORD SizeOfInitializedData; + DWORD SizeOfUninitializedData; + DWORD AddressOfEntryPoint; + DWORD BaseOfCode; + DWORD BaseOfData; + DWORD ImageBase; + DWORD SectionAlignment; + DWORD FileAlignment; + WORD MajorOperatingSystemVersion; + WORD MinorOperatingSystemVersion; + WORD MajorImageVersion; + WORD MinorImageVersion; + WORD MajorSubsystemVersion; + WORD MinorSubsystemVersion; + DWORD Win32VersionValue; + DWORD SizeOfImage; + DWORD SizeOfHeaders; + DWORD CheckSum; + WORD Subsystem; + WORD DllCharacteristics; + DWORD SizeOfStackReserve; + DWORD SizeOfStackCommit; + DWORD SizeOfHeapReserve; + DWORD SizeOfHeapCommit; + DWORD LoaderFlags; + DWORD NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32; + +typedef struct _IMAGE_OPTIONAL_HEADER64 { + WORD Magic; + BYTE MajorLinkerVersion; + BYTE MinorLinkerVersion; + DWORD SizeOfCode; + DWORD SizeOfInitializedData; + DWORD SizeOfUninitializedData; + DWORD AddressOfEntryPoint; + DWORD BaseOfCode; + ULONGLONG ImageBase; + DWORD SectionAlignment; + DWORD FileAlignment; + WORD MajorOperatingSystemVersion; + WORD MinorOperatingSystemVersion; + WORD MajorImageVersion; + WORD MinorImageVersion; + WORD MajorSubsystemVersion; + WORD MinorSubsystemVersion; + DWORD Win32VersionValue; + DWORD SizeOfImage; + DWORD SizeOfHeaders; + DWORD CheckSum; + WORD Subsystem; + WORD DllCharacteristics; + ULONGLONG SizeOfStackReserve; + ULONGLONG SizeOfStackCommit; + ULONGLONG SizeOfHeapReserve; + ULONGLONG SizeOfHeapCommit; + DWORD LoaderFlags; + DWORD NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER64,*PIMAGE_OPTIONAL_HEADER64; + +#ifdef _TARGET_PE64 +typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER; +typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER; +#else +typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER; +typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER; +#endif + +typedef struct _IMAGE_SECTION_HEADER { + BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; + union { + DWORD PhysicalAddress; + DWORD VirtualSize; + } Misc; + DWORD VirtualAddress; + DWORD SizeOfRawData; + DWORD PointerToRawData; + DWORD PointerToRelocations; + DWORD PointerToLinenumbers; + WORD NumberOfRelocations; + WORD NumberOfLinenumbers; + DWORD Characteristics; +} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER; + +#pragma pack(push,4) +typedef struct _IMAGE_BASE_RELOCATION { + DWORD VirtualAddress; + DWORD SizeOfBlock; + WORD TypeOffset[1]; +} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION; +#pragma pack(pop) + +#ifndef UNALIGNED +#define UNALIGNED +#endif + +#pragma pack(push,2) +typedef struct _IMAGE_RELOCATION { + union { + DWORD VirtualAddress; + DWORD RelocCount; + }; + DWORD SymbolTableIndex; + WORD Type; +} IMAGE_RELOCATION; +typedef struct _IMAGE_RELOCATION UNALIGNED *PIMAGE_RELOCATION; +#pragma pack(pop) + +#pragma pack(push,2) +typedef struct _IMAGE_SYMBOL { + union { + BYTE ShortName[8]; + struct { + DWORD Short; + DWORD Long; + } Name; + DWORD LongName[2]; + } N; + DWORD Value; + SHORT SectionNumber; + WORD Type; + BYTE StorageClass; + BYTE NumberOfAuxSymbols; +} IMAGE_SYMBOL; +typedef struct _IMAGE_SYMBOL UNALIGNED *PIMAGE_SYMBOL; +#pragma pack(pop) diff --git a/tools/rbuild_helper/argv_parser.h b/tools/rbuild_helper/argv_parser.h new file mode 100644 index 00000000000..97c506d12a9 --- /dev/null +++ b/tools/rbuild_helper/argv_parser.h @@ -0,0 +1,159 @@ +/* + Copyright (c) 2009 KJK::Hyperion + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#ifndef KJK_ARGV_PARSER_H_ +#define KJK_ARGV_PARSER_H_ + +#include +#include + +namespace kjk +{ + namespace details + { + template + bool is_separator(typename Traits::int_type c) + { + return Traits::eq_int_type(c, ' ') || Traits::eq_int_type(c, '\t'); + } + } + + template + InIter copy_argument(InIter cur, InIter end, OutIter arg) + { + typename Traits::int_type c; + bool quoting = false; + + while(cur != end) + { + c = Traits::to_int_type(*cur); + + if(!details::is_separator(c)) + break; + + ++ cur; + } + + while(cur != end) + { + typedef typename std::iterator_traits::difference_type difference_type; + difference_type backslashes(0); + + do + { + c = Traits::to_int_type(*cur); + ++ cur; + + if(Traits::eq_int_type(c, '\\')) + ++ backslashes; + else + break; + } + while(cur != end); + + if(Traits::eq_int_type(c, '"')) + { + // c == '"' + + if((backslashes % 2) == 0) + { + // 2N backslashes + "" in quote = N backslashes, literal " + if(quoting && cur != end && Traits::eq_int_type(Traits::to_int_type(*cur), '"')) + { + c = '"'; + ++ cur; + } + // 2N backslashes + " = N backslashes, toggle quoting + else + { + quoting = !quoting; + c = Traits::eof(); + } + + } + // 2N+1 backslashes + " = N backslashes, literal " + + backslashes /= 2; + } + + // Flush backslashes + for(difference_type i = 0; i < backslashes; ++ i) + *arg ++ = Traits::to_char_type('\\'); + + // Handle current character, unless it was a special quote + if(c != Traits::eof()) + { + if(details::is_separator(c) && !quoting) + break; + else + *arg ++ = Traits::to_char_type(c); + } + } + + while(cur != end) + { + c = Traits::to_int_type(*cur); + + if(!details::is_separator(c)) + break; + + ++ cur; + } + + return cur; + } + + template + InIter copy_argument(InIter cur, InIter end, OutIter arg) + { + return copy_argument + < + typename std::iterator_traits::value_type, + typename std::char_traits::value_type>, + InIter, + OutIter + > + (cur, end, arg); + } + + template + InIter skip_argument(InIter cur, InIter end) + { + return copy_argument(cur, end, null_output_iterator()); + } + + template + InIter skip_argument(InIter cur, InIter end) + { + return copy_argument + < + typename std::iterator_traits::value_type, + typename std::char_traits::value_type>, + InIter + > + (cur, end, null_output_iterator::value_type>()); + } +} + +#endif + +// EOF diff --git a/tools/rbuild_helper/null_output_iterator.h b/tools/rbuild_helper/null_output_iterator.h new file mode 100644 index 00000000000..43b960f6ed5 --- /dev/null +++ b/tools/rbuild_helper/null_output_iterator.h @@ -0,0 +1,51 @@ +/* + Copyright (c) 2009 KJK::Hyperion + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#ifndef KJK_NULL_OUTPUT_ITERATOR_H_ +#define KJK_NULL_OUTPUT_ITERATOR_H_ + +#include +#include + +namespace kjk +{ + template + struct null_output_reference + { + const Type& operator=(const Type& x) { return x; } + }; + + template + struct null_output_iterator: public std::iterator > + { + null_output_iterator() {} + null_output_iterator(const null_output_iterator&) {} + const null_output_iterator& operator=(const null_output_iterator&) { return *this; } + const null_output_iterator& operator++() { return *this; } + null_output_iterator operator++(int) { return null_output_iterator(); } + null_output_reference operator*() { return null_output_reference(); } + }; +} + +#endif + +// EOF diff --git a/tools/rbuild_helper/rbuild_helper.cpp b/tools/rbuild_helper/rbuild_helper.cpp new file mode 100644 index 00000000000..2d374b6dfac --- /dev/null +++ b/tools/rbuild_helper/rbuild_helper.cpp @@ -0,0 +1,549 @@ +/* + Copyright (c) 2009 KJK::Hyperion + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#if !defined(WIN32) + +// TODO: needs a near rewrite for UNIX, but it's not required right now +int main() { return 1; } + +#else + +#include +#include +#include +#include + +#include + +#include + +#define WIN32_LEAN_AND_MEAN +#define STRICT +#include + +#undef RtlMoveMemory +extern "C" DECLSPEC_IMPORT void NTAPI RtlMoveMemory(void UNALIGNED *, const void UNALIGNED *, SIZE_T); + +#ifndef ARRAYSIZE +#define ARRAYSIZE(X_) (sizeof(X_) / sizeof((X_)[0])) +#endif + +#include +#include + +using namespace kjk; + +namespace +{ + bool WriteAll(HANDLE hFile, const void * p, size_t cb) + { + const char * pb = static_cast(p); + bool ret = cb == 0; + + while(cb) + { + DWORD cbToWrite; + + if(cb > MAXLONG) + cbToWrite = MAXLONG; + else + cbToWrite = static_cast(cb); + + DWORD cbWritten; + ret = !!WriteFile(hFile, pb, cbToWrite, &cbWritten, NULL); + + if(!ret) + break; + + cb -= cbWritten; + pb += cbWritten; + } + + return ret; + } + + DECLSPEC_NORETURN + void Exit(DWORD dwExitCode) + { + for(;;) TerminateProcess(GetCurrentProcess(), dwExitCode); + } + + DECLSPEC_NORETURN + void Die(DWORD dwExitCode, const char * pszFunction, DWORD dwErrCode) + { + DWORD_PTR args[] = { (DWORD_PTR)pszFunction, dwErrCode }; + + char * pszMessage; + DWORD cchMessage = FormatMessageA + ( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_FROM_STRING, + "rbuild_helper: %1!s!() failed: error %2!lu!\n", + 0, + 0, + (LPSTR)&pszMessage, + 0, + (va_list *)args + ); + + if(cchMessage) + { + (void)WriteAll(GetStdHandle(STD_ERROR_HANDLE), pszMessage, cchMessage); + LocalFree((HLOCAL)pszMessage); + } + + Exit(dwExitCode); + } + + DECLSPEC_NORETURN + void Die(const char * pszFunction) + { + Die(1, pszFunction, GetLastError()); + } + + DECLSPEC_NORETURN + void Die(const char * pszFunction, DWORD dwExitCode) + { + Die(1, pszFunction, dwExitCode); + } + + template + DECLSPEC_NORETURN + void DieMessage(const char (& msg)[N]) + { + (void)WriteAll(GetStdHandle(STD_ERROR_HANDLE), msg, (N) - 1); + Exit(1); + } + + DECLSPEC_NORETURN + void OutOfMemory() + { + DieMessage("rbuild_helper: out of memory\n"); + } + + template + class store_argument + { + private: + CharT * m_arg; + size_t m_argLen; + + public: + // Pretend we are an STL container + typedef TCHAR value_type; + typedef TCHAR * pointer; + typedef TCHAR& reference; + typedef const TCHAR * const_pointer; + typedef const TCHAR& const_reference; + + void push_back(TCHAR x) + { + if(x > std::numeric_limits::max() || x < std::numeric_limits::min()) + DieMessage("rbuild_helper: invalid character in command line\n"); + + m_arg = static_cast(HeapReAlloc(GetProcessHeap(), 0, m_arg, (m_argLen + 1) * sizeof(CharT))); + + if(m_arg == NULL) + OutOfMemory(); + + m_arg[m_argLen] = static_cast(x); + ++ m_argLen; // TODO: better allocation strategy + } + + public: + store_argument(): m_arg(static_cast(HeapAlloc(GetProcessHeap(), 0, 1))), m_argLen(0) + { + if(m_arg == NULL) + OutOfMemory(); + } + + const CharT * get_arg() const { return m_arg; } + size_t get_arg_len() const { return m_argLen; } + }; + + class filter_output + { + private: + const char * m_pFilterLine; + size_t m_cbFilterLine; + HANDLE m_hOutput; + bool& m_fDone; + + static DWORD s_cbDummy; + static DWORD s_pipeId; + + char m_buffer[1024]; + LPTSTR m_pszPipeName; + HANDLE m_hReadFrom; + OVERLAPPED m_asyncRead; + char * m_pLineBuffer; + size_t m_cbLineBuffer; + + bool begin_read() + { + bool bRet = !!ReadFile(m_hReadFrom, m_buffer, sizeof(m_buffer), &s_cbDummy, &m_asyncRead); + + if(!bRet) + { + bRet = GetLastError() != ERROR_BROKEN_PIPE; + + if(bRet) + { + bRet = GetLastError() == ERROR_IO_PENDING; + + if(!bRet) + Die("ReadFile"); + } + } + + return bRet; + } + + void push_input(size_t cbBufferValid) + { + if(m_fDone) + { + if(!WriteAll(m_hOutput, m_buffer, cbBufferValid)) + Die("WriteFile"); + + return; + } + + // Add the data read from output to the line buffer + size_t cbLineBufferNew = m_cbLineBuffer + cbBufferValid; + + if(m_pLineBuffer) + m_pLineBuffer = static_cast(HeapReAlloc(GetProcessHeap(), 0, m_pLineBuffer, cbLineBufferNew)); + else + m_pLineBuffer = static_cast(HeapAlloc(GetProcessHeap(), 0, cbLineBufferNew)); + + if(m_pLineBuffer == NULL) + OutOfMemory(); + + RtlMoveMemory(m_pLineBuffer + m_cbLineBuffer, m_buffer, cbBufferValid); + + // Parse all complete lines in the line buffer + size_t cbLineStart = 0; + + for(size_t i = m_cbLineBuffer; i < cbLineBufferNew; ++ i) + { + // We have a complete line + if(m_pLineBuffer[i] == '\n' || m_pLineBuffer[i] == '\r') + { + size_t cbLine = i - cbLineStart; + + ++ i; + + if(i < cbLineBufferNew && m_pLineBuffer[i - 1] == '\r' && m_pLineBuffer[i] == '\n') + ++ i; + + size_t cbLineFull = i - cbLineStart; + + bool fMatched = cbLine == m_cbFilterLine && memcmp(m_pLineBuffer + cbLineStart, m_pFilterLine, m_cbFilterLine) == 0; + + // The line doesn't match: dump it + if(!fMatched) + { + if(!WriteAll(m_hOutput, m_pLineBuffer + cbLineStart, cbLineFull)) + Die("WriteFile"); + } + // The line matches: we are done + else + m_fDone = fMatched; + + cbLineStart = i; + } + + // Filtering is complete: from now on, just dump everything + if(m_fDone) + { + if(!WriteAll(m_hOutput, m_buffer + i, cbLineBufferNew - i)) + Die("WriteFile"); + + HeapFree(GetProcessHeap(), 0, m_pLineBuffer); + return; + } + } + + // Re-buffer what's left + m_cbLineBuffer = cbLineBufferNew - cbLineStart; + RtlMoveMemory(m_pLineBuffer, m_pLineBuffer + cbLineStart, m_cbLineBuffer); + } + + public: + filter_output(const char * pFilterLine, size_t cbFilterLine, HANDLE hOutput, bool * pfDone): + m_pFilterLine(pFilterLine), + m_cbFilterLine(cbFilterLine), + m_hOutput(hOutput), + m_fDone(*pfDone), + m_asyncRead(), + m_pLineBuffer(0), + m_cbLineBuffer(0) + { + for(;;) + { + DWORD_PTR args[] = { GetCurrentProcessId(), s_pipeId }; + + DWORD cchPipeName = FormatMessage + ( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_FROM_STRING, + TEXT("\\\\.\\pipe\\rbuild_helper-%1!08X!-%2!08X!"), + 0, + 0, + (LPTSTR)&m_pszPipeName, + 0, + (va_list *)args + ); + + if(cchPipeName == 0) + Die("FormatMessage"); + + m_hReadFrom = CreateNamedPipe(m_pszPipeName, PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE, 1, 0, 0, 0, NULL); + + ++ s_pipeId; + + if(m_hReadFrom != INVALID_HANDLE_VALUE) + break; + + if(GetLastError() != ERROR_PIPE_BUSY) + Die("CreateNamedPipe"); + } + + // Just in case + bool fEmptyFilter = m_cbFilterLine == 0; + + if(fEmptyFilter) + m_fDone = fEmptyFilter; + } + + HANDLE open_write_end(LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) + { + HANDLE hWritePipe = CreateFile(m_pszPipeName, GENERIC_WRITE, FILE_SHARE_READ, lpSecurityAttributes, OPEN_EXISTING, dwFlagsAndAttributes, hTemplateFile); + + if(hWritePipe == INVALID_HANDLE_VALUE) + Die("CreateFile"); + + (void)begin_read(); + return hWritePipe; + } + + HANDLE get_read_completion() const + { + return m_hReadFrom; + } + + bool operator()() + { + DWORD cbBufferValid; + + if(!GetOverlappedResult(m_hReadFrom, &m_asyncRead, &cbBufferValid, TRUE)) + { + bool b = GetLastError() != ERROR_BROKEN_PIPE; + + if(!b) + return b; + + Die("ReadFile"); + } + + push_input(cbBufferValid); + return begin_read(); + } + }; + + DWORD filter_output::s_cbDummy = 0; + DWORD filter_output::s_pipeId = 0; + + size_t LengthOfVersionStrings(const TCHAR * pszStrings) + { + size_t cchStrings = 0; + + do + cchStrings += lstrlen(pszStrings + cchStrings) + 1; + while(pszStrings[cchStrings]); + + return cchStrings + 1; + } +} + +int main() +{ + DWORD dwExitCode = 1; + + // Parse the command line + LPCTSTR pszCommandLine = GetCommandLine(); + + // Skip argv[0] + pszCommandLine = skip_argument(stringz_begin(pszCommandLine), stringz_end(pszCommandLine)).base(); + + // Get argv[1]: the prefix for environment variable replacement + store_argument envPrefix; + pszCommandLine = copy_argument(stringz_begin(pszCommandLine), stringz_end(pszCommandLine), std::back_inserter(envPrefix)).base(); + + // Get argv[2]: the line that should be filtered out of the output + store_argument filterLine; + pszCommandLine = copy_argument(stringz_begin(pszCommandLine), stringz_end(pszCommandLine), std::back_inserter(filterLine)).base(); + + // argv[3..N] will become argv[0..N-3] of the compiler + + // Initialize the output filters + bool fDone = false; + filter_output filterStdOutput(filterLine.get_arg(), filterLine.get_arg_len(), GetStdHandle(STD_OUTPUT_HANDLE), &fDone); + filter_output filterStdError(filterLine.get_arg(), filterLine.get_arg_len(), GetStdHandle(STD_ERROR_HANDLE), &fDone); + + // A handle that will never be signaled + HANDLE hNever; + + if(!DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &hNever, SYNCHRONIZE, FALSE, 0)) + Die("DuplicateHandle"); + + // Fix the environment + if(envPrefix.get_arg_len()) + { + LPTCH pEnv = GetEnvironmentStrings(); + + if(!pEnv) + OutOfMemory(); + + SIZE_T cbEnv = LengthOfVersionStrings(pEnv) * sizeof(TCHAR); + LPVOID pDupEnv = HeapAlloc(GetProcessHeap(), 0, cbEnv); + + if(!pDupEnv) + OutOfMemory(); + + RtlMoveMemory(pDupEnv, pEnv, cbEnv); + FreeEnvironmentStrings(pEnv); + pEnv = static_cast(pDupEnv); + + LPCTSTR pszEnvVar = pEnv; + + size_t cchPrefix = envPrefix.get_arg_len(); + const TCHAR * pszBeginPrefix = envPrefix.get_arg(); + const TCHAR * pszEndPrefix = pszBeginPrefix + cchPrefix; + + do + { + const TCHAR * pszBeginName = pszEnvVar; + const TCHAR * pszEndName = std::find(stringz_begin(pszEnvVar), stringz_end(pszEnvVar), TEXT('=')).base(); + const TCHAR * pszBeginValue = pszEndName; + + if(*pszEndName) + { + *const_cast(pszEndName) = 0; + ++ pszBeginValue; + } + + size_t cchName = pszEndName - pszBeginName; + + if(cchName >= cchPrefix && std::equal(pszBeginPrefix, pszEndPrefix, pszBeginName)) + { + SetEnvironmentVariable(pszBeginName, NULL); + + if(cchName > cchPrefix) + SetEnvironmentVariable(pszBeginName + cchPrefix, *pszBeginValue ? pszBeginValue : NULL); + } + + pszEnvVar = pszBeginValue; + + while(*pszEnvVar) + ++ pszEnvVar; + + ++ pszEnvVar; + } + while(*pszEnvVar); + + HeapFree(GetProcessHeap(), 0, pEnv); + } + + // Run the sub-process + STARTUPINFO si; + GetStartupInfo(&si); + + si.dwFlags |= STARTF_USESTDHANDLES; + + si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); + + SECURITY_ATTRIBUTES pipeAttributes = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE }; + si.hStdOutput = filterStdOutput.open_write_end(&pipeAttributes, 0, NULL); + si.hStdError = filterStdError.open_write_end(&pipeAttributes, 0, NULL); + + PROCESS_INFORMATION pi = {}; + + if(!CreateProcess(NULL, const_cast(pszCommandLine), NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi)) + Die("CreateProcess"); + + CloseHandle(pi.hThread); + CloseHandle(si.hStdOutput); + CloseHandle(si.hStdError); + + (void)SetProcessWorkingSetSize(GetCurrentProcess(), (SIZE_T)-1, (SIZE_T)-1); + + HANDLE waitHandles[3] = + { + pi.hProcess, + filterStdOutput.get_read_completion(), + filterStdError.get_read_completion() + }; + + unsigned done = 0; + + char * pLineBuffer = NULL; + size_t cbLineBuffer = 0; + + while(done < ARRAYSIZE(waitHandles)) + { + switch(WaitForMultipleObjects(ARRAYSIZE(waitHandles), waitHandles, FALSE, INFINITE)) + { + case WAIT_OBJECT_0: + GetExitCodeProcess(pi.hProcess, &dwExitCode); + waitHandles[WAIT_OBJECT_0] = hNever; + ++ done; + break; + + case WAIT_OBJECT_0 + 1: + if(!filterStdOutput()) + { + waitHandles[WAIT_OBJECT_0 + 1] = hNever; + ++ done; + } + + break; + + case WAIT_OBJECT_0 + 2: + if(!filterStdError()) + { + waitHandles[WAIT_OBJECT_0 + 2] = hNever; + ++ done; + } + + break; + + default: + Die("WaitForMultipleObjects"); + } + } + + Exit(dwExitCode); +} + +#endif + +// EOF diff --git a/tools/rbuild_helper/stringz_iterator.h b/tools/rbuild_helper/stringz_iterator.h new file mode 100644 index 00000000000..d84fae12087 --- /dev/null +++ b/tools/rbuild_helper/stringz_iterator.h @@ -0,0 +1,130 @@ +/* + Copyright (c) 2009 KJK::Hyperion + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#ifndef KJK_STRINGZ_ITERATOR_H_ +#define KJK_STRINGZ_ITERATOR_H_ + +#include +#include + +namespace kjk +{ + template > class stringz_iterator; + + template stringz_iterator stringz_begin(const CharT *); + template stringz_iterator stringz_begin(const CharT *); + + template stringz_iterator stringz_end(const CharT *); + template stringz_iterator stringz_end(const CharT *); + + template + class stringz_iterator: public std::iterator + { + private: + template friend stringz_iterator stringz_begin(const CharT2 *); + template friend stringz_iterator stringz_begin(const CharT2 *); + + template friend stringz_iterator stringz_end(const CharT2 *); + template friend stringz_iterator stringz_end(const CharT2 *); + + // FIXME: this sucks because GCC sucks + typedef const Type * pointer_; + typedef const Type& reference_; + + pointer_ m_p; + + static pointer_ set_pointer(pointer_ p) + { + if(p != 0 && Traits::eq_int_type(Traits::to_int_type(*p), 0)) + return 0; + else + return p; + } + + explicit stringz_iterator(pointer_ p): m_p(set_pointer(p)) { } + + public: + stringz_iterator(): m_p() {} + stringz_iterator(const stringz_iterator& That): m_p(set_pointer(That.m_p)) { } + + const stringz_iterator& operator=(const stringz_iterator& That) + { + m_p = set_pointer(That.m_p); + return *this; + } + + bool operator==(const stringz_iterator& That) const + { + return m_p == That.m_p; + } + + bool operator!=(const stringz_iterator& That) const + { + return m_p != That.m_p; + } + + reference_ operator*() const { return *m_p; } + + const stringz_iterator& operator++() + { + m_p = set_pointer(m_p + 1); + return *this; + } + + stringz_iterator operator++(int) + { + stringz_iterator oldValue(*this); + ++ (*this); + return oldValue; + } + + pointer_ base() const { return m_p; } + }; + + template + stringz_iterator stringz_begin(const CharT * p) + { + return stringz_iterator(p); + } + + template + stringz_iterator stringz_begin(const CharT * p) + { + return stringz_iterator(p); + } + + template + stringz_iterator stringz_end(const CharT *) + { + return stringz_iterator(0); + } + + template + stringz_iterator stringz_end(const CharT *) + { + return stringz_iterator(0); + } +} + +#endif + +// EOF diff --git a/tools/rsym/CMakeLists.txt b/tools/rsym/CMakeLists.txt new file mode 100644 index 00000000000..d2fce2ab32a --- /dev/null +++ b/tools/rsym/CMakeLists.txt @@ -0,0 +1,3 @@ + +add_executable(rsym rsym_common.c rsym.cmake.c) +add_executable(raddr2line rsym_common.c raddr2line.c) diff --git a/tools/rsym/rsym.cmake.c b/tools/rsym/rsym.cmake.c new file mode 100644 index 00000000000..a5160fac42e --- /dev/null +++ b/tools/rsym/rsym.cmake.c @@ -0,0 +1,116 @@ +/* + * Usage: rsym input-file output-file + * + * There are two sources of information: the .stab/.stabstr + * sections of the executable and the COFF symbol table. Most + * of the information is in the .stab/.stabstr sections. + * However, most of our asm files don't contain .stab directives, + * so routines implemented in assembler won't show up in the + * .stab section. They are present in the COFF symbol table. + * So, we mostly use the .stab/.stabstr sections, but we augment + * the info there with info from the COFF symbol table when + * possible. + * + * This is a tool and is compiled using the host compiler, + * i.e. on Linux gcc and not mingw-gcc (cross-compiler). + * Therefore we can't include SDK headers and we have to + * duplicate some definitions here. + * Also note that the internal functions are "old C-style", + * returning an int, where a return of 0 means success and + * non-zero is failure. + */ + +#include +#include +#include +#include + +#include "rsym.h" + +int main(int argc, char* argv[]) +{ + int i; + PSYMBOLFILE_HEADER SymbolFileHeader; + PIMAGE_DOS_HEADER PEDosHeader; + PIMAGE_FILE_HEADER PEFileHeader; + PIMAGE_OPTIONAL_HEADER PEOptHeader; + PIMAGE_SECTION_HEADER PESectionHeaders; + char* path1; + char* path2; + FILE* out; + size_t FileSize; + void *FileData; + char elfhdr[] = { '\377', 'E', 'L', 'F' }; + + if (3 != argc) + { + fprintf(stderr, "Usage: rsym \n"); + exit(1); + } + + path1 = convert_path(argv[1]); + path2 = convert_path(argv[2]); + + FileData = load_file ( path1, &FileSize ); + if ( !FileData ) + { + fprintf ( stderr, "An error occured loading '%s'\n", path1 ); + exit(1); + } + + /* Check if MZ header exists */ + PEDosHeader = (PIMAGE_DOS_HEADER) FileData; + if (PEDosHeader->e_magic != IMAGE_DOS_MAGIC || PEDosHeader->e_lfanew == 0L) + { + /* Ignore elf */ + if (!memcmp(PEDosHeader, elfhdr, sizeof(elfhdr))) + exit(0); + perror("Input file is not a PE image.\n"); + free(FileData); + exit(1); + } + + /* Locate PE file header */ + /* sizeof(ULONG) = sizeof(MAGIC) */ + PEFileHeader = (PIMAGE_FILE_HEADER)((char *) FileData + PEDosHeader->e_lfanew + sizeof(ULONG)); + + /* Locate optional header */ + assert(sizeof(ULONG) == 4); + PEOptHeader = (PIMAGE_OPTIONAL_HEADER)(PEFileHeader + 1); + + /* Locate PE section headers */ + PESectionHeaders = (PIMAGE_SECTION_HEADER)((char *) PEOptHeader + PEFileHeader->SizeOfOptionalHeader); + + for (i = 0; i < PEFileHeader->NumberOfSections; i++) { + if (PESectionHeaders[i].Name[0] == '/') { + PESectionHeaders[i].Characteristics |= IMAGE_SCN_CNT_INITIALIZED_DATA; + PESectionHeaders[i].Characteristics &= ~(IMAGE_SCN_MEM_PURGEABLE | IMAGE_SCN_MEM_DISCARDABLE); + } + } + + PESectionHeaders[PEFileHeader->NumberOfSections-1].SizeOfRawData = + FileSize - PESectionHeaders[PEFileHeader->NumberOfSections-1].PointerToRawData; + if (PESectionHeaders[PEFileHeader->NumberOfSections-1].SizeOfRawData > + PESectionHeaders[PEFileHeader->NumberOfSections-1].Misc.VirtualSize) { + PESectionHeaders[PEFileHeader->NumberOfSections-1].Misc.VirtualSize = + ROUND_UP(PESectionHeaders[PEFileHeader->NumberOfSections-1].SizeOfRawData, + PEOptHeader->SectionAlignment); + PEOptHeader->SizeOfImage = PESectionHeaders[PEFileHeader->NumberOfSections-1].VirtualAddress + PESectionHeaders[PEFileHeader->NumberOfSections-1].Misc.VirtualSize; + } + + out = fopen(path2, "wb"); + if (out == NULL) + { + perror("Cannot open output file"); + free(FileData); + exit(1); + } + + fwrite(FileData, 1, FileSize, out); + fclose(out); + free(FileData); + + return 0; +} + +/* EOF */ diff --git a/tools/rsym/rsym.h b/tools/rsym/rsym.h new file mode 100644 index 00000000000..6b91d6e6fed --- /dev/null +++ b/tools/rsym/rsym.h @@ -0,0 +1,172 @@ +/* rsym.h */ + +#pragma once +#include "../pecoff.h" + +typedef struct { + USHORT f_magic; /* magic number */ + USHORT f_nscns; /* number of sections */ + ULONG f_timdat; /* time & date stamp */ + ULONG f_symptr; /* file pointer to symtab */ + ULONG f_nsyms; /* number of symtab entries */ + USHORT f_opthdr; /* sizeof(optional hdr) */ + USHORT f_flags; /* flags */ +} FILHDR; + +typedef struct { + char s_name[8]; /* section name */ + ULONG s_paddr; /* physical address, aliased s_nlib */ + ULONG s_vaddr; /* virtual address */ + ULONG s_size; /* section size */ + ULONG s_scnptr; /* file ptr to raw data for section */ + ULONG s_relptr; /* file ptr to relocation */ + ULONG s_lnnoptr; /* file ptr to line numbers */ + USHORT s_nreloc; /* number of relocation entries */ + USHORT s_nlnno; /* number of line number entries */ + ULONG s_flags; /* flags */ +} SCNHDR; +#pragma pack(4) + +typedef struct _SYMBOLFILE_HEADER { + ULONG SymbolsOffset; + ULONG SymbolsLength; + ULONG StringsOffset; + ULONG StringsLength; +} SYMBOLFILE_HEADER, *PSYMBOLFILE_HEADER; + +typedef struct _STAB_ENTRY { + ULONG n_strx; /* index into string table of name */ + UCHAR n_type; /* type of symbol */ + UCHAR n_other; /* misc info (usually empty) */ + USHORT n_desc; /* description field */ + ULONG n_value; /* value of symbol */ +} STAB_ENTRY, *PSTAB_ENTRY; + +/* http://www.math.utah.edu/docs/info/stabs_12.html */ +#define N_GYSM 0x20 +#define N_FNAME 0x22 +#define N_FUN 0x24 +#define N_STSYM 0x26 +#define N_LCSYM 0x28 +#define N_MAIN 0x2A +#define N_PC 0x30 +#define N_NSYMS 0x32 +#define N_NOMAP 0x34 +#define N_RSYM 0x40 +#define N_M2C 0x42 +#define N_SLINE 0x44 +#define N_DSLINE 0x46 +#define N_BSLINE 0x48 +#define N_BROWS 0x48 +#define N_DEFD 0x4A +#define N_EHDECL 0x50 +#define N_MOD2 0x50 +#define N_CATCH 0x54 +#define N_SSYM 0x60 +#define N_SO 0x64 +#define N_LSYM 0x80 +#define N_BINCL 0x82 +#define N_SOL 0x84 +#define N_PSYM 0xA0 +#define N_EINCL 0xA2 +#define N_ENTRY 0xA4 +#define N_LBRAC 0xC0 +#define N_EXCL 0xC2 +#define N_SCOPE 0xC4 +#define N_RBRAC 0xE0 +#define N_BCOMM 0xE2 +#define N_ECOMM 0xE4 +#define N_ECOML 0xE8 +#define N_LENG 0xFE + +/* COFF symbol table */ + +#define E_SYMNMLEN 8 /* # characters in a symbol name */ +#define E_FILNMLEN 14 /* # characters in a file name */ +#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ + +#define N_BTMASK (0xf) +#define N_TMASK (0x30) +#define N_BTSHFT (4) +#define N_TSHIFT (2) + +/* derived types, in e_type */ +#define DT_NON (0) /* no derived type */ +#define DT_PTR (1) /* pointer */ +#define DT_FCN (2) /* function */ +#define DT_ARY (3) /* array */ + +#define BTYPE(x) ((x) & N_BTMASK) + +#define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT)) +#define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT)) +#define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT)) +#define ISTAG(x) ((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG) +#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK)) + +#define C_EFCN 0xff /* physical end of function */ +#define C_NULL 0 +#define C_AUTO 1 /* automatic variable */ +#define C_EXT 2 /* external symbol */ +#define C_STAT 3 /* static */ +#define C_REG 4 /* register variable */ +#define C_EXTDEF 5 /* external definition */ +#define C_LABEL 6 /* label */ +#define C_ULABEL 7 /* undefined label */ +#define C_MOS 8 /* member of structure */ +#define C_ARG 9 /* function argument */ +#define C_STRTAG 10 /* structure tag */ +#define C_MOU 11 /* member of union */ +#define C_UNTAG 12 /* union tag */ +#define C_TPDEF 13 /* type definition */ +#define C_USTATIC 14 /* undefined static */ +#define C_ENTAG 15 /* enumeration tag */ +#define C_MOE 16 /* member of enumeration */ +#define C_REGPARM 17 /* register parameter */ +#define C_FIELD 18 /* bit field */ +#define C_AUTOARG 19 /* auto argument */ +#define C_LASTENT 20 /* dummy entry (end of block) */ +#define C_BLOCK 100 /* ".bb" or ".eb" */ +#define C_FCN 101 /* ".bf" or ".ef" */ +#define C_EOS 102 /* end of structure */ +#define C_FILE 103 /* file name */ +#define C_LINE 104 /* line # reformatted as symbol table entry */ +#define C_ALIAS 105 /* duplicate tag */ +#define C_HIDDEN 106 /* ext symbol in dmert public lib */ + +#pragma pack(1) +typedef struct _COFF_SYMENT +{ + union + { + char e_name[E_SYMNMLEN]; + struct + { + ULONG e_zeroes; + ULONG e_offset; + } + e; + } + e; + ULONG e_value; + short e_scnum; + USHORT e_type; + UCHAR e_sclass; + UCHAR e_numaux; +} COFF_SYMENT, *PCOFF_SYMENT; +#pragma pack(4) + +typedef struct _ROSSYM_ENTRY { + ULONG_PTR Address; + ULONG FunctionOffset; + ULONG FileOffset; + ULONG SourceLine; +} ROSSYM_ENTRY, *PROSSYM_ENTRY; + +#define ROUND_UP(N, S) (((N) + (S) - 1) & ~((S) - 1)) + +extern char* +convert_path(const char* origpath); + +extern void* +load_file ( const char* file_name, size_t* file_size ); diff --git a/tools/unicode/CMakeLists.txt b/tools/unicode/CMakeLists.txt new file mode 100644 index 00000000000..39868c1e786 --- /dev/null +++ b/tools/unicode/CMakeLists.txt @@ -0,0 +1,73 @@ +list(APPEND SOURCE + casemap.c + compose.c + cptable.c + mbtowc.c + string.c + wctomb.c + wctype.c + utf8.c + c_037.c + c_424.c + c_437.c + c_500.c + c_737.c + c_775.c + c_850.c + c_852.c + c_855.c + c_856.c + c_857.c + c_860.c + c_861.c + c_862.c + c_863.c + c_864.c + c_865.c + c_866.c + c_869.c + c_874.c + c_875.c + c_878.c + c_932.c + c_936.c + c_949.c + c_950.c + c_1006.c + c_1026.c + c_1250.c + c_1251.c + c_1252.c + c_1253.c + c_1254.c + c_1255.c + c_1256.c + c_1257.c + c_1258.c + c_1361.c + c_10000.c + c_10006.c + c_10007.c + c_10029.c + c_10079.c + c_10081.c + c_20866.c + c_20932.c + c_20127.c + c_21866.c + c_28591.c + c_28592.c + c_28593.c + c_28594.c + c_28595.c + c_28596.c + c_28597.c + c_28598.c + c_28599.c + c_28600.c + c_28603.c + c_28604.c + c_28605.c + c_28606.c) + +add_library(unicode ${SOURCE}) diff --git a/tools/widl/hash.c b/tools/widl/hash.c new file mode 100644 index 00000000000..508d17131e2 --- /dev/null +++ b/tools/widl/hash.c @@ -0,0 +1,639 @@ +/* + * Oleaut32 hash functions + * + * Copyright 1999 Corel Corporation + * Copyright 2001-2003 Jon Griffiths + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include +#include + +#include + +#include "widltypes.h" +#include "hash.h" + +static const unsigned char Lookup_16[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + + /* Windows */ + 0x7F, 0x7F, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x7F, 0x89, 0x53, 0x8B, 0x8C, + 0x7F, 0x7F, 0x7F, 0x7F, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x96, 0x98, 0x99, + 0x53, 0x9B, 0x8C, 0x7F, 0x7F, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, + 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55, + 0x55, 0x55, 0x55, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, + 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, + 0x4F, 0x4F, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x55, 0xDE, 0x55, + + /* Mac */ + 0x41, 0x41, 0x43, 0x45, 0x4E, 0x4F, 0x55, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4E, 0x4F, 0x4F, 0x4F, + 0x4F, 0x4F, 0x55, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0x41, 0x4F, 0xB0, 0xB1, 0xB2, 0xB3, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0x41, 0x4F, 0xBD, 0x41, 0x4F, 0xC0, + 0xC1, 0xC2, 0xC3, 0x46, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0x41, 0x41, 0x4F, + 0xCE, 0xCE, 0xD0, 0xD0, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0x55, 0x55, 0xDA, + 0xDB, 0xDC, 0xDD, 0x3F, 0x3F, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0x41, 0x45, 0x41, + 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4F, 0x4F, 0x3F, 0x4F, 0x55, 0x55, 0x55, + 0x49, 0x7F, 0xF7, 0x7F, 0xF9, 0xFA, 0xFB, 0x3F, 0xFD, 0xFE, 0x7F +}; + +static const unsigned char Lookup_32[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + + /* Windows */ + 0x7F, 0x7F, 0x82, 0x7F, 0x84, 0x85, 0x86, 0x87, 0x7F, 0x89, 0x53, 0x8B, 0x53, + 0x54, 0x5A, 0x5A, 0x7F, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x96, 0x7F, 0x99, + 0x53, 0x9B, 0x53, 0x54, 0x5A, 0x5A, 0xA0, 0x7F, 0xA2, 0x4C, 0xA4, 0x41, 0xA6, + 0xA7, 0xA8, 0xA9, 0x53, 0xAB, 0xAC, 0x96, 0xAE, 0x5A, 0xB0, 0xB1, 0xB2, 0x4C, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x41, 0x53, 0xBB, 0x4C, 0xBD, 0x4C, 0x5A, 0x52, + 0x41, 0x41, 0x41, 0x41, 0x4C, 0x43, 0x43, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, + 0x49, 0x44, 0xD0, 0x4E, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x52, 0x55, 0x55, + 0x55, 0x55, 0x59, 0x54, 0xDF, 0x52, 0x41, 0x41, 0x41, 0x41, 0x4C, 0x43, 0x43, + 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x44, 0xD0, 0x4E, 0x4E, 0x4F, 0x4F, + 0x4F, 0x4F, 0xF7, 0x52, 0x55, 0x55, 0x55, 0x55, 0x59, 0x54, 0xFF, + + /* Mac */ + 0x41, 0x41, 0x41, 0x45, 0x41, 0x4F, 0x55, 0x41, 0x41, 0x43, 0x41, 0x43, 0x43, + 0x43, 0x45, 0x5A, 0x5A, 0x44, 0x49, 0x44, 0x45, 0x45, 0x45, 0x4F, 0x45, 0x4F, + 0x4F, 0x4F, 0x55, 0x45, 0x45, 0x55, 0xA0, 0xA1, 0x45, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0x45, 0xAC, 0xAD, 0x47, 0x49, 0x49, 0x49, 0xB2, 0xB3, + 0x49, 0x4B, 0xB6, 0xB7, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4E, 0x4E, + 0x4E, 0xC2, 0xC3, 0x4E, 0x4E, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0x4E, 0x4F, 0x4F, + 0x4F, 0x4F, 0xD0, 0xD0, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0x4F, 0x52, 0x52, + 0x52, 0xDC, 0xDD, 0x52, 0x52, 0x52, 0x53, 0xE2, 0xE3, 0x53, 0x53, 0x53, 0x41, + 0x54, 0x54, 0x49, 0x5A, 0x5A, 0x55, 0x4F, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x59, 0x59, 0x4B, 0x5A, 0x4C, 0x4C, 0x47, 0xFF +}; + +static const unsigned char Lookup_48[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + + /* Windows */ + 0x7F, 0x7F, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x7F, 0x89, 0x53, 0x8B, 0x8C, + 0x7F, 0x7F, 0x7F, 0x7F, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x96, 0x98, 0x99, + 0x53, 0x9B, 0x8C, 0x7F, 0x7F, 0x59, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, + 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55, + 0x55, 0x55, 0x59, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, + 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, + 0x4F, 0x4F, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x59, 0xDE, 0x59, + + /* Mac */ + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, + 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAB, 0xAD, 0xAE, 0xAE, 0xB0, 0xB1, 0xB2, 0xB3, + 0xA7, 0xB5, 0xB6, 0xB7, 0xB8, 0xB8, 0xBA, 0xBA, 0xBC, 0xBC, 0xBE, 0xBE, 0xB7, + 0xC1, 0xC2, 0xC3, 0x46, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCB, 0xCD, + 0xCD, 0xC1, 0xD0, 0xD0, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD8, 0xDA, + 0xDA, 0xDC, 0xDD, 0xDD, 0x9F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F +}; + +static const unsigned char Lookup_64[128 * 3] = { + /* Common */ + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + +/* Windows */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, + 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55, + 0x55, 0x55, 0x55, 0xDE, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + /* Mac */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x96, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, + 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0xD7, 0x4F, 0x55, 0x55, + 0x55, 0x55, 0x55, 0xDE, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +static const unsigned char Lookup_80[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + +/* Windows */ + 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, + + /* Mac */ + 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, +}; + +static const unsigned char Lookup_112[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x56, 0x58, 0x55, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + +/* Windows */ + 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, + + /* Mac */ + 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, +}; + +static const unsigned char Lookup_128[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00, + +/* Windows */ + 0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x00, 0x8B, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x00, 0x99, + 0x00, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x00, 0xAB, 0xAC, 0x2D, 0xAE, 0x2D, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xBA, + 0xA2, 0xC2, 0xC3, 0xC4, 0xB8, 0xC6, 0xB9, 0xC8, 0xBA, 0xCA, 0xCB, 0xCC, 0xCD, + 0xCE, 0xBC, 0xD0, 0xD1, 0x00, 0xD3, 0xD4, 0xBE, 0xD6, 0xD7, 0xD8, 0xBF, 0xBA, + 0xBE, 0xA2, 0xB8, 0xB9, 0xBA, 0xBE, 0xA2, 0xC2, 0xC3, 0xC4, 0xB8, 0xC6, 0xB9, + 0xC8, 0xBA, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xBC, 0xD0, 0xD1, 0xD3, 0xD3, 0xD4, + 0xBE, 0xD6, 0xD7, 0xD8, 0xBF, 0xBA, 0xBE, 0xBC, 0xBE, 0xBF, 0x00, + + /* Mac */ + 0x41, 0x31, 0x32, 0x45, 0x33, 0x4F, 0x55, 0x87, 0x41, 0x41, 0x41, 0x00, 0x8C, + 0x43, 0x45, 0x45, 0x45, 0x45, 0x92, 0x93, 0x49, 0x49, 0x96, 0x97, 0x98, 0x4F, + 0x4F, 0x9B, 0x3F, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xAB, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xB0, + 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x09, 0xBD, 0xCC, 0xB0, + 0xB6, 0xCF, 0x2D, 0x2D, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xB8, 0xAB, 0xC3, 0xBD, + 0xB6, 0xB8, 0xAB, 0xC3, 0xBF, 0xBD, 0xB0, 0xB5, 0xBE, 0xA2, 0xB6, 0xBC, 0xA1, + 0xB8, 0xAB, 0xA5, 0xBA, 0xA4, 0xBB, 0xC1, 0xC3, 0xA6, 0xBF, 0xC4, 0xAA, 0xC6, + 0xA3, 0xBF, 0xAA, 0xCC, 0xBD, 0xB7, 0xAB, 0xBD, 0xAB, 0xBD, 0x3F, +}; + +static const unsigned char Lookup_144[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00, + +/* Windows */ + 0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C, + 0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99, + 0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, 0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD, + 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F, 0x4F, 0xD6, 0xD7, 0xD6, 0x55, 0xDA, + 0x55, 0x55, 0xDD, 0xDE, 0xDF, 0x41, 0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, + 0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F, + 0x4F, 0xD6, 0xF7, 0xD6, 0x55, 0xDA, 0x55, 0x55, 0xDD, 0xDE, 0x59, + + /* Mac */ + 0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C, + 0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99, + 0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, 0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD, + 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F, 0x4F, 0xD6, 0xD7, 0xD6, 0x55, 0xDA, + 0x55, 0x55, 0xDD, 0xDE, 0xDF, 0x41, 0xC1, 0x41, 0x41, 0x41, 0x41, 0xC6, 0x43, + 0x45, 0xC9, 0x45, 0x45, 0x49, 0xCD, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0xD3, 0x4F, + 0x4F, 0xD6, 0xF7, 0xD6, 0x55, 0xDA, 0x55, 0x55, 0xDD, 0xDE, 0x59, +}; + +static const unsigned char Lookup_160[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00, + +/* Windows */ + 0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C, + 0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99, + 0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, + 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD6, 0xD7, 0x4F, 0x55, 0x55, + 0x55, 0xDC, 0xDD, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7, + 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, + 0x4F, 0xD6, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0xDC, 0xDD, 0xDE, 0x59, + + /* Mac */ + 0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C, + 0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99, + 0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, + 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD6, 0xD7, 0x4F, 0x55, 0x55, + 0x55, 0xDC, 0xDD, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xC6, 0xC7, + 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0xD0, 0x4E, 0x4F, 0x4F, 0x4F, + 0x4F, 0xD6, 0xF7, 0x4F, 0x55, 0x55, 0x55, 0xDC, 0xDD, 0xDE, 0x59, +}; + +static const unsigned char Lookup_176[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x00, + + /* Windows */ + 0x00, 0x00, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x00, 0x89, 0x53, 0x8B, 0x8C, + 0x00, 0x00, 0x00, 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x2D, 0x2D, 0x98, 0x99, + 0x53, 0x9B, 0x8C, 0x00, 0x00, 0x59, 0x09, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0x41, 0xAB, 0xAC, 0x2D, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0x4F, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0x41, + 0x41, 0x41, 0x41, 0xC4, 0xC5, 0xC4, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, + 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0xD6, 0xD7, 0xD6, 0x55, 0x55, + 0x55, 0x59, 0x59, 0xDE, 0xDF, 0x41, 0x41, 0x41, 0x41, 0xC4, 0xC5, 0xC4, 0x43, + 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x44, 0x4E, 0x4F, 0x4F, 0x4F, + 0x4F, 0xD6, 0xF7, 0xD6, 0x55, 0x55, 0x55, 0x59, 0x59, 0xDE, 0x59, + + /* Mac */ + 0x80, 0x81, 0x43, 0x45, 0x4E, 0x85, 0x59, 0x41, 0x41, 0x41, 0x80, 0x41, 0x81, + 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4E, 0x4F, 0x4F, 0x4F, + 0x85, 0x4F, 0x55, 0x55, 0x55, 0x59, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0x80, 0x85, 0xB0, 0xB1, 0xB2, 0xB3, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0x41, 0x4F, 0xBD, 0x80, 0x85, 0xC0, + 0xC1, 0xC2, 0xC3, 0x46, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x09, 0x41, 0x41, 0x4F, + 0xCE, 0xCE, 0x2D, 0x2D, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0x59, 0x59, 0xDA, + 0xDB, 0xDC, 0xDD, 0x3F, 0x3F, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0x41, 0x45, 0x41, + 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4F, 0x4F, 0x3F, 0x4F, 0x55, 0x55, 0x55, + 0x49, 0x00, 0xF7, 0x00, 0xF9, 0xFA, 0xFB, 0x3F, 0xFD, 0xFE, 0x00 +}; + +static const unsigned char Lookup_208[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + +/* Windows */ + 0x80, 0x81, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x5E, 0x89, 0x8A, 0x8B, 0x8C, + 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9A, 0x9B, 0x8C, 0x9D, 0x00, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, + 0xC1, 0xC2, 0xC1, 0xC1, 0xC1, 0xC1, 0xC7, 0xC8, 0xC9, 0xC9, 0xCB, 0xCC, 0xCD, + 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, + 0xDB, 0x00, 0xDD, 0xDE, 0xDF, 0x41, 0xE1, 0x41, 0xE3, 0xE4, 0xE5, 0xE6, 0x43, + 0x45, 0x45, 0x45, 0x45, 0xEC, 0xEC, 0x49, 0x49, 0xF0, 0xF1, 0xF2, 0xF3, 0x4F, + 0xF5, 0xF6, 0xF7, 0xF8, 0x55, 0xFA, 0x55, 0x55, 0x00, 0x00, 0xFF, + + /* Mac */ + 0x41, 0x81, 0x43, 0x45, 0x4E, 0x4F, 0x55, 0x41, 0x41, 0x41, 0x41, 0x8B, 0x8C, + 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x93, 0x49, 0x49, 0x4E, 0x4F, 0x98, 0x4F, + 0x4F, 0x9B, 0x55, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, + 0xC1, 0xC2, 0xC1, 0xC1, 0xC1, 0xC1, 0xC7, 0xC8, 0xC9, 0xC9, 0xCB, 0xCC, 0xCD, + 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, + 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0x00, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xE9, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, + 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, +}; + +static const unsigned char Lookup_224[128 * 3] = { + /* Common */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, + 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, + 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + +/* Windows */ + 0x80, 0x81, 0x82, 0x46, 0x84, 0x85, 0x86, 0x87, 0x5E, 0x89, 0x8A, 0x8B, 0x8C, + 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, + 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0x32, 0x33, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0x31, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, + 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, + 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, + 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEA, 0xEC, 0xED, 0xED, 0xEF, 0xEF, 0xF1, 0xF2, 0xF3, 0xF3, + 0xF5, 0xF5, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x00, 0x00, 0xFF, + + /* Mac */ + 0x41, 0x41, 0x43, 0x45, 0x4E, 0x4F, 0x55, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, + 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4E, 0x4F, 0x4F, 0x4F, + 0x4F, 0x4F, 0x55, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, + 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, + 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, + 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEA, 0xEC, 0xED, 0xED, 0xEF, 0xEF, 0xF1, 0xF2, 0xF3, 0xF3, + 0xF5, 0xF5, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, +}; + +/*********************************************************************** + * lhash_val_of_name_sys + * + * Copy of oleaut32.LHashValOfNameSysA + * Produce a string hash value. + * + * PARAMS + * skind [I] Type of the system. + * lcid [I] Locale id for the hash. + * lpStr [I] String to hash. + * + * RETURNS + * Success: The hash value of the string. + * Failure: 0, if lpStr is NULL. + * + * NOTES + * This function produces a two part hash: The high word is based on + * skind and lcid, while the low word is based on a repeated string + * hash of skind/str. + */ +unsigned int lhash_val_of_name_sys( syskind_t skind, LCID lcid, LPCSTR lpStr) +{ + ULONG nOffset, nMask = skind == SYS_MAC ? 1 : 0; + ULONG nHiWord, nLoWord = 0x0deadbee; + const unsigned char *str = (const unsigned char *)lpStr, *pnLookup = NULL; + + if (!str) + return 0; + + switch (PRIMARYLANGID(LANGIDFROMLCID(lcid))) + { + default: + fprintf(stderr, "Unknown lcid %x, treating as latin-based, please report\n", lcid); + /* .. Fall Through .. */ + case LANG_AFRIKAANS: case LANG_ALBANIAN: case LANG_ARMENIAN: + case LANG_ASSAMESE: case LANG_AZERI: case LANG_BASQUE: + case LANG_BELARUSIAN: case LANG_BENGALI: case LANG_BULGARIAN: + case LANG_CATALAN: case LANG_DANISH: case LANG_DIVEHI: + case LANG_DUTCH: case LANG_ENGLISH: case LANG_ESTONIAN: + case LANG_FAEROESE: case LANG_FINNISH: case LANG_FRENCH: + case LANG_GALICIAN: case LANG_GEORGIAN: case LANG_GERMAN: + case LANG_GUJARATI: case LANG_HINDI: case LANG_INDONESIAN: + case LANG_ITALIAN: case LANG_KANNADA: case LANG_KASHMIRI: + case LANG_KAZAK: case LANG_KONKANI: case LANG_KYRGYZ: + case LANG_LATVIAN: case LANG_LITHUANIAN: case LANG_MACEDONIAN: + case LANG_MALAY: case LANG_MALAYALAM: case LANG_MANIPURI: + case LANG_MARATHI: case LANG_MONGOLIAN: case LANG_NEPALI: + case LANG_ORIYA: case LANG_PORTUGUESE: case LANG_PUNJABI: + case LANG_ROMANIAN: case LANG_SANSKRIT: case LANG_SERBIAN: + case LANG_SINDHI: case LANG_SLOVENIAN: case LANG_SWAHILI: + case LANG_SWEDISH: case LANG_SYRIAC: case LANG_TAMIL: + case LANG_TATAR: case LANG_TELUGU: case LANG_THAI: + case LANG_UKRAINIAN: case LANG_URDU: case LANG_UZBEK: + case LANG_VIETNAMESE: case LANG_MALTESE: case LANG_IRISH: + case LANG_SAMI: case LANG_UPPER_SORBIAN: case LANG_TSWANA: + case LANG_XHOSA: case LANG_ZULU: case LANG_WELSH: + case LANG_BRETON: +/* some languages not in all windows versions or ReactOS */ +#ifdef LANG_GAELIC + case LANG_GAELIC: +#endif +#ifdef LANG_TAJIK + case LANG_TAJIK: +#endif +#ifdef LANG_ROMANSH + case LANG_ROMANSH: +#endif +#ifdef LANG_SUTU + case LANG_SUTU: +#endif +#ifdef LANG_TSONGA + case LANG_TSONGA: +#endif +#ifdef LANG_VENDA + case LANG_VENDA: +#endif +#ifdef LANG_ESPERANTO + case LANG_ESPERANTO: +#endif +#ifdef LANG_WALON + case LANG_WALON: +#endif +#ifdef LANG_CORNISH + case LANG_CORNISH: +#endif + nOffset = 16; + pnLookup = Lookup_16; + break; + case LANG_CZECH: case LANG_HUNGARIAN: case LANG_POLISH: + case LANG_SLOVAK: case LANG_SPANISH: + nOffset = 32; + pnLookup = Lookup_32; + break; + case LANG_HEBREW: + nOffset = 48; + pnLookup = Lookup_48; + break; + case LANG_JAPANESE: + nOffset = 64; + pnLookup = Lookup_64; + break; + case LANG_KOREAN: + nOffset = 80; + pnLookup = Lookup_80; + break; + case LANG_CHINESE: + nOffset = 112; + pnLookup = Lookup_112; + break; + case LANG_GREEK: + nOffset = 128; + pnLookup = Lookup_128; + break; + case LANG_ICELANDIC: + nOffset = 144; + pnLookup = Lookup_144; + break; + case LANG_TURKISH: + nOffset = 160; + pnLookup = Lookup_160; + break; + case LANG_NORWEGIAN: + if (SUBLANGID(LANGIDFROMLCID(lcid)) == SUBLANG_NORWEGIAN_NYNORSK) + { + nOffset = 176; + pnLookup = Lookup_176; + } + else + { + nOffset = 16; + pnLookup = Lookup_16; + } + break; + case LANG_ARABIC: + case LANG_FARSI: + nOffset = 208; + pnLookup = Lookup_208; + break; + case LANG_RUSSIAN: + nOffset = 224; + pnLookup = Lookup_224; + break; + } + + nHiWord = (nOffset | nMask) << 16; + + while (*str) + { + nLoWord = 37 * nLoWord + pnLookup[*str > 0x7f && nMask ? *str + 0x80 : *str]; + str++; + } + /* Constrain to a prime modulo and sizeof(WORD) */ + nLoWord = (nLoWord % 65599) & 0xffff; + + return nHiWord | nLoWord; +} diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c new file mode 100644 index 00000000000..c9f9355ecb0 --- /dev/null +++ b/tools/widl/typelib.c @@ -0,0 +1,391 @@ +/* + * IDL Compiler + * + * Copyright 2004 Ove Kaaven + * Copyright 2006 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/port.h" +#include "wine/wpp.h" + +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include + +#include "widl.h" +#include "utils.h" +#include "parser.h" +#include "header.h" +#include "typelib.h" +#include "widltypes.h" +#include "typelib_struct.h" +#include "typetree.h" + +static typelib_t *typelib; + +int is_ptr(const type_t *t) +{ + return type_get_type(t) == TYPE_POINTER; +} + +int is_array(const type_t *t) +{ + return type_get_type(t) == TYPE_ARRAY; +} + +/* List of oleauto types that should be recognized by name. + * (most of) these seem to be intrinsic types in mktyplib. + * This table MUST be alphabetically sorted on the kw field. + */ +static const struct oatype { + const char *kw; + unsigned short vt; +} oatypes[] = { + {"BSTR", VT_BSTR}, + {"CURRENCY", VT_CY}, + {"DATE", VT_DATE}, + {"DECIMAL", VT_DECIMAL}, + {"HRESULT", VT_HRESULT}, + {"LPSTR", VT_LPSTR}, + {"LPWSTR", VT_LPWSTR}, + {"SCODE", VT_ERROR}, + {"VARIANT", VT_VARIANT}, + {"VARIANT_BOOL", VT_BOOL} +}; +#define NTYPES (sizeof(oatypes)/sizeof(oatypes[0])) +#define KWP(p) ((const struct oatype *)(p)) + +static int kw_cmp_func(const void *s1, const void *s2) +{ + return strcmp(KWP(s1)->kw, KWP(s2)->kw); +} + +static unsigned short builtin_vt(const type_t *t) +{ + const char *kw = t->name; + struct oatype key; + const struct oatype *kwp; + key.kw = kw; +#ifdef KW_BSEARCH + kwp = bsearch(&key, oatypes, NTYPES, sizeof(oatypes[0]), kw_cmp_func); +#else + { + unsigned int i; + for (kwp=NULL, i=0; i < NTYPES; i++) + if (!kw_cmp_func(&key, &oatypes[i])) { + kwp = &oatypes[i]; + break; + } + } +#endif + if (kwp) { + return kwp->vt; + } + if (is_string_type (t->attrs, t)) + { + const type_t *elem_type; + if (is_array(t)) + elem_type = type_array_get_element(t); + else + elem_type = type_pointer_get_ref(t); + if (type_get_type(elem_type) == TYPE_BASIC) + { + switch (type_basic_get_type(elem_type)) + { + case TYPE_BASIC_CHAR: return VT_LPSTR; + case TYPE_BASIC_WCHAR: return VT_LPWSTR; + default: break; + } + } + } + return 0; +} + +static int match(const char*n, const char*m) +{ + if (!n) return 0; + return !strcmp(n, m); +} + +unsigned short get_type_vt(type_t *t) +{ + unsigned short vt; + + chat("get_type_vt: %p type->name %s\n", t, t->name); + if (t->name) { + vt = builtin_vt(t); + if (vt) return vt; + } + + if (type_is_alias(t) && is_attr(t->attrs, ATTR_PUBLIC)) + return VT_USERDEFINED; + + switch (type_get_type(t)) { + case TYPE_BASIC: + switch (type_basic_get_type(t)) { + case TYPE_BASIC_BYTE: + return VT_UI1; + case TYPE_BASIC_CHAR: + case TYPE_BASIC_INT8: + if (type_basic_get_sign(t) > 0) + return VT_UI1; + else + return VT_I1; + case TYPE_BASIC_WCHAR: + return VT_I2; /* mktyplib seems to parse wchar_t as short */ + case TYPE_BASIC_INT16: + if (type_basic_get_sign(t) > 0) + return VT_UI2; + else + return VT_I2; + case TYPE_BASIC_INT: + if (type_basic_get_sign(t) > 0) + return VT_UINT; + else + return VT_INT; + case TYPE_BASIC_INT32: + case TYPE_BASIC_ERROR_STATUS_T: + if (type_basic_get_sign(t) > 0) + return VT_UI4; + else + return VT_I4; + case TYPE_BASIC_INT64: + case TYPE_BASIC_HYPER: + if (type_basic_get_sign(t) > 0) + return VT_UI8; + else + return VT_I8; + case TYPE_BASIC_INT3264: + if (typelib_kind == SYS_WIN64) + { + if (type_basic_get_sign(t) > 0) + return VT_UI8; + else + return VT_I8; + } + else + { + if (type_basic_get_sign(t) > 0) + return VT_UI4; + else + return VT_I4; + } + case TYPE_BASIC_FLOAT: + return VT_R4; + case TYPE_BASIC_DOUBLE: + return VT_R8; + case TYPE_BASIC_HANDLE: + error("handles can't be used in typelibs\n"); + } + break; + + case TYPE_POINTER: + return VT_PTR; + + case TYPE_ARRAY: + if (type_array_is_decl_as_ptr(t)) + { + if (match(type_array_get_element(t)->name, "SAFEARRAY")) + return VT_SAFEARRAY; + } + else + error("get_type_vt: array types not supported\n"); + return VT_PTR; + + case TYPE_INTERFACE: + if(match(t->name, "IUnknown")) + return VT_UNKNOWN; + if(match(t->name, "IDispatch")) + return VT_DISPATCH; + return VT_USERDEFINED; + + case TYPE_ENUM: + case TYPE_STRUCT: + case TYPE_COCLASS: + case TYPE_MODULE: + case TYPE_UNION: + case TYPE_ENCAPSULATED_UNION: + return VT_USERDEFINED; + + case TYPE_VOID: + return VT_VOID; + + case TYPE_ALIAS: + /* aliases should be filtered out by the type_get_type call above */ + assert(0); + break; + + case TYPE_FUNCTION: + error("get_type_vt: functions not supported\n"); + break; + + case TYPE_BITFIELD: + error("get_type_vt: bitfields not supported\n"); + break; + } + return 0; +} + +void start_typelib(typelib_t *typelib_type) +{ + if (!do_typelib) return; + + typelib = typelib_type; + typelib->filename = xstrdup(typelib_name); +} + +void end_typelib(void) +{ + if (!typelib) return; + + create_msft_typelib(typelib); +} + +static void tlb_read(int fd, void *buf, int count) +{ + if(read(fd, buf, count) < count) + error("error while reading importlib.\n"); +} + +static void tlb_lseek(int fd, off_t offset) +{ + if(lseek(fd, offset, SEEK_SET) == -1) + error("lseek failed\n"); +} + +static void msft_read_guid(int fd, MSFT_SegDir *segdir, int offset, GUID *guid) +{ + tlb_lseek(fd, segdir->pGuidTab.offset+offset); + tlb_read(fd, guid, sizeof(GUID)); +} + +static void read_msft_importlib(importlib_t *importlib, int fd) +{ + MSFT_Header header; + MSFT_SegDir segdir; + int *typeinfo_offs; + int i; + + importlib->allocated = 0; + + tlb_lseek(fd, 0); + tlb_read(fd, &header, sizeof(header)); + + importlib->version = header.version; + + typeinfo_offs = xmalloc(header.nrtypeinfos*sizeof(INT)); + tlb_read(fd, typeinfo_offs, header.nrtypeinfos*sizeof(INT)); + tlb_read(fd, &segdir, sizeof(segdir)); + + msft_read_guid(fd, &segdir, header.posguid, &importlib->guid); + + importlib->ntypeinfos = header.nrtypeinfos; + importlib->importinfos = xmalloc(importlib->ntypeinfos*sizeof(importinfo_t)); + + for(i=0; i < importlib->ntypeinfos; i++) { + MSFT_TypeInfoBase base; + MSFT_NameIntro nameintro; + int len; + + tlb_lseek(fd, sizeof(MSFT_Header) + header.nrtypeinfos*sizeof(INT) + sizeof(MSFT_SegDir) + + typeinfo_offs[i]); + tlb_read(fd, &base, sizeof(base)); + + importlib->importinfos[i].importlib = importlib; + importlib->importinfos[i].flags = (base.typekind&0xf)<<24; + importlib->importinfos[i].offset = -1; + importlib->importinfos[i].id = i; + + if(base.posguid != -1) { + importlib->importinfos[i].flags |= MSFT_IMPINFO_OFFSET_IS_GUID; + msft_read_guid(fd, &segdir, base.posguid, &importlib->importinfos[i].guid); + } + else memset( &importlib->importinfos[i].guid, 0, sizeof(importlib->importinfos[i].guid)); + + tlb_lseek(fd, segdir.pNametab.offset + base.NameOffset); + tlb_read(fd, &nameintro, sizeof(nameintro)); + + len = nameintro.namelen & 0xff; + + importlib->importinfos[i].name = xmalloc(len+1); + tlb_read(fd, importlib->importinfos[i].name, len); + importlib->importinfos[i].name[len] = 0; + } + + free(typeinfo_offs); +} + +static void read_importlib(importlib_t *importlib) +{ + int fd; + INT magic; + char *file_name; + + file_name = wpp_find_include(importlib->name, NULL); + if(file_name) { + fd = open(file_name, O_RDONLY | O_BINARY ); + free(file_name); + }else { + fd = open(importlib->name, O_RDONLY | O_BINARY ); + } + + if(fd < 0) + error("Could not open importlib %s.\n", importlib->name); + + tlb_read(fd, &magic, sizeof(magic)); + + switch(magic) { + case MSFT_MAGIC: + read_msft_importlib(importlib, fd); + break; + default: + error("Wrong or unsupported typelib magic %x\n", magic); + }; + + close(fd); +} + +void add_importlib(const char *name) +{ + importlib_t *importlib; + + if(!typelib) return; + + LIST_FOR_EACH_ENTRY( importlib, &typelib->importlibs, importlib_t, entry ) + if(!strcmp(name, importlib->name)) + return; + + chat("add_importlib: %s\n", name); + + importlib = xmalloc(sizeof(*importlib)); + memset( importlib, 0, sizeof(*importlib) ); + importlib->name = xstrdup(name); + + read_importlib(importlib); + list_add_head( &typelib->importlibs, &importlib->entry ); +} diff --git a/tools/widl/typelib_struct.h b/tools/widl/typelib_struct.h new file mode 100644 index 00000000000..95d174e6e1f --- /dev/null +++ b/tools/widl/typelib_struct.h @@ -0,0 +1,605 @@ +/* + * typelib_struct.h internal wine data structures + * used to decode typelib's + * + * Copyright 1999 Rein KLazes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#ifndef _WIDL_TYPELIB_STRUCT_H +#define _WIDL_TYPELIB_STRUCT_H + +#define HELPDLLFLAG (0x0100) +#define DO_NOT_SEEK (-1) + +#define MSFT_HREFTYPE_INTHISFILE(href) (!((href) & 3)) +#define MSFT_HREFTYPE_INDEX(href) ((href) /sizeof(MSFT_TypeInfoBase)) + +/*-------------------------FILE STRUCTURES-----------------------------------*/ + +/* There are two known file formats, those created with ICreateTypeLib + * have the signature "SLTG" as their first four bytes, while those created + * with ICreateTypeLib2 have "MSFT". + */ + +#define MSFT_MAGIC 0x5446534d + +/***************************************************** + * MSFT typelibs + * + * These are TypeLibs created with ICreateTypeLib2 + * + */ + +/* + * structure of the typelib type2 header + * it is at the beginning of a type lib file + * + */ +typedef struct tagMSFT_Header { +/*0x00*/INT magic1; /* 0x5446534D "MSFT" */ + INT magic2; /* 0x00010002 version nr? */ + INT posguid; /* position of libid in guid table */ + /* (should be, else -1) */ + INT lcid; /* locale id */ +/*0x10*/INT lcid2; + INT varflags; /* (largely) unknown flags */ + /* the lower nibble is syskind */ + /* 0x40 always seems to be set */ + /* 0x10 set with a helpfile defined */ + /* 0x100 set with a helpstringdll defined - in this + case the offset to the name in the stringtable + appears right after this struct, before the + typeinfo offsets */ + INT version; /* set with SetVersion() */ + INT flags; /* set with SetFlags() */ +/*0x20*/INT nrtypeinfos; /* number of typeinfo's (till so far) */ + INT helpstring; /* position of help string in stringtable */ + INT helpstringcontext; + INT helpcontext; +/*0x30*/INT nametablecount; /* number of names in name table */ + INT nametablechars; /* nr of characters in name table */ + INT NameOffset; /* offset of name in name table */ + INT helpfile; /* position of helpfile in stringtable */ +/*0x40*/INT CustomDataOffset; /* if -1 no custom data, else it is offset */ + /* in customer data/guid offset table */ + INT res44; /* unknown always: 0x20 (guid hash size?) */ + INT res48; /* unknown always: 0x80 (name hash size?) */ + INT dispatchpos; /* HREFTYPE to IDispatch, or -1 if no IDispatch */ +/*0x50*/INT nimpinfos; /* number of impinfos */ +} MSFT_Header; + +/* segments in the type lib file have a structure like this: */ +typedef struct tagMSFT_pSeg { + INT offset; /* absolute offset in file */ + INT length; /* length of segment */ + INT res08; /* unknown always -1 */ + INT res0c; /* unknown always 0x0f in the header */ + /* 0x03 in the typeinfo_data */ +} MSFT_pSeg; + +/* layout of the main segment directory */ +typedef struct tagMSFT_SegDir { +/*1*/MSFT_pSeg pTypeInfoTab; /* each typeinfo gets an entry of 0x64 bytes */ + /* (25 ints) */ +/*2*/MSFT_pSeg pImpInfo; /* table with info for imported types */ +/*3*/MSFT_pSeg pImpFiles; /* import libraries */ +/*4*/MSFT_pSeg pRefTab; /* References table */ +/*5*/MSFT_pSeg pLibtab; /* always exists, always same size (0x80) */ + /* hash table w offsets to guid????? */ +/*6*/MSFT_pSeg pGuidTab; /* all guids are stored here together with */ + /* offset in some table???? */ +/*7*/MSFT_pSeg res07; /* always created, always same size (0x200) */ + /* purpose largely unknown */ +/*8*/MSFT_pSeg pNametab; /* name tables */ +/*9*/MSFT_pSeg pStringtab; /* string table */ +/*A*/MSFT_pSeg pTypdescTab; /* table with type descriptors */ +/*B*/MSFT_pSeg pArrayDescriptions; +/*C*/MSFT_pSeg pCustData; /* data table, used for custom data and default */ + /* parameter values */ +/*D*/MSFT_pSeg pCDGuids; /* table with offsets for the guids and into */ + /* the customer data table */ +/*E*/MSFT_pSeg res0e; /* unknown */ +/*F*/MSFT_pSeg res0f; /* unknown */ +} MSFT_SegDir; + + +/* base type info data */ +typedef struct tagMSFT_TypeInfoBase { +/*000*/ INT typekind; /* it is the TKIND_xxx */ + /* some byte alignment stuff */ + INT memoffset; /* points past the file, if no elements */ + INT res2; /* zero if no element, N*0x40 */ + INT res3; /* -1 if no element, (N-1)*0x38 */ +/*010*/ INT res4; /* always? 3 */ + INT res5; /* always? zero */ + INT cElement; /* counts elements, HI=cVars, LO=cFuncs */ + INT res7; /* always? zero */ +/*020*/ INT res8; /* always? zero */ + INT res9; /* always? zero */ + INT resA; /* always? zero */ + INT posguid; /* position in guid table */ +/*030*/ INT flags; /* Typeflags */ + INT NameOffset; /* offset in name table */ + INT version; /* element version */ + INT docstringoffs; /* offset of docstring in string tab */ +/*040*/ INT helpstringcontext; /* */ + INT helpcontext; /* */ + INT oCustData; /* offset in customer data table */ +#ifdef WORDS_BIGENDIAN + INT16 cbSizeVft; /* virtual table size, including inherits */ + INT16 cImplTypes; /* nr of implemented interfaces */ +#else + INT16 cImplTypes; /* nr of implemented interfaces */ + INT16 cbSizeVft; /* virtual table size, including inherits */ +#endif +/*050*/ INT size; /* size in bytes, at least for structures */ + /* FIXME: name of this field */ + INT datatype1; /* position in type description table */ + /* or in base interfaces */ + /* if coclass: offset in reftable */ + /* if interface: reference to inherited if */ + INT datatype2; /* for interfaces: hiword is num of inherited funcs */ + /* loword is num of inherited interfaces */ + INT res18; /* always? 0 */ +/*060*/ INT res19; /* always? -1 */ +} MSFT_TypeInfoBase; + +/* layout of an entry with information on imported types */ +typedef struct tagMSFT_ImpInfo { + INT flags; /* bits 0 - 15: count */ + /* bit 16: if set oGuid is an offset to Guid */ + /* if clear oGuid is a typeinfo index in the specified typelib */ + /* bits 24 - 31: TKIND of reference */ + INT oImpFile; /* offset in the Import File table */ + INT oGuid; /* offset in Guid table or typeinfo index (see bit 16 of flags) */ +} MSFT_ImpInfo; + +#define MSFT_IMPINFO_OFFSET_IS_GUID 0x00010000 + +/* function description data */ +typedef struct { +/* INT recsize; record size including some extra stuff */ + INT DataType; /* data type of the member, eg return of function */ + INT Flags; /* something to do with attribute flags (LOWORD) */ +#ifdef WORDS_BIGENDIAN + INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */ + INT16 VtableOffset; /* offset in vtable */ +#else + INT16 VtableOffset; /* offset in vtable */ + INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */ +#endif + INT FKCCIC; /* bit string with the following */ + /* meaning (bit 0 is the lsb): */ + /* bits 0 - 2: FUNCKIND */ + /* bits 3 - 6: INVOKEKIND */ + /* bit 7: custom data present */ + /* bits 8 - 11: CALLCONV */ + /* bit 12: parameters have default values */ + /* bit 13: oEntry is numeric */ + /* bit 14: has retval param */ + /* bits 16 - 31: index of next function with same id */ +#ifdef WORDS_BIGENDIAN + INT16 nroargs; /* nr of optional arguments */ + INT16 nrargs; /* number of arguments (including optional ????) */ +#else + INT16 nrargs; /* number of arguments (including optional ????) */ + INT16 nroargs; /* nr of optional arguments */ +#endif + /* optional attribute fields, the number of them is variable */ + INT OptAttr[1]; +/* +0* INT helpcontext; +1* INT oHelpString; +2* INT oEntry; // either offset in string table or numeric as it is (see bit 13 of FKCCIC) // +3* INT res9; // unknown (-1) // +4* INT resA; // unknown (-1) // +5* INT HelpStringContext; + // these are controlled by a bit set in the FKCCIC field // +6* INT oCustData; // custom data for function // +7* INT oArgCustData[1]; // custom data per argument // +*/ +} MSFT_FuncRecord; + +/* after this may follow an array with default value pointers if the + * appropriate bit in the FKCCIC field has been set: + * INT oDefautlValue[nrargs]; + */ + + /* Parameter info one per argument*/ +typedef struct { + INT DataType; + INT oName; + INT Flags; + } MSFT_ParameterInfo; + +/* Variable description data */ +typedef struct { +/* INT recsize; // record size including some extra stuff */ + INT DataType; /* data type of the variable */ + INT Flags; /* VarFlags (LOWORD) */ +#ifdef WORDS_BIGENDIAN + INT16 vardescsize; /* size of reconstituted VARDESC and related structs */ + INT16 VarKind; /* VarKind */ +#else + INT16 VarKind; /* VarKind */ + INT16 vardescsize; /* size of reconstituted VARDESC and related structs */ +#endif + INT OffsValue; /* value of the variable or the offset */ + /* in the data structure */ + /* optional attribute fields, the number of them is variable */ + /* controlled by record length */ + INT HelpContext; + INT oHelpString; + INT res9; /* unknown (-1) */ + INT oCustData; /* custom data for variable */ + INT HelpStringContext; + +} MSFT_VarRecord; + +/* Structure of the reference data */ +typedef struct { + INT reftype; /* either offset in type info table, then it's */ + /* a multiple of 64 */ + /* or offset in the external reference table */ + /* with an offset of 1 */ + INT flags; + INT oCustData; /* custom data */ + INT onext; /* next offset, -1 if last */ +} MSFT_RefRecord; + +/* this is how a guid is stored */ +typedef struct { + GUID guid; + INT hreftype; /* -2 for the typelib guid, typeinfo offset + for typeinfo guid, low two bits are 01 if + this is an imported typeinfo, low two bits + are 10 if this is an imported typelib (used + by imported typeinfos) */ + INT next_hash; /* offset to next guid in the hash bucket */ +} MSFT_GuidEntry; +/* some data preceding entries in the name table */ +typedef struct { + INT hreftype; /* is -1 if name is for neither a typeinfo, + a variable, or a function (that is, name + is for a typelib or a function parameter). + otherwise is the offset of the first + typeinfo that this name refers to (either + to the typeinfo itself or to a member of + the typeinfo */ + INT next_hash; /* offset to next name in the hash bucket */ + INT namelen; /* only lower 8 bits are valid */ + /* 0x1000 if name is only used once as a variable name */ + /* 0x2000 if name is a variable in an enumeration */ + /* 0x3800 if name is typeinfo name */ + /* upper 16 bits are hash code */ +} MSFT_NameIntro; +/* the custom data table directory has entries like this */ +typedef struct { + INT GuidOffset; + INT DataOffset; + INT next; /* next offset in the table, -1 if it's the last */ +} MSFT_CDGuid; + + +/*********************************************************** + * + * SLTG typelibs. + * + * These are created with ICreateTypeLib + * + */ + +#include + +typedef struct { +/*00*/ DWORD SLTG_magic; /* 0x47544c53 == "SLTG" */ +/*04*/ WORD nrOfFileBlks; /* no of SLTG_BlkEntry's + 1 */ +/*06*/ WORD res06; /* ?? always 9 */ +/*08*/ WORD res08; /* some kind of len/offset ?? */ +/*0a*/ WORD first_blk; /* 1 based index into blk entries that + corresponds to first block in file */ +/*0c*/ DWORD res0c; /* always 0x000204ff */ +/*10*/ DWORD res10; /* always 0x00000000 */ +/*14*/ DWORD res14; /* always 0x000000c0 */ +/*18*/ DWORD res18; /* always 0x46000000 */ +/*1c*/ DWORD res1c; /* always 0x00000044 */ +/*20*/ DWORD res20; /* always 0xffff0000 */ +} SLTG_Header; + +/* This gets followed by a list of block entries */ +typedef struct { +/*00*/ DWORD len; +/*04*/ WORD index_string; /* offs from start of SLTG_Magic to index string */ +/*06*/ WORD next; +} SLTG_BlkEntry; + +/* The order of the blocks in the file is given by starting at Block + entry firt_blk and stepping through using the next pointer */ + +/* These then get followed by this magic */ +typedef struct { +/*00*/ BYTE res00; /* always 0x01 */ +/*01*/ CHAR CompObj_magic[8]; /* always "CompObj" */ +/*09*/ CHAR dir_magic[4]; /* always "dir" */ +} SLTG_Magic; + +#define SLTG_COMPOBJ_MAGIC "CompObj" +#define SLTG_DIR_MAGIC "dir" + +/* Next we have SLTG_Header.nrOfFileBlks - 2 of Index strings. These +are presumably unique to within the file and look something like +"AAAAAAAAAA" with the first character incremented from 'A' to ensure +uniqueness. I guess successive chars increment when we need to wrap +the first one. */ + +typedef struct { +/*00*/ CHAR string[11]; +} SLTG_Index; + + +/* This is followed by SLTG_pad9 */ +typedef struct { +/*00*/ CHAR pad[9]; /* 9 '\0's */ +} SLTG_Pad9; + + +/* Now we have the noOfFileBlks - 1 worth of blocks. The length of +each block is given by its entry in SLTG_BlkEntry. */ + +/* type SLTG_NAME in rather like a BSTR except that the length in +bytes is given by the first WORD and the string contains 8bit chars */ + +typedef WORD SLTG_Name; + +/* The main library block looks like this. This one seems to come last */ + +typedef struct { +/*00*/ WORD magic; /* 0x51cc */ +/*02*/ WORD res02; /* 0x0003, 0x0004 */ +/*04*/ WORD name; /* offset to name in name table */ +/*06*/ SLTG_Name res06; /* maybe this is just WORD == 0xffff */ + SLTG_Name helpstring; + SLTG_Name helpfile; + DWORD helpcontext; + WORD syskind; /* == 1 for win32, 0 for win16 */ + WORD lcid; /* == 0x409, 0x809 etc */ + DWORD res12; /* == 0 */ + WORD libflags; /* LIBFLAG_* */ + WORD maj_vers; + WORD min_vers; + GUID uuid; +} SLTG_LibBlk; + +#define SLTG_LIBBLK_MAGIC 0x51cc + +/* we then get 0x40 bytes worth of 0xffff or small numbers followed by + nrOfFileBlks - 2 of these */ +typedef struct { + WORD small_no; + SLTG_Name index_name; /* This refers to a name in the directory */ + SLTG_Name other_name; /* Another one of these weird names */ + WORD res1a; /* 0xffff */ + WORD name_offs; /* offset to name in name table */ + WORD more_bytes; /* if this is non-zero we get this many + bytes before the next element, which seem + to reference the docstring of the type ? */ + WORD res20; /* 0xffff */ + DWORD helpcontext; + WORD res26; /* 0xffff */ + GUID uuid; +} SLTG_OtherTypeInfo; + +/* Next we get WORD 0x0003 followed by a DWORD which if we add to +0x216 gives the offset to the name table from the start of the LibBlk +struct */ + +typedef struct { +/*00*/ WORD magic; /* 0x0501 */ +/*02*/ DWORD href_table; /* if not 0xffffffff, then byte offset from + beginning of struct to href table */ +/*06*/ DWORD res06; /* 0xffffffff */ +/*0a*/ DWORD elem_table; /* offset to members */ +/*0e*/ DWORD res0e; /* 0xffffffff */ +/*12*/ WORD major_version; /* major version number */ +/*14*/ WORD minor_version; /* minor version number */ +/*16*/ DWORD res16; /* 0xfffe0000 */ +/*1a*/ BYTE typeflags1;/* 0x02 | top 5 bits hold l5sbs of TYPEFLAGS */ +/*1b*/ BYTE typeflags2;/* TYPEFLAGS >> 5 */ +/*1c*/ BYTE typeflags3;/* 0x02*/ +/*1d*/ BYTE typekind; /* 0x03 == TKIND_INTERFACE etc. */ +/*1e*/ DWORD res1e; /* 0x00000000 or 0xffffffff */ +} SLTG_TypeInfoHeader; + +#define SLTG_TIHEADER_MAGIC 0x0501 + +typedef struct { +/*00*/ WORD cFuncs; +/*02*/ WORD cVars; +/*04*/ WORD cImplTypes; +/*06*/ WORD res06; +/*08*/ WORD res08; +/*0a*/ WORD res0a; +/*0c*/ WORD res0c; +/*0e*/ WORD res0e; +/*10*/ WORD res10; +/*12*/ WORD res12; +/*14*/ WORD tdescalias_vt; /* for TKIND_ALIAS */ +/*16*/ WORD res16; +/*18*/ WORD res18; +/*1a*/ WORD res1a; +/*1c*/ WORD res1c; +/*1e*/ WORD res1e; +/*20*/ WORD cbSizeInstance; +/*22*/ WORD cbAlignment; +/*24*/ WORD res24; +/*26*/ WORD res26; +/*28*/ WORD cbSizeVft; +/*2a*/ WORD res2a; +/*2c*/ WORD res2c; +/*2e*/ WORD res2e; +/*30*/ WORD res30; +/*32*/ WORD res32; +/*34*/ WORD res34; +} SLTG_TypeInfoTail; + +typedef struct { +/*00*/ WORD res00; /* 0x0001 sometimes 0x0003 ?? */ +/*02*/ WORD res02; /* 0xffff */ +/*04*/ BYTE res04; /* 0x01 */ +/*05*/ DWORD cbExtra; /* No of bytes that follow */ +} SLTG_MemberHeader; + +typedef struct { +/*00*/ WORD magic; /* 0x120a */ +/*02*/ WORD next; /* offset in bytes to next block from start of block + group, 0xffff if last item */ +/*04*/ WORD name; /* offset to name within name table */ +/*06*/ WORD value; /* offset to value from start of block group */ +/*08*/ WORD res08; /* 0x56 */ +/*0a*/ DWORD memid; /* memid */ +/*0e*/ WORD helpcontext;/* 0xfffe == no context, 0x0001 == stored in EnumInfo struct, else offset + to value from start of block group */ +/*10*/ WORD helpstring;/* offset from start of block group to string offset */ +} SLTG_EnumItem; + +#define SLTG_ENUMITEM_MAGIC 0x120a + +typedef struct { +/*00*/ WORD vt; /* vartype, 0xffff marks end. */ +/*02*/ WORD res02; /* ?, 0xffff marks end */ +} SLTG_AliasItem; + +#define SLTG_ALIASITEM_MAGIC 0x001d + + +typedef struct { + BYTE magic; /* 0x4c or 0x6c */ + BYTE inv; /* high nibble is INVOKE_KIND, low nibble = 2 */ + WORD next; /* byte offset from beginning of group to next fn */ + WORD name; /* Offset within name table to name */ + DWORD dispid; /* dispid */ + WORD helpcontext; /* helpcontext (again 1 is special) */ + WORD helpstring;/* helpstring offset to offset */ + WORD arg_off; /* offset to args from start of block */ + BYTE nacc; /* lowest 3bits are CALLCONV, rest are no of args */ + BYTE retnextopt;/* if 0x80 bit set ret type follows else next WORD + is offset to ret type. No of optional args is + middle 6 bits */ + WORD rettype; /* return type VT_?? or offset to ret type */ + WORD vtblpos; /* position in vtbl? */ + WORD funcflags; /* present if magic == 0x6c */ +/* Param list starts, repeat next two as required */ +#if 0 + WORD name; /* offset to 2nd letter of name */ + WORD+ type; /* VT_ of param */ +#endif +} SLTG_Function; + +#define SLTG_FUNCTION_MAGIC 0x4c +#define SLTG_FUNCTION_WITH_FLAGS_MAGIC 0x6c + +typedef struct { +/*00*/ BYTE magic; /* 0xdf */ +/*01*/ BYTE res01; /* 0x00 */ +/*02*/ DWORD res02; /* 0xffffffff */ +/*06*/ DWORD res06; /* 0xffffffff */ +/*0a*/ DWORD res0a; /* 0xffffffff */ +/*0e*/ DWORD res0e; /* 0xffffffff */ +/*12*/ DWORD res12; /* 0xffffffff */ +/*16*/ DWORD res16; /* 0xffffffff */ +/*1a*/ DWORD res1a; /* 0xffffffff */ +/*1e*/ DWORD res1e; /* 0xffffffff */ +/*22*/ DWORD res22; /* 0xffffffff */ +/*26*/ DWORD res26; /* 0xffffffff */ +/*2a*/ DWORD res2a; /* 0xffffffff */ +/*2e*/ DWORD res2e; /* 0xffffffff */ +/*32*/ DWORD res32; /* 0xffffffff */ +/*36*/ DWORD res36; /* 0xffffffff */ +/*3a*/ DWORD res3a; /* 0xffffffff */ +/*3e*/ DWORD res3e; /* 0xffffffff */ +/*42*/ WORD res42; /* 0xffff */ +/*44*/ DWORD number; /* this is 8 times the number of refs */ +/*48*/ /* Now we have number bytes (8 for each ref) of SLTG_UnknownRefInfo */ + +/*50*/ WORD res50; /* 0xffff */ +/*52*/ BYTE res52; /* 0x01 */ +/*53*/ DWORD res53; /* 0x00000000 */ +/*57*/ SLTG_Name names[1]; + /* Now we have number/8 SLTG_Names (first WORD is no of bytes in the ascii + * string). Strings look like "*\Rxxxx*#n". If xxxx == ffff then the + * ref refers to the nth type listed in this library (0 based). Else + * the xxxx (which maybe fewer than 4 digits) is the offset into the name + * table to a string "*\G{}#1.0#0#C:\WINNT\System32\stdole32.tlb#" + * The guid is the typelib guid; the ref again refers to the nth type of + * the imported typelib. + */ + +/*xx*/ BYTE resxx; /* 0xdf */ + +} SLTG_RefInfo; + +#define SLTG_REF_MAGIC 0xdf + +typedef struct { + WORD res00; /* 0x0001 */ + BYTE res02; /* 0x02 */ + BYTE res03; /* 0x40 if internal ref, 0x00 if external ? */ + WORD res04; /* 0xffff */ + WORD res06; /* 0x0000, 0x0013 or 0xffff ?? */ +} SLTG_UnknownRefInfo; + +typedef struct { + WORD res00; /* 0x004a */ + WORD next; /* byte offs to next interface */ + WORD res04; /* 0xffff */ + BYTE impltypeflags; /* IMPLTYPEFLAG_* */ + BYTE res07; /* 0x80 */ + WORD res08; /* 0x0012, 0x0028 ?? */ + WORD ref; /* number in ref table ? */ + WORD res0c; /* 0x4000 */ + WORD res0e; /* 0xfffe */ + WORD res10; /* 0xffff */ + WORD res12; /* 0x001d */ + WORD pos_in_table; /* 0x0, 0x4, ? */ +} SLTG_ImplInfo; + +#define SLTG_IMPL_MAGIC 0x004a + +typedef struct { + BYTE magic; /* 0x0a */ + BYTE typepos; + WORD next; + WORD name; + WORD byte_offs; /* pos in struct */ + WORD type; /* if typepos == 0x02 this is the type, else offset to type */ + DWORD memid; + WORD helpcontext; /* ?? */ + WORD helpstring; /* ?? */ +} SLTG_RecordItem; + +#define SLTG_RECORD_MAGIC 0x0a + + +/* CARRAYs look like this +WORD type == VT_CARRAY +WORD offset from start of block to SAFEARRAY +WORD typeofarray +*/ + +#include + +/*---------------------------END--------------------------------------------*/ +#endif diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c new file mode 100644 index 00000000000..6e7098a0415 --- /dev/null +++ b/tools/widl/write_msft.c @@ -0,0 +1,2612 @@ +/* + * Typelib v2 (MSFT) generation + * + * Copyright 2004 Alastair Bridgewater + * 2004, 2005 Huw Davies + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * -------------------------------------------------------------------------------------- + * Known problems: + * + * Badly incomplete. + * + * Only works on little-endian systems. + * + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include +#include +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include +#include + +#include "widl.h" +#include "typelib.h" +#include "typelib_struct.h" +#include "utils.h" +#include "header.h" +#include "hash.h" +#include "typetree.h" + +enum MSFT_segment_index { + MSFT_SEG_TYPEINFO = 0, /* type information */ + MSFT_SEG_IMPORTINFO, /* import information */ + MSFT_SEG_IMPORTFILES, /* import filenames */ + MSFT_SEG_REFERENCES, /* references (?) */ + MSFT_SEG_GUIDHASH, /* hash table for guids? */ + MSFT_SEG_GUID, /* guid storage */ + MSFT_SEG_NAMEHASH, /* hash table for names */ + MSFT_SEG_NAME, /* name storage */ + MSFT_SEG_STRING, /* string storage */ + MSFT_SEG_TYPEDESC, /* type descriptions */ + MSFT_SEG_ARRAYDESC, /* array descriptions */ + MSFT_SEG_CUSTDATA, /* custom data */ + MSFT_SEG_CUSTDATAGUID, /* custom data guids */ + MSFT_SEG_UNKNOWN, /* ??? */ + MSFT_SEG_UNKNOWN2, /* ??? */ + MSFT_SEG_MAX /* total number of segments */ +}; + +typedef struct tagMSFT_ImpFile { + int guid; + LCID lcid; + int version; + char filename[0]; /* preceded by two bytes of encoded (length << 2) + flags in the low two bits. */ +} MSFT_ImpFile; + +typedef struct _msft_typelib_t +{ + typelib_t *typelib; + MSFT_Header typelib_header; + MSFT_pSeg typelib_segdir[MSFT_SEG_MAX]; + char *typelib_segment_data[MSFT_SEG_MAX]; + int typelib_segment_block_length[MSFT_SEG_MAX]; + + INT typelib_typeinfo_offsets[0x200]; /* Hope that's enough. */ + + INT *typelib_namehash_segment; + INT *typelib_guidhash_segment; + + INT help_string_dll_offset; + + struct _msft_typeinfo_t *typeinfos; + struct _msft_typeinfo_t *last_typeinfo; +} msft_typelib_t; + +typedef struct _msft_typeinfo_t +{ + msft_typelib_t *typelib; + MSFT_TypeInfoBase *typeinfo; + + int typekind; + + unsigned int var_data_allocated; + int *var_data; + + unsigned int func_data_allocated; + int *func_data; + + int vars_allocated; + int *var_indices; + int *var_names; + int *var_offsets; + + int funcs_allocated; + int *func_indices; + int *func_names; + int *func_offsets; + + int datawidth; + + struct _msft_typeinfo_t *next_typeinfo; +} msft_typeinfo_t; + + + +/*================== Internal functions ===================================*/ + +/**************************************************************************** + * ctl2_init_header + * + * Initializes the type library header of a new typelib. + */ +static void ctl2_init_header( + msft_typelib_t *typelib) /* [I] The typelib to initialize. */ +{ + typelib->typelib_header.magic1 = 0x5446534d; + typelib->typelib_header.magic2 = 0x00010002; + typelib->typelib_header.posguid = -1; + typelib->typelib_header.lcid = 0x0409; + typelib->typelib_header.lcid2 = 0x0; + typelib->typelib_header.varflags = 0x40; + typelib->typelib_header.version = 0; + typelib->typelib_header.flags = 0; + typelib->typelib_header.nrtypeinfos = 0; + typelib->typelib_header.helpstring = -1; + typelib->typelib_header.helpstringcontext = 0; + typelib->typelib_header.helpcontext = 0; + typelib->typelib_header.nametablecount = 0; + typelib->typelib_header.nametablechars = 0; + typelib->typelib_header.NameOffset = -1; + typelib->typelib_header.helpfile = -1; + typelib->typelib_header.CustomDataOffset = -1; + typelib->typelib_header.res44 = 0x20; + typelib->typelib_header.res48 = 0x80; + typelib->typelib_header.dispatchpos = -1; + typelib->typelib_header.nimpinfos = 0; +} + +/**************************************************************************** + * ctl2_init_segdir + * + * Initializes the segment directory of a new typelib. + */ +static void ctl2_init_segdir( + msft_typelib_t *typelib) /* [I] The typelib to initialize. */ +{ + int i; + MSFT_pSeg *segdir; + + segdir = &typelib->typelib_segdir[MSFT_SEG_TYPEINFO]; + + for (i = 0; i < 15; i++) { + segdir[i].offset = -1; + segdir[i].length = 0; + segdir[i].res08 = -1; + segdir[i].res0c = 0x0f; + } +} + +/**************************************************************************** + * ctl2_hash_guid + * + * Generates a hash key from a GUID. + * + * RETURNS + * + * The hash key for the GUID. + */ +static int ctl2_hash_guid( + REFGUID guid) /* [I] The guid to hash. */ +{ + int hash; + int i; + + hash = 0; + for (i = 0; i < 8; i ++) { + hash ^= ((const short *)guid)[i]; + } + + return hash & 0x1f; +} + +/**************************************************************************** + * ctl2_find_guid + * + * Locates a guid in a type library. + * + * RETURNS + * + * The offset into the GUID segment of the guid, or -1 if not found. + */ +static int ctl2_find_guid( + msft_typelib_t *typelib, /* [I] The typelib to operate against. */ + int hash_key, /* [I] The hash key for the guid. */ + REFGUID guid) /* [I] The guid to find. */ +{ + int offset; + MSFT_GuidEntry *guidentry; + + offset = typelib->typelib_guidhash_segment[hash_key]; + while (offset != -1) { + guidentry = (MSFT_GuidEntry *)&typelib->typelib_segment_data[MSFT_SEG_GUID][offset]; + + if (!memcmp(guidentry, guid, sizeof(GUID))) return offset; + + offset = guidentry->next_hash; + } + + return offset; +} + +/**************************************************************************** + * ctl2_find_name + * + * Locates a name in a type library. + * + * RETURNS + * + * The offset into the NAME segment of the name, or -1 if not found. + * + * NOTES + * + * The name must be encoded as with ctl2_encode_name(). + */ +static int ctl2_find_name( + msft_typelib_t *typelib, /* [I] The typelib to operate against. */ + char *name) /* [I] The encoded name to find. */ +{ + int offset; + int *namestruct; + + offset = typelib->typelib_namehash_segment[name[2] & 0x7f]; + while (offset != -1) { + namestruct = (int *)&typelib->typelib_segment_data[MSFT_SEG_NAME][offset]; + + if (!((namestruct[2] ^ *((int *)name)) & 0xffff00ff)) { + /* hash codes and lengths match, final test */ + if (!strncasecmp(name+4, (void *)(namestruct+3), name[0])) break; + } + + /* move to next item in hash bucket */ + offset = namestruct[1]; + } + + return offset; +} + +/**************************************************************************** + * ctl2_encode_name + * + * Encodes a name string to a form suitable for storing into a type library + * or comparing to a name stored in a type library. + * + * RETURNS + * + * The length of the encoded name, including padding and length+hash fields. + * + * NOTES + * + * Will throw an exception if name or result are NULL. Is not multithread + * safe in the slightest. + */ +static int ctl2_encode_name( + msft_typelib_t *typelib, /* [I] The typelib to operate against (used for LCID only). */ + const char *name, /* [I] The name string to encode. */ + char **result) /* [O] A pointer to a pointer to receive the encoded name. */ +{ + int length; + static char converted_name[0x104]; + int offset; + int value; + + length = strlen(name); + memcpy(converted_name + 4, name, length); + + converted_name[length + 4] = 0; + + + value = lhash_val_of_name_sys(typelib->typelib_header.varflags & 0x0f, typelib->typelib_header.lcid, converted_name + 4); + +#ifdef WORDS_BIGENDIAN + converted_name[3] = length & 0xff; + converted_name[2] = 0x00; + converted_name[1] = value; + converted_name[0] = value >> 8; +#else + converted_name[0] = length & 0xff; + converted_name[1] = 0x00; + converted_name[2] = value; + converted_name[3] = value >> 8; +#endif + + for (offset = (4 - length) & 3; offset; offset--) converted_name[length + offset + 3] = 0x57; + + *result = converted_name; + + return (length + 7) & ~3; +} + +/**************************************************************************** + * ctl2_encode_string + * + * Encodes a string to a form suitable for storing into a type library or + * comparing to a string stored in a type library. + * + * RETURNS + * + * The length of the encoded string, including padding and length fields. + * + * NOTES + * + * Will throw an exception if string or result are NULL. Is not multithread + * safe in the slightest. + */ +static int ctl2_encode_string( + const char *string, /* [I] The string to encode. */ + char **result) /* [O] A pointer to a pointer to receive the encoded string. */ +{ + int length; + static char converted_string[0x104]; + int offset; + + length = strlen(string); + memcpy(converted_string + 2, string, length); + +#ifdef WORDS_BIGENDIAN + converted_string[1] = length & 0xff; + converted_string[0] = (length >> 8) & 0xff; +#else + converted_string[0] = length & 0xff; + converted_string[1] = (length >> 8) & 0xff; +#endif + + if(length < 3) { /* strings of this length are padded with up to 8 bytes incl the 2 byte length */ + for(offset = 0; offset < 4; offset++) + converted_string[length + offset + 2] = 0x57; + length += 4; + } + for (offset = (4 - (length + 2)) & 3; offset; offset--) converted_string[length + offset + 1] = 0x57; + + *result = converted_string; + + return (length + 5) & ~3; +} + +/**************************************************************************** + * ctl2_alloc_segment + * + * Allocates memory from a segment in a type library. + * + * RETURNS + * + * Success: The offset within the segment of the new data area. + * + * BUGS + * + * Does not (yet) handle the case where the allocated segment memory needs to grow. + */ +static int ctl2_alloc_segment( + msft_typelib_t *typelib, /* [I] The type library in which to allocate. */ + enum MSFT_segment_index segment, /* [I] The segment in which to allocate. */ + int size, /* [I] The amount to allocate. */ + int block_size) /* [I] Initial allocation block size, or 0 for default. */ +{ + int offset; + + if(!typelib->typelib_segment_data[segment]) { + if (!block_size) block_size = 0x2000; + + typelib->typelib_segment_block_length[segment] = block_size; + typelib->typelib_segment_data[segment] = xmalloc(block_size); + if (!typelib->typelib_segment_data[segment]) return -1; + memset(typelib->typelib_segment_data[segment], 0x57, block_size); + } + + while ((typelib->typelib_segdir[segment].length + size) > typelib->typelib_segment_block_length[segment]) { + char *block; + + block_size = typelib->typelib_segment_block_length[segment]; + block = xrealloc(typelib->typelib_segment_data[segment], block_size << 1); + + if (segment == MSFT_SEG_TYPEINFO) { + /* TypeInfos have a direct pointer to their memory space, so we have to fix them up. */ + msft_typeinfo_t *typeinfo; + + for (typeinfo = typelib->typeinfos; typeinfo; typeinfo = typeinfo->next_typeinfo) { + typeinfo->typeinfo = (void *)&block[((char *)typeinfo->typeinfo) - typelib->typelib_segment_data[segment]]; + } + } + + memset(block + block_size, 0x57, block_size); + typelib->typelib_segment_block_length[segment] = block_size << 1; + typelib->typelib_segment_data[segment] = block; + } + + offset = typelib->typelib_segdir[segment].length; + typelib->typelib_segdir[segment].length += size; + + return offset; +} + +/**************************************************************************** + * ctl2_alloc_typeinfo + * + * Allocates and initializes a typeinfo structure in a type library. + * + * RETURNS + * + * Success: The offset of the new typeinfo. + * Failure: -1 (this is invariably an out of memory condition). + */ +static int ctl2_alloc_typeinfo( + msft_typelib_t *typelib, /* [I] The type library to allocate in. */ + int nameoffset) /* [I] The offset of the name for this typeinfo. */ +{ + int offset; + MSFT_TypeInfoBase *typeinfo; + + offset = ctl2_alloc_segment(typelib, MSFT_SEG_TYPEINFO, sizeof(MSFT_TypeInfoBase), 0); + + typelib->typelib_typeinfo_offsets[typelib->typelib_header.nrtypeinfos++] = offset; + + typeinfo = (void *)(typelib->typelib_segment_data[MSFT_SEG_TYPEINFO] + offset); + + typeinfo->typekind = (typelib->typelib_header.nrtypeinfos - 1) << 16; + typeinfo->memoffset = -1; /* should be EOF if no elements */ + typeinfo->res2 = 0; + typeinfo->res3 = -1; + typeinfo->res4 = 3; + typeinfo->res5 = 0; + typeinfo->cElement = 0; + typeinfo->res7 = 0; + typeinfo->res8 = 0; + typeinfo->res9 = 0; + typeinfo->resA = 0; + typeinfo->posguid = -1; + typeinfo->flags = 0; + typeinfo->NameOffset = nameoffset; + typeinfo->version = 0; + typeinfo->docstringoffs = -1; + typeinfo->helpstringcontext = 0; + typeinfo->helpcontext = 0; + typeinfo->oCustData = -1; + typeinfo->cbSizeVft = 0; + typeinfo->cImplTypes = 0; + typeinfo->size = 0; + typeinfo->datatype1 = -1; + typeinfo->datatype2 = 0; + typeinfo->res18 = 0; + typeinfo->res19 = -1; + + return offset; +} + +/**************************************************************************** + * ctl2_alloc_guid + * + * Allocates and initializes a GUID structure in a type library. Also updates + * the GUID hash table as needed. + * + * RETURNS + * + * Success: The offset of the new GUID. + */ +static int ctl2_alloc_guid( + msft_typelib_t *typelib, /* [I] The type library to allocate in. */ + MSFT_GuidEntry *guid) /* [I] The GUID to store. */ +{ + int offset; + MSFT_GuidEntry *guid_space; + int hash_key; + + hash_key = ctl2_hash_guid(&guid->guid); + + offset = ctl2_find_guid(typelib, hash_key, &guid->guid); + if (offset != -1) return offset; + + offset = ctl2_alloc_segment(typelib, MSFT_SEG_GUID, sizeof(MSFT_GuidEntry), 0); + + guid_space = (void *)(typelib->typelib_segment_data[MSFT_SEG_GUID] + offset); + *guid_space = *guid; + + guid_space->next_hash = typelib->typelib_guidhash_segment[hash_key]; + typelib->typelib_guidhash_segment[hash_key] = offset; + + return offset; +} + +/**************************************************************************** + * ctl2_alloc_name + * + * Allocates and initializes a name within a type library. Also updates the + * name hash table as needed. + * + * RETURNS + * + * Success: The offset within the segment of the new name. + * Failure: -1 (this is invariably an out of memory condition). + */ +static int ctl2_alloc_name( + msft_typelib_t *typelib, /* [I] The type library to allocate in. */ + const char *name) /* [I] The name to store. */ +{ + int length; + int offset; + MSFT_NameIntro *name_space; + char *encoded_name; + + length = ctl2_encode_name(typelib, name, &encoded_name); + + offset = ctl2_find_name(typelib, encoded_name); + if (offset != -1) return offset; + + offset = ctl2_alloc_segment(typelib, MSFT_SEG_NAME, length + 8, 0); + + name_space = (void *)(typelib->typelib_segment_data[MSFT_SEG_NAME] + offset); + name_space->hreftype = -1; + name_space->next_hash = -1; + memcpy(&name_space->namelen, encoded_name, length); + + if (typelib->typelib_namehash_segment[encoded_name[2] & 0x7f] != -1) + name_space->next_hash = typelib->typelib_namehash_segment[encoded_name[2] & 0x7f]; + + typelib->typelib_namehash_segment[encoded_name[2] & 0x7f] = offset; + + typelib->typelib_header.nametablecount += 1; + typelib->typelib_header.nametablechars += *encoded_name; + + return offset; +} + +/**************************************************************************** + * ctl2_alloc_string + * + * Allocates and initializes a string in a type library. + * + * RETURNS + * + * Success: The offset within the segment of the new string. + * Failure: -1 (this is invariably an out of memory condition). + */ +static int ctl2_alloc_string( + msft_typelib_t *typelib, /* [I] The type library to allocate in. */ + const char *string) /* [I] The string to store. */ +{ + int length; + int offset; + char *string_space; + char *encoded_string; + + length = ctl2_encode_string(string, &encoded_string); + + for (offset = 0; offset < typelib->typelib_segdir[MSFT_SEG_STRING].length; + offset += ((((typelib->typelib_segment_data[MSFT_SEG_STRING][offset + 1] << 8) & 0xff) + | (typelib->typelib_segment_data[MSFT_SEG_STRING][offset + 0] & 0xff)) + 5) & ~3) { + if (!memcmp(encoded_string, typelib->typelib_segment_data[MSFT_SEG_STRING] + offset, length)) return offset; + } + + offset = ctl2_alloc_segment(typelib, MSFT_SEG_STRING, length, 0); + + string_space = typelib->typelib_segment_data[MSFT_SEG_STRING] + offset; + memcpy(string_space, encoded_string, length); + + return offset; +} + +/**************************************************************************** + * alloc_msft_importinfo + * + * Allocates and initializes an import information structure in a type library. + * + * RETURNS + * + * Success: The offset of the new importinfo. + * Failure: -1 (this is invariably an out of memory condition). + */ +static int alloc_msft_importinfo( + msft_typelib_t *typelib, /* [I] The type library to allocate in. */ + MSFT_ImpInfo *impinfo) /* [I] The import information to store. */ +{ + int offset; + MSFT_ImpInfo *impinfo_space; + + for (offset = 0; + offset < typelib->typelib_segdir[MSFT_SEG_IMPORTINFO].length; + offset += sizeof(MSFT_ImpInfo)) { + if (!memcmp(&(typelib->typelib_segment_data[MSFT_SEG_IMPORTINFO][offset]), + impinfo, sizeof(MSFT_ImpInfo))) { + return offset; + } + } + + impinfo->flags |= typelib->typelib_header.nimpinfos++; + + offset = ctl2_alloc_segment(typelib, MSFT_SEG_IMPORTINFO, sizeof(MSFT_ImpInfo), 0); + + impinfo_space = (void *)(typelib->typelib_segment_data[MSFT_SEG_IMPORTINFO] + offset); + *impinfo_space = *impinfo; + + return offset; +} + +/**************************************************************************** + * alloc_importfile + * + * Allocates and initializes an import file definition in a type library. + * + * RETURNS + * + * Success: The offset of the new importinfo. + * Failure: -1 (this is invariably an out of memory condition). + */ +static int alloc_importfile( + msft_typelib_t *typelib, /* [I] The type library to allocate in. */ + int guidoffset, /* [I] The offset to the GUID for the imported library. */ + int major_version, /* [I] The major version number of the imported library. */ + int minor_version, /* [I] The minor version number of the imported library. */ + const char *filename) /* [I] The filename of the imported library. */ +{ + int length; + int offset; + MSFT_ImpFile *importfile; + char *encoded_string; + + length = ctl2_encode_string(filename, &encoded_string); + + encoded_string[0] <<= 2; + encoded_string[0] |= 1; + + for (offset = 0; offset < typelib->typelib_segdir[MSFT_SEG_IMPORTFILES].length; + offset += ((((typelib->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xd] << 8) & 0xff) + | (typelib->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xc] & 0xff)) >> 2) + 0xc) { + if (!memcmp(encoded_string, typelib->typelib_segment_data[MSFT_SEG_IMPORTFILES] + offset + 0xc, length)) return offset; + } + + offset = ctl2_alloc_segment(typelib, MSFT_SEG_IMPORTFILES, length + 0xc, 0); + + importfile = (MSFT_ImpFile *)&typelib->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset]; + importfile->guid = guidoffset; + importfile->lcid = typelib->typelib_header.lcid2; + importfile->version = major_version | (minor_version << 16); + memcpy(&importfile->filename, encoded_string, length); + + return offset; +} + +static void alloc_importinfo(msft_typelib_t *typelib, importinfo_t *importinfo) +{ + importlib_t *importlib = importinfo->importlib; + + chat("alloc_importinfo: %s\n", importinfo->name); + + if(!importlib->allocated) { + MSFT_GuidEntry guid; + int guid_idx; + + chat("allocating importlib %s\n", importlib->name); + + importlib->allocated = -1; + + memcpy(&guid.guid, &importlib->guid, sizeof(GUID)); + guid.hreftype = 2; + + guid_idx = ctl2_alloc_guid(typelib, &guid); + + alloc_importfile(typelib, guid_idx, importlib->version&0xffff, + importlib->version>>16, importlib->name); + } + + if(importinfo->offset == -1 || !(importinfo->flags & MSFT_IMPINFO_OFFSET_IS_GUID)) { + MSFT_ImpInfo impinfo; + + impinfo.flags = importinfo->flags; + impinfo.oImpFile = 0; + + if(importinfo->flags & MSFT_IMPINFO_OFFSET_IS_GUID) { + MSFT_GuidEntry guid; + + guid.hreftype = 0; + memcpy(&guid.guid, &importinfo->guid, sizeof(GUID)); + + impinfo.oGuid = ctl2_alloc_guid(typelib, &guid); + + importinfo->offset = alloc_msft_importinfo(typelib, &impinfo); + + typelib->typelib_segment_data[MSFT_SEG_GUID][impinfo.oGuid+sizeof(GUID)] + = importinfo->offset+1; + + if(!strcmp(importinfo->name, "IDispatch")) + typelib->typelib_header.dispatchpos = importinfo->offset+1; + }else { + impinfo.oGuid = importinfo->id; + importinfo->offset = alloc_msft_importinfo(typelib, &impinfo); + } + } +} + +static importinfo_t *find_importinfo(msft_typelib_t *typelib, const char *name) +{ + importlib_t *importlib; + int i; + + chat("search importlib %s\n", name); + + if(!name) + return NULL; + + LIST_FOR_EACH_ENTRY( importlib, &typelib->typelib->importlibs, importlib_t, entry ) + { + for(i=0; i < importlib->ntypeinfos; i++) { + if(!strcmp(name, importlib->importinfos[i].name)) { + chat("Found %s in importlib.\n", name); + return importlib->importinfos+i; + } + } + } + + return NULL; +} + +static void add_structure_typeinfo(msft_typelib_t *typelib, type_t *structure); +static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface); +static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration); +static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls); +static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface); + + +/**************************************************************************** + * encode_type + * + * Encodes a type, storing information in the TYPEDESC and ARRAYDESC + * segments as needed. + * + * RETURNS + * + * Success: 0. + * Failure: -1. + */ +static int encode_type( + msft_typelib_t *typelib, /* [I] The type library in which to encode the TYPEDESC. */ + int vt, /* [I] vt to encode */ + type_t *type, /* [I] type */ + int *encoded_type, /* [O] The encoded type description. */ + int *width, /* [O] The width of the type, or NULL. */ + int *alignment, /* [O] The alignment of the type, or NULL. */ + int *decoded_size) /* [O] The total size of the unencoded TYPEDESCs, including nested descs. */ +{ + int default_type; + int scratch; + int typeoffset; + int *typedata; + int target_type; + int child_size = 0; + + chat("encode_type vt %d type %p\n", vt, type); + + default_type = 0x80000000 | (vt << 16) | vt; + if (!width) width = &scratch; + if (!alignment) alignment = &scratch; + if (!decoded_size) decoded_size = &scratch; + + + switch (vt) { + case VT_I1: + case VT_UI1: + *encoded_type = default_type; + *width = 1; + *alignment = 1; + break; + + case VT_INT: + *encoded_type = 0x80000000 | (VT_I4 << 16) | VT_INT; + if ((typelib->typelib_header.varflags & 0x0f) == SYS_WIN16) { + *width = 2; + *alignment = 2; + } else { + *width = 4; + *alignment = 4; + } + break; + + case VT_UINT: + *encoded_type = 0x80000000 | (VT_UI4 << 16) | VT_UINT; + if ((typelib->typelib_header.varflags & 0x0f) == SYS_WIN16) { + *width = 2; + *alignment = 2; + } else { + *width = 4; + *alignment = 4; + } + break; + + case VT_UI2: + case VT_I2: + case VT_BOOL: + *encoded_type = default_type; + *width = 2; + *alignment = 2; + break; + + case VT_I4: + case VT_UI4: + case VT_R4: + case VT_ERROR: + case VT_BSTR: + case VT_HRESULT: + *encoded_type = default_type; + *width = 4; + *alignment = 4; + break; + + case VT_R8: + case VT_I8: + case VT_UI8: + *encoded_type = default_type; + *width = 8; + *alignment = 8; + break; + + case VT_CY: + case VT_DATE: + *encoded_type = default_type; + *width = 8; + *alignment = 8; + break; + + case VT_DECIMAL: + *encoded_type = default_type; + *width = 16; + *alignment = 8; + break; + + case VT_VOID: + *encoded_type = 0x80000000 | (VT_EMPTY << 16) | vt; + *width = 0; + *alignment = 1; + break; + + case VT_UNKNOWN: + case VT_DISPATCH: + *encoded_type = default_type; + *width = 4; + *alignment = 4; + break; + + case VT_VARIANT: + *encoded_type = default_type; + break; + + case VT_LPSTR: + case VT_LPWSTR: + *encoded_type = 0xfffe0000 | vt; + *width = 4; + *alignment = 4; + break; + + case VT_PTR: + { + int next_vt; + for(next_vt = 0; is_ptr(type); type = type_pointer_get_ref(type)) { + next_vt = get_type_vt(type_pointer_get_ref(type)); + if (next_vt != 0) + break; + } + /* if no type found then it must be void */ + if (next_vt == 0) + next_vt = VT_VOID; + + encode_type(typelib, next_vt, type_pointer_get_ref(type), + &target_type, NULL, NULL, &child_size); + /* these types already have an implicit pointer, so we don't need to + * add another */ + if(next_vt == VT_DISPATCH || next_vt == VT_UNKNOWN) { + chat("encode_type: skipping ptr\n"); + *encoded_type = target_type; + *width = 4; + *alignment = 4; + *decoded_size = child_size; + break; + } + + for (typeoffset = 0; typeoffset < typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length; typeoffset += 8) { + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + if (((typedata[0] & 0xffff) == VT_PTR) && (typedata[1] == target_type)) break; + } + + if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) { + int mix_field; + + if (target_type & 0x80000000) { + mix_field = ((target_type >> 16) & 0x3fff) | VT_BYREF; + } else { + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][target_type]; + mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe; + } + + typeoffset = ctl2_alloc_segment(typelib, MSFT_SEG_TYPEDESC, 8, 0); + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + + typedata[0] = (mix_field << 16) | VT_PTR; + typedata[1] = target_type; + } + + *encoded_type = typeoffset; + + *width = 4; + *alignment = 4; + *decoded_size = 8 /*sizeof(TYPEDESC)*/ + child_size; + break; + } + + + case VT_SAFEARRAY: + { + type_t *element_type = type_alias_get_aliasee(type_array_get_element(type)); + int next_vt = get_type_vt(element_type); + + encode_type(typelib, next_vt, type_alias_get_aliasee(type_array_get_element(type)), &target_type, NULL, NULL, &child_size); + + for (typeoffset = 0; typeoffset < typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length; typeoffset += 8) { + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + if (((typedata[0] & 0xffff) == VT_SAFEARRAY) && (typedata[1] == target_type)) break; + } + + if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) { + int mix_field; + + if (target_type & 0x80000000) { + mix_field = ((target_type >> 16) & VT_TYPEMASK) | VT_ARRAY; + } else { + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][target_type]; + mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe; + } + + typeoffset = ctl2_alloc_segment(typelib, MSFT_SEG_TYPEDESC, 8, 0); + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + + typedata[0] = (mix_field << 16) | VT_SAFEARRAY; + typedata[1] = target_type; + } + + *encoded_type = typeoffset; + + *width = 4; + *alignment = 4; + *decoded_size = 8 /*sizeof(TYPEDESC)*/ + child_size; + break; + } + + + case VT_USERDEFINED: + { + int typeinfo_offset; + + /* typedef'd types without public attribute aren't included in the typelib */ + while (type->typelib_idx < 0 && type_is_alias(type) && !is_attr(type->attrs, ATTR_PUBLIC)) + type = type_alias_get_aliasee(type); + + chat("encode_type: VT_USERDEFINED - type %p name = %s real type %d idx %d\n", type, + type->name, type_get_type(type), type->typelib_idx); + + if(type->typelib_idx == -1) { + chat("encode_type: trying to ref not added type\n"); + switch (type_get_type(type)) { + case TYPE_STRUCT: + add_structure_typeinfo(typelib, type); + break; + case TYPE_INTERFACE: + add_interface_typeinfo(typelib, type); + break; + case TYPE_ENUM: + add_enum_typeinfo(typelib, type); + break; + case TYPE_COCLASS: + add_coclass_typeinfo(typelib, type); + break; + default: + error("encode_type: VT_USERDEFINED - unhandled type %d\n", + type_get_type(type)); + } + } + + typeinfo_offset = typelib->typelib_typeinfo_offsets[type->typelib_idx]; + for (typeoffset = 0; typeoffset < typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length; typeoffset += 8) { + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + if ((typedata[0] == ((0x7fff << 16) | VT_USERDEFINED)) && (typedata[1] == typeinfo_offset)) break; + } + + if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) { + typeoffset = ctl2_alloc_segment(typelib, MSFT_SEG_TYPEDESC, 8, 0); + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + + typedata[0] = (0x7fff << 16) | VT_USERDEFINED; + typedata[1] = typeinfo_offset; + } + + *encoded_type = typeoffset; + *width = 0; + *alignment = 1; + break; + } + + default: + error("encode_type: unrecognized type %d.\n", vt); + *encoded_type = default_type; + *width = 0; + *alignment = 1; + break; + } + + return 0; +} + +static void dump_type(type_t *t) +{ + chat("dump_type: %p name %s type %d attrs %p\n", t, t->name, type_get_type(t), t->attrs); +} + +static int encode_var( + msft_typelib_t *typelib, /* [I] The type library in which to encode the TYPEDESC. */ + type_t *type, /* [I] The type description to encode. */ + var_t *var, /* [I] The var to encode. */ + int *encoded_type, /* [O] The encoded type description. */ + int *width, /* [O] The width of the type, or NULL. */ + int *alignment, /* [O] The alignment of the type, or NULL. */ + int *decoded_size) /* [O] The total size of the unencoded TYPEDESCs, including nested descs. */ +{ + int typeoffset; + int *typedata; + int target_type; + int child_size; + int vt; + int scratch; + + if (!width) width = &scratch; + if (!alignment) alignment = &scratch; + if (!decoded_size) decoded_size = &scratch; + *decoded_size = 0; + + chat("encode_var: var %p type %p type->name %s\n", + var, type, type->name ? type->name : "NULL"); + + if (is_array(type) && !type_array_is_decl_as_ptr(type)) { + int num_dims, elements = 1, arrayoffset; + type_t *atype; + int *arraydata; + + num_dims = 0; + for (atype = type; + is_array(atype) && !type_array_is_decl_as_ptr(atype); + atype = type_array_get_element(atype)) + ++num_dims; + + chat("array with %d dimensions\n", num_dims); + encode_var(typelib, atype, var, &target_type, width, alignment, NULL); + arrayoffset = ctl2_alloc_segment(typelib, MSFT_SEG_ARRAYDESC, (2 + 2 * num_dims) * sizeof(int), 0); + arraydata = (void *)&typelib->typelib_segment_data[MSFT_SEG_ARRAYDESC][arrayoffset]; + + arraydata[0] = target_type; + arraydata[1] = num_dims; + arraydata[1] |= ((num_dims * 2 * sizeof(int)) << 16); + + arraydata += 2; + for (atype = type; + is_array(atype) && !type_array_is_decl_as_ptr(atype); + atype = type_array_get_element(atype)) + { + arraydata[0] = type_array_get_dim(atype); + arraydata[1] = 0; + arraydata += 2; + elements *= type_array_get_dim(atype); + } + + typeoffset = ctl2_alloc_segment(typelib, MSFT_SEG_TYPEDESC, 8, 0); + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + + typedata[0] = (0x7ffe << 16) | VT_CARRAY; + typedata[1] = arrayoffset; + + *encoded_type = typeoffset; + *width = *width * elements; + *decoded_size = 20 /*sizeof(ARRAYDESC)*/ + (num_dims - 1) * 8 /*sizeof(SAFEARRAYBOUND)*/; + return 0; + } + + vt = get_type_vt(type); + if (vt == VT_PTR) { + type_t *ref = is_ptr(type) ? + type_pointer_get_ref(type) : type_array_get_element(type); + int skip_ptr = encode_var(typelib, ref, var, + &target_type, NULL, NULL, &child_size); + + if(skip_ptr == 2) { + chat("encode_var: skipping ptr\n"); + *encoded_type = target_type; + *decoded_size = child_size; + *width = 4; + *alignment = 4; + return 0; + } + + for (typeoffset = 0; typeoffset < typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length; typeoffset += 8) { + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + if (((typedata[0] & 0xffff) == VT_PTR) && (typedata[1] == target_type)) break; + } + + if (typeoffset == typelib->typelib_segdir[MSFT_SEG_TYPEDESC].length) { + int mix_field; + + if (target_type & 0x80000000) { + mix_field = ((target_type >> 16) & 0x3fff) | VT_BYREF; + } else { + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][target_type]; + mix_field = ((typedata[0] >> 16) == 0x7fff)? 0x7fff: 0x7ffe; + } + + typeoffset = ctl2_alloc_segment(typelib, MSFT_SEG_TYPEDESC, 8, 0); + typedata = (void *)&typelib->typelib_segment_data[MSFT_SEG_TYPEDESC][typeoffset]; + + typedata[0] = (mix_field << 16) | VT_PTR; + typedata[1] = target_type; + } + + *encoded_type = typeoffset; + + *width = 4; + *alignment = 4; + *decoded_size = 8 /*sizeof(TYPEDESC)*/ + child_size; + return 0; + } + + dump_type(type); + + encode_type(typelib, vt, type, encoded_type, width, alignment, decoded_size); + /* these types already have an implicit pointer, so we don't need to + * add another */ + if(vt == VT_DISPATCH || vt == VT_UNKNOWN) return 2; + return 0; +} + +static unsigned int get_ulong_val(unsigned int val, int vt) +{ + switch(vt) { + case VT_I2: + case VT_BOOL: + case VT_UI2: + return val & 0xffff; + case VT_I1: + case VT_UI1: + return val & 0xff; + } + + return val; +} + +static void write_value(msft_typelib_t* typelib, int *out, int vt, const void *value) +{ + switch(vt) { + case VT_I2: + case VT_I4: + case VT_R4: + case VT_BOOL: + case VT_I1: + case VT_UI1: + case VT_UI2: + case VT_UI4: + case VT_INT: + case VT_UINT: + case VT_HRESULT: + case VT_PTR: + { + const unsigned int lv = get_ulong_val(*(const unsigned int *)value, vt); + if((lv & 0x3ffffff) == lv) { + *out = 0x80000000; + *out |= vt << 26; + *out |= lv; + } else { + int offset = ctl2_alloc_segment(typelib, MSFT_SEG_CUSTDATA, 8, 0); + *((unsigned short *)&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset]) = vt; + memcpy(&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset+2], value, 4); + *((unsigned short *)&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset+6]) = 0x5757; + *out = offset; + } + return; + } + case VT_BSTR: + { + const char *s = (const char *) value; + int len = strlen(s), seg_len = (len + 6 + 3) & ~0x3; + int offset = ctl2_alloc_segment(typelib, MSFT_SEG_CUSTDATA, seg_len, 0); + *((unsigned short *)&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset]) = vt; + memcpy(&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset+2], &len, sizeof(len)); + memcpy(&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset+6], value, len); + len += 6; + while(len < seg_len) { + *((char *)&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset+len]) = 0x57; + len++; + } + *out = offset; + return; + } + + default: + warning("can't write value of type %d yet\n", vt); + } + return; +} + +static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, + int vt, int value, int *offset) +{ + MSFT_GuidEntry guidentry; + int guidoffset; + int custoffset; + int *custdata; + int data_out; + + guidentry.guid = *guid; + + guidentry.hreftype = -1; + guidentry.next_hash = -1; + + guidoffset = ctl2_alloc_guid(typelib, &guidentry); + write_value(typelib, &data_out, vt, &value); + + custoffset = ctl2_alloc_segment(typelib, MSFT_SEG_CUSTDATAGUID, 12, 0); + + custdata = (int *)&typelib->typelib_segment_data[MSFT_SEG_CUSTDATAGUID][custoffset]; + custdata[0] = guidoffset; + custdata[1] = data_out; + custdata[2] = *offset; + *offset = custoffset; + + return S_OK; +} + +static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) +{ + int offset, name_offset; + int *typedata, typedata_size; + int i, id, next_idx; + int decoded_size, extra_attr = 0; + int num_params = 0, num_optional = 0, num_defaults = 0; + var_t *arg; + char *namedata; + const attr_t *attr; + unsigned int funcflags = 0, callconv = 4 /* CC_STDCALL */; + unsigned int funckind, invokekind = 1 /* INVOKE_FUNC */; + int help_context = 0, help_string_context = 0, help_string_offset = -1; + int entry = -1, entry_is_ord = 0; + int lcid_retval_count = 0; + + chat("add_func_desc(%p,%d)\n", typeinfo, index); + + id = ((0x6000 | (typeinfo->typeinfo->datatype2 & 0xffff)) << 16) | index; + + switch(typeinfo->typekind) { + case TKIND_DISPATCH: + funckind = 0x4; /* FUNC_DISPATCH */ + break; + case TKIND_MODULE: + funckind = 0x3; /* FUNC_STATIC */ + break; + default: + funckind = 0x1; /* FUNC_PUREVIRTUAL */ + break; + } + + if (is_local( func->attrs )) { + chat("add_func_desc: skipping local function\n"); + return S_FALSE; + } + + if (type_get_function_args(func->type)) + LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), var_t, entry ) + { + num_params++; + if (arg->attrs) LIST_FOR_EACH_ENTRY( attr, arg->attrs, const attr_t, entry ) { + if(attr->type == ATTR_DEFAULTVALUE) + num_defaults++; + else if(attr->type == ATTR_OPTIONAL) + num_optional++; + } + } + + chat("add_func_desc: num of params %d\n", num_params); + + name_offset = ctl2_alloc_name(typeinfo->typelib, func->name); + + if (func->attrs) LIST_FOR_EACH_ENTRY( attr, func->attrs, const attr_t, entry ) { + expr_t *expr = attr->u.pval; + switch(attr->type) { + case ATTR_BINDABLE: + funcflags |= 0x4; /* FUNCFLAG_FBINDABLE */ + break; + case ATTR_DEFAULTBIND: + funcflags |= 0x20; /* FUNCFLAG_FDEFAULTBIND */ + break; + case ATTR_DEFAULTCOLLELEM: + funcflags |= 0x100; /* FUNCFLAG_FDEFAULTCOLLELEM */ + break; + case ATTR_DISPLAYBIND: + funcflags |= 0x10; /* FUNCFLAG_FDISPLAYBIND */ + break; + case ATTR_ENTRY: + extra_attr = max(extra_attr, 3); + if (expr->type == EXPR_STRLIT || expr->type == EXPR_WSTRLIT) + entry = ctl2_alloc_string(typeinfo->typelib, attr->u.pval); + else { + entry = expr->cval; + entry_is_ord = 1; + } + break; + case ATTR_HELPCONTEXT: + extra_attr = max(extra_attr, 1); + help_context = expr->u.lval; + break; + case ATTR_HELPSTRING: + extra_attr = max(extra_attr, 2); + help_string_offset = ctl2_alloc_string(typeinfo->typelib, attr->u.pval); + break; + case ATTR_HELPSTRINGCONTEXT: + extra_attr = max(extra_attr, 6); + help_string_context = expr->u.lval; + break; + case ATTR_HIDDEN: + funcflags |= 0x40; /* FUNCFLAG_FHIDDEN */ + break; + case ATTR_ID: + id = expr->cval; + break; + case ATTR_IMMEDIATEBIND: + funcflags |= 0x1000; /* FUNCFLAG_FIMMEDIATEBIND */ + break; + case ATTR_NONBROWSABLE: + funcflags |= 0x400; /* FUNCFLAG_FNONBROWSABLE */ + break; + case ATTR_OUT: + break; + case ATTR_PROPGET: + invokekind = 0x2; /* INVOKE_PROPERTYGET */ + break; + case ATTR_PROPPUT: + invokekind = 0x4; /* INVOKE_PROPERTYPUT */ + break; + case ATTR_PROPPUTREF: + invokekind = 0x8; /* INVOKE_PROPERTYPUTREF */ + break; + /* FIXME: FUNCFLAG_FREPLACEABLE */ + case ATTR_REQUESTEDIT: + funcflags |= 0x8; /* FUNCFLAG_FREQUESTEDIT */ + break; + case ATTR_RESTRICTED: + funcflags |= 0x1; /* FUNCFLAG_FRESTRICTED */ + break; + case ATTR_SOURCE: + funcflags |= 0x2; /* FUNCFLAG_FSOURCE */ + break; + case ATTR_UIDEFAULT: + funcflags |= 0x200; /* FUNCFLAG_FUIDEFAULT */ + break; + case ATTR_USESGETLASTERROR: + funcflags |= 0x80; /* FUNCFLAG_FUSESGETLASTERROR */ + break; + case ATTR_VARARG: + if (num_optional || num_defaults) + warning("add_func_desc: ignoring vararg in function with optional or defaultvalue params\n"); + else + num_optional = -1; + break; + default: + break; + } + } + + /* allocate type data space for us */ + typedata_size = 0x18 + extra_attr * sizeof(int) + (num_params * (num_defaults ? 16 : 12)); + + if (!typeinfo->func_data) { + typeinfo->func_data = xmalloc(0x100); + typeinfo->func_data_allocated = 0x100; + typeinfo->func_data[0] = 0; + } + + if(typeinfo->func_data[0] + typedata_size + sizeof(int) > typeinfo->func_data_allocated) { + typeinfo->func_data_allocated = max(typeinfo->func_data_allocated * 2, + typeinfo->func_data[0] + typedata_size + sizeof(int)); + typeinfo->func_data = xrealloc(typeinfo->func_data, typeinfo->func_data_allocated); + } + + offset = typeinfo->func_data[0]; + typeinfo->func_data[0] += typedata_size; + typedata = typeinfo->func_data + (offset >> 2) + 1; + + + /* find func with the same name - if it exists use its id */ + for(i = 0; i < (typeinfo->typeinfo->cElement & 0xffff); i++) { + if(name_offset == typeinfo->func_names[i]) { + id = typeinfo->func_indices[i]; + break; + } + } + + /* find the first func with the same id and link via the hiword of typedata[4] */ + next_idx = index; + for(i = 0; i < (typeinfo->typeinfo->cElement & 0xffff); i++) { + if(id == typeinfo->func_indices[i]) { + next_idx = typeinfo->func_data[(typeinfo->func_offsets[i] >> 2) + 1 + 4] >> 16; + typeinfo->func_data[(typeinfo->func_offsets[i] >> 2) + 1 + 4] &= 0xffff; + typeinfo->func_data[(typeinfo->func_offsets[i] >> 2) + 1 + 4] |= (index << 16); + break; + } + } + + /* fill out the basic type information */ + typedata[0] = typedata_size | (index << 16); + encode_var(typeinfo->typelib, type_function_get_rettype(func->type), func, &typedata[1], NULL, NULL, &decoded_size); + typedata[2] = funcflags; + typedata[3] = ((52 /*sizeof(FUNCDESC)*/ + decoded_size) << 16) | typeinfo->typeinfo->cbSizeVft; + typedata[4] = (next_idx << 16) | (callconv << 8) | (invokekind << 3) | funckind; + if(num_defaults) typedata[4] |= 0x1000; + if(entry_is_ord) typedata[4] |= 0x2000; + typedata[5] = (num_optional << 16) | num_params; + + /* NOTE: High word of typedata[3] is total size of FUNCDESC + size of all ELEMDESCs for params + TYPEDESCs for pointer params and return types. */ + /* That is, total memory allocation required to reconstitute the FUNCDESC in its entirety. */ + typedata[3] += (16 /*sizeof(ELEMDESC)*/ * num_params) << 16; + typedata[3] += (24 /*sizeof(PARAMDESCEX)*/ * num_defaults) << 16; + + switch(extra_attr) { + case 6: typedata[11] = help_string_context; + case 5: typedata[10] = -1; + case 4: typedata[9] = -1; + case 3: typedata[8] = entry; + case 2: typedata[7] = help_string_offset; + case 1: typedata[6] = help_context; + case 0: + break; + default: + warning("unknown number of optional attrs\n"); + } + + if (type_get_function_args(func->type)) + { + i = 0; + LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), var_t, entry ) + { + int paramflags = 0; + int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) + i * 3; + int *defaultdata = num_defaults ? typedata + 6 + extra_attr + i : NULL; + + if(defaultdata) *defaultdata = -1; + + encode_var(typeinfo->typelib, arg->type, arg, paramdata, NULL, NULL, &decoded_size); + if (arg->attrs) LIST_FOR_EACH_ENTRY( attr, arg->attrs, const attr_t, entry ) { + switch(attr->type) { + case ATTR_DEFAULTVALUE: + { + int vt; + expr_t *expr = (expr_t *)attr->u.pval; + if (type_get_type(arg->type) == TYPE_ENUM) + vt = VT_INT; + else + vt = get_type_vt(arg->type); + paramflags |= 0x30; /* PARAMFLAG_FHASDEFAULT | PARAMFLAG_FOPT */ + if (expr->type == EXPR_STRLIT || expr->type == EXPR_WSTRLIT) + { + if (vt != VT_BSTR) error("string default value applied to non-string type\n"); + chat("default value '%s'\n", expr->u.sval); + write_value(typeinfo->typelib, defaultdata, vt, expr->u.sval); + } + else + { + chat("default value %d\n", expr->cval); + write_value(typeinfo->typelib, defaultdata, vt, &expr->cval); + } + break; + } + case ATTR_IN: + paramflags |= 0x01; /* PARAMFLAG_FIN */ + break; + case ATTR_OPTIONAL: + paramflags |= 0x10; /* PARAMFLAG_FOPT */ + break; + case ATTR_OUT: + paramflags |= 0x02; /* PARAMFLAG_FOUT */ + break; + case ATTR_PARAMLCID: + paramflags |= 0x04; /* PARAMFLAG_LCID */ + lcid_retval_count++; + break; + case ATTR_RETVAL: + paramflags |= 0x08; /* PARAMFLAG_FRETVAL */ + lcid_retval_count++; + break; + default: + chat("unhandled param attr %d\n", attr->type); + break; + } + } + paramdata[1] = -1; + paramdata[2] = paramflags; + typedata[3] += decoded_size << 16; + + i++; + } + } + + if(lcid_retval_count == 1) + typedata[4] |= 0x4000; + else if(lcid_retval_count == 2) + typedata[4] |= 0x8000; + + if(typeinfo->funcs_allocated == 0) { + typeinfo->funcs_allocated = 10; + typeinfo->func_indices = xmalloc(typeinfo->funcs_allocated * sizeof(int)); + typeinfo->func_names = xmalloc(typeinfo->funcs_allocated * sizeof(int)); + typeinfo->func_offsets = xmalloc(typeinfo->funcs_allocated * sizeof(int)); + } + if(typeinfo->funcs_allocated == (typeinfo->typeinfo->cElement & 0xffff)) { + typeinfo->funcs_allocated *= 2; + typeinfo->func_indices = xrealloc(typeinfo->func_indices, typeinfo->funcs_allocated * sizeof(int)); + typeinfo->func_names = xrealloc(typeinfo->func_names, typeinfo->funcs_allocated * sizeof(int)); + typeinfo->func_offsets = xrealloc(typeinfo->func_offsets, typeinfo->funcs_allocated * sizeof(int)); + } + + /* update the index data */ + typeinfo->func_indices[typeinfo->typeinfo->cElement & 0xffff] = id; + typeinfo->func_offsets[typeinfo->typeinfo->cElement & 0xffff] = offset; + typeinfo->func_names[typeinfo->typeinfo->cElement & 0xffff] = name_offset; + + /* ??? */ + if (!typeinfo->typeinfo->res2) typeinfo->typeinfo->res2 = 0x20; + typeinfo->typeinfo->res2 <<= 1; + /* ??? */ + if (index < 2) typeinfo->typeinfo->res2 += num_params << 4; + + if (typeinfo->typeinfo->res3 == -1) typeinfo->typeinfo->res3 = 0; + typeinfo->typeinfo->res3 += 0x38 + num_params * 0x10; + if(num_defaults) typeinfo->typeinfo->res3 += num_params * 0x4; + + /* adjust size of VTBL */ + if(funckind != 0x3 /* FUNC_STATIC */) + typeinfo->typeinfo->cbSizeVft += pointer_size; + + /* Increment the number of function elements */ + typeinfo->typeinfo->cElement += 1; + + namedata = typeinfo->typelib->typelib_segment_data[MSFT_SEG_NAME] + name_offset; + if (*((INT *)namedata) == -1) { + *((INT *)namedata) = typeinfo->typelib->typelib_typeinfo_offsets[typeinfo->typeinfo->typekind >> 16]; + if(typeinfo->typekind == TKIND_MODULE) + namedata[9] |= 0x10; + } else + namedata[9] &= ~0x10; + + if(typeinfo->typekind == TKIND_MODULE) + namedata[9] |= 0x20; + + if (type_get_function_args(func->type)) + { + i = 0; + LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), var_t, entry ) + { + /* don't give the last arg of a [propput*] func a name */ + if(i != num_params - 1 || (invokekind != 0x4 /* INVOKE_PROPERTYPUT */ && invokekind != 0x8 /* INVOKE_PROPERTYPUTREF */)) + { + int *paramdata = typedata + 6 + extra_attr + (num_defaults ? num_params : 0) + i * 3; + offset = ctl2_alloc_name(typeinfo->typelib, arg->name); + paramdata[1] = offset; + } + i++; + } + } + return S_OK; +} + +static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) +{ + int offset, id; + unsigned int typedata_size; + INT *typedata; + int var_datawidth; + int var_alignment; + int var_type_size, var_kind = 0 /* VAR_PERINSTANCE */; + int alignment; + int varflags = 0; + const attr_t *attr; + char *namedata; + int var_num = (typeinfo->typeinfo->cElement >> 16) & 0xffff; + + chat("add_var_desc(%d, %s)\n", index, var->name); + + id = 0x40000000 + index; + + if (var->attrs) LIST_FOR_EACH_ENTRY( attr, var->attrs, const attr_t, entry ) { + expr_t *expr = attr->u.pval; + switch(attr->type) { + case ATTR_BINDABLE: + varflags |= 0x04; /* VARFLAG_FBINDABLE */ + break; + case ATTR_DEFAULTBIND: + varflags |= 0x20; /* VARFLAG_FDEFAULTBIND */ + break; + case ATTR_DEFAULTCOLLELEM: + varflags |= 0x100; /* VARFLAG_FDEFAULTCOLLELEM */ + break; + case ATTR_DISPLAYBIND: + varflags |= 0x10; /* VARFLAG_FDISPLAYBIND */ + break; + case ATTR_HIDDEN: + varflags |= 0x40; /* VARFLAG_FHIDDEN */ + break; + case ATTR_ID: + id = expr->cval; + break; + case ATTR_IMMEDIATEBIND: + varflags |= 0x1000; /* VARFLAG_FIMMEDIATEBIND */ + break; + case ATTR_NONBROWSABLE: + varflags |= 0x400; /* VARFLAG_FNONBROWSABLE */ + break; + case ATTR_READONLY: + varflags |= 0x01; /* VARFLAG_FREADONLY */ + break; + /* FIXME: VARFLAG_FREPLACEABLE */ + case ATTR_REQUESTEDIT: + varflags |= 0x08; /* VARFLAG_FREQUESTEDIT */ + break; + case ATTR_RESTRICTED: + varflags |= 0x80; /* VARFLAG_FRESTRICTED */ + break; + case ATTR_SOURCE: + varflags |= 0x02; /* VARFLAG_FSOURCE */ + break; + case ATTR_UIDEFAULT: + varflags |= 0x0200; /* VARFLAG_FUIDEFAULT */ + break; + default: + break; + } + } + + /* allocate type data space for us */ + typedata_size = 0x14; + + if (!typeinfo->var_data) { + typeinfo->var_data = xmalloc(0x100); + typeinfo->var_data_allocated = 0x100; + typeinfo->var_data[0] = 0; + } + + if(typeinfo->var_data[0] + typedata_size + sizeof(int) > typeinfo->var_data_allocated) { + typeinfo->var_data_allocated = max(typeinfo->var_data_allocated * 2, + typeinfo->var_data[0] + typedata_size + sizeof(int)); + typeinfo->var_data = xrealloc(typeinfo->var_data, typeinfo->var_data_allocated); + } + + offset = typeinfo->var_data[0]; + typeinfo->var_data[0] += typedata_size; + typedata = typeinfo->var_data + (offset >> 2) + 1; + + /* fill out the basic type information */ + typedata[0] = typedata_size | (index << 16); + typedata[2] = varflags; + typedata[3] = (36 /*sizeof(VARDESC)*/ << 16) | 0; + + if(typeinfo->vars_allocated == 0) { + typeinfo->vars_allocated = 10; + typeinfo->var_indices = xmalloc(typeinfo->vars_allocated * sizeof(int)); + typeinfo->var_names = xmalloc(typeinfo->vars_allocated * sizeof(int)); + typeinfo->var_offsets = xmalloc(typeinfo->vars_allocated * sizeof(int)); + } + if(typeinfo->vars_allocated == var_num) { + typeinfo->vars_allocated *= 2; + typeinfo->var_indices = xrealloc(typeinfo->var_indices, typeinfo->vars_allocated * sizeof(int)); + typeinfo->var_names = xrealloc(typeinfo->var_names, typeinfo->vars_allocated * sizeof(int)); + typeinfo->var_offsets = xrealloc(typeinfo->var_offsets, typeinfo->vars_allocated * sizeof(int)); + } + /* update the index data */ + typeinfo->var_indices[var_num] = id; + typeinfo->var_names[var_num] = -1; + typeinfo->var_offsets[var_num] = offset; + + /* figure out type widths and whatnot */ + encode_var(typeinfo->typelib, var->type, var, &typedata[1], &var_datawidth, + &var_alignment, &var_type_size); + + /* pad out starting position to data width */ + typeinfo->datawidth += var_alignment - 1; + typeinfo->datawidth &= ~(var_alignment - 1); + + switch(typeinfo->typekind) { + case TKIND_ENUM: + write_value(typeinfo->typelib, &typedata[4], VT_I4, &var->eval->cval); + var_kind = 2; /* VAR_CONST */ + var_type_size += 16; /* sizeof(VARIANT) */ + typeinfo->datawidth = var_datawidth; + break; + case TKIND_RECORD: + typedata[4] = typeinfo->datawidth; + typeinfo->datawidth += var_datawidth; + break; + case TKIND_DISPATCH: + var_kind = 3; /* VAR_DISPATCH */ + typeinfo->datawidth = 4; + var_alignment = 4; + break; + default: + error("add_var_desc: unhandled type kind %d\n", typeinfo->typekind); + break; + } + + /* add type description size to total required allocation */ + typedata[3] += var_type_size << 16 | var_kind; + + /* fix type alignment */ + alignment = (typeinfo->typeinfo->typekind >> 11) & 0x1f; + if (alignment < var_alignment) { + alignment = var_alignment; + typeinfo->typeinfo->typekind &= ~0xffc0; + typeinfo->typeinfo->typekind |= alignment << 11 | alignment << 6; + } + + /* ??? */ + if (!typeinfo->typeinfo->res2) typeinfo->typeinfo->res2 = 0x1a; + if ((index == 0) || (index == 1) || (index == 2) || (index == 4) || (index == 9)) { + typeinfo->typeinfo->res2 <<= 1; + } + + /* ??? */ + if (typeinfo->typeinfo->res3 == -1) typeinfo->typeinfo->res3 = 0; + typeinfo->typeinfo->res3 += 0x2c; + + /* increment the number of variable elements */ + typeinfo->typeinfo->cElement += 0x10000; + + /* pad data width to alignment */ + typeinfo->typeinfo->size = (typeinfo->datawidth + (alignment - 1)) & ~(alignment - 1); + + offset = ctl2_alloc_name(typeinfo->typelib, var->name); + if (offset == -1) return E_OUTOFMEMORY; + + namedata = typeinfo->typelib->typelib_segment_data[MSFT_SEG_NAME] + offset; + if (*((INT *)namedata) == -1) { + *((INT *)namedata) = typeinfo->typelib->typelib_typeinfo_offsets[typeinfo->typeinfo->typekind >> 16]; + if(typeinfo->typekind != TKIND_DISPATCH) + namedata[9] |= 0x10; + } else + namedata[9] &= ~0x10; + + if (typeinfo->typekind == TKIND_ENUM) { + namedata[9] |= 0x20; + } + typeinfo->var_names[var_num] = offset; + + return S_OK; +} + +static HRESULT add_impl_type(msft_typeinfo_t *typeinfo, type_t *ref, importinfo_t *importinfo) +{ + if(importinfo) { + alloc_importinfo(typeinfo->typelib, importinfo); + typeinfo->typeinfo->datatype1 = importinfo->offset+1; + }else { + if(ref->typelib_idx == -1) + add_interface_typeinfo(typeinfo->typelib, ref); + if(ref->typelib_idx == -1) + error("add_impl_type: unable to add inherited interface\n"); + + typeinfo->typeinfo->datatype1 = typeinfo->typelib->typelib_typeinfo_offsets[ref->typelib_idx]; + } + + typeinfo->typeinfo->cImplTypes++; + return S_OK; +} + +static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_kind kind, + const char *name, const attr_list_t *attrs) +{ + const attr_t *attr; + msft_typeinfo_t *msft_typeinfo; + int nameoffset; + int typeinfo_offset; + MSFT_TypeInfoBase *typeinfo; + MSFT_GuidEntry guidentry; + + chat("create_msft_typeinfo: name %s kind %d\n", name, kind); + + msft_typeinfo = xmalloc(sizeof(*msft_typeinfo)); + memset( msft_typeinfo, 0, sizeof(*msft_typeinfo) ); + + msft_typeinfo->typelib = typelib; + + nameoffset = ctl2_alloc_name(typelib, name); + typeinfo_offset = ctl2_alloc_typeinfo(typelib, nameoffset); + typeinfo = (MSFT_TypeInfoBase *)&typelib->typelib_segment_data[MSFT_SEG_TYPEINFO][typeinfo_offset]; + + typelib->typelib_segment_data[MSFT_SEG_NAME][nameoffset + 9] = 0x38; + *((int *)&typelib->typelib_segment_data[MSFT_SEG_NAME][nameoffset]) = typeinfo_offset; + + msft_typeinfo->typekind = kind; + msft_typeinfo->typeinfo = typeinfo; + + typeinfo->typekind |= kind | 0x20; + + if(kind == TKIND_COCLASS) + typeinfo->flags |= 0x2; /* TYPEFLAG_FCANCREATE */ + + if (attrs) LIST_FOR_EACH_ENTRY( attr, attrs, const attr_t, entry ) { + switch(attr->type) { + case ATTR_AGGREGATABLE: + if (kind == TKIND_COCLASS) + typeinfo->flags |= 0x400; /* TYPEFLAG_FAGGREGATABLE */ + break; + + case ATTR_APPOBJECT: + if (kind == TKIND_COCLASS) + typeinfo->flags |= 0x1; /* TYPEFLAG_FAPPOBJECT */ + break; + + case ATTR_CONTROL: + if (kind == TKIND_COCLASS) + typeinfo->flags |= 0x20; /* TYPEFLAG_FCONTROL */ + break; + + case ATTR_DLLNAME: + { + int offset = ctl2_alloc_string(typelib, attr->u.pval); + typeinfo->datatype1 = offset; + break; + } + + case ATTR_DUAL: + /* FIXME: check interface is compatible */ + typeinfo->typekind = (typeinfo->typekind & ~0xff) | 0x34; + typeinfo->flags |= 0x140; /* TYPEFLAG_FDUAL | TYPEFLAG_FOLEAUTOMATION */ + break; + + case ATTR_HELPCONTEXT: + { + expr_t *expr = (expr_t*)attr->u.pval; + typeinfo->helpcontext = expr->cval; + break; + } + case ATTR_HELPSTRING: + { + int offset = ctl2_alloc_string(typelib, attr->u.pval); + if (offset == -1) break; + typeinfo->docstringoffs = offset; + break; + } + case ATTR_HELPSTRINGCONTEXT: + { + expr_t *expr = (expr_t*)attr->u.pval; + typeinfo->helpstringcontext = expr->cval; + break; + } + case ATTR_HIDDEN: + typeinfo->flags |= 0x10; /* TYPEFLAG_FHIDDEN */ + break; + + case ATTR_LICENSED: + typeinfo->flags |= 0x04; /* TYPEFLAG_FLICENSED */ + break; + + case ATTR_NONCREATABLE: + typeinfo->flags &= ~0x2; /* TYPEFLAG_FCANCREATE */ + break; + + case ATTR_NONEXTENSIBLE: + typeinfo->flags |= 0x80; /* TYPEFLAG_FNONEXTENSIBLE */ + break; + + case ATTR_OLEAUTOMATION: + typeinfo->flags |= 0x100; /* TYPEFLAG_FOLEAUTOMATION */ + break; + + /* FIXME: TYPEFLAG_FPREDCLID */ + + case ATTR_PROXY: + typeinfo->flags |= 0x4000; /* TYPEFLAG_FPROXY */ + break; + + /* FIXME: TYPEFLAG_FREPLACEABLE */ + + case ATTR_RESTRICTED: + typeinfo->flags |= 0x200; /* TYPEFLAG_FRESTRICTED */ + break; + + case ATTR_UUID: + guidentry.guid = *(GUID*)attr->u.pval; + guidentry.hreftype = typelib->typelib_typeinfo_offsets[typeinfo->typekind >> 16]; + guidentry.next_hash = -1; + typeinfo->posguid = ctl2_alloc_guid(typelib, &guidentry); +#if 0 + if (IsEqualIID(guid, &IID_IDispatch)) { + typelib->typelib_header.dispatchpos = typelib->typelib_typeinfo_offsets[typeinfo->typekind >> 16]; + } +#endif + break; + + case ATTR_VERSION: + typeinfo->version = attr->u.ival; + break; + + default: + break; + } + } + + if (typelib->last_typeinfo) typelib->last_typeinfo->next_typeinfo = msft_typeinfo; + typelib->last_typeinfo = msft_typeinfo; + if (!typelib->typeinfos) typelib->typeinfos = msft_typeinfo; + + + return msft_typeinfo; +} + +static void add_dispatch(msft_typelib_t *typelib) +{ + int guid_offset, impfile_offset; + MSFT_GuidEntry guidentry; + MSFT_ImpInfo impinfo; + GUID stdole = {0x00020430,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}}; + GUID iid_idispatch = {0x00020400,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}}; + + if(typelib->typelib_header.dispatchpos != -1) return; + + guidentry.guid = stdole; + guidentry.hreftype = 2; + guidentry.next_hash = -1; + guid_offset = ctl2_alloc_guid(typelib, &guidentry); + impfile_offset = alloc_importfile(typelib, guid_offset, 2, 0, "stdole2.tlb"); + + guidentry.guid = iid_idispatch; + guidentry.hreftype = 1; + guidentry.next_hash = -1; + impinfo.flags = TKIND_INTERFACE << 24 | MSFT_IMPINFO_OFFSET_IS_GUID; + impinfo.oImpFile = impfile_offset; + impinfo.oGuid = ctl2_alloc_guid(typelib, &guidentry); + typelib->typelib_header.dispatchpos = alloc_msft_importinfo(typelib, &impinfo) | 0x01; +} + +static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface) +{ + int idx = 0; + var_t *func; + var_t *var; + msft_typeinfo_t *msft_typeinfo; + + if (-1 < dispinterface->typelib_idx) + return; + + dispinterface->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_DISPATCH, dispinterface->name, + dispinterface->attrs); + + msft_typeinfo->typeinfo->size = 4; + msft_typeinfo->typeinfo->typekind |= 0x2100; + + msft_typeinfo->typeinfo->flags |= 0x1000; /* TYPEFLAG_FDISPATCHABLE */ + add_dispatch(typelib); + msft_typeinfo->typeinfo->cImplTypes = 1; + + /* count the no of methods, as the variable indices come after the funcs */ + if (dispinterface->details.iface->disp_methods) + LIST_FOR_EACH_ENTRY( func, dispinterface->details.iface->disp_methods, var_t, entry ) + idx++; + + if (type_dispiface_get_props(dispinterface)) + LIST_FOR_EACH_ENTRY( var, type_dispiface_get_props(dispinterface), var_t, entry ) + add_var_desc(msft_typeinfo, idx++, var); + + if (type_dispiface_get_methods(dispinterface)) + { + idx = 0; + LIST_FOR_EACH_ENTRY( func, type_dispiface_get_methods(dispinterface), var_t, entry ) + if(add_func_desc(msft_typeinfo, func, idx) == S_OK) + idx++; + } +} + +static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface) +{ + int idx = 0; + const statement_t *stmt_func; + type_t *ref; + msft_typeinfo_t *msft_typeinfo; + importinfo_t *ref_importinfo = NULL; + int num_parents = 0, num_funcs = 0; + type_t *inherit; + const type_t *derived; + + if (-1 < interface->typelib_idx) + return; + + if (!interface->details.iface) + { + error( "interface %s is referenced but not defined\n", interface->name ); + return; + } + + if (is_attr(interface->attrs, ATTR_DISPINTERFACE)) + return add_dispinterface_typeinfo(typelib, interface); + + /* midl adds the parent interface first, unless the parent itself + has no parent (i.e. it stops before IUnknown). */ + + inherit = type_iface_get_inherit(interface); + + if(inherit) { + ref_importinfo = find_importinfo(typelib, inherit->name); + + if(!ref_importinfo && type_iface_get_inherit(inherit) && + inherit->typelib_idx == -1) + add_interface_typeinfo(typelib, inherit); + } + + interface->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_INTERFACE, interface->name, interface->attrs); + msft_typeinfo->typeinfo->size = 4; + msft_typeinfo->typeinfo->typekind |= 0x2200; + + for (derived = inherit; derived; derived = type_iface_get_inherit(derived)) + if (derived->name && !strcmp(derived->name, "IDispatch")) + msft_typeinfo->typeinfo->flags |= 0x1000; /* TYPEFLAG_FDISPATCHABLE */ + + /* can't be dual if it doesn't derive from IDispatch */ + if (!(msft_typeinfo->typeinfo->flags & 0x1000)) /* TYPEFLAG_FDISPATCHABLE */ + msft_typeinfo->typeinfo->flags &= ~0x40; /* TYPEFLAG_FDUAL */ + + if(type_iface_get_inherit(interface)) + add_impl_type(msft_typeinfo, type_iface_get_inherit(interface), + ref_importinfo); + + /* count the number of inherited interfaces and non-local functions */ + for(ref = inherit; ref; ref = type_iface_get_inherit(ref)) { + num_parents++; + STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(ref) ) { + var_t *func = stmt_func->u.var; + if (!is_local(func->attrs)) num_funcs++; + } + } + msft_typeinfo->typeinfo->datatype2 = num_funcs << 16 | num_parents; + msft_typeinfo->typeinfo->cbSizeVft = num_funcs * pointer_size; + + STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(interface) ) { + var_t *func = stmt_func->u.var; + if(add_func_desc(msft_typeinfo, func, idx) == S_OK) + idx++; + } +} + +static void add_structure_typeinfo(msft_typelib_t *typelib, type_t *structure) +{ + int idx = 0; + var_t *cur; + msft_typeinfo_t *msft_typeinfo; + + if (-1 < structure->typelib_idx) + return; + + structure->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_RECORD, structure->name, structure->attrs); + msft_typeinfo->typeinfo->size = 0; + + if (type_struct_get_fields(structure)) + LIST_FOR_EACH_ENTRY( cur, type_struct_get_fields(structure), var_t, entry ) + add_var_desc(msft_typeinfo, idx++, cur); +} + +static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration) +{ + int idx = 0; + var_t *cur; + msft_typeinfo_t *msft_typeinfo; + + enumeration->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ENUM, enumeration->name, enumeration->attrs); + msft_typeinfo->typeinfo->size = 0; + + if (type_enum_get_values(enumeration)) + LIST_FOR_EACH_ENTRY( cur, type_enum_get_values(enumeration), var_t, entry ) + add_var_desc(msft_typeinfo, idx++, cur); +} + +static void add_typedef_typeinfo(msft_typelib_t *typelib, type_t *tdef) +{ + msft_typeinfo_t *msft_typeinfo; + int alignment; + + if (-1 < tdef->typelib_idx) + return; + + tdef->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ALIAS, tdef->name, tdef->attrs); + encode_type(typelib, get_type_vt(type_alias_get_aliasee(tdef)), + type_alias_get_aliasee(tdef), + &msft_typeinfo->typeinfo->datatype1, + &msft_typeinfo->typeinfo->size, + &alignment, &msft_typeinfo->typeinfo->datatype2); + msft_typeinfo->typeinfo->typekind |= (alignment << 11 | alignment << 6); +} + +static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls) +{ + msft_typeinfo_t *msft_typeinfo; + ifref_t *iref; + int num_ifaces = 0, offset, i; + MSFT_RefRecord *ref, *first = NULL, *first_source = NULL; + int have_default = 0, have_default_source = 0; + const attr_t *attr; + ifref_list_t *ifaces; + + if (-1 < cls->typelib_idx) + return; + + cls->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_COCLASS, cls->name, cls->attrs); + + ifaces = type_coclass_get_ifaces(cls); + if (ifaces) LIST_FOR_EACH_ENTRY( iref, ifaces, ifref_t, entry ) num_ifaces++; + + offset = msft_typeinfo->typeinfo->datatype1 = ctl2_alloc_segment(typelib, MSFT_SEG_REFERENCES, + num_ifaces * sizeof(*ref), 0); + + i = 0; + if (ifaces) LIST_FOR_EACH_ENTRY( iref, ifaces, ifref_t, entry ) { + if(iref->iface->typelib_idx == -1) + add_interface_typeinfo(typelib, iref->iface); + ref = (MSFT_RefRecord*) (typelib->typelib_segment_data[MSFT_SEG_REFERENCES] + offset + i * sizeof(*ref)); + ref->reftype = typelib->typelib_typeinfo_offsets[iref->iface->typelib_idx]; + ref->flags = 0; + ref->oCustData = -1; + ref->onext = -1; + if(i < num_ifaces - 1) + ref->onext = offset + (i + 1) * sizeof(*ref); + + if (iref->attrs) LIST_FOR_EACH_ENTRY( attr, iref->attrs, const attr_t, entry ) { + switch(attr->type) { + case ATTR_DEFAULT: + ref->flags |= 0x1; /* IMPLTYPEFLAG_FDEFAULT */ + break; + case ATTR_DEFAULTVTABLE: + ref->flags |= 0x8; /* IMPLTYPEFLAG_FDEFAULTVTABLE */ + break; + case ATTR_RESTRICTED: + ref->flags |= 0x4; /* IMPLTYPEFLAG_FRESTRICTED */ + break; + case ATTR_SOURCE: + ref->flags |= 0x2; /* IMPLTYPEFLAG_FSOURCE */ + break; + default: + warning("add_coclass_typeinfo: unhandled attr %d\n", attr->type); + } + } + if(ref->flags & 0x1) { /* IMPLTYPEFLAG_FDEFAULT */ + if(ref->flags & 0x2) /* IMPLTYPEFLAG_SOURCE */ + have_default_source = 1; + else + have_default = 1; + } + + /* If the interface is non-restricted and we haven't already had one then + remember it so that we can use it as a default later */ + if((ref->flags & 0x4) == 0) { /* IMPLTYPEFLAG_FRESTRICTED */ + if(ref->flags & 0x2) { /* IMPLTYPEFLAG_FSOURCE */ + if(!first_source) + first_source = ref; + } + else if(!first) + first = ref; + } + i++; + } + + /* If we haven't had a default interface, then set the default flags on the + first ones */ + if(!have_default && first) + first->flags |= 0x1; + if(!have_default_source && first_source) + first_source->flags |= 0x1; + + msft_typeinfo->typeinfo->cImplTypes = num_ifaces; + msft_typeinfo->typeinfo->size = 4; + msft_typeinfo->typeinfo->typekind |= 0x2200; +} + +static void add_module_typeinfo(msft_typelib_t *typelib, type_t *module) +{ + int idx = 0; + const statement_t *stmt; + msft_typeinfo_t *msft_typeinfo; + + if (-1 < module->typelib_idx) + return; + + module->typelib_idx = typelib->typelib_header.nrtypeinfos; + msft_typeinfo = create_msft_typeinfo(typelib, TKIND_MODULE, module->name, module->attrs); + msft_typeinfo->typeinfo->typekind |= 0x0a00; + + STATEMENTS_FOR_EACH_FUNC( stmt, module->details.module->stmts ) { + var_t *func = stmt->u.var; + if(add_func_desc(msft_typeinfo, func, idx) == S_OK) + idx++; + } + + msft_typeinfo->typeinfo->size = idx; +} + +static void add_type_typeinfo(msft_typelib_t *typelib, type_t *type) +{ + switch (type_get_type(type)) { + case TYPE_INTERFACE: + add_interface_typeinfo(typelib, type); + break; + case TYPE_STRUCT: + add_structure_typeinfo(typelib, type); + break; + case TYPE_ENUM: + add_enum_typeinfo(typelib, type); + break; + case TYPE_COCLASS: + add_coclass_typeinfo(typelib, type); + break; + case TYPE_BASIC: + case TYPE_POINTER: + break; + default: + error("add_entry: unhandled type 0x%x for %s\n", + type_get_type(type), type->name); + break; + } +} + +static void add_entry(msft_typelib_t *typelib, const statement_t *stmt) +{ + switch(stmt->type) { + case STMT_LIBRARY: + case STMT_IMPORT: + case STMT_CPPQUOTE: + case STMT_DECLARATION: + /* not included in typelib */ + break; + case STMT_IMPORTLIB: + /* not processed here */ + break; + case STMT_TYPEDEF: + { + const type_list_t *type_entry = stmt->u.type_list; + for (; type_entry; type_entry = type_entry->next) { + /* if the type is public then add the typedef, otherwise attempt + * to add the aliased type */ + if (is_attr(type_entry->type->attrs, ATTR_PUBLIC)) + add_typedef_typeinfo(typelib, type_entry->type); + else + add_type_typeinfo(typelib, type_alias_get_aliasee(type_entry->type)); + } + break; + } + case STMT_MODULE: + add_module_typeinfo(typelib, stmt->u.type); + break; + case STMT_TYPE: + case STMT_TYPEREF: + { + type_t *type = stmt->u.type; + add_type_typeinfo(typelib, type); + break; + } + } +} + +static void set_name(msft_typelib_t *typelib) +{ + int offset; + + offset = ctl2_alloc_name(typelib, typelib->typelib->name); + if (offset == -1) return; + typelib->typelib_header.NameOffset = offset; + return; +} + +static void set_version(msft_typelib_t *typelib) +{ + typelib->typelib_header.version = get_attrv( typelib->typelib->attrs, ATTR_VERSION ); +} + +static void set_guid(msft_typelib_t *typelib) +{ + MSFT_GuidEntry guidentry; + int offset; + void *ptr; + GUID guid = {0,0,0,{0,0,0,0,0,0}}; + + guidentry.guid = guid; + guidentry.hreftype = -2; + guidentry.next_hash = -1; + + ptr = get_attrp( typelib->typelib->attrs, ATTR_UUID ); + if (ptr) guidentry.guid = *(GUID *)ptr; + + offset = ctl2_alloc_guid(typelib, &guidentry); + typelib->typelib_header.posguid = offset; + + return; +} + +static void set_doc_string(msft_typelib_t *typelib) +{ + char *str = get_attrp( typelib->typelib->attrs, ATTR_HELPSTRING ); + + if (str) + { + int offset = ctl2_alloc_string(typelib, str); + if (offset != -1) typelib->typelib_header.helpstring = offset; + } +} + +static void set_help_file_name(msft_typelib_t *typelib) +{ + char *str = get_attrp( typelib->typelib->attrs, ATTR_HELPFILE ); + + if (str) + { + int offset = ctl2_alloc_string(typelib, str); + if (offset != -1) + { + typelib->typelib_header.helpfile = offset; + typelib->typelib_header.varflags |= 0x10; + } + } +} + +static void set_help_context(msft_typelib_t *typelib) +{ + const expr_t *expr = get_attrp( typelib->typelib->attrs, ATTR_HELPCONTEXT ); + if (expr) typelib->typelib_header.helpcontext = expr->cval; +} + +static void set_help_string_dll(msft_typelib_t *typelib) +{ + char *str = get_attrp( typelib->typelib->attrs, ATTR_HELPSTRINGDLL ); + + if (str) + { + int offset = ctl2_alloc_string(typelib, str); + if (offset != -1) + { + typelib->help_string_dll_offset = offset; + typelib->typelib_header.varflags |= 0x100; + } + } +} + +static void set_help_string_context(msft_typelib_t *typelib) +{ + const expr_t *expr = get_attrp( typelib->typelib->attrs, ATTR_HELPSTRINGCONTEXT ); + if (expr) typelib->typelib_header.helpstringcontext = expr->cval; +} + +static void set_lcid(msft_typelib_t *typelib) +{ + const expr_t *lcid_expr = get_attrp( typelib->typelib->attrs, ATTR_LIBLCID ); + if(lcid_expr) + { + typelib->typelib_header.lcid = lcid_expr->cval; + typelib->typelib_header.lcid2 = lcid_expr->cval; + } +} + +static void set_lib_flags(msft_typelib_t *typelib) +{ + const attr_t *attr; + + typelib->typelib_header.flags = 0; + if (!typelib->typelib->attrs) return; + LIST_FOR_EACH_ENTRY( attr, typelib->typelib->attrs, const attr_t, entry ) + { + switch(attr->type) { + case ATTR_CONTROL: + typelib->typelib_header.flags |= 0x02; /* LIBFLAG_FCONTROL */ + break; + case ATTR_HIDDEN: + typelib->typelib_header.flags |= 0x04; /* LIBFLAG_FHIDDEN */ + break; + case ATTR_RESTRICTED: + typelib->typelib_header.flags |= 0x01; /* LIBFLAG_FRESTRICTED */ + break; + default: + break; + } + } + return; +} + +static void ctl2_write_segment(msft_typelib_t *typelib, int segment) +{ + put_data(typelib->typelib_segment_data[segment], typelib->typelib_segdir[segment].length); +} + +static void ctl2_finalize_typeinfos(msft_typelib_t *typelib, int filesize) +{ + msft_typeinfo_t *typeinfo; + + for (typeinfo = typelib->typeinfos; typeinfo; typeinfo = typeinfo->next_typeinfo) { + typeinfo->typeinfo->memoffset = filesize; + if (typeinfo->func_data) + filesize += typeinfo->func_data[0] + ((typeinfo->typeinfo->cElement & 0xffff) * 12); + if (typeinfo->var_data) + filesize += typeinfo->var_data[0] + (((typeinfo->typeinfo->cElement >> 16) & 0xffff) * 12); + if (typeinfo->func_data || typeinfo->var_data) + filesize += 4; + } +} + +static int ctl2_finalize_segment(msft_typelib_t *typelib, int filepos, int segment) +{ + if (typelib->typelib_segdir[segment].length) { + typelib->typelib_segdir[segment].offset = filepos; + } else { + typelib->typelib_segdir[segment].offset = -1; + } + + return typelib->typelib_segdir[segment].length; +} + + +static void ctl2_write_typeinfos(msft_typelib_t *typelib) +{ + msft_typeinfo_t *typeinfo; + int typedata_size; + + for (typeinfo = typelib->typeinfos; typeinfo; typeinfo = typeinfo->next_typeinfo) { + if (!typeinfo->func_data && !typeinfo->var_data) continue; + typedata_size = 0; + if (typeinfo->func_data) + typedata_size = typeinfo->func_data[0]; + if (typeinfo->var_data) + typedata_size += typeinfo->var_data[0]; + put_data(&typedata_size, sizeof(int)); + if (typeinfo->func_data) + put_data(typeinfo->func_data + 1, typeinfo->func_data[0]); + if (typeinfo->var_data) + put_data(typeinfo->var_data + 1, typeinfo->var_data[0]); + if (typeinfo->func_indices) + put_data(typeinfo->func_indices, (typeinfo->typeinfo->cElement & 0xffff) * 4); + if (typeinfo->var_indices) + put_data(typeinfo->var_indices, (typeinfo->typeinfo->cElement >> 16) * 4); + if (typeinfo->func_names) + put_data(typeinfo->func_names, (typeinfo->typeinfo->cElement & 0xffff) * 4); + if (typeinfo->var_names) + put_data(typeinfo->var_names, (typeinfo->typeinfo->cElement >> 16) * 4); + if (typeinfo->func_offsets) + put_data(typeinfo->func_offsets, (typeinfo->typeinfo->cElement & 0xffff) * 4); + if (typeinfo->var_offsets) { + int add = 0, i, offset; + if(typeinfo->func_data) + add = typeinfo->func_data[0]; + for(i = 0; i < (typeinfo->typeinfo->cElement >> 16); i++) { + offset = typeinfo->var_offsets[i]; + offset += add; + put_data(&offset, 4); + } + } + } +} + +static void save_all_changes(msft_typelib_t *typelib) +{ + int filepos; + + chat("save_all_changes(%p)\n", typelib); + + filepos = sizeof(MSFT_Header) + sizeof(MSFT_SegDir); + if(typelib->typelib_header.varflags & 0x100) filepos += 4; /* helpstringdll */ + filepos += typelib->typelib_header.nrtypeinfos * 4; + + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_TYPEINFO); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_GUIDHASH); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_GUID); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_REFERENCES); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_IMPORTINFO); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_IMPORTFILES); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_NAMEHASH); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_NAME); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_STRING); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_TYPEDESC); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_ARRAYDESC); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_CUSTDATA); + filepos += ctl2_finalize_segment(typelib, filepos, MSFT_SEG_CUSTDATAGUID); + + ctl2_finalize_typeinfos(typelib, filepos); + + byte_swapped = 0; + init_output_buffer(); + + put_data(&typelib->typelib_header, sizeof(typelib->typelib_header)); + if(typelib->typelib_header.varflags & 0x100) + put_data(&typelib->help_string_dll_offset, sizeof(typelib->help_string_dll_offset)); + + put_data(typelib->typelib_typeinfo_offsets, typelib->typelib_header.nrtypeinfos * 4); + put_data(&typelib->typelib_segdir, sizeof(typelib->typelib_segdir)); + ctl2_write_segment( typelib, MSFT_SEG_TYPEINFO ); + ctl2_write_segment( typelib, MSFT_SEG_GUIDHASH ); + ctl2_write_segment( typelib, MSFT_SEG_GUID ); + ctl2_write_segment( typelib, MSFT_SEG_REFERENCES ); + ctl2_write_segment( typelib, MSFT_SEG_IMPORTINFO ); + ctl2_write_segment( typelib, MSFT_SEG_IMPORTFILES ); + ctl2_write_segment( typelib, MSFT_SEG_NAMEHASH ); + ctl2_write_segment( typelib, MSFT_SEG_NAME ); + ctl2_write_segment( typelib, MSFT_SEG_STRING ); + ctl2_write_segment( typelib, MSFT_SEG_TYPEDESC ); + ctl2_write_segment( typelib, MSFT_SEG_ARRAYDESC ); + ctl2_write_segment( typelib, MSFT_SEG_CUSTDATA ); + ctl2_write_segment( typelib, MSFT_SEG_CUSTDATAGUID ); + + ctl2_write_typeinfos(typelib); + flush_output_buffer( typelib->typelib->filename ); +} + +int create_msft_typelib(typelib_t *typelib) +{ + msft_typelib_t *msft; + int failed = 0; + const statement_t *stmt; + time_t cur_time; + char *time_override; + unsigned int version = 5 << 24 | 1 << 16 | 164; /* 5.01.0164 */ + GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + + pointer_size = (typelib_kind == SYS_WIN64) ? 8 : 4; + + msft = xmalloc(sizeof(*msft)); + memset(msft, 0, sizeof(*msft)); + msft->typelib = typelib; + + ctl2_init_header(msft); + ctl2_init_segdir(msft); + + msft->typelib_header.varflags |= typelib_kind; + + /* + * The following two calls return an offset or -1 if out of memory. We + * specifically need an offset of 0, however, so... + */ + if (ctl2_alloc_segment(msft, MSFT_SEG_GUIDHASH, 0x80, 0x80)) { failed = 1; } + if (ctl2_alloc_segment(msft, MSFT_SEG_NAMEHASH, 0x200, 0x200)) { failed = 1; } + + if(failed) + { + free(msft); + return 0; + } + + msft->typelib_guidhash_segment = (int *)msft->typelib_segment_data[MSFT_SEG_GUIDHASH]; + msft->typelib_namehash_segment = (int *)msft->typelib_segment_data[MSFT_SEG_NAMEHASH]; + + memset(msft->typelib_guidhash_segment, 0xff, 0x80); + memset(msft->typelib_namehash_segment, 0xff, 0x200); + + set_lib_flags(msft); + set_lcid(msft); + set_help_file_name(msft); + set_doc_string(msft); + set_guid(msft); + set_version(msft); + set_name(msft); + set_help_context(msft); + set_help_string_dll(msft); + set_help_string_context(msft); + + /* midl adds two sets of custom data to the library: the current unix time + and midl's version number */ + time_override = getenv( "WIDL_TIME_OVERRIDE"); + cur_time = time_override ? atol( time_override) : time(NULL); + set_custdata(msft, &midl_time_guid, VT_UI4, cur_time, &msft->typelib_header.CustomDataOffset); + set_custdata(msft, &midl_version_guid, VT_UI4, version, &msft->typelib_header.CustomDataOffset); + + if (typelib->stmts) + LIST_FOR_EACH_ENTRY( stmt, typelib->stmts, const statement_t, entry ) + add_entry(msft, stmt); + + save_all_changes(msft); + free(msft); + return 1; +} diff --git a/tools/wmc/CMakeLists.txt b/tools/wmc/CMakeLists.txt new file mode 100644 index 00000000000..565a275b71e --- /dev/null +++ b/tools/wmc/CMakeLists.txt @@ -0,0 +1,12 @@ + +list(APPEND SOURCE + lang.c + mcl.c + utils.c + wmc.c + write.c + mcy.tab.c) + +add_executable(wmc ${SOURCE}) + +target_link_libraries(wmc unicode) diff --git a/tools/wmc/wmctypes.h b/tools/wmc/wmctypes.h new file mode 100644 index 00000000000..097a15ca4aa --- /dev/null +++ b/tools/wmc/wmctypes.h @@ -0,0 +1,122 @@ +/* + * Main definitions and externals + * + * Copyright 2000 Bertho A. Stultiens (BS) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WMC_WMCTYPES_H +#define __WMC_WMCTYPES_H + +#include +#include +#include + +/* Byteordering defines */ +#define WMC_BO_NATIVE 0x00 +#define WMC_BO_LITTLE 0x01 +#define WMC_BO_BIG 0x02 + +#define WMC_LOBYTE(w) ((WORD)(w) & 0xff) +#define WMC_HIBYTE(w) (((WORD)(w) >> 8) & 0xff) +#define WMC_LOWORD(d) ((DWORD)(d) & 0xffff) +#define WMC_HIWORD(d) (((DWORD)(d) >> 16) & 0xffff) +#define BYTESWAP_WORD(w) ((WORD)(((WORD)WMC_LOBYTE(w) << 8) + (WORD)WMC_HIBYTE(w))) +#define BYTESWAP_DWORD(d) ((DWORD)(((DWORD)BYTESWAP_WORD(WMC_LOWORD(d)) << 16) + ((DWORD)BYTESWAP_WORD(WMC_HIWORD(d))))) + +/* + * Tokenizer types + */ +typedef enum tok_enum { + tok_null = 0, + tok_keyword, + tok_severity, + tok_facility, + tok_language +} tok_e; + +typedef struct token { + tok_e type; + const WCHAR *name; /* Parsed name of token */ + int token; /* Tokenvalue or language code */ + int codepage; + const WCHAR *alias; /* Alias or filename */ + int fixed; /* Cleared if token may change */ +} token_t; + +typedef struct lan_cp { + int language; + int codepage; +} lan_cp_t; + +typedef struct cp_xlat { + int lan; + int cpin; + int cpout; +} cp_xlat_t; + +typedef struct lanmsg { + int lan; /* Language code of message */ + int cp; /* Codepage of message */ + WCHAR *msg; /* Message text */ + int len; /* Message length including trailing '\0' */ +} lanmsg_t; + +typedef struct msg { + int id; /* Message ID */ + unsigned realid; /* Combined message ID */ + WCHAR *sym; /* Symbolic name */ + int sev; /* Severity code */ + int fac; /* Facility code */ + lanmsg_t **msgs; /* Array message texts */ + int nmsgs; /* Number of message texts in array */ + int base; /* Base of number to print */ + WCHAR *cast; /* Typecase to use */ +} msg_t; + +typedef enum { + nd_msg, + nd_comment +} node_e; + +typedef struct node { + struct node *next; + struct node *prev; + node_e type; + union { + void *all; + WCHAR *comment; + msg_t *msg; + } u; +} node_t; + +typedef struct block { + unsigned idlo; /* Lowest ID in this set */ + unsigned idhi; /* Highest ID in this set */ + int size; /* Size of this set */ + lanmsg_t **msgs; /* Array of messages in this set */ + int nmsg; /* Number of array entries */ +} block_t; + +typedef struct lan_blk { + struct lan_blk *next; /* Linkage for languages */ + struct lan_blk *prev; + int lan; /* The language of this block */ + block_t *blks; /* Array of blocks for this language */ + int nblk; /* Nr of blocks in array */ +} lan_blk_t; + +#endif diff --git a/tools/wrc/CMakeLists.txt b/tools/wrc/CMakeLists.txt new file mode 100644 index 00000000000..c94abad88e4 --- /dev/null +++ b/tools/wrc/CMakeLists.txt @@ -0,0 +1,17 @@ + +list(APPEND SOURCE + dumpres.c + genres.c + newstruc.c + readres.c + translation.c + utils.c + wrc.c + writeres.c + parser.tab.c + lex.yy.c + port/mkstemps.c) + +add_executable(wrc ${SOURCE}) + +target_link_libraries(wrc wpp unicode) diff --git a/tools/wrc/newstruc.c b/tools/wrc/newstruc.c new file mode 100644 index 00000000000..da8fead55a1 --- /dev/null +++ b/tools/wrc/newstruc.c @@ -0,0 +1,1194 @@ +/* + * Create dynamic new structures of various types + * and some utils in that trend. + * + * Copyright 1998 Bertho A. Stultiens + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include +#include +#include +#include +#include + +#include "wrc.h" +#include "newstruc.h" +#include "utils.h" +#include "parser.h" + +#include +typedef struct +{ + DWORD biSize; + WORD biWidth; + WORD biHeight; + WORD biPlanes; + WORD biBitCount; +} BITMAPOS2HEADER; +#include + +/* Generate new_* functions that have no parameters (NOTE: no ';') */ +__NEW_STRUCT_FUNC(dialog) +__NEW_STRUCT_FUNC(dialogex) +__NEW_STRUCT_FUNC(name_id) +__NEW_STRUCT_FUNC(menu) +__NEW_STRUCT_FUNC(menuex) +__NEW_STRUCT_FUNC(menu_item) +__NEW_STRUCT_FUNC(menuex_item) +__NEW_STRUCT_FUNC(control) +__NEW_STRUCT_FUNC(icon) +__NEW_STRUCT_FUNC(cursor) +__NEW_STRUCT_FUNC(versioninfo) +__NEW_STRUCT_FUNC(ver_value) +__NEW_STRUCT_FUNC(ver_block) +__NEW_STRUCT_FUNC(stt_entry) +__NEW_STRUCT_FUNC(accelerator) +__NEW_STRUCT_FUNC(event) +__NEW_STRUCT_FUNC(raw_data) +__NEW_STRUCT_FUNC(lvc) +__NEW_STRUCT_FUNC(res_count) +__NEW_STRUCT_FUNC(string) +__NEW_STRUCT_FUNC(toolbar_item) +__NEW_STRUCT_FUNC(ani_any) + +/* New instances for all types of structures */ +/* Very inefficient (in size), but very functional :-] + * Especially for type-checking. + */ +resource_t *new_resource(enum res_e t, void *res, int memopt, language_t *lan) +{ + resource_t *r = xmalloc(sizeof(resource_t)); + memset( r, 0, sizeof(*r) ); + r->type = t; + r->res.overlay = res; + r->memopt = memopt; + r->lan = lan; + return r; +} + +version_t *new_version(DWORD v) +{ + version_t *vp = xmalloc(sizeof(version_t)); + *vp = v; + return vp; +} + +characts_t *new_characts(DWORD c) +{ + characts_t *cp = xmalloc(sizeof(characts_t)); + *cp = c; + return cp; +} + +language_t *new_language(int id, int sub) +{ + language_t *lan = xmalloc(sizeof(language_t)); + lan->id = id; + lan->sub = sub; + return lan; +} + +language_t *dup_language(language_t *l) +{ + if(!l) return NULL; + return new_language(l->id, l->sub); +} + +version_t *dup_version(version_t *v) +{ + if(!v) return NULL; + return new_version(*v); +} + +characts_t *dup_characts(characts_t *c) +{ + if(!c) return NULL; + return new_characts(*c); +} + +html_t *new_html(raw_data_t *rd, int *memopt) +{ + html_t *html = xmalloc(sizeof(html_t)); + html->data = rd; + if(memopt) + { + html->memopt = *memopt; + free(memopt); + } + else + html->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE; + return html; +} + +rcdata_t *new_rcdata(raw_data_t *rd, int *memopt) +{ + rcdata_t *rc = xmalloc(sizeof(rcdata_t)); + rc->data = rd; + if(memopt) + { + rc->memopt = *memopt; + free(memopt); + } + else + rc->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE; + return rc; +} + +font_id_t *new_font_id(int size, string_t *face, int weight, int italic) +{ + font_id_t *fid = xmalloc(sizeof(font_id_t)); + fid->name = face; + fid->size = size; + fid->weight = weight; + fid->italic = italic; + return fid; +} + +user_t *new_user(name_id_t *type, raw_data_t *rd, int *memopt) +{ + user_t *usr = xmalloc(sizeof(user_t)); + usr->data = rd; + if(memopt) + { + usr->memopt = *memopt; + free(memopt); + } + else + usr->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE; + usr->type = type; + return usr; +} + +font_t *new_font(raw_data_t *rd, int *memopt) +{ + font_t *fnt = xmalloc(sizeof(font_t)); + fnt->data = rd; + if(memopt) + { + fnt->memopt = *memopt; + free(memopt); + } + else + fnt->memopt = WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE; + return fnt; +} + +fontdir_t *new_fontdir(raw_data_t *rd, int *memopt) +{ + fontdir_t *fnd = xmalloc(sizeof(fontdir_t)); + fnd->data = rd; + if(memopt) + { + fnd->memopt = *memopt; + free(memopt); + } + else + fnd->memopt = WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE; + return fnd; +} + + +/* + * Convert bitmaps to proper endian + */ +static void convert_bitmap_swap_v3(BITMAPINFOHEADER *bih) +{ + bih->biSize = BYTESWAP_DWORD(bih->biSize); + bih->biWidth = BYTESWAP_DWORD(bih->biWidth); + bih->biHeight = BYTESWAP_DWORD(bih->biHeight); + bih->biPlanes = BYTESWAP_WORD(bih->biPlanes); + bih->biBitCount = BYTESWAP_WORD(bih->biBitCount); + bih->biCompression = BYTESWAP_DWORD(bih->biCompression); + bih->biSizeImage = BYTESWAP_DWORD(bih->biSizeImage); + bih->biXPelsPerMeter = BYTESWAP_DWORD(bih->biXPelsPerMeter); + bih->biYPelsPerMeter = BYTESWAP_DWORD(bih->biYPelsPerMeter); + bih->biClrUsed = BYTESWAP_DWORD(bih->biClrUsed); + bih->biClrImportant = BYTESWAP_DWORD(bih->biClrImportant); +} + +static void convert_bitmap_swap_v4(BITMAPV4HEADER *b4h) +{ + convert_bitmap_swap_v3((BITMAPINFOHEADER *)b4h); + b4h->bV4RedMask = BYTESWAP_DWORD(b4h->bV4RedMask); + b4h->bV4GreenMask = BYTESWAP_DWORD(b4h->bV4GreenMask); + b4h->bV4BlueMask = BYTESWAP_DWORD(b4h->bV4BlueMask); + b4h->bV4AlphaMask = BYTESWAP_DWORD(b4h->bV4AlphaMask); + b4h->bV4CSType = BYTESWAP_DWORD(b4h->bV4CSType); + b4h->bV4Endpoints.ciexyzRed.ciexyzX = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzRed.ciexyzX); + b4h->bV4Endpoints.ciexyzRed.ciexyzY = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzRed.ciexyzY); + b4h->bV4Endpoints.ciexyzRed.ciexyzZ = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzRed.ciexyzZ); + b4h->bV4Endpoints.ciexyzGreen.ciexyzX = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzGreen.ciexyzX); + b4h->bV4Endpoints.ciexyzGreen.ciexyzY = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzGreen.ciexyzY); + b4h->bV4Endpoints.ciexyzGreen.ciexyzZ = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzGreen.ciexyzZ); + b4h->bV4Endpoints.ciexyzBlue.ciexyzX = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzBlue.ciexyzX); + b4h->bV4Endpoints.ciexyzBlue.ciexyzY = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzBlue.ciexyzY); + b4h->bV4Endpoints.ciexyzBlue.ciexyzZ = BYTESWAP_DWORD(b4h->bV4Endpoints.ciexyzBlue.ciexyzZ); + b4h->bV4GammaRed = BYTESWAP_DWORD(b4h->bV4GammaRed); + b4h->bV4GammaGreen = BYTESWAP_DWORD(b4h->bV4GammaGreen); + b4h->bV4GammaBlue = BYTESWAP_DWORD(b4h->bV4GammaBlue); +} + +static void convert_bitmap_swap_os2(BITMAPOS2HEADER *boh) +{ + boh->biSize = BYTESWAP_DWORD(boh->biSize); + boh->biWidth = BYTESWAP_WORD(boh->biWidth); + boh->biHeight = BYTESWAP_WORD(boh->biHeight); + boh->biPlanes = BYTESWAP_WORD(boh->biPlanes); + boh->biBitCount = BYTESWAP_WORD(boh->biBitCount); +} + +#define FL_SIGBE 0x01 +#define FL_SIZEBE 0x02 +#define FL_V4 0x04 +#define FL_OS2 0x08 +static int convert_bitmap(char *data, int size) +{ + BITMAPINFOHEADER *bih = (BITMAPINFOHEADER *)data; + BITMAPV4HEADER *b4h = (BITMAPV4HEADER *)data; + BITMAPOS2HEADER *boh = (BITMAPOS2HEADER *)data; + int type = 0; + int returnSize = 0; /* size to be returned */ +#ifdef WORDS_BIGENDIAN + DWORD bisizel = BYTESWAP_DWORD(sizeof(BITMAPINFOHEADER)); + DWORD b4sizel = BYTESWAP_DWORD(sizeof(BITMAPV4HEADER)); + DWORD bosizel = BYTESWAP_DWORD(sizeof(BITMAPOS2HEADER)); + DWORD bisizeb = sizeof(BITMAPINFOHEADER); + DWORD b4sizeb = sizeof(BITMAPV4HEADER); + DWORD bosizeb = sizeof(BITMAPOS2HEADER); +#else + DWORD bisizel = sizeof(BITMAPINFOHEADER); + DWORD b4sizel = sizeof(BITMAPV4HEADER); + DWORD bosizel = sizeof(BITMAPOS2HEADER); + DWORD bisizeb = BYTESWAP_DWORD(sizeof(BITMAPINFOHEADER)); + DWORD b4sizeb = BYTESWAP_DWORD(sizeof(BITMAPV4HEADER)); + DWORD bosizeb = BYTESWAP_DWORD(sizeof(BITMAPOS2HEADER)); +#endif + + + /* + * Originally the bih and b4h pointers were simply incremented here, + * and memmoved at the end of the function. This causes alignment + * issues on solaris, so we do the memmove here rather than at the end. + */ + if(data[0] == 'B' && data[1] == 'M') + { + /* Little endian signature */ + memmove(data, data+sizeof(BITMAPFILEHEADER), size - sizeof(BITMAPFILEHEADER)); + returnSize = sizeof(BITMAPFILEHEADER); + } + else if(data[0] == 'M' && data[1] == 'B') + { + type |= FL_SIGBE; /* Big endian signature */ + memmove(data, data+sizeof(BITMAPFILEHEADER), size - sizeof(BITMAPFILEHEADER)); + returnSize = sizeof(BITMAPFILEHEADER); + + } + + if(bih->biSize == bisizel) + { + /* Little endian */ + } + else if(bih->biSize == bisizeb) + { + type |= FL_SIZEBE; + } + else if(bih->biSize == b4sizel) + { + type |= FL_V4; + } + else if(bih->biSize == b4sizeb) + { + type |= FL_SIZEBE | FL_V4; + } + else if(!bih->biSize || bih->biSize == bosizel) + { + type |= FL_OS2; + } + else if(bih->biSize == bosizeb) + { + type |= FL_SIZEBE | FL_OS2; + } + else + parser_error("Invalid bitmap format, bih->biSize = %d", bih->biSize); + + switch(type) + { + default: + break; + case FL_SIZEBE: + case FL_SIZEBE | FL_V4: + case FL_SIZEBE | FL_OS2: + parser_warning("Bitmap v%c signature little-endian, but size big-endian\n", type & FL_V4 ? '4' : '3'); + break; + case FL_SIGBE: + case FL_SIGBE | FL_V4: + case FL_SIGBE | FL_OS2: + parser_warning("Bitmap v%c signature big-endian, but size little-endian\n", type & FL_V4 ? '4' : '3'); + break; + } + + switch(byteorder) + { +#ifdef WORDS_BIGENDIAN + default: +#endif + case WRC_BO_BIG: + if(!(type & FL_SIZEBE)) + { + if(type & FL_V4) + convert_bitmap_swap_v4(b4h); + else if(type & FL_OS2) + { + convert_bitmap_swap_os2(boh); + } + else + convert_bitmap_swap_v3(bih); + } + break; +#ifndef WORDS_BIGENDIAN + default: +#endif + case WRC_BO_LITTLE: + if(type & FL_SIZEBE) + { + if(type & FL_V4) + convert_bitmap_swap_v4(b4h); + else if(type & FL_OS2) + { + convert_bitmap_swap_os2(boh); + } + else + convert_bitmap_swap_v3(bih); + } + break; + } + + if(size && (void *)data != (void *)bih) + { + /* We have the fileheader still attached, remove it */ + memmove(data, data+sizeof(BITMAPFILEHEADER), size - sizeof(BITMAPFILEHEADER)); + return sizeof(BITMAPFILEHEADER); + } + return returnSize; +} +#undef FL_SIGBE +#undef FL_SIZEBE +#undef FL_V4 + +/* + * Cursor and icon splitter functions used when allocating + * cursor- and icon-groups. + */ +typedef struct { + language_t lan; + int id; +} id_alloc_t; + +static int get_new_id(id_alloc_t **list, int *n, language_t *lan) +{ + int i; + assert(lan != NULL); + assert(list != NULL); + assert(n != NULL); + + if(!*list) + { + *list = xmalloc(sizeof(id_alloc_t)); + *n = 1; + (*list)[0].lan = *lan; + (*list)[0].id = 1; + return 1; + } + + for(i = 0; i < *n; i++) + { + if((*list)[i].lan.id == lan->id && (*list)[i].lan.sub == lan->sub) + return ++((*list)[i].id); + } + + *list = xrealloc(*list, sizeof(id_alloc_t) * (*n+1)); + (*list)[*n].lan = *lan; + (*list)[*n].id = 1; + *n += 1; + return 1; +} + +static int alloc_icon_id(language_t *lan) +{ + static id_alloc_t *idlist = NULL; + static int nid = 0; + + return get_new_id(&idlist, &nid, lan); +} + +static int alloc_cursor_id(language_t *lan) +{ + static id_alloc_t *idlist = NULL; + static int nid = 0; + + return get_new_id(&idlist, &nid, lan); +} + +static void split_icons(raw_data_t *rd, icon_group_t *icog, int *nico) +{ + int cnt; + int i; + icon_t *ico; + icon_t *list = NULL; + icon_header_t *ih = (icon_header_t *)rd->data; + int swap = 0; + + if(ih->type == 1) + swap = 0; + else if(BYTESWAP_WORD(ih->type) == 1) + swap = 1; + else + parser_error("Icon resource data has invalid type id %d", ih->type); + + cnt = swap ? BYTESWAP_WORD(ih->count) : ih->count; + for(i = 0; i < cnt; i++) + { + icon_dir_entry_t ide; + BITMAPINFOHEADER info; + memcpy(&ide, rd->data + sizeof(icon_header_t) + + i*sizeof(icon_dir_entry_t), sizeof(ide)); + + ico = new_icon(); + ico->id = alloc_icon_id(icog->lvc.language); + ico->lvc = icog->lvc; + if(swap) + { + ide.offset = BYTESWAP_DWORD(ide.offset); + ide.ressize= BYTESWAP_DWORD(ide.ressize); + } + if(ide.offset > rd->size + || ide.offset + ide.ressize > rd->size) + parser_error("Icon resource data corrupt"); + ico->width = ide.width; + ico->height = ide.height; + ico->nclr = ide.nclr; + ico->planes = swap ? BYTESWAP_WORD(ide.planes) : ide.planes; + ico->bits = swap ? BYTESWAP_WORD(ide.bits) : ide.bits; + memcpy(&info, rd->data + ide.offset, sizeof(info)); + convert_bitmap((char *) &info, 0); + memcpy(rd->data + ide.offset, &info, sizeof(info)); + + if(!ico->planes) + { + /* Argh! They did not fill out the resdir structure */ + /* The bitmap is in destination byteorder. We want native for our structures */ + switch(byteorder) + { +#ifdef WORDS_BIGENDIAN + case WRC_BO_LITTLE: +#else + case WRC_BO_BIG: +#endif + ico->planes = BYTESWAP_WORD(info.biPlanes); + break; + default: + ico->planes = info.biPlanes; + } + } + if(!ico->bits) + { + /* Argh! They did not fill out the resdir structure */ + /* The bitmap is in destination byteorder. We want native for our structures */ + switch(byteorder) + { +#ifdef WORDS_BIGENDIAN + case WRC_BO_LITTLE: +#else + case WRC_BO_BIG: +#endif + ico->bits = BYTESWAP_WORD(info.biBitCount); + break; + default: + ico->bits = info.biBitCount; + } + } + ico->data = new_raw_data(); + copy_raw_data(ico->data, rd, ide.offset, ide.ressize); + if(!list) + { + list = ico; + } + else + { + ico->next = list; + list->prev = ico; + list = ico; + } + } + icog->iconlist = list; + *nico = cnt; +} + +static void split_cursors(raw_data_t *rd, cursor_group_t *curg, int *ncur) +{ + int cnt; + int i; + cursor_t *cur; + cursor_t *list = NULL; + cursor_header_t *ch = (cursor_header_t *)rd->data; + int swap = 0; + + if(ch->type == 2) + swap = 0; + else if(BYTESWAP_WORD(ch->type) == 2) + swap = 1; + else + parser_error("Cursor resource data has invalid type id %d", ch->type); + cnt = swap ? BYTESWAP_WORD(ch->count) : ch->count; + for(i = 0; i < cnt; i++) + { + cursor_dir_entry_t cde; + BITMAPINFOHEADER info; + memcpy(&cde, rd->data + sizeof(cursor_header_t) + + i*sizeof(cursor_dir_entry_t), sizeof(cde)); + + cur = new_cursor(); + cur->id = alloc_cursor_id(curg->lvc.language); + cur->lvc = curg->lvc; + if(swap) + { + cde.offset = BYTESWAP_DWORD(cde.offset); + cde.ressize= BYTESWAP_DWORD(cde.ressize); + } + if(cde.offset > rd->size + || cde.offset + cde.ressize > rd->size) + parser_error("Cursor resource data corrupt"); + cur->width = cde.width; + cur->height = cde.height; + cur->nclr = cde.nclr; + memcpy(&info, rd->data + cde.offset, sizeof(info)); + convert_bitmap((char *)&info, 0); + memcpy(rd->data + cde.offset, &info, sizeof(info)); + /* The bitmap is in destination byteorder. We want native for our structures */ + switch(byteorder) + { +#ifdef WORDS_BIGENDIAN + case WRC_BO_LITTLE: +#else + case WRC_BO_BIG: +#endif + cur->planes = BYTESWAP_WORD(info.biPlanes); + cur->bits = BYTESWAP_WORD(info.biBitCount); + break; + default: + cur->planes = info.biPlanes; + cur->bits = info.biBitCount; + } + if(!win32 && (cur->planes != 1 || cur->bits != 1)) + parser_warning("Win16 cursor contains colors\n"); + cur->xhot = swap ? BYTESWAP_WORD(cde.xhot) : cde.xhot; + cur->yhot = swap ? BYTESWAP_WORD(cde.yhot) : cde.yhot; + cur->data = new_raw_data(); + copy_raw_data(cur->data, rd, cde.offset, cde.ressize); + if(!list) + { + list = cur; + } + else + { + cur->next = list; + list->prev = cur; + list = cur; + } + } + curg->cursorlist = list; + *ncur = cnt; +} + + +icon_group_t *new_icon_group(raw_data_t *rd, int *memopt) +{ + icon_group_t *icog = xmalloc(sizeof(icon_group_t)); + if(memopt) + { + icog->memopt = *memopt; + free(memopt); + } + else + icog->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE | WRC_MO_DISCARDABLE; + icog->lvc = rd->lvc; + split_icons(rd, icog, &(icog->nicon)); + free(rd->data); + free(rd); + return icog; +} + +cursor_group_t *new_cursor_group(raw_data_t *rd, int *memopt) +{ + cursor_group_t *curg = xmalloc(sizeof(cursor_group_t)); + if(memopt) + { + curg->memopt = *memopt; + free(memopt); + } + else + curg->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE | WRC_MO_DISCARDABLE; + curg->lvc = rd->lvc; + split_cursors(rd, curg, &(curg->ncursor)); + free(rd->data); + free(rd); + return curg; +} + +/* + * Animated cursors and icons + * + * The format of animated cursors and icons is yet another example + * of bad design by "The Company". The entire RIFF structure is + * flawed by design because it is inconsistent and single minded: + * - some tags have lengths attached, others don't. The use of these + * non-length tags is absolutely unclear; + * - the content of "icon" tags can be both icons and cursors; + * - tags lack proper alignment constraints. It seems that everything + * is 16bit aligned, but I could not find that in any docu. Just be + * prepared to eat anything; + * - there are no strict constraints on tag-nesting and the organization + * is highly illogical; + * + * Anyhow, here is the basic structure: + * "RIFF" { dword taglength } + * "ACON" // What does it do? + * "LIST" { dword taglength } + * "INFO" // And what does this do? + * "INAM" { dword taglength } // Icon/cursor name + * {inam data} + * "IART" { dword taglength } // The artist + * {iart data} + * "fram" // Is followed by "icon"s + * "icon" { dword taglength } // First frame + * { icon/cursor data } + * "icon" { dword taglength } // Second frame + * { icon/cursor data } + * ... // ... + * "anih" { dword taglength } // Header structure + * { aniheader_t structure } + * "rate" { dword taglength } // The rate for each frame + * { `steps' dwords } + * "seq " { dword taglength } // The frame blit-order + * { `steps' dwords } + * + * Tag length are bytelength without the header and length field (i.e. -8). + * The "LIST" tag may occur several times and may encapsulate different + * tags. The `steps' is the number of "icon" tags found (actually the + * number of steps specified in the aniheader_t structure). The "seq "uence + * tag can be omitted, in which case the sequence is equal to the sequence + * of "icon"s found in the file. Also "rate" may be omitted, in which case + * the default from the aniheader_t structure is used. + * + * An animated cursor puts `.cur' formatted files into each "icon" tag, + * whereas animated icons contain `.ico' formatted files. + * + * Note about the code: Yes, it can be shorter/compressed. Some tags can be + * dealt with in the same code. However, this version shows what is going on + * and is better debug-able. + */ +static const char riff[4] = "RIFF"; +static const char acon[4] = "ACON"; +static const char list[4] = "LIST"; +static const char info[4] = "INFO"; +static const char inam[4] = "INAM"; +static const char iart[4] = "IART"; +static const char fram[4] = "fram"; +static const char icon[4] = "icon"; +static const char anih[4] = "anih"; +static const char rate[4] = "rate"; +static const char seq[4] = "seq "; + +#define SKIP_TAG(p,size) ((riff_tag_t *)(((char *)p) + (size))) + +#define NEXT_TAG(p) SKIP_TAG(p,(isswapped ? BYTESWAP_DWORD(p->size) : p->size) + sizeof(*p)) + +static void handle_ani_icon(riff_tag_t *rtp, enum res_e type, int isswapped) +{ + cursor_dir_entry_t *cdp; + cursor_header_t *chp; + int count; + int ctype; + int i; + static int once = 0; /* This will trigger only once per file! */ + const char *anistr = type == res_aniico ? "icon" : "cursor"; + /* Notes: + * Both cursor and icon directories are similar + * Both cursor and icon headers are similar + */ + + chp = (cursor_header_t *)(rtp+1); + cdp = (cursor_dir_entry_t *)(chp+1); + count = isswapped ? BYTESWAP_WORD(chp->count) : chp->count; + ctype = isswapped ? BYTESWAP_WORD(chp->type) : chp->type; + chp->reserved = BYTESWAP_WORD(chp->reserved); + chp->type = BYTESWAP_WORD(chp->type); + chp->count = BYTESWAP_WORD(chp->count); + + if(type == res_anicur && ctype != 2 && !once) + { + parser_warning("Animated cursor contains invalid \"icon\" tag cursor-file (%d->%s)\n", + ctype, + ctype == 1 ? "icontype" : "?"); + once++; + } + else if(type == res_aniico && ctype != 1 && !once) + { + parser_warning("Animated icon contains invalid \"icon\" tag icon-file (%d->%s)\n", + ctype, + ctype == 2 ? "cursortype" : "?"); + once++; + } + else if(ctype != 1 && ctype != 2 && !once) + { + parser_warning("Animated %s contains invalid \"icon\" tag file-type (%d; neither icon nor cursor)\n", anistr, ctype); + once++; + } + + for(i = 0; i < count; i++) + { + DWORD ofs = isswapped ? BYTESWAP_DWORD(cdp[i].offset) : cdp[i].offset; + DWORD sze = isswapped ? BYTESWAP_DWORD(cdp[i].ressize) : cdp[i].ressize; + if(ofs > rtp->size || ofs+sze > rtp->size) + parser_error("Animated %s's data corrupt", anistr); + convert_bitmap((char *)chp + ofs, 0); + cdp[i].xhot = BYTESWAP_WORD(cdp->xhot); + cdp[i].yhot = BYTESWAP_WORD(cdp->yhot); + cdp[i].ressize = BYTESWAP_DWORD(cdp->ressize); + cdp[i].offset = BYTESWAP_DWORD(cdp->offset); + } +} + +static void handle_ani_list(riff_tag_t *lst, enum res_e type, int isswapped) +{ + riff_tag_t *rtp = lst+1; /* Skip the "LIST" tag */ + + while((char *)rtp < (char *)lst + lst->size + sizeof(*lst)) + { + if(!memcmp(rtp->tag, info, sizeof(info))) + { + rtp = SKIP_TAG(rtp,4); + } + else if(!memcmp(rtp->tag, inam, sizeof(inam))) + { + /* Ignore the icon/cursor name; its a string */ + rtp = NEXT_TAG(rtp); + } + else if(!memcmp(rtp->tag, iart, sizeof(iart))) + { + /* Ignore the author's name; it's a string */ + rtp = NEXT_TAG(rtp); + } + else if(!memcmp(rtp->tag, fram, sizeof(fram))) + { + /* This should be followed by "icon"s, but we + * simply ignore this because it is pure + * non-information. + */ + rtp = SKIP_TAG(rtp,4); + } + else if(!memcmp(rtp->tag, icon, sizeof(icon))) + { + handle_ani_icon(rtp, type, isswapped); + rtp = NEXT_TAG(rtp); + } + else + internal_error(__FILE__, __LINE__, "Unknown tag \"%c%c%c%c\" in RIFF file\n", + isprint(rtp->tag[0]) ? rtp->tag[0] : '.', + isprint(rtp->tag[1]) ? rtp->tag[1] : '.', + isprint(rtp->tag[2]) ? rtp->tag[2] : '.', + isprint(rtp->tag[3]) ? rtp->tag[3] : '.'); + + if((UINT_PTR)rtp & 1) + rtp = SKIP_TAG(rtp,1); + } +} + +ani_curico_t *new_ani_curico(enum res_e type, raw_data_t *rd, int *memopt) +{ + ani_curico_t *ani = xmalloc(sizeof(ani_curico_t)); + riff_tag_t *rtp; + int isswapped = 0; + int doswap; + const char *anistr = type == res_aniico ? "icon" : "cursor"; + + assert(!memcmp(rd->data, riff, sizeof(riff))); + assert(type == res_anicur || type == res_aniico); + + rtp = (riff_tag_t *)rd->data; + + if(BYTESWAP_DWORD(rtp->size) + 2*sizeof(DWORD) == rd->size) + isswapped = 1; + else if(rtp->size + 2*sizeof(DWORD) == rd->size) + isswapped = 0; + else + parser_error("Animated %s has an invalid RIFF length", anistr); + + switch(byteorder) + { +#ifdef WORDS_BIGENDIAN + case WRC_BO_LITTLE: +#else + case WRC_BO_BIG: +#endif + doswap = !isswapped; + break; + default: + doswap = isswapped; + } + + /* + * When to swap what: + * isswapped | doswap | + * ----------+--------+--------------------------------- + * 0 | 0 | read native; don't convert + * 1 | 0 | read swapped size; don't convert + * 0 | 1 | read native; convert + * 1 | 1 | read swapped size; convert + * Reading swapped size if necessary to calculate in native + * format. E.g. a little-endian source on a big-endian + * processor. + */ + if(doswap) + { + /* We only go through the RIFF file if we need to swap + * bytes in words/dwords. Else we couldn't care less + * what the file contains. This is consistent with + * MS' rc.exe, which doesn't complain at all, even though + * the file format might not be entirely correct. + */ + rtp++; /* Skip the "RIFF" tag */ + + while((char *)rtp < (char *)rd->data + rd->size) + { + if(!memcmp(rtp->tag, acon, sizeof(acon))) + { + rtp = SKIP_TAG(rtp,4); + } + else if(!memcmp(rtp->tag, list, sizeof(list))) + { + handle_ani_list(rtp, type, isswapped); + rtp = NEXT_TAG(rtp); + } + else if(!memcmp(rtp->tag, anih, sizeof(anih))) + { + aniheader_t *ahp = (aniheader_t *)((char *)(rtp+1)); + ahp->structsize = BYTESWAP_DWORD(ahp->structsize); + ahp->frames = BYTESWAP_DWORD(ahp->frames); + ahp->steps = BYTESWAP_DWORD(ahp->steps); + ahp->cx = BYTESWAP_DWORD(ahp->cx); + ahp->cy = BYTESWAP_DWORD(ahp->cy); + ahp->bitcount = BYTESWAP_DWORD(ahp->bitcount); + ahp->planes = BYTESWAP_DWORD(ahp->planes); + ahp->rate = BYTESWAP_DWORD(ahp->rate); + ahp->flags = BYTESWAP_DWORD(ahp->flags); + rtp = NEXT_TAG(rtp); + } + else if(!memcmp(rtp->tag, rate, sizeof(rate))) + { + int cnt = rtp->size / sizeof(DWORD); + DWORD *dwp = (DWORD *)(rtp+1); + int i; + for(i = 0; i < cnt; i++) + dwp[i] = BYTESWAP_DWORD(dwp[i]); + rtp = NEXT_TAG(rtp); + } + else if(!memcmp(rtp->tag, seq, sizeof(seq))) + { + int cnt = rtp->size / sizeof(DWORD); + DWORD *dwp = (DWORD *)(rtp+1); + int i; + for(i = 0; i < cnt; i++) + dwp[i] = BYTESWAP_DWORD(dwp[i]); + rtp = NEXT_TAG(rtp); + } + else + internal_error(__FILE__, __LINE__, "Unknown tag \"%c%c%c%c\" in RIFF file\n", + isprint(rtp->tag[0]) ? rtp->tag[0] : '.', + isprint(rtp->tag[1]) ? rtp->tag[1] : '.', + isprint(rtp->tag[2]) ? rtp->tag[2] : '.', + isprint(rtp->tag[3]) ? rtp->tag[3] : '.'); + + if((UINT_PTR)rtp & 1) + rtp = SKIP_TAG(rtp,1); + } + + /* We must end correctly here */ + if((char *)rtp != (char *)rd->data + rd->size) + parser_error("Animated %s contains invalid field size(s)", anistr); + } + + ani->data = rd; + if(memopt) + { + ani->memopt = *memopt; + free(memopt); + } + else + ani->memopt = WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE; + return ani; +} +#undef NEXT_TAG + +/* Bitmaps */ +bitmap_t *new_bitmap(raw_data_t *rd, int *memopt) +{ + bitmap_t *bmp = xmalloc(sizeof(bitmap_t)); + + bmp->data = rd; + if(memopt) + { + bmp->memopt = *memopt; + free(memopt); + } + else + bmp->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE; + rd->size -= convert_bitmap(rd->data, rd->size); + return bmp; +} + +ver_words_t *new_ver_words(int i) +{ + ver_words_t *w = xmalloc(sizeof(ver_words_t)); + w->words = xmalloc(sizeof(WORD)); + w->words[0] = (WORD)i; + w->nwords = 1; + return w; +} + +ver_words_t *add_ver_words(ver_words_t *w, int i) +{ + w->words = xrealloc(w->words, (w->nwords+1) * sizeof(WORD)); + w->words[w->nwords] = (WORD)i; + w->nwords++; + return w; +} + +#define MSGTAB_BAD_PTR(p, b, l, r) (((l) - ((char *)(p) - (char *)(b))) > (r)) +messagetable_t *new_messagetable(raw_data_t *rd, int *memopt) +{ + messagetable_t *msg = xmalloc(sizeof(messagetable_t)); + msgtab_block_t *mbp; + DWORD nblk; + DWORD i; + WORD lo; + WORD hi; + + msg->data = rd; + if(memopt) + { + msg->memopt = *memopt; + free(memopt); + } + else + msg->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE; + + if(rd->size < sizeof(DWORD)) + parser_error("Invalid messagetable, size too small"); + + nblk = *(DWORD *)rd->data; + lo = WRC_LOWORD(nblk); + hi = WRC_HIWORD(nblk); + + /* FIXME: + * This test will fail for all n*2^16 blocks in the messagetable. + * However, no sane person would want to have so many blocks + * and have a table of megabytes attached. + * So, I will assume that we have less than 2^16 blocks in the table + * and all will just work out fine. Otherwise, we would need to test + * the ID, offset and length (and flag) fields to be very sure. + */ + if(hi && lo) + internal_error(__FILE__, __LINE__, "Messagetable contains more than 65535 blocks; cannot determine endian\n"); + if(!hi && !lo) + parser_error("Invalid messagetable block count 0"); + + if(!hi && lo) /* Messagetable byteorder == native byteorder */ + { +#ifdef WORDS_BIGENDIAN + if(byteorder != WRC_BO_LITTLE) goto out; +#else + if(byteorder != WRC_BO_BIG) goto out; +#endif + /* Resource byteorder != native byteorder */ + + mbp = (msgtab_block_t *)&(((DWORD *)rd->data)[1]); + if(MSGTAB_BAD_PTR(mbp, rd->data, rd->size, nblk * sizeof(*mbp))) + parser_error("Messagetable's blocks are outside of defined data"); + for(i = 0; i < nblk; i++) + { + msgtab_entry_t *mep, *next_mep; + DWORD id; + + mep = (msgtab_entry_t *)(((char *)rd->data) + mbp[i].offset); + + for(id = mbp[i].idlo; id <= mbp[i].idhi; id++) + { + if(MSGTAB_BAD_PTR(mep, rd->data, rd->size, mep->length)) + parser_error("Messagetable's data for block %d, ID 0x%08x is outside of defined data", i, id); + if(mep->flags == 1) /* Docu says 'flags == 0x0001' for unicode */ + { + WORD *wp = (WORD *)&mep[1]; + int l = mep->length/2 - 2; /* Length included header */ + int n; + + if(mep->length & 1) + parser_error("Message 0x%08x is unicode (block %d), but has odd length (%d)", id, i, mep->length); + for(n = 0; n < l; n++) + wp[n] = BYTESWAP_WORD(wp[n]); + + } + next_mep = (msgtab_entry_t *)(((char *)mep) + mep->length); + mep->length = BYTESWAP_WORD(mep->length); + mep->flags = BYTESWAP_WORD(mep->flags); + mep = next_mep; + } + + mbp[i].idlo = BYTESWAP_DWORD(mbp[i].idlo); + mbp[i].idhi = BYTESWAP_DWORD(mbp[i].idhi); + mbp[i].offset = BYTESWAP_DWORD(mbp[i].offset); + } + } + if(hi && !lo) /* Messagetable byteorder != native byteorder */ + { +#ifdef WORDS_BIGENDIAN + if(byteorder == WRC_BO_LITTLE) goto out; +#else + if(byteorder == WRC_BO_BIG) goto out; +#endif + /* Resource byteorder == native byteorder */ + + mbp = (msgtab_block_t *)&(((DWORD *)rd->data)[1]); + nblk = BYTESWAP_DWORD(nblk); + if(MSGTAB_BAD_PTR(mbp, rd->data, rd->size, nblk * sizeof(*mbp))) + parser_error("Messagetable's blocks are outside of defined data"); + for(i = 0; i < nblk; i++) + { + msgtab_entry_t *mep; + DWORD id; + + mbp[i].idlo = BYTESWAP_DWORD(mbp[i].idlo); + mbp[i].idhi = BYTESWAP_DWORD(mbp[i].idhi); + mbp[i].offset = BYTESWAP_DWORD(mbp[i].offset); + mep = (msgtab_entry_t *)(((char *)rd->data) + mbp[i].offset); + + for(id = mbp[i].idlo; id <= mbp[i].idhi; id++) + { + mep->length = BYTESWAP_WORD(mep->length); + mep->flags = BYTESWAP_WORD(mep->flags); + + if(MSGTAB_BAD_PTR(mep, rd->data, rd->size, mep->length)) + parser_error("Messagetable's data for block %d, ID 0x%08x is outside of defined data", i, id); + if(mep->flags == 1) /* Docu says 'flags == 0x0001' for unicode */ + { + WORD *wp = (WORD *)&mep[1]; + int l = mep->length/2 - 2; /* Length included header */ + int n; + + if(mep->length & 1) + parser_error("Message 0x%08x is unicode (block %d), but has odd length (%d)", id, i, mep->length); + for(n = 0; n < l; n++) + wp[n] = BYTESWAP_WORD(wp[n]); + + } + mep = (msgtab_entry_t *)(((char *)mep) + mep->length); + } + } + } + + out: + return msg; +} +#undef MSGTAB_BAD_PTR + +void copy_raw_data(raw_data_t *dst, raw_data_t *src, unsigned int offs, int len) +{ + assert(offs <= src->size); + assert(offs + len <= src->size); + if(!dst->data) + { + dst->data = xmalloc(len); + dst->size = 0; + } + else + dst->data = xrealloc(dst->data, dst->size + len); + /* dst->size holds the offset to copy to */ + memcpy(dst->data + dst->size, src->data + offs, len); + dst->size += len; +} + +int *new_int(int i) +{ + int *ip = xmalloc(sizeof(int)); + *ip = i; + return ip; +} + +stringtable_t *new_stringtable(lvc_t *lvc) +{ + stringtable_t *stt = xmalloc(sizeof(stringtable_t)); + + memset( stt, 0, sizeof(*stt) ); + if(lvc) + stt->lvc = *lvc; + + return stt; +} + +toolbar_t *new_toolbar(int button_width, int button_height, toolbar_item_t *items, int nitems) +{ + toolbar_t *tb = xmalloc(sizeof(toolbar_t)); + memset( tb, 0, sizeof(*tb) ); + tb->button_width = button_width; + tb->button_height = button_height; + tb->nitems = nitems; + tb->items = items; + return tb; +} + +dlginit_t *new_dlginit(raw_data_t *rd, int *memopt) +{ + dlginit_t *di = xmalloc(sizeof(dlginit_t)); + di->data = rd; + if(memopt) + { + di->memopt = *memopt; + free(memopt); + } + else + di->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE | WRC_MO_DISCARDABLE; + + return di; +} + +style_pair_t *new_style_pair(style_t *style, style_t *exstyle) +{ + style_pair_t *sp = xmalloc(sizeof(style_pair_t)); + sp->style = style; + sp->exstyle = exstyle; + return sp; +} + +style_t *new_style(DWORD or_mask, DWORD and_mask) +{ + style_t *st = xmalloc(sizeof(style_t)); + st->or_mask = or_mask; + st->and_mask = and_mask; + return st; +} diff --git a/tools/wrc/wrcrostypes.h b/tools/wrc/wrcrostypes.h new file mode 100644 index 00000000000..87802ff18af --- /dev/null +++ b/tools/wrc/wrcrostypes.h @@ -0,0 +1,118 @@ +/* + PROJECT: ReactOS + LICENSE: GPL v2 or any later version + FILE: tools/wrc/wrcrostypes.h + PURPOSE: Definitions and macros from Windows headers, which are needed for wrc + COPYRIGHT: Copyright 2007 Colin Finck +*/ + +#ifndef _WRC_ROSTYPES_H +#define _WRC_ROSTYPES_H + +#include +#include +#include + +// Definitions copied from various files +// We only want to include host headers, so we define them manually +#define VS_FFI_SIGNATURE 0xFEEF04BD +#define VS_FFI_STRUCVERSION 0x10000 + +#define BS_3STATE 5 +#define BS_AUTO3STATE 6 +#define BS_AUTOCHECKBOX 3 +#define BS_AUTORADIOBUTTON 9 +#define BS_CHECKBOX 2 +#define CBS_DROPDOWN 2 +#define CBS_DROPDOWNLIST 3 +#define CBS_SIMPLE 1 +#define BS_DEFPUSHBUTTON 1 +#define BS_GROUPBOX 7 +#define BS_PUSHBUTTON 0 +#define BS_RADIOBUTTON 4 +#define DS_SETFONT 64 +#define ES_LEFT 0 +#define LBS_NOTIFY 1 +#define MF_CHECKED 8 +#define MF_GRAYED 1 +#define MF_DISABLED 2 +#define MF_HELP 0x4000 +#define MF_MENUBARBREAK 32 +#define MF_MENUBREAK 64 +#define MF_POPUP 16 +#define MF_END 128 +#define SBS_HORZ 0 +#define SS_CENTER 1 +#define SS_ICON 3 +#define SS_LEFT 0 +#define SS_RIGHT 2 +#define WS_BORDER 0x800000 +#define WS_CAPTION 0xc00000 +#define WS_CHILD 0x40000000 +#define WS_GROUP 0x20000 +#define WS_POPUP 0x80000000 +#define WS_POPUPWINDOW 0x80880000 +#define WS_TABSTOP 0x10000 +#define WS_VISIBLE 0x10000000 + +#include +typedef struct tagBITMAPFILEHEADER { + WORD bfType; + DWORD bfSize; + WORD bfReserved1; + WORD bfReserved2; + DWORD bfOffBits; +} BITMAPFILEHEADER,*LPBITMAPFILEHEADER,*PBITMAPFILEHEADER; +#include + +typedef int FXPT2DOT30; +typedef struct tagCIEXYZ { + FXPT2DOT30 ciexyzX; + FXPT2DOT30 ciexyzY; + FXPT2DOT30 ciexyzZ; +} CIEXYZ,*LPCIEXYZ; + +typedef struct tagCIEXYZTRIPLE { + CIEXYZ ciexyzRed; + CIEXYZ ciexyzGreen; + CIEXYZ ciexyzBlue; +} CIEXYZTRIPLE,*LPCIEXYZTRIPLE; + +typedef struct tagBITMAPINFOHEADER{ + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; +} BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER; + +typedef struct { + DWORD bV4Size; + LONG bV4Width; + LONG bV4Height; + WORD bV4Planes; + WORD bV4BitCount; + DWORD bV4V4Compression; + DWORD bV4SizeImage; + LONG bV4XPelsPerMeter; + LONG bV4YPelsPerMeter; + DWORD bV4ClrUsed; + DWORD bV4ClrImportant; + DWORD bV4RedMask; + DWORD bV4GreenMask; + DWORD bV4BlueMask; + DWORD bV4AlphaMask; + DWORD bV4CSType; + CIEXYZTRIPLE bV4Endpoints; + DWORD bV4GammaRed; + DWORD bV4GammaGreen; + DWORD bV4GammaBlue; +} BITMAPV4HEADER,*LPBITMAPV4HEADER,*PBITMAPV4HEADER; + +#endif